@forgeax/view 0.2.1-beta-20260924075842
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/CHANGELOG.md +11 -0
- package/README.md +742 -0
- package/dist/modules/backend.mjs +54 -0
- package/dist/modules/backend.mjs.map +7 -0
- package/dist/modules/browser.mjs +180 -0
- package/dist/modules/browser.mjs.map +7 -0
- package/dist/modules/carrier-contract.mjs +38 -0
- package/dist/modules/carrier-contract.mjs.map +7 -0
- package/dist/modules/carrier.mjs +13 -0
- package/dist/modules/carrier.mjs.map +7 -0
- package/dist/modules/chunks/chunk-2ASWB6IX.mjs +225 -0
- package/dist/modules/chunks/chunk-2ASWB6IX.mjs.map +7 -0
- package/dist/modules/chunks/chunk-2IJKOG2F.mjs +801 -0
- package/dist/modules/chunks/chunk-2IJKOG2F.mjs.map +7 -0
- package/dist/modules/chunks/chunk-2K3BBJ5S.mjs +9 -0
- package/dist/modules/chunks/chunk-2K3BBJ5S.mjs.map +7 -0
- package/dist/modules/chunks/chunk-32GD5LL6.mjs +482 -0
- package/dist/modules/chunks/chunk-32GD5LL6.mjs.map +7 -0
- package/dist/modules/chunks/chunk-3B4KFAEC.mjs +10 -0
- package/dist/modules/chunks/chunk-3B4KFAEC.mjs.map +7 -0
- package/dist/modules/chunks/chunk-46O5WX43.mjs +25 -0
- package/dist/modules/chunks/chunk-46O5WX43.mjs.map +7 -0
- package/dist/modules/chunks/chunk-47J5JXAB.mjs +237 -0
- package/dist/modules/chunks/chunk-47J5JXAB.mjs.map +7 -0
- package/dist/modules/chunks/chunk-4BXQOUDQ.mjs +17 -0
- package/dist/modules/chunks/chunk-4BXQOUDQ.mjs.map +7 -0
- package/dist/modules/chunks/chunk-4GQWYU2V.mjs +126 -0
- package/dist/modules/chunks/chunk-4GQWYU2V.mjs.map +7 -0
- package/dist/modules/chunks/chunk-4N5X2PRQ.mjs +48 -0
- package/dist/modules/chunks/chunk-4N5X2PRQ.mjs.map +7 -0
- package/dist/modules/chunks/chunk-4WXD2KYX.mjs +56 -0
- package/dist/modules/chunks/chunk-4WXD2KYX.mjs.map +7 -0
- package/dist/modules/chunks/chunk-6ZWWVAZK.mjs +468 -0
- package/dist/modules/chunks/chunk-6ZWWVAZK.mjs.map +7 -0
- package/dist/modules/chunks/chunk-73UZNRHN.mjs +296 -0
- package/dist/modules/chunks/chunk-73UZNRHN.mjs.map +7 -0
- package/dist/modules/chunks/chunk-7ITLCRND.mjs +10 -0
- package/dist/modules/chunks/chunk-7ITLCRND.mjs.map +7 -0
- package/dist/modules/chunks/chunk-7TGVWKH7.mjs +59 -0
- package/dist/modules/chunks/chunk-7TGVWKH7.mjs.map +7 -0
- package/dist/modules/chunks/chunk-7URFF53W.mjs +42 -0
- package/dist/modules/chunks/chunk-7URFF53W.mjs.map +7 -0
- package/dist/modules/chunks/chunk-7YSDRIFN.mjs +14 -0
- package/dist/modules/chunks/chunk-7YSDRIFN.mjs.map +7 -0
- package/dist/modules/chunks/chunk-AAFVCQPK.mjs +52 -0
- package/dist/modules/chunks/chunk-AAFVCQPK.mjs.map +7 -0
- package/dist/modules/chunks/chunk-AEK7ZESQ.mjs +18 -0
- package/dist/modules/chunks/chunk-AEK7ZESQ.mjs.map +7 -0
- package/dist/modules/chunks/chunk-AL6ZWIEU.mjs +42 -0
- package/dist/modules/chunks/chunk-AL6ZWIEU.mjs.map +7 -0
- package/dist/modules/chunks/chunk-ALT7XVMQ.mjs +73 -0
- package/dist/modules/chunks/chunk-ALT7XVMQ.mjs.map +7 -0
- package/dist/modules/chunks/chunk-ASI2HBE6.mjs +116 -0
- package/dist/modules/chunks/chunk-ASI2HBE6.mjs.map +7 -0
- package/dist/modules/chunks/chunk-ATWGCH7I.mjs +174 -0
- package/dist/modules/chunks/chunk-ATWGCH7I.mjs.map +7 -0
- package/dist/modules/chunks/chunk-C45U6IIY.mjs +692 -0
- package/dist/modules/chunks/chunk-C45U6IIY.mjs.map +7 -0
- package/dist/modules/chunks/chunk-C7R3YRA7.mjs +98 -0
- package/dist/modules/chunks/chunk-C7R3YRA7.mjs.map +7 -0
- package/dist/modules/chunks/chunk-CRMICXKN.mjs +87 -0
- package/dist/modules/chunks/chunk-CRMICXKN.mjs.map +7 -0
- package/dist/modules/chunks/chunk-CUH2G6UF.mjs +81 -0
- package/dist/modules/chunks/chunk-CUH2G6UF.mjs.map +7 -0
- package/dist/modules/chunks/chunk-D7GWRZLL.mjs +77 -0
- package/dist/modules/chunks/chunk-D7GWRZLL.mjs.map +7 -0
- package/dist/modules/chunks/chunk-DBWUIBE3.mjs +10 -0
- package/dist/modules/chunks/chunk-DBWUIBE3.mjs.map +7 -0
- package/dist/modules/chunks/chunk-DQWVWWUU.mjs +77 -0
- package/dist/modules/chunks/chunk-DQWVWWUU.mjs.map +7 -0
- package/dist/modules/chunks/chunk-DZZ2WFEU.mjs +122 -0
- package/dist/modules/chunks/chunk-DZZ2WFEU.mjs.map +7 -0
- package/dist/modules/chunks/chunk-E4UIAN26.mjs +58 -0
- package/dist/modules/chunks/chunk-E4UIAN26.mjs.map +7 -0
- package/dist/modules/chunks/chunk-EJGBVKFE.mjs +77 -0
- package/dist/modules/chunks/chunk-EJGBVKFE.mjs.map +7 -0
- package/dist/modules/chunks/chunk-EPSTTHWV.mjs +173 -0
- package/dist/modules/chunks/chunk-EPSTTHWV.mjs.map +7 -0
- package/dist/modules/chunks/chunk-ER7T6QJ3.mjs +64 -0
- package/dist/modules/chunks/chunk-ER7T6QJ3.mjs.map +7 -0
- package/dist/modules/chunks/chunk-FD4BAJ6K.mjs +389 -0
- package/dist/modules/chunks/chunk-FD4BAJ6K.mjs.map +7 -0
- package/dist/modules/chunks/chunk-FJM6WWIY.mjs +80 -0
- package/dist/modules/chunks/chunk-FJM6WWIY.mjs.map +7 -0
- package/dist/modules/chunks/chunk-FKCQYDLX.mjs +162 -0
- package/dist/modules/chunks/chunk-FKCQYDLX.mjs.map +7 -0
- package/dist/modules/chunks/chunk-FLGC65SR.mjs +10 -0
- package/dist/modules/chunks/chunk-FLGC65SR.mjs.map +7 -0
- package/dist/modules/chunks/chunk-FMCACPX5.mjs +289 -0
- package/dist/modules/chunks/chunk-FMCACPX5.mjs.map +7 -0
- package/dist/modules/chunks/chunk-FOBRLUQV.mjs +51 -0
- package/dist/modules/chunks/chunk-FOBRLUQV.mjs.map +7 -0
- package/dist/modules/chunks/chunk-FV3DSKZB.mjs +33 -0
- package/dist/modules/chunks/chunk-FV3DSKZB.mjs.map +7 -0
- package/dist/modules/chunks/chunk-G7BAFAGO.mjs +98 -0
- package/dist/modules/chunks/chunk-G7BAFAGO.mjs.map +7 -0
- package/dist/modules/chunks/chunk-GQBZMCTK.mjs +145 -0
- package/dist/modules/chunks/chunk-GQBZMCTK.mjs.map +7 -0
- package/dist/modules/chunks/chunk-GYWIY7AL.mjs +131 -0
- package/dist/modules/chunks/chunk-GYWIY7AL.mjs.map +7 -0
- package/dist/modules/chunks/chunk-H3KNBALD.mjs +256 -0
- package/dist/modules/chunks/chunk-H3KNBALD.mjs.map +7 -0
- package/dist/modules/chunks/chunk-H3M22JDL.mjs +144 -0
- package/dist/modules/chunks/chunk-H3M22JDL.mjs.map +7 -0
- package/dist/modules/chunks/chunk-HES3DNTM.mjs +40 -0
- package/dist/modules/chunks/chunk-HES3DNTM.mjs.map +7 -0
- package/dist/modules/chunks/chunk-I5BFP7SS.mjs +2392 -0
- package/dist/modules/chunks/chunk-I5BFP7SS.mjs.map +7 -0
- package/dist/modules/chunks/chunk-IGRMZYRD.mjs +15 -0
- package/dist/modules/chunks/chunk-IGRMZYRD.mjs.map +7 -0
- package/dist/modules/chunks/chunk-IKNGC766.mjs +321 -0
- package/dist/modules/chunks/chunk-IKNGC766.mjs.map +7 -0
- package/dist/modules/chunks/chunk-IVHNYKZB.mjs +35 -0
- package/dist/modules/chunks/chunk-IVHNYKZB.mjs.map +7 -0
- package/dist/modules/chunks/chunk-JHOURMYW.mjs +101 -0
- package/dist/modules/chunks/chunk-JHOURMYW.mjs.map +7 -0
- package/dist/modules/chunks/chunk-JURXMRFA.mjs +282 -0
- package/dist/modules/chunks/chunk-JURXMRFA.mjs.map +7 -0
- package/dist/modules/chunks/chunk-JWZIREC3.mjs +18 -0
- package/dist/modules/chunks/chunk-JWZIREC3.mjs.map +7 -0
- package/dist/modules/chunks/chunk-KHRTIZ56.mjs +1400 -0
- package/dist/modules/chunks/chunk-KHRTIZ56.mjs.map +7 -0
- package/dist/modules/chunks/chunk-KLJZZ23J.mjs +102 -0
- package/dist/modules/chunks/chunk-KLJZZ23J.mjs.map +7 -0
- package/dist/modules/chunks/chunk-KNBAYU5I.mjs +49 -0
- package/dist/modules/chunks/chunk-KNBAYU5I.mjs.map +7 -0
- package/dist/modules/chunks/chunk-KSZNCFU4.mjs +125 -0
- package/dist/modules/chunks/chunk-KSZNCFU4.mjs.map +7 -0
- package/dist/modules/chunks/chunk-L45W6KM6.mjs +158 -0
- package/dist/modules/chunks/chunk-L45W6KM6.mjs.map +7 -0
- package/dist/modules/chunks/chunk-LERMYZRC.mjs +239 -0
- package/dist/modules/chunks/chunk-LERMYZRC.mjs.map +7 -0
- package/dist/modules/chunks/chunk-LKJCXYSJ.mjs +91 -0
- package/dist/modules/chunks/chunk-LKJCXYSJ.mjs.map +7 -0
- package/dist/modules/chunks/chunk-MBS3EICT.mjs +25 -0
- package/dist/modules/chunks/chunk-MBS3EICT.mjs.map +7 -0
- package/dist/modules/chunks/chunk-MUOQZPVH.mjs +609 -0
- package/dist/modules/chunks/chunk-MUOQZPVH.mjs.map +7 -0
- package/dist/modules/chunks/chunk-MVEPGFSB.mjs +1 -0
- package/dist/modules/chunks/chunk-MVEPGFSB.mjs.map +7 -0
- package/dist/modules/chunks/chunk-NBJKLWJ5.mjs +42 -0
- package/dist/modules/chunks/chunk-NBJKLWJ5.mjs.map +7 -0
- package/dist/modules/chunks/chunk-NBLGKTEM.mjs +86 -0
- package/dist/modules/chunks/chunk-NBLGKTEM.mjs.map +7 -0
- package/dist/modules/chunks/chunk-NI7CS3I2.mjs +110 -0
- package/dist/modules/chunks/chunk-NI7CS3I2.mjs.map +7 -0
- package/dist/modules/chunks/chunk-NJH2OJFC.mjs +2113 -0
- package/dist/modules/chunks/chunk-NJH2OJFC.mjs.map +7 -0
- package/dist/modules/chunks/chunk-OBK4LIJB.mjs +20 -0
- package/dist/modules/chunks/chunk-OBK4LIJB.mjs.map +7 -0
- package/dist/modules/chunks/chunk-PEUT3FW7.mjs +1 -0
- package/dist/modules/chunks/chunk-PEUT3FW7.mjs.map +7 -0
- package/dist/modules/chunks/chunk-PRZOWPDN.mjs +66 -0
- package/dist/modules/chunks/chunk-PRZOWPDN.mjs.map +7 -0
- package/dist/modules/chunks/chunk-Q4RXBGQS.mjs +55 -0
- package/dist/modules/chunks/chunk-Q4RXBGQS.mjs.map +7 -0
- package/dist/modules/chunks/chunk-QBHBKOIL.mjs +55 -0
- package/dist/modules/chunks/chunk-QBHBKOIL.mjs.map +7 -0
- package/dist/modules/chunks/chunk-QD6CCRMG.mjs +20 -0
- package/dist/modules/chunks/chunk-QD6CCRMG.mjs.map +7 -0
- package/dist/modules/chunks/chunk-QF4V23GW.mjs +39 -0
- package/dist/modules/chunks/chunk-QF4V23GW.mjs.map +7 -0
- package/dist/modules/chunks/chunk-QK6W7MJO.mjs +42 -0
- package/dist/modules/chunks/chunk-QK6W7MJO.mjs.map +7 -0
- package/dist/modules/chunks/chunk-QL7V6DK7.mjs +34 -0
- package/dist/modules/chunks/chunk-QL7V6DK7.mjs.map +7 -0
- package/dist/modules/chunks/chunk-QLBQQKRI.mjs +25 -0
- package/dist/modules/chunks/chunk-QLBQQKRI.mjs.map +7 -0
- package/dist/modules/chunks/chunk-QLZQGZDC.mjs +418 -0
- package/dist/modules/chunks/chunk-QLZQGZDC.mjs.map +7 -0
- package/dist/modules/chunks/chunk-QSKQZGK7.mjs +1625 -0
- package/dist/modules/chunks/chunk-QSKQZGK7.mjs.map +7 -0
- package/dist/modules/chunks/chunk-QURKBAG4.mjs +25 -0
- package/dist/modules/chunks/chunk-QURKBAG4.mjs.map +7 -0
- package/dist/modules/chunks/chunk-R274XBEH.mjs +53 -0
- package/dist/modules/chunks/chunk-R274XBEH.mjs.map +7 -0
- package/dist/modules/chunks/chunk-R4I4JEY5.mjs +77 -0
- package/dist/modules/chunks/chunk-R4I4JEY5.mjs.map +7 -0
- package/dist/modules/chunks/chunk-RR6L6VVR.mjs +9 -0
- package/dist/modules/chunks/chunk-RR6L6VVR.mjs.map +7 -0
- package/dist/modules/chunks/chunk-RXF7SBBZ.mjs +125 -0
- package/dist/modules/chunks/chunk-RXF7SBBZ.mjs.map +7 -0
- package/dist/modules/chunks/chunk-SR66S6EJ.mjs +138 -0
- package/dist/modules/chunks/chunk-SR66S6EJ.mjs.map +7 -0
- package/dist/modules/chunks/chunk-SSQMQJ52.mjs +27 -0
- package/dist/modules/chunks/chunk-SSQMQJ52.mjs.map +7 -0
- package/dist/modules/chunks/chunk-TP26TASL.mjs +20 -0
- package/dist/modules/chunks/chunk-TP26TASL.mjs.map +7 -0
- package/dist/modules/chunks/chunk-TSAEK5P3.mjs +50 -0
- package/dist/modules/chunks/chunk-TSAEK5P3.mjs.map +7 -0
- package/dist/modules/chunks/chunk-UAY27HT3.mjs +68 -0
- package/dist/modules/chunks/chunk-UAY27HT3.mjs.map +7 -0
- package/dist/modules/chunks/chunk-UDLIWGWS.mjs +103 -0
- package/dist/modules/chunks/chunk-UDLIWGWS.mjs.map +7 -0
- package/dist/modules/chunks/chunk-UDVQHPWV.mjs +89 -0
- package/dist/modules/chunks/chunk-UDVQHPWV.mjs.map +7 -0
- package/dist/modules/chunks/chunk-UM23W3G7.mjs +237 -0
- package/dist/modules/chunks/chunk-UM23W3G7.mjs.map +7 -0
- package/dist/modules/chunks/chunk-VDZJWEAA.mjs +214 -0
- package/dist/modules/chunks/chunk-VDZJWEAA.mjs.map +7 -0
- package/dist/modules/chunks/chunk-VIGOJWSO.mjs +42 -0
- package/dist/modules/chunks/chunk-VIGOJWSO.mjs.map +7 -0
- package/dist/modules/chunks/chunk-VY3S5BWI.mjs +284 -0
- package/dist/modules/chunks/chunk-VY3S5BWI.mjs.map +7 -0
- package/dist/modules/chunks/chunk-VZXGRZYU.mjs +47 -0
- package/dist/modules/chunks/chunk-VZXGRZYU.mjs.map +7 -0
- package/dist/modules/chunks/chunk-W5DMQZB5.mjs +42 -0
- package/dist/modules/chunks/chunk-W5DMQZB5.mjs.map +7 -0
- package/dist/modules/chunks/chunk-WOMHSTVZ.mjs +918 -0
- package/dist/modules/chunks/chunk-WOMHSTVZ.mjs.map +7 -0
- package/dist/modules/chunks/chunk-XFQT7XCG.mjs +42 -0
- package/dist/modules/chunks/chunk-XFQT7XCG.mjs.map +7 -0
- package/dist/modules/chunks/chunk-XJZEVRYX.mjs +98 -0
- package/dist/modules/chunks/chunk-XJZEVRYX.mjs.map +7 -0
- package/dist/modules/chunks/chunk-XUYFV23R.mjs +317 -0
- package/dist/modules/chunks/chunk-XUYFV23R.mjs.map +7 -0
- package/dist/modules/chunks/chunk-Y5HXCPPQ.mjs +58 -0
- package/dist/modules/chunks/chunk-Y5HXCPPQ.mjs.map +7 -0
- package/dist/modules/chunks/chunk-YTHGRKGI.mjs +147 -0
- package/dist/modules/chunks/chunk-YTHGRKGI.mjs.map +7 -0
- package/dist/modules/chunks/chunk-YVQSDKAO.mjs +341 -0
- package/dist/modules/chunks/chunk-YVQSDKAO.mjs.map +7 -0
- package/dist/modules/chunks/chunk-YYXQDUVT.mjs +123 -0
- package/dist/modules/chunks/chunk-YYXQDUVT.mjs.map +7 -0
- package/dist/modules/chunks/chunk-ZFXZ2NUI.mjs +142 -0
- package/dist/modules/chunks/chunk-ZFXZ2NUI.mjs.map +7 -0
- package/dist/modules/chunks/chunk-ZLNWF4ET.mjs +9 -0
- package/dist/modules/chunks/chunk-ZLNWF4ET.mjs.map +7 -0
- package/dist/modules/chunks/chunk-ZLU5QW2O.mjs +9 -0
- package/dist/modules/chunks/chunk-ZLU5QW2O.mjs.map +7 -0
- package/dist/modules/chunks/chunk-ZNZPYE2V.mjs +28 -0
- package/dist/modules/chunks/chunk-ZNZPYE2V.mjs.map +7 -0
- package/dist/modules/chunks/core-564N45MO.mjs +7480 -0
- package/dist/modules/chunks/core-564N45MO.mjs.map +7 -0
- package/dist/modules/chunks/css-BKH4SVJG.mjs +8 -0
- package/dist/modules/chunks/css-BKH4SVJG.mjs.map +7 -0
- package/dist/modules/chunks/engine-javascript-PDVIGNGR.mjs +3241 -0
- package/dist/modules/chunks/engine-javascript-PDVIGNGR.mjs.map +7 -0
- package/dist/modules/chunks/github-dark-default-6HVTHEWF.mjs +8 -0
- package/dist/modules/chunks/github-dark-default-6HVTHEWF.mjs.map +7 -0
- package/dist/modules/chunks/github-light-default-LAXRA6XL.mjs +8 -0
- package/dist/modules/chunks/github-light-default-LAXRA6XL.mjs.map +7 -0
- package/dist/modules/chunks/glsl-UC3YWUD2.mjs +18 -0
- package/dist/modules/chunks/glsl-UC3YWUD2.mjs.map +7 -0
- package/dist/modules/chunks/html-FRVIUV63.mjs +19 -0
- package/dist/modules/chunks/html-FRVIUV63.mjs.map +7 -0
- package/dist/modules/chunks/javascript-LN3OC7S2.mjs +8 -0
- package/dist/modules/chunks/javascript-LN3OC7S2.mjs.map +7 -0
- package/dist/modules/chunks/json-5CUGWTOP.mjs +11 -0
- package/dist/modules/chunks/json-5CUGWTOP.mjs.map +7 -0
- package/dist/modules/chunks/json5-YZQI5VNO.mjs +11 -0
- package/dist/modules/chunks/json5-YZQI5VNO.mjs.map +7 -0
- package/dist/modules/chunks/jsonc-SWID6VOZ.mjs +11 -0
- package/dist/modules/chunks/jsonc-SWID6VOZ.mjs.map +7 -0
- package/dist/modules/chunks/jsx-A7RDCLJO.mjs +11 -0
- package/dist/modules/chunks/jsx-A7RDCLJO.mjs.map +7 -0
- package/dist/modules/chunks/markdown-QTCU5KP5.mjs +11 -0
- package/dist/modules/chunks/markdown-QTCU5KP5.mjs.map +7 -0
- package/dist/modules/chunks/python-LAZONBIB.mjs +11 -0
- package/dist/modules/chunks/python-LAZONBIB.mjs.map +7 -0
- package/dist/modules/chunks/rust-XWTPJFJO.mjs +11 -0
- package/dist/modules/chunks/rust-XWTPJFJO.mjs.map +7 -0
- package/dist/modules/chunks/scss-CFXRHUUW.mjs +15 -0
- package/dist/modules/chunks/scss-CFXRHUUW.mjs.map +7 -0
- package/dist/modules/chunks/shellscript-OHO3LCVU.mjs +11 -0
- package/dist/modules/chunks/shellscript-OHO3LCVU.mjs.map +7 -0
- package/dist/modules/chunks/toml-IOHFZJ5B.mjs +11 -0
- package/dist/modules/chunks/toml-IOHFZJ5B.mjs.map +7 -0
- package/dist/modules/chunks/tsx-2E6WNX2E.mjs +11 -0
- package/dist/modules/chunks/tsx-2E6WNX2E.mjs.map +7 -0
- package/dist/modules/chunks/typescript-PBKAS54P.mjs +11 -0
- package/dist/modules/chunks/typescript-PBKAS54P.mjs.map +7 -0
- package/dist/modules/chunks/wgsl-PS6QPRLZ.mjs +11 -0
- package/dist/modules/chunks/wgsl-PS6QPRLZ.mjs.map +7 -0
- package/dist/modules/chunks/xml-JECR2ACB.mjs +18 -0
- package/dist/modules/chunks/xml-JECR2ACB.mjs.map +7 -0
- package/dist/modules/chunks/yaml-P2SV4LOE.mjs +11 -0
- package/dist/modules/chunks/yaml-P2SV4LOE.mjs.map +7 -0
- package/dist/modules/cli-contributions.mjs +32 -0
- package/dist/modules/cli-contributions.mjs.map +7 -0
- package/dist/modules/cli.mjs +14 -0
- package/dist/modules/cli.mjs.map +7 -0
- package/dist/modules/command-executor.mjs +65 -0
- package/dist/modules/command-executor.mjs.map +7 -0
- package/dist/modules/commands.mjs +10 -0
- package/dist/modules/commands.mjs.map +7 -0
- package/dist/modules/embedded.mjs +18608 -0
- package/dist/modules/embedded.mjs.map +7 -0
- package/dist/modules/extension-bridge.mjs +18 -0
- package/dist/modules/extension-bridge.mjs.map +7 -0
- package/dist/modules/frontend-root.mjs +61 -0
- package/dist/modules/frontend-root.mjs.map +7 -0
- package/dist/modules/index.mjs +784 -0
- package/dist/modules/index.mjs.map +7 -0
- package/dist/modules/page.mjs +45 -0
- package/dist/modules/page.mjs.map +7 -0
- package/dist/modules/pages/scene.mjs +18 -0
- package/dist/modules/pages/scene.mjs.map +7 -0
- package/dist/modules/plugin.mjs +56 -0
- package/dist/modules/plugin.mjs.map +7 -0
- package/dist/modules/plugins/asset/frontend.mjs +23 -0
- package/dist/modules/plugins/asset/frontend.mjs.map +7 -0
- package/dist/modules/plugins/asset/i18n.mjs +15 -0
- package/dist/modules/plugins/asset/i18n.mjs.map +7 -0
- package/dist/modules/plugins/asset/identity.mjs +42 -0
- package/dist/modules/plugins/asset/identity.mjs.map +7 -0
- package/dist/modules/plugins/asset/schema.mjs +10 -0
- package/dist/modules/plugins/asset/schema.mjs.map +7 -0
- package/dist/modules/plugins/asset/ui.mjs +16 -0
- package/dist/modules/plugins/asset/ui.mjs.map +7 -0
- package/dist/modules/plugins/content-browser/frontend.mjs +17 -0
- package/dist/modules/plugins/content-browser/frontend.mjs.map +7 -0
- package/dist/modules/plugins/content-browser/i18n.mjs +15 -0
- package/dist/modules/plugins/content-browser/i18n.mjs.map +7 -0
- package/dist/modules/plugins/content-browser/identity.mjs +22 -0
- package/dist/modules/plugins/content-browser/identity.mjs.map +7 -0
- package/dist/modules/plugins/content-browser/schema.mjs +12 -0
- package/dist/modules/plugins/content-browser/schema.mjs.map +7 -0
- package/dist/modules/plugins/content-browser/ui.mjs +15 -0
- package/dist/modules/plugins/content-browser/ui.mjs.map +7 -0
- package/dist/modules/plugins/display/api.mjs +10 -0
- package/dist/modules/plugins/display/api.mjs.map +7 -0
- package/dist/modules/plugins/display/backend.mjs +16 -0
- package/dist/modules/plugins/display/backend.mjs.map +7 -0
- package/dist/modules/plugins/display/carrier-contract.mjs +38 -0
- package/dist/modules/plugins/display/carrier-contract.mjs.map +7 -0
- package/dist/modules/plugins/display/carrier.mjs +13 -0
- package/dist/modules/plugins/display/carrier.mjs.map +7 -0
- package/dist/modules/plugins/display/effects.mjs +8 -0
- package/dist/modules/plugins/display/effects.mjs.map +7 -0
- package/dist/modules/plugins/display/frontend.mjs +14 -0
- package/dist/modules/plugins/display/frontend.mjs.map +7 -0
- package/dist/modules/plugins/display/i18n.mjs +58 -0
- package/dist/modules/plugins/display/i18n.mjs.map +7 -0
- package/dist/modules/plugins/display/identity.mjs +30 -0
- package/dist/modules/plugins/display/identity.mjs.map +7 -0
- package/dist/modules/plugins/display/page-broker.mjs +12 -0
- package/dist/modules/plugins/display/page-broker.mjs.map +7 -0
- package/dist/modules/plugins/display/schema.mjs +40 -0
- package/dist/modules/plugins/display/schema.mjs.map +7 -0
- package/dist/modules/plugins/display/ui.mjs +9 -0
- package/dist/modules/plugins/display/ui.mjs.map +7 -0
- package/dist/modules/plugins/inspector/frontend.mjs +17 -0
- package/dist/modules/plugins/inspector/frontend.mjs.map +7 -0
- package/dist/modules/plugins/inspector/i18n.mjs +15 -0
- package/dist/modules/plugins/inspector/i18n.mjs.map +7 -0
- package/dist/modules/plugins/inspector/identity.mjs +22 -0
- package/dist/modules/plugins/inspector/identity.mjs.map +7 -0
- package/dist/modules/plugins/inspector/schema.mjs +12 -0
- package/dist/modules/plugins/inspector/schema.mjs.map +7 -0
- package/dist/modules/plugins/inspector/ui.mjs +16 -0
- package/dist/modules/plugins/inspector/ui.mjs.map +7 -0
- package/dist/modules/plugins/material/frontend.mjs +25 -0
- package/dist/modules/plugins/material/frontend.mjs.map +7 -0
- package/dist/modules/plugins/material/i18n.mjs +15 -0
- package/dist/modules/plugins/material/i18n.mjs.map +7 -0
- package/dist/modules/plugins/material/identity.mjs +60 -0
- package/dist/modules/plugins/material/identity.mjs.map +7 -0
- package/dist/modules/plugins/material/schema.mjs +47 -0
- package/dist/modules/plugins/material/schema.mjs.map +7 -0
- package/dist/modules/plugins/material/ui.mjs +28 -0
- package/dist/modules/plugins/material/ui.mjs.map +7 -0
- package/dist/modules/plugins/mesh/frontend.mjs +23 -0
- package/dist/modules/plugins/mesh/frontend.mjs.map +7 -0
- package/dist/modules/plugins/mesh/i18n.mjs +15 -0
- package/dist/modules/plugins/mesh/i18n.mjs.map +7 -0
- package/dist/modules/plugins/mesh/identity.mjs +54 -0
- package/dist/modules/plugins/mesh/identity.mjs.map +7 -0
- package/dist/modules/plugins/mesh/schema.mjs +10 -0
- package/dist/modules/plugins/mesh/schema.mjs.map +7 -0
- package/dist/modules/plugins/mesh/ui.mjs +26 -0
- package/dist/modules/plugins/mesh/ui.mjs.map +7 -0
- package/dist/modules/plugins/plugins/api.mjs +11 -0
- package/dist/modules/plugins/plugins/api.mjs.map +7 -0
- package/dist/modules/plugins/plugins/backend.mjs +21 -0
- package/dist/modules/plugins/plugins/backend.mjs.map +7 -0
- package/dist/modules/plugins/plugins/cli.mjs +12 -0
- package/dist/modules/plugins/plugins/cli.mjs.map +7 -0
- package/dist/modules/plugins/plugins/frontend.mjs +17 -0
- package/dist/modules/plugins/plugins/frontend.mjs.map +7 -0
- package/dist/modules/plugins/plugins/i18n.mjs +15 -0
- package/dist/modules/plugins/plugins/i18n.mjs.map +7 -0
- package/dist/modules/plugins/plugins/identity.mjs +26 -0
- package/dist/modules/plugins/plugins/identity.mjs.map +7 -0
- package/dist/modules/plugins/plugins/runtime.mjs +50 -0
- package/dist/modules/plugins/plugins/runtime.mjs.map +7 -0
- package/dist/modules/plugins/plugins/schema.mjs +12 -0
- package/dist/modules/plugins/plugins/schema.mjs.map +7 -0
- package/dist/modules/plugins/plugins/ui/panel.mjs +14 -0
- package/dist/modules/plugins/plugins/ui/panel.mjs.map +7 -0
- package/dist/modules/plugins/plugins/ui.mjs +15 -0
- package/dist/modules/plugins/plugins/ui.mjs.map +7 -0
- package/dist/modules/plugins/scene/frontend.mjs +18 -0
- package/dist/modules/plugins/scene/frontend.mjs.map +7 -0
- package/dist/modules/plugins/scene/identity.mjs +14 -0
- package/dist/modules/plugins/scene/identity.mjs.map +7 -0
- package/dist/modules/plugins/scene-tree/frontend.mjs +17 -0
- package/dist/modules/plugins/scene-tree/frontend.mjs.map +7 -0
- package/dist/modules/plugins/scene-tree/i18n.mjs +15 -0
- package/dist/modules/plugins/scene-tree/i18n.mjs.map +7 -0
- package/dist/modules/plugins/scene-tree/identity.mjs +22 -0
- package/dist/modules/plugins/scene-tree/identity.mjs.map +7 -0
- package/dist/modules/plugins/scene-tree/schema.mjs +12 -0
- package/dist/modules/plugins/scene-tree/schema.mjs.map +7 -0
- package/dist/modules/plugins/scene-tree/ui.mjs +16 -0
- package/dist/modules/plugins/scene-tree/ui.mjs.map +7 -0
- package/dist/modules/plugins/texture/frontend.mjs +23 -0
- package/dist/modules/plugins/texture/frontend.mjs.map +7 -0
- package/dist/modules/plugins/texture/i18n.mjs +15 -0
- package/dist/modules/plugins/texture/i18n.mjs.map +7 -0
- package/dist/modules/plugins/texture/identity.mjs +54 -0
- package/dist/modules/plugins/texture/identity.mjs.map +7 -0
- package/dist/modules/plugins/texture/schema.mjs +10 -0
- package/dist/modules/plugins/texture/schema.mjs.map +7 -0
- package/dist/modules/plugins/texture/ui.mjs +26 -0
- package/dist/modules/plugins/texture/ui.mjs.map +7 -0
- package/dist/modules/plugins/viewport/frontend.mjs +27 -0
- package/dist/modules/plugins/viewport/frontend.mjs.map +7 -0
- package/dist/modules/plugins/viewport/identity.mjs +28 -0
- package/dist/modules/plugins/viewport/identity.mjs.map +7 -0
- package/dist/modules/plugins/viewport/presentation-identity.mjs +10 -0
- package/dist/modules/plugins/viewport/presentation-identity.mjs.map +7 -0
- package/dist/modules/plugins/viewport/presentation.mjs +18 -0
- package/dist/modules/plugins/viewport/presentation.mjs.map +7 -0
- package/dist/modules/plugins/viewport/schema.mjs +18 -0
- package/dist/modules/plugins/viewport/schema.mjs.map +7 -0
- package/dist/modules/plugins/viewport/workspace-shell.mjs +29 -0
- package/dist/modules/plugins/viewport/workspace-shell.mjs.map +7 -0
- package/dist/modules/shell/contract.mjs +10 -0
- package/dist/modules/shell/contract.mjs.map +7 -0
- package/dist/modules/shell/frontend.mjs +14 -0
- package/dist/modules/shell/frontend.mjs.map +7 -0
- package/dist/modules/shell/layout-zones.mjs +20 -0
- package/dist/modules/shell/layout-zones.mjs.map +7 -0
- package/dist/modules/start-cli.mjs +57 -0
- package/dist/modules/start-cli.mjs.map +7 -0
- package/dist/modules/start.mjs +18 -0
- package/dist/modules/start.mjs.map +7 -0
- package/dist/modules/viewer/catalog/backend.mjs +47 -0
- package/dist/modules/viewer/catalog/backend.mjs.map +7 -0
- package/dist/modules/viewer/catalog/frontend.mjs +55 -0
- package/dist/modules/viewer/catalog/frontend.mjs.map +7 -0
- package/dist/modules/viewer/catalog/shared.mjs +43 -0
- package/dist/modules/viewer/catalog/shared.mjs.map +7 -0
- package/dist/modules/viewer/catalog.mjs +85 -0
- package/dist/modules/viewer/catalog.mjs.map +7 -0
- package/dist/modules/viewer/cli.mjs +23 -0
- package/dist/modules/viewer/cli.mjs.map +7 -0
- package/dist/modules/viewer-host/frontend.mjs +65 -0
- package/dist/modules/viewer-host/frontend.mjs.map +7 -0
- package/dist/modules/viewer-host/page-registry.mjs +27 -0
- package/dist/modules/viewer-host/page-registry.mjs.map +7 -0
- package/dist/modules/viewer-host/slot-registry.mjs +8 -0
- package/dist/modules/viewer-host/slot-registry.mjs.map +7 -0
- package/dist/modules/viewer-host.mjs +43 -0
- package/dist/modules/viewer-host.mjs.map +7 -0
- package/dist/modules/viewer.mjs +85 -0
- package/dist/modules/viewer.mjs.map +7 -0
- package/dist/modules/workspace/adopt-surface.mjs +16 -0
- package/dist/modules/workspace/adopt-surface.mjs.map +7 -0
- package/dist/modules/workspace/api.mjs +8 -0
- package/dist/modules/workspace/api.mjs.map +7 -0
- package/dist/modules/workspace/backend.mjs +23 -0
- package/dist/modules/workspace/backend.mjs.map +7 -0
- package/dist/modules/workspace/broker.mjs +16 -0
- package/dist/modules/workspace/broker.mjs.map +7 -0
- package/dist/modules/workspace/cli.mjs +9 -0
- package/dist/modules/workspace/cli.mjs.map +7 -0
- package/dist/modules/workspace/client.mjs +15 -0
- package/dist/modules/workspace/client.mjs.map +7 -0
- package/dist/modules/workspace/command-error.mjs +16 -0
- package/dist/modules/workspace/command-error.mjs.map +7 -0
- package/dist/modules/workspace/contract.mjs +71 -0
- package/dist/modules/workspace/contract.mjs.map +7 -0
- package/dist/modules/workspace/demo-client.mjs +127 -0
- package/dist/modules/workspace/demo-client.mjs.map +7 -0
- package/dist/modules/workspace/engine-adapter.mjs +16 -0
- package/dist/modules/workspace/engine-adapter.mjs.map +7 -0
- package/dist/modules/workspace/engine-presentation.mjs +10 -0
- package/dist/modules/workspace/engine-presentation.mjs.map +7 -0
- package/dist/modules/workspace/extension-bridge.mjs +18 -0
- package/dist/modules/workspace/extension-bridge.mjs.map +7 -0
- package/dist/modules/workspace/frontend-plugin.mjs +18 -0
- package/dist/modules/workspace/frontend-plugin.mjs.map +7 -0
- package/dist/modules/workspace/frontend.mjs +29 -0
- package/dist/modules/workspace/frontend.mjs.map +7 -0
- package/dist/modules/workspace/id.mjs +8 -0
- package/dist/modules/workspace/id.mjs.map +7 -0
- package/dist/modules/workspace/inspection-presentation.mjs +12 -0
- package/dist/modules/workspace/inspection-presentation.mjs.map +7 -0
- package/dist/modules/workspace/locale-bridge.mjs +14 -0
- package/dist/modules/workspace/locale-bridge.mjs.map +7 -0
- package/dist/modules/workspace/page-title.mjs +13 -0
- package/dist/modules/workspace/page-title.mjs.map +7 -0
- package/dist/modules/workspace/presentation.mjs +18 -0
- package/dist/modules/workspace/presentation.mjs.map +7 -0
- package/dist/modules/workspace/preview-surface.mjs +17 -0
- package/dist/modules/workspace/preview-surface.mjs.map +7 -0
- package/dist/modules/workspace/project-session.mjs +18 -0
- package/dist/modules/workspace/project-session.mjs.map +7 -0
- package/dist/modules/workspace/render-resize-sync.mjs +12 -0
- package/dist/modules/workspace/render-resize-sync.mjs.map +7 -0
- package/dist/modules/workspace/resident.mjs +16 -0
- package/dist/modules/workspace/resident.mjs.map +7 -0
- package/dist/modules/workspace/resource-open.mjs +34 -0
- package/dist/modules/workspace/resource-open.mjs.map +7 -0
- package/dist/modules/workspace/resource-page.mjs +27 -0
- package/dist/modules/workspace/resource-page.mjs.map +7 -0
- package/dist/modules/workspace/tool-runtime.mjs +14 -0
- package/dist/modules/workspace/tool-runtime.mjs.map +7 -0
- package/dist/modules/workspace/view-trace.mjs +60 -0
- package/dist/modules/workspace/view-trace.mjs.map +7 -0
- package/dist/modules/workspace/workspace-client-connection.mjs +22 -0
- package/dist/modules/workspace/workspace-client-connection.mjs.map +7 -0
- package/dist/modules/workspace/workspace-recovery.mjs +35 -0
- package/dist/modules/workspace/workspace-recovery.mjs.map +7 -0
- package/dist/modules/workspace/workspace-state.mjs +12 -0
- package/dist/modules/workspace/workspace-state.mjs.map +7 -0
- package/dist/modules/workspace-frontend.mjs +17 -0
- package/dist/modules/workspace-frontend.mjs.map +7 -0
- package/dist/viewer/assets/chunk-CilyBKbf.js +1 -0
- package/dist/viewer/assets/core-DSQma37-.js +13 -0
- package/dist/viewer/assets/core-DSQma37-.js.map +1 -0
- package/dist/viewer/assets/css-Bq1BXecw.js +2 -0
- package/dist/viewer/assets/css-Bq1BXecw.js.map +1 -0
- package/dist/viewer/assets/css-CWQWazmX.js +1 -0
- package/dist/viewer/assets/embedded-D4ZDx--W.js +2 -0
- package/dist/viewer/assets/embedded-D4ZDx--W.js.map +1 -0
- package/dist/viewer/assets/engine-javascript-BvokIV9O.js +142 -0
- package/dist/viewer/assets/engine-javascript-BvokIV9O.js.map +1 -0
- package/dist/viewer/assets/github-dark-default-DaDlj-WZ.js +2 -0
- package/dist/viewer/assets/github-dark-default-DaDlj-WZ.js.map +1 -0
- package/dist/viewer/assets/github-light-default-BqhWxAZd.js +2 -0
- package/dist/viewer/assets/github-light-default-BqhWxAZd.js.map +1 -0
- package/dist/viewer/assets/glsl-BJgVnv11.js +2 -0
- package/dist/viewer/assets/glsl-BJgVnv11.js.map +1 -0
- package/dist/viewer/assets/html-AaaHGGyt.js +2 -0
- package/dist/viewer/assets/html-AaaHGGyt.js.map +1 -0
- package/dist/viewer/assets/javascript-BX9W64FE.js +1 -0
- package/dist/viewer/assets/javascript-DQODvD07.js +2 -0
- package/dist/viewer/assets/javascript-DQODvD07.js.map +1 -0
- package/dist/viewer/assets/json-CpcIDpT7.js +2 -0
- package/dist/viewer/assets/json-CpcIDpT7.js.map +1 -0
- package/dist/viewer/assets/json5-Czq4A7dk.js +2 -0
- package/dist/viewer/assets/json5-Czq4A7dk.js.map +1 -0
- package/dist/viewer/assets/jsonc-BXDfCMmu.js +2 -0
- package/dist/viewer/assets/jsonc-BXDfCMmu.js.map +1 -0
- package/dist/viewer/assets/jsx-DAWscEnf.js +2 -0
- package/dist/viewer/assets/jsx-DAWscEnf.js.map +1 -0
- package/dist/viewer/assets/main-C-2CHTN_.js +15 -0
- package/dist/viewer/assets/main-C-2CHTN_.js.map +1 -0
- package/dist/viewer/assets/markdown-Cx1FMNw-.js +2 -0
- package/dist/viewer/assets/markdown-Cx1FMNw-.js.map +1 -0
- package/dist/viewer/assets/panels-entry-Ddhfjgf0.js +46 -0
- package/dist/viewer/assets/panels-entry-Ddhfjgf0.js.map +1 -0
- package/dist/viewer/assets/python-CYPKjWV9.js +2 -0
- package/dist/viewer/assets/python-CYPKjWV9.js.map +1 -0
- package/dist/viewer/assets/rust-0e5cNx_V.js +2 -0
- package/dist/viewer/assets/rust-0e5cNx_V.js.map +1 -0
- package/dist/viewer/assets/scss-B-aKzLbT.js +2 -0
- package/dist/viewer/assets/scss-B-aKzLbT.js.map +1 -0
- package/dist/viewer/assets/shellscript-CpXD-pSm.js +2 -0
- package/dist/viewer/assets/shellscript-CpXD-pSm.js.map +1 -0
- package/dist/viewer/assets/style-ClttNKZk.css +2 -0
- package/dist/viewer/assets/styles-BXozhwiU.js +11 -0
- package/dist/viewer/assets/styles-BXozhwiU.js.map +1 -0
- package/dist/viewer/assets/toml-GmchYTXa.js +2 -0
- package/dist/viewer/assets/toml-GmchYTXa.js.map +1 -0
- package/dist/viewer/assets/tsx-Crj1Bi53.js +2 -0
- package/dist/viewer/assets/tsx-Crj1Bi53.js.map +1 -0
- package/dist/viewer/assets/typescript-xi0cSHCO.js +2 -0
- package/dist/viewer/assets/typescript-xi0cSHCO.js.map +1 -0
- package/dist/viewer/assets/wgsl-BoEPRo9U.js +2 -0
- package/dist/viewer/assets/wgsl-BoEPRo9U.js.map +1 -0
- package/dist/viewer/assets/xml-B8JqQrMD.js +2 -0
- package/dist/viewer/assets/xml-B8JqQrMD.js.map +1 -0
- package/dist/viewer/assets/yaml-DsIB85X9.js +2 -0
- package/dist/viewer/assets/yaml-DsIB85X9.js.map +1 -0
- package/dist/viewer/index.html +15 -0
- package/dist/viewer/panels.js +1 -0
- package/host.pack.json +13 -0
- package/package.json +174 -0
- package/skills/forgeax-view-cli/SKILL.md +74 -0
- package/skills/forgeax-view-start/SKILL.md +202 -0
- package/skills/forgeax-view-start/scripts/start-view.mjs +202 -0
|
@@ -0,0 +1,692 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runWorkspaceToolApi
|
|
3
|
+
} from "./chunk-H3M22JDL.mjs";
|
|
4
|
+
import {
|
|
5
|
+
isWorkspaceTargetRecoveryCode,
|
|
6
|
+
resolveWorkspaceFailure,
|
|
7
|
+
resolveWorkspaceReopenRoot
|
|
8
|
+
} from "./chunk-VDZJWEAA.mjs";
|
|
9
|
+
import {
|
|
10
|
+
editorSceneTargetIds,
|
|
11
|
+
isEditorWorkspaceAsset,
|
|
12
|
+
isTypePreviewAsset,
|
|
13
|
+
logResourceOpen,
|
|
14
|
+
selectEditorWorkspacePreview,
|
|
15
|
+
summarizeResourceAsset
|
|
16
|
+
} from "./chunk-FKCQYDLX.mjs";
|
|
17
|
+
import {
|
|
18
|
+
VIEW_DISPLAY_TAB_ID,
|
|
19
|
+
VIEW_FILE_GET_SERVICE,
|
|
20
|
+
VIEW_WORKSPACE_API_VERSION,
|
|
21
|
+
VIEW_WORKSPACE_OPERATIONS,
|
|
22
|
+
VIEW_WORKSPACE_SERVICES,
|
|
23
|
+
VIEW_WORKSPACE_STATE_TOPIC,
|
|
24
|
+
VIEW_WORKSPACE_TAB_ID,
|
|
25
|
+
assertWorkspaceRequest,
|
|
26
|
+
cloneWorkspaceValue,
|
|
27
|
+
requireWorkspaceString,
|
|
28
|
+
serializeWorkspaceAsset,
|
|
29
|
+
serializeWorkspaceInspection,
|
|
30
|
+
serializeWorkspaceOpenRequest,
|
|
31
|
+
serializeWorkspaceState,
|
|
32
|
+
workspaceCapabilities,
|
|
33
|
+
workspaceError,
|
|
34
|
+
workspaceUiFingerprint
|
|
35
|
+
} from "./chunk-32GD5LL6.mjs";
|
|
36
|
+
import {
|
|
37
|
+
createWorkspaceId
|
|
38
|
+
} from "./chunk-TP26TASL.mjs";
|
|
39
|
+
|
|
40
|
+
// packages/view-workspace-core/src/broker.mjs
|
|
41
|
+
import { randomUUID } from "node:crypto";
|
|
42
|
+
|
|
43
|
+
// packages/view-workspace-core/src/file-preview.mjs
|
|
44
|
+
import { readFile, stat } from "node:fs/promises";
|
|
45
|
+
import { extname, isAbsolute, relative, resolve } from "node:path";
|
|
46
|
+
var EXT_KIND = Object.freeze({
|
|
47
|
+
".png": { kind: "image", mime: "image/png" },
|
|
48
|
+
".jpg": { kind: "image", mime: "image/jpeg" },
|
|
49
|
+
".jpeg": { kind: "image", mime: "image/jpeg" },
|
|
50
|
+
".gif": { kind: "image", mime: "image/gif" },
|
|
51
|
+
".webp": { kind: "image", mime: "image/webp" },
|
|
52
|
+
".avif": { kind: "image", mime: "image/avif" },
|
|
53
|
+
".bmp": { kind: "image", mime: "image/bmp" },
|
|
54
|
+
".ico": { kind: "image", mime: "image/x-icon" },
|
|
55
|
+
".svg": { kind: "image", mime: "image/svg+xml" },
|
|
56
|
+
".mp3": { kind: "audio", mime: "audio/mpeg" },
|
|
57
|
+
".wav": { kind: "audio", mime: "audio/wav" },
|
|
58
|
+
".ogg": { kind: "audio", mime: "audio/ogg" },
|
|
59
|
+
".m4a": { kind: "audio", mime: "audio/mp4" },
|
|
60
|
+
".flac": { kind: "audio", mime: "audio/flac" },
|
|
61
|
+
".aac": { kind: "audio", mime: "audio/aac" },
|
|
62
|
+
".mp4": { kind: "video", mime: "video/mp4" },
|
|
63
|
+
".webm": { kind: "video", mime: "video/webm" },
|
|
64
|
+
".mov": { kind: "video", mime: "video/quicktime" },
|
|
65
|
+
".glb": { kind: "model", mime: "model/gltf-binary" },
|
|
66
|
+
".gltf": { kind: "model", mime: "model/gltf+json" },
|
|
67
|
+
".fbx": { kind: "model", mime: "application/octet-stream" },
|
|
68
|
+
".ttf": { kind: "binary", mime: "font/ttf" },
|
|
69
|
+
".otf": { kind: "binary", mime: "font/otf" },
|
|
70
|
+
".woff": { kind: "binary", mime: "font/woff" },
|
|
71
|
+
".woff2": { kind: "binary", mime: "font/woff2" }
|
|
72
|
+
});
|
|
73
|
+
var MAX_BINARY_PREVIEW_BYTES = 10 * 1024 * 1024;
|
|
74
|
+
var BINARY_PREVIEW_KINDS = /* @__PURE__ */ new Set(["image", "audio", "video", "binary"]);
|
|
75
|
+
function classifyFile(path) {
|
|
76
|
+
const ext = extname(path).toLowerCase();
|
|
77
|
+
return EXT_KIND[ext] ?? { kind: "text", mime: "text/plain; charset=utf-8" };
|
|
78
|
+
}
|
|
79
|
+
function resolveProjectFilePath(root, input) {
|
|
80
|
+
if (typeof root !== "string" || root.trim() === "") return null;
|
|
81
|
+
if (typeof input !== "string" || input.length === 0 || input.includes("\0")) return null;
|
|
82
|
+
const rootAbs = resolve(root);
|
|
83
|
+
const abs = isAbsolute(input) ? resolve(input) : resolve(rootAbs, input);
|
|
84
|
+
const rel = relative(rootAbs, abs);
|
|
85
|
+
if (rel === "" || rel.startsWith("..") || isAbsolute(rel)) return null;
|
|
86
|
+
const normalized = rel.split(/[/\\]/).join("/");
|
|
87
|
+
if (normalized === ".forgeax/ddc" || normalized.startsWith(".forgeax/ddc/")) return null;
|
|
88
|
+
return { abs, rel: normalized };
|
|
89
|
+
}
|
|
90
|
+
async function readFilePreview(absPath, rel) {
|
|
91
|
+
let info;
|
|
92
|
+
try {
|
|
93
|
+
info = await stat(absPath);
|
|
94
|
+
} catch {
|
|
95
|
+
throw new Error("not found");
|
|
96
|
+
}
|
|
97
|
+
if (info.isDirectory()) throw new Error("is a directory");
|
|
98
|
+
const ext = extname(rel).toLowerCase();
|
|
99
|
+
const { kind, mime } = classifyFile(rel);
|
|
100
|
+
const base = { path: rel, kind, mime, size: info.size, mtime: info.mtimeMs };
|
|
101
|
+
if (kind === "text") {
|
|
102
|
+
const content = await readFile(absPath, "utf8");
|
|
103
|
+
return { ...base, content };
|
|
104
|
+
}
|
|
105
|
+
if (kind === "image" && ext === ".svg") {
|
|
106
|
+
const content = await readFile(absPath, "utf8");
|
|
107
|
+
return { ...base, content };
|
|
108
|
+
}
|
|
109
|
+
if (BINARY_PREVIEW_KINDS.has(kind)) {
|
|
110
|
+
if (info.size > MAX_BINARY_PREVIEW_BYTES) return base;
|
|
111
|
+
const buffer = await readFile(absPath);
|
|
112
|
+
return { ...base, dataUrl: `data:${mime};base64,${buffer.toString("base64")}` };
|
|
113
|
+
}
|
|
114
|
+
return base;
|
|
115
|
+
}
|
|
116
|
+
async function readWorkspaceFilePreview(workspace, payload = {}) {
|
|
117
|
+
const root = workspace?.project?.root;
|
|
118
|
+
if (typeof root !== "string" || root.trim() === "") {
|
|
119
|
+
throw workspaceError(
|
|
120
|
+
"view-workspace-project-closed",
|
|
121
|
+
"an open project",
|
|
122
|
+
"Open a project before previewing source files."
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
const resolved = resolveProjectFilePath(root, payload?.path);
|
|
126
|
+
if (!resolved) {
|
|
127
|
+
throw workspaceError(
|
|
128
|
+
"view-workspace-invalid-args",
|
|
129
|
+
"path to be a file inside the open project",
|
|
130
|
+
"Provide a project-relative or in-project absolute path.",
|
|
131
|
+
{ field: "path" }
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
try {
|
|
135
|
+
return await readFilePreview(resolved.abs, resolved.rel);
|
|
136
|
+
} catch (error) {
|
|
137
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
138
|
+
if (message.startsWith("is a directory")) {
|
|
139
|
+
throw workspaceError(
|
|
140
|
+
"view-workspace-invalid-args",
|
|
141
|
+
"a file path",
|
|
142
|
+
message,
|
|
143
|
+
{ path: resolved.rel }
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
throw workspaceError(
|
|
147
|
+
"view-workspace-file-not-found",
|
|
148
|
+
"the file to exist in the open project",
|
|
149
|
+
"Refresh the content browser and retry.",
|
|
150
|
+
{ path: resolved.rel }
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// packages/view-workspace-core/src/broker.mjs
|
|
156
|
+
var ENGINE_SOURCE = "engine-workspace";
|
|
157
|
+
var UI_OPERATIONS = Object.freeze({
|
|
158
|
+
"target.select": (workspace, args) => workspace.selectTarget(args),
|
|
159
|
+
"tabs.get": (workspace) => workspace.snapshot(),
|
|
160
|
+
"tabs.select": (workspace, args) => workspace.selectTab(args),
|
|
161
|
+
"scene.select": (workspace, args, context) => workspace.selectSceneEntity(args, context),
|
|
162
|
+
"scene.pick": (workspace, args, context) => workspace.pickSceneEntity(args, context),
|
|
163
|
+
"scene.clear": (workspace, args, context) => workspace.clearSceneSelection(args, context)
|
|
164
|
+
});
|
|
165
|
+
var ViewWorkspaceBroker = class {
|
|
166
|
+
constructor({ engine, toolApi, display = () => void 0, accessToken = randomUUID(), authorize } = {}) {
|
|
167
|
+
this.engine = engine;
|
|
168
|
+
this.toolApi = toolApi;
|
|
169
|
+
this.display = display;
|
|
170
|
+
this.accessToken = accessToken;
|
|
171
|
+
this.authorize = authorize;
|
|
172
|
+
this.selectedTabId = VIEW_WORKSPACE_TAB_ID;
|
|
173
|
+
this.targetBinding = "editor";
|
|
174
|
+
this.editorTargetId = void 0;
|
|
175
|
+
this.playOwner = void 0;
|
|
176
|
+
this.revision = 0;
|
|
177
|
+
this.listeners = /* @__PURE__ */ new Set();
|
|
178
|
+
this.assets = null;
|
|
179
|
+
this.inspection = null;
|
|
180
|
+
this.openRequest = null;
|
|
181
|
+
this.openRequestSequence = 0;
|
|
182
|
+
this.resourceOpens = /* @__PURE__ */ new Map();
|
|
183
|
+
this.sceneSelection = null;
|
|
184
|
+
this.selectionAbort?.abort();
|
|
185
|
+
this.previewProjection = null;
|
|
186
|
+
this.projectOwner = void 0;
|
|
187
|
+
this.previewOwner = void 0;
|
|
188
|
+
this.workspaceTargetLost = false;
|
|
189
|
+
this.disposing = false;
|
|
190
|
+
this.publishFingerprint = "";
|
|
191
|
+
}
|
|
192
|
+
get project() {
|
|
193
|
+
return this.engine?.project?.project ?? null;
|
|
194
|
+
}
|
|
195
|
+
get projectTarget() {
|
|
196
|
+
return this.engine?.project?.target ?? null;
|
|
197
|
+
}
|
|
198
|
+
get preview() {
|
|
199
|
+
this.syncBindings();
|
|
200
|
+
return this.previewProjection;
|
|
201
|
+
}
|
|
202
|
+
previews() {
|
|
203
|
+
return this.engine?.previews ?? (this.engine?.preview ? [this.engine.preview] : []);
|
|
204
|
+
}
|
|
205
|
+
classifiedPreviews() {
|
|
206
|
+
return this.previews().map((preview) => ({
|
|
207
|
+
target: preview.target,
|
|
208
|
+
asset: this.hydrateAsset(preview.asset)
|
|
209
|
+
}));
|
|
210
|
+
}
|
|
211
|
+
editorPreview() {
|
|
212
|
+
const live = this.previews();
|
|
213
|
+
const selected = selectEditorWorkspacePreview(this.classifiedPreviews(), this.editorTargetId);
|
|
214
|
+
if (!selected) return void 0;
|
|
215
|
+
return live.find((preview) => String(preview.target.targetId) === String(selected.target.targetId));
|
|
216
|
+
}
|
|
217
|
+
boundTarget() {
|
|
218
|
+
return this.targetBinding === "play" ? this.engine?.play : this.previews().find((preview) => preview.target.targetId === this.previewTargetId) ?? this.editorPreview();
|
|
219
|
+
}
|
|
220
|
+
hydrateAsset(asset) {
|
|
221
|
+
if (!asset?.guid) return asset ?? null;
|
|
222
|
+
if (asset.kind) return asset;
|
|
223
|
+
const catalog = Array.isArray(this.assets) ? this.assets.find((entry) => entry.guid === asset.guid) : void 0;
|
|
224
|
+
if (!catalog?.kind) return asset;
|
|
225
|
+
return { ...asset, kind: catalog.kind, name: asset.name ?? catalog.name };
|
|
226
|
+
}
|
|
227
|
+
selectTarget({ targetId } = {}) {
|
|
228
|
+
if (targetId === this.engine?.play?.target.targetId) this.targetBinding = "play";
|
|
229
|
+
else {
|
|
230
|
+
const preview = this.previews().find((entry) => entry.target.targetId === targetId);
|
|
231
|
+
if (!preview) throw workspaceError("view-workspace-target-mismatch", "An existing preview or Play target", "Refresh tabs.get.");
|
|
232
|
+
this.targetBinding = "editor";
|
|
233
|
+
this.previewTargetId = targetId;
|
|
234
|
+
if (isEditorWorkspaceAsset(this.hydrateAsset(preview.asset))) this.editorTargetId = String(targetId);
|
|
235
|
+
}
|
|
236
|
+
this.changed();
|
|
237
|
+
return this.snapshot();
|
|
238
|
+
}
|
|
239
|
+
syncBindings() {
|
|
240
|
+
if (this.playOwner !== this.engine?.play) {
|
|
241
|
+
this.playOwner = this.engine?.play;
|
|
242
|
+
this.targetBinding = this.playOwner ? "play" : "editor";
|
|
243
|
+
if (!this.playOwner) this.previewTargetId = this.editorPreview()?.target.targetId;
|
|
244
|
+
}
|
|
245
|
+
if (this.projectOwner !== this.engine?.project) {
|
|
246
|
+
this.projectOwner = this.engine?.project;
|
|
247
|
+
this.assets = null;
|
|
248
|
+
this.inspection = null;
|
|
249
|
+
this.openRequest = null;
|
|
250
|
+
this.openRequestSequence = 0;
|
|
251
|
+
this.resourceOpens = /* @__PURE__ */ new Map();
|
|
252
|
+
this.editorTargetId = void 0;
|
|
253
|
+
this.sceneSelection = null;
|
|
254
|
+
this.selectionAbort?.abort();
|
|
255
|
+
}
|
|
256
|
+
if (this.previewOwner !== this.boundTarget()) {
|
|
257
|
+
this.previewOwner = this.boundTarget();
|
|
258
|
+
this.sceneSelection = null;
|
|
259
|
+
this.selectionAbort?.abort();
|
|
260
|
+
this.previewProjection = this.previewOwner ? {
|
|
261
|
+
target: this.previewOwner.target,
|
|
262
|
+
asset: this.previewOwner.asset,
|
|
263
|
+
presentation: this.previewOwner.presentation
|
|
264
|
+
} : null;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
snapshot() {
|
|
268
|
+
this.syncBindings();
|
|
269
|
+
const display = this.display?.();
|
|
270
|
+
return serializeWorkspaceState({
|
|
271
|
+
revision: this.revision,
|
|
272
|
+
selectedTabId: this.selectedTabId,
|
|
273
|
+
tabs: [
|
|
274
|
+
{
|
|
275
|
+
tabId: VIEW_DISPLAY_TAB_ID,
|
|
276
|
+
kind: "display",
|
|
277
|
+
selected: this.selectedTabId === VIEW_DISPLAY_TAB_ID,
|
|
278
|
+
state: display?.state,
|
|
279
|
+
run: display?.occupancy?.run,
|
|
280
|
+
target: display?.occupancy?.target,
|
|
281
|
+
targetId: display?.occupancy?.targetId
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
tabId: VIEW_WORKSPACE_TAB_ID,
|
|
285
|
+
kind: "workspace",
|
|
286
|
+
selected: this.selectedTabId === VIEW_WORKSPACE_TAB_ID,
|
|
287
|
+
state: this.previewProjection ? "previewing" : this.project ? "project-open" : "empty",
|
|
288
|
+
...this.previewProjection?.target ?? this.projectTarget ? { target: this.previewProjection?.target ?? this.projectTarget } : {}
|
|
289
|
+
}
|
|
290
|
+
],
|
|
291
|
+
project: this.project,
|
|
292
|
+
projectTarget: this.projectTarget,
|
|
293
|
+
assets: this.assets,
|
|
294
|
+
preview: this.previewProjection && { ...this.previewProjection, target: this.boundTarget().target, asset: this.hydrateAsset(this.previewProjection.asset) },
|
|
295
|
+
editorPreview: this.editorPreview() ? { target: this.editorPreview().target, asset: this.hydrateAsset(this.editorPreview().asset) } : null,
|
|
296
|
+
previews: this.previews().map((preview) => ({ target: preview.target, asset: this.hydrateAsset(preview.asset) })),
|
|
297
|
+
play: this.engine?.play ? { target: this.engine.play.target, phase: this.engine.play.phase } : null,
|
|
298
|
+
targetBinding: this.targetBinding,
|
|
299
|
+
inspection: this.inspection,
|
|
300
|
+
openRequest: this.openRequest,
|
|
301
|
+
resourceOpens: Object.fromEntries(this.resourceOpens),
|
|
302
|
+
sceneSelection: this.sceneSelection,
|
|
303
|
+
workspaceTargetLost: this.workspaceTargetLost
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
changed() {
|
|
307
|
+
const current = this.snapshot();
|
|
308
|
+
const fingerprint = workspaceUiFingerprint(current);
|
|
309
|
+
if (fingerprint === this.publishFingerprint) return;
|
|
310
|
+
this.revision += 1;
|
|
311
|
+
const state = this.snapshot();
|
|
312
|
+
this.publishFingerprint = workspaceUiFingerprint(state);
|
|
313
|
+
for (const listener of this.listeners) {
|
|
314
|
+
try {
|
|
315
|
+
listener(state);
|
|
316
|
+
} catch {
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
subscribe(listener) {
|
|
321
|
+
this.listeners.add(listener);
|
|
322
|
+
const state = this.snapshot();
|
|
323
|
+
this.publishFingerprint ||= workspaceUiFingerprint(state);
|
|
324
|
+
listener(state);
|
|
325
|
+
return () => this.listeners.delete(listener);
|
|
326
|
+
}
|
|
327
|
+
capabilities() {
|
|
328
|
+
const descriptions = this.toolApi?.list().filter((record) => record.callable && (record.owner.sourceId === ENGINE_SOURCE || record.descriptor.id.startsWith("view.display."))).map((record) => ({ id: record.descriptor.id.replace(/^(engine|view)\./, ""), path: record.descriptor.path, title: record.descriptor.title, summary: record.descriptor.summary, inputSchema: record.descriptor.inputSchema, outputSchema: record.descriptor.outputSchema })) ?? [];
|
|
329
|
+
const operations = [
|
|
330
|
+
...Object.keys(UI_OPERATIONS),
|
|
331
|
+
...descriptions.map((item) => item.id),
|
|
332
|
+
...VIEW_WORKSPACE_OPERATIONS.filter((id) => id.startsWith("plugins.") && this.toolApi?.describe(id, "view-backend").some((record) => record.callable))
|
|
333
|
+
].filter((id) => VIEW_WORKSPACE_OPERATIONS.includes(id));
|
|
334
|
+
return { ...workspaceCapabilities({ ready: !!this.engine && !this.disposing, headed: this.projectTarget?.headed === true, operations }), descriptions };
|
|
335
|
+
}
|
|
336
|
+
async authorizeRequest(request, caller) {
|
|
337
|
+
if (this.disposing) throw workspaceError("view-workspace-stopping", "View bindings to remain available", "Reconnect to the backend.");
|
|
338
|
+
if (request.token !== this.accessToken || this.authorize && !await this.authorize({ clientId: request.clientId, operation: request.operation, request, caller })) {
|
|
339
|
+
throw workspaceError("view-workspace-unauthorized", "an authorized workspace connection", "Connect with the issued token.", { clientId: request.clientId });
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
async call(rawRequest, { signal, caller } = {}) {
|
|
343
|
+
const request = assertWorkspaceRequest(rawRequest);
|
|
344
|
+
await this.authorizeRequest(request, caller);
|
|
345
|
+
const ui = UI_OPERATIONS[request.operation];
|
|
346
|
+
if (ui) return ui(this, request.args, { signal, caller, clientId: request.clientId });
|
|
347
|
+
if (request.operation === "project.reopen") {
|
|
348
|
+
return this.reopenProject(request.args, {
|
|
349
|
+
signal,
|
|
350
|
+
caller,
|
|
351
|
+
clientId: request.clientId,
|
|
352
|
+
token: request.token,
|
|
353
|
+
requestId: request.requestId
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
return this.invoke(request.operation, request.args, { signal, caller, clientId: request.clientId, token: request.token, requestId: request.requestId });
|
|
357
|
+
}
|
|
358
|
+
async invoke(operation, args = {}, { signal, caller, clientId = "view-owner", token, requestId } = {}) {
|
|
359
|
+
const { tabId, ...input } = args;
|
|
360
|
+
if (tabId !== void 0) this.assertWorkspaceTab(tabId);
|
|
361
|
+
const inspector = operation.startsWith("plugins.");
|
|
362
|
+
const presentation = operation.startsWith("display.");
|
|
363
|
+
const id = inspector ? operation : `${presentation ? "view" : "engine"}.${operation}`;
|
|
364
|
+
const sourceId = inspector || presentation ? "view-backend" : ENGINE_SOURCE;
|
|
365
|
+
const owner = this.toolApi?.describe(id, sourceId).find((record) => record.callable)?.owner;
|
|
366
|
+
if (!owner) throw workspaceError("view-workspace-operation-unavailable", `Engine operation ${operation} to be installed`, "Enable the Engine capability; UI plugins do not provide domain APIs.", { operation });
|
|
367
|
+
const requestedPreview = [...this.previews(), this.engine?.play].find((preview) => preview?.target.targetId === input.targetId);
|
|
368
|
+
const terminal = await this.toolApi.run(id, inspector ? {
|
|
369
|
+
apiVersion: "forgeax.view.inspector/1",
|
|
370
|
+
operation,
|
|
371
|
+
args: input,
|
|
372
|
+
...input,
|
|
373
|
+
clientId,
|
|
374
|
+
token,
|
|
375
|
+
requestId
|
|
376
|
+
} : presentation ? input : { ...input, clientId }, { sourceId, providerId: owner.providerId, generation: owner.generation, caller, signal }).terminal;
|
|
377
|
+
if (terminal.outcome === "failed") {
|
|
378
|
+
const resolved = resolveWorkspaceFailure(terminal.failure);
|
|
379
|
+
const addressesWorkspace = input.targetId === void 0 || [this.projectTarget, this.editorPreview()?.target].some((target) => target && target.targetId === input.targetId && (input.targetGeneration === void 0 || target.generation === input.targetGeneration));
|
|
380
|
+
if (isWorkspaceTargetRecoveryCode(resolved.code) && addressesWorkspace) {
|
|
381
|
+
this.workspaceTargetLost = true;
|
|
382
|
+
}
|
|
383
|
+
this.changed();
|
|
384
|
+
throw workspaceError(resolved.code, resolved.expected, resolved.hint, resolved.detail);
|
|
385
|
+
}
|
|
386
|
+
const result = terminal.result;
|
|
387
|
+
if (Array.isArray(result?.assets)) this.assets = result.assets.map((asset) => serializeWorkspaceAsset({ ...asset, ...asset.ddc || !asset.cookReceiptUrl ? {} : { ddc: { receiptUrl: asset.cookReceiptUrl } } }));
|
|
388
|
+
if (result?.inspection) this.inspection = serializeWorkspaceInspection(result.inspection);
|
|
389
|
+
if (operation === "asset.open") this.bindOpenedAsset(result, input.guid);
|
|
390
|
+
if (operation === "preview.close" && input.targetId != null && String(input.targetId) === this.editorTargetId) {
|
|
391
|
+
this.editorTargetId = void 0;
|
|
392
|
+
}
|
|
393
|
+
this.syncBindings();
|
|
394
|
+
if (operation === "asset.open") this.recordOpenRequest({ requestId, result, guid: input.guid });
|
|
395
|
+
if ((operation.startsWith("camera.") || operation === "target.control") && this.previewProjection && this.boundTarget() === requestedPreview) {
|
|
396
|
+
this.previewProjection.camera = result?.camera;
|
|
397
|
+
this.previewProjection.cameraVersion = result?.version;
|
|
398
|
+
this.previewProjection.interaction = result?.interaction ?? null;
|
|
399
|
+
}
|
|
400
|
+
if (!["scene-tree.get", "entity.inspect", "workspace.get", "preview.capture"].includes(operation)) this.changed();
|
|
401
|
+
if (["project.open", "project.close", "project.reopen", "asset.open", "preview.close", "camera.abort", "play.start", "play.ready", "play.stop"].includes(operation)) {
|
|
402
|
+
if (operation === "project.open" || operation === "project.reopen") this.workspaceTargetLost = false;
|
|
403
|
+
return this.snapshot();
|
|
404
|
+
}
|
|
405
|
+
if (operation.startsWith("camera.")) return { ...cloneWorkspaceValue(result), apiVersion: VIEW_WORKSPACE_API_VERSION, target: requestedPreview?.target };
|
|
406
|
+
if (operation === "assets.list") return { ...cloneWorkspaceValue(result), assets: this.assets };
|
|
407
|
+
return cloneWorkspaceValue(result);
|
|
408
|
+
}
|
|
409
|
+
assertWorkspaceTab(tabId) {
|
|
410
|
+
requireWorkspaceString(tabId, "tabId");
|
|
411
|
+
if (tabId !== VIEW_WORKSPACE_TAB_ID) throw workspaceError("view-workspace-tab-read-only", "the Editor binding", "Address AI execution through the Engine run API.", { tabId });
|
|
412
|
+
}
|
|
413
|
+
selectTab({ tabId } = {}) {
|
|
414
|
+
if (![VIEW_DISPLAY_TAB_ID, VIEW_WORKSPACE_TAB_ID].includes(tabId)) throw workspaceError("view-workspace-tab-not-found", "an existing tab", "Refresh tabs.get.", { tabId });
|
|
415
|
+
this.selectedTabId = tabId;
|
|
416
|
+
this.changed();
|
|
417
|
+
return this.snapshot();
|
|
418
|
+
}
|
|
419
|
+
async selectSceneEntity(args = {}, context) {
|
|
420
|
+
requireWorkspaceString(args.entityId, "entityId");
|
|
421
|
+
return this.changeSceneSelection(args, context, () => args);
|
|
422
|
+
}
|
|
423
|
+
pickSceneEntity(args = {}, context) {
|
|
424
|
+
return this.changeSceneSelection(args, context, async (requestContext) => {
|
|
425
|
+
const result = await this.invoke("target.pick", args, requestContext);
|
|
426
|
+
if (result?.entityId === null) return null;
|
|
427
|
+
requireWorkspaceString(result?.entityId, "pick.entityId");
|
|
428
|
+
return { entityId: result.entityId };
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
clearSceneSelection(args = {}, context) {
|
|
432
|
+
return this.changeSceneSelection(args, context, () => null);
|
|
433
|
+
}
|
|
434
|
+
async changeSceneSelection({ tabId, targetId, targetGeneration } = {}, context, resolveSelection) {
|
|
435
|
+
if (tabId !== void 0) this.assertWorkspaceTab(tabId);
|
|
436
|
+
this.syncBindings();
|
|
437
|
+
const requested = this.boundTarget();
|
|
438
|
+
if (!requested || requested.target.targetId !== targetId || requested.target.generation !== targetGeneration) throw workspaceError("view-workspace-selection-stale", "The bound target and generation", "Select the target before changing its selection.");
|
|
439
|
+
this.selectionAbort?.abort();
|
|
440
|
+
const controller = new AbortController();
|
|
441
|
+
this.selectionAbort = controller;
|
|
442
|
+
const signal = context?.signal ? AbortSignal.any([context.signal, controller.signal]) : controller.signal;
|
|
443
|
+
const requestContext = { ...context, signal };
|
|
444
|
+
const assertCurrent = () => {
|
|
445
|
+
signal.throwIfAborted();
|
|
446
|
+
if (this.boundTarget() !== requested) throw workspaceError("view-workspace-selection-stale", "The same selected target", "Refresh the hierarchy.");
|
|
447
|
+
};
|
|
448
|
+
const selection = await resolveSelection(requestContext);
|
|
449
|
+
assertCurrent();
|
|
450
|
+
const { entityId, label } = selection ?? {};
|
|
451
|
+
if (selection) {
|
|
452
|
+
const result = await this.invoke("entity.inspect", { entityId, targetId, targetGeneration }, requestContext);
|
|
453
|
+
assertCurrent();
|
|
454
|
+
if (result?.entityId !== entityId) throw workspaceError(
|
|
455
|
+
"view-workspace-selection-stale",
|
|
456
|
+
"The inspected entity on the same target",
|
|
457
|
+
"Refresh the hierarchy before selecting."
|
|
458
|
+
);
|
|
459
|
+
}
|
|
460
|
+
await this.invoke("entity.highlight", { ...selection ? { entityId } : {}, targetId, targetGeneration }, requestContext);
|
|
461
|
+
assertCurrent();
|
|
462
|
+
this.sceneSelection = selection ? { primary: { entityId, ...label === void 0 ? {} : { label: String(label) } }, targetId, targetGeneration } : null;
|
|
463
|
+
this.changed();
|
|
464
|
+
return this.snapshot();
|
|
465
|
+
}
|
|
466
|
+
openProject(args, context) {
|
|
467
|
+
return this.invoke("project.open", args, context);
|
|
468
|
+
}
|
|
469
|
+
async reopenProject(args = {}, context) {
|
|
470
|
+
const root = resolveWorkspaceReopenRoot(this.snapshot(), args.root);
|
|
471
|
+
const { tabId, ...rest } = args;
|
|
472
|
+
return this.openProject({ ...rest, root, ...tabId === void 0 ? {} : { tabId } }, context);
|
|
473
|
+
}
|
|
474
|
+
closeProject(args, context) {
|
|
475
|
+
return this.invoke("project.close", args, context);
|
|
476
|
+
}
|
|
477
|
+
listAssets(args, context) {
|
|
478
|
+
return this.invoke("assets.list", args, context);
|
|
479
|
+
}
|
|
480
|
+
inspectAsset(args, context) {
|
|
481
|
+
return this.invoke("asset.inspect", args, context);
|
|
482
|
+
}
|
|
483
|
+
rebuildAssetSource(args, { mode = "rebuild", ...context } = {}) {
|
|
484
|
+
return this.invoke(`asset-source.${mode}`, args, context);
|
|
485
|
+
}
|
|
486
|
+
bindOpenedAsset(result, guid) {
|
|
487
|
+
this.targetBinding = "editor";
|
|
488
|
+
const kind = this.hydrateAsset(result?.preview?.asset)?.kind ?? this.hydrateAsset(result?.asset)?.kind ?? this.assets?.find((entry) => entry?.guid === guid)?.kind;
|
|
489
|
+
if (kind && !isTypePreviewAsset({ kind })) {
|
|
490
|
+
const targetId = result?.preview?.target?.targetId ?? result?.target?.targetId ?? this.previews().find((entry) => this.hydrateAsset(entry.asset)?.guid === guid)?.target?.targetId;
|
|
491
|
+
if (targetId != null) {
|
|
492
|
+
this.editorTargetId = String(targetId);
|
|
493
|
+
this.previewTargetId = this.editorTargetId;
|
|
494
|
+
}
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
497
|
+
const editorId = this.editorPreview()?.target?.targetId;
|
|
498
|
+
if (editorId !== void 0) this.previewTargetId = editorId;
|
|
499
|
+
}
|
|
500
|
+
recordOpenRequest({ requestId, result, guid } = {}) {
|
|
501
|
+
const requested = typeof guid === "string" && guid.trim() !== "" ? guid : void 0;
|
|
502
|
+
const editor = this.editorPreview();
|
|
503
|
+
const editorIds = editorSceneTargetIds(
|
|
504
|
+
this.classifiedPreviews(),
|
|
505
|
+
editor ? { target: editor.target, asset: this.hydrateAsset(editor.asset) } : void 0
|
|
506
|
+
);
|
|
507
|
+
const extras = this.previews().filter(
|
|
508
|
+
(entry) => entry?.target?.targetId && !editorIds.has(String(entry.target.targetId))
|
|
509
|
+
);
|
|
510
|
+
const preview = [result?.preview, ...extras].find(
|
|
511
|
+
(entry) => entry?.target && !editorIds.has(String(entry.target.targetId)) && (!entry.asset || requested === void 0 || entry.asset.guid === requested)
|
|
512
|
+
);
|
|
513
|
+
const catalogAsset = requested && Array.isArray(this.assets) ? this.assets.find((entry) => entry?.guid === requested && entry?.kind) : void 0;
|
|
514
|
+
const asset = [
|
|
515
|
+
this.hydrateAsset(result?.preview?.asset),
|
|
516
|
+
this.hydrateAsset(result?.asset),
|
|
517
|
+
this.hydrateAsset(preview?.asset),
|
|
518
|
+
catalogAsset
|
|
519
|
+
].find(
|
|
520
|
+
(candidate) => candidate?.guid && candidate?.kind && (requested === void 0 || candidate.guid === requested)
|
|
521
|
+
);
|
|
522
|
+
if (!asset?.guid || !asset?.kind) {
|
|
523
|
+
logResourceOpen("open-request-skipped", {
|
|
524
|
+
reason: "asset-kind-unavailable",
|
|
525
|
+
requested: requested ?? null,
|
|
526
|
+
resultPreview: summarizeResourceAsset(result?.preview?.asset),
|
|
527
|
+
resultAsset: summarizeResourceAsset(result?.asset),
|
|
528
|
+
extraPreview: summarizeResourceAsset(preview?.asset),
|
|
529
|
+
extraPreviewCount: extras.length,
|
|
530
|
+
catalog: summarizeResourceAsset(catalogAsset),
|
|
531
|
+
editorTargetId: this.editorTargetId ?? null
|
|
532
|
+
}, { level: "warn" });
|
|
533
|
+
return;
|
|
534
|
+
}
|
|
535
|
+
this.openRequestSequence += 1;
|
|
536
|
+
const inspection = result?.inspection?.guid === asset.guid ? result.inspection : this.inspection?.guid === asset.guid ? this.inspection : void 0;
|
|
537
|
+
const previewMatches = preview?.target && (!preview.asset || preview.asset.guid === asset.guid);
|
|
538
|
+
const recordedPreview = previewMatches ? { asset, target: preview.target } : void 0;
|
|
539
|
+
this.openRequest = serializeWorkspaceOpenRequest({
|
|
540
|
+
requestId: typeof requestId === "string" && requestId.trim() !== "" ? requestId : createWorkspaceId("open"),
|
|
541
|
+
sequence: this.openRequestSequence,
|
|
542
|
+
asset,
|
|
543
|
+
preview: recordedPreview,
|
|
544
|
+
...inspection === void 0 ? {} : { inspection }
|
|
545
|
+
});
|
|
546
|
+
this.resourceOpens.set(asset.kind, {
|
|
547
|
+
asset,
|
|
548
|
+
preview: recordedPreview
|
|
549
|
+
});
|
|
550
|
+
logResourceOpen("open-request-recorded", {
|
|
551
|
+
requestId: this.openRequest.requestId,
|
|
552
|
+
sequence: this.openRequest.sequence,
|
|
553
|
+
asset: summarizeResourceAsset(this.openRequest.asset),
|
|
554
|
+
hasPreview: Boolean(this.openRequest.preview?.target),
|
|
555
|
+
previewTargetId: this.openRequest.preview?.target?.targetId ?? null
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
openAsset(args, context) {
|
|
559
|
+
return this.invoke("asset.open", args, context);
|
|
560
|
+
}
|
|
561
|
+
closePreview(args, context) {
|
|
562
|
+
return this.invoke("preview.close", args, context);
|
|
563
|
+
}
|
|
564
|
+
capture(args, context) {
|
|
565
|
+
return this.invoke("preview.capture", args, context);
|
|
566
|
+
}
|
|
567
|
+
resizePreview(args, context) {
|
|
568
|
+
return this.invoke("preview.resize", args, context);
|
|
569
|
+
}
|
|
570
|
+
getCamera(args, context) {
|
|
571
|
+
return this.invoke("camera.get", args, context);
|
|
572
|
+
}
|
|
573
|
+
beginCamera(args, context) {
|
|
574
|
+
return this.invoke("camera.begin", { ...args, interactionId: args.interactionId ?? randomUUID() }, context);
|
|
575
|
+
}
|
|
576
|
+
updateCamera(args, context) {
|
|
577
|
+
return this.invoke("camera.update", args, context);
|
|
578
|
+
}
|
|
579
|
+
commitCamera(args, context) {
|
|
580
|
+
return this.invoke("camera.commit", args, context);
|
|
581
|
+
}
|
|
582
|
+
abortCamera(args, context) {
|
|
583
|
+
return this.invoke("camera.abort", args, context);
|
|
584
|
+
}
|
|
585
|
+
getSceneTree(args, context) {
|
|
586
|
+
return this.invoke("scene-tree.get", args, context);
|
|
587
|
+
}
|
|
588
|
+
async revokeConnection(connectionId) {
|
|
589
|
+
if (typeof connectionId !== "string") return;
|
|
590
|
+
for (const preview of [this.engine?.preview, this.engine?.play]) {
|
|
591
|
+
if (!preview) continue;
|
|
592
|
+
try {
|
|
593
|
+
const result = await preview.revokeConnection?.({ targetId: preview.target.targetId, connectionId });
|
|
594
|
+
this.syncBindings();
|
|
595
|
+
if (this.previewOwner === preview && this.previewProjection && result) {
|
|
596
|
+
this.previewProjection.interaction = result.interaction ?? null;
|
|
597
|
+
this.previewProjection.cameraVersion = result.version;
|
|
598
|
+
}
|
|
599
|
+
} catch {
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
this.changed();
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* Reset per-page UI session state when a new View frontend page is admitted.
|
|
606
|
+
* The open project and its Engine session stay; everything the previous page
|
|
607
|
+
* accumulated after project.open returns to the just-opened state, so a
|
|
608
|
+
* refreshed page's first snapshot does not inherit the old page's history.
|
|
609
|
+
*/
|
|
610
|
+
resetPageSession() {
|
|
611
|
+
if (this.disposing) return;
|
|
612
|
+
this.selectedTabId = VIEW_WORKSPACE_TAB_ID;
|
|
613
|
+
this.targetBinding = "editor";
|
|
614
|
+
this.previewTargetId = void 0;
|
|
615
|
+
this.inspection = null;
|
|
616
|
+
this.openRequest = null;
|
|
617
|
+
this.openRequestSequence = 0;
|
|
618
|
+
this.resourceOpens = /* @__PURE__ */ new Map();
|
|
619
|
+
this.sceneSelection = null;
|
|
620
|
+
this.selectionAbort?.abort();
|
|
621
|
+
this.selectionAbort = void 0;
|
|
622
|
+
this.previewOwner = void 0;
|
|
623
|
+
this.syncBindings();
|
|
624
|
+
this.changed();
|
|
625
|
+
const project = this.project;
|
|
626
|
+
if (project) {
|
|
627
|
+
void this.invoke("assets.list", { projectId: project.id }).catch(() => {
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
registerTransport(transport, { routeThroughTools = false } = {}) {
|
|
632
|
+
const capabilities = transport.register(VIEW_WORKSPACE_SERVICES.capabilities, () => this.capabilities());
|
|
633
|
+
const call = transport.register(VIEW_WORKSPACE_SERVICES.call, async ({ payload, signal, caller }) => {
|
|
634
|
+
try {
|
|
635
|
+
return routeThroughTools ? await runWorkspaceToolApi(this.toolApi, {
|
|
636
|
+
operation: `view.workspace.${payload.operation}`,
|
|
637
|
+
args: payload.args,
|
|
638
|
+
clientId: payload.clientId,
|
|
639
|
+
token: payload.token,
|
|
640
|
+
requestId: payload.requestId,
|
|
641
|
+
caller,
|
|
642
|
+
signal,
|
|
643
|
+
sourceId: "view-workspace"
|
|
644
|
+
}) : await this.call(payload, { signal, caller });
|
|
645
|
+
} catch (error) {
|
|
646
|
+
if (!error.code?.startsWith("view-")) throw error;
|
|
647
|
+
throw Object.assign(new Error(error.message), {
|
|
648
|
+
name: "HostAssemblyError",
|
|
649
|
+
code: "host-transport-failure",
|
|
650
|
+
expected: error.expected,
|
|
651
|
+
hint: error.hint,
|
|
652
|
+
detail: { ...error.detail, remoteCode: error.code }
|
|
653
|
+
});
|
|
654
|
+
}
|
|
655
|
+
});
|
|
656
|
+
const fileGet = transport.register(VIEW_FILE_GET_SERVICE, async ({ payload }) => {
|
|
657
|
+
try {
|
|
658
|
+
return await readWorkspaceFilePreview(this, payload);
|
|
659
|
+
} catch (error) {
|
|
660
|
+
if (!error.code?.startsWith("view-")) throw error;
|
|
661
|
+
throw Object.assign(new Error(error.message), {
|
|
662
|
+
name: "HostAssemblyError",
|
|
663
|
+
code: "host-transport-failure",
|
|
664
|
+
expected: error.expected,
|
|
665
|
+
hint: error.hint,
|
|
666
|
+
detail: { ...error.detail, remoteCode: error.code }
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
});
|
|
670
|
+
const subscription = this.subscribe((state) => transport.publish(VIEW_WORKSPACE_STATE_TOPIC, state));
|
|
671
|
+
const observer = transport.connect();
|
|
672
|
+
const engineSubscription = observer.subscribe("engine.workspace.state", () => this.changed());
|
|
673
|
+
return () => {
|
|
674
|
+
capabilities();
|
|
675
|
+
call();
|
|
676
|
+
fileGet();
|
|
677
|
+
subscription();
|
|
678
|
+
engineSubscription();
|
|
679
|
+
observer.close();
|
|
680
|
+
};
|
|
681
|
+
}
|
|
682
|
+
async dispose() {
|
|
683
|
+
this.selectionAbort?.abort();
|
|
684
|
+
this.disposing = true;
|
|
685
|
+
this.listeners.clear();
|
|
686
|
+
}
|
|
687
|
+
};
|
|
688
|
+
|
|
689
|
+
export {
|
|
690
|
+
ViewWorkspaceBroker
|
|
691
|
+
};
|
|
692
|
+
//# sourceMappingURL=chunk-C45U6IIY.mjs.map
|