@niscorp/nova 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/ACTION_DOCS.md +3 -1
  2. package/ADAPTER.md +19 -1
  3. package/CHANGELOG.md +33 -0
  4. package/DESIGN.md +9 -6
  5. package/I18N_DOCS.md +18 -3
  6. package/REACT_DOCS.md +4 -2
  7. package/README.md +94 -4
  8. package/SHELL_DOCS.md +24 -17
  9. package/TERMINAL_DOCS.md +24 -5
  10. package/dist/adapters/dom/components/index.cjs +2 -4
  11. package/dist/adapters/dom/components/index.cjs.map +1 -1
  12. package/dist/adapters/dom/components/index.d.cts +4 -4
  13. package/dist/adapters/dom/components/index.d.ts +4 -4
  14. package/dist/adapters/dom/components/index.js +1 -3
  15. package/dist/adapters/dom/components/index.js.map +1 -1
  16. package/dist/adapters/dom/index.cjs +14 -14
  17. package/dist/adapters/dom/index.d.cts +4 -4
  18. package/dist/adapters/dom/index.d.ts +4 -4
  19. package/dist/adapters/dom/index.js +12 -12
  20. package/dist/adapters/dom/server.cjs +13 -13
  21. package/dist/adapters/dom/server.cjs.map +1 -1
  22. package/dist/adapters/dom/server.d.cts +4 -4
  23. package/dist/adapters/dom/server.d.ts +4 -4
  24. package/dist/adapters/dom/server.js +12 -12
  25. package/dist/adapters/dom/server.js.map +1 -1
  26. package/dist/adapters/ink/index.js +0 -2
  27. package/dist/adapters/ink/index.js.map +1 -1
  28. package/dist/adapters/react/components/index.cjs +32 -32
  29. package/dist/adapters/react/components/index.d.cts +4 -4
  30. package/dist/adapters/react/components/index.d.ts +4 -4
  31. package/dist/adapters/react/components/index.js +13 -13
  32. package/dist/adapters/react/index.cjs +35 -35
  33. package/dist/adapters/react/index.d.cts +6 -6
  34. package/dist/adapters/react/index.d.ts +6 -6
  35. package/dist/adapters/react/index.js +13 -13
  36. package/dist/adapters/tty/components/index.cjs +2 -4
  37. package/dist/adapters/tty/components/index.cjs.map +1 -1
  38. package/dist/adapters/tty/components/index.d.cts +4 -4
  39. package/dist/adapters/tty/components/index.d.ts +4 -4
  40. package/dist/adapters/tty/components/index.js +1 -3
  41. package/dist/adapters/tty/components/index.js.map +1 -1
  42. package/dist/adapters/tty/index.cjs +12 -12
  43. package/dist/adapters/tty/index.cjs.map +1 -1
  44. package/dist/adapters/tty/index.d.cts +4 -4
  45. package/dist/adapters/tty/index.d.ts +4 -4
  46. package/dist/adapters/tty/index.js +10 -10
  47. package/dist/adapters/tty/index.js.map +1 -1
  48. package/dist/adapters/vue/components/index.cjs +32 -32
  49. package/dist/adapters/vue/components/index.d.cts +12 -12
  50. package/dist/adapters/vue/components/index.d.ts +12 -12
  51. package/dist/adapters/vue/components/index.js +13 -13
  52. package/dist/adapters/vue/index.cjs +41 -41
  53. package/dist/adapters/vue/index.cjs.map +1 -1
  54. package/dist/adapters/vue/index.d.cts +6 -6
  55. package/dist/adapters/vue/index.d.ts +6 -6
  56. package/dist/adapters/vue/index.js +14 -14
  57. package/dist/adapters/vue/index.js.map +1 -1
  58. package/dist/agent/index.cjs +6 -6
  59. package/dist/agent/index.cjs.map +1 -1
  60. package/dist/agent/index.d.cts +2 -2
  61. package/dist/agent/index.d.ts +2 -2
  62. package/dist/agent/index.js +3 -3
  63. package/dist/agent/index.js.map +1 -1
  64. package/dist/{chunk-QLFHYHJ2.js → chunk-2HWYS6OJ.js} +6 -6
  65. package/dist/chunk-2HWYS6OJ.js.map +1 -0
  66. package/dist/{chunk-7MATRNZZ.js → chunk-2SEZAI3I.js} +6 -6
  67. package/dist/chunk-2SEZAI3I.js.map +1 -0
  68. package/dist/{chunk-OE527MXF.cjs → chunk-3XFQI5P2.cjs} +2 -2
  69. package/dist/chunk-3XFQI5P2.cjs.map +1 -0
  70. package/dist/{chunk-P5SJ3QXJ.js → chunk-3YS2FBF5.js} +54 -68
  71. package/dist/chunk-3YS2FBF5.js.map +1 -0
  72. package/dist/{chunk-XQTI4Q4I.js → chunk-A4GK3PLP.js} +4 -4
  73. package/dist/chunk-A4GK3PLP.js.map +1 -0
  74. package/dist/{chunk-PMKWYOOX.cjs → chunk-BXUEWV7V.cjs} +2 -2
  75. package/dist/chunk-BXUEWV7V.cjs.map +1 -0
  76. package/dist/{chunk-RFBIGRCI.js → chunk-C63CBYD5.js} +3 -3
  77. package/dist/chunk-C63CBYD5.js.map +1 -0
  78. package/dist/{chunk-FSUMCJAR.cjs → chunk-CQZH3L3W.cjs} +39 -39
  79. package/dist/chunk-CQZH3L3W.cjs.map +1 -0
  80. package/dist/{chunk-RB4OMSPA.js → chunk-D42FJUQA.js} +7 -7
  81. package/dist/chunk-D42FJUQA.js.map +1 -0
  82. package/dist/{chunk-UGG7MCX4.cjs → chunk-DC5HONDE.cjs} +2 -2
  83. package/dist/chunk-DC5HONDE.cjs.map +1 -0
  84. package/dist/{chunk-HYFNOF7Y.cjs → chunk-EZ3AJRQ7.cjs} +8 -8
  85. package/dist/chunk-EZ3AJRQ7.cjs.map +1 -0
  86. package/dist/{chunk-ZYTWQZZC.cjs → chunk-FG6IKUHA.cjs} +26 -26
  87. package/dist/chunk-FG6IKUHA.cjs.map +1 -0
  88. package/dist/{chunk-DIFE573X.js → chunk-G4OQ4PEO.js} +6 -6
  89. package/dist/chunk-G4OQ4PEO.js.map +1 -0
  90. package/dist/{chunk-RBU5PHN4.js → chunk-GQVJ5UAS.js} +2 -2
  91. package/dist/chunk-GQVJ5UAS.js.map +1 -0
  92. package/dist/{chunk-KW34ZKF5.cjs → chunk-ITGR7P2B.cjs} +2 -2
  93. package/dist/chunk-ITGR7P2B.cjs.map +1 -0
  94. package/dist/{chunk-JI7ZRESP.js → chunk-JKULAG53.js} +2 -2
  95. package/dist/chunk-JKULAG53.js.map +1 -0
  96. package/dist/{chunk-PBPUSZIQ.cjs → chunk-K54CT3QN.cjs} +50 -69
  97. package/dist/chunk-K54CT3QN.cjs.map +1 -0
  98. package/dist/{chunk-7TS3YVQR.js → chunk-M2ZZUSH3.js} +6 -7
  99. package/dist/chunk-M2ZZUSH3.js.map +1 -0
  100. package/dist/{chunk-GV7UC3SS.cjs → chunk-MEZCO7ND.cjs} +2 -2
  101. package/dist/chunk-MEZCO7ND.cjs.map +1 -0
  102. package/dist/{chunk-D4PUWBN6.cjs → chunk-NBXZ3RAC.cjs} +2 -2
  103. package/dist/chunk-NBXZ3RAC.cjs.map +1 -0
  104. package/dist/{chunk-EG45GQOE.js → chunk-O2N4BVLL.js} +5 -5
  105. package/dist/chunk-O2N4BVLL.js.map +1 -0
  106. package/dist/{chunk-L5223LLX.js → chunk-OBFFZ23H.js} +2 -2
  107. package/dist/chunk-OBFFZ23H.js.map +1 -0
  108. package/dist/{chunk-WGZZKCJQ.cjs → chunk-QHX3VA55.cjs} +7 -7
  109. package/dist/chunk-QHX3VA55.cjs.map +1 -0
  110. package/dist/{chunk-PNQY6OFB.cjs → chunk-QTJ4ZQRM.cjs} +20 -20
  111. package/dist/chunk-QTJ4ZQRM.cjs.map +1 -0
  112. package/dist/{chunk-KOYRJXTI.cjs → chunk-RVU6YEHO.cjs} +10 -11
  113. package/dist/chunk-RVU6YEHO.cjs.map +1 -0
  114. package/dist/{chunk-V4BPFFFV.js → chunk-SCXYAXMO.js} +3 -3
  115. package/dist/chunk-SCXYAXMO.js.map +1 -0
  116. package/dist/{chunk-2MNLEL45.js → chunk-SVWDKXSH.js} +2 -2
  117. package/dist/chunk-SVWDKXSH.js.map +1 -0
  118. package/dist/{chunk-X5JTZ5LW.js → chunk-UXFQZX6O.js} +3 -3
  119. package/dist/chunk-UXFQZX6O.js.map +1 -0
  120. package/dist/{chunk-Z7CS43ZT.cjs → chunk-WQJZMXS5.cjs} +28 -28
  121. package/dist/chunk-WQJZMXS5.cjs.map +1 -0
  122. package/dist/{chunk-ECFWPZGL.cjs → chunk-X77B4ZKQ.cjs} +129 -143
  123. package/dist/chunk-X77B4ZKQ.cjs.map +1 -0
  124. package/dist/{chunk-AGEAMUQR.cjs → chunk-XHDQIQAG.cjs} +13 -13
  125. package/dist/chunk-XHDQIQAG.cjs.map +1 -0
  126. package/dist/{chunk-OE4E6IBD.js → chunk-Y3UKAJJX.js} +2 -2
  127. package/dist/chunk-Y3UKAJJX.js.map +1 -0
  128. package/dist/{chunk-XUSKGJRI.js → chunk-YV2G37TJ.js} +8 -27
  129. package/dist/chunk-YV2G37TJ.js.map +1 -0
  130. package/dist/{chunk-5YQIAS4V.cjs → chunk-ZR54IVVS.cjs} +20 -20
  131. package/dist/chunk-ZR54IVVS.cjs.map +1 -0
  132. package/dist/{chunk-M3UFIUXK.cjs → chunk-ZVQKCDUG.cjs} +7 -7
  133. package/dist/chunk-ZVQKCDUG.cjs.map +1 -0
  134. package/dist/{chunk-OGD5CCMZ.js → chunk-ZZRQAH5Z.js} +2 -2
  135. package/dist/chunk-ZZRQAH5Z.js.map +1 -0
  136. package/dist/devtools/index.cjs +12 -42
  137. package/dist/devtools/index.cjs.map +1 -1
  138. package/dist/devtools/index.d.cts +4 -4
  139. package/dist/devtools/index.d.ts +4 -4
  140. package/dist/devtools/index.js +9 -39
  141. package/dist/devtools/index.js.map +1 -1
  142. package/dist/document/index.cjs +16 -16
  143. package/dist/document/index.d.cts +6 -6
  144. package/dist/document/index.d.ts +6 -6
  145. package/dist/document/index.js +3 -3
  146. package/dist/{effects-CndX9K7D.d.cts → effects-DkBBrxVj.d.cts} +0 -2
  147. package/dist/{effects-CndX9K7D.d.ts → effects-DkBBrxVj.d.ts} +0 -2
  148. package/dist/{endpoints-CD-6Jl-H.d.ts → endpoints-DD6VsLv9.d.ts} +1 -1
  149. package/dist/{endpoints-Dem-EdRx.d.cts → endpoints-fqx9Vmf6.d.cts} +1 -1
  150. package/dist/examples/index.cjs +4 -4
  151. package/dist/examples/index.cjs.map +1 -1
  152. package/dist/examples/index.d.cts +4 -4
  153. package/dist/examples/index.d.ts +4 -4
  154. package/dist/examples/index.js +3 -3
  155. package/dist/examples/index.js.map +1 -1
  156. package/dist/{head-DRpbbj-l.d.ts → head-BvqHLqlL.d.ts} +2 -2
  157. package/dist/{head-CAzfTnpV.d.cts → head-CB1fcRjc.d.cts} +2 -2
  158. package/dist/i18n/index.cjs +13 -13
  159. package/dist/i18n/index.d.cts +4 -6
  160. package/dist/i18n/index.d.ts +4 -6
  161. package/dist/i18n/index.js +3 -3
  162. package/dist/{index-CNfzSBe2.d.ts → index-BjQX8XZl.d.ts} +1 -1
  163. package/dist/{index-caZoXSwr.d.cts → index-BoPH5aSd.d.cts} +1 -1
  164. package/dist/index.cjs +91 -91
  165. package/dist/index.d.cts +11 -11
  166. package/dist/index.d.ts +11 -11
  167. package/dist/index.js +11 -11
  168. package/dist/migrations/index.cjs +8 -9
  169. package/dist/migrations/index.cjs.map +1 -1
  170. package/dist/migrations/index.d.cts +1 -1
  171. package/dist/migrations/index.d.ts +1 -1
  172. package/dist/migrations/index.js +5 -6
  173. package/dist/migrations/index.js.map +1 -1
  174. package/dist/{palette-CIpPH90W.d.ts → palette-BZujb2rm.d.ts} +1 -1
  175. package/dist/{palette-CvwZZCkx.d.cts → palette-CCxWSi3C.d.cts} +1 -1
  176. package/dist/reflect/index.cjs +27 -27
  177. package/dist/reflect/index.d.cts +5 -5
  178. package/dist/reflect/index.d.ts +5 -5
  179. package/dist/reflect/index.js +9 -9
  180. package/dist/{types-qkzTfSye.d.cts → types-BTha1ZLR.d.cts} +4 -5
  181. package/dist/{types-D23TRvqe.d.ts → types-BxpSKUxn.d.ts} +4 -5
  182. package/dist/{types-qnKMx0_V.d.ts → types-CJC8mnzl.d.ts} +0 -1
  183. package/dist/{types-j290XhCn.d.cts → types-CR56luN7.d.cts} +0 -1
  184. package/dist/{types-DsWNYc7R.d.cts → types-D0x56Ya-.d.cts} +1 -1
  185. package/dist/{types-C9734_lJ.d.cts → types-DzB3TAQj.d.cts} +1 -1
  186. package/dist/{types-BWc-olbY.d.ts → types-LXw2RJfH.d.ts} +1 -1
  187. package/dist/{types-BSKx5MXW.d.ts → types-pbBIUNxw.d.ts} +1 -1
  188. package/package.json +7 -7
  189. package/dist/chunk-2MNLEL45.js.map +0 -1
  190. package/dist/chunk-5YQIAS4V.cjs.map +0 -1
  191. package/dist/chunk-7MATRNZZ.js.map +0 -1
  192. package/dist/chunk-7TS3YVQR.js.map +0 -1
  193. package/dist/chunk-AGEAMUQR.cjs.map +0 -1
  194. package/dist/chunk-D4PUWBN6.cjs.map +0 -1
  195. package/dist/chunk-DIFE573X.js.map +0 -1
  196. package/dist/chunk-ECFWPZGL.cjs.map +0 -1
  197. package/dist/chunk-EG45GQOE.js.map +0 -1
  198. package/dist/chunk-FSUMCJAR.cjs.map +0 -1
  199. package/dist/chunk-GV7UC3SS.cjs.map +0 -1
  200. package/dist/chunk-HYFNOF7Y.cjs.map +0 -1
  201. package/dist/chunk-JI7ZRESP.js.map +0 -1
  202. package/dist/chunk-KOYRJXTI.cjs.map +0 -1
  203. package/dist/chunk-KW34ZKF5.cjs.map +0 -1
  204. package/dist/chunk-L5223LLX.js.map +0 -1
  205. package/dist/chunk-M3UFIUXK.cjs.map +0 -1
  206. package/dist/chunk-OE4E6IBD.js.map +0 -1
  207. package/dist/chunk-OE527MXF.cjs.map +0 -1
  208. package/dist/chunk-OGD5CCMZ.js.map +0 -1
  209. package/dist/chunk-P5SJ3QXJ.js.map +0 -1
  210. package/dist/chunk-PBPUSZIQ.cjs.map +0 -1
  211. package/dist/chunk-PMKWYOOX.cjs.map +0 -1
  212. package/dist/chunk-PNQY6OFB.cjs.map +0 -1
  213. package/dist/chunk-QLFHYHJ2.js.map +0 -1
  214. package/dist/chunk-RB4OMSPA.js.map +0 -1
  215. package/dist/chunk-RBU5PHN4.js.map +0 -1
  216. package/dist/chunk-RFBIGRCI.js.map +0 -1
  217. package/dist/chunk-UGG7MCX4.cjs.map +0 -1
  218. package/dist/chunk-V4BPFFFV.js.map +0 -1
  219. package/dist/chunk-WGZZKCJQ.cjs.map +0 -1
  220. package/dist/chunk-X5JTZ5LW.js.map +0 -1
  221. package/dist/chunk-XQTI4Q4I.js.map +0 -1
  222. package/dist/chunk-XUSKGJRI.js.map +0 -1
  223. package/dist/chunk-Z7CS43ZT.cjs.map +0 -1
  224. package/dist/chunk-ZYTWQZZC.cjs.map +0 -1
  225. package/dist/{primitive-props-CGoJvmcH.d.cts → primitive-props-Cl5jiC8g.d.cts} +5 -5
  226. 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 chunkZYTWQZZC_cjs = require('../../chunk-ZYTWQZZC.cjs');
4
- require('../../chunk-HYFNOF7Y.cjs');
5
- require('../../chunk-WGZZKCJQ.cjs');
6
- require('../../chunk-ECFWPZGL.cjs');
7
- var chunkPNQY6OFB_cjs = require('../../chunk-PNQY6OFB.cjs');
8
- require('../../chunk-PBPUSZIQ.cjs');
9
- require('../../chunk-PMKWYOOX.cjs');
10
- require('../../chunk-KOYRJXTI.cjs');
11
- require('../../chunk-GV7UC3SS.cjs');
12
- require('../../chunk-FSUMCJAR.cjs');
13
- require('../../chunk-D4PUWBN6.cjs');
14
- require('../../chunk-KW34ZKF5.cjs');
15
- require('../../chunk-OE527MXF.cjs');
3
+ var chunkFG6IKUHA_cjs = require('../../chunk-FG6IKUHA.cjs');
4
+ require('../../chunk-EZ3AJRQ7.cjs');
5
+ require('../../chunk-QHX3VA55.cjs');
6
+ require('../../chunk-X77B4ZKQ.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(chunkZYTWQZZC_cjs.NovaRenderKey, value);
42
+ vue.provide(chunkFG6IKUHA_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(chunkZYTWQZZC_cjs.NovaShellKey, source);
55
- chunkZYTWQZZC_cjs.provideShellHead(() => props.shell);
54
+ vue.provide(chunkFG6IKUHA_cjs.NovaShellKey, source);
55
+ chunkFG6IKUHA_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(chunkPNQY6OFB_cjs.CANVAS_SLOT_NAME)) return;
86
- chunkZYTWQZZC_cjs.registerNovaVueComponents(registry);
85
+ if (registry.has(chunkQTJ4ZQRM_cjs.CANVAS_SLOT_NAME)) return;
86
+ chunkFG6IKUHA_cjs.registerNovaVueComponents(registry);
87
87
  };
88
88
  var ShellRenderTreeView = vue.defineComponent(
89
89
  () => {
90
- const nodes = chunkZYTWQZZC_cjs.useShellRenderTree();
91
- return () => vue.h(chunkZYTWQZZC_cjs.RenderTree, { nodes: nodes.value });
90
+ const nodes = chunkFG6IKUHA_cjs.useShellRenderTree();
91
+ return () => vue.h(chunkFG6IKUHA_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
- chunkZYTWQZZC_cjs.useShell();
109
- const nodes = chunkZYTWQZZC_cjs.useCanvasRenderTree(() => props.canvasId);
110
- return () => vue.h(chunkZYTWQZZC_cjs.RenderTree, { nodes: nodes.value });
108
+ chunkFG6IKUHA_cjs.useShell();
109
+ const nodes = chunkFG6IKUHA_cjs.useCanvasRenderTree(() => props.canvasId);
110
+ return () => vue.h(chunkFG6IKUHA_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 chunkZYTWQZZC_cjs.ErrorMarker; }
129
+ get: function () { return chunkFG6IKUHA_cjs.ErrorMarker; }
130
130
  });
131
131
  Object.defineProperty(exports, "NovaRenderKey", {
132
132
  enumerable: true,
133
- get: function () { return chunkZYTWQZZC_cjs.NovaRenderKey; }
133
+ get: function () { return chunkFG6IKUHA_cjs.NovaRenderKey; }
134
134
  });
135
135
  Object.defineProperty(exports, "NovaShellKey", {
136
136
  enumerable: true,
137
- get: function () { return chunkZYTWQZZC_cjs.NovaShellKey; }
137
+ get: function () { return chunkFG6IKUHA_cjs.NovaShellKey; }
138
138
  });
139
139
  Object.defineProperty(exports, "RenderNodeView", {
140
140
  enumerable: true,
141
- get: function () { return chunkZYTWQZZC_cjs.RenderNodeView; }
141
+ get: function () { return chunkFG6IKUHA_cjs.RenderNodeView; }
142
142
  });
143
143
  Object.defineProperty(exports, "RenderTree", {
144
144
  enumerable: true,
145
- get: function () { return chunkZYTWQZZC_cjs.RenderTree; }
145
+ get: function () { return chunkFG6IKUHA_cjs.RenderTree; }
146
146
  });
147
147
  Object.defineProperty(exports, "isNovaComponent", {
148
148
  enumerable: true,
149
- get: function () { return chunkZYTWQZZC_cjs.isNovaComponent; }
149
+ get: function () { return chunkFG6IKUHA_cjs.isNovaComponent; }
150
150
  });
151
151
  Object.defineProperty(exports, "useActionData", {
152
152
  enumerable: true,
153
- get: function () { return chunkZYTWQZZC_cjs.useActionData; }
153
+ get: function () { return chunkFG6IKUHA_cjs.useActionData; }
154
154
  });
155
155
  Object.defineProperty(exports, "useActionStatus", {
156
156
  enumerable: true,
157
- get: function () { return chunkZYTWQZZC_cjs.useActionStatus; }
157
+ get: function () { return chunkFG6IKUHA_cjs.useActionStatus; }
158
158
  });
159
159
  Object.defineProperty(exports, "useCanvas", {
160
160
  enumerable: true,
161
- get: function () { return chunkZYTWQZZC_cjs.useCanvas; }
161
+ get: function () { return chunkFG6IKUHA_cjs.useCanvas; }
162
162
  });
163
163
  Object.defineProperty(exports, "useCanvasRenderTree", {
164
164
  enumerable: true,
165
- get: function () { return chunkZYTWQZZC_cjs.useCanvasRenderTree; }
165
+ get: function () { return chunkFG6IKUHA_cjs.useCanvasRenderTree; }
166
166
  });
167
167
  Object.defineProperty(exports, "useNovaDispatch", {
168
168
  enumerable: true,
169
- get: function () { return chunkZYTWQZZC_cjs.useNovaDispatch; }
169
+ get: function () { return chunkFG6IKUHA_cjs.useNovaDispatch; }
170
170
  });
171
171
  Object.defineProperty(exports, "useNovaPublish", {
172
172
  enumerable: true,
173
- get: function () { return chunkZYTWQZZC_cjs.useNovaPublish; }
173
+ get: function () { return chunkFG6IKUHA_cjs.useNovaPublish; }
174
174
  });
175
175
  Object.defineProperty(exports, "useNovaRegistry", {
176
176
  enumerable: true,
177
- get: function () { return chunkZYTWQZZC_cjs.useNovaRegistry; }
177
+ get: function () { return chunkFG6IKUHA_cjs.useNovaRegistry; }
178
178
  });
179
179
  Object.defineProperty(exports, "useRenderTree", {
180
180
  enumerable: true,
181
- get: function () { return chunkZYTWQZZC_cjs.useRenderTree; }
181
+ get: function () { return chunkFG6IKUHA_cjs.useRenderTree; }
182
182
  });
183
183
  Object.defineProperty(exports, "useShell", {
184
184
  enumerable: true,
185
- get: function () { return chunkZYTWQZZC_cjs.useShell; }
185
+ get: function () { return chunkFG6IKUHA_cjs.useShell; }
186
186
  });
187
187
  Object.defineProperty(exports, "useShellRenderTree", {
188
188
  enumerable: true,
189
- get: function () { return chunkZYTWQZZC_cjs.useShellRenderTree; }
189
+ get: function () { return chunkFG6IKUHA_cjs.useShellRenderTree; }
190
190
  });
191
191
  Object.defineProperty(exports, "useShellState", {
192
192
  enumerable: true,
193
- get: function () { return chunkZYTWQZZC_cjs.useShellState; }
193
+ get: function () { return chunkFG6IKUHA_cjs.useShellState; }
194
194
  });
195
195
  Object.defineProperty(exports, "useSlotWrapper", {
196
196
  enumerable: true,
197
- get: function () { return chunkZYTWQZZC_cjs.useSlotWrapper; }
197
+ get: function () { return chunkFG6IKUHA_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,YA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EACxB,CAAC,KAAA,KAA2B;AAC1B,IAAA,MAAM,EAAE,OAAM,GAAI,KAAA;AAClB,IAAA,IAAI,KAAA,KAAU,UAAa,KAAA,CAAM,QAAA,KAAa,OAAO,iBAAA,CAAkB,KAAA,CAAM,QAAA,IAAY,KAAA,CAAM,QAAQ,CAAA;AACvG,IAAA,OAAO,MAAM;AACX,MAAA,MAAM,OAAOK,KAAAA,CAAE,oBAAA,EAAsB,EAAE,QAAA,EAAU,KAAA,CAAM,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\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,E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A,CAAEM,4BAAA,EAAY,EAAE,KAAA,EAAO,KAAA,CAAM,OAAO,CAAA;AAAA,EACnD,CAAA;AAAA,EACA,EAAE,IAAA,EAAM,sBAAA,EAAwB,KAAA,EAAO,CAAC,UAAU,CAAA;AACpD,CAAA;AAEO,IAAM,UAAA,GAAaX,mBAAAA;AAAA,EACxB,CAAC,KAAA,KAA2B;AAC1B,IAAA,MAAM,EAAE,OAAM,GAAI,KAAA;AAClB,IAAA,IAAI,KAAA,KAAU,UAAa,KAAA,CAAM,QAAA,KAAa,OAAO,iBAAA,CAAkB,KAAA,CAAM,QAAA,IAAY,KAAA,CAAM,QAAQ,CAAA;AACvG,IAAA,OAAO,MAAM;AACX,MAAA,MAAM,OAAOK,KAAAA,CAAE,oBAAA,EAAsB,EAAE,QAAA,EAAU,KAAA,CAAM,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-C9734_lJ.cjs';
2
- export { c as NovaComponentProps, d as NovaModelBinding, i as isNovaComponent } from '../../types-C9734_lJ.cjs';
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-caZoXSwr.cjs';
6
- import { C as ComponentRegistry, b as RenderNode } from '../../types-j290XhCn.cjs';
7
- import { a as Shell, b as ActionStatus, d as CanvasState, q as StateSnapshot } from '../../types-qkzTfSye.cjs';
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-BTha1ZLR.cjs';
8
8
  import '../../schemas-pMyyuXV7.cjs';
9
9
  import 'zod';
10
- import '../../effects-CndX9K7D.cjs';
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-BWc-olbY.js';
2
- export { c as NovaComponentProps, d as NovaModelBinding, i as isNovaComponent } from '../../types-BWc-olbY.js';
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-CNfzSBe2.js';
6
- import { C as ComponentRegistry, b as RenderNode } from '../../types-qnKMx0_V.js';
7
- import { a as Shell, b as ActionStatus, d as CanvasState, q as StateSnapshot } from '../../types-D23TRvqe.js';
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-BxpSKUxn.js';
8
8
  import '../../schemas-pMyyuXV7.js';
9
9
  import 'zod';
10
- import '../../effects-CndX9K7D.js';
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-7MATRNZZ.js';
2
- export { ErrorMarker, NovaRenderKey, NovaShellKey, RenderNodeView, RenderTree, isNovaComponent, useActionData, useActionStatus, useCanvas, useCanvasRenderTree, useNovaDispatch, useNovaPublish, useNovaRegistry, useRenderTree, useShell, useShellRenderTree, useShellState, useSlotWrapper } from '../../chunk-7MATRNZZ.js';
3
- import '../../chunk-EG45GQOE.js';
4
- import '../../chunk-V4BPFFFV.js';
5
- import '../../chunk-P5SJ3QXJ.js';
6
- import { CANVAS_SLOT_NAME } from '../../chunk-RFBIGRCI.js';
7
- import '../../chunk-XUSKGJRI.js';
8
- import '../../chunk-OGD5CCMZ.js';
9
- import '../../chunk-7TS3YVQR.js';
10
- import '../../chunk-OE4E6IBD.js';
11
- import '../../chunk-DIFE573X.js';
12
- import '../../chunk-JI7ZRESP.js';
13
- import '../../chunk-RBU5PHN4.js';
14
- import '../../chunk-2MNLEL45.js';
1
+ import { NovaRenderKey, NovaShellKey, provideShellHead, useShellRenderTree, RenderTree, useShell, useCanvasRenderTree, registerNovaVueComponents } from '../../chunk-2SEZAI3I.js';
2
+ export { ErrorMarker, NovaRenderKey, NovaShellKey, RenderNodeView, RenderTree, isNovaComponent, useActionData, useActionStatus, useCanvas, useCanvasRenderTree, useNovaDispatch, useNovaPublish, useNovaRegistry, useRenderTree, useShell, useShellRenderTree, useShellState, useSlotWrapper } from '../../chunk-2SEZAI3I.js';
3
+ import '../../chunk-O2N4BVLL.js';
4
+ import '../../chunk-SCXYAXMO.js';
5
+ import '../../chunk-3YS2FBF5.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,Q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,GAAaD,eAAAA;AAAA,EACxB,CAAC,KAAA,KAA2B;AAC1B,IAAA,MAAM,EAAE,OAAM,GAAI,KAAA;AAClB,IAAA,IAAI,KAAA,KAAU,UAAa,KAAA,CAAM,QAAA,KAAa,OAAO,iBAAA,CAAkB,KAAA,CAAM,QAAA,IAAY,KAAA,CAAM,QAAQ,CAAA;AACvG,IAAA,OAAO,MAAM;AACX,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\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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AAA,EAAO,CAAC,UAAU,CAAA;AACpD,CAAA;AAEO,IAAM,UAAA,GAAaD,eAAAA;AAAA,EACxB,CAAC,KAAA,KAA2B;AAC1B,IAAA,MAAM,EAAE,OAAM,GAAI,KAAA;AAClB,IAAA,IAAI,KAAA,KAAU,UAAa,KAAA,CAAM,QAAA,KAAa,OAAO,iBAAA,CAAkB,KAAA,CAAM,QAAA,IAAY,KAAA,CAAM,QAAQ,CAAA;AACvG,IAAA,OAAO,MAAM;AACX,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"]}
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkUGG7MCX4_cjs = require('../chunk-UGG7MCX4.cjs');
4
- var chunkPMKWYOOX_cjs = require('../chunk-PMKWYOOX.cjs');
5
- var chunkD4PUWBN6_cjs = require('../chunk-D4PUWBN6.cjs');
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: chunkD4PUWBN6_cjs.LayoutNodeSchema }
27
+ output: { schema: chunkNBXZ3RAC_cjs.LayoutNodeSchema }
28
28
  });
29
29
 
30
30
  Object.defineProperty(exports, "paletteFromRegistry", {
31
31
  enumerable: true,
32
- get: function () { return chunkUGG7MCX4_cjs.paletteFromRegistry; }
32
+ get: function () { return chunkDC5HONDE_cjs.paletteFromRegistry; }
33
33
  });
34
34
  Object.defineProperty(exports, "collectInteractive", {
35
35
  enumerable: true,
36
- get: function () { return chunkPMKWYOOX_cjs.collectInteractive; }
36
+ get: function () { return chunkBXUEWV7V_cjs.collectInteractive; }
37
37
  });
38
38
  exports.layoutAgent = layoutAgent;
39
39
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/agent/layout.agent.ts"],"names":["defineAgent","LayoutNodeSchema"],"mappings":";;;;;;;;AAqCA,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":["// ═══════════════════════════════════════════════════════════\n// @niscorp/nova/agent — Nova layout agent\n// ═══════════════════════════════════════════════════════════\n//\n// Given an intent, a component palette, and a data example, produces a Nova\n// LayoutNode — a tree of components, conditionals, loops and bindings that\n// renders the data as a UI.\n//\n// Same pattern as @niscorp/prism/agent and @niscorp/vex/agent: one exported\n// `const`, the canonical schema as the payload (cortex validates the whole\n// recursive tree and feeds failures back in-loop), and the variable inputs\n// (intent, palette, dataShape) passed at call time. Cortex is an optional\n// peer dep — the rest of @niscorp/nova does not need it.\n//\n// import { layoutAgent, paletteFromRegistry } from '@niscorp/nova/agent';\n//\n// const result = await layoutAgent.run({\n// intent: 'a table of company and value',\n// palette: paletteFromRegistry(registry, { include: ['Table'] }),\n// dataShape: [{ company: '', value: 0 }],\n// }, { llm }).result;\n// if (result.ok) render(result.output.data, rows);\n//\n// The LayoutNode schema is NOT embedded in this prompt — cortex injects\n// it (output.doc 'auto') because the recursive tree can't ride the\n// respond tool's params. Node types, binding syntax and directives all\n// live in the schema's .describe() calls; fixes go there, not here.\n\nimport { defineAgent, type AgentDefinition } from '@niscorp/cortex';\n\nimport { LayoutNodeSchema } from '../layout/schemas';\nimport type { LayoutNode } from '../layout/schemas';\n\n// The agent's payload IS the LayoutNode; the model's one-line why\n// rides the envelope's `reasoning` field.\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
+ {"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"]}
@@ -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-CvwZZCkx.cjs';
3
+ export { L as LayoutPaletteEntry, P as PaletteFromRegistryOptions, a as paletteFromRegistry } from '../palette-CCxWSi3C.cjs';
4
4
  import 'zod';
5
- import '../types-j290XhCn.cjs';
5
+ import '../types-CR56luN7.cjs';
6
6
 
7
7
  type LayoutAgentOutput = LayoutNode;
8
8
  declare const layoutAgent: AgentDefinition<LayoutNode>;
@@ -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-CIpPH90W.js';
3
+ export { L as LayoutPaletteEntry, P as PaletteFromRegistryOptions, a as paletteFromRegistry } from '../palette-BZujb2rm.js';
4
4
  import 'zod';
5
- import '../types-qnKMx0_V.js';
5
+ import '../types-CJC8mnzl.js';
6
6
 
7
7
  type LayoutAgentOutput = LayoutNode;
8
8
  declare const layoutAgent: AgentDefinition<LayoutNode>;
@@ -1,6 +1,6 @@
1
- export { paletteFromRegistry } from '../chunk-L5223LLX.js';
2
- export { collectInteractive } from '../chunk-OGD5CCMZ.js';
3
- import { LayoutNodeSchema } from '../chunk-JI7ZRESP.js';
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
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/agent/layout.agent.ts"],"names":[],"mappings":";;;;;;AAqCA,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":["// ═══════════════════════════════════════════════════════════\n// @niscorp/nova/agent — Nova layout agent\n// ═══════════════════════════════════════════════════════════\n//\n// Given an intent, a component palette, and a data example, produces a Nova\n// LayoutNode — a tree of components, conditionals, loops and bindings that\n// renders the data as a UI.\n//\n// Same pattern as @niscorp/prism/agent and @niscorp/vex/agent: one exported\n// `const`, the canonical schema as the payload (cortex validates the whole\n// recursive tree and feeds failures back in-loop), and the variable inputs\n// (intent, palette, dataShape) passed at call time. Cortex is an optional\n// peer dep — the rest of @niscorp/nova does not need it.\n//\n// import { layoutAgent, paletteFromRegistry } from '@niscorp/nova/agent';\n//\n// const result = await layoutAgent.run({\n// intent: 'a table of company and value',\n// palette: paletteFromRegistry(registry, { include: ['Table'] }),\n// dataShape: [{ company: '', value: 0 }],\n// }, { llm }).result;\n// if (result.ok) render(result.output.data, rows);\n//\n// The LayoutNode schema is NOT embedded in this prompt — cortex injects\n// it (output.doc 'auto') because the recursive tree can't ride the\n// respond tool's params. Node types, binding syntax and directives all\n// live in the schema's .describe() calls; fixes go there, not here.\n\nimport { defineAgent, type AgentDefinition } from '@niscorp/cortex';\n\nimport { LayoutNodeSchema } from '../layout/schemas';\nimport type { LayoutNode } from '../layout/schemas';\n\n// The agent's payload IS the LayoutNode; the model's one-line why\n// rides the envelope's `reasoning` field.\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
+ {"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-V4BPFFFV.js';
2
- import { shellView } from './chunk-P5SJ3QXJ.js';
3
- import { headOf, isHeadNode } from './chunk-RFBIGRCI.js';
4
- import { renderNodeKey } from './chunk-XUSKGJRI.js';
1
+ import { createHeadKeeper } from './chunk-SCXYAXMO.js';
2
+ import { shellView } from './chunk-3YS2FBF5.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-QLFHYHJ2.js.map
433
- //# sourceMappingURL=chunk-QLFHYHJ2.js.map
432
+ //# sourceMappingURL=chunk-2HWYS6OJ.js.map
433
+ //# sourceMappingURL=chunk-2HWYS6OJ.js.map