You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PageSchema gains kind:'jsx' + source (the authoritative JSX text, compiled to
the tree at save time) + requires (plugin provenance). A superRefine enforces
ADR-0078 completeness: a jsx page with no source fails loudly at author time.
full/slotted pages unchanged.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
}).optional().describe('Slot override map for slotted pages'),
387
+
388
+
/**
389
+
* JSX-source authoring (ADR-0080). When `kind === 'jsx'`, `source` is the
390
+
* source-of-truth: a constrained JSX/HTML+Tailwind text compiled by
391
+
* `@objectstack/sdui-parser` into the SchemaNode tree at SAVE time — parse,
392
+
* never execute. `regions` then hold the DERIVED tree (a cache; the source
393
+
* wins on any mismatch). For `full`/`slotted` pages `source` is unused.
394
+
*/
395
+
source: z.string().optional()
396
+
.describe("JSX-source page text — authoritative when kind==='jsx'; compiled to the tree by @objectstack/sdui-parser at save time (parse, never execute)"),
397
+
/** Plugin namespaces the JSX source references — inferred at compile, checked at save AND load (ADR-0048 provenance). */
398
+
requires: z.array(z.string()).optional()
399
+
.describe('Plugin namespaces the JSX source references (validated at save and load)'),
400
+
}).superRefine((page,ctx)=>{
401
+
// ADR-0080 + ADR-0078 (completeness): a `kind:'jsx'` page with no `source`
402
+
// is silently inert — fail loudly at author time, do not render an empty page.
0 commit comments