@constela/start 1.5.1 → 1.5.2
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.
|
@@ -121,9 +121,23 @@ ${importMapJson}
|
|
|
121
121
|
themeScript = `<script>
|
|
122
122
|
(function() {
|
|
123
123
|
try {
|
|
124
|
-
var
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
var theme;
|
|
125
|
+
// Check cookie first (for SSR/SSG sync)
|
|
126
|
+
var cookies = document.cookie.split(';');
|
|
127
|
+
for (var i = 0; i < cookies.length; i++) {
|
|
128
|
+
var cookie = cookies[i].trim();
|
|
129
|
+
if (cookie.indexOf('${options.themeStorageKey}=') === 0) {
|
|
130
|
+
theme = decodeURIComponent(cookie.substring('${options.themeStorageKey}='.length));
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
// Fallback to localStorage
|
|
135
|
+
if (!theme) {
|
|
136
|
+
var raw = localStorage.getItem('${options.themeStorageKey}');
|
|
137
|
+
theme = raw;
|
|
138
|
+
try { theme = JSON.parse(raw); } catch (e) {}
|
|
139
|
+
}
|
|
140
|
+
// Apply theme
|
|
127
141
|
if (theme === 'dark') {
|
|
128
142
|
document.documentElement.classList.add('dark');
|
|
129
143
|
} else if (theme === 'light') {
|
package/dist/cli/index.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -28,14 +28,14 @@ import {
|
|
|
28
28
|
transformCsv,
|
|
29
29
|
transformMdx,
|
|
30
30
|
transformYaml
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-2QR63VOH.js";
|
|
32
32
|
import {
|
|
33
33
|
evaluateMetaExpression,
|
|
34
34
|
generateHydrationScript,
|
|
35
35
|
generateMetaTags,
|
|
36
36
|
renderPage,
|
|
37
37
|
wrapHtml
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-PG3Y4EJN.js";
|
|
39
39
|
|
|
40
40
|
// src/build/ssg.ts
|
|
41
41
|
import { mkdir, writeFile } from "fs/promises";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constela/start",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "Meta-framework for Constela applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"@constela/compiler": "0.11.1",
|
|
47
47
|
"@constela/core": "0.12.0",
|
|
48
48
|
"@constela/runtime": "0.15.0",
|
|
49
|
-
"@constela/
|
|
50
|
-
"@constela/
|
|
49
|
+
"@constela/router": "13.0.0",
|
|
50
|
+
"@constela/server": "8.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/mdast": "^4.0.4",
|