@niscorp/nova 0.1.3 → 0.1.4

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 (86) hide show
  1. package/ADAPTER.md +6 -0
  2. package/CHANGELOG.md +14 -0
  3. package/README.md +28 -0
  4. package/dist/adapters/dom/index.cjs +98 -4
  5. package/dist/adapters/dom/index.cjs.map +1 -1
  6. package/dist/adapters/dom/index.js +7 -7
  7. package/dist/adapters/dom/server.cjs +12 -1
  8. package/dist/adapters/dom/server.cjs.map +1 -1
  9. package/dist/adapters/dom/server.js +7 -7
  10. package/dist/adapters/react/components/index.cjs +32 -10
  11. package/dist/adapters/react/components/index.cjs.map +1 -1
  12. package/dist/adapters/react/components/index.d.cts +2 -2
  13. package/dist/adapters/react/components/index.d.ts +2 -2
  14. package/dist/adapters/react/components/index.js +9 -5
  15. package/dist/adapters/react/index.cjs +268 -97
  16. package/dist/adapters/react/index.cjs.map +1 -1
  17. package/dist/adapters/react/index.js +9 -5
  18. package/dist/adapters/tty/index.cjs +8 -1
  19. package/dist/adapters/tty/index.cjs.map +1 -1
  20. package/dist/adapters/tty/index.js +12 -1
  21. package/dist/adapters/tty/index.js.map +1 -1
  22. package/dist/adapters/vue/components/index.cjs +32 -1
  23. package/dist/adapters/vue/components/index.cjs.map +1 -1
  24. package/dist/adapters/vue/components/index.d.cts +1 -1
  25. package/dist/adapters/vue/components/index.d.ts +1 -1
  26. package/dist/adapters/vue/components/index.js +9 -5
  27. package/dist/adapters/vue/index.cjs +218 -23
  28. package/dist/adapters/vue/index.cjs.map +1 -1
  29. package/dist/adapters/vue/index.js +10 -9
  30. package/dist/adapters/vue/index.js.map +1 -1
  31. package/dist/{chunk-7S5BNPUS.js → chunk-4ERQYDF6.js} +36 -4
  32. package/dist/chunk-4ERQYDF6.js.map +1 -0
  33. package/dist/{chunk-FQAJ24KA.js → chunk-4I2PFMY7.js} +33 -8
  34. package/dist/chunk-4I2PFMY7.js.map +1 -0
  35. package/dist/{chunk-IGLCWXQ3.js → chunk-7PKS7UYL.js} +3 -3
  36. package/dist/{chunk-IGLCWXQ3.js.map → chunk-7PKS7UYL.js.map} +1 -1
  37. package/dist/{chunk-GVBBL36G.js → chunk-DIFE573X.js} +196 -4
  38. package/dist/chunk-DIFE573X.js.map +1 -0
  39. package/dist/chunk-EHHJJLRX.js +16 -0
  40. package/dist/chunk-EHHJJLRX.js.map +1 -0
  41. package/dist/{chunk-3HGE3VWK.js → chunk-KYQ4EAQH.js} +33 -11
  42. package/dist/chunk-KYQ4EAQH.js.map +1 -0
  43. package/dist/{chunk-V32EVEVM.js → chunk-RXECI7DE.js} +300 -5
  44. package/dist/chunk-RXECI7DE.js.map +1 -0
  45. package/dist/{chunk-4ZID7UX5.js → chunk-UUYXVOK2.js} +52 -8
  46. package/dist/chunk-UUYXVOK2.js.map +1 -0
  47. package/dist/chunk-UV5YGBHQ.js +62 -0
  48. package/dist/chunk-UV5YGBHQ.js.map +1 -0
  49. package/dist/{chunk-6N4WRC5V.js → chunk-WZVQ5PUB.js} +85 -12
  50. package/dist/chunk-WZVQ5PUB.js.map +1 -0
  51. package/dist/chunk-X7SSNSQC.js +6 -0
  52. package/dist/chunk-X7SSNSQC.js.map +1 -0
  53. package/dist/devtools/index.js +4 -5
  54. package/dist/devtools/index.js.map +1 -1
  55. package/dist/document/index.cjs +199 -0
  56. package/dist/document/index.cjs.map +1 -0
  57. package/dist/document/index.d.cts +20 -0
  58. package/dist/document/index.d.ts +20 -0
  59. package/dist/document/index.js +125 -0
  60. package/dist/document/index.js.map +1 -0
  61. package/dist/head-BNj8GwPO.d.cts +20 -0
  62. package/dist/head-CS6X6ZKr.d.ts +20 -0
  63. package/dist/index.cjs +77 -1
  64. package/dist/index.cjs.map +1 -1
  65. package/dist/index.d.cts +27 -1
  66. package/dist/index.d.ts +27 -1
  67. package/dist/index.js +5 -6
  68. package/dist/migrations/index.js +1 -2
  69. package/dist/migrations/index.js.map +1 -1
  70. package/dist/reflect/index.js +4 -5
  71. package/package.json +12 -2
  72. package/dist/chunk-3HGE3VWK.js.map +0 -1
  73. package/dist/chunk-4ZID7UX5.js.map +0 -1
  74. package/dist/chunk-6N4WRC5V.js.map +0 -1
  75. package/dist/chunk-7S5BNPUS.js.map +0 -1
  76. package/dist/chunk-FQAJ24KA.js.map +0 -1
  77. package/dist/chunk-GVBBL36G.js.map +0 -1
  78. package/dist/chunk-PF4OJTYU.js +0 -199
  79. package/dist/chunk-PF4OJTYU.js.map +0 -1
  80. package/dist/chunk-RQB4PRPV.js +0 -285
  81. package/dist/chunk-RQB4PRPV.js.map +0 -1
  82. package/dist/chunk-V32EVEVM.js.map +0 -1
  83. package/dist/chunk-ZITHBBF3.js +0 -85
  84. package/dist/chunk-ZITHBBF3.js.map +0 -1
  85. package/dist/{primitive-props-BH_EJWIe.d.ts → primitive-props-Cl5jiC8g.d.cts} +1 -1
  86. package/dist/{primitive-props-BH_EJWIe.d.cts → primitive-props-Cl5jiC8g.d.ts} +1 -1
package/dist/index.d.cts CHANGED
@@ -7,6 +7,7 @@ export { a as NovaEventSchema } from './schemas-pMyyuXV7.cjs';
7
7
  import { z } from 'zod';
8
8
  import { C as ComponentNode, a as ConditionalNode, L as LayoutNode, b as LayoutPrimitive, c as LayoutRefNode, d as LoopNode, S as SlotNode } from './schemas-DPdeFlCT.cjs';
9
9
  export { e as ComponentNodeSchema, f as ConditionalNodeSchema, g as LayoutNodeSchema, h as LayoutPrimitiveSchema, i as LayoutRefNodeSchema, j as LoopNodeSchema, k as SlotNodeSchema } from './schemas-DPdeFlCT.cjs';
10
+ export { H as HEAD_NAME, a as Head, S as ScreenHead, h as headOf, i as isHeadNode } from './head-BNj8GwPO.cjs';
10
11
  export { L as LayoutPaletteEntry, P as PaletteFromRegistryOptions, p as paletteEntryOf, a as paletteFromRegistry } from './palette-wbJB_svk.cjs';
11
12
  import { A as ActionDefinition, a as ActionFragment } from './index-caZoXSwr.cjs';
12
13
  export { b as ActionDefinitionSchema, c as ActionFragmentSchema } from './index-caZoXSwr.cjs';
@@ -59,6 +60,31 @@ declare const createLayoutStore: () => LayoutStore;
59
60
 
60
61
  declare const createComponentRegistry: <TComponent = unknown>() => ComponentRegistry<TComponent>;
61
62
 
63
+ declare const HeadPropsSchema: z.ZodObject<{
64
+ title: z.ZodOptional<z.ZodString>;
65
+ description: z.ZodOptional<z.ZodString>;
66
+ image: z.ZodOptional<z.ZodString>;
67
+ kind: z.ZodOptional<z.ZodEnum<{
68
+ website: "website";
69
+ article: "article";
70
+ }>>;
71
+ structured: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>]>>;
72
+ }, z.core.$strict>;
73
+ type HeadProps = z.infer<typeof HeadPropsSchema>;
74
+ declare const HEAD_META: {
75
+ description: string;
76
+ propsSchema: z.ZodObject<{
77
+ title: z.ZodOptional<z.ZodString>;
78
+ description: z.ZodOptional<z.ZodString>;
79
+ image: z.ZodOptional<z.ZodString>;
80
+ kind: z.ZodOptional<z.ZodEnum<{
81
+ website: "website";
82
+ article: "article";
83
+ }>>;
84
+ structured: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>]>>;
85
+ }, z.core.$strict>;
86
+ };
87
+
62
88
  declare const LifecycleConfigSchema: z.ZodObject<{
63
89
  mount: z.ZodOptional<z.ZodArray<z.ZodType<Step, unknown, z.core.$ZodTypeInternals<Step, unknown>>>>;
64
90
  unmount: z.ZodOptional<z.ZodArray<z.ZodType<Step, unknown, z.core.$ZodTypeInternals<Step, unknown>>>>;
@@ -141,4 +167,4 @@ type ReconcileResult = {
141
167
  };
142
168
  declare const reconcileCanvas: (shell: Shell, canvasId: string, desired: readonly Desired[], options: ReconcileOptions) => ReconcileResult;
143
169
 
144
- export { ACTION_SLOT_NAME, ActionDefinition, ActionFragment, type AuditCatalogEntry, type AuditOptions, type AuditResult, CANVAS_SLOT_NAME, type ChannelUsage, ComponentNode, ComponentRegistry, ConditionalNode, DEFAULT_HISTORY_DEPTH, DEFAULT_SETTLE_WAIT_MS, type Desired, type HistoryEntry, type HistoryFrame, LayoutNode, LayoutPrimitive, LayoutRefNode, LayoutStore, type LifecycleConfig, LifecycleConfigSchema, LoopNode, type MessageEnvelope, MessageEnvelopeSchema, NOVA_MODEL_PROP, NOVA_REF_PROP, type NavigatedMessage, NovaEvent, type ReconcileOptions, type ReconcileResult, RenderApi, RenderNode, RenderOnError, type RenderOptions, Shell, ShellConfig, type ShellView, SlotNode, Step, auditAction, canvasTreeOf, collectChannels, composeAction, createComponentRegistry, createLayoutStore, createShell, fillSlots, getPath, hasVisibleContent, isComponentNode, isConditionalNode, isLayoutNode, isLayoutPrimitive, isLayoutRefNode, isLoopNode, isSlotNode, navigatedChannel, reconcileCanvas, render, renderLayout, renderLayoutFromStore, renderNodeKey, scopeDispatch, shellSettled, shellView };
170
+ export { ACTION_SLOT_NAME, ActionDefinition, ActionFragment, type AuditCatalogEntry, type AuditOptions, type AuditResult, CANVAS_SLOT_NAME, type ChannelUsage, ComponentNode, ComponentRegistry, ConditionalNode, DEFAULT_HISTORY_DEPTH, DEFAULT_SETTLE_WAIT_MS, type Desired, HEAD_META, type HeadProps, HeadPropsSchema, type HistoryEntry, type HistoryFrame, LayoutNode, LayoutPrimitive, LayoutRefNode, LayoutStore, type LifecycleConfig, LifecycleConfigSchema, LoopNode, type MessageEnvelope, MessageEnvelopeSchema, NOVA_MODEL_PROP, NOVA_REF_PROP, type NavigatedMessage, NovaEvent, type ReconcileOptions, type ReconcileResult, RenderApi, RenderNode, RenderOnError, type RenderOptions, Shell, ShellConfig, type ShellView, SlotNode, Step, auditAction, canvasTreeOf, collectChannels, composeAction, createComponentRegistry, createLayoutStore, createShell, fillSlots, getPath, hasVisibleContent, isComponentNode, isConditionalNode, isLayoutNode, isLayoutPrimitive, isLayoutRefNode, isLoopNode, isSlotNode, navigatedChannel, reconcileCanvas, render, renderLayout, renderLayoutFromStore, renderNodeKey, scopeDispatch, shellSettled, shellView };
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export { a as NovaEventSchema } from './schemas-pMyyuXV7.js';
7
7
  import { z } from 'zod';
8
8
  import { C as ComponentNode, a as ConditionalNode, L as LayoutNode, b as LayoutPrimitive, c as LayoutRefNode, d as LoopNode, S as SlotNode } from './schemas-DPdeFlCT.js';
9
9
  export { e as ComponentNodeSchema, f as ConditionalNodeSchema, g as LayoutNodeSchema, h as LayoutPrimitiveSchema, i as LayoutRefNodeSchema, j as LoopNodeSchema, k as SlotNodeSchema } from './schemas-DPdeFlCT.js';
10
+ export { H as HEAD_NAME, a as Head, S as ScreenHead, h as headOf, i as isHeadNode } from './head-CS6X6ZKr.js';
10
11
  export { L as LayoutPaletteEntry, P as PaletteFromRegistryOptions, p as paletteEntryOf, a as paletteFromRegistry } from './palette-Mx7XHYC6.js';
11
12
  import { A as ActionDefinition, a as ActionFragment } from './index-CNfzSBe2.js';
12
13
  export { b as ActionDefinitionSchema, c as ActionFragmentSchema } from './index-CNfzSBe2.js';
@@ -59,6 +60,31 @@ declare const createLayoutStore: () => LayoutStore;
59
60
 
60
61
  declare const createComponentRegistry: <TComponent = unknown>() => ComponentRegistry<TComponent>;
61
62
 
63
+ declare const HeadPropsSchema: z.ZodObject<{
64
+ title: z.ZodOptional<z.ZodString>;
65
+ description: z.ZodOptional<z.ZodString>;
66
+ image: z.ZodOptional<z.ZodString>;
67
+ kind: z.ZodOptional<z.ZodEnum<{
68
+ website: "website";
69
+ article: "article";
70
+ }>>;
71
+ structured: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>]>>;
72
+ }, z.core.$strict>;
73
+ type HeadProps = z.infer<typeof HeadPropsSchema>;
74
+ declare const HEAD_META: {
75
+ description: string;
76
+ propsSchema: z.ZodObject<{
77
+ title: z.ZodOptional<z.ZodString>;
78
+ description: z.ZodOptional<z.ZodString>;
79
+ image: z.ZodOptional<z.ZodString>;
80
+ kind: z.ZodOptional<z.ZodEnum<{
81
+ website: "website";
82
+ article: "article";
83
+ }>>;
84
+ structured: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>]>>;
85
+ }, z.core.$strict>;
86
+ };
87
+
62
88
  declare const LifecycleConfigSchema: z.ZodObject<{
63
89
  mount: z.ZodOptional<z.ZodArray<z.ZodType<Step, unknown, z.core.$ZodTypeInternals<Step, unknown>>>>;
64
90
  unmount: z.ZodOptional<z.ZodArray<z.ZodType<Step, unknown, z.core.$ZodTypeInternals<Step, unknown>>>>;
@@ -141,4 +167,4 @@ type ReconcileResult = {
141
167
  };
142
168
  declare const reconcileCanvas: (shell: Shell, canvasId: string, desired: readonly Desired[], options: ReconcileOptions) => ReconcileResult;
143
169
 
144
- export { ACTION_SLOT_NAME, ActionDefinition, ActionFragment, type AuditCatalogEntry, type AuditOptions, type AuditResult, CANVAS_SLOT_NAME, type ChannelUsage, ComponentNode, ComponentRegistry, ConditionalNode, DEFAULT_HISTORY_DEPTH, DEFAULT_SETTLE_WAIT_MS, type Desired, type HistoryEntry, type HistoryFrame, LayoutNode, LayoutPrimitive, LayoutRefNode, LayoutStore, type LifecycleConfig, LifecycleConfigSchema, LoopNode, type MessageEnvelope, MessageEnvelopeSchema, NOVA_MODEL_PROP, NOVA_REF_PROP, type NavigatedMessage, NovaEvent, type ReconcileOptions, type ReconcileResult, RenderApi, RenderNode, RenderOnError, type RenderOptions, Shell, ShellConfig, type ShellView, SlotNode, Step, auditAction, canvasTreeOf, collectChannels, composeAction, createComponentRegistry, createLayoutStore, createShell, fillSlots, getPath, hasVisibleContent, isComponentNode, isConditionalNode, isLayoutNode, isLayoutPrimitive, isLayoutRefNode, isLoopNode, isSlotNode, navigatedChannel, reconcileCanvas, render, renderLayout, renderLayoutFromStore, renderNodeKey, scopeDispatch, shellSettled, shellView };
170
+ export { ACTION_SLOT_NAME, ActionDefinition, ActionFragment, type AuditCatalogEntry, type AuditOptions, type AuditResult, CANVAS_SLOT_NAME, type ChannelUsage, ComponentNode, ComponentRegistry, ConditionalNode, DEFAULT_HISTORY_DEPTH, DEFAULT_SETTLE_WAIT_MS, type Desired, HEAD_META, type HeadProps, HeadPropsSchema, type HistoryEntry, type HistoryFrame, LayoutNode, LayoutPrimitive, LayoutRefNode, LayoutStore, type LifecycleConfig, LifecycleConfigSchema, LoopNode, type MessageEnvelope, MessageEnvelopeSchema, NOVA_MODEL_PROP, NOVA_REF_PROP, type NavigatedMessage, NovaEvent, type ReconcileOptions, type ReconcileResult, RenderApi, RenderNode, RenderOnError, type RenderOptions, Shell, ShellConfig, type ShellView, SlotNode, Step, auditAction, canvasTreeOf, collectChannels, composeAction, createComponentRegistry, createLayoutStore, createShell, fillSlots, getPath, hasVisibleContent, isComponentNode, isConditionalNode, isLayoutNode, isLayoutPrimitive, isLayoutRefNode, isLoopNode, isSlotNode, navigatedChannel, reconcileCanvas, render, renderLayout, renderLayoutFromStore, renderNodeKey, scopeDispatch, shellSettled, shellView };
package/dist/index.js CHANGED
@@ -1,12 +1,11 @@
1
1
  export { paletteEntryOf, paletteFromRegistry } from './chunk-L5223LLX.js';
2
- export { ACTION_SLOT_NAME, CANVAS_SLOT_NAME, DEFAULT_HISTORY_DEPTH, DEFAULT_SETTLE_WAIT_MS, MessageEnvelopeSchema, canvasTreeOf, createIdFactory, createShell, hasVisibleContent, navigatedChannel, reconcileCanvas, shellSettled, shellView } from './chunk-6N4WRC5V.js';
3
- export { auditAction, collectChannels, composeAction } from './chunk-RQB4PRPV.js';
2
+ export { DEFAULT_HISTORY_DEPTH, DEFAULT_SETTLE_WAIT_MS, MessageEnvelopeSchema, NovaEventSchema, canvasTreeOf, createIdFactory, createShell, hasVisibleContent, navigatedChannel, reconcileCanvas, scopeDispatch, shellSettled, shellView } from './chunk-WZVQ5PUB.js';
3
+ export { ACTION_SLOT_NAME, CANVAS_SLOT_NAME, headOf, isHeadNode } from './chunk-UV5YGBHQ.js';
4
+ export { HEAD_META, HeadPropsSchema, NOVA_MODEL_PROP, NOVA_REF_PROP, auditAction, collectChannels, composeAction, createLayoutStore, fillSlots, isComponentNode, isConditionalNode, isLayoutNode, isLayoutPrimitive, isLayoutRefNode, isLoopNode, isSlotNode, render, renderLayout, renderLayoutFromStore, renderNodeKey } from './chunk-RXECI7DE.js';
4
5
  import './chunk-OGD5CCMZ.js';
5
- export { ActionDefinitionSchema, ActionFragmentSchema, EffectSchema, EndpointConfigSchema, LifecycleConfigSchema, MutationSchema, StepSchema, TriggerConfigSchema } from './chunk-GVBBL36G.js';
6
- export { NovaEventSchema, scopeDispatch } from './chunk-ZITHBBF3.js';
7
- export { NOVA_MODEL_PROP, NOVA_REF_PROP, createLayoutStore, fillSlots, isComponentNode, isConditionalNode, isLayoutNode, isLayoutPrimitive, isLayoutRefNode, isLoopNode, isSlotNode, render, renderLayout, renderLayoutFromStore, renderNodeKey } from './chunk-V32EVEVM.js';
8
6
  import './chunk-7TS3YVQR.js';
9
- export { ComponentNotFoundError, DefinitionValidationError, ErrorCodes, LayoutRefNotFoundError, LifecycleError, MutationError, NovaError, RenderError, ShellDisposedError, UnknownActionError, UnknownFragmentError, UnknownFunctionError, getPath } from './chunk-PF4OJTYU.js';
7
+ export { HEAD_NAME } from './chunk-X7SSNSQC.js';
8
+ export { ActionDefinitionSchema, ActionFragmentSchema, ComponentNotFoundError, DefinitionValidationError, EffectSchema, EndpointConfigSchema, ErrorCodes, LayoutRefNotFoundError, LifecycleConfigSchema, LifecycleError, MutationError, MutationSchema, NovaError, RenderError, ShellDisposedError, StepSchema, TriggerConfigSchema, UnknownActionError, UnknownFragmentError, UnknownFunctionError, getPath } from './chunk-DIFE573X.js';
10
9
  export { ComponentNodeSchema, ConditionalNodeSchema, LayoutNodeSchema, LayoutPrimitiveSchema, LayoutRefNodeSchema, LoopNodeSchema, SlotNodeSchema } from './chunk-JI7ZRESP.js';
11
10
  import './chunk-RBU5PHN4.js';
12
11
  export { createComponentRegistry } from './chunk-2MNLEL45.js';
@@ -1,5 +1,4 @@
1
- import { ActionFragmentSchema, ActionDefinitionSchema } from '../chunk-GVBBL36G.js';
2
- import '../chunk-PF4OJTYU.js';
1
+ import { ActionFragmentSchema, ActionDefinitionSchema } from '../chunk-DIFE573X.js';
3
2
  import { LayoutNodeSchema } from '../chunk-JI7ZRESP.js';
4
3
  import '../chunk-RBU5PHN4.js';
5
4
  import '../chunk-PZ5AY32C.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/migrations/index.ts"],"names":[],"mappings":";;;;;;;AAsBA,IAAM,YAAA,GAAe;AAAA,EACnB,MAAA,EAAQ,kBAAA;AAAA,EACR,qBAAA,EAAuB,mBAAA;AAAA,EACvB,sBAAA,EAAwB;AAC1B,CAAA;AAEO,IAAM,aAAA,GAA0B;AAAA,EACrC,EAAA,EAAI,WAAA;AAAA,EACJ,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,EAAE,MAAA,EAAQ,YAAA,EAAa;AAAA,IAC/B,QAAA,EAAU,EAAE,MAAA,EAAQ,YAAA,EAAa;AAAA,IACjC,MAAA,EAAQ;AAAA,MACN,MAAA,EAAQ;AAAA,QACN,QAAA,EAAU,kBAAA;AAAA,QACV,YAAA,EAAc,kBAAA;AAAA,QACd,IAAA,EAAM,kBAAA;AAAA,QACN,IAAA,EAAM,kBAAA;AAAA,QACN,EAAA,EAAI;AAAA;AACN;AACF,GACF;AAAA,EACA,UAAA,EAAY;AAAA,IACV;AAAA;AAAA;AAAA,MAGE,WAAA,EAAa,gGAAA;AAAA,MACb,OAAO;AAAC,KACV;AAAA,IACA;AAAA;AAAA,MAEE,WAAA,EAAa,gFAAA;AAAA,MACb,OAAO;AAAC;AACV;AAEJ;AAMO,IAAM,YAAA,GAAe;AAAA,EAC1B,kBAAA,EAAoB,sBAAA;AAAA,EACpB,oBAAA,EAAsB,oBAAA;AAAA,EACtB,kBAAA,EAAoB;AACtB","file":"index.js","sourcesContent":["import type { Sequence } from '@niscorp/strata';\nimport { ActionDefinitionSchema, ActionFragmentSchema } from '../action/schemas';\nimport { LayoutNodeSchema } from '../layout/schemas';\n\n// ═══════════════════════════════════════════════════════════════\n// nova's grammar, as a strata sequence — @niscorp/nova/migrations.\n//\n// The documents nova defines (actions, fragments, layouts) and where each holds\n// other documents. A stored or submitted nova document carries a stamp naming\n// how far along this sequence its writer was; strata runs what it has not seen.\n//\n// THE EMBEDDINGS are the grammar's shape, not a migration's business: every\n// place a layout nests a layout (a lone child, an array of them, a branch, a\n// loop body), and every place an action holds another grammar's document (its\n// endpoints' request and response are Prism configs). With them, a migration\n// rewrites ONE flat node and strata finds every node at every depth.\n//\n// Version 0 is the grammar as it stood when strata arrived. HISTORY: migrations\n// are appended, never edited — a change to ActionDefinitionSchema or the layout\n// schemas that older documents would fail is a migration here.\n// ═══════════════════════════════════════════════════════════════\n\nconst actionEmbeds = {\n layout: 'nisc.nova/layout',\n 'endpoints.*.request': 'nisc.prism/config',\n 'endpoints.*.response': 'nisc.prism/config',\n} as const;\n\nexport const NOVA_SEQUENCE: Sequence = {\n id: 'nisc.nova',\n documents: {\n action: { embeds: actionEmbeds },\n fragment: { embeds: actionEmbeds },\n layout: {\n embeds: {\n children: 'nisc.nova/layout',\n 'children[]': 'nisc.nova/layout',\n then: 'nisc.nova/layout',\n else: 'nisc.nova/layout',\n do: 'nisc.nova/layout',\n },\n },\n },\n migrations: [\n {\n // A MARKER: an addition, so no stored action needs rewriting — but a\n // reader at 0 must refuse an action that uses it.\n description: 'The `reconcile` step: make a canvas hold exactly the actions a list in the action\\'s data names',\n steps: [],\n },\n {\n // A MARKER: an addition. An endpoint may say how long its reply may take.\n description: 'The endpoint `timeoutMs`: how long to wait for the reply before the call fails',\n steps: [],\n },\n ],\n};\n\n// ── the schemas behind the kinds ────────────────────────────────\n//\n// What each nova kind means today — read by the grammar check, which snapshots\n// them and fails when one changes without a migration in NOVA_SEQUENCE.\nexport const NOVA_SCHEMAS = {\n 'nisc.nova/action': ActionDefinitionSchema,\n 'nisc.nova/fragment': ActionFragmentSchema,\n 'nisc.nova/layout': LayoutNodeSchema,\n} as const;\n"]}
1
+ {"version":3,"sources":["../../src/migrations/index.ts"],"names":[],"mappings":";;;;;;AAsBA,IAAM,YAAA,GAAe;AAAA,EACnB,MAAA,EAAQ,kBAAA;AAAA,EACR,qBAAA,EAAuB,mBAAA;AAAA,EACvB,sBAAA,EAAwB;AAC1B,CAAA;AAEO,IAAM,aAAA,GAA0B;AAAA,EACrC,EAAA,EAAI,WAAA;AAAA,EACJ,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,EAAE,MAAA,EAAQ,YAAA,EAAa;AAAA,IAC/B,QAAA,EAAU,EAAE,MAAA,EAAQ,YAAA,EAAa;AAAA,IACjC,MAAA,EAAQ;AAAA,MACN,MAAA,EAAQ;AAAA,QACN,QAAA,EAAU,kBAAA;AAAA,QACV,YAAA,EAAc,kBAAA;AAAA,QACd,IAAA,EAAM,kBAAA;AAAA,QACN,IAAA,EAAM,kBAAA;AAAA,QACN,EAAA,EAAI;AAAA;AACN;AACF,GACF;AAAA,EACA,UAAA,EAAY;AAAA,IACV;AAAA;AAAA;AAAA,MAGE,WAAA,EAAa,gGAAA;AAAA,MACb,OAAO;AAAC,KACV;AAAA,IACA;AAAA;AAAA,MAEE,WAAA,EAAa,gFAAA;AAAA,MACb,OAAO;AAAC;AACV;AAEJ;AAMO,IAAM,YAAA,GAAe;AAAA,EAC1B,kBAAA,EAAoB,sBAAA;AAAA,EACpB,oBAAA,EAAsB,oBAAA;AAAA,EACtB,kBAAA,EAAoB;AACtB","file":"index.js","sourcesContent":["import type { Sequence } from '@niscorp/strata';\nimport { ActionDefinitionSchema, ActionFragmentSchema } from '../action/schemas';\nimport { LayoutNodeSchema } from '../layout/schemas';\n\n// ═══════════════════════════════════════════════════════════════\n// nova's grammar, as a strata sequence — @niscorp/nova/migrations.\n//\n// The documents nova defines (actions, fragments, layouts) and where each holds\n// other documents. A stored or submitted nova document carries a stamp naming\n// how far along this sequence its writer was; strata runs what it has not seen.\n//\n// THE EMBEDDINGS are the grammar's shape, not a migration's business: every\n// place a layout nests a layout (a lone child, an array of them, a branch, a\n// loop body), and every place an action holds another grammar's document (its\n// endpoints' request and response are Prism configs). With them, a migration\n// rewrites ONE flat node and strata finds every node at every depth.\n//\n// Version 0 is the grammar as it stood when strata arrived. HISTORY: migrations\n// are appended, never edited — a change to ActionDefinitionSchema or the layout\n// schemas that older documents would fail is a migration here.\n// ═══════════════════════════════════════════════════════════════\n\nconst actionEmbeds = {\n layout: 'nisc.nova/layout',\n 'endpoints.*.request': 'nisc.prism/config',\n 'endpoints.*.response': 'nisc.prism/config',\n} as const;\n\nexport const NOVA_SEQUENCE: Sequence = {\n id: 'nisc.nova',\n documents: {\n action: { embeds: actionEmbeds },\n fragment: { embeds: actionEmbeds },\n layout: {\n embeds: {\n children: 'nisc.nova/layout',\n 'children[]': 'nisc.nova/layout',\n then: 'nisc.nova/layout',\n else: 'nisc.nova/layout',\n do: 'nisc.nova/layout',\n },\n },\n },\n migrations: [\n {\n // A MARKER: an addition, so no stored action needs rewriting — but a\n // reader at 0 must refuse an action that uses it.\n description: 'The `reconcile` step: make a canvas hold exactly the actions a list in the action\\'s data names',\n steps: [],\n },\n {\n // A MARKER: an addition. An endpoint may say how long its reply may take.\n description: 'The endpoint `timeoutMs`: how long to wait for the reply before the call fails',\n steps: [],\n },\n ],\n};\n\n// ── the schemas behind the kinds ────────────────────────────────\n//\n// What each nova kind means today — read by the grammar check, which snapshots\n// them and fails when one changes without a migration in NOVA_SEQUENCE.\nexport const NOVA_SCHEMAS = {\n 'nisc.nova/action': ActionDefinitionSchema,\n 'nisc.nova/fragment': ActionFragmentSchema,\n 'nisc.nova/layout': LayoutNodeSchema,\n} as const;\n"]}
@@ -1,10 +1,9 @@
1
- export { actionGraph, auditCatalog, chainCycles, classifyAudit, componentsOf, describeInstance, describeShell, isRecord, livenessOf, loopVarsOf, refsOf, snapshotShell, walkNodes } from '../chunk-IGLCWXQ3.js';
2
- export { declaredKeys, gesturedKeys, lifecycleKeys, loadedKeys, mountInputKeys } from '../chunk-RQB4PRPV.js';
1
+ export { actionGraph, auditCatalog, chainCycles, classifyAudit, componentsOf, describeInstance, describeShell, isRecord, livenessOf, loopVarsOf, refsOf, snapshotShell, walkNodes } from '../chunk-7PKS7UYL.js';
2
+ export { declaredKeys, gesturedKeys, lifecycleKeys, loadedKeys, mountInputKeys } from '../chunk-RXECI7DE.js';
3
3
  import '../chunk-OGD5CCMZ.js';
4
- import '../chunk-GVBBL36G.js';
5
- import '../chunk-V32EVEVM.js';
6
4
  import '../chunk-7TS3YVQR.js';
7
- import '../chunk-PF4OJTYU.js';
5
+ import '../chunk-X7SSNSQC.js';
6
+ import '../chunk-DIFE573X.js';
8
7
  import '../chunk-JI7ZRESP.js';
9
8
  import '../chunk-RBU5PHN4.js';
10
9
  import '../chunk-2MNLEL45.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@niscorp/nova",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Declarative UI framework for AI agents — JSON layouts, shell orchestration, React",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -147,6 +147,16 @@
147
147
  "default": "./dist/reflect/index.cjs"
148
148
  }
149
149
  },
150
+ "./document": {
151
+ "import": {
152
+ "types": "./dist/document/index.d.ts",
153
+ "default": "./dist/document/index.js"
154
+ },
155
+ "require": {
156
+ "types": "./dist/document/index.d.cts",
157
+ "default": "./dist/document/index.cjs"
158
+ }
159
+ },
150
160
  "./devtools": {
151
161
  "import": {
152
162
  "types": "./dist/devtools/index.d.ts",
@@ -204,8 +214,8 @@
204
214
  "react": "^19.2.4",
205
215
  "zod": "^4.2.0",
206
216
  "vue": "^3.5.0",
207
- "@niscorp/prism": "^0.1.2",
208
217
  "@niscorp/cortex": "^0.1.1",
218
+ "@niscorp/prism": "^0.1.2",
209
219
  "@niscorp/strata": "^0.1.1"
210
220
  },
211
221
  "peerDependenciesMeta": {
@@ -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/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","Component","createElement","Fragment","useContext","useRef","useCallback","useSyncExternalStore","useMemo","EMPTY","useState","jsxs"],"mappings":";;;;;;;AAUA,IAAM,SAAA,GAAY;AAAA,EAChB,KAAA,EAAO,YAAA;AAAA,EACP,MAAA,EAAQ,QAAA;AAAA,EACR,GAAA,EAAK,UAAA;AAAA,EACL,OAAA,EAAS;AACX,CAAA;AAEA,IAAM,WAAA,GAAc;AAAA,EAClB,KAAA,EAAO,YAAA;AAAA,EACP,MAAA,EAAQ,QAAA;AAAA,EACR,GAAA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AAAA,MACC,QAAA,EAAU,SAAS,QAAA,CAAS,QAAA;AAAA,MAC5B,UAAA,EAAY,cAAc,UAAA,GAAa,MAAA;AAAA,MACvC,QAAQ,OAAA,EAAS,UAAA;AAAA,MAEhB,yBAAe,IAAA,CAAK,MAAA,mBACnBA,GAAAA,CAAC,kBAAkB,QAAA,EAAlB,EAA2B,KAAA,EAAO,MAAA,EACjC,0BAAAA,GAAAA,CAAC,UAAA,EAAA,EAAW,KAAA,EAAO,IAAA,EAAM,GAC3B,CAAA,GACE;AAAA;AAAA,GACN;AAEJ;AAEA,UAAA,CAAW,IAAA,GAAO;AAAA,EAChB,WAAA,EAAa,sEAAA;AAAA,EACb,WAAA,EAAa;AACf,CAAA;;;ACvBO,IAAM,2BAAA,GAA8B,CACzC,QAAA,KACS;AACT,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-3HGE3VWK.js","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 { 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 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 {children}\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 } from 'react';\nimport { NOVA_MODEL_PROP, NOVA_REF_PROP, renderNodeKey, type RenderNode } from '@layout';\nimport { NovaRenderContext } from './context';\nimport { ErrorMarker } from './error-marker';\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 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 return createElement(\n Component,\n props,\n node.children.length === 0\n ? undefined\n : node.children.map((child, i) => <RenderNodeView key={renderNodeKey(child, i)} node={child} />),\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"]}
@@ -1 +0,0 @@
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/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"],"mappings":";;;;;AAiBA,IAAM,EAAA,GAAK,CAAC,KAAA,KAAsC,CAAA,EAAG,SAAS,CAAC,CAAA,EAAA,CAAA;AAI/D,IAAM,SAAA,GAAY;AAAA,EAChB,KAAA,EAAO,YAAA;AAAA,EACP,MAAA,EAAQ,QAAA;AAAA,EACR,GAAA,EAAK,UAAA;AAAA,EACL,OAAA,EAAS;AACX,CAAA;AAEA,IAAM,WAAA,GAAc;AAAA,EAClB,KAAA,EAAO,YAAA;AAAA,EACP,MAA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AA;AAAA,UACL,OAAA;AAAA,UACA,EAAE,QAAA,EAAU,OAAA,EAAS,QAAA,CAAS,QAAA,EAAU,UAAA,EAAY,WAAA,GAAc,UAAA,GAAa,MAAA,EAAW,MAAA,EAAQ,OAAA,EAAS,UAAA,EAAW;AAAA,UACtH,EAAE,OAAA,EAAS,MAAM,OAAA;AAAQ,SAC3B;AAAA,MACF,CAAA;AAAA,IACF,CAAA;AAAA,IACA,EAAE,MAAM,gBAAA,EAAkB,KAAA,EAAO,CAAC,YAAY,CAAA,EAAG,cAAc,KAAA;AAAM,GACvE;AAAA,EACA;AAAA,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-4ZID7UX5.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 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 { createTextVNode, defineComponent, h, inject, type VNode } from 'vue';\nimport { NOVA_MODEL_PROP, NOVA_REF_PROP, renderNodeKey, type RenderNode } from '@layout';\nimport { NovaRenderKey, type NovaRenderContextValue } from './context';\nimport { ErrorMarker } from './error-marker';\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 // 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 return h(component, props, { default: () => childViews(children) });\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"]}