@volter/game-editor 0.5.99 → 0.5.101
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 +2161 -2161
- package/dist/assets/{AssetBudgetPanel-CthKzi_f.js → AssetBudgetPanel-DgWpBya5.js} +3 -3
- package/dist/assets/{AudioViewer-BZZyeUuv.js → AudioViewer-t6uoehO2.js} +1 -1
- package/dist/assets/{CanvasBoardDocument-DsOmtEv_.js → CanvasBoardDocument-B7Sj7oUB.js} +1 -1
- package/dist/assets/{CanvasSceneViewport-CJdc6428.js → CanvasSceneViewport-XRD68C5R.js} +1 -1
- package/dist/assets/{ColorInput-CjG1OnhE.js → ColorInput-jPYy3lk5.js} +1 -1
- package/dist/assets/{ColorPicker-D_HLZ-fK.js → ColorPicker-8KOrDp8K.js} +1 -1
- package/dist/assets/{EntityModelDocument-ihLmZ24x.js → EntityModelDocument-COW28K91.js} +1 -1
- package/dist/assets/{EnvironmentAssetDocument-D_Bzffyf.js → EnvironmentAssetDocument-CXevsolY.js} +1 -1
- package/dist/assets/{GameplaySessionTimeline-BR_MkPph.js → GameplaySessionTimeline-Dx279Rx9.js} +1 -1
- package/dist/assets/{ImageViewer-D6MXEkV3.js → ImageViewer-DsWQ_Bqk.js} +1 -1
- package/dist/assets/InspectorObjectPreview-DGJCS3eb.js +1 -0
- package/dist/assets/{JsonAssetDocument-CH_BKqf0.js → JsonAssetDocument-DkaVRYoz.js} +1 -1
- package/dist/assets/{LiveModuleDocument-ocL5mdBG.js → LiveModuleDocument-gQiF4iil.js} +1 -1
- package/dist/assets/{LutAssetDocument-BP62BLXq.js → LutAssetDocument-C4oAwMaC.js} +1 -1
- package/dist/assets/{ModelAssetDocument-Ckz3Rcef.js → ModelAssetDocument-rrg3mmkL.js} +1 -1
- package/dist/assets/{NonThreeAuthoringBootstrap-n1OV7f1Q.js → NonThreeAuthoringBootstrap-MKbBJsax.js} +1 -1
- package/dist/assets/{Object3DDocumentToolbar-BU5h7jhX.js → Object3DDocumentToolbar-DLu1YuQB.js} +1 -1
- package/dist/assets/Object3DDocumentViewport-CLgCbtwW.js +2 -0
- package/dist/assets/{Object3DPreview-C4k5T1-3.js → Object3DPreview-CS2FmkII.js} +1 -1
- package/dist/assets/{OnlineAssetDetail-bodZxlM3.js → OnlineAssetDetail-Cq0Tg9eb.js} +1 -1
- package/dist/assets/{PlayBar-D-SgnHBi.js → PlayBar-EEQyKiVL.js} +1 -1
- package/dist/assets/{QuarksAssetDocument-B2Wrpxi-.js → QuarksAssetDocument-Bka3CpGJ.js} +1 -1
- package/dist/assets/{ReactCanvasControls-BXjlNIcc.js → ReactCanvasControls-sw8DBspr.js} +1 -1
- package/dist/assets/{RootSelectionOverlay-BETMJphO.js → RootSelectionOverlay-DewpntYU.js} +1 -1
- package/dist/assets/{ShaderAssetDocument-C3FvHS-L.js → ShaderAssetDocument-B5PDyfoB.js} +1 -1
- package/dist/assets/{ShadowEditor-CmWSVBKW.js → ShadowEditor-EhxGA1Lj.js} +1 -1
- package/dist/assets/{SourceAssetViewer-syIRglSD.js → SourceAssetViewer-BmsL_Z1R.js} +1 -1
- package/dist/assets/{StageHost-BqIe86Q5.js → StageHost-B-JXOKjD.js} +2 -2
- package/dist/assets/{StoryPreviewMount-SXtYJsNy.js → StoryPreviewMount-DllHm68H.js} +1 -1
- package/dist/assets/{ThreeBoardDocument-BP554gCu.js → ThreeBoardDocument-2OY1saNa.js} +2 -2
- package/dist/assets/{ThreeIsolationSceneContent-75-LDtL9.js → ThreeIsolationSceneContent-CgGI5y99.js} +1 -1
- package/dist/assets/{ToolObject3DPreview-DLinAx-k.js → ToolObject3DPreview-DpG-msH5.js} +1 -1
- package/dist/assets/{Toolbar-CextQHWh.js → Toolbar-C_8DLvqq.js} +1 -1
- package/dist/assets/{TransientHint-gxsw0fPN.js → TransientHint-DfEVHExL.js} +1 -1
- package/dist/assets/{VideoViewer-Cqzfzdfp.js → VideoViewer-C4yEzpRm.js} +1 -1
- package/dist/assets/{ViewportShadingMenu--caGAzBB.js → ViewportShadingMenu-CXLf4i3A.js} +1 -1
- package/dist/assets/{active-ingest-h6X9yZNA.js → active-ingest-C7ZH7cNF.js} +2 -2
- package/dist/assets/{animation-clock-Btrvho_Y.js → animation-clock-D592HLS5.js} +1 -1
- package/dist/assets/{animation-mixers.service-DQGz57nx.js → animation-mixers.service-DhzuHN8h.js} +1 -1
- package/dist/assets/{animation-timeline.utility-rdAc4tsU.js → animation-timeline.utility-KkQqU_yY.js} +1 -1
- package/dist/assets/{asset-budget-asset.menu-CpuPF12Q.js → asset-budget-asset.menu-DUm7XRXq.js} +1 -1
- package/dist/assets/{asset-budget.action-mwOpjij5.js → asset-budget.action-tf_SvAXG.js} +1 -1
- package/dist/assets/{asset-budget.document-D8rrDeVQ.js → asset-budget.document-6f4MHKF3.js} +1 -1
- package/dist/assets/{asset-budget.menu-BilRjTLw.js → asset-budget.menu-DzvEyHIx.js} +1 -1
- package/dist/assets/{asset-editor-persistence-B40nssGV.js → asset-editor-persistence-bWvOKfQZ.js} +1 -1
- package/dist/assets/{asset-loaders-BWWEqlVb.js → asset-loaders-Cj9h8-z8.js} +1 -1
- package/dist/assets/{asset-preview-DyRWJUUG.js → asset-preview-QdfMc8lf.js} +1 -1
- package/dist/assets/{audio-unlock.service-WemVBvpc.js → audio-unlock.service-hrDm6-nJ.js} +1 -1
- package/dist/assets/{audio.utility-VDcYPSfS.js → audio.utility-BhFzFTZz.js} +1 -1
- package/dist/assets/autoplay.service-nQU_0QRK.js +1 -0
- package/dist/assets/{babylon-authoring-adapter-BkvAcVX0.js → babylon-authoring-adapter-qn8bztGs.js} +1 -1
- package/dist/assets/{binding-resolver-BWRRdIaX.js → binding-resolver-uLlYyCuA.js} +2 -2
- package/dist/assets/{blender-emscripten-engine-DnpXL9Lg.js → blender-emscripten-engine-u7tHsRhP.js} +1 -1
- package/dist/assets/{blender-node-editor.document-CAYFyrk5.js → blender-node-editor.document-AoUy74zU.js} +1 -1
- package/dist/assets/{blender-properties-tab-XAVNmU6S.js → blender-properties-tab-_N5P-Pn3.js} +1 -1
- package/dist/assets/blender-runtime-host-BS17dJ2A.js +7 -0
- package/dist/assets/{blender-runtime-skin-Cw3ptNmu.js → blender-runtime-skin-BpyKqs_R.js} +1 -1
- package/dist/assets/{blender-runtime.document-CKAnLpO6.js → blender-runtime.document-7Uc0znkW.js} +1 -1
- package/dist/assets/{blender-screenshot.menu-CKSZoP6R.js → blender-screenshot.menu-BcaCdihl.js} +1 -1
- package/dist/assets/{blender-timeline.document-BKDpuGev.js → blender-timeline.document-D6sEKKUT.js} +1 -1
- package/dist/assets/{blender-uv-editor.document-V9Aevjga.js → blender-uv-editor.document-D_miS-76.js} +1 -1
- package/dist/assets/{blender-version.status-_RwyILn-.js → blender-version.status-CXtmI2oI.js} +1 -1
- package/dist/assets/{blender-wali-engine-CAscERoY.js → blender-wali-engine-15A9wqkh.js} +1 -1
- package/dist/assets/{blender.command-DJR8Bj0V.js → blender.command-B6mM0xRP.js} +1 -1
- package/dist/assets/{board-guides-CC1g9px4.js → board-guides-CQLiNJ-X.js} +1 -1
- package/dist/assets/{bridge.command-D66l3OeA.js → bridge.command-t51PsHen.js} +3 -3
- package/dist/assets/{browserAll-vy6h2mrl.js → browserAll-BhAi5DVR.js} +1 -1
- package/dist/assets/{build-player.document-CLTpej_N.js → build-player.document-DbNfzAtg.js} +1 -1
- package/dist/assets/{build-profiles.document-Ct6vaGZ3.js → build-profiles.document-_Igpl84C.js} +1 -1
- package/dist/assets/{build-progress.status-BDtP48NR.js → build-progress.status-B16ZBh-G.js} +1 -1
- package/dist/assets/{build-session-CPbAgpR7.js → build-session-DZUK4jc9.js} +1 -1
- package/dist/assets/{build.action-Cksw2yXV.js → build.action-DoiK3c5C.js} +1 -1
- package/dist/assets/{build.command-DJD84TEp.js → build.command-Dr8Wh62b.js} +1 -1
- package/dist/assets/{build.header-Cm2Anxw1.js → build.header-CC0ybu5k.js} +1 -1
- package/dist/assets/{build.menu-DuHTf3oU.js → build.menu-BQ8YQpBs.js} +1 -1
- package/dist/assets/{build.service-C7Yy66yy.js → build.service-BHC1F5gv.js} +1 -1
- package/dist/assets/{camera-B1iisdjC.js → camera-JGB0w5Uz.js} +1 -1
- package/dist/assets/{camera-runtime.inspector-Dtblf3c7.js → camera-runtime.inspector-rVbK9Vxm.js} +1 -1
- package/dist/assets/{canvas-design-mount-pHgkSjhG.js → canvas-design-mount-BCm68X6x.js} +3 -3
- package/dist/assets/{canvas-entry-runtime-CRWe-Gxi.js → canvas-entry-runtime-ClaoVvX2.js} +2 -2
- package/dist/assets/{canvas-preview-frames-CJtaubgV.js → canvas-preview-frames-LRYKCbNX.js} +1 -1
- package/dist/assets/{canvas-story-capture.service-BKibUqPU.js → canvas-story-capture.service-Dt6dbi_1.js} +2 -2
- package/dist/assets/{capability-coverage-CRb3vmWs.js → capability-coverage-CD1964bc.js} +1 -1
- package/dist/assets/{collaboration-presence-C3pKLb3J.js → collaboration-presence-BdvkeF1t.js} +1 -1
- package/dist/assets/{collider-BsrUCJlt.js → collider-DFmqWyTZ.js} +1 -1
- package/dist/assets/{component-board.service-BkOA1vLP.js → component-board.service-CVyA39m5.js} +2 -2
- package/dist/assets/{component-board.service-Dgg20que.js → component-board.service-YZzvDwPy.js} +2 -2
- package/dist/assets/{component-board.service-DcLu6a6a.js → component-board.service-boeLWFe8.js} +2 -2
- package/dist/assets/{component-contracts.service-LvrwyMpk.js → component-contracts.service-CbX0_dDM.js} +1 -1
- package/dist/assets/{component-instance-root-BaRyIQ5L.js → component-instance-root-C0v5fzXo.js} +1 -1
- package/dist/assets/{component-verbs.command-stK20FK5.js → component-verbs.command-CLmOl3t8.js} +1 -1
- package/dist/assets/{component-verbs.service-DKnWNncI.js → component-verbs.service-Dxeq0Wkd.js} +1 -1
- package/dist/assets/{config-Oi6wS579.js → config-iXo5FpjU.js} +2 -2
- package/dist/assets/{configurations-Dr0vG1VD.js → configurations-Dgi_L0lu.js} +1 -1
- package/dist/assets/{connection.status-BusVsqEQ.js → connection.status-Bzbe9CLD.js} +1 -1
- package/dist/assets/{constraints.inspector-CtClCM7N.js → constraints.inspector-CX6XsNDq.js} +1 -1
- package/dist/assets/{content-bounds-CSAlBN5N.js → content-bounds-DHzkdtSe.js} +1 -1
- package/dist/assets/{contract-system-adapters-BuU4GKY2.js → contract-system-adapters-D5aiFalv.js} +1 -1
- package/dist/assets/{coverage.service-BAip9f-s.js → coverage.service-CWVuvYoO.js} +1 -1
- package/dist/assets/{create-runtime-D7OGGNf7.js → create-runtime-BfDI8Jwi.js} +1 -1
- package/dist/assets/{curve-DoTlJl0S.js → curve-CWGqrVgh.js} +1 -1
- package/dist/assets/{data-asset-CHJT7Vn8.js → data-asset-Y0TG4RjD.js} +1 -1
- package/dist/assets/{data-ref-DrCMI-nl.js → data-ref-DbQpSXe0.js} +1 -1
- package/dist/assets/{debug-bridge-CAOTUmkq.js → debug-bridge-BK1QNdiJ.js} +1 -1
- package/dist/assets/{debug-registry-B-T_4soJ.js → debug-registry-kRIsUyRj.js} +1 -1
- package/dist/assets/{deferred-ingest-play-BhS77VgZ.js → deferred-ingest-play-MyhNKKy1.js} +2 -2
- package/dist/assets/{design-time-canvas-mount-CvPR0mQ0.js → design-time-canvas-mount-DZSeb7ce.js} +2 -2
- package/dist/assets/{design-time-layers-BePiGKet.js → design-time-layers-C5mvuCRq.js} +1 -1
- package/dist/assets/{design-time-mount.service-Ck3FvIte.js → design-time-mount.service-j-_sUjvj.js} +2 -2
- package/dist/assets/{design-time-mount.service-CCjJjAki.js → design-time-mount.service-r20zqBJ6.js} +2 -2
- package/dist/assets/{design-time-react-mount-DN9CnR9f.js → design-time-react-mount-iWCd3gKV.js} +1 -1
- package/dist/assets/{document-preview-three-CZp-b29j.js → document-preview-three-RYf4v3S6.js} +1 -1
- package/dist/assets/{dom-authoring-adapter-Cd8kfaSd.js → dom-authoring-adapter-0p0azm1Q.js} +1 -1
- package/dist/assets/{draco3d-4p7oaG69.js → draco3d-BI8vxUli.js} +1 -1
- package/dist/assets/{edit-mode-audio.service-3hR1ciDO.js → edit-mode-audio.service-F8IRmq3w.js} +1 -1
- package/dist/assets/{edit-mode-authoring-euM9VW6K.js → edit-mode-authoring-AwPucrO4.js} +1 -1
- package/dist/assets/{edit-mode-networking.service-BDdYK8Ig.js → edit-mode-networking.service-Dk8Uj6Ep.js} +1 -1
- package/dist/assets/{editor-api-BtXmMNSR.js → editor-api-BmocLHzf.js} +1 -1
- package/dist/assets/{editor-layers-BadrAIuA.js → editor-layers-BIj5KO0g.js} +1 -1
- package/dist/assets/{editor-shell-store-BRi8Vv17.js → editor-shell-store-DtWwyrw1.js} +1 -1
- package/dist/assets/{entity-object-DgmLa7_T.js → entity-object-CQX6E16Y.js} +1 -1
- package/dist/assets/{extend-n0wDgaI-.js → extend-BNXsG7po.js} +1 -1
- package/dist/assets/{fork-menu-DWzwL7ae.js → fork-menu-CKnSBs7L.js} +1 -1
- package/dist/assets/{frame-debugger-store-YlccB0mY.js → frame-debugger-store-BktqXP4b.js} +1 -1
- package/dist/assets/{game-contract-seams-l_8ZaYZ3.js → game-contract-seams-BGe-Semu.js} +1 -1
- package/dist/assets/{game-css-scope-transform-MiqomK8_.js → game-css-scope-transform-ONBin5JZ.js} +1 -1
- package/dist/assets/{game-document.service-D5HOvWgk.js → game-document.service-yTOayo_E.js} +1 -1
- package/dist/assets/{game-eval.command-DA-QR5L4.js → game-eval.command-n3JvogTA.js} +1 -1
- package/dist/assets/{game-module-access-CttGzVCj.js → game-module-access-BtGmyBZW.js} +1 -1
- package/dist/assets/{game-network-BexquSG7.js → game-network-Bscp4XAg.js} +3 -3
- package/dist/assets/{gameplay-export-A2_wxmzQ.js → gameplay-export-DWdfuJdK.js} +1 -1
- package/dist/assets/{gameplay-replay-C01NK7_R.js → gameplay-replay-DHFgjK1z.js} +1 -1
- package/dist/assets/{gameplay.command-53pBlywA.js → gameplay.command-09J-wao7.js} +1 -1
- package/dist/assets/{generation-jobs-BZ1uNuym.js → generation-jobs-BeYhAP-e.js} +1 -1
- package/dist/assets/{generation.service-fiLdgX9K.js → generation.service-Dx-3X1Bf.js} +1 -1
- package/dist/assets/{generations-Cs4ZEXOW.js → generations-BXYBzd-t.js} +1 -1
- package/dist/assets/{generations.status-DVhipG_g.js → generations.status-BhPjqe89.js} +1 -1
- package/dist/assets/{hierarchy-marks-Bz6FH5xl.js → hierarchy-marks-CkkhBs5b.js} +1 -1
- package/dist/assets/{hosted-asset-materialization-CLh_Fkf5.js → hosted-asset-materialization-CLYoxLJ6.js} +1 -1
- package/dist/assets/{index-CnQxsRjG.js → index-B22GiQJk.js} +2 -2
- package/dist/assets/{index-BXp6J271.js → index-B41wejgX.js} +1 -1
- package/dist/assets/{index-yEWxcp4Z.js → index-B6cgy6Zg.js} +1 -1
- package/dist/assets/{index-Bz10-Rzi.js → index-BVVrX1g-.js} +1 -1
- package/dist/assets/{index-Cxz8Qysl.js → index-BruoquL2.js} +1 -1
- package/dist/assets/{index-Dji-5Ngh.js → index-CfY0i8Sb.js} +7 -7
- package/dist/assets/{index-CGWnVcy5.js → index-DwZWOIDa.js} +1 -1
- package/dist/assets/{index-ucHKPhjL.js → index-WjGyXsCe.js} +1 -1
- package/dist/assets/{index-DKlVAXbF.js → index-YJsSO8qW.js} +1 -1
- package/dist/assets/{inference-diagnostics-BJUcoifD.js → inference-diagnostics-WOZ5kGjy.js} +1 -1
- package/dist/assets/{ingest-boot-viewport-B2KxD-oi.js → ingest-boot-viewport-BE1plutT.js} +1 -1
- package/dist/assets/{ingest-siblings-DHwK8q_i.js → ingest-siblings-DbHENZg1.js} +1 -1
- package/dist/assets/{ingest-source-persistence-BQ3VwPMh.js → ingest-source-persistence-Dza2jWb5.js} +1 -1
- package/dist/assets/{ingest.service-Dr2uWmcO.js → ingest.service-Dw-_Es6q.js} +1 -1
- package/dist/assets/{inspect-DZInhjtn.js → inspect-CEkSizig.js} +1 -1
- package/dist/assets/instances.command-gqza3cVd.js +1 -0
- package/dist/assets/{json-history-resource-CIxXZ9Kl.js → json-history-resource-BeD1MrWt.js} +1 -1
- package/dist/assets/{layered-pick-DfTP1-Cr.js → layered-pick-ClOn0St8.js} +1 -1
- package/dist/assets/{light-B6J4lQur.js → light-iJQD2EkF.js} +1 -1
- package/dist/assets/{live-project-verbs-D4cO2mDW.js → live-project-verbs-C-oGGqqr.js} +1 -1
- package/dist/assets/{machine.document-DziDBmsa.js → machine.document-Bf9pLlII.js} +1 -1
- package/dist/assets/{machines.finder-BzSmJC05.js → machines.finder-D8Jk6ve3.js} +1 -1
- package/dist/assets/{material-BYffxFoI.js → material-BTvwbrSx.js} +1 -1
- package/dist/assets/{material-factory-C8x9nW40.js → material-factory-CBh4XtG8.js} +1 -1
- package/dist/assets/{mesh-OD-8cCPF.js → mesh-DLWtZk0s.js} +1 -1
- package/dist/assets/{model-asset-sections.service-D2XhLBki.js → model-asset-sections.service-DVbilq4O.js} +1 -1
- package/dist/assets/{model-inspection-CPrGFWhU.js → model-inspection-Ck_tLcHB.js} +1 -1
- package/dist/assets/{model-thumbnail-DrHjLgzh.js → model-thumbnail-sBQJ-gD0.js} +1 -1
- package/dist/assets/{models.finder-kOiLPr6p.js → models.finder-BC4y4vDg.js} +1 -1
- package/dist/assets/{module-mode-COpZ8HPQ.js → module-mode-DVsnQ_DK.js} +2 -2
- package/dist/assets/{mount-canvas-ingest-root-Dn8zfXCs.js → mount-canvas-ingest-root-LpMIAiHW.js} +2 -2
- package/dist/assets/{mount-dom-ingest-root-Q69QIXJU.js → mount-dom-ingest-root-DPKLtNIs.js} +2 -2
- package/dist/assets/{mount-ingest-root-tvezSUW2.js → mount-ingest-root-Uc_STOhC.js} +2 -2
- package/dist/assets/{mount-manifest-B6nhuOOp.js → mount-manifest-CNTLAhzG.js} +1 -1
- package/dist/assets/{mount-three-ingest-root-B7CbPqYg.js → mount-three-ingest-root-QXPCr-ey.js} +1 -1
- package/dist/assets/{mounted-authoring-DBEo6Vnv.js → mounted-authoring-NOSbaOld.js} +1 -1
- package/dist/assets/{mounted-story-viewport-source-CVbawnaF.js → mounted-story-viewport-source-CLqRT0wW.js} +1 -1
- package/dist/assets/{native-debug-module-D2m1zyhH.js → native-debug-module-CeewTTRu.js} +1 -1
- package/dist/assets/{navigation-BVNWk7NC.js → navigation-B75RmDSj.js} +1 -1
- package/dist/assets/{navmesh.menu-BSqsnclN.js → navmesh.menu-BiGxTVee.js} +1 -1
- package/dist/assets/{navmesh.service-Bd8zoGEc.js → navmesh.service-qjrel5yA.js} +1 -1
- package/dist/assets/network-observer.service-B82GMek4.js +1 -0
- package/dist/assets/{network.utility-B_g_GTxH.js → network.utility-BcMwd0vz.js} +1 -1
- package/dist/assets/{object3d-document-session-registry-CatZ54tz.js → object3d-document-session-registry-BdoyWXV-.js} +2 -2
- package/dist/assets/{oid-transform-BDgEBytJ.js → oid-transform-D1yGV4_X.js} +1 -1
- package/dist/assets/{particles-DR6A_2v6.js → particles-C1vJLLLF.js} +1 -1
- package/dist/assets/{pixi-authoring-adapter-B60Kh9IK.js → pixi-authoring-adapter-CZWHEKbT.js} +1 -1
- package/dist/assets/{pixi-live-write-target-DJUjy31J.js → pixi-live-write-target-DqCDzSob.js} +1 -1
- package/dist/assets/{play.command-Erf3N5VD.js → play.command-4pimS3Ov.js} +2 -2
- package/dist/assets/{presentation-BxwfX5Wf.js → presentation-c8KWB69i.js} +1 -1
- package/dist/assets/{product-DVszYDSF.js → product-Rf31eg06.js} +1 -1
- package/dist/assets/{profiler.action-CiZCcZ-R.js → profiler.action-DpfbK2R5.js} +1 -1
- package/dist/assets/{profiler.menu-T0cOPUfK.js → profiler.menu-DEUcbppa.js} +1 -1
- package/dist/assets/{profiler.utility-Dq4GRV6G.js → profiler.utility-DBe0ZzyE.js} +1 -1
- package/dist/assets/{project-authoring-session-1_gSjCtF.js → project-authoring-session-DTngSjHI.js} +2 -2
- package/dist/assets/{properties-bone-constraints.inspector-CNSbpQ-3.js → properties-bone-constraints.inspector-ExpZddye.js} +1 -1
- package/dist/assets/{properties-bone.inspector-MrF2CQuv.js → properties-bone.inspector-BvmMO7KB.js} +1 -1
- package/dist/assets/{properties-collection.inspector-BVPyC4UE.js → properties-collection.inspector-B3WvfdYA.js} +1 -1
- package/dist/assets/{properties-constraints.inspector-CA8RTE35.js → properties-constraints.inspector-bYIUicvt.js} +1 -1
- package/dist/assets/{properties-data.inspector-wiB8xicC.js → properties-data.inspector-BBmLilVQ.js} +1 -1
- package/dist/assets/{properties-material.inspector-Bf_ji3wn.js → properties-material.inspector-Cb2MVpJK.js} +1 -1
- package/dist/assets/{properties-modifiers.inspector-6FFdw9AY.js → properties-modifiers.inspector-DSjj9H2E.js} +1 -1
- package/dist/assets/{properties-object.inspector-DE3pesUS.js → properties-object.inspector-BychmjS7.js} +1 -1
- package/dist/assets/{properties-output.inspector-Be-knw0k.js → properties-output.inspector-C2Xpx-vI.js} +1 -1
- package/dist/assets/{properties-particles.inspector-DlqHoQAV.js → properties-particles.inspector-BWV1RYjZ.js} +1 -1
- package/dist/assets/{properties-physics.inspector-BG0VrR6B.js → properties-physics.inspector-CNE1YAfk.js} +1 -1
- package/dist/assets/{properties-render.inspector-CU9OT414.js → properties-render.inspector-D92JYXiN.js} +1 -1
- package/dist/assets/{properties-scene.inspector-C42oTts_.js → properties-scene.inspector-B43zMopV.js} +1 -1
- package/dist/assets/{properties-texture.inspector-DKDV0xVi.js → properties-texture.inspector-BMcRsXT4.js} +1 -1
- package/dist/assets/{properties-view-layer.inspector-F-09o7Wu.js → properties-view-layer.inspector-BqfvdwJG.js} +1 -1
- package/dist/assets/{properties-world.inspector-CDUzzoDL.js → properties-world.inspector-Cl6IgjMx.js} +1 -1
- package/dist/assets/{r3f-design-session-B7g85Ubb.js → r3f-design-session-CwgX5B_A.js} +2 -2
- package/dist/assets/{r3f-physics-binding-Cnq-NbcK.js → r3f-physics-binding-BUbV_fCS.js} +1 -1
- package/dist/assets/{r3f-source-authoring-adapter-CyPyqkM2.js → r3f-source-authoring-adapter-DKeJMLaI.js} +1 -1
- package/dist/assets/{react-canvas-navigation-DmOr9odR.js → react-canvas-navigation-BqnyKUS2.js} +1 -1
- package/dist/assets/{react-inspector.service-DwcaF9IG.js → react-inspector.service-5wEwgm1D.js} +1 -1
- package/dist/assets/{react-story-board-CV_xdGh1.js → react-story-board-Cm8Nj4u1.js} +1 -1
- package/dist/assets/{react-three-rapier.esm-DQRNQwIJ.js → react-three-rapier.esm-nDdQ_7RH.js} +1 -1
- package/dist/assets/{react-world-authoring-adapter-BxVhWmgw.js → react-world-authoring-adapter-COlXEvxj.js} +1 -1
- package/dist/assets/{realm-services-Cg17rNWu.js → realm-services-u_VY0e33.js} +1 -1
- package/dist/assets/{reflection-probe-capture.inspector-CSe75rUr.js → reflection-probe-capture.inspector-CscY9EHQ.js} +1 -1
- package/dist/assets/{registry-DkuVtOoX.js → registry-DyJrv7gj.js} +1 -1
- package/dist/assets/{relative-import-specifier-KuoBpIGI.js → relative-import-specifier-DeKIuVz0.js} +1 -1
- package/dist/assets/{render-env-DdgiL0G1.js → render-env-ByMb9e3E.js} +1 -1
- package/dist/assets/{render-features-BNRGwsS3.js → render-features-D3dENVxg.js} +1 -1
- package/dist/assets/{render-settings-Cvt-UEn5.js → render-settings-DSeZTtGX.js} +1 -1
- package/dist/assets/{resolve-three-B_SlmwYz.js → resolve-three-BuHX_rRe.js} +3 -3
- package/dist/assets/{root-seam-contract-CBnI5fSF.js → root-seam-contract-T7aS6DvS.js} +1 -1
- package/dist/assets/{run-selection-D8BpmvGy.js → run-selection-DpNluakf.js} +1 -1
- package/dist/assets/{scene-capture-Cj_ovCK0.js → scene-capture-B8ldRMbJ.js} +1 -1
- package/dist/assets/{scene-document.service-Kpmmzat3.js → scene-document.service-8MmNKqG5.js} +2 -2
- package/dist/assets/{scene-framing-C5vUXepb.js → scene-framing-CBeqMEwQ.js} +1 -1
- package/dist/assets/{seeded-random-B_ZVFnMw.js → seeded-random-BQtvtmma.js} +1 -1
- package/dist/assets/{session-Diu2gkDJ.js → session-D6La-V0c.js} +50 -5
- package/dist/assets/{setup-renderer-CeDRVovn.js → setup-renderer-k3aIBRB1.js} +1 -1
- package/dist/assets/{source-object3d-authoring-adapter-CkrMfTNh.js → source-object3d-authoring-adapter-Def3y0NS.js} +1 -1
- package/dist/assets/{source-persistence-backend-Dxv1DyQP.js → source-persistence-backend-DKwABDAF.js} +1 -1
- package/dist/assets/{stage-keyboard-DYIzheZc.js → stage-keyboard-CkXIau_d.js} +1 -1
- package/dist/assets/{stage-overlay-set-CGSRG4Aj.js → stage-overlay-set-BeInxTtE.js} +1 -1
- package/dist/assets/{stage-presence-markers-BJz57Ct3.js → stage-presence-markers-XhmE0iQJ.js} +1 -1
- package/dist/assets/{stage-transform-tools-C8-lHfXY.js → stage-transform-tools-CCE1M8Am.js} +1 -1
- package/dist/assets/{standard-viewport-dressing-BVichQxX.js → standard-viewport-dressing-qZPcw4zX.js} +1 -1
- package/dist/assets/{state-watch.action-DKzRIy3J.js → state-watch.action-B4QdQOhc.js} +1 -1
- package/dist/assets/{state-watch.menu-CXJ9I-HV.js → state-watch.menu-DUe1yPhd.js} +1 -1
- package/dist/assets/{state-watch.utility-DiB9QOcK.js → state-watch.utility-BWRwBALs.js} +1 -1
- package/dist/assets/{story-capture-P6zeIG5J.js → story-capture-VPfkPt-n.js} +1 -1
- package/dist/assets/{story-documents-DfvomvsX.js → story-documents-xCtMZ9lz.js} +1 -1
- package/dist/assets/{story-documents.service-ink5SQ1C.js → story-documents.service-BCLnFmEo.js} +1 -1
- package/dist/assets/{story-documents.service-DR9ets4q.js → story-documents.service-Bv_Hfe1K.js} +1 -1
- package/dist/assets/{story-media-presence-DRy56PNr.js → story-media-presence-7NCKUwzV.js} +1 -1
- package/dist/assets/{story-pixi-preview-D56zGWQH.js → story-pixi-preview-C-HvvhDE.js} +1 -1
- package/dist/assets/{story-presentation-Buq-pvYC.js → story-presentation-CWbbna4z.js} +1 -1
- package/dist/assets/{story-three-preview-8i3UHSR1.js → story-three-preview-CpIq4s6p.js} +2 -2
- package/dist/assets/{studio-environment-D6JkSE7Q.js → studio-environment-CHc8-RFD.js} +1 -1
- package/dist/assets/{surface-state-CPApGJAw.js → surface-state-CiltpQ-L.js} +1 -1
- package/dist/assets/{syntactic-prop-specs-kZ8ukBIu.js → syntactic-prop-specs-B5uFSi1H.js} +1 -1
- package/dist/assets/{team-playtest.service-CGxQ8XaR.js → team-playtest.service-D8TbW695.js} +1 -1
- package/dist/assets/{three-BeNC5ULQ.js → three-CGHSWwrH.js} +1 -1
- package/dist/assets/{three-authoring-adapter-BC0M_LjK.js → three-authoring-adapter-zkdCVdlL.js} +1 -1
- package/dist/assets/three-authoring.service-Dj3imjtC.js +2 -0
- package/dist/assets/{three-ingest-runtime-QR_mSA3s.js → three-ingest-runtime-CC8nc50x.js} +1 -1
- package/dist/assets/{three-integration-B0Pips-D.js → three-integration-B46eGe9S.js} +2 -2
- package/dist/assets/three-integration.service-CSt_SxS_.js +1 -0
- package/dist/assets/{three-projection-core-CktgE3qZ.js → three-projection-core-BI2-81k2.js} +1 -1
- package/dist/assets/{three-state-Jjh8RKmv.js → three-state-NOAop1c_.js} +1 -1
- package/dist/assets/{three-story-capture.service-D4GsyMao.js → three-story-capture.service-CRdNwCJP.js} +2 -2
- package/dist/assets/{three-story-model-CcSkyEHD.js → three-story-model-DgWAU7We.js} +1 -1
- package/dist/assets/{three-viewport-presentation-DMl9pRzL.js → three-viewport-presentation-Cz6OIQlD.js} +1 -1
- package/dist/assets/{transform-mode-request-BrnHasM9.js → transform-mode-request-DuINH97B.js} +1 -1
- package/dist/assets/{transport-strip-B_-5H4dc.js → transport-strip-Bsw6bWgV.js} +1 -1
- package/dist/assets/transport.header-BIRJFXai.js +1 -0
- package/dist/assets/{tuples-DT5W38h7.js → tuples-BCce0doz.js} +1 -1
- package/dist/assets/{ui-board-document-DWKA2ffR.js → ui-board-document-DljWrkP_.js} +2 -2
- package/dist/assets/{user-data-BIoZkgOJ.js → user-data-C3XEGCRZ.js} +1 -1
- package/dist/assets/{utility-view-state-CVfqfr1o.js → utility-view-state-EwvPqXnb.js} +1 -1
- package/dist/assets/{viewport-door-DkrIQ3Lf.js → viewport-door-z29BPCdR.js} +1 -1
- package/dist/assets/{viewport-root-presentation-CBBdlbEP.js → viewport-root-presentation-BR5qa4ra.js} +1 -1
- package/dist/assets/{viewport-surface-status-DD1DHTG4.js → viewport-surface-status-DKugQr9F.js} +1 -1
- package/dist/assets/{webworkerAll-Dz3U-k_j.js → webworkerAll-C44u4OVd.js} +1 -1
- package/dist/assets/worker-ClX-Y_uh.js +2 -0
- package/dist/assets/{workspace-arrangement-BrA73ntW.js → workspace-arrangement-BXkQP4cU.js} +1 -1
- package/dist/assets/{world-documents-D0S4TvKh.js → world-documents-JaH81BDa.js} +1 -1
- package/dist/assets/{world-root-stage-binding-Da5R7yq2.js → world-root-stage-binding-CX1Skp3_.js} +1 -1
- package/dist/assets/{xstate-animation-binding-yMMgYROj.js → xstate-animation-binding-rWipzV_g.js} +1 -1
- package/dist/assets/{xstate-animation-meta-DVb9it2u.js → xstate-animation-meta-DnYOF8p-.js} +1 -1
- package/dist-node/cli.js +16 -16
- package/package.json +16 -16
- package/dist/assets/InspectorObjectPreview-DniTSdEo.js +0 -1
- package/dist/assets/Object3DDocumentViewport-Dr7XBnEa.js +0 -2
- package/dist/assets/autoplay.service-BvEb13A3.js +0 -1
- package/dist/assets/blender-runtime-host-Byw4o_u0.js +0 -7
- package/dist/assets/instances.command-B9SndOqS.js +0 -1
- package/dist/assets/network-observer.service-COlyC1Vn.js +0 -1
- package/dist/assets/three-authoring.service-DRxwcnXA.js +0 -2
- package/dist/assets/three-integration.service-sYOQoXd6.js +0 -1
- package/dist/assets/transport.header-Dvkippp-.js +0 -1
- package/dist/assets/worker-Df5OJQKy.js +0 -2
|
@@ -1373,6 +1373,11 @@ class Session:
|
|
|
1373
1373
|
# that can see the ask can read the file.
|
|
1374
1374
|
if EXPORT_BUFFER_PATH:
|
|
1375
1375
|
options["buffer_path"] = EXPORT_BUFFER_PATH
|
|
1376
|
+
# NOTICE, THEN PULL (\`_present\`): a changed mesh is named here and its columns are written
|
|
1377
|
+
# one mesh at a time after, so the engine never holds every changed mesh's columns at once.
|
|
1378
|
+
# An engine without the pull door ships them all in this call, as before.
|
|
1379
|
+
if hasattr(_blender_web, "export_mesh"):
|
|
1380
|
+
options["defer"] = True
|
|
1376
1381
|
frame = json.loads(_blender_web.export_frame(json.dumps(options)))
|
|
1377
1382
|
error = frame.get("error")
|
|
1378
1383
|
if error:
|
|
@@ -1499,13 +1504,15 @@ class Session:
|
|
|
1499
1504
|
def _present(self, capture=None):
|
|
1500
1505
|
known = dict(self._known)
|
|
1501
1506
|
frame = self._export()
|
|
1507
|
+
pulled = self._pull(frame)
|
|
1502
1508
|
self._drop_unreachable_textures(frame)
|
|
1503
1509
|
# WHAT THIS FRAME SHIPPED, for the session's own accounting: the ids
|
|
1504
1510
|
# whose columns crossed, and the ids that went as a reference. The
|
|
1505
1511
|
# export's whole revision rule is visible here and nowhere else.
|
|
1506
1512
|
self.last_shipped = {
|
|
1507
1513
|
"revision": self.revision,
|
|
1508
|
-
"columns": sorted(k for k, v in frame["meshes"].items()
|
|
1514
|
+
"columns": sorted(k for k, v in frame["meshes"].items()
|
|
1515
|
+
if "columns" in v or v.get("deferred")),
|
|
1509
1516
|
"unchanged": sorted(k for k, v in frame["meshes"].items() if v.get("unchanged")),
|
|
1510
1517
|
"images": sorted(frame["images"].keys()),
|
|
1511
1518
|
# How many COLUMN BYTES this frame actually shipped: a move ships
|
|
@@ -1535,6 +1542,8 @@ class Session:
|
|
|
1535
1542
|
self._known["weights:%s:%s" % (weights["object"], weights["group"])] = (
|
|
1536
1543
|
weights["digest"])
|
|
1537
1544
|
request = {"frame": frame}
|
|
1545
|
+
if pulled:
|
|
1546
|
+
request["present"] = True
|
|
1538
1547
|
if capture:
|
|
1539
1548
|
request["capture"] = capture
|
|
1540
1549
|
# BESIDE the frame, never inside it: the frame's schema is the
|
|
@@ -1553,6 +1562,38 @@ class Session:
|
|
|
1553
1562
|
self._reconcile_with_presenter(answer, frame)
|
|
1554
1563
|
return answer
|
|
1555
1564
|
|
|
1565
|
+
def _pull(self, frame):
|
|
1566
|
+
"""THE PULL, one datablock at a time, as Hydra's render delegate pulls each prim's data
|
|
1567
|
+
during Sync after the scene index's notice (\`HydraSceneIndex::populate\`). The door named
|
|
1568
|
+
the changed meshes and pictures as deferred; the worker first copies the frame's own
|
|
1569
|
+
columns out of the heap (\`hold\`), then each mesh's columns and each picture's pixels in
|
|
1570
|
+
turn, copying each out before the next is written (every pull frees the one before). The
|
|
1571
|
+
engine's peak is the scene plus one datablock's columns, not plus every changed one's.
|
|
1572
|
+
|
|
1573
|
+
The pieces come back into the frame as the door would have written them: a picture with no
|
|
1574
|
+
readable pixels leaves \`images\` with its warning, as it did when the frame carried it
|
|
1575
|
+
whole, so \`_drop_unreachable_textures\` reads the same frame either way. Answers whether
|
|
1576
|
+
anything was pulled; the worker then presents the frame with its pieces."""
|
|
1577
|
+
meshes = [key for key, mesh in frame["meshes"].items() if mesh.get("deferred")]
|
|
1578
|
+
images = [name for name, image in frame["images"].items() if image.get("deferred")]
|
|
1579
|
+
if not meshes and not images:
|
|
1580
|
+
return False
|
|
1581
|
+
ask({"hold": frame})
|
|
1582
|
+
options = {"buffer_path": EXPORT_BUFFER_PATH} if EXPORT_BUFFER_PATH else {}
|
|
1583
|
+
for kind, keys, door in (("mesh", meshes, _blender_web.export_mesh),
|
|
1584
|
+
("image", images, _blender_web.export_image)):
|
|
1585
|
+
for key in keys:
|
|
1586
|
+
options["key"] = key
|
|
1587
|
+
piece = json.loads(door(json.dumps(options)))
|
|
1588
|
+
if piece.get("error"):
|
|
1589
|
+
raise RuntimeError("Blender export door: %s" % piece["error"])
|
|
1590
|
+
frame["warnings"].extend(piece.get("warnings", []))
|
|
1591
|
+
if piece[kind] is None:
|
|
1592
|
+
del frame["images"][key]
|
|
1593
|
+
continue
|
|
1594
|
+
ask({kind: key, "piece": piece[kind]})
|
|
1595
|
+
return True
|
|
1596
|
+
|
|
1556
1597
|
def _drop_unreachable_textures(self, frame):
|
|
1557
1598
|
"""A picture the export could not read is a WARNING, not a refusal.
|
|
1558
1599
|
|
|
@@ -2311,10 +2352,14 @@ class NativeHistory:
|
|
|
2311
2352
|
finally:
|
|
2312
2353
|
self.moving = False
|
|
2313
2354
|
self.cursor += -1 if direction == "undo" else 1
|
|
2314
|
-
#
|
|
2315
|
-
#
|
|
2316
|
-
|
|
2317
|
-
|
|
2355
|
+
# AN UNDO STEP IS AN ORDINARY UPDATE when Blender kept its datablocks and depsgraph:
|
|
2356
|
+
# memfile undo re-reads only the changed IDs and tags exactly those, so the next frame
|
|
2357
|
+
# re-ships what changed and the presenter keeps the rest (\`session_undo\`). A step that
|
|
2358
|
+
# replaced the depsgraph starts both revision caches over, as does an engine without
|
|
2359
|
+
# the door.
|
|
2360
|
+
if not hasattr(_blender_web, "session_undo") or _blender_web.session_undo():
|
|
2361
|
+
_blender_web.session_reset()
|
|
2362
|
+
SESSION.forget()
|
|
2318
2363
|
SESSION.present()
|
|
2319
2364
|
return {"moved": True}
|
|
2320
2365
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{S as O,a as q,W as st}from"./three.module-BLhyNg0e.js";import{Pass as H,Effect as ue,Selection as ot,RenderPass as re,NormalPass as We,EffectPass as nt,SMAAPreset as ie,SMAAEffect as lt,SSAOEffect as ct,BloomEffect as ut,DepthOfFieldEffect as ft,TiltShiftEffect as dt,GodRaysEffect as ht,OutlineEffect as pt,ChromaticAberrationEffect as mt,LensDistortionEffect as vt,ShockWaveEffect as gt,BrightnessContrastEffect as xt,HueSaturationEffect as Tt,SepiaEffect as St,ColorDepthEffect as bt,NoiseEffect as Dt,ScanlineEffect as yt,DotScreenEffect as wt,GridEffect as Mt,PixelationEffect as Pt,GlitchEffect as Rt,VignetteEffect as Ct}from"./index-DHhMOs_s.js";import{_ as N,cm as h,em as C,fx as z,dw as B,c1 as x,bi as V,au as J,cO as fe,ed as j,cE as b,fd as m,e8 as pe,b0 as E,aC as Te,fj as Nt,fo as U,co as Qe,d5 as Lt,N as It,ex as zt,M as Ce,du as Et,d9 as Ke,ff as Ye,b3 as At,fb as u,cP as Xe,ej as Ge,c3 as ce,eX as Se,b9 as _,fe as se,cl as Ze,eW as Ft,cN as ne,Y as Ne,aT as Ut,dv as me,C as Vt,cq as Bt,eU as Ot,Z as jt,dp as kt,ew as Ht,B as Wt,e as Qt,A as be,W as Kt,ea as Yt,c8 as Xt,d7 as Gt,df as Zt}from"./three.core-3arARmh6.js";import{DEFAULTS as ae}from"./defaults-DKiBJCPN.js";import{detectKtx2Support as qt}from"./loader-BTUKnX5Q.js";import{resolveRenderSettings as De}from"./render-settings-
|
|
1
|
+
import{S as O,a as q,W as st}from"./three.module-BLhyNg0e.js";import{Pass as H,Effect as ue,Selection as ot,RenderPass as re,NormalPass as We,EffectPass as nt,SMAAPreset as ie,SMAAEffect as lt,SSAOEffect as ct,BloomEffect as ut,DepthOfFieldEffect as ft,TiltShiftEffect as dt,GodRaysEffect as ht,OutlineEffect as pt,ChromaticAberrationEffect as mt,LensDistortionEffect as vt,ShockWaveEffect as gt,BrightnessContrastEffect as xt,HueSaturationEffect as Tt,SepiaEffect as St,ColorDepthEffect as bt,NoiseEffect as Dt,ScanlineEffect as yt,DotScreenEffect as wt,GridEffect as Mt,PixelationEffect as Pt,GlitchEffect as Rt,VignetteEffect as Ct}from"./index-DHhMOs_s.js";import{_ as N,cm as h,em as C,fx as z,dw as B,c1 as x,bi as V,au as J,cO as fe,ed as j,cE as b,fd as m,e8 as pe,b0 as E,aC as Te,fj as Nt,fo as U,co as Qe,d5 as Lt,N as It,ex as zt,M as Ce,du as Et,d9 as Ke,ff as Ye,b3 as At,fb as u,cP as Xe,ej as Ge,c3 as ce,eX as Se,b9 as _,fe as se,cl as Ze,eW as Ft,cN as ne,Y as Ne,aT as Ut,dv as me,C as Vt,cq as Bt,eU as Ot,Z as jt,dp as kt,ew as Ht,B as Wt,e as Qt,A as be,W as Kt,ea as Yt,c8 as Xt,d7 as Gt,df as Zt}from"./three.core-3arARmh6.js";import{DEFAULTS as ae}from"./defaults-DKiBJCPN.js";import{detectKtx2Support as qt}from"./loader-BTUKnX5Q.js";import{resolveRenderSettings as De}from"./render-settings-DSeZTtGX.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./render-features-D3dENVxg.js";import"./index-CfY0i8Sb.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";class Jt extends It{boundingSphere=new zt;constructor(){super(),this.setAttribute("position",new Ce(new Float32Array([-1,-1,3,-1,-1,3]),2)),this.setAttribute("uv",new Ce(new Float32Array([0,0,2,0,0,2]),2))}computeBoundingSphere(){}}const _t=new Jt,$t=new Lt;class W{constructor(e){this._mesh=new Qe(_t,e),this._mesh.frustumCulled=!1}render(e){e.render(this._mesh,$t)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}dispose(){this._mesh.material.dispose(),this._mesh.geometry.dispose()}}const ei={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},sceneNormal:{value:null},projMat:{value:new h},viewMat:{value:new h},projViewMat:{value:new h},projectionMatrixInv:{value:new h},viewMatrixInv:{value:new h},cameraPos:{value:new U},resolution:{value:new m},biasAdjustment:{value:new m},time:{value:0},samples:{value:[]},bluenoise:{value:null},distanceFalloff:{value:1},radius:{value:5},near:{value:.1},far:{value:1e3},ortho:{value:!1},screenSpaceRadius:{value:!1},frame:{value:0}},depthWrite:!1,depthTest:!1,vertexShader:`
|
|
2
2
|
varying vec2 vUv;
|
|
3
3
|
void main() {
|
|
4
4
|
vUv = uv;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isEditorOwnedObject as f}from"./editor-layers-
|
|
1
|
+
import{isEditorOwnedObject as f}from"./editor-layers-BIj5KO0g.js";import{T as y,d as b,o as a}from"./three-CGHSWwrH.js";import{g}from"./user-data-C3XEGCRZ.js";import{i as S,a as v,c as I}from"./model-inspection-Ck_tLcHB.js";import{C as j,S as w,r as R}from"./three-projection-core-BI2-81k2.js";const u=new WeakMap;function E(d){let t=!1;if(d.traverse(s=>{g(s,"gaussianSplat")&&(t=!0)}),t)return"Gaussian splat";const r=S(d),e=v(d);return{static:"Static model",animated:"Animated model",rigged:"Rigged model",skinned:"Skinned model"}[I(r,e)]}function h(d){const t=d.material;return Array.isArray(t)?t[0]??null:t??null}function l(d){return d?.color??null}class p{constructor(t,r,e){if(this.store=t,this.scene=r,this.options=e,this.provenance=e.provenance??(e.documentKind==="asset"?{source:"document",label:"derived asset",detail:"Loaded from an ordinary project asset. Edit its source or import recipe."}:{source:"source-code",label:"source",detail:"Instantiated from project TypeScript. Edit source or exposed parameters, then rebuild."}),this.documentNodeId=`object3d-document:${e.documentId}`,this.projector=new y(b(e.documentId)),this.indexGraph(),e.hierarchyRoots&&new Set(e.hierarchyRoots).size!==e.hierarchyRoots.length)throw new Error(`Object3D document "${e.title}" declared the same hierarchy root twice.`);const s=new Set(e.hierarchyRoots??[]);for(const o of s){let i=o.parent;for(;i&&i!==r;){if(s.has(i))throw new Error(`Object3D document "${e.title}" declared nested hierarchy roots; roots must be non-overlapping.`);i=i.parent}}this.hierarchyRootIds=e.hierarchyRoots?e.hierarchyRoots.map(o=>{const i=this.idByObject.get(o);if(!i)throw new Error(`Object3D document "${e.title}" declared a hierarchy root outside its native graph.`);return i}):[...this.projector.rootIds],this.view=new j({projector:this.projector,scene:r,documentNodeId:this.documentNodeId,rootIds:this.hierarchyRootIds}),this.selectionState=new w({store:t.shell,owns:o=>this.byId.has(o),initial:[this.documentNodeId],onChange:o=>this.syncMarkedSelection(o)})}documentNodeId;projector;hierarchyRootIds;view;selectionState;markedSelection=new Set;capabilities={transform:!1,inspectorFields:!0,persist:!1};provenance;disposed=!1;dispose(){if(!this.disposed){this.disposed=!0;for(const t of this.watchedForStructure)t.removeEventListener("childadded",this.onStructureChanged),t.removeEventListener("childremoved",this.onStructureChanged);this.watchedForStructure=[]}}watchedForStructure=[];structureReindexQueued=!1;onStructureChanged=t=>{f(t.child)||this.scheduleStructureReindex()};indexGraph(){this.projector.project(this.scene),this.watchStructure()}watchStructure(){const t=e=>e;for(const e of this.watchedForStructure)t(e).removeEventListener("childadded",this.onStructureChanged),t(e).removeEventListener("childremoved",this.onStructureChanged);this.watchedForStructure=[];const r=e=>{t(e).addEventListener("childadded",this.onStructureChanged),t(e).addEventListener("childremoved",this.onStructureChanged),this.watchedForStructure.push(e)};r(this.scene);for(const[,e]of this.byId)r(e)}scheduleStructureReindex(){this.disposed||this.structureReindexQueued||(this.structureReindexQueued=!0,queueMicrotask(()=>{if(this.structureReindexQueued=!1,this.disposed||(this.indexGraph(),this.store.scene!==this.scene))return;const t=this.store.objectMap;t.clear();for(const[e,s]of this.byId)t.set(e,s);const r=[...this.store.shell.selectedEntityIds].filter(e=>e===this.documentNodeId||this.byId.has(e));r.length!==this.store.shell.selectedEntityIds.size&&this.store.shell.selectMultiple(r),this.store.notifyIngestObjectMapEdit()}))}get byId(){return this.projector.objects}get idByObject(){return this.projector.idsByObject}documentTypeLabel(){if(this.options.documentKind!=="asset")return;const t=this.scene.children.find(s=>this.idByObject.has(s))??null;if(!t)return;const r=u.get(t);if(r!==void 0)return r;const e=E(t);return u.set(t,e),e}hierarchy={roots:()=>[this.hierarchy.node(this.documentNodeId)],node:t=>{if(t===this.documentNodeId){const e=this.documentTypeLabel();return{id:t,label:this.options.title,secondaryLabel:this.options.sourcePath,role:"document",kind:this.options.documentKind==="asset"?"model-asset":"three-source",...e?{typeLabel:e}:{},parentId:null,childIds:this.view.rootIds()}}const r=this.byId.get(t);return r?this.view.node(r):null},object3D:t=>this.byId.get(t)??null,idForObject3D:t=>this.idByObject.get(t)??null};selection={get:()=>this.selectionState.current(),set:t=>this.selectionState.publish(t.filter(r=>r===this.documentNodeId||this.byId.has(r)))};static READ_ONLY_REASON="This document shows what the module builds; its properties are read-only here. Edit the module.";readOnly=()=>({writable:!1,reason:p.READ_ONLY_REASON});transforms={get:t=>R(this.byId.get(t)??null),beginEdit:()=>{},apply:()=>{},endEdit:()=>{}};inspector={properties:t=>{if(t===this.documentNodeId)return this.options.audit===!1?[]:[{path:"name",label:"Name",type:"string",readonly:!0},{path:"source.path",label:"Source",type:"string",readonly:!0}];const r=this.byId.get(t);if(!r)return[];const e=a(r);if(e?.fields)return e.fields().map(({value:n,...m})=>m);const s=[{path:"name",label:"Name",type:"string",readonly:!0},{path:"visible",label:"Visible",type:"boolean",readonly:!0},{path:"object.type",label:"Native type",type:"string",readonly:!0}],o=r;if(o.isMesh&&o.geometry){const n=o.geometry.getAttribute("position");s.push({path:"mesh.vertices",label:"Vertices",type:"number",readonly:!0,group:"Mesh"}),n&&s.push({path:"mesh.triangles",label:"Triangles",type:"number",readonly:!0,group:"Mesh"})}const i=h(r);i&&(s.push({path:"material.type",label:"Material",type:"string",readonly:!0,group:"Material"}),l(i)&&s.push({path:"material.color",label:"Color",type:"color",readonly:!0,group:"Material"}));const c=r;return c.isSkinnedMesh&&c.skeleton&&s.push({path:"skin.bones",label:"Bones",type:"number",readonly:!0,group:"Skin"}),s},get:(t,r)=>{if(t===this.documentNodeId)return r==="name"?this.options.title:r==="source.path"?this.options.sourcePath:void 0;const e=this.byId.get(t);if(!e)return;const o=a(e)?.fields?.().find(n=>n.path===r);if(o)return o.value();if(r==="name")return e.name||e.type;if(r==="visible")return e.visible;if(r==="object.type")return e.type;const i=e;if(r==="mesh.vertices")return i.geometry?.getAttribute("position")?.count??0;if(r==="mesh.triangles"){const n=i.geometry;return(n?.index?.count??n?.getAttribute("position")?.count??0)/3}const c=h(e);if(r==="material.type")return c?.type;if(r==="material.color"){const n=l(c);return n?`#${n.getHexString()}`:void 0}if(r==="skin.bones")return e.skeleton?.bones.length??0},set:()=>{},editability:()=>this.readOnly()};subscribe(t){return this.store.shell.subscribe(t)}get documentId(){return this.documentNodeId}get documentRootObject(){const t=this.hierarchy.node(this.documentNodeId)?.childIds[0];return t?this.byId.get(t)??null:null}syncMarkedSelection(t){const r=new Set(t.map(e=>this.byId.get(e)??null).filter(e=>e!==null).filter(e=>a(e)?.selectionChanged!==void 0));for(const e of this.markedSelection)r.has(e)||a(e)?.selectionChanged?.(!1);for(const e of r)this.markedSelection.has(e)||a(e)?.selectionChanged?.(!0);this.markedSelection=r}}export{p as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{gF as d,dv as u,bU as f,bV as a,ay as p,eb as l,Z as c,gG as g}from"./index-
|
|
1
|
+
import{gF as d,dv as u,bU as f,bV as a,ay as p,eb as l,Z as c,gG as g}from"./index-CfY0i8Sb.js";import{r as s,I as h,i as w}from"./ingest-source-persistence-Dza2jWb5.js";function y(n){const t={sourceLocation:e=>{const r=n(e);if(!(!r.anchored||r.kind!=="source"))return{file:r.file,line:r.line}}};return{links:e=>{const r=n(e);return!r.anchored||r.kind!=="source"?[]:[{id:`creation-site:${r.file}:${r.line}:${r.col}`,title:`Constructed at ${r.display}`,open:()=>{d(t,e,"callsite").then(u)}}]}}}function v(n){return`this gesture changed ${n.length} properties at once (${n.join(", ")}), and creation-site write-back plans one property per gesture`}function $(n){const{backend:t,label:e}=n;return f({resolve:()=>{const r=n.subject(),i=t.gate(r);if(!i.ok)return a(i.reason);const o=r.anchorKind;return o==="live-only"?a(t.describe(r)):{reaches:"writer",anchorKind:o,destination:t.destination(),write:()=>t.write({...r,baseline:n.baseline,next:n.next,label:e})}},record:r=>{r||n.journal()},report:r=>{t.armed()&&t.report(e,r)}})}function S(n){let t=null;return{attach(e){t=n.writer??(g("An ingest root’s source persistence")?new h({history:n.history,live:e}):null)},describe({anchor:e,instances:r,property:i,writeScope:o}){return t?t.describe(e,r,i,o):e.anchored?e.kind==="data"?`Live-only edit — this object is ${e.display}.`:`Live-only edit — this object is created at ${e.display}.`:`Live-only edit — ${e.reason}.`},gate({anchor:e,instances:r,property:i,writeScope:o}){return t?t.gate(e,r,i,o):{ok:!1,reason:"this editor tier cannot write project source"}},armed:()=>t!==null&&l(),readSiteLiterals:e=>t?t.inspect(e):Promise.resolve({}),report:(e,r)=>s(e,r),async write(e){if(!t)return!1;try{const r=await t.persist(e);return r.persisted?(c.log(`[ingest] ${e.label} written to the game's own source — ${r.detail}`),!0):(s(e.label,r.reason),!1)}catch(r){return s(e.label,`the write failed: ${r instanceof Error?r.message:String(r)}`),!1}},removal:{available(e){return t?t.gate(e.anchor,e.instances,e.property,e.writeScope).ok:!1},async perform(e){if(!t)return!1;try{const r=await t.remove({property:e.property,surface:e.surface,anchor:e.anchor,instances:e.instances,writeScope:e.writeScope,label:e.label});return r.persisted?(c.log(`[ingest] ${e.label} — dropped from the game's own source (${r.detail})`),!0):(s(e.label,r.reason),!1)}catch(r){return s(e.label,`the removal failed: ${r instanceof Error?r.message:String(r)}`),!1}}},destination(){const e=w();return l()&&e?.writable&&t?"the game's own source (creation-site write-back)":p},dispose(){t?.dispose(),t=null}}}export{S as a,y as c,v as m,$ as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h}from"./index-nmcBqr7Y.js";import{s as b,c as f,l as V,a as x,t as S,v as P,p as T,b as y}from"./camera-authoring-DYjhU5Zp.js";import{ha as L,E as A,bL as C,G as k,y as g,r as O,dv as E,hb as M,ga as R,hc as z}from"./index-
|
|
1
|
+
import{r as h}from"./index-nmcBqr7Y.js";import{s as b,c as f,l as V,a as x,t as S,v as P,p as T,b as y}from"./camera-authoring-DYjhU5Zp.js";import{ha as L,E as A,bL as C,G as k,y as g,r as O,dv as E,hb as M,ga as R,hc as z}from"./index-CfY0i8Sb.js";import{a as D}from"./object3d-document-session-registry-BdoyWXV-.js";import{r as s}from"./transform-mode-request-DuINH97B.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";function j(){const e=f();if(e.view)return[{id:"camera.exitView",label:"Exit Camera View",execute:V}];const i=x();return i?[{id:"camera.viewThrough",label:`View Through ${i.name}`,execute:()=>P(i)},...i.canAuthorPose?[{id:"camera.pilot",label:`Pilot ${i.name}`,execute:()=>T(i)},{id:"camera.alignToView",label:`Align ${i.name} to Current View`,execute:()=>y(i)}]:[],{id:"camera.pinPreview",label:e.previewPinned?"Unpin Camera Preview":"Pin Camera Preview",execute:S}]:[]}function H(){const e=g();return e?D(e):null}function a(e,i){const o=H();o?o.setMode(i):e.setShadingMode(i)}function $(e){const i=[{id:"mode.select",label:"Select Tool (no gizmo)",shortcut:"transform.select",execute:()=>s(e.shell,"select")},{id:"mode.combined",label:"Transform Mode (all handles)",shortcut:"transform.combined",execute:()=>s(e.shell,"combined")},{id:"mode.translate",label:"Translate Mode",shortcut:"transform.translate",execute:()=>s(e.shell,"translate")},{id:"mode.rotate",label:"Rotate Mode",shortcut:"transform.rotate",execute:()=>s(e.shell,"rotate")},{id:"mode.scale",label:"Scale Mode",shortcut:"transform.scale",execute:()=>s(e.shell,"scale")},{id:"mode.world",label:"World Space",execute:()=>e.shell.setTransformSpace("world")},{id:"mode.local",label:"Local Space",execute:()=>e.shell.setTransformSpace("local")},{id:"toggle.grid",label:"Toggle Grid",execute:()=>{const l=g();l&&A(l)&&C(l,!k(l))}},{id:"toggle.helpers",label:"Toggle Helpers",execute:()=>e.shell.toggleHelpers()},{id:"toggle.stats",label:"Toggle Stats Overlay",execute:()=>e.toggleStats()},{id:"toggle.snap",label:"Toggle Snap",shortcut:"viewport.toggleSnap",execute:()=>e.shell.toggleSnap()},{id:"toggle.surface-snap",label:"Toggle Surface Snap",execute:()=>e.shell.toggleSnapToSurface()},{id:"shading.solid",label:"Material Shading",execute:()=>a(e,"solid")},{id:"shading.clay",label:"Solid Shading",execute:()=>a(e,"clay")},{id:"shading.wireframe",label:"Wireframe Shading",execute:()=>a(e,"wireframe")},{id:"shading.unlit",label:"Unlit Shading",execute:()=>a(e,"unlit")},{id:"shading.normals",label:"Normal Shading",execute:()=>a(e,"normals")},{id:"shading.overdraw",label:"Overdraw Shading",execute:()=>a(e,"overdraw")},{id:"view.top",label:"Top View",shortcut:"view.top",execute:()=>e.shell.setViewPreset("top")},{id:"view.front",label:"Front View",shortcut:"view.front",execute:()=>e.shell.setViewPreset("front")},{id:"view.right",label:"Right View",shortcut:"view.right",execute:()=>e.shell.setViewPreset("right")},{id:"view.bottom",label:"Bottom View",shortcut:"view.bottom",execute:()=>e.shell.setViewPreset("bottom")},{id:"view.back",label:"Back View",shortcut:"view.back",execute:()=>e.shell.setViewPreset("back")},{id:"view.left",label:"Left View",shortcut:"view.left",execute:()=>e.shell.setViewPreset("left")},{id:"view.orbitLeft",label:"Orbit Left",shortcut:"view.orbitLeft",execute:()=>e.shell.stepView("orbit-left")},{id:"view.orbitRight",label:"Orbit Right",shortcut:"view.orbitRight",execute:()=>e.shell.stepView("orbit-right")},{id:"view.orbitUp",label:"Orbit Up",shortcut:"view.orbitUp",execute:()=>e.shell.stepView("orbit-up")},{id:"view.orbitDown",label:"Orbit Down",shortcut:"view.orbitDown",execute:()=>e.shell.stepView("orbit-down")},{id:"view.opposite",label:"Opposite View",shortcut:"view.opposite",execute:()=>e.shell.stepView("opposite")},{id:"view.rollLeft",label:"Roll Left",shortcut:"view.rollLeft",execute:()=>e.shell.stepView("roll-left")},{id:"view.rollRight",label:"Roll Right",shortcut:"view.rollRight",execute:()=>e.shell.stepView("roll-right")},{id:"view.all",label:"Frame All",shortcut:"view.all",execute:()=>e.shell.frameAll()},{id:"view.zoomIn",label:"Zoom In",shortcut:"view.zoomIn",execute:()=>e.shell.zoomView(1)},{id:"view.zoomOut",label:"Zoom Out",shortcut:"view.zoomOut",execute:()=>e.shell.zoomView(-1)},{id:"view.perspective",label:"Perspective View",shortcut:"view.perspective",execute:()=>e.shell.setViewPreset("perspective")},{id:"view.projection",label:"Perspective/Orthographic",shortcut:"view.projection",execute:()=>e.shell.toggleProjection()},{id:"view.camera",label:"Camera View",shortcut:"view.camera",execute:()=>e.shell.toggleCameraView()},{id:"focus.selected",label:"Focus Selected",shortcut:"viewport.frameSelection",execute:()=>e.shell.focusOnSelection()}];return L({actions:()=>[...i,...j()],subscribe:b})}function F(e,i,o){const{keyboard:l}=O(),r=t=>()=>{i.isFlying||s(e.shell,t)},v=l.bindActions([{id:"transform.select",scope:"stage",run:r("select")},{id:"transform.combined",scope:"stage",run:r("combined")},{id:"transform.translate",scope:"stage",run:r("translate")},{id:"transform.rotate",scope:"stage",run:r("rotate")},{id:"transform.scale",scope:"stage",run:r("scale")},{id:"viewport.toggleSnap",scope:"stage",run:()=>{e.shell.toggleSnap();const{translate:t,rotate:n,scale:m}=e.shell.snapValues,p=`${l.shortcutFor("viewport.toggleSnap")??""} toggles; hold Ctrl while dragging to snap once`;E(e.shell.snapEnabled?`Snap on — ${t} units, ${n}°, ×${m} (${p})`:`Snap off (${p})`)}},{id:"viewport.frameSelection",scope:"stage",run:()=>e.shell.focusOnSelection()},{id:"viewport.cyclePivot",scope:"stage",run:()=>{const t=["active-element","median-point","individual-origins"],n=t.indexOf(e.shell.pivotMode);e.shell.setPivotMode(t[(n+1)%t.length])}},{id:"view.top",scope:"stage",run:()=>e.shell.setViewPreset("top")},{id:"view.front",scope:"stage",run:()=>e.shell.setViewPreset("front")},{id:"view.right",scope:"stage",run:()=>e.shell.setViewPreset("right")},{id:"view.bottom",scope:"stage",run:()=>e.shell.setViewPreset("bottom")},{id:"view.back",scope:"stage",run:()=>e.shell.setViewPreset("back")},{id:"view.left",scope:"stage",run:()=>e.shell.setViewPreset("left")},{id:"view.orbitLeft",scope:"stage",run:()=>e.shell.stepView("orbit-left")},{id:"view.orbitRight",scope:"stage",run:()=>e.shell.stepView("orbit-right")},{id:"view.orbitUp",scope:"stage",run:()=>e.shell.stepView("orbit-up")},{id:"view.orbitDown",scope:"stage",run:()=>e.shell.stepView("orbit-down")},{id:"view.opposite",scope:"stage",run:()=>e.shell.stepView("opposite")},{id:"view.rollLeft",scope:"stage",run:()=>e.shell.stepView("roll-left")},{id:"view.rollRight",scope:"stage",run:()=>e.shell.stepView("roll-right")},{id:"view.all",scope:"stage",run:()=>e.shell.frameAll()},{id:"view.zoomIn",scope:"stage",run:()=>e.shell.zoomView(1)},{id:"view.zoomOut",scope:"stage",run:()=>e.shell.zoomView(-1)},{id:"view.perspective",scope:"stage",run:()=>e.shell.setViewPreset("perspective")},{id:"view.projection",scope:"stage",run:()=>e.shell.toggleProjection()},{id:"view.camera",scope:"stage",run:()=>e.shell.toggleCameraView()},{id:"viewport.snapToFloor",scope:"stage",run:()=>i.snapSelectionToFloor()}]),c=()=>R("viewport");o.addEventListener("pointerdown",c),M();const d=t=>l.chordsFor("viewport.vertexSnapHold").some(n=>n.key===t.key.toLowerCase()),u=t=>{if(d(t)&&!t.metaKey&&!t.ctrlKey&&!t.repeat){if(z()!=="viewport"||t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement)return;e.setVertexSnapActive(!0),i.activateVertexSnap()}},w=t=>{d(t)&&!t.metaKey&&!t.ctrlKey&&(e.setVertexSnapActive(!1),i.deactivateVertexSnap())};return window.addEventListener("keydown",u),window.addEventListener("keyup",w),()=>{v(),o.removeEventListener("pointerdown",c),window.removeEventListener("keydown",u),window.removeEventListener("keyup",w)}}function Y({stage:e}){return h.useEffect(()=>F(e.store,e.viewport,e.canvas),[e.store,e.viewport,e.canvas]),h.useEffect(()=>$(e.store),[e.store]),null}export{Y as StageKeyboardBinding};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./jsx-runtime-DPjLkJKQ.js";import{r as s}from"./index-nmcBqr7Y.js";import{iT as w,h1 as P,df as R,aL as f,al as v,iU as A,gM as E,gN as k,iV as V,iW as T,dt as D,bq as M,br as b,G as N,iX as H,iY as U,d9 as $,bw as C,aM as z,a7 as F,iZ as I,bL as W,i_ as G,i$ as _,aa as q,j0 as Z,j1 as J,j2 as K,bs as X}from"./index-
|
|
1
|
+
import{a as e}from"./jsx-runtime-DPjLkJKQ.js";import{r as s}from"./index-nmcBqr7Y.js";import{iT as w,h1 as P,df as R,aL as f,al as v,iU as A,gM as E,gN as k,iV as V,iW as T,dt as D,bq as M,br as b,G as N,iX as H,iY as U,d9 as $,bw as C,aM as z,a7 as F,iZ as I,bL as W,i_ as G,i$ as _,aa as q,j0 as Z,j1 as J,j2 as K,bs as X}from"./index-CfY0i8Sb.js";import{s as B,o as O,a as Y}from"./object3d-document-session-registry-BdoyWXV-.js";import{r as Q}from"./index-CtzuWnCS.js";import{T as ee}from"./TransientHint-DfEVHExL.js";import{d as te,b as se}from"./ViewportShadingMenu-CXLf4i3A.js";import{V as j,s as oe}from"./StageHost-B-JXOKjD.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-CinJrH5C.js";import"./three-state-NOAop1c_.js";import"./editor-shell-store-DtWwyrw1.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./Pass-D1MRT672.js";import"./editor-layers-BIj5KO0g.js";import"./workspace-arrangement-BXkQP4cU.js";import"./user-data-C3XEGCRZ.js";import"./entity-object-CQX6E16Y.js";import"./three-contract-Dkt6PmWY.js";import"./standard-viewport-dressing-qZPcw4zX.js";import"./content-bounds-DHzkdtSe.js";import"./hierarchy-marks-CkkhBs5b.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./preview-renderer-BrYNFV1p.js";import"./renderer-ownership-BovSEcLv.js";import"./live-mixers-B-bwLZ7c.js";import"./live-gesture-lock-DJbrjOqf.js";import"./three-integration-B46eGe9S.js";import"./host-hierarchy-objects-BV3WqU2w.js";import"./layered-pick-ClOn0St8.js";import"./root-stacking-BEd9ZvxC.js";import"./model-thumbnail-sBQJ-gD0.js";import"./studio-environment-CHc8-RFD.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./component-instance-root-C0v5fzXo.js";import"./viewport-door-z29BPCdR.js";import"./asset-preview-QdfMc8lf.js";import"./bitmap-label-Ct4k6ehY.js";import"./model-inspection-Ck_tLcHB.js";import"./three-viewport-presentation-Cz6OIQlD.js";import"./clip-planes-CnAI6DZn.js";import"./three-CGHSWwrH.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./OrbitControls-B13MKuwC.js";import"./LineSegments2-DN9pUfWA.js";import"./three.quarks.esm-C_HmSKXo.js";import"./scene-framing-CBeqMEwQ.js";import"./source-object3d-authoring-adapter-Def3y0NS.js";import"./three-projection-core-BI2-81k2.js";import"./editor-presentation-activity-CqJH4G9t.js";import"./transport-strip-Bsw6bWgV.js";import"./viewport-surface-status-DKugQr9F.js";function h(t){return t.toFixed(2)}function re(){const t=w(),[o,r]=s.useState({x:0,y:0,z:0}),[i,n]=s.useState({x:0,y:0,z:0}),a=s.useRef(0);return s.useEffect(()=>{function u(){const m=t.cameraPosition,p=t.cameraTarget;r(l=>l.x!==m.x||l.y!==m.y||l.z!==m.z?{x:m.x,y:m.y,z:m.z}:l),n(l=>l.x!==p.x||l.y!==p.y||l.z!==p.z?{x:p.x,y:p.y,z:p.z}:l),a.current=requestAnimationFrame(u)}return a.current=requestAnimationFrame(u),()=>cancelAnimationFrame(a.current)},[t]),e.jsx(P,{variant:"overlay",border:!0,className:"volter-camera-info volter-chrome-island volter-glass-island","data-island-scale":"compact",children:e.jsxs(R,{gap:8,align:"center",style:{whiteSpace:"nowrap"},children:[e.jsxs(f,{variant:"code",children:["Pos ",h(o.x)," ",h(o.y)," ",h(o.z)]}),e.jsxs(f,{variant:"code",children:["Target ",h(i.x)," ",h(i.y)," ",h(i.z)]})]})})}function ie(){const t=w(),[,o]=s.useState(0),r=A();return s.useEffect(()=>{const i=setInterval(()=>o(n=>n+1),200);return()=>clearInterval(i)},[]),e.jsxs("div",{className:"volter-hud-overlay volter-chrome-island volter-glass-island","data-island-scale":"compact","data-hud-border":"strong",style:{position:"absolute",top:"var(--volter-viewport-overlay-hud-top, 48px)",right:8,padding:"6px 10px",pointerEvents:"auto",fontSize:"var(--volter-font-base)",color:v.content.primary,fontFamily:v.typography.mono,lineHeight:"16px"},children:[e.jsxs("div",{children:["FPS: ",t.fps.toFixed(0)]}),e.jsxs("div",{children:["Draw: ",t.drawCalls]}),e.jsxs("div",{children:["Tris: ",t.triangles.toLocaleString()]}),e.jsxs("div",{children:["Frame: ",t.frameTime.toFixed(1),"ms"]}),r!==null&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:["Heap: ",r.heapUsedMB===null?"n/a":`${r.heapUsedMB.toFixed(0)}MB`,r.heapLimitMB===null?"":` / ${r.heapLimitMB.toFixed(0)}MB`]}),e.jsxs("div",{children:["Mount epochs: ",r.mountEpochs]}),e.jsxs("div",{children:["Canvas: ",r.canvasMB.toFixed(1),"MB ×",r.canvases]}),r.textures!==void 0&&e.jsxs("div",{children:["GPU: ",r.textures," tex, ",r.geometries??0," geo",r.programs===void 0?"":`, ${r.programs} prog`]})]})]})}function ae({store:t,documentId:o}){s.useSyncExternalStore(t.shell.subscribe,t.shell.getSnapshot),s.useSyncExternalStore(E,k),s.useSyncExternalStore(V,T),s.useSyncExternalStore(B,O);const{adapter:r}=D(t.shell),i=Y(o);s.useSyncExternalStore(i?.subscribe??le,i?.getSnapshot??ce),s.useSyncExternalStore(M,b);const n=N(o),a=H(),u=U(),m=a.viewName==="bar"||a.viewName==="menu",[p,l]=s.useState(null),y=()=>p?.closest(".volter-dock-document-content")?.querySelector(':scope > .volter-stage-bar [data-stage-bar-slot="display"]')??null,x=s.useId(),g=y(),d=g&&(g.dataset.owner===void 0||g.dataset.owner===x)?g:null,[,L]=s.useReducer(c=>c+1,0);s.useEffect(()=>{const c=y();c&&c.dataset.owner===void 0&&(c.dataset.owner=x),(c&&c.dataset.owner===x?c:null)!==d&&L()}),s.useEffect(()=>()=>{d?.dataset.owner===x&&delete d.dataset.owner},[d,x]);const S=e.jsxs($,{label:"Viewport display",className:"volter-viewport-toolbar volter-viewport-toolbar-right volter-stage-display",children:[a.viewName==="bar"&&i?e.jsx(j,{shell:t.shell,documentId:o,label:oe(i.viewport,i.projection(),"long")}):null,e.jsx(C,{text:`Grid: ${n?"On":"Off"}`,children:e.jsx(z,{"aria-label":"Toggle grid","aria-pressed":n,size:"comfortable",onClick:()=>W(o,!n),children:e.jsx(F,{icon:I,size:"md"})})}),e.jsx(pe,{store:t,word:u.helpers}),e.jsx(te,{mode:ne(i)??t.shadingMode,onChange:c=>i?i.setMode(c):t.setShadingMode(c),words:u.shading}),m?null:e.jsx(j,{shell:t.shell,documentId:o}),e.jsx(me,{adapter:r,store:t})]});return e.jsxs(e.Fragment,{children:[e.jsx("span",{ref:l,hidden:!0}),d?Q.createPortal(S,d):S]})}function ne(t){return t?.presentation().mode??null}const le=()=>()=>{},ce=()=>0,me=s.memo(function({adapter:o,store:r}){const[,i]=s.useReducer(a=>a+1,0);s.useEffect(()=>o.subscribe?.(i),[o]);const n=s.useMemo(()=>G(o),[o,r.shell.contentVersion]);return n===0?null:e.jsx(C,{text:`Open Light Explorer · ${n} ${n===1?"light":"lights"}`,children:e.jsx(z,{"aria-label":"Open Light Explorer",size:"comfortable",onClick:()=>q(Z.lightExplorer.id),children:e.jsx(F,{icon:_,size:"md"})})})});function pe({store:t,word:o}){const r=[{key:"bounds",label:"Bounds"},{key:"lights",label:"Lights"},{key:"cameras",label:"Cameras"},{key:"colliders",label:"Colliders"},{key:"joints",label:"Joints"},{key:"particles",label:"Particle Emitters"},{key:"lod",label:"LOD"},{key:"audio",label:"Audio"},{key:"splines",label:"Splines"},{key:"navmesh",label:"NavMesh"},{key:"constraints",label:"Constraints"},{key:"reflectionProbes",label:"Reflection Probes"},{key:"triggerVolumes",label:"Trigger Volumes"},{key:"skeletons",label:"Skeletons"},{key:"weights",label:"Weights"},{key:"cursor",label:"3D Cursor"},{key:"empties",label:"Empties"}];return e.jsx(se,{label:"Helpers",...o!==void 0?{word:o}:{},master:{enabled:t.shell.showHelpers,onToggle:()=>t.shell.toggleHelpers()},choices:r.map(i=>({id:i.key,label:i.label,enabled:t.shell.helperVisibility[i.key],onToggle:()=>t.shell.toggleHelperType(i.key)}))})}function vt({store:t,documentId:o,stage:r,active:i,chrome:n}){const a=r?.store??t;s.useSyncExternalStore(t.shell.subscribe,t.shell.getShellSnapshot??t.shell.getSnapshot),s.useSyncExternalStore(a.shell.subscribe,a.shell.getShellSnapshot??a.shell.getSnapshot),s.useSyncExternalStore(V,T),s.useSyncExternalStore(B,O),s.useSyncExternalStore(E,k);const u=J(t.shell,o,n),m=K(u);s.useSyncExternalStore(M,b,b);const p=X(o).overlays.cameraReadout;return e.jsxs(e.Fragment,{children:[m?e.jsxs(e.Fragment,{children:[e.jsx(ae,{store:a,documentId:o}),p?e.jsx(re,{}):null]}):null,u.surface==="three"&&a.showStats&&e.jsx(ie,{}),i?e.jsx(ee,{}):null]})}export{vt as StageOverlaySet};
|
package/dist/assets/{stage-presence-markers-BJz57Ct3.js → stage-presence-markers-XhmE0iQJ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./jsx-runtime-DPjLkJKQ.js";import"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{dy as A,ap as j,y as Q,dz as V,dA as _}from"./index-
|
|
1
|
+
import"./jsx-runtime-DPjLkJKQ.js";import"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{dy as A,ap as j,y as Q,dz as V,dA as _}from"./index-CfY0i8Sb.js";import{a as O}from"./content-bounds-DHzkdtSe.js";import{r as w}from"./collaboration-presence-BdvkeF1t.js";import{e6 as G,fd as W,d9 as H,S as U,_ as M,T as k,ej as J,eE as K,eF as ee,dp as te,fo as x,cW as oe,J as ne,a$ as re,N as ie,bX as ae,bV as se}from"./three.core-3arARmh6.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./hierarchy-marks-CkkhBs5b.js";import"./workspace-arrangement-BXkQP4cU.js";function ce(){const e=document.querySelector(`.${V}`);return(e?getComputedStyle(e).getPropertyValue("--volter-content-on-accent").trim():"")||_.color.content.onAccent}function Z(e,r){const o=e.image,n=o.getContext("2d");if(!n)return;n.clearRect(0,0,o.width,o.height),n.fillStyle=r.color,n.beginPath(),n.roundRect(2,2,o.width-4,o.height-4,16),n.fill(),n.fillStyle=ce(),n.font="600 22px system-ui, sans-serif",n.textAlign="center",n.textBaseline="middle";const c=r.kind==="agent"?" · AI":"";n.fillText(`${r.displayName}${c}`,o.width/2,o.height/2,238),e.needsUpdate=!0}function le(e){const r=new H(50,1,.2,1.4),o=new U(r),n=new M(e.color);o.setColors(n,n,n,n,n),o.name=`Collaboration camera: ${e.displayName}`,o.userData.editorOnly=!0;const c=document.createElement("canvas");c.width=256,c.height=64;const p=new k(c);p.colorSpace=J;const d=new K(new ee({map:p,depthTest:!1,transparent:!0}));return d.name=`Collaboration label: ${e.displayName}`,d.userData.editorOnly=!0,d.scale.set(1.8,.45,1),d.renderOrder=1e4,Z(p,e),{camera:r,helper:o,label:d,texture:p,signature:"",targetPosition:new x,targetQuaternion:new te,targetFov:50,initialized:!1}}function de(e,r){const o=r.presence.camera;if(!o)return;e.targetPosition.set(o.x,o.y,o.z);const n=new oe;n.position.copy(e.targetPosition),n.lookAt(o.targetX,o.targetY,o.targetZ),e.targetQuaternion.copy(n.quaternion),e.targetFov=o.fov,e.initialized||(e.initialized=!0,e.camera.position.copy(e.targetPosition),e.camera.quaternion.copy(e.targetQuaternion),e.camera.fov=e.targetFov);const c=`${r.displayName}|${r.kind}|${r.color}|${r.status}`;c!==e.signature&&(e.signature=c,Z(e.texture,r))}function pe(e,r){const o=1-Math.exp(-12*Math.max(0,r));e.camera.position.lerp(e.targetPosition,o),e.camera.quaternion.slerp(e.targetQuaternion,o),e.camera.fov+=(e.targetFov-e.camera.fov)*o,e.camera.updateProjectionMatrix(),e.camera.updateMatrixWorld(!0),e.helper.update(),e.label.position.copy(e.camera.position),e.label.position.y+=.55}function Y(e){e.helper.removeFromParent(),e.label.removeFromParent(),e.helper.dispose(),e.texture.dispose(),e.label.material.dispose()}function ue(e,r){const o=O(e),n=new ne(o,new M(r));return n.name=`Collaboration selection: ${e.name||e.uuid}`,n.userData.editorOnly=!0,n.renderOrder=9999,n.material.depthTest=!1,{object:e,box:o,helper:n}}function b(e){e.helper.removeFromParent(),e.helper.geometry.dispose(),e.helper.material.dispose()}function me(e){if(!e||e.type!=="pointer-ray"||!["originX","originY","originZ","directionX","directionY","directionZ","length"].every(p=>typeof e[p]=="number"&&Number.isFinite(e[p])))return null;const o=new x(e.originX,e.originY,e.originZ),n=new x(e.directionX,e.directionY,e.directionZ),c=Math.min(1e3,Math.max(.1,e.length));return n.lengthSq()<1e-6?null:{origin:o,end:o.clone().add(n.normalize().multiplyScalar(c))}}function Le(e){const{scene:r,store:o,documentId:n,container:c,canvas:p,viewport:d,readVisibleCameraPose:R}=e,y=()=>Q()===n,v=()=>{if(!y())return;const i=R();w({camera:{x:i.position.x,y:i.position.y,z:i.position.z,targetX:i.target.x,targetY:i.target.y,targetZ:i.target.z,fov:i.fov}})};d.orbitControls.addEventListener("change",v);let C=!1;const I=i=>{const s=i.value===!0;C=s,y()&&w({gesture:s?{type:"transform",selection:[...o.shell.selectedEntityIds]}:null})};d.transformControls.addEventListener("dragging-changed",I);const S=new G,P=new W,z=i=>{if(C||i.buttons!==0||!y())return;const s=p.getBoundingClientRect();if(s.width<=0||s.height<=0)return;P.set((i.clientX-s.left)/s.width*2-1,-((i.clientY-s.top)/s.height)*2+1),S.setFromCamera(P,d.renderCamera);const l=S.ray,g=R();w({gesture:{type:"pointer-ray",originX:l.origin.x,originY:l.origin.y,originZ:l.origin.z,directionX:l.direction.x,directionY:l.direction.y,directionZ:l.direction.z,length:Math.max(2,g.position.distanceTo(g.target))}})},E=()=>{!C&&y()&&w({gesture:null})};c.addEventListener("pointermove",z),c.addEventListener("pointerleave",E),v();const m=new Map,u=new Map,f=new Map;let L=-1;const q=()=>{const i=A();if(!i||i.sequence===L)return;L=i.sequence;const s=i.participants.filter(t=>t.participantId!==j&&t.presence.document===n),l=s.filter(t=>t.presence.camera),g=new Set(l.map(t=>t.participantId));for(const[t,a]of m)g.has(t)||(Y(a),m.delete(t));for(const t of l){let a=m.get(t.participantId);a||(a=le(t),m.set(t.participantId,a),r.add(a.helper,a.label)),de(a,t)}const F=s.flatMap(t=>t.presence.selection.slice(0,20).map(a=>({key:`${t.participantId}:${a}`,objectId:a,color:t.color}))),B=new Set(F.map(t=>t.key));for(const[t,a]of u)B.has(t)||(b(a),u.delete(t));for(const t of F){const a=o.objectMap.get(t.objectId),h=u.get(t.key);if(!a){h&&(b(h),u.delete(t.key));continue}if(h?.object===a)continue;h&&b(h);const $=ue(a,t.color);u.set(t.key,$),r.add($.helper)}const X=s.flatMap(t=>{const a=me(t.presence.gesture);return a?[{participantId:t.participantId,color:t.color,ray:a}]:[]}),N=new Set(X.map(t=>t.participantId));for(const[t,a]of f)N.has(t)||(D(a),f.delete(t));for(const t of X){let a=f.get(t.participantId);a||(a=fe(t.color),f.set(t.participantId,a),r.add(a.line)),ge(a,t.ray)}},T=i=>{if(!y())return;const s=i.detail?.participantId;if(typeof s!="string")return;const l=A()?.participants.find(g=>g.participantId===s)?.presence.camera;l&&o.shell.setCameraPose({x:l.x,y:l.y,z:l.z},{x:l.targetX,y:l.targetY,z:l.targetZ},l.fov)};return window.addEventListener("editor:collaboration-join",T),{reportCamera:v,syncMarkers:i=>{q();for(const s of m.values())pe(s,i);for(const s of u.values())O(s.object,s.box)},live:()=>m.size+u.size+f.size>0,dispose:()=>{d.orbitControls.removeEventListener("change",v),d.transformControls.removeEventListener("dragging-changed",I),c.removeEventListener("pointermove",z),c.removeEventListener("pointerleave",E),window.removeEventListener("editor:collaboration-join",T);for(const i of m.values())Y(i);m.clear();for(const i of u.values())b(i);u.clear();for(const i of f.values())D(i);f.clear()}}}function fe(e){const r=new re(new Float32Array(6),3),o=new ie;o.setAttribute("position",r);const n=new ae({color:new M(e),depthTest:!1,transparent:!0,opacity:.9}),c=new se(o,n);return c.name="Collaboration pointer ray",c.userData.editorOnly=!0,c.renderOrder=10001,{line:c,positions:r}}function ge(e,r){e.positions.setXYZ(0,r.origin.x,r.origin.y,r.origin.z),e.positions.setXYZ(1,r.end.x,r.end.y,r.end.z),e.positions.needsUpdate=!0,e.line.geometry.computeBoundingSphere()}function D(e){e.line.removeFromParent(),e.line.geometry.dispose(),e.line.material.dispose()}export{Le as bindStagePresenceMarkers};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./jsx-runtime-DPjLkJKQ.js";import{bn as n,bo as m,U as l,bp as f,e3 as c,bs as S}from"./index-
|
|
1
|
+
import{a}from"./jsx-runtime-DPjLkJKQ.js";import{bn as n,bo as m,U as l,bp as f,e3 as c,bs as S}from"./index-CfY0i8Sb.js";import{r as e}from"./index-nmcBqr7Y.js";import{t as T}from"./StageHost-B-JXOKjD.js";import{t as u}from"./editor-shell-store-DtWwyrw1.js";import{T as h,a as g}from"./Toolbar-C_8DLvqq.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D_NuPfjr.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./three-state-NOAop1c_.js";import"./standard-viewport-dressing-qZPcw4zX.js";import"./content-bounds-DHzkdtSe.js";import"./hierarchy-marks-CkkhBs5b.js";import"./workspace-arrangement-BXkQP4cU.js";import"./three.core-3arARmh6.js";import"./editor-layers-BIj5KO0g.js";import"./environment-Dg-YaLsA.js";import"./three.module-BLhyNg0e.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./user-data-C3XEGCRZ.js";import"./preview-renderer-BrYNFV1p.js";import"./renderer-ownership-BovSEcLv.js";import"./live-mixers-B-bwLZ7c.js";import"./live-gesture-lock-DJbrjOqf.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./three-integration-B46eGe9S.js";import"./host-hierarchy-objects-BV3WqU2w.js";import"./layered-pick-ClOn0St8.js";import"./root-stacking-BEd9ZvxC.js";import"./model-thumbnail-sBQJ-gD0.js";import"./studio-environment-CHc8-RFD.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./object3d-document-session-registry-BdoyWXV-.js";import"./entity-object-CQX6E16Y.js";import"./three-contract-Dkt6PmWY.js";import"./component-instance-root-C0v5fzXo.js";import"./viewport-door-z29BPCdR.js";import"./asset-preview-QdfMc8lf.js";import"./bitmap-label-Ct4k6ehY.js";import"./model-inspection-Ck_tLcHB.js";import"./three-viewport-presentation-Cz6OIQlD.js";import"./clip-planes-CnAI6DZn.js";import"./three-CGHSWwrH.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./OrbitControls-B13MKuwC.js";import"./LineSegments2-DN9pUfWA.js";import"./three.quarks.esm-C_HmSKXo.js";import"./scene-framing-CBeqMEwQ.js";import"./source-object3d-authoring-adapter-Def3y0NS.js";import"./three-projection-core-BI2-81k2.js";import"./editor-presentation-activity-CqJH4G9t.js";import"./transport-strip-Bsw6bWgV.js";import"./viewport-surface-status-DKugQr9F.js";import"./transform-mode-request-DuINH97B.js";const s=new WeakMap;function b(r,t){if(r===null)return;const o=s.get(r)??new Set;if(s.set(r,o),o.has(t))return;o.add(t);const i={select:"select",transform:"combined",move:"translate",rotate:"rotate",scale:"scale"};r.shell.setTransformMode(i[S(t).interaction.bootTool])}function Mr({documentId:r}){e.useSyncExternalStore(n,m,m);const t=l(),o=T(r),i=f(r);if(e.useEffect(()=>{o==="gizmo"&&b(i&&u(i),r)},[o,i,r]),o==="none")return null;const p=o==="modal"?c(r):null;return a.jsx(g,{store:i??t,...p?{door:p}:{}})}function Or({documentId:r}){e.useSyncExternalStore(n,m,m);const t=l();return a.jsx(h,{store:f(r)??t})}export{Or as ThreeStageTransformControls,Mr as ThreeStageTransformTools};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as nt}from"./content-bounds-
|
|
1
|
+
import{a as nt}from"./content-bounds-DHzkdtSe.js";import{EDITOR_LAYER as bt}from"./editor-layers-BIj5KO0g.js";import{loadEnvironmentImage as St}from"./environment-Dg-YaLsA.js";import{s as Y}from"./user-data-C3XEGCRZ.js";import{P as Z,S as J}from"./three.module-BLhyNg0e.js";import{fp as xt,fq as kt,Z as It}from"./index-CfY0i8Sb.js";import{aE as q,bh as tt,j as Ft,I as Pt,co as Ct,db as Gt,fo as et,ap as Tt,e as Et,A as Rt,cP as _t,cj as d,_ as f,au as it,dw as rt,bi as Dt,aT as $t,c7 as Ot,c1 as z,ej as st,bg as At,aw as Bt,cx as Lt}from"./three.core-3arARmh6.js";let at=0;function zt(){at++}function se(){return at}const Ht=[.8,.5,-1],N=new f(1975600),U=new f(5004144);function lt(){const i=typeof document>"u"?null:document.querySelector("[data-volter-palette]");if(!i)return{bottom:N.clone(),top:U.clone()};const t=getComputedStyle(i),o=document.createElement("canvas");o.width=o.height=1;const e=o.getContext("2d"),r=(s,u)=>{const p=t.getPropertyValue(s).trim();if(!e||!p||!CSS.supports("color",p))return u.clone();e.fillStyle=u.getStyle(),e.fillRect(0,0,1,1),e.fillStyle=t.getPropertyValue("--volter-surface-shell").trim(),e.fillRect(0,0,1,1),e.fillStyle=p,e.fillRect(0,0,1,1);const[y,l,M]=e.getImageData(0,0,1,1).data;return new f().setRGB(y/255,l/255,M/255,st)},n=r("--volter-surface-panel",N),a=r("--volter-surface-raised",U),h=n.lerp(N,.25).lerp(new f(16777215),.03),c=a.lerp(U,.25).lerp(new f(16777215),.04);return{bottom:h,top:c}}function Nt(i){if(typeof document>"u"||typeof MutationObserver>"u")return()=>{};const t=document.querySelector("[data-volter-palette]");if(!t)return()=>{};const o=new MutationObserver(()=>{i(),zt()});return o.observe(t,{attributes:!0,attributeFilter:["data-volter-palette","data-volter-material"]}),()=>o.disconnect()}function ct(i=lt()){const o=new Uint8Array(512),e=new f;for(let n=0;n<128;n++)e.copy(i.bottom).lerp(i.top,n/127).convertLinearToSRGB(),o[n*4]=Math.round(e.r*255),o[n*4+1]=Math.round(e.g*255),o[n*4+2]=Math.round(e.b*255),o[n*4+3]=255;const r=new it(o,1,128,rt);return r.colorSpace=st,r.magFilter=z,r.minFilter=z,r.needsUpdate=!0,r}function Ut(i){const t=nt(i);if(t.isEmpty())return{size:50,centre:[0,0]};const o=Math.max(t.max.x-t.min.x,t.max.z-t.min.z);return{size:Math.min(Math.max(Math.ceil(o/10)*10+20,50),1e3),centre:[(t.min.x+t.max.x)/2,(t.min.z+t.max.z)/2]}}function Wt(i){for(const t of[1,2,5,10])if(i/t<=60)return Math.round(i/t);return Math.round(i/10)}function ut(i,t){const o=t/2,e=o*.55,r=o;i.onBeforeCompile=n=>{n.uniforms.uGridFadeStart={value:e},n.uniforms.uGridFadeEnd={value:r},n.vertexShader=n.vertexShader.replace("#include <common>",`#include <common>
|
|
2
2
|
varying vec2 vGridPlanePosition;`).replace("#include <begin_vertex>",`#include <begin_vertex>
|
|
3
3
|
vGridPlanePosition = position.xz;`),n.fragmentShader=n.fragmentShader.replace("#include <common>",`#include <common>
|
|
4
4
|
varying vec2 vGridPlanePosition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t}from"./index-
|
|
1
|
+
import{r as t}from"./index-CfY0i8Sb.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 n="workspace.action",l=[{id:"state-watch",label:"Open State Watch",execute:()=>t().workspace.showUtility("tool:state-watch.utility")}];export{l as actions,n as point};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,am as e}from"./index-
|
|
1
|
+
import{r as t,am as e}from"./index-CfY0i8Sb.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 l="workspace.menu",n={menu:"debug",items:[{id:"state-watch",label:"State Watch",testId:"menu-state-watch",disabled:()=>e()==null,execute:()=>t().workspace.showUtility("tool:state-watch.utility")}]};export{n as menu,l as point};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./jsx-runtime-DPjLkJKQ.js";import{am as S,al as o,aN as B,a6 as L,r as A,eJ as H}from"./index-
|
|
1
|
+
import{a as n}from"./jsx-runtime-DPjLkJKQ.js";import{am as S,al as o,aN as B,a6 as L,r as A,eJ as H}from"./index-CfY0i8Sb.js";import{r as d}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.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 F=250,M=200,P=500,z="stateWatchPins";function x(e){return JSON.stringify([e.provider,...e.path])}function y(e){return[e.provider,...e.path].join(".")}function N(){return A().projectLocalState.projectRootPath()??"__unscoped__"}function k(e){const t=A().projectLocalState.read(z);return Array.isArray(t)?t.filter(r=>typeof r?.provider=="string"&&Array.isArray(r.path)&&r.path.every(s=>typeof s=="string")):[]}function D(e,t){A().projectLocalState.write(z,t.map(r=>({provider:r.provider,path:[...r.path]})))}function j(e){return e!==null&&typeof e=="object"}function O(e){if(typeof e=="string")return`“${e}”`;if(typeof e=="number")return Number.isInteger(e)?String(e):e.toFixed(3);if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="bigint")return`${e}n`;if(typeof e=="function")return"[Function]";if(j(e))try{return Array.isArray(e)?`Array(${e.length})`:`Object(${Object.keys(e).length})`}catch{return"[Unreadable object]"}return String(e)}function _(e){try{return Object.entries(e)}catch{return[]}}function V(e,t){try{if(!Object.hasOwn(e,t.provider))return{available:!1,value:void 0};let r=e[t.provider];for(const s of t.path){if(!j(r)||!Object.hasOwn(r,s))return{available:!1,value:void 0};r=r[s]}return{available:!0,value:r}}catch{return{available:!1,value:void 0}}}function R(e,t,r,s,l,c){if(l.length>=P)return;const g=j(t)&&c.includes(t);if(!j(t)||g){const a={provider:e,path:r,value:g?"[Circular]":t};(y(a).toLowerCase().includes(s)||O(a.value).toLowerCase().includes(s))&&l.push(a);return}const p=[...c,t],m=_(t);if(m.length===0){const a={provider:e,path:r,value:t};y(a).toLowerCase().includes(s)&&l.push(a);return}for(const[a,v]of m)if(R(e,v,[...r,a],s,l,p),l.length>=P)return}const C={fontFamily:o.typography.mono,fontSize:11};function T({leaf:e,pinned:t,onTogglePin:r,depth:s=0}){const l=e.path.at(-1)??e.provider;return n.jsxs("div",{style:{...C,minHeight:22,display:"grid",gridTemplateColumns:"minmax(100px, 0.65fr) minmax(120px, 1fr) auto",alignItems:"center",gap:8,paddingLeft:8+s*14,paddingRight:8,borderBottom:`1px solid ${o.boundary.default}`},title:y(e),children:[n.jsx("span",{style:{color:o.content.primary,overflow:"hidden",textOverflow:"ellipsis"},children:l}),n.jsx("span",{style:{color:o.content.muted,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:O(e.value)}),n.jsx(L,{type:"button",size:"compact",variant:t?"primary":"secondary","aria-pressed":t,title:t?`Remove ${y(e)} from watches`:`Watch ${y(e)}`,onClick:()=>r(e),children:t?"Pinned":"Pin"})]})}function W({provider:e,name:t,value:r,path:s,depth:l,ancestors:c,pinnedKeys:g,onTogglePin:p}){const m=j(r)&&c.includes(r),[a,v]=d.useState(l===0);if(!j(r)||m){const f={provider:e,path:s,value:m?"[Circular]":r};return n.jsx(T,{leaf:f,depth:l,pinned:g.has(x(f)),onTogglePin:p})}const h=_(r),b=h.slice(0,M);return n.jsxs("div",{children:[n.jsxs("button",{type:"button",onClick:()=>v(f=>!f),style:{...C,width:"100%",minHeight:22,display:"flex",alignItems:"center",gap:4,padding:`0 8px 0 ${8+l*14}px`,color:o.content.primary,background:"transparent",border:0,borderBottom:`1px solid ${o.boundary.default}`,textAlign:"left",cursor:"pointer"},children:[n.jsx("span",{style:{width:12,color:o.content.muted},children:n.jsx(H,{direction:a?"down":"right"})}),n.jsx("span",{children:t}),n.jsx("span",{style:{color:o.content.dim},children:Array.isArray(r)?`[${h.length}]`:`{${h.length}}`})]}),a&&b.map(([f,i])=>n.jsx(W,{provider:e,name:f,value:i,path:[...s,f],depth:l+1,ancestors:[...c,r],pinnedKeys:g,onTogglePin:p},f)),a&&h.length>b.length&&n.jsxs("div",{style:{...C,padding:`3px 8px 3px ${8+(l+1)*14}px`,color:o.content.dim},children:[h.length-b.length," more values — narrow with search"]})]})}function E(e){if(!e)return{providers:[],state:{},error:null};let t;try{t=e.providers()}catch(r){return{providers:[],state:{},error:r instanceof Error?r.message:String(r)}}try{return{providers:t,state:e.stateAll(),error:null}}catch(r){return{providers:t,state:{},error:r instanceof Error?r.message:String(r)}}}function J(){const e=N(),[t,r]=d.useState(()=>E(S())),[s,l]=d.useState(!1),[c,g]=d.useState(""),[p,m]=d.useState(()=>k());d.useEffect(()=>m(k()),[e]);const a=d.useCallback(()=>r(E(S())),[]);d.useEffect(()=>{if(a(),s)return;const i=window.setInterval(a,F);return()=>window.clearInterval(i)},[s,a]);const v=d.useMemo(()=>new Set(p.map(x)),[p]),h=d.useCallback(i=>{m(u=>{const w=x(i),I=u.some($=>x($)===w)?u.filter($=>x($)!==w):[...u,{provider:i.provider,path:[...i.path]}];return D(e,I),I})},[e]),b=d.useMemo(()=>{const i=c.trim().toLowerCase();if(!i)return[];const u=[];for(const w of t.providers)R(w.name,t.state[w.name],[],i,u,[]);return u},[c,t]);return S()?n.jsxs("div",{style:{height:"100%",minHeight:0,display:"flex",flexDirection:"column"},children:[n.jsxs("div",{style:{minHeight:34,display:"flex",alignItems:"center",gap:8,padding:"4px 8px",borderBottom:`1px solid ${o.boundary.default}`},children:[n.jsx(B,{value:c,onChange:i=>g(i.target.value),placeholder:"Filter state paths or values…","aria-label":"Filter state watches",style:{width:240}}),n.jsx(L,{type:"button",size:"compact",onClick:()=>l(i=>!i),children:s?"Resume":"Pause"}),n.jsx(L,{type:"button",size:"compact",disabled:!s,onClick:a,children:"Refresh"}),n.jsxs("span",{style:{color:o.content.dim,fontSize:10},children:[t.providers.length," provider",t.providers.length===1?"":"s"," ·"," ",p.length," pinned",s?" · paused":""]}),t.error&&n.jsx("span",{style:{color:o.semantic.danger,fontSize:10},children:t.error})]}),n.jsxs("div",{style:{flex:1,minHeight:0,display:"grid",gridTemplateColumns:"minmax(280px, 1fr) minmax(240px, 0.65fr)"},children:[n.jsxs("section",{"aria-label":"Live state",style:{minWidth:0,overflow:"auto"},children:[c.trim()?b.length>0?b.map(i=>n.jsx(T,{leaf:i,pinned:v.has(x(i)),onTogglePin:h},x(i))):n.jsxs("div",{style:{padding:10,color:o.content.dim,fontSize:11},children:["No state values match “",c.trim(),"”."]}):t.providers.map(i=>n.jsx(W,{provider:i.name,name:`${i.name} · ${i.tier}`,value:t.state[i.name],path:[],depth:0,ancestors:[],pinnedKeys:v,onTogglePin:h},i.name)),t.providers.length===0&&n.jsx("div",{style:{padding:10,color:o.content.dim,fontSize:11},children:"The running game has not registered any state providers."})]}),n.jsxs("aside",{"aria-label":"Pinned watches",style:{minWidth:0,overflow:"auto",borderLeft:`1px solid ${o.boundary.default}`},children:[n.jsx("div",{style:{position:"sticky",top:0,zIndex:1,padding:"6px 8px",color:o.content.muted,background:o.surface.panel,borderBottom:`1px solid ${o.boundary.default}`,fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.04em"},children:"Watches"}),p.map(i=>{const u=V(t.state,i);return n.jsxs("div",{style:{...C,display:"grid",gridTemplateColumns:"minmax(130px, 1fr) minmax(100px, 0.7fr) auto",alignItems:"center",gap:8,minHeight:24,padding:"2px 8px",borderBottom:`1px solid ${o.boundary.default}`},children:[n.jsx("span",{title:y(i),style:{color:o.content.primary,overflow:"hidden",textOverflow:"ellipsis"},children:y(i)}),n.jsx("span",{style:{color:u.available?o.content.muted:o.content.dim,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u.available?O(u.value):"unavailable"}),n.jsx(L,{type:"button",size:"compact",onClick:()=>h(i),children:"Remove"})]},x(i))}),p.length===0&&n.jsx("div",{style:{padding:10,color:o.content.dim,fontSize:11},children:"Pin values from the live tree to keep them visible while you inspect the game."})]})]})]}):n.jsx("div",{style:{padding:12,color:o.content.muted,fontSize:11},children:"State Watch is available while a game with debug providers is running."})}const te="workspace.utility",re="State Watch",ne=19,ie=()=>S()!=null;function oe(){return n.jsx(J,{})}export{ie as available,oe as default,ne as order,te as point,re as title};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as T}from"./react-story-board-
|
|
1
|
+
import{r as T}from"./react-story-board-Cm8Nj4u1.js";import{d as P}from"./bitmap-label-Ct4k6ehY.js";import{b9 as S,ba as M,au as C,bb as $,bc as E,bd as j,be as I,a0 as v,bf as D,bg as R,bh as O,aC as L,av as U}from"./index-CfY0i8Sb.js";import{m as k}from"./StoryPreviewMount-DllHm68H.js";import{s as B}from"./story-presentation-CWbbna4z.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-nmcBqr7Y.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";async function ae(s,o){await S();const r=U(),c=M().filter(e=>C({modulePath:e.modulePath,regions:r}).medium==="dom"),t=document.createElement("canvas");t.width=s,t.height=o;const l=t.getContext("2d");if(!l)throw new Error("UI Canvas preview could not create a 2D output context.");if(c.length===0)return t.toDataURL("image/png");const m=B(c),d=L()?.config.resolution,u={width:d?.width??640,height:d?.height??400},h=new Map,f=new Map;for(const e of c){const n=m.resolve(e,u),[y]=await x(e.modulePath,[e],{width:n.width,height:n.height,capture:v,cropToContent:n.layout!=="fullscreen",layout:n.layout,transparent:!0});if(!y)throw new Error(`No preview rendered for ${e.id}.`);const g=new Image;g.src=`data:${y.mimeType};base64,${y.base64}`,await g.decode(),h.set(e.id,g),f.set(e.id,{width:g.naturalWidth,height:g.naturalHeight})}const i=T(c,m.index,e=>f.get(e.id)),a=Math.min(s/i.width,o/i.height),p=(s-i.width*a)/2,w=(o-i.height*a)/2;for(const[e,n]of i.layouts)l.drawImage(h.get(e),p+n.x*a,w+n.y*a,n.width*a,n.height*a);return t.toDataURL("image/png")}const A="#ffffff",H="#14171c";async function oe(s,o){const{modulePath:r,width:c,height:t}=o;if(!s)throw new Error(`No project is open, so '${r}' cannot be loaded. Open the project first.`);const l=await $(s),m=l.find(e=>e.modulePath===r);if(!m)throw new Error(`'${r}' is not a story file of this project. `+(l.length===0?"This project has no *.stories.tsx / *.stories.ts under src/.":`This project's story files are: ${l.map(e=>e.modulePath).join(", ")}.`));await E(await j(s));let d;try{d=await m.load()}catch(e){throw new Error(`'${r}' failed to import — ${e instanceof Error?e.message:String(e)}`)}const u=await I(r,d);if(!u.ok)throw new Error(u.error);const h=N(r,u.stories,o.story),f=o.capture??v,i=D("three"),a=o.captureThree??(i?(e,n)=>i(e,{...n,...o.camera===void 0?{}:{camera:o.camera},...o.pose===void 0?{}:{pose:o.pose}}):void 0);if((o.camera||o.pose)&&!a)throw new Error(`'${r}': camera/clip parameters need the three capture leg, which this environment cannot provide (no WebGL).`);const p=await x(r,h,{width:c,height:t,capture:f,...a?{captureThree:a}:{},requireThree:!!(o.camera||o.pose)}),w=await _(p,c,t);return{modulePath:r,width:c,height:t,variants:p,contactSheet:w}}function N(s,o,r){if(r===void 0)return o;const c=o.find(t=>t.name===r);if(!c)throw new Error(`'${s}' exports no story named '${r}'. It exports: ${o.map(t=>t.name).join(", ")}.`);return[c]}async function x(s,o,r){const{width:c,height:t,capture:l,captureThree:m,requireThree:d,cropToContent:u=!0}=r,h=document.createElement("div");h.setAttribute("style",`position:fixed;left:-20000px;top:0;width:${c}px;height:${t}px;overflow:hidden;contain:strict;pointer-events:none;background:${r.transparent?"transparent":A};`),document.body.appendChild(h);const f=[];try{for(const i of o){if(m){const e=await m(i.Component,{width:c,height:t}).catch(n=>(R(n)||console.warn(`[story-capture] three mount for '${i.name}' failed — falling back to the DOM leg:`,n instanceof Error?n.stack??n.message:String(n)),null));if(e===null&&d)throw new Error(`story '${i.name}' did not render on the three leg — --azimuth/--elevation/--distance/--clip/--time apply to three (R3F) stories only, and falling back to the DOM leg would silently ignore them. Narrow to a three story with --story <export>, or drop the camera/clip flags.`);if(e!==null){const n=e.indexOf(",");f.push({name:i.name,label:i.label,base64:n>=0?e.slice(n+1):e,mimeType:"image/png"});continue}}const a=document.createElement("div");a.setAttribute("style",`position:relative;width:${c}px;height:${t}px;overflow:hidden;`),r.layout==="padded"&&(a.style.padding="16px"),r.layout==="centered"&&(a.style.display="flex",a.style.alignItems="center",a.style.justifyContent="center"),a.style.boxSizing="border-box",h.replaceChildren(a);const p=await O(async()=>{const e=await k(a,s,i.name,i.Component);return await W(a),e});await p.settled();const w=p.result;try{const e=await l(h,{canvasFrame:p.frame,cropToContent:u,...r.transparent?{allowTransparent:!0}:{}});f.push({name:i.name,label:i.label,base64:e.base64,mimeType:"image/png"})}finally{w?.unmount(),await new Promise(e=>setTimeout(e,0)),a.remove()}}}finally{h.remove()}return f}async function W(s,o=10){for(let t=0;t<o&&!(s.childNodes.length>0);t++)await new Promise(l=>setTimeout(l,0));if(s.childNodes.length===0)return;const r=200,c=5e3;await new Promise(t=>{let l=null,m=!1;const d=new MutationObserver(()=>{l!==null&&clearTimeout(l),l=setTimeout(h,r)}),u=setTimeout(h,c);function h(){m||(m=!0,d.disconnect(),l!==null&&clearTimeout(l),clearTimeout(u),t())}d.observe(s,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),l=setTimeout(h,r)})}async function _(s,o,r,c={}){const t=Math.min(Math.max(1,s.length),Math.max(1,Math.floor(c.columns??2))),l=Math.max(1,Math.ceil(s.length/t)),m=[];for(const e of s){const n=new Image;n.src=`data:${e.mimeType};base64,${e.base64}`,await n.decode(),m.push(n)}const d=Math.max(1,...m.map(e=>e.naturalWidth),m.length?0:o),u=Math.max(1,...m.map(e=>e.naturalHeight),m.length?0:r),h=d*t,f=u*l,i=document.createElement("canvas");i.width=h,i.height=f;const a=i.getContext("2d");if(!a)throw new Error("Unable to create the story variant sheet.");a.fillStyle=H,a.fillRect(0,0,h,f);for(const[e,n]of s.entries()){const y=e%t*d,g=Math.floor(e/t)*u,b=m[e];a.drawImage(b,y+Math.floor((d-b.naturalWidth)/2),g+Math.floor((u-b.naturalHeight)/2)),c.labels!==!1&&P(a,n.name.toUpperCase(),y,g,d,u)}const p=i.toDataURL("image/png"),w=p.indexOf(",");return{width:h,height:f,base64:w>=0?p.slice(w+1):p,mimeType:"image/png"}}export{ae as captureDomStoryBoardPreview,oe as captureProjectStoryVariants,_ as composeVariantSheet,x as renderStoryVariants};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/axe-LkjAB6Lv.js","assets/_commonjsHelpers-D6-XlEtG.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{f2 as se,eM as ie,dT as ae,f3 as ce,f4 as le,f5 as K,f6 as H,ad as U,eO as de,as as L,at as D,al as s,er as u,et as d,a6 as A,ew as ue,aS as ye,aN as V,_ as pe,f7 as fe,au as me,av as he,f8 as Q,f9 as ve,fa as ge,fb as xe,b9 as J,fc as X,aC as Se}from"./index-Dji-5Ngh.js";import{a as r}from"./jsx-runtime-DPjLkJKQ.js";import{r as l}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{R as we,f as be}from"./presentation-BxwfX5Wf.js";import{e as Z,S as q}from"./surface-state-CPApGJAw.js";import{m as ee,r as je}from"./StoryPreviewMount-SXtYJsNy.js";import{d as te}from"./surface-content-Dg9Kkazf.js";const Re=se,y=new Map;let oe=0;const M=new Set;function m(){oe++;for(const t of M)t()}function E(t){return M.add(t),()=>{M.delete(t)}}function O(){return oe}function Ee(t,e){return`story:${t}#${e}`}function Oe(t,e){return`story-docs:${t}#${e}`}function $(){const t=K();if(!t||t.descriptor.kind!=="story")return null;const e=y.get(t.descriptor.id);return e?.mode==="preview"?{...e,id:t.descriptor.id}:null}function F(t,e,o){const n=y.get(t);if(n){if(o===void 0){const i={...n.argOverrides};delete i[e],n.argOverrides=i}else n.argOverrides={...n.argOverrides,[e]:o};m()}}function Ce(t,e,o){const n=y.get(t);n&&(n.actionLog=[...n.actionLog,{name:e,args:o,time:Date.now()}].slice(-200),m())}function Ne(t){const e=y.get(t);!e||e.actionLog.length===0||(e.actionLog=[],m())}function re(t,e,o,n={}){Ue();const i=Ee(e,o);y.has(i)||(y.set(i,{modulePath:e,storyName:o,mode:"preview",store:t,argOverrides:{},actionLog:[],playResult:null,accessibility:{status:"idle",violations:[]},container:null,previewReady:!1,previewRevision:0,resolution:{label:"Fill",width:null,height:null},scale:1}),m());const a=n.activate===void 0?{}:{activate:n.activate};return X({id:i,title:n.title??o,kind:"story",workspaceRole:"authored-subject",provenance:{sourcePath:e},Content:De,Toolbar:$e,closeable:!0,presentation:()=>({kind:"story",modulePath:e,storyName:o,mode:"preview"}),persist:()=>({modulePath:e,storyName:o}),onDispose:p=>{y.delete(p)&&m()}},a)}function Y(t,e,o){const n=Oe(e,o);return y.has(n)||(y.set(n,{modulePath:e,storyName:o,mode:"docs",store:t,argOverrides:{},actionLog:[],playResult:null,accessibility:{status:"idle",violations:[]},container:null,previewReady:!1,previewRevision:0,resolution:{label:"Fill",width:null,height:null},scale:1}),m()),X({id:n,title:`${o} — Docs`,kind:"story",workspaceRole:"workspace-reference",provenance:{sourcePath:e},Content:_e,closeable:!0,presentation:()=>({kind:"story",modulePath:e,storyName:o,mode:"docs"}),persist:()=>({modulePath:e,storyName:o,view:"docs"}),onDispose:i=>{y.delete(i)&&m()}})}function ke(){const t=Se();return t?xe(t).then(J,J):Promise.resolve()}fe({kind:"story",owner:"story-documents",prepare:ke,restore:({state:t,store:e})=>{const o=t,n=typeof o?.modulePath=="string"?o.modulePath:null,i=typeof o?.storyName=="string"?o.storyName:null;if(!n||!i)return!1;const a=D().find(c=>c.modulePath===n);if(!a?.ok||!a.stories.some(c=>c.name===i))return!1;if(o?.view==="docs")return Y(e,n,i),!0;const{medium:p}=me({modulePath:n,regions:he()});return p!=="dom"&&p!=="canvas"?!1:(re(e,n,i),!0)}});Q({id:ve,owner:"story-documents",open:(t,e)=>re(t,e.modulePath,e.storyName,{...e.title===void 0?{}:{title:e.title},...e.activate===void 0?{}:{activate:e.activate}})});Q({id:ge,owner:"story-documents",open:(t,e)=>Y(t,e.modulePath,e.storyName)});function W(t,e){const o=D().find(n=>n.modulePath===t);return o?o.ok?{story:o.stories.find(n=>n.name===e),moduleError:void 0}:{story:void 0,moduleError:o.error}:{story:void 0,moduleError:void 0}}function ne(t){const e=t.Component.args;return e&&typeof e=="object"?e:{}}function Te(t,e){const o=y.get(t),n={};for(const[i,a]of Object.entries(ne(e)))typeof a=="function"&&(n[i]=(...p)=>(Ce(t,i,p),a(...p)));return{...n,...o?.argOverrides??{}}}function De({documentId:t}){l.useSyncExternalStore(E,O),l.useSyncExternalStore(L,()=>D());const e=y.get(t),o=l.useRef(null),n=l.useRef(null),[i,a]=l.useState(!1),[p,c]=l.useState("unknown"),[g,w]=l.useState(null),[z,P]=l.useState({width:0,height:0}),{story:b,moduleError:x}=e?W(e.modulePath,e.storyName):{story:void 0,moduleError:void 0},h=e?JSON.stringify(e.argOverrides):"";l.useEffect(()=>{const f=o.current;if(!f)return;if(typeof ResizeObserver>"u"){P({width:f.clientWidth,height:f.clientHeight});return}const j=new ResizeObserver(([R])=>{if(!R)return;const{width:_,height:k}=R.contentRect;P(T=>T.width===_&&T.height===k?T:{width:_,height:k})});return j.observe(f),()=>j.disconnect()},[]),l.useEffect(()=>{const f=n.current;if(!f||!e)return;e.container!==f&&(e.container=f,m());const j=e.previewRevision+1;if(e.previewRevision=j,e.previewReady=!1,e.playResult=null,e.accessibility={status:"idle",violations:[]},m(),c("unknown"),w(null),!b){a(!1),c("empty");return}let R=!1,_,k;const T=()=>{R||c(te(f)?"present":"empty")},G=new MutationObserver(T);return G.observe(f,{childList:!0,subtree:!0,characterData:!0}),a(!0),ee(f,e.modulePath,e.storyName,b.Component,Te(t,b)).then(S=>{if(R){S?.unmount();return}if(!S){y.get(t)?.previewRevision===j&&(a(!1),c("empty"));return}const B=y.get(t);if(!B||B.previewRevision!==j){S.unmount();return}_=S.unmount,B.previewReady=!0,a(!1),k=setTimeout(T,0),m()},S=>{R||y.get(t)?.previewRevision!==j||(a(!1),w(S instanceof Error?S.message:String(S)),c("empty"))}),()=>{R=!0,G.disconnect(),k!==void 0&&clearTimeout(k),_?.()}},[t,e,b,h]);const C=e?.resolution.width===null,v=!e||C?1:be(z,{width:e.resolution.width,height:e.resolution.height}).scale;if(l.useEffect(()=>{!e||!Number.isFinite(v)||v<=0||e.scale===v||(e.scale=v,m())},[v,e]),!e)return r.jsx("div",{style:{padding:u[6],fontSize:d.md,color:s.content.muted,pointerEvents:"auto"},children:"This story document is no longer available."});const N=`${e.modulePath}#${e.storyName}`,I=b?g?{tone:"error",title:`Story ${N} failed`,description:g}:Z({surface:"Story",rootIds:[N],phase:i?"loading":"ready",content:p}):{tone:"error",title:`Story ${N} is unavailable`,description:x??`No story export named “${e.storyName}” exists in ${e.modulePath}; it may have been renamed or removed.`};return r.jsx("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",pointerEvents:"auto"},children:r.jsx("div",{ref:o,style:{position:"relative",flex:1,minHeight:0,overflow:"auto",display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsxs("div",{style:C?{position:"absolute",inset:0}:{position:"relative",width:e.resolution.width*v,height:e.resolution.height*v,flex:"0 0 auto"},children:[r.jsx("div",{"data-testid":"story-preview-root",ref:n,style:{position:"absolute",inset:0,isolation:"isolate",contain:"layout paint",overflow:"auto",background:s.surface.inset,...C?{}:{width:e.resolution.width,height:e.resolution.height,transform:`scale(${v})`,transformOrigin:"top left"}}}),r.jsx(q,{explanation:I,testId:"story-surface-status"})]})})})}function Pe(t){const e=t.parameters.docs;if(!e||typeof e!="object")return{};const o=e.description;if(typeof o=="string")return{story:o};if(!o||typeof o!="object")return{};const n=o;return{...typeof n.component=="string"?{component:n.component}:{},...typeof n.story=="string"?{story:n.story}:{}}}function _e({documentId:t}){l.useSyncExternalStore(E,O),l.useSyncExternalStore(L,()=>D());const e=y.get(t),o=l.useRef(null),[n,i]=l.useState("unknown"),[a,p]=l.useState(null),{story:c,moduleError:g}=e?W(e.modulePath,e.storyName):{story:void 0,moduleError:void 0};if(l.useEffect(()=>{const x=o.current;if(!x||!e||!c)return;let h=!1,C=null,v;i("unknown"),p(null);const N=()=>{h||i(te(x)?"present":"empty")},I=new MutationObserver(N);return I.observe(x,{childList:!0,subtree:!0,characterData:!0}),ee(x,e.modulePath,e.storyName,c.Component).then(f=>{if(!f){h||i("empty");return}h?f.unmount():(C=f.unmount,v=setTimeout(N,0))},f=>{h||(p(f instanceof Error?f.message:String(f)),i("empty"))}),()=>{h=!0,I.disconnect(),v!==void 0&&clearTimeout(v),C?.()}},[e,c]),!e||!c)return r.jsx("div",{style:{padding:u[8],color:s.semantic.danger,fontSize:d.md},children:g??"This Storybook Docs document is no longer available."});const w=Pe(c),z=c.args,P=`${e.modulePath}#${e.storyName}`,b=a?{tone:"error",title:`Story ${P} failed`,description:a}:Z({surface:"Story",rootIds:[P],phase:n==="unknown"?"loading":"ready",content:n});return r.jsx("article",{"data-testid":"story-docs-document",className:"volter-content-frost",style:{flex:1,minHeight:0,overflow:"auto",pointerEvents:"auto",padding:"24px clamp(18px, 5vw, 64px)"},children:r.jsxs("div",{style:{maxWidth:920,margin:"0 auto",display:"flex",flexDirection:"column",gap:22},children:[r.jsxs("header",{children:[r.jsx("div",{style:{color:s.content.dim,fontSize:d.base,marginBottom:5},children:c.title??e.modulePath}),r.jsx("h1",{style:{color:s.content.primary,fontSize:d.heading,margin:0},children:c.label}),(w.story??w.component)&&r.jsx("p",{style:{color:s.content.primary,lineHeight:1.6,maxWidth:760,whiteSpace:"pre-wrap"},children:w.story??w.component})]}),r.jsxs("section",{children:[r.jsx("h2",{style:{color:s.content.primary,fontSize:d.xl},children:"Canvas"}),r.jsxs("div",{style:{position:"relative",minHeight:180},children:[r.jsx("div",{ref:o,"data-testid":"story-docs-canvas",style:{position:"relative",isolation:"isolate",contain:"layout paint",minHeight:180,padding:18,overflow:"auto",background:s.surface.inset,border:`1px solid ${s.boundary.default}`,borderRadius:s.shape.medium}}),r.jsx(q,{explanation:b,testId:"story-docs-surface-status"})]})]}),r.jsxs("section",{children:[r.jsx("h2",{style:{color:s.content.primary,fontSize:d.xl},children:"Args"}),r.jsxs("div",{style:{border:`1px solid ${s.boundary.default}`,borderRadius:s.shape.medium,overflow:"hidden"},children:[Object.entries(z).map(([x,h])=>r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"minmax(120px, .4fr) minmax(140px, .6fr) 1fr",gap:u[6],padding:`${u[4]} ${u[5]}`,borderBottom:`1px solid ${s.boundary.default}`,fontSize:d.base},children:[r.jsx("code",{style:{color:s.accent.default},children:x}),r.jsx("span",{style:{color:s.content.muted},children:Array.isArray(h)?"array":typeof h}),r.jsx("code",{style:{color:s.content.primary,overflow:"hidden",textOverflow:"ellipsis"},children:typeof h=="function"?"function":JSON.stringify(h)})]},x)),Object.keys(z).length===0&&r.jsx("div",{style:{padding:u[5],color:s.content.dim,fontSize:d.base},children:"This story declares no args."})]})]}),r.jsxs("footer",{style:{color:s.content.dim,fontSize:d.sm},children:[e.modulePath," · ",e.storyName]})]})})}function $e({documentId:t}){l.useSyncExternalStore(E,O),l.useSyncExternalStore(L,()=>D());const e=y.get(t);if(!e)return null;const{story:o}=W(e.modulePath,e.storyName),n=typeof o?.Component.play=="function",i=e.playResult;return r.jsxs("div",{"data-testid":"story-document-toolbar",style:{display:"flex",alignItems:"center",gap:u[4],padding:"3px 10px",fontSize:d.sm,color:s.content.muted,borderBottom:`1px solid ${s.boundary.default}`},children:[r.jsxs("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:[e.modulePath," —"," ",r.jsx("code",{style:{color:s.accent.default},children:e.storyName})]}),r.jsx(we,{resolution:e.resolution,scale:e.scale,onResolutionChange:a=>{e.resolution=a,m()}}),r.jsx(A,{size:"compact","data-testid":"story-open-docs",onClick:()=>Y(e.store,e.modulePath,e.storyName),style:{flexShrink:0},children:"Docs"}),n&&o&&r.jsx(A,{variant:"outline",size:"compact","data-testid":"story-run-play",onClick:async()=>{if(!e.container||!e.previewReady)return;const a=e.previewRevision,p=await je(e.modulePath,e.storyName,o.Component,e.container),c=y.get(t);c?.previewReady&&c.previewRevision===a&&(c.playResult=p,m())},disabled:!e.previewReady,style:{flexShrink:0},children:"Run play()"}),i?.ran&&!i.error&&r.jsx("span",{"data-testid":"story-play-result",style:{color:s.semantic.success,fontWeight:600},children:"play() ran"}),i?.error&&r.jsx("span",{"data-testid":"story-play-result",style:{color:s.semantic.danger},children:i.error})]})}function ze({id:t,name:e,value:o}){return r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:u[3],padding:"3px 0"},children:[r.jsx("span",{style:{width:90,flexShrink:0,fontSize:d.base,color:s.content.muted,overflow:"hidden",textOverflow:"ellipsis"},title:e,children:e}),typeof o=="boolean"?r.jsx(ye,{className:"volter-checkbox","data-testid":`story-arg-${e}`,checked:o,onChange:n=>F(t,e,n.target.checked)}):typeof o=="number"?r.jsx(V,{type:"number",className:"volter-input","data-testid":`story-arg-${e}`,value:o,onChange:n=>{const i=n.target.value,a=Number.parseFloat(i);F(t,e,i===""||Number.isNaN(a)?void 0:a)},style:{width:80}}):typeof o=="string"?r.jsx(V,{type:"text",className:"volter-input","data-testid":`story-arg-${e}`,value:o,onChange:n=>F(t,e,n.target.value),style:{flex:1,minWidth:0}}):r.jsx("span",{style:{fontSize:d.base,color:s.content.dim},"data-testid":`story-arg-${e}`,children:typeof o=="function"?"fn (logged to Actions)":JSON.stringify(o)})]})}function Ie(){l.useSyncExternalStore(E,O),l.useSyncExternalStore(L,()=>D());const t=$();if(!t)return null;const{story:e}=W(t.modulePath,t.storyName),o=e?{...ne(e),...t.argOverrides}:{},n=Object.keys(o);return r.jsxs("div",{"data-testid":"inspector-story-args",style:{pointerEvents:"auto",padding:u[4],borderBottom:`1px solid ${s.boundary.default}`},children:[r.jsx("div",{style:{fontSize:d.base,color:s.content.dim,textTransform:"uppercase",marginBottom:u[2]},children:"Story Args"}),r.jsx("div",{style:{fontSize:d.base,color:s.content.primary,fontWeight:600,marginBottom:u[2]},children:t.storyName}),n.length===0&&r.jsx("div",{style:{fontSize:d.base,color:s.content.dim},children:e?"This story declares no args.":"Story source unavailable."}),n.map(i=>r.jsx(ze,{id:t.id,name:i,value:o[i]},i))]})}function Ae(){l.useSyncExternalStore(E,O);const t=$();return t?r.jsxs("div",{"data-testid":"story-actions-utility",style:{flex:1,minHeight:0,overflowY:"auto",padding:u[4],fontSize:d.base},children:[r.jsx(A,{size:"compact",style:{marginBottom:u[3]},onClick:()=>Ne(t.id),children:"Clear"}),t.actionLog.length===0?r.jsx("div",{style:{color:s.content.dim},children:"No actions logged — function-valued args are wrapped with logging spies; interact with the story preview to see calls here."}):t.actionLog.map((e,o)=>r.jsxs("div",{style:{padding:`${u[1]} 0`,borderBottom:`1px solid ${s.boundary.default}`},children:[r.jsx("code",{style:{color:s.accent.default},children:e.name})," ",r.jsxs("span",{style:{color:s.content.muted},children:["(",e.args.map(n=>{try{return typeof n=="object"?JSON.stringify(n)?.slice(0,80):String(n)}catch{return String(n)}}).join(", "),")"]})]},o))]}):r.jsx("div",{style:{padding:u[6],fontSize:d.md,color:s.content.dim},children:"No active story."})}function Le(){l.useSyncExternalStore(E,O);const t=$();if(!t)return r.jsx("div",{style:{padding:u[6],fontSize:d.md,color:s.content.dim},children:"No active story."});const e=t.playResult;return r.jsxs("div",{"data-testid":"story-interactions-utility",style:{flex:1,minHeight:0,overflowY:"auto",padding:u[6],fontSize:d.md},children:[!e&&r.jsx("div",{style:{color:s.content.dim},children:"No interaction run yet — use the story document's “Run play()”."}),e&&!e.ran&&r.jsx("div",{style:{color:s.content.dim},children:"This story declares no play() function."}),e?.ran&&!e.error&&r.jsx("div",{style:{color:s.semantic.success,fontWeight:600},children:"play() ran without errors."}),e?.error&&r.jsx("div",{style:{color:s.semantic.danger,whiteSpace:"pre-wrap"},children:e.error})]})}async function We(t){const e=y.get(t);if(!e?.container||!e.previewReady)return;const o=e.container,n=e.previewRevision;e.accessibility={status:"running",violations:[]},m();try{const a=await(await pe(async()=>{const{default:c}=await import("./axe-LkjAB6Lv.js").then(g=>g.a);return{default:c}},__vite__mapDeps([0,1]))).default.run(o),p=y.get(t);if(!p?.previewReady||p.previewRevision!==n||p.container!==o)return;p.accessibility={status:"complete",violations:a.violations.map(c=>({id:c.id,impact:c.impact??null,help:c.help,helpUrl:c.helpUrl,nodes:c.nodes.map(g=>({html:g.html,target:g.target.map(String)}))}))},m()}catch(i){const a=y.get(t);if(!a?.previewReady||a.previewRevision!==n||a.container!==o)return;a.accessibility={status:"error",violations:[],error:i instanceof Error?i.message:String(i)},m()}}function Be(){l.useSyncExternalStore(E,O);const t=$();if(!t)return r.jsx("div",{style:{padding:u[6],fontSize:d.md,color:s.content.dim},children:"No active story."});const e=t.accessibility;return r.jsxs("div",{"data-testid":"story-accessibility-utility",style:{flex:1,minHeight:0,overflowY:"auto",padding:u[5],fontSize:d.base},children:[r.jsx(A,{variant:"outline",size:"compact",disabled:!t.container||!t.previewReady||e.status==="running",onClick:()=>void We(t.id),style:{marginBottom:u[4]},children:e.status==="running"?"Checking…":"Run accessibility check"}),e.status==="idle"&&r.jsx("div",{style:{color:s.content.dim},children:"Run axe against the mounted story preview."}),e.status==="error"&&r.jsx("div",{style:{color:s.semantic.danger},children:e.error}),e.status==="complete"&&e.violations.length===0&&r.jsx("div",{style:{color:s.semantic.success,fontWeight:600},children:"No accessibility violations found."}),e.violations.map(o=>r.jsxs("details",{style:{borderBottom:`1px solid ${s.boundary.default}`,padding:`${u[3]} 0`},children:[r.jsxs("summary",{style:{color:o.impact==="critical"||o.impact==="serious"?s.semantic.danger:s.content.primary,cursor:"pointer"},children:[o.help," · ",o.nodes.length," node",o.nodes.length===1?"":"s"]}),r.jsx("a",{href:o.helpUrl,target:"_blank",rel:"noreferrer",style:{color:s.accent.default,display:"inline-block",margin:"5px 0"},children:"How to fix"}),o.nodes.map((n,i)=>r.jsxs("pre",{style:{color:s.content.muted,fontFamily:ue,fontSize:d.sm,whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:[n.target.join(" "),`
|
|
2
|
+
import{f2 as se,eM as ie,dT as ae,f3 as ce,f4 as le,f5 as K,f6 as H,ad as U,eO as de,as as L,at as D,al as s,er as u,et as d,a6 as A,ew as ue,aS as ye,aN as V,_ as pe,f7 as fe,au as me,av as he,f8 as Q,f9 as ve,fa as ge,fb as xe,b9 as J,fc as X,aC as Se}from"./index-CfY0i8Sb.js";import{a as r}from"./jsx-runtime-DPjLkJKQ.js";import{r as l}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{R as we,f as be}from"./presentation-c8KWB69i.js";import{e as Z,S as q}from"./surface-state-CiltpQ-L.js";import{m as ee,r as je}from"./StoryPreviewMount-DllHm68H.js";import{d as te}from"./surface-content-Dg9Kkazf.js";const Re=se,y=new Map;let oe=0;const M=new Set;function m(){oe++;for(const t of M)t()}function E(t){return M.add(t),()=>{M.delete(t)}}function O(){return oe}function Ee(t,e){return`story:${t}#${e}`}function Oe(t,e){return`story-docs:${t}#${e}`}function $(){const t=K();if(!t||t.descriptor.kind!=="story")return null;const e=y.get(t.descriptor.id);return e?.mode==="preview"?{...e,id:t.descriptor.id}:null}function F(t,e,o){const n=y.get(t);if(n){if(o===void 0){const i={...n.argOverrides};delete i[e],n.argOverrides=i}else n.argOverrides={...n.argOverrides,[e]:o};m()}}function Ce(t,e,o){const n=y.get(t);n&&(n.actionLog=[...n.actionLog,{name:e,args:o,time:Date.now()}].slice(-200),m())}function Ne(t){const e=y.get(t);!e||e.actionLog.length===0||(e.actionLog=[],m())}function re(t,e,o,n={}){Ue();const i=Ee(e,o);y.has(i)||(y.set(i,{modulePath:e,storyName:o,mode:"preview",store:t,argOverrides:{},actionLog:[],playResult:null,accessibility:{status:"idle",violations:[]},container:null,previewReady:!1,previewRevision:0,resolution:{label:"Fill",width:null,height:null},scale:1}),m());const a=n.activate===void 0?{}:{activate:n.activate};return X({id:i,title:n.title??o,kind:"story",workspaceRole:"authored-subject",provenance:{sourcePath:e},Content:De,Toolbar:$e,closeable:!0,presentation:()=>({kind:"story",modulePath:e,storyName:o,mode:"preview"}),persist:()=>({modulePath:e,storyName:o}),onDispose:p=>{y.delete(p)&&m()}},a)}function Y(t,e,o){const n=Oe(e,o);return y.has(n)||(y.set(n,{modulePath:e,storyName:o,mode:"docs",store:t,argOverrides:{},actionLog:[],playResult:null,accessibility:{status:"idle",violations:[]},container:null,previewReady:!1,previewRevision:0,resolution:{label:"Fill",width:null,height:null},scale:1}),m()),X({id:n,title:`${o} — Docs`,kind:"story",workspaceRole:"workspace-reference",provenance:{sourcePath:e},Content:_e,closeable:!0,presentation:()=>({kind:"story",modulePath:e,storyName:o,mode:"docs"}),persist:()=>({modulePath:e,storyName:o,view:"docs"}),onDispose:i=>{y.delete(i)&&m()}})}function ke(){const t=Se();return t?xe(t).then(J,J):Promise.resolve()}fe({kind:"story",owner:"story-documents",prepare:ke,restore:({state:t,store:e})=>{const o=t,n=typeof o?.modulePath=="string"?o.modulePath:null,i=typeof o?.storyName=="string"?o.storyName:null;if(!n||!i)return!1;const a=D().find(c=>c.modulePath===n);if(!a?.ok||!a.stories.some(c=>c.name===i))return!1;if(o?.view==="docs")return Y(e,n,i),!0;const{medium:p}=me({modulePath:n,regions:he()});return p!=="dom"&&p!=="canvas"?!1:(re(e,n,i),!0)}});Q({id:ve,owner:"story-documents",open:(t,e)=>re(t,e.modulePath,e.storyName,{...e.title===void 0?{}:{title:e.title},...e.activate===void 0?{}:{activate:e.activate}})});Q({id:ge,owner:"story-documents",open:(t,e)=>Y(t,e.modulePath,e.storyName)});function W(t,e){const o=D().find(n=>n.modulePath===t);return o?o.ok?{story:o.stories.find(n=>n.name===e),moduleError:void 0}:{story:void 0,moduleError:o.error}:{story:void 0,moduleError:void 0}}function ne(t){const e=t.Component.args;return e&&typeof e=="object"?e:{}}function Te(t,e){const o=y.get(t),n={};for(const[i,a]of Object.entries(ne(e)))typeof a=="function"&&(n[i]=(...p)=>(Ce(t,i,p),a(...p)));return{...n,...o?.argOverrides??{}}}function De({documentId:t}){l.useSyncExternalStore(E,O),l.useSyncExternalStore(L,()=>D());const e=y.get(t),o=l.useRef(null),n=l.useRef(null),[i,a]=l.useState(!1),[p,c]=l.useState("unknown"),[g,w]=l.useState(null),[z,P]=l.useState({width:0,height:0}),{story:b,moduleError:x}=e?W(e.modulePath,e.storyName):{story:void 0,moduleError:void 0},h=e?JSON.stringify(e.argOverrides):"";l.useEffect(()=>{const f=o.current;if(!f)return;if(typeof ResizeObserver>"u"){P({width:f.clientWidth,height:f.clientHeight});return}const j=new ResizeObserver(([R])=>{if(!R)return;const{width:_,height:k}=R.contentRect;P(T=>T.width===_&&T.height===k?T:{width:_,height:k})});return j.observe(f),()=>j.disconnect()},[]),l.useEffect(()=>{const f=n.current;if(!f||!e)return;e.container!==f&&(e.container=f,m());const j=e.previewRevision+1;if(e.previewRevision=j,e.previewReady=!1,e.playResult=null,e.accessibility={status:"idle",violations:[]},m(),c("unknown"),w(null),!b){a(!1),c("empty");return}let R=!1,_,k;const T=()=>{R||c(te(f)?"present":"empty")},G=new MutationObserver(T);return G.observe(f,{childList:!0,subtree:!0,characterData:!0}),a(!0),ee(f,e.modulePath,e.storyName,b.Component,Te(t,b)).then(S=>{if(R){S?.unmount();return}if(!S){y.get(t)?.previewRevision===j&&(a(!1),c("empty"));return}const B=y.get(t);if(!B||B.previewRevision!==j){S.unmount();return}_=S.unmount,B.previewReady=!0,a(!1),k=setTimeout(T,0),m()},S=>{R||y.get(t)?.previewRevision!==j||(a(!1),w(S instanceof Error?S.message:String(S)),c("empty"))}),()=>{R=!0,G.disconnect(),k!==void 0&&clearTimeout(k),_?.()}},[t,e,b,h]);const C=e?.resolution.width===null,v=!e||C?1:be(z,{width:e.resolution.width,height:e.resolution.height}).scale;if(l.useEffect(()=>{!e||!Number.isFinite(v)||v<=0||e.scale===v||(e.scale=v,m())},[v,e]),!e)return r.jsx("div",{style:{padding:u[6],fontSize:d.md,color:s.content.muted,pointerEvents:"auto"},children:"This story document is no longer available."});const N=`${e.modulePath}#${e.storyName}`,I=b?g?{tone:"error",title:`Story ${N} failed`,description:g}:Z({surface:"Story",rootIds:[N],phase:i?"loading":"ready",content:p}):{tone:"error",title:`Story ${N} is unavailable`,description:x??`No story export named “${e.storyName}” exists in ${e.modulePath}; it may have been renamed or removed.`};return r.jsx("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",pointerEvents:"auto"},children:r.jsx("div",{ref:o,style:{position:"relative",flex:1,minHeight:0,overflow:"auto",display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsxs("div",{style:C?{position:"absolute",inset:0}:{position:"relative",width:e.resolution.width*v,height:e.resolution.height*v,flex:"0 0 auto"},children:[r.jsx("div",{"data-testid":"story-preview-root",ref:n,style:{position:"absolute",inset:0,isolation:"isolate",contain:"layout paint",overflow:"auto",background:s.surface.inset,...C?{}:{width:e.resolution.width,height:e.resolution.height,transform:`scale(${v})`,transformOrigin:"top left"}}}),r.jsx(q,{explanation:I,testId:"story-surface-status"})]})})})}function Pe(t){const e=t.parameters.docs;if(!e||typeof e!="object")return{};const o=e.description;if(typeof o=="string")return{story:o};if(!o||typeof o!="object")return{};const n=o;return{...typeof n.component=="string"?{component:n.component}:{},...typeof n.story=="string"?{story:n.story}:{}}}function _e({documentId:t}){l.useSyncExternalStore(E,O),l.useSyncExternalStore(L,()=>D());const e=y.get(t),o=l.useRef(null),[n,i]=l.useState("unknown"),[a,p]=l.useState(null),{story:c,moduleError:g}=e?W(e.modulePath,e.storyName):{story:void 0,moduleError:void 0};if(l.useEffect(()=>{const x=o.current;if(!x||!e||!c)return;let h=!1,C=null,v;i("unknown"),p(null);const N=()=>{h||i(te(x)?"present":"empty")},I=new MutationObserver(N);return I.observe(x,{childList:!0,subtree:!0,characterData:!0}),ee(x,e.modulePath,e.storyName,c.Component).then(f=>{if(!f){h||i("empty");return}h?f.unmount():(C=f.unmount,v=setTimeout(N,0))},f=>{h||(p(f instanceof Error?f.message:String(f)),i("empty"))}),()=>{h=!0,I.disconnect(),v!==void 0&&clearTimeout(v),C?.()}},[e,c]),!e||!c)return r.jsx("div",{style:{padding:u[8],color:s.semantic.danger,fontSize:d.md},children:g??"This Storybook Docs document is no longer available."});const w=Pe(c),z=c.args,P=`${e.modulePath}#${e.storyName}`,b=a?{tone:"error",title:`Story ${P} failed`,description:a}:Z({surface:"Story",rootIds:[P],phase:n==="unknown"?"loading":"ready",content:n});return r.jsx("article",{"data-testid":"story-docs-document",className:"volter-content-frost",style:{flex:1,minHeight:0,overflow:"auto",pointerEvents:"auto",padding:"24px clamp(18px, 5vw, 64px)"},children:r.jsxs("div",{style:{maxWidth:920,margin:"0 auto",display:"flex",flexDirection:"column",gap:22},children:[r.jsxs("header",{children:[r.jsx("div",{style:{color:s.content.dim,fontSize:d.base,marginBottom:5},children:c.title??e.modulePath}),r.jsx("h1",{style:{color:s.content.primary,fontSize:d.heading,margin:0},children:c.label}),(w.story??w.component)&&r.jsx("p",{style:{color:s.content.primary,lineHeight:1.6,maxWidth:760,whiteSpace:"pre-wrap"},children:w.story??w.component})]}),r.jsxs("section",{children:[r.jsx("h2",{style:{color:s.content.primary,fontSize:d.xl},children:"Canvas"}),r.jsxs("div",{style:{position:"relative",minHeight:180},children:[r.jsx("div",{ref:o,"data-testid":"story-docs-canvas",style:{position:"relative",isolation:"isolate",contain:"layout paint",minHeight:180,padding:18,overflow:"auto",background:s.surface.inset,border:`1px solid ${s.boundary.default}`,borderRadius:s.shape.medium}}),r.jsx(q,{explanation:b,testId:"story-docs-surface-status"})]})]}),r.jsxs("section",{children:[r.jsx("h2",{style:{color:s.content.primary,fontSize:d.xl},children:"Args"}),r.jsxs("div",{style:{border:`1px solid ${s.boundary.default}`,borderRadius:s.shape.medium,overflow:"hidden"},children:[Object.entries(z).map(([x,h])=>r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"minmax(120px, .4fr) minmax(140px, .6fr) 1fr",gap:u[6],padding:`${u[4]} ${u[5]}`,borderBottom:`1px solid ${s.boundary.default}`,fontSize:d.base},children:[r.jsx("code",{style:{color:s.accent.default},children:x}),r.jsx("span",{style:{color:s.content.muted},children:Array.isArray(h)?"array":typeof h}),r.jsx("code",{style:{color:s.content.primary,overflow:"hidden",textOverflow:"ellipsis"},children:typeof h=="function"?"function":JSON.stringify(h)})]},x)),Object.keys(z).length===0&&r.jsx("div",{style:{padding:u[5],color:s.content.dim,fontSize:d.base},children:"This story declares no args."})]})]}),r.jsxs("footer",{style:{color:s.content.dim,fontSize:d.sm},children:[e.modulePath," · ",e.storyName]})]})})}function $e({documentId:t}){l.useSyncExternalStore(E,O),l.useSyncExternalStore(L,()=>D());const e=y.get(t);if(!e)return null;const{story:o}=W(e.modulePath,e.storyName),n=typeof o?.Component.play=="function",i=e.playResult;return r.jsxs("div",{"data-testid":"story-document-toolbar",style:{display:"flex",alignItems:"center",gap:u[4],padding:"3px 10px",fontSize:d.sm,color:s.content.muted,borderBottom:`1px solid ${s.boundary.default}`},children:[r.jsxs("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:[e.modulePath," —"," ",r.jsx("code",{style:{color:s.accent.default},children:e.storyName})]}),r.jsx(we,{resolution:e.resolution,scale:e.scale,onResolutionChange:a=>{e.resolution=a,m()}}),r.jsx(A,{size:"compact","data-testid":"story-open-docs",onClick:()=>Y(e.store,e.modulePath,e.storyName),style:{flexShrink:0},children:"Docs"}),n&&o&&r.jsx(A,{variant:"outline",size:"compact","data-testid":"story-run-play",onClick:async()=>{if(!e.container||!e.previewReady)return;const a=e.previewRevision,p=await je(e.modulePath,e.storyName,o.Component,e.container),c=y.get(t);c?.previewReady&&c.previewRevision===a&&(c.playResult=p,m())},disabled:!e.previewReady,style:{flexShrink:0},children:"Run play()"}),i?.ran&&!i.error&&r.jsx("span",{"data-testid":"story-play-result",style:{color:s.semantic.success,fontWeight:600},children:"play() ran"}),i?.error&&r.jsx("span",{"data-testid":"story-play-result",style:{color:s.semantic.danger},children:i.error})]})}function ze({id:t,name:e,value:o}){return r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:u[3],padding:"3px 0"},children:[r.jsx("span",{style:{width:90,flexShrink:0,fontSize:d.base,color:s.content.muted,overflow:"hidden",textOverflow:"ellipsis"},title:e,children:e}),typeof o=="boolean"?r.jsx(ye,{className:"volter-checkbox","data-testid":`story-arg-${e}`,checked:o,onChange:n=>F(t,e,n.target.checked)}):typeof o=="number"?r.jsx(V,{type:"number",className:"volter-input","data-testid":`story-arg-${e}`,value:o,onChange:n=>{const i=n.target.value,a=Number.parseFloat(i);F(t,e,i===""||Number.isNaN(a)?void 0:a)},style:{width:80}}):typeof o=="string"?r.jsx(V,{type:"text",className:"volter-input","data-testid":`story-arg-${e}`,value:o,onChange:n=>F(t,e,n.target.value),style:{flex:1,minWidth:0}}):r.jsx("span",{style:{fontSize:d.base,color:s.content.dim},"data-testid":`story-arg-${e}`,children:typeof o=="function"?"fn (logged to Actions)":JSON.stringify(o)})]})}function Ie(){l.useSyncExternalStore(E,O),l.useSyncExternalStore(L,()=>D());const t=$();if(!t)return null;const{story:e}=W(t.modulePath,t.storyName),o=e?{...ne(e),...t.argOverrides}:{},n=Object.keys(o);return r.jsxs("div",{"data-testid":"inspector-story-args",style:{pointerEvents:"auto",padding:u[4],borderBottom:`1px solid ${s.boundary.default}`},children:[r.jsx("div",{style:{fontSize:d.base,color:s.content.dim,textTransform:"uppercase",marginBottom:u[2]},children:"Story Args"}),r.jsx("div",{style:{fontSize:d.base,color:s.content.primary,fontWeight:600,marginBottom:u[2]},children:t.storyName}),n.length===0&&r.jsx("div",{style:{fontSize:d.base,color:s.content.dim},children:e?"This story declares no args.":"Story source unavailable."}),n.map(i=>r.jsx(ze,{id:t.id,name:i,value:o[i]},i))]})}function Ae(){l.useSyncExternalStore(E,O);const t=$();return t?r.jsxs("div",{"data-testid":"story-actions-utility",style:{flex:1,minHeight:0,overflowY:"auto",padding:u[4],fontSize:d.base},children:[r.jsx(A,{size:"compact",style:{marginBottom:u[3]},onClick:()=>Ne(t.id),children:"Clear"}),t.actionLog.length===0?r.jsx("div",{style:{color:s.content.dim},children:"No actions logged — function-valued args are wrapped with logging spies; interact with the story preview to see calls here."}):t.actionLog.map((e,o)=>r.jsxs("div",{style:{padding:`${u[1]} 0`,borderBottom:`1px solid ${s.boundary.default}`},children:[r.jsx("code",{style:{color:s.accent.default},children:e.name})," ",r.jsxs("span",{style:{color:s.content.muted},children:["(",e.args.map(n=>{try{return typeof n=="object"?JSON.stringify(n)?.slice(0,80):String(n)}catch{return String(n)}}).join(", "),")"]})]},o))]}):r.jsx("div",{style:{padding:u[6],fontSize:d.md,color:s.content.dim},children:"No active story."})}function Le(){l.useSyncExternalStore(E,O);const t=$();if(!t)return r.jsx("div",{style:{padding:u[6],fontSize:d.md,color:s.content.dim},children:"No active story."});const e=t.playResult;return r.jsxs("div",{"data-testid":"story-interactions-utility",style:{flex:1,minHeight:0,overflowY:"auto",padding:u[6],fontSize:d.md},children:[!e&&r.jsx("div",{style:{color:s.content.dim},children:"No interaction run yet — use the story document's “Run play()”."}),e&&!e.ran&&r.jsx("div",{style:{color:s.content.dim},children:"This story declares no play() function."}),e?.ran&&!e.error&&r.jsx("div",{style:{color:s.semantic.success,fontWeight:600},children:"play() ran without errors."}),e?.error&&r.jsx("div",{style:{color:s.semantic.danger,whiteSpace:"pre-wrap"},children:e.error})]})}async function We(t){const e=y.get(t);if(!e?.container||!e.previewReady)return;const o=e.container,n=e.previewRevision;e.accessibility={status:"running",violations:[]},m();try{const a=await(await pe(async()=>{const{default:c}=await import("./axe-LkjAB6Lv.js").then(g=>g.a);return{default:c}},__vite__mapDeps([0,1]))).default.run(o),p=y.get(t);if(!p?.previewReady||p.previewRevision!==n||p.container!==o)return;p.accessibility={status:"complete",violations:a.violations.map(c=>({id:c.id,impact:c.impact??null,help:c.help,helpUrl:c.helpUrl,nodes:c.nodes.map(g=>({html:g.html,target:g.target.map(String)}))}))},m()}catch(i){const a=y.get(t);if(!a?.previewReady||a.previewRevision!==n||a.container!==o)return;a.accessibility={status:"error",violations:[],error:i instanceof Error?i.message:String(i)},m()}}function Be(){l.useSyncExternalStore(E,O);const t=$();if(!t)return r.jsx("div",{style:{padding:u[6],fontSize:d.md,color:s.content.dim},children:"No active story."});const e=t.accessibility;return r.jsxs("div",{"data-testid":"story-accessibility-utility",style:{flex:1,minHeight:0,overflowY:"auto",padding:u[5],fontSize:d.base},children:[r.jsx(A,{variant:"outline",size:"compact",disabled:!t.container||!t.previewReady||e.status==="running",onClick:()=>void We(t.id),style:{marginBottom:u[4]},children:e.status==="running"?"Checking…":"Run accessibility check"}),e.status==="idle"&&r.jsx("div",{style:{color:s.content.dim},children:"Run axe against the mounted story preview."}),e.status==="error"&&r.jsx("div",{style:{color:s.semantic.danger},children:e.error}),e.status==="complete"&&e.violations.length===0&&r.jsx("div",{style:{color:s.semantic.success,fontWeight:600},children:"No accessibility violations found."}),e.violations.map(o=>r.jsxs("details",{style:{borderBottom:`1px solid ${s.boundary.default}`,padding:`${u[3]} 0`},children:[r.jsxs("summary",{style:{color:o.impact==="critical"||o.impact==="serious"?s.semantic.danger:s.content.primary,cursor:"pointer"},children:[o.help," · ",o.nodes.length," node",o.nodes.length===1?"":"s"]}),r.jsx("a",{href:o.helpUrl,target:"_blank",rel:"noreferrer",style:{color:s.accent.default,display:"inline-block",margin:"5px 0"},children:"How to fix"}),o.nodes.map((n,i)=>r.jsxs("pre",{style:{color:s.content.muted,fontFamily:ue,fontSize:d.sm,whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:[n.target.join(" "),`
|
|
3
3
|
`,n.html]},`${o.id}:${i}`))]},o.id))]})}const He=de();function Ue(){He.ensure(t=>{t(ie({match:()=>K()?.descriptor.kind==="story",id:le,title:ce,icon:Re,order:ae,Section:Ie}));const e=()=>$()!==null;t(H({...U.storyActions,Content:Ae,available:e})),t(H({...U.storyInteractions,Content:Le,available:e})),t(H({...U.storyAccessibility,Content:Be,available:e}))})}export{Re as S,Ue as e,ke as p,Ee as s};
|
package/dist/assets/{story-documents.service-ink5SQ1C.js → story-documents.service-BCLnFmEo.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as r}from"./story-documents-
|
|
1
|
+
import{e as r}from"./story-documents-xCtMZ9lz.js";import"./index-CfY0i8Sb.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"./presentation-c8KWB69i.js";import"./surface-state-CiltpQ-L.js";import"./StoryPreviewMount-DllHm68H.js";import"./surface-content-Dg9Kkazf.js";const g="workspace.service";function k(){return r(),()=>{}}export{g as point,k as start};
|