create-tririga-react-ts-vite-app 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-tririga-react-ts-vite-app",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Scaffold a TRIRIGA React app with Vite and TypeScript",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -5,6 +5,14 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Tririga React App</title>
8
+ <script>
9
+ // Apply theme early to prevent Flash of Unstyled Content (FOUC)
10
+ if (localStorage.getItem('theme') === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
11
+ document.documentElement.classList.add('dark');
12
+ } else {
13
+ document.documentElement.classList.remove('dark');
14
+ }
15
+ </script>
8
16
  </head>
9
17
  <body>
10
18
  <div id="root"></div>