Skip to content
Source
Sign inSign up
TanStack/cli

feat(create): add Themer integration #569

Mergedtannerlinsleymerged 3 commits intomain fromrefs/pull/569/headmerged by tannerlinsley

Showing 8 changed files with 217 additions and 0 deletions (loading 6).

x
0 of 8 viewed, 8 left
5 additions and 0 deletions.changeset/soft-themes-switch.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+"@tanstack/create": minor
+---
+​
+Add the optional Themer integration for React Start, preserving saved light, dark and system preferences before hydration and across browser tabs.
212 additions and 0 deletionspackages/cli/tests-e2e/themer-smoke.spec.tsAdded
View file
@@ -0,0 +1,212 @@
+import { expect, test } from '@playwright/test'
+​
+import { createReactAppFixture } from './helpers'
+​
+declare global {
+ interface Window {
+ __themerMutations: Array<{ at: number; className: string }>
+ }
+}
+​
+// Blocking client modules lets this check inspect the server-rendered document
+// after its first contentful paint, before React can repair a wrong theme.
+test('@blocking preserves Themer preferences before hydration and across tabs', async ({
+ browser,
+}) => {
+ const app = await createReactAppFixture({
+ appName: 'themer-smoke-app',
+ addOns: ['themer'],
+ packageManager: 'pnpm',
+ runQualityGatesChecks: true,
+ })
+​