@volter/game-editor 0.5.80 → 0.5.82
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 +2115 -2114
- package/dist/assets/{AssetBudgetPanel-C-RNso12.js → AssetBudgetPanel-Iip49rxI.js} +3 -3
- package/dist/assets/{AudioViewer-BQ4yQJmw.js → AudioViewer-DmkOvskF.js} +1 -1
- package/dist/assets/{CanvasBoardDocument-D1_2Ahx7.js → CanvasBoardDocument-DCS8uzQo.js} +1 -1
- package/dist/assets/CanvasSceneViewport-CfOuQiQ0.js +1 -0
- package/dist/assets/{ColorInput-B-GRGKwB.js → ColorInput-7CPpl8MI.js} +1 -1
- package/dist/assets/EntityModelDocument-CplmAib0.js +1 -0
- package/dist/assets/{EnvironmentAssetDocument-BbWPrmTc.js → EnvironmentAssetDocument-DlS6KFJu.js} +1 -1
- package/dist/assets/{GameplaySessionTimeline-Bi_Z_lDm.js → GameplaySessionTimeline-C3zH6edi.js} +1 -1
- package/dist/assets/{ImageViewer-CVYDgTSj.js → ImageViewer-C0lQ6YO0.js} +1 -1
- package/dist/assets/InspectorObjectPreview-Bjc1Tn-I.js +1 -0
- package/dist/assets/{JsonAssetDocument-O-o1eVJB.js → JsonAssetDocument-DjmH9CQH.js} +1 -1
- package/dist/assets/{LiveModuleDocument-CCpe63vw.js → LiveModuleDocument-Hiot8Q5L.js} +1 -1
- package/dist/assets/{LutAssetDocument-C_QGvjj7.js → LutAssetDocument-6bBwNMOn.js} +1 -1
- package/dist/assets/{ModelAssetDocument-DKyxph4r.js → ModelAssetDocument-G6ajiV51.js} +1 -1
- package/dist/assets/{NonThreeAuthoringBootstrap-DkfIBzMs.js → NonThreeAuthoringBootstrap-DpieYAMC.js} +1 -1
- package/dist/assets/Object3DDocumentToolbar-BtZkDxKa.js +1 -0
- package/dist/assets/Object3DDocumentViewport-BhH8afDi.js +2 -0
- package/dist/assets/{Object3DPreview-DI7aoPKe.js → Object3DPreview-DdrYVJUZ.js} +1 -1
- package/dist/assets/{OnlineAssetDetail-BIRXvQsJ.js → OnlineAssetDetail-D06eTe3y.js} +1 -1
- package/dist/assets/{PlayBar-BYVJHvd5.js → PlayBar-BbzjgLFJ.js} +1 -1
- package/dist/assets/{QuarksAssetDocument-DEcSmewA.js → QuarksAssetDocument-wGHNt4ov.js} +1 -1
- package/dist/assets/{ReactCanvasControls-DplBODky.js → ReactCanvasControls-BL2tOUj6.js} +1 -1
- package/dist/assets/{RootSelectionOverlay-BzEZwAaO.js → RootSelectionOverlay-C6Wu8nIs.js} +1 -1
- package/dist/assets/{ShaderAssetDocument-ysUJR4Np.js → ShaderAssetDocument-BDi8iNLA.js} +4 -4
- package/dist/assets/{ShadowEditor-BKz_sq1R.js → ShadowEditor-C3L0UWSH.js} +1 -1
- package/dist/assets/{SourceAssetViewer-DhoQonvP.js → SourceAssetViewer-D832bARo.js} +1 -1
- package/dist/assets/StageHost-Bor1eHEO.js +2 -0
- package/dist/assets/{StoryPreviewMount-BF6vqmhx.js → StoryPreviewMount-CmOEFzZY.js} +1 -1
- package/dist/assets/{ThreeBoardDocument-vedTeiN9.js → ThreeBoardDocument-BtBMGtiQ.js} +2 -2
- package/dist/assets/{ThreeIsolationSceneContent-TT4T-ehp.js → ThreeIsolationSceneContent-BEHNSEsi.js} +1 -1
- package/dist/assets/{ToolObject3DPreview-C52QCJAO.js → ToolObject3DPreview-76LMkfin.js} +1 -1
- package/dist/assets/{Toolbar-Bo-l61Lo.js → Toolbar-BEBQdxRz.js} +1 -1
- package/dist/assets/{TransientHint-DFAcEEFI.js → TransientHint-CzsdY8W6.js} +1 -1
- package/dist/assets/{VideoViewer-BM_9gSgl.js → VideoViewer-Ckrawyuq.js} +1 -1
- package/dist/assets/{ViewportShadingMenu-CWutLX1G.js → ViewportShadingMenu-BofQt6_4.js} +1 -1
- package/dist/assets/{active-ingest-BuNeO4Mb.js → active-ingest-D_ryI_R4.js} +2 -2
- package/dist/assets/{animation-clock-B-fl-HTL.js → animation-clock-QjtJDIsR.js} +1 -1
- package/dist/assets/{animation-mixers.service-DgxB7R_k.js → animation-mixers.service-BInUs1US.js} +1 -1
- package/dist/assets/{animation-timeline.utility-RWwRwQvM.js → animation-timeline.utility-DUrfNSwn.js} +1 -1
- package/dist/assets/{asset-budget-asset.menu-D2Tdwqxf.js → asset-budget-asset.menu-DVQEksFp.js} +1 -1
- package/dist/assets/{asset-budget.action-WMiFAlTi.js → asset-budget.action-C-ENAa52.js} +1 -1
- package/dist/assets/{asset-budget.document-CckPEzno.js → asset-budget.document-Bb1PyL3H.js} +1 -1
- package/dist/assets/{asset-budget.menu-DPMPOTSo.js → asset-budget.menu-CPi2yjBA.js} +1 -1
- package/dist/assets/{asset-editor-persistence-DttxUta0.js → asset-editor-persistence-Duoq7o22.js} +1 -1
- package/dist/assets/{asset-loaders-9M6lxMew.js → asset-loaders-BftJ2m7-.js} +1 -1
- package/dist/assets/{asset-preview-C36PaXvM.js → asset-preview-BS71mXsZ.js} +1 -1
- package/dist/assets/{audio-unlock.service-BeHFOKOB.js → audio-unlock.service-C3ygvDjU.js} +1 -1
- package/dist/assets/{audio.utility-HRjVG-Co.js → audio.utility-DF55sgHW.js} +1 -1
- package/dist/assets/autoplay.service-DaonKf7O.js +1 -0
- package/dist/assets/{babylon-authoring-adapter-BHQY7yIy.js → babylon-authoring-adapter-CmeehOBt.js} +1 -1
- package/dist/assets/{binding-resolver-TD7-fKuX.js → binding-resolver-DUz8C8Fs.js} +2 -2
- package/dist/assets/{blender-emscripten-engine-CieQeF-r.js → blender-emscripten-engine-DQljvfR7.js} +1 -1
- package/dist/assets/{blender-node-editor.document-Bw2QbNTV.js → blender-node-editor.document-B8S2TVMM.js} +1 -1
- package/dist/assets/{blender-properties-tab-BnIbJN4f.js → blender-properties-tab-y-_BeZDx.js} +1 -1
- package/dist/assets/blender-runtime-host-CUH6peXj.js +4 -0
- package/dist/assets/{blender-runtime-skin-CwXXiusi.js → blender-runtime-skin-B1tYITn2.js} +36 -36
- package/dist/assets/blender-runtime.document-DnSl0twI.js +12 -0
- package/dist/assets/{blender-timeline.document-CESN0FrA.js → blender-timeline.document-CeCylyXB.js} +1 -1
- package/dist/assets/{blender-uv-editor.document-BdIUMC5X.js → blender-uv-editor.document-DEllMw3a.js} +1 -1
- package/dist/assets/{blender-version.status-CBKgGtQ0.js → blender-version.status-CrT9NqK-.js} +1 -1
- package/dist/assets/{blender-wali-engine-KWIxfB_o.js → blender-wali-engine-CO-jG_ik.js} +1 -1
- package/dist/assets/{blender.command-ChUV_DJE.js → blender.command-GIjMG1-m.js} +1 -1
- package/dist/assets/{board-guides-ClHJXXuu.js → board-guides-B6TEPOPi.js} +1 -1
- package/dist/assets/{bridge.command-DK8zE8yt.js → bridge.command-D6qTcgje.js} +3 -3
- package/dist/assets/{browserAll-Be-P25YM.js → browserAll-k35XRFil.js} +1 -1
- package/dist/assets/build-player.document-CHxj4P8q.js +1 -0
- package/dist/assets/{build-profiles.document-CNZvcPor.js → build-profiles.document-CZCk1HYA.js} +2 -2
- package/dist/assets/{build-progress.status-BMfffkUW.js → build-progress.status-BNwBxP2a.js} +1 -1
- package/dist/assets/{build-session-BHUOWzok.js → build-session-CW2UyYFF.js} +1 -1
- package/dist/assets/{build.action-BGriOSGD.js → build.action-EmCcMu47.js} +1 -1
- package/dist/assets/{build.command-BU7Wcsn5.js → build.command-CzEckGcR.js} +1 -1
- package/dist/assets/{build.header-B6KRt0O_.js → build.header-CsYLpZbh.js} +1 -1
- package/dist/assets/{build.menu-CpxN2aww.js → build.menu-CaDkDQuy.js} +1 -1
- package/dist/assets/{build.service-LRCZ0vL7.js → build.service-BcKtbU0-.js} +1 -1
- package/dist/assets/{camera-D8fxcMUB.js → camera-BwWZUyKt.js} +1 -1
- package/dist/assets/{camera-runtime.inspector-5RS6wvw2.js → camera-runtime.inspector-CJyi3zmp.js} +1 -1
- package/dist/assets/{canvas-design-mount-CoKGVZii.js → canvas-design-mount-B_uwZkEU.js} +6 -6
- package/dist/assets/{canvas-entry-runtime-Do5zL9dN.js → canvas-entry-runtime-DskaohHK.js} +2 -2
- package/dist/assets/{canvas-preview-frames-Jsd4Gi5S.js → canvas-preview-frames-BzLeTumX.js} +1 -1
- package/dist/assets/{canvas-story-capture.service-0SYz8LrL.js → canvas-story-capture.service-C80CsS8r.js} +2 -2
- package/dist/assets/{capability-coverage-BqCZSu0R.js → capability-coverage-wd6bAhv3.js} +2 -2
- package/dist/assets/{collaboration-presence-WWC9ZQsq.js → collaboration-presence-DcPhahtF.js} +1 -1
- package/dist/assets/{collider-DsdfCyWG.js → collider-Dw2iWV3F.js} +1 -1
- package/dist/assets/{component-board.service-6JDsY08Z.js → component-board.service-CH99sgj0.js} +2 -2
- package/dist/assets/component-board.service-Cd1c9oSN.js +2 -0
- package/dist/assets/{component-board.service-DZWOfhbB.js → component-board.service-XAxyLCnM.js} +2 -2
- package/dist/assets/{component-contracts.service-DXfwve-4.js → component-contracts.service-DerT0BP-.js} +1 -1
- package/dist/assets/{component-instance-root-pq7uyyej.js → component-instance-root-Cw_-ajBX.js} +1 -1
- package/dist/assets/{component-verbs.command-Cd_-gQ-Z.js → component-verbs.command-BHK9M2Rk.js} +1 -1
- package/dist/assets/component-verbs.service-DsxhVcvk.js +1 -0
- package/dist/assets/{config-CnqnR-iz.js → config-1rCvm02z.js} +3 -3
- package/dist/assets/configurations-CRTYw0r9.js +1 -0
- package/dist/assets/{connection.status-BkhMFG12.js → connection.status-D4fjnH24.js} +1 -1
- package/dist/assets/{constraints.inspector-CPWFDlY8.js → constraints.inspector-BgnafOLf.js} +1 -1
- package/dist/assets/{content-bounds-Ax7CFkXJ.js → content-bounds-D5pXeHJN.js} +1 -1
- package/dist/assets/{contract-system-adapters-0Odxcy6d.js → contract-system-adapters-rVGdworX.js} +1 -1
- package/dist/assets/{coverage.service-CcKdk7iJ.js → coverage.service-BNme5Agb.js} +1 -1
- package/dist/assets/{create-runtime-BhdSylT1.js → create-runtime-CcuQTSfy.js} +2 -2
- package/dist/assets/{curve-DiuqWf0-.js → curve-DorFv33R.js} +1 -1
- package/dist/assets/{data-asset-BiqUYQnI.js → data-asset-CAE35Emh.js} +1 -1
- package/dist/assets/{data-ref-mo1ecq_T.js → data-ref-DXqRnZsJ.js} +1 -1
- package/dist/assets/{debug-bridge-BN4INYe7.js → debug-bridge-DdCJSEni.js} +1 -1
- package/dist/assets/{debug-registry-BW5cue8V.js → debug-registry-xQJcVubm.js} +1 -1
- package/dist/assets/deferred-ingest-play-CEnsC3uN.js +2 -0
- package/dist/assets/{design-time-canvas-mount-mhxQlHHP.js → design-time-canvas-mount-CPRrCPFA.js} +2 -2
- package/dist/assets/design-time-layers-hmGqBp06.js +1 -0
- package/dist/assets/{design-time-mount.service-Cs_mT_-d.js → design-time-mount.service-CEmJjRIJ.js} +2 -2
- package/dist/assets/{design-time-mount.service-DPEpO4ny.js → design-time-mount.service-CLL-1Za4.js} +2 -2
- package/dist/assets/{design-time-react-mount-RdZmD9Dp.js → design-time-react-mount-DmXi3GBy.js} +1 -1
- package/dist/assets/{document-preview-three-D4M5qFH3.js → document-preview-three-B4j_zNef.js} +1 -1
- package/dist/assets/{dom-authoring-adapter-B97hwEwz.js → dom-authoring-adapter-BklRbjZB.js} +1 -1
- package/dist/assets/{draco3d-B_PtVdzj.js → draco3d-CFWI1XDT.js} +1 -1
- package/dist/assets/{edit-mode-audio.service-BZxbnyf-.js → edit-mode-audio.service-SUzv0nHs.js} +1 -1
- package/dist/assets/{edit-mode-authoring-CVKwIPOy.js → edit-mode-authoring-CSt3zzmS.js} +1 -1
- package/dist/assets/{edit-mode-networking.service-2aXyBwkO.js → edit-mode-networking.service-D6UohrCr.js} +1 -1
- package/dist/assets/editor-api-WeHVNlEo.js +1 -0
- package/dist/assets/{editor-layers-DI1Wkr8F.js → editor-layers-CjeYrUlm.js} +1 -1
- package/dist/assets/{editor-shell-store-DlGykD-E.js → editor-shell-store-DckLm6m8.js} +1 -1
- package/dist/assets/{entity-object-C374JqRs.js → entity-object-V13bGmay.js} +1 -1
- package/dist/assets/{extend-BOaYynPp.js → extend-BQeRA-aV.js} +1 -1
- package/dist/assets/{fork-menu-DGjsgL8L.js → fork-menu-Bthg9viY.js} +1 -1
- package/dist/assets/{frame-debugger-store-Czy2FTqO.js → frame-debugger-store-DDxWlDPK.js} +1 -1
- package/dist/assets/{game-contract-seams-GoIZaA0s.js → game-contract-seams-DrYyE5PX.js} +1 -1
- package/dist/assets/{game-css-scope-transform-9t97Smqk.js → game-css-scope-transform-D5hQWaci.js} +1 -1
- package/dist/assets/game-document.service-cJ1yKc2V.js +1 -0
- package/dist/assets/{game-eval.command-BYEEWjUv.js → game-eval.command-CKo-W17_.js} +1 -1
- package/dist/assets/{game-module-access-BqevF7uR.js → game-module-access-DuptGLGx.js} +1 -1
- package/dist/assets/game-network-CAH_Jsh6.js +22 -0
- package/dist/assets/gameplay-export-B-JE4uSD.js +1 -0
- package/dist/assets/gameplay-replay-WyopKGyB.js +1 -0
- package/dist/assets/{gameplay.command-BrleMyQK.js → gameplay.command-D4cY3nOq.js} +1 -1
- package/dist/assets/generation-jobs-CcCrhKLM.js +1 -0
- package/dist/assets/{generation.service-nVpgwKEB.js → generation.service-CQwmLAOQ.js} +1 -1
- package/dist/assets/{generations-AU4LkWAl.js → generations-qfhCRH8C.js} +1 -1
- package/dist/assets/{generations.status-CSeb5inI.js → generations.status-CcbR2OfF.js} +1 -1
- package/dist/assets/{hierarchy-marks-EEQa08In.js → hierarchy-marks-B1jSqxSv.js} +1 -1
- package/dist/assets/{hosted-asset-materialization-DZlaRGkJ.js → hosted-asset-materialization-BZf-8JA1.js} +1 -1
- package/dist/assets/{index-ynpEqujB.js → index-CHa43s2p.js} +1 -1
- package/dist/assets/{index-N4BP9b5x.js → index-Cj_b0Ygc.js} +1 -1
- package/dist/assets/{index-CUBra63E.js → index-D-RMHSzb.js} +1 -1
- package/dist/assets/{index-BpXj_ZfC.js → index-DXtfej3G.js} +1 -1
- package/dist/assets/{index-BHccVo52.js → index-D_ViOFCz.js} +2 -2
- package/dist/assets/{index-DlFjiZgV.js → index-DrEVdQvN.js} +1 -1
- package/dist/assets/{index-flxMlfV4.js → index-V4J7xfRg.js} +7 -7
- package/dist/assets/{index-OlF4eBxk.js → index-aREcGExk.js} +1 -1
- package/dist/assets/index-yXSK_qPW.js +1 -0
- package/dist/assets/{inference-diagnostics-MWqnRUsN.js → inference-diagnostics-DoZQ1mpg.js} +1 -1
- package/dist/assets/{ingest-boot-viewport-CT1eaWqO.js → ingest-boot-viewport-DWdOtGGE.js} +1 -1
- package/dist/assets/ingest-siblings-DyvasVDH.js +1 -0
- package/dist/assets/{ingest-source-persistence-CJGE5-AU.js → ingest-source-persistence-CQOJeGhj.js} +1 -1
- package/dist/assets/{ingest.service-2TRoiqQ8.js → ingest.service-CqIcydem.js} +1 -1
- package/dist/assets/{inspect-Dl5bH02T.js → inspect-DiSjB-N1.js} +1 -1
- package/dist/assets/instances.command-COw2QpbN.js +1 -0
- package/dist/assets/{json-history-resource-DTUpacfx.js → json-history-resource-CH2nzMZh.js} +1 -1
- package/dist/assets/{layered-pick-DKNj5L29.js → layered-pick-BUr1U8lU.js} +1 -1
- package/dist/assets/{light-CX-83nBK.js → light-CxiGIJma.js} +1 -1
- package/dist/assets/live-project-verbs-CnknlUlT.js +1 -0
- package/dist/assets/{machine.document-DE8aRbOi.js → machine.document-D7jMrzXt.js} +1 -1
- package/dist/assets/{machines.finder-CZ3P0odZ.js → machines.finder-Dor3O0uf.js} +1 -1
- package/dist/assets/{material-f1KOKE_r.js → material-B6cH1Oqw.js} +1 -1
- package/dist/assets/{material-factory-DkCPSCLt.js → material-factory-BN3Lax5C.js} +1 -1
- package/dist/assets/{mesh-DM3TH9xS.js → mesh-Cj-CYroI.js} +1 -1
- package/dist/assets/{model-asset-sections.service-CL4Rlwvc.js → model-asset-sections.service-mC4WJFTA.js} +1 -1
- package/dist/assets/{model-inspection-BS3uYvYU.js → model-inspection-8o57YSZW.js} +1 -1
- package/dist/assets/{model-thumbnail-WJb6B3qQ.js → model-thumbnail-chePRlH7.js} +1 -1
- package/dist/assets/{models.finder-BXJhCiw9.js → models.finder-CKkT5ZdU.js} +1 -1
- package/dist/assets/{module-mode-CtoVZDhp.js → module-mode-BMiMhHI3.js} +2 -2
- package/dist/assets/{mount-canvas-ingest-root-DI8iSEV4.js → mount-canvas-ingest-root-B1swVIUJ.js} +2 -2
- package/dist/assets/{mount-dom-ingest-root-n4tbYw-j.js → mount-dom-ingest-root-B8hO5mht.js} +2 -2
- package/dist/assets/{mount-ingest-root-pyV6jEkB.js → mount-ingest-root-Cbnh-mSw.js} +2 -2
- package/dist/assets/{mount-manifest-DsGMOkm4.js → mount-manifest-B7oL1Abg.js} +1 -1
- package/dist/assets/{mount-three-ingest-root-CeH_uOP0.js → mount-three-ingest-root-BdUJx6ix.js} +1 -1
- package/dist/assets/{mounted-authoring-BHpx-z2Y.js → mounted-authoring-C47L5H5t.js} +1 -1
- package/dist/assets/{mounted-story-viewport-source-D8kOfa96.js → mounted-story-viewport-source-CyEK_vaq.js} +1 -1
- package/dist/assets/{native-debug-module-lR1oG4Vd.js → native-debug-module-JJOFtIVz.js} +1 -1
- package/dist/assets/{navigation-DvTw5hJ4.js → navigation-ROJM2w84.js} +1 -1
- package/dist/assets/{navmesh.menu-BaBNScgJ.js → navmesh.menu-DjefqtkI.js} +1 -1
- package/dist/assets/{navmesh.service-BK6BlOz3.js → navmesh.service-BPqjEQiq.js} +1 -1
- package/dist/assets/network-observer.service-GFzXuBMb.js +1 -0
- package/dist/assets/{network.utility-BJ3bZOCQ.js → network.utility-6Y5u53n8.js} +1 -1
- package/dist/assets/object3d-document-session-registry-DNCOGA3i.js +2 -0
- package/dist/assets/{oid-transform-RlofQ4tU.js → oid-transform-DQzN_Gl_.js} +1 -1
- package/dist/assets/{particles-CjR9Po6N.js → particles-DGdUmqOr.js} +1 -1
- package/dist/assets/{pixi-authoring-adapter-B_mXxWkJ.js → pixi-authoring-adapter-BRktdcIz.js} +1 -1
- package/dist/assets/{pixi-live-write-target-tm5yHKss.js → pixi-live-write-target-Dg0mdLaa.js} +1 -1
- package/dist/assets/play.command-4IDAqR5W.js +2 -0
- package/dist/assets/{presentation-gTgwItzD.js → presentation-8m-RDKIS.js} +1 -1
- package/dist/assets/{product-Cmel9X9k.js → product-t6tauO7R.js} +1 -1
- package/dist/assets/{profiler.action-DSM2uSYR.js → profiler.action-CXA4IkQB.js} +1 -1
- package/dist/assets/{profiler.menu-CcYyqUfU.js → profiler.menu-BgIBv4-I.js} +1 -1
- package/dist/assets/{profiler.utility-CQtqdQgC.js → profiler.utility-BYoRbfIK.js} +1 -1
- package/dist/assets/{project-authoring-session-BqZuntp2.js → project-authoring-session-DkekCxNv.js} +2 -2
- package/dist/assets/{properties-bone-constraints.inspector-D3XrqptB.js → properties-bone-constraints.inspector-DXpiCtf9.js} +1 -1
- package/dist/assets/{properties-bone.inspector-CmVamAC6.js → properties-bone.inspector-wIDsP4c5.js} +1 -1
- package/dist/assets/{properties-collection.inspector-BGi5eXmI.js → properties-collection.inspector-5SRPbqfM.js} +1 -1
- package/dist/assets/{properties-constraints.inspector-C62EOuWg.js → properties-constraints.inspector-DIjKz692.js} +1 -1
- package/dist/assets/{properties-data.inspector-qDFtLdw8.js → properties-data.inspector-DE6i8biZ.js} +1 -1
- package/dist/assets/{properties-material.inspector-B--PD0se.js → properties-material.inspector-Cu1UCPY4.js} +1 -1
- package/dist/assets/{properties-modifiers.inspector-1tdk1EKp.js → properties-modifiers.inspector-DsQzA638.js} +1 -1
- package/dist/assets/{properties-object.inspector-CYH5w2un.js → properties-object.inspector-C57X0GJq.js} +1 -1
- package/dist/assets/{properties-output.inspector-C78QuVlY.js → properties-output.inspector-DzrcFuRM.js} +1 -1
- package/dist/assets/{properties-particles.inspector-DyDiMjmC.js → properties-particles.inspector-DGqSnelN.js} +1 -1
- package/dist/assets/{properties-physics.inspector-DG5GOyLE.js → properties-physics.inspector-DIjhtiLe.js} +1 -1
- package/dist/assets/{properties-render.inspector-D8ldGTdq.js → properties-render.inspector-CX0orwn9.js} +1 -1
- package/dist/assets/{properties-scene.inspector-Cf_KBWbv.js → properties-scene.inspector-DaHNL_sq.js} +1 -1
- package/dist/assets/{properties-texture.inspector-BznU5kNc.js → properties-texture.inspector-B5hmxPRy.js} +1 -1
- package/dist/assets/{properties-view-layer.inspector-pnRv91FS.js → properties-view-layer.inspector-C7hdJgei.js} +1 -1
- package/dist/assets/{properties-world.inspector-CzUtvYuC.js → properties-world.inspector-EWTC6jNw.js} +1 -1
- package/dist/assets/r3f-design-session-CXlGV9hp.js +2 -0
- package/dist/assets/{r3f-physics-binding-D6DKTgwF.js → r3f-physics-binding-DZSIB0d_.js} +1 -1
- package/dist/assets/{r3f-source-authoring-adapter-nqn_PR3m.js → r3f-source-authoring-adapter-GR97EmII.js} +1 -1
- package/dist/assets/{react-canvas-navigation-WxI8Mxyc.js → react-canvas-navigation-L_mOnybL.js} +1 -1
- package/dist/assets/{react-inspector.service-C1Prvq6u.js → react-inspector.service-B4P3UnSY.js} +1 -1
- package/dist/assets/{react-story-board-BRUE9hN1.js → react-story-board-CT1_3sk_.js} +1 -1
- package/dist/assets/{react-three-rapier.esm-CA7vFsM3.js → react-three-rapier.esm-DyMNYoA_.js} +1 -1
- package/dist/assets/{react-world-authoring-adapter-DVNps-az.js → react-world-authoring-adapter-OR1SW2jI.js} +1 -1
- package/dist/assets/{realm-services-CL4ih5gp.js → realm-services-u0mnjXU9.js} +1 -1
- package/dist/assets/{reflection-probe-capture.inspector-C9mzBLI7.js → reflection-probe-capture.inspector-CTNlSaGW.js} +1 -1
- package/dist/assets/{registry-N8Uqh2X-.js → registry-wqakYaDW.js} +1 -1
- package/dist/assets/{relative-import-specifier-cRtWQWmH.js → relative-import-specifier-DXWVQf0o.js} +1 -1
- package/dist/assets/{render-env-xu-q_sLG.js → render-env-CN09NtDf.js} +1 -1
- package/dist/assets/{render-features-BMOBYkLQ.js → render-features-HCEupUJ6.js} +1 -1
- package/dist/assets/{render-settings-Cnd69vhe.js → render-settings-Clt6d05o.js} +1 -1
- package/dist/assets/{resolve-three-C9OlnFHx.js → resolve-three-CLzKVMx2.js} +13 -13
- package/dist/assets/{root-seam-contract-BoD0NaOZ.js → root-seam-contract-D2uQHWF9.js} +1 -1
- package/dist/assets/{run-selection-DL0vJV6z.js → run-selection-AyelFc9T.js} +1 -1
- package/dist/assets/{scene-capture-CoTN4qOO.js → scene-capture-WbPcLfJl.js} +1 -1
- package/dist/assets/{scene-document.service-kgtsh1r2.js → scene-document.service-4U6rDhCp.js} +2 -2
- package/dist/assets/{scene-framing-CljHc6tN.js → scene-framing-DzSL2Cld.js} +1 -1
- package/dist/assets/{seeded-random-BlGWBUER.js → seeded-random-tpdJjdqy.js} +1 -1
- package/dist/assets/{session-BMie6EFt.js → session-kSIjcXJT.js} +47 -8
- package/dist/assets/{setup-renderer-jOQdnmo7.js → setup-renderer-B5vZmCyu.js} +1 -1
- package/dist/assets/{source-object3d-authoring-adapter-qg_NN2PX.js → source-object3d-authoring-adapter-BQnQ3Qzg.js} +1 -1
- package/dist/assets/{source-persistence-backend-DoNJeJa8.js → source-persistence-backend-uyd6NiWD.js} +1 -1
- package/dist/assets/stage-keyboard-B2yrk2zu.js +1 -0
- package/dist/assets/stage-overlay-set-Cqtz3s06.js +1 -0
- package/dist/assets/{stage-presence-markers-Bu9mH0m_.js → stage-presence-markers-BgLs0Aj5.js} +1 -1
- package/dist/assets/stage-transform-tools-BHcz53td.js +1 -0
- package/dist/assets/{standard-viewport-dressing-B8VpmbHt.js → standard-viewport-dressing-uhv_3JvQ.js} +2 -2
- package/dist/assets/{state-watch.action-Dhb9xQb9.js → state-watch.action-BJ08HgcO.js} +1 -1
- package/dist/assets/{state-watch.menu-xf7oO-4l.js → state-watch.menu-rAULwijr.js} +1 -1
- package/dist/assets/{state-watch.utility-DnGO08TW.js → state-watch.utility-eEbQcj8t.js} +1 -1
- package/dist/assets/{story-capture-CyeAHem-.js → story-capture-B8wfSf5s.js} +1 -1
- package/dist/assets/{story-documents-DUm0LUTp.js → story-documents-Cm4jCkW5.js} +2 -2
- package/dist/assets/{story-documents.service-BWBSUjBO.js → story-documents.service-BDvQCslK.js} +1 -1
- package/dist/assets/{story-documents.service-DOvAnwES.js → story-documents.service-Cgtg6rXn.js} +1 -1
- package/dist/assets/story-media-presence-SGlp_afL.js +1 -0
- package/dist/assets/{story-pixi-preview-DHtzdru2.js → story-pixi-preview-D62Q_vIW.js} +1 -1
- package/dist/assets/{story-presentation-BpfNrI6t.js → story-presentation-CofUdEU7.js} +1 -1
- package/dist/assets/{story-three-preview-pzhR44fH.js → story-three-preview-B9O1wapP.js} +2 -2
- package/dist/assets/{studio-environment-Dw2FBct5.js → studio-environment-BIhqrtFc.js} +1 -1
- package/dist/assets/{surface-state-NwiDDkWI.js → surface-state-DrM3wsrr.js} +1 -1
- package/dist/assets/{syntactic-prop-specs-_Yk2QtpW.js → syntactic-prop-specs-BGz0N7Dg.js} +1 -1
- package/dist/assets/{team-playtest.service-DdUlOcrk.js → team-playtest.service-CiE8UJAe.js} +1 -1
- package/dist/assets/{three-2yjp9YMj.js → three-BQfhEwUz.js} +1 -1
- package/dist/assets/{three-authoring-adapter-B5h6dxvp.js → three-authoring-adapter-COBwREQO.js} +1 -1
- package/dist/assets/three-authoring.service-C0azvoq8.js +2 -0
- package/dist/assets/{three-ingest-runtime-B9surImB.js → three-ingest-runtime-BnRF_nJN.js} +1 -1
- package/dist/assets/three-integration-DeWYFf1x.js +2 -0
- package/dist/assets/three-integration.service-CoWCBTmg.js +1 -0
- package/dist/assets/{three-projection-core-xgnaC08N.js → three-projection-core-PQm-CO61.js} +1 -1
- package/dist/assets/{three-state-DVnNjIbQ.js → three-state-C7khRIQE.js} +1 -1
- package/dist/assets/{three-story-capture.service-DgVUrOW6.js → three-story-capture.service-B0oiGIfp.js} +2 -2
- package/dist/assets/three-story-model-D7g2pqfJ.js +1 -0
- package/dist/assets/{three-viewport-presentation-C5wGhMgD.js → three-viewport-presentation-B_tBudM-.js} +5 -5
- package/dist/assets/transform-mode-request-DWM6BdRA.js +1 -0
- package/dist/assets/{transport-strip-Dvkyjqwq.js → transport-strip-vgXGDgkI.js} +1 -1
- package/dist/assets/transport.header-CfVHXjrT.js +1 -0
- package/dist/assets/{tuples-tlEYpiUU.js → tuples-BnYrlQqS.js} +1 -1
- package/dist/assets/ui-board-document-B_-K9luq.js +2 -0
- package/dist/assets/{user-data-C8dmlLGA.js → user-data-CifDDvSr.js} +1 -1
- package/dist/assets/{utility-view-state-8ikycS0_.js → utility-view-state-BPl8Asup.js} +1 -1
- package/dist/assets/{viewport-door-Brt6-rPp.js → viewport-door-BCXEYmon.js} +1 -1
- package/dist/assets/{viewport-root-presentation-DEm3C1-i.js → viewport-root-presentation-DJLpUuf0.js} +1 -1
- package/dist/assets/{viewport-surface-status-Dbc5Yxun.js → viewport-surface-status-jwLhIK_M.js} +1 -1
- package/dist/assets/{webworkerAll-qWuefF-u.js → webworkerAll-P6jePa6X.js} +1 -1
- package/dist/assets/{worker-Gtu-EAm9.js → worker-CJIsrsP6.js} +1 -1
- package/dist/assets/{workspace-arrangement-BnGzBm57.js → workspace-arrangement-B_OcbQbj.js} +1 -1
- package/dist/assets/{world-documents-DH7drgx-.js → world-documents-Bx3j867R.js} +1 -1
- package/dist/assets/{world-root-stage-binding-DIigD-mK.js → world-root-stage-binding-LEhjWDkn.js} +1 -1
- package/dist/assets/{xstate-animation-binding-BpYb4mXT.js → xstate-animation-binding-Dionc_fC.js} +1 -1
- package/dist/assets/{xstate-animation-meta-0RXvMgDk.js → xstate-animation-meta-XEmD_qc_.js} +1 -1
- package/dist-node/cli.js +16 -16
- package/package.json +16 -16
- package/dist/assets/CanvasSceneViewport-BdHcsAyR.js +0 -1
- package/dist/assets/EntityModelDocument-BkRbfE7C.js +0 -1
- package/dist/assets/InspectorObjectPreview-BooanIbq.js +0 -1
- package/dist/assets/Object3DDocumentToolbar-BGkgzg_Y.js +0 -1
- package/dist/assets/Object3DDocumentViewport-C81c8PFJ.js +0 -2
- package/dist/assets/StageHost-CSw286Im.js +0 -2
- package/dist/assets/autoplay.service-EjNkSGFD.js +0 -1
- package/dist/assets/blender-runtime-host-W_QVh8pY.js +0 -4
- package/dist/assets/blender-runtime.document-CxTCG8RI.js +0 -12
- package/dist/assets/build-player.document-Clkf52m6.js +0 -1
- package/dist/assets/component-board.service-Dj_INzxs.js +0 -2
- package/dist/assets/component-verbs.service-Do8eBA--.js +0 -1
- package/dist/assets/configurations-DFYaoXBK.js +0 -1
- package/dist/assets/deferred-ingest-play-C6qytzjB.js +0 -2
- package/dist/assets/design-time-layers-CCEX-9ul.js +0 -1
- package/dist/assets/editor-api-B0aNu3G5.js +0 -1
- package/dist/assets/game-document.service-DBSsz8Ne.js +0 -1
- package/dist/assets/game-network-DtzKFtge.js +0 -22
- package/dist/assets/gameplay-export-BNVUERuW.js +0 -1
- package/dist/assets/gameplay-replay-DEKg9ROx.js +0 -1
- package/dist/assets/generation-jobs-Bmm6k_GH.js +0 -1
- package/dist/assets/index-PKSmixoy.js +0 -1
- package/dist/assets/ingest-siblings-BJ66Uen_.js +0 -1
- package/dist/assets/instances.command-2QbcHvH-.js +0 -1
- package/dist/assets/live-project-verbs-nmQ1saHI.js +0 -1
- package/dist/assets/network-observer.service-CskzAy97.js +0 -1
- package/dist/assets/object3d-document-session-registry-DI9WfJDy.js +0 -2
- package/dist/assets/play.command-BmsyGtu0.js +0 -2
- package/dist/assets/r3f-design-session-Dwqxg13i.js +0 -2
- package/dist/assets/stage-keyboard-jfRYkBwZ.js +0 -1
- package/dist/assets/stage-overlay-set-Bo-JC6N0.js +0 -1
- package/dist/assets/stage-transform-tools-CSnDpsY3.js +0 -1
- package/dist/assets/story-media-presence-7Tbl7-hO.js +0 -1
- package/dist/assets/three-authoring.service-CIVEDuMV.js +0 -2
- package/dist/assets/three-integration-K2zwKa-Z.js +0 -2
- package/dist/assets/three-integration.service-kjZ0g0er.js +0 -1
- package/dist/assets/three-story-model-B0qnMa7M.js +0 -1
- package/dist/assets/transform-mode-request-COfeHSRX.js +0 -1
- package/dist/assets/transport.header-CFTM9Q_n.js +0 -1
- package/dist/assets/ui-board-document-BlKR5Cyh.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as T}from"./react-story-board-
|
|
1
|
+
import{r as T}from"./react-story-board-CT1_3sk_.js";import{d as P}from"./bitmap-label-Ct4k6ehY.js";import{b8 as S,b9 as M,at as $,ba as C,bb as E,bc as j,bd as I,$ as v,be as D,bf as R,bg as O,aB as B,au as L}from"./index-V4J7xfRg.js";import{m as U}from"./StoryPreviewMount-CmOEFzZY.js";import{s as k}from"./story-presentation-CofUdEU7.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=L(),c=M().filter(e=>$({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=k(c),d=B()?.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 C(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 U(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{e$ as se,eI as ie,dw as ae,f0 as ce,f1 as le,f2 as K,f3 as H,a7 as U,eK as de,am as L,an as P,af as s,en as u,ep as d,a0 as A,es as ue,aR as ye,aM as V,_ as pe,f4 as fe,ao as me,ap as he,f5 as Q,f6 as ve,f7 as ge,f8 as xe,b8 as J,f9 as X,aw as Se}from"./index-flxMlfV4.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-gTgwItzD.js";import{e as Z,S as q}from"./surface-state-NwiDDkWI.js";import{m as ee,r as je}from"./StoryPreviewMount-BF6vqmhx.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:Pe,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=P().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=P().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 De(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 Pe({documentId:t}){l.useSyncExternalStore(E,O),l.useSyncExternalStore(L,()=>P());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,T]=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"){T({width:f.clientWidth,height:f.clientHeight});return}const j=new ResizeObserver(([R])=>{if(!R)return;const{width:_,height:k}=R.contentRect;T(D=>D.width===_&&D.height===k?D:{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 D=()=>{R||c(te(f)?"present":"empty")},G=new MutationObserver(D);return G.observe(f,{childList:!0,subtree:!0,characterData:!0}),a(!0),ee(f,e.modulePath,e.storyName,b.Component,De(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(D,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 Te(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,()=>P());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=Te(c),z=c.args,T=`${e.modulePath}#${e.storyName}`,b=a?{tone:"error",title:`Story ${T} failed`,description:a}:Z({surface:"Story",rootIds:[T],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,()=>P());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,()=>P());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
|
-
`,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,
|
|
2
|
+
import{e$ as se,eI as ie,dS as ae,f0 as ce,f1 as le,f2 as K,f3 as H,ac as U,eK as de,ar as L,as as P,ak as s,en as u,ep as d,a5 as A,es as ue,aR as ye,aM as V,_ as pe,f4 as fe,at as me,au as he,f5 as Q,f6 as ve,f7 as ge,f8 as xe,b8 as J,f9 as X,aB as Se}from"./index-V4J7xfRg.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-8m-RDKIS.js";import{e as Z,S as q}from"./surface-state-DrM3wsrr.js";import{m as ee,r as je}from"./StoryPreviewMount-CmOEFzZY.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 ke(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:Pe,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 Ne(){const t=Se();return t?xe(t).then(J,J):Promise.resolve()}fe({kind:"story",owner:"story-documents",prepare:Ne,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=P().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=P().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 De(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 Pe({documentId:t}){l.useSyncExternalStore(E,O),l.useSyncExternalStore(L,()=>P());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,T]=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"){T({width:f.clientWidth,height:f.clientHeight});return}const j=new ResizeObserver(([R])=>{if(!R)return;const{width:_,height:N}=R.contentRect;T(D=>D.width===_&&D.height===N?D:{width:_,height:N})});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,_,N;const D=()=>{R||c(te(f)?"present":"empty")},G=new MutationObserver(D);return G.observe(f,{childList:!0,subtree:!0,characterData:!0}),a(!0),ee(f,e.modulePath,e.storyName,b.Component,De(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),N=setTimeout(D,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(),N!==void 0&&clearTimeout(N),_?.()}},[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 k=`${e.modulePath}#${e.storyName}`,I=b?g?{tone:"error",title:`Story ${k} failed`,description:g}:Z({surface:"Story",rootIds:[k],phase:i?"loading":"ready",content:p}):{tone:"error",title:`Story ${k} 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 Te(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,()=>P());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 k=()=>{h||i(te(x)?"present":"empty")},I=new MutationObserver(k);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(k,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=Te(c),z=c.args,T=`${e.modulePath}#${e.storyName}`,b=a?{tone:"error",title:`Story ${T} failed`,description:a}:Z({surface:"Story",rootIds:[T],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,()=>P());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,()=>P());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:()=>ke(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
|
+
`,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,Ne as p,Ee as s};
|
package/dist/assets/{story-documents.service-BWBSUjBO.js → story-documents.service-BDvQCslK.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as r}from"./story-documents-
|
|
1
|
+
import{e as r}from"./story-documents-Cm4jCkW5.js";import"./index-V4J7xfRg.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-8m-RDKIS.js";import"./surface-state-DrM3wsrr.js";import"./StoryPreviewMount-CmOEFzZY.js";import"./surface-content-Dg9Kkazf.js";const g="workspace.service";function k(){return r(),()=>{}}export{g as point,k as start};
|
package/dist/assets/{story-documents.service-DOvAnwES.js → story-documents.service-Cgtg6rXn.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i}from"./jsx-runtime-DPjLkJKQ.js";import{O as H}from"./Object3DDocumentViewport-
|
|
1
|
+
import{a as i}from"./jsx-runtime-DPjLkJKQ.js";import{O as H}from"./Object3DDocumentViewport-BhH8afDi.js";import{S,e as W}from"./surface-state-DrM3wsrr.js";import{S as G}from"./standard-viewport-dressing-uhv_3JvQ.js";import{eI as z,dS as B,f0 as V,f1 as Y,eK as F,ar as _,as as x,ak as p,aR as J,aM as D,f2 as K,f5 as U,fk as L,f4 as X,fl as Q,f9 as Z,at as q,au as ee,dw as te}from"./index-V4J7xfRg.js";import{m as re}from"./mounted-story-viewport-source-CyEK_vaq.js";import{s as oe}from"./story-arg-descriptors-Ek86ExX7.js";import{mountStoryObject3D as se,disposeStoryObject3D as N}from"./story-three-preview-B9O1wapP.js";import{m as ie}from"./three-story-model-D7g2pqfJ.js";import{S as ne,p as ae,s as le}from"./story-documents-Cm4jCkW5.js";import{r as l}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{R3fSourceAuthoringAdapter as ce}from"./r3f-source-authoring-adapter-GR97EmII.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./viewport-surface-status-jwLhIK_M.js";import"./content-bounds-D5pXeHJN.js";import"./hierarchy-marks-B1jSqxSv.js";import"./workspace-arrangement-B_OcbQbj.js";import"./three.core-3arARmh6.js";import"./editor-layers-CjeYrUlm.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.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-CifDDvSr.js";import"./asset-preview-BS71mXsZ.js";import"./renderer-ownership-BovSEcLv.js";import"./studio-environment-BIhqrtFc.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./bitmap-label-Ct4k6ehY.js";import"./crash-null-boundary-v3a0uEgw.js";import"./events-156d8d12.esm-CYeuVCYr.js";import"./index-bQE2NA0D.js";import"./story-mount-turn-DFRTj5hi.js";import"./presentation-8m-RDKIS.js";import"./StoryPreviewMount-CmOEFzZY.js";import"./surface-content-Dg9Kkazf.js";import"./component-instance-root-Cw_-ajBX.js";import"./live-gesture-lock-DJbrjOqf.js";import"./relative-import-specifier-DXWVQf0o.js";import"./three-projection-core-PQm-CO61.js";import"./three-BQfhEwUz.js";import"./entity-object-V13bGmay.js";import"./three-contract-Dkt6PmWY.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./inference-diagnostics-DoZQ1mpg.js";import"./instance-fork-actions-D3sRzS3K.js";import"./oid-transform-DQzN_Gl_.js";import"./writer-tw6EcuVO.js";import"./r3f-physics-binding-DZSIB0d_.js";import"./object3d-authoring-subject-XccsO0xG.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";const de="threeStory.arg.",f=new Map;let j=0;const v=new Set;function b(){j++;for(const e of v)e()}function k(e){return v.add(e),()=>{v.delete(e)}}function I(){return j}function ue(e,t){return`three-story:${e}#${t}`}function C(){const e=K();if(!e)return null;const t=f.get(e.descriptor.id);return t?{...t,id:e.descriptor.id}:null}function g(e,t,r){const s=f.get(e);if(s){if(r===void 0){const o={...s.argOverrides};delete o[t],s.argOverrides=o}else s.argOverrides={...s.argOverrides,[t]:r};b()}}function A(e,t,r=t,s={}){P(),Q(le(e,t));const o=ue(e,t);return f.has(o)||(f.set(o,{modulePath:e,storyName:t,argOverrides:{}}),b()),Z({id:o,title:r,kind:"world",workspaceRole:"authored-subject",provenance:{sourcePath:e},Content:pe,closeable:!0,presentation:()=>({kind:"story",modulePath:e,storyName:t,mode:"preview"}),persist:({title:n})=>({modulePath:e,storyName:t,title:n}),onDispose:n=>{f.delete(n)&&b()}},{activate:s.activate!==!1})}function me(e,t,r){const{story:s}=E(e,t);return!s||q({modulePath:e,regions:ee()}).medium!=="three"?!1:(A(e,t,r??s.label),!0)}U({id:L,owner:"three-story-documents",open:(e,t)=>A(t.modulePath,t.storyName,t.title??t.storyName,t.activate===void 0?{}:{activate:t.activate})});X({kind:"world",owner:"three-story-documents",prepare:ae,restore:({state:e})=>{const t=e,r=typeof t?.modulePath=="string"?t.modulePath:null,s=typeof t?.storyName=="string"?t.storyName:null;if(!r||!s)return!1;const o=typeof t?.title=="string"?t.title:void 0;return me(r,s,o)}});function E(e,t){const r=x().find(s=>s.modulePath===e);return r?r.ok?{story:r.stories.find(s=>s.name===t),moduleError:void 0}:{story:void 0,moduleError:r.error}:{story:void 0,moduleError:void 0}}function pe({documentId:e,active:t}){l.useSyncExternalStore(k,I),l.useSyncExternalStore(_,x);const r=f.get(e),[s,o]=l.useState(null),[n,u]=l.useState(null),d=l.useRef(new Set);l.useEffect(()=>{if(s)for(const a of d.current){if(a===s)break;a.dispose(),d.current.delete(a)}},[s]),l.useEffect(()=>()=>{for(const a of d.current)a.dispose();d.current.clear()},[]);const[T,$]=l.useState(t),h=r?.modulePath,O=l.useMemo(()=>h?({store:a,scene:c,hierarchyRoots:y})=>{const w=new ce(a,c,{worldId:e,entryPath:h,writeBackend:te("The Asset Editor"),hierarchyMode:"definition",...y?{hierarchyRoots:y}:{}});return{adapter:w,dispose:()=>w.dispose()}}:void 0,[e,h]);l.useEffect(()=>{t&&$(!0)},[t]);const{story:m,moduleError:R}=r?E(r.modulePath,r.storyName):{story:void 0,moduleError:void 0},M=r?JSON.stringify(r.argOverrides):"";if(l.useEffect(()=>{if(!T||!m||!r)return;let a=!1;return u(null),se(m.Component,{...r.argOverrides}).then(c=>{if(a){N(c);return}if(!ie(c.root)){N(c),u("The story mounted with no three content — its first R3F commit rendered an empty subtree. A <Suspense> boundary around three content is the usual cause: the boundary commits its fallback first, so the real children arrive on a later commit this document never sees.");return}const y=re(c);d.current.add(y),o(y)}).catch(c=>{a||u(c instanceof Error?c.message:String(c))}),()=>{a=!0}},[T,m,r,M]),!r)return i.jsx("div",{style:{padding:12,fontSize:12,color:p.content.muted},children:"This story document is no longer available."});if((!m||n)&&!s){const a=`${r.modulePath}#${r.storyName}`;return i.jsx("div",{"data-testid":"three-story-document-error",style:{position:"relative",flex:1,minHeight:0},children:i.jsx(S,{testId:"three-story-surface-status",explanation:{tone:"error",title:`Story ${a} failed`,description:n??R??"It may have been renamed or removed; close this document."}})})}return s?i.jsxs("div",{style:{position:"relative",display:"flex",flex:1,minHeight:0},children:[i.jsx(H,{documentId:e,sourcePath:r.modulePath,build:s.build,displayName:m?.label??r.storyName,active:t,assetType:"component",...O?{sourceAuthoring:O}:{},cameraDirection:G}),(!m||n)&&i.jsx(S,{testId:"three-story-surface-status",explanation:{tone:"error",title:"Source update failed",description:n??R??"This story is unavailable. The last working view is retained."}})]}):i.jsx("div",{"data-testid":"three-story-document-loading",style:{position:"relative",flex:1,minHeight:0},children:i.jsx(S,{testId:"three-story-surface-status",explanation:W({surface:"Story",rootIds:[`${r.modulePath}#${r.storyName}`],phase:"loading",content:"unknown"})})})}function fe(){l.useSyncExternalStore(k,I),l.useSyncExternalStore(_,x);const e=C();if(!e)return null;const{story:t}=E(e.modulePath,e.storyName),r=t?{...t.args,...e.argOverrides}:{},s=oe(r,de);return i.jsxs("div",{"data-testid":"inspector-story-args-three",style:{pointerEvents:"auto",padding:8,borderBottom:`1px solid ${p.boundary.default}`},children:[i.jsx("div",{style:{fontSize:11,color:p.content.primary,fontWeight:600,marginBottom:4},children:e.storyName}),s.length===0&&i.jsx("div",{style:{fontSize:11,color:p.content.dim},children:t?"This story declares no editable args.":"Story source unavailable."}),s.map(o=>i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"3px 0"},children:[i.jsx("span",{title:o.label,style:{width:90,flexShrink:0,fontSize:11,color:p.content.muted,overflow:"hidden",textOverflow:"ellipsis"},children:o.label}),o.type==="boolean"?i.jsx(J,{className:"volter-checkbox","data-testid":`three-story-arg-${o.label}`,checked:r[o.label]===!0,onChange:n=>g(e.id,o.label,n.target.checked)}):o.type==="number"?i.jsx(D,{type:"number",className:"volter-input","data-testid":`three-story-arg-${o.label}`,value:r[o.label],onChange:n=>{const u=n.target.value,d=Number.parseFloat(u);g(e.id,o.label,u===""||Number.isNaN(d)?void 0:d)},style:{width:80}}):o.type==="string"?i.jsx(D,{type:"text",className:"volter-input","data-testid":`three-story-arg-${o.label}`,value:r[o.label],onChange:n=>g(e.id,o.label,n.target.value),style:{flex:1,minWidth:0}}):i.jsx("span",{"data-testid":`three-story-arg-${o.label}`,style:{fontSize:11,color:p.content.dim},children:JSON.stringify(r[o.label])})]},o.path))]})}const ye=F();function P(){ye.ensure(e=>{e(z({match:()=>C()!==null,id:Y,title:V,icon:ne,order:B,Section:fe}))})}const Et="workspace.service";function Tt(){return P(),()=>{}}export{Et as point,Tt as start};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ar as p,as as S,at as b,au as v,av as y}from"./index-V4J7xfRg.js";const f={three:!1,canvas:!1,dom:!1};let r=f,a=0;const n=new Set;let u=!1;function j(){return l(),r}function N(e){return l(),n.add(e),()=>{n.delete(e)}}function l(){u||(u=!0,p(()=>{d()}),d())}function i(e){if(!(e.three===r.three&&e.canvas===r.canvas&&e.dom===r.dom)){r=e;for(const t of n)t()}}function M(e){const t=b({modulePath:e.modulePath,regions:v()});if(t.medium)return t.medium;e.modulePath&&y(e.modulePath,t.reason)}async function d(){const e=++a,t=S().flatMap(s=>s.ok?s.stories.map(o=>({...o,modulePath:s.modulePath})):[]);if(t.length===0)return i(f),r;const c={three:!1,canvas:!1,dom:!1};for(const s of t){const o=M(s);if(o&&(c[o]=!0),e!==a)return r}const{three:m,canvas:h,dom:P}=c;return e!==a||i({three:m,canvas:h,dom:P}),r}export{j as g,N as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as v}from"./index-nmcBqr7Y.js";import{withApplicationCollector as E}from"./canvas-preview-frames-
|
|
1
|
+
import{r as v}from"./index-nmcBqr7Y.js";import{withApplicationCollector as E}from"./canvas-preview-frames-BzLeTumX.js";import{C as M}from"./crash-null-boundary-v3a0uEgw.js";import{m as b}from"./pixi-story-model-DNkfnWUV.js";import{az as P}from"./index-V4J7xfRg.js";import{r as S}from"./story-mount-turn-DFRTj5hi.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-D_ViOFCz.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const w=1e4,k=12,I="position:fixed;left:-20000px;top:0;width:512px;height:512px;overflow:hidden;contain:strict;pointer-events:none;visibility:hidden;";function C(t){return S(()=>t(D))}function R(t,c={}){return C(n=>n(t,c))}function _(t){return S(async()=>t.dispose())}async function G(t,c={}){const n=await R(t,c.props??{});try{const o=c.width??128,r=c.height??96;n.app.renderer.render({container:n.stage});const a=n.stage.getBounds(),s=c.layout==="fullscreen",d=8,e=n.app.screen.clone();s||(e.x=a.x-d,e.y=a.y-d,e.width=Math.max(1,a.width+d*2),e.height=Math.max(1,a.height+d*2));const i=o/r;if(!s&&e.width/e.height<i){const l=e.height*i;e.x-=(l-e.width)/2,e.width=l}else if(!s&&e.width/e.height>i){const l=e.width/i;e.y-=(l-e.height)/2,e.height=l}const u=n.app.renderer.background,h=await n.app.renderer.extract.canvas({target:n.stage,frame:e,...s&&u.alpha>0?{clearColor:u.colorRgba}:{}}),m=document.createElement("canvas");m.width=o,m.height=r;const f=m.getContext("2d");if(!f)throw new Error("Canvas story preview could not create a 2D readback context.");const g=Math.min(o/h.width,r/h.height),y=h.width*g,x=h.height*g;return f.drawImage(h,(o-y)/2,(r-x)/2,y,x),m.toDataURL("image/png")}finally{await _(n)}}const p=()=>new Promise(t=>setTimeout(t,0));async function D(t,c={}){typeof t.load=="function"&&await t.load();const n=await P(),o=document.createElement("div");o.setAttribute("style",I),document.body.appendChild(o);let r=null;const a=()=>{r?.unmount(),r=null,o.remove()};try{return await E(async s=>{let d=null;r=n.createRoot(o),r.render(v.createElement(M,{onCaught:h=>{d??=h}},v.createElement(t,c)));for(let h=0;h<k&&!(d||o.querySelector("canvas"));h++)await p();if(d)throw T(d);if(!o.querySelector("canvas"))throw new Error("The story rendered no canvas — it does not mount Pixi content.");const e=Date.now()+w;let i;for(;Date.now()<e;){if(d)throw T(d);if(i??=s[0],i&&b(i.stage))break;await p()}if(!i)throw new Error(`The story rendered a canvas but never initialized a Pixi Application within ${w/1e3}s — it is not a canvas story, or its renderer could not be created here.`);i.stop(),i.ticker.lastTime=0;let u=!1;return{host:o,stage:i.stage,ticker:i.ticker,app:i,dispose(){u||(u=!0,a())}}})}catch(s){throw a(),s}}const O=w;async function J(t,c=Date.now){if(t.length===0)return;const n=new Set,o=t.map(r=>{const a={postrender:()=>{n.add(r)}};return r.renderer?.runners.postrender.add(a),{app:r,observer:a}});try{const r=c()+O;for(;c()<r;){if(t.every(s=>s.stage!==void 0&&b(s.stage)&&n.has(s)))return;await p()}}finally{for(const{app:r,observer:a}of o)r.renderer?.runners.postrender.remove(a)}}function T(t){return new Error(`mountStoryPixi: the story threw while rendering — it does not mount Pixi content, or its component crashed. Original error: ${t instanceof Error?t.message:String(t)}`,{cause:t})}export{J as awaitPixiStoryFrame,G as capturePixiStoryThumbnail,_ as disposeStoryPixi,R as mountStoryPixi,C as withPixiStoryMountTurn};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bh as P,bi as L,bj as j}from"./index-
|
|
1
|
+
import{bh as P,bi as L,bj as j}from"./index-V4J7xfRg.js";const M=640,R=400;function F(e,t){return`portable-${e}:${t.map(n=>encodeURIComponent(n)).join("/")}`}function N(e){const t=new Map,n=[],u=new Map,r=new Map;for(const o of e){const s=P({modulePath:o.modulePath,...o.title?{title:o.title}:{}}),h=[...s.segments,s.leaf];let a=null;for(let d=0;d<h.length;d++){const p=h.slice(0,d+1),c=d===h.length-1,i=F(c?"component":"folder",p);t.has(i)||(t.set(i,{id:i,label:p.at(-1),role:c?"component":"folder",kind:c?"component":"group",typeLabel:c?"Component":d===0?"Category":"Folder",parentId:a,childIds:[],...c?{secondaryLabel:o.modulePath}:{}}),a?t.get(a)?.childIds.push(i):n.push(i)),a=i}const l=a;t.get(l)?.childIds.push(o.id),u.set(o.id,l);const f=r.get(l);f?f.storyIds.push(o.id):r.set(l,{id:l,label:L(s),storyIds:[o.id]})}return{sections:[...r.values()],nodes:[...t.values()],rootIds:n,storyParentIds:u}}function y(e){return e&&typeof e=="object"?e:null}function v(e){if(typeof e!="string")return null;const t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function S(e){const t=y(y(e.viewport)?.options),n={...j};if(!t)return n;for(const[u,r]of Object.entries(t)){const o=y(r),s=y(o?.styles);!o||!s||typeof o.name!="string"||typeof s.width!="string"||typeof s.height!="string"||(n[u]={name:o.name,styles:{width:s.width,height:s.height},...typeof o.type=="string"?{type:o.type}:{}})}return n}function T(e){const t=e.viewport;if(typeof t=="string")return{value:t||null,isRotated:!1};const n=y(t);return{value:typeof n?.value=="string"&&n.value?n.value:null,isRotated:n?.isRotated===!0}}function x(e,t,n,u){const r=e.parameters??{},o=e.globals??{},s=r.layout,h=s==="centered"||s==="fullscreen"||s==="padded"?s:"padded",a=S(r),l=Object.entries(a).flatMap(([m,b])=>{const w=v(b.styles.width),I=v(b.styles.height);return w&&I?[{id:m,label:b.name,width:w,height:I}]:[]}),f=T(o),d=n===void 0?f.value:n,p=l.find(m=>m.id===d),c=p?.width??t?.width??M,i=p?.height??t?.height??R,g=u??f.isRotated;return{layout:h,choices:l,selectedViewportId:p?.id??null,locked:e.viewportLocked===!0,rotated:g,width:g?i:c,height:g?c:i}}function G(e,t=N(e)){return{index:t,resolve:x}}export{N as c,G as s};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/react-three-rapier.esm-
|
|
2
|
-
import{
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/react-three-rapier.esm-DyMNYoA_.js","assets/index-V4J7xfRg.js","assets/index-nmcBqr7Y.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-D_NuPfjr.js","assets/jsx-runtime-DPjLkJKQ.js","assets/index-CtzuWnCS.js","assets/index-CinJrH5C.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/events-156d8d12.esm-CYeuVCYr.js","assets/index-bQE2NA0D.js","assets/BufferGeometryUtils-FJZNEiJN.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{V as U,h3 as W,h4 as z,_ as H}from"./index-V4J7xfRg.js";import{r as F}from"./index-nmcBqr7Y.js";import{a as G}from"./asset-preview-BS71mXsZ.js";import{C as V}from"./crash-null-boundary-v3a0uEgw.js";import{T as $}from"./three.module-BLhyNg0e.js";import{e as q,f as Q}from"./events-156d8d12.esm-CYeuVCYr.js";import{r as X}from"./story-mount-turn-DFRTj5hi.js";import{A as J,ej as K,d7 as Y}from"./three.core-3arARmh6.js";import"./jsx-runtime-DPjLkJKQ.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"./editor-layers-CjeYrUlm.js";import"./workspace-arrangement-B_OcbQbj.js";import"./renderer-ownership-BovSEcLv.js";import"./hierarchy-marks-B1jSqxSv.js";import"./studio-environment-BIhqrtFc.js";import"./user-data-CifDDvSr.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./bitmap-label-Ct4k6ehY.js";import"./index-bQE2NA0D.js";const Z=1/60,ee=6,te=15,N=1e-4,ne=2,re=10,oe=250,ie=4e3;function g(e){e.updateMatrixWorld(!0);const t=[];return e.traverse(n=>{const r=n.matrixWorld.elements;t.push(r[12],r[13],r[14])}),t}function D(e){let t=0;return e.traverse(()=>{t++}),t}function x(e,t){if(e.length!==t.length)return Number.NaN;let n=0;for(let r=0;r<t.length;r+=3){const o=t[r]-e[r],a=t[r+1]-e[r+1],i=t[r+2]-e[r+2],s=Math.sqrt(o*o+a*a+i*i);if(!Number.isFinite(s))return Number.NaN;s>n&&(n=s)}return n}const se=()=>new Promise(e=>setTimeout(e,0));async function ae(e,t,n){const r=n();let o=D(e),a=r,i=!1;for(;n()-r<ie;){if(n()-a>=oe){i=!0;break}await t();const s=D(e);s!==o&&(o=s,a=n())}return{buildWaitMs:n()-r,buildSettled:i}}function C(e){return{outcome:e,steps:0,lastMotion:0,buildWaitMs:0,buildSettled:!0}}function ce(e){return e.hasPhysicsSubscriber!==!1}async function ue(e,t={}){const n=t.yieldTurn??se,r=t.now??(()=>Date.now()),o=e.update?.bind(e);if(!o)return C("unsupported");if(!ce(e))return C("still");const{buildWaitMs:a,buildSettled:i}=await ae(e.scene,n,r);let s=g(e.scene),l=0,u=0,h=!1,E=0,y="still";for(let d=0;d<te;d++){for(let w=0;w<ee;w++)o(Z),l++;await n();const m=g(e.scene),p=x(s,m);if(s=m,!Number.isFinite(p)){u=0;continue}if(E=p,p>N){h=!0,u=0,y="budget";continue}if(u++,h&&u>=ne){y="rest";break}}for(let d=0;d<re;d++){await n();const m=g(e.scene),p=x(s,m);if(s=m,Number.isFinite(p)&&p<=N)break}return{outcome:y,steps:l,lastMotion:E,buildWaitMs:a,buildSettled:i}}const le={packaged:!1,createElement:F.createElement,createR3FRoot:Q,extendThree:q,three:$};let R=null;async function de(){const e=await import(W);for(const t of["createElement","createR3FRoot","extendThree"])if(typeof e[t]!="function")throw new Error(`The packaged R3F preview runtime did not export ${t} as a function — see vite-plugin-module-doorways.ts.`);if(typeof e.projectThree!="object"||e.projectThree===null)throw new Error("The packaged R3F preview runtime did not export projectThree — see vite-plugin-module-doorways.ts.");return{packaged:!0,createElement:e.createElement,createR3FRoot:e.createR3FRoot,extendThree:e.extendThree,three:e.projectThree}}async function me(){return await U()?(R||(R=de()),R):le}let T=null;function nt(){return T}const v="volter:story-preview-root",pe=1e4;function P(e){if(typeof e=="function"){const t=e;return t.displayName||t.name||""}if(e&&typeof e=="object"){const t=e;return typeof t.displayName=="string"&&t.displayName.length>0?t.displayName:typeof t.name=="string"&&t.name.length>0?t.name:P(t.type??t.render)}return""}function fe(e){const t=e,n=t._reactInternals??t._reactInternalFiber;return n&&typeof n=="object"?n:void 0}function he(e){const t=[P(e.type),P(e.elementType)];if(!(t.includes("RigidBody")||t.includes("InstancedRigidBodies")))return{provider:t.includes("Physics"),body:!1,movingBody:!1};const r=e.memoizedProps&&typeof e.memoizedProps=="object"?e.memoizedProps:{};return{provider:t.includes("Physics"),body:!0,movingBody:r.type!=="fixed"}}function ye(e){const t=e?[e]:[],n=new Set;let r=!1,o=!1,a=!1;for(;t.length>0;){const i=t.pop();if(n.has(i))continue;n.add(i);const s=he(i);r||=s.provider,o||=s.body,a||=s.movingBody,i.child&&t.push(i.child),i.sibling&&t.push(i.sibling)}return r?!o||a:!1}class we extends F.Component{componentDidMount(){this.props.onReport(ye(fe(this)))}render(){return this.props.children??null}}function Ee(e){return e instanceof Error&&e.message.includes("is not part of the THREE namespace")}function L(e){return Ee(e)?!0:e instanceof Error?e.message.includes("Hooks can only be used within the Canvas component")||e.message.includes("useGame: no Game in context"):!1}function rt(e){return L(e)}function I(e){return e instanceof Error&&e.message.includes("useRapier must be used within <Physics")}async function Te(e){try{return(e.packaged?await import("/@id/@react-three/rapier"):await H(()=>import("./react-three-rapier.esm-DyMNYoA_.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]))).Physics}catch{return null}}function Se(e,t,n){const r=globalThis,o=r.reportError,a=typeof o=="function"?o.bind(globalThis):i=>{console.error(i)};r.reportError=i=>{L(i)||t&&I(i)||a(i)};try{return n(e)}finally{r.reportError=o}}function be(e){return{domElement:e,xr:{enabled:!1,addEventListener(){},removeEventListener(){},setAnimationLoop(){},getSession(){return null}},shadowMap:{enabled:!1,type:Y},outputColorSpace:K,toneMapping:J,setPixelRatio(){},setSize(){},setClearColor(){},setClearAlpha(){},setViewport(){},setScissor(){},setScissorTest(){},setAnimationLoop(){},clear(){},render(){},compile(){},dispose(){},getPixelRatio(){return 1},getContext(){return null}}}let O=null;function k(e){return X(()=>e(Pe))}function ge(e){O!==e.extendThree&&(O=e.extendThree,e.extendThree(e.three))}async function Re(e,t={}){return k(n=>n(e,t))}function ve(e){return k(async()=>e.dispose())}async function Pe(e,t={}){const n=z();T=null;const r=n?Date.now():0,o=await me(),a=n?Date.now()-r:0,i=n?Date.now():0;typeof e.load=="function"&&await e.load();const s=n?Date.now()-i:0;try{return await j(o,e,t,void 0,{timed:n,runtimeMs:a,loadMs:s})}catch(l){if(!I(l))throw l;const u=await Te(o);if(!u)throw l;return await j(o,e,t,h=>o.createElement(u,{paused:!1},h),{timed:n,runtimeMs:a,loadMs:s})}}async function j(e,t,n,r,o){ge(e);const a=document.createElement("canvas"),i=Se(a,r===void 0,e.createR3FRoot);let s;const l=new Promise(c=>{s=c});await i.configure({gl:(()=>be(a)),frameloop:"never",size:{width:128,height:96,top:0,left:0},onCreated:c=>s(c)});let u=null,h;const E=new Promise((c,b)=>{h=b}),y=c=>{u??=new Error("mountStoryObject3D: the story threw while reconciling into an R3F root — it does not render `three` content (a DOM/React story), or its component crashed. Original error: "+String(c instanceof Error?c.message:c),{cause:c}),h(u)},d=e.createElement(t,n);let m=!1;const p=c=>{m=c};i.render(e.createElement("group",{name:v},e.createElement(V,{onCaught:y},e.createElement(we,{onReport:p},r?r(d):d))));const w=o?.timed?Date.now():0;let M;const f=await Promise.race([l,E,new Promise((c,b)=>{M=setTimeout(()=>b(new Error("mountStoryObject3D: onCreated did not fire within 10s — the story never reached its first R3F commit and never threw. Either it is still SUSPENDED on a slow load (a suspending loader with no <Suspense> boundary holds the first commit until its content is ready), or its render is hung.")),pe)})]).catch(c=>{throw o?.timed&&(T={runtimeMs:o.runtimeMs,loadMs:o.loadMs,fiberMs:Date.now()-w,settleMs:0}),i.unmount(),c}).finally(()=>clearTimeout(M));if(u)throw i.unmount(),u;f.clock.autoStart=!1,f.clock.stop();const S=f.scene.getObjectByName(v);if(!S)throw i.unmount(),new Error(`mountStoryObject3D: the story's wrapper group ("${v}") is not in the scene after its first commit — the story rendered nothing mountable.`);const A=o?.timed?Date.now()-w:0,B=o?.timed?Date.now():0;await ue({scene:S,update:c=>{f.advance(f.clock.elapsedTime+Math.min(c,.1),!1)},hasPhysicsSubscriber:m}),o?.timed&&(T={runtimeMs:o.runtimeMs,loadMs:o.loadMs,fiberMs:A,settleMs:Date.now()-B});let _=f.clock.elapsedTime;return{root:S,scene:f.scene,advance(c){!(c>0)||!Number.isFinite(c)||(_+=Math.min(c,.1),f.advance(_,!1))},dispose(){i.unmount()}}}async function ot(e,t={}){const n=await Re(e,t.props??{});try{const r=G(n.root,{width:t.width??128,height:t.height??96,...t.camera===void 0?{}:{camera:t.camera},...t.pose===void 0?{}:{pose:t.pose}}),o=r.views.find(a=>a.view==="perspective")??r.views[0];if(!o)throw new Error("Story preview capture returned no views.");return`data:${o.mimeType};base64,${o.base64}`}finally{await ve(n)}}function it(){return typeof WebGLRenderingContext<"u"&&typeof navigator<"u"&&!navigator.userAgent.toLowerCase().includes("jsdom")}export{v as PREVIEW_ROOT_NAME,ot as captureStoryComponentThumbnail,ve as disposeStoryObject3D,rt as isStoryThreeClassificationRefusal,nt as lastStoryMountPhaseTiming,Re as mountStoryObject3D,it as supportsThreeStoryCapture,k as withStoryMountTurn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/spark.module-Byplgb8G.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/Pass-D1MRT672.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as g}from"./index-
|
|
2
|
+
import{_ as g}from"./index-V4J7xfRg.js";import{s as f}from"./user-data-CifDDvSr.js";import{D as T,K as S,M as E}from"./KTX2Loader-CaqVE6nY.js";import{GLTFLoader as L}from"./GLTFLoader-KeoruJgS.js";import{cc as M,eX as v,fo as p,co as I,K as b}from"./three.core-3arARmh6.js";import{createStandardEnvironment as x}from"./environment-Dg-YaLsA.js";let D="/";function w(t){return t.startsWith("/")||t.startsWith("http")||t.startsWith("data:")||t.startsWith("blob:")?t:D+t}const r=new M;r.setURLModifier(w);new v(r);const h=new T(r);h.setDecoderPath("/jsm/libs/draco/gltf/");const _=new S(r);_.setTranscoderPath("/jsm/libs/basis/");const l=new L(r);l.setDRACOLoader(h);l.setKTX2Loader(_);l.setMeshoptDecoder(E);function N(t){return w(t)}const i=new Map;async function z(t,a){let e=i.get(t);!e&&a&&(e=Promise.resolve(a),i.set(t,e)),e||(e=fetch(N(t)).then(async s=>{if(!s.ok)throw new Error(`Failed to load Gaussian splat: ${t} (${s.status} ${s.statusText})`);return new Uint8Array(await s.arrayBuffer())}),i.set(t,e));try{const[{SplatMesh:s},u]=await Promise.all([g(()=>import("./spark.module-Byplgb8G.js"),__vite__mapDeps([0,1,2,3])),e]),o=new s({fileBytes:u,fileName:t,raycastable:!0});await o.initialized,f(o,"gaussianSplat",{src:t,numSplats:o.numSplats});const d=o.getBoundingBox();if(!d.isEmpty()){const m=d.getSize(new p).multiplyScalar(1.5),y=d.getCenter(new p),n=new I(new b(m.x,m.y,m.z));n.name="__volter_splat_bounds",n.position.copy(y),n.visible=!1,n.raycast=()=>{},f(n,"engineInternal",!0),o.add(n)}return o}catch(s){throw i.delete(t),s}}const O=.45,C=.25,c=new WeakMap;function K(t,a){let e=c.get(a);e||(e=x(a),c.set(a,e)),t.environment=e.texture,t.environmentIntensity=O}function V(t){const a=c.get(t);a&&(c.delete(t),a.dispose())}export{C as S,K as a,V as d,l as g,z as l,N as r};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as s}from"./jsx-runtime-DPjLkJKQ.js";import"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{ex as a}from"./index-
|
|
1
|
+
import{a as s}from"./jsx-runtime-DPjLkJKQ.js";import"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{ex as a}from"./index-V4J7xfRg.js";function $({explanation:e,testId:t,style:o}){return e?s.jsx(a,{"data-testid":t,tone:e.tone,title:e.title,description:s.jsx("span",{style:{whiteSpace:"pre-wrap"},children:e.description}),style:{position:"absolute",inset:0,pointerEvents:"none",...o}}):null}function r(e){return e.map(t=>`“${t}”`).join(", ")}function d(e,t){const o=t.map(n=>n.worldId);return{tone:"error",title:o.length===1?`${e} root ${r(o)} failed`:`${o.length} ${e} roots failed`,description:`${t.map(n=>`${n.worldId} (${n.kind}, ${n.identity}): ${n.message}`).join(`
|
|
2
2
|
`)}
|
|
3
3
|
If this followed an edit, Undo (Ctrl+Z) restores the previous source and remounts.`}}function c(e,t){return{tone:"loading",title:t.length===0?`Loading ${e}`:t.length===1?`Loading ${e} root ${r(t)}`:`Loading ${t.length} ${e} roots`,description:t.length===0?"Reading the project declaration to identify the root that belongs here.":`Waiting for ${r(t)} to finish mounting.`}}function u(e,t){return t.length===0?{tone:"neutral",title:`No ${e} root`,description:"No declared root belongs to this surface."}:{tone:"neutral",title:"No renderable content",description:(t.length===1?`Root ${r(t)} mounted successfully but currently produces no renderable content.`:`Roots ${r(t)} mounted successfully but currently produce no renderable content.`)+" If this world builds its content under its game systems, press Play (▶) to run it."}}function m(e){if(e.content==="present")return null;if(e.playSuspended)return{tone:"neutral",title:"Editing paused during Play",description:`${r(e.rootIds)} is running in the Game tab. Press Stop (⏹) to edit it here.`};const t=new Set(e.rootIds),o=(e.failures??[]).filter(i=>t.has(i.worldId));if(o.length>0)return d(e.surface,o);if(e.disclosure)return{tone:"neutral",title:`No ${e.surface} editor for ${r(e.rootIds)}`,description:e.disclosure};const n=(e.readiness??[]).filter(i=>i.state==="waiting"&&t.has(i.rootId)).map(i=>i.rootId),l=n.length>0?n:e.rootIds;return e.phase==="loading"||n.length>0||e.content==="unknown"?c(e.surface,l):u(e.surface,e.rootIds)}export{$ as S,m as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aD as t}from"./index-V4J7xfRg.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";function c(e){if(!e)return{type:null};switch(e.kind){case t.SyntaxKind.StringKeyword:return{type:"string"};case t.SyntaxKind.NumberKeyword:return{type:"number"};case t.SyntaxKind.BooleanKeyword:return{type:"boolean"}}if(t.isUnionTypeNode(e)){const n=[];for(const r of e.types){if(!t.isLiteralTypeNode(r))return{type:null};if(t.isStringLiteral(r.literal))n.push(r.literal.text);else if(t.isNumericLiteral(r.literal))n.push(Number(r.literal.text));else return{type:null}}return n.length>0?{type:"enum",options:n}:{type:null}}return t.isTupleTypeNode(e)&&e.elements.length===3&&e.elements.every(n=>n.kind===t.SyntaxKind.NumberKeyword)?{type:"vec3"}:{type:null}}function y(e,n,r){if(!e||!t.isTypeReferenceNode(e)||!t.isIdentifier(e.typeName)||e.typeArguments&&e.typeArguments.length>0)return e;const s=e.typeName.text,i=f(n,s);if(i)return t.isTypeAliasDeclaration(i)?i.type:e;const a=r.get(s);return a?a.type:e}function m(e,n,r,s){for(const i of e){if(!t.isPropertySignature(i))continue;const a=t.isIdentifier(i.name)||t.isStringLiteral(i.name)?i.name.text:null;a&&n.set(a,{optional:i.questionToken!==void 0,...c(y(i.type,r,s))})}}function f(e,n){for(const r of e.statements)if((t.isTypeAliasDeclaration(r)||t.isInterfaceDeclaration(r))&&r.name.text===n)return r;return null}function p(e,n,r,s,i){if(i>4)return;if(t.isTypeLiteralNode(e)){m(e.members,s,n,r);return}if(t.isIntersectionTypeNode(e)){for(const l of e.types)p(l,n,r,s,i+1);return}if(!t.isTypeReferenceNode(e)||!t.isIdentifier(e.typeName))return;const a=e.typeName.text,o=f(n,a);if(o){t.isTypeAliasDeclaration(o)?p(o.type,n,r,s,i+1):m(o.members,s,n,r);return}const u=r.get(a);u&&p(u.type,u.sf,new Map,s,i+1)}function x(e,n){const r=e.getText(n);if(t.isStringLiteral(e)||t.isNoSubstitutionTemplateLiteral(e))return{defaultText:r,defaultValue:e.text};if(t.isNumericLiteral(e))return{defaultText:r,defaultValue:Number(e.text)};if(t.isPrefixUnaryExpression(e)&&e.operator===t.SyntaxKind.MinusToken&&t.isNumericLiteral(e.operand))return{defaultText:r,defaultValue:-Number(e.operand.text)};if(e.kind===t.SyntaxKind.TrueKeyword)return{defaultText:r,defaultValue:!0};if(e.kind===t.SyntaxKind.FalseKeyword)return{defaultText:r,defaultValue:!1};if(t.isArrayLiteralExpression(e)){const s=[];for(const i of e.elements)if(t.isNumericLiteral(i))s.push(Number(i.text));else if(t.isPrefixUnaryExpression(i)&&i.operator===t.SyntaxKind.MinusToken&&t.isNumericLiteral(i.operand))s.push(-Number(i.operand.text));else return{defaultText:r};return{defaultText:r,defaultValue:s}}return{defaultText:r}}function N(e){return t.isFunctionDeclaration(e)&&e.name&&e.parameters[0]?{name:e.name.text,parameter:e.parameters[0]}:t.isVariableDeclaration(e)&&t.isIdentifier(e.name)&&e.initializer&&(t.isArrowFunction(e.initializer)||t.isFunctionExpression(e.initializer))&&e.initializer.parameters[0]?{name:e.name.text,parameter:e.initializer.parameters[0]}:null}function V(e,n){const r=new Map,s=i=>{const a=N(i);if(a&&/^[A-Z]/.test(a.name)&&!r.has(a.name)){const o=b(a.parameter,e,n);o.length>0&&r.set(a.name,o)}(t.isSourceFile(i)||t.isVariableStatement(i)||t.isVariableDeclarationList(i))&&t.forEachChild(i,s)};return s(e),r}function b(e,n,r){const s=new Map;if(t.isObjectBindingPattern(e.name))for(const a of e.name.elements){if(a.dotDotDotToken)continue;const o=a.propertyName??a.name;!t.isIdentifier(o)||!a.initializer||s.set(o.text,x(a.initializer,n))}const i=new Map;if(e.type&&p(e.type,n,r,i,0),i.size>0){const a=[];for(const[o,u]of i){const l=s.get(o);a.push({name:o,type:u.type,...u.options?{options:u.options}:{},optional:u.optional||l!==void 0,...l??{}})}return a}return[...s].map(([a,o])=>({name:a,type:null,optional:!0,...o}))}export{V as localComponentPropSpecs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{am as d,an as k,ao as b,ap as N}from"./index-V4J7xfRg.js";import{r as m}from"./collaboration-presence-DcPhahtF.js";import{e as v,j as P,m as I}from"./game-network-CAH_Jsh6.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./native-debug-module-JJOFtIVz.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-xQJcVubm.js";import"./contract-system-adapters-rVGdworX.js";import"./game-contract-seams-DrYyE5PX.js";import"./seeded-random-tpdJjdqy.js";import"./game-audio-BeCyd0Ha.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./events-156d8d12.esm-CYeuVCYr.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./index-bQE2NA0D.js";import"./live-project-verbs-CnknlUlT.js";import"./capability-coverage-wd6bAhv3.js";import"./edit-mode-authoring-CSt3zzmS.js";import"./json-history-resource-CH2nzMZh.js";import"./binding-resolver-DUz8C8Fs.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-u0mnjXU9.js";import"./canvas-entry-runtime-DskaohHK.js";import"./three-ingest-runtime-BnRF_nJN.js";import"./EffectComposer-BEAt0PtQ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-DTnDQXm0.js";import"./Pass-D1MRT672.js";import"./CSS3DRenderer-BsAqfavI.js";import"./relative-path-guard-GiM7Lsz8.js";import"./react-root-BHA-cdrW.js";import"./editor-presentation-activity-CqJH4G9t.js";import"./active-ingest-D_ryI_R4.js";import"./ingest-source-persistence-CQOJeGhj.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-DJLpUuf0.js";import"./mounted-authoring-C47L5H5t.js";import"./entity-object-V13bGmay.js";import"./user-data-CifDDvSr.js";import"./workspace-arrangement-B_OcbQbj.js";import"./three-contract-Dkt6PmWY.js";import"./three-BQfhEwUz.js";import"./editor-layers-CjeYrUlm.js";import"./component-instance-root-Cw_-ajBX.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-COBwREQO.js";import"./source-persistence-backend-uyd6NiWD.js";import"./three-projection-core-PQm-CO61.js";import"./body-marks-C1LxJtQb.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./structural-ids-BOo2BRoY.js";import"./object3d-authoring-subject-XccsO0xG.js";import"./r3f-physics-binding-DZSIB0d_.js";import"./deferred-ingest-play-CEnsC3uN.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-OR1SW2jI.js";import"./board-guides-B6TEPOPi.js";import"./relative-import-specifier-DXWVQf0o.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-DiSjB-N1.js";import"./inference-diagnostics-DoZQ1mpg.js";import"./writer-tw6EcuVO.js";import"./three-state-C7khRIQE.js";import"./editor-shell-store-DckLm6m8.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-BCXEYmon.js";import"./game-surface-defaults-D8S4cRxi.js";const Yt="workspace.service";function Zt(){let i=null;const p=new Set;let e=null,n=null,a=d();const l=()=>{e?.(),e=null,n?.(),n=null,a=null},y=k(u=>{const w=u.participants.find(r=>r.participantId===b)?.capabilities.includes("test")??!1,t=u.activePlaytest,s=I();if(!w||!t){i=null,l(),m({playtest:null}),s?.mode==="team"&&P(),t||p.clear();return}s?.mode==="team"&&s.id===t.id||i!==t.id&&(p.has(t.id)||(i=t.id,m({playtest:{id:t.id,play:"starting",networking:"connecting",roomName:null,problem:null}}),v(t.seed,{mode:"team",id:t.id,roomKey:t.roomKey,revision:t.revision,participantId:b}).then(()=>{if(i!==t.id)return;l();const r=()=>{const o=d(),c=o?.getConnectionState?.(),f=o?.getRoomInfo?.();m({playtest:{id:t.id,play:"ready",networking:o?c==="connected"&&f?"ready":c==="error"?"error":"connecting":"not-declared",roomName:f?.roomName??null,problem:c==="error"?"The game networking adapter reported an error.":null}})},g=()=>{const o=d();o!==a&&(e?.(),a=o,e=o?.subscribe(r)??null),r()};n=N(g),g()}).catch(r=>{i===t.id&&(i=null,p.add(t.id),m({playtest:{id:t.id,play:"error",networking:"error",roomName:null,problem:r instanceof Error?r.message:String(r)}}))})))});return()=>{l(),y()}}export{Yt as point,Zt as start};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isInEditorOwnedSubtree as V,isEditorOwnedObject as P}from"./editor-layers-
|
|
1
|
+
import{isInEditorOwnedSubtree as V,isEditorOwnedObject as P}from"./editor-layers-CjeYrUlm.js";import{g as k}from"./user-data-CifDDvSr.js";import{b as E,c as S}from"./component-instance-root-Cw_-ajBX.js";import{n as K,e as $,s as A}from"./entity-object-V13bGmay.js";import{s as W}from"./viewport-editor-controls-BYaAZ_Ku.js";import{fd as z,e6 as G,B as U}from"./three.core-3arARmh6.js";function q(n){const t=k(n,"constraints");return Array.isArray(t)?t.filter(e=>!!e&&typeof e=="object"&&typeof e.getSnapshot=="function"&&!!e.config):[]}const M="ingest:camera",J=1<<31;function Q(n){return(n.layers.mask&J)!==0}function Y(n,t){const e=new Map;let r=0,s=0,f=0;const u=(i,c)=>{const o=`ingest:${c}:${i.type}:${i.name||""}`;e.set(o,i),r++,i.isLight?f++:i.isMesh&&s++,d(i,c)},d=(i,c)=>{let o=0;for(const h of i.children)Q(h)||(u(h,c?`${c}/${o}`:`${o}`),o++)};return d(n,""),t&&(e.set(M,t),r++),{byId:e,count:r,meshes:s,lights:f}}function Z(n){const t=k(n,"authoringSubject");return t&&typeof t.label=="string"&&typeof t.kind=="string"?t:null}function X(n){const t=k(n,"reflectionProbe");if(!t||typeof t!="object")return null;const e=t;return e.config&&typeof e.recapture=="function"&&typeof e.getSnapshot=="function"?t:null}let D=null;function ht(n){D=n,W(n?.editorControls??null)}function tt(){return D}function C(n){return n.depthWrite===!1&&n.side===U}function et(n){const t=n.material;return t?Array.isArray(t)?t.length>0&&t.every(C):C(t):!1}function L(n,t,e,r=()=>!1,s){const f=tt();if(!f)return[];const u=f.canvas.getBoundingClientRect();if(u.width<=0||u.height<=0||!Number.isFinite(t)||!Number.isFinite(e)||t<u.left||e<u.top||t>=u.left+u.width||e>=u.top+u.height)return[];const d=new z((t-u.left)/u.width*2-1,-((e-u.top)/u.height)*2+1),i=new G;i.layers.enableAll(),i.setFromCamera(d,f.camera);const c=new Set(s?.objects??n.objectMap.values()),o=[...c].filter(b=>{for(let I=b.parent;I;I=I.parent)if(c.has(I))return!1;return!0});for(const b of o)b.traverse(I=>{const m=I;m.isSkinnedMesh&&(m.boundingBox=null,m.boundingSphere=null)});const h=i.intersectObjects(o,!0),p=[],v=new Set;for(const b of h){if(V(b.object)||et(b.object))continue;let I=b.object,m=null;if(s)for(;I&&m===null;)m=s.idForObject3D(I),I=I.parent;else{const a=K(I);m=a?$(a)??null:null}m!==null&&!r(m)&&!v.has(m)&&(v.add(m),p.push(m))}return nt(p,o,h.length,t,e),p}function nt(n,t,e,r,s){n.length>0||r===0&&s===0||console.info(`[viewport-pick] click selected nothing (candidates ${t.length}, rayHits ${e}, resolvedIds 0)`)}function st(n,t,e,r=()=>!1,s){return L(n,t,e,r,s)[0]??null}const R={count:0,meshes:0,lights:0,instancedMeshes:0,instances:0};let x=0;function H(n){let t=0,e=0;for(const r of n.values()){const s=r.object;s.isInstancedMesh&&(t++,e+=typeof s.count=="number"?s.count:0)}return{instancedMeshes:t,instances:e}}function F(n){let t=0,e=0;for(const r of n.values()){const s=r.object;s.isLight?e++:s.isMesh&&t++}return{count:n.size,meshes:t,lights:e,...H(n)}}function T(n,t){const e=new Map,r=[],s=t.skip??P;t.begin?.(n);const f=(u,d,i,c)=>{if(s(u))return;const o=t.identify(u,{path:d,ownerId:i,ownedByAncestor:c});o!==null&&(A(u,o),e.set(o,{object:u,id:o,parentId:i,childIds:[]}),i===null?r.push(o):e.get(i)?.childIds.push(o));const h=c||o!==null;u.children.forEach((p,v)=>{f(p,[...d,v],o??i,h)}),t.leave?.(u,o)};return n.children.forEach((u,d)=>{f(u,[d],null,!1)}),{nodes:e,rootIds:r,stats:F(e)}}const it="r3f:";function O(n,t){return`${it}${n}:${t}`}function rt(n){const t=new Map,e=new Map,r=(d,i)=>d===i||d.startsWith(`${i}#`)&&/^\d+$/u.test(d.slice(i.length+1)),s=d=>{e.clear();const i=c=>{if(P(c))return;const o=E(c),h=$(c);if(o!==void 0&&h!==void 0){const p=O(n,o);r(h,p)&&!e.has(h)&&e.set(h,c)}for(const p of c.children)i(p)};for(const c of d.children)i(c)},f=(d,i)=>{const c=$(d);if(c===void 0||i===void 0)return c;const o=O(n,i);return r(c,o)?e.get(c)===d?c:void 0:c},u=(d,i)=>{const c=O(n,i);let o=t.get(i)??0,h=S(c,o);for(;e.has(h);)o+=1,h=S(c,o);return t.set(i,o+1),e.set(h,d),h};return{begin:d=>{t.clear(),s(d)},identify:(d,i)=>{const c=E(d),o=f(d,c);if(o!==void 0)return o;const h=c===void 0?void 0:u(d,c);return h!==void 0||!i.ownedByAncestor||k(d,"authoringRoot")===!0?h??`live:${n}:${x++}`:null}}}function N(n,t){return T(n,rt(t))}function pt(n,t){const{nodes:e}=N(n,t),r=new Map;for(const[s,f]of e)r.set(s,f.object);return r}function yt(n,t={}){const e=t.camera;return{incremental:{kind:"live-oid",worldId:n},project:r=>{const s=N(r,n);return!e||[...s.nodes.values()].some(f=>f.object===e)?s:(A(e,M),s.nodes.set(M,{object:e,id:M,parentId:null,childIds:[]}),s.rootIds.push(M),{...s,stats:{...s.stats,count:s.nodes.size}})}}}function gt(n={}){const t=n.camera;return{project:e=>{const r=Y(e,t),s=new Map;for(const[d,i]of r.byId)s.set(i,d);const f=new Map,u=[];for(const[d,i]of r.byId){const c=i.parent,o=(c&&c!==e?s.get(c):void 0)??null,h=i.children.map(p=>s.get(p)).filter(p=>p!==void 0);f.set(d,{object:i,id:d,parentId:o,childIds:h}),o===null&&u.push(d)}return{nodes:f,rootIds:u,stats:{count:r.count,meshes:r.meshes,lights:r.lights,...H(f)}}}}}function It(n){let t=new Map,e=new Map;return{get instanceRoots(){return t},get representatives(){return e},project:r=>{const s=new Map,f=new Map,u=new Map,d=new Set,i=new Map,c=T(r,{identify:(o,h)=>{const p=E(o);if(p===void 0)return O(n,`@${h.path.join(".")}`);const v=s.get(p)??0;return s.set(p,v+1),v===0&&u.set(p,o),d.has(p)||(f.set(p,(f.get(p)??0)+1),d.add(p),i.set(o,p)),S(O(n,p),v)},leave:o=>{const h=i.get(o);h!==void 0&&(d.delete(h),i.delete(o))}});return t=f,e=u,c}}}function mt(n){return{project:t=>T(t,{skip:e=>!!k(e,"editorHelper")||e.isSkeletonHelper===!0,identify:(e,r)=>`source-object:${n}:${r.path.join(".")}`})}}function vt(n){const t=Z(n);return t?t.kind:q(n).length>0?"constraint-owner":X(n)?"reflection-probe":n.isSkinnedMesh?"skinned-mesh":n.isBone?"bone":n.isLight?"light":n.isCamera?"camera":n.type==="Audio"||n.type==="PositionalAudio"||n.type==="AudioListener"?"audio":n.isMesh?"mesh":n.children.length>0?"group":"object"}function ot(n,t){for(let e=n.parent;e!==null;e=e.parent)if(e===t)return!0;return!1}function _(n,t){if(n===t)return!0;for(let e=n.parent;e!==null;e=e.parent)if(e===t)return!0;return!1}class wt{constructor(t,e={}){this.identity=t,this.options=e}nodesById=new Map;objectsById=new Map;idsByObjectIndex=new Map;roots=[];walkStats=R;project(t){if(!t)return this.nodesById=new Map,this.objectsById=new Map,this.idsByObjectIndex=new Map,this.roots=[],this.walkStats=R,this.walkStats;const{nodes:e,rootIds:r,stats:s}=this.identity.project(t);return this.nodesById=e,this.objectsById=new Map([...e].map(([f,u])=>[f,u.object])),this.idsByObjectIndex=new Map([...e].map(([f,u])=>[u.object,f])),this.roots=r,this.walkStats=s,s}projectSubtrees(t,e){const r=this.identity.incremental;if(t===null||r?.kind!=="live-oid")return null;const s=e.filter((a,l)=>e.indexOf(a)===l&&!e.some(y=>y!==a&&ot(a,y))),f=this.roots,u=new Set,d=new Set,i=new Set;for(const a of s)a.traverse(l=>{const y=this.idsByObjectIndex.get(l);if(y===void 0)return;const g=this.nodesById.get(y);g?.parentId!==null&&g?.parentId!==void 0&&i.add(g.parentId),u.add(y),this.nodesById.delete(y),this.objectsById.delete(y),this.idsByObjectIndex.delete(l)});const c=P,o=(a,l)=>{const y=this.objectsById.get(a);return y===void 0||y===l},h=(a,l)=>{const y=$(a);if(y!==void 0&&o(y,a))return y;const g=E(a);if(g!==void 0){const w=O(r.worldId,g);let B=0,j=S(w,B);for(;!o(j,a);)j=S(w,++B);return j}if(!l||k(a,"authoringRoot")===!0){let w=`live:${r.worldId}:${x++}`;for(;!o(w,a);)w=`live:${r.worldId}:${x++}`;return w}return null},p=(a,l,y)=>{if(c(a))return;const g=h(a,y);g!==null&&(A(a,g),this.nodesById.set(g,{object:a,id:g,parentId:l,childIds:[]}),this.objectsById.set(g,a),this.idsByObjectIndex.set(a,g),d.add(g),l!==null&&i.add(l));const w=g??l,B=y||g!==null;for(const j of a.children)p(j,w,B)};for(const a of s){if(!_(a,t))continue;let l=a.parent,y=null;for(;l!==null&&l!==t;){const g=this.idsByObjectIndex.get(l);if(g!==void 0){y=g;break}l=l.parent}p(a,y,y!==null)}const v=a=>{const l=[],y=g=>{if(c(g))return;const w=this.idsByObjectIndex.get(g);if(w!==void 0){l.push(w);return}for(const B of g.children)y(B)};for(const g of a.children)y(g);return l};for(const a of i){const l=this.nodesById.get(a);l!==void 0&&l.childIds.splice(0,l.childIds.length,...v(l.object))}for(const a of d){const l=this.nodesById.get(a);l!==void 0&&l.childIds.splice(0,l.childIds.length,...v(l.object))}const b=v(t),I=this.roots.filter(a=>{const l=this.objectsById.get(a);return l!==void 0&&!_(l,t)&&!u.has(a)});this.roots=[...b,...I],this.walkStats=F(this.nodesById);const m=f.length!==this.roots.length||f.some((a,l)=>a!==this.roots[l]);return{removedIds:u,addedIds:d,changedParentIds:i,rootsChanged:m}}get nodes(){return this.nodesById}get objects(){return this.objectsById}get idsByObject(){return this.idsByObjectIndex}get rootIds(){return this.roots}get stats(){return this.walkStats}node(t){return this.nodesById.get(t)??null}rootNodes(){return this.roots.map(t=>this.nodesById.get(t)).filter(t=>t!==void 0)}objectOf(t){return this.objectsById.get(t)??null}idOf(t){return this.idsByObjectIndex.get(t)??null}childIdsOf(t){const e=[];for(const r of t){const s=this.idsByObjectIndex.get(r);s!==void 0&&e.push(s)}return e}objectMapSnapshot(){return new Map(this.objectsById)}pick(t,e,r,s){return st(t,e,r,s,this.pickProjection())}candidates(t,e,r,s){return L(t,e,r,s,this.pickProjection())}pickProjection(){if(this.options.pickScope!=="store-object-map")return{objects:this.objectsById.values(),idForObject3D:t=>this.idOf(t)}}}export{wt as T,yt as a,gt as b,It as c,mt as d,q as e,ht as f,vt as n,Z as o,X as r,pt as s};
|