@uniweb/build 0.71.0 → 0.73.0
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 +8 -8
- package/src/uwx/site-project.js +9 -10
- package/src/uwx/site.js +6 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniweb/build",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.73.0",
|
|
4
4
|
"description": "Build tooling for the Uniweb Component Web Platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -57,15 +57,15 @@
|
|
|
57
57
|
"js-yaml": "^4.1.0",
|
|
58
58
|
"sharp": "^0.35.3",
|
|
59
59
|
"yaml": "^2.5.0",
|
|
60
|
+
"@uniweb/content-reader": "^1.2.7",
|
|
60
61
|
"@uniweb/content-writer": "^0.3.4",
|
|
62
|
+
"@uniweb/projections": "^0.7.11",
|
|
63
|
+
"@uniweb/schemas": "^0.9.1",
|
|
61
64
|
"@uniweb/semantic-parser": "^1.4.1",
|
|
62
|
-
"@uniweb/
|
|
63
|
-
"@uniweb/theming": "^0.1.16",
|
|
64
|
-
"@uniweb/content-reader": "^1.2.7",
|
|
65
|
-
"@uniweb/schemas": "^0.9.1"
|
|
65
|
+
"@uniweb/theming": "^0.2.0"
|
|
66
66
|
},
|
|
67
67
|
"optionalDependencies": {
|
|
68
|
-
"@uniweb/runtime": "^0.28.
|
|
68
|
+
"@uniweb/runtime": "^0.28.3"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"@tailwindcss/vite": "^4.0.0",
|
|
75
75
|
"@vitejs/plugin-react": "^4.0.0 || ^5.0.0",
|
|
76
76
|
"vite-plugin-svgr": "^4.0.0",
|
|
77
|
-
"@uniweb/core": "^0.
|
|
78
|
-
"@uniweb/runtime": "^0.28.
|
|
77
|
+
"@uniweb/core": "^0.35.0",
|
|
78
|
+
"@uniweb/runtime": "^0.28.3"
|
|
79
79
|
},
|
|
80
80
|
"peerDependenciesMeta": {
|
|
81
81
|
"vite": {
|
package/src/uwx/site-project.js
CHANGED
|
@@ -387,7 +387,7 @@ export function siteInfoToConfig({ document, siteRoot, backend = null, sourceLoc
|
|
|
387
387
|
* Project one section `$`-record (from `page_sections` / `layout_sections`) to a
|
|
388
388
|
* section `.md` file — the inverse of site.js `mapSectionData`. Frontmatter is
|
|
389
389
|
* `type` + `hidden` + the flat `params` (`background` and `theme` among them) +
|
|
390
|
-
* the data declaration (`params.fetch
|
|
390
|
+
* the data declaration (`params.fetch`) + `id` (`stable_id`);
|
|
391
391
|
* the body is the section's content serialized to markdown. Idempotent.
|
|
392
392
|
*
|
|
393
393
|
* Note: `$children` (a section's child sections) are NOT written here — the page
|
|
@@ -406,10 +406,11 @@ export function siteInfoToConfig({ document, siteRoot, backend = null, sourceLoc
|
|
|
406
406
|
export function sectionRecordToFile({ filePath, record, sourceLocale = LOCALIZED_FIELD_ASSUMPTION.defaultSourceLocale, collector, freeformRelPath, freeformCandidates = null, writeId = true, context = null }) {
|
|
407
407
|
// ⛔ A stored `preset` or `input` is not written back: neither has an effect, and the build
|
|
408
408
|
// would only warn about it (2026-09-27).
|
|
409
|
-
// ⛔ No `background` / `theme_override` / `insets`: the site-content Model dropped all
|
|
410
|
-
// (2026-09-28), with a stored background
|
|
411
|
-
// filled in where `params` lacked the key, and a stored
|
|
412
|
-
|
|
409
|
+
// ⛔ No `background` / `theme_override` / `insets` / `fetch`: the site-content Model dropped all
|
|
410
|
+
// four from a section (2026-09-28), with a stored background, theme and data declaration copied
|
|
411
|
+
// into `params`. Until then a field filled in where `params` lacked the key, and a stored
|
|
412
|
+
// `insets[]` was re-inlined into the body. (A PAGE's `fetch` is its own field — `pageRecordToYml`.)
|
|
413
|
+
const { type, stable_id, hidden, params, content } = record || {}
|
|
413
414
|
|
|
414
415
|
// A localized `content` field unwraps to the source-locale doc for the body; its
|
|
415
416
|
// target-locale structural maps are captured into the locales/ collector, and any
|
|
@@ -429,11 +430,9 @@ export function sectionRecordToFile({ filePath, record, sourceLocale = LOCALIZED
|
|
|
429
430
|
// Invert the build's resolution rather than copy it — see fetch-shapes.js. A new
|
|
430
431
|
// file gets `query:` for a declaration of names alone; a section that declares
|
|
431
432
|
// its data locally keeps it (`writeSectionFile`, the declaration keys).
|
|
432
|
-
// ⭐ From `params.fetch`
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
if (ownFetch !== undefined) {
|
|
436
|
-
const { key, value } = authorableDeclaration(ownFetch)
|
|
433
|
+
// ⭐ From `params.fetch` — where a section carries its data since 2026-09-28.
|
|
434
|
+
if (paramFetch !== undefined) {
|
|
435
|
+
const { key, value } = authorableDeclaration(paramFetch)
|
|
437
436
|
frontmatter[key] = value
|
|
438
437
|
}
|
|
439
438
|
// `id:` only where the file's name does not already give it (`writeId`, `pageSectionsToFiles`).
|
package/src/uwx/site.js
CHANGED
|
@@ -303,8 +303,10 @@ function localizePageMeta(page, route, sourceLocale, translations) {
|
|
|
303
303
|
function mapSectionData(section) {
|
|
304
304
|
const params = { ...section.params }
|
|
305
305
|
// ⭐ The section's own data rides in `params.fetch` [Diego, 2026-09-28] — nothing on a store's
|
|
306
|
-
// side acts on it by name
|
|
307
|
-
//
|
|
306
|
+
// side acts on it by name, and every reader looks there first: core since 0.34.0 (runtime
|
|
307
|
+
// 0.28.1, the least a site publishes at), and an editor. ⛔ Until 2026-09-28 it was also sent as
|
|
308
|
+
// the `fetch` field beside the params, equal; a pull still reads a stored field where `params`
|
|
309
|
+
// has no `fetch` (`sectionRecordToFile`). uwx-format.md § A page section's fields.
|
|
308
310
|
if (section.fetch) params.fetch = section.fetch
|
|
309
311
|
const data = { type: section.type || FILLED_SECTION_TYPE } // entity type requires `type`
|
|
310
312
|
setIf(data, 'stable_id', section.stableId ?? undefined)
|
|
@@ -313,14 +315,10 @@ function mapSectionData(section) {
|
|
|
313
315
|
// No `preset` or `input`: nothing read either, and the collector drops them (2026-09-27).
|
|
314
316
|
// ⭐ `background` and `theme` ride IN `params` [Diego, 2026-09-28] — where the runtime reads
|
|
315
317
|
// them, and where a section stores them. ⛔ Not also as the `background` / `theme_override`
|
|
316
|
-
// fields, as build 0.69 sent them: every reader of a stored section reads `params
|
|
317
|
-
//
|
|
318
|
-
// needs them, and a push that stops sending them lets a backend retire them without refusing
|
|
319
|
-
// it. A pull still prefers a stored field while one exists (`sectionRecordToFile`).
|
|
320
|
-
// uwx-format.md § A page section's fields, Order.
|
|
318
|
+
// fields, as build 0.69 sent them: every reader of a stored section reads `params`, and the
|
|
319
|
+
// site-content Model no longer has either field. uwx-format.md § A page section's fields.
|
|
321
320
|
if (Object.keys(params).length > 0) data.params = params
|
|
322
321
|
data.content = section.content // leaf insets in it as written — no `insets` field since 2026-09-27
|
|
323
|
-
setIf(data, 'fetch', section.fetch ?? undefined)
|
|
324
322
|
return data
|
|
325
323
|
}
|
|
326
324
|
|