@volter/game-editor 0.5.139 → 0.5.140
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/BUNDLED_NOTICES +22 -22
- package/catalog/entries/blender.json +2 -2
- package/catalog/entries/music.json +2 -2
- package/dist/.vite/manifest.json +2148 -2148
- package/dist/assets/{AssetBudgetPanel-CjuDQvXh.js → AssetBudgetPanel-DWGN3OlQ.js} +3 -3
- package/dist/assets/{AudioViewer-CNqYeRNi.js → AudioViewer-CdIahXgn.js} +1 -1
- package/dist/assets/{CanvasBoardDocument-CmNuR9ae.js → CanvasBoardDocument-C8dSgA6Q.js} +1 -1
- package/dist/assets/{CanvasSceneViewport-DvTkPUgn.js → CanvasSceneViewport-B-FHrE3W.js} +1 -1
- package/dist/assets/{ColorInput-BwQW6U_s.js → ColorInput-CNmM7uhc.js} +1 -1
- package/dist/assets/{ColorPicker-BW6cWcGu.js → ColorPicker-ClJhDMrd.js} +1 -1
- package/dist/assets/{EntityModelDocument-B45uREqB.js → EntityModelDocument-Iuersc82.js} +1 -1
- package/dist/assets/{EnvironmentAssetDocument-8F0JNdiM.js → EnvironmentAssetDocument-DSUsIKHk.js} +1 -1
- package/dist/assets/{GameplaySessionTimeline-fGpjyiDW.js → GameplaySessionTimeline-C8rekqEj.js} +1 -1
- package/dist/assets/{ImageViewer-lE0hupl1.js → ImageViewer-CEQt9xV_.js} +1 -1
- package/dist/assets/InspectorObjectPreview-BHC4_U77.js +1 -0
- package/dist/assets/{JsonAssetDocument-BzW0mX2D.js → JsonAssetDocument-WEaidEZD.js} +1 -1
- package/dist/assets/{LiveModuleDocument-C4KOPaQ2.js → LiveModuleDocument-DC4ZcFRm.js} +1 -1
- package/dist/assets/{LutAssetDocument-DM8eFFMW.js → LutAssetDocument-CakxtPVB.js} +1 -1
- package/dist/assets/{ModelAssetDocument-B66Nc9mt.js → ModelAssetDocument-JYZvc7TA.js} +1 -1
- package/dist/assets/{NonThreeAuthoringBootstrap-BNAfKZfR.js → NonThreeAuthoringBootstrap-mt7c9Sg1.js} +1 -1
- package/dist/assets/{Object3DDocumentToolbar-CPWckRgr.js → Object3DDocumentToolbar-C4dxMkDw.js} +1 -1
- package/dist/assets/Object3DDocumentViewport-DwMMMgSM.js +2 -0
- package/dist/assets/{Object3DPreview-36lk0UIE.js → Object3DPreview-CO7mpCGx.js} +1 -1
- package/dist/assets/{OnlineAssetDetail-B9BScq83.js → OnlineAssetDetail-C-gtOXj4.js} +1 -1
- package/dist/assets/{PlayBar-DEZQZ-nr.js → PlayBar-DdWvT5u1.js} +1 -1
- package/dist/assets/{QuarksAssetDocument-BLOfOnE3.js → QuarksAssetDocument-j3hfbhLZ.js} +1 -1
- package/dist/assets/{ReactCanvasControls-B1FLc-mq.js → ReactCanvasControls-DVgX-UWP.js} +1 -1
- package/dist/assets/{RootSelectionOverlay-DM1Rf518.js → RootSelectionOverlay-C0kepTGv.js} +1 -1
- package/dist/assets/{ShaderAssetDocument-BXbdllfL.js → ShaderAssetDocument-BR0jX7eY.js} +1 -1
- package/dist/assets/{ShadowEditor-_VQupFN-.js → ShadowEditor-DllgEu0Y.js} +1 -1
- package/dist/assets/{SourceAssetViewer-DMgNpg0D.js → SourceAssetViewer-Cc3A-Rec.js} +1 -1
- package/dist/assets/{StageHost-ludQj81x.js → StageHost-BL5InAk2.js} +2 -2
- package/dist/assets/{StoryPreviewMount-DUnK9kFG.js → StoryPreviewMount-CG33WLB2.js} +1 -1
- package/dist/assets/{ThreeBoardDocument-CE4_ot0k.js → ThreeBoardDocument-CJ6un0sv.js} +2 -2
- package/dist/assets/{ThreeIsolationSceneContent-BOLqBhuv.js → ThreeIsolationSceneContent-gueQ11Hc.js} +1 -1
- package/dist/assets/{ToolObject3DPreview-CFpKP0XW.js → ToolObject3DPreview-B8HYxSFO.js} +1 -1
- package/dist/assets/{Toolbar-Bp9rS6kO.js → Toolbar-arI-GG_2.js} +1 -1
- package/dist/assets/{TransientHint-DBoWuJlJ.js → TransientHint-BpJMrULv.js} +1 -1
- package/dist/assets/{VideoViewer-CFyD9Kgi.js → VideoViewer-DiEMvgST.js} +1 -1
- package/dist/assets/{ViewportShadingMenu-BkqTtt1s.js → ViewportShadingMenu-B6rikVPs.js} +1 -1
- package/dist/assets/{active-ingest-UClxAck1.js → active-ingest-WiOnIb6i.js} +2 -2
- package/dist/assets/{animation-clock-DL7eB0yc.js → animation-clock-BkfCbco6.js} +1 -1
- package/dist/assets/{animation-mixers.service-53pK8xiS.js → animation-mixers.service-BQ8x65Fd.js} +1 -1
- package/dist/assets/{animation-timeline.utility-7M6hGJn-.js → animation-timeline.utility-Cc7D9jVl.js} +1 -1
- package/dist/assets/{asset-budget-asset.menu-DS7nTJj-.js → asset-budget-asset.menu-Dr6RZuh1.js} +1 -1
- package/dist/assets/{asset-budget.action-CLLlqLpV.js → asset-budget.action-DFDNPJ78.js} +1 -1
- package/dist/assets/{asset-budget.document-CBj__W_j.js → asset-budget.document-CoMoILX4.js} +1 -1
- package/dist/assets/{asset-budget.menu-Dpit56eW.js → asset-budget.menu-CK3du9Vi.js} +1 -1
- package/dist/assets/{asset-editor-persistence-Bug7RRIw.js → asset-editor-persistence-CtXE9oPt.js} +1 -1
- package/dist/assets/{asset-loaders-D6nZhO7W.js → asset-loaders-CYuccE4X.js} +1 -1
- package/dist/assets/{asset-preview-DuK7on8l.js → asset-preview-UQDiDe_x.js} +1 -1
- package/dist/assets/{audio-unlock.service-B4S6nX06.js → audio-unlock.service-CyXPYFsB.js} +1 -1
- package/dist/assets/{audio.utility-BpuEWRtk.js → audio.utility-Dy2wznNC.js} +1 -1
- package/dist/assets/autoplay.service-LryumvVF.js +1 -0
- package/dist/assets/{babylon-authoring-adapter-DUiLnYTl.js → babylon-authoring-adapter-Cjfxu6jG.js} +1 -1
- package/dist/assets/{binding-resolver-D9Q2MV2d.js → binding-resolver-ETBlwCN5.js} +2 -2
- package/dist/assets/{blender-node-editor.document-CM46THXO.js → blender-node-editor.document-BVov1S8T.js} +1 -1
- package/dist/assets/{blender-properties-tab-DsmyRjvf.js → blender-properties-tab-Dt18HHnb.js} +1 -1
- package/dist/assets/{blender-runtime-host-CzU1tMpu.js → blender-runtime-host-BPtnCBwU.js} +1 -1
- package/dist/assets/{blender-runtime-skin-Cym5LZv7.js → blender-runtime-skin-C8MVrOS0.js} +60 -57
- package/dist/assets/{blender-runtime.document-BALwDLT4.js → blender-runtime.document-D8KZ7HkU.js} +1 -1
- package/dist/assets/{blender-screenshot.menu-DFKYLZFA.js → blender-screenshot.menu-bSsC-Nu3.js} +1 -1
- package/dist/assets/{blender-timeline.document-jaXu4ErX.js → blender-timeline.document-D6LpN2Wf.js} +1 -1
- package/dist/assets/{blender-uv-editor.document-CR8chOjw.js → blender-uv-editor.document-JaC-MJ97.js} +1 -1
- package/dist/assets/{blender-version.status-BMvh4Fb7.js → blender-version.status-DRwbDXWa.js} +1 -1
- package/dist/assets/{blender.command-2ZCwq83N.js → blender.command-Csm36pDQ.js} +1 -1
- package/dist/assets/{board-guides-B9_M1_yw.js → board-guides-DqmvE-Y5.js} +1 -1
- package/dist/assets/{bridge.command-CY4biuRb.js → bridge.command-xu6y-MpE.js} +3 -3
- package/dist/assets/{browserAll-BJ6HgrrM.js → browserAll-Bws4u8cq.js} +1 -1
- package/dist/assets/{build-player.document-yfN6ppi_.js → build-player.document-DDSXSvyF.js} +1 -1
- package/dist/assets/{build-profiles.document-C78x96wQ.js → build-profiles.document-DY2eWBsF.js} +1 -1
- package/dist/assets/{build-progress.status-CRH236cv.js → build-progress.status-0zPx4Gv5.js} +1 -1
- package/dist/assets/{build-session-B-jVkhsK.js → build-session-XI3TaSa5.js} +1 -1
- package/dist/assets/{build.action-CaOwQVWx.js → build.action-CLJvQMcj.js} +1 -1
- package/dist/assets/{build.command-TZ1XDxzG.js → build.command-DVTutDQb.js} +1 -1
- package/dist/assets/{build.header-uSfplnt6.js → build.header-Bxmedl9y.js} +1 -1
- package/dist/assets/{build.menu-BaFMcWMc.js → build.menu-D5uLWsyh.js} +1 -1
- package/dist/assets/{build.service-Cev-zNra.js → build.service-DhX8zMuZ.js} +1 -1
- package/dist/assets/{camera-Bno1KyTP.js → camera-DxvGFUDv.js} +1 -1
- package/dist/assets/{camera-runtime.inspector-D86JI7ys.js → camera-runtime.inspector-CZvWcLdS.js} +1 -1
- package/dist/assets/{canvas-design-mount-C2Taz437.js → canvas-design-mount-Bg83R_C-.js} +3 -3
- package/dist/assets/{canvas-entry-runtime-Bfp_EKOs.js → canvas-entry-runtime-BUBdXy3i.js} +2 -2
- package/dist/assets/{canvas-preview-frames-CzoYoSt0.js → canvas-preview-frames-D3V0SROm.js} +1 -1
- package/dist/assets/{canvas-story-capture.service-B_8qdRMx.js → canvas-story-capture.service-WG2OUJpg.js} +2 -2
- package/dist/assets/{capability-coverage-DzW3P6PB.js → capability-coverage-DI6VigfO.js} +1 -1
- package/dist/assets/{collaboration-presence-D56QA1uu.js → collaboration-presence-DY2C47tH.js} +1 -1
- package/dist/assets/{collider-2ycsuTVp.js → collider-BtrzK5a6.js} +1 -1
- package/dist/assets/{component-board.service-qLwbD7ZX.js → component-board.service-BJtF2VpY.js} +2 -2
- package/dist/assets/{component-board.service-Cgr3rV5m.js → component-board.service-CJRTJbiv.js} +2 -2
- package/dist/assets/{component-board.service-CMSPFS7M.js → component-board.service-D9yyEurR.js} +2 -2
- package/dist/assets/{component-contracts.service-DaycBgEy.js → component-contracts.service-CV9wjsvA.js} +1 -1
- package/dist/assets/{component-instance-root-BtcOmix2.js → component-instance-root-CepkVtbC.js} +1 -1
- package/dist/assets/{component-verbs.command-CgASCZ_i.js → component-verbs.command-CP1pcLUp.js} +1 -1
- package/dist/assets/{component-verbs.service-MYm0Fubr.js → component-verbs.service-DrDgvrrV.js} +1 -1
- package/dist/assets/{config-DAHx_OTe.js → config-BLcV-37x.js} +2 -2
- package/dist/assets/{configurations-B_3y0ROf.js → configurations-DkpjxykF.js} +1 -1
- package/dist/assets/{connection.status-DdvXX0nH.js → connection.status-ydR9WL91.js} +1 -1
- package/dist/assets/{constraints.inspector-BEYExuvJ.js → constraints.inspector-BWAgwZd7.js} +1 -1
- package/dist/assets/{content-bounds-uy3hDTXw.js → content-bounds-BwFXf1z8.js} +1 -1
- package/dist/assets/{contract-system-adapters-DbOhqD2p.js → contract-system-adapters-ehl3b6j5.js} +1 -1
- package/dist/assets/{coverage.service-3wf81o3O.js → coverage.service-CfSLRO7r.js} +1 -1
- package/dist/assets/{create-runtime-B_RHkiy2.js → create-runtime-aPquSEVh.js} +1 -1
- package/dist/assets/{curve-Cbvp5PDK.js → curve-LjVM3HWJ.js} +1 -1
- package/dist/assets/{data-asset-S-DmCs5W.js → data-asset-BEIW84Q8.js} +1 -1
- package/dist/assets/{data-ref-Bkfs_TKL.js → data-ref-uCfRLv63.js} +1 -1
- package/dist/assets/{debug-bridge-Dw_lsP-r.js → debug-bridge-DIkYjeyy.js} +1 -1
- package/dist/assets/{debug-registry-BhFgg7r8.js → debug-registry-C_ZJrrrl.js} +1 -1
- package/dist/assets/{deferred-ingest-play-BV2x0R2h.js → deferred-ingest-play-B0qyAS35.js} +2 -2
- package/dist/assets/{design-time-canvas-mount-Dt2zC5Ld.js → design-time-canvas-mount-BqZ2bX-V.js} +2 -2
- package/dist/assets/{design-time-layers-Bx9HWC84.js → design-time-layers-B-vj9EfS.js} +1 -1
- package/dist/assets/{design-time-mount.service-bOSnO2Tq.js → design-time-mount.service-DyO6z2n2.js} +2 -2
- package/dist/assets/{design-time-mount.service-DRCUW2Mi.js → design-time-mount.service-gfkg0U6S.js} +2 -2
- package/dist/assets/{design-time-react-mount-B5uOG0H7.js → design-time-react-mount-gWxpOtuF.js} +1 -1
- package/dist/assets/{document-preview-three-BfnCwrpV.js → document-preview-three-Bkr_OgxA.js} +1 -1
- package/dist/assets/{dom-authoring-adapter-BSC2MYSr.js → dom-authoring-adapter-DPVWJ2tL.js} +1 -1
- package/dist/assets/{draco3d-Dyoe3IcD.js → draco3d-Bj2UkF1i.js} +1 -1
- package/dist/assets/{edit-mode-audio.service-CoCle552.js → edit-mode-audio.service-C0q8GE6R.js} +1 -1
- package/dist/assets/{edit-mode-authoring-B2Kesn9N.js → edit-mode-authoring-CN2UHQ1D.js} +1 -1
- package/dist/assets/{edit-mode-networking.service-DtyT4MnP.js → edit-mode-networking.service-CBk2-_vE.js} +1 -1
- package/dist/assets/{editor-api-D2w0Wuf7.js → editor-api-C26In4DR.js} +1 -1
- package/dist/assets/{editor-layers-dgmb9OkA.js → editor-layers-BPRVuL8j.js} +1 -1
- package/dist/assets/{editor-shell-store-OpESIM4a.js → editor-shell-store-Bg5om3l7.js} +1 -1
- package/dist/assets/{entity-object-B79hRIdx.js → entity-object-CDJODRTe.js} +1 -1
- package/dist/assets/{extend-DCwSMDqN.js → extend-Xj5LNCQp.js} +1 -1
- package/dist/assets/{fork-menu-VNthv9S2.js → fork-menu-C3ohxZRs.js} +1 -1
- package/dist/assets/{frame-debugger-store-Ljo9g747.js → frame-debugger-store-BEWWTgcn.js} +1 -1
- package/dist/assets/{game-contract-seams-DUJgCAbE.js → game-contract-seams-D79dC6Zb.js} +1 -1
- package/dist/assets/{game-css-scope-transform-CuwV1R3U.js → game-css-scope-transform-rwyMhBnJ.js} +1 -1
- package/dist/assets/{game-document.service-CgOMkodb.js → game-document.service-BD_OtFlt.js} +1 -1
- package/dist/assets/{game-eval.command-DqFJazUI.js → game-eval.command-uCCO65AB.js} +1 -1
- package/dist/assets/{game-module-access-DLq6IxVQ.js → game-module-access-BUruaccY.js} +1 -1
- package/dist/assets/{game-network-rngD8A9s.js → game-network-nU5UP6Bb.js} +3 -3
- package/dist/assets/{gameplay-export-yv4RxuAP.js → gameplay-export-D1lacwAF.js} +1 -1
- package/dist/assets/{gameplay-replay-DXNRtWAq.js → gameplay-replay-CW8ZWo2i.js} +1 -1
- package/dist/assets/{gameplay.command-B9l-Zd_e.js → gameplay.command-DGxLcWT6.js} +1 -1
- package/dist/assets/{generation-jobs-DjMjddEZ.js → generation-jobs-BuUAWyN7.js} +1 -1
- package/dist/assets/{generation.service-B65RZ3Xj.js → generation.service-nH9Kyw1B.js} +1 -1
- package/dist/assets/{generations-BogXUq8R.js → generations-CeyaTUvD.js} +1 -1
- package/dist/assets/{generations.status-DQ-cKRbO.js → generations.status-z0wTuGt6.js} +1 -1
- package/dist/assets/{hierarchy-marks--hCaQPWK.js → hierarchy-marks-DGKKZPkJ.js} +1 -1
- package/dist/assets/{hosted-asset-materialization-E4oslMed.js → hosted-asset-materialization-DsXv3jDp.js} +1 -1
- package/dist/assets/{index-sMqw9o3s.js → index-B0XY5X4C.js} +1 -1
- package/dist/assets/{index-BY6LqkgI.js → index-B4VYdyj3.js} +1 -1
- package/dist/assets/{index-8Wua2fLA.js → index-C6RkonlJ.js} +1 -1
- package/dist/assets/{index-B1cMcOkR.js → index-CuoxP7kz.js} +1 -1
- package/dist/assets/{index-CQ2mBTB3.js → index-DRJoiAiV.js} +7 -7
- package/dist/assets/{index-BYv-VrM5.js → index-DRbhWNQL.js} +1 -1
- package/dist/assets/{index-BU5Wa6YB.js → index-Dc1Vzzit.js} +1 -1
- package/dist/assets/{index-DB3OomiZ.js → index-DwFmwEn7.js} +1 -1
- package/dist/assets/{index-COR1kS33.js → index-n0bGAss6.js} +2 -2
- package/dist/assets/{inference-diagnostics-H8BhQPo1.js → inference-diagnostics-B7Rq0UAr.js} +1 -1
- package/dist/assets/{ingest-boot-viewport-7rPgtMec.js → ingest-boot-viewport-HHbM1hGC.js} +1 -1
- package/dist/assets/{ingest-siblings-jS7uWpHB.js → ingest-siblings-tYD7JOBI.js} +1 -1
- package/dist/assets/{ingest-source-persistence-DAeIROgB.js → ingest-source-persistence-DMGO8wjy.js} +1 -1
- package/dist/assets/{ingest.service-slwcN_Zt.js → ingest.service-C2eZ9C3i.js} +1 -1
- package/dist/assets/{inspect-C5cLskKr.js → inspect-XHje6e7u.js} +1 -1
- package/dist/assets/instances.command-DRCtuLRm.js +1 -0
- package/dist/assets/{json-history-resource-Bm80nf1w.js → json-history-resource-CveRo5TP.js} +1 -1
- package/dist/assets/{layered-pick-BN_u4vpH.js → layered-pick-qy9jGuzG.js} +1 -1
- package/dist/assets/{light-BPAKY7kG.js → light-CE6NgHF9.js} +1 -1
- package/dist/assets/{live-project-verbs-BCv08_fa.js → live-project-verbs-Cbi9DZnP.js} +1 -1
- package/dist/assets/{machine.document-CEnp_rCc.js → machine.document-D5YsyE7A.js} +1 -1
- package/dist/assets/{machines.finder-BER4T2lc.js → machines.finder-CLlJnAWG.js} +1 -1
- package/dist/assets/{material-factory-Du7WUqib.js → material-factory-C92u71bF.js} +1 -1
- package/dist/assets/{material-3JMiH9rk.js → material-zKBBqKni.js} +1 -1
- package/dist/assets/{mesh-DMH0PrCb.js → mesh-DjuPgmvl.js} +1 -1
- package/dist/assets/{model-asset-sections.service-CrwDT75X.js → model-asset-sections.service-DVlGqJpy.js} +1 -1
- package/dist/assets/{model-inspection-RazLBT4Q.js → model-inspection-E45pekwj.js} +1 -1
- package/dist/assets/{model-thumbnail-DlJcpPzi.js → model-thumbnail-CyyARFuX.js} +1 -1
- package/dist/assets/{models.finder-DIFXBoQE.js → models.finder-BCjlXSNM.js} +1 -1
- package/dist/assets/{module-mode-BSqPULWZ.js → module-mode-WqvTwqHU.js} +2 -2
- package/dist/assets/{mount-canvas-ingest-root-DcHtUiIX.js → mount-canvas-ingest-root-B6E-tmWw.js} +2 -2
- package/dist/assets/{mount-dom-ingest-root-BT-SneoF.js → mount-dom-ingest-root-CHpReZR2.js} +2 -2
- package/dist/assets/{mount-ingest-root-BWqm1g8h.js → mount-ingest-root-CmhI4rUI.js} +2 -2
- package/dist/assets/{mount-manifest-Dk2kIP9S.js → mount-manifest-BiIDFbLk.js} +1 -1
- package/dist/assets/{mount-three-ingest-root-DC7XVSNu.js → mount-three-ingest-root-C614fqwr.js} +1 -1
- package/dist/assets/{mounted-authoring-42mbkzQk.js → mounted-authoring-C0-FYbAO.js} +1 -1
- package/dist/assets/{mounted-story-viewport-source-DNALyUeR.js → mounted-story-viewport-source-BHRqPu6Y.js} +1 -1
- package/dist/assets/{native-debug-module-2WtZMm25.js → native-debug-module-CZ8nF0vD.js} +1 -1
- package/dist/assets/{navigation-BiKzso-N.js → navigation-DJmA1T3B.js} +1 -1
- package/dist/assets/{navmesh.menu-CRpN60zw.js → navmesh.menu-JnXJ4Old.js} +1 -1
- package/dist/assets/{navmesh.service-DrEBUXWK.js → navmesh.service-CUzU7bfA.js} +1 -1
- package/dist/assets/network-observer.service-DL0GDpyp.js +1 -0
- package/dist/assets/{network.utility-Don7G5oX.js → network.utility-BwDMQo9f.js} +1 -1
- package/dist/assets/{object3d-document-session-registry-BhLWtMoZ.js → object3d-document-session-registry-Bu2GGdxt.js} +2 -2
- package/dist/assets/{oid-transform-B_w-y892.js → oid-transform-CCGC0vkQ.js} +1 -1
- package/dist/assets/{particles-Bcxa0rSB.js → particles-D6nJ6TG7.js} +1 -1
- package/dist/assets/{pixi-authoring-adapter-DNLOjEpY.js → pixi-authoring-adapter-DBkpMAVO.js} +1 -1
- package/dist/assets/{pixi-live-write-target-BfoISjV8.js → pixi-live-write-target-CsLSuUfR.js} +1 -1
- package/dist/assets/{play.command-C75rc-GE.js → play.command-CvY4kcJ4.js} +2 -2
- package/dist/assets/{presentation-BJiNf5OD.js → presentation-BIL5vzHP.js} +1 -1
- package/dist/assets/{product-lR88S-ss.js → product-BAFqN4pU.js} +1 -1
- package/dist/assets/{profiler.action-Bb0chqRo.js → profiler.action-W0d4vElE.js} +1 -1
- package/dist/assets/{profiler.menu-BSEfnsIH.js → profiler.menu-CeOP5aWu.js} +1 -1
- package/dist/assets/{profiler.utility-BHTVOPh5.js → profiler.utility-B_SAYkJf.js} +1 -1
- package/dist/assets/{project-authoring-session-Cmgm10J-.js → project-authoring-session-DIixtjK5.js} +2 -2
- package/dist/assets/{properties-bone-constraints.inspector-DzkkZoCm.js → properties-bone-constraints.inspector-CyrWQNoZ.js} +1 -1
- package/dist/assets/{properties-bone.inspector-KyF4U4m5.js → properties-bone.inspector-Cccvuw4e.js} +1 -1
- package/dist/assets/{properties-collection.inspector-PVgsrACR.js → properties-collection.inspector-COIgZN2a.js} +1 -1
- package/dist/assets/{properties-constraints.inspector-CaVHavgQ.js → properties-constraints.inspector-HQ82dZr5.js} +1 -1
- package/dist/assets/{properties-data.inspector-7KR8NYvm.js → properties-data.inspector-Cfb0jDoK.js} +1 -1
- package/dist/assets/{properties-material.inspector-Dxzt8Xcs.js → properties-material.inspector-BQB745aA.js} +1 -1
- package/dist/assets/{properties-modifiers.inspector-esK_INJG.js → properties-modifiers.inspector-DM-dF6Fw.js} +1 -1
- package/dist/assets/{properties-object.inspector-Twn0WNsN.js → properties-object.inspector-DPj2ywFC.js} +1 -1
- package/dist/assets/{properties-output.inspector-BpZE-DAu.js → properties-output.inspector-XImV5MHz.js} +1 -1
- package/dist/assets/{properties-particles.inspector-DFMWK_pm.js → properties-particles.inspector-CccvSTnH.js} +1 -1
- package/dist/assets/{properties-physics.inspector-ldvafNIb.js → properties-physics.inspector-AtkExPp9.js} +1 -1
- package/dist/assets/{properties-render.inspector-Bul6aacN.js → properties-render.inspector-B2g5f7M0.js} +1 -1
- package/dist/assets/{properties-scene.inspector-HVMqQVke.js → properties-scene.inspector-lPQP7sv4.js} +1 -1
- package/dist/assets/{properties-texture.inspector-DVqbNfLB.js → properties-texture.inspector-CQN8gTKe.js} +1 -1
- package/dist/assets/{properties-view-layer.inspector-CWXcsbp9.js → properties-view-layer.inspector-qIS4Seio.js} +1 -1
- package/dist/assets/{properties-world.inspector-rIgkn5hU.js → properties-world.inspector-DYBxdDRN.js} +1 -1
- package/dist/assets/{r3f-design-session-NIeKhBOo.js → r3f-design-session-BjSMWRLc.js} +2 -2
- package/dist/assets/{r3f-physics-binding-Bnz_0MBc.js → r3f-physics-binding-GraaPLmW.js} +1 -1
- package/dist/assets/{r3f-source-authoring-adapter-CmYnK9fs.js → r3f-source-authoring-adapter-CHwapan6.js} +1 -1
- package/dist/assets/{react-canvas-navigation-DgfbnHxA.js → react-canvas-navigation-CVpoWGh_.js} +1 -1
- package/dist/assets/{react-inspector.service-DIEnbFP5.js → react-inspector.service-Buwj7lLm.js} +1 -1
- package/dist/assets/{react-story-board-ChhZ3xMR.js → react-story-board-zNLEOvLz.js} +1 -1
- package/dist/assets/{react-three-rapier.esm-CBGmsKYj.js → react-three-rapier.esm-DquA_DfA.js} +1 -1
- package/dist/assets/{react-world-authoring-adapter-CbLvc5Xf.js → react-world-authoring-adapter-DNra0wHi.js} +1 -1
- package/dist/assets/{realm-services-Hkd3KXxA.js → realm-services-C6Wlvjb7.js} +1 -1
- package/dist/assets/{reflection-probe-capture.inspector-BmLhQ6Rt.js → reflection-probe-capture.inspector-Ct-sf1xD.js} +1 -1
- package/dist/assets/{registry-f7eUI3vB.js → registry-BihdyB4_.js} +1 -1
- package/dist/assets/{relative-import-specifier-N1r5PU5l.js → relative-import-specifier-Byf28quf.js} +1 -1
- package/dist/assets/{render-env-BmsPMzMD.js → render-env-CR3xqTzh.js} +1 -1
- package/dist/assets/{render-features-8WptNlDn.js → render-features-QKGS1jBi.js} +1 -1
- package/dist/assets/{render-settings-k4Hd5jrC.js → render-settings-BSkwXuCo.js} +1 -1
- package/dist/assets/{resolve-three-B6AVoQHZ.js → resolve-three-C1XYBdum.js} +3 -3
- package/dist/assets/{root-seam-contract-8hLS1SBd.js → root-seam-contract-ZMfEXDgS.js} +1 -1
- package/dist/assets/{run-selection-BelqeQ8J.js → run-selection-B-SQ-Gs8.js} +1 -1
- package/dist/assets/{scene-capture-CNkinvGl.js → scene-capture-C33U0c48.js} +1 -1
- package/dist/assets/{scene-document.service-BZNMZjtI.js → scene-document.service-C-wTsLoO.js} +2 -2
- package/dist/assets/{scene-framing-BxR6xAtj.js → scene-framing-D_snl39z.js} +1 -1
- package/dist/assets/{seeded-random-BTfLEYmi.js → seeded-random-DicY7HSA.js} +1 -1
- package/dist/assets/{setup-renderer-Hy8DUu6u.js → setup-renderer-BiSeM1XL.js} +1 -1
- package/dist/assets/{source-object3d-authoring-adapter-CabVbvF1.js → source-object3d-authoring-adapter-eDCEH68Z.js} +1 -1
- package/dist/assets/{source-persistence-backend-DfO7BsJw.js → source-persistence-backend-CWWyPkVn.js} +1 -1
- package/dist/assets/{stage-keyboard-Cch0eYUh.js → stage-keyboard-9OW4UPFE.js} +1 -1
- package/dist/assets/{stage-overlay-set-DFAZ4FXc.js → stage-overlay-set-Di1lqrw5.js} +1 -1
- package/dist/assets/{stage-presence-markers-CMEeirt8.js → stage-presence-markers-OIQpCpOF.js} +1 -1
- package/dist/assets/{stage-transform-tools-Czje_10c.js → stage-transform-tools-IJN46XM_.js} +1 -1
- package/dist/assets/{standard-viewport-dressing-DTn1Fpqc.js → standard-viewport-dressing-B9aRa9jt.js} +1 -1
- package/dist/assets/{state-watch.action-DXMjTYPm.js → state-watch.action-gejLCeGI.js} +1 -1
- package/dist/assets/{state-watch.menu-mvWgMuJs.js → state-watch.menu-zmftCgbH.js} +1 -1
- package/dist/assets/{state-watch.utility-huAfMHMT.js → state-watch.utility-pbarYQFw.js} +1 -1
- package/dist/assets/{story-capture-BfudQb8A.js → story-capture-b6AiB4M8.js} +1 -1
- package/dist/assets/{story-documents-Bb4raAKr.js → story-documents-zKESprFq.js} +1 -1
- package/dist/assets/{story-documents.service-DjMSTc_l.js → story-documents.service-DbJbrKte.js} +1 -1
- package/dist/assets/{story-documents.service-DhtikHPg.js → story-documents.service-Ds4JHZvz.js} +1 -1
- package/dist/assets/{story-media-presence-Dw2XtQ1w.js → story-media-presence-CqFIgFe3.js} +1 -1
- package/dist/assets/{story-pixi-preview-CNosFkIF.js → story-pixi-preview-CqP2UCDq.js} +1 -1
- package/dist/assets/{story-presentation-BqyC-AzE.js → story-presentation-81r3Smd1.js} +1 -1
- package/dist/assets/{story-three-preview-DqncZLn4.js → story-three-preview-BCVxl8oj.js} +2 -2
- package/dist/assets/{studio-environment-CR1cIDh0.js → studio-environment-Xugij5dz.js} +1 -1
- package/dist/assets/{surface-state-CG7Ou_Jh.js → surface-state-Dj5avDGB.js} +1 -1
- package/dist/assets/{syntactic-prop-specs-aeB8_VU3.js → syntactic-prop-specs-DjpHoHM5.js} +1 -1
- package/dist/assets/{team-playtest.service-pb1LDXeP.js → team-playtest.service-3-Wf8uYw.js} +1 -1
- package/dist/assets/{three-D94Cuk32.js → three-Dj4EfH-L.js} +1 -1
- package/dist/assets/{three-authoring-adapter-BUj0tjgD.js → three-authoring-adapter-1ryP5ZRM.js} +1 -1
- package/dist/assets/three-authoring.service-CX9gnuxL.js +2 -0
- package/dist/assets/{three-ingest-runtime-DxmN_s10.js → three-ingest-runtime-D1vYRAE0.js} +1 -1
- package/dist/assets/{three-integration-BiI_lkIf.js → three-integration-Dn5DkZRo.js} +2 -2
- package/dist/assets/three-integration.service-C-vUPzE6.js +1 -0
- package/dist/assets/{three-projection-core-C7CgCiKg.js → three-projection-core-iez91I45.js} +1 -1
- package/dist/assets/{three-state-CXVRdni_.js → three-state-BoHJunv-.js} +1 -1
- package/dist/assets/{three-story-capture.service-CsTBiEBK.js → three-story-capture.service-BdXncIEW.js} +2 -2
- package/dist/assets/{three-story-model-AMTDnnn-.js → three-story-model-XHe2dgjC.js} +1 -1
- package/dist/assets/{three-viewport-presentation-DbG0uCGP.js → three-viewport-presentation-B1wO0kLD.js} +1 -1
- package/dist/assets/{transform-mode-request-LePIz6b6.js → transform-mode-request-BltKKlSb.js} +1 -1
- package/dist/assets/{transport-strip-DnuulxI4.js → transport-strip-D0TVfarj.js} +1 -1
- package/dist/assets/transport.header-C2UEA49f.js +1 -0
- package/dist/assets/{tuples-CNWCQlPR.js → tuples-DSpmK3Ut.js} +1 -1
- package/dist/assets/{ui-board-document-BBrzbh95.js → ui-board-document-DuQi3FoQ.js} +2 -2
- package/dist/assets/{user-data-Bs7aRC-I.js → user-data-9E6ybkoB.js} +1 -1
- package/dist/assets/{utility-view-state-96_iVt4c.js → utility-view-state-Dqmb_UVq.js} +1 -1
- package/dist/assets/{viewport-door-d0NZ7oI-.js → viewport-door-BYBpRl9K.js} +1 -1
- package/dist/assets/{viewport-root-presentation-Bqr2fF0N.js → viewport-root-presentation-Y4NLepL_.js} +1 -1
- package/dist/assets/{viewport-surface-status-Baan57-I.js → viewport-surface-status-CUr96fEx.js} +1 -1
- package/dist/assets/{webworkerAll-C5Q6lZd-.js → webworkerAll-Cj-nHTBc.js} +1 -1
- package/dist/assets/{workspace-arrangement-rUj27SGX.js → workspace-arrangement-BObBMabU.js} +1 -1
- package/dist/assets/{world-documents-D7UiOblt.js → world-documents-CngK7_rs.js} +1 -1
- package/dist/assets/{world-root-stage-binding-Bn462UiR.js → world-root-stage-binding-gdsnJff2.js} +1 -1
- package/dist/assets/{xstate-animation-binding-jpldSq-l.js → xstate-animation-binding-DUPJkEfw.js} +1 -1
- package/dist/assets/{xstate-animation-meta-B2NNMu30.js → xstate-animation-meta-9HcuFiks.js} +1 -1
- package/dist-node/cli.js +16 -16
- package/package.json +16 -16
- package/dist/assets/InspectorObjectPreview-DE5nmrtn.js +0 -1
- package/dist/assets/Object3DDocumentViewport-BMrvQ5Kf.js +0 -2
- package/dist/assets/autoplay.service-QRbYvo5H.js +0 -1
- package/dist/assets/instances.command-DXvKf1k6.js +0 -1
- package/dist/assets/network-observer.service-B8KW6Gxu.js +0 -1
- package/dist/assets/three-authoring.service-p9it1aT8.js +0 -2
- package/dist/assets/three-integration.service-D3CYzRfO.js +0 -1
- package/dist/assets/transport.header-CwcmYZNa.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ab as a}from"./index-
|
|
1
|
+
import{ab as a}from"./index-DRJoiAiV.js";import{s as n,n as s}from"./command-results-CUQD49AB.js";import{g as m,a as p}from"./game-network-nU5UP6Bb.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./native-debug-module-CZ8nF0vD.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-C_ZJrrrl.js";import"./contract-system-adapters-ehl3b6j5.js";import"./game-contract-seams-D79dC6Zb.js";import"./seeded-random-DicY7HSA.js";import"./game-audio-BeCyd0Ha.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./events-156d8d12.esm-DmeaOP4r.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./index-DzuOGwVB.js";import"./live-project-verbs-Cbi9DZnP.js";import"./capability-coverage-DI6VigfO.js";import"./edit-mode-authoring-CN2UHQ1D.js";import"./json-history-resource-CveRo5TP.js";import"./binding-resolver-ETBlwCN5.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-C6Wlvjb7.js";import"./canvas-entry-runtime-BUBdXy3i.js";import"./three-ingest-runtime-D1vYRAE0.js";import"./EffectComposer-BEAt0PtQ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-DTnDQXm0.js";import"./Pass-D1MRT672.js";import"./CSS3DRenderer-BsAqfavI.js";import"./relative-path-guard-GiM7Lsz8.js";import"./react-root-BHA-cdrW.js";import"./editor-presentation-activity-CqJH4G9t.js";import"./active-ingest-WiOnIb6i.js";import"./ingest-source-persistence-DMGO8wjy.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-Y4NLepL_.js";import"./mounted-authoring-C0-FYbAO.js";import"./entity-object-CDJODRTe.js";import"./user-data-9E6ybkoB.js";import"./workspace-arrangement-BObBMabU.js";import"./three-contract-Dkt6PmWY.js";import"./three-Dj4EfH-L.js";import"./editor-layers-BPRVuL8j.js";import"./component-instance-root-CepkVtbC.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-1ryP5ZRM.js";import"./source-persistence-backend-CWWyPkVn.js";import"./three-projection-core-iez91I45.js";import"./body-marks-C1LxJtQb.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./structural-ids-BOo2BRoY.js";import"./object3d-authoring-subject-XccsO0xG.js";import"./r3f-physics-binding-GraaPLmW.js";import"./deferred-ingest-play-B0qyAS35.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-DNra0wHi.js";import"./board-guides-DqmvE-Y5.js";import"./relative-import-specifier-Byf28quf.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-XHje6e7u.js";import"./inference-diagnostics-B7Rq0UAr.js";import"./writer-tw6EcuVO.js";import"./three-state-BoHJunv-.js";import"./editor-shell-store-Bg5om3l7.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-BYBpRl9K.js";import"./game-surface-defaults-D8S4cRxi.js";const Le="workspace.command",Ue={"list-gameplay-state":{derivedRefresh:"if-content-changed",handle:()=>{const e=a().debug;return e?{ok:!0,data:{providers:e.providers()}}:p()?{ok:!0,data:{providers:[]}}:s()}},"inspect-gameplay-state":{derivedRefresh:"if-content-changed",handle:e=>{const t=a().debug;if(!t)return p()?{ok:!0,data:{state:null}}:s();const r=e.keys;try{const o={};if(r&&r.length>0)for(const i of r)o[i]=t.state(i);else Object.assign(o,t.stateAll());return{ok:!0,data:{state:o}}}catch(o){return n(o)}}},"list-debug-commands":{derivedRefresh:"if-content-changed",handle:()=>{const e=a().debug;return e?{ok:!0,data:{commands:e.commands()}}:p()?{ok:!0,data:{commands:[]}}:s()}},"invoke-debug-command":{derivedRefresh:"always",handle:async e=>{const t=a().debug;if(!t)return p()?{ok:!1,error:`debug: no command registered under "${e.name}" — this game exposes no debug adapter`,data:{code:"DEBUG_COMMAND_NOT_REGISTERED",registered:[]}}:s();try{return{ok:!0,data:{result:await t.invoke(e.name,e.args??[])}}}catch(r){return n(r)}}},"inject-input":{derivedRefresh:"none",handle:e=>{const t=m();if(!t)return{ok:!1,error:"not in play mode — start play before injecting input"};let r;try{r=t.getInputTarget(e.worldId)}catch(o){return n(o)}if(!r)return{ok:!1,error:"this play session has no input door: no root entry exports `debug.input`"};try{if(e.kind==="action"){const i=e.atTick;return typeof i=="number"?(r.scheduleActionAtTick(i,e.action,e.value),{ok:!0,data:{scheduled:!0,tick:i}}):{ok:!0,data:r.setVirtualAction(e.action,e.value)}}const o=e.sourceId;switch(e.kind){case"axis":r.injectAxis(o,e.value);break;case"vector2":r.injectVector2(o,e.value);break;case"pointerDelta":r.injectPointerDelta(o,e.value);break;case"pointerPosition":r.injectPointerPosition(o,e.value);break;default:return{ok:!1,error:`unknown injection kind "${e.kind}"`}}return{ok:!0,data:{delivered:!0}}}catch(o){return n(o)}}},"set-time-scale":{derivedRefresh:"none",handle:e=>{const t=m();return t?(t.loop.timeScale=e.timeScale,{ok:!0,data:{timeScale:t.loop.timeScale}}):{ok:!1,error:"not in play mode — start play before setting time-scale"}}},"set-seed":{derivedRefresh:"none",handle:e=>{const t=m();return t?t.determinismDeclared?t.random?(t.random.reseed(e.seed),{ok:!0,data:{seed:t.random.seed}}):{ok:!1,error:"this play session has no first-party ctx.random to reseed"}:{ok:!1,error:"this project's manifest does not declare determinism.seededRandom — play.seed.set has no documented contract to reseed against (D15)",data:{code:"DETERMINISM_NOT_DECLARED"}}:{ok:!1,error:"not in play mode — start play before setting the seed"}}},"run-ticks":{derivedRefresh:"none",handle:async e=>{const t=m();if(!t)return{ok:!1,error:"not in play mode — start play before running ticks"};if(!t.runTicks)return{ok:!1,error:"this play session has no first-party Game to run ticks on",data:{code:"RUN_TICKS_UNAVAILABLE"}};try{const r=e.n,o=e.render;return t.runTicksSettled?await t.runTicksSettled(r,o?{render:o}:void 0):t.runTicks(r,o?{render:o}:void 0),{ok:!0}}catch(r){return n(r)}}}};export{Ue as commands,Le as point};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a3 as l,a4 as a,ac as c}from"./index-
|
|
1
|
+
import{a3 as l,a4 as a,ac as c}from"./index-DRJoiAiV.js";const g={version:1,jobs:[]};let u=g,i=null,s=0,o=!1;const r=new Set;function w(e,n=null){u=e,i=n,s++;for(const d of r)d()}function J(){return u}function v(){return i}function E(){return s}function y(e){return r.add(e),()=>r.delete(e)}function p(e){return e.status==="queued"||e.status==="running"}function h(e){return!p(e)&&(!e.readAt||Date.parse(e.readAt)<Date.parse(e.updatedAt))}function b(e){return e.filter(h).length}async function t(){try{const e=await fetch("/__editor/generations");w(await l(e,"Generation activity request failed"))}catch(e){i=e instanceof Error?e.message:String(e),s++;for(const n of r)n()}}async function G(){if(!o){o=!0;try{const e=await fetch("/__editor/generations/reconcile",{method:"POST"});a(e,"Generation reconciliation failed"),await t()}finally{o=!1}}}async function _(e){const n=await c(e.poll.tool,e.poll.input);if(!n.ok)throw new Error(n.error.message);if(n.generationWarning)throw new Error(n.generationWarning);return await t(),await f(e.id),n.data}async function S(e){if(!e.accept)throw new Error("This completed generation has no project asset to add.");const n=await c(e.accept.tool,e.accept.input,{confirm:!0});if(!n.ok)throw new Error(n.error.message);if(n.generationWarning)throw new Error(n.generationWarning);await t(),await f(e.id)}async function f(e){const n=await fetch(`/__editor/generations/${encodeURIComponent(e)}/read`,{method:"POST"});a(n,"Mark generation read failed"),await t()}async function T(e){const n=await fetch(`/__editor/generations/${encodeURIComponent(e)}`,{method:"DELETE"});a(n,"Forget generation job failed"),await t()}function A(){t();const e=window.setInterval(()=>void t(),2e3);return()=>{window.clearInterval(e)}}export{b as a,p as b,S as c,v as d,h as e,T as f,J as g,A as h,_ as i,E as j,f as m,G as p,t as r,y as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jn as K,jo as Q,fc as I,dN as O,h2 as E,jp as Y,jq as A,aN as X,a6 as g,h4 as Z,fo as H,jr as ee,js as te,jt as w,ju as ne,jv as re,jw as oe,jx as ae,jy as se,jz as ie,bv as le,aL as h,hV as ce,eB as P,hF as R,bQ as B,Z as de,a7 as _,gi as ue,jA as me,jB as pe,jC as ge,g$ as ve,jD as fe,b7 as he,jE as xe,f6 as je,ad as ye,f8 as Ne}from"./index-CQ2mBTB3.js";import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{r as u}from"./index-nmcBqr7Y.js";import{m as Ce}from"./model-thumbnail-DlJcpPzi.js";import"./index-CtzuWnCS.js";import{s as T,g as x,c as z,f as M,i as Ee,b as F,p as Se,r as J,d as ke,e as Te,m as $e,h as be,j as Ae,a as we}from"./generation-jobs-DjMjddEZ.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./renderer-ownership-BovSEcLv.js";import"./studio-environment-CR1cIDh0.js";import"./user-data-Bs7aRC-I.js";import"./workspace-arrangement-rUj27SGX.js";import"./KTX2Loader-CaqVE6nY.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";function j(e){switch(e.status){case"queued":return"queued";case"running":return"running";case"failed":return"failed";case"cancelled":return"cancelled";default:return e.acceptedAt?"ready":e.accept?e.pollError?"save-failed":"saving":"no-asset"}}function L(e){const n=j(e);return n!=="queued"&&n!=="running"&&n!=="saving"}function U(e,n){return e.status==="succeeded"&&!!e.accept&&!e.acceptedAt&&!!(e.pollError??n)}const $={queued:"Queued",running:"Running",saving:"Saving","save-failed":"Couldn't save",ready:"In project","no-asset":"No file",failed:"Failed",cancelled:"Cancelled"},Re=new Map([...["png","jpg","jpeg","webp","gif","avif","svg","bmp"].map(e=>[e,"image"]),...["mp4","webm","ogv","mov","m4v"].map(e=>[e,"video"]),...["mp3","wav","ogg","oga","m4a","flac","aac"].map(e=>[e,"audio"]),...["glb","gltf","fbx","obj","stl","ply","dae","3ds","usdz","spz"].map(e=>[e,"model"])]);function De(e){const n=e.slice(e.lastIndexOf("/")+1).toLowerCase(),r=n.lastIndexOf(".");return r>0?n.slice(r+1):""}function q(e){return(e.outputPaths??[]).map(n=>{const r=K.find(o=>n.startsWith(`${o}/`)),a=r?Q(r,n.slice(r.length+1)):null;return{path:n,name:n.slice(n.lastIndexOf("/")+1),kind:Re.get(De(n))??"file",url:a}})}function D(e,n){const r=e.trim();return r.length<=n?r:`${r.slice(0,n-1).trimEnd()}…`}function C(e){const n=Oe(e);if(n)return n;const r=q(e);if(r.length===0)return D(e.label,64);const a=r[0],o=Ie(a.path);return r.length>1?o?`${o} · ${r.length} files`:`${r.length} files`:Ge.test(a.name)?o?`${o}/${a.name}`:D(e.label,64):a.name}const Ge=/^(image|video|audio|model|panorama|output)(-\d+)?\./;function Ie(e){const n=e.split("/").slice(-2,-1)[0];return n?/^[0-9a-f]{8,}$/i.test(n)||/^[0-9a-f-]{16,}$/i.test(n)?null:n:null}function Oe(e){const n=e.accept?.input;if(!n||typeof n!="object")return null;const r=n.outputName;return typeof r=="string"&&r.trim().length>0?r.trim():null}function Pe(e){for(const n of[e.accept?.input,e.poll.input]){const r=W(n,0);if(r)return r}return null}function W(e,n){if(n>3||typeof e!="object"||e===null)return null;const r=e,a=r.prompt;if(typeof a=="string"&&a.trim().length>0)return a.trim();for(const o of Object.values(r)){const l=W(o,n+1);if(l)return l}return null}function G(e){return e.operation}function Be(e){return e.mode==="managed"?"Volter subscription":e.mode==="direct"?"Your provider key":"Mock"}function _e(e){return e.route==="mock"?"Free · mock":e.route==="managed"?e.settledCredits!==void 0?`${e.settledCredits} credits`:e.estimatedCredits!==void 0?`Up to ${e.estimatedCredits} credits`:"Credit estimate unavailable":e.settledAmount!==void 0?`$${e.settledAmount.toFixed(3)}`:e.estimatedAmount!==void 0?`Up to $${e.estimatedAmount.toFixed(3)}`:"USD estimate unavailable"}function ze(e){return e.route==="mock"?!0:e.route==="managed"?e.settledCredits!==void 0:e.settledAmount!==void 0}function Me(e){const n=Math.floor((Date.now()-Date.parse(e))/6e4);if(!Number.isFinite(n)||n<1)return"just now";if(n<60)return`${n}m ago`;const r=Math.floor(n/60);if(r<24)return`${r}h ago`;const a=Math.floor(r/24);return a<7?`${a}d ago`:`${Math.floor(a/7)}w ago`}const S="generation:",Fe="generation:create";function Je(e){return e.route==="mock"?"Free mock":e.route==="managed"?e.settledCredits!==void 0?`${e.settledCredits} credits settled`:e.estimatedCredits!==void 0?`Up to ${e.estimatedCredits} credits`:"Volter subscription · estimate unavailable":e.settledAmount!==void 0?`$${e.settledAmount.toFixed(3)} settled`:e.estimatedAmount!==void 0?`Up to $${e.estimatedAmount.toFixed(3)}`:"BYOK · estimate unavailable"}function V(e){return I({id:`${S}${e.id}`,title:e.label,kind:"generation",workspaceRole:"authored-subject",provenance:{origin:`${e.provider}:${e.externalId}`},Content:qe,closeable:!0,presentation:()=>({kind:"generation",id:e.id})})}function k(){return I({id:Fe,title:"Create Asset",kind:"generation",workspaceRole:"workspace-task",provenance:{origin:"registered generation tools"},Content:Le,closeable:!0,presentation:()=>({kind:"generation",id:"create"})})}function Le(){u.useSyncExternalStore(O,E),u.useSyncExternalStore(Y,A,A);const e=ee(),[n,r]=u.useState(""),a=n.trim().toLowerCase(),o=E().filter(i=>i.point==="workspace.document"&&i.tool?.generation?.role==="submit").filter(i=>a?[i.title,i.tool?.generation?.provider,i.tool?.summary,i.tool?.description].filter(Boolean).some(c=>String(c).toLowerCase().includes(a)):!0),l=new Map;for(const i of o){const c=i.tool?.generation?.provider??"other";l.set(c,[...l.get(c)??[],i])}return t.jsxs("div",{className:"volter-tool-page","data-testid":"generation-create-catalog",children:[t.jsxs("header",{className:"volter-tool-header",children:[t.jsx("div",{className:"volter-tool-eyebrow",children:"Installed provider extensions"}),t.jsx("h2",{className:"volter-tool-title",children:"Create an asset"}),t.jsxs("p",{className:"volter-tool-description",children:["Choose a native provider operation. Mock, managed, and BYOK execution remain explicit in the operation you open. Current default: ",e.preferredRoute,"."]})]}),t.jsx(X,{type:"search","aria-label":"Search generation tools",placeholder:"Search operations or providers…",value:n,onChange:i=>r(i.target.value)}),[...l.entries()].map(([i,c])=>t.jsxs("section",{className:"volter-tool-card",children:[t.jsx("h3",{className:"volter-tool-section-title",children:i}),t.jsx("div",{className:"volter-generation-create-grid",children:c.map(m=>t.jsxs(g,{variant:"ghost",className:"volter-generation-create-card",onClick:()=>Z(m.id),children:[t.jsx("strong",{children:m.title}),t.jsx("span",{children:m.tool?.summary})]},m.id))})]},i)),o.length===0&&t.jsx("div",{className:"volter-generation-document-empty",children:"No installed generation operation matches this search."})]})}function Ue({job:e,result:n,documentId:r,active:a}){u.useSyncExternalStore(O,E),u.useSyncExternalStore(te,w,w);const o=ne(e.poll.tool,e,n);if(!o)return t.jsx("pre",{className:"volter-generation-native-result",children:JSON.stringify(n,null,2)});const l=o.Component;return t.jsx(re,{file:o.file,children:t.jsx(l,{tool:o.tool,contributionId:o.id,client:ie(),surfaces:oe,account:se(),play:ae(),documentId:r,active:a,job:e,result:n})})}function qe({documentId:e,active:n}){const{jobs:r}=u.useSyncExternalStore(T,x,x),a=e.startsWith(S)?e.slice(S.length):e,o=r.find(d=>d.id===a),[l,i]=u.useState(),[c,m]=u.useState(!1),[s,p]=u.useState(null),[v,f]=u.useState(!1),y=async d=>{m(!0),p(null);try{i(await Ee(d))}catch(N){p(N instanceof Error?N.message:String(N))}finally{m(!1)}};if(u.useEffect(()=>{o&&y(o)},[o?.id,o?.status]),!o)return t.jsx("div",{className:"volter-generation-document-empty",children:"This generation is no longer in project activity."});const b=s??(j(o)==="save-failed"?`Could not save into the project: ${o.pollError}`:null);return t.jsxs("div",{className:"volter-generation-document","data-status":o.status,children:[t.jsxs("header",{className:"volter-generation-document-header",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"volter-tool-eyebrow",children:[o.provider," · ",o.operation]}),t.jsx("h2",{className:"volter-tool-title",children:o.label}),t.jsxs("div",{className:"volter-generation-job-meta",children:[$[j(o)]," · ",Je(o.billing)]})]}),t.jsxs("div",{className:"volter-tool-actions",children:[t.jsx(g,{size:"compact",variant:"ghost",disabled:c,onClick:()=>void y(o),children:c?"Refreshing…":"Refresh"}),U(o,s)&&t.jsx(g,{size:"compact",variant:"primary",disabled:v,onClick:()=>{f(!0),p(null),z(o).catch(d=>p(d instanceof Error?d.message:String(d))).finally(()=>f(!1))},children:v?"Saving…":"Retry save"})]})]}),o.message&&t.jsx("div",{className:"volter-tool-status",children:o.message}),b&&t.jsx("div",{className:"volter-tool-status","data-tone":"error",role:"alert",children:b}),t.jsx("section",{className:"volter-generation-result","aria-label":"Generation result",children:l===void 0?t.jsx("div",{className:"volter-generation-document-empty",children:c?"Loading provider result…":"No provider result is available yet."}):t.jsx(Ue,{job:o,result:l,documentId:e,active:n})}),o.outputPaths&&o.outputPaths.length>0&&t.jsxs("section",{className:"volter-generation-output-paths",children:[t.jsx("strong",{children:"Project assets"}),o.outputPaths.map(d=>t.jsx("code",{children:d},d))]}),L(o)&&t.jsx("div",{className:"volter-generation-document-footer",children:t.jsx(g,{size:"compact",variant:"ghost",disabled:v,onClick:()=>{f(!0),M(o.id).then(()=>H(e)).catch(d=>p(d instanceof Error?d.message:String(d))).finally(()=>f(!1))},children:"Remove from activity"})})]})}function We({output:e,onOpen:n}){const r=e.url;if(r&&e.kind==="image"){const a=t.jsx("img",{className:"volter-generation-output-media",src:r,alt:e.name,loading:"lazy"});return n?t.jsx(g,{variant:"ghost",className:"volter-generation-output-open",onClick:n,"aria-label":`Open ${e.name}`,children:a}):a}return r&&e.kind==="video"?t.jsx("video",{className:"volter-generation-output-media",src:r,controls:!0,preload:"metadata",playsInline:!0,title:e.name}):r&&e.kind==="audio"?t.jsxs("div",{className:"volter-generation-output-audio",children:[t.jsx(me,{url:r,name:e.name}),t.jsx("audio",{src:r,controls:!0,preload:"metadata",title:e.name})]}):e.url&&e.kind==="model"&&Ce(e.url)?t.jsx(pe,{url:e.url}):t.jsxs("div",{className:"volter-generation-output-file",children:[t.jsx(_,{icon:e.kind==="model"?ge:ve}),t.jsx(h,{variant:"caption",tone:"muted",children:e.name}),n&&t.jsx(g,{size:"compact",variant:"ghost",onClick:n,children:"Open file"})]})}const Ve={queued:"loading",running:"loading",saving:"loading","save-failed":"error",ready:"success","no-asset":"neutral",failed:"error",cancelled:"neutral"},Ke={queued:e=>e.queuePosition===void 0?"Waiting for the provider to start.":`Position ${e.queuePosition} in the provider queue.`,running:e=>e.message??"The provider is working on it.",saving:()=>"Downloading the finished output into this project.","save-failed":e=>e.pollError??"The finished output could not be saved.",ready:()=>"Saved into this project.","no-asset":()=>"The operation finished without a file this project can hold.",failed:e=>e.message??"The provider reported a failure.",cancelled:()=>"This generation was cancelled."};function Qe({job:e,state:n}){const r=n==="queued"||n==="running"||n==="saving",a=n==="failed"||n==="save-failed";return t.jsxs("div",{className:"volter-generation-state-media","data-state":n,children:[t.jsx(P,{compact:!0,tone:Ve[n],...a?{icon:t.jsx(_,{icon:ue})}:{},title:$[n],description:Ke[n](e)}),r&&t.jsx("progress",{className:"volter-generation-progress","aria-label":`${e.label} progress`,...n==="running"&&e.progress!==void 0?{value:e.progress,max:1}:{}})]})}function Ye({job:e,busy:n,error:r,run:a}){return t.jsxs("div",{className:"volter-generation-card-actions",children:[U(e,r)&&t.jsx(g,{size:"compact",variant:"primary",disabled:n,onClick:()=>a(()=>z(e)),children:n?"Saving…":"Retry save"}),t.jsx(g,{size:"compact",variant:"ghost",onClick:()=>V(e),children:"Details"}),L(e)&&t.jsx(g,{size:"compact",variant:"ghost",disabled:n,onClick:()=>a(()=>M(e.id)),children:"Remove"})]})}function Xe({job:e,busy:n,error:r,run:a}){const o=j(e),l=q(e),i=Pe(e),c=Te(e),m=s=>{if(!s.url)return;const p=fe(he(s.name));if(p)return()=>xe(s.url,p)};return t.jsxs("article",{className:"volter-generation-card","data-state":o,"aria-busy":F(e),"aria-label":C(e),onClickCapture:()=>{c&&$e(e.id).catch(s=>{de.warn(`Could not mark generation as seen: ${s instanceof Error?s.message:String(s)}`,"generations")})},children:[t.jsx("div",{className:"volter-generation-card-media","data-outputs":Math.min(l.length,4),children:l.length===0?t.jsx(Qe,{job:e,state:o}):l.map(s=>t.jsx("div",{className:"volter-generation-output",title:s.path,children:t.jsx(We,{output:s,onOpen:m(s)})},s.path))}),t.jsxs("div",{className:"volter-generation-card-body",children:[t.jsxs("div",{className:"volter-generation-card-heading",children:[t.jsx(h,{variant:"label",truncate:!0,title:C(e),children:C(e)}),t.jsxs(R,{className:"volter-generation-chip","data-state":o,children:[$[o],o==="running"&&e.progress!==void 0?` · ${Math.round(e.progress*100)}%`:""]}),c&&t.jsx(R,{className:"volter-generation-chip","data-state":"new",children:"New"})]}),t.jsxs(h,{variant:"caption",tone:"muted",truncate:!0,title:G(e),children:[e.provider," · ",G(e)]}),t.jsxs(h,{variant:"caption",tone:"dim",children:[_e(e.billing),ze(e.billing)?"":" (est.)"," · ",Be(e)," ·"," ",Me(e.updatedAt)]}),i&&t.jsx("p",{className:"volter-generation-card-prompt",title:i,children:i}),(r??e.pollError)&&t.jsx(B,{tone:r||o==="save-failed"?"error":"warning",className:"volter-generation-card-alert",children:r??(o==="save-failed"?`Could not save into the project: ${e.pollError}`:`Polling will retry: ${e.pollError}`)}),t.jsx(Ye,{job:e,busy:n,error:r,run:a})]})]})}function Ze(){const{jobs:e}=u.useSyncExternalStore(T,x,x),[n,r]=u.useState(null),[a,o]=u.useState({}),l=e.filter(F).length,i=e.filter(s=>j(s)==="saving").length,c=async(s,p)=>{r(s),o(v=>{const f={...v};return delete f[s],f});try{await p()}catch(v){const f=v instanceof Error?v.message:String(v);o(y=>({...y,[s]:f}))}finally{r(null)}},m=ke();return t.jsxs("div",{className:"volter-generation-gallery",children:[t.jsxs(le,{label:"Generations",compact:!0,className:"volter-generation-gallery-bar",children:[t.jsx(h,{variant:"label",children:"Generations"}),t.jsxs(h,{variant:"caption",tone:"muted",children:[e.length," ",e.length===1?"generation":"generations",l>0?` · ${l} running`:"",i>0?` · ${i} saving`:""]}),t.jsx(ce,{}),t.jsx(g,{size:"compact",variant:"ghost",onClick:()=>void Se().then(J),children:"Refresh"}),t.jsx(g,{size:"compact",variant:"primary",onClick:()=>k(),children:"New asset"})]}),m&&t.jsx(B,{tone:"error",className:"volter-generation-gallery-alert",children:m}),e.length===0?t.jsx(P,{className:"volter-generation-gallery-empty",title:"No generated assets yet",description:"Preview generated images, video, audio and models here. Create an asset to get started.",action:t.jsx(g,{size:"compact",variant:"primary",onClick:()=>k(),children:"New asset"})}):t.jsx("section",{className:"volter-generation-grid","aria-label":"Generated assets",children:e.map(s=>t.jsx(Xe,{job:s,busy:n===s.id,error:a[s.id]??null,run:p=>void c(s.id,p)},s.id))})]})}const kt="workspace.service",He="generation";function et(){const e=we(x().jobs);return e>0?{count:e,severity:"info"}:null}function Tt(){const e=[be(),je({...ye.generations,order:15,Content:Ze,badge:et,subscribeBadge:T,badgeSnapshot:Ae,visibleByDefault:!1,closeable:!0}),Ne({id:He,owner:"@volter/editor-game/generation",open:(n,r)=>{if(r.id==="create")return k();const a=x().jobs.find(o=>o.id===r.id);return a?V(a):null},settle:J})];return()=>{for(const n of e)n()}}export{kt as point,Tt as start};
|
|
1
|
+
import{jn as K,jo as Q,fc as I,dN as O,h2 as E,jp as Y,jq as A,aN as X,a6 as g,h4 as Z,fo as H,jr as ee,js as te,jt as w,ju as ne,jv as re,jw as oe,jx as ae,jy as se,jz as ie,bv as le,aL as h,hV as ce,eB as P,hF as R,bQ as B,Z as de,a7 as _,gi as ue,jA as me,jB as pe,jC as ge,g$ as ve,jD as fe,b7 as he,jE as xe,f6 as je,ad as ye,f8 as Ne}from"./index-DRJoiAiV.js";import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{r as u}from"./index-nmcBqr7Y.js";import{m as Ce}from"./model-thumbnail-CyyARFuX.js";import"./index-CtzuWnCS.js";import{s as T,g as x,c as z,f as M,i as Ee,b as F,p as Se,r as J,d as ke,e as Te,m as $e,h as be,j as Ae,a as we}from"./generation-jobs-BuUAWyN7.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./renderer-ownership-BovSEcLv.js";import"./studio-environment-Xugij5dz.js";import"./user-data-9E6ybkoB.js";import"./workspace-arrangement-BObBMabU.js";import"./KTX2Loader-CaqVE6nY.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";function j(e){switch(e.status){case"queued":return"queued";case"running":return"running";case"failed":return"failed";case"cancelled":return"cancelled";default:return e.acceptedAt?"ready":e.accept?e.pollError?"save-failed":"saving":"no-asset"}}function L(e){const n=j(e);return n!=="queued"&&n!=="running"&&n!=="saving"}function U(e,n){return e.status==="succeeded"&&!!e.accept&&!e.acceptedAt&&!!(e.pollError??n)}const $={queued:"Queued",running:"Running",saving:"Saving","save-failed":"Couldn't save",ready:"In project","no-asset":"No file",failed:"Failed",cancelled:"Cancelled"},Re=new Map([...["png","jpg","jpeg","webp","gif","avif","svg","bmp"].map(e=>[e,"image"]),...["mp4","webm","ogv","mov","m4v"].map(e=>[e,"video"]),...["mp3","wav","ogg","oga","m4a","flac","aac"].map(e=>[e,"audio"]),...["glb","gltf","fbx","obj","stl","ply","dae","3ds","usdz","spz"].map(e=>[e,"model"])]);function De(e){const n=e.slice(e.lastIndexOf("/")+1).toLowerCase(),r=n.lastIndexOf(".");return r>0?n.slice(r+1):""}function q(e){return(e.outputPaths??[]).map(n=>{const r=K.find(o=>n.startsWith(`${o}/`)),a=r?Q(r,n.slice(r.length+1)):null;return{path:n,name:n.slice(n.lastIndexOf("/")+1),kind:Re.get(De(n))??"file",url:a}})}function D(e,n){const r=e.trim();return r.length<=n?r:`${r.slice(0,n-1).trimEnd()}…`}function C(e){const n=Oe(e);if(n)return n;const r=q(e);if(r.length===0)return D(e.label,64);const a=r[0],o=Ie(a.path);return r.length>1?o?`${o} · ${r.length} files`:`${r.length} files`:Ge.test(a.name)?o?`${o}/${a.name}`:D(e.label,64):a.name}const Ge=/^(image|video|audio|model|panorama|output)(-\d+)?\./;function Ie(e){const n=e.split("/").slice(-2,-1)[0];return n?/^[0-9a-f]{8,}$/i.test(n)||/^[0-9a-f-]{16,}$/i.test(n)?null:n:null}function Oe(e){const n=e.accept?.input;if(!n||typeof n!="object")return null;const r=n.outputName;return typeof r=="string"&&r.trim().length>0?r.trim():null}function Pe(e){for(const n of[e.accept?.input,e.poll.input]){const r=W(n,0);if(r)return r}return null}function W(e,n){if(n>3||typeof e!="object"||e===null)return null;const r=e,a=r.prompt;if(typeof a=="string"&&a.trim().length>0)return a.trim();for(const o of Object.values(r)){const l=W(o,n+1);if(l)return l}return null}function G(e){return e.operation}function Be(e){return e.mode==="managed"?"Volter subscription":e.mode==="direct"?"Your provider key":"Mock"}function _e(e){return e.route==="mock"?"Free · mock":e.route==="managed"?e.settledCredits!==void 0?`${e.settledCredits} credits`:e.estimatedCredits!==void 0?`Up to ${e.estimatedCredits} credits`:"Credit estimate unavailable":e.settledAmount!==void 0?`$${e.settledAmount.toFixed(3)}`:e.estimatedAmount!==void 0?`Up to $${e.estimatedAmount.toFixed(3)}`:"USD estimate unavailable"}function ze(e){return e.route==="mock"?!0:e.route==="managed"?e.settledCredits!==void 0:e.settledAmount!==void 0}function Me(e){const n=Math.floor((Date.now()-Date.parse(e))/6e4);if(!Number.isFinite(n)||n<1)return"just now";if(n<60)return`${n}m ago`;const r=Math.floor(n/60);if(r<24)return`${r}h ago`;const a=Math.floor(r/24);return a<7?`${a}d ago`:`${Math.floor(a/7)}w ago`}const S="generation:",Fe="generation:create";function Je(e){return e.route==="mock"?"Free mock":e.route==="managed"?e.settledCredits!==void 0?`${e.settledCredits} credits settled`:e.estimatedCredits!==void 0?`Up to ${e.estimatedCredits} credits`:"Volter subscription · estimate unavailable":e.settledAmount!==void 0?`$${e.settledAmount.toFixed(3)} settled`:e.estimatedAmount!==void 0?`Up to $${e.estimatedAmount.toFixed(3)}`:"BYOK · estimate unavailable"}function V(e){return I({id:`${S}${e.id}`,title:e.label,kind:"generation",workspaceRole:"authored-subject",provenance:{origin:`${e.provider}:${e.externalId}`},Content:qe,closeable:!0,presentation:()=>({kind:"generation",id:e.id})})}function k(){return I({id:Fe,title:"Create Asset",kind:"generation",workspaceRole:"workspace-task",provenance:{origin:"registered generation tools"},Content:Le,closeable:!0,presentation:()=>({kind:"generation",id:"create"})})}function Le(){u.useSyncExternalStore(O,E),u.useSyncExternalStore(Y,A,A);const e=ee(),[n,r]=u.useState(""),a=n.trim().toLowerCase(),o=E().filter(i=>i.point==="workspace.document"&&i.tool?.generation?.role==="submit").filter(i=>a?[i.title,i.tool?.generation?.provider,i.tool?.summary,i.tool?.description].filter(Boolean).some(c=>String(c).toLowerCase().includes(a)):!0),l=new Map;for(const i of o){const c=i.tool?.generation?.provider??"other";l.set(c,[...l.get(c)??[],i])}return t.jsxs("div",{className:"volter-tool-page","data-testid":"generation-create-catalog",children:[t.jsxs("header",{className:"volter-tool-header",children:[t.jsx("div",{className:"volter-tool-eyebrow",children:"Installed provider extensions"}),t.jsx("h2",{className:"volter-tool-title",children:"Create an asset"}),t.jsxs("p",{className:"volter-tool-description",children:["Choose a native provider operation. Mock, managed, and BYOK execution remain explicit in the operation you open. Current default: ",e.preferredRoute,"."]})]}),t.jsx(X,{type:"search","aria-label":"Search generation tools",placeholder:"Search operations or providers…",value:n,onChange:i=>r(i.target.value)}),[...l.entries()].map(([i,c])=>t.jsxs("section",{className:"volter-tool-card",children:[t.jsx("h3",{className:"volter-tool-section-title",children:i}),t.jsx("div",{className:"volter-generation-create-grid",children:c.map(m=>t.jsxs(g,{variant:"ghost",className:"volter-generation-create-card",onClick:()=>Z(m.id),children:[t.jsx("strong",{children:m.title}),t.jsx("span",{children:m.tool?.summary})]},m.id))})]},i)),o.length===0&&t.jsx("div",{className:"volter-generation-document-empty",children:"No installed generation operation matches this search."})]})}function Ue({job:e,result:n,documentId:r,active:a}){u.useSyncExternalStore(O,E),u.useSyncExternalStore(te,w,w);const o=ne(e.poll.tool,e,n);if(!o)return t.jsx("pre",{className:"volter-generation-native-result",children:JSON.stringify(n,null,2)});const l=o.Component;return t.jsx(re,{file:o.file,children:t.jsx(l,{tool:o.tool,contributionId:o.id,client:ie(),surfaces:oe,account:se(),play:ae(),documentId:r,active:a,job:e,result:n})})}function qe({documentId:e,active:n}){const{jobs:r}=u.useSyncExternalStore(T,x,x),a=e.startsWith(S)?e.slice(S.length):e,o=r.find(d=>d.id===a),[l,i]=u.useState(),[c,m]=u.useState(!1),[s,p]=u.useState(null),[v,f]=u.useState(!1),y=async d=>{m(!0),p(null);try{i(await Ee(d))}catch(N){p(N instanceof Error?N.message:String(N))}finally{m(!1)}};if(u.useEffect(()=>{o&&y(o)},[o?.id,o?.status]),!o)return t.jsx("div",{className:"volter-generation-document-empty",children:"This generation is no longer in project activity."});const b=s??(j(o)==="save-failed"?`Could not save into the project: ${o.pollError}`:null);return t.jsxs("div",{className:"volter-generation-document","data-status":o.status,children:[t.jsxs("header",{className:"volter-generation-document-header",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"volter-tool-eyebrow",children:[o.provider," · ",o.operation]}),t.jsx("h2",{className:"volter-tool-title",children:o.label}),t.jsxs("div",{className:"volter-generation-job-meta",children:[$[j(o)]," · ",Je(o.billing)]})]}),t.jsxs("div",{className:"volter-tool-actions",children:[t.jsx(g,{size:"compact",variant:"ghost",disabled:c,onClick:()=>void y(o),children:c?"Refreshing…":"Refresh"}),U(o,s)&&t.jsx(g,{size:"compact",variant:"primary",disabled:v,onClick:()=>{f(!0),p(null),z(o).catch(d=>p(d instanceof Error?d.message:String(d))).finally(()=>f(!1))},children:v?"Saving…":"Retry save"})]})]}),o.message&&t.jsx("div",{className:"volter-tool-status",children:o.message}),b&&t.jsx("div",{className:"volter-tool-status","data-tone":"error",role:"alert",children:b}),t.jsx("section",{className:"volter-generation-result","aria-label":"Generation result",children:l===void 0?t.jsx("div",{className:"volter-generation-document-empty",children:c?"Loading provider result…":"No provider result is available yet."}):t.jsx(Ue,{job:o,result:l,documentId:e,active:n})}),o.outputPaths&&o.outputPaths.length>0&&t.jsxs("section",{className:"volter-generation-output-paths",children:[t.jsx("strong",{children:"Project assets"}),o.outputPaths.map(d=>t.jsx("code",{children:d},d))]}),L(o)&&t.jsx("div",{className:"volter-generation-document-footer",children:t.jsx(g,{size:"compact",variant:"ghost",disabled:v,onClick:()=>{f(!0),M(o.id).then(()=>H(e)).catch(d=>p(d instanceof Error?d.message:String(d))).finally(()=>f(!1))},children:"Remove from activity"})})]})}function We({output:e,onOpen:n}){const r=e.url;if(r&&e.kind==="image"){const a=t.jsx("img",{className:"volter-generation-output-media",src:r,alt:e.name,loading:"lazy"});return n?t.jsx(g,{variant:"ghost",className:"volter-generation-output-open",onClick:n,"aria-label":`Open ${e.name}`,children:a}):a}return r&&e.kind==="video"?t.jsx("video",{className:"volter-generation-output-media",src:r,controls:!0,preload:"metadata",playsInline:!0,title:e.name}):r&&e.kind==="audio"?t.jsxs("div",{className:"volter-generation-output-audio",children:[t.jsx(me,{url:r,name:e.name}),t.jsx("audio",{src:r,controls:!0,preload:"metadata",title:e.name})]}):e.url&&e.kind==="model"&&Ce(e.url)?t.jsx(pe,{url:e.url}):t.jsxs("div",{className:"volter-generation-output-file",children:[t.jsx(_,{icon:e.kind==="model"?ge:ve}),t.jsx(h,{variant:"caption",tone:"muted",children:e.name}),n&&t.jsx(g,{size:"compact",variant:"ghost",onClick:n,children:"Open file"})]})}const Ve={queued:"loading",running:"loading",saving:"loading","save-failed":"error",ready:"success","no-asset":"neutral",failed:"error",cancelled:"neutral"},Ke={queued:e=>e.queuePosition===void 0?"Waiting for the provider to start.":`Position ${e.queuePosition} in the provider queue.`,running:e=>e.message??"The provider is working on it.",saving:()=>"Downloading the finished output into this project.","save-failed":e=>e.pollError??"The finished output could not be saved.",ready:()=>"Saved into this project.","no-asset":()=>"The operation finished without a file this project can hold.",failed:e=>e.message??"The provider reported a failure.",cancelled:()=>"This generation was cancelled."};function Qe({job:e,state:n}){const r=n==="queued"||n==="running"||n==="saving",a=n==="failed"||n==="save-failed";return t.jsxs("div",{className:"volter-generation-state-media","data-state":n,children:[t.jsx(P,{compact:!0,tone:Ve[n],...a?{icon:t.jsx(_,{icon:ue})}:{},title:$[n],description:Ke[n](e)}),r&&t.jsx("progress",{className:"volter-generation-progress","aria-label":`${e.label} progress`,...n==="running"&&e.progress!==void 0?{value:e.progress,max:1}:{}})]})}function Ye({job:e,busy:n,error:r,run:a}){return t.jsxs("div",{className:"volter-generation-card-actions",children:[U(e,r)&&t.jsx(g,{size:"compact",variant:"primary",disabled:n,onClick:()=>a(()=>z(e)),children:n?"Saving…":"Retry save"}),t.jsx(g,{size:"compact",variant:"ghost",onClick:()=>V(e),children:"Details"}),L(e)&&t.jsx(g,{size:"compact",variant:"ghost",disabled:n,onClick:()=>a(()=>M(e.id)),children:"Remove"})]})}function Xe({job:e,busy:n,error:r,run:a}){const o=j(e),l=q(e),i=Pe(e),c=Te(e),m=s=>{if(!s.url)return;const p=fe(he(s.name));if(p)return()=>xe(s.url,p)};return t.jsxs("article",{className:"volter-generation-card","data-state":o,"aria-busy":F(e),"aria-label":C(e),onClickCapture:()=>{c&&$e(e.id).catch(s=>{de.warn(`Could not mark generation as seen: ${s instanceof Error?s.message:String(s)}`,"generations")})},children:[t.jsx("div",{className:"volter-generation-card-media","data-outputs":Math.min(l.length,4),children:l.length===0?t.jsx(Qe,{job:e,state:o}):l.map(s=>t.jsx("div",{className:"volter-generation-output",title:s.path,children:t.jsx(We,{output:s,onOpen:m(s)})},s.path))}),t.jsxs("div",{className:"volter-generation-card-body",children:[t.jsxs("div",{className:"volter-generation-card-heading",children:[t.jsx(h,{variant:"label",truncate:!0,title:C(e),children:C(e)}),t.jsxs(R,{className:"volter-generation-chip","data-state":o,children:[$[o],o==="running"&&e.progress!==void 0?` · ${Math.round(e.progress*100)}%`:""]}),c&&t.jsx(R,{className:"volter-generation-chip","data-state":"new",children:"New"})]}),t.jsxs(h,{variant:"caption",tone:"muted",truncate:!0,title:G(e),children:[e.provider," · ",G(e)]}),t.jsxs(h,{variant:"caption",tone:"dim",children:[_e(e.billing),ze(e.billing)?"":" (est.)"," · ",Be(e)," ·"," ",Me(e.updatedAt)]}),i&&t.jsx("p",{className:"volter-generation-card-prompt",title:i,children:i}),(r??e.pollError)&&t.jsx(B,{tone:r||o==="save-failed"?"error":"warning",className:"volter-generation-card-alert",children:r??(o==="save-failed"?`Could not save into the project: ${e.pollError}`:`Polling will retry: ${e.pollError}`)}),t.jsx(Ye,{job:e,busy:n,error:r,run:a})]})]})}function Ze(){const{jobs:e}=u.useSyncExternalStore(T,x,x),[n,r]=u.useState(null),[a,o]=u.useState({}),l=e.filter(F).length,i=e.filter(s=>j(s)==="saving").length,c=async(s,p)=>{r(s),o(v=>{const f={...v};return delete f[s],f});try{await p()}catch(v){const f=v instanceof Error?v.message:String(v);o(y=>({...y,[s]:f}))}finally{r(null)}},m=ke();return t.jsxs("div",{className:"volter-generation-gallery",children:[t.jsxs(le,{label:"Generations",compact:!0,className:"volter-generation-gallery-bar",children:[t.jsx(h,{variant:"label",children:"Generations"}),t.jsxs(h,{variant:"caption",tone:"muted",children:[e.length," ",e.length===1?"generation":"generations",l>0?` · ${l} running`:"",i>0?` · ${i} saving`:""]}),t.jsx(ce,{}),t.jsx(g,{size:"compact",variant:"ghost",onClick:()=>void Se().then(J),children:"Refresh"}),t.jsx(g,{size:"compact",variant:"primary",onClick:()=>k(),children:"New asset"})]}),m&&t.jsx(B,{tone:"error",className:"volter-generation-gallery-alert",children:m}),e.length===0?t.jsx(P,{className:"volter-generation-gallery-empty",title:"No generated assets yet",description:"Preview generated images, video, audio and models here. Create an asset to get started.",action:t.jsx(g,{size:"compact",variant:"primary",onClick:()=>k(),children:"New asset"})}):t.jsx("section",{className:"volter-generation-grid","aria-label":"Generated assets",children:e.map(s=>t.jsx(Xe,{job:s,busy:n===s.id,error:a[s.id]??null,run:p=>void c(s.id,p)},s.id))})]})}const kt="workspace.service",He="generation";function et(){const e=we(x().jobs);return e>0?{count:e,severity:"info"}:null}function Tt(){const e=[be(),je({...ye.generations,order:15,Content:Ze,badge:et,subscribeBadge:T,badgeSnapshot:Ae,visibleByDefault:!1,closeable:!0}),Ne({id:He,owner:"@volter/editor-game/generation",open:(n,r)=>{if(r.id==="create")return k();const a=x().jobs.find(o=>o.id===r.id);return a?V(a):null},settle:J})];return()=>{for(const n of e)n()}}export{kt as point,Tt as start};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dZ as p,u as o,x as n,c6 as e,v as l,w as t,c4 as d,e1 as c}from"./index-
|
|
1
|
+
import{dZ as p,u as o,x as n,c6 as e,v as l,w as t,c4 as d,e1 as c}from"./index-DRJoiAiV.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const u=d(["queued","running","succeeded","failed","cancelled"]),g=p("route",[o({route:n("mock")}).strict(),o({route:n("managed"),estimatedCredits:e().nonnegative().optional(),settledCredits:e().nonnegative().optional()}).strict(),o({route:n("byok"),currency:n("USD"),estimatedAmount:e().nonnegative().optional(),settledAmount:e().nonnegative().optional()}).strict()]),r=o({tool:t().min(1),input:c()}).strict(),v=o({id:t().min(1),provider:t().min(1),externalId:t().min(1),label:t().min(1),operation:t().min(1),mode:d(["mock","direct","managed"]),status:u,createdAt:t().datetime(),updatedAt:t().datetime(),progress:e().min(0).max(1).optional(),providerStatus:t().optional(),queuePosition:e().int().nonnegative().optional(),message:t().optional(),lastPolledAt:t().datetime().optional(),lastProviderChangeAt:t().datetime().optional(),pollError:t().optional(),pollErrorAt:t().datetime().optional(),pollFailureCount:e().int().nonnegative().optional(),nextPollAt:t().datetime().optional(),billing:g,poll:r,cancel:r.optional(),accept:r.optional(),acceptedAt:t().datetime().optional(),readAt:t().datetime().optional(),provenanceOperationId:t().optional(),outputPaths:l(t()).optional()}).strict(),k=o({version:n(1),jobs:l(v)}).strict();function y(m,s){if(m!=="managed")return{};const{estimatedCredits:i,settledCredits:a}=s;return i===void 0&&a===void 0?{}:{billing:{route:"managed",...i===void 0?{}:{estimatedCredits:i},...a===void 0?{}:{settledCredits:a}}}}export{g as GenerationBillingSchema,v as GenerationJobSchema,u as GenerationJobStatusSchema,k as GenerationJobsDocumentSchema,y as managedBilling};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./jsx-runtime-DPjLkJKQ.js";import{a6 as r,r as a,ad as i}from"./index-
|
|
1
|
+
import{a as s}from"./jsx-runtime-DPjLkJKQ.js";import{a6 as r,r as a,ad as i}from"./index-DRJoiAiV.js";import{r as u}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{s as c,g as o,a as p,b as m}from"./generation-jobs-BuUAWyN7.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";const I="workspace.status",$="Generations",C="left",T=24;function U(){const{jobs:e}=u.useSyncExternalStore(c,o,o),n=p(e),t=e.filter(m).length;return s.jsxs(r,{type:"button",variant:"ghost",size:"compact",className:"volter-status-action","data-testid":"status-generations","aria-label":`Generations, ${n} unseen, ${t} running`,title:`${n} unseen generation results, ${t} running — open Generations`,onClick:()=>a().workspace.showUtility(i.generations.id),children:["Generations · ",n,t>0?` · ${t} running`:""]})}export{C as align,U as default,T as order,I as point,$ as title};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as n}from"./workspace-arrangement-
|
|
1
|
+
import{g as n}from"./workspace-arrangement-BObBMabU.js";function r(t){const o=n(t,"volterComponentRoot");return typeof o=="string"&&o?o:void 0}function i(t){return n(t,"volterBuiltInternal")===!0}export{r as c,i};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{kE as E,w as l,u as y,kF as P,v as b,b3 as T}from"./index-
|
|
1
|
+
import{kE as E,w as l,u as y,kF as P,v as b,b3 as T}from"./index-DRJoiAiV.js";import{i as x}from"./relative-path-guard-GiM7Lsz8.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const d=".volter/assets.json",k=y({key:l().min(1),license:l().min(1).optional(),sourceHash:l().regex(/^sha256-[a-f0-9]{64}$/,'sourceHash must be "sha256-<64 hex>"').optional(),materializedAt:l().datetime()}).strict(),O=E(l().min(1),k);function z(e){if(!/^[a-f0-9]{64}$/.test(e))throw new Error(`Not a sha256 digest, refusing to record it as a sourceHash: ${e}`);return`sha256-${e}`}function m(e){const t=e.replaceAll("\\","/").replace(/^\.\//,"").replace(/^\/+/,"");if(!t)throw new Error("An asset ledger path cannot be empty.");if(!x(t))throw new Error(`An asset ledger path cannot escape the project: ${e}`);return t}function _(e){return O.parse(e)}function D(e){if(e==null||e.trim()==="")return{};let t;try{t=JSON.parse(e)}catch(s){throw new Error(`${d} is not valid JSON: ${String(s)}`)}return _(t)}function I(e,t,s){const r=m(t),n=k.parse(s),a={...e,[r]:n},i={};for(const u of Object.keys(a).sort())i[u]=a[u];return i}function M(e){const t={};for(const s of Object.keys(e).sort())t[s]=e[s];return`${JSON.stringify(t,null,2)}
|
|
2
2
|
`}function U(e,t,s){const r=globalThis.navigator?.locks;return r?r.request(`volter:${e}:${P(t)}`,s):s()}const H=1e4,N=15;function j(){return globalThis.crypto?.randomUUID?.()??`${Date.now()}-${Math.random()}`}async function R(e,t,s={}){const r=s.staleAfterMs??H,n=s.retryDelayMs??N,a=s.now??Date.now,i=s.sleep??(o=>new Promise(c=>setTimeout(c,o))),u=s.token??j;for(;;){const o=JSON.stringify({at:a(),owner:s.owner??"unknown",token:u()});if(await e.createIfAbsent(o))try{return await t()}finally{await e.removeIfHeldBy(o)}const c=await e.read();if(c!==null){if(a()-B(c)>r){await e.removeIfHeldBy(c);continue}await i(n)}}}function B(e){try{const t=JSON.parse(e);return typeof t.at=="number"?t.at:0}catch{return 0}}function F(){const e=new Map;return(t,s)=>{const n=(e.get(t)??Promise.resolve()).then(s,s),a=n.then(()=>{},()=>{});return e.set(t,a),a.then(()=>{e.get(t)===a&&e.delete(t)}),n}}async function S(e){return await e.exists(d)?D(await e.read(d)):{}}async function J(e,t){await e.write(d,M(t))}const f=`${d}.lock`,C=F(),A=new WeakMap;let $=0;function K(e){const t=A.get(e);if(t!==void 0)return t;$+=1;const s=`${e.id}#${$}`;return A.set(e,s),s}async function W(e,t){const s={key:t.key,...t.license?{license:t.license}:{},...t.sourceSha256?{sourceHash:z(t.sourceSha256)}:{},materializedAt:t.materializedAt??new Date().toISOString()};await C(K(e),()=>R({createIfAbsent:r=>e.writeIfAbsent(f,r),read:async()=>await e.exists(f)?e.read(f):null,removeIfHeldBy:r=>U(e.id,f,async()=>{await e.exists(f)&&await e.read(f)===r&&await e.remove(f)})},async()=>{const r=await S(e);await J(e,I(r,m(t.destPath),s))},{owner:e.id}))}const G=y({key:l().regex(/^[^:]+:.+$/,'An asset key must be "source:id"'),dest:l().min(1),sha256:l().regex(/^[a-f0-9]{64}$/,"A pack entry must pin the sha256 of its bytes as 64 lowercase hex digits")}).strict(),Y=y({packs:E(l().min(1),b(G))}).strict();function q(e){return Y.parse(e)}function V(e){const t=[],s=new Map;for(const[r,n]of Object.entries(e.packs))for(const a of n){const i=s.get(a.dest);if(i!==void 0)throw new Error(`Two packs declare the same destination "${a.dest}": "${i}" and "${r}".`);s.set(a.dest,r),t.push({...a,pack:r})}return t}const w="asset-manifest.json",v="https://volter-asset-library.aaron-0ed.workers.dev";function L(e){return(e.baseUrl??v).replace(/\/+$/,"")}function Q(e){return e.signal?{signal:e.signal}:{}}async function X(e,t={}){const s=L(t),r=await fetch(`${s}/v1/assets/${encodeURIComponent(e)}`,Q(t));if(!r.ok)return null;const n=await r.json();return!n||typeof n!="object"||!Array.isArray(n.files)?null:n}function Z(e,t,s,r){return`${L(e?{baseUrl:e}:{})}/v1/assets/${encodeURIComponent(t)}/files/${s}`}async function he(e,t={}){const s=await ee(e),r={declared:s.length,materialized:[],alreadyPresent:[],failed:[]};if(s.length===0)return r;const n=await S(e);for(const a of s){if(t.signal?.aborted)break;if(n[m(a.dest)]&&await e.exists(a.dest)){r.alreadyPresent.push(a),t.onProgress?.(a,"already-present");continue}try{await te(e,a,t),r.materialized.push(a),t.onProgress?.(a,"materialized")}catch(i){r.failed.push({entry:a,reason:i instanceof Error?i.message:String(i)}),t.onProgress?.(a,"failed")}}return r}async function ee(e){if(!await e.exists(w))return[];const t=await e.read(w);let s;try{s=JSON.parse(t)}catch(r){throw new Error(`${w} is not valid JSON: ${r instanceof Error?r.message:String(r)}`)}return V(q(s))}async function te(e,t,s){const r=await se(t,s);await e.write(t.dest,r.bytes),await W(e,{destPath:t.dest,key:t.key,license:r.license,sourceSha256:t.sha256})}async function se(e,t={}){const s=e.key.indexOf(":");if(s<0)throw new Error(`Malformed asset key "${e.key}" (expected "source:id").`);const r=e.key.slice(0,s),n=e.key.slice(s+1);if(r!=="local")throw new Error(`Asset key "${e.key}": only the "local" (cloud-hosted) source can be materialized from the cloud worker.`);const a=t.baseUrl??v,i=t.signal?{baseUrl:a,signal:t.signal}:{baseUrl:a},u=await X(n,i);if(!u)throw new Error(`"${e.key}" is not hosted by the cloud asset library.`);const o=u.files[0];if(!o)throw new Error(`"${e.key}" has no files in the cloud library.`);if(o.dependencies.length>0)throw new Error(`"${e.key}" has ${o.dependencies.length} dependency file(s) — a pack entry names exactly one destination file.`);if(o.main.sha256!==e.sha256)throw new Error(`"${e.key}" → ${e.dest}: the cloud library reports sha256:${o.main.sha256} but ${w} pins sha256:${e.sha256}. Nothing was fetched or written; the pin is only re-cut by a reviewed change to the declaration.`);const c=Z(a,n,0),h=await fetch(c,t.signal?{signal:t.signal}:{});if(!h.ok)throw new Error(`${c} returned ${h.status} ${h.statusText}.`);const p=new Uint8Array(await h.arrayBuffer()),g=await T(p);if(g!==e.sha256)throw new Error(`"${e.key}" → ${e.dest}: ${c} delivered sha256:${g} but the declaration pins sha256:${e.sha256}. Nothing was written.`);return{bytes:p,license:u.license}}export{w as ASSET_MANIFEST_PATH,se as fetchVerifiedPackEntry,he as materializeDeclaredAssetPacks};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CameraDescriptorSchema as f}from"./camera-
|
|
1
|
+
import{CameraDescriptorSchema as f}from"./camera-DxvGFUDv.js";import{ColliderDescriptorSchema as x}from"./collider-BtrzK5a6.js";import{LightDescriptorSchema as l}from"./light-CE6NgHF9.js";import{MaterialDescriptorSchema as M}from"./material-zKBBqKni.js";import{MeshDescriptorSchema as d}from"./mesh-DjuPgmvl.js";import{ParticlesDescriptorSchema as T}from"./particles-D6nJ6TG7.js";import{PostProcessingDescriptorSchema as v,RenderEnvironmentSchema as E,ToneMappingDescriptorSchema as L}from"./render-env-CR3xqTzh.js";import{QuatSchema as R,TransformSchema as V,Vec3Schema as b}from"./tuples-DSpmK3Ut.js";import"./index-DRJoiAiV.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./render-features-QKGS1jBi.js";export{f as CameraDescriptorSchema,x as ColliderDescriptorSchema,l as LightDescriptorSchema,M as MaterialDescriptorSchema,d as MeshDescriptorSchema,T as ParticlesDescriptorSchema,v as PostProcessingDescriptorSchema,R as QuatSchema,E as RenderEnvironmentSchema,L as ToneMappingDescriptorSchema,V as TransformSchema,b as Vec3Schema};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bA as nt,aN as st,al as ot,e4 as E,dV as U,a6 as at,e6 as rt,e5 as it}from"./index-CQ2mBTB3.js";import{hp as wt,hq as Rt,hr as Nt,aS as _t,dX as Ct,hs as Ft,ht as Ot,hu as kt,hv as Lt,hw as jt,hx as Bt,hy as Gt,eJ as Pt,hz as Ht,e_ as $t,hA as zt,hB as Wt,hC as Vt,hD as Kt,hE as Jt,dz as Ut,hF as qt,bQ as Yt,a7 as Qt,eq as Xt,bP as Zt,h1 as te,hG as ee,hH as ne,bv as se,hI as oe,hJ as ae,hK as re,eY as ie,fe as ce,hL as ue,ff as le,hM as de,d9 as pe,hN as fe,aM as he,df as me,hO as xe,hP as Ee,hQ as ge,dg as Se,f1 as Te,fz as be,bB as De,bC as Me,fN as ye,hR as Ae,hS as Ie,aT as ve,hT as we,hU as Re,aU as Ne,bH as _e,hV as Ce,db as Fe,de as Oe,eB as ke,hW as Le,hX as je,aL as Be,e$ as Ge,hY as Pe,hZ as He,gK as $e,h_ as ze,bw as We,h$ as Ve,i0 as Ke,es as Je,i1 as Ue,i2 as qe,i3 as Ye,i4 as Qe,i5 as Xe,eo as Ze,ep as tn,i6 as en,i7 as nn,i8 as sn,i9 as on,ev as an,ia as rn,ib as cn,ic as un,id as ln,ie as dn,a8 as pn,ig as fn,ih as hn,ii as mn,ij as xn,ik as En,il as gn,ew as Sn,im as Tn,io as bn,et as Dn,ip as Mn,iq as yn,ir as An,dA as In,is as vn,it as wn,iu as Rn,iv as Nn,iw as _n,ix as Cn,iy as Fn,eW as On,iz as kn,iA as Ln,iB as jn,iC as Bn,iD as Gn,iE as Pn,ex as Hn,iF as $n,iG as zn,iH as Wn,f0 as Vn,iI as Kn,iJ as Jn,iK as Un,iL as qn,dq as Yn,er as Qn,iM as Xn,iN as Zn,iO as ts,eu as es,iP as ns,aZ as ss,dW as os,iQ as as,iR as rs,iS as is,dp as cs}from"./index-CQ2mBTB3.js";import{C as ls}from"./ColorInput-BwQW6U_s.js";import{a as p}from"./jsx-runtime-DPjLkJKQ.js";import{r as b}from"./index-nmcBqr7Y.js";import{A as ps,k as fs,B as hs,a as ms,D as xs,l as Es,F as gs,h as Ss,G as Ts,m as bs,Q as Ds,S as Ms,f as ys,n as As,T as Is,d as vs,c as ws,g as Rs,i as Ns,j as _s,b as Cs,p as Fs,e as Os,u as ks,o as Ls}from"./ShadowEditor-_VQupFN-.js";import{a as Bs,C as Gs,h as Ps,p as Hs,t as $s}from"./ColorPicker-BW6cWcGu.js";import"./index-CtzuWnCS.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";function Dt({preview:t,children:e,...r}){const[o,a]=b.useState(!1),l=b.useRef(null),c=b.useId(),s=()=>a(!1),d=i=>{l.current=i,a(!0)};let m=e;if(b.isValidElement(e)){const i=[e.props["aria-describedby"],o?c:null].filter(Boolean).join(" ");m=b.cloneElement(e,i?{"aria-describedby":i}:{})}return p.jsxs("span",{className:"volter-tooltip-anchor",onMouseEnter:i=>d(i.currentTarget),onMouseLeave:s,onFocusCapture:i=>d(i.currentTarget),onBlurCapture:i=>{i.currentTarget.contains(i.relatedTarget)||s()},onKeyDown:i=>{i.key!=="Escape"||!o||(i.preventDefault(),i.stopPropagation(),s())},children:[m,o&&l.current&&p.jsx(nt,{...r,anchorRef:l,id:c,role:"tooltip",autoFocusFirst:!1,onDismiss:s,children:t})]})}function Mt({value:t,onCommit:e,style:r,disabled:o=!1}){const a=t===void 0?"":JSON.stringify(t),[l,c]=b.useState(a),[s,d]=b.useState(!1),m=b.useRef(!1);b.useEffect(()=>{c(a),d(!1)},[a]);const i=()=>{if(m.current){m.current=!1;return}if(l===a){d(!1);return}let h;try{h=JSON.parse(l)}catch{d(!0);return}d(!1),e(h)};return p.jsxs("div",{children:[p.jsx(st,{"data-testid":"json-input","aria-invalid":s||void 0,"data-tone":s?"danger":void 0,disabled:o,value:l,onChange:h=>{c(h.target.value),s&&d(!1)},onBlur:i,onKeyDown:h=>{h.key==="Enter"?i():h.key==="Escape"&&(m.current=!0,c(a),d(!1),h.target.blur())},style:r,title:s?"Not valid JSON — nothing written. Fix the JSON or press Escape to revert.":void 0}),s&&p.jsx("div",{"data-testid":"json-input-error",style:{fontSize:"var(--volter-font-sm)",color:ot.semantic.danger,marginTop:2},children:"Not valid JSON — nothing written. Fix the JSON or press Escape to revert."})]})}function v(t,e){return e+1<t.length?t[e+1].start:1}function ct(t){const e=t.map(o=>({time:o.start,value:o.function.p0})),r=t[t.length-1];return r&&e.push({time:1,value:r.function.p3}),e}function G(t){return t.map(e=>({start:e.start,function:{...e.function}}))}const B=.01;function C(t,e,r,o){const a=G(t),l=a.length;if(e<0||e>l)return a;if(e<l){const c=a[e],s=o-c.function.p0;if(c.function.p0=o,c.function.p1+=s,e>0){const d=a[e-1],m=o-d.function.p3;d.function.p3=o,d.function.p2+=m;const i=d.start+B,h=v(a,e)-B;c.start=Math.min(h,Math.max(i,r))}}else{const c=a[l-1],s=o-c.function.p3;c.function.p3=o,c.function.p2+=s}return a}function q(t,e,r,o){const a=G(t);return r==="out"&&e<a.length?a[e].function.p1=o:r==="in"&&e>0&&e<=a.length&&(a[e-1].function.p2=o),a}function M(t,e,r){return t+(e-t)*r}function yt(t,e){for(let r=0;r<t.length;r++){const o=t[r].start,a=v(t,r);if(e>=o&&e<=a){const l=a>o?(e-o)/(a-o):0,{p0:c,p1:s,p2:d,p3:m}=t[r].function,i=M(c,s,l),h=M(s,d,l),g=M(d,m,l),A=M(i,h,l),I=M(h,g,l);return M(A,I,l)}}return 0}function ut(t,e){for(let r=0;r<t.length;r++){const o=t[r].start,a=v(t,r);if(e<=o+B||e>=a-B||e<o||e>a)continue;const l=(e-o)/(a-o),{p0:c,p1:s,p2:d,p3:m}=t[r].function,i=M(c,s,l),h=M(s,d,l),g=M(d,m,l),A=M(i,h,l),I=M(h,g,l),D=M(A,I,l),S=G(t);return S.splice(r,1,{start:o,function:{p0:c,p1:i,p2:A,p3:D}},{start:e,function:{p0:D,p1:I,p2:g,p3:m}}),S}return t}function Y(t,e){if(e<=0||e>=t.length)return t;const r=t[e-1],o=t[e],a=o.start-r.start,l=v(t,e)-o.start,c=a+l;if(c<=0)return t;const s=r.function,d=o.function,m={start:r.start,function:{p0:s.p0,p1:s.p0+(s.p1-s.p0)*(a>0?c/a:1),p2:d.p3+(d.p2-d.p3)*(l>0?c/l:1),p3:d.p3}},i=G(t);return i.splice(e-1,2,m),i}function lt(t){let e=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(const o of t)for(const a of[o.function.p0,o.function.p1,o.function.p2,o.function.p3])a<e&&(e=a),a>r&&(r=a);return!Number.isFinite(e)||!Number.isFinite(r)?{min:0,max:1}:{min:e,max:r}}const F=34,Q=6,V=6,dt=14,j=260;function pt(t){return Math.abs(t)>=100?t.toFixed(0):Math.abs(t)>=1?String(Math.round(t*100)/100):String(Math.round(t*1e3)/1e3)}function At({value:t,onChange:e,onChangeEnd:r,disabled:o,height:a=90,color:l,testId:c="curve-editor"}){const[s,d]=b.useState(0),m=b.useRef(null),i=b.useRef(null),h=b.useMemo(()=>ct(t),[t]),g=b.useMemo(()=>{const{min:n,max:u}=lt(t);if(u-n<1e-6)return{min:n-1,max:u+1};const f=(u-n)*.1;return{min:n-f,max:u+f}},[t]),A=j-F-Q,I=a-V-dt,D=n=>F+n*A,S=n=>V+(1-(n-g.min)/(g.max-g.min))*I,X=n=>Math.max(0,Math.min(1,(n-F)/A)),Z=n=>g.min+(1-(n-V)/I)*(g.max-g.min),P=n=>{const u=m.current?.getBoundingClientRect();if(!u)return{t:0,v:0};const f=(n.clientX-u.left)/u.width*j,T=(n.clientY-u.top)/u.height*a;return{t:X(f),v:Z(T)}},tt=b.useMemo(()=>{if(t.length===0)return"";let n=`M ${D(t[0].start)} ${S(t[0].function.p0)}`;for(let u=0;u<t.length;u++){const f=t[u],T=v(t,u),y=T-f.start;n+=` C ${D(f.start+y/3)} ${S(f.function.p1)}, ${D(f.start+2*y/3)} ${S(f.function.p2)}, ${D(T)} ${S(f.function.p3)}`}return n},[t,g,a]),w=n=>rt({onChange:e,onChangeEnd:r},n),H=n=>it({onChange:e},n),$=(n,u)=>{if(o)return;n.preventDefault(),n.stopPropagation(),i.current=t;const f=y=>{const{t:_,v:W}=P(y),L=u(i.current??t,_,W);i.current=L,H(L)},T=y=>{const{t:_,v:W}=P(y),L=u(i.current??t,_,W);i.current=null,w(L),window.removeEventListener("pointermove",f),window.removeEventListener("pointerup",T)};window.addEventListener("pointermove",f),window.addEventListener("pointerup",T)},K=l??E.accent,J=t.length,x=h[s],z=s>0&&s<J,O=s<J?t[s]:void 0,k=s>0?t[s-1]:void 0,R=O?{x:D(O.start+(v(t,s)-O.start)/3),y:S(O.function.p1)}:null,N=k?{x:D(k.start+(v(t,s-1)-k.start)*2/3),y:S(k.function.p2)}:null,et=[g.min,(g.min+g.max)/2,g.max];return p.jsxs("div",{"data-testid":c,children:[p.jsxs("svg",{ref:m,"data-testid":`${c}-plot`,viewBox:`0 0 ${j} ${a}`,style:{width:"100%",height:a,display:"block",background:E.inputBg,border:`1px solid ${E.border}`,borderRadius:E.radiusSmall,touchAction:"none",outline:"none"},tabIndex:0,role:"application","aria-label":"Curve editor",onKeyDown:n=>{(n.key==="Delete"||n.key==="Backspace")&&z&&!o&&(n.preventDefault(),w(Y(t,s)),d(Math.max(0,s-1)))},onDoubleClick:n=>{if(o)return;const{t:u}=P(n),f=ut(t,u);f!==t&&(w(f),d(f.findIndex(T=>Math.abs(T.start-u)<1e-6)))},children:[et.map(n=>p.jsxs("g",{children:[p.jsx("line",{x1:F,x2:j-Q,y1:S(n),y2:S(n),stroke:E.border,strokeWidth:.5}),p.jsx("text",{x:F-3,y:S(n)+2.5,fontSize:7,fill:E.textMuted,textAnchor:"end",children:pt(n)})]},n)),[0,.5,1].map(n=>p.jsx("text",{x:D(n),y:a-3,fontSize:7,fill:E.textMuted,textAnchor:"middle",children:n},n)),p.jsx("path",{d:tt,fill:"none",stroke:K,strokeWidth:1.5}),x&&R&&p.jsxs("g",{children:[p.jsx("line",{x1:D(x.time),y1:S(x.value),x2:R.x,y2:R.y,stroke:E.textMuted,strokeDasharray:"2 2",strokeWidth:.75}),p.jsx("circle",{"data-testid":`${c}-tangent-out`,cx:R.x,cy:R.y,r:3,fill:E.surface,stroke:E.textMuted,style:{cursor:o?"not-allowed":"ns-resize"},onPointerDown:n=>$(n,(u,f,T)=>q(u,s,"out",T))})]}),x&&N&&p.jsxs("g",{children:[p.jsx("line",{x1:D(x.time),y1:S(x.value),x2:N.x,y2:N.y,stroke:E.textMuted,strokeDasharray:"2 2",strokeWidth:.75}),p.jsx("circle",{"data-testid":`${c}-tangent-in`,cx:N.x,cy:N.y,r:3,fill:E.surface,stroke:E.textMuted,style:{cursor:o?"not-allowed":"ns-resize"},onPointerDown:n=>$(n,(u,f,T)=>q(u,s,"in",T))})]}),h.map((n,u)=>p.jsx("circle",{"data-testid":`${c}-key-${u}`,cx:D(n.time),cy:S(n.value),r:4,fill:u===s?E.accent:E.surface,stroke:u===s?E.onAccent:K,strokeWidth:1.25,style:{cursor:o?"not-allowed":"move"},onPointerDown:f=>{d(u),$(f,(T,y,_)=>C(T,u,y,_))}},u))]}),p.jsxs("div",{style:{display:"flex",gap:4,alignItems:"center",marginTop:3},children:[p.jsxs("span",{style:{fontSize:9,color:E.textMuted,flex:"0 0 auto"},children:["Key ",s+1,"/",h.length]}),p.jsx(U,{label:"t",value:x?Math.round(x.time*1e3)/1e3:null,step:.05,testId:`${c}-key-time`,onChange:n=>{x&&H(C(t,s,n,x.value))},onChangeEnd:n=>{x&&w(C(t,s,n,x.value))}}),p.jsx(U,{label:"v",value:x?Math.round(x.value*1e3)/1e3:null,step:.05,testId:`${c}-key-value`,onChange:n=>{x&&H(C(t,s,x.time,n))},onChangeEnd:n=>{x&&w(C(t,s,x.time,n))}}),p.jsx(at,{type:"button",variant:"ghost",size:"compact","data-testid":`${c}-delete-key`,disabled:!z||o===!0,"aria-label":"Delete curve key",title:z?"Delete key":"Endpoint keys cannot be deleted",onClick:()=>{w(Y(t,s)),d(Math.max(0,s-1))},children:"×"})]})]})}export{wt as Actions,ps as AlignmentGrid,fs as AnchorPresets,nt as AnchoredMenu,Rt as AssetSlotPicker,hs as BorderEditor,ms as BorderRadiusEditor,at as Button,Nt as CLASSIC_MATERIAL,_t as Checkbox,ls as ColorInput,Bs as ColorPicker,Gs as ColorSwatch,Ct as ColorSwatchInput,At as CurveEditor,Ft as DEFAULT_ICON_SET_ID,xs as DEFAULT_SHADOW,Es as DEFAULT_TEXT_SHADOW,Ot as Dialog,kt as DialogBody,Lt as DialogField,jt as DialogFieldLabel,Bt as DialogFooter,Gt as DialogHeader,Pt as DisclosureIcon,Ht as Divider,$t as DraftTextInput,zt as DropIndicator,Wt as EDITOR_CATEGORY_NAMES,Vt as EDITOR_MATERIALS,Kt as EDITOR_MATERIAL_IDS,Jt as EDITOR_REGION_NAMES,Ut as EDITOR_THEME_CLASS,qt as EditorBadge,Yt as EditorBanner,Qt as EditorIcon,Xt as EditorListButton,Zt as EditorPopover,te as EditorSurface,ee as EditorTab,ne as EditorTabList,se as EditorToolbar,oe as EditorTree,ae as EditorTreeRow,re as FONT,ie as FONT_MONO,ce as FieldGroup,ue as FieldLabel,le as FieldRow,de as FileInput,gs as FilterEditor,pe as FloatingToolbar,Ss as FontPicker,fe as GLASS_MATERIAL,Ts as GradientEditor,bs as GradientStopsTrack,Dt as HoverPreview,he as IconButton,me as Inline,xe as InteractiveEditScopeContext,Ee as JoinedField,ge as JoinedFieldSuffix,Mt as JsonInput,Se as Keycap,Te as LABEL_COL_WIDTH,be as Menu,De as MenuItem,Me as MenuSeparator,ye as MenuSubmenu,Ae as MenuTrigger,U as NumberInput,Ie as Panel,Ds as QuarksGradientEditor,ve as RangeInput,we as ResizeHandle,Re as STAGE_WORD_MODES,Ms as ScrubbableInput,Ne as SectionHeader,_e as Select,ys as ShadowEditor,As as ShadowListEditor,Ce as Spacer,Fe as SplitButtonGroup,Oe as Stack,ke as StateSurface,E as THEME,Le as TONE_ERROR,je as TONE_WARNING,Be as Text,Ge as TextArea,st as TextInput,Is as TextShadowEditor,Pe as ThemeRootPortal,He as ToggleButton,$e as ToolbarDivider,ze as ToolbarGroup,We as Tooltip,Ve as TreeDisclosureIcon,Ke as Vec3Input,Je as accent,Ue as accentMuted,qe as activeIconGlyph,Ye as activeIconSetSnapshot,Qe as applyEditorTheme,Xe as areaEmbossValue,Ze as bg,tn as border,en as chromeSize,nn as clampRectToViewport,sn as composeEditorAppearance,vs as composeFilter,ws as composeGradient,Rs as composeShadows,on as controlSize,ct as curveKeys,lt as curveValueRange,an as danger,rn as dangerFaint,cn as dangerMuted,Y as deleteKey,un as dynamic,ln as dynamicBg,dn as editorIconSets,pn as editorIcons,fn as editorMaterials,hn as editorThemeVariables,mn as editorThemes,xn as fieldLabelStyle,it as fireChange,rt as fireEnd,En as focusFirstMenuItem,gn as focusRing,Sn as fontMono,Tn as fontSans,bn as fontSize,Dn as fontSizeVar,Mn as fontWeight,yn as glassDarkEditorTheme,An as glassDarkLiteEditorTheme,In as graphiteDarkEditorTheme,vn as graphiteNeutralEditorTheme,wn as groupLabelStyle,Ps as hexToRgb,Rn as iconSize,Nn as isEditorIconSetId,_n as isEditorMaterialId,Cn as isEditorThemeId,Ns as isUniformBorder,_s as isUniformRadius,Fn as lineHeight,On as lineHeightVar,kn as liquidGlassEditorTheme,Ln as liquidGlassLiteEditorTheme,jn as midnightHighContrastEditorTheme,Bn as motion,Gn as motionVar,C as moveKey,q as moveTangent,Hs as parseAlpha,Cs as parseFilterFunctions,Fs as parseGradient,Pn as parseNumericValue,Os as parseShadows,Hn as radius,$n as regionRowAltValue,zn as registerContributedIconSet,Wn as registerContributedMaterial,Vn as rowStyle,yt as sampleCurve,Kn as scrim,v as segmentEnd,Jn as selection,Un as setActiveIconSet,qn as shadow,Yn as space,Qn as spaceVar,ut as splitAt,Xn as strokeWidth,Zn as subscribeEditorMaterials,ts as subscribeIconSets,es as success,ns as successMuted,ss as text,ot as themeVars,$s as toHex,ks as uniformBorder,Ls as uniformRadius,os as useInteractiveEditScope,as as usesGlassMaterial,rs as warn,is as warnMuted,cs as zIndex};
|
|
1
|
+
import{bA as nt,aN as st,al as ot,e4 as E,dV as U,a6 as at,e6 as rt,e5 as it}from"./index-DRJoiAiV.js";import{hp as wt,hq as Rt,hr as Nt,aS as _t,dX as Ct,hs as Ft,ht as Ot,hu as kt,hv as Lt,hw as jt,hx as Bt,hy as Gt,eJ as Pt,hz as Ht,e_ as $t,hA as zt,hB as Wt,hC as Vt,hD as Kt,hE as Jt,dz as Ut,hF as qt,bQ as Yt,a7 as Qt,eq as Xt,bP as Zt,h1 as te,hG as ee,hH as ne,bv as se,hI as oe,hJ as ae,hK as re,eY as ie,fe as ce,hL as ue,ff as le,hM as de,d9 as pe,hN as fe,aM as he,df as me,hO as xe,hP as Ee,hQ as ge,dg as Se,f1 as Te,fz as be,bB as De,bC as Me,fN as ye,hR as Ae,hS as Ie,aT as ve,hT as we,hU as Re,aU as Ne,bH as _e,hV as Ce,db as Fe,de as Oe,eB as ke,hW as Le,hX as je,aL as Be,e$ as Ge,hY as Pe,hZ as He,gK as $e,h_ as ze,bw as We,h$ as Ve,i0 as Ke,es as Je,i1 as Ue,i2 as qe,i3 as Ye,i4 as Qe,i5 as Xe,eo as Ze,ep as tn,i6 as en,i7 as nn,i8 as sn,i9 as on,ev as an,ia as rn,ib as cn,ic as un,id as ln,ie as dn,a8 as pn,ig as fn,ih as hn,ii as mn,ij as xn,ik as En,il as gn,ew as Sn,im as Tn,io as bn,et as Dn,ip as Mn,iq as yn,ir as An,dA as In,is as vn,it as wn,iu as Rn,iv as Nn,iw as _n,ix as Cn,iy as Fn,eW as On,iz as kn,iA as Ln,iB as jn,iC as Bn,iD as Gn,iE as Pn,ex as Hn,iF as $n,iG as zn,iH as Wn,f0 as Vn,iI as Kn,iJ as Jn,iK as Un,iL as qn,dq as Yn,er as Qn,iM as Xn,iN as Zn,iO as ts,eu as es,iP as ns,aZ as ss,dW as os,iQ as as,iR as rs,iS as is,dp as cs}from"./index-DRJoiAiV.js";import{C as ls}from"./ColorInput-CNmM7uhc.js";import{a as p}from"./jsx-runtime-DPjLkJKQ.js";import{r as b}from"./index-nmcBqr7Y.js";import{A as ps,k as fs,B as hs,a as ms,D as xs,l as Es,F as gs,h as Ss,G as Ts,m as bs,Q as Ds,S as Ms,f as ys,n as As,T as Is,d as vs,c as ws,g as Rs,i as Ns,j as _s,b as Cs,p as Fs,e as Os,u as ks,o as Ls}from"./ShadowEditor-DllgEu0Y.js";import{a as Bs,C as Gs,h as Ps,p as Hs,t as $s}from"./ColorPicker-ClJhDMrd.js";import"./index-CtzuWnCS.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";function Dt({preview:t,children:e,...r}){const[o,a]=b.useState(!1),l=b.useRef(null),c=b.useId(),s=()=>a(!1),d=i=>{l.current=i,a(!0)};let m=e;if(b.isValidElement(e)){const i=[e.props["aria-describedby"],o?c:null].filter(Boolean).join(" ");m=b.cloneElement(e,i?{"aria-describedby":i}:{})}return p.jsxs("span",{className:"volter-tooltip-anchor",onMouseEnter:i=>d(i.currentTarget),onMouseLeave:s,onFocusCapture:i=>d(i.currentTarget),onBlurCapture:i=>{i.currentTarget.contains(i.relatedTarget)||s()},onKeyDown:i=>{i.key!=="Escape"||!o||(i.preventDefault(),i.stopPropagation(),s())},children:[m,o&&l.current&&p.jsx(nt,{...r,anchorRef:l,id:c,role:"tooltip",autoFocusFirst:!1,onDismiss:s,children:t})]})}function Mt({value:t,onCommit:e,style:r,disabled:o=!1}){const a=t===void 0?"":JSON.stringify(t),[l,c]=b.useState(a),[s,d]=b.useState(!1),m=b.useRef(!1);b.useEffect(()=>{c(a),d(!1)},[a]);const i=()=>{if(m.current){m.current=!1;return}if(l===a){d(!1);return}let h;try{h=JSON.parse(l)}catch{d(!0);return}d(!1),e(h)};return p.jsxs("div",{children:[p.jsx(st,{"data-testid":"json-input","aria-invalid":s||void 0,"data-tone":s?"danger":void 0,disabled:o,value:l,onChange:h=>{c(h.target.value),s&&d(!1)},onBlur:i,onKeyDown:h=>{h.key==="Enter"?i():h.key==="Escape"&&(m.current=!0,c(a),d(!1),h.target.blur())},style:r,title:s?"Not valid JSON — nothing written. Fix the JSON or press Escape to revert.":void 0}),s&&p.jsx("div",{"data-testid":"json-input-error",style:{fontSize:"var(--volter-font-sm)",color:ot.semantic.danger,marginTop:2},children:"Not valid JSON — nothing written. Fix the JSON or press Escape to revert."})]})}function v(t,e){return e+1<t.length?t[e+1].start:1}function ct(t){const e=t.map(o=>({time:o.start,value:o.function.p0})),r=t[t.length-1];return r&&e.push({time:1,value:r.function.p3}),e}function G(t){return t.map(e=>({start:e.start,function:{...e.function}}))}const B=.01;function C(t,e,r,o){const a=G(t),l=a.length;if(e<0||e>l)return a;if(e<l){const c=a[e],s=o-c.function.p0;if(c.function.p0=o,c.function.p1+=s,e>0){const d=a[e-1],m=o-d.function.p3;d.function.p3=o,d.function.p2+=m;const i=d.start+B,h=v(a,e)-B;c.start=Math.min(h,Math.max(i,r))}}else{const c=a[l-1],s=o-c.function.p3;c.function.p3=o,c.function.p2+=s}return a}function q(t,e,r,o){const a=G(t);return r==="out"&&e<a.length?a[e].function.p1=o:r==="in"&&e>0&&e<=a.length&&(a[e-1].function.p2=o),a}function M(t,e,r){return t+(e-t)*r}function yt(t,e){for(let r=0;r<t.length;r++){const o=t[r].start,a=v(t,r);if(e>=o&&e<=a){const l=a>o?(e-o)/(a-o):0,{p0:c,p1:s,p2:d,p3:m}=t[r].function,i=M(c,s,l),h=M(s,d,l),g=M(d,m,l),A=M(i,h,l),I=M(h,g,l);return M(A,I,l)}}return 0}function ut(t,e){for(let r=0;r<t.length;r++){const o=t[r].start,a=v(t,r);if(e<=o+B||e>=a-B||e<o||e>a)continue;const l=(e-o)/(a-o),{p0:c,p1:s,p2:d,p3:m}=t[r].function,i=M(c,s,l),h=M(s,d,l),g=M(d,m,l),A=M(i,h,l),I=M(h,g,l),D=M(A,I,l),S=G(t);return S.splice(r,1,{start:o,function:{p0:c,p1:i,p2:A,p3:D}},{start:e,function:{p0:D,p1:I,p2:g,p3:m}}),S}return t}function Y(t,e){if(e<=0||e>=t.length)return t;const r=t[e-1],o=t[e],a=o.start-r.start,l=v(t,e)-o.start,c=a+l;if(c<=0)return t;const s=r.function,d=o.function,m={start:r.start,function:{p0:s.p0,p1:s.p0+(s.p1-s.p0)*(a>0?c/a:1),p2:d.p3+(d.p2-d.p3)*(l>0?c/l:1),p3:d.p3}},i=G(t);return i.splice(e-1,2,m),i}function lt(t){let e=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(const o of t)for(const a of[o.function.p0,o.function.p1,o.function.p2,o.function.p3])a<e&&(e=a),a>r&&(r=a);return!Number.isFinite(e)||!Number.isFinite(r)?{min:0,max:1}:{min:e,max:r}}const F=34,Q=6,V=6,dt=14,j=260;function pt(t){return Math.abs(t)>=100?t.toFixed(0):Math.abs(t)>=1?String(Math.round(t*100)/100):String(Math.round(t*1e3)/1e3)}function At({value:t,onChange:e,onChangeEnd:r,disabled:o,height:a=90,color:l,testId:c="curve-editor"}){const[s,d]=b.useState(0),m=b.useRef(null),i=b.useRef(null),h=b.useMemo(()=>ct(t),[t]),g=b.useMemo(()=>{const{min:n,max:u}=lt(t);if(u-n<1e-6)return{min:n-1,max:u+1};const f=(u-n)*.1;return{min:n-f,max:u+f}},[t]),A=j-F-Q,I=a-V-dt,D=n=>F+n*A,S=n=>V+(1-(n-g.min)/(g.max-g.min))*I,X=n=>Math.max(0,Math.min(1,(n-F)/A)),Z=n=>g.min+(1-(n-V)/I)*(g.max-g.min),P=n=>{const u=m.current?.getBoundingClientRect();if(!u)return{t:0,v:0};const f=(n.clientX-u.left)/u.width*j,T=(n.clientY-u.top)/u.height*a;return{t:X(f),v:Z(T)}},tt=b.useMemo(()=>{if(t.length===0)return"";let n=`M ${D(t[0].start)} ${S(t[0].function.p0)}`;for(let u=0;u<t.length;u++){const f=t[u],T=v(t,u),y=T-f.start;n+=` C ${D(f.start+y/3)} ${S(f.function.p1)}, ${D(f.start+2*y/3)} ${S(f.function.p2)}, ${D(T)} ${S(f.function.p3)}`}return n},[t,g,a]),w=n=>rt({onChange:e,onChangeEnd:r},n),H=n=>it({onChange:e},n),$=(n,u)=>{if(o)return;n.preventDefault(),n.stopPropagation(),i.current=t;const f=y=>{const{t:_,v:W}=P(y),L=u(i.current??t,_,W);i.current=L,H(L)},T=y=>{const{t:_,v:W}=P(y),L=u(i.current??t,_,W);i.current=null,w(L),window.removeEventListener("pointermove",f),window.removeEventListener("pointerup",T)};window.addEventListener("pointermove",f),window.addEventListener("pointerup",T)},K=l??E.accent,J=t.length,x=h[s],z=s>0&&s<J,O=s<J?t[s]:void 0,k=s>0?t[s-1]:void 0,R=O?{x:D(O.start+(v(t,s)-O.start)/3),y:S(O.function.p1)}:null,N=k?{x:D(k.start+(v(t,s-1)-k.start)*2/3),y:S(k.function.p2)}:null,et=[g.min,(g.min+g.max)/2,g.max];return p.jsxs("div",{"data-testid":c,children:[p.jsxs("svg",{ref:m,"data-testid":`${c}-plot`,viewBox:`0 0 ${j} ${a}`,style:{width:"100%",height:a,display:"block",background:E.inputBg,border:`1px solid ${E.border}`,borderRadius:E.radiusSmall,touchAction:"none",outline:"none"},tabIndex:0,role:"application","aria-label":"Curve editor",onKeyDown:n=>{(n.key==="Delete"||n.key==="Backspace")&&z&&!o&&(n.preventDefault(),w(Y(t,s)),d(Math.max(0,s-1)))},onDoubleClick:n=>{if(o)return;const{t:u}=P(n),f=ut(t,u);f!==t&&(w(f),d(f.findIndex(T=>Math.abs(T.start-u)<1e-6)))},children:[et.map(n=>p.jsxs("g",{children:[p.jsx("line",{x1:F,x2:j-Q,y1:S(n),y2:S(n),stroke:E.border,strokeWidth:.5}),p.jsx("text",{x:F-3,y:S(n)+2.5,fontSize:7,fill:E.textMuted,textAnchor:"end",children:pt(n)})]},n)),[0,.5,1].map(n=>p.jsx("text",{x:D(n),y:a-3,fontSize:7,fill:E.textMuted,textAnchor:"middle",children:n},n)),p.jsx("path",{d:tt,fill:"none",stroke:K,strokeWidth:1.5}),x&&R&&p.jsxs("g",{children:[p.jsx("line",{x1:D(x.time),y1:S(x.value),x2:R.x,y2:R.y,stroke:E.textMuted,strokeDasharray:"2 2",strokeWidth:.75}),p.jsx("circle",{"data-testid":`${c}-tangent-out`,cx:R.x,cy:R.y,r:3,fill:E.surface,stroke:E.textMuted,style:{cursor:o?"not-allowed":"ns-resize"},onPointerDown:n=>$(n,(u,f,T)=>q(u,s,"out",T))})]}),x&&N&&p.jsxs("g",{children:[p.jsx("line",{x1:D(x.time),y1:S(x.value),x2:N.x,y2:N.y,stroke:E.textMuted,strokeDasharray:"2 2",strokeWidth:.75}),p.jsx("circle",{"data-testid":`${c}-tangent-in`,cx:N.x,cy:N.y,r:3,fill:E.surface,stroke:E.textMuted,style:{cursor:o?"not-allowed":"ns-resize"},onPointerDown:n=>$(n,(u,f,T)=>q(u,s,"in",T))})]}),h.map((n,u)=>p.jsx("circle",{"data-testid":`${c}-key-${u}`,cx:D(n.time),cy:S(n.value),r:4,fill:u===s?E.accent:E.surface,stroke:u===s?E.onAccent:K,strokeWidth:1.25,style:{cursor:o?"not-allowed":"move"},onPointerDown:f=>{d(u),$(f,(T,y,_)=>C(T,u,y,_))}},u))]}),p.jsxs("div",{style:{display:"flex",gap:4,alignItems:"center",marginTop:3},children:[p.jsxs("span",{style:{fontSize:9,color:E.textMuted,flex:"0 0 auto"},children:["Key ",s+1,"/",h.length]}),p.jsx(U,{label:"t",value:x?Math.round(x.time*1e3)/1e3:null,step:.05,testId:`${c}-key-time`,onChange:n=>{x&&H(C(t,s,n,x.value))},onChangeEnd:n=>{x&&w(C(t,s,n,x.value))}}),p.jsx(U,{label:"v",value:x?Math.round(x.value*1e3)/1e3:null,step:.05,testId:`${c}-key-value`,onChange:n=>{x&&H(C(t,s,x.time,n))},onChangeEnd:n=>{x&&w(C(t,s,x.time,n))}}),p.jsx(at,{type:"button",variant:"ghost",size:"compact","data-testid":`${c}-delete-key`,disabled:!z||o===!0,"aria-label":"Delete curve key",title:z?"Delete key":"Endpoint keys cannot be deleted",onClick:()=>{w(Y(t,s)),d(Math.max(0,s-1))},children:"×"})]})]})}export{wt as Actions,ps as AlignmentGrid,fs as AnchorPresets,nt as AnchoredMenu,Rt as AssetSlotPicker,hs as BorderEditor,ms as BorderRadiusEditor,at as Button,Nt as CLASSIC_MATERIAL,_t as Checkbox,ls as ColorInput,Bs as ColorPicker,Gs as ColorSwatch,Ct as ColorSwatchInput,At as CurveEditor,Ft as DEFAULT_ICON_SET_ID,xs as DEFAULT_SHADOW,Es as DEFAULT_TEXT_SHADOW,Ot as Dialog,kt as DialogBody,Lt as DialogField,jt as DialogFieldLabel,Bt as DialogFooter,Gt as DialogHeader,Pt as DisclosureIcon,Ht as Divider,$t as DraftTextInput,zt as DropIndicator,Wt as EDITOR_CATEGORY_NAMES,Vt as EDITOR_MATERIALS,Kt as EDITOR_MATERIAL_IDS,Jt as EDITOR_REGION_NAMES,Ut as EDITOR_THEME_CLASS,qt as EditorBadge,Yt as EditorBanner,Qt as EditorIcon,Xt as EditorListButton,Zt as EditorPopover,te as EditorSurface,ee as EditorTab,ne as EditorTabList,se as EditorToolbar,oe as EditorTree,ae as EditorTreeRow,re as FONT,ie as FONT_MONO,ce as FieldGroup,ue as FieldLabel,le as FieldRow,de as FileInput,gs as FilterEditor,pe as FloatingToolbar,Ss as FontPicker,fe as GLASS_MATERIAL,Ts as GradientEditor,bs as GradientStopsTrack,Dt as HoverPreview,he as IconButton,me as Inline,xe as InteractiveEditScopeContext,Ee as JoinedField,ge as JoinedFieldSuffix,Mt as JsonInput,Se as Keycap,Te as LABEL_COL_WIDTH,be as Menu,De as MenuItem,Me as MenuSeparator,ye as MenuSubmenu,Ae as MenuTrigger,U as NumberInput,Ie as Panel,Ds as QuarksGradientEditor,ve as RangeInput,we as ResizeHandle,Re as STAGE_WORD_MODES,Ms as ScrubbableInput,Ne as SectionHeader,_e as Select,ys as ShadowEditor,As as ShadowListEditor,Ce as Spacer,Fe as SplitButtonGroup,Oe as Stack,ke as StateSurface,E as THEME,Le as TONE_ERROR,je as TONE_WARNING,Be as Text,Ge as TextArea,st as TextInput,Is as TextShadowEditor,Pe as ThemeRootPortal,He as ToggleButton,$e as ToolbarDivider,ze as ToolbarGroup,We as Tooltip,Ve as TreeDisclosureIcon,Ke as Vec3Input,Je as accent,Ue as accentMuted,qe as activeIconGlyph,Ye as activeIconSetSnapshot,Qe as applyEditorTheme,Xe as areaEmbossValue,Ze as bg,tn as border,en as chromeSize,nn as clampRectToViewport,sn as composeEditorAppearance,vs as composeFilter,ws as composeGradient,Rs as composeShadows,on as controlSize,ct as curveKeys,lt as curveValueRange,an as danger,rn as dangerFaint,cn as dangerMuted,Y as deleteKey,un as dynamic,ln as dynamicBg,dn as editorIconSets,pn as editorIcons,fn as editorMaterials,hn as editorThemeVariables,mn as editorThemes,xn as fieldLabelStyle,it as fireChange,rt as fireEnd,En as focusFirstMenuItem,gn as focusRing,Sn as fontMono,Tn as fontSans,bn as fontSize,Dn as fontSizeVar,Mn as fontWeight,yn as glassDarkEditorTheme,An as glassDarkLiteEditorTheme,In as graphiteDarkEditorTheme,vn as graphiteNeutralEditorTheme,wn as groupLabelStyle,Ps as hexToRgb,Rn as iconSize,Nn as isEditorIconSetId,_n as isEditorMaterialId,Cn as isEditorThemeId,Ns as isUniformBorder,_s as isUniformRadius,Fn as lineHeight,On as lineHeightVar,kn as liquidGlassEditorTheme,Ln as liquidGlassLiteEditorTheme,jn as midnightHighContrastEditorTheme,Bn as motion,Gn as motionVar,C as moveKey,q as moveTangent,Hs as parseAlpha,Cs as parseFilterFunctions,Fs as parseGradient,Pn as parseNumericValue,Os as parseShadows,Hn as radius,$n as regionRowAltValue,zn as registerContributedIconSet,Wn as registerContributedMaterial,Vn as rowStyle,yt as sampleCurve,Kn as scrim,v as segmentEnd,Jn as selection,Un as setActiveIconSet,qn as shadow,Yn as space,Qn as spaceVar,ut as splitAt,Xn as strokeWidth,Zn as subscribeEditorMaterials,ts as subscribeIconSets,es as success,ns as successMuted,ss as text,ot as themeVars,$s as toHex,ks as uniformBorder,Ls as uniformRadius,os as useInteractiveEditScope,as as usesGlassMaterial,rs as warn,is as warnMuted,cs as zIndex};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as f,i as c,e as x,u as d}from"./extend-
|
|
1
|
+
import{C as f,i as c,e as x,u as d}from"./extend-Xj5LNCQp.js";import{A as z,a as B,c as D}from"./extend-Xj5LNCQp.js";import{A as k}from"./index-n0bGAss6.js";import{r as s}from"./index-nmcBqr7Y.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-DzuOGwVB.js";import"./index-D_NuPfjr.js";import"./index-DRJoiAiV.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";function A(){const t=s.useContext(f);return c(t.app instanceof k,"No Context found with `%s`. Make sure to wrap component with `%s`","Application","AppProvider"),t}function R(t){s.useMemo(()=>{x(t)},[t])}function T(t){const{app:p,isInitialised:n}=A();let e,o,i=!0,r;typeof t=="function"?e=t:(e=t.callback,o=t.context,i=t.isEnabled??!0,r=t.priority),c(),d(()=>{if(n){const a=p?.ticker,l=i,m=o,u=e;return i&&a&&a.add(e,o,r),()=>{l&&a?.remove(u,m)}}},[p?.ticker,e,o,i,n,r])}export{z as Application,B as applyProps,D as createRoot,x as extend,A as useApplication,R as useExtend,T as useTick};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as Ie}from"./extends-CF3RwP-h.js";import{r as A,a as Vn}from"./index-nmcBqr7Y.js";import{a as Jy}from"./client-DNXj_opT.js";import{U as Id,S as No,W as Zx}from"./three.module-BLhyNg0e.js";import{u as ue,a as He,I as Jx,q as _d,G as vi,s as ir,J as e4,K as Hu,e as xi,o as Wn,v as Xr,F as t4,l as ev,k as S0,L as i4}from"./events-156d8d12.esm-DmeaOP4r.js";import{fo as W,aI as bi,fd as Be,d9 as ci,d5 as Bi,az as ql,da as wr,cm as we,dp as rt,cl as Ln,ez as Vu,fp as Ei,_ as qe,aV as Pn,cj as Ze,co as ze,bu as tv,au as Ir,dw as Ti,b0 as si,ed as Ns,cE as Xt,N as Ji,M as Ai,aM as nn,ex as xn,em as hi,B as Ar,fe as Ko,K as cr,bl as n4,f1 as Hr,cW as yi,e6 as Wu,cp as ta,bX as ul,aq as Qn,a$ as $i,bV as It,db as an,cZ as Rr,ey as iv,e$ as Xl,cg as Th,bh as jo,I as Kt,aP as wh,bg as s4,fx as Fi,c1 as ni,cN as C0,Z as r4,aY as o4,b5 as nv,am as a4,ca as ia,cb as l4,aZ as ks,eX as _r,Y as Yn,eW as cn,cv as bh,cs as T0,aT as sv,F as Zm,dk as Eu,dd as Jm,eC as c4,aE as u4,ev as rv,et as h4,j as f4,f7 as d4,l as m4,fq as g4,dq as p4,cV as A4,eq as ur,a3 as Yu,aa as ov,ff as Gi,c5 as w0,dI as eg,e8 as Ms,e2 as zo,bi as fi,e0 as y4,d$ as v4,dZ as E4,dY as x4,dS as I4,dP as _4,dN as S4,dM as C4,dE as T4,av,aw as Qo,H as w4,er as b4,eo as R4,d8 as Rh,bs as b0,bt as Sd,bA as Go,fA as D4,bW as Fs,dn as L4,ag as P4,V as lv,x as M4,y as B4,cr as k4,cq as cv,dv as uv,br as xu,fb as pn,du as Ku,aO as F4,c_ as hv,cR as O4,ao as fv,dx as Iu,fj as Wr,fw as ju,a9 as dv,an as U4,el as br,T as mv,ad as R0,fs as N4,ej as gv,aC as pv,aA as Av,fm as D0,R as yv,b4 as _u,E as z4,e5 as Fl,by as ou,P as Cd,es as vv,e3 as Ev,e9 as Q4,n as G4,ch as $4,cw as xv,cx as Iv,cP as H4,dg as V4,f6 as Su,c7 as Td,cc as W4,c3 as tg,eG as Y4,cu as K4,S as j4,d as q4,ee as Dh,i as X4,bI as Lh,cU as Z4,aS as J4,aW as eI}from"./three.core-3arARmh6.js";import{v as Ol,d as _v,C as tI,u as BM}from"./Gltf-CRUmmFxv.js";import{G as VF}from"./Gltf-CRUmmFxv.js";import{m as iI,t as nI}from"./BufferGeometryUtils-FJZNEiJN.js";import{OrthographicCamera as sI}from"./OrthographicCamera-Bv8_A2mi.js";import{PerspectiveCamera as YF}from"./PerspectiveCamera-D3r6Hnc8.js";import{E as na,M as rI}from"./OrbitControls-C6LQ4Pxi.js";import{O as jF}from"./OrbitControls-C6LQ4Pxi.js";import{_ as Sv}from"./index-
|
|
1
|
+
import{_ as Ie}from"./extends-CF3RwP-h.js";import{r as A,a as Vn}from"./index-nmcBqr7Y.js";import{a as Jy}from"./client-DNXj_opT.js";import{U as Id,S as No,W as Zx}from"./three.module-BLhyNg0e.js";import{u as ue,a as He,I as Jx,q as _d,G as vi,s as ir,J as e4,K as Hu,e as xi,o as Wn,v as Xr,F as t4,l as ev,k as S0,L as i4}from"./events-156d8d12.esm-DmeaOP4r.js";import{fo as W,aI as bi,fd as Be,d9 as ci,d5 as Bi,az as ql,da as wr,cm as we,dp as rt,cl as Ln,ez as Vu,fp as Ei,_ as qe,aV as Pn,cj as Ze,co as ze,bu as tv,au as Ir,dw as Ti,b0 as si,ed as Ns,cE as Xt,N as Ji,M as Ai,aM as nn,ex as xn,em as hi,B as Ar,fe as Ko,K as cr,bl as n4,f1 as Hr,cW as yi,e6 as Wu,cp as ta,bX as ul,aq as Qn,a$ as $i,bV as It,db as an,cZ as Rr,ey as iv,e$ as Xl,cg as Th,bh as jo,I as Kt,aP as wh,bg as s4,fx as Fi,c1 as ni,cN as C0,Z as r4,aY as o4,b5 as nv,am as a4,ca as ia,cb as l4,aZ as ks,eX as _r,Y as Yn,eW as cn,cv as bh,cs as T0,aT as sv,F as Zm,dk as Eu,dd as Jm,eC as c4,aE as u4,ev as rv,et as h4,j as f4,f7 as d4,l as m4,fq as g4,dq as p4,cV as A4,eq as ur,a3 as Yu,aa as ov,ff as Gi,c5 as w0,dI as eg,e8 as Ms,e2 as zo,bi as fi,e0 as y4,d$ as v4,dZ as E4,dY as x4,dS as I4,dP as _4,dN as S4,dM as C4,dE as T4,av,aw as Qo,H as w4,er as b4,eo as R4,d8 as Rh,bs as b0,bt as Sd,bA as Go,fA as D4,bW as Fs,dn as L4,ag as P4,V as lv,x as M4,y as B4,cr as k4,cq as cv,dv as uv,br as xu,fb as pn,du as Ku,aO as F4,c_ as hv,cR as O4,ao as fv,dx as Iu,fj as Wr,fw as ju,a9 as dv,an as U4,el as br,T as mv,ad as R0,fs as N4,ej as gv,aC as pv,aA as Av,fm as D0,R as yv,b4 as _u,E as z4,e5 as Fl,by as ou,P as Cd,es as vv,e3 as Ev,e9 as Q4,n as G4,ch as $4,cw as xv,cx as Iv,cP as H4,dg as V4,f6 as Su,c7 as Td,cc as W4,c3 as tg,eG as Y4,cu as K4,S as j4,d as q4,ee as Dh,i as X4,bI as Lh,cU as Z4,aS as J4,aW as eI}from"./three.core-3arARmh6.js";import{v as Ol,d as _v,C as tI,u as BM}from"./Gltf-CRUmmFxv.js";import{G as VF}from"./Gltf-CRUmmFxv.js";import{m as iI,t as nI}from"./BufferGeometryUtils-FJZNEiJN.js";import{OrthographicCamera as sI}from"./OrthographicCamera-Bv8_A2mi.js";import{PerspectiveCamera as YF}from"./PerspectiveCamera-D3r6Hnc8.js";import{E as na,M as rI}from"./OrbitControls-C6LQ4Pxi.js";import{O as jF}from"./OrbitControls-C6LQ4Pxi.js";import{_ as Sv}from"./index-DRJoiAiV.js";import{g as oI}from"./_commonjsHelpers-D6-XlEtG.js";import{u as ds}from"./Fbo-Biv6Lrhl.js";import{F as XF}from"./Fbo-Biv6Lrhl.js";import{RoundedBox as JF,RoundedBoxGeometry as eO}from"./RoundedBox-DrJK5JOI.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-DzuOGwVB.js";import"./index-CtzuWnCS.js";import"./index-FUuS4qwW.js";const Ul=new W,L0=new W,aI=new W,ig=new Be;function lI(r,e,t){const i=Ul.setFromMatrixPosition(r.matrixWorld);i.project(e);const n=t.width/2,s=t.height/2;return[i.x*n+n,-(i.y*s)+s]}function cI(r,e){const t=Ul.setFromMatrixPosition(r.matrixWorld),i=L0.setFromMatrixPosition(e.matrixWorld),n=t.sub(i),s=e.getWorldDirection(aI);return n.angleTo(s)>Math.PI/2}function uI(r,e,t,i){const n=Ul.setFromMatrixPosition(r.matrixWorld),s=n.clone();s.project(e),ig.set(s.x,s.y),t.setFromCamera(ig,e);const o=t.intersectObjects(i,!0);if(o.length){const a=o[0].distance;return n.distanceTo(t.ray.origin)<a}return!0}function hI(r,e){if(e instanceof Bi)return e.zoom;if(e instanceof ci){const t=Ul.setFromMatrixPosition(r.matrixWorld),i=L0.setFromMatrixPosition(e.matrixWorld),n=e.fov*Math.PI/180,s=t.distanceTo(i);return 1/(2*Math.tan(n/2)*s)}else return 1}function fI(r,e,t){if(e instanceof ci||e instanceof Bi){const i=Ul.setFromMatrixPosition(r.matrixWorld),n=L0.setFromMatrixPosition(e.matrixWorld),s=i.distanceTo(n),o=(t[1]-t[0])/(e.far-e.near),a=t[1]-o*e.far;return Math.round(o*s+a)}}const wd=r=>Math.abs(r)<1e-10?0:r;function Cv(r,e,t=""){let i="matrix3d(";for(let n=0;n!==16;n++)i+=wd(e[n]*r.elements[n])+(n!==15?",":")");return t+i}const dI=(r=>e=>Cv(e,r))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),mI=(r=>(e,t)=>Cv(e,r(t),"translate(-50%,-50%)"))(r=>[1/r,1/r,1/r,1,-1/r,-1/r,-1/r,-1,1/r,1/r,1/r,1,1,1,1,1]);function gI(r){return r&&typeof r=="object"&&"current"in r}const qu=A.forwardRef(({children:r,eps:e=.001,style:t,className:i,prepend:n,center:s,fullscreen:o,portal:a,distanceFactor:l,sprite:c=!1,transform:u=!1,occlude:h,onOcclude:f,castShadow:d,receiveShadow:g,material:m,geometry:p,zIndexRange:E=[16777271,0],calculatePosition:v=lI,as:y="div",wrapperClass:x,pointerEvents:I="auto",..._},S)=>{const{gl:C,camera:w,scene:T,size:D,raycaster:b,events:R,viewport:P}=ue(),[O]=A.useState(()=>document.createElement(y)),Q=A.useRef(null),V=A.useRef(null),K=A.useRef(0),k=A.useRef([0,0]),G=A.useRef(null),M=A.useRef(null),H=a?.current||R.connected||C.domElement.parentNode,Y=A.useRef(null),N=A.useRef(!1),z=A.useMemo(()=>h&&h!=="blending"||Array.isArray(h)&&h.length&&gI(h[0]),[h]);A.useLayoutEffect(()=>{const ee=C.domElement;h&&h==="blending"?(ee.style.zIndex=`${Math.floor(E[0]/2)}`,ee.style.position="absolute",ee.style.pointerEvents="none"):(ee.style.zIndex=null,ee.style.position=null,ee.style.pointerEvents=null)},[h]),A.useLayoutEffect(()=>{if(V.current){const ee=Q.current=Jy.createRoot(O);if(T.updateMatrixWorld(),u)O.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const Z=v(V.current,w,D);O.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${Z[0]}px,${Z[1]}px,0);transform-origin:0 0;`}return H&&(n?H.prepend(O):H.appendChild(O)),()=>{H&&H.removeChild(O),ee.unmount()}}},[H,u]),A.useLayoutEffect(()=>{x&&(O.className=x)},[x]);const B=A.useMemo(()=>u?{position:"absolute",top:0,left:0,width:D.width,height:D.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:s?"translate3d(-50%,-50%,0)":"none",...o&&{top:-D.height/2,left:-D.width/2,width:D.width,height:D.height},...t},[t,s,o,D,u]),F=A.useMemo(()=>({position:"absolute",pointerEvents:I}),[I]);A.useLayoutEffect(()=>{if(N.current=!1,u){var ee;(ee=Q.current)==null||ee.render(A.createElement("div",{ref:G,style:B},A.createElement("div",{ref:M,style:F},A.createElement("div",{ref:S,className:i,style:t,children:r}))))}else{var Z;(Z=Q.current)==null||Z.render(A.createElement("div",{ref:S,style:B,className:i,children:r}))}});const U=A.useRef(!0);He(ee=>{if(V.current){w.updateMatrixWorld(),V.current.updateWorldMatrix(!0,!1);const Z=u?k.current:v(V.current,w,D);if(u||Math.abs(K.current-w.zoom)>e||Math.abs(k.current[0]-Z[0])>e||Math.abs(k.current[1]-Z[1])>e){const ne=cI(V.current,w);let ce=!1;z&&(Array.isArray(h)?ce=h.map(le=>le.current):h!=="blending"&&(ce=[T]));const me=U.current;if(ce){const le=uI(V.current,w,b,ce);U.current=le&&!ne}else U.current=!ne;me!==U.current&&(f?f(!U.current):O.style.display=U.current?"block":"none");const re=Math.floor(E[0]/2),te=h?z?[E[0],re]:[re-1,0]:E;if(O.style.zIndex=`${fI(V.current,w,te)}`,u){const[le,se]=[D.width/2,D.height/2],X=w.projectionMatrix.elements[5]*se,{isOrthographicCamera:j,top:oe,left:pe,bottom:_e,right:Ce}=w,ye=dI(w.matrixWorldInverse),Ne=j?`scale(${X})translate(${wd(-(Ce+pe)/2)}px,${wd((oe+_e)/2)}px)`:`translateZ(${X}px)`;let Te=V.current.matrixWorld;c&&(Te=w.matrixWorldInverse.clone().transpose().copyPosition(Te).scale(V.current.scale),Te.elements[3]=Te.elements[7]=Te.elements[11]=0,Te.elements[15]=1),O.style.width=D.width+"px",O.style.height=D.height+"px",O.style.perspective=j?"":`${X}px`,G.current&&M.current&&(G.current.style.transform=`${Ne}${ye}translate(${le}px,${se}px)`,M.current.style.transform=mI(Te,1/((l||10)/400)))}else{const le=l===void 0?1:hI(V.current,w)*l;O.style.transform=`translate3d(${Z[0]}px,${Z[1]}px,0) scale(${le})`}k.current=Z,K.current=w.zoom}}if(!z&&Y.current&&!N.current)if(u){if(G.current){const Z=G.current.children[0];if(Z!=null&&Z.clientWidth&&Z!=null&&Z.clientHeight){const{isOrthographicCamera:ne}=w;if(ne||p)_.scale&&(Array.isArray(_.scale)?_.scale instanceof W?Y.current.scale.copy(_.scale.clone().divideScalar(1)):Y.current.scale.set(1/_.scale[0],1/_.scale[1],1/_.scale[2]):Y.current.scale.setScalar(1/_.scale));else{const ce=(l||10)/400,me=Z.clientWidth*ce,re=Z.clientHeight*ce;Y.current.scale.set(me,re,1)}N.current=!0}}}else{const Z=O.children[0];if(Z!=null&&Z.clientWidth&&Z!=null&&Z.clientHeight){const ne=1/P.factor,ce=Z.clientWidth*ne,me=Z.clientHeight*ne;Y.current.scale.set(ce,me,1),N.current=!0}Y.current.lookAt(ee.camera.position)}});const J=A.useMemo(()=>({vertexShader:u?void 0:`
|
|
2
2
|
/*
|
|
3
3
|
This shader is from the THREE's SpriteMaterial.
|
|
4
4
|
We need to turn the backing plane into a Sprite
|