@niscorp/nova 0.3.0 → 0.3.1
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/ACTION_DOCS.md +2 -0
- package/ADAPTER.md +19 -1
- package/CHANGELOG.md +18 -0
- package/I18N_DOCS.md +18 -3
- package/REACT_DOCS.md +4 -2
- package/README.md +93 -3
- package/SHELL_DOCS.md +16 -7
- package/TERMINAL_DOCS.md +24 -5
- package/dist/adapters/dom/components/index.cjs +2 -4
- package/dist/adapters/dom/components/index.cjs.map +1 -1
- package/dist/adapters/dom/components/index.d.cts +4 -4
- package/dist/adapters/dom/components/index.d.ts +4 -4
- package/dist/adapters/dom/components/index.js +1 -3
- package/dist/adapters/dom/components/index.js.map +1 -1
- package/dist/adapters/dom/index.cjs +14 -14
- package/dist/adapters/dom/index.d.cts +4 -4
- package/dist/adapters/dom/index.d.ts +4 -4
- package/dist/adapters/dom/index.js +12 -12
- package/dist/adapters/dom/server.cjs +13 -13
- package/dist/adapters/dom/server.cjs.map +1 -1
- package/dist/adapters/dom/server.d.cts +4 -4
- package/dist/adapters/dom/server.d.ts +4 -4
- package/dist/adapters/dom/server.js +12 -12
- package/dist/adapters/dom/server.js.map +1 -1
- package/dist/adapters/ink/index.js +0 -2
- package/dist/adapters/ink/index.js.map +1 -1
- package/dist/adapters/react/components/index.cjs +32 -32
- package/dist/adapters/react/components/index.d.cts +4 -4
- package/dist/adapters/react/components/index.d.ts +4 -4
- package/dist/adapters/react/components/index.js +13 -13
- package/dist/adapters/react/index.cjs +35 -35
- package/dist/adapters/react/index.d.cts +6 -6
- package/dist/adapters/react/index.d.ts +6 -6
- package/dist/adapters/react/index.js +13 -13
- package/dist/adapters/tty/components/index.cjs +2 -4
- package/dist/adapters/tty/components/index.cjs.map +1 -1
- package/dist/adapters/tty/components/index.d.cts +4 -4
- package/dist/adapters/tty/components/index.d.ts +4 -4
- package/dist/adapters/tty/components/index.js +1 -3
- package/dist/adapters/tty/components/index.js.map +1 -1
- package/dist/adapters/tty/index.cjs +12 -12
- package/dist/adapters/tty/index.cjs.map +1 -1
- package/dist/adapters/tty/index.d.cts +4 -4
- package/dist/adapters/tty/index.d.ts +4 -4
- package/dist/adapters/tty/index.js +10 -10
- package/dist/adapters/tty/index.js.map +1 -1
- package/dist/adapters/vue/components/index.cjs +32 -32
- package/dist/adapters/vue/components/index.d.cts +12 -12
- package/dist/adapters/vue/components/index.d.ts +12 -12
- package/dist/adapters/vue/components/index.js +13 -13
- package/dist/adapters/vue/index.cjs +41 -41
- package/dist/adapters/vue/index.cjs.map +1 -1
- package/dist/adapters/vue/index.d.cts +6 -6
- package/dist/adapters/vue/index.d.ts +6 -6
- package/dist/adapters/vue/index.js +14 -14
- package/dist/adapters/vue/index.js.map +1 -1
- package/dist/agent/index.cjs +6 -6
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.d.cts +2 -2
- package/dist/agent/index.d.ts +2 -2
- package/dist/agent/index.js +3 -3
- package/dist/agent/index.js.map +1 -1
- package/dist/{chunk-QLFHYHJ2.js → chunk-2H6Y25FO.js} +6 -6
- package/dist/chunk-2H6Y25FO.js.map +1 -0
- package/dist/{chunk-P5SJ3QXJ.js → chunk-3JE77TNL.js} +16 -49
- package/dist/chunk-3JE77TNL.js.map +1 -0
- package/dist/{chunk-OE527MXF.cjs → chunk-3XFQI5P2.cjs} +2 -2
- package/dist/chunk-3XFQI5P2.cjs.map +1 -0
- package/dist/{chunk-XQTI4Q4I.js → chunk-A4GK3PLP.js} +4 -4
- package/dist/chunk-A4GK3PLP.js.map +1 -0
- package/dist/{chunk-PMKWYOOX.cjs → chunk-BXUEWV7V.cjs} +2 -2
- package/dist/chunk-BXUEWV7V.cjs.map +1 -0
- package/dist/{chunk-RFBIGRCI.js → chunk-C63CBYD5.js} +3 -3
- package/dist/chunk-C63CBYD5.js.map +1 -0
- package/dist/{chunk-FSUMCJAR.cjs → chunk-CQZH3L3W.cjs} +39 -39
- package/dist/chunk-CQZH3L3W.cjs.map +1 -0
- package/dist/{chunk-UGG7MCX4.cjs → chunk-DC5HONDE.cjs} +2 -2
- package/dist/chunk-DC5HONDE.cjs.map +1 -0
- package/dist/{chunk-ECFWPZGL.cjs → chunk-DLZNZHUW.cjs} +92 -125
- package/dist/chunk-DLZNZHUW.cjs.map +1 -0
- package/dist/{chunk-EG45GQOE.js → chunk-EK2GBZ7D.js} +5 -5
- package/dist/chunk-EK2GBZ7D.js.map +1 -0
- package/dist/{chunk-Z7CS43ZT.cjs → chunk-FKAPJMNR.cjs} +28 -28
- package/dist/chunk-FKAPJMNR.cjs.map +1 -0
- package/dist/{chunk-DIFE573X.js → chunk-G4OQ4PEO.js} +6 -6
- package/dist/chunk-G4OQ4PEO.js.map +1 -0
- package/dist/{chunk-RBU5PHN4.js → chunk-GQVJ5UAS.js} +2 -2
- package/dist/chunk-GQVJ5UAS.js.map +1 -0
- package/dist/{chunk-AGEAMUQR.cjs → chunk-HDREPLRA.cjs} +13 -13
- package/dist/chunk-HDREPLRA.cjs.map +1 -0
- package/dist/{chunk-ZYTWQZZC.cjs → chunk-I35ZD3PU.cjs} +26 -26
- package/dist/chunk-I35ZD3PU.cjs.map +1 -0
- package/dist/{chunk-KW34ZKF5.cjs → chunk-ITGR7P2B.cjs} +2 -2
- package/dist/chunk-ITGR7P2B.cjs.map +1 -0
- package/dist/{chunk-JI7ZRESP.js → chunk-JKULAG53.js} +2 -2
- package/dist/chunk-JKULAG53.js.map +1 -0
- package/dist/{chunk-PBPUSZIQ.cjs → chunk-K54CT3QN.cjs} +50 -69
- package/dist/chunk-K54CT3QN.cjs.map +1 -0
- package/dist/{chunk-7TS3YVQR.js → chunk-M2ZZUSH3.js} +6 -7
- package/dist/chunk-M2ZZUSH3.js.map +1 -0
- package/dist/{chunk-GV7UC3SS.cjs → chunk-MEZCO7ND.cjs} +2 -2
- package/dist/chunk-MEZCO7ND.cjs.map +1 -0
- package/dist/{chunk-D4PUWBN6.cjs → chunk-NBXZ3RAC.cjs} +2 -2
- package/dist/chunk-NBXZ3RAC.cjs.map +1 -0
- package/dist/{chunk-L5223LLX.js → chunk-OBFFZ23H.js} +2 -2
- package/dist/chunk-OBFFZ23H.js.map +1 -0
- package/dist/{chunk-7MATRNZZ.js → chunk-OSIFUROH.js} +6 -6
- package/dist/chunk-OSIFUROH.js.map +1 -0
- package/dist/{chunk-RB4OMSPA.js → chunk-PCUXNVWF.js} +7 -7
- package/dist/chunk-PCUXNVWF.js.map +1 -0
- package/dist/{chunk-WGZZKCJQ.cjs → chunk-QHX3VA55.cjs} +7 -7
- package/dist/chunk-QHX3VA55.cjs.map +1 -0
- package/dist/{chunk-PNQY6OFB.cjs → chunk-QTJ4ZQRM.cjs} +20 -20
- package/dist/chunk-QTJ4ZQRM.cjs.map +1 -0
- package/dist/{chunk-KOYRJXTI.cjs → chunk-RVU6YEHO.cjs} +10 -11
- package/dist/chunk-RVU6YEHO.cjs.map +1 -0
- package/dist/{chunk-HYFNOF7Y.cjs → chunk-SABSY2BW.cjs} +8 -8
- package/dist/chunk-SABSY2BW.cjs.map +1 -0
- package/dist/{chunk-V4BPFFFV.js → chunk-SCXYAXMO.js} +3 -3
- package/dist/chunk-SCXYAXMO.js.map +1 -0
- package/dist/{chunk-2MNLEL45.js → chunk-SVWDKXSH.js} +2 -2
- package/dist/chunk-SVWDKXSH.js.map +1 -0
- package/dist/{chunk-X5JTZ5LW.js → chunk-UXFQZX6O.js} +3 -3
- package/dist/chunk-UXFQZX6O.js.map +1 -0
- package/dist/{chunk-OE4E6IBD.js → chunk-Y3UKAJJX.js} +2 -2
- package/dist/chunk-Y3UKAJJX.js.map +1 -0
- package/dist/{chunk-XUSKGJRI.js → chunk-YV2G37TJ.js} +8 -27
- package/dist/chunk-YV2G37TJ.js.map +1 -0
- package/dist/{chunk-5YQIAS4V.cjs → chunk-ZR54IVVS.cjs} +20 -20
- package/dist/chunk-ZR54IVVS.cjs.map +1 -0
- package/dist/{chunk-M3UFIUXK.cjs → chunk-ZVQKCDUG.cjs} +7 -7
- package/dist/chunk-ZVQKCDUG.cjs.map +1 -0
- package/dist/{chunk-OGD5CCMZ.js → chunk-ZZRQAH5Z.js} +2 -2
- package/dist/chunk-ZZRQAH5Z.js.map +1 -0
- package/dist/devtools/index.cjs +12 -42
- package/dist/devtools/index.cjs.map +1 -1
- package/dist/devtools/index.d.cts +4 -4
- package/dist/devtools/index.d.ts +4 -4
- package/dist/devtools/index.js +9 -39
- package/dist/devtools/index.js.map +1 -1
- package/dist/document/index.cjs +16 -16
- package/dist/document/index.d.cts +6 -6
- package/dist/document/index.d.ts +6 -6
- package/dist/document/index.js +3 -3
- package/dist/{effects-CndX9K7D.d.cts → effects-DkBBrxVj.d.cts} +0 -2
- package/dist/{effects-CndX9K7D.d.ts → effects-DkBBrxVj.d.ts} +0 -2
- package/dist/{endpoints-CD-6Jl-H.d.ts → endpoints-DD6VsLv9.d.ts} +1 -1
- package/dist/{endpoints-Dem-EdRx.d.cts → endpoints-fqx9Vmf6.d.cts} +1 -1
- package/dist/examples/index.cjs +4 -4
- package/dist/examples/index.cjs.map +1 -1
- package/dist/examples/index.d.cts +4 -4
- package/dist/examples/index.d.ts +4 -4
- package/dist/examples/index.js +3 -3
- package/dist/examples/index.js.map +1 -1
- package/dist/{head-CAzfTnpV.d.cts → head-BOjhYA36.d.cts} +2 -2
- package/dist/{head-DRpbbj-l.d.ts → head-CBib11hD.d.ts} +2 -2
- package/dist/i18n/index.cjs +13 -13
- package/dist/i18n/index.d.cts +4 -6
- package/dist/i18n/index.d.ts +4 -6
- package/dist/i18n/index.js +3 -3
- package/dist/{index-CNfzSBe2.d.ts → index-BjQX8XZl.d.ts} +1 -1
- package/dist/{index-caZoXSwr.d.cts → index-BoPH5aSd.d.cts} +1 -1
- package/dist/index.cjs +91 -91
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +11 -11
- package/dist/migrations/index.cjs +8 -9
- package/dist/migrations/index.cjs.map +1 -1
- package/dist/migrations/index.d.cts +1 -1
- package/dist/migrations/index.d.ts +1 -1
- package/dist/migrations/index.js +5 -6
- package/dist/migrations/index.js.map +1 -1
- package/dist/{palette-CIpPH90W.d.ts → palette-BZujb2rm.d.ts} +1 -1
- package/dist/{palette-CvwZZCkx.d.cts → palette-CCxWSi3C.d.cts} +1 -1
- package/dist/reflect/index.cjs +27 -27
- package/dist/reflect/index.d.cts +5 -5
- package/dist/reflect/index.d.ts +5 -5
- package/dist/reflect/index.js +9 -9
- package/dist/{types-qnKMx0_V.d.ts → types-CJC8mnzl.d.ts} +0 -1
- package/dist/{types-j290XhCn.d.cts → types-CR56luN7.d.cts} +0 -1
- package/dist/{types-DsWNYc7R.d.cts → types-D0x56Ya-.d.cts} +1 -1
- package/dist/{types-D23TRvqe.d.ts → types-Dn9cBFCC.d.ts} +3 -3
- package/dist/{types-C9734_lJ.d.cts → types-DzB3TAQj.d.cts} +1 -1
- package/dist/{types-BWc-olbY.d.ts → types-LXw2RJfH.d.ts} +1 -1
- package/dist/{types-qkzTfSye.d.cts → types-OsJI-ceI.d.cts} +3 -3
- package/dist/{types-BSKx5MXW.d.ts → types-pbBIUNxw.d.ts} +1 -1
- package/package.json +7 -7
- package/dist/chunk-2MNLEL45.js.map +0 -1
- package/dist/chunk-5YQIAS4V.cjs.map +0 -1
- package/dist/chunk-7MATRNZZ.js.map +0 -1
- package/dist/chunk-7TS3YVQR.js.map +0 -1
- package/dist/chunk-AGEAMUQR.cjs.map +0 -1
- package/dist/chunk-D4PUWBN6.cjs.map +0 -1
- package/dist/chunk-DIFE573X.js.map +0 -1
- package/dist/chunk-ECFWPZGL.cjs.map +0 -1
- package/dist/chunk-EG45GQOE.js.map +0 -1
- package/dist/chunk-FSUMCJAR.cjs.map +0 -1
- package/dist/chunk-GV7UC3SS.cjs.map +0 -1
- package/dist/chunk-HYFNOF7Y.cjs.map +0 -1
- package/dist/chunk-JI7ZRESP.js.map +0 -1
- package/dist/chunk-KOYRJXTI.cjs.map +0 -1
- package/dist/chunk-KW34ZKF5.cjs.map +0 -1
- package/dist/chunk-L5223LLX.js.map +0 -1
- package/dist/chunk-M3UFIUXK.cjs.map +0 -1
- package/dist/chunk-OE4E6IBD.js.map +0 -1
- package/dist/chunk-OE527MXF.cjs.map +0 -1
- package/dist/chunk-OGD5CCMZ.js.map +0 -1
- package/dist/chunk-P5SJ3QXJ.js.map +0 -1
- package/dist/chunk-PBPUSZIQ.cjs.map +0 -1
- package/dist/chunk-PMKWYOOX.cjs.map +0 -1
- package/dist/chunk-PNQY6OFB.cjs.map +0 -1
- package/dist/chunk-QLFHYHJ2.js.map +0 -1
- package/dist/chunk-RB4OMSPA.js.map +0 -1
- package/dist/chunk-RBU5PHN4.js.map +0 -1
- package/dist/chunk-RFBIGRCI.js.map +0 -1
- package/dist/chunk-UGG7MCX4.cjs.map +0 -1
- package/dist/chunk-V4BPFFFV.js.map +0 -1
- package/dist/chunk-WGZZKCJQ.cjs.map +0 -1
- package/dist/chunk-X5JTZ5LW.js.map +0 -1
- package/dist/chunk-XQTI4Q4I.js.map +0 -1
- package/dist/chunk-XUSKGJRI.js.map +0 -1
- package/dist/chunk-Z7CS43ZT.cjs.map +0 -1
- package/dist/chunk-ZYTWQZZC.cjs.map +0 -1
- package/dist/{primitive-props-CGoJvmcH.d.cts → primitive-props-Cl5jiC8g.d.cts} +5 -5
- package/dist/{primitive-props-CGoJvmcH.d.ts → primitive-props-Cl5jiC8g.d.ts} +5 -5
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/shared/bindings/scope.ts","../src/shared/bindings/resolve.ts","../src/layout/guards.ts","../src/layout/renderer.ts","../src/layout/compose.ts","../src/layout/adapter.ts","../src/layout/store.ts","../src/layout/head.schema.ts","../src/action/compose.ts","../src/action/grammar.ts","../src/action/audit.ts","../src/reflect/grammar.ts"],"names":["segments"],"mappings":";;;;;;;;;;;AAEO,IAAM,gBAAA,GAAmB,CAAC,IAAA,KAA4B,CAAC,IAAI;AAE3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AAW,SAAS,MAAA,CAAO,MAAA,CAAO,IAA+B,CAAA,OAAQ,KAAK,CAAA;AAAA,EAChF,CAAA;AACA,EAAA,IAAA,CAAK,OAAO,CAAA;AACZ,EAAA,OAAO,KAAA,CAAM,MAAA,CAAO,CAAC,GAAA,KAAQ,QAAQ,EAAE,CAAA;AACzC,CAAA;AAEA,IAAM,eAAA,uBAAsB,OAAA,EAA+C;AAQpE,IAAM,cAAA,GAAiB,CAAC,UAAA,KAAsD;AACnF,EAAA,MAAM,MAAA,GAAS,eAAA,CAAgB,GAAA,CAAI,UAAU,CAAA;AAC7C,EAAA,IAAI,MAAA,KAAW,QAAW,OAAO,MAAA;AACjC,EAAA,MAAM,MAAA,GAAS,WAAW,UAAU,CAAA;AACpC,EAAA,MAAM,QAAA,GAAW,IAAI,GAAA,CAAI,YAAA,CAAa,UAAU,CAAC,CAAA;AACjD,EAAA,MAAM,IAAA,uBAAW,GAAA,EAAY;AAC7B,EAAA,KAAA,MAAW,CAAC,IAAA,EAAM,QAAQ,CAAA,IAAK,MAAA,CAAO,QAAQ,UAAA,CAAW,SAAA,IAAa,EAAE,CAAA,EAAG;AACzE,IAAA,IAAI,CAAC,MAAA,CAAO,GAAA,CAAI,IAAI,CAAA,EAAG;AACvB,IAAA,KAAA,MAAW,GAAA,IAAO,WAAA,CAAa,QAAA,CAAmC,OAAO,CAAA,EAAG,IAAI,QAAA,CAAS,GAAA,CAAI,GAAG,CAAA,EAAG,IAAA,CAAK,GAAA,CAAI,GAAG,CAAA;AAAA,EACjH;AACA,EAAA,eAAA,CAAgB,GAAA,CAAI,YAAY,IAAI,CAAA;AACpC,EAAA,OAAO,IAAA;AACT","file":"chunk-XUSKGJRI.js","sourcesContent":["import type { Scope, ScopeChain } from './types';\n\nexport const createScopeChain = (data: Scope): ScopeChain => [data];\n\nexport const pushScope = (chain: ScopeChain, scope: Scope): ScopeChain => [scope, ...chain];\n","import { evaluateSafe } from '@niscorp/prism';\nimport { hasKey, isArray, isObject } from '../common';\nimport { getPath } from './paths';\nimport type { ScopeChain } from './types';\n\n// ═══════════════════════════════════════════════════════════\n// Unified value resolver.\n//\n// One function — `resolve` — handles every binding site uniformly.\n//\n// String semantics:\n// 1. \"{{ expr }}\" (sole expression) → raw value of expr (type preserved)\n// 2. \"...{{expr}}...\" → interpolated string\n// 3. \"$.x\" or \"$ident...\" → raw value of path (type preserved)\n// 4. anything else → literal string\n//\n// Array → mapped recursively.\n// Object → walked recursively, OR treated as an `$if` directive.\n// Primitives → returned as-is.\n//\n// Path expressions resolve via `resolvePath`, which uses the ScopeChain\n// (innermost first). An optional `extras` map injects keyed scopes for\n// templates (e.g. `{ '@error': errObj }`); longest-prefix match wins.\n// ═══════════════════════════════════════════════════════════\n\nconst TEMPLATE_REGEX = /\\{\\{\\s*([^}]+?)\\s*\\}\\}/g;\nconst SOLE_TEMPLATE_REGEX = /^\\{\\{\\s*([^}]+?)\\s*\\}\\}$/;\nconst BARE_PATH_REGEX = /^\\$(\\.|[A-Za-z_]|$)/;\n\nexport type ExtraScopes = Record<string, unknown>;\n\nconst matchExtra = (expression: string, extras: ExtraScopes): string | undefined => {\n let matched: string | undefined;\n for (const key of Object.keys(extras)) {\n if (expression === key || expression.startsWith(`${key}.`)) {\n if (matched === undefined || key.length > matched.length) matched = key;\n }\n }\n return matched;\n};\n\nconst resolveExtraExpression = (\n expression: string,\n matchedKey: string,\n extras: ExtraScopes,\n): unknown => {\n const root = extras[matchedKey];\n if (expression === matchedKey) return root;\n const rest = expression.slice(matchedKey.length + 1);\n if (rest.length === 0) return root;\n return getPath(root, rest);\n};\n\nconst walkFromScopeHead = (head: unknown, restSegments: readonly string[]): unknown => {\n if (restSegments.length === 0) return head;\n return getPath(head, restSegments.join('.'));\n};\n\nexport const resolvePath = (\n path: string,\n chain: ScopeChain,\n extras: ExtraScopes = {},\n): unknown => {\n const extraKey = matchExtra(path, extras);\n if (extraKey !== undefined) return resolveExtraExpression(path, extraKey, extras);\n\n if (!path.startsWith('$')) return undefined;\n if (path === '$') return chain[0];\n\n const afterDollar = path.slice(1);\n\n if (afterDollar.startsWith('.')) {\n const rest = afterDollar.slice(1);\n if (rest.length === 0) return chain[0];\n const segments = rest.split('.');\n const head = segments[0];\n if (head === undefined) return undefined;\n for (const scope of chain) {\n if (hasKey(scope, head)) {\n return walkFromScopeHead(scope[head], segments.slice(1));\n }\n }\n return undefined;\n }\n\n const segments = afterDollar.split('.');\n const varName = segments[0];\n if (varName === undefined || varName.length === 0) return undefined;\n for (const scope of chain) {\n if (hasKey(scope, varName)) {\n return walkFromScopeHead(scope[varName], segments.slice(1));\n }\n }\n return undefined;\n};\n\nconst stringify = (value: unknown): string => {\n if (value === null || value === undefined) return '';\n if (typeof value === 'string') return value;\n if (typeof value === 'number' || typeof value === 'boolean') return String(value);\n try {\n return JSON.stringify(value);\n } catch {\n return '';\n }\n};\n\nconst isTruthy = (value: unknown): boolean => {\n if (value === null || value === undefined) return false;\n if (value === false) return false;\n if (value === 0) return false;\n if (value === '') return false;\n if (isArray(value) && value.length === 0) return false;\n return true;\n};\n\n// Directives — evaluated objects keyed by an operator (`$if`, `$eq`, …). Each\n// resolves its operands and returns a value. Add an operator here and it works\n// everywhere bindings are resolved; later operators (`$gte`, `$and`, …) slot in\n// the same way.\ntype Directive = (node: Record<string, unknown>, chain: ScopeChain, extras: ExtraScopes) => unknown;\n\nconst DIRECTIVES: Record<string, Directive> = {\n $if: (node, chain, extras) => {\n if (isTruthy(resolve(node.$if, chain, extras))) return resolve(node.$then, chain, extras);\n if (hasKey(node, '$else')) return resolve(node.$else, chain, extras);\n return undefined;\n },\n $eq: (node, chain, extras) => {\n const args = isArray(node.$eq) ? node.$eq : [];\n return resolve(args[0], chain, extras) === resolve(args[1], chain, extras);\n },\n // True when the operand path resolves to a present value. The structural\n // counterpart to `$eq`: discriminate a union by which key a branch carries\n // (`{ $exists: \"$.shape.component\" }`) rather than a shared tag's value.\n $exists: (node, chain, extras) => resolve(node.$exists, chain, extras) !== undefined,\n // Read an array element by a (dynamic) index: `{ $at: [\"$.results\", \"$.i\"] }`.\n // An optional third arg pulls one field off the element: `[\"$.results\", \"$.i\",\n // \"id\"]`. Returns undefined when the array/index doesn't resolve.\n $at: (node, chain, extras) => {\n const args = isArray(node.$at) ? node.$at : [];\n const arr = resolve(args[0], chain, extras);\n const index = Number(resolve(args[1], chain, extras));\n if (!isArray(arr) || Number.isNaN(index)) return undefined;\n const element = arr[index];\n const field = args[2];\n return field !== undefined && isObject(element) ? element[String(field)] : element;\n },\n // THE WHOLE TRANSFORM GRAMMAR, BEHIND ONE EXPLICIT DOOR. The directives\n // above stay the small binding set; a value that needs a real transformation\n // — a join, a projection, a group — says so out loud: `{ $prism: <node> }`\n // evaluates the node with prism against the action's ROOT data. One grammar,\n // one evaluator, nothing ambient — a prism-shaped object OUTSIDE this\n // wrapper stays what it always was, a plain object walked for strings.\n //\n // The quiet failure this replaces was worse than a crash: an unrecognised\n // op-shaped value passed through `resolve` as structure, landed in data, and\n // rendered as garbage three screens later. Inside the wrapper, a bad node\n // resolves to undefined — absent, not wrong.\n $prism: (node, chain) => {\n const result = evaluateSafe(node.$prism, chain[0] ?? {});\n return result.ok ? result.data : undefined;\n },\n};\n\nconst directiveOf = (value: Record<string, unknown>): Directive | undefined => {\n for (const key of Object.keys(value)) {\n const directive = DIRECTIVES[key];\n if (directive !== undefined) return directive;\n }\n return undefined;\n};\n\nconst resolveString = (value: string, chain: ScopeChain, extras: ExtraScopes): unknown => {\n const sole = value.match(SOLE_TEMPLATE_REGEX);\n if (sole !== null) {\n const expr = sole[1];\n if (expr === undefined) return value;\n return resolvePath(expr.trim(), chain, extras);\n }\n\n if (value.includes('{{')) {\n return value.replace(TEMPLATE_REGEX, (_match: string, expression: string): string => {\n const resolved = resolvePath(expression.trim(), chain, extras);\n return stringify(resolved);\n });\n }\n\n if (BARE_PATH_REGEX.test(value)) {\n return resolvePath(value, chain, extras);\n }\n\n if (matchExtra(value, extras) !== undefined) {\n return resolvePath(value, chain, extras);\n }\n\n return value;\n};\n\nexport const resolve = (\n value: unknown,\n chain: ScopeChain,\n extras: ExtraScopes = {},\n): unknown => {\n if (typeof value === 'string') return resolveString(value, chain, extras);\n if (isArray(value)) return value.map((entry) => resolve(entry, chain, extras));\n if (isObject(value)) {\n const directive = directiveOf(value);\n if (directive !== undefined) return directive(value, chain, extras);\n const out: Record<string, unknown> = {};\n for (const key of Object.keys(value)) {\n out[key] = resolve(value[key], chain, extras);\n }\n return out;\n }\n return value;\n};\n","import { hasKey, isObject } from '../shared/common';\nimport type {\n ComponentNode,\n ConditionalNode,\n LayoutNode,\n LayoutPrimitive,\n LayoutRefNode,\n LoopNode,\n SlotNode,\n} from './schemas';\n\nexport const isLayoutPrimitive = (value: unknown): value is LayoutPrimitive =>\n value === null ||\n typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean';\n\nexport const isComponentNode = (value: unknown): value is ComponentNode =>\n hasKey(value, 'component') && typeof value['component'] === 'string';\n\nexport const isConditionalNode = (value: unknown): value is ConditionalNode =>\n hasKey(value, 'if') && hasKey(value, 'then') && !hasKey(value, 'for');\n\nexport const isLoopNode = (value: unknown): value is LoopNode =>\n hasKey(value, 'for') && hasKey(value, 'as') && hasKey(value, 'do');\n\nexport const isLayoutRefNode = (value: unknown): value is LayoutRefNode =>\n isObject(value) &&\n hasKey(value, 'ref') &&\n typeof value['ref'] === 'string' &&\n !hasKey(value, 'component') &&\n Object.keys(value).length === 1;\n\nexport const isSlotNode = (value: unknown): value is SlotNode =>\n isObject(value) &&\n hasKey(value, 'slot') &&\n typeof value['slot'] === 'string' &&\n Object.keys(value).length === 1;\n\nexport const isLayoutNode = (value: unknown): value is LayoutNode =>\n isLayoutPrimitive(value) ||\n Array.isArray(value) ||\n isComponentNode(value) ||\n isConditionalNode(value) ||\n isLoopNode(value) ||\n isLayoutRefNode(value) ||\n isSlotNode(value);\n","import { isArray } from '../shared/common';\nimport {\n ComponentNotFoundError,\n LayoutRefNotFoundError,\n NovaError,\n RenderError,\n} from '../shared/errors';\nimport { createScopeChain, getPath, pushScope, resolve } from '../shared/bindings';\nimport type { ScopeChain } from '../shared/bindings';\nimport { isBinding } from '../i18n/phrases';\nimport { passFor, swap, walkValue } from '../i18n/swap';\nimport type { Pass } from '../i18n/swap';\nimport {\n isComponentNode,\n isConditionalNode,\n isLayoutPrimitive,\n isLayoutRefNode,\n isLoopNode,\n isSlotNode,\n} from './guards';\nimport { HEAD_NAMES } from './head';\nimport type { ComponentNode, LayoutNode } from './schemas';\nimport type {\n DataStoreView,\n ModelBindingDescriptor,\n RenderContext,\n RenderErrorNode,\n RenderNode,\n RenderOnError,\n} from './types';\n\n// ═══════════════════════════════════════════════════════════\n// Renderer — converts a LayoutNode tree into a framework-agnostic\n// RenderNode[] tree. Renders children in try/catch boundaries so a\n// single broken subtree does not poison siblings, unless strict mode\n// is enabled. All errors flow through the ctx.onError telemetry hook.\n// ═══════════════════════════════════════════════════════════\n\nconst noopOnError: RenderOnError = (_error: NovaError): void => {\n // default — errors silently dropped if no handler provided\n};\n\ntype InternalRenderContext = {\n store: RenderContext['store'];\n registry: RenderContext['registry'];\n strict: boolean;\n onError: RenderOnError;\n scopePaths: string[];\n // Undefined when the host named no book and no keys — the whole language\n // apparatus is then absent rather than idling, and a `{ phrase, slots }`\n // object passes through as the object it is.\n pass: Pass | undefined;\n // Where a miss was found, coarse: the chain of component names above it.\n // Only maintained while a pass is active, since nothing else reads it.\n where: string;\n};\n\nconst textNode = (value: string): RenderNode => ({ type: 'text', value });\n\nconst fragment = (children: RenderNode[]): RenderNode => ({ type: 'fragment', children });\n\nconst errorNode = (\n error: NovaError,\n nodeRef: string | undefined,\n): RenderErrorNode => ({\n type: 'error',\n code: error.code,\n message: error.message,\n ...(nodeRef === undefined ? {} : { nodeRef }),\n});\n\nconst toRenderError = (err: unknown): NovaError => {\n if (err instanceof NovaError) return err;\n const message = err instanceof Error ? err.message : String(err);\n return new RenderError(message, {}, { cause: err });\n};\n\n// Resolve a `$.x.y` or `$loopVar.y` binding to an absolute data path\n// (used to construct stable model binding descriptors inside loops).\nconst resolveDataPath = (\n binding: string,\n scopePaths: string[],\n): string | undefined => {\n if (!binding.startsWith('$')) return undefined;\n const after = binding.slice(1);\n if (after.startsWith('.')) return after.slice(1);\n const segments = after.split('.');\n const head = segments[0];\n if (head === undefined || head.length === 0) return undefined;\n for (let i = scopePaths.length - 1; i >= 0; i -= 1) {\n const entry = scopePaths[i];\n if (entry === undefined) continue;\n const eq = entry.indexOf('=');\n if (eq < 0) continue;\n const key = entry.slice(0, eq);\n if (key !== head) continue;\n const rooted = entry.slice(eq + 1);\n const rest = segments.slice(1).join('.');\n if (rest.length === 0) return rooted;\n return `${rooted}.${rest}`;\n }\n return undefined;\n};\n\nconst makeAutoRef = (componentName: string, path: string): string =>\n `auto-${componentName}-${path}`;\n\nconst renderNode = (\n node: LayoutNode,\n chain: ScopeChain,\n ctx: InternalRenderContext,\n): RenderNode[] => {\n if (node === null) return [textNode('')];\n if (typeof node === 'string') {\n const resolved = resolve(node, chain);\n if (resolved === undefined || resolved === null) return [textNode('')];\n const value = String(resolved);\n // A LITERAL text child is prose; a BOUND one is data wearing a text\n // position, and offering it to the book is how a member called \"Pass\" gets\n // renamed. Nothing but the renderer can tell those apart — by the time a\n // tree exists both are the same plain string — which is why this rule\n // could not be written in `translateRenderTree` and can be written here.\n if (ctx.pass === undefined || !ctx.pass.text || isBinding(node)) return [textNode(value)];\n return [textNode(swap(value, `${ctx.where}#text`, ctx.pass))];\n }\n if (isLayoutPrimitive(node)) {\n return [textNode(String(node))];\n }\n if (isArray(node)) {\n const children = renderChildArray(node, chain, ctx);\n return [fragment(children)];\n }\n if (isLayoutRefNode(node)) {\n const target = ctx.store.get(node.ref);\n if (target === undefined) {\n throw new LayoutRefNotFoundError(`Layout ref not found: ${node.ref}`, { ref: node.ref });\n }\n return renderNode(target, chain, ctx);\n }\n if (isSlotNode(node)) {\n // A slot is filled at fragment-merge time (fillSlots). One that survives to\n // render was never filled — render nothing.\n return [];\n }\n if (isConditionalNode(node)) {\n const condition = resolve(node.if, chain);\n const truthy =\n condition !== undefined &&\n condition !== null &&\n condition !== false &&\n condition !== 0 &&\n condition !== '';\n const branchTruthy = isArray(condition) ? condition.length > 0 : truthy;\n if (branchTruthy) return renderNode(node.then, chain, ctx);\n if (node.else !== undefined) return renderNode(node.else, chain, ctx);\n return [];\n }\n if (isLoopNode(node)) {\n const items = resolve(node.for, chain);\n if (!isArray(items)) return [];\n const loopBasePath = typeof node.for === 'string'\n ? resolveDataPath(node.for, ctx.scopePaths)\n : undefined;\n const out: RenderNode[] = [];\n items.forEach((item, index) => {\n // Each iteration binds three reserved loop vars: the element (`$<as>`),\n // its position (`$index`), and the array itself (`$items`). `$items`\n // lets a control inside the loop edit the whole list — remove or reorder\n // an element — not just its own value. Both `index` and `items` are\n // reserved names; an `as` of `'index'` or `'items'` would shadow them.\n const innerChain = pushScope(chain, { [node.as]: item, index, items });\n // `$items` resolves to a *writable* path (so `model: \"$items\"` works) only\n // when the loop's source is itself a resolvable path; a literal-array loop\n // exposes the value but stays read-only, exactly as `$<as>` does.\n const nextScopePaths =\n loopBasePath === undefined\n ? ctx.scopePaths\n : [...ctx.scopePaths, `${node.as}=${loopBasePath}.${index}`, `items=${loopBasePath}`];\n const innerCtx: InternalRenderContext = { ...ctx, scopePaths: nextScopePaths };\n // Stamp a stable React-identity key on each item's output: the value at\n // `node.key` (e.g. the row id), or the index when no key path is given.\n // This is what lets looped rows share a `ref` (the trigger target) without\n // colliding as React keys. `withKey` (in render-tree) prefers it over ref.\n const idKey = node.key !== undefined ? getPath(item, node.key) : index;\n const rendered = safeRenderSingle(node.do, innerChain, innerCtx, undefined);\n rendered.forEach((rn, sub) => {\n out.push({ ...rn, key: rendered.length === 1 ? String(idKey) : `${String(idKey)}:${sub}` });\n });\n });\n return [fragment(out)];\n }\n if (isComponentNode(node)) {\n return [renderComponent(node, chain, ctx)];\n }\n return [];\n};\n\nconst renderComponent = (\n node: ComponentNode,\n chain: ScopeChain,\n ctx: InternalRenderContext,\n): RenderNode => {\n // A head and what it holds are drawn by nobody, so no kit has anything to\n // register for them.\n if (!HEAD_NAMES.includes(node.component) && !ctx.registry.has(node.component)) {\n throw new ComponentNotFoundError(\n `Component not found in registry: ${node.component}`,\n { name: node.component },\n );\n }\n // THE ONE PLACE A PROP BECOMES A WORD ON A SCREEN. The swap belongs here\n // rather than in a later walk over the finished tree: the value is already\n // in hand, so translating it costs one lookup instead of a second traversal\n // of everything that was just built.\n //\n // Unlike a text child, a BOUND prop is translated — that is the whole\n // `_display` mechanism, where a query manufactures a closed-set word and a\n // read puts it on the screen. What protects data here is the KEY: `label` is\n // prose, `name` is not, and no value ever votes on the question.\n const pass = ctx.pass;\n const at = pass === undefined ? '' : `${ctx.where}/${node.component}`;\n const props: Record<string, unknown> = Object.fromEntries(\n Object.entries(node.props ?? {}).map(([k, v]) => {\n const resolved = resolve(v, chain);\n if (pass === undefined) return [k, resolved];\n return [k, walkValue(resolved, pass.isProse(k), `${at}.${k}`, pass)];\n }),\n );\n const children = renderChildren(node.children, chain, pass === undefined ? ctx : { ...ctx, where: at });\n\n let model: ModelBindingDescriptor | undefined;\n if (node.model !== undefined) {\n const resolvedPath = resolveDataPath(node.model, ctx.scopePaths);\n if (resolvedPath !== undefined) {\n const ref = node.ref ?? makeAutoRef(node.component, resolvedPath);\n model = { path: resolvedPath, ref };\n // Two-way binding: if the component doesn't already have an explicit\n // `value` prop, auto-derive it from the model expression so the\n // displayed value tracks the data store. Without this, controlled\n // inputs always show their initial value because nothing updates the\n // `value` prop on re-render.\n if (!('value' in props)) {\n props['value'] = resolve(node.model, chain);\n }\n }\n }\n\n const component: RenderNode = {\n type: 'component',\n name: node.component,\n props,\n children,\n ...(node.ref === undefined ? {} : { ref: node.ref }),\n ...(model === undefined ? {} : { model }),\n };\n return component;\n};\n\nconst safeRenderSingle = (\n node: LayoutNode,\n chain: ScopeChain,\n ctx: InternalRenderContext,\n nodeRef: string | undefined,\n): RenderNode[] => {\n try {\n return renderNode(node, chain, ctx);\n } catch (err) {\n const novaError = toRenderError(err);\n if (ctx.strict) throw novaError;\n ctx.onError(novaError);\n return [errorNode(novaError, nodeRef)];\n }\n};\n\nconst renderChildArray = (\n nodes: LayoutNode[],\n chain: ScopeChain,\n ctx: InternalRenderContext,\n): RenderNode[] => {\n const out: RenderNode[] = [];\n for (const child of nodes) out.push(...safeRenderSingle(child, chain, ctx, undefined));\n return out;\n};\n\nconst renderChildren = (\n children: LayoutNode | LayoutNode[] | undefined,\n chain: ScopeChain,\n ctx: InternalRenderContext,\n): RenderNode[] => {\n if (children === undefined) return [];\n if (isArray(children)) return renderChildArray(children, chain, ctx);\n return safeRenderSingle(children, chain, ctx, undefined);\n};\n\nconst toInternal = (ctx: RenderContext): InternalRenderContext => ({\n store: ctx.store,\n registry: ctx.registry,\n strict: ctx.strict ?? false,\n onError: ctx.onError ?? noopOnError,\n scopePaths: [],\n // Built once per render call. The matcher compiles a Set and a suffix list,\n // and doing that per node would make the cheapest branch the expensive one.\n pass: passFor({\n ...(ctx.phrases === undefined ? {} : { phrases: ctx.phrases }),\n ...(ctx.phraseKeys === undefined ? {} : { keys: ctx.phraseKeys }),\n ...(ctx.onPhraseMiss === undefined ? {} : { onMiss: ctx.onPhraseMiss }),\n }),\n where: '',\n});\n\nexport const renderLayout = (\n node: LayoutNode,\n data: Record<string, unknown>,\n ctx: RenderContext,\n): RenderNode[] => {\n const internal = toInternal(ctx);\n return safeRenderSingle(node, createScopeChain(data), internal, undefined);\n};\n\n// Object-form alias for renderLayout. Same semantics, named parameters —\n// so the caller doesn't have to remember the positional order of\n// (layout, data, ctx) and so `data` can be omitted when the layout has\n// no resolvables.\nexport type RenderOptions = {\n layout: LayoutNode;\n data?: Record<string, unknown>;\n store: RenderContext['store'];\n registry: RenderContext['registry'];\n strict?: boolean;\n onError?: RenderOnError;\n phrases?: RenderContext['phrases'];\n phraseKeys?: RenderContext['phraseKeys'];\n onPhraseMiss?: RenderContext['onPhraseMiss'];\n};\n\nexport const render = (options: RenderOptions): RenderNode[] =>\n renderLayout(options.layout, options.data ?? {}, {\n store: options.store,\n registry: options.registry,\n ...(options.strict === undefined ? {} : { strict: options.strict }),\n ...(options.onError === undefined ? {} : { onError: options.onError }),\n ...(options.phrases === undefined ? {} : { phrases: options.phrases }),\n ...(options.phraseKeys === undefined ? {} : { phraseKeys: options.phraseKeys }),\n ...(options.onPhraseMiss === undefined ? {} : { onPhraseMiss: options.onPhraseMiss }),\n });\n\n// Render a layout reading its root data from a DataStore view. Used by the\n// action runtime so layout and action share a single data store instance.\nexport const renderLayoutFromStore = (\n node: LayoutNode,\n store: DataStoreView,\n ctx: RenderContext,\n): RenderNode[] => {\n const internal = toInternal(ctx);\n return safeRenderSingle(node, createScopeChain(store.get()), internal, undefined);\n};\n\nexport type { ScopeChain };\n","import { isComponentNode, isConditionalNode, isLoopNode, isSlotNode } from './guards';\nimport type { LayoutNode } from './schemas';\n\n// ═══════════════════════════════════════════════════════════\n// fillSlots — replace every `{ slot: name }` placeholder in a layout tree with\n// the layout in `fills[name]`. Used by the ActionFragment merge: a fragment's\n// chrome layout has a `{ slot: 'body' }`, and the composing action's own layout\n// is dropped into it. A slot whose name has no fill is left in place — the\n// renderer renders an unfilled slot as nothing.\n//\n// A pure tree-walk modelled on the layout store's `resolveReferences`: recurse\n// through children / then / else / do / arrays, rebuilding the tree.\n// ═══════════════════════════════════════════════════════════\n\nexport const fillSlots = (layout: LayoutNode, fills: Record<string, LayoutNode>): LayoutNode => {\n if (isSlotNode(layout)) {\n const fill = fills[layout.slot];\n return fill === undefined ? layout : fill;\n }\n if (Array.isArray(layout)) {\n return layout.map((node) => fillSlots(node, fills));\n }\n if (isComponentNode(layout)) {\n const { children } = layout;\n if (children === undefined) return layout;\n const next = Array.isArray(children)\n ? children.map((child) => fillSlots(child, fills))\n : fillSlots(children, fills);\n return { ...layout, children: next };\n }\n if (isConditionalNode(layout)) {\n return {\n ...layout,\n then: fillSlots(layout.then, fills),\n ...(layout.else === undefined ? {} : { else: fillSlots(layout.else, fills) }),\n };\n }\n if (isLoopNode(layout)) {\n return { ...layout, do: fillSlots(layout.do, fills) };\n }\n // primitives, layout refs, slot-less nodes — unchanged\n return layout;\n};\n","import type { RenderNode } from './types';\n\n// ═══════════════════════════════════════════════════════════\n// Adapter helpers — framework-agnostic pieces every adapter\n// (React, Vue, …) needs to render a RenderNode tree the same\n// way. See packages/nova/ADAPTER.md for the full contract.\n// ═══════════════════════════════════════════════════════════\n\n// Names of the props an adapter injects on rendered components:\n// `RenderNode.model` → NOVA_MODEL_PROP ({ ref, path }),\n// `RenderNode.ref` → NOVA_REF_PROP (string). Constants so all\n// adapters inject identically and components can rely on them.\nexport const NOVA_MODEL_PROP = 'novaModel';\nexport const NOVA_REF_PROP = 'novaRef';\n\n// Stable identity for a RenderNode within its sibling list.\n// Loop identity (stamped from LoopNode.key/index) wins over ref: a shared\n// `ref` across looped rows is an event-target id, not a list key.\nexport const renderNodeKey = (node: RenderNode, index: number): string => {\n if (node.key !== undefined) return `k:${node.key}`;\n if (node.type === 'component') {\n if (node.ref !== undefined) return `c:${node.ref}`;\n return `c:${node.name}:${index}`;\n }\n if (node.type === 'text') return `t:${index}`;\n if (node.type === 'fragment') return `f:${index}`;\n return `e:${node.code}:${index}`;\n};\n","import { DefinitionValidationError } from '../shared/errors';\nimport { depthRefusal, exceedsDepth } from '@niscorp/strata';\nimport {\n isComponentNode,\n isConditionalNode,\n isLayoutRefNode,\n isLoopNode,\n} from './guards';\nimport { LayoutNodeSchema, type LayoutNode } from './schemas';\nimport type { LayoutStore } from './types';\n\nexport const createLayoutStore = (): LayoutStore => {\n const layouts = new Map<string, LayoutNode>();\n\n const get = (id: string): LayoutNode | undefined => layouts.get(id);\n\n const set = (id: string, layout: LayoutNode): void => {\n // Before the schema: a deep enough layout overflows it (strata depth.ts).\n if (exceedsDepth(layout)) {\n throw new DefinitionValidationError(`Invalid layout for id \"${id}\"`, { failures: [{ id, issues: [{ code: 'custom', path: [], message: depthRefusal(), input: undefined }] }] });\n }\n const result = LayoutNodeSchema.safeParse(layout);\n if (!result.success) {\n throw new DefinitionValidationError(`Invalid layout for id \"${id}\"`, {\n failures: [{ id, issues: result.error.issues }],\n });\n }\n layouts.set(id, layout);\n };\n\n const remove = (id: string): void => {\n layouts.delete(id);\n };\n\n const list = (): string[] => Array.from(layouts.keys());\n\n const resolveReferences = (layout: LayoutNode): LayoutNode => {\n if (isLayoutRefNode(layout)) {\n const target = layouts.get(layout.ref);\n if (target === undefined) return layout;\n return resolveReferences(target);\n }\n if (Array.isArray(layout)) {\n return layout.map(resolveReferences);\n }\n if (isComponentNode(layout)) {\n const children = layout.children;\n let resolvedChildren: LayoutNode | LayoutNode[] | undefined;\n if (children === undefined) {\n resolvedChildren = undefined;\n } else if (Array.isArray(children)) {\n resolvedChildren = children.map(resolveReferences);\n } else {\n resolvedChildren = resolveReferences(children);\n }\n return {\n ...layout,\n ...(resolvedChildren === undefined ? {} : { children: resolvedChildren }),\n };\n }\n if (isConditionalNode(layout)) {\n return {\n ...layout,\n then: resolveReferences(layout.then),\n ...(layout.else === undefined ? {} : { else: resolveReferences(layout.else) }),\n };\n }\n if (isLoopNode(layout)) {\n return {\n ...layout,\n do: resolveReferences(layout.do),\n };\n }\n return layout;\n };\n\n return { get, set, delete: remove, list, resolveReferences };\n};\n","import { z } from 'zod';\nimport { HEAD_LINK_NAME, HEAD_META_NAME, HEAD_NAME, HEAD_SCRIPT_NAME, HEAD_TITLE_NAME } from './head';\nimport type { ComponentMeta } from './types';\n\n// The authoring contracts of a head and the elements it holds (./head): what a\n// layout may set on each. Props are bound and resolved like any other node's.\n//\n// An element's props are its attributes, so these are open records: any\n// attribute HTML gives the element may be written. What each refuses is said\n// in its description, and held by the reader (`headOf`), not by a list here.\n\n// What every element refuses, whatever else it is.\nconst REFUSED_ATTRIBUTES = 'an attribute whose name starts with `on`, or a prop whose name is not an attribute’s name';\n\nconst AttributeSchema = z\n .union([z.string(), z.number(), z.boolean()])\n .describe(\n 'An attribute’s value. Text is written as given, a number as text. `true` writes the attribute with no value. `false`, an empty or blank string, and anything that is none of these (a binding not answered yet, an object, a list) leave the attribute out.',\n );\n\nexport const HeadPropsSchema = z\n .object({})\n .strict()\n .describe(\n 'The document’s <head>. Takes no props. Its children are the elements the head holds — `nova:title`, `nova:meta`, `nova:link`, `nova:script` — placed directly or through loops and conditions; any other component among them is refused and left out, and the rest stand. Draws nothing on the screen. Elements are read in the order written, and where a screen holds several heads, in the order the screen is drawn. A later element takes an earlier one’s place when both are the title, both are a `nova:meta` of the same `name` or `property`, or both are a `nova:link` whose `rel` includes `canonical`. Any other two stand side by side.',\n );\n\nexport const HeadTitlePropsSchema = z\n .object({})\n .strict()\n .describe(\n 'The document’s <title>, inside `nova:head`. Takes no props. Its text is given as its children: a text string, which may hold bindings — not components. A title with no text is left out.',\n );\n\nexport const HeadMetaPropsSchema = z\n .record(z.string(), AttributeSchema)\n .describe(\n `A <meta> element, inside \\`nova:head\\`. Its props are the element’s attributes, written as given: \\`name\\` or \\`property\\` to say what it is, \\`content\\` for its value. Left out while it has no \\`content\\`. A later one with the same \\`name\\` or \\`property\\` takes an earlier one’s place (compared without regard to case; \\`name\\` decides when both are set), and one with neither stands beside the rest. The whole element is refused and left out if it has \\`http-equiv\\`, which instructs the browser rather than describing the document, ${REFUSED_ATTRIBUTES}.`,\n );\n\nexport const HeadLinkPropsSchema = z\n .record(z.string(), AttributeSchema)\n .describe(\n `A <link> element, inside \\`nova:head\\`. Its props are the element’s attributes, written as given: \\`rel\\` to say what the link is, \\`href\\` for its address, and any other the element takes (\\`type\\`, \\`hreflang\\`, \\`sizes\\`, \\`media\\`). Left out while it has no \\`href\\`. A later one whose \\`rel\\` includes \\`canonical\\` takes an earlier canonical’s place; all other links stand side by side. The whole element is refused and left out if its \\`rel\\` includes \\`stylesheet\\`, which styles the page, or it has ${REFUSED_ATTRIBUTES}.`,\n );\n\nexport const HeadScriptPropsSchema = z\n .object({\n type: z\n .string()\n .describe('The kind of data the block holds. Only a JSON type is accepted: `application/json`, or one ending in `+json` such as `application/ld+json`. Any other type, or none, is refused.'),\n data: z\n .unknown()\n .describe('What the block holds: the value itself — an object, a list, a number, text — which is serialised as JSON. Not JSON already written as text. Nothing, `null` or an empty string counts as no data.'),\n })\n .catchall(AttributeSchema)\n .describe(\n `A <script> element that holds data, inside \\`nova:head\\`: \\`type\\`, \\`data\\`, and any other attribute the element takes. Left out while it has no \\`data\\`. Data blocks never take one another’s place. It never runs: the whole element is refused and left out unless its \\`type\\` is a JSON type, and if it has a \\`src\\` or ${REFUSED_ATTRIBUTES}.`,\n );\n\nexport type HeadMetaProps = z.infer<typeof HeadMetaPropsSchema>;\nexport type HeadLinkProps = z.infer<typeof HeadLinkPropsSchema>;\nexport type HeadScriptProps = z.infer<typeof HeadScriptPropsSchema>;\n\nconst described = (schema: z.ZodTypeAny): ComponentMeta => ({ description: schema.description ?? '', propsSchema: schema });\n\n// What to register each name with, for a palette that should offer them.\nexport const HEAD_META: Record<string, ComponentMeta> = {\n [HEAD_NAME]: described(HeadPropsSchema),\n [HEAD_TITLE_NAME]: described(HeadTitlePropsSchema),\n [HEAD_META_NAME]: described(HeadMetaPropsSchema),\n [HEAD_LINK_NAME]: described(HeadLinkPropsSchema),\n [HEAD_SCRIPT_NAME]: described(HeadScriptPropsSchema),\n};\n","import { fillSlots } from '@layout';\nimport type { LayoutNode } from '@layout';\nimport type {\n ActionDefinition,\n ActionFragment,\n EndpointConfig,\n Step,\n TriggerConfig,\n} from './schemas';\n\n// ═══════════════════════════════════════════════════════════\n// composeAction — merge a concrete action with the fragments listed in a\n// push/replace `with`, producing the effective ActionDefinition to instantiate.\n// Composition, not inheritance: the action ALWAYS wins on conflict.\n//\n// - layout: each fragment WRAPS the layout so far — its `{ slot: 'body' }`\n// is filled with the action's own layout (innermost). Fragments\n// fold in array order, so the last listed is the outermost wrap.\n// (Wrapping fragments must use an inline layout, not a store id.)\n// - data: shallow-merge, action wins.\n// - triggers: concat — fragment triggers first, then the action's.\n// - endpoints: merge, action wins on a name clash.\n// - lifecycle: per-hook concat — fragment steps run before the action's.\n// - id/name/description/title/input: the action's (fragments have no say).\n// The result is a plain ActionDefinition.\n// ═══════════════════════════════════════════════════════════\n\nconst HOOKS = ['mount', 'unmount', 'suspend', 'resume'] as const;\n\nexport const composeAction = (\n action: ActionDefinition,\n fragments: ActionFragment[],\n): ActionDefinition => {\n if (fragments.length === 0) return action;\n\n // Layout — wrap the action's layout in each fragment's slot.\n let layout = action.layout;\n for (const frag of fragments) {\n const wrap = frag.layout;\n if (wrap === undefined) continue;\n if (typeof wrap === 'string') {\n layout = wrap; // stored-layout fragment: can't slot-fill, replaces\n continue;\n }\n layout = fillSlots(wrap, layout === undefined ? {} : { body: layout as LayoutNode });\n }\n\n // Data — fragments (in order), then the action on top.\n const data: Record<string, unknown> = {};\n for (const frag of fragments) Object.assign(data, frag.data ?? {});\n Object.assign(data, action.data ?? {});\n\n // Triggers — fragment triggers first, then the action's.\n const triggers: TriggerConfig[] = [\n ...fragments.flatMap((f) => f.triggers ?? []),\n ...(action.triggers ?? []),\n ];\n\n // Endpoints — fragments, then the action (action wins on a name clash).\n const endpoints: Record<string, EndpointConfig> = {};\n for (const frag of fragments) Object.assign(endpoints, frag.endpoints ?? {});\n Object.assign(endpoints, action.endpoints ?? {});\n\n // Lifecycle — per hook, fragment steps before the action's.\n const lifecycle: Record<string, Step[]> = {};\n for (const hook of HOOKS) {\n const steps: Step[] = [\n ...fragments.flatMap((f) => f.lifecycle?.[hook] ?? []),\n ...(action.lifecycle?.[hook] ?? []),\n ];\n if (steps.length > 0) lifecycle[hook] = steps;\n }\n\n return {\n id: action.id,\n ...(action.name === undefined ? {} : { name: action.name }),\n ...(action.description === undefined ? {} : { description: action.description }),\n ...(action.title === undefined ? {} : { title: action.title }),\n ...(action.input === undefined ? {} : { input: action.input }),\n ...(layout === undefined ? {} : { layout }),\n ...(Object.keys(data).length > 0 ? { data } : {}),\n ...(triggers.length > 0 ? { triggers } : {}),\n ...(Object.keys(endpoints).length > 0 ? { endpoints } : {}),\n ...(Object.keys(lifecycle).length > 0 ? { lifecycle } : {}),\n } as ActionDefinition;\n};\n","import { OPS } from './mutations/ops';\nimport type { Mutation, Step } from './schemas';\n\n// What a step list WRITES, derived from the op registry.\n//\n// Three places needed this and each kept its own copy of the op names: the\n// runtime (which steps are mutations), the audit (which data paths a definition\n// fills), and anything reflecting over a definition. `OPS` is already the single\n// source of truth for operations, so it is the source of truth here too — adding\n// an op stays a one-line change in ops/index.ts.\n\n// Every mutation op's key. Derived, so it cannot drift from the ops themselves.\nexport const MUTATION_KEYS: readonly string[] = [...new Set(OPS.map((op) => op.key))];\n\n// Each op's own discrimination. `push` and `pop` are the interesting ones: as a\n// string they name a data path (a mutation), as anything else they are the\n// navigation effect.\nconst MATCHERS = OPS.map((op) => op.match ?? ((step: Record<string, unknown>) => op.key in step));\n\nexport const isMutationStep = (step: Step): step is Mutation => MATCHERS.some((match) => match(step as unknown as Record<string, unknown>));\n\n// Every data path a step list writes, at any depth. `call` branches nest their\n// own steps, so one trigger can load and then set.\nexport const mutationPaths = (steps: unknown): string[] => {\n const found: string[] = [];\n const walk = (node: unknown): void => {\n if (Array.isArray(node)) {\n for (const item of node) walk(item);\n return;\n }\n if (node === null || typeof node !== 'object') return;\n const step = node as Record<string, unknown>;\n if (isMutationStep(step as unknown as Step)) {\n for (const key of MUTATION_KEYS) {\n const value = step[key];\n if (typeof value === 'string') found.push(value);\n }\n }\n walk(step['onSuccess']);\n walk(step['onError']);\n };\n walk(steps);\n return found;\n};\n\n// `openIssue.issue_id` and `openIssue` are one key: both point the card at an\n// issue. Every reading below compares at this level.\nexport const rootOf = (path: string): string => path.split('.')[0] ?? path;\n","import { collectInteractive } from '../agent/affordances';\nimport { MUTATION_KEYS } from './grammar';\nimport type { ActionDefinition } from './schemas';\n\n// ═══════════════════════════════════════════════════════════\n// auditAction — static analysis of an ActionDefinition's internal wiring.\n//\n// A definition can parse, mount, and render politely while being broken in\n// every way that matters: a table bound to a key no endpoint fills, a search\n// box whose trigger re-calls a load that never reads it, a ref with no\n// trigger (dead chrome), a push into an action that doesn't exist. None of\n// that is visible to a schema parse or a mount probe — it IS visible in the\n// artifact. This audits the definition deterministically: every claim is a\n// cross-reference inside the definition (plus an optional catalog), so there\n// are no heuristics and no false authority.\n//\n// Scope: SELF-CONTAINED definitions with an inline layout — generated\n// actions above all. Hand-authored actions that receive triggers from\n// fragments (`with: [...]`) or bind stored layouts will report issues that\n// composition would resolve; audit the COMPOSED definition instead, or skip.\n// ═══════════════════════════════════════════════════════════\n\nexport type AuditCatalogEntry = {\n id: string;\n // The action's openable-input contract (a JSON Schema). When it carries\n // `properties`, seeded push input keys are checked against them.\n input?: Record<string, unknown>;\n};\n\nexport type AuditOptions = {\n // Known pushable action ids. When given, every push/replace/resetTo\n // target must be one of them (or the definition's own id), with input\n // keys from its contract.\n catalog?: ReadonlyArray<AuditCatalogEntry>;\n // Known message channels (derive them from the registered definitions —\n // see collectChannels). When given, a `message:` listen must name a known\n // channel or one this definition emits itself; an `emit` must name a known\n // channel or one this definition listens on. Catches the silent\n // never-fires class (\"tasks:changed\" vs \"tasks-changed\").\n channels?: ReadonlyArray<string>;\n};\n\nexport type AuditResult = { ok: boolean; issues: string[] };\n\n// The channels a definition talks on — every `message:` trigger (listens)\n// and every `emit` step (emits), nested steps included. Walk a whole\n// registry's definitions to derive the app's live channel vocabulary.\nexport type ChannelUsage = { emits: string[]; listens: string[] };\n\nexport const collectChannels = (definition: ActionDefinition): ChannelUsage => {\n const emits = new Set<string>();\n const listens = new Set<string>();\n\n const walkSteps = (list: unknown): void => {\n if (!Array.isArray(list)) return;\n for (const step of list) {\n if (!isRecord(step)) continue;\n const emit = step['emit'];\n if (isRecord(emit) && typeof emit['channel'] === 'string') emits.add(emit['channel']);\n if (typeof step['call'] === 'string') {\n walkSteps(step['onSuccess']);\n walkSteps(step['onError']);\n }\n }\n };\n for (const trigger of definition.triggers ?? []) {\n if (typeof trigger.message === 'string') listens.add(trigger.message);\n walkSteps(trigger.do);\n }\n for (const hook of Object.values(definition.lifecycle ?? {})) walkSteps(hook);\n\n return { emits: [...emits].sort(), listens: [...listens].sort() };\n};\n\n// Mutation ops whose value is a data PATH (see action/mutations/ops). The\nconst firstSegment = (path: string): string => {\n const segment = path.split('.')[0];\n return segment === undefined || segment.length === 0 ? path : segment;\n};\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n value !== null && typeof value === 'object' && !Array.isArray(value);\n\ntype NavTarget = { action: string; input?: Record<string, unknown> };\n\nconst navTargetOf = (step: Record<string, unknown>): NavTarget | undefined => {\n for (const key of ['push', 'replace', 'resetTo']) {\n const value = step[key];\n if (isRecord(value) && typeof value['action'] === 'string') {\n const input = value['input'];\n return { action: value['action'], ...(isRecord(input) ? { input } : {}) };\n }\n }\n return undefined;\n};\n\nexport const auditAction = (definition: ActionDefinition, options?: AuditOptions): AuditResult => {\n const issues: string[] = [];\n const dataKeys = new Set(Object.keys(definition.data ?? {}));\n const endpointNames = new Set(Object.keys(definition.endpoints ?? {}));\n\n // ── collect every step (structurally — nested onSuccess/onError included),\n // wherever steps live: triggers and lifecycle hooks ──\n const steps: Record<string, unknown>[] = [];\n const pushSteps = (list: unknown): void => {\n if (!Array.isArray(list)) return;\n for (const step of list) {\n if (!isRecord(step)) continue;\n steps.push(step);\n if (typeof step['call'] === 'string') {\n pushSteps(step['onSuccess']);\n pushSteps(step['onError']);\n }\n }\n };\n for (const trigger of definition.triggers ?? []) pushSteps(trigger.do);\n for (const hook of Object.values(definition.lifecycle ?? {})) pushSteps(hook);\n\n // ── steps: calls name real endpoints; mutations write declared keys;\n // navigation targets exist in the catalog with legal input keys ──\n for (const step of steps) {\n const call = step['call'];\n if (typeof call === 'string' && !endpointNames.has(call)) {\n issues.push(`step calls endpoint \"${call}\" but endpoints has no \"${call}\"`);\n }\n\n for (const key of MUTATION_KEYS) {\n const path = step[key];\n if (typeof path === 'string' && path.length > 0 && !dataKeys.has(firstSegment(path))) {\n issues.push(`step \"${key}: ${path}\" writes a key with no default in data`);\n }\n }\n\n const nav = navTargetOf(step);\n if (nav !== undefined && options?.catalog !== undefined) {\n const entry = options.catalog.find((candidate) => candidate.id === nav.action);\n if (entry === undefined && nav.action !== definition.id) {\n issues.push(`step pushes action \"${nav.action}\" which is not in the catalog`);\n continue;\n }\n const properties = entry?.input?.['properties'];\n if (nav.input !== undefined && isRecord(properties)) {\n for (const key of Object.keys(nav.input)) {\n if (!(key in properties)) {\n issues.push(`push to \"${nav.action}\" seeds input key \"${key}\" which is not in its input contract`);\n }\n }\n }\n }\n }\n\n // ── endpoints: targets land on declared keys ──\n for (const [name, endpoint] of Object.entries(definition.endpoints ?? {})) {\n for (const field of ['target', 'errorTarget'] as const) {\n const target = endpoint[field];\n if (typeof target === 'string' && target.length > 0 && !dataKeys.has(firstSegment(target))) {\n issues.push(`endpoint \"${name}\" ${field} \"${target}\" has no default in data`);\n }\n }\n }\n\n // ── message channels (when the app's vocabulary is provided) ──\n if (options?.channels !== undefined) {\n const known = new Set(options.channels);\n const usage = collectChannels(definition);\n for (const channel of usage.listens) {\n if (!known.has(channel) && !usage.emits.includes(channel)) {\n issues.push(`trigger listens on channel \"${channel}\" which nothing is known to emit`);\n }\n }\n for (const channel of usage.emits) {\n if (!known.has(channel) && !usage.listens.includes(channel)) {\n issues.push(`step emits channel \"${channel}\" which nothing is known to listen on`);\n }\n }\n }\n\n // ── layout ↔ data ↔ triggers (inline layouts only) ──\n if (definition.layout !== undefined && typeof definition.layout !== 'string') {\n const surface = collectInteractive(definition.layout);\n\n for (const key of surface.boundKeys) {\n if (!dataKeys.has(key)) {\n issues.push(`layout binds \"$.${key}\" but data has no \"${key}\" default`);\n }\n }\n\n for (const suspect of surface.suspectBindings) {\n issues.push(\n `layout binding \"${suspect}…\" is malformed — the data root is \"$.\" (\"$.key\"), and \"$name.\" is only legal for a loop variable declared by an enclosing for/as`,\n );\n }\n\n const layoutRefs = new Set(surface.refs.map((entry) => entry.ref));\n const triggerRefs = new Set(\n (definition.triggers ?? [])\n .map((trigger) => trigger.ref)\n .filter((ref): ref is string => typeof ref === 'string'),\n );\n for (const ref of layoutRefs) {\n if (!triggerRefs.has(ref)) {\n issues.push(`layout ref \"${ref}\" has no trigger — dead chrome`);\n }\n }\n for (const ref of triggerRefs) {\n if (!layoutRefs.has(ref)) {\n issues.push(`trigger listens on ref \"${ref}\" but no layout node carries it`);\n }\n }\n }\n\n return { ok: issues.length === 0, issues };\n};\n","import type { ActionDefinition } from '@action';\nimport { mutationPaths, rootOf } from '@action/grammar';\n\n// What an action does with its DATA KEYS, read off its own definition.\n//\n// Four questions, each a pure function of the artifact and each with more than\n// one consumer: an audit asking whether declared state is reachable, an agent\n// asking whether a change was a person or a re-read, a devtools pane asking what\n// fills a field. Every one of them was being re-derived outside nova, which is\n// how a hand-copied list of mutation ops ended up in an application.\n\n// What a FINGER can write: every data path a `ui:` trigger sets.\nexport const gesturedKeys = (definition: ActionDefinition): readonly string[] => [\n ...new Set(\n (definition.triggers ?? [])\n .filter((trigger) => typeof trigger.event === 'string' && trigger.event.startsWith('ui:'))\n .flatMap((trigger) => mutationPaths(trigger.do))\n .map(rootOf),\n ),\n];\n\n// What an OPENER may set: the declared input contract.\nexport const declaredKeys = (definition: ActionDefinition): readonly string[] =>\n Object.keys((definition.input as { properties?: Record<string, unknown> } | undefined)?.properties ?? {});\n\n// What the DATABASE writes: every endpoint's landing place.\nexport const loadedKeys = (definition: ActionDefinition): readonly string[] => {\n const loaded = new Set<string>();\n for (const endpoint of Object.values(definition.endpoints ?? {})) {\n const spec = endpoint as { target?: string; errorTarget?: string };\n if (spec.target !== undefined) loaded.add(rootOf(spec.target));\n if (spec.errorTarget !== undefined) loaded.add(rootOf(spec.errorTarget));\n }\n return [...loaded];\n};\n\n// What a surface writes to ITSELF when it opens or resumes: a loading flag\n// clearing, a working flag resetting.\nexport const lifecycleKeys = (definition: ActionDefinition): readonly string[] => [\n ...new Set(\n Object.values((definition.lifecycle ?? {}) as Record<string, unknown>)\n .flatMap(mutationPaths)\n .map(rootOf),\n ),\n];\n\n// Endpoint names a `mount` step calls, at any depth.\nconst mountCalls = (definition: ActionDefinition): Set<string> => {\n const names = new Set<string>();\n const walk = (node: unknown): void => {\n if (Array.isArray(node)) {\n for (const item of node) walk(item);\n return;\n }\n if (node === null || typeof node !== 'object') return;\n const step = node as Record<string, unknown>;\n if (typeof step['call'] === 'string') names.add(step['call']);\n walk(step['onSuccess']);\n walk(step['onError']);\n };\n walk((definition.lifecycle as { mount?: unknown } | undefined)?.mount);\n return names;\n};\n\n// Every `$.<key>` an endpoint's request reads. `{ id: { $ref: '$.issueId' } }`\n// and the bare form `'$.issueId'` both count.\nconst requestKeys = (request: unknown): string[] => {\n const found: string[] = [];\n const walk = (node: unknown): void => {\n if (typeof node === 'string') {\n if (node.startsWith('$.')) found.push(rootOf(node.slice(2)));\n return;\n }\n if (Array.isArray(node)) {\n for (const item of node) walk(item);\n return;\n }\n if (node === null || typeof node !== 'object') return;\n for (const value of Object.values(node as Record<string, unknown>)) walk(value);\n };\n walk(request);\n return found.filter((key) => key !== '');\n};\n\nconst mountInputCache = new WeakMap<ActionDefinition, ReadonlySet<string>>();\n\n// Input keys the surface consumes WHEN IT OPENS: an id its own mount-time load\n// sends. Writing one into a live instance leaves the previous record's data on\n// screen, so a caller that wants to re-aim must re-mount instead.\n//\n// Cached per definition object: definitions are read on every telemetry event,\n// and a bundle sync replaces them wholesale, so identity is the right key.\nexport const mountInputKeys = (definition: ActionDefinition): ReadonlySet<string> => {\n const cached = mountInputCache.get(definition);\n if (cached !== undefined) return cached;\n const called = mountCalls(definition);\n const declared = new Set(declaredKeys(definition));\n const keys = new Set<string>();\n for (const [name, endpoint] of Object.entries(definition.endpoints ?? {})) {\n if (!called.has(name)) continue;\n for (const key of requestKeys((endpoint as { request?: unknown }).request)) if (declared.has(key)) keys.add(key);\n }\n mountInputCache.set(definition, keys);\n return keys;\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/adapters/react/components/stack.tsx","../src/adapters/react/components/text.tsx","../src/adapters/react/context.ts","../src/adapters/react/head.tsx","../src/adapters/react/provider.tsx","../src/adapters/react/error-marker.tsx","../src/adapters/react/render-node.tsx","../src/adapters/react/render-tree.tsx","../src/adapters/react/error-boundary.tsx","../src/adapters/react/hooks/use-shell.ts","../src/adapters/react/hooks/use-canvas-render-tree.ts","../src/adapters/react/hooks/use-shell-render-tree.ts","../src/adapters/react/nova.tsx","../src/adapters/react/hooks/use-shell-state.ts","../src/adapters/react/hooks/use-canvas.ts","../src/adapters/react/hooks/use-action-data.ts","../src/adapters/react/hooks/use-action-status.ts","../src/adapters/react/hooks/use-render-tree.ts","../src/adapters/react/hooks/use-nova-dispatch.ts","../src/adapters/react/hooks/use-nova-publish.ts","../src/adapters/react/hooks/use-nova-registry.ts","../src/adapters/react/hooks/use-slot-wrapper.ts","../src/adapters/react/components/input.tsx","../src/adapters/react/components/button.tsx","../src/adapters/react/components/box.tsx","../src/adapters/react/components/panel.tsx","../src/adapters/react/components/json-tree.tsx","../src/adapters/react/components/canvas-slot.tsx","../src/adapters/react/components/action-slot.tsx","../src/adapters/react/components/index.ts"],"names":["jsx","StackPropsSchema","createElement","TextPropsSchema","createContext","useContext","useEffect","useMemo","createShellHead","Fragment","isHeadNode","Component","NOVA_MODEL_PROP","NOVA_REF_PROP","renderNodeKey","useRef","useCallback","useSyncExternalStore","useState","createComponentRegistry","createLayoutStore","renderLayout","jsxs","EMPTY","InputPropsSchema","ButtonPropsSchema","BoxPropsSchema","PanelPropsSchema","JsonTreePropsSchema","CanvasSlotPropsSchema","scopeDispatch","ActionSlotPropsSchema"],"mappings":";;;;;;;;;;AAUA,IAAM,SAAA,GAAY;AAAA,EAChB,KAAA,EAAO,YAAA;AAAA,EACP,MAAA,EAAQ,QAAA;AAAA,EACR,GAAA,EAAK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AAS,WAAA,CAAY;AAAA,IACnB,KAAA;AAAA,IACA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,MAAA;AAAA,IACA,GAAA;AAAA,IACA,KAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,GACD,CAAA;AACH","file":"chunk-Z7CS43ZT.cjs","sourcesContent":["import type { CSSProperties } from 'react';\nimport { StackPropsSchema, type StackProps } from '../../primitive-props';\nimport type { NovaComponent, NovaComponentProps } from '@react';\n\n// ═══════════════════════════════════════════════════════════\n// Stack — flex container\n// ═══════════════════════════════════════════════════════════\n\nexport { StackPropsSchema, type StackProps };\n\nconst ALIGN_MAP = {\n start: 'flex-start',\n center: 'center',\n end: 'flex-end',\n stretch: 'stretch',\n} as const;\n\nconst JUSTIFY_MAP = {\n start: 'flex-start',\n center: 'center',\n end: 'flex-end',\n between: 'space-between',\n around: 'space-around',\n} as const;\n\nexport const Stack: NovaComponent<StackProps> = ({\n direction,\n gap,\n align,\n justify,\n padding,\n wrap,\n children,\n}: NovaComponentProps & StackProps) => {\n const style: CSSProperties = {\n display: 'flex',\n flexDirection: direction ?? 'column',\n gap: gap ?? 0,\n alignItems: ALIGN_MAP[align ?? 'stretch'],\n justifyContent: JUSTIFY_MAP[justify ?? 'start'],\n padding: padding ?? 0,\n flexWrap: wrap === true ? 'wrap' : 'nowrap',\n };\n return <div style={style}>{children}</div>;\n};\n\nStack.meta = {\n description: 'Flex container that arranges children in a row or column.',\n propsSchema: StackPropsSchema,\n};\n","import { createElement, type CSSProperties } from 'react';\nimport { TextPropsSchema, type TextProps } from '../../primitive-props';\nimport type { NovaComponent, NovaComponentProps } from '@react';\n\n// ═══════════════════════════════════════════════════════════\n// Text — typography element\n// ═══════════════════════════════════════════════════════════\n\nexport { TextPropsSchema, type TextProps };\n\nconst SIZE_MAP = {\n sm: '12px',\n md: '14px',\n lg: '16px',\n xl: '20px',\n '2xl': '24px',\n} as const;\n\nconst WEIGHT_MAP = {\n normal: 400,\n medium: 500,\n bold: 700,\n} as const;\n\nexport const Text: NovaComponent<TextProps> = ({\n as,\n size,\n weight,\n color,\n children,\n}: NovaComponentProps & TextProps) => {\n const tag = as ?? 'span';\n const style: CSSProperties = {\n fontSize: SIZE_MAP[size ?? 'md'],\n fontWeight: WEIGHT_MAP[weight ?? 'normal'],\n color: color ?? 'inherit',\n };\n return createElement(tag, { style }, children);\n};\n\nText.meta = {\n description: 'Text element with semantic typography props.',\n propsSchema: TextPropsSchema,\n};\n","import { createContext, type ComponentType, type FC, type ReactNode } from 'react';\nimport type { ActionDefinition } from '@action';\nimport type { ComponentRegistry } from '@layout';\nimport type { Shell } from '@shell';\nimport type { NovaComponent, NovaDispatch, NovaPublish } from './types';\n\n// ═══════════════════════════════════════════════════════════\n// Two React contexts:\n// - NovaRenderContext: registry + dispatch + publish (+ optional\n// slotWrapper). Required to render a layout. Does NOT require a shell.\n// - NovaShellContext: the shell itself. Consumers who want\n// shell-aware hooks (canvases, runtimes, state) need this.\n// ═══════════════════════════════════════════════════════════\n\n// An app-supplied component that wraps each action instance's rendered content\n// at the ActionSlot seam — the single pluggable point for cross-cutting\n// concerns: enter/leave animation, an auth/feature gate, logging, an error\n// boundary. Nova hands it IDENTITY (canvasId / instanceId / the action's\n// definition), never live state, and owns no timing — the wrapper (and whatever\n// it plugs in: framer-motion, react-transition-group, plain CSS) owns all of\n// that. The three identity fields are `undefined` while a slot is empty or\n// exiting; a presence-managing wrapper captured them when content was present.\nexport type SlotWrapperProps = {\n canvasId?: string;\n instanceId?: string;\n action?: ActionDefinition;\n children?: ReactNode;\n};\nexport type SlotWrapper = FC<SlotWrapperProps>;\n\nexport type NovaRenderContextValue = {\n registry: ComponentRegistry<NovaComponent>;\n dispatch: NovaDispatch;\n publish: NovaPublish;\n slotWrapper?: SlotWrapper;\n // used when a component name is unregistered — a permissive renderer (a\n // terminal on a reference kit) supplies one so unknown primitives render\n // their children instead of an error marker; strict consumers omit it.\n // Same seam as the DOM and TTY adapters' `fallback`.\n fallback?: NovaComponent;\n // host-specific leaf renderers. The DOM host renders a text node as a bare\n // string and an error node as a <span> — both crash a non-DOM react host\n // (ink requires every string inside <Text>). A host that isn't the DOM\n // supplies its own wrappers; browser consumers omit both.\n textWrapper?: ComponentType<{ children?: ReactNode }>;\n errorMarker?: ComponentType<{ code: string; message: string }>;\n};\n\nexport const NovaRenderContext = createContext<NovaRenderContextValue | undefined>(undefined);\nexport const NovaShellContext = createContext<Shell | undefined>(undefined);\n","import { createContext, useContext, useEffect, useMemo, type FC, type ReactNode } from 'react';\nimport type { Shell } from '@shell';\nimport { createShellHead, type ShellHead } from '../../document/shell-head';\n\n// ═══════════════════════════════════════════════════════════\n// A head node (`nova:head`), in React.\n//\n// It draws nothing, and neither does anything it holds. Where the shell lives\n// in this page it says that it is on the screen, so the page's head is read\n// off the shell only while there is one to read (document/shell-head). Under a\n// served screen there is no shell here and nothing to say to: the terminal\n// keeps the head off the wire.\n//\n// Effects do not run where a screen is drawn to a string, so none of this\n// touches a document that is not a browser's.\n// ═══════════════════════════════════════════════════════════\n\nconst ShellHeadContext = createContext<ShellHead | undefined>(undefined);\n\nexport const HeadMark: FC = () => {\n const head = useContext(ShellHeadContext);\n useEffect(() => {\n if (head === undefined) return undefined;\n head.enter();\n return head.leave;\n }, [head]);\n return null;\n};\n\nexport const ShellHeadProvider: FC<{ shell: Shell; children?: ReactNode }> = ({ shell, children }) => {\n const head = useMemo(() => createShellHead(shell), [shell]);\n useEffect(() => head.watch(), [head]);\n return <ShellHeadContext.Provider value={head}>{children}</ShellHeadContext.Provider>;\n};\n","import { useMemo, type ComponentType, type FC, type ReactNode } from 'react';\nimport type { ComponentRegistry } from '@layout';\nimport type { Shell } from '@shell';\nimport {\n NovaRenderContext,\n NovaShellContext,\n type NovaRenderContextValue,\n type SlotWrapper,\n} from './context';\nimport { ShellHeadProvider } from './head';\nimport type { NovaComponent, NovaDispatch, NovaPublish } from './types';\n\nconst noopDispatch: NovaDispatch = () => {};\nconst noopPublish: NovaPublish = () => {};\n\n// ═══════════════════════════════════════════════════════════\n// <NovaRenderProvider>\n//\n// The framework-agnostic renderer context. Pairs a component\n// registry with a dispatch and publish function. Works with no\n// shell — dispatch and publish default to no-ops so static\n// layouts can be rendered without any event infrastructure.\n// ═══════════════════════════════════════════════════════════\n\nexport type NovaRenderProviderProps = {\n registry: ComponentRegistry<NovaComponent>;\n dispatch?: NovaDispatch;\n publish?: NovaPublish;\n slotWrapper?: SlotWrapper;\n // renderer for unregistered component names; omit for strict error markers\n fallback?: NovaComponent;\n // host-specific leaf renderers (see NovaRenderContextValue) — a non-DOM\n // react host (ink) supplies both; browser consumers omit them\n textWrapper?: ComponentType<{ children?: ReactNode }>;\n errorMarker?: ComponentType<{ code: string; message: string }>;\n children?: ReactNode;\n};\n\nexport const NovaRenderProvider: FC<NovaRenderProviderProps> = ({\n registry,\n dispatch = noopDispatch,\n publish = noopPublish,\n slotWrapper,\n fallback,\n textWrapper,\n errorMarker,\n children,\n}) => {\n const value = useMemo<NovaRenderContextValue>(\n () => ({ registry, dispatch, publish, slotWrapper, fallback, textWrapper, errorMarker }),\n [registry, dispatch, publish, slotWrapper, fallback, textWrapper, errorMarker],\n );\n return <NovaRenderContext.Provider value={value}>{children}</NovaRenderContext.Provider>;\n};\n\n// ═══════════════════════════════════════════════════════════\n// <NovaShellProvider>\n//\n// A thin wrapper over <NovaRenderProvider> that also exposes the\n// shell via context. The registry defaults to `shell.registry` so\n// callers don't have to thread it through twice; pass an explicit\n// `registry` override only when the shell should render against a\n// different one (rare).\n// ═══════════════════════════════════════════════════════════\n\nexport type NovaShellProviderProps = {\n shell: Shell;\n registry?: ComponentRegistry<NovaComponent>;\n slotWrapper?: SlotWrapper;\n children?: ReactNode;\n};\n\nexport const NovaShellProvider: FC<NovaShellProviderProps> = ({\n shell,\n registry,\n slotWrapper,\n children,\n}) => {\n const dispatch = useMemo<NovaDispatch>(() => (event) => shell.dispatch(event), [shell]);\n const publish = useMemo<NovaPublish>(\n () => (channel, payload) => shell.publish(channel, payload),\n [shell],\n );\n const resolvedRegistry = (registry ?? shell.registry) as ComponentRegistry<NovaComponent>;\n return (\n <NovaShellContext.Provider value={shell}>\n <NovaRenderProvider\n registry={resolvedRegistry}\n dispatch={dispatch}\n publish={publish}\n slotWrapper={slotWrapper}\n >\n <ShellHeadProvider shell={shell}>{children}</ShellHeadProvider>\n </NovaRenderProvider>\n </NovaShellContext.Provider>\n );\n};\n","import type { FC } from 'react';\n\nexport type ErrorMarkerProps = {\n code: string;\n message: string;\n};\n\n// Renders error RenderNodes surfaced by the renderer in lax mode.\n// Consumers can style via the `data-nova-error` attribute.\nexport const ErrorMarker: FC<ErrorMarkerProps> = ({ code, message }) => (\n <span data-nova-error={code} role=\"alert\">\n {`[${code}] ${message}`}\n </span>\n);\n","import { Fragment, createElement, useContext, type FC, type ReactElement } from 'react';\nimport { NOVA_MODEL_PROP, NOVA_REF_PROP, renderNodeKey, type RenderNode } from '@layout';\nimport { isHeadNode } from '@shell';\nimport { NovaRenderContext } from './context';\nimport { ErrorMarker } from './error-marker';\nimport { HeadMark } from './head';\nimport { RenderTree } from './render-tree';\n\nexport type RenderNodeViewProps = {\n node: RenderNode;\n};\n\nexport const RenderNodeView: FC<RenderNodeViewProps> = ({ node }) => {\n const ctx = useContext(NovaRenderContext);\n if (ctx === undefined) {\n throw new Error('RenderNodeView must be used inside <NovaRenderProvider>');\n }\n\n if (node.type === 'text') {\n // a non-DOM host (ink) must wrap every string — bare text crashes it\n const TextWrap = ctx.textWrapper;\n return TextWrap === undefined ? <Fragment>{node.value}</Fragment> : <TextWrap>{node.value}</TextWrap>;\n }\n if (node.type === 'fragment') {\n return <RenderTree nodes={node.children} />;\n }\n if (node.type === 'error') {\n const Marker = ctx.errorMarker ?? ErrorMarker;\n return <Marker code={node.code} message={node.message} />;\n }\n\n // node.type === 'component'\n // a head is the document's, not the screen's: nothing is drawn for it or for what it holds\n if (isHeadNode(node)) return <HeadMark />;\n const entry = ctx.registry.get(node.name);\n const Component = entry !== undefined ? entry.component : ctx.fallback;\n if (Component === undefined) {\n return <ErrorMarker code=\"COMPONENT_NOT_FOUND\" message={node.name} />;\n }\n const props: Record<string, unknown> = { ...node.props };\n if (node.model !== undefined) {\n props[NOVA_MODEL_PROP] = { ref: node.model.ref, path: node.model.path };\n }\n if (node.ref !== undefined) {\n props[NOVA_REF_PROP] = node.ref;\n }\n // Children go in as a keyed ARRAY of per-child elements (not one RenderTree\n // wrapper) so a component can address them individually with React.Children —\n // a Grid wraps each in a weighted flex cell. React flattens the array the\n // same way it would the fragment; keys follow core's renderNodeKey.\n const viewOf = (child: RenderNode, i: number): ReactElement => <RenderNodeView key={renderNodeKey(child, i)} node={child} />;\n if (!node.children.some(isHeadNode)) {\n return createElement(Component, props, node.children.length === 0 ? undefined : node.children.map(viewOf));\n }\n // A head among them is not handed to the component — a kit that gives every\n // child a cell would give it an empty one. It stands beside the component.\n const views = node.children.map((child, i) => ({ head: isHeadNode(child), view: viewOf(child, i) }));\n const shown = views.filter((child) => !child.head).map((child) => child.view);\n return (\n <Fragment>\n {createElement(Component, props, shown.length === 0 ? undefined : shown)}\n {views.filter((child) => child.head).map((child) => child.view)}\n </Fragment>\n );\n};\n","import { Fragment, type FC } from 'react';\nimport { renderNodeKey, type RenderNode } from '@layout';\nimport { RenderNodeView } from './render-node';\n\nexport type RenderTreeProps = {\n nodes: RenderNode[];\n};\n\nexport const RenderTree: FC<RenderTreeProps> = ({ nodes }) => (\n <Fragment>\n {nodes.map((node, i) => (\n <RenderNodeView key={renderNodeKey(node, i)} node={node} />\n ))}\n </Fragment>\n);\n","import { Component, type ErrorInfo, type ReactNode } from 'react';\n\n// ═══════════════════════════════════════════════════════════\n// React error boundaries REQUIRE a class component as of React 19.\n// There is no functional alternative today. This is the ONLY class\n// in the package outside `shared/errors.ts`. Justified strictly by\n// the framework requirement — every other abstraction in nova uses\n// factory + closure.\n// ═══════════════════════════════════════════════════════════\n\nexport type NovaErrorBoundaryProps = {\n children?: ReactNode;\n fallback?: (error: Error) => ReactNode;\n onError?: (error: Error, info: ErrorInfo) => void;\n};\n\ntype NovaErrorBoundaryState = {\n error: Error | undefined;\n};\n\nexport class NovaErrorBoundary extends Component<NovaErrorBoundaryProps, NovaErrorBoundaryState> {\n state: NovaErrorBoundaryState = { error: undefined };\n\n static getDerivedStateFromError(error: Error): NovaErrorBoundaryState {\n return { error };\n }\n\n componentDidCatch(error: Error, info: ErrorInfo): void {\n const handler = this.props.onError;\n if (handler !== undefined) handler(error, info);\n }\n\n render(): ReactNode {\n const { error } = this.state;\n if (error !== undefined) {\n const fallback = this.props.fallback;\n if (fallback !== undefined) return fallback(error);\n return (\n <div data-nova-error-boundary=\"true\" role=\"alert\">\n {error.message}\n </div>\n );\n }\n return this.props.children;\n }\n}\n","import { useContext } from 'react';\nimport type { Shell } from '@shell';\nimport { NovaShellContext } from '../context';\n\nexport const useShell = (): Shell => {\n const shell = useContext(NovaShellContext);\n if (shell === undefined) {\n throw new Error('useShell must be used inside <NovaShellProvider>');\n }\n return shell;\n};\n","import { useCallback, useRef, useSyncExternalStore } from 'react';\nimport type { RenderNode } from '@layout';\nimport type { Shell } from '@shell';\nimport { useShell } from './use-shell';\n\ntype Cache = {\n shell: Shell;\n canvasId: string | undefined;\n tree: RenderNode[];\n};\n\nconst EMPTY: RenderNode[] = [];\n\nexport const useCanvasRenderTree = (canvasId: string | undefined): RenderNode[] => {\n const shell = useShell();\n const cacheRef = useRef<Cache | undefined>(undefined);\n\n const subscribe = useCallback(\n (cb: () => void) =>\n shell.onStateChange(() => {\n const tree = canvasId === undefined ? EMPTY : shell.getCanvasRenderTree(canvasId);\n cacheRef.current = { shell, canvasId, tree };\n cb();\n }),\n [shell, canvasId],\n );\n\n const getSnapshot = useCallback((): RenderNode[] => {\n const cached = cacheRef.current;\n if (cached !== undefined && cached.shell === shell && cached.canvasId === canvasId) {\n return cached.tree;\n }\n const tree = canvasId === undefined ? EMPTY : shell.getCanvasRenderTree(canvasId);\n cacheRef.current = { shell, canvasId, tree };\n return tree;\n }, [shell, canvasId]);\n\n // The third argument is what a SERVER reads. The shell exists there too, with\n // a real state, so it is the same read — and without it React refuses to draw\n // this to markup at all (\"Missing getServerSnapshot\").\n return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n};\n","import { useCallback, useRef, useSyncExternalStore } from 'react';\nimport type { RenderNode } from '@layout';\nimport type { Shell } from '@shell';\nimport { useShell } from './use-shell';\n\ntype Cache = {\n shell: Shell;\n tree: RenderNode[];\n};\n\nexport const useShellRenderTree = (): RenderNode[] => {\n const shell = useShell();\n const cacheRef = useRef<Cache | undefined>(undefined);\n\n const subscribe = useCallback(\n (cb: () => void) =>\n shell.onStateChange(() => {\n cacheRef.current = { shell, tree: shell.getShellRenderTree() };\n cb();\n }),\n [shell],\n );\n\n const getSnapshot = useCallback((): RenderNode[] => {\n const cached = cacheRef.current;\n if (cached === undefined || cached.shell !== shell) {\n const tree = shell.getShellRenderTree();\n cacheRef.current = { shell, tree };\n return tree;\n }\n return cached.tree;\n }, [shell]);\n\n // The third argument is what a SERVER reads. The shell exists there too, with\n // a real state, so it is the same read — and without it React refuses to draw\n // this to markup at all (\"Missing getServerSnapshot\").\n return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n};\n","import { useMemo, useState, type FC, type ReactNode } from 'react';\nimport {\n createComponentRegistry,\n createLayoutStore,\n renderLayout,\n type ComponentRegistry,\n type LayoutNode,\n type LayoutStore,\n type RegistrationInput,\n type RenderContext,\n type RenderOnError,\n} from '@layout';\nimport type { Shell } from '@shell';\nimport { registerNovaReactComponents } from './components';\nimport type { SlotWrapper } from './context';\nimport { NovaRenderProvider, NovaShellProvider } from './provider';\nimport { RenderTree } from './render-tree';\nimport { useCanvasRenderTree } from './hooks/use-canvas-render-tree';\nimport { useShell } from './hooks/use-shell';\nimport { useShellRenderTree } from './hooks/use-shell-render-tree';\nimport type { NovaComponent } from './types';\n\n// ═══════════════════════════════════════════════════════════\n// <Nova.Layout> / <Nova.Shell> / <Nova.Canvas>\n//\n// The three mountable surfaces for Nova. Each hides the\n// registry/store/provider/render-tree wiring behind a single\n// component so stories and apps can stay declarative.\n//\n// <Nova.Layout layout data components? />\n// <Nova.Shell shell />\n// <Nova.Canvas shell? id />\n//\n// Lower-level primitives (NovaShellProvider, RenderTree, the\n// render-tree hooks) remain exported for advanced composition.\n// ═══════════════════════════════════════════════════════════\n\nconst ensureReactBuiltins = (registry: ComponentRegistry<NovaComponent>): void => {\n // Idempotent: the React adapter's slot components (CanvasSlot / ActionSlot)\n // are required for the shell's default layouts, and the primitive\n // components (Stack, Text, Input, Button, Box) are the authoring vocabulary\n // every demo expects. A single presence check short-circuits re-registration.\n if (registry.has('CanvasSlot')) return;\n registerNovaReactComponents(registry);\n};\n\n// ─── <Nova.Layout> ─────────────────────────────────────────\n\nexport type NovaLayoutProps = {\n // The layout tree to render. Inline LayoutNode or a LayoutStore id\n // (requires `store` to contain that id).\n layout: LayoutNode | string;\n // Data scope for resolvables (`$.x`, `{{x}}`). Defaults to `{}`.\n data?: Record<string, unknown>;\n // Extra components to register. Merged after builtins so they can\n // override (rare) or extend (common) the default set.\n components?: Record<string, RegistrationInput<NovaComponent>>;\n // Pass a pre-built registry instead of letting Nova create one.\n // When provided, `components` and `builtins` are ignored — the\n // caller is responsible for the registry's contents.\n registry?: ComponentRegistry<NovaComponent>;\n // Pass a pre-built layout store instead of letting Nova create one.\n store?: LayoutStore;\n // Register Nova's React builtins (Stack, Text, Input, Button, Box,\n // CanvasSlot, ActionSlot). Default true. Only applies when `registry`\n // was NOT provided.\n builtins?: boolean;\n strict?: boolean;\n onError?: RenderOnError;\n // The words this layout wears. Forwarded to the renderer, which is where a\n // language enters — this component translates nothing itself, and neither\n // does any other adapter.\n phrases?: RenderContext['phrases'];\n phraseKeys?: RenderContext['phraseKeys'];\n onPhraseMiss?: RenderContext['onPhraseMiss'];\n children?: ReactNode;\n};\n\nexport const NovaLayout: FC<NovaLayoutProps> = ({\n layout,\n data,\n components,\n registry: registryProp,\n store: storeProp,\n builtins = true,\n strict,\n onError,\n phrases,\n phraseKeys,\n onPhraseMiss,\n children,\n}) => {\n // A registry and store are stable for the lifetime of this component\n // instance. useState(init) fixes them on first render without the hazards\n // of registering during useMemo recomputation.\n const [registry] = useState<ComponentRegistry<NovaComponent>>(() => {\n if (registryProp !== undefined) return registryProp;\n const reg = createComponentRegistry<NovaComponent>();\n if (builtins) registerNovaReactComponents(reg);\n if (components !== undefined) reg.registerAll(components);\n return reg;\n });\n const [store] = useState<LayoutStore>(() => storeProp ?? createLayoutStore());\n\n const nodes = useMemo(() => {\n const resolved = typeof layout === 'string' ? store.get(layout) : layout;\n if (resolved === undefined) return [];\n return renderLayout(resolved, data ?? {}, {\n store,\n registry,\n ...(strict === undefined ? {} : { strict }),\n ...(onError === undefined ? {} : { onError }),\n ...(phrases === undefined ? {} : { phrases }),\n ...(phraseKeys === undefined ? {} : { phraseKeys }),\n ...(onPhraseMiss === undefined ? {} : { onPhraseMiss }),\n });\n }, [layout, data, store, registry, strict, onError, phrases, phraseKeys, onPhraseMiss]);\n\n return (\n <NovaRenderProvider registry={registry}>\n <RenderTree nodes={nodes} />\n {children}\n </NovaRenderProvider>\n );\n};\n\n// ─── <Nova.Shell> ──────────────────────────────────────────\n\nexport type NovaShellProps = {\n shell: Shell;\n // Override the registry used for rendering. Defaults to shell.registry.\n // Pass this only when the same shell should render against a different\n // component set (rare — typically for theming or A/B swaps).\n registry?: ComponentRegistry<NovaComponent>;\n // Optional app-supplied component that wraps every action instance's content\n // at the ActionSlot seam (animation, auth/feature gates, logging, …). Nova\n // owns none of that logic — see `SlotWrapper`. Omit for plain rendering.\n slotWrapper?: SlotWrapper;\n // Ensure the React adapter's slot components are registered on the\n // shell's registry. Default true. Safe to leave on — idempotent.\n builtins?: boolean;\n};\n\nconst ShellRenderTreeView: FC = () => {\n const nodes = useShellRenderTree();\n return <RenderTree nodes={nodes} />;\n};\n\nexport const NovaShell: FC<NovaShellProps> = ({ shell, registry, slotWrapper, builtins = true }) => {\n const resolvedRegistry = (registry ?? shell.registry) as ComponentRegistry<NovaComponent>;\n // Register React builtins onto the resolved registry on first render.\n // useState's lazy initializer gives us a synchronous, once-per-mount hook.\n useState(() => {\n if (builtins) ensureReactBuiltins(resolvedRegistry);\n return true;\n });\n return (\n <NovaShellProvider shell={shell} registry={resolvedRegistry} slotWrapper={slotWrapper}>\n <ShellRenderTreeView />\n </NovaShellProvider>\n );\n};\n\n// ─── <Nova.Canvas> ─────────────────────────────────────────\n\nexport type NovaCanvasProps = {\n // The canvas to render.\n id: string;\n // Optional: when provided, Nova.Canvas creates its own NovaShellProvider.\n // When omitted, Nova.Canvas must be nested inside an existing\n // <Nova.Shell> / <NovaShellProvider>.\n shell?: Shell;\n registry?: ComponentRegistry<NovaComponent>;\n builtins?: boolean;\n};\n\nconst CanvasRenderTreeView: FC<{ canvasId: string }> = ({ canvasId }) => {\n const nodes = useCanvasRenderTree(canvasId);\n return <RenderTree nodes={nodes} />;\n};\n\nconst CanvasInContext: FC<{ canvasId: string }> = ({ canvasId }) => {\n // Asserts we're inside a NovaShellProvider so useShell doesn't throw.\n useShell();\n return <CanvasRenderTreeView canvasId={canvasId} />;\n};\n\nconst CanvasStandalone: FC<{\n canvasId: string;\n shell: Shell;\n registry?: ComponentRegistry<NovaComponent>;\n builtins: boolean;\n}> = ({ canvasId, shell, registry, builtins }) => {\n const resolvedRegistry = (registry ?? shell.registry) as ComponentRegistry<NovaComponent>;\n useState(() => {\n if (builtins) ensureReactBuiltins(resolvedRegistry);\n return true;\n });\n return (\n <NovaShellProvider shell={shell} registry={resolvedRegistry}>\n <CanvasRenderTreeView canvasId={canvasId} />\n </NovaShellProvider>\n );\n};\n\nexport const NovaCanvas: FC<NovaCanvasProps> = ({ id, shell, registry, builtins = true }) => {\n if (shell === undefined) return <CanvasInContext canvasId={id} />;\n return (\n <CanvasStandalone\n canvasId={id}\n shell={shell}\n builtins={builtins}\n {...(registry === undefined ? {} : { registry })}\n />\n );\n};\n\n// ─── namespace ─────────────────────────────────────────────\n\nexport const Nova = {\n Layout: NovaLayout,\n Shell: NovaShell,\n Canvas: NovaCanvas,\n} as const;\n","import { useCallback, useRef, useSyncExternalStore } from 'react';\nimport type { Shell, StateSnapshot } from '@shell';\nimport { useShell } from './use-shell';\n\nexport const useShellState = (): StateSnapshot => {\n const shell = useShell();\n const cacheRef = useRef<{ shell: Shell; snapshot: StateSnapshot } | undefined>(undefined);\n if (cacheRef.current === undefined || cacheRef.current.shell !== shell) {\n cacheRef.current = { shell, snapshot: shell.getState() };\n }\n\n const subscribe = useCallback(\n (cb: () => void) =>\n shell.onStateChange((snapshot) => {\n cacheRef.current = { shell, snapshot };\n cb();\n }),\n [shell],\n );\n\n const getSnapshot = useCallback((): StateSnapshot => {\n const cached = cacheRef.current;\n if (cached === undefined || cached.shell !== shell) {\n const snapshot = shell.getState();\n cacheRef.current = { shell, snapshot };\n return snapshot;\n }\n return cached.snapshot;\n }, [shell]);\n\n // The third argument is what a SERVER reads. The shell exists there too, with\n // a real state, so it is the same read — and without it React refuses to draw\n // this to markup at all (\"Missing getServerSnapshot\").\n return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n};\n","import { useCallback, useRef, useSyncExternalStore } from 'react';\nimport type { CanvasState, Shell } from '@shell';\nimport { useShell } from './use-shell';\n\ntype Cache = {\n shell: Shell;\n canvasId: string;\n state: CanvasState;\n};\n\nexport const useCanvas = (canvasId: string): CanvasState => {\n const shell = useShell();\n const cacheRef = useRef<Cache | undefined>(undefined);\n\n // The shell owns canvas-change equality — onCanvasChange only fires on\n // meaningful change, so no comparator lives here.\n const subscribe = useCallback(\n (cb: () => void) =>\n shell.onCanvasChange(canvasId, (next) => {\n cacheRef.current = { shell, canvasId, state: next };\n cb();\n }),\n [shell, canvasId],\n );\n\n const getSnapshot = useCallback((): CanvasState => {\n const cached = cacheRef.current;\n if (cached !== undefined && cached.shell === shell && cached.canvasId === canvasId) {\n return cached.state;\n }\n const state = shell.getCanvasState(canvasId);\n cacheRef.current = { shell, canvasId, state };\n return state;\n }, [shell, canvasId]);\n\n // The third argument is what a SERVER reads. The shell exists there too, with\n // a real state, so it is the same read — and without it React refuses to draw\n // this to markup at all (\"Missing getServerSnapshot\").\n return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n};\n","import { useCallback, useRef, useSyncExternalStore } from 'react';\nimport { useShell } from './use-shell';\n\ntype DataSnapshot = Record<string, unknown> | undefined;\n\nexport const useActionData = (instanceId: string): DataSnapshot => {\n const shell = useShell();\n const cacheRef = useRef<DataSnapshot>(undefined);\n\n const subscribe = useCallback(\n (cb: () => void) => {\n const runtime = shell.getRuntime(instanceId);\n if (runtime === undefined) return () => {};\n return runtime.onDataChange((next) => {\n cacheRef.current = next;\n cb();\n });\n },\n [shell, instanceId],\n );\n\n const getSnapshot = useCallback((): DataSnapshot => {\n const runtime = shell.getRuntime(instanceId);\n if (runtime === undefined) {\n cacheRef.current = undefined;\n return undefined;\n }\n const current = runtime.getData();\n if (cacheRef.current !== current) cacheRef.current = current;\n return cacheRef.current;\n }, [shell, instanceId]);\n\n // The third argument is what a SERVER reads. The shell exists there too, with\n // a real state, so it is the same read — and without it React refuses to draw\n // this to markup at all (\"Missing getServerSnapshot\").\n return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n};\n","import { useCallback, useRef, useSyncExternalStore } from 'react';\nimport type { ActionStatus } from '@action';\nimport { useShell } from './use-shell';\n\nexport const useActionStatus = (instanceId: string): ActionStatus | undefined => {\n const shell = useShell();\n const cacheRef = useRef<ActionStatus | undefined>(undefined);\n\n const subscribe = useCallback(\n (cb: () => void) => {\n const runtime = shell.getRuntime(instanceId);\n if (runtime === undefined) return () => {};\n return runtime.onStatusChange((next) => {\n cacheRef.current = next;\n cb();\n });\n },\n [shell, instanceId],\n );\n\n const getSnapshot = useCallback((): ActionStatus | undefined => {\n const runtime = shell.getRuntime(instanceId);\n if (runtime === undefined) {\n cacheRef.current = undefined;\n return undefined;\n }\n const current = runtime.instance.status;\n if (cacheRef.current !== current) cacheRef.current = current;\n return cacheRef.current;\n }, [shell, instanceId]);\n\n // The third argument is what a SERVER reads. The shell exists there too, with\n // a real state, so it is the same read — and without it React refuses to draw\n // this to markup at all (\"Missing getServerSnapshot\").\n return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n};\n","import { useCallback, useRef, useSyncExternalStore } from 'react';\nimport type { RenderNode } from '@layout';\nimport type { Phrasebook } from '../../../i18n/phrases';\nimport { useShell } from './use-shell';\n\ntype Cache = {\n data: Record<string, unknown> | undefined;\n // WHAT ELSE A TREE DEPENDS ON. Data is not the only input to a render: the\n // renderer also reads the shell's book, and `setPhrases` changes it without\n // touching a single instance's data. Cached on data alone, an instance that\n // was already mounted when the language changed would go on showing the old\n // words until something unrelated happened to it — which is precisely the\n // failure `setPhrases` exists to prevent.\n phrases: Phrasebook | undefined;\n tree: RenderNode[];\n};\n\nconst EMPTY: RenderNode[] = [];\n\nexport const useRenderTree = (instanceId: string): RenderNode[] => {\n const shell = useShell();\n const cacheRef = useRef<Cache | undefined>(undefined);\n\n const subscribe = useCallback(\n (cb: () => void) => {\n // Two sources, because a tree has two inputs. Data changes come from the\n // runtime; a language change is shell-wide and arrives as a state change,\n // the same signal the canvas and shell trees already listen to.\n const offState = shell.onStateChange(() => cb());\n const runtime = shell.getRuntime(instanceId);\n if (runtime === undefined) return offState;\n const offData = runtime.onDataChange(() => cb());\n return (): void => {\n offData();\n offState();\n };\n },\n [shell, instanceId],\n );\n\n const getSnapshot = useCallback((): RenderNode[] => {\n const runtime = shell.getRuntime(instanceId);\n if (runtime === undefined) {\n cacheRef.current = undefined;\n return EMPTY;\n }\n const data = runtime.getData();\n const phrases = shell.getPhrases();\n const cached = cacheRef.current;\n if (cached !== undefined && cached.data === data && cached.phrases === phrases) return cached.tree;\n const tree = runtime.render();\n cacheRef.current = { data, phrases, tree };\n return tree;\n }, [shell, instanceId]);\n\n // The third argument is what a SERVER reads. The shell exists there too, with\n // a real state, so it is the same read — and without it React refuses to draw\n // this to markup at all (\"Missing getServerSnapshot\").\n return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n};\n","import { useContext } from 'react';\nimport { NovaRenderContext } from '../context';\nimport type { NovaDispatch } from '../types';\n\nexport const useNovaDispatch = (): NovaDispatch => {\n const ctx = useContext(NovaRenderContext);\n if (ctx === undefined) {\n throw new Error('useNovaDispatch must be used inside <NovaRenderProvider>');\n }\n return ctx.dispatch;\n};\n","import { useContext } from 'react';\nimport { NovaRenderContext } from '../context';\nimport type { NovaPublish } from '../types';\n\nexport const useNovaPublish = (): NovaPublish => {\n const ctx = useContext(NovaRenderContext);\n if (ctx === undefined) {\n throw new Error('useNovaPublish must be used inside <NovaRenderProvider>');\n }\n return ctx.publish;\n};\n","import { useContext } from 'react';\nimport type { ComponentRegistry } from '@layout';\nimport { NovaRenderContext } from '../context';\nimport type { NovaComponent } from '../types';\n\n// Returns the component registry exposed via <NovaRenderProvider>.\n// Useful for components that need to introspect or look up other\n// registered components (for agent tooling, dev inspectors, etc).\nexport const useNovaRegistry = (): ComponentRegistry<NovaComponent> => {\n const ctx = useContext(NovaRenderContext);\n if (ctx === undefined) {\n throw new Error('useNovaRegistry must be used inside <NovaRenderProvider>');\n }\n return ctx.registry;\n};\n","import { useContext } from 'react';\nimport { NovaRenderContext, type SlotWrapper } from '../context';\n\n// Reads the optional app-supplied slotWrapper from render context. Returns\n// undefined when none was provided (or when called outside a provider) — the\n// caller then renders content directly (passthrough). Unlike the dispatch/\n// publish hooks this never throws: a missing slotWrapper is the common case.\nexport const useSlotWrapper = (): SlotWrapper | undefined =>\n useContext(NovaRenderContext)?.slotWrapper;\n","import { useEffect, useRef, useState, type ChangeEvent, type CSSProperties } from 'react';\nimport { InputPropsSchema, type InputProps } from '../../primitive-props';\nimport { useNovaDispatch, type NovaComponent, type NovaComponentProps } from '@react';\n\n// ═══════════════════════════════════════════════════════════\n// Input — text input bound to model\n//\n// Number inputs still dispatch a string payload; mutation ops\n// handle parsing on the action side.\n//\n// Two remote round-trip obligations (ADAPTER.md §6), because the shell may be\n// authoritative over a socket:\n// - it holds local editing state while focused, so an async tree echo can't\n// clobber the value the user is mid-typing;\n// - it honours the layout's `debounce` prop, coalescing keystrokes before\n// they hit the wire. A local shell echoes synchronously and neither matters,\n// but a remote one drops keystrokes without them.\n// ═══════════════════════════════════════════════════════════\n\nexport { InputPropsSchema, type InputProps };\n\nconst computeStyle = (isDisabled: boolean, isFocused: boolean, isHovered: boolean): CSSProperties => {\n const borderColor = isDisabled\n ? '#d1d5db'\n : isFocused\n ? '#2563eb'\n : isHovered\n ? '#9ca3af'\n : '#d1d5db';\n return {\n padding: '8px 12px',\n border: `1px solid ${borderColor}`,\n borderRadius: 6,\n fontSize: 14,\n background: isDisabled ? '#f9fafb' : '#ffffff',\n color: isDisabled ? '#9ca3af' : 'inherit',\n cursor: isDisabled ? 'not-allowed' : 'text',\n minWidth: 240,\n outline: 'none',\n boxShadow: isFocused ? '0 0 0 3px rgba(37, 99, 235, 0.15)' : 'none',\n transition: 'border-color 150ms, box-shadow 150ms',\n };\n};\n\nexport const Input: NovaComponent<InputProps> = ({\n type,\n placeholder,\n disabled,\n value,\n debounce,\n novaModel,\n}: NovaComponentProps & InputProps) => {\n const dispatch = useNovaDispatch();\n const [isHovered, setIsHovered] = useState(false);\n // `draft` is the local editing value; `null` means \"not editing — the\n // server value is authoritative\". While editing (focused) the draft wins,\n // so an async tree echo arriving mid-type never resets what the user typed.\n const [draft, setDraft] = useState<string | null>(null);\n const isFocused = draft !== null;\n const shown = draft ?? value ?? '';\n const isDisabled = disabled ?? false;\n const debounceMs = debounce ?? 0;\n\n // A single pending debounced dispatch — cancelled on the next keystroke,\n // flushed on blur, dropped on unmount (a keystroke against a screen that has\n // gone is worse than a lost one — the same reasoning as the socket's).\n const timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n const clearPending = (): void => {\n if (timer.current !== undefined) {\n clearTimeout(timer.current);\n timer.current = undefined;\n }\n };\n useEffect(() => clearPending, []);\n\n const fire = (next: string): void => {\n if (novaModel === undefined) return;\n dispatch({ type: 'ui:model', ref: novaModel.ref, payload: next });\n };\n\n const onChange = (event: ChangeEvent<HTMLInputElement>): void => {\n const next = event.target.value;\n setDraft(next);\n if (debounceMs > 0) {\n clearPending();\n timer.current = setTimeout(() => {\n timer.current = undefined;\n fire(next);\n }, debounceMs);\n } else {\n fire(next);\n }\n };\n\n const onFocus = (): void => setDraft(value ?? '');\n const onBlur = (): void => {\n // Flush any pending keystroke now, then hand authority back to the server.\n if (timer.current !== undefined && draft !== null) {\n clearPending();\n fire(draft);\n }\n setDraft(null);\n };\n\n return (\n <input\n type={type ?? 'text'}\n placeholder={placeholder}\n disabled={isDisabled}\n value={shown}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n style={computeStyle(isDisabled, isFocused, isHovered)}\n />\n );\n};\n\nInput.meta = {\n description: 'Text input bound to data via the `model` field on the layout node.',\n propsSchema: InputPropsSchema,\n};\n","import { useState, type CSSProperties, type MouseEvent } from 'react';\nimport { ButtonPropsSchema, type ButtonProps } from '../../primitive-props';\nimport { useNovaDispatch, type NovaComponent, type NovaComponentProps } from '@react';\n\n// ═══════════════════════════════════════════════════════════\n// Button — clickable element\n//\n// Click events fire as `ui:click` carrying the layout node's\n// `ref` (injected as `novaRef`). Without a ref, clicks are no-ops.\n// ═══════════════════════════════════════════════════════════\n\nexport { ButtonPropsSchema, type ButtonProps };\n\ntype Variant = 'primary' | 'secondary' | 'ghost';\n\nconst BASE_STYLE: CSSProperties = {\n borderRadius: 6,\n fontSize: 14,\n fontWeight: 500,\n transition: 'background-color 100ms',\n};\n\nconst primaryStyle = (isDisabled: boolean, isHovered: boolean, isActive: boolean): CSSProperties => ({\n ...BASE_STYLE,\n padding: '8px 16px',\n border: 'none',\n color: '#ffffff',\n cursor: isDisabled ? 'not-allowed' : 'pointer',\n background: isDisabled\n ? '#93c5fd'\n : isActive\n ? '#1e40af'\n : isHovered\n ? '#1d4ed8'\n : '#2563eb',\n});\n\nconst secondaryStyle = (isDisabled: boolean, isHovered: boolean, isActive: boolean): CSSProperties => ({\n ...BASE_STYLE,\n padding: '8px 16px',\n border: `1px solid ${isDisabled ? '#e5e7eb' : isHovered ? '#9ca3af' : '#d1d5db'}`,\n color: isDisabled ? '#9ca3af' : '#1f2937',\n cursor: isDisabled ? 'not-allowed' : 'pointer',\n background: isDisabled\n ? '#ffffff'\n : isActive\n ? '#e5e7eb'\n : isHovered\n ? '#f3f4f6'\n : '#ffffff',\n});\n\nconst ghostStyle = (isDisabled: boolean, isHovered: boolean, isActive: boolean): CSSProperties => ({\n ...BASE_STYLE,\n padding: '8px 12px',\n border: 'none',\n color: isDisabled ? '#93c5fd' : '#2563eb',\n cursor: isDisabled ? 'not-allowed' : 'pointer',\n background: isDisabled\n ? 'transparent'\n : isActive\n ? '#dbeafe'\n : isHovered\n ? '#eff6ff'\n : 'transparent',\n});\n\nconst styleFor = (\n variant: Variant,\n isDisabled: boolean,\n isHovered: boolean,\n isActive: boolean,\n): CSSProperties => {\n if (variant === 'primary') return primaryStyle(isDisabled, isHovered, isActive);\n if (variant === 'secondary') return secondaryStyle(isDisabled, isHovered, isActive);\n return ghostStyle(isDisabled, isHovered, isActive);\n};\n\nexport const Button: NovaComponent<ButtonProps> = ({\n label,\n variant,\n disabled,\n novaRef,\n children,\n}: NovaComponentProps & ButtonProps) => {\n const dispatch = useNovaDispatch();\n const [isHovered, setIsHovered] = useState(false);\n const [isActive, setIsActive] = useState(false);\n const isDisabled = disabled ?? false;\n const style = styleFor(variant ?? 'primary', isDisabled, isHovered, isActive);\n const onClick = (_event: MouseEvent<HTMLButtonElement>): void => {\n if (isDisabled) return;\n if (novaRef === undefined) return;\n dispatch({ type: 'ui:click', ref: novaRef });\n };\n return (\n <button\n type=\"button\"\n disabled={isDisabled}\n style={style}\n onClick={onClick}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => {\n setIsHovered(false);\n setIsActive(false);\n }}\n onMouseDown={() => setIsActive(true)}\n onMouseUp={() => setIsActive(false)}\n >\n {label ?? children}\n </button>\n );\n};\n\nButton.meta = {\n description: \"Clickable button. Click events fire as `ui:click` with the layout node's ref.\",\n propsSchema: ButtonPropsSchema,\n};\n","import type { CSSProperties } from 'react';\nimport { BoxPropsSchema, type BoxProps } from '../../primitive-props';\nimport type { NovaComponent, NovaComponentProps } from '@react';\n\n// ═══════════════════════════════════════════════════════════\n// Box — generic styled container\n// ═══════════════════════════════════════════════════════════\n\nexport { BoxPropsSchema, type BoxProps };\n\nexport const Box: NovaComponent<BoxProps> = ({\n padding,\n background,\n border,\n radius,\n children,\n}: NovaComponentProps & BoxProps) => {\n const style: CSSProperties = {\n padding: padding ?? 0,\n background: background ?? 'transparent',\n border: border === true ? '1px solid #e5e7eb' : 'none',\n borderRadius: radius ?? 0,\n };\n return <div style={style}>{children}</div>;\n};\n\nBox.meta = {\n description: 'Generic container with basic styling props. Use Stack for layout, Box for visual wrapping.',\n propsSchema: BoxPropsSchema,\n};\n","import { PanelPropsSchema, type PanelProps } from '../../primitive-props';\nimport { useNovaDispatch } from '@react';\nimport type { NovaComponent, NovaComponentProps } from '@react';\n\n// ═══════════════════════════════════════════════════════════\n// Panel — a framed, elevated surface with an optional title header. The\n// generic version of a dashboard/devtools panel; used by nova/devtools.\n// `closeRef` grows a header ✕ firing ui:click with that ref (the same\n// prop-ref convention as Table's rowRef).\n// ═══════════════════════════════════════════════════════════\n\nexport { PanelPropsSchema, type PanelProps };\n\nexport const Panel: NovaComponent<PanelProps> = ({ title, backRef, closeRef, children }: NovaComponentProps & PanelProps) => {\n const dispatch = useNovaDispatch();\n return (\n <div style={{ border: '1px solid #d8dae0', borderRadius: 10, background: '#fff', boxShadow: '0 1px 3px rgba(0,0,0,.06)', padding: 12 }}>\n {title !== undefined && (\n <div style={{ display: 'flex', alignItems: 'center', gap: 6, fontWeight: 600, fontSize: 13, marginBottom: 8 }}>\n {backRef !== undefined && (\n <button\n type=\"button\"\n style={{ border: 'none', background: 'none', color: '#6b7280', cursor: 'pointer', fontSize: 13, lineHeight: 1, padding: 2 }}\n onClick={() => dispatch({ type: 'ui:click', ref: backRef })}\n >\n ←\n </button>\n )}\n <span style={{ flex: 1 }}>{title}</span>\n {closeRef !== undefined && (\n <button\n type=\"button\"\n style={{ border: 'none', background: 'none', color: '#6b7280', cursor: 'pointer', fontSize: 13, lineHeight: 1, padding: 2 }}\n onClick={() => dispatch({ type: 'ui:click', ref: closeRef })}\n >\n ✕\n </button>\n )}\n </div>\n )}\n {children}\n </div>\n );\n};\n\nPanel.meta = { description: 'A framed, elevated surface with an optional title; `closeRef` adds a header ✕.', propsSchema: PanelPropsSchema };\n","import type { FC } from 'react';\nimport { JsonTreePropsSchema, type JsonTreeProps } from '../../primitive-props';\nimport type { NovaComponent, NovaComponentProps } from '@react';\n\n// ═══════════════════════════════════════════════════════════\n// JsonTree — a collapsible view of any JSON value, via native <details> (no\n// state). The value arrives already resolved in props. Used by nova/devtools\n// to show data / endpoint configs / audit detail; useful anywhere.\n// ═══════════════════════════════════════════════════════════\n\nconst entriesOf = (value: object): Array<[string, unknown]> =>\n Array.isArray(value) ? value.map((item, index): [string, unknown] => [String(index), item]) : Object.entries(value);\n\nconst JsonNode: FC<{ value: unknown; name?: string }> = ({ value, name }) => {\n if (value !== null && typeof value === 'object') {\n const entries = entriesOf(value);\n const shape = Array.isArray(value) ? `[${entries.length}]` : `{${entries.length}}`;\n return (\n <details>\n <summary style={{ cursor: 'pointer', color: '#6b7280' }}>{name === undefined ? shape : `${name} ${shape}`}</summary>\n <div style={{ paddingLeft: 13, borderLeft: '1px solid #d8dae0', marginLeft: 3 }}>\n {entries.map(([key, child]) => (\n <JsonNode key={key} value={child} name={key} />\n ))}\n </div>\n </details>\n );\n }\n const text = name === undefined ? JSON.stringify(value) : `${name}: ${JSON.stringify(value)}`;\n return <div style={{ whiteSpace: 'pre-wrap', wordBreak: 'break-word' }}>{text}</div>;\n};\n\nexport { JsonTreePropsSchema, type JsonTreeProps };\n\nexport const JsonTree: NovaComponent<JsonTreeProps> = ({ value, label }: NovaComponentProps & JsonTreeProps) => (\n <div style={{ fontFamily: 'ui-monospace, SFMono-Regular, Menlo, monospace', fontSize: 12, lineHeight: 1.5 }}>\n <JsonNode value={value} name={label} />\n </div>\n);\n\nJsonTree.meta = { description: 'A collapsible view of any JSON value.', propsSchema: JsonTreePropsSchema };\n","import { CanvasSlotPropsSchema, type CanvasSlotProps } from '../../primitive-props';\nimport { RenderTree, useCanvasRenderTree } from '@react';\nimport type { NovaComponent, NovaComponentProps } from '@react';\n\n// ═══════════════════════════════════════════════════════════\n// CanvasSlot — structural component that renders a canvas's\n// actionLayout inside a shell's canvasLayout. Used as a leaf in\n// the shell-tier layout tree.\n// ═══════════════════════════════════════════════════════════\n\nexport { CanvasSlotPropsSchema, type CanvasSlotProps };\n\nexport const CanvasSlot: NovaComponent<CanvasSlotProps> = ({\n canvasId,\n}: NovaComponentProps & CanvasSlotProps) => {\n const tree = useCanvasRenderTree(canvasId);\n if (canvasId === undefined || canvasId === '') return null;\n return <RenderTree nodes={tree} />;\n};\n\nCanvasSlot.meta = {\n description: 'Renders a canvas by id, recursing into its actionLayout.',\n propsSchema: CanvasSlotPropsSchema,\n};\n","import { useContext, useMemo } from 'react';\nimport { ActionSlotPropsSchema, type ActionSlotProps } from '../../primitive-props';\nimport { scopeDispatch } from '@shared/event-bus';\nimport { RenderTree, useRenderTree, useShell, useSlotWrapper } from '@react';\nimport type { NovaComponent, NovaComponentProps, NovaRenderContextValue } from '@react';\nimport { NovaRenderContext } from '@react/context';\n\n// ═══════════════════════════════════════════════════════════\n// ActionSlot — structural component that renders a single action\n// instance inside a canvas's actionLayout. Resolves to nothing\n// when instanceId is missing (e.g. the canvas has no active).\n//\n// This is the one seam where an instance's content mounts/unmounts,\n// so it's where an app-supplied `slotWrapper` (if any) wraps the\n// content — for animation, gating, logging, etc. Nova owns none of\n// that; it just hands the wrapper identity and the rendered tree.\n// ═══════════════════════════════════════════════════════════\n\n// The authoring contract (instanceId only, strict) lives in ../../primitive-props.\nexport { ActionSlotPropsSchema, type ActionSlotProps };\n\nexport const ActionSlot: NovaComponent<ActionSlotProps> = ({\n instanceId,\n}: NovaComponentProps & ActionSlotProps) => {\n const tree = useRenderTree(instanceId ?? '');\n const slotWrapper = useSlotWrapper();\n const shell = useShell();\n const hasInstance = instanceId !== undefined && instanceId !== '';\n\n // Scope dispatch to THIS instance so the runtime delivers UI events from\n // its rendered subtree to this instance's own triggers only. The stamping\n // rule itself is core semantics — see scopeDispatch.\n const ctx = useContext(NovaRenderContext);\n const scoped = useMemo<NovaRenderContextValue | undefined>(() => {\n if (ctx === undefined || instanceId === undefined || instanceId === '') return ctx;\n return { ...ctx, dispatch: scopeDispatch(ctx.dispatch, instanceId) };\n }, [ctx, instanceId]);\n\n // No app-supplied wrapper → original behavior, plus the scoped dispatch.\n if (slotWrapper === undefined) {\n if (!hasInstance) return null;\n return (\n <NovaRenderContext.Provider value={scoped}>\n <RenderTree nodes={tree} />\n </NovaRenderContext.Provider>\n );\n }\n\n // With a wrapper, render it PERSISTENTLY (content or null) so a\n // presence-managing wrapper can animate an instance leaving. Identity\n // (canvasId / the ActionDefinition) resolves from the live runtime when one\n // is present; it is undefined while the slot is empty or exiting.\n const runtime = hasInstance ? shell.getRuntime(instanceId) : undefined;\n const Wrapper = slotWrapper;\n return (\n <Wrapper\n canvasId={runtime?.instance.canvasId}\n instanceId={hasInstance ? instanceId : undefined}\n action={runtime?.definition}\n >\n {hasInstance && tree.length ? (\n <NovaRenderContext.Provider value={scoped}>\n <RenderTree nodes={tree} />\n </NovaRenderContext.Provider>\n ) : null}\n </Wrapper>\n );\n};\n\nActionSlot.meta = {\n description: 'Renders an action instance by id. Used inside a canvas actionLayout.',\n propsSchema: ActionSlotPropsSchema,\n};\n","// ═══════════════════════════════════════════════════════════\n// @niscorp/nova/adapters/react/components\n//\n// Headless React component set for Nova layouts. All five\n// components carry static `.meta` (description + Zod props\n// schema). The `registerNovaReactComponents` helper batches\n// them into a registry via `registerAll`.\n// ═══════════════════════════════════════════════════════════\n\nimport type { ComponentRegistry } from '@layout';\nimport type { NovaComponent } from '@react';\nimport { Stack } from './stack';\nimport { Text } from './text';\nimport { Input } from './input';\nimport { Button } from './button';\nimport { Box } from './box';\nimport { Panel } from './panel';\nimport { JsonTree } from './json-tree';\nimport { CanvasSlot } from './canvas-slot';\nimport { ActionSlot } from './action-slot';\n\n// ─── Stack ─────────────────────────────────────────────────\nexport { Stack, StackPropsSchema, type StackProps } from './stack';\n\n// ─── Text ──────────────────────────────────────────────────\nexport { Text, TextPropsSchema, type TextProps } from './text';\n\n// ─── Input ─────────────────────────────────────────────────\nexport { Input, InputPropsSchema, type InputProps } from './input';\n\n// ─── Button ────────────────────────────────────────────────\nexport { Button, ButtonPropsSchema, type ButtonProps } from './button';\n\n// ─── Box ───────────────────────────────────────────────────\nexport { Box, BoxPropsSchema, type BoxProps } from './box';\n\n// ─── Introspection primitives (used by nova/devtools) ──────\nexport { Panel, PanelPropsSchema, type PanelProps } from './panel';\nexport { JsonTree, JsonTreePropsSchema, type JsonTreeProps } from './json-tree';\n\n// ─── Shell slots (react) ───────────────────────────────────\n// CanvasSlot / ActionSlot are shell-aware: they pull state from\n// the React shell context and must only be used inside a\n// <NovaShellProvider>. Non-React adapters register their own\n// equivalents implementing the same prop contract.\nexport { CanvasSlot, CanvasSlotPropsSchema, type CanvasSlotProps } from './canvas-slot';\nexport { ActionSlot, ActionSlotPropsSchema, type ActionSlotProps } from './action-slot';\n\n// ─── Bulk registration helper ──────────────────────────────\nexport const registerNovaReactComponents = (\n registry: ComponentRegistry<NovaComponent>,\n): void => {\n registry.registerAll({\n Stack,\n Text,\n Input,\n Button,\n Box,\n Panel,\n JsonTree,\n CanvasSlot,\n ActionSlot,\n });\n};\n"]}
|