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