@niscorp/nova 0.2.2 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ACTION_DOCS.md +2 -0
- package/ADAPTER.md +19 -1
- package/CHANGELOG.md +69 -0
- package/I18N_DOCS.md +18 -3
- package/REACT_DOCS.md +4 -2
- package/README.md +93 -3
- package/SHELL_DOCS.md +16 -7
- package/TERMINAL_DOCS.md +24 -5
- package/dist/adapters/dom/components/index.cjs +2 -4
- package/dist/adapters/dom/components/index.cjs.map +1 -1
- package/dist/adapters/dom/components/index.d.cts +4 -4
- package/dist/adapters/dom/components/index.d.ts +4 -4
- package/dist/adapters/dom/components/index.js +1 -3
- package/dist/adapters/dom/components/index.js.map +1 -1
- package/dist/adapters/dom/index.cjs +14 -14
- package/dist/adapters/dom/index.d.cts +4 -4
- package/dist/adapters/dom/index.d.ts +4 -4
- package/dist/adapters/dom/index.js +12 -12
- package/dist/adapters/dom/server.cjs +13 -13
- package/dist/adapters/dom/server.cjs.map +1 -1
- package/dist/adapters/dom/server.d.cts +4 -4
- package/dist/adapters/dom/server.d.ts +4 -4
- package/dist/adapters/dom/server.js +12 -12
- package/dist/adapters/dom/server.js.map +1 -1
- package/dist/adapters/ink/index.js +0 -2
- package/dist/adapters/ink/index.js.map +1 -1
- package/dist/adapters/react/components/index.cjs +32 -32
- package/dist/adapters/react/components/index.d.cts +2 -2
- package/dist/adapters/react/components/index.d.ts +2 -2
- package/dist/adapters/react/components/index.js +13 -13
- package/dist/adapters/react/index.cjs +35 -35
- package/dist/adapters/react/index.d.cts +6 -6
- package/dist/adapters/react/index.d.ts +6 -6
- package/dist/adapters/react/index.js +13 -13
- package/dist/adapters/tty/components/index.cjs +2 -4
- package/dist/adapters/tty/components/index.cjs.map +1 -1
- package/dist/adapters/tty/components/index.d.cts +4 -4
- package/dist/adapters/tty/components/index.d.ts +4 -4
- package/dist/adapters/tty/components/index.js +1 -3
- package/dist/adapters/tty/components/index.js.map +1 -1
- package/dist/adapters/tty/index.cjs +12 -12
- package/dist/adapters/tty/index.cjs.map +1 -1
- package/dist/adapters/tty/index.d.cts +4 -4
- package/dist/adapters/tty/index.d.ts +4 -4
- package/dist/adapters/tty/index.js +10 -10
- package/dist/adapters/tty/index.js.map +1 -1
- package/dist/adapters/vue/components/index.cjs +32 -32
- package/dist/adapters/vue/components/index.d.cts +2 -2
- package/dist/adapters/vue/components/index.d.ts +2 -2
- package/dist/adapters/vue/components/index.js +13 -13
- package/dist/adapters/vue/index.cjs +41 -41
- package/dist/adapters/vue/index.cjs.map +1 -1
- package/dist/adapters/vue/index.d.cts +6 -6
- package/dist/adapters/vue/index.d.ts +6 -6
- package/dist/adapters/vue/index.js +14 -14
- package/dist/adapters/vue/index.js.map +1 -1
- package/dist/agent/index.cjs +6 -6
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.d.cts +2 -2
- package/dist/agent/index.d.ts +2 -2
- package/dist/agent/index.js +3 -3
- package/dist/agent/index.js.map +1 -1
- package/dist/{chunk-SVNK5NIK.js → chunk-2H6Y25FO.js} +6 -6
- package/dist/chunk-2H6Y25FO.js.map +1 -0
- package/dist/{chunk-DU2VIJAF.js → chunk-3JE77TNL.js} +16 -49
- package/dist/chunk-3JE77TNL.js.map +1 -0
- package/dist/{chunk-OE527MXF.cjs → chunk-3XFQI5P2.cjs} +2 -2
- package/dist/chunk-3XFQI5P2.cjs.map +1 -0
- package/dist/{chunk-XQTI4Q4I.js → chunk-A4GK3PLP.js} +4 -4
- package/dist/chunk-A4GK3PLP.js.map +1 -0
- package/dist/{chunk-PMKWYOOX.cjs → chunk-BXUEWV7V.cjs} +2 -2
- package/dist/chunk-BXUEWV7V.cjs.map +1 -0
- package/dist/{chunk-RFBIGRCI.js → chunk-C63CBYD5.js} +3 -3
- package/dist/chunk-C63CBYD5.js.map +1 -0
- package/dist/{chunk-FSUMCJAR.cjs → chunk-CQZH3L3W.cjs} +39 -39
- package/dist/chunk-CQZH3L3W.cjs.map +1 -0
- package/dist/{chunk-UGG7MCX4.cjs → chunk-DC5HONDE.cjs} +2 -2
- package/dist/chunk-DC5HONDE.cjs.map +1 -0
- package/dist/{chunk-OO247V4J.cjs → chunk-DLZNZHUW.cjs} +92 -125
- package/dist/chunk-DLZNZHUW.cjs.map +1 -0
- package/dist/{chunk-VOD5JA4D.js → chunk-EK2GBZ7D.js} +5 -5
- package/dist/chunk-EK2GBZ7D.js.map +1 -0
- package/dist/{chunk-WGPFR7MN.cjs → chunk-FKAPJMNR.cjs} +28 -28
- package/dist/chunk-FKAPJMNR.cjs.map +1 -0
- package/dist/{chunk-DIFE573X.js → chunk-G4OQ4PEO.js} +6 -6
- package/dist/chunk-G4OQ4PEO.js.map +1 -0
- package/dist/{chunk-RBU5PHN4.js → chunk-GQVJ5UAS.js} +2 -2
- package/dist/chunk-GQVJ5UAS.js.map +1 -0
- package/dist/{chunk-3IPM5QBT.cjs → chunk-HDREPLRA.cjs} +13 -13
- package/dist/chunk-HDREPLRA.cjs.map +1 -0
- package/dist/{chunk-TRJYDVWK.cjs → chunk-I35ZD3PU.cjs} +26 -26
- package/dist/chunk-I35ZD3PU.cjs.map +1 -0
- package/dist/{chunk-KW34ZKF5.cjs → chunk-ITGR7P2B.cjs} +2 -2
- package/dist/chunk-ITGR7P2B.cjs.map +1 -0
- package/dist/{chunk-JI7ZRESP.js → chunk-JKULAG53.js} +2 -2
- package/dist/chunk-JKULAG53.js.map +1 -0
- package/dist/{chunk-IZ2UU5UL.cjs → chunk-K54CT3QN.cjs} +50 -69
- package/dist/chunk-K54CT3QN.cjs.map +1 -0
- package/dist/{chunk-7TS3YVQR.js → chunk-M2ZZUSH3.js} +6 -7
- package/dist/chunk-M2ZZUSH3.js.map +1 -0
- package/dist/{chunk-GV7UC3SS.cjs → chunk-MEZCO7ND.cjs} +2 -2
- package/dist/chunk-MEZCO7ND.cjs.map +1 -0
- package/dist/{chunk-D4PUWBN6.cjs → chunk-NBXZ3RAC.cjs} +2 -2
- package/dist/chunk-NBXZ3RAC.cjs.map +1 -0
- package/dist/{chunk-L5223LLX.js → chunk-OBFFZ23H.js} +2 -2
- package/dist/chunk-OBFFZ23H.js.map +1 -0
- package/dist/{chunk-F2H7WP6R.js → chunk-OSIFUROH.js} +6 -6
- package/dist/chunk-OSIFUROH.js.map +1 -0
- package/dist/{chunk-G4LSLLGI.js → chunk-PCUXNVWF.js} +7 -7
- package/dist/chunk-PCUXNVWF.js.map +1 -0
- package/dist/{chunk-WGZZKCJQ.cjs → chunk-QHX3VA55.cjs} +7 -7
- package/dist/chunk-QHX3VA55.cjs.map +1 -0
- package/dist/{chunk-PNQY6OFB.cjs → chunk-QTJ4ZQRM.cjs} +20 -20
- package/dist/chunk-QTJ4ZQRM.cjs.map +1 -0
- package/dist/{chunk-KOYRJXTI.cjs → chunk-RVU6YEHO.cjs} +10 -11
- package/dist/chunk-RVU6YEHO.cjs.map +1 -0
- package/dist/{chunk-5AF72LOE.cjs → chunk-SABSY2BW.cjs} +8 -8
- package/dist/chunk-SABSY2BW.cjs.map +1 -0
- package/dist/{chunk-V4BPFFFV.js → chunk-SCXYAXMO.js} +3 -3
- package/dist/chunk-SCXYAXMO.js.map +1 -0
- package/dist/{chunk-2MNLEL45.js → chunk-SVWDKXSH.js} +2 -2
- package/dist/chunk-SVWDKXSH.js.map +1 -0
- package/dist/{chunk-3JRTELLC.js → chunk-UXFQZX6O.js} +3 -3
- package/dist/chunk-UXFQZX6O.js.map +1 -0
- package/dist/{chunk-OE4E6IBD.js → chunk-Y3UKAJJX.js} +2 -2
- package/dist/chunk-Y3UKAJJX.js.map +1 -0
- package/dist/{chunk-Y6XVPRYH.js → chunk-YV2G37TJ.js} +8 -27
- package/dist/chunk-YV2G37TJ.js.map +1 -0
- package/dist/{chunk-5YQIAS4V.cjs → chunk-ZR54IVVS.cjs} +20 -20
- package/dist/chunk-ZR54IVVS.cjs.map +1 -0
- package/dist/{chunk-TMLNVU5W.cjs → chunk-ZVQKCDUG.cjs} +7 -7
- package/dist/chunk-ZVQKCDUG.cjs.map +1 -0
- package/dist/{chunk-OGD5CCMZ.js → chunk-ZZRQAH5Z.js} +2 -2
- package/dist/chunk-ZZRQAH5Z.js.map +1 -0
- package/dist/devtools/index.cjs +12 -42
- package/dist/devtools/index.cjs.map +1 -1
- package/dist/devtools/index.d.cts +4 -4
- package/dist/devtools/index.d.ts +4 -4
- package/dist/devtools/index.js +9 -39
- package/dist/devtools/index.js.map +1 -1
- package/dist/document/index.cjs +16 -16
- package/dist/document/index.d.cts +6 -6
- package/dist/document/index.d.ts +6 -6
- package/dist/document/index.js +3 -3
- package/dist/{effects-CndX9K7D.d.cts → effects-DkBBrxVj.d.cts} +0 -2
- package/dist/{effects-CndX9K7D.d.ts → effects-DkBBrxVj.d.ts} +0 -2
- package/dist/{endpoints-CD-6Jl-H.d.ts → endpoints-DD6VsLv9.d.ts} +1 -1
- package/dist/{endpoints-Dem-EdRx.d.cts → endpoints-fqx9Vmf6.d.cts} +1 -1
- package/dist/examples/index.cjs +4 -4
- package/dist/examples/index.cjs.map +1 -1
- package/dist/examples/index.d.cts +4 -4
- package/dist/examples/index.d.ts +4 -4
- package/dist/examples/index.js +3 -3
- package/dist/examples/index.js.map +1 -1
- package/dist/{head-CAzfTnpV.d.cts → head-BOjhYA36.d.cts} +2 -2
- package/dist/{head-DRpbbj-l.d.ts → head-CBib11hD.d.ts} +2 -2
- package/dist/i18n/index.cjs +13 -13
- package/dist/i18n/index.d.cts +4 -6
- package/dist/i18n/index.d.ts +4 -6
- package/dist/i18n/index.js +3 -3
- package/dist/{index-CNfzSBe2.d.ts → index-BjQX8XZl.d.ts} +1 -1
- package/dist/{index-caZoXSwr.d.cts → index-BoPH5aSd.d.cts} +1 -1
- package/dist/index.cjs +91 -91
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +11 -11
- package/dist/migrations/index.cjs +8 -9
- package/dist/migrations/index.cjs.map +1 -1
- package/dist/migrations/index.d.cts +1 -1
- package/dist/migrations/index.d.ts +1 -1
- package/dist/migrations/index.js +5 -6
- package/dist/migrations/index.js.map +1 -1
- package/dist/{palette-CIpPH90W.d.ts → palette-BZujb2rm.d.ts} +1 -1
- package/dist/{palette-CvwZZCkx.d.cts → palette-CCxWSi3C.d.cts} +1 -1
- package/dist/reflect/index.cjs +27 -27
- package/dist/reflect/index.d.cts +5 -5
- package/dist/reflect/index.d.ts +5 -5
- package/dist/reflect/index.js +9 -9
- package/dist/{types-qnKMx0_V.d.ts → types-CJC8mnzl.d.ts} +0 -1
- package/dist/{types-j290XhCn.d.cts → types-CR56luN7.d.cts} +0 -1
- package/dist/{types-DsWNYc7R.d.cts → types-D0x56Ya-.d.cts} +1 -1
- package/dist/{types-D23TRvqe.d.ts → types-Dn9cBFCC.d.ts} +3 -3
- package/dist/{types-C9734_lJ.d.cts → types-DzB3TAQj.d.cts} +1 -1
- package/dist/{types-BWc-olbY.d.ts → types-LXw2RJfH.d.ts} +1 -1
- package/dist/{types-qkzTfSye.d.cts → types-OsJI-ceI.d.cts} +3 -3
- package/dist/{types-BSKx5MXW.d.ts → types-pbBIUNxw.d.ts} +1 -1
- package/package.json +7 -7
- package/dist/chunk-2MNLEL45.js.map +0 -1
- package/dist/chunk-3IPM5QBT.cjs.map +0 -1
- package/dist/chunk-3JRTELLC.js.map +0 -1
- package/dist/chunk-5AF72LOE.cjs.map +0 -1
- package/dist/chunk-5YQIAS4V.cjs.map +0 -1
- package/dist/chunk-7TS3YVQR.js.map +0 -1
- package/dist/chunk-D4PUWBN6.cjs.map +0 -1
- package/dist/chunk-DIFE573X.js.map +0 -1
- package/dist/chunk-DU2VIJAF.js.map +0 -1
- package/dist/chunk-F2H7WP6R.js.map +0 -1
- package/dist/chunk-FSUMCJAR.cjs.map +0 -1
- package/dist/chunk-G4LSLLGI.js.map +0 -1
- package/dist/chunk-GV7UC3SS.cjs.map +0 -1
- package/dist/chunk-IZ2UU5UL.cjs.map +0 -1
- package/dist/chunk-JI7ZRESP.js.map +0 -1
- package/dist/chunk-KOYRJXTI.cjs.map +0 -1
- package/dist/chunk-KW34ZKF5.cjs.map +0 -1
- package/dist/chunk-L5223LLX.js.map +0 -1
- package/dist/chunk-OE4E6IBD.js.map +0 -1
- package/dist/chunk-OE527MXF.cjs.map +0 -1
- package/dist/chunk-OGD5CCMZ.js.map +0 -1
- package/dist/chunk-OO247V4J.cjs.map +0 -1
- package/dist/chunk-PMKWYOOX.cjs.map +0 -1
- package/dist/chunk-PNQY6OFB.cjs.map +0 -1
- package/dist/chunk-RBU5PHN4.js.map +0 -1
- package/dist/chunk-RFBIGRCI.js.map +0 -1
- package/dist/chunk-SVNK5NIK.js.map +0 -1
- package/dist/chunk-TMLNVU5W.cjs.map +0 -1
- package/dist/chunk-TRJYDVWK.cjs.map +0 -1
- package/dist/chunk-UGG7MCX4.cjs.map +0 -1
- package/dist/chunk-V4BPFFFV.js.map +0 -1
- package/dist/chunk-VOD5JA4D.js.map +0 -1
- package/dist/chunk-WGPFR7MN.cjs.map +0 -1
- package/dist/chunk-WGZZKCJQ.cjs.map +0 -1
- package/dist/chunk-XQTI4Q4I.js.map +0 -1
- package/dist/chunk-Y6XVPRYH.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { N as NovaDispatch, a as NovaPublish, b as NovaComponent } from '../../types-
|
|
2
|
-
export { c as NovaComponentProps, d as NovaModelBinding, i as isNovaComponent } from '../../types-
|
|
1
|
+
import { N as NovaDispatch, a as NovaPublish, b as NovaComponent } from '../../types-DzB3TAQj.cjs';
|
|
2
|
+
export { c as NovaComponentProps, d as NovaModelBinding, i as isNovaComponent } from '../../types-DzB3TAQj.cjs';
|
|
3
3
|
import * as vue from 'vue';
|
|
4
4
|
import { Component, InjectionKey, VNodeChild, MaybeRefOrGetter, Ref } from 'vue';
|
|
5
|
-
import { A as ActionDefinition } from '../../index-
|
|
6
|
-
import { C as ComponentRegistry, b as RenderNode } from '../../types-
|
|
7
|
-
import { a as Shell, b as ActionStatus, d as CanvasState, q as StateSnapshot } from '../../types-
|
|
5
|
+
import { A as ActionDefinition } from '../../index-BoPH5aSd.cjs';
|
|
6
|
+
import { C as ComponentRegistry, b as RenderNode } from '../../types-CR56luN7.cjs';
|
|
7
|
+
import { a as Shell, b as ActionStatus, d as CanvasState, q as StateSnapshot } from '../../types-OsJI-ceI.cjs';
|
|
8
8
|
import '../../schemas-pMyyuXV7.cjs';
|
|
9
9
|
import 'zod';
|
|
10
|
-
import '../../effects-
|
|
10
|
+
import '../../effects-DkBBrxVj.cjs';
|
|
11
11
|
import '../../schemas-DPdeFlCT.cjs';
|
|
12
12
|
|
|
13
13
|
type SlotWrapperProps = {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { N as NovaDispatch, a as NovaPublish, b as NovaComponent } from '../../types-
|
|
2
|
-
export { c as NovaComponentProps, d as NovaModelBinding, i as isNovaComponent } from '../../types-
|
|
1
|
+
import { N as NovaDispatch, a as NovaPublish, b as NovaComponent } from '../../types-LXw2RJfH.js';
|
|
2
|
+
export { c as NovaComponentProps, d as NovaModelBinding, i as isNovaComponent } from '../../types-LXw2RJfH.js';
|
|
3
3
|
import * as vue from 'vue';
|
|
4
4
|
import { Component, InjectionKey, VNodeChild, MaybeRefOrGetter, Ref } from 'vue';
|
|
5
|
-
import { A as ActionDefinition } from '../../index-
|
|
6
|
-
import { C as ComponentRegistry, b as RenderNode } from '../../types-
|
|
7
|
-
import { a as Shell, b as ActionStatus, d as CanvasState, q as StateSnapshot } from '../../types-
|
|
5
|
+
import { A as ActionDefinition } from '../../index-BjQX8XZl.js';
|
|
6
|
+
import { C as ComponentRegistry, b as RenderNode } from '../../types-CJC8mnzl.js';
|
|
7
|
+
import { a as Shell, b as ActionStatus, d as CanvasState, q as StateSnapshot } from '../../types-Dn9cBFCC.js';
|
|
8
8
|
import '../../schemas-pMyyuXV7.js';
|
|
9
9
|
import 'zod';
|
|
10
|
-
import '../../effects-
|
|
10
|
+
import '../../effects-DkBBrxVj.js';
|
|
11
11
|
import '../../schemas-DPdeFlCT.js';
|
|
12
12
|
|
|
13
13
|
type SlotWrapperProps = {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { NovaRenderKey, NovaShellKey, provideShellHead, useShellRenderTree, RenderTree, useShell, useCanvasRenderTree, registerNovaVueComponents } from '../../chunk-
|
|
2
|
-
export { ErrorMarker, NovaRenderKey, NovaShellKey, RenderNodeView, RenderTree, isNovaComponent, useActionData, useActionStatus, useCanvas, useCanvasRenderTree, useNovaDispatch, useNovaPublish, useNovaRegistry, useRenderTree, useShell, useShellRenderTree, useShellState, useSlotWrapper } from '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
6
|
-
import { CANVAS_SLOT_NAME } from '../../chunk-
|
|
7
|
-
import '../../chunk-
|
|
8
|
-
import '../../chunk-
|
|
9
|
-
import '../../chunk-
|
|
10
|
-
import '../../chunk-
|
|
11
|
-
import '../../chunk-
|
|
12
|
-
import '../../chunk-
|
|
13
|
-
import '../../chunk-
|
|
14
|
-
import '../../chunk-
|
|
1
|
+
import { NovaRenderKey, NovaShellKey, provideShellHead, useShellRenderTree, RenderTree, useShell, useCanvasRenderTree, registerNovaVueComponents } from '../../chunk-OSIFUROH.js';
|
|
2
|
+
export { ErrorMarker, NovaRenderKey, NovaShellKey, RenderNodeView, RenderTree, isNovaComponent, useActionData, useActionStatus, useCanvas, useCanvasRenderTree, useNovaDispatch, useNovaPublish, useNovaRegistry, useRenderTree, useShell, useShellRenderTree, useShellState, useSlotWrapper } from '../../chunk-OSIFUROH.js';
|
|
3
|
+
import '../../chunk-EK2GBZ7D.js';
|
|
4
|
+
import '../../chunk-SCXYAXMO.js';
|
|
5
|
+
import '../../chunk-3JE77TNL.js';
|
|
6
|
+
import { CANVAS_SLOT_NAME } from '../../chunk-C63CBYD5.js';
|
|
7
|
+
import '../../chunk-YV2G37TJ.js';
|
|
8
|
+
import '../../chunk-ZZRQAH5Z.js';
|
|
9
|
+
import '../../chunk-M2ZZUSH3.js';
|
|
10
|
+
import '../../chunk-Y3UKAJJX.js';
|
|
11
|
+
import '../../chunk-G4OQ4PEO.js';
|
|
12
|
+
import '../../chunk-JKULAG53.js';
|
|
13
|
+
import '../../chunk-GQVJ5UAS.js';
|
|
14
|
+
import '../../chunk-SVWDKXSH.js';
|
|
15
15
|
import '../../chunk-PZ5AY32C.js';
|
|
16
16
|
import { defineComponent, provide, h, shallowRef, onErrorCaptured } from 'vue';
|
|
17
17
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/adapters/vue/provider.ts","../../../src/adapters/vue/error-boundary.ts","../../../src/adapters/vue/nova.ts"],"names":["defineComponent","h"],"mappings":";;;;;;;;;;;;;;;;;AAOA,IAAM,eAA6B,MAAM;AAAC,CAAA;AAC1C,IAAM,cAA2B,MAAM;AAAC,CAAA;AAmBjC,IAAM,kBAAA,GAAqB,eAAA;AAAA,EAChC,CAAC,KAAA,EAAgC,EAAE,KAAA,EAAM,KAAM;AAC7C,IAAA,MAAM,KAAA,GAAgC;AAAA,MACpC,IAAI,QAAA,GAAW;AACb,QAAA,OAAO,KAAA,CAAM,QAAA;AAAA,MACf,CAAA;AAAA,MACA,IAAI,QAAA,GAAW;AACb,QAAA,OAAO,MAAM,QAAA,IAAY,YAAA;AAAA,MAC3B,CAAA;AAAA,MACA,IAAI,OAAA,GAAU;AACZ,QAAA,OAAO,MAAM,OAAA,IAAW,WAAA;AAAA,MAC1B,CAAA;AAAA,MACA,IAAI,WAAA,GAAc;AAChB,QAAA,OAAO,KAAA,CAAM,WAAA;AAAA,MACf,CAAA;AAAA,MACA,IAAI,QAAA,GAAW;AACb,QAAA,OAAO,KAAA,CAAM,QAAA;AAAA,MACf;AAAA,KACF;AACA,IAAA,OAAA,CAAQ,eAAe,KAAK,CAAA;AAC5B,IAAA,OAAO,MAAM,MAAM,OAAA,IAAU;AAAA,EAC/B,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AAA,CAAE,iBAAA,EAAmB,EAAE,KAAA,EAAO,MAAM,KAAA,EAAO,QAAA,EAAU,KAAA,CAAM,QAAA,EAAS,EAAG,EAAE,OAAA,EAAS,MAAM,MAAM,CAAA;AAAA,IACvG,CAAA;AAAA,EACF,CAAA;AAAA,EACA,EAAE,MAAM,YAAA,EAAc,KAAA,EAAO,CAAC,IAAA,EAAM,OAAA,EAAS,UAAA,EAAY,UAAU,CAAA;AACrE","file":"index.js","sourcesContent":["import { defineComponent, h, provide } from 'vue';\nimport type { ComponentRegistry } from '@layout';\nimport type { Shell } from '@shell';\nimport { NovaRenderKey, NovaShellKey, type NovaRenderContextValue, type NovaShellSource, type SlotWrapper } from './context';\nimport { provideShellHead } from './head';\nimport type { NovaComponent, NovaDispatch, NovaPublish } from './types';\n\nconst noopDispatch: NovaDispatch = () => {};\nconst noopPublish: NovaPublish = () => {};\n\n// ═══════════════════════════════════════════════════════════\n// <NovaRenderProvider>\n//\n// The framework-agnostic renderer context. Pairs a component registry with a\n// dispatch and publish function. Works with no shell — dispatch and publish\n// default to no-ops so static layouts render without event infrastructure.\n// ═══════════════════════════════════════════════════════════\n\nexport type NovaRenderProviderProps = {\n registry: ComponentRegistry;\n dispatch?: NovaDispatch;\n publish?: NovaPublish;\n slotWrapper?: SlotWrapper;\n // renderer for unregistered component names; omit for strict error markers\n fallback?: NovaComponent;\n};\n\nexport const NovaRenderProvider = defineComponent(\n (props: NovaRenderProviderProps, { slots }) => {\n const value: NovaRenderContextValue = {\n get registry() {\n return props.registry;\n },\n get dispatch() {\n return props.dispatch ?? noopDispatch;\n },\n get publish() {\n return props.publish ?? noopPublish;\n },\n get slotWrapper() {\n return props.slotWrapper;\n },\n get fallback() {\n return props.fallback;\n },\n };\n provide(NovaRenderKey, value);\n return () => slots.default?.();\n },\n { name: 'NovaRenderProvider', props: ['registry', 'dispatch', 'publish', 'slotWrapper', 'fallback'] },\n);\n\n// ═══════════════════════════════════════════════════════════\n// <NovaShellProvider>\n//\n// <NovaRenderProvider> plus the shell. The registry defaults to\n// `shell.registry`; dispatch and publish go to the shell.\n// ═══════════════════════════════════════════════════════════\n\nexport type NovaShellProviderProps = {\n shell: Shell;\n registry?: ComponentRegistry;\n slotWrapper?: SlotWrapper;\n};\n\nexport const NovaShellProvider = defineComponent(\n (props: NovaShellProviderProps, { slots }) => {\n const source: NovaShellSource = {\n get shell() {\n return props.shell;\n },\n };\n provide(NovaShellKey, source);\n provideShellHead(() => props.shell);\n const dispatch: NovaDispatch = (event) => props.shell.dispatch(event);\n const publish: NovaPublish = (channel, payload) => props.shell.publish(channel, payload);\n return () =>\n h(\n NovaRenderProvider,\n { registry: props.registry ?? props.shell.registry, dispatch, publish, slotWrapper: props.slotWrapper },\n { default: () => slots.default?.() },\n );\n },\n { name: 'NovaShellProvider', props: ['shell', 'registry', 'slotWrapper'] },\n);\n","import { defineComponent, h, onErrorCaptured, shallowRef, type VNodeChild } from 'vue';\n\n// ═══════════════════════════════════════════════════════════\n// Vue's error boundary is a hook, not a class: onErrorCaptured stops the\n// error propagating (return false) and swaps the subtree for a fallback.\n// ═══════════════════════════════════════════════════════════\n\nexport type NovaErrorBoundaryProps = {\n fallback?: (error: Error) => VNodeChild;\n onError?: (error: Error, info: string) => void;\n};\n\nexport const NovaErrorBoundary = defineComponent(\n (props: NovaErrorBoundaryProps, { slots }) => {\n const caught = shallowRef<Error | undefined>(undefined);\n onErrorCaptured((err, _instance, info) => {\n const error = err instanceof Error ? err : new Error(String(err));\n caught.value = error;\n props.onError?.(error, info);\n return false;\n });\n return () => {\n const error = caught.value;\n if (error === undefined) return slots.default?.();\n if (props.fallback !== undefined) return props.fallback(error);\n return h('div', { 'data-nova-error-boundary': 'true', role: 'alert' }, error.message);\n };\n },\n { name: 'NovaErrorBoundary', props: ['fallback', 'onError'] },\n);\n","import { defineComponent, h } from 'vue';\nimport type { ComponentRegistry } from '@layout';\nimport type { Shell } from '@shell';\nimport { CANVAS_SLOT_NAME } from '@shell';\nimport { registerNovaVueComponents } from './components';\nimport { useCanvasRenderTree, useShellRenderTree } from './composables/shell';\nimport { useShell } from './composables/context';\nimport type { SlotWrapper } from './context';\nimport { NovaShellProvider } from './provider';\nimport { RenderTree } from './render-tree';\n\n// ═══════════════════════════════════════════════════════════\n// <NovaShell> / <NovaCanvas> — the mountable shell surfaces. Each hides the\n// provider + render-tree wiring behind one component. The lower-level pieces\n// (NovaShellProvider, RenderTree, the composables) stay exported for custom\n// composition.\n// ═══════════════════════════════════════════════════════════\n\n// Idempotent: the slot components are required by the shell's default\n// layouts, and the primitives are the vocabulary every demo expects.\nconst ensureVueBuiltins = (registry: ComponentRegistry): void => {\n if (registry.has(CANVAS_SLOT_NAME)) return;\n registerNovaVueComponents(registry);\n};\n\n// ─── <NovaShell> ───────────────────────────────────────────\n\nexport type NovaShellProps = {\n shell: Shell;\n // render against a different registry than shell.registry (rare)\n registry?: ComponentRegistry;\n // wraps every action instance's content at the ActionSlot seam\n slotWrapper?: SlotWrapper;\n // register the Vue builtins on the resolved registry. Default true.\n builtins?: boolean;\n};\n\nconst ShellRenderTreeView = defineComponent(\n () => {\n const nodes = useShellRenderTree();\n return () => h(RenderTree, { nodes: nodes.value });\n },\n { name: 'NovaShellRenderTree' },\n);\n\nexport const NovaShell = defineComponent(\n (props: NovaShellProps) => {\n if (props.builtins !== false) ensureVueBuiltins(props.registry ?? props.shell.registry);\n return () =>\n h(\n NovaShellProvider,\n { shell: props.shell, registry: props.registry, slotWrapper: props.slotWrapper },\n { default: () => h(ShellRenderTreeView) },\n );\n },\n { name: 'NovaShell', props: ['shell', 'registry', 'slotWrapper', 'builtins'] },\n);\n\n// ─── <NovaCanvas> ──────────────────────────────────────────\n\nexport type NovaCanvasProps = {\n // the canvas to render\n id: string;\n // when given, NovaCanvas provides its own shell; when omitted it must sit\n // inside a <NovaShell> / <NovaShellProvider>\n shell?: Shell;\n registry?: ComponentRegistry;\n builtins?: boolean;\n};\n\nconst CanvasRenderTreeView = defineComponent(\n (props: { canvasId: string }) => {\n // asserts a shell is provided — useShell throws a clear error otherwise\n useShell();\n const nodes = useCanvasRenderTree(() => props.canvasId);\n return () => h(RenderTree, { nodes: nodes.value });\n },\n { name: 'NovaCanvasRenderTree', props: ['canvasId'] },\n);\n\nexport const NovaCanvas = defineComponent(\n (props: NovaCanvasProps) => {\n const { shell } = props;\n if (shell !== undefined && props.builtins !== false) ensureVueBuiltins(props.registry ?? shell.registry);\n return () => {\n const view = h(CanvasRenderTreeView, { canvasId: props.id });\n if (props.shell === undefined) return view;\n return h(NovaShellProvider, { shell: props.shell, registry: props.registry }, { default: () => view });\n };\n },\n { name: 'NovaCanvas', props: ['id', 'shell', 'registry', 'builtins'] },\n);\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/adapters/vue/provider.ts","../../../src/adapters/vue/error-boundary.ts","../../../src/adapters/vue/nova.ts"],"names":["defineComponent","h"],"mappings":";;;;;;;;;;;;;;;;;AAOA,IAAM,eAA6B,MAAM;AAAC,CAAA;AAC1C,IAAM,cAA2B,MAAM;AAAC,CAAA;AAUjC,IAAM,kBAAA,GAAqB,eAAA;AAAA,EAChC,CAAC,KAAA,EAAgC,EAAE,KAAA,EAAM,KAAM;AAC7C,IAAA,MAAM,KAAA,GAAgC;AAAA,MACpC,IAAI,QAAA,GAAW;AACb,QAAA,OAAO,KAAA,CAAM,QAAA;AAAA,MACf,CAAA;AAAA,MACA,IAAI,QAAA,GAAW;AACb,QAAA,OAAO,MAAM,QAAA,IAAY,YAAA;AAAA,MAC3B,CAAA;AAAA,MACA,IAAI,OAAA,GAAU;AACZ,QAAA,OAAO,MAAM,OAAA,IAAW,WAAA;AAAA,MAC1B,CAAA;AAAA,MACA,IAAI,WAAA,GAAc;AAChB,QAAA,OAAO,KAAA,CAAM,WAAA;AAAA,MACf,CAAA;AAAA,MACA,IAAI,QAAA,GAAW;AACb,QAAA,OAAO,KAAA,CAAM,QAAA;AAAA,MACf;AAAA,KACF;AACA,IAAA,OAAA,CAAQ,eAAe,K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,CAAM,KAAA,KAAU,MAAA,EAAW,OAAO,IAAA;AACtC,MAAA,OAAOA,CAAAA,CAAE,iBAAA,EAAmB,EAAE,KAAA,EAAO,MAAM,KAAA,EAAO,QAAA,EAAU,KAAA,CAAM,QAAA,EAAS,EAAG,EAAE,OAAA,EAAS,MAAM,MAAM,CAAA;AAAA,IACvG,CAAA;AAAA,EACF,CAAA;AAAA,EACA,EAAE,MAAM,YAAA,EAAc,KAAA,EAAO,CAAC,IAAA,EAAM,OAAA,EAAS,UAAA,EAAY,UAAU,CAAA;AACrE","file":"index.js","sourcesContent":["import { defineComponent, h, provide } from 'vue';\nimport type { ComponentRegistry } from '@layout';\nimport type { Shell } from '@shell';\nimport { NovaRenderKey, NovaShellKey, type NovaRenderContextValue, type NovaShellSource, type SlotWrapper } from './context';\nimport { provideShellHead } from './head';\nimport type { NovaComponent, NovaDispatch, NovaPublish } from './types';\n\nconst noopDispatch: NovaDispatch = () => {};\nconst noopPublish: NovaPublish = () => {};\n\nexport type NovaRenderProviderProps = {\n registry: ComponentRegistry;\n dispatch?: NovaDispatch;\n publish?: NovaPublish;\n slotWrapper?: SlotWrapper;\n fallback?: NovaComponent;\n};\n\nexport const NovaRenderProvider = defineComponent(\n (props: NovaRenderProviderProps, { slots }) => {\n const value: NovaRenderContextValue = {\n get registry() {\n return props.registry;\n },\n get dispatch() {\n return props.dispatch ?? noopDispatch;\n },\n get publish() {\n return props.publish ?? noopPublish;\n },\n get slotWrapper() {\n return props.slotWrapper;\n },\n get fallback() {\n return props.fallback;\n },\n };\n provide(NovaRenderKey, value);\n return () => slots.default?.();\n },\n { name: 'NovaRenderProvider', props: ['registry', 'dispatch', 'publish', 'slotWrapper', 'fallback'] },\n);\n\nexport type NovaShellProviderProps = {\n shell: Shell;\n registry?: ComponentRegistry;\n slotWrapper?: SlotWrapper;\n};\n\nexport const NovaShellProvider = defineComponent(\n (props: NovaShellProviderProps, { slots }) => {\n const source: NovaShellSource = {\n get shell() {\n return props.shell;\n },\n };\n provide(NovaShellKey, source);\n provideShellHead(() => props.shell);\n const dispatch: NovaDispatch = (event) => props.shell.dispatch(event);\n const publish: NovaPublish = (channel, payload) => props.shell.publish(channel, payload);\n return () =>\n h(\n NovaRenderProvider,\n { registry: props.registry ?? props.shell.registry, dispatch, publish, slotWrapper: props.slotWrapper },\n { default: () => slots.default?.() },\n );\n },\n { name: 'NovaShellProvider', props: ['shell', 'registry', 'slotWrapper'] },\n);\n","import { defineComponent, h, onErrorCaptured, shallowRef, type VNodeChild } from 'vue';\n\nexport type NovaErrorBoundaryProps = {\n fallback?: (error: Error) => VNodeChild;\n onError?: (error: Error, info: string) => void;\n};\n\nexport const NovaErrorBoundary = defineComponent(\n (props: NovaErrorBoundaryProps, { slots }) => {\n const caught = shallowRef<Error | undefined>(undefined);\n onErrorCaptured((err, _instance, info) => {\n const error = err instanceof Error ? err : new Error(String(err));\n caught.value = error;\n props.onError?.(error, info);\n return false;\n });\n return () => {\n const error = caught.value;\n if (error === undefined) return slots.default?.();\n if (props.fallback !== undefined) return props.fallback(error);\n return h('div', { 'data-nova-error-boundary': 'true', role: 'alert' }, error.message);\n };\n },\n { name: 'NovaErrorBoundary', props: ['fallback', 'onError'] },\n);\n","import { defineComponent, h } from 'vue';\nimport type { ComponentRegistry } from '@layout';\nimport type { Shell } from '@shell';\nimport { CANVAS_SLOT_NAME } from '@shell';\nimport { registerNovaVueComponents } from './components';\nimport { useCanvasRenderTree, useShellRenderTree } from './composables/shell';\nimport { useShell } from './composables/context';\nimport type { SlotWrapper } from './context';\nimport { NovaShellProvider } from './provider';\nimport { RenderTree } from './render-tree';\n\nconst ensureVueBuiltins = (registry: ComponentRegistry): void => {\n if (registry.has(CANVAS_SLOT_NAME)) return;\n registerNovaVueComponents(registry);\n};\n\nexport type NovaShellProps = {\n shell: Shell;\n registry?: ComponentRegistry;\n slotWrapper?: SlotWrapper;\n builtins?: boolean;\n};\n\nconst ShellRenderTreeView = defineComponent(\n () => {\n const nodes = useShellRenderTree();\n return () => h(RenderTree, { nodes: nodes.value });\n },\n { name: 'NovaShellRenderTree' },\n);\n\nexport const NovaShell = defineComponent(\n (props: NovaShellProps) => {\n if (props.builtins !== false) ensureVueBuiltins(props.registry ?? props.shell.registry);\n return () =>\n h(\n NovaShellProvider,\n { shell: props.shell, registry: props.registry, slotWrapper: props.slotWrapper },\n { default: () => h(ShellRenderTreeView) },\n );\n },\n { name: 'NovaShell', props: ['shell', 'registry', 'slotWrapper', 'builtins'] },\n);\n\nexport type NovaCanvasProps = {\n id: string;\n shell?: Shell;\n registry?: ComponentRegistry;\n builtins?: boolean;\n};\n\nconst CanvasRenderTreeView = defineComponent(\n (props: { canvasId: string }) => {\n useShell();\n const nodes = useCanvasRenderTree(() => props.canvasId);\n return () => h(RenderTree, { nodes: nodes.value });\n },\n { name: 'NovaCanvasRenderTree', props: ['canvasId'] },\n);\n\nexport const NovaCanvas = defineComponent(\n (props: NovaCanvasProps) => {\n const { shell } = props;\n if (shell !== undefined && props.builtins !== false) ensureVueBuiltins(props.registry ?? shell.registry);\n return () => {\n const view = h(CanvasRenderTreeView, { canvasId: props.id });\n if (props.shell === undefined) return view;\n return h(NovaShellProvider, { shell: props.shell, registry: props.registry }, { default: () => view });\n };\n },\n { name: 'NovaCanvas', props: ['id', 'shell', 'registry', 'builtins'] },\n);\n"]}
|
package/dist/agent/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkDC5HONDE_cjs = require('../chunk-DC5HONDE.cjs');
|
|
4
|
+
var chunkBXUEWV7V_cjs = require('../chunk-BXUEWV7V.cjs');
|
|
5
|
+
var chunkNBXZ3RAC_cjs = require('../chunk-NBXZ3RAC.cjs');
|
|
6
6
|
require('../chunk-Q7SFCCGT.cjs');
|
|
7
7
|
var cortex = require('@niscorp/cortex');
|
|
8
8
|
|
|
@@ -24,16 +24,16 @@ var layoutAgent = cortex.defineAgent({
|
|
|
24
24
|
id: "nova.layout",
|
|
25
25
|
description: "Generates a Nova LayoutNode from an intent, a component palette, and a data example.",
|
|
26
26
|
instructions: INSTRUCTIONS,
|
|
27
|
-
output: { schema:
|
|
27
|
+
output: { schema: chunkNBXZ3RAC_cjs.LayoutNodeSchema }
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
Object.defineProperty(exports, "paletteFromRegistry", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkDC5HONDE_cjs.paletteFromRegistry; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "collectInteractive", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkBXUEWV7V_cjs.collectInteractive; }
|
|
37
37
|
});
|
|
38
38
|
exports.layoutAgent = layoutAgent;
|
|
39
39
|
//# sourceMappingURL=index.cjs.map
|
package/dist/agent/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/agent/layout.agent.ts"],"names":["defineAgent","LayoutNodeSchema"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../src/agent/layout.agent.ts"],"names":["defineAgent","LayoutNodeSchema"],"mappings":";;;;;;;;AAWA,IAAM,YAAA,GAAe,CAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;;AAAA;AAAA;AAAA,oIAAA,CAAA;AAed,IAAM,cAA2CA,kBAAA,CAAwB;AAAA,EAC9E,EAAA,EAAI,aAAA;AAAA,EACJ,WAAA,EAAa,sFAAA;AAAA,EACb,YAAA,EAAc,YAAA;AAAA,EACd,MAAA,EAAQ,EAAE,MAAA,EAAQC,kCAAA;AACpB,CAAC","file":"index.cjs","sourcesContent":["// The LayoutNode schema is not written into this prompt: cortex adds it as the\n// OUTPUT SCHEMA (`output.doc`, 'auto' by default), because the recursive tree\n// cannot ride the respond tool's params.\n\nimport { defineAgent, type AgentDefinition } from '@niscorp/cortex';\n\nimport { LayoutNodeSchema } from '../layout/schemas';\nimport type { LayoutNode } from '../layout/schemas';\n\nexport type LayoutAgentOutput = LayoutNode;\n\nconst INSTRUCTIONS = `You are the Nova layout agent. Given an intent, a component palette, and a data example, produce a Nova LayoutNode that renders the data as a UI.\n\nYour input:\n - intent: what UI to produce.\n - palette: the ONLY components you may use. Each is { name, description, propsSchema }. Every \"component\" field in your output MUST be one of these names, and its props MUST fit that component's propsSchema. Set ONLY props that appear in the schema — there is no other styling; components render in their own default style.\n - dataShape: a JSON example of the data the layout binds against. The data is the binding ROOT — reference it with \"$\": an array → a Table's \"rows\": \"$\" or a loop { \"for\": \"$\", \"as\": \"row\", \"do\": … } binding \"{{$row.field}}\"; an object → \"$.field\"; a scalar → \"$\".\n - styleGuide (optional): house style rules — follow them.\n - base (optional): an existing layout to work from. If given, keep its structure and component choices, adapting the bindings to this intent + data — use it to match a prior layout or to revise it.\n\nYour envelope's \\`data\\` is the LayoutNode; \\`reasoning\\` is a one-sentence explanation. The layout MUST validate against the OUTPUT SCHEMA below.\n\nWorked example (illustrative — read the schema + palette for the real details):\nINPUT { \"intent\": \"list each name on its own line\", \"palette\": [{\"name\":\"Stack\",\"description\":\"Vertical container for children.\"},{\"name\":\"Text\",\"description\":\"Renders text; children is the string.\"}], \"dataShape\": [{ \"name\": \"\" }] }\ndata { \"component\": \"Stack\", \"children\": { \"for\": \"$\", \"as\": \"row\", \"do\": { \"component\": \"Text\", \"children\": \"{{$row.name}}\" } } }`;\n\nexport const layoutAgent: AgentDefinition<LayoutNode> = defineAgent<LayoutNode>({\n id: 'nova.layout',\n description: 'Generates a Nova LayoutNode from an intent, a component palette, and a data example.',\n instructions: INSTRUCTIONS,\n output: { schema: LayoutNodeSchema },\n});\n"]}
|
package/dist/agent/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AgentDefinition } from '@niscorp/cortex';
|
|
2
2
|
import { L as LayoutNode } from '../schemas-DPdeFlCT.cjs';
|
|
3
|
-
export { L as LayoutPaletteEntry, P as PaletteFromRegistryOptions, a as paletteFromRegistry } from '../palette-
|
|
3
|
+
export { L as LayoutPaletteEntry, P as PaletteFromRegistryOptions, a as paletteFromRegistry } from '../palette-CCxWSi3C.cjs';
|
|
4
4
|
import 'zod';
|
|
5
|
-
import '../types-
|
|
5
|
+
import '../types-CR56luN7.cjs';
|
|
6
6
|
|
|
7
7
|
type LayoutAgentOutput = LayoutNode;
|
|
8
8
|
declare const layoutAgent: AgentDefinition<LayoutNode>;
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AgentDefinition } from '@niscorp/cortex';
|
|
2
2
|
import { L as LayoutNode } from '../schemas-DPdeFlCT.js';
|
|
3
|
-
export { L as LayoutPaletteEntry, P as PaletteFromRegistryOptions, a as paletteFromRegistry } from '../palette-
|
|
3
|
+
export { L as LayoutPaletteEntry, P as PaletteFromRegistryOptions, a as paletteFromRegistry } from '../palette-BZujb2rm.js';
|
|
4
4
|
import 'zod';
|
|
5
|
-
import '../types-
|
|
5
|
+
import '../types-CJC8mnzl.js';
|
|
6
6
|
|
|
7
7
|
type LayoutAgentOutput = LayoutNode;
|
|
8
8
|
declare const layoutAgent: AgentDefinition<LayoutNode>;
|
package/dist/agent/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { paletteFromRegistry } from '../chunk-
|
|
2
|
-
export { collectInteractive } from '../chunk-
|
|
3
|
-
import { LayoutNodeSchema } from '../chunk-
|
|
1
|
+
export { paletteFromRegistry } from '../chunk-OBFFZ23H.js';
|
|
2
|
+
export { collectInteractive } from '../chunk-ZZRQAH5Z.js';
|
|
3
|
+
import { LayoutNodeSchema } from '../chunk-JKULAG53.js';
|
|
4
4
|
import '../chunk-PZ5AY32C.js';
|
|
5
5
|
import { defineAgent } from '@niscorp/cortex';
|
|
6
6
|
|
package/dist/agent/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/agent/layout.agent.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"sources":["../../src/agent/layout.agent.ts"],"names":[],"mappings":";;;;;;AAWA,IAAM,YAAA,GAAe,CAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;;AAAA;AAAA;AAAA,oIAAA,CAAA;AAed,IAAM,cAA2C,WAAA,CAAwB;AAAA,EAC9E,EAAA,EAAI,aAAA;AAAA,EACJ,WAAA,EAAa,sFAAA;AAAA,EACb,YAAA,EAAc,YAAA;AAAA,EACd,MAAA,EAAQ,EAAE,MAAA,EAAQ,gBAAA;AACpB,CAAC","file":"index.js","sourcesContent":["// The LayoutNode schema is not written into this prompt: cortex adds it as the\n// OUTPUT SCHEMA (`output.doc`, 'auto' by default), because the recursive tree\n// cannot ride the respond tool's params.\n\nimport { defineAgent, type AgentDefinition } from '@niscorp/cortex';\n\nimport { LayoutNodeSchema } from '../layout/schemas';\nimport type { LayoutNode } from '../layout/schemas';\n\nexport type LayoutAgentOutput = LayoutNode;\n\nconst INSTRUCTIONS = `You are the Nova layout agent. Given an intent, a component palette, and a data example, produce a Nova LayoutNode that renders the data as a UI.\n\nYour input:\n - intent: what UI to produce.\n - palette: the ONLY components you may use. Each is { name, description, propsSchema }. Every \"component\" field in your output MUST be one of these names, and its props MUST fit that component's propsSchema. Set ONLY props that appear in the schema — there is no other styling; components render in their own default style.\n - dataShape: a JSON example of the data the layout binds against. The data is the binding ROOT — reference it with \"$\": an array → a Table's \"rows\": \"$\" or a loop { \"for\": \"$\", \"as\": \"row\", \"do\": … } binding \"{{$row.field}}\"; an object → \"$.field\"; a scalar → \"$\".\n - styleGuide (optional): house style rules — follow them.\n - base (optional): an existing layout to work from. If given, keep its structure and component choices, adapting the bindings to this intent + data — use it to match a prior layout or to revise it.\n\nYour envelope's \\`data\\` is the LayoutNode; \\`reasoning\\` is a one-sentence explanation. The layout MUST validate against the OUTPUT SCHEMA below.\n\nWorked example (illustrative — read the schema + palette for the real details):\nINPUT { \"intent\": \"list each name on its own line\", \"palette\": [{\"name\":\"Stack\",\"description\":\"Vertical container for children.\"},{\"name\":\"Text\",\"description\":\"Renders text; children is the string.\"}], \"dataShape\": [{ \"name\": \"\" }] }\ndata { \"component\": \"Stack\", \"children\": { \"for\": \"$\", \"as\": \"row\", \"do\": { \"component\": \"Text\", \"children\": \"{{$row.name}}\" } } }`;\n\nexport const layoutAgent: AgentDefinition<LayoutNode> = defineAgent<LayoutNode>({\n id: 'nova.layout',\n description: 'Generates a Nova LayoutNode from an intent, a component palette, and a data example.',\n instructions: INSTRUCTIONS,\n output: { schema: LayoutNodeSchema },\n});\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createHeadKeeper } from './chunk-
|
|
2
|
-
import { shellView } from './chunk-
|
|
3
|
-
import { headOf, isHeadNode } from './chunk-
|
|
4
|
-
import { renderNodeKey } from './chunk-
|
|
1
|
+
import { createHeadKeeper } from './chunk-SCXYAXMO.js';
|
|
2
|
+
import { shellView } from './chunk-3JE77TNL.js';
|
|
3
|
+
import { headOf, isHeadNode } from './chunk-C63CBYD5.js';
|
|
4
|
+
import { renderNodeKey } from './chunk-YV2G37TJ.js';
|
|
5
5
|
|
|
6
6
|
// src/adapters/dom/index.ts
|
|
7
7
|
var CANVAS_SLOT = "CanvasSlot";
|
|
@@ -429,5 +429,5 @@ var mountShell = (root, registry, shell, options = {}) => {
|
|
|
429
429
|
};
|
|
430
430
|
|
|
431
431
|
export { createDomView, mountShell };
|
|
432
|
-
//# sourceMappingURL=chunk-
|
|
433
|
-
//# sourceMappingURL=chunk-
|
|
432
|
+
//# sourceMappingURL=chunk-2H6Y25FO.js.map
|
|
433
|
+
//# sourceMappingURL=chunk-2H6Y25FO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/adapters/dom/index.ts"],"names":["before"],"mappings":";;;;;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/B,MAAA,MAAM,IAAA,GAAO,IAAA,CAAK,GAAA,CAAI,UAAA,CAAW,QAAQ,CAAA;AACzC,MAAA,IAAA,CAAK,KAAA,CAAM,GAAA,CAAI,QAAA,EAAU,IAAI,CAAA;AAC7B,MAAA,OAAO,IAAA;AAAA,IACT;AAAA,GACF;AACA,EAAA,MAAM,GAAA,GAAM,aAAA,CAAc,IAAA,EAAM,QAAA,EAAU,KAAK,OAAO,CAAA;AACtD,EAAA,MAAM,QAAA,GAAW,gBAAA,CAAiB,IAAA,CAAK,aAAa,CAAA;AACpD,EAAA,MAAM,SAAS,MAAY;AACzB,IAAA,IAAA,GAAO,EAAE,KAAA,kBAAO,IAAI,GAAA,EAAI,EAAE;AAC1B,IAAA,GAAA,CAAI,MAAA,EAAO;AACX,IAAA,IAAI,KAAK,WAAA,EAAa,QAAA,CAAS,MAAA,CAAO,GAAG,GAAG,QAAQ,CAAA;AAAA,EACtD,CAAA;AACA,EAAA,MAAA,EAAO;AACP,EAAA,MAAM,IAAA,GAAO,IAAA,CAAK,SAAA,CAAU,MAAM,CAAA;AAClC,EAAA,OAAO;AAAA,IACL,SAAS,MAAM;AACb,MAAA,IAAA,EAAK;AACL,MAAA,GAAA,CAAI,OAAA,EAAQ;AAAA,IACd;AAAA,GACF;AACF","file":"chunk-2H6Y25FO.js","sourcesContent":["import { renderNodeKey } from '@layout/adapter';\nimport type { ComponentRegistry, RenderNode } from '@layout/types';\nimport type { NovaEvent } from '@shared/event-bus/schemas';\nimport { headOf, isHeadNode, shellView } from '@shell';\nimport type { RenderApi, Shell } from '@shell';\nimport { createHeadKeeper } from '../../document/head-keeper';\n\nexport type DomComponentContext = {\n props: Record<string, unknown>;\n children: Node[];\n dispatch: (event: NovaEvent) => void;\n onRemove: (cleanup: () => void) => void;\n dependsOnChildren: () => void;\n};\n\nexport type DomComponent = (ctx: DomComponentContext) => HTMLElement;\n\nexport type DomRenderApi = RenderApi;\n\nexport type DomView = {\n render: () => void;\n destroy: () => void;\n};\n\nconst CANVAS_SLOT = 'CanvasSlot';\nconst ACTION_SLOT = 'ActionSlot';\n\ntype ComponentRenderNode = Extract<RenderNode, { type: 'component' }>;\ntype Dispatch = (event: NovaEvent) => void;\n\ntype Ctx = {\n registry: ComponentRegistry<DomComponent>;\n dispatch: Dispatch;\n api: DomRenderApi;\n fallback?: DomComponent;\n};\n\ntype Mount = {\n node: RenderNode;\n ctx: Ctx;\n dom: Node[];\n kids: Mount[];\n host: HTMLElement | undefined;\n cleanups: (() => void)[];\n field: { stale: boolean };\n};\n\nconst errorEl = (code: string, message: string): HTMLElement => {\n const el = document.createElement('div');\n el.setAttribute('data-nova-error', code);\n el.textContent = `${code}: ${message}`;\n return el;\n};\n\nconst equal = (a: unknown, b: unknown): boolean => {\n if (Object.is(a, b)) return true;\n if (typeof a !== 'object' || typeof b !== 'object' || a === null || b === null) return false;\n if (Array.isArray(a) !== Array.isArray(b)) return false;\n const keys = Object.keys(a);\n if (keys.length !== Object.keys(b).length) return false;\n return keys.every((key) => Object.hasOwn(b, key) && equal(Reflect.get(a, key), Reflect.get(b, key)));\n};\n\nconst withoutValue = (props: Record<string, unknown>): Record<string, unknown> => {\n const { value: _value, ...rest } = props;\n return rest;\n};\n\nconst sameNodes = (a: Node[], b: Node[]): boolean => a.length === b.length && a.every((node, i) => node === b[i]);\n\n// Indexed loops on purpose: this runs twice for every component on every\n// render, and `flatMap` and `for…of` are both slower here.\nconst flat = (kids: Mount[]): Node[] => {\n const nodes: Node[] = [];\n for (let i = 0; i < kids.length; i += 1) {\n const dom = kids[i]?.dom ?? [];\n for (let j = 0; j < dom.length; j += 1) {\n const node = dom[j];\n if (node !== undefined) nodes.push(node);\n }\n }\n return nodes;\n};\n\nconst canvasIdOf = (node: ComponentRenderNode): string => {\n const canvasId = node.props['canvasId'];\n return typeof canvasId === 'string' ? canvasId : '';\n};\n\nconst slotOf = (node: ComponentRenderNode): unknown => {\n if (node.name === CANVAS_SLOT) return node.props['canvasId'];\n if (node.name === ACTION_SLOT) return node.props['instanceId'];\n return undefined;\n};\n\nconst keyed = <T>(items: readonly T[], nodeOf: (item: T) => RenderNode): [string, T][] => {\n const seen = new Map<string, number>();\n return items.map((item, i) => {\n const key = renderNodeKey(nodeOf(item), i);\n const count = seen.get(key) ?? 0;\n seen.set(key, count + 1);\n return [count === 0 ? key : `${key}#${count}`, item];\n });\n};\n\n// Whether core's `renderNodeKey` would give the two the same key at one index, without building it.\nconst samePlace = (a: RenderNode, b: RenderNode): boolean => {\n if (a.key !== undefined || b.key !== undefined) return a.key === b.key;\n if (a.type === 'component' && b.type === 'component') return a.ref !== undefined || b.ref !== undefined ? a.ref === b.ref : a.name === b.name;\n if (a.type === 'error' && b.type === 'error') return a.code === b.code;\n return a.type === b.type;\n};\n\nconst gathered = (nodes: Node[]): DocumentFragment => {\n const fragment = document.createDocumentFragment();\n for (const node of nodes) fragment.appendChild(node);\n return fragment;\n};\n\n// Children are patched in place only when the element holds exactly the nodes\n// it was handed, in order. Anything else and the component is asked again: a kit\n// that wraps each child looks, with one child, like one that wraps them all.\nconst holdsExactly = (el: Node, nodes: Node[]): boolean => nodes.length > 0 && el.childNodes.length === nodes.length && nodes.every((node, i) => el.childNodes[i] === node);\n\n// The longest run of nodes that already stand in the wanted order, given where\n// each stood before (-1: new). Those stay put: taking an element off the page,\n// even to put it straight back, restarts its animations and drops its scroll.\nconst standing = (stoodAt: number[]): Set<number> => {\n const ends: number[] = [];\n const before: number[] = [];\n stoodAt.forEach((stood, i) => {\n before[i] = -1;\n if (stood < 0) return;\n let lo = 0;\n let hi = ends.length;\n while (lo < hi) {\n const mid = (lo + hi) >> 1;\n if ((stoodAt[ends[mid] ?? 0] ?? 0) < stood) lo = mid + 1;\n else hi = mid;\n }\n before[i] = lo > 0 ? (ends[lo - 1] ?? -1) : -1;\n ends[lo] = i;\n });\n const run = new Set<number>();\n let at = ends[ends.length - 1] ?? -1;\n while (at >= 0) {\n run.add(at);\n at = before[at] ?? -1;\n }\n return run;\n};\n\nconst readValue = (target: EventTarget | null): unknown => {\n if (target instanceof HTMLInputElement && target.type === 'checkbox') return target.checked;\n if (target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement || target instanceof HTMLSelectElement) return target.value;\n return '';\n};\n\n// The listeners close over `node`: an element is only kept for a node with the\n// same `ref`, `model` and props, a bound field's `value` aside, which none reads.\nconst wireEvents = (el: HTMLElement, node: ComponentRenderNode, dispatch: Dispatch, field: { stale: boolean }): void => {\n if (node.model !== undefined) {\n const ref = node.model.ref;\n const wait = node.props['debounce'];\n const debounce = typeof wait === 'number' ? wait : 0;\n let pending: { value: unknown; timer: ReturnType<typeof setTimeout> } | undefined;\n const fire = (value: unknown): void => dispatch({ type: 'ui:model', ref, payload: value });\n el.addEventListener('input', (e) => {\n field.stale = true;\n const value = readValue(e.target);\n if (debounce <= 0) {\n fire(value);\n return;\n }\n if (pending !== undefined) clearTimeout(pending.timer);\n const timer = setTimeout(() => {\n pending = undefined;\n fire(value);\n }, debounce);\n pending = { value, timer };\n });\n // Captured: blur does not bubble, and the field may sit inside the component's element.\n el.addEventListener(\n 'blur',\n () => {\n if (pending === undefined) return;\n clearTimeout(pending.timer);\n const { value } = pending;\n pending = undefined;\n fire(value);\n },\n true,\n );\n el.addEventListener('keydown', (e) => {\n if (e instanceof KeyboardEvent) dispatch({ type: 'ui:key', ref, key: e.key });\n });\n return;\n }\n if (node.ref !== undefined) {\n const ref = node.ref;\n el.addEventListener('click', (e) => {\n e.stopPropagation();\n const value = node.props['value'];\n dispatch(value === undefined ? { type: 'ui:click', ref } : { type: 'ui:click', ref, payload: value });\n });\n }\n};\n\n// A list canvas shows several live instances at once, so an event inside an\n// ActionSlot carries that instance as its origin: the server's active-instance\n// fallback is right only for a card-deck canvas.\nconst inInstance = (node: RenderNode, ctx: Ctx): Ctx => {\n if (node.type !== 'component' || node.name !== ACTION_SLOT) return ctx;\n const instanceId = node.props['instanceId'];\n if (typeof instanceId !== 'string' || instanceId === '') return ctx;\n const outer = ctx.dispatch;\n return { ...ctx, dispatch: (event) => outer(event.origin === undefined ? { ...event, origin: instanceId } : event) };\n};\n\nconst isTypedIn = (el: Element | null): el is HTMLInputElement | HTMLTextAreaElement =>\n el instanceof HTMLTextAreaElement || (el instanceof HTMLInputElement && el.type !== 'checkbox' && el.type !== 'radio');\n\ntype Typing = { value: string; start: number | null; end: number | null };\n\nconst typingIn = (el: Element | null): Typing | undefined => (isTypedIn(el) ? { value: el.value, start: el.selectionStart, end: el.selectionEnd } : undefined);\n\nconst placeCaret = (el: HTMLInputElement | HTMLTextAreaElement, typing: Typing): void => {\n try {\n el.setSelectionRange(typing.start ?? el.value.length, typing.end ?? el.value.length);\n } catch {\n /* setSelectionRange throws on input types that have no selection (email, number) */\n }\n};\n\nconst placeUnder = (root: Node, node: Node): number[] | undefined => {\n const place: number[] = [];\n let at: Node = node;\n while (at !== root) {\n const parent = at.parentNode;\n if (parent === null) return undefined;\n const child = at;\n place.unshift([...parent.childNodes].findIndex((sibling) => sibling === child));\n at = parent;\n }\n return place;\n};\n\nconst nodeUnder = (root: Node, place: number[]): Node | undefined => place.reduce<Node | undefined>((at, index) => at?.childNodes[index], root);\n\nexport const createDomView = (\n root: HTMLElement,\n registry: ComponentRegistry<DomComponent>,\n api: DomRenderApi,\n options: { fallback?: DomComponent } = {},\n): DomView => {\n const top: Ctx = { registry, dispatch: () => undefined, api, ...(options.fallback !== undefined ? { fallback: options.fallback } : {}) };\n let mounts: Mount[] = [];\n let drawn = false;\n let writes = 0;\n const refocus: { from: Element | null; to: HTMLElement | undefined } = { from: null, to: undefined };\n const fields = new WeakMap<Node, { stale: boolean }>();\n\n const builderOf = (node: ComponentRenderNode, ctx: Ctx): DomComponent | undefined => ctx.registry.get(node.name)?.component ?? ctx.fallback;\n\n const leaf = (node: RenderNode, ctx: Ctx, el: Node): Mount => ({ node, ctx, dom: [el], kids: [], host: undefined, cleanups: [], field: { stale: false } });\n\n // Only its own cleanups: its kids may live on under the element built in its place.\n const leave = (mount: Mount): void => {\n if (mount.cleanups.length === 0) return;\n for (const cleanup of mount.cleanups.splice(0)) cleanup();\n };\n\n const drop = (mount: Mount): void => {\n leave(mount);\n for (const kid of mount.kids) drop(kid);\n };\n\n const assemble = (node: ComponentRenderNode, ctx: Ctx, kids: Mount[], replaced?: Mount): Mount => {\n if (replaced !== undefined) leave(replaced);\n const builder = builderOf(node, ctx);\n if (builder === undefined) {\n for (const kid of kids) drop(kid);\n return leaf(node, ctx, errorEl('COMPONENT_NOT_FOUND', node.name));\n }\n const children = kids.filter((kid) => !isHeadNode(kid.node)).map((kid): Node => {\n const [only] = kid.dom;\n if (kid.node.type !== 'fragment' && only !== undefined) return only;\n const fragment = document.createDocumentFragment();\n fragment.append(...kid.dom);\n return fragment;\n });\n const cleanups: (() => void)[] = [];\n const field = { stale: false };\n let holdsOnly = true;\n writes += 1;\n const el = builder({\n props: node.props,\n children,\n dispatch: ctx.dispatch,\n onRemove: (cleanup) => void cleanups.push(cleanup),\n dependsOnChildren: () => {\n holdsOnly = false;\n },\n });\n el.setAttribute('data-component', node.name);\n if (node.ref !== undefined) el.setAttribute('data-ref', node.ref);\n wireEvents(el, node, ctx.dispatch, field);\n if (node.model !== undefined) fields.set(el, field);\n if (replaced !== undefined && refocus.from !== null && replaced.dom[0] === refocus.from) refocus.to = el;\n return { node, ctx, dom: [el], kids, host: holdsOnly && holdsExactly(el, flat(kids)) ? el : undefined, cleanups, field };\n };\n\n const build = (node: RenderNode, parent: Ctx): Mount => {\n const ctx = inInstance(node, parent);\n writes += 1;\n if (node.type === 'text') return leaf(node, ctx, document.createTextNode(node.value));\n if (node.type === 'error') return leaf(node, ctx, errorEl(node.code, node.message));\n if (node.type === 'fragment') {\n const kids = node.children.map((child) => build(child, ctx));\n return { node, ctx, dom: flat(kids), kids, host: undefined, cleanups: [], field: { stale: false } };\n }\n if (node.name === CANVAS_SLOT) {\n const canvasId = canvasIdOf(node);\n const host = document.createElement('div');\n host.setAttribute('data-canvas', canvasId);\n const canvasCtx: Ctx = { ...ctx, dispatch: (event) => ctx.api.dispatch(canvasId, event) };\n const kids = canvasId === '' ? [] : ctx.api.canvasTree(canvasId).map((child) => build(child, canvasCtx));\n host.append(...flat(kids));\n return { node, ctx: canvasCtx, dom: [host], kids, host, cleanups: [], field: { stale: false } };\n }\n if (isHeadNode(node)) return { node, ctx, dom: [], kids: [], host: undefined, cleanups: [], field: { stale: false } };\n if (builderOf(node, ctx) === undefined) return leaf(node, ctx, errorEl('COMPONENT_NOT_FOUND', node.name));\n return assemble(node, ctx, node.children.map((child) => build(child, ctx)));\n };\n\n const place = (host: HTMLElement, before: Node[], after: Node[]): void => {\n if (sameNodes(before, after)) return;\n const wanted = new Set(after);\n if (host.childNodes.length === before.length && !before.some((node) => wanted.has(node))) {\n host.replaceChildren(gathered(after));\n writes += 1;\n return;\n }\n for (const node of before) {\n if (wanted.has(node) || node.parentNode !== host) continue;\n host.removeChild(node);\n writes += 1;\n }\n const stoodAt = new Map(before.map((node, i) => [node, i]));\n const stays = standing(after.map((node) => stoodAt.get(node) ?? -1));\n let anchor: Node | null = null;\n let run: Node[] = [];\n const putIn = (): void => {\n const [only] = run;\n if (only === undefined) return;\n host.insertBefore(run.length === 1 ? only : gathered(run.reverse()), anchor);\n writes += 1;\n run = [];\n };\n for (let i = after.length - 1; i >= 0; i -= 1) {\n const node = after[i];\n if (node === undefined) continue;\n if (stays.has(i)) {\n putIn();\n anchor = node;\n } else run.push(node);\n }\n putIn();\n };\n\n const reconcile = (olds: Mount[], nexts: readonly RenderNode[], ctx: Ctx): Mount[] => {\n if (olds.length === nexts.length && olds.every((old, i) => samePlace(old.node, nexts[i] ?? old.node))) {\n return olds.map((old, i) => patch(old, nexts[i] ?? old.node, ctx));\n }\n const drawnBy = new Map(keyed(olds, (old) => old.node));\n const kids = keyed(nexts, (next) => next).map(([key, next]) => {\n const old = drawnBy.get(key);\n if (old === undefined) return build(next, ctx);\n drawnBy.delete(key);\n return patch(old, next, ctx);\n });\n for (const gone of drawnBy.values()) drop(gone);\n return kids;\n };\n\n const patch = (old: Mount, next: RenderNode, parent: Ctx): Mount => {\n const prev = old.node;\n const afresh = (): Mount => {\n drop(old);\n return build(next, parent);\n };\n if (prev.type === 'text' && next.type === 'text') {\n const [node] = old.dom;\n if (prev.value !== next.value && node !== undefined) {\n node.nodeValue = next.value;\n writes += 1;\n }\n old.node = next;\n return old;\n }\n if (prev.type === 'fragment' && next.type === 'fragment') {\n // No element of its own: the host above it puts its nodes in place.\n old.kids = reconcile(old.kids, next.children, old.ctx);\n old.dom = flat(old.kids);\n old.node = next;\n return old;\n }\n if (prev.type !== 'component' || next.type !== 'component') return equal(prev, next) ? old : afresh();\n // A different component, canvas or instance in the same place keeps nothing\n // of the old one: its listeners would go on dispatching as the old instance.\n if (prev.name !== next.name || !Object.is(slotOf(prev), slotOf(next))) return afresh();\n\n if (isHeadNode(next)) {\n old.node = next;\n return old;\n }\n\n if (next.name === CANVAS_SLOT) {\n const host = old.host;\n if (host === undefined) return afresh();\n const canvasId = canvasIdOf(next);\n const before = flat(old.kids);\n old.kids = reconcile(old.kids, canvasId === '' ? [] : old.ctx.api.canvasTree(canvasId), old.ctx);\n place(host, before, flat(old.kids));\n old.node = next;\n return old;\n }\n\n const [el] = old.dom;\n if (el === undefined) return afresh();\n let own = equal(prev.props, next.props) && prev.ref === next.ref && equal(prev.model, next.model);\n if (next.model !== undefined) {\n const active = el.ownerDocument?.activeElement ?? null;\n if (isTypedIn(active) && el.contains(active)) {\n // While a bound field is being typed in, the typing wins: a tree that differs only in\n // the field's value keeps the field, with its caret, composition and pending debounce.\n if (!own && prev.ref === next.ref && equal(prev.model, next.model) && equal(withoutValue(prev.props), withoutValue(next.props))) {\n old.field.stale = true;\n own = true;\n }\n } else if (old.field.stale) {\n // No longer typed in, or a checkbox that was pressed: the tree's value\n // is the field's again. How a value is shown is the kit's business, so\n // the kit is asked for the field afresh.\n own = false;\n }\n }\n\n const handed = old.host === undefined ? old.kids.map((kid) => kid.dom) : undefined;\n const before = flat(old.kids);\n const mark = writes;\n const kids = reconcile(old.kids, next.children, old.ctx);\n const after = flat(kids);\n const kept = (): Mount => {\n old.kids = kids;\n old.node = next;\n return old;\n };\n if (own) {\n if (old.host !== undefined) {\n // Down to none is left to the component: it may draw itself differently when empty.\n if (after.length > 0) {\n place(old.host, before, after);\n return kept();\n }\n } else if (handed !== undefined && handed.length === kids.length && kids.every((kid, i) => sameNodes(handed[i] ?? [], kid.dom))) {\n // It would be handed the same nodes, so it would draw the same. What\n // changed further down was patched where it stands, which is on the\n // page only if this component put its children on the page.\n if (writes === mark || after.every((node) => el.contains(node))) return kept();\n }\n }\n return assemble(next, old.ctx, kids, old);\n };\n\n const render = (): void => {\n const doc = root.ownerDocument;\n const active = doc.activeElement !== null && root.contains(doc.activeElement) ? doc.activeElement : null;\n const typing = typingIn(active);\n // The first render replaces markup that arrived with the page. Somebody may\n // already be typing in it, so where they are is noted.\n const adopted = !drawn && active !== null ? placeUnder(root, active) : undefined;\n refocus.from = active;\n refocus.to = undefined;\n if (!drawn) root.replaceChildren();\n drawn = true;\n const before = flat(mounts);\n mounts = reconcile(mounts, api.frame(), top);\n place(root, before, flat(mounts));\n const twin = adopted === undefined ? undefined : nodeUnder(root, adopted);\n // An element that was moved lost focus in the move, and one built again never had it.\n // A field built again also gets what was being typed in the one it replaced.\n const rebuilt = refocus.to ?? (twin instanceof HTMLElement && twin.tagName === active?.tagName ? twin : undefined);\n const target = rebuilt ?? (active instanceof HTMLElement && active.isConnected ? active : undefined);\n refocus.from = null;\n refocus.to = undefined;\n if (target === undefined || doc.activeElement === target) return;\n if (rebuilt !== undefined && typing !== undefined && isTypedIn(target)) {\n target.value = typing.value;\n const field = fields.get(target);\n if (field !== undefined) field.stale = true;\n }\n target.focus({ preventScroll: true });\n if (typing !== undefined && isTypedIn(target)) placeCaret(target, typing);\n };\n\n const destroy = (): void => {\n for (const mount of mounts) drop(mount);\n mounts = [];\n drawn = false;\n root.replaceChildren();\n };\n\n return { render, destroy };\n};\n\nexport const mountShell = (\n root: HTMLElement,\n registry: ComponentRegistry<DomComponent>,\n shell: Shell,\n options: { fallback?: DomComponent } = {},\n): { destroy: () => void } => {\n const view = shellView(shell);\n // One reading of the shell per render: the head is read off the trees the view just drew.\n let read: { frame?: RenderNode[]; trees: Map<string, RenderNode[]> } = { trees: new Map() };\n const api: DomRenderApi = {\n ...view.api,\n frame: () => (read.frame ??= view.api.frame()),\n canvasTree: (canvasId) => {\n const held = read.trees.get(canvasId);\n if (held !== undefined) return held;\n const tree = view.api.canvasTree(canvasId);\n read.trees.set(canvasId, tree);\n return tree;\n },\n };\n const dom = createDomView(root, registry, api, options);\n const keepHead = createHeadKeeper(root.ownerDocument);\n const render = (): void => {\n read = { trees: new Map() };\n dom.render();\n if (root.isConnected) keepHead(headOf(api)?.elements);\n };\n render();\n const stop = view.subscribe(render);\n return {\n destroy: () => {\n stop();\n dom.destroy();\n },\n };\n};\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ACTION_SLOT_NAME, isHeadNode, CANVAS_SLOT_NAME } from './chunk-
|
|
2
|
-
import { mountInputKeys, createLayoutStore, composeAction, renderLayoutFromStore, resolve, createScopeChain, isMutationStep } from './chunk-
|
|
3
|
-
import { UnknownFragmentError, ActionDefinitionSchema, DefinitionValidationError, ActionFragmentSchema, StepSchema, UnknownActionError, NovaError, ErrorCodes, applyMutations, ShellDisposedError, LifecycleError, UnknownFunctionError, setPath } from './chunk-
|
|
4
|
-
import { isArray, isObject, hasKey } from './chunk-
|
|
5
|
-
import { createComponentRegistry } from './chunk-
|
|
1
|
+
import { ACTION_SLOT_NAME, isHeadNode, CANVAS_SLOT_NAME } from './chunk-C63CBYD5.js';
|
|
2
|
+
import { mountInputKeys, createLayoutStore, composeAction, renderLayoutFromStore, resolve, createScopeChain, isMutationStep } from './chunk-YV2G37TJ.js';
|
|
3
|
+
import { UnknownFragmentError, ActionDefinitionSchema, DefinitionValidationError, ActionFragmentSchema, StepSchema, UnknownActionError, NovaError, ErrorCodes, applyMutations, ShellDisposedError, LifecycleError, UnknownFunctionError, setPath } from './chunk-G4OQ4PEO.js';
|
|
4
|
+
import { isArray, isObject, hasKey } from './chunk-GQVJ5UAS.js';
|
|
5
|
+
import { createComponentRegistry } from './chunk-SVWDKXSH.js';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import { exceedsDepth, depthRefusal } from '@niscorp/strata';
|
|
8
8
|
|
|
@@ -197,10 +197,7 @@ var createJournal = (limit) => {
|
|
|
197
197
|
entries.push({ canvas, stack });
|
|
198
198
|
if (entries.length > limit) entries.shift();
|
|
199
199
|
},
|
|
200
|
-
// A pop somebody performed themselves
|
|
201
|
-
// would still hold the entry that pop just satisfied, and the next press of
|
|
202
|
-
// the back button would spend itself restoring a position already on screen
|
|
203
|
-
// — the double-tap that makes a back button feel broken.
|
|
200
|
+
// A pop somebody performed themselves is a back.
|
|
204
201
|
consume: (canvas) => {
|
|
205
202
|
if (off()) return;
|
|
206
203
|
for (let i = entries.length - 1; i >= 0; i -= 1) {
|
|
@@ -210,9 +207,8 @@ var createJournal = (limit) => {
|
|
|
210
207
|
}
|
|
211
208
|
},
|
|
212
209
|
take: () => entries.pop(),
|
|
213
|
-
//
|
|
214
|
-
//
|
|
215
|
-
// a grant dropped at the front door and returned through the back one.
|
|
210
|
+
// An entry naming an action this shell no longer serves would hand a
|
|
211
|
+
// revoked action back through `back`.
|
|
216
212
|
forgetAction: (actionId) => {
|
|
217
213
|
for (let i = entries.length - 1; i >= 0; i -= 1) {
|
|
218
214
|
if (entries[i]?.stack.some((frame) => frame.action === actionId) === true) entries.splice(i, 1);
|
|
@@ -913,7 +909,7 @@ var createActionRuntime = (config) => {
|
|
|
913
909
|
const statusSubscribers = [];
|
|
914
910
|
let triggerHandle;
|
|
915
911
|
let modelWriteOff;
|
|
916
|
-
const
|
|
912
|
+
const modelPaths = /* @__PURE__ */ new Map();
|
|
917
913
|
dataStore.subscribe((next) => {
|
|
918
914
|
instance.data = next;
|
|
919
915
|
});
|
|
@@ -996,9 +992,6 @@ var createActionRuntime = (config) => {
|
|
|
996
992
|
...config.fetch === void 0 ? {} : { fetch: config.fetch },
|
|
997
993
|
...config.transform === void 0 ? {} : { transform: config.transform },
|
|
998
994
|
...onNavigate === void 0 ? {} : { onNavigate },
|
|
999
|
-
// Stamp the call event with this instance's identity before it flows up to
|
|
1000
|
-
// the shell's telemetry — `runCall` only knows the endpoint, the runtime
|
|
1001
|
-
// knows who made it.
|
|
1002
995
|
...config.onEndpoint === void 0 ? {} : { onEndpoint: (event) => config.onEndpoint({ ...event, instanceId: instance.id, canvasId: instance.canvasId }) },
|
|
1003
996
|
...config.onChain === void 0 ? {} : { onChain: config.onChain },
|
|
1004
997
|
calls,
|
|
@@ -1008,10 +1001,6 @@ var createActionRuntime = (config) => {
|
|
|
1008
1001
|
onError,
|
|
1009
1002
|
signal,
|
|
1010
1003
|
suspended: instance.status === "suspended",
|
|
1011
|
-
// `reload` — re-run this instance's own mount hook. The same refresh
|
|
1012
|
-
// `resume` performs, made available as a step for canvases that never
|
|
1013
|
-
// suspend (a list keeps every card active, so nothing else would ever
|
|
1014
|
-
// re-read one).
|
|
1015
1004
|
onReload: reload,
|
|
1016
1005
|
...cause === void 0 ? {} : { cause }
|
|
1017
1006
|
});
|
|
@@ -1031,7 +1020,7 @@ var createActionRuntime = (config) => {
|
|
|
1031
1020
|
if (event.type !== "ui:model" || instance.status === "suspended") return;
|
|
1032
1021
|
if (event.origin !== void 0 && event.origin !== instance.id) return;
|
|
1033
1022
|
if (event.ref === void 0) return;
|
|
1034
|
-
const path =
|
|
1023
|
+
const path = modelPaths.get(event.ref);
|
|
1035
1024
|
if (path === void 0) return;
|
|
1036
1025
|
dataStore.update(
|
|
1037
1026
|
(curr) => applyMutations(curr, [{ set: path, value: event.payload }], { initial: initialSnapshot, strict })
|
|
@@ -1098,7 +1087,7 @@ var createActionRuntime = (config) => {
|
|
|
1098
1087
|
abortController.abort();
|
|
1099
1088
|
stopFollowing();
|
|
1100
1089
|
detach();
|
|
1101
|
-
|
|
1090
|
+
modelPaths.clear();
|
|
1102
1091
|
const unmountController = new AbortController();
|
|
1103
1092
|
await runLifecycleHook(
|
|
1104
1093
|
"unmount",
|
|
@@ -1117,11 +1106,8 @@ var createActionRuntime = (config) => {
|
|
|
1117
1106
|
await runLifecycleHook("resume", definition, buildContext);
|
|
1118
1107
|
};
|
|
1119
1108
|
const reconcileModelBindings = (nodes) => {
|
|
1120
|
-
|
|
1121
|
-
for (const b of collectModelBindings(nodes))
|
|
1122
|
-
};
|
|
1123
|
-
const teardownModelListeners = () => {
|
|
1124
|
-
modelListeners.clear();
|
|
1109
|
+
modelPaths.clear();
|
|
1110
|
+
for (const b of collectModelBindings(nodes)) modelPaths.set(b.ref, b.path);
|
|
1125
1111
|
};
|
|
1126
1112
|
const render = () => {
|
|
1127
1113
|
const language = config.i18n?.();
|
|
@@ -1148,7 +1134,7 @@ var createActionRuntime = (config) => {
|
|
|
1148
1134
|
const dispose = () => {
|
|
1149
1135
|
stopFollowing();
|
|
1150
1136
|
detach();
|
|
1151
|
-
|
|
1137
|
+
modelPaths.clear();
|
|
1152
1138
|
statusSubscribers.length = 0;
|
|
1153
1139
|
};
|
|
1154
1140
|
return {
|
|
@@ -1314,11 +1300,8 @@ var flattenNode = (node, shell) => {
|
|
|
1314
1300
|
return {
|
|
1315
1301
|
type: "component",
|
|
1316
1302
|
name: ACTION_SLOT_NAME,
|
|
1317
|
-
// identity only — never the definition itself (wire weight)
|
|
1318
1303
|
props: { instanceId, canvasId: runtime.instance.canvasId, definitionId: runtime.instance.definitionId },
|
|
1319
1304
|
children: runtime.render(),
|
|
1320
|
-
// keyed by instance so a renderer remounts when the instance changes
|
|
1321
|
-
// (no stale DOM state across instance swaps, enter animations fire)
|
|
1322
1305
|
key: instanceId
|
|
1323
1306
|
};
|
|
1324
1307
|
}
|
|
@@ -1519,8 +1502,6 @@ var createShell = (config) => {
|
|
|
1519
1502
|
const language = () => {
|
|
1520
1503
|
if (!bearing) return void 0;
|
|
1521
1504
|
return {
|
|
1522
|
-
// An empty book translates nothing and still fills patterns, which is
|
|
1523
|
-
// exactly what the source language needs.
|
|
1524
1505
|
phrases: phrases ?? SOURCE,
|
|
1525
1506
|
...config.phraseKeys === void 0 ? {} : { phraseKeys: config.phraseKeys },
|
|
1526
1507
|
...config.onPhraseMiss === void 0 ? {} : { onPhraseMiss: config.onPhraseMiss }
|
|
@@ -1636,9 +1617,6 @@ var createShell = (config) => {
|
|
|
1636
1617
|
pop: (cid) => pop(cid),
|
|
1637
1618
|
replace: (cid, aid, input, frags) => replace(cid, aid, input, frags),
|
|
1638
1619
|
clear: (cid) => clear(cid),
|
|
1639
|
-
// ONE position, then both halves — see ShellNavOps.resetTo. The record is
|
|
1640
|
-
// taken outside the mute so the deck being thrown away is what back returns
|
|
1641
|
-
// to; the calls inside it record nothing of their own.
|
|
1642
1620
|
resetTo: (cid, aid, input, frags) => {
|
|
1643
1621
|
record(cid);
|
|
1644
1622
|
journal.mute(() => {
|
|
@@ -1648,11 +1626,6 @@ var createShell = (config) => {
|
|
|
1648
1626
|
},
|
|
1649
1627
|
popTo: (cid, iid) => popTo(cid, iid),
|
|
1650
1628
|
removeInstance: (cid, iid) => removeInstance(cid, iid),
|
|
1651
|
-
// ONE movement, like resetTo: the position before it is what back returns
|
|
1652
|
-
// to — recorded only when something actually moved, so a reconcile that
|
|
1653
|
-
// found the canvas already right leaves no empty step in history. Rows
|
|
1654
|
-
// naming an action this shell does not have are skipped: ungranted is
|
|
1655
|
-
// absent, as an ungranted `initial` candidate is.
|
|
1656
1629
|
reconcile: (cid, desired, options) => {
|
|
1657
1630
|
const before = positionOf(cid);
|
|
1658
1631
|
const known = desired.filter((entry) => actions[entry.actionId] !== void 0).map((entry) => options.with === void 0 ? entry : { ...entry, with: options.with });
|
|
@@ -1680,8 +1653,6 @@ var createShell = (config) => {
|
|
|
1680
1653
|
i18n: language,
|
|
1681
1654
|
instanceIdFn,
|
|
1682
1655
|
onNavigate: (cid, effect) => navigationHandler(cid, effect),
|
|
1683
|
-
// Every endpoint call an action makes flows to telemetry — the shell's one
|
|
1684
|
-
// observability surface (state, data, and now endpoints all land here).
|
|
1685
1656
|
onEndpoint: (event) => telemetry.fireEndpoint(event),
|
|
1686
1657
|
onChain: chains.hold
|
|
1687
1658
|
});
|
|
@@ -2033,10 +2004,6 @@ var shellView = (shell) => ({
|
|
|
2033
2004
|
api: {
|
|
2034
2005
|
frame: () => shell.getShellRenderTree(),
|
|
2035
2006
|
canvasTree: (canvasId) => canvasTreeOf(shell, canvasId),
|
|
2036
|
-
// An event that names no origin belongs to the canvas's ACTIVE instance — on
|
|
2037
|
-
// a card deck that is the only one drawn. One that names its own (an
|
|
2038
|
-
// adapter stamps it at the instance boundary, `scopeDispatch`) keeps it. A
|
|
2039
|
-
// canvas with nothing mounted dispatches unstamped.
|
|
2040
2007
|
dispatch: (canvasId, event) => {
|
|
2041
2008
|
const active = shell.getState().canvases[canvasId]?.active;
|
|
2042
2009
|
shell.dispatch(event.origin === void 0 && active !== void 0 ? { ...event, origin: active.id } : event);
|
|
@@ -2098,5 +2065,5 @@ var shellSettled = (shell, options = {}) => shellQuietWithin(shell, () => isMoun
|
|
|
2098
2065
|
var shellIdle = (shell, options = {}) => shellQuietWithin(shell, () => isMounting(shell) || chainsInFlight(shell) > 0, options);
|
|
2099
2066
|
|
|
2100
2067
|
export { DEFAULT_HISTORY_DEPTH, DEFAULT_SETTLE_WAIT_MS, MessageEnvelopeSchema, NovaEventSchema, canvasTreeOf, createIdFactory, createShell, hasVisibleContent, navigatedChannel, reconcileCanvas, scopeDispatch, shellIdle, shellSettled, shellView };
|
|
2101
|
-
//# sourceMappingURL=chunk-
|
|
2102
|
-
//# sourceMappingURL=chunk-
|
|
2068
|
+
//# sourceMappingURL=chunk-3JE77TNL.js.map
|
|
2069
|
+
//# sourceMappingURL=chunk-3JE77TNL.js.map
|