@uniweb/build 0.15.10 → 0.15.12
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 +7 -7
- package/src/generate-entry.js +9 -0
- package/src/prerender.js +20 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniweb/build",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.12",
|
|
4
4
|
"description": "Build tooling for the Uniweb Component Web Platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -57,15 +57,15 @@
|
|
|
57
57
|
"@citestyle/bibtex": "^1.1.0",
|
|
58
58
|
"esbuild": "^0.21.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.27.0",
|
|
59
59
|
"js-yaml": "^4.1.0",
|
|
60
|
-
"sharp": "^0.
|
|
60
|
+
"sharp": "^0.35.3",
|
|
61
61
|
"yaml": "^2.5.0",
|
|
62
|
-
"@uniweb/
|
|
63
|
-
"@uniweb/
|
|
64
|
-
"@uniweb/
|
|
62
|
+
"@uniweb/theming": "0.1.14",
|
|
63
|
+
"@uniweb/projections": "0.1.5",
|
|
64
|
+
"@uniweb/content-writer": "0.2.9"
|
|
65
65
|
},
|
|
66
66
|
"optionalDependencies": {
|
|
67
67
|
"@uniweb/content-reader": "1.1.17",
|
|
68
|
-
"@uniweb/runtime": "0.8.
|
|
68
|
+
"@uniweb/runtime": "0.8.41",
|
|
69
69
|
"@uniweb/schemas": "0.2.4"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@tailwindcss/vite": "^4.0.0",
|
|
76
76
|
"@vitejs/plugin-react": "^4.0.0 || ^5.0.0",
|
|
77
77
|
"vite-plugin-svgr": "^4.0.0",
|
|
78
|
-
"@uniweb/core": "0.7.
|
|
78
|
+
"@uniweb/core": "0.7.33"
|
|
79
79
|
},
|
|
80
80
|
"peerDependenciesMeta": {
|
|
81
81
|
"vite": {
|
package/src/generate-entry.js
CHANGED
|
@@ -186,6 +186,15 @@ function generateEntrySource(components, options = {}) {
|
|
|
186
186
|
const capParts = []
|
|
187
187
|
if (foundationExports) {
|
|
188
188
|
capParts.push('..._foundationModule.default')
|
|
189
|
+
// `vars` is a NAMED export of main.js, so the spread above misses it —
|
|
190
|
+
// schema.js reads `module.vars || module.default?.vars` and this must
|
|
191
|
+
// agree with it (named wins), or the runtime and the editor would see
|
|
192
|
+
// different foundation vars. Without this line the declared theme vars
|
|
193
|
+
// exist ONLY in dist/meta/schema.json, which is a build-time artifact:
|
|
194
|
+
// any lane that generates theme CSS outside the build (the runtime's
|
|
195
|
+
// ensureThemeCss, a cloud shell assembler) would silently produce a
|
|
196
|
+
// theme missing every foundation-declared var.
|
|
197
|
+
capParts.push('vars: _foundationModule.vars || _foundationModule.default?.vars')
|
|
189
198
|
}
|
|
190
199
|
if (layoutNames.length > 0) {
|
|
191
200
|
capParts.push(`layouts: { ${layoutNames.join(', ')} }`)
|
package/src/prerender.js
CHANGED
|
@@ -383,6 +383,19 @@ export function injectBuildData(html, siteContent, { splitContent = false, curre
|
|
|
383
383
|
|
|
384
384
|
// Inject the theme's font <link> tags if not already present (the vite
|
|
385
385
|
// plugin normally puts them there when it builds index.html)
|
|
386
|
+
//
|
|
387
|
+
// STILL HERE, and it is the remaining half of the 2026-07-28 seam fix.
|
|
388
|
+
// `theme.links` is graph-derived like the theme CSS was, so by the rule
|
|
389
|
+
// below it belongs in injectPageContent() too — a lane that doesn't run
|
|
390
|
+
// this build gets no webfont <link>s and falls back to system fonts.
|
|
391
|
+
// What blocks the move is the marker, not the principle: FONT_LINKS_MARKER
|
|
392
|
+
// has a second consumer in site/plugin.js (the vite plugin), which must not
|
|
393
|
+
// import the SSR bundle, and @uniweb/build declares no dependency on
|
|
394
|
+
// @uniweb/runtime — so there is no one place both sides can read it from
|
|
395
|
+
// today. Fixing that means giving the runtime a zero-dep leaf export for
|
|
396
|
+
// the constant and re-exporting it here. Degraded-not-broken (wrong
|
|
397
|
+
// typeface, not unstyled), which is why it was scoped out rather than
|
|
398
|
+
// rushed.
|
|
386
399
|
if (siteContent?.theme?.links && !result.includes(FONT_LINKS_MARKER)) {
|
|
387
400
|
result = result.replace(
|
|
388
401
|
'</head>',
|
|
@@ -390,13 +403,13 @@ export function injectBuildData(html, siteContent, { splitContent = false, curre
|
|
|
390
403
|
)
|
|
391
404
|
}
|
|
392
405
|
|
|
393
|
-
//
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
406
|
+
// Theme CSS is NOT injected here. Like the appearance boot script below, it
|
|
407
|
+
// is derived from the website graph (`website.themeData`), so it belongs to
|
|
408
|
+
// the shared seam — @uniweb/runtime/ssr's injectPageContent(), which runs
|
|
409
|
+
// just before this — and every lane gets it from one implementation. It sat
|
|
410
|
+
// here until 2026-07-28 and cloud-rendered pages were unstyled the whole
|
|
411
|
+
// time. See the "which side of the seam?" note there before adding a new
|
|
412
|
+
// head injection, and note that this file has now got it wrong twice.
|
|
400
413
|
|
|
401
414
|
// The pre-paint appearance script is NOT injected here. It belongs to the
|
|
402
415
|
// shared seam — @uniweb/runtime/ssr's injectPageContent(), which runs just
|