@jucie.io/cli 1.0.11 → 1.0.22

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 (875) hide show
  1. package/dist/interactivity.md +51 -13
  2. package/dist/jucie.js +581 -228
  3. package/dist/layout.md +83 -24
  4. package/dist/prerenderWorker.js +13 -0
  5. package/dist/stage/library/preact.js +53 -0
  6. package/dist/stage/library/react.js +53 -0
  7. package/dist/stage/library/vue.js +53 -0
  8. package/dist/stage/prod.js +53 -1
  9. package/dist/stage/sdk/chunks/chunk-6BTG63JN.js +1 -0
  10. package/dist/stage/sdk/chunks/chunk-7YIGPKNU.js +1 -0
  11. package/dist/stage/sdk/chunks/chunk-IIZ233AH.js +1 -0
  12. package/dist/stage/sdk/preact-server.js +1 -0
  13. package/dist/stage/sdk/preact.js +1 -0
  14. package/dist/stage/sdk/react-server.js +1 -0
  15. package/dist/stage/sdk/react.js +1 -0
  16. package/dist/stage/sdk/vue-server.js +1 -0
  17. package/dist/stage/sdk/vue.js +1 -0
  18. package/dist/stage/server.js +53 -0
  19. package/dist/stage/styles.js +11845 -0
  20. package/dist/stage-bundles/preact/chunks/aiAttachmentContracts-S6BKHEJ6.js +1 -0
  21. package/dist/stage-bundles/preact/chunks/aiMessagesContracts-RZ3KTCRZ.js +1 -0
  22. package/dist/stage-bundles/preact/chunks/aiRelay-6QWC3MID.js +1 -0
  23. package/dist/stage-bundles/preact/chunks/aiSessionContracts-ISZHL5U5.js +1 -0
  24. package/dist/stage-bundles/preact/chunks/assets-4NXDKJMC.js +1 -0
  25. package/dist/stage-bundles/preact/chunks/capture-MXL3B5OM.js +1 -0
  26. package/dist/stage-bundles/preact/chunks/chunk-3Q3DRUNQ.js +1 -0
  27. package/dist/stage-bundles/preact/chunks/chunk-426Z5MME.js +9 -0
  28. package/dist/stage-bundles/preact/chunks/chunk-4WXMFOGZ.js +1 -0
  29. package/dist/stage-bundles/preact/chunks/chunk-5H3EE23B.js +1 -0
  30. package/dist/stage-bundles/preact/chunks/chunk-5HNN2HVX.js +1 -0
  31. package/dist/stage-bundles/preact/chunks/chunk-6J3NV2ZA.js +1 -0
  32. package/dist/stage-bundles/preact/chunks/chunk-BXWISJ2Z.js +1 -0
  33. package/dist/stage-bundles/preact/chunks/chunk-CNULBMOT.js +99 -0
  34. package/dist/stage-bundles/preact/chunks/chunk-DLROTED3.js +1 -0
  35. package/dist/stage-bundles/preact/chunks/chunk-DUPQKWW3.js +3 -0
  36. package/dist/stage-bundles/preact/chunks/chunk-FEFZSXXM.js +1 -0
  37. package/dist/stage-bundles/preact/chunks/chunk-FGKRC2QO.js +4 -0
  38. package/dist/stage-bundles/preact/chunks/chunk-FWEUCYZO.js +1 -0
  39. package/dist/stage-bundles/preact/chunks/chunk-GCPKA3IC.js +1 -0
  40. package/dist/stage-bundles/preact/chunks/chunk-KUZTBTFR.js +1 -0
  41. package/dist/stage-bundles/preact/chunks/chunk-P722OZCF.js +1 -0
  42. package/dist/stage-bundles/preact/chunks/chunk-RDRAQE76.js +1 -0
  43. package/dist/stage-bundles/preact/chunks/chunk-RQACOEIA.js +1 -0
  44. package/dist/stage-bundles/preact/chunks/{chunk-RYWOKFM7.js → chunk-S7MEYFKB.js} +1 -1
  45. package/dist/stage-bundles/preact/chunks/chunk-TKHZCD63.js +1 -0
  46. package/dist/stage-bundles/preact/chunks/chunk-UNPHH2YK.js +7 -0
  47. package/dist/stage-bundles/preact/chunks/chunk-WN5EDULP.js +1 -0
  48. package/dist/stage-bundles/preact/chunks/chunk-YQ22OWEN.js +6 -0
  49. package/dist/stage-bundles/preact/chunks/{chunk-NRRFAMFA.js → chunk-ZDH2DALT.js} +1 -1
  50. package/dist/stage-bundles/preact/chunks/contentEditor-KSOW7DQ4.js +1 -0
  51. package/dist/stage-bundles/preact/chunks/design-5WJ7WCTU.js +70 -0
  52. package/dist/stage-bundles/preact/chunks/files-2IVIODQO.js +1 -0
  53. package/dist/stage-bundles/preact/chunks/history-AJWJFNTH.js +1 -0
  54. package/dist/stage-bundles/preact/chunks/main-3EOYBBCF.js +1 -0
  55. package/dist/stage-bundles/preact/chunks/main-4GJ7OQPP.js +1 -0
  56. package/dist/stage-bundles/preact/chunks/main-COYGSKNQ.js +1 -0
  57. package/dist/stage-bundles/preact/chunks/main-DEGR6IFX.js +1 -0
  58. package/dist/stage-bundles/preact/chunks/main-QJ4F72CN.js +1 -0
  59. package/dist/stage-bundles/preact/chunks/main-Y73Z2R2Q.js +1 -0
  60. package/dist/stage-bundles/preact/chunks/nodeGraph-MIYBM2ME.js +1 -0
  61. package/dist/stage-bundles/preact/chunks/preview-MRYXCFFB.js +1 -0
  62. package/dist/stage-bundles/preact/chunks/sync-M5DHAJKK.js +1 -0
  63. package/dist/stage-bundles/preact/chunks/user-RPWZUUCN.js +1 -0
  64. package/dist/stage-bundles/preact/chunks/viewport-EE2UKHNS.js +1 -0
  65. package/dist/stage-bundles/preact/chunks/virtual_empty-main-4HFN7X6Y.js +1 -0
  66. package/dist/stage-bundles/preact/chunks/window-SHWTQPJX.js +1 -0
  67. package/dist/stage-bundles/preact/chunks/workbench-PI2NQ6WK.js +1 -0
  68. package/dist/stage-bundles/preact/entry.js +1 -1
  69. package/dist/stage-bundles/preact/framework-compat.js +1 -1
  70. package/dist/stage-bundles/preact/framework-hooks.js +1 -1
  71. package/dist/stage-bundles/preact/framework-jsx-runtime.js +1 -1
  72. package/dist/stage-bundles/preact/framework.js +1 -1
  73. package/dist/stage-bundles/preact/reactive.js +1 -0
  74. package/dist/stage-bundles/preact/sdk.js +1 -1
  75. package/dist/stage-bundles/react/chunks/aiAttachmentContracts-S6BKHEJ6.js +1 -0
  76. package/dist/stage-bundles/react/chunks/aiMessagesContracts-RZ3KTCRZ.js +1 -0
  77. package/dist/stage-bundles/react/chunks/aiRelay-6QWC3MID.js +1 -0
  78. package/dist/stage-bundles/react/chunks/aiSessionContracts-ISZHL5U5.js +1 -0
  79. package/dist/stage-bundles/react/chunks/assets-4NXDKJMC.js +1 -0
  80. package/dist/stage-bundles/react/chunks/capture-SX5LMYTU.js +1 -0
  81. package/dist/stage-bundles/react/chunks/chunk-3Q3DRUNQ.js +1 -0
  82. package/dist/stage-bundles/react/chunks/chunk-426Z5MME.js +9 -0
  83. package/dist/stage-bundles/react/chunks/chunk-4WXMFOGZ.js +1 -0
  84. package/dist/stage-bundles/react/chunks/chunk-5FKTA2K4.js +45 -0
  85. package/dist/stage-bundles/react/chunks/chunk-5HNN2HVX.js +1 -0
  86. package/dist/stage-bundles/react/chunks/chunk-6J3NV2ZA.js +1 -0
  87. package/dist/stage-bundles/react/chunks/chunk-COZYLIUS.js +1 -0
  88. package/dist/stage-bundles/react/chunks/chunk-DLROTED3.js +1 -0
  89. package/dist/stage-bundles/react/chunks/chunk-DUPQKWW3.js +3 -0
  90. package/dist/stage-bundles/react/chunks/chunk-FEFZSXXM.js +1 -0
  91. package/dist/stage-bundles/react/chunks/chunk-FGKRC2QO.js +4 -0
  92. package/dist/stage-bundles/react/chunks/chunk-FWEUCYZO.js +1 -0
  93. package/dist/stage-bundles/react/chunks/chunk-GCPKA3IC.js +1 -0
  94. package/dist/stage-bundles/react/chunks/{chunk-5HITMZZP.js → chunk-HBUZBWXS.js} +1 -1
  95. package/dist/stage-bundles/react/chunks/chunk-IN7T7JOC.js +1 -0
  96. package/dist/stage-bundles/react/chunks/chunk-KUZTBTFR.js +1 -0
  97. package/dist/stage-bundles/react/chunks/{chunk-76SRFCJO.js → chunk-LGKXPMSS.js} +1 -1
  98. package/dist/stage-bundles/react/chunks/chunk-P722OZCF.js +1 -0
  99. package/dist/stage-bundles/react/chunks/{chunk-FCMIFWSU.js → chunk-PWVNILVW.js} +1 -1
  100. package/dist/stage-bundles/react/chunks/chunk-RDRAQE76.js +1 -0
  101. package/dist/stage-bundles/react/chunks/chunk-TKHZCD63.js +1 -0
  102. package/dist/stage-bundles/react/chunks/chunk-UNPHH2YK.js +7 -0
  103. package/dist/stage-bundles/react/chunks/chunk-UQWACM5R.js +1 -0
  104. package/dist/stage-bundles/react/chunks/chunk-YQ22OWEN.js +6 -0
  105. package/dist/stage-bundles/react/chunks/contentEditor-KSOW7DQ4.js +1 -0
  106. package/dist/stage-bundles/react/chunks/design-PLV3PDV6.js +70 -0
  107. package/dist/stage-bundles/react/chunks/files-2IVIODQO.js +1 -0
  108. package/dist/stage-bundles/react/chunks/history-AJWJFNTH.js +1 -0
  109. package/dist/stage-bundles/react/chunks/main-3EOYBBCF.js +1 -0
  110. package/dist/stage-bundles/react/chunks/main-4GJ7OQPP.js +1 -0
  111. package/dist/stage-bundles/react/chunks/main-COYGSKNQ.js +1 -0
  112. package/dist/stage-bundles/react/chunks/main-DEGR6IFX.js +1 -0
  113. package/dist/stage-bundles/react/chunks/main-QJ4F72CN.js +1 -0
  114. package/dist/stage-bundles/react/chunks/main-Y73Z2R2Q.js +1 -0
  115. package/dist/stage-bundles/react/chunks/nodeGraph-MIYBM2ME.js +1 -0
  116. package/dist/stage-bundles/react/chunks/preview-GQEX7ZIJ.js +1 -0
  117. package/dist/stage-bundles/react/chunks/sync-M5DHAJKK.js +1 -0
  118. package/dist/stage-bundles/react/chunks/user-RPWZUUCN.js +1 -0
  119. package/dist/stage-bundles/react/chunks/viewport-EE2UKHNS.js +1 -0
  120. package/dist/stage-bundles/react/chunks/virtual_empty-main-4HFN7X6Y.js +1 -0
  121. package/dist/stage-bundles/react/chunks/window-SHWTQPJX.js +1 -0
  122. package/dist/stage-bundles/react/chunks/workbench-BXYMXCNQ.js +1 -0
  123. package/dist/stage-bundles/react/entry.js +1 -1
  124. package/dist/stage-bundles/react/framework-dom-client.js +1 -1
  125. package/dist/stage-bundles/react/framework-dom.js +1 -1
  126. package/dist/stage-bundles/react/framework-jsx-runtime.js +1 -1
  127. package/dist/stage-bundles/react/framework.js +1 -1
  128. package/dist/stage-bundles/react/reactive.js +1 -0
  129. package/dist/stage-bundles/react/sdk.js +1 -1
  130. package/dist/stage-bundles/vue/chunks/aiAttachmentContracts-S6BKHEJ6.js +1 -0
  131. package/dist/stage-bundles/vue/chunks/aiMessagesContracts-RZ3KTCRZ.js +1 -0
  132. package/dist/stage-bundles/vue/chunks/aiRelay-6QWC3MID.js +1 -0
  133. package/dist/stage-bundles/vue/chunks/aiSessionContracts-ISZHL5U5.js +1 -0
  134. package/dist/stage-bundles/vue/chunks/assets-4NXDKJMC.js +1 -0
  135. package/dist/stage-bundles/vue/chunks/capture-BNTHDU5P.js +1 -0
  136. package/dist/stage-bundles/vue/chunks/chunk-2CVBY2T5.js +99 -0
  137. package/dist/stage-bundles/vue/chunks/chunk-3Q3DRUNQ.js +1 -0
  138. package/dist/stage-bundles/vue/chunks/chunk-4WXMFOGZ.js +1 -0
  139. package/dist/stage-bundles/vue/chunks/chunk-5HNN2HVX.js +1 -0
  140. package/dist/stage-bundles/vue/chunks/chunk-5Q537YU2.js +9 -0
  141. package/dist/stage-bundles/vue/chunks/chunk-6J3NV2ZA.js +1 -0
  142. package/dist/stage-bundles/vue/chunks/chunk-BAARNJD7.js +1 -0
  143. package/dist/stage-bundles/vue/chunks/chunk-DLROTED3.js +1 -0
  144. package/dist/stage-bundles/vue/chunks/chunk-DUPQKWW3.js +3 -0
  145. package/dist/stage-bundles/vue/chunks/chunk-EPZVOVTF.js +1 -0
  146. package/dist/stage-bundles/vue/chunks/chunk-FEFZSXXM.js +1 -0
  147. package/dist/stage-bundles/vue/chunks/chunk-FGKRC2QO.js +4 -0
  148. package/dist/stage-bundles/vue/chunks/chunk-FWEUCYZO.js +1 -0
  149. package/dist/stage-bundles/vue/chunks/chunk-GCPKA3IC.js +1 -0
  150. package/dist/stage-bundles/vue/chunks/chunk-KUZTBTFR.js +1 -0
  151. package/dist/stage-bundles/vue/chunks/chunk-P722OZCF.js +1 -0
  152. package/dist/stage-bundles/vue/chunks/chunk-QZFBMONF.js +1 -0
  153. package/dist/stage-bundles/vue/chunks/chunk-TKHZCD63.js +1 -0
  154. package/dist/stage-bundles/vue/chunks/chunk-UNPHH2YK.js +7 -0
  155. package/dist/stage-bundles/vue/chunks/chunk-XIPQ5BT3.js +1 -0
  156. package/dist/stage-bundles/vue/chunks/chunk-YQ22OWEN.js +6 -0
  157. package/dist/stage-bundles/vue/chunks/{chunk-M3OE4LWW.js → chunk-ZNG3HSBM.js} +1 -1
  158. package/dist/stage-bundles/vue/chunks/contentEditor-WMYXHKRR.js +1 -0
  159. package/dist/stage-bundles/vue/chunks/design-N46CCFRQ.js +70 -0
  160. package/dist/stage-bundles/vue/chunks/files-2IVIODQO.js +1 -0
  161. package/dist/stage-bundles/vue/chunks/history-AJWJFNTH.js +1 -0
  162. package/dist/stage-bundles/vue/chunks/main-3EOYBBCF.js +1 -0
  163. package/dist/stage-bundles/vue/chunks/main-4GJ7OQPP.js +1 -0
  164. package/dist/stage-bundles/vue/chunks/main-COYGSKNQ.js +1 -0
  165. package/dist/stage-bundles/vue/chunks/main-DEGR6IFX.js +1 -0
  166. package/dist/stage-bundles/vue/chunks/main-IDHTCWLF.js +1 -0
  167. package/dist/stage-bundles/vue/chunks/main-Y73Z2R2Q.js +1 -0
  168. package/dist/stage-bundles/vue/chunks/nodeGraph-MIYBM2ME.js +1 -0
  169. package/dist/stage-bundles/vue/chunks/preview-5K5EJBYM.js +1 -0
  170. package/dist/stage-bundles/vue/chunks/sync-M5DHAJKK.js +1 -0
  171. package/dist/stage-bundles/vue/chunks/user-RPWZUUCN.js +1 -0
  172. package/dist/stage-bundles/vue/chunks/viewport-EE2UKHNS.js +1 -0
  173. package/dist/stage-bundles/vue/chunks/virtual_empty-main-4HFN7X6Y.js +1 -0
  174. package/dist/stage-bundles/vue/chunks/window-SHWTQPJX.js +1 -0
  175. package/dist/stage-bundles/vue/chunks/workbench-OX4YXOA5.js +1 -0
  176. package/dist/stage-bundles/vue/entry.js +1 -1
  177. package/dist/stage-bundles/vue/framework-jsx-runtime.js +1 -1
  178. package/dist/stage-bundles/vue/framework.js +1 -1
  179. package/dist/stage-bundles/vue/reactive.js +1 -0
  180. package/dist/stage-bundles/vue/sdk.js +1 -1
  181. package/dist/stage-src/dev.js +15 -0
  182. package/dist/workflow.md +7 -0
  183. package/package.json +29 -27
  184. package/dist/stage/chunks/addAction-FSI6BXB4.js +0 -1
  185. package/dist/stage/chunks/addAnimationBinding-Y4VROY4L.js +0 -1
  186. package/dist/stage/chunks/addAttribute-ZPJGNPHK.js +0 -1
  187. package/dist/stage/chunks/addComponent-VWD6O7CQ.js +0 -1
  188. package/dist/stage/chunks/addComputed-FQVHDUIE.js +0 -1
  189. package/dist/stage/chunks/addEvent-54ZE2DVJ.js +0 -1
  190. package/dist/stage/chunks/addLifecycleHook-VCCSTQ3G.js +0 -1
  191. package/dist/stage/chunks/addNode-IWTESHU3.js +0 -1
  192. package/dist/stage/chunks/addOption-ISGTUY6U.js +0 -1
  193. package/dist/stage/chunks/addParamToRoute-CRDV7MVF.js +0 -1
  194. package/dist/stage/chunks/addState-N3MBR533.js +0 -1
  195. package/dist/stage/chunks/addStore-PHY52777.js +0 -1
  196. package/dist/stage/chunks/addToken-QSTDKYFU.js +0 -1
  197. package/dist/stage/chunks/addValue-NBDF57UK.js +0 -1
  198. package/dist/stage/chunks/aiAttachmentContracts-4GX7AD4P.js +0 -1
  199. package/dist/stage/chunks/aiMessagesContracts-3IZEU24J.js +0 -1
  200. package/dist/stage/chunks/aiRelay-FDHMGC33.js +0 -1
  201. package/dist/stage/chunks/aiSessionContracts-SCDHZZA3.js +0 -1
  202. package/dist/stage/chunks/assets-RXVS3AKR.js +0 -1
  203. package/dist/stage/chunks/capture-XQFI2T7B.js +0 -1
  204. package/dist/stage/chunks/chunk-2YZN7IFG.js +0 -1
  205. package/dist/stage/chunks/chunk-32WBU6VH.js +0 -1
  206. package/dist/stage/chunks/chunk-33W74KNB.js +0 -37
  207. package/dist/stage/chunks/chunk-45CXRNTO.js +0 -1
  208. package/dist/stage/chunks/chunk-45LFQ7GZ.js +0 -1
  209. package/dist/stage/chunks/chunk-4MTM6BM7.js +0 -1
  210. package/dist/stage/chunks/chunk-4XNQRZ5E.js +0 -1
  211. package/dist/stage/chunks/chunk-4Y2YKFNP.js +0 -1
  212. package/dist/stage/chunks/chunk-55KIFGBN.js +0 -1
  213. package/dist/stage/chunks/chunk-5GOTVZFC.js +0 -1
  214. package/dist/stage/chunks/chunk-5OOKGI32.js +0 -3
  215. package/dist/stage/chunks/chunk-5PUPZLDN.js +0 -1
  216. package/dist/stage/chunks/chunk-5SOTDESD.js +0 -1
  217. package/dist/stage/chunks/chunk-6EIGTDJQ.js +0 -1
  218. package/dist/stage/chunks/chunk-6ZZBJPN5.js +0 -1
  219. package/dist/stage/chunks/chunk-7L4V7JRT.js +0 -1
  220. package/dist/stage/chunks/chunk-AJVQKPCQ.js +0 -1
  221. package/dist/stage/chunks/chunk-ARGFDBBK.js +0 -1
  222. package/dist/stage/chunks/chunk-BEYPHEBR.js +0 -1
  223. package/dist/stage/chunks/chunk-BS35FNXF.js +0 -1
  224. package/dist/stage/chunks/chunk-BVAPODQ7.js +0 -5
  225. package/dist/stage/chunks/chunk-C3DY5XVP.js +0 -1
  226. package/dist/stage/chunks/chunk-CVDUFBBG.js +0 -1
  227. package/dist/stage/chunks/chunk-D3V5OTLH.js +0 -1
  228. package/dist/stage/chunks/chunk-D6NZE747.js +0 -1
  229. package/dist/stage/chunks/chunk-DCOWKGJI.js +0 -1
  230. package/dist/stage/chunks/chunk-DSKLC3WF.js +0 -1
  231. package/dist/stage/chunks/chunk-EO7UBT4B.js +0 -1
  232. package/dist/stage/chunks/chunk-EPBR3BES.js +0 -1
  233. package/dist/stage/chunks/chunk-FSECMWCM.js +0 -1
  234. package/dist/stage/chunks/chunk-FTRUORC5.js +0 -1
  235. package/dist/stage/chunks/chunk-G37FCH35.js +0 -1
  236. package/dist/stage/chunks/chunk-GDGHGTYN.js +0 -1
  237. package/dist/stage/chunks/chunk-GG4NWMR6.js +0 -1
  238. package/dist/stage/chunks/chunk-GIVV5ZCM.js +0 -1
  239. package/dist/stage/chunks/chunk-GURTWV7H.js +0 -1
  240. package/dist/stage/chunks/chunk-H3VC542J.js +0 -1
  241. package/dist/stage/chunks/chunk-HBEWYDHO.js +0 -1
  242. package/dist/stage/chunks/chunk-HI7ALMQD.js +0 -1
  243. package/dist/stage/chunks/chunk-IERYKQMJ.js +0 -1
  244. package/dist/stage/chunks/chunk-IEXI4PPB.js +0 -1
  245. package/dist/stage/chunks/chunk-K6PCHHH7.js +0 -1
  246. package/dist/stage/chunks/chunk-K7MC6G4X.js +0 -1
  247. package/dist/stage/chunks/chunk-KCVDFPJI.js +0 -1
  248. package/dist/stage/chunks/chunk-L4CU73MS.js +0 -1
  249. package/dist/stage/chunks/chunk-L7VQYHXR.js +0 -1
  250. package/dist/stage/chunks/chunk-LKQDYABR.js +0 -1
  251. package/dist/stage/chunks/chunk-LOILFK74.js +0 -55
  252. package/dist/stage/chunks/chunk-LOMYBRPE.js +0 -1
  253. package/dist/stage/chunks/chunk-LR6DSVPP.js +0 -1
  254. package/dist/stage/chunks/chunk-MLL2ANA6.js +0 -1
  255. package/dist/stage/chunks/chunk-MXIF2FGR.js +0 -1
  256. package/dist/stage/chunks/chunk-NYG3CJEJ.js +0 -1
  257. package/dist/stage/chunks/chunk-OB6WEYNB.js +0 -1
  258. package/dist/stage/chunks/chunk-ODSNVDNS.js +0 -1
  259. package/dist/stage/chunks/chunk-OPVVANFS.js +0 -1
  260. package/dist/stage/chunks/chunk-OWARHUEW.js +0 -1
  261. package/dist/stage/chunks/chunk-P3WBUN2B.js +0 -1
  262. package/dist/stage/chunks/chunk-P4ODI2G4.js +0 -1
  263. package/dist/stage/chunks/chunk-PU3DZ3MV.js +0 -1
  264. package/dist/stage/chunks/chunk-PUPSHZWC.js +0 -1
  265. package/dist/stage/chunks/chunk-QG2BGE2O.js +0 -1
  266. package/dist/stage/chunks/chunk-QTBRJH2Q.js +0 -1
  267. package/dist/stage/chunks/chunk-RZ74UWF3.js +0 -1
  268. package/dist/stage/chunks/chunk-SECM4LZZ.js +0 -1
  269. package/dist/stage/chunks/chunk-SMO45CB3.js +0 -1
  270. package/dist/stage/chunks/chunk-SRRJXNKG.js +0 -1
  271. package/dist/stage/chunks/chunk-TAMEB64F.js +0 -1
  272. package/dist/stage/chunks/chunk-TBDEUSP4.js +0 -1
  273. package/dist/stage/chunks/chunk-TEUB5MUS.js +0 -1
  274. package/dist/stage/chunks/chunk-TIIQLNVN.js +0 -1
  275. package/dist/stage/chunks/chunk-TS6FANUG.js +0 -1
  276. package/dist/stage/chunks/chunk-U2OFNNHI.js +0 -1
  277. package/dist/stage/chunks/chunk-U3IV5DRQ.js +0 -1
  278. package/dist/stage/chunks/chunk-V4F2T2VR.js +0 -1
  279. package/dist/stage/chunks/chunk-V7BNWQS6.js +0 -1
  280. package/dist/stage/chunks/chunk-VQ7C6EUZ.js +0 -1
  281. package/dist/stage/chunks/chunk-X6HJCJ3C.js +0 -1
  282. package/dist/stage/chunks/chunk-XKEDVW6X.js +0 -1
  283. package/dist/stage/chunks/chunk-YMUEID4R.js +0 -1
  284. package/dist/stage/chunks/chunk-YN5VQBDN.js +0 -1
  285. package/dist/stage/chunks/chunk-YZBMJY7E.js +0 -1
  286. package/dist/stage/chunks/chunk-ZCAGAEP2.js +0 -1
  287. package/dist/stage/chunks/chunk-ZEWKYCOX.js +0 -1
  288. package/dist/stage/chunks/clearDestination-P3FTW7VJ.js +0 -1
  289. package/dist/stage/chunks/clearName-EUYRSZED.js +0 -1
  290. package/dist/stage/chunks/clearOptionsExpression-DF4IPDKH.js +0 -1
  291. package/dist/stage/chunks/clearRender-IUKXUT2E.js +0 -1
  292. package/dist/stage/chunks/clearRepeat-HR5C5VWU.js +0 -1
  293. package/dist/stage/chunks/contentEditor-PCXXWARK.js +0 -1
  294. package/dist/stage/chunks/createAction-XVCUAVTP.js +0 -1
  295. package/dist/stage/chunks/createAnimation-YAXYGTZ2.js +0 -1
  296. package/dist/stage/chunks/createComputed-6XPJKJMP.js +0 -1
  297. package/dist/stage/chunks/createTextContent-BL7YGYP5.js +0 -1
  298. package/dist/stage/chunks/createValue-QMG7LOR4.js +0 -1
  299. package/dist/stage/chunks/design-SPZTUDPC.js +0 -15
  300. package/dist/stage/chunks/dev-24ZWZ22W.js +0 -1
  301. package/dist/stage/chunks/disconnectNode-OY65I4GB.js +0 -1
  302. package/dist/stage/chunks/history-BNHS2T3X.js +0 -1
  303. package/dist/stage/chunks/id-T5EU463K.js +0 -1
  304. package/dist/stage/chunks/main-BLNWJ3UJ.js +0 -1
  305. package/dist/stage/chunks/main-DDWQFH23.js +0 -1
  306. package/dist/stage/chunks/main-NTDWDKF7.js +0 -1
  307. package/dist/stage/chunks/main-TUNP7F4N.js +0 -1
  308. package/dist/stage/chunks/moveNodeToLastChildOf-PRI4OYRB.js +0 -1
  309. package/dist/stage/chunks/nodeGraph-ZXVLUHBH.js +0 -1
  310. package/dist/stage/chunks/normalizeEventName-6HVMB5GN.js +0 -1
  311. package/dist/stage/chunks/normalizeLayoutContext-OIXYBNTH.js +0 -1
  312. package/dist/stage/chunks/preview-EIG4E5G5.js +0 -1
  313. package/dist/stage/chunks/react-G5SWVCZA.js +0 -1
  314. package/dist/stage/chunks/removeAction-H3EDG2CG.js +0 -1
  315. package/dist/stage/chunks/removeAnimationBinding-JRXL2AOH.js +0 -1
  316. package/dist/stage/chunks/removeAttribute-6RYM7MYC.js +0 -1
  317. package/dist/stage/chunks/removeComputed-3HL3BXKY.js +0 -1
  318. package/dist/stage/chunks/removeEvent-CP3SVSHQ.js +0 -1
  319. package/dist/stage/chunks/removeLifecycleHook-Q76BUDFU.js +0 -1
  320. package/dist/stage/chunks/removeNode-OFMYW2LY.js +0 -1
  321. package/dist/stage/chunks/removeOption-Y6QYTQ7C.js +0 -1
  322. package/dist/stage/chunks/removeParamFromRoute-MHUMB7RO.js +0 -1
  323. package/dist/stage/chunks/removeState-HEDFV7HD.js +0 -1
  324. package/dist/stage/chunks/removeStore-BQDKUY3I.js +0 -1
  325. package/dist/stage/chunks/removeToken-6K5JDRMK.js +0 -1
  326. package/dist/stage/chunks/removeValue-OTRFOOIB.js +0 -1
  327. package/dist/stage/chunks/setDestination-3H4RDE7F.js +0 -1
  328. package/dist/stage/chunks/setHomePage-UZUWIELK.js +0 -1
  329. package/dist/stage/chunks/setHtmlId-V2DQ2Z6D.js +0 -1
  330. package/dist/stage/chunks/setName-QKDRLH7I.js +0 -1
  331. package/dist/stage/chunks/setNodeLayout-O53CNHES.js +0 -1
  332. package/dist/stage/chunks/setOptionsExpression-4NFPAI24.js +0 -1
  333. package/dist/stage/chunks/setRender-XQJWRRYD.js +0 -1
  334. package/dist/stage/chunks/setRepeat-PAW7YMSY.js +0 -1
  335. package/dist/stage/chunks/setTagName-Y7O7I6SO.js +0 -1
  336. package/dist/stage/chunks/updateAction-XSXILF2R.js +0 -1
  337. package/dist/stage/chunks/updateAnimationBinding-LQTVD3O6.js +0 -1
  338. package/dist/stage/chunks/updateAttribute-5MWAVQAV.js +0 -1
  339. package/dist/stage/chunks/updateBounds-3L2AJ72O.js +0 -1
  340. package/dist/stage/chunks/updateComputed-UALAJ4RF.js +0 -1
  341. package/dist/stage/chunks/updateEvent-NXMQSGDQ.js +0 -1
  342. package/dist/stage/chunks/updateHtml-AEMCHPUQ.js +0 -1
  343. package/dist/stage/chunks/updateLifecycleHook-6MCUOVJH.js +0 -1
  344. package/dist/stage/chunks/updateOption-JCNXPYXP.js +0 -1
  345. package/dist/stage/chunks/updateRoute-CI3GOLVJ.js +0 -1
  346. package/dist/stage/chunks/updateState-QJID3WQV.js +0 -1
  347. package/dist/stage/chunks/updateStyle-FR7K7R73.js +0 -1
  348. package/dist/stage/chunks/updateToken-JX6R3YU7.js +0 -1
  349. package/dist/stage/chunks/updateValue-2B5ZNGZI.js +0 -1
  350. package/dist/stage/chunks/user-LKHAFHX4.js +0 -1
  351. package/dist/stage/chunks/validateStorePayload-PJ5AD64S.js +0 -3
  352. package/dist/stage/chunks/viewport-ANZ3RTUP.js +0 -1
  353. package/dist/stage/chunks/window-RFC7WGLM.js +0 -1
  354. package/dist/stage/design.js +0 -1
  355. package/dist/stage/dev.js +0 -1
  356. package/dist/stage/preview.js +0 -1
  357. package/dist/stage-bundles/preact/chunks/addAction-EGLGEGTS.js +0 -1
  358. package/dist/stage-bundles/preact/chunks/addAnimationBinding-WCB5VZLU.js +0 -1
  359. package/dist/stage-bundles/preact/chunks/addAttribute-2MZ3OFUE.js +0 -1
  360. package/dist/stage-bundles/preact/chunks/addComponent-Y2AQ2FGZ.js +0 -1
  361. package/dist/stage-bundles/preact/chunks/addComputed-7JLBFD6I.js +0 -1
  362. package/dist/stage-bundles/preact/chunks/addEvent-HOBNKM2F.js +0 -1
  363. package/dist/stage-bundles/preact/chunks/addLifecycleHook-GHYL7FRH.js +0 -1
  364. package/dist/stage-bundles/preact/chunks/addNode-2E5QNYOA.js +0 -1
  365. package/dist/stage-bundles/preact/chunks/addOption-PVXGN7AJ.js +0 -1
  366. package/dist/stage-bundles/preact/chunks/addParamToRoute-VL2VOFZS.js +0 -1
  367. package/dist/stage-bundles/preact/chunks/addState-U2NWEGWV.js +0 -1
  368. package/dist/stage-bundles/preact/chunks/addStore-AQMFKH33.js +0 -1
  369. package/dist/stage-bundles/preact/chunks/addToken-XF2FFA52.js +0 -1
  370. package/dist/stage-bundles/preact/chunks/addValue-O7YXXMST.js +0 -1
  371. package/dist/stage-bundles/preact/chunks/aiAttachmentContracts-V3EW4BHI.js +0 -1
  372. package/dist/stage-bundles/preact/chunks/aiMessagesContracts-ZGHZJ7EU.js +0 -1
  373. package/dist/stage-bundles/preact/chunks/aiRelay-WDZAC42R.js +0 -1
  374. package/dist/stage-bundles/preact/chunks/aiSessionContracts-WAMOGHSG.js +0 -1
  375. package/dist/stage-bundles/preact/chunks/assets-NU56BTDG.js +0 -1
  376. package/dist/stage-bundles/preact/chunks/capture-XBPXL4U7.js +0 -1
  377. package/dist/stage-bundles/preact/chunks/chunk-2BGFXNGU.js +0 -1
  378. package/dist/stage-bundles/preact/chunks/chunk-34CHXN5I.js +0 -1
  379. package/dist/stage-bundles/preact/chunks/chunk-5CWWFBNY.js +0 -1
  380. package/dist/stage-bundles/preact/chunks/chunk-5GKIM3R4.js +0 -1
  381. package/dist/stage-bundles/preact/chunks/chunk-67H474GN.js +0 -1
  382. package/dist/stage-bundles/preact/chunks/chunk-6KW4HPGN.js +0 -1
  383. package/dist/stage-bundles/preact/chunks/chunk-6S7QQT47.js +0 -1
  384. package/dist/stage-bundles/preact/chunks/chunk-7UENQJSC.js +0 -5
  385. package/dist/stage-bundles/preact/chunks/chunk-7VDUBBVE.js +0 -1
  386. package/dist/stage-bundles/preact/chunks/chunk-A25WFH3U.js +0 -1
  387. package/dist/stage-bundles/preact/chunks/chunk-A52FDU5E.js +0 -1
  388. package/dist/stage-bundles/preact/chunks/chunk-ACPGC7BJ.js +0 -1
  389. package/dist/stage-bundles/preact/chunks/chunk-AMPHYXGT.js +0 -1
  390. package/dist/stage-bundles/preact/chunks/chunk-AS76ZLXK.js +0 -1
  391. package/dist/stage-bundles/preact/chunks/chunk-AYZAGKHN.js +0 -1
  392. package/dist/stage-bundles/preact/chunks/chunk-BL6GQ6ID.js +0 -1
  393. package/dist/stage-bundles/preact/chunks/chunk-BWJHUHDJ.js +0 -1
  394. package/dist/stage-bundles/preact/chunks/chunk-CAAW6MG4.js +0 -1
  395. package/dist/stage-bundles/preact/chunks/chunk-CC3CCH2E.js +0 -1
  396. package/dist/stage-bundles/preact/chunks/chunk-CNZYL2VV.js +0 -1
  397. package/dist/stage-bundles/preact/chunks/chunk-CXJ5APZF.js +0 -1
  398. package/dist/stage-bundles/preact/chunks/chunk-CYURWEXX.js +0 -1
  399. package/dist/stage-bundles/preact/chunks/chunk-DHPGPV5T.js +0 -1
  400. package/dist/stage-bundles/preact/chunks/chunk-DLHF7QB4.js +0 -1
  401. package/dist/stage-bundles/preact/chunks/chunk-E4RDZ324.js +0 -1
  402. package/dist/stage-bundles/preact/chunks/chunk-E6KR5RXO.js +0 -1
  403. package/dist/stage-bundles/preact/chunks/chunk-EPVRMHC2.js +0 -1
  404. package/dist/stage-bundles/preact/chunks/chunk-EWEPEODY.js +0 -1
  405. package/dist/stage-bundles/preact/chunks/chunk-EXXAK3BP.js +0 -1
  406. package/dist/stage-bundles/preact/chunks/chunk-F5MJNV7Y.js +0 -3
  407. package/dist/stage-bundles/preact/chunks/chunk-FAYUYASQ.js +0 -1
  408. package/dist/stage-bundles/preact/chunks/chunk-FCRFPWU3.js +0 -97
  409. package/dist/stage-bundles/preact/chunks/chunk-GEOQWCYL.js +0 -1
  410. package/dist/stage-bundles/preact/chunks/chunk-GK5XUHQG.js +0 -1
  411. package/dist/stage-bundles/preact/chunks/chunk-GM4D3DPT.js +0 -1
  412. package/dist/stage-bundles/preact/chunks/chunk-GUI7FIZD.js +0 -1
  413. package/dist/stage-bundles/preact/chunks/chunk-HAN4CMBX.js +0 -1
  414. package/dist/stage-bundles/preact/chunks/chunk-HCRWHPFW.js +0 -1
  415. package/dist/stage-bundles/preact/chunks/chunk-HE7IQLGK.js +0 -1
  416. package/dist/stage-bundles/preact/chunks/chunk-I57W7UZN.js +0 -1
  417. package/dist/stage-bundles/preact/chunks/chunk-IBDKDP7T.js +0 -1
  418. package/dist/stage-bundles/preact/chunks/chunk-ICWQHFOI.js +0 -1
  419. package/dist/stage-bundles/preact/chunks/chunk-IKKRB6BS.js +0 -1
  420. package/dist/stage-bundles/preact/chunks/chunk-IV6PINVX.js +0 -1
  421. package/dist/stage-bundles/preact/chunks/chunk-IW4KEJOF.js +0 -1
  422. package/dist/stage-bundles/preact/chunks/chunk-J5QMLA3Z.js +0 -1
  423. package/dist/stage-bundles/preact/chunks/chunk-JHWED3SX.js +0 -1
  424. package/dist/stage-bundles/preact/chunks/chunk-JRXMDYLE.js +0 -1
  425. package/dist/stage-bundles/preact/chunks/chunk-K5BNCYT7.js +0 -1
  426. package/dist/stage-bundles/preact/chunks/chunk-KISNK4R4.js +0 -1
  427. package/dist/stage-bundles/preact/chunks/chunk-KTWXYDG7.js +0 -1
  428. package/dist/stage-bundles/preact/chunks/chunk-LEELNBJC.js +0 -1
  429. package/dist/stage-bundles/preact/chunks/chunk-LHK7LQPZ.js +0 -1
  430. package/dist/stage-bundles/preact/chunks/chunk-LHON3DKO.js +0 -1
  431. package/dist/stage-bundles/preact/chunks/chunk-LUY5LC7Z.js +0 -1
  432. package/dist/stage-bundles/preact/chunks/chunk-MGH62JQ4.js +0 -1
  433. package/dist/stage-bundles/preact/chunks/chunk-MUZZUB5Y.js +0 -1
  434. package/dist/stage-bundles/preact/chunks/chunk-N6I4COF2.js +0 -1
  435. package/dist/stage-bundles/preact/chunks/chunk-NHY2XYCH.js +0 -1
  436. package/dist/stage-bundles/preact/chunks/chunk-NOTXZB5N.js +0 -1
  437. package/dist/stage-bundles/preact/chunks/chunk-NXBFOI3Z.js +0 -1
  438. package/dist/stage-bundles/preact/chunks/chunk-O24ISLGT.js +0 -1
  439. package/dist/stage-bundles/preact/chunks/chunk-OQM5TMCK.js +0 -1
  440. package/dist/stage-bundles/preact/chunks/chunk-PPDOTRNT.js +0 -1
  441. package/dist/stage-bundles/preact/chunks/chunk-PU62K33G.js +0 -1
  442. package/dist/stage-bundles/preact/chunks/chunk-PYIGBTL4.js +0 -6
  443. package/dist/stage-bundles/preact/chunks/chunk-Q3IER3MW.js +0 -1
  444. package/dist/stage-bundles/preact/chunks/chunk-Q3ZV7EKU.js +0 -1
  445. package/dist/stage-bundles/preact/chunks/chunk-QD56IMFS.js +0 -1
  446. package/dist/stage-bundles/preact/chunks/chunk-QFFVADTJ.js +0 -1
  447. package/dist/stage-bundles/preact/chunks/chunk-QJ33JO3T.js +0 -1
  448. package/dist/stage-bundles/preact/chunks/chunk-QKFDVU2Q.js +0 -1
  449. package/dist/stage-bundles/preact/chunks/chunk-QVVBKZW6.js +0 -1
  450. package/dist/stage-bundles/preact/chunks/chunk-RFFN4NF4.js +0 -1
  451. package/dist/stage-bundles/preact/chunks/chunk-TPCJQIUG.js +0 -1
  452. package/dist/stage-bundles/preact/chunks/chunk-TX5TCU2H.js +0 -1
  453. package/dist/stage-bundles/preact/chunks/chunk-UCLSDDOL.js +0 -1
  454. package/dist/stage-bundles/preact/chunks/chunk-UQFZUWFP.js +0 -1
  455. package/dist/stage-bundles/preact/chunks/chunk-XE3A5HPY.js +0 -1
  456. package/dist/stage-bundles/preact/chunks/chunk-XFHQ45KR.js +0 -1
  457. package/dist/stage-bundles/preact/chunks/chunk-XTAXESM6.js +0 -1
  458. package/dist/stage-bundles/preact/chunks/chunk-YB7FA4Y3.js +0 -1
  459. package/dist/stage-bundles/preact/chunks/chunk-YCGY2NRE.js +0 -1
  460. package/dist/stage-bundles/preact/chunks/chunk-YCMBBPKT.js +0 -1
  461. package/dist/stage-bundles/preact/chunks/chunk-Z3M6DQKZ.js +0 -1
  462. package/dist/stage-bundles/preact/chunks/chunk-ZUPNPSUB.js +0 -1
  463. package/dist/stage-bundles/preact/chunks/clearDestination-IGKNL7FN.js +0 -1
  464. package/dist/stage-bundles/preact/chunks/clearName-HJ7ZTHBU.js +0 -1
  465. package/dist/stage-bundles/preact/chunks/clearOptionsExpression-NZQFL64E.js +0 -1
  466. package/dist/stage-bundles/preact/chunks/clearRender-NPVDTNFA.js +0 -1
  467. package/dist/stage-bundles/preact/chunks/clearRepeat-7YFYZODP.js +0 -1
  468. package/dist/stage-bundles/preact/chunks/contentEditor-6WQFOUKV.js +0 -1
  469. package/dist/stage-bundles/preact/chunks/createAction-73YUTK3T.js +0 -1
  470. package/dist/stage-bundles/preact/chunks/createAnimation-2WQSMYT5.js +0 -1
  471. package/dist/stage-bundles/preact/chunks/createComputed-DMX7CJA3.js +0 -1
  472. package/dist/stage-bundles/preact/chunks/createTextContent-4Z4YATBO.js +0 -1
  473. package/dist/stage-bundles/preact/chunks/createValue-DXQSLOBG.js +0 -1
  474. package/dist/stage-bundles/preact/chunks/design-QOLOMJCH.js +0 -15
  475. package/dist/stage-bundles/preact/chunks/disconnectNode-2CLWVIQP.js +0 -1
  476. package/dist/stage-bundles/preact/chunks/history-VAAFKC4E.js +0 -1
  477. package/dist/stage-bundles/preact/chunks/id-ZIAZZ5AS.js +0 -1
  478. package/dist/stage-bundles/preact/chunks/main-K2WJEG5C.js +0 -1
  479. package/dist/stage-bundles/preact/chunks/main-KFGWT6OT.js +0 -1
  480. package/dist/stage-bundles/preact/chunks/main-MVCLW2IY.js +0 -1
  481. package/dist/stage-bundles/preact/chunks/main-ZXFODV6O.js +0 -1
  482. package/dist/stage-bundles/preact/chunks/moveNodeToLastChildOf-OZ6F2NPU.js +0 -1
  483. package/dist/stage-bundles/preact/chunks/nodeGraph-JS64VAAQ.js +0 -1
  484. package/dist/stage-bundles/preact/chunks/normalizeEventName-SNBYJDUY.js +0 -1
  485. package/dist/stage-bundles/preact/chunks/normalizeLayoutContext-WRK6FVHM.js +0 -1
  486. package/dist/stage-bundles/preact/chunks/preact-NBJKI6EE.js +0 -1
  487. package/dist/stage-bundles/preact/chunks/preview-AFX7D63A.js +0 -1
  488. package/dist/stage-bundles/preact/chunks/removeAction-T4M5EJN7.js +0 -1
  489. package/dist/stage-bundles/preact/chunks/removeAnimationBinding-AIISPC33.js +0 -1
  490. package/dist/stage-bundles/preact/chunks/removeAttribute-DCKZLM55.js +0 -1
  491. package/dist/stage-bundles/preact/chunks/removeComputed-WSA5GNVZ.js +0 -1
  492. package/dist/stage-bundles/preact/chunks/removeEvent-2YZ55HD6.js +0 -1
  493. package/dist/stage-bundles/preact/chunks/removeLifecycleHook-SBPJNF5P.js +0 -1
  494. package/dist/stage-bundles/preact/chunks/removeNode-5HXQ63V3.js +0 -1
  495. package/dist/stage-bundles/preact/chunks/removeOption-SYIFB4XW.js +0 -1
  496. package/dist/stage-bundles/preact/chunks/removeParamFromRoute-HAYP3WTT.js +0 -1
  497. package/dist/stage-bundles/preact/chunks/removeState-SGJVQ66N.js +0 -1
  498. package/dist/stage-bundles/preact/chunks/removeStore-YVBTGA3I.js +0 -1
  499. package/dist/stage-bundles/preact/chunks/removeToken-AIDV7DUM.js +0 -1
  500. package/dist/stage-bundles/preact/chunks/removeValue-UP5ZFN3U.js +0 -1
  501. package/dist/stage-bundles/preact/chunks/setDestination-NCPAVIIK.js +0 -1
  502. package/dist/stage-bundles/preact/chunks/setHomePage-O2JYOG6H.js +0 -1
  503. package/dist/stage-bundles/preact/chunks/setHtmlId-2W7YW47O.js +0 -1
  504. package/dist/stage-bundles/preact/chunks/setName-NKRZPBGG.js +0 -1
  505. package/dist/stage-bundles/preact/chunks/setNodeLayout-QNVAVAMX.js +0 -1
  506. package/dist/stage-bundles/preact/chunks/setOptionsExpression-K5EQXJEY.js +0 -1
  507. package/dist/stage-bundles/preact/chunks/setRender-7XMGQ7ZK.js +0 -1
  508. package/dist/stage-bundles/preact/chunks/setRepeat-WN4WZJUN.js +0 -1
  509. package/dist/stage-bundles/preact/chunks/setTagName-U6UJNJLE.js +0 -1
  510. package/dist/stage-bundles/preact/chunks/updateAction-3KSR6ZIJ.js +0 -1
  511. package/dist/stage-bundles/preact/chunks/updateAnimationBinding-HVVHLFBO.js +0 -1
  512. package/dist/stage-bundles/preact/chunks/updateAttribute-XXZL2P43.js +0 -1
  513. package/dist/stage-bundles/preact/chunks/updateBounds-5M7YQRO3.js +0 -1
  514. package/dist/stage-bundles/preact/chunks/updateComputed-7QA6XZIC.js +0 -1
  515. package/dist/stage-bundles/preact/chunks/updateEvent-R52PL2G4.js +0 -1
  516. package/dist/stage-bundles/preact/chunks/updateHtml-YBJJSWQW.js +0 -1
  517. package/dist/stage-bundles/preact/chunks/updateLifecycleHook-4RA2U4TR.js +0 -1
  518. package/dist/stage-bundles/preact/chunks/updateOption-5U23ZUWV.js +0 -1
  519. package/dist/stage-bundles/preact/chunks/updateRoute-TFQFFFSZ.js +0 -1
  520. package/dist/stage-bundles/preact/chunks/updateState-JCUSBQOL.js +0 -1
  521. package/dist/stage-bundles/preact/chunks/updateStyle-JASLFXVX.js +0 -1
  522. package/dist/stage-bundles/preact/chunks/updateToken-24P2P2SF.js +0 -1
  523. package/dist/stage-bundles/preact/chunks/updateValue-TSVJM3PO.js +0 -1
  524. package/dist/stage-bundles/preact/chunks/user-FCPIGR7X.js +0 -1
  525. package/dist/stage-bundles/preact/chunks/validateStorePayload-HCBPC7HR.js +0 -3
  526. package/dist/stage-bundles/preact/chunks/viewport-LLBH2LJW.js +0 -1
  527. package/dist/stage-bundles/preact/chunks/window-TFWZNZUJ.js +0 -1
  528. package/dist/stage-bundles/react/chunks/addAction-BMIMOFKC.js +0 -1
  529. package/dist/stage-bundles/react/chunks/addAnimationBinding-7TFETALG.js +0 -1
  530. package/dist/stage-bundles/react/chunks/addAttribute-2WJG6MQQ.js +0 -1
  531. package/dist/stage-bundles/react/chunks/addComponent-P7BXPI75.js +0 -1
  532. package/dist/stage-bundles/react/chunks/addComputed-WNYOBBU3.js +0 -1
  533. package/dist/stage-bundles/react/chunks/addEvent-KKSUEWJZ.js +0 -1
  534. package/dist/stage-bundles/react/chunks/addLifecycleHook-KXJ6HEKQ.js +0 -1
  535. package/dist/stage-bundles/react/chunks/addNode-4MPFG7L5.js +0 -1
  536. package/dist/stage-bundles/react/chunks/addOption-6OBUAJDH.js +0 -1
  537. package/dist/stage-bundles/react/chunks/addParamToRoute-VX2GDCCP.js +0 -1
  538. package/dist/stage-bundles/react/chunks/addState-BH7Q5V6N.js +0 -1
  539. package/dist/stage-bundles/react/chunks/addStore-F3E5UJ5H.js +0 -1
  540. package/dist/stage-bundles/react/chunks/addToken-DFONVP3M.js +0 -1
  541. package/dist/stage-bundles/react/chunks/addValue-6SJ7KR7G.js +0 -1
  542. package/dist/stage-bundles/react/chunks/aiAttachmentContracts-IIM7E4TZ.js +0 -1
  543. package/dist/stage-bundles/react/chunks/aiMessagesContracts-LVR4HAGR.js +0 -1
  544. package/dist/stage-bundles/react/chunks/aiRelay-3CLWLKMV.js +0 -1
  545. package/dist/stage-bundles/react/chunks/aiSessionContracts-MWOX56DC.js +0 -1
  546. package/dist/stage-bundles/react/chunks/assets-UN6U4NZV.js +0 -1
  547. package/dist/stage-bundles/react/chunks/capture-5GIKSRCZ.js +0 -1
  548. package/dist/stage-bundles/react/chunks/chunk-2BGFXNGU.js +0 -1
  549. package/dist/stage-bundles/react/chunks/chunk-32U4X4HZ.js +0 -6
  550. package/dist/stage-bundles/react/chunks/chunk-34CHXN5I.js +0 -1
  551. package/dist/stage-bundles/react/chunks/chunk-5CWWFBNY.js +0 -1
  552. package/dist/stage-bundles/react/chunks/chunk-5GKIM3R4.js +0 -1
  553. package/dist/stage-bundles/react/chunks/chunk-5OEIZ3PD.js +0 -1
  554. package/dist/stage-bundles/react/chunks/chunk-6KW4HPGN.js +0 -1
  555. package/dist/stage-bundles/react/chunks/chunk-6S7QQT47.js +0 -1
  556. package/dist/stage-bundles/react/chunks/chunk-7UENQJSC.js +0 -5
  557. package/dist/stage-bundles/react/chunks/chunk-7VDUBBVE.js +0 -1
  558. package/dist/stage-bundles/react/chunks/chunk-A25WFH3U.js +0 -1
  559. package/dist/stage-bundles/react/chunks/chunk-A52FDU5E.js +0 -1
  560. package/dist/stage-bundles/react/chunks/chunk-ADVOIRI5.js +0 -43
  561. package/dist/stage-bundles/react/chunks/chunk-AMPHYXGT.js +0 -1
  562. package/dist/stage-bundles/react/chunks/chunk-AS76ZLXK.js +0 -1
  563. package/dist/stage-bundles/react/chunks/chunk-ATUQUJRM.js +0 -1
  564. package/dist/stage-bundles/react/chunks/chunk-AYZAGKHN.js +0 -1
  565. package/dist/stage-bundles/react/chunks/chunk-BL6GQ6ID.js +0 -1
  566. package/dist/stage-bundles/react/chunks/chunk-BWJHUHDJ.js +0 -1
  567. package/dist/stage-bundles/react/chunks/chunk-BXIWQYSY.js +0 -1
  568. package/dist/stage-bundles/react/chunks/chunk-CAAW6MG4.js +0 -1
  569. package/dist/stage-bundles/react/chunks/chunk-CC3CCH2E.js +0 -1
  570. package/dist/stage-bundles/react/chunks/chunk-CNZYL2VV.js +0 -1
  571. package/dist/stage-bundles/react/chunks/chunk-CXJ5APZF.js +0 -1
  572. package/dist/stage-bundles/react/chunks/chunk-CYURWEXX.js +0 -1
  573. package/dist/stage-bundles/react/chunks/chunk-DHPGPV5T.js +0 -1
  574. package/dist/stage-bundles/react/chunks/chunk-DLHF7QB4.js +0 -1
  575. package/dist/stage-bundles/react/chunks/chunk-E6KR5RXO.js +0 -1
  576. package/dist/stage-bundles/react/chunks/chunk-EPVRMHC2.js +0 -1
  577. package/dist/stage-bundles/react/chunks/chunk-EWEPEODY.js +0 -1
  578. package/dist/stage-bundles/react/chunks/chunk-EXXAK3BP.js +0 -1
  579. package/dist/stage-bundles/react/chunks/chunk-F5MJNV7Y.js +0 -3
  580. package/dist/stage-bundles/react/chunks/chunk-FAYUYASQ.js +0 -1
  581. package/dist/stage-bundles/react/chunks/chunk-GEOQWCYL.js +0 -1
  582. package/dist/stage-bundles/react/chunks/chunk-GK5XUHQG.js +0 -1
  583. package/dist/stage-bundles/react/chunks/chunk-GM4D3DPT.js +0 -1
  584. package/dist/stage-bundles/react/chunks/chunk-GUI7FIZD.js +0 -1
  585. package/dist/stage-bundles/react/chunks/chunk-GYBL4LBC.js +0 -1
  586. package/dist/stage-bundles/react/chunks/chunk-HAN4CMBX.js +0 -1
  587. package/dist/stage-bundles/react/chunks/chunk-HCRWHPFW.js +0 -1
  588. package/dist/stage-bundles/react/chunks/chunk-HE7IQLGK.js +0 -1
  589. package/dist/stage-bundles/react/chunks/chunk-HLPDOSGP.js +0 -1
  590. package/dist/stage-bundles/react/chunks/chunk-I57W7UZN.js +0 -1
  591. package/dist/stage-bundles/react/chunks/chunk-IBDKDP7T.js +0 -1
  592. package/dist/stage-bundles/react/chunks/chunk-ICWQHFOI.js +0 -1
  593. package/dist/stage-bundles/react/chunks/chunk-IKKRB6BS.js +0 -1
  594. package/dist/stage-bundles/react/chunks/chunk-IV6PINVX.js +0 -1
  595. package/dist/stage-bundles/react/chunks/chunk-IW4KEJOF.js +0 -1
  596. package/dist/stage-bundles/react/chunks/chunk-J5QMLA3Z.js +0 -1
  597. package/dist/stage-bundles/react/chunks/chunk-K5BNCYT7.js +0 -1
  598. package/dist/stage-bundles/react/chunks/chunk-KISNK4R4.js +0 -1
  599. package/dist/stage-bundles/react/chunks/chunk-KTWXYDG7.js +0 -1
  600. package/dist/stage-bundles/react/chunks/chunk-LHK7LQPZ.js +0 -1
  601. package/dist/stage-bundles/react/chunks/chunk-LUY5LC7Z.js +0 -1
  602. package/dist/stage-bundles/react/chunks/chunk-MGH62JQ4.js +0 -1
  603. package/dist/stage-bundles/react/chunks/chunk-MUZZUB5Y.js +0 -1
  604. package/dist/stage-bundles/react/chunks/chunk-N6I4COF2.js +0 -1
  605. package/dist/stage-bundles/react/chunks/chunk-NDUX5RLD.js +0 -1
  606. package/dist/stage-bundles/react/chunks/chunk-NHY2XYCH.js +0 -1
  607. package/dist/stage-bundles/react/chunks/chunk-NOTXZB5N.js +0 -1
  608. package/dist/stage-bundles/react/chunks/chunk-NXBFOI3Z.js +0 -1
  609. package/dist/stage-bundles/react/chunks/chunk-OQM5TMCK.js +0 -1
  610. package/dist/stage-bundles/react/chunks/chunk-PPDOTRNT.js +0 -1
  611. package/dist/stage-bundles/react/chunks/chunk-PPHD3O2M.js +0 -1
  612. package/dist/stage-bundles/react/chunks/chunk-PSQ4TIJA.js +0 -1
  613. package/dist/stage-bundles/react/chunks/chunk-PU62K33G.js +0 -1
  614. package/dist/stage-bundles/react/chunks/chunk-Q3IER3MW.js +0 -1
  615. package/dist/stage-bundles/react/chunks/chunk-Q3ZV7EKU.js +0 -1
  616. package/dist/stage-bundles/react/chunks/chunk-QD56IMFS.js +0 -1
  617. package/dist/stage-bundles/react/chunks/chunk-QFFVADTJ.js +0 -1
  618. package/dist/stage-bundles/react/chunks/chunk-QJ33JO3T.js +0 -1
  619. package/dist/stage-bundles/react/chunks/chunk-QKFDVU2Q.js +0 -1
  620. package/dist/stage-bundles/react/chunks/chunk-QVVBKZW6.js +0 -1
  621. package/dist/stage-bundles/react/chunks/chunk-RFFN4NF4.js +0 -1
  622. package/dist/stage-bundles/react/chunks/chunk-TPCJQIUG.js +0 -1
  623. package/dist/stage-bundles/react/chunks/chunk-TX5TCU2H.js +0 -1
  624. package/dist/stage-bundles/react/chunks/chunk-UQFZUWFP.js +0 -1
  625. package/dist/stage-bundles/react/chunks/chunk-XE3A5HPY.js +0 -1
  626. package/dist/stage-bundles/react/chunks/chunk-XFHQ45KR.js +0 -1
  627. package/dist/stage-bundles/react/chunks/chunk-XTAXESM6.js +0 -1
  628. package/dist/stage-bundles/react/chunks/chunk-YB7FA4Y3.js +0 -1
  629. package/dist/stage-bundles/react/chunks/chunk-YCGY2NRE.js +0 -1
  630. package/dist/stage-bundles/react/chunks/chunk-YCMBBPKT.js +0 -1
  631. package/dist/stage-bundles/react/chunks/chunk-Z3M6DQKZ.js +0 -1
  632. package/dist/stage-bundles/react/chunks/chunk-ZUPNPSUB.js +0 -1
  633. package/dist/stage-bundles/react/chunks/clearDestination-ESJ4RTEB.js +0 -1
  634. package/dist/stage-bundles/react/chunks/clearName-XLFUSVVX.js +0 -1
  635. package/dist/stage-bundles/react/chunks/clearOptionsExpression-T5UZGD3M.js +0 -1
  636. package/dist/stage-bundles/react/chunks/clearRender-QOV6MKSA.js +0 -1
  637. package/dist/stage-bundles/react/chunks/clearRepeat-KGDHK6I5.js +0 -1
  638. package/dist/stage-bundles/react/chunks/contentEditor-VQUII3R3.js +0 -1
  639. package/dist/stage-bundles/react/chunks/createAction-ITB7SY4A.js +0 -1
  640. package/dist/stage-bundles/react/chunks/createAnimation-5GYHDNS4.js +0 -1
  641. package/dist/stage-bundles/react/chunks/createComputed-BMWO4U4T.js +0 -1
  642. package/dist/stage-bundles/react/chunks/createTextContent-ZVU57TXU.js +0 -1
  643. package/dist/stage-bundles/react/chunks/createValue-Q2VRKXEI.js +0 -1
  644. package/dist/stage-bundles/react/chunks/design-Z6J5JRDV.js +0 -15
  645. package/dist/stage-bundles/react/chunks/disconnectNode-PNUX55O2.js +0 -1
  646. package/dist/stage-bundles/react/chunks/history-7CH6VXP4.js +0 -1
  647. package/dist/stage-bundles/react/chunks/id-UUBDNSND.js +0 -1
  648. package/dist/stage-bundles/react/chunks/main-D4CUN7NH.js +0 -1
  649. package/dist/stage-bundles/react/chunks/main-OAJ3EVVU.js +0 -1
  650. package/dist/stage-bundles/react/chunks/main-WER4YJAR.js +0 -1
  651. package/dist/stage-bundles/react/chunks/main-XBZULJGK.js +0 -1
  652. package/dist/stage-bundles/react/chunks/moveNodeToLastChildOf-DQR5GURK.js +0 -1
  653. package/dist/stage-bundles/react/chunks/nodeGraph-2AX6JUZ4.js +0 -1
  654. package/dist/stage-bundles/react/chunks/normalizeEventName-3CSULWE4.js +0 -1
  655. package/dist/stage-bundles/react/chunks/normalizeLayoutContext-34DZRL3Q.js +0 -1
  656. package/dist/stage-bundles/react/chunks/preview-5V5GS6PZ.js +0 -1
  657. package/dist/stage-bundles/react/chunks/react-YDAQ4KLN.js +0 -1
  658. package/dist/stage-bundles/react/chunks/removeAction-7V4VV5SS.js +0 -1
  659. package/dist/stage-bundles/react/chunks/removeAnimationBinding-26LUMVXH.js +0 -1
  660. package/dist/stage-bundles/react/chunks/removeAttribute-AZK5TQQM.js +0 -1
  661. package/dist/stage-bundles/react/chunks/removeComputed-HIYYBG3M.js +0 -1
  662. package/dist/stage-bundles/react/chunks/removeEvent-A7AUWPIF.js +0 -1
  663. package/dist/stage-bundles/react/chunks/removeLifecycleHook-Z5ZHFYSE.js +0 -1
  664. package/dist/stage-bundles/react/chunks/removeNode-QSDSWHNG.js +0 -1
  665. package/dist/stage-bundles/react/chunks/removeOption-7JZTAHTB.js +0 -1
  666. package/dist/stage-bundles/react/chunks/removeParamFromRoute-JBZOXNDA.js +0 -1
  667. package/dist/stage-bundles/react/chunks/removeState-RIXJ6YEL.js +0 -1
  668. package/dist/stage-bundles/react/chunks/removeStore-PKBJRCYZ.js +0 -1
  669. package/dist/stage-bundles/react/chunks/removeToken-WRU2GN7O.js +0 -1
  670. package/dist/stage-bundles/react/chunks/removeValue-KRNKQVF5.js +0 -1
  671. package/dist/stage-bundles/react/chunks/setDestination-DUGBRV24.js +0 -1
  672. package/dist/stage-bundles/react/chunks/setHomePage-GJLGWZHJ.js +0 -1
  673. package/dist/stage-bundles/react/chunks/setHtmlId-F5SPBYD7.js +0 -1
  674. package/dist/stage-bundles/react/chunks/setName-DAQAN7JR.js +0 -1
  675. package/dist/stage-bundles/react/chunks/setNodeLayout-X4PQKKZT.js +0 -1
  676. package/dist/stage-bundles/react/chunks/setOptionsExpression-3MOFK54D.js +0 -1
  677. package/dist/stage-bundles/react/chunks/setRender-WJRTHRML.js +0 -1
  678. package/dist/stage-bundles/react/chunks/setRepeat-JD6QROHI.js +0 -1
  679. package/dist/stage-bundles/react/chunks/setTagName-42MJSWMZ.js +0 -1
  680. package/dist/stage-bundles/react/chunks/updateAction-ZW4KGOAQ.js +0 -1
  681. package/dist/stage-bundles/react/chunks/updateAnimationBinding-QETT3JF2.js +0 -1
  682. package/dist/stage-bundles/react/chunks/updateAttribute-HFPDXXBZ.js +0 -1
  683. package/dist/stage-bundles/react/chunks/updateBounds-HOTYUCG4.js +0 -1
  684. package/dist/stage-bundles/react/chunks/updateComputed-OOBDA4XY.js +0 -1
  685. package/dist/stage-bundles/react/chunks/updateEvent-LCGAPMAI.js +0 -1
  686. package/dist/stage-bundles/react/chunks/updateHtml-VQAIKLEG.js +0 -1
  687. package/dist/stage-bundles/react/chunks/updateLifecycleHook-RCS2QC44.js +0 -1
  688. package/dist/stage-bundles/react/chunks/updateOption-PPZLK4X3.js +0 -1
  689. package/dist/stage-bundles/react/chunks/updateRoute-FPAKZBCT.js +0 -1
  690. package/dist/stage-bundles/react/chunks/updateState-LRZJPENX.js +0 -1
  691. package/dist/stage-bundles/react/chunks/updateStyle-M7YKN6C4.js +0 -1
  692. package/dist/stage-bundles/react/chunks/updateToken-LOI6M4XH.js +0 -1
  693. package/dist/stage-bundles/react/chunks/updateValue-NTA7TSYR.js +0 -1
  694. package/dist/stage-bundles/react/chunks/user-3YXEQVFB.js +0 -1
  695. package/dist/stage-bundles/react/chunks/validateStorePayload-VVQBPX4I.js +0 -3
  696. package/dist/stage-bundles/react/chunks/viewport-7ICM5NZY.js +0 -1
  697. package/dist/stage-bundles/react/chunks/window-SG66BA4O.js +0 -1
  698. package/dist/stage-bundles/vue/chunks/addAction-EGLGEGTS.js +0 -1
  699. package/dist/stage-bundles/vue/chunks/addAnimationBinding-WCB5VZLU.js +0 -1
  700. package/dist/stage-bundles/vue/chunks/addAttribute-2MZ3OFUE.js +0 -1
  701. package/dist/stage-bundles/vue/chunks/addComponent-Y2AQ2FGZ.js +0 -1
  702. package/dist/stage-bundles/vue/chunks/addComputed-7JLBFD6I.js +0 -1
  703. package/dist/stage-bundles/vue/chunks/addEvent-HOBNKM2F.js +0 -1
  704. package/dist/stage-bundles/vue/chunks/addLifecycleHook-GHYL7FRH.js +0 -1
  705. package/dist/stage-bundles/vue/chunks/addNode-5OXCF22G.js +0 -1
  706. package/dist/stage-bundles/vue/chunks/addOption-PVXGN7AJ.js +0 -1
  707. package/dist/stage-bundles/vue/chunks/addParamToRoute-VL2VOFZS.js +0 -1
  708. package/dist/stage-bundles/vue/chunks/addState-U2NWEGWV.js +0 -1
  709. package/dist/stage-bundles/vue/chunks/addStore-AQMFKH33.js +0 -1
  710. package/dist/stage-bundles/vue/chunks/addToken-XF2FFA52.js +0 -1
  711. package/dist/stage-bundles/vue/chunks/addValue-O7YXXMST.js +0 -1
  712. package/dist/stage-bundles/vue/chunks/aiAttachmentContracts-V3EW4BHI.js +0 -1
  713. package/dist/stage-bundles/vue/chunks/aiMessagesContracts-ZGHZJ7EU.js +0 -1
  714. package/dist/stage-bundles/vue/chunks/aiRelay-WDZAC42R.js +0 -1
  715. package/dist/stage-bundles/vue/chunks/aiSessionContracts-WAMOGHSG.js +0 -1
  716. package/dist/stage-bundles/vue/chunks/assets-NU56BTDG.js +0 -1
  717. package/dist/stage-bundles/vue/chunks/capture-UZVRGVM7.js +0 -1
  718. package/dist/stage-bundles/vue/chunks/chunk-5CWWFBNY.js +0 -1
  719. package/dist/stage-bundles/vue/chunks/chunk-5GKIM3R4.js +0 -1
  720. package/dist/stage-bundles/vue/chunks/chunk-6KW4HPGN.js +0 -1
  721. package/dist/stage-bundles/vue/chunks/chunk-6S7QQT47.js +0 -1
  722. package/dist/stage-bundles/vue/chunks/chunk-7CCYKDAJ.js +0 -97
  723. package/dist/stage-bundles/vue/chunks/chunk-7UENQJSC.js +0 -5
  724. package/dist/stage-bundles/vue/chunks/chunk-7VDUBBVE.js +0 -1
  725. package/dist/stage-bundles/vue/chunks/chunk-A25WFH3U.js +0 -1
  726. package/dist/stage-bundles/vue/chunks/chunk-A52FDU5E.js +0 -1
  727. package/dist/stage-bundles/vue/chunks/chunk-ACPGC7BJ.js +0 -1
  728. package/dist/stage-bundles/vue/chunks/chunk-AMPHYXGT.js +0 -1
  729. package/dist/stage-bundles/vue/chunks/chunk-AS76ZLXK.js +0 -1
  730. package/dist/stage-bundles/vue/chunks/chunk-AYZAGKHN.js +0 -1
  731. package/dist/stage-bundles/vue/chunks/chunk-BL6GQ6ID.js +0 -1
  732. package/dist/stage-bundles/vue/chunks/chunk-BWJHUHDJ.js +0 -1
  733. package/dist/stage-bundles/vue/chunks/chunk-CAAW6MG4.js +0 -1
  734. package/dist/stage-bundles/vue/chunks/chunk-CC3CCH2E.js +0 -1
  735. package/dist/stage-bundles/vue/chunks/chunk-CNZYL2VV.js +0 -1
  736. package/dist/stage-bundles/vue/chunks/chunk-CXJ5APZF.js +0 -1
  737. package/dist/stage-bundles/vue/chunks/chunk-CYURWEXX.js +0 -1
  738. package/dist/stage-bundles/vue/chunks/chunk-DHPGPV5T.js +0 -1
  739. package/dist/stage-bundles/vue/chunks/chunk-DLHF7QB4.js +0 -1
  740. package/dist/stage-bundles/vue/chunks/chunk-E6KR5RXO.js +0 -1
  741. package/dist/stage-bundles/vue/chunks/chunk-EPVRMHC2.js +0 -1
  742. package/dist/stage-bundles/vue/chunks/chunk-EWEPEODY.js +0 -1
  743. package/dist/stage-bundles/vue/chunks/chunk-EXXAK3BP.js +0 -1
  744. package/dist/stage-bundles/vue/chunks/chunk-F5MJNV7Y.js +0 -3
  745. package/dist/stage-bundles/vue/chunks/chunk-FAYUYASQ.js +0 -1
  746. package/dist/stage-bundles/vue/chunks/chunk-FYWE2MO5.js +0 -1
  747. package/dist/stage-bundles/vue/chunks/chunk-GEOQWCYL.js +0 -1
  748. package/dist/stage-bundles/vue/chunks/chunk-GK5XUHQG.js +0 -1
  749. package/dist/stage-bundles/vue/chunks/chunk-GM4D3DPT.js +0 -1
  750. package/dist/stage-bundles/vue/chunks/chunk-GUI7FIZD.js +0 -1
  751. package/dist/stage-bundles/vue/chunks/chunk-HAN4CMBX.js +0 -1
  752. package/dist/stage-bundles/vue/chunks/chunk-HCRWHPFW.js +0 -1
  753. package/dist/stage-bundles/vue/chunks/chunk-HE7IQLGK.js +0 -1
  754. package/dist/stage-bundles/vue/chunks/chunk-I57W7UZN.js +0 -1
  755. package/dist/stage-bundles/vue/chunks/chunk-IBDKDP7T.js +0 -1
  756. package/dist/stage-bundles/vue/chunks/chunk-ICWQHFOI.js +0 -1
  757. package/dist/stage-bundles/vue/chunks/chunk-IKKRB6BS.js +0 -1
  758. package/dist/stage-bundles/vue/chunks/chunk-ILXSVZXQ.js +0 -1
  759. package/dist/stage-bundles/vue/chunks/chunk-IV6PINVX.js +0 -1
  760. package/dist/stage-bundles/vue/chunks/chunk-IW4KEJOF.js +0 -1
  761. package/dist/stage-bundles/vue/chunks/chunk-IZT2KVTW.js +0 -1
  762. package/dist/stage-bundles/vue/chunks/chunk-J5QMLA3Z.js +0 -1
  763. package/dist/stage-bundles/vue/chunks/chunk-JRXMDYLE.js +0 -1
  764. package/dist/stage-bundles/vue/chunks/chunk-K5BNCYT7.js +0 -1
  765. package/dist/stage-bundles/vue/chunks/chunk-KTWXYDG7.js +0 -1
  766. package/dist/stage-bundles/vue/chunks/chunk-LHK7LQPZ.js +0 -1
  767. package/dist/stage-bundles/vue/chunks/chunk-LUY5LC7Z.js +0 -1
  768. package/dist/stage-bundles/vue/chunks/chunk-MGH62JQ4.js +0 -1
  769. package/dist/stage-bundles/vue/chunks/chunk-MUZZUB5Y.js +0 -1
  770. package/dist/stage-bundles/vue/chunks/chunk-N6I4COF2.js +0 -1
  771. package/dist/stage-bundles/vue/chunks/chunk-NHY2XYCH.js +0 -1
  772. package/dist/stage-bundles/vue/chunks/chunk-NOTXZB5N.js +0 -1
  773. package/dist/stage-bundles/vue/chunks/chunk-NXBFOI3Z.js +0 -1
  774. package/dist/stage-bundles/vue/chunks/chunk-O24ISLGT.js +0 -1
  775. package/dist/stage-bundles/vue/chunks/chunk-OQM5TMCK.js +0 -1
  776. package/dist/stage-bundles/vue/chunks/chunk-PPDOTRNT.js +0 -1
  777. package/dist/stage-bundles/vue/chunks/chunk-PU62K33G.js +0 -1
  778. package/dist/stage-bundles/vue/chunks/chunk-PYIGBTL4.js +0 -6
  779. package/dist/stage-bundles/vue/chunks/chunk-Q3IER3MW.js +0 -1
  780. package/dist/stage-bundles/vue/chunks/chunk-Q3ZV7EKU.js +0 -1
  781. package/dist/stage-bundles/vue/chunks/chunk-QD56IMFS.js +0 -1
  782. package/dist/stage-bundles/vue/chunks/chunk-QFFVADTJ.js +0 -1
  783. package/dist/stage-bundles/vue/chunks/chunk-QJ33JO3T.js +0 -1
  784. package/dist/stage-bundles/vue/chunks/chunk-QKFDVU2Q.js +0 -1
  785. package/dist/stage-bundles/vue/chunks/chunk-QVVBKZW6.js +0 -1
  786. package/dist/stage-bundles/vue/chunks/chunk-RFFN4NF4.js +0 -1
  787. package/dist/stage-bundles/vue/chunks/chunk-RMSX6LWP.js +0 -1
  788. package/dist/stage-bundles/vue/chunks/chunk-TPCJQIUG.js +0 -1
  789. package/dist/stage-bundles/vue/chunks/chunk-TSL6VG3R.js +0 -1
  790. package/dist/stage-bundles/vue/chunks/chunk-TTTOAB6J.js +0 -1
  791. package/dist/stage-bundles/vue/chunks/chunk-TX5TCU2H.js +0 -1
  792. package/dist/stage-bundles/vue/chunks/chunk-UCLSDDOL.js +0 -1
  793. package/dist/stage-bundles/vue/chunks/chunk-UDTKG2KI.js +0 -1
  794. package/dist/stage-bundles/vue/chunks/chunk-UIC3GAEE.js +0 -1
  795. package/dist/stage-bundles/vue/chunks/chunk-XE3A5HPY.js +0 -1
  796. package/dist/stage-bundles/vue/chunks/chunk-XFHQ45KR.js +0 -1
  797. package/dist/stage-bundles/vue/chunks/chunk-XTAXESM6.js +0 -1
  798. package/dist/stage-bundles/vue/chunks/chunk-YB7FA4Y3.js +0 -1
  799. package/dist/stage-bundles/vue/chunks/chunk-YCGY2NRE.js +0 -1
  800. package/dist/stage-bundles/vue/chunks/chunk-YCMBBPKT.js +0 -1
  801. package/dist/stage-bundles/vue/chunks/chunk-Z3M6DQKZ.js +0 -1
  802. package/dist/stage-bundles/vue/chunks/chunk-ZUPNPSUB.js +0 -1
  803. package/dist/stage-bundles/vue/chunks/clearDestination-IGKNL7FN.js +0 -1
  804. package/dist/stage-bundles/vue/chunks/clearName-HJ7ZTHBU.js +0 -1
  805. package/dist/stage-bundles/vue/chunks/clearOptionsExpression-NZQFL64E.js +0 -1
  806. package/dist/stage-bundles/vue/chunks/clearRender-NPVDTNFA.js +0 -1
  807. package/dist/stage-bundles/vue/chunks/clearRepeat-7YFYZODP.js +0 -1
  808. package/dist/stage-bundles/vue/chunks/contentEditor-EUDU6PBV.js +0 -1
  809. package/dist/stage-bundles/vue/chunks/createAction-73YUTK3T.js +0 -1
  810. package/dist/stage-bundles/vue/chunks/createAnimation-2WQSMYT5.js +0 -1
  811. package/dist/stage-bundles/vue/chunks/createComputed-DMX7CJA3.js +0 -1
  812. package/dist/stage-bundles/vue/chunks/createTextContent-4Z4YATBO.js +0 -1
  813. package/dist/stage-bundles/vue/chunks/createValue-DXQSLOBG.js +0 -1
  814. package/dist/stage-bundles/vue/chunks/design-LU5XWCLC.js +0 -15
  815. package/dist/stage-bundles/vue/chunks/disconnectNode-2CLWVIQP.js +0 -1
  816. package/dist/stage-bundles/vue/chunks/history-VAAFKC4E.js +0 -1
  817. package/dist/stage-bundles/vue/chunks/id-ZIAZZ5AS.js +0 -1
  818. package/dist/stage-bundles/vue/chunks/main-HQ4XJKUM.js +0 -1
  819. package/dist/stage-bundles/vue/chunks/main-KFGWT6OT.js +0 -1
  820. package/dist/stage-bundles/vue/chunks/main-R652XLC3.js +0 -1
  821. package/dist/stage-bundles/vue/chunks/main-X6SC5JYU.js +0 -1
  822. package/dist/stage-bundles/vue/chunks/moveNodeToLastChildOf-H4TZ5UMP.js +0 -1
  823. package/dist/stage-bundles/vue/chunks/nodeGraph-JS64VAAQ.js +0 -1
  824. package/dist/stage-bundles/vue/chunks/normalizeEventName-SNBYJDUY.js +0 -1
  825. package/dist/stage-bundles/vue/chunks/normalizeLayoutContext-KGEMYC4Y.js +0 -1
  826. package/dist/stage-bundles/vue/chunks/preview-52FXOKBF.js +0 -1
  827. package/dist/stage-bundles/vue/chunks/removeAction-T4M5EJN7.js +0 -1
  828. package/dist/stage-bundles/vue/chunks/removeAnimationBinding-AIISPC33.js +0 -1
  829. package/dist/stage-bundles/vue/chunks/removeAttribute-DCKZLM55.js +0 -1
  830. package/dist/stage-bundles/vue/chunks/removeComputed-WSA5GNVZ.js +0 -1
  831. package/dist/stage-bundles/vue/chunks/removeEvent-2YZ55HD6.js +0 -1
  832. package/dist/stage-bundles/vue/chunks/removeLifecycleHook-SBPJNF5P.js +0 -1
  833. package/dist/stage-bundles/vue/chunks/removeNode-5HXQ63V3.js +0 -1
  834. package/dist/stage-bundles/vue/chunks/removeOption-SYIFB4XW.js +0 -1
  835. package/dist/stage-bundles/vue/chunks/removeParamFromRoute-HAYP3WTT.js +0 -1
  836. package/dist/stage-bundles/vue/chunks/removeState-SGJVQ66N.js +0 -1
  837. package/dist/stage-bundles/vue/chunks/removeStore-YVBTGA3I.js +0 -1
  838. package/dist/stage-bundles/vue/chunks/removeToken-AIDV7DUM.js +0 -1
  839. package/dist/stage-bundles/vue/chunks/removeValue-UP5ZFN3U.js +0 -1
  840. package/dist/stage-bundles/vue/chunks/setDestination-NCPAVIIK.js +0 -1
  841. package/dist/stage-bundles/vue/chunks/setHomePage-O2JYOG6H.js +0 -1
  842. package/dist/stage-bundles/vue/chunks/setHtmlId-2W7YW47O.js +0 -1
  843. package/dist/stage-bundles/vue/chunks/setName-NKRZPBGG.js +0 -1
  844. package/dist/stage-bundles/vue/chunks/setNodeLayout-GY4G7UZR.js +0 -1
  845. package/dist/stage-bundles/vue/chunks/setOptionsExpression-K5EQXJEY.js +0 -1
  846. package/dist/stage-bundles/vue/chunks/setRender-7XMGQ7ZK.js +0 -1
  847. package/dist/stage-bundles/vue/chunks/setRepeat-WN4WZJUN.js +0 -1
  848. package/dist/stage-bundles/vue/chunks/setTagName-U6UJNJLE.js +0 -1
  849. package/dist/stage-bundles/vue/chunks/updateAction-3KSR6ZIJ.js +0 -1
  850. package/dist/stage-bundles/vue/chunks/updateAnimationBinding-HVVHLFBO.js +0 -1
  851. package/dist/stage-bundles/vue/chunks/updateAttribute-XXZL2P43.js +0 -1
  852. package/dist/stage-bundles/vue/chunks/updateBounds-5M7YQRO3.js +0 -1
  853. package/dist/stage-bundles/vue/chunks/updateComputed-7QA6XZIC.js +0 -1
  854. package/dist/stage-bundles/vue/chunks/updateEvent-R52PL2G4.js +0 -1
  855. package/dist/stage-bundles/vue/chunks/updateHtml-YBJJSWQW.js +0 -1
  856. package/dist/stage-bundles/vue/chunks/updateLifecycleHook-4RA2U4TR.js +0 -1
  857. package/dist/stage-bundles/vue/chunks/updateOption-5U23ZUWV.js +0 -1
  858. package/dist/stage-bundles/vue/chunks/updateRoute-TFQFFFSZ.js +0 -1
  859. package/dist/stage-bundles/vue/chunks/updateState-JCUSBQOL.js +0 -1
  860. package/dist/stage-bundles/vue/chunks/updateStyle-JASLFXVX.js +0 -1
  861. package/dist/stage-bundles/vue/chunks/updateToken-24P2P2SF.js +0 -1
  862. package/dist/stage-bundles/vue/chunks/updateValue-TSVJM3PO.js +0 -1
  863. package/dist/stage-bundles/vue/chunks/user-FCPIGR7X.js +0 -1
  864. package/dist/stage-bundles/vue/chunks/validateStorePayload-HCBPC7HR.js +0 -3
  865. package/dist/stage-bundles/vue/chunks/viewport-LLBH2LJW.js +0 -1
  866. package/dist/stage-bundles/vue/chunks/vue-62USAR6D.js +0 -1
  867. package/dist/stage-bundles/vue/chunks/window-TFWZNZUJ.js +0 -1
  868. package/dist/stage-src/dev/entry.js +0 -24
  869. package/dist/stage-src/dev/server.js +0 -113
  870. package/dist/stage-src/preview/bootstrap.js +0 -22
  871. package/dist/stage-src/preview/entry.js +0 -5
  872. package/dist/stage-src/preview/routes/js.js +0 -100
  873. package/dist/stage-src/preview/routes/preview.js +0 -21
  874. package/dist/stage-src/preview/server.js +0 -99
  875. package/dist/stage-src/preview/views/index.js +0 -18
@@ -0,0 +1,6 @@
1
+ import{a as j}from"./chunk-FEFZSXXM.js";import{b as ue,e as se}from"./chunk-5HNN2HVX.js";import{a as D,e as re,f as r,g as y,h as c,i as a}from"./chunk-P722OZCF.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')}),Ne=(f,t)=>setTimeout(()=>{f(new Error("Timeout waiting for connect"))},t);function Y(f){return f!=null&&typeof f.postMessage=="function"}function Ce(f){return typeof f?.on=="function"&&typeof f?.removeListener=="function"&&!("onmessage"in f)}function ve(f){return f!=null&&typeof f=="object"&&"data"in f?{data:f.data}:{data:f}}function ce(f){if(!f||!Ce(f))return f;let t=null,e=null,s=null,i=(n,o)=>{if(o)try{f.removeListener(n,o)}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);try{typeof f.close=="function"&&f.close()}catch{}},set onmessage(n){t=i("message",t),typeof n=="function"&&(t=o=>n(ve(o)),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 l,p,b,N,L,k,R,g,W,h,X,ne,fe,Ee,de,K,pe,oe,ae,Se,V,ye,Ae=(l=class{constructor(t,e=j(),s={}){y(this,h);y(this,p,null);y(this,b,!1);y(this,N,null);y(this,L,!1);y(this,k,null);y(this,R,new Map);y(this,g,new Map);y(this,W,1e3);if(c(this,W,s.timeoutMs??1e3),t=ce(t),t){if(typeof t.postMessage!="function")throw new Error("Port must be an object with postMessage");c(this,p,t),c(this,N,e),r(this,p).onmessage=i=>a(this,h,pe).call(this,i),r(this,p).onerror=i=>a(this,h,ye).call(this,i),a(this,h,fe).call(this),c(this,b,!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,b)}static connect({port:t,options:e={}}){e={...l.defaultOptions,...e},t=ce(t);let s=j();return new Promise((i,n)=>{let o=0,S=null,E=!1,d=()=>{S&&clearTimeout(S);try{t.onmessage=null}catch{}try{t.onerror=null}catch{}};if(e.primary){if(t.onmessage=M=>{let G=M?.data;if(!Array.isArray(G)||G.length<2)return;let[A,T]=G;if(A===l.EVENTS.CONNECT)try{t.postMessage([l.EVENTS.CONFIRM_CONNECT,{rid:T?.rid,sid:T?.sid}]),E=!0,d(),i(new l(t,T?.sid,{timeoutMs:e.timeoutMs}))}catch(F){d(),n(F)}},t.onerror=M=>{E||(E=!0,d(),n(M))},typeof t.start=="function")try{t.start()}catch{}}else{let M=()=>{if(o>=e.maxRetries){E||(d(),n(new Error("Max retries reached")));return}let A=Math.min(e.baseDelay*2**o,e.maxDelay),T=Math.floor(A*e.jitter*Math.random());S=setTimeout(G,A+T)},G=()=>{o+=1;try{t.postMessage([l.EVENTS.CONNECT,{rid:j(),sid:s}])}catch(A){d(),n(A);return}M()};if(t.onmessage=A=>{let T=A?.data;if(!Array.isArray(T)||T.length<2)return;let[F,z]=T;if(!(!z?.sid||!z?.rid))switch(F){case l.EVENTS.CONFIRM_CONNECT:{if(E)return;E=!0,d(),i(new l(t,z?.sid,{timeoutMs:e.timeoutMs}));break}case l.EVENTS.ERROR:{if(E)return;E=!0,d(),n(new Error("Handshake error"));break}default:break}},t.onerror=A=>{E||(E=!0,d(),n(A))},typeof t.start=="function")try{t.start()}catch{}G()}})}get sid(){return r(this,N)}close(){r(this,L)||(c(this,L,!0),console.warn(`[Port] close() \u2014 sid: ${r(this,N)}, pending: ${r(this,R).size}, enabled: ${r(this,b)}`),a(this,h,V).call(this,l.EVENTS.DISCONNECT,{sid:r(this,N)}),a(this,h,ne).call(this))}emit(t,{includeSelf:e=!1}={}){return r(this,p)?r(this,b)?a(this,h,de).call(this,t,{includeSelf:e}):Promise.resolve(null):Promise.reject(new Error("No port available"))}request(t,e){return r(this,p)?r(this,b)?a(this,h,K).call(this,l.EVENTS.MESSAGE,t,e):Promise.resolve(null):Promise.reject(new Error("No port available"))}gather(t,e){return r(this,p)?r(this,b)?a(this,h,K).call(this,l.EVENTS.GATHER,t,e):Promise.resolve(null):Promise.reject(new Error("No port available"))}callback(t,e,{includeSelf:s=!1}={}){if(!r(this,p)||!r(this,b))return;let i=j();r(this,R).set(i,{resolve:e,reject:()=>{},timeout:null}),a(this,h,V).call(this,l.EVENTS.MESSAGE,{sid:r(this,N),rid:i,hasCallback:!0,includeSelf:!!s,payload:t})}async enable(){return r(this,p)?(c(this,b,await a(this,h,K).call(this,l.EVENTS.ENABLE,!0)),r(this,b)):Promise.reject(new Error("No port available"))}async disable(){return r(this,p)?(c(this,b,await a(this,h,K).call(this,l.EVENTS.ENABLE,!1)),r(this,b)):Promise.reject(new Error("No port available"))}onMessage(t){if(typeof t!="function")throw new Error("Listener must be a function");if(r(this,g).has(l.EVENTS.MESSAGE))throw new Error("A listener is already registered. Remove the existing listener before adding a new one.");return r(this,g).set(l.EVENTS.MESSAGE,t),()=>{r(this,g).get(l.EVENTS.MESSAGE)===t&&r(this,g).delete(l.EVENTS.MESSAGE)}}onEnable(t){if(typeof t!="function")throw new Error("Listener must be a function");return r(this,g).set(l.EVENTS.ENABLE,t),()=>r(this,g).delete(l.EVENTS.ENABLE)}onError(t){if(typeof t!="function")throw new Error("Listener must be a function");if(r(this,g).has(l.EVENTS.ERROR))throw new Error("A listener is already registered. Remove the existing listener before adding a new one.");return r(this,g).set(l.EVENTS.ERROR,t),()=>r(this,g).delete(l.EVENTS.ERROR)}onDisconnect(t){if(typeof t!="function")throw new Error("Listener must be a function");return r(this,g).set(l.EVENTS.DISCONNECT,t),()=>r(this,g).delete(l.EVENTS.DISCONNECT)}},p=new WeakMap,b=new WeakMap,N=new WeakMap,L=new WeakMap,k=new WeakMap,R=new WeakMap,g=new WeakMap,W=new WeakMap,h=new WeakSet,X=function(t){if(r(this,L))return;c(this,L,!0),console.warn(`[Port] disconnect detected \u2014 sid: ${r(this,N)}, reason: ${t}`);let e=r(this,g).get(l.EVENTS.DISCONNECT);if(a(this,h,ne).call(this),e)try{e(t)}catch(s){console.error("Port onDisconnect listener error:",s)}},ne=function(){if(r(this,p)){a(this,h,Ee).call(this),r(this,p).onmessage=null,r(this,p).onerror=null;try{typeof r(this,p).stop=="function"&&r(this,p).stop()}catch{}try{typeof r(this,p).close=="function"&&r(this,p).close()}catch{}}for(let[t,e]of r(this,R))e.timeout&&clearTimeout(e.timeout),e.resolve?.(void 0);r(this,R).clear(),c(this,p,null),c(this,b,!1),r(this,g).clear()},fe=function(){let t=r(this,p);if(!t)return;let e=()=>a(this,h,X).call(this,"peer-lost");try{"onclose"in t?t.onclose=e:typeof t.addEventListener=="function"?(t.addEventListener("close",e),c(this,k,e)):typeof t.on=="function"&&(t.on("close",e),c(this,k,e))}catch{}},Ee=function(){let t=r(this,p);if(t)try{r(this,k)?(typeof t.removeEventListener=="function"?t.removeEventListener("close",r(this,k)):typeof t.removeListener=="function"&&t.removeListener("close",r(this,k)),c(this,k,null)):"onclose"in t&&(t.onclose=null)}catch{}},de=function(t,{includeSelf:e=!1}={}){try{return a(this,h,V).call(this,l.EVENTS.MESSAGE,{sid:r(this,N),rid:null,includeSelf:!!e,payload:t})}catch(s){return Promise.reject(s)}},K=function(t,e,s=r(this,W)){return new Promise((i,n)=>{try{let o=j(),S=Ne(()=>{r(this,R).delete(o);let E=Array.isArray(e)?e[1]:t;console.warn(`[Port] request TIMEOUT \u2014 sid: ${r(this,N)}, rid: ${o}, event: ${E}, ms: ${s}`),n(new Error("Request timeout"))},s);r(this,R).set(o,{resolve:i,reject:n,timeout:S}),a(this,h,V).call(this,t,{sid:r(this,N),rid:o,payload:e})}catch(o){n(o)}})},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,N)))switch(s){case l.EVENTS.RESPONSE:a(this,h,ae).call(this,i?.rid,i?.payload,"resolve");return;case l.EVENTS.ERROR:let n=i?.payload instanceof Error?i.payload.message:String(i?.payload);a(this,h,ae).call(this,i?.rid,new Error(n),"reject");return;case l.EVENTS.MESSAGE:a(this,h,oe).call(this,i?.rid,i?.payload,{isGather:!1,hasCallback:!!i?.hasCallback,includeSelf:!!i?.includeSelf});return;case l.EVENTS.GATHER:a(this,h,oe).call(this,i?.rid,i?.payload,{isGather:!0});return;case l.EVENTS.ENABLE:a(this,h,Se).call(this,i?.rid,i?.payload);return;case l.EVENTS.DISCONNECT:a(this,h,X).call(this,"closed");return;default:return}},oe=async function(t,e,{isGather:s=!1,hasCallback:i=!1,includeSelf:n=!1}={}){try{let o=r(this,g).get(l.EVENTS.MESSAGE),S=null;if(i&&t){let d=!1;S=M=>{d||(d=!0,a(this,h,V).call(this,l.EVENTS.RESPONSE,{rid:t,payload:M??null}))}}let E=o?await o(e,{isRequest:!!t,isGather:s,hasCallback:i,includeSelf:n,reply:S}):null;return t&&!i?a(this,h,V).call(this,l.EVENTS.RESPONSE,{rid:t,payload:E??null}):void 0}catch(o){let S=o instanceof Error?o.message:String(o);a(this,h,V).call(this,l.EVENTS.ERROR,{rid:t,payload:S})}},ae=function(t,e,s){let i=r(this,R).get(t);i&&(i.timeout&&clearTimeout(i.timeout),r(this,R).delete(t),s==="resolve"?i.resolve(e):i.reject(e))},Se=function(t,e){c(this,b,e);let s=r(this,g).get(l.EVENTS.ENABLE);return s&&s(e),a(this,h,V).call(this,l.EVENTS.RESPONSE,{rid:t,payload:e})},V=function(t,e){if(!r(this,p))return console.warn(`[Port] #postMessage but port is null \u2014 type: ${t}, sid: ${r(this,N)}`),!1;try{r(this,p).postMessage([t,e])}catch(s){return console.error(`[Port] #postMessage FAILED \u2014 type: ${t}, sid: ${r(this,N)}`,s.message),s?.name!=="DataCloneError"&&a(this,h,X).call(this,"peer-lost"),!1}return!0},ye=function(t){console.error("onerror",t)},re(l,"defaultOptions",{primary:!1,maxRetries:10,baseDelay:200,maxDelay:2e3,jitter:.2,timeoutMs:1e3}),l);var w={HANDSHAKE:"HANDSHAKE",MESSAGE:"MESSAGE",GATHER:"GATHER",SUBSCRIBE:"SUBSCRIBE",UNSUBSCRIBE:"UNSUBSCRIBE",SYNC:"SYNC"};var Ge=ue("channelContracts",[Object]),m,O,J,B,C,P,q,$,x,H,v,ie,u,le,U,he,I,Z,_,me,ee,Q,te,we,ge,be,Oe=(ie=class extends se{constructor(){super(...arguments);y(this,u);y(this,m,null);y(this,O,null);y(this,J,1e3);y(this,B,new Map);y(this,C,new Map);y(this,P,[]);y(this,q,!1);y(this,$,null);y(this,x,!1);y(this,H,null);y(this,v,{enable:new Set,disable:new Set,connect:new Set,disconnect:new Set});y(this,ee,async([t,e,s,i,n],o={})=>{let S=[];switch(t){case w.MESSAGE:let E=r(this,C).get(e);if(E)for(let d of E){if(!a(this,u,be).call(this,e,s,d.schema))continue;let M=o.hasCallback&&o.reply?[...s,o.reply]:s,G=await d.subscriber(...M);S.push(G),d.once&&r(this,C).get(e).delete(d)}break;case w.SUBSCRIBE:case w.UNSUBSCRIBE:s!=null?r(this,B).set(e,s):r(this,B).delete(e);break}return S.length>0?S[0]:null});y(this,Q,(t,e,s)=>{switch(t){case"ENABLE":e===!0?r(this,v).enable.forEach(i=>i(s)):r(this,v).disable.forEach(i=>i(s));break;case"CONNECT":r(this,v).connect.forEach(i=>i(s));break}});y(this,te,t=>{console.error("Channel error:",t)})}initialize(t,e){if(e.port!=null&&!Y(e.port))throw new Error("Configured port must have postMessage");if(c(this,O,e.port),c(this,J,e.timeout??1e3),e.subscriptions&&e.subscriptions.length)for(let s of e.subscriptions)r(this,P).push(s)}actions(){let t={ready:()=>r(this,q),portProvider:e=>{if(typeof e!="function")throw new Error("portProvider must be a function");return c(this,$,e),t},connect:async(e,s)=>{let i=null;typeof s=="function"?i=s:s&&typeof s=="object"&&typeof s.portProvider=="function"&&c(this,$,s.portProvider);try{if(c(this,O,e??r(this,O)),Y(r(this,O))||r(this,$)&&c(this,O,await r(this,$).call(this)),!Y(r(this,O)))throw new Error("No port provided and no portProvider set");if(r(this,m)){let o=r(this,m);c(this,m,null),c(this,q,!1),o.close()}c(this,m,await Ae.connect({port:r(this,O),options:{timeoutMs:r(this,J)}}));let n=r(this,m);n.onMessage(async(o,S)=>await r(this,ee).call(this,o,S)),n.onEnable(o=>r(this,Q).call(this,"ENABLE",o,t)),n.onError(r(this,te)),n.onDisconnect(o=>{r(this,m)===n&&a(this,u,we).call(this,o)}),c(this,q,!0);for(let[o,S]of r(this,C)){let E;for(let d of S)d.timeoutMs!==void 0&&(E===void 0||d.timeoutMs>E)&&(E=d.timeoutMs);r(this,m).emit([w.SUBSCRIBE,o,E])}if(r(this,P).length>0){let o=r(this,P);c(this,P,[]);for(let S of o)a(this,u,le).call(this,S)}if(await a(this,u,me).call(this),r(this,Q).call(this,"CONNECT",!0,t),i&&typeof i=="function"){let o=i(t);typeof o=="function"&&c(this,$,o),i=null}return t}catch(n){return console.error("Channel error:",n),!1}},reconnect:e=>{if(!Y(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,v).enable.add(e),()=>r(this,v).enable.delete(e)},onDisable:e=>{if(typeof e!="function")throw new Error("Listener must be a function");return r(this,v).disable.add(e),()=>r(this,v).disable.delete(e)},onDisconnect:e=>{if(typeof e!="function")throw new Error("Listener must be a function");return r(this,v).disconnect.add(e),()=>r(this,v).disconnect.delete(e)},disconnect:()=>{if(r(this,m)){c(this,$,null),r(this,v).disconnect.forEach(e=>e("closed",t));for(let e of r(this,C).keys())r(this,m).emit([w.UNSUBSCRIBE,e]);r(this,m).close(),c(this,m,null),c(this,q,!1),r(this,C).clear(),r(this,B).clear(),c(this,P,[])}},use:(...e)=>{if(r(this,q)){for(let s of e)a(this,u,le).call(this,s);return t}for(let s of e)r(this,P).push(s);return t},broadcast:(e,...s)=>(a(this,u,I).call(this,w.MESSAGE,e,s),t),publish:(e,...s)=>(a(this,u,I).call(this,w.MESSAGE,e,s,null,{includeSelf:!0}),t),request:(e,...s)=>a(this,u,Z).call(this,w.MESSAGE,e,s),gather:(e,...s)=>a(this,u,_).call(this,w.GATHER,e,s),subscribe:(e,s)=>a(this,u,U).call(this,e,void 0,s,!1),subscribeOnce:(e,s)=>a(this,u,U).call(this,e,void 0,s,!0),unsubscribe:(e,s)=>a(this,u,he).call(this,e,s),to:(...e)=>({broadcast:(s,...i)=>{a(this,u,I).call(this,w.MESSAGE,s,i,e)},publish:(s,...i)=>{a(this,u,I).call(this,w.MESSAGE,s,i,e,{includeSelf:!0})},request:(s,...i)=>a(this,u,Z).call(this,w.MESSAGE,s,i,e),gather:(s,...i)=>a(this,u,_).call(this,w.GATHER,s,i,e)}),namespace:e=>({broadcast:(s,...i)=>{let n=e?`${e}/${s}`:s;return a(this,u,I).call(this,w.MESSAGE,n,i),t},publish:(s,...i)=>{let n=e?`${e}/${s}`:s;return a(this,u,I).call(this,w.MESSAGE,n,i,null,{includeSelf:!0}),t},request:(s,...i)=>{let n=e?`${e}/${s}`:s;return a(this,u,Z).call(this,w.MESSAGE,n,i)},gather:(s,...i)=>{let n=e?`${e}/${s}`:s;return a(this,u,_).call(this,w.GATHER,n,i)},subscribe:(s,i)=>{let n=e?`${e}/${s}`:s;return a(this,u,U).call(this,n,void 0,i,!1),t},subscribeOnce:(s,i)=>{let n=e?`${e}/${s}`:s;return a(this,u,U).call(this,n,void 0,i,!0),t},unsubscribe:(s,i)=>{let n=e?`${e}/${s}`:s;return a(this,u,he).call(this,n,i),t}})};return c(this,H,t),t}},m=new WeakMap,O=new WeakMap,J=new WeakMap,B=new WeakMap,C=new WeakMap,P=new WeakMap,q=new WeakMap,$=new WeakMap,x=new WeakMap,H=new WeakMap,v=new WeakMap,u=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,o]of i){let{handler:S,schema:E,namespace:d,once:M,timeoutMs:G}=o,A=d?`${d}/${e}:${n}`:`${e}:${n}`,T=(...F)=>{try{return S(...F)}catch(z){console.error(`Errow with ${A}:`,z)}};a(this,u,U).call(this,A,E,T,M,G)}}},U=function(t,e,s,i=!1,n=void 0){r(this,C).has(t)||r(this,C).set(t,new Set);let o={event:t,schema:e,subscriber:s,once:i,timeoutMs:n};return r(this,C).get(t).add(o),r(this,m)&&r(this,m).emit([w.SUBSCRIBE,t,n]),()=>r(this,C).get(t)?.delete(o)},he=function(t,e){if(!r(this,C).has(t))return;let s=r(this,C).get(t);for(let i of s.values())if(i.subscriber===e)return s.delete(i),e},I=function(t,e,s,i=null,{includeSelf:n=!1}={}){if(!r(this,m)){console.warn(`[Channel] ${n?"publish":"broadcast"} "${e}" dropped \u2014 not connected`);return}if(typeof(s.length>0?s[s.length-1]:void 0)=="function"){let o=s.pop();r(this,m).callback([t,e,s,i],o,{includeSelf:n});return}r(this,m).emit([t,e,s,i],{includeSelf:n})},Z=function(t,e,s,i=null){return r(this,m)?r(this,m).request([t,e,s,i],r(this,B).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,B).get(e)):Promise.reject(new Error(`Channel not connected \u2014 gather "${e}" dropped`))},me=async function(){try{let t=await r(this,m).request([w.SYNC]);if(Array.isArray(t))for(let[e,s]of t)r(this,B).set(e,s)}catch{}},ee=new WeakMap,Q=new WeakMap,te=new WeakMap,we=function(t){c(this,m,null),c(this,q,!1),r(this,B).clear(),r(this,v).disconnect.forEach(e=>{try{e(t,r(this,H))}catch(s){console.error("Channel onDisconnect listener error:",s)}}),a(this,u,ge).call(this)},ge=async function(){if(!(r(this,x)||!r(this,$))){c(this,x,!0);try{let t=await r(this,$).call(this);if(!Y(t))throw new Error("portProvider did not return a usable port");await r(this,H).connect(t)}catch(t){console.error("[Channel] reconnect failed:",t?.message??t)}finally{c(this,x,!1)}}},be=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(o=>typeof o)),!1;for(let o=0;o<i;o++){let S=s[o],E=e[o],d;if(Array.isArray(E)?d="Array":E===null?d="null":d=Object.prototype.toString.call(E).slice(8,-1),S==="Object"&&d==="Array"||S!==d)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{Ge as a,Oe as b};
@@ -1 +1 @@
1
- import{a as A}from"./chunk-RYWOKFM7.js";import{c as W}from"./chunk-UCLSDDOL.js";var X={};W(X,{useCallback:()=>L,useContext:()=>M,useDebugValue:()=>G,useEffect:()=>j,useErrorBoundary:()=>J,useId:()=>K,useImperativeHandle:()=>z,useLayoutEffect:()=>I,useMemo:()=>N,useReducer:()=>B,useRef:()=>w,useState:()=>V});var i,e,H,D,v=0,P=[],o=A,F=o.__b,k=o.__r,q=o.diffed,x=o.__c,T=o.unmount,U=o.__;function s(t,_){o.__h&&o.__h(e,t,v||_),v=0;var u=e.__H||(e.__H={__:[],__h:[]});return t>=u.__.length&&u.__.push({}),u.__[t]}function V(t){return v=1,B(R,t)}function B(t,_,u){var n=s(i++,2);if(n.t=t,!n.__c&&(n.__=[u?u(_):R(void 0,_),function(c){var a=n.__N?n.__N[0]:n.__[0],f=n.t(a,c);a!==f&&(n.__N=[f,n.__[1]],n.__c.setState({}))}],n.__c=e,!e.__f)){var r=function(c,a,f){if(!n.__c.__H)return!0;var l=!1,d=n.__c.props!==c;if(n.__c.__H.__.some(function(m){if(m.__N){l=!0;var S=m.__[0];m.__=m.__N,m.__N=void 0,S!==m.__[0]&&(d=!0)}}),h){var C=h.call(this,c,a,f);return l?C||d:C}return!l||d};e.__f=!0;var h=e.shouldComponentUpdate,g=e.componentWillUpdate;e.componentWillUpdate=function(c,a,f){if(this.__e){var l=h;h=void 0,r(c,a,f),h=l}g&&g.call(this,c,a,f)},e.shouldComponentUpdate=r}return n.__N||n.__}function j(t,_){var u=s(i++,3);!o.__s&&b(u.__H,_)&&(u.__=t,u.u=_,e.__H.__h.push(u))}function I(t,_){var u=s(i++,4);!o.__s&&b(u.__H,_)&&(u.__=t,u.u=_,e.__h.push(u))}function w(t){return v=5,N(function(){return{current:t}},[])}function z(t,_,u){v=6,I(function(){if(typeof t=="function"){var n=t(_());return function(){t(null),n&&typeof n=="function"&&n()}}if(t)return t.current=_(),function(){return t.current=null}},u==null?u:u.concat(t))}function N(t,_){var u=s(i++,7);return b(u.__H,_)&&(u.__=t(),u.__H=_,u.__h=t),u.__}function L(t,_){return v=8,N(function(){return t},_)}function M(t){var _=e.context[t.__c],u=s(i++,9);return u.c=t,_?(u.__==null&&(u.__=!0,_.sub(e)),_.props.value):t.__}function G(t,_){o.useDebugValue&&o.useDebugValue(_?_(t):t)}function J(t){var _=s(i++,10),u=V();return _.__=t,e.componentDidCatch||(e.componentDidCatch=function(n,r){_.__&&_.__(n,r),u[1](n)}),[u[0],function(){u[1](void 0)}]}function K(){var t=s(i++,11);if(!t.__){for(var _=e.__v;_!==null&&!_.__m&&_.__!==null;)_=_.__;var u=_.__m||(_.__m=[0,0]);t.__="P"+u[0]+"-"+u[1]++}return t.__}function O(){for(var t;t=P.shift();){var _=t.__H;if(t.__P&&_)try{_.__h.some(p),_.__h.some(y),_.__h=[]}catch(u){_.__h=[],o.__e(u,t.__v)}}}o.__b=function(t){e=null,F&&F(t)},o.__=function(t,_){t&&_.__k&&_.__k.__m&&(t.__m=_.__k.__m),U&&U(t,_)},o.__r=function(t){k&&k(t),i=0;var _=(e=t.__c).__H;_&&(H===e?(_.__h=[],e.__h=[],_.__.some(function(u){u.__N&&(u.__=u.__N),u.u=u.__N=void 0})):(_.__h.some(p),_.__h.some(y),_.__h=[],i=0)),H=e},o.diffed=function(t){q&&q(t);var _=t.__c;_&&_.__H&&(_.__H.__h.length&&(P.push(_)!==1&&D===o.requestAnimationFrame||((D=o.requestAnimationFrame)||Q)(O)),_.__H.__.some(function(u){u.u&&(u.__H=u.u,u.u=void 0)})),H=e=null},o.__c=function(t,_){_.some(function(u){try{u.__h.some(p),u.__h=u.__h.filter(function(n){return!n.__||y(n)})}catch(n){_.some(function(r){r.__h&&(r.__h=[])}),_=[],o.__e(n,u.__v)}}),x&&x(t,_)},o.unmount=function(t){T&&T(t);var _,u=t.__c;u&&u.__H&&(u.__H.__.some(function(n){try{p(n)}catch(r){_=r}}),u.__H=void 0,_&&o.__e(_,u.__v))};var E=typeof requestAnimationFrame=="function";function Q(t){var _,u=function(){clearTimeout(n),E&&cancelAnimationFrame(_),setTimeout(t)},n=setTimeout(u,35);E&&(_=requestAnimationFrame(u))}function p(t){var _=e,u=t.__c;typeof u=="function"&&(t.__c=void 0,u()),e=_}function y(t){var _=e;t.__c=t.__(),e=_}function b(t,_){return!t||t.length!==_.length||_.some(function(u,n){return u!==t[n]})}function R(t,_){return typeof _=="function"?_(t):_}export{V as a,B as b,j as c,I as d,w as e,z as f,N as g,L as h,M as i,G as j,J as k,K as l,X as m};
1
+ import{a as A}from"./chunk-S7MEYFKB.js";import{c as W}from"./chunk-P722OZCF.js";var X={};W(X,{useCallback:()=>L,useContext:()=>M,useDebugValue:()=>G,useEffect:()=>j,useErrorBoundary:()=>J,useId:()=>K,useImperativeHandle:()=>z,useLayoutEffect:()=>I,useMemo:()=>N,useReducer:()=>B,useRef:()=>w,useState:()=>V});var i,e,H,D,v=0,P=[],o=A,F=o.__b,k=o.__r,q=o.diffed,x=o.__c,T=o.unmount,U=o.__;function s(t,_){o.__h&&o.__h(e,t,v||_),v=0;var u=e.__H||(e.__H={__:[],__h:[]});return t>=u.__.length&&u.__.push({}),u.__[t]}function V(t){return v=1,B(R,t)}function B(t,_,u){var n=s(i++,2);if(n.t=t,!n.__c&&(n.__=[u?u(_):R(void 0,_),function(c){var a=n.__N?n.__N[0]:n.__[0],f=n.t(a,c);a!==f&&(n.__N=[f,n.__[1]],n.__c.setState({}))}],n.__c=e,!e.__f)){var r=function(c,a,f){if(!n.__c.__H)return!0;var l=!1,d=n.__c.props!==c;if(n.__c.__H.__.some(function(m){if(m.__N){l=!0;var S=m.__[0];m.__=m.__N,m.__N=void 0,S!==m.__[0]&&(d=!0)}}),h){var C=h.call(this,c,a,f);return l?C||d:C}return!l||d};e.__f=!0;var h=e.shouldComponentUpdate,g=e.componentWillUpdate;e.componentWillUpdate=function(c,a,f){if(this.__e){var l=h;h=void 0,r(c,a,f),h=l}g&&g.call(this,c,a,f)},e.shouldComponentUpdate=r}return n.__N||n.__}function j(t,_){var u=s(i++,3);!o.__s&&b(u.__H,_)&&(u.__=t,u.u=_,e.__H.__h.push(u))}function I(t,_){var u=s(i++,4);!o.__s&&b(u.__H,_)&&(u.__=t,u.u=_,e.__h.push(u))}function w(t){return v=5,N(function(){return{current:t}},[])}function z(t,_,u){v=6,I(function(){if(typeof t=="function"){var n=t(_());return function(){t(null),n&&typeof n=="function"&&n()}}if(t)return t.current=_(),function(){return t.current=null}},u==null?u:u.concat(t))}function N(t,_){var u=s(i++,7);return b(u.__H,_)&&(u.__=t(),u.__H=_,u.__h=t),u.__}function L(t,_){return v=8,N(function(){return t},_)}function M(t){var _=e.context[t.__c],u=s(i++,9);return u.c=t,_?(u.__==null&&(u.__=!0,_.sub(e)),_.props.value):t.__}function G(t,_){o.useDebugValue&&o.useDebugValue(_?_(t):t)}function J(t){var _=s(i++,10),u=V();return _.__=t,e.componentDidCatch||(e.componentDidCatch=function(n,r){_.__&&_.__(n,r),u[1](n)}),[u[0],function(){u[1](void 0)}]}function K(){var t=s(i++,11);if(!t.__){for(var _=e.__v;_!==null&&!_.__m&&_.__!==null;)_=_.__;var u=_.__m||(_.__m=[0,0]);t.__="P"+u[0]+"-"+u[1]++}return t.__}function O(){for(var t;t=P.shift();){var _=t.__H;if(t.__P&&_)try{_.__h.some(p),_.__h.some(y),_.__h=[]}catch(u){_.__h=[],o.__e(u,t.__v)}}}o.__b=function(t){e=null,F&&F(t)},o.__=function(t,_){t&&_.__k&&_.__k.__m&&(t.__m=_.__k.__m),U&&U(t,_)},o.__r=function(t){k&&k(t),i=0;var _=(e=t.__c).__H;_&&(H===e?(_.__h=[],e.__h=[],_.__.some(function(u){u.__N&&(u.__=u.__N),u.u=u.__N=void 0})):(_.__h.some(p),_.__h.some(y),_.__h=[],i=0)),H=e},o.diffed=function(t){q&&q(t);var _=t.__c;_&&_.__H&&(_.__H.__h.length&&(P.push(_)!==1&&D===o.requestAnimationFrame||((D=o.requestAnimationFrame)||Q)(O)),_.__H.__.some(function(u){u.u&&(u.__H=u.u,u.u=void 0)})),H=e=null},o.__c=function(t,_){_.some(function(u){try{u.__h.some(p),u.__h=u.__h.filter(function(n){return!n.__||y(n)})}catch(n){_.some(function(r){r.__h&&(r.__h=[])}),_=[],o.__e(n,u.__v)}}),x&&x(t,_)},o.unmount=function(t){T&&T(t);var _,u=t.__c;u&&u.__H&&(u.__H.__.some(function(n){try{p(n)}catch(r){_=r}}),u.__H=void 0,_&&o.__e(_,u.__v))};var E=typeof requestAnimationFrame=="function";function Q(t){var _,u=function(){clearTimeout(n),E&&cancelAnimationFrame(_),setTimeout(t)},n=setTimeout(u,35);E&&(_=requestAnimationFrame(u))}function p(t){var _=e,u=t.__c;typeof u=="function"&&(t.__c=void 0,u()),e=_}function y(t){var _=e;t.__c=t.__(),e=_}function b(t,_){return!t||t.length!==_.length||_.some(function(u,n){return u!==t[n]})}function R(t,_){return typeof _=="function"?_(t):_}export{V as a,B as b,j as c,I as d,w as e,z as f,N as g,L as h,M as i,G as j,J as k,K as l,X as m};
@@ -0,0 +1 @@
1
+ import{a as x}from"./chunk-6J3NV2ZA.js";import{a as H,f as M,g as O}from"./chunk-GCPKA3IC.js";import{d as P,e as j,j as q,m as F,o as I,q as W,r as $,t as B,u as L}from"./chunk-UNPHH2YK.js";import{a as z}from"./chunk-YQ22OWEN.js";import"./chunk-FEFZSXXM.js";import"./chunk-5HNN2HVX.js";import{r as A}from"./chunk-FGKRC2QO.js";import"./chunk-P722OZCF.js";function Y(f,i,p){return p==null?f.remove([i,".editingDescriptor"]):f.set([i,".editingDescriptor"],p)}var re=z("contentEditor",f=>{let[i,p,s,C]=f("channel","contentEditor","state","sceneCompiler"),m=s.ref(["nodes"]);if(!m)throw new Error("Nodes not found");let n=null,d=null,c=null,h=null,b=!1;function R(e,t){return s.get(["nodes",e,"tagName"])??t?.tagName?.toLowerCase()}function _(e){let t=x(s.get(["nodes",e]));return t?$(t):""}function w(e,t){return x(s.get(["nodes",e]))??j(t?.textContent||"")}function E(e){if(!c)return;let t=c,r=()=>Y(m,t,e);s.history?.untracked?s.history.untracked(r):r()}function y(){E(null),n?.$el.focus({preventScroll:!0})}function k(e,t,r,{created:a=!1}={}){g(),d=e,c=t,b=a;let l=q(R(t,r));C.setEditingRid(e),n=p.start(r,{segments:w(t,r),blocks:l,history:s.history,onChange:o=>O(m,t,o),onSelection:({formats:o,mixed:u,start:T,end:v})=>{i.to("editor").broadcast("textFormat:selection",{formats:o,mixed:u,start:T,end:v,richText:l})},onLinkRequest:()=>i.to("editor").broadcast("textFormat:linkRequest"),onDescriptorOpen:({index:o,descriptor:u,rect:T,text:v,origin:J})=>{E(o),i.to("editor").broadcast("textFormat:descriptorOpen",{segIndex:o,descriptor:u,rect:T,text:v,origin:J})},onWheel:o=>i.to("renderWorker").broadcast("contentEditor:wheel",o),onEnd:o=>D(o),onPointerOutside:G}),h=A(()=>s.get(["nodes",t,"textContent"]),o=>{c===t&&n?.replace(Array.isArray(o)?o:w(t,r))})}let S=()=>b&&!!c&&!_(c).trim();function g(){let e=S()?c:null;b=!1,E(null),h?.(),h=null,n?.end(),n=null,d&&C.setEditingRid(null),d=null,c=null,e&&(s.history.group(),M(m,e),s.history.commit("Remove empty text"))}function D(e){d&&(i.to("renderWorker").broadcast("contentEditor:end",d,c,S()?"empty":e),g())}function G(e){let t=e.target.closest?.("[data-rid]"),r=t?.dataset.nodeId;if(t?.isContentEditable&&r){let a=d;k(t.dataset.rid,r,t),i.to("renderWorker").broadcast("contentEditor:switch",{oldRid:a,newRid:t.dataset.rid,newId:r});return}D("clickAway")}function N(e,t,r,a=60){let l=document.querySelector(`[data-rid="${e}"]`);if(l&&l!==t)return r(l);a>0&&requestAnimationFrame(()=>N(e,t,r,a-1))}return{start:{schema:["String","String","Object"],namespace:"stage",handler:(e,t,{created:r=!1}={})=>{let a=document.querySelector(`[data-rid="${e}"]`);if(!a)return console.error(`ContentEditor.start: $el not found for rid ${e}`),null;k(e,t,a,{created:r}),r&&(a.focus({preventScroll:!0}),n.select(0,0))}},end:{schema:null,namespace:"stage",handler:()=>g()},"format:apply":{schema:["Object"],namespace:"stage",handler:e=>n?.format.apply(e)},"format:remove":{schema:"*",namespace:"stage",handler:e=>n?.format.remove(e)},"format:clear":{schema:null,namespace:"stage",handler:()=>n?.format.clear()},"descriptor:insert":{schema:null,namespace:"stage",handler:()=>n?.descriptor.insert({...B})},"descriptor:update":{schema:["Object"],namespace:"stage",handler:({segIndex:e,descriptor:t})=>{y(),L(t)?n?.descriptor.remove(e):n?.descriptor.update(e,t)}},"descriptor:remove":{schema:["Object"],namespace:"stage",handler:({segIndex:e,text:t=""})=>{y(),n?.descriptor.remove(e,{text:t})}},"descriptor:close":{schema:["Object"],namespace:"stage",handler:({segIndex:e})=>{y(),n&&n.select(P(n.segments.slice(0,e+1)).length)}},convertToRichText:{schema:null,namespace:"stage",handler:()=>{if(!n||n.blocks)return;let e=d,t=c,r=n.$el,{start:a,end:l}=n.format.state(),o=W(I(n.segments),0,0,F(R(t,r)));g(),s.history.group(),H(m,t,"div"),O(m,t,o),s.history.commit("Convert to rich text"),N(e,r,u=>{c||(k(e,t,u),u.focus(),n.select(a,l))})}}}});export{re as contentEditorContracts};
@@ -0,0 +1,70 @@
1
+ import{a as Jn,c as Zn,d as Qn}from"./chunk-4WXMFOGZ.js";import{a as $,b as cr,c as lr,d as ur,e as yr,f as kr,g as vr,h as eo}from"./chunk-FWEUCYZO.js";import{a as er,b as tr,c as nr,d as or,e as rr,f as ir,g as pr,h as bt,i as mr,j as hr,k as fr,l as gr,m as xt,n as Nr,o as Ir}from"./chunk-CNULBMOT.js";import{a as jo}from"./chunk-6J3NV2ZA.js";import{b as Vt,c as Yt,d as an,e as Nn}from"./chunk-TKHZCD63.js";import"./chunk-3Q3DRUNQ.js";import"./chunk-KUZTBTFR.js";import{A as In,B as qe,C as En,D as kt,E as Cn,F as Ve,G as An,H as On,I as _n,K as $n,L as Rn,N as Sr,O as Dn,P as Pn,Q as Un,R as Mn,S as Bn,a as Kt,b as Jt,c as Zt,d as Qt,e as en,f as tn,g as nn,h as St,i as on,j as rn,k as sn,l as dn,m as cn,n as ln,o as pn,p as un,q as mn,r as hn,s as fn,t as gn,u as yn,v as wn,w as bn,x as xn,y as Sn,z as kn}from"./chunk-RDRAQE76.js";import{B as sr,C as ar,K as wr,L as br,N as xr,c as Uo,g as Mo,v as Lo,x as Bo,y as Fo}from"./chunk-426Z5MME.js";import{b as Xt}from"./chunk-DLROTED3.js";import{a as vn,d as Tn,f as Ln}from"./chunk-GCPKA3IC.js";import{A as Jo,B as Zo,C as Qo,a as Go,b as Wo,d as He,e as zo,h as Ho,o as yt,p as qo,r as Vo,s as wt,t as Xo,v as Ie,w as qt,x as ge,y as Yo,z as Ko}from"./chunk-UNPHH2YK.js";import{a as Fn,b as jn,c as Gn,d as Wn,e as zn,f as Hn,g as qn,h as Vn,i as Xn,j as vt,k as Nt,l as It,m as Yn,n as Kn}from"./chunk-DUPQKWW3.js";import{b as dr}from"./chunk-YQ22OWEN.js";import"./chunk-FEFZSXXM.js";import{b as Ro,c as Do,d as Po,e as se}from"./chunk-5HNN2HVX.js";import"./chunk-RQACOEIA.js";import"./chunk-BXWISJ2Z.js";import{r as ze}from"./chunk-FGKRC2QO.js";import"./chunk-WN5EDULP.js";import"./chunk-ZDH2DALT.js";import"./chunk-S7MEYFKB.js";import{e as C,f as a,g as h,h as u,i as m,j as Ht}from"./chunk-P722OZCF.js";var ro={"claude-sonnet-4-6":{input:3,output:15},"claude-sonnet-5":{input:2,output:10},"claude-sonnet-5-5":{input:2,output:10,cacheRead:.2},"claude-opus-5":{input:5,output:25},"claude-opus-4-8":{input:5,output:25},"claude-opus-5-5":{input:4,output:20,cacheRead:.2}};var gi=ro["claude-sonnet-4-6"];function Ee(s){let e=s._name,t=s();return{namespace:e,operations:Object.entries(t).map(([n,o])=>({name:n,fullName:`${e}:${n}`,alias:o.alias||null,mcpName:o.mcpName||null,readOnly:o.readOnly===!0,description:o.description||"",schema:o.schema||[],examples:o.examples||[],returns:o.returns||"Object"}))}}function so(s,e,t){if(!Array.isArray(e)||e.length===0)return!0;let n=e[0];if(typeof n!="object"||Array.isArray(n))return console.warn(`Schema for ${t} should be an object with named parameters`),!0;for(let[o,r]of Object.entries(n)){let i=typeof r=="string"&&r.endsWith("?"),d=i?r.slice(0,-1):r,l=s[o];if(!(o in s)||l===void 0){if(i)continue;throw new Error(`Missing required parameter "${o}" in ${t}`)}let p=Array.isArray(l)?"Array":l===null?"Null":typeof l=="object"?"Object":l.constructor.name;if(p!==d&&d!=="Any")throw new Error(`Parameter "${o}" in ${t} must be of type ${d}, got ${p}`)}return!0}var Ye=Object.freeze({RESPOND:"respond",ASK:"ask",SCREENSHOT:"screenshot"});var la=2,pa={name:Ye.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"]}},ua={name:Ye.ASK,description:"Ask the user to choose before you go on, when the request could reasonably mean two to four different outcomes and guessing wrong would waste their time (which element, which layout, which of two readings). The options are shown as buttons; the one they pick comes back as their next message. Ends this turn \u2014 any operations in the same turn run first. Do not ask for permission or confirmation, and do not ask what you can find out by reading the scene or the files.",input_schema:{type:"object",properties:{question:{type:"string",description:"One short question"},options:{type:"array",items:{type:"string"},minItems:2,maxItems:4,description:"Two to four distinct choices, each a few words the user can click"}},required:["question","options"]}},ma={name:Ye.SCREENSHOT,description:"Render the current scene and look at it. Captures the full scrollable page, scaled to fit one review image when content is very tall. The JSX returned after each edit shows structure; a screenshot shows what the user will actually see. Use it to check your own work \u2014 after building a section, whenever layout could be wrong (overlapping elements, content overflowing its container, text the same colour as its background, collapsed or stretched spacing), and before you finish. Cheap relative to rebuilding something that turned out broken.",input_schema:{type:"object",properties:{reason:{type:"string",description:"What you are checking for (one short sentence)"},frameIds:{type:"array",items:{type:"string"},description:"Frame node ids to capture. Omit to capture every frame \u2014 prefer naming the frame you just changed."},fullPage:{type:"boolean",description:"Include all scroll-hidden content (default true). Set false for a viewport-only shot when checking a small visible region."}}}};function ao(s){let e=fa(s);return[pa,ua,ma,...e.map(ha)]}function ha(s){let e=s.operations.map(t=>{let n=Array.isArray(t.schema)?t.schema[0]:null,o=n&&typeof n=="object"?Object.entries(n).map(([i,d])=>`${i}: ${d}`).join(", "):"",r=(t.examples??[]).slice(0,la).map(i=>{let d=i.description?` \u2014 ${i.description}`:"";return`
2
+ Example: ${JSON.stringify(i.args)}${d}`}).join("");return` ${t.name} \u2014 ${t.description}
3
+ Args: { ${o} }${r}`}).join(`
4
+
5
+ `);return{name:s.namespace,description:`${s.namespace} operations. Put every operation for the current step in "ops" \u2014 they run in order, and {{ref}} values set by one are resolved for later ones. Batch aggressively: one call with ten operations costs a fraction of ten calls with one. You still see the re-rendered scene after each call.
6
+
7
+ ${e}`,input_schema:{type:"object",properties:{ops:{type:"array",description:"Operations to run, in order. Preferred over the single-operation form below.",items:{type:"object",properties:{op:{type:"string",description:`Operation name within ${s.namespace}`},args:{type:"object",description:"Arguments matching the operation's schema. A JSON object, not a string containing JSON."},ref:{type:"string",description:"Optional {{name}} reference for cross-operation use"}},required:["op","args"]}},op:{type:"string",description:`Single operation name within ${s.namespace}. Use "ops" instead when running more than one.`},args:{type:"object",description:"Arguments matching the operation's schema (single-operation form). A JSON object, not a string containing JSON."},ref:{type:"string",description:"Optional {{name}} reference for cross-operation use (single-operation form)"},message:{type:"string",description:"Short explanation of what you are doing (1 sentence)"}}}}}function fa(s){return!Array.isArray(s)||s.length===0?[]:s[0]?.namespace&&Array.isArray(s[0]?.operations)?s:s.map(e=>Ee(e))}var Tr=new Set(["parent","parentId","nodeId"]),K,Ae,ae,z,Oe,$r,Rr,Ce=class extends se{constructor(){super(...arguments);h(this,Oe);h(this,K,new Map);h(this,Ae,[]);h(this,ae,new Map);h(this,z,new Map)}getters(){return{operationsMetadata:()=>this.getOperationsMetadata(),anthropicTools:()=>this.getAnthropicTools()}}actions(){return{use:(...t)=>{for(let n of t)m(this,Oe,$r).call(this,n);return this},has:t=>a(this,K).has(t),isReadOnly:t=>a(this,K).get(this.resolveType(t))?.readOnly===!0,resolveType:t=>this.resolveType(t),describeUnresolved:t=>this.describeUnresolved(t),executeOperation:(t,n,o)=>this.executeOperation(t,n,o),executeBatch:t=>this.executeBatch(t)}}resolveType(t){return typeof t!="string"||!t?null:t.includes(":")?a(this,K).has(t)?t:null:a(this,ae).get(t)??a(this,z).get(t)??null}describeUnresolved(t){if(this.resolveType(t))return null;if(typeof t=="string"&&!t.includes(":")&&a(this,z).has(t)&&a(this,z).get(t)===null){let n=[];for(let[r,i]of a(this,K))i.name===t&&n.push(i.alias?`${r} (alias: ${i.alias})`:r);let o=n.length?n.join(" or "):t;return`Ambiguous operation: "${t}". Use ${o}.`}return`Unknown operation: ${t}`}getOperationsMetadata(){return a(this,Ae).map(t=>Ee(t))}getAnthropicTools(){return ao(a(this,Ae))}async executeOperation(t,n,o=null){let r=this.resolveType(t),i=a(this,K).get(r);if(!i)throw new Error(this.describeUnresolved(t));try{so(n,i.schema,t)}catch(d){throw console.error(`Validation failed for ${t}:`,d),d}if(!i.readOnly)for(let d of Tr){let l=n?.[d];if(typeof l=="string"&&l.startsWith("."))throw new Error(`${t}: "${l}" isn't one of the project's own nodes (it comes from a library or a .jux file), so it can't be changed here. Change its source instead.`)}try{return{result:await i.handler(n),ref:o}}catch(d){throw console.error(`Handler failed for ${t}:`,d),d}}async executeBatch(t){let{operations:n,description:o,expectation:r}=t;console.log("AiOperations: Executing batch",{count:n.length,description:o});let i=new Map,d=[],l=[];try{for(let p=0;p<n.length;p++){let c=n[p];console.log(`AiOperations: Executing [${p+1}/${n.length}] ${c.type}`);let f=m(this,Oe,Rr).call(this,c.args,i),{result:g}=await this.executeOperation(c.type,f,c.ref),y=g.id??g.rootId;if(c.ref&&y&&(i.set(c.ref,y),l.push(y)),g.treeMap)for(let[v,S]of Object.entries(g.treeMap))i.set(v,S),l.push(S);g.createdIds?.length&&l.push(...g.createdIds),d.push({operation:c.type,success:!0,result:g})}return console.log("AiOperations: Execution complete",{total:n.length,successful:d.length,createdIds:l}),{success:!0,description:o,expectation:r,results:d,createdIds:l,refMap:Object.fromEntries(i)}}catch(p){return console.error("AiOperations: Batch execution failed",p),{success:!1,description:o,error:p.message,failedAt:d.length,results:d}}}};K=new WeakMap,Ae=new WeakMap,ae=new WeakMap,z=new WeakMap,Oe=new WeakSet,$r=function(t){let n=this.inject("log");if(!t||typeof t!="function")throw new Error("Operation factory must be a function");let o=t._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,Ae).push(t);let r=t(this.inject);for(let[i,d]of Object.entries(r)){let{handler:l,schema:p,description:c,examples:f,returns:g,alias:y,readOnly:v}=d,S=`${o}:${i}`;if(!l||typeof l!="function")throw new Error(`Operation ${S} must have a handler function`);c||console.warn(`Operation ${S} missing description`),a(this,K).set(S,{namespace:o,name:i,handler:l,schema:p||[],description:c||"",examples:f||[],returns:g||"Object",alias:y||null,readOnly:v===!0}),y&&(a(this,ae).has(y)&&a(this,ae).get(y)!==S&&console.warn(`AiOperations: alias "${y}" already registered for ${a(this,ae).get(y)}, overriding with ${S}`),a(this,ae).set(y,S)),a(this,z).has(i)&&a(this,z).get(i)!==S?a(this,z).set(i,null):a(this,z).set(i,S)}},Rr=function(t,n){return t&&JSON.parse(JSON.stringify(t),(o,r)=>{if(o==="ref")return r;if(typeof r=="string"&&r.match(/^\{\{.*\}\}$/)){let i=n.get(r)??n.get(r.replace(/\.[^}]+(?=\}\}$)/,""));if(i)return i;if(Tr.has(o))throw new Error(`Unresolved reference "${r}" in "${o}". {{refs}} only resolve within the same tool call \u2014 use the real node id reported by the previous operation.`);return r}return r})},C(Ce,"manifest",{name:"AiOperations",namespace:"aiOps",version:"1.0.0",description:"AI operation registry and executor",author:"",license:"MIT",homepage:""});var _=Ro("AI_OPERATIONS",[Object]);var Ke=class extends se{actions(e){let t=()=>e("socket");return{tree:()=>e("cache").get(["files"])??{},read:n=>t().request("files:read",n),write:(n,o,r)=>t().request("files:write",n,o,r),create:(n,o,r)=>t().request("files:create",n,o,r),rename:(n,o)=>t().request("files:rename",n,o)}}};C(Ke,"manifest",{name:"FilesClient",namespace:"files",version:"1.0.0",description:"The design server\u2019s Files service, called over the socket"});function io(s){return s.nodeType===Node.ELEMENT_NODE&&(s.hasAttribute("data-atom")||s.getAttribute("contenteditable")==="false")}function Pr(s){return s.nodeType===Node.ELEMENT_NODE&&s.tagName==="BR"}function Ur(s){return s.nodeType===Node.ELEMENT_NODE&&s.hasAttribute("data-block")}function Ze(s){if(s.nodeType===Node.TEXT_NODE)return s.length;if(s.nodeType!==Node.ELEMENT_NODE)return 0;if(io(s))return 1;if(Pr(s))return s.hasAttribute("data-filler")?0:1;let e=Ur(s)?1:0;for(let t of s.childNodes)e+=Ze(t);return e}function Et(s,e){let t=0;for(let n=e;n&&n!==s;n=n.parentNode)for(let o=n.previousSibling;o;o=o.previousSibling)t+=Ze(o);return t}function ya(s,e){let t=null;for(let n=e;n&&n!==s;n=n.parentNode)io(n)&&(t=n);return t}function Je(s,e,t){if(!e||!s.contains(e))return null;let n=ya(s,e);if(n){let i=t===0&&(e===n||Et(n,e)===0);return Et(s,n)+(i?0:1)}if(e.nodeType===Node.TEXT_NODE)return Et(s,e)+Math.min(t,e.length);let o=e===s?0:Et(s,e),r=e.childNodes;for(let i=0;i<t&&i<r.length;i++)o+=Ze(r[i]);return o}function Mr(s,e){let t=s.childNodes;for(let n=0;n<t.length;n++){let o=t[n];if(o.nodeType===Node.TEXT_NODE){if(e<=o.length)return{point:{node:o,offset:e}};e-=o.length}else{if(o.nodeType!==Node.ELEMENT_NODE)continue;if(io(o)||Pr(o)){if(e===0)return{point:{node:s,offset:n}};e-=Ze(o)}else{let r=Mr(o,e);if(r.point)return r;if(e=r.remaining,Ur(o)){if(e===0)return{point:{node:o,offset:o.childNodes.length}};e-=1}}}}return{remaining:e}}function Dr(s,e){return Mr(s,Math.max(0,e)).point??{node:s,offset:s.childNodes.length}}function Ct(s){let e=s.ownerDocument.getSelection();if(!e||e.rangeCount===0)return null;let t=e.getRangeAt(0),n=Je(s,t.startContainer,t.startOffset),o=Je(s,t.endContainer,t.endOffset);return n===null||o===null?null:{start:Math.min(n,o),end:Math.max(n,o)}}function Qe(s,e,t=e){if(!s?.isConnected)return;let n=Ze(s),o=Math.min(Math.max(0,e),n),r=Math.min(Math.max(o,t),n),i=Dr(s,o),d=r===o?i:Dr(s,r),l=s.ownerDocument,p=l.createRange();p.setStart(i.node,i.offset),p.setEnd(d.node,d.offset);let c=l.getSelection();c.removeAllRanges(),c.addRange(p)}function Lr(s){for(let e=s.length-1;e>=0;e--){let t=s[e];if(t.type==="characterData"){t.target.data=t.oldValue??"";continue}if(t.type!=="childList")continue;let n=t.target;for(let i of Array.from(t.addedNodes))i.parentNode===n&&n.removeChild(i);let o=Array.from(t.removedNodes);if(o.length===0)continue;let r=null;t.nextSibling?.parentNode===n?r=t.nextSibling:t.previousSibling?.parentNode===n&&(r=t.previousSibling.nextSibling);for(let i of o)n.insertBefore(i,r)}}var At=s=>/\s/.test(s);function Br(s,e){let t=e;for(;t>0&&At(s[t-1]);)t--;for(;t>0&&!At(s[t-1]);)t--;return t}function Fr(s,e){let t=e;for(;t<s.length&&At(s[t]);)t++;for(;t<s.length&&!At(s[t]);)t++;return t}function jr(s,e){return e<=0?0:s.lastIndexOf(`
8
+ `,e-1)+1}function Gr(s,e){let t=s.indexOf(`
9
+ `,e);return t===-1?s.length:t}var wa={formatBold:"bold",formatItalic:"italic",formatUnderline:"underline",formatStrikeThrough:"strike",formatSuperscript:"sup",formatSubscript:"sub"},ba={historyUndo:"undo",historyRedo:"redo"},xa={deleteContentBackward:"charBackward",deleteContentForward:"charForward",deleteWordBackward:"wordBackward",deleteWordForward:"wordForward",deleteSoftLineBackward:"lineBackward",deleteHardLineBackward:"lineBackward",deleteSoftLineForward:"lineForward",deleteHardLineForward:"lineForward",deleteByCut:"selection",deleteContent:"selection"},Sa={childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},de,tt,J,we,ce,E,O,T,L,be,H,le,xe,pe,Te,Se,ue,x,co,et,Wr,zr,G,ye,lo,Hr,nt,ot,Ot,rt,_t,st,at,ie,_e=class _e{constructor(e,{segments:t,blocks:n=!1,onChange:o,onFormat:r,onHistory:i,onWheel:d}={},l={}){h(this,x);h(this,de,[]);h(this,tt,{});h(this,J,[]);h(this,we,"");h(this,ce,!1);h(this,E,0);h(this,O,0);h(this,T,{start:0,end:0});h(this,L,!1);h(this,be,[]);h(this,H,null);h(this,le,!1);h(this,xe,null);h(this,pe,!1);h(this,Te,null);h(this,Se,[]);h(this,ue,null);h(this,nt,e=>{e.stopPropagation(),e.preventDefault();let t=e.clipboardData;if(!t)return;let n=t.getData("text/plain")||t.getData("text/html");if(!n)return;let o=n;if(n!==t.getData("text/plain")){let r=document.createElement("div");r.innerHTML=n,o=r.textContent||""}m(this,x,ye).call(this),m(this,x,ie).call(this,a(this,E),a(this,O)-a(this,E),o,"paste")});h(this,ot,e=>{if(e.stopPropagation(),a(this,pe)||e.isComposing)return;e.preventDefault(),m(this,x,ye).call(this);let t=wa[e.inputType];if(t){this.onFormat?.(t);return}let n=ba[e.inputType];if(n){this.onHistory?.(n);return}let o=xa[e.inputType];if(o){let{start:r,end:i}=m(this,x,Hr).call(this,o,e);m(this,x,ie).call(this,r,i-r,"",e.inputType==="deleteByCut"?"cut":"delete");return}switch(e.inputType){case"insertText":case"insertReplacementText":case"insertFromYank":case"insertFromDrop":{let r=e.data??e.dataTransfer?.getData("text/plain")??"",{start:i,end:d}=m(this,x,lo).call(this,e)??{start:a(this,E),end:a(this,O)};m(this,x,ie).call(this,i,d-i,r,e.inputType==="insertText"?"input":"replace");break}case"insertParagraph":m(this,x,ie).call(this,a(this,E),a(this,O)-a(this,E),`
10
+ `,"break",{split:a(this,ce)});break;case"insertLineBreak":m(this,x,ie).call(this,a(this,E),a(this,O)-a(this,E),`
11
+ `,"break");break}});h(this,Ot,e=>{e.preventDefault(),this.onWheel({deltaX:e.deltaX,deltaY:e.deltaY,ctrlKey:e.ctrlKey,x:e.clientX,y:e.clientY})});h(this,rt,e=>{e.key===" "&&(e.preventDefault(),m(this,x,ye).call(this),m(this,x,ie).call(this,a(this,E),a(this,O)-a(this,E)," ","input"))});h(this,_t,e=>{if(a(this,le))return;if(a(this,pe)){a(this,Se).push(...e);return}u(this,L,!1);let{start:t,end:n}=a(this,T);Qe(this.$el,t,n),u(this,E,t),u(this,O,n),m(this,x,co).call(this)});h(this,st,()=>{m(this,x,ye).call(this),u(this,Te,{start:a(this,E),end:a(this,O)}),u(this,Se,[]),u(this,pe,!0)});h(this,at,e=>{let t=[...a(this,Se),...a(this,xe).takeRecords()];u(this,Se,[]),Lr(t),u(this,pe,!1);let n=a(this,Te)??{start:a(this,E),end:a(this,O)};u(this,Te,null);let o=e.data??"";if(!o){Qe(this.$el,n.start,n.end);return}m(this,x,ie).call(this,n.start,n.end-n.start,o,"composition")});this.$el=e,this.onChange=o,this.onFormat=r,this.onHistory=i,this.onWheel=d,u(this,ce,n),m(this,x,et).call(this,t?.length?t:zo("")),u(this,tt,l),m(this,x,Wr).call(this)}static create(e,t={},n={}){if(this.instances.has(e))return this.instances.get(e);let o=new _e(e,t,n);return _e.instances.set(e,o),o}get content(){return a(this,we)}get segments(){return a(this,J)}set segments(e){m(this,x,et).call(this,e)}get blocks(){return a(this,ce)}get cursor(){return{start:a(this,E),end:a(this,O)}}getSelection(){return m(this,x,ye).call(this),{start:a(this,E),end:a(this,O)}}select(e,t=e){let n=m(this,x,G).call(this,e),o=m(this,x,G).call(this,t);u(this,T,{start:n,end:o}),u(this,L,!1),Qe(this.$el,n,o),u(this,E,n),u(this,O,o)}setPendingSelection(e,t){u(this,T,{start:e,end:t}),u(this,L,!0)}afterRender(e){if(!a(this,L)){e();return}a(this,be).push(e),requestAnimationFrame(()=>m(this,x,co).call(this))}get storedFormats(){return a(this,H)}setStoredFormats(e){m(this,x,ye).call(this),u(this,H,e),u(this,T,{start:a(this,E),end:a(this,O)})}selectionChanged(){if(a(this,L)||a(this,pe))return!1;let e=Ct(this.$el);if(!e)return!1;let t={start:m(this,x,G).call(this,e.start),end:m(this,x,G).call(this,e.end)},n=t.start!==a(this,T).start||t.end!==a(this,T).end;return n&&(u(this,H,null),u(this,T,t)),n}replaceSegments(e,t){m(this,x,et).call(this,e),u(this,H,null);let n=m(this,x,G).call(this,t);u(this,T,{start:n,end:n}),u(this,L,!0),requestAnimationFrame(()=>{!a(this,L)||a(this,le)||(u(this,L,!1),Qe(this.$el,a(this,T).start,a(this,T).end))})}on(e,t,n=!1){this.$el.addEventListener(e,t,n);let o={eventName:e,callback:t,options:n};return a(this,de).push(o),()=>{this.$el.removeEventListener(e,t,n);let r=a(this,de).indexOf(o);r!==-1&&a(this,de).splice(r,1)}}destroy(){if(!a(this,le)){u(this,le,!0),u(this,be,[]),a(this,xe)?.disconnect(),this.$el.removeEventListener("paste",a(this,nt)),this.$el.removeEventListener("beforeinput",a(this,ot)),this.$el.removeEventListener("compositionstart",a(this,st)),this.$el.removeEventListener("compositionend",a(this,at)),this.$el.removeEventListener("keydown",a(this,rt)),a(this,ue)&&(document.removeEventListener("wheel",a(this,ue),{passive:!1,capture:!0}),u(this,ue,null));for(let{eventName:e,callback:t,options:n}of a(this,de))this.$el.removeEventListener(e,t,n);u(this,de,[]),_e.instances.delete(this.$el),a(this,tt).onDestroy?.(this)}}};de=new WeakMap,tt=new WeakMap,J=new WeakMap,we=new WeakMap,ce=new WeakMap,E=new WeakMap,O=new WeakMap,T=new WeakMap,L=new WeakMap,be=new WeakMap,H=new WeakMap,le=new WeakMap,xe=new WeakMap,pe=new WeakMap,Te=new WeakMap,Se=new WeakMap,ue=new WeakMap,x=new WeakSet,co=function(){let e=a(this,be);if(u(this,be,[]),!a(this,le))for(let t of e)t()},et=function(e){u(this,J,a(this,ce)?yt(e):e),u(this,we,He(a(this,J)))},Wr=function(){let{start:e,end:t}=Ct(this.$el)??{start:0,end:0};u(this,E,e),u(this,O,t),u(this,T,{start:e,end:t}),this.$el.addEventListener("paste",a(this,nt)),this.$el.addEventListener("beforeinput",a(this,ot)),this.$el.addEventListener("compositionstart",a(this,st)),this.$el.addEventListener("compositionend",a(this,at)),this.$el.tagName==="BUTTON"&&this.$el.addEventListener("keydown",a(this,rt)),u(this,xe,new MutationObserver(a(this,_t))),a(this,xe).observe(this.$el,Sa),this.onWheel&&(u(this,ue,a(this,Ot)),document.addEventListener("wheel",a(this,ue),{passive:!1,capture:!0}))},zr=function(){return a(this,we).length-(a(this,ce)?1:0)},G=function(e){return Math.max(0,Math.min(e,m(this,x,zr).call(this)))},ye=function(){if(a(this,L)){u(this,E,a(this,T).start),u(this,O,a(this,T).end);return}let e=Ct(this.$el);e&&(u(this,E,m(this,x,G).call(this,e.start)),u(this,O,m(this,x,G).call(this,e.end)))},lo=function(e){let[t]=e.getTargetRanges?.()??[];if(t){let n=Je(this.$el,t.startContainer,t.startOffset),o=Je(this.$el,t.endContainer,t.endOffset);if(n!==null&&o!==null)return{start:m(this,x,G).call(this,Math.min(n,o)),end:m(this,x,G).call(this,Math.max(n,o))}}return null},Hr=function(e,t){let n=m(this,x,lo).call(this,t);if(n&&n.start!==n.end)return n;let o=a(this,E),r=a(this,O);if(o!==r||e==="selection")return{start:o,end:r};let i=a(this,we);switch(e){case"charBackward":return{start:Math.max(0,o-1),end:o};case"charForward":return{start:o,end:Math.min(i.length,o+1)};case"wordBackward":return{start:Br(i,o),end:o};case"wordForward":return{start:o,end:Fr(i,o)};case"lineBackward":{let d=jr(i,o);return{start:d===o?Math.max(0,o-1):d,end:o}}case"lineForward":{let d=Gr(i,o);return{start:o,end:d===o?Math.min(i.length,o+1):d}}default:return{start:o,end:r}}},nt=new WeakMap,ot=new WeakMap,Ot=new WeakMap,rt=new WeakMap,_t=new WeakMap,st=new WeakMap,at=new WeakMap,ie=function(e,t,n,o,{split:r=!1}={}){if(t===0&&n==="")return;let i=e+n.length,d;r?d=qo(ge(a(this,J),e,t,""),e):(d=ge(a(this,J),e,t,n),n&&a(this,H)&&(d=Ko(d,e,i,a(this,H)))),u(this,H,null),m(this,x,et).call(this,d);let l=m(this,x,G).call(this,i);u(this,T,{start:l,end:l}),u(this,L,!0),this.onChange?.(a(this,J),{offset:e,deleteCount:t,insert:n,source:o})},C(_e,"instances",new WeakMap);var Z=_e;var qr=s=>/^\s+$/.test(s);function Vr(s,{pauseMs:e=800}={}){let t=!1,n=null,o=!1,r=null;function i(){r&&(clearTimeout(r),r=null),t&&(t=!1,n=null,s.commit("Edit text"))}function d({insert:l="",source:p}={}){if(p==="break"||p==="paste"||p==="cut"||p==="replace"){i();return}let c=l?"type":"delete",f=c==="type"&&o&&!qr(l);t&&(c!==n||f)&&i(),t||(s.group(),t=!0,n=c),o=c==="type"&&qr(l),r&&clearTimeout(r),r=setTimeout(i,e)}return{beforeEdit:d,commit:i,get open(){return t}}}function Xr(s,e){if(s===e)return null;let t=Math.min(s.length,e.length),n=0;for(;n<t&&s[n]===e[n];)n++;let o=0;for(;o<t-n&&s[s.length-1-o]===e[e.length-1-o];)o++;return e.length-o}var ka=[{key:"z",shift:!1,action:"undo"},{key:"z",shift:!0,action:"redo"},{key:"y",shift:!1,action:"redo",mac:!1},{key:"b",shift:!1,action:"bold"},{key:"i",shift:!1,action:"italic"},{key:"u",shift:!1,action:"underline"},{key:"x",shift:!0,action:"strike"},{key:"e",shift:!1,action:"code"},{key:"k",shift:!1,action:"link"}],va=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function Yr(s,e=va){if(!(e?s.metaKey:s.ctrlKey)||s.altKey)return null;let n=s.key.toLowerCase();return ka.find(r=>r.key===n&&r.shift===s.shiftKey&&(r.mac!==!1||!e))?.action??null}var Kr=(s,e)=>JSON.stringify(s)===JSON.stringify(e),B,w,W,Q,ee,D,b,Tt,$t,ke,it,Jr,Zr,$e,Qr,es,po,Rt,uo,Dt,Pt,ct,lt,dt=class{constructor(e,t={},n={}){h(this,b);h(this,B);h(this,w);h(this,W);h(this,Q);h(this,ee,null);h(this,D,!1);C(this,"format",{state:()=>{let{start:e,end:t}=a(this,w).getSelection(),n=a(this,w).storedFormats;return e===t&&n?{formats:n,mixed:[],start:e,end:t}:{...Qo(a(this,w).segments,e,t),start:e,end:t}},apply:e=>m(this,b,Rt).call(this,(t,n,o)=>Yo(t,n,o,e),t=>Wo(t,e)),remove:e=>{let t=Array.isArray(e)?e:[e];m(this,b,Rt).call(this,(n,o,r)=>t.reduce((i,d)=>Zo(i,o,r,d),n),n=>{let o={...n};for(let r of t)delete o[r];return o})},clear:()=>m(this,b,Rt).call(this,Jo,()=>({})),toggle:e=>{this.format.state().formats[e]?this.format.remove(e):this.format.apply({[e]:!0})}});C(this,"descriptor",{insert:e=>{if(a(this,D))return-1;let{start:t,end:n}=a(this,w).getSelection(),o=a(this,w).segments;n>t&&(o=ge(o,t,n-t,""));let r=qt(o,t,e);m(this,b,it).call(this,r,t+1);let i=Ie(a(this,w).segments,t);return m(this,b,$e).call(this,i,{origin:"insert"}),i},update:(e,t)=>{let n=[...a(this,w).segments];a(this,D)||!n[e]?.descriptor||(n[e]={...n[e],descriptor:{...t}},m(this,b,it).call(this,n,m(this,b,po).call(this,e)+1))},remove:(e,{text:t=""}={})=>{let n=[...a(this,w).segments];if(a(this,D)||!n[e]?.descriptor)return;let o=m(this,b,po).call(this,e);n.splice(e,1);let r=t?ge(n,o,0,t):n;m(this,b,it).call(this,r,o+t.length)}});h(this,Dt,e=>{if(e.isComposing)return;if(e.key==="Escape"){e.preventDefault(),e.stopPropagation(),this.end(),a(this,B).onEnd?.("escape");return}if(a(this,b,Tt)&&m(this,b,es).call(this,e)){e.preventDefault(),e.stopPropagation();return}let t=Yr(e);t&&(e.preventDefault(),e.stopPropagation(),t==="undo"||t==="redo"?m(this,b,uo).call(this,t):t==="link"?a(this,B).onLinkRequest?.():this.format.toggle(t))});h(this,Pt,e=>{let t=e.target.closest?.("[data-seg-index]");if(!t||!this.$el.contains(t))return;let n=Number(t.dataset.segIndex),o=a(this,w).segments[n];if(!o?.descriptor)return;if(a(this,b,Tt)){m(this,b,$e).call(this,n,{origin:"click"});return}let r=t.getBoundingClientRect();a(this,B).onDescriptorClick?.({index:n,descriptor:o.descriptor,rect:{left:r.left,top:r.top,right:r.right,bottom:r.bottom,width:r.width,height:r.height}})});h(this,ct,e=>{this.$el.contains(e.target)||a(this,B).onPointerOutside?.(e)});h(this,lt,()=>{a(this,ee)||a(this,D)||u(this,ee,requestAnimationFrame(()=>{u(this,ee,null),!a(this,D)&&(a(this,w).selectionChanged()&&a(this,W)?.commit(),m(this,b,ke).call(this))}))});u(this,B,t),u(this,Q,e.ownerDocument),u(this,W,t.history?Vr(t.history):null),u(this,w,Z.create(e,{segments:t.segments,blocks:t.blocks,onChange:(o,r)=>{if(a(this,b,Tt)&&m(this,b,Jr).call(this,o,r)){m(this,b,Zr).call(this,r.offset-1);return}a(this,W)?.beforeEdit(r),m(this,b,$t).call(this,o,r)},onFormat:o=>this.format.toggle(o),onHistory:o=>m(this,b,uo).call(this,o),onWheel:t.onWheel},n)),a(this,w).on("keydown",a(this,Dt)),a(this,w).on("click",a(this,Pt)),a(this,Q).addEventListener("mousedown",a(this,ct),!0),a(this,Q).addEventListener("selectionchange",a(this,lt)),m(this,b,ke).call(this)}get $el(){return a(this,w).$el}get segments(){return a(this,w).segments}get blocks(){return a(this,w).blocks}get ended(){return a(this,D)}select(e,t=e){a(this,w).select(e,t),m(this,b,ke).call(this)}replace(e){if(a(this,D))return;let t=this.blocks?yt(e):e,n=a(this,w).segments;if(Kr(t,n))return;a(this,W)?.commit();let o=Xr(He(n),He(t));a(this,w).replaceSegments(t,o??a(this,w).getSelection().end),m(this,b,ke).call(this)}end(){a(this,D)||(u(this,D,!0),a(this,W)?.commit(),a(this,Q).removeEventListener("mousedown",a(this,ct),!0),a(this,Q).removeEventListener("selectionchange",a(this,lt)),a(this,ee)&&cancelAnimationFrame(a(this,ee)),u(this,ee,null),a(this,w).destroy(),a(this,Q).getSelection()?.removeAllRanges())}};B=new WeakMap,w=new WeakMap,W=new WeakMap,Q=new WeakMap,ee=new WeakMap,D=new WeakMap,b=new WeakSet,Tt=function(){return typeof a(this,B).onDescriptorOpen=="function"},$t=function(e,t){a(this,B).onChange?.(e,{plainText:Vo(e),edit:t}),m(this,b,ke).call(this)},ke=function(){a(this,D)||a(this,B).onSelection?.(this.format.state())},it=function(e,t){a(this,W)?.commit(),a(this,w).segments=e,a(this,w).setPendingSelection(t,t),m(this,b,$t).call(this,a(this,w).segments,{source:"descriptor"})},Jr=function(e,t){return t.source!=="input"||t.insert!=="{"||t.deleteCount!==0||a(this,w).content[t.offset-1]!=="{"?!1:!e[Ie(e,t.offset)]?.formats?.code},Zr=function(e){let t=ge(a(this,w).segments,e,2,"");m(this,b,it).call(this,qt(t,e,{...Xo}),e+1),m(this,b,$e).call(this,Ie(a(this,w).segments,e),{origin:"braces"})},$e=function(e,{origin:t,text:n=""}){let o=a(this,w).segments[e];o?.descriptor&&a(this,w).afterRender(()=>{if(a(this,D))return;let i=this.$el.querySelector(`[data-seg-index="${e}"]`)?.getBoundingClientRect();a(this,B).onDescriptorOpen?.({index:e,descriptor:o.descriptor,rect:i?{left:i.left,top:i.top,right:i.right,bottom:i.bottom,width:i.width,height:i.height}:null,text:n,origin:t})})},Qr=function(){let{start:e,end:t}=a(this,w).getSelection();if(t!==e+1)return-1;let n=Ie(a(this,w).segments,e);return a(this,w).segments[n]?.descriptor?n:-1},es=function(e){if(e.metaKey||e.ctrlKey||e.altKey)return!1;let t=m(this,b,Qr).call(this);if(t!==-1)return e.key==="Enter"?(m(this,b,$e).call(this,t,{origin:"key"}),!0):e.key.length===1&&/\S/.test(e.key)?(m(this,b,$e).call(this,t,{origin:"key",text:e.key}),!0):!1;if(e.key!=="Backspace"&&e.key!=="Delete")return!1;let{start:n,end:o}=a(this,w).getSelection();if(n!==o)return!1;let r=e.key==="Backspace"?n-1:n;return a(this,w).content[r]!==Go||!a(this,w).segments[Ie(a(this,w).segments,r)]?.descriptor?!1:(this.select(r,r+1),!0)},po=function(e){let t=0;for(let n=0;n<e;n++)t+=a(this,w).segments[n].text.length;return t},Rt=function(e,t){if(a(this,D))return;a(this,W)?.commit();let{start:n,end:o}=a(this,w).getSelection();if(n===o){a(this,w).setStoredFormats(t(this.format.state().formats)),m(this,b,ke).call(this);return}let r=a(this,w).segments,i=e(r,n,o);!i||Kr(i,r)||(a(this,w).segments=i,a(this,w).setPendingSelection(n,o),m(this,b,$t).call(this,a(this,w).segments,{source:"format"}))},uo=function(e){let t=a(this,B).history;t&&(a(this,W)?.commit(),e==="undo"&&t.undo(),e==="redo"&&t.redo())},Dt=new WeakMap,Pt=new WeakMap,ct=new WeakMap,lt=new WeakMap;var te,pt,mo,Re=class extends se{constructor(){super(...arguments);h(this,pt);h(this,te,new Map)}actions(){return{start:(t,n={})=>{m(this,pt,mo).call(this,t,"start"),a(this,te).get(t)?.end();let o=new dt(t,n,{onDestroy:()=>{a(this,te).get(t)===o&&a(this,te).delete(t)}});return a(this,te).set(t,o),o},getSession:t=>a(this,te).get(t)??null,create:(t,n={})=>{try{return m(this,pt,mo).call(this,t,"create"),Z.create(t,n)}catch(o){return console.error(o),null}},getTarget:t=>Z.instances.get(t),destroy:t=>{let n=a(this,te).get(t);n?n.end():Z.instances.get(t)?.destroy()}}}};te=new WeakMap,pt=new WeakSet,mo=function(t,n){if(!(t instanceof HTMLElement))throw new Error(`ContentEditor.${n}: $el must be an HTMLElement`);t.isContentEditable||(t.contentEditable="true")},C(Re,"manifest",{name:"Content Editor",namespace:"contentEditor",version:"1.0.0",description:"Inline rich text editing over a segments model"});function Ut(s,e){let t=null,n=0;return typeof s=="function"?(t=s,typeof e=="number"&&(n=e)):typeof s=="number"&&(n=s),(...o)=>new Promise((r,i)=>{setTimeout(()=>{try{let d=t?t(...o):void 0;r(d)}catch(d){i(d)}},n)})}var Na=Object.defineProperty,j=(s,e)=>Na(s,"name",{value:e,configurable:!0}),De,q=(De=class{constructor(e=""){this.isMarker=!0,this.description=e}},j(De,"Marker"),De),Mt,N,Pe,ve,A,me,V,U,he,F,ns,Lt,os,rs,ut,ts=(Mt=class extends bt{constructor(){super(...arguments);h(this,F);h(this,N,[]);h(this,Pe,!1);h(this,ve,new Set);h(this,A,0);h(this,me,!1);h(this,V,new Map);h(this,U,!0);h(this,he,!1);C(this,"onUndoRedo",null);h(this,Lt,Ut(()=>{m(this,F,ut).call(this),u(this,he,!1)}));C(this,"undo",Ut(e=>{if(!this.onUndoRedo)throw new Error("Undo/redo handler is required for undo operation");if(m(this,F,ut).call(this),a(this,A)<=0)return!1;if(u(this,U,!1),!(a(this,N)[a(this,A)]instanceof q))return console.warn("Expected to be at a marker for undo operation"),!1;let t=new Set,n=a(this,A)-1;for(;n>0;){let o=a(this,N)[n];if(o instanceof q)break;t.add(hr(o)),n--}return u(this,A,n),this.onUndoRedo(Array.from(t)),e&&typeof e=="function"&&e(),u(this,U,!0),!0}));C(this,"redo",Ut(e=>{if(!this.onUndoRedo)throw new Error("Undo/redo handler is required for redo operation");if(a(this,A)>=a(this,N).length-1)return!1;if(u(this,U,!1),!(a(this,N)[a(this,A)]instanceof q))return console.warn("Expected to be at a marker for redo operation"),!1;let t=new Set;for(Ht(this,A)._++;a(this,A)<a(this,N).length;){let n=a(this,N)[a(this,A)];if(n instanceof q)break;t.add(n),Ht(this,A)._++}return this.onUndoRedo(t),e&&typeof e=="function"&&e(),u(this,U,!0),!0}))}initialize(e){this.onUndoRedo=t=>e.apply(t)}actions(e){return{undo:j(t=>this.undo(t),"undo"),redo:j(t=>this.redo(t),"redo"),canUndo:j(()=>this.canUndo(),"canUndo"),canRedo:j(()=>this.canRedo(),"canRedo"),group:j(t=>this.group(t),"group"),commit:j(t=>this.commit(t),"commit"),onCommit:j(t=>this.onCommit(t),"onCommit"),addMarker:j(t=>this.addMarker(t),"addMarker"),size:j(()=>this.size(),"size"),start:j(()=>m(this,F,ns).call(this),"start"),untracked:j(t=>this.untracked(t),"untracked")}}onStateChange(e,t,n){if(!a(this,Pe)||!a(this,U)||t.method==="apply")return;let o=a(this,V).get(e.address),r=o?{...t,from:o.from}:t;a(this,V).set(e.address,r),!n&&!a(this,me)&&m(this,F,os).call(this)}addMarker(e=""){m(this,F,ut).call(this,e),u(this,A,a(this,N).length-1)}canUndo(){return a(this,A)>0}canRedo(){return a(this,A)<a(this,N).length-1}size(){return a(this,N).length}group(e){return u(this,me,!0),typeof e=="function"?(e(this),this.commit()):()=>this.commit()}commit(e=""){return m(this,F,ut).call(this,e),u(this,me,!1),this}pause(){u(this,U,!1)}resume(){u(this,U,!0)}untracked(e){let t=a(this,U);u(this,U,!1);try{return e()}finally{u(this,U,t)}}onCommit(e){return a(this,ve).add(e),()=>{a(this,ve).delete(e)}}reset(){u(this,N,[new q("History Start")]),u(this,ve,new Set),u(this,A,0),u(this,me,!1),u(this,V,new Map),u(this,U,!0),u(this,he,!1),u(this,Pe,!1),this.onUndoRedo=null}},N=new WeakMap,Pe=new WeakMap,ve=new WeakMap,A=new WeakMap,me=new WeakMap,V=new WeakMap,U=new WeakMap,he=new WeakMap,F=new WeakSet,ns=function(){u(this,N,[new q("History Start")]),u(this,A,0),u(this,Pe,!0),a(this,V).clear(),u(this,me,!1),u(this,he,!1)},Lt=new WeakMap,os=function(){a(this,he)||(u(this,he,!0),a(this,Lt).call(this))},rs=function(){let e=0;for(let t=1;t<a(this,N).length;t++)a(this,N)[t]instanceof q&&e++;for(;e>this.options.maxSize;){let t=a(this,N).findIndex((n,o)=>o>0&&n instanceof q);a(this,N).splice(1,t),e--}},ut=function(e=""){if(a(this,V).size===0)return;a(this,A)<a(this,N).length-1&&a(this,N).splice(a(this,A)+1);let t=Array.from(a(this,V).values());a(this,N).push(...t),a(this,ve).forEach(n=>n(t)),a(this,N)[a(this,N).length-1]instanceof q||a(this,N).push(new q(e||Date.now().toString())),m(this,F,rs).call(this),a(this,V).clear(),u(this,A,a(this,N).length-1)},C(Mt,"name","history"),C(Mt,"options",{maxSize:100}),Mt);var Ia=Object.defineProperty,mt=(s,e)=>Ia(s,"name",{value:e,configurable:!0}),ho,fe,ne,Ue,Ne,ht,P,as,is,fo,Bt,ds,ss=(ho=class extends bt{constructor(e={}){super(e);h(this,P);h(this,fe,new Set);h(this,ne,new Map);h(this,Ue,!1);h(this,Ne,!1);h(this,ht,0);u(this,ht,e.debounce??0)}actions(){return{addListener:mt(e=>{if(typeof e=="function")return m(this,P,fo).call(this,e)},"addListener"),subscribe:mt(e=>{if(typeof e=="function")return m(this,P,fo).call(this,e)},"subscribe"),unsubscribe:mt(e=>{if(typeof e=="function")return m(this,P,Bt).call(this,e)},"unsubscribe"),removeListener:mt(e=>m(this,P,Bt).call(this,e),"removeListener"),clear:mt(()=>m(this,P,ds).call(this),"clear")}}onStateChange(e,t){!a(this,Ne)||t.method==="apply"||m(this,P,as).call(this,e,t)}},fe=new WeakMap,ne=new WeakMap,Ue=new WeakMap,Ne=new WeakMap,ht=new WeakMap,P=new WeakSet,as=function(e,t){a(this,ne).has(e.address)&&a(this,ne).delete(e.address),a(this,ne).set(e.address,t),m(this,P,is).call(this)},is=function(){if(!a(this,Ue)){u(this,Ue,!0);try{setTimeout(()=>{let e=Array.from(a(this,ne).values());a(this,ne).clear();for(let t of a(this,fe))try{t(e)}catch(n){console.error("Error in onChange listener:",n)}u(this,Ue,!1)},a(this,ht))}catch(e){console.error(e)}}},fo=function(e){return a(this,fe).add(e),u(this,Ne,!0),()=>m(this,P,Bt).call(this,e)},Bt=function(e){typeof e=="function"&&(a(this,fe).delete(e),a(this,fe).size===0&&u(this,Ne,!1))},ds=function(){a(this,fe).clear(),a(this,ne).clear(),u(this,Ne,!1)},C(ho,"name","onChange"),ho);function cs(){let s=window.innerWidth,e=window.innerHeight,n=document.body.style.transform||"",o={x:0,y:0},r=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&&(r=parseFloat(d[1]))}return{scroll:o,scale:r,width:s,height:e}}function go(s,e,{maxDepth:t=1/0,outline:n=!1}={}){let o=d=>{let l=s[d];if(!l)return null;if(l.ex&&s[l.ex]){let p=o(l.ex);if(!p)return l;let{ex:c,...f}=l;return Object.assign({},p,f)}return l},r=(d,l,p)=>{if(!l.type)return p;let c=d?.ex&&br(d.ex)?d.ex:l.type,f=l.type==="element"?c:l.type,g=wr(c);return g?`${f}:${g}`:f},i=(d,l)=>{let p=s[d],c=o(d);if(!c)return`<!-- missing: ${d} -->`;let f=r(p,c,d),g=er(c,d,null,{outline:n}),y=rr(c),v=y!=null&&n?or(y):y,S=Array.isArray(c.children)?c.children:[];if(!(S.length>0||v!=null&&v!==""))return`<${f}${g} />`;if(l>=t){let R=S.length?`<\u22EF${S.length} children>`:"<\u22EFtext>";return`<${f}${g}>${R}</${f}>`}if(v!=null&&v!==""&&S.length===0)return`<${f}${g}>${nr(v)}</${f}>`;let I=S.map(R=>tr(i(R,l+1),1)).join(`
12
+ `);return`<${f}${g}>
13
+ ${I}
14
+ </${f}>`};return i(e,0)}var yo={click:"onClick",dblclick:"onDoubleClick",doubleclick:"onDoubleClick",contextmenu:"onContextMenu",mousedown:"onMouseDown",mouseup:"onMouseUp",mousemove:"onMouseMove",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseover:"onMouseOver",mouseout:"onMouseOut",drag:"onDrag",dragstart:"onDragStart",dragend:"onDragEnd",dragenter:"onDragEnter",dragleave:"onDragLeave",dragover:"onDragOver",drop:"onDrop",keydown:"onKeyDown",keyup:"onKeyUp",keypress:"onKeyPress",change:"onChange",input:"onInput",submit:"onSubmit",reset:"onReset",focus:"onFocus",blur:"onBlur",invalid:"onInvalid",formdata:"onFormData",touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",touchcancel:"onTouchCancel",wheel:"onWheel",copy:"onCopy",cut:"onCut",paste:"onPaste",abort:"onAbort",canplay:"onCanPlay",canplaythrough:"onCanPlayThrough",durationchange:"onDurationChange",emptied:"onEmptied",ended:"onEnded",loadeddata:"onLoadedData",loadedmetadata:"onLoadedMetadata",loadstart:"onLoadStart",pause:"onPause",play:"onPlay",playing:"onPlaying",progress:"onProgress",ratechange:"onRateChange",seeked:"onSeeked",seeking:"onSeeking",stalled:"onStalled",suspend:"onSuspend",timeupdate:"onTimeUpdate",volumechange:"onVolumeChange",waiting:"onWaiting",animationstart:"onAnimationStart",animationend:"onAnimationEnd",animationiteration:"onAnimationIteration",transitionend:"onTransitionEnd",load:"onLoad",error:"onError",scroll:"onScroll",scrollend:"onScrollEnd",resize:"onResize",select:"onSelect",toggle:"onToggle",afterprint:"onAfterPrint",beforeprint:"onBeforePrint",beforeunload:"onBeforeUnload",hashchange:"onHashChange",languagechange:"onLanguageChange",message:"onMessage",messageerror:"onMessageError",offline:"onOffline",online:"onOnline",pagehide:"onPageHide",pageshow:"onPageShow",popstate:"onPopState",rejectionhandled:"onRejectionHandled",storage:"onStorage",unhandledrejection:"onUnhandledRejection",unload:"onUnload",auxclick:"onAuxClick",beforematch:"onBeforeMatch",beforetoggle:"onBeforeToggle",cancel:"onCancel",close:"onClose",contextlost:"onContextLost",contextrestored:"onContextRestored",cuechange:"onCueChange",securitypolicyviolation:"onSecurityPolicyViolation",slotchange:"onSlotChange"},Ea=new Set(Object.values(yo));function Me(s){if(typeof s!="string"||s.length===0)throw new Error('Event name must be a non-empty string. Use React-style names like "onClick" or "onSubmit".');if(Ea.has(s))return s;let e=s.toLowerCase(),t=e.startsWith("on")?e.slice(2):e,n=yo[t]??yo[e];if(n)return n;throw new Error(`Unknown event name: "${s}". Use React-style names like "onClick", "onSubmit", or "onMouseEnter".`)}var ls=new Set(["string","number","boolean","array","object"]);function Ca(s){return typeof s=="string"&&/^\s*function\b/.test(s)}function wo(s){let e=[];if(!s||typeof s!="object"||Array.isArray(s))throw new Error("store payload must be an object");(typeof s.name!="string"||!s.name.trim())&&e.push("name must be a non-empty string"),s.state!==void 0&&(Array.isArray(s.state)?s.state.forEach((t,n)=>{if(!t||typeof t!="object"||Array.isArray(t)){e.push(`state[${n}] must be an object`);return}(typeof t.key!="string"||!t.key.trim())&&e.push(`state[${n}].key must be a non-empty string`),(typeof t.type!="string"||!ls.has(t.type))&&e.push(`state[${n}].type must be one of ${[...ls].join("|")}`)}):e.push("state must be an array"));for(let t of["computed","actions"])if(s[t]!==void 0){if(!Array.isArray(s[t])){e.push(`${t} must be an array`);continue}s[t].forEach((n,o)=>{if(!n||typeof n!="object"||Array.isArray(n)){e.push(`${t}[${o}] must be an object`);return}(typeof n.name!="string"||!n.name.trim())&&e.push(`${t}[${o}].name must be a non-empty string`),Ca(n.code)||e.push(`${t}[${o}].code must be a function expression string (e.g. function () { ... })`)})}if(e.length)throw new Error(`Invalid store payload:
15
+ - ${e.join(`
16
+ - `)}`);return!0}function ps({breakpoint:s,state:e}){let t=[],n;return Uo(s)?t.push(s):s&&(n=s),e&&t.push(e),{...n?{breakpoint:n}:{},interactionState:t}}var us=_("node",s=>({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). parent is the id of the container to create the node INSIDE \u2014 always pass it when a container exists. It falls back to "app" (the canvas root), which is only correct for frames; creating at the root and moving the node afterwards costs two operations instead of one and re-renders the scene twice. A component instance is type "instance" with props { component, library? } \u2014 component is the local component node id, or the component name with its library.',alias:"create",mcpName:"create_node",schema:[{type:"String",props:"Object?",parent:"String?"}],examples:[{args:{type:"button",parent:"nd_hero"},description:"Create a button inside an existing container \u2014 pass that container id as parent"},{args:{type:"frame",props:{frame:"iPhone SE",name:"Home"},parent:"app"},description:"Frames are the exception \u2014 they belong at the canvas root"},{args:{type:"nav",parent:"nd_header"},description:"Create a nav inside an existing header"}],returns:"{ id: String, type: String }",handler:async e=>{let n=s("state").ref(["nodes"]),{type:o,props:r,parent:i="app"}=e,d=Pn(n,o,r,i);if(d instanceof Error)throw d;return(i==="app"||i==="components")&&_n(n,d),{id:d,type:o}}},updateStyle:{description:`Update styles for a node. Optional breakpoint targets a variant: "@720" (responsive), ":hover" (pseudo-state), "&.is-active" (custom state). For a state style at a breakpoint, pass both: breakpoint "@1280" and state "&.is-active". Size with intents instead of raw width/height where the parent matters: $width / $height take "fill" (take the remaining space, or stretch across), "hug" (fit the content) or a length ("240px"); the right CSS (flex, align-self, min-width\u2026) is compiled from the parent's layout and stays right when the parent changes direction. Writing $width replaces a raw width and vice versa. Placement: $flow "ignore" takes a child out of its parent's flow (placed by its insets, like a badge on a card), "sticky" sticks it in a block parent; $anchorX / $anchorY ("start" | "end" | "both" | "center") say which insets count ("end" with right: "16px" pins it right).`,mcpName:"update_style",schema:[{nodeId:"String",styles:"Object",breakpoint:"String?",state:"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"},{args:{nodeId:"nd_123",styles:{$width:"fill",$height:"48px"}},description:"Fill the parent along its row (or stretch across a column), fixed height"}],returns:"{ id: String, styles: Object }",handler:async e=>{let n=s("state").ref(["nodes"]),{nodeId:o,styles:r}=e,i=["display","position"].filter(p=>p in r),d=wn(n,o,{...r},ps(e)),l={id:o,styles:d};return i.length&&(l.warning=`Ignored ${i.join(", ")} \u2014 use setLayout (set_layout) to change layout mode; position follows the parent's layout and insets.`),l}},removeStyle:{description:"Remove style properties from a node, so they fall back to the breakpoint below or the base (the styles that apply at every width). Use it to delete an override rather than setting it to a value. Targets breakpoint/state the same way as updateStyle.",mcpName:"remove_style",schema:[{nodeId:"String",properties:"Array",breakpoint:"String?",state:"String?"}],examples:[{args:{nodeId:"nd_123",properties:["margin-left"]},description:"Drop a stray margin"},{args:{nodeId:"nd_toggle",properties:["color"],breakpoint:"@1280",state:"&.is-active"},description:"Remove a desktop-only active color so the base applies everywhere"}],returns:"{ id: String, removed: Array, missing: Array }",handler:async e=>{let n=s("state").ref(["nodes"]),{nodeId:o,properties:r}=e;if(!n.get([o]))throw new Error(`No node "${o}" in the scene.`);let i=ps(e);sn(n,o);let d=[...un(o,i.breakpoint),...i.interactionState],l=n.get(d)??{},p=r.filter(f=>f in l),c=r.filter(f=>!(f in l));for(let f of p)mn(n,o,f,i);return{id:o,removed:p,missing:c}}},updateText:{description:"Set the text of a text node. A variable goes inside the text as {{path}} (a dotted path, e.g. {{$wp.post.title}} or {{$item.name}}) or {{expression}}; the scene shows variables the same way. Replaces the node's text, formatting included.",mcpName:"update_text",schema:[{nodeId:"String",value:"String"}],examples:[{args:{nodeId:"nd_heading",value:"Welcome"},description:'Set static text to "Welcome"'},{args:{nodeId:"nd_byline",value:"By {{$item.author.name}}"},description:"Text with a variable in it"}],returns:"{ id: String, text: String }",handler:async e=>{let n=s("state").ref(["nodes"]),{nodeId:o,value:r}=e,i=Ho(r);return n.set([o,"textContent"],i),{id:o,text:wt(i)}}},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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o,parentId:r}=e;Tn(n,o);let i=Dn(n,o,r);return{id:o,movedTo:r,success:i}}},remove:{description:"Remove a node and all its descendants from the scene graph. Refused when it would leave a required designation (a WordPress project's Single, Archive or 404 template) on no page: give the designation to another page first (setDesignation).",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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o}=e,r=s("cache")?.get(["toolset"])?.designations??{},[i]=Bn(n,[o],r);if(i)throw new Error(i.reason);let[d,l]=Ln(n,o);return{id:d,removed:!0,removedNodes:l}}},setAutoLayout:{description:'Set the layout mode of a container node ("none" | "block" | "flex" | "grid"). Stores it as the $layout style intent and normalizes all direct children so they flow correctly. Always use this instead of setting display via updateStyle. Optional breakpoint ("@720") sets the layout from that width up, e.g. a column on mobile and a row from 720. Then shape a flex container with intents via updateStyle: $axis "x" (row) | "y" (column), $alignX / $alignY "start" | "center" | "end" (where the children sit, physically: left/top first) plus "stretch" | "baseline" across the flow, $distribute "between" | "around" | "evenly", $wrap true, $reverse true.',alias:"setLayout",mcpName:"set_layout",schema:[{nodeId:"String",layout:"String",breakpoint:"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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o,layout:r,breakpoint:i}=e;return xn(n,o,r,{breakpoint:i??"default"})}},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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o,name:r}=e;return r===""?(St(n,o),{id:o,name:""}):(yn(n,o,r),{id:o,name:r})}},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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o}=e;return St(n,o),{id:o}}},addComponent:{description:"Convert an existing node into a reusable local component. Nested nodes are replaced in-place by an instance; direct children of app/temp become the component artboard only (no instance). The component gets its own artboard on the canvas: give width/height close to the size it is used at (defaults: the node's px size, else 360x240). x/y are optional \u2014 by default the artboard goes beside the source frame, and it is always moved clear of other frames and artboards. Returns componentId and instanceId (null when promoted from app/temp).",mcpName:"add_component",schema:[{nodeId:"String",name:"String?",width:"Number?",height:"Number?",x:"Number?",y:"Number?"}],examples:[{args:{nodeId:"nd_card",name:"Card"},description:"Convert a card node into a reusable component"},{args:{nodeId:"nd_header",name:"Header",width:1280,height:72},description:"Make a full-width header component with a desktop-sized artboard"}],returns:"{ instanceId: String | null, componentId: String, name: String }",handler:async e=>{let n=s("state").ref(["nodes"]),{nodeId:o,name:r="",width:i,height:d,x:l,y:p}=e,{componentId:c,instanceId:f}=$n(n,o,r,{width:i,height:d,x:l,y:p});return{instanceId:f,componentId:c,name:r}}}}));var ms=_("tree",s=>({create:{description:'Create a nested tree of nodes recursively (use for complex structures like page sections). FRAMES are the only tree that belongs at the root \u2014 they MUST have parent "app". Every other tree must be created directly into its container by passing that container id as parent. Never create at the root and move afterwards: that costs two operations per node and re-renders the scene twice. Styles are composed styles: lay a container out with `$layout` / `$axis` (it sets the layout as set_layout would) and size children with `$width` / `$height`.',alias:"createTree",schema:[{tree:"Object",parent:"String?"}],examples:[{args:{tree:{type:"frame",name:"Home",frame:"iPhone SE",bounds:{x:0,y:400},styles:{$layout:"flex",$axis:"y",$alignX:"stretch",overflow:"hidden"},children:[{type:"header",styles:{padding:"16px"},children:[{type:"h1",text:"App Name"}]},{type:"main",styles:{$height:"fill"}},{type:"footer",styles:{padding:"16px"},text:"Footer"}]},parent:"app"},description:'A FRAME goes at the canvas root \u2014 parent "app"'},{args:{tree:{type:"section",name:"Hero Section",styles:{$layout:"flex",$axis:"y",gap:"24px",padding:"64px"},children:[{type:"h1",name:"Headline",text:"Build faster"},{type:"p",name:"Subheadline",text:"Ship in minutes, not weeks."},{type:"button",name:"CTA Button",text:"Get started"}]},parent:"nd_home_frame"},description:"Everything that is NOT a frame is created directly inside its container \u2014 pass the container id, do not create at the root and move it"}],returns:"{ rootId: String, createdIds: Array, treeMap: Object }",handler:async e=>{let t=s("state"),n=s("log"),o=t.ref(["nodes"]),{tree:r,parent:i="app"}=e,{rootId:d,createdIds:l,treeMap:p}=Un(o,r,i,{onWarn:(c,f)=>n.warn(c,f)});return{id:d,rootId:d,createdIds:l,treeMap:p,type:"tree"}}}}));function oe(s,e,t){if(s==null||s==="")return;let n=Bo(Fo(s,e));if(n){let o=e==="code"?"function (ctx, event) { \u2026 }":"function (ctx) { return \u2026 }";throw new Error(`${t} will not run: ${n}. Write a valid ${o}.`)}}function hs(s,e,{index:t,value:n}){if(Number.isInteger(t))return t;let o=s.get([e,"options","value"]);return Array.isArray(o)?o.findIndex(r=>r?.value===n):-1}var fs=_("behavior",s=>({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. "$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.$<storeName>.',mcpName:"add_event",schema:[{nodeId:"String",name:"String",binding:"String?",code:"String?",mode:"String?"}],examples:[{args:{nodeId:"nd_btn",name:"onClick",binding:"$default.increment"},description:"Call store action on click"},{args:{nodeId:"nd_btn",name:"onClick",code:`function (ctx, event) {
17
+ ctx.$todo.items.push({ text: ctx.$todo.newTodo, done: false })
18
+ ctx.$todo.newTodo = ""
19
+ }`},description:"Add click handler with code"},{args:{nodeId:"nd_form",name:"onSubmit",code:`function (ctx, event) {
20
+ event.preventDefault()
21
+ }`},description:"Prevent default on form submit"}],returns:"{ id: String, name: String }",handler:async e=>{let n=s("state").ref(["nodes"]),{nodeId:o,name:r,binding:i,code:d,mode:l}=e;oe(d,"code",`${r} handler`);let p=Me(r);if((n.get([o,"events"])??[]).find(g=>g.name===p)||Zt(n,o,p),i!==void 0){let g=(n.get([o,"events"])??[]).find(y=>y.name===p)??{name:p};qe(n,o,p,{...g,mode:"binding",binding:i.split("."),code:null})}else if(d!==void 0){let g=(n.get([o,"events"])??[]).find(y=>y.name===p)??{name:p};qe(n,o,p,{...g,mode:l??"code",code:d,binding:null})}return{id:o,name:p}}},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:`function (ctx, event) {
22
+ alert("hi")
23
+ }`}},description:"Update onClick handler"}],returns:"{ id: String, name: String }",handler:async e=>{let n=s("state").ref(["nodes"]),{nodeId:o,name:r,event:i}=e;oe(i?.code,"code",`${r} handler`);let d=Me(r),l=i?.name!==void 0?{...i,name:Me(i.name)}:{...i,name:d};return qe(n,o,d,l),{id:o,name:d}}},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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o,name:r}=e,i=Me(r);return dn(n,o,i),{id:o,name:i}}},updateRoute:{description:"Set the route path on a frame node for multi-page navigation. Params are `:name` segments in the path (/users/:id); read them at $router.currentRoute.params.id (strings).",mcpName:"set_route",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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o,route:r}=e,i=typeof r=="string"?{path:r}:r;return An(n,o,i),{id:o,route:i}}},setHomePage:{description:"Mark a frame as the home page (root route)",mcpName:"set_home_page",schema:[{nodeId:"String",isHomePage:"Any"}],examples:[{args:{nodeId:"nd_frame",isHomePage:!0},description:"Set as home page"}],returns:"{ id: String, isHomePage: Any }",handler:async e=>{let n=s("state").ref(["nodes"]),{nodeId:o,isHomePage:r}=e;return fn(n,o,r),{id:o,isHomePage:r}}},setDesignation:{description:'Give a node a designation its project kind declares, or clear it with value null. A WordPress project designates its pages as templates: kind "wordpress", value "single" | "archive" | "404" | "front-page" | "page" | "search". A value another page holds moves to this one. Refused when it would leave a required designation (Single, Archive, 404) on no page.',mcpName:"set_designation",schema:[{nodeId:"String",kind:"String",value:"Any"}],examples:[{args:{nodeId:"nd_frame",kind:"wordpress",value:"single"},description:"Make a page the Single post template"}],returns:"{ id: String, kind: String, value: Any, moved: Array }",handler:async e=>{let t=s("state").ref(["nodes"]),n=s("cache")?.get(["toolset"])?.designations??{},{nodeId:o,kind:r,value:i=null}=e,d=Mn(t,o,r,i,n);if(!d.ok)throw new Error(d.reason);return{id:o,kind:r,value:i,moved:d.moved}}},setDestination:{description:"Set a navigation destination on a link or button node",mcpName:"set_destination",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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o,destination:r}=e,i=typeof r=="string"?{path:r}:r;return hn(n,o,i),{id:o,destination:i}}},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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o}=e;return nn(n,o),{id:o}}},setRepeat:{description:'Repeat a node for each item in a data binding (loop). binding is a dot-path on ctx (e.g. "$todo.items").',schema:[{nodeId:"String",binding:"String",as:"String?",index:"String?",key:"Any?",keyOn:"Any?"}],examples:[{args:{nodeId:"nd_card",binding:"$todo.items",as:"$item"},description:"Repeat card for each item in the todo store"}],returns:"{ id: String, binding: String }",handler:async e=>{let n=s("state").ref(["nodes"]),{nodeId:o,binding:r,as:i,index:d,key:l,keyOn:p}=e,c=r.split(".");return kn(n,o,{descriptor:{mode:"binding",binding:c},as:i,index:d,key:l,keyOn:p}),{id:o,binding:r}}},clearRepeat:{description:"Remove repeat binding from a node",schema:[{nodeId:"String"}],examples:[{args:{nodeId:"nd_card"},description:"Stop repeating"}],returns:"{ id: String }",handler:async e=>{let n=s("state").ref(["nodes"]),{nodeId:o}=e;return rn(n,o),{id:o}}},setRender:{description:'Conditionally show/hide a node based on an expression. Pass an expression that uses ctx (e.g. "ctx.$user.isAdmin"); it is wrapped as a computed function automatically. Each store is at ctx.$<storeName> (the todo store is ctx.$todo); loop vars at ctx.$item / ctx.$index.',schema:[{nodeId:"String",value:"String"}],examples:[{args:{nodeId:"nd_admin",value:"ctx.$user.isAdmin"},description:"Show only for admins"}],returns:"{ id: String, value: String }",handler:async e=>{let n=s("state").ref(["nodes"]),{nodeId:o,value:r}=e;return oe(r,"computed","render condition"),Sn(n,o,{mode:"computed",computed:r}),{id:o,value:r}}},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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o}=e;return on(n,o),{id:o}}},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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o,stateName:r}=e;return tn(n,o,r),{id:o,stateName:r}}},updateState:{description:`Set the expression that controls when a state is active. Pass an expression that uses ctx (e.g. "ctx.$tabs.current === 'home'"); like setRender, it is wrapped as a computed function automatically. A full function (ctx) { \u2026 } string is used as given.`,schema:[{nodeId:"String",stateName:"String",expression:"String"}],examples:[{args:{nodeId:"nd_tab",stateName:"is-active",expression:'ctx.$router.currentRoute?.path === "/"'},description:"Activate on home route"},{args:{nodeId:"nd_toggle",stateName:"is-active",expression:"ctx.$pricing.period === 'yearly'"},description:"Activate from a store value"}],returns:"{ id: String, stateName: String }",handler:async e=>{let n=s("state").ref(["nodes"]),{nodeId:o,stateName:r,expression:i}=e;return oe(i,"computed",`${r} expression`),On(n,o,r,{name:r,mode:"computed",computed:i??null}),{id:o,stateName:r}}},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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o,stateName:r}=e;return pn(n,o,r),{id:o,stateName:r}}},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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o,bounds:r}=e;return bn(n,o,r),{id:o,bounds:r}}},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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o,id:r}=e;return gn(n,o,r),{id:o,htmlId:r}}},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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o,name:r,value:i,mode:d}=e;return Jt(n,o,{name:r,value:i,mode:d}),{id:o,name:r}}},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:"$form.email"},description:"Two-way bind input to store"}],returns:"{ id: String, name: String }",handler:async e=>{let n=s("state").ref(["nodes"]),{nodeId:o,...r}=e;return oe(r.computed,"computed",`${r.name} attribute`),oe(r.code,"code",`${r.name} attribute`),typeof r.binding=="string"&&(r.binding=r.binding.split(".")),r.name==="model"&&r.mode==null&&(r.mode="binding"),In(n,o,r.name,r),{id:o,name:r.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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o,name:r}=e;return Kt(n,o,r),{id:o,name:r}}},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:`function (ctx) {
24
+ console.log("mounted")
25
+ }`},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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o,key:r,code:i,binding:d}=e;return oe(i,"code",`${r} hook`),Qt(n,o,r),(i!==void 0||d!==void 0)&&kt(n,o,r,{key:r,mode:i!==void 0?"code":"binding",code:i??"",binding:d??null}),{id:o,key:r}}},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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o,key:r,hook:i}=e;oe(i?.code,"code",`${r} hook`);let d=(n.get([o,"lifecycle"])??[]).find(l=>l.key===r)??{key:r};return kt(n,o,r,{...d,...i}),{id:o,key:r}}},removeLifecycleHook:{description:"Remove a lifecycle hook by key.",schema:[{nodeId:"String",key:"String"}],returns:"{ id: String, key: String }",handler:async e=>{let t=s("state");return cn(t.ref(["nodes"]),e.nodeId,e.key),{id:e.nodeId,key:e.key}}},addOption:{description:"Add a manual { label, value } 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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o,value:r,label:i}=e;return en(n,o,{value:r,label:i??r}),{id:o,value:r}}},updateOption:{description:"Update a manual select option, found by index or by its current value. Optionally pass a new value/label.",schema:[{nodeId:"String",index:"Number?",value:"String?",newValue:"String?",label:"String?"}],returns:"{ id: String, index: Number, value: String }",handler:async e=>{let n=s("state").ref(["nodes"]),{nodeId:o,newValue:r,label:i}=e,d=hs(n,o,e),l=n.get([o,"options","value",d]);if(!l)throw new Error(`Option not found on ${o}`);let p=r??l.value;return Cn(n,o,d,{value:p,label:i??l.label}),{id:o,index:d,value:p}}},removeOption:{description:"Remove a manual select option by index or by value.",schema:[{nodeId:"String",index:"Number?",value:"String?"}],returns:"{ id: String, index: Number }",handler:async e=>{let n=s("state").ref(["nodes"]),o=hs(n,e.nodeId,e);if(o<0)throw new Error(`Option not found on ${e.nodeId}`);return ln(n,e.nodeId,o),{id:e.nodeId,index:o}}},setOptionsBinding:{description:`Populate a select node's options from data instead of the manual list. binding is a dot-path on ctx (e.g. "$geo.countries") to an array of { label, value }. To map other data shapes, use behavior:updateOptions with mode "computed".`,schema:[{nodeId:"String",binding:"String"}],examples:[{args:{nodeId:"nd_select",binding:"$geo.countries"},description:"Populate options from a store"}],returns:"{ id: String, binding: String }",handler:async e=>{let t=s("state"),{nodeId:n,binding:o}=e;return Ve(t.ref(["nodes"]),n,{mode:"binding",binding:o.split(".")}),{id:n,binding:o}}},updateOptions:{description:`Set a select node's options descriptor. mode "value" (Manual) uses the { label, value } rows; mode "binding" takes binding (dot-path string); mode "computed" takes computed, a function (ctx) returning an array of { label, value } \u2014 use it to map other data shapes.`,schema:[{nodeId:"String",mode:"String",binding:"String?",computed:"String?"}],examples:[{args:{nodeId:"nd_select",mode:"computed",computed:`function (ctx) {
26
+ return ctx.$geo.countries.map(c => ({ label: c.name, value: c.code }))
27
+ }`},description:"Map store data to options"}],returns:"{ id: String, mode: String }",handler:async e=>{let t=s("state"),{nodeId:n,mode:o,binding:r,computed:i}=e;oe(i,"computed","options");let d={mode:o};return r&&(d.binding=r.split(".")),i&&(d.computed=i),Ve(t.ref(["nodes"]),n,d),{id:n,mode:o}}},clearOptionsBinding:{description:"Switch a select node back to its manual options list (rows are kept).",schema:[{nodeId:"String"}],returns:"{ id: String }",handler:async e=>{let t=s("state");return Ve(t.ref(["nodes"]),e.nodeId,{mode:"value",binding:null}),{id:e.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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o,tagName:r}=e;return vn(n,o,r),{id:o,tagName:r}}},updateHtml:{description:"Set the inner HTML of a template node (raw HTML embed).",schema:[{nodeId:"String",html:"String"}],returns:"{ id: String }",handler:async e=>{let t=s("state");return En(t.ref(["nodes"]),e.nodeId,e.html),{id:e.nodeId}}}}));var gs=_("token",s=>({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 e=>{let n=s("state").ref(["tokens"]),{path:o,value:r,type:i}=e;return{id:Zn(n,{$path:o,$value:r,...i!==void 0?{$type:i}:{}}),path:o}}},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 e=>{let n=s("state").ref(["tokens"]),{tokenId:o,changes:r={}}=e,i={};return r.path!==void 0&&(i.$path=r.path),r.value!==void 0&&(i.$value=r.value),r.type!==void 0&&(i.$type=r.type),Jn(n,o,i),{id:o}}},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 e=>{let n=s("state").ref(["tokens"]);return Qn(n,e.tokenId),{id:e.tokenId}}}}));var Aa=new Set(["router","animator","env"]);function bo(s,e){if(s==null||typeof s!="string")return s;switch(e){case"number":return s===""?0:Number(s);case"boolean":return s==="true"||s==="1";case"array":case"object":if(!s||s==="")return e==="array"?[]:{};try{return JSON.parse(s)}catch{return e==="array"?[]:{}}default:return s}}function Le(s,{key:e,name:t,index:n}){let o=e??t;return o!==void 0?s.findIndex(r=>(r.key??r.name)===o):n??-1}var ys=_("store",s=>({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. Write code multi-line with 2-space indentation, as it will read in the store file \u2014 never squeeze a function onto one line.",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 () {
28
+ const text = this.newText.trim();
29
+ if (!text) return;
30
+
31
+ this.items = [...this.items, { text, done: false }];
32
+ this.newText = "";
33
+ }`}]},description:"Create a todo store with state and actions in one call"}],returns:"{ id: String }",handler:async e=>{let t=s("state");if(wo(e),e.name.startsWith("$"))throw new Error(`Store name "${e.name}" cannot start with "$" (reserved for system stores)`);if(Aa.has(e.name))throw new Error(`Store name "${e.name}" is reserved: ctx.$${e.name} is a system key`);let n=t.ref([".stores"]),o=Yn(n,e.name);return e.state?.length&&n.set([o,"state"],e.state.map(r=>Gn({key:r.key,type:r.type,value:bo(r.value,r.type)}))),e.computed?.length&&n.set([o,"computed"],e.computed.map(r=>jn({name:r.name,code:r.code}))),e.actions?.length&&n.set([o,"actions"],e.actions.map(r=>Fn({name:r.name,code:r.code}))),{id:o}}},remove:{description:"Remove a data store and everything in it.",alias:"removeStore",schema:[{storeId:"String"}],returns:"{ id: String }",handler:async e=>{let t=s("state");return Kn(t.ref([".stores"]),e.storeId),{id:e.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 e=>{let n=s("state").ref([".stores"]),{storeId:o,key:r,type:i,value:d}=e;Hn(n,o,i);let l=n.get([o,"state"])??[],p=0,c=l[p];if(r!==void 0||d!==void 0){let f=i??c.type;It(n,o,p,{key:r??c.key,type:f,value:bo(d??c.value,f)})}return{storeId:o,key:r??c.key,index:p}}},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 e=>{let n=s("state").ref([".stores"]),{storeId:o,changes:r={}}=e,i=n.get([o,"state"])??[],d=Le(i,e);if(d<0)throw new Error(`store value not found: ${e.key??e.index} in ${o}`);let l={...i[d],...r};return r.value!==void 0&&(l.value=bo(l.value,l.type)),It(n,o,d,l),{storeId:o,index:d}}},removeValue:{description:"Remove a store value by key (or index).",schema:[{storeId:"String",key:"String?",index:"Number?"}],returns:"{ storeId: String, index: Number }",handler:async e=>{let n=s("state").ref([".stores"]),o=n.get([e.storeId,"state"])??[],r=Le(o,e);if(r<0)throw new Error(`store value not found: ${e.key??e.index} in ${e.storeId}`);return Xn(n,e.storeId,r),{storeId:e.storeId,index:r}}},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). Write it multi-line with 2-space indentation; lookup tables get one entry per line.",schema:[{storeId:"String",name:"String?",code:"String?"}],examples:[{args:{storeId:"cart",name:"total",code:`function () {
34
+ return this.items.reduce((sum, item) => sum + item.price, 0);
35
+ }`},description:"Add a cart total computed"},{args:{storeId:"pricing",name:"monthlyPrice",code:`function () {
36
+ const prices = {
37
+ '1-49': 125,
38
+ '50-99': 125,
39
+ '100-299': 200,
40
+ };
41
+
42
+ return prices[this.orgSize];
43
+ }`},description:"A lookup table, one entry per line"}],returns:"{ storeId: String, name: String, index: Number }",handler:async e=>{let n=s("state").ref([".stores"]),{storeId:o,name:r,code:i}=e;zn(n,o);let d=n.get([o,"computed"])??[],l=0,p=d[l];return(r!==void 0||i!==void 0)&&Nt(n,o,l,{name:r??p.name,code:i??p.code}),{storeId:o,name:r??p.name,index:l}}},updateComputed:{description:"Update a store computed property by name (or index). changes may include name, code. To change part of existing logic, prefer files edit on the store file \u2014 it keeps the rest of the code exactly as it is.",schema:[{storeId:"String",name:"String?",index:"Number?",changes:"Object"}],returns:"{ storeId: String, index: Number }",handler:async e=>{let n=s("state").ref([".stores"]),{storeId:o,changes:r={}}=e,i=n.get([o,"computed"])??[],d=Le(i,e);if(d<0)throw new Error(`store computed not found: ${e.name??e.index} in ${o}`);return Nt(n,o,d,{...i[d],...r}),{storeId:o,index:d}}},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 e=>{let n=s("state").ref([".stores"]),o=n.get([e.storeId,"computed"])??[],r=Le(o,e);if(r<0)throw new Error(`store computed not found: ${e.name??e.index} in ${e.storeId}`);return Vn(n,e.storeId,r),{storeId:e.storeId,index:r}}},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). Write it multi-line with 2-space indentation.",schema:[{storeId:"String",name:"String?",code:"String?"}],examples:[{args:{storeId:"cart",name:"clear",code:`function () {
44
+ this.items = [];
45
+ }`},description:"Add a clear-cart action"}],returns:"{ storeId: String, name: String, index: Number }",handler:async e=>{let n=s("state").ref([".stores"]),{storeId:o,name:r,code:i}=e;Wn(n,o);let d=n.get([o,"actions"])??[],l=0,p=d[l];return(r!==void 0||i!==void 0)&&vt(n,o,l,{name:r??p.name,code:i??p.code}),{storeId:o,name:r??p.name,index:l}}},updateAction:{description:"Update a store action by name (or index). changes may include name, code. To change part of existing logic, prefer files edit on the store file \u2014 it keeps the rest of the code exactly as it is.",schema:[{storeId:"String",name:"String?",index:"Number?",changes:"Object"}],returns:"{ storeId: String, index: Number }",handler:async e=>{let n=s("state").ref([".stores"]),{storeId:o,changes:r={}}=e,i=n.get([o,"actions"])??[],d=Le(i,e);if(d<0)throw new Error(`store action not found: ${e.name??e.index} in ${o}`);return vt(n,o,d,{...i[d],...r}),{storeId:o,index:d}}},removeAction:{description:"Remove a store action by name (or index).",schema:[{storeId:"String",name:"String?",index:"Number?"}],returns:"{ storeId: String, index: Number }",handler:async e=>{let n=s("state").ref([".stores"]),o=n.get([e.storeId,"actions"])??[],r=Le(o,e);if(r<0)throw new Error(`store action not found: ${e.name??e.index} in ${e.storeId}`);return qn(n,e.storeId,r),{storeId:e.storeId,index:r}}}}));var ws=_("animation",s=>({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 e=>{let n=s("state").ref(["animations"]),{name:o,keyframes:r,duration:i,easing:d,iterations:l,fill:p,scope:c}=e,f=Xt();return n.set([f],Vt({name:o,keyframes:r,duration:i,easing:d,iterations:l,fill:p,scope:c??"project"})),{id:f,name:o}}},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 e=>{let n=s("state").ref(["animations"]),{animationId:o,changes:r={}}=e;if(!n.get([o]))throw new Error(`animation not found: ${o}`);for(let[d,l]of Object.entries(r))n.set([o,d],l);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 e=>(s("state").ref(["animations"]).remove([e.animationId]),{id:e.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 e=>{let n=s("state").ref(["nodes"]),{nodeId:o,animationId:r,play:i,reverse:d}=e,l={id:r,play:i??"mount"};return d!==void 0&&(l.reverse=d),Yt(n,o,l),{nodeId:o,animationId:r}}},unbind:{description:"Remove an animation binding from a node by animation id.",schema:[{nodeId:"String",animationId:"String"}],returns:"{ nodeId: String, animationId: String }",handler:async e=>{let t=s("state");return an(t.ref(["nodes"]),e.nodeId,e.animationId),{nodeId:e.nodeId,animationId:e.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 e=>{let t=s("state");return Nn(t.ref(["nodes"]),e.nodeId,e.animationId,e.binding),{nodeId:e.nodeId,animationId:e.animationId}}}}));var bs=20,Oa=500,Be=s=>s("files");async function xo(s,e){let t=await s.read(e);if(!t?.ok)throw new Error(`${e}: ${t?.error??"could not be read"}. To make a new file, use create.`);return t.contents}var So={format:!0};function ko(s,e){return s.formatError?` Prettier could not parse it (${s.formatError}), so it was saved exactly as sent \u2014 check the syntax.`:typeof s.contents=="string"&&s.contents!==e?" Prettier reformatted it \u2014 read the file again before another edit, since find must match the saved text.":""}function Ft(s){let e=s.split(`
46
+ `).length;return`${e} line${e===1?"":"s"}`}var xs=_("files",s=>({list:{description:"List the project's files, optionally under a directory. The full list is also in the system prompt.",mcpName:"list_files",readOnly:!0,schema:[{dir:"String?"}],examples:[{args:{dir:"src/stores"},description:"See which stores exist"}],returns:"{ text: String }",handler:async({dir:e=""})=>{let t=String(e).replace(/^\.?\/+|\/+$/g,""),n=Object.values(Be(s).tree()??{}).filter(d=>d.type==="file").map(d=>d.path).filter(d=>!t||d.startsWith(`${t}/`)).sort();if(n.length===0)return{text:t?`No files under "${t}".`:"The project has no files."};let o=n.slice(0,Oa),r=n.length-o.length,i=r>0?`
47
+ \u2026and ${r} more. Pass a narrower dir to see them.`:"";return{text:`${n.length} file(s)${t?` under ${t}/`:""}:
48
+ ${o.join(`
49
+ `)}${i}`}}},read:{description:"Read one or more project files in full \u2014 the same files the user can open in the editor. Stores live at src/stores/<name>.js and hold their state, computed and action code. Read a file before reasoning about logic you cannot see in the scene, and never ask the user for code you can read yourself.",mcpName:"read_file",readOnly:!0,schema:[{paths:"Array"}],examples:[{args:{paths:["src/stores/pricing.js"]},description:"Read a store to see its computed formulas"}],returns:"{ text: String }",handler:async({paths:e})=>{let t=Be(s),n=e.slice(0,bs),o=[];for(let r of n){let i=await t.read(r);o.push(i?.ok?`--- ${r} (${Ft(i.contents)}) ---
50
+ ${i.contents}`:`--- ${r} ---
51
+ Error: ${i?.error??"could not be read"}`)}return e.length>n.length&&o.push(`Only the first ${bs} paths were read. Request the rest in another call.`),{text:o.join(`
52
+
53
+ `)}}},edit:{description:"Replace exact text in a file. find must match exactly once \u2014 copy it from a read, whitespace included \u2014 unless all is true. Prefer edit over write for changing part of a file, and keep the edit as small as the change. Write code the way a person would: multi-line, 2-space indentation, one entry per line in lookup tables. Every file change is recorded and the user can revert it from the chat, so do not ask permission first.",mcpName:"edit_file",schema:[{path:"String",find:"String",replace:"String",all:"Boolean?"}],examples:[{args:{path:"src/stores/pricing.js",find:"'1-49': 125,",replace:"'1-49': 130,"},description:"Change one price in a store's lookup table"}],returns:"{ text: String, change: Object }",handler:async({path:e,find:t,replace:n,all:o=!1})=>{if(!t)throw new Error("edit needs find: the exact text to replace.");let r=Be(s),i=await xo(r,e),d=i.split(t).length-1;if(d===0)throw new Error(`${e}: find text not found. Read the file and copy the text exactly, including whitespace.`);if(d>1&&!o)throw new Error(`${e}: find text matches ${d} places. Include more surrounding text so it is unique, or set all: true.`);let l=i.indexOf(t),p=o?i.split(t).join(n):i.slice(0,l)+n+i.slice(l+t.length),c=await r.write(e,p,So);if(!c?.ok)throw new Error(`${e}: ${c?.error??"write failed"}`);let f=c.contents??p,g=o?d:1;return{text:`Edited ${e}: replaced ${g} occurrence${g===1?"":"s"} (now ${Ft(f)}).${ko(c,p)}`,change:{kind:"edited",path:e,before:i,after:f}}}},write:{description:"Replace the whole contents of an existing file. For a change to part of a file, use edit. Write code the way a person would: multi-line, 2-space indentation, one statement per line.",mcpName:"write_file",schema:[{path:"String",contents:"String"}],returns:"{ text: String, change: Object }",handler:async({path:e,contents:t})=>{let n=Be(s),o=await xo(n,e),r=await n.write(e,t,So);if(!r?.ok)throw new Error(`${e}: ${r?.error??"write failed"}`);let i=r.contents??t;return{text:`Wrote ${e} (${Ft(i)}).${ko(r,t)}`,change:{kind:"edited",path:e,before:o,after:i}}}},create:{description:"Create a new file, making any folders on the way. Fails if the file already exists.",mcpName:"create_file",schema:[{path:"String",contents:"String?"}],examples:[{args:{path:"src/data/plans.json",contents:`[
54
+ { "name": "Starter", "price": 125 }
55
+ ]
56
+ `},description:"Add a data file"}],returns:"{ text: String, change: Object }",handler:async({path:e,contents:t=""})=>{let n=await Be(s).create(e,t,So);if(!n?.ok){let r=n?.error==="That name is already taken";throw new Error(`${e}: ${n?.error??"create failed"}.${r?" Use edit or write to change an existing file.":""}`)}let o=n.contents??t;return{text:`Created ${e} (${Ft(o)}).${ko(n,t)}`,change:{kind:"created",path:e,after:o}}}},rename:{description:"Move or rename a file.",mcpName:"rename_file",schema:[{from:"String",to:"String"}],returns:"{ text: String, change: Object }",handler:async({from:e,to:t})=>{let n=Be(s),o=await xo(n,e),r=await n.rename(e,t);if(!r?.ok)throw new Error(`${e} \u2192 ${t}: ${r?.error??"rename failed"}`);return{text:`Renamed ${e} \u2192 ${t}.`,change:{kind:"renamed",path:t,origin:e,after:o}}}}}));var Ss=["type","ex","tagName","name","component","library","layout","style","textContent","attributes","events","states","options","render","repeat","lifecycle","animations","route","destination","props","className"],_a=new Set(["id","children","bounds","anchor","dimensions","locked",".interactionState"]),Ta=new Set(["removable","dependencies"]),vo=s=>s.startsWith(`
57
+ `)?s:` ${s}`;function jt(s,e=0){let t=" ".repeat(e);if(typeof s=="string")return s.includes(`
58
+ `)?`|
59
+ `+s.split(`
60
+ `).map(o=>`${t} ${o}`).join(`
61
+ `):JSON.stringify(s);if(s===null||typeof s!="object")return String(s);if(Array.isArray(s))return s.length===0?"[]":`
62
+ `+s.map(o=>{let r=jt(o,e+1);return`${t}- ${r.startsWith(`
63
+ `)?r.trimStart():r}`}).join(`
64
+ `);let n=Object.entries(s).filter(([o,r])=>r!=null&&!Ta.has(o));return n.length===0?"{}":`
65
+ `+n.map(([o,r])=>`${t}${o}:${vo(jt(r,e+1))}`).join(`
66
+ `)}var ks=_("scene",s=>({get:{description:"Read part of the scene as JSX: a node and its subtree. The scene snapshot at the start of a run is only a starting view \u2014 subtrees past its depth show as <\u22EFN children>. Use this to expand one before editing inside it. Shows styles per breakpoint and state, select options, custom states and bindings; pass outline: true for ids and names only.",mcpName:"get_scene",readOnly:!0,schema:[{root:"String?",depth:"Number?",outline:"Boolean?"}],examples:[{args:{root:"nd_pricing_grid"},description:"Expand a collapsed section in full"},{args:{root:"app",depth:3,outline:!0},description:"A cheap overview: ids and names only, no styles"}],returns:"{ text: String }",handler:async({root:e="app",depth:t,outline:n=!1})=>{let o=s(),r=t??1/0;if("sceneCompiler"in o){let d=o.sceneCompiler.projectPuppetJsx(e,{maxDepth:r,outline:n});if(!d.startsWith("<!--"))return{text:d}}let i=o.state.get(["nodes"])??{};if(!i[e])throw new Error(`No node "${e}" in the scene.`);return{text:go(i,e,{maxDepth:r,outline:n})}}},inspect:{description:"Read everything stored on one node: styles per breakpoint and state, events with their code, attributes, custom states and their expressions, select options, render and text bindings, repeat, lifecycle hooks, animations. Use it before changing something the JSX only summarizes.",mcpName:"inspect_node",readOnly:!0,schema:[{nodeId:"String"}],examples:[{args:{nodeId:"nd_toggle_btn"},description:"See a button's is-active state expression and its state styles"}],returns:"{ text: String }",handler:async({nodeId:e})=>{let t=s("state").get(["nodes"])??{},n=t[e];if(!n)throw new Error(`No node "${e}" in the scene.`);let o=[...Ss.filter(l=>l in n),...Object.keys(n).filter(l=>!Ss.includes(l)&&!_a.has(l))],r=jo(n),i=[`node ${e}`];for(let l of o){if(l==="textContent"&&r){let c=wt(r);c&&i.push(`text:${vo(jt(c,1))}`);continue}let p=n[l];p==null||Array.isArray(p)&&p.length===0||i.push(`${l}:${vo(jt(p,1))}`)}let d=Array.isArray(n.children)?n.children:[];if(d.length){i.push("children:");for(let l of d){let p=t[l]?.name;i.push(` - ${l}${p?` (${p})`:""}`)}}return{text:i.join(`
67
+ `)}}}}));var vs=[us,ms,fs,gs,ys,ws,xs,ks];var No=[{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 Ns=[{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 Is=[{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:"richText",displayName:"Rich Text",category:"text",swapGroup:null,keywords:["text","rich text","article","paragraphs"],tagName:"div"},{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 Es=[{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 Cs=[{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 As=[{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 Os=[{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 Ts=[{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 $s=[{type:"slot",displayName:"Slot",category:"special",swapGroup:null,keywords:["slot","placeholder","component","template"],tagName:"slot"}];var Io=[...Ns,...Is,...Es,...Cs,...As,...Os,..._s,...Ts,...$s];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 Ds={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 Ps={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 Us={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 Ms={...Rs,...Ds,...Ps,...Us};var Ls=$("ledger",s=>{let[e,t]=s("state","socket");return e.ledger.addChangeListener(n=>{n.length&&t.publish("ledger:sync",n)}),{apply:{handler:n=>{e.ledger.apply(n)}}}});var Bs=$("presence",s=>{let e=s("channel");return{join:{handler:(t,n)=>{e.to("renderWorker").broadcast("user:connect",t,n)}},leave:{handler:t=>{e.to("renderWorker").broadcast("user:disconnect",t)}},update:{handler:(t,n)=>{e.to("renderWorker").broadcast("user:update",t,n)}},snapshot:{handler:t=>{e.to("renderWorker").broadcast("user:setAll",t)}}}});var Fs=$("assets",s=>{let[e,t,n]=s("cache","channel","socket"),o=r=>{e.set(["assets"],r),t.to("editor").broadcast("assets:set",r)};return n.onConnect(async()=>{try{o(await n.request("assets:requestSnapshot")??{})}catch{}}),{set:{handler:r=>o(r??{})},update:{handler:r=>o({...e.get(["assets"])??{},...r})},remove:{handler:r=>{let i={...e.get(["assets"])??{}};delete i[r],o(i)}}}});var js=$("files",s=>{let[e,t,n]=s("cache","channel","socket"),o=r=>{e.set(["files"],r),t.to("editor").broadcast("files:set",r)};return n.onConnect(async()=>{try{o(await n.request("files:requestSnapshot")??{})}catch{}}),{set:{handler:r=>o(r??{})},changed:{handler:r=>t.to("editor").broadcast("files:changed",r)}}});function Gs(s,e,t){let n=e.getSelectedRids?.()??[],o=s.get(["nodes"])??{},r=n.length>0?e.getIds(n):[],i=n.length>0?Da(o,r,n,e):Ra(e);return{framework:t.get(["config","framework"])??"react",componentCatalog:e.getMeta(),stores:s.get([".stores"])??{},tokens:s.get(["tokens"])??{},animations:s.get(["animations"])??{},files:Object.values(t.get(["files"])??{}).filter(d=>d.type==="file").map(d=>d.path).sort(),...i,availableFrames:Sr(),breakpoints:sr(o.app).map(d=>({name:d.name,breakpoint:ar(d),from:d.min})),layoutHints:Pa(o,n)}}var Ws=3;function Ra(s){return{scope:"global",jsx:s.projectPuppetJsx("app",{maxDepth:Ws,outline:!0})}}function Da(s,e,t,n){let o=Ma(s,e[0])??"app",r=n.projectPuppetJsx(o,{maxDepth:Ws,outline:!0}),i=n.projectPuppetJsx(t);return{scope:"local",selectedIds:e,jsx:`${r}
68
+
69
+ Selected (in full):
70
+ ${i}`}}function Pa(s,e){let t={viewportPositions:[],usedPositions:[],containerLayouts:{},suggestedViewportPosition:null},n=0;return Object.entries(s).forEach(([o,r])=>{if(o.startsWith("."))return;if((r.type==="frame"||r.type==="component")&&r.bounds){let{x:l,y:p,width:c,height:f}=r.bounds,g={id:o,name:r.name,top:p||0,left:l||0,width:c||375,height:f||667};t.viewportPositions.push(g);let y=g.left+g.width;y>n&&(n=y)}let i=Mo(r.style);if(r.type!=="frame"&&i.position==="absolute"){let{top:l,left:p,width:c,height:f}=i;t.usedPositions.push({id:o,top:parseInt(l)||0,left:parseInt(p)||0,width:parseInt(c)||100,height:parseInt(f)||50})}let d=Lo(r).default?.$layout;(d==="flex"||d==="grid")&&(t.containerLayouts[o]=d)}),t.suggestedViewportPosition={top:0,left:t.viewportPositions.length?n+100:0},t}function Ua(s,e){for(let[t,n]of Object.entries(s))if(n.children?.includes(e))return t;return null}function Ma(s,e){let t=e;for(;t;){let n=s[t];if(!n)return null;if(n.type==="frame")return t;t=Ua(s,t)}return null}function zs(s){let e=Object.keys(s),t=new Set(e);return e.filter(n=>{let o=new Set([n]),r=s[n]?.parentRid;for(;r&&!o.has(r);){if(t.has(r))return!1;o.add(r),r=s[r]?.parentRid}return!0})}var La=2e3;function Hs(s,e=[],t=La){let n=zs(s.updated??{});return n.length===0&&s.fullSync?e.length?e:null:n.length>t?null:n}function qs(s,e){return e.length<s.length}var Ba=5e3,Eo=50,Fa=40,Vs=$("ai:stage",s=>{let[e,t,n,o,r]=s("state","sceneCompiler","cache","log","aiOps");function i(p=Ba){return new Promise(c=>{let f={},g=new Set,y=null,v=!1,S=!1,M=()=>{clearTimeout(I),clearTimeout(y),Gt(),X?.(),c(v?{updated:f,removed:[...g],fullSync:S}:null)},I=setTimeout(M,p),R=()=>{if(t.isNodeGraphBusy?.()){y=setTimeout(R,Eo);return}M()},X=t.addRenderListener?.(()=>{v=!0,clearTimeout(y),y=setTimeout(R,Eo)}),Gt=t.addNodeGraphListener((ft,Wt,zt)=>{if(v=!0,zt)S=!0;else{let Fe=t.getNodeGraph();for(let je in ft??{})f[je]=Fe[je]??ft[je]}(Wt??[]).forEach(Fe=>g.add(Fe)),clearTimeout(y),y=setTimeout(R,Eo)})})}function d(p){if(!p?.length)return[];try{return t.getIds(p)??[]}catch{return p}}function l(p,c=[]){if(!p)return{delta:!0,settled:!1,changedJsx:"",removedIds:[]};let f=Hs(p,c);if(f===null)return null;let g=f.length?t.projectPuppetJsx(f):"";if(f.length>Fa){let y=t.projectPuppetJsx("app",{maxDepth:8});if(qs(g,y))return null}return{delta:!0,settled:!0,changedJsx:g,removedIds:d(p.removed)}}return{"context:capture":{timeoutMs:15e3,handler:async({awaitRender:p,delta:c,focusIds:f=[]}={})=>{try{let g=p?await i():null;if(c){let y=l(g,f);if(y)return y}return Gs(e,t,n)}catch(g){throw o.error("ai context capture failed",{error:g.message}),g}}},"operations:execute":{timeoutMs:6e4,handler:async({batch:p}={})=>{try{let c=p?.operations??[];if(c.length&&c.every(f=>r.isReadOnly(f.type)))return await r.executeBatch(p);e.history.group();try{return await r.executeBatch(p??{operations:[]})}finally{e.history.commit(p?.description||p?.message||"AI changes")}}catch(c){throw o.error("ai operations execute failed",{error:c.message}),c}}}}});var Xs=$("ai:sessions",s=>{let[e,t]=s("cache","channel");return{set:{handler:n=>{e.set(["ai","sessions"],n),t.to("editor").broadcast("ai:sessions:set",n)}}}});var Ys=$("screenshot",s=>{let[e,t,n]=s("state","cache","channel");return{capture:{timeoutMs:12e4,handler:async({frameIds:o=null,limit:r=null,fullPage:i=!0,maxWidth:d=null,maxHeight:l=null}={})=>{let p=e.get(["nodes"]),c=p?.app?.children??[],f=o?.length?new Set(o):null,g=c.filter(I=>p[I]?.type==="frame").filter(I=>!f||f.has(I)).map(I=>({id:I,name:p[I].name||I,bounds:p[I].bounds})),y=f?[...f].filter(I=>!g.some(R=>R.id===I)):[],v=g.length;r&&g.length>r&&(g=g.slice(0,r));let S=t.get(["config"]),M=[];for(let I of g){let R={config:{basePath:S.basePath??`http://localhost:${S.port}`,view:"screen-capture",type:S.type||"local",nodeId:I.id},width:I.bounds?.width??1440,height:I.bounds?.height??900,result:"base64",fullPage:i};d!=null&&(R.maxWidth=d),l!=null&&(R.maxHeight=l);let X=await n.to("electronMain").request("screenCapture:capture",R);M.push({id:I.id,name:I.name,imageData:`data:image/jpeg;base64,${X.base64}`,scale:X.scale??1,naturalSize:X.naturalSize??null,outputSize:X.outputSize??null,scaled:X.scaled??!1})}return{frames:M,dropped:Math.max(0,v-M.length),...y.length?{missing:y}:{}}}}}});var Ks=$("session",s=>{let[e,t,n]=s("cache","windowBridge","socket"),o=e.get(["config"]),r=o?.type==="tunnel",i=!1;function d(l){i||(i=!0,t.to("parent").publish("jucie:session:ended",{id:o.id,name:l??o.name??"Remote"}),n.disconnect())}return r&&n.onDisconnect(()=>d()),{end:{handler:({name:l}={})=>{r&&d(l)}}}});var Js=Po("sync",s=>{let[e,t,n,o]=s("channel","sceneCompiler","state","cache"),r=()=>{e.to("renderWorker").broadcast("sync:set",{graph:t.getNodeGraph()??{},digest:t.getNodeGraphDigest(),viewport:t.getViewport(),selectedRids:t.getSelectedRids(),focalRid:t.getFocalRid()})},i=()=>{e.to("editor").broadcast("sync:set",{graph:t.getNodeGraph()??{},stores:n.get([".stores"])??{},tokens:n.get(["tokens"])??{},animations:n.get(["animations"])??{},comments:n.get(["comments"])??{},assets:o.get(["assets"])??{},stylesheetClassNames:o.get(["stylesheetClassNames"])??[],components:t.getMeta(),aiSessions:o.get(["ai","sessions"])??[]})};return{pushRenderWorker:r,pushEditor:i,push:()=>{r(),i()}}});function ja(s){let e=s.reduce((n,{ids:o})=>n+o.length,0),t=s.map(({summary:n})=>n).join(", ");return`Updated ${e} ${e===1?"node":"nodes"} to the current format: ${t}.`}var oh=async(s,e)=>{try{let t=s.basePath&&!s.basePath.endsWith("/")?`${s.basePath}/`:s.basePath,n={...Ir,...s,basePath:t},o=n.type==="tunnel"&&n.basePath,r=xt(n.$el||"app"),i=xt("temp"),d=xt("components"),l=cs(),p=[];if(o){let{WorkerManager:S}=await import("./main-3EOYBBCF.js");p.push(S)}let c=Do.create().install(...p,ur,pr.configure({plugins:[mr,gr.configure({actorId:crypto.randomUUID()}),ts,fr,ss]}),ir.configure(n),Ce,dr,cr.configure(yr(n,{auth:e??null})),Ke,lr.configure({visibility:!0,focus:!1,freeze:!0,sleepDetection:{enabled:!0,threshold:1e4}}),Re,Nr.configure({basePath:n.basePath}));if(c.cache.load({config:n,token:e,$app:r,$temp:i,$components:d,viewport:l}),c.aiOps.use(...vs),o){let S=new URL(n.basePath).pathname;await c.worker.register({name:"tunnel-sw",type:"service",url:`${S}tunnel-sw.js`,options:{scope:S}}),c.worker.to("tunnel-sw").emit("tunnel-config",S),navigator.serviceWorker.controller||await new Promise(M=>{navigator.serviceWorker.addEventListener("controllerchange",M,{once:!0})})}let[f,g]=await Promise.all([fetch(new URL("scene/snapshot",n.basePath)).then(S=>S.json()),fetch(new URL("ai/chats",n.basePath)).then(S=>S.ok?S.json():null).catch(()=>null)]);c.use(Js),c.state.ledger.hydrate(f),c.state.history.start(),c.sceneCompiler.loadPrototypes(xr),await c.moduleLoader.load(),await c.sceneCompiler.create("app","app"),await c.sceneCompiler.create("temp","temp",{mode:"temp"}),await c.sceneCompiler.create("components","components",{mode:"components"}),g?.sessions&&c.cache.set(["ai","sessions"],g.sessions),c.socket.use(Ls,Bs,Fs,kr,js,vr,Vs,Xs,Ys,Ks);let y=await eo(c.socket,"toolset:request");c.cache.set(["toolset"],y);for(let S of y?.stores??[]){let M=Object.fromEntries(Object.keys(S.fields).map(I=>[I,{default:null}]));c.sceneCompiler.swapCompiledModule(S.store,"store",{state:M,schema:S})}c.windowBridge.register("parent",window.parent,"*"),c.windowBridge.subscribe("jucie:channel:close",()=>{try{c.channel.disconnect()}catch(S){console.warn("[stage] channel disconnect failed",S)}return!0}),c.channel.portProvider(async()=>await c.windowBridge.to("parent").request("jucie:port:request",n.id));let v=await c.channel.connect();if(v){let{nodeGraphContracts:S}=await import("./nodeGraph-MIYBM2ME.js"),{syncContracts:M}=await import("./sync-M5DHAJKK.js"),{historyContracts:I}=await import("./history-AJWJFNTH.js"),{userContracts:R}=await import("./user-RPWZUUCN.js"),{assetsContracts:X}=await import("./assets-4NXDKJMC.js"),{filesContracts:Gt}=await import("./files-2IVIODQO.js"),{aiContracts:ft}=await import("./aiRelay-6QWC3MID.js"),{aiSessionContracts:Wt}=await import("./aiSessionContracts-ISZHL5U5.js"),{aiMessagesContracts:zt}=await import("./aiMessagesContracts-RZ3KTCRZ.js"),{aiAttachmentContracts:Fe}=await import("./aiAttachmentContracts-S6BKHEJ6.js"),{contentEditorContracts:je}=await import("./contentEditor-KSOW7DQ4.js"),{viewportContracts:Zs}=await import("./viewport-EE2UKHNS.js"),{contracts:Qs}=await import("./main-QJ4F72CN.js"),{contracts:ea}=await import("./main-4GJ7OQPP.js"),{contracts:ta}=await import("./main-COYGSKNQ.js"),{contracts:na}=await import("./main-Y73Z2R2Q.js"),{contracts:oa}=await import("./main-DEGR6IFX.js");v.use(Zs,S,M,I,R,X,Gt,ft,Wt,zt,Fe,je,...Qs,...ea,...ta,...na,...oa);let ra=y?[...Io.filter(k=>y.elements.includes(k.type)),...y.presets]:Io;c.channel.to("editor").broadcast("elements:set",ra),c.channel.to("editor").broadcast("frames:set",y?y.frames??[]:Rn),c.channel.to("editor").broadcast("toolset:set",{hidden:y?.hidden??[],designations:y?.designations??{}}),c.channel.to("editor").broadcast("graphics:set",No),c.channel.to("editor").broadcast("globalAnimations:set",Ms),c.channel.to("editor").broadcast("components:set",c.sceneCompiler.getMeta()),c.channel.to("editor").broadcast("assets:set",c.cache.get(["assets"])??{});let Co=await c.socket.request("files:requestSnapshot").catch(()=>({}));c.cache.set(["files"],Co??{}),c.channel.to("editor").broadcast("files:set",Co??{}),c.channel.to("editor").broadcast("ai:sessions:set",c.cache.get(["ai","sessions"])??[]);let Ao=await eo(c.socket,"stylesheets:requestClassNames",{fallback:[]});c.cache.set(["stylesheetClassNames"],Ao??[]),c.channel.to("editor").broadcast("stylesheetClassNames:set",Ao??[]);let Oo=c.sceneCompiler.convertNodes();return Oo.length&&c.channel.to("editor").broadcast("toasts:show",{message:ja(Oo),tone:"info"}),c.sceneCompiler.onComponentsChange(k=>{c.channel.to("editor").broadcast("components:set",k)}),ze(()=>c.state.get(["tokens"]),k=>{c.channel.to("editor").broadcast("tokens:set",k??{}),c.channel.to("panel-tokens").broadcast("token:set",k??{})}),ze(()=>c.state.get([".stores"]),k=>{c.channel.to("editor").broadcast("stores:set",k??{})}),ze(()=>c.state.get(["animations"])??{},k=>{c.channel.to("editor").broadcast("animations:set",k??{})}),ze(()=>c.state.get(["comments"])??{},k=>{c.channel.to("editor").broadcast("comments:set",k??{})}),c.sceneCompiler.addNodeGraphListener((k,Y,Ge,re)=>{if(Ge)v.to("renderWorker","editor").broadcast("nodeGraph:set",k,re);else{v.to("renderWorker").broadcast("nodeGraph:update",k,Y,re);let We=null;for(let gt in k){let _o=k[gt],To=!1;for(let $o in _o)if($o!=="rect"&&$o!=="offset"){To=!0;break}To&&((We??(We={}))[gt]=_o)}(We||Y.length>0)&&v.to("editor").broadcast("nodeGraph:update",We??{},Y,re)}}),c.sceneCompiler.startNodeGraph(),c.pageLifecycle.on("hidden",()=>{c.sceneCompiler.pauseNodeGraph()}),c.pageLifecycle.on("visible",()=>{c.sceneCompiler.resumeNodeGraph(),c.sceneCompiler.forceNodeGraph()}),c.pageLifecycle.on("resume",()=>{c.socket.ready()||c.socket.connect(),c.sceneCompiler.resumeNodeGraph(),c.sceneCompiler.forceNodeGraph()}),c.pageLifecycle.on("beforeclose",()=>{c.channel.disconnect()}),v.subscribe("selection:rids:set",k=>{c.sceneCompiler.setSelectedRids(k)}),v.subscribe("selection:focalRid:set",k=>{c.sceneCompiler.setFocalRid(k||null)}),v.subscribe("animation:preview:play",(k,Y)=>{for(let Ge of Y){let re=c.sceneCompiler.animate(Ge,k,{fill:"none"}),We=Array.isArray(re)?re:re?[re]:[];for(let gt of We)gt.addEventListener("finish",()=>{v.to("editor").broadcast("animation:preview:finished",k)},{once:!0})}}),v.subscribe("animation:preview:stop",(k,Y)=>{for(let Ge of Y)c.sceneCompiler.cancelAnimation(Ge,k)}),v.subscribe("animation:preview:seek",(k,Y)=>{c.sceneCompiler.seekAnimation(k,Y)}),c.sync.push(),c.channel.to("editor").broadcast("hub:ready",n.id),n}else throw new Error("Stage channel failed to connect")}catch(t){return{error:t.message}}};export{oh as createDesignBootstrap};
@@ -0,0 +1 @@
1
+ import{a as n}from"./chunk-YQ22OWEN.js";import"./chunk-FEFZSXXM.js";import"./chunk-5HNN2HVX.js";import"./chunk-P722OZCF.js";var i=n("files",o=>{let[a,s]=o("socket","log");return{read:{namespace:"stage",schema:["String"],handler:async e=>{try{return await a.request("files:read",e)}catch(r){return s.error("read failed",{path:e,error:r.message}),{ok:!1,path:e,error:r.message}}}},info:{namespace:"stage",schema:[],handler:async()=>{try{return await a.request("files:info")}catch(e){return s.error("info failed",{error:e.message}),{ok:!1,error:e.message}}}},write:{namespace:"stage",schema:["String","String"],handler:async(e,r)=>{try{return await a.request("files:write",e,r)}catch(t){return s.error("write failed",{path:e,error:t.message}),{ok:!1,path:e,error:t.message}}}},create:{namespace:"stage",schema:["String"],handler:async e=>{try{return await a.request("files:create",e)}catch(r){return s.error("create failed",{path:e,error:r.message}),{ok:!1,path:e,error:r.message}}}},rename:{namespace:"stage",schema:["String","String"],handler:async(e,r)=>{try{return await a.request("files:rename",e,r)}catch(t){return s.error("rename failed",{from:e,to:r,error:t.message}),{ok:!1,from:e,to:r,error:t.message}}}}}});export{i as filesContracts};
@@ -0,0 +1 @@
1
+ import{a as e}from"./chunk-YQ22OWEN.js";import"./chunk-FEFZSXXM.js";import"./chunk-5HNN2HVX.js";import"./chunk-P722OZCF.js";var o=e("history",t=>({group:{schema:null,namespace:"stage",handler:()=>{t("state")?.history?.group()}},commit:{schema:null,namespace:"stage",handler:()=>{t("state")?.history?.commit()}},undo:{schema:null,namespace:"stage",handler:()=>{t("state")?.history?.undo()}},redo:{schema:null,namespace:"stage",handler:()=>{t("state")?.history?.redo()}}}));export{o as historyContracts};
@@ -0,0 +1 @@
1
+ import{a,b,c}from"./chunk-KUZTBTFR.js";import"./chunk-5HNN2HVX.js";import"./chunk-P722OZCF.js";export{c as EVENTS,b as WorkerClient,a as WorkerManager};
@@ -0,0 +1 @@
1
+ import{a as S,b as o,c as g,d,e as h}from"./chunk-TKHZCD63.js";import"./chunk-3Q3DRUNQ.js";import{a as p}from"./chunk-YQ22OWEN.js";import"./chunk-FEFZSXXM.js";import"./chunk-5HNN2HVX.js";import"./chunk-P722OZCF.js";var u=p("node:animation",f=>{let c=f("state"),t=c?.ref(["animations"])??null,r=c?.ref(["nodes"])??null;if(!t)throw new Error("Animations state not found");return{create:{namespace:"scene-graph",schema:["String","Object"],handler:(e,n={})=>{t.set([e],o(n))}},update:{namespace:"scene-graph",schema:["String","Object"],handler:(e,n)=>{if(t.get([e]))for(let[i,m]of Object.entries(n))t.set([e,i],m)}},delete:{namespace:"scene-graph",schema:["String"],handler:e=>{t.remove([e])}},bind:{namespace:"scene-graph",schema:["String","Object"],handler:(e,n)=>{r&&g(r,e,n)}},unbind:{namespace:"scene-graph",schema:["String","String"],handler:(e,n)=>{r&&d(r,e,n)}},updateBinding:{namespace:"scene-graph",schema:["String","String","Object"],handler:(e,n,a)=>{r&&h(r,e,n,a)}},promote:{namespace:"scene-graph",schema:["String"],handler:e=>{t.get([e])&&t.set([e,"scope"],"project")}},customize:{namespace:"scene-graph",schema:["String","String","String"],handler:(e,n,a)=>{if(!r)return;let i=t.get([n]);if(!i)return;t.set([a],o({...i,scope:"node"}));let l=(r.get([e,"animations"])??[]).map(s=>s.id===n?{...s,id:a}:s);r.set([e,"animations"],l)}}}});var C=[u];export{u as animationContracts,S as animationDefaults,C as contracts,o as createAnimation};
@@ -0,0 +1 @@
1
+ import{a as s,b as m,c as p,d as a}from"./chunk-4WXMFOGZ.js";import"./chunk-DLROTED3.js";import{a as c}from"./chunk-YQ22OWEN.js";import"./chunk-FEFZSXXM.js";import"./chunk-5HNN2HVX.js";import"./chunk-P722OZCF.js";var f=c("token",e=>{let[r,t]=e("channel","state"),o=t?.ref(["tokens"])??null;if(!o)throw new Error("Tokens state not found");return{get:{namespace:"scene-graph",handler:n=>n?o.get([n]):o.get()??{}},create:{namespace:"scene-graph",schema:["Object"],handler:(n={})=>p(o,n)},update:{namespace:"scene-graph",schema:["String","Object"],handler:(n,u)=>{s(o,n,u)}},delete:{namespace:"scene-graph",schema:["String"],handler:n=>{a(o,n)}}}});function i(e,r,t){return e.set([r,"$value"],t)}function d(e,r,t){return e.set([r,"$type"],t)}function h(e,r,t){return e.set([r,"$path"],t)}function l(e,r,t){return t==null?e.set([r,"$description"],void 0):e.set([r,"$description"],t)}function x(e,r,t){return t==null?e.set([r,"$deprecated"],void 0):e.set([r,"$deprecated"],t)}var O=[f];export{p as addToken,O as contracts,a as removeToken,x as setDeprecated,l as setDescription,h as setPath,d as setType,i as setValue,f as tokenContracts,m as tokenDefaults,s as updateToken};
@@ -0,0 +1 @@
1
+ import{e as p}from"./chunk-DLROTED3.js";import{a as u}from"./chunk-YQ22OWEN.js";import"./chunk-FEFZSXXM.js";import"./chunk-5HNN2HVX.js";import"./chunk-P722OZCF.js";function i({nodeId:r,author:e,body:t}){let o=Date.now();return{id:p(),nodeId:r,author:e,body:t,createdAt:o,updatedAt:o,archived:!1,replies:{}}}function s({author:r,body:e}){let t=Date.now();return{id:p(),author:r,body:e,createdAt:t,updatedAt:t}}function c(r,e){return r.set([e.id],e)}function f(r,e,{body:t,archived:o}){return r.get([e])?(r.batch(n=>{t!==void 0&&n.set([e,"body"],t),o!==void 0&&n.set([e,"archived"],o),n.set([e,"updatedAt"],Date.now())}),r.get([e])):null}function d(r,e){return r.get([e])?r.remove([e]):null}function l(r,e,t){return r.get([e])?r.set([e,"replies",t.id],t):null}function C(r,e,t,{body:o}){return r.get([e,"replies",t])?(r.batch(n=>{o!==void 0&&n.set([e,"replies",t,"body"],o),n.set([e,"replies",t,"updatedAt"],Date.now())}),r.get([e,"replies",t])):null}function g(r,e,t){return r.get([e,"replies",t])?r.remove([e,"replies",t]):null}var h=u("comment",r=>{let e=r("state"),t=e?.ref(["comments"])??null;if(!t)throw new Error("Comments state not found");let o=n=>e.history?e.history.untracked(n):n();return{add:{namespace:"scene-graph",schema:["String","Object"],handler:(n,{author:a,body:m})=>o(()=>c(t,i({nodeId:n,author:a,body:m})))},update:{namespace:"scene-graph",schema:["String","Object"],handler:(n,a)=>o(()=>f(t,n,a))},remove:{namespace:"scene-graph",schema:["String"],handler:n=>o(()=>d(t,n))},addReply:{namespace:"scene-graph",schema:["String","Object"],handler:(n,{author:a,body:m})=>o(()=>l(t,n,s({author:a,body:m})))},updateReply:{namespace:"scene-graph",schema:["String","String","Object"],handler:(n,a,m)=>o(()=>C(t,n,a,m))},removeReply:{namespace:"scene-graph",schema:["String","String"],handler:(n,a)=>o(()=>g(t,n,a))}}});var L=[h];export{h as commentContracts,L as contracts,i as createComment,s as createCommentReply};
@@ -0,0 +1 @@
1
+ import{$ as o,Aa as P,Ba as Q,Ca as R,Da as S,Ea as T,Fa as U,Ga as V,Ha as W,Ia as X,J as c,Ja as Y,Ka as Z,L as d,M as e,N as f,T as g,U as h,V as i,W as j,X as k,Y as l,Z as m,_ as n,aa as p,ba as q,ca as r,da as s,ea as t,fa as u,ga as v,ha as w,ia as x,ja as y,ka as z,la as A,ma as B,na as C,oa as D,pa as E,qa as F,ra as G,sa as H,ta as I,ua as J,va as K,wa as L,xa as M,ya as N,za as O}from"./chunk-RDRAQE76.js";import{G as a,I as b}from"./chunk-426Z5MME.js";import"./chunk-DLROTED3.js";import"./chunk-GCPKA3IC.js";import"./chunk-UNPHH2YK.js";import"./chunk-YQ22OWEN.js";import"./chunk-FEFZSXXM.js";import"./chunk-5HNN2HVX.js";import"./chunk-P722OZCF.js";export{r as PROP_TYPES,l as addContracts,C as appLifecycleContracts,E as appRenderModeContracts,D as appSeoContracts,n as attributeContracts,I as behaviorContracts,g as breakpointContracts,v as buildSlotsFromMeta,h as classNameContracts,i as clipboardContracts,c as cloneNodes,j as contextNameContracts,Z as contracts,t as createDeclaredProp,p as createEmit,b as createOptions,a as createProp,u as declaredPropContracts,s as defaultForType,Y as designationContracts,z as destinationContracts,A as dragContracts,q as emitContracts,m as eventsContracts,d as frames,f as getAvailableFrames,e as getFramePreset,F as globalEventsContracts,y as htmlContracts,X as htmlIdContracts,G as interactionStateContracts,J as layoutContracts,B as lifecycleContracts,w as mergeMissingSlotsFromMeta,K as moveContracts,L as nameContracts,M as optionsContracts,N as orderContracts,H as patchContracts,o as propContracts,O as removeContracts,P as renderContracts,Q as repeatContracts,R as routeContracts,x as slotContracts,k as statesContracts,S as styleContracts,T as tagNameContracts,U as textContentContracts,V as typeContracts,W as viewportContracts};
@@ -0,0 +1 @@
1
+ import{o as a,p as b,q as c,r as d,s as e}from"./chunk-DUPQKWW3.js";import"./chunk-YQ22OWEN.js";import"./chunk-FEFZSXXM.js";import"./chunk-5HNN2HVX.js";import"./chunk-P722OZCF.js";export{a as actionsContract,b as computedContract,e as contracts,c as stateContract,d as storeContract};
@@ -0,0 +1 @@
1
+ import{a as t}from"./chunk-YQ22OWEN.js";import"./chunk-FEFZSXXM.js";import"./chunk-5HNN2HVX.js";import"./chunk-P722OZCF.js";var l=t("nodeGraph",n=>{let s=n("log");return{pauseMeasuring:{schema:null,namespace:"stage",handler:()=>{let e=n("sceneCompiler");return e?(e.pauseNodeGraphMeasuring(),!0):(s.warn("scene compiler not found"),!1)}},resumeMeasuring:{schema:null,namespace:"stage",handler:()=>{let e=n("sceneCompiler");return e?(e.resumeNodeGraphMeasuring(),!0):(s.warn("scene compiler not found"),!1)}},request:{schema:null,namespace:"stage",handler:(e,r)=>{let a=n("sceneCompiler");return a?(a.requestNodeGraphRids(e??[],r),!0):(s.warn("scene compiler not found"),!1)}},manifest:{schema:null,namespace:"stage",handler:()=>{let e=n("sceneCompiler");return e?e.getNodeGraphManifest():(s.warn("scene compiler not found"),{rids:[],digest:null})}},contentHeights:{schema:null,namespace:"stage",handler:e=>{let r=n("sceneCompiler");return r?r.measureContentHeights(e??{}):(s.warn("scene compiler not found"),{})}},stats:{schema:null,namespace:"stage",handler:(e={})=>{let r=n("sceneCompiler");if(!r)return null;typeof e.profiling=="boolean"&&r.setNodeGraphProfiling(e.profiling);let a=r.getNodeGraphStats();return e.reset&&r.resetNodeGraphStats(),a}}}});export{l as nodeGraphContracts};
@@ -0,0 +1 @@
1
+ import{a as t,b as n}from"./chunk-5H3EE23B.js";import"./chunk-FWEUCYZO.js";import"./chunk-CNULBMOT.js";import"./chunk-6J3NV2ZA.js";import"./chunk-3Q3DRUNQ.js";import"./chunk-426Z5MME.js";import"./chunk-DLROTED3.js";import"./chunk-UNPHH2YK.js";import"./chunk-YQ22OWEN.js";import"./chunk-FEFZSXXM.js";import"./chunk-5HNN2HVX.js";import"./chunk-RQACOEIA.js";import"./chunk-BXWISJ2Z.js";import"./chunk-FGKRC2QO.js";import"./chunk-WN5EDULP.js";import"./chunk-ZDH2DALT.js";import"./chunk-S7MEYFKB.js";import"./chunk-P722OZCF.js";var p=async(i,o)=>{let{engine:r,config:e}=await t(i,o);return await r.sceneCompiler.create("app",e.nodeId),await n(r,e),e};export{p as createDesignPreviewBootstrap};
@@ -0,0 +1 @@
1
+ import{a as e}from"./chunk-YQ22OWEN.js";import"./chunk-FEFZSXXM.js";import"./chunk-5HNN2HVX.js";import"./chunk-P722OZCF.js";var t=e("sync",r=>({request:{schema:null,namespace:"stage",handler:()=>(r("sync").pushRenderWorker(),!0)}}));export{t as syncContracts};
@@ -0,0 +1 @@
1
+ import{a as c}from"./chunk-YQ22OWEN.js";import"./chunk-FEFZSXXM.js";import"./chunk-5HNN2HVX.js";import"./chunk-P722OZCF.js";var i=c("user",o=>{let[t,s]=o("socket","cache");if(!t||!s)throw new Error("Socket or cache not found");return{pointer:{namespace:"stage",schema:["Object"],handler:n=>{n&&t.publish("presence:pointer",n)}},selection:{namespace:"stage",schema:["Array","Array"],handler:(n,e)=>{let r=s.get(["selectedIds"])??[];if(s.set(["selectedRids"],n),s.set(["selectedIds"],e),r.length===0&&e.length===0)return;if(r.length!==e.length){t.publish("presence:selection",e);return}r.some((a,h)=>a!==e[h])&&t.publish("presence:selection",e)}}}});export{i as userContracts};
@@ -0,0 +1 @@
1
+ import{a as o}from"./chunk-YQ22OWEN.js";import"./chunk-FEFZSXXM.js";import"./chunk-5HNN2HVX.js";import"./chunk-P722OZCF.js";var n=o("viewport",s=>{let r=s("sceneCompiler");return{set:{schema:["Object"],handler:e=>(r.setViewport(e),!0)},colors:{schema:["Object"],handler:({background:e,gridDot:t})=>(e&&r.setBackground(e),t&&r.setGrid({color:t}),!0)}}});export{n as viewportContracts};
@@ -0,0 +1 @@
1
+ import"./chunk-P722OZCF.js";var t=!0;export{t as __jucieMainStub};
@@ -0,0 +1 @@
1
+ import{a as n}from"./chunk-YQ22OWEN.js";import"./chunk-FEFZSXXM.js";import"./chunk-5HNN2HVX.js";import"./chunk-P722OZCF.js";var s=n("window",e=>({back:{schema:null,namespace:"stage",handler:()=>{e("sceneCompiler").back()}},forward:{schema:null,namespace:"stage",handler:()=>{e("sceneCompiler").forward()}}}));export{s as windowContracts};
@@ -0,0 +1 @@
1
+ import{a as w,b as d}from"./chunk-5H3EE23B.js";import"./chunk-FWEUCYZO.js";import"./chunk-CNULBMOT.js";import"./chunk-6J3NV2ZA.js";import"./chunk-3Q3DRUNQ.js";import"./chunk-426Z5MME.js";import"./chunk-DLROTED3.js";import"./chunk-UNPHH2YK.js";import"./chunk-YQ22OWEN.js";import"./chunk-FEFZSXXM.js";import"./chunk-5HNN2HVX.js";import"./chunk-RQACOEIA.js";import"./chunk-BXWISJ2Z.js";import"./chunk-FGKRC2QO.js";import"./chunk-WN5EDULP.js";import"./chunk-ZDH2DALT.js";import"./chunk-S7MEYFKB.js";import"./chunk-P722OZCF.js";var E=async(t,m)=>{let{engine:r,config:i,$app:b,onApply:g}=await w({...t,view:"preview"},m),s=(n,e)=>r.windowBridge.to("parent").publish(n,{id:i.id,...e});Object.assign(b.style,{position:"absolute",top:"0",left:"0",width:"100vw",height:"100vh",overflow:"auto",display:"flex",alignItems:"center",justifyContent:"center"});let o=null,c=!1,a,l=!1,p=(n=!1)=>{let e=o?h(r.sceneCompiler.describeComponent(o)):null,u=JSON.stringify(e);!n&&u===a||(a=u,s("workbench:state",{component:o,contract:e,boot:!l}),l=!0)},y=(n,e)=>s("workbench:emit",{name:n,args:e.map(C),at:Date.now()}),f=async(n,e={})=>{o=n??null,o&&!c?(c=!0,await r.sceneCompiler.isolate("app",o,e,{onEmit:y})):o&&r.sceneCompiler.setIsolated(o,e),p(!0)};return r.windowBridge.subscribe("workbench:show",(n,e)=>(f(n,e),!0)),g(()=>p()),await f(i.component??null,i.values??{}),await d(r,i),i};function h(t){return t==null?null:JSON.parse(JSON.stringify(t))}function C(t){if(t==null||typeof t!="object")return typeof t=="function"?`\u0192 ${t.name||"anonymous"}`:t;if(typeof Event<"u"&&t instanceof Event)return{event:t.type,target:t.target?.tagName?.toLowerCase()??null};try{return structuredClone(t)}catch{return String(t)}}export{E as createWorkbenchBootstrap};
@@ -1 +1 @@
1
- import{b as k,c as A,d as I}from"./chunks/chunk-O24ISLGT.js";import{e as T,f as i,g as c,h as d,i as u}from"./chunks/chunk-UCLSDDOL.js";function O(s){return s instanceof ArrayBuffer||s instanceof MessagePort||typeof ImageBitmap<"u"&&s instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&s instanceof OffscreenCanvas||typeof ReadableStream<"u"&&s instanceof ReadableStream||typeof WritableStream<"u"&&s instanceof WritableStream||typeof TransformStream<"u"&&s instanceof TransformStream}function D(s){return O(s)?[s]:Array.isArray(s)?s.filter(O):[]}var S="__wc",y,b,B,z,U=(z=class{constructor(s,t,e="*"){c(this,y);c(this,b);c(this,B);if(!t||typeof t.postMessage!="function")throw new Error(`Window "${s}" target must have postMessage`);d(this,y,s),d(this,b,t),d(this,B,e)}get name(){return i(this,y)}post(s,t,e,r){let o={[S]:!0,type:s,topic:t,payload:e};r&&(o.rid=r);let n=D(e);i(this,b).postMessage(o,i(this,B),n.length?n:void 0)}},y=new WeakMap,b=new WeakMap,B=new WeakMap,z),h,f,p,g,m,W,M,a,x,C,R,P,q,L=(M=class extends A{constructor(){super(...arguments);c(this,a);c(this,h,new Map);c(this,f,new Map);c(this,p,new Map);c(this,g,null);c(this,m,null);c(this,W,1e3)}initialize(t,e){d(this,W,e.timeout??1e3);let r=e.host??globalThis.window;r?.addEventListener&&u(this,a,x).call(this,r)}actions(){let t={register:(e,r,o)=>{let n=new U(e,r,o);return i(this,h).set(e,n),t},unregister:e=>(i(this,h).delete(e),t),to:e=>{let r=i(this,h).get(e);if(!r)throw new Error(`WindowBridge: no target registered as "${e}"`);return{publish:(o,...n)=>{r.post("pub",o,n)},request:(o,...n)=>u(this,a,q).call(this,o,n,[r])}},publish:(e,...r)=>{for(let o of i(this,h).values())o.post("pub",e,r)},request:(e,...r)=>{let o=[...i(this,h).values()];return o.length===0?Promise.reject(new Error(`WindowBridge: no targets registered \u2014 request "${e}" dropped`)):u(this,a,q).call(this,e,r,o)},subscribe:(e,r)=>u(this,a,P).call(this,e,r,!1),subscribeOnce:(e,r)=>u(this,a,P).call(this,e,r,!0),destroy:()=>{u(this,a,C).call(this),i(this,h).clear(),i(this,f).clear();for(let e of i(this,p).values())clearTimeout(e.timer),e.reject(new Error("WindowBridge destroyed"));i(this,p).clear()}};return t}},h=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,W=new WeakMap,a=new WeakSet,x=function(t){u(this,a,C).call(this),d(this,g,t),d(this,m,e=>u(this,a,R).call(this,e)),i(this,g).addEventListener("message",i(this,m))},C=function(){i(this,g)&&i(this,m)&&i(this,g).removeEventListener("message",i(this,m)),d(this,g,null),d(this,m,null)},R=function(t){let e=t.data;if(!e||e[S]!==!0)return;let{type:r,topic:o,payload:n,rid:w}=e;if(r==="res"){let l=i(this,p).get(w);l&&(i(this,p).delete(w),clearTimeout(l.timer),l.resolve(n));return}let v=i(this,f).get(o);if(!(!v||v.size===0))for(let l of v){let _=l.handler(...Array.isArray(n)?n:[]);r==="req"&&w&&t.source&&Promise.resolve(_).then($=>{let j=D($),H={[S]:!0,type:"res",rid:w,payload:$};try{t.source.postMessage(H,t.origin||"*",j.length?j:void 0)}catch{}}),l.once&&v.delete(l)}},P=function(t,e,r){if(typeof e!="function")throw new Error("Handler must be a function");i(this,f).has(t)||i(this,f).set(t,new Set);let o={handler:e,once:r};return i(this,f).get(t).add(o),()=>i(this,f).get(t)?.delete(o)},q=function(t,e,r){return new Promise((o,n)=>{let w=I(),v=setTimeout(()=>{i(this,p).delete(w),n(new Error(`WindowBridge: request "${t}" timed out`))},i(this,W));i(this,p).set(w,{resolve:o,reject:n,timer:v});for(let l of r)l.post("req",t,e,w)})},T(M,"manifest",{name:"WindowBridge",dependencies:[],version:"1.0.0",namespace:"windowBridge",description:"Window postMessage abstraction with pub/sub and request/response",defaults:{timeout:1e3,host:null}}),M);var E=k.create().install(L);function F(s={}){let t=window.location.pathname.split("/").filter(Boolean),e=t[1],r=t[2]||null;return{projectId:e,nodeId:r,socketPath:`/p/${e}/socket`,basePath:`/p/${e}`,framework:"react",view:"design",...s}}async function G(){try{let s=await fetch("/config.json");if(s.ok)return await s.json()}catch{}return{}}E.windowBridge.subscribeOnce("bootstrap:initialize",async(s,t,e)=>{E.windowBridge.register("parent",window.parent,"*");try{let o=t?.env==="cloud"||window.location.pathname.startsWith("/p/")?F(t):{...await G(),...t};switch(o.view){case"design":{let{createDesignBootstrap:n}=await import("./chunks/design-QOLOMJCH.js");return await n(E,s,o,e)}case"preview":{let{createDesignPreviewBootstrap:n}=await import("./chunks/preview-AFX7D63A.js");return await n(E,s,o)}case"screen-capture":{let{createDesignScreenCaptureBootstrap:n}=await import("./chunks/capture-XBPXL4U7.js");return await n(E,o)}default:throw new Error(`[stage] Unknown view: ${o.view}`)}}catch(r){return{error:r.message}}});
1
+ window.addEventListener("message",async function o(n){let r=n.data;if(!r?.params)return;let{params:a,token:t}=r;try{switch(a.view){case"design":{let{createDesignBootstrap:e}=await import("./chunks/design-5WJ7WCTU.js");await e(a,t);break}case"preview":{let{createDesignPreviewBootstrap:e}=await import("./chunks/preview-MRYXCFFB.js");await e(a,t);break}case"component":{let{createWorkbenchBootstrap:e}=await import("./chunks/workbench-PI2NQ6WK.js");await e(a,t);break}case"screen-capture":{let{createDesignScreenCaptureBootstrap:e}=await import("./chunks/capture-MXL3B5OM.js");await e(a);break}default:throw new Error(`[stage] Unknown view: ${a.view}`)}}catch(e){console.error("[stage] bootstrap failed",e)}finally{window.removeEventListener("message",o)}});