@volter/game-editor 0.5.68 → 0.5.69
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 +10954 -5077
- package/LICENSE +1 -1
- package/LICENSE-BLENDER +2 -2
- package/NOTICE +2 -2
- package/additions/canvas/package.json +8 -0
- package/additions/canvas/src/canvas-mount.ts +46 -0
- package/additions/canvas/src/scene2d.tsx +18 -0
- package/catalog/entries/bake.json +1 -1
- package/catalog/entries/blender.json +3 -3
- package/catalog/entries/music.json +5 -5
- package/catalog/project-source/LICENSE +1 -1
- package/catalog/project-source/src/contributions/bake.kind.ts +2 -2
- package/catalog/project-source/src/contributions/builder-document.tsx +1 -1
- package/catalog/project-source/src/contributions/builder-ui.tsx +3 -3
- package/catalog/project-source/src/contributions/module-source.ts +4 -4
- package/catalog/project-source/src/lib/reflections/volume-reflection-material.ts +59 -59
- package/catalog/project-source/src/lib/static-batch/Frozen.tsx +1 -1
- package/catalog/project-source/src/lib/static-batch/mutation-watch.ts +1 -1
- package/catalog/project-source/src/tools/bake-preview.tool.ts +9 -9
- package/dist/.vite/manifest.json +3999 -3999
- package/dist/assets/{AssetBudgetPanel-P2PeL_X5.js → AssetBudgetPanel-BMR3AQhc.js} +4 -4
- package/dist/assets/AudioViewer-DESxi7pU.js +1 -0
- package/dist/assets/{CanvasBoardDocument-BFJdTVGp.js → CanvasBoardDocument-Q_nrYFlB.js} +1 -1
- package/dist/assets/CanvasSceneViewport-WZMoKy_F.js +1 -0
- package/dist/assets/ColorInput-C2EK-OnD.js +1 -0
- package/dist/assets/{EntityModelDocument-Du8wIbyK.js → EntityModelDocument-B_4ENTCq.js} +1 -1
- package/dist/assets/{EnvironmentAssetDocument-_SttfMY_.js → EnvironmentAssetDocument-BZBp6OFJ.js} +1 -1
- package/dist/assets/{GameplaySessionTimeline-CWudWnfd.js → GameplaySessionTimeline-1ivaucpv.js} +1 -1
- package/dist/assets/ImageViewer-D16OExYu.js +1 -0
- package/dist/assets/{InspectorCanvasPreview-CEr_Kxna.js → InspectorCanvasPreview-BrFjhoiD.js} +1 -1
- package/dist/assets/InspectorObjectPreview-CY5xVsPR.js +1 -0
- package/dist/assets/JsonAssetDocument-CvjTlcdr.js +2 -0
- package/dist/assets/{LiveModuleDocument-BWjOzO_6.js → LiveModuleDocument-ne1o9giX.js} +1 -1
- package/dist/assets/{LutAssetDocument-DIc6nsht.js → LutAssetDocument-Cp0v-O7q.js} +1 -1
- package/dist/assets/{ModelAssetDocument-_CqTsX_A.js → ModelAssetDocument-Ceu7OIN9.js} +1 -1
- package/dist/assets/{NonThreeAuthoringBootstrap-C-V23E1e.js → NonThreeAuthoringBootstrap-DiElZf-e.js} +1 -1
- package/dist/assets/Object3DDocumentToolbar-BLNamqii.js +1 -0
- package/dist/assets/Object3DDocumentViewport-D6QoHfa_.js +2 -0
- package/dist/assets/{Object3DPreview-BPHEr3vI.js → Object3DPreview-ZVokr044.js} +1 -1
- package/dist/assets/OnlineAssetDetail-Dnckd7zB.js +1 -0
- package/dist/assets/PlayBar-DsMitSgy.js +1 -0
- package/dist/assets/{QuarksAssetDocument-4Dne3EHx.js → QuarksAssetDocument-B5J8uHFM.js} +1 -1
- package/dist/assets/ReactCanvasControls-CmfvxJYY.js +1 -0
- package/dist/assets/RootSelectionOverlay-BWsNiSuM.js +1 -0
- package/dist/assets/{ShaderAssetDocument-W3ZjLCkt.js → ShaderAssetDocument-CT7XzsZq.js} +4 -4
- package/dist/assets/ShadowEditor-YO5KEfnz.js +1 -0
- package/dist/assets/{SourceAssetViewer-BGUeDAEv.js → SourceAssetViewer-FSLup2km.js} +1 -1
- package/dist/assets/StageHost-DYfGYwvq.js +2 -0
- package/dist/assets/{StoryPreviewMount-Di8uMovM.js → StoryPreviewMount-BhvT5QlB.js} +1 -1
- package/dist/assets/ThreeBoardDocument-B-z2nwnH.js +2 -0
- package/dist/assets/{ThreeIsolationSceneContent-BAKurKW5.js → ThreeIsolationSceneContent-B5pU4Y6k.js} +1 -1
- package/dist/assets/{ToolObject3DPreview-CffvGJ1h.js → ToolObject3DPreview-VtraiQ4Q.js} +1 -1
- package/dist/assets/Toolbar-M62Gob9T.js +1 -0
- package/dist/assets/{TransientHint-CgmkrmKF.js → TransientHint-Cc40mHWE.js} +1 -1
- package/dist/assets/VideoViewer-BxcUwXQm.js +1 -0
- package/dist/assets/ViewportShadingMenu-BoMPnTVh.js +1 -0
- package/dist/assets/active-ingest-0QjJWb7i.js +3 -0
- package/dist/assets/{animation-clock-fLmY_3--.js → animation-clock-BXEwUJtz.js} +1 -1
- package/dist/assets/animation-mixers.service-C-Ko4KzM.js +1 -0
- package/dist/assets/animation-timeline.utility-Bl15-rYb.js +1 -0
- package/dist/assets/{asset-budget-asset.menu-BDRDWrvx.js → asset-budget-asset.menu-BUa3g0Wy.js} +1 -1
- package/dist/assets/{asset-budget.action-tQmNGQHC.js → asset-budget.action-Dl5eVPIo.js} +1 -1
- package/dist/assets/{asset-budget.document-BthgX37Z.js → asset-budget.document-DJylQ-0h.js} +1 -1
- package/dist/assets/{asset-budget.menu-DfyWVH6p.js → asset-budget.menu-BJtvNMLj.js} +1 -1
- package/dist/assets/asset-editor-persistence-BIbf5u0Q.js +1 -0
- package/dist/assets/asset-loaders-DoNflsHL.js +2 -0
- package/dist/assets/{asset-preview-Cv7tfD98.js → asset-preview-DxlSdRZn.js} +1 -1
- package/dist/assets/{audio-unlock.service-BvHvZjzx.js → audio-unlock.service-CTaiyXF9.js} +1 -1
- package/dist/assets/audio.utility-CEmNc68t.js +1 -0
- package/dist/assets/autoplay.service-BZLSUyL8.js +1 -0
- package/dist/assets/{babylon-authoring-adapter-Cg5ALSpr.js → babylon-authoring-adapter-BZvV2bz_.js} +1 -1
- package/dist/assets/binding-resolver-DGbk9_XR.js +2 -0
- package/dist/assets/blender-emscripten-engine-B7lfg-RX.js +2 -0
- package/dist/assets/{blender-node-editor.document-B92MO51u.js → blender-node-editor.document-wXJobGNH.js} +1 -1
- package/dist/assets/{blender-properties-tab-CDVyDAbf.js → blender-properties-tab-7GFf80ev.js} +1 -1
- package/dist/assets/{blender-runtime-host-CuniE0sy.js → blender-runtime-host-CILxrx5T.js} +2 -2
- package/dist/assets/{blender-runtime-skin-B_tOz5j5.js → blender-runtime-skin-Cd5lQYsC.js} +7 -7
- package/dist/assets/{blender-runtime.document-DxUwLiEW.js → blender-runtime.document-C0r_R49S.js} +7 -7
- package/dist/assets/{blender-timeline.document-BdEEoQbK.js → blender-timeline.document-BaISZMBc.js} +1 -1
- package/dist/assets/{blender-uv-editor.document-EMSUlRh4.js → blender-uv-editor.document-CT_fsyyA.js} +1 -1
- package/dist/assets/blender-version.status-DzEx7u7k.js +1 -0
- package/dist/assets/blender-wali-engine-DOiQCBXH.js +2 -0
- package/dist/assets/{blender.command-BkBML2SY.js → blender.command-DdiKd8mZ.js} +1 -1
- package/dist/assets/blender.status-BMETIbb2.js +1 -0
- package/dist/assets/board-guides-CjHQ9Ynm.js +1 -0
- package/dist/assets/body-marks-C1LxJtQb.js +1 -0
- package/dist/assets/{bridge.command-VnplZ81v.js → bridge.command-DXUeavn5.js} +3 -3
- package/dist/assets/{browserAll-BCmkqg8n.js → browserAll-Dg46xT22.js} +1 -1
- package/dist/assets/{build-player.document-DV7YcJQt.js → build-player.document-BHwVV3K0.js} +1 -1
- package/dist/assets/build-profiles.document-HkpS-Kxa.js +2 -0
- package/dist/assets/build-progress.status-u1J0Rm1D.js +1 -0
- package/dist/assets/{build-session-BGe0eGrQ.js → build-session-BLboUUbw.js} +2 -2
- package/dist/assets/{build.action-Bdj4ZEL_.js → build.action-C00DL83N.js} +1 -1
- package/dist/assets/{build.command-DAWiYvPa.js → build.command-Cjk_NY75.js} +1 -1
- package/dist/assets/build.header-BWNmNWFT.js +1 -0
- package/dist/assets/{build.menu-BiRNC_xc.js → build.menu-BBYtqCIq.js} +1 -1
- package/dist/assets/{build.service-Dw9K6VSF.js → build.service-DOU15tKN.js} +1 -1
- package/dist/assets/{camera-C-qXzXFf.js → camera-7DGyYW7Y.js} +1 -1
- package/dist/assets/{camera-runtime.inspector-BDrwWRlU.js → camera-runtime.inspector-n-jiOR-3.js} +1 -1
- package/dist/assets/{canvas-design-mount-DLn49Zle.js → canvas-design-mount-CSRHU-ag.js} +4 -4
- package/dist/assets/canvas-entry-runtime-BST8yRuK.js +2 -0
- package/dist/assets/{canvas-preview-frames-B5xFRjhQ.js → canvas-preview-frames-Cja32aW2.js} +1 -1
- package/dist/assets/{canvas-story-capture.service-DQ_leYyi.js → canvas-story-capture.service-D5R5HJ8n.js} +2 -2
- package/dist/assets/capability-coverage-ByWftxk4.js +7 -0
- package/dist/assets/{collaboration-presence-BOS1t8wI.js → collaboration-presence-D6MC9xJN.js} +1 -1
- package/dist/assets/{collider-Bf4Uk6LW.js → collider-B78EcUc9.js} +1 -1
- package/dist/assets/{component-board.service-DFSSCaCf.js → component-board.service-BaQI5Oas.js} +2 -2
- package/dist/assets/component-board.service-CkjrsD8x.js +2 -0
- package/dist/assets/{component-board.service-CpVXGhz5.js → component-board.service-Dvjz_g-x.js} +2 -2
- package/dist/assets/component-contracts.service-C3-AXQp7.js +1 -0
- package/dist/assets/component-instance-root-DLI40MiB.js +1 -0
- package/dist/assets/{component-verbs.command-DGzZAV_Z.js → component-verbs.command-Brr_WcaR.js} +1 -1
- package/dist/assets/{component-verbs.service-D1rVRogp.js → component-verbs.service-DC2sC3j3.js} +1 -1
- package/dist/assets/{config-D-EAAhqP.js → config-BI_7osdR.js} +4 -4
- package/dist/assets/{configurations-_HZOWZPy.js → configurations-XP9YLkrt.js} +1 -1
- package/dist/assets/connection.status-BhRwcFx0.js +1 -0
- package/dist/assets/{constraint-5KLYpGm7.js → constraint-Bp1l8hY-.js} +1 -1
- package/dist/assets/constraints.inspector-Dm1cycK3.js +1 -0
- package/dist/assets/{content-bounds-DKBD7nsv.js → content-bounds-DROIchTa.js} +1 -1
- package/dist/assets/{contract-system-adapters-h6OUBRYA.js → contract-system-adapters-Cn7OW_ay.js} +1 -1
- package/dist/assets/coverage.service-l42ty7lr.js +3 -0
- package/dist/assets/{create-runtime-Bg2uYMfh.js → create-runtime-B_uTwsmi.js} +2 -2
- package/dist/assets/curve-THOUsg-j.js +1 -0
- package/dist/assets/{data-asset-7Nfmx-28.js → data-asset-DAANayR6.js} +1 -1
- package/dist/assets/data-check-core-CHqar_E8.js +1 -0
- package/dist/assets/data-ref-CN34UeVw.js +1 -0
- package/dist/assets/debug-bridge-BD1XVAIB.js +1 -0
- package/dist/assets/debug-registry-ggQWxtu-.js +1 -0
- package/dist/assets/{deferred-ingest-play-Bej67_y9.js → deferred-ingest-play-B2JUlwlT.js} +2 -2
- package/dist/assets/{design-time-canvas-mount-CFW9ZWuk.js → design-time-canvas-mount-as9cN9I6.js} +2 -2
- package/dist/assets/design-time-layers-BRseeSmV.js +1 -0
- package/dist/assets/{design-time-mount.service-DJeAPUB_.js → design-time-mount.service-BTVu3yKo.js} +2 -2
- package/dist/assets/{design-time-mount.service-_R1UDCw3.js → design-time-mount.service-DKvc7lVK.js} +2 -2
- package/dist/assets/design-time-react-mount-C7rB56QD.js +1 -0
- package/dist/assets/{document-preview-three-5cbuuJMH.js → document-preview-three-CxmRhCcV.js} +1 -1
- package/dist/assets/{dom-authoring-adapter-CoESNvrM.js → dom-authoring-adapter-L8OzXfmE.js} +1 -1
- package/dist/assets/{draco3d-Sk9K4AUT.js → draco3d-BjNuXv66.js} +1 -1
- package/dist/assets/{edit-mode-audio.service-CH6J-8N7.js → edit-mode-audio.service-BwI5u845.js} +1 -1
- package/dist/assets/edit-mode-authoring-D5f7aHHl.js +1 -0
- package/dist/assets/{edit-mode-networking.service-C4o2pGHX.js → edit-mode-networking.service-DqP_4lbI.js} +1 -1
- package/dist/assets/editor-api-BM7H_F4G.js +1 -0
- package/dist/assets/{editor-layers-B4oYfpj8.js → editor-layers-D-CTUqco.js} +1 -1
- package/dist/assets/editor-presentation-activity-CqJH4G9t.js +1 -0
- package/dist/assets/{editor-shell-store-Bh1S7M54.js → editor-shell-store-DHVWS8cE.js} +1 -1
- package/dist/assets/{entity-object-B_5Gc0Ky.js → entity-object-MKYemTFM.js} +1 -1
- package/dist/assets/{extend-DcEyE5jI.js → extend-BrgqZiMY.js} +1 -1
- package/dist/assets/{fork-menu-CKjNh3MO.js → fork-menu-DE2MK3Nq.js} +1 -1
- package/dist/assets/{frame-debugger-store-D5YViF_8.js → frame-debugger-store-BXoLKTdZ.js} +1 -1
- package/dist/assets/game-audio-BeCyd0Ha.js +1 -0
- package/dist/assets/{game-contract-seams-C0AVYwvO.js → game-contract-seams-tyKDsfaP.js} +1 -1
- package/dist/assets/{game-css-scope-transform-8GOvVu1s.js → game-css-scope-transform-DcjrwtVc.js} +2 -2
- package/dist/assets/game-document.service-CTb2itHQ.js +1 -0
- package/dist/assets/{game-eval.command-4wa9vqWE.js → game-eval.command-CpDKXOQU.js} +2 -2
- package/dist/assets/game-module-access-BTInp2NG.js +1 -0
- package/dist/assets/game-network-DW5ARz4R.js +22 -0
- package/dist/assets/{gameplay-export-K5AcStVC.js → gameplay-export-cHk3v9y-.js} +1 -1
- package/dist/assets/gameplay-replay-HRenPTtU.js +1 -0
- package/dist/assets/{gameplay.command-DoWqBWhH.js → gameplay.command-DcY2lKKX.js} +1 -1
- package/dist/assets/generation-CdOATubd.css +1 -0
- package/dist/assets/{generation-jobs-CiabIfR0.js → generation-jobs-CJBehuUp.js} +1 -1
- package/dist/assets/generation.service-BMOc-C9i.js +1 -0
- package/dist/assets/{generations-DU9rCeQR.js → generations-ssgVOe_6.js} +1 -1
- package/dist/assets/generations.status-B_SmPReI.js +1 -0
- package/dist/assets/hierarchy-marks-BuCO8Ke-.js +1 -0
- package/dist/assets/hierarchy-marks-CsTaTkc7.js +1 -0
- package/dist/assets/hosted-asset-materialization-CiXZI85V.js +2 -0
- package/dist/assets/{ibl-override-material-CiKkaOTW.js → ibl-override-material-CMo_a49U.js} +1 -1
- package/dist/assets/index-B0S4fQQV.js +1 -0
- package/dist/assets/{index-Kb9_s5aP.js → index-B9bd4k-t.js} +1 -1
- package/dist/assets/index-BMxv2MNV.js +1 -0
- package/dist/assets/{index-CC1puVjo.js → index-Bm4_DmRO.js} +1 -1
- package/dist/assets/{index-BsYc2Oyj.js → index-BvBlIRwM.js} +1 -1
- package/dist/assets/{index-C4AUQbmq.js → index-BweKDdi_.js} +1 -1
- package/dist/assets/{index-CaG87ZF-.js → index-C5ZAyrKq.js} +271 -270
- package/dist/assets/index-CPiRKiDC.css +1 -0
- package/dist/assets/index-CfpGZrbC.js +1 -0
- package/dist/assets/index-Czvj6whv.js +1 -0
- package/dist/assets/{index-C20Flc1s.js → index-DgPDGGSV.js} +2 -2
- package/dist/assets/{inference-diagnostics-MGcIHEX6.js → inference-diagnostics-DLt9ql9I.js} +1 -1
- package/dist/assets/{ingest-boot-viewport-D2okO6JI.js → ingest-boot-viewport-BXVXjYpG.js} +1 -1
- package/dist/assets/ingest-siblings-DWJ7OGB_.js +1 -0
- package/dist/assets/ingest-source-persistence-6ShMoSCa.js +1 -0
- package/dist/assets/ingest.service-BBbX8ibg.js +1 -0
- package/dist/assets/{inspect-C8RP8G5F.js → inspect-Cz3Zyx_1.js} +1 -1
- package/dist/assets/inspection-D8fZOHCM.js +1 -0
- package/dist/assets/instances.command-BrdlngrL.js +1 -0
- package/dist/assets/{json-history-resource-CTXRV4GD.js → json-history-resource-Uqrihfc8.js} +1 -1
- package/dist/assets/{layered-pick-B_-BRrRD.js → layered-pick-CAVQMPI7.js} +1 -1
- package/dist/assets/{light-CskDQ8gF.js → light-CqzsCWeJ.js} +1 -1
- package/dist/assets/{live-project-verbs-BOAQN3ME.js → live-project-verbs-CdFmLYOo.js} +1 -1
- package/dist/assets/{machine.document-BxOoCOo9.js → machine.document-DRIFOVaa.js} +1 -1
- package/dist/assets/{machines.finder-CqEceWzS.js → machines.finder-DPCT6few.js} +1 -1
- package/dist/assets/material-BVApn1V_.js +1 -0
- package/dist/assets/{material-factory-qB9pzcQf.js → material-factory-B_75xxFD.js} +1 -1
- package/dist/assets/{mesh-5--4qA-C.js → mesh-DdA3mExo.js} +1 -1
- package/dist/assets/model-asset-sections-D1uxOu2v.css +1 -0
- package/dist/assets/model-asset-sections.service-CJnSIckZ.js +1 -0
- package/dist/assets/{model-inspection-MrJY0U_-.js → model-inspection-DvspbmJl.js} +1 -1
- package/dist/assets/{model-thumbnail-uk-2sblh.js → model-thumbnail-BmQs-h6t.js} +1 -1
- package/dist/assets/{models.finder-rk8dhgO8.js → models.finder-Qv_Hsccy.js} +1 -1
- package/dist/assets/module-mode-MJ4Gbsry.js +2 -0
- package/dist/assets/mount-canvas-ingest-root-BxtM8OaB.js +2 -0
- package/dist/assets/mount-dom-ingest-root-pGatqO46.js +2 -0
- package/dist/assets/{mount-ingest-root-BC3-1Cw1.js → mount-ingest-root-C7jb-mCl.js} +2 -2
- package/dist/assets/{mount-manifest-QJOB11Kv.js → mount-manifest-BfoHBuzn.js} +1 -1
- package/dist/assets/mount-readiness-DyAd17pe.js +4 -0
- package/dist/assets/mount-three-ingest-root-Boa5mcaF.js +1 -0
- package/dist/assets/{mounted-authoring-B7RL_V28.js → mounted-authoring-DxMISwvR.js} +1 -1
- package/dist/assets/{mounted-story-viewport-source-CnYhX3vW.js → mounted-story-viewport-source-DfnLxI1f.js} +1 -1
- package/dist/assets/{native-debug-module-B-rWJfWE.js → native-debug-module-BlrALjM3.js} +1 -1
- package/dist/assets/{navigation-BVu-aVmF.js → navigation-CqG5o5AR.js} +1 -1
- package/dist/assets/{navmesh.menu-C3M63eR4.js → navmesh.menu-D4TdVDhe.js} +1 -1
- package/dist/assets/{navmesh.service-B0H1fUfn.js → navmesh.service-DWKT5ruQ.js} +1 -1
- package/dist/assets/network-observer.service-ZRAquNq4.js +1 -0
- package/dist/assets/network.utility-DjeOEvAY.js +1 -0
- package/dist/assets/object-marks-BnvSuCTt.js +1 -0
- package/dist/assets/{object3d-authoring-subject-BDrxd1GA.js → object3d-authoring-subject-XccsO0xG.js} +1 -1
- package/dist/assets/{object3d-document-session-registry-OjqzJ86S.js → object3d-document-session-registry-CMRJdFp6.js} +2 -2
- package/dist/assets/{oid-transform-Bzc2ZJSH.js → oid-transform-DaA6yW6o.js} +1 -1
- package/dist/assets/{particles-Be7AvO4c.js → particles-DsQRcDBY.js} +1 -1
- package/dist/assets/{performance-profiler-OwnXQX0M.js → performance-profiler-CMbwGBuk.js} +1 -1
- package/dist/assets/pixi-authoring-adapter-BoBt8bB5.js +1 -0
- package/dist/assets/pixi-live-write-target-CYZgvC6U.js +1 -0
- package/dist/assets/{play.command-CIGRq8ow.js → play.command-D9JGJP-e.js} +2 -2
- package/dist/assets/pose-guard-CLabLSzf.js +1 -0
- package/dist/assets/presentation-COhHQdmR.js +1 -0
- package/dist/assets/{product-BN31wSnB.js → product-CaRGoiIH.js} +1 -1
- package/dist/assets/{profiler.action-D57Kj9ym.js → profiler.action-Cz7HYWjh.js} +1 -1
- package/dist/assets/{profiler.menu-Dh9Q5DDx.js → profiler.menu-D5aR_FBy.js} +1 -1
- package/dist/assets/profiler.utility-KwxlIPKb.js +1 -0
- package/dist/assets/{project-authoring-session-LCJAwGrD.js → project-authoring-session-DKXHVwxO.js} +2 -2
- package/dist/assets/project-provenance-BGnJXJwa.js +1 -0
- package/dist/assets/{properties-bone-constraints.inspector-CaIDq5nN.js → properties-bone-constraints.inspector-Bo-sU8eR.js} +1 -1
- package/dist/assets/{properties-bone.inspector-D2fcQGMF.js → properties-bone.inspector-BQiWplQv.js} +1 -1
- package/dist/assets/{properties-collection.inspector-CF5AtTAd.js → properties-collection.inspector-C5BnR-GE.js} +1 -1
- package/dist/assets/{properties-constraints.inspector-Bj2itDrS.js → properties-constraints.inspector-CyheU12R.js} +1 -1
- package/dist/assets/{properties-data.inspector-BfRqk0Xo.js → properties-data.inspector-CkycARja.js} +1 -1
- package/dist/assets/{properties-material.inspector-Bf8H0mvu.js → properties-material.inspector-Bl_PUmY-.js} +1 -1
- package/dist/assets/{properties-modifiers.inspector-BKShc1TH.js → properties-modifiers.inspector-j7SnOxQq.js} +1 -1
- package/dist/assets/{properties-object.inspector-YBh8ABnN.js → properties-object.inspector-DcR3MGLK.js} +1 -1
- package/dist/assets/{properties-output.inspector-CVkzfs-l.js → properties-output.inspector-BLjw6K4b.js} +1 -1
- package/dist/assets/{properties-particles.inspector-ChDpAq-2.js → properties-particles.inspector-BUIm2-Jf.js} +1 -1
- package/dist/assets/{properties-physics.inspector-BLEM7aMj.js → properties-physics.inspector-DNvRcxb6.js} +1 -1
- package/dist/assets/{properties-render.inspector-vU4D9xLL.js → properties-render.inspector-8FMZ-qoZ.js} +1 -1
- package/dist/assets/{properties-scene.inspector-C-DoN-kL.js → properties-scene.inspector-Dx7_z75k.js} +1 -1
- package/dist/assets/{properties-texture.inspector-DySxy1oU.js → properties-texture.inspector-WT15951-.js} +1 -1
- package/dist/assets/{properties-view-layer.inspector-DEKxMahJ.js → properties-view-layer.inspector-P7VNTdqr.js} +1 -1
- package/dist/assets/{properties-world.inspector-m5qL_TQV.js → properties-world.inspector-B3t1q8TF.js} +1 -1
- package/dist/assets/r3f-design-session-lsbFnoWH.js +2 -0
- package/dist/assets/{r3f-physics-binding-Bgzzd4ol.js → r3f-physics-binding-Cx8yhuwt.js} +1 -1
- package/dist/assets/{r3f-source-authoring-adapter-C8oMjdTL.js → r3f-source-authoring-adapter-jH3G0TeH.js} +1 -1
- package/dist/assets/react-canvas-navigation-B_gOe3CI.js +1 -0
- package/dist/assets/react-inspector.service-CZf1vfdX.js +1 -0
- package/dist/assets/react-story-board-CCm2Opwn.js +1 -0
- package/dist/assets/{react-three-rapier.esm-BR2ttgLS.js → react-three-rapier.esm-CHXGG51p.js} +1 -1
- package/dist/assets/react-world-authoring-adapter-CnzxMtYz.js +1 -0
- package/dist/assets/{realm-services-DefTrXnY.js → realm-services-Do9J6nsb.js} +1 -1
- package/dist/assets/reflection-probe-capture.inspector-BAjjIybz.js +1 -0
- package/dist/assets/{reflection-probe-BHNGwVyz.js → reflection-probe-sIto9mh0.js} +1 -1
- package/dist/assets/registry-Xnduk02T.js +1 -0
- package/dist/assets/{relative-import-specifier-DQzkawgj.js → relative-import-specifier-CPFTrxi4.js} +1 -1
- package/dist/assets/{render-env-BZ7LsGfk.js → render-env-YJlI8K0i.js} +1 -1
- package/dist/assets/{render-features-C7QwmhCo.js → render-features-DMSV2qKJ.js} +1 -1
- package/dist/assets/{render-settings-BBvkacR3.js → render-settings-CRyDhHyz.js} +1 -1
- package/dist/assets/resolve-three-D27rMc37.js +702 -0
- package/dist/assets/root-seam-contract-gjWUd5uu.js +1 -0
- package/dist/assets/{run-selection-BUeubtHj.js → run-selection-B0jOdyYt.js} +1 -1
- package/dist/assets/scene-capture-Di9cM1p4.js +1 -0
- package/dist/assets/scene-document.service-XxGs4HHE.js +2 -0
- package/dist/assets/{scene-framing-PVMqGU8h.js → scene-framing-DkZKDwH3.js} +1 -1
- package/dist/assets/{scene-index--lRWLEmW.js → scene-index-DHeKmalD.js} +1 -1
- package/dist/assets/{scene-query-s1y04OVB.js → scene-query-ByZtXA2m.js} +1 -1
- package/dist/assets/seeded-random-BJthDRMu.js +1 -0
- package/dist/assets/{session-CTXsU1lK.js → session-x8E_NJk2.js} +34 -34
- package/dist/assets/{setup-renderer-OOw1SykJ.js → setup-renderer-F9mG7t6r.js} +1 -1
- package/dist/assets/{source-object3d-authoring-adapter-RmutT5Dt.js → source-object3d-authoring-adapter-CvmFpSUj.js} +1 -1
- package/dist/assets/{source-persistence-backend-HviqjKZ2.js → source-persistence-backend-au3WtEn6.js} +1 -1
- package/dist/assets/{spark-renderer-lifecycle-DfYpvEJa.js → spark-renderer-lifecycle-B6Axb6jm.js} +1 -1
- package/dist/assets/{stage-keyboard-DDi7S27C.js → stage-keyboard-BQkndG_D.js} +1 -1
- package/dist/assets/stage-overlay-set-g6eWhuRv.js +1 -0
- package/dist/assets/stage-presence-markers-0CDfO5f4.js +1 -0
- package/dist/assets/stage-transform-tools-BzPl7OIo.js +1 -0
- package/dist/assets/standard-viewport-dressing-BW-dM_1h.js +24 -0
- package/dist/assets/{state-watch.action-DEdb1mNa.js → state-watch.action-Z1nQ5awu.js} +1 -1
- package/dist/assets/{state-watch.menu-jWbUM3kw.js → state-watch.menu-CQHGUF3W.js} +1 -1
- package/dist/assets/state-watch.utility-DCIg2i79.js +1 -0
- package/dist/assets/{story-capture-Dj1xkeKH.js → story-capture-BIrjDKeY.js} +1 -1
- package/dist/assets/story-documents-BvG2xeaR.js +3 -0
- package/dist/assets/{story-documents.service-iNP-ORNr.js → story-documents.service-DOSEa3ja.js} +1 -1
- package/dist/assets/{story-documents.service-BzQCuNBu.js → story-documents.service-y1m7XGMJ.js} +1 -1
- package/dist/assets/{story-media-presence-zTPlU9HR.js → story-media-presence-HLV-KaMj.js} +1 -1
- package/dist/assets/{story-pixi-preview-B7THvSl7.js → story-pixi-preview-CMhho2gG.js} +1 -1
- package/dist/assets/{story-presentation-BLXYPadR.js → story-presentation-CYhVv8Ku.js} +1 -1
- package/dist/assets/story-three-preview-CgcLF5lE.js +2 -0
- package/dist/assets/{structural-ids-Br2zjINh.js → structural-ids-BOo2BRoY.js} +1 -1
- package/dist/assets/studio-environment-R9qXUUcC.js +2 -0
- package/dist/assets/{surface-state-D9j6qNu8.js → surface-state-D8Qnowo6.js} +1 -1
- package/dist/assets/{syntactic-prop-specs-BTnsMOvH.js → syntactic-prop-specs-8gkBuc5j.js} +1 -1
- package/dist/assets/team-playtest.service-BBMZ2iyk.js +1 -0
- package/dist/assets/{three-oYrcK5SQ.js → three-DiL6vMXq.js} +1 -1
- package/dist/assets/three-authoring-adapter-CkLR2zGf.js +1 -0
- package/dist/assets/three-authoring.service-CovhlCGx.js +2 -0
- package/dist/assets/{three-ingest-runtime-CXKjNysA.js → three-ingest-runtime-CwTqAHgX.js} +1 -1
- package/dist/assets/{three-integration-CuAnYaTW.js → three-integration-DXOFI88n.js} +2 -2
- package/dist/assets/three-integration.service-rCAqpqSp.js +1 -0
- package/dist/assets/three-projection-core-B7Lf8tOp.js +1 -0
- package/dist/assets/{three-state-wXRU3rLr.js → three-state-BCACvUtm.js} +1 -1
- package/dist/assets/{three-story-capture.service-DMJRcqjr.js → three-story-capture.service-rTFKNtHA.js} +2 -2
- package/dist/assets/{three-story-model-DgiAP-oQ.js → three-story-model-BjKr7OMn.js} +1 -1
- package/dist/assets/three-viewport-presentation-CBzvc2v2.js +141 -0
- package/dist/assets/tools-DfctM216.js +1 -0
- package/dist/assets/transform-mode-request-DlEApNrA.js +1 -0
- package/dist/assets/transport-strip-xCg94CuI.js +1 -0
- package/dist/assets/transport.header-BRtdky0x.js +1 -0
- package/dist/assets/{trigger-volume-DP0G1VBe.js → trigger-volume-BLkHmfm9.js} +1 -1
- package/dist/assets/tuples-BDz3wbQL.js +1 -0
- package/dist/assets/ui-board-document-DvbK_HVN.js +2 -0
- package/dist/assets/{user-data-CqOoAowZ.js → user-data-C84W0V47.js} +1 -1
- package/dist/assets/user-data-CODoGZqA.js +1 -0
- package/dist/assets/{utility-view-state-Db97zwDz.js → utility-view-state-CDRxZSo-.js} +1 -1
- package/dist/assets/viewport-door-BARIpMu-.js +1 -0
- package/dist/assets/{viewport-root-presentation-B35t51xX.js → viewport-root-presentation-hRLF0BeO.js} +1 -1
- package/dist/assets/{viewport-surface-status-D5kZtFW5.js → viewport-surface-status-TUfhXKR9.js} +1 -1
- package/dist/assets/{webworkerAll-CfKEb4Ao.js → webworkerAll-PJtcQ1FD.js} +1 -1
- package/dist/assets/worker-BtXrsgFy.js +2 -0
- package/dist/assets/workspace-arrangement-DqG5sUns.js +1 -0
- package/dist/assets/world-documents-D69XaqUX.js +1 -0
- package/dist/assets/world-root-stage-binding-BgZWZEuD.js +1 -0
- package/dist/assets/{xstate-animation-binding-aQEmNSpm.js → xstate-animation-binding-CIyLzGHs.js} +1 -1
- package/dist/assets/{xstate-animation-meta-CnMX1Sc1.js → xstate-animation-meta-CbYWup3R.js} +1 -1
- package/dist/volter-shared-react.json +10 -0
- package/dist/volter-shared-three.json +3 -0
- package/dist-node/cli.js +239 -201
- package/dist-node/create.js +89 -73
- package/package.json +20 -19
- package/src/contributions.d.ts +1 -1
- package/src/index.ts +10 -10
- package/starter/cube.py +1 -1
- package/template/.agents/references/project-manual.md +17 -17
- package/template/.agents/skills/editor/SKILL.md +6 -6
- package/template/.agents/skills/editor/agents/openai.yaml +3 -3
- package/template/.agents/skills/editor/references/editor-control.md +62 -62
- package/template/.agents/skills/{vgai-3d-models → volter-3d-models}/SKILL.md +3 -3
- package/template/.agents/skills/{vgai-ingest-existing-game → volter-ingest-existing-game}/SKILL.md +2 -2
- package/template/.agents/skills/{vgai-music → volter-music}/SKILL.md +7 -7
- package/template/{.github/skills/vgai-threejs-authoring → .agents/skills/volter-threejs-authoring}/SKILL.md +9 -9
- package/template/.agents/skills/volter-threejs-authoring/agents/openai.yaml +4 -0
- package/template/{.claude/skills/vgai-threejs-authoring → .agents/skills/volter-threejs-authoring}/references/helper-catalog.md +1 -1
- package/template/.claude/skills/editor/SKILL.md +6 -6
- package/template/.claude/skills/editor/agents/openai.yaml +3 -3
- package/template/.claude/skills/editor/references/editor-control.md +62 -62
- package/template/{.github/skills/vgai-3d-models → .claude/skills/volter-3d-models}/SKILL.md +3 -3
- package/template/{.github/skills/vgai-ingest-existing-game → .claude/skills/volter-ingest-existing-game}/SKILL.md +2 -2
- package/template/.claude/skills/{vgai-threejs-authoring → volter-threejs-authoring}/SKILL.md +9 -9
- package/template/.claude/skills/volter-threejs-authoring/agents/openai.yaml +4 -0
- package/template/{.agents/skills/vgai-threejs-authoring → .claude/skills/volter-threejs-authoring}/references/helper-catalog.md +1 -1
- package/template/.github/copilot-instructions.md +1 -1
- package/template/.github/skills/editor/SKILL.md +6 -6
- package/template/.github/skills/editor/agents/openai.yaml +3 -3
- package/template/.github/skills/editor/references/editor-control.md +62 -62
- package/template/{.claude/skills/vgai-3d-models → .github/skills/volter-3d-models}/SKILL.md +3 -3
- package/template/{.claude/skills/vgai-ingest-existing-game → .github/skills/volter-ingest-existing-game}/SKILL.md +2 -2
- package/template/{.agents/skills/vgai-threejs-authoring → .github/skills/volter-threejs-authoring}/SKILL.md +9 -9
- package/template/.github/skills/volter-threejs-authoring/agents/openai.yaml +4 -0
- package/template/.github/skills/{vgai-threejs-authoring → volter-threejs-authoring}/references/helper-catalog.md +1 -1
- package/template/.mcp.json +3 -3
- package/template/AGENTS.md +24 -23
- package/template/DEVLOG.md +1 -1
- package/template/IDIOMS.md +3 -3
- package/template/LICENSE +3 -3
- package/template/README.md +12 -12
- package/template/check-idioms.ts +51 -51
- package/template/manifest-entry-modules-plugin.ts +17 -4
- package/template/package.json +13 -15
- package/template/server/loopback.ts +1 -1
- package/template/server/main.ts +4 -4
- package/template/server/rooms/arena-room.ts +8 -8
- package/template/server/rooms/game-room.ts +8 -8
- package/template/server/rooms.ts +2 -2
- package/template/src/bot/QaTester.tsx +1 -1
- package/template/src/bot/bot-station.ts +2 -2
- package/template/src/bot/tester-station.ts +1 -1
- package/template/src/contributions/README.md +1 -1
- package/template/src/contributions/analytics.analytics.tsx +1 -1
- package/template/src/contributions/data.document.tsx +2 -2
- package/template/src/contributions/pages.finder.ts +1 -1
- package/template/src/contributions/tester.inspector.tsx +2 -2
- package/template/src/contributions/use-game-modules.ts +1 -1
- package/template/src/input.ts +1 -1
- package/template/src/lib/reflections/volume-reflection-material.ts +59 -59
- package/template/src/lib/static-batch/Frozen.tsx +1 -1
- package/template/src/lib/static-batch/mutation-watch.ts +1 -1
- package/template/src/main.ts +19 -38
- package/template/src/manifest-entry-modules.d.ts +12 -1
- package/template/src/prefabs/HeroBox.stories.tsx +1 -1
- package/template/src/world.tsx +1 -1
- package/template/tsconfig.json +1 -1
- package/template/validate-manifest.ts +3 -3
- package/template/vite.config.ts +11 -11
- package/template/{vgai.adapter.ts → volter.adapter.ts} +1 -1
- package/template/{vgai.project.json → volter.project.json} +2 -2
- package/template-dotfiles/gitignore +27 -27
- package/workbench/src/media/game-cover.css +11 -11
- package/workbench/src/product.contribution.ts +28 -28
- package/workbench/src/{vgaiGameSkew.ts → volterGameSkew.ts} +16 -16
- package/dist/assets/AudioViewer-xFb5Wv7A.js +0 -1
- package/dist/assets/CanvasSceneViewport-vqBlOz8P.js +0 -1
- package/dist/assets/ColorInput-CX1UZjYO.js +0 -1
- package/dist/assets/ImageViewer-shZzMd91.js +0 -1
- package/dist/assets/InspectorObjectPreview-BMOvJaOw.js +0 -1
- package/dist/assets/JsonAssetDocument-D_HXneWE.js +0 -2
- package/dist/assets/Object3DDocumentToolbar-BfPH9jz5.js +0 -1
- package/dist/assets/Object3DDocumentViewport-BaXWtATg.js +0 -2
- package/dist/assets/OnlineAssetDetail-BxibUH6K.js +0 -1
- package/dist/assets/PlayBar-DRANyO01.js +0 -1
- package/dist/assets/ReactCanvasControls-K98jOX9b.js +0 -1
- package/dist/assets/RootSelectionOverlay-BQC12Gdd.js +0 -1
- package/dist/assets/ShadowEditor-DP1LWynl.js +0 -1
- package/dist/assets/StageHost-V_0opXFt.js +0 -2
- package/dist/assets/ThreeBoardDocument-tgcaZDqQ.js +0 -2
- package/dist/assets/Toolbar-uLgsrB2z.js +0 -1
- package/dist/assets/VideoViewer-ClUJ6_uy.js +0 -1
- package/dist/assets/ViewportShadingMenu-Bdkc6jcd.js +0 -1
- package/dist/assets/active-ingest-CnAeQcuQ.js +0 -3
- package/dist/assets/animation-mixers.service-DiecMX_A.js +0 -1
- package/dist/assets/animation-timeline.utility-C71vPJgs.js +0 -1
- package/dist/assets/asset-editor-persistence-BQgjOCrm.js +0 -1
- package/dist/assets/asset-loaders-5PIUVvmH.js +0 -2
- package/dist/assets/audio.utility-D9Vk_WYS.js +0 -1
- package/dist/assets/autoplay.service-CFJoLPLw.js +0 -1
- package/dist/assets/binding-resolver-C_9MBSMa.js +0 -2
- package/dist/assets/blender-emscripten-engine-BeWFjMn-.js +0 -2
- package/dist/assets/blender-version.status-DtfwUahB.js +0 -1
- package/dist/assets/blender-wali-engine-da698rDf.js +0 -2
- package/dist/assets/blender.status-ujwGU6dU.js +0 -1
- package/dist/assets/board-guides-_3R1t_-2.js +0 -1
- package/dist/assets/body-marks-RKb_LTwL.js +0 -1
- package/dist/assets/build-profiles.document-CZxDuhzz.js +0 -2
- package/dist/assets/build-progress.status-Dk5u3C67.js +0 -1
- package/dist/assets/build.header--xqH6uTP.js +0 -1
- package/dist/assets/canvas-entry-runtime-DVeh71nC.js +0 -2
- package/dist/assets/capability-coverage-DQgg6UJe.js +0 -7
- package/dist/assets/component-board.service-DgujG90T.js +0 -2
- package/dist/assets/component-contracts.service-Bc_2Xxh_.js +0 -1
- package/dist/assets/component-instance-root-df4ofoOR.js +0 -1
- package/dist/assets/connection.status-CCX-mgmr.js +0 -1
- package/dist/assets/constraints.inspector-CwEEREsf.js +0 -1
- package/dist/assets/coverage.service-CV7b5Sqn.js +0 -3
- package/dist/assets/curve-BKuiAPpj.js +0 -1
- package/dist/assets/data-check-core-CQEjuFyt.js +0 -1
- package/dist/assets/data-ref-DyFQqqX6.js +0 -1
- package/dist/assets/debug-bridge-CESAxmlz.js +0 -1
- package/dist/assets/debug-registry-l7k5Hjc8.js +0 -1
- package/dist/assets/design-time-layers-CQgnmqc8.js +0 -1
- package/dist/assets/design-time-react-mount-CFvIk_rV.js +0 -1
- package/dist/assets/edit-mode-authoring-DBjaBTxM.js +0 -1
- package/dist/assets/editor-api-D2azVray.js +0 -1
- package/dist/assets/editor-presentation-activity-C7SNSmTd.js +0 -1
- package/dist/assets/game-audio-CaGKzia4.js +0 -1
- package/dist/assets/game-document.service-FdG_gFPU.js +0 -1
- package/dist/assets/game-module-access-DulnT3NH.js +0 -1
- package/dist/assets/game-network-Bo_nlDR5.js +0 -22
- package/dist/assets/gameplay-replay-CnWnlogY.js +0 -1
- package/dist/assets/generation-DhwCUHPf.css +0 -1
- package/dist/assets/generation.service-D2yeZaJu.js +0 -1
- package/dist/assets/generations.status-3CrPw_n5.js +0 -1
- package/dist/assets/hierarchy-marks-BLPfSIym.js +0 -1
- package/dist/assets/hierarchy-marks-C25dY2fR.js +0 -1
- package/dist/assets/hosted-asset-materialization-DYdcFlDf.js +0 -2
- package/dist/assets/index-B5WjeCHm.css +0 -1
- package/dist/assets/index-BcH5GC3b.js +0 -1
- package/dist/assets/index-CwCDkEl1.js +0 -1
- package/dist/assets/index-n3QdTv-T.js +0 -1
- package/dist/assets/index.module-Ycad3DJq.js +0 -1
- package/dist/assets/ingest-siblings-CkxW__go.js +0 -1
- package/dist/assets/ingest-source-persistence-6peGfPAS.js +0 -1
- package/dist/assets/ingest.service-Cc73WMIW.js +0 -1
- package/dist/assets/inspection-CObLhnrs.js +0 -1
- package/dist/assets/instances.command-CxKGnrNl.js +0 -1
- package/dist/assets/material-BwFzKPi0.js +0 -1
- package/dist/assets/model-asset-sections-CFvvihfx.css +0 -1
- package/dist/assets/model-asset-sections.service-TZ2SaBmH.js +0 -1
- package/dist/assets/module-mode-B79jV5tQ.js +0 -2
- package/dist/assets/mount-canvas-ingest-root-BhaYNuhY.js +0 -2
- package/dist/assets/mount-dom-ingest-root-BQb1u0LX.js +0 -2
- package/dist/assets/mount-readiness-Ds0HvvLH.js +0 -4
- package/dist/assets/mount-three-ingest-root-DIDBfvIH.js +0 -1
- package/dist/assets/network-observer.service-CiR4Q9Q0.js +0 -1
- package/dist/assets/network.utility-CNG3eJ0E.js +0 -1
- package/dist/assets/object-marks-DwvIEBOK.js +0 -1
- package/dist/assets/pixi-authoring-adapter-B42K4md-.js +0 -1
- package/dist/assets/pixi-live-write-target-D56tQEe_.js +0 -1
- package/dist/assets/pose-guard-DILO6gGq.js +0 -1
- package/dist/assets/presentation-DGBuGP6i.js +0 -1
- package/dist/assets/profiler.utility-DLNySW3w.js +0 -1
- package/dist/assets/project-provenance-4ldz-EOG.js +0 -1
- package/dist/assets/r3f-design-session-C0DPEChS.js +0 -2
- package/dist/assets/react-canvas-navigation-Jowa_lJq.js +0 -1
- package/dist/assets/react-inspector.service-TfTdj_Qk.js +0 -1
- package/dist/assets/react-story-board-Bx7qYytV.js +0 -1
- package/dist/assets/react-world-authoring-adapter-C1jPW_cN.js +0 -1
- package/dist/assets/reflection-probe-capture.inspector-C-6zrzZb.js +0 -1
- package/dist/assets/registry-Z28XSZHF.js +0 -1
- package/dist/assets/resolve-three-C7zDbK29.js +0 -702
- package/dist/assets/root-seam-contract-rGNbiX6q.js +0 -1
- package/dist/assets/scene-capture-BTWgUzhI.js +0 -1
- package/dist/assets/scene-document.service-DJJp-la1.js +0 -2
- package/dist/assets/seeded-random-38To73fI.js +0 -1
- package/dist/assets/stage-overlay-set-olkNSZmq.js +0 -1
- package/dist/assets/stage-presence-markers-cznMN_qq.js +0 -1
- package/dist/assets/stage-transform-tools-BDUZqRIR.js +0 -1
- package/dist/assets/standard-viewport-dressing-BZyuxyVl.js +0 -24
- package/dist/assets/state-watch.utility-DDmn3G25.js +0 -1
- package/dist/assets/story-documents-8ehMyYHo.js +0 -3
- package/dist/assets/story-three-preview-B1nNiPwP.js +0 -2
- package/dist/assets/studio-environment-yaKaHPxH.js +0 -2
- package/dist/assets/team-playtest.service-Ds9tkO4q.js +0 -1
- package/dist/assets/three-authoring-adapter-BrkGH4cd.js +0 -1
- package/dist/assets/three-authoring.service-DoamZDMx.js +0 -2
- package/dist/assets/three-integration.service-Db-VabIm.js +0 -1
- package/dist/assets/three-projection-core-jBJVt6O0.js +0 -1
- package/dist/assets/three-viewport-presentation-CgO3eWJ-.js +0 -141
- package/dist/assets/tools-B_NJsk05.js +0 -1
- package/dist/assets/transform-mode-request-BnKpgRUW.js +0 -1
- package/dist/assets/transport-strip-a9yLoPsI.js +0 -1
- package/dist/assets/transport.header-CpfoppXc.js +0 -1
- package/dist/assets/tuples-CKsHOV9T.js +0 -1
- package/dist/assets/ui-board-document-DtTR_mBr.js +0 -2
- package/dist/assets/user-data-dHvLdpwM.js +0 -1
- package/dist/assets/viewport-door-DVkMQazS.js +0 -1
- package/dist/assets/worker-CC9Ug5Ei.js +0 -2
- package/dist/assets/workspace-arrangement-DIMM7ska.js +0 -1
- package/dist/assets/world-documents-C4t3iOD-.js +0 -1
- package/dist/assets/world-root-stage-binding-ydl3JN1a.js +0 -1
- package/dist/vgai-shared-react.json +0 -10
- package/dist/vgai-shared-three.json +0 -3
- package/template/.agents/skills/vgai-threejs-authoring/agents/openai.yaml +0 -4
- package/template/.claude/skills/vgai-threejs-authoring/agents/openai.yaml +0 -4
- package/template/.github/skills/vgai-threejs-authoring/agents/openai.yaml +0 -4
- /package/dist/assets/{vgai-shared-fontawesome-CU65D4Ij.js → volter-shared-fontawesome-CU65D4Ij.js} +0 -0
- /package/dist/assets/{vgai-shared-jsx-dev-runtime-DFDKL7fx.js → volter-shared-jsx-dev-runtime-DFDKL7fx.js} +0 -0
- /package/dist/assets/{vgai-shared-jsx-runtime-DIqBpTut.js → volter-shared-jsx-runtime-DIqBpTut.js} +0 -0
- /package/dist/assets/{vgai-shared-react-BT7rMc2H.js → volter-shared-react-BT7rMc2H.js} +0 -0
- /package/dist/assets/{vgai-shared-react-dom-DFajMqMT.js → volter-shared-react-dom-DFajMqMT.js} +0 -0
- /package/dist/assets/{vgai-shared-react-dom-client-S0ozfl6_.js → volter-shared-react-dom-client-S0ozfl6_.js} +0 -0
- /package/dist/assets/{vgai-shared-three-DH4yxKwt.js → volter-shared-three-DH4yxKwt.js} +0 -0
- /package/template/{.vgai → .volter}/assets.json +0 -0
- /package/template/{.vgai → .volter}/provenance.json +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CaG87ZF-.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-B5WjeCHm.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{e0 as P,u as X,bz as ce,L as ue,h2 as fe,e5 as me,_ as pe,d4 as he,kR as ge,a9 as we}from"./index-CaG87ZF-.js";import{n as ve,a as ye}from"./native-debug-module-B-rWJfWE.js";import{assertNever as V}from"./adapter-surface-Y37Nzcyw.js";import{r as x}from"./index-nmcBqr7Y.js";import{staticBatchSkipReason as be,materialMergeSignature as Ee}from"./structural-signature-Dc7skRiy.js";import{fd as Re}from"./three.core-3arARmh6.js";import{f as Me,c as Se,a as Ce,b as Ae}from"./webgl-frame-capture-DdJkM2mi.js";import{g as _e}from"./debug-registry-l7k5Hjc8.js";import{y as Pe,f as xe,e as Te,n as Fe,g as $e}from"./events-156d8d12.esm-CYeuVCYr.js";import{a as Ie}from"./realm-services-DefTrXnY.js";import{r as De}from"./relative-path-guard-GiM7Lsz8.js";import{b as ke,m as je}from"./capability-coverage-DQgg6UJe.js";import{a as Oe,b as Be}from"./react-root-BHA-cdrW.js";const ee=40,te=30;function re(e){const t=e;return t.isMesh||t.isSkinnedMesh?t:null}function F(e){const t=e.geometry;if(!t)return 0;const r=t.getIndex?.()??null,n=t.getAttribute?.("position")??null,s=r?r.count:n?.count??0,o=e.isInstancedMesh?e.count??1:1;return Math.round(s/3)*o}function U(e,t){if(!e.visible)return;const r=re(e);r&&t(r);for(const n of e.children)U(n,t)}const R="(unnamed)";function j(e,t="(scene)"){const r=new Map;let n=0,s=0;if(!e.visible)return{root:t,totalMeshes:0,totalTriangles:0,subtreeCount:0,subtrees:[]};const o=(d,u)=>{U(u,f=>{const p=F(f),a=r.get(d)??{meshes:0,triangles:0};a.meshes+=1,a.triangles+=p,r.set(d,a),n+=1,s+=p})},l=re(e);if(l){const d=F(l);r.set(e.name||t,{meshes:1,triangles:d}),n+=1,s+=d}for(const d of e.children)o(d.name||R,d);const i=[...r.entries()].map(([d,u])=>({name:d,meshes:u.meshes,triangles:u.triangles})).sort((d,u)=>u.triangles-d.triangles||u.meshes-d.meshes);return{root:t,totalMeshes:n,totalTriangles:s,subtreeCount:i.length,subtrees:i.slice(0,ee)}}function H(e,t){if(e.name===t)return e;for(const r of e.children){const n=H(r,t);if(n)return n}return null}function Le(e){const t=new Map;let r=0;U(e,o=>{if(o.isInstancedMesh)return;const l=o.geometry;if(!l)return;const i=o.material,d=Array.isArray(i)?i.map(p=>p.uuid).join("+"):i?.uuid??"none",u=`${l.uuid}/${d}`;r+=1;const f=t.get(u);if(f){f.meshes+=1;return}t.set(u,{meshes:1,triangles:F(o),example:`${o.parent?.name||R}/${o.name||R}`})});const n=[...t.values()].sort((o,l)=>l.meshes-o.meshes),s=n.slice(0,te);return{plainMeshes:r,familyCount:n.length,top:s,meshesInTop:s.reduce((o,l)=>o+l.meshes,0)}}function Y(e){const t=new Map,r={},n=[];let s=0;const o=(a,c)=>{if(!a.visible)return!1;const m=be(a);if(m==="opted-out")return r["opted-out"]=(r["opted-out"]??0)+1,!1;if(m===null){const w=a,A=w.material,M=`${Ee(A)}|${a.castShadow?1:0}${a.receiveShadow?1:0}`;s+=1,n.push({key:M,subtree:c});const S=t.get(M);S?S.meshes+=1:t.set(M,{meshes:1,triangles:F(w),example:`${a.parent?.name||R}/${a.name||R}`})}else m!=="not-a-mesh"&&(r[m]=(r[m]??0)+1);return!0},l=(a,c)=>{if(o(a,c))for(const m of a.children)l(m,c)};if(o(e,e.name||R))for(const a of e.children)l(a,a.name||R);const i=new Set([...t.entries()].filter(([,a])=>a.meshes>=2).map(([a])=>a)),d=new Map;let u=0;for(const a of n)i.has(a.key)&&(u+=1,d.set(a.subtree,(d.get(a.subtree)??0)+1));const f=[...t.values()].sort((a,c)=>c.meshes-a.meshes),p=f.slice(0,te);return{plainMeshes:s,familyCount:f.length,top:p,meshesInTop:p.reduce((a,c)=>a+c.meshes,0),collapsible:u,skipped:r,bySubtree:[...d.entries()].map(([a,c])=>({name:a,collapsible:c})).sort((a,c)=>c.collapsible-a.collapsible).slice(0,ee)}}const ne="render.submit",Ne=["input","prePhysics","physics","postPhysics","gameLogic","animation"],We=300,He=50,Ve=.05,Ue=.1;function ze(e,t,r){const n=e-t-r;return{totalMs:e,renderMs:t,simMs:r,otherMs:n,text:`${e.toFixed(0)}ms = render ${t.toFixed(0)} + sim ${r.toFixed(0)} + other ${n.toFixed(0)}`}}function Ge(){return{lastFrameId:0,lastPresentAt:null,pendingSimMs:0,frameTimeMs:null,renderCpuMs:null,drawCalls:null,triangles:null,renderPasses:null,worstCurrentMs:0,worstPreviousMs:0,worstWindowFrames:0,lastHitch:null,presentedFrames:0}}function Ke(e,t){let r=0;for(const n of e.phases)t.includes(n.name)&&(r+=n.ms);return r}function Xe(e){for(const t of e.phases)if(t.name===ne)return t.ms;return null}function J(e,t,r){return e===null?t:e*(1-r)+t*r}function Ye(e,t){if(t.id<=e.lastFrameId)return!1;e.lastFrameId=t.id,t.render.renderPasses!==null&&(e.drawCalls=t.render.drawCalls,e.triangles=t.render.triangles,e.renderPasses=t.render.renderPasses),e.pendingSimMs+=Ke(t,Ne);const r=Xe(t);if(r===null)return!1;const n=e.pendingSimMs;e.pendingSimMs=0,e.presentedFrames+=1,e.renderCpuMs=J(e.renderCpuMs,r,Ue);const s=e.lastPresentAt;if(e.lastPresentAt=t.timestamp,s===null)return!0;const o=t.timestamp-s;return e.frameTimeMs=J(e.frameTimeMs,o,Ve),o>e.worstCurrentMs&&(e.worstCurrentMs=o),e.worstWindowFrames+=1,e.worstWindowFrames>=We&&(e.worstPreviousMs=e.worstCurrentMs,e.worstCurrentMs=0,e.worstWindowFrames=0),o>=He&&(e.lastHitch=ze(o,r,n)),!0}function T(e,t){if(e===null)return null;const r=10**t;return Math.round(e*r)/r}function Je(e){const t=T(e.frameTimeMs,2),r=Math.max(e.worstCurrentMs,e.worstPreviousMs);return{frameTimeMs:t,fps:t!==null&&t>0?T(1e3/t,1):null,drawCalls:e.drawCalls,triangles:e.triangles,renderCpuMs:T(e.renderCpuMs,2),renderPasses:e.renderPasses,worstFrameMs:e.frameTimeMs===null?null:T(r,2),lastHitch:e.lastHitch,presentedFrames:e.presentedFrames}}function qe(e){const t=Ge(),r=e.subscribe(()=>{const s=e.getSnapshot().frames.at(-1);s&&Ye(t,s)});let n=!1;return{read:()=>Je(t),dispose(){n||(n=!0,r())}}}const Qe=500,Ze=.5,et=.4,tt=120;function O(e){return e.toLocaleString("en-US")}function rt(e){const{drawCalls:t,census:r,structural:n}=e;if(t===null||t<Qe)return null;const{collapsible:s}=n;if(s<t*Ze)return null;const o=new Set(r.subtrees.map(p=>p.name)),l=n.bySubtree[0],i=l&&l.collapsible>=s*et&&o.has(l.name)?l.name:null,d=i===null?"<Frozen>":`<Frozen name="${i}">`,u=i===null?"spread across the scene":`mostly under "${i}"`,f=`[static-batch] ${O(t)} draw calls this frame; ~${O(s)} meshes are repeats of ${O(n.familyCount)} structural families, ${u}. If that scenery is mount-static — nothing under it moves, re-colours or unmounts after mount — one wrapper collapses it to a few draws: wrap it in ${d}…</Frozen> (vgai add static-batch). Reactive scenery goes outside the wrapper, and a subtree that must stay unbatched declares it: userData={{ staticBatch: false }}.`;return{drawCalls:t,collapsible:s,subtree:i,fix:d,message:f}}const se="__vgaiStaticBatchAdvised";function nt(){return globalThis[se]===!0}function st(e){console.warn(e)}function ot(e,t=st){return nt()?!1:(globalThis[se]=!0,t(e.message),!0)}const B="render.vitals",at="render.census",it="render.families",lt="render.toggle",dt="render.dpr",ct="render.dpr: this world has no WebGL renderer (headless mount), so there is no pixel ratio to change. The other render.* commands still work — they read the scene graph.";function ut(e){const{registry:t,worldId:r,profiler:n,scene:s,renderer:o}=e;if(t.adapter.providers().some(c=>c.name===B))return console.warn(`[render-vitals] world "${r}" did not get the ${B} door: another live world already owns it (the names are fixed, so the first three root to mount wins). Its draws still fold into the readings — the profiler is game-scoped — but render.census/families/toggle address the owning root. If this world IS the current one, the previous mount was torn down AFTER this one seeded and its strip() took the door with it.`),null;const i=qe(n),d=t.forRoot(r);d.registerStateProvider(B,()=>i.read()),d.registerCommand(at,{description:"Visible meshes and triangles per subtree — the address book behind the draw-call reading. Pass a subtree name (as listed by a previous census) to drill into it.",args:P([X().optional()]),locus:"client"},c=>{if(c===void 0||c==="")return j(s);const m=H(s,c);if(!m)throw new Error(`render.census: no node named "${c}" in this world. Run render.census with no argument to list the addressable subtrees.`);return j(m,c)}),d.registerCommand(it,{description:"Meshes grouped by shared (geometry, material) identity, largest group first — the instancing shortlist for a draw-call diet. `structural` is the same scan keyed by VALUE instead of object identity: what would collapse under a <Frozen> wrapper (vgai add static-batch) even when every mesh carries its own inline material.",args:P([]),locus:"client"},()=>({...Le(s),structural:Y(s)})),d.registerCommand(lt,{description:"Show/hide a named subtree (as listed by render.census) and read render.vitals again — the difference is what that subtree costs.",args:P([X()]),locus:"client"},c=>{const m=H(s,c);if(!m)throw new Error(`render.toggle: no node named "${c}" in this world. Run render.census to list the addressable subtrees.`);return m.visible=!m.visible,{name:c,visible:m.visible}}),d.registerCommand(dt,{description:"Set the renderer pixel ratio (retina default is ~2) to probe GPU fill cost — render CPU that does not move when the drawing buffer shrinks was never fill-bound.",args:P([ce().positive().max(8)]),locus:"client"},c=>{if(!o)throw new Error(ct);const m=o.getSize(new Re);return o.setPixelRatio(c),o.setSize(m.x,m.y,!1),{pixelRatio:o.getPixelRatio(),drawingBuffer:{width:o.domElement.width,height:o.domElement.height}}});let u=null,f=!1;const p=()=>{if(f||i.read().presentedFrames<tt)return;f=!0,u?.(),u=null;const c=rt({drawCalls:i.read().drawCalls,census:j(s),structural:Y(s)});c&&ot(c)};u=n.subscribe(p);let a=!1;return{vitals:i,dispose(){a||(a=!0,u?.(),u=null,i.dispose())}}}const ft={};function mt(e){return ft?.VITE_VGAI_DEV_BUILD==="true"}const q=new WeakMap;function pt(e){const t=q.get(e.Component);if(t)return t;class r extends e.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(s){this.props.onError(s)}render(){return this.state.failed?null:this.props.children}}return q.set(e.Component,r),r}function ht(e,t,r){const{createElement:n,Fragment:s,useEffect:o,createRoot:l,extend:i,advance:d,flushSync:u}=r,f=pt(r),p=n(t);return{id:e,async mount(a){i(a.three);const c=a.game?_e(a.game):null,m=a.surface.canvas,w=l(m);let A;const M=new Promise(h=>{A=h});let S;const ae=new Promise(h=>{S=h});function ie(){return o(S,[]),null}await w.configure({gl:a.renderer,shadows:a.renderer.shadowMap?.enabled??!1,frameloop:"never",size:{width:a.surface.width,height:a.surface.height,top:0,left:0},...a.headless?{}:{events:r.events},onCreated:h=>A(h)});const le=n(s,null,p,n(ie,{key:"vgai-mount-effects-ready"})),_=await new Promise((h,y)=>{const b=E=>{k(),w.unmount(),c?.strip(e),y(new Error(`three world "${e}": fiber crashed before its first commit — ${E}`))},g=E=>{b(E.message)},D=setTimeout(()=>{k(),w.unmount(),c?.strip(e),y(new Error(`three world "${e}": onCreated did not fire within 10s — the R3F tree never reached its first commit (mount() fails loudly instead of hanging)`))},1e4),k=()=>{clearTimeout(D),typeof window<"u"&&window.removeEventListener("error",g)};typeof window<"u"&&window.addEventListener("error",g),w.render(n(f,{onError:E=>b(E.message)},le)),Promise.all([M,ae]).then(([E])=>{k(),h(E)})});_.clock.autoStart=!1,_.clock.stop();const v=()=>_.get();let $=null;if(!a.headless&&a.game&&mt()){if(a.game.profiler.enabled=!0,!c)throw new Error(`three world "${e}": mounted Game has no debug registry.`);$=ut({registry:c,worldId:e,profiler:a.game.profiler,scene:v().scene,renderer:a.renderer})}const de=typeof a.renderer.getContext=="function"?a.renderer.getContext():void 0,z=Me(a.headless??!1,de),G=z?Se(z):null,C=G?Ce({capture:G,scene:_.scene,memory:()=>Ae(v().scene,a.renderer.info)}):null,K=c?{debug:c.adapter}:{};C&&(K.renderDebug=C.adapter);let I=0;return{kind:"three",get scene(){return v().scene},get camera(){return v().camera},drivesOwnLoop:!1,updateCadence:"display",systems:K,systemScope:v().scene,update(h){I+=h;const y=v();try{C?.beforeRender();const b=a.game?.profiler;if(!b?.enabled){d(I,!0,y);return}const g=a.renderer.info,D=g?.render.frame??0;b.beginPhase();try{d(I,!0,y)}finally{b.endPhase(ne)}g&&b.reportRender({gpuMs:null,drawCalls:g.render.calls,triangles:g.render.triangles,geometries:g.memory.geometries,textures:g.memory.textures,renderPasses:g.render.frame-D})}finally{C?.afterRender()}},resize(h,y){v().setSize(h,y)},dispose(){C?.dispose(),u(()=>w.unmount()),$?.dispose(),$=null,c?.strip(e)}}}}}function Q(e,t,r){const n=e;return typeof n?.default=="function"?ht(t,n.default,r):null}const gt={createElement:x.createElement,Fragment:x.Fragment,Component:x.Component,useEffect:x.useEffect,createRoot:xe,extend:Te,advance:Fe,flushSync:Pe,events:$e};let L=null;const wt=["createElement","Fragment","Component","useEffect","createR3FRoot","extendThree","advance","flushSync","events"];async function vt(){const e=await import(fe),t=wt.filter(r=>e[r]===void 0);if(t.length>0||typeof e.projectThree!="object"||e.projectThree===null)throw new Error(`The packaged runtime's synthetic R3F module did not export ${[...t,...e.projectThree?[]:["projectThree"]].join(", ")} — see R3F_DOORWAY in vite-plugin-module-doorways.ts.`);return{runtime:{createElement:e.createElement,Fragment:e.Fragment,Component:e.Component,useEffect:e.useEffect,createRoot:e.createR3FRoot,extend:e.extendThree,advance:e.advance,flushSync:e.flushSync,events:e.events},projectThree:e.projectThree}}function yt(e,t){return{id:e.id,mount(r){return e.mount({...r,three:t})}}}async function Z(e,t){if(!await ue())return Q(e,t,gt);L||(L=vt());const{runtime:r,projectThree:n}=await L,s=Q(e,t,r);return s?yt(s,n):null}function bt(e){if(e===null||typeof e!="object")return!1;const t=e;return typeof t.id=="string"&&t.id.length>0&&typeof t.mount=="function"}async function Et(e,t,r){const n=r?.namedExport;if(n!==void 0){const s=e[n];if(typeof s!="function")throw new Error(`three root "${t}": ${r?.entryPath??"the entry module"} has no exported component "${n}" (manifest \`world.export\`) — it exports ${Object.keys(e).join(", ")||"(nothing)"}.`);return Z({default:s},t)}return bt(e.adapter)?e.adapter:Z(e,t)}function Rt(e,t){const r=o=>{throw new Error(`resolveRootBinding: world "${e.id}" declares { module: "${t}" } — ${o} (the module path must be game-folder-relative, normalized, with no \`..\` escape).`)},n=De(t);n==="empty"&&r("the module path is empty"),n==="nul"&&r("the module path contains a NUL byte"),n==="absolute"&&r("the module path is absolute, not game-folder-relative"),n==="traversal"&&r("the module path contains a `..` segment and would escape the game folder"),t.includes("\\")&&r("the module path contains a backslash (not POSIX-relative)");const s=t.split("/").filter(o=>o.length>0&&o!==".").join("/");return s===""&&r("the module path resolves to nothing (empty after normalization)"),s}function N(e,t,r){const n=o=>{throw new Error(`resolveRootBinding: world "${e.id}"'s custom adapter module "${t}" ${o} — a { module } adapter must default-export an object shaped like \`RootAdapter\`: \`{ id: string, mount(host): Promise<MountedThreeRoot> }\`.`)};(r===null||typeof r!="object")&&n("has no default export (or it is not an object)");const s=r;(typeof s.id!="string"||s.id.length===0)&&n("default-exports an object with no non-empty string `id`"),typeof s.mount!="function"&&n("default-exports an object with no `mount` function")}const Mt="this world mounts through the project’s own adapter module, so every capability the editor has here is one that module hands it";function W(e,t){return{id:t.id,async mount(r){const n=await t.mount(r),s=ke(e.id,je(n),Mt,n.kind);if(s){const{editorConsole:o}=await pe(async()=>{const{editorConsole:l}=await import("./index-CaG87ZF-.js").then(i=>i.tI);return{editorConsole:l}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]));o.warn(s,"adapter")}return n}}}async function St(e,t,r){const{adapter:n}=e;if(n.type!=="module")throw new Error(`resolveModuleAdapter: world "${e.id}" is not a { module } world.`);const s=Rt(e,n.module),l=await import(me(t,s,r)),i=l.default;switch(e.surface){case"three":return N(e,n.module,i),{resolved:{surface:"three",adapter:W(e,i)},module:l};case"canvas":return N(e,n.module,i),{resolved:{surface:"canvas",adapter:W(e,i)},module:l};case"dom":return N(e,n.module,i),{resolved:{surface:"dom",adapter:W(e,i)},module:l};default:return V(e.surface,"resolveModuleAdapter")}}async function Ct(e,t,r,n){const{adapter:s,module:o}=await _t(e,t,n);return{adapter:s,declaration:At(e,r,o)}}function At(e,t,r){const n=ve(e.id,r),s=ye(e.id,r,e.surface);return{root:e,definition:t,entry:{reach:"full",module:r},...n?{entryDebug:n}:{},...s?{entrySystems:s}:{}}}async function _t(e,t,r){const{adapter:n}=e;switch(n.identity){case"three":return Pt(e,t,r);case"canvas":return xt(e,t,r);case"dom":{let s={};return{adapter:{surface:"dom",adapter:await Be(e,t,l=>{s=l})},module:s}}case"module":{const{resolved:s,module:o}=await St(e,t.projectRoot,t.epoch);return{adapter:s,module:o}}case"ingest-react":{const{adapter:s,module:o}=await Oe(e,t);return{adapter:{surface:"dom",adapter:s},module:o}}case"ingest-pixi":case"ingest-three":return Tt(e);default:{const s=n;throw new Error(`resolveRootBinding: unhandled adapter identity ${JSON.stringify(s)}`)}}}async function Pt(e,t,r){if(e.entry===void 0)throw new Error(`resolveRootBinding: world "${e.id}" is a three root with no \`entry\` — this should have been rejected by manifest validation. A three root is authored as a TSX/R3F world module.`);const n=await t.loadEntryModule(e.entry,e.id,"three",r?.selectionOverride),s=await Et(n,e.id,{entryPath:e.entry});if(!s)throw new Error(`Project script at ${e.entry} neither exports \`adapter\` nor default-exports a React world component — every explicit first-party entry module satisfies one of the two (\`export default function World() { … }\`, or an \`adapter\` export for full control).`);return{adapter:{surface:"three",adapter:s},module:n}}async function xt(e,t,r){if(e.entry===void 0)throw new Error(`resolveRootBinding: world "${e.id}" is a canvas root with no \`entry\` — this should have been rejected by manifest validation. A canvas root is authored as a TSX world module; point \`entry\` at it.`);const n=await t.loadEntryModule(e.entry,e.id,"canvas",r?.selectionOverride),s=await t.pixiRuntime(n,e.id);if(!s)throw new Error(`Project script at ${e.entry} (canvas root "${e.id}") must default-export a React component (\`export default function World() { … }\`) — or export an \`adapter\` for full control.`);return{adapter:{surface:"canvas",adapter:s},module:n}}function Tt(e){const t=e.adapter.identity==="ingest-pixi"?"resolveIngest2DDescriptor + mountCanvasIngestRootFromManifest":"resolveIngestDescriptor + mountThreeIngestRootFromManifest";throw new Error(`resolveRootBinding: world "${e.id}" (${e.adapter.identity}) is a captured foreign runtime, not a host-mounted RootAdapter; dispatch it through ${t}`)}async function oe(e,t,r){const n=he(),s=await Ie(t,n),o=await ge(),l=[];for(const i of we(e)){const d=r?.selectionOverride,u=await Ct(i,s,o,{...d&&i.id===d.regionId?{selectionOverride:{selection:d.selection,key:d.key}}:{}});l.push({world:i,resolved:u})}return{roots:l,mountId:String(n)}}async function Ut(e,t){const{roots:r}=await oe(e,t),n=[];for(const{world:s,resolved:o}of r){const l={id:s.id,zOrder:s.zOrder,pausable:s.pausable,declaration:o.declaration},i=o.adapter;switch(i.surface){case"canvas":n.push({...l,kind:"canvas",adapter:i.adapter});break;case"dom":n.push({...l,kind:"dom",adapter:i.adapter});break;case"three":n.push({...l,kind:"three",adapter:i.adapter});break;default:V(i,"resolveAllRoots")}}return n}async function zt(e,t,r){const{roots:n,mountId:s}=await oe(e,t,r),o={};for(const{world:l,resolved:i}of n){const{root:d,...u}=i.declaration,f=i.adapter;switch(f.surface){case"canvas":o[l.id]={kind:"canvas",adapter:f.adapter,declaration:u};break;case"dom":o[l.id]={kind:"dom",adapter:f.adapter,declaration:u};break;case"three":o[l.id]={kind:"three",adapter:f.adapter,declaration:u};break;default:V(f,"resolveAllRootEntries")}}return{entries:o,mountId:s}}export{Et as a,zt as b,Ut as r};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as y,a as k,S as p,P as _,s as P,o as O}from"./worker-CC9Ug5Ei.js";import{s as B}from"./session-CTXsU1lK.js";async function I(o){const a=await fetch(o);if(!a.ok)throw new Error(`${o}: HTTP ${a.status}`);const e=await a.text(),r={exports:{}},i=new Function("module","exports","define",`${e}
|
|
2
|
-
return typeof createBlenderModule === 'function' ? createBlenderModule : module.exports;`)(r,r.exports,void 0);if(typeof i!="function")throw new Error("blender_browser.js did not produce a module factory");return i}const $=new TextEncoder;function N(o,a){let e="";for(const r of a.split("/").filter(Boolean))o.FS_createPath(e||"/",r,!0,!0),e+=`/${r}`}function D(o){const a=o.FS;return{readFile:async e=>a.readFile(e),writeFile:async(e,r)=>a.writeFile(e,r),mkdirTree:async e=>a.mkdirTree(e),readdir:async e=>a.readdir(e),stat:async e=>{let r;try{r=a.stat(e)}catch{return null}const n=r.mtime;return{size:r.size,mode:r.mode??0,mtimeMs:typeof n=="number"?n:n?.getTime()??0}},unlink:async e=>a.unlink(e)}}const M="volter-blender-artifacts";async function m(o,a){const e=y(o);if(!a||typeof caches>"u")return fetch(e);const r=`${e}?sha256=${a}`,n=await caches.open(M),i=await n.match(r);if(i)return i;const l=await fetch(e);if(!l.ok)return l;for(const c of await n.keys())c.url.startsWith(`${e}?sha256=`)&&c.url!==r&&await n.delete(c);const s=new Response(await l.blob(),{headers:{"content-type":l.headers.get("content-type")??"application/octet-stream"}});return await n.put(r,s.clone()),s}async function H(o,a){if(!self.crossOriginIsolated)throw new Error("Headless Blender needs SharedArrayBuffer, so the editor page has to be cross-origin isolated (Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy on every response). This worker reports crossOriginIsolated=false.");const e=y("blender_browser.js"),r=a.digests??{},[n,i]=await Promise.all([I(e),m("blender_browser.data",r["blender_browser.data"]).then(async t=>{if(!t.ok)throw new Error(`blender_browser.data: HTTP ${t.status}`);return t.arrayBuffer()})]);let l=null;const s=performance.now();let c=null;const u=(t,f)=>{f.startsWith("@@VGAI-READY ")&&(c=f.slice(13)),o.log(f.startsWith("@@VGAI-WARN")||f.startsWith("@@VGAI-ERROR")?"error":"log",f)},d=await n({arguments:["--background","--factory-startup","--python",k],locateFile:t=>y(t),getPreloadedPackage:()=>i,instantiateWasm:(t,f)=>((async()=>{const w=await m("blender_browser.wasm",r["blender_browser.wasm"]);if(!w.ok)throw new Error(`blender_browser.wasm: HTTP ${w.status}`);const{instance:F,module:R}=await WebAssembly.instantiateStreaming(w,t);f(F,R)})().catch(w=>{l=w}),{}),mainScriptUrlOrBlob:e,print:t=>u("log",t),printErr:t=>u("error",t),preRun:[t=>{t.ENV??={},Object.assign(t.ENV,{BLENDER_SYSTEM_RESOURCES:"/bw",BLENDER_SYSTEM_PYTHON:"/bw/python",BLENDER_SYSTEM_SCRIPTS:"/bw/scripts",BLENDER_SYSTEM_DATAFILES:"/bw/datafiles",VGAI_SESSION_ROOT:p,HOME:"/root",TMPDIR:"/tmp"});for(const f of["/tmp","/root","/work",p,..._,o.project])N(t,f);t.FS_createDataFile(p,"session.py",$.encode(B),!0,!0,!0)}]});for(;c===null;){if(l)throw l instanceof Error?l:new Error(String(l));await P(5)}const g=performance.now()-s,T=JSON.parse(c);let E=null;if(typeof d.releasePreloadedFileData=="function"){const t=d.releasePreloadedFileData();E=t.bytes,o.log("log",`blender: released the preloaded ${(t.bytes/1048576).toFixed(0)} MB payload (${t.files} files); WasmFS already holds it`)}else o.log("error","blender: this bundle has no releasePreloadedFileData, so the ~55 MB packed .data payload stays resident beside the copy WasmFS made of it — relink with the recipe's --post-js (recipe/release-preloaded-file-data.js).");const h=d.FS;let S="";for(const t of`${o.project}`.split("/").filter(Boolean)){S+=`/${t}`;try{h.chmod(S,511)}catch{}}for(const t of["/work","/tmp","/root",p,..._])try{h.chmod(t,511)}catch{}const b=D(d);h.chmod("/bw/datafiles",493),await x(b,r["essentials.bin"]);const{request:A}=O(b,o);return{skew:"emscripten",banner:T,files:b,request:A,readArena:async()=>d.HEAPU8.subarray(d._blender_web_export_buffer(),d._blender_web_export_buffer()+d._blender_web_export_buffer_size()),bootMs:g,memoryBytes:()=>d.HEAPU8.length,releasedPayloadBytes:E}}async function x(o,a){const[e,r]=await Promise.all([fetch(y("essentials.json")),m("essentials.bin",a)]);if(!e.ok||!r.ok)throw new Error(`Blender Essentials assets are missing (${e.status}/${r.status})`);const n=await e.json(),i=await r.arrayBuffer(),l=Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",i)),s=>s.toString(16).padStart(2,"0")).join("");if(i.byteLength!==n.bytes||l!==n.sha256)throw new Error("Blender Essentials payload does not match its source manifest");for(const s of n.files){if(!s.path||s.path.includes("\\")||s.path.split("/").some(u=>!u||u==="."||u==="..")||!Number.isInteger(s.offset)||!Number.isInteger(s.bytes)||s.offset<0||s.bytes<0||s.offset+s.bytes>i.byteLength)throw new Error(`Invalid Blender Essentials file: ${s.path}`);const c=`/bw/datafiles/assets/${s.path}`;await o.mkdirTree(c.slice(0,c.lastIndexOf("/"))),await o.writeFile(c,new Uint8Array(i,s.offset,s.bytes))}}export{H as startEmscriptenBlenderEngine};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./jsx-runtime-DPjLkJKQ.js";import{q as i}from"./index-CaG87ZF-.js";import{r as s}from"./index-nmcBqr7Y.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";const d="workspace.status",v="Version",f="right",x=998;function h(){const{project:e}=i(),t=s.useSyncExternalStore(e.subscribe,e.engineVersion,e.engineVersion);return t===null?null:r.jsxs("span",{className:"vgai-status-copy","data-testid":"status-blender-version","data-engine-version":t,style:{display:"inline-flex",alignItems:"center",gap:"var(--vgai-space-2)",fontSize:"var(--vgai-font-md)"},title:`This project is built against engine ${t}`,children:[r.jsx("span",{"aria-hidden":"true",style:{width:"var(--vgai-stroke-resting)",height:"var(--vgai-icon-md)",background:"currentColor"}}),t]})}export{f as align,h as default,x as order,d as point,v as title};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{S,P as B,a as E,b as h,s as T,A as g,o as I}from"./worker-CC9Ug5Ei.js";import{s as O}from"./session-CTXsU1lK.js";const d="/bw",p=`${S}/frame.bin`;async function R(e){const r=h(`wali/${e}`);try{return await import(r)}catch(n){throw new Error(`The substrate skew needs ${e}, which this editor serves from the WALI pack directory beside blender.wasm (${r}): ${n instanceof Error?n.message:String(n)}`)}}async function P(e,r){const n=performance.now(),y=await fetch(h("runtime.idx"));if(!y.ok)throw new Error(`${g}/runtime.idx answered ${y.status}`);const m=await y.json(),w=await fetch(h("runtime.bin"));if(!w.ok)throw new Error(`${g}/runtime.bin answered ${w.status}`);const s=new Uint8Array(await w.arrayBuffer());let t=0;for(const i of m.files){if(t+i.size>s.byteLength)throw new Error(`Blender runtime ${i.path}: bytes ${t}..${t+i.size} lie outside the ${s.byteLength}-byte runtime blob`);const l=`${d}/${i.path}`;e.mkdirSync(l.slice(0,l.lastIndexOf("/")),{recursive:!0}),e.writeFileSync(l,s.subarray(t,t+i.size)),t+=i.size}if(t!==s.byteLength)throw new Error(`Blender runtime index accounts for ${t} of the ${s.byteLength} bytes served`);const a=Math.round(performance.now()-n);return r("log",`blender: staged Blender's ${m.files.length}-file runtime tree in ${a} ms`),{files:m.files.length,bytes:s.byteLength,ms:a}}function _(e){return{readFile:r=>e.readFile(r),writeFile:async(r,n)=>e.writeFileSync(r,n),mkdirTree:async r=>e.mkdirSync(r,{recursive:!0}),readdir:async r=>e.readdirSync(r),stat:async r=>{if(!e.existsSync(r))return null;const n=e.statSync(r);return{size:n.size,mode:n.mode&4095|(n.isDirectory()?16384:32768),mtimeMs:n.mtimeMs}},unlink:async r=>e.unlinkSync(r)}}async function N(e,r){const n=performance.now(),[y,m]=await Promise.all([R("browser-wali/worker-program.js"),R("browser-runtime/browser-memory-filesystem.js")]),w=y.BrowserWaliWorkerProgram,s=m.BrowserMemoryFileSystem;if(!w||!s)throw new Error("The substrate modules this editor served do not export BrowserWaliWorkerProgram and BrowserMemoryFileSystem; the WALI pack directory holds a browser-substrate this engine does not know.");const t=new s;for(const o of["/tmp","/root","/work",S,...B,e.project])t.mkdirSync(o,{recursive:!0});await P(t,e.log),t.writeFileSync(E,O);const a=r.workers??{pool:16,blender:4},i=new w(t,{url:h("blender.wasm"),...r.integrity?{integrity:r.integrity}:{},cwd:"/work",env:{HOME:"/root",TMPDIR:"/tmp",PATH:"/usr/bin:/bin",BLENDER_SYSTEM_RESOURCES:d,BLENDER_SYSTEM_SCRIPTS:`${d}/scripts`,BLENDER_SYSTEM_DATAFILES:`${d}/datafiles`,BLENDER_SYSTEM_PYTHON:`${d}/python`,PYTHONPATH:`${d}/python/lib/numpy313.zip:${d}/python/lib/wheels313.zip`,VGAI_SESSION_ROOT:S,VGAI_EXPORT_BUFFER_PATH:p},threadPoolSize:a.pool,network:{allowedHosts:[],maxConnections:0,maxBytes:0}});let l=null,c=null;const b=o=>{for(const u of o.split(`
|
|
2
|
-
`))u!==""&&(u.startsWith("@@VGAI-READY ")&&(l=u.slice(13)),e.log(u.startsWith("@@VGAI-WARN")||u.startsWith("@@VGAI-ERROR")?"error":"log",u))};for(i.run(["/blender","-b","--factory-startup","-noaudio","--python-use-system-env","-t",String(a.blender),"--python",E],{onStdout:b,onStderr:b,onDiagnostic:o=>e.log("error",`@@VGAI-ERROR ${o}`)}).then(o=>{c=`Blender exited ${o.exitCode}`},o=>{c=o instanceof Error?o.message:String(o)}).finally(()=>{c!==null&&e.log("error",`@@VGAI-ERROR the Blender program ended: ${c}`)});l===null;){if(c!==null)throw new Error(`Blender never reached its session: ${c}`);await T(5)}const A=performance.now()-n,$=JSON.parse(l);e.log("log",`blender: the substrate skew is up (${a.blender} Blender threads in a pool of ${a.pool}; Blender is SERIAL without -t N and says so)`);const f=_(t),{request:k}=I(f,e,()=>c);return{skew:"wali",banner:$,files:f,request:k,readArena:()=>t.readFile(p),bootMs:A,memoryBytes:()=>null,releasedPayloadBytes:null}}export{N as startWaliBlenderEngine};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";const w="workspace.status",b="Mouse hints",j="left",y=0,u=[{button:"left",label:"Select"},{button:"middle",label:"Pan View"},{button:"right",label:"Orbit View"}],l=1,a=8,h=5,g=1,r=6.25,x=3.6,i={width:12,height:16};function p({button:t}){const s=`vgai-mouse-${t}`,c=i.width-h,d=t==="right"?c:0,o=l/2,n=x;return e.jsxs("svg",{viewBox:`0 0 ${i.width} ${i.height}`,role:"presentation","aria-hidden":"true",focusable:"false",style:{height:"var(--vgai-icon-lg)",width:"auto",display:"block",flex:"0 0 auto"},children:[e.jsxs("title",{children:[t," mouse button"]}),e.jsx("clipPath",{id:`${s}-outer`,children:e.jsx("rect",{x:"0",y:"0",width:i.width,height:i.height,rx:n})}),e.jsxs("mask",{id:`${s}-shell`,children:[e.jsx("rect",{x:"0",y:"0",width:i.width,height:i.height,fill:"white"}),t!=="middle"&&e.jsx("rect",{x:t==="right"?r:-1,y:-1,width:t==="right"?i.width-r+1:r+1,height:a+g+1,fill:"black"})]}),e.jsx("rect",{x:o,y:o,width:i.width-l,height:i.height-l,rx:n-o,fill:"none",stroke:"currentColor",strokeWidth:l,mask:`url(#${s}-shell)`}),t!=="middle"&&e.jsx("rect",{x:d,y:"0",width:h,height:a,fill:"currentColor",clipPath:`url(#${s}-outer)`}),t==="middle"&&e.jsx("rect",{x:"4",y:"2",width:"4",height:"7",rx:"1.25",fill:"currentColor"})]})}function v(){return e.jsx("span",{className:"vgai-status-copy","data-testid":"status-blender-mouse-hints",style:{display:"inline-flex",alignItems:"center",gap:"var(--vgai-space-5)"},children:u.map(t=>e.jsxs("span",{"data-mouse-button":t.button,style:{display:"inline-flex",alignItems:"center",gap:"var(--vgai-space-1)",fontSize:"var(--vgai-font-md)"},title:`${t.label} — the ${t.button} mouse button in the viewport`,children:[e.jsx(p,{button:t.button}),t.label]},t.button))})}export{j as align,v as default,y as order,w as point,b as title};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{av as _}from"./index-CaG87ZF-.js";const i=globalThis;function c(){return i.__vgaiBreakpointListeners??=new Set,i.__vgaiBreakpointListeners}function y(){return i.__vgaiActiveBreakpoint??null}function G(e){i.__vgaiActiveBreakpoint=e;for(const t of c())t()}function k(e){return c().add(e),()=>c().delete(e)}const g="vgai:board-guides:v1";function v(){return typeof window>"u"?null:window.localStorage}function m(){try{return _()?.rootPath??"(no-project)"}catch{return"(no-project)"}}function B(){try{return JSON.parse(v()?.getItem(g)??"{}")}catch{return{}}}function b(e){try{v()?.setItem(g,JSON.stringify(e))}catch{}}const f=new Set;let u=null,p=Date.now()%1e6;function o(){return u||(u=B()[m()]??{}),u}function l(){const e=B();e[m()]=o(),b(e);for(const t of f)t()}const h=[];function a(e){return o()[e]??h}function S(e){return f.add(e),()=>f.delete(e)}function x(e,t,r){p+=1;const n=`guide-${p}`;return o()[e]=[...a(e),{id:n,axis:t,value:r}],l(),n}function A(e,t,r){o()[e]=a(e).map(n=>n.id===t?{...n,value:r}:n),l()}function E(e,t){o()[e]=a(e).filter(r=>r.id!==t),l()}let d=null;function T(e,t){d=t?{docId:e,transform:t}:null}function j(){if(!d)return{x:[],y:[]};const{docId:e,transform:t}=d,r=[],n=[];for(const s of a(e))s.axis==="x"?r.push(t.originX+t.panX+s.value*t.zoom):n.push(t.originY+t.panY+s.value*t.zoom);return{x:r,y:n}}export{y as a,k as b,S as c,a as d,E as e,x as f,j as g,A as m,T as r,G as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{getUserData as n,setUserData as r}from"./user-data-dHvLdpwM.js";import"./object-marks-DwvIEBOK.js";function i(o,e){r(o,"vgaiBodyOwner",e)}function a(o){return n(o,"vgaiBodyOwner")??void 0}export{a as bodyOwningNode,i as markBodyOwnedNode};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./jsx-runtime-DPjLkJKQ.js";import{b2 as D,cg as F,cr as H,ej as O,ek as z,el as L,em as i,a0 as M,en as R,aX as a,eo as n,cO as G,aL as j,$ as k,a$ as J,ep as V,eq as _,bS as U,er as q,es as X}from"./index-CaG87ZF-.js";import{r}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{a as Y,c as A,u as K,e as Q,f as Z,g as ee,h as te,r as P,i as C}from"./build-session-BGe0eGrQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./configurations-_HZOWZPy.js";const f="vgai.project.json",S={name:"My Game",resolution:{width:1280,height:720},appId:"com.example.mygame"};function ie(){r.useSyncExternalStore(Y,A,A);const s=ee(),p=J(),o=p?D(p):null,[y,T]=r.useState(S),m=K(),[d,I]=r.useState("");r.useEffect(()=>{!d&&m.length>0&&I(m[0]?.id??"")},[m,d]);const g=r.useRef(null),x=r.useCallback(async()=>{const t=await F(f),l=t?JSON.parse(t):S;T({...S,...l,resolution:{...S.resolution,...l.resolution}})},[]);r.useEffect(()=>(x().catch(()=>{}),o?.subscribeAll(t=>{t===f&&x().catch(()=>{})})??(()=>{})),[o,x]),r.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]);const v=r.useCallback(t=>{g.current&&clearTimeout(g.current),g.current=setTimeout(async()=>{const l=await F(f);if(!l)throw new Error(`Cannot edit build settings: ${f} is missing`);const u=JSON.parse(l),h=`${JSON.stringify({...u,name:t.name,resolution:t.resolution,appId:t.appId},null,2)}
|
|
2
|
-
`;if(!o){await H(f,h);return}await o.write(f,h,{label:"Edit Build Settings",kind:"settings",contentType:"application/json"}).catch(()=>void x().catch(()=>{}))},500)},[o,x]),N=r.useCallback(t=>{T(l=>{const u={...l,...t};return v(u),u})},[v]),E=r.useCallback((t,l)=>{T(u=>{const h={...u,resolution:{...u.resolution,[t]:Math.round(l)}};return v(h),h})},[v]),c=s.phase,b=s.result?.report?.artifact??null;return e.jsxs("div",{"data-testid":"build-profiles-document",style:{display:"flex",flex:1,minHeight:0,background:O[1],pointerEvents:"auto"},children:[e.jsx("div",{style:le,children:m.map(t=>e.jsx(L,{selected:d===t.id,disabled:c==="building",onClick:()=>{c!=="building"&&I(t.id)},style:{padding:`${i[4]} ${i[6]}`,opacity:c==="building"&&d!==t.id?.4:1},children:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:i[4]},children:[e.jsx(M,{icon:G,style:{fontSize:n.lg,color:d===t.id?R:a[2]}}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:n.md,fontWeight:600,color:d===t.id?a[1]:a[2]},children:t.label}),e.jsx("div",{style:{fontSize:n.sm,color:a[3],marginTop:1},children:t.subtitle})]})]})},t.id))}),e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",minWidth:0,padding:`${i[5]} ${i[8]}`,maxWidth:560},children:[e.jsx("div",{style:W,children:"Project"}),e.jsxs("div",{style:w,children:[e.jsx("label",{style:B,children:"Name"}),e.jsx(j,{className:"vgai-input",style:{flex:1},value:y.name,onChange:t=>N({name:t.target.value})})]}),e.jsxs("div",{style:w,children:[e.jsx("label",{style:B,children:"Resolution"}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:i[2],flex:1},children:[e.jsx(j,{type:"number",className:"vgai-input",style:{width:0,flex:1},value:y.resolution.width,onChange:t=>{const l=Number.parseInt(t.target.value,10);Number.isFinite(l)&&l>0&&E("width",l)}}),e.jsx("span",{style:{fontSize:n.sm,color:a[3]},children:"×"}),e.jsx(j,{type:"number",className:"vgai-input",style:{width:0,flex:1},value:y.resolution.height,onChange:t=>{const l=Number.parseInt(t.target.value,10);Number.isFinite(l)&&l>0&&E("height",l)}})]})]}),e.jsxs("div",{style:w,children:[e.jsx("label",{style:B,children:"App ID"}),e.jsx(j,{className:"vgai-input",style:{flex:1},value:y.appId,onChange:t=>N({appId:t.target.value})})]}),e.jsxs("div",{style:{...w,marginTop:i[2]},children:[e.jsx("label",{style:B,children:"Output"}),e.jsx("span",{style:{fontSize:n.md,color:a[2]},children:b??"Artifact appears here after a build"})]}),e.jsx("div",{style:{marginTop:i[6],display:"flex",alignItems:"center",gap:i[4],paddingTop:i[4],borderTop:`1px solid ${z[1]}`},children:c==="building"?e.jsxs(e.Fragment,{children:[e.jsxs("span",{style:{fontSize:n.md,fontWeight:600,color:R},children:["Building for ",m.find(t=>t.id===s.target)?.label??s.target,"… (log in Build Output below)"]}),e.jsx(k,{size:"compact",onClick:te,children:"Cancel"})]}):e.jsxs(e.Fragment,{children:[c==="done"&&s.result&&e.jsx("span",{"data-testid":"build-profiles-result",style:{fontSize:n.md,fontWeight:600,color:s.result.ok?V:_},children:s.result.ok?"✓ Build complete":`✗ Build failed (exit ${s.result.code??"unknown"})`}),c==="done"&&s.result?.ok&&b&&e.jsx("a",{href:U(b),download:b,className:"vgai-btn","data-variant":"secondary","data-size":"default",style:{textDecoration:"none",display:"inline-flex"},children:"Download"}),e.jsx(k,{variant:"primary","data-testid":"build-profiles-build",onClick:()=>{d&&(c==="done"&&P(),Q(d))},style:{marginLeft:"auto"},children:c==="done"?"Build Again":"Build"}),e.jsx(k,{"data-testid":"build-profiles-build-and-run",onClick:()=>{d&&(c==="done"&&P(),Z(d))},children:"Build And Run"})]})}),c==="done"&&s.result?.report&&e.jsx(se,{report:s.result.report})]})]})}function se({report:s}){const p=s.largestFiles[0]?.bytes??1;return e.jsxs("section",{"data-testid":"build-report",style:{marginTop:i[6],paddingTop:i[5],borderTop:`1px solid ${z[1]}`},children:[e.jsx("div",{style:W,children:"Build report"}),e.jsxs("div",{style:{display:"flex",gap:i[4],marginBottom:i[5]},children:[e.jsx($,{label:"Package",value:C(s.artifactBytes)}),e.jsx($,{label:"Output",value:C(s.outputBytes)}),e.jsx($,{label:"Files",value:String(s.fileCount)})]}),e.jsx("div",{style:{fontSize:n.sm,color:a[3],marginBottom:i[2]},children:"Largest output files"}),e.jsx("div",{style:{display:"grid",gap:3},children:s.largestFiles.slice(0,8).map(o=>e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr) max-content",gap:i[3]},children:[e.jsxs("div",{title:o.path,style:{position:"relative",minWidth:0,overflow:"hidden",borderRadius:2},children:[e.jsx("div",{"aria-hidden":"true",style:{position:"absolute",inset:0,width:`${Math.max(2,o.bytes/p*100)}%`,background:"color-mix(in srgb, var(--vgai-accent) 16%, transparent)"}}),e.jsx("div",{style:{position:"relative",padding:`${i[1]} ${i[2]}`,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:q,fontSize:n.sm,color:a[2]},children:o.path})]}),e.jsx("div",{style:{textAlign:"right",padding:`${i[1]} 0`,fontSize:n.sm,color:a[2]},children:C(o.bytes)})]},o.path))})]})}function $({label:s,value:p}){return e.jsxs("div",{style:{flex:1,padding:`${i[3]} ${i[4]}`,background:O[2],borderRadius:X.sm},children:[e.jsx("div",{style:{fontSize:n.sm,color:a[3]},children:s}),e.jsx("div",{style:{marginTop:i[1],fontSize:n.lg,fontWeight:650,color:a[1]},children:p})]})}const le={width:160,flexShrink:0,borderRight:`1px solid ${z[1]}`,overflowY:"auto"},W={fontSize:n.sm,fontWeight:700,textTransform:"uppercase",color:a[3],letterSpacing:"0.05em",marginBottom:i[3]},w={display:"flex",alignItems:"center",gap:i[3],marginBottom:i[2]},B={width:65,fontSize:n.base,color:a[2],flexShrink:0},xe="workspace.document",he="Build Profiles";function ye(s){return e.jsx(ie,{})}export{ye as default,xe as point,he as title};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{r as a}from"./index-nmcBqr7Y.js";import{a as i,c as e,g as r}from"./build-session-BGe0eGrQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./configurations-_HZOWZPy.js";import"./index-CaG87ZF-.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const x="workspace.status",B="Build Progress",h="left",S=30;function k(){a.useSyncExternalStore(i,e,e);const s=r();return s.phase==="idle"?null:s.phase==="building"?t.jsxs("span",{className:"vgai-status-copy","data-testid":"status-build-progress","data-build-phase":"building","data-status-tone":"accent",children:["Building ",s.target,"…"]}):t.jsx("span",{className:"vgai-status-copy","data-testid":"status-build-progress","data-build-phase":s.result?.ok?"complete":"failed","data-status-tone":s.result?.ok?"success":"danger",children:s.result?.ok?"Build complete":"Build failed"})}export{h as align,k as default,S as order,x as point,B as title};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./jsx-runtime-DPjLkJKQ.js";import{q as e,$ as a,a0 as s,a1 as i}from"./index-CaG87ZF-.js";import{r as p}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{o as n}from"./build-session-BGe0eGrQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./configurations-_HZOWZPy.js";const b="workspace.header",h=10;function v(){const{session:t}=e(),o=p.useSyncExternalStore(t.subscribe,t.playState,t.playState)!=="stopped";return r.jsxs(a,{variant:"ghost",size:"compact","data-testid":"project-export","aria-label":"Export project",disabled:o,title:o?"Stop Play mode before exporting the project":"Export project",className:"vgai-chrome-island vgai-glass-island",onClick:()=>{n()},children:[r.jsx(s,{icon:i.action.export}),"Export"]})}export{v as default,h as order,b as point};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Kb9_s5aP.js","assets/extend-DcEyE5jI.js","assets/jsx-runtime-DPjLkJKQ.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-bQE2NA0D.js","assets/index-nmcBqr7Y.js","assets/index-D_NuPfjr.js","assets/index-C20Flc1s.js","assets/index-CaG87ZF-.js","assets/index-CtzuWnCS.js","assets/index-CinJrH5C.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-B5WjeCHm.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{L as H,ei as Y,_ as T}from"./index-CaG87ZF-.js";import{r as m}from"./index-nmcBqr7Y.js";import{g as q}from"./debug-registry-l7k5Hjc8.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";const _=1e4,L=new WeakSet;function G(e){if(e===null||typeof e!="object")return!1;const r=e;return typeof r.id=="string"&&r.id.length>0&&typeof r.mount=="function"}function J(e,r,n){const{createElement:o,Fragment:k,useEffect:F,useLayoutEffect:C,createRoot:D,extend:M}=n,S=o(r);return{id:e,async mount(i){const v=i.game?q(i.game):null,u=i.canvas;if(L.has(u))throw new Error(`canvas world "${e}": this lane has already mounted this canvas. @pixi/react keys its reconciler roots off the canvas element, so re-using one would resurrect a root whose Application is destroyed. Hand each mount a fresh canvas (every vgai host already does).`);L.add(u),M(n.pixi);let y;const $=new Promise(t=>{y=t});let E;const I=new Promise(t=>{E=t});let g;const U=new Promise(t=>{g=t});let h;const j=new Promise(t=>{h=t});function N(){return C(()=>(y(),g),[]),F(()=>(E(),h),[]),null}const V=o(k,null,S,o(N)),w=D(u),R={antialias:!0,width:i.width,height:i.height,resolution:i.dpr??globalThis.devicePixelRatio??1,autoDensity:!0,backgroundAlpha:i.transparent?0:1,preserveDrawingBuffer:i.preserveDrawingBuffer??!1,autoStart:!1,sharedTicker:!1};let x;const B=new Promise(t=>{x=t}),P=t=>{x(`the Pixi tree crashed before its first commit — ${t.message} (mount() fails loudly instead of hanging)`)};globalThis.addEventListener?.("error",P);let d,p;try{d=await w.render(V,R);const c=new Promise(f=>{p=setTimeout(()=>f(`no first commit within ${_/1e3}s (mount() fails loudly instead of hanging)`),_)}),l=await Promise.race([Promise.all([$,I]).then(()=>null),B,c]);if(l!==null)throw new Error(`canvas world "${e}": ${l}`)}catch(t){try{d?.destroy(!1,{children:!0})}catch{}throw t}finally{p!==void 0&&clearTimeout(p),globalThis.removeEventListener?.("error",P)}if(d===void 0)throw new Error(`canvas world "${e}": initialized without an Application`);const a=d;a.ticker.lastTime=0;let A=0,s=!1;const W=v?{debug:v.adapter}:{},z=Promise.all([U,j]).then(()=>{s=!0,a.destroy(!1,{children:!0})});return{kind:"canvas",canvas:u,substrate:{name:"pixi",root:a.stage},drivesOwnLoop:!1,systems:W,disposeComplete:z,update(t){s||(A+=t*1e3,a.ticker.update(A))},hitTest(t,c){if(s)return!1;const l=a.renderer.events.rootBoundary,f=a.renderer.lastObjectRendered;return f?(l.rootTarget=f,l.hitTest(t,c)!==null):!1},resize(t,c){s||a.renderer.resize(t,c)},dispose(){s||(s=!0,a.renderer.events.setTargetElement(null),w.render(null,R))}}}}}function K(e,r,n){const o=e;return G(o?.adapter)?o.adapter:typeof o?.default=="function"?J(r,o.default,n):null}let O=null;const Q=["createElement","Fragment","useEffect","useLayoutEffect","createPixiRoot","extendPixi","projectPixi"];async function X(){const e=await import(Y),r=Q.filter(n=>e[n]===void 0||e[n]===null);if(r.length>0)throw new Error(`The packaged runtime's synthetic canvas module did not export ${r.join(", ")} — see CANVAS_DOORWAY in vite-plugin-module-doorways.ts.`);return{createElement:e.createElement,Fragment:e.Fragment,useEffect:e.useEffect,useLayoutEffect:e.useLayoutEffect,createRoot:e.createPixiRoot,extend:e.extendPixi,pixi:e.projectPixi}}async function Z(){const[e,r]=await Promise.all([T(()=>import("./index-Kb9_s5aP.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])),T(()=>import("./index-C20Flc1s.js").then(n=>n.s),__vite__mapDeps([7,8,5,3,6,2,9,10,11,12,13]))]);return{createElement:m.createElement,Fragment:m.Fragment,useEffect:m.useEffect,useLayoutEffect:m.useLayoutEffect,createRoot:e.createRoot,extend:e.extend,pixi:r}}async function b(){return O??=(async()=>await H()?X():Z())(),O}async function ue(){return(await b()).pixi}async function de(e,r){return K(e,r,await b())}export{de as resolveCanvasEntryAdapterForEditor,ue as resolveCanvasPixiForEditor};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{j2 as P,j3 as M,o as F,b as w,n as $,j4 as T,m as N,f as L,z as A,W as H}from"./index-CaG87ZF-.js";import{GAME_CONTRACT_SHAPE as V,GAME_LIFECYCLE_SHAPE as z,GAME_SYSTEMS_SHAPE as U}from"./game-contract-seams-C0AVYwvO.js";function B(e,t){const o=[];let s=!0;for(const r of t.childIds){const i=e.hierarchy.node(r);!i||i.parentId!==t.id?s=!1:o.push(i)}return{valid:s,children:o}}function W(e){return typeof e=="object"&&e!==null&&e.isObject3D===!0}const Y=64;function K(e,t,o){const s=[];let r=null;for(const i of t){let a;try{a=e(i)}catch(n){r=`hierarchy.object3D threw on the walked node ${i}: ${n instanceof Error?n.message:String(n)}`;break}if(a!=null){if(!W(a)){r=`hierarchy.object3D answered the walked node ${i} with a ${typeof a} that is not an Object3D`;break}s.push({id:i,object:a})}}return o("editor.hierarchy.object3D",r?"fail":"pass",r??`hierarchy.object3D answered ${s.length} of ${t.length} walked node(s) with an Object3D and the rest with null`),{objects:r?[]:s}}function q(e,t,o,s){let r;try{r=e(o)}catch(i){return`hierarchy.idForObject3D threw on the object hierarchy.object3D returned for ${t}: ${i instanceof Error?i.message:String(i)}`}return r==null?null:typeof r!="string"||!s.has(r)?`hierarchy.idForObject3D answered ${JSON.stringify(r)} for the object hierarchy.object3D returned for ${t}, which is not a node this walk listed`:!0}function J(e,t,o,s){if(t.length===0){s("editor.hierarchy.idForObject3D","fail","hierarchy.idForObject3D could not be asked about anything: hierarchy.object3D handed back no Object3D for any walked node");return}let r=0,i=null;for(const{id:a,object:n}of t){const c=q(e,a,n,o);if(c===!0){r+=1;continue}if(c!==null){i=c;break}}!i&&r===0&&(i=`hierarchy.idForObject3D answered null for all ${t.length} object(s) hierarchy.object3D handed back, so nothing it returned could be checked against the walk`),s("editor.hierarchy.idForObject3D",i?"fail":"pass",i??`hierarchy.idForObject3D named ${r} of ${t.length} object(s) hierarchy.object3D returned with an id this walk listed`)}function X(e){const{adapter:t,subject:o,epoch:s,receipts:r,walked:i}=e,{object3D:a,idForObject3D:n}=t.hierarchy;if(!a)return;const c=(h,f,g)=>{r.push({seam:h,subject:o,epoch:s,stage:"operation",outcome:f,source:"conformance-probe",detail:g})},{objects:d}=K(a,i.slice(0,Y),c);n&&J(n,d,new Set(i),c)}function Q(e){const{adapter:t,subject:o,epoch:s,record:r,receipts:i}=e,a=r("editor.hierarchy.roots","operation",()=>t.hierarchy.roots(),l=>Array.isArray(l)&&l.length>0),n=Array.isArray(a)?a:[];let c=n.length>0;const d=new Set,h=[...n],f=1e4;for(;h.length>0&&d.size<f;){const l=h.shift();if(!l||d.has(l.id)){c=!1;continue}d.add(l.id);const b=r("editor.hierarchy.node","operation",()=>t.hierarchy.node(l.id),y=>y!==null&&typeof y=="object"&&y.id===l.id&&Array.isArray(y.childIds));if(!b){c=!1;continue}const j=B(t,b);c&&=j.valid,h.push(...j.children)}const g=h.length>0&&d.size>=f;return i.push({seam:"editor.hierarchy",subject:o,epoch:s,stage:"operation",outcome:c?"pass":"fail",source:"conformance-probe",detail:c?`hierarchy roots/node walked ${d.size} unique node(s) with reciprocal parent/child ids${g?` (walk budget reached with ${h.length} node(s) still pending — a larger tree, not a broken one)`:""}`:"hierarchy roots/node did not form a finite, non-empty, reciprocal tree"}),t.hierarchy.crossSurfaceStructureSignature&&r("editor.hierarchy.crossSurfaceStructureSignature","operation",()=>t.hierarchy.crossSurfaceStructureSignature?.(),l=>l===null||typeof l=="string"),X({adapter:t,subject:o,epoch:s,receipts:i,walked:[...d]}),n}function Z(e,t,o){if(e.selection&&(o("editor.selection.get","operation",()=>e.selection?.get(),Array.isArray),e.selection.resolve&&o("editor.selection.resolve","operation",()=>e.selection?.resolve?.(t),s=>s===null||typeof s=="object"&&typeof s.id=="string")),e.transforms){let s=!0;if(e.transforms.dimensions){const r=o("editor.transforms.dimensions","operation",()=>e.transforms?.dimensions?.(t),i=>i===null||i==="2d"||i==="3d");s=r==="2d"||r==="3d"}s&&(o("editor.transforms.get","operation",()=>e.transforms?.get(t),r=>{if(!r||typeof r!="object")return!1;const i=r;return["position","rotation","scale"].every(a=>{const n=i[a];return Array.isArray(n)&&n.every(Number.isFinite)})}),e.transforms.editability&&o("editor.transforms.editability","operation",()=>e.transforms?.editability?.(t,"position"),r=>r!==null&&typeof r=="object"&&typeof r.writable=="boolean"))}if(e.inspector){const s=o("editor.inspector.properties","operation",()=>e.inspector?.properties(t),Array.isArray);if(Array.isArray(s))for(const r of s)r&&typeof r=="object"&&typeof r.path=="string"&&(o("editor.inspector.get","operation",()=>e.inspector?.get(t,r.path)),e.inspector.editability&&o("editor.inspector.editability","operation",()=>e.inspector?.editability?.(t,r.path),i=>i!==null&&typeof i=="object"&&typeof i.writable=="boolean"))}}function ee(e,t,o,s){e.assetSubject&&(o("editor.assetSubject.get","operation",()=>e.assetSubject?.get(t)),e.assetSubject.entries&&o("editor.assetSubject.entries","operation",()=>e.assetSubject?.entries?.(),Array.isArray),s("editor.assetSubject")),e.related&&(o("editor.related.links","operation",()=>e.related?.links(t),Array.isArray),s("editor.related")),e.instances&&o("editor.instances.describe","operation",()=>e.instances?.describe(t)),e.truth&&(o("editor.truth.resolve","operation",()=>e.truth?.resolve(t,""),r=>r!==null&&typeof r=="object"),s("editor.truth"))}function te(e,t,o,s){e.pickable&&(o("editor.pickable.pick","operation",()=>e.pickable?.pick(0,0),r=>r===null||typeof r=="string"),e.pickable.candidates&&o("editor.pickable.candidates","operation",()=>e.pickable?.candidates?.(0,0),Array.isArray),s("editor.pickable")),e.rects&&(o("editor.rects.rect","operation",()=>e.rects?.rect(t),r=>{if(r===null)return!0;if(!r||typeof r!="object")return!1;const i=r;return["x","y","width","height"].every(a=>Number.isFinite(i[a]))}),e.rects.contextRects&&o("editor.rects.contextRects","operation",()=>e.rects?.contextRects?.(t)),e.rects.emptyContainers&&o("editor.rects.emptyContainers","operation",()=>e.rects?.emptyContainers?.(),Array.isArray),s("editor.rects")),e.colorSample&&(o("editor.colorSample.backgroundChainAt","operation",()=>e.colorSample?.backgroundChainAt(0,0),r=>r===null||Array.isArray(r)),s("editor.colorSample")),e.spatialHandles&&o("editor.spatialHandles.layers","operation",()=>e.spatialHandles?.layers(t),Array.isArray)}function oe(e,t,o){e.persistence&&(o("editor.persistence.isDirty","operation",()=>e.persistence?.isDirty(),s=>typeof s=="boolean"),e.persistence.lastError&&o("editor.persistence.lastError","operation",()=>e.persistence?.lastError?.(),s=>s===null||typeof s=="string")),e.text&&o("editor.text.get","operation",()=>e.text?.get(t)),e.stories&&(o("editor.stories.storiesFor","operation",()=>e.stories?.storiesFor(t),Array.isArray),o("editor.stories.active","operation",()=>e.stories?.active(t),s=>s===null||typeof s=="string")),e.assetDrop&&o("editor.assetDrop.accepts","operation",()=>e.assetDrop?.accepts(t,"__vgai_read_probe__"),s=>typeof s=="boolean")}function se(e){const{adapter:t,subject:o,epoch:s}=e,r=[],i=(d,h,f,g=()=>!0)=>{try{const l=f(),b=g(l);return r.push({seam:d,subject:o,epoch:s,stage:h,outcome:b?"pass":"fail",source:"conformance-probe",detail:b?`${d} returned a value accepted by its consumer-facing shape`:`${d} returned a value outside its consumer-facing shape`}),l}catch(l){r.push({seam:d,subject:o,epoch:s,stage:h,outcome:"fail",source:"conformance-probe",detail:`${d} threw while read: ${l instanceof Error?l.message:String(l)}`});return}},a=d=>{r.push({seam:d,subject:o,epoch:s,stage:"operation",outcome:"pass",source:"conformance-probe",detail:`${d} served a real read against the mounted projection`})},c=Q({adapter:t,subject:o,epoch:s,record:i,receipts:r})[0]?.id;return c&&(Z(t,c,i),ee(t,c,i,a),te(t,c,i,a),oe(t,c,i)),r}const v={missing:"the editor never reached this game’s scene, so hierarchy, inspector and gizmo have nothing to work on — not one object in it can be listed, selected, inspected or moved",fix:"make the game’s own runtime instance reachable to the host: a bare, un-rewritten `import 'three'` / `import 'pixi.js'` in the game's own source, so it resolves in the editor’s realm to the very instance the capture trap is installed on"},S={missing:"this root’s hierarchy does not agree with itself: the editor reached the world and can list it, but `hierarchy.node(id).parentId` and the parent’s own `childIds` name different nodes, so anything that walks UPWARD — reparent targets, paste anchors, ancestor selection — resolves against a tree the panel is not showing",fix:"make the adapter’s `hierarchy` reciprocal: for every id in a node’s `childIds`, `hierarchy.node(childId).parentId` must be that node’s own id. The report’s `detail` names which direction disagreed"},m={provenance:{missing:"the shell shows no provenance badge for this root, so nothing tells the author what the rows they are editing are backed by or how writable it is",fix:"the adapter must declare `provenance` (`AuthoringAdapter.provenance`)"},selection:{missing:"this root owns no selection, so a viewport hit cannot be resolved to the node the author actually means — a click lands on whatever raw id the substrate reports",fix:"the adapter must expose a `selection` provider (`AuthoringAdapter.selection`)"},transforms:{missing:"the gizmo cannot move, rotate or scale anything in this world",fix:"the adapter must expose a `transforms` provider (`AuthoringAdapter.transforms`) over the captured tree"},inspector:{missing:"the inspector shows no properties for a selected object in this world",fix:"the adapter must expose an `inspector` provider (`AuthoringAdapter.inspector`)"},assetSubject:{missing:"an authored node that IS an asset (inline SVG, an embedded image) cannot be opened in the Asset Editor from this root — it stays an opaque row",fix:"the adapter must expose an `assetSubject` provider (`AuthoringAdapter.assetSubject`)"},related:{missing:"the inspector offers no jump from a selected subject to the document that defines it (a component to its source, an instance to its story) — navigation stops at the row",fix:"the adapter must expose a `related` provider (`AuthoringAdapter.related`)"},instances:{missing:"the inspector cannot distinguish a prefab instance override from its component default, so authors cannot revert the instance or deliberately apply its value to the component",fix:"the adapter must expose an `instances` provider (`AuthoringAdapter.instances`) derived from native component source"},structure:{missing:"nothing in this world can be created, deleted, duplicated or reparented: the creation palette is empty and the hierarchy’s drag-drop and context-menu structure ops do nothing",fix:"the adapter must expose a `structure` provider (`AuthoringAdapter.structure`)"},persistence:{missing:"edits to this world are live-only — the mount carries no write-back route to the game’s own source, so nothing you change survives the session",fix:"the adapter must expose a `persistence` provider (`AuthoringAdapter.persistence`)"},pickable:{missing:"this root is not pickable in the viewport: clicking its content selects nothing, so it can only be reached from the hierarchy list",fix:"the adapter must expose a `pickable` provider (`AuthoringAdapter.pickable`)"},rects:{missing:"the editor has no screen geometry for this root’s nodes, so the selection overlay, the measure/snap guides and the empty-container hints cannot be drawn",fix:"the adapter must expose a `rects` provider (`AuthoringAdapter.rects`)"},boxEdit:{missing:"nothing in this root can be moved or resized by dragging it — its spatial values are reachable only by typing numbers into the inspector",fix:"the adapter must expose a `boxEdit` provider (`AuthoringAdapter.boxEdit`)"},text:{missing:"text in this root cannot be edited in place — double-click does nothing",fix:"the adapter must expose a `text` provider (`AuthoringAdapter.text`)"},colorSample:{missing:"the eyedropper has no fallback path on this root, so colour picking is dead wherever the browser has no native `EyeDropper`",fix:"the adapter must expose a `colorSample` provider (`AuthoringAdapter.colorSample`)"},stories:{missing:"no component of this root can be opened against a story: its prefabs never appear on the component board, and a designer cannot open, apply or isolate a design-time state",fix:"the adapter must expose a `stories` provider (`AuthoringAdapter.stories`) reading the root’s colocated portable CSF"},truth:{missing:"the editor cannot say where any object in this world came from, so an inspector edit has no source address to be written back to",fix:"the adapter must expose a `truth` provider (`AuthoringAdapter.truth`)"},spatialHandles:{missing:"component-owned spatial values in this world (an audio attenuation radius, a light cone, a collider extent) are invisible in the viewport and cannot be dragged",fix:"the adapter must expose a `spatialHandles` provider (`AuthoringAdapter.spatialHandles`)"},assetDrop:{missing:"nothing can be dropped into this world: a model, image or material dragged from the asset browser onto the viewport or the hierarchy is refused",fix:"the adapter must expose an `assetDrop` provider (`AuthoringAdapter.assetDrop`)"},subscribe:{missing:"this root never tells the editor its tree changed, so the hierarchy and inspector show a stale projection until something else happens to re-render them",fix:"the adapter must implement `subscribe` (`AuthoringAdapter.subscribe`)"}},re={three:{assetSubject:"the current asset-subject contract is an inline SVG embedded in a DOM source document; a Three scene-graph node has no such representation",rects:"screen rects are the DOM visual editor’s coordinate system; a three root is manipulated in world space through the gizmo",boxEdit:"the CSS box model has no three analogue — spatial editing here is the `transforms` provider plus the gizmo",text:"a three world has no editable element text body",colorSample:"the eyedropper’s CSS background-chain walk has no three analogue"},canvas:{assetSubject:"the current asset-subject contract is an inline SVG embedded in a DOM source document; a canvas display node has no such representation",text:"a canvas world has no editable element text body",colorSample:"the eyedropper’s CSS background-chain walk has no canvas analogue"},dom:{transforms:"a DOM root has no 3D transform; its spatial editing is the `boxEdit` provider, which is reported on its own row",spatialHandles:"world-space component guides have no DOM analogue — a DOM root’s geometry is its box, reported by `rects`/`boxEdit`"}},ie=Object.freeze(Object.fromEntries(w.map(e=>[e,!1]))),ae=Object.freeze({captured:!1,providers:ie});function Je(e,t="root"){const{authoring:o}=e;return o?ne(o,t):ae}function ne(e,t="root"){const o=P(e),s=M({adapter:e,subject:t,epoch:o,receipts:se({adapter:e,subject:t,epoch:o})}),r={...F(e)},i=e.childAdapters?.();return i&&(r.pickable||=i.some(a=>a.adapter.pickable!==void 0),r.provenance||=i.some(a=>a.adapter.provenance!==void 0)),{captured:!0,providers:r,providerEvidence:s.providers,captureEvidence:s.hierarchyWalk}}function C(e,t){return e===null?null:re[e]?.[t]??null}function ce(e,t=null){return w.filter(o=>!e.providers[o]&&C(t,o)===null)}const de="capability-gap";function Xe(e,t,o,s=null){const r=[];t.captured||r.push(` ✗ capture — ${v.missing}
|
|
2
|
-
fix: ${v.fix}`);for(const i of ce(t,s))r.push(` ✗ ${i} — ${m[i].missing}
|
|
3
|
-
fix: ${m[i].fix}`);return r.length===0?null:[`${de} world "${e}" — ${r.length} editor capabilit${r.length===1?"y is":"ies are"} missing (${o}). This world is not authorable the way a native one is:`,...r].join(`
|
|
4
|
-
`)}const k=new WeakMap;let le=1;function he(e){const t=k.get(e);if(t)return t;const o=`contract-${le++}`;return k.set(e,o),o}function ue(e){const t=e.subject??"game",o=e.epoch??he(e.contract),s=[...$({prefix:"contract",value:e.contract,shape:V,subject:t,epoch:o}),...$({prefix:"contract.lifecycle",value:e.contract.lifecycle,shape:z,subject:t,epoch:o}),...$({prefix:"contract.systems",value:e.contract.systems,shape:U,subject:t,epoch:o}),...T.receipts({subject:t,epoch:o}),...e.receipts??[]],r=(i,a)=>N({seam:i,subject:t,epoch:o,required:a,receipts:s});return{root:r("contract.root","effect"),start:r("contract.lifecycle.start","effect"),pause:r("contract.lifecycle.pause","effect"),resume:r("contract.lifecycle.resume","effect"),systems:r("contract.systems","operation")}}class p extends Error{constructor(t){super(`coverage-accounting: ${t}`),this.name="CoverageReconcileError"}}function pe(e){const t=e.indexOf(".");return t===-1?e:e.slice(0,t)}function fe(e){return e?/^\[([^\]]+)\] /.exec(e)?.[1]??null:null}function me(e){return e.subject!==void 0&&e.subject!==null&&e.subject!==""?e.subject:fe(e.detail)}function I(e,t){const o=e??{gap:!1,applicable:!1};return t==="na"?o:{gap:o.gap||t==="gap",applicable:!0}}function ge(e,t){const o=new Map;for(const i of t)o.set(i.seam,I(o.get(i.seam),i.status));let s=0,r=0;for(const i of o.values())i.applicable&&(s+=1,i.gap&&(r+=1));return{family:e,capabilities:s,capabilityGaps:r,rootInstances:t.length}}function O(e){const t=new Set,o=new Map;for(const n of e){const c=me(n);c!==null&&t.add(c);const d=pe(n.seam),h=o.get(d);h?h.push(n):o.set(d,[n])}const s=[...o].map(([n,c])=>ge(n,c)),r=new Map;for(const n of e)r.set(n.seam,I(r.get(n.seam),n.status));let i=0,a=0;for(const n of r.values())n.applicable&&(i+=1,n.gap&&(a+=1));return{capabilities:i,capabilityGaps:a,rootsGraded:t.size,rootInstances:e.length,families:s}}function be(e){return`${e.capabilityGaps} of ${e.capabilities} capabilities are MISSING`}function ye(e){return`${e.rootsGraded>0?`${e.rootsGraded} roots graded; `:""}${e.rootInstances} root-instances`}function we(e,t={}){const o=t.rootsGraded??0,s=e.rootInstances!==e.capabilities||o>1,r=`${e.family} ${e.capabilityGaps} of ${e.capabilities} capabilities`;if(!s)return r;const i=o>1?`${o} roots graded; `:"";return`${r} (${i}${e.rootInstances} root-instances)`}function ve(e,t){return e.family==="editor"?{rootsGraded:t.rootsGraded}:{}}function $e(e,t){const o=t.families.map(s=>we(s,ve(s,t))).join(", ");return`${e} — ${be(t)} (${ye(t)}: ${o}).`}function xe(e){const t=/(\d+) of (\d+) capabilities are MISSING/.exec(e);if(!t)throw new p('headline does not state the capabilities unit (missing "N of M capabilities are MISSING")');const o=/(\d+) roots graded/.exec(e),s=/(\d+) root-instances/.exec(e);if(!s)throw new p("headline does not state root-instances");return{capabilityGaps:Number(t[1]),capabilities:Number(t[2]),rootsGraded:o?Number(o[1]):0,rootInstances:Number(s[1])}}function Ae(e,t){const o=O(e),s=xe(t);if(s.capabilityGaps!==o.capabilityGaps)throw new p(`headline capability-gaps ${s.capabilityGaps} !== row-derived ${o.capabilityGaps}`);if(s.capabilities!==o.capabilities)throw new p(`headline capabilities ${s.capabilities} !== row-derived ${o.capabilities}`);if(s.rootInstances!==o.rootInstances)throw new p(`headline root-instances ${s.rootInstances} !== row-derived ${o.rootInstances}`);if(s.rootsGraded!==o.rootsGraded)throw new p(`headline roots-graded ${s.rootsGraded} !== row-derived ${o.rootsGraded}`);const r=o.families.reduce((a,n)=>a+n.rootInstances,0);if(r!==o.rootInstances)throw new p(`family root-instances ${r} !== ${o.rootInstances}`);const i=o.families.reduce((a,n)=>a+n.capabilities,0);if(i!==o.capabilities)throw new p(`family capabilities ${i} !== ${o.capabilities}`)}const je={export:!0},Qe=Object.keys(je),Ze=Object.keys(L);function et(e){const t=e?.systems;return{declared:e!==null,root:e?.root!==void 0,start:e?.lifecycle?.start!==void 0,pause:e?.lifecycle?.pause!==void 0,resume:e?.lifecycle?.resume!==void 0,systems:t?{commands:(t.commands??[]).map(o=>o.name),state:(t.state??[]).map(o=>o.name)}:null,proof:e?ue({contract:e}):null}}const Se="a game whose bytes must stay unmodified declares it from a host-side carrier instead — a contract shim beside the game (`ingest.contractShim` in its vgai.project.json, injected ahead of the game`s entry module; see public/ingest/simcity/vgai.shim.js) or a recorded patch",u=e=>`declare ${e} in the game's own entry; ${Se}`;function ke(e){const t=e.reachMechanism?` — ${e.reachMechanism}`:"";if(e.reach===null)return[{seam:"editor.capture",status:"info",detail:"no mount has measured what the editor reaches on this root yet"},...w.map(i=>({seam:`editor.${i}`,status:"info",detail:`no mount has measured whether this root exposes ${i} yet`}))];const o=e.reach,s=o.captured?o.captureEvidence?.state==="verified"?{seam:"editor.capture",status:"ok",detail:`the editor reached this root's own runtime and exercised its hierarchy — ${o.captureEvidence.detail}${t}`}:o.captureEvidence?.state==="failed"?{seam:"editor.capture",status:"gap",detail:`an authoring object was captured, but its hierarchy seam failed — ${o.captureEvidence.detail}${t}`,missing:S.missing,fix:S.fix}:{seam:"editor.capture",status:"info",detail:`an authoring object was captured, but no current-epoch hierarchy operation proves it projects this root's runtime${o.captureEvidence?` — ${o.captureEvidence.detail}`:""}${t}`}:{seam:"editor.capture",status:"gap",detail:`the editor never reached this root's runtime${t}`,missing:v.missing,fix:v.fix},r=w.map(i=>{const a=`editor.${i}`,n=o.providerEvidence?.[i],c=C(e.surface,i);return!o.providers[i]&&c!==null?{seam:a,status:"na",detail:`not applicable to a ${e.surface} root — ${c}`}:n?.state==="verified"?{seam:a,status:"ok",detail:n.detail}:n?.state==="failed"?{seam:a,status:"gap",detail:`${i} is exposed but malformed or failed — ${n.detail}${t}`,missing:m[i].missing,fix:m[i].fix}:o.providers[i]?{seam:a,status:"info",detail:n?.detail??`this root exposes ${i}, but no operational proof was recorded`}:{seam:a,status:"gap",detail:`this root exposes no ${i} provider${t}`,missing:m[i].missing,fix:m[i].fix}});return[s,...r]}function Ee(e){const t=e.loopReason?` — ${e.loopReason}`:"",{pause:o,resume:s}=e.contract;return o&&s&&e.contract.proof?.pause.state==="verified"&&e.contract.proof.resume.state==="verified"?{seam:"loop",status:"ok",detail:`the game's own declared lifecycle.pause + resume control its frames, and that is what ▶/⏸ call${e.loopReason?` (the host's fallback gate, unused here, reports: ${e.loopReason})`:""}`}:e.loop?.verdict==="gated"?{seam:"loop",status:"ok",detail:`gated${t}`}:e.loop?.verdict==="self-driven"?{seam:"loop",status:"gap",detail:`self-driven${t}`,missing:"nothing in this editor controls the game's frames: ▶/⏸ and Step do not stop it, and Edit mode cannot be quiet — it keeps simulating while you author",fix:u("window.vgaiGame.lifecycle.pause + resume")}:{seam:"loop",status:"info",detail:e.loopReason??"no loop verdict has been measured yet — the probe runs at the first pause"}}function Re(e){return e.contract.root?e.contract.proof?.root.state==="failed"?{seam:"contract.root",status:"gap",detail:`the game declares a root, but the seam failed — ${e.contract.proof.root.detail}`,missing:"the host cannot trust that the declared element owns the game DOM rather than an unrelated or detached subtree",fix:u("window.vgaiGame.root")}:{seam:"contract.root",status:e.contract.proof?.root.state==="verified"?"ok":"info",detail:e.contract.proof?.root.state==="verified"?e.contract.proof.root.detail:"the game declares a root element, but no consumer has proved it owns the mounted game DOM"}:{seam:"contract.root",status:"gap",detail:e.contract.declared?"a contract is declared, but it names no root element":"no game→host contract is declared at all",missing:"the host adopts the bare canvas, so any DOM this game owns beside it (HUD, overlays, portals) is stranded at page level over the editor chrome instead of living in the game pane",fix:u("window.vgaiGame.root")}}function De(e){return e.contract.start?e.contract.proof?.start.state==="failed"?{seam:"contract.lifecycle.start",status:"gap",detail:`lifecycle.start is declared but failed — ${e.contract.proof.start.detail}`,missing:"the mount cannot prove it starts cold and enters a session only when Play requests one",fix:u("window.vgaiGame.lifecycle.start")}:{seam:"contract.lifecycle.start",status:e.contract.proof?.start.state==="verified"?"ok":"info",detail:e.contract.proof?.start.state==="verified"?e.contract.proof.start.detail:"the game declares lifecycle.start, but no current-epoch effect proves that ▶ starts the session"}:{seam:"contract.lifecycle.start",status:"gap",detail:e.contract.declared?"a contract is declared, but it names no lifecycle.start":"no game→host contract is declared at all",missing:"the mount cannot be COLD: this game runs its session side-effects (backend connections, audio, narrative) as it loads, so opening it in the editor starts playing it, and ▶ is a wire event the game may ignore",fix:u("window.vgaiGame.lifecycle.start")}}function E(e){return e.loop?.verdict==="gated"?"pausing this game is the host's outside-in loop gate only. That gate is MEASURED to hold the work this game schedules, so ⏸ does stop it — but a host reaching in is not the game quieting itself: anything it drives from outside its own scheduling (a worker, a socket, a media callback) keeps running, and it gets no chance to stop its audio, drop its connections, or checkpoint before the pause":e.loop?.verdict==="self-driven"?"pausing this game is the host's outside-in loop gate only, and that gate is MEASURED not to control this loop — so ⏸ may freeze the picture while the game keeps running underneath it":"pausing this game is the host's outside-in loop gate only, and no probe has measured whether that gate reaches this loop yet — so ⏸ may freeze the picture while the game keeps running underneath it"}function Ce(e){const{pause:t,resume:o,declared:s}=e.contract;if(t&&o){const i=e.contract.proof?.pause.state==="verified",a=e.contract.proof?.resume.state==="verified",n=[e.contract.proof?.pause,e.contract.proof?.resume].find(c=>c?.state==="failed");return n?{seam:"contract.lifecycle.pause",status:"gap",detail:`pause/resume is declared but failed — ${n.detail}`,missing:E(e),fix:u("window.vgaiGame.lifecycle.pause + resume")}:{seam:"contract.lifecycle.pause",status:i&&a?"ok":"info",detail:i&&a?"the mounted lifecycle exercised both declared pause + resume effects":"the game declares pause + resume, but declaration alone does not prove either changes its frames"}}const r=Ie(t,o);return{seam:"contract.lifecycle.pause",status:"gap",detail:r?`the contract declares ${r} — the host needs both to hand control back`:s?"a contract is declared, but it names no lifecycle.pause/resume":"no game→host contract is declared at all",missing:E(e),fix:u("window.vgaiGame.lifecycle.pause + resume")}}function Ie(e,t){return e?"lifecycle.pause without a resume":t?"lifecycle.resume without a pause":null}function G(e){const t=e?.byKind;if(!t)return"";const o=H.filter(s=>(t[s]??0)>0).map(s=>`${s} ${t[s]}`);return o.length>0?` (by write lane: ${o.join(", ")})`:""}function Oe(e){return{seam:"persistence",status:"gap",detail:`this game's base is writable, but NONE of the ${e.total} object(s) the editor projects from the mounted world has a source address — every edit stays ${e.destination}`+G(e),missing:"nothing you change here survives the session: the base may be written, but no line of this game's own source is known to address any object in it",fix:"serve this game's own source through the editor's authoring transform so its elements carry source stamps (a JSX world), or give it construction sites the creation-site index can see (a `new` expression in the game's own served module)"}}function Ge(e,t,o,s){const r=e.recorder??"whatever records this folder",i=t?`; ${t.addressable} of ${t.total} projected object(s) resolve to one, and the rest are runtime or library parts with no source of their own${G(t)}`:"",a=o!==null&&o.state!=="ready",n=_e(o);return s?.state==="failed"?{seam:"persistence",status:"gap",detail:`the write path is addressable, but its round trip failed — ${s.detail}`,missing:"the editor can issue a write but cannot trust that the game source and a cold remount reflect it",fix:"fix the failing write receipt named above; provider presence and a write acknowledgement are not persistence"}:{seam:"persistence",status:a?"gap":s?.state==="verified"?"ok":"info",detail:`this game's base is writable, so an edit can be written back to the line of its own source that built the object${i}${n}; the diff is recorded in ${r}`+(s?.state==="verified"?`; ${s.detail}`:"; no current-epoch cold-remount round trip has verified that path"),...a?{missing:"every object this game places from its own level data — its whole placed cargo — is unwritable while that writer is unreachable",fix:`make \`ingest.dataWriter\` loadable: ${o.reason??"it has not resolved yet"}`}:{}}}function _e(e){if(e===null)return"";if(e.state==="ready")return`, and an object the game anchored to a record in ${e.dataFile} is written back into that file`;const t=e.reason?` (${e.reason})`:"";return`, but its declared data writer is ${e.state}${t}, so an object anchored to a level-data record stays live-only`}function Pe(e){const{ownership:t}=e;if(t===null)return{seam:"persistence",status:"info",detail:"the editor has not asked who owns this game's source yet — until it answers, edits stay live-only"};const o=e.writeReach;return t.writable&&o!==null&&o.addressable===0?Oe(o):t.writable?Ge(t,o,e.dataWriter,e.persistenceProof):{seam:"persistence",status:"gap",detail:`edits are live-only — ${t.reason??"this game's source is not writable"}`,missing:"nothing you change survives the session: no source write-back, and by doctrine no sidecar will ever be invented to fake one",fix:"open this game from a folder the editor can write — creation-site persistence needs a writable base (the server decides, not the editor)"}}function R(e,t){return`${t.length} ${e}(s)${t.length>0?`: ${t.join(", ")}`:""}`}function Me(e){const{systems:t,declared:o}=e.contract,s=t?.commands??[],r=t?.state??[];return s.length>0||r.length>0?e.contract.proof?.systems.state==="failed"?{seam:"systems",status:"gap",detail:`the systems carrier is declared but failed — ${e.contract.proof.systems.detail}`,missing:"`game.commands()` / `game.providers()` cannot safely enumerate or invoke this carrier",fix:u("window.vgaiGame.systems (commands + state)")}:{seam:"systems",status:e.contract.proof?.systems.state==="verified"?"ok":"info",detail:e.contract.proof?.systems.state==="verified"?e.contract.proof.systems.detail:`the game declares ${R("command",s)}; ${R("state provider",r)}, but the agent door has not operationally enumerated/read them in this epoch`}:{seam:"systems",status:"gap",detail:t?"the contract declares a systems surface that names no commands and no state providers":o?"a contract is declared, but it names no systems":"no game→host contract is declared at all",missing:`this game exposes no verbs and no state to drive or read it with: \`game.commands()\` and \`game.providers()\` enumerate nothing, so there is no \`game.command(...)\` to play it from ${A("eval")} and no \`game.state(...)\` for ${A("status")} to see anything of what it is doing`,fix:u("window.vgaiGame.systems (commands + state)")}}const x={physics:"the editor cannot freeze a simulated body while the gizmo edits it, so a physics-driven object's pose is overwritten the next frame",networking:"the Network inspector shows nothing: no connection state, no room, no peers, and no authority answer to keep a server-owned object inspect-only",navigation:"the Navigation panel has no navmesh to report, query a path through, or draw",audio:"⏸ cannot silence this world's audio and the Audio debugger has no graph, transport, meters or events to show",camera:"the selected-camera Inspector cannot report which native camera/controller is active or whether a blend is in progress",get debug(){return`\`game.commands()\` and \`game.providers()\` enumerate nothing, so there is no verb to drive this game with and no state read for ${A("status")} to see`},renderDebug:"the Frame debugger cannot capture a frame and the Profiler has no render-memory snapshot"};function Fe(e){return e==="renderDebug"?"nothing a game declares reaches this slot — the host derives it from the captured renderer's own WebGL2 context (`ingest/ingest-render-debug.ts`), so a mount whose renderer has no such context (a stub context) can never have it":u(e==="debug"?"window.vgaiGame.systems (commands + state)":`window.vgaiGame.systems.systemAdapters.${e}`)}function Te(e){const t=`system.${e.slot}`;return e.state==="bound"?e.proof?.state==="failed"?{seam:t,status:"gap",detail:`a ${e.slot} adapter is bound, but its contract failed — ${e.proof.detail}`,missing:x[e.slot],fix:`fix the bound ${e.slot} adapter; registration is not evidence that its operations work`}:e.proof?.state!=="verified"?{seam:t,status:"info",detail:e.proof?.detail??`a ${e.slot} adapter is installed, but no current-epoch operational proof was recorded`}:{seam:t,status:"ok",detail:`a ${e.slot} adapter is installed in the editor's live system registry`}:e.state==="empty"?e.attestedBy==="host"?{seam:t,status:"info",attestedBy:"host",detail:`derived-empty (the HOST's observation, not the game's answer) — nothing filled ${e.slot} on a live mount: ${e.evidence??""}. The game has not itself declared this absence; \`absent(reason)\` in its \`systems\` table is what turns the host's inference into the game's own statement.`}:{seam:t,status:"info",attestedBy:"game",detail:`declared-empty (an attestation, not a mechanically verified absence) — the game answers that it has no ${e.slot}: ${e.evidence??""}`}:e.state==="malformed"?{seam:t,status:"gap",detail:`the game declared a ${e.slot} slot that could not be honoured — ${e.evidence??""}`,missing:x[e.slot],fix:"fix the declaration to engage with the row's evidence — the detail above names the specific conflict (a declared absence must name a contradicting shipped dependency; a declared adapter must be a real adapter or a { present: false, evidence } record)"}:{seam:t,status:"gap",detail:`no ${e.slot} adapter is installed and the game declares no answer for the slot`,missing:x[e.slot],fix:e.fix??Fe(e.slot)}}function Ne(e){const t=`project.${e.slot}`;return e.state==="present"?Le(e,t):{seam:t,status:e.state==="absent"?"gap":"info",detail:e.evidence,...e.missing?{missing:e.missing}:{},...e.fix?{fix:e.fix}:{}}}function Le(e,t){if(e.proof?.state==="failed")return{seam:t,status:"gap",detail:`${e.evidence}; the real verb failed — ${e.proof.detail}`,...e.missing?{missing:e.missing}:{},...e.fix?{fix:e.fix}:{}};const o=e.proof?.state==="verified";return{seam:t,status:o?"ok":"info",detail:o?`${e.evidence}; ${e.proof?.detail}`:`${e.evidence}; declaration is only a precondition — this verb has not completed successfully in the current evidence run`}}function He(e){const t=e.authoringSurface;if(!t)return[];const o=t.sceneDocuments===0?{seam:"authoring.scenes",status:"gap",detail:"the adapter scene table names no authorable scene with a document to open",missing:"Edit has no scene tab — a captured runtime can still be healthy while the authoring surface is empty",fix:"declare authorable scene-table entries with a mountable source or root region so planSceneDocument produces a document"}:t.availableIsolationDocuments<t.isolationDocuments?{seam:"authoring.scenes",status:"gap",detail:`the table plans ${t.isolationDocuments} isolation document(s) but only ${t.availableIsolationDocuments} are available to open`,missing:"declared scenes are absent from the Content catalog",fix:"register every planned isolation document in the available-document catalog"}:{seam:"authoring.scenes",status:"ok",detail:`${t.sceneDocuments} scene document(s) planned`+(t.isolationDocuments>0?`, ${t.openIsolationDocuments} of ${t.isolationDocuments} isolation tab(s) open, ${t.availableIsolationDocuments} available from Content`:"")},s=t.pieces===0&&t.sceneEntries===0?{seam:"authoring.pieces",status:"na",detail:"the scene table declares no scenes, so there is no surface to place prefabs on (a models or website project)"}:(t.storyFailures??0)>0?{seam:"authoring.pieces",status:"gap",detail:`${t.storyFailures} project story module(s) failed to load, so their prefabs are missing from the scene table (${t.pieces} resolved)`,missing:"the prefabs those stories register are absent from Content and the component board",fix:"read `editor.status().storyFailures` for each module and its error, and the console line naming the module the load failed on"}:t.pieces===0?{seam:"authoring.pieces",status:"gap",detail:"the resolved scene table contains no prefab entries",missing:"Content has no project pieces and the component board has nothing to show",fix:"add portable CSF stories inside the adapter region include globs so prefabsFromStories resolves entries"}:{seam:"authoring.pieces",status:"ok",detail:`${t.pieces} prefab(s) resolved from the scene table`};return[o,s]}function Ve(e){return{worldId:e.worldId,reach:e.reach??null,surface:e.surface??null,reachMechanism:e.reachMechanism??null,loop:e.loop??null,loopReason:e.loopReason??null,contract:e.contract??{declared:!1,root:!1,start:!1,pause:!1,resume:!1,systems:null},ownership:e.ownership??null,writeReach:e.writeReach??null,dataWriter:e.dataWriter??null,persistenceProof:e.persistenceProof,systemAdapters:e.systemAdapters??[],projectVerbs:e.projectVerbs??[],authoringSurface:e.authoringSurface??null}}function ze(e,t){const o="reach"in e||"surface"in e||"reachMechanism"in e,s="loop"in e||"loopReason"in e||"contract"in e,r="contract"in e,i="ownership"in e||"writeReach"in e||"dataWriter"in e||"persistenceProof"in e;return[...o?ke(t):[],...s?[Ee(t)]:[],...r?[Re(t),De(t),Ce(t)]:[],...i?[Pe(t)]:[],...r?[Me(t)]:[],...t.systemAdapters.map(Te),...t.projectVerbs.map(Ne),..."authoringSurface"in e?He(t):[]]}function tt(e){const t=ze(e,Ve(e));return{rows:t,summary:{worldId:e.worldId,rows:t.length,gaps:t.filter(o=>o.status==="gap").length,ok:t.filter(o=>o.status==="ok").length,na:t.filter(o=>o.status==="na").length,info:t.filter(o=>o.status==="info").length}}}function _(e,t){if(e===t)return!0;for(let o=0;o<e.children.length;o++){const s=e.children[o];if(s&&_(s,t))return!0}return!1}function ot(e){const t=[],o=(i,a)=>{if(i.tagName.toLowerCase()==="canvas"){const n=i.getBoundingClientRect();t.push({element:i,depth:a,area:Math.max(0,n.right-n.left)*Math.max(0,n.bottom-n.top)})}for(let n=0;n<i.children.length;n++){const c=i.children[n];c&&o(c,a+1)}};o(e,0);const s=t.filter(i=>i.area>0),r=s.length>0?s:t;return r.sort((i,a)=>a.area-i.area||i.depth-a.depth),r[0]?.element??null}const Ue=new Set(["script","style","link","meta","base","title","noscript"]);function st(e,t){const o=[],s=r=>{for(let i=0;i<r.children.length;i++){const a=r.children[i];a&&(_(a,t)?s(a):Ue.has(a.tagName.toLowerCase())||o.push(a))}};return s(e),o}const Be={gap:"✗",ok:"✓",na:"–",info:"·"};function D(e){const t=[` ${Be[e.status]} ${e.seam} — ${e.detail}`];return e.missing&&t.push(` missing: ${e.missing}`),e.fix&&t.push(` fix: ${e.fix}`),t.join(`
|
|
5
|
-
`)}function We(e,t){const o=$e(e,O(t));return Ae(t,o),o}function rt(e,t){const o=t.flatMap(s=>s.report.rows.map(r=>s.label?{...r,detail:`[${s.label}] ${r.detail}`}:r));return{rows:o,summary:{worldId:e,rows:o.length,gaps:o.filter(s=>s.status==="gap").length,ok:o.filter(s=>s.status==="ok").length,na:o.filter(s=>s.status==="na").length,info:o.filter(s=>s.status==="info").length}}}function Ye(e,t){const{summary:o}=e,s=t??`root coverage "${o.worldId}"`,r=[],i=e.rows.filter(n=>n.status==="gap"),a=e.rows.filter(n=>n.status!=="gap");return i.length>0&&r.push({level:"warn",message:[`${We(s,e.rows)} This game mounts, but the editor cannot do the following with it:`,...i.map(D)].join(`
|
|
6
|
-
`)}),a.length>0&&r.push({level:"info",message:[`${s} — ${o.ok} seam(s) present, ${o.na} not applicable to this surface, ${o.info} measured-only:`,...a.map(D)].join(`
|
|
7
|
-
`)}),r}function it(e){let t=null;return{report(o,s){if(t===o)return!1;t=o;for(const r of Ye(s))e(r);return!0}}}export{Qe as P,Ze as S,ne as a,Xe as b,it as c,tt as d,et as e,Ye as f,he as g,ot as h,st as i,Je as m,rt as u};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ui-board-document-DtTR_mBr.js","assets/index-CaG87ZF-.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-B5WjeCHm.css","assets/design-time-layers-CQgnmqc8.js","assets/root-stacking-BEd9ZvxC.js","assets/edit-mode-authoring-DBjaBTxM.js","assets/design-time-mount-registry-DUpXCg1U.js","assets/react-story-board-Bx7qYytV.js","assets/world-documents-C4t3iOD-.js","assets/react-canvas-navigation-Jowa_lJq.js","assets/component-board-registry-DrIa2csL.js","assets/surface-state-D9j6qNu8.js","assets/board-guides-_3R1t_-2.js","assets/CanvasSceneViewport-vqBlOz8P.js","assets/RootSelectionOverlay-BQC12Gdd.js","assets/eyedropper-session-bjPXnfeX.js","assets/layered-pick-B_-BRrRD.js","assets/viewport-editor-controls-BYaAZ_Ku.js","assets/inspect-C8RP8G5F.js","assets/inference-diagnostics-MGcIHEX6.js","assets/Toolbar-uLgsrB2z.js","assets/transform-mode-request-BnKpgRUW.js","assets/TransientHint-CgmkrmKF.js","assets/ReactCanvasControls-K98jOX9b.js","assets/story-media-presence-zTPlU9HR.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as a}from"./component-board-registry-DrIa2csL.js";import{dm as s,z as n,_ as i,M as c,al as d,eG as l}from"./index-CaG87ZF-.js";import{s as m,g as p}from"./story-media-presence-zTPlU9HR.js";const r="UI",u={medium:"dom",owner:"@volter/editor-game/react/ui-board",documentId:s,title:r,presence:()=>l()?p().dom?"present":"absent":null,subscribe:o=>{const e=m(o),t=d(o);return()=>{e(),t()}},install:async o=>{try{const{installUiBoard:e}=await i(async()=>{const{installUiBoard:t}=await import("./ui-board-document-DtTR_mBr.js");return{installUiBoard:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]));e(o)}catch(e){throw c.error(`Failed to load the ${r} board: ${String(e)}`,"scene"),e}},absentReason:()=>`This project has no ${r} board (${s}): board presence keys on STORIES, not on roots, and none of this project's stories declares the "dom" medium. Declare it — a manifest root entry naming the story's module, or a \`vgai.adapter.ts\` regionInclude that covers it — and the board appears. ${n("console")} names every story it could not place.`},_="workspace.service";function b(){return a(u)}const h=Object.freeze(Object.defineProperty({__proto__:null,point:_,start:b},Symbol.toStringTag,{value:"Module"}));export{r as U,h as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as n,b as i}from"./oid-transform-Bzc2ZJSH.js";import"./index-CaG87ZF-.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"./writer-tw6EcuVO.js";import"./r3f-physics-binding-Bgzzd4ol.js";const m=Symbol.for("vgai.editor.componentContractAnalyzer");function r(o){globalThis[m]=o}const g="workspace.service";function z(){return r((o,t)=>n(o,t,i(o,t))),()=>r(null)}export{g as point,z as start};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as i}from"./user-data-CqOoAowZ.js";function u(n){return o(n)!==void 0}function e(n){const t=i(n,"authoringInstance");return typeof t=="string"&&t?t:void 0}function r(n){const t=n?.userData?.oid;return typeof t=="string"&&t?t:void 0}function o(n){const t=e(n);if(t!==void 0)return i(n?.parent,"authoringInstance")===t?void 0:t}function a(n){const t=n?.__vgaiOid;return typeof t=="string"&&t?t:void 0}function c(n,t){return t===0?n:`${n}#${t}`}function d(n){return n.includes("#")}function f(n,t){return r(n)===r(t)}function g(n){return o(n)??a(n)??r(n)}export{u as a,g as b,c,d,e as i,r as o,f as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as n}from"./jsx-runtime-DPjLkJKQ.js";import{a2 as s,$ as i,q as o}from"./index-CaG87ZF-.js";import"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";const w="workspace.status",f="Connection",g="left",y=20,e="tool:network.utility";function N(){const t=s(()=>o().systems.inspectedNetworking()?.getConnectionState?.()??null);return t===null?null:n.jsxs(i,{type:"button",variant:"ghost",size:"compact",className:"vgai-status-action","data-testid":"status-connection","data-connection-state":t,onClick:()=>o().workspace.showUtility(e),title:"Network connection state — open Network diagnostics",children:["net: ",t]})}export{g as align,N as default,y as order,w as point,f as title};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{a as y}from"./three-contract-Dkt6PmWY.js";import{i as x}from"./component-instance-root-df4ofoOR.js";import{ae as j,aJ as i,dU as v,fa as k,fb as c,$ as h,eT as S}from"./index-CaG87ZF-.js";import{constraintsOf as C}from"./constraint-5KLYpGm7.js";import"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{u as F}from"./three-state-wXRU3rLr.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./user-data-CqOoAowZ.js";import"./workspace-arrangement-DIMM7ska.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./user-data-dHvLdpwM.js";import"./object-marks-DwvIEBOK.js";import"./editor-shell-store-Bh1S7M54.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./Pass-D1MRT672.js";import"./editor-layers-B4oYfpj8.js";import"./entity-object-B_5Gc0Ky.js";function g(r,n){return n?y(r.hierarchy,n):null}function b(r){if(!r)return[];const n=x(r),u=new Set,m=a=>{const l=x(a);if(!(a!==r&&n!==void 0&&l!==void 0&&l!==n)){for(const o of C(a))u.add(o);for(const o of a.children)m(o)}};return m(r),[...u]}function w(r,n){return b(g(n,r?.id??null)).length>0}const O={ready:"Ready",disabled:"Disabled",unresolved:"Unresolved",error:"Error"};function D(r){return r==="two-bone-ik"?"Two Bone IK":r==="ccd-ik"?"CCD IK":r==="aim"?"Aim":r==="rotation"?"Rotation":r}function T({adapter:r,nodeId:n}){const u=F(),m=n?u.objectMap.get(n)??g(r,n)??null:null,a=b(m).sort((o,s)=>o.config.order-s.config.order),l=o=>{if(!o)return;const s=r.hierarchy.idForObject3D?.(o);s&&(S(r,[s],{intent:"exact"})||u.shell.select(s))};return t.jsx("div",{style:{display:"grid",gap:10},children:a.map((o,s)=>{const d=o.config,e=o.getSnapshot(),p=d.type==="two-bone-ik"||d.type==="ccd-ik";return t.jsxs("div",{style:{border:`1px solid ${j.boundary.default}`,borderRadius:6,overflow:"hidden"},children:[t.jsxs("div",{style:{alignItems:"center",background:j.surface.raised,display:"flex",gap:8,justifyContent:"space-between",padding:"6px 8px"},children:[t.jsx(i,{children:`${s+1}. ${d.label}`}),t.jsx(i,{tone:"muted",children:D(d.type)})]}),e.message&&(e.status==="error"||e.status==="unresolved")?t.jsx(v,{tone:"error",children:e.message}):null,t.jsxs(k,{children:[t.jsx(c,{label:"Status",children:t.jsx(i,{tone:e.status==="error"||e.status==="unresolved"?"danger":e.status==="ready"?"success":"muted",children:O[e.status]})}),t.jsx(c,{label:"Weight",children:t.jsx(i,{tone:"muted",children:`${Math.round(d.weight*100)}%`})}),p?t.jsx(c,{label:"Chain",children:t.jsx(i,{tone:"muted",children:e.chain.map(f=>f.name||f.type).join(" → ")||"Unresolved"})}):t.jsx(c,{label:"Constrained",children:e.constrained&&r.hierarchy.idForObject3D?.(e.constrained)?t.jsx(h,{size:"compact",onClick:()=>l(e.constrained),children:e.constrained.name||"Select object"}):t.jsx(i,{tone:"muted",children:e.constrained?.name||"Unresolved"})}),e.error!==null?t.jsx(c,{label:e.error.unit==="degrees"?"Angular error":"Solve error",children:t.jsx(i,{tone:"muted",children:e.error.unit==="degrees"?`${e.error.value.toFixed(2)}°`:`${e.error.value.toFixed(3)} m`})}):null,t.jsx(c,{label:"Target",children:e.target&&r.hierarchy.idForObject3D?.(e.target)?t.jsx(h,{size:"compact",onClick:()=>l(e.target),children:e.target.name||"Select target"}):t.jsx(i,{tone:"muted",children:e.target?.name||"Dynamic target"})}),p?t.jsx(c,{label:"Pole",children:e.pole&&r.hierarchy.idForObject3D?.(e.pole)?t.jsx(h,{size:"compact",onClick:()=>l(e.pole),children:e.pole.name||"Select pole"}):t.jsx(i,{tone:"muted",children:e.pole?.name||"None"})}):null]})]},d.id)})})}const ee="selection.inspector",re="Constraints",te="link",ne=450;function oe(r,n){return w(r,n)}function ie({adapter:r,nodeId:n}){return t.jsx(T,{adapter:r,nodeId:n})}export{ie as default,te as icon,oe as match,ne as order,ee as point,re as title};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{B as C,eG as E,jC as I,aN as k,aO as A,av as p,jD as R,jE as L,jF as f,a4 as N,jo as F,jG as M,M as x,q as D}from"./index-CaG87ZF-.js";import{d as w,S as P,a as _,f as O,u as B}from"./capability-coverage-DQgg6UJe.js";import{p as T,a as S,i as G}from"./live-project-verbs-BOAQN3ME.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"./game-contract-seams-C0AVYwvO.js";function j(){const t=C();return!t||!E()?null:w({worldId:p()?.config.name??"project",authoringSurface:I(t.scenes,A().map(e=>e.descriptor.id),k().map(e=>e.descriptor.id))})}const W={physics:["@react-three/rapier","@dimforge/rapier3d-compat","@dimforge/rapier2d-compat"],networking:["colyseus.js"],navigation:["recast-navigation","@recast-navigation/core"],audio:["tone","howler"]};function V(t,e){if(e.dependencies===null)return[];const s=W[t];return s?s.filter(r=>e.dependencies?.includes(r)):[]}function K(t,e){return`this project depends on ${e.join(" + ")}, so "nothing built a ${t} world" is not a settled answer. Reach a terminal state either way: BIND it — declare the game's own ${t} adapter in the root entry's \`systems\` table — or DECLARE the absence with \`absent(reason)\` in that same table. The reason must NAME the dependency and say why it is there while the subsystem is not (a transitive pull, a leftover, a build-only use); a declared absence blind to the shipped dependency grades malformed, not terminal.`}function Y(t,e){const s=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(/^[a-z0-9]+$/i.test(e)){if(new RegExp(`\\b${s}\\b`,"i").test(t))return!0}else if(t.toLowerCase().includes(e.toLowerCase()))return!0;const r=new Set(["compat","core","client","server","node","react","three","libs","api","sdk","util","utils","plugin","plugins","tools","types","browser"]),o=c=>c.toLowerCase().split(/[.\-_/]+/).filter(v=>v.length>=4&&!r.has(v)),[a,d]=e.toLowerCase().startsWith("@")?[e.slice(1,e.indexOf("/")),e.slice(e.indexOf("/")+1)]:["",e];let n=o(d);n.length===0&&(n=o(a));const i=n.map(c=>c.replace(/\d+d?$/,"")).filter(c=>c.length>=4);return[...new Set([...n,...i])].some(c=>new RegExp(`\\b${c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"i").test(t))}const q="this project's vgai.project.json declares no `server` block, so there is no room for a NetworkingAdapter to describe",z={physics:"no mounted root built a physics world — the engine seeds this slot from the root that creates one (a `setup` root, or an R3F tree using the Rapier bridge), so nothing in this game simulates bodies",navigation:"no mounted root registered a navigation adapter — the engine seeds this slot from a world's own NavMeshManager registration, so this game has no navmesh",audio:"no mounted root built an audio context — the engine seeds this slot from the root that creates one, so there is no audio graph for the host to mute, meter or graph",camera:"no mounted root registered a camera-ownership system — the engine ships `createCameraOwnershipSystem` for a game that takes camera control (a cutscene rig), so this game's camera is gameplay-owned throughout",renderDebug:"no mounted root captured a real WebGL2 render context to derive one from — the engine seeds this slot only where the root owns the capture wiring (`adapter/setup-three-root-adapter.ts`), so the Frame debugger and the render-memory view have nothing to show for this game"};function b(t,e){return t==="networking"?"register a NetworkingAdapter from the game's own code (`ctx.registerSystemAdapter('networking', …)`) — this project declares a `server` block, so the editor's Network panel is dark for a game that IS networked":`register a ${t} adapter from the game's own code (\`ctx.registerSystemAdapter('${t}', …)\`), or build the subsystem the engine seeds it from`}function H(t,e){const s=new Map(e.declaredAbsences.map(r=>[r.slot,r]));return P.map(r=>{const o=s.get(r);if(t[r]!=null)return o?{slot:r,state:"malformed",evidence:`root "${o.rootId}" declares this slot absent — "${o.reason}" — but a ${r} adapter is bound on the live mount. One of the two is wrong: either the declaration is stale (delete the \`absent()\` marker) or something registers an adapter the game does not mean to have.`}:{slot:r,state:"bound",proof:R({slot:r,adapter:t[r],subject:"game"})};const a=V(r,e);if(o){const n=a.filter(c=>!Y(o.reason,c));if(n.length>0)return{slot:r,state:"malformed",evidence:`root "${o.rootId}" declares this slot absent — "${o.reason}" — but this project depends on ${n.join(" + ")} and the reason does not mention it. Either the absence is stale, or it holds and the reason should say why that dependency is present without the subsystem (naming it).`};const i=e.absencesFromLastMount?" — the declaration read at this session’s last play mount; play to re-read it live":"";return{slot:r,state:"empty",attestedBy:"game",evidence:a.length>0?`declared absent by root "${o.rootId}": ${o.reason} (the project does depend on ${a.join(" + ")}; the reason engages with that)${i}`:`declared absent by root "${o.rootId}": ${o.reason}${i}`}}if(a.length>0)return{slot:r,state:"unanswered",fix:K(r,a)};if(r==="networking")return e.declaresServer?{slot:r,state:"unanswered",fix:b(r)}:{slot:r,state:"empty",attestedBy:"host",evidence:q};const d=z[r];return d?{slot:r,state:"empty",attestedBy:"host",evidence:d}:{slot:r,state:"unanswered",fix:b(r)}})}function U(){const t=F()?.game,e=p()?.rootPath??null;return t?(e!==null&&(l={projectPath:e,absences:t.declaredSystemAbsences??[]}),{absences:t.declaredSystemAbsences??[],fromLastMount:!1}):l!==null&&l.projectPath===e?{absences:l.absences,fromLastMount:!0}:{absences:[],fromLastMount:!1}}let l=null;function $(){if(L()!==null)return null;const t=p();if(!t)return null;const e=f();if(e.length===0||e.every(r=>r.adapter.provenance?.source==="foreign"))return null;const s=U();return w({worldId:t.config.name,systemAdapters:H(N(),{declaresServer:(t.config.configurations??[]).some(r=>r.kind==="process"&&typeof r.port=="number"),declaredAbsences:s.absences,absencesFromLastMount:s.fromLastMount,dependencies:T()})})}function J(t){const e=w({worldId:t.worldId,reach:_(t.adapter,t.worldId),surface:t.surface,reachMechanism:null});return{worldId:t.worldId,surface:t.surface,report:e}}function g(){return f().map(J)}function Q(t=g()){const e=t.map(a=>({label:a.worldId,report:a.report})),s=$();s&&e.push({label:null,report:s});const r=S();r&&e.push({label:null,report:r});const o=j();return o&&e.push({label:null,report:o}),e}function X(t){const e=Q(t??g());return e.length===0?null:B(p()?.config.name??"session",e)}const y=new Set;let h=null,m=0;function u(){h=null,m=0}function Z(){if(M()){u();return}const t=g(),e=X(t);if(!e||e.summary.gaps===0){u();return}const s=f();if(s.length===0){u();return}const r=C()?.regions??[];if(r.length>1){const n=new Set(s.map(i=>i.worldId));if(r.some(i=>!n.has(i.id))){u();return}}if(t.some(n=>n.report.rows.find(i=>i.seam==="editor.capture")?.status!=="ok")){u();return}const o=`session coverage "${e.summary.worldId}"`,a=O(e,o).filter(n=>n.level==="warn"),d=a.map(n=>n.message).join(`
|
|
2
|
-
---
|
|
3
|
-
`);if(h===d?m++:(h=d,m=1),!(m<2))for(const n of a)y.has(n.message)||(y.add(n.message),x.warn(n.message,"coverage"))}const ge="workspace.service",ee=["rootCoverage","systemCoverage","projectCoverage","authoringCoverage"];function te(t){if(t)return{rootCoverage:t.rootCoverage??[],systemCoverage:t.systemCoverage??null,projectCoverage:t.projectCoverage??null,authoringCoverage:t.authoringCoverage??null};const e=$(),s=S(),r=j();return{rootCoverage:g().map(o=>({worldId:o.worldId,surface:o.surface,summary:o.report.summary,rows:o.report.rows.map(a=>({...a}))})),systemCoverage:e?{summary:e.summary,rows:e.rows.map(o=>({...o}))}:null,projectCoverage:s?{summary:s.summary,rows:s.rows.map(o=>({...o}))}:null,authoringCoverage:r?{summary:r.summary,rows:r.rows.map(o=>({...o}))}:null}}function he(){const t=D().session,e=t.reportFacet(te,{reusableKeys:ee}),s=t.onSample(Z),r=t.onCommandDispatched(o=>{o==="restart"&&G()});return()=>{e(),s(),r()}}export{ge as point,he as start};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{dZ as f,bz as d,t as x,bx as y}from"./index-CaG87ZF-.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const g="x-vgai-curve";function p(r,n){return r[n].label??n}function v(r,n,e){const s=r.points;for(let t=0;t<s.length;t++){const o=s[t];for(const a of["x","y"]){const{min:u,max:c}=n[a];(o[a]<u||o[a]>c)&&e.addIssue({code:"custom",path:["points",t,a],message:`${o[a]} is outside this curve's ${p(n,a)} domain [${u}, ${c}] — move the point inside the domain, or widen the axis in the schema (curve({ ${a}: { min, max } })).`})}if(t===0)continue;const i=s[t-1];o.x<=i.x&&e.addIssue({code:"custom",path:["points",t,"x"],message:`${o.x} must be strictly greater than the previous point's x (${i.x}) — curve points run left to right along x, with no duplicate x. Sort the points, or nudge this one.`})}}function K(r){const n=f({x:d().describe(`Position along ${p(r,"x")}.`),y:d().describe(`Value at that position, along ${p(r,"y")}.`)});return f({interpolation:y(["linear","smooth"]).describe('How the value moves between points: "linear" for straight segments, "smooth" for a monotone cubic that never overshoots them.'),points:x(n).min(2,{message:'a curve needs at least two points — add another { "x": …, "y": … } so the value has somewhere to travel between.'}).describe("Keys in increasing x order; the value is clamped outside the first/last x.")}).superRefine((e,s)=>v(e,r,s)).meta({[g]:r})}function M(r){let n=r;for(let e=0;e<5&&n;e++){const t=n.meta?.()?.[g];if(t&&typeof t=="object"&&"x"in t&&"y"in t)return t;n=n.def?.innerType}}function b(r){const n=r.length,e=[];for(let t=0;t<n-1;t++){const o=r[t],i=r[t+1];e.push((i.y-o.y)/(i.x-o.x))}const s=[e[0]];for(let t=1;t<n-1;t++)s.push((e[t-1]+e[t])/2);s.push(e[n-2]);for(let t=0;t<n-1;t++){const o=e[t];if(o===0){s[t]=0,s[t+1]=0;continue}let i=s[t]/o,a=s[t+1]/o;i<0&&(s[t]=0,i=0),a<0&&(s[t+1]=0,a=0);const u=i*i+a*a;if(u>9){const c=3/Math.sqrt(u);s[t]=c*i*o,s[t+1]=c*a*o}}return s}function O(r,n){const e=r.points;if(e.length===0)return 0;const s=e[0],t=e[e.length-1];if(e.length===1||n<=s.x)return s.y;if(n>=t.x)return t.y;let o=0;for(;o<e.length-2&&n>=e[o+1].x;)o++;const i=e[o],a=e[o+1],u=a.x-i.x;if(u<=0)return i.y;const c=(n-i.x)/u;if(r.interpolation==="linear")return i.y+(a.y-i.y)*c;const m=b(e),h=c*c,l=h*c;return(2*l-3*h+1)*i.y+(l-2*h+c)*u*m[o]+(-2*l+3*h)*a.y+(l-h)*u*m[o+1]}export{K as curve,M as curveAxesOf,O as sampleCurve};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const u=/^([A-Za-z0-9_-]+)#([A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]+)*)$/;function f(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function l(t,e,r){const n=[];return c(e,"",!0,(i,s)=>{const o=g(t,i,s,r);o&&n.push(o)}),n}function c(t,e,r,n){if(typeof t=="string"){n(t,e);return}if(Array.isArray(t)){t.forEach((i,s)=>{c(i,`${e}[${s}]`,!1,n)});return}if(f(t))for(const[i,s]of Object.entries(t))r&&i==="$schema"||c(s,e?`${e}.${i}`:i,!1,n)}function g(t,e,r,n){const i=u.exec(e);return!i||!n.has(i[1])?null:{inAsset:t,atPath:r||"(root)",ref:e,targetAsset:i[1],targetKeyPath:i[2].split(".")}}function A(t){const e=new Set(t.keys()),r=[];for(const[n,i]of t)for(const s of l(n,i,e)){const o=m(t.get(s.targetAsset),s);o!==null&&r.push({...s,missingSegment:o})}return r}function m(t,e){let r=t;for(const n of e.targetKeyPath){if(!f(r)||!(n in r))return n;r=r[n]}return null}function y(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function d(t){const e=[];return a(t,"",e),e}function a(t,e,r){const n=y(t);if(n){if(typeof n["x-vgai-ref"]=="string"){r.push({fieldPath:e||"(root)",targetStem:n["x-vgai-ref"]});return}if(f(n.properties))for(const[i,s]of Object.entries(n.properties))i!=="$schema"&&a(s,e?`${e}.${i}`:i,r);f(n.additionalProperties)&&a(n.additionalProperties,e,r)}}function h(t,e){return t.filter(r=>!e.has(r.targetStem)).map(r=>({fieldPath:r.fieldPath,targetStem:r.targetStem}))}export{u as DATA_REF_PATTERN,l as collectDataRefs,d as collectDeclaredRefFields,A as findDanglingDataRefs,h as findMissingRefTargets};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{DATA_REF_PATTERN as p}from"./data-check-core-CQEjuFyt.js";import{u as l}from"./index-CaG87ZF-.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 g(e){return new RegExp(`^${e}#[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)*$`)}function E(e){return l().regex(g(e),{message:`must be a "${e}#<key>" reference — expected the target asset stem "${e}", e.g. "${e}#some-key".`}).meta({"x-vgai-ref":e})}function u(e,o){let t=e;for(const r of o){if(t===null||typeof t!="object"||Array.isArray(t)||!(r in t))return r;t=t[r]}return null}function j(e,o){const t=p.exec(o);if(!t)throw new Error(`getRef: "${o}" is not a "file#key" reference — expected a string shaped like "some-file#some-key".`);const r=t[1],m=t[2],n=e.sourcePath?.split("\\").join("/").split("/").pop()?.replace(/\.data\.json$/,"");if(n!==void 0&&n!==r)throw new Error(`getRef: ref "${o}" names target asset "${r}", but the handle passed in is "${n}" (${e.sourcePath}). Pass the handle "${r}#..." actually names — getRef(${r}, ...), not getRef(${n}, ...).`);const i=m.split("."),a=e.get(),f=u(a,i);if(f!==null)throw new Error(`getRef: dangling ref "${o}" — "${f}" does not exist`+(n?` in ${n}.data.json`:"")+'. Fix the key or remove the ref (refs are "file#key" strings).');let s=a;for(const c of i)s=s[c];return s}export{E as dataRef,j as getRef};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as v}from"./debug-registry-l7k5Hjc8.js";import{r as _}from"./game-network-Bo_nlDR5.js";const D="vgai-debug",T=100,E=50,k=100,P=60,b=2e3,V="the host loop reported liveness 'loop-starved' and this session has no way to drive ticks — no recent rAF progress was observed. Check `vgai status` for the separate visibility readings; foreground/reload the editor, or start play to wire the run-ticks target, then retry.";async function L(n,s,d){const i=()=>n.state("time"),c=i();let l=c.tick,u=0,g=0;for(;;){const r=i();if(r.simSeconds-c.simSeconds>=s)return{stalled:!1};if(r.loopLiveness==="loop-starved"){if(!d)return{stalled:!0,starvedWithoutDriver:!0};if(g>=b)return{stalled:!0};g+=1;const e=s-(r.simSeconds-c.simSeconds),t=r.fixedDt,o=t!==void 0&&Number.isFinite(t)&&t>0?Math.max(1,Math.ceil(e/t-1e-9)):1;d(Math.min(P,o));const a=i();if(a.tick===r.tick&&a.simSeconds===r.simSeconds)return{stalled:!0};l=a.tick,u=0,await Promise.resolve();continue}if(u=r.tick===l?u+1:0,l=r.tick,u>=k)return{stalled:!0};await new Promise(e=>setTimeout(e,E))}}function h(){return typeof window<"u"}function S(n){return new URLSearchParams(n.search).get(D)==="1"}function A(n){return n.debug?.allowInProduction===!0}function I(n){const{registry:s,manifest:d}=n,i=s.adapter,c=[];function l(e){c.push(e),c.length>T&&c.shift()}const u=e=>{l(e.message||String(e.error))},g=e=>{l(`Unhandled promise rejection: ${String(e.reason)}`)};n.window.addEventListener?.("error",u),n.window.addEventListener?.("unhandledrejection",g);function r(e,t){const o=s.getVirtualInputTarget(t);if(!o)throw new v("DEBUG_INPUT_UNAVAILABLE",`debug bridge: ${e}() has no virtual-input target wired — no root entry exports \`debug.input\` (the game's own input door), or none has mounted yet`);return o}return{version:1,providers:i.providers,state:i.state,stateAll:i.stateAll,commands:i.commands,events:i.events,async invoke(e,t){if(!A(d))throw new v("DEBUG_COMMANDS_UNSUPPORTED",`debug: command "${e}" invocation refused — production build without debug.allowInProduction (D18)`,{name:e});return i.invoke(e,t)},input:{setVirtualAction:(e,t,o)=>r("setVirtualAction",o).setVirtualAction(e,t),tapVirtualAction:(e,t)=>r("tapVirtualAction",t).tapVirtualAction(e),clearVirtualActions:e=>r("clearVirtualActions",e).clearVirtualActions(),scheduleActionAtTick:(e,t,o,a)=>r("scheduleActionAtTick",a).scheduleActionAtTick(e,t,o),startRecording:e=>r("startRecording",e).startInputRecording(),stopRecording:e=>r("stopRecording",e).stopInputRecording(),isRecording:e=>r("isRecording",e).isInputRecording(),injectPointerDelta:(e,t,o)=>r("injectPointerDelta",o).injectPointerDelta(e,t),injectPointerPosition:(e,t,o)=>r("injectPointerPosition",o).injectPointerPosition(e,t)},snapshot(e){return{time:i.state("time"),state:i.stateAll(),events:i.events(e),pageErrors:c.slice()}},runTicks(e,t){const o=s.getRunTicksTarget();if(!o)throw new v("DEBUG_RUN_TICKS_UNAVAILABLE","debug bridge: runTicks() has no run-ticks target wired — no Game has mounted yet");o.runTicks(e,t)},runTicksSettled(e,t){return _(s,e,t)},async holdFor(e,t,o){const a=r("holdFor",o),w=a.setVirtualAction(e,!0);if(!w.delivered)return a.clearVirtualActions(),w.reason!==void 0?{delivered:!1,reason:w.reason}:{delivered:!1};const f=s.getRunTicksTarget(),{stalled:m,starvedWithoutDriver:p}=await L(i,t,f?R=>f.runTicks(R,{render:"last"}):void 0);return a.clearVirtualActions(),m?{delivered:!1,reason:p?V:"play stopped during hold"}:{delivered:!0}},uninstall(){n.window.removeEventListener?.("error",u),n.window.removeEventListener?.("unhandledrejection",g),delete n.window.__vgai}}}function U(n){const s=n.url??(h()?window.location:void 0);if(!s||!S(s))return;const d=n.window??(h()?window:void 0);if(!d)return;if(!A(n.manifest)){console.warn("[debug] ?vgai-debug=1 ignored: production build without debug.allowInProduction (D18)");return}const i=I({registry:n.registry,manifest:n.manifest,window:d});return d.__vgai=i,i}export{V as H,U as m,L as w};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d_ as L}from"./index-CaG87ZF-.js";function B(o){const s=Symbol.for(`@vgai/game-runtime/game-scoped/${o}`);return{set(u,d){Object.defineProperty(u,s,{configurable:!0,enumerable:!1,value:d})},get(u){return u[s]??null}}}class c extends Error{code;data;constructor(s,u,d){super(u),this.name="DebugError",this.code=s,this.data=d}}const T="ctx.debug.registerStateProvider(name, fn) — see the template example component";function P(o){if(o instanceof Error){const s={causeName:o.name,causeMessage:o.message};return o.stack===void 0?s:{...s,causeStack:o.stack}}return{causeName:typeof o,causeMessage:String(o)}}const q=1e4;function y(o,s,u,d){o.has(s)||(o.add(s),console.warn(`[debug] ${u} "${s}" re-registered (world "${d}")`))}function V(o){const s=new Map,u=new Map,d=new Set,S=new Set,m=[],R=500;let p=0,I=!1;const _=new Map,w=new Map,l=new Map;let E=null;const D=new Set;let b=null;const g=new Map;let N=0;function C(e){if(e!==void 0){if(!l.has(e))throw new c("DEBUG_INPUT_WORLD_NOT_FOUND",`debug: no input door wired for world "${e}" — registered: `+(l.size?[...l.keys()].join(", "):"(none)"),{worldId:e,registered:[...l.keys()]});return e}return h(l.keys())}function h(e){const t=[...e];if(t.length===0)return null;const r=o.getDefaultRootId?.()??null;return r!==null&&t.includes(r)?r:t[0]}s.set("time",{fn:()=>({simSeconds:o.getSimT(),tick:o.getTick(),loopLiveness:o.getLoopLiveness?.()??null,...o.getFixedDt===void 0?{}:{fixedDt:o.getFixedDt()}}),tier:"observable",worldId:"__engine__",builtin:!0}),s.set("input.actions",{fn:()=>{const e=h(_.keys());return(e?_.get(e):void 0)?.()??[]},tier:"observable",worldId:"__engine__",builtin:!0}),s.set("input.trace",{fn:()=>{const e=h(w.keys());return(e?w.get(e):void 0)?.()??{version:1,seed:null,fixedDt:null,ticks:[]}},tier:"observable",worldId:"__engine__",builtin:!0});function O(e,t,r,i){const n=s.get(t);if(n?.builtin)throw new c("DEBUG_BUILTIN_RESERVED",`debug: "${t}" is a built-in state provider (registered by "${n.worldId}") — built-in names cannot be registered over from a world`,{name:t,registered:n.worldId});if(n){if(n.worldId!==e)throw new c("DEBUG_NAME_COLLISION",`debug: state provider "${t}" is registered by both world "${n.worldId}" and world "${e}" — each provider name must be unique across live roots`,{name:t,roots:[n.worldId,e]});y(d,t,"provider",e)}s.set(t,{fn:r,tier:i,worldId:e,builtin:!1})}function A(e,t,r,i){if(r.locus===void 0&&I)throw new c("DEBUG_COMMAND_LOCUS_REQUIRED","this project declares a Colyseus room — declare locus: 'client' | 'server' so fixtures mutate authoritative state, not client prediction",{name:t,worldId:e});const n=u.get(t);if(n){if(n.worldId!==e)throw new c("DEBUG_NAME_COLLISION",`debug: command "${t}" is registered by both world "${n.worldId}" and world "${e}" — each command name must be unique across live roots`,{name:t,roots:[n.worldId,e]});y(S,t,"command",e)}u.set(t,{description:r.description,argsSchema:r.args,locus:r.locus,fn:i,worldId:e})}function k(e,t){p+=1,m.push({tick:o.getTick(),simT:o.getSimT(),event:e,detail:t,seq:p}),m.length>R&&m.shift()}function $(e){return e===void 0?m.slice():m.filter(t=>t.seq>e)}function G(e,t){if(!b)throw new c("DEBUG_COMMAND_FAILED",`debug: command "${e}" is locus:'server' but no Colyseus room is attached (call ctx.debug.attachRoom(room) once your game joins its room)`,{reason:"no room connection"});const r=`dbg-${++N}`,i=b;return new Promise((n,a)=>{const f=setTimeout(()=>{g.delete(r),a(new c("DEBUG_COMMAND_FAILED",`debug: command "${e}" (requestId "${r}") timed out waiting for the server`,{reason:"server timeout"}))},q);g.set(r,{resolve:n,reject:a,timer:f}),i.send("__vgai:debugCommand",{name:e,args:t,requestId:r})})}let v=null;function U(e){v?.(),b=e;const t=e.onMessage("__vgai:debugCommandResult",i=>{const n=i,a=n?.requestId;if(a===void 0)return;const f=g.get(a);f&&(g.delete(a),clearTimeout(f.timer),n?.ok?f.resolve(n.result):f.reject(new c("DEBUG_COMMAND_FAILED",`debug: server command failed: ${String(n?.error)}`,{cause:n?.error})))}),r=()=>{if(v===r){v=null,b===e&&(b=null),typeof t=="function"&&t();for(const[i,n]of g)clearTimeout(n.timer),n.reject(new c("DEBUG_COMMAND_FAILED",`debug: command (requestId "${i}") failed — its room was detached before a reply arrived`,{reason:"no room connection"}));g.clear()}};return v=r,r}return{adapter:{providers(){return[...s.entries()].map(([e,t])=>({name:e,tier:t.tier}))},state(e){const t=s.get(e);if(!t)throw new c("STATE_PROVIDER_NOT_FOUND",`debug: no state provider registered under "${e}"`,{registered:[...s.keys()],registrationHint:T});return t.fn()},stateAll(){const e={};for(const[t,r]of s)try{e[t]=r.fn()}catch(i){e[t]={__error:String(i)}}return e},commands(){return[...u.entries()].map(([e,t])=>({name:e,description:t.description,argsJsonSchema:t.argsSchema?L(t.argsSchema,{unrepresentable:"any"}):void 0,locus:t.locus??"client"}))},async invoke(e,t){const r=u.get(e);if(!r)throw new c("DEBUG_COMMAND_NOT_REGISTERED",`debug: no command registered under "${e}"`,{registered:[...u.keys()],registrationHint:T});let i=t;if(r.argsSchema){const n=r.argsSchema.safeParse(t);if(!n.success)throw new c("DEBUG_COMMAND_ARGS_INVALID",`debug: command "${e}" received invalid args`,{issues:n.error.issues});i=n.data}if((r.locus??"client")==="server")return G(e,i);try{return await r.fn(...i)}catch(n){const a=P(n);throw new c("DEBUG_COMMAND_FAILED",`debug: command "${e}" threw: ${a.causeMessage}`,{cause:n,...a})}},events(e){return $(e)}},forRoot(e){return{registerStateProvider(t,r,i){O(e,t,r,i?.tier??"observable")},registerCommand(t,r,i){A(e,t,r,i)},emit(t,r){k(t,r)},attachRoom(t){return U(t)}}},strip(e){for(const[t,r]of s)r.builtin||e!==void 0&&r.worldId!==e||(s.delete(t),d.delete(t));for(const[t,r]of u)e!==void 0&&r.worldId!==e||(u.delete(t),S.delete(t))},setRoomDeclared(e){I=e},setInputActionsSource(e,t){_.set(e,t)},setInputTraceSource(e,t){w.set(e,t)},setVirtualInputTarget(e,t){l.set(e,t)},getVirtualInputTarget(e){const t=C(e);return t!==null?l.get(t)??null:null},setRunTicksTarget(e){E=e},getRunTicksTarget(){return E},registerWorldSettledProbe(e){return D.add(e),()=>{D.delete(e)}},worldSettled(){for(const e of D)try{if(!e())return!1}catch{return!1}return!0},getGameTick(){return o.getTick()}}}const M=B("debug-registry");function j(o,s){M.set(o,s)}function H(o){return M.get(o)??null}export{c as D,V as a,B as c,H as g,j as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{stackOrder as se}from"./root-stacking-BEd9ZvxC.js";import{dn as ie,dp as de,dq as le,d9 as ae,av as ue,dr as L,bp as fe,M as P,bo as pe,aA as ce,ds as we,dc as he,da as ge}from"./index-CaG87ZF-.js";import{B as S,q as N}from"./edit-mode-authoring-DBjaBTxM.js";import{s as ye,d as I,a as me}from"./design-time-mount-registry-DUpXCg1U.js";import{d as Ie,s as be,g as ve,e as Se}from"./react-story-board-Bx7qYytV.js";const H=new Map;function J(n,r){return`${n}\0${r}`}function $e(n,r){return H.get(J(n,r))}function Be(n,r,o){H.set(J(n,r),o)}const ke=1;function K(n){const r=[];for(const{worldId:o,adapter:d}of n.childAdapters()){if(!(d instanceof S))continue;const a=d.inspector.get(o,"kind");if(a!=="dom"&&a!=="canvas"||d.inspector.get(o,"reason")!==void 0)continue;const b=d.inspector.get(o,"adapter");b?.startsWith("ingest")||b?.startsWith("module")||r.push({worldId:o,kind:a,path:d.inspector.get(o,"path"),zOrder:Number(d.inspector.get(o,"zOrder")??0),pausable:d.inspector.get(o,"pausable")!==!1})}return r}function je(n){return K(n)}const Ce="ui-components-board";function B(n,r){return n.childAdapters().some(o=>o.worldId===r)}function De(){return{worldId:Ce,kind:"dom",path:void 0,zOrder:0,pausable:!0}}function U(n,r,o="dom"){const d=ce(r)?"none":"block";n.style.display=d,n.style.pointerEvents=I(o)?.alwaysInteractive||we(r)?"auto":"none";for(const a of Array.from(n.parentElement?.children??[]))a instanceof HTMLElement&&a.dataset.vgaiStoryBoardChromeFor===r&&(a.style.display=d)}function Re(n,r,o,d){const{worldId:a}=r,s=document.createElement("div");return s.dataset.worldId=a,s.dataset.vgaiRootSurface="true",d&&(s.dataset.vgaiCanvasScene="true"),s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.width="100%",s.style.height="100%",s.style.zIndex=String(o),s.style.contain="layout paint",s.style.cssText+="font: initial; color: initial; letter-spacing: normal; word-spacing: normal; text-align: start; text-indent: 0; text-transform: none; white-space: normal; direction: ltr;",U(s,a,r.kind),j(s),n.appendChild(s),s}function j(n){if(n.dataset.vgaiCanvasScene==="true"){n.style.transform="",n.style.width="100%",n.style.height="100%";return}if(n.style.transform=he(ge())??"",n.style.transformOrigin="0 0",n.dataset.vgaiReactStoryBoard==="true")return;const r=ve();n.style.width=r.width===null?"100%":`${r.width}px`,n.style.height=r.height===null?"100%":`${r.height}px`}const E=new Map;function Ve(n,r,o,d,a,s,b){s?s.canvasSceneView.reset():ie(),Se();const k=ue();if(!s&&k?.config.resolution&&Ie(k.config.resolution.width,k.config.resolution.height),o.playState!=="stopped"){let e=!1,t=!1;const i=o.subscribe(()=>{e||t||o.playState!=="stopped"||(t=!0,e||N())});return()=>{e=!0,i()}}const D=k?.rootPath,z=d?[...d]:K(r);if(z.length===0||!D)return()=>{};const X=D,g=se(z.map(e=>({id:e.worldId,zOrder:e.zOrder}))).map(e=>z.find(t=>t.worldId===e.id)),V=new Map(g.map(e=>[e.worldId,e])),u=new Map,y=new Map,C=new Map,R=new Set,O=new Set,T=new Set;let h=!1,p=!1,A=!1;function W(){for(const e of y.values())try{e()}catch(t){P.error(`[design-time-layers] dispose failed: ${t}`,"authoring")}y.clear();for(const e of u.values())e.remove();u.clear();for(const e of g)a?.(e.worldId,null)}function Y(){W();for(const e of R){const t=V.get(e);if(!t)continue;const i={id:t.worldId,kind:t.kind,entryOrScenePath:t.path,zOrder:t.zOrder,pausable:t.pausable};r.replaceChild(e,new S(o,i,"Design-time layer suspended by play mode — Stop restores it."))}R.clear(),o.notifyIngestEdit()}function M(e,t,i){const l=I(e.kind);if(!l){O.add(e.worldId);return}O.delete(e.worldId);const f=(C.get(e.worldId)??0)+1;C.set(e.worldId,f);const c=Re(n,e,ke+t,!!s);u.set(e.worldId,c);const x={projectRootPath:X,store:o,...s?{view:s.canvasSceneView}:{},...b?{activationDocumentId:b}:{}},q=E.get(e.worldId),$=(async()=>(q&&await q,l.mount(e,c,x)))().then(w=>{if(h||p||C.get(e.worldId)!==f){w.dispose();return}if(w.adapter)B(r,e.worldId)&&(r.replaceChild(e.worldId,w.adapter),R.add(e.worldId)),a?.(e.worldId,w.adapter);else if(w.pick){const v={id:e.worldId,kind:e.kind,entryOrScenePath:e.path,zOrder:e.zOrder,pausable:e.pausable};r.replaceChild(e.worldId,new S(o,v,void 0,w.pick)),R.add(e.worldId)}y.set(e.worldId,w.dispose),L(e.worldId),o.notifyIngestEdit(),i?.()}).catch(w=>{if(C.get(e.worldId)!==f||(i?.(),c.remove(),u.get(e.worldId)===c&&u.delete(e.worldId),h||p))return;const v=fe(w);P.error(`[design-time-layers] world "${e.worldId}" (${e.kind}) failed to mount: ${v}`,"authoring");const ne={id:e.worldId,kind:e.kind,entryOrScenePath:e.path,zOrder:e.zOrder,pausable:e.pausable};a?.(e.worldId,null),B(r,e.worldId)&&r.replaceChild(e.worldId,new S(o,ne,v)),pe({worldId:e.worldId,kind:e.kind,identity:l.identity,message:v}),o.notifyIngestEdit()});E.set(e.worldId,$),$.then(()=>{E.get(e.worldId)===$&&E.delete(e.worldId)})}g.forEach((e,t)=>{M(e,t)});function Z(e,t){const i=y.get(e.worldId);y.delete(e.worldId);const l=u.get(e.worldId);u.delete(e.worldId),M(e,t,()=>{const c=u.get(e.worldId);if(c&&(c.style.visibility=""),i)try{i()}catch(x){P.error(`[design-time-layers] re-projection dispose failed: ${x}`,"authoring")}l?.remove()});const f=u.get(e.worldId);f&&f!==l&&(f.style.visibility="hidden")}function G(e,t){const i=y.get(e.worldId);if(y.delete(e.worldId),i)try{i()}catch(f){P.error(`[design-time-layers] remount dispose failed: ${f}`,"authoring")}const l=u.get(e.worldId);l&&(l.remove(),u.delete(e.worldId)),M(e,t)}const m=new Map;function F(){for(const[e,t]of m)I(e.kind)!==e&&(t(),m.delete(e));for(const e of me()){if(m.has(e)||I(e.kind)!==e||!g.some(l=>l.kind===e.kind))continue;const t=[],i=l=>()=>{h||p||o.playState!=="stopped"||g.forEach((f,c)=>{f.kind===e.kind&&l(f,c)})};e.remountWhen&&t.push(e.remountWhen(i(G))),e.reprojectWhen&&t.push(e.reprojectWhen(i(Z))),m.set(e,()=>{for(const l of t)l()})}}F();const Q=ye(()=>{h||p||o.playState!=="stopped"||(g.forEach((e,t)=>{O.has(e.worldId)&&I(e.kind)&&(T.delete(e.worldId),L(e.worldId),M(e,t))}),F())}),_=()=>{if(h||p)return;let e=!1;for(const t of g){if(!O.has(t.worldId)||T.has(t.worldId)||I(t.kind)||(T.add(t.worldId),!B(r,t.worldId)))continue;const i={id:t.worldId,kind:t.kind,entryOrScenePath:t.path,zOrder:t.zOrder,pausable:t.pausable};r.replaceChild(t.worldId,new S(o,i,`No package in this editor registered a design-time mount for a "${t.kind}" world, so there is nothing here to author it with.`)),e=!0}e&&o.notifyIngestEdit()},ee=de(_);le()&&_();const te=ae(()=>{for(const e of u.values())j(e)}),oe=be(()=>{for(const e of u.values())j(e)}),re=o.subscribe(()=>{if(!p&&o.playState!=="stopped"){p=!0,Y();return}if(p&&!A&&o.playState==="stopped"&&!h){A=!0,h||N();return}if(!p)for(const[e,t]of u)U(t,e,V.get(e)?.kind??"dom")});return()=>{h=!0;for(const e of m.values())e();m.clear(),Q(),ee(),re(),te(),oe(),W()}}export{Be as a,je as d,Ve as m,De as p,$e as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as it,a as at}from"./design-time-layers-CQgnmqc8.js";import{f7 as st,b8 as lt,g4 as ut,g5 as dt,M as E,g6 as mt,g7 as q,bp as Y,dj as U,al as ct,eG as z,am as $,d4 as pt,cg as ft,g8 as H}from"./index-CaG87ZF-.js";import{h as ht,d as gt,g as bt}from"./react-story-board-Bx7qYytV.js";import{C as wt}from"./crash-null-boundary-v3a0uEgw.js";import{r as yt,a as St}from"./realm-services-DefTrXnY.js";import{r as It}from"./react-root-BHA-cdrW.js";import{m as Rt}from"./StoryPreviewMount-Di8uMovM.js";import{c as vt,s as Mt}from"./story-presentation-BLXYPadR.js";import{d as Pt}from"./three-story-model-DgiAP-oQ.js";import{c as Ct}from"./inspect-C8RP8G5F.js";import{R as J}from"./react-world-authoring-adapter-C1jPW_cN.js";import"./root-stacking-BEd9ZvxC.js";import"./edit-mode-authoring-DBjaBTxM.js";import"./design-time-mount-registry-DUpXCg1U.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"./canvas-entry-runtime-DVeh71nC.js";import"./debug-registry-l7k5Hjc8.js";import"./three-ingest-runtime-CXKjNysA.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./EffectComposer-BEAt0PtQ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-DTnDQXm0.js";import"./Pass-D1MRT672.js";import"./CSS3DRenderer-BsAqfavI.js";import"./inference-diagnostics-MGcIHEX6.js";import"./board-guides-_3R1t_-2.js";import"./relative-import-specifier-DQzkawgj.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./writer-tw6EcuVO.js";function Et(e){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="svg"||o==="SVG"||o==="PICTURE")return!0;const r=getComputedStyle(e);if(r.visibility==="hidden"||r.display==="none")return!1;if(xt(r.backgroundColor)||r.backgroundImage&&r.backgroundImage!=="none"||r.boxShadow&&r.boxShadow!=="none"||r.borderStyle!=="none"&&r.borderStyle!==""&&(parseFloat(r.borderTopWidth)>0||parseFloat(r.borderRightWidth)>0||parseFloat(r.borderBottomWidth)>0||parseFloat(r.borderLeftWidth)>0))return!0;for(const n of e.childNodes)if(n.nodeType===Node.TEXT_NODE&&(n.textContent??"").trim()!=="")return!0;return!1}function xt(e){if(!e||e==="transparent")return!1;const o=/^rgba\(\s*[\d.]+\s*,\s*[\d.]+\s*,\s*[\d.]+\s*,\s*([\d.]+)\s*\)$/.exec(e);return o?parseFloat(o[1])>0:!0}function Nt(e,o=r=>r.getBoundingClientRect()){const r=o(e),n=e.offsetWidth;if(r.width<=0||n<=0)return null;const s=r.width/n;let d=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,y=Number.NEGATIVE_INFINITY;for(const p of e.querySelectorAll("*")){if(!Et(p))continue;const m=o(p);m.width<=0||m.height<=0||(d=Math.min(d,(m.left-r.left)/s),c=Math.min(c,(m.top-r.top)/s),i=Math.max(i,(m.right-r.left)/s),y=Math.max(y,(m.bottom-r.top)/s))}return i<=d||y<=c?null:{x:d,y:c,width:i-d,height:y-c}}let x=!1;function kt(e,o){if(!e)return;H({adapter:e,seam:"editor.stories.apply",stage:"effect",detail:`the design board applied portable story ${o}`,run:()=>e.stories.apply(o,o)});const r=e.selection;r&&H({adapter:e,seam:"editor.selection.set",stage:"effect",detail:`the design board selected portable story ${o}`,run:()=>r.set([o])})}let X=!1;async function Ft(){if(X)return;X=!0;const e=bt();if(!(e.width!==null||e.height!==null))try{const o=await ft("vgai.project.json");if(!o)return;const r=JSON.parse(o),n=r.resolution?.width,s=r.resolution?.height;if(typeof n!="number"||typeof s!="number"||n<64||s<64||n>4096||s>4096)return;gt(n,s)}catch{}}function Tt(e,o){return{id:e,surface:"dom",description:void 0,adapter:{type:"builtin",identity:"dom",surface:"dom"},entry:o,zOrder:0,pausable:!0,loop:"gated"}}async function At(e,o){try{const r=await St(o,pt());return{ok:!0,Entry:await It(e,r)}}catch(r){return{ok:!1,error:r}}}async function be(e,o,r){const{projectRootPath:n,store:s,activationDocumentId:d}=r;x?x=!1:await st({rootPath:n});const c=lt(),i=Pt(c),y=e.path,p=y?await At(Tt(e.worldId,y),n):{ok:!1,error:new Error(`design-time react layer "${e.worldId}": no \`entry\` declared — nothing to mount.`)},m=p.ok?ut(p.Entry):void 0,Q=m?dt(m,e.path):null,j=i.find(g=>g.id===Q?.id)??null;if(i.length>0){const g=it(n,e.worldId),R=i.find(t=>t.id===g)??j??i[0];e.path&&!j&&E.warn(`[design-time-layers] React root "${e.worldId}" has no story naming its entry component${m?` "${m}"`:""} — the board opens on "${R.label}". Give a *.stories.tsx a \`meta.component\` of this root's entry component to choose its default preview.`,"authoring");let k=!1,P=null,F=null;const T=new Map,D=vt(i);await Ft();const l=ht(o,i.map(t=>({id:t.id,label:t.label,modulePath:t.modulePath,...t.title?{title:t.title}:{},parameters:t.parameters,...t.globals?{globals:t.globals}:{},...t.viewportLocked!==void 0?{viewportLocked:t.viewportLocked}:{}})),R.id,(t,u)=>{F=u,kt(P,t)},Mt(i,D)),G=t=>{if(k)return;const u=l.frames.get(t.id);if(!u)return;if(t.parameters?.layout==="fullscreen"){l.setMeasuredFrame(t.id,null);return}const a={width:u.content.offsetWidth,height:u.content.offsetHeight},h=a.width>0?Nt(u.content):null;if(!h){l.setMeasuredFrame(t.id,null);return}const C=8,S=48;let b=Math.max(0,h.x-C),w=Math.max(0,h.y-C),v=Math.min(a.width,h.x+h.width+C),M=Math.min(a.height,h.y+h.height+C);if(v-b<S){const A=(S-(v-b))/2;b=Math.max(0,b-A),v=Math.min(a.width,b+S)}if(M-w<S){const A=(S-(M-w))/2;w=Math.max(0,w-A),M=Math.min(a.height,w+S)}if(v-b>=a.width*.9&&M-w>=a.height*.9){l.setMeasuredFrame(t.id,null);return}l.setMeasuredFrame(t.id,{frame:{width:Math.round(v-b),height:Math.round(M-w)},mount:a,offset:{x:Math.round(b),y:Math.round(w)}})},rt=t=>{setTimeout(()=>G(t),0),setTimeout(()=>G(t),1e3)},_=async(t,u=t.args)=>{const f=l.frames.get(t.id)?.content;if(f){try{const a=await Rt(f,t.modulePath,t.name,t.Component,u);if(!a)return;if(k){a.unmount();return}T.set(t.id,a),l.clearError(t.id),rt(t)}catch(a){const h=Y(a);l.setError(t.id,h),E.error(`[design-time-layers] React root "${e.worldId}" failed mounting portable story "${t.name}": ${h}`,"authoring")}s.notifyIngestEdit()}};await Promise.all(i.map(t=>_(t))),l.setNote(mt().note),g&&l.activate(R.id,!0);const L=new Map(i.map(t=>[t.id,t])),nt={tagName:"DIV",get children(){return l.activeContent().children},getAttribute:t=>o.getAttribute(t),getBoundingClientRect:()=>o.getBoundingClientRect(),get style(){return o.style},get textContent(){return l.activeContent().textContent}},O=await q();return P=new J(nt,s,{...O?{writeBackend:O}:{},designTokens:()=>{const t=l.activeContent(),u=t.closest?.("[data-vgai-game-styles]")??t.querySelector?.("[data-vgai-game-styles]")??t;return Ct(getComputedStyle(u))},assetRoot:o,portableStories:i.map(t=>({id:t.id,label:t.label,args:t.args,name:t.name,modulePath:t.modulePath})),portableHierarchy:D,activePortableStoryId:R.id,onPortableStoryApplied:t=>{const u=(t?L.get(t):null)??R;at(n,e.worldId,u.id);const f=F;F=null,l.activate(u.id,f===null||f==="zoom")},onPortableStoryArgsChanged:(t,u)=>{const f=L.get(t);f&&_(f,u).catch(a=>{E.error(`[design-time-layers] React root "${e.worldId}" failed updating portable story "${f.name}" args: ${Y(a)}`,"authoring")})}}),d&&requestAnimationFrame(()=>U(d)),{adapter:P,dispose:()=>{k=!0,P.disposeReactRootAdapter();for(const t of T.values())t.unmount();T.clear(),l.dispose()}}}if(!p.ok)throw p.error instanceof Error?p.error:new Error(String(p.error));E.warn(`[design-time-layers] React root "${e.worldId}" has no portable CSF preview — the project declares no UI stories. Add a *.stories.tsx; give it a \`meta.component\` of this root's entry component${m?` (${m}, ${e.path})`:""} to make it this root’s default preview. Falling back to rendering the entry bare.`,"authoring");const Z=p.Entry,{createElement:B,createRoot:tt,flushSync:et}=await yt(),N=tt(o),ot=g=>{N.render(B(wt,{key:"__entry__",onCaught:g,children:B(Z)}))};let I=null;if(et(()=>{ot(g=>{I=g})}),I!==null)throw N.unmount(),I instanceof Error?I:new Error(String(I));const V=await q(),W=new J(o,s,{...V?{writeBackend:V}:{}});return d&&requestAnimationFrame(()=>U(d)),{adapter:W,dispose:()=>{W.disposeReactRootAdapter(),N.unmount()}}}function K(){return $().map(e=>e.ok?e.stories.map(o=>o.id).join(","):`!${e.modulePath}`).join("|")}function we(e){let o=z()?$():null,r=o===null?null:K(),n=null;const s=ct(()=>{if(!z())return;const d=$(),c=K();if(o===null){o=d,r=c;return}const i=c!==r;o=d,r=c,i&&(n!==null&&clearTimeout(n),n=setTimeout(()=>{n=null,x=!0,e(),setTimeout(()=>{x=!1},0)},250))});return()=>{n!==null&&clearTimeout(n),n=null,s()}}export{be as mountReactDesignLayer,we as reprojectWhenStoriesRepublish};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{gl as k,M as p,a9 as I,gm as P,gn as N,az as H,go as C,bs as f,b2 as F,gp as g,gq as _,gr as W,gs as $,av as x,gt as O,gu as B,gv as M,gw as A,br as D,gx as T}from"./index-CaG87ZF-.js";const q={transform:!1,inspectorFields:!1,persist:!1};class G{capabilities=q;provenance={source:"boundary",label:"read-only",detail:"Declared world without a live editing surface in this viewport — disclosed, not simulated; rows are read-only."};world;reason;store;pickable;constructor(e,r,n,i){this.store=e,this.world=r,this.reason=n??null,i&&(this.pickable={pick:i})}get disclosure(){return this.reason}get label(){return this.world.entryOrScenePath?.split("/").pop()??this.world.id}get node(){return{id:this.world.id,label:this.label,secondaryLabel:this.reason?"Unavailable":"Read-only",role:"boundary",kind:this.world.kind,parentId:null,childIds:[]}}hierarchy={roots:()=>[this.node],node:e=>e===this.world.id?this.node:null};selection={get:()=>[...this.store.selectedEntityIds],set:e=>this.store.selectMultiple(e)};inspector={properties:e=>{if(e!==this.world.id)return[];const r=[{path:"kind",label:"Kind",type:"string",readonly:!0}];return this.world.adapter!==void 0&&r.push({path:"adapter",label:"Adapter",type:"string",readonly:!0}),this.world.entryOrScenePath!==void 0&&r.push({path:"path",label:"Entry / Scene",type:"string",readonly:!0}),r.push({path:"zOrder",label:"Z Order",type:"number",readonly:!0},{path:"pausable",label:"Pausable",type:"boolean",readonly:!0}),this.reason&&r.push({path:"reason",label:"Reason",type:"string",readonly:!0}),r},get:(e,r)=>{if(e===this.world.id)switch(r){case"kind":return this.world.kind;case"adapter":return this.world.adapter;case"path":return this.world.entryOrScenePath;case"zOrder":return this.world.zOrder;case"pausable":return this.world.pausable;case"reason":return this.reason??void 0;default:return}},set:(e,r,n)=>{}}}const u=new WeakMap,V=new Set;function R(){for(const t of V)t()}function J(t){const e=(u.get(t)?.generation??0)+1;return u.set(t,{generation:e,settled:!1}),R(),()=>{const r=u.get(t);!r||r.generation!==e||r.settled||(u.set(t,{generation:e,settled:!0}),R())}}const L="(invalid manifest)";let v=!1,b=!1,w=!1,l=null;function h(){if(b||w||!v||!l)return;b=!0;const t=l;queueMicrotask(()=>{if(b=!1,l!==t){h();return}v=!1,w=!0,Promise.resolve().then(t).catch(e=>{p.error(`Edit-mode rebuild failed: ${e instanceof Error?e.message:String(e)}`,"authoring")}).finally(()=>{w=!1,h()})})}function re(t){return l=t,h(),()=>{l===t&&(l=null)}}function ne(){v=!0,h()}const K=new Set(["three","canvas","dom"]);function d(t){return typeof t=="string"?t:void 0}function U(t){const e=t.world;if(!e||typeof e!="object")return;const r=d(e.entry);if(r)return{entry:r,export:d(e.export)}}function Z(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="object"){const e=t;if(typeof e.module=="string")return`module:${e.module}`;const r=e.ingest;if(r&&typeof r=="object")return"ingest"}}}function Q(t){if(!t||typeof t!="object")return null;const e=t.roots;return e===void 0||!Array.isArray(e)?null:{roots:e.map((n,i)=>{const s=n&&typeof n=="object"?n:{},a=s.zOrder,o=s.pausable;return{id:d(s.id)??`(world ${i})`,surface:(typeof s.adapter=="string"?d(s.adapter):void 0)??d(s.adapter&&typeof s.adapter=="object"?s.adapter.surface:void 0)??"(missing adapter surface)",adapter:Z(s.adapter),scene:d(s.scene),entry:d(s.entry),zOrder:typeof a=="number"?a:void 0,pausable:typeof o=="boolean"?o:void 0,dev:s.dev===!0,world:U(s)}})}}function X(t){return K.has(t.surface)?!t.scene&&!t.entry?`World "${t.id}" declares neither \`scene\` nor \`entry\` — nothing to mount.`:null:`Unknown world surface "${t.surface}" — expected one of: three, canvas, react.`}function c(t,e){const r=t.roots;if(Array.isArray(r))return r.find(n=>!!n&&typeof n=="object"&&n.id===e)}function E(t,e){return c(t,e)}class Y{raw;synthesizedValue;store;fileHistory;unsubscribeHistory;constructor(e,r,n){this.raw=e,this.synthesizedValue=r,this.store=n;const i=n.projectHistory;this.fileHistory=i?F(i,g(),"project-manifest"):null,this.unsubscribeHistory=this.fileHistory?this.fileHistory.subscribeAll(s=>{s==="vgai.project.json"&&g().readBytes(s).then(a=>JSON.parse(new TextDecoder().decode(a))).then(a=>{for(const o of Object.keys(this.raw))delete this.raw[o];Object.assign(this.raw,a),this.store.notifyIngestEdit()}).catch(()=>{})}):null}getGameName(){const e=this.raw.name;return typeof e=="string"?e:""}get synthesized(){return this.synthesizedValue}setGameName(e){this.raw.name=e,this.persist("Rename Game")}getRootContentSource(e){const r=c(this.raw,e);if(!r)return;const n=r.scene;if(typeof n=="string")return`Scene · ${n}`;const i=r.entry;return typeof i=="string"?`Entry · ${i}`:"Adapter-owned runtime content"}getRootZOrder(e){const r=c(this.raw,e)?.zOrder;return typeof r=="number"?r:0}setRootZOrder(e,r){const n=E(this.raw,e);n&&(n.zOrder=r,this.persist("Change World Order"))}getRootPausable(e){const r=c(this.raw,e)?.pausable;return typeof r=="boolean"?r:!0}setRootPausable(e,r){const n=E(this.raw,e);n&&(n.pausable=r,this.persist("Change World Pausing"))}async materialize(){const e=await this.write("Create Game Manifest");return e&&(this.synthesizedValue=!1),e}dispose(){this.unsubscribeHistory?.()}persist(e){this.synthesized||this.write(e)}async write(e){const r=JSON.stringify(this.raw,null,2);try{if(this.fileHistory)return await this.fileHistory.write("vgai.project.json",r,{label:e,kind:"manifest",contentType:"application/json"}),this.store.notifyIngestEdit(),!0;const n=async()=>{const i=await fetch("/__editor/manifest",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:"vgai.project.json",content:r,..._()})});W(i,"Write vgai.project.json failed"),i.ok||await $(i,{label:"Write vgai.project.json",attempted:{"vgai.project.json":r},reapply:n})};return await n(),this.store.notifyIngestEdit(),!0}catch(n){return this.fileHistory&&g().readBytes("vgai.project.json").then(i=>JSON.parse(new TextDecoder().decode(i))).then(i=>{for(const s of Object.keys(this.raw))delete this.raw[s];Object.assign(this.raw,i),this.store.notifyIngestEdit()}).catch(()=>{}),p.error(`Failed to write vgai.project.json: ${n}`,"project"),!1}}}let m=null;function ee(t,e,r){const n=I(e).map(o=>{const y=o.zOrder??0,j=P(o.surface);if(j)return{worldId:o.id,kind:o.surface,adapter:j(t,o.id),zOrder:y};const S=X(o),z={id:o.id,kind:o.surface,adapter:o.adapter,entryOrScenePath:o.scene??o.entry,zOrder:y,pausable:o.pausable??!0};return{worldId:o.id,kind:o.surface,adapter:new G(t,z,S??void 0),zOrder:y}}),i=r&&n.length>=1?new Y(r.raw,r.synthesized,t):void 0;m=i??null;const s=N(x()?.config),a=new H(n,i,s);if(n.length>=1){if(O()&&!B())return p.warn("Edit-mode authoring not installed: a foreign session (ingest/play) owns the authoring override.","authoring"),a;C(a),f(a),t.notifyIngestEdit()}else if(!O()){const o=D(t,"No world yet","Declare a root in vgai.project.json");M(o),f(o),t.notifyIngestEdit()}return a}function ie(t){t&&A()===t&&f(null);const e=T();e&&A()===e&&f(null),M(null),m?.dispose(),m=null}async function se(t){const e=J(t);let r,n;try{const i=await k(),s=i!==null&&Q(i);if(s)r=s,n={raw:i,synthesized:!1};else throw new Error("manifest has no `roots` array (zero roots is fine; a missing field is not)")}catch(i){const s=i instanceof Error?i.message:String(i);p.error(`Failed to load vgai.project.json: ${s}`,"project"),r={roots:[{id:"manifest",surface:L,adapter:s}]}}try{return ee(t,r,n)}finally{e()}}export{G as B,L as I,re as b,ie as e,se as i,Q as p,ne as q};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{O as e,X as r,bA as i,bB as a,bC as p,bD as m}from"./index-CaG87ZF-.js";import{bE as $t,bF as It,bG as Ht,bH as Ut,bI as qt,bJ as Bt,bK as Jt,b0 as Mt,bL as Vt,bM as Xt,bN as Zt,bO as _t,bP as Kt,aZ as Nt,bQ as Qt,bR as Yt,bS as zt,bT as te,bU as ee,bV as re,bW as oe,bX as se,bY as ie,bZ as ae,b_ as pe,b$ as me,c0 as ne,c1 as ce,c2 as le,c3 as de,c4 as be,c5 as ge,c6 as ue,c7 as Ee,c8 as Se,c9 as ye,ca as Pe,cb as je,cc as ve,cd as fe,ce as he,cf as Ae,cg as ke,ch as Ce,ci as Re,cj as we,ck as Fe,cl as Te,cm as xe,cn as Le,co as De,a_ as Ge,cp as We,cq as Oe,cr as $e,cs as Ie,ct as He,cu as Ue,cv as qe}from"./index-CaG87ZF-.js";import{o as Je,q as Me,t as Ve}from"./game-network-Bo_nlDR5.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-B-rWJfWE.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-l7k5Hjc8.js";import"./contract-system-adapters-h6OUBRYA.js";import"./game-contract-seams-C0AVYwvO.js";import"./seeded-random-38To73fI.js";import"./game-audio-CaGKzia4.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-BOAQN3ME.js";import"./capability-coverage-DQgg6UJe.js";import"./edit-mode-authoring-DBjaBTxM.js";import"./json-history-resource-CTXRV4GD.js";import"./binding-resolver-C_9MBSMa.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-DefTrXnY.js";import"./canvas-entry-runtime-DVeh71nC.js";import"./three-ingest-runtime-CXKjNysA.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-C7SNSmTd.js";import"./active-ingest-CnAeQcuQ.js";import"./ingest-source-persistence-6peGfPAS.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-B35t51xX.js";import"./mounted-authoring-B7RL_V28.js";import"./entity-object-B_5Gc0Ky.js";import"./user-data-CqOoAowZ.js";import"./workspace-arrangement-DIMM7ska.js";import"./three-contract-Dkt6PmWY.js";import"./three-oYrcK5SQ.js";import"./editor-layers-B4oYfpj8.js";import"./component-instance-root-df4ofoOR.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-BrkGH4cd.js";import"./source-persistence-backend-HviqjKZ2.js";import"./three-projection-core-jBJVt6O0.js";import"./body-marks-RKb_LTwL.js";import"./user-data-dHvLdpwM.js";import"./object-marks-DwvIEBOK.js";import"./structural-ids-Br2zjINh.js";import"./object3d-authoring-subject-BDrxd1GA.js";import"./r3f-physics-binding-Bgzzd4ol.js";import"./deferred-ingest-play-Bej67_y9.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-C1jPW_cN.js";import"./board-guides-_3R1t_-2.js";import"./relative-import-specifier-DQzkawgj.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-C8RP8G5F.js";import"./inference-diagnostics-MGcIHEX6.js";import"./writer-tw6EcuVO.js";import"./three-state-wXRU3rLr.js";import"./editor-shell-store-Bh1S7M54.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-DVkMQazS.js";async function Lt(){try{const t=await fetch(`${e}/examples`);return(await r(t,`GET ${e}/examples failed`)).examples}catch{return[]}}function Dt(t){return t.startsWith("/")?t:`${e}/learn-thumbnail?file=${encodeURIComponent(t)}`}async function Gt(){const t=await fetch(`${e}/templates`);return(await r(t,`GET ${e}/templates failed`)).templates}export{$t as AssetDeliveryError,m as abortGameplayRecordingSink,It as adaptProjectFolder,Ht as appendGameplayRecordingAsset,a as appendGameplayRecordingChunk,Ut as appendGameplayRecordingDomEvents,qt as archiveEditorWorktree,Bt as assetDeliveryIssueMessage,i as beginGameplayRecordingSink,Jt as browseFolder,Mt as captureProjectAssetHistory,Vt as connectEvents,Xt as connectTabPresence,Zt as createEditorWorktree,_t as createProject,Kt as delegateEditorTask,Nt as downloadOnlineAsset,Je as endLogSession,p as finishGameplayRecordingSink,Me as flushLogEntries,Qt as getAssetLibraryCategories,Yt as getCurrentServerProject,zt as getDownloadUrl,te as getDownloadedAssetPath,ee as getEditorCompatibility,re as getEditorRepositoryPresence,oe as getEditorSessionWorktreeIdentity,se as getLauncherSettings,ie as getOnlineAssetFiles,ae as getOnlineAssetPreview,pe as getServerValidationLog,me as inspectProjectFolder,Dt as learnThumbnailUrl,ne as listAssets,ce as listDelegateHarnesses,le as listEditorWorktrees,Lt as listExamples,de as listProjectComponents,be as listProjectSourceFiles,ge as listRecentProjects,Gt as listTemplates,ue as loadDownloadedAssets,Ee as loadEditorState,Se as onAssetDownloaded,ye as openEditorWorktree,Pe as openProjectOnServer,je as pollEditorLeaseIdentity,ve as probeCurrentServerProject,fe as probeProjectFile,he as projectFileExists,Ae as readProjectSourceText,ke as readProjectTextFile,Ce as removeRecentProject,Re as reportCommandListener,we as reportCommandReceived,Fe as reportCommandResult,Te as reportEditorState,xe as reportPlayBootPhase,Le as reportTabRoute,De as requireEditorCompatibility,Ge as restoreProjectAssetHistory,We as revealInFinder,Oe as saveEditorState,$e as saveFile,Ie as saveThumbnail,He as searchOnlineAssets,Ve as startLogSession,Ue as stopEditorWorktreeSession,qe as updateLauncherSettings};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t={hostActive:!0,listeners:new Set};function o(){return t.hostActive&&(typeof document>"u"||!document.hidden)}function n(){for(const e of t.listeners)e()}const i=typeof document<"u"&&document.referrer?new URL(document.referrer).origin:null;function r(e){window.parent===window||e.source!==window.parent||!i||e.origin!==i||e.data?.type!=="vgai:embed-activity"||typeof e.data.active!="boolean"||t.hostActive!==e.data.active&&(t.hostActive=e.data.active,n())}function d(e){return t.listeners.add(e),()=>{t.listeners.delete(e)}}typeof window<"u"&&(window.addEventListener("message",r),document.addEventListener("visibilitychange",n),window.parent!==window&&i&&window.parent.postMessage({type:"vgai:request-embed-activity"},i));export{o as i,d as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const c=new Set;function f(){for(const t of c){const n=t.deref();if(!n||n.state==="closed"){c.delete(t);continue}n.state==="suspended"&&n.resume()}}function y(){const t=window;if(t.__vgaiAudioUnlock)return;t.__vgaiAudioUnlock=!0;const n=window.AudioContext;typeof n=="function"&&(window.AudioContext=class extends n{constructor(...i){super(...i),c.add(new WeakRef(this)),h.add(this)}},k(),window.addEventListener("pointerdown",f,{capture:!0}),window.addEventListener("keydown",f,{capture:!0}))}const u=new WeakMap,h=new WeakSet;let p=!1;const d=new WeakMap,l=new Set,w=new WeakMap;let m=0;function a(t){if(t instanceof AudioDestinationNode)return"destination";let n=w.get(t);return n||(n=`n${++m}`,w.set(t,n),l.add(new WeakRef(t))),n}function k(){const t=AudioNode.prototype.connect,n=AudioNode.prototype.disconnect,i=o=>{let e=u.get(o);return e||(e=o.createGain(),e.gain.value=p?0:1,t.call(e,o.destination),u.set(o,e)),e},s=o=>o instanceof AudioDestinationNode&&h.has(o.context)?i(o.context):o;AudioNode.prototype.connect=function(...o){const[e,...A]=o;if(e instanceof AudioNode&&u.get(this.context)!==this){a(this),a(e);let r=d.get(this);r||d.set(this,r=new Set),r.add(e)}const g=t.call(this,s(e),...A);return e instanceof AudioDestinationNode?e:g},AudioNode.prototype.disconnect=function(...o){const[e]=o;return e===void 0||typeof e=="number"?d.delete(this):e instanceof AudioNode&&d.get(this)?.delete(e),n.call(this,...o.length?[s(e),...o.slice(1)]:[])}}function N(t){p=t;for(const n of c){const i=n.deref()&&u.get(n.deref());i&&(i.gain.value=t?0:1)}}function v(){const t=[];let n=!1;for(const i of l){const s=i.deref();if(!s){l.delete(i);continue}const o=[...d.get(s)??[]];o.some(e=>e instanceof AudioDestinationNode)&&(n=!0),t.push({id:a(s),type:s.constructor.name,outputs:o.map(a),state:s.context.state})}return n&&t.push({id:"destination",type:"AudioDestinationNode",label:"Output",outputs:[]}),t}const b={resume:f,setMuted:N,isMuted:()=>p,graphSnapshot:v};export{y as i,b as o};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{kV as ht,kW as be,kX as gt,cL as vt,J as K,kY as xt,kZ as we,k_ as yt,k$ as Se,$ as L,a0 as ue,l0 as bt,l1 as wt,cQ as Z,cR as G,l2 as St,l3 as jt,a4 as de,l4 as Et,aJ as $e,l5 as Mt,l6 as It,eu as Te,av as ze,fZ as Rt,f_ as Pt,f$ as Ct,g0 as Dt,q as ie,ae as h,M as At,gM as kt,gN as je,gP as _t,gi as Ft,eE as Ne,l7 as $t,di as Tt,l8 as zt,p as Oe}from"./index-CaG87ZF-.js";import{a as s}from"./jsx-runtime-DPjLkJKQ.js";import{r}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{u as Nt,d as Ot,c as Gt}from"./frame-debugger-store-D5YViF_8.js";import{m as Vt}from"./audio-meter-Cddyq1vI.js";import{p as Ge}from"./utility-view-state-Db97zwDz.js";import{P as Lt}from"./PlayBar-DRANyO01.js";import{a as Ee,r as Ht,f as Bt,R as Wt}from"./presentation-DGBuGP6i.js";import{setUserData as Ve}from"./user-data-dHvLdpwM.js";import{I as pe,J as Ut,K as ne,L as qt,M as Le,O as He,P as Be,Q as We,w as Kt,x as Xt,R as me,v as J,S as Jt,T as Yt,U as Zt,V as se,W as Ue,X as Me,Y as qe,Z as Qt,_ as Ke,a as en,$ as tn,a0 as Ie,a1 as nn,b as Xe,a2 as sn}from"./game-network-Bo_nlDR5.js";import{aq as on,cp as Je,aI as rn,bX as an,ey as ln,bh as fe,co as Re,s as cn,fo as W,bV as un,N as Ye,M as Pe,dg as dn,df as pn}from"./three.core-3arARmh6.js";import{e as mn,S as fn}from"./surface-state-D9j6qNu8.js";import{d as hn}from"./surface-content-Dg9Kkazf.js";import{a as gn,R as Ze}from"./active-ingest-CnAeQcuQ.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./configurations-_HZOWZPy.js";import"./run-selection-BUeubtHj.js";import"./ingest-source-persistence-6peGfPAS.js";import"./capability-coverage-DQgg6UJe.js";import"./game-contract-seams-C0AVYwvO.js";import"./object-marks-DwvIEBOK.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./native-debug-module-B-rWJfWE.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-l7k5Hjc8.js";import"./contract-system-adapters-h6OUBRYA.js";import"./seeded-random-38To73fI.js";import"./game-audio-CaGKzia4.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./events-156d8d12.esm-CYeuVCYr.js";import"./three.module-BLhyNg0e.js";import"./index-bQE2NA0D.js";import"./live-project-verbs-BOAQN3ME.js";import"./edit-mode-authoring-DBjaBTxM.js";import"./json-history-resource-CTXRV4GD.js";import"./binding-resolver-C_9MBSMa.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-DefTrXnY.js";import"./canvas-entry-runtime-DVeh71nC.js";import"./three-ingest-runtime-CXKjNysA.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-C7SNSmTd.js";import"./pixi-story-model-DNkfnWUV.js";import"./viewport-root-presentation-B35t51xX.js";import"./mounted-authoring-B7RL_V28.js";import"./entity-object-B_5Gc0Ky.js";import"./user-data-CqOoAowZ.js";import"./workspace-arrangement-DIMM7ska.js";import"./three-contract-Dkt6PmWY.js";import"./three-oYrcK5SQ.js";import"./editor-layers-B4oYfpj8.js";import"./component-instance-root-df4ofoOR.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-BrkGH4cd.js";import"./source-persistence-backend-HviqjKZ2.js";import"./three-projection-core-jBJVt6O0.js";import"./body-marks-RKb_LTwL.js";import"./structural-ids-Br2zjINh.js";import"./object3d-authoring-subject-BDrxd1GA.js";import"./r3f-physics-binding-Bgzzd4ol.js";import"./deferred-ingest-play-Bej67_y9.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-C1jPW_cN.js";import"./board-guides-_3R1t_-2.js";import"./relative-import-specifier-DQzkawgj.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-C8RP8G5F.js";import"./inference-diagnostics-MGcIHEX6.js";import"./writer-tw6EcuVO.js";import"./three-state-wXRU3rLr.js";import"./editor-shell-store-Bh1S7M54.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-DVkMQazS.js";const Qe=8,oe=1e3/60;function vn(e,t=Qe){return!(e>0)||t<=0?0:Math.min(t,Math.max(1,Math.round(Vt(e)/100*t)))}function Ce(e,t){const n=e.filter(a=>a.id>t),o=n.at(-1)?.id??t,i=n.map(a=>a.intervalMs).filter(a=>Number.isFinite(a)&&a>0).sort((a,m)=>a-m);if(i.length===0)return{frameId:o,intervalMs:null};const l=Math.floor((i.length-1)*.95);return{frameId:o,intervalMs:i[l]??null}}function xn(e){const t=e.slice(-3);return t.slice(-2).length===2&&t.slice(-2).every(n=>n>=50)?"danger":t.length===3&&t.every(n=>n>oe*1.05)?"warning":"normal"}function yn(e,t,n,o=50){if(e.length===0||t<=0||n<=0)return"";const i=Math.max(1,e.length-1);return e.map((l,a)=>{const m=a/i*t,d=Math.min(1,Math.max(0,l/o)),g=n-d*n;return`${m.toFixed(1)},${g.toFixed(1)}`}).join(" ")}const et="muted",De={enabled:!1,recording:!1,fps:0,cpuMs:0,p95Ms:0,p99Ms:0,frames:[],phases:[],systems:[],components:[],render:{gpuMs:null,drawCalls:0,triangles:0,geometries:0,textures:0,renderPasses:0}};function Ae(){return St(et)===!0}function bn(e){jt(et,e)}function wn(e,t){const n=t.find(i=>i.id==="master")?.level;if(!e.isMuted()&&n!==void 0)return n;const o=t.filter(i=>i.id!=="master").map(i=>i.level);return o.length>0?Math.max(...o):n??0}function Sn(){const e=K();r.useSyncExternalStore(e.subscribe,e.getShellSnapshot??e.getSnapshot);const t=e.playState==="playing",[n,o]=r.useState(!1),[i,l]=r.useState(0),[a,m]=r.useState(!1),[d,g]=r.useState(!1),[u,T]=r.useState(Ae),R=r.useRef(Ae()),E=r.useRef(new WeakMap),y=r.useRef(null),P=r.useSyncExternalStore(xt,we,we),v=yt();r.useEffect(()=>{const p=R.current||!t;for(const f of Se())E.current.get(f)!==p&&(f.setMuted(p),E.current.set(f,p))},[P,t]),r.useEffect(()=>{if(!v){l(0),m(!1),g(!1);return}const p=v.acquireMeters?.()??null;g(p!==null);const f=()=>{m(v.isMuted()),l(p?wn(v,p.read()):0)};f();const A=setInterval(f,100);return()=>{clearInterval(A),p?.dispose()}},[v]);const M=()=>{const p=!R.current,f=p||!t;for(const A of Se())A.resume?.(),A.setMuted(f),E.current.set(A,f);R.current=p,T(p),bn(p),m(f)},C=vn(i),z=v&&a&&!u&&!t?" (not playing)":"",D=v?a?"Audio muted":i>0?"Audio playing":"Audio quiet":"Audio unavailable";return s.jsxs("div",{className:"vgai-header-audio","data-muted":a||void 0,"data-available":!!v,children:[s.jsxs(L,{ref:y,type:"button",variant:"ghost",size:"compact",className:"vgai-header-telemetry-button","data-testid":"header-audio-telemetry","aria-label":`${D}; open audio controls`,"aria-haspopup":"menu","aria-expanded":n,title:`${D}${z}${d?"":" · level metering unavailable"}`,onClick:()=>o(p=>!p),children:[s.jsx(ue,{icon:a?bt:wt,size:"sm"}),s.jsx("span",{className:"vgai-audio-vu","aria-hidden":"true",children:Array.from({length:Qe},(p,f)=>s.jsx("i",{"data-filled":f<C||void 0},f))})]}),n&&s.jsx(Z,{anchorRef:y,onDismiss:()=>o(!1),gap:3,children:s.jsx(G,{onClick:()=>{M(),o(!1)},children:u?"Unmute audio":"Mute audio"})})]})}function jn(){const e=Nt(),t=e?.profiler??null,[n,o]=r.useState(De),[i,l]=r.useState([]);r.useEffect(()=>{if(!t){o(De),l([]);return}const R=t.telemetryEnabled;t.telemetryEnabled=!0;const E=t.getSnapshot(),y=Ce(E.frames,0);let P=y.frameId;o(E),l(y.intervalMs===null?[]:[y.intervalMs]);let v=null;const M=()=>{v=null;const z=t.getSnapshot(),D=Ce(z.frames,P);P=D.frameId,o(z);const p=D.intervalMs;p!==null&&l(f=>[...f,p].slice(-24))},C=t.subscribe(()=>{v===null&&(v=setTimeout(M,500))});return()=>{C(),v!==null&&clearTimeout(v),R||(t.telemetryEnabled=!1)}},[t]);const a=i.at(-1)??null,m=yn(i,72,18),d=a?Math.round(1e3/a):n.fps>0?Math.round(n.fps):null,g=a??(n.fps>0?1e3/n.fps:null),u=xn(i),T=e?`${e.label}: ${d??"—"} FPS · ${g?.toFixed(1)??"—"} ms frame time · open Profiler`:"The active document has no live render loop to profile";return s.jsxs(L,{type:"button",variant:"ghost",size:"compact",className:"vgai-header-telemetry-button vgai-header-performance","data-testid":"header-performance-telemetry","data-performance-tone":u,disabled:!e,"aria-label":T,title:T,onClick:()=>Ge.open("profiler"),children:[s.jsxs("svg",{className:"vgai-performance-graph","aria-hidden":"true",viewBox:"0 0 72 18",width:"72",height:"18",children:[s.jsx("line",{className:"vgai-performance-budget",x1:"0",x2:"72",y1:18-oe/50*18,y2:18-oe/50*18}),m&&s.jsx("polyline",{className:"vgai-performance-sparkline",points:m})]}),s.jsxs("span",{className:"vgai-performance-readout",children:[s.jsxs("strong",{className:"vgai-header-fps",children:[d??"—"," FPS"]}),s.jsxs("span",{className:"vgai-header-frame-ms",children:[g?.toFixed(1)??"—"," ms"]})]})]})}function En(){return r.useSyncExternalStore(ht,be,be),gt().telemetry==="hidden"?null:s.jsxs(vt,{className:"vgai-header-telemetry vgai-chrome-island vgai-glass-island","data-island-scale":"compact",align:"center",gap:1,children:[s.jsx(Sn,{}),s.jsx(jn,{})]})}let Y=!1,re=0,w=null,N=null;const Mn=new on(1,1,1,16,1,!0),In=new Je({color:2280686,transparent:!0,opacity:.45,side:rn,depthWrite:!1}),Rn=new an({color:16755200,transparent:!0,opacity:.9}),Pn=new ln(.12,12,8),Cn=new Je({color:16755200,depthWrite:!1}),Dn=16724804,An=2280686;let $=[];function ke(){return Y}function kn(e){e!==Y&&(Y=e,e?re=requestAnimationFrame(tt):(cancelAnimationFrame(re),$n()))}function tt(){if(!Y)return;re=requestAnimationFrame(tt);const e=pe(),t=e?de().navigation?.crowdAgents?.()??[]:[];if(e!==N&&(N&&w&&N.remove(w),N=e,e&&(w||(w=new fe,w.name="crowd-debug-draw",Ve(w,"editorHelper",!0)),e.add(w))),!(!w||!e)){_n(w,t.length);for(let n=0;n<t.length;n++)Fn($[n],t[n])}}function _n(e,t){for(;$.length<t;){const n=new fe,o=In.clone(),i=new Re(Mn,o),l=new cn(new W(1,0,0),new W,1,16755200),a=new un(new Ye,Rn),m=new Re(Pn,Cn);n.add(i),n.add(l),e.add(n),e.add(a),e.add(m),$.push({root:n,cylinder:i,cylinderMaterial:o,arrow:l,path:a,target:m})}for(;$.length>t;){const n=$.pop();e.remove(n.root),e.remove(n.path),e.remove(n.target),n.arrow.dispose(),n.path.geometry.dispose(),n.cylinderMaterial.dispose()}}function Fn(e,t){e.root.position.set(t.position.x,t.position.y,t.position.z),e.cylinder.scale.set(t.radius,t.height,t.radius),e.cylinder.position.y=t.height/2,e.cylinderMaterial.color.setHex(t.state==="invalid"?Dn:An);const n=t.corners??[];n.length>0?(e.path.visible=!0,e.path.geometry.setFromPoints([new W(t.position.x,t.position.y+.05,t.position.z),...n.map(i=>new W(i.x,i.y+.05,i.z))])):e.path.visible=!1,t.target&&n.length>0?(e.target.visible=!0,e.target.position.set(t.target.x,t.target.y+.05,t.target.z)):e.target.visible=!1;const o=Math.hypot(t.velocity.x,t.velocity.y,t.velocity.z);o>.01?(e.arrow.visible=!0,e.arrow.position.y=t.height/2,e.arrow.setDirection(new W(t.velocity.x/o,t.velocity.y/o,t.velocity.z/o)),e.arrow.setLength(Math.max(o*.5,.2))):e.arrow.visible=!1}function $n(){if(w){N?.remove(w);for(const e of $)e.arrow.dispose();w.clear()}$=[],w=null,N=null}function Tn({onPresetChange:e}){const[t,n]=r.useState(!1),o=r.useRef(null),i=Le(),l=i.kind==="fit";return s.jsxs("div",{className:"vgai-playbar-popover-anchor",children:[s.jsxs(L,{ref:o,variant:"ghost",size:"comfortable","aria-haspopup":"menu","aria-expanded":t,"aria-controls":t?"vgai-device-preset-menu":void 0,"data-testid":"device-preset-picker",onClick:()=>n(a=>!a),title:"Device preview — constrain the game to a device resolution + DPR. Phone/tablet presets show the safe area, set --vgai-safe-area-inset-top/right/bottom/left CSS vars on the game mount, and send mouse input as touch.",children:[s.jsx(ue,{icon:Et,size:"md"}),s.jsx($e,{variant:"code",children:l?"Device":`${i.width}×${i.height}`})]}),t&&s.jsxs(Z,{id:"vgai-device-preset-menu",anchorRef:o,className:"vgai-resolution-menu",gap:4,onDismiss:()=>n(!1),children:[Ut.map(a=>s.jsx(G,{role:"menuitemradio","aria-checked":a.id===i.id,"data-testid":`device-preset-${a.id}`,onSelect:()=>{e(a),n(!1)},children:a.label},a.id)),s.jsxs(G,{role:"menuitemcheckbox","aria-checked":ne(),"data-testid":"device-touch-toggle",onSelect:()=>qt(!ne()),children:[ne()?"✓ ":" ","Pointer as touch"]})]})]})}function zn(){const e=Mt(()=>It()??null),n=Ot(e)?.capture===!0;return s.jsx(L,{type:"button",size:"compact",variant:"ghost","data-testid":"game-capture-frame",className:"vgai-frame-capture-game-button",disabled:!n,title:n?"Capture one rendered frame and open the Frame debugger":"No render-debug adapter registered for this world — frame capture is unavailable",onClick:()=>{Gt(e),Ge.open("frame")},children:"Capture frame"})}let nt={label:"Fill",width:null,height:null},ae=1,st=0;const le=new Set;function V(){st++;for(const e of le)e()}function it(e){return le.add(e),()=>{le.delete(e)}}const ot=()=>st;function rt(){return nt}function at(e){nt=e,V()}function lt(e,t){return e.width!==null||!t?e:{label:`Project — ${t.width}×${t.height}`,width:t.width,height:t.height}}function Nn(e){return e?[lt({label:"Fill",width:null,height:null},e),...Ee.filter(t=>t.width!==null)]:Ee}function ct(e){He(e.id),at(e.width===null||e.height===null?{label:"Fill",width:null,height:null}:{label:e.label,width:e.width,height:e.height})}function On(e){e!==ae&&(ae=e,V())}function Gn(){return ae}function ut(e){return Array.from(e.children).filter(t=>t.dataset?.vgaiRootSurface==="true")}function Vn(e,t,n){for(const o of t)o.contains(e)||e.appendChild(o);if(n)for(const o of ut(n))e.appendChild(o)}function Ln({name:e}){return s.jsx("div",{"data-testid":"game-instance-name",style:{flex:"0 0 auto",padding:"3px 10px",background:h.surface.chrome,color:h.content.primary,borderBottom:`1px solid ${h.boundary.default}`,fontSize:11,fontWeight:600,userSelect:"none"},children:e})}function dt({name:e,testId:t,borderLeft:n,focused:o,onFocus:i,children:l}){return s.jsxs("div",{"data-testid":t,"data-focused":o||void 0,onPointerDownCapture:i,style:{flex:1,minWidth:0,height:"100%",display:"flex",flexDirection:"column",overflow:"hidden",position:"relative",cursor:i&&!o?"pointer":void 0,...n?{borderLeft:`1px solid ${h.boundary.default}`}:{}},children:[s.jsx(Ln,{name:e}),s.jsx("div",{style:{flex:1,minHeight:0,position:"relative",display:"flex",alignItems:"center",justifyContent:"center"},children:l}),o&&s.jsx("div",{"aria-hidden":!0,style:{position:"absolute",inset:0,pointerEvents:"none",zIndex:40,border:`2px solid ${h.accent.default}`,boxShadow:`inset 0 0 0 1px ${h.accent.default}`}})]})}function Hn({index:e}){const t=r.useRef(null),n=qe(e+1),o=r.useSyncExternalStore(Ke,en),[i,l]=r.useState(null),a=r.useSyncExternalStore(me,J);return r.useEffect(()=>{const m=t.current;if(!m||!o)return;let d=null,g=!1;return tn(m,n).then(u=>{g?Ie(u):(d=u,l(u))},u=>{At.error(`Failed to mount ${n}: ${u}`,"play-mode")}),()=>{g=!0,l(null),d&&Ie(d)}},[e,o]),s.jsx(dt,{name:n,testId:`game-instance-slot-${e+1}`,borderLeft:!0,focused:i!=null&&a===i,onFocus:i?()=>Ue(i):void 0,children:s.jsx("div",{ref:t,"data-vgai-instance-viewport":"",style:{position:"absolute",inset:0}})})}function Bn({style:e}){const t=r.useSyncExternalStore(Te,ze),o=K().playState!=="stopped",i=r.useRef(null);r.useSyncExternalStore(it,ot),r.useSyncExternalStore(Be,We);const l=r.useSyncExternalStore(Kt,Xt),a=l>0,m=r.useSyncExternalStore(me,J),d=Le(),g=rt(),[u,T]=r.useState({width:0,height:0}),[R,E]=r.useState(0),y=r.useRef(null),P=r.useSyncExternalStore(Rt,Pt),v=r.useSyncExternalStore(Ct,Dt),M=Qt(),C=gn(),z=M.length>0?M.map(c=>c.rootId):C?[C.worldId]:P.filter(c=>c.mechanism==="host-mount").map(c=>c.rootId),D=!!(y.current&&hn(y.current)),p=M.length>0?M.some(c=>c.hasRenderableContent):D,f=M.length>0||C!==null,A=o?mn({surface:"Game",rootIds:z,phase:f?"ready":"loading",content:f?p?"present":"empty":"unknown",readiness:P,failures:v}):null;r.useEffect(()=>{if(!o||!f||p)return;const c=window.setTimeout(()=>E(x=>x+1),250);return()=>window.clearTimeout(c)},[R,p,o,f]),r.useEffect(()=>{const c=i.current;if(!c||typeof MutationObserver>"u")return;const x=new MutationObserver(()=>E(I=>I+1));return x.observe(c,{childList:!0,subtree:!0,characterData:!0}),()=>x.disconnect()},[]),r.useEffect(()=>{const c=Jt();c.width!==null&&(ct(c),V())},[]);const Q=r.useRef([]),he=r.useCallback(c=>{if(c===y.current)return;!c&&y.current&&(Q.current=ut(y.current)),c&&(Vn(c,Q.current,y.current),Q.current=[]);const x=y.current;y.current=c,c?ie().workspace.liveDocument.setContainer(c):x&&ie().workspace.liveDocument.releaseContainer(x),c?Yt(c):x&&Zt(x)},[]);r.useEffect(()=>{const c=i.current;if(!c)return;const x=new ResizeObserver(([I])=>{if(!I)return;const{width:X,height:ye}=I.contentRect;T(te=>te.width===X&&te.height===ye?te:{width:X,height:ye})});return x.observe(c),()=>x.disconnect()},[]);const mt=t?.config.resolution,k=Ht(g,mt),ge=k.kind==="fill",ft=ge||a,H=k.kind==="logical"?k.width:null,B=k.kind==="logical"?k.height:null,ve=d.dpr;r.useEffect(()=>{const c=ve??nn();a?u.width>0&&u.height>0&&se(u.width/(l+1),u.height,c):H===null||B===null?u.width>0&&u.height>0&&se(u.width,u.height,c):se(H,B,c)},[H,B,u.width,u.height,ve,o,a,l]);const ee=Bt(u,{width:H??0,height:B??0},{allowUpscale:k.kind==="logical"&&k.allowUpscale}),_=ge?1:ee.scale;r.useEffect(()=>{On(_)},[_]);const b=d.safeArea,xe={"--vgai-safe-area-inset-top":`${b?.top??0}px`,"--vgai-safe-area-inset-right":`${b?.right??0}px`,"--vgai-safe-area-inset-bottom":`${b?.bottom??0}px`,"--vgai-safe-area-inset-left":`${b?.left??0}px`};return s.jsx("div",{style:{overflow:"hidden",position:"relative",flexDirection:"column",...e},children:s.jsxs("div",{ref:i,style:{flex:1,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:[(()=>{const c=ft?s.jsx("div",{ref:he,"data-testid":"game-runtime-container","aria-hidden":"true",style:{position:"absolute",inset:0,...o?{}:{visibility:"hidden"},...xe}},"game-mount-fill"):s.jsxs("div",{style:{position:"relative",width:ee.width,height:ee.height,overflow:"hidden",...o?{}:{visibility:"hidden"}},children:[s.jsx("div",{ref:he,"data-testid":"game-runtime-container","aria-hidden":"true",style:{width:H??0,height:B??0,transformOrigin:"top left",transform:`scale(${_})`,...xe}}),b&&s.jsx("div",{"data-testid":"device-safe-area-overlay",style:{position:"absolute",inset:0,pointerEvents:"none",zIndex:2},children:[["top",b.top,{top:0,left:0,right:0,height:b.top*_}],["bottom",b.bottom,{bottom:0,left:0,right:0,height:b.bottom*_}],["left",b.left,{top:0,bottom:0,left:0,width:b.left*_}],["right",b.right,{top:0,bottom:0,right:0,width:b.right*_}]].map(([x,I,X])=>I>0?s.jsx("div",{"data-testid":`device-safe-area-${x}`,style:{position:"absolute",...X,background:h.semantic.dangerFaint,boxShadow:`inset 0 0 0 1px ${h.semantic.dangerMuted}`}},x):null)})]},"game-mount-device");return a?s.jsxs(s.Fragment,{children:[s.jsx(dt,{name:qe(0),testId:"game-instance-slot-0",focused:m===Me(),onFocus:()=>Ue(Me()),children:c}),Array.from({length:l},(x,I)=>s.jsx(Hn,{index:I},I))]}):c})(),!o&&s.jsxs("div",{"data-testid":"game-stopped-placeholder",style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:6,background:h.surface.shell,color:h.content.dim,fontSize:11,pointerEvents:"none"},children:[s.jsx("span",{style:{color:h.content.primary,fontSize:13},children:"Game is stopped"}),s.jsx("span",{children:"Press Play to start the composed runtime."})]}),o&&s.jsx(fn,{explanation:A,testId:"game-surface-status",style:{zIndex:30,background:h.surface.shell}})]})})}function _e(){return Xe().map(({id:e,name:t})=>`${e}\0${t}`).join("")}function Wn({instanceId:e}){const t=K();r.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getSnapshot);const n=r.useSyncExternalStore(me,J,J),[,o]=r.useState(0);r.useEffect(()=>{const g=window.setInterval(()=>o(u=>u+1),250);return()=>window.clearInterval(g)},[]);const i=Ze(e),l=zt(),a=i?(i.loop.activeTimeouts??0)+(i.loop.activeIntervals??0)+(i.loop.activeAnimationFrames??0)+i.loop.pending:0,m=i?i.listeners.window+i.listeners.document:0,d=[["Mount",e],["Simulation",t.playState==="paused"?"Paused":"Running"],["Input",n===e?"Keyboard focus":"Inactive"],["Input events",i?`${i.loop.input??0} observed · ${i.loop.inputBlocked??0} blocked`:"Not measured"],["Network",l?l.getConnectionState?.()??"Not reported by this adapter":"Not registered"],["Owned callbacks",String(a)],["Owned listeners",String(m)],["Realm globals",String(i?.globals??0)],["Browser storage",i?`Shared origin · ${i.storage.local.reads+i.storage.session.reads} reads · ${i.storage.local.writes+i.storage.session.writes} writes`:"Shared origin"]];return s.jsx("div",{role:"none",style:{display:"grid",gridTemplateColumns:"112px minmax(120px, 1fr)",gap:"4px 12px",padding:"8px 10px",fontSize:10,lineHeight:"15px"},children:d.map(([g,u])=>s.jsxs("div",{style:{display:"contents"},children:[s.jsx("span",{style:{color:h.content.dim},children:g}),s.jsx("span",{style:{color:h.content.primary,fontFamily:g==="Mount"?h.typography.mono:void 0,overflow:"hidden",textOverflow:"ellipsis"},children:u})]},g))})}function Un(){r.useSyncExternalStore(Ke,_e,_e),r.useSyncExternalStore(kt,je,je);const e=Xe(),t=_t(),n=e.find(d=>d.id===t)??e[0],[o,i]=r.useState(!1),l=r.useRef(null);if(e.length<2||!n)return null;const m=(Ze(n.id)?.loop.firedWhileHeld??0)>0;return s.jsxs("div",{className:"vgai-playbar-popover-anchor",children:[s.jsxs(L,{ref:l,variant:"ghost",size:"compact","aria-haspopup":"menu","aria-expanded":o,onClick:()=>i(d=>!d),title:`Runtime instruments inspect ${n.name}; agent-addressed commands are unchanged`,children:[s.jsx(ue,{icon:Ft,size:"sm",style:{color:m?h.semantic.warning:void 0}}),s.jsxs($e,{variant:"code",children:["Inspect ",n.name]}),s.jsx(Ne,{direction:"down"})]}),o&&s.jsxs(Z,{anchorRef:l,gap:3,onDismiss:()=>i(!1),style:{minWidth:270},children:[e.map(d=>s.jsxs(G,{role:"menuitemradio","aria-checked":d.id===n.id,onSelect:()=>$t(d.id),children:[d.id===n.id?"✓ ":" ",d.name]},d.id)),s.jsx(Tt,{}),s.jsx(Wn,{instanceId:n.id})]})]})}let q=!1,ce=0,S=null,O=null,U=null,j=null,F=0;function Fe(){return q}function qn(e){e!==q&&(q=e,e?ce=requestAnimationFrame(pt):(cancelAnimationFrame(ce),U?.setDebugDrawEnabled?.(!1),Yn()))}function pt(){if(!q)return;ce=requestAnimationFrame(pt);const e=pe(),t=e?Oe(de().physics):null;if(t!==U&&(U?.setDebugDrawEnabled?.(!1),U=t,t?.setDebugDrawEnabled?.(!0)),Kn(e),!S||!e)return;const n=t?.contactPoints?.()??null;Xn(S,n)}function Kn(e){e!==O&&(O&&S&&O.remove(S),O=e,e&&(S||(S=new fe,S.name="physics-debug-draw",Ve(S,"editorHelper",!0)),e.add(S)))}function Xn(e,t){const n=t?t.length/3:0;if(!j){F=64;const l=new Ye;l.setAttribute("position",new Pe(new Float32Array(F*3),3));const a=new dn({color:16724821,size:10,sizeAttenuation:!1,depthTest:!1,transparent:!0,opacity:.95});j=new pn(l,a),j.renderOrder=999,j.frustumCulled=!1,e.add(j)}const o=j.geometry;if(n>F){for(;F<n;)F*=2;o.setAttribute("position",new Pe(new Float32Array(F*3),3))}const i=o.getAttribute("position");t&&n>0&&i.array.set(t),i.needsUpdate=!0,o.setDrawRange(0,n),j.visible=n>0}function Jn(){const e=pe(),n=(e?Oe(de().physics):null)?.debugDraw?.()??null;let o=!1;n&&e&&e.traverse(a=>{a===n&&(o=!0)});const i=n?.geometry.getAttribute("position"),l=j?.geometry.drawRange.count??0;return{enabled:q,wireframeInScene:o,wireframeVisible:n?.visible??!1,wireframeVertexCount:i?.count??0,contactMarkerCount:j?.visible&&Number.isFinite(l)?l:0}}typeof window<"u"&&(window.__vgaiPhysicsDebug=Jn);function Yn(){S&&(O?.remove(S),j&&(j.geometry.dispose(),j.material.dispose()),S.clear()),j=null,F=0,S=null,O=null,U=null}function Zn(){const[e,t]=r.useState(!1),n=r.useRef(null);return s.jsxs("div",{style:{position:"relative"},children:[s.jsxs(L,{ref:n,type:"button",variant:"outline",size:"compact","data-testid":"game-debug-menu","aria-haspopup":"menu","aria-expanded":e,"aria-controls":e?"vgai-game-debug-menu":void 0,onClick:()=>t(o=>!o),children:[s.jsx("span",{children:"Debug"}),s.jsx(Ne,{direction:"down"})]}),e&&s.jsxs(Z,{id:"vgai-game-debug-menu",anchorRef:n,gap:3,onDismiss:()=>t(!1),style:{minWidth:190},children:[s.jsxs(G,{onClick:()=>{kn(!ke()),V()},children:[ke()?"✓ ":" ","Crowd debug draw"]}),s.jsxs(G,{onClick:()=>{qn(!Fe()),V()},children:[Fe()?"✓ ":" ","Physics debug draw"]})]})]})}function Qn(e){const t=r.useSyncExternalStore(Te,ze),n=K();return r.useSyncExternalStore(n.subscribe,n.getShellSnapshot??n.getSnapshot),r.useSyncExternalStore(it,ot),r.useSyncExternalStore(Be,We),s.jsxs("div",{"data-testid":"game-doc-toolbar",style:{display:"grid",alignItems:"center",gridTemplateColumns:"minmax(0, 1fr) auto minmax(0, 1fr)",width:"100%",gap:6,padding:"2px 8px"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",minWidth:0,overflow:"auto"},children:[s.jsx(Un,{}),s.jsx(Tn,{onPresetChange:o=>{ct(o),V()}}),s.jsx(Wt,{resolution:lt(rt(),t?.config.resolution),options:Nn(t?.config.resolution),onResolutionChange:o=>{He(sn),at(o)},scale:Gn(),title:"Change game resolution"}),s.jsx(Zn,{}),n.playState!=="stopped"&&s.jsx(zn,{})]}),s.jsx(Lt,{placement:"runtime"}),s.jsx("div",{style:{display:"flex",justifyContent:"flex-end",minWidth:0},children:s.jsx(En,{})})]})}function es(e){const t=K();r.useSyncExternalStore(t.subscribe,t.getShellSnapshot??t.getSnapshot);const n=t.playState!=="stopped";return s.jsxs("div",{style:{flex:1,position:"relative",display:"flex",flexDirection:"column"},children:[s.jsx(Bn,{style:{flex:1,position:"relative",display:"flex",flexDirection:"column",pointerEvents:"auto",...t.playState==="playing"?{outline:`2px solid ${h.semantic.success}`,outlineOffset:-2}:n?{outline:`2px solid ${h.semantic.warning}`,outlineOffset:-2}:{}}}),t.playState==="paused"&&s.jsx("div",{"data-testid":"game-paused-notice",style:{position:"absolute",left:"50%",top:12,transform:"translateX(-50%)",padding:"6px 12px",borderRadius:6,background:"rgba(0,0,0,.72)",color:h.content.primary,fontSize:12,letterSpacing:".04em",pointerEvents:"none",zIndex:2},children:"Paused by the editor — press ▶ Play to resume (Escape pauses)"})]})}const Fi="workspace.service";function $i(){return ie().workspace.liveDocument.register({Content:es,Toolbar:Qn})}export{Fi as point,$i as start};
|