@niscorp/nova 0.1.4 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/ADAPTER.md +6 -6
  2. package/CHANGELOG.md +30 -0
  3. package/README.md +46 -21
  4. package/dist/adapters/dom/components/index.d.cts +2 -2
  5. package/dist/adapters/dom/components/index.d.ts +2 -2
  6. package/dist/adapters/dom/index.cjs +163 -34
  7. package/dist/adapters/dom/index.cjs.map +1 -1
  8. package/dist/adapters/dom/index.d.cts +2 -2
  9. package/dist/adapters/dom/index.d.ts +2 -2
  10. package/dist/adapters/dom/index.js +6 -6
  11. package/dist/adapters/dom/server.cjs +0 -2
  12. package/dist/adapters/dom/server.cjs.map +1 -1
  13. package/dist/adapters/dom/server.d.cts +2 -2
  14. package/dist/adapters/dom/server.d.ts +2 -2
  15. package/dist/adapters/dom/server.js +6 -6
  16. package/dist/adapters/react/components/index.cjs +6 -8
  17. package/dist/adapters/react/components/index.cjs.map +1 -1
  18. package/dist/adapters/react/components/index.d.cts +4 -4
  19. package/dist/adapters/react/components/index.d.ts +4 -4
  20. package/dist/adapters/react/components/index.js +7 -7
  21. package/dist/adapters/react/index.cjs +181 -51
  22. package/dist/adapters/react/index.cjs.map +1 -1
  23. package/dist/adapters/react/index.d.cts +4 -4
  24. package/dist/adapters/react/index.d.ts +4 -4
  25. package/dist/adapters/react/index.js +7 -7
  26. package/dist/adapters/tty/components/index.d.cts +2 -2
  27. package/dist/adapters/tty/components/index.d.ts +2 -2
  28. package/dist/adapters/tty/index.cjs +0 -2
  29. package/dist/adapters/tty/index.cjs.map +1 -1
  30. package/dist/adapters/tty/index.d.cts +2 -2
  31. package/dist/adapters/tty/index.d.ts +2 -2
  32. package/dist/adapters/tty/index.js +4 -4
  33. package/dist/adapters/tty/index.js.map +1 -1
  34. package/dist/adapters/vue/components/index.cjs +4 -6
  35. package/dist/adapters/vue/components/index.cjs.map +1 -1
  36. package/dist/adapters/vue/components/index.d.cts +9 -9
  37. package/dist/adapters/vue/components/index.d.ts +9 -9
  38. package/dist/adapters/vue/components/index.js +7 -7
  39. package/dist/adapters/vue/index.cjs +175 -46
  40. package/dist/adapters/vue/index.cjs.map +1 -1
  41. package/dist/adapters/vue/index.d.cts +4 -4
  42. package/dist/adapters/vue/index.d.ts +4 -4
  43. package/dist/adapters/vue/index.js +9 -9
  44. package/dist/adapters/vue/index.js.map +1 -1
  45. package/dist/agent/index.d.cts +2 -2
  46. package/dist/agent/index.d.ts +2 -2
  47. package/dist/{chunk-7PKS7UYL.js → chunk-3JRTELLC.js} +3 -3
  48. package/dist/{chunk-7PKS7UYL.js.map → chunk-3JRTELLC.js.map} +1 -1
  49. package/dist/{chunk-4I2PFMY7.js → chunk-MHW5VEIM.js} +8 -8
  50. package/dist/chunk-MHW5VEIM.js.map +1 -0
  51. package/dist/chunk-OE4E6IBD.js +25 -0
  52. package/dist/chunk-OE4E6IBD.js.map +1 -0
  53. package/dist/{chunk-KYQ4EAQH.js → chunk-QXQCPH33.js} +17 -17
  54. package/dist/chunk-QXQCPH33.js.map +1 -0
  55. package/dist/chunk-RFBIGRCI.js +127 -0
  56. package/dist/chunk-RFBIGRCI.js.map +1 -0
  57. package/dist/{chunk-WZVQ5PUB.js → chunk-RYIIIXDX.js} +4 -4
  58. package/dist/{chunk-WZVQ5PUB.js.map → chunk-RYIIIXDX.js.map} +1 -1
  59. package/dist/{chunk-4ERQYDF6.js → chunk-UDCXGDLQ.js} +10 -10
  60. package/dist/chunk-UDCXGDLQ.js.map +1 -0
  61. package/dist/chunk-V4BPFFFV.js +152 -0
  62. package/dist/chunk-V4BPFFFV.js.map +1 -0
  63. package/dist/{chunk-UUYXVOK2.js → chunk-VU6NNCEJ.js} +16 -16
  64. package/dist/chunk-VU6NNCEJ.js.map +1 -0
  65. package/dist/{chunk-RXECI7DE.js → chunk-Y6XVPRYH.js} +33 -17
  66. package/dist/chunk-Y6XVPRYH.js.map +1 -0
  67. package/dist/devtools/index.d.cts +2 -2
  68. package/dist/devtools/index.d.ts +2 -2
  69. package/dist/devtools/index.js +3 -3
  70. package/dist/document/index.cjs +228 -119
  71. package/dist/document/index.cjs.map +1 -1
  72. package/dist/document/index.d.cts +10 -8
  73. package/dist/document/index.d.ts +10 -8
  74. package/dist/document/index.js +3 -122
  75. package/dist/document/index.js.map +1 -1
  76. package/dist/head-CAzfTnpV.d.cts +25 -0
  77. package/dist/head-DRpbbj-l.d.ts +25 -0
  78. package/dist/i18n/index.d.cts +2 -2
  79. package/dist/i18n/index.d.ts +2 -2
  80. package/dist/index.cjs +151 -41
  81. package/dist/index.cjs.map +1 -1
  82. package/dist/index.d.cts +19 -31
  83. package/dist/index.d.ts +19 -31
  84. package/dist/index.js +4 -4
  85. package/dist/{palette-Mx7XHYC6.d.ts → palette-CIpPH90W.d.ts} +1 -1
  86. package/dist/{palette-wbJB_svk.d.cts → palette-CvwZZCkx.d.cts} +1 -1
  87. package/dist/reflect/index.d.cts +2 -2
  88. package/dist/reflect/index.d.ts +2 -2
  89. package/dist/reflect/index.js +3 -3
  90. package/dist/{types-B-rjaUX0.d.ts → types-BSKx5MXW.d.ts} +1 -1
  91. package/dist/{types-B_nOtkyt.d.ts → types-BWc-olbY.d.ts} +1 -1
  92. package/dist/{types-mRKXqZPX.d.cts → types-C9734_lJ.d.cts} +1 -1
  93. package/dist/{types-BB9RXel5.d.ts → types-D23TRvqe.d.ts} +1 -1
  94. package/dist/{types-uk19d6KC.d.cts → types-DsWNYc7R.d.cts} +1 -1
  95. package/dist/{types-BLVRduoz.d.cts → types-j290XhCn.d.cts} +1 -1
  96. package/dist/{types-PDXOkvtK.d.cts → types-qkzTfSye.d.cts} +1 -1
  97. package/dist/{types-DE77Jl2W.d.ts → types-qnKMx0_V.d.ts} +1 -1
  98. package/package.json +3 -3
  99. package/dist/chunk-4ERQYDF6.js.map +0 -1
  100. package/dist/chunk-4I2PFMY7.js.map +0 -1
  101. package/dist/chunk-EHHJJLRX.js +0 -16
  102. package/dist/chunk-EHHJJLRX.js.map +0 -1
  103. package/dist/chunk-KYQ4EAQH.js.map +0 -1
  104. package/dist/chunk-RXECI7DE.js.map +0 -1
  105. package/dist/chunk-UUYXVOK2.js.map +0 -1
  106. package/dist/chunk-UV5YGBHQ.js +0 -62
  107. package/dist/chunk-UV5YGBHQ.js.map +0 -1
  108. package/dist/chunk-X7SSNSQC.js +0 -6
  109. package/dist/chunk-X7SSNSQC.js.map +0 -1
  110. package/dist/head-BNj8GwPO.d.cts +0 -20
  111. package/dist/head-CS6X6ZKr.d.ts +0 -20
  112. package/dist/{primitive-props-Cl5jiC8g.d.cts → primitive-props-CGoJvmcH.d.cts} +5 -5
  113. package/dist/{primitive-props-Cl5jiC8g.d.ts → primitive-props-CGoJvmcH.d.ts} +5 -5
@@ -1,6 +1,6 @@
1
- import { createTitleKeeper } from './chunk-EHHJJLRX.js';
2
- import { shellView } from './chunk-WZVQ5PUB.js';
3
- import { headOf } from './chunk-UV5YGBHQ.js';
1
+ import { createHeadKeeper } from './chunk-V4BPFFFV.js';
2
+ import { shellView } from './chunk-RYIIIXDX.js';
3
+ import { headOf } from './chunk-RFBIGRCI.js';
4
4
  import { z } from 'zod';
5
5
 
6
6
  var StackPropsSchema = z.object({
@@ -51,8 +51,8 @@ var ActionSlotPropsSchema = z.object({
51
51
  instanceId: z.string().optional().describe('Id of the action instance to render. Usually bound from canvas scope, e.g. "$.active.id" or "$.i.id".')
52
52
  }).strict().describe("Renders an action instance by id. Resolves to nothing when instanceId is missing.");
53
53
 
54
- // src/document/shell-title.ts
55
- var createShellTitle = (shell) => {
54
+ // src/document/shell-head.ts
55
+ var createShellHead = (shell) => {
56
56
  const view = shellView(shell);
57
57
  let present = 0;
58
58
  let keep;
@@ -62,8 +62,8 @@ var createShellTitle = (shell) => {
62
62
  queued = true;
63
63
  queueMicrotask(() => {
64
64
  queued = false;
65
- keep ??= createTitleKeeper(document);
66
- keep(present > 0 ? headOf(view.api)?.head : void 0);
65
+ keep ??= createHeadKeeper(document);
66
+ keep(present > 0 ? headOf(view.api)?.elements : void 0);
67
67
  });
68
68
  };
69
69
  return {
@@ -81,6 +81,6 @@ var createShellTitle = (shell) => {
81
81
  };
82
82
  };
83
83
 
84
- export { ActionSlotPropsSchema, BoxPropsSchema, ButtonPropsSchema, CanvasSlotPropsSchema, InputPropsSchema, JsonTreePropsSchema, PanelPropsSchema, StackPropsSchema, TextPropsSchema, createShellTitle };
85
- //# sourceMappingURL=chunk-4ERQYDF6.js.map
86
- //# sourceMappingURL=chunk-4ERQYDF6.js.map
84
+ export { ActionSlotPropsSchema, BoxPropsSchema, ButtonPropsSchema, CanvasSlotPropsSchema, InputPropsSchema, JsonTreePropsSchema, PanelPropsSchema, StackPropsSchema, TextPropsSchema, createShellHead };
85
+ //# sourceMappingURL=chunk-UDCXGDLQ.js.map
86
+ //# sourceMappingURL=chunk-UDCXGDLQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/adapters/primitive-props.ts","../src/document/shell-head.ts"],"names":[],"mappings":";;;;;AAWO,IAAM,gBAAA,GAAmB,EAC7B,MAAA,CAAO;AAAA,EACN,SAAA,EAAW,CAAA,CACR,IAAA,CAAK,CAAC,KAAA,EAAO,QAAQ,CAAC,CAAA,CACtB,QAAA,EAAS,CACT,QAAA,CAAS,kCAAkC,CAAA;AAAA,EAC9C,GAAA,EAAK,CAAA,CACF,MAAA,EAAO,CACP,GAAA,EAAI,CACJ,GAAA,CAAI,CAAC,CAAA,CACL,QAAA,EAAS,CACT,QAAA,CAAS,6CAA6C,CAAA;AAAA,EACzD,KAAA,EAAO,CAAA,CACJ,IAAA,CAAK,CAAC,OAAA,EAAS,QAAA,EAAU,KAAA,EAAO,SAAS,CAAC,CAAA,CAC1C,QAAA,EAAS,CACT,SAAS,yCAAyC,CAAA;AAAA,EACrD,OAAA,EAAS,CAAA,CACN,IAAA,CAAK,CAAC,SAAS,QAAA,EAAU,KAAA,EAAO,SAAA,EAAW,QA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AAA,IAAU,OAAO,QAAA,KAAa,WAAA,EAAa;AAC/C,IAAA,MAAA,GAAS,IAAA;AACT,IAAA,cAAA,CAAe,MAAM;AACnB,MAAA,MAAA,GAAS,KAAA;AACT,MAAA,IAAA,KAAS,iBAAiB,QAAQ,CAAA;AAClC,MAAA,IAAA,CAAK,UAAU,CAAA,GAAI,MAAA,CAAO,KAAK,GAAG,CAAA,EAAG,WAAW,MAAS,CAAA;AAAA,IAC3D,CAAC,CAAA;AAAA,EACH,CAAA;AACA,EAAA,OAAO;AAAA,IACL,OAAO,MAAM;AACX,MAAA,OAAA,IAAW,CAAA;AACX,MAAA,IAAA,EAAK;AAAA,IACP,CAAA;AAAA,IACA,OAAO,MAAM;AACX,MAAA,OAAA,IAAW,CAAA;AACX,MAAA,IAAA,EAAK;AAAA,IACP,CAAA;AAAA,IACA,KAAA,EAAO,MACL,IAAA,CAAK,SAAA,CAAU,MAAM;AACnB,MAAA,IAAI,OAAA,GAAU,GAAG,IAAA,EAAK;AAAA,IACxB,CAAC;AAAA,GACL;AACF","file":"chunk-UDCXGDLQ.js","sourcesContent":["import { z } from 'zod';\n\n// ═══════════════════════════════════════════════════════════\n// The headless primitive vocabulary's AUTHORING contracts — one Zod props\n// schema per primitive, framework-free, shared by every adapter kit that ships\n// the vocabulary (react, vue). A schema is what a layout node may set; the\n// kits differ in how they paint, never in what they accept, so the schema\n// lives once, here, and each kit's component carries it as its static `meta`.\n// ═══════════════════════════════════════════════════════════\n\n// ─── Stack ───\nexport const StackPropsSchema = z\n .object({\n direction: z\n .enum(['row', 'column'])\n .optional()\n .describe('Flex direction. Default: column.'),\n gap: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe('Gap between children in pixels. Default: 0.'),\n align: z\n .enum(['start', 'center', 'end', 'stretch'])\n .optional()\n .describe('Cross-axis alignment. Default: stretch.'),\n justify: z\n .enum(['start', 'center', 'end', 'between', 'around'])\n .optional()\n .describe('Main-axis justification. Default: start.'),\n padding: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe('Inner padding in pixels. Default: 0.'),\n wrap: z\n .boolean()\n .optional()\n .describe('Whether children wrap to a new line. Default: false.'),\n })\n .strict()\n .describe('Flex container that arranges children in a row or column.');\n\nexport type StackProps = z.infer<typeof StackPropsSchema>;\n\n// ─── Text ───\nexport const TextPropsSchema = z\n .object({\n as: z\n .enum(['span', 'p', 'h1', 'h2', 'h3', 'h4'])\n .optional()\n .describe('HTML element to render. Default: span.'),\n size: z\n .enum(['sm', 'md', 'lg', 'xl', '2xl'])\n .optional()\n .describe('Font size token. Default: md.'),\n weight: z\n .enum(['normal', 'medium', 'bold'])\n .optional()\n .describe('Font weight token. Default: normal.'),\n color: z\n .string()\n .optional()\n .describe('CSS color string (open set). Default: inherit.'),\n })\n .strict()\n .describe('Text element with semantic typography props.');\n\nexport type TextProps = z.infer<typeof TextPropsSchema>;\n\n// ─── Input ───\nexport const InputPropsSchema = z\n .object({\n type: z\n .enum(['text', 'number', 'email', 'password'])\n .optional()\n .describe('Input type. Default: text.'),\n placeholder: z\n .string()\n .optional()\n .describe('Placeholder text shown when empty.'),\n disabled: z\n .boolean()\n .optional()\n .describe('Whether the input is disabled. Default: false.'),\n value: z\n .string()\n .optional()\n .describe('Current value. Typically supplied via model binding.'),\n debounce: z\n .number()\n .optional()\n .describe('Milliseconds to coalesce keystrokes before dispatching ui:model. Default: 0 (every keystroke). Set it when the shell is remote to cut round-trips.'),\n })\n .strict()\n .describe('Text input bound to data via the `model` field on the layout node.');\n\nexport type InputProps = z.infer<typeof InputPropsSchema>;\n\n// ─── Button ───\nexport const ButtonPropsSchema = z\n .object({\n label: z\n .string()\n .optional()\n .describe('Button label. If absent, children are used.'),\n variant: z\n .enum(['primary', 'secondary', 'ghost'])\n .optional()\n .describe('Visual variant. Default: primary.'),\n disabled: z\n .boolean()\n .optional()\n .describe('Whether the button is disabled. Default: false.'),\n })\n .strict()\n .describe(\"Clickable button. Click events fire as `ui:click` with the layout node's ref.\");\n\nexport type ButtonProps = z.infer<typeof ButtonPropsSchema>;\n\n// ─── Box ───\nexport const BoxPropsSchema = z\n .object({\n padding: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe('Inner padding in pixels. Default: 0.'),\n background: z\n .string()\n .optional()\n .describe('CSS background color or value.'),\n border: z\n .boolean()\n .optional()\n .describe('Whether to show a 1px border. Default: false.'),\n radius: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe('Border radius in pixels. Default: 0.'),\n })\n .strict()\n .describe('Generic container with basic styling props. Use Stack for layout, Box for visual wrapping.');\n\nexport type BoxProps = z.infer<typeof BoxPropsSchema>;\n\n// ─── Panel ───\nexport const PanelPropsSchema = z\n .object({\n title: z.string().optional().describe('Optional header title.'),\n backRef: z.string().optional().describe('When set, the header grows a ← (before the title) that fires ui:click with this ref.'),\n closeRef: z.string().optional().describe('When set, the header grows a ✕ that fires ui:click with this ref.'),\n })\n .strict()\n .describe('A framed, elevated surface with an optional title.');\n\nexport type PanelProps = z.infer<typeof PanelPropsSchema>;\n\n// ─── JsonTree ───\nexport const JsonTreePropsSchema = z\n .object({\n value: z.unknown().optional().describe('The value to render.'),\n label: z.string().optional().describe('A name for the root node.'),\n })\n .strict()\n .describe('A collapsible view of any JSON value.');\n\nexport type JsonTreeProps = z.infer<typeof JsonTreePropsSchema>;\n\n// ─── CanvasSlot ───\nexport const CanvasSlotPropsSchema = z\n .object({\n canvasId: z\n .string()\n .optional()\n .describe('Id of the canvas to render. Usually bound from a loop, e.g. \"$.c.id\".'),\n })\n .strict()\n .describe('Renders a canvas by id, recursing into its actionLayout. Resolves to nothing when canvasId is missing.');\n\nexport type CanvasSlotProps = z.infer<typeof CanvasSlotPropsSchema>;\n\n// ─── ActionSlot ───\n// The AUTHORING contract: what a layout node may set on an ActionSlot —\n// instanceId only, strict. The identity props flattenRenderTree stamps on a\n// served marker (canvasId / definitionId) are runtime OUTPUT, never authored;\n// widening this schema would advertise them to the layout agent's palette.\nexport const ActionSlotPropsSchema = z\n .object({\n instanceId: z\n .string()\n .optional()\n .describe('Id of the action instance to render. Usually bound from canvas scope, e.g. \"$.active.id\" or \"$.i.id\".'),\n })\n .strict()\n .describe('Renders an action instance by id. Resolves to nothing when instanceId is missing.');\n\nexport type ActionSlotProps = z.infer<typeof ActionSlotPropsSchema>;\n\n","import { headOf, shellView } from '../shell';\nimport type { Shell } from '../shell';\nimport { createHeadKeeper } from './head-keeper';\nimport type { HeadKeeper } from './head-keeper';\n\n// ═══════════════════════════════════════════════════════════\n// The page's head, for an adapter that draws a shell living in its own page\n// through a framework (react, vue).\n//\n// Such an adapter reads the shell's trees through its own subscriptions, so\n// there is no one render to read the head off: reading it means rendering the\n// shell's trees once more. That is worth doing only while a head is on the\n// screen. So a head node says when it arrives and when it goes (`enter`,\n// `leave`), and the shell is only read between the two.\n// ═══════════════════════════════════════════════════════════\n\nexport type ShellHead = {\n enter: () => void;\n leave: () => void;\n // follow the shell's changes; returns the stop\n watch: () => () => void;\n};\n\nexport const createShellHead = (shell: Shell): ShellHead => {\n const view = shellView(shell);\n let present = 0;\n let keep: HeadKeeper | undefined;\n let queued = false;\n // once a turn, however many heads came and went in it\n const read = (): void => {\n // nothing to keep where a screen is drawn to a string\n if (queued || typeof document === 'undefined') return;\n queued = true;\n queueMicrotask(() => {\n queued = false;\n keep ??= createHeadKeeper(document);\n keep(present > 0 ? headOf(view.api)?.elements : undefined);\n });\n };\n return {\n enter: () => {\n present += 1;\n read();\n },\n leave: () => {\n present -= 1;\n read();\n },\n watch: () =>\n view.subscribe(() => {\n if (present > 0) read();\n }),\n };\n};\n"]}
@@ -0,0 +1,152 @@
1
+ import { headKeyOf } from './chunk-OE4E6IBD.js';
2
+
3
+ // src/document/place-head.ts
4
+ var HEAD_MARK = "data-nova-head";
5
+ var OWN_MARK = "data-nova-own";
6
+ var escapeAttribute = (value) => value.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;");
7
+ var escapeText = (value) => value.replace(/&/g, "&amp;").replace(/</g, "&lt;");
8
+ var LINE_ENDS = [8232, 8233];
9
+ var escapeScript = (json) => LINE_ENDS.reduce((text, code) => text.split(String.fromCharCode(code)).join(`\\u${code.toString(16)}`), json.replace(/</g, "\\u003c"));
10
+ var ATTRIBUTES = `((?:[^>"']|"[^"]*"|'[^']*')*)`;
11
+ var TAGS = new RegExp(`<!--[\\s\\S]*?-->|<(script|style|title|template)\\b${ATTRIBUTES}>([\\s\\S]*?)<\\/\\1\\s*>|<(meta|link)\\b${ATTRIBUTES}>`, "gi");
12
+ var ATTRIBUTE = /([^\s"'=<>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g;
13
+ var attributesOf = (source) => {
14
+ const attributes = {};
15
+ for (const match of source.matchAll(ATTRIBUTE)) {
16
+ const name = match[1]?.toLowerCase();
17
+ if (name === void 0 || name in attributes) continue;
18
+ attributes[name] = match[2] ?? match[3] ?? match[4] ?? "";
19
+ }
20
+ return attributes;
21
+ };
22
+ var tagsOf = (section) => {
23
+ const tags = [];
24
+ for (const match of section.matchAll(TAGS)) {
25
+ const name = (match[1] ?? match[4])?.toLowerCase();
26
+ if (name === void 0) continue;
27
+ tags.push({ start: match.index, end: match.index + match[0].length, name, attributes: attributesOf(match[2] ?? match[5] ?? ""), inner: match[3] ?? "", text: match[0] });
28
+ }
29
+ return tags;
30
+ };
31
+ var keyOfTag = (tag) => tag.name === "title" || tag.name === "meta" || tag.name === "link" ? headKeyOf({ tag: tag.name, attributes: tag.attributes }) : void 0;
32
+ var markupOf = (element, marked) => {
33
+ const written = Object.entries(element.attributes).map(([name, value]) => value === "" ? ` ${name}` : ` ${name}="${escapeAttribute(value)}"`);
34
+ const attributes = [...written, ...marked ? [` ${HEAD_MARK}`] : []].join("");
35
+ if (element.tag === "title") return `<title${attributes}>${escapeText(element.text ?? "")}</title>`;
36
+ if (element.tag === "script") return `<script${attributes}>${escapeScript(element.text ?? "")}</script>`;
37
+ return `<${element.tag}${attributes}>`;
38
+ };
39
+ var addressOf = (place) => {
40
+ if (place.site === void 0 || place.path === void 0) return [];
41
+ const path = place.path.split(/[?#]/)[0] ?? "";
42
+ const address = `${place.site.replace(/\/+$/, "")}${path.startsWith("/") ? path : `/${path}`}`;
43
+ return [
44
+ { tag: "link", attributes: { rel: "canonical", href: address } },
45
+ { tag: "meta", attributes: { property: "og:url", content: address } }
46
+ ];
47
+ };
48
+ var changed = (text, changes) => [...changes].sort((a, b) => b.start - a.start).reduce((at, change) => `${at.slice(0, change.start)}${change.text}${at.slice(change.end)}`, text);
49
+ var restored = (section) => changed(
50
+ section,
51
+ tagsOf(section).flatMap((tag) => {
52
+ if (tag.name === "template" && OWN_MARK in tag.attributes) return [{ start: tag.start, end: tag.end, text: tag.inner }];
53
+ return HEAD_MARK in tag.attributes ? [{ start: tag.start, end: tag.end, text: "" }] : [];
54
+ })
55
+ );
56
+ var write = (section, elements, screen) => {
57
+ if (elements.length === 0) return section;
58
+ const tags = tagsOf(section);
59
+ const changes = [];
60
+ const added = [];
61
+ const own = [];
62
+ for (const element of elements) {
63
+ const key = headKeyOf(element);
64
+ const [first, ...others] = key === void 0 ? [] : tags.filter((tag) => keyOfTag(tag) === key);
65
+ if (first === void 0) {
66
+ added.push(markupOf(element, screen));
67
+ continue;
68
+ }
69
+ changes.push({ start: first.start, end: first.end, text: markupOf(element, screen) });
70
+ own.push(first.text);
71
+ for (const other of others) {
72
+ changes.push({ start: other.start, end: other.end, text: "" });
73
+ own.push(other.text);
74
+ }
75
+ }
76
+ if (screen && own.length > 0) added.push(`<template ${OWN_MARK}>${own.join("")}</template>`);
77
+ const written = changed(section, changes);
78
+ const tail = /\s*$/.exec(written)?.[0] ?? "";
79
+ const body = written.slice(0, written.length - tail.length);
80
+ const indent = /(?:^|\n)([ \t]*)\S[^\n]*$/.exec(body)?.[1] ?? "";
81
+ const lead = tail.includes("\n") ? `
82
+ ${indent}` : "";
83
+ return `${body}${added.map((tag) => `${lead}${tag}`).join("")}${tail}`;
84
+ };
85
+ var placeHead = (html, elements, place = {}) => {
86
+ const opening = /<head\b[^>]*>/i.exec(html);
87
+ if (opening === null) return html;
88
+ const from = opening.index + opening[0].length;
89
+ const closing = html.slice(from).search(/<\/head\s*>/i);
90
+ if (closing < 0) return html;
91
+ const located = write(restored(html.slice(from, from + closing)), addressOf(place), false);
92
+ return `${html.slice(0, from)}${write(located, elements ?? [], true)}${html.slice(from + closing)}`;
93
+ };
94
+
95
+ // src/document/head-keeper.ts
96
+ var TAGS2 = ["title", "meta", "link"];
97
+ var keyOfNode = (node) => {
98
+ const tag = TAGS2.find((name) => name === node.tagName.toLowerCase());
99
+ if (tag !== "title" && tag !== "meta" && tag !== "link") return void 0;
100
+ return headKeyOf({ tag, attributes: Object.fromEntries([...node.attributes].map((attribute) => [attribute.name, attribute.value])) });
101
+ };
102
+ var createHeadKeeper = (doc) => {
103
+ let mine = [];
104
+ let away = [];
105
+ let said;
106
+ const built = (element) => {
107
+ const node = doc.createElement(element.tag);
108
+ for (const [name, value] of Object.entries(element.attributes)) node.setAttribute(name, value);
109
+ node.setAttribute(HEAD_MARK, "");
110
+ if (element.text !== void 0) node.textContent = element.text;
111
+ return node;
112
+ };
113
+ const adopt = () => {
114
+ mine = [...doc.head.querySelectorAll(`[${HEAD_MARK}]`)];
115
+ const view = doc.defaultView;
116
+ for (const stash of doc.head.querySelectorAll(`template[${OWN_MARK}]`)) {
117
+ if (view === null || !(stash instanceof view.HTMLTemplateElement)) continue;
118
+ for (const child of [...stash.content.children]) {
119
+ const key = keyOfNode(child);
120
+ if (key !== void 0) away.push({ key, node: doc.importNode(child, true), before: null });
121
+ }
122
+ stash.remove();
123
+ }
124
+ };
125
+ return (elements) => {
126
+ const now = elements ?? [];
127
+ const next = JSON.stringify(now);
128
+ if (said === void 0) {
129
+ if (now.length === 0) return;
130
+ adopt();
131
+ }
132
+ if (next === said) return;
133
+ said = next;
134
+ for (const node of mine) node.remove();
135
+ mine = now.map(built);
136
+ const keys = new Set(now.flatMap((element) => headKeyOf(element) ?? []));
137
+ for (const node of [...doc.head.children]) {
138
+ const key = keyOfNode(node);
139
+ if (key === void 0 || !keys.has(key)) continue;
140
+ away.push({ key, node, before: node.nextSibling });
141
+ node.remove();
142
+ }
143
+ const [back, still] = [away.filter((gone) => !keys.has(gone.key)), away.filter((gone) => keys.has(gone.key))];
144
+ for (const gone of [...back].reverse()) doc.head.insertBefore(gone.node, gone.before !== null && gone.before.parentNode === doc.head ? gone.before : null);
145
+ away = still;
146
+ doc.head.append(...mine);
147
+ };
148
+ };
149
+
150
+ export { HEAD_MARK, OWN_MARK, createHeadKeeper, placeHead };
151
+ //# sourceMappingURL=chunk-V4BPFFFV.js.map
152
+ //# sourceMappingURL=chunk-V4BPFFFV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/document/place-head.ts","../src/document/head-keeper.ts"],"names":["TAGS"],"mappings":";;;AAsCO,IAAM,SAAA,GAAY;AAClB,IAAM,QAAA,GAAW;AAExB,IAAM,eAAA,GAAkB,CAAC,KAAA,KAA0B,KAAA,CAAM,QAAQ,IAAA,EAAM,OAAO,CAAA,CAAE,OAAA,CAAQ,IAAA,EAAM,QAAQ,CAAA,CAAE,OAAA,CAAQ,MAAM,MAAM,CAAA;AAC5H,IAAM,UAAA,GAAa,CAAC,KAAA,KAA0B,KAAA,CAAM,OAAA,CAAQ,MAAM,OAAO,CAAA,CAAE,OAAA,CAAQ,IAAA,EAAM,MAAM,CAAA;AAK/F,IAAM,SAAA,GAAY,CAAC,IAAA,EAAQ,IAAM,CAAA;AACjC,IAAM,YAAA,GAAe,CAAC,IAAA,KACpB,SAAA,CAAU,MAAA,CAAO,CAAC,IAAA,EAAM,IAAA,KAAS,IAAA,CAAK,KAAA,CAAM,MAAA,CAAO,YAAA,CAAa,IAAI,CAAC,CAAA,CAAE,IAAA,CAAK,CAAA,GAAA,EAAM,IAAA,CAAK,QAAA,CAAS,EAAE,CAAC,CAAA,CAAE,CAAA,EAAG,IAAA,CAAK,OAAA,CAA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A,IAAA,MAAM,CAAC,IAAA,EAAM,KAAK,CAAA,GAAI,CAAC,KAAK,MAAA,CAAO,CAAC,IAAA,KAAS,CAAC,IAAA,CAAK,GAAA,CAAI,KAAK,GAAG,CAAC,CAAA,EAAG,IAAA,CAAK,MAAA,CAAO,CAAC,IAAA,KAAS,IAAA,CAAK,GAAA,CAAI,IAAA,CAAK,GAAG,CAAC,CAAC,CAAA;AAC5G,IAAA,KAAA,MAAW,IAAA,IAAQ,CAAC,GAAG,IAAI,EAAE,OAAA,EAAQ,EAAG,GAAA,CAAI,IAAA,CAAK,YAAA,CAAa,IAAA,CAAK,MAAM,IAAA,CAAK,MAAA,KAAW,QAAQ,IAAA,CAAK,MAAA,CAAO,eAAe,GAAA,CAAI,IAAA,GAAO,IAAA,CAAK,MAAA,GAAS,IAAI,CAAA;AACzJ,IAAA,IAAA,GAAO,KAAA;AAEP,IAAA,GAAA,CAAI,IAAA,CAAK,MAAA,CAAO,GAAG,IAAI,CAAA;AAAA,EACzB,CAAA;AACF","file":"chunk-V4BPFFFV.js","sourcesContent":["import { headKeyOf } from '../layout/head';\nimport type { HeadElement } from '../layout/head';\n\n// ═══════════════════════════════════════════════════════════\n// A screen's head, written into an HTML document.\n//\n// The document is the app's own `index.html` with a screen already drawn into\n// it. Its <head> is what holds on every page; the screen's head elements are\n// what this page says. An element that says the same thing as a tag the\n// document already has — its <title>, a <meta> of that name or property, its\n// canonical address — takes that tag's place, where it stood. Anything else is\n// added after what is there. Everything the screen does not speak of is left\n// exactly as it was: the icon, the viewport, the stylesheet.\n//\n// TWO THINGS ARE KEPT FOR THE PAGE ITSELF, which goes on living after the file\n// is read (./head-keeper). What was written is marked (`data-nova-head`), so\n// the page can tell the screen's elements from the document's own. And a tag\n// that gave up its place is kept, inert, in a <template data-nova-own>: when\n// the screen moves on to one that no longer says it, the document's own comes\n// back.\n//\n// WHERE the document lives is known to whoever writes the file: the site plus\n// the path it was drawn at. With a `site`, every path is given its own\n// canonical address, whether or not its screen has a head. That address is the\n// document's own for this path — unmarked, and it stays when the screen moves\n// on. A screen that says a canonical address itself is taken at its word.\n//\n// With nothing to write, the document comes back untouched.\n// ═══════════════════════════════════════════════════════════\n\nexport type HeadPlace = {\n // The address the site is served at (\"https://example.com\"). With it, each\n // path's canonical address is written.\n site?: string;\n // The path this document was drawn at.\n path?: string;\n};\n\nexport const HEAD_MARK = 'data-nova-head';\nexport const OWN_MARK = 'data-nova-own';\n\nconst escapeAttribute = (value: string): string => value.replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/</g, '&lt;');\nconst escapeText = (value: string): string => value.replace(/&/g, '&amp;').replace(/</g, '&lt;');\n// Inside a <script>, the one thing that may not appear is the start of a tag.\n// The two separators end a line in a script though not in JSON, so they are\n// written as escapes too (named by code: the characters themselves would end\n// a line here as well).\nconst LINE_ENDS = [0x2028, 0x2029];\nconst escapeScript = (json: string): string =>\n LINE_ENDS.reduce((text, code) => text.split(String.fromCharCode(code)).join(`\\\\u${code.toString(16)}`), json.replace(/</g, '\\\\u003c'));\n\n// What stands in a head, read a tag at a time: comments and the bodies of\n// scripts, styles and templates are passed over whole, so a tag written inside\n// one is not mistaken for a tag.\nconst ATTRIBUTES = `((?:[^>\"']|\"[^\"]*\"|'[^']*')*)`;\nconst TAGS = new RegExp(`<!--[\\\\s\\\\S]*?-->|<(script|style|title|template)\\\\b${ATTRIBUTES}>([\\\\s\\\\S]*?)<\\\\/\\\\1\\\\s*>|<(meta|link)\\\\b${ATTRIBUTES}>`, 'gi');\nconst ATTRIBUTE = /([^\\s\"'=<>/]+)(?:\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)'|([^\\s\"'=<>`]+)))?/g;\n\ntype Tag = { start: number; end: number; name: string; attributes: Record<string, string>; inner: string; text: string };\n\nconst attributesOf = (source: string): Record<string, string> => {\n const attributes: Record<string, string> = {};\n for (const match of source.matchAll(ATTRIBUTE)) {\n const name = match[1]?.toLowerCase();\n if (name === undefined || name in attributes) continue;\n attributes[name] = match[2] ?? match[3] ?? match[4] ?? '';\n }\n return attributes;\n};\n\nconst tagsOf = (section: string): Tag[] => {\n const tags: Tag[] = [];\n for (const match of section.matchAll(TAGS)) {\n const name = (match[1] ?? match[4])?.toLowerCase();\n if (name === undefined) continue;\n tags.push({ start: match.index, end: match.index + match[0].length, name, attributes: attributesOf(match[2] ?? match[5] ?? ''), inner: match[3] ?? '', text: match[0] });\n }\n return tags;\n};\n\n// What a tag in the document says, in the same terms as an element.\nconst keyOfTag = (tag: Tag): string | undefined =>\n tag.name === 'title' || tag.name === 'meta' || tag.name === 'link' ? headKeyOf({ tag: tag.name, attributes: tag.attributes }) : undefined;\n\n// An element, as the tag it is written as.\nconst markupOf = (element: HeadElement, marked: boolean): string => {\n const written = Object.entries(element.attributes).map(([name, value]) => (value === '' ? ` ${name}` : ` ${name}=\"${escapeAttribute(value)}\"`));\n const attributes = [...written, ...(marked ? [` ${HEAD_MARK}`] : [])].join('');\n if (element.tag === 'title') return `<title${attributes}>${escapeText(element.text ?? '')}</title>`;\n if (element.tag === 'script') return `<script${attributes}>${escapeScript(element.text ?? '')}</script>`;\n return `<${element.tag}${attributes}>`;\n};\n\n// Where the document lives, as elements: what a `site` and a path say.\nconst addressOf = (place: HeadPlace): HeadElement[] => {\n if (place.site === undefined || place.path === undefined) return [];\n const path = place.path.split(/[?#]/)[0] ?? '';\n const address = `${place.site.replace(/\\/+$/, '')}${path.startsWith('/') ? path : `/${path}`}`;\n return [\n { tag: 'link', attributes: { rel: 'canonical', href: address } },\n { tag: 'meta', attributes: { property: 'og:url', content: address } },\n ];\n};\n\nconst changed = (text: string, changes: readonly { start: number; end: number; text: string }[]): string =>\n [...changes].sort((a, b) => b.start - a.start).reduce((at, change) => `${at.slice(0, change.start)}${change.text}${at.slice(change.end)}`, text);\n\n// A head that was written before, put back as the document had it: what the\n// last screen said is taken out, and what the document gave up for it is given\n// back. A head never written comes back as it is.\nconst restored = (section: string): string =>\n changed(\n section,\n tagsOf(section).flatMap((tag) => {\n if (tag.name === 'template' && OWN_MARK in tag.attributes) return [{ start: tag.start, end: tag.end, text: tag.inner }];\n return HEAD_MARK in tag.attributes ? [{ start: tag.start, end: tag.end, text: '' }] : [];\n }),\n );\n\n// Elements, written into a head. `screen`: they are what a screen says — each\n// is marked, and a tag that gives up its place is kept for the page. Otherwise\n// they are the document's own from here on, and what they replace is gone.\nconst write = (section: string, elements: readonly HeadElement[], screen: boolean): string => {\n if (elements.length === 0) return section;\n const tags = tagsOf(section);\n const changes: { start: number; end: number; text: string }[] = [];\n const added: string[] = [];\n const own: string[] = [];\n for (const element of elements) {\n const key = headKeyOf(element);\n const [first, ...others] = key === undefined ? [] : tags.filter((tag) => keyOfTag(tag) === key);\n if (first === undefined) {\n added.push(markupOf(element, screen));\n continue;\n }\n changes.push({ start: first.start, end: first.end, text: markupOf(element, screen) });\n own.push(first.text);\n // said twice, the second would still say the old thing\n for (const other of others) {\n changes.push({ start: other.start, end: other.end, text: '' });\n own.push(other.text);\n }\n }\n if (screen && own.length > 0) added.push(`<template ${OWN_MARK}>${own.join('')}</template>`);\n\n const written = changed(section, changes);\n // What is added goes after the last thing in the head, a line each, indented\n // as that last thing is — or straight on, in a head written on one line.\n const tail = /\\s*$/.exec(written)?.[0] ?? '';\n const body = written.slice(0, written.length - tail.length);\n const indent = /(?:^|\\n)([ \\t]*)\\S[^\\n]*$/.exec(body)?.[1] ?? '';\n const lead = tail.includes('\\n') ? `\\n${indent}` : '';\n return `${body}${added.map((tag) => `${lead}${tag}`).join('')}${tail}`;\n};\n\nexport const placeHead = (html: string, elements: readonly HeadElement[] | undefined, place: HeadPlace = {}): string => {\n const opening = /<head\\b[^>]*>/i.exec(html);\n if (opening === null) return html;\n const from = opening.index + opening[0].length;\n const closing = html.slice(from).search(/<\\/head\\s*>/i);\n if (closing < 0) return html;\n // Where the document lives is the document's own, for this path: written\n // first and unmarked, so a screen that says an address of its own takes its\n // place — and gives it back.\n const located = write(restored(html.slice(from, from + closing)), addressOf(place), false);\n return `${html.slice(0, from)}${write(located, elements ?? [], true)}${html.slice(from + closing)}`;\n};\n","import { headKeyOf } from '../layout/head';\nimport type { HeadElement } from '../layout/head';\nimport { HEAD_MARK, OWN_MARK } from './place-head';\n\n// ═══════════════════════════════════════════════════════════\n// A page's <head>, kept on the screen.\n//\n// A drawn page arrives with its head written (`placeHead`). From then on the\n// shell is live and the screen moves without the page being fetched again, so\n// the head is kept on whatever the screen says now: its elements are put in\n// `document.head`, and taken out again when the screen stops saying them.\n//\n// THE DOCUMENT'S OWN TAGS GIVE WAY AND COME BACK. A tag the page was written\n// with — the title in index.html, its description — is taken out while the\n// screen says the same thing itself, and put back where it stood when the\n// screen no longer does. A drawn page has already given some up: they arrive\n// inert, in the <template data-nova-own> the writer left, and come back the\n// same way.\n//\n// A KEEPER THAT WAS NEVER HANDED AN ELEMENT NEVER WRITES. Two shells can share\n// a page (an inspector beside the app), and the one with nothing to say must\n// not touch what the other wrote — nor what the page arrived with.\n// ═══════════════════════════════════════════════════════════\n\nexport type HeadKeeper = (elements: readonly HeadElement[] | undefined) => void;\n\ntype Away = { key: string; node: Element; before: Node | null };\n\nconst TAGS = ['title', 'meta', 'link'];\n\n// What a tag standing in the page says, in the same terms as an element.\nconst keyOfNode = (node: Element): string | undefined => {\n const tag = TAGS.find((name) => name === node.tagName.toLowerCase());\n if (tag !== 'title' && tag !== 'meta' && tag !== 'link') return undefined;\n return headKeyOf({ tag, attributes: Object.fromEntries([...node.attributes].map((attribute) => [attribute.name, attribute.value])) });\n};\n\nexport const createHeadKeeper = (doc: Document): HeadKeeper => {\n // the screen's elements standing in the head\n let mine: Element[] = [];\n // the document's own tags that have given up their place\n let away: Away[] = [];\n let said: string | undefined;\n\n const built = (element: HeadElement): Element => {\n const node = doc.createElement(element.tag);\n for (const [name, value] of Object.entries(element.attributes)) node.setAttribute(name, value);\n node.setAttribute(HEAD_MARK, '');\n if (element.text !== undefined) node.textContent = element.text;\n return node;\n };\n\n // What the page arrived with: the elements a writer put there for the first\n // screen, and the tags that gave way to them.\n const adopt = (): void => {\n mine = [...doc.head.querySelectorAll(`[${HEAD_MARK}]`)];\n // the document's own window, not a global: a page's document is not always\n // the one the code was loaded in\n const view = doc.defaultView;\n for (const stash of doc.head.querySelectorAll(`template[${OWN_MARK}]`)) {\n if (view === null || !(stash instanceof view.HTMLTemplateElement)) continue;\n for (const child of [...stash.content.children]) {\n const key = keyOfNode(child);\n if (key !== undefined) away.push({ key, node: doc.importNode(child, true), before: null });\n }\n stash.remove();\n }\n };\n\n return (elements) => {\n const now = elements ?? [];\n const next = JSON.stringify(now);\n if (said === undefined) {\n if (now.length === 0) return;\n adopt();\n }\n if (next === said) return;\n said = next;\n\n for (const node of mine) node.remove();\n mine = now.map(built);\n const keys = new Set(now.flatMap((element) => headKeyOf(element) ?? []));\n\n // the document's own that now say what the screen says: out, each remembering where it stood\n for (const node of [...doc.head.children]) {\n const key = keyOfNode(node);\n if (key === undefined || !keys.has(key)) continue;\n away.push({ key, node, before: node.nextSibling });\n node.remove();\n }\n // Those the screen no longer says: back where each stood. The last to leave\n // goes back first — what stood after an earlier one may have left after it,\n // and has to be standing again for the earlier one to go in front of it.\n const [back, still] = [away.filter((gone) => !keys.has(gone.key)), away.filter((gone) => keys.has(gone.key))];\n for (const gone of [...back].reverse()) doc.head.insertBefore(gone.node, gone.before !== null && gone.before.parentNode === doc.head ? gone.before : null);\n away = still;\n\n doc.head.append(...mine);\n };\n};\n"]}
@@ -1,7 +1,7 @@
1
- import { StackPropsSchema, BoxPropsSchema, TextPropsSchema, ButtonPropsSchema, InputPropsSchema, PanelPropsSchema, JsonTreePropsSchema, CanvasSlotPropsSchema, ActionSlotPropsSchema, createShellTitle } from './chunk-4ERQYDF6.js';
2
- import { scopeDispatch } from './chunk-WZVQ5PUB.js';
3
- import { isHeadNode } from './chunk-UV5YGBHQ.js';
4
- import { renderNodeKey, NOVA_MODEL_PROP, NOVA_REF_PROP } from './chunk-RXECI7DE.js';
1
+ import { StackPropsSchema, BoxPropsSchema, TextPropsSchema, ButtonPropsSchema, InputPropsSchema, PanelPropsSchema, JsonTreePropsSchema, CanvasSlotPropsSchema, ActionSlotPropsSchema, createShellHead } from './chunk-UDCXGDLQ.js';
2
+ import { scopeDispatch } from './chunk-RYIIIXDX.js';
3
+ import { isHeadNode } from './chunk-RFBIGRCI.js';
4
+ import { renderNodeKey, NOVA_MODEL_PROP, NOVA_REF_PROP } from './chunk-Y6XVPRYH.js';
5
5
  import { defineComponent, h, shallowRef, onBeforeUnmount, inject, onMounted, watch, provide, createTextVNode, Fragment, toValue } from 'vue';
6
6
 
7
7
  var px = (value) => `${value ?? 0}px`;
@@ -422,14 +422,14 @@ var ErrorMarker = defineComponent(
422
422
  (props) => () => h("span", { "data-nova-error": props.code, role: "alert" }, `[${props.code}] ${props.message}`),
423
423
  { name: "NovaErrorMarker", props: ["code", "message"] }
424
424
  );
425
- var ShellTitleKey = /* @__PURE__ */ Symbol.for("@niscorp/nova/adapters/vue:title");
425
+ var ShellHeadKey = /* @__PURE__ */ Symbol.for("@niscorp/nova/adapters/vue:head");
426
426
  var HeadMark = defineComponent(
427
427
  () => {
428
- const title = inject(ShellTitleKey, void 0);
428
+ const head = inject(ShellHeadKey, void 0);
429
429
  onMounted(() => {
430
- if (title === void 0) return;
430
+ if (head === void 0) return;
431
431
  watch(
432
- title,
432
+ head,
433
433
  (current, _previous, onCleanup) => {
434
434
  current.enter();
435
435
  onCleanup(current.leave);
@@ -441,19 +441,19 @@ var HeadMark = defineComponent(
441
441
  },
442
442
  { name: "NovaHeadMark" }
443
443
  );
444
- var provideShellTitle = (shell) => {
444
+ var provideShellHead = (shell) => {
445
445
  let held = shell();
446
- const title = shallowRef(createShellTitle(held));
447
- provide(ShellTitleKey, title);
446
+ const head = shallowRef(createShellHead(held));
447
+ provide(ShellHeadKey, head);
448
448
  onMounted(() => {
449
449
  watch(
450
450
  shell,
451
451
  (next, _previous, onCleanup) => {
452
452
  if (next !== held) {
453
453
  held = next;
454
- title.value = createShellTitle(next);
454
+ head.value = createShellHead(next);
455
455
  }
456
- onCleanup(title.value.watch());
456
+ onCleanup(head.value.watch());
457
457
  },
458
458
  { immediate: true }
459
459
  );
@@ -588,6 +588,6 @@ var registerNovaVueComponents = (registry) => {
588
588
  });
589
589
  };
590
590
 
591
- export { ActionSlot, Box, Button, CanvasSlot, ErrorMarker, Input, JsonTree, NovaRenderKey, NovaShellKey, Panel, RenderNodeView, RenderTree, Stack, Text, isNovaComponent, provideShellTitle, registerNovaVueComponents, useActionData, useActionStatus, useCanvas, useCanvasRenderTree, useNovaDispatch, useNovaPublish, useNovaRegistry, useRenderTree, useShell, useShellRenderTree, useShellState, useSlotWrapper };
592
- //# sourceMappingURL=chunk-UUYXVOK2.js.map
593
- //# sourceMappingURL=chunk-UUYXVOK2.js.map
591
+ export { ActionSlot, Box, Button, CanvasSlot, ErrorMarker, Input, JsonTree, NovaRenderKey, NovaShellKey, Panel, RenderNodeView, RenderTree, Stack, Text, isNovaComponent, provideShellHead, registerNovaVueComponents, useActionData, useActionStatus, useCanvas, useCanvasRenderTree, useNovaDispatch, useNovaPublish, useNovaRegistry, useRenderTree, useShell, useShellRenderTree, useShellState, useSlotWrapper };
592
+ //# sourceMappingURL=chunk-VU6NNCEJ.js.map
593
+ //# sourceMappingURL=chunk-VU6NNCEJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/adapters/vue/components/layout.ts","../src/adapters/vue/context.ts","../src/adapters/vue/composables/context.ts","../src/adapters/vue/components/controls.ts","../src/adapters/vue/components/introspection.ts","../src/adapters/vue/composables/shell.ts","../src/adapters/vue/error-marker.ts","../src/adapters/vue/head.ts","../src/adapters/vue/types.ts","../src/adapters/vue/render-node.ts","../src/adapters/vue/render-tree.ts","../src/adapters/vue/components/slots.ts","../src/adapters/vue/components/index.ts"],"names":["defineComponent","h","shallowRef","inject","watch","provide"],"mappings":";;;;;;AAiBA,IAAM,EAAA,GAAK,CAAC,KAAA,KAAsC,CAAA,EAA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IACE,IAAA,EAAM;AAAA,MACJ,WAAA,EAAa,sEAAA;AAAA,MACb,WAAA,EAAa;AAAA;AACf;AAEJ;;;ACrEO,IAAM,yBAAA,GAA4B,CAAC,QAAA,KAAsC;AAC9E,EAAA,QAAA,CAAS,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-VU6NNCEJ.js","sourcesContent":["import { defineComponent, h } from 'vue';\nimport {\n BoxPropsSchema,\n StackPropsSchema,\n TextPropsSchema,\n type BoxProps,\n type StackProps,\n type TextProps,\n} from '../../primitive-props';\n\n// ═══════════════════════════════════════════════════════════\n// The layout primitives — Stack, Box, Text. Headless reference looks (inline\n// styles, as the React kit's); an app's kit is where its real look lives.\n// ═══════════════════════════════════════════════════════════\n\nexport { StackPropsSchema, type StackProps, BoxPropsSchema, type BoxProps, TextPropsSchema, type TextProps };\n\nconst px = (value: number | undefined): string => `${value ?? 0}px`;\n\n// ─── Stack ─────────────────────────────────────────────────\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 = Object.assign(\n defineComponent(\n (props: StackProps, { slots }) =>\n () =>\n h(\n 'div',\n {\n style: {\n display: 'flex',\n flexDirection: props.direction ?? 'column',\n gap: px(props.gap),\n alignItems: ALIGN_MAP[props.align ?? 'stretch'],\n justifyContent: JUSTIFY_MAP[props.justify ?? 'start'],\n padding: px(props.padding),\n flexWrap: props.wrap === true ? 'wrap' : 'nowrap',\n },\n },\n slots.default?.(),\n ),\n { name: 'NovaStack', props: ['direction', 'gap', 'align', 'justify', 'padding', 'wrap'], inheritAttrs: false },\n ),\n { meta: { description: 'Flex container that arranges children in a row or column.', propsSchema: StackPropsSchema } },\n);\n\n// ─── Box ───────────────────────────────────────────────────\n\nexport const Box = Object.assign(\n defineComponent(\n (props: BoxProps, { slots }) =>\n () =>\n h(\n 'div',\n {\n style: {\n padding: px(props.padding),\n background: props.background ?? 'transparent',\n border: props.border === true ? '1px solid #e5e7eb' : 'none',\n borderRadius: px(props.radius),\n },\n },\n slots.default?.(),\n ),\n { name: 'NovaBox', props: ['padding', 'background', 'border', 'radius'], inheritAttrs: false },\n ),\n {\n meta: {\n description: 'Generic container with basic styling props. Use Stack for layout, Box for visual wrapping.',\n propsSchema: BoxPropsSchema,\n },\n },\n);\n\n// ─── Text ──────────────────────────────────────────────────\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 = Object.assign(\n defineComponent(\n (props: TextProps, { slots }) =>\n () =>\n h(\n props.as ?? 'span',\n {\n style: {\n fontSize: SIZE_MAP[props.size ?? 'md'],\n fontWeight: WEIGHT_MAP[props.weight ?? 'normal'],\n color: props.color ?? 'inherit',\n },\n },\n slots.default?.(),\n ),\n { name: 'NovaText', props: ['as', 'size', 'weight', 'color'], inheritAttrs: false },\n ),\n { meta: { description: 'Text element with semantic typography props.', propsSchema: TextPropsSchema } },\n);\n","import type { Component, InjectionKey } from 'vue';\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 injections, the twins of the React adapter's two contexts:\n// - NovaRenderKey: registry + dispatch + publish (+ optional slotWrapper /\n// fallback). Required to render a layout. Does NOT require a shell.\n// - NovaShellKey: the shell. Shell-aware composables need it.\n//\n// Keys are `Symbol.for`, not `Symbol()`: a CJS consumer loading the adapter\n// and its components subpath as two bundles gets two module copies, and a\n// private symbol per copy would make one's provide invisible to the other's\n// inject. A registered symbol is one identity however many copies load.\n//\n// Both values are GETTER objects over the provider's props, so a component\n// that injected once reads the provider's current registry / dispatch /\n// shell — a prop swap reaches every descendant without re-providing.\n// ═══════════════════════════════════════════════════════════\n\n// An app-supplied component that wraps each action instance's rendered content\n// at the ActionSlot seam (animation, gating, logging). It receives identity\n// only — these props — and the content as its default slot; all three are\n// undefined while the slot is empty or exiting. Nova owns no timing.\nexport type SlotWrapperProps = {\n canvasId?: string;\n instanceId?: string;\n action?: ActionDefinition;\n};\nexport type SlotWrapper = Component;\n\nexport type NovaRenderContextValue = {\n // unknown-typed: a shell's registry is untyped, and the walker narrows each\n // entry (isNovaComponent) rather than trusting a cast\n readonly registry: ComponentRegistry;\n readonly dispatch: NovaDispatch;\n readonly publish: NovaPublish;\n readonly slotWrapper?: SlotWrapper;\n // rendered for an unregistered component name — a permissive host supplies\n // one; strict consumers omit it and get a COMPONENT_NOT_FOUND marker\n readonly fallback?: NovaComponent;\n};\n\nexport type NovaShellSource = { readonly shell: Shell };\n\nexport const NovaRenderKey: InjectionKey<NovaRenderContextValue> = Symbol.for('@niscorp/nova/adapters/vue:render');\nexport const NovaShellKey: InjectionKey<NovaShellSource> = Symbol.for('@niscorp/nova/adapters/vue:shell');\n","import { inject } from 'vue';\nimport type { ComponentRegistry } from '@layout';\nimport type { Shell } from '@shell';\nimport { NovaRenderKey, NovaShellKey, type NovaRenderContextValue, type NovaShellSource, type SlotWrapper } from '../context';\nimport type { NovaDispatch, NovaPublish } from '../types';\n\n// ═══════════════════════════════════════════════════════════\n// The render-context composables. Call them in setup (or a functional\n// component's render). dispatch / publish come back as stable functions that\n// read the provider's CURRENT value on every call, so a provider whose\n// dispatch changes (a scoped slot, a swapped shell) is honoured without the\n// component re-running setup.\n// ═══════════════════════════════════════════════════════════\n\nconst renderContext = (caller: string): NovaRenderContextValue => {\n const ctx = inject(NovaRenderKey, undefined);\n if (ctx === undefined) throw new Error(`${caller} must be used inside <NovaRenderProvider>`);\n return ctx;\n};\n\nexport const useNovaDispatch = (): NovaDispatch => {\n const ctx = renderContext('useNovaDispatch');\n return (event) => ctx.dispatch(event);\n};\n\nexport const useNovaPublish = (): NovaPublish => {\n const ctx = renderContext('useNovaPublish');\n return (channel, payload) => ctx.publish(channel, payload);\n};\n\n// The component registry exposed via <NovaRenderProvider> — for components\n// that introspect or look up other registered components (agent tooling,\n// dev inspectors).\nexport const useNovaRegistry = (): ComponentRegistry => renderContext('useNovaRegistry').registry;\n\n// The optional app-supplied slotWrapper; undefined when none was provided (or\n// outside a provider). Never throws: a missing wrapper is the common case.\nexport const useSlotWrapper = (): SlotWrapper | undefined => inject(NovaRenderKey, undefined)?.slotWrapper;\n\n// The shell source — the subscribing composables read `.shell` inside a watch\n// so a swapped shell resubscribes.\nexport const useShellSource = (): NovaShellSource => {\n const source = inject(NovaShellKey, undefined);\n if (source === undefined) throw new Error('useShell must be used inside <NovaShellProvider>');\n return source;\n};\n\nexport const useShell = (): Shell => useShellSource().shell;\n","import { defineComponent, h, onBeforeUnmount, shallowRef, type CSSProperties } from 'vue';\nimport { ButtonPropsSchema, InputPropsSchema, type ButtonProps, type InputProps } from '../../primitive-props';\nimport { useNovaDispatch } from '../composables/context';\nimport type { NovaComponentProps } from '../types';\n\n// ═══════════════════════════════════════════════════════════\n// The interactive primitives — Button, Input. Interaction is ref + event:\n// a click fires `ui:click` carrying the node's ref (injected as `novaRef`); a\n// model-bound input fires `ui:model` carrying the binding's ref.\n// ═══════════════════════════════════════════════════════════\n\nexport { ButtonPropsSchema, type ButtonProps, InputPropsSchema, type InputProps };\n\n// ─── Button ────────────────────────────────────────────────\n\ntype Variant = 'primary' | 'secondary' | 'ghost';\n\nconst BASE_STYLE: CSSProperties = {\n borderRadius: '6px',\n fontSize: '14px',\n fontWeight: 500,\n transition: 'background-color 100ms',\n};\n\nconst buttonStyle = (variant: Variant, isDisabled: boolean, isHovered: boolean, isActive: boolean): CSSProperties => {\n const cursor = isDisabled ? 'not-allowed' : 'pointer';\n if (variant === 'primary') {\n return {\n ...BASE_STYLE,\n padding: '8px 16px',\n border: 'none',\n color: '#ffffff',\n cursor,\n background: isDisabled ? '#93c5fd' : isActive ? '#1e40af' : isHovered ? '#1d4ed8' : '#2563eb',\n };\n }\n if (variant === 'secondary') {\n return {\n ...BASE_STYLE,\n padding: '8px 16px',\n border: `1px solid ${isDisabled ? '#e5e7eb' : isHovered ? '#9ca3af' : '#d1d5db'}`,\n color: isDisabled ? '#9ca3af' : '#1f2937',\n cursor,\n background: isDisabled ? '#ffffff' : isActive ? '#e5e7eb' : isHovered ? '#f3f4f6' : '#ffffff',\n };\n }\n return {\n ...BASE_STYLE,\n padding: '8px 12px',\n border: 'none',\n color: isDisabled ? '#93c5fd' : '#2563eb',\n cursor,\n background: isDisabled ? 'transparent' : isActive ? '#dbeafe' : isHovered ? '#eff6ff' : 'transparent',\n };\n};\n\nexport const Button = Object.assign(\n defineComponent(\n (props: NovaComponentProps & ButtonProps, { slots }) => {\n const dispatch = useNovaDispatch();\n const isHovered = shallowRef(false);\n const isActive = shallowRef(false);\n const onClick = (): void => {\n if (props.disabled === true) return;\n if (props.novaRef === undefined) return;\n dispatch({ type: 'ui:click', ref: props.novaRef });\n };\n return () => {\n const isDisabled = props.disabled ?? false;\n return h(\n 'button',\n {\n type: 'button',\n disabled: isDisabled,\n style: buttonStyle(props.variant ?? 'primary', isDisabled, isHovered.value, isActive.value),\n onClick,\n onMouseenter: () => (isHovered.value = true),\n onMouseleave: () => {\n isHovered.value = false;\n isActive.value = false;\n },\n onMousedown: () => (isActive.value = true),\n onMouseup: () => (isActive.value = false),\n },\n props.label ?? slots.default?.(),\n );\n };\n },\n { name: 'NovaButton', props: ['label', 'variant', 'disabled', 'novaRef'], inheritAttrs: false },\n ),\n { meta: { description: \"Clickable button. Click events fire as `ui:click` with the layout node's ref.\", propsSchema: ButtonPropsSchema } },\n);\n\n// ─── Input ─────────────────────────────────────────────────\n//\n// Number inputs still dispatch a string payload; mutation ops parse on the\n// 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 a local draft while focused, so an async tree echo can't clobber\n// the value the user is mid-typing;\n// - it honours the layout's `debounce` prop, coalescing keystrokes before\n// they hit the wire, and flushes the pending value on blur.\n\nconst inputStyle = (isDisabled: boolean, isFocused: boolean, isHovered: boolean): CSSProperties => ({\n padding: '8px 12px',\n border: `1px solid ${isDisabled ? '#d1d5db' : isFocused ? '#2563eb' : isHovered ? '#9ca3af' : '#d1d5db'}`,\n borderRadius: '6px',\n fontSize: '14px',\n background: isDisabled ? '#f9fafb' : '#ffffff',\n color: isDisabled ? '#9ca3af' : 'inherit',\n cursor: isDisabled ? 'not-allowed' : 'text',\n minWidth: '240px',\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\nexport const Input = Object.assign(\n defineComponent(\n (props: NovaComponentProps & InputProps) => {\n const dispatch = useNovaDispatch();\n const isHovered = shallowRef(false);\n // `draft` is the local editing value; `null` means \"not editing — the\n // server value is authoritative\". While focused the draft wins.\n const draft = shallowRef<string | null>(null);\n // A single pending debounced dispatch — replaced by the next keystroke,\n // flushed on blur, dropped on unmount (a keystroke against a screen\n // that has gone is worse than a lost one).\n let timer: ReturnType<typeof setTimeout> | undefined;\n const clearPending = (): void => {\n if (timer !== undefined) {\n clearTimeout(timer);\n timer = undefined;\n }\n };\n onBeforeUnmount(clearPending);\n\n const fire = (next: string): void => {\n if (props.novaModel === undefined) return;\n dispatch({ type: 'ui:model', ref: props.novaModel.ref, payload: next });\n };\n\n const onInput = (event: Event): void => {\n const target = event.target;\n if (!(target instanceof HTMLInputElement)) return;\n const next = target.value;\n draft.value = next;\n const debounceMs = props.debounce ?? 0;\n if (debounceMs > 0) {\n clearPending();\n timer = setTimeout(() => {\n timer = undefined;\n fire(next);\n }, debounceMs);\n } else {\n fire(next);\n }\n };\n\n const onFocus = (): void => {\n draft.value = props.value ?? '';\n };\n const onBlur = (): void => {\n // flush any pending keystroke now, then hand authority back\n const pending = draft.value;\n if (timer !== undefined && pending !== null) {\n clearPending();\n fire(pending);\n }\n draft.value = null;\n };\n\n return () => {\n const isDisabled = props.disabled ?? false;\n return h('input', {\n type: props.type ?? 'text',\n placeholder: props.placeholder,\n disabled: isDisabled,\n value: draft.value ?? props.value ?? '',\n onInput,\n onFocus,\n onBlur,\n onMouseenter: () => (isHovered.value = true),\n onMouseleave: () => (isHovered.value = false),\n style: inputStyle(isDisabled, draft.value !== null, isHovered.value),\n });\n };\n },\n {\n name: 'NovaInput',\n props: ['type', 'placeholder', 'disabled', 'value', 'debounce', 'novaModel'],\n inheritAttrs: false,\n },\n ),\n { meta: { description: 'Text input bound to data via the `model` field on the layout node.', propsSchema: InputPropsSchema } },\n);\n","import { defineComponent, h, type VNode } from 'vue';\nimport { JsonTreePropsSchema, PanelPropsSchema, type JsonTreeProps, type PanelProps } from '../../primitive-props';\nimport { useNovaDispatch } from '../composables/context';\n\n// ═══════════════════════════════════════════════════════════\n// The introspection primitives nova/devtools composes against — Panel and\n// JsonTree. Generic, useful anywhere.\n// ═══════════════════════════════════════════════════════════\n\nexport { PanelPropsSchema, type PanelProps, JsonTreePropsSchema, type JsonTreeProps };\n\n// ─── Panel ─────────────────────────────────────────────────\n// A framed, elevated surface with an optional title header. `backRef` /\n// `closeRef` grow a header ← / ✕ firing ui:click with that ref.\n\nconst HEADER_BUTTON_STYLE = {\n border: 'none',\n background: 'none',\n color: '#6b7280',\n cursor: 'pointer',\n fontSize: '13px',\n lineHeight: 1,\n padding: '2px',\n};\n\nexport const Panel = Object.assign(\n defineComponent(\n (props: PanelProps, { slots }) => {\n const dispatch = useNovaDispatch();\n const headerButton = (ref: string, glyph: string): VNode =>\n h('button', { type: 'button', style: HEADER_BUTTON_STYLE, onClick: () => dispatch({ type: 'ui:click', ref }) }, glyph);\n return () =>\n h(\n 'div',\n {\n style: {\n border: '1px solid #d8dae0',\n borderRadius: '10px',\n background: '#fff',\n boxShadow: '0 1px 3px rgba(0,0,0,.06)',\n padding: '12px',\n },\n },\n [\n props.title === undefined\n ? null\n : h('div', { style: { display: 'flex', alignItems: 'center', gap: '6px', fontWeight: 600, fontSize: '13px', marginBottom: '8px' } }, [\n props.backRef === undefined ? null : headerButton(props.backRef, '←'),\n h('span', { style: { flex: 1 } }, props.title),\n props.closeRef === undefined ? null : headerButton(props.closeRef, '✕'),\n ]),\n slots.default?.(),\n ],\n );\n },\n { name: 'NovaPanel', props: ['title', 'backRef', 'closeRef'], inheritAttrs: false },\n ),\n {\n meta: {\n description: 'A framed, elevated surface with an optional title; `closeRef` adds a header ✕.',\n propsSchema: PanelPropsSchema,\n },\n },\n);\n\n// ─── JsonTree ──────────────────────────────────────────────\n// A collapsible view of any JSON value via native <details> (no state).\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 = (value: unknown, name: string | undefined, key?: string): VNode => {\n if (value !== null && typeof value === 'object') {\n const entries = entriesOf(value);\n const shape = Array.isArray(value) ? `[${entries.length}]` : `{${entries.length}}`;\n return h('details', { key }, [\n h('summary', { style: { cursor: 'pointer', color: '#6b7280' } }, name === undefined ? shape : `${name} ${shape}`),\n h(\n 'div',\n { style: { paddingLeft: '13px', borderLeft: '1px solid #d8dae0', marginLeft: '3px' } },\n entries.map(([childKey, child]) => jsonNode(child, childKey, childKey)),\n ),\n ]);\n }\n const text = name === undefined ? JSON.stringify(value) : `${name}: ${JSON.stringify(value)}`;\n return h('div', { key, style: { whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, text);\n};\n\nexport const JsonTree = Object.assign(\n defineComponent(\n (props: JsonTreeProps) => () =>\n h(\n 'div',\n { style: { fontFamily: 'ui-monospace, SFMono-Regular, Menlo, monospace', fontSize: '12px', lineHeight: 1.5 } },\n [jsonNode(props.value, props.label)],\n ),\n { name: 'NovaJsonTree', props: ['value', 'label'], inheritAttrs: false },\n ),\n { meta: { description: 'A collapsible view of any JSON value.', propsSchema: JsonTreePropsSchema } },\n);\n","import { shallowRef, toValue, watch, type MaybeRefOrGetter, type Ref } from 'vue';\nimport type { ActionStatus, PublicActionRuntime } from '@action';\nimport type { RenderNode } from '@layout';\nimport type { CanvasState, Shell, StateSnapshot } from '@shell';\nimport type { Phrasebook } from '../../../i18n/phrases';\nimport { useShellSource } from './context';\n\n// ═══════════════════════════════════════════════════════════\n// Subscription bindings (ADAPTER.md §3): core subscriptions bridged into Vue\n// reactivity. Each composable holds a shallowRef — core hands out immutable\n// snapshots, so deep reactivity would only cost — re-read on the MATCHING\n// subscription. The subscription lives in a watch over (shell, key): a\n// swapped shell or a changed id resubscribes, and the watch's cleanup\n// unsubscribes on both that and unmount.\n// ═══════════════════════════════════════════════════════════\n\ntype Unsubscribe = () => void;\n\ntype Binding<T, K> = {\n key: () => K;\n read: (shell: Shell, key: K) => T;\n subscribe: (shell: Shell, key: K, notify: () => void) => Unsubscribe;\n};\n\nconst bindShell = <T, K>(binding: Binding<T, K>): Readonly<Ref<T>> => {\n const source = useShellSource();\n const value = shallowRef<T>(binding.read(source.shell, binding.key()));\n watch(\n (): [Shell, K] => [source.shell, binding.key()],\n ([shell, key], _previous, onCleanup) => {\n const refresh = (): void => {\n value.value = binding.read(shell, key);\n };\n refresh();\n onCleanup(binding.subscribe(shell, key, refresh));\n },\n { immediate: true },\n );\n return value;\n};\n\nconst EMPTY: RenderNode[] = [];\n\nconst subscribeState = (shell: Shell, _key: unknown, notify: () => void): Unsubscribe => shell.onStateChange(() => notify());\n\n// A canvas's rendered tree depends on its instances' data, not only the\n// canvas's own state, so it recomputes on every shell state change (as the\n// React hook does).\nexport const useCanvasRenderTree = (canvasId: MaybeRefOrGetter<string | undefined>): Readonly<Ref<RenderNode[]>> =>\n bindShell({\n key: () => toValue(canvasId),\n read: (shell, id) => (id === undefined || id === '' ? EMPTY : shell.getCanvasRenderTree(id)),\n subscribe: subscribeState,\n });\n\nexport const useShellRenderTree = (): Readonly<Ref<RenderNode[]>> =>\n bindShell({ key: () => undefined, read: (shell) => shell.getShellRenderTree(), subscribe: subscribeState });\n\nexport const useShellState = (): Readonly<Ref<StateSnapshot>> =>\n bindShell({ key: () => undefined, read: (shell) => shell.getState(), subscribe: subscribeState });\n\n// The shell owns canvas-change equality — onCanvasChange only fires on\n// meaningful change, so no comparator lives here.\nexport const useCanvas = (canvasId: MaybeRefOrGetter<string>): Readonly<Ref<CanvasState>> =>\n bindShell({\n key: () => toValue(canvasId),\n read: (shell, id) => shell.getCanvasState(id),\n subscribe: (shell, id, notify) => shell.onCanvasChange(id, () => notify()),\n });\n\n// Listens to one runtime AND to the shell: the instance may not exist yet, or\n// be replaced under the same id, so a state change showing a different\n// runtime under the id re-attaches the runtime listener.\nconst subscribeRuntime =\n (listen: (runtime: PublicActionRuntime, notify: () => void) => Unsubscribe) =>\n (shell: Shell, instanceId: string, notify: () => void): Unsubscribe => {\n let current = shell.getRuntime(instanceId);\n let offRuntime = current === undefined ? undefined : listen(current, notify);\n const offState = shell.onStateChange(() => {\n const next = shell.getRuntime(instanceId);\n if (next !== current) {\n offRuntime?.();\n current = next;\n offRuntime = current === undefined ? undefined : listen(current, notify);\n }\n notify();\n });\n return () => {\n offRuntime?.();\n offState();\n };\n };\n\nconst onData = subscribeRuntime((runtime, notify) => runtime.onDataChange(() => notify()));\nconst onStatus = subscribeRuntime((runtime, notify) => runtime.onStatusChange(() => notify()));\n\nexport const useActionData = (instanceId: MaybeRefOrGetter<string>): Readonly<Ref<Record<string, unknown> | undefined>> =>\n bindShell({ key: () => toValue(instanceId), read: (shell, id) => shell.getRuntime(id)?.getData(), subscribe: onData });\n\nexport const useActionStatus = (instanceId: MaybeRefOrGetter<string>): Readonly<Ref<ActionStatus | undefined>> =>\n bindShell({ key: () => toValue(instanceId), read: (shell, id) => shell.getRuntime(id)?.instance.status, subscribe: onStatus });\n\n// One instance's rendered tree. Two inputs: the runtime's data and the shell's\n// phrasebook (setPhrases changes the words without touching any data), so it\n// listens to both and caches on both — an unrelated state change hands back\n// the same tree and Vue skips the re-render.\nexport const useRenderTree = (instanceId: MaybeRefOrGetter<string>): Readonly<Ref<RenderNode[]>> => {\n let cache: { data: Record<string, unknown>; phrases: Phrasebook | undefined; tree: RenderNode[] } | undefined;\n return bindShell({\n key: () => toValue(instanceId),\n read: (shell, id) => {\n const runtime = shell.getRuntime(id);\n if (runtime === undefined) {\n cache = undefined;\n return EMPTY;\n }\n const data = runtime.getData();\n const phrases = shell.getPhrases();\n if (cache !== undefined && cache.data === data && cache.phrases === phrases) return cache.tree;\n const tree = runtime.render();\n cache = { data, phrases, tree };\n return tree;\n },\n subscribe: onData,\n });\n};\n","import { defineComponent, h } from 'vue';\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 = defineComponent(\n (props: ErrorMarkerProps) => () => h('span', { 'data-nova-error': props.code, role: 'alert' }, `[${props.code}] ${props.message}`),\n { name: 'NovaErrorMarker', props: ['code', 'message'] },\n);\n","import { defineComponent, inject, onMounted, provide, shallowRef, watch, type InjectionKey, type ShallowRef } from 'vue';\nimport type { Shell } from '@shell';\nimport { createShellHead, type ShellHead } from '../../document/shell-head';\n\n// ═══════════════════════════════════════════════════════════\n// A head node (`nova:head`), in Vue — the twin of the React adapter's.\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// Everything here starts in `onMounted`, which does not run where a screen is\n// drawn to a string — so none of it touches a document that is not a browser's.\n// ═══════════════════════════════════════════════════════════\n\n// `Symbol.for`, as the adapter's other keys are (./context).\nconst ShellHeadKey: InjectionKey<ShallowRef<ShellHead>> = Symbol.for('@niscorp/nova/adapters/vue:head');\n\nexport const HeadMark = defineComponent(\n () => {\n const head = inject(ShellHeadKey, undefined);\n onMounted(() => {\n if (head === undefined) return;\n // a swapped shell has another head: leave the one, enter the other\n watch(\n head,\n (current, _previous, onCleanup) => {\n current.enter();\n onCleanup(current.leave);\n },\n { immediate: true },\n );\n });\n return () => null;\n },\n { name: 'NovaHeadMark' },\n);\n\n// Called in a provider's setup: every head below it reports to this shell's,\n// and the shell is watched for as long as the provider stands.\nexport const provideShellHead = (shell: () => Shell): void => {\n let held = shell();\n const head = shallowRef(createShellHead(held));\n provide(ShellHeadKey, head);\n onMounted(() => {\n watch(\n shell,\n (next, _previous, onCleanup) => {\n if (next !== held) {\n held = next;\n head.value = createShellHead(next);\n }\n onCleanup(head.value.watch());\n },\n { immediate: true },\n );\n });\n};\n","import type { Component } from 'vue';\nimport type { ComponentMeta } from '@layout';\nimport type { NovaEvent } from '@shared/event-bus';\n\n// ═══════════════════════════════════════════════════════════\n// Dispatch / publish contracts exposed to rendered components\n// via provide/inject. Components never touch the shell directly.\n// ═══════════════════════════════════════════════════════════\n\nexport type NovaDispatch = (event: NovaEvent) => void;\nexport type NovaPublish = (channel: string, payload?: unknown) => void;\n\n// ═══════════════════════════════════════════════════════════\n// Framework-injected props. Layout `props` are spread on top; a node's\n// children arrive as the DEFAULT SLOT — an array of per-child vnodes keyed by\n// core's renderNodeKey, so a component can address them individually.\n// ═══════════════════════════════════════════════════════════\n\nexport type NovaModelBinding = {\n ref: string;\n path: string;\n};\n\nexport type NovaComponentProps = {\n novaModel?: NovaModelBinding;\n novaRef?: string;\n};\n\n// Any Vue component — a `defineComponent` result or a plain functional\n// component. A functional component with no declared `props` receives the\n// node's props, novaRef and novaModel all as props. A static `.meta` is picked\n// up by the registry (`register` / `registerAll`).\nexport type NovaComponent = Component & {\n meta?: ComponentMeta;\n};\n\n// The registry holds arbitrary values; the walker renders only what can be a\n// Vue component — a function (functional / constructor) or an options object.\nexport const isNovaComponent = (value: unknown): value is NovaComponent =>\n typeof value === 'function' || (typeof value === 'object' && value !== null);\n","import { Fragment, createTextVNode, defineComponent, h, inject, type VNode } from 'vue';\nimport { NOVA_MODEL_PROP, NOVA_REF_PROP, renderNodeKey, type RenderNode } from '@layout';\nimport { isHeadNode } from '@shell';\nimport { NovaRenderKey, type NovaRenderContextValue } from './context';\nimport { ErrorMarker } from './error-marker';\nimport { HeadMark } from './head';\nimport { RenderTree } from './render-tree';\nimport { isNovaComponent } from './types';\n\nexport type RenderNodeViewProps = {\n node: RenderNode;\n};\n\n// A node's children as the component's default slot: one keyed RenderNodeView\n// per child (not one RenderTree wrapper), so a component can address them\n// individually — a Grid wraps each in a weighted cell.\nconst childViews = (children: RenderNode[]): VNode[] =>\n children.map((child, i) => h(RenderNodeView, { node: child, key: renderNodeKey(child, i) }));\n\nconst renderNode = (ctx: NovaRenderContextValue, node: RenderNode): VNode => {\n if (node.type === 'text') return createTextVNode(node.value);\n if (node.type === 'fragment') return h(RenderTree, { nodes: node.children });\n if (node.type === 'error') return h(ErrorMarker, { code: node.code, message: node.message });\n\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 h(HeadMark);\n\n // node.type === 'component' — an unknown name never throws\n const registered = ctx.registry.get(node.name)?.component;\n const component = isNovaComponent(registered) ? registered : ctx.fallback;\n if (component === undefined) return h(ErrorMarker, { code: 'COMPONENT_NOT_FOUND', message: node.name });\n const props: Record<string, unknown> = { ...node.props };\n if (node.model !== undefined) props[NOVA_MODEL_PROP] = { ref: node.model.ref, path: node.model.path };\n if (node.ref !== undefined) props[NOVA_REF_PROP] = node.ref;\n const { children } = node;\n if (children.length === 0) return h(component, props);\n if (!children.some(isHeadNode)) return h(component, props, { default: () => childViews(children) });\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 shown = children.filter((child) => !isHeadNode(child));\n return h(Fragment, [\n shown.length === 0 ? h(component, props) : h(component, props, { default: () => childViews(shown) }),\n ...children.filter(isHeadNode).map((_head, i) => h(HeadMark, { key: `head:${i}` })),\n ]);\n};\n\nexport const RenderNodeView = defineComponent(\n (props: RenderNodeViewProps) => {\n const ctx = inject(NovaRenderKey, undefined);\n if (ctx === undefined) throw new Error('RenderNodeView must be used inside <NovaRenderProvider>');\n return () => renderNode(ctx, props.node);\n },\n { name: 'NovaRenderNode', props: ['node'] },\n);\n","import { defineComponent, h } from 'vue';\nimport { renderNodeKey, type RenderNode } from '@layout';\nimport { RenderNodeView } from './render-node';\n\nexport type RenderTreeProps = {\n nodes: RenderNode[];\n};\n\n// A fragment of keyed node views — list identity is core's renderNodeKey.\nexport const RenderTree = defineComponent(\n (props: RenderTreeProps) => () => props.nodes.map((node, i) => h(RenderNodeView, { node, key: renderNodeKey(node, i) })),\n { name: 'NovaRenderTree', props: ['nodes'] },\n);\n","import { defineComponent, h, inject, provide } from 'vue';\nimport { scopeDispatch } from '@shared/event-bus';\nimport { ActionSlotPropsSchema, CanvasSlotPropsSchema, type ActionSlotProps, type CanvasSlotProps } from '../../primitive-props';\nimport { NovaRenderKey, type NovaRenderContextValue } from '../context';\nimport { useShellSource } from '../composables/context';\nimport { useCanvasRenderTree, useRenderTree } from '../composables/shell';\nimport { RenderTree } from '../render-tree';\n\n// ═══════════════════════════════════════════════════════════\n// The shell-backed structural slots (ADAPTER.md §4). They pull from the shell\n// injection, so they render only inside <NovaShellProvider>. A remote host (a\n// moss terminal) registers its own wire-backed pair under the same names.\n// ═══════════════════════════════════════════════════════════\n\nexport { CanvasSlotPropsSchema, type CanvasSlotProps, ActionSlotPropsSchema, type ActionSlotProps };\n\n// ─── CanvasSlot ────────────────────────────────────────────\n\nexport const CanvasSlot = Object.assign(\n defineComponent(\n (props: CanvasSlotProps) => {\n const tree = useCanvasRenderTree(() => props.canvasId);\n return () => (props.canvasId === undefined || props.canvasId === '' ? null : h(RenderTree, { nodes: tree.value }));\n },\n { name: 'NovaCanvasSlot', props: ['canvasId'], inheritAttrs: false },\n ),\n {\n meta: {\n description: 'Renders a canvas by id, recursing into its actionLayout.',\n propsSchema: CanvasSlotPropsSchema,\n },\n },\n);\n\n// ─── ActionSlot ────────────────────────────────────────────\n\n// Re-provides the render context with dispatch scoped to one instance, so the\n// runtime delivers UI events from its subtree to that instance's own triggers\n// only. The stamping rule is core's scopeDispatch — not reimplemented here. It\n// sits INSIDE the slot wrapper, as in the React adapter: the wrapper itself is\n// outside the instance.\nconst InstanceScope = defineComponent(\n (props: { instanceId: string }, { slots }) => {\n const parent = inject(NovaRenderKey, undefined);\n if (parent !== undefined) {\n const scoped: NovaRenderContextValue = {\n get registry() {\n return parent.registry;\n },\n get dispatch() {\n return scopeDispatch(parent.dispatch, props.instanceId);\n },\n get publish() {\n return parent.publish;\n },\n get slotWrapper() {\n return parent.slotWrapper;\n },\n get fallback() {\n return parent.fallback;\n },\n };\n provide(NovaRenderKey, scoped);\n }\n return () => slots.default?.();\n },\n { name: 'NovaInstanceScope', props: ['instanceId'] },\n);\n\nexport const ActionSlot = Object.assign(\n defineComponent(\n (props: ActionSlotProps) => {\n const source = useShellSource();\n const ctx = inject(NovaRenderKey, undefined);\n const tree = useRenderTree(() => props.instanceId ?? '');\n return () => {\n const instanceId = props.instanceId;\n const hasInstance = instanceId !== undefined && instanceId !== '';\n const content =\n hasInstance && tree.value.length > 0\n ? h(InstanceScope, { instanceId }, { default: () => h(RenderTree, { nodes: tree.value }) })\n : null;\n const Wrapper = ctx?.slotWrapper;\n if (Wrapper === undefined) return content;\n // With a wrapper, render it PERSISTENTLY (content or null) so a\n // presence-managing wrapper can animate an instance leaving. Identity\n // resolves from the live runtime; undefined while empty or exiting.\n const runtime = hasInstance ? source.shell.getRuntime(instanceId) : undefined;\n return h(\n Wrapper,\n { canvasId: runtime?.instance.canvasId, instanceId: hasInstance ? instanceId : undefined, action: runtime?.definition },\n { default: () => content },\n );\n };\n },\n { name: 'NovaActionSlot', props: ['instanceId'], inheritAttrs: false },\n ),\n {\n meta: {\n description: 'Renders an action instance by id. Used inside a canvas actionLayout.',\n propsSchema: ActionSlotPropsSchema,\n },\n },\n);\n","// ═══════════════════════════════════════════════════════════\n// @niscorp/nova/adapters/vue/components\n//\n// Headless Vue component set for Nova layouts — the same vocabulary, and the\n// same props schemas, as the React kit. Every component carries static\n// `.meta` (description + Zod props schema). `registerNovaVueComponents`\n// batches them into a registry via `registerAll`.\n// ═══════════════════════════════════════════════════════════\n\nimport type { ComponentRegistry } from '@layout';\nimport { Box, Stack, Text } from './layout';\nimport { Button, Input } from './controls';\nimport { JsonTree, Panel } from './introspection';\nimport { ActionSlot, CanvasSlot } from './slots';\n\nexport { Stack, StackPropsSchema, type StackProps } from './layout';\nexport { Text, TextPropsSchema, type TextProps } from './layout';\nexport { Box, BoxPropsSchema, type BoxProps } from './layout';\nexport { Input, InputPropsSchema, type InputProps } from './controls';\nexport { Button, ButtonPropsSchema, type ButtonProps } from './controls';\n\n// ─── Introspection primitives (used by nova/devtools) ──────\nexport { Panel, PanelPropsSchema, type PanelProps } from './introspection';\nexport { JsonTree, JsonTreePropsSchema, type JsonTreeProps } from './introspection';\n\n// ─── Shell slots ───────────────────────────────────────────\n// Shell-aware: they read the shell injection and must render inside a\n// <NovaShellProvider>. A remote host registers its own pair under the names.\nexport { CanvasSlot, CanvasSlotPropsSchema, type CanvasSlotProps } from './slots';\nexport { ActionSlot, ActionSlotPropsSchema, type ActionSlotProps } from './slots';\n\n// ─── Bulk registration helper ──────────────────────────────\n// Typed over the untyped registry so it takes a kit's\n// ComponentRegistry<NovaComponent> and a shell's registry alike.\nexport const registerNovaVueComponents = (registry: ComponentRegistry): 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"]}
@@ -1,6 +1,6 @@
1
1
  import { collectInteractive } from './chunk-OGD5CCMZ.js';
2
2
  import { passFor, isBinding, swap, walkValue } from './chunk-7TS3YVQR.js';
3
- import { HEAD_NAME } from './chunk-X7SSNSQC.js';
3
+ import { HEAD_SCRIPT_NAME, HEAD_LINK_NAME, HEAD_META_NAME, HEAD_TITLE_NAME, HEAD_NAME, HEAD_NAMES } from './chunk-OE4E6IBD.js';
4
4
  import { OPS, DefinitionValidationError, LayoutRefNotFoundError, getPath, NovaError, RenderError, ComponentNotFoundError } from './chunk-DIFE573X.js';
5
5
  import { LayoutNodeSchema } from './chunk-JI7ZRESP.js';
6
6
  import { isArray, isObject, hasKey } from './chunk-RBU5PHN4.js';
@@ -270,7 +270,7 @@ var renderNode = (node, chain, ctx) => {
270
270
  return [];
271
271
  };
272
272
  var renderComponent = (node, chain, ctx) => {
273
- if (node.component !== HEAD_NAME && !ctx.registry.has(node.component)) {
273
+ if (!HEAD_NAMES.includes(node.component) && !ctx.registry.has(node.component)) {
274
274
  throw new ComponentNotFoundError(
275
275
  `Component not found in registry: ${node.component}`,
276
276
  { name: node.component }
@@ -461,19 +461,35 @@ var createLayoutStore = () => {
461
461
  };
462
462
  return { get, set, delete: remove, list, resolveReferences };
463
463
  };
464
- var HEAD_DESCRIPTION = "What this screen says it is: its title, description and preview picture. Draws nothing. One per screen, holding everything it says: where several are on a screen the last one is used whole, and they are never merged.";
465
- var HeadPropsSchema = z.object({
466
- title: z.string().optional().describe("The name of what this screen shows. Written as given: it becomes the document title and the title of its preview."),
467
- description: z.string().optional().describe("One or two sentences saying what this screen shows, as plain text."),
468
- image: z.string().optional().describe(
469
- "Address of a picture that stands for this screen where a link to it is previewed: an absolute URL, or a path. A path is made absolute against the page\u2019s own address when the site\u2019s address is known, and written as given when it is not."
470
- ),
471
- kind: z.enum(["website", "article"]).optional().describe("What sort of thing this screen is. `article`: a piece of writing that stands on its own. `website`: anything else. Left out, nothing is written and the document keeps what it already says."),
472
- structured: z.union([z.record(z.string(), z.unknown()), z.array(z.record(z.string(), z.unknown()))]).optional().describe("Structured data about what this screen shows: a JSON-LD object, or a list of them. Written as given, so each object carries its own `@context` and `@type`.")
473
- }).strict().describe(HEAD_DESCRIPTION);
464
+ var REFUSED_ATTRIBUTES = "an attribute whose name starts with `on`, or a prop whose name is not an attribute\u2019s name";
465
+ var AttributeSchema = z.union([z.string(), z.number(), z.boolean()]).describe(
466
+ "An attribute\u2019s 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."
467
+ );
468
+ var HeadPropsSchema = z.object({}).strict().describe(
469
+ "The document\u2019s <head>. Takes no props. Its children are the elements the head holds \u2014 `nova:title`, `nova:meta`, `nova:link`, `nova:script` \u2014 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\u2019s 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."
470
+ );
471
+ var HeadTitlePropsSchema = z.object({}).strict().describe(
472
+ "The document\u2019s <title>, inside `nova:head`. Takes no props. Its text is given as its children: a text string, which may hold bindings \u2014 not components. A title with no text is left out."
473
+ );
474
+ var HeadMetaPropsSchema = z.record(z.string(), AttributeSchema).describe(
475
+ `A <meta> element, inside \`nova:head\`. Its props are the element\u2019s 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\u2019s 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}.`
476
+ );
477
+ var HeadLinkPropsSchema = z.record(z.string(), AttributeSchema).describe(
478
+ `A <link> element, inside \`nova:head\`. Its props are the element\u2019s 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\u2019s 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}.`
479
+ );
480
+ var HeadScriptPropsSchema = z.object({
481
+ type: z.string().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."),
482
+ data: z.unknown().describe("What the block holds: the value itself \u2014 an object, a list, a number, text \u2014 which is serialised as JSON. Not JSON already written as text. Nothing, `null` or an empty string counts as no data.")
483
+ }).catchall(AttributeSchema).describe(
484
+ `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\u2019s 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}.`
485
+ );
486
+ var described = (schema) => ({ description: schema.description ?? "", propsSchema: schema });
474
487
  var HEAD_META = {
475
- description: HEAD_DESCRIPTION,
476
- propsSchema: HeadPropsSchema
488
+ [HEAD_NAME]: described(HeadPropsSchema),
489
+ [HEAD_TITLE_NAME]: described(HeadTitlePropsSchema),
490
+ [HEAD_META_NAME]: described(HeadMetaPropsSchema),
491
+ [HEAD_LINK_NAME]: described(HeadLinkPropsSchema),
492
+ [HEAD_SCRIPT_NAME]: described(HeadScriptPropsSchema)
477
493
  };
478
494
 
479
495
  // src/action/compose.ts
@@ -754,6 +770,6 @@ var mountInputKeys = (definition) => {
754
770
  return keys;
755
771
  };
756
772
 
757
- export { HEAD_META, HeadPropsSchema, NOVA_MODEL_PROP, NOVA_REF_PROP, auditAction, collectChannels, composeAction, createLayoutStore, createScopeChain, declaredKeys, fillSlots, gesturedKeys, isComponentNode, isConditionalNode, isLayoutNode, isLayoutPrimitive, isLayoutRefNode, isLoopNode, isMutationStep, isSlotNode, lifecycleKeys, loadedKeys, mountInputKeys, render, renderLayout, renderLayoutFromStore, renderNodeKey, resolve };
758
- //# sourceMappingURL=chunk-RXECI7DE.js.map
759
- //# sourceMappingURL=chunk-RXECI7DE.js.map
773
+ export { HEAD_META, HeadLinkPropsSchema, HeadMetaPropsSchema, HeadPropsSchema, HeadScriptPropsSchema, HeadTitlePropsSchema, NOVA_MODEL_PROP, NOVA_REF_PROP, auditAction, collectChannels, composeAction, createLayoutStore, createScopeChain, declaredKeys, fillSlots, gesturedKeys, isComponentNode, isConditionalNode, isLayoutNode, isLayoutPrimitive, isLayoutRefNode, isLoopNode, isMutationStep, isSlotNode, lifecycleKeys, loadedKeys, mountInputKeys, render, renderLayout, renderLayoutFromStore, renderNodeKey, resolve };
774
+ //# sourceMappingURL=chunk-Y6XVPRYH.js.map
775
+ //# sourceMappingURL=chunk-Y6XVPRYH.js.map