@niscorp/nova 0.2.2 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/ACTION_DOCS.md +2 -0
  2. package/ADAPTER.md +19 -1
  3. package/CHANGELOG.md +69 -0
  4. package/I18N_DOCS.md +18 -3
  5. package/REACT_DOCS.md +4 -2
  6. package/README.md +93 -3
  7. package/SHELL_DOCS.md +16 -7
  8. package/TERMINAL_DOCS.md +24 -5
  9. package/dist/adapters/dom/components/index.cjs +2 -4
  10. package/dist/adapters/dom/components/index.cjs.map +1 -1
  11. package/dist/adapters/dom/components/index.d.cts +4 -4
  12. package/dist/adapters/dom/components/index.d.ts +4 -4
  13. package/dist/adapters/dom/components/index.js +1 -3
  14. package/dist/adapters/dom/components/index.js.map +1 -1
  15. package/dist/adapters/dom/index.cjs +14 -14
  16. package/dist/adapters/dom/index.d.cts +4 -4
  17. package/dist/adapters/dom/index.d.ts +4 -4
  18. package/dist/adapters/dom/index.js +12 -12
  19. package/dist/adapters/dom/server.cjs +13 -13
  20. package/dist/adapters/dom/server.cjs.map +1 -1
  21. package/dist/adapters/dom/server.d.cts +4 -4
  22. package/dist/adapters/dom/server.d.ts +4 -4
  23. package/dist/adapters/dom/server.js +12 -12
  24. package/dist/adapters/dom/server.js.map +1 -1
  25. package/dist/adapters/ink/index.js +0 -2
  26. package/dist/adapters/ink/index.js.map +1 -1
  27. package/dist/adapters/react/components/index.cjs +32 -32
  28. package/dist/adapters/react/components/index.d.cts +2 -2
  29. package/dist/adapters/react/components/index.d.ts +2 -2
  30. package/dist/adapters/react/components/index.js +13 -13
  31. package/dist/adapters/react/index.cjs +35 -35
  32. package/dist/adapters/react/index.d.cts +6 -6
  33. package/dist/adapters/react/index.d.ts +6 -6
  34. package/dist/adapters/react/index.js +13 -13
  35. package/dist/adapters/tty/components/index.cjs +2 -4
  36. package/dist/adapters/tty/components/index.cjs.map +1 -1
  37. package/dist/adapters/tty/components/index.d.cts +4 -4
  38. package/dist/adapters/tty/components/index.d.ts +4 -4
  39. package/dist/adapters/tty/components/index.js +1 -3
  40. package/dist/adapters/tty/components/index.js.map +1 -1
  41. package/dist/adapters/tty/index.cjs +12 -12
  42. package/dist/adapters/tty/index.cjs.map +1 -1
  43. package/dist/adapters/tty/index.d.cts +4 -4
  44. package/dist/adapters/tty/index.d.ts +4 -4
  45. package/dist/adapters/tty/index.js +10 -10
  46. package/dist/adapters/tty/index.js.map +1 -1
  47. package/dist/adapters/vue/components/index.cjs +32 -32
  48. package/dist/adapters/vue/components/index.d.cts +2 -2
  49. package/dist/adapters/vue/components/index.d.ts +2 -2
  50. package/dist/adapters/vue/components/index.js +13 -13
  51. package/dist/adapters/vue/index.cjs +41 -41
  52. package/dist/adapters/vue/index.cjs.map +1 -1
  53. package/dist/adapters/vue/index.d.cts +6 -6
  54. package/dist/adapters/vue/index.d.ts +6 -6
  55. package/dist/adapters/vue/index.js +14 -14
  56. package/dist/adapters/vue/index.js.map +1 -1
  57. package/dist/agent/index.cjs +6 -6
  58. package/dist/agent/index.cjs.map +1 -1
  59. package/dist/agent/index.d.cts +2 -2
  60. package/dist/agent/index.d.ts +2 -2
  61. package/dist/agent/index.js +3 -3
  62. package/dist/agent/index.js.map +1 -1
  63. package/dist/{chunk-SVNK5NIK.js → chunk-2H6Y25FO.js} +6 -6
  64. package/dist/chunk-2H6Y25FO.js.map +1 -0
  65. package/dist/{chunk-DU2VIJAF.js → chunk-3JE77TNL.js} +16 -49
  66. package/dist/chunk-3JE77TNL.js.map +1 -0
  67. package/dist/{chunk-OE527MXF.cjs → chunk-3XFQI5P2.cjs} +2 -2
  68. package/dist/chunk-3XFQI5P2.cjs.map +1 -0
  69. package/dist/{chunk-XQTI4Q4I.js → chunk-A4GK3PLP.js} +4 -4
  70. package/dist/chunk-A4GK3PLP.js.map +1 -0
  71. package/dist/{chunk-PMKWYOOX.cjs → chunk-BXUEWV7V.cjs} +2 -2
  72. package/dist/chunk-BXUEWV7V.cjs.map +1 -0
  73. package/dist/{chunk-RFBIGRCI.js → chunk-C63CBYD5.js} +3 -3
  74. package/dist/chunk-C63CBYD5.js.map +1 -0
  75. package/dist/{chunk-FSUMCJAR.cjs → chunk-CQZH3L3W.cjs} +39 -39
  76. package/dist/chunk-CQZH3L3W.cjs.map +1 -0
  77. package/dist/{chunk-UGG7MCX4.cjs → chunk-DC5HONDE.cjs} +2 -2
  78. package/dist/chunk-DC5HONDE.cjs.map +1 -0
  79. package/dist/{chunk-OO247V4J.cjs → chunk-DLZNZHUW.cjs} +92 -125
  80. package/dist/chunk-DLZNZHUW.cjs.map +1 -0
  81. package/dist/{chunk-VOD5JA4D.js → chunk-EK2GBZ7D.js} +5 -5
  82. package/dist/chunk-EK2GBZ7D.js.map +1 -0
  83. package/dist/{chunk-WGPFR7MN.cjs → chunk-FKAPJMNR.cjs} +28 -28
  84. package/dist/chunk-FKAPJMNR.cjs.map +1 -0
  85. package/dist/{chunk-DIFE573X.js → chunk-G4OQ4PEO.js} +6 -6
  86. package/dist/chunk-G4OQ4PEO.js.map +1 -0
  87. package/dist/{chunk-RBU5PHN4.js → chunk-GQVJ5UAS.js} +2 -2
  88. package/dist/chunk-GQVJ5UAS.js.map +1 -0
  89. package/dist/{chunk-3IPM5QBT.cjs → chunk-HDREPLRA.cjs} +13 -13
  90. package/dist/chunk-HDREPLRA.cjs.map +1 -0
  91. package/dist/{chunk-TRJYDVWK.cjs → chunk-I35ZD3PU.cjs} +26 -26
  92. package/dist/chunk-I35ZD3PU.cjs.map +1 -0
  93. package/dist/{chunk-KW34ZKF5.cjs → chunk-ITGR7P2B.cjs} +2 -2
  94. package/dist/chunk-ITGR7P2B.cjs.map +1 -0
  95. package/dist/{chunk-JI7ZRESP.js → chunk-JKULAG53.js} +2 -2
  96. package/dist/chunk-JKULAG53.js.map +1 -0
  97. package/dist/{chunk-IZ2UU5UL.cjs → chunk-K54CT3QN.cjs} +50 -69
  98. package/dist/chunk-K54CT3QN.cjs.map +1 -0
  99. package/dist/{chunk-7TS3YVQR.js → chunk-M2ZZUSH3.js} +6 -7
  100. package/dist/chunk-M2ZZUSH3.js.map +1 -0
  101. package/dist/{chunk-GV7UC3SS.cjs → chunk-MEZCO7ND.cjs} +2 -2
  102. package/dist/chunk-MEZCO7ND.cjs.map +1 -0
  103. package/dist/{chunk-D4PUWBN6.cjs → chunk-NBXZ3RAC.cjs} +2 -2
  104. package/dist/chunk-NBXZ3RAC.cjs.map +1 -0
  105. package/dist/{chunk-L5223LLX.js → chunk-OBFFZ23H.js} +2 -2
  106. package/dist/chunk-OBFFZ23H.js.map +1 -0
  107. package/dist/{chunk-F2H7WP6R.js → chunk-OSIFUROH.js} +6 -6
  108. package/dist/chunk-OSIFUROH.js.map +1 -0
  109. package/dist/{chunk-G4LSLLGI.js → chunk-PCUXNVWF.js} +7 -7
  110. package/dist/chunk-PCUXNVWF.js.map +1 -0
  111. package/dist/{chunk-WGZZKCJQ.cjs → chunk-QHX3VA55.cjs} +7 -7
  112. package/dist/chunk-QHX3VA55.cjs.map +1 -0
  113. package/dist/{chunk-PNQY6OFB.cjs → chunk-QTJ4ZQRM.cjs} +20 -20
  114. package/dist/chunk-QTJ4ZQRM.cjs.map +1 -0
  115. package/dist/{chunk-KOYRJXTI.cjs → chunk-RVU6YEHO.cjs} +10 -11
  116. package/dist/chunk-RVU6YEHO.cjs.map +1 -0
  117. package/dist/{chunk-5AF72LOE.cjs → chunk-SABSY2BW.cjs} +8 -8
  118. package/dist/chunk-SABSY2BW.cjs.map +1 -0
  119. package/dist/{chunk-V4BPFFFV.js → chunk-SCXYAXMO.js} +3 -3
  120. package/dist/chunk-SCXYAXMO.js.map +1 -0
  121. package/dist/{chunk-2MNLEL45.js → chunk-SVWDKXSH.js} +2 -2
  122. package/dist/chunk-SVWDKXSH.js.map +1 -0
  123. package/dist/{chunk-3JRTELLC.js → chunk-UXFQZX6O.js} +3 -3
  124. package/dist/chunk-UXFQZX6O.js.map +1 -0
  125. package/dist/{chunk-OE4E6IBD.js → chunk-Y3UKAJJX.js} +2 -2
  126. package/dist/chunk-Y3UKAJJX.js.map +1 -0
  127. package/dist/{chunk-Y6XVPRYH.js → chunk-YV2G37TJ.js} +8 -27
  128. package/dist/chunk-YV2G37TJ.js.map +1 -0
  129. package/dist/{chunk-5YQIAS4V.cjs → chunk-ZR54IVVS.cjs} +20 -20
  130. package/dist/chunk-ZR54IVVS.cjs.map +1 -0
  131. package/dist/{chunk-TMLNVU5W.cjs → chunk-ZVQKCDUG.cjs} +7 -7
  132. package/dist/chunk-ZVQKCDUG.cjs.map +1 -0
  133. package/dist/{chunk-OGD5CCMZ.js → chunk-ZZRQAH5Z.js} +2 -2
  134. package/dist/chunk-ZZRQAH5Z.js.map +1 -0
  135. package/dist/devtools/index.cjs +12 -42
  136. package/dist/devtools/index.cjs.map +1 -1
  137. package/dist/devtools/index.d.cts +4 -4
  138. package/dist/devtools/index.d.ts +4 -4
  139. package/dist/devtools/index.js +9 -39
  140. package/dist/devtools/index.js.map +1 -1
  141. package/dist/document/index.cjs +16 -16
  142. package/dist/document/index.d.cts +6 -6
  143. package/dist/document/index.d.ts +6 -6
  144. package/dist/document/index.js +3 -3
  145. package/dist/{effects-CndX9K7D.d.cts → effects-DkBBrxVj.d.cts} +0 -2
  146. package/dist/{effects-CndX9K7D.d.ts → effects-DkBBrxVj.d.ts} +0 -2
  147. package/dist/{endpoints-CD-6Jl-H.d.ts → endpoints-DD6VsLv9.d.ts} +1 -1
  148. package/dist/{endpoints-Dem-EdRx.d.cts → endpoints-fqx9Vmf6.d.cts} +1 -1
  149. package/dist/examples/index.cjs +4 -4
  150. package/dist/examples/index.cjs.map +1 -1
  151. package/dist/examples/index.d.cts +4 -4
  152. package/dist/examples/index.d.ts +4 -4
  153. package/dist/examples/index.js +3 -3
  154. package/dist/examples/index.js.map +1 -1
  155. package/dist/{head-CAzfTnpV.d.cts → head-BOjhYA36.d.cts} +2 -2
  156. package/dist/{head-DRpbbj-l.d.ts → head-CBib11hD.d.ts} +2 -2
  157. package/dist/i18n/index.cjs +13 -13
  158. package/dist/i18n/index.d.cts +4 -6
  159. package/dist/i18n/index.d.ts +4 -6
  160. package/dist/i18n/index.js +3 -3
  161. package/dist/{index-CNfzSBe2.d.ts → index-BjQX8XZl.d.ts} +1 -1
  162. package/dist/{index-caZoXSwr.d.cts → index-BoPH5aSd.d.cts} +1 -1
  163. package/dist/index.cjs +91 -91
  164. package/dist/index.d.cts +11 -11
  165. package/dist/index.d.ts +11 -11
  166. package/dist/index.js +11 -11
  167. package/dist/migrations/index.cjs +8 -9
  168. package/dist/migrations/index.cjs.map +1 -1
  169. package/dist/migrations/index.d.cts +1 -1
  170. package/dist/migrations/index.d.ts +1 -1
  171. package/dist/migrations/index.js +5 -6
  172. package/dist/migrations/index.js.map +1 -1
  173. package/dist/{palette-CIpPH90W.d.ts → palette-BZujb2rm.d.ts} +1 -1
  174. package/dist/{palette-CvwZZCkx.d.cts → palette-CCxWSi3C.d.cts} +1 -1
  175. package/dist/reflect/index.cjs +27 -27
  176. package/dist/reflect/index.d.cts +5 -5
  177. package/dist/reflect/index.d.ts +5 -5
  178. package/dist/reflect/index.js +9 -9
  179. package/dist/{types-qnKMx0_V.d.ts → types-CJC8mnzl.d.ts} +0 -1
  180. package/dist/{types-j290XhCn.d.cts → types-CR56luN7.d.cts} +0 -1
  181. package/dist/{types-DsWNYc7R.d.cts → types-D0x56Ya-.d.cts} +1 -1
  182. package/dist/{types-D23TRvqe.d.ts → types-Dn9cBFCC.d.ts} +3 -3
  183. package/dist/{types-C9734_lJ.d.cts → types-DzB3TAQj.d.cts} +1 -1
  184. package/dist/{types-BWc-olbY.d.ts → types-LXw2RJfH.d.ts} +1 -1
  185. package/dist/{types-qkzTfSye.d.cts → types-OsJI-ceI.d.cts} +3 -3
  186. package/dist/{types-BSKx5MXW.d.ts → types-pbBIUNxw.d.ts} +1 -1
  187. package/package.json +7 -7
  188. package/dist/chunk-2MNLEL45.js.map +0 -1
  189. package/dist/chunk-3IPM5QBT.cjs.map +0 -1
  190. package/dist/chunk-3JRTELLC.js.map +0 -1
  191. package/dist/chunk-5AF72LOE.cjs.map +0 -1
  192. package/dist/chunk-5YQIAS4V.cjs.map +0 -1
  193. package/dist/chunk-7TS3YVQR.js.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-DU2VIJAF.js.map +0 -1
  197. package/dist/chunk-F2H7WP6R.js.map +0 -1
  198. package/dist/chunk-FSUMCJAR.cjs.map +0 -1
  199. package/dist/chunk-G4LSLLGI.js.map +0 -1
  200. package/dist/chunk-GV7UC3SS.cjs.map +0 -1
  201. package/dist/chunk-IZ2UU5UL.cjs.map +0 -1
  202. package/dist/chunk-JI7ZRESP.js.map +0 -1
  203. package/dist/chunk-KOYRJXTI.cjs.map +0 -1
  204. package/dist/chunk-KW34ZKF5.cjs.map +0 -1
  205. package/dist/chunk-L5223LLX.js.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-OO247V4J.cjs.map +0 -1
  210. package/dist/chunk-PMKWYOOX.cjs.map +0 -1
  211. package/dist/chunk-PNQY6OFB.cjs.map +0 -1
  212. package/dist/chunk-RBU5PHN4.js.map +0 -1
  213. package/dist/chunk-RFBIGRCI.js.map +0 -1
  214. package/dist/chunk-SVNK5NIK.js.map +0 -1
  215. package/dist/chunk-TMLNVU5W.cjs.map +0 -1
  216. package/dist/chunk-TRJYDVWK.cjs.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-VOD5JA4D.js.map +0 -1
  220. package/dist/chunk-WGPFR7MN.cjs.map +0 -1
  221. package/dist/chunk-WGZZKCJQ.cjs.map +0 -1
  222. package/dist/chunk-XQTI4Q4I.js.map +0 -1
  223. package/dist/chunk-Y6XVPRYH.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkPNQY6OFB_cjs = require('./chunk-PNQY6OFB.cjs');
4
- var chunkIZ2UU5UL_cjs = require('./chunk-IZ2UU5UL.cjs');
5
- var chunkFSUMCJAR_cjs = require('./chunk-FSUMCJAR.cjs');
6
- var chunkKW34ZKF5_cjs = require('./chunk-KW34ZKF5.cjs');
7
- var chunkOE527MXF_cjs = require('./chunk-OE527MXF.cjs');
3
+ var chunkQTJ4ZQRM_cjs = require('./chunk-QTJ4ZQRM.cjs');
4
+ var chunkK54CT3QN_cjs = require('./chunk-K54CT3QN.cjs');
5
+ var chunkCQZH3L3W_cjs = require('./chunk-CQZH3L3W.cjs');
6
+ var chunkITGR7P2B_cjs = require('./chunk-ITGR7P2B.cjs');
7
+ var chunk3XFQI5P2_cjs = require('./chunk-3XFQI5P2.cjs');
8
8
  var zod = require('zod');
9
9
  var strata = require('@niscorp/strata');
10
10
 
@@ -170,7 +170,7 @@ var reconcileCanvas = (shell, canvasId, desired, options) => {
170
170
  const before = runtime?.getData() ?? {};
171
171
  if (runtime === void 0 || Object.keys(input).length === 0 || !differs(before, input)) continue;
172
172
  const definition = definitionOf?.(entry.actionId);
173
- const reAims = definition !== void 0 && Object.keys(input).some((key) => chunkIZ2UU5UL_cjs.mountInputKeys(definition).has(key));
173
+ const reAims = definition !== void 0 && Object.keys(input).some((key) => chunkK54CT3QN_cjs.mountInputKeys(definition).has(key));
174
174
  if (!reAims) {
175
175
  runtime.setData({ ...before, ...input });
176
176
  changed = true;
@@ -199,10 +199,7 @@ var createJournal = (limit) => {
199
199
  entries.push({ canvas, stack });
200
200
  if (entries.length > limit) entries.shift();
201
201
  },
202
- // A pop somebody performed themselves IS a back. Without this the journal
203
- // would still hold the entry that pop just satisfied, and the next press of
204
- // the back button would spend itself restoring a position already on screen
205
- // — the double-tap that makes a back button feel broken.
202
+ // A pop somebody performed themselves is a back.
206
203
  consume: (canvas) => {
207
204
  if (off()) return;
208
205
  for (let i = entries.length - 1; i >= 0; i -= 1) {
@@ -212,9 +209,8 @@ var createJournal = (limit) => {
212
209
  }
213
210
  },
214
211
  take: () => entries.pop(),
215
- // REVOCATION REACHES THE JOURNAL OR IT IS NOT REVOCATION. An entry naming
216
- // an action this shell no longer serves would hand it back on the way out —
217
- // a grant dropped at the front door and returned through the back one.
212
+ // An entry naming an action this shell no longer serves would hand a
213
+ // revoked action back through `back`.
218
214
  forgetAction: (actionId) => {
219
215
  for (let i = entries.length - 1; i >= 0; i -= 1) {
220
216
  if (entries[i]?.stack.some((frame) => frame.action === actionId) === true) entries.splice(i, 1);
@@ -316,7 +312,7 @@ var resolveHeaders = (headers, chain) => {
316
312
  if (headers === void 0) return void 0;
317
313
  const out = {};
318
314
  for (const key of Object.keys(headers)) {
319
- const value = chunkIZ2UU5UL_cjs.resolve(headers[key], chain);
315
+ const value = chunkK54CT3QN_cjs.resolve(headers[key], chain);
320
316
  out[key] = typeof value === "string" ? value : String(value ?? "");
321
317
  }
322
318
  return out;
@@ -356,8 +352,8 @@ var callEndpoint = async (options) => {
356
352
  }
357
353
  };
358
354
  var callHttpEndpoint = async (endpoint, { data, fetch: fetchFn = defaultFetch, transform, signal }) => {
359
- const chain = chunkIZ2UU5UL_cjs.createScopeChain(data);
360
- const resolvedUrl = chunkIZ2UU5UL_cjs.resolve(endpoint.url, chain);
355
+ const chain = chunkK54CT3QN_cjs.createScopeChain(data);
356
+ const resolvedUrl = chunkK54CT3QN_cjs.resolve(endpoint.url, chain);
361
357
  const url = typeof resolvedUrl === "string" ? resolvedUrl : String(resolvedUrl ?? "");
362
358
  const headers = resolveHeaders(endpoint.headers, chain);
363
359
  let body;
@@ -388,7 +384,7 @@ var callHttpEndpoint = async (endpoint, { data, fetch: fetchFn = defaultFetch, t
388
384
  }
389
385
  if (!response.ok) {
390
386
  const failed = await tryParseJson(response);
391
- const message = chunkKW34ZKF5_cjs.hasKey(failed, "message") && typeof failed["message"] === "string" ? failed["message"] : `HTTP ${response.status}`;
387
+ const message = chunkITGR7P2B_cjs.hasKey(failed, "message") && typeof failed["message"] === "string" ? failed["message"] : `HTTP ${response.status}`;
392
388
  return { ok: false, error: { status: response.status, message, data: failed } };
393
389
  }
394
390
  if (response.status === 204 || response.status === 205) {
@@ -524,19 +520,19 @@ var noopOnError = (_error) => {
524
520
  var resolveMutationValues = (list, chain, extras) => {
525
521
  return list.map((m) => {
526
522
  if ("set" in m && "value" in m) {
527
- return { ...m, value: chunkIZ2UU5UL_cjs.resolve(m.value, chain, extras) };
523
+ return { ...m, value: chunkK54CT3QN_cjs.resolve(m.value, chain, extras) };
528
524
  }
529
525
  if ("push" in m && typeof m.push === "string" && "value" in m) {
530
- return { ...m, value: chunkIZ2UU5UL_cjs.resolve(m.value, chain, extras) };
526
+ return { ...m, value: chunkK54CT3QN_cjs.resolve(m.value, chain, extras) };
531
527
  }
532
528
  if ("removeAt" in m && typeof m.index === "string") {
533
- return { ...m, index: Number(chunkIZ2UU5UL_cjs.resolve(m.index, chain, extras)) };
529
+ return { ...m, index: Number(chunkK54CT3QN_cjs.resolve(m.index, chain, extras)) };
534
530
  }
535
531
  if ("move" in m) {
536
532
  return {
537
533
  ...m,
538
- from: typeof m.from === "string" ? Number(chunkIZ2UU5UL_cjs.resolve(m.from, chain, extras)) : m.from,
539
- to: typeof m.to === "string" ? Number(chunkIZ2UU5UL_cjs.resolve(m.to, chain, extras)) : m.to
534
+ from: typeof m.from === "string" ? Number(chunkK54CT3QN_cjs.resolve(m.from, chain, extras)) : m.from,
535
+ to: typeof m.to === "string" ? Number(chunkK54CT3QN_cjs.resolve(m.to, chain, extras)) : m.to
540
536
  };
541
537
  }
542
538
  return m;
@@ -545,8 +541,8 @@ var resolveMutationValues = (list, chain, extras) => {
545
541
  var writeTarget = (dataStore, target, value) => {
546
542
  if (target === void 0) return;
547
543
  dataStore.update((curr) => {
548
- const next = chunkFSUMCJAR_cjs.setPath(curr, target, value);
549
- return chunkKW34ZKF5_cjs.isObject(next) ? next : curr;
544
+ const next = chunkCQZH3L3W_cjs.setPath(curr, target, value);
545
+ return chunkITGR7P2B_cjs.isObject(next) ? next : curr;
550
546
  });
551
547
  };
552
548
  var raiseUnknown = async (message, onError, ctx, strictError) => {
@@ -559,7 +555,7 @@ var raiseUnknown = async (message, onError, ctx, strictError) => {
559
555
  return;
560
556
  }
561
557
  if (ctx.lifecycleHook !== void 0) {
562
- throw new chunkFSUMCJAR_cjs.LifecycleError(message, { hook: ctx.lifecycleHook });
558
+ throw new chunkCQZH3L3W_cjs.LifecycleError(message, { hook: ctx.lifecycleHook });
563
559
  }
564
560
  if (ctx.strict && strictError !== void 0) throw strictError;
565
561
  };
@@ -571,11 +567,11 @@ var runCall = async (callName, onSuccess, onError, ctx) => {
571
567
  }
572
568
  let endpoint = raw;
573
569
  if ("fn" in raw) {
574
- const chain = chunkIZ2UU5UL_cjs.createScopeChain(ctx.dataStore.get());
575
- const fn = String(chunkIZ2UU5UL_cjs.resolve(raw.fn, chain, ctx.extras) ?? "");
570
+ const chain = chunkK54CT3QN_cjs.createScopeChain(ctx.dataStore.get());
571
+ const fn = String(chunkK54CT3QN_cjs.resolve(raw.fn, chain, ctx.extras) ?? "");
576
572
  endpoint = { ...raw, fn };
577
573
  if (ctx.functions[fn] === void 0) {
578
- await raiseUnknown(`unknown function: ${fn}`, onError, ctx, new chunkFSUMCJAR_cjs.UnknownFunctionError(fn));
574
+ await raiseUnknown(`unknown function: ${fn}`, onError, ctx, new chunkCQZH3L3W_cjs.UnknownFunctionError(fn));
579
575
  return;
580
576
  }
581
577
  }
@@ -619,7 +615,7 @@ var runCall = async (callName, onSuccess, onError, ctx) => {
619
615
  return;
620
616
  }
621
617
  if (ctx.lifecycleHook !== void 0) {
622
- throw new chunkFSUMCJAR_cjs.LifecycleError(`endpoint '${callName}' failed: ${result.error.message}`, {
618
+ throw new chunkCQZH3L3W_cjs.LifecycleError(`endpoint '${callName}' failed: ${result.error.message}`, {
623
619
  hook: ctx.lifecycleHook
624
620
  });
625
621
  }
@@ -630,14 +626,14 @@ var navigate = (effect, ctx) => {
630
626
  withCause(ctx.cause, () => onNavigate(effect));
631
627
  };
632
628
  var resolveInputMap = (input, ctx) => {
633
- const chain = chunkIZ2UU5UL_cjs.createScopeChain(ctx.dataStore.get());
629
+ const chain = chunkK54CT3QN_cjs.createScopeChain(ctx.dataStore.get());
634
630
  return Object.fromEntries(
635
- Object.entries(input).map(([key, value]) => [key, chunkIZ2UU5UL_cjs.resolve(value, chain, ctx.extras)])
631
+ Object.entries(input).map(([key, value]) => [key, chunkK54CT3QN_cjs.resolve(value, chain, ctx.extras)])
636
632
  );
637
633
  };
638
634
  var resolveNavTarget = (nav, ctx) => {
639
- const chain = chunkIZ2UU5UL_cjs.createScopeChain(ctx.dataStore.get());
640
- const out = { ...nav, action: String(chunkIZ2UU5UL_cjs.resolve(nav.action, chain, ctx.extras) ?? "") };
635
+ const chain = chunkK54CT3QN_cjs.createScopeChain(ctx.dataStore.get());
636
+ const out = { ...nav, action: String(chunkK54CT3QN_cjs.resolve(nav.action, chain, ctx.extras) ?? "") };
641
637
  if (nav.input !== void 0) out.input = resolveInputMap(nav.input, ctx);
642
638
  return out;
643
639
  };
@@ -646,24 +642,24 @@ var resolveNavInput = (effect, ctx) => {
646
642
  if ("replace" in effect) return { replace: resolveNavTarget(effect.replace, ctx) };
647
643
  if ("resetTo" in effect) return { resetTo: resolveNavTarget(effect.resetTo, ctx) };
648
644
  if ("popTo" in effect) {
649
- const chain = chunkIZ2UU5UL_cjs.createScopeChain(ctx.dataStore.get());
650
- return { popTo: { ...effect.popTo, instance: String(chunkIZ2UU5UL_cjs.resolve(effect.popTo.instance, chain, ctx.extras) ?? "") } };
645
+ const chain = chunkK54CT3QN_cjs.createScopeChain(ctx.dataStore.get());
646
+ return { popTo: { ...effect.popTo, instance: String(chunkK54CT3QN_cjs.resolve(effect.popTo.instance, chain, ctx.extras) ?? "") } };
651
647
  }
652
648
  if ("removeInstance" in effect) {
653
- const chain = chunkIZ2UU5UL_cjs.createScopeChain(ctx.dataStore.get());
654
- return { removeInstance: { ...effect.removeInstance, instance: String(chunkIZ2UU5UL_cjs.resolve(effect.removeInstance.instance, chain, ctx.extras) ?? "") } };
649
+ const chain = chunkK54CT3QN_cjs.createScopeChain(ctx.dataStore.get());
650
+ return { removeInstance: { ...effect.removeInstance, instance: String(chunkK54CT3QN_cjs.resolve(effect.removeInstance.instance, chain, ctx.extras) ?? "") } };
655
651
  }
656
652
  return effect;
657
653
  };
658
654
  var resolveReconcile = (step, ctx) => {
659
655
  const { to, action, input, ...rest } = step.reconcile;
660
- const rows = chunkIZ2UU5UL_cjs.resolve(to, chunkIZ2UU5UL_cjs.createScopeChain(ctx.dataStore.get()), ctx.extras);
656
+ const rows = chunkK54CT3QN_cjs.resolve(to, chunkK54CT3QN_cjs.createScopeChain(ctx.dataStore.get()), ctx.extras);
661
657
  const desired = (Array.isArray(rows) ? rows : []).flatMap((row) => {
662
- if (!chunkKW34ZKF5_cjs.isObject(row)) return [];
658
+ if (!chunkITGR7P2B_cjs.isObject(row)) return [];
663
659
  const actionId = row[action];
664
660
  if (typeof actionId !== "string" || actionId === "") return [];
665
661
  const seeded = input === void 0 ? void 0 : row[input];
666
- return [chunkKW34ZKF5_cjs.isObject(seeded) ? { actionId, input: seeded } : { actionId }];
662
+ return [chunkITGR7P2B_cjs.isObject(seeded) ? { actionId, input: seeded } : { actionId }];
667
663
  });
668
664
  return { reconcile: { ...rest, desired } };
669
665
  };
@@ -673,10 +669,10 @@ var executeSteps = async (steps, ctx) => {
673
669
  if (buffer.length === 0) return;
674
670
  const list = buffer;
675
671
  buffer = [];
676
- const chain = chunkIZ2UU5UL_cjs.createScopeChain(ctx.dataStore.get());
672
+ const chain = chunkK54CT3QN_cjs.createScopeChain(ctx.dataStore.get());
677
673
  const resolved = resolveMutationValues(list, chain, ctx.extras);
678
674
  ctx.dataStore.update(
679
- (curr) => chunkFSUMCJAR_cjs.applyMutations(curr, resolved, { ...ctx.initial === void 0 ? {} : { initial: ctx.initial }, strict: ctx.strict })
675
+ (curr) => chunkCQZH3L3W_cjs.applyMutations(curr, resolved, { ...ctx.initial === void 0 ? {} : { initial: ctx.initial }, strict: ctx.strict })
680
676
  );
681
677
  };
682
678
  for (const step of steps) {
@@ -684,7 +680,7 @@ var executeSteps = async (steps, ctx) => {
684
680
  buffer = [];
685
681
  return;
686
682
  }
687
- if (chunkIZ2UU5UL_cjs.isMutationStep(step)) {
683
+ if (chunkK54CT3QN_cjs.isMutationStep(step)) {
688
684
  buffer.push(step);
689
685
  continue;
690
686
  }
@@ -696,10 +692,10 @@ var executeSteps = async (steps, ctx) => {
696
692
  }
697
693
  if ("emit" in step) {
698
694
  const data = ctx.dataStore.get();
699
- const chain = chunkIZ2UU5UL_cjs.createScopeChain(data);
700
- const resolvedChannel = chunkIZ2UU5UL_cjs.resolve(step.emit.channel, chain, ctx.extras);
695
+ const chain = chunkK54CT3QN_cjs.createScopeChain(data);
696
+ const resolvedChannel = chunkK54CT3QN_cjs.resolve(step.emit.channel, chain, ctx.extras);
701
697
  const channel = typeof resolvedChannel === "string" ? resolvedChannel : String(resolvedChannel ?? "");
702
- const payload = step.emit.payload === void 0 ? void 0 : chunkIZ2UU5UL_cjs.resolve(step.emit.payload, chain, ctx.extras);
698
+ const payload = step.emit.payload === void 0 ? void 0 : chunkK54CT3QN_cjs.resolve(step.emit.payload, chain, ctx.extras);
703
699
  const { messageBus, cause } = ctx;
704
700
  const delivered = new Promise((resolve2) => {
705
701
  nextTask(() => {
@@ -770,7 +766,7 @@ var runLifecycleHook = async (hook, definition, buildContext) => {
770
766
  } catch (err) {
771
767
  if (!ctx.strict) {
772
768
  ctx.onError(
773
- err instanceof chunkFSUMCJAR_cjs.LifecycleError ? err : new chunkFSUMCJAR_cjs.LifecycleError(
769
+ err instanceof chunkCQZH3L3W_cjs.LifecycleError ? err : new chunkCQZH3L3W_cjs.LifecycleError(
774
770
  err instanceof Error ? err.message : String(err),
775
771
  { hook },
776
772
  { cause: err }
@@ -778,8 +774,8 @@ var runLifecycleHook = async (hook, definition, buildContext) => {
778
774
  );
779
775
  return;
780
776
  }
781
- if (err instanceof chunkFSUMCJAR_cjs.LifecycleError) throw err;
782
- throw new chunkFSUMCJAR_cjs.LifecycleError(
777
+ if (err instanceof chunkCQZH3L3W_cjs.LifecycleError) throw err;
778
+ throw new chunkCQZH3L3W_cjs.LifecycleError(
783
779
  err instanceof Error ? err.message : String(err),
784
780
  { hook },
785
781
  { cause: err }
@@ -811,8 +807,8 @@ var isLayoutNode = (value) => {
811
807
  if (value === null) return true;
812
808
  const t = typeof value;
813
809
  if (t === "string" || t === "number" || t === "boolean") return true;
814
- if (chunkKW34ZKF5_cjs.isArray(value)) return true;
815
- if (chunkKW34ZKF5_cjs.isObject(value)) return true;
810
+ if (chunkITGR7P2B_cjs.isArray(value)) return true;
811
+ if (chunkITGR7P2B_cjs.isObject(value)) return true;
816
812
  return false;
817
813
  };
818
814
  var renderRuntime = (definition, dataStore, ctx) => {
@@ -821,27 +817,27 @@ var renderRuntime = (definition, dataStore, ctx) => {
821
817
  if (typeof layout === "string") {
822
818
  const target = ctx.store.get(layout);
823
819
  if (target === void 0) return [];
824
- return chunkIZ2UU5UL_cjs.renderLayoutFromStore(target, dataStore, ctx);
820
+ return chunkK54CT3QN_cjs.renderLayoutFromStore(target, dataStore, ctx);
825
821
  }
826
822
  if (!isLayoutNode(layout)) return [];
827
- return chunkIZ2UU5UL_cjs.renderLayoutFromStore(layout, dataStore, ctx);
823
+ return chunkK54CT3QN_cjs.renderLayoutFromStore(layout, dataStore, ctx);
828
824
  };
829
825
 
830
826
  // src/action/runtime/triggers.ts
831
827
  var eventRef = (event) => {
832
- if (!chunkKW34ZKF5_cjs.hasKey(event, "ref")) return void 0;
828
+ if (!chunkITGR7P2B_cjs.hasKey(event, "ref")) return void 0;
833
829
  const candidate = event["ref"];
834
830
  return typeof candidate === "string" ? candidate : void 0;
835
831
  };
836
832
  var eventKey = (event) => {
837
- if (!chunkKW34ZKF5_cjs.hasKey(event, "key")) return void 0;
833
+ if (!chunkITGR7P2B_cjs.hasKey(event, "key")) return void 0;
838
834
  const candidate = event["key"];
839
835
  return typeof candidate === "string" ? candidate : void 0;
840
836
  };
841
837
  var toNovaError = (err) => {
842
- if (err instanceof chunkFSUMCJAR_cjs.NovaError) return err;
838
+ if (err instanceof chunkCQZH3L3W_cjs.NovaError) return err;
843
839
  const message = err instanceof Error ? err.message : String(err);
844
- return new chunkFSUMCJAR_cjs.NovaError(chunkFSUMCJAR_cjs.ErrorCodes.lifecycle, message, {}, { cause: err });
840
+ return new chunkCQZH3L3W_cjs.NovaError(chunkCQZH3L3W_cjs.ErrorCodes.lifecycle, message, {}, { cause: err });
845
841
  };
846
842
  var fireTrigger = (trigger, buildContext, event, cause) => {
847
843
  const built = buildContext();
@@ -849,7 +845,7 @@ var fireTrigger = (trigger, buildContext, event, cause) => {
849
845
  if (built.suspended === true) return;
850
846
  if (isRunaway(cause)) {
851
847
  const what = trigger.message === void 0 ? "A trigger" : `The trigger on "${trigger.message}"`;
852
- built.onError(new chunkFSUMCJAR_cjs.NovaError(chunkFSUMCJAR_cjs.ErrorCodes.runaway, runawayMessage(cause, what), { channel: trigger.message, depth: cause.depth, hops: cause.root.hops }));
848
+ built.onError(new chunkCQZH3L3W_cjs.NovaError(chunkCQZH3L3W_cjs.ErrorCodes.runaway, runawayMessage(cause, what), { channel: trigger.message, depth: cause.depth, hops: cause.root.hops }));
853
849
  return;
854
850
  }
855
851
  const base = { ...built, cause };
@@ -860,7 +856,7 @@ var fireTrigger = (trigger, buildContext, event, cause) => {
860
856
  ctx.onChain?.(chain);
861
857
  };
862
858
  var eventOrigin = (event) => {
863
- if (!chunkKW34ZKF5_cjs.hasKey(event, "origin")) return void 0;
859
+ if (!chunkITGR7P2B_cjs.hasKey(event, "origin")) return void 0;
864
860
  const candidate = event["origin"];
865
861
  return typeof candidate === "string" ? candidate : void 0;
866
862
  };
@@ -915,7 +911,7 @@ var createActionRuntime = (config) => {
915
911
  const statusSubscribers = [];
916
912
  let triggerHandle;
917
913
  let modelWriteOff;
918
- const modelListeners = /* @__PURE__ */ new Map();
914
+ const modelPaths = /* @__PURE__ */ new Map();
919
915
  dataStore.subscribe((next) => {
920
916
  instance.data = next;
921
917
  });
@@ -977,7 +973,7 @@ var createActionRuntime = (config) => {
977
973
  reloadAgain = void 0;
978
974
  const hop = nextCause(next.cause);
979
975
  if (isRunaway(hop)) {
980
- onError(new chunkFSUMCJAR_cjs.NovaError(chunkFSUMCJAR_cjs.ErrorCodes.runaway, runawayMessage(hop, `Reloading "${definition.id}"`), { depth: hop.depth, hops: hop.root.hops }));
976
+ onError(new chunkCQZH3L3W_cjs.NovaError(chunkCQZH3L3W_cjs.ErrorCodes.runaway, runawayMessage(hop, `Reloading "${definition.id}"`), { depth: hop.depth, hops: hop.root.hops }));
981
977
  return;
982
978
  }
983
979
  await runLifecycleHook("mount", definition, () => buildContext(abortController.signal, hop));
@@ -998,9 +994,6 @@ var createActionRuntime = (config) => {
998
994
  ...config.fetch === void 0 ? {} : { fetch: config.fetch },
999
995
  ...config.transform === void 0 ? {} : { transform: config.transform },
1000
996
  ...onNavigate === void 0 ? {} : { onNavigate },
1001
- // Stamp the call event with this instance's identity before it flows up to
1002
- // the shell's telemetry — `runCall` only knows the endpoint, the runtime
1003
- // knows who made it.
1004
997
  ...config.onEndpoint === void 0 ? {} : { onEndpoint: (event) => config.onEndpoint({ ...event, instanceId: instance.id, canvasId: instance.canvasId }) },
1005
998
  ...config.onChain === void 0 ? {} : { onChain: config.onChain },
1006
999
  calls,
@@ -1010,10 +1003,6 @@ var createActionRuntime = (config) => {
1010
1003
  onError,
1011
1004
  signal,
1012
1005
  suspended: instance.status === "suspended",
1013
- // `reload` — re-run this instance's own mount hook. The same refresh
1014
- // `resume` performs, made available as a step for canvases that never
1015
- // suspend (a list keeps every card active, so nothing else would ever
1016
- // re-read one).
1017
1006
  onReload: reload,
1018
1007
  ...cause === void 0 ? {} : { cause }
1019
1008
  });
@@ -1033,10 +1022,10 @@ var createActionRuntime = (config) => {
1033
1022
  if (event.type !== "ui:model" || instance.status === "suspended") return;
1034
1023
  if (event.origin !== void 0 && event.origin !== instance.id) return;
1035
1024
  if (event.ref === void 0) return;
1036
- const path = modelListeners.get(event.ref);
1025
+ const path = modelPaths.get(event.ref);
1037
1026
  if (path === void 0) return;
1038
1027
  dataStore.update(
1039
- (curr) => chunkFSUMCJAR_cjs.applyMutations(curr, [{ set: path, value: event.payload }], { initial: initialSnapshot, strict })
1028
+ (curr) => chunkCQZH3L3W_cjs.applyMutations(curr, [{ set: path, value: event.payload }], { initial: initialSnapshot, strict })
1040
1029
  );
1041
1030
  });
1042
1031
  }
@@ -1064,14 +1053,14 @@ var createActionRuntime = (config) => {
1064
1053
  const applyMutationList = (mutations) => {
1065
1054
  if (mutations.length === 0) return;
1066
1055
  dataStore.update(
1067
- (curr) => chunkFSUMCJAR_cjs.applyMutations(curr, mutations, { initial: initialSnapshot, strict })
1056
+ (curr) => chunkCQZH3L3W_cjs.applyMutations(curr, mutations, { initial: initialSnapshot, strict })
1068
1057
  );
1069
1058
  };
1070
- const StepArraySchema = zod.z.array(chunkFSUMCJAR_cjs.StepSchema);
1059
+ const StepArraySchema = zod.z.array(chunkCQZH3L3W_cjs.StepSchema);
1071
1060
  const runSteps = async (steps) => {
1072
1061
  const parsed = StepArraySchema.safeParse(steps);
1073
1062
  if (!parsed.success) {
1074
- const error = new chunkFSUMCJAR_cjs.DefinitionValidationError(
1063
+ const error = new chunkCQZH3L3W_cjs.DefinitionValidationError(
1075
1064
  "Invalid steps passed to runtime.executeSteps",
1076
1065
  { failures: [{ id: definition.id, issues: parsed.error.issues }] }
1077
1066
  );
@@ -1090,7 +1079,7 @@ var createActionRuntime = (config) => {
1090
1079
  const parent = ambientCause();
1091
1080
  const cause = nextCause(parent);
1092
1081
  if (isRunaway(cause)) {
1093
- onError(new chunkFSUMCJAR_cjs.NovaError(chunkFSUMCJAR_cjs.ErrorCodes.runaway, runawayMessage(cause, `Mounting "${definition.id}"`), { depth: cause.depth, hops: cause.root.hops }));
1082
+ onError(new chunkCQZH3L3W_cjs.NovaError(chunkCQZH3L3W_cjs.ErrorCodes.runaway, runawayMessage(cause, `Mounting "${definition.id}"`), { depth: cause.depth, hops: cause.root.hops }));
1094
1083
  } else {
1095
1084
  await runLifecycleHook("mount", definition, () => buildContext(abortController.signal, cause));
1096
1085
  }
@@ -1100,7 +1089,7 @@ var createActionRuntime = (config) => {
1100
1089
  abortController.abort();
1101
1090
  stopFollowing();
1102
1091
  detach();
1103
- teardownModelListeners();
1092
+ modelPaths.clear();
1104
1093
  const unmountController = new AbortController();
1105
1094
  await runLifecycleHook(
1106
1095
  "unmount",
@@ -1119,11 +1108,8 @@ var createActionRuntime = (config) => {
1119
1108
  await runLifecycleHook("resume", definition, buildContext);
1120
1109
  };
1121
1110
  const reconcileModelBindings = (nodes) => {
1122
- modelListeners.clear();
1123
- for (const b of collectModelBindings(nodes)) modelListeners.set(b.ref, b.path);
1124
- };
1125
- const teardownModelListeners = () => {
1126
- modelListeners.clear();
1111
+ modelPaths.clear();
1112
+ for (const b of collectModelBindings(nodes)) modelPaths.set(b.ref, b.path);
1127
1113
  };
1128
1114
  const render = () => {
1129
1115
  const language = config.i18n?.();
@@ -1150,7 +1136,7 @@ var createActionRuntime = (config) => {
1150
1136
  const dispose = () => {
1151
1137
  stopFollowing();
1152
1138
  detach();
1153
- teardownModelListeners();
1139
+ modelPaths.clear();
1154
1140
  statusSubscribers.length = 0;
1155
1141
  };
1156
1142
  return {
@@ -1185,11 +1171,11 @@ var validateActions = (actions) => {
1185
1171
  failures.push({ id: actionId, issues: [{ code: "custom", path: [], message: strata.depthRefusal(), input: void 0 }] });
1186
1172
  continue;
1187
1173
  }
1188
- const result = chunkFSUMCJAR_cjs.ActionDefinitionSchema.safeParse(def);
1174
+ const result = chunkCQZH3L3W_cjs.ActionDefinitionSchema.safeParse(def);
1189
1175
  if (!result.success) failures.push({ id: actionId, issues: result.error.issues });
1190
1176
  }
1191
1177
  if (failures.length > 0) {
1192
- throw new chunkFSUMCJAR_cjs.DefinitionValidationError(
1178
+ throw new chunkCQZH3L3W_cjs.DefinitionValidationError(
1193
1179
  `${failures.length} action definition(s) failed validation`,
1194
1180
  { failures }
1195
1181
  );
@@ -1202,11 +1188,11 @@ var validateFragments = (fragments) => {
1202
1188
  failures.push({ id: fragmentId, issues: [{ code: "custom", path: [], message: strata.depthRefusal(), input: void 0 }] });
1203
1189
  continue;
1204
1190
  }
1205
- const result = chunkFSUMCJAR_cjs.ActionFragmentSchema.safeParse(frag);
1191
+ const result = chunkCQZH3L3W_cjs.ActionFragmentSchema.safeParse(frag);
1206
1192
  if (!result.success) failures.push({ id: fragmentId, issues: result.error.issues });
1207
1193
  }
1208
1194
  if (failures.length > 0) {
1209
- throw new chunkFSUMCJAR_cjs.DefinitionValidationError(
1195
+ throw new chunkCQZH3L3W_cjs.DefinitionValidationError(
1210
1196
  `${failures.length} action fragment(s) failed validation`,
1211
1197
  { failures }
1212
1198
  );
@@ -1281,14 +1267,14 @@ var DEFAULT_SHELL_LAYOUT = {
1281
1267
  as: "c",
1282
1268
  key: "id",
1283
1269
  do: {
1284
- component: chunkPNQY6OFB_cjs.CANVAS_SLOT_NAME,
1270
+ component: chunkQTJ4ZQRM_cjs.CANVAS_SLOT_NAME,
1285
1271
  props: { canvasId: "$.c.id" }
1286
1272
  }
1287
1273
  }
1288
1274
  ]
1289
1275
  };
1290
1276
  var DEFAULT_ACTION_LAYOUT = {
1291
- component: chunkPNQY6OFB_cjs.ACTION_SLOT_NAME,
1277
+ component: chunkQTJ4ZQRM_cjs.ACTION_SLOT_NAME,
1292
1278
  props: { instanceId: "$.active.id" }
1293
1279
  };
1294
1280
 
@@ -1303,24 +1289,21 @@ var flattenNode = (node, shell) => {
1303
1289
  }
1304
1290
  return node;
1305
1291
  }
1306
- if (node.name === chunkPNQY6OFB_cjs.CANVAS_SLOT_NAME) {
1292
+ if (node.name === chunkQTJ4ZQRM_cjs.CANVAS_SLOT_NAME) {
1307
1293
  const canvasId = asString(node.props["canvasId"]);
1308
1294
  if (canvasId === void 0) return emptyFragment();
1309
1295
  return { type: "fragment", children: flattenRenderTree(shell.getCanvasRenderTree(canvasId), shell) };
1310
1296
  }
1311
- if (node.name === chunkPNQY6OFB_cjs.ACTION_SLOT_NAME) {
1297
+ if (node.name === chunkQTJ4ZQRM_cjs.ACTION_SLOT_NAME) {
1312
1298
  const instanceId = asString(node.props["instanceId"]);
1313
1299
  if (instanceId === void 0) return emptyFragment();
1314
1300
  const runtime = shell.getRuntime(instanceId);
1315
1301
  if (runtime === void 0) return emptyFragment();
1316
1302
  return {
1317
1303
  type: "component",
1318
- name: chunkPNQY6OFB_cjs.ACTION_SLOT_NAME,
1319
- // identity only — never the definition itself (wire weight)
1304
+ name: chunkQTJ4ZQRM_cjs.ACTION_SLOT_NAME,
1320
1305
  props: { instanceId, canvasId: runtime.instance.canvasId, definitionId: runtime.instance.definitionId },
1321
1306
  children: runtime.render(),
1322
- // keyed by instance so a renderer remounts when the instance changes
1323
- // (no stale DOM state across instance swaps, enter animations fire)
1324
1307
  key: instanceId
1325
1308
  };
1326
1309
  }
@@ -1470,14 +1453,14 @@ var createShell = (config) => {
1470
1453
  const messageBus = config.messageBus ?? createMessageBus();
1471
1454
  const registry = createRuntimeRegistry();
1472
1455
  const telemetry = createTelemetry(config.telemetry);
1473
- const componentRegistry = config.registry ?? chunkOE527MXF_cjs.createComponentRegistry();
1456
+ const componentRegistry = config.registry ?? chunk3XFQI5P2_cjs.createComponentRegistry();
1474
1457
  if (config.components !== void 0) componentRegistry.registerAll(config.components);
1475
- const layoutStore = config.layoutStore ?? chunkIZ2UU5UL_cjs.createLayoutStore();
1458
+ const layoutStore = config.layoutStore ?? chunkK54CT3QN_cjs.createLayoutStore();
1476
1459
  let pendingStrictError;
1477
1460
  const toLifecycleError = (err) => {
1478
- if (err instanceof chunkFSUMCJAR_cjs.LifecycleError) return err;
1461
+ if (err instanceof chunkCQZH3L3W_cjs.LifecycleError) return err;
1479
1462
  const message = err instanceof Error ? err.message : String(err);
1480
- return new chunkFSUMCJAR_cjs.LifecycleError(message, {}, { cause: err });
1463
+ return new chunkCQZH3L3W_cjs.LifecycleError(message, {}, { cause: err });
1481
1464
  };
1482
1465
  const handleLifecycleRejection = (err) => {
1483
1466
  const lifecycleErr = toLifecycleError(err);
@@ -1485,7 +1468,7 @@ var createShell = (config) => {
1485
1468
  pendingStrictError = lifecycleErr;
1486
1469
  }
1487
1470
  if (config.onError === void 0) return;
1488
- if (err instanceof chunkFSUMCJAR_cjs.NovaError) {
1471
+ if (err instanceof chunkCQZH3L3W_cjs.NovaError) {
1489
1472
  config.onError(err);
1490
1473
  return;
1491
1474
  }
@@ -1521,8 +1504,6 @@ var createShell = (config) => {
1521
1504
  const language = () => {
1522
1505
  if (!bearing) return void 0;
1523
1506
  return {
1524
- // An empty book translates nothing and still fills patterns, which is
1525
- // exactly what the source language needs.
1526
1507
  phrases: phrases ?? SOURCE,
1527
1508
  ...config.phraseKeys === void 0 ? {} : { phraseKeys: config.phraseKeys },
1528
1509
  ...config.onPhraseMiss === void 0 ? {} : { onPhraseMiss: config.onPhraseMiss }
@@ -1531,7 +1512,7 @@ var createShell = (config) => {
1531
1512
  const fragments = { ...config.fragments ?? {} };
1532
1513
  let disposed = false;
1533
1514
  const guardNotDisposed = () => {
1534
- if (disposed) throw new chunkFSUMCJAR_cjs.ShellDisposedError("Shell disposed");
1515
+ if (disposed) throw new chunkCQZH3L3W_cjs.ShellDisposedError("Shell disposed");
1535
1516
  };
1536
1517
  const guardNoPendingStrictError = () => {
1537
1518
  if (pendingStrictError === void 0) return;
@@ -1552,7 +1533,7 @@ var createShell = (config) => {
1552
1533
  };
1553
1534
  const getDefinition = (actionId) => {
1554
1535
  const def = actions[actionId];
1555
- if (def === void 0) throw new chunkFSUMCJAR_cjs.UnknownActionError(`Unknown action: ${actionId}`, { actionId });
1536
+ if (def === void 0) throw new chunkCQZH3L3W_cjs.UnknownActionError(`Unknown action: ${actionId}`, { actionId });
1556
1537
  return def;
1557
1538
  };
1558
1539
  const registerAction = (definition) => {
@@ -1580,19 +1561,19 @@ var createShell = (config) => {
1580
1561
  };
1581
1562
  const getFragment = (fragmentId) => {
1582
1563
  const frag = fragments[fragmentId];
1583
- if (frag === void 0) throw new chunkFSUMCJAR_cjs.UnknownFragmentError(`Unknown fragment: ${fragmentId}`, { fragmentId });
1564
+ if (frag === void 0) throw new chunkCQZH3L3W_cjs.UnknownFragmentError(`Unknown fragment: ${fragmentId}`, { fragmentId });
1584
1565
  return frag;
1585
1566
  };
1586
1567
  const registerFragment = (fragment) => {
1587
1568
  guard();
1588
- if (fragment.id === void 0) throw new chunkFSUMCJAR_cjs.UnknownFragmentError("Fragment is missing an id", { fragmentId: "" });
1569
+ if (fragment.id === void 0) throw new chunkCQZH3L3W_cjs.UnknownFragmentError("Fragment is missing an id", { fragmentId: "" });
1589
1570
  validateFragments({ [fragment.id]: fragment });
1590
1571
  fragments[fragment.id] = fragment;
1591
1572
  };
1592
1573
  const resolveDefinition = (actionId, fragmentIds) => {
1593
1574
  const def = getDefinition(actionId);
1594
1575
  if (fragmentIds === void 0 || fragmentIds.length === 0) return def;
1595
- return chunkIZ2UU5UL_cjs.composeAction(def, fragmentIds.map(getFragment));
1576
+ return chunkK54CT3QN_cjs.composeAction(def, fragmentIds.map(getFragment));
1596
1577
  };
1597
1578
  const announced = /* @__PURE__ */ new Map();
1598
1579
  let announcing = false;
@@ -1638,9 +1619,6 @@ var createShell = (config) => {
1638
1619
  pop: (cid) => pop(cid),
1639
1620
  replace: (cid, aid, input, frags) => replace(cid, aid, input, frags),
1640
1621
  clear: (cid) => clear(cid),
1641
- // ONE position, then both halves — see ShellNavOps.resetTo. The record is
1642
- // taken outside the mute so the deck being thrown away is what back returns
1643
- // to; the calls inside it record nothing of their own.
1644
1622
  resetTo: (cid, aid, input, frags) => {
1645
1623
  record(cid);
1646
1624
  journal.mute(() => {
@@ -1650,11 +1628,6 @@ var createShell = (config) => {
1650
1628
  },
1651
1629
  popTo: (cid, iid) => popTo(cid, iid),
1652
1630
  removeInstance: (cid, iid) => removeInstance(cid, iid),
1653
- // ONE movement, like resetTo: the position before it is what back returns
1654
- // to — recorded only when something actually moved, so a reconcile that
1655
- // found the canvas already right leaves no empty step in history. Rows
1656
- // naming an action this shell does not have are skipped: ungranted is
1657
- // absent, as an ungranted `initial` candidate is.
1658
1631
  reconcile: (cid, desired, options) => {
1659
1632
  const before = positionOf(cid);
1660
1633
  const known = desired.filter((entry) => actions[entry.actionId] !== void 0).map((entry) => options.with === void 0 ? entry : { ...entry, with: options.with });
@@ -1682,8 +1655,6 @@ var createShell = (config) => {
1682
1655
  i18n: language,
1683
1656
  instanceIdFn,
1684
1657
  onNavigate: (cid, effect) => navigationHandler(cid, effect),
1685
- // Every endpoint call an action makes flows to telemetry — the shell's one
1686
- // observability surface (state, data, and now endpoints all land here).
1687
1658
  onEndpoint: (event) => telemetry.fireEndpoint(event),
1688
1659
  onChain: chains.hold
1689
1660
  });
@@ -1931,7 +1902,7 @@ var createShell = (config) => {
1931
1902
  const resolved = typeof layout === "string" ? layoutStore.get(layout) : layout;
1932
1903
  if (resolved === void 0) return [];
1933
1904
  const current = language();
1934
- return chunkIZ2UU5UL_cjs.renderLayoutFromStore(
1905
+ return chunkK54CT3QN_cjs.renderLayoutFromStore(
1935
1906
  resolved,
1936
1907
  { get: () => data },
1937
1908
  {
@@ -1956,7 +1927,7 @@ var createShell = (config) => {
1956
1927
  const titleOf = (instance) => {
1957
1928
  const def = registry.get(instance.id)?.definition ?? actions[instance.definitionId];
1958
1929
  if (def?.title !== void 0) {
1959
- const resolved = chunkIZ2UU5UL_cjs.resolve(def.title, chunkIZ2UU5UL_cjs.createScopeChain(instance.data));
1930
+ const resolved = chunkK54CT3QN_cjs.resolve(def.title, chunkK54CT3QN_cjs.createScopeChain(instance.data));
1960
1931
  if (resolved !== void 0 && resolved !== null && resolved !== "") return String(resolved);
1961
1932
  }
1962
1933
  return def?.name ?? instance.definitionId;
@@ -2023,8 +1994,8 @@ var createShell = (config) => {
2023
1994
  var hasVisibleContent = (nodes) => nodes.some((node) => {
2024
1995
  if (node.type === "text") return node.value !== "";
2025
1996
  if (node.type === "fragment") return hasVisibleContent(node.children);
2026
- if (node.type === "component" && node.name === chunkPNQY6OFB_cjs.ACTION_SLOT_NAME) return hasVisibleContent(node.children);
2027
- if (chunkPNQY6OFB_cjs.isHeadNode(node)) return false;
1997
+ if (node.type === "component" && node.name === chunkQTJ4ZQRM_cjs.ACTION_SLOT_NAME) return hasVisibleContent(node.children);
1998
+ if (chunkQTJ4ZQRM_cjs.isHeadNode(node)) return false;
2028
1999
  return true;
2029
2000
  });
2030
2001
  var canvasTreeOf = (shell, canvasId) => {
@@ -2035,10 +2006,6 @@ var shellView = (shell) => ({
2035
2006
  api: {
2036
2007
  frame: () => shell.getShellRenderTree(),
2037
2008
  canvasTree: (canvasId) => canvasTreeOf(shell, canvasId),
2038
- // An event that names no origin belongs to the canvas's ACTIVE instance — on
2039
- // a card deck that is the only one drawn. One that names its own (an
2040
- // adapter stamps it at the instance boundary, `scopeDispatch`) keeps it. A
2041
- // canvas with nothing mounted dispatches unstamped.
2042
2009
  dispatch: (canvasId, event) => {
2043
2010
  const active = shell.getState().canvases[canvasId]?.active;
2044
2011
  shell.dispatch(event.origin === void 0 && active !== void 0 ? { ...event, origin: active.id } : event);
@@ -2113,5 +2080,5 @@ exports.scopeDispatch = scopeDispatch;
2113
2080
  exports.shellIdle = shellIdle;
2114
2081
  exports.shellSettled = shellSettled;
2115
2082
  exports.shellView = shellView;
2116
- //# sourceMappingURL=chunk-OO247V4J.cjs.map
2117
- //# sourceMappingURL=chunk-OO247V4J.cjs.map
2083
+ //# sourceMappingURL=chunk-DLZNZHUW.cjs.map
2084
+ //# sourceMappingURL=chunk-DLZNZHUW.cjs.map