@jucie.io/cli 1.0.5 → 1.0.6

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 (1148) hide show
  1. package/dist/jucie.js +211 -207
  2. package/dist/stage/chunks/addAttribute-ZPJGNPHK.js +1 -0
  3. package/dist/stage/chunks/addNode-IWTESHU3.js +1 -0
  4. package/dist/stage/chunks/aiAttachmentContracts-4GX7AD4P.js +1 -0
  5. package/dist/stage/chunks/aiMessagesContracts-3IZEU24J.js +1 -0
  6. package/dist/stage/chunks/aiRelay-FDHMGC33.js +1 -0
  7. package/dist/stage/chunks/aiSessionContracts-SCDHZZA3.js +1 -0
  8. package/dist/stage/chunks/assets-RXVS3AKR.js +1 -0
  9. package/dist/stage/chunks/capture-XQFI2T7B.js +1 -0
  10. package/dist/stage/chunks/chunk-33W74KNB.js +37 -0
  11. package/dist/stage/chunks/chunk-55KIFGBN.js +1 -0
  12. package/dist/stage/chunks/chunk-G37FCH35.js +1 -0
  13. package/dist/stage/chunks/chunk-GURTWV7H.js +1 -0
  14. package/dist/stage/chunks/chunk-IERYKQMJ.js +1 -0
  15. package/dist/stage/chunks/chunk-IEXI4PPB.js +1 -0
  16. package/dist/stage/chunks/chunk-LOMYBRPE.js +1 -0
  17. package/dist/stage/chunks/chunk-NYG3CJEJ.js +1 -0
  18. package/dist/stage/chunks/chunk-OB6WEYNB.js +1 -0
  19. package/dist/stage/chunks/chunk-PUPSHZWC.js +1 -0
  20. package/dist/stage/chunks/chunk-TAMEB64F.js +1 -0
  21. package/dist/stage/chunks/chunk-TIIQLNVN.js +1 -0
  22. package/dist/stage/chunks/chunk-VQ7C6EUZ.js +1 -0
  23. package/dist/stage/chunks/chunk-YZBMJY7E.js +1 -0
  24. package/dist/stage/chunks/clearName-EUYRSZED.js +1 -0
  25. package/dist/stage/chunks/clearRender-IUKXUT2E.js +1 -0
  26. package/dist/stage/chunks/clearRepeat-HR5C5VWU.js +1 -0
  27. package/dist/stage/chunks/design-SPZTUDPC.js +15 -0
  28. package/dist/stage/chunks/dev-24ZWZ22W.js +1 -0
  29. package/dist/stage/chunks/history-BNHS2T3X.js +1 -0
  30. package/dist/stage/chunks/main-DDWQFH23.js +1 -0
  31. package/dist/stage/chunks/main-NTDWDKF7.js +1 -0
  32. package/dist/stage/chunks/main-TUNP7F4N.js +1 -0
  33. package/dist/stage/chunks/moveNodeToLastChildOf-PRI4OYRB.js +1 -0
  34. package/dist/stage/chunks/nodeGraph-ZXVLUHBH.js +1 -0
  35. package/dist/stage/chunks/normalizeLayoutContext-OIXYBNTH.js +1 -0
  36. package/dist/stage/chunks/preview-EIG4E5G5.js +1 -0
  37. package/dist/stage/chunks/removeToken-6K5JDRMK.js +1 -0
  38. package/dist/stage/chunks/setNodeLayout-O53CNHES.js +1 -0
  39. package/dist/stage/chunks/updateAttribute-5MWAVQAV.js +1 -0
  40. package/dist/stage/chunks/user-LKHAFHX4.js +1 -0
  41. package/dist/stage/chunks/window-RFC7WGLM.js +1 -0
  42. package/dist/stage/design.js +1 -1
  43. package/dist/stage/dev.js +1 -1
  44. package/dist/stage/preview.js +1 -1
  45. package/dist/stage/prod.js +1 -1
  46. package/dist/stage-bundles/preact/chunks/addAction-EGLGEGTS.js +1 -0
  47. package/dist/stage-bundles/preact/chunks/addAnimationBinding-WCB5VZLU.js +1 -0
  48. package/dist/stage-bundles/preact/chunks/addAttribute-2MZ3OFUE.js +1 -0
  49. package/dist/stage-bundles/preact/chunks/addComponent-Y2AQ2FGZ.js +1 -0
  50. package/dist/stage-bundles/preact/chunks/addComputed-7JLBFD6I.js +1 -0
  51. package/dist/stage-bundles/preact/chunks/addEvent-HOBNKM2F.js +1 -0
  52. package/dist/stage-bundles/preact/chunks/addLifecycleHook-GHYL7FRH.js +1 -0
  53. package/dist/stage-bundles/preact/chunks/addNode-2E5QNYOA.js +1 -0
  54. package/dist/stage-bundles/preact/chunks/addOption-PVXGN7AJ.js +1 -0
  55. package/dist/stage-bundles/preact/chunks/addParamToRoute-VL2VOFZS.js +1 -0
  56. package/dist/stage-bundles/preact/chunks/addState-U2NWEGWV.js +1 -0
  57. package/dist/stage-bundles/preact/chunks/addStore-AQMFKH33.js +1 -0
  58. package/dist/stage-bundles/preact/chunks/addToken-XF2FFA52.js +1 -0
  59. package/dist/stage-bundles/preact/chunks/addValue-O7YXXMST.js +1 -0
  60. package/dist/stage-bundles/preact/chunks/aiAttachmentContracts-V3EW4BHI.js +1 -0
  61. package/dist/stage-bundles/preact/chunks/aiMessagesContracts-ZGHZJ7EU.js +1 -0
  62. package/dist/stage-bundles/preact/chunks/aiRelay-WDZAC42R.js +1 -0
  63. package/dist/stage-bundles/preact/chunks/aiSessionContracts-WAMOGHSG.js +1 -0
  64. package/dist/stage-bundles/preact/chunks/assets-NU56BTDG.js +1 -0
  65. package/dist/stage-bundles/preact/chunks/capture-XBPXL4U7.js +1 -0
  66. package/dist/stage-bundles/preact/chunks/chunk-2BGFXNGU.js +1 -0
  67. package/dist/stage-bundles/preact/chunks/chunk-34CHXN5I.js +1 -0
  68. package/dist/stage-bundles/preact/chunks/chunk-5CWWFBNY.js +1 -0
  69. package/dist/stage-bundles/preact/chunks/chunk-5GKIM3R4.js +1 -0
  70. package/dist/stage-bundles/preact/chunks/chunk-67H474GN.js +1 -0
  71. package/dist/stage-bundles/preact/chunks/chunk-6KW4HPGN.js +1 -0
  72. package/dist/stage-bundles/preact/chunks/chunk-6S7QQT47.js +1 -0
  73. package/dist/stage-bundles/preact/chunks/chunk-7UENQJSC.js +5 -0
  74. package/dist/stage-bundles/preact/chunks/chunk-7VDUBBVE.js +1 -0
  75. package/dist/stage-bundles/preact/chunks/chunk-A25WFH3U.js +1 -0
  76. package/dist/stage-bundles/preact/chunks/chunk-A52FDU5E.js +1 -0
  77. package/dist/stage-bundles/preact/chunks/chunk-ACPGC7BJ.js +1 -0
  78. package/dist/stage-bundles/preact/chunks/chunk-AMPHYXGT.js +1 -0
  79. package/dist/stage-bundles/preact/chunks/chunk-AS76ZLXK.js +1 -0
  80. package/dist/stage-bundles/preact/chunks/chunk-AYZAGKHN.js +1 -0
  81. package/dist/stage-bundles/preact/chunks/chunk-BL6GQ6ID.js +1 -0
  82. package/dist/stage-bundles/preact/chunks/chunk-BWJHUHDJ.js +1 -0
  83. package/dist/stage-bundles/preact/chunks/chunk-CAAW6MG4.js +1 -0
  84. package/dist/stage-bundles/preact/chunks/chunk-CC3CCH2E.js +1 -0
  85. package/dist/stage-bundles/preact/chunks/chunk-CNZYL2VV.js +1 -0
  86. package/dist/stage-bundles/preact/chunks/chunk-CXJ5APZF.js +1 -0
  87. package/dist/stage-bundles/preact/chunks/chunk-CYURWEXX.js +1 -0
  88. package/dist/stage-bundles/preact/chunks/chunk-DHPGPV5T.js +1 -0
  89. package/dist/stage-bundles/preact/chunks/chunk-DLHF7QB4.js +1 -0
  90. package/dist/stage-bundles/preact/chunks/chunk-E4RDZ324.js +1 -0
  91. package/dist/stage-bundles/preact/chunks/chunk-E6KR5RXO.js +1 -0
  92. package/dist/stage-bundles/preact/chunks/chunk-EPVRMHC2.js +1 -0
  93. package/dist/stage-bundles/preact/chunks/chunk-EWEPEODY.js +1 -0
  94. package/dist/stage-bundles/preact/chunks/chunk-EXXAK3BP.js +1 -0
  95. package/dist/stage-bundles/preact/chunks/chunk-F5MJNV7Y.js +3 -0
  96. package/dist/stage-bundles/preact/chunks/chunk-FAYUYASQ.js +1 -0
  97. package/dist/stage-bundles/preact/chunks/chunk-FCRFPWU3.js +97 -0
  98. package/dist/stage-bundles/preact/chunks/chunk-GEOQWCYL.js +1 -0
  99. package/dist/stage-bundles/preact/chunks/chunk-GK5XUHQG.js +1 -0
  100. package/dist/stage-bundles/preact/chunks/chunk-GM4D3DPT.js +1 -0
  101. package/dist/stage-bundles/preact/chunks/chunk-GUI7FIZD.js +1 -0
  102. package/dist/stage-bundles/preact/chunks/chunk-HAN4CMBX.js +1 -0
  103. package/dist/stage-bundles/preact/chunks/chunk-HCRWHPFW.js +1 -0
  104. package/dist/stage-bundles/preact/chunks/chunk-HE7IQLGK.js +1 -0
  105. package/dist/stage-bundles/preact/chunks/chunk-I57W7UZN.js +1 -0
  106. package/dist/stage-bundles/preact/chunks/chunk-IBDKDP7T.js +1 -0
  107. package/dist/stage-bundles/preact/chunks/chunk-ICWQHFOI.js +1 -0
  108. package/dist/stage-bundles/preact/chunks/chunk-IKKRB6BS.js +1 -0
  109. package/dist/stage-bundles/preact/chunks/chunk-IV6PINVX.js +1 -0
  110. package/dist/stage-bundles/preact/chunks/chunk-IW4KEJOF.js +1 -0
  111. package/dist/stage-bundles/preact/chunks/chunk-J5QMLA3Z.js +1 -0
  112. package/dist/stage-bundles/preact/chunks/chunk-JHWED3SX.js +1 -0
  113. package/dist/stage-bundles/preact/chunks/chunk-JRXMDYLE.js +1 -0
  114. package/dist/stage-bundles/preact/chunks/chunk-K5BNCYT7.js +1 -0
  115. package/dist/stage-bundles/preact/chunks/chunk-KISNK4R4.js +1 -0
  116. package/dist/stage-bundles/preact/chunks/chunk-KTWXYDG7.js +1 -0
  117. package/dist/stage-bundles/preact/chunks/chunk-LEELNBJC.js +1 -0
  118. package/dist/stage-bundles/preact/chunks/chunk-LHK7LQPZ.js +1 -0
  119. package/dist/stage-bundles/preact/chunks/chunk-LHON3DKO.js +1 -0
  120. package/dist/stage-bundles/preact/chunks/chunk-LUY5LC7Z.js +1 -0
  121. package/dist/stage-bundles/preact/chunks/chunk-MGH62JQ4.js +1 -0
  122. package/dist/stage-bundles/preact/chunks/chunk-MUZZUB5Y.js +1 -0
  123. package/dist/stage-bundles/preact/chunks/chunk-N6I4COF2.js +1 -0
  124. package/dist/stage-bundles/preact/chunks/chunk-NHY2XYCH.js +1 -0
  125. package/dist/stage-bundles/preact/chunks/chunk-NOTXZB5N.js +1 -0
  126. package/dist/stage-bundles/preact/chunks/chunk-NRRFAMFA.js +1 -0
  127. package/dist/stage-bundles/preact/chunks/chunk-NXBFOI3Z.js +1 -0
  128. package/dist/stage-bundles/preact/chunks/chunk-O24ISLGT.js +1 -0
  129. package/dist/stage-bundles/preact/chunks/chunk-OQM5TMCK.js +1 -0
  130. package/dist/stage-bundles/preact/chunks/chunk-PPDOTRNT.js +1 -0
  131. package/dist/stage-bundles/preact/chunks/chunk-PU62K33G.js +1 -0
  132. package/dist/stage-bundles/preact/chunks/chunk-PYIGBTL4.js +6 -0
  133. package/dist/stage-bundles/preact/chunks/chunk-Q3IER3MW.js +1 -0
  134. package/dist/stage-bundles/preact/chunks/chunk-Q3ZV7EKU.js +1 -0
  135. package/dist/stage-bundles/preact/chunks/chunk-QD56IMFS.js +1 -0
  136. package/dist/stage-bundles/preact/chunks/chunk-QFFVADTJ.js +1 -0
  137. package/dist/stage-bundles/preact/chunks/chunk-QJ33JO3T.js +1 -0
  138. package/dist/stage-bundles/preact/chunks/chunk-QKFDVU2Q.js +1 -0
  139. package/dist/stage-bundles/preact/chunks/chunk-QVVBKZW6.js +1 -0
  140. package/dist/stage-bundles/preact/chunks/chunk-RFFN4NF4.js +1 -0
  141. package/dist/stage-bundles/preact/chunks/chunk-RYWOKFM7.js +1 -0
  142. package/dist/stage-bundles/preact/chunks/chunk-TPCJQIUG.js +1 -0
  143. package/dist/stage-bundles/preact/chunks/chunk-TX5TCU2H.js +1 -0
  144. package/dist/stage-bundles/preact/chunks/chunk-UCLSDDOL.js +1 -0
  145. package/dist/stage-bundles/preact/chunks/chunk-UQFZUWFP.js +1 -0
  146. package/dist/stage-bundles/preact/chunks/chunk-XE3A5HPY.js +1 -0
  147. package/dist/stage-bundles/preact/chunks/chunk-XFHQ45KR.js +1 -0
  148. package/dist/stage-bundles/preact/chunks/chunk-XTAXESM6.js +1 -0
  149. package/dist/stage-bundles/preact/chunks/chunk-YB7FA4Y3.js +1 -0
  150. package/dist/stage-bundles/preact/chunks/chunk-YCGY2NRE.js +1 -0
  151. package/dist/stage-bundles/preact/chunks/chunk-YCMBBPKT.js +1 -0
  152. package/dist/stage-bundles/preact/chunks/chunk-Z3M6DQKZ.js +1 -0
  153. package/dist/stage-bundles/preact/chunks/chunk-ZUPNPSUB.js +1 -0
  154. package/dist/stage-bundles/preact/chunks/clearDestination-IGKNL7FN.js +1 -0
  155. package/dist/stage-bundles/preact/chunks/clearName-HJ7ZTHBU.js +1 -0
  156. package/dist/stage-bundles/preact/chunks/clearOptionsExpression-NZQFL64E.js +1 -0
  157. package/dist/stage-bundles/preact/chunks/clearRender-NPVDTNFA.js +1 -0
  158. package/dist/stage-bundles/preact/chunks/clearRepeat-7YFYZODP.js +1 -0
  159. package/dist/stage-bundles/preact/chunks/contentEditor-6WQFOUKV.js +1 -0
  160. package/dist/stage-bundles/preact/chunks/createAction-73YUTK3T.js +1 -0
  161. package/dist/stage-bundles/preact/chunks/createAnimation-2WQSMYT5.js +1 -0
  162. package/dist/stage-bundles/preact/chunks/createComputed-DMX7CJA3.js +1 -0
  163. package/dist/stage-bundles/preact/chunks/createTextContent-4Z4YATBO.js +1 -0
  164. package/dist/stage-bundles/preact/chunks/createValue-DXQSLOBG.js +1 -0
  165. package/dist/stage-bundles/preact/chunks/design-QOLOMJCH.js +15 -0
  166. package/dist/stage-bundles/preact/chunks/disconnectNode-2CLWVIQP.js +1 -0
  167. package/dist/stage-bundles/preact/chunks/history-VAAFKC4E.js +1 -0
  168. package/dist/stage-bundles/preact/chunks/id-ZIAZZ5AS.js +1 -0
  169. package/dist/stage-bundles/preact/chunks/main-K2WJEG5C.js +1 -0
  170. package/dist/stage-bundles/preact/chunks/main-KFGWT6OT.js +1 -0
  171. package/dist/stage-bundles/preact/chunks/main-MVCLW2IY.js +1 -0
  172. package/dist/stage-bundles/preact/chunks/main-ZXFODV6O.js +1 -0
  173. package/dist/stage-bundles/preact/chunks/moveNodeToLastChildOf-OZ6F2NPU.js +1 -0
  174. package/dist/stage-bundles/preact/chunks/nodeGraph-JS64VAAQ.js +1 -0
  175. package/dist/stage-bundles/preact/chunks/normalizeEventName-SNBYJDUY.js +1 -0
  176. package/dist/stage-bundles/preact/chunks/normalizeLayoutContext-WRK6FVHM.js +1 -0
  177. package/dist/stage-bundles/preact/chunks/preact-NBJKI6EE.js +1 -0
  178. package/dist/stage-bundles/preact/chunks/preview-AFX7D63A.js +1 -0
  179. package/dist/stage-bundles/preact/chunks/removeAction-T4M5EJN7.js +1 -0
  180. package/dist/stage-bundles/preact/chunks/removeAnimationBinding-AIISPC33.js +1 -0
  181. package/dist/stage-bundles/preact/chunks/removeAttribute-DCKZLM55.js +1 -0
  182. package/dist/stage-bundles/preact/chunks/removeComputed-WSA5GNVZ.js +1 -0
  183. package/dist/stage-bundles/preact/chunks/removeEvent-2YZ55HD6.js +1 -0
  184. package/dist/stage-bundles/preact/chunks/removeLifecycleHook-SBPJNF5P.js +1 -0
  185. package/dist/stage-bundles/preact/chunks/removeNode-5HXQ63V3.js +1 -0
  186. package/dist/stage-bundles/preact/chunks/removeOption-SYIFB4XW.js +1 -0
  187. package/dist/stage-bundles/preact/chunks/removeParamFromRoute-HAYP3WTT.js +1 -0
  188. package/dist/stage-bundles/preact/chunks/removeState-SGJVQ66N.js +1 -0
  189. package/dist/stage-bundles/preact/chunks/removeStore-YVBTGA3I.js +1 -0
  190. package/dist/stage-bundles/preact/chunks/removeToken-AIDV7DUM.js +1 -0
  191. package/dist/stage-bundles/preact/chunks/removeValue-UP5ZFN3U.js +1 -0
  192. package/dist/stage-bundles/preact/chunks/setDestination-NCPAVIIK.js +1 -0
  193. package/dist/stage-bundles/preact/chunks/setHomePage-O2JYOG6H.js +1 -0
  194. package/dist/stage-bundles/preact/chunks/setHtmlId-2W7YW47O.js +1 -0
  195. package/dist/stage-bundles/preact/chunks/setName-NKRZPBGG.js +1 -0
  196. package/dist/stage-bundles/preact/chunks/setNodeLayout-QNVAVAMX.js +1 -0
  197. package/dist/stage-bundles/preact/chunks/setOptionsExpression-K5EQXJEY.js +1 -0
  198. package/dist/stage-bundles/preact/chunks/setRender-7XMGQ7ZK.js +1 -0
  199. package/dist/stage-bundles/preact/chunks/setRepeat-WN4WZJUN.js +1 -0
  200. package/dist/stage-bundles/preact/chunks/setTagName-U6UJNJLE.js +1 -0
  201. package/dist/stage-bundles/preact/chunks/updateAction-3KSR6ZIJ.js +1 -0
  202. package/dist/stage-bundles/preact/chunks/updateAnimationBinding-HVVHLFBO.js +1 -0
  203. package/dist/stage-bundles/preact/chunks/updateAttribute-XXZL2P43.js +1 -0
  204. package/dist/stage-bundles/preact/chunks/updateBounds-5M7YQRO3.js +1 -0
  205. package/dist/stage-bundles/preact/chunks/updateComputed-7QA6XZIC.js +1 -0
  206. package/dist/stage-bundles/preact/chunks/updateEvent-R52PL2G4.js +1 -0
  207. package/dist/stage-bundles/preact/chunks/updateHtml-YBJJSWQW.js +1 -0
  208. package/dist/stage-bundles/preact/chunks/updateLifecycleHook-4RA2U4TR.js +1 -0
  209. package/dist/stage-bundles/preact/chunks/updateOption-5U23ZUWV.js +1 -0
  210. package/dist/stage-bundles/preact/chunks/updateRoute-TFQFFFSZ.js +1 -0
  211. package/dist/stage-bundles/preact/chunks/updateState-JCUSBQOL.js +1 -0
  212. package/dist/stage-bundles/preact/chunks/updateStyle-JASLFXVX.js +1 -0
  213. package/dist/stage-bundles/preact/chunks/updateToken-24P2P2SF.js +1 -0
  214. package/dist/stage-bundles/preact/chunks/updateValue-TSVJM3PO.js +1 -0
  215. package/dist/stage-bundles/preact/chunks/user-FCPIGR7X.js +1 -0
  216. package/dist/stage-bundles/preact/chunks/validateStorePayload-HCBPC7HR.js +3 -0
  217. package/dist/stage-bundles/preact/chunks/viewport-LLBH2LJW.js +1 -0
  218. package/dist/stage-bundles/preact/chunks/window-TFWZNZUJ.js +1 -0
  219. package/dist/stage-bundles/preact/entry.js +1 -85
  220. package/dist/stage-bundles/preact/framework-compat.js +1 -103
  221. package/dist/stage-bundles/preact/framework-hooks.js +1 -35
  222. package/dist/stage-bundles/preact/framework-jsx-runtime.js +1 -102
  223. package/dist/stage-bundles/preact/framework.js +1 -33
  224. package/dist/stage-bundles/preact/sdk.js +1 -44
  225. package/dist/stage-bundles/react/chunks/addAction-BMIMOFKC.js +1 -0
  226. package/dist/stage-bundles/react/chunks/addAnimationBinding-7TFETALG.js +1 -0
  227. package/dist/stage-bundles/react/chunks/addAttribute-2WJG6MQQ.js +1 -0
  228. package/dist/stage-bundles/react/chunks/addComponent-P7BXPI75.js +1 -0
  229. package/dist/stage-bundles/react/chunks/addComputed-WNYOBBU3.js +1 -0
  230. package/dist/stage-bundles/react/chunks/addEvent-KKSUEWJZ.js +1 -0
  231. package/dist/stage-bundles/react/chunks/addLifecycleHook-KXJ6HEKQ.js +1 -0
  232. package/dist/stage-bundles/react/chunks/addNode-4MPFG7L5.js +1 -0
  233. package/dist/stage-bundles/react/chunks/addOption-6OBUAJDH.js +1 -0
  234. package/dist/stage-bundles/react/chunks/addParamToRoute-VX2GDCCP.js +1 -0
  235. package/dist/stage-bundles/react/chunks/addState-BH7Q5V6N.js +1 -0
  236. package/dist/stage-bundles/react/chunks/addStore-F3E5UJ5H.js +1 -0
  237. package/dist/stage-bundles/react/chunks/addToken-DFONVP3M.js +1 -0
  238. package/dist/stage-bundles/react/chunks/addValue-6SJ7KR7G.js +1 -0
  239. package/dist/stage-bundles/react/chunks/aiAttachmentContracts-IIM7E4TZ.js +1 -0
  240. package/dist/stage-bundles/react/chunks/aiMessagesContracts-LVR4HAGR.js +1 -0
  241. package/dist/stage-bundles/react/chunks/aiRelay-3CLWLKMV.js +1 -0
  242. package/dist/stage-bundles/react/chunks/aiSessionContracts-MWOX56DC.js +1 -0
  243. package/dist/stage-bundles/react/chunks/assets-UN6U4NZV.js +1 -0
  244. package/dist/stage-bundles/react/chunks/capture-5GIKSRCZ.js +1 -0
  245. package/dist/stage-bundles/react/chunks/chunk-2BGFXNGU.js +1 -0
  246. package/dist/stage-bundles/react/chunks/chunk-32U4X4HZ.js +6 -0
  247. package/dist/stage-bundles/react/chunks/chunk-34CHXN5I.js +1 -0
  248. package/dist/stage-bundles/react/chunks/chunk-5CWWFBNY.js +1 -0
  249. package/dist/stage-bundles/react/chunks/chunk-5GKIM3R4.js +1 -0
  250. package/dist/stage-bundles/react/chunks/chunk-5HITMZZP.js +33 -0
  251. package/dist/stage-bundles/react/chunks/chunk-5OEIZ3PD.js +1 -0
  252. package/dist/stage-bundles/react/chunks/chunk-6KW4HPGN.js +1 -0
  253. package/dist/stage-bundles/react/chunks/chunk-6S7QQT47.js +1 -0
  254. package/dist/stage-bundles/react/chunks/chunk-76SRFCJO.js +14 -0
  255. package/dist/stage-bundles/react/chunks/chunk-7UENQJSC.js +5 -0
  256. package/dist/stage-bundles/react/chunks/chunk-7VDUBBVE.js +1 -0
  257. package/dist/stage-bundles/react/chunks/chunk-A25WFH3U.js +1 -0
  258. package/dist/stage-bundles/react/chunks/chunk-A52FDU5E.js +1 -0
  259. package/dist/stage-bundles/react/chunks/chunk-ADVOIRI5.js +43 -0
  260. package/dist/stage-bundles/react/chunks/chunk-AMPHYXGT.js +1 -0
  261. package/dist/stage-bundles/react/chunks/chunk-AS76ZLXK.js +1 -0
  262. package/dist/stage-bundles/react/chunks/chunk-ATUQUJRM.js +1 -0
  263. package/dist/stage-bundles/react/chunks/chunk-AYZAGKHN.js +1 -0
  264. package/dist/stage-bundles/react/chunks/chunk-BL6GQ6ID.js +1 -0
  265. package/dist/stage-bundles/react/chunks/chunk-BWJHUHDJ.js +1 -0
  266. package/dist/stage-bundles/react/chunks/chunk-BXIWQYSY.js +1 -0
  267. package/dist/stage-bundles/react/chunks/chunk-CAAW6MG4.js +1 -0
  268. package/dist/stage-bundles/react/chunks/chunk-CC3CCH2E.js +1 -0
  269. package/dist/stage-bundles/react/chunks/chunk-CNZYL2VV.js +1 -0
  270. package/dist/stage-bundles/react/chunks/chunk-CXJ5APZF.js +1 -0
  271. package/dist/stage-bundles/react/chunks/chunk-CYURWEXX.js +1 -0
  272. package/dist/stage-bundles/react/chunks/chunk-DHPGPV5T.js +1 -0
  273. package/dist/stage-bundles/react/chunks/chunk-DLHF7QB4.js +1 -0
  274. package/dist/stage-bundles/react/chunks/chunk-E6KR5RXO.js +1 -0
  275. package/dist/stage-bundles/react/chunks/chunk-EPVRMHC2.js +1 -0
  276. package/dist/stage-bundles/react/chunks/chunk-EWEPEODY.js +1 -0
  277. package/dist/stage-bundles/react/chunks/chunk-EXXAK3BP.js +1 -0
  278. package/dist/stage-bundles/react/chunks/chunk-F5MJNV7Y.js +3 -0
  279. package/dist/stage-bundles/react/chunks/chunk-FAYUYASQ.js +1 -0
  280. package/dist/stage-bundles/react/chunks/chunk-FCMIFWSU.js +14 -0
  281. package/dist/stage-bundles/react/chunks/chunk-GEOQWCYL.js +1 -0
  282. package/dist/stage-bundles/react/chunks/chunk-GK5XUHQG.js +1 -0
  283. package/dist/stage-bundles/react/chunks/chunk-GM4D3DPT.js +1 -0
  284. package/dist/stage-bundles/react/chunks/chunk-GUI7FIZD.js +1 -0
  285. package/dist/stage-bundles/react/chunks/chunk-GYBL4LBC.js +1 -0
  286. package/dist/stage-bundles/react/chunks/chunk-HAN4CMBX.js +1 -0
  287. package/dist/stage-bundles/react/chunks/chunk-HCRWHPFW.js +1 -0
  288. package/dist/stage-bundles/react/chunks/chunk-HE7IQLGK.js +1 -0
  289. package/dist/stage-bundles/react/chunks/chunk-HLPDOSGP.js +1 -0
  290. package/dist/stage-bundles/react/chunks/chunk-I57W7UZN.js +1 -0
  291. package/dist/stage-bundles/react/chunks/chunk-IBDKDP7T.js +1 -0
  292. package/dist/stage-bundles/react/chunks/chunk-ICWQHFOI.js +1 -0
  293. package/dist/stage-bundles/react/chunks/chunk-IKKRB6BS.js +1 -0
  294. package/dist/stage-bundles/react/chunks/chunk-IV6PINVX.js +1 -0
  295. package/dist/stage-bundles/react/chunks/chunk-IW4KEJOF.js +1 -0
  296. package/dist/stage-bundles/react/chunks/chunk-J5QMLA3Z.js +1 -0
  297. package/dist/stage-bundles/react/chunks/chunk-K5BNCYT7.js +1 -0
  298. package/dist/stage-bundles/react/chunks/chunk-KISNK4R4.js +1 -0
  299. package/dist/stage-bundles/react/chunks/chunk-KTWXYDG7.js +1 -0
  300. package/dist/stage-bundles/react/chunks/chunk-LHK7LQPZ.js +1 -0
  301. package/dist/stage-bundles/react/chunks/chunk-LUY5LC7Z.js +1 -0
  302. package/dist/stage-bundles/react/chunks/chunk-MGH62JQ4.js +1 -0
  303. package/dist/stage-bundles/react/chunks/chunk-MUZZUB5Y.js +1 -0
  304. package/dist/stage-bundles/react/chunks/chunk-N6I4COF2.js +1 -0
  305. package/dist/stage-bundles/react/chunks/chunk-NDUX5RLD.js +1 -0
  306. package/dist/stage-bundles/react/chunks/chunk-NHY2XYCH.js +1 -0
  307. package/dist/stage-bundles/react/chunks/chunk-NOTXZB5N.js +1 -0
  308. package/dist/stage-bundles/react/chunks/chunk-NXBFOI3Z.js +1 -0
  309. package/dist/stage-bundles/react/chunks/chunk-OQM5TMCK.js +1 -0
  310. package/dist/stage-bundles/react/chunks/chunk-PPDOTRNT.js +1 -0
  311. package/dist/stage-bundles/react/chunks/chunk-PPHD3O2M.js +1 -0
  312. package/dist/stage-bundles/react/chunks/chunk-PSQ4TIJA.js +1 -0
  313. package/dist/stage-bundles/react/chunks/chunk-PU62K33G.js +1 -0
  314. package/dist/stage-bundles/react/chunks/chunk-Q3IER3MW.js +1 -0
  315. package/dist/stage-bundles/react/chunks/chunk-Q3ZV7EKU.js +1 -0
  316. package/dist/stage-bundles/react/chunks/chunk-QD56IMFS.js +1 -0
  317. package/dist/stage-bundles/react/chunks/chunk-QFFVADTJ.js +1 -0
  318. package/dist/stage-bundles/react/chunks/chunk-QJ33JO3T.js +1 -0
  319. package/dist/stage-bundles/react/chunks/chunk-QKFDVU2Q.js +1 -0
  320. package/dist/stage-bundles/react/chunks/chunk-QVVBKZW6.js +1 -0
  321. package/dist/stage-bundles/react/chunks/chunk-RFFN4NF4.js +1 -0
  322. package/dist/stage-bundles/react/chunks/chunk-TPCJQIUG.js +1 -0
  323. package/dist/stage-bundles/react/chunks/chunk-TX5TCU2H.js +1 -0
  324. package/dist/stage-bundles/react/chunks/chunk-UQFZUWFP.js +1 -0
  325. package/dist/stage-bundles/react/chunks/chunk-XE3A5HPY.js +1 -0
  326. package/dist/stage-bundles/react/chunks/chunk-XFHQ45KR.js +1 -0
  327. package/dist/stage-bundles/react/chunks/chunk-XTAXESM6.js +1 -0
  328. package/dist/stage-bundles/react/chunks/chunk-YB7FA4Y3.js +1 -0
  329. package/dist/stage-bundles/react/chunks/chunk-YCGY2NRE.js +1 -0
  330. package/dist/stage-bundles/react/chunks/chunk-YCMBBPKT.js +1 -0
  331. package/dist/stage-bundles/react/chunks/chunk-Z3M6DQKZ.js +1 -0
  332. package/dist/stage-bundles/react/chunks/chunk-ZUPNPSUB.js +1 -0
  333. package/dist/stage-bundles/react/chunks/clearDestination-ESJ4RTEB.js +1 -0
  334. package/dist/stage-bundles/react/chunks/clearName-XLFUSVVX.js +1 -0
  335. package/dist/stage-bundles/react/chunks/clearOptionsExpression-T5UZGD3M.js +1 -0
  336. package/dist/stage-bundles/react/chunks/clearRender-QOV6MKSA.js +1 -0
  337. package/dist/stage-bundles/react/chunks/clearRepeat-KGDHK6I5.js +1 -0
  338. package/dist/stage-bundles/react/chunks/contentEditor-VQUII3R3.js +1 -0
  339. package/dist/stage-bundles/react/chunks/createAction-ITB7SY4A.js +1 -0
  340. package/dist/stage-bundles/react/chunks/createAnimation-5GYHDNS4.js +1 -0
  341. package/dist/stage-bundles/react/chunks/createComputed-BMWO4U4T.js +1 -0
  342. package/dist/stage-bundles/react/chunks/createTextContent-ZVU57TXU.js +1 -0
  343. package/dist/stage-bundles/react/chunks/createValue-Q2VRKXEI.js +1 -0
  344. package/dist/stage-bundles/react/chunks/design-Z6J5JRDV.js +15 -0
  345. package/dist/stage-bundles/react/chunks/disconnectNode-PNUX55O2.js +1 -0
  346. package/dist/stage-bundles/react/chunks/history-7CH6VXP4.js +1 -0
  347. package/dist/stage-bundles/react/chunks/id-UUBDNSND.js +1 -0
  348. package/dist/stage-bundles/react/chunks/main-D4CUN7NH.js +1 -0
  349. package/dist/stage-bundles/react/chunks/main-OAJ3EVVU.js +1 -0
  350. package/dist/stage-bundles/react/chunks/main-WER4YJAR.js +1 -0
  351. package/dist/stage-bundles/react/chunks/main-XBZULJGK.js +1 -0
  352. package/dist/stage-bundles/react/chunks/moveNodeToLastChildOf-DQR5GURK.js +1 -0
  353. package/dist/stage-bundles/react/chunks/nodeGraph-2AX6JUZ4.js +1 -0
  354. package/dist/stage-bundles/react/chunks/normalizeEventName-3CSULWE4.js +1 -0
  355. package/dist/stage-bundles/react/chunks/normalizeLayoutContext-34DZRL3Q.js +1 -0
  356. package/dist/stage-bundles/react/chunks/preview-5V5GS6PZ.js +1 -0
  357. package/dist/stage-bundles/react/chunks/react-YDAQ4KLN.js +1 -0
  358. package/dist/stage-bundles/react/chunks/removeAction-7V4VV5SS.js +1 -0
  359. package/dist/stage-bundles/react/chunks/removeAnimationBinding-26LUMVXH.js +1 -0
  360. package/dist/stage-bundles/react/chunks/removeAttribute-AZK5TQQM.js +1 -0
  361. package/dist/stage-bundles/react/chunks/removeComputed-HIYYBG3M.js +1 -0
  362. package/dist/stage-bundles/react/chunks/removeEvent-A7AUWPIF.js +1 -0
  363. package/dist/stage-bundles/react/chunks/removeLifecycleHook-Z5ZHFYSE.js +1 -0
  364. package/dist/stage-bundles/react/chunks/removeNode-QSDSWHNG.js +1 -0
  365. package/dist/stage-bundles/react/chunks/removeOption-7JZTAHTB.js +1 -0
  366. package/dist/stage-bundles/react/chunks/removeParamFromRoute-JBZOXNDA.js +1 -0
  367. package/dist/stage-bundles/react/chunks/removeState-RIXJ6YEL.js +1 -0
  368. package/dist/stage-bundles/react/chunks/removeStore-PKBJRCYZ.js +1 -0
  369. package/dist/stage-bundles/react/chunks/removeToken-WRU2GN7O.js +1 -0
  370. package/dist/stage-bundles/react/chunks/removeValue-KRNKQVF5.js +1 -0
  371. package/dist/stage-bundles/react/chunks/setDestination-DUGBRV24.js +1 -0
  372. package/dist/stage-bundles/react/chunks/setHomePage-GJLGWZHJ.js +1 -0
  373. package/dist/stage-bundles/react/chunks/setHtmlId-F5SPBYD7.js +1 -0
  374. package/dist/stage-bundles/react/chunks/setName-DAQAN7JR.js +1 -0
  375. package/dist/stage-bundles/react/chunks/setNodeLayout-X4PQKKZT.js +1 -0
  376. package/dist/stage-bundles/react/chunks/setOptionsExpression-3MOFK54D.js +1 -0
  377. package/dist/stage-bundles/react/chunks/setRender-WJRTHRML.js +1 -0
  378. package/dist/stage-bundles/react/chunks/setRepeat-JD6QROHI.js +1 -0
  379. package/dist/stage-bundles/react/chunks/setTagName-42MJSWMZ.js +1 -0
  380. package/dist/stage-bundles/react/chunks/updateAction-ZW4KGOAQ.js +1 -0
  381. package/dist/stage-bundles/react/chunks/updateAnimationBinding-QETT3JF2.js +1 -0
  382. package/dist/stage-bundles/react/chunks/updateAttribute-HFPDXXBZ.js +1 -0
  383. package/dist/stage-bundles/react/chunks/updateBounds-HOTYUCG4.js +1 -0
  384. package/dist/stage-bundles/react/chunks/updateComputed-OOBDA4XY.js +1 -0
  385. package/dist/stage-bundles/react/chunks/updateEvent-LCGAPMAI.js +1 -0
  386. package/dist/stage-bundles/react/chunks/updateHtml-VQAIKLEG.js +1 -0
  387. package/dist/stage-bundles/react/chunks/updateLifecycleHook-RCS2QC44.js +1 -0
  388. package/dist/stage-bundles/react/chunks/updateOption-PPZLK4X3.js +1 -0
  389. package/dist/stage-bundles/react/chunks/updateRoute-FPAKZBCT.js +1 -0
  390. package/dist/stage-bundles/react/chunks/updateState-LRZJPENX.js +1 -0
  391. package/dist/stage-bundles/react/chunks/updateStyle-M7YKN6C4.js +1 -0
  392. package/dist/stage-bundles/react/chunks/updateToken-LOI6M4XH.js +1 -0
  393. package/dist/stage-bundles/react/chunks/updateValue-NTA7TSYR.js +1 -0
  394. package/dist/stage-bundles/react/chunks/user-3YXEQVFB.js +1 -0
  395. package/dist/stage-bundles/react/chunks/validateStorePayload-VVQBPX4I.js +3 -0
  396. package/dist/stage-bundles/react/chunks/viewport-7ICM5NZY.js +1 -0
  397. package/dist/stage-bundles/react/chunks/window-SG66BA4O.js +1 -0
  398. package/dist/stage-bundles/react/entry.js +1 -85
  399. package/dist/stage-bundles/react/framework-dom-client.js +1 -22
  400. package/dist/stage-bundles/react/framework-dom.js +1 -21
  401. package/dist/stage-bundles/react/framework-jsx-runtime.js +1 -60
  402. package/dist/stage-bundles/react/framework.js +1 -20
  403. package/dist/stage-bundles/react/sdk.js +1 -49
  404. package/dist/stage-bundles/vue/chunks/addAction-EGLGEGTS.js +1 -0
  405. package/dist/stage-bundles/vue/chunks/addAnimationBinding-WCB5VZLU.js +1 -0
  406. package/dist/stage-bundles/vue/chunks/addAttribute-2MZ3OFUE.js +1 -0
  407. package/dist/stage-bundles/vue/chunks/addComponent-Y2AQ2FGZ.js +1 -0
  408. package/dist/stage-bundles/vue/chunks/addComputed-7JLBFD6I.js +1 -0
  409. package/dist/stage-bundles/vue/chunks/addEvent-HOBNKM2F.js +1 -0
  410. package/dist/stage-bundles/vue/chunks/addLifecycleHook-GHYL7FRH.js +1 -0
  411. package/dist/stage-bundles/vue/chunks/addNode-5OXCF22G.js +1 -0
  412. package/dist/stage-bundles/vue/chunks/addOption-PVXGN7AJ.js +1 -0
  413. package/dist/stage-bundles/vue/chunks/addParamToRoute-VL2VOFZS.js +1 -0
  414. package/dist/stage-bundles/vue/chunks/addState-U2NWEGWV.js +1 -0
  415. package/dist/stage-bundles/vue/chunks/addStore-AQMFKH33.js +1 -0
  416. package/dist/stage-bundles/vue/chunks/addToken-XF2FFA52.js +1 -0
  417. package/dist/stage-bundles/vue/chunks/addValue-O7YXXMST.js +1 -0
  418. package/dist/stage-bundles/vue/chunks/aiAttachmentContracts-V3EW4BHI.js +1 -0
  419. package/dist/stage-bundles/vue/chunks/aiMessagesContracts-ZGHZJ7EU.js +1 -0
  420. package/dist/stage-bundles/vue/chunks/aiRelay-WDZAC42R.js +1 -0
  421. package/dist/stage-bundles/vue/chunks/aiSessionContracts-WAMOGHSG.js +1 -0
  422. package/dist/stage-bundles/vue/chunks/assets-NU56BTDG.js +1 -0
  423. package/dist/stage-bundles/vue/chunks/capture-UZVRGVM7.js +1 -0
  424. package/dist/stage-bundles/vue/chunks/chunk-5CWWFBNY.js +1 -0
  425. package/dist/stage-bundles/vue/chunks/chunk-5GKIM3R4.js +1 -0
  426. package/dist/stage-bundles/vue/chunks/chunk-6KW4HPGN.js +1 -0
  427. package/dist/stage-bundles/vue/chunks/chunk-6S7QQT47.js +1 -0
  428. package/dist/stage-bundles/vue/chunks/chunk-7CCYKDAJ.js +97 -0
  429. package/dist/stage-bundles/vue/chunks/chunk-7UENQJSC.js +5 -0
  430. package/dist/stage-bundles/vue/chunks/chunk-7VDUBBVE.js +1 -0
  431. package/dist/stage-bundles/vue/chunks/chunk-A25WFH3U.js +1 -0
  432. package/dist/stage-bundles/vue/chunks/chunk-A52FDU5E.js +1 -0
  433. package/dist/stage-bundles/vue/chunks/chunk-ACPGC7BJ.js +1 -0
  434. package/dist/stage-bundles/vue/chunks/chunk-AMPHYXGT.js +1 -0
  435. package/dist/stage-bundles/vue/chunks/chunk-AS76ZLXK.js +1 -0
  436. package/dist/stage-bundles/vue/chunks/chunk-AYZAGKHN.js +1 -0
  437. package/dist/stage-bundles/vue/chunks/chunk-BL6GQ6ID.js +1 -0
  438. package/dist/stage-bundles/vue/chunks/chunk-BWJHUHDJ.js +1 -0
  439. package/dist/stage-bundles/vue/chunks/chunk-CAAW6MG4.js +1 -0
  440. package/dist/stage-bundles/vue/chunks/chunk-CC3CCH2E.js +1 -0
  441. package/dist/stage-bundles/vue/chunks/chunk-CNZYL2VV.js +1 -0
  442. package/dist/stage-bundles/vue/chunks/chunk-CXJ5APZF.js +1 -0
  443. package/dist/stage-bundles/vue/chunks/chunk-CYURWEXX.js +1 -0
  444. package/dist/stage-bundles/vue/chunks/chunk-DHPGPV5T.js +1 -0
  445. package/dist/stage-bundles/vue/chunks/chunk-DLHF7QB4.js +1 -0
  446. package/dist/stage-bundles/vue/chunks/chunk-E6KR5RXO.js +1 -0
  447. package/dist/stage-bundles/vue/chunks/chunk-EPVRMHC2.js +1 -0
  448. package/dist/stage-bundles/vue/chunks/chunk-EWEPEODY.js +1 -0
  449. package/dist/stage-bundles/vue/chunks/chunk-EXXAK3BP.js +1 -0
  450. package/dist/stage-bundles/vue/chunks/chunk-F5MJNV7Y.js +3 -0
  451. package/dist/stage-bundles/vue/chunks/chunk-FAYUYASQ.js +1 -0
  452. package/dist/stage-bundles/vue/chunks/chunk-FYWE2MO5.js +1 -0
  453. package/dist/stage-bundles/vue/chunks/chunk-GEOQWCYL.js +1 -0
  454. package/dist/stage-bundles/vue/chunks/chunk-GK5XUHQG.js +1 -0
  455. package/dist/stage-bundles/vue/chunks/chunk-GM4D3DPT.js +1 -0
  456. package/dist/stage-bundles/vue/chunks/chunk-GUI7FIZD.js +1 -0
  457. package/dist/stage-bundles/vue/chunks/chunk-HAN4CMBX.js +1 -0
  458. package/dist/stage-bundles/vue/chunks/chunk-HCRWHPFW.js +1 -0
  459. package/dist/stage-bundles/vue/chunks/chunk-HE7IQLGK.js +1 -0
  460. package/dist/stage-bundles/vue/chunks/chunk-I57W7UZN.js +1 -0
  461. package/dist/stage-bundles/vue/chunks/chunk-IBDKDP7T.js +1 -0
  462. package/dist/stage-bundles/vue/chunks/chunk-ICWQHFOI.js +1 -0
  463. package/dist/stage-bundles/vue/chunks/chunk-IKKRB6BS.js +1 -0
  464. package/dist/stage-bundles/vue/chunks/chunk-ILXSVZXQ.js +1 -0
  465. package/dist/stage-bundles/vue/chunks/chunk-IV6PINVX.js +1 -0
  466. package/dist/stage-bundles/vue/chunks/chunk-IW4KEJOF.js +1 -0
  467. package/dist/stage-bundles/vue/chunks/chunk-IZT2KVTW.js +1 -0
  468. package/dist/stage-bundles/vue/chunks/chunk-J5QMLA3Z.js +1 -0
  469. package/dist/stage-bundles/vue/chunks/chunk-JRXMDYLE.js +1 -0
  470. package/dist/stage-bundles/vue/chunks/chunk-K5BNCYT7.js +1 -0
  471. package/dist/stage-bundles/vue/chunks/chunk-KTWXYDG7.js +1 -0
  472. package/dist/stage-bundles/vue/chunks/chunk-LHK7LQPZ.js +1 -0
  473. package/dist/stage-bundles/vue/chunks/chunk-LUY5LC7Z.js +1 -0
  474. package/dist/stage-bundles/vue/chunks/chunk-M3OE4LWW.js +56 -0
  475. package/dist/stage-bundles/vue/chunks/chunk-MGH62JQ4.js +1 -0
  476. package/dist/stage-bundles/vue/chunks/chunk-MUZZUB5Y.js +1 -0
  477. package/dist/stage-bundles/vue/chunks/chunk-N6I4COF2.js +1 -0
  478. package/dist/stage-bundles/vue/chunks/chunk-NHY2XYCH.js +1 -0
  479. package/dist/stage-bundles/vue/chunks/chunk-NOTXZB5N.js +1 -0
  480. package/dist/stage-bundles/vue/chunks/chunk-NXBFOI3Z.js +1 -0
  481. package/dist/stage-bundles/vue/chunks/chunk-O24ISLGT.js +1 -0
  482. package/dist/stage-bundles/vue/chunks/chunk-OQM5TMCK.js +1 -0
  483. package/dist/stage-bundles/vue/chunks/chunk-PPDOTRNT.js +1 -0
  484. package/dist/stage-bundles/vue/chunks/chunk-PU62K33G.js +1 -0
  485. package/dist/stage-bundles/vue/chunks/chunk-PYIGBTL4.js +6 -0
  486. package/dist/stage-bundles/vue/chunks/chunk-Q3IER3MW.js +1 -0
  487. package/dist/stage-bundles/vue/chunks/chunk-Q3ZV7EKU.js +1 -0
  488. package/dist/stage-bundles/vue/chunks/chunk-QD56IMFS.js +1 -0
  489. package/dist/stage-bundles/vue/chunks/chunk-QFFVADTJ.js +1 -0
  490. package/dist/stage-bundles/vue/chunks/chunk-QJ33JO3T.js +1 -0
  491. package/dist/stage-bundles/vue/chunks/chunk-QKFDVU2Q.js +1 -0
  492. package/dist/stage-bundles/vue/chunks/chunk-QVVBKZW6.js +1 -0
  493. package/dist/stage-bundles/vue/chunks/chunk-RFFN4NF4.js +1 -0
  494. package/dist/stage-bundles/vue/chunks/chunk-RMSX6LWP.js +1 -0
  495. package/dist/stage-bundles/vue/chunks/chunk-TPCJQIUG.js +1 -0
  496. package/dist/stage-bundles/vue/chunks/chunk-TSL6VG3R.js +1 -0
  497. package/dist/stage-bundles/vue/chunks/chunk-TTTOAB6J.js +1 -0
  498. package/dist/stage-bundles/vue/chunks/chunk-TX5TCU2H.js +1 -0
  499. package/dist/stage-bundles/vue/chunks/chunk-UCLSDDOL.js +1 -0
  500. package/dist/stage-bundles/vue/chunks/chunk-UDTKG2KI.js +1 -0
  501. package/dist/stage-bundles/vue/chunks/chunk-UIC3GAEE.js +1 -0
  502. package/dist/stage-bundles/vue/chunks/chunk-XE3A5HPY.js +1 -0
  503. package/dist/stage-bundles/vue/chunks/chunk-XFHQ45KR.js +1 -0
  504. package/dist/stage-bundles/vue/chunks/chunk-XTAXESM6.js +1 -0
  505. package/dist/stage-bundles/vue/chunks/chunk-YB7FA4Y3.js +1 -0
  506. package/dist/stage-bundles/vue/chunks/chunk-YCGY2NRE.js +1 -0
  507. package/dist/stage-bundles/vue/chunks/chunk-YCMBBPKT.js +1 -0
  508. package/dist/stage-bundles/vue/chunks/chunk-Z3M6DQKZ.js +1 -0
  509. package/dist/stage-bundles/vue/chunks/chunk-ZUPNPSUB.js +1 -0
  510. package/dist/stage-bundles/vue/chunks/clearDestination-IGKNL7FN.js +1 -0
  511. package/dist/stage-bundles/vue/chunks/clearName-HJ7ZTHBU.js +1 -0
  512. package/dist/stage-bundles/vue/chunks/clearOptionsExpression-NZQFL64E.js +1 -0
  513. package/dist/stage-bundles/vue/chunks/clearRender-NPVDTNFA.js +1 -0
  514. package/dist/stage-bundles/vue/chunks/clearRepeat-7YFYZODP.js +1 -0
  515. package/dist/stage-bundles/vue/chunks/contentEditor-EUDU6PBV.js +1 -0
  516. package/dist/stage-bundles/vue/chunks/createAction-73YUTK3T.js +1 -0
  517. package/dist/stage-bundles/vue/chunks/createAnimation-2WQSMYT5.js +1 -0
  518. package/dist/stage-bundles/vue/chunks/createComputed-DMX7CJA3.js +1 -0
  519. package/dist/stage-bundles/vue/chunks/createTextContent-4Z4YATBO.js +1 -0
  520. package/dist/stage-bundles/vue/chunks/createValue-DXQSLOBG.js +1 -0
  521. package/dist/stage-bundles/vue/chunks/design-LU5XWCLC.js +15 -0
  522. package/dist/stage-bundles/vue/chunks/disconnectNode-2CLWVIQP.js +1 -0
  523. package/dist/stage-bundles/vue/chunks/history-VAAFKC4E.js +1 -0
  524. package/dist/stage-bundles/vue/chunks/id-ZIAZZ5AS.js +1 -0
  525. package/dist/stage-bundles/vue/chunks/main-HQ4XJKUM.js +1 -0
  526. package/dist/stage-bundles/vue/chunks/main-KFGWT6OT.js +1 -0
  527. package/dist/stage-bundles/vue/chunks/main-R652XLC3.js +1 -0
  528. package/dist/stage-bundles/vue/chunks/main-X6SC5JYU.js +1 -0
  529. package/dist/stage-bundles/vue/chunks/moveNodeToLastChildOf-H4TZ5UMP.js +1 -0
  530. package/dist/stage-bundles/vue/chunks/nodeGraph-JS64VAAQ.js +1 -0
  531. package/dist/stage-bundles/vue/chunks/normalizeEventName-SNBYJDUY.js +1 -0
  532. package/dist/stage-bundles/vue/chunks/normalizeLayoutContext-KGEMYC4Y.js +1 -0
  533. package/dist/stage-bundles/vue/chunks/preview-52FXOKBF.js +1 -0
  534. package/dist/stage-bundles/vue/chunks/removeAction-T4M5EJN7.js +1 -0
  535. package/dist/stage-bundles/vue/chunks/removeAnimationBinding-AIISPC33.js +1 -0
  536. package/dist/stage-bundles/vue/chunks/removeAttribute-DCKZLM55.js +1 -0
  537. package/dist/stage-bundles/vue/chunks/removeComputed-WSA5GNVZ.js +1 -0
  538. package/dist/stage-bundles/vue/chunks/removeEvent-2YZ55HD6.js +1 -0
  539. package/dist/stage-bundles/vue/chunks/removeLifecycleHook-SBPJNF5P.js +1 -0
  540. package/dist/stage-bundles/vue/chunks/removeNode-5HXQ63V3.js +1 -0
  541. package/dist/stage-bundles/vue/chunks/removeOption-SYIFB4XW.js +1 -0
  542. package/dist/stage-bundles/vue/chunks/removeParamFromRoute-HAYP3WTT.js +1 -0
  543. package/dist/stage-bundles/vue/chunks/removeState-SGJVQ66N.js +1 -0
  544. package/dist/stage-bundles/vue/chunks/removeStore-YVBTGA3I.js +1 -0
  545. package/dist/stage-bundles/vue/chunks/removeToken-AIDV7DUM.js +1 -0
  546. package/dist/stage-bundles/vue/chunks/removeValue-UP5ZFN3U.js +1 -0
  547. package/dist/stage-bundles/vue/chunks/setDestination-NCPAVIIK.js +1 -0
  548. package/dist/stage-bundles/vue/chunks/setHomePage-O2JYOG6H.js +1 -0
  549. package/dist/stage-bundles/vue/chunks/setHtmlId-2W7YW47O.js +1 -0
  550. package/dist/stage-bundles/vue/chunks/setName-NKRZPBGG.js +1 -0
  551. package/dist/stage-bundles/vue/chunks/setNodeLayout-GY4G7UZR.js +1 -0
  552. package/dist/stage-bundles/vue/chunks/setOptionsExpression-K5EQXJEY.js +1 -0
  553. package/dist/stage-bundles/vue/chunks/setRender-7XMGQ7ZK.js +1 -0
  554. package/dist/stage-bundles/vue/chunks/setRepeat-WN4WZJUN.js +1 -0
  555. package/dist/stage-bundles/vue/chunks/setTagName-U6UJNJLE.js +1 -0
  556. package/dist/stage-bundles/vue/chunks/updateAction-3KSR6ZIJ.js +1 -0
  557. package/dist/stage-bundles/vue/chunks/updateAnimationBinding-HVVHLFBO.js +1 -0
  558. package/dist/stage-bundles/vue/chunks/updateAttribute-XXZL2P43.js +1 -0
  559. package/dist/stage-bundles/vue/chunks/updateBounds-5M7YQRO3.js +1 -0
  560. package/dist/stage-bundles/vue/chunks/updateComputed-7QA6XZIC.js +1 -0
  561. package/dist/stage-bundles/vue/chunks/updateEvent-R52PL2G4.js +1 -0
  562. package/dist/stage-bundles/vue/chunks/updateHtml-YBJJSWQW.js +1 -0
  563. package/dist/stage-bundles/vue/chunks/updateLifecycleHook-4RA2U4TR.js +1 -0
  564. package/dist/stage-bundles/vue/chunks/updateOption-5U23ZUWV.js +1 -0
  565. package/dist/stage-bundles/vue/chunks/updateRoute-TFQFFFSZ.js +1 -0
  566. package/dist/stage-bundles/vue/chunks/updateState-JCUSBQOL.js +1 -0
  567. package/dist/stage-bundles/vue/chunks/updateStyle-JASLFXVX.js +1 -0
  568. package/dist/stage-bundles/vue/chunks/updateToken-24P2P2SF.js +1 -0
  569. package/dist/stage-bundles/vue/chunks/updateValue-TSVJM3PO.js +1 -0
  570. package/dist/stage-bundles/vue/chunks/user-FCPIGR7X.js +1 -0
  571. package/dist/stage-bundles/vue/chunks/validateStorePayload-HCBPC7HR.js +3 -0
  572. package/dist/stage-bundles/vue/chunks/viewport-LLBH2LJW.js +1 -0
  573. package/dist/stage-bundles/vue/chunks/vue-62USAR6D.js +1 -0
  574. package/dist/stage-bundles/vue/chunks/window-TFWZNZUJ.js +1 -0
  575. package/dist/stage-bundles/vue/entry.js +1 -85
  576. package/dist/stage-bundles/vue/framework-jsx-runtime.js +1 -34
  577. package/dist/stage-bundles/vue/framework.js +1 -352
  578. package/dist/stage-bundles/vue/sdk.js +1 -42
  579. package/dist/stage-src/dev/entry.js +10 -15
  580. package/dist/stage-src/dev/server.js +34 -38
  581. package/dist/stage-src/preview/bootstrap.js +16 -19
  582. package/dist/stage-src/preview/entry.js +2 -1
  583. package/dist/stage-src/preview/routes/js.js +4 -4
  584. package/dist/stage-src/preview/routes/preview.js +2 -2
  585. package/dist/stage-src/preview/server.js +42 -17
  586. package/package.json +18 -16
  587. package/dist/stage/chunks/addAttribute-CNJGHQSS.js +0 -1
  588. package/dist/stage/chunks/addNode-AOA2MS25.js +0 -1
  589. package/dist/stage/chunks/aiRelay-FSM6HGF7.js +0 -1
  590. package/dist/stage/chunks/assets-OAQXQVKM.js +0 -1
  591. package/dist/stage/chunks/bootstrap-LFMD2YRN.js +0 -15
  592. package/dist/stage/chunks/bootstrap-LHT54EHF.js +0 -1
  593. package/dist/stage/chunks/chunk-32FG2JVJ.js +0 -1
  594. package/dist/stage/chunks/chunk-4FPLUVEY.js +0 -1
  595. package/dist/stage/chunks/chunk-5YRZZCXL.js +0 -1
  596. package/dist/stage/chunks/chunk-6GMURG26.js +0 -1
  597. package/dist/stage/chunks/chunk-73MAM44D.js +0 -1
  598. package/dist/stage/chunks/chunk-AMAA7VJU.js +0 -1
  599. package/dist/stage/chunks/chunk-CUIKYKRZ.js +0 -1
  600. package/dist/stage/chunks/chunk-HBEU7BDR.js +0 -1
  601. package/dist/stage/chunks/chunk-JKMOVSI4.js +0 -1
  602. package/dist/stage/chunks/chunk-N4AFW5M3.js +0 -1
  603. package/dist/stage/chunks/chunk-OQ52NUNN.js +0 -1
  604. package/dist/stage/chunks/chunk-PSNKOX4A.js +0 -37
  605. package/dist/stage/chunks/chunk-QCZ4EDGZ.js +0 -1
  606. package/dist/stage/chunks/chunk-RWJ7EPNM.js +0 -1
  607. package/dist/stage/chunks/chunk-TV4PHWEG.js +0 -1
  608. package/dist/stage/chunks/chunk-X2DYJVYZ.js +0 -1
  609. package/dist/stage/chunks/clearName-YFCAGL36.js +0 -1
  610. package/dist/stage/chunks/clearRender-4YRSLAVX.js +0 -1
  611. package/dist/stage/chunks/clearRepeat-7TPSR6FL.js +0 -1
  612. package/dist/stage/chunks/history-KHLKDDEZ.js +0 -1
  613. package/dist/stage/chunks/main-3QLLHM43.js +0 -1
  614. package/dist/stage/chunks/main-7EICBMQ2.js +0 -1
  615. package/dist/stage/chunks/main-NIVRMJR3.js +0 -1
  616. package/dist/stage/chunks/moveNodeToLastChildOf-PSU5X3UJ.js +0 -1
  617. package/dist/stage/chunks/nodeGraph-7M5JI3VA.js +0 -1
  618. package/dist/stage/chunks/normalizeLayoutContext-NWKVWWWS.js +0 -1
  619. package/dist/stage/chunks/preview-bootstrap-LB3AH2CS.js +0 -1
  620. package/dist/stage/chunks/removeToken-CKODWTLX.js +0 -1
  621. package/dist/stage/chunks/screen-capture-bootstrap-BRQD4OSY.js +0 -1
  622. package/dist/stage/chunks/setNodeLayout-3LRJGZNL.js +0 -1
  623. package/dist/stage/chunks/updateAttribute-USA3HPEX.js +0 -1
  624. package/dist/stage/chunks/user-2EMXBDUX.js +0 -1
  625. package/dist/stage/chunks/window-KCOIKBXQ.js +0 -1
  626. package/dist/stage-bundles/preact/chunks/addAction-5FCPHQHB.js +0 -9
  627. package/dist/stage-bundles/preact/chunks/addAnimationBinding-5UBXLWDB.js +0 -7
  628. package/dist/stage-bundles/preact/chunks/addAttribute-PWIHRX6Y.js +0 -12
  629. package/dist/stage-bundles/preact/chunks/addComponent-77PUZWLS.js +0 -14
  630. package/dist/stage-bundles/preact/chunks/addComputed-5J47SS67.js +0 -9
  631. package/dist/stage-bundles/preact/chunks/addEvent-P2KGVMLM.js +0 -11
  632. package/dist/stage-bundles/preact/chunks/addLifecycleHook-VSOAZGTG.js +0 -8
  633. package/dist/stage-bundles/preact/chunks/addNode-GCJR257S.js +0 -19
  634. package/dist/stage-bundles/preact/chunks/addOption-3U3LAV4C.js +0 -8
  635. package/dist/stage-bundles/preact/chunks/addParamToRoute-43UDJ4YE.js +0 -7
  636. package/dist/stage-bundles/preact/chunks/addState-ZWDA2CLN.js +0 -11
  637. package/dist/stage-bundles/preact/chunks/addStore-A4CRKMPO.js +0 -7
  638. package/dist/stage-bundles/preact/chunks/addToken-7P5NGEG4.js +0 -8
  639. package/dist/stage-bundles/preact/chunks/addValue-VQW7HQX7.js +0 -8
  640. package/dist/stage-bundles/preact/chunks/aiRelay-TFBJ7BF4.js +0 -184
  641. package/dist/stage-bundles/preact/chunks/assets-3W46CFCY.js +0 -42
  642. package/dist/stage-bundles/preact/chunks/bootstrap-VNVZAVV5.js +0 -4080
  643. package/dist/stage-bundles/preact/chunks/chunk-22J4JOPG.js +0 -9
  644. package/dist/stage-bundles/preact/chunks/chunk-236DY7EE.js +0 -92
  645. package/dist/stage-bundles/preact/chunks/chunk-2H2EQ2RG.js +0 -24
  646. package/dist/stage-bundles/preact/chunks/chunk-2Y25YY3N.js +0 -12
  647. package/dist/stage-bundles/preact/chunks/chunk-3MJKS6VX.js +0 -19
  648. package/dist/stage-bundles/preact/chunks/chunk-3NLDBJQD.js +0 -12
  649. package/dist/stage-bundles/preact/chunks/chunk-43L3STHY.js +0 -172
  650. package/dist/stage-bundles/preact/chunks/chunk-4A4WKSGY.js +0 -66
  651. package/dist/stage-bundles/preact/chunks/chunk-5C4ZCCYX.js +0 -421
  652. package/dist/stage-bundles/preact/chunks/chunk-65Q2CFW7.js +0 -18
  653. package/dist/stage-bundles/preact/chunks/chunk-667SIQGW.js +0 -12
  654. package/dist/stage-bundles/preact/chunks/chunk-6B6PKOOA.js +0 -140
  655. package/dist/stage-bundles/preact/chunks/chunk-6BXKZHN6.js +0 -19
  656. package/dist/stage-bundles/preact/chunks/chunk-6E57QUN7.js +0 -21
  657. package/dist/stage-bundles/preact/chunks/chunk-6QYYO5LM.js +0 -12
  658. package/dist/stage-bundles/preact/chunks/chunk-6R3QXFFF.js +0 -47
  659. package/dist/stage-bundles/preact/chunks/chunk-6RLI7CFQ.js +0 -12
  660. package/dist/stage-bundles/preact/chunks/chunk-6TDZGYJG.js +0 -13
  661. package/dist/stage-bundles/preact/chunks/chunk-AI3MQHWR.js +0 -51
  662. package/dist/stage-bundles/preact/chunks/chunk-BWZPEI76.js +0 -18
  663. package/dist/stage-bundles/preact/chunks/chunk-CHZVDVQC.js +0 -8
  664. package/dist/stage-bundles/preact/chunks/chunk-CJOJNMRC.js +0 -8
  665. package/dist/stage-bundles/preact/chunks/chunk-CXATTVPL.js +0 -24
  666. package/dist/stage-bundles/preact/chunks/chunk-CYH47R7O.js +0 -49
  667. package/dist/stage-bundles/preact/chunks/chunk-DBHMBCBM.js +0 -14
  668. package/dist/stage-bundles/preact/chunks/chunk-DCKGUW2M.js +0 -8
  669. package/dist/stage-bundles/preact/chunks/chunk-EB5FGFFG.js +0 -12
  670. package/dist/stage-bundles/preact/chunks/chunk-F6JYAVEC.js +0 -15
  671. package/dist/stage-bundles/preact/chunks/chunk-F77HGOQB.js +0 -8
  672. package/dist/stage-bundles/preact/chunks/chunk-FSIANI7E.js +0 -11
  673. package/dist/stage-bundles/preact/chunks/chunk-FZZDMYBZ.js +0 -12
  674. package/dist/stage-bundles/preact/chunks/chunk-H75SQT4U.js +0 -105
  675. package/dist/stage-bundles/preact/chunks/chunk-HPCVUQI4.js +0 -224
  676. package/dist/stage-bundles/preact/chunks/chunk-I5OE2BAU.js +0 -25863
  677. package/dist/stage-bundles/preact/chunks/chunk-IDGFZWZY.js +0 -13
  678. package/dist/stage-bundles/preact/chunks/chunk-IIIXGKVH.js +0 -17
  679. package/dist/stage-bundles/preact/chunks/chunk-ILZWSEWK.js +0 -19
  680. package/dist/stage-bundles/preact/chunks/chunk-IO3NSIEJ.js +0 -8
  681. package/dist/stage-bundles/preact/chunks/chunk-ISOZDDO2.js +0 -157
  682. package/dist/stage-bundles/preact/chunks/chunk-JDIO27MU.js +0 -8
  683. package/dist/stage-bundles/preact/chunks/chunk-JJVRBJGQ.js +0 -1353
  684. package/dist/stage-bundles/preact/chunks/chunk-K7ZULZJF.js +0 -116
  685. package/dist/stage-bundles/preact/chunks/chunk-KF4MVCJ6.js +0 -13
  686. package/dist/stage-bundles/preact/chunks/chunk-KHURU62K.js +0 -27
  687. package/dist/stage-bundles/preact/chunks/chunk-KKLU24SB.js +0 -33
  688. package/dist/stage-bundles/preact/chunks/chunk-KOBPYD4N.js +0 -8
  689. package/dist/stage-bundles/preact/chunks/chunk-LH4ZDX3T.js +0 -58
  690. package/dist/stage-bundles/preact/chunks/chunk-M3YT4JBL.js +0 -12
  691. package/dist/stage-bundles/preact/chunks/chunk-MAPYANXA.js +0 -8
  692. package/dist/stage-bundles/preact/chunks/chunk-MBN7CVNW.js +0 -4290
  693. package/dist/stage-bundles/preact/chunks/chunk-MMCB6GGX.js +0 -8
  694. package/dist/stage-bundles/preact/chunks/chunk-NCUWZXVZ.js +0 -8
  695. package/dist/stage-bundles/preact/chunks/chunk-O3KQTA3H.js +0 -21
  696. package/dist/stage-bundles/preact/chunks/chunk-OARTKQPG.js +0 -153
  697. package/dist/stage-bundles/preact/chunks/chunk-P7UUT7BU.js +0 -12
  698. package/dist/stage-bundles/preact/chunks/chunk-PHVB7SAE.js +0 -22
  699. package/dist/stage-bundles/preact/chunks/chunk-PKSFATQY.js +0 -10
  700. package/dist/stage-bundles/preact/chunks/chunk-PU2GET2S.js +0 -18
  701. package/dist/stage-bundles/preact/chunks/chunk-QBXKRHK5.js +0 -11
  702. package/dist/stage-bundles/preact/chunks/chunk-QCQXLZJH.js +0 -18
  703. package/dist/stage-bundles/preact/chunks/chunk-QIOKODGT.js +0 -14
  704. package/dist/stage-bundles/preact/chunks/chunk-R5DUYWXP.js +0 -8
  705. package/dist/stage-bundles/preact/chunks/chunk-RCIDQRAS.js +0 -54
  706. package/dist/stage-bundles/preact/chunks/chunk-RI7XWDHX.js +0 -10
  707. package/dist/stage-bundles/preact/chunks/chunk-RZG5LCPH.js +0 -12
  708. package/dist/stage-bundles/preact/chunks/chunk-S4NZQRJJ.js +0 -12
  709. package/dist/stage-bundles/preact/chunks/chunk-S5L2YBXG.js +0 -143
  710. package/dist/stage-bundles/preact/chunks/chunk-SF5BLQ7P.js +0 -14
  711. package/dist/stage-bundles/preact/chunks/chunk-SPTKNGHA.js +0 -14
  712. package/dist/stage-bundles/preact/chunks/chunk-TKHCH4WB.js +0 -35
  713. package/dist/stage-bundles/preact/chunks/chunk-TVB3GD7L.js +0 -8
  714. package/dist/stage-bundles/preact/chunks/chunk-TVGXBOIT.js +0 -18
  715. package/dist/stage-bundles/preact/chunks/chunk-U7U7L7XZ.js +0 -31
  716. package/dist/stage-bundles/preact/chunks/chunk-UFHA3ODE.js +0 -528
  717. package/dist/stage-bundles/preact/chunks/chunk-UHGV762U.js +0 -12
  718. package/dist/stage-bundles/preact/chunks/chunk-V6MKKC23.js +0 -18
  719. package/dist/stage-bundles/preact/chunks/chunk-VK4FEQKG.js +0 -18
  720. package/dist/stage-bundles/preact/chunks/chunk-VZNGMF63.js +0 -12
  721. package/dist/stage-bundles/preact/chunks/chunk-W5CGYUVM.js +0 -8
  722. package/dist/stage-bundles/preact/chunks/chunk-W7QH4UII.js +0 -54
  723. package/dist/stage-bundles/preact/chunks/chunk-WMV5J37V.js +0 -8
  724. package/dist/stage-bundles/preact/chunks/chunk-WXDXWNWW.js +0 -8
  725. package/dist/stage-bundles/preact/chunks/chunk-XKFPCFZH.js +0 -8
  726. package/dist/stage-bundles/preact/chunks/chunk-YCZNHFZA.js +0 -15
  727. package/dist/stage-bundles/preact/chunks/chunk-YEEGISBQ.js +0 -23
  728. package/dist/stage-bundles/preact/chunks/chunk-YM3NAGCN.js +0 -8
  729. package/dist/stage-bundles/preact/chunks/chunk-YMVTSVEM.js +0 -26
  730. package/dist/stage-bundles/preact/chunks/chunk-YXNMNEJV.js +0 -329
  731. package/dist/stage-bundles/preact/chunks/clearDestination-EMCIEDAP.js +0 -7
  732. package/dist/stage-bundles/preact/chunks/clearName-O7J77F77.js +0 -7
  733. package/dist/stage-bundles/preact/chunks/clearOptionsExpression-RGDXKYVX.js +0 -7
  734. package/dist/stage-bundles/preact/chunks/clearRender-DFMNHXXQ.js +0 -7
  735. package/dist/stage-bundles/preact/chunks/clearRepeat-436RGATR.js +0 -7
  736. package/dist/stage-bundles/preact/chunks/contentEditor-NLMG4U5G.js +0 -67
  737. package/dist/stage-bundles/preact/chunks/createAction-CKUAX4TU.js +0 -8
  738. package/dist/stage-bundles/preact/chunks/createAnimation-URI5366N.js +0 -7
  739. package/dist/stage-bundles/preact/chunks/createComputed-I23CA5NX.js +0 -8
  740. package/dist/stage-bundles/preact/chunks/createTextContent-K4G7KNQ5.js +0 -10
  741. package/dist/stage-bundles/preact/chunks/createValue-D5MP2SMM.js +0 -7
  742. package/dist/stage-bundles/preact/chunks/disconnectNode-GM5F3ZMB.js +0 -8
  743. package/dist/stage-bundles/preact/chunks/history-7PFZW7N6.js +0 -51
  744. package/dist/stage-bundles/preact/chunks/id-VSNJWKHU.js +0 -53
  745. package/dist/stage-bundles/preact/chunks/main-GQD7B74Q.js +0 -103
  746. package/dist/stage-bundles/preact/chunks/main-M2BBXKSW.js +0 -154
  747. package/dist/stage-bundles/preact/chunks/main-QDV3BMBP.js +0 -109
  748. package/dist/stage-bundles/preact/chunks/main-QOB4HBIK.js +0 -31
  749. package/dist/stage-bundles/preact/chunks/moveNodeToLastChildOf-Z6JUVLGM.js +0 -12
  750. package/dist/stage-bundles/preact/chunks/nodeGraph-TTOC6H4R.js +0 -53
  751. package/dist/stage-bundles/preact/chunks/normalizeEventName-2JPOX7Y6.js +0 -128
  752. package/dist/stage-bundles/preact/chunks/normalizeLayoutContext-Y44QODFX.js +0 -9
  753. package/dist/stage-bundles/preact/chunks/preact-FCSVXHIZ.js +0 -39
  754. package/dist/stage-bundles/preact/chunks/preview-bootstrap-QHWGL6NH.js +0 -137
  755. package/dist/stage-bundles/preact/chunks/removeAction-PPAIVTW3.js +0 -7
  756. package/dist/stage-bundles/preact/chunks/removeAnimationBinding-UQ24BSXP.js +0 -7
  757. package/dist/stage-bundles/preact/chunks/removeAttribute-P2IDGOQH.js +0 -7
  758. package/dist/stage-bundles/preact/chunks/removeComputed-7C66NNZA.js +0 -7
  759. package/dist/stage-bundles/preact/chunks/removeEvent-KTSOCV4C.js +0 -7
  760. package/dist/stage-bundles/preact/chunks/removeLifecycleHook-NKXLF3QT.js +0 -7
  761. package/dist/stage-bundles/preact/chunks/removeNode-A7C34C42.js +0 -10
  762. package/dist/stage-bundles/preact/chunks/removeOption-6HW62A5Y.js +0 -7
  763. package/dist/stage-bundles/preact/chunks/removeParamFromRoute-LIKPDVU4.js +0 -7
  764. package/dist/stage-bundles/preact/chunks/removeState-PO6J3JYQ.js +0 -7
  765. package/dist/stage-bundles/preact/chunks/removeStore-5ZZ57NHV.js +0 -7
  766. package/dist/stage-bundles/preact/chunks/removeToken-BKJE3U6Q.js +0 -7
  767. package/dist/stage-bundles/preact/chunks/removeValue-5FNPXWNL.js +0 -7
  768. package/dist/stage-bundles/preact/chunks/screen-capture-bootstrap-YWUN6QRP.js +0 -128
  769. package/dist/stage-bundles/preact/chunks/setDestination-DAYIYYIV.js +0 -7
  770. package/dist/stage-bundles/preact/chunks/setHomePage-MHCP4P24.js +0 -7
  771. package/dist/stage-bundles/preact/chunks/setHtmlId-3HYPFT3T.js +0 -7
  772. package/dist/stage-bundles/preact/chunks/setName-OQOO3URG.js +0 -7
  773. package/dist/stage-bundles/preact/chunks/setNodeLayout-PWQS32M2.js +0 -10
  774. package/dist/stage-bundles/preact/chunks/setOptionsExpression-XZZOJPCM.js +0 -8
  775. package/dist/stage-bundles/preact/chunks/setRender-NHXZZGME.js +0 -10
  776. package/dist/stage-bundles/preact/chunks/setRepeat-YZTZFDTQ.js +0 -10
  777. package/dist/stage-bundles/preact/chunks/setTagName-EGPQ66XI.js +0 -7
  778. package/dist/stage-bundles/preact/chunks/updateAction-ZSNXUEQA.js +0 -9
  779. package/dist/stage-bundles/preact/chunks/updateAnimationBinding-X2UXYQKJ.js +0 -7
  780. package/dist/stage-bundles/preact/chunks/updateAttribute-ODXM7YXA.js +0 -12
  781. package/dist/stage-bundles/preact/chunks/updateBounds-PEGOZ4FT.js +0 -7
  782. package/dist/stage-bundles/preact/chunks/updateComputed-6LNN453F.js +0 -9
  783. package/dist/stage-bundles/preact/chunks/updateEvent-ZHCKBJIM.js +0 -11
  784. package/dist/stage-bundles/preact/chunks/updateHtml-6BPU5PRY.js +0 -7
  785. package/dist/stage-bundles/preact/chunks/updateLifecycleHook-JEMQQYM5.js +0 -8
  786. package/dist/stage-bundles/preact/chunks/updateOption-SH33P5WW.js +0 -8
  787. package/dist/stage-bundles/preact/chunks/updateRoute-3RRPY2T5.js +0 -7
  788. package/dist/stage-bundles/preact/chunks/updateState-WRLF4SSC.js +0 -11
  789. package/dist/stage-bundles/preact/chunks/updateStyle-WAPTDAU5.js +0 -7
  790. package/dist/stage-bundles/preact/chunks/updateToken-CFIIILXB.js +0 -7
  791. package/dist/stage-bundles/preact/chunks/updateValue-JTEEC2B6.js +0 -8
  792. package/dist/stage-bundles/preact/chunks/user-ZLGCTRZX.js +0 -44
  793. package/dist/stage-bundles/preact/chunks/validateStorePayload-7A2INWJV.js +0 -61
  794. package/dist/stage-bundles/preact/chunks/viewport-OTNUF4XI.js +0 -21
  795. package/dist/stage-bundles/preact/chunks/window-73DBL24T.js +0 -32
  796. package/dist/stage-bundles/react/chunks/addAction-UV7MSISB.js +0 -9
  797. package/dist/stage-bundles/react/chunks/addAnimationBinding-M4VWTNNB.js +0 -7
  798. package/dist/stage-bundles/react/chunks/addAttribute-V4C3VUVK.js +0 -12
  799. package/dist/stage-bundles/react/chunks/addComponent-GUOHFGDG.js +0 -14
  800. package/dist/stage-bundles/react/chunks/addComputed-N3SUFIVQ.js +0 -9
  801. package/dist/stage-bundles/react/chunks/addEvent-GQCCRSGP.js +0 -11
  802. package/dist/stage-bundles/react/chunks/addLifecycleHook-GC5MHVSH.js +0 -8
  803. package/dist/stage-bundles/react/chunks/addNode-TX462HCE.js +0 -19
  804. package/dist/stage-bundles/react/chunks/addOption-7T3ZUC3A.js +0 -8
  805. package/dist/stage-bundles/react/chunks/addParamToRoute-Q6Z5A6RQ.js +0 -7
  806. package/dist/stage-bundles/react/chunks/addState-IKDWEJIW.js +0 -11
  807. package/dist/stage-bundles/react/chunks/addStore-SR7UK24M.js +0 -7
  808. package/dist/stage-bundles/react/chunks/addToken-2G5DPV5Z.js +0 -8
  809. package/dist/stage-bundles/react/chunks/addValue-UYM36PD7.js +0 -8
  810. package/dist/stage-bundles/react/chunks/aiRelay-RULC7GEA.js +0 -184
  811. package/dist/stage-bundles/react/chunks/assets-24YGC7SD.js +0 -42
  812. package/dist/stage-bundles/react/chunks/bootstrap-6YUSZ2AL.js +0 -4080
  813. package/dist/stage-bundles/react/chunks/chunk-22J4JOPG.js +0 -9
  814. package/dist/stage-bundles/react/chunks/chunk-236DY7EE.js +0 -92
  815. package/dist/stage-bundles/react/chunks/chunk-2H2EQ2RG.js +0 -24
  816. package/dist/stage-bundles/react/chunks/chunk-2Y25YY3N.js +0 -12
  817. package/dist/stage-bundles/react/chunks/chunk-3BDWFE4Q.js +0 -1353
  818. package/dist/stage-bundles/react/chunks/chunk-3MJKS6VX.js +0 -19
  819. package/dist/stage-bundles/react/chunks/chunk-3NLDBJQD.js +0 -12
  820. package/dist/stage-bundles/react/chunks/chunk-5C4ODH2L.js +0 -198
  821. package/dist/stage-bundles/react/chunks/chunk-5EXNWE4S.js +0 -4290
  822. package/dist/stage-bundles/react/chunks/chunk-65Q2CFW7.js +0 -18
  823. package/dist/stage-bundles/react/chunks/chunk-667SIQGW.js +0 -12
  824. package/dist/stage-bundles/react/chunks/chunk-6B6PKOOA.js +0 -140
  825. package/dist/stage-bundles/react/chunks/chunk-6BXKZHN6.js +0 -19
  826. package/dist/stage-bundles/react/chunks/chunk-6E57QUN7.js +0 -21
  827. package/dist/stage-bundles/react/chunks/chunk-6QYYO5LM.js +0 -12
  828. package/dist/stage-bundles/react/chunks/chunk-6R3QXFFF.js +0 -47
  829. package/dist/stage-bundles/react/chunks/chunk-6RLI7CFQ.js +0 -12
  830. package/dist/stage-bundles/react/chunks/chunk-6TDZGYJG.js +0 -13
  831. package/dist/stage-bundles/react/chunks/chunk-7MWSPEGH.js +0 -172
  832. package/dist/stage-bundles/react/chunks/chunk-A65NYJEZ.js +0 -157
  833. package/dist/stage-bundles/react/chunks/chunk-ABVPSM2D.js +0 -278
  834. package/dist/stage-bundles/react/chunks/chunk-AI3MQHWR.js +0 -51
  835. package/dist/stage-bundles/react/chunks/chunk-BWZPEI76.js +0 -18
  836. package/dist/stage-bundles/react/chunks/chunk-CHZVDVQC.js +0 -8
  837. package/dist/stage-bundles/react/chunks/chunk-CJOJNMRC.js +0 -8
  838. package/dist/stage-bundles/react/chunks/chunk-CXATTVPL.js +0 -24
  839. package/dist/stage-bundles/react/chunks/chunk-DBHMBCBM.js +0 -14
  840. package/dist/stage-bundles/react/chunks/chunk-DCKGUW2M.js +0 -8
  841. package/dist/stage-bundles/react/chunks/chunk-EB5FGFFG.js +0 -12
  842. package/dist/stage-bundles/react/chunks/chunk-F6JYAVEC.js +0 -15
  843. package/dist/stage-bundles/react/chunks/chunk-F77HGOQB.js +0 -8
  844. package/dist/stage-bundles/react/chunks/chunk-FSIANI7E.js +0 -11
  845. package/dist/stage-bundles/react/chunks/chunk-FZZDMYBZ.js +0 -12
  846. package/dist/stage-bundles/react/chunks/chunk-H75SQT4U.js +0 -105
  847. package/dist/stage-bundles/react/chunks/chunk-IDGFZWZY.js +0 -13
  848. package/dist/stage-bundles/react/chunks/chunk-IIIXGKVH.js +0 -17
  849. package/dist/stage-bundles/react/chunks/chunk-ILZWSEWK.js +0 -19
  850. package/dist/stage-bundles/react/chunks/chunk-IO3NSIEJ.js +0 -8
  851. package/dist/stage-bundles/react/chunks/chunk-JDIO27MU.js +0 -8
  852. package/dist/stage-bundles/react/chunks/chunk-K7ZULZJF.js +0 -116
  853. package/dist/stage-bundles/react/chunks/chunk-KF4MVCJ6.js +0 -13
  854. package/dist/stage-bundles/react/chunks/chunk-KHURU62K.js +0 -27
  855. package/dist/stage-bundles/react/chunks/chunk-KKLU24SB.js +0 -33
  856. package/dist/stage-bundles/react/chunks/chunk-KOBPYD4N.js +0 -8
  857. package/dist/stage-bundles/react/chunks/chunk-LH4ZDX3T.js +0 -58
  858. package/dist/stage-bundles/react/chunks/chunk-M3YT4JBL.js +0 -12
  859. package/dist/stage-bundles/react/chunks/chunk-MAPYANXA.js +0 -8
  860. package/dist/stage-bundles/react/chunks/chunk-MMCB6GGX.js +0 -8
  861. package/dist/stage-bundles/react/chunks/chunk-NCUWZXVZ.js +0 -8
  862. package/dist/stage-bundles/react/chunks/chunk-O3KQTA3H.js +0 -21
  863. package/dist/stage-bundles/react/chunks/chunk-P7UUT7BU.js +0 -12
  864. package/dist/stage-bundles/react/chunks/chunk-PHVB7SAE.js +0 -22
  865. package/dist/stage-bundles/react/chunks/chunk-PKSFATQY.js +0 -10
  866. package/dist/stage-bundles/react/chunks/chunk-PU2GET2S.js +0 -18
  867. package/dist/stage-bundles/react/chunks/chunk-QBXKRHK5.js +0 -11
  868. package/dist/stage-bundles/react/chunks/chunk-QCQXLZJH.js +0 -18
  869. package/dist/stage-bundles/react/chunks/chunk-QIOKODGT.js +0 -14
  870. package/dist/stage-bundles/react/chunks/chunk-QTTED7GZ.js +0 -49
  871. package/dist/stage-bundles/react/chunks/chunk-QVH24VHP.js +0 -473
  872. package/dist/stage-bundles/react/chunks/chunk-R5DUYWXP.js +0 -8
  873. package/dist/stage-bundles/react/chunks/chunk-RCIDQRAS.js +0 -54
  874. package/dist/stage-bundles/react/chunks/chunk-RI7XWDHX.js +0 -10
  875. package/dist/stage-bundles/react/chunks/chunk-RZDFRJVR.js +0 -13065
  876. package/dist/stage-bundles/react/chunks/chunk-RZG5LCPH.js +0 -12
  877. package/dist/stage-bundles/react/chunks/chunk-S4NZQRJJ.js +0 -12
  878. package/dist/stage-bundles/react/chunks/chunk-S5L2YBXG.js +0 -143
  879. package/dist/stage-bundles/react/chunks/chunk-SF5BLQ7P.js +0 -14
  880. package/dist/stage-bundles/react/chunks/chunk-SPTKNGHA.js +0 -14
  881. package/dist/stage-bundles/react/chunks/chunk-TKHCH4WB.js +0 -35
  882. package/dist/stage-bundles/react/chunks/chunk-TVB3GD7L.js +0 -8
  883. package/dist/stage-bundles/react/chunks/chunk-TVGXBOIT.js +0 -18
  884. package/dist/stage-bundles/react/chunks/chunk-U7U7L7XZ.js +0 -31
  885. package/dist/stage-bundles/react/chunks/chunk-UHGV762U.js +0 -12
  886. package/dist/stage-bundles/react/chunks/chunk-V6MKKC23.js +0 -18
  887. package/dist/stage-bundles/react/chunks/chunk-VK4FEQKG.js +0 -18
  888. package/dist/stage-bundles/react/chunks/chunk-VZNGMF63.js +0 -12
  889. package/dist/stage-bundles/react/chunks/chunk-W5CGYUVM.js +0 -8
  890. package/dist/stage-bundles/react/chunks/chunk-W7QH4UII.js +0 -54
  891. package/dist/stage-bundles/react/chunks/chunk-WMV5J37V.js +0 -8
  892. package/dist/stage-bundles/react/chunks/chunk-WXDXWNWW.js +0 -8
  893. package/dist/stage-bundles/react/chunks/chunk-XKFPCFZH.js +0 -8
  894. package/dist/stage-bundles/react/chunks/chunk-XVJJ3LG4.js +0 -528
  895. package/dist/stage-bundles/react/chunks/chunk-YCZNHFZA.js +0 -15
  896. package/dist/stage-bundles/react/chunks/chunk-YEEGISBQ.js +0 -23
  897. package/dist/stage-bundles/react/chunks/chunk-YM3NAGCN.js +0 -8
  898. package/dist/stage-bundles/react/chunks/chunk-YMVTSVEM.js +0 -26
  899. package/dist/stage-bundles/react/chunks/chunk-ZHZLVPR6.js +0 -68
  900. package/dist/stage-bundles/react/chunks/chunk-ZP3VSN3A.js +0 -12093
  901. package/dist/stage-bundles/react/chunks/clearDestination-KO6YHLX2.js +0 -7
  902. package/dist/stage-bundles/react/chunks/clearName-AAUKJ3OX.js +0 -7
  903. package/dist/stage-bundles/react/chunks/clearOptionsExpression-YGCMAZEE.js +0 -7
  904. package/dist/stage-bundles/react/chunks/clearRender-TTNIVIPG.js +0 -7
  905. package/dist/stage-bundles/react/chunks/clearRepeat-AZLSTBXI.js +0 -7
  906. package/dist/stage-bundles/react/chunks/contentEditor-HE34KY6R.js +0 -67
  907. package/dist/stage-bundles/react/chunks/createAction-N6UW7YDP.js +0 -8
  908. package/dist/stage-bundles/react/chunks/createAnimation-RIBXIT62.js +0 -7
  909. package/dist/stage-bundles/react/chunks/createComputed-KKULWYID.js +0 -8
  910. package/dist/stage-bundles/react/chunks/createTextContent-R5YRKNJL.js +0 -10
  911. package/dist/stage-bundles/react/chunks/createValue-SL4Y3LPI.js +0 -7
  912. package/dist/stage-bundles/react/chunks/disconnectNode-J6YACRLT.js +0 -8
  913. package/dist/stage-bundles/react/chunks/history-KTZZH7TG.js +0 -51
  914. package/dist/stage-bundles/react/chunks/id-WBHG2QOH.js +0 -53
  915. package/dist/stage-bundles/react/chunks/main-EMRULEYO.js +0 -103
  916. package/dist/stage-bundles/react/chunks/main-IVVVSUSO.js +0 -109
  917. package/dist/stage-bundles/react/chunks/main-Y7QHSAW7.js +0 -154
  918. package/dist/stage-bundles/react/chunks/main-YSWDZAGN.js +0 -31
  919. package/dist/stage-bundles/react/chunks/moveNodeToLastChildOf-IUKGA7IO.js +0 -12
  920. package/dist/stage-bundles/react/chunks/nodeGraph-GGV7TAPQ.js +0 -53
  921. package/dist/stage-bundles/react/chunks/normalizeEventName-EWVVRI6K.js +0 -128
  922. package/dist/stage-bundles/react/chunks/normalizeLayoutContext-TO4WKUWF.js +0 -9
  923. package/dist/stage-bundles/react/chunks/preview-bootstrap-FVKBRYC5.js +0 -137
  924. package/dist/stage-bundles/react/chunks/react-GONY7QDQ.js +0 -44
  925. package/dist/stage-bundles/react/chunks/removeAction-4PGYJ6CA.js +0 -7
  926. package/dist/stage-bundles/react/chunks/removeAnimationBinding-3SYE7FD3.js +0 -7
  927. package/dist/stage-bundles/react/chunks/removeAttribute-4QEKTGTP.js +0 -7
  928. package/dist/stage-bundles/react/chunks/removeComputed-5J772TBY.js +0 -7
  929. package/dist/stage-bundles/react/chunks/removeEvent-7ODGVHMT.js +0 -7
  930. package/dist/stage-bundles/react/chunks/removeLifecycleHook-3XIZU6TW.js +0 -7
  931. package/dist/stage-bundles/react/chunks/removeNode-DY2ULYNK.js +0 -10
  932. package/dist/stage-bundles/react/chunks/removeOption-V4NBH6EE.js +0 -7
  933. package/dist/stage-bundles/react/chunks/removeParamFromRoute-IMXTBRSZ.js +0 -7
  934. package/dist/stage-bundles/react/chunks/removeState-EBT6YGSZ.js +0 -7
  935. package/dist/stage-bundles/react/chunks/removeStore-UJA67G3O.js +0 -7
  936. package/dist/stage-bundles/react/chunks/removeToken-EDVBR3OL.js +0 -7
  937. package/dist/stage-bundles/react/chunks/removeValue-UPOTPB3T.js +0 -7
  938. package/dist/stage-bundles/react/chunks/screen-capture-bootstrap-XMTHAMIX.js +0 -128
  939. package/dist/stage-bundles/react/chunks/setDestination-M6MQACBQ.js +0 -7
  940. package/dist/stage-bundles/react/chunks/setHomePage-4U4Z3RU7.js +0 -7
  941. package/dist/stage-bundles/react/chunks/setHtmlId-MN7AQG5H.js +0 -7
  942. package/dist/stage-bundles/react/chunks/setName-W4MXGWGB.js +0 -7
  943. package/dist/stage-bundles/react/chunks/setNodeLayout-K2VNUD2H.js +0 -10
  944. package/dist/stage-bundles/react/chunks/setOptionsExpression-KQLKXH4C.js +0 -8
  945. package/dist/stage-bundles/react/chunks/setRender-UJAXCTRA.js +0 -10
  946. package/dist/stage-bundles/react/chunks/setRepeat-X5GZ4F2P.js +0 -10
  947. package/dist/stage-bundles/react/chunks/setTagName-5DMTFJTJ.js +0 -7
  948. package/dist/stage-bundles/react/chunks/updateAction-6KYOHLA3.js +0 -9
  949. package/dist/stage-bundles/react/chunks/updateAnimationBinding-SENX3Z5S.js +0 -7
  950. package/dist/stage-bundles/react/chunks/updateAttribute-VWGV37R7.js +0 -12
  951. package/dist/stage-bundles/react/chunks/updateBounds-WKOI6XJ3.js +0 -7
  952. package/dist/stage-bundles/react/chunks/updateComputed-7QBBBXFC.js +0 -9
  953. package/dist/stage-bundles/react/chunks/updateEvent-4PDSQ3Q4.js +0 -11
  954. package/dist/stage-bundles/react/chunks/updateHtml-EJFF2LPA.js +0 -7
  955. package/dist/stage-bundles/react/chunks/updateLifecycleHook-36JI5KSF.js +0 -8
  956. package/dist/stage-bundles/react/chunks/updateOption-ZEZ4TP7K.js +0 -8
  957. package/dist/stage-bundles/react/chunks/updateRoute-P5OTKOOG.js +0 -7
  958. package/dist/stage-bundles/react/chunks/updateState-B2RIQRWF.js +0 -11
  959. package/dist/stage-bundles/react/chunks/updateStyle-FN7CGZTJ.js +0 -7
  960. package/dist/stage-bundles/react/chunks/updateToken-DMJBW7ZK.js +0 -7
  961. package/dist/stage-bundles/react/chunks/updateValue-6FPRH4CG.js +0 -8
  962. package/dist/stage-bundles/react/chunks/user-MDIKS6ZN.js +0 -44
  963. package/dist/stage-bundles/react/chunks/validateStorePayload-HE65PPAB.js +0 -61
  964. package/dist/stage-bundles/react/chunks/viewport-DKL3EJOU.js +0 -21
  965. package/dist/stage-bundles/react/chunks/window-RCEXDLL7.js +0 -32
  966. package/dist/stage-bundles/vue/chunks/addAction-5FCPHQHB.js +0 -9
  967. package/dist/stage-bundles/vue/chunks/addAnimationBinding-5UBXLWDB.js +0 -7
  968. package/dist/stage-bundles/vue/chunks/addAttribute-PWIHRX6Y.js +0 -12
  969. package/dist/stage-bundles/vue/chunks/addComponent-77PUZWLS.js +0 -14
  970. package/dist/stage-bundles/vue/chunks/addComputed-5J47SS67.js +0 -9
  971. package/dist/stage-bundles/vue/chunks/addEvent-P2KGVMLM.js +0 -11
  972. package/dist/stage-bundles/vue/chunks/addLifecycleHook-VSOAZGTG.js +0 -8
  973. package/dist/stage-bundles/vue/chunks/addNode-DMJXP7VV.js +0 -19
  974. package/dist/stage-bundles/vue/chunks/addOption-3U3LAV4C.js +0 -8
  975. package/dist/stage-bundles/vue/chunks/addParamToRoute-43UDJ4YE.js +0 -7
  976. package/dist/stage-bundles/vue/chunks/addState-ZWDA2CLN.js +0 -11
  977. package/dist/stage-bundles/vue/chunks/addStore-A4CRKMPO.js +0 -7
  978. package/dist/stage-bundles/vue/chunks/addToken-7P5NGEG4.js +0 -8
  979. package/dist/stage-bundles/vue/chunks/addValue-VQW7HQX7.js +0 -8
  980. package/dist/stage-bundles/vue/chunks/aiRelay-TFBJ7BF4.js +0 -184
  981. package/dist/stage-bundles/vue/chunks/assets-3W46CFCY.js +0 -42
  982. package/dist/stage-bundles/vue/chunks/bootstrap-Y4GN2FZZ.js +0 -4078
  983. package/dist/stage-bundles/vue/chunks/chunk-22J4JOPG.js +0 -9
  984. package/dist/stage-bundles/vue/chunks/chunk-2H2EQ2RG.js +0 -24
  985. package/dist/stage-bundles/vue/chunks/chunk-2Y25YY3N.js +0 -12
  986. package/dist/stage-bundles/vue/chunks/chunk-3MJKS6VX.js +0 -19
  987. package/dist/stage-bundles/vue/chunks/chunk-3N472G56.js +0 -4290
  988. package/dist/stage-bundles/vue/chunks/chunk-3NLDBJQD.js +0 -12
  989. package/dist/stage-bundles/vue/chunks/chunk-442CZ2YL.js +0 -144
  990. package/dist/stage-bundles/vue/chunks/chunk-44GL4NDX.js +0 -25863
  991. package/dist/stage-bundles/vue/chunks/chunk-4A4WKSGY.js +0 -66
  992. package/dist/stage-bundles/vue/chunks/chunk-4VX5AMMQ.js +0 -54
  993. package/dist/stage-bundles/vue/chunks/chunk-65Q2CFW7.js +0 -18
  994. package/dist/stage-bundles/vue/chunks/chunk-667SIQGW.js +0 -12
  995. package/dist/stage-bundles/vue/chunks/chunk-6BXKZHN6.js +0 -19
  996. package/dist/stage-bundles/vue/chunks/chunk-6E57QUN7.js +0 -21
  997. package/dist/stage-bundles/vue/chunks/chunk-6QYYO5LM.js +0 -12
  998. package/dist/stage-bundles/vue/chunks/chunk-6R3QXFFF.js +0 -47
  999. package/dist/stage-bundles/vue/chunks/chunk-6RLI7CFQ.js +0 -12
  1000. package/dist/stage-bundles/vue/chunks/chunk-6TDZGYJG.js +0 -13
  1001. package/dist/stage-bundles/vue/chunks/chunk-AI3MQHWR.js +0 -51
  1002. package/dist/stage-bundles/vue/chunks/chunk-BWZPEI76.js +0 -18
  1003. package/dist/stage-bundles/vue/chunks/chunk-CHZVDVQC.js +0 -8
  1004. package/dist/stage-bundles/vue/chunks/chunk-CJOJNMRC.js +0 -8
  1005. package/dist/stage-bundles/vue/chunks/chunk-CXATTVPL.js +0 -24
  1006. package/dist/stage-bundles/vue/chunks/chunk-DBHMBCBM.js +0 -14
  1007. package/dist/stage-bundles/vue/chunks/chunk-DCKGUW2M.js +0 -8
  1008. package/dist/stage-bundles/vue/chunks/chunk-EB5FGFFG.js +0 -12
  1009. package/dist/stage-bundles/vue/chunks/chunk-F6JYAVEC.js +0 -15
  1010. package/dist/stage-bundles/vue/chunks/chunk-F77HGOQB.js +0 -8
  1011. package/dist/stage-bundles/vue/chunks/chunk-FSIANI7E.js +0 -11
  1012. package/dist/stage-bundles/vue/chunks/chunk-FZZDMYBZ.js +0 -12
  1013. package/dist/stage-bundles/vue/chunks/chunk-GI5C7GB7.js +0 -12838
  1014. package/dist/stage-bundles/vue/chunks/chunk-H75SQT4U.js +0 -105
  1015. package/dist/stage-bundles/vue/chunks/chunk-IDGFZWZY.js +0 -13
  1016. package/dist/stage-bundles/vue/chunks/chunk-IIIXGKVH.js +0 -17
  1017. package/dist/stage-bundles/vue/chunks/chunk-ILZWSEWK.js +0 -19
  1018. package/dist/stage-bundles/vue/chunks/chunk-IO3NSIEJ.js +0 -8
  1019. package/dist/stage-bundles/vue/chunks/chunk-IRDAUQG3.js +0 -49
  1020. package/dist/stage-bundles/vue/chunks/chunk-ISOZDDO2.js +0 -157
  1021. package/dist/stage-bundles/vue/chunks/chunk-IVU4565D.js +0 -26
  1022. package/dist/stage-bundles/vue/chunks/chunk-JDIO27MU.js +0 -8
  1023. package/dist/stage-bundles/vue/chunks/chunk-JJVRBJGQ.js +0 -1353
  1024. package/dist/stage-bundles/vue/chunks/chunk-JKOWPFOY.js +0 -172
  1025. package/dist/stage-bundles/vue/chunks/chunk-K7ZULZJF.js +0 -116
  1026. package/dist/stage-bundles/vue/chunks/chunk-KF4MVCJ6.js +0 -13
  1027. package/dist/stage-bundles/vue/chunks/chunk-KHURU62K.js +0 -27
  1028. package/dist/stage-bundles/vue/chunks/chunk-KKLU24SB.js +0 -33
  1029. package/dist/stage-bundles/vue/chunks/chunk-KOBPYD4N.js +0 -8
  1030. package/dist/stage-bundles/vue/chunks/chunk-LH4ZDX3T.js +0 -58
  1031. package/dist/stage-bundles/vue/chunks/chunk-M3YT4JBL.js +0 -12
  1032. package/dist/stage-bundles/vue/chunks/chunk-MAPYANXA.js +0 -8
  1033. package/dist/stage-bundles/vue/chunks/chunk-MMCB6GGX.js +0 -8
  1034. package/dist/stage-bundles/vue/chunks/chunk-NCUWZXVZ.js +0 -8
  1035. package/dist/stage-bundles/vue/chunks/chunk-O3KQTA3H.js +0 -21
  1036. package/dist/stage-bundles/vue/chunks/chunk-P7UUT7BU.js +0 -12
  1037. package/dist/stage-bundles/vue/chunks/chunk-PHVB7SAE.js +0 -22
  1038. package/dist/stage-bundles/vue/chunks/chunk-PKSFATQY.js +0 -10
  1039. package/dist/stage-bundles/vue/chunks/chunk-PU2GET2S.js +0 -18
  1040. package/dist/stage-bundles/vue/chunks/chunk-QBXKRHK5.js +0 -11
  1041. package/dist/stage-bundles/vue/chunks/chunk-QCQXLZJH.js +0 -18
  1042. package/dist/stage-bundles/vue/chunks/chunk-QIOKODGT.js +0 -14
  1043. package/dist/stage-bundles/vue/chunks/chunk-R5DUYWXP.js +0 -8
  1044. package/dist/stage-bundles/vue/chunks/chunk-RHAVY7VB.js +0 -92
  1045. package/dist/stage-bundles/vue/chunks/chunk-RI7XWDHX.js +0 -10
  1046. package/dist/stage-bundles/vue/chunks/chunk-RZG5LCPH.js +0 -12
  1047. package/dist/stage-bundles/vue/chunks/chunk-S4NZQRJJ.js +0 -12
  1048. package/dist/stage-bundles/vue/chunks/chunk-S5L2YBXG.js +0 -143
  1049. package/dist/stage-bundles/vue/chunks/chunk-SF5BLQ7P.js +0 -14
  1050. package/dist/stage-bundles/vue/chunks/chunk-SKOTGWTH.js +0 -140
  1051. package/dist/stage-bundles/vue/chunks/chunk-SPTKNGHA.js +0 -14
  1052. package/dist/stage-bundles/vue/chunks/chunk-TKHCH4WB.js +0 -35
  1053. package/dist/stage-bundles/vue/chunks/chunk-TVB3GD7L.js +0 -8
  1054. package/dist/stage-bundles/vue/chunks/chunk-TVGXBOIT.js +0 -18
  1055. package/dist/stage-bundles/vue/chunks/chunk-U7U7L7XZ.js +0 -31
  1056. package/dist/stage-bundles/vue/chunks/chunk-UFHA3ODE.js +0 -528
  1057. package/dist/stage-bundles/vue/chunks/chunk-UHGV762U.js +0 -12
  1058. package/dist/stage-bundles/vue/chunks/chunk-V6MKKC23.js +0 -18
  1059. package/dist/stage-bundles/vue/chunks/chunk-VK4FEQKG.js +0 -18
  1060. package/dist/stage-bundles/vue/chunks/chunk-VZNGMF63.js +0 -12
  1061. package/dist/stage-bundles/vue/chunks/chunk-W5CGYUVM.js +0 -8
  1062. package/dist/stage-bundles/vue/chunks/chunk-W7QH4UII.js +0 -54
  1063. package/dist/stage-bundles/vue/chunks/chunk-WMV5J37V.js +0 -8
  1064. package/dist/stage-bundles/vue/chunks/chunk-WXDXWNWW.js +0 -8
  1065. package/dist/stage-bundles/vue/chunks/chunk-XKFPCFZH.js +0 -8
  1066. package/dist/stage-bundles/vue/chunks/chunk-YCZNHFZA.js +0 -15
  1067. package/dist/stage-bundles/vue/chunks/chunk-YEEGISBQ.js +0 -23
  1068. package/dist/stage-bundles/vue/chunks/chunk-YM3NAGCN.js +0 -8
  1069. package/dist/stage-bundles/vue/chunks/clearDestination-EMCIEDAP.js +0 -7
  1070. package/dist/stage-bundles/vue/chunks/clearName-O7J77F77.js +0 -7
  1071. package/dist/stage-bundles/vue/chunks/clearOptionsExpression-RGDXKYVX.js +0 -7
  1072. package/dist/stage-bundles/vue/chunks/clearRender-DFMNHXXQ.js +0 -7
  1073. package/dist/stage-bundles/vue/chunks/clearRepeat-436RGATR.js +0 -7
  1074. package/dist/stage-bundles/vue/chunks/contentEditor-XVLK5LYS.js +0 -67
  1075. package/dist/stage-bundles/vue/chunks/createAction-CKUAX4TU.js +0 -8
  1076. package/dist/stage-bundles/vue/chunks/createAnimation-URI5366N.js +0 -7
  1077. package/dist/stage-bundles/vue/chunks/createComputed-I23CA5NX.js +0 -8
  1078. package/dist/stage-bundles/vue/chunks/createTextContent-K4G7KNQ5.js +0 -10
  1079. package/dist/stage-bundles/vue/chunks/createValue-D5MP2SMM.js +0 -7
  1080. package/dist/stage-bundles/vue/chunks/disconnectNode-GM5F3ZMB.js +0 -8
  1081. package/dist/stage-bundles/vue/chunks/history-7PFZW7N6.js +0 -51
  1082. package/dist/stage-bundles/vue/chunks/id-VSNJWKHU.js +0 -53
  1083. package/dist/stage-bundles/vue/chunks/main-GQD7B74Q.js +0 -103
  1084. package/dist/stage-bundles/vue/chunks/main-L3KI7XBW.js +0 -154
  1085. package/dist/stage-bundles/vue/chunks/main-SWZDSGE3.js +0 -109
  1086. package/dist/stage-bundles/vue/chunks/main-ULK5YAYM.js +0 -31
  1087. package/dist/stage-bundles/vue/chunks/moveNodeToLastChildOf-X46IGL47.js +0 -12
  1088. package/dist/stage-bundles/vue/chunks/nodeGraph-TTOC6H4R.js +0 -53
  1089. package/dist/stage-bundles/vue/chunks/normalizeEventName-2JPOX7Y6.js +0 -128
  1090. package/dist/stage-bundles/vue/chunks/normalizeLayoutContext-SY3L4IB7.js +0 -9
  1091. package/dist/stage-bundles/vue/chunks/preview-bootstrap-SIVRGDR2.js +0 -135
  1092. package/dist/stage-bundles/vue/chunks/removeAction-PPAIVTW3.js +0 -7
  1093. package/dist/stage-bundles/vue/chunks/removeAnimationBinding-UQ24BSXP.js +0 -7
  1094. package/dist/stage-bundles/vue/chunks/removeAttribute-P2IDGOQH.js +0 -7
  1095. package/dist/stage-bundles/vue/chunks/removeComputed-7C66NNZA.js +0 -7
  1096. package/dist/stage-bundles/vue/chunks/removeEvent-KTSOCV4C.js +0 -7
  1097. package/dist/stage-bundles/vue/chunks/removeLifecycleHook-NKXLF3QT.js +0 -7
  1098. package/dist/stage-bundles/vue/chunks/removeNode-A7C34C42.js +0 -10
  1099. package/dist/stage-bundles/vue/chunks/removeOption-6HW62A5Y.js +0 -7
  1100. package/dist/stage-bundles/vue/chunks/removeParamFromRoute-LIKPDVU4.js +0 -7
  1101. package/dist/stage-bundles/vue/chunks/removeState-PO6J3JYQ.js +0 -7
  1102. package/dist/stage-bundles/vue/chunks/removeStore-5ZZ57NHV.js +0 -7
  1103. package/dist/stage-bundles/vue/chunks/removeToken-BKJE3U6Q.js +0 -7
  1104. package/dist/stage-bundles/vue/chunks/removeValue-5FNPXWNL.js +0 -7
  1105. package/dist/stage-bundles/vue/chunks/screen-capture-bootstrap-GV75P6QF.js +0 -126
  1106. package/dist/stage-bundles/vue/chunks/setDestination-DAYIYYIV.js +0 -7
  1107. package/dist/stage-bundles/vue/chunks/setHomePage-MHCP4P24.js +0 -7
  1108. package/dist/stage-bundles/vue/chunks/setHtmlId-3HYPFT3T.js +0 -7
  1109. package/dist/stage-bundles/vue/chunks/setName-OQOO3URG.js +0 -7
  1110. package/dist/stage-bundles/vue/chunks/setNodeLayout-W5QFJBKT.js +0 -10
  1111. package/dist/stage-bundles/vue/chunks/setOptionsExpression-XZZOJPCM.js +0 -8
  1112. package/dist/stage-bundles/vue/chunks/setRender-NHXZZGME.js +0 -10
  1113. package/dist/stage-bundles/vue/chunks/setRepeat-YZTZFDTQ.js +0 -10
  1114. package/dist/stage-bundles/vue/chunks/setTagName-EGPQ66XI.js +0 -7
  1115. package/dist/stage-bundles/vue/chunks/updateAction-ZSNXUEQA.js +0 -9
  1116. package/dist/stage-bundles/vue/chunks/updateAnimationBinding-X2UXYQKJ.js +0 -7
  1117. package/dist/stage-bundles/vue/chunks/updateAttribute-ODXM7YXA.js +0 -12
  1118. package/dist/stage-bundles/vue/chunks/updateBounds-PEGOZ4FT.js +0 -7
  1119. package/dist/stage-bundles/vue/chunks/updateComputed-6LNN453F.js +0 -9
  1120. package/dist/stage-bundles/vue/chunks/updateEvent-ZHCKBJIM.js +0 -11
  1121. package/dist/stage-bundles/vue/chunks/updateHtml-6BPU5PRY.js +0 -7
  1122. package/dist/stage-bundles/vue/chunks/updateLifecycleHook-JEMQQYM5.js +0 -8
  1123. package/dist/stage-bundles/vue/chunks/updateOption-SH33P5WW.js +0 -8
  1124. package/dist/stage-bundles/vue/chunks/updateRoute-3RRPY2T5.js +0 -7
  1125. package/dist/stage-bundles/vue/chunks/updateState-WRLF4SSC.js +0 -11
  1126. package/dist/stage-bundles/vue/chunks/updateStyle-WAPTDAU5.js +0 -7
  1127. package/dist/stage-bundles/vue/chunks/updateToken-CFIIILXB.js +0 -7
  1128. package/dist/stage-bundles/vue/chunks/updateValue-JTEEC2B6.js +0 -8
  1129. package/dist/stage-bundles/vue/chunks/user-ZLGCTRZX.js +0 -44
  1130. package/dist/stage-bundles/vue/chunks/validateStorePayload-7A2INWJV.js +0 -61
  1131. package/dist/stage-bundles/vue/chunks/viewport-OTNUF4XI.js +0 -21
  1132. package/dist/stage-bundles/vue/chunks/vue-2GZIKYJR.js +0 -37
  1133. package/dist/stage-bundles/vue/chunks/window-73DBL24T.js +0 -32
  1134. package/dist/stage-src/dev/bootstrap.js +0 -44
  1135. package/dist/stage-src/dev/componentsConfig.js +0 -52
  1136. package/dist/stage-src/dev/config.js +0 -49
  1137. package/dist/stage-src/dev/routes/dev.js +0 -35
  1138. package/dist/stage-src/dev/routes/js.js +0 -110
  1139. package/dist/stage-src/dev/views/index.js +0 -34
  1140. package/dist/stage-src/preview/config.js +0 -49
  1141. package/dist/templates/.gitignore.template +0 -29
  1142. package/dist/templates/index.html.template +0 -17
  1143. package/dist/templates/jucie.config.js.template +0 -15
  1144. package/dist/templates/package.json.template +0 -14
  1145. package/dist/templates/sceneGraph/wal.log +0 -0
  1146. /package/dist/stage/chunks/{chunk-2SXGPNIX.js → chunk-TS6FANUG.js} +0 -0
  1147. /package/dist/stage/chunks/{contentEditor-VMXQHHFX.js → contentEditor-PCXXWARK.js} +0 -0
  1148. /package/dist/stage/chunks/{viewport-UOMSIPMH.js → viewport-ANZ3RTUP.js} +0 -0
@@ -1,4078 +0,0 @@
1
- import {
2
- CREATED,
3
- DELETED,
4
- GLOBAL_TAG,
5
- Plugin,
6
- R,
7
- SceneCompiler,
8
- UPDATED,
9
- createMarker,
10
- decode,
11
- decodeAddress,
12
- dispatch,
13
- elements,
14
- encode,
15
- encodePath,
16
- f,
17
- f2,
18
- initializeNode,
19
- normalizeSceneViewportKinds,
20
- palette as palette2,
21
- re,
22
- s
23
- } from "./chunk-44GL4NDX.js";
24
- import "./chunk-JKOWPFOY.js";
25
- import "./chunk-ILZWSEWK.js";
26
- import "./chunk-65Q2CFW7.js";
27
- import "./chunk-QIOKODGT.js";
28
- import "./chunk-3N472G56.js";
29
- import "./chunk-3NLDBJQD.js";
30
- import "./chunk-IVU4565D.js";
31
- import {
32
- G,
33
- T,
34
- g,
35
- v
36
- } from "./chunk-JJVRBJGQ.js";
37
- import "./chunk-YCZNHFZA.js";
38
- import "./chunk-YM3NAGCN.js";
39
- import "./chunk-YEEGISBQ.js";
40
- import "./chunk-PU2GET2S.js";
41
- import "./chunk-SPTKNGHA.js";
42
- import "./chunk-6BXKZHN6.js";
43
- import "./chunk-QCQXLZJH.js";
44
- import "./chunk-DBHMBCBM.js";
45
- import "./chunk-W5CGYUVM.js";
46
- import "./chunk-O3KQTA3H.js";
47
- import "./chunk-6RLI7CFQ.js";
48
- import "./chunk-F6JYAVEC.js";
49
- import "./chunk-RI7XWDHX.js";
50
- import "./chunk-UHGV762U.js";
51
- import "./chunk-IIIXGKVH.js";
52
- import "./chunk-FSIANI7E.js";
53
- import "./chunk-CHZVDVQC.js";
54
- import "./chunk-U7U7L7XZ.js";
55
- import "./chunk-CXATTVPL.js";
56
- import "./chunk-CJOJNMRC.js";
57
- import "./chunk-DCKGUW2M.js";
58
- import "./chunk-KF4MVCJ6.js";
59
- import "./chunk-IO3NSIEJ.js";
60
- import "./chunk-MMCB6GGX.js";
61
- import "./chunk-BWZPEI76.js";
62
- import "./chunk-6E57QUN7.js";
63
- import "./chunk-TKHCH4WB.js";
64
- import "./chunk-VZNGMF63.js";
65
- import "./chunk-P7UUT7BU.js";
66
- import "./chunk-EB5FGFFG.js";
67
- import "./chunk-6TDZGYJG.js";
68
- import "./chunk-MAPYANXA.js";
69
- import "./chunk-SF5BLQ7P.js";
70
- import "./chunk-F77HGOQB.js";
71
- import "./chunk-2H2EQ2RG.js";
72
- import "./chunk-XKFPCFZH.js";
73
- import "./chunk-V6MKKC23.js";
74
- import "./chunk-TVB3GD7L.js";
75
- import "./chunk-667SIQGW.js";
76
- import "./chunk-RZG5LCPH.js";
77
- import "./chunk-6QYYO5LM.js";
78
- import "./chunk-JDIO27MU.js";
79
- import "./chunk-ISOZDDO2.js";
80
- import "./chunk-2Y25YY3N.js";
81
- import "./chunk-S4NZQRJJ.js";
82
- import "./chunk-M3YT4JBL.js";
83
- import "./chunk-WMV5J37V.js";
84
- import "./chunk-TVGXBOIT.js";
85
- import "./chunk-VK4FEQKG.js";
86
- import "./chunk-IRDAUQG3.js";
87
- import {
88
- palette
89
- } from "./chunk-6R3QXFFF.js";
90
- import {
91
- PROTOTYPES
92
- } from "./chunk-UFHA3ODE.js";
93
- import "./chunk-RHAVY7VB.js";
94
- import "./chunk-K7ZULZJF.js";
95
- import "./chunk-LH4ZDX3T.js";
96
- import "./chunk-IDGFZWZY.js";
97
- import "./chunk-3MJKS6VX.js";
98
- import "./chunk-KOBPYD4N.js";
99
- import "./chunk-4VX5AMMQ.js";
100
- import "./chunk-SKOTGWTH.js";
101
- import "./chunk-22J4JOPG.js";
102
- import "./chunk-WXDXWNWW.js";
103
- import "./chunk-442CZ2YL.js";
104
- import "./chunk-GI5C7GB7.js";
105
- import "./chunk-KHURU62K.js";
106
- import "./chunk-H75SQT4U.js";
107
- import "./chunk-AI3MQHWR.js";
108
- import "./chunk-S5L2YBXG.js";
109
- import "./chunk-W7QH4UII.js";
110
- import {
111
- __privateAdd,
112
- __privateGet,
113
- __privateMethod,
114
- __privateSet,
115
- __privateWrapper,
116
- __publicField
117
- } from "./chunk-4A4WKSGY.js";
118
-
119
- // ../engine-ai/src/AiGatewayService.js
120
- var RATE_WINDOW_MS = 60 * 60 * 1e3;
121
-
122
- // ../engine-ai/src/defineAiOperations.js
123
- var defineAiOperations = g("AI_OPERATIONS", [Object]);
124
- function extractOperationsMetadata(operationDefinition) {
125
- const namespace = operationDefinition._name;
126
- const operations = operationDefinition();
127
- return {
128
- namespace,
129
- operations: Object.entries(operations).map(([name, op]) => ({
130
- name,
131
- fullName: `${namespace}:${name}`,
132
- alias: op.alias || null,
133
- mcpName: op.mcpName || null,
134
- description: op.description || "",
135
- schema: op.schema || [],
136
- examples: op.examples || [],
137
- returns: op.returns || "Object"
138
- }))
139
- };
140
- }
141
- function validateOperationArgs(args, schema, operationName) {
142
- if (!Array.isArray(schema) || schema.length === 0) {
143
- return true;
144
- }
145
- const typeDef = schema[0];
146
- if (typeof typeDef !== "object" || Array.isArray(typeDef)) {
147
- console.warn(`Schema for ${operationName} should be an object with named parameters`);
148
- return true;
149
- }
150
- for (const [key, typeSpec] of Object.entries(typeDef)) {
151
- const optional = typeof typeSpec === "string" && typeSpec.endsWith("?");
152
- const expectedType = optional ? typeSpec.slice(0, -1) : typeSpec;
153
- const value = args[key];
154
- if (!(key in args) || value === void 0) {
155
- if (optional) continue;
156
- throw new Error(`Missing required parameter "${key}" in ${operationName}`);
157
- }
158
- const actualType = Array.isArray(value) ? "Array" : value === null ? "Null" : typeof value === "object" ? "Object" : value.constructor.name;
159
- if (actualType !== expectedType && expectedType !== "Any") {
160
- throw new Error(
161
- `Parameter "${key}" in ${operationName} must be of type ${expectedType}, got ${actualType}`
162
- );
163
- }
164
- }
165
- return true;
166
- }
167
-
168
- // ../engine-ai/src/buildAnthropicTools.js
169
- var RESPOND_TOOL = {
170
- name: "respond",
171
- description: "Send a conversational response to the user. Use this for greetings, questions, clarifications, status updates, or when the build task is fully complete.",
172
- input_schema: {
173
- type: "object",
174
- properties: {
175
- message: {
176
- type: "string",
177
- description: "Your conversational response to the user"
178
- }
179
- },
180
- required: ["message"]
181
- }
182
- };
183
- function buildAnthropicTools(allOperations2) {
184
- const namespaces = normalizeNamespaces(allOperations2);
185
- return [RESPOND_TOOL, ...namespaces.map(buildNamespaceTool)];
186
- }
187
- function buildNamespaceTool(ns) {
188
- const opDescriptions = ns.operations.map((op) => {
189
- const typeDef = Array.isArray(op.schema) ? op.schema[0] : null;
190
- const params = typeDef && typeof typeDef === "object" ? Object.entries(typeDef).map(([k, t]) => `${k}: ${t}`).join(", ") : "";
191
- const example = op.examples?.[0] ? `
192
- Example: ${JSON.stringify(op.examples[0].args)}` : "";
193
- return ` ${op.name} \u2014 ${op.description}
194
- Args: { ${params} }${example}`;
195
- }).join("\n\n");
196
- return {
197
- name: ns.namespace,
198
- description: `${ns.namespace} operations. Pass "op" as the operation name and "args" matching that op's schema.
199
-
200
- ${opDescriptions}`,
201
- input_schema: {
202
- type: "object",
203
- properties: {
204
- op: {
205
- type: "string",
206
- description: `Operation name within ${ns.namespace}`
207
- },
208
- args: {
209
- type: "object",
210
- description: "Arguments matching the operation's schema"
211
- },
212
- ref: {
213
- type: "string",
214
- description: "Optional {{name}} reference for cross-operation use"
215
- },
216
- message: {
217
- type: "string",
218
- description: "Short explanation of what you are doing (1 sentence)"
219
- }
220
- },
221
- required: ["op", "args"]
222
- }
223
- };
224
- }
225
- function normalizeNamespaces(allOperations2) {
226
- if (!Array.isArray(allOperations2) || allOperations2.length === 0) return [];
227
- if (allOperations2[0]?.namespace && Array.isArray(allOperations2[0]?.operations)) {
228
- return allOperations2;
229
- }
230
- return allOperations2.map((def) => extractOperationsMetadata(def));
231
- }
232
-
233
- // ../engine-ai/src/AiOperations.js
234
- var _operations, _operationDefinitions, _aliases, _names, _AiOperations_instances, setupOperations_fn, resolveReferences_fn;
235
- var AiOperations = class extends v {
236
- constructor() {
237
- super(...arguments);
238
- __privateAdd(this, _AiOperations_instances);
239
- __privateAdd(this, _operations, /* @__PURE__ */ new Map());
240
- // namespace:name → operation
241
- __privateAdd(this, _operationDefinitions, []);
242
- // Store definitions for metadata
243
- __privateAdd(this, _aliases, /* @__PURE__ */ new Map());
244
- // explicit alias → namespace:name
245
- __privateAdd(this, _names, /* @__PURE__ */ new Map());
246
- }
247
- // bare name → namespace:name (null when ambiguous)
248
- getters() {
249
- return {
250
- operationsMetadata: () => this.getOperationsMetadata(),
251
- anthropicTools: () => this.getAnthropicTools()
252
- };
253
- }
254
- actions() {
255
- return {
256
- use: (...operationDefinitions) => {
257
- for (const operationDef of operationDefinitions) {
258
- __privateMethod(this, _AiOperations_instances, setupOperations_fn).call(this, operationDef);
259
- }
260
- return this;
261
- },
262
- has: (type) => __privateGet(this, _operations).has(type),
263
- resolveType: (type) => this.resolveType(type),
264
- describeUnresolved: (type) => this.describeUnresolved(type),
265
- executeOperation: (type, args, ref) => this.executeOperation(type, args, ref),
266
- executeBatch: (response) => this.executeBatch(response)
267
- };
268
- }
269
- /**
270
- * Resolve an operation reference to its full `namespace:name` type.
271
- * Accepts full names, explicit aliases, or unambiguous bare names.
272
- * Returns null when unknown or ambiguous.
273
- */
274
- resolveType(type) {
275
- if (typeof type !== "string" || !type) return null;
276
- if (type.includes(":")) {
277
- return __privateGet(this, _operations).has(type) ? type : null;
278
- }
279
- return __privateGet(this, _aliases).get(type) ?? __privateGet(this, _names).get(type) ?? null;
280
- }
281
- /**
282
- * Human-readable reason a type failed to resolve, or null if it resolves.
283
- */
284
- describeUnresolved(type) {
285
- if (this.resolveType(type)) return null;
286
- if (typeof type === "string" && !type.includes(":") && __privateGet(this, _names).has(type) && __privateGet(this, _names).get(type) === null) {
287
- const candidates = [];
288
- for (const [fullName, operation] of __privateGet(this, _operations)) {
289
- if (operation.name === type) {
290
- candidates.push(operation.alias ? `${fullName} (alias: ${operation.alias})` : fullName);
291
- }
292
- }
293
- const hint = candidates.length ? candidates.join(" or ") : type;
294
- return `Ambiguous operation: "${type}". Use ${hint}.`;
295
- }
296
- return `Unknown operation: ${type}`;
297
- }
298
- /**
299
- * Get metadata for all registered operations (for AI prompt / MCP tools)
300
- */
301
- getOperationsMetadata() {
302
- return __privateGet(this, _operationDefinitions).map((def) => extractOperationsMetadata(def));
303
- }
304
- /**
305
- * Anthropic tool schemas derived from registered operations (one tool per namespace + respond).
306
- */
307
- getAnthropicTools() {
308
- return buildAnthropicTools(__privateGet(this, _operationDefinitions));
309
- }
310
- /**
311
- * Execute a single AI operation
312
- */
313
- async executeOperation(operationType, args, ref = null) {
314
- const resolved = this.resolveType(operationType);
315
- const operation = __privateGet(this, _operations).get(resolved);
316
- if (!operation) {
317
- throw new Error(this.describeUnresolved(operationType));
318
- }
319
- try {
320
- validateOperationArgs(args, operation.schema, operationType);
321
- } catch (error) {
322
- console.error(`Validation failed for ${operationType}:`, error);
323
- throw error;
324
- }
325
- try {
326
- const result = await operation.handler(args);
327
- return { result, ref };
328
- } catch (error) {
329
- console.error(`Handler failed for ${operationType}:`, error);
330
- throw error;
331
- }
332
- }
333
- /**
334
- * Execute a batch of AI operations
335
- */
336
- async executeBatch(response) {
337
- const { operations, description, expectation } = response;
338
- console.log("AiOperations: Executing batch", {
339
- count: operations.length,
340
- description
341
- });
342
- const refMap = /* @__PURE__ */ new Map();
343
- const results = [];
344
- const createdIds = [];
345
- try {
346
- for (let i2 = 0; i2 < operations.length; i2++) {
347
- const op = operations[i2];
348
- console.log(`AiOperations: Executing [${i2 + 1}/${operations.length}] ${op.type}`);
349
- const resolvedArgs = __privateMethod(this, _AiOperations_instances, resolveReferences_fn).call(this, op.args, refMap);
350
- const { result } = await this.executeOperation(op.type, resolvedArgs, op.ref);
351
- const refId = result.id ?? result.rootId;
352
- if (op.ref && refId) {
353
- refMap.set(op.ref, refId);
354
- createdIds.push(refId);
355
- }
356
- if (result.treeMap) {
357
- for (const [ref, id] of Object.entries(result.treeMap)) {
358
- refMap.set(ref, id);
359
- createdIds.push(id);
360
- }
361
- }
362
- if (result.createdIds?.length) {
363
- createdIds.push(...result.createdIds);
364
- }
365
- results.push({
366
- operation: op.type,
367
- success: true,
368
- result
369
- });
370
- }
371
- console.log("AiOperations: Execution complete", {
372
- total: operations.length,
373
- successful: results.length,
374
- createdIds
375
- });
376
- return {
377
- success: true,
378
- description,
379
- expectation,
380
- results,
381
- createdIds,
382
- refMap: Object.fromEntries(refMap)
383
- };
384
- } catch (error) {
385
- console.error("AiOperations: Batch execution failed", error);
386
- return {
387
- success: false,
388
- description,
389
- error: error.message,
390
- failedAt: results.length,
391
- results
392
- };
393
- }
394
- }
395
- };
396
- _operations = new WeakMap();
397
- _operationDefinitions = new WeakMap();
398
- _aliases = new WeakMap();
399
- _names = new WeakMap();
400
- _AiOperations_instances = new WeakSet();
401
- /**
402
- * Setup operations from a definition (similar to MessageChannel's #setupSubscriptions)
403
- */
404
- setupOperations_fn = function(operationFactory) {
405
- const log = this.inject("log");
406
- if (!operationFactory || typeof operationFactory !== "function") {
407
- throw new Error("Operation factory must be a function");
408
- }
409
- const namespace = operationFactory._name;
410
- if (!namespace) {
411
- throw new Error("Operation factory must have a _name property (use defineAiOperations)");
412
- }
413
- log.info(`AiOperations: Registering operations for namespace "${namespace}"`);
414
- __privateGet(this, _operationDefinitions).push(operationFactory);
415
- const operations = operationFactory(this.inject);
416
- for (const [name, operation] of Object.entries(operations)) {
417
- const { handler, schema, description, examples, returns, alias } = operation;
418
- const fullName = `${namespace}:${name}`;
419
- if (!handler || typeof handler !== "function") {
420
- throw new Error(`Operation ${fullName} must have a handler function`);
421
- }
422
- if (!description) {
423
- console.warn(`Operation ${fullName} missing description`);
424
- }
425
- __privateGet(this, _operations).set(fullName, {
426
- namespace,
427
- name,
428
- handler,
429
- schema: schema || [],
430
- description: description || "",
431
- examples: examples || [],
432
- returns: returns || "Object",
433
- alias: alias || null
434
- });
435
- if (alias) {
436
- if (__privateGet(this, _aliases).has(alias) && __privateGet(this, _aliases).get(alias) !== fullName) {
437
- console.warn(`AiOperations: alias "${alias}" already registered for ${__privateGet(this, _aliases).get(alias)}, overriding with ${fullName}`);
438
- }
439
- __privateGet(this, _aliases).set(alias, fullName);
440
- }
441
- if (__privateGet(this, _names).has(name) && __privateGet(this, _names).get(name) !== fullName) {
442
- __privateGet(this, _names).set(name, null);
443
- } else {
444
- __privateGet(this, _names).set(name, fullName);
445
- }
446
- }
447
- };
448
- resolveReferences_fn = function(args, refMap) {
449
- if (!args) return args;
450
- return JSON.parse(JSON.stringify(args), (key, value) => {
451
- if (key === "ref") return value;
452
- if (typeof value === "string" && value.match(/^\{\{.*\}\}$/)) {
453
- const resolved = refMap.get(value) ?? refMap.get(value.replace(/\.[^}]+(?=\}\}$)/, ""));
454
- return resolved ?? value;
455
- }
456
- return value;
457
- });
458
- };
459
- __publicField(AiOperations, "manifest", {
460
- name: "AiOperations",
461
- namespace: "aiOps",
462
- version: "1.0.0",
463
- description: "AI operation registry and executor",
464
- author: "",
465
- license: "MIT",
466
- homepage: ""
467
- });
468
-
469
- // ../engine-lifecycle/src/PageLifecycle.js
470
- var _subscribers, _visible, _focused, _frozen, _lastActiveTimestamp, _sleepCheckInterval, _config, _PageLifecycle_instances, on_fn, off_fn, emit_fn, setupSources_fn, _handleVisibility, _handleFocus, _handleBlur, _handleFreeze, _handleDocResume, _handlePageShow, _handlePageHide, startSleepDetection_fn, teardown_fn;
471
- var PageLifecycle = class extends v {
472
- constructor() {
473
- super(...arguments);
474
- __privateAdd(this, _PageLifecycle_instances);
475
- __privateAdd(this, _subscribers, /* @__PURE__ */ new Map());
476
- __privateAdd(this, _visible, true);
477
- __privateAdd(this, _focused, true);
478
- __privateAdd(this, _frozen, false);
479
- __privateAdd(this, _lastActiveTimestamp, Date.now());
480
- __privateAdd(this, _sleepCheckInterval, null);
481
- __privateAdd(this, _config, null);
482
- __privateAdd(this, _handleVisibility, () => {
483
- const wasVisible = __privateGet(this, _visible);
484
- __privateSet(this, _visible, !document.hidden);
485
- if (__privateGet(this, _visible) && !wasVisible) {
486
- __privateSet(this, _lastActiveTimestamp, Date.now());
487
- __privateMethod(this, _PageLifecycle_instances, emit_fn).call(this, "visible");
488
- } else if (!__privateGet(this, _visible) && wasVisible) {
489
- __privateMethod(this, _PageLifecycle_instances, emit_fn).call(this, "hidden");
490
- }
491
- });
492
- __privateAdd(this, _handleFocus, () => {
493
- __privateSet(this, _focused, true);
494
- __privateSet(this, _lastActiveTimestamp, Date.now());
495
- __privateMethod(this, _PageLifecycle_instances, emit_fn).call(this, "focus");
496
- });
497
- __privateAdd(this, _handleBlur, () => {
498
- __privateSet(this, _focused, false);
499
- __privateMethod(this, _PageLifecycle_instances, emit_fn).call(this, "blur");
500
- });
501
- __privateAdd(this, _handleFreeze, () => {
502
- __privateSet(this, _frozen, true);
503
- __privateMethod(this, _PageLifecycle_instances, emit_fn).call(this, "suspend", { reason: "freeze" });
504
- });
505
- __privateAdd(this, _handleDocResume, () => {
506
- __privateSet(this, _frozen, false);
507
- __privateSet(this, _lastActiveTimestamp, Date.now());
508
- __privateMethod(this, _PageLifecycle_instances, emit_fn).call(this, "resume", { reason: "freeze" });
509
- });
510
- __privateAdd(this, _handlePageShow, (event) => {
511
- if (event.persisted) {
512
- __privateSet(this, _lastActiveTimestamp, Date.now());
513
- __privateMethod(this, _PageLifecycle_instances, emit_fn).call(this, "resume", { reason: "bfcache" });
514
- }
515
- });
516
- __privateAdd(this, _handlePageHide, (event) => {
517
- if (event.persisted) {
518
- __privateMethod(this, _PageLifecycle_instances, emit_fn).call(this, "suspend", { reason: "bfcache" });
519
- }
520
- });
521
- }
522
- initialize() {
523
- if (typeof document !== "undefined") {
524
- __privateSet(this, _visible, !document.hidden);
525
- __privateSet(this, _focused, document.hasFocus());
526
- }
527
- __privateSet(this, _lastActiveTimestamp, Date.now());
528
- }
529
- getters() {
530
- return {
531
- visible: () => __privateGet(this, _visible),
532
- focused: () => __privateGet(this, _focused),
533
- frozen: () => __privateGet(this, _frozen)
534
- };
535
- }
536
- actions(_, config) {
537
- __privateSet(this, _config, config || {});
538
- __privateMethod(this, _PageLifecycle_instances, setupSources_fn).call(this, __privateGet(this, _config));
539
- return {
540
- on: (event, callback) => __privateMethod(this, _PageLifecycle_instances, on_fn).call(this, event, callback),
541
- off: (event, callback) => __privateMethod(this, _PageLifecycle_instances, off_fn).call(this, event, callback),
542
- isVisible: () => __privateGet(this, _visible),
543
- isFocused: () => __privateGet(this, _focused),
544
- isFrozen: () => __privateGet(this, _frozen),
545
- lastActiveTimestamp: () => __privateGet(this, _lastActiveTimestamp),
546
- destroy: () => __privateMethod(this, _PageLifecycle_instances, teardown_fn).call(this)
547
- };
548
- }
549
- destroy() {
550
- __privateMethod(this, _PageLifecycle_instances, teardown_fn).call(this);
551
- }
552
- };
553
- _subscribers = new WeakMap();
554
- _visible = new WeakMap();
555
- _focused = new WeakMap();
556
- _frozen = new WeakMap();
557
- _lastActiveTimestamp = new WeakMap();
558
- _sleepCheckInterval = new WeakMap();
559
- _config = new WeakMap();
560
- _PageLifecycle_instances = new WeakSet();
561
- on_fn = function(event, callback) {
562
- if (!__privateGet(this, _subscribers).has(event)) {
563
- __privateGet(this, _subscribers).set(event, /* @__PURE__ */ new Set());
564
- }
565
- __privateGet(this, _subscribers).get(event).add(callback);
566
- return () => __privateMethod(this, _PageLifecycle_instances, off_fn).call(this, event, callback);
567
- };
568
- off_fn = function(event, callback) {
569
- const callbacks = __privateGet(this, _subscribers).get(event);
570
- if (callbacks) {
571
- callbacks.delete(callback);
572
- if (callbacks.size === 0) {
573
- __privateGet(this, _subscribers).delete(event);
574
- }
575
- }
576
- };
577
- emit_fn = function(event, data) {
578
- const callbacks = __privateGet(this, _subscribers).get(event);
579
- if (callbacks) {
580
- for (const callback of callbacks) {
581
- callback(data);
582
- }
583
- }
584
- };
585
- setupSources_fn = function(config) {
586
- if (typeof document !== "undefined") {
587
- if (config.visibility !== false) {
588
- document.addEventListener("visibilitychange", __privateGet(this, _handleVisibility));
589
- }
590
- if (config.freeze !== false) {
591
- document.addEventListener("freeze", __privateGet(this, _handleFreeze));
592
- document.addEventListener("resume", __privateGet(this, _handleDocResume));
593
- }
594
- }
595
- if (typeof window !== "undefined") {
596
- if (config.focus) {
597
- window.addEventListener("focus", __privateGet(this, _handleFocus));
598
- window.addEventListener("blur", __privateGet(this, _handleBlur));
599
- }
600
- if (config.freeze !== false) {
601
- window.addEventListener("pageshow", __privateGet(this, _handlePageShow));
602
- window.addEventListener("pagehide", __privateGet(this, _handlePageHide));
603
- }
604
- }
605
- if (config.sleepDetection?.enabled !== false) {
606
- const threshold = config.sleepDetection?.threshold || 1e4;
607
- __privateMethod(this, _PageLifecycle_instances, startSleepDetection_fn).call(this, threshold);
608
- }
609
- };
610
- _handleVisibility = new WeakMap();
611
- _handleFocus = new WeakMap();
612
- _handleBlur = new WeakMap();
613
- _handleFreeze = new WeakMap();
614
- _handleDocResume = new WeakMap();
615
- _handlePageShow = new WeakMap();
616
- _handlePageHide = new WeakMap();
617
- startSleepDetection_fn = function(threshold) {
618
- const interval = Math.min(threshold / 2, 5e3);
619
- __privateSet(this, _sleepCheckInterval, setInterval(() => {
620
- const now = Date.now();
621
- const gap = now - __privateGet(this, _lastActiveTimestamp);
622
- if (gap > threshold) {
623
- __privateMethod(this, _PageLifecycle_instances, emit_fn).call(this, "suspend", { reason: "sleep", gap });
624
- __privateMethod(this, _PageLifecycle_instances, emit_fn).call(this, "resume", { reason: "sleep", gap });
625
- }
626
- __privateSet(this, _lastActiveTimestamp, now);
627
- }, interval));
628
- };
629
- teardown_fn = function() {
630
- if (typeof document !== "undefined") {
631
- document.removeEventListener("visibilitychange", __privateGet(this, _handleVisibility));
632
- document.removeEventListener("freeze", __privateGet(this, _handleFreeze));
633
- document.removeEventListener("resume", __privateGet(this, _handleDocResume));
634
- }
635
- if (typeof window !== "undefined") {
636
- window.removeEventListener("focus", __privateGet(this, _handleFocus));
637
- window.removeEventListener("blur", __privateGet(this, _handleBlur));
638
- window.removeEventListener("pageshow", __privateGet(this, _handlePageShow));
639
- window.removeEventListener("pagehide", __privateGet(this, _handlePageHide));
640
- }
641
- if (__privateGet(this, _sleepCheckInterval)) {
642
- clearInterval(__privateGet(this, _sleepCheckInterval));
643
- __privateSet(this, _sleepCheckInterval, null);
644
- }
645
- __privateGet(this, _subscribers).clear();
646
- };
647
- __publicField(PageLifecycle, "manifest", {
648
- name: "PageLifecycle",
649
- namespace: "pageLifecycle",
650
- version: "1.0.0",
651
- description: "Browser lifecycle detection for tab visibility, focus, and sleep/wake"
652
- });
653
-
654
- // ../engine-content-editor/src/utils/getCaretCharacterOffset.js
655
- function getCaretCharacterOffset(element) {
656
- const sel = window.getSelection();
657
- if (sel.rangeCount === 0) {
658
- return { start: 0, end: 0 };
659
- }
660
- const range = sel.getRangeAt(0);
661
- const preStartRange = range.cloneRange();
662
- preStartRange.selectNodeContents(element);
663
- preStartRange.setEnd(range.startContainer, range.startOffset);
664
- const start = preStartRange.toString().length;
665
- const preEndRange = range.cloneRange();
666
- preEndRange.selectNodeContents(element);
667
- preEndRange.setEnd(range.endContainer, range.endOffset);
668
- const end = preEndRange.toString().length;
669
- return {
670
- start: Math.min(start, end),
671
- end: Math.max(start, end)
672
- };
673
- }
674
-
675
- // ../engine-content-editor/src/utils/setCaretToCharacterPosition.js
676
- function setCaretToCharacterPosition(element, position) {
677
- if (!element?.isConnected || position < 0) return;
678
- const walker = document.createTreeWalker(element, NodeFilter.SHOW_TEXT);
679
- let charCount = 0;
680
- let lastNode = null;
681
- for (let node = walker.nextNode(); node; node = walker.nextNode()) {
682
- lastNode = node;
683
- if (position <= charCount + node.length) {
684
- const range = document.createRange();
685
- range.setStart(node, position - charCount);
686
- range.collapse(true);
687
- const sel = window.getSelection();
688
- sel.removeAllRanges();
689
- sel.addRange(range);
690
- return;
691
- }
692
- charCount += node.length;
693
- }
694
- if (lastNode) {
695
- const range = document.createRange();
696
- range.setStart(lastNode, lastNode.length);
697
- range.collapse(true);
698
- const sel = window.getSelection();
699
- sel.removeAllRanges();
700
- sel.addRange(range);
701
- }
702
- }
703
-
704
- // ../engine-content-editor/src/utils/spliceString.js
705
- function spliceString(str, offset, deleteCount = 0, newStr = "") {
706
- return str.slice(0, offset) + newStr + str.slice(offset + deleteCount);
707
- }
708
-
709
- // ../engine-content-editor/src/utils/getWordBoundsAtPosition.js
710
- function getWordBoundsAtPosition(str, position) {
711
- const isSpace = (c) => /[\s\n]/.exec(c);
712
- let start = position - 1;
713
- let end = position;
714
- while (start >= 0 && !isSpace(str[start])) {
715
- start -= 1;
716
- }
717
- start = Math.max(0, start + 1);
718
- while (end < str.length && !isSpace(str[end])) {
719
- end += 1;
720
- }
721
- end = Math.max(start, end);
722
- return [start, end];
723
- }
724
-
725
- // ../engine-content-editor/src/utils/getTriggerMatchesAtCursor.js
726
- function buildMatch({ pattern, word, match, regexMatch, triggerLen, start, end, cursorPos }) {
727
- const queryEnd = cursorPos - start;
728
- return {
729
- pattern,
730
- word,
731
- match,
732
- regexMatch,
733
- start,
734
- end,
735
- query: word.slice(triggerLen, queryEnd)
736
- };
737
- }
738
- function getTriggerMatchesAtCursor(text, cursorPos, patterns = []) {
739
- if (!text || cursorPos === 0 || patterns.length === 0) return [];
740
- const [start, end] = getWordBoundsAtPosition(text, cursorPos);
741
- const word = text.slice(start, end);
742
- if (!word) return [];
743
- const matches = [];
744
- for (const pattern of patterns) {
745
- if (pattern.regex) {
746
- const m = word.match(pattern.trigger);
747
- if (m) {
748
- matches.push(buildMatch({
749
- pattern,
750
- word,
751
- match: m[0],
752
- regexMatch: m,
753
- triggerLen: 1,
754
- start,
755
- end,
756
- cursorPos
757
- }));
758
- }
759
- continue;
760
- }
761
- const trig = pattern.trigger;
762
- const triggerLen = trig.length;
763
- if (pattern.exact && word === trig) {
764
- matches.push(buildMatch({ pattern, word, match: trig, regexMatch: null, triggerLen, start, end, cursorPos }));
765
- } else if (pattern.startsWith && word.startsWith(trig)) {
766
- matches.push(buildMatch({ pattern, word, match: trig, regexMatch: null, triggerLen, start, end, cursorPos }));
767
- } else if (pattern.endsWith && word.endsWith(trig)) {
768
- matches.push(buildMatch({ pattern, word, match: trig, regexMatch: null, triggerLen, start, end, cursorPos }));
769
- }
770
- }
771
- return matches;
772
- }
773
-
774
- // ../engine-content-editor/src/Target.js
775
- var PREVENT_INPUT_TYPES = /* @__PURE__ */ new Set([
776
- "insertText",
777
- "insertParagraph",
778
- "insertLineBreak",
779
- "deleteContentBackward",
780
- "deleteContentForward"
781
- ]);
782
- var OBSERVER_OPTIONS = { childList: true, characterData: true, subtree: true };
783
- var _patterns, _inheritedPatterns, _ownListeners, _host, _content, _start, _end, _nextOffset, _initial, _destroyed, _observer, _composing, _onWheelBound, _Target_instances, init_fn, updateCaret_fn, _handlePaste, _handleBeforeInput, _handleBlur2, _handleWheel, _handleKeyDown, _handleMutation, _handleCompositionStart, _handleCompositionEnd, applyEdit_fn;
784
- var _Target = class _Target {
785
- constructor($el, { onInput, onBlur, onWheel } = {}, host = {}) {
786
- __privateAdd(this, _Target_instances);
787
- __privateAdd(this, _patterns, []);
788
- __privateAdd(this, _inheritedPatterns, []);
789
- __privateAdd(this, _ownListeners, []);
790
- __privateAdd(this, _host, {});
791
- __privateAdd(this, _content, "");
792
- __privateAdd(this, _start, 0);
793
- __privateAdd(this, _end, 0);
794
- __privateAdd(this, _nextOffset, 0);
795
- __privateAdd(this, _initial, { content: "", start: 0, end: 0 });
796
- __privateAdd(this, _destroyed, false);
797
- __privateAdd(this, _observer, null);
798
- __privateAdd(this, _composing, false);
799
- __privateAdd(this, _onWheelBound, null);
800
- __privateAdd(this, _handlePaste, (e) => {
801
- e.stopPropagation();
802
- e.preventDefault();
803
- const data = e.clipboardData;
804
- if (!data) return;
805
- const pasted = data.getData("text/plain") || data.getData("text/html");
806
- if (!pasted) return;
807
- let plainText = pasted;
808
- if (pasted !== data.getData("text/plain")) {
809
- const tmp = document.createElement("div");
810
- tmp.innerHTML = pasted;
811
- plainText = tmp.textContent || "";
812
- }
813
- __privateMethod(this, _Target_instances, updateCaret_fn).call(this);
814
- __privateMethod(this, _Target_instances, applyEdit_fn).call(this, __privateGet(this, _start), __privateGet(this, _end) - __privateGet(this, _start), plainText);
815
- });
816
- __privateAdd(this, _handleBeforeInput, (e) => {
817
- console.log("beforeinput", e);
818
- e.stopPropagation();
819
- if (PREVENT_INPUT_TYPES.has(e.inputType)) e.preventDefault();
820
- __privateMethod(this, _Target_instances, updateCaret_fn).call(this);
821
- switch (e.inputType) {
822
- case "insertText":
823
- __privateMethod(this, _Target_instances, applyEdit_fn).call(this, __privateGet(this, _start), __privateGet(this, _end) - __privateGet(this, _start), e.data ?? "");
824
- break;
825
- case "insertParagraph":
826
- case "insertLineBreak":
827
- __privateMethod(this, _Target_instances, applyEdit_fn).call(this, __privateGet(this, _start), __privateGet(this, _end) - __privateGet(this, _start), "\n");
828
- break;
829
- case "deleteContentBackward":
830
- if (__privateGet(this, _start) !== __privateGet(this, _end)) {
831
- __privateMethod(this, _Target_instances, applyEdit_fn).call(this, __privateGet(this, _start), __privateGet(this, _end) - __privateGet(this, _start), "");
832
- } else {
833
- __privateMethod(this, _Target_instances, applyEdit_fn).call(this, Math.max(0, __privateGet(this, _start) - 1), Math.min(1, __privateGet(this, _start)), "");
834
- }
835
- break;
836
- case "deleteContentForward":
837
- if (__privateGet(this, _start) !== __privateGet(this, _end)) {
838
- __privateMethod(this, _Target_instances, applyEdit_fn).call(this, __privateGet(this, _start), __privateGet(this, _end) - __privateGet(this, _start), "");
839
- } else {
840
- __privateMethod(this, _Target_instances, applyEdit_fn).call(this, __privateGet(this, _start), 1, "");
841
- }
842
- break;
843
- }
844
- });
845
- __privateAdd(this, _handleBlur2, () => {
846
- this.onBlur?.(__privateGet(this, _content));
847
- });
848
- __privateAdd(this, _handleWheel, (e) => {
849
- e.preventDefault();
850
- this.onWheel({ deltaX: e.deltaX, deltaY: e.deltaY, ctrlKey: e.ctrlKey, x: e.clientX, y: e.clientY });
851
- });
852
- // Buttons suppress beforeinput for spacebar (the browser treats space as button
853
- // activation and never fires insertText). Intercept at keydown and insert manually.
854
- __privateAdd(this, _handleKeyDown, (e) => {
855
- if (e.key !== " ") return;
856
- e.preventDefault();
857
- __privateMethod(this, _Target_instances, updateCaret_fn).call(this);
858
- __privateMethod(this, _Target_instances, applyEdit_fn).call(this, __privateGet(this, _start), __privateGet(this, _end) - __privateGet(this, _start), " ");
859
- });
860
- __privateAdd(this, _handleMutation, () => {
861
- if (__privateGet(this, _destroyed) || __privateGet(this, _composing)) return;
862
- setCaretToCharacterPosition(this.$el, __privateGet(this, _nextOffset));
863
- });
864
- __privateAdd(this, _handleCompositionStart, () => {
865
- __privateSet(this, _composing, true);
866
- });
867
- __privateAdd(this, _handleCompositionEnd, () => {
868
- __privateSet(this, _composing, false);
869
- __privateSet(this, _content, this.$el.textContent || "");
870
- this.onInput?.(__privateGet(this, _content));
871
- });
872
- this.$el = $el;
873
- this.onInput = onInput;
874
- this.onBlur = onBlur;
875
- this.onWheel = onWheel;
876
- __privateSet(this, _inheritedPatterns, host.inheritedPatterns ?? []);
877
- __privateSet(this, _host, host);
878
- __privateMethod(this, _Target_instances, init_fn).call(this);
879
- }
880
- static create($el, opts = {}, host = {}) {
881
- if (this.instances.has($el)) {
882
- return this.instances.get($el);
883
- }
884
- const target = new _Target($el, opts, host);
885
- _Target.instances.set($el, target);
886
- return target;
887
- }
888
- get content() {
889
- return __privateGet(this, _content);
890
- }
891
- get cursor() {
892
- return { start: __privateGet(this, _start), end: __privateGet(this, _end) };
893
- }
894
- /**
895
- * Register a passthrough DOM listener on the underlying contenteditable
896
- * element. Returns an unsubscribe function. Use this to expose raw browser
897
- * events (keydown for Enter-to-submit, focus, mouseup, etc.). Listeners can
898
- * call `e.preventDefault()` to suppress the default action and the
899
- * corresponding `beforeinput` Target would otherwise process.
900
- *
901
- * @param {string} eventName
902
- * @param {(event: Event) => void} callback
903
- * @param {boolean | AddEventListenerOptions} [options]
904
- * @returns {() => void} unsubscribe
905
- */
906
- on(eventName, callback, options = false) {
907
- this.$el.addEventListener(eventName, callback, options);
908
- const entry = { eventName, callback, options };
909
- __privateGet(this, _ownListeners).push(entry);
910
- return () => {
911
- this.$el.removeEventListener(eventName, callback, options);
912
- const i2 = __privateGet(this, _ownListeners).indexOf(entry);
913
- if (i2 !== -1) __privateGet(this, _ownListeners).splice(i2, 1);
914
- };
915
- }
916
- onMatch(trigger, callback, { exact = true, startsWith = false, endsWith = false } = {}) {
917
- const isRegex = trigger instanceof RegExp;
918
- const pattern = {
919
- trigger: isRegex ? trigger : trigger?.trim?.(),
920
- regex: isRegex,
921
- exact,
922
- startsWith,
923
- endsWith,
924
- callback
925
- };
926
- __privateGet(this, _patterns).push(pattern);
927
- return () => {
928
- const i2 = __privateGet(this, _patterns).indexOf(pattern);
929
- if (i2 !== -1) __privateGet(this, _patterns).splice(i2, 1);
930
- };
931
- }
932
- reset() {
933
- __privateSet(this, _content, __privateGet(this, _initial).content);
934
- __privateSet(this, _nextOffset, __privateGet(this, _initial).start);
935
- this.onInput?.(__privateGet(this, _content));
936
- }
937
- destroy() {
938
- if (__privateGet(this, _destroyed)) return;
939
- __privateSet(this, _destroyed, true);
940
- __privateGet(this, _observer)?.disconnect();
941
- this.$el.removeEventListener("paste", __privateGet(this, _handlePaste));
942
- this.$el.removeEventListener("beforeinput", __privateGet(this, _handleBeforeInput));
943
- this.$el.removeEventListener("blur", __privateGet(this, _handleBlur2));
944
- this.$el.removeEventListener("compositionstart", __privateGet(this, _handleCompositionStart));
945
- this.$el.removeEventListener("compositionend", __privateGet(this, _handleCompositionEnd));
946
- this.$el.removeEventListener("keydown", __privateGet(this, _handleKeyDown));
947
- if (__privateGet(this, _onWheelBound)) {
948
- document.removeEventListener("wheel", __privateGet(this, _onWheelBound), { passive: false, capture: true });
949
- __privateSet(this, _onWheelBound, null);
950
- }
951
- for (const { eventName, callback, options } of __privateGet(this, _ownListeners)) {
952
- this.$el.removeEventListener(eventName, callback, options);
953
- }
954
- __privateSet(this, _ownListeners, []);
955
- __privateSet(this, _patterns, []);
956
- _Target.instances.delete(this.$el);
957
- __privateGet(this, _host).onDestroy?.(this);
958
- }
959
- };
960
- _patterns = new WeakMap();
961
- _inheritedPatterns = new WeakMap();
962
- _ownListeners = new WeakMap();
963
- _host = new WeakMap();
964
- _content = new WeakMap();
965
- _start = new WeakMap();
966
- _end = new WeakMap();
967
- _nextOffset = new WeakMap();
968
- _initial = new WeakMap();
969
- _destroyed = new WeakMap();
970
- _observer = new WeakMap();
971
- _composing = new WeakMap();
972
- _onWheelBound = new WeakMap();
973
- _Target_instances = new WeakSet();
974
- init_fn = function() {
975
- __privateSet(this, _content, this.$el.textContent || "");
976
- const { start, end } = getCaretCharacterOffset(this.$el);
977
- __privateSet(this, _start, start);
978
- __privateSet(this, _end, end);
979
- __privateSet(this, _nextOffset, start);
980
- __privateSet(this, _initial, { content: __privateGet(this, _content), start, end });
981
- this.$el.addEventListener("paste", __privateGet(this, _handlePaste));
982
- this.$el.addEventListener("beforeinput", __privateGet(this, _handleBeforeInput));
983
- this.$el.addEventListener("blur", __privateGet(this, _handleBlur2));
984
- this.$el.addEventListener("compositionstart", __privateGet(this, _handleCompositionStart));
985
- this.$el.addEventListener("compositionend", __privateGet(this, _handleCompositionEnd));
986
- if (this.$el.tagName === "BUTTON") {
987
- this.$el.addEventListener("keydown", __privateGet(this, _handleKeyDown));
988
- }
989
- __privateSet(this, _observer, new MutationObserver(__privateGet(this, _handleMutation)));
990
- __privateGet(this, _observer).observe(this.$el, OBSERVER_OPTIONS);
991
- if (this.onWheel) {
992
- __privateSet(this, _onWheelBound, __privateGet(this, _handleWheel));
993
- document.addEventListener("wheel", __privateGet(this, _onWheelBound), { passive: false, capture: true });
994
- }
995
- };
996
- updateCaret_fn = function() {
997
- const { start, end } = getCaretCharacterOffset(this.$el);
998
- __privateSet(this, _start, start);
999
- __privateSet(this, _end, end);
1000
- };
1001
- _handlePaste = new WeakMap();
1002
- _handleBeforeInput = new WeakMap();
1003
- _handleBlur2 = new WeakMap();
1004
- _handleWheel = new WeakMap();
1005
- _handleKeyDown = new WeakMap();
1006
- _handleMutation = new WeakMap();
1007
- _handleCompositionStart = new WeakMap();
1008
- _handleCompositionEnd = new WeakMap();
1009
- applyEdit_fn = function(offset, deleteCount, insert) {
1010
- __privateSet(this, _content, spliceString(__privateGet(this, _content), offset, deleteCount, insert));
1011
- __privateSet(this, _nextOffset, offset + insert.length);
1012
- const allPatterns = __privateGet(this, _inheritedPatterns).length ? [...__privateGet(this, _patterns), ...__privateGet(this, _inheritedPatterns)] : __privateGet(this, _patterns);
1013
- const matches = getTriggerMatchesAtCursor(__privateGet(this, _content), __privateGet(this, _nextOffset), allPatterns);
1014
- for (const m of matches) {
1015
- m.pattern.callback({
1016
- word: m.word,
1017
- trigger: m.match,
1018
- start: m.start,
1019
- end: m.end,
1020
- query: m.query,
1021
- match: m.regexMatch
1022
- });
1023
- }
1024
- this.onInput?.(__privateGet(this, _content));
1025
- };
1026
- __publicField(_Target, "instances", /* @__PURE__ */ new WeakMap());
1027
- var Target = _Target;
1028
-
1029
- // ../engine-content-editor/src/ContentEditor.js
1030
- var _patterns2, _listeners, _targets;
1031
- var ContentEditor = class extends v {
1032
- constructor() {
1033
- super(...arguments);
1034
- __privateAdd(this, _patterns2, []);
1035
- __privateAdd(this, _listeners, []);
1036
- __privateAdd(this, _targets, /* @__PURE__ */ new Set());
1037
- }
1038
- actions() {
1039
- return {
1040
- create: ($el, opts = {}) => {
1041
- try {
1042
- if (!($el instanceof HTMLElement)) {
1043
- throw new Error("ContentEditor.create: $el must be an HTMLElement");
1044
- }
1045
- if (!$el.isContentEditable) {
1046
- $el.contentEditable = "true";
1047
- }
1048
- const target = Target.create($el, opts, {
1049
- inheritedPatterns: __privateGet(this, _patterns2),
1050
- onDestroy: (t) => {
1051
- for (const { eventName, callback, options } of __privateGet(this, _listeners)) {
1052
- t.$el.removeEventListener(eventName, callback, options);
1053
- }
1054
- __privateGet(this, _targets).delete(t);
1055
- Target.instances.delete($el);
1056
- }
1057
- });
1058
- for (const { eventName, callback, options } of __privateGet(this, _listeners)) {
1059
- $el.addEventListener(eventName, callback, options);
1060
- }
1061
- __privateGet(this, _targets).add(target);
1062
- return target;
1063
- } catch (error) {
1064
- console.error(error);
1065
- return null;
1066
- }
1067
- },
1068
- getTarget: ($el) => Target.instances.get($el),
1069
- onMatch: (trigger, callback, opts = {}) => {
1070
- const isRegex = trigger instanceof RegExp;
1071
- const pattern = {
1072
- trigger: isRegex ? trigger : trigger?.trim?.(),
1073
- regex: isRegex,
1074
- exact: opts.exact ?? true,
1075
- startsWith: opts.startsWith ?? false,
1076
- endsWith: opts.endsWith ?? false,
1077
- callback
1078
- };
1079
- __privateGet(this, _patterns2).push(pattern);
1080
- return () => {
1081
- const i2 = __privateGet(this, _patterns2).indexOf(pattern);
1082
- if (i2 !== -1) __privateGet(this, _patterns2).splice(i2, 1);
1083
- };
1084
- },
1085
- /**
1086
- * Register a passthrough DOM listener applied to every Target's element
1087
- * (existing and future). Mirrors `target.on()` but at the service level
1088
- * so Enter-to-submit-style behaviors only have to be wired once.
1089
- *
1090
- * @param {string} eventName
1091
- * @param {(event: Event) => void} callback
1092
- * @param {boolean | AddEventListenerOptions} [options]
1093
- * @returns {() => void} unsubscribe
1094
- */
1095
- on: (eventName, callback, options = false) => {
1096
- const entry = { eventName, callback, options };
1097
- __privateGet(this, _listeners).push(entry);
1098
- for (const t of __privateGet(this, _targets)) {
1099
- t.$el.addEventListener(eventName, callback, options);
1100
- }
1101
- return () => {
1102
- const i2 = __privateGet(this, _listeners).indexOf(entry);
1103
- if (i2 !== -1) __privateGet(this, _listeners).splice(i2, 1);
1104
- for (const t of __privateGet(this, _targets)) {
1105
- t.$el.removeEventListener(eventName, callback, options);
1106
- }
1107
- };
1108
- },
1109
- reset: ($el) => Target.instances.get($el)?.reset(),
1110
- destroy: ($el) => Target.instances.get($el)?.destroy()
1111
- };
1112
- }
1113
- };
1114
- _patterns2 = new WeakMap();
1115
- _listeners = new WeakMap();
1116
- _targets = new WeakMap();
1117
- __publicField(ContentEditor, "manifest", {
1118
- name: "Content Editor",
1119
- namespace: "contentEditor",
1120
- version: "1.0.0",
1121
- description: "Content editor extension"
1122
- });
1123
-
1124
- // ../../node_modules/@jucie.io/state/dist/lib/change.js
1125
- var OPERATION_INVERSES = {
1126
- [CREATED]: DELETED,
1127
- [DELETED]: CREATED,
1128
- [UPDATED]: UPDATED
1129
- };
1130
- var ARRAY_METHODS = /* @__PURE__ */ new Set(["push", "unshift", "splice", "removeMatch"]);
1131
- function invertChange(change) {
1132
- const { address, path, method, from, to, operation } = change;
1133
- if (ARRAY_METHODS.has(method)) {
1134
- return invertArrayChange(change);
1135
- }
1136
- return {
1137
- address,
1138
- path,
1139
- method,
1140
- to: from,
1141
- from: to,
1142
- operation: invertOperation(operation)
1143
- };
1144
- }
1145
- function invertArrayChange(change) {
1146
- const { address, path, method, from, to } = change;
1147
- if (method === "push" || method === "unshift") {
1148
- return { address, path, method: "removeMatch", operation: UPDATED, to };
1149
- }
1150
- const [start, , ...inserted] = to;
1151
- const removed = from || [];
1152
- return {
1153
- address,
1154
- path,
1155
- method: "splice",
1156
- operation: UPDATED,
1157
- to: [start, inserted.length, ...removed],
1158
- from: inserted
1159
- };
1160
- }
1161
- function invertOperation(operation) {
1162
- return OPERATION_INVERSES[operation];
1163
- }
1164
-
1165
- // ../../node_modules/@jucie.io/state/dist/utils/defer.js
1166
- function defer(arg1, arg2) {
1167
- let callback = null;
1168
- let delay = 0;
1169
- if (typeof arg1 === "function") {
1170
- callback = arg1;
1171
- if (typeof arg2 === "number") {
1172
- delay = arg2;
1173
- }
1174
- } else if (typeof arg1 === "number") {
1175
- delay = arg1;
1176
- }
1177
- return (...args) => new Promise((resolve, reject) => {
1178
- setTimeout(() => {
1179
- try {
1180
- const result = callback ? callback(...args) : void 0;
1181
- resolve(result);
1182
- } catch (error) {
1183
- reject(error);
1184
- }
1185
- }, delay);
1186
- });
1187
- }
1188
-
1189
- // ../../node_modules/@jucie.io/state-history/dist/main.js
1190
- var f3 = Object.defineProperty;
1191
- var i = (n, t) => f3(n, "name", { value: t, configurable: true });
1192
- var _a;
1193
- var o = (_a = class {
1194
- constructor(t = "") {
1195
- this.isMarker = true, this.description = t;
1196
- }
1197
- }, i(_a, "Marker"), _a);
1198
- var _a2, _t, _a3, _n, _e, _o, _s, _i, _r, _a_instances, d_fn, _f, u_fn, h_fn;
1199
- var a = (_a2 = class extends Plugin {
1200
- constructor() {
1201
- super(...arguments);
1202
- __privateAdd(this, _a_instances);
1203
- __privateAdd(this, _t, []);
1204
- __privateAdd(this, _a3, false);
1205
- __privateAdd(this, _n, /* @__PURE__ */ new Set());
1206
- __privateAdd(this, _e, 0);
1207
- __privateAdd(this, _o, false);
1208
- __privateAdd(this, _s, /* @__PURE__ */ new Map());
1209
- __privateAdd(this, _i, true);
1210
- __privateAdd(this, _r, false);
1211
- __publicField(this, "onUndoRedo", null);
1212
- __privateAdd(this, _f, defer(() => {
1213
- __privateMethod(this, _a_instances, h_fn).call(this), __privateSet(this, _r, false);
1214
- }));
1215
- __publicField(this, "undo", defer((t) => {
1216
- if (!this.onUndoRedo) throw new Error("Undo/redo handler is required for undo operation");
1217
- if (__privateMethod(this, _a_instances, h_fn).call(this), __privateGet(this, _e) <= 0) return false;
1218
- if (__privateSet(this, _i, false), !(__privateGet(this, _t)[__privateGet(this, _e)] instanceof o)) return console.warn("Expected to be at a marker for undo operation"), false;
1219
- let e = /* @__PURE__ */ new Set(), s3 = __privateGet(this, _e) - 1;
1220
- for (; s3 > 0; ) {
1221
- let r2 = __privateGet(this, _t)[s3];
1222
- if (r2 instanceof o) break;
1223
- e.add(invertChange(r2)), s3--;
1224
- }
1225
- return __privateSet(this, _e, s3), this.onUndoRedo(Array.from(e)), t && typeof t == "function" && t(), __privateSet(this, _i, true), true;
1226
- }));
1227
- __publicField(this, "redo", defer((t) => {
1228
- if (!this.onUndoRedo) throw new Error("Undo/redo handler is required for redo operation");
1229
- if (__privateGet(this, _e) >= __privateGet(this, _t).length - 1) return false;
1230
- if (__privateSet(this, _i, false), !(__privateGet(this, _t)[__privateGet(this, _e)] instanceof o)) return console.warn("Expected to be at a marker for redo operation"), false;
1231
- let e = /* @__PURE__ */ new Set();
1232
- for (__privateWrapper(this, _e)._++; __privateGet(this, _e) < __privateGet(this, _t).length; ) {
1233
- let s3 = __privateGet(this, _t)[__privateGet(this, _e)];
1234
- if (s3 instanceof o) break;
1235
- e.add(s3), __privateWrapper(this, _e)._++;
1236
- }
1237
- return this.onUndoRedo(e), t && typeof t == "function" && t(), __privateSet(this, _i, true), true;
1238
- }));
1239
- }
1240
- initialize(t) {
1241
- this.onUndoRedo = (e) => t.apply(e);
1242
- }
1243
- actions(t) {
1244
- return { undo: i((e) => this.undo(e), "undo"), redo: i((e) => this.redo(e), "redo"), canUndo: i(() => this.canUndo(), "canUndo"), canRedo: i(() => this.canRedo(), "canRedo"), group: i((e) => this.group(e), "group"), commit: i((e) => this.commit(e), "commit"), onCommit: i((e) => this.onCommit(e), "onCommit"), addMarker: i((e) => this.addMarker(e), "addMarker"), size: i(() => this.size(), "size"), start: i(() => __privateMethod(this, _a_instances, d_fn).call(this), "start") };
1245
- }
1246
- onStateChange(t, e, s3) {
1247
- if (!__privateGet(this, _a3) || !__privateGet(this, _i) || e.method === "apply") return;
1248
- let r2 = __privateGet(this, _s).get(t.address), d = r2 ? { ...e, from: r2.from } : e;
1249
- __privateGet(this, _s).set(t.address, d), !s3 && !__privateGet(this, _o) && __privateMethod(this, _a_instances, u_fn).call(this);
1250
- }
1251
- addMarker(t = "") {
1252
- __privateMethod(this, _a_instances, h_fn).call(this, t), __privateSet(this, _e, __privateGet(this, _t).length - 1);
1253
- }
1254
- canUndo() {
1255
- return __privateGet(this, _e) > 0;
1256
- }
1257
- canRedo() {
1258
- return __privateGet(this, _e) < __privateGet(this, _t).length - 1;
1259
- }
1260
- size() {
1261
- return __privateGet(this, _t).length;
1262
- }
1263
- group(t) {
1264
- return __privateSet(this, _o, true), typeof t == "function" ? (t(this), this.commit()) : () => this.commit();
1265
- }
1266
- commit(t = "") {
1267
- return __privateMethod(this, _a_instances, h_fn).call(this, t), __privateSet(this, _o, false), this;
1268
- }
1269
- pause() {
1270
- __privateSet(this, _i, false);
1271
- }
1272
- resume() {
1273
- __privateSet(this, _i, true);
1274
- }
1275
- onCommit(t) {
1276
- return __privateGet(this, _n).add(t), () => {
1277
- __privateGet(this, _n).delete(t);
1278
- };
1279
- }
1280
- reset() {
1281
- __privateSet(this, _t, [new o("History Start")]), __privateSet(this, _n, /* @__PURE__ */ new Set()), __privateSet(this, _e, 0), __privateSet(this, _o, false), __privateSet(this, _s, /* @__PURE__ */ new Map()), __privateSet(this, _i, true), __privateSet(this, _r, false), __privateSet(this, _a3, false), this.onUndoRedo = null;
1282
- }
1283
- }, _t = new WeakMap(), _a3 = new WeakMap(), _n = new WeakMap(), _e = new WeakMap(), _o = new WeakMap(), _s = new WeakMap(), _i = new WeakMap(), _r = new WeakMap(), _a_instances = new WeakSet(), d_fn = function() {
1284
- __privateSet(this, _t, [new o("History Start")]), __privateSet(this, _e, 0), __privateSet(this, _a3, true), __privateGet(this, _s).clear(), __privateSet(this, _o, false), __privateSet(this, _r, false);
1285
- }, _f = new WeakMap(), u_fn = function() {
1286
- __privateGet(this, _r) || (__privateSet(this, _r, true), __privateGet(this, _f).call(this));
1287
- }, h_fn = function(t = "") {
1288
- if (__privateGet(this, _s).size === 0) return;
1289
- __privateGet(this, _e) < __privateGet(this, _t).length - 1 && __privateGet(this, _t).splice(__privateGet(this, _e) + 1);
1290
- let e = Array.from(__privateGet(this, _s).values());
1291
- for (__privateGet(this, _t).push(...e), __privateGet(this, _n).forEach((r2) => r2(e)), __privateGet(this, _t)[__privateGet(this, _t).length - 1] instanceof o || __privateGet(this, _t).push(new o(t || Date.now().toString())); __privateGet(this, _t).length > this.options.maxSize; ) __privateGet(this, _t).shift();
1292
- __privateGet(this, _s).clear(), __privateSet(this, _e, __privateGet(this, _t).length - 1);
1293
- }, __publicField(_a2, "name", "history"), __publicField(_a2, "options", { maxSize: 100 }), _a2);
1294
-
1295
- // ../../node_modules/@jucie.io/state-on-change/dist/main.js
1296
- var h = Object.defineProperty;
1297
- var s2 = (i2, e) => h(i2, "name", { value: e, configurable: true });
1298
- var _a4, _t2, _e2, _r2, _s2, _n2, _r_instances, o_fn, u_fn2, h_fn2, i_fn, f_fn;
1299
- var r = (_a4 = class extends Plugin {
1300
- constructor(e = {}) {
1301
- super(e);
1302
- __privateAdd(this, _r_instances);
1303
- __privateAdd(this, _t2, /* @__PURE__ */ new Set());
1304
- __privateAdd(this, _e2, /* @__PURE__ */ new Map());
1305
- __privateAdd(this, _r2, false);
1306
- __privateAdd(this, _s2, false);
1307
- __privateAdd(this, _n2, 0);
1308
- __privateSet(this, _n2, e.debounce ?? 0);
1309
- }
1310
- actions() {
1311
- return { addListener: s2((e) => {
1312
- if (typeof e == "function") return __privateMethod(this, _r_instances, h_fn2).call(this, e);
1313
- }, "addListener"), subscribe: s2((e) => {
1314
- if (typeof e == "function") return __privateMethod(this, _r_instances, h_fn2).call(this, e);
1315
- }, "subscribe"), unsubscribe: s2((e) => {
1316
- if (typeof e == "function") return __privateMethod(this, _r_instances, i_fn).call(this, e);
1317
- }, "unsubscribe"), removeListener: s2((e) => __privateMethod(this, _r_instances, i_fn).call(this, e), "removeListener"), clear: s2(() => __privateMethod(this, _r_instances, f_fn).call(this), "clear") };
1318
- }
1319
- onStateChange(e, t) {
1320
- !__privateGet(this, _s2) || t.method === "apply" || __privateMethod(this, _r_instances, o_fn).call(this, e, t);
1321
- }
1322
- }, _t2 = new WeakMap(), _e2 = new WeakMap(), _r2 = new WeakMap(), _s2 = new WeakMap(), _n2 = new WeakMap(), _r_instances = new WeakSet(), o_fn = function(e, t) {
1323
- __privateGet(this, _e2).has(e.address) && __privateGet(this, _e2).delete(e.address), __privateGet(this, _e2).set(e.address, t), __privateMethod(this, _r_instances, u_fn2).call(this);
1324
- }, u_fn2 = function() {
1325
- if (!__privateGet(this, _r2)) {
1326
- __privateSet(this, _r2, true);
1327
- try {
1328
- setTimeout(() => {
1329
- let e = Array.from(__privateGet(this, _e2).values());
1330
- __privateGet(this, _e2).clear();
1331
- for (let t of __privateGet(this, _t2)) try {
1332
- t(e);
1333
- } catch (n) {
1334
- console.error("Error in onChange listener:", n);
1335
- }
1336
- __privateSet(this, _r2, false);
1337
- }, __privateGet(this, _n2));
1338
- } catch (e) {
1339
- console.error(e);
1340
- }
1341
- }
1342
- }, h_fn2 = function(e) {
1343
- return __privateGet(this, _t2).add(e), __privateSet(this, _s2, true), () => __privateMethod(this, _r_instances, i_fn).call(this, e);
1344
- }, i_fn = function(e) {
1345
- typeof e == "function" && (__privateGet(this, _t2).delete(e), __privateGet(this, _t2).size === 0 && __privateSet(this, _s2, false));
1346
- }, f_fn = function() {
1347
- __privateGet(this, _t2).clear(), __privateGet(this, _e2).clear(), __privateSet(this, _s2, false);
1348
- }, __publicField(_a4, "name", "onChange"), _a4);
1349
-
1350
- // ../../node_modules/@jucie.io/state/dist/admin/buffer.js
1351
- function defaultReplacer(key, value) {
1352
- if (key && key[0] === ".") return void 0;
1353
- return value;
1354
- }
1355
- function applyReplacerDeep(input, replacer = defaultReplacer, parentKey = "") {
1356
- if (input === null || typeof input !== "object") return input;
1357
- if (Array.isArray(input)) {
1358
- return input.map((v2) => applyReplacerDeep(v2, replacer));
1359
- }
1360
- const out = {};
1361
- for (const k of Object.keys(input)) {
1362
- const v2 = replacer(k, input[k]);
1363
- if (typeof v2 !== "undefined") {
1364
- out[k] = applyReplacerDeep(v2, replacer, k);
1365
- }
1366
- }
1367
- return out;
1368
- }
1369
-
1370
- // ../../node_modules/@jucie.io/state/dist/admin/binary.js
1371
- var MAGIC = new Uint8Array([74, 83, 67, 50]);
1372
- var VERSION = 2;
1373
- function base64urlEncode(buffer) {
1374
- const chunkSize = 8192;
1375
- let binaryString = "";
1376
- for (let i2 = 0; i2 < buffer.length; i2 += chunkSize) {
1377
- const chunk = buffer.slice(i2, i2 + chunkSize);
1378
- binaryString += String.fromCharCode(...chunk);
1379
- }
1380
- return btoa(binaryString).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
1381
- }
1382
- function base64urlDecode(str) {
1383
- const base64 = str.replace(/-/g, "+").replace(/_/g, "/");
1384
- const padded = base64 + "=".repeat((4 - base64.length % 4) % 4);
1385
- const binaryString = atob(padded);
1386
- const result = new Uint8Array(binaryString.length);
1387
- for (let i2 = 0; i2 < binaryString.length; i2++) {
1388
- result[i2] = binaryString.charCodeAt(i2);
1389
- }
1390
- return result;
1391
- }
1392
- function calculateChecksum(buffer) {
1393
- let checksum = 0;
1394
- for (let i2 = 0; i2 < buffer.length; i2++) {
1395
- checksum = (checksum << 5) - checksum + buffer[i2] >>> 0;
1396
- }
1397
- return checksum;
1398
- }
1399
- function writeUint32(value, buffer, offset = 0) {
1400
- const view = new DataView(buffer.buffer, buffer.byteOffset + offset, 4);
1401
- view.setUint32(0, value, true);
1402
- return offset + 4;
1403
- }
1404
- function readUint32(buffer, offset = 0) {
1405
- const view = new DataView(buffer.buffer, buffer.byteOffset + offset, 4);
1406
- return view.getUint32(0, true);
1407
- }
1408
- function writeUint16(value, buffer, offset = 0) {
1409
- const view = new DataView(buffer.buffer, buffer.byteOffset + offset, 2);
1410
- view.setUint16(0, value, true);
1411
- return offset + 2;
1412
- }
1413
- function readUint16(buffer, offset = 0) {
1414
- const view = new DataView(buffer.buffer, buffer.byteOffset + offset, 2);
1415
- return view.getUint16(0, true);
1416
- }
1417
- function writeUint8(value, buffer, offset = 0) {
1418
- buffer[offset] = value;
1419
- return offset + 1;
1420
- }
1421
- function readUint8(buffer, offset = 0) {
1422
- return buffer[offset];
1423
- }
1424
- function encodeObject(obj) {
1425
- return encode(obj);
1426
- }
1427
- function decodeObject(buffer) {
1428
- const obj = decode(buffer);
1429
- return [obj, buffer.length];
1430
- }
1431
-
1432
- // ../../node_modules/@jucie.io/state/dist/admin/pack.js
1433
- async function pack(data, { replacer = defaultReplacer } = {}) {
1434
- const clean = applyReplacerDeep(data, replacer);
1435
- const dataBuffer = encodeObject(clean);
1436
- const payloadLength = 4 + dataBuffer.length;
1437
- const payload = new Uint8Array(payloadLength);
1438
- let offset = 0;
1439
- offset = writeUint32(dataBuffer.length, payload, offset);
1440
- payload.set(dataBuffer, offset);
1441
- const checksum = calculateChecksum(payload);
1442
- const headerLen = 4 + 2 + 1 + 4 + 4;
1443
- const capsule = new Uint8Array(headerLen + payload.length);
1444
- capsule.set(MAGIC, 0);
1445
- writeUint16(VERSION, capsule, 4);
1446
- writeUint8(0, capsule, 6);
1447
- writeUint32(checksum, capsule, 7);
1448
- writeUint32(payload.length, capsule, 11);
1449
- capsule.set(payload, 15);
1450
- return base64urlEncode(capsule);
1451
- }
1452
-
1453
- // ../../node_modules/@jucie.io/state/dist/admin/unpack.js
1454
- async function unpack(capsuleString, cb) {
1455
- const capsule = base64urlDecode(capsuleString);
1456
- if (capsule.length < 15) {
1457
- throw new Error("Invalid capsule: too short");
1458
- }
1459
- for (let i2 = 0; i2 < 4; i2++) {
1460
- if (capsule[i2] !== MAGIC[i2]) throw new Error("Invalid capsule: bad magic");
1461
- }
1462
- const version = readUint16(capsule, 4);
1463
- if (version !== VERSION) {
1464
- throw new Error(`Unsupported capsule version: ${version}`);
1465
- }
1466
- const flags = readUint8(capsule, 6);
1467
- const storedChecksum = readUint32(capsule, 7);
1468
- const payloadLength = readUint32(capsule, 11);
1469
- if (payloadLength < 0) throw new Error("Invalid capsule: negative payload length");
1470
- if (capsule.length !== 15 + payloadLength) throw new Error("Invalid capsule: length mismatch");
1471
- const payload = capsule.slice(15);
1472
- const actualChecksum = calculateChecksum(payload);
1473
- if (storedChecksum !== actualChecksum) {
1474
- throw new Error("Integrity check failed: checksum mismatch");
1475
- }
1476
- let offset = 0;
1477
- const dataLength = readUint32(payload, offset);
1478
- offset += 4;
1479
- if (offset + dataLength > payload.length) {
1480
- throw new Error(`Data length ${dataLength} exceeds payload bounds at offset ${offset}`);
1481
- }
1482
- const [data] = decodeObject(payload.slice(offset, offset + dataLength));
1483
- if (cb) cb(data);
1484
- return {
1485
- data,
1486
- // Add 'data' key for generic usage
1487
- meta: {
1488
- version,
1489
- flags,
1490
- bytes: capsule.length,
1491
- checksum: actualChecksum.toString(16)
1492
- }
1493
- };
1494
- }
1495
-
1496
- // ../../node_modules/@jucie.io/state/dist/lib/tree/traverse.js
1497
- var traversalFunctions = [
1498
- null,
1499
- // index 0 (unused)
1500
- null,
1501
- // index 1 (single property access doesn't need optimization)
1502
- (obj, path) => obj?.[path[0]]?.[path[1]],
1503
- (obj, path) => obj?.[path[0]]?.[path[1]]?.[path[2]],
1504
- (obj, path) => obj?.[path[0]]?.[path[1]]?.[path[2]]?.[path[3]],
1505
- (obj, path) => obj?.[path[0]]?.[path[1]]?.[path[2]]?.[path[3]]?.[path[4]],
1506
- (obj, path) => obj?.[path[0]]?.[path[1]]?.[path[2]]?.[path[3]]?.[path[4]]?.[path[5]],
1507
- (obj, path) => obj?.[path[0]]?.[path[1]]?.[path[2]]?.[path[3]]?.[path[4]]?.[path[5]]?.[path[6]],
1508
- (obj, path) => obj?.[path[0]]?.[path[1]]?.[path[2]]?.[path[3]]?.[path[4]]?.[path[5]]?.[path[6]]?.[path[7]]
1509
- ];
1510
- function createTraversalFunction(length) {
1511
- const accessors = Array.from({ length }, (_, i2) => `?.[path[${i2}]]`);
1512
- const expr = "obj" + accessors.join("");
1513
- const fn = new Function("obj", "path", `return ${expr}`);
1514
- traversalFunctions[length] = fn;
1515
- return fn;
1516
- }
1517
- function traverse(state, path) {
1518
- const len = path.length;
1519
- if (len === 0) return state;
1520
- if (len === 1) return state[path[0]];
1521
- if (len < traversalFunctions.length && traversalFunctions[len]) {
1522
- return traversalFunctions[len](state, path);
1523
- }
1524
- if (!traversalFunctions[len]) {
1525
- return createTraversalFunction(len)(state, path);
1526
- }
1527
- return traversalFunctions[len](state, path);
1528
- }
1529
-
1530
- // ../../plugins/ledger/src/Ledger.js
1531
- var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
1532
- var isNode = typeof process !== "undefined" && process.versions?.node;
1533
- var globalClock = 0;
1534
- var _entries, _tombstones, _tombstoneIndex, _changeQueue, _isProcessing, _isImporting, _actorId, _sessionEpoch, _changeListeners, _hasChangeListeners, _Ledger_instances, createTombstone_fn, removeTombstone_fn, compareEntries_fn, isPathTombstoned_fn, removeEntriesUnderPath_fn, shouldApplyRemoteEntry_fn, rebuildTombstoneIndexes_fn, scheduleIdle_fn, scheduleNextTick_fn, scheduleRecord_fn, updateLedger_fn, continueGlobalClock_fn, checkTombstoneSize_fn, callChangeListeners_fn, cleanupTombstoneConflicts_fn;
1535
- var _Ledger = class _Ledger extends Plugin {
1536
- constructor() {
1537
- super(...arguments);
1538
- __privateAdd(this, _Ledger_instances);
1539
- __privateAdd(this, _entries, /* @__PURE__ */ new Map());
1540
- __privateAdd(this, _tombstones, /* @__PURE__ */ new Map());
1541
- __privateAdd(this, _tombstoneIndex, /* @__PURE__ */ new Set());
1542
- // Fast O(1) lookup for exact matches
1543
- __privateAdd(this, _changeQueue, []);
1544
- __privateAdd(this, _isProcessing, false);
1545
- __privateAdd(this, _isImporting, false);
1546
- // Flag to prevent change listener from creating entries during import
1547
- __privateAdd(this, _actorId, null);
1548
- __privateAdd(this, _sessionEpoch);
1549
- __privateAdd(this, _changeListeners, /* @__PURE__ */ new Set());
1550
- __privateAdd(this, _hasChangeListeners, false);
1551
- __publicField(this, "onTombstoneConflict", null);
1552
- }
1553
- initialize(state, options) {
1554
- __privateSet(this, _isProcessing, false);
1555
- __privateSet(this, _actorId, options.actorId ?? null);
1556
- __privateSet(this, _sessionEpoch, Date.now());
1557
- }
1558
- // Expose batch size for testing
1559
- get batchSize() {
1560
- return this.options.batchSize;
1561
- }
1562
- actions() {
1563
- return {
1564
- addChangeListener: (fn) => this.addChangeListener(fn),
1565
- removeChangeListener: (fn) => this.removeChangeListener(fn),
1566
- kill: (...args) => this.kill(args),
1567
- resurrect: (...args) => this.resurrect(args),
1568
- export: async () => await this.export(),
1569
- import: async (data) => await this.import(data),
1570
- snapshot: async () => await this.snapshot(),
1571
- importSnapshot: async (snapshot) => await this.importSnapshot(snapshot),
1572
- getStats: () => this.getStats()
1573
- };
1574
- }
1575
- onStateChange(marker, change) {
1576
- if (__privateGet(this, _isImporting)) return;
1577
- dispatch(marker, {
1578
- global: (marker2) => __privateGet(this, _changeQueue).push({ marker: marker2, change }),
1579
- path: (marker2) => __privateGet(this, _changeQueue).push({ marker: marker2, change }),
1580
- ephemeral: () => {
1581
- }
1582
- });
1583
- __privateMethod(this, _Ledger_instances, scheduleRecord_fn).call(this);
1584
- }
1585
- addChangeListener(listener) {
1586
- __privateGet(this, _changeListeners).add(listener);
1587
- if (__privateGet(this, _changeListeners).size > 0) {
1588
- __privateSet(this, _hasChangeListeners, true);
1589
- }
1590
- return () => this.removeChangeListener(listener);
1591
- }
1592
- removeChangeListener(listener) {
1593
- __privateGet(this, _changeListeners).delete(listener);
1594
- if (__privateGet(this, _changeListeners).size === 0) {
1595
- __privateSet(this, _hasChangeListeners, false);
1596
- }
1597
- }
1598
- getEntry(path) {
1599
- return __privateGet(this, _entries).get(encodePath(path));
1600
- }
1601
- getTombstone(path) {
1602
- return __privateGet(this, _tombstones).get(encodePath(path));
1603
- }
1604
- // Get all ledger entries
1605
- async export() {
1606
- return await pack({
1607
- entries: Array.from(__privateGet(this, _entries).entries()),
1608
- tombstones: Array.from(__privateGet(this, _tombstones).entries())
1609
- });
1610
- }
1611
- // Set ledger from entries
1612
- async import(data) {
1613
- const { entries, tombstones } = await unpack(data);
1614
- __privateSet(this, _entries, new Map(entries));
1615
- __privateSet(this, _tombstones, new Map(tombstones));
1616
- __privateMethod(this, _Ledger_instances, rebuildTombstoneIndexes_fn).call(this);
1617
- __privateMethod(this, _Ledger_instances, continueGlobalClock_fn).call(this);
1618
- return this;
1619
- }
1620
- // Create checkpoint with both state and ledger
1621
- async snapshot() {
1622
- return await pack({
1623
- state: this.state.get(),
1624
- ledger: {
1625
- entries: Array.from(__privateGet(this, _entries).entries()),
1626
- tombstones: Array.from(__privateGet(this, _tombstones).entries())
1627
- },
1628
- timestamp: Date.now()
1629
- });
1630
- }
1631
- // Merge state and ledger from checkpoint (expects {state, ledger} format)
1632
- async importSnapshot(snapshot) {
1633
- const { data: snapshotData } = await unpack(snapshot);
1634
- __privateSet(this, _isImporting, true);
1635
- try {
1636
- const entriesToApply = [];
1637
- for (const [address, remoteEntry] of snapshotData?.ledger?.entries || []) {
1638
- if (__privateMethod(this, _Ledger_instances, shouldApplyRemoteEntry_fn).call(this, address, remoteEntry)) {
1639
- entriesToApply.push([address, remoteEntry]);
1640
- }
1641
- }
1642
- for (const [address, remoteEntry] of entriesToApply) {
1643
- __privateGet(this, _entries).set(address, remoteEntry);
1644
- const path = decodeAddress(address);
1645
- const value = path === GLOBAL_TAG ? snapshotData?.state : traverse(snapshotData?.state, path);
1646
- this.state.set(path, value);
1647
- }
1648
- for (const [address, tombstone] of snapshotData?.ledger?.tombstones || []) {
1649
- const localEntry = this.getEntry(address);
1650
- const localTombstone = this.getTombstone(address);
1651
- let shouldApplyTombstone = false;
1652
- if (!localTombstone && !localEntry) {
1653
- shouldApplyTombstone = true;
1654
- } else if (localTombstone && tombstone.timestamp > localTombstone.timestamp) {
1655
- shouldApplyTombstone = true;
1656
- } else if (localEntry && !localTombstone) {
1657
- shouldApplyTombstone = true;
1658
- }
1659
- if (shouldApplyTombstone) {
1660
- const path = decodeAddress(address);
1661
- this.state.remove(path);
1662
- __privateGet(this, _tombstones).set(address, tombstone);
1663
- __privateGet(this, _tombstoneIndex).add(address);
1664
- }
1665
- }
1666
- } finally {
1667
- __privateSet(this, _isImporting, false);
1668
- }
1669
- return this.state;
1670
- }
1671
- // Clear all entries
1672
- reset() {
1673
- __privateGet(this, _entries).clear();
1674
- __privateGet(this, _tombstones).clear();
1675
- __privateGet(this, _tombstoneIndex).clear();
1676
- __privateSet(this, _changeQueue, []);
1677
- __privateSet(this, _isProcessing, false);
1678
- __privateSet(this, _actorId, null);
1679
- __privateSet(this, _sessionEpoch, Date.now());
1680
- __privateGet(this, _changeListeners).clear();
1681
- __privateSet(this, _hasChangeListeners, false);
1682
- }
1683
- // Get memory stats
1684
- getStats() {
1685
- return {
1686
- entriesCount: __privateGet(this, _entries).size,
1687
- tombstonesCount: __privateGet(this, _tombstones).size,
1688
- tombstoneIndexCount: __privateGet(this, _tombstoneIndex).size,
1689
- changeQueueCount: __privateGet(this, _changeQueue).length,
1690
- isProcessing: __privateGet(this, _isProcessing),
1691
- actorId: __privateGet(this, _actorId),
1692
- sessionEpoch: __privateGet(this, _sessionEpoch),
1693
- globalClock
1694
- };
1695
- }
1696
- // Kill a path and create a tombstone
1697
- kill(args) {
1698
- const marker = createMarker(args);
1699
- return dispatch(marker, {
1700
- global: () => {
1701
- throw new Error("Cannot kill global state");
1702
- },
1703
- path: ({ path, address }) => {
1704
- const removedValue = this.state.remove(path);
1705
- __privateMethod(this, _Ledger_instances, createTombstone_fn).call(this, address, removedValue);
1706
- return removedValue;
1707
- },
1708
- error: (error) => console.error(error)
1709
- });
1710
- }
1711
- // Resurrect a tombstoned path
1712
- resurrect(args) {
1713
- try {
1714
- const marker = createMarker(args);
1715
- const tombstone = __privateMethod(this, _Ledger_instances, removeTombstone_fn).call(this, marker.address);
1716
- if (!tombstone) {
1717
- throw new Error(`No tombstone found for path: ${marker.path.join(".")}`);
1718
- }
1719
- const data = JSON.parse(tombstone.data);
1720
- this.state.set(marker.path, data);
1721
- return data;
1722
- } catch (error) {
1723
- console.error(error);
1724
- return void 0;
1725
- }
1726
- }
1727
- };
1728
- _entries = new WeakMap();
1729
- _tombstones = new WeakMap();
1730
- _tombstoneIndex = new WeakMap();
1731
- _changeQueue = new WeakMap();
1732
- _isProcessing = new WeakMap();
1733
- _isImporting = new WeakMap();
1734
- _actorId = new WeakMap();
1735
- _sessionEpoch = new WeakMap();
1736
- _changeListeners = new WeakMap();
1737
- _hasChangeListeners = new WeakMap();
1738
- _Ledger_instances = new WeakSet();
1739
- createTombstone_fn = function(address, data) {
1740
- const tombstone = { data: JSON.stringify(data), timestamp: Date.now() };
1741
- __privateGet(this, _tombstones).set(address, tombstone);
1742
- __privateGet(this, _tombstoneIndex).add(address);
1743
- __privateMethod(this, _Ledger_instances, removeEntriesUnderPath_fn).call(this, address);
1744
- __privateMethod(this, _Ledger_instances, checkTombstoneSize_fn).call(this);
1745
- };
1746
- removeTombstone_fn = function(address) {
1747
- const tombstone = __privateGet(this, _tombstones).get(address);
1748
- if (!tombstone) return void 0;
1749
- __privateGet(this, _tombstones).delete(address);
1750
- __privateGet(this, _tombstoneIndex).delete(address);
1751
- return tombstone;
1752
- };
1753
- compareEntries_fn = function(entry1, entry2) {
1754
- if (!entry1) return -1;
1755
- if (!entry2) return 1;
1756
- const [clock1, globalclock1, sessionEpoch1, actorId1] = entry1;
1757
- const [clock2, globalclock2, sessionEpoch2, actorId2] = entry2;
1758
- if (clock1 !== clock2) return clock1 > clock2 ? 1 : -1;
1759
- if (globalclock1 !== globalclock2) return globalclock1 > globalclock2 ? 1 : -1;
1760
- if (sessionEpoch1 !== sessionEpoch2) return sessionEpoch1 > sessionEpoch2 ? 1 : -1;
1761
- if (actorId1 !== actorId2) return actorId1.localeCompare(actorId2);
1762
- return 0;
1763
- };
1764
- // tombstoneIndex: a Set of encoded addresses (strings)
1765
- isPathTombstoned_fn = function(address) {
1766
- if (__privateGet(this, _tombstoneIndex).has(address)) return true;
1767
- let i2 = address.length;
1768
- while (true) {
1769
- i2 = address.lastIndexOf(".", i2 - 1);
1770
- if (i2 === -1) break;
1771
- if (__privateGet(this, _tombstoneIndex).has(address.slice(0, i2))) return true;
1772
- }
1773
- return false;
1774
- };
1775
- // Remove ledger entries that are under a tombstoned path
1776
- removeEntriesUnderPath_fn = function(tombstoneAddress) {
1777
- const entriesToRemove = [];
1778
- for (const [address] of __privateGet(this, _entries)) {
1779
- if (address === tombstoneAddress || address.startsWith(tombstoneAddress)) {
1780
- entriesToRemove.push(address);
1781
- }
1782
- }
1783
- for (const address of entriesToRemove) {
1784
- __privateGet(this, _entries).delete(address);
1785
- }
1786
- };
1787
- // Check if a change should be applied
1788
- shouldApplyRemoteEntry_fn = function(address, remoteEntry) {
1789
- if (__privateMethod(this, _Ledger_instances, isPathTombstoned_fn).call(this, address)) return false;
1790
- const localEntry = __privateGet(this, _entries).get(address);
1791
- return __privateMethod(this, _Ledger_instances, compareEntries_fn).call(this, remoteEntry, localEntry) > 0;
1792
- };
1793
- // Rebuild tombstone indexes for optimal performance
1794
- rebuildTombstoneIndexes_fn = function() {
1795
- __privateGet(this, _tombstoneIndex).clear();
1796
- for (const [address] of __privateGet(this, _tombstones)) {
1797
- __privateGet(this, _tombstoneIndex).add(address);
1798
- }
1799
- };
1800
- scheduleIdle_fn = function(callback) {
1801
- if (isBrowser && "requestIdleCallback" in window) {
1802
- window.requestIdleCallback(callback, { timeout: 50 });
1803
- } else if (isNode) {
1804
- setImmediate(callback);
1805
- } else {
1806
- setTimeout(callback, 0);
1807
- }
1808
- };
1809
- scheduleNextTick_fn = function(callback) {
1810
- let called = false;
1811
- Promise.resolve().then(() => {
1812
- if (!called) {
1813
- called = true;
1814
- callback();
1815
- }
1816
- });
1817
- setTimeout(() => {
1818
- if (!called) {
1819
- called = true;
1820
- callback();
1821
- }
1822
- }, 0);
1823
- };
1824
- scheduleRecord_fn = function() {
1825
- if (__privateGet(this, _isProcessing)) return;
1826
- __privateSet(this, _isProcessing, true);
1827
- __privateMethod(this, _Ledger_instances, scheduleNextTick_fn).call(this, () => {
1828
- const changes = __privateGet(this, _changeQueue).splice(0, this.options.batchSize || _Ledger.options.batchSize);
1829
- const changeEntries = [];
1830
- const conflictedPaths = [];
1831
- for (const { marker, change } of changes) {
1832
- dispatch(marker, {
1833
- global: () => {
1834
- const ledgerEntry = __privateMethod(this, _Ledger_instances, updateLedger_fn).call(this, marker.address);
1835
- changeEntries.push([GLOBAL_TAG, change, ledgerEntry]);
1836
- },
1837
- path: ({ path }) => {
1838
- if (__privateMethod(this, _Ledger_instances, isPathTombstoned_fn).call(this, marker.address)) {
1839
- conflictedPaths.push(path);
1840
- return;
1841
- }
1842
- const ledgerEntry = __privateMethod(this, _Ledger_instances, updateLedger_fn).call(this, marker.address);
1843
- changeEntries.push([marker.address, change, ledgerEntry]);
1844
- }
1845
- });
1846
- }
1847
- if (conflictedPaths.length > 0) {
1848
- __privateMethod(this, _Ledger_instances, scheduleIdle_fn).call(this, () => __privateMethod(this, _Ledger_instances, cleanupTombstoneConflicts_fn).call(this, this.state, conflictedPaths));
1849
- }
1850
- __privateMethod(this, _Ledger_instances, callChangeListeners_fn).call(this, changeEntries);
1851
- __privateSet(this, _isProcessing, false);
1852
- if (__privateGet(this, _changeQueue).length > 0) {
1853
- __privateMethod(this, _Ledger_instances, scheduleRecord_fn).call(this);
1854
- }
1855
- });
1856
- };
1857
- updateLedger_fn = function(address) {
1858
- const existingEntry = __privateGet(this, _entries).get(address);
1859
- __privateGet(this, _entries).delete(address);
1860
- const existingClock = existingEntry ? existingEntry[0] : 0;
1861
- const newClock = existingClock + 1;
1862
- const entry = [
1863
- newClock,
1864
- globalClock++,
1865
- __privateGet(this, _sessionEpoch),
1866
- __privateGet(this, _actorId)
1867
- ];
1868
- __privateGet(this, _entries).set(address, entry);
1869
- if (__privateGet(this, _entries).size > this.options.maxSize) {
1870
- const entriesToRemove = __privateGet(this, _entries).size - this.options.maxSize;
1871
- const sorted = Array.from(__privateGet(this, _entries).entries()).sort((a2, b) => __privateMethod(this, _Ledger_instances, compareEntries_fn).call(this, a2[1], b[1]));
1872
- for (let i2 = 0; i2 < entriesToRemove; i2++) {
1873
- __privateGet(this, _entries).delete(sorted[i2][0]);
1874
- }
1875
- }
1876
- return entry;
1877
- };
1878
- continueGlobalClock_fn = function() {
1879
- let maxGlobalClock = -1;
1880
- for (const entry of __privateGet(this, _entries).values()) {
1881
- if (entry && entry[1] > maxGlobalClock) {
1882
- maxGlobalClock = entry[1];
1883
- }
1884
- }
1885
- globalClock = globalClock > maxGlobalClock ? globalClock + 1 : maxGlobalClock + 1;
1886
- };
1887
- checkTombstoneSize_fn = function() {
1888
- const maxTombstoneSize = 1e3;
1889
- const maxTombstoneAge = 30 * 24 * 60 * 60 * 1e3;
1890
- const now = Date.now();
1891
- for (const [id, { timestamp }] of __privateGet(this, _tombstones)) {
1892
- if (__privateGet(this, _tombstones).size > maxTombstoneSize || now - timestamp > maxTombstoneAge) {
1893
- __privateGet(this, _tombstones).delete(id);
1894
- }
1895
- }
1896
- };
1897
- callChangeListeners_fn = function(changeEntries) {
1898
- if (__privateGet(this, _hasChangeListeners)) {
1899
- __privateGet(this, _changeListeners).forEach((listener) => listener(changeEntries));
1900
- }
1901
- };
1902
- // Async cleanup of tombstone conflicts detected during ledger processing
1903
- cleanupTombstoneConflicts_fn = function(state, conflictedPaths) {
1904
- for (const path of conflictedPaths) {
1905
- try {
1906
- state.remove(path);
1907
- } catch (error) {
1908
- console.warn(`Tombstone cleanup failed for path ${path.join(".")}:`, error.message);
1909
- }
1910
- }
1911
- };
1912
- __publicField(_Ledger, "name", "ledger");
1913
- __publicField(_Ledger, "options", {
1914
- userId: null,
1915
- maxSize: 1e4,
1916
- batchSize: 100
1917
- });
1918
- // Callback to clean up state data
1919
- __publicField(_Ledger, "empty", {
1920
- entries: [],
1921
- tombstones: []
1922
- });
1923
- var Ledger = _Ledger;
1924
-
1925
- // src/lib/utils/getViewport.js
1926
- function getViewport() {
1927
- const width = window.innerWidth;
1928
- const height = window.innerHeight;
1929
- const body = document.body;
1930
- const transform = body.style.transform || "";
1931
- let scroll = { x: 0, y: 0 };
1932
- let scale = 1;
1933
- if (transform) {
1934
- const translateMatch = transform.match(/translate\(([^,]+),\s*([^)]+)\)/);
1935
- if (translateMatch) {
1936
- scroll.x = parseFloat(translateMatch[1].replace("px", "")) || 0;
1937
- scroll.y = parseFloat(translateMatch[2].replace("px", "")) || 0;
1938
- }
1939
- const scaleMatch = transform.match(/scale\(([^)]+)\)/);
1940
- if (scaleMatch) {
1941
- scale = parseFloat(scaleMatch[1]);
1942
- }
1943
- }
1944
- return {
1945
- scroll,
1946
- scale,
1947
- width,
1948
- height
1949
- };
1950
- }
1951
-
1952
- // ../ai-tools/operations/nodeOperations.js
1953
- var nodeOperations = defineAiOperations("node", (useContext) => ({
1954
- create: {
1955
- description: 'Create a new node in the scene graph. type is a prototype name (e.g. div, header, p, button, frame). Optional props (e.g. name, frame) and parent (defaults to "app").',
1956
- alias: "create",
1957
- mcpName: "create_node",
1958
- schema: [{
1959
- type: "String",
1960
- props: "Object?",
1961
- parent: "String?"
1962
- }],
1963
- examples: [
1964
- {
1965
- args: {
1966
- type: "button",
1967
- parent: "app"
1968
- },
1969
- description: "Create a button element"
1970
- },
1971
- {
1972
- args: {
1973
- type: "nav",
1974
- parent: "app"
1975
- },
1976
- description: "Create a nav element"
1977
- },
1978
- {
1979
- args: {
1980
- type: "frame",
1981
- props: { frame: "iPhone SE", name: "Home" }
1982
- },
1983
- description: "Create an iPhone SE frame named Home"
1984
- }
1985
- ],
1986
- returns: "{ id: String, type: String }",
1987
- handler: async (args) => {
1988
- const state = useContext("state");
1989
- const { addNode } = await import("./addNode-DMJXP7VV.js");
1990
- const nodes = state.ref(["nodes"]);
1991
- const { type, props, parent = "app" } = args;
1992
- const id = addNode(nodes, type, props, parent);
1993
- if (id instanceof Error) {
1994
- throw id;
1995
- }
1996
- if (type === "frame") {
1997
- const appChildren = nodes.get(["app", "children"]) ?? [];
1998
- const siblings = appChildren.filter((cid) => cid !== id);
1999
- if (siblings.length > 0) {
2000
- let maxRight = 0;
2001
- for (const sid of siblings) {
2002
- const b = nodes.get([sid, "bounds"]);
2003
- if (b) maxRight = Math.max(maxRight, (b.x ?? 0) + (b.width ?? 0));
2004
- }
2005
- const { updateBounds } = await import("./updateBounds-PEGOZ4FT.js");
2006
- updateBounds(nodes, id, { x: maxRight + 100, y: 0 });
2007
- }
2008
- }
2009
- return { id, type };
2010
- }
2011
- },
2012
- updateStyle: {
2013
- description: 'Update styles for a node. Optional breakpoint targets a variant: "@720" (responsive), ":hover" (pseudo-state), "&.is-active" (custom state).',
2014
- mcpName: "update_style",
2015
- schema: [{
2016
- nodeId: "String",
2017
- styles: "Object",
2018
- breakpoint: "String?"
2019
- }],
2020
- examples: [
2021
- {
2022
- args: {
2023
- nodeId: "nd_123",
2024
- styles: {
2025
- "background-color": "#2563eb",
2026
- padding: "16px",
2027
- "border-radius": "8px"
2028
- }
2029
- },
2030
- description: "Set background, padding, and border radius"
2031
- },
2032
- {
2033
- args: {
2034
- nodeId: "nd_123",
2035
- styles: { "background-color": "#1d4ed8" },
2036
- breakpoint: ":hover"
2037
- },
2038
- description: "Set hover background"
2039
- }
2040
- ],
2041
- returns: "{ id: String, styles: Object }",
2042
- handler: async (args) => {
2043
- const state = useContext("state");
2044
- const { updateStyle } = await import("./updateStyle-WAPTDAU5.js");
2045
- const nodes = state.ref(["nodes"]);
2046
- const { nodeId, styles, breakpoint } = args;
2047
- const layoutManaged = ["display", "position"].filter((p) => p in styles);
2048
- const options = {};
2049
- if (breakpoint) {
2050
- if (breakpoint.startsWith(":") || breakpoint.startsWith("&")) {
2051
- options.interactionState = [breakpoint];
2052
- } else {
2053
- options.breakpoint = breakpoint;
2054
- }
2055
- }
2056
- const updatedStyles = updateStyle(nodes, nodeId, { ...styles }, options);
2057
- const result = { id: nodeId, styles: updatedStyles };
2058
- if (layoutManaged.length) {
2059
- result.warning = `Ignored ${layoutManaged.join(", ")} \u2014 use node:setAutoLayout to change layout mode.`;
2060
- }
2061
- return result;
2062
- }
2063
- },
2064
- updateText: {
2065
- description: "Set text content for a node. Use {{expression}} syntax for dynamic values.",
2066
- mcpName: "update_text",
2067
- schema: [{
2068
- nodeId: "String",
2069
- value: "String"
2070
- // Use {{expression}} syntax for dynamic content
2071
- }],
2072
- examples: [
2073
- {
2074
- args: {
2075
- nodeId: "nd_heading",
2076
- value: "Welcome"
2077
- },
2078
- description: 'Set static text to "Welcome"'
2079
- },
2080
- {
2081
- args: {
2082
- nodeId: "nd_label",
2083
- value: "{{user.name}}"
2084
- },
2085
- description: "Set dynamic text with expression"
2086
- }
2087
- ],
2088
- returns: "{ id: String, textContent: Object }",
2089
- handler: async (args) => {
2090
- const state = useContext("state");
2091
- const { createTextContent } = await import("./createTextContent-K4G7KNQ5.js");
2092
- const nodes = state.ref(["nodes"]);
2093
- const { nodeId, value } = args;
2094
- const textContent = createTextContent({ value });
2095
- nodes.set([nodeId, "textContent"], textContent);
2096
- return { id: nodeId, textContent };
2097
- }
2098
- },
2099
- move: {
2100
- description: "Move a node to be the last child of another node",
2101
- mcpName: "move_node",
2102
- schema: [{
2103
- nodeId: "String",
2104
- parentId: "String"
2105
- }],
2106
- examples: [
2107
- {
2108
- args: {
2109
- nodeId: "nd_link",
2110
- parentId: "nd_nav"
2111
- },
2112
- description: "Move link into nav"
2113
- }
2114
- ],
2115
- returns: "{ id: String, movedTo: String, success: Boolean }",
2116
- handler: async (args) => {
2117
- const state = useContext("state");
2118
- const { disconnectNode } = await import("./disconnectNode-GM5F3ZMB.js");
2119
- const { moveNodeToLastChildOf } = await import("./moveNodeToLastChildOf-X46IGL47.js");
2120
- const nodes = state.ref(["nodes"]);
2121
- const { nodeId, parentId } = args;
2122
- disconnectNode(nodes, nodeId);
2123
- const success = moveNodeToLastChildOf(nodes, nodeId, parentId);
2124
- return { id: nodeId, movedTo: parentId, success };
2125
- }
2126
- },
2127
- remove: {
2128
- description: "Remove a node and all its descendants from the scene graph",
2129
- alias: "removeNode",
2130
- mcpName: "remove_node",
2131
- schema: [{
2132
- nodeId: "String"
2133
- }],
2134
- examples: [
2135
- {
2136
- args: {
2137
- nodeId: "nd_old_element"
2138
- },
2139
- description: "Remove an element"
2140
- }
2141
- ],
2142
- returns: "{ id: String, removed: Boolean, removedNodes: Object }",
2143
- handler: async (args) => {
2144
- const state = useContext("state");
2145
- const { removeNode } = await import("./removeNode-A7C34C42.js");
2146
- const nodes = state.ref(["nodes"]);
2147
- const { nodeId } = args;
2148
- const [id, removedNodes] = removeNode(nodes, nodeId);
2149
- return { id, removed: true, removedNodes };
2150
- }
2151
- },
2152
- setAutoLayout: {
2153
- description: 'Set the layout mode of a container node ("none" | "block" | "flex" | "grid"). Sets layout on the parent and the corresponding display style, and normalizes all direct children so they flow correctly. Always use this instead of setting display via updateStyle.',
2154
- alias: "setLayout",
2155
- mcpName: "set_layout",
2156
- schema: [{
2157
- nodeId: "String",
2158
- layout: "String"
2159
- }],
2160
- examples: [
2161
- {
2162
- args: {
2163
- nodeId: "nd_container",
2164
- layout: "flex"
2165
- },
2166
- description: "Enable flex auto-layout on a container"
2167
- },
2168
- {
2169
- args: {
2170
- nodeId: "nd_container",
2171
- layout: "none"
2172
- },
2173
- description: "Disable auto-layout, reverting children to absolute positioning"
2174
- }
2175
- ],
2176
- returns: "{ id: String, layout: String, childrenUpdated: Number }",
2177
- handler: async (args) => {
2178
- const state = useContext("state");
2179
- const { setNodeLayout } = await import("./setNodeLayout-W5QFJBKT.js");
2180
- const nodes = state.ref(["nodes"]);
2181
- const { nodeId, layout } = args;
2182
- return setNodeLayout(nodes, nodeId, layout);
2183
- }
2184
- },
2185
- setName: {
2186
- description: "Set a display name on a node. Names appear in get_scene output and make the tree readable. Pass an empty string to clear back to the default (tag name).",
2187
- mcpName: "set_name",
2188
- schema: [{
2189
- nodeId: "String",
2190
- name: "String"
2191
- }],
2192
- examples: [
2193
- { args: { nodeId: "nd_123", name: "Hero Section" }, description: "Name a section" }
2194
- ],
2195
- returns: "{ id: String, name: String }",
2196
- handler: async (args) => {
2197
- const state = useContext("state");
2198
- const nodes = state.ref(["nodes"]);
2199
- const { nodeId, name } = args;
2200
- if (name === "") {
2201
- const { clearName } = await import("./clearName-O7J77F77.js");
2202
- clearName(nodes, nodeId);
2203
- return { id: nodeId, name: "" };
2204
- }
2205
- const { setName } = await import("./setName-OQOO3URG.js");
2206
- setName(nodes, nodeId, name);
2207
- return { id: nodeId, name };
2208
- }
2209
- },
2210
- clearName: {
2211
- description: "Clear the display name from a node, reverting to its tag name.",
2212
- schema: [{
2213
- nodeId: "String"
2214
- }],
2215
- examples: [
2216
- { args: { nodeId: "nd_123" }, description: "Clear name back to default" }
2217
- ],
2218
- returns: "{ id: String }",
2219
- handler: async (args) => {
2220
- const state = useContext("state");
2221
- const { clearName } = await import("./clearName-O7J77F77.js");
2222
- const nodes = state.ref(["nodes"]);
2223
- const { nodeId } = args;
2224
- clearName(nodes, nodeId);
2225
- return { id: nodeId };
2226
- }
2227
- },
2228
- addComponent: {
2229
- description: "Convert an existing node into a reusable local component. The node is replaced in-place by an instance; the original tree becomes the component definition. Returns instanceId and componentId.",
2230
- mcpName: "add_component",
2231
- schema: [{
2232
- nodeId: "String",
2233
- name: "String?"
2234
- }],
2235
- examples: [
2236
- { args: { nodeId: "nd_card", name: "Card" }, description: "Convert a card node into a reusable component" }
2237
- ],
2238
- returns: "{ instanceId: String, componentId: String, name: String }",
2239
- handler: async (args) => {
2240
- const state = useContext("state");
2241
- const { addComponent } = await import("./addComponent-77PUZWLS.js");
2242
- const nodes = state.ref(["nodes"]);
2243
- const { nodeId, name = "" } = args;
2244
- const instanceId = addComponent(nodes, nodeId, name);
2245
- const componentId = nodes.get([instanceId, "component"]);
2246
- return { instanceId, componentId, name };
2247
- }
2248
- }
2249
- }));
2250
-
2251
- // ../ai-tools/operations/treeOperations.js
2252
- var treeOperations = defineAiOperations("tree", (useContext) => ({
2253
- create: {
2254
- description: 'Create a nested tree of nodes recursively (use for complex structures like mobile pages). For frames, parent MUST be "app".',
2255
- alias: "createTree",
2256
- schema: [{
2257
- tree: "Object",
2258
- parent: "String?"
2259
- }],
2260
- examples: [{
2261
- args: {
2262
- tree: {
2263
- type: "frame",
2264
- name: "Home",
2265
- frame: "iPhone SE",
2266
- bounds: {
2267
- x: 0,
2268
- y: 400
2269
- },
2270
- styles: { display: "flex", "flex-direction": "column", overflow: "hidden" },
2271
- children: [
2272
- {
2273
- type: "header",
2274
- styles: { padding: "16px" },
2275
- children: [
2276
- {
2277
- type: "h1",
2278
- text: "App Name"
2279
- }
2280
- ]
2281
- },
2282
- {
2283
- type: "main",
2284
- styles: { flex: "1" }
2285
- },
2286
- {
2287
- type: "footer",
2288
- styles: { padding: "16px" },
2289
- text: "Footer"
2290
- }
2291
- ]
2292
- },
2293
- parent: "app"
2294
- },
2295
- description: "Create mobile page with header, main, footer \u2014 frame is the flex container"
2296
- }],
2297
- returns: "{ rootId: String, createdIds: Array, treeMap: Object }",
2298
- handler: async (args) => {
2299
- const state = useContext("state");
2300
- const log = useContext("log");
2301
- const { addNode } = await import("./addNode-DMJXP7VV.js");
2302
- const { updateStyle } = await import("./updateStyle-WAPTDAU5.js");
2303
- const { setNodeLayout } = await import("./setNodeLayout-W5QFJBKT.js");
2304
- const { normalizeLayoutContext } = await import("./normalizeLayoutContext-SY3L4IB7.js");
2305
- const { createTextContent } = await import("./createTextContent-K4G7KNQ5.js");
2306
- const nodes = state.ref(["nodes"]);
2307
- const { tree, parent = "app" } = args;
2308
- const createdIds = [];
2309
- const treeMap = {};
2310
- const createRecursive = (nodeSpec, parentId) => {
2311
- const { type, children, styles, style, text, ref, bounds: boundsSpec, ...overrides } = nodeSpec;
2312
- const id = addNode(nodes, type, overrides, parentId);
2313
- createdIds.push(id);
2314
- if (ref) {
2315
- treeMap[ref] = id;
2316
- }
2317
- if (type === "frame" && boundsSpec) {
2318
- const { x, y } = boundsSpec;
2319
- const current = nodes.get([id, "bounds"]) ?? {};
2320
- nodes.set([id, "bounds"], {
2321
- ...current,
2322
- ...x != null ? { x } : {},
2323
- ...y != null ? { y } : {}
2324
- });
2325
- }
2326
- const nodeName = overrides.name;
2327
- if (nodeName) {
2328
- nodes.set([id, "name"], nodeName);
2329
- }
2330
- const resolvedStyles = styles || style;
2331
- if (resolvedStyles && Object.keys(resolvedStyles).length > 0) {
2332
- updateStyle(nodes, id, { ...resolvedStyles });
2333
- }
2334
- const resolvedDisplay = resolvedStyles?.display ?? nodes.get([id, "style", "default", "display"]);
2335
- const isFlowParent = resolvedDisplay === "flex" || resolvedDisplay === "grid";
2336
- if (isFlowParent) {
2337
- try {
2338
- setNodeLayout(nodes, id, resolvedDisplay);
2339
- } catch (e) {
2340
- log.warn("setNodeLayout failed for parent", { id, error: e.message });
2341
- }
2342
- }
2343
- if (text && !(children?.length > 0)) {
2344
- const textContent = createTextContent({ value: text });
2345
- nodes.set([id, "textContent"], textContent);
2346
- }
2347
- if (children && children.length > 0) {
2348
- children.forEach((child) => {
2349
- if (isFlowParent) {
2350
- const childStyles = child.styles || child.style || {};
2351
- if (childStyles.position !== "absolute") {
2352
- child = {
2353
- ...child,
2354
- styles: {
2355
- width: "auto",
2356
- height: "auto",
2357
- top: "auto",
2358
- left: "auto",
2359
- ...childStyles
2360
- }
2361
- };
2362
- }
2363
- }
2364
- const childId = createRecursive(child, id);
2365
- if (isFlowParent) {
2366
- normalizeLayoutContext(nodes, childId, id);
2367
- }
2368
- });
2369
- }
2370
- return id;
2371
- };
2372
- const rootId = createRecursive(tree, parent);
2373
- return { id: rootId, rootId, createdIds, treeMap, type: "tree" };
2374
- }
2375
- }
2376
- }));
2377
-
2378
- // ../ai-tools/operations/behaviorOperations.js
2379
- var behaviorOperations = defineAiOperations("behavior", (useContext) => ({
2380
- // ── Events ──────────────────────────────────────────────────────────────────
2381
- addEvent: {
2382
- description: 'Add or replace an event handler on a node (replaces any existing handler with the same name). Event names use React-style onX format (onClick, onSubmit, onInput, onChange, onMouseEnter, etc.); lowercase names like "click" or "submit" are auto-normalized. Use binding for zero-arg store actions (e.g. "$store.myStore.doSomething"); use code when you need arguments or complex logic \u2014 code MUST be a complete function expression: function (ctx, event) { ... }. Access stores inside the handler via ctx.$store.<storeName>.',
2383
- mcpName: "add_event",
2384
- schema: [{
2385
- nodeId: "String",
2386
- name: "String",
2387
- binding: "String?",
2388
- code: "String?",
2389
- mode: "String?"
2390
- }],
2391
- examples: [
2392
- { args: { nodeId: "nd_btn", name: "onClick", binding: "$store.default.increment" }, description: "Call store action on click" },
2393
- { args: { nodeId: "nd_btn", name: "onClick", code: 'function (ctx, event) {\n ctx.$store.todo.items.push({ text: ctx.$store.todo.newTodo, done: false })\n ctx.$store.todo.newTodo = ""\n}' }, description: "Add click handler with code" },
2394
- { args: { nodeId: "nd_form", name: "onSubmit", code: "function (ctx, event) {\n event.preventDefault()\n}" }, description: "Prevent default on form submit" }
2395
- ],
2396
- returns: "{ id: String, name: String }",
2397
- handler: async (args) => {
2398
- const state = useContext("state");
2399
- const { addEvent } = await import("./addEvent-P2KGVMLM.js");
2400
- const { updateEvent } = await import("./updateEvent-ZHCKBJIM.js");
2401
- const { normalizeEventName } = await import("./normalizeEventName-2JPOX7Y6.js");
2402
- const nodes = state.ref(["nodes"]);
2403
- const { nodeId, name, binding, code, mode } = args;
2404
- const normalized = normalizeEventName(name);
2405
- const events = nodes.get([nodeId, "events"]) ?? [];
2406
- const existing = events.find((e) => e.name === normalized);
2407
- if (!existing) {
2408
- addEvent(nodes, nodeId, normalized);
2409
- }
2410
- if (binding !== void 0) {
2411
- const current = (nodes.get([nodeId, "events"]) ?? []).find((e) => e.name === normalized) ?? { name: normalized };
2412
- updateEvent(nodes, nodeId, normalized, { ...current, mode: "binding", binding: binding.split("."), code: null });
2413
- } else if (code !== void 0) {
2414
- const current = (nodes.get([nodeId, "events"]) ?? []).find((e) => e.name === normalized) ?? { name: normalized };
2415
- updateEvent(nodes, nodeId, normalized, { ...current, mode: mode ?? "code", code, binding: null });
2416
- }
2417
- return { id: nodeId, name: normalized };
2418
- }
2419
- },
2420
- updateEvent: {
2421
- description: "Update an existing event handler by name",
2422
- schema: [{
2423
- nodeId: "String",
2424
- name: "String",
2425
- event: "Object"
2426
- }],
2427
- examples: [
2428
- { args: { nodeId: "nd_btn", name: "onClick", event: { mode: "code", code: 'alert("hi")' } }, description: "Update onClick handler" }
2429
- ],
2430
- returns: "{ id: String, name: String }",
2431
- handler: async (args) => {
2432
- const state = useContext("state");
2433
- const { updateEvent } = await import("./updateEvent-ZHCKBJIM.js");
2434
- const { normalizeEventName } = await import("./normalizeEventName-2JPOX7Y6.js");
2435
- const nodes = state.ref(["nodes"]);
2436
- const { nodeId, name, event } = args;
2437
- const lookupName = normalizeEventName(name);
2438
- const normalized = event?.name !== void 0 ? { ...event, name: normalizeEventName(event.name) } : { ...event, name: lookupName };
2439
- updateEvent(nodes, nodeId, lookupName, normalized);
2440
- return { id: nodeId, name: lookupName };
2441
- }
2442
- },
2443
- removeEvent: {
2444
- description: "Remove an event handler by name",
2445
- schema: [{
2446
- nodeId: "String",
2447
- name: "String"
2448
- }],
2449
- examples: [
2450
- { args: { nodeId: "nd_btn", name: "onClick" }, description: "Remove onClick handler" }
2451
- ],
2452
- returns: "{ id: String, name: String }",
2453
- handler: async (args) => {
2454
- const state = useContext("state");
2455
- const { removeEvent } = await import("./removeEvent-KTSOCV4C.js");
2456
- const { normalizeEventName } = await import("./normalizeEventName-2JPOX7Y6.js");
2457
- const nodes = state.ref(["nodes"]);
2458
- const { nodeId, name } = args;
2459
- const normalized = normalizeEventName(name);
2460
- removeEvent(nodes, nodeId, normalized);
2461
- return { id: nodeId, name: normalized };
2462
- }
2463
- },
2464
- // ── Routing ─────────────────────────────────────────────────────────────────
2465
- updateRoute: {
2466
- description: "Set the route path on a frame node for multi-page navigation",
2467
- schema: [{
2468
- nodeId: "String",
2469
- route: "Any"
2470
- }],
2471
- examples: [
2472
- { args: { nodeId: "nd_frame", route: "/about" }, description: "Set route path" },
2473
- { args: { nodeId: "nd_frame", route: { path: "/users/:id" } }, description: "Set route with params" }
2474
- ],
2475
- returns: "{ id: String, route: Object }",
2476
- handler: async (args) => {
2477
- const state = useContext("state");
2478
- const { updateRoute } = await import("./updateRoute-3RRPY2T5.js");
2479
- const nodes = state.ref(["nodes"]);
2480
- const { nodeId, route } = args;
2481
- const normalized = typeof route === "string" ? { path: route } : route;
2482
- updateRoute(nodes, nodeId, normalized);
2483
- return { id: nodeId, route: normalized };
2484
- }
2485
- },
2486
- setHomePage: {
2487
- description: "Mark a frame as the home page (root route)",
2488
- schema: [{
2489
- nodeId: "String",
2490
- isHomePage: "Any"
2491
- }],
2492
- examples: [
2493
- { args: { nodeId: "nd_frame", isHomePage: true }, description: "Set as home page" }
2494
- ],
2495
- returns: "{ id: String, isHomePage: Any }",
2496
- handler: async (args) => {
2497
- const state = useContext("state");
2498
- const { setHomePage } = await import("./setHomePage-MHCP4P24.js");
2499
- const nodes = state.ref(["nodes"]);
2500
- const { nodeId, isHomePage } = args;
2501
- setHomePage(nodes, nodeId, isHomePage);
2502
- return { id: nodeId, isHomePage };
2503
- }
2504
- },
2505
- setDestination: {
2506
- description: "Set a navigation destination on a link or button node",
2507
- schema: [{
2508
- nodeId: "String",
2509
- destination: "Any"
2510
- }],
2511
- examples: [
2512
- { args: { nodeId: "nd_link", destination: "/about" }, description: "Navigate to /about on click" }
2513
- ],
2514
- returns: "{ id: String, destination: Object }",
2515
- handler: async (args) => {
2516
- const state = useContext("state");
2517
- const { setDestination } = await import("./setDestination-DAYIYYIV.js");
2518
- const nodes = state.ref(["nodes"]);
2519
- const { nodeId, destination } = args;
2520
- const normalized = typeof destination === "string" ? { path: destination } : destination;
2521
- setDestination(nodes, nodeId, normalized);
2522
- return { id: nodeId, destination: normalized };
2523
- }
2524
- },
2525
- clearDestination: {
2526
- description: "Remove the navigation destination from a node",
2527
- schema: [{
2528
- nodeId: "String"
2529
- }],
2530
- examples: [
2531
- { args: { nodeId: "nd_link" }, description: "Clear navigation destination" }
2532
- ],
2533
- returns: "{ id: String }",
2534
- handler: async (args) => {
2535
- const state = useContext("state");
2536
- const { clearDestination } = await import("./clearDestination-EMCIEDAP.js");
2537
- const nodes = state.ref(["nodes"]);
2538
- const { nodeId } = args;
2539
- clearDestination(nodes, nodeId);
2540
- return { id: nodeId };
2541
- }
2542
- },
2543
- // ── Dynamic behavior ────────────────────────────────────────────────────────
2544
- setRepeat: {
2545
- description: 'Repeat a node for each item in a data binding (loop). binding is a dot-path on ctx (e.g. "$store.todo.items").',
2546
- schema: [{
2547
- nodeId: "String",
2548
- binding: "String",
2549
- as: "String?",
2550
- index: "String?",
2551
- key: "Any?",
2552
- keyOn: "Any?"
2553
- }],
2554
- examples: [
2555
- { args: { nodeId: "nd_card", binding: "$store.todo.items", as: "$item" }, description: "Repeat card for each item in the todo store" }
2556
- ],
2557
- returns: "{ id: String, binding: String }",
2558
- handler: async (args) => {
2559
- const state = useContext("state");
2560
- const { setRepeat } = await import("./setRepeat-YZTZFDTQ.js");
2561
- const nodes = state.ref(["nodes"]);
2562
- const { nodeId, binding, as: asAlias, index: indexAlias, key, keyOn } = args;
2563
- const bindingPath = binding.split(".");
2564
- setRepeat(nodes, nodeId, { descriptor: { mode: "binding", binding: bindingPath }, as: asAlias, index: indexAlias, key, keyOn });
2565
- return { id: nodeId, binding };
2566
- }
2567
- },
2568
- clearRepeat: {
2569
- description: "Remove repeat binding from a node",
2570
- schema: [{
2571
- nodeId: "String"
2572
- }],
2573
- examples: [
2574
- { args: { nodeId: "nd_card" }, description: "Stop repeating" }
2575
- ],
2576
- returns: "{ id: String }",
2577
- handler: async (args) => {
2578
- const state = useContext("state");
2579
- const { clearRepeat } = await import("./clearRepeat-436RGATR.js");
2580
- const nodes = state.ref(["nodes"]);
2581
- const { nodeId } = args;
2582
- clearRepeat(nodes, nodeId);
2583
- return { id: nodeId };
2584
- }
2585
- },
2586
- setRender: {
2587
- description: 'Conditionally show/hide a node based on an expression. Pass an expression that uses ctx (e.g. "ctx.$store.user.isAdmin"); it is wrapped as a computed function automatically. Stores are at ctx.$store.<name>; loop vars at ctx.$item / ctx.$index.',
2588
- schema: [{
2589
- nodeId: "String",
2590
- value: "String"
2591
- }],
2592
- examples: [
2593
- { args: { nodeId: "nd_admin", value: "ctx.$store.user.isAdmin" }, description: "Show only for admins" }
2594
- ],
2595
- returns: "{ id: String, value: String }",
2596
- handler: async (args) => {
2597
- const state = useContext("state");
2598
- const { setRender } = await import("./setRender-NHXZZGME.js");
2599
- const nodes = state.ref(["nodes"]);
2600
- const { nodeId, value } = args;
2601
- const computed = `function (ctx) {
2602
- return ${value}
2603
- }`;
2604
- setRender(nodes, nodeId, { mode: "computed", computed });
2605
- return { id: nodeId, value };
2606
- }
2607
- },
2608
- clearRender: {
2609
- description: "Remove conditional rendering from a node (always show)",
2610
- schema: [{
2611
- nodeId: "String"
2612
- }],
2613
- examples: [
2614
- { args: { nodeId: "nd_admin" }, description: "Always render" }
2615
- ],
2616
- returns: "{ id: String }",
2617
- handler: async (args) => {
2618
- const state = useContext("state");
2619
- const { clearRender } = await import("./clearRender-DFMNHXXQ.js");
2620
- const nodes = state.ref(["nodes"]);
2621
- const { nodeId } = args;
2622
- clearRender(nodes, nodeId);
2623
- return { id: nodeId };
2624
- }
2625
- },
2626
- // ── States ──────────────────────────────────────────────────────────────────
2627
- addState: {
2628
- description: 'Register a custom state class on a node (e.g. "is-active"). Style it with updateStyle breakpoint "&.is-active".',
2629
- schema: [{
2630
- nodeId: "String",
2631
- stateName: "String"
2632
- }],
2633
- examples: [
2634
- { args: { nodeId: "nd_tab", stateName: "is-active" }, description: "Add active state" }
2635
- ],
2636
- returns: "{ id: String, stateName: String }",
2637
- handler: async (args) => {
2638
- const state = useContext("state");
2639
- const { addState } = await import("./addState-ZWDA2CLN.js");
2640
- const nodes = state.ref(["nodes"]);
2641
- const { nodeId, stateName } = args;
2642
- addState(nodes, nodeId, stateName);
2643
- return { id: nodeId, stateName };
2644
- }
2645
- },
2646
- updateState: {
2647
- description: "Set the expression that controls when a state is active",
2648
- schema: [{
2649
- nodeId: "String",
2650
- stateName: "String",
2651
- expression: "String"
2652
- }],
2653
- examples: [
2654
- { args: { nodeId: "nd_tab", stateName: "is-active", expression: '$router.currentRoute?.path === "/"' }, description: "Activate on home route" }
2655
- ],
2656
- returns: "{ id: String, stateName: String }",
2657
- handler: async (args) => {
2658
- const state = useContext("state");
2659
- const { updateState } = await import("./updateState-WRLF4SSC.js");
2660
- const nodes = state.ref(["nodes"]);
2661
- const { nodeId, stateName, expression } = args;
2662
- updateState(nodes, nodeId, stateName, { name: stateName, mode: "computed", computed: expression ?? null });
2663
- return { id: nodeId, stateName };
2664
- }
2665
- },
2666
- removeState: {
2667
- description: "Remove a custom state from a node",
2668
- schema: [{
2669
- nodeId: "String",
2670
- stateName: "String"
2671
- }],
2672
- examples: [
2673
- { args: { nodeId: "nd_tab", stateName: "is-active" }, description: "Remove active state" }
2674
- ],
2675
- returns: "{ id: String, stateName: String }",
2676
- handler: async (args) => {
2677
- const state = useContext("state");
2678
- const { removeState } = await import("./removeState-PO6J3JYQ.js");
2679
- const nodes = state.ref(["nodes"]);
2680
- const { nodeId, stateName } = args;
2681
- removeState(nodes, nodeId, stateName);
2682
- return { id: nodeId, stateName };
2683
- }
2684
- },
2685
- // ── Metadata ────────────────────────────────────────────────────────────────
2686
- updateBounds: {
2687
- description: "Update the position and size of a node",
2688
- schema: [{
2689
- nodeId: "String",
2690
- bounds: "Object"
2691
- }],
2692
- examples: [
2693
- { args: { nodeId: "nd_frame", bounds: { x: 500, y: 0, width: 375, height: 667 } }, description: "Position a frame" }
2694
- ],
2695
- returns: "{ id: String, bounds: Object }",
2696
- handler: async (args) => {
2697
- const state = useContext("state");
2698
- const { updateBounds } = await import("./updateBounds-PEGOZ4FT.js");
2699
- const nodes = state.ref(["nodes"]);
2700
- const { nodeId, bounds } = args;
2701
- updateBounds(nodes, nodeId, bounds);
2702
- return { id: nodeId, bounds };
2703
- }
2704
- },
2705
- setHtmlId: {
2706
- description: "Set the HTML id attribute on a node",
2707
- schema: [{
2708
- nodeId: "String",
2709
- id: "String"
2710
- }],
2711
- examples: [
2712
- { args: { nodeId: "nd_section", id: "hero-section" }, description: "Set HTML id for anchor links" }
2713
- ],
2714
- returns: "{ id: String, htmlId: String }",
2715
- handler: async (args) => {
2716
- const state = useContext("state");
2717
- const { setHtmlId } = await import("./setHtmlId-3HYPFT3T.js");
2718
- const nodes = state.ref(["nodes"]);
2719
- const { nodeId, id } = args;
2720
- setHtmlId(nodes, nodeId, id);
2721
- return { id: nodeId, htmlId: id };
2722
- }
2723
- },
2724
- addAttribute: {
2725
- description: "Add a custom HTML attribute to a node",
2726
- schema: [{
2727
- nodeId: "String",
2728
- name: "String",
2729
- value: "Any?",
2730
- mode: "String?"
2731
- }],
2732
- examples: [
2733
- { args: { nodeId: "nd_img", name: "src", value: "/hero.png" }, description: "Set image source" },
2734
- { args: { nodeId: "nd_img", name: "alt", value: "Hero image" }, description: "Set alt text" }
2735
- ],
2736
- returns: "{ id: String, name: String }",
2737
- handler: async (args) => {
2738
- const state = useContext("state");
2739
- const { addAttribute } = await import("./addAttribute-PWIHRX6Y.js");
2740
- const nodes = state.ref(["nodes"]);
2741
- const { nodeId, name, value, mode } = args;
2742
- addAttribute(nodes, nodeId, { name, value, mode });
2743
- return { id: nodeId, name };
2744
- }
2745
- },
2746
- updateAttribute: {
2747
- description: 'Update or upsert an attribute by name. For two-way input binding use name "model", mode "binding", and binding "$store.path". model XOR value/checked \u2014 setting model clears value and checked; setting value or checked clears model.',
2748
- schema: [{
2749
- nodeId: "String",
2750
- name: "String",
2751
- mode: "String?",
2752
- value: "Any?",
2753
- binding: "Any?",
2754
- computed: "String?",
2755
- code: "String?"
2756
- }],
2757
- examples: [
2758
- { args: { nodeId: "nd_img", name: "src", value: "/new-hero.png" }, description: "Change image source" },
2759
- { args: { nodeId: "nd_email", name: "model", mode: "binding", binding: "$store.form.email" }, description: "Two-way bind input to store" }
2760
- ],
2761
- returns: "{ id: String, name: String }",
2762
- handler: async (args) => {
2763
- const state = useContext("state");
2764
- const { updateAttribute } = await import("./updateAttribute-ODXM7YXA.js");
2765
- const nodes = state.ref(["nodes"]);
2766
- const { nodeId, ...attr } = args;
2767
- if (typeof attr.binding === "string") {
2768
- attr.binding = attr.binding.split(".");
2769
- }
2770
- if (attr.name === "model" && attr.mode == null) {
2771
- attr.mode = "binding";
2772
- }
2773
- updateAttribute(nodes, nodeId, attr.name, attr);
2774
- return { id: nodeId, name: attr.name };
2775
- }
2776
- },
2777
- removeAttribute: {
2778
- description: "Remove an attribute by name",
2779
- schema: [{
2780
- nodeId: "String",
2781
- name: "String"
2782
- }],
2783
- examples: [
2784
- { args: { nodeId: "nd_img", name: "src" }, description: "Remove src attribute" }
2785
- ],
2786
- returns: "{ id: String, name: String }",
2787
- handler: async (args) => {
2788
- const state = useContext("state");
2789
- const { removeAttribute } = await import("./removeAttribute-P2IDGOQH.js");
2790
- const nodes = state.ref(["nodes"]);
2791
- const { nodeId, name } = args;
2792
- removeAttribute(nodes, nodeId, name);
2793
- return { id: nodeId, name };
2794
- }
2795
- },
2796
- // ── Lifecycle hooks ─────────────────────────────────────────────────────────
2797
- addLifecycleHook: {
2798
- description: 'Add a lifecycle hook to a node (mount, unmount, update). mode is "code" with a code string, or "binding" with a store action binding.',
2799
- schema: [{
2800
- nodeId: "String",
2801
- key: "String",
2802
- code: "String?",
2803
- binding: "String?"
2804
- }],
2805
- examples: [
2806
- { args: { nodeId: "nd_page", key: "mount", code: 'console.log("mounted")' }, description: "Run code on mount" },
2807
- { args: { nodeId: "nd_page", key: "mount", binding: "cart.load" }, description: "Call a store action on mount" }
2808
- ],
2809
- returns: "{ id: String, key: String }",
2810
- handler: async (args) => {
2811
- const state = useContext("state");
2812
- const { addLifecycleHook } = await import("./addLifecycleHook-VSOAZGTG.js");
2813
- const { updateLifecycleHook } = await import("./updateLifecycleHook-JEMQQYM5.js");
2814
- const nodes = state.ref(["nodes"]);
2815
- const { nodeId, key, code, binding } = args;
2816
- addLifecycleHook(nodes, nodeId, key);
2817
- if (code !== void 0 || binding !== void 0) {
2818
- updateLifecycleHook(nodes, nodeId, key, {
2819
- key,
2820
- mode: code !== void 0 ? "code" : "binding",
2821
- code: code ?? "",
2822
- binding: binding ?? null
2823
- });
2824
- }
2825
- return { id: nodeId, key };
2826
- }
2827
- },
2828
- updateLifecycleHook: {
2829
- description: "Update a lifecycle hook by key. hook may include key, mode, code, binding.",
2830
- schema: [{
2831
- nodeId: "String",
2832
- key: "String",
2833
- hook: "Object"
2834
- }],
2835
- returns: "{ id: String, key: String }",
2836
- handler: async (args) => {
2837
- const state = useContext("state");
2838
- const { updateLifecycleHook } = await import("./updateLifecycleHook-JEMQQYM5.js");
2839
- const nodes = state.ref(["nodes"]);
2840
- const { nodeId, key, hook } = args;
2841
- const current = (nodes.get([nodeId, "lifecycle"]) ?? []).find((h2) => h2.key === key) ?? { key };
2842
- updateLifecycleHook(nodes, nodeId, key, { ...current, ...hook });
2843
- return { id: nodeId, key };
2844
- }
2845
- },
2846
- removeLifecycleHook: {
2847
- description: "Remove a lifecycle hook by key.",
2848
- schema: [{
2849
- nodeId: "String",
2850
- key: "String"
2851
- }],
2852
- returns: "{ id: String, key: String }",
2853
- handler: async (args) => {
2854
- const state = useContext("state");
2855
- const { removeLifecycleHook } = await import("./removeLifecycleHook-NKXLF3QT.js");
2856
- removeLifecycleHook(state.ref(["nodes"]), args.nodeId, args.key);
2857
- return { id: args.nodeId, key: args.key };
2858
- }
2859
- },
2860
- // ── Select options ──────────────────────────────────────────────────────────
2861
- addOption: {
2862
- description: "Add a static option to a select node.",
2863
- schema: [{
2864
- nodeId: "String",
2865
- value: "String",
2866
- label: "String?"
2867
- }],
2868
- examples: [
2869
- { args: { nodeId: "nd_select", value: "us", label: "United States" }, description: "Add a select option" }
2870
- ],
2871
- returns: "{ id: String, value: String }",
2872
- handler: async (args) => {
2873
- const state = useContext("state");
2874
- const { addOption } = await import("./addOption-3U3LAV4C.js");
2875
- const nodes = state.ref(["nodes"]);
2876
- const { nodeId, value, label } = args;
2877
- addOption(nodes, nodeId, { value, label: label ?? value });
2878
- return { id: nodeId, value };
2879
- }
2880
- },
2881
- updateOption: {
2882
- description: "Update a select option by its current value. Pass the old value to look up, and optionally a new value/label.",
2883
- schema: [{
2884
- nodeId: "String",
2885
- value: "String",
2886
- newValue: "String?",
2887
- label: "String?"
2888
- }],
2889
- returns: "{ id: String, value: String }",
2890
- handler: async (args) => {
2891
- const state = useContext("state");
2892
- const { updateOption } = await import("./updateOption-SH33P5WW.js");
2893
- const nodes = state.ref(["nodes"]);
2894
- const { nodeId, value, newValue, label } = args;
2895
- const nextValue = newValue ?? value;
2896
- updateOption(nodes, nodeId, value, { value: nextValue, label: label ?? nextValue });
2897
- return { id: nodeId, value: nextValue };
2898
- }
2899
- },
2900
- removeOption: {
2901
- description: "Remove a select option by value.",
2902
- schema: [{
2903
- nodeId: "String",
2904
- value: "String"
2905
- }],
2906
- returns: "{ id: String, value: String }",
2907
- handler: async (args) => {
2908
- const state = useContext("state");
2909
- const { removeOption } = await import("./removeOption-6HW62A5Y.js");
2910
- removeOption(state.ref(["nodes"]), args.nodeId, args.value);
2911
- return { id: args.nodeId, value: args.value };
2912
- }
2913
- },
2914
- setOptionsExpression: {
2915
- description: "Bind a select node's options to a data expression instead of a static list. binding is a {{expression}} returning an array; valueKey/labelKey pick fields from each item.",
2916
- schema: [{
2917
- nodeId: "String",
2918
- binding: "String",
2919
- valueKey: "String?",
2920
- labelKey: "String?"
2921
- }],
2922
- examples: [
2923
- { args: { nodeId: "nd_select", binding: "{{countries}}", valueKey: "code", labelKey: "name" }, description: "Populate options from a store" }
2924
- ],
2925
- returns: "{ id: String }",
2926
- handler: async (args) => {
2927
- const state = useContext("state");
2928
- const { setOptionsExpression } = await import("./setOptionsExpression-XZZOJPCM.js");
2929
- const nodes = state.ref(["nodes"]);
2930
- const { nodeId, binding, valueKey, labelKey } = args;
2931
- setOptionsExpression(nodes, nodeId, { binding, valueKey, labelKey });
2932
- return { id: nodeId };
2933
- }
2934
- },
2935
- clearOptionsExpression: {
2936
- description: "Switch a select node back to its static options list.",
2937
- schema: [{
2938
- nodeId: "String"
2939
- }],
2940
- returns: "{ id: String }",
2941
- handler: async (args) => {
2942
- const state = useContext("state");
2943
- const { clearOptionsExpression } = await import("./clearOptionsExpression-RGDXKYVX.js");
2944
- clearOptionsExpression(state.ref(["nodes"]), args.nodeId);
2945
- return { id: args.nodeId };
2946
- }
2947
- },
2948
- // ── Tag name / raw HTML ─────────────────────────────────────────────────────
2949
- setTagName: {
2950
- description: "Change the HTML tag of an element node (e.g. div to section).",
2951
- mcpName: "set_tag_name",
2952
- schema: [{
2953
- nodeId: "String",
2954
- tagName: "String"
2955
- }],
2956
- examples: [
2957
- { args: { nodeId: "nd_box", tagName: "section" }, description: "Make a div semantic" }
2958
- ],
2959
- returns: "{ id: String, tagName: String }",
2960
- handler: async (args) => {
2961
- const state = useContext("state");
2962
- const { setTagName } = await import("./setTagName-EGPQ66XI.js");
2963
- const nodes = state.ref(["nodes"]);
2964
- const { nodeId, tagName } = args;
2965
- setTagName(nodes, nodeId, tagName);
2966
- return { id: nodeId, tagName };
2967
- }
2968
- },
2969
- updateHtml: {
2970
- description: "Set the inner HTML of a template node (raw HTML embed).",
2971
- schema: [{
2972
- nodeId: "String",
2973
- html: "String"
2974
- }],
2975
- returns: "{ id: String }",
2976
- handler: async (args) => {
2977
- const state = useContext("state");
2978
- const { updateHtml } = await import("./updateHtml-6BPU5PRY.js");
2979
- updateHtml(state.ref(["nodes"]), args.nodeId, args.html);
2980
- return { id: args.nodeId };
2981
- }
2982
- },
2983
- // ── Route params ────────────────────────────────────────────────────────────
2984
- addRouteParam: {
2985
- description: "Add a route parameter to a frame route (e.g. an :id segment). Set key to name it; optional marks it optional.",
2986
- schema: [{
2987
- nodeId: "String",
2988
- key: "String?",
2989
- optional: "Boolean?"
2990
- }],
2991
- examples: [
2992
- { args: { nodeId: "nd_frame", key: "id" }, description: "Add an :id param to the route" }
2993
- ],
2994
- returns: "{ id: String, index: Number }",
2995
- handler: async (args) => {
2996
- const state = useContext("state");
2997
- const { addParamToRoute } = await import("./addParamToRoute-43UDJ4YE.js");
2998
- const nodes = state.ref(["nodes"]);
2999
- const { nodeId, key, optional } = args;
3000
- addParamToRoute(nodes, nodeId);
3001
- const params = nodes.get([nodeId, "route", "params"]) ?? [];
3002
- const index = params.length - 1;
3003
- if (key !== void 0 || optional !== void 0) {
3004
- nodes.set([nodeId, "route", "params", index], {
3005
- key: key ?? null,
3006
- optional: optional ?? false
3007
- });
3008
- }
3009
- return { id: nodeId, index };
3010
- }
3011
- },
3012
- removeRouteParam: {
3013
- description: "Remove a route parameter from a frame route by index.",
3014
- schema: [{
3015
- nodeId: "String",
3016
- index: "Number"
3017
- }],
3018
- returns: "{ id: String, index: Number }",
3019
- handler: async (args) => {
3020
- const state = useContext("state");
3021
- const { removeParamFromRoute } = await import("./removeParamFromRoute-LIKPDVU4.js");
3022
- removeParamFromRoute(state.ref(["nodes"]), args.nodeId, args.index);
3023
- return { id: args.nodeId, index: args.index };
3024
- }
3025
- }
3026
- }));
3027
-
3028
- // ../ai-tools/operations/tokenOperations.js
3029
- var tokenOperations = defineAiOperations("token", (useContext) => ({
3030
- create: {
3031
- description: 'Create a design token. path is the token name (e.g. "color/primary"), type is the token kind (color, dimension, fontFamily, etc.), value is the CSS value. Reference tokens in styles via the slugged path (slashes/dots become dashes): path "color/primary" \u2192 var(--color-primary).',
3032
- mcpName: "create_token",
3033
- schema: [{
3034
- path: "String",
3035
- value: "String",
3036
- type: "String?"
3037
- }],
3038
- examples: [
3039
- { args: { path: "color/primary", value: "#3B82F6", type: "color" }, description: "Create a primary color token" },
3040
- { args: { path: "spacing/lg", value: "24px", type: "dimension" }, description: "Create a spacing token" }
3041
- ],
3042
- returns: "{ id: String, path: String }",
3043
- handler: async (args) => {
3044
- const state = useContext("state");
3045
- const { addToken } = await import("./addToken-7P5NGEG4.js");
3046
- const tokens = state.ref(["tokens"]);
3047
- const { path, value, type } = args;
3048
- const id = addToken(tokens, {
3049
- $path: path,
3050
- $value: value,
3051
- ...type !== void 0 ? { $type: type } : {}
3052
- });
3053
- return { id, path };
3054
- }
3055
- },
3056
- update: {
3057
- description: "Update a design token. changes may include path, value, or type.",
3058
- mcpName: "update_token",
3059
- schema: [{
3060
- tokenId: "String",
3061
- changes: "Object"
3062
- }],
3063
- examples: [
3064
- { args: { tokenId: "tk_abc", changes: { value: "#EF4444" } }, description: "Change a token value" }
3065
- ],
3066
- returns: "{ id: String }",
3067
- handler: async (args) => {
3068
- const state = useContext("state");
3069
- const { updateToken } = await import("./updateToken-CFIIILXB.js");
3070
- const tokens = state.ref(["tokens"]);
3071
- const { tokenId, changes = {} } = args;
3072
- const mapped = {};
3073
- if (changes.path !== void 0) mapped.$path = changes.path;
3074
- if (changes.value !== void 0) mapped.$value = changes.value;
3075
- if (changes.type !== void 0) mapped.$type = changes.type;
3076
- updateToken(tokens, tokenId, mapped);
3077
- return { id: tokenId };
3078
- }
3079
- },
3080
- delete: {
3081
- description: "Delete a design token by id.",
3082
- mcpName: "delete_token",
3083
- schema: [{
3084
- tokenId: "String"
3085
- }],
3086
- examples: [
3087
- { args: { tokenId: "tk_abc" }, description: "Delete a token" }
3088
- ],
3089
- returns: "{ id: String }",
3090
- handler: async (args) => {
3091
- const state = useContext("state");
3092
- const { removeToken } = await import("./removeToken-BKJE3U6Q.js");
3093
- const tokens = state.ref(["tokens"]);
3094
- removeToken(tokens, args.tokenId);
3095
- return { id: args.tokenId };
3096
- }
3097
- }
3098
- }));
3099
-
3100
- // ../ai-tools/operations/storeOperations.js
3101
- function coerceValue(value, type) {
3102
- if (value === void 0 || value === null) return value;
3103
- if (typeof value !== "string") return value;
3104
- switch (type) {
3105
- case "number":
3106
- return value === "" ? 0 : Number(value);
3107
- case "boolean":
3108
- return value === "true" || value === "1";
3109
- case "array":
3110
- case "object":
3111
- if (!value || value === "") return type === "array" ? [] : {};
3112
- try {
3113
- return JSON.parse(value);
3114
- } catch {
3115
- return type === "array" ? [] : {};
3116
- }
3117
- default:
3118
- return value;
3119
- }
3120
- }
3121
- function resolveIndex(list, { key, name, index }) {
3122
- const label = key ?? name;
3123
- if (label !== void 0) {
3124
- return list.findIndex((item) => (item.key ?? item.name) === label);
3125
- }
3126
- return index ?? -1;
3127
- }
3128
- var storeOperations = defineAiOperations("store", (useContext) => ({
3129
- // ── Stores ──────────────────────────────────────────────────────────────
3130
- create: {
3131
- description: "Create a data store. Stores hold reactive values, computed properties, and actions that nodes can bind to (via repeat, model, render, or {{expressions}}). The store id is its name. Optionally pass state/computed/actions arrays to seed the store in one call. Store actions and computed use this for state (e.g. function () { this.items = []; }), not a context first argument.",
3132
- alias: "createStore",
3133
- mcpName: "create_store",
3134
- schema: [{
3135
- name: "String",
3136
- state: "Array?",
3137
- computed: "Array?",
3138
- actions: "Array?"
3139
- }],
3140
- examples: [
3141
- {
3142
- args: {
3143
- name: "todo",
3144
- state: [
3145
- { key: "newText", type: "string", value: "" },
3146
- { key: "items", type: "array", value: [] }
3147
- ],
3148
- actions: [
3149
- { name: "addTodo", code: 'function () { const text = this.newText.trim(); if (!text) return; this.items = [...this.items, { text, done: false }]; this.newText = ""; }' }
3150
- ]
3151
- },
3152
- description: "Create a todo store with state and actions in one call"
3153
- }
3154
- ],
3155
- returns: "{ id: String }",
3156
- handler: async (args) => {
3157
- const state = useContext("state");
3158
- const { validateStorePayload } = await import("./validateStorePayload-7A2INWJV.js");
3159
- const { addStore } = await import("./addStore-A4CRKMPO.js");
3160
- const { createValue } = await import("./createValue-D5MP2SMM.js");
3161
- const { createComputed } = await import("./createComputed-I23CA5NX.js");
3162
- const { createAction } = await import("./createAction-CKUAX4TU.js");
3163
- validateStorePayload(args);
3164
- const stores = state.ref(["stores"]);
3165
- const id = addStore(stores, args.name);
3166
- if (args.state?.length) {
3167
- stores.set([id, "state"], args.state.map((item) => createValue({
3168
- key: item.key,
3169
- type: item.type,
3170
- value: coerceValue(item.value, item.type)
3171
- })));
3172
- }
3173
- if (args.computed?.length) {
3174
- stores.set([id, "computed"], args.computed.map((item) => createComputed({
3175
- name: item.name,
3176
- code: item.code
3177
- })));
3178
- }
3179
- if (args.actions?.length) {
3180
- stores.set([id, "actions"], args.actions.map((item) => createAction({
3181
- name: item.name,
3182
- code: item.code
3183
- })));
3184
- }
3185
- return { id };
3186
- }
3187
- },
3188
- remove: {
3189
- description: "Remove a data store and everything in it.",
3190
- alias: "removeStore",
3191
- schema: [{
3192
- storeId: "String"
3193
- }],
3194
- returns: "{ id: String }",
3195
- handler: async (args) => {
3196
- const state = useContext("state");
3197
- const { removeStore } = await import("./removeStore-5ZZ57NHV.js");
3198
- removeStore(state.ref(["stores"]), args.storeId);
3199
- return { id: args.storeId };
3200
- }
3201
- },
3202
- // ── Values (reactive state) ─────────────────────────────────────────────
3203
- addValue: {
3204
- description: "Add a reactive value to a store. key is the value name, type is string/number/boolean/array/object, value is the initial value.",
3205
- mcpName: "add_store_value",
3206
- schema: [{
3207
- storeId: "String",
3208
- key: "String?",
3209
- type: "String?",
3210
- value: "String?"
3211
- }],
3212
- examples: [
3213
- { args: { storeId: "cart", key: "items", type: "array", value: "[]" }, description: "Add an items array to the cart store" }
3214
- ],
3215
- returns: "{ storeId: String, key: String, index: Number }",
3216
- handler: async (args) => {
3217
- const state = useContext("state");
3218
- const { addValue } = await import("./addValue-VQW7HQX7.js");
3219
- const { updateValue } = await import("./updateValue-JTEEC2B6.js");
3220
- const stores = state.ref(["stores"]);
3221
- const { storeId, key, type, value } = args;
3222
- addValue(stores, storeId, type);
3223
- const list = stores.get([storeId, "state"]) ?? [];
3224
- const index = 0;
3225
- const current = list[index];
3226
- if (key !== void 0 || value !== void 0) {
3227
- const resolvedType = type ?? current.type;
3228
- updateValue(stores, storeId, index, {
3229
- key: key ?? current.key,
3230
- type: resolvedType,
3231
- value: coerceValue(value ?? current.value, resolvedType)
3232
- });
3233
- }
3234
- return { storeId, key: key ?? current.key, index };
3235
- }
3236
- },
3237
- updateValue: {
3238
- description: "Update a store value by key (or index). changes may include key, type, value.",
3239
- schema: [{
3240
- storeId: "String",
3241
- key: "String?",
3242
- index: "Number?",
3243
- changes: "Object"
3244
- }],
3245
- examples: [
3246
- { args: { storeId: "cart", key: "items", changes: { value: '[{"id":1}]' } }, description: "Set the items value" }
3247
- ],
3248
- returns: "{ storeId: String, index: Number }",
3249
- handler: async (args) => {
3250
- const state = useContext("state");
3251
- const { updateValue } = await import("./updateValue-JTEEC2B6.js");
3252
- const stores = state.ref(["stores"]);
3253
- const { storeId, changes = {} } = args;
3254
- const list = stores.get([storeId, "state"]) ?? [];
3255
- const index = resolveIndex(list, args);
3256
- if (index < 0) throw new Error(`store value not found: ${args.key ?? args.index} in ${storeId}`);
3257
- const merged = { ...list[index], ...changes };
3258
- if (changes.value !== void 0) {
3259
- merged.value = coerceValue(merged.value, merged.type);
3260
- }
3261
- updateValue(stores, storeId, index, merged);
3262
- return { storeId, index };
3263
- }
3264
- },
3265
- removeValue: {
3266
- description: "Remove a store value by key (or index).",
3267
- schema: [{
3268
- storeId: "String",
3269
- key: "String?",
3270
- index: "Number?"
3271
- }],
3272
- returns: "{ storeId: String, index: Number }",
3273
- handler: async (args) => {
3274
- const state = useContext("state");
3275
- const { removeValue } = await import("./removeValue-5FNPXWNL.js");
3276
- const stores = state.ref(["stores"]);
3277
- const list = stores.get([args.storeId, "state"]) ?? [];
3278
- const index = resolveIndex(list, args);
3279
- if (index < 0) throw new Error(`store value not found: ${args.key ?? args.index} in ${args.storeId}`);
3280
- removeValue(stores, args.storeId, index);
3281
- return { storeId: args.storeId, index };
3282
- }
3283
- },
3284
- // ── Computed ────────────────────────────────────────────────────────────
3285
- addComputed: {
3286
- description: "Add a computed property to a store. code is a function body string: function () { ... } with store state available on this (e.g. this.items).",
3287
- schema: [{
3288
- storeId: "String",
3289
- name: "String?",
3290
- code: "String?"
3291
- }],
3292
- examples: [
3293
- { args: { storeId: "cart", name: "total", code: "function () { return this.items.reduce((s, i) => s + i.price, 0); }" }, description: "Add a cart total computed" }
3294
- ],
3295
- returns: "{ storeId: String, name: String, index: Number }",
3296
- handler: async (args) => {
3297
- const state = useContext("state");
3298
- const { addComputed } = await import("./addComputed-5J47SS67.js");
3299
- const { updateComputed } = await import("./updateComputed-6LNN453F.js");
3300
- const stores = state.ref(["stores"]);
3301
- const { storeId, name, code } = args;
3302
- addComputed(stores, storeId);
3303
- const list = stores.get([storeId, "computed"]) ?? [];
3304
- const index = 0;
3305
- const current = list[index];
3306
- if (name !== void 0 || code !== void 0) {
3307
- updateComputed(stores, storeId, index, {
3308
- name: name ?? current.name,
3309
- code: code ?? current.code
3310
- });
3311
- }
3312
- return { storeId, name: name ?? current.name, index };
3313
- }
3314
- },
3315
- updateComputed: {
3316
- description: "Update a store computed property by name (or index). changes may include name, code.",
3317
- schema: [{
3318
- storeId: "String",
3319
- name: "String?",
3320
- index: "Number?",
3321
- changes: "Object"
3322
- }],
3323
- returns: "{ storeId: String, index: Number }",
3324
- handler: async (args) => {
3325
- const state = useContext("state");
3326
- const { updateComputed } = await import("./updateComputed-6LNN453F.js");
3327
- const stores = state.ref(["stores"]);
3328
- const { storeId, changes = {} } = args;
3329
- const list = stores.get([storeId, "computed"]) ?? [];
3330
- const index = resolveIndex(list, args);
3331
- if (index < 0) throw new Error(`store computed not found: ${args.name ?? args.index} in ${storeId}`);
3332
- updateComputed(stores, storeId, index, { ...list[index], ...changes });
3333
- return { storeId, index };
3334
- }
3335
- },
3336
- removeComputed: {
3337
- description: "Remove a store computed property by name (or index).",
3338
- schema: [{
3339
- storeId: "String",
3340
- name: "String?",
3341
- index: "Number?"
3342
- }],
3343
- returns: "{ storeId: String, index: Number }",
3344
- handler: async (args) => {
3345
- const state = useContext("state");
3346
- const { removeComputed } = await import("./removeComputed-7C66NNZA.js");
3347
- const stores = state.ref(["stores"]);
3348
- const list = stores.get([args.storeId, "computed"]) ?? [];
3349
- const index = resolveIndex(list, args);
3350
- if (index < 0) throw new Error(`store computed not found: ${args.name ?? args.index} in ${args.storeId}`);
3351
- removeComputed(stores, args.storeId, index);
3352
- return { storeId: args.storeId, index };
3353
- }
3354
- },
3355
- // ── Actions ─────────────────────────────────────────────────────────────
3356
- addAction: {
3357
- description: "Add an action to a store. code is a function body string: function () { ... } that can read and mutate store values via this (e.g. this.items).",
3358
- schema: [{
3359
- storeId: "String",
3360
- name: "String?",
3361
- code: "String?"
3362
- }],
3363
- examples: [
3364
- { args: { storeId: "cart", name: "clear", code: "function () { this.items = []; }" }, description: "Add a clear-cart action" }
3365
- ],
3366
- returns: "{ storeId: String, name: String, index: Number }",
3367
- handler: async (args) => {
3368
- const state = useContext("state");
3369
- const { addAction } = await import("./addAction-5FCPHQHB.js");
3370
- const { updateAction } = await import("./updateAction-ZSNXUEQA.js");
3371
- const stores = state.ref(["stores"]);
3372
- const { storeId, name, code } = args;
3373
- addAction(stores, storeId);
3374
- const list = stores.get([storeId, "actions"]) ?? [];
3375
- const index = 0;
3376
- const current = list[index];
3377
- if (name !== void 0 || code !== void 0) {
3378
- updateAction(stores, storeId, index, {
3379
- name: name ?? current.name,
3380
- code: code ?? current.code
3381
- });
3382
- }
3383
- return { storeId, name: name ?? current.name, index };
3384
- }
3385
- },
3386
- updateAction: {
3387
- description: "Update a store action by name (or index). changes may include name, code.",
3388
- schema: [{
3389
- storeId: "String",
3390
- name: "String?",
3391
- index: "Number?",
3392
- changes: "Object"
3393
- }],
3394
- returns: "{ storeId: String, index: Number }",
3395
- handler: async (args) => {
3396
- const state = useContext("state");
3397
- const { updateAction } = await import("./updateAction-ZSNXUEQA.js");
3398
- const stores = state.ref(["stores"]);
3399
- const { storeId, changes = {} } = args;
3400
- const list = stores.get([storeId, "actions"]) ?? [];
3401
- const index = resolveIndex(list, args);
3402
- if (index < 0) throw new Error(`store action not found: ${args.name ?? args.index} in ${storeId}`);
3403
- updateAction(stores, storeId, index, { ...list[index], ...changes });
3404
- return { storeId, index };
3405
- }
3406
- },
3407
- removeAction: {
3408
- description: "Remove a store action by name (or index).",
3409
- schema: [{
3410
- storeId: "String",
3411
- name: "String?",
3412
- index: "Number?"
3413
- }],
3414
- returns: "{ storeId: String, index: Number }",
3415
- handler: async (args) => {
3416
- const state = useContext("state");
3417
- const { removeAction } = await import("./removeAction-PPAIVTW3.js");
3418
- const stores = state.ref(["stores"]);
3419
- const list = stores.get([args.storeId, "actions"]) ?? [];
3420
- const index = resolveIndex(list, args);
3421
- if (index < 0) throw new Error(`store action not found: ${args.name ?? args.index} in ${args.storeId}`);
3422
- removeAction(stores, args.storeId, index);
3423
- return { storeId: args.storeId, index };
3424
- }
3425
- }
3426
- }));
3427
-
3428
- // ../ai-tools/operations/animationOperations.js
3429
- var animationOperations = defineAiOperations("animation", (useContext) => ({
3430
- create: {
3431
- description: 'Create an animation asset. keyframes is a Web Animations API keyframe array (e.g. [{ opacity: 0 }, { opacity: 1 }]). scope is "project" (reusable) or "node". Bind it to nodes with animation:bind.',
3432
- mcpName: "create_animation",
3433
- schema: [{
3434
- name: "String",
3435
- keyframes: "Array",
3436
- duration: "Number?",
3437
- easing: "String?",
3438
- iterations: "Number?",
3439
- fill: "String?",
3440
- scope: "String?"
3441
- }],
3442
- examples: [
3443
- {
3444
- args: { name: "Fade In", keyframes: [{ opacity: 0 }, { opacity: 1 }], duration: 400, easing: "ease-out", scope: "project" },
3445
- description: "Create a reusable fade-in animation"
3446
- }
3447
- ],
3448
- returns: "{ id: String, name: String }",
3449
- handler: async (args) => {
3450
- const state = useContext("state");
3451
- const { createAnimation } = await import("./createAnimation-URI5366N.js");
3452
- const { createAnimationId } = await import("./id-VSNJWKHU.js");
3453
- const animations2 = state.ref(["animations"]);
3454
- const { name, keyframes, duration, easing, iterations, fill, scope } = args;
3455
- const id = createAnimationId();
3456
- animations2.set([id], createAnimation({
3457
- name,
3458
- keyframes,
3459
- duration,
3460
- easing,
3461
- iterations,
3462
- fill,
3463
- scope: scope ?? "project"
3464
- }));
3465
- return { id, name };
3466
- }
3467
- },
3468
- update: {
3469
- description: "Update an animation asset. changes may include name, keyframes, duration, easing, iterations, fill, direction, delay.",
3470
- schema: [{
3471
- animationId: "String",
3472
- changes: "Object"
3473
- }],
3474
- examples: [
3475
- { args: { animationId: "anim_abc", changes: { duration: 600 } }, description: "Slow an animation down" }
3476
- ],
3477
- returns: "{ id: String }",
3478
- handler: async (args) => {
3479
- const state = useContext("state");
3480
- const animations2 = state.ref(["animations"]);
3481
- const { animationId, changes = {} } = args;
3482
- const current = animations2.get([animationId]);
3483
- if (!current) throw new Error(`animation not found: ${animationId}`);
3484
- for (const [key, value] of Object.entries(changes)) {
3485
- animations2.set([animationId, key], value);
3486
- }
3487
- return { id: animationId };
3488
- }
3489
- },
3490
- delete: {
3491
- description: "Delete an animation asset by id. Does not remove bindings that reference it.",
3492
- schema: [{
3493
- animationId: "String"
3494
- }],
3495
- returns: "{ id: String }",
3496
- handler: async (args) => {
3497
- const state = useContext("state");
3498
- const animations2 = state.ref(["animations"]);
3499
- animations2.set([args.animationId], null);
3500
- return { id: args.animationId };
3501
- }
3502
- },
3503
- bind: {
3504
- description: 'Bind an animation to a node. play is the trigger: "mount", "click", "hover", etc. Set reverse to a trigger to play backwards on that event.',
3505
- mcpName: "bind_animation",
3506
- schema: [{
3507
- nodeId: "String",
3508
- animationId: "String",
3509
- play: "String?",
3510
- reverse: "String?"
3511
- }],
3512
- examples: [
3513
- { args: { nodeId: "nd_hero", animationId: "anim_abc", play: "mount" }, description: "Fade the hero in on mount" }
3514
- ],
3515
- returns: "{ nodeId: String, animationId: String, index: Number }",
3516
- handler: async (args) => {
3517
- const state = useContext("state");
3518
- const { addAnimationBinding } = await import("./addAnimationBinding-5UBXLWDB.js");
3519
- const nodes = state.ref(["nodes"]);
3520
- const { nodeId, animationId, play, reverse } = args;
3521
- const binding = { id: animationId, play: play ?? "mount" };
3522
- if (reverse !== void 0) binding.reverse = reverse;
3523
- addAnimationBinding(nodes, nodeId, binding);
3524
- return { nodeId, animationId };
3525
- }
3526
- },
3527
- unbind: {
3528
- description: "Remove an animation binding from a node by animation id.",
3529
- schema: [{
3530
- nodeId: "String",
3531
- animationId: "String"
3532
- }],
3533
- returns: "{ nodeId: String, animationId: String }",
3534
- handler: async (args) => {
3535
- const state = useContext("state");
3536
- const { removeAnimationBinding } = await import("./removeAnimationBinding-UQ24BSXP.js");
3537
- removeAnimationBinding(state.ref(["nodes"]), args.nodeId, args.animationId);
3538
- return { nodeId: args.nodeId, animationId: args.animationId };
3539
- }
3540
- },
3541
- updateBinding: {
3542
- description: "Update an animation binding on a node by animation id. binding may include play, reverse, or id.",
3543
- schema: [{
3544
- nodeId: "String",
3545
- animationId: "String",
3546
- binding: "Object"
3547
- }],
3548
- returns: "{ nodeId: String, animationId: String }",
3549
- handler: async (args) => {
3550
- const state = useContext("state");
3551
- const { updateAnimationBinding } = await import("./updateAnimationBinding-X2UXYQKJ.js");
3552
- updateAnimationBinding(state.ref(["nodes"]), args.nodeId, args.animationId, args.binding);
3553
- return { nodeId: args.nodeId, animationId: args.animationId };
3554
- }
3555
- }
3556
- }));
3557
-
3558
- // ../ai-tools/operations/main.js
3559
- var allOperations = [
3560
- nodeOperations,
3561
- treeOperations,
3562
- behaviorOperations,
3563
- tokenOperations,
3564
- storeOperations,
3565
- animationOperations
3566
- ];
3567
-
3568
- // ../animation-library/src/categories/entrance.js
3569
- var entrance = {
3570
- jui_fadeIn: {
3571
- name: "Fade In",
3572
- category: "entrance",
3573
- defaultPlay: "mount",
3574
- duration: 600,
3575
- easing: "ease",
3576
- fill: "forwards",
3577
- keyframes: [
3578
- { offset: 0, properties: { opacity: "0" } },
3579
- { offset: 1, properties: { opacity: "1" } }
3580
- ]
3581
- },
3582
- jui_fadeInUp: {
3583
- name: "Fade In Up",
3584
- category: "entrance",
3585
- defaultPlay: "mount",
3586
- duration: 600,
3587
- easing: "cubic-bezier(0.4, 0, 0.2, 1)",
3588
- fill: "forwards",
3589
- keyframes: [
3590
- { offset: 0, properties: { opacity: "0", transform: "translateY(30px)" } },
3591
- { offset: 1, properties: { opacity: "1", transform: "translateY(0)" } }
3592
- ]
3593
- },
3594
- jui_fadeInDown: {
3595
- name: "Fade In Down",
3596
- category: "entrance",
3597
- defaultPlay: "mount",
3598
- duration: 600,
3599
- easing: "cubic-bezier(0.4, 0, 0.2, 1)",
3600
- fill: "forwards",
3601
- keyframes: [
3602
- { offset: 0, properties: { opacity: "0", transform: "translateY(-30px)" } },
3603
- { offset: 1, properties: { opacity: "1", transform: "translateY(0)" } }
3604
- ]
3605
- },
3606
- jui_slideInLeft: {
3607
- name: "Slide In Left",
3608
- category: "entrance",
3609
- defaultPlay: "mount",
3610
- duration: 500,
3611
- easing: "cubic-bezier(0.4, 0, 0.2, 1)",
3612
- fill: "forwards",
3613
- keyframes: [
3614
- { offset: 0, properties: { opacity: "0", transform: "translateX(-60px)" } },
3615
- { offset: 1, properties: { opacity: "1", transform: "translateX(0)" } }
3616
- ]
3617
- },
3618
- jui_slideInRight: {
3619
- name: "Slide In Right",
3620
- category: "entrance",
3621
- defaultPlay: "mount",
3622
- duration: 500,
3623
- easing: "cubic-bezier(0.4, 0, 0.2, 1)",
3624
- fill: "forwards",
3625
- keyframes: [
3626
- { offset: 0, properties: { opacity: "0", transform: "translateX(60px)" } },
3627
- { offset: 1, properties: { opacity: "1", transform: "translateX(0)" } }
3628
- ]
3629
- },
3630
- jui_slideInUp: {
3631
- name: "Slide In Up",
3632
- category: "entrance",
3633
- defaultPlay: "mount",
3634
- duration: 500,
3635
- easing: "cubic-bezier(0.4, 0, 0.2, 1)",
3636
- fill: "forwards",
3637
- keyframes: [
3638
- { offset: 0, properties: { opacity: "0", transform: "translateY(60px)" } },
3639
- { offset: 1, properties: { opacity: "1", transform: "translateY(0)" } }
3640
- ]
3641
- },
3642
- jui_slideInDown: {
3643
- name: "Slide In Down",
3644
- category: "entrance",
3645
- defaultPlay: "mount",
3646
- duration: 500,
3647
- easing: "cubic-bezier(0.4, 0, 0.2, 1)",
3648
- fill: "forwards",
3649
- keyframes: [
3650
- { offset: 0, properties: { opacity: "0", transform: "translateY(-60px)" } },
3651
- { offset: 1, properties: { opacity: "1", transform: "translateY(0)" } }
3652
- ]
3653
- },
3654
- jui_scaleIn: {
3655
- name: "Scale In",
3656
- category: "entrance",
3657
- defaultPlay: "mount",
3658
- duration: 500,
3659
- easing: "cubic-bezier(0.4, 0, 0.2, 1)",
3660
- fill: "forwards",
3661
- keyframes: [
3662
- { offset: 0, properties: { opacity: "0", transform: "scale(0.8)" } },
3663
- { offset: 1, properties: { opacity: "1", transform: "scale(1)" } }
3664
- ]
3665
- },
3666
- jui_zoomIn: {
3667
- name: "Zoom In",
3668
- category: "entrance",
3669
- defaultPlay: "mount",
3670
- duration: 500,
3671
- easing: "cubic-bezier(0.4, 0, 0.2, 1)",
3672
- fill: "forwards",
3673
- keyframes: [
3674
- { offset: 0, properties: { opacity: "0", transform: "scale(0.3)" } },
3675
- { offset: 1, properties: { opacity: "1", transform: "scale(1)" } }
3676
- ]
3677
- }
3678
- };
3679
-
3680
- // ../animation-library/src/categories/exit.js
3681
- var exit = {
3682
- jui_fadeOut: {
3683
- name: "Fade Out",
3684
- category: "exit",
3685
- defaultPlay: "mount",
3686
- duration: 600,
3687
- easing: "ease",
3688
- fill: "forwards",
3689
- keyframes: [
3690
- { offset: 0, properties: { opacity: "1" } },
3691
- { offset: 1, properties: { opacity: "0" } }
3692
- ]
3693
- },
3694
- jui_fadeOutDown: {
3695
- name: "Fade Out Down",
3696
- category: "exit",
3697
- defaultPlay: "mount",
3698
- duration: 600,
3699
- easing: "cubic-bezier(0.4, 0, 0.2, 1)",
3700
- fill: "forwards",
3701
- keyframes: [
3702
- { offset: 0, properties: { opacity: "1", transform: "translateY(0)" } },
3703
- { offset: 1, properties: { opacity: "0", transform: "translateY(30px)" } }
3704
- ]
3705
- },
3706
- jui_slideOutLeft: {
3707
- name: "Slide Out Left",
3708
- category: "exit",
3709
- defaultPlay: "mount",
3710
- duration: 500,
3711
- easing: "cubic-bezier(0.4, 0, 0.2, 1)",
3712
- fill: "forwards",
3713
- keyframes: [
3714
- { offset: 0, properties: { opacity: "1", transform: "translateX(0)" } },
3715
- { offset: 1, properties: { opacity: "0", transform: "translateX(-60px)" } }
3716
- ]
3717
- },
3718
- jui_slideOutRight: {
3719
- name: "Slide Out Right",
3720
- category: "exit",
3721
- defaultPlay: "mount",
3722
- duration: 500,
3723
- easing: "cubic-bezier(0.4, 0, 0.2, 1)",
3724
- fill: "forwards",
3725
- keyframes: [
3726
- { offset: 0, properties: { opacity: "1", transform: "translateX(0)" } },
3727
- { offset: 1, properties: { opacity: "0", transform: "translateX(60px)" } }
3728
- ]
3729
- },
3730
- jui_scaleOut: {
3731
- name: "Scale Out",
3732
- category: "exit",
3733
- defaultPlay: "mount",
3734
- duration: 500,
3735
- easing: "cubic-bezier(0.4, 0, 0.2, 1)",
3736
- fill: "forwards",
3737
- keyframes: [
3738
- { offset: 0, properties: { opacity: "1", transform: "scale(1)" } },
3739
- { offset: 1, properties: { opacity: "0", transform: "scale(0.8)" } }
3740
- ]
3741
- }
3742
- };
3743
-
3744
- // ../animation-library/src/categories/emphasis.js
3745
- var emphasis = {
3746
- jui_pulse: {
3747
- name: "Pulse",
3748
- category: "emphasis",
3749
- defaultPlay: "pointerenter",
3750
- defaultReset: "pointerleave",
3751
- duration: 1e3,
3752
- easing: "ease-in-out",
3753
- fill: "none",
3754
- keyframes: [
3755
- { offset: 0, properties: { transform: "scale(1)" } },
3756
- { offset: 0.5, properties: { transform: "scale(1.05)" } },
3757
- { offset: 1, properties: { transform: "scale(1)" } }
3758
- ]
3759
- },
3760
- jui_bounce: {
3761
- name: "Bounce",
3762
- category: "emphasis",
3763
- defaultPlay: "pointerenter",
3764
- defaultReset: "pointerleave",
3765
- duration: 800,
3766
- easing: "cubic-bezier(0.28, 0.84, 0.42, 1)",
3767
- fill: "none",
3768
- keyframes: [
3769
- { offset: 0, properties: { transform: "translateY(0)" } },
3770
- { offset: 0.2, properties: { transform: "translateY(0)" } },
3771
- { offset: 0.4, properties: { transform: "translateY(-20px)" } },
3772
- { offset: 0.5, properties: { transform: "translateY(0)" } },
3773
- { offset: 0.6, properties: { transform: "translateY(-10px)" } },
3774
- { offset: 0.8, properties: { transform: "translateY(0)" } },
3775
- { offset: 1, properties: { transform: "translateY(0)" } }
3776
- ]
3777
- },
3778
- jui_shake: {
3779
- name: "Shake",
3780
- category: "emphasis",
3781
- defaultPlay: "pointerenter",
3782
- defaultReset: "pointerleave",
3783
- duration: 600,
3784
- easing: "ease-in-out",
3785
- fill: "none",
3786
- keyframes: [
3787
- { offset: 0, properties: { transform: "translateX(0)" } },
3788
- { offset: 0.1, properties: { transform: "translateX(-8px)" } },
3789
- { offset: 0.2, properties: { transform: "translateX(8px)" } },
3790
- { offset: 0.3, properties: { transform: "translateX(-8px)" } },
3791
- { offset: 0.4, properties: { transform: "translateX(8px)" } },
3792
- { offset: 0.5, properties: { transform: "translateX(-4px)" } },
3793
- { offset: 0.6, properties: { transform: "translateX(4px)" } },
3794
- { offset: 0.7, properties: { transform: "translateX(-2px)" } },
3795
- { offset: 0.8, properties: { transform: "translateX(2px)" } },
3796
- { offset: 1, properties: { transform: "translateX(0)" } }
3797
- ]
3798
- }
3799
- };
3800
-
3801
- // ../animation-library/src/categories/attention.js
3802
- var attention = {
3803
- jui_flash: {
3804
- name: "Flash",
3805
- category: "attention",
3806
- defaultPlay: "pointerenter",
3807
- defaultReset: "pointerleave",
3808
- duration: 800,
3809
- easing: "ease-in-out",
3810
- fill: "none",
3811
- keyframes: [
3812
- { offset: 0, properties: { opacity: "1" } },
3813
- { offset: 0.25, properties: { opacity: "0" } },
3814
- { offset: 0.5, properties: { opacity: "1" } },
3815
- { offset: 0.75, properties: { opacity: "0" } },
3816
- { offset: 1, properties: { opacity: "1" } }
3817
- ]
3818
- },
3819
- jui_heartbeat: {
3820
- name: "Heartbeat",
3821
- category: "attention",
3822
- defaultPlay: "pointerenter",
3823
- defaultReset: "pointerleave",
3824
- duration: 1200,
3825
- easing: "ease-in-out",
3826
- fill: "none",
3827
- keyframes: [
3828
- { offset: 0, properties: { transform: "scale(1)" } },
3829
- { offset: 0.14, properties: { transform: "scale(1.3)" } },
3830
- { offset: 0.28, properties: { transform: "scale(1)" } },
3831
- { offset: 0.42, properties: { transform: "scale(1.3)" } },
3832
- { offset: 0.7, properties: { transform: "scale(1)" } },
3833
- { offset: 1, properties: { transform: "scale(1)" } }
3834
- ]
3835
- }
3836
- };
3837
-
3838
- // ../animation-library/src/main.js
3839
- var animations = { ...entrance, ...exit, ...emphasis, ...attention };
3840
-
3841
- // src/modes/design/bootstrap.js
3842
- var createDesignBootstrap = ({ port = null, config = {}, token = null, portProvider = null, handles = null } = {}) => new Promise(async (resolve, reject) => {
3843
- try {
3844
- if (!port) throw new Error("[stage/design] MessagePort is required");
3845
- const { loadProjectMain } = await import("./vue-2GZIKYJR.js");
3846
- await loadProjectMain();
3847
- const sources = (await import("/components.js"))?.default ?? {};
3848
- const $app = initializeNode(config.$el || "app");
3849
- const $temp = initializeNode("temp");
3850
- const $components = initializeNode("components");
3851
- const viewport = getViewport();
3852
- const state = R.create().install(f, Ledger, a, f2, r);
3853
- const engine = G.create({ state }).install(
3854
- SceneCompiler.configure(config),
3855
- AiOperations,
3856
- T,
3857
- s.configure({
3858
- url: typeof window !== "undefined" ? window.location.origin : `http://localhost:${config.port}`,
3859
- options: {
3860
- path: "/socket.io",
3861
- transports: ["websocket", "polling"]
3862
- }
3863
- }),
3864
- PageLifecycle.configure({
3865
- visibility: true,
3866
- focus: false,
3867
- freeze: true,
3868
- sleepDetection: { enabled: true, threshold: 1e4 }
3869
- }),
3870
- ContentEditor
3871
- );
3872
- engine.cache.load({ config, token, $app, $temp, $components, viewport });
3873
- engine.sceneCompiler.loadPrototypes(PROTOTYPES);
3874
- engine.sceneCompiler.loadSources(sources);
3875
- engine.aiOps.use(...allOperations);
3876
- engine.socket.create();
3877
- let hasLoaded = false;
3878
- engine.socket.get().on("studio:load", async (scene) => {
3879
- normalizeSceneViewportKinds(scene);
3880
- if (hasLoaded) {
3881
- engine.state.load(scene);
3882
- engine.sceneCompiler.forceNodeGraph();
3883
- return;
3884
- }
3885
- hasLoaded = true;
3886
- engine.state.load(scene);
3887
- engine.state.history.start();
3888
- setTimeout(() => engine.state.history.onCommit((changes) => engine.socket.get().emit("server:commit:changes", changes)), 0);
3889
- await engine.sceneCompiler.create("app", "app");
3890
- await engine.sceneCompiler.create("temp", "temp", { mode: "temp" });
3891
- await engine.sceneCompiler.create("components", "components", { mode: "components" });
3892
- });
3893
- engine.socket.get().on("stage:changes:apply", (changes) => engine.state.apply(changes));
3894
- engine.state.onChange.addListener((changes) => engine.socket.get().emit("server:broadcast:changes", changes));
3895
- if (handles) {
3896
- handles.reconnect = (newPort) => engine.channel.connect(newPort);
3897
- }
3898
- if (portProvider) engine.channel.portProvider(portProvider);
3899
- const channel = await engine.channel.connect(port);
3900
- if (channel) {
3901
- const { nodeGraphContracts } = await import("./nodeGraph-TTOC6H4R.js");
3902
- const { historyContracts } = await import("./history-7PFZW7N6.js");
3903
- const { userContracts } = await import("./user-ZLGCTRZX.js");
3904
- const { assetsContracts } = await import("./assets-3W46CFCY.js");
3905
- const { aiContracts } = await import("./aiRelay-TFBJ7BF4.js");
3906
- const { contentEditorContracts } = await import("./contentEditor-XVLK5LYS.js");
3907
- const { viewportContracts } = await import("./viewport-OTNUF4XI.js");
3908
- const { contracts: nodeContracts } = await import("./main-L3KI7XBW.js");
3909
- const { contracts: animationContracts } = await import("./main-SWZDSGE3.js");
3910
- const { contracts: tokenContracts } = await import("./main-GQD7B74Q.js");
3911
- const { contracts: storeContracts } = await import("./main-ULK5YAYM.js");
3912
- channel.use(
3913
- viewportContracts,
3914
- nodeGraphContracts,
3915
- historyContracts,
3916
- userContracts,
3917
- assetsContracts,
3918
- aiContracts,
3919
- contentEditorContracts,
3920
- ...nodeContracts,
3921
- ...animationContracts,
3922
- ...tokenContracts,
3923
- ...storeContracts
3924
- );
3925
- re(() => engine.state.get(["nodes"]), (nodes) => {
3926
- if (!nodes) return;
3927
- const componentsIds = Object.keys(nodes).filter((id) => nodes[id]?.type === "component");
3928
- const meta = [...engine.sceneCompiler.getMeta()];
3929
- for (const id of componentsIds) {
3930
- const node = nodes[id];
3931
- meta.push({
3932
- displayName: node.name || id,
3933
- category: "local",
3934
- keywords: [node.name, "component"],
3935
- library: null,
3936
- tagName: id
3937
- });
3938
- }
3939
- engine.channel.to("editor").publish("components:set", meta);
3940
- });
3941
- re(() => engine.state.get(["tokens"]), (tokens) => {
3942
- engine.channel.to("editor").publish("tokens:set", tokens ?? {});
3943
- engine.channel.to("panel-tokens").publish("token:set", tokens ?? {});
3944
- });
3945
- re(() => engine.state.get(["stores"]), (stores) => {
3946
- engine.channel.to("editor").publish("stores:set", stores ?? {});
3947
- });
3948
- re(() => engine.state.get(["assets"]), (assets) => {
3949
- engine.channel.to("editor").publish("assets:set", assets);
3950
- });
3951
- re(() => engine.state.get(["libraryClassNames"]), (classNames) => {
3952
- engine.channel.to("editor").publish("libraryClassNames:set", classNames ?? []);
3953
- });
3954
- re(() => {
3955
- const animations2 = engine.state.get(["animations"]);
3956
- if (!animations2) return null;
3957
- return Object.entries(animations2).filter(([, node]) => node !== null && node !== void 0).map(([id, node]) => ({ id, ...node }));
3958
- }, (animations2) => {
3959
- engine.channel.to("editor").publish("animations:set", animations2 ?? []);
3960
- });
3961
- engine.sceneCompiler.addNodeGraphListener((graph, removed, isFullSync) => {
3962
- if (isFullSync) {
3963
- channel.to("renderWorker", "editor").publish("nodeGraph:set", graph);
3964
- } else {
3965
- channel.to("renderWorker", "editor").publish("nodeGraph:update", graph, removed);
3966
- }
3967
- engine.sceneCompiler.projectPuppetJsx(["app"]);
3968
- });
3969
- engine.channel.to("editor").publish("elements:set", elements);
3970
- engine.channel.to("editor").publish("frames:set", palette);
3971
- engine.channel.to("editor").publish("graphics:set", palette2);
3972
- engine.channel.to("editor").publish("globalAnimations:set", animations);
3973
- engine.channel.to("editor").publish("components:set", engine.sceneCompiler.getMeta());
3974
- const initialAssets = engine.state.get(["assets"]);
3975
- if (initialAssets) {
3976
- engine.channel.to("editor").publish("assets:set", initialAssets);
3977
- }
3978
- engine.sceneCompiler.startNodeGraph();
3979
- engine.pageLifecycle.on("hidden", () => {
3980
- engine.sceneCompiler.pauseNodeGraph();
3981
- });
3982
- engine.pageLifecycle.on("visible", () => {
3983
- engine.sceneCompiler.forceNodeGraph();
3984
- });
3985
- engine.pageLifecycle.on("resume", () => {
3986
- const socket = engine.socket.get();
3987
- if (socket.disconnected) socket.connect();
3988
- engine.sceneCompiler.forceNodeGraph();
3989
- });
3990
- engine.channel.onEnable(() => {
3991
- channel.to("renderWorker").publish("nodeGraph:remove");
3992
- const graph = engine.sceneCompiler.getNodeGraph();
3993
- channel.to("renderWorker", "editor").publish("nodeGraph:set", graph);
3994
- const viewport2 = engine.sceneCompiler.getViewport();
3995
- const selectedRids = engine.sceneCompiler.getSelectedRids();
3996
- const focalRid = engine.sceneCompiler.getFocalRid();
3997
- channel.to("renderWorker").publish("viewport:set", viewport2);
3998
- channel.to("renderWorker").publish("selection:rids:set", selectedRids);
3999
- channel.to("renderWorker").publish("selection:focalRid:set", focalRid);
4000
- });
4001
- channel.subscribe("selection:rids:set", (rids) => {
4002
- engine.sceneCompiler.setSelectedRids(rids);
4003
- });
4004
- channel.subscribe("selection:focalRid:set", (rid) => {
4005
- engine.sceneCompiler.setFocalRid(rid || null);
4006
- });
4007
- channel.subscribe("animation:preview:play", (animationId, nodeIds) => {
4008
- for (const nodeId of nodeIds) {
4009
- const result = engine.sceneCompiler.animate(nodeId, animationId, { fill: "none" });
4010
- const anims = Array.isArray(result) ? result : result ? [result] : [];
4011
- for (const anim of anims) {
4012
- anim.addEventListener("finish", () => {
4013
- channel.to("editor").publish("animation:preview:finished", animationId);
4014
- }, { once: true });
4015
- }
4016
- }
4017
- });
4018
- channel.subscribe("animation:preview:stop", (animationId, nodeIds) => {
4019
- for (const nodeId of nodeIds) {
4020
- engine.sceneCompiler.cancelAnimation(nodeId, animationId);
4021
- }
4022
- });
4023
- channel.subscribe("animation:preview:seek", (animationId, timeMs) => {
4024
- engine.sceneCompiler.seekAnimation(animationId, timeMs);
4025
- });
4026
- engine.socket.get().on("stage:relay:user:connected", (id, user) => channel.to("renderWorker").publish("user:connected", id, user));
4027
- engine.socket.get().on("stage:relay:user:disconnected", (id) => channel.to("renderWorker").publish("user:disconnected", id));
4028
- engine.socket.get().on("stage:relay:user:update", (id, user) => channel.to("renderWorker").publish("user:update", id, user));
4029
- engine.socket.get().on("stage:relay:users:set", (users) => channel.to("renderWorker").publish("user:setAll", users));
4030
- engine.socket.get().on("stage:relay:asset:uploaded", (asset) => engine.channel.to("editor").publish("asset:uploaded", asset));
4031
- engine.socket.get().on("stage:screenshot:capture", async () => {
4032
- console.log("[screenshot:relay] capture requested");
4033
- try {
4034
- const nodes = engine.state.get(["nodes"]);
4035
- const appChildren = nodes?.app?.children ?? [];
4036
- const frameEntries = appChildren.filter((id) => nodes[id]?.type === "frame").map((id) => ({ id, name: nodes[id].name || id, bounds: nodes[id].bounds }));
4037
- console.log(`[screenshot:relay] found ${frameEntries.length} frames:`, frameEntries.map((f4) => f4.name));
4038
- const baseConfig = engine.cache.get(["config"]);
4039
- const frames = [];
4040
- for (const frame of frameEntries) {
4041
- console.log(`[screenshot:relay] capturing frame "${frame.name}" (${frame.id})`);
4042
- const opts = {
4043
- config: {
4044
- basePath: baseConfig.basePath ?? `http://localhost:${baseConfig.port}`,
4045
- view: "screen-capture",
4046
- env: "dev",
4047
- nodeId: frame.id
4048
- },
4049
- width: frame.bounds?.width ?? 1440,
4050
- height: frame.bounds?.height ?? 900,
4051
- result: "base64"
4052
- };
4053
- const result = await channel.to("electronMain").request("screenCapture:capture", opts);
4054
- console.log(`[screenshot:relay] captured frame "${frame.name}" \u2014 ${result?.base64?.length ?? 0} chars`);
4055
- frames.push({
4056
- id: frame.id,
4057
- name: frame.name,
4058
- imageData: `data:image/png;base64,${result.base64}`
4059
- });
4060
- }
4061
- console.log(`[screenshot:relay] emitting ${frames.length} frames to server`);
4062
- engine.socket.get().emit("server:screenshot:result", { frames });
4063
- } catch (error) {
4064
- console.error("[screenshot:relay] failed:", error);
4065
- engine.socket.get().emit("server:screenshot:result", { error: error.message });
4066
- }
4067
- });
4068
- resolve(config);
4069
- } else {
4070
- reject(new Error("Stage channel failed to connect"));
4071
- }
4072
- } catch (error) {
4073
- reject(error);
4074
- }
4075
- });
4076
- export {
4077
- createDesignBootstrap
4078
- };