@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 +1 @@
1
- {"version":3,"sources":["../../../src/adapters/tty/index.ts"],"names":["isHeadNode"],"mappings":";;;;;;;;;;;;;;;AA6EA,IAAM,WAAA,GAAc,YAAA;AACpB,IAAM,WAAA,GAAc,YAAA;AACpB,IAAM,UAAA,GAAa,EAAA;AAiBnB,IAAM,UAAA,GAAa,CAAC,IAAA,EAAc,OAAA,MAA+B,EAAE,KAAA,EAAO,CAAC,CAAA,GAAA,EAAM,IAAI,CAAA,EAAA,EAAK,OAAO,CAAA,CAAE,CAAA,EAAE,CAAA;AAErG,IAAM,OAAA,GAAU,CAAC,KAAA,EAAiB,GAAA,KAAwB;AACxD,EAAA,MAAM,QAAQ,KAAA,CAAM,KAAA,CAAM,CAAC,CAAA,EAAG,MAAK,IAAK,EAAA;AACxC,EAAA,OAAO,UAAU,EAAA,GAAK,GAAA,GAAM,KAAA,CAAM,KAAA,CAAM,GAAG,EAAE,CAAA;AAC/C,CAAA;AAIA,IAAM,UAAA,GAAa,CAAC,EAAA,KAAuB;AACzC,EAAA,MAAM,IAAA,GAAO,gBAAM,EAAE,CAAA,CAAA,CAAA;AACrB,EAAA,OAAO,IAAA,GAAO,SAAI,MAAA,CAAO,IAAA,CAAK,IAAI,CAAA,EAAG,UAAA,GAAa,IAAA,CAAK,MAAM,CAAC,CAAA;AAChE,CAAA;AAEA,IAAM,UAAA,GAAa,CAAC,IAAA,EAAkB,GAAA,KAAuB;AAC3D,EAAA,IAAI,IAAA,CAAK,IAAA,KAAS,MAAA,EAAQ,OAAO,EAAE,OAAO,IAAA,CAA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O;AACxB,IAAA,IAAI,IAAA,CAAK,IAAA,EAAK,KAAM,EAAA,IAAM,GAAA,CAAI,GAAA,CAAI,MAAA,GAAS,CAAC,CAAA,EAAG,IAAA,EAAK,KAAM,EAAA,EAAI;AAC9D,IAAA,GAAA,CAAI,KAAK,IAAI,CAAA;AAAA,EACf;AACA,EAAA,OAAO,IAAI,CAAC,CAAA,EAAG,MAAK,KAAM,EAAA,MAAQ,KAAA,EAAM;AACxC,EAAA,OAAO,GAAA,CAAI,IAAI,MAAA,GAAS,CAAC,GAAG,IAAA,EAAK,KAAM,EAAA,EAAI,GAAA,CAAI,GAAA,EAAI;AACnD,EAAA,OAAO,GAAA;AACT,CAAA;AAEO,IAAM,gBAAgB,CAC3B,QAAA,EACA,GAAA,EACA,OAAA,GAAuC,EAAC,KAC5B;AACZ,EAAA,MAAM,SAAS,MAAgB;AAC7B,IAAA,MAAM,MAAwB,EAAC;AAG/B,IAAA,MAAM,MAAW,EAAE,QAAA,EAAU,MAAA,EAAQ,EAAA,EAAI,KAAK,GAAA,EAAK,GAAI,OAAA,CAAQ,QAAA,KAAa,SAAY,EAAE,QAAA,EAAU,QAAQ,QAAA,EAAS,GAAI,EAAC,EAAG;AAC7H,IAAA,MAAM,KAAA,GAAQ,GAAA,CAAI,KAAA,EAAM,CAAE,OAAA,CAAQ,CAAC,IAAA,KAAS,UAAA,CAAW,IAAA,EAAM,GAAG,CAAA,CAAE,KAAK,CAAA;AACvE,IAAA,OAAO,EAAE,MAAM,IAAA,CAAK,KAAK,EAAE,IAAA,CAAK,IAAI,CAAA,EAAG,YAAA,EAAc,GAAA,EAAI;AAAA,EAC3D,CAAA;AACA,EAAA,OAAO,EAAE,MAAA,EAAO;AAClB","file":"index.cjs","sourcesContent":["import type { ComponentRegistry, RenderNode } from '@layout/types';\nimport { isHeadNode } from '@shell';\nimport type { RenderApi } from '@shell';\n\n// ═══════════════════════════════════════════════════════════\n// @niscorp/nova/adapters/tty — a text adapter, the terminal sibling of\n// nova/dom. It turns a served RenderNode tree into lines of plain text plus a\n// numbered table of INTERACTIVES: every `ref`'d node prints with a `[n]`\n// marker and lands in the table, so a REPL host can map \"click 3\" / \"set 5 x\"\n// onto the same event vocabulary the DOM adapter wires by convention —\n// `ui:click` (payload = the node's `value` prop), `ui:model`, `ui:key`.\n// Origin is never stamped here — moss stamps the active instance server-side.\n//\n// No framework, no I/O, no node builtins: render() is a pure snapshot →\n// { text, interactives }. The host (moss's terminal/tty target) owns stdio,\n// prompts, and dispatch; this adapter only says what the screen IS and what\n// on it can be acted on. `CanvasSlot` is resolved here (the frame's markers →\n// per-canvas trees), the one piece of terminal structure the renderer owns.\n// See packages/nova/ADAPTER.md for the shared adapter contract.\n// ═══════════════════════════════════════════════════════════\n\n// A rendered block: lines of text, composed upward (a Stack stacks child\n// blocks, a Row joins single-line children inline, …).\nexport type TtyBlock = { lines: string[] };\n\n// What an interactive marker can be driven with — the REPL host maps these\n// to events: click/row → ui:click, model → ui:model (a typed value),\n// toggle → ui:model (a negated boolean).\nexport type TtyInteractiveKind = 'click' | 'row' | 'model' | 'toggle';\n\nexport type TtyInteractive = {\n // the printed `[n]` — 1-based, in registration order\n index: number;\n kind: TtyInteractiveKind;\n ref: string;\n // the canvas whose dispatch this belongs to; '' = frame chrome (dispatches\n // nothing, same as the DOM adapter's frame)\n canvas: string;\n // the action instance it sits in (the enclosing ActionSlot's instanceId) —\n // a list canvas renders several live instances at once, so the host stamps\n // this as the event's origin, exactly as the DOM adapter does. Absent\n // outside any instance.\n origin?: string;\n // what was printed — for the host's `refs` listing\n label: string;\n // click/row: the dispatch payload; model/toggle: the current value\n value?: unknown;\n // the model path, when model-bound — display only, the server owns meaning\n path?: string;\n};\n\nexport type TtyComponentContext = {\n props: Record<string, unknown>;\n // the node's children, already rendered — the component stacks or joins\n // them where it wants (leaves ignore them).\n children: TtyBlock[];\n // register an interactive and get its printed index — for data-driven\n // components with INTERNAL interactivity (a table's rows, a panel's ✕);\n // simple components let the renderer mark their `ref`/`model` by convention.\n register: (entry: { kind: TtyInteractiveKind; ref: string; label: string; value?: unknown; path?: string }) => number;\n};\n\n// A TTY component: props + rendered children in, one block of lines out.\nexport type TtyComponent = (ctx: TtyComponentContext) => TtyBlock;\n\n// What the terminal hands the view: core's `RenderApi` — the same single\n// definition the dom/react adapters and moss's terminal share.\nexport type TtyRenderApi = RenderApi;\n\n// One rendered frame: the full screen text and everything actionable on it.\nexport type TtyFrame = { text: string; interactives: TtyInteractive[] };\n\nexport type TtyView = {\n // render the current snapshot; call on every wire change\n render: () => TtyFrame;\n};\n\nconst CANVAS_SLOT = 'CanvasSlot';\nconst ACTION_SLOT = 'ActionSlot';\nconst RULE_WIDTH = 60;\n\n// The recursion context: the registry, the canvas in force (frame chrome is\n// ''; a CanvasSlot switches it), the interactive accumulator, the resolver.\ntype Ctx = {\n registry: ComponentRegistry<TtyComponent>;\n canvas: string;\n // the enclosing action instance, when inside one (an ActionSlot switches it)\n origin?: string;\n api: TtyRenderApi;\n out: TtyInteractive[];\n // used when a component name is unregistered — a permissive renderer (the\n // default kit) supplies one so unknown primitives render their children\n // instead of an error; strict consumers omit it.\n fallback?: TtyComponent;\n};\n\nconst errorBlock = (code: string, message: string): TtyBlock => ({ lines: [`!! ${code}: ${message}`] });\n\nconst labelOf = (block: TtyBlock, ref: string): string => {\n const first = block.lines[0]?.trim() ?? '';\n return first === '' ? ref : first.slice(0, 48);\n};\n\n// A canvas heading: `── main ─────…` — the one piece of chrome the renderer\n// prints itself, so a REPL reader can tell canvases apart.\nconst canvasRule = (id: string): string => {\n const head = `── ${id} `;\n return head + '─'.repeat(Math.max(0, RULE_WIDTH - head.length));\n};\n\nconst renderNode = (node: RenderNode, ctx: Ctx): TtyBlock => {\n if (node.type === 'text') return { lines: node.value.split('\\n') };\n if (node.type === 'fragment') return { lines: node.children.flatMap((child) => renderNode(child, ctx).lines) };\n if (node.type === 'error') return errorBlock(node.code, node.message);\n\n // component\n // a head is the document's, not the screen's: nothing is drawn for it or for what it holds\n if (isHeadNode(node)) return { lines: [] };\n if (node.name === CANVAS_SLOT) {\n const canvasId = typeof node.props['canvasId'] === 'string' ? (node.props['canvasId'] as string) : '';\n if (canvasId === '') return { lines: [] };\n const tree = ctx.api.canvasTree(canvasId);\n // an empty canvas collapses entirely — no heading for nothing\n if (tree.length === 0) return { lines: [] };\n // a canvas starts outside any instance, even one placed by an instance's layout\n const { origin: _outer, ...outside } = ctx;\n const canvasCtx: Ctx = { ...outside, canvas: canvasId };\n return { lines: [canvasRule(canvasId), ...tree.flatMap((child) => renderNode(child, canvasCtx).lines), ''] };\n }\n\n const entry = ctx.registry.get(node.name);\n const build = entry !== undefined ? entry.component : ctx.fallback;\n if (build === undefined) return errorBlock('COMPONENT_NOT_FOUND', node.name);\n\n // An ActionSlot is an instance boundary: what is inside it belongs to it.\n const instanceId = node.name === ACTION_SLOT ? node.props['instanceId'] : undefined;\n const inner: Ctx = typeof instanceId === 'string' && instanceId !== '' ? { ...ctx, origin: instanceId } : ctx;\n const children = node.children.filter((child) => !isHeadNode(child)).map((child) => renderNode(child, inner));\n const register: TtyComponentContext['register'] = (item) => {\n const interactive: TtyInteractive = { index: ctx.out.length + 1, canvas: ctx.canvas, ...(ctx.origin !== undefined ? { origin: ctx.origin } : {}), ...item };\n ctx.out.push(interactive);\n return interactive.index;\n };\n const block = build({ props: node.props, children, register });\n\n // Convention wiring, the TTY twin of the DOM adapter's listeners: a model'd\n // node is an input (`toggle` when its current value is a boolean), a bare\n // ref'd node is clickable (payload = its `value` prop). The marker lands on\n // the block's first line.\n if (node.model !== undefined) {\n const current = node.props['value'] ?? node.props['checked'];\n const kind: TtyInteractiveKind = typeof current === 'boolean' ? 'toggle' : 'model';\n const index = register({ kind, ref: node.model.ref, label: labelOf(block, node.model.ref), value: current, path: node.model.path });\n return { lines: [`[${index}] ${block.lines[0] ?? ''}`, ...block.lines.slice(1)] };\n }\n if (node.ref !== undefined) {\n const value = node.props['value'];\n const index = register({ kind: 'click', ref: node.ref, label: labelOf(block, node.ref), ...(value !== undefined ? { value } : {}) });\n return { lines: [`[${index}] ${block.lines[0] ?? ''}`, ...block.lines.slice(1)] };\n }\n return block;\n};\n\n// Collapse runs of blank lines so stacked empty canvases don't leave gaps.\nconst tidy = (lines: string[]): string[] => {\n const out: string[] = [];\n for (const line of lines) {\n if (line.trim() === '' && out[out.length - 1]?.trim() === '') continue;\n out.push(line);\n }\n while (out[0]?.trim() === '') out.shift();\n while (out[out.length - 1]?.trim() === '') out.pop();\n return out;\n};\n\nexport const createTtyView = (\n registry: ComponentRegistry<TtyComponent>,\n api: TtyRenderApi,\n options: { fallback?: TtyComponent } = {},\n): TtyView => {\n const render = (): TtyFrame => {\n const out: TtyInteractive[] = [];\n // The frame is chrome — its interactives belong to no canvas and the host\n // dispatches nothing for them, same as the DOM adapter's frame dispatch.\n const ctx: Ctx = { registry, canvas: '', api, out, ...(options.fallback !== undefined ? { fallback: options.fallback } : {}) };\n const lines = api.frame().flatMap((node) => renderNode(node, ctx).lines);\n return { text: tidy(lines).join('\\n'), interactives: out };\n };\n return { render };\n};\n"]}
1
+ {"version":3,"sources":["../../../src/adapters/tty/index.ts"],"names":["isHeadNode"],"mappings":";;;;;;;;;;;;;;;AAqCA,IAAM,WAAA,GAAc,YAAA;AACpB,IAAM,WAAA,GAAc,YAAA;AACpB,IAAM,UAAA,GAAa,EAAA;AAWnB,IAAM,UAAA,GAAa,CAAC,IAAA,EAAc,OAAA,MAA+B,EAAE,KAAA,EAAO,CAAC,CAAA,GAAA,EAAM,IAAI,CAAA,EAAA,EAAK,OAAO,CAAA,CAAE,CAAA,EAAE,CAAA;AAErG,IAAM,OAAA,GAAU,CAAC,KAAA,EAAiB,GAAA,KAAwB;AACxD,EAAA,MAAM,QAAQ,KAAA,CAAM,KAAA,CAAM,CAAC,CAAA,EAAG,MAAK,IAAK,EAAA;AACxC,EAAA,OAAO,UAAU,EAAA,GAAK,GAAA,GAAM,KAAA,CAAM,KAAA,CAAM,GAAG,EAAE,C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AAS,UAAA,CAAW,IAAA,EAAM,GAAG,CAAA,CAAE,KAAK,CAAA;AACvE,IAAA,OAAO,EAAE,MAAM,IAAA,CAAK,KAAK,EAAE,IAAA,CAAK,IAAI,CAAA,EAAG,YAAA,EAAc,GAAA,EAAI;AAAA,EAC3D,CAAA;AACA,EAAA,OAAO,EAAE,MAAA,EAAO;AAClB","file":"index.cjs","sourcesContent":["import type { ComponentRegistry, RenderNode } from '@layout/types';\nimport { isHeadNode } from '@shell';\nimport type { RenderApi } from '@shell';\n\nexport type TtyBlock = { lines: string[] };\n\nexport type TtyInteractiveKind = 'click' | 'row' | 'model' | 'toggle';\n\nexport type TtyInteractive = {\n index: number;\n kind: TtyInteractiveKind;\n ref: string;\n // '' is the frame, which dispatches nothing.\n canvas: string;\n origin?: string;\n label: string;\n // click and row: the dispatch payload. model and toggle: the current value.\n value?: unknown;\n path?: string;\n};\n\nexport type TtyComponentContext = {\n props: Record<string, unknown>;\n children: TtyBlock[];\n register: (entry: { kind: TtyInteractiveKind; ref: string; label: string; value?: unknown; path?: string }) => number;\n};\n\nexport type TtyComponent = (ctx: TtyComponentContext) => TtyBlock;\n\nexport type TtyRenderApi = RenderApi;\n\nexport type TtyFrame = { text: string; interactives: TtyInteractive[] };\n\nexport type TtyView = {\n render: () => TtyFrame;\n};\n\nconst CANVAS_SLOT = 'CanvasSlot';\nconst ACTION_SLOT = 'ActionSlot';\nconst RULE_WIDTH = 60;\n\ntype Ctx = {\n registry: ComponentRegistry<TtyComponent>;\n canvas: string;\n origin?: string;\n api: TtyRenderApi;\n out: TtyInteractive[];\n fallback?: TtyComponent;\n};\n\nconst errorBlock = (code: string, message: string): TtyBlock => ({ lines: [`!! ${code}: ${message}`] });\n\nconst labelOf = (block: TtyBlock, ref: string): string => {\n const first = block.lines[0]?.trim() ?? '';\n return first === '' ? ref : first.slice(0, 48);\n};\n\nconst canvasRule = (id: string): string => {\n const head = `── ${id} `;\n return head + '─'.repeat(Math.max(0, RULE_WIDTH - head.length));\n};\n\nconst renderNode = (node: RenderNode, ctx: Ctx): TtyBlock => {\n if (node.type === 'text') return { lines: node.value.split('\\n') };\n if (node.type === 'fragment') return { lines: node.children.flatMap((child) => renderNode(child, ctx).lines) };\n if (node.type === 'error') return errorBlock(node.code, node.message);\n\n if (isHeadNode(node)) return { lines: [] };\n if (node.name === CANVAS_SLOT) {\n const canvasId = typeof node.props['canvasId'] === 'string' ? (node.props['canvasId'] as string) : '';\n if (canvasId === '') return { lines: [] };\n const tree = ctx.api.canvasTree(canvasId);\n if (tree.length === 0) return { lines: [] };\n // A canvas starts outside any instance, even when an instance's layout placed it.\n const { origin: _outer, ...outside } = ctx;\n const canvasCtx: Ctx = { ...outside, canvas: canvasId };\n return { lines: [canvasRule(canvasId), ...tree.flatMap((child) => renderNode(child, canvasCtx).lines), ''] };\n }\n\n const entry = ctx.registry.get(node.name);\n const build = entry !== undefined ? entry.component : ctx.fallback;\n if (build === undefined) return errorBlock('COMPONENT_NOT_FOUND', node.name);\n\n const instanceId = node.name === ACTION_SLOT ? node.props['instanceId'] : undefined;\n const inner: Ctx = typeof instanceId === 'string' && instanceId !== '' ? { ...ctx, origin: instanceId } : ctx;\n const children = node.children.filter((child) => !isHeadNode(child)).map((child) => renderNode(child, inner));\n const register: TtyComponentContext['register'] = (item) => {\n const interactive: TtyInteractive = { index: ctx.out.length + 1, canvas: ctx.canvas, ...(ctx.origin !== undefined ? { origin: ctx.origin } : {}), ...item };\n ctx.out.push(interactive);\n return interactive.index;\n };\n const block = build({ props: node.props, children, register });\n\n if (node.model !== undefined) {\n const current = node.props['value'] ?? node.props['checked'];\n const kind: TtyInteractiveKind = typeof current === 'boolean' ? 'toggle' : 'model';\n const index = register({ kind, ref: node.model.ref, label: labelOf(block, node.model.ref), value: current, path: node.model.path });\n return { lines: [`[${index}] ${block.lines[0] ?? ''}`, ...block.lines.slice(1)] };\n }\n if (node.ref !== undefined) {\n const value = node.props['value'];\n const index = register({ kind: 'click', ref: node.ref, label: labelOf(block, node.ref), ...(value !== undefined ? { value } : {}) });\n return { lines: [`[${index}] ${block.lines[0] ?? ''}`, ...block.lines.slice(1)] };\n }\n return block;\n};\n\nconst tidy = (lines: string[]): string[] => {\n const out: string[] = [];\n for (const line of lines) {\n if (line.trim() === '' && out[out.length - 1]?.trim() === '') continue;\n out.push(line);\n }\n while (out[0]?.trim() === '') out.shift();\n while (out[out.length - 1]?.trim() === '') out.pop();\n return out;\n};\n\nexport const createTtyView = (\n registry: ComponentRegistry<TtyComponent>,\n api: TtyRenderApi,\n options: { fallback?: TtyComponent } = {},\n): TtyView => {\n const render = (): TtyFrame => {\n const out: TtyInteractive[] = [];\n const ctx: Ctx = { registry, canvas: '', api, out, ...(options.fallback !== undefined ? { fallback: options.fallback } : {}) };\n const lines = api.frame().flatMap((node) => renderNode(node, ctx).lines);\n return { text: tidy(lines).join('\\n'), interactives: out };\n };\n return { render };\n};\n"]}
@@ -1,9 +1,9 @@
1
- import { C as ComponentRegistry } from '../../types-j290XhCn.cjs';
2
- import { R as RenderApi } from '../../types-qkzTfSye.cjs';
1
+ import { C as ComponentRegistry } from '../../types-CR56luN7.cjs';
2
+ import { R as RenderApi } from '../../types-BTha1ZLR.cjs';
3
3
  import 'zod';
4
4
  import '../../schemas-DPdeFlCT.cjs';
5
- import '../../index-caZoXSwr.cjs';
6
- import '../../effects-CndX9K7D.cjs';
5
+ import '../../index-BoPH5aSd.cjs';
6
+ import '../../effects-DkBBrxVj.cjs';
7
7
  import '../../schemas-pMyyuXV7.cjs';
8
8
 
9
9
  type TtyBlock = {
@@ -1,9 +1,9 @@
1
- import { C as ComponentRegistry } from '../../types-qnKMx0_V.js';
2
- import { R as RenderApi } from '../../types-D23TRvqe.js';
1
+ import { C as ComponentRegistry } from '../../types-CJC8mnzl.js';
2
+ import { R as RenderApi } from '../../types-BxpSKUxn.js';
3
3
  import 'zod';
4
4
  import '../../schemas-DPdeFlCT.js';
5
- import '../../index-CNfzSBe2.js';
6
- import '../../effects-CndX9K7D.js';
5
+ import '../../index-BjQX8XZl.js';
6
+ import '../../effects-DkBBrxVj.js';
7
7
  import '../../schemas-pMyyuXV7.js';
8
8
 
9
9
  type TtyBlock = {
@@ -1,13 +1,13 @@
1
- import '../../chunk-P5SJ3QXJ.js';
2
- import { isHeadNode } from '../../chunk-RFBIGRCI.js';
3
- import '../../chunk-XUSKGJRI.js';
4
- import '../../chunk-OGD5CCMZ.js';
5
- import '../../chunk-7TS3YVQR.js';
6
- import '../../chunk-OE4E6IBD.js';
7
- import '../../chunk-DIFE573X.js';
8
- import '../../chunk-JI7ZRESP.js';
9
- import '../../chunk-RBU5PHN4.js';
10
- import '../../chunk-2MNLEL45.js';
1
+ import '../../chunk-3YS2FBF5.js';
2
+ import { isHeadNode } from '../../chunk-C63CBYD5.js';
3
+ import '../../chunk-YV2G37TJ.js';
4
+ import '../../chunk-ZZRQAH5Z.js';
5
+ import '../../chunk-M2ZZUSH3.js';
6
+ import '../../chunk-Y3UKAJJX.js';
7
+ import '../../chunk-G4OQ4PEO.js';
8
+ import '../../chunk-JKULAG53.js';
9
+ import '../../chunk-GQVJ5UAS.js';
10
+ import '../../chunk-SVWDKXSH.js';
11
11
  import '../../chunk-PZ5AY32C.js';
12
12
 
13
13
  // src/adapters/tty/index.ts
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/adapters/tty/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AA6EA,IAAM,WAAA,GAAc,YAAA;AACpB,IAAM,WAAA,GAAc,YAAA;AACpB,IAAM,UAAA,GAAa,EAAA;AAiBnB,IAAM,UAAA,GAAa,CAAC,IAAA,EAAc,OAAA,MAA+B,EAAE,KAAA,EAAO,CAAC,CAAA,GAAA,EAAM,IAAI,CAAA,EAAA,EAAK,OAAO,CAAA,CAAE,CAAA,EAAE,CAAA;AAErG,IAAM,OAAA,GAAU,CAAC,KAAA,EAAiB,GAAA,KAAwB;AACxD,EAAA,MAAM,QAAQ,KAAA,CAAM,KAAA,CAAM,CAAC,C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AS,GAAI,EAAC,EAAG;AAC7H,IAAA,MAAM,KAAA,GAAQ,GAAA,CAAI,KAAA,EAAM,CAAE,OAAA,CAAQ,CAAC,IAAA,KAAS,UAAA,CAAW,IAAA,EAAM,GAAG,CAAA,CAAE,KAAK,CAAA;AACvE,IAAA,OAAO,EAAE,MAAM,IAAA,CAAK,KAAK,EAAE,IAAA,CAAK,IAAI,CAAA,EAAG,YAAA,EAAc,GAAA,EAAI;AAAA,EAC3D,CAAA;AACA,EAAA,OAAO,EAAE,MAAA,EAAO;AAClB","file":"index.js","sourcesContent":["import type { ComponentRegistry, RenderNode } from '@layout/types';\nimport { isHeadNode } from '@shell';\nimport type { RenderApi } from '@shell';\n\n// ═══════════════════════════════════════════════════════════\n// @niscorp/nova/adapters/tty — a text adapter, the terminal sibling of\n// nova/dom. It turns a served RenderNode tree into lines of plain text plus a\n// numbered table of INTERACTIVES: every `ref`'d node prints with a `[n]`\n// marker and lands in the table, so a REPL host can map \"click 3\" / \"set 5 x\"\n// onto the same event vocabulary the DOM adapter wires by convention —\n// `ui:click` (payload = the node's `value` prop), `ui:model`, `ui:key`.\n// Origin is never stamped here — moss stamps the active instance server-side.\n//\n// No framework, no I/O, no node builtins: render() is a pure snapshot →\n// { text, interactives }. The host (moss's terminal/tty target) owns stdio,\n// prompts, and dispatch; this adapter only says what the screen IS and what\n// on it can be acted on. `CanvasSlot` is resolved here (the frame's markers →\n// per-canvas trees), the one piece of terminal structure the renderer owns.\n// See packages/nova/ADAPTER.md for the shared adapter contract.\n// ═══════════════════════════════════════════════════════════\n\n// A rendered block: lines of text, composed upward (a Stack stacks child\n// blocks, a Row joins single-line children inline, …).\nexport type TtyBlock = { lines: string[] };\n\n// What an interactive marker can be driven with — the REPL host maps these\n// to events: click/row → ui:click, model → ui:model (a typed value),\n// toggle → ui:model (a negated boolean).\nexport type TtyInteractiveKind = 'click' | 'row' | 'model' | 'toggle';\n\nexport type TtyInteractive = {\n // the printed `[n]` — 1-based, in registration order\n index: number;\n kind: TtyInteractiveKind;\n ref: string;\n // the canvas whose dispatch this belongs to; '' = frame chrome (dispatches\n // nothing, same as the DOM adapter's frame)\n canvas: string;\n // the action instance it sits in (the enclosing ActionSlot's instanceId) —\n // a list canvas renders several live instances at once, so the host stamps\n // this as the event's origin, exactly as the DOM adapter does. Absent\n // outside any instance.\n origin?: string;\n // what was printed — for the host's `refs` listing\n label: string;\n // click/row: the dispatch payload; model/toggle: the current value\n value?: unknown;\n // the model path, when model-bound — display only, the server owns meaning\n path?: string;\n};\n\nexport type TtyComponentContext = {\n props: Record<string, unknown>;\n // the node's children, already rendered — the component stacks or joins\n // them where it wants (leaves ignore them).\n children: TtyBlock[];\n // register an interactive and get its printed index — for data-driven\n // components with INTERNAL interactivity (a table's rows, a panel's ✕);\n // simple components let the renderer mark their `ref`/`model` by convention.\n register: (entry: { kind: TtyInteractiveKind; ref: string; label: string; value?: unknown; path?: string }) => number;\n};\n\n// A TTY component: props + rendered children in, one block of lines out.\nexport type TtyComponent = (ctx: TtyComponentContext) => TtyBlock;\n\n// What the terminal hands the view: core's `RenderApi` — the same single\n// definition the dom/react adapters and moss's terminal share.\nexport type TtyRenderApi = RenderApi;\n\n// One rendered frame: the full screen text and everything actionable on it.\nexport type TtyFrame = { text: string; interactives: TtyInteractive[] };\n\nexport type TtyView = {\n // render the current snapshot; call on every wire change\n render: () => TtyFrame;\n};\n\nconst CANVAS_SLOT = 'CanvasSlot';\nconst ACTION_SLOT = 'ActionSlot';\nconst RULE_WIDTH = 60;\n\n// The recursion context: the registry, the canvas in force (frame chrome is\n// ''; a CanvasSlot switches it), the interactive accumulator, the resolver.\ntype Ctx = {\n registry: ComponentRegistry<TtyComponent>;\n canvas: string;\n // the enclosing action instance, when inside one (an ActionSlot switches it)\n origin?: string;\n api: TtyRenderApi;\n out: TtyInteractive[];\n // used when a component name is unregistered — a permissive renderer (the\n // default kit) supplies one so unknown primitives render their children\n // instead of an error; strict consumers omit it.\n fallback?: TtyComponent;\n};\n\nconst errorBlock = (code: string, message: string): TtyBlock => ({ lines: [`!! ${code}: ${message}`] });\n\nconst labelOf = (block: TtyBlock, ref: string): string => {\n const first = block.lines[0]?.trim() ?? '';\n return first === '' ? ref : first.slice(0, 48);\n};\n\n// A canvas heading: `── main ─────…` — the one piece of chrome the renderer\n// prints itself, so a REPL reader can tell canvases apart.\nconst canvasRule = (id: string): string => {\n const head = `── ${id} `;\n return head + '─'.repeat(Math.max(0, RULE_WIDTH - head.length));\n};\n\nconst renderNode = (node: RenderNode, ctx: Ctx): TtyBlock => {\n if (node.type === 'text') return { lines: node.value.split('\\n') };\n if (node.type === 'fragment') return { lines: node.children.flatMap((child) => renderNode(child, ctx).lines) };\n if (node.type === 'error') return errorBlock(node.code, node.message);\n\n // component\n // a head is the document's, not the screen's: nothing is drawn for it or for what it holds\n if (isHeadNode(node)) return { lines: [] };\n if (node.name === CANVAS_SLOT) {\n const canvasId = typeof node.props['canvasId'] === 'string' ? (node.props['canvasId'] as string) : '';\n if (canvasId === '') return { lines: [] };\n const tree = ctx.api.canvasTree(canvasId);\n // an empty canvas collapses entirely — no heading for nothing\n if (tree.length === 0) return { lines: [] };\n // a canvas starts outside any instance, even one placed by an instance's layout\n const { origin: _outer, ...outside } = ctx;\n const canvasCtx: Ctx = { ...outside, canvas: canvasId };\n return { lines: [canvasRule(canvasId), ...tree.flatMap((child) => renderNode(child, canvasCtx).lines), ''] };\n }\n\n const entry = ctx.registry.get(node.name);\n const build = entry !== undefined ? entry.component : ctx.fallback;\n if (build === undefined) return errorBlock('COMPONENT_NOT_FOUND', node.name);\n\n // An ActionSlot is an instance boundary: what is inside it belongs to it.\n const instanceId = node.name === ACTION_SLOT ? node.props['instanceId'] : undefined;\n const inner: Ctx = typeof instanceId === 'string' && instanceId !== '' ? { ...ctx, origin: instanceId } : ctx;\n const children = node.children.filter((child) => !isHeadNode(child)).map((child) => renderNode(child, inner));\n const register: TtyComponentContext['register'] = (item) => {\n const interactive: TtyInteractive = { index: ctx.out.length + 1, canvas: ctx.canvas, ...(ctx.origin !== undefined ? { origin: ctx.origin } : {}), ...item };\n ctx.out.push(interactive);\n return interactive.index;\n };\n const block = build({ props: node.props, children, register });\n\n // Convention wiring, the TTY twin of the DOM adapter's listeners: a model'd\n // node is an input (`toggle` when its current value is a boolean), a bare\n // ref'd node is clickable (payload = its `value` prop). The marker lands on\n // the block's first line.\n if (node.model !== undefined) {\n const current = node.props['value'] ?? node.props['checked'];\n const kind: TtyInteractiveKind = typeof current === 'boolean' ? 'toggle' : 'model';\n const index = register({ kind, ref: node.model.ref, label: labelOf(block, node.model.ref), value: current, path: node.model.path });\n return { lines: [`[${index}] ${block.lines[0] ?? ''}`, ...block.lines.slice(1)] };\n }\n if (node.ref !== undefined) {\n const value = node.props['value'];\n const index = register({ kind: 'click', ref: node.ref, label: labelOf(block, node.ref), ...(value !== undefined ? { value } : {}) });\n return { lines: [`[${index}] ${block.lines[0] ?? ''}`, ...block.lines.slice(1)] };\n }\n return block;\n};\n\n// Collapse runs of blank lines so stacked empty canvases don't leave gaps.\nconst tidy = (lines: string[]): string[] => {\n const out: string[] = [];\n for (const line of lines) {\n if (line.trim() === '' && out[out.length - 1]?.trim() === '') continue;\n out.push(line);\n }\n while (out[0]?.trim() === '') out.shift();\n while (out[out.length - 1]?.trim() === '') out.pop();\n return out;\n};\n\nexport const createTtyView = (\n registry: ComponentRegistry<TtyComponent>,\n api: TtyRenderApi,\n options: { fallback?: TtyComponent } = {},\n): TtyView => {\n const render = (): TtyFrame => {\n const out: TtyInteractive[] = [];\n // The frame is chrome — its interactives belong to no canvas and the host\n // dispatches nothing for them, same as the DOM adapter's frame dispatch.\n const ctx: Ctx = { registry, canvas: '', api, out, ...(options.fallback !== undefined ? { fallback: options.fallback } : {}) };\n const lines = api.frame().flatMap((node) => renderNode(node, ctx).lines);\n return { text: tidy(lines).join('\\n'), interactives: out };\n };\n return { render };\n};\n"]}
1
+ {"version":3,"sources":["../../../src/adapters/tty/index.ts"],"names":[],"mappings":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AAK,KAAM,EAAA,EAAI,GAAA,CAAI,GAAA,EAAI;AACnD,EAAA,OAAO,GAAA;AACT,CAAA;AAEO,IAAM,gBAAgB,CAC3B,QAAA,EACA,GAAA,EACA,OAAA,GAAuC,EAAC,KAC5B;AACZ,EAAA,MAAM,SAAS,MAAgB;AAC7B,IAAA,MAAM,MAAwB,EAAC;AAC/B,IAAA,MAAM,MAAW,EAAE,QAAA,EAAU,MAAA,EAAQ,EAAA,EAAI,KAAK,GAAA,EAAK,GAAI,OAAA,CAAQ,QAAA,KAAa,SAAY,EAAE,QAAA,EAAU,QAAQ,QAAA,EAAS,GAAI,EAAC,EAAG;AAC7H,IAAA,MAAM,KAAA,GAAQ,GAAA,CAAI,KAAA,EAAM,CAAE,OAAA,CAAQ,CAAC,IAAA,KAAS,UAAA,CAAW,IAAA,EAAM,GAAG,CAAA,CAAE,KAAK,CAAA;AACvE,IAAA,OAAO,EAAE,MAAM,IAAA,CAAK,KAAK,EAAE,IAAA,CAAK,IAAI,CAAA,EAAG,YAAA,EAAc,GAAA,EAAI;AAAA,EAC3D,CAAA;AACA,EAAA,OAAO,EAAE,MAAA,EAAO;AAClB","file":"index.js","sourcesContent":["import type { ComponentRegistry, RenderNode } from '@layout/types';\nimport { isHeadNode } from '@shell';\nimport type { RenderApi } from '@shell';\n\nexport type TtyBlock = { lines: string[] };\n\nexport type TtyInteractiveKind = 'click' | 'row' | 'model' | 'toggle';\n\nexport type TtyInteractive = {\n index: number;\n kind: TtyInteractiveKind;\n ref: string;\n // '' is the frame, which dispatches nothing.\n canvas: string;\n origin?: string;\n label: string;\n // click and row: the dispatch payload. model and toggle: the current value.\n value?: unknown;\n path?: string;\n};\n\nexport type TtyComponentContext = {\n props: Record<string, unknown>;\n children: TtyBlock[];\n register: (entry: { kind: TtyInteractiveKind; ref: string; label: string; value?: unknown; path?: string }) => number;\n};\n\nexport type TtyComponent = (ctx: TtyComponentContext) => TtyBlock;\n\nexport type TtyRenderApi = RenderApi;\n\nexport type TtyFrame = { text: string; interactives: TtyInteractive[] };\n\nexport type TtyView = {\n render: () => TtyFrame;\n};\n\nconst CANVAS_SLOT = 'CanvasSlot';\nconst ACTION_SLOT = 'ActionSlot';\nconst RULE_WIDTH = 60;\n\ntype Ctx = {\n registry: ComponentRegistry<TtyComponent>;\n canvas: string;\n origin?: string;\n api: TtyRenderApi;\n out: TtyInteractive[];\n fallback?: TtyComponent;\n};\n\nconst errorBlock = (code: string, message: string): TtyBlock => ({ lines: [`!! ${code}: ${message}`] });\n\nconst labelOf = (block: TtyBlock, ref: string): string => {\n const first = block.lines[0]?.trim() ?? '';\n return first === '' ? ref : first.slice(0, 48);\n};\n\nconst canvasRule = (id: string): string => {\n const head = `── ${id} `;\n return head + '─'.repeat(Math.max(0, RULE_WIDTH - head.length));\n};\n\nconst renderNode = (node: RenderNode, ctx: Ctx): TtyBlock => {\n if (node.type === 'text') return { lines: node.value.split('\\n') };\n if (node.type === 'fragment') return { lines: node.children.flatMap((child) => renderNode(child, ctx).lines) };\n if (node.type === 'error') return errorBlock(node.code, node.message);\n\n if (isHeadNode(node)) return { lines: [] };\n if (node.name === CANVAS_SLOT) {\n const canvasId = typeof node.props['canvasId'] === 'string' ? (node.props['canvasId'] as string) : '';\n if (canvasId === '') return { lines: [] };\n const tree = ctx.api.canvasTree(canvasId);\n if (tree.length === 0) return { lines: [] };\n // A canvas starts outside any instance, even when an instance's layout placed it.\n const { origin: _outer, ...outside } = ctx;\n const canvasCtx: Ctx = { ...outside, canvas: canvasId };\n return { lines: [canvasRule(canvasId), ...tree.flatMap((child) => renderNode(child, canvasCtx).lines), ''] };\n }\n\n const entry = ctx.registry.get(node.name);\n const build = entry !== undefined ? entry.component : ctx.fallback;\n if (build === undefined) return errorBlock('COMPONENT_NOT_FOUND', node.name);\n\n const instanceId = node.name === ACTION_SLOT ? node.props['instanceId'] : undefined;\n const inner: Ctx = typeof instanceId === 'string' && instanceId !== '' ? { ...ctx, origin: instanceId } : ctx;\n const children = node.children.filter((child) => !isHeadNode(child)).map((child) => renderNode(child, inner));\n const register: TtyComponentContext['register'] = (item) => {\n const interactive: TtyInteractive = { index: ctx.out.length + 1, canvas: ctx.canvas, ...(ctx.origin !== undefined ? { origin: ctx.origin } : {}), ...item };\n ctx.out.push(interactive);\n return interactive.index;\n };\n const block = build({ props: node.props, children, register });\n\n if (node.model !== undefined) {\n const current = node.props['value'] ?? node.props['checked'];\n const kind: TtyInteractiveKind = typeof current === 'boolean' ? 'toggle' : 'model';\n const index = register({ kind, ref: node.model.ref, label: labelOf(block, node.model.ref), value: current, path: node.model.path });\n return { lines: [`[${index}] ${block.lines[0] ?? ''}`, ...block.lines.slice(1)] };\n }\n if (node.ref !== undefined) {\n const value = node.props['value'];\n const index = register({ kind: 'click', ref: node.ref, label: labelOf(block, node.ref), ...(value !== undefined ? { value } : {}) });\n return { lines: [`[${index}] ${block.lines[0] ?? ''}`, ...block.lines.slice(1)] };\n }\n return block;\n};\n\nconst tidy = (lines: string[]): string[] => {\n const out: string[] = [];\n for (const line of lines) {\n if (line.trim() === '' && out[out.length - 1]?.trim() === '') continue;\n out.push(line);\n }\n while (out[0]?.trim() === '') out.shift();\n while (out[out.length - 1]?.trim() === '') out.pop();\n return out;\n};\n\nexport const createTtyView = (\n registry: ComponentRegistry<TtyComponent>,\n api: TtyRenderApi,\n options: { fallback?: TtyComponent } = {},\n): TtyView => {\n const render = (): TtyFrame => {\n const out: TtyInteractive[] = [];\n const ctx: Ctx = { registry, canvas: '', api, out, ...(options.fallback !== undefined ? { fallback: options.fallback } : {}) };\n const lines = api.frame().flatMap((node) => renderNode(node, ctx).lines);\n return { text: tidy(lines).join('\\n'), interactives: out };\n };\n return { render };\n};\n"]}
@@ -1,97 +1,97 @@
1
1
  'use strict';
2
2
 
3
- var chunkZYTWQZZC_cjs = require('../../../chunk-ZYTWQZZC.cjs');
4
- var chunkHYFNOF7Y_cjs = require('../../../chunk-HYFNOF7Y.cjs');
5
- require('../../../chunk-WGZZKCJQ.cjs');
6
- require('../../../chunk-ECFWPZGL.cjs');
7
- 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
+ var chunkEZ3AJRQ7_cjs = require('../../../chunk-EZ3AJRQ7.cjs');
5
+ require('../../../chunk-QHX3VA55.cjs');
6
+ require('../../../chunk-X77B4ZKQ.cjs');
7
+ 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
 
18
18
 
19
19
 
20
20
  Object.defineProperty(exports, "ActionSlot", {
21
21
  enumerable: true,
22
- get: function () { return chunkZYTWQZZC_cjs.ActionSlot; }
22
+ get: function () { return chunkFG6IKUHA_cjs.ActionSlot; }
23
23
  });
24
24
  Object.defineProperty(exports, "Box", {
25
25
  enumerable: true,
26
- get: function () { return chunkZYTWQZZC_cjs.Box; }
26
+ get: function () { return chunkFG6IKUHA_cjs.Box; }
27
27
  });
28
28
  Object.defineProperty(exports, "Button", {
29
29
  enumerable: true,
30
- get: function () { return chunkZYTWQZZC_cjs.Button; }
30
+ get: function () { return chunkFG6IKUHA_cjs.Button; }
31
31
  });
32
32
  Object.defineProperty(exports, "CanvasSlot", {
33
33
  enumerable: true,
34
- get: function () { return chunkZYTWQZZC_cjs.CanvasSlot; }
34
+ get: function () { return chunkFG6IKUHA_cjs.CanvasSlot; }
35
35
  });
36
36
  Object.defineProperty(exports, "Input", {
37
37
  enumerable: true,
38
- get: function () { return chunkZYTWQZZC_cjs.Input; }
38
+ get: function () { return chunkFG6IKUHA_cjs.Input; }
39
39
  });
40
40
  Object.defineProperty(exports, "JsonTree", {
41
41
  enumerable: true,
42
- get: function () { return chunkZYTWQZZC_cjs.JsonTree; }
42
+ get: function () { return chunkFG6IKUHA_cjs.JsonTree; }
43
43
  });
44
44
  Object.defineProperty(exports, "Panel", {
45
45
  enumerable: true,
46
- get: function () { return chunkZYTWQZZC_cjs.Panel; }
46
+ get: function () { return chunkFG6IKUHA_cjs.Panel; }
47
47
  });
48
48
  Object.defineProperty(exports, "Stack", {
49
49
  enumerable: true,
50
- get: function () { return chunkZYTWQZZC_cjs.Stack; }
50
+ get: function () { return chunkFG6IKUHA_cjs.Stack; }
51
51
  });
52
52
  Object.defineProperty(exports, "Text", {
53
53
  enumerable: true,
54
- get: function () { return chunkZYTWQZZC_cjs.Text; }
54
+ get: function () { return chunkFG6IKUHA_cjs.Text; }
55
55
  });
56
56
  Object.defineProperty(exports, "registerNovaVueComponents", {
57
57
  enumerable: true,
58
- get: function () { return chunkZYTWQZZC_cjs.registerNovaVueComponents; }
58
+ get: function () { return chunkFG6IKUHA_cjs.registerNovaVueComponents; }
59
59
  });
60
60
  Object.defineProperty(exports, "ActionSlotPropsSchema", {
61
61
  enumerable: true,
62
- get: function () { return chunkHYFNOF7Y_cjs.ActionSlotPropsSchema; }
62
+ get: function () { return chunkEZ3AJRQ7_cjs.ActionSlotPropsSchema; }
63
63
  });
64
64
  Object.defineProperty(exports, "BoxPropsSchema", {
65
65
  enumerable: true,
66
- get: function () { return chunkHYFNOF7Y_cjs.BoxPropsSchema; }
66
+ get: function () { return chunkEZ3AJRQ7_cjs.BoxPropsSchema; }
67
67
  });
68
68
  Object.defineProperty(exports, "ButtonPropsSchema", {
69
69
  enumerable: true,
70
- get: function () { return chunkHYFNOF7Y_cjs.ButtonPropsSchema; }
70
+ get: function () { return chunkEZ3AJRQ7_cjs.ButtonPropsSchema; }
71
71
  });
72
72
  Object.defineProperty(exports, "CanvasSlotPropsSchema", {
73
73
  enumerable: true,
74
- get: function () { return chunkHYFNOF7Y_cjs.CanvasSlotPropsSchema; }
74
+ get: function () { return chunkEZ3AJRQ7_cjs.CanvasSlotPropsSchema; }
75
75
  });
76
76
  Object.defineProperty(exports, "InputPropsSchema", {
77
77
  enumerable: true,
78
- get: function () { return chunkHYFNOF7Y_cjs.InputPropsSchema; }
78
+ get: function () { return chunkEZ3AJRQ7_cjs.InputPropsSchema; }
79
79
  });
80
80
  Object.defineProperty(exports, "JsonTreePropsSchema", {
81
81
  enumerable: true,
82
- get: function () { return chunkHYFNOF7Y_cjs.JsonTreePropsSchema; }
82
+ get: function () { return chunkEZ3AJRQ7_cjs.JsonTreePropsSchema; }
83
83
  });
84
84
  Object.defineProperty(exports, "PanelPropsSchema", {
85
85
  enumerable: true,
86
- get: function () { return chunkHYFNOF7Y_cjs.PanelPropsSchema; }
86
+ get: function () { return chunkEZ3AJRQ7_cjs.PanelPropsSchema; }
87
87
  });
88
88
  Object.defineProperty(exports, "StackPropsSchema", {
89
89
  enumerable: true,
90
- get: function () { return chunkHYFNOF7Y_cjs.StackPropsSchema; }
90
+ get: function () { return chunkEZ3AJRQ7_cjs.StackPropsSchema; }
91
91
  });
92
92
  Object.defineProperty(exports, "TextPropsSchema", {
93
93
  enumerable: true,
94
- get: function () { return chunkHYFNOF7Y_cjs.TextPropsSchema; }
94
+ get: function () { return chunkEZ3AJRQ7_cjs.TextPropsSchema; }
95
95
  });
96
96
  //# sourceMappingURL=index.cjs.map
97
97
  //# sourceMappingURL=index.cjs.map
@@ -1,24 +1,24 @@
1
- import { C as ComponentRegistry } from '../../../types-j290XhCn.cjs';
1
+ import { C as ComponentRegistry } from '../../../types-CR56luN7.cjs';
2
2
  import * as zod_v4_core from 'zod/v4/core';
3
3
  import * as zod from 'zod';
4
4
  import * as vue from 'vue';
5
- import { c as NovaComponentProps } from '../../../types-C9734_lJ.cjs';
6
- export { A as ActionSlotProps, b as ActionSlotPropsSchema, a as BoxProps, c as BoxPropsSchema, B as ButtonProps, d as ButtonPropsSchema, C as CanvasSlotProps, e as CanvasSlotPropsSchema, I as InputProps, f as InputPropsSchema, J as JsonTreeProps, g as JsonTreePropsSchema, P as PanelProps, h as PanelPropsSchema, S as StackProps, i as StackPropsSchema, T as TextProps, j as TextPropsSchema } from '../../../primitive-props-CGoJvmcH.cjs';
5
+ import { c as NovaComponentProps } from '../../../types-DzB3TAQj.cjs';
6
+ export { A as ActionSlotProps, b as ActionSlotPropsSchema, a as BoxProps, c as BoxPropsSchema, B as ButtonProps, d as ButtonPropsSchema, C as CanvasSlotProps, e as CanvasSlotPropsSchema, I as InputProps, f as InputPropsSchema, J as JsonTreeProps, g as JsonTreePropsSchema, P as PanelProps, h as PanelPropsSchema, S as StackProps, i as StackPropsSchema, T as TextProps, j as TextPropsSchema } from '../../../primitive-props-Cl5jiC8g.cjs';
7
7
  import '../../../schemas-DPdeFlCT.cjs';
8
8
  import '../../../schemas-pMyyuXV7.cjs';
9
9
 
10
10
  declare const Stack: vue.DefineSetupFnComponent<{
11
11
  direction?: "row" | "column" | undefined;
12
12
  gap?: number | undefined;
13
- align?: "center" | "start" | "end" | "stretch" | undefined;
14
- justify?: "center" | "start" | "end" | "between" | "around" | undefined;
13
+ align?: "start" | "center" | "end" | "stretch" | undefined;
14
+ justify?: "start" | "center" | "end" | "between" | "around" | undefined;
15
15
  padding?: number | undefined;
16
16
  wrap?: boolean | undefined;
17
17
  }, {}, {}, {
18
18
  direction?: "row" | "column" | undefined;
19
19
  gap?: number | undefined;
20
- align?: "center" | "start" | "end" | "stretch" | undefined;
21
- justify?: "center" | "start" | "end" | "between" | "around" | undefined;
20
+ align?: "start" | "center" | "end" | "stretch" | undefined;
21
+ justify?: "start" | "center" | "end" | "between" | "around" | undefined;
22
22
  padding?: number | undefined;
23
23
  wrap?: boolean | undefined;
24
24
  } & {}, vue.PublicProps> & {
@@ -31,14 +31,14 @@ declare const Stack: vue.DefineSetupFnComponent<{
31
31
  }>>;
32
32
  gap: zod.ZodOptional<zod.ZodNumber>;
33
33
  align: zod.ZodOptional<zod.ZodEnum<{
34
- center: "center";
35
34
  start: "start";
35
+ center: "center";
36
36
  end: "end";
37
37
  stretch: "stretch";
38
38
  }>>;
39
39
  justify: zod.ZodOptional<zod.ZodEnum<{
40
- center: "center";
41
40
  start: "start";
41
+ center: "center";
42
42
  end: "end";
43
43
  between: "between";
44
44
  around: "around";
@@ -72,12 +72,12 @@ declare const Box: vue.DefineSetupFnComponent<{
72
72
  declare const Text: vue.DefineSetupFnComponent<{
73
73
  as?: "h1" | "h2" | "h3" | "h4" | "p" | "span" | undefined;
74
74
  size?: "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
75
- weight?: "bold" | "normal" | "medium" | undefined;
75
+ weight?: "normal" | "medium" | "bold" | undefined;
76
76
  color?: string | undefined;
77
77
  }, {}, {}, {
78
78
  as?: "h1" | "h2" | "h3" | "h4" | "p" | "span" | undefined;
79
79
  size?: "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
80
- weight?: "bold" | "normal" | "medium" | undefined;
80
+ weight?: "normal" | "medium" | "bold" | undefined;
81
81
  color?: string | undefined;
82
82
  } & {}, vue.PublicProps> & {
83
83
  meta: {
@@ -99,9 +99,9 @@ declare const Text: vue.DefineSetupFnComponent<{
99
99
  "2xl": "2xl";
100
100
  }>>;
101
101
  weight: zod.ZodOptional<zod.ZodEnum<{
102
- bold: "bold";
103
102
  normal: "normal";
104
103
  medium: "medium";
104
+ bold: "bold";
105
105
  }>>;
106
106
  color: zod.ZodOptional<zod.ZodString>;
107
107
  }, zod_v4_core.$strict>;
@@ -1,24 +1,24 @@
1
- import { C as ComponentRegistry } from '../../../types-qnKMx0_V.js';
1
+ import { C as ComponentRegistry } from '../../../types-CJC8mnzl.js';
2
2
  import * as zod_v4_core from 'zod/v4/core';
3
3
  import * as zod from 'zod';
4
4
  import * as vue from 'vue';
5
- import { c as NovaComponentProps } from '../../../types-BWc-olbY.js';
6
- export { A as ActionSlotProps, b as ActionSlotPropsSchema, a as BoxProps, c as BoxPropsSchema, B as ButtonProps, d as ButtonPropsSchema, C as CanvasSlotProps, e as CanvasSlotPropsSchema, I as InputProps, f as InputPropsSchema, J as JsonTreeProps, g as JsonTreePropsSchema, P as PanelProps, h as PanelPropsSchema, S as StackProps, i as StackPropsSchema, T as TextProps, j as TextPropsSchema } from '../../../primitive-props-CGoJvmcH.js';
5
+ import { c as NovaComponentProps } from '../../../types-LXw2RJfH.js';
6
+ export { A as ActionSlotProps, b as ActionSlotPropsSchema, a as BoxProps, c as BoxPropsSchema, B as ButtonProps, d as ButtonPropsSchema, C as CanvasSlotProps, e as CanvasSlotPropsSchema, I as InputProps, f as InputPropsSchema, J as JsonTreeProps, g as JsonTreePropsSchema, P as PanelProps, h as PanelPropsSchema, S as StackProps, i as StackPropsSchema, T as TextProps, j as TextPropsSchema } from '../../../primitive-props-Cl5jiC8g.js';
7
7
  import '../../../schemas-DPdeFlCT.js';
8
8
  import '../../../schemas-pMyyuXV7.js';
9
9
 
10
10
  declare const Stack: vue.DefineSetupFnComponent<{
11
11
  direction?: "row" | "column" | undefined;
12
12
  gap?: number | undefined;
13
- align?: "center" | "start" | "end" | "stretch" | undefined;
14
- justify?: "center" | "start" | "end" | "between" | "around" | undefined;
13
+ align?: "start" | "center" | "end" | "stretch" | undefined;
14
+ justify?: "start" | "center" | "end" | "between" | "around" | undefined;
15
15
  padding?: number | undefined;
16
16
  wrap?: boolean | undefined;
17
17
  }, {}, {}, {
18
18
  direction?: "row" | "column" | undefined;
19
19
  gap?: number | undefined;
20
- align?: "center" | "start" | "end" | "stretch" | undefined;
21
- justify?: "center" | "start" | "end" | "between" | "around" | undefined;
20
+ align?: "start" | "center" | "end" | "stretch" | undefined;
21
+ justify?: "start" | "center" | "end" | "between" | "around" | undefined;
22
22
  padding?: number | undefined;
23
23
  wrap?: boolean | undefined;
24
24
  } & {}, vue.PublicProps> & {
@@ -31,14 +31,14 @@ declare const Stack: vue.DefineSetupFnComponent<{
31
31
  }>>;
32
32
  gap: zod.ZodOptional<zod.ZodNumber>;
33
33
  align: zod.ZodOptional<zod.ZodEnum<{
34
- center: "center";
35
34
  start: "start";
35
+ center: "center";
36
36
  end: "end";
37
37
  stretch: "stretch";
38
38
  }>>;
39
39
  justify: zod.ZodOptional<zod.ZodEnum<{
40
- center: "center";
41
40
  start: "start";
41
+ center: "center";
42
42
  end: "end";
43
43
  between: "between";
44
44
  around: "around";
@@ -72,12 +72,12 @@ declare const Box: vue.DefineSetupFnComponent<{
72
72
  declare const Text: vue.DefineSetupFnComponent<{
73
73
  as?: "h1" | "h2" | "h3" | "h4" | "p" | "span" | undefined;
74
74
  size?: "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
75
- weight?: "bold" | "normal" | "medium" | undefined;
75
+ weight?: "normal" | "medium" | "bold" | undefined;
76
76
  color?: string | undefined;
77
77
  }, {}, {}, {
78
78
  as?: "h1" | "h2" | "h3" | "h4" | "p" | "span" | undefined;
79
79
  size?: "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
80
- weight?: "bold" | "normal" | "medium" | undefined;
80
+ weight?: "normal" | "medium" | "bold" | undefined;
81
81
  color?: string | undefined;
82
82
  } & {}, vue.PublicProps> & {
83
83
  meta: {
@@ -99,9 +99,9 @@ declare const Text: vue.DefineSetupFnComponent<{
99
99
  "2xl": "2xl";
100
100
  }>>;
101
101
  weight: zod.ZodOptional<zod.ZodEnum<{
102
- bold: "bold";
103
102
  normal: "normal";
104
103
  medium: "medium";
104
+ bold: "bold";
105
105
  }>>;
106
106
  color: zod.ZodOptional<zod.ZodString>;
107
107
  }, zod_v4_core.$strict>;
@@ -1,16 +1,16 @@
1
- export { ActionSlot, Box, Button, CanvasSlot, Input, JsonTree, Panel, Stack, Text, registerNovaVueComponents } from '../../../chunk-7MATRNZZ.js';
2
- export { ActionSlotPropsSchema, BoxPropsSchema, ButtonPropsSchema, CanvasSlotPropsSchema, InputPropsSchema, JsonTreePropsSchema, PanelPropsSchema, StackPropsSchema, TextPropsSchema } from '../../../chunk-EG45GQOE.js';
3
- import '../../../chunk-V4BPFFFV.js';
4
- import '../../../chunk-P5SJ3QXJ.js';
5
- import '../../../chunk-RFBIGRCI.js';
6
- import '../../../chunk-XUSKGJRI.js';
7
- import '../../../chunk-OGD5CCMZ.js';
8
- import '../../../chunk-7TS3YVQR.js';
9
- import '../../../chunk-OE4E6IBD.js';
10
- import '../../../chunk-DIFE573X.js';
11
- import '../../../chunk-JI7ZRESP.js';
12
- import '../../../chunk-RBU5PHN4.js';
13
- import '../../../chunk-2MNLEL45.js';
1
+ export { ActionSlot, Box, Button, CanvasSlot, Input, JsonTree, Panel, Stack, Text, registerNovaVueComponents } from '../../../chunk-2SEZAI3I.js';
2
+ export { ActionSlotPropsSchema, BoxPropsSchema, ButtonPropsSchema, CanvasSlotPropsSchema, InputPropsSchema, JsonTreePropsSchema, PanelPropsSchema, StackPropsSchema, TextPropsSchema } from '../../../chunk-O2N4BVLL.js';
3
+ import '../../../chunk-SCXYAXMO.js';
4
+ import '../../../chunk-3YS2FBF5.js';
5
+ import '../../../chunk-C63CBYD5.js';
6
+ import '../../../chunk-YV2G37TJ.js';
7
+ import '../../../chunk-ZZRQAH5Z.js';
8
+ import '../../../chunk-M2ZZUSH3.js';
9
+ import '../../../chunk-Y3UKAJJX.js';
10
+ import '../../../chunk-G4OQ4PEO.js';
11
+ import '../../../chunk-JKULAG53.js';
12
+ import '../../../chunk-GQVJ5UAS.js';
13
+ import '../../../chunk-SVWDKXSH.js';
14
14
  import '../../../chunk-PZ5AY32C.js';
15
15
  //# sourceMappingURL=index.js.map
16
16
  //# sourceMappingURL=index.js.map