@uniweb/build 0.14.8 → 0.14.10

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.8",
3
+ "version": "0.14.10",
4
4
  "description": "Build tooling for the Uniweb Component Web Platform",
5
5
  "type": "module",
6
6
  "exports": {
@@ -59,13 +59,13 @@
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.5",
63
- "@uniweb/theming": "0.1.3"
62
+ "@uniweb/theming": "0.1.3",
63
+ "@uniweb/content-writer": "0.2.5"
64
64
  },
65
65
  "optionalDependencies": {
66
+ "@uniweb/runtime": "0.8.16",
66
67
  "@uniweb/content-reader": "1.1.12",
67
- "@uniweb/schemas": "0.2.1",
68
- "@uniweb/runtime": "0.8.16"
68
+ "@uniweb/schemas": "0.2.2"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "vite": "^5.0.0 || ^6.0.0 || ^7.0.0",
@@ -458,17 +458,19 @@ function normalizeField(field, ref, path) {
458
458
  }
459
459
 
460
460
  // Content `format` markers are registered per-shape (uwx-format.md §3): the
461
- // rich-content markers `markdown`/`html` belong on a `text` field, `prosemirror`
462
- // on a `json` field. Catch a mismatch at build time, not at publish (the backend
461
+ // rich-content markers `markdown`/`html` belong on a `text` field; `prosemirror`
462
+ // (a ProseMirror doc) and `scene` (a Scene Composition Format payload an opaque
463
+ // structured blob the app edits via the Designer / visual canvas) both belong on
464
+ // a `json` field. Catch a mismatch at build time, not at publish (the backend
463
465
  // rejects it). Value-validator formats (email/url) are unrestricted here.
464
466
  if ((out.format === 'markdown' || out.format === 'html') && out.type !== 'text') {
465
467
  throw new Error(
466
468
  `Data schema '${ref}': field '${path}' has format '${out.format}', valid only on a 'text' field (got '${out.type}').`
467
469
  )
468
470
  }
469
- if (out.format === 'prosemirror' && out.type !== 'json') {
471
+ if ((out.format === 'prosemirror' || out.format === 'scene') && out.type !== 'json') {
470
472
  throw new Error(
471
- `Data schema '${ref}': field '${path}' has format 'prosemirror', valid only on a 'json' field (got '${out.type}').`
473
+ `Data schema '${ref}': field '${path}' has format '${out.format}', valid only on a 'json' field (got '${out.type}').`
472
474
  )
473
475
  }
474
476