@jucie.io/cli 1.0.9 → 1.0.20

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 (629) hide show
  1. package/dist/jucie.js +223 -163
  2. package/dist/stage/chunks/addAction-3QC2Z4ZR.js +1 -0
  3. package/dist/stage/chunks/addAnimationBinding-N3UW27JM.js +1 -0
  4. package/dist/stage/chunks/addAttribute-MEJIGMHV.js +1 -0
  5. package/dist/stage/chunks/addComponent-AQQI46C3.js +1 -0
  6. package/dist/stage/chunks/addComputed-2JNIUCEP.js +1 -0
  7. package/dist/stage/chunks/addEvent-PN6P6KR5.js +1 -0
  8. package/dist/stage/chunks/addLifecycleHook-D2UKKFVW.js +1 -0
  9. package/dist/stage/chunks/addNode-UXIXDXSD.js +1 -0
  10. package/dist/stage/chunks/addOption-AFCUFOT7.js +1 -0
  11. package/dist/stage/chunks/addParamToRoute-6LOHCID7.js +1 -0
  12. package/dist/stage/chunks/addState-RSEYKWQO.js +1 -0
  13. package/dist/stage/chunks/addStore-AK2FTEON.js +1 -0
  14. package/dist/stage/chunks/addToken-35LUBJPE.js +1 -0
  15. package/dist/stage/chunks/addTree-CU7MJAKT.js +1 -0
  16. package/dist/stage/chunks/addValue-LIQSHZFR.js +1 -0
  17. package/dist/stage/chunks/{aiAttachmentContracts-4GX7AD4P.js → aiAttachmentContracts-KGD3EHZQ.js} +1 -1
  18. package/dist/stage/chunks/{aiMessagesContracts-3IZEU24J.js → aiMessagesContracts-QWUORKI3.js} +1 -1
  19. package/dist/stage/chunks/aiRelay-LW2UZKRR.js +1 -0
  20. package/dist/stage/chunks/{aiSessionContracts-SCDHZZA3.js → aiSessionContracts-RQKGQY4N.js} +1 -1
  21. package/dist/stage/chunks/assets-5J5INILR.js +1 -0
  22. package/dist/stage/chunks/capture-VQE5664P.js +1 -0
  23. package/dist/stage/chunks/{chunk-GG4NWMR6.js → chunk-2JXGTRSC.js} +1 -1
  24. package/dist/stage/chunks/{chunk-BS35FNXF.js → chunk-3GPQ3HYG.js} +1 -1
  25. package/dist/stage/chunks/chunk-3KR3JD5T.js +1 -0
  26. package/dist/stage/chunks/chunk-457GNGEV.js +1 -0
  27. package/dist/stage/chunks/chunk-4KXBOJIC.js +1 -0
  28. package/dist/stage/chunks/chunk-4UJAZNZX.js +1 -0
  29. package/dist/stage/chunks/{chunk-TS6FANUG.js → chunk-5N7NET6A.js} +1 -1
  30. package/dist/stage/chunks/chunk-5RVLCYPU.js +1 -0
  31. package/dist/stage/chunks/chunk-6JNM2JPA.js +1 -0
  32. package/dist/stage/chunks/{chunk-SRRJXNKG.js → chunk-7C53OCBB.js} +1 -1
  33. package/dist/stage/chunks/chunk-7DIGILX7.js +1 -0
  34. package/dist/stage/chunks/{chunk-LOMYBRPE.js → chunk-7H7BUWZP.js} +1 -1
  35. package/dist/stage/chunks/chunk-7SM7WG53.js +1 -0
  36. package/dist/stage/chunks/{chunk-6ZZBJPN5.js → chunk-A7T3U7OZ.js} +1 -1
  37. package/dist/stage/chunks/chunk-AOLXVYBO.js +1 -0
  38. package/dist/stage/chunks/{chunk-OB6WEYNB.js → chunk-ATDHO5ME.js} +1 -1
  39. package/dist/stage/chunks/{chunk-V4F2T2VR.js → chunk-BCDDG7CW.js} +1 -1
  40. package/dist/stage/chunks/chunk-CB4COXKW.js +1 -0
  41. package/dist/stage/chunks/{chunk-4XNQRZ5E.js → chunk-CM6UENYI.js} +1 -1
  42. package/dist/stage/chunks/{chunk-K6PCHHH7.js → chunk-CVWMERPH.js} +1 -1
  43. package/dist/stage/chunks/{chunk-XKEDVW6X.js → chunk-DDCGP5GM.js} +1 -1
  44. package/dist/stage/chunks/chunk-DOGIABU3.js +1 -0
  45. package/dist/stage/chunks/{chunk-SMO45CB3.js → chunk-DUMMXI6I.js} +1 -1
  46. package/dist/stage/chunks/{chunk-HI7ALMQD.js → chunk-E3LBHSMZ.js} +1 -1
  47. package/dist/stage/chunks/chunk-E7JXTPFA.js +1 -0
  48. package/dist/stage/chunks/chunk-GBE5QYRO.js +1 -0
  49. package/dist/stage/chunks/{chunk-BEYPHEBR.js → chunk-GFV4SJGI.js} +1 -1
  50. package/dist/stage/chunks/{chunk-NYG3CJEJ.js → chunk-GILBTTLF.js} +1 -1
  51. package/dist/stage/chunks/chunk-GPV2ZFME.js +1 -0
  52. package/dist/stage/chunks/chunk-HBNF34QX.js +1 -0
  53. package/dist/stage/chunks/{chunk-GIVV5ZCM.js → chunk-HREW6EFQ.js} +1 -1
  54. package/dist/stage/chunks/chunk-HZ7KMV42.js +1 -0
  55. package/dist/stage/chunks/{chunk-U2OFNNHI.js → chunk-HZXJUIIX.js} +1 -1
  56. package/dist/stage/chunks/{chunk-5SOTDESD.js → chunk-IE6IKN6P.js} +1 -1
  57. package/dist/stage/chunks/chunk-IWO4MU2F.js +1 -0
  58. package/dist/stage/chunks/chunk-J7XIIFXF.js +1 -0
  59. package/dist/stage/chunks/chunk-JG62FTV2.js +1 -0
  60. package/dist/stage/chunks/{chunk-L7VQYHXR.js → chunk-JGELXWD3.js} +1 -1
  61. package/dist/stage/chunks/chunk-JKJRK7ER.js +1 -0
  62. package/dist/stage/chunks/{chunk-PU3DZ3MV.js → chunk-JPPPL527.js} +1 -1
  63. package/dist/stage/chunks/chunk-JRCZXEL2.js +1 -0
  64. package/dist/stage/chunks/{chunk-ODSNVDNS.js → chunk-K33QXMAS.js} +1 -1
  65. package/dist/stage/chunks/{chunk-EPBR3BES.js → chunk-K4R2DLAT.js} +1 -1
  66. package/dist/stage/chunks/{chunk-C3DY5XVP.js → chunk-MA3WBBC6.js} +1 -1
  67. package/dist/stage/chunks/chunk-MHU6JTZC.js +1 -0
  68. package/dist/stage/chunks/{chunk-D6NZE747.js → chunk-MO2MHTOQ.js} +1 -1
  69. package/dist/stage/chunks/chunk-MQKISAKO.js +1 -0
  70. package/dist/stage/chunks/{chunk-ARGFDBBK.js → chunk-ND3BSJOS.js} +1 -1
  71. package/dist/stage/chunks/chunk-NGQ7GQSH.js +1 -0
  72. package/dist/stage/chunks/{chunk-VQ7C6EUZ.js → chunk-NM4FV6YK.js} +1 -1
  73. package/dist/stage/chunks/chunk-NOHQVE3L.js +1 -0
  74. package/dist/stage/chunks/{chunk-MLL2ANA6.js → chunk-O6ZKHW5L.js} +1 -1
  75. package/dist/stage/chunks/{chunk-GDGHGTYN.js → chunk-PBDA5G7U.js} +1 -1
  76. package/dist/stage/chunks/{chunk-RZ74UWF3.js → chunk-PBDSKQIQ.js} +1 -1
  77. package/dist/stage/chunks/chunk-PJFVW637.js +1 -0
  78. package/dist/stage/chunks/{chunk-AJVQKPCQ.js → chunk-PRXT2NXZ.js} +1 -1
  79. package/dist/stage/chunks/chunk-QAUB5H3S.js +1 -0
  80. package/dist/stage/chunks/{chunk-BVAPODQ7.js → chunk-QDH6OIAL.js} +1 -1
  81. package/dist/stage/chunks/{chunk-TEUB5MUS.js → chunk-QM4IVTLC.js} +1 -1
  82. package/dist/stage/chunks/chunk-QUWCLSNF.js +1 -0
  83. package/dist/stage/chunks/{chunk-P3WBUN2B.js → chunk-QVOXRLEG.js} +1 -1
  84. package/dist/stage/chunks/chunk-RAHM76FI.js +1 -0
  85. package/dist/stage/chunks/chunk-RONEQF2M.js +1 -0
  86. package/dist/stage/chunks/{chunk-V7BNWQS6.js → chunk-RPTOBIKP.js} +1 -1
  87. package/dist/stage/chunks/{chunk-LR6DSVPP.js → chunk-RSWDPV5U.js} +1 -1
  88. package/dist/stage/chunks/chunk-SSSTBYOF.js +1 -0
  89. package/dist/stage/chunks/{chunk-OPVVANFS.js → chunk-SV2PSWLZ.js} +1 -1
  90. package/dist/stage/chunks/{chunk-LKQDYABR.js → chunk-TDXJNI7H.js} +1 -1
  91. package/dist/stage/chunks/chunk-TFGNKPAQ.js +1 -0
  92. package/dist/stage/chunks/chunk-TYA35RCB.js +1 -0
  93. package/dist/stage/chunks/{chunk-TBDEUSP4.js → chunk-UJZNQZVK.js} +1 -1
  94. package/dist/stage/chunks/{chunk-5PUPZLDN.js → chunk-UN7EZPD7.js} +1 -1
  95. package/dist/stage/chunks/chunk-UOBNXO4G.js +1 -0
  96. package/dist/stage/chunks/chunk-UVV4NANW.js +97 -0
  97. package/dist/stage/chunks/{chunk-5OOKGI32.js → chunk-V5TNO5LS.js} +1 -1
  98. package/dist/stage/chunks/chunk-VHRU6H4C.js +1 -0
  99. package/dist/stage/chunks/chunk-VP2XJ5UI.js +1 -0
  100. package/dist/stage/chunks/{chunk-ZCAGAEP2.js → chunk-VQDQA3ID.js} +1 -1
  101. package/dist/stage/chunks/chunk-VZJTFJZN.js +1 -0
  102. package/dist/stage/chunks/chunk-WCL6XNDN.js +1 -0
  103. package/dist/stage/chunks/chunk-WKUYNMPE.js +1 -0
  104. package/dist/stage/chunks/chunk-WWWIZ7VG.js +1 -0
  105. package/dist/stage/chunks/{chunk-QG2BGE2O.js → chunk-X2R3VYWI.js} +1 -1
  106. package/dist/stage/chunks/{chunk-CVDUFBBG.js → chunk-X5HHNNED.js} +1 -1
  107. package/dist/stage/chunks/{chunk-ZEWKYCOX.js → chunk-X5INDUEQ.js} +1 -1
  108. package/dist/stage/chunks/chunk-XBUV5F3F.js +1 -0
  109. package/dist/stage/chunks/{chunk-HBEWYDHO.js → chunk-XPWU54SD.js} +1 -1
  110. package/dist/stage/chunks/chunk-YFURTAAV.js +1 -0
  111. package/dist/stage/chunks/chunk-YRI4I37X.js +1 -0
  112. package/dist/stage/chunks/chunk-ZCUNR3XN.js +1 -0
  113. package/dist/stage/chunks/clearDestination-TFFJZYZU.js +1 -0
  114. package/dist/stage/chunks/clearName-LAT5C4G3.js +1 -0
  115. package/dist/stage/chunks/clearOptionsExpression-QHE4GD2Y.js +1 -0
  116. package/dist/stage/chunks/clearRender-XEMKLRCM.js +1 -0
  117. package/dist/stage/chunks/clearRepeat-OJXLCGGV.js +1 -0
  118. package/dist/stage/chunks/contentEditor-H4QUMYKV.js +1 -0
  119. package/dist/stage/chunks/createAction-X7WWJ6BN.js +1 -0
  120. package/dist/stage/chunks/createAnimation-TYRSVQNL.js +1 -0
  121. package/dist/stage/chunks/createComputed-NVI2BGGF.js +1 -0
  122. package/dist/stage/chunks/createTextContent-R4ZOE6SM.js +1 -0
  123. package/dist/stage/chunks/createValue-GRZQQ5RR.js +1 -0
  124. package/dist/stage/chunks/design-2S7QAGYM.js +15 -0
  125. package/dist/stage/chunks/dev-PZI3DDXQ.js +1 -0
  126. package/dist/stage/chunks/disconnectNode-RRO6QPMX.js +1 -0
  127. package/dist/stage/chunks/{history-BNHS2T3X.js → history-5FAKKGJY.js} +1 -1
  128. package/dist/stage/chunks/{id-T5EU463K.js → id-G47WSCWG.js} +1 -1
  129. package/dist/stage/chunks/main-GPY4VWAB.js +1 -0
  130. package/dist/stage/chunks/{main-TUNP7F4N.js → main-OLXPOBOM.js} +1 -1
  131. package/dist/stage/chunks/{main-DDWQFH23.js → main-QADVRVCC.js} +1 -1
  132. package/dist/stage/chunks/main-RMI3HY2B.js +1 -0
  133. package/dist/stage/chunks/moveNodeToLastChildOf-SGHEMUMS.js +1 -0
  134. package/dist/stage/chunks/{nodeGraph-ZXVLUHBH.js → nodeGraph-UGMYCUUO.js} +1 -1
  135. package/dist/stage/chunks/{normalizeEventName-6HVMB5GN.js → normalizeEventName-Y34QRO25.js} +1 -1
  136. package/dist/stage/chunks/preview-UBVA3QQU.js +1 -0
  137. package/dist/stage/chunks/removeAction-UIZVYC4K.js +1 -0
  138. package/dist/stage/chunks/removeAnimationBinding-PD2IRVQZ.js +1 -0
  139. package/dist/stage/chunks/removeAttribute-HCDVVDSZ.js +1 -0
  140. package/dist/stage/chunks/removeComputed-2UWAXEAM.js +1 -0
  141. package/dist/stage/chunks/removeEvent-GBW7REQV.js +1 -0
  142. package/dist/stage/chunks/removeLifecycleHook-V4BK7NPV.js +1 -0
  143. package/dist/stage/chunks/removeNode-H7TWCLTZ.js +1 -0
  144. package/dist/stage/chunks/removeOption-4SMMGXLO.js +1 -0
  145. package/dist/stage/chunks/removeParamFromRoute-2Q2PYYP5.js +1 -0
  146. package/dist/stage/chunks/removeState-X4UQTIPT.js +1 -0
  147. package/dist/stage/chunks/removeStore-B3WQQP3D.js +1 -0
  148. package/dist/stage/chunks/removeToken-3QTFHQF6.js +1 -0
  149. package/dist/stage/chunks/removeValue-QIQBSOHR.js +1 -0
  150. package/dist/stage/chunks/setDestination-26OTLIOX.js +1 -0
  151. package/dist/stage/chunks/setHomePage-GBSAVDQC.js +1 -0
  152. package/dist/stage/chunks/setHtmlId-PZQQWCXU.js +1 -0
  153. package/dist/stage/chunks/setName-C26SXODP.js +1 -0
  154. package/dist/stage/chunks/setNodeLayout-PZMYT6M2.js +1 -0
  155. package/dist/stage/chunks/setOptionsExpression-PQ3JOVEW.js +1 -0
  156. package/dist/stage/chunks/setRender-MNCOTE35.js +1 -0
  157. package/dist/stage/chunks/setRepeat-GIOC7YT4.js +1 -0
  158. package/dist/stage/chunks/setTagName-FA7BMEUS.js +1 -0
  159. package/dist/stage/chunks/updateAction-TUQLHSJE.js +1 -0
  160. package/dist/stage/chunks/updateAnimationBinding-I3AQNLO2.js +1 -0
  161. package/dist/stage/chunks/updateAttribute-TLLDGUPR.js +1 -0
  162. package/dist/stage/chunks/updateBounds-KL4N7VYO.js +1 -0
  163. package/dist/stage/chunks/updateComputed-JGJIIC4A.js +1 -0
  164. package/dist/stage/chunks/updateEvent-YOKH67TX.js +1 -0
  165. package/dist/stage/chunks/updateHtml-Z4XI7SYU.js +1 -0
  166. package/dist/stage/chunks/updateLifecycleHook-4555YGGM.js +1 -0
  167. package/dist/stage/chunks/updateOption-YUFQYF43.js +1 -0
  168. package/dist/stage/chunks/updateRoute-42OSDVLS.js +1 -0
  169. package/dist/stage/chunks/updateState-3RQX5YED.js +1 -0
  170. package/dist/stage/chunks/updateStyle-I5NO4TOV.js +1 -0
  171. package/dist/stage/chunks/updateToken-AFJYTJ7R.js +1 -0
  172. package/dist/stage/chunks/updateValue-XGRBUCOT.js +1 -0
  173. package/dist/stage/chunks/{user-LKHAFHX4.js → user-CK5IAVFH.js} +1 -1
  174. package/dist/stage/chunks/{validateStorePayload-PJ5AD64S.js → validateStorePayload-3HAVFGVL.js} +1 -1
  175. package/dist/stage/chunks/{viewport-ANZ3RTUP.js → viewport-CQRIOXC6.js} +1 -1
  176. package/dist/stage/chunks/window-7JZPBAP7.js +1 -0
  177. package/dist/stage/design.js +1 -1
  178. package/dist/stage/dev.js +1 -1
  179. package/dist/stage/preview.js +1 -1
  180. package/dist/stage/prod.js +1 -1
  181. package/dist/stage-bundles/preact/chunks/addComponent-3JC5NC3Y.js +1 -0
  182. package/dist/stage-bundles/preact/chunks/addNode-QXU2P4AE.js +1 -0
  183. package/dist/stage-bundles/preact/chunks/addTree-S73GXWZP.js +1 -0
  184. package/dist/stage-bundles/{vue/chunks/aiAttachmentContracts-V3EW4BHI.js → preact/chunks/aiAttachmentContracts-7LLE57FI.js} +1 -1
  185. package/dist/stage-bundles/{vue/chunks/aiMessagesContracts-ZGHZJ7EU.js → preact/chunks/aiMessagesContracts-RAR7ENH4.js} +1 -1
  186. package/dist/stage-bundles/preact/chunks/aiRelay-C6ZJ3PUF.js +1 -0
  187. package/dist/stage-bundles/preact/chunks/{aiSessionContracts-WAMOGHSG.js → aiSessionContracts-NHU57TUZ.js} +1 -1
  188. package/dist/stage-bundles/preact/chunks/assets-6LM3GVQU.js +1 -0
  189. package/dist/stage-bundles/preact/chunks/capture-ON3BO6WE.js +1 -0
  190. package/dist/stage-bundles/preact/chunks/chunk-2Z2RXHNK.js +1 -0
  191. package/dist/stage-bundles/preact/chunks/chunk-3WCN6R5H.js +1 -0
  192. package/dist/stage-bundles/preact/chunks/chunk-45YNKT2X.js +1 -0
  193. package/dist/stage-bundles/preact/chunks/chunk-4Q5R44ZZ.js +1 -0
  194. package/dist/stage-bundles/preact/chunks/chunk-7I5TQOE2.js +1 -0
  195. package/dist/stage-bundles/preact/chunks/chunk-7YVQSQRP.js +1 -0
  196. package/dist/stage-bundles/preact/chunks/chunk-AOGIMUZ2.js +103 -0
  197. package/dist/stage-bundles/preact/chunks/chunk-BGQJ5B3Q.js +1 -0
  198. package/dist/stage-bundles/preact/chunks/chunk-CGCD6S33.js +6 -0
  199. package/dist/stage-bundles/preact/chunks/chunk-DWW3567Q.js +1 -0
  200. package/dist/stage-bundles/preact/chunks/chunk-G3PYA3EU.js +1 -0
  201. package/dist/stage-bundles/preact/chunks/chunk-H5NHEM4C.js +1 -0
  202. package/dist/stage-bundles/preact/chunks/chunk-IG2Y3H6O.js +1 -0
  203. package/dist/stage-bundles/preact/chunks/chunk-IWTWZA3T.js +1 -0
  204. package/dist/stage-bundles/preact/chunks/chunk-LXD22ETU.js +1 -0
  205. package/dist/stage-bundles/preact/chunks/chunk-M577WNTV.js +1 -0
  206. package/dist/stage-bundles/preact/chunks/chunk-NFKUJQZH.js +1 -0
  207. package/dist/stage-bundles/preact/chunks/chunk-NKDO4J6J.js +1 -0
  208. package/dist/stage-bundles/preact/chunks/chunk-SCJKRPIZ.js +1 -0
  209. package/dist/stage-bundles/preact/chunks/{chunk-O24ISLGT.js → chunk-ULVFWUAU.js} +1 -1
  210. package/dist/stage-bundles/preact/chunks/contentEditor-7BYCT3TH.js +1 -0
  211. package/dist/stage-bundles/preact/chunks/design-3DHGUCPX.js +15 -0
  212. package/dist/stage-bundles/preact/chunks/{history-VAAFKC4E.js → history-CMF3VYTT.js} +1 -1
  213. package/dist/stage-bundles/preact/chunks/main-3VRCGPRY.js +1 -0
  214. package/dist/stage-bundles/preact/chunks/{main-KFGWT6OT.js → main-DH4JOS22.js} +1 -1
  215. package/dist/stage-bundles/preact/chunks/{main-MVCLW2IY.js → main-FAFZABOS.js} +1 -1
  216. package/dist/stage-bundles/preact/chunks/main-S7RT75O6.js +1 -0
  217. package/dist/stage-bundles/preact/chunks/moveNodeToLastChildOf-CWSWITHI.js +1 -0
  218. package/dist/stage-bundles/preact/chunks/{nodeGraph-JS64VAAQ.js → nodeGraph-UNI2HUNX.js} +1 -1
  219. package/dist/stage-bundles/preact/chunks/preview-YOYSHYJF.js +1 -0
  220. package/dist/stage-bundles/preact/chunks/setNodeLayout-KQVZJBYW.js +1 -0
  221. package/dist/stage-bundles/preact/chunks/{user-FCPIGR7X.js → user-H5DKMGWA.js} +1 -1
  222. package/dist/stage-bundles/preact/chunks/{viewport-LLBH2LJW.js → viewport-ZRWTVYC3.js} +1 -1
  223. package/dist/stage-bundles/preact/chunks/window-IMPT5I3D.js +1 -0
  224. package/dist/stage-bundles/preact/entry.js +1 -1
  225. package/dist/stage-bundles/preact/framework-compat.js +1 -1
  226. package/dist/stage-bundles/preact/framework-hooks.js +1 -1
  227. package/dist/stage-bundles/preact/framework-jsx-runtime.js +1 -1
  228. package/dist/stage-bundles/preact/framework.js +1 -1
  229. package/dist/stage-bundles/preact/sdk.js +1 -1
  230. package/dist/stage-bundles/react/chunks/{addAction-BMIMOFKC.js → addAction-EGLGEGTS.js} +1 -1
  231. package/dist/stage-bundles/react/chunks/addAnimationBinding-WCB5VZLU.js +1 -0
  232. package/dist/stage-bundles/react/chunks/{addAttribute-2WJG6MQQ.js → addAttribute-2MZ3OFUE.js} +1 -1
  233. package/dist/stage-bundles/react/chunks/addComponent-3JC5NC3Y.js +1 -0
  234. package/dist/stage-bundles/react/chunks/{addComputed-WNYOBBU3.js → addComputed-7JLBFD6I.js} +1 -1
  235. package/dist/stage-bundles/react/chunks/{addEvent-KKSUEWJZ.js → addEvent-HOBNKM2F.js} +1 -1
  236. package/dist/stage-bundles/react/chunks/{addLifecycleHook-KXJ6HEKQ.js → addLifecycleHook-GHYL7FRH.js} +1 -1
  237. package/dist/stage-bundles/react/chunks/addNode-QXU2P4AE.js +1 -0
  238. package/dist/stage-bundles/react/chunks/{addOption-6OBUAJDH.js → addOption-PVXGN7AJ.js} +1 -1
  239. package/dist/stage-bundles/react/chunks/addParamToRoute-VL2VOFZS.js +1 -0
  240. package/dist/stage-bundles/react/chunks/{addState-BH7Q5V6N.js → addState-U2NWEGWV.js} +1 -1
  241. package/dist/stage-bundles/react/chunks/addStore-AQMFKH33.js +1 -0
  242. package/dist/stage-bundles/react/chunks/{addToken-DFONVP3M.js → addToken-XF2FFA52.js} +1 -1
  243. package/dist/stage-bundles/react/chunks/addTree-S73GXWZP.js +1 -0
  244. package/dist/stage-bundles/react/chunks/{addValue-6SJ7KR7G.js → addValue-O7YXXMST.js} +1 -1
  245. package/dist/stage-bundles/{preact/chunks/aiAttachmentContracts-V3EW4BHI.js → react/chunks/aiAttachmentContracts-7LLE57FI.js} +1 -1
  246. package/dist/stage-bundles/{preact/chunks/aiMessagesContracts-ZGHZJ7EU.js → react/chunks/aiMessagesContracts-RAR7ENH4.js} +1 -1
  247. package/dist/stage-bundles/react/chunks/aiRelay-C6ZJ3PUF.js +1 -0
  248. package/dist/stage-bundles/{vue/chunks/aiSessionContracts-WAMOGHSG.js → react/chunks/aiSessionContracts-NHU57TUZ.js} +1 -1
  249. package/dist/stage-bundles/react/chunks/assets-6LM3GVQU.js +1 -0
  250. package/dist/stage-bundles/react/chunks/capture-6GFKGXIT.js +1 -0
  251. package/dist/stage-bundles/react/chunks/chunk-2Z2RXHNK.js +1 -0
  252. package/dist/stage-bundles/react/chunks/chunk-3WCN6R5H.js +1 -0
  253. package/dist/stage-bundles/react/chunks/chunk-45YNKT2X.js +1 -0
  254. package/dist/stage-bundles/react/chunks/chunk-4Q5R44ZZ.js +1 -0
  255. package/dist/stage-bundles/react/chunks/chunk-7I5TQOE2.js +1 -0
  256. package/dist/stage-bundles/react/chunks/chunk-7YVQSQRP.js +1 -0
  257. package/dist/stage-bundles/react/chunks/chunk-BGQJ5B3Q.js +1 -0
  258. package/dist/stage-bundles/react/chunks/chunk-CGCD6S33.js +6 -0
  259. package/dist/stage-bundles/react/chunks/chunk-G3PYA3EU.js +1 -0
  260. package/dist/stage-bundles/react/chunks/{chunk-5HITMZZP.js → chunk-G5RN6RXS.js} +1 -1
  261. package/dist/stage-bundles/react/chunks/chunk-HJOMUN4M.js +49 -0
  262. package/dist/stage-bundles/react/chunks/chunk-IG2Y3H6O.js +1 -0
  263. package/dist/stage-bundles/react/chunks/chunk-IWTWZA3T.js +1 -0
  264. package/dist/stage-bundles/react/chunks/{chunk-FCMIFWSU.js → chunk-KLPU3QNW.js} +1 -1
  265. package/dist/stage-bundles/react/chunks/chunk-LXD22ETU.js +1 -0
  266. package/dist/stage-bundles/react/chunks/chunk-M577WNTV.js +1 -0
  267. package/dist/stage-bundles/react/chunks/chunk-NFKUJQZH.js +1 -0
  268. package/dist/stage-bundles/react/chunks/chunk-NKDO4J6J.js +1 -0
  269. package/dist/stage-bundles/react/chunks/{chunk-76SRFCJO.js → chunk-P3ZDKQWG.js} +1 -1
  270. package/dist/stage-bundles/react/chunks/chunk-SCJKRPIZ.js +1 -0
  271. package/dist/stage-bundles/react/chunks/chunk-U66LRTNF.js +1 -0
  272. package/dist/stage-bundles/react/chunks/chunk-UCLSDDOL.js +1 -0
  273. package/dist/stage-bundles/{vue/chunks/chunk-O24ISLGT.js → react/chunks/chunk-ULVFWUAU.js} +1 -1
  274. package/dist/stage-bundles/react/chunks/clearDestination-IGKNL7FN.js +1 -0
  275. package/dist/stage-bundles/react/chunks/clearName-HJ7ZTHBU.js +1 -0
  276. package/dist/stage-bundles/react/chunks/clearOptionsExpression-NZQFL64E.js +1 -0
  277. package/dist/stage-bundles/react/chunks/clearRender-NPVDTNFA.js +1 -0
  278. package/dist/stage-bundles/react/chunks/clearRepeat-7YFYZODP.js +1 -0
  279. package/dist/stage-bundles/react/chunks/contentEditor-7BYCT3TH.js +1 -0
  280. package/dist/stage-bundles/react/chunks/{createAction-ITB7SY4A.js → createAction-73YUTK3T.js} +1 -1
  281. package/dist/stage-bundles/react/chunks/createAnimation-2WQSMYT5.js +1 -0
  282. package/dist/stage-bundles/react/chunks/{createComputed-BMWO4U4T.js → createComputed-DMX7CJA3.js} +1 -1
  283. package/dist/stage-bundles/react/chunks/{createTextContent-ZVU57TXU.js → createTextContent-4Z4YATBO.js} +1 -1
  284. package/dist/stage-bundles/react/chunks/createValue-DXQSLOBG.js +1 -0
  285. package/dist/stage-bundles/react/chunks/design-6KSNU4OK.js +15 -0
  286. package/dist/stage-bundles/react/chunks/{disconnectNode-PNUX55O2.js → disconnectNode-2CLWVIQP.js} +1 -1
  287. package/dist/stage-bundles/{vue/chunks/history-VAAFKC4E.js → react/chunks/history-CMF3VYTT.js} +1 -1
  288. package/dist/stage-bundles/react/chunks/{id-UUBDNSND.js → id-ZIAZZ5AS.js} +1 -1
  289. package/dist/stage-bundles/react/chunks/main-3VRCGPRY.js +1 -0
  290. package/dist/stage-bundles/{vue/chunks/main-KFGWT6OT.js → react/chunks/main-DH4JOS22.js} +1 -1
  291. package/dist/stage-bundles/react/chunks/{main-XBZULJGK.js → main-FAFZABOS.js} +1 -1
  292. package/dist/stage-bundles/react/chunks/main-S7RT75O6.js +1 -0
  293. package/dist/stage-bundles/react/chunks/moveNodeToLastChildOf-CWSWITHI.js +1 -0
  294. package/dist/stage-bundles/{vue/chunks/nodeGraph-JS64VAAQ.js → react/chunks/nodeGraph-UNI2HUNX.js} +1 -1
  295. package/dist/stage-bundles/react/chunks/{normalizeEventName-3CSULWE4.js → normalizeEventName-SNBYJDUY.js} +1 -1
  296. package/dist/stage-bundles/react/chunks/preview-KOCHK3AH.js +1 -0
  297. package/dist/stage-bundles/react/chunks/removeAction-T4M5EJN7.js +1 -0
  298. package/dist/stage-bundles/react/chunks/removeAnimationBinding-AIISPC33.js +1 -0
  299. package/dist/stage-bundles/react/chunks/removeAttribute-DCKZLM55.js +1 -0
  300. package/dist/stage-bundles/react/chunks/removeComputed-WSA5GNVZ.js +1 -0
  301. package/dist/stage-bundles/react/chunks/removeEvent-2YZ55HD6.js +1 -0
  302. package/dist/stage-bundles/react/chunks/removeLifecycleHook-SBPJNF5P.js +1 -0
  303. package/dist/stage-bundles/react/chunks/{removeNode-QSDSWHNG.js → removeNode-5HXQ63V3.js} +1 -1
  304. package/dist/stage-bundles/react/chunks/removeOption-SYIFB4XW.js +1 -0
  305. package/dist/stage-bundles/react/chunks/removeParamFromRoute-HAYP3WTT.js +1 -0
  306. package/dist/stage-bundles/react/chunks/removeState-SGJVQ66N.js +1 -0
  307. package/dist/stage-bundles/react/chunks/removeStore-YVBTGA3I.js +1 -0
  308. package/dist/stage-bundles/react/chunks/removeToken-AIDV7DUM.js +1 -0
  309. package/dist/stage-bundles/react/chunks/removeValue-UP5ZFN3U.js +1 -0
  310. package/dist/stage-bundles/react/chunks/setDestination-NCPAVIIK.js +1 -0
  311. package/dist/stage-bundles/react/chunks/setHomePage-O2JYOG6H.js +1 -0
  312. package/dist/stage-bundles/react/chunks/setHtmlId-2W7YW47O.js +1 -0
  313. package/dist/stage-bundles/react/chunks/setName-NKRZPBGG.js +1 -0
  314. package/dist/stage-bundles/react/chunks/setNodeLayout-KQVZJBYW.js +1 -0
  315. package/dist/stage-bundles/react/chunks/{setOptionsExpression-3MOFK54D.js → setOptionsExpression-K5EQXJEY.js} +1 -1
  316. package/dist/stage-bundles/react/chunks/{setRender-WJRTHRML.js → setRender-7XMGQ7ZK.js} +1 -1
  317. package/dist/stage-bundles/react/chunks/{setRepeat-JD6QROHI.js → setRepeat-WN4WZJUN.js} +1 -1
  318. package/dist/stage-bundles/react/chunks/setTagName-U6UJNJLE.js +1 -0
  319. package/dist/stage-bundles/react/chunks/{updateAction-ZW4KGOAQ.js → updateAction-3KSR6ZIJ.js} +1 -1
  320. package/dist/stage-bundles/react/chunks/updateAnimationBinding-HVVHLFBO.js +1 -0
  321. package/dist/stage-bundles/react/chunks/{updateAttribute-HFPDXXBZ.js → updateAttribute-XXZL2P43.js} +1 -1
  322. package/dist/stage-bundles/react/chunks/updateBounds-5M7YQRO3.js +1 -0
  323. package/dist/stage-bundles/react/chunks/{updateComputed-OOBDA4XY.js → updateComputed-7QA6XZIC.js} +1 -1
  324. package/dist/stage-bundles/react/chunks/{updateEvent-LCGAPMAI.js → updateEvent-R52PL2G4.js} +1 -1
  325. package/dist/stage-bundles/react/chunks/updateHtml-YBJJSWQW.js +1 -0
  326. package/dist/stage-bundles/react/chunks/{updateLifecycleHook-RCS2QC44.js → updateLifecycleHook-4RA2U4TR.js} +1 -1
  327. package/dist/stage-bundles/react/chunks/{updateOption-PPZLK4X3.js → updateOption-5U23ZUWV.js} +1 -1
  328. package/dist/stage-bundles/react/chunks/updateRoute-TFQFFFSZ.js +1 -0
  329. package/dist/stage-bundles/react/chunks/{updateState-LRZJPENX.js → updateState-JCUSBQOL.js} +1 -1
  330. package/dist/stage-bundles/react/chunks/updateStyle-JASLFXVX.js +1 -0
  331. package/dist/stage-bundles/react/chunks/updateToken-24P2P2SF.js +1 -0
  332. package/dist/stage-bundles/react/chunks/{updateValue-NTA7TSYR.js → updateValue-TSVJM3PO.js} +1 -1
  333. package/dist/stage-bundles/{vue/chunks/user-FCPIGR7X.js → react/chunks/user-H5DKMGWA.js} +1 -1
  334. package/dist/stage-bundles/react/chunks/{validateStorePayload-VVQBPX4I.js → validateStorePayload-HCBPC7HR.js} +1 -1
  335. package/dist/stage-bundles/{vue/chunks/viewport-LLBH2LJW.js → react/chunks/viewport-ZRWTVYC3.js} +1 -1
  336. package/dist/stage-bundles/react/chunks/window-IMPT5I3D.js +1 -0
  337. package/dist/stage-bundles/react/entry.js +1 -1
  338. package/dist/stage-bundles/react/framework-dom-client.js +1 -1
  339. package/dist/stage-bundles/react/framework-dom.js +1 -1
  340. package/dist/stage-bundles/react/framework-jsx-runtime.js +1 -1
  341. package/dist/stage-bundles/react/framework.js +1 -1
  342. package/dist/stage-bundles/react/sdk.js +1 -1
  343. package/dist/stage-bundles/vue/chunks/addComponent-NG2BML2S.js +1 -0
  344. package/dist/stage-bundles/vue/chunks/addNode-UNXHE5VL.js +1 -0
  345. package/dist/stage-bundles/vue/chunks/addTree-MFMYQTGN.js +1 -0
  346. package/dist/stage-bundles/{react/chunks/aiAttachmentContracts-IIM7E4TZ.js → vue/chunks/aiAttachmentContracts-7LLE57FI.js} +1 -1
  347. package/dist/stage-bundles/{react/chunks/aiMessagesContracts-LVR4HAGR.js → vue/chunks/aiMessagesContracts-RAR7ENH4.js} +1 -1
  348. package/dist/stage-bundles/vue/chunks/aiRelay-C6ZJ3PUF.js +1 -0
  349. package/dist/stage-bundles/{react/chunks/aiSessionContracts-MWOX56DC.js → vue/chunks/aiSessionContracts-NHU57TUZ.js} +1 -1
  350. package/dist/stage-bundles/vue/chunks/assets-6LM3GVQU.js +1 -0
  351. package/dist/stage-bundles/vue/chunks/capture-XURVK5HZ.js +1 -0
  352. package/dist/stage-bundles/vue/chunks/chunk-2Z2RXHNK.js +1 -0
  353. package/dist/stage-bundles/vue/chunks/chunk-4M7L75C7.js +1 -0
  354. package/dist/stage-bundles/vue/chunks/chunk-4Q5R44ZZ.js +1 -0
  355. package/dist/stage-bundles/vue/chunks/chunk-7YVQSQRP.js +1 -0
  356. package/dist/stage-bundles/vue/chunks/chunk-BJPSGTXJ.js +1 -0
  357. package/dist/stage-bundles/vue/chunks/chunk-CGCD6S33.js +6 -0
  358. package/dist/stage-bundles/vue/chunks/chunk-F7DSZRND.js +1 -0
  359. package/dist/stage-bundles/vue/chunks/chunk-GW7KMMRR.js +1 -0
  360. package/dist/stage-bundles/vue/chunks/chunk-HYSOOJLT.js +1 -0
  361. package/dist/stage-bundles/vue/chunks/chunk-IG2Y3H6O.js +1 -0
  362. package/dist/stage-bundles/vue/chunks/chunk-IWTWZA3T.js +1 -0
  363. package/dist/stage-bundles/vue/chunks/chunk-K5IR3PSI.js +1 -0
  364. package/dist/stage-bundles/vue/chunks/chunk-LXD22ETU.js +1 -0
  365. package/dist/stage-bundles/vue/chunks/chunk-NFKUJQZH.js +1 -0
  366. package/dist/stage-bundles/vue/chunks/chunk-NKDO4J6J.js +1 -0
  367. package/dist/stage-bundles/vue/chunks/chunk-QFJRB6B2.js +103 -0
  368. package/dist/stage-bundles/vue/chunks/chunk-SCJKRPIZ.js +1 -0
  369. package/dist/stage-bundles/{react/chunks/chunk-PPHD3O2M.js → vue/chunks/chunk-ULVFWUAU.js} +1 -1
  370. package/dist/stage-bundles/vue/chunks/chunk-USKXWFBI.js +1 -0
  371. package/dist/stage-bundles/vue/chunks/contentEditor-7BYCT3TH.js +1 -0
  372. package/dist/stage-bundles/vue/chunks/design-4GTDZLD2.js +15 -0
  373. package/dist/stage-bundles/{react/chunks/history-7CH6VXP4.js → vue/chunks/history-CMF3VYTT.js} +1 -1
  374. package/dist/stage-bundles/vue/chunks/main-4HW35P75.js +1 -0
  375. package/dist/stage-bundles/vue/chunks/main-BVDJS6IT.js +1 -0
  376. package/dist/stage-bundles/{react/chunks/main-D4CUN7NH.js → vue/chunks/main-DH4JOS22.js} +1 -1
  377. package/dist/stage-bundles/vue/chunks/{main-HQ4XJKUM.js → main-PALLSI3C.js} +1 -1
  378. package/dist/stage-bundles/vue/chunks/moveNodeToLastChildOf-BLKABBSO.js +1 -0
  379. package/dist/stage-bundles/{react/chunks/nodeGraph-2AX6JUZ4.js → vue/chunks/nodeGraph-UNI2HUNX.js} +1 -1
  380. package/dist/stage-bundles/vue/chunks/preview-QUDMZGVG.js +1 -0
  381. package/dist/stage-bundles/vue/chunks/setNodeLayout-KQVZJBYW.js +1 -0
  382. package/dist/stage-bundles/{react/chunks/user-3YXEQVFB.js → vue/chunks/user-H5DKMGWA.js} +1 -1
  383. package/dist/stage-bundles/vue/chunks/viewport-ZRWTVYC3.js +1 -0
  384. package/dist/stage-bundles/vue/chunks/window-IMPT5I3D.js +1 -0
  385. package/dist/stage-bundles/vue/entry.js +1 -1
  386. package/dist/stage-bundles/vue/framework-jsx-runtime.js +1 -1
  387. package/dist/stage-bundles/vue/framework.js +1 -1
  388. package/dist/stage-bundles/vue/sdk.js +1 -1
  389. package/dist/stage-src/dev/entry.js +8 -17
  390. package/dist/stage-src/dev/server.js +77 -24
  391. package/dist/stage-src/preview/bootstrap.js +0 -2
  392. package/package.json +16 -21
  393. package/dist/stage/chunks/addAction-FSI6BXB4.js +0 -1
  394. package/dist/stage/chunks/addAnimationBinding-Y4VROY4L.js +0 -1
  395. package/dist/stage/chunks/addAttribute-ZPJGNPHK.js +0 -1
  396. package/dist/stage/chunks/addComponent-VWD6O7CQ.js +0 -1
  397. package/dist/stage/chunks/addComputed-FQVHDUIE.js +0 -1
  398. package/dist/stage/chunks/addEvent-54ZE2DVJ.js +0 -1
  399. package/dist/stage/chunks/addLifecycleHook-VCCSTQ3G.js +0 -1
  400. package/dist/stage/chunks/addNode-IWTESHU3.js +0 -1
  401. package/dist/stage/chunks/addOption-ISGTUY6U.js +0 -1
  402. package/dist/stage/chunks/addParamToRoute-CRDV7MVF.js +0 -1
  403. package/dist/stage/chunks/addState-N3MBR533.js +0 -1
  404. package/dist/stage/chunks/addStore-PHY52777.js +0 -1
  405. package/dist/stage/chunks/addToken-QSTDKYFU.js +0 -1
  406. package/dist/stage/chunks/addValue-NBDF57UK.js +0 -1
  407. package/dist/stage/chunks/aiRelay-FDHMGC33.js +0 -1
  408. package/dist/stage/chunks/assets-RXVS3AKR.js +0 -1
  409. package/dist/stage/chunks/capture-XQFI2T7B.js +0 -1
  410. package/dist/stage/chunks/chunk-2YZN7IFG.js +0 -1
  411. package/dist/stage/chunks/chunk-32WBU6VH.js +0 -1
  412. package/dist/stage/chunks/chunk-33W74KNB.js +0 -37
  413. package/dist/stage/chunks/chunk-45CXRNTO.js +0 -1
  414. package/dist/stage/chunks/chunk-45LFQ7GZ.js +0 -1
  415. package/dist/stage/chunks/chunk-4MTM6BM7.js +0 -1
  416. package/dist/stage/chunks/chunk-4Y2YKFNP.js +0 -1
  417. package/dist/stage/chunks/chunk-55KIFGBN.js +0 -1
  418. package/dist/stage/chunks/chunk-5GOTVZFC.js +0 -1
  419. package/dist/stage/chunks/chunk-6EIGTDJQ.js +0 -1
  420. package/dist/stage/chunks/chunk-7L4V7JRT.js +0 -1
  421. package/dist/stage/chunks/chunk-D3V5OTLH.js +0 -1
  422. package/dist/stage/chunks/chunk-DCOWKGJI.js +0 -1
  423. package/dist/stage/chunks/chunk-DSKLC3WF.js +0 -1
  424. package/dist/stage/chunks/chunk-EO7UBT4B.js +0 -1
  425. package/dist/stage/chunks/chunk-FSECMWCM.js +0 -1
  426. package/dist/stage/chunks/chunk-FTRUORC5.js +0 -1
  427. package/dist/stage/chunks/chunk-G37FCH35.js +0 -1
  428. package/dist/stage/chunks/chunk-GURTWV7H.js +0 -1
  429. package/dist/stage/chunks/chunk-H3VC542J.js +0 -1
  430. package/dist/stage/chunks/chunk-IERYKQMJ.js +0 -1
  431. package/dist/stage/chunks/chunk-IEXI4PPB.js +0 -1
  432. package/dist/stage/chunks/chunk-K7MC6G4X.js +0 -1
  433. package/dist/stage/chunks/chunk-KCVDFPJI.js +0 -1
  434. package/dist/stage/chunks/chunk-L4CU73MS.js +0 -1
  435. package/dist/stage/chunks/chunk-LOILFK74.js +0 -55
  436. package/dist/stage/chunks/chunk-MXIF2FGR.js +0 -1
  437. package/dist/stage/chunks/chunk-OWARHUEW.js +0 -1
  438. package/dist/stage/chunks/chunk-P4ODI2G4.js +0 -1
  439. package/dist/stage/chunks/chunk-PUPSHZWC.js +0 -1
  440. package/dist/stage/chunks/chunk-QTBRJH2Q.js +0 -1
  441. package/dist/stage/chunks/chunk-SECM4LZZ.js +0 -1
  442. package/dist/stage/chunks/chunk-TAMEB64F.js +0 -1
  443. package/dist/stage/chunks/chunk-TIIQLNVN.js +0 -1
  444. package/dist/stage/chunks/chunk-U3IV5DRQ.js +0 -1
  445. package/dist/stage/chunks/chunk-X6HJCJ3C.js +0 -1
  446. package/dist/stage/chunks/chunk-YMUEID4R.js +0 -1
  447. package/dist/stage/chunks/chunk-YN5VQBDN.js +0 -1
  448. package/dist/stage/chunks/chunk-YZBMJY7E.js +0 -1
  449. package/dist/stage/chunks/clearDestination-P3FTW7VJ.js +0 -1
  450. package/dist/stage/chunks/clearName-EUYRSZED.js +0 -1
  451. package/dist/stage/chunks/clearOptionsExpression-DF4IPDKH.js +0 -1
  452. package/dist/stage/chunks/clearRender-IUKXUT2E.js +0 -1
  453. package/dist/stage/chunks/clearRepeat-HR5C5VWU.js +0 -1
  454. package/dist/stage/chunks/contentEditor-PCXXWARK.js +0 -1
  455. package/dist/stage/chunks/createAction-XVCUAVTP.js +0 -1
  456. package/dist/stage/chunks/createAnimation-YAXYGTZ2.js +0 -1
  457. package/dist/stage/chunks/createComputed-6XPJKJMP.js +0 -1
  458. package/dist/stage/chunks/createTextContent-BL7YGYP5.js +0 -1
  459. package/dist/stage/chunks/createValue-QMG7LOR4.js +0 -1
  460. package/dist/stage/chunks/design-SPZTUDPC.js +0 -15
  461. package/dist/stage/chunks/dev-24ZWZ22W.js +0 -1
  462. package/dist/stage/chunks/disconnectNode-OY65I4GB.js +0 -1
  463. package/dist/stage/chunks/main-BLNWJ3UJ.js +0 -1
  464. package/dist/stage/chunks/main-NTDWDKF7.js +0 -1
  465. package/dist/stage/chunks/moveNodeToLastChildOf-PRI4OYRB.js +0 -1
  466. package/dist/stage/chunks/normalizeLayoutContext-OIXYBNTH.js +0 -1
  467. package/dist/stage/chunks/preview-EIG4E5G5.js +0 -1
  468. package/dist/stage/chunks/react-G5SWVCZA.js +0 -1
  469. package/dist/stage/chunks/removeAction-H3EDG2CG.js +0 -1
  470. package/dist/stage/chunks/removeAnimationBinding-JRXL2AOH.js +0 -1
  471. package/dist/stage/chunks/removeAttribute-6RYM7MYC.js +0 -1
  472. package/dist/stage/chunks/removeComputed-3HL3BXKY.js +0 -1
  473. package/dist/stage/chunks/removeEvent-CP3SVSHQ.js +0 -1
  474. package/dist/stage/chunks/removeLifecycleHook-Q76BUDFU.js +0 -1
  475. package/dist/stage/chunks/removeNode-OFMYW2LY.js +0 -1
  476. package/dist/stage/chunks/removeOption-Y6QYTQ7C.js +0 -1
  477. package/dist/stage/chunks/removeParamFromRoute-MHUMB7RO.js +0 -1
  478. package/dist/stage/chunks/removeState-HEDFV7HD.js +0 -1
  479. package/dist/stage/chunks/removeStore-BQDKUY3I.js +0 -1
  480. package/dist/stage/chunks/removeToken-6K5JDRMK.js +0 -1
  481. package/dist/stage/chunks/removeValue-OTRFOOIB.js +0 -1
  482. package/dist/stage/chunks/setDestination-3H4RDE7F.js +0 -1
  483. package/dist/stage/chunks/setHomePage-UZUWIELK.js +0 -1
  484. package/dist/stage/chunks/setHtmlId-V2DQ2Z6D.js +0 -1
  485. package/dist/stage/chunks/setName-QKDRLH7I.js +0 -1
  486. package/dist/stage/chunks/setNodeLayout-O53CNHES.js +0 -1
  487. package/dist/stage/chunks/setOptionsExpression-4NFPAI24.js +0 -1
  488. package/dist/stage/chunks/setRender-XQJWRRYD.js +0 -1
  489. package/dist/stage/chunks/setRepeat-PAW7YMSY.js +0 -1
  490. package/dist/stage/chunks/setTagName-Y7O7I6SO.js +0 -1
  491. package/dist/stage/chunks/updateAction-XSXILF2R.js +0 -1
  492. package/dist/stage/chunks/updateAnimationBinding-LQTVD3O6.js +0 -1
  493. package/dist/stage/chunks/updateAttribute-5MWAVQAV.js +0 -1
  494. package/dist/stage/chunks/updateBounds-3L2AJ72O.js +0 -1
  495. package/dist/stage/chunks/updateComputed-UALAJ4RF.js +0 -1
  496. package/dist/stage/chunks/updateEvent-NXMQSGDQ.js +0 -1
  497. package/dist/stage/chunks/updateHtml-AEMCHPUQ.js +0 -1
  498. package/dist/stage/chunks/updateLifecycleHook-6MCUOVJH.js +0 -1
  499. package/dist/stage/chunks/updateOption-JCNXPYXP.js +0 -1
  500. package/dist/stage/chunks/updateRoute-CI3GOLVJ.js +0 -1
  501. package/dist/stage/chunks/updateState-QJID3WQV.js +0 -1
  502. package/dist/stage/chunks/updateStyle-FR7K7R73.js +0 -1
  503. package/dist/stage/chunks/updateToken-JX6R3YU7.js +0 -1
  504. package/dist/stage/chunks/updateValue-2B5ZNGZI.js +0 -1
  505. package/dist/stage/chunks/window-RFC7WGLM.js +0 -1
  506. package/dist/stage-bundles/preact/chunks/addComponent-Y2AQ2FGZ.js +0 -1
  507. package/dist/stage-bundles/preact/chunks/addNode-2E5QNYOA.js +0 -1
  508. package/dist/stage-bundles/preact/chunks/aiRelay-WDZAC42R.js +0 -1
  509. package/dist/stage-bundles/preact/chunks/assets-NU56BTDG.js +0 -1
  510. package/dist/stage-bundles/preact/chunks/capture-XBPXL4U7.js +0 -1
  511. package/dist/stage-bundles/preact/chunks/chunk-2BGFXNGU.js +0 -1
  512. package/dist/stage-bundles/preact/chunks/chunk-34CHXN5I.js +0 -1
  513. package/dist/stage-bundles/preact/chunks/chunk-67H474GN.js +0 -1
  514. package/dist/stage-bundles/preact/chunks/chunk-ACPGC7BJ.js +0 -1
  515. package/dist/stage-bundles/preact/chunks/chunk-E4RDZ324.js +0 -1
  516. package/dist/stage-bundles/preact/chunks/chunk-FCRFPWU3.js +0 -97
  517. package/dist/stage-bundles/preact/chunks/chunk-JHWED3SX.js +0 -1
  518. package/dist/stage-bundles/preact/chunks/chunk-JRXMDYLE.js +0 -1
  519. package/dist/stage-bundles/preact/chunks/chunk-KISNK4R4.js +0 -1
  520. package/dist/stage-bundles/preact/chunks/chunk-LEELNBJC.js +0 -1
  521. package/dist/stage-bundles/preact/chunks/chunk-LHON3DKO.js +0 -1
  522. package/dist/stage-bundles/preact/chunks/chunk-PYIGBTL4.js +0 -6
  523. package/dist/stage-bundles/preact/chunks/chunk-QKFDVU2Q.js +0 -1
  524. package/dist/stage-bundles/preact/chunks/chunk-UQFZUWFP.js +0 -1
  525. package/dist/stage-bundles/preact/chunks/contentEditor-6WQFOUKV.js +0 -1
  526. package/dist/stage-bundles/preact/chunks/design-QOLOMJCH.js +0 -15
  527. package/dist/stage-bundles/preact/chunks/main-K2WJEG5C.js +0 -1
  528. package/dist/stage-bundles/preact/chunks/main-ZXFODV6O.js +0 -1
  529. package/dist/stage-bundles/preact/chunks/moveNodeToLastChildOf-OZ6F2NPU.js +0 -1
  530. package/dist/stage-bundles/preact/chunks/normalizeLayoutContext-WRK6FVHM.js +0 -1
  531. package/dist/stage-bundles/preact/chunks/preact-NBJKI6EE.js +0 -1
  532. package/dist/stage-bundles/preact/chunks/preview-AFX7D63A.js +0 -1
  533. package/dist/stage-bundles/preact/chunks/setNodeLayout-QNVAVAMX.js +0 -1
  534. package/dist/stage-bundles/preact/chunks/window-TFWZNZUJ.js +0 -1
  535. package/dist/stage-bundles/react/chunks/addAnimationBinding-7TFETALG.js +0 -1
  536. package/dist/stage-bundles/react/chunks/addComponent-P7BXPI75.js +0 -1
  537. package/dist/stage-bundles/react/chunks/addNode-4MPFG7L5.js +0 -1
  538. package/dist/stage-bundles/react/chunks/addParamToRoute-VX2GDCCP.js +0 -1
  539. package/dist/stage-bundles/react/chunks/addStore-F3E5UJ5H.js +0 -1
  540. package/dist/stage-bundles/react/chunks/aiRelay-3CLWLKMV.js +0 -1
  541. package/dist/stage-bundles/react/chunks/assets-UN6U4NZV.js +0 -1
  542. package/dist/stage-bundles/react/chunks/capture-5GIKSRCZ.js +0 -1
  543. package/dist/stage-bundles/react/chunks/chunk-2BGFXNGU.js +0 -1
  544. package/dist/stage-bundles/react/chunks/chunk-32U4X4HZ.js +0 -6
  545. package/dist/stage-bundles/react/chunks/chunk-34CHXN5I.js +0 -1
  546. package/dist/stage-bundles/react/chunks/chunk-5OEIZ3PD.js +0 -1
  547. package/dist/stage-bundles/react/chunks/chunk-ADVOIRI5.js +0 -43
  548. package/dist/stage-bundles/react/chunks/chunk-ATUQUJRM.js +0 -1
  549. package/dist/stage-bundles/react/chunks/chunk-BXIWQYSY.js +0 -1
  550. package/dist/stage-bundles/react/chunks/chunk-GYBL4LBC.js +0 -1
  551. package/dist/stage-bundles/react/chunks/chunk-HLPDOSGP.js +0 -1
  552. package/dist/stage-bundles/react/chunks/chunk-KISNK4R4.js +0 -1
  553. package/dist/stage-bundles/react/chunks/chunk-NDUX5RLD.js +0 -1
  554. package/dist/stage-bundles/react/chunks/chunk-PSQ4TIJA.js +0 -1
  555. package/dist/stage-bundles/react/chunks/chunk-QKFDVU2Q.js +0 -1
  556. package/dist/stage-bundles/react/chunks/chunk-UQFZUWFP.js +0 -1
  557. package/dist/stage-bundles/react/chunks/clearDestination-ESJ4RTEB.js +0 -1
  558. package/dist/stage-bundles/react/chunks/clearName-XLFUSVVX.js +0 -1
  559. package/dist/stage-bundles/react/chunks/clearOptionsExpression-T5UZGD3M.js +0 -1
  560. package/dist/stage-bundles/react/chunks/clearRender-QOV6MKSA.js +0 -1
  561. package/dist/stage-bundles/react/chunks/clearRepeat-KGDHK6I5.js +0 -1
  562. package/dist/stage-bundles/react/chunks/contentEditor-VQUII3R3.js +0 -1
  563. package/dist/stage-bundles/react/chunks/createAnimation-5GYHDNS4.js +0 -1
  564. package/dist/stage-bundles/react/chunks/createValue-Q2VRKXEI.js +0 -1
  565. package/dist/stage-bundles/react/chunks/design-Z6J5JRDV.js +0 -15
  566. package/dist/stage-bundles/react/chunks/main-OAJ3EVVU.js +0 -1
  567. package/dist/stage-bundles/react/chunks/main-WER4YJAR.js +0 -1
  568. package/dist/stage-bundles/react/chunks/moveNodeToLastChildOf-DQR5GURK.js +0 -1
  569. package/dist/stage-bundles/react/chunks/normalizeLayoutContext-34DZRL3Q.js +0 -1
  570. package/dist/stage-bundles/react/chunks/preview-5V5GS6PZ.js +0 -1
  571. package/dist/stage-bundles/react/chunks/react-YDAQ4KLN.js +0 -1
  572. package/dist/stage-bundles/react/chunks/removeAction-7V4VV5SS.js +0 -1
  573. package/dist/stage-bundles/react/chunks/removeAnimationBinding-26LUMVXH.js +0 -1
  574. package/dist/stage-bundles/react/chunks/removeAttribute-AZK5TQQM.js +0 -1
  575. package/dist/stage-bundles/react/chunks/removeComputed-HIYYBG3M.js +0 -1
  576. package/dist/stage-bundles/react/chunks/removeEvent-A7AUWPIF.js +0 -1
  577. package/dist/stage-bundles/react/chunks/removeLifecycleHook-Z5ZHFYSE.js +0 -1
  578. package/dist/stage-bundles/react/chunks/removeOption-7JZTAHTB.js +0 -1
  579. package/dist/stage-bundles/react/chunks/removeParamFromRoute-JBZOXNDA.js +0 -1
  580. package/dist/stage-bundles/react/chunks/removeState-RIXJ6YEL.js +0 -1
  581. package/dist/stage-bundles/react/chunks/removeStore-PKBJRCYZ.js +0 -1
  582. package/dist/stage-bundles/react/chunks/removeToken-WRU2GN7O.js +0 -1
  583. package/dist/stage-bundles/react/chunks/removeValue-KRNKQVF5.js +0 -1
  584. package/dist/stage-bundles/react/chunks/setDestination-DUGBRV24.js +0 -1
  585. package/dist/stage-bundles/react/chunks/setHomePage-GJLGWZHJ.js +0 -1
  586. package/dist/stage-bundles/react/chunks/setHtmlId-F5SPBYD7.js +0 -1
  587. package/dist/stage-bundles/react/chunks/setName-DAQAN7JR.js +0 -1
  588. package/dist/stage-bundles/react/chunks/setNodeLayout-X4PQKKZT.js +0 -1
  589. package/dist/stage-bundles/react/chunks/setTagName-42MJSWMZ.js +0 -1
  590. package/dist/stage-bundles/react/chunks/updateAnimationBinding-QETT3JF2.js +0 -1
  591. package/dist/stage-bundles/react/chunks/updateBounds-HOTYUCG4.js +0 -1
  592. package/dist/stage-bundles/react/chunks/updateHtml-VQAIKLEG.js +0 -1
  593. package/dist/stage-bundles/react/chunks/updateRoute-FPAKZBCT.js +0 -1
  594. package/dist/stage-bundles/react/chunks/updateStyle-M7YKN6C4.js +0 -1
  595. package/dist/stage-bundles/react/chunks/updateToken-LOI6M4XH.js +0 -1
  596. package/dist/stage-bundles/react/chunks/viewport-7ICM5NZY.js +0 -1
  597. package/dist/stage-bundles/react/chunks/window-SG66BA4O.js +0 -1
  598. package/dist/stage-bundles/vue/chunks/addComponent-Y2AQ2FGZ.js +0 -1
  599. package/dist/stage-bundles/vue/chunks/addNode-5OXCF22G.js +0 -1
  600. package/dist/stage-bundles/vue/chunks/aiRelay-WDZAC42R.js +0 -1
  601. package/dist/stage-bundles/vue/chunks/assets-NU56BTDG.js +0 -1
  602. package/dist/stage-bundles/vue/chunks/capture-UZVRGVM7.js +0 -1
  603. package/dist/stage-bundles/vue/chunks/chunk-7CCYKDAJ.js +0 -97
  604. package/dist/stage-bundles/vue/chunks/chunk-ACPGC7BJ.js +0 -1
  605. package/dist/stage-bundles/vue/chunks/chunk-FYWE2MO5.js +0 -1
  606. package/dist/stage-bundles/vue/chunks/chunk-ILXSVZXQ.js +0 -1
  607. package/dist/stage-bundles/vue/chunks/chunk-IZT2KVTW.js +0 -1
  608. package/dist/stage-bundles/vue/chunks/chunk-JRXMDYLE.js +0 -1
  609. package/dist/stage-bundles/vue/chunks/chunk-PYIGBTL4.js +0 -6
  610. package/dist/stage-bundles/vue/chunks/chunk-QKFDVU2Q.js +0 -1
  611. package/dist/stage-bundles/vue/chunks/chunk-RMSX6LWP.js +0 -1
  612. package/dist/stage-bundles/vue/chunks/chunk-TSL6VG3R.js +0 -1
  613. package/dist/stage-bundles/vue/chunks/chunk-TTTOAB6J.js +0 -1
  614. package/dist/stage-bundles/vue/chunks/chunk-UDTKG2KI.js +0 -1
  615. package/dist/stage-bundles/vue/chunks/chunk-UIC3GAEE.js +0 -1
  616. package/dist/stage-bundles/vue/chunks/contentEditor-EUDU6PBV.js +0 -1
  617. package/dist/stage-bundles/vue/chunks/design-LU5XWCLC.js +0 -15
  618. package/dist/stage-bundles/vue/chunks/main-R652XLC3.js +0 -1
  619. package/dist/stage-bundles/vue/chunks/main-X6SC5JYU.js +0 -1
  620. package/dist/stage-bundles/vue/chunks/moveNodeToLastChildOf-H4TZ5UMP.js +0 -1
  621. package/dist/stage-bundles/vue/chunks/normalizeLayoutContext-KGEMYC4Y.js +0 -1
  622. package/dist/stage-bundles/vue/chunks/preview-52FXOKBF.js +0 -1
  623. package/dist/stage-bundles/vue/chunks/setNodeLayout-GY4G7UZR.js +0 -1
  624. package/dist/stage-bundles/vue/chunks/vue-62USAR6D.js +0 -1
  625. package/dist/stage-bundles/vue/chunks/window-TFWZNZUJ.js +0 -1
  626. package/dist/stage-src/preview/routes/js.js +0 -100
  627. package/dist/stage-src/preview/routes/preview.js +0 -21
  628. package/dist/stage-src/preview/server.js +0 -99
  629. package/dist/stage-src/preview/views/index.js +0 -18
@@ -1 +0,0 @@
1
- import{b as d}from"./chunk-ACPGC7BJ.js";import{d as c}from"./chunk-34CHXN5I.js";var m=[{key:"iPhone 15",category:"phone",width:393,height:852},{key:"iPhone SE",category:"phone",width:375,height:667},{key:"Pixel 8",category:"phone",width:412,height:915},{key:"Galaxy S24",category:"phone",width:360,height:780},{key:"iPad Air",category:"tablet",width:820,height:1180},{key:"iPad Mini",category:"tablet",width:768,height:1024},{key:"Surface Pro",category:"tablet",width:912,height:1368},{key:"Desktop",category:"desktop",width:1280,height:800},{key:"Desktop Large",category:"desktop",width:1920,height:1080},{key:"custom",category:"custom",width:null,height:null}];function p(e){return m.find(t=>t.key===e)??null}function l(){return m.map(e=>e.key)}var g={width:360,height:740,x:0,y:0};function u(e,t={}){if(e==="custom")return{name:t.name||"Custom",bounds:{width:t.width??g.width,height:t.height??g.height,x:0,y:0}};let r=p(e);if(!r)throw new Error(`Unknown frame preset "${e}". Available: ${l().join(", ")}`);return{name:e,bounds:{width:r.width,height:r.height,x:0,y:0}}}function k(e={}){let t=e.frame??e.viewport;if(!t)return e;let{frame:r,viewport:o,width:i,height:h,name:y,bounds:n,...w}=e,{name:f,bounds:a}=u(t,{name:y,width:i,height:h});return{...w,frame:t,name:f,bounds:{x:n?.x??a.x??0,y:n?.y??a.y??0,width:n?.width??a.width,height:n?.height??a.height}}}function s(e,t,r={}){let o=t==="frame"?k(r):r,[i,h]=d(t,o);return t==="frame"&&(h.route={path:`${i}`}),e.set([i],h),i}function O(e,t,r,o="app"){let i=s(e,t,r);return c(e,i,o),i}export{m as a,p as b,l as c,u as d,s as e,O as f};
@@ -1 +0,0 @@
1
- import{b as y}from"./chunk-ACPGC7BJ.js";import{a as h}from"./chunk-A25WFH3U.js";import{a as g}from"./chunk-TPCJQIUG.js";import{f as N}from"./chunk-EXXAK3BP.js";function O(o,e,i){if(!g(o,e)||!g(o,i))return!1;let s=o.findWhen("children","includes",e);return s?(o.update(s,(d=[])=>d.map(c=>c===e?i:c)),!0):!1}var S=o=>structuredClone?structuredClone(o):JSON.parse(JSON.stringify(o));function b(o,e){let i=h(o,e),s=[e,...i],d={};for(let c of s){let p=o.get([c]);p&&(d[c]=p)}return S(d)}function A(o){let e=Object.keys(o),i={},s=new Map;e.forEach(t=>{let f=N();s.set(t,f)}),e.forEach(t=>{let f=s.get(t),n={...o[t]};n.children&&Array.isArray(n.children)&&(n.children=n.children.map(r=>s.get(r)||null).filter(r=>r!==null)),n.slots&&Array.isArray(n.slots)&&(n.slots=n.slots.map(r=>({...r,id:s.get(r.id)??r.id,children:(r.children||[]).map(u=>s.get(u)??u)}))),n.type==="frame"&&(n.route=n.route?{...n.route,path:`${f}`}:{path:`${f}`}),i[f]=n});let d=Object.keys(i),c=new Set;return Object.values(i).forEach(t=>{t.children&&Array.isArray(t.children)&&t.children.forEach(f=>{f&&c.add(f)})}),[d.filter(t=>!c.has(t)),i]}var x=["top","left","right","bottom"],w=[...x];function I(o,e,i,s){let d=o.get([e,"style"]);if(!d)return;let c=new Set(s??[]);for(let p in d){let t=d[p];if(!t||typeof t!="object")continue;let f={},a=!1;for(let n of x)n in t&&c.has(n)&&(f[n]=t[n],a=!0);a&&(o.update([i,"style",p],(n={})=>({...n,...f})),o.update([e,"style",p],(n={})=>{let r={...n};for(let u of w)delete r[u];return r}))}}function _(o,e,i,s=null){let d=o.get([e,".position"]),c=o.get([e,"anchor"]),p=o.get([e,"dimensions"]),t=b(o,e),[f,a]=A(t),n=f[0];for(let[m,j]of Object.entries(a))o.set([m],j);let[r,u]=y("component",{children:[n],name:i,bounds:s}),[l,E]=y("instance",{component:r});o.set([r],u),o.set([l],E),o.update(["components","children"],(m=[])=>m.indexOf(r)===-1?[...m,r]:m),O(o,e,l);let P=h(o,e);for(let m of P)o.remove([m]);return o.remove([e]),d&&o.set([l,".position"],d),c&&o.set([l,"anchor"],c),p&&o.set([l,"dimensions"],p),I(o,n,l,c),o.set([n,"isComponentRoot"],!0),o.set([n,"anchor"],[]),l}export{S as a,b,A as c,_ as d};
@@ -1 +0,0 @@
1
- import{a as l}from"./chunk-DLHF7QB4.js";import{a as s}from"./chunk-J5QMLA3Z.js";function p(c,i,e){if(s(c,i))return;let r="",f;return typeof e=="string"?r=e:e!=null&&typeof e=="object"&&(r=e.value??"",Object.prototype.hasOwnProperty.call(e,"specificPatterns")&&(f=e.specificPatterns)),c.set([i,"textContent"],l({value:r,specificPatterns:f}))}export{p as a};
@@ -1 +0,0 @@
1
- import{a as o}from"./chunk-PYIGBTL4.js";import{a as h}from"./chunk-HAN4CMBX.js";import{a as f}from"./chunk-CYURWEXX.js";import{a as u}from"./chunk-GUI7FIZD.js";import{a as g}from"./chunk-IKKRB6BS.js";import{a as l}from"./chunk-7VDUBBVE.js";import{a as m}from"./chunk-A52FDU5E.js";import{a as c}from"./chunk-6S7QQT47.js";import{a as p}from"./chunk-PU62K33G.js";import{a as d}from"./chunk-KTWXYDG7.js";import{a as i}from"./chunk-EWEPEODY.js";import{a as s}from"./chunk-ZUPNPSUB.js";var S=o("store:action",n=>{let r=n("state")?.ref(["stores"])??null;if(!r)throw new Error("Stores not found");return{add:{namespace:"scene-graph",schema:["String"],handler:e=>u(r,e)},update:{namespace:"scene-graph",schema:["String","Number","Object"],handler:(e,t,a)=>g(r,e,t,a)},remove:{namespace:"scene-graph",schema:["String","Number"],handler:(e,t)=>l(r,e,t)}}});var C=o("store:computed",n=>{let r=n("state")?.ref(["stores"])??null;if(!r)throw new Error("Stores not found");return{add:{schema:["String"],namespace:"scene-graph",handler:e=>{i(r,e)}},update:{schema:["String","Number","Object"],namespace:"scene-graph",handler:(e,t,a)=>{h(r,e,t,a)}},remove:{schema:["String","Number"],namespace:"scene-graph",handler:(e,t)=>{f(r,e,t)}}}});var b=o("store:state",n=>{let r=n("state")?.ref(["stores"])??null;if(!r)throw new Error("Stores not found");return{add:{schema:["String","String"],namespace:"scene-graph",handler:(e,t)=>{c(r,e,t)}},update:{schema:["String","Number","Object"],namespace:"scene-graph",handler:(e,t,a)=>{p(r,e,t,a)}},remove:{schema:["String","Number"],namespace:"scene-graph",handler:(e,t)=>{d(r,e,t)}}}});var v=o("store",n=>{let r=n("state")?.ref(["stores"])??null;if(!r)throw new Error("Stores not found");return{get:{namespace:"scene-graph",handler:e=>e?r.get([e]):r.get()??{}},add:{schema:["String"],namespace:"scene-graph",handler:e=>s(r,e)},remove:{schema:["String"],namespace:"scene-graph",handler:e=>{m(r,e)}}}});var Q=[S,C,b,v];export{S as a,C as b,b as c,v as d,Q as e};
@@ -1 +0,0 @@
1
- import{a as p}from"./chunk-E4RDZ324.js";import{e as f}from"./chunk-NRRFAMFA.js";import{c as s,h as c}from"./chunk-RYWOKFM7.js";import{c as b}from"./chunk-UCLSDDOL.js";var M={};b(M,{createElement:()=>s,createHost:()=>_,createRef:()=>v,createTrigger:()=>T,hostRootProps:()=>I,loadProjectMain:()=>d,provideJucie:()=>S,render:()=>c,renderSource:()=>J,setup:()=>m,splitInstanceOverrides:()=>a,useJucie:()=>g,useRef:()=>f,useSyncExternalStore:()=>p});var E=new Set(["className","style","id","ref","key"]);function a(e){let r={},n={};if(!e)return{dom:r,props:n};for(let t in e)E.has(t)||t.startsWith("data-")||/^on[A-Z]/.test(t)?r[t]=e[t]:n[t]=e[t];return{dom:r,props:n}}var l=[];function m(e){return e}function j(e){typeof e=="function"&&l.push(e)}async function d(){let e=await import("/user-main.js");if(!(e&&"__jucieMainStub"in e&&e.__jucieMainStub)){if(typeof e?.default!="function")throw new Error("[jucie] src/main.js must default-export setup(...), e.g. export default setup((app) => { ... })");j(e.default)}}function x(e){return l.reduceRight((r,n)=>{let t=n(r);return t===void 0?r:t},e)}var h=Symbol("@jucie/runtime"),S=e=>{globalThis[h]=e},g=()=>globalThis[h];function v(){return{current:null}}function T(){let e=0,r=[],n=!1,t=i=>(r.push(i),()=>{r=r.filter(y=>y!==i)}),o=()=>e;return[()=>p(t,o,o),()=>{n||(n=!0,Promise.resolve().then(()=>{n=!1,e++,r.forEach(i=>i())}))}]}function _(e,r){let n=null,t=()=>r(n),o=()=>c(x(s(t)),e);return{jucie:t,mount(u){return n=u,o(),this},navigate(u){n=u,o()}}}function I(){return{}}function J(e,r){let{dom:n,props:t}=a(r),{key:o,...u}=n||{};return s(e,{...t,...u,key:o})}export{a,m as b,d as c,S as d,g as e,v as f,T as g,_ as h,I as i,J as j,M as k};
@@ -1,6 +0,0 @@
1
- import{a as ue,c as se,d as F}from"./chunk-O24ISLGT.js";import{a as D,e as re,f as r,g as d,h as u,i as o}from"./chunk-UCLSDDOL.js";var Me=(f=>typeof D<"u"?D:typeof Proxy<"u"?new Proxy(f,{get:(t,e)=>(typeof D<"u"?D:t)[e]}):f)(function(f){if(typeof D<"u")return D.apply(this,arguments);throw Error('Dynamic require of "'+f+'" is not supported')}),be=(f,t)=>setTimeout(()=>{f(new Error("Timeout waiting for connect"))},t);function z(f){return f!=null&&typeof f.postMessage=="function"}function ve(f){return typeof f?.on=="function"&&typeof f?.removeListener=="function"&&!("onmessage"in f)}function Ce(f){return f!=null&&typeof f=="object"&&"data"in f?{data:f.data}:{data:f}}function ce(f){if(!f||!ve(f))return f;let t=null,e=null,s=null,i=(n,h)=>{if(h)try{f.removeListener(n,h)}catch{}return null};return{postMessage(...n){return f.postMessage(...n)},start(){typeof f.start=="function"&&f.start()},close(){t=i("message",t),e=i("error",e),s=i("close",s),typeof f.close=="function"&&f.close()},set onmessage(n){t=i("message",t),typeof n=="function"&&(t=h=>n(Ce(h)),f.on("message",t))},get onmessage(){return t},set onerror(n){e=i("error",e),typeof n=="function"&&(e=n,f.on("error",e))},get onerror(){return e},set onclose(n){s=i("close",s),typeof n=="function"&&(s=n,f.on("close",s))},get onclose(){return s}}}var a,p,N,b,q,B,T,w,W,l,Q,ne,fe,Ee,de,Y,pe,oe,ae,me,L,Se,Ae=(a=class{constructor(t,e=F(),s={}){d(this,l);d(this,p,null);d(this,N,!1);d(this,b,null);d(this,q,!1);d(this,B,null);d(this,T,new Map);d(this,w,new Map);d(this,W,1e3);if(u(this,W,s.timeoutMs??1e3),t=ce(t),t){if(typeof t.postMessage!="function")throw new Error("Port must be an object with postMessage");u(this,p,t),u(this,b,e),r(this,p).onmessage=i=>o(this,l,pe).call(this,i),r(this,p).onerror=i=>o(this,l,Se).call(this,i),o(this,l,fe).call(this),u(this,N,!0),typeof r(this,p).start=="function"&&r(this,p).start()}}static get EVENTS(){return{CONNECT:"CONNECT",CONFIRM_CONNECT:"CONFIRM_CONNECT",DISCONNECT:"DISCONNECT",RESPONSE:"RESPONSE",ENABLE:"ENABLE",ERROR:"ERROR",MESSAGE:"MESSAGE",GATHER:"GATHER",WARNING:"WARNING",INFO:"INFO",DEBUG:"DEBUG",TRACE:"TRACE"}}get enabled(){return r(this,N)}static connect({port:t,options:e={}}){e={...a.defaultOptions,...e},t=ce(t);let s=F();return new Promise((i,n)=>{let h=0,y=null,E=!1,S=()=>{y&&clearTimeout(y);try{t.onmessage=null}catch{}try{t.onerror=null}catch{}};if(e.primary){if(t.onmessage=I=>{let P=I?.data;if(!Array.isArray(P)||P.length<2)return;let[A,M]=P;if(A===a.EVENTS.CONNECT)try{t.postMessage([a.EVENTS.CONFIRM_CONNECT,{rid:M?.rid,sid:M?.sid}]),E=!0,S(),i(new a(t,M?.sid,{timeoutMs:e.timeoutMs}))}catch(x){S(),n(x)}},t.onerror=I=>{E||(E=!0,S(),n(I))},typeof t.start=="function")try{t.start()}catch{}}else{let I=()=>{if(h>=e.maxRetries){E||(S(),n(new Error("Max retries reached")));return}let A=Math.min(e.baseDelay*2**h,e.maxDelay),M=Math.floor(A*e.jitter*Math.random());y=setTimeout(P,A+M)},P=()=>{h+=1;try{t.postMessage([a.EVENTS.CONNECT,{rid:F(),sid:s}])}catch(A){S(),n(A);return}I()};if(t.onmessage=A=>{let M=A?.data;if(!Array.isArray(M)||M.length<2)return;let[x,H]=M;if(!(!H?.sid||!H?.rid))switch(x){case a.EVENTS.CONFIRM_CONNECT:{if(E)return;E=!0,S(),i(new a(t,H?.sid,{timeoutMs:e.timeoutMs}));break}case a.EVENTS.ERROR:{if(E)return;E=!0,S(),n(new Error("Handshake error"));break}default:break}},t.onerror=A=>{E||(E=!0,S(),n(A))},typeof t.start=="function")try{t.start()}catch{}P()}})}get sid(){return r(this,b)}close(){r(this,q)||(u(this,q,!0),console.warn(`[Port] close() \u2014 sid: ${r(this,b)}, pending: ${r(this,T).size}, enabled: ${r(this,N)}`),o(this,l,L).call(this,a.EVENTS.DISCONNECT,{sid:r(this,b)}),o(this,l,ne).call(this))}emit(t){return r(this,p)?r(this,N)?o(this,l,de).call(this,t):Promise.resolve(null):Promise.reject(new Error("No port available"))}request(t,e){return r(this,p)?r(this,N)?o(this,l,Y).call(this,a.EVENTS.MESSAGE,t,e):Promise.resolve(null):Promise.reject(new Error("No port available"))}gather(t,e){return r(this,p)?r(this,N)?o(this,l,Y).call(this,a.EVENTS.GATHER,t,e):Promise.resolve(null):Promise.reject(new Error("No port available"))}async enable(){return r(this,p)?(u(this,N,await o(this,l,Y).call(this,a.EVENTS.ENABLE,!0)),r(this,N)):Promise.reject(new Error("No port available"))}async disable(){return r(this,p)?(u(this,N,await o(this,l,Y).call(this,a.EVENTS.ENABLE,!1)),r(this,N)):Promise.reject(new Error("No port available"))}onMessage(t){if(typeof t!="function")throw new Error("Listener must be a function");if(r(this,w).has(a.EVENTS.MESSAGE))throw new Error("A listener is already registered. Remove the existing listener before adding a new one.");return r(this,w).set(a.EVENTS.MESSAGE,t),()=>{r(this,w).get(a.EVENTS.MESSAGE)===t&&r(this,w).delete(a.EVENTS.MESSAGE)}}onEnable(t){if(typeof t!="function")throw new Error("Listener must be a function");return r(this,w).set(a.EVENTS.ENABLE,t),()=>r(this,w).delete(a.EVENTS.ENABLE)}onError(t){if(typeof t!="function")throw new Error("Listener must be a function");if(r(this,w).has(a.EVENTS.ERROR))throw new Error("A listener is already registered. Remove the existing listener before adding a new one.");return r(this,w).set(a.EVENTS.ERROR,t),()=>r(this,w).delete(a.EVENTS.ERROR)}onDisconnect(t){if(typeof t!="function")throw new Error("Listener must be a function");return r(this,w).set(a.EVENTS.DISCONNECT,t),()=>r(this,w).delete(a.EVENTS.DISCONNECT)}},p=new WeakMap,N=new WeakMap,b=new WeakMap,q=new WeakMap,B=new WeakMap,T=new WeakMap,w=new WeakMap,W=new WeakMap,l=new WeakSet,Q=function(t){if(r(this,q))return;u(this,q,!0),console.warn(`[Port] disconnect detected \u2014 sid: ${r(this,b)}, reason: ${t}`);let e=r(this,w).get(a.EVENTS.DISCONNECT);if(o(this,l,ne).call(this),e)try{e(t)}catch(s){console.error("Port onDisconnect listener error:",s)}},ne=function(){r(this,p)&&(o(this,l,Ee).call(this),r(this,p).onmessage=null,r(this,p).onerror=null,typeof r(this,p).stop=="function"&&r(this,p).stop(),typeof r(this,p).close=="function"&&r(this,p).close());for(let[t,e]of r(this,T))console.warn(`[Port] rejecting pending rid=${t}`),e.timeout&&clearTimeout(e.timeout),e.reject?.(new Error("Port closed"));r(this,T).clear(),u(this,p,null),u(this,N,!1),r(this,w).clear()},fe=function(){let t=r(this,p);if(!t)return;let e=()=>o(this,l,Q).call(this,"peer-lost");try{"onclose"in t?t.onclose=e:typeof t.addEventListener=="function"?(t.addEventListener("close",e),u(this,B,e)):typeof t.on=="function"&&(t.on("close",e),u(this,B,e))}catch{}},Ee=function(){let t=r(this,p);if(t)try{r(this,B)?(typeof t.removeEventListener=="function"?t.removeEventListener("close",r(this,B)):typeof t.removeListener=="function"&&t.removeListener("close",r(this,B)),u(this,B,null)):"onclose"in t&&(t.onclose=null)}catch{}},de=function(t){try{return o(this,l,L).call(this,a.EVENTS.MESSAGE,{sid:r(this,b),rid:null,payload:t})}catch(e){return Promise.reject(e)}},Y=function(t,e,s=r(this,W)){return new Promise((i,n)=>{try{let h=F(),y=be(()=>{r(this,T).delete(h);let E=Array.isArray(e)?e[1]:t;console.warn(`[Port] request TIMEOUT \u2014 sid: ${r(this,b)}, rid: ${h}, event: ${E}, ms: ${s}`),n(new Error("Request timeout"))},s);r(this,T).set(h,{resolve:i,reject:n,timeout:y}),o(this,l,L).call(this,t,{sid:r(this,b),rid:h,payload:e})}catch(h){n(h)}})},pe=function(t){let e=t?.data;if(!Array.isArray(e)||e.length<2)return;let[s,i]=e||[];if(!(i?.sid&&i.sid!==r(this,b)))switch(s){case a.EVENTS.RESPONSE:o(this,l,ae).call(this,i?.rid,i?.payload,"resolve");return;case a.EVENTS.ERROR:let n=i?.payload instanceof Error?i.payload.message:String(i?.payload);o(this,l,ae).call(this,i?.rid,new Error(n),"reject");return;case a.EVENTS.MESSAGE:o(this,l,oe).call(this,i?.rid,i?.payload,!1);return;case a.EVENTS.GATHER:o(this,l,oe).call(this,i?.rid,i?.payload,!0);return;case a.EVENTS.ENABLE:o(this,l,me).call(this,i?.rid,i?.payload);return;case a.EVENTS.DISCONNECT:o(this,l,Q).call(this,"closed");return;default:return}},oe=async function(t,e,s=!1){try{let i=r(this,w).get(a.EVENTS.MESSAGE),n=i?await i(e,{isRequest:!!t,isGather:s}):null;return t?o(this,l,L).call(this,a.EVENTS.RESPONSE,{rid:t,payload:n??null}):void 0}catch(i){let n=i instanceof Error?i.message:String(i);o(this,l,L).call(this,a.EVENTS.ERROR,{rid:t,payload:n})}},ae=function(t,e,s){let i=r(this,T).get(t);i&&(i.timeout&&clearTimeout(i.timeout),r(this,T).delete(t),s==="resolve"?i.resolve(e):i.reject(e))},me=function(t,e){u(this,N,e);let s=r(this,w).get(a.EVENTS.ENABLE);return s&&s(e),o(this,l,L).call(this,a.EVENTS.RESPONSE,{rid:t,payload:e})},L=function(t,e){if(!r(this,p))return console.warn(`[Port] #postMessage but port is null \u2014 type: ${t}, sid: ${r(this,b)}`),!1;try{r(this,p).postMessage([t,e])}catch(s){return console.error(`[Port] #postMessage FAILED \u2014 type: ${t}, sid: ${r(this,b)}`,s.message),s?.name!=="DataCloneError"&&o(this,l,Q).call(this,"peer-lost"),!1}return!0},Se=function(t){console.error("onerror",t)},re(a,"defaultOptions",{primary:!1,maxRetries:10,baseDelay:200,maxDelay:2e3,jitter:.2,timeoutMs:1e3}),a);var g={HANDSHAKE:"HANDSHAKE",MESSAGE:"MESSAGE",GATHER:"GATHER",SUBSCRIBE:"SUBSCRIBE",UNSUBSCRIBE:"UNSUBSCRIBE",SYNC:"SYNC"};var Oe=ue("channelContracts",[Object]),m,R,K,$,v,G,V,O,j,U,C,ie,c,le,k,he,X,Z,_,ye,ee,J,te,we,ge,Ne,Be=(ie=class extends se{constructor(){super(...arguments);d(this,c);d(this,m,null);d(this,R,null);d(this,K,1e3);d(this,$,new Map);d(this,v,new Map);d(this,G,[]);d(this,V,!1);d(this,O,null);d(this,j,!1);d(this,U,null);d(this,C,{enable:new Set,disable:new Set,connect:new Set,disconnect:new Set});d(this,ee,async([t,e,s,i,n])=>{let h=[];switch(t){case g.MESSAGE:let y=r(this,v).get(e);if(y)for(let E of y){if(!o(this,c,Ne).call(this,e,s,E.schema))continue;let S=await E.subscriber(...s);h.push(S),E.once&&r(this,v).get(e).delete(E)}break;case g.SUBSCRIBE:case g.UNSUBSCRIBE:s!=null?r(this,$).set(e,s):r(this,$).delete(e);break}return h.length>0?h[0]:null});d(this,J,(t,e,s)=>{switch(t){case"ENABLE":e===!0?r(this,C).enable.forEach(i=>i(s)):r(this,C).disable.forEach(i=>i(s));break;case"CONNECT":r(this,C).connect.forEach(i=>i(s));break}});d(this,te,t=>{console.error("Channel error:",t)})}initialize(t,e){if(e.port!=null&&!z(e.port))throw new Error("Configured port must have postMessage");if(u(this,R,e.port),u(this,K,e.timeout??1e3),e.subscriptions&&e.subscriptions.length)for(let s of e.subscriptions)r(this,G).push(s)}actions(){let t={ready:()=>r(this,V),portProvider:e=>{if(typeof e!="function")throw new Error("portProvider must be a function");return u(this,O,e),t},connect:async(e,s)=>{try{if(u(this,R,e??r(this,R)),z(r(this,R))||r(this,O)&&u(this,R,await r(this,O).call(this)),!z(r(this,R)))throw new Error("No port provided and no portProvider set");if(r(this,m)){let n=r(this,m);u(this,m,null),u(this,V,!1),n.close()}u(this,m,await Ae.connect({port:r(this,R),options:{timeoutMs:r(this,K)}}));let i=r(this,m);i.onMessage(async n=>await r(this,ee).call(this,n)),i.onEnable(n=>r(this,J).call(this,"ENABLE",n,t)),i.onError(r(this,te)),i.onDisconnect(n=>{r(this,m)===i&&o(this,c,we).call(this,n)}),u(this,V,!0);for(let[n,h]of r(this,v)){let y;for(let E of h)E.timeoutMs!==void 0&&(y===void 0||E.timeoutMs>y)&&(y=E.timeoutMs);r(this,m).emit([g.SUBSCRIBE,n,y])}if(r(this,G).length>0){let n=r(this,G);u(this,G,[]);for(let h of n)o(this,c,le).call(this,h)}if(await o(this,c,ye).call(this),r(this,J).call(this,"CONNECT",!0,t),s&&typeof s=="function"){let n=s(t);typeof n=="function"&&u(this,O,n),s=null}return t}catch(i){return console.error("Channel error:",i),!1}},reconnect:e=>{if(!z(e))throw new Error("reconnect requires a valid port");return t.connect(e)},onEnable:e=>{if(typeof e!="function")throw new Error("Listener must be a function");return r(this,C).enable.add(e),()=>r(this,C).enable.delete(e)},onDisable:e=>{if(typeof e!="function")throw new Error("Listener must be a function");return r(this,C).disable.add(e),()=>r(this,C).disable.delete(e)},onDisconnect:e=>{if(typeof e!="function")throw new Error("Listener must be a function");return r(this,C).disconnect.add(e),()=>r(this,C).disconnect.delete(e)},disconnect:()=>{if(r(this,m)){u(this,O,null),r(this,C).disconnect.forEach(e=>e("closed",t));for(let e of r(this,v).keys())r(this,m).emit([g.UNSUBSCRIBE,e]);r(this,m).close(),u(this,m,null),u(this,V,!1),r(this,v).clear(),r(this,$).clear(),u(this,G,[])}},use:(...e)=>{if(r(this,V)){for(let s of e)o(this,c,le).call(this,s);return t}for(let s of e)r(this,G).push(s);return t},publish:(e,...s)=>(o(this,c,X).call(this,g.MESSAGE,e,s),t),request:(e,...s)=>o(this,c,Z).call(this,g.MESSAGE,e,s),gather:(e,...s)=>o(this,c,_).call(this,g.GATHER,e,s),subscribe:(e,s)=>o(this,c,k).call(this,e,void 0,s,!1),subscribeOnce:(e,s)=>o(this,c,k).call(this,e,void 0,s,!0),unsubscribe:(e,s)=>o(this,c,he).call(this,e,s),to:(...e)=>({publish:(s,...i)=>{o(this,c,X).call(this,g.MESSAGE,s,i,e)},request:(s,...i)=>o(this,c,Z).call(this,g.MESSAGE,s,i,e),gather:(s,...i)=>o(this,c,_).call(this,g.GATHER,s,i,e)}),namespace:e=>({publish:(s,...i)=>{let n=e?`${e}/${s}`:s;return o(this,c,X).call(this,g.MESSAGE,n,i),t},request:(s,...i)=>{let n=e?`${e}/${s}`:s;return o(this,c,Z).call(this,g.MESSAGE,n,i)},gather:(s,...i)=>{let n=e?`${e}/${s}`:s;return o(this,c,_).call(this,g.GATHER,n,i)},subscribe:(s,i)=>{let n=e?`${e}/${s}`:s;return o(this,c,k).call(this,n,void 0,i,!1),t},subscribeOnce:(s,i)=>{let n=e?`${e}/${s}`:s;return o(this,c,k).call(this,n,void 0,i,!0),t},unsubscribe:(s,i)=>{let n=e?`${e}/${s}`:s;return o(this,c,he).call(this,n,i),t}})};return u(this,U,t),t}},m=new WeakMap,R=new WeakMap,K=new WeakMap,$=new WeakMap,v=new WeakMap,G=new WeakMap,V=new WeakMap,O=new WeakMap,j=new WeakMap,U=new WeakMap,C=new WeakMap,c=new WeakSet,le=function(t){if(t&&typeof t=="function"){let e=t._name,s=t(this.inject),i=Object.entries(s);for(let[n,h]of i){let{handler:y,schema:E,namespace:S,once:I,timeoutMs:P}=h,A=S?`${S}/${e}:${n}`:`${e}:${n}`,M=(...x)=>{try{return y(...x)}catch(H){console.error(`Errow with ${A}:`,H)}};o(this,c,k).call(this,A,E,M,I,P)}}},k=function(t,e,s,i=!1,n=void 0){r(this,v).has(t)||r(this,v).set(t,new Set);let h={event:t,schema:e,subscriber:s,once:i,timeoutMs:n};return r(this,v).get(t).add(h),r(this,m)&&r(this,m).emit([g.SUBSCRIBE,t,n]),()=>r(this,v).get(t)?.delete(h)},he=function(t,e){if(!r(this,v).has(t))return;let s=r(this,v).get(t);for(let i of s.values())if(i.subscriber===e)return s.delete(i),e},X=function(t,e,s,i=null){if(!r(this,m)){console.warn(`[Channel] publish "${e}" dropped \u2014 not connected`);return}r(this,m).emit([t,e,s,i])},Z=function(t,e,s,i=null){return r(this,m)?r(this,m).request([t,e,s,i],r(this,$).get(e)):Promise.reject(new Error(`Channel not connected \u2014 request "${e}" dropped`))},_=function(t,e,s,i=null){return r(this,m)?r(this,m).gather([t,e,s,i],r(this,$).get(e)):Promise.reject(new Error(`Channel not connected \u2014 gather "${e}" dropped`))},ye=async function(){try{let t=await r(this,m).request([g.SYNC]);if(Array.isArray(t))for(let[e,s]of t)r(this,$).set(e,s)}catch{}},ee=new WeakMap,J=new WeakMap,te=new WeakMap,we=function(t){u(this,m,null),u(this,V,!1),r(this,$).clear(),r(this,C).disconnect.forEach(e=>{try{e(t,r(this,U))}catch(s){console.error("Channel onDisconnect listener error:",s)}}),o(this,c,ge).call(this)},ge=async function(){if(!(r(this,j)||!r(this,O))){u(this,j,!0);try{let t=await r(this,O).call(this);if(!z(t))throw new Error("portProvider did not return a usable port");await r(this,U).connect(t)}catch(t){console.error("[Channel] reconnect failed:",t?.message??t)}finally{u(this,j,!1)}}},Ne=function(t,e,s){if(s===void 0||s==="*"||s===null||e===void 0)return!0;if(Array.isArray(s)){if(s.length===1&&s[0]==="*")return!0;let i=s.length,n=e.length;if(i!==n)return console.warn(`
2
- Event:`,t,`
3
- Expected:`,s,`
4
- Received:`,e.map(h=>typeof h)),!1;for(let h=0;h<i;h++){let y=s[h],E=e[h],S;if(Array.isArray(E)?S="Array":E===null?S="null":S=Object.prototype.toString.call(E).slice(8,-1),y==="Object"&&S==="Array"||y!==S)return console.warn(`
5
- Event:`,t,`
6
- Value:`,E),!1}}return!0},re(ie,"manifest",{name:"Channel",dependencies:[],version:"1.0.0",namespace:"channel",description:"Channel extension for message passing between systems",defaults:{port:null,subscriptions:[],timeout:1e3}}),ie);export{Oe as a,Be as b};
@@ -1 +0,0 @@
1
- var i=[{type:"graphic",displayName:"Rectangle",category:"shapes",keywords:["rectangle"],shape:"rectangle"},{type:"graphic",displayName:"Rounded Rectangle",category:"shapes",keywords:["rounded","rectangle"],shape:"roundedRectangle"},{type:"graphic",displayName:"Ellipse",category:"shapes",keywords:["ellipse"],shape:"ellipse"},{type:"graphic",displayName:"Triangle",category:"shapes",keywords:["triangle"],shape:"triangle"}];var e=[{type:"aside",displayName:"Aside",category:"layout",swapGroup:"layout",keywords:["layout"],tagName:"aside"},{type:"footer",displayName:"Footer",category:"layout",swapGroup:"layout",keywords:["layout"],tagName:"footer"},{type:"form",displayName:"Form",category:"layout",swapGroup:"layout",keywords:["layout"],tagName:"form"},{type:"header",displayName:"Header",category:"layout",swapGroup:"layout",keywords:["layout"],tagName:"header"},{type:"main",displayName:"Main",category:"layout",swapGroup:"layout",keywords:["layout"],tagName:"main"},{type:"section",displayName:"Section",category:"layout",swapGroup:"layout",keywords:["layout"],tagName:"section"},{type:"article",displayName:"Article",category:"layout",swapGroup:"layout",keywords:["layout"],tagName:"article"},{type:"nav",displayName:"Nav",category:"layout",swapGroup:"layout",keywords:["layout"],tagName:"nav"},{type:"div",displayName:"Div",category:"layout",swapGroup:"layout",keywords:["layout"],tagName:"div"},{type:"template",displayName:"Template",category:"layout",swapGroup:"layout",keywords:["layout"],tagName:"template"}];var a=[{type:"h1",displayName:"Heading 1",keywords:["headings"],category:"headings",swapGroup:"headings",tagName:"h1"},{type:"h2",displayName:"Heading 2",keywords:["headings"],category:"headings",swapGroup:"headings",tagName:"h2"},{type:"h3",displayName:"Heading 3",keywords:["headings"],category:"headings",swapGroup:"headings",tagName:"h3"},{type:"h4",displayName:"Heading 4",keywords:["headings"],category:"headings",swapGroup:"headings",tagName:"h4"},{type:"h5",displayName:"Heading 5",keywords:["headings"],category:"headings",swapGroup:"headings",tagName:"h5"},{type:"h6",displayName:"Heading 6",keywords:["headings"],category:"headings",swapGroup:"headings",tagName:"h6"},{type:"p",displayName:"Paragraph",category:"text",swapGroup:"text",keywords:["text"],tagName:"p"},{type:"label",displayName:"Label",category:"text",swapGroup:"text",keywords:["text"],tagName:"label"},{type:"span",displayName:"Span",category:"text",swapGroup:"text",keywords:["text"],tagName:"span"},{type:"blockquote",displayName:"Blockquote",category:"text",swapGroup:null,keywords:["text"],tagName:"blockquote"},{type:"pre",displayName:"Preformatted",category:"text",swapGroup:null,keywords:["text"],tagName:"pre"},{type:"codeElement",displayName:"Code",category:"text",swapGroup:"text",keywords:["text"],tagName:"code"},{type:"strong",displayName:"Strong",category:"text",swapGroup:"text",keywords:["text"],tagName:"strong"},{type:"em",displayName:"Emphasis",category:"text",swapGroup:"text",keywords:["text"],tagName:"em"},{type:"small",displayName:"Small",category:"text",swapGroup:"text",keywords:["text"],tagName:"small"},{type:"mark",displayName:"Mark",category:"text",swapGroup:null,keywords:["text"],tagName:"mark"},{type:"hr",displayName:"Horizontal Rule",category:"text",swapGroup:null,keywords:["text","divider"],tagName:"hr"},{type:"br",displayName:"Line Break",category:"text",swapGroup:null,keywords:["text"],tagName:"br"}];var t=[{type:"button",displayName:"Button",category:"interactive",swapGroup:"interactive",keywords:["interactive"],tagName:"button"},{type:"a",displayName:"Link",category:"interactive",swapGroup:"interactive",keywords:["interactive"],tagName:"a"},{type:"details",displayName:"Details",category:"interactive",swapGroup:null,keywords:["interactive"],tagName:"details"},{type:"summary",displayName:"Summary",category:"interactive",swapGroup:null,keywords:["interactive"],tagName:"summary"},{type:"dialog",displayName:"Dialog",category:"interactive",swapGroup:null,keywords:["interactive"],tagName:"dialog"}];var p=[{type:"radio",displayName:"Radio",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"input"},{type:"textInput",displayName:"Text",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"input"},{type:"checkbox",displayName:"Checkbox",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"input"},{type:"phone",displayName:"Phone",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"input"},{type:"email",displayName:"Email",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"input"},{type:"password",displayName:"Password",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"input"},{type:"select",displayName:"Select",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"select"},{type:"textarea",displayName:"Textarea",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"textarea"},{type:"number",displayName:"Number",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"input"},{type:"date",displayName:"Date",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"input"},{type:"range",displayName:"Range",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"input"},{type:"file",displayName:"File Upload",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"input"},{type:"search",displayName:"Search",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"input"},{type:"color",displayName:"Color Picker",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"input"},{type:"hidden",displayName:"Hidden",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"input"}];var o=[{type:"img",displayName:"Image",category:"media",swapGroup:null,keywords:["media"],tagName:"img"},{type:"video",displayName:"Video",category:"media",swapGroup:null,keywords:["media"],tagName:"video"},{type:"audio",displayName:"Audio",category:"media",swapGroup:null,keywords:["media"],tagName:"audio"},{type:"iframe",displayName:"Iframe",category:"media",swapGroup:null,keywords:["media"],tagName:"iframe"},{type:"figure",displayName:"Figure",category:"media",swapGroup:null,keywords:["media"],tagName:"figure"},{type:"figcaption",displayName:"Figcaption",category:"media",swapGroup:null,keywords:["media"],tagName:"figcaption"}];var r=[{type:"ol",displayName:"Ordered List",category:"lists",swapGroup:"list-container",keywords:["lists"],tagName:"ol"},{type:"ul",displayName:"Unordered List",category:"lists",swapGroup:"list-container",keywords:["lists"],tagName:"ul"},{type:"li",displayName:"List Item",category:"lists",swapGroup:null,keywords:["lists"],tagName:"li"},{type:"dl",displayName:"Definition List",category:"lists",swapGroup:"list-container",keywords:["lists"],tagName:"dl"},{type:"dt",displayName:"Definition Term",category:"lists",swapGroup:null,keywords:["lists"],tagName:"dt"},{type:"dd",displayName:"Definition Description",category:"lists",swapGroup:null,keywords:["lists"],tagName:"dd"}];var s=[{type:"table",displayName:"Table",category:"tables",swapGroup:null,keywords:["tables"],tagName:"table"},{type:"thead",displayName:"Table Head",category:"tables",swapGroup:null,keywords:["tables"],tagName:"thead"},{type:"tbody",displayName:"Table Body",category:"tables",swapGroup:null,keywords:["tables"],tagName:"tbody"},{type:"tfoot",displayName:"Table Foot",category:"tables",swapGroup:null,keywords:["tables"],tagName:"tfoot"},{type:"tr",displayName:"Table Row",category:"tables",swapGroup:null,keywords:["tables"],tagName:"tr"},{type:"th",displayName:"Table Header Cell",category:"tables",swapGroup:null,keywords:["tables"],tagName:"th"},{type:"td",displayName:"Table Cell",category:"tables",swapGroup:null,keywords:["tables"],tagName:"td"}];var l=[{type:"fieldset",displayName:"Fieldset",category:"form",swapGroup:null,keywords:["form"],tagName:"fieldset"},{type:"legend",displayName:"Legend",category:"form",swapGroup:null,keywords:["form"],tagName:"legend"},{type:"meter",displayName:"Meter",category:"form",swapGroup:null,keywords:["form"],tagName:"meter"},{type:"progress",displayName:"Progress",category:"form",swapGroup:null,keywords:["form"],tagName:"progress"}];var y=[{type:"slot",displayName:"Slot",category:"special",swapGroup:null,keywords:["slot","placeholder","component","template"],tagName:"slot"}];var C=[...e,...a,...t,...p,...o,...r,...s,...l,...y];export{i as a,C as b};
@@ -1 +0,0 @@
1
- import{b as s,e as c}from"./chunk-2BGFXNGU.js";import{a as p}from"./chunk-HE7IQLGK.js";function y(o,t,l,{breakpoint:e="default",interactionState:i}={}){let r=p(e),n=i??o.get([t,".interactionState"])??[];return o.remove([t,"style",r,...n,l])}function m(o,t,l){o.update([t,"style","default"],(e={})=>({...e,display:l}))}var a={block:"block",flex:"flex",grid:"grid"};function b(o,t,l){let e=l==null||l===""?"none":l;s(o,t,{layout:e}),e==="none"?y(o,t,"display"):a[e]&&m(o,t,a[e]);let i=o.get([t,"children"])??[];for(let r of i)c(o,r,t);if(o.get([t,"type"])==="slot"){let r=o.findAllWhen("id","is",t);for(let n of r){let f=o.get(n.slice(0,-1));console.log("slotEntry",f);for(let u of f?.children??[])c(o,u,t)}}return{id:t,layout:e,childrenUpdated:i.length}}export{y as a,b};
@@ -1 +0,0 @@
1
- import{a as l}from"./chunk-KISNK4R4.js";import{a as s}from"./chunk-PYIGBTL4.js";import"./chunk-DLHF7QB4.js";import"./chunk-7UENQJSC.js";import"./chunk-RFFN4NF4.js";import"./chunk-J5QMLA3Z.js";import"./chunk-O24ISLGT.js";import"./chunk-EXXAK3BP.js";import"./chunk-UCLSDDOL.js";var S=s("contentEditor",d=>{let[p,o,i,h]=d("cache","channel","contentEditor","state"),c=h.ref(["nodes"]),t=null;if(!c)throw new Error("Nodes not found");return{start:{schema:["String","String"],namespace:"stage",handler:(n,a)=>{try{let e=document.querySelector(`[data-rid="${n}"]`);if(!e)throw new Error(`ContentEditor.start: $el not found for rid ${n}`);t=i.create(e,{onInput:r=>{l(c,a,{value:r})},onBlur:()=>{o.to("renderWorker").publish("contentEditor:end",n,a),t&&(t.destroy(),t=null)},onWheel:({deltaX:r,deltaY:u,ctrlKey:f,x:m,y:E})=>{o.to("renderWorker").publish("contentEditor:wheel",{deltaX:r,deltaY:u,ctrlKey:f,x:m,y:E})}})}catch(e){return console.error(e),null}}},end:{schema:["String","String"],namespace:"stage",handler:()=>{t&&(t.destroy(),t=null)}}}});export{S as contentEditorContracts};
@@ -1,15 +0,0 @@
1
- import{a as Sn,b as vn}from"./chunk-QKFDVU2Q.js";import{a as pn,b as be,c as mn,d as Et,e as hn,f as Te,g as Ct,h as At,i as Le,j as Yt,k as Ot,l as Xt,m as _e,n as Re,o as fn,p as gn,q as Nt}from"./chunk-FCRFPWU3.js";import"./chunk-67H474GN.js";import"./chunk-KISNK4R4.js";import"./chunk-LEELNBJC.js";import{b as un}from"./chunk-PYIGBTL4.js";import"./chunk-HAN4CMBX.js";import"./chunk-CYURWEXX.js";import"./chunk-GUI7FIZD.js";import"./chunk-IKKRB6BS.js";import"./chunk-7VDUBBVE.js";import"./chunk-N6I4COF2.js";import"./chunk-A52FDU5E.js";import"./chunk-6S7QQT47.js";import"./chunk-PU62K33G.js";import"./chunk-YCGY2NRE.js";import"./chunk-KTWXYDG7.js";import"./chunk-EWEPEODY.js";import"./chunk-Q3ZV7EKU.js";import"./chunk-F5MJNV7Y.js";import"./chunk-QD56IMFS.js";import"./chunk-EPVRMHC2.js";import"./chunk-YB7FA4Y3.js";import"./chunk-ZUPNPSUB.js";import"./chunk-GEOQWCYL.js";import"./chunk-NXBFOI3Z.js";import"./chunk-E6KR5RXO.js";import"./chunk-I57W7UZN.js";import"./chunk-LUY5LC7Z.js";import"./chunk-IBDKDP7T.js";import"./chunk-5CWWFBNY.js";import"./chunk-BWJHUHDJ.js";import"./chunk-QFFVADTJ.js";import"./chunk-MGH62JQ4.js";import"./chunk-YCMBBPKT.js";import"./chunk-NHY2XYCH.js";import"./chunk-XFHQ45KR.js";import"./chunk-XTAXESM6.js";import"./chunk-QJ33JO3T.js";import"./chunk-OQM5TMCK.js";import"./chunk-BL6GQ6ID.js";import"./chunk-K5BNCYT7.js";import"./chunk-XE3A5HPY.js";import"./chunk-CC3CCH2E.js";import"./chunk-Q3IER3MW.js";import"./chunk-DHPGPV5T.js";import"./chunk-FAYUYASQ.js";import"./chunk-ICWQHFOI.js";import"./chunk-AS76ZLXK.js";import"./chunk-HCRWHPFW.js";import"./chunk-6KW4HPGN.js";import"./chunk-CNZYL2VV.js";import"./chunk-UQFZUWFP.js";import"./chunk-PPDOTRNT.js";import"./chunk-CAAW6MG4.js";import"./chunk-JRXMDYLE.js";import"./chunk-LHK7LQPZ.js";import"./chunk-GK5XUHQG.js";import"./chunk-TX5TCU2H.js";import"./chunk-GM4D3DPT.js";import{a as bn,c as wn}from"./chunk-JHWED3SX.js";import{a as yn}from"./chunk-ACPGC7BJ.js";import"./chunk-DLHF7QB4.js";import"./chunk-7UENQJSC.js";import"./chunk-RFFN4NF4.js";import"./chunk-34CHXN5I.js";import"./chunk-J5QMLA3Z.js";import"./chunk-2BGFXNGU.js";import"./chunk-HE7IQLGK.js";import"./chunk-Z3M6DQKZ.js";import"./chunk-IV6PINVX.js";import"./chunk-A25WFH3U.js";import"./chunk-MUZZUB5Y.js";import"./chunk-TPCJQIUG.js";import{a as ln,c as se}from"./chunk-O24ISLGT.js";import"./chunk-LHON3DKO.js";import"./chunk-E4RDZ324.js";import"./chunk-NRRFAMFA.js";import"./chunk-RYWOKFM7.js";import"./chunk-EXXAK3BP.js";import{e as x,f as a,g as h,h as p,i as u,j as Wt}from"./chunk-UCLSDDOL.js";var Ms=60*60*1e3;var D=ln("AI_OPERATIONS",[Object]);function $e(r){let t=r._name,e=r();return{namespace:t,operations:Object.entries(e).map(([n,o])=>({name:n,fullName:`${t}:${n}`,alias:o.alias||null,mcpName:o.mcpName||null,description:o.description||"",schema:o.schema||[],examples:o.examples||[],returns:o.returns||"Object"}))}}function Gt(r,t,e){if(!Array.isArray(t)||t.length===0)return!0;let n=t[0];if(typeof n!="object"||Array.isArray(n))return console.warn(`Schema for ${e} should be an object with named parameters`),!0;for(let[o,s]of Object.entries(n)){let i=typeof s=="string"&&s.endsWith("?"),d=i?s.slice(0,-1):s,c=r[o];if(!(o in r)||c===void 0){if(i)continue;throw new Error(`Missing required parameter "${o}" in ${e}`)}let l=Array.isArray(c)?"Array":c===null?"Null":typeof c=="object"?"Object":c.constructor.name;if(l!==d&&d!=="Any")throw new Error(`Parameter "${o}" in ${e} must be of type ${d}, got ${l}`)}return!0}var us={name:"respond",description:"Send a conversational response to the user. Use this for greetings, questions, clarifications, status updates, or when the build task is fully complete.",input_schema:{type:"object",properties:{message:{type:"string",description:"Your conversational response to the user"}},required:["message"]}};function Vt(r){let t=fs(r);return[us,...t.map(hs)]}function hs(r){let t=r.operations.map(e=>{let n=Array.isArray(e.schema)?e.schema[0]:null,o=n&&typeof n=="object"?Object.entries(n).map(([i,d])=>`${i}: ${d}`).join(", "):"",s=e.examples?.[0]?`
2
- Example: ${JSON.stringify(e.examples[0].args)}`:"";return` ${e.name} \u2014 ${e.description}
3
- Args: { ${o} }${s}`}).join(`
4
-
5
- `);return{name:r.namespace,description:`${r.namespace} operations. Pass "op" as the operation name and "args" matching that op's schema.
6
-
7
- ${t}`,input_schema:{type:"object",properties:{op:{type:"string",description:`Operation name within ${r.namespace}`},args:{type:"object",description:"Arguments matching the operation's schema"},ref:{type:"string",description:"Optional {{name}} reference for cross-operation use"},message:{type:"string",description:"Short explanation of what you are doing (1 sentence)"}},required:["op","args"]}}}function fs(r){return!Array.isArray(r)||r.length===0?[]:r[0]?.namespace&&Array.isArray(r[0]?.operations)?r:r.map(t=>$e(t))}var oe,Pe,re,G,De,xn,In,Me=class extends se{constructor(){super(...arguments);h(this,De);h(this,oe,new Map);h(this,Pe,[]);h(this,re,new Map);h(this,G,new Map)}getters(){return{operationsMetadata:()=>this.getOperationsMetadata(),anthropicTools:()=>this.getAnthropicTools()}}actions(){return{use:(...e)=>{for(let n of e)u(this,De,xn).call(this,n);return this},has:e=>a(this,oe).has(e),resolveType:e=>this.resolveType(e),describeUnresolved:e=>this.describeUnresolved(e),executeOperation:(e,n,o)=>this.executeOperation(e,n,o),executeBatch:e=>this.executeBatch(e)}}resolveType(e){return typeof e!="string"||!e?null:e.includes(":")?a(this,oe).has(e)?e:null:a(this,re).get(e)??a(this,G).get(e)??null}describeUnresolved(e){if(this.resolveType(e))return null;if(typeof e=="string"&&!e.includes(":")&&a(this,G).has(e)&&a(this,G).get(e)===null){let n=[];for(let[s,i]of a(this,oe))i.name===e&&n.push(i.alias?`${s} (alias: ${i.alias})`:s);let o=n.length?n.join(" or "):e;return`Ambiguous operation: "${e}". Use ${o}.`}return`Unknown operation: ${e}`}getOperationsMetadata(){return a(this,Pe).map(e=>$e(e))}getAnthropicTools(){return Vt(a(this,Pe))}async executeOperation(e,n,o=null){let s=this.resolveType(e),i=a(this,oe).get(s);if(!i)throw new Error(this.describeUnresolved(e));try{Gt(n,i.schema,e)}catch(d){throw console.error(`Validation failed for ${e}:`,d),d}try{return{result:await i.handler(n),ref:o}}catch(d){throw console.error(`Handler failed for ${e}:`,d),d}}async executeBatch(e){let{operations:n,description:o,expectation:s}=e;console.log("AiOperations: Executing batch",{count:n.length,description:o});let i=new Map,d=[],c=[];try{for(let l=0;l<n.length;l++){let m=n[l];console.log(`AiOperations: Executing [${l+1}/${n.length}] ${m.type}`);let f=u(this,De,In).call(this,m.args,i),{result:b}=await this.executeOperation(m.type,f,m.ref),S=b.id??b.rootId;if(m.ref&&S&&(i.set(m.ref,S),c.push(S)),b.treeMap)for(let[A,P]of Object.entries(b.treeMap))i.set(A,P),c.push(P);b.createdIds?.length&&c.push(...b.createdIds),d.push({operation:m.type,success:!0,result:b})}return console.log("AiOperations: Execution complete",{total:n.length,successful:d.length,createdIds:c}),{success:!0,description:o,expectation:s,results:d,createdIds:c,refMap:Object.fromEntries(i)}}catch(l){return console.error("AiOperations: Batch execution failed",l),{success:!1,description:o,error:l.message,failedAt:d.length,results:d}}}};oe=new WeakMap,Pe=new WeakMap,re=new WeakMap,G=new WeakMap,De=new WeakSet,xn=function(e){let n=this.inject("log");if(!e||typeof e!="function")throw new Error("Operation factory must be a function");let o=e._name;if(!o)throw new Error("Operation factory must have a _name property (use defineAiOperations)");n.info(`AiOperations: Registering operations for namespace "${o}"`),a(this,Pe).push(e);let s=e(this.inject);for(let[i,d]of Object.entries(s)){let{handler:c,schema:l,description:m,examples:f,returns:b,alias:S}=d,A=`${o}:${i}`;if(!c||typeof c!="function")throw new Error(`Operation ${A} must have a handler function`);m||console.warn(`Operation ${A} missing description`),a(this,oe).set(A,{namespace:o,name:i,handler:c,schema:l||[],description:m||"",examples:f||[],returns:b||"Object",alias:S||null}),S&&(a(this,re).has(S)&&a(this,re).get(S)!==A&&console.warn(`AiOperations: alias "${S}" already registered for ${a(this,re).get(S)}, overriding with ${A}`),a(this,re).set(S,A)),a(this,G).has(i)&&a(this,G).get(i)!==A?a(this,G).set(i,null):a(this,G).set(i,A)}},In=function(e,n){return e&&JSON.parse(JSON.stringify(e),(o,s)=>o==="ref"?s:typeof s=="string"&&s.match(/^\{\{.*\}\}$/)?n.get(s)??n.get(s.replace(/\.[^}]+(?=\}\}$)/,""))??s:s)},x(Me,"manifest",{name:"AiOperations",namespace:"aiOps",version:"1.0.0",description:"AI operation registry and executor",author:"",license:"MIT",homepage:""});var V,q,ie,we,B,Se,Qe,v,kn,qt,j,En,Ze,et,tt,nt,st,ot,rt,Cn,Kt,ze=class extends se{constructor(){super(...arguments);h(this,v);h(this,V,new Map);h(this,q,!0);h(this,ie,!0);h(this,we,!1);h(this,B,Date.now());h(this,Se,null);h(this,Qe,null);h(this,Ze,()=>{let e=a(this,q);p(this,q,!document.hidden),a(this,q)&&!e?(p(this,B,Date.now()),u(this,v,j).call(this,"visible")):!a(this,q)&&e&&u(this,v,j).call(this,"hidden")});h(this,et,()=>{p(this,ie,!0),p(this,B,Date.now()),u(this,v,j).call(this,"focus")});h(this,tt,()=>{p(this,ie,!1),u(this,v,j).call(this,"blur")});h(this,nt,()=>{p(this,we,!0),u(this,v,j).call(this,"suspend",{reason:"freeze"})});h(this,st,()=>{p(this,we,!1),p(this,B,Date.now()),u(this,v,j).call(this,"resume",{reason:"freeze"})});h(this,ot,e=>{e.persisted&&(p(this,B,Date.now()),u(this,v,j).call(this,"resume",{reason:"bfcache"}))});h(this,rt,e=>{e.persisted&&u(this,v,j).call(this,"suspend",{reason:"bfcache"})})}initialize(){typeof document<"u"&&(p(this,q,!document.hidden),p(this,ie,document.hasFocus())),p(this,B,Date.now())}getters(){return{visible:()=>a(this,q),focused:()=>a(this,ie),frozen:()=>a(this,we)}}actions(e,n){return p(this,Qe,n||{}),u(this,v,En).call(this,a(this,Qe)),{on:(o,s)=>u(this,v,kn).call(this,o,s),off:(o,s)=>u(this,v,qt).call(this,o,s),isVisible:()=>a(this,q),isFocused:()=>a(this,ie),isFrozen:()=>a(this,we),lastActiveTimestamp:()=>a(this,B),destroy:()=>u(this,v,Kt).call(this)}}destroy(){u(this,v,Kt).call(this)}};V=new WeakMap,q=new WeakMap,ie=new WeakMap,we=new WeakMap,B=new WeakMap,Se=new WeakMap,Qe=new WeakMap,v=new WeakSet,kn=function(e,n){return a(this,V).has(e)||a(this,V).set(e,new Set),a(this,V).get(e).add(n),()=>u(this,v,qt).call(this,e,n)},qt=function(e,n){let o=a(this,V).get(e);o&&(o.delete(n),o.size===0&&a(this,V).delete(e))},j=function(e,n){let o=a(this,V).get(e);if(o)for(let s of o)s(n)},En=function(e){if(typeof document<"u"&&(e.visibility!==!1&&document.addEventListener("visibilitychange",a(this,Ze)),e.freeze!==!1&&(document.addEventListener("freeze",a(this,nt)),document.addEventListener("resume",a(this,st)))),typeof window<"u"&&(e.focus&&(window.addEventListener("focus",a(this,et)),window.addEventListener("blur",a(this,tt))),e.freeze!==!1&&(window.addEventListener("pageshow",a(this,ot)),window.addEventListener("pagehide",a(this,rt)))),e.sleepDetection?.enabled!==!1){let n=e.sleepDetection?.threshold||1e4;u(this,v,Cn).call(this,n)}},Ze=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap,st=new WeakMap,ot=new WeakMap,rt=new WeakMap,Cn=function(e){let n=Math.min(e/2,5e3);p(this,Se,setInterval(()=>{let o=Date.now(),s=o-a(this,B);s>e&&(u(this,v,j).call(this,"suspend",{reason:"sleep",gap:s}),u(this,v,j).call(this,"resume",{reason:"sleep",gap:s})),p(this,B,o)},n))},Kt=function(){typeof document<"u"&&(document.removeEventListener("visibilitychange",a(this,Ze)),document.removeEventListener("freeze",a(this,nt)),document.removeEventListener("resume",a(this,st))),typeof window<"u"&&(window.removeEventListener("focus",a(this,et)),window.removeEventListener("blur",a(this,tt)),window.removeEventListener("pageshow",a(this,ot)),window.removeEventListener("pagehide",a(this,rt))),a(this,Se)&&(clearInterval(a(this,Se)),p(this,Se,null)),a(this,V).clear()},x(ze,"manifest",{name:"PageLifecycle",namespace:"pageLifecycle",version:"1.0.0",description:"Browser lifecycle detection for tab visibility, focus, and sleep/wake"});function Jt(r){let t=window.getSelection();if(t.rangeCount===0)return{start:0,end:0};let e=t.getRangeAt(0),n=e.cloneRange();n.selectNodeContents(r),n.setEnd(e.startContainer,e.startOffset);let o=n.toString().length,s=e.cloneRange();s.selectNodeContents(r),s.setEnd(e.endContainer,e.endOffset);let i=s.toString().length;return{start:Math.min(o,i),end:Math.max(o,i)}}function An(r,t){if(!r?.isConnected||t<0)return;let e=document.createTreeWalker(r,NodeFilter.SHOW_TEXT),n=0,o=null;for(let s=e.nextNode();s;s=e.nextNode()){if(o=s,t<=n+s.length){let i=document.createRange();i.setStart(s,t-n),i.collapse(!0);let d=window.getSelection();d.removeAllRanges(),d.addRange(i);return}n+=s.length}if(o){let s=document.createRange();s.setStart(o,o.length),s.collapse(!0);let i=window.getSelection();i.removeAllRanges(),i.addRange(s)}}function On(r,t,e=0,n=""){return r.slice(0,t)+n+r.slice(t+e)}function Nn(r,t){let e=s=>/[\s\n]/.exec(s),n=t-1,o=t;for(;n>=0&&!e(r[n]);)n-=1;for(n=Math.max(0,n+1);o<r.length&&!e(r[o]);)o+=1;return o=Math.max(n,o),[n,o]}function Tt({pattern:r,word:t,match:e,regexMatch:n,triggerLen:o,start:s,end:i,cursorPos:d}){let c=d-s;return{pattern:r,word:t,match:e,regexMatch:n,start:s,end:i,query:t.slice(o,c)}}function Tn(r,t,e=[]){if(!r||t===0||e.length===0)return[];let[n,o]=Nn(r,t),s=r.slice(n,o);if(!s)return[];let i=[];for(let d of e){if(d.regex){let m=s.match(d.trigger);m&&i.push(Tt({pattern:d,word:s,match:m[0],regexMatch:m,triggerLen:1,start:n,end:o,cursorPos:t}));continue}let c=d.trigger,l=c.length;d.exact&&s===c?i.push(Tt({pattern:d,word:s,match:c,regexMatch:null,triggerLen:l,start:n,end:o,cursorPos:t})):d.startsWith&&s.startsWith(c)?i.push(Tt({pattern:d,word:s,match:c,regexMatch:null,triggerLen:l,start:n,end:o,cursorPos:t})):d.endsWith&&s.endsWith(c)&&i.push(Tt({pattern:d,word:s,match:c,regexMatch:null,triggerLen:l,start:n,end:o,cursorPos:t}))}return i}var gs=new Set(["insertText","insertParagraph","insertLineBreak","deleteContentBackward","deleteContentForward"]),ys={childList:!0,characterData:!0,subtree:!0},Q,je,ae,it,_,I,M,de,Be,He,Fe,We,ce,T,Ln,Lt,at,dt,ct,_t,lt,Rt,pt,mt,J,Ue=class Ue{constructor(t,{onInput:e,onBlur:n,onWheel:o}={},s={}){h(this,T);h(this,Q,[]);h(this,je,[]);h(this,ae,[]);h(this,it,{});h(this,_,"");h(this,I,0);h(this,M,0);h(this,de,0);h(this,Be,{content:"",start:0,end:0});h(this,He,!1);h(this,Fe,null);h(this,We,!1);h(this,ce,null);h(this,at,t=>{t.stopPropagation(),t.preventDefault();let e=t.clipboardData;if(!e)return;let n=e.getData("text/plain")||e.getData("text/html");if(!n)return;let o=n;if(n!==e.getData("text/plain")){let s=document.createElement("div");s.innerHTML=n,o=s.textContent||""}u(this,T,Lt).call(this),u(this,T,J).call(this,a(this,I),a(this,M)-a(this,I),o)});h(this,dt,t=>{switch(console.log("beforeinput",t),t.stopPropagation(),gs.has(t.inputType)&&t.preventDefault(),u(this,T,Lt).call(this),t.inputType){case"insertText":u(this,T,J).call(this,a(this,I),a(this,M)-a(this,I),t.data??"");break;case"insertParagraph":case"insertLineBreak":u(this,T,J).call(this,a(this,I),a(this,M)-a(this,I),`
8
- `);break;case"deleteContentBackward":a(this,I)!==a(this,M)?u(this,T,J).call(this,a(this,I),a(this,M)-a(this,I),""):u(this,T,J).call(this,Math.max(0,a(this,I)-1),Math.min(1,a(this,I)),"");break;case"deleteContentForward":a(this,I)!==a(this,M)?u(this,T,J).call(this,a(this,I),a(this,M)-a(this,I),""):u(this,T,J).call(this,a(this,I),1,"");break}});h(this,ct,()=>{this.onBlur?.(a(this,_))});h(this,_t,t=>{t.preventDefault(),this.onWheel({deltaX:t.deltaX,deltaY:t.deltaY,ctrlKey:t.ctrlKey,x:t.clientX,y:t.clientY})});h(this,lt,t=>{t.key===" "&&(t.preventDefault(),u(this,T,Lt).call(this),u(this,T,J).call(this,a(this,I),a(this,M)-a(this,I)," "))});h(this,Rt,()=>{a(this,He)||a(this,We)||An(this.$el,a(this,de))});h(this,pt,()=>{p(this,We,!0)});h(this,mt,()=>{p(this,We,!1),p(this,_,this.$el.textContent||""),this.onInput?.(a(this,_))});this.$el=t,this.onInput=e,this.onBlur=n,this.onWheel=o,p(this,je,s.inheritedPatterns??[]),p(this,it,s),u(this,T,Ln).call(this)}static create(t,e={},n={}){if(this.instances.has(t))return this.instances.get(t);let o=new Ue(t,e,n);return Ue.instances.set(t,o),o}get content(){return a(this,_)}get cursor(){return{start:a(this,I),end:a(this,M)}}on(t,e,n=!1){this.$el.addEventListener(t,e,n);let o={eventName:t,callback:e,options:n};return a(this,ae).push(o),()=>{this.$el.removeEventListener(t,e,n);let s=a(this,ae).indexOf(o);s!==-1&&a(this,ae).splice(s,1)}}onMatch(t,e,{exact:n=!0,startsWith:o=!1,endsWith:s=!1}={}){let i=t instanceof RegExp,d={trigger:i?t:t?.trim?.(),regex:i,exact:n,startsWith:o,endsWith:s,callback:e};return a(this,Q).push(d),()=>{let c=a(this,Q).indexOf(d);c!==-1&&a(this,Q).splice(c,1)}}reset(){p(this,_,a(this,Be).content),p(this,de,a(this,Be).start),this.onInput?.(a(this,_))}destroy(){if(!a(this,He)){p(this,He,!0),a(this,Fe)?.disconnect(),this.$el.removeEventListener("paste",a(this,at)),this.$el.removeEventListener("beforeinput",a(this,dt)),this.$el.removeEventListener("blur",a(this,ct)),this.$el.removeEventListener("compositionstart",a(this,pt)),this.$el.removeEventListener("compositionend",a(this,mt)),this.$el.removeEventListener("keydown",a(this,lt)),a(this,ce)&&(document.removeEventListener("wheel",a(this,ce),{passive:!1,capture:!0}),p(this,ce,null));for(let{eventName:t,callback:e,options:n}of a(this,ae))this.$el.removeEventListener(t,e,n);p(this,ae,[]),p(this,Q,[]),Ue.instances.delete(this.$el),a(this,it).onDestroy?.(this)}}};Q=new WeakMap,je=new WeakMap,ae=new WeakMap,it=new WeakMap,_=new WeakMap,I=new WeakMap,M=new WeakMap,de=new WeakMap,Be=new WeakMap,He=new WeakMap,Fe=new WeakMap,We=new WeakMap,ce=new WeakMap,T=new WeakSet,Ln=function(){p(this,_,this.$el.textContent||"");let{start:t,end:e}=Jt(this.$el);p(this,I,t),p(this,M,e),p(this,de,t),p(this,Be,{content:a(this,_),start:t,end:e}),this.$el.addEventListener("paste",a(this,at)),this.$el.addEventListener("beforeinput",a(this,dt)),this.$el.addEventListener("blur",a(this,ct)),this.$el.addEventListener("compositionstart",a(this,pt)),this.$el.addEventListener("compositionend",a(this,mt)),this.$el.tagName==="BUTTON"&&this.$el.addEventListener("keydown",a(this,lt)),p(this,Fe,new MutationObserver(a(this,Rt))),a(this,Fe).observe(this.$el,ys),this.onWheel&&(p(this,ce,a(this,_t)),document.addEventListener("wheel",a(this,ce),{passive:!1,capture:!0}))},Lt=function(){let{start:t,end:e}=Jt(this.$el);p(this,I,t),p(this,M,e)},at=new WeakMap,dt=new WeakMap,ct=new WeakMap,_t=new WeakMap,lt=new WeakMap,Rt=new WeakMap,pt=new WeakMap,mt=new WeakMap,J=function(t,e,n){p(this,_,On(a(this,_),t,e,n)),p(this,de,t+n.length);let o=a(this,je).length?[...a(this,Q),...a(this,je)]:a(this,Q),s=Tn(a(this,_),a(this,de),o);for(let i of s)i.pattern.callback({word:i.word,trigger:i.match,start:i.start,end:i.end,query:i.query,match:i.regexMatch});this.onInput?.(a(this,_))},x(Ue,"instances",new WeakMap);var le=Ue;var ve,pe,xe,Ye=class extends se{constructor(){super(...arguments);h(this,ve,[]);h(this,pe,[]);h(this,xe,new Set)}actions(){return{create:(e,n={})=>{try{if(!(e instanceof HTMLElement))throw new Error("ContentEditor.create: $el must be an HTMLElement");e.isContentEditable||(e.contentEditable="true");let o=le.create(e,n,{inheritedPatterns:a(this,ve),onDestroy:s=>{for(let{eventName:i,callback:d,options:c}of a(this,pe))s.$el.removeEventListener(i,d,c);a(this,xe).delete(s),le.instances.delete(e)}});for(let{eventName:s,callback:i,options:d}of a(this,pe))e.addEventListener(s,i,d);return a(this,xe).add(o),o}catch(o){return console.error(o),null}},getTarget:e=>le.instances.get(e),onMatch:(e,n,o={})=>{let s=e instanceof RegExp,i={trigger:s?e:e?.trim?.(),regex:s,exact:o.exact??!0,startsWith:o.startsWith??!1,endsWith:o.endsWith??!1,callback:n};return a(this,ve).push(i),()=>{let d=a(this,ve).indexOf(i);d!==-1&&a(this,ve).splice(d,1)}},on:(e,n,o=!1)=>{let s={eventName:e,callback:n,options:o};a(this,pe).push(s);for(let i of a(this,xe))i.$el.addEventListener(e,n,o);return()=>{let i=a(this,pe).indexOf(s);i!==-1&&a(this,pe).splice(i,1);for(let d of a(this,xe))d.$el.removeEventListener(e,n,o)}},reset:e=>le.instances.get(e)?.reset(),destroy:e=>le.instances.get(e)?.destroy()}}};ve=new WeakMap,pe=new WeakMap,xe=new WeakMap,x(Ye,"manifest",{name:"Content Editor",namespace:"contentEditor",version:"1.0.0",description:"Content editor extension"});var bs={[Ct]:At,[At]:Ct,[Le]:Le};function _n(r,t){return t===void 0?Ct:r===void 0?At:Le}function Rn(r,t,e,n,o){return _e(r,{global:()=>({path:Te,method:t,operation:_n(e,n),from:n,to:e}),path:s=>{let i={path:s.path,method:t,operation:_n(e,n),from:n,to:e};return o&&(i.query=o),i}})}var ws=new Set(["push","unshift","splice","removeMatch"]);function $n(r){let{address:t,path:e,method:n,from:o,to:s,operation:i}=r;return ws.has(n)?Ss(r):{address:t,path:e,method:n,to:o,from:s,operation:vs(i)}}function Ss(r){let{address:t,path:e,method:n,from:o,to:s}=r;if(n==="push"||n==="unshift")return{address:t,path:e,method:"removeMatch",operation:Le,to:s};let[i,,...d]=s,c=o||[];return{address:t,path:e,method:"splice",operation:Le,to:[i,d.length,...c],from:d}}function vs(r){return bs[r]}function $t(r,t){let e=null,n=0;return typeof r=="function"?(e=r,typeof t=="number"&&(n=t)):typeof r=="number"&&(n=r),(...o)=>new Promise((s,i)=>{setTimeout(()=>{try{let d=e?e(...o):void 0;s(d)}catch(d){i(d)}},n)})}var xs=Object.defineProperty,H=(r,t)=>xs(r,"name",{value:t,configurable:!0}),Xe,me=(Xe=class{constructor(t=""){this.isMarker=!0,this.description=t}},H(Xe,"Marker"),Xe),Mt,k,Ge,Ie,C,ue,K,F,he,W,Pn,Pt,Dn,ut,Mn=(Mt=class extends Re{constructor(){super(...arguments);h(this,W);h(this,k,[]);h(this,Ge,!1);h(this,Ie,new Set);h(this,C,0);h(this,ue,!1);h(this,K,new Map);h(this,F,!0);h(this,he,!1);x(this,"onUndoRedo",null);h(this,Pt,$t(()=>{u(this,W,ut).call(this),p(this,he,!1)}));x(this,"undo",$t(t=>{if(!this.onUndoRedo)throw new Error("Undo/redo handler is required for undo operation");if(u(this,W,ut).call(this),a(this,C)<=0)return!1;if(p(this,F,!1),!(a(this,k)[a(this,C)]instanceof me))return console.warn("Expected to be at a marker for undo operation"),!1;let e=new Set,n=a(this,C)-1;for(;n>0;){let o=a(this,k)[n];if(o instanceof me)break;e.add($n(o)),n--}return p(this,C,n),this.onUndoRedo(Array.from(e)),t&&typeof t=="function"&&t(),p(this,F,!0),!0}));x(this,"redo",$t(t=>{if(!this.onUndoRedo)throw new Error("Undo/redo handler is required for redo operation");if(a(this,C)>=a(this,k).length-1)return!1;if(p(this,F,!1),!(a(this,k)[a(this,C)]instanceof me))return console.warn("Expected to be at a marker for redo operation"),!1;let e=new Set;for(Wt(this,C)._++;a(this,C)<a(this,k).length;){let n=a(this,k)[a(this,C)];if(n instanceof me)break;e.add(n),Wt(this,C)._++}return this.onUndoRedo(e),t&&typeof t=="function"&&t(),p(this,F,!0),!0}))}initialize(t){this.onUndoRedo=e=>t.apply(e)}actions(t){return{undo:H(e=>this.undo(e),"undo"),redo:H(e=>this.redo(e),"redo"),canUndo:H(()=>this.canUndo(),"canUndo"),canRedo:H(()=>this.canRedo(),"canRedo"),group:H(e=>this.group(e),"group"),commit:H(e=>this.commit(e),"commit"),onCommit:H(e=>this.onCommit(e),"onCommit"),addMarker:H(e=>this.addMarker(e),"addMarker"),size:H(()=>this.size(),"size"),start:H(()=>u(this,W,Pn).call(this),"start")}}onStateChange(t,e,n){if(!a(this,Ge)||!a(this,F)||e.method==="apply")return;let o=a(this,K).get(t.address),s=o?{...e,from:o.from}:e;a(this,K).set(t.address,s),!n&&!a(this,ue)&&u(this,W,Dn).call(this)}addMarker(t=""){u(this,W,ut).call(this,t),p(this,C,a(this,k).length-1)}canUndo(){return a(this,C)>0}canRedo(){return a(this,C)<a(this,k).length-1}size(){return a(this,k).length}group(t){return p(this,ue,!0),typeof t=="function"?(t(this),this.commit()):()=>this.commit()}commit(t=""){return u(this,W,ut).call(this,t),p(this,ue,!1),this}pause(){p(this,F,!1)}resume(){p(this,F,!0)}onCommit(t){return a(this,Ie).add(t),()=>{a(this,Ie).delete(t)}}reset(){p(this,k,[new me("History Start")]),p(this,Ie,new Set),p(this,C,0),p(this,ue,!1),p(this,K,new Map),p(this,F,!0),p(this,he,!1),p(this,Ge,!1),this.onUndoRedo=null}},k=new WeakMap,Ge=new WeakMap,Ie=new WeakMap,C=new WeakMap,ue=new WeakMap,K=new WeakMap,F=new WeakMap,he=new WeakMap,W=new WeakSet,Pn=function(){p(this,k,[new me("History Start")]),p(this,C,0),p(this,Ge,!0),a(this,K).clear(),p(this,ue,!1),p(this,he,!1)},Pt=new WeakMap,Dn=function(){a(this,he)||(p(this,he,!0),a(this,Pt).call(this))},ut=function(t=""){if(a(this,K).size===0)return;a(this,C)<a(this,k).length-1&&a(this,k).splice(a(this,C)+1);let e=Array.from(a(this,K).values());for(a(this,k).push(...e),a(this,Ie).forEach(n=>n(e)),a(this,k)[a(this,k).length-1]instanceof me||a(this,k).push(new me(t||Date.now().toString()));a(this,k).length>this.options.maxSize;)a(this,k).shift();a(this,K).clear(),p(this,C,a(this,k).length-1)},x(Mt,"name","history"),x(Mt,"options",{maxSize:100}),Mt);var Is=Object.defineProperty,ht=(r,t)=>Is(r,"name",{value:t,configurable:!0}),Qt,fe,Z,Ve,ke,ft,R,Un,jn,Zt,Dt,Bn,zn=(Qt=class extends Re{constructor(t={}){super(t);h(this,R);h(this,fe,new Set);h(this,Z,new Map);h(this,Ve,!1);h(this,ke,!1);h(this,ft,0);p(this,ft,t.debounce??0)}actions(){return{addListener:ht(t=>{if(typeof t=="function")return u(this,R,Zt).call(this,t)},"addListener"),subscribe:ht(t=>{if(typeof t=="function")return u(this,R,Zt).call(this,t)},"subscribe"),unsubscribe:ht(t=>{if(typeof t=="function")return u(this,R,Dt).call(this,t)},"unsubscribe"),removeListener:ht(t=>u(this,R,Dt).call(this,t),"removeListener"),clear:ht(()=>u(this,R,Bn).call(this),"clear")}}onStateChange(t,e){!a(this,ke)||e.method==="apply"||u(this,R,Un).call(this,t,e)}},fe=new WeakMap,Z=new WeakMap,Ve=new WeakMap,ke=new WeakMap,ft=new WeakMap,R=new WeakSet,Un=function(t,e){a(this,Z).has(t.address)&&a(this,Z).delete(t.address),a(this,Z).set(t.address,e),u(this,R,jn).call(this)},jn=function(){if(!a(this,Ve)){p(this,Ve,!0);try{setTimeout(()=>{let t=Array.from(a(this,Z).values());a(this,Z).clear();for(let e of a(this,fe))try{e(t)}catch(n){console.error("Error in onChange listener:",n)}p(this,Ve,!1)},a(this,ft))}catch(t){console.error(t)}}},Zt=function(t){return a(this,fe).add(t),p(this,ke,!0),()=>u(this,R,Dt).call(this,t)},Dt=function(t){typeof t=="function"&&(a(this,fe).delete(t),a(this,fe).size===0&&p(this,ke,!1))},Bn=function(){a(this,fe).clear(),a(this,Z).clear(),p(this,ke,!1)},x(Qt,"name","onChange"),Qt);var qe=[null,null,(r,t)=>r?.[t[0]]?.[t[1]],(r,t)=>r?.[t[0]]?.[t[1]]?.[t[2]],(r,t)=>r?.[t[0]]?.[t[1]]?.[t[2]]?.[t[3]],(r,t)=>r?.[t[0]]?.[t[1]]?.[t[2]]?.[t[3]]?.[t[4]],(r,t)=>r?.[t[0]]?.[t[1]]?.[t[2]]?.[t[3]]?.[t[4]]?.[t[5]],(r,t)=>r?.[t[0]]?.[t[1]]?.[t[2]]?.[t[3]]?.[t[4]]?.[t[5]]?.[t[6]],(r,t)=>r?.[t[0]]?.[t[1]]?.[t[2]]?.[t[3]]?.[t[4]]?.[t[5]]?.[t[6]]?.[t[7]]];function ks(r){let e="obj"+Array.from({length:r},(o,s)=>`?.[path[${s}]]`).join(""),n=new Function("obj","path",`return ${e}`);return qe[r]=n,n}function Hn(r,t){let e=t.length;return e===0?r:e===1?r[t[0]]:e<qe.length&&qe[e]||qe[e]?qe[e](r,t):ks(e)(r,t)}var Es=typeof window<"u"&&typeof window.document<"u",Cs=typeof process<"u"&&process.versions?.node,gt=0,zt="entry",en="tombstone",E,O,z,Y,ee,U,Ee,Ce,te,Ae,ne,Oe,g,Fn,Wn,tn,nn,sn,yt,Yn,on,Xn,Gn,Vn,rn,an,Ut,qn,dn,jt,Kn,Ke=class Ke extends Re{constructor(){super(...arguments);h(this,g);h(this,E,new Map);h(this,O,new Map);h(this,z,new Set);h(this,Y,[]);h(this,ee,!1);h(this,U,!1);h(this,Ee,null);h(this,Ce);h(this,te,new Set);h(this,Ae,!1);h(this,ne,new Set);h(this,Oe,!1);x(this,"onTombstoneConflict",null)}initialize(e,n){p(this,ee,!1),p(this,Ee,n.actorId??n.userId??null),p(this,Ce,Date.now())}get batchSize(){return this.options.batchSize}actions(){return{addChangeListener:e=>this.addChangeListener(e),removeChangeListener:e=>this.removeChangeListener(e),addLedgerListener:e=>this.addLedgerListener(e),removeLedgerListener:e=>this.removeLedgerListener(e),kill:(...e)=>this.kill(e),resurrect:(...e)=>this.resurrect(e),snapshot:()=>this.snapshot(),hydrate:e=>this.hydrate(e),merge:e=>this.merge(e),apply:e=>this.apply(e),getStats:()=>this.getStats()}}onStateChange(e,n){a(this,U)||(_e(e,{global:o=>a(this,Y).push({marker:o,change:n}),path:o=>a(this,Y).push({marker:o,change:n}),ephemeral:()=>{}}),u(this,g,rn).call(this))}addChangeListener(e){return a(this,te).add(e),a(this,te).size>0&&p(this,Ae,!0),()=>this.removeChangeListener(e)}removeChangeListener(e){a(this,te).delete(e),a(this,te).size===0&&p(this,Ae,!1)}addLedgerListener(e){return a(this,ne).add(e),a(this,ne).size>0&&p(this,Oe,!0),()=>this.removeLedgerListener(e)}removeLedgerListener(e){a(this,ne).delete(e),a(this,ne).size===0&&p(this,Oe,!1)}getEntry(e){return a(this,E).get(Yt(e))}getTombstone(e){return a(this,O).get(Yt(e))}snapshot(){return{state:this.state.get(),ledger:Object.fromEntries(a(this,E)),tombstones:Object.fromEntries(a(this,O))}}hydrate({state:e,ledger:n={},tombstones:o={}}={}){p(this,U,!0);try{p(this,Y,[]),e!==void 0&&this.state.load(e),p(this,E,u(this,g,yt).call(this,n)),p(this,O,u(this,g,yt).call(this,o)),u(this,g,Xn).call(this),u(this,g,Ut).call(this),p(this,Y,[])}finally{p(this,U,!1)}return this}apply(e){if(!e?.length)return[];let n=[],o=[];p(this,U,!0);try{for(let s of e){let[i,d,c,l]=s;if(!(!d||!i)){if(i===en){a(this,O).set(d,l),a(this,z).add(d),u(this,g,sn).call(this,d),c&&o.push(c),n.push(s);continue}i!==zt||!l||u(this,g,on).call(this,d,l)&&(a(this,E).set(d,l),c&&o.push(c),n.push(s))}}o.length>0&&this.state.apply(o),u(this,g,Ut).call(this)}finally{p(this,U,!1)}return n.length>0&&u(this,g,jt).call(this,n),n}merge({state:e,ledger:n={},tombstones:o={}}={}){if(!e&&!n&&!o)return this.state;p(this,U,!0);try{for(let[s,i]of u(this,g,yt).call(this,n)){if(s===Te||Ot(s)===Te||!u(this,g,on).call(this,s,i))continue;a(this,E).set(s,i);let d=Ot(s),c=e?Hn(e,d):void 0;c!==void 0&&this.state.set(d,c)}for(let[s,i]of u(this,g,yt).call(this,o)){if(!u(this,g,Yn).call(this,s,i))continue;let d=Ot(s);this.state.remove(d),a(this,O).set(s,i),a(this,z).add(s)}u(this,g,Ut).call(this)}finally{p(this,U,!1)}return this.state}reset(){a(this,E).clear(),a(this,O).clear(),a(this,z).clear(),p(this,Y,[]),p(this,ee,!1),p(this,Ee,null),p(this,Ce,Date.now()),a(this,te).clear(),p(this,Ae,!1),a(this,ne).clear(),p(this,Oe,!1)}getStats(){return{entriesCount:a(this,E).size,tombstonesCount:a(this,O).size,tombstoneIndexCount:a(this,z).size,changeQueueCount:a(this,Y).length,isProcessing:a(this,ee),actorId:a(this,Ee),sessionEpoch:a(this,Ce),globalClock:gt}}kill(e){let n=Xt(e);return _e(n,{global:()=>{throw new Error("Cannot kill global state")},path:({path:o,address:s})=>{p(this,U,!0);try{let i=this.state.remove(o),d=u(this,g,Fn).call(this,s,i),c=Rn(n,"remove",void 0,i),l=[en,s,c,d];return u(this,g,dn).call(this,[l]),u(this,g,jt).call(this,[l]),i}finally{p(this,U,!1)}},error:o=>console.error(o)})}resurrect(e){try{let n=Xt(e),o=u(this,g,Wn).call(this,n.address);if(!o)throw new Error(`No tombstone found for path: ${n.path.join(".")}`);let s=JSON.parse(o.data);return this.state.set(n.path,s),s}catch(n){console.error(n);return}}};E=new WeakMap,O=new WeakMap,z=new WeakMap,Y=new WeakMap,ee=new WeakMap,U=new WeakMap,Ee=new WeakMap,Ce=new WeakMap,te=new WeakMap,Ae=new WeakMap,ne=new WeakMap,Oe=new WeakMap,g=new WeakSet,Fn=function(e,n){let o={data:JSON.stringify(n),timestamp:Date.now()};return a(this,O).set(e,o),a(this,z).add(e),u(this,g,sn).call(this,e),u(this,g,qn).call(this),o},Wn=function(e){let n=a(this,O).get(e);if(n)return a(this,O).delete(e),a(this,z).delete(e),n},tn=function(e,n){if(!e)return-1;if(!n)return 1;let[o,s,i,d]=e,[c,l,m,f]=n;return o!==c?o>c?1:-1:s!==l?s>l?1:-1:i!==m?i>m?1:-1:d!==f?String(d??"").localeCompare(String(f??"")):0},nn=function(e){if(a(this,z).has(e))return!0;let n=e.length;for(;n=e.lastIndexOf(".",n-1),n!==-1;)if(a(this,z).has(e.slice(0,n)))return!0;return!1},sn=function(e){let n=[];for(let[o]of a(this,E))(o===e||o.startsWith(e))&&n.push(o);for(let o of n)a(this,E).delete(o)},yt=function(e){return e?e instanceof Map?new Map(e):Array.isArray(e)?new Map(e):typeof e=="object"?new Map(Object.entries(e)):new Map:new Map},Yn=function(e,n){let o=a(this,E).get(e),s=a(this,O).get(e);return!!(!s&&!o||s&&n.timestamp>s.timestamp||o&&!s)},on=function(e,n){if(u(this,g,nn).call(this,e))return!1;let o=a(this,E).get(e);return u(this,g,tn).call(this,n,o)>0},Xn=function(){a(this,z).clear();for(let[e]of a(this,O))a(this,z).add(e)},Gn=function(e){Es&&"requestIdleCallback"in window?window.requestIdleCallback(e,{timeout:50}):Cs?setImmediate(e):setTimeout(e,0)},Vn=function(e){let n=!1;Promise.resolve().then(()=>{n||(n=!0,e())}),setTimeout(()=>{n||(n=!0,e())},0)},rn=function(){a(this,ee)||(p(this,ee,!0),u(this,g,Vn).call(this,()=>{let e=a(this,Y).splice(0,this.options.batchSize||Ke.options.batchSize),n=[],o=[];for(let{marker:s,change:i}of e)_e(s,{global:()=>{let d=u(this,g,an).call(this,s.address);n.push([zt,Te,i,d])},path:({path:d})=>{if(u(this,g,nn).call(this,s.address)){o.push(d);return}let c=u(this,g,an).call(this,s.address);n.push([zt,s.address,i,c])}});o.length>0&&u(this,g,Gn).call(this,()=>u(this,g,Kn).call(this,this.state,o)),u(this,g,dn).call(this,n),u(this,g,jt).call(this,n),p(this,ee,!1),a(this,Y).length>0&&u(this,g,rn).call(this)}))},an=function(e){let n=a(this,E).get(e);a(this,E).delete(e);let i=[(n?n[0]:0)+1,gt++,a(this,Ce),a(this,Ee)];if(a(this,E).set(e,i),a(this,E).size>this.options.maxSize){let d=a(this,E).size-this.options.maxSize,c=Array.from(a(this,E).entries()).sort((l,m)=>u(this,g,tn).call(this,l[1],m[1]));for(let l=0;l<d;l++)a(this,E).delete(c[l][0])}return i},Ut=function(){let e=-1;for(let n of a(this,E).values())n&&n[1]>e&&(e=n[1]);gt=gt>e?gt+1:e+1},qn=function(){let o=Date.now();for(let[s,{timestamp:i}]of a(this,O))(a(this,O).size>1e3||o-i>2592e6)&&a(this,O).delete(s)},dn=function(e){a(this,Ae)&&a(this,te).forEach(n=>n(e))},jt=function(e){a(this,Oe)&&a(this,ne).forEach(n=>n(e))},Kn=function(e,n){for(let o of n)try{e.remove(o)}catch(s){console.warn(`Tombstone cleanup failed for path ${o.join(".")}:`,s.message)}},x(Ke,"name","ledger"),x(Ke,"options",{actorId:null,userId:null,maxSize:1e4,batchSize:100}),x(Ke,"empty",{ledger:[],tombstones:[]});var bt=Ke;function Jn(){let r=window.innerWidth,t=window.innerHeight,n=document.body.style.transform||"",o={x:0,y:0},s=1;if(n){let i=n.match(/translate\(([^,]+),\s*([^)]+)\)/);i&&(o.x=parseFloat(i[1].replace("px",""))||0,o.y=parseFloat(i[2].replace("px",""))||0);let d=n.match(/scale\(([^)]+)\)/);d&&(s=parseFloat(d[1]))}return{scroll:o,scale:s,width:r,height:t}}var Qn=D("node",r=>({create:{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").',alias:"create",mcpName:"create_node",schema:[{type:"String",props:"Object?",parent:"String?"}],examples:[{args:{type:"button",parent:"app"},description:"Create a button element"},{args:{type:"nav",parent:"app"},description:"Create a nav element"},{args:{type:"frame",props:{frame:"iPhone SE",name:"Home"}},description:"Create an iPhone SE frame named Home"}],returns:"{ id: String, type: String }",handler:async t=>{let e=r("state"),{addNode:n}=await import("./addNode-2E5QNYOA.js"),o=e.ref(["nodes"]),{type:s,props:i,parent:d="app"}=t,c=n(o,s,i,d);if(c instanceof Error)throw c;if(s==="frame"){let m=(o.get(["app","children"])??[]).filter(f=>f!==c);if(m.length>0){let f=0;for(let S of m){let A=o.get([S,"bounds"]);A&&(f=Math.max(f,(A.x??0)+(A.width??0)))}let{updateBounds:b}=await import("./updateBounds-5M7YQRO3.js");b(o,c,{x:f+100,y:0})}}return{id:c,type:s}}},updateStyle:{description:'Update styles for a node. Optional breakpoint targets a variant: "@720" (responsive), ":hover" (pseudo-state), "&.is-active" (custom state).',mcpName:"update_style",schema:[{nodeId:"String",styles:"Object",breakpoint:"String?"}],examples:[{args:{nodeId:"nd_123",styles:{"background-color":"#2563eb",padding:"16px","border-radius":"8px"}},description:"Set background, padding, and border radius"},{args:{nodeId:"nd_123",styles:{"background-color":"#1d4ed8"},breakpoint:":hover"},description:"Set hover background"}],returns:"{ id: String, styles: Object }",handler:async t=>{let e=r("state"),{updateStyle:n}=await import("./updateStyle-JASLFXVX.js"),o=e.ref(["nodes"]),{nodeId:s,styles:i,breakpoint:d}=t,c=["display","position"].filter(b=>b in i),l={};d&&(d.startsWith(":")||d.startsWith("&")?l.interactionState=[d]:l.breakpoint=d);let m=n(o,s,{...i},l),f={id:s,styles:m};return c.length&&(f.warning=`Ignored ${c.join(", ")} \u2014 use node:setAutoLayout to change layout mode.`),f}},updateText:{description:"Set text content for a node. Use {{expression}} syntax for dynamic values.",mcpName:"update_text",schema:[{nodeId:"String",value:"String"}],examples:[{args:{nodeId:"nd_heading",value:"Welcome"},description:'Set static text to "Welcome"'},{args:{nodeId:"nd_label",value:"{{user.name}}"},description:"Set dynamic text with expression"}],returns:"{ id: String, textContent: Object }",handler:async t=>{let e=r("state"),{createTextContent:n}=await import("./createTextContent-4Z4YATBO.js"),o=e.ref(["nodes"]),{nodeId:s,value:i}=t,d=n({value:i});return o.set([s,"textContent"],d),{id:s,textContent:d}}},move:{description:"Move a node to be the last child of another node",mcpName:"move_node",schema:[{nodeId:"String",parentId:"String"}],examples:[{args:{nodeId:"nd_link",parentId:"nd_nav"},description:"Move link into nav"}],returns:"{ id: String, movedTo: String, success: Boolean }",handler:async t=>{let e=r("state"),{disconnectNode:n}=await import("./disconnectNode-2CLWVIQP.js"),{moveNodeToLastChildOf:o}=await import("./moveNodeToLastChildOf-OZ6F2NPU.js"),s=e.ref(["nodes"]),{nodeId:i,parentId:d}=t;n(s,i);let c=o(s,i,d);return{id:i,movedTo:d,success:c}}},remove:{description:"Remove a node and all its descendants from the scene graph",alias:"removeNode",mcpName:"remove_node",schema:[{nodeId:"String"}],examples:[{args:{nodeId:"nd_old_element"},description:"Remove an element"}],returns:"{ id: String, removed: Boolean, removedNodes: Object }",handler:async t=>{let e=r("state"),{removeNode:n}=await import("./removeNode-5HXQ63V3.js"),o=e.ref(["nodes"]),{nodeId:s}=t,[i,d]=n(o,s);return{id:i,removed:!0,removedNodes:d}}},setAutoLayout:{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.',alias:"setLayout",mcpName:"set_layout",schema:[{nodeId:"String",layout:"String"}],examples:[{args:{nodeId:"nd_container",layout:"flex"},description:"Enable flex auto-layout on a container"},{args:{nodeId:"nd_container",layout:"none"},description:"Disable auto-layout, reverting children to absolute positioning"}],returns:"{ id: String, layout: String, childrenUpdated: Number }",handler:async t=>{let e=r("state"),{setNodeLayout:n}=await import("./setNodeLayout-QNVAVAMX.js"),o=e.ref(["nodes"]),{nodeId:s,layout:i}=t;return n(o,s,i)}},setName:{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).",mcpName:"set_name",schema:[{nodeId:"String",name:"String"}],examples:[{args:{nodeId:"nd_123",name:"Hero Section"},description:"Name a section"}],returns:"{ id: String, name: String }",handler:async t=>{let n=r("state").ref(["nodes"]),{nodeId:o,name:s}=t;if(s===""){let{clearName:d}=await import("./clearName-HJ7ZTHBU.js");return d(n,o),{id:o,name:""}}let{setName:i}=await import("./setName-NKRZPBGG.js");return i(n,o,s),{id:o,name:s}}},clearName:{description:"Clear the display name from a node, reverting to its tag name.",schema:[{nodeId:"String"}],examples:[{args:{nodeId:"nd_123"},description:"Clear name back to default"}],returns:"{ id: String }",handler:async t=>{let e=r("state"),{clearName:n}=await import("./clearName-HJ7ZTHBU.js"),o=e.ref(["nodes"]),{nodeId:s}=t;return n(o,s),{id:s}}},addComponent:{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.",mcpName:"add_component",schema:[{nodeId:"String",name:"String?"}],examples:[{args:{nodeId:"nd_card",name:"Card"},description:"Convert a card node into a reusable component"}],returns:"{ instanceId: String, componentId: String, name: String }",handler:async t=>{let e=r("state"),{addComponent:n}=await import("./addComponent-Y2AQ2FGZ.js"),o=e.ref(["nodes"]),{nodeId:s,name:i=""}=t,d=n(o,s,i),c=o.get([d,"component"]);return{instanceId:d,componentId:c,name:i}}}}));var Zn=D("tree",r=>({create:{description:'Create a nested tree of nodes recursively (use for complex structures like mobile pages). For frames, parent MUST be "app".',alias:"createTree",schema:[{tree:"Object",parent:"String?"}],examples:[{args:{tree:{type:"frame",name:"Home",frame:"iPhone SE",bounds:{x:0,y:400},styles:{display:"flex","flex-direction":"column",overflow:"hidden"},children:[{type:"header",styles:{padding:"16px"},children:[{type:"h1",text:"App Name"}]},{type:"main",styles:{flex:"1"}},{type:"footer",styles:{padding:"16px"},text:"Footer"}]},parent:"app"},description:"Create mobile page with header, main, footer \u2014 frame is the flex container"}],returns:"{ rootId: String, createdIds: Array, treeMap: Object }",handler:async t=>{let e=r("state"),n=r("log"),{addNode:o}=await import("./addNode-2E5QNYOA.js"),{updateStyle:s}=await import("./updateStyle-JASLFXVX.js"),{setNodeLayout:i}=await import("./setNodeLayout-QNVAVAMX.js"),{normalizeLayoutContext:d}=await import("./normalizeLayoutContext-WRK6FVHM.js"),{createTextContent:c}=await import("./createTextContent-4Z4YATBO.js"),l=e.ref(["nodes"]),{tree:m,parent:f="app"}=t,b=[],S={},A=(ge,Bt)=>{let{type:wt,children:Ne,styles:Ht,style:Ft,text:St,ref:vt,bounds:xt,...y}=ge,w=o(l,wt,y,Bt);if(b.push(w),vt&&(S[vt]=w),wt==="frame"&&xt){let{x:$,y:It}=xt,kt=l.get([w,"bounds"])??{};l.set([w,"bounds"],{...kt,...$!=null?{x:$}:{},...It!=null?{y:It}:{}})}let L=y.name;L&&l.set([w,"name"],L);let N=Ht||Ft;N&&Object.keys(N).length>0&&s(l,w,{...N});let X=N?.display??l.get([w,"style","default","display"]),ye=X==="flex"||X==="grid";if(ye)try{i(l,w,X)}catch($){n.warn("setNodeLayout failed for parent",{id:w,error:$.message})}if(St&&!(Ne?.length>0)){let $=c({value:St});l.set([w,"textContent"],$)}return Ne&&Ne.length>0&&Ne.forEach($=>{if(ye){let kt=$.styles||$.style||{};kt.position!=="absolute"&&($={...$,styles:{width:"auto",height:"auto",top:"auto",left:"auto",...kt}})}let It=A($,w);ye&&d(l,It,w)}),w},P=A(m,f);return{id:P,rootId:P,createdIds:b,treeMap:S,type:"tree"}}}}));var es=D("behavior",r=>({addEvent:{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>.',mcpName:"add_event",schema:[{nodeId:"String",name:"String",binding:"String?",code:"String?",mode:"String?"}],examples:[{args:{nodeId:"nd_btn",name:"onClick",binding:"$store.default.increment"},description:"Call store action on click"},{args:{nodeId:"nd_btn",name:"onClick",code:`function (ctx, event) {
9
- ctx.$store.todo.items.push({ text: ctx.$store.todo.newTodo, done: false })
10
- ctx.$store.todo.newTodo = ""
11
- }`},description:"Add click handler with code"},{args:{nodeId:"nd_form",name:"onSubmit",code:`function (ctx, event) {
12
- event.preventDefault()
13
- }`},description:"Prevent default on form submit"}],returns:"{ id: String, name: String }",handler:async t=>{let e=r("state"),{addEvent:n}=await import("./addEvent-HOBNKM2F.js"),{updateEvent:o}=await import("./updateEvent-R52PL2G4.js"),{normalizeEventName:s}=await import("./normalizeEventName-SNBYJDUY.js"),i=e.ref(["nodes"]),{nodeId:d,name:c,binding:l,code:m,mode:f}=t,b=s(c);if((i.get([d,"events"])??[]).find(P=>P.name===b)||n(i,d,b),l!==void 0){let P=(i.get([d,"events"])??[]).find(ge=>ge.name===b)??{name:b};o(i,d,b,{...P,mode:"binding",binding:l.split("."),code:null})}else if(m!==void 0){let P=(i.get([d,"events"])??[]).find(ge=>ge.name===b)??{name:b};o(i,d,b,{...P,mode:f??"code",code:m,binding:null})}return{id:d,name:b}}},updateEvent:{description:"Update an existing event handler by name",schema:[{nodeId:"String",name:"String",event:"Object"}],examples:[{args:{nodeId:"nd_btn",name:"onClick",event:{mode:"code",code:'alert("hi")'}},description:"Update onClick handler"}],returns:"{ id: String, name: String }",handler:async t=>{let e=r("state"),{updateEvent:n}=await import("./updateEvent-R52PL2G4.js"),{normalizeEventName:o}=await import("./normalizeEventName-SNBYJDUY.js"),s=e.ref(["nodes"]),{nodeId:i,name:d,event:c}=t,l=o(d),m=c?.name!==void 0?{...c,name:o(c.name)}:{...c,name:l};return n(s,i,l,m),{id:i,name:l}}},removeEvent:{description:"Remove an event handler by name",schema:[{nodeId:"String",name:"String"}],examples:[{args:{nodeId:"nd_btn",name:"onClick"},description:"Remove onClick handler"}],returns:"{ id: String, name: String }",handler:async t=>{let e=r("state"),{removeEvent:n}=await import("./removeEvent-2YZ55HD6.js"),{normalizeEventName:o}=await import("./normalizeEventName-SNBYJDUY.js"),s=e.ref(["nodes"]),{nodeId:i,name:d}=t,c=o(d);return n(s,i,c),{id:i,name:c}}},updateRoute:{description:"Set the route path on a frame node for multi-page navigation",schema:[{nodeId:"String",route:"Any"}],examples:[{args:{nodeId:"nd_frame",route:"/about"},description:"Set route path"},{args:{nodeId:"nd_frame",route:{path:"/users/:id"}},description:"Set route with params"}],returns:"{ id: String, route: Object }",handler:async t=>{let e=r("state"),{updateRoute:n}=await import("./updateRoute-TFQFFFSZ.js"),o=e.ref(["nodes"]),{nodeId:s,route:i}=t,d=typeof i=="string"?{path:i}:i;return n(o,s,d),{id:s,route:d}}},setHomePage:{description:"Mark a frame as the home page (root route)",schema:[{nodeId:"String",isHomePage:"Any"}],examples:[{args:{nodeId:"nd_frame",isHomePage:!0},description:"Set as home page"}],returns:"{ id: String, isHomePage: Any }",handler:async t=>{let e=r("state"),{setHomePage:n}=await import("./setHomePage-O2JYOG6H.js"),o=e.ref(["nodes"]),{nodeId:s,isHomePage:i}=t;return n(o,s,i),{id:s,isHomePage:i}}},setDestination:{description:"Set a navigation destination on a link or button node",schema:[{nodeId:"String",destination:"Any"}],examples:[{args:{nodeId:"nd_link",destination:"/about"},description:"Navigate to /about on click"}],returns:"{ id: String, destination: Object }",handler:async t=>{let e=r("state"),{setDestination:n}=await import("./setDestination-NCPAVIIK.js"),o=e.ref(["nodes"]),{nodeId:s,destination:i}=t,d=typeof i=="string"?{path:i}:i;return n(o,s,d),{id:s,destination:d}}},clearDestination:{description:"Remove the navigation destination from a node",schema:[{nodeId:"String"}],examples:[{args:{nodeId:"nd_link"},description:"Clear navigation destination"}],returns:"{ id: String }",handler:async t=>{let e=r("state"),{clearDestination:n}=await import("./clearDestination-IGKNL7FN.js"),o=e.ref(["nodes"]),{nodeId:s}=t;return n(o,s),{id:s}}},setRepeat:{description:'Repeat a node for each item in a data binding (loop). binding is a dot-path on ctx (e.g. "$store.todo.items").',schema:[{nodeId:"String",binding:"String",as:"String?",index:"String?",key:"Any?",keyOn:"Any?"}],examples:[{args:{nodeId:"nd_card",binding:"$store.todo.items",as:"$item"},description:"Repeat card for each item in the todo store"}],returns:"{ id: String, binding: String }",handler:async t=>{let e=r("state"),{setRepeat:n}=await import("./setRepeat-WN4WZJUN.js"),o=e.ref(["nodes"]),{nodeId:s,binding:i,as:d,index:c,key:l,keyOn:m}=t,f=i.split(".");return n(o,s,{descriptor:{mode:"binding",binding:f},as:d,index:c,key:l,keyOn:m}),{id:s,binding:i}}},clearRepeat:{description:"Remove repeat binding from a node",schema:[{nodeId:"String"}],examples:[{args:{nodeId:"nd_card"},description:"Stop repeating"}],returns:"{ id: String }",handler:async t=>{let e=r("state"),{clearRepeat:n}=await import("./clearRepeat-7YFYZODP.js"),o=e.ref(["nodes"]),{nodeId:s}=t;return n(o,s),{id:s}}},setRender:{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.',schema:[{nodeId:"String",value:"String"}],examples:[{args:{nodeId:"nd_admin",value:"ctx.$store.user.isAdmin"},description:"Show only for admins"}],returns:"{ id: String, value: String }",handler:async t=>{let e=r("state"),{setRender:n}=await import("./setRender-7XMGQ7ZK.js"),o=e.ref(["nodes"]),{nodeId:s,value:i}=t,d=`function (ctx) {
14
- return ${i}
15
- }`;return n(o,s,{mode:"computed",computed:d}),{id:s,value:i}}},clearRender:{description:"Remove conditional rendering from a node (always show)",schema:[{nodeId:"String"}],examples:[{args:{nodeId:"nd_admin"},description:"Always render"}],returns:"{ id: String }",handler:async t=>{let e=r("state"),{clearRender:n}=await import("./clearRender-NPVDTNFA.js"),o=e.ref(["nodes"]),{nodeId:s}=t;return n(o,s),{id:s}}},addState:{description:'Register a custom state class on a node (e.g. "is-active"). Style it with updateStyle breakpoint "&.is-active".',schema:[{nodeId:"String",stateName:"String"}],examples:[{args:{nodeId:"nd_tab",stateName:"is-active"},description:"Add active state"}],returns:"{ id: String, stateName: String }",handler:async t=>{let e=r("state"),{addState:n}=await import("./addState-U2NWEGWV.js"),o=e.ref(["nodes"]),{nodeId:s,stateName:i}=t;return n(o,s,i),{id:s,stateName:i}}},updateState:{description:"Set the expression that controls when a state is active",schema:[{nodeId:"String",stateName:"String",expression:"String"}],examples:[{args:{nodeId:"nd_tab",stateName:"is-active",expression:'$router.currentRoute?.path === "/"'},description:"Activate on home route"}],returns:"{ id: String, stateName: String }",handler:async t=>{let e=r("state"),{updateState:n}=await import("./updateState-JCUSBQOL.js"),o=e.ref(["nodes"]),{nodeId:s,stateName:i,expression:d}=t;return n(o,s,i,{name:i,mode:"computed",computed:d??null}),{id:s,stateName:i}}},removeState:{description:"Remove a custom state from a node",schema:[{nodeId:"String",stateName:"String"}],examples:[{args:{nodeId:"nd_tab",stateName:"is-active"},description:"Remove active state"}],returns:"{ id: String, stateName: String }",handler:async t=>{let e=r("state"),{removeState:n}=await import("./removeState-SGJVQ66N.js"),o=e.ref(["nodes"]),{nodeId:s,stateName:i}=t;return n(o,s,i),{id:s,stateName:i}}},updateBounds:{description:"Update the position and size of a node",schema:[{nodeId:"String",bounds:"Object"}],examples:[{args:{nodeId:"nd_frame",bounds:{x:500,y:0,width:375,height:667}},description:"Position a frame"}],returns:"{ id: String, bounds: Object }",handler:async t=>{let e=r("state"),{updateBounds:n}=await import("./updateBounds-5M7YQRO3.js"),o=e.ref(["nodes"]),{nodeId:s,bounds:i}=t;return n(o,s,i),{id:s,bounds:i}}},setHtmlId:{description:"Set the HTML id attribute on a node",schema:[{nodeId:"String",id:"String"}],examples:[{args:{nodeId:"nd_section",id:"hero-section"},description:"Set HTML id for anchor links"}],returns:"{ id: String, htmlId: String }",handler:async t=>{let e=r("state"),{setHtmlId:n}=await import("./setHtmlId-2W7YW47O.js"),o=e.ref(["nodes"]),{nodeId:s,id:i}=t;return n(o,s,i),{id:s,htmlId:i}}},addAttribute:{description:"Add a custom HTML attribute to a node",schema:[{nodeId:"String",name:"String",value:"Any?",mode:"String?"}],examples:[{args:{nodeId:"nd_img",name:"src",value:"/hero.png"},description:"Set image source"},{args:{nodeId:"nd_img",name:"alt",value:"Hero image"},description:"Set alt text"}],returns:"{ id: String, name: String }",handler:async t=>{let e=r("state"),{addAttribute:n}=await import("./addAttribute-2MZ3OFUE.js"),o=e.ref(["nodes"]),{nodeId:s,name:i,value:d,mode:c}=t;return n(o,s,{name:i,value:d,mode:c}),{id:s,name:i}}},updateAttribute:{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.',schema:[{nodeId:"String",name:"String",mode:"String?",value:"Any?",binding:"Any?",computed:"String?",code:"String?"}],examples:[{args:{nodeId:"nd_img",name:"src",value:"/new-hero.png"},description:"Change image source"},{args:{nodeId:"nd_email",name:"model",mode:"binding",binding:"$store.form.email"},description:"Two-way bind input to store"}],returns:"{ id: String, name: String }",handler:async t=>{let e=r("state"),{updateAttribute:n}=await import("./updateAttribute-XXZL2P43.js"),o=e.ref(["nodes"]),{nodeId:s,...i}=t;return typeof i.binding=="string"&&(i.binding=i.binding.split(".")),i.name==="model"&&i.mode==null&&(i.mode="binding"),n(o,s,i.name,i),{id:s,name:i.name}}},removeAttribute:{description:"Remove an attribute by name",schema:[{nodeId:"String",name:"String"}],examples:[{args:{nodeId:"nd_img",name:"src"},description:"Remove src attribute"}],returns:"{ id: String, name: String }",handler:async t=>{let e=r("state"),{removeAttribute:n}=await import("./removeAttribute-DCKZLM55.js"),o=e.ref(["nodes"]),{nodeId:s,name:i}=t;return n(o,s,i),{id:s,name:i}}},addLifecycleHook:{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.',schema:[{nodeId:"String",key:"String",code:"String?",binding:"String?"}],examples:[{args:{nodeId:"nd_page",key:"mount",code:'console.log("mounted")'},description:"Run code on mount"},{args:{nodeId:"nd_page",key:"mount",binding:"cart.load"},description:"Call a store action on mount"}],returns:"{ id: String, key: String }",handler:async t=>{let e=r("state"),{addLifecycleHook:n}=await import("./addLifecycleHook-GHYL7FRH.js"),{updateLifecycleHook:o}=await import("./updateLifecycleHook-4RA2U4TR.js"),s=e.ref(["nodes"]),{nodeId:i,key:d,code:c,binding:l}=t;return n(s,i,d),(c!==void 0||l!==void 0)&&o(s,i,d,{key:d,mode:c!==void 0?"code":"binding",code:c??"",binding:l??null}),{id:i,key:d}}},updateLifecycleHook:{description:"Update a lifecycle hook by key. hook may include key, mode, code, binding.",schema:[{nodeId:"String",key:"String",hook:"Object"}],returns:"{ id: String, key: String }",handler:async t=>{let e=r("state"),{updateLifecycleHook:n}=await import("./updateLifecycleHook-4RA2U4TR.js"),o=e.ref(["nodes"]),{nodeId:s,key:i,hook:d}=t,c=(o.get([s,"lifecycle"])??[]).find(l=>l.key===i)??{key:i};return n(o,s,i,{...c,...d}),{id:s,key:i}}},removeLifecycleHook:{description:"Remove a lifecycle hook by key.",schema:[{nodeId:"String",key:"String"}],returns:"{ id: String, key: String }",handler:async t=>{let e=r("state"),{removeLifecycleHook:n}=await import("./removeLifecycleHook-SBPJNF5P.js");return n(e.ref(["nodes"]),t.nodeId,t.key),{id:t.nodeId,key:t.key}}},addOption:{description:"Add a static option to a select node.",schema:[{nodeId:"String",value:"String",label:"String?"}],examples:[{args:{nodeId:"nd_select",value:"us",label:"United States"},description:"Add a select option"}],returns:"{ id: String, value: String }",handler:async t=>{let e=r("state"),{addOption:n}=await import("./addOption-PVXGN7AJ.js"),o=e.ref(["nodes"]),{nodeId:s,value:i,label:d}=t;return n(o,s,{value:i,label:d??i}),{id:s,value:i}}},updateOption:{description:"Update a select option by its current value. Pass the old value to look up, and optionally a new value/label.",schema:[{nodeId:"String",value:"String",newValue:"String?",label:"String?"}],returns:"{ id: String, value: String }",handler:async t=>{let e=r("state"),{updateOption:n}=await import("./updateOption-5U23ZUWV.js"),o=e.ref(["nodes"]),{nodeId:s,value:i,newValue:d,label:c}=t,l=d??i;return n(o,s,i,{value:l,label:c??l}),{id:s,value:l}}},removeOption:{description:"Remove a select option by value.",schema:[{nodeId:"String",value:"String"}],returns:"{ id: String, value: String }",handler:async t=>{let e=r("state"),{removeOption:n}=await import("./removeOption-SYIFB4XW.js");return n(e.ref(["nodes"]),t.nodeId,t.value),{id:t.nodeId,value:t.value}}},setOptionsExpression:{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.",schema:[{nodeId:"String",binding:"String",valueKey:"String?",labelKey:"String?"}],examples:[{args:{nodeId:"nd_select",binding:"{{countries}}",valueKey:"code",labelKey:"name"},description:"Populate options from a store"}],returns:"{ id: String }",handler:async t=>{let e=r("state"),{setOptionsExpression:n}=await import("./setOptionsExpression-K5EQXJEY.js"),o=e.ref(["nodes"]),{nodeId:s,binding:i,valueKey:d,labelKey:c}=t;return n(o,s,{binding:i,valueKey:d,labelKey:c}),{id:s}}},clearOptionsExpression:{description:"Switch a select node back to its static options list.",schema:[{nodeId:"String"}],returns:"{ id: String }",handler:async t=>{let e=r("state"),{clearOptionsExpression:n}=await import("./clearOptionsExpression-NZQFL64E.js");return n(e.ref(["nodes"]),t.nodeId),{id:t.nodeId}}},setTagName:{description:"Change the HTML tag of an element node (e.g. div to section).",mcpName:"set_tag_name",schema:[{nodeId:"String",tagName:"String"}],examples:[{args:{nodeId:"nd_box",tagName:"section"},description:"Make a div semantic"}],returns:"{ id: String, tagName: String }",handler:async t=>{let e=r("state"),{setTagName:n}=await import("./setTagName-U6UJNJLE.js"),o=e.ref(["nodes"]),{nodeId:s,tagName:i}=t;return n(o,s,i),{id:s,tagName:i}}},updateHtml:{description:"Set the inner HTML of a template node (raw HTML embed).",schema:[{nodeId:"String",html:"String"}],returns:"{ id: String }",handler:async t=>{let e=r("state"),{updateHtml:n}=await import("./updateHtml-YBJJSWQW.js");return n(e.ref(["nodes"]),t.nodeId,t.html),{id:t.nodeId}}},addRouteParam:{description:"Add a route parameter to a frame route (e.g. an :id segment). Set key to name it; optional marks it optional.",schema:[{nodeId:"String",key:"String?",optional:"Boolean?"}],examples:[{args:{nodeId:"nd_frame",key:"id"},description:"Add an :id param to the route"}],returns:"{ id: String, index: Number }",handler:async t=>{let e=r("state"),{addParamToRoute:n}=await import("./addParamToRoute-VL2VOFZS.js"),o=e.ref(["nodes"]),{nodeId:s,key:i,optional:d}=t;n(o,s);let l=(o.get([s,"route","params"])??[]).length-1;return(i!==void 0||d!==void 0)&&o.set([s,"route","params",l],{key:i??null,optional:d??!1}),{id:s,index:l}}},removeRouteParam:{description:"Remove a route parameter from a frame route by index.",schema:[{nodeId:"String",index:"Number"}],returns:"{ id: String, index: Number }",handler:async t=>{let e=r("state"),{removeParamFromRoute:n}=await import("./removeParamFromRoute-HAYP3WTT.js");return n(e.ref(["nodes"]),t.nodeId,t.index),{id:t.nodeId,index:t.index}}}}));var ts=D("token",r=>({create:{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).',mcpName:"create_token",schema:[{path:"String",value:"String",type:"String?"}],examples:[{args:{path:"color/primary",value:"#3B82F6",type:"color"},description:"Create a primary color token"},{args:{path:"spacing/lg",value:"24px",type:"dimension"},description:"Create a spacing token"}],returns:"{ id: String, path: String }",handler:async t=>{let e=r("state"),{addToken:n}=await import("./addToken-XF2FFA52.js"),o=e.ref(["tokens"]),{path:s,value:i,type:d}=t;return{id:n(o,{$path:s,$value:i,...d!==void 0?{$type:d}:{}}),path:s}}},update:{description:"Update a design token. changes may include path, value, or type.",mcpName:"update_token",schema:[{tokenId:"String",changes:"Object"}],examples:[{args:{tokenId:"tk_abc",changes:{value:"#EF4444"}},description:"Change a token value"}],returns:"{ id: String }",handler:async t=>{let e=r("state"),{updateToken:n}=await import("./updateToken-24P2P2SF.js"),o=e.ref(["tokens"]),{tokenId:s,changes:i={}}=t,d={};return i.path!==void 0&&(d.$path=i.path),i.value!==void 0&&(d.$value=i.value),i.type!==void 0&&(d.$type=i.type),n(o,s,d),{id:s}}},delete:{description:"Delete a design token by id.",mcpName:"delete_token",schema:[{tokenId:"String"}],examples:[{args:{tokenId:"tk_abc"},description:"Delete a token"}],returns:"{ id: String }",handler:async t=>{let e=r("state"),{removeToken:n}=await import("./removeToken-AIDV7DUM.js"),o=e.ref(["tokens"]);return n(o,t.tokenId),{id:t.tokenId}}}}));function cn(r,t){if(r==null||typeof r!="string")return r;switch(t){case"number":return r===""?0:Number(r);case"boolean":return r==="true"||r==="1";case"array":case"object":if(!r||r==="")return t==="array"?[]:{};try{return JSON.parse(r)}catch{return t==="array"?[]:{}}default:return r}}function Je(r,{key:t,name:e,index:n}){let o=t??e;return o!==void 0?r.findIndex(s=>(s.key??s.name)===o):n??-1}var ns=D("store",r=>({create:{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.",alias:"createStore",mcpName:"create_store",schema:[{name:"String",state:"Array?",computed:"Array?",actions:"Array?"}],examples:[{args:{name:"todo",state:[{key:"newText",type:"string",value:""},{key:"items",type:"array",value:[]}],actions:[{name:"addTodo",code:'function () { const text = this.newText.trim(); if (!text) return; this.items = [...this.items, { text, done: false }]; this.newText = ""; }'}]},description:"Create a todo store with state and actions in one call"}],returns:"{ id: String }",handler:async t=>{let e=r("state"),{validateStorePayload:n}=await import("./validateStorePayload-HCBPC7HR.js"),{addStore:o}=await import("./addStore-AQMFKH33.js"),{createValue:s}=await import("./createValue-DXQSLOBG.js"),{createComputed:i}=await import("./createComputed-DMX7CJA3.js"),{createAction:d}=await import("./createAction-73YUTK3T.js");n(t);let c=e.ref(["stores"]),l=o(c,t.name);return t.state?.length&&c.set([l,"state"],t.state.map(m=>s({key:m.key,type:m.type,value:cn(m.value,m.type)}))),t.computed?.length&&c.set([l,"computed"],t.computed.map(m=>i({name:m.name,code:m.code}))),t.actions?.length&&c.set([l,"actions"],t.actions.map(m=>d({name:m.name,code:m.code}))),{id:l}}},remove:{description:"Remove a data store and everything in it.",alias:"removeStore",schema:[{storeId:"String"}],returns:"{ id: String }",handler:async t=>{let e=r("state"),{removeStore:n}=await import("./removeStore-YVBTGA3I.js");return n(e.ref(["stores"]),t.storeId),{id:t.storeId}}},addValue:{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.",mcpName:"add_store_value",schema:[{storeId:"String",key:"String?",type:"String?",value:"String?"}],examples:[{args:{storeId:"cart",key:"items",type:"array",value:"[]"},description:"Add an items array to the cart store"}],returns:"{ storeId: String, key: String, index: Number }",handler:async t=>{let e=r("state"),{addValue:n}=await import("./addValue-O7YXXMST.js"),{updateValue:o}=await import("./updateValue-TSVJM3PO.js"),s=e.ref(["stores"]),{storeId:i,key:d,type:c,value:l}=t;n(s,i,c);let m=s.get([i,"state"])??[],f=0,b=m[f];if(d!==void 0||l!==void 0){let S=c??b.type;o(s,i,f,{key:d??b.key,type:S,value:cn(l??b.value,S)})}return{storeId:i,key:d??b.key,index:f}}},updateValue:{description:"Update a store value by key (or index). changes may include key, type, value.",schema:[{storeId:"String",key:"String?",index:"Number?",changes:"Object"}],examples:[{args:{storeId:"cart",key:"items",changes:{value:'[{"id":1}]'}},description:"Set the items value"}],returns:"{ storeId: String, index: Number }",handler:async t=>{let e=r("state"),{updateValue:n}=await import("./updateValue-TSVJM3PO.js"),o=e.ref(["stores"]),{storeId:s,changes:i={}}=t,d=o.get([s,"state"])??[],c=Je(d,t);if(c<0)throw new Error(`store value not found: ${t.key??t.index} in ${s}`);let l={...d[c],...i};return i.value!==void 0&&(l.value=cn(l.value,l.type)),n(o,s,c,l),{storeId:s,index:c}}},removeValue:{description:"Remove a store value by key (or index).",schema:[{storeId:"String",key:"String?",index:"Number?"}],returns:"{ storeId: String, index: Number }",handler:async t=>{let e=r("state"),{removeValue:n}=await import("./removeValue-UP5ZFN3U.js"),o=e.ref(["stores"]),s=o.get([t.storeId,"state"])??[],i=Je(s,t);if(i<0)throw new Error(`store value not found: ${t.key??t.index} in ${t.storeId}`);return n(o,t.storeId,i),{storeId:t.storeId,index:i}}},addComputed:{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).",schema:[{storeId:"String",name:"String?",code:"String?"}],examples:[{args:{storeId:"cart",name:"total",code:"function () { return this.items.reduce((s, i) => s + i.price, 0); }"},description:"Add a cart total computed"}],returns:"{ storeId: String, name: String, index: Number }",handler:async t=>{let e=r("state"),{addComputed:n}=await import("./addComputed-7JLBFD6I.js"),{updateComputed:o}=await import("./updateComputed-7QA6XZIC.js"),s=e.ref(["stores"]),{storeId:i,name:d,code:c}=t;n(s,i);let l=s.get([i,"computed"])??[],m=0,f=l[m];return(d!==void 0||c!==void 0)&&o(s,i,m,{name:d??f.name,code:c??f.code}),{storeId:i,name:d??f.name,index:m}}},updateComputed:{description:"Update a store computed property by name (or index). changes may include name, code.",schema:[{storeId:"String",name:"String?",index:"Number?",changes:"Object"}],returns:"{ storeId: String, index: Number }",handler:async t=>{let e=r("state"),{updateComputed:n}=await import("./updateComputed-7QA6XZIC.js"),o=e.ref(["stores"]),{storeId:s,changes:i={}}=t,d=o.get([s,"computed"])??[],c=Je(d,t);if(c<0)throw new Error(`store computed not found: ${t.name??t.index} in ${s}`);return n(o,s,c,{...d[c],...i}),{storeId:s,index:c}}},removeComputed:{description:"Remove a store computed property by name (or index).",schema:[{storeId:"String",name:"String?",index:"Number?"}],returns:"{ storeId: String, index: Number }",handler:async t=>{let e=r("state"),{removeComputed:n}=await import("./removeComputed-WSA5GNVZ.js"),o=e.ref(["stores"]),s=o.get([t.storeId,"computed"])??[],i=Je(s,t);if(i<0)throw new Error(`store computed not found: ${t.name??t.index} in ${t.storeId}`);return n(o,t.storeId,i),{storeId:t.storeId,index:i}}},addAction:{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).",schema:[{storeId:"String",name:"String?",code:"String?"}],examples:[{args:{storeId:"cart",name:"clear",code:"function () { this.items = []; }"},description:"Add a clear-cart action"}],returns:"{ storeId: String, name: String, index: Number }",handler:async t=>{let e=r("state"),{addAction:n}=await import("./addAction-EGLGEGTS.js"),{updateAction:o}=await import("./updateAction-3KSR6ZIJ.js"),s=e.ref(["stores"]),{storeId:i,name:d,code:c}=t;n(s,i);let l=s.get([i,"actions"])??[],m=0,f=l[m];return(d!==void 0||c!==void 0)&&o(s,i,m,{name:d??f.name,code:c??f.code}),{storeId:i,name:d??f.name,index:m}}},updateAction:{description:"Update a store action by name (or index). changes may include name, code.",schema:[{storeId:"String",name:"String?",index:"Number?",changes:"Object"}],returns:"{ storeId: String, index: Number }",handler:async t=>{let e=r("state"),{updateAction:n}=await import("./updateAction-3KSR6ZIJ.js"),o=e.ref(["stores"]),{storeId:s,changes:i={}}=t,d=o.get([s,"actions"])??[],c=Je(d,t);if(c<0)throw new Error(`store action not found: ${t.name??t.index} in ${s}`);return n(o,s,c,{...d[c],...i}),{storeId:s,index:c}}},removeAction:{description:"Remove a store action by name (or index).",schema:[{storeId:"String",name:"String?",index:"Number?"}],returns:"{ storeId: String, index: Number }",handler:async t=>{let e=r("state"),{removeAction:n}=await import("./removeAction-T4M5EJN7.js"),o=e.ref(["stores"]),s=o.get([t.storeId,"actions"])??[],i=Je(s,t);if(i<0)throw new Error(`store action not found: ${t.name??t.index} in ${t.storeId}`);return n(o,t.storeId,i),{storeId:t.storeId,index:i}}}}));var ss=D("animation",r=>({create:{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.',mcpName:"create_animation",schema:[{name:"String",keyframes:"Array",duration:"Number?",easing:"String?",iterations:"Number?",fill:"String?",scope:"String?"}],examples:[{args:{name:"Fade In",keyframes:[{opacity:0},{opacity:1}],duration:400,easing:"ease-out",scope:"project"},description:"Create a reusable fade-in animation"}],returns:"{ id: String, name: String }",handler:async t=>{let e=r("state"),{createAnimation:n}=await import("./createAnimation-2WQSMYT5.js"),{createAnimationId:o}=await import("./id-ZIAZZ5AS.js"),s=e.ref(["animations"]),{name:i,keyframes:d,duration:c,easing:l,iterations:m,fill:f,scope:b}=t,S=o();return s.set([S],n({name:i,keyframes:d,duration:c,easing:l,iterations:m,fill:f,scope:b??"project"})),{id:S,name:i}}},update:{description:"Update an animation asset. changes may include name, keyframes, duration, easing, iterations, fill, direction, delay.",schema:[{animationId:"String",changes:"Object"}],examples:[{args:{animationId:"anim_abc",changes:{duration:600}},description:"Slow an animation down"}],returns:"{ id: String }",handler:async t=>{let n=r("state").ref(["animations"]),{animationId:o,changes:s={}}=t;if(!n.get([o]))throw new Error(`animation not found: ${o}`);for(let[d,c]of Object.entries(s))n.set([o,d],c);return{id:o}}},delete:{description:"Delete an animation asset by id. Does not remove bindings that reference it.",schema:[{animationId:"String"}],returns:"{ id: String }",handler:async t=>(r("state").ref(["animations"]).remove([t.animationId]),{id:t.animationId})},bind:{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.',mcpName:"bind_animation",schema:[{nodeId:"String",animationId:"String",play:"String?",reverse:"String?"}],examples:[{args:{nodeId:"nd_hero",animationId:"anim_abc",play:"mount"},description:"Fade the hero in on mount"}],returns:"{ nodeId: String, animationId: String, index: Number }",handler:async t=>{let e=r("state"),{addAnimationBinding:n}=await import("./addAnimationBinding-WCB5VZLU.js"),o=e.ref(["nodes"]),{nodeId:s,animationId:i,play:d,reverse:c}=t,l={id:i,play:d??"mount"};return c!==void 0&&(l.reverse=c),n(o,s,l),{nodeId:s,animationId:i}}},unbind:{description:"Remove an animation binding from a node by animation id.",schema:[{nodeId:"String",animationId:"String"}],returns:"{ nodeId: String, animationId: String }",handler:async t=>{let e=r("state"),{removeAnimationBinding:n}=await import("./removeAnimationBinding-AIISPC33.js");return n(e.ref(["nodes"]),t.nodeId,t.animationId),{nodeId:t.nodeId,animationId:t.animationId}}},updateBinding:{description:"Update an animation binding on a node by animation id. binding may include play, reverse, or id.",schema:[{nodeId:"String",animationId:"String",binding:"Object"}],returns:"{ nodeId: String, animationId: String }",handler:async t=>{let e=r("state"),{updateAnimationBinding:n}=await import("./updateAnimationBinding-HVVHLFBO.js");return n(e.ref(["nodes"]),t.nodeId,t.animationId,t.binding),{nodeId:t.nodeId,animationId:t.animationId}}}}));var os=[Qn,Zn,es,ts,ns,ss];var rs={jui_fadeIn:{name:"Fade In",category:"entrance",defaultPlay:"mount",duration:600,easing:"ease",fill:"forwards",keyframes:[{offset:0,properties:{opacity:"0"}},{offset:1,properties:{opacity:"1"}}]},jui_fadeInUp:{name:"Fade In Up",category:"entrance",defaultPlay:"mount",duration:600,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards",keyframes:[{offset:0,properties:{opacity:"0",transform:"translateY(30px)"}},{offset:1,properties:{opacity:"1",transform:"translateY(0)"}}]},jui_fadeInDown:{name:"Fade In Down",category:"entrance",defaultPlay:"mount",duration:600,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards",keyframes:[{offset:0,properties:{opacity:"0",transform:"translateY(-30px)"}},{offset:1,properties:{opacity:"1",transform:"translateY(0)"}}]},jui_slideInLeft:{name:"Slide In Left",category:"entrance",defaultPlay:"mount",duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards",keyframes:[{offset:0,properties:{opacity:"0",transform:"translateX(-60px)"}},{offset:1,properties:{opacity:"1",transform:"translateX(0)"}}]},jui_slideInRight:{name:"Slide In Right",category:"entrance",defaultPlay:"mount",duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards",keyframes:[{offset:0,properties:{opacity:"0",transform:"translateX(60px)"}},{offset:1,properties:{opacity:"1",transform:"translateX(0)"}}]},jui_slideInUp:{name:"Slide In Up",category:"entrance",defaultPlay:"mount",duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards",keyframes:[{offset:0,properties:{opacity:"0",transform:"translateY(60px)"}},{offset:1,properties:{opacity:"1",transform:"translateY(0)"}}]},jui_slideInDown:{name:"Slide In Down",category:"entrance",defaultPlay:"mount",duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards",keyframes:[{offset:0,properties:{opacity:"0",transform:"translateY(-60px)"}},{offset:1,properties:{opacity:"1",transform:"translateY(0)"}}]},jui_scaleIn:{name:"Scale In",category:"entrance",defaultPlay:"mount",duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards",keyframes:[{offset:0,properties:{opacity:"0",transform:"scale(0.8)"}},{offset:1,properties:{opacity:"1",transform:"scale(1)"}}]},jui_zoomIn:{name:"Zoom In",category:"entrance",defaultPlay:"mount",duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards",keyframes:[{offset:0,properties:{opacity:"0",transform:"scale(0.3)"}},{offset:1,properties:{opacity:"1",transform:"scale(1)"}}]}};var is={jui_fadeOut:{name:"Fade Out",category:"exit",defaultPlay:"mount",duration:600,easing:"ease",fill:"forwards",keyframes:[{offset:0,properties:{opacity:"1"}},{offset:1,properties:{opacity:"0"}}]},jui_fadeOutDown:{name:"Fade Out Down",category:"exit",defaultPlay:"mount",duration:600,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards",keyframes:[{offset:0,properties:{opacity:"1",transform:"translateY(0)"}},{offset:1,properties:{opacity:"0",transform:"translateY(30px)"}}]},jui_slideOutLeft:{name:"Slide Out Left",category:"exit",defaultPlay:"mount",duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards",keyframes:[{offset:0,properties:{opacity:"1",transform:"translateX(0)"}},{offset:1,properties:{opacity:"0",transform:"translateX(-60px)"}}]},jui_slideOutRight:{name:"Slide Out Right",category:"exit",defaultPlay:"mount",duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards",keyframes:[{offset:0,properties:{opacity:"1",transform:"translateX(0)"}},{offset:1,properties:{opacity:"0",transform:"translateX(60px)"}}]},jui_scaleOut:{name:"Scale Out",category:"exit",defaultPlay:"mount",duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards",keyframes:[{offset:0,properties:{opacity:"1",transform:"scale(1)"}},{offset:1,properties:{opacity:"0",transform:"scale(0.8)"}}]}};var as={jui_pulse:{name:"Pulse",category:"emphasis",defaultPlay:"pointerenter",defaultReset:"pointerleave",duration:1e3,easing:"ease-in-out",fill:"none",keyframes:[{offset:0,properties:{transform:"scale(1)"}},{offset:.5,properties:{transform:"scale(1.05)"}},{offset:1,properties:{transform:"scale(1)"}}]},jui_bounce:{name:"Bounce",category:"emphasis",defaultPlay:"pointerenter",defaultReset:"pointerleave",duration:800,easing:"cubic-bezier(0.28, 0.84, 0.42, 1)",fill:"none",keyframes:[{offset:0,properties:{transform:"translateY(0)"}},{offset:.2,properties:{transform:"translateY(0)"}},{offset:.4,properties:{transform:"translateY(-20px)"}},{offset:.5,properties:{transform:"translateY(0)"}},{offset:.6,properties:{transform:"translateY(-10px)"}},{offset:.8,properties:{transform:"translateY(0)"}},{offset:1,properties:{transform:"translateY(0)"}}]},jui_shake:{name:"Shake",category:"emphasis",defaultPlay:"pointerenter",defaultReset:"pointerleave",duration:600,easing:"ease-in-out",fill:"none",keyframes:[{offset:0,properties:{transform:"translateX(0)"}},{offset:.1,properties:{transform:"translateX(-8px)"}},{offset:.2,properties:{transform:"translateX(8px)"}},{offset:.3,properties:{transform:"translateX(-8px)"}},{offset:.4,properties:{transform:"translateX(8px)"}},{offset:.5,properties:{transform:"translateX(-4px)"}},{offset:.6,properties:{transform:"translateX(4px)"}},{offset:.7,properties:{transform:"translateX(-2px)"}},{offset:.8,properties:{transform:"translateX(2px)"}},{offset:1,properties:{transform:"translateX(0)"}}]}};var ds={jui_flash:{name:"Flash",category:"attention",defaultPlay:"pointerenter",defaultReset:"pointerleave",duration:800,easing:"ease-in-out",fill:"none",keyframes:[{offset:0,properties:{opacity:"1"}},{offset:.25,properties:{opacity:"0"}},{offset:.5,properties:{opacity:"1"}},{offset:.75,properties:{opacity:"0"}},{offset:1,properties:{opacity:"1"}}]},jui_heartbeat:{name:"Heartbeat",category:"attention",defaultPlay:"pointerenter",defaultReset:"pointerleave",duration:1200,easing:"ease-in-out",fill:"none",keyframes:[{offset:0,properties:{transform:"scale(1)"}},{offset:.14,properties:{transform:"scale(1.3)"}},{offset:.28,properties:{transform:"scale(1)"}},{offset:.42,properties:{transform:"scale(1.3)"}},{offset:.7,properties:{transform:"scale(1)"}},{offset:1,properties:{transform:"scale(1)"}}]}};var cs={...rs,...is,...as,...ds};function ls(r,t,e){let n=t.getSelectedRids?.()??[],o=r.get(["nodes"])??{},s=n.length>0?t.getIds(n):[],i=n.length>0?Os(o,s,n,t):As(t);return{framework:e.get(["config","framework"])??"react",componentCatalog:t.getMeta(),stores:r.get(["stores"])??{},tokens:r.get(["tokens"])??{},animations:r.get(["animations"])??{},...i,availableFrames:wn(),layoutHints:Ns(o,n)}}function As(r){return{scope:"global",jsx:r.projectPuppetJsx("app",{maxDepth:8})}}function Os(r,t,e,n){let o=Ls(r,t[0])??"app";return{scope:"local",selectedIds:t,jsx:n.projectPuppetJsx(o)}}function Ns(r,t){let e={viewportPositions:[],usedPositions:[],containerLayouts:{},suggestedViewportPosition:null},n=0;return Object.entries(r).forEach(([o,s])=>{if(s.type==="frame"&&s.bounds){let{top:i,left:d,width:c,height:l}=s.bounds,m={id:o,name:s.name,top:i||0,left:d||0,width:c||375,height:l||667};e.viewportPositions.push(m);let f=m.left+m.width;f>n&&(n=f)}if(s.type!=="frame"&&s.style?.default?.position==="absolute"){let{top:i,left:d,width:c,height:l}=s.style.default;e.usedPositions.push({id:o,top:parseInt(i)||0,left:parseInt(d)||0,width:parseInt(c)||100,height:parseInt(l)||50})}(s.layout==="flex"||s.style?.default?.display==="flex")&&(e.containerLayouts[o]="flex"),(s.layout==="grid"||s.style?.default?.display==="grid")&&(e.containerLayouts[o]="grid")}),e.suggestedViewportPosition={top:0,left:n+50},e}function Ts(r,t){for(let[e,n]of Object.entries(r))if(n.children?.includes(t))return e;return null}function Ls(r,t){let e=t;for(;e;){let n=r[e];if(!n)return null;if(n.type==="frame")return e;e=Ts(r,e)}return null}var _s=5e3,ps=Et("ai:stage",r=>{let[t,e,n,o,s]=r("state","sceneCompiler","cache","log","aiOps");function i(d=_s){return new Promise(c=>{let l=setTimeout(()=>{m(),c(null)},d),m=e.addNodeGraphListener((f,b)=>{clearTimeout(l),m(),c({updated:f,removed:b})})})}return{"context:capture":{timeoutMs:15e3,handler:async({awaitRender:d}={})=>{try{return d&&await i(),ls(t,e,n)}catch(c){throw o.error("ai context capture failed",{error:c.message}),c}}},"operations:execute":{timeoutMs:6e4,handler:async({batch:d}={})=>{try{t.history.group();try{return await s.executeBatch(d??{operations:[]})}finally{t.history.commit(d?.description||d?.message||"AI changes")}}catch(c){throw o.error("ai operations execute failed",{error:c.message}),c}}}}});var ms=Et("screenshot",r=>{let[t,e,n]=r("state","cache","channel");return{capture:{timeoutMs:12e4,handler:async()=>{let o=t.get(["nodes"]),i=(o?.app?.children??[]).filter(l=>o[l]?.type==="frame").map(l=>({id:l,name:o[l].name||l,bounds:o[l].bounds})),d=e.get(["config"]),c=[];for(let l of i){let m={config:{basePath:d.basePath??`http://localhost:${d.port}`,view:"screen-capture",env:"dev",nodeId:l.id},width:l.bounds?.width??1440,height:l.bounds?.height??900,result:"base64"},f=await n.to("electronMain").request("screenCapture:capture",m);c.push({id:l.id,name:l.name,imageData:`data:image/png;base64,${f.base64}`})}return{frames:c}}}}});function Rs(r){if(typeof window<"u"){let e=window.location.protocol==="https:"?"wss:":"ws:",n=window.location.host;if(r.basePath)try{let s=(r.basePath.startsWith("http")?new URL(r.basePath).pathname:r.basePath).replace(/\/$/,"");if(s)return`${e}//${n}${s}/socket`}catch{}return r.projectId?`${e}//${n}/p/${r.projectId}/socket`:`${e}//${n}/socket`}return`ws://localhost:${r.port??3e3}/socket`}var ii=async(r,t,e,n)=>{try{let{loadProjectMain:o}=await import("./preact-NBJKI6EE.js");await o();let s=(await import("/components.js"))?.default??{},i=Nt(e.$el||"app"),d=Nt("temp"),c=Nt("components"),l=Jn();r.install(pn.configure({plugins:[fn,bt.configure({actorId:crypto.randomUUID()}),Mn,gn,zn]}),mn.configure(e),Me,un,hn.configure({url:Rs(e),auth:n??null,reconnect:{enabled:!0}}),ze.configure({visibility:!0,focus:!1,freeze:!0,sleepDetection:{enabled:!0,threshold:1e4}}),Ye),r.cache.load({config:e,token:n,$app:i,$temp:d,$components:c,viewport:l}),r.sceneCompiler.loadPrototypes(yn),r.sceneCompiler.loadSources(s),r.aiOps.use(...os),r.socket.use(ps,ms),r.socket.subscribe("design:load",async f=>{r.state.ledger.hydrate(f),await r.sceneCompiler.create("app","app"),await r.sceneCompiler.create("temp","temp",{mode:"temp"}),await r.sceneCompiler.create("components","components",{mode:"components"})}),r.socket.subscribe("ai:sessions:list",f=>{r.cache.set(["ai","sessions"],f),r.channel.to("editor").publish("ai:sessions:set",f)}),r.socket.subscribe("ledger:apply",f=>r.state.ledger.apply(f)),r.channel.portProvider(async()=>await r.windowBridge.to("parent").request("jucie:port:request",e.id)),r.state.ledger.addChangeListener(f=>{f.length&&r.socket.publish("ledger:sync",f)});let m=await r.channel.connect();if(m){let{nodeGraphContracts:f}=await import("./nodeGraph-JS64VAAQ.js"),{historyContracts:b}=await import("./history-VAAFKC4E.js"),{userContracts:S}=await import("./user-FCPIGR7X.js"),{assetsContracts:A}=await import("./assets-NU56BTDG.js"),{aiContracts:P}=await import("./aiRelay-WDZAC42R.js"),{aiSessionContracts:ge}=await import("./aiSessionContracts-WAMOGHSG.js"),{aiMessagesContracts:Bt}=await import("./aiMessagesContracts-ZGHZJ7EU.js"),{aiAttachmentContracts:wt}=await import("./aiAttachmentContracts-V3EW4BHI.js"),{contentEditorContracts:Ne}=await import("./contentEditor-6WQFOUKV.js"),{viewportContracts:Ht}=await import("./viewport-LLBH2LJW.js"),{contracts:Ft}=await import("./main-ZXFODV6O.js"),{contracts:St}=await import("./main-MVCLW2IY.js"),{contracts:vt}=await import("./main-KFGWT6OT.js"),{contracts:xt}=await import("./main-K2WJEG5C.js");return m.use(Ht,f,b,S,A,P,ge,Bt,wt,Ne,...Ft,...St,...vt,...xt),be(()=>r.state.get(["nodes"]),y=>{if(!y)return;let w=Object.keys(y).filter(N=>y[N]?.type==="component"),L=[...r.sceneCompiler.getMeta()];for(let N of w){let X=y[N];L.push({displayName:X.name||N,category:"local",keywords:[X.name,"component"],library:null,tagName:N})}r.channel.to("editor").publish("components:set",L)}),be(()=>r.state.get(["tokens"]),y=>{r.channel.to("editor").publish("tokens:set",y??{}),r.channel.to("panel-tokens").publish("token:set",y??{})}),be(()=>r.state.get(["stores"]),y=>{r.channel.to("editor").publish("stores:set",y??{})}),be(()=>r.state.get(["assets"]),y=>{r.channel.to("editor").publish("assets:set",y??{})}),be(()=>r.state.get(["libraryClassNames"]),y=>{r.channel.to("editor").publish("libraryClassNames:set",y??[])}),be(()=>{let y=r.state.get(["animations"])??{};return Object.entries(y).map(([w,L])=>({id:w,...L}))},y=>{r.channel.to("editor").publish("animations:set",y??[])}),r.sceneCompiler.addNodeGraphListener((y,w,L)=>{L?m.to("renderWorker","editor").publish("nodeGraph:set",y):m.to("renderWorker","editor").publish("nodeGraph:update",y,w),r.sceneCompiler.projectPuppetJsx(["app"])}),r.channel.to("editor").publish("elements:set",vn),r.channel.to("editor").publish("frames:set",bn),r.channel.to("editor").publish("graphics:set",Sn),r.channel.to("editor").publish("globalAnimations:set",cs),r.channel.to("editor").publish("components:set",r.sceneCompiler.getMeta()),r.channel.to("editor").publish("assets:set",r.state.get(["assets"])??{}),r.sceneCompiler.startNodeGraph(),r.pageLifecycle.on("hidden",()=>{r.sceneCompiler.pauseNodeGraph()}),r.pageLifecycle.on("visible",()=>{r.sceneCompiler.forceNodeGraph()}),r.pageLifecycle.on("resume",()=>{r.socket.ready()||r.socket.connect(),r.sceneCompiler.forceNodeGraph()}),r.channel.onEnable(()=>{m.to("renderWorker").publish("nodeGraph:remove");let y=r.sceneCompiler.getNodeGraph();m.to("renderWorker","editor").publish("nodeGraph:set",y);let w=r.sceneCompiler.getViewport(),L=r.sceneCompiler.getSelectedRids(),N=r.sceneCompiler.getFocalRid();m.to("renderWorker").publish("viewport:set",w),m.to("renderWorker").publish("selection:rids:set",L),m.to("renderWorker").publish("selection:focalRid:set",N),r.channel.to("editor").publish("stores:set",r.state.get(["stores"])??{}),r.channel.to("editor").publish("tokens:set",r.state.get(["tokens"])??{});let X=r.state.get(["animations"])??{};r.channel.to("editor").publish("animations:set",Object.entries(X).map(([ye,$])=>({id:ye,...$}))),r.channel.to("editor").publish("assets:set",r.state.get(["assets"])??{}),r.channel.to("editor").publish("libraryClassNames:set",r.state.get(["libraryClassNames"])??[]),r.channel.to("editor").publish("components:set",r.sceneCompiler.getMeta()),r.channel.to("editor").publish("ai:sessions:set",r.cache.get(["ai","sessions"])??[])}),m.subscribe("selection:rids:set",y=>{r.sceneCompiler.setSelectedRids(y)}),m.subscribe("selection:focalRid:set",y=>{r.sceneCompiler.setFocalRid(y||null)}),m.subscribe("animation:preview:play",(y,w)=>{for(let L of w){let N=r.sceneCompiler.animate(L,y,{fill:"none"}),X=Array.isArray(N)?N:N?[N]:[];for(let ye of X)ye.addEventListener("finish",()=>{m.to("editor").publish("animation:preview:finished",y)},{once:!0})}}),m.subscribe("animation:preview:stop",(y,w)=>{for(let L of w)r.sceneCompiler.cancelAnimation(L,y)}),m.subscribe("animation:preview:seek",(y,w)=>{r.sceneCompiler.seekAnimation(y,w)}),r.socket.subscribe("presence:join",(y,w)=>m.to("renderWorker").publish("user:connect",y,w)),r.socket.subscribe("presence:leave",y=>m.to("renderWorker").publish("user:disconnect",y)),r.socket.subscribe("presence:update",(y,w)=>m.to("renderWorker").publish("user:update",y,w)),r.socket.subscribe("presence:snapshot",y=>m.to("renderWorker").publish("user:setAll",y)),e}else throw new Error("Stage channel failed to connect")}catch(o){return{error:o.message}}};export{ii as createDesignBootstrap};
@@ -1 +0,0 @@
1
- import{a,b,c,d,e}from"./chunk-LEELNBJC.js";import"./chunk-PYIGBTL4.js";import"./chunk-HAN4CMBX.js";import"./chunk-CYURWEXX.js";import"./chunk-GUI7FIZD.js";import"./chunk-IKKRB6BS.js";import"./chunk-7VDUBBVE.js";import"./chunk-N6I4COF2.js";import"./chunk-A52FDU5E.js";import"./chunk-6S7QQT47.js";import"./chunk-PU62K33G.js";import"./chunk-YCGY2NRE.js";import"./chunk-KTWXYDG7.js";import"./chunk-EWEPEODY.js";import"./chunk-Q3ZV7EKU.js";import"./chunk-F5MJNV7Y.js";import"./chunk-ZUPNPSUB.js";import"./chunk-O24ISLGT.js";import"./chunk-UCLSDDOL.js";export{a as actionsContract,b as computedContract,e as contracts,c as stateContract,d as storeContract};
@@ -1 +0,0 @@
1
- import{A as F,B as G,C as H,D as I,E as J,F as K,G as L,H as M,I as N,J as O,K as P,L as Q,M as R,a as f,b as g,c as h,d as i,e as j,f as k,g as l,h as m,i as n,j as o,k as p,l as q,m as r,n as s,o as t,p as u,q as v,r as w,s as x,t as y,u as z,v as A,w as B,x as C,y as D,z as E}from"./chunk-67H474GN.js";import"./chunk-KISNK4R4.js";import"./chunk-PYIGBTL4.js";import"./chunk-QD56IMFS.js";import"./chunk-EPVRMHC2.js";import"./chunk-YB7FA4Y3.js";import"./chunk-GEOQWCYL.js";import"./chunk-NXBFOI3Z.js";import"./chunk-E6KR5RXO.js";import"./chunk-I57W7UZN.js";import{a as e}from"./chunk-LUY5LC7Z.js";import"./chunk-IBDKDP7T.js";import"./chunk-5CWWFBNY.js";import"./chunk-BWJHUHDJ.js";import"./chunk-QFFVADTJ.js";import"./chunk-MGH62JQ4.js";import"./chunk-YCMBBPKT.js";import"./chunk-NHY2XYCH.js";import"./chunk-XFHQ45KR.js";import"./chunk-XTAXESM6.js";import"./chunk-QJ33JO3T.js";import"./chunk-OQM5TMCK.js";import"./chunk-BL6GQ6ID.js";import"./chunk-K5BNCYT7.js";import"./chunk-XE3A5HPY.js";import"./chunk-CC3CCH2E.js";import"./chunk-Q3IER3MW.js";import"./chunk-DHPGPV5T.js";import"./chunk-FAYUYASQ.js";import"./chunk-ICWQHFOI.js";import"./chunk-AS76ZLXK.js";import"./chunk-HCRWHPFW.js";import"./chunk-6KW4HPGN.js";import"./chunk-CNZYL2VV.js";import"./chunk-UQFZUWFP.js";import"./chunk-PPDOTRNT.js";import"./chunk-CAAW6MG4.js";import{c as d}from"./chunk-JRXMDYLE.js";import"./chunk-LHK7LQPZ.js";import"./chunk-GK5XUHQG.js";import"./chunk-TX5TCU2H.js";import"./chunk-GM4D3DPT.js";import{a,b,c}from"./chunk-JHWED3SX.js";import"./chunk-ACPGC7BJ.js";import"./chunk-DLHF7QB4.js";import"./chunk-7UENQJSC.js";import"./chunk-RFFN4NF4.js";import"./chunk-34CHXN5I.js";import"./chunk-J5QMLA3Z.js";import"./chunk-2BGFXNGU.js";import"./chunk-HE7IQLGK.js";import"./chunk-Z3M6DQKZ.js";import"./chunk-IV6PINVX.js";import"./chunk-A25WFH3U.js";import"./chunk-MUZZUB5Y.js";import"./chunk-TPCJQIUG.js";import"./chunk-O24ISLGT.js";import"./chunk-EXXAK3BP.js";import"./chunk-UCLSDDOL.js";export{k as addContracts,m as attributeContracts,y as behaviorContracts,f as breakpointContracts,p as buildSlotsFromMeta,g as classNameContracts,h as clipboardContracts,d as cloneNodes,i as contextNameContracts,R as contracts,O as createNode,e as createOption,n as createProp,t as destinationContracts,u as dragContracts,P as elements,l as eventsContracts,a as frames,c as getAvailableFrames,b as getFramePreset,Q as graphics,s as htmlContracts,N as htmlIdContracts,w as interactionStateContracts,z as layoutContracts,v as lifecycleContracts,q as mergeMissingSlotsFromMeta,A as moveContracts,B as nameContracts,C as optionsContracts,D as orderContracts,x as patchContracts,o as propContracts,E as removeContracts,F as renderContracts,G as repeatContracts,H as routeContracts,r as slotContracts,j as statesContracts,I as styleContracts,J as tagNameContracts,K as textContentContracts,L as typeContracts,M as viewportContracts};
@@ -1 +0,0 @@
1
- import{d as a}from"./chunk-34CHXN5I.js";import"./chunk-J5QMLA3Z.js";import"./chunk-2BGFXNGU.js";import"./chunk-HE7IQLGK.js";import"./chunk-Z3M6DQKZ.js";import"./chunk-TPCJQIUG.js";import"./chunk-UCLSDDOL.js";export{a as moveNodeToLastChildOf};
@@ -1 +0,0 @@
1
- import{e as a}from"./chunk-2BGFXNGU.js";import"./chunk-HE7IQLGK.js";import"./chunk-Z3M6DQKZ.js";import"./chunk-UCLSDDOL.js";export{a as normalizeLayoutContext};
@@ -1 +0,0 @@
1
- import{a as e,b as f,c as g,d as h,e as i,f as j,g as k,h as l,i as m,j as n}from"./chunk-LHON3DKO.js";import{a as d}from"./chunk-E4RDZ324.js";import{e as c}from"./chunk-NRRFAMFA.js";import{c as a,h as b}from"./chunk-RYWOKFM7.js";import"./chunk-UCLSDDOL.js";export{a as createElement,l as createHost,j as createRef,k as createTrigger,m as hostRootProps,g as loadProjectMain,h as provideJucie,b as render,n as renderSource,f as setup,e as splitInstanceOverrides,i as useJucie,c as useRef,d as useSyncExternalStore};
@@ -1 +0,0 @@
1
- import{a,c as s,e as i,o as c,p as l,q as m}from"./chunk-FCRFPWU3.js";import{b as p}from"./chunk-PYIGBTL4.js";import{a as d}from"./chunk-ACPGC7BJ.js";import"./chunk-DLHF7QB4.js";import"./chunk-7UENQJSC.js";import"./chunk-RFFN4NF4.js";import"./chunk-O24ISLGT.js";import"./chunk-LHON3DKO.js";import"./chunk-E4RDZ324.js";import"./chunk-NRRFAMFA.js";import"./chunk-RYWOKFM7.js";import"./chunk-EXXAK3BP.js";import"./chunk-UCLSDDOL.js";var E=async(t,r,o)=>{if(!r)throw new Error("[stage/preview] MessagePort is required");let{loadProjectMain:n}=await import("./preact-NBJKI6EE.js");await n();let w=(await import("/components.js"))?.default??{},{socketPath:u="/socket.io"}=o,f=m(o.$el||"app");return t.install(a.configure({plugins:[c,l]}),p.configure(),s.configure(o),i.configure({url:typeof window<"u"?window.location.origin:`http://localhost:${o.port}`,options:{path:u,transports:["websocket","polling"]}})),t.cache.load({config:o,$app:f}),t.sceneCompiler.loadPrototypes(d),t.sceneCompiler.loadSources(w),t.socket.create(),t.socket.get().on("studio:load",async e=>{t.state.ledger.hydrate(e),await t.sceneCompiler.create("app",o.nodeId)}),t.socket.get().on("stage:ledger:apply",e=>t.state.ledger.apply(e)),await t.channel.connect(r,async e=>{let{windowContracts:h}=await import("./window-TFWZNZUJ.js");e.use(h)}),o};export{E as createDesignPreviewBootstrap};
@@ -1 +0,0 @@
1
- import{b as a}from"./chunk-UQFZUWFP.js";import"./chunk-2BGFXNGU.js";import"./chunk-HE7IQLGK.js";import"./chunk-Z3M6DQKZ.js";import"./chunk-UCLSDDOL.js";export{a as setNodeLayout};
@@ -1 +0,0 @@
1
- import{a as e}from"./chunk-PYIGBTL4.js";import"./chunk-O24ISLGT.js";import"./chunk-UCLSDDOL.js";var a=e("window",r=>({back:{schema:null,namespace:"stage",handler:()=>{r("router").back()}},forward:{schema:null,namespace:"stage",handler:()=>{r("router").forward()}}}));export{a as windowContracts};
@@ -1 +0,0 @@
1
- import{a}from"./chunk-NOTXZB5N.js";import"./chunk-BXIWQYSY.js";export{a as addAnimationBinding};
@@ -1 +0,0 @@
1
- import{d as a}from"./chunk-PSQ4TIJA.js";import"./chunk-NDUX5RLD.js";import"./chunk-DLHF7QB4.js";import"./chunk-7UENQJSC.js";import"./chunk-RFFN4NF4.js";import"./chunk-A25WFH3U.js";import"./chunk-TPCJQIUG.js";import"./chunk-EXXAK3BP.js";import"./chunk-BXIWQYSY.js";export{a as addComponent};
@@ -1 +0,0 @@
1
- import{f as a}from"./chunk-5OEIZ3PD.js";import"./chunk-NDUX5RLD.js";import"./chunk-DLHF7QB4.js";import"./chunk-7UENQJSC.js";import"./chunk-RFFN4NF4.js";import"./chunk-34CHXN5I.js";import"./chunk-J5QMLA3Z.js";import"./chunk-2BGFXNGU.js";import"./chunk-HE7IQLGK.js";import"./chunk-Z3M6DQKZ.js";import"./chunk-TPCJQIUG.js";import"./chunk-EXXAK3BP.js";import"./chunk-BXIWQYSY.js";export{a as addNode};
@@ -1 +0,0 @@
1
- import{a}from"./chunk-EPVRMHC2.js";import"./chunk-BXIWQYSY.js";export{a as addParamToRoute};
@@ -1 +0,0 @@
1
- import{a}from"./chunk-ZUPNPSUB.js";import"./chunk-BXIWQYSY.js";export{a as addStore};
@@ -1 +0,0 @@
1
- import{a as n}from"./chunk-32U4X4HZ.js";import"./chunk-PPHD3O2M.js";import"./chunk-BXIWQYSY.js";var r=n("ai",c=>{let[t,o,s]=c("channel","cache","socket");return s.subscribe("ai:agent:progress",e=>{t.to("editor").publish("ai:progress",e)}),s.subscribe("ai:agent:response",e=>{t.to("editor").publish("ai:response",e)}),{agent:{schema:["String","Object"],namespace:"stage",timeoutMs:18e4,handler:async(e,a={})=>{s.publish("ai:agent:run",{prompt:e,sessionId:a.sessionId??null,attachments:a.attachments??[],token:o.get(["token"])??null})}},stop:{schema:[],namespace:"stage",handler:()=>{s.publish("ai:agent:stop")}}}});export{r as aiContracts};
@@ -1 +0,0 @@
1
- import{a as t}from"./chunk-32U4X4HZ.js";import"./chunk-PPHD3O2M.js";import"./chunk-BXIWQYSY.js";var d=t("assets",n=>{let[r,s,o]=n("socket","channel","log");if(!r||!s)throw new Error("Socket or channel not found");return{upload:{namespace:"stage",schema:["Object","ArrayBuffer"],handler:async(a,c)=>{o.debug("upload request received",{name:a.name});try{let e=await r.request("assets:upload",a,c);s.to("editor").publish("asset:uploaded",e)}catch(e){o.error("upload failed",{error:e.message}),s.to("editor").publish("asset:uploaded",{success:!1,error:e.message})}}}}});export{d as assetsContracts};
@@ -1 +0,0 @@
1
- import"./chunk-QKFDVU2Q.js";import{a as r,c as a,e as p,o as i,p as s,q as l}from"./chunk-ADVOIRI5.js";import"./chunk-GYBL4LBC.js";import"./chunk-KISNK4R4.js";import"./chunk-ATUQUJRM.js";import"./chunk-32U4X4HZ.js";import"./chunk-HAN4CMBX.js";import"./chunk-CYURWEXX.js";import"./chunk-GUI7FIZD.js";import"./chunk-IKKRB6BS.js";import"./chunk-7VDUBBVE.js";import"./chunk-N6I4COF2.js";import"./chunk-A52FDU5E.js";import"./chunk-6S7QQT47.js";import"./chunk-PU62K33G.js";import"./chunk-YCGY2NRE.js";import"./chunk-KTWXYDG7.js";import"./chunk-EWEPEODY.js";import"./chunk-Q3ZV7EKU.js";import"./chunk-F5MJNV7Y.js";import"./chunk-QD56IMFS.js";import"./chunk-EPVRMHC2.js";import"./chunk-YB7FA4Y3.js";import"./chunk-ZUPNPSUB.js";import"./chunk-GEOQWCYL.js";import"./chunk-NXBFOI3Z.js";import"./chunk-E6KR5RXO.js";import"./chunk-I57W7UZN.js";import"./chunk-LUY5LC7Z.js";import"./chunk-IBDKDP7T.js";import"./chunk-5CWWFBNY.js";import"./chunk-BWJHUHDJ.js";import"./chunk-QFFVADTJ.js";import"./chunk-MGH62JQ4.js";import"./chunk-YCMBBPKT.js";import"./chunk-NHY2XYCH.js";import"./chunk-XFHQ45KR.js";import"./chunk-XTAXESM6.js";import"./chunk-QJ33JO3T.js";import"./chunk-OQM5TMCK.js";import"./chunk-BL6GQ6ID.js";import"./chunk-K5BNCYT7.js";import"./chunk-XE3A5HPY.js";import"./chunk-CC3CCH2E.js";import"./chunk-Q3IER3MW.js";import"./chunk-DHPGPV5T.js";import"./chunk-FAYUYASQ.js";import"./chunk-ICWQHFOI.js";import"./chunk-AS76ZLXK.js";import"./chunk-HCRWHPFW.js";import"./chunk-6KW4HPGN.js";import"./chunk-CNZYL2VV.js";import"./chunk-UQFZUWFP.js";import"./chunk-PPDOTRNT.js";import"./chunk-CAAW6MG4.js";import"./chunk-PSQ4TIJA.js";import"./chunk-LHK7LQPZ.js";import"./chunk-GK5XUHQG.js";import"./chunk-TX5TCU2H.js";import"./chunk-GM4D3DPT.js";import"./chunk-5OEIZ3PD.js";import{a as c}from"./chunk-NDUX5RLD.js";import"./chunk-DLHF7QB4.js";import"./chunk-7UENQJSC.js";import"./chunk-RFFN4NF4.js";import"./chunk-34CHXN5I.js";import"./chunk-J5QMLA3Z.js";import"./chunk-2BGFXNGU.js";import"./chunk-HE7IQLGK.js";import"./chunk-Z3M6DQKZ.js";import"./chunk-IV6PINVX.js";import"./chunk-A25WFH3U.js";import"./chunk-MUZZUB5Y.js";import"./chunk-TPCJQIUG.js";import"./chunk-PPHD3O2M.js";import"./chunk-HLPDOSGP.js";import"./chunk-5HITMZZP.js";import"./chunk-FCMIFWSU.js";import"./chunk-76SRFCJO.js";import"./chunk-EXXAK3BP.js";import"./chunk-BXIWQYSY.js";var P=async(t,o)=>{let{loadProjectMain:m}=await import("./react-YDAQ4KLN.js");await m();let d=l(o.$el||"app");return t.install(r.configure({plugins:[i,s]}),a.configure(o),p.configure({url:typeof window<"u"?window.location.origin:`http://localhost:${o.port}`,options:{path:o.socketPath??"/socket.io",transports:["websocket","polling"]}})),t.cache.load({config:o,$app:d}),t.sceneCompiler.loadPrototypes(c),t.socket.create(),t.socket.get().on("studio:load",async e=>{t.state.ledger.hydrate(e),await t.sceneCompiler.create("app",o.nodeId)}),t.socket.get().on("stage:ledger:apply",e=>t.state.ledger.apply(e)),o};export{P as createDesignScreenCaptureBootstrap};
@@ -1 +0,0 @@
1
- import{b as l}from"./chunk-HE7IQLGK.js";import{a as y}from"./chunk-Z3M6DQKZ.js";function m(t,o){let e=t.get([o,"layout"]);if(e&&e!=="none")return e;let r=t.get([o,"style","default","display"]);return r==="flex"||r==="grid"?r:"none"}function c(t,o,e){let r=t.get([o,"style"]);if(!(!r||!e.length))for(let n in r){let f=r[n];if(!(!f||typeof f!="object")){for(let i of e)i in f&&t.remove([o,"style",n,i]);for(let i in f){if(!i.startsWith(":")&&!i.startsWith("&."))continue;let s=f[i];if(!(!s||typeof s!="object"))for(let p of e)p in s&&t.remove([o,"style",n,i,p])}}}}var d=["top","left","right","bottom"];function h(t,o){c(t,o,d)}function u(){return{layout:"none",draggable:!0,resizable:!0,selectable:!0,locked:[],anchor:[],dimensions:[],expandedStyles:[],childrenType:"children"}}function b(t,o){return t?o?t.filter(e=>!o.includes(e)):t:[]}function g(t,o,e){let r=t.get([o,"anchor"]),n=b(r,e);return n.length&&c(t,o,n),t.set([o,"anchor"],e),!0}function x(t,o){return t.remove([o,".position"])}function a(t,o,e,r){if(!e||typeof e!="object")return;let n=Object.keys(e).sort();for(let f of n){let i=e[f];switch(f){case"style":{let s=e?.anchor;l(t,o,i,{breakpoint:r,anchor:s}),x(t,o);break}case"bounds":y(t,o,i);break;case"anchor":g(t,o,i);break;default:t.set([o,f],i);break}}}function W(t,o,e={}){let r={...u(),...e};for(let n of Object.keys(r))t.set([o,n],r[n])}function w(t,o){let e=u();for(let r of Object.keys(e))t.set([o,r],e[r]);t.set([o,"hidden"],void 0),t.set([o,"isComponentRoot"],void 0)}function G(t,o,e){if(m(t,e)!=="none"){h(t,o),a(t,o,{anchor:[],dimensions:[]});return}let n=t.get([o,"anchor"]);(!n||!n.length)&&a(t,o,{anchor:["top","left"],dimensions:["width","height"]})}export{x as a,a as b,W as c,w as d,G as e};
@@ -1,6 +0,0 @@
1
- import{a as ue,c as se,d as F}from"./chunk-PPHD3O2M.js";import{a as D,f as re,g as r,h as d,i as u,j as o}from"./chunk-BXIWQYSY.js";var Me=(f=>typeof D<"u"?D:typeof Proxy<"u"?new Proxy(f,{get:(t,e)=>(typeof D<"u"?D:t)[e]}):f)(function(f){if(typeof D<"u")return D.apply(this,arguments);throw Error('Dynamic require of "'+f+'" is not supported')}),be=(f,t)=>setTimeout(()=>{f(new Error("Timeout waiting for connect"))},t);function z(f){return f!=null&&typeof f.postMessage=="function"}function ve(f){return typeof f?.on=="function"&&typeof f?.removeListener=="function"&&!("onmessage"in f)}function Ce(f){return f!=null&&typeof f=="object"&&"data"in f?{data:f.data}:{data:f}}function ce(f){if(!f||!ve(f))return f;let t=null,e=null,s=null,i=(n,h)=>{if(h)try{f.removeListener(n,h)}catch{}return null};return{postMessage(...n){return f.postMessage(...n)},start(){typeof f.start=="function"&&f.start()},close(){t=i("message",t),e=i("error",e),s=i("close",s),typeof f.close=="function"&&f.close()},set onmessage(n){t=i("message",t),typeof n=="function"&&(t=h=>n(Ce(h)),f.on("message",t))},get onmessage(){return t},set onerror(n){e=i("error",e),typeof n=="function"&&(e=n,f.on("error",e))},get onerror(){return e},set onclose(n){s=i("close",s),typeof n=="function"&&(s=n,f.on("close",s))},get onclose(){return s}}}var a,p,N,b,q,B,T,w,W,l,Q,ne,fe,Ee,de,Y,pe,oe,ae,me,L,Se,Ae=(a=class{constructor(t,e=F(),s={}){d(this,l);d(this,p,null);d(this,N,!1);d(this,b,null);d(this,q,!1);d(this,B,null);d(this,T,new Map);d(this,w,new Map);d(this,W,1e3);if(u(this,W,s.timeoutMs??1e3),t=ce(t),t){if(typeof t.postMessage!="function")throw new Error("Port must be an object with postMessage");u(this,p,t),u(this,b,e),r(this,p).onmessage=i=>o(this,l,pe).call(this,i),r(this,p).onerror=i=>o(this,l,Se).call(this,i),o(this,l,fe).call(this),u(this,N,!0),typeof r(this,p).start=="function"&&r(this,p).start()}}static get EVENTS(){return{CONNECT:"CONNECT",CONFIRM_CONNECT:"CONFIRM_CONNECT",DISCONNECT:"DISCONNECT",RESPONSE:"RESPONSE",ENABLE:"ENABLE",ERROR:"ERROR",MESSAGE:"MESSAGE",GATHER:"GATHER",WARNING:"WARNING",INFO:"INFO",DEBUG:"DEBUG",TRACE:"TRACE"}}get enabled(){return r(this,N)}static connect({port:t,options:e={}}){e={...a.defaultOptions,...e},t=ce(t);let s=F();return new Promise((i,n)=>{let h=0,y=null,E=!1,S=()=>{y&&clearTimeout(y);try{t.onmessage=null}catch{}try{t.onerror=null}catch{}};if(e.primary){if(t.onmessage=I=>{let P=I?.data;if(!Array.isArray(P)||P.length<2)return;let[A,M]=P;if(A===a.EVENTS.CONNECT)try{t.postMessage([a.EVENTS.CONFIRM_CONNECT,{rid:M?.rid,sid:M?.sid}]),E=!0,S(),i(new a(t,M?.sid,{timeoutMs:e.timeoutMs}))}catch(x){S(),n(x)}},t.onerror=I=>{E||(E=!0,S(),n(I))},typeof t.start=="function")try{t.start()}catch{}}else{let I=()=>{if(h>=e.maxRetries){E||(S(),n(new Error("Max retries reached")));return}let A=Math.min(e.baseDelay*2**h,e.maxDelay),M=Math.floor(A*e.jitter*Math.random());y=setTimeout(P,A+M)},P=()=>{h+=1;try{t.postMessage([a.EVENTS.CONNECT,{rid:F(),sid:s}])}catch(A){S(),n(A);return}I()};if(t.onmessage=A=>{let M=A?.data;if(!Array.isArray(M)||M.length<2)return;let[x,H]=M;if(!(!H?.sid||!H?.rid))switch(x){case a.EVENTS.CONFIRM_CONNECT:{if(E)return;E=!0,S(),i(new a(t,H?.sid,{timeoutMs:e.timeoutMs}));break}case a.EVENTS.ERROR:{if(E)return;E=!0,S(),n(new Error("Handshake error"));break}default:break}},t.onerror=A=>{E||(E=!0,S(),n(A))},typeof t.start=="function")try{t.start()}catch{}P()}})}get sid(){return r(this,b)}close(){r(this,q)||(u(this,q,!0),console.warn(`[Port] close() \u2014 sid: ${r(this,b)}, pending: ${r(this,T).size}, enabled: ${r(this,N)}`),o(this,l,L).call(this,a.EVENTS.DISCONNECT,{sid:r(this,b)}),o(this,l,ne).call(this))}emit(t){return r(this,p)?r(this,N)?o(this,l,de).call(this,t):Promise.resolve(null):Promise.reject(new Error("No port available"))}request(t,e){return r(this,p)?r(this,N)?o(this,l,Y).call(this,a.EVENTS.MESSAGE,t,e):Promise.resolve(null):Promise.reject(new Error("No port available"))}gather(t,e){return r(this,p)?r(this,N)?o(this,l,Y).call(this,a.EVENTS.GATHER,t,e):Promise.resolve(null):Promise.reject(new Error("No port available"))}async enable(){return r(this,p)?(u(this,N,await o(this,l,Y).call(this,a.EVENTS.ENABLE,!0)),r(this,N)):Promise.reject(new Error("No port available"))}async disable(){return r(this,p)?(u(this,N,await o(this,l,Y).call(this,a.EVENTS.ENABLE,!1)),r(this,N)):Promise.reject(new Error("No port available"))}onMessage(t){if(typeof t!="function")throw new Error("Listener must be a function");if(r(this,w).has(a.EVENTS.MESSAGE))throw new Error("A listener is already registered. Remove the existing listener before adding a new one.");return r(this,w).set(a.EVENTS.MESSAGE,t),()=>{r(this,w).get(a.EVENTS.MESSAGE)===t&&r(this,w).delete(a.EVENTS.MESSAGE)}}onEnable(t){if(typeof t!="function")throw new Error("Listener must be a function");return r(this,w).set(a.EVENTS.ENABLE,t),()=>r(this,w).delete(a.EVENTS.ENABLE)}onError(t){if(typeof t!="function")throw new Error("Listener must be a function");if(r(this,w).has(a.EVENTS.ERROR))throw new Error("A listener is already registered. Remove the existing listener before adding a new one.");return r(this,w).set(a.EVENTS.ERROR,t),()=>r(this,w).delete(a.EVENTS.ERROR)}onDisconnect(t){if(typeof t!="function")throw new Error("Listener must be a function");return r(this,w).set(a.EVENTS.DISCONNECT,t),()=>r(this,w).delete(a.EVENTS.DISCONNECT)}},p=new WeakMap,N=new WeakMap,b=new WeakMap,q=new WeakMap,B=new WeakMap,T=new WeakMap,w=new WeakMap,W=new WeakMap,l=new WeakSet,Q=function(t){if(r(this,q))return;u(this,q,!0),console.warn(`[Port] disconnect detected \u2014 sid: ${r(this,b)}, reason: ${t}`);let e=r(this,w).get(a.EVENTS.DISCONNECT);if(o(this,l,ne).call(this),e)try{e(t)}catch(s){console.error("Port onDisconnect listener error:",s)}},ne=function(){r(this,p)&&(o(this,l,Ee).call(this),r(this,p).onmessage=null,r(this,p).onerror=null,typeof r(this,p).stop=="function"&&r(this,p).stop(),typeof r(this,p).close=="function"&&r(this,p).close());for(let[t,e]of r(this,T))console.warn(`[Port] rejecting pending rid=${t}`),e.timeout&&clearTimeout(e.timeout),e.reject?.(new Error("Port closed"));r(this,T).clear(),u(this,p,null),u(this,N,!1),r(this,w).clear()},fe=function(){let t=r(this,p);if(!t)return;let e=()=>o(this,l,Q).call(this,"peer-lost");try{"onclose"in t?t.onclose=e:typeof t.addEventListener=="function"?(t.addEventListener("close",e),u(this,B,e)):typeof t.on=="function"&&(t.on("close",e),u(this,B,e))}catch{}},Ee=function(){let t=r(this,p);if(t)try{r(this,B)?(typeof t.removeEventListener=="function"?t.removeEventListener("close",r(this,B)):typeof t.removeListener=="function"&&t.removeListener("close",r(this,B)),u(this,B,null)):"onclose"in t&&(t.onclose=null)}catch{}},de=function(t){try{return o(this,l,L).call(this,a.EVENTS.MESSAGE,{sid:r(this,b),rid:null,payload:t})}catch(e){return Promise.reject(e)}},Y=function(t,e,s=r(this,W)){return new Promise((i,n)=>{try{let h=F(),y=be(()=>{r(this,T).delete(h);let E=Array.isArray(e)?e[1]:t;console.warn(`[Port] request TIMEOUT \u2014 sid: ${r(this,b)}, rid: ${h}, event: ${E}, ms: ${s}`),n(new Error("Request timeout"))},s);r(this,T).set(h,{resolve:i,reject:n,timeout:y}),o(this,l,L).call(this,t,{sid:r(this,b),rid:h,payload:e})}catch(h){n(h)}})},pe=function(t){let e=t?.data;if(!Array.isArray(e)||e.length<2)return;let[s,i]=e||[];if(!(i?.sid&&i.sid!==r(this,b)))switch(s){case a.EVENTS.RESPONSE:o(this,l,ae).call(this,i?.rid,i?.payload,"resolve");return;case a.EVENTS.ERROR:let n=i?.payload instanceof Error?i.payload.message:String(i?.payload);o(this,l,ae).call(this,i?.rid,new Error(n),"reject");return;case a.EVENTS.MESSAGE:o(this,l,oe).call(this,i?.rid,i?.payload,!1);return;case a.EVENTS.GATHER:o(this,l,oe).call(this,i?.rid,i?.payload,!0);return;case a.EVENTS.ENABLE:o(this,l,me).call(this,i?.rid,i?.payload);return;case a.EVENTS.DISCONNECT:o(this,l,Q).call(this,"closed");return;default:return}},oe=async function(t,e,s=!1){try{let i=r(this,w).get(a.EVENTS.MESSAGE),n=i?await i(e,{isRequest:!!t,isGather:s}):null;return t?o(this,l,L).call(this,a.EVENTS.RESPONSE,{rid:t,payload:n??null}):void 0}catch(i){let n=i instanceof Error?i.message:String(i);o(this,l,L).call(this,a.EVENTS.ERROR,{rid:t,payload:n})}},ae=function(t,e,s){let i=r(this,T).get(t);i&&(i.timeout&&clearTimeout(i.timeout),r(this,T).delete(t),s==="resolve"?i.resolve(e):i.reject(e))},me=function(t,e){u(this,N,e);let s=r(this,w).get(a.EVENTS.ENABLE);return s&&s(e),o(this,l,L).call(this,a.EVENTS.RESPONSE,{rid:t,payload:e})},L=function(t,e){if(!r(this,p))return console.warn(`[Port] #postMessage but port is null \u2014 type: ${t}, sid: ${r(this,b)}`),!1;try{r(this,p).postMessage([t,e])}catch(s){return console.error(`[Port] #postMessage FAILED \u2014 type: ${t}, sid: ${r(this,b)}`,s.message),s?.name!=="DataCloneError"&&o(this,l,Q).call(this,"peer-lost"),!1}return!0},Se=function(t){console.error("onerror",t)},re(a,"defaultOptions",{primary:!1,maxRetries:10,baseDelay:200,maxDelay:2e3,jitter:.2,timeoutMs:1e3}),a);var g={HANDSHAKE:"HANDSHAKE",MESSAGE:"MESSAGE",GATHER:"GATHER",SUBSCRIBE:"SUBSCRIBE",UNSUBSCRIBE:"UNSUBSCRIBE",SYNC:"SYNC"};var Oe=ue("channelContracts",[Object]),m,R,K,$,v,G,V,O,j,U,C,ie,c,le,k,he,X,Z,_,ye,ee,J,te,we,ge,Ne,Be=(ie=class extends se{constructor(){super(...arguments);d(this,c);d(this,m,null);d(this,R,null);d(this,K,1e3);d(this,$,new Map);d(this,v,new Map);d(this,G,[]);d(this,V,!1);d(this,O,null);d(this,j,!1);d(this,U,null);d(this,C,{enable:new Set,disable:new Set,connect:new Set,disconnect:new Set});d(this,ee,async([t,e,s,i,n])=>{let h=[];switch(t){case g.MESSAGE:let y=r(this,v).get(e);if(y)for(let E of y){if(!o(this,c,Ne).call(this,e,s,E.schema))continue;let S=await E.subscriber(...s);h.push(S),E.once&&r(this,v).get(e).delete(E)}break;case g.SUBSCRIBE:case g.UNSUBSCRIBE:s!=null?r(this,$).set(e,s):r(this,$).delete(e);break}return h.length>0?h[0]:null});d(this,J,(t,e,s)=>{switch(t){case"ENABLE":e===!0?r(this,C).enable.forEach(i=>i(s)):r(this,C).disable.forEach(i=>i(s));break;case"CONNECT":r(this,C).connect.forEach(i=>i(s));break}});d(this,te,t=>{console.error("Channel error:",t)})}initialize(t,e){if(e.port!=null&&!z(e.port))throw new Error("Configured port must have postMessage");if(u(this,R,e.port),u(this,K,e.timeout??1e3),e.subscriptions&&e.subscriptions.length)for(let s of e.subscriptions)r(this,G).push(s)}actions(){let t={ready:()=>r(this,V),portProvider:e=>{if(typeof e!="function")throw new Error("portProvider must be a function");return u(this,O,e),t},connect:async(e,s)=>{try{if(u(this,R,e??r(this,R)),z(r(this,R))||r(this,O)&&u(this,R,await r(this,O).call(this)),!z(r(this,R)))throw new Error("No port provided and no portProvider set");if(r(this,m)){let n=r(this,m);u(this,m,null),u(this,V,!1),n.close()}u(this,m,await Ae.connect({port:r(this,R),options:{timeoutMs:r(this,K)}}));let i=r(this,m);i.onMessage(async n=>await r(this,ee).call(this,n)),i.onEnable(n=>r(this,J).call(this,"ENABLE",n,t)),i.onError(r(this,te)),i.onDisconnect(n=>{r(this,m)===i&&o(this,c,we).call(this,n)}),u(this,V,!0);for(let[n,h]of r(this,v)){let y;for(let E of h)E.timeoutMs!==void 0&&(y===void 0||E.timeoutMs>y)&&(y=E.timeoutMs);r(this,m).emit([g.SUBSCRIBE,n,y])}if(r(this,G).length>0){let n=r(this,G);u(this,G,[]);for(let h of n)o(this,c,le).call(this,h)}if(await o(this,c,ye).call(this),r(this,J).call(this,"CONNECT",!0,t),s&&typeof s=="function"){let n=s(t);typeof n=="function"&&u(this,O,n),s=null}return t}catch(i){return console.error("Channel error:",i),!1}},reconnect:e=>{if(!z(e))throw new Error("reconnect requires a valid port");return t.connect(e)},onEnable:e=>{if(typeof e!="function")throw new Error("Listener must be a function");return r(this,C).enable.add(e),()=>r(this,C).enable.delete(e)},onDisable:e=>{if(typeof e!="function")throw new Error("Listener must be a function");return r(this,C).disable.add(e),()=>r(this,C).disable.delete(e)},onDisconnect:e=>{if(typeof e!="function")throw new Error("Listener must be a function");return r(this,C).disconnect.add(e),()=>r(this,C).disconnect.delete(e)},disconnect:()=>{if(r(this,m)){u(this,O,null),r(this,C).disconnect.forEach(e=>e("closed",t));for(let e of r(this,v).keys())r(this,m).emit([g.UNSUBSCRIBE,e]);r(this,m).close(),u(this,m,null),u(this,V,!1),r(this,v).clear(),r(this,$).clear(),u(this,G,[])}},use:(...e)=>{if(r(this,V)){for(let s of e)o(this,c,le).call(this,s);return t}for(let s of e)r(this,G).push(s);return t},publish:(e,...s)=>(o(this,c,X).call(this,g.MESSAGE,e,s),t),request:(e,...s)=>o(this,c,Z).call(this,g.MESSAGE,e,s),gather:(e,...s)=>o(this,c,_).call(this,g.GATHER,e,s),subscribe:(e,s)=>o(this,c,k).call(this,e,void 0,s,!1),subscribeOnce:(e,s)=>o(this,c,k).call(this,e,void 0,s,!0),unsubscribe:(e,s)=>o(this,c,he).call(this,e,s),to:(...e)=>({publish:(s,...i)=>{o(this,c,X).call(this,g.MESSAGE,s,i,e)},request:(s,...i)=>o(this,c,Z).call(this,g.MESSAGE,s,i,e),gather:(s,...i)=>o(this,c,_).call(this,g.GATHER,s,i,e)}),namespace:e=>({publish:(s,...i)=>{let n=e?`${e}/${s}`:s;return o(this,c,X).call(this,g.MESSAGE,n,i),t},request:(s,...i)=>{let n=e?`${e}/${s}`:s;return o(this,c,Z).call(this,g.MESSAGE,n,i)},gather:(s,...i)=>{let n=e?`${e}/${s}`:s;return o(this,c,_).call(this,g.GATHER,n,i)},subscribe:(s,i)=>{let n=e?`${e}/${s}`:s;return o(this,c,k).call(this,n,void 0,i,!1),t},subscribeOnce:(s,i)=>{let n=e?`${e}/${s}`:s;return o(this,c,k).call(this,n,void 0,i,!0),t},unsubscribe:(s,i)=>{let n=e?`${e}/${s}`:s;return o(this,c,he).call(this,n,i),t}})};return u(this,U,t),t}},m=new WeakMap,R=new WeakMap,K=new WeakMap,$=new WeakMap,v=new WeakMap,G=new WeakMap,V=new WeakMap,O=new WeakMap,j=new WeakMap,U=new WeakMap,C=new WeakMap,c=new WeakSet,le=function(t){if(t&&typeof t=="function"){let e=t._name,s=t(this.inject),i=Object.entries(s);for(let[n,h]of i){let{handler:y,schema:E,namespace:S,once:I,timeoutMs:P}=h,A=S?`${S}/${e}:${n}`:`${e}:${n}`,M=(...x)=>{try{return y(...x)}catch(H){console.error(`Errow with ${A}:`,H)}};o(this,c,k).call(this,A,E,M,I,P)}}},k=function(t,e,s,i=!1,n=void 0){r(this,v).has(t)||r(this,v).set(t,new Set);let h={event:t,schema:e,subscriber:s,once:i,timeoutMs:n};return r(this,v).get(t).add(h),r(this,m)&&r(this,m).emit([g.SUBSCRIBE,t,n]),()=>r(this,v).get(t)?.delete(h)},he=function(t,e){if(!r(this,v).has(t))return;let s=r(this,v).get(t);for(let i of s.values())if(i.subscriber===e)return s.delete(i),e},X=function(t,e,s,i=null){if(!r(this,m)){console.warn(`[Channel] publish "${e}" dropped \u2014 not connected`);return}r(this,m).emit([t,e,s,i])},Z=function(t,e,s,i=null){return r(this,m)?r(this,m).request([t,e,s,i],r(this,$).get(e)):Promise.reject(new Error(`Channel not connected \u2014 request "${e}" dropped`))},_=function(t,e,s,i=null){return r(this,m)?r(this,m).gather([t,e,s,i],r(this,$).get(e)):Promise.reject(new Error(`Channel not connected \u2014 gather "${e}" dropped`))},ye=async function(){try{let t=await r(this,m).request([g.SYNC]);if(Array.isArray(t))for(let[e,s]of t)r(this,$).set(e,s)}catch{}},ee=new WeakMap,J=new WeakMap,te=new WeakMap,we=function(t){u(this,m,null),u(this,V,!1),r(this,$).clear(),r(this,C).disconnect.forEach(e=>{try{e(t,r(this,U))}catch(s){console.error("Channel onDisconnect listener error:",s)}}),o(this,c,ge).call(this)},ge=async function(){if(!(r(this,j)||!r(this,O))){u(this,j,!0);try{let t=await r(this,O).call(this);if(!z(t))throw new Error("portProvider did not return a usable port");await r(this,U).connect(t)}catch(t){console.error("[Channel] reconnect failed:",t?.message??t)}finally{u(this,j,!1)}}},Ne=function(t,e,s){if(s===void 0||s==="*"||s===null||e===void 0)return!0;if(Array.isArray(s)){if(s.length===1&&s[0]==="*")return!0;let i=s.length,n=e.length;if(i!==n)return console.warn(`
2
- Event:`,t,`
3
- Expected:`,s,`
4
- Received:`,e.map(h=>typeof h)),!1;for(let h=0;h<i;h++){let y=s[h],E=e[h],S;if(Array.isArray(E)?S="Array":E===null?S="null":S=Object.prototype.toString.call(E).slice(8,-1),y==="Object"&&S==="Array"||y!==S)return console.warn(`
5
- Event:`,t,`
6
- Value:`,E),!1}}return!0},re(ie,"manifest",{name:"Channel",dependencies:[],version:"1.0.0",namespace:"channel",description:"Channel extension for message passing between systems",defaults:{port:null,subscriptions:[],timeout:1e3}}),ie);export{Oe as a,Be as b};
@@ -1 +0,0 @@
1
- import{a as m}from"./chunk-J5QMLA3Z.js";import{e as u}from"./chunk-2BGFXNGU.js";import{a as c}from"./chunk-TPCJQIUG.js";function p(o,n){return o.has([n])?o.get(["app","children"])?.includes(n)?"root":o.get(["temp","children"])?.includes(n)?"temp":o.get(["components","children"])?.includes(n)?"components":"nested":null}function l(o,n,r,e){let t=o.get([n]);if(!t||!t.bounds)return!0;if(e==="instance")return!1;let i=t.type==="component";if(e==="root"||e==="temp")return!i;if(e==="after"||e==="before"){let f=p(o,r);return i?f==="components":f==="root"||f==="temp"}return e==="firstChildOf"||e==="lastChildOf"?i?r==="components":r==="app"||r==="temp":!1}function s(o,n){return o.update(["app","children"],(r=[])=>r.indexOf(n)===-1?[...r,n]:r),u(o,n,"app"),!0}function b(o,n,r){if(!c(o,r)||!c(o,n))return;let e=o.get([n,"ex"])??o.get([n,"type"]);if(m(o,r,e)){if(!l(o,n,r,"lastChildOf")){s(o,n);return}return o.update([r,"children"],(t=[])=>{let i=t.indexOf(n);if(i!==-1){let f=[...t];return f.splice(i,1),[...f,n]}return[...t,n]}),u(o,n,r),!0}}export{p as a,l as b,s as c,b as d};
@@ -1 +0,0 @@
1
- import{b as d}from"./chunk-NDUX5RLD.js";import{d as c}from"./chunk-34CHXN5I.js";var m=[{key:"iPhone 15",category:"phone",width:393,height:852},{key:"iPhone SE",category:"phone",width:375,height:667},{key:"Pixel 8",category:"phone",width:412,height:915},{key:"Galaxy S24",category:"phone",width:360,height:780},{key:"iPad Air",category:"tablet",width:820,height:1180},{key:"iPad Mini",category:"tablet",width:768,height:1024},{key:"Surface Pro",category:"tablet",width:912,height:1368},{key:"Desktop",category:"desktop",width:1280,height:800},{key:"Desktop Large",category:"desktop",width:1920,height:1080},{key:"custom",category:"custom",width:null,height:null}];function p(e){return m.find(t=>t.key===e)??null}function l(){return m.map(e=>e.key)}var g={width:360,height:740,x:0,y:0};function u(e,t={}){if(e==="custom")return{name:t.name||"Custom",bounds:{width:t.width??g.width,height:t.height??g.height,x:0,y:0}};let r=p(e);if(!r)throw new Error(`Unknown frame preset "${e}". Available: ${l().join(", ")}`);return{name:e,bounds:{width:r.width,height:r.height,x:0,y:0}}}function k(e={}){let t=e.frame??e.viewport;if(!t)return e;let{frame:r,viewport:o,width:i,height:h,name:y,bounds:n,...w}=e,{name:f,bounds:a}=u(t,{name:y,width:i,height:h});return{...w,frame:t,name:f,bounds:{x:n?.x??a.x??0,y:n?.y??a.y??0,width:n?.width??a.width,height:n?.height??a.height}}}function s(e,t,r={}){let o=t==="frame"?k(r):r,[i,h]=d(t,o);return t==="frame"&&(h.route={path:`${i}`}),e.set([i],h),i}function O(e,t,r,o="app"){let i=s(e,t,r);return c(e,i,o),i}export{m as a,p as b,l as c,u as d,s as e,O as f};