@niscorp/nova 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ACTION_DOCS.md +2 -0
- package/ADAPTER.md +19 -1
- package/CHANGELOG.md +18 -0
- package/I18N_DOCS.md +18 -3
- package/REACT_DOCS.md +4 -2
- package/README.md +93 -3
- package/SHELL_DOCS.md +16 -7
- package/TERMINAL_DOCS.md +24 -5
- package/dist/adapters/dom/components/index.cjs +2 -4
- package/dist/adapters/dom/components/index.cjs.map +1 -1
- package/dist/adapters/dom/components/index.d.cts +4 -4
- package/dist/adapters/dom/components/index.d.ts +4 -4
- package/dist/adapters/dom/components/index.js +1 -3
- package/dist/adapters/dom/components/index.js.map +1 -1
- package/dist/adapters/dom/index.cjs +14 -14
- package/dist/adapters/dom/index.d.cts +4 -4
- package/dist/adapters/dom/index.d.ts +4 -4
- package/dist/adapters/dom/index.js +12 -12
- package/dist/adapters/dom/server.cjs +13 -13
- package/dist/adapters/dom/server.cjs.map +1 -1
- package/dist/adapters/dom/server.d.cts +4 -4
- package/dist/adapters/dom/server.d.ts +4 -4
- package/dist/adapters/dom/server.js +12 -12
- package/dist/adapters/dom/server.js.map +1 -1
- package/dist/adapters/ink/index.js +0 -2
- package/dist/adapters/ink/index.js.map +1 -1
- package/dist/adapters/react/components/index.cjs +32 -32
- package/dist/adapters/react/components/index.d.cts +4 -4
- package/dist/adapters/react/components/index.d.ts +4 -4
- package/dist/adapters/react/components/index.js +13 -13
- package/dist/adapters/react/index.cjs +35 -35
- package/dist/adapters/react/index.d.cts +6 -6
- package/dist/adapters/react/index.d.ts +6 -6
- package/dist/adapters/react/index.js +13 -13
- package/dist/adapters/tty/components/index.cjs +2 -4
- package/dist/adapters/tty/components/index.cjs.map +1 -1
- package/dist/adapters/tty/components/index.d.cts +4 -4
- package/dist/adapters/tty/components/index.d.ts +4 -4
- package/dist/adapters/tty/components/index.js +1 -3
- package/dist/adapters/tty/components/index.js.map +1 -1
- package/dist/adapters/tty/index.cjs +12 -12
- package/dist/adapters/tty/index.cjs.map +1 -1
- package/dist/adapters/tty/index.d.cts +4 -4
- package/dist/adapters/tty/index.d.ts +4 -4
- package/dist/adapters/tty/index.js +10 -10
- package/dist/adapters/tty/index.js.map +1 -1
- package/dist/adapters/vue/components/index.cjs +32 -32
- package/dist/adapters/vue/components/index.d.cts +12 -12
- package/dist/adapters/vue/components/index.d.ts +12 -12
- package/dist/adapters/vue/components/index.js +13 -13
- package/dist/adapters/vue/index.cjs +41 -41
- package/dist/adapters/vue/index.cjs.map +1 -1
- package/dist/adapters/vue/index.d.cts +6 -6
- package/dist/adapters/vue/index.d.ts +6 -6
- package/dist/adapters/vue/index.js +14 -14
- package/dist/adapters/vue/index.js.map +1 -1
- package/dist/agent/index.cjs +6 -6
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.d.cts +2 -2
- package/dist/agent/index.d.ts +2 -2
- package/dist/agent/index.js +3 -3
- package/dist/agent/index.js.map +1 -1
- package/dist/{chunk-QLFHYHJ2.js → chunk-2H6Y25FO.js} +6 -6
- package/dist/chunk-2H6Y25FO.js.map +1 -0
- package/dist/{chunk-P5SJ3QXJ.js → chunk-3JE77TNL.js} +16 -49
- package/dist/chunk-3JE77TNL.js.map +1 -0
- package/dist/{chunk-OE527MXF.cjs → chunk-3XFQI5P2.cjs} +2 -2
- package/dist/chunk-3XFQI5P2.cjs.map +1 -0
- package/dist/{chunk-XQTI4Q4I.js → chunk-A4GK3PLP.js} +4 -4
- package/dist/chunk-A4GK3PLP.js.map +1 -0
- package/dist/{chunk-PMKWYOOX.cjs → chunk-BXUEWV7V.cjs} +2 -2
- package/dist/chunk-BXUEWV7V.cjs.map +1 -0
- package/dist/{chunk-RFBIGRCI.js → chunk-C63CBYD5.js} +3 -3
- package/dist/chunk-C63CBYD5.js.map +1 -0
- package/dist/{chunk-FSUMCJAR.cjs → chunk-CQZH3L3W.cjs} +39 -39
- package/dist/chunk-CQZH3L3W.cjs.map +1 -0
- package/dist/{chunk-UGG7MCX4.cjs → chunk-DC5HONDE.cjs} +2 -2
- package/dist/chunk-DC5HONDE.cjs.map +1 -0
- package/dist/{chunk-ECFWPZGL.cjs → chunk-DLZNZHUW.cjs} +92 -125
- package/dist/chunk-DLZNZHUW.cjs.map +1 -0
- package/dist/{chunk-EG45GQOE.js → chunk-EK2GBZ7D.js} +5 -5
- package/dist/chunk-EK2GBZ7D.js.map +1 -0
- package/dist/{chunk-Z7CS43ZT.cjs → chunk-FKAPJMNR.cjs} +28 -28
- package/dist/chunk-FKAPJMNR.cjs.map +1 -0
- package/dist/{chunk-DIFE573X.js → chunk-G4OQ4PEO.js} +6 -6
- package/dist/chunk-G4OQ4PEO.js.map +1 -0
- package/dist/{chunk-RBU5PHN4.js → chunk-GQVJ5UAS.js} +2 -2
- package/dist/chunk-GQVJ5UAS.js.map +1 -0
- package/dist/{chunk-AGEAMUQR.cjs → chunk-HDREPLRA.cjs} +13 -13
- package/dist/chunk-HDREPLRA.cjs.map +1 -0
- package/dist/{chunk-ZYTWQZZC.cjs → chunk-I35ZD3PU.cjs} +26 -26
- package/dist/chunk-I35ZD3PU.cjs.map +1 -0
- package/dist/{chunk-KW34ZKF5.cjs → chunk-ITGR7P2B.cjs} +2 -2
- package/dist/chunk-ITGR7P2B.cjs.map +1 -0
- package/dist/{chunk-JI7ZRESP.js → chunk-JKULAG53.js} +2 -2
- package/dist/chunk-JKULAG53.js.map +1 -0
- package/dist/{chunk-PBPUSZIQ.cjs → chunk-K54CT3QN.cjs} +50 -69
- package/dist/chunk-K54CT3QN.cjs.map +1 -0
- package/dist/{chunk-7TS3YVQR.js → chunk-M2ZZUSH3.js} +6 -7
- package/dist/chunk-M2ZZUSH3.js.map +1 -0
- package/dist/{chunk-GV7UC3SS.cjs → chunk-MEZCO7ND.cjs} +2 -2
- package/dist/chunk-MEZCO7ND.cjs.map +1 -0
- package/dist/{chunk-D4PUWBN6.cjs → chunk-NBXZ3RAC.cjs} +2 -2
- package/dist/chunk-NBXZ3RAC.cjs.map +1 -0
- package/dist/{chunk-L5223LLX.js → chunk-OBFFZ23H.js} +2 -2
- package/dist/chunk-OBFFZ23H.js.map +1 -0
- package/dist/{chunk-7MATRNZZ.js → chunk-OSIFUROH.js} +6 -6
- package/dist/chunk-OSIFUROH.js.map +1 -0
- package/dist/{chunk-RB4OMSPA.js → chunk-PCUXNVWF.js} +7 -7
- package/dist/chunk-PCUXNVWF.js.map +1 -0
- package/dist/{chunk-WGZZKCJQ.cjs → chunk-QHX3VA55.cjs} +7 -7
- package/dist/chunk-QHX3VA55.cjs.map +1 -0
- package/dist/{chunk-PNQY6OFB.cjs → chunk-QTJ4ZQRM.cjs} +20 -20
- package/dist/chunk-QTJ4ZQRM.cjs.map +1 -0
- package/dist/{chunk-KOYRJXTI.cjs → chunk-RVU6YEHO.cjs} +10 -11
- package/dist/chunk-RVU6YEHO.cjs.map +1 -0
- package/dist/{chunk-HYFNOF7Y.cjs → chunk-SABSY2BW.cjs} +8 -8
- package/dist/chunk-SABSY2BW.cjs.map +1 -0
- package/dist/{chunk-V4BPFFFV.js → chunk-SCXYAXMO.js} +3 -3
- package/dist/chunk-SCXYAXMO.js.map +1 -0
- package/dist/{chunk-2MNLEL45.js → chunk-SVWDKXSH.js} +2 -2
- package/dist/chunk-SVWDKXSH.js.map +1 -0
- package/dist/{chunk-X5JTZ5LW.js → chunk-UXFQZX6O.js} +3 -3
- package/dist/chunk-UXFQZX6O.js.map +1 -0
- package/dist/{chunk-OE4E6IBD.js → chunk-Y3UKAJJX.js} +2 -2
- package/dist/chunk-Y3UKAJJX.js.map +1 -0
- package/dist/{chunk-XUSKGJRI.js → chunk-YV2G37TJ.js} +8 -27
- package/dist/chunk-YV2G37TJ.js.map +1 -0
- package/dist/{chunk-5YQIAS4V.cjs → chunk-ZR54IVVS.cjs} +20 -20
- package/dist/chunk-ZR54IVVS.cjs.map +1 -0
- package/dist/{chunk-M3UFIUXK.cjs → chunk-ZVQKCDUG.cjs} +7 -7
- package/dist/chunk-ZVQKCDUG.cjs.map +1 -0
- package/dist/{chunk-OGD5CCMZ.js → chunk-ZZRQAH5Z.js} +2 -2
- package/dist/chunk-ZZRQAH5Z.js.map +1 -0
- package/dist/devtools/index.cjs +12 -42
- package/dist/devtools/index.cjs.map +1 -1
- package/dist/devtools/index.d.cts +4 -4
- package/dist/devtools/index.d.ts +4 -4
- package/dist/devtools/index.js +9 -39
- package/dist/devtools/index.js.map +1 -1
- package/dist/document/index.cjs +16 -16
- package/dist/document/index.d.cts +6 -6
- package/dist/document/index.d.ts +6 -6
- package/dist/document/index.js +3 -3
- package/dist/{effects-CndX9K7D.d.cts → effects-DkBBrxVj.d.cts} +0 -2
- package/dist/{effects-CndX9K7D.d.ts → effects-DkBBrxVj.d.ts} +0 -2
- package/dist/{endpoints-CD-6Jl-H.d.ts → endpoints-DD6VsLv9.d.ts} +1 -1
- package/dist/{endpoints-Dem-EdRx.d.cts → endpoints-fqx9Vmf6.d.cts} +1 -1
- package/dist/examples/index.cjs +4 -4
- package/dist/examples/index.cjs.map +1 -1
- package/dist/examples/index.d.cts +4 -4
- package/dist/examples/index.d.ts +4 -4
- package/dist/examples/index.js +3 -3
- package/dist/examples/index.js.map +1 -1
- package/dist/{head-CAzfTnpV.d.cts → head-BOjhYA36.d.cts} +2 -2
- package/dist/{head-DRpbbj-l.d.ts → head-CBib11hD.d.ts} +2 -2
- package/dist/i18n/index.cjs +13 -13
- package/dist/i18n/index.d.cts +4 -6
- package/dist/i18n/index.d.ts +4 -6
- package/dist/i18n/index.js +3 -3
- package/dist/{index-CNfzSBe2.d.ts → index-BjQX8XZl.d.ts} +1 -1
- package/dist/{index-caZoXSwr.d.cts → index-BoPH5aSd.d.cts} +1 -1
- package/dist/index.cjs +91 -91
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +11 -11
- package/dist/migrations/index.cjs +8 -9
- package/dist/migrations/index.cjs.map +1 -1
- package/dist/migrations/index.d.cts +1 -1
- package/dist/migrations/index.d.ts +1 -1
- package/dist/migrations/index.js +5 -6
- package/dist/migrations/index.js.map +1 -1
- package/dist/{palette-CIpPH90W.d.ts → palette-BZujb2rm.d.ts} +1 -1
- package/dist/{palette-CvwZZCkx.d.cts → palette-CCxWSi3C.d.cts} +1 -1
- package/dist/reflect/index.cjs +27 -27
- package/dist/reflect/index.d.cts +5 -5
- package/dist/reflect/index.d.ts +5 -5
- package/dist/reflect/index.js +9 -9
- package/dist/{types-qnKMx0_V.d.ts → types-CJC8mnzl.d.ts} +0 -1
- package/dist/{types-j290XhCn.d.cts → types-CR56luN7.d.cts} +0 -1
- package/dist/{types-DsWNYc7R.d.cts → types-D0x56Ya-.d.cts} +1 -1
- package/dist/{types-D23TRvqe.d.ts → types-Dn9cBFCC.d.ts} +3 -3
- package/dist/{types-C9734_lJ.d.cts → types-DzB3TAQj.d.cts} +1 -1
- package/dist/{types-BWc-olbY.d.ts → types-LXw2RJfH.d.ts} +1 -1
- package/dist/{types-qkzTfSye.d.cts → types-OsJI-ceI.d.cts} +3 -3
- package/dist/{types-BSKx5MXW.d.ts → types-pbBIUNxw.d.ts} +1 -1
- package/package.json +7 -7
- package/dist/chunk-2MNLEL45.js.map +0 -1
- package/dist/chunk-5YQIAS4V.cjs.map +0 -1
- package/dist/chunk-7MATRNZZ.js.map +0 -1
- package/dist/chunk-7TS3YVQR.js.map +0 -1
- package/dist/chunk-AGEAMUQR.cjs.map +0 -1
- package/dist/chunk-D4PUWBN6.cjs.map +0 -1
- package/dist/chunk-DIFE573X.js.map +0 -1
- package/dist/chunk-ECFWPZGL.cjs.map +0 -1
- package/dist/chunk-EG45GQOE.js.map +0 -1
- package/dist/chunk-FSUMCJAR.cjs.map +0 -1
- package/dist/chunk-GV7UC3SS.cjs.map +0 -1
- package/dist/chunk-HYFNOF7Y.cjs.map +0 -1
- package/dist/chunk-JI7ZRESP.js.map +0 -1
- package/dist/chunk-KOYRJXTI.cjs.map +0 -1
- package/dist/chunk-KW34ZKF5.cjs.map +0 -1
- package/dist/chunk-L5223LLX.js.map +0 -1
- package/dist/chunk-M3UFIUXK.cjs.map +0 -1
- package/dist/chunk-OE4E6IBD.js.map +0 -1
- package/dist/chunk-OE527MXF.cjs.map +0 -1
- package/dist/chunk-OGD5CCMZ.js.map +0 -1
- package/dist/chunk-P5SJ3QXJ.js.map +0 -1
- package/dist/chunk-PBPUSZIQ.cjs.map +0 -1
- package/dist/chunk-PMKWYOOX.cjs.map +0 -1
- package/dist/chunk-PNQY6OFB.cjs.map +0 -1
- package/dist/chunk-QLFHYHJ2.js.map +0 -1
- package/dist/chunk-RB4OMSPA.js.map +0 -1
- package/dist/chunk-RBU5PHN4.js.map +0 -1
- package/dist/chunk-RFBIGRCI.js.map +0 -1
- package/dist/chunk-UGG7MCX4.cjs.map +0 -1
- package/dist/chunk-V4BPFFFV.js.map +0 -1
- package/dist/chunk-WGZZKCJQ.cjs.map +0 -1
- package/dist/chunk-X5JTZ5LW.js.map +0 -1
- package/dist/chunk-XQTI4Q4I.js.map +0 -1
- package/dist/chunk-XUSKGJRI.js.map +0 -1
- package/dist/chunk-Z7CS43ZT.cjs.map +0 -1
- package/dist/chunk-ZYTWQZZC.cjs.map +0 -1
- package/dist/{primitive-props-CGoJvmcH.d.cts → primitive-props-Cl5jiC8g.d.cts} +5 -5
- package/dist/{primitive-props-CGoJvmcH.d.ts → primitive-props-Cl5jiC8g.d.ts} +5 -5
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
5
|
-
require('../../chunk-
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
var
|
|
8
|
-
require('../../chunk-
|
|
9
|
-
require('../../chunk-
|
|
10
|
-
require('../../chunk-
|
|
11
|
-
require('../../chunk-
|
|
12
|
-
require('../../chunk-
|
|
13
|
-
require('../../chunk-
|
|
14
|
-
require('../../chunk-
|
|
15
|
-
require('../../chunk-
|
|
3
|
+
var chunkI35ZD3PU_cjs = require('../../chunk-I35ZD3PU.cjs');
|
|
4
|
+
require('../../chunk-SABSY2BW.cjs');
|
|
5
|
+
require('../../chunk-QHX3VA55.cjs');
|
|
6
|
+
require('../../chunk-DLZNZHUW.cjs');
|
|
7
|
+
var chunkQTJ4ZQRM_cjs = require('../../chunk-QTJ4ZQRM.cjs');
|
|
8
|
+
require('../../chunk-K54CT3QN.cjs');
|
|
9
|
+
require('../../chunk-BXUEWV7V.cjs');
|
|
10
|
+
require('../../chunk-RVU6YEHO.cjs');
|
|
11
|
+
require('../../chunk-MEZCO7ND.cjs');
|
|
12
|
+
require('../../chunk-CQZH3L3W.cjs');
|
|
13
|
+
require('../../chunk-NBXZ3RAC.cjs');
|
|
14
|
+
require('../../chunk-ITGR7P2B.cjs');
|
|
15
|
+
require('../../chunk-3XFQI5P2.cjs');
|
|
16
16
|
require('../../chunk-Q7SFCCGT.cjs');
|
|
17
17
|
var vue = require('vue');
|
|
18
18
|
|
|
@@ -39,7 +39,7 @@ var NovaRenderProvider = vue.defineComponent(
|
|
|
39
39
|
return props.fallback;
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
vue.provide(
|
|
42
|
+
vue.provide(chunkI35ZD3PU_cjs.NovaRenderKey, value);
|
|
43
43
|
return () => slots.default?.();
|
|
44
44
|
},
|
|
45
45
|
{ name: "NovaRenderProvider", props: ["registry", "dispatch", "publish", "slotWrapper", "fallback"] }
|
|
@@ -51,8 +51,8 @@ var NovaShellProvider = vue.defineComponent(
|
|
|
51
51
|
return props.shell;
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
|
-
vue.provide(
|
|
55
|
-
|
|
54
|
+
vue.provide(chunkI35ZD3PU_cjs.NovaShellKey, source);
|
|
55
|
+
chunkI35ZD3PU_cjs.provideShellHead(() => props.shell);
|
|
56
56
|
const dispatch = (event) => props.shell.dispatch(event);
|
|
57
57
|
const publish = (channel, payload) => props.shell.publish(channel, payload);
|
|
58
58
|
return () => vue.h(
|
|
@@ -82,13 +82,13 @@ var NovaErrorBoundary = vue.defineComponent(
|
|
|
82
82
|
{ name: "NovaErrorBoundary", props: ["fallback", "onError"] }
|
|
83
83
|
);
|
|
84
84
|
var ensureVueBuiltins = (registry) => {
|
|
85
|
-
if (registry.has(
|
|
86
|
-
|
|
85
|
+
if (registry.has(chunkQTJ4ZQRM_cjs.CANVAS_SLOT_NAME)) return;
|
|
86
|
+
chunkI35ZD3PU_cjs.registerNovaVueComponents(registry);
|
|
87
87
|
};
|
|
88
88
|
var ShellRenderTreeView = vue.defineComponent(
|
|
89
89
|
() => {
|
|
90
|
-
const nodes =
|
|
91
|
-
return () => vue.h(
|
|
90
|
+
const nodes = chunkI35ZD3PU_cjs.useShellRenderTree();
|
|
91
|
+
return () => vue.h(chunkI35ZD3PU_cjs.RenderTree, { nodes: nodes.value });
|
|
92
92
|
},
|
|
93
93
|
{ name: "NovaShellRenderTree" }
|
|
94
94
|
);
|
|
@@ -105,9 +105,9 @@ var NovaShell = vue.defineComponent(
|
|
|
105
105
|
);
|
|
106
106
|
var CanvasRenderTreeView = vue.defineComponent(
|
|
107
107
|
(props) => {
|
|
108
|
-
|
|
109
|
-
const nodes =
|
|
110
|
-
return () => vue.h(
|
|
108
|
+
chunkI35ZD3PU_cjs.useShell();
|
|
109
|
+
const nodes = chunkI35ZD3PU_cjs.useCanvasRenderTree(() => props.canvasId);
|
|
110
|
+
return () => vue.h(chunkI35ZD3PU_cjs.RenderTree, { nodes: nodes.value });
|
|
111
111
|
},
|
|
112
112
|
{ name: "NovaCanvasRenderTree", props: ["canvasId"] }
|
|
113
113
|
);
|
|
@@ -126,75 +126,75 @@ var NovaCanvas = vue.defineComponent(
|
|
|
126
126
|
|
|
127
127
|
Object.defineProperty(exports, "ErrorMarker", {
|
|
128
128
|
enumerable: true,
|
|
129
|
-
get: function () { return
|
|
129
|
+
get: function () { return chunkI35ZD3PU_cjs.ErrorMarker; }
|
|
130
130
|
});
|
|
131
131
|
Object.defineProperty(exports, "NovaRenderKey", {
|
|
132
132
|
enumerable: true,
|
|
133
|
-
get: function () { return
|
|
133
|
+
get: function () { return chunkI35ZD3PU_cjs.NovaRenderKey; }
|
|
134
134
|
});
|
|
135
135
|
Object.defineProperty(exports, "NovaShellKey", {
|
|
136
136
|
enumerable: true,
|
|
137
|
-
get: function () { return
|
|
137
|
+
get: function () { return chunkI35ZD3PU_cjs.NovaShellKey; }
|
|
138
138
|
});
|
|
139
139
|
Object.defineProperty(exports, "RenderNodeView", {
|
|
140
140
|
enumerable: true,
|
|
141
|
-
get: function () { return
|
|
141
|
+
get: function () { return chunkI35ZD3PU_cjs.RenderNodeView; }
|
|
142
142
|
});
|
|
143
143
|
Object.defineProperty(exports, "RenderTree", {
|
|
144
144
|
enumerable: true,
|
|
145
|
-
get: function () { return
|
|
145
|
+
get: function () { return chunkI35ZD3PU_cjs.RenderTree; }
|
|
146
146
|
});
|
|
147
147
|
Object.defineProperty(exports, "isNovaComponent", {
|
|
148
148
|
enumerable: true,
|
|
149
|
-
get: function () { return
|
|
149
|
+
get: function () { return chunkI35ZD3PU_cjs.isNovaComponent; }
|
|
150
150
|
});
|
|
151
151
|
Object.defineProperty(exports, "useActionData", {
|
|
152
152
|
enumerable: true,
|
|
153
|
-
get: function () { return
|
|
153
|
+
get: function () { return chunkI35ZD3PU_cjs.useActionData; }
|
|
154
154
|
});
|
|
155
155
|
Object.defineProperty(exports, "useActionStatus", {
|
|
156
156
|
enumerable: true,
|
|
157
|
-
get: function () { return
|
|
157
|
+
get: function () { return chunkI35ZD3PU_cjs.useActionStatus; }
|
|
158
158
|
});
|
|
159
159
|
Object.defineProperty(exports, "useCanvas", {
|
|
160
160
|
enumerable: true,
|
|
161
|
-
get: function () { return
|
|
161
|
+
get: function () { return chunkI35ZD3PU_cjs.useCanvas; }
|
|
162
162
|
});
|
|
163
163
|
Object.defineProperty(exports, "useCanvasRenderTree", {
|
|
164
164
|
enumerable: true,
|
|
165
|
-
get: function () { return
|
|
165
|
+
get: function () { return chunkI35ZD3PU_cjs.useCanvasRenderTree; }
|
|
166
166
|
});
|
|
167
167
|
Object.defineProperty(exports, "useNovaDispatch", {
|
|
168
168
|
enumerable: true,
|
|
169
|
-
get: function () { return
|
|
169
|
+
get: function () { return chunkI35ZD3PU_cjs.useNovaDispatch; }
|
|
170
170
|
});
|
|
171
171
|
Object.defineProperty(exports, "useNovaPublish", {
|
|
172
172
|
enumerable: true,
|
|
173
|
-
get: function () { return
|
|
173
|
+
get: function () { return chunkI35ZD3PU_cjs.useNovaPublish; }
|
|
174
174
|
});
|
|
175
175
|
Object.defineProperty(exports, "useNovaRegistry", {
|
|
176
176
|
enumerable: true,
|
|
177
|
-
get: function () { return
|
|
177
|
+
get: function () { return chunkI35ZD3PU_cjs.useNovaRegistry; }
|
|
178
178
|
});
|
|
179
179
|
Object.defineProperty(exports, "useRenderTree", {
|
|
180
180
|
enumerable: true,
|
|
181
|
-
get: function () { return
|
|
181
|
+
get: function () { return chunkI35ZD3PU_cjs.useRenderTree; }
|
|
182
182
|
});
|
|
183
183
|
Object.defineProperty(exports, "useShell", {
|
|
184
184
|
enumerable: true,
|
|
185
|
-
get: function () { return
|
|
185
|
+
get: function () { return chunkI35ZD3PU_cjs.useShell; }
|
|
186
186
|
});
|
|
187
187
|
Object.defineProperty(exports, "useShellRenderTree", {
|
|
188
188
|
enumerable: true,
|
|
189
|
-
get: function () { return
|
|
189
|
+
get: function () { return chunkI35ZD3PU_cjs.useShellRenderTree; }
|
|
190
190
|
});
|
|
191
191
|
Object.defineProperty(exports, "useShellState", {
|
|
192
192
|
enumerable: true,
|
|
193
|
-
get: function () { return
|
|
193
|
+
get: function () { return chunkI35ZD3PU_cjs.useShellState; }
|
|
194
194
|
});
|
|
195
195
|
Object.defineProperty(exports, "useSlotWrapper", {
|
|
196
196
|
enumerable: true,
|
|
197
|
-
get: function () { return
|
|
197
|
+
get: function () { return chunkI35ZD3PU_cjs.useSlotWrapper; }
|
|
198
198
|
});
|
|
199
199
|
exports.NovaCanvas = NovaCanvas;
|
|
200
200
|
exports.NovaErrorBoundary = NovaErrorBoundary;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/adapters/vue/provider.ts","../../../src/adapters/vue/error-boundary.ts","../../../src/adapters/vue/nova.ts"],"names":["defineComponent","provide","NovaRenderKey","NovaShellKey","provideShellHead","h","shallowRef","onErrorCaptured","CANVAS_SLOT_NAME","registerNovaVueComponents","useShellRenderTree","RenderTree","useShell","useCanvasRenderTree"],"mappings":";;;;;;;;;;;;;;;;;;AAOA,IAAM,eAA6B,MAAM;AAAC,CAAA;AAC1C,IAAM,cAA2B,MAAM;AAAC,CAAA;AAmBjC,IAAM,kBAAA,GAAqBA,mBAAA;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,IAAAC,WAAA,CAAQC,iCAAe,KAAK,CAAA;AAC5B,IAAA,OAAO,MAAM,MAAM,OAAA,IAAU;AAAA,EAC/B,CAAA;AAAA,EACA,EAAE,IAAA,EAAM,oBAAA,EAAsB,KAAA,EAAO,CAAC,YAAY,UAAA,EAAY,SAAA,EAAW,aAAA,EAAe,UAAU,CAAA;AACpG;AAeO,I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AAA,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.cjs","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","provide","NovaRenderKey","NovaShellKey","provideShellHead","h","shallowRef","onErrorCaptured","CANVAS_SLOT_NAME","registerNovaVueComponents","useShellRenderTree","RenderTree","useShell","useCanvasRenderTree"],"mappings":";;;;;;;;;;;;;;;;;;AAOA,IAAM,eAA6B,MAAM;AAAC,CAAA;AAC1C,IAAM,cAA2B,MAAM;AAAC,CAAA;AAUjC,IAAM,kBAAA,GAAqBA,mBAAA;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,IAAAC,WAAA,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AM,IAAI,CAAA;AAC3D,MAAA,IAAI,KAAA,CAAM,KAAA,KAAU,MAAA,EAAW,OAAO,IAAA;AACtC,MAAA,OAAOA,KAAAA,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.cjs","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"]}
|
|
@@ -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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U,KAAA,CAAM,IAAI,CAAA;AAC3D,MAAA,IAAI,KAAA,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\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;A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X,MAAA,MAAM,OAAOC,CAAAA,CAAE,oBAAA,EAAsB,EAAE,QAAA,EAAU,KAAA,CAAM,IAAI,CAAA;AAC3D,MAAA,IAAI,KAAA,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
|