@niscorp/nova 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/ACTION_DOCS.md +552 -0
  2. package/ADAPTER.md +170 -0
  3. package/DESIGN.md +719 -0
  4. package/I18N_DOCS.md +224 -0
  5. package/LAYOUT_DOCS.md +505 -0
  6. package/LICENSE +202 -0
  7. package/REACT_DOCS.md +562 -0
  8. package/README.md +379 -0
  9. package/SHELL_DOCS.md +615 -0
  10. package/TERMINAL_DOCS.md +124 -0
  11. package/dist/adapters/dom/components/index.cjs +473 -0
  12. package/dist/adapters/dom/components/index.cjs.map +1 -0
  13. package/dist/adapters/dom/components/index.d.cts +48 -0
  14. package/dist/adapters/dom/components/index.d.ts +48 -0
  15. package/dist/adapters/dom/components/index.js +420 -0
  16. package/dist/adapters/dom/components/index.js.map +1 -0
  17. package/dist/adapters/dom/index.cjs +171 -0
  18. package/dist/adapters/dom/index.cjs.map +1 -0
  19. package/dist/adapters/dom/index.d.cts +29 -0
  20. package/dist/adapters/dom/index.d.ts +29 -0
  21. package/dist/adapters/dom/index.js +15 -0
  22. package/dist/adapters/dom/index.js.map +1 -0
  23. package/dist/adapters/dom/server.cjs +129 -0
  24. package/dist/adapters/dom/server.cjs.map +1 -0
  25. package/dist/adapters/dom/server.d.cts +15 -0
  26. package/dist/adapters/dom/server.d.ts +15 -0
  27. package/dist/adapters/dom/server.js +37 -0
  28. package/dist/adapters/dom/server.js.map +1 -0
  29. package/dist/adapters/ink/index.d.ts +75 -0
  30. package/dist/adapters/ink/index.js +472 -0
  31. package/dist/adapters/ink/index.js.map +1 -0
  32. package/dist/adapters/react/components/index.cjs +552 -0
  33. package/dist/adapters/react/components/index.cjs.map +1 -0
  34. package/dist/adapters/react/components/index.d.cts +30 -0
  35. package/dist/adapters/react/components/index.d.ts +30 -0
  36. package/dist/adapters/react/components/index.js +12 -0
  37. package/dist/adapters/react/components/index.js.map +1 -0
  38. package/dist/adapters/react/index.cjs +1526 -0
  39. package/dist/adapters/react/index.cjs.map +1 -0
  40. package/dist/adapters/react/index.d.cts +149 -0
  41. package/dist/adapters/react/index.d.ts +149 -0
  42. package/dist/adapters/react/index.js +12 -0
  43. package/dist/adapters/react/index.js.map +1 -0
  44. package/dist/adapters/tty/components/index.cjs +255 -0
  45. package/dist/adapters/tty/components/index.cjs.map +1 -0
  46. package/dist/adapters/tty/components/index.d.cts +40 -0
  47. package/dist/adapters/tty/components/index.d.ts +40 -0
  48. package/dist/adapters/tty/components/index.js +187 -0
  49. package/dist/adapters/tty/components/index.js.map +1 -0
  50. package/dist/adapters/tty/index.cjs +76 -0
  51. package/dist/adapters/tty/index.cjs.map +1 -0
  52. package/dist/adapters/tty/index.d.cts +47 -0
  53. package/dist/adapters/tty/index.d.ts +47 -0
  54. package/dist/adapters/tty/index.js +76 -0
  55. package/dist/adapters/tty/index.js.map +1 -0
  56. package/dist/adapters/vue/components/index.cjs +619 -0
  57. package/dist/adapters/vue/components/index.cjs.map +1 -0
  58. package/dist/adapters/vue/components/index.d.cts +224 -0
  59. package/dist/adapters/vue/components/index.d.ts +224 -0
  60. package/dist/adapters/vue/components/index.js +12 -0
  61. package/dist/adapters/vue/components/index.js.map +1 -0
  62. package/dist/adapters/vue/index.cjs +747 -0
  63. package/dist/adapters/vue/index.cjs.map +1 -0
  64. package/dist/adapters/vue/index.d.cts +98 -0
  65. package/dist/adapters/vue/index.d.ts +98 -0
  66. package/dist/adapters/vue/index.js +127 -0
  67. package/dist/adapters/vue/index.js.map +1 -0
  68. package/dist/agent/index.cjs +178 -0
  69. package/dist/agent/index.cjs.map +1 -0
  70. package/dist/agent/index.d.cts +28 -0
  71. package/dist/agent/index.d.ts +28 -0
  72. package/dist/agent/index.js +30 -0
  73. package/dist/agent/index.js.map +1 -0
  74. package/dist/chunk-2MNLEL45.js +47 -0
  75. package/dist/chunk-2MNLEL45.js.map +1 -0
  76. package/dist/chunk-3HGE3VWK.js +753 -0
  77. package/dist/chunk-3HGE3VWK.js.map +1 -0
  78. package/dist/chunk-4ZID7UX5.js +549 -0
  79. package/dist/chunk-4ZID7UX5.js.map +1 -0
  80. package/dist/chunk-7B3RDENH.js +1982 -0
  81. package/dist/chunk-7B3RDENH.js.map +1 -0
  82. package/dist/chunk-7S5BNPUS.js +54 -0
  83. package/dist/chunk-7S5BNPUS.js.map +1 -0
  84. package/dist/chunk-7TS3YVQR.js +114 -0
  85. package/dist/chunk-7TS3YVQR.js.map +1 -0
  86. package/dist/chunk-EG2RUXJN.js +266 -0
  87. package/dist/chunk-EG2RUXJN.js.map +1 -0
  88. package/dist/chunk-GVBBL36G.js +429 -0
  89. package/dist/chunk-GVBBL36G.js.map +1 -0
  90. package/dist/chunk-I5D2R5UA.js +753 -0
  91. package/dist/chunk-I5D2R5UA.js.map +1 -0
  92. package/dist/chunk-IGLCWXQ3.js +304 -0
  93. package/dist/chunk-IGLCWXQ3.js.map +1 -0
  94. package/dist/chunk-JI7ZRESP.js +64 -0
  95. package/dist/chunk-JI7ZRESP.js.map +1 -0
  96. package/dist/chunk-L5223LLX.js +31 -0
  97. package/dist/chunk-L5223LLX.js.map +1 -0
  98. package/dist/chunk-LA3BSEMX.js +1905 -0
  99. package/dist/chunk-LA3BSEMX.js.map +1 -0
  100. package/dist/chunk-OAMC6R6E.js +121 -0
  101. package/dist/chunk-OAMC6R6E.js.map +1 -0
  102. package/dist/chunk-OGD5CCMZ.js +62 -0
  103. package/dist/chunk-OGD5CCMZ.js.map +1 -0
  104. package/dist/chunk-PF4OJTYU.js +199 -0
  105. package/dist/chunk-PF4OJTYU.js.map +1 -0
  106. package/dist/chunk-PZ5AY32C.js +9 -0
  107. package/dist/chunk-PZ5AY32C.js.map +1 -0
  108. package/dist/chunk-RBU5PHN4.js +8 -0
  109. package/dist/chunk-RBU5PHN4.js.map +1 -0
  110. package/dist/chunk-RQB4PRPV.js +285 -0
  111. package/dist/chunk-RQB4PRPV.js.map +1 -0
  112. package/dist/chunk-V32EVEVM.js +464 -0
  113. package/dist/chunk-V32EVEVM.js.map +1 -0
  114. package/dist/chunk-ZITHBBF3.js +85 -0
  115. package/dist/chunk-ZITHBBF3.js.map +1 -0
  116. package/dist/devtools/index.cjs +1088 -0
  117. package/dist/devtools/index.cjs.map +1 -0
  118. package/dist/devtools/index.d.cts +33 -0
  119. package/dist/devtools/index.d.ts +33 -0
  120. package/dist/devtools/index.js +399 -0
  121. package/dist/devtools/index.js.map +1 -0
  122. package/dist/effects-CndX9K7D.d.cts +123 -0
  123. package/dist/effects-CndX9K7D.d.ts +123 -0
  124. package/dist/endpoints-CD-6Jl-H.d.ts +36 -0
  125. package/dist/endpoints-Dem-EdRx.d.cts +36 -0
  126. package/dist/i18n/index.cjs +299 -0
  127. package/dist/i18n/index.cjs.map +1 -0
  128. package/dist/i18n/index.d.cts +28 -0
  129. package/dist/i18n/index.d.ts +28 -0
  130. package/dist/i18n/index.js +180 -0
  131. package/dist/i18n/index.js.map +1 -0
  132. package/dist/index-CNfzSBe2.d.ts +93 -0
  133. package/dist/index-caZoXSwr.d.cts +93 -0
  134. package/dist/index.cjs +3723 -0
  135. package/dist/index.cjs.map +1 -0
  136. package/dist/index.d.cts +144 -0
  137. package/dist/index.d.ts +144 -0
  138. package/dist/index.js +15 -0
  139. package/dist/index.js.map +1 -0
  140. package/dist/migrations/index.cjs +635 -0
  141. package/dist/migrations/index.cjs.map +1 -0
  142. package/dist/migrations/index.d.cts +97 -0
  143. package/dist/migrations/index.d.ts +97 -0
  144. package/dist/migrations/index.js +50 -0
  145. package/dist/migrations/index.js.map +1 -0
  146. package/dist/palette-CP0wd3bE.d.ts +15 -0
  147. package/dist/palette-lm0bU9i5.d.cts +15 -0
  148. package/dist/primitive-props-BH_EJWIe.d.cts +100 -0
  149. package/dist/primitive-props-BH_EJWIe.d.ts +100 -0
  150. package/dist/primitive-props-CGoJvmcH.d.cts +100 -0
  151. package/dist/primitive-props-CGoJvmcH.d.ts +100 -0
  152. package/dist/reflect/index.cjs +998 -0
  153. package/dist/reflect/index.cjs.map +1 -0
  154. package/dist/reflect/index.d.cts +125 -0
  155. package/dist/reflect/index.d.ts +125 -0
  156. package/dist/reflect/index.js +13 -0
  157. package/dist/reflect/index.js.map +1 -0
  158. package/dist/schemas-DPdeFlCT.d.cts +38 -0
  159. package/dist/schemas-DPdeFlCT.d.ts +38 -0
  160. package/dist/schemas-pMyyuXV7.d.cts +47 -0
  161. package/dist/schemas-pMyyuXV7.d.ts +47 -0
  162. package/dist/types-Boh9ckdG.d.ts +194 -0
  163. package/dist/types-Brc7v_pS.d.ts +198 -0
  164. package/dist/types-ByNSwtUV.d.cts +20 -0
  165. package/dist/types-DdltMfw7.d.ts +20 -0
  166. package/dist/types-De0KpxfI.d.cts +198 -0
  167. package/dist/types-DhHL0twe.d.ts +20 -0
  168. package/dist/types-Dv6JLmgo.d.cts +194 -0
  169. package/dist/types-Q80YtOQt.d.cts +20 -0
  170. package/package.json +237 -0
@@ -0,0 +1,144 @@
1
+ import { R as RenderContext, a as RenderOnError, b as RenderNode, D as DataStoreView, L as LayoutStore, C as ComponentRegistry } from './types-De0KpxfI.cjs';
2
+ export { c as ComponentEntry, d as ComponentMeta, e as ComponentNotFoundContext, f as ComponentNotFoundError, g as DefinitionValidationContext, h as DefinitionValidationError, i as DefinitionValidationFailure, E as ErrorCode, j as ErrorCodes, k as EventMeta, l as LayoutRefNotFoundContext, m as LayoutRefNotFoundError, n as LifecycleError, o as LifecycleErrorContext, p as LifecycleHook, M as ModelBindingDescriptor, N as NovaError, q as NovaErrorContext, r as RegistrationInput, s as RenderComponentNode, t as RenderError, u as RenderErrorNode, v as RenderFragmentNode, w as RenderTextNode, S as ShellDisposedError, U as UnknownActionContext, x as UnknownActionError, y as UnknownFragmentContext, z as UnknownFragmentError, A as UnknownFunctionContext, B as UnknownFunctionError, F as Unsubscribe } from './types-De0KpxfI.cjs';
3
+ import { S as ShellConfig, a as Shell, R as RenderApi } from './types-Dv6JLmgo.cjs';
4
+ export { A as ActionInstance, b as ActionStatus, C as CanvasConfig, c as CanvasInitialSeed, d as CanvasState, e as ChannelHandler, D as DataChangeHandler, E as EventBus, f as EventHandler, F as FetchFn, g as FetchInit, h as FetchResponse, i as FunctionHandler, I as IdFactory, M as MessageBus, N as NavigateHandler, j as NavigationEffect, P as PublicActionRuntime, k as PushOptions, l as ShellCanvasChangeHandler, m as ShellDataChangeEvent, n as ShellDataChangeHandler, o as ShellStateChangeHandler, p as ShellTelemetry, q as StateSnapshot, r as StatusChangeHandler, T as TransformFn, s as createIdFactory } from './types-Dv6JLmgo.cjs';
5
+ import { N as NovaEvent } from './schemas-pMyyuXV7.cjs';
6
+ export { a as NovaEventSchema } from './schemas-pMyyuXV7.cjs';
7
+ import { z } from 'zod';
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
+ 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 { L as LayoutPaletteEntry, P as PaletteFromRegistryOptions, p as paletteEntryOf, a as paletteFromRegistry } from './palette-lm0bU9i5.cjs';
11
+ import { A as ActionDefinition, a as ActionFragment } from './index-caZoXSwr.cjs';
12
+ export { b as ActionDefinitionSchema, c as ActionFragmentSchema } from './index-caZoXSwr.cjs';
13
+ import { S as Step } from './effects-CndX9K7D.cjs';
14
+ export { C as CallEffect, E as Effect, a as EffectSchema, b as EmitEffect, M as Mutation, c as MutationSchema, P as PopEffect, d as PushEffect, R as ReplaceEffect, e as StepSchema } from './effects-CndX9K7D.cjs';
15
+ export { E as EndpointConfig, a as EndpointConfigSchema, T as TriggerConfig, b as TriggerConfigSchema } from './endpoints-Dem-EdRx.cjs';
16
+
17
+ declare const getPath: (data: unknown, path: string) => unknown;
18
+
19
+ declare const scopeDispatch: (dispatch: (event: NovaEvent) => void, origin: string) => ((event: NovaEvent) => void);
20
+
21
+ declare const MessageEnvelopeSchema: z.ZodObject<{
22
+ channel: z.ZodString;
23
+ from: z.ZodOptional<z.ZodString>;
24
+ to: z.ZodOptional<z.ZodString>;
25
+ payload: z.ZodOptional<z.ZodUnknown>;
26
+ }, z.core.$strict>;
27
+ type MessageEnvelope = z.infer<typeof MessageEnvelopeSchema>;
28
+
29
+ declare const isLayoutPrimitive: (value: unknown) => value is LayoutPrimitive;
30
+ declare const isComponentNode: (value: unknown) => value is ComponentNode;
31
+ declare const isConditionalNode: (value: unknown) => value is ConditionalNode;
32
+ declare const isLoopNode: (value: unknown) => value is LoopNode;
33
+ declare const isLayoutRefNode: (value: unknown) => value is LayoutRefNode;
34
+ declare const isSlotNode: (value: unknown) => value is SlotNode;
35
+ declare const isLayoutNode: (value: unknown) => value is LayoutNode;
36
+
37
+ declare const renderLayout: (node: LayoutNode, data: Record<string, unknown>, ctx: RenderContext) => RenderNode[];
38
+ type RenderOptions = {
39
+ layout: LayoutNode;
40
+ data?: Record<string, unknown>;
41
+ store: RenderContext['store'];
42
+ registry: RenderContext['registry'];
43
+ strict?: boolean;
44
+ onError?: RenderOnError;
45
+ phrases?: RenderContext['phrases'];
46
+ phraseKeys?: RenderContext['phraseKeys'];
47
+ onPhraseMiss?: RenderContext['onPhraseMiss'];
48
+ };
49
+ declare const render: (options: RenderOptions) => RenderNode[];
50
+ declare const renderLayoutFromStore: (node: LayoutNode, store: DataStoreView, ctx: RenderContext) => RenderNode[];
51
+
52
+ declare const fillSlots: (layout: LayoutNode, fills: Record<string, LayoutNode>) => LayoutNode;
53
+
54
+ declare const NOVA_MODEL_PROP = "novaModel";
55
+ declare const NOVA_REF_PROP = "novaRef";
56
+ declare const renderNodeKey: (node: RenderNode, index: number) => string;
57
+
58
+ declare const createLayoutStore: () => LayoutStore;
59
+
60
+ declare const createComponentRegistry: <TComponent = unknown>() => ComponentRegistry<TComponent>;
61
+
62
+ declare const LifecycleConfigSchema: z.ZodObject<{
63
+ mount: z.ZodOptional<z.ZodArray<z.ZodType<Step, unknown, z.core.$ZodTypeInternals<Step, unknown>>>>;
64
+ unmount: z.ZodOptional<z.ZodArray<z.ZodType<Step, unknown, z.core.$ZodTypeInternals<Step, unknown>>>>;
65
+ suspend: z.ZodOptional<z.ZodArray<z.ZodType<Step, unknown, z.core.$ZodTypeInternals<Step, unknown>>>>;
66
+ resume: z.ZodOptional<z.ZodArray<z.ZodType<Step, unknown, z.core.$ZodTypeInternals<Step, unknown>>>>;
67
+ }, z.core.$strict>;
68
+ type LifecycleConfig = z.infer<typeof LifecycleConfigSchema>;
69
+
70
+ declare const composeAction: (action: ActionDefinition, fragments: ActionFragment[]) => ActionDefinition;
71
+
72
+ type AuditCatalogEntry = {
73
+ id: string;
74
+ input?: Record<string, unknown>;
75
+ };
76
+ type AuditOptions = {
77
+ catalog?: ReadonlyArray<AuditCatalogEntry>;
78
+ channels?: ReadonlyArray<string>;
79
+ };
80
+ type AuditResult = {
81
+ ok: boolean;
82
+ issues: string[];
83
+ };
84
+ type ChannelUsage = {
85
+ emits: string[];
86
+ listens: string[];
87
+ };
88
+ declare const collectChannels: (definition: ActionDefinition) => ChannelUsage;
89
+ declare const auditAction: (definition: ActionDefinition, options?: AuditOptions) => AuditResult;
90
+
91
+ declare const createShell: (config: ShellConfig) => Shell;
92
+
93
+ type ShellView = {
94
+ api: RenderApi;
95
+ subscribe: (listener: () => void) => () => void;
96
+ };
97
+ declare const hasVisibleContent: (nodes: readonly RenderNode[]) => boolean;
98
+ declare const canvasTreeOf: (shell: Shell, canvasId: string) => RenderNode[];
99
+ declare const shellView: (shell: Shell) => ShellView;
100
+ declare const DEFAULT_SETTLE_WAIT_MS = 300;
101
+ declare const shellSettled: (shell: Shell, options?: {
102
+ waitMs?: number;
103
+ stopped?: () => boolean;
104
+ }) => Promise<boolean>;
105
+
106
+ type HistoryFrame = {
107
+ instance: string;
108
+ action: string;
109
+ input?: Record<string, unknown>;
110
+ with?: string[];
111
+ };
112
+ type HistoryEntry = {
113
+ canvas: string;
114
+ stack: readonly HistoryFrame[];
115
+ };
116
+ declare const DEFAULT_HISTORY_DEPTH = 50;
117
+
118
+ declare const navigatedChannel: (canvasId: string) => string;
119
+ type NavigatedMessage = {
120
+ canvas: string;
121
+ action?: string;
122
+ instance?: string;
123
+ };
124
+
125
+ declare const CANVAS_SLOT_NAME = "CanvasSlot";
126
+ declare const ACTION_SLOT_NAME = "ActionSlot";
127
+
128
+ type Desired = {
129
+ actionId: string;
130
+ input?: Record<string, unknown>;
131
+ with?: string[];
132
+ };
133
+ type ReconcileOptions = {
134
+ origin: string;
135
+ definitionOf?: (actionId: string) => ActionDefinition | undefined;
136
+ own?: 'pushed' | 'canvas';
137
+ };
138
+ type ReconcileResult = {
139
+ changed: boolean;
140
+ notes: string[];
141
+ };
142
+ declare const reconcileCanvas: (shell: Shell, canvasId: string, desired: readonly Desired[], options: ReconcileOptions) => ReconcileResult;
143
+
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 };
@@ -0,0 +1,144 @@
1
+ import { R as RenderContext, a as RenderOnError, b as RenderNode, D as DataStoreView, L as LayoutStore, C as ComponentRegistry } from './types-Brc7v_pS.js';
2
+ export { c as ComponentEntry, d as ComponentMeta, e as ComponentNotFoundContext, f as ComponentNotFoundError, g as DefinitionValidationContext, h as DefinitionValidationError, i as DefinitionValidationFailure, E as ErrorCode, j as ErrorCodes, k as EventMeta, l as LayoutRefNotFoundContext, m as LayoutRefNotFoundError, n as LifecycleError, o as LifecycleErrorContext, p as LifecycleHook, M as ModelBindingDescriptor, N as NovaError, q as NovaErrorContext, r as RegistrationInput, s as RenderComponentNode, t as RenderError, u as RenderErrorNode, v as RenderFragmentNode, w as RenderTextNode, S as ShellDisposedError, U as UnknownActionContext, x as UnknownActionError, y as UnknownFragmentContext, z as UnknownFragmentError, A as UnknownFunctionContext, B as UnknownFunctionError, F as Unsubscribe } from './types-Brc7v_pS.js';
3
+ import { S as ShellConfig, a as Shell, R as RenderApi } from './types-Boh9ckdG.js';
4
+ export { A as ActionInstance, b as ActionStatus, C as CanvasConfig, c as CanvasInitialSeed, d as CanvasState, e as ChannelHandler, D as DataChangeHandler, E as EventBus, f as EventHandler, F as FetchFn, g as FetchInit, h as FetchResponse, i as FunctionHandler, I as IdFactory, M as MessageBus, N as NavigateHandler, j as NavigationEffect, P as PublicActionRuntime, k as PushOptions, l as ShellCanvasChangeHandler, m as ShellDataChangeEvent, n as ShellDataChangeHandler, o as ShellStateChangeHandler, p as ShellTelemetry, q as StateSnapshot, r as StatusChangeHandler, T as TransformFn, s as createIdFactory } from './types-Boh9ckdG.js';
5
+ import { N as NovaEvent } from './schemas-pMyyuXV7.js';
6
+ export { a as NovaEventSchema } from './schemas-pMyyuXV7.js';
7
+ import { z } from 'zod';
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
+ 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 { L as LayoutPaletteEntry, P as PaletteFromRegistryOptions, p as paletteEntryOf, a as paletteFromRegistry } from './palette-CP0wd3bE.js';
11
+ import { A as ActionDefinition, a as ActionFragment } from './index-CNfzSBe2.js';
12
+ export { b as ActionDefinitionSchema, c as ActionFragmentSchema } from './index-CNfzSBe2.js';
13
+ import { S as Step } from './effects-CndX9K7D.js';
14
+ export { C as CallEffect, E as Effect, a as EffectSchema, b as EmitEffect, M as Mutation, c as MutationSchema, P as PopEffect, d as PushEffect, R as ReplaceEffect, e as StepSchema } from './effects-CndX9K7D.js';
15
+ export { E as EndpointConfig, a as EndpointConfigSchema, T as TriggerConfig, b as TriggerConfigSchema } from './endpoints-CD-6Jl-H.js';
16
+
17
+ declare const getPath: (data: unknown, path: string) => unknown;
18
+
19
+ declare const scopeDispatch: (dispatch: (event: NovaEvent) => void, origin: string) => ((event: NovaEvent) => void);
20
+
21
+ declare const MessageEnvelopeSchema: z.ZodObject<{
22
+ channel: z.ZodString;
23
+ from: z.ZodOptional<z.ZodString>;
24
+ to: z.ZodOptional<z.ZodString>;
25
+ payload: z.ZodOptional<z.ZodUnknown>;
26
+ }, z.core.$strict>;
27
+ type MessageEnvelope = z.infer<typeof MessageEnvelopeSchema>;
28
+
29
+ declare const isLayoutPrimitive: (value: unknown) => value is LayoutPrimitive;
30
+ declare const isComponentNode: (value: unknown) => value is ComponentNode;
31
+ declare const isConditionalNode: (value: unknown) => value is ConditionalNode;
32
+ declare const isLoopNode: (value: unknown) => value is LoopNode;
33
+ declare const isLayoutRefNode: (value: unknown) => value is LayoutRefNode;
34
+ declare const isSlotNode: (value: unknown) => value is SlotNode;
35
+ declare const isLayoutNode: (value: unknown) => value is LayoutNode;
36
+
37
+ declare const renderLayout: (node: LayoutNode, data: Record<string, unknown>, ctx: RenderContext) => RenderNode[];
38
+ type RenderOptions = {
39
+ layout: LayoutNode;
40
+ data?: Record<string, unknown>;
41
+ store: RenderContext['store'];
42
+ registry: RenderContext['registry'];
43
+ strict?: boolean;
44
+ onError?: RenderOnError;
45
+ phrases?: RenderContext['phrases'];
46
+ phraseKeys?: RenderContext['phraseKeys'];
47
+ onPhraseMiss?: RenderContext['onPhraseMiss'];
48
+ };
49
+ declare const render: (options: RenderOptions) => RenderNode[];
50
+ declare const renderLayoutFromStore: (node: LayoutNode, store: DataStoreView, ctx: RenderContext) => RenderNode[];
51
+
52
+ declare const fillSlots: (layout: LayoutNode, fills: Record<string, LayoutNode>) => LayoutNode;
53
+
54
+ declare const NOVA_MODEL_PROP = "novaModel";
55
+ declare const NOVA_REF_PROP = "novaRef";
56
+ declare const renderNodeKey: (node: RenderNode, index: number) => string;
57
+
58
+ declare const createLayoutStore: () => LayoutStore;
59
+
60
+ declare const createComponentRegistry: <TComponent = unknown>() => ComponentRegistry<TComponent>;
61
+
62
+ declare const LifecycleConfigSchema: z.ZodObject<{
63
+ mount: z.ZodOptional<z.ZodArray<z.ZodType<Step, unknown, z.core.$ZodTypeInternals<Step, unknown>>>>;
64
+ unmount: z.ZodOptional<z.ZodArray<z.ZodType<Step, unknown, z.core.$ZodTypeInternals<Step, unknown>>>>;
65
+ suspend: z.ZodOptional<z.ZodArray<z.ZodType<Step, unknown, z.core.$ZodTypeInternals<Step, unknown>>>>;
66
+ resume: z.ZodOptional<z.ZodArray<z.ZodType<Step, unknown, z.core.$ZodTypeInternals<Step, unknown>>>>;
67
+ }, z.core.$strict>;
68
+ type LifecycleConfig = z.infer<typeof LifecycleConfigSchema>;
69
+
70
+ declare const composeAction: (action: ActionDefinition, fragments: ActionFragment[]) => ActionDefinition;
71
+
72
+ type AuditCatalogEntry = {
73
+ id: string;
74
+ input?: Record<string, unknown>;
75
+ };
76
+ type AuditOptions = {
77
+ catalog?: ReadonlyArray<AuditCatalogEntry>;
78
+ channels?: ReadonlyArray<string>;
79
+ };
80
+ type AuditResult = {
81
+ ok: boolean;
82
+ issues: string[];
83
+ };
84
+ type ChannelUsage = {
85
+ emits: string[];
86
+ listens: string[];
87
+ };
88
+ declare const collectChannels: (definition: ActionDefinition) => ChannelUsage;
89
+ declare const auditAction: (definition: ActionDefinition, options?: AuditOptions) => AuditResult;
90
+
91
+ declare const createShell: (config: ShellConfig) => Shell;
92
+
93
+ type ShellView = {
94
+ api: RenderApi;
95
+ subscribe: (listener: () => void) => () => void;
96
+ };
97
+ declare const hasVisibleContent: (nodes: readonly RenderNode[]) => boolean;
98
+ declare const canvasTreeOf: (shell: Shell, canvasId: string) => RenderNode[];
99
+ declare const shellView: (shell: Shell) => ShellView;
100
+ declare const DEFAULT_SETTLE_WAIT_MS = 300;
101
+ declare const shellSettled: (shell: Shell, options?: {
102
+ waitMs?: number;
103
+ stopped?: () => boolean;
104
+ }) => Promise<boolean>;
105
+
106
+ type HistoryFrame = {
107
+ instance: string;
108
+ action: string;
109
+ input?: Record<string, unknown>;
110
+ with?: string[];
111
+ };
112
+ type HistoryEntry = {
113
+ canvas: string;
114
+ stack: readonly HistoryFrame[];
115
+ };
116
+ declare const DEFAULT_HISTORY_DEPTH = 50;
117
+
118
+ declare const navigatedChannel: (canvasId: string) => string;
119
+ type NavigatedMessage = {
120
+ canvas: string;
121
+ action?: string;
122
+ instance?: string;
123
+ };
124
+
125
+ declare const CANVAS_SLOT_NAME = "CanvasSlot";
126
+ declare const ACTION_SLOT_NAME = "ActionSlot";
127
+
128
+ type Desired = {
129
+ actionId: string;
130
+ input?: Record<string, unknown>;
131
+ with?: string[];
132
+ };
133
+ type ReconcileOptions = {
134
+ origin: string;
135
+ definitionOf?: (actionId: string) => ActionDefinition | undefined;
136
+ own?: 'pushed' | 'canvas';
137
+ };
138
+ type ReconcileResult = {
139
+ changed: boolean;
140
+ notes: string[];
141
+ };
142
+ declare const reconcileCanvas: (shell: Shell, canvasId: string, desired: readonly Desired[], options: ReconcileOptions) => ReconcileResult;
143
+
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 };
package/dist/index.js ADDED
@@ -0,0 +1,15 @@
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-7B3RDENH.js';
3
+ export { auditAction, collectChannels, composeAction } from './chunk-RQB4PRPV.js';
4
+ 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
+ import './chunk-7TS3YVQR.js';
9
+ export { ComponentNotFoundError, DefinitionValidationError, ErrorCodes, LayoutRefNotFoundError, LifecycleError, NovaError, RenderError, ShellDisposedError, UnknownActionError, UnknownFragmentError, UnknownFunctionError, getPath } from './chunk-PF4OJTYU.js';
10
+ export { ComponentNodeSchema, ConditionalNodeSchema, LayoutNodeSchema, LayoutPrimitiveSchema, LayoutRefNodeSchema, LoopNodeSchema, SlotNodeSchema } from './chunk-JI7ZRESP.js';
11
+ import './chunk-RBU5PHN4.js';
12
+ export { createComponentRegistry } from './chunk-2MNLEL45.js';
13
+ import './chunk-PZ5AY32C.js';
14
+ //# sourceMappingURL=index.js.map
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}