@uniweb/build 0.14.34 → 0.14.36

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": "@uniweb/build",
3
- "version": "0.14.34",
3
+ "version": "0.14.36",
4
4
  "description": "Build tooling for the Uniweb Component Web Platform",
5
5
  "type": "module",
6
6
  "exports": {
@@ -59,12 +59,12 @@
59
59
  "js-yaml": "^4.1.0",
60
60
  "sharp": "^0.33.2",
61
61
  "yaml": "^2.5.0",
62
- "@uniweb/content-writer": "0.2.6",
62
+ "@uniweb/content-writer": "0.2.7",
63
63
  "@uniweb/theming": "0.1.9"
64
64
  },
65
65
  "optionalDependencies": {
66
- "@uniweb/content-reader": "1.1.13",
67
- "@uniweb/runtime": "0.8.27",
66
+ "@uniweb/content-reader": "1.1.14",
67
+ "@uniweb/runtime": "0.8.28",
68
68
  "@uniweb/schemas": "0.2.4"
69
69
  },
70
70
  "peerDependencies": {
@@ -74,7 +74,7 @@
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.7.21"
77
+ "@uniweb/core": "0.7.22"
78
78
  },
79
79
  "peerDependenciesMeta": {
80
80
  "vite": {
@@ -241,11 +241,17 @@ function collectInlineText(node) {
241
241
  for (const child of node.content) {
242
242
  if (child.type === 'text') {
243
243
  out += child.text || ''
244
+ } else if (child.type === 'hardBreak') {
245
+ // A break must contribute a separator or the words either side fuse
246
+ // ("line oneline two"), silently changing the unit key. "\n" is the
247
+ // pinned separator — see vector I. computeHash normalizes whitespace, so
248
+ // it hashes identically to " "; only the raw structural-map key differs.
249
+ out += '\n'
244
250
  } else if (child.content) {
245
251
  // recurse through inline wrappers into their text
246
252
  out += collectInlineText(child)
247
253
  }
248
- // else: inline atom (image/icon/emoji/math/hardBreak) → contributes no text
254
+ // else: other inline atom (image/icon/emoji/math) → contributes no text
249
255
  }
250
256
  return out
251
257
  }
@@ -93,7 +93,7 @@ export function parseSchemaRef(ref) {
93
93
  if (typeof ref !== 'string' || ref[0] !== '@') {
94
94
  throw new Error(
95
95
  `Invalid data-schema ref ${JSON.stringify(ref)}: must start with '@' ` +
96
- `(e.g. '@/member' for this foundation, or '@uniweb/person' for a shared standard).`
96
+ `(e.g. '@/member' for this foundation, or '@std/person' for a shared standard).`
97
97
  )
98
98
  }
99
99
  const slash = ref.indexOf('/')
@@ -324,10 +324,26 @@ export function validateAndNormalizeSchema(schema, ref) {
324
324
  }
325
325
 
326
326
  const out = {}
327
- for (const k of ['name', 'version', 'description', 'sort_date', 'sortDate']) {
327
+ for (const k of ['name', 'version', 'description']) {
328
328
  if (schema[k] !== undefined) out[k] = schema[k]
329
329
  }
330
330
 
331
+ // The model's sort axis names a DATE FIELD IN THE BRIEF section (not a boolean,
332
+ // not a field-level flag) — the lowering stamps `sort_date: true` on that field.
333
+ // Authored as `sort_date` (the authoring vocabulary is snake_case, like
334
+ // `append_only`); `sortDate` is an accepted alias. Both normalize to `sortDate`,
335
+ // the single key the lowering reads — carrying the two spellings through verbatim
336
+ // meant an authored `sort_date` was silently dropped.
337
+ const sortDate = schema.sort_date ?? schema.sortDate
338
+ if (sortDate !== undefined) {
339
+ if (typeof sortDate !== 'string') {
340
+ throw new Error(
341
+ `Data schema '${ref}': 'sort_date' must name a date field in the brief section, got ${typeof sortDate}.`
342
+ )
343
+ }
344
+ out.sortDate = sortDate
345
+ }
346
+
331
347
  const hasFields = schema.fields !== undefined
332
348
  const hasSections = schema.sections !== undefined
333
349
  if (hasFields && hasSections) {