@volter/game-editor 0.5.67 → 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.
Files changed (568) hide show
  1. package/BUNDLED_NOTICES +10954 -5077
  2. package/LICENSE +1 -1
  3. package/LICENSE-BLENDER +2 -2
  4. package/NOTICE +2 -2
  5. package/additions/canvas/package.json +8 -0
  6. package/additions/canvas/src/canvas-mount.ts +46 -0
  7. package/additions/canvas/src/scene2d.tsx +18 -0
  8. package/catalog/entries/bake.json +1 -1
  9. package/catalog/entries/blender.json +3 -3
  10. package/catalog/entries/music.json +6 -6
  11. package/catalog/project-source/LICENSE +1 -1
  12. package/catalog/project-source/src/contributions/bake.kind.ts +2 -2
  13. package/catalog/project-source/src/contributions/builder-document.tsx +1 -1
  14. package/catalog/project-source/src/contributions/builder-ui.tsx +3 -3
  15. package/catalog/project-source/src/contributions/module-source.ts +4 -4
  16. package/catalog/project-source/src/lib/music/music-player.ts +18 -12
  17. package/catalog/project-source/src/lib/reflections/volume-reflection-material.ts +59 -59
  18. package/catalog/project-source/src/lib/static-batch/Frozen.tsx +1 -1
  19. package/catalog/project-source/src/lib/static-batch/mutation-watch.ts +1 -1
  20. package/catalog/project-source/src/tools/bake-preview.tool.ts +9 -9
  21. package/dist/.vite/manifest.json +4106 -3965
  22. package/dist/assets/{AssetBudgetPanel-x_FNJbfZ.js → AssetBudgetPanel-BMR3AQhc.js} +10 -10
  23. package/dist/assets/AudioViewer-DESxi7pU.js +1 -0
  24. package/dist/assets/CanvasBoardDocument-Q_nrYFlB.js +1 -0
  25. package/dist/assets/CanvasSceneViewport-WZMoKy_F.js +1 -0
  26. package/dist/assets/ColorInput-C2EK-OnD.js +1 -0
  27. package/dist/assets/{EntityModelDocument-CzUHsH9E.js → EntityModelDocument-B_4ENTCq.js} +1 -1
  28. package/dist/assets/{EnvironmentAssetDocument-ByEB7_4A.js → EnvironmentAssetDocument-BZBp6OFJ.js} +1 -1
  29. package/dist/assets/{GameplaySessionTimeline-dhG-oiqd.js → GameplaySessionTimeline-1ivaucpv.js} +1 -1
  30. package/dist/assets/ImageViewer-D16OExYu.js +1 -0
  31. package/dist/assets/{InspectorCanvasPreview-CEr_Kxna.js → InspectorCanvasPreview-BrFjhoiD.js} +1 -1
  32. package/dist/assets/InspectorObjectPreview-CY5xVsPR.js +1 -0
  33. package/dist/assets/JsonAssetDocument-CvjTlcdr.js +2 -0
  34. package/dist/assets/{LiveModuleDocument-DL8QHSlk.js → LiveModuleDocument-ne1o9giX.js} +1 -1
  35. package/dist/assets/{LutAssetDocument-BImiug2M.js → LutAssetDocument-Cp0v-O7q.js} +1 -1
  36. package/dist/assets/ModelAssetDocument-Ceu7OIN9.js +1 -0
  37. package/dist/assets/{NonThreeAuthoringBootstrap-B40qmGGS.js → NonThreeAuthoringBootstrap-DiElZf-e.js} +1 -1
  38. package/dist/assets/Object3DDocumentToolbar-BLNamqii.js +1 -0
  39. package/dist/assets/Object3DDocumentViewport-D6QoHfa_.js +2 -0
  40. package/dist/assets/{Object3DPreview-ClYDoH2L.js → Object3DPreview-ZVokr044.js} +1 -1
  41. package/dist/assets/OnlineAssetDetail-Dnckd7zB.js +1 -0
  42. package/dist/assets/PlayBar-DsMitSgy.js +1 -0
  43. package/dist/assets/{QuarksAssetDocument-B-VOj-n4.js → QuarksAssetDocument-B5J8uHFM.js} +1 -1
  44. package/dist/assets/ReactCanvasControls-CmfvxJYY.js +1 -0
  45. package/dist/assets/RootSelectionOverlay-BWsNiSuM.js +1 -0
  46. package/dist/assets/{ShaderAssetDocument-Kn8IvRGV.js → ShaderAssetDocument-CT7XzsZq.js} +5 -5
  47. package/dist/assets/ShadowEditor-YO5KEfnz.js +1 -0
  48. package/dist/assets/{SourceAssetViewer-CLQ95VSD.js → SourceAssetViewer-FSLup2km.js} +1 -1
  49. package/dist/assets/StageHost-DYfGYwvq.js +2 -0
  50. package/dist/assets/{StoryPreviewMount-D2lg37et.js → StoryPreviewMount-BhvT5QlB.js} +1 -1
  51. package/dist/assets/ThreeBoardDocument-B-z2nwnH.js +2 -0
  52. package/dist/assets/{ThreeIsolationSceneContent-DbYIylZQ.js → ThreeIsolationSceneContent-B5pU4Y6k.js} +1 -1
  53. package/dist/assets/{ToolObject3DPreview-WEi6C9uU.js → ToolObject3DPreview-VtraiQ4Q.js} +1 -1
  54. package/dist/assets/Toolbar-M62Gob9T.js +1 -0
  55. package/dist/assets/{TransientHint-BpDLhRLd.js → TransientHint-Cc40mHWE.js} +1 -1
  56. package/dist/assets/VideoViewer-BxcUwXQm.js +1 -0
  57. package/dist/assets/ViewportShadingMenu-BoMPnTVh.js +1 -0
  58. package/dist/assets/active-ingest-0QjJWb7i.js +3 -0
  59. package/dist/assets/{animation-clock-Bm80XdqP.js → animation-clock-BXEwUJtz.js} +1 -1
  60. package/dist/assets/animation-mixers.service-C-Ko4KzM.js +1 -0
  61. package/dist/assets/animation-timeline.utility-Bl15-rYb.js +1 -0
  62. package/dist/assets/{asset-budget-asset.menu-CEgP0Kiw.js → asset-budget-asset.menu-BUa3g0Wy.js} +1 -1
  63. package/dist/assets/{asset-budget.action-D4R1c3wi.js → asset-budget.action-Dl5eVPIo.js} +1 -1
  64. package/dist/assets/{asset-budget.document-Syzjn1U1.js → asset-budget.document-DJylQ-0h.js} +1 -1
  65. package/dist/assets/{asset-budget.menu-BbRiqXeM.js → asset-budget.menu-BJtvNMLj.js} +1 -1
  66. package/dist/assets/asset-editor-persistence-BIbf5u0Q.js +1 -0
  67. package/dist/assets/asset-loaders-DoNflsHL.js +2 -0
  68. package/dist/assets/{asset-preview-B1tDziF1.js → asset-preview-DxlSdRZn.js} +1 -1
  69. package/dist/assets/{audio-unlock.service-ucMfCVBw.js → audio-unlock.service-CTaiyXF9.js} +1 -1
  70. package/dist/assets/audio.utility-CEmNc68t.js +1 -0
  71. package/dist/assets/autoplay.service-BZLSUyL8.js +1 -0
  72. package/dist/assets/{babylon-authoring-adapter-C8mFMXSr.js → babylon-authoring-adapter-BZvV2bz_.js} +1 -1
  73. package/dist/assets/binding-resolver-DGbk9_XR.js +2 -0
  74. package/dist/assets/blender-emscripten-engine-B7lfg-RX.js +2 -0
  75. package/dist/assets/{blender-node-editor.document-C1YmwWls.js → blender-node-editor.document-wXJobGNH.js} +1 -1
  76. package/dist/assets/{blender-properties-tab-B8lyjgj3.js → blender-properties-tab-7GFf80ev.js} +1 -1
  77. package/dist/assets/{blender-runtime-host-CyQlImSR.js → blender-runtime-host-CILxrx5T.js} +2 -2
  78. package/dist/assets/{blender-runtime-skin-BK7ShZ6z.js → blender-runtime-skin-Cd5lQYsC.js} +7 -7
  79. package/dist/assets/{blender-runtime.document-B0nVQs0P.js → blender-runtime.document-C0r_R49S.js} +7 -7
  80. package/dist/assets/{blender-timeline.document-CMcdE2CK.js → blender-timeline.document-BaISZMBc.js} +1 -1
  81. package/dist/assets/{blender-uv-editor.document-CjqNo4sZ.js → blender-uv-editor.document-CT_fsyyA.js} +1 -1
  82. package/dist/assets/blender-version.status-DzEx7u7k.js +1 -0
  83. package/dist/assets/blender-wali-engine-DOiQCBXH.js +2 -0
  84. package/dist/assets/{blender.command-C6NmRBo5.js → blender.command-DdiKd8mZ.js} +1 -1
  85. package/dist/assets/blender.keymap-BmOBRY7p.js +1 -0
  86. package/dist/assets/blender.status-BMETIbb2.js +1 -0
  87. package/dist/assets/board-guides-CjHQ9Ynm.js +1 -0
  88. package/dist/assets/body-marks-C1LxJtQb.js +1 -0
  89. package/dist/assets/bridge.command-DXUeavn5.js +3 -0
  90. package/dist/assets/{browserAll-lF_dLQVz.js → browserAll-Dg46xT22.js} +1 -1
  91. package/dist/assets/build-player.document-BHwVV3K0.js +1 -0
  92. package/dist/assets/build-profiles.document-HkpS-Kxa.js +2 -0
  93. package/dist/assets/build-progress.status-u1J0Rm1D.js +1 -0
  94. package/dist/assets/build-session-BLboUUbw.js +9 -0
  95. package/dist/assets/{build.action-DRX2IcYt.js → build.action-C00DL83N.js} +1 -1
  96. package/dist/assets/{build.command-BGvLaLG0.js → build.command-Cjk_NY75.js} +1 -1
  97. package/dist/assets/build.header-BWNmNWFT.js +1 -0
  98. package/dist/assets/{build.menu-UenrjPWS.js → build.menu-BBYtqCIq.js} +1 -1
  99. package/dist/assets/{build.service-BIUoTY6l.js → build.service-DOU15tKN.js} +1 -1
  100. package/dist/assets/{camera-DrvaM47S.js → camera-7DGyYW7Y.js} +1 -1
  101. package/dist/assets/{camera-runtime.inspector-CjJALNO8.js → camera-runtime.inspector-n-jiOR-3.js} +1 -1
  102. package/dist/assets/canvas-design-mount-CSRHU-ag.js +6 -0
  103. package/dist/assets/canvas-entry-runtime-BST8yRuK.js +2 -0
  104. package/dist/assets/{canvas-preview-frames-C0QTagA3.js → canvas-preview-frames-Cja32aW2.js} +1 -1
  105. package/dist/assets/{canvas-story-capture.service-Dgjr-rT1.js → canvas-story-capture.service-D5R5HJ8n.js} +2 -2
  106. package/dist/assets/capability-coverage-ByWftxk4.js +7 -0
  107. package/dist/assets/{collaboration-presence-BVIQuN1l.js → collaboration-presence-D6MC9xJN.js} +1 -1
  108. package/dist/assets/{collider-C7SbIYKY.js → collider-B78EcUc9.js} +1 -1
  109. package/dist/assets/{component-board.service-BEsFAw4_.js → component-board.service-BaQI5Oas.js} +2 -2
  110. package/dist/assets/component-board.service-CkjrsD8x.js +2 -0
  111. package/dist/assets/{component-board.service-CWFaGMCO.js → component-board.service-Dvjz_g-x.js} +2 -2
  112. package/dist/assets/component-contracts.service-C3-AXQp7.js +1 -0
  113. package/dist/assets/component-instance-root-DLI40MiB.js +1 -0
  114. package/dist/assets/{component-verbs.command-oNtGgzQL.js → component-verbs.command-Brr_WcaR.js} +1 -1
  115. package/dist/assets/component-verbs.service-DC2sC3j3.js +1 -0
  116. package/dist/assets/{config-_wCzzlM_.js → config-BI_7osdR.js} +3 -3
  117. package/dist/assets/{configurations-BXU4GGbV.js → configurations-XP9YLkrt.js} +1 -1
  118. package/dist/assets/connection.status-BhRwcFx0.js +1 -0
  119. package/dist/assets/{constraint-5KLYpGm7.js → constraint-Bp1l8hY-.js} +1 -1
  120. package/dist/assets/constraints.inspector-Dm1cycK3.js +1 -0
  121. package/dist/assets/{content-bounds-BeuIXKYu.js → content-bounds-DROIchTa.js} +1 -1
  122. package/dist/assets/{contract-system-adapters-Bic_7sev.js → contract-system-adapters-Cn7OW_ay.js} +1 -1
  123. package/dist/assets/coverage.service-l42ty7lr.js +3 -0
  124. package/dist/assets/create-runtime-B_uTwsmi.js +3 -0
  125. package/dist/assets/curve-THOUsg-j.js +1 -0
  126. package/dist/assets/{data-asset-DfQ2Pjse.js → data-asset-DAANayR6.js} +1 -1
  127. package/dist/assets/data-check-core-CHqar_E8.js +1 -0
  128. package/dist/assets/data-ref-CN34UeVw.js +1 -0
  129. package/dist/assets/debug-bridge-BD1XVAIB.js +1 -0
  130. package/dist/assets/debug-registry-ggQWxtu-.js +1 -0
  131. package/dist/assets/{deferred-ingest-play-BdR4qGk6.js → deferred-ingest-play-B2JUlwlT.js} +2 -2
  132. package/dist/assets/{design-time-canvas-mount-DPQeHSN2.js → design-time-canvas-mount-as9cN9I6.js} +2 -2
  133. package/dist/assets/design-time-layers-BRseeSmV.js +1 -0
  134. package/dist/assets/{design-time-mount.service-Ks-5Wkcs.js → design-time-mount.service-BTVu3yKo.js} +2 -2
  135. package/dist/assets/{design-time-mount.service-Ca-DZGFV.js → design-time-mount.service-DKvc7lVK.js} +2 -2
  136. package/dist/assets/design-time-react-mount-C7rB56QD.js +1 -0
  137. package/dist/assets/{document-preview-three-DThkjI1S.js → document-preview-three-CxmRhCcV.js} +1 -1
  138. package/dist/assets/{dom-authoring-adapter-BrLU8IJ_.js → dom-authoring-adapter-L8OzXfmE.js} +1 -1
  139. package/dist/assets/{draco3d-B2cwv46o.js → draco3d-BjNuXv66.js} +1 -1
  140. package/dist/assets/{edit-mode-audio.service-D4ITNbsm.js → edit-mode-audio.service-BwI5u845.js} +1 -1
  141. package/dist/assets/edit-mode-authoring-D5f7aHHl.js +1 -0
  142. package/dist/assets/{edit-mode-networking.service-BNv-FTRh.js → edit-mode-networking.service-DqP_4lbI.js} +1 -1
  143. package/dist/assets/editor-api-BM7H_F4G.js +1 -0
  144. package/dist/assets/{editor-layers-BDJnAAzj.js → editor-layers-D-CTUqco.js} +1 -1
  145. package/dist/assets/editor-presentation-activity-CqJH4G9t.js +1 -0
  146. package/dist/assets/{editor-shell-store-ChLcVeNB.js → editor-shell-store-DHVWS8cE.js} +1 -1
  147. package/dist/assets/{entity-object-JmYMfLsx.js → entity-object-MKYemTFM.js} +1 -1
  148. package/dist/assets/{extend-Cc-nEa_A.js → extend-BrgqZiMY.js} +1 -1
  149. package/dist/assets/fork-menu-DE2MK3Nq.js +1 -0
  150. package/dist/assets/{frame-debugger-store-DaCbAYSW.js → frame-debugger-store-BXoLKTdZ.js} +1 -1
  151. package/dist/assets/game-audio-BeCyd0Ha.js +1 -0
  152. package/dist/assets/{game-contract-seams-BnPFGLll.js → game-contract-seams-tyKDsfaP.js} +1 -1
  153. package/dist/assets/{game-css-scope-transform-D_p7cVgW.js → game-css-scope-transform-DcjrwtVc.js} +2 -2
  154. package/dist/assets/game-document.service-CTb2itHQ.js +1 -0
  155. package/dist/assets/game-eval.command-CpDKXOQU.js +2 -0
  156. package/dist/assets/game-module-access-BTInp2NG.js +1 -0
  157. package/dist/assets/game-network-DW5ARz4R.js +22 -0
  158. package/dist/assets/{gameplay-export-BzYzLZPi.js → gameplay-export-cHk3v9y-.js} +1 -1
  159. package/dist/assets/gameplay-replay-HRenPTtU.js +1 -0
  160. package/dist/assets/gameplay.command-DcY2lKKX.js +1 -0
  161. package/dist/assets/generation-CdOATubd.css +1 -0
  162. package/dist/assets/{generation-jobs-BZhOMrp-.js → generation-jobs-CJBehuUp.js} +1 -1
  163. package/dist/assets/generation.service-BMOc-C9i.js +1 -0
  164. package/dist/assets/{generations-DVDht_31.js → generations-ssgVOe_6.js} +1 -1
  165. package/dist/assets/generations.status-B_SmPReI.js +1 -0
  166. package/dist/assets/hierarchy-marks-BuCO8Ke-.js +1 -0
  167. package/dist/assets/hierarchy-marks-CsTaTkc7.js +1 -0
  168. package/dist/assets/hosted-asset-materialization-CiXZI85V.js +2 -0
  169. package/dist/assets/{ibl-override-material-CiKkaOTW.js → ibl-override-material-CMo_a49U.js} +1 -1
  170. package/dist/assets/index-B0S4fQQV.js +1 -0
  171. package/dist/assets/{index-C3Pw-9So.js → index-B9bd4k-t.js} +1 -1
  172. package/dist/assets/index-BMxv2MNV.js +1 -0
  173. package/dist/assets/{index-DUZeuA7g.js → index-Bm4_DmRO.js} +1 -1
  174. package/dist/assets/{index-cNc-iFbq.js → index-BvBlIRwM.js} +1 -1
  175. package/dist/assets/{index-Ck3JFh48.js → index-BweKDdi_.js} +1 -1
  176. package/dist/assets/{index-BRJMIUK0.js → index-C5ZAyrKq.js} +346 -345
  177. package/dist/assets/index-CPiRKiDC.css +1 -0
  178. package/dist/assets/index-CfpGZrbC.js +1 -0
  179. package/dist/assets/index-Czvj6whv.js +1 -0
  180. package/dist/assets/{index-SS9EugVg.js → index-DgPDGGSV.js} +2 -2
  181. package/dist/assets/{inference-diagnostics-xecGdohW.js → inference-diagnostics-DLt9ql9I.js} +1 -1
  182. package/dist/assets/{ingest-boot-viewport-DAt8WFSy.js → ingest-boot-viewport-BXVXjYpG.js} +1 -1
  183. package/dist/assets/ingest-siblings-DWJ7OGB_.js +1 -0
  184. package/dist/assets/ingest-source-persistence-6ShMoSCa.js +1 -0
  185. package/dist/assets/ingest.service-BBbX8ibg.js +1 -0
  186. package/dist/assets/{inspect-Dr4qvDpJ.js → inspect-Cz3Zyx_1.js} +1 -1
  187. package/dist/assets/inspection-D8fZOHCM.js +1 -0
  188. package/dist/assets/instances.command-BrdlngrL.js +1 -0
  189. package/dist/assets/{json-history-resource-DwS10tqD.js → json-history-resource-Uqrihfc8.js} +1 -1
  190. package/dist/assets/layered-pick-CAVQMPI7.js +1 -0
  191. package/dist/assets/{light-DcFqVCmv.js → light-CqzsCWeJ.js} +1 -1
  192. package/dist/assets/{live-project-verbs-C3LzprCe.js → live-project-verbs-CdFmLYOo.js} +1 -1
  193. package/dist/assets/{machine.document-BzZxubYQ.js → machine.document-DRIFOVaa.js} +1 -1
  194. package/dist/assets/{machines.finder-BR02bfVG.js → machines.finder-DPCT6few.js} +1 -1
  195. package/dist/assets/material-BVApn1V_.js +1 -0
  196. package/dist/assets/{material-factory-COz7qZhC.js → material-factory-B_75xxFD.js} +1 -1
  197. package/dist/assets/{mesh-DcmO-mWI.js → mesh-DdA3mExo.js} +1 -1
  198. package/dist/assets/model-asset-sections-D1uxOu2v.css +1 -0
  199. package/dist/assets/model-asset-sections.service-CJnSIckZ.js +1 -0
  200. package/dist/assets/{model-inspection-CXHxrafK.js → model-inspection-DvspbmJl.js} +1 -1
  201. package/dist/assets/{model-thumbnail-BEKPWg4l.js → model-thumbnail-BmQs-h6t.js} +1 -1
  202. package/dist/assets/{models.finder-c1I0tp2M.js → models.finder-Qv_Hsccy.js} +1 -1
  203. package/dist/assets/module-mode-MJ4Gbsry.js +2 -0
  204. package/dist/assets/mount-canvas-ingest-root-BxtM8OaB.js +2 -0
  205. package/dist/assets/mount-dom-ingest-root-pGatqO46.js +2 -0
  206. package/dist/assets/mount-ingest-root-C7jb-mCl.js +2 -0
  207. package/dist/assets/mount-manifest-BfoHBuzn.js +1 -0
  208. package/dist/assets/mount-readiness-DyAd17pe.js +4 -0
  209. package/dist/assets/mount-three-ingest-root-Boa5mcaF.js +1 -0
  210. package/dist/assets/{mounted-authoring-Clftxx0x.js → mounted-authoring-DxMISwvR.js} +1 -1
  211. package/dist/assets/{mounted-story-viewport-source-B4-eAYGI.js → mounted-story-viewport-source-DfnLxI1f.js} +1 -1
  212. package/dist/assets/{native-debug-module-2_HVupdg.js → native-debug-module-BlrALjM3.js} +1 -1
  213. package/dist/assets/{navigation-CH3-zr1n.js → navigation-CqG5o5AR.js} +1 -1
  214. package/dist/assets/{navmesh.menu-Dfi-Pk-8.js → navmesh.menu-D4TdVDhe.js} +1 -1
  215. package/dist/assets/{navmesh.service-Cz7QFY-M.js → navmesh.service-DWKT5ruQ.js} +1 -1
  216. package/dist/assets/network-observer.service-ZRAquNq4.js +1 -0
  217. package/dist/assets/network.utility-DjeOEvAY.js +1 -0
  218. package/dist/assets/object-marks-BnvSuCTt.js +1 -0
  219. package/dist/assets/{object3d-authoring-subject-BDrxd1GA.js → object3d-authoring-subject-XccsO0xG.js} +1 -1
  220. package/dist/assets/{object3d-document-session-registry-DJDEDM0p.js → object3d-document-session-registry-CMRJdFp6.js} +2 -2
  221. package/dist/assets/{oid-transform-D5Kxt6ij.js → oid-transform-DaA6yW6o.js} +1 -1
  222. package/dist/assets/{particles-vRp0Lf3o.js → particles-DsQRcDBY.js} +1 -1
  223. package/dist/assets/{performance-profiler-OwnXQX0M.js → performance-profiler-CMbwGBuk.js} +1 -1
  224. package/dist/assets/pixi-authoring-adapter-BoBt8bB5.js +1 -0
  225. package/dist/assets/pixi-live-write-target-CYZgvC6U.js +1 -0
  226. package/dist/assets/play.command-D9JGJP-e.js +2 -0
  227. package/dist/assets/pose-guard-CLabLSzf.js +1 -0
  228. package/dist/assets/presentation-COhHQdmR.js +1 -0
  229. package/dist/assets/{product-CxmUIxmr.js → product-CaRGoiIH.js} +1 -1
  230. package/dist/assets/{profiler.action-Dzy9DuAc.js → profiler.action-Cz7HYWjh.js} +1 -1
  231. package/dist/assets/{profiler.menu-jLDO3U6N.js → profiler.menu-D5aR_FBy.js} +1 -1
  232. package/dist/assets/profiler.utility-KwxlIPKb.js +1 -0
  233. package/dist/assets/{project-authoring-session-C3eusefK.js → project-authoring-session-DKXHVwxO.js} +2 -2
  234. package/dist/assets/project-provenance-BGnJXJwa.js +1 -0
  235. package/dist/assets/{properties-bone-constraints.inspector-B_PbSMV7.js → properties-bone-constraints.inspector-Bo-sU8eR.js} +1 -1
  236. package/dist/assets/{properties-bone.inspector-CMDEQuBd.js → properties-bone.inspector-BQiWplQv.js} +1 -1
  237. package/dist/assets/{properties-collection.inspector-D7Ay8yRj.js → properties-collection.inspector-C5BnR-GE.js} +1 -1
  238. package/dist/assets/{properties-constraints.inspector-DS1fZgXK.js → properties-constraints.inspector-CyheU12R.js} +1 -1
  239. package/dist/assets/{properties-data.inspector-k2pGN2Mp.js → properties-data.inspector-CkycARja.js} +1 -1
  240. package/dist/assets/{properties-material.inspector-Bb3yAGUx.js → properties-material.inspector-Bl_PUmY-.js} +1 -1
  241. package/dist/assets/{properties-modifiers.inspector-BcJfe-Wy.js → properties-modifiers.inspector-j7SnOxQq.js} +1 -1
  242. package/dist/assets/{properties-object.inspector-CUSfXJuq.js → properties-object.inspector-DcR3MGLK.js} +1 -1
  243. package/dist/assets/{properties-output.inspector-BTVW2kn1.js → properties-output.inspector-BLjw6K4b.js} +1 -1
  244. package/dist/assets/{properties-particles.inspector-Cw0fxx3B.js → properties-particles.inspector-BUIm2-Jf.js} +1 -1
  245. package/dist/assets/{properties-physics.inspector-C-0bD2bu.js → properties-physics.inspector-DNvRcxb6.js} +1 -1
  246. package/dist/assets/{properties-render.inspector-C8D5UpjX.js → properties-render.inspector-8FMZ-qoZ.js} +1 -1
  247. package/dist/assets/{properties-scene.inspector-HjK6QHGg.js → properties-scene.inspector-Dx7_z75k.js} +1 -1
  248. package/dist/assets/{properties-texture.inspector-CckZgUaI.js → properties-texture.inspector-WT15951-.js} +1 -1
  249. package/dist/assets/{properties-view-layer.inspector-C1ajtVSk.js → properties-view-layer.inspector-P7VNTdqr.js} +1 -1
  250. package/dist/assets/{properties-world.inspector-BiT_EdT-.js → properties-world.inspector-B3t1q8TF.js} +1 -1
  251. package/dist/assets/r3f-design-session-lsbFnoWH.js +2 -0
  252. package/dist/assets/{r3f-physics-binding-DzrbpqjM.js → r3f-physics-binding-Cx8yhuwt.js} +1 -1
  253. package/dist/assets/{r3f-source-authoring-adapter-DbbeRcvt.js → r3f-source-authoring-adapter-jH3G0TeH.js} +2 -2
  254. package/dist/assets/react-canvas-navigation-B_gOe3CI.js +1 -0
  255. package/dist/assets/react-inspector.service-CZf1vfdX.js +1 -0
  256. package/dist/assets/react-story-board-CCm2Opwn.js +1 -0
  257. package/dist/assets/{react-three-rapier.esm-U8J7g6tH.js → react-three-rapier.esm-CHXGG51p.js} +1 -1
  258. package/dist/assets/react-world-authoring-adapter-CnzxMtYz.js +1 -0
  259. package/dist/assets/{realm-services-CnY105XU.js → realm-services-Do9J6nsb.js} +1 -1
  260. package/dist/assets/reflection-probe-capture.inspector-BAjjIybz.js +1 -0
  261. package/dist/assets/{reflection-probe-BHNGwVyz.js → reflection-probe-sIto9mh0.js} +1 -1
  262. package/dist/assets/registry-Xnduk02T.js +1 -0
  263. package/dist/assets/{relative-import-specifier-BFKIWEWs.js → relative-import-specifier-CPFTrxi4.js} +1 -1
  264. package/dist/assets/{render-env-BkKZ4uMA.js → render-env-YJlI8K0i.js} +1 -1
  265. package/dist/assets/{render-features-rxbawsRb.js → render-features-DMSV2qKJ.js} +1 -1
  266. package/dist/assets/{render-settings-DS5leCed.js → render-settings-CRyDhHyz.js} +1 -1
  267. package/dist/assets/{resolve-three-CVnMRHxw.js → resolve-three-D27rMc37.js} +19 -19
  268. package/dist/assets/root-seam-contract-gjWUd5uu.js +1 -0
  269. package/dist/assets/run-selection-B0jOdyYt.js +2 -0
  270. package/dist/assets/scene-capture-Di9cM1p4.js +1 -0
  271. package/dist/assets/scene-document.service-XxGs4HHE.js +2 -0
  272. package/dist/assets/{scene-framing-BQt72ZCw.js → scene-framing-DkZKDwH3.js} +1 -1
  273. package/dist/assets/{scene-index--lRWLEmW.js → scene-index-DHeKmalD.js} +1 -1
  274. package/dist/assets/{scene-query-s1y04OVB.js → scene-query-ByZtXA2m.js} +1 -1
  275. package/dist/assets/seeded-random-BJthDRMu.js +1 -0
  276. package/dist/assets/{session-CTXsU1lK.js → session-x8E_NJk2.js} +34 -34
  277. package/dist/assets/{setup-renderer-Cwkl1Ar6.js → setup-renderer-F9mG7t6r.js} +1 -1
  278. package/dist/assets/{source-object3d-authoring-adapter-DF679Ncb.js → source-object3d-authoring-adapter-CvmFpSUj.js} +1 -1
  279. package/dist/assets/{source-persistence-backend-CwLYVPXj.js → source-persistence-backend-au3WtEn6.js} +1 -1
  280. package/dist/assets/{spark-renderer-lifecycle-DfYpvEJa.js → spark-renderer-lifecycle-B6Axb6jm.js} +1 -1
  281. package/dist/assets/{stage-keyboard-B8BEW592.js → stage-keyboard-BQkndG_D.js} +1 -1
  282. package/dist/assets/stage-overlay-set-g6eWhuRv.js +1 -0
  283. package/dist/assets/stage-presence-markers-0CDfO5f4.js +1 -0
  284. package/dist/assets/stage-transform-tools-BzPl7OIo.js +1 -0
  285. package/dist/assets/standard-viewport-dressing-BW-dM_1h.js +24 -0
  286. package/dist/assets/{state-watch.action-DnR5Zjr-.js → state-watch.action-Z1nQ5awu.js} +1 -1
  287. package/dist/assets/{state-watch.menu-wYLCLsAw.js → state-watch.menu-CQHGUF3W.js} +1 -1
  288. package/dist/assets/state-watch.utility-DCIg2i79.js +1 -0
  289. package/dist/assets/{story-capture-BmnwHGDV.js → story-capture-BIrjDKeY.js} +1 -1
  290. package/dist/assets/story-documents-BvG2xeaR.js +3 -0
  291. package/dist/assets/{story-documents.service-B6v7Z-WE.js → story-documents.service-DOSEa3ja.js} +1 -1
  292. package/dist/assets/{story-documents.service-yagl1wGp.js → story-documents.service-y1m7XGMJ.js} +1 -1
  293. package/dist/assets/{story-media-presence-BqRMu572.js → story-media-presence-HLV-KaMj.js} +1 -1
  294. package/dist/assets/{story-pixi-preview-Da6afqLg.js → story-pixi-preview-CMhho2gG.js} +1 -1
  295. package/dist/assets/{story-presentation-DMSYRWaz.js → story-presentation-CYhVv8Ku.js} +1 -1
  296. package/dist/assets/story-three-preview-CgcLF5lE.js +2 -0
  297. package/dist/assets/{structural-ids-Br2zjINh.js → structural-ids-BOo2BRoY.js} +1 -1
  298. package/dist/assets/studio-environment-R9qXUUcC.js +2 -0
  299. package/dist/assets/{surface-state-1lTOi8FD.js → surface-state-D8Qnowo6.js} +1 -1
  300. package/dist/assets/{syntactic-prop-specs-eiQXwMIc.js → syntactic-prop-specs-8gkBuc5j.js} +1 -1
  301. package/dist/assets/team-playtest.service-BBMZ2iyk.js +1 -0
  302. package/dist/assets/{three-TCuY32m_.js → three-DiL6vMXq.js} +1 -1
  303. package/dist/assets/three-authoring-adapter-CkLR2zGf.js +1 -0
  304. package/dist/assets/three-authoring.service-CovhlCGx.js +2 -0
  305. package/dist/assets/{three-ingest-runtime-B7rtg3QE.js → three-ingest-runtime-CwTqAHgX.js} +1 -1
  306. package/dist/assets/{three-integration-BdN5Nhsg.js → three-integration-DXOFI88n.js} +2 -2
  307. package/dist/assets/three-integration.service-rCAqpqSp.js +1 -0
  308. package/dist/assets/three-projection-core-B7Lf8tOp.js +1 -0
  309. package/dist/assets/{three-state-DwFE3ay2.js → three-state-BCACvUtm.js} +1 -1
  310. package/dist/assets/{three-story-capture.service-CvpV3v5a.js → three-story-capture.service-rTFKNtHA.js} +2 -2
  311. package/dist/assets/{three-story-model-C2r2BuiA.js → three-story-model-BjKr7OMn.js} +1 -1
  312. package/dist/assets/three-viewport-presentation-CBzvc2v2.js +141 -0
  313. package/dist/assets/tools-DfctM216.js +1 -0
  314. package/dist/assets/transform-mode-request-DlEApNrA.js +1 -0
  315. package/dist/assets/transport-strip-xCg94CuI.js +1 -0
  316. package/dist/assets/transport.header-BRtdky0x.js +1 -0
  317. package/dist/assets/{trigger-volume-DP0G1VBe.js → trigger-volume-BLkHmfm9.js} +1 -1
  318. package/dist/assets/tuples-BDz3wbQL.js +1 -0
  319. package/dist/assets/ui-board-document-DvbK_HVN.js +2 -0
  320. package/dist/assets/{user-data-Bpj7diUS.js → user-data-C84W0V47.js} +1 -1
  321. package/dist/assets/user-data-CODoGZqA.js +1 -0
  322. package/dist/assets/{utility-view-state-CAfbFbKQ.js → utility-view-state-CDRxZSo-.js} +1 -1
  323. package/dist/assets/viewport-door-BARIpMu-.js +1 -0
  324. package/dist/assets/{viewport-root-presentation-vgxsTyj4.js → viewport-root-presentation-hRLF0BeO.js} +1 -1
  325. package/dist/assets/{viewport-surface-status-cwCiBGa7.js → viewport-surface-status-TUfhXKR9.js} +1 -1
  326. package/dist/assets/{webworkerAll-Cm3gTjWi.js → webworkerAll-PJtcQ1FD.js} +1 -1
  327. package/dist/assets/worker-BtXrsgFy.js +2 -0
  328. package/dist/assets/workspace-arrangement-DqG5sUns.js +1 -0
  329. package/dist/assets/world-documents-D69XaqUX.js +1 -0
  330. package/dist/assets/world-root-stage-binding-BgZWZEuD.js +1 -0
  331. package/dist/assets/{xstate-animation-binding-BGLxcZT_.js → xstate-animation-binding-CIyLzGHs.js} +1 -1
  332. package/dist/assets/{xstate-animation-meta-D_T441Ru.js → xstate-animation-meta-CbYWup3R.js} +1 -1
  333. package/dist/volter-shared-react.json +10 -0
  334. package/dist/volter-shared-three.json +3 -0
  335. package/dist-node/cli.js +253 -210
  336. package/dist-node/create.js +103 -82
  337. package/package.json +23 -20
  338. package/src/contributions.d.ts +1 -1
  339. package/src/index.ts +10 -10
  340. package/starter/cube.py +1 -1
  341. package/template/.agents/references/project-manual.md +17 -17
  342. package/template/.agents/skills/editor/SKILL.md +6 -6
  343. package/template/.agents/skills/editor/agents/openai.yaml +3 -3
  344. package/template/.agents/skills/editor/references/editor-control.md +62 -62
  345. package/template/{.claude/skills/vgai-3d-models → .agents/skills/volter-3d-models}/SKILL.md +3 -3
  346. package/template/{.github/skills/vgai-ingest-existing-game → .agents/skills/volter-ingest-existing-game}/SKILL.md +2 -2
  347. package/template/.agents/skills/{vgai-music → volter-music}/SKILL.md +35 -11
  348. package/template/{.claude/skills/vgai-threejs-authoring → .agents/skills/volter-threejs-authoring}/SKILL.md +9 -9
  349. package/template/.agents/skills/volter-threejs-authoring/agents/openai.yaml +4 -0
  350. package/template/{.github/skills/vgai-threejs-authoring → .agents/skills/volter-threejs-authoring}/references/helper-catalog.md +1 -1
  351. package/template/.claude/skills/editor/SKILL.md +6 -6
  352. package/template/.claude/skills/editor/agents/openai.yaml +3 -3
  353. package/template/.claude/skills/editor/references/editor-control.md +62 -62
  354. package/template/{.agents/skills/vgai-3d-models → .claude/skills/volter-3d-models}/SKILL.md +3 -3
  355. package/template/{.agents/skills/vgai-ingest-existing-game → .claude/skills/volter-ingest-existing-game}/SKILL.md +2 -2
  356. package/template/{.github/skills/vgai-threejs-authoring → .claude/skills/volter-threejs-authoring}/SKILL.md +9 -9
  357. package/template/.claude/skills/volter-threejs-authoring/agents/openai.yaml +4 -0
  358. package/template/.claude/skills/{vgai-threejs-authoring → volter-threejs-authoring}/references/helper-catalog.md +1 -1
  359. package/template/.github/copilot-instructions.md +1 -1
  360. package/template/.github/skills/editor/SKILL.md +6 -6
  361. package/template/.github/skills/editor/agents/openai.yaml +3 -3
  362. package/template/.github/skills/editor/references/editor-control.md +62 -62
  363. package/template/.github/skills/{vgai-3d-models → volter-3d-models}/SKILL.md +3 -3
  364. package/template/{.claude/skills/vgai-ingest-existing-game → .github/skills/volter-ingest-existing-game}/SKILL.md +2 -2
  365. package/template/{.agents/skills/vgai-threejs-authoring → .github/skills/volter-threejs-authoring}/SKILL.md +9 -9
  366. package/template/.github/skills/volter-threejs-authoring/agents/openai.yaml +4 -0
  367. package/template/{.agents/skills/vgai-threejs-authoring → .github/skills/volter-threejs-authoring}/references/helper-catalog.md +1 -1
  368. package/template/.mcp.json +3 -3
  369. package/template/AGENTS.md +24 -23
  370. package/template/DEVLOG.md +1 -1
  371. package/template/IDIOMS.md +3 -3
  372. package/template/LICENSE +3 -3
  373. package/template/README.md +12 -12
  374. package/template/check-idioms.ts +51 -51
  375. package/template/manifest-entry-modules-plugin.ts +17 -4
  376. package/template/package.json +12 -12
  377. package/template/server/loopback.ts +1 -1
  378. package/template/server/main.ts +4 -4
  379. package/template/server/rooms/arena-room.ts +8 -8
  380. package/template/server/rooms/game-room.ts +8 -8
  381. package/template/server/rooms.ts +2 -2
  382. package/template/src/bot/QaTester.tsx +1 -1
  383. package/template/src/bot/bot-station.ts +2 -2
  384. package/template/src/bot/tester-station.ts +1 -1
  385. package/template/src/contributions/README.md +1 -1
  386. package/template/src/contributions/analytics.analytics.tsx +1 -1
  387. package/template/src/contributions/data.document.tsx +2 -2
  388. package/template/src/contributions/pages.finder.ts +1 -1
  389. package/template/src/contributions/tester.inspector.tsx +2 -2
  390. package/template/src/contributions/use-game-modules.ts +1 -1
  391. package/template/src/input.ts +2 -2
  392. package/template/src/lib/reflections/volume-reflection-material.ts +59 -59
  393. package/template/src/lib/static-batch/Frozen.tsx +1 -1
  394. package/template/src/lib/static-batch/mutation-watch.ts +1 -1
  395. package/template/src/main.ts +58 -6
  396. package/template/src/manifest-entry-modules.d.ts +12 -1
  397. package/template/src/prefabs/HeroBox.stories.tsx +1 -1
  398. package/template/src/world.tsx +1 -1
  399. package/template/tsconfig.json +1 -1
  400. package/template/validate-manifest.ts +3 -3
  401. package/template/vite.config.ts +11 -11
  402. package/template/{vgai.adapter.ts → volter.adapter.ts} +1 -1
  403. package/template/{vgai.project.json → volter.project.json} +2 -2
  404. package/template-dotfiles/gitignore +27 -27
  405. package/workbench/src/media/game-cover.css +11 -11
  406. package/workbench/src/product.contribution.ts +28 -28
  407. package/workbench/src/{vgaiGameSkew.ts → volterGameSkew.ts} +16 -16
  408. package/dist/assets/AudioViewer-BDPqHDfU.js +0 -1
  409. package/dist/assets/CanvasBoardDocument-mxL0oJ3N.js +0 -1
  410. package/dist/assets/CanvasSceneViewport-C_mapCwC.js +0 -1
  411. package/dist/assets/ColorInput-QUPS1pEB.js +0 -1
  412. package/dist/assets/ImageViewer-tlVvkdM4.js +0 -1
  413. package/dist/assets/InspectorObjectPreview-W-y079DS.js +0 -1
  414. package/dist/assets/JsonAssetDocument-CPmcWFPW.js +0 -2
  415. package/dist/assets/ModelAssetDocument-De1HKuxG.js +0 -1
  416. package/dist/assets/Object3DDocumentToolbar-Cks81kCS.js +0 -1
  417. package/dist/assets/Object3DDocumentViewport-DCwiSY3O.js +0 -2
  418. package/dist/assets/OnlineAssetDetail-CNuwSQRQ.js +0 -1
  419. package/dist/assets/PlayBar-bT8Xdrap.js +0 -1
  420. package/dist/assets/ReactCanvasControls-CnJrPj-B.js +0 -1
  421. package/dist/assets/RootSelectionOverlay-CpaGluQu.js +0 -1
  422. package/dist/assets/ShadowEditor-CVtMlALn.js +0 -1
  423. package/dist/assets/StageHost-B89HKcvd.js +0 -2
  424. package/dist/assets/ThreeBoardDocument-BAgHrbtu.js +0 -2
  425. package/dist/assets/Toolbar-DkTHnQto.js +0 -1
  426. package/dist/assets/VideoViewer-DMV8lf4P.js +0 -1
  427. package/dist/assets/ViewportShadingMenu-CXPi6fl8.js +0 -1
  428. package/dist/assets/active-ingest-DA426a81.js +0 -3
  429. package/dist/assets/adapter-runtime-bindings-4cmsRvRh.js +0 -2
  430. package/dist/assets/animation-mixers.service-DK64IuYq.js +0 -1
  431. package/dist/assets/animation-timeline.utility-D-g0zrOl.js +0 -1
  432. package/dist/assets/asset-editor-persistence-BGWIqZdk.js +0 -1
  433. package/dist/assets/asset-loaders-C0KQI5eY.js +0 -2
  434. package/dist/assets/audio.utility-BmE9WMUg.js +0 -1
  435. package/dist/assets/autoplay.service-CjPnv3QW.js +0 -1
  436. package/dist/assets/binding-resolver-dE0GnZT5.js +0 -2
  437. package/dist/assets/blender-emscripten-engine-BeWFjMn-.js +0 -2
  438. package/dist/assets/blender-version.status-OsFoc9SA.js +0 -1
  439. package/dist/assets/blender-wali-engine-da698rDf.js +0 -2
  440. package/dist/assets/blender.keymap-_rF_vRX8.js +0 -1
  441. package/dist/assets/blender.status-ujwGU6dU.js +0 -1
  442. package/dist/assets/board-guides-BEKPgD9M.js +0 -1
  443. package/dist/assets/body-marks-RKb_LTwL.js +0 -1
  444. package/dist/assets/bridge.command-BF00Iefm.js +0 -3
  445. package/dist/assets/build-profiles.document-CqNrDdh9.js +0 -2
  446. package/dist/assets/build-progress.status-Bo1ZgJcb.js +0 -1
  447. package/dist/assets/build-session-GZcSAfPN.js +0 -9
  448. package/dist/assets/build.header-Bt1kwHWl.js +0 -1
  449. package/dist/assets/canvas-design-mount-BbLW_Nci.js +0 -6
  450. package/dist/assets/canvas-entry-runtime-UNYuSfG0.js +0 -2
  451. package/dist/assets/capability-coverage-DZ-onC5j.js +0 -7
  452. package/dist/assets/component-board.service-q_TM9BCw.js +0 -2
  453. package/dist/assets/component-contracts.service-CPbfXE1h.js +0 -1
  454. package/dist/assets/component-instance-root-B0C5oNEm.js +0 -1
  455. package/dist/assets/component-verbs.service-CnA11bJq.js +0 -1
  456. package/dist/assets/connection.status-Yvt0bX0r.js +0 -1
  457. package/dist/assets/constraints.inspector-4r8jWq5a.js +0 -1
  458. package/dist/assets/coverage.service-DcpEoBuf.js +0 -3
  459. package/dist/assets/create-runtime-DBfUy0SO.js +0 -3
  460. package/dist/assets/curve-DVd18iAX.js +0 -1
  461. package/dist/assets/data-check-core-CQEjuFyt.js +0 -1
  462. package/dist/assets/data-ref-CWnkj-HX.js +0 -1
  463. package/dist/assets/debug-bridge-D3_-EgRE.js +0 -1
  464. package/dist/assets/debug-registry-P0_YQGWd.js +0 -1
  465. package/dist/assets/design-time-layers-ChswRUJt.js +0 -1
  466. package/dist/assets/design-time-react-mount-C85KfXOd.js +0 -1
  467. package/dist/assets/edit-mode-authoring-DeCxPcHM.js +0 -1
  468. package/dist/assets/editor-api-BFTIRlWa.js +0 -1
  469. package/dist/assets/editor-presentation-activity-C7SNSmTd.js +0 -1
  470. package/dist/assets/entry-adjudication-Dc18TIqT.js +0 -1
  471. package/dist/assets/fork-menu-DpKqRhF5.js +0 -1
  472. package/dist/assets/game-audio-CaGKzia4.js +0 -1
  473. package/dist/assets/game-document.service-Chmt4065.js +0 -1
  474. package/dist/assets/game-eval.command-DRSvOJ_1.js +0 -2
  475. package/dist/assets/game-module-access-o3iXZpCA.js +0 -1
  476. package/dist/assets/game-network-Ct2FQYmu.js +0 -1
  477. package/dist/assets/gameplay-replay-BwdxV4oF.js +0 -1
  478. package/dist/assets/gameplay.command-Boqv1hnc.js +0 -1
  479. package/dist/assets/generation-DhwCUHPf.css +0 -1
  480. package/dist/assets/generation.service-o9aXlsx4.js +0 -1
  481. package/dist/assets/generations.status-BvzgHlyk.js +0 -1
  482. package/dist/assets/hierarchy-marks-BLPfSIym.js +0 -1
  483. package/dist/assets/hierarchy-marks-Cc_3lxw6.js +0 -1
  484. package/dist/assets/hosted-asset-materialization-BpbnhJac.js +0 -2
  485. package/dist/assets/index-0Lm0Nf1M.css +0 -1
  486. package/dist/assets/index-BHoAKyAC.js +0 -1
  487. package/dist/assets/index-BeK4RPgj.js +0 -1
  488. package/dist/assets/index-C1c3eOmm.js +0 -1
  489. package/dist/assets/index.module-Ycad3DJq.js +0 -1
  490. package/dist/assets/ingest-siblings-BtiEXLnh.js +0 -1
  491. package/dist/assets/ingest-source-persistence-Dmdo-UBp.js +0 -1
  492. package/dist/assets/ingest.service-vbCucMz7.js +0 -1
  493. package/dist/assets/inspection-CObLhnrs.js +0 -1
  494. package/dist/assets/instances.command-BwayrqNm.js +0 -1
  495. package/dist/assets/layered-pick-kiQf53t5.js +0 -1
  496. package/dist/assets/material-B_V78pTt.js +0 -1
  497. package/dist/assets/model-asset-sections-CFvvihfx.css +0 -1
  498. package/dist/assets/model-asset-sections.service-CqSclZGY.js +0 -1
  499. package/dist/assets/module-mode-BH2R93XP.js +0 -2
  500. package/dist/assets/mount-canvas-ingest-root-D1z9i5B3.js +0 -2
  501. package/dist/assets/mount-dom-ingest-root-BAmmNxlm.js +0 -2
  502. package/dist/assets/mount-ingest-root-DYR0TMIt.js +0 -2
  503. package/dist/assets/mount-manifest-DdkFYdVA.js +0 -1
  504. package/dist/assets/mount-readiness-Ds0HvvLH.js +0 -4
  505. package/dist/assets/mount-three-ingest-root-DVbACDUy.js +0 -1
  506. package/dist/assets/network-observer.service-Ce83TdsU.js +0 -1
  507. package/dist/assets/network.utility-DFDul2Xb.js +0 -1
  508. package/dist/assets/object-marks-DwvIEBOK.js +0 -1
  509. package/dist/assets/pixi-authoring-adapter-BChknIdC.js +0 -1
  510. package/dist/assets/pixi-live-write-target-BjDsBQbp.js +0 -1
  511. package/dist/assets/play-mode-DICV4cKP.js +0 -22
  512. package/dist/assets/play.command-NHyi5rzF.js +0 -2
  513. package/dist/assets/pose-guard-DILO6gGq.js +0 -1
  514. package/dist/assets/presentation-BeNFBfKg.js +0 -1
  515. package/dist/assets/profiler.utility-Do2Bw7MY.js +0 -1
  516. package/dist/assets/project-provenance-4ldz-EOG.js +0 -1
  517. package/dist/assets/r3f-design-session-B5GsZI5M.js +0 -2
  518. package/dist/assets/react-canvas-navigation-Cp3cOHJa.js +0 -1
  519. package/dist/assets/react-inspector.service-Bm0OnanU.js +0 -1
  520. package/dist/assets/react-story-board-GaXqr03H.js +0 -1
  521. package/dist/assets/react-world-authoring-adapter-DOjv2pYm.js +0 -1
  522. package/dist/assets/reflection-probe-capture.inspector-DqSW9p1v.js +0 -1
  523. package/dist/assets/registry-CaCdF63N.js +0 -1
  524. package/dist/assets/root-seam-contract-CxLZaRio.js +0 -1
  525. package/dist/assets/run-selection-DzEkGesJ.js +0 -2
  526. package/dist/assets/scene-capture-0a-bTjT8.js +0 -1
  527. package/dist/assets/scene-document.service-CeDwVA7t.js +0 -2
  528. package/dist/assets/seeded-random-BgCwIAAU.js +0 -1
  529. package/dist/assets/stage-overlay-set-BGE03mqb.js +0 -1
  530. package/dist/assets/stage-presence-markers-DIP7YMcO.js +0 -1
  531. package/dist/assets/stage-transform-tools-BQB7EY4l.js +0 -1
  532. package/dist/assets/standard-viewport-dressing-BCA51Tum.js +0 -24
  533. package/dist/assets/state-watch.utility-CFG1Tu1m.js +0 -1
  534. package/dist/assets/story-documents-BTo90DiA.js +0 -3
  535. package/dist/assets/story-three-preview-R1JvrggS.js +0 -2
  536. package/dist/assets/studio-environment-DRxxq_QX.js +0 -2
  537. package/dist/assets/team-playtest.service-hLfjgScx.js +0 -1
  538. package/dist/assets/three-authoring-adapter-htbnVej2.js +0 -1
  539. package/dist/assets/three-authoring.service-BIQAtVdX.js +0 -2
  540. package/dist/assets/three-integration.service-CS8Nvbd2.js +0 -1
  541. package/dist/assets/three-projection-core-CG01r5Ta.js +0 -1
  542. package/dist/assets/three-viewport-presentation-B0z_cECu.js +0 -141
  543. package/dist/assets/tools-B_NJsk05.js +0 -1
  544. package/dist/assets/transform-mode-request-DzD9aUNA.js +0 -1
  545. package/dist/assets/transport-strip-CUjNltnb.js +0 -1
  546. package/dist/assets/transport.header-Bb4FpQ8J.js +0 -1
  547. package/dist/assets/tuples-DfWSY2tr.js +0 -1
  548. package/dist/assets/ui-board-document-CCiiXjX9.js +0 -2
  549. package/dist/assets/user-data-dHvLdpwM.js +0 -1
  550. package/dist/assets/viewport-door-Bj_ZIP85.js +0 -1
  551. package/dist/assets/worker-CC9Ug5Ei.js +0 -2
  552. package/dist/assets/workspace-arrangement-BdAlBwvd.js +0 -1
  553. package/dist/assets/world-documents-DBybpBq8.js +0 -1
  554. package/dist/assets/world-root-stage-binding-ZVYIgr74.js +0 -1
  555. package/dist/vgai-shared-react.json +0 -10
  556. package/dist/vgai-shared-three.json +0 -3
  557. package/template/.agents/skills/vgai-threejs-authoring/agents/openai.yaml +0 -4
  558. package/template/.claude/skills/vgai-threejs-authoring/agents/openai.yaml +0 -4
  559. package/template/.github/skills/vgai-threejs-authoring/agents/openai.yaml +0 -4
  560. /package/dist/assets/{vgai-shared-fontawesome-CU65D4Ij.js → volter-shared-fontawesome-CU65D4Ij.js} +0 -0
  561. /package/dist/assets/{vgai-shared-jsx-dev-runtime-DFDKL7fx.js → volter-shared-jsx-dev-runtime-DFDKL7fx.js} +0 -0
  562. /package/dist/assets/{vgai-shared-jsx-runtime-DIqBpTut.js → volter-shared-jsx-runtime-DIqBpTut.js} +0 -0
  563. /package/dist/assets/{vgai-shared-react-BT7rMc2H.js → volter-shared-react-BT7rMc2H.js} +0 -0
  564. /package/dist/assets/{vgai-shared-react-dom-DFajMqMT.js → volter-shared-react-dom-DFajMqMT.js} +0 -0
  565. /package/dist/assets/{vgai-shared-react-dom-client-S0ozfl6_.js → volter-shared-react-dom-client-S0ozfl6_.js} +0 -0
  566. /package/dist/assets/{vgai-shared-three-DH4yxKwt.js → volter-shared-three-DH4yxKwt.js} +0 -0
  567. /package/template/{.vgai → .volter}/assets.json +0 -0
  568. /package/template/{.vgai → .volter}/provenance.json +0 -0
@@ -0,0 +1 @@
1
+ import{a as n}from"./jsx-runtime-DPjLkJKQ.js";import{ag as S,af as o,aM as B,a0 as L,r as A,eF as F}from"./index-C5ZAyrKq.js";import{r as d}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";const H=250,M=200,P=500,z="stateWatchPins";function x(e){return JSON.stringify([e.provider,...e.path])}function y(e){return[e.provider,...e.path].join(".")}function D(){return A().projectLocalState.projectRootPath()??"__unscoped__"}function k(e){const t=A().projectLocalState.read(z);return Array.isArray(t)?t.filter(r=>typeof r?.provider=="string"&&Array.isArray(r.path)&&r.path.every(s=>typeof s=="string")):[]}function N(e,t){A().projectLocalState.write(z,t.map(r=>({provider:r.provider,path:[...r.path]})))}function j(e){return e!==null&&typeof e=="object"}function O(e){if(typeof e=="string")return`“${e}”`;if(typeof e=="number")return Number.isInteger(e)?String(e):e.toFixed(3);if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="bigint")return`${e}n`;if(typeof e=="function")return"[Function]";if(j(e))try{return Array.isArray(e)?`Array(${e.length})`:`Object(${Object.keys(e).length})`}catch{return"[Unreadable object]"}return String(e)}function _(e){try{return Object.entries(e)}catch{return[]}}function V(e,t){try{if(!Object.hasOwn(e,t.provider))return{available:!1,value:void 0};let r=e[t.provider];for(const s of t.path){if(!j(r)||!Object.hasOwn(r,s))return{available:!1,value:void 0};r=r[s]}return{available:!0,value:r}}catch{return{available:!1,value:void 0}}}function R(e,t,r,s,l,c){if(l.length>=P)return;const g=j(t)&&c.includes(t);if(!j(t)||g){const a={provider:e,path:r,value:g?"[Circular]":t};(y(a).toLowerCase().includes(s)||O(a.value).toLowerCase().includes(s))&&l.push(a);return}const p=[...c,t],m=_(t);if(m.length===0){const a={provider:e,path:r,value:t};y(a).toLowerCase().includes(s)&&l.push(a);return}for(const[a,v]of m)if(R(e,v,[...r,a],s,l,p),l.length>=P)return}const C={fontFamily:o.typography.mono,fontSize:11};function T({leaf:e,pinned:t,onTogglePin:r,depth:s=0}){const l=e.path.at(-1)??e.provider;return n.jsxs("div",{style:{...C,minHeight:22,display:"grid",gridTemplateColumns:"minmax(100px, 0.65fr) minmax(120px, 1fr) auto",alignItems:"center",gap:8,paddingLeft:8+s*14,paddingRight:8,borderBottom:`1px solid ${o.boundary.default}`},title:y(e),children:[n.jsx("span",{style:{color:o.content.primary,overflow:"hidden",textOverflow:"ellipsis"},children:l}),n.jsx("span",{style:{color:o.content.muted,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:O(e.value)}),n.jsx(L,{type:"button",size:"compact",variant:t?"primary":"secondary","aria-pressed":t,title:t?`Remove ${y(e)} from watches`:`Watch ${y(e)}`,onClick:()=>r(e),children:t?"Pinned":"Pin"})]})}function W({provider:e,name:t,value:r,path:s,depth:l,ancestors:c,pinnedKeys:g,onTogglePin:p}){const m=j(r)&&c.includes(r),[a,v]=d.useState(l===0);if(!j(r)||m){const f={provider:e,path:s,value:m?"[Circular]":r};return n.jsx(T,{leaf:f,depth:l,pinned:g.has(x(f)),onTogglePin:p})}const h=_(r),b=h.slice(0,M);return n.jsxs("div",{children:[n.jsxs("button",{type:"button",onClick:()=>v(f=>!f),style:{...C,width:"100%",minHeight:22,display:"flex",alignItems:"center",gap:4,padding:`0 8px 0 ${8+l*14}px`,color:o.content.primary,background:"transparent",border:0,borderBottom:`1px solid ${o.boundary.default}`,textAlign:"left",cursor:"pointer"},children:[n.jsx("span",{style:{width:12,color:o.content.muted},children:n.jsx(F,{direction:a?"down":"right"})}),n.jsx("span",{children:t}),n.jsx("span",{style:{color:o.content.dim},children:Array.isArray(r)?`[${h.length}]`:`{${h.length}}`})]}),a&&b.map(([f,i])=>n.jsx(W,{provider:e,name:f,value:i,path:[...s,f],depth:l+1,ancestors:[...c,r],pinnedKeys:g,onTogglePin:p},f)),a&&h.length>b.length&&n.jsxs("div",{style:{...C,padding:`3px 8px 3px ${8+(l+1)*14}px`,color:o.content.dim},children:[h.length-b.length," more values — narrow with search"]})]})}function E(e){if(!e)return{providers:[],state:{},error:null};let t;try{t=e.providers()}catch(r){return{providers:[],state:{},error:r instanceof Error?r.message:String(r)}}try{return{providers:t,state:e.stateAll(),error:null}}catch(r){return{providers:t,state:{},error:r instanceof Error?r.message:String(r)}}}function U(){const e=D(),[t,r]=d.useState(()=>E(S())),[s,l]=d.useState(!1),[c,g]=d.useState(""),[p,m]=d.useState(()=>k());d.useEffect(()=>m(k()),[e]);const a=d.useCallback(()=>r(E(S())),[]);d.useEffect(()=>{if(a(),s)return;const i=window.setInterval(a,H);return()=>window.clearInterval(i)},[s,a]);const v=d.useMemo(()=>new Set(p.map(x)),[p]),h=d.useCallback(i=>{m(u=>{const w=x(i),I=u.some($=>x($)===w)?u.filter($=>x($)!==w):[...u,{provider:i.provider,path:[...i.path]}];return N(e,I),I})},[e]),b=d.useMemo(()=>{const i=c.trim().toLowerCase();if(!i)return[];const u=[];for(const w of t.providers)R(w.name,t.state[w.name],[],i,u,[]);return u},[c,t]);return S()?n.jsxs("div",{style:{height:"100%",minHeight:0,display:"flex",flexDirection:"column"},children:[n.jsxs("div",{style:{minHeight:34,display:"flex",alignItems:"center",gap:8,padding:"4px 8px",borderBottom:`1px solid ${o.boundary.default}`},children:[n.jsx(B,{value:c,onChange:i=>g(i.target.value),placeholder:"Filter state paths or values…","aria-label":"Filter state watches",style:{width:240}}),n.jsx(L,{type:"button",size:"compact",onClick:()=>l(i=>!i),children:s?"Resume":"Pause"}),n.jsx(L,{type:"button",size:"compact",disabled:!s,onClick:a,children:"Refresh"}),n.jsxs("span",{style:{color:o.content.dim,fontSize:10},children:[t.providers.length," provider",t.providers.length===1?"":"s"," ·"," ",p.length," pinned",s?" · paused":""]}),t.error&&n.jsx("span",{style:{color:o.semantic.danger,fontSize:10},children:t.error})]}),n.jsxs("div",{style:{flex:1,minHeight:0,display:"grid",gridTemplateColumns:"minmax(280px, 1fr) minmax(240px, 0.65fr)"},children:[n.jsxs("section",{"aria-label":"Live state",style:{minWidth:0,overflow:"auto"},children:[c.trim()?b.length>0?b.map(i=>n.jsx(T,{leaf:i,pinned:v.has(x(i)),onTogglePin:h},x(i))):n.jsxs("div",{style:{padding:10,color:o.content.dim,fontSize:11},children:["No state values match “",c.trim(),"”."]}):t.providers.map(i=>n.jsx(W,{provider:i.name,name:`${i.name} · ${i.tier}`,value:t.state[i.name],path:[],depth:0,ancestors:[],pinnedKeys:v,onTogglePin:h},i.name)),t.providers.length===0&&n.jsx("div",{style:{padding:10,color:o.content.dim,fontSize:11},children:"The running game has not registered any state providers."})]}),n.jsxs("aside",{"aria-label":"Pinned watches",style:{minWidth:0,overflow:"auto",borderLeft:`1px solid ${o.boundary.default}`},children:[n.jsx("div",{style:{position:"sticky",top:0,zIndex:1,padding:"6px 8px",color:o.content.muted,background:o.surface.panel,borderBottom:`1px solid ${o.boundary.default}`,fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.04em"},children:"Watches"}),p.map(i=>{const u=V(t.state,i);return n.jsxs("div",{style:{...C,display:"grid",gridTemplateColumns:"minmax(130px, 1fr) minmax(100px, 0.7fr) auto",alignItems:"center",gap:8,minHeight:24,padding:"2px 8px",borderBottom:`1px solid ${o.boundary.default}`},children:[n.jsx("span",{title:y(i),style:{color:o.content.primary,overflow:"hidden",textOverflow:"ellipsis"},children:y(i)}),n.jsx("span",{style:{color:u.available?o.content.muted:o.content.dim,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u.available?O(u.value):"unavailable"}),n.jsx(L,{type:"button",size:"compact",onClick:()=>h(i),children:"Remove"})]},x(i))}),p.length===0&&n.jsx("div",{style:{padding:10,color:o.content.dim,fontSize:11},children:"Pin values from the live tree to keep them visible while you inspect the game."})]})]})]}):n.jsx("div",{style:{padding:12,color:o.content.muted,fontSize:11},children:"State Watch is available while a game with debug providers is running."})}const te="workspace.utility",re="State Watch",ne=19,ie=()=>S()!=null;function oe(){return n.jsx(U,{})}export{ie as available,oe as default,ne as order,te as point,re as title};
@@ -1 +1 @@
1
- import{r as T}from"./react-story-board-GaXqr03H.js";import{d as P}from"./bitmap-label-Ct4k6ehY.js";import{b6 as S,b7 as M,am as $,b8 as C,b9 as E,ba as j,bb as I,Q as v,bc as D,bd as R,be as O,au as L,an as U}from"./index-BRJMIUK0.js";import{m as k}from"./StoryPreviewMount-D2lg37et.js";import{s as B}from"./story-presentation-DMSYRWaz.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-nmcBqr7Y.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";async function ae(s,o){await S();const r=U(),c=M().filter(e=>$({modulePath:e.modulePath,regions:r}).medium==="dom"),t=document.createElement("canvas");t.width=s,t.height=o;const l=t.getContext("2d");if(!l)throw new Error("UI Canvas preview could not create a 2D output context.");if(c.length===0)return t.toDataURL("image/png");const m=B(c),d=L()?.config.resolution,u={width:d?.width??640,height:d?.height??400},h=new Map,f=new Map;for(const e of c){const n=m.resolve(e,u),[y]=await x(e.modulePath,[e],{width:n.width,height:n.height,capture:v,cropToContent:n.layout!=="fullscreen",layout:n.layout,transparent:!0});if(!y)throw new Error(`No preview rendered for ${e.id}.`);const g=new Image;g.src=`data:${y.mimeType};base64,${y.base64}`,await g.decode(),h.set(e.id,g),f.set(e.id,{width:g.naturalWidth,height:g.naturalHeight})}const i=T(c,m.index,e=>f.get(e.id)),a=Math.min(s/i.width,o/i.height),p=(s-i.width*a)/2,w=(o-i.height*a)/2;for(const[e,n]of i.layouts)l.drawImage(h.get(e),p+n.x*a,w+n.y*a,n.width*a,n.height*a);return t.toDataURL("image/png")}const A="#ffffff",H="#14171c";async function oe(s,o){const{modulePath:r,width:c,height:t}=o;if(!s)throw new Error(`No project is open, so '${r}' cannot be loaded. Open the project first.`);const l=await C(s),m=l.find(e=>e.modulePath===r);if(!m)throw new Error(`'${r}' is not a story file of this project. `+(l.length===0?"This project has no *.stories.tsx / *.stories.ts under src/.":`This project's story files are: ${l.map(e=>e.modulePath).join(", ")}.`));await E(await j(s));let d;try{d=await m.load()}catch(e){throw new Error(`'${r}' failed to import — ${e instanceof Error?e.message:String(e)}`)}const u=await I(r,d);if(!u.ok)throw new Error(u.error);const h=N(r,u.stories,o.story),f=o.capture??v,i=D("three"),a=o.captureThree??(i?(e,n)=>i(e,{...n,...o.camera===void 0?{}:{camera:o.camera},...o.pose===void 0?{}:{pose:o.pose}}):void 0);if((o.camera||o.pose)&&!a)throw new Error(`'${r}': camera/clip parameters need the three capture leg, which this environment cannot provide (no WebGL).`);const p=await x(r,h,{width:c,height:t,capture:f,...a?{captureThree:a}:{},requireThree:!!(o.camera||o.pose)}),w=await _(p,c,t);return{modulePath:r,width:c,height:t,variants:p,contactSheet:w}}function N(s,o,r){if(r===void 0)return o;const c=o.find(t=>t.name===r);if(!c)throw new Error(`'${s}' exports no story named '${r}'. It exports: ${o.map(t=>t.name).join(", ")}.`);return[c]}async function x(s,o,r){const{width:c,height:t,capture:l,captureThree:m,requireThree:d,cropToContent:u=!0}=r,h=document.createElement("div");h.setAttribute("style",`position:fixed;left:-20000px;top:0;width:${c}px;height:${t}px;overflow:hidden;contain:strict;pointer-events:none;background:${r.transparent?"transparent":A};`),document.body.appendChild(h);const f=[];try{for(const i of o){if(m){const e=await m(i.Component,{width:c,height:t}).catch(n=>(R(n)||console.warn(`[story-capture] three mount for '${i.name}' failed — falling back to the DOM leg:`,n instanceof Error?n.stack??n.message:String(n)),null));if(e===null&&d)throw new Error(`story '${i.name}' did not render on the three leg — --azimuth/--elevation/--distance/--clip/--time apply to three (R3F) stories only, and falling back to the DOM leg would silently ignore them. Narrow to a three story with --story <export>, or drop the camera/clip flags.`);if(e!==null){const n=e.indexOf(",");f.push({name:i.name,label:i.label,base64:n>=0?e.slice(n+1):e,mimeType:"image/png"});continue}}const a=document.createElement("div");a.setAttribute("style",`position:relative;width:${c}px;height:${t}px;overflow:hidden;`),r.layout==="padded"&&(a.style.padding="16px"),r.layout==="centered"&&(a.style.display="flex",a.style.alignItems="center",a.style.justifyContent="center"),a.style.boxSizing="border-box",h.replaceChildren(a);const p=await O(async()=>{const e=await k(a,s,i.name,i.Component);return await W(a),e});await p.settled();const w=p.result;try{const e=await l(h,{canvasFrame:p.frame,cropToContent:u,...r.transparent?{allowTransparent:!0}:{}});f.push({name:i.name,label:i.label,base64:e.base64,mimeType:"image/png"})}finally{w?.unmount(),await new Promise(e=>setTimeout(e,0)),a.remove()}}}finally{h.remove()}return f}async function W(s,o=10){for(let t=0;t<o&&!(s.childNodes.length>0);t++)await new Promise(l=>setTimeout(l,0));if(s.childNodes.length===0)return;const r=200,c=5e3;await new Promise(t=>{let l=null,m=!1;const d=new MutationObserver(()=>{l!==null&&clearTimeout(l),l=setTimeout(h,r)}),u=setTimeout(h,c);function h(){m||(m=!0,d.disconnect(),l!==null&&clearTimeout(l),clearTimeout(u),t())}d.observe(s,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),l=setTimeout(h,r)})}async function _(s,o,r,c={}){const t=Math.min(Math.max(1,s.length),Math.max(1,Math.floor(c.columns??2))),l=Math.max(1,Math.ceil(s.length/t)),m=[];for(const e of s){const n=new Image;n.src=`data:${e.mimeType};base64,${e.base64}`,await n.decode(),m.push(n)}const d=Math.max(1,...m.map(e=>e.naturalWidth),m.length?0:o),u=Math.max(1,...m.map(e=>e.naturalHeight),m.length?0:r),h=d*t,f=u*l,i=document.createElement("canvas");i.width=h,i.height=f;const a=i.getContext("2d");if(!a)throw new Error("Unable to create the story variant sheet.");a.fillStyle=H,a.fillRect(0,0,h,f);for(const[e,n]of s.entries()){const y=e%t*d,g=Math.floor(e/t)*u,b=m[e];a.drawImage(b,y+Math.floor((d-b.naturalWidth)/2),g+Math.floor((u-b.naturalHeight)/2)),c.labels!==!1&&P(a,n.name.toUpperCase(),y,g,d,u)}const p=i.toDataURL("image/png"),w=p.indexOf(",");return{width:h,height:f,base64:w>=0?p.slice(w+1):p,mimeType:"image/png"}}export{ae as captureDomStoryBoardPreview,oe as captureProjectStoryVariants,_ as composeVariantSheet,x as renderStoryVariants};
1
+ import{r as T}from"./react-story-board-CCm2Opwn.js";import{d as P}from"./bitmap-label-Ct4k6ehY.js";import{b8 as S,b9 as M,ao as $,ba as C,bb as E,bc as j,bd as I,U as v,be as D,bf as R,bg as O,aw as U,ap as L}from"./index-C5ZAyrKq.js";import{m as k}from"./StoryPreviewMount-BhvT5QlB.js";import{s as B}from"./story-presentation-CYhVv8Ku.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-nmcBqr7Y.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";async function ae(s,o){await S();const r=L(),c=M().filter(e=>$({modulePath:e.modulePath,regions:r}).medium==="dom"),t=document.createElement("canvas");t.width=s,t.height=o;const l=t.getContext("2d");if(!l)throw new Error("UI Canvas preview could not create a 2D output context.");if(c.length===0)return t.toDataURL("image/png");const m=B(c),d=U()?.config.resolution,u={width:d?.width??640,height:d?.height??400},h=new Map,f=new Map;for(const e of c){const n=m.resolve(e,u),[y]=await x(e.modulePath,[e],{width:n.width,height:n.height,capture:v,cropToContent:n.layout!=="fullscreen",layout:n.layout,transparent:!0});if(!y)throw new Error(`No preview rendered for ${e.id}.`);const g=new Image;g.src=`data:${y.mimeType};base64,${y.base64}`,await g.decode(),h.set(e.id,g),f.set(e.id,{width:g.naturalWidth,height:g.naturalHeight})}const i=T(c,m.index,e=>f.get(e.id)),a=Math.min(s/i.width,o/i.height),p=(s-i.width*a)/2,w=(o-i.height*a)/2;for(const[e,n]of i.layouts)l.drawImage(h.get(e),p+n.x*a,w+n.y*a,n.width*a,n.height*a);return t.toDataURL("image/png")}const A="#ffffff",H="#14171c";async function oe(s,o){const{modulePath:r,width:c,height:t}=o;if(!s)throw new Error(`No project is open, so '${r}' cannot be loaded. Open the project first.`);const l=await C(s),m=l.find(e=>e.modulePath===r);if(!m)throw new Error(`'${r}' is not a story file of this project. `+(l.length===0?"This project has no *.stories.tsx / *.stories.ts under src/.":`This project's story files are: ${l.map(e=>e.modulePath).join(", ")}.`));await E(await j(s));let d;try{d=await m.load()}catch(e){throw new Error(`'${r}' failed to import — ${e instanceof Error?e.message:String(e)}`)}const u=await I(r,d);if(!u.ok)throw new Error(u.error);const h=N(r,u.stories,o.story),f=o.capture??v,i=D("three"),a=o.captureThree??(i?(e,n)=>i(e,{...n,...o.camera===void 0?{}:{camera:o.camera},...o.pose===void 0?{}:{pose:o.pose}}):void 0);if((o.camera||o.pose)&&!a)throw new Error(`'${r}': camera/clip parameters need the three capture leg, which this environment cannot provide (no WebGL).`);const p=await x(r,h,{width:c,height:t,capture:f,...a?{captureThree:a}:{},requireThree:!!(o.camera||o.pose)}),w=await _(p,c,t);return{modulePath:r,width:c,height:t,variants:p,contactSheet:w}}function N(s,o,r){if(r===void 0)return o;const c=o.find(t=>t.name===r);if(!c)throw new Error(`'${s}' exports no story named '${r}'. It exports: ${o.map(t=>t.name).join(", ")}.`);return[c]}async function x(s,o,r){const{width:c,height:t,capture:l,captureThree:m,requireThree:d,cropToContent:u=!0}=r,h=document.createElement("div");h.setAttribute("style",`position:fixed;left:-20000px;top:0;width:${c}px;height:${t}px;overflow:hidden;contain:strict;pointer-events:none;background:${r.transparent?"transparent":A};`),document.body.appendChild(h);const f=[];try{for(const i of o){if(m){const e=await m(i.Component,{width:c,height:t}).catch(n=>(R(n)||console.warn(`[story-capture] three mount for '${i.name}' failed — falling back to the DOM leg:`,n instanceof Error?n.stack??n.message:String(n)),null));if(e===null&&d)throw new Error(`story '${i.name}' did not render on the three leg — --azimuth/--elevation/--distance/--clip/--time apply to three (R3F) stories only, and falling back to the DOM leg would silently ignore them. Narrow to a three story with --story <export>, or drop the camera/clip flags.`);if(e!==null){const n=e.indexOf(",");f.push({name:i.name,label:i.label,base64:n>=0?e.slice(n+1):e,mimeType:"image/png"});continue}}const a=document.createElement("div");a.setAttribute("style",`position:relative;width:${c}px;height:${t}px;overflow:hidden;`),r.layout==="padded"&&(a.style.padding="16px"),r.layout==="centered"&&(a.style.display="flex",a.style.alignItems="center",a.style.justifyContent="center"),a.style.boxSizing="border-box",h.replaceChildren(a);const p=await O(async()=>{const e=await k(a,s,i.name,i.Component);return await W(a),e});await p.settled();const w=p.result;try{const e=await l(h,{canvasFrame:p.frame,cropToContent:u,...r.transparent?{allowTransparent:!0}:{}});f.push({name:i.name,label:i.label,base64:e.base64,mimeType:"image/png"})}finally{w?.unmount(),await new Promise(e=>setTimeout(e,0)),a.remove()}}}finally{h.remove()}return f}async function W(s,o=10){for(let t=0;t<o&&!(s.childNodes.length>0);t++)await new Promise(l=>setTimeout(l,0));if(s.childNodes.length===0)return;const r=200,c=5e3;await new Promise(t=>{let l=null,m=!1;const d=new MutationObserver(()=>{l!==null&&clearTimeout(l),l=setTimeout(h,r)}),u=setTimeout(h,c);function h(){m||(m=!0,d.disconnect(),l!==null&&clearTimeout(l),clearTimeout(u),t())}d.observe(s,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),l=setTimeout(h,r)})}async function _(s,o,r,c={}){const t=Math.min(Math.max(1,s.length),Math.max(1,Math.floor(c.columns??2))),l=Math.max(1,Math.ceil(s.length/t)),m=[];for(const e of s){const n=new Image;n.src=`data:${e.mimeType};base64,${e.base64}`,await n.decode(),m.push(n)}const d=Math.max(1,...m.map(e=>e.naturalWidth),m.length?0:o),u=Math.max(1,...m.map(e=>e.naturalHeight),m.length?0:r),h=d*t,f=u*l,i=document.createElement("canvas");i.width=h,i.height=f;const a=i.getContext("2d");if(!a)throw new Error("Unable to create the story variant sheet.");a.fillStyle=H,a.fillRect(0,0,h,f);for(const[e,n]of s.entries()){const y=e%t*d,g=Math.floor(e/t)*u,b=m[e];a.drawImage(b,y+Math.floor((d-b.naturalWidth)/2),g+Math.floor((u-b.naturalHeight)/2)),c.labels!==!1&&P(a,n.name.toUpperCase(),y,g,d,u)}const p=i.toDataURL("image/png"),w=p.indexOf(",");return{width:h,height:f,base64:w>=0?p.slice(w+1):p,mimeType:"image/png"}}export{ae as captureDomStoryBoardPreview,oe as captureProjectStoryVariants,_ as composeVariantSheet,x as renderStoryVariants};
@@ -0,0 +1,3 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/axe-LkjAB6Lv.js","assets/_commonjsHelpers-D6-XlEtG.js"])))=>i.map(i=>d[i]);
2
+ import{e$ as se,eI as ie,dw as ae,f0 as ce,f1 as le,f2 as K,f3 as H,a7 as U,eK as de,am as L,an as P,af as s,en as u,ep as d,a0 as A,es as ue,aR as ye,aM as V,_ as pe,f4 as fe,ao as me,ap as he,f5 as Q,f6 as ve,f7 as ge,f8 as xe,b8 as J,f9 as X,aw as Se}from"./index-C5ZAyrKq.js";import{a as r}from"./jsx-runtime-DPjLkJKQ.js";import{r as l}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{R as we,f as be}from"./presentation-COhHQdmR.js";import{e as Z,S as q}from"./surface-state-D8Qnowo6.js";import{m as ee,r as je}from"./StoryPreviewMount-BhvT5QlB.js";import{d as te}from"./surface-content-Dg9Kkazf.js";const Re=se,y=new Map;let oe=0;const M=new Set;function m(){oe++;for(const t of M)t()}function E(t){return M.add(t),()=>{M.delete(t)}}function O(){return oe}function Ee(t,e){return`story:${t}#${e}`}function Oe(t,e){return`story-docs:${t}#${e}`}function $(){const t=K();if(!t||t.descriptor.kind!=="story")return null;const e=y.get(t.descriptor.id);return e?.mode==="preview"?{...e,id:t.descriptor.id}:null}function F(t,e,o){const n=y.get(t);if(n){if(o===void 0){const i={...n.argOverrides};delete i[e],n.argOverrides=i}else n.argOverrides={...n.argOverrides,[e]:o};m()}}function Ce(t,e,o){const n=y.get(t);n&&(n.actionLog=[...n.actionLog,{name:e,args:o,time:Date.now()}].slice(-200),m())}function Ne(t){const e=y.get(t);!e||e.actionLog.length===0||(e.actionLog=[],m())}function re(t,e,o,n={}){Ue();const i=Ee(e,o);y.has(i)||(y.set(i,{modulePath:e,storyName:o,mode:"preview",store:t,argOverrides:{},actionLog:[],playResult:null,accessibility:{status:"idle",violations:[]},container:null,previewReady:!1,previewRevision:0,resolution:{label:"Fill",width:null,height:null},scale:1}),m());const a=n.activate===void 0?{}:{activate:n.activate};return X({id:i,title:n.title??o,kind:"story",workspaceRole:"authored-subject",provenance:{sourcePath:e},Content:Pe,Toolbar:$e,closeable:!0,presentation:()=>({kind:"story",modulePath:e,storyName:o,mode:"preview"}),persist:()=>({modulePath:e,storyName:o}),onDispose:p=>{y.delete(p)&&m()}},a)}function Y(t,e,o){const n=Oe(e,o);return y.has(n)||(y.set(n,{modulePath:e,storyName:o,mode:"docs",store:t,argOverrides:{},actionLog:[],playResult:null,accessibility:{status:"idle",violations:[]},container:null,previewReady:!1,previewRevision:0,resolution:{label:"Fill",width:null,height:null},scale:1}),m()),X({id:n,title:`${o} — Docs`,kind:"story",workspaceRole:"workspace-reference",provenance:{sourcePath:e},Content:_e,closeable:!0,presentation:()=>({kind:"story",modulePath:e,storyName:o,mode:"docs"}),persist:()=>({modulePath:e,storyName:o,view:"docs"}),onDispose:i=>{y.delete(i)&&m()}})}function ke(){const t=Se();return t?xe(t).then(J,J):Promise.resolve()}fe({kind:"story",owner:"story-documents",prepare:ke,restore:({state:t,store:e})=>{const o=t,n=typeof o?.modulePath=="string"?o.modulePath:null,i=typeof o?.storyName=="string"?o.storyName:null;if(!n||!i)return!1;const a=P().find(c=>c.modulePath===n);if(!a?.ok||!a.stories.some(c=>c.name===i))return!1;if(o?.view==="docs")return Y(e,n,i),!0;const{medium:p}=me({modulePath:n,regions:he()});return p!=="dom"&&p!=="canvas"?!1:(re(e,n,i),!0)}});Q({id:ve,owner:"story-documents",open:(t,e)=>re(t,e.modulePath,e.storyName,{...e.title===void 0?{}:{title:e.title},...e.activate===void 0?{}:{activate:e.activate}})});Q({id:ge,owner:"story-documents",open:(t,e)=>Y(t,e.modulePath,e.storyName)});function W(t,e){const o=P().find(n=>n.modulePath===t);return o?o.ok?{story:o.stories.find(n=>n.name===e),moduleError:void 0}:{story:void 0,moduleError:o.error}:{story:void 0,moduleError:void 0}}function ne(t){const e=t.Component.args;return e&&typeof e=="object"?e:{}}function De(t,e){const o=y.get(t),n={};for(const[i,a]of Object.entries(ne(e)))typeof a=="function"&&(n[i]=(...p)=>(Ce(t,i,p),a(...p)));return{...n,...o?.argOverrides??{}}}function Pe({documentId:t}){l.useSyncExternalStore(E,O),l.useSyncExternalStore(L,()=>P());const e=y.get(t),o=l.useRef(null),n=l.useRef(null),[i,a]=l.useState(!1),[p,c]=l.useState("unknown"),[g,w]=l.useState(null),[z,T]=l.useState({width:0,height:0}),{story:b,moduleError:x}=e?W(e.modulePath,e.storyName):{story:void 0,moduleError:void 0},h=e?JSON.stringify(e.argOverrides):"";l.useEffect(()=>{const f=o.current;if(!f)return;if(typeof ResizeObserver>"u"){T({width:f.clientWidth,height:f.clientHeight});return}const j=new ResizeObserver(([R])=>{if(!R)return;const{width:_,height:k}=R.contentRect;T(D=>D.width===_&&D.height===k?D:{width:_,height:k})});return j.observe(f),()=>j.disconnect()},[]),l.useEffect(()=>{const f=n.current;if(!f||!e)return;e.container!==f&&(e.container=f,m());const j=e.previewRevision+1;if(e.previewRevision=j,e.previewReady=!1,e.playResult=null,e.accessibility={status:"idle",violations:[]},m(),c("unknown"),w(null),!b){a(!1),c("empty");return}let R=!1,_,k;const D=()=>{R||c(te(f)?"present":"empty")},G=new MutationObserver(D);return G.observe(f,{childList:!0,subtree:!0,characterData:!0}),a(!0),ee(f,e.modulePath,e.storyName,b.Component,De(t,b)).then(S=>{if(R){S?.unmount();return}if(!S){y.get(t)?.previewRevision===j&&(a(!1),c("empty"));return}const B=y.get(t);if(!B||B.previewRevision!==j){S.unmount();return}_=S.unmount,B.previewReady=!0,a(!1),k=setTimeout(D,0),m()},S=>{R||y.get(t)?.previewRevision!==j||(a(!1),w(S instanceof Error?S.message:String(S)),c("empty"))}),()=>{R=!0,G.disconnect(),k!==void 0&&clearTimeout(k),_?.()}},[t,e,b,h]);const C=e?.resolution.width===null,v=!e||C?1:be(z,{width:e.resolution.width,height:e.resolution.height}).scale;if(l.useEffect(()=>{!e||!Number.isFinite(v)||v<=0||e.scale===v||(e.scale=v,m())},[v,e]),!e)return r.jsx("div",{style:{padding:u[6],fontSize:d.md,color:s.content.muted,pointerEvents:"auto"},children:"This story document is no longer available."});const N=`${e.modulePath}#${e.storyName}`,I=b?g?{tone:"error",title:`Story ${N} failed`,description:g}:Z({surface:"Story",rootIds:[N],phase:i?"loading":"ready",content:p}):{tone:"error",title:`Story ${N} is unavailable`,description:x??`No story export named “${e.storyName}” exists in ${e.modulePath}; it may have been renamed or removed.`};return r.jsx("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",pointerEvents:"auto"},children:r.jsx("div",{ref:o,style:{position:"relative",flex:1,minHeight:0,overflow:"auto",display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsxs("div",{style:C?{position:"absolute",inset:0}:{position:"relative",width:e.resolution.width*v,height:e.resolution.height*v,flex:"0 0 auto"},children:[r.jsx("div",{"data-testid":"story-preview-root",ref:n,style:{position:"absolute",inset:0,isolation:"isolate",contain:"layout paint",overflow:"auto",background:s.surface.inset,...C?{}:{width:e.resolution.width,height:e.resolution.height,transform:`scale(${v})`,transformOrigin:"top left"}}}),r.jsx(q,{explanation:I,testId:"story-surface-status"})]})})})}function Te(t){const e=t.parameters.docs;if(!e||typeof e!="object")return{};const o=e.description;if(typeof o=="string")return{story:o};if(!o||typeof o!="object")return{};const n=o;return{...typeof n.component=="string"?{component:n.component}:{},...typeof n.story=="string"?{story:n.story}:{}}}function _e({documentId:t}){l.useSyncExternalStore(E,O),l.useSyncExternalStore(L,()=>P());const e=y.get(t),o=l.useRef(null),[n,i]=l.useState("unknown"),[a,p]=l.useState(null),{story:c,moduleError:g}=e?W(e.modulePath,e.storyName):{story:void 0,moduleError:void 0};if(l.useEffect(()=>{const x=o.current;if(!x||!e||!c)return;let h=!1,C=null,v;i("unknown"),p(null);const N=()=>{h||i(te(x)?"present":"empty")},I=new MutationObserver(N);return I.observe(x,{childList:!0,subtree:!0,characterData:!0}),ee(x,e.modulePath,e.storyName,c.Component).then(f=>{if(!f){h||i("empty");return}h?f.unmount():(C=f.unmount,v=setTimeout(N,0))},f=>{h||(p(f instanceof Error?f.message:String(f)),i("empty"))}),()=>{h=!0,I.disconnect(),v!==void 0&&clearTimeout(v),C?.()}},[e,c]),!e||!c)return r.jsx("div",{style:{padding:u[8],color:s.semantic.danger,fontSize:d.md},children:g??"This Storybook Docs document is no longer available."});const w=Te(c),z=c.args,T=`${e.modulePath}#${e.storyName}`,b=a?{tone:"error",title:`Story ${T} failed`,description:a}:Z({surface:"Story",rootIds:[T],phase:n==="unknown"?"loading":"ready",content:n});return r.jsx("article",{"data-testid":"story-docs-document",className:"volter-content-frost",style:{flex:1,minHeight:0,overflow:"auto",pointerEvents:"auto",padding:"24px clamp(18px, 5vw, 64px)"},children:r.jsxs("div",{style:{maxWidth:920,margin:"0 auto",display:"flex",flexDirection:"column",gap:22},children:[r.jsxs("header",{children:[r.jsx("div",{style:{color:s.content.dim,fontSize:d.base,marginBottom:5},children:c.title??e.modulePath}),r.jsx("h1",{style:{color:s.content.primary,fontSize:d.heading,margin:0},children:c.label}),(w.story??w.component)&&r.jsx("p",{style:{color:s.content.primary,lineHeight:1.6,maxWidth:760,whiteSpace:"pre-wrap"},children:w.story??w.component})]}),r.jsxs("section",{children:[r.jsx("h2",{style:{color:s.content.primary,fontSize:d.xl},children:"Canvas"}),r.jsxs("div",{style:{position:"relative",minHeight:180},children:[r.jsx("div",{ref:o,"data-testid":"story-docs-canvas",style:{position:"relative",isolation:"isolate",contain:"layout paint",minHeight:180,padding:18,overflow:"auto",background:s.surface.inset,border:`1px solid ${s.boundary.default}`,borderRadius:s.shape.medium}}),r.jsx(q,{explanation:b,testId:"story-docs-surface-status"})]})]}),r.jsxs("section",{children:[r.jsx("h2",{style:{color:s.content.primary,fontSize:d.xl},children:"Args"}),r.jsxs("div",{style:{border:`1px solid ${s.boundary.default}`,borderRadius:s.shape.medium,overflow:"hidden"},children:[Object.entries(z).map(([x,h])=>r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"minmax(120px, .4fr) minmax(140px, .6fr) 1fr",gap:u[6],padding:`${u[4]} ${u[5]}`,borderBottom:`1px solid ${s.boundary.default}`,fontSize:d.base},children:[r.jsx("code",{style:{color:s.accent.default},children:x}),r.jsx("span",{style:{color:s.content.muted},children:Array.isArray(h)?"array":typeof h}),r.jsx("code",{style:{color:s.content.primary,overflow:"hidden",textOverflow:"ellipsis"},children:typeof h=="function"?"function":JSON.stringify(h)})]},x)),Object.keys(z).length===0&&r.jsx("div",{style:{padding:u[5],color:s.content.dim,fontSize:d.base},children:"This story declares no args."})]})]}),r.jsxs("footer",{style:{color:s.content.dim,fontSize:d.sm},children:[e.modulePath," · ",e.storyName]})]})})}function $e({documentId:t}){l.useSyncExternalStore(E,O),l.useSyncExternalStore(L,()=>P());const e=y.get(t);if(!e)return null;const{story:o}=W(e.modulePath,e.storyName),n=typeof o?.Component.play=="function",i=e.playResult;return r.jsxs("div",{"data-testid":"story-document-toolbar",style:{display:"flex",alignItems:"center",gap:u[4],padding:"3px 10px",fontSize:d.sm,color:s.content.muted,borderBottom:`1px solid ${s.boundary.default}`},children:[r.jsxs("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:[e.modulePath," —"," ",r.jsx("code",{style:{color:s.accent.default},children:e.storyName})]}),r.jsx(we,{resolution:e.resolution,scale:e.scale,onResolutionChange:a=>{e.resolution=a,m()}}),r.jsx(A,{size:"compact","data-testid":"story-open-docs",onClick:()=>Y(e.store,e.modulePath,e.storyName),style:{flexShrink:0},children:"Docs"}),n&&o&&r.jsx(A,{variant:"outline",size:"compact","data-testid":"story-run-play",onClick:async()=>{if(!e.container||!e.previewReady)return;const a=e.previewRevision,p=await je(e.modulePath,e.storyName,o.Component,e.container),c=y.get(t);c?.previewReady&&c.previewRevision===a&&(c.playResult=p,m())},disabled:!e.previewReady,style:{flexShrink:0},children:"Run play()"}),i?.ran&&!i.error&&r.jsx("span",{"data-testid":"story-play-result",style:{color:s.semantic.success,fontWeight:600},children:"play() ran"}),i?.error&&r.jsx("span",{"data-testid":"story-play-result",style:{color:s.semantic.danger},children:i.error})]})}function ze({id:t,name:e,value:o}){return r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:u[3],padding:"3px 0"},children:[r.jsx("span",{style:{width:90,flexShrink:0,fontSize:d.base,color:s.content.muted,overflow:"hidden",textOverflow:"ellipsis"},title:e,children:e}),typeof o=="boolean"?r.jsx(ye,{className:"volter-checkbox","data-testid":`story-arg-${e}`,checked:o,onChange:n=>F(t,e,n.target.checked)}):typeof o=="number"?r.jsx(V,{type:"number",className:"volter-input","data-testid":`story-arg-${e}`,value:o,onChange:n=>{const i=n.target.value,a=Number.parseFloat(i);F(t,e,i===""||Number.isNaN(a)?void 0:a)},style:{width:80}}):typeof o=="string"?r.jsx(V,{type:"text",className:"volter-input","data-testid":`story-arg-${e}`,value:o,onChange:n=>F(t,e,n.target.value),style:{flex:1,minWidth:0}}):r.jsx("span",{style:{fontSize:d.base,color:s.content.dim},"data-testid":`story-arg-${e}`,children:typeof o=="function"?"fn (logged to Actions)":JSON.stringify(o)})]})}function Ie(){l.useSyncExternalStore(E,O),l.useSyncExternalStore(L,()=>P());const t=$();if(!t)return null;const{story:e}=W(t.modulePath,t.storyName),o=e?{...ne(e),...t.argOverrides}:{},n=Object.keys(o);return r.jsxs("div",{"data-testid":"inspector-story-args",style:{pointerEvents:"auto",padding:u[4],borderBottom:`1px solid ${s.boundary.default}`},children:[r.jsx("div",{style:{fontSize:d.base,color:s.content.dim,textTransform:"uppercase",marginBottom:u[2]},children:"Story Args"}),r.jsx("div",{style:{fontSize:d.base,color:s.content.primary,fontWeight:600,marginBottom:u[2]},children:t.storyName}),n.length===0&&r.jsx("div",{style:{fontSize:d.base,color:s.content.dim},children:e?"This story declares no args.":"Story source unavailable."}),n.map(i=>r.jsx(ze,{id:t.id,name:i,value:o[i]},i))]})}function Ae(){l.useSyncExternalStore(E,O);const t=$();return t?r.jsxs("div",{"data-testid":"story-actions-utility",style:{flex:1,minHeight:0,overflowY:"auto",padding:u[4],fontSize:d.base},children:[r.jsx(A,{size:"compact",style:{marginBottom:u[3]},onClick:()=>Ne(t.id),children:"Clear"}),t.actionLog.length===0?r.jsx("div",{style:{color:s.content.dim},children:"No actions logged — function-valued args are wrapped with logging spies; interact with the story preview to see calls here."}):t.actionLog.map((e,o)=>r.jsxs("div",{style:{padding:`${u[1]} 0`,borderBottom:`1px solid ${s.boundary.default}`},children:[r.jsx("code",{style:{color:s.accent.default},children:e.name})," ",r.jsxs("span",{style:{color:s.content.muted},children:["(",e.args.map(n=>{try{return typeof n=="object"?JSON.stringify(n)?.slice(0,80):String(n)}catch{return String(n)}}).join(", "),")"]})]},o))]}):r.jsx("div",{style:{padding:u[6],fontSize:d.md,color:s.content.dim},children:"No active story."})}function Le(){l.useSyncExternalStore(E,O);const t=$();if(!t)return r.jsx("div",{style:{padding:u[6],fontSize:d.md,color:s.content.dim},children:"No active story."});const e=t.playResult;return r.jsxs("div",{"data-testid":"story-interactions-utility",style:{flex:1,minHeight:0,overflowY:"auto",padding:u[6],fontSize:d.md},children:[!e&&r.jsx("div",{style:{color:s.content.dim},children:"No interaction run yet — use the story document's “Run play()”."}),e&&!e.ran&&r.jsx("div",{style:{color:s.content.dim},children:"This story declares no play() function."}),e?.ran&&!e.error&&r.jsx("div",{style:{color:s.semantic.success,fontWeight:600},children:"play() ran without errors."}),e?.error&&r.jsx("div",{style:{color:s.semantic.danger,whiteSpace:"pre-wrap"},children:e.error})]})}async function We(t){const e=y.get(t);if(!e?.container||!e.previewReady)return;const o=e.container,n=e.previewRevision;e.accessibility={status:"running",violations:[]},m();try{const a=await(await pe(async()=>{const{default:c}=await import("./axe-LkjAB6Lv.js").then(g=>g.a);return{default:c}},__vite__mapDeps([0,1]))).default.run(o),p=y.get(t);if(!p?.previewReady||p.previewRevision!==n||p.container!==o)return;p.accessibility={status:"complete",violations:a.violations.map(c=>({id:c.id,impact:c.impact??null,help:c.help,helpUrl:c.helpUrl,nodes:c.nodes.map(g=>({html:g.html,target:g.target.map(String)}))}))},m()}catch(i){const a=y.get(t);if(!a?.previewReady||a.previewRevision!==n||a.container!==o)return;a.accessibility={status:"error",violations:[],error:i instanceof Error?i.message:String(i)},m()}}function Be(){l.useSyncExternalStore(E,O);const t=$();if(!t)return r.jsx("div",{style:{padding:u[6],fontSize:d.md,color:s.content.dim},children:"No active story."});const e=t.accessibility;return r.jsxs("div",{"data-testid":"story-accessibility-utility",style:{flex:1,minHeight:0,overflowY:"auto",padding:u[5],fontSize:d.base},children:[r.jsx(A,{variant:"outline",size:"compact",disabled:!t.container||!t.previewReady||e.status==="running",onClick:()=>void We(t.id),style:{marginBottom:u[4]},children:e.status==="running"?"Checking…":"Run accessibility check"}),e.status==="idle"&&r.jsx("div",{style:{color:s.content.dim},children:"Run axe against the mounted story preview."}),e.status==="error"&&r.jsx("div",{style:{color:s.semantic.danger},children:e.error}),e.status==="complete"&&e.violations.length===0&&r.jsx("div",{style:{color:s.semantic.success,fontWeight:600},children:"No accessibility violations found."}),e.violations.map(o=>r.jsxs("details",{style:{borderBottom:`1px solid ${s.boundary.default}`,padding:`${u[3]} 0`},children:[r.jsxs("summary",{style:{color:o.impact==="critical"||o.impact==="serious"?s.semantic.danger:s.content.primary,cursor:"pointer"},children:[o.help," · ",o.nodes.length," node",o.nodes.length===1?"":"s"]}),r.jsx("a",{href:o.helpUrl,target:"_blank",rel:"noreferrer",style:{color:s.accent.default,display:"inline-block",margin:"5px 0"},children:"How to fix"}),o.nodes.map((n,i)=>r.jsxs("pre",{style:{color:s.content.muted,fontFamily:ue,fontSize:d.sm,whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:[n.target.join(" "),`
3
+ `,n.html]},`${o.id}:${i}`))]},o.id))]})}const He=de();function Ue(){He.ensure(t=>{t(ie({match:()=>K()?.descriptor.kind==="story",id:le,title:ce,icon:Re,order:ae,Section:Ie}));const e=()=>$()!==null;t(H({...U.storyActions,Content:Ae,available:e})),t(H({...U.storyInteractions,Content:Le,available:e})),t(H({...U.storyAccessibility,Content:Be,available:e}))})}export{Re as S,Ue as e,ke as p,Ee as s};
@@ -1 +1 @@
1
- import{e as r}from"./story-documents-BTo90DiA.js";import"./index-BRJMIUK0.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./presentation-BeNFBfKg.js";import"./surface-state-1lTOi8FD.js";import"./StoryPreviewMount-D2lg37et.js";import"./surface-content-Dg9Kkazf.js";const g="workspace.service";function k(){return r(),()=>{}}export{g as point,k as start};
1
+ import{e as r}from"./story-documents-BvG2xeaR.js";import"./index-C5ZAyrKq.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./presentation-COhHQdmR.js";import"./surface-state-D8Qnowo6.js";import"./StoryPreviewMount-BhvT5QlB.js";import"./surface-content-Dg9Kkazf.js";const g="workspace.service";function k(){return r(),()=>{}}export{g as point,k as start};
@@ -1 +1 @@
1
- import{a as i}from"./jsx-runtime-DPjLkJKQ.js";import{O as M}from"./Object3DDocumentViewport-DCwiSY3O.js";import{S,e as W}from"./surface-state-1lTOi8FD.js";import{S as G}from"./standard-viewport-dressing-BCA51Tum.js";import{eR as z,dH as B,f9 as V,fa as Y,eT as F,ak as _,al as x,ad as p,aP as J,aK as w,fb as K,fe as U,ft as L,fd as X,fu as Q,fi as Z,am as q,an as ee,dk as te}from"./index-BRJMIUK0.js";import{m as re}from"./mounted-story-viewport-source-B4-eAYGI.js";import{s as oe}from"./story-arg-descriptors-Ek86ExX7.js";import{mountStoryObject3D as se,disposeStoryObject3D as N}from"./story-three-preview-R1JvrggS.js";import{m as ie}from"./three-story-model-C2r2BuiA.js";import{S as ne,p as ae,s as le}from"./story-documents-BTo90DiA.js";import{r as l}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{R3fSourceAuthoringAdapter as ce}from"./r3f-source-authoring-adapter-DbbeRcvt.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./viewport-surface-status-cwCiBGa7.js";import"./content-bounds-BeuIXKYu.js";import"./hierarchy-marks-Cc_3lxw6.js";import"./workspace-arrangement-BdAlBwvd.js";import"./three.core-3arARmh6.js";import"./editor-layers-BDJnAAzj.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./environment-Dg-YaLsA.js";import"./three.module-BLhyNg0e.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./user-data-Bpj7diUS.js";import"./asset-preview-B1tDziF1.js";import"./renderer-ownership-BovSEcLv.js";import"./studio-environment-DRxxq_QX.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./bitmap-label-Ct4k6ehY.js";import"./crash-null-boundary-v3a0uEgw.js";import"./events-156d8d12.esm-CYeuVCYr.js";import"./index-bQE2NA0D.js";import"./story-mount-turn-DFRTj5hi.js";import"./presentation-BeNFBfKg.js";import"./StoryPreviewMount-D2lg37et.js";import"./surface-content-Dg9Kkazf.js";import"./component-instance-root-B0C5oNEm.js";import"./live-gesture-lock-DJbrjOqf.js";import"./relative-import-specifier-BFKIWEWs.js";import"./three-projection-core-CG01r5Ta.js";import"./three-TCuY32m_.js";import"./entity-object-JmYMfLsx.js";import"./three-contract-Dkt6PmWY.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./inference-diagnostics-xecGdohW.js";import"./instance-fork-actions-D3sRzS3K.js";import"./oid-transform-D5Kxt6ij.js";import"./writer-tw6EcuVO.js";import"./r3f-physics-binding-DzrbpqjM.js";import"./object3d-authoring-subject-BDrxd1GA.js";import"./user-data-dHvLdpwM.js";import"./object-marks-DwvIEBOK.js";const de="threeStory.arg.",f=new Map;let j=0;const v=new Set;function b(){j++;for(const e of v)e()}function k(e){return v.add(e),()=>{v.delete(e)}}function C(){return j}function ue(e,t){return`three-story:${e}#${t}`}function I(){const e=K();if(!e)return null;const t=f.get(e.descriptor.id);return t?{...t,id:e.descriptor.id}:null}function g(e,t,r){const s=f.get(e);if(s){if(r===void 0){const o={...s.argOverrides};delete o[t],s.argOverrides=o}else s.argOverrides={...s.argOverrides,[t]:r};b()}}function P(e,t,r=t,s={}){A(),Q(le(e,t));const o=ue(e,t);return f.has(o)||(f.set(o,{modulePath:e,storyName:t,argOverrides:{}}),b()),Z({id:o,title:r,kind:"world",workspaceRole:"authored-subject",provenance:{sourcePath:e},Content:pe,closeable:!0,presentation:()=>({kind:"story",modulePath:e,storyName:t,mode:"preview"}),persist:({title:n})=>({modulePath:e,storyName:t,title:n}),onDispose:n=>{f.delete(n)&&b()}},{activate:s.activate!==!1})}function me(e,t,r){const{story:s}=T(e,t);return!s||q({modulePath:e,regions:ee()}).medium!=="three"?!1:(P(e,t,r??s.label),!0)}U({id:L,owner:"three-story-documents",open:(e,t)=>P(t.modulePath,t.storyName,t.title??t.storyName,t.activate===void 0?{}:{activate:t.activate})});X({kind:"world",owner:"three-story-documents",prepare:ae,restore:({state:e})=>{const t=e,r=typeof t?.modulePath=="string"?t.modulePath:null,s=typeof t?.storyName=="string"?t.storyName:null;if(!r||!s)return!1;const o=typeof t?.title=="string"?t.title:void 0;return me(r,s,o)}});function T(e,t){const r=x().find(s=>s.modulePath===e);return r?r.ok?{story:r.stories.find(s=>s.name===t),moduleError:void 0}:{story:void 0,moduleError:r.error}:{story:void 0,moduleError:void 0}}function pe({documentId:e,active:t}){l.useSyncExternalStore(k,C),l.useSyncExternalStore(_,x);const r=f.get(e),[s,o]=l.useState(null),[n,u]=l.useState(null),d=l.useRef(new Set);l.useEffect(()=>{if(s)for(const a of d.current){if(a===s)break;a.dispose(),d.current.delete(a)}},[s]),l.useEffect(()=>()=>{for(const a of d.current)a.dispose();d.current.clear()},[]);const[E,$]=l.useState(t),h=r?.modulePath,O=l.useMemo(()=>h?({store:a,scene:c,hierarchyRoots:y})=>{const D=new ce(a,c,{worldId:e,entryPath:h,writeBackend:te("The Asset Editor"),hierarchyMode:"definition",...y?{hierarchyRoots:y}:{}});return{adapter:D,dispose:()=>D.dispose()}}:void 0,[e,h]);l.useEffect(()=>{t&&$(!0)},[t]);const{story:m,moduleError:R}=r?T(r.modulePath,r.storyName):{story:void 0,moduleError:void 0},H=r?JSON.stringify(r.argOverrides):"";if(l.useEffect(()=>{if(!E||!m||!r)return;let a=!1;return u(null),se(m.Component,{...r.argOverrides}).then(c=>{if(a){N(c);return}if(!ie(c.root)){N(c),u("The story mounted with no three content — its first R3F commit rendered an empty subtree. A <Suspense> boundary around three content is the usual cause: the boundary commits its fallback first, so the real children arrive on a later commit this document never sees.");return}const y=re(c);d.current.add(y),o(y)}).catch(c=>{a||u(c instanceof Error?c.message:String(c))}),()=>{a=!0}},[E,m,r,H]),!r)return i.jsx("div",{style:{padding:12,fontSize:12,color:p.content.muted},children:"This story document is no longer available."});if((!m||n)&&!s){const a=`${r.modulePath}#${r.storyName}`;return i.jsx("div",{"data-testid":"three-story-document-error",style:{position:"relative",flex:1,minHeight:0},children:i.jsx(S,{testId:"three-story-surface-status",explanation:{tone:"error",title:`Story ${a} failed`,description:n??R??"It may have been renamed or removed; close this document."}})})}return s?i.jsxs("div",{style:{position:"relative",display:"flex",flex:1,minHeight:0},children:[i.jsx(M,{documentId:e,sourcePath:r.modulePath,build:s.build,displayName:m?.label??r.storyName,active:t,assetType:"component",...O?{sourceAuthoring:O}:{},cameraDirection:G}),(!m||n)&&i.jsx(S,{testId:"three-story-surface-status",explanation:{tone:"error",title:"Source update failed",description:n??R??"This story is unavailable. The last working view is retained."}})]}):i.jsx("div",{"data-testid":"three-story-document-loading",style:{position:"relative",flex:1,minHeight:0},children:i.jsx(S,{testId:"three-story-surface-status",explanation:W({surface:"Story",rootIds:[`${r.modulePath}#${r.storyName}`],phase:"loading",content:"unknown"})})})}function fe(){l.useSyncExternalStore(k,C),l.useSyncExternalStore(_,x);const e=I();if(!e)return null;const{story:t}=T(e.modulePath,e.storyName),r=t?{...t.args,...e.argOverrides}:{},s=oe(r,de);return i.jsxs("div",{"data-testid":"inspector-story-args-three",style:{pointerEvents:"auto",padding:8,borderBottom:`1px solid ${p.boundary.default}`},children:[i.jsx("div",{style:{fontSize:11,color:p.content.primary,fontWeight:600,marginBottom:4},children:e.storyName}),s.length===0&&i.jsx("div",{style:{fontSize:11,color:p.content.dim},children:t?"This story declares no editable args.":"Story source unavailable."}),s.map(o=>i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"3px 0"},children:[i.jsx("span",{title:o.label,style:{width:90,flexShrink:0,fontSize:11,color:p.content.muted,overflow:"hidden",textOverflow:"ellipsis"},children:o.label}),o.type==="boolean"?i.jsx(J,{className:"vgai-checkbox","data-testid":`three-story-arg-${o.label}`,checked:r[o.label]===!0,onChange:n=>g(e.id,o.label,n.target.checked)}):o.type==="number"?i.jsx(w,{type:"number",className:"vgai-input","data-testid":`three-story-arg-${o.label}`,value:r[o.label],onChange:n=>{const u=n.target.value,d=Number.parseFloat(u);g(e.id,o.label,u===""||Number.isNaN(d)?void 0:d)},style:{width:80}}):o.type==="string"?i.jsx(w,{type:"text",className:"vgai-input","data-testid":`three-story-arg-${o.label}`,value:r[o.label],onChange:n=>g(e.id,o.label,n.target.value),style:{flex:1,minWidth:0}}):i.jsx("span",{"data-testid":`three-story-arg-${o.label}`,style:{fontSize:11,color:p.content.dim},children:JSON.stringify(r[o.label])})]},o.path))]})}const ye=F();function A(){ye.ensure(e=>{e(z({match:()=>I()!==null,id:Y,title:V,icon:ne,order:B,Section:fe}))})}const Tt="workspace.service";function Et(){return A(),()=>{}}export{Tt as point,Et as start};
1
+ import{a as i}from"./jsx-runtime-DPjLkJKQ.js";import{O as H}from"./Object3DDocumentViewport-D6QoHfa_.js";import{S,e as W}from"./surface-state-D8Qnowo6.js";import{S as G}from"./standard-viewport-dressing-BW-dM_1h.js";import{eI as z,dw as B,f0 as V,f1 as Y,eK as F,am as _,an as x,af as p,aR as J,aM as D,f2 as K,f5 as U,fk as L,f4 as X,fl as Q,f9 as Z,ao as q,ap as ee,d6 as te}from"./index-C5ZAyrKq.js";import{m as re}from"./mounted-story-viewport-source-DfnLxI1f.js";import{s as oe}from"./story-arg-descriptors-Ek86ExX7.js";import{mountStoryObject3D as se,disposeStoryObject3D as N}from"./story-three-preview-CgcLF5lE.js";import{m as ie}from"./three-story-model-BjKr7OMn.js";import{S as ne,p as ae,s as le}from"./story-documents-BvG2xeaR.js";import{r as l}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{R3fSourceAuthoringAdapter as ce}from"./r3f-source-authoring-adapter-jH3G0TeH.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./viewport-surface-status-TUfhXKR9.js";import"./content-bounds-DROIchTa.js";import"./hierarchy-marks-BuCO8Ke-.js";import"./workspace-arrangement-DqG5sUns.js";import"./three.core-3arARmh6.js";import"./editor-layers-D-CTUqco.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./environment-Dg-YaLsA.js";import"./three.module-BLhyNg0e.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./user-data-C84W0V47.js";import"./asset-preview-DxlSdRZn.js";import"./renderer-ownership-BovSEcLv.js";import"./studio-environment-R9qXUUcC.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./bitmap-label-Ct4k6ehY.js";import"./crash-null-boundary-v3a0uEgw.js";import"./events-156d8d12.esm-CYeuVCYr.js";import"./index-bQE2NA0D.js";import"./story-mount-turn-DFRTj5hi.js";import"./presentation-COhHQdmR.js";import"./StoryPreviewMount-BhvT5QlB.js";import"./surface-content-Dg9Kkazf.js";import"./component-instance-root-DLI40MiB.js";import"./live-gesture-lock-DJbrjOqf.js";import"./relative-import-specifier-CPFTrxi4.js";import"./three-projection-core-B7Lf8tOp.js";import"./three-DiL6vMXq.js";import"./entity-object-MKYemTFM.js";import"./three-contract-Dkt6PmWY.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./inference-diagnostics-DLt9ql9I.js";import"./instance-fork-actions-D3sRzS3K.js";import"./oid-transform-DaA6yW6o.js";import"./writer-tw6EcuVO.js";import"./r3f-physics-binding-Cx8yhuwt.js";import"./object3d-authoring-subject-XccsO0xG.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";const de="threeStory.arg.",f=new Map;let j=0;const v=new Set;function b(){j++;for(const e of v)e()}function I(e){return v.add(e),()=>{v.delete(e)}}function k(){return j}function ue(e,t){return`three-story:${e}#${t}`}function C(){const e=K();if(!e)return null;const t=f.get(e.descriptor.id);return t?{...t,id:e.descriptor.id}:null}function g(e,t,r){const s=f.get(e);if(s){if(r===void 0){const o={...s.argOverrides};delete o[t],s.argOverrides=o}else s.argOverrides={...s.argOverrides,[t]:r};b()}}function A(e,t,r=t,s={}){P(),Q(le(e,t));const o=ue(e,t);return f.has(o)||(f.set(o,{modulePath:e,storyName:t,argOverrides:{}}),b()),Z({id:o,title:r,kind:"world",workspaceRole:"authored-subject",provenance:{sourcePath:e},Content:pe,closeable:!0,presentation:()=>({kind:"story",modulePath:e,storyName:t,mode:"preview"}),persist:({title:n})=>({modulePath:e,storyName:t,title:n}),onDispose:n=>{f.delete(n)&&b()}},{activate:s.activate!==!1})}function me(e,t,r){const{story:s}=E(e,t);return!s||q({modulePath:e,regions:ee()}).medium!=="three"?!1:(A(e,t,r??s.label),!0)}U({id:L,owner:"three-story-documents",open:(e,t)=>A(t.modulePath,t.storyName,t.title??t.storyName,t.activate===void 0?{}:{activate:t.activate})});X({kind:"world",owner:"three-story-documents",prepare:ae,restore:({state:e})=>{const t=e,r=typeof t?.modulePath=="string"?t.modulePath:null,s=typeof t?.storyName=="string"?t.storyName:null;if(!r||!s)return!1;const o=typeof t?.title=="string"?t.title:void 0;return me(r,s,o)}});function E(e,t){const r=x().find(s=>s.modulePath===e);return r?r.ok?{story:r.stories.find(s=>s.name===t),moduleError:void 0}:{story:void 0,moduleError:r.error}:{story:void 0,moduleError:void 0}}function pe({documentId:e,active:t}){l.useSyncExternalStore(I,k),l.useSyncExternalStore(_,x);const r=f.get(e),[s,o]=l.useState(null),[n,u]=l.useState(null),d=l.useRef(new Set);l.useEffect(()=>{if(s)for(const a of d.current){if(a===s)break;a.dispose(),d.current.delete(a)}},[s]),l.useEffect(()=>()=>{for(const a of d.current)a.dispose();d.current.clear()},[]);const[T,$]=l.useState(t),h=r?.modulePath,O=l.useMemo(()=>h?({store:a,scene:c,hierarchyRoots:y})=>{const w=new ce(a,c,{worldId:e,entryPath:h,writeBackend:te("The Asset Editor"),hierarchyMode:"definition",...y?{hierarchyRoots:y}:{}});return{adapter:w,dispose:()=>w.dispose()}}:void 0,[e,h]);l.useEffect(()=>{t&&$(!0)},[t]);const{story:m,moduleError:R}=r?E(r.modulePath,r.storyName):{story:void 0,moduleError:void 0},M=r?JSON.stringify(r.argOverrides):"";if(l.useEffect(()=>{if(!T||!m||!r)return;let a=!1;return u(null),se(m.Component,{...r.argOverrides}).then(c=>{if(a){N(c);return}if(!ie(c.root)){N(c),u("The story mounted with no three content — its first R3F commit rendered an empty subtree. A <Suspense> boundary around three content is the usual cause: the boundary commits its fallback first, so the real children arrive on a later commit this document never sees.");return}const y=re(c);d.current.add(y),o(y)}).catch(c=>{a||u(c instanceof Error?c.message:String(c))}),()=>{a=!0}},[T,m,r,M]),!r)return i.jsx("div",{style:{padding:12,fontSize:12,color:p.content.muted},children:"This story document is no longer available."});if((!m||n)&&!s){const a=`${r.modulePath}#${r.storyName}`;return i.jsx("div",{"data-testid":"three-story-document-error",style:{position:"relative",flex:1,minHeight:0},children:i.jsx(S,{testId:"three-story-surface-status",explanation:{tone:"error",title:`Story ${a} failed`,description:n??R??"It may have been renamed or removed; close this document."}})})}return s?i.jsxs("div",{style:{position:"relative",display:"flex",flex:1,minHeight:0},children:[i.jsx(H,{documentId:e,sourcePath:r.modulePath,build:s.build,displayName:m?.label??r.storyName,active:t,assetType:"component",...O?{sourceAuthoring:O}:{},cameraDirection:G}),(!m||n)&&i.jsx(S,{testId:"three-story-surface-status",explanation:{tone:"error",title:"Source update failed",description:n??R??"This story is unavailable. The last working view is retained."}})]}):i.jsx("div",{"data-testid":"three-story-document-loading",style:{position:"relative",flex:1,minHeight:0},children:i.jsx(S,{testId:"three-story-surface-status",explanation:W({surface:"Story",rootIds:[`${r.modulePath}#${r.storyName}`],phase:"loading",content:"unknown"})})})}function fe(){l.useSyncExternalStore(I,k),l.useSyncExternalStore(_,x);const e=C();if(!e)return null;const{story:t}=E(e.modulePath,e.storyName),r=t?{...t.args,...e.argOverrides}:{},s=oe(r,de);return i.jsxs("div",{"data-testid":"inspector-story-args-three",style:{pointerEvents:"auto",padding:8,borderBottom:`1px solid ${p.boundary.default}`},children:[i.jsx("div",{style:{fontSize:11,color:p.content.primary,fontWeight:600,marginBottom:4},children:e.storyName}),s.length===0&&i.jsx("div",{style:{fontSize:11,color:p.content.dim},children:t?"This story declares no editable args.":"Story source unavailable."}),s.map(o=>i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"3px 0"},children:[i.jsx("span",{title:o.label,style:{width:90,flexShrink:0,fontSize:11,color:p.content.muted,overflow:"hidden",textOverflow:"ellipsis"},children:o.label}),o.type==="boolean"?i.jsx(J,{className:"volter-checkbox","data-testid":`three-story-arg-${o.label}`,checked:r[o.label]===!0,onChange:n=>g(e.id,o.label,n.target.checked)}):o.type==="number"?i.jsx(D,{type:"number",className:"volter-input","data-testid":`three-story-arg-${o.label}`,value:r[o.label],onChange:n=>{const u=n.target.value,d=Number.parseFloat(u);g(e.id,o.label,u===""||Number.isNaN(d)?void 0:d)},style:{width:80}}):o.type==="string"?i.jsx(D,{type:"text",className:"volter-input","data-testid":`three-story-arg-${o.label}`,value:r[o.label],onChange:n=>g(e.id,o.label,n.target.value),style:{flex:1,minWidth:0}}):i.jsx("span",{"data-testid":`three-story-arg-${o.label}`,style:{fontSize:11,color:p.content.dim},children:JSON.stringify(r[o.label])})]},o.path))]})}const ye=F();function P(){ye.ensure(e=>{e(z({match:()=>C()!==null,id:Y,title:V,icon:ne,order:B,Section:fe}))})}const Et="workspace.service";function Tt(){return P(),()=>{}}export{Et as point,Tt as start};
@@ -1 +1 @@
1
- import{ak as p,al as S,am as b,an as y,ao as v}from"./index-BRJMIUK0.js";const f={three:!1,canvas:!1,dom:!1};let r=f,a=0;const n=new Set;let i=!1;function j(){return l(),r}function k(e){return l(),n.add(e),()=>{n.delete(e)}}function l(){i||(i=!0,p(()=>{d()}),d())}function u(e){if(!(e.three===r.three&&e.canvas===r.canvas&&e.dom===r.dom)){r=e;for(const t of n)t()}}function M(e){const t=b({modulePath:e.modulePath,regions:y()});if(t.medium)return t.medium;e.modulePath&&v(e.modulePath,t.reason)}async function d(){const e=++a,t=S().flatMap(s=>s.ok?s.stories.map(o=>({...o,modulePath:s.modulePath})):[]);if(t.length===0)return u(f),r;const c={three:!1,canvas:!1,dom:!1};for(const s of t){const o=M(s);if(o&&(c[o]=!0),e!==a)return r}const{three:m,canvas:h,dom:P}=c;return e!==a||u({three:m,canvas:h,dom:P}),r}export{j as g,k as s};
1
+ import{am as p,an as S,ao as b,ap as y,aq as v}from"./index-C5ZAyrKq.js";const f={three:!1,canvas:!1,dom:!1};let r=f,a=0;const n=new Set;let i=!1;function j(){return l(),r}function N(e){return l(),n.add(e),()=>{n.delete(e)}}function l(){i||(i=!0,p(()=>{d()}),d())}function u(e){if(!(e.three===r.three&&e.canvas===r.canvas&&e.dom===r.dom)){r=e;for(const t of n)t()}}function M(e){const t=b({modulePath:e.modulePath,regions:y()});if(t.medium)return t.medium;e.modulePath&&v(e.modulePath,t.reason)}async function d(){const e=++a,t=S().flatMap(s=>s.ok?s.stories.map(o=>({...o,modulePath:s.modulePath})):[]);if(t.length===0)return u(f),r;const c={three:!1,canvas:!1,dom:!1};for(const s of t){const o=M(s);if(o&&(c[o]=!0),e!==a)return r}const{three:m,canvas:h,dom:P}=c;return e!==a||u({three:m,canvas:h,dom:P}),r}export{j as g,N as s};
@@ -1 +1 @@
1
- import{r as v}from"./index-nmcBqr7Y.js";import{withApplicationCollector as E}from"./canvas-preview-frames-C0QTagA3.js";import{C as M}from"./crash-null-boundary-v3a0uEgw.js";import{m as b}from"./pixi-story-model-DNkfnWUV.js";import{as as P}from"./index-BRJMIUK0.js";import{r as S}from"./story-mount-turn-DFRTj5hi.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-SS9EugVg.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const w=1e4,k=12,I="position:fixed;left:-20000px;top:0;width:512px;height:512px;overflow:hidden;contain:strict;pointer-events:none;visibility:hidden;";function C(t){return S(()=>t(D))}function R(t,c={}){return C(n=>n(t,c))}function _(t){return S(async()=>t.dispose())}async function G(t,c={}){const n=await R(t,c.props??{});try{const o=c.width??128,r=c.height??96;n.app.renderer.render({container:n.stage});const a=n.stage.getBounds(),s=c.layout==="fullscreen",d=8,e=n.app.screen.clone();s||(e.x=a.x-d,e.y=a.y-d,e.width=Math.max(1,a.width+d*2),e.height=Math.max(1,a.height+d*2));const i=o/r;if(!s&&e.width/e.height<i){const l=e.height*i;e.x-=(l-e.width)/2,e.width=l}else if(!s&&e.width/e.height>i){const l=e.width/i;e.y-=(l-e.height)/2,e.height=l}const u=n.app.renderer.background,h=await n.app.renderer.extract.canvas({target:n.stage,frame:e,...s&&u.alpha>0?{clearColor:u.colorRgba}:{}}),m=document.createElement("canvas");m.width=o,m.height=r;const f=m.getContext("2d");if(!f)throw new Error("Canvas story preview could not create a 2D readback context.");const g=Math.min(o/h.width,r/h.height),y=h.width*g,x=h.height*g;return f.drawImage(h,(o-y)/2,(r-x)/2,y,x),m.toDataURL("image/png")}finally{await _(n)}}const p=()=>new Promise(t=>setTimeout(t,0));async function D(t,c={}){typeof t.load=="function"&&await t.load();const n=await P(),o=document.createElement("div");o.setAttribute("style",I),document.body.appendChild(o);let r=null;const a=()=>{r?.unmount(),r=null,o.remove()};try{return await E(async s=>{let d=null;r=n.createRoot(o),r.render(v.createElement(M,{onCaught:h=>{d??=h}},v.createElement(t,c)));for(let h=0;h<k&&!(d||o.querySelector("canvas"));h++)await p();if(d)throw T(d);if(!o.querySelector("canvas"))throw new Error("The story rendered no canvas — it does not mount Pixi content.");const e=Date.now()+w;let i;for(;Date.now()<e;){if(d)throw T(d);if(i??=s[0],i&&b(i.stage))break;await p()}if(!i)throw new Error(`The story rendered a canvas but never initialized a Pixi Application within ${w/1e3}s — it is not a canvas story, or its renderer could not be created here.`);i.stop(),i.ticker.lastTime=0;let u=!1;return{host:o,stage:i.stage,ticker:i.ticker,app:i,dispose(){u||(u=!0,a())}}})}catch(s){throw a(),s}}const O=w;async function J(t,c=Date.now){if(t.length===0)return;const n=new Set,o=t.map(r=>{const a={postrender:()=>{n.add(r)}};return r.renderer?.runners.postrender.add(a),{app:r,observer:a}});try{const r=c()+O;for(;c()<r;){if(t.every(s=>s.stage!==void 0&&b(s.stage)&&n.has(s)))return;await p()}}finally{for(const{app:r,observer:a}of o)r.renderer?.runners.postrender.remove(a)}}function T(t){return new Error(`mountStoryPixi: the story threw while rendering — it does not mount Pixi content, or its component crashed. Original error: ${t instanceof Error?t.message:String(t)}`,{cause:t})}export{J as awaitPixiStoryFrame,G as capturePixiStoryThumbnail,_ as disposeStoryPixi,R as mountStoryPixi,C as withPixiStoryMountTurn};
1
+ import{r as v}from"./index-nmcBqr7Y.js";import{withApplicationCollector as E}from"./canvas-preview-frames-Cja32aW2.js";import{C as M}from"./crash-null-boundary-v3a0uEgw.js";import{m as b}from"./pixi-story-model-DNkfnWUV.js";import{au as P}from"./index-C5ZAyrKq.js";import{r as S}from"./story-mount-turn-DFRTj5hi.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-DgPDGGSV.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const w=1e4,k=12,I="position:fixed;left:-20000px;top:0;width:512px;height:512px;overflow:hidden;contain:strict;pointer-events:none;visibility:hidden;";function C(t){return S(()=>t(D))}function R(t,c={}){return C(n=>n(t,c))}function _(t){return S(async()=>t.dispose())}async function G(t,c={}){const n=await R(t,c.props??{});try{const o=c.width??128,r=c.height??96;n.app.renderer.render({container:n.stage});const a=n.stage.getBounds(),s=c.layout==="fullscreen",d=8,e=n.app.screen.clone();s||(e.x=a.x-d,e.y=a.y-d,e.width=Math.max(1,a.width+d*2),e.height=Math.max(1,a.height+d*2));const i=o/r;if(!s&&e.width/e.height<i){const l=e.height*i;e.x-=(l-e.width)/2,e.width=l}else if(!s&&e.width/e.height>i){const l=e.width/i;e.y-=(l-e.height)/2,e.height=l}const u=n.app.renderer.background,h=await n.app.renderer.extract.canvas({target:n.stage,frame:e,...s&&u.alpha>0?{clearColor:u.colorRgba}:{}}),m=document.createElement("canvas");m.width=o,m.height=r;const f=m.getContext("2d");if(!f)throw new Error("Canvas story preview could not create a 2D readback context.");const g=Math.min(o/h.width,r/h.height),y=h.width*g,x=h.height*g;return f.drawImage(h,(o-y)/2,(r-x)/2,y,x),m.toDataURL("image/png")}finally{await _(n)}}const p=()=>new Promise(t=>setTimeout(t,0));async function D(t,c={}){typeof t.load=="function"&&await t.load();const n=await P(),o=document.createElement("div");o.setAttribute("style",I),document.body.appendChild(o);let r=null;const a=()=>{r?.unmount(),r=null,o.remove()};try{return await E(async s=>{let d=null;r=n.createRoot(o),r.render(v.createElement(M,{onCaught:h=>{d??=h}},v.createElement(t,c)));for(let h=0;h<k&&!(d||o.querySelector("canvas"));h++)await p();if(d)throw T(d);if(!o.querySelector("canvas"))throw new Error("The story rendered no canvas — it does not mount Pixi content.");const e=Date.now()+w;let i;for(;Date.now()<e;){if(d)throw T(d);if(i??=s[0],i&&b(i.stage))break;await p()}if(!i)throw new Error(`The story rendered a canvas but never initialized a Pixi Application within ${w/1e3}s — it is not a canvas story, or its renderer could not be created here.`);i.stop(),i.ticker.lastTime=0;let u=!1;return{host:o,stage:i.stage,ticker:i.ticker,app:i,dispose(){u||(u=!0,a())}}})}catch(s){throw a(),s}}const O=w;async function J(t,c=Date.now){if(t.length===0)return;const n=new Set,o=t.map(r=>{const a={postrender:()=>{n.add(r)}};return r.renderer?.runners.postrender.add(a),{app:r,observer:a}});try{const r=c()+O;for(;c()<r;){if(t.every(s=>s.stage!==void 0&&b(s.stage)&&n.has(s)))return;await p()}}finally{for(const{app:r,observer:a}of o)r.renderer?.runners.postrender.remove(a)}}function T(t){return new Error(`mountStoryPixi: the story threw while rendering — it does not mount Pixi content, or its component crashed. Original error: ${t instanceof Error?t.message:String(t)}`,{cause:t})}export{J as awaitPixiStoryFrame,G as capturePixiStoryThumbnail,_ as disposeStoryPixi,R as mountStoryPixi,C as withPixiStoryMountTurn};
@@ -1 +1 @@
1
- import{bf as P,bg as L,bh as M}from"./index-BRJMIUK0.js";const R=640,j=400;function F(e,t){return`portable-${e}:${t.map(n=>encodeURIComponent(n)).join("/")}`}function N(e){const t=new Map,n=[],u=new Map,i=new Map;for(const o of e){const s=P({modulePath:o.modulePath,...o.title?{title:o.title}:{}}),h=[...s.segments,s.leaf];let a=null;for(let d=0;d<h.length;d++){const p=h.slice(0,d+1),c=d===h.length-1,r=F(c?"component":"folder",p);t.has(r)||(t.set(r,{id:r,label:p.at(-1),role:c?"component":"folder",kind:c?"component":"group",typeLabel:c?"Component":d===0?"Category":"Folder",parentId:a,childIds:[],...c?{secondaryLabel:o.modulePath}:{}}),a?t.get(a)?.childIds.push(r):n.push(r)),a=r}const l=a;t.get(l)?.childIds.push(o.id),u.set(o.id,l);const f=i.get(l);f?f.storyIds.push(o.id):i.set(l,{id:l,label:L(s),storyIds:[o.id]})}return{sections:[...i.values()],nodes:[...t.values()],rootIds:n,storyParentIds:u}}function y(e){return e&&typeof e=="object"?e:null}function v(e){if(typeof e!="string")return null;const t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function S(e){const t=y(y(e.viewport)?.options),n={...M};if(!t)return n;for(const[u,i]of Object.entries(t)){const o=y(i),s=y(o?.styles);!o||!s||typeof o.name!="string"||typeof s.width!="string"||typeof s.height!="string"||(n[u]={name:o.name,styles:{width:s.width,height:s.height},...typeof o.type=="string"?{type:o.type}:{}})}return n}function T(e){const t=e.viewport;if(typeof t=="string")return{value:t||null,isRotated:!1};const n=y(t);return{value:typeof n?.value=="string"&&n.value?n.value:null,isRotated:n?.isRotated===!0}}function x(e,t,n,u){const i=e.parameters??{},o=e.globals??{},s=i.layout,h=s==="centered"||s==="fullscreen"||s==="padded"?s:"padded",a=S(i),l=Object.entries(a).flatMap(([m,b])=>{const w=v(b.styles.width),I=v(b.styles.height);return w&&I?[{id:m,label:b.name,width:w,height:I}]:[]}),f=T(o),d=n===void 0?f.value:n,p=l.find(m=>m.id===d),c=p?.width??t?.width??R,r=p?.height??t?.height??j,g=u??f.isRotated;return{layout:h,choices:l,selectedViewportId:p?.id??null,locked:e.viewportLocked===!0,rotated:g,width:g?r:c,height:g?c:r}}function G(e,t=N(e)){return{index:t,resolve:x}}export{N as c,G as s};
1
+ import{bh as P,bi as L,bj as j}from"./index-C5ZAyrKq.js";const M=640,R=400;function F(e,t){return`portable-${e}:${t.map(n=>encodeURIComponent(n)).join("/")}`}function N(e){const t=new Map,n=[],u=new Map,r=new Map;for(const o of e){const s=P({modulePath:o.modulePath,...o.title?{title:o.title}:{}}),h=[...s.segments,s.leaf];let a=null;for(let d=0;d<h.length;d++){const p=h.slice(0,d+1),c=d===h.length-1,i=F(c?"component":"folder",p);t.has(i)||(t.set(i,{id:i,label:p.at(-1),role:c?"component":"folder",kind:c?"component":"group",typeLabel:c?"Component":d===0?"Category":"Folder",parentId:a,childIds:[],...c?{secondaryLabel:o.modulePath}:{}}),a?t.get(a)?.childIds.push(i):n.push(i)),a=i}const l=a;t.get(l)?.childIds.push(o.id),u.set(o.id,l);const f=r.get(l);f?f.storyIds.push(o.id):r.set(l,{id:l,label:L(s),storyIds:[o.id]})}return{sections:[...r.values()],nodes:[...t.values()],rootIds:n,storyParentIds:u}}function y(e){return e&&typeof e=="object"?e:null}function v(e){if(typeof e!="string")return null;const t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function S(e){const t=y(y(e.viewport)?.options),n={...j};if(!t)return n;for(const[u,r]of Object.entries(t)){const o=y(r),s=y(o?.styles);!o||!s||typeof o.name!="string"||typeof s.width!="string"||typeof s.height!="string"||(n[u]={name:o.name,styles:{width:s.width,height:s.height},...typeof o.type=="string"?{type:o.type}:{}})}return n}function T(e){const t=e.viewport;if(typeof t=="string")return{value:t||null,isRotated:!1};const n=y(t);return{value:typeof n?.value=="string"&&n.value?n.value:null,isRotated:n?.isRotated===!0}}function x(e,t,n,u){const r=e.parameters??{},o=e.globals??{},s=r.layout,h=s==="centered"||s==="fullscreen"||s==="padded"?s:"padded",a=S(r),l=Object.entries(a).flatMap(([m,b])=>{const w=v(b.styles.width),I=v(b.styles.height);return w&&I?[{id:m,label:b.name,width:w,height:I}]:[]}),f=T(o),d=n===void 0?f.value:n,p=l.find(m=>m.id===d),c=p?.width??t?.width??M,i=p?.height??t?.height??R,g=u??f.isRotated;return{layout:h,choices:l,selectedViewportId:p?.id??null,locked:e.viewportLocked===!0,rotated:g,width:g?i:c,height:g?c:i}}function G(e,t=N(e)){return{index:t,resolve:x}}export{N as c,G as s};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/react-three-rapier.esm-CHXGG51p.js","assets/index-C5ZAyrKq.js","assets/index-nmcBqr7Y.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-D_NuPfjr.js","assets/jsx-runtime-DPjLkJKQ.js","assets/index-CtzuWnCS.js","assets/index-CinJrH5C.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/events-156d8d12.esm-CYeuVCYr.js","assets/index-bQE2NA0D.js","assets/BufferGeometryUtils-FJZNEiJN.js"])))=>i.map(i=>d[i]);
2
+ import{M as U,h3 as W,h4 as z,_ as H}from"./index-C5ZAyrKq.js";import{r as F}from"./index-nmcBqr7Y.js";import{f as G}from"./asset-preview-DxlSdRZn.js";import{C as $}from"./crash-null-boundary-v3a0uEgw.js";import{T as q}from"./three.module-BLhyNg0e.js";import{e as Q,f as V}from"./events-156d8d12.esm-CYeuVCYr.js";import{r as X}from"./story-mount-turn-DFRTj5hi.js";import{A as J,ej as K,d7 as Y}from"./three.core-3arARmh6.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D_NuPfjr.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./editor-layers-D-CTUqco.js";import"./workspace-arrangement-DqG5sUns.js";import"./renderer-ownership-BovSEcLv.js";import"./hierarchy-marks-BuCO8Ke-.js";import"./studio-environment-R9qXUUcC.js";import"./user-data-C84W0V47.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./bitmap-label-Ct4k6ehY.js";import"./index-bQE2NA0D.js";const Z=1/60,ee=6,te=15,N=1e-4,ne=2,re=10,oe=250,ie=4e3;function g(e){e.updateMatrixWorld(!0);const t=[];return e.traverse(n=>{const r=n.matrixWorld.elements;t.push(r[12],r[13],r[14])}),t}function D(e){let t=0;return e.traverse(()=>{t++}),t}function x(e,t){if(e.length!==t.length)return Number.NaN;let n=0;for(let r=0;r<t.length;r+=3){const o=t[r]-e[r],a=t[r+1]-e[r+1],i=t[r+2]-e[r+2],s=Math.sqrt(o*o+a*a+i*i);if(!Number.isFinite(s))return Number.NaN;s>n&&(n=s)}return n}const se=()=>new Promise(e=>setTimeout(e,0));async function ae(e,t,n){const r=n();let o=D(e),a=r,i=!1;for(;n()-r<ie;){if(n()-a>=oe){i=!0;break}await t();const s=D(e);s!==o&&(o=s,a=n())}return{buildWaitMs:n()-r,buildSettled:i}}function C(e){return{outcome:e,steps:0,lastMotion:0,buildWaitMs:0,buildSettled:!0}}function ce(e){return e.hasPhysicsSubscriber!==!1}async function ue(e,t={}){const n=t.yieldTurn??se,r=t.now??(()=>Date.now()),o=e.update?.bind(e);if(!o)return C("unsupported");if(!ce(e))return C("still");const{buildWaitMs:a,buildSettled:i}=await ae(e.scene,n,r);let s=g(e.scene),l=0,u=0,h=!1,E=0,y="still";for(let d=0;d<te;d++){for(let w=0;w<ee;w++)o(Z),l++;await n();const m=g(e.scene),p=x(s,m);if(s=m,!Number.isFinite(p)){u=0;continue}if(E=p,p>N){h=!0,u=0,y="budget";continue}if(u++,h&&u>=ne){y="rest";break}}for(let d=0;d<re;d++){await n();const m=g(e.scene),p=x(s,m);if(s=m,Number.isFinite(p)&&p<=N)break}return{outcome:y,steps:l,lastMotion:E,buildWaitMs:a,buildSettled:i}}const le={packaged:!1,createElement:F.createElement,createR3FRoot:V,extendThree:Q,three:q};let R=null;async function de(){const e=await import(W);for(const t of["createElement","createR3FRoot","extendThree"])if(typeof e[t]!="function")throw new Error(`The packaged R3F preview runtime did not export ${t} as a function — see vite-plugin-module-doorways.ts.`);if(typeof e.projectThree!="object"||e.projectThree===null)throw new Error("The packaged R3F preview runtime did not export projectThree — see vite-plugin-module-doorways.ts.");return{packaged:!0,createElement:e.createElement,createR3FRoot:e.createR3FRoot,extendThree:e.extendThree,three:e.projectThree}}async function me(){return await U()?(R||(R=de()),R):le}let T=null;function nt(){return T}const v="volter:story-preview-root",pe=1e4;function P(e){if(typeof e=="function"){const t=e;return t.displayName||t.name||""}if(e&&typeof e=="object"){const t=e;return typeof t.displayName=="string"&&t.displayName.length>0?t.displayName:typeof t.name=="string"&&t.name.length>0?t.name:P(t.type??t.render)}return""}function fe(e){const t=e,n=t._reactInternals??t._reactInternalFiber;return n&&typeof n=="object"?n:void 0}function he(e){const t=[P(e.type),P(e.elementType)];if(!(t.includes("RigidBody")||t.includes("InstancedRigidBodies")))return{provider:t.includes("Physics"),body:!1,movingBody:!1};const r=e.memoizedProps&&typeof e.memoizedProps=="object"?e.memoizedProps:{};return{provider:t.includes("Physics"),body:!0,movingBody:r.type!=="fixed"}}function ye(e){const t=e?[e]:[],n=new Set;let r=!1,o=!1,a=!1;for(;t.length>0;){const i=t.pop();if(n.has(i))continue;n.add(i);const s=he(i);r||=s.provider,o||=s.body,a||=s.movingBody,i.child&&t.push(i.child),i.sibling&&t.push(i.sibling)}return r?!o||a:!1}class we extends F.Component{componentDidMount(){this.props.onReport(ye(fe(this)))}render(){return this.props.children??null}}function Ee(e){return e instanceof Error&&e.message.includes("is not part of the THREE namespace")}function L(e){return Ee(e)?!0:e instanceof Error?e.message.includes("Hooks can only be used within the Canvas component")||e.message.includes("useGame: no Game in context"):!1}function rt(e){return L(e)}function I(e){return e instanceof Error&&e.message.includes("useRapier must be used within <Physics")}async function Te(e){try{return(e.packaged?await import("/@id/@react-three/rapier"):await H(()=>import("./react-three-rapier.esm-CHXGG51p.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]))).Physics}catch{return null}}function Se(e,t,n){const r=globalThis,o=r.reportError,a=typeof o=="function"?o.bind(globalThis):i=>{console.error(i)};r.reportError=i=>{L(i)||t&&I(i)||a(i)};try{return n(e)}finally{r.reportError=o}}function be(e){return{domElement:e,xr:{enabled:!1,addEventListener(){},removeEventListener(){},setAnimationLoop(){},getSession(){return null}},shadowMap:{enabled:!1,type:Y},outputColorSpace:K,toneMapping:J,setPixelRatio(){},setSize(){},setClearColor(){},setClearAlpha(){},setViewport(){},setScissor(){},setScissorTest(){},setAnimationLoop(){},clear(){},render(){},compile(){},dispose(){},getPixelRatio(){return 1},getContext(){return null}}}let O=null;function k(e){return X(()=>e(Pe))}function ge(e){O!==e.extendThree&&(O=e.extendThree,e.extendThree(e.three))}async function Re(e,t={}){return k(n=>n(e,t))}function ve(e){return k(async()=>e.dispose())}async function Pe(e,t={}){const n=z();T=null;const r=n?Date.now():0,o=await me(),a=n?Date.now()-r:0,i=n?Date.now():0;typeof e.load=="function"&&await e.load();const s=n?Date.now()-i:0;try{return await j(o,e,t,void 0,{timed:n,runtimeMs:a,loadMs:s})}catch(l){if(!I(l))throw l;const u=await Te(o);if(!u)throw l;return await j(o,e,t,h=>o.createElement(u,{paused:!1},h),{timed:n,runtimeMs:a,loadMs:s})}}async function j(e,t,n,r,o){ge(e);const a=document.createElement("canvas"),i=Se(a,r===void 0,e.createR3FRoot);let s;const l=new Promise(c=>{s=c});await i.configure({gl:(()=>be(a)),frameloop:"never",size:{width:128,height:96,top:0,left:0},onCreated:c=>s(c)});let u=null,h;const E=new Promise((c,b)=>{h=b}),y=c=>{u??=new Error("mountStoryObject3D: the story threw while reconciling into an R3F root — it does not render `three` content (a DOM/React story), or its component crashed. Original error: "+String(c instanceof Error?c.message:c),{cause:c}),h(u)},d=e.createElement(t,n);let m=!1;const p=c=>{m=c};i.render(e.createElement("group",{name:v},e.createElement($,{onCaught:y},e.createElement(we,{onReport:p},r?r(d):d))));const w=o?.timed?Date.now():0;let M;const f=await Promise.race([l,E,new Promise((c,b)=>{M=setTimeout(()=>b(new Error("mountStoryObject3D: onCreated did not fire within 10s — the story never reached its first R3F commit and never threw. Either it is still SUSPENDED on a slow load (a suspending loader with no <Suspense> boundary holds the first commit until its content is ready), or its render is hung.")),pe)})]).catch(c=>{throw o?.timed&&(T={runtimeMs:o.runtimeMs,loadMs:o.loadMs,fiberMs:Date.now()-w,settleMs:0}),i.unmount(),c}).finally(()=>clearTimeout(M));if(u)throw i.unmount(),u;f.clock.autoStart=!1,f.clock.stop();const S=f.scene.getObjectByName(v);if(!S)throw i.unmount(),new Error(`mountStoryObject3D: the story's wrapper group ("${v}") is not in the scene after its first commit — the story rendered nothing mountable.`);const A=o?.timed?Date.now()-w:0,B=o?.timed?Date.now():0;await ue({scene:S,update:c=>{f.advance(f.clock.elapsedTime+Math.min(c,.1),!1)},hasPhysicsSubscriber:m}),o?.timed&&(T={runtimeMs:o.runtimeMs,loadMs:o.loadMs,fiberMs:A,settleMs:Date.now()-B});let _=f.clock.elapsedTime;return{root:S,scene:f.scene,advance(c){!(c>0)||!Number.isFinite(c)||(_+=Math.min(c,.1),f.advance(_,!1))},dispose(){i.unmount()}}}async function ot(e,t={}){const n=await Re(e,t.props??{});try{const r=G(n.root,{width:t.width??128,height:t.height??96,...t.camera===void 0?{}:{camera:t.camera},...t.pose===void 0?{}:{pose:t.pose}}),o=r.views.find(a=>a.view==="perspective")??r.views[0];if(!o)throw new Error("Story preview capture returned no views.");return`data:${o.mimeType};base64,${o.base64}`}finally{await ve(n)}}function it(){return typeof WebGLRenderingContext<"u"&&typeof navigator<"u"&&!navigator.userAgent.toLowerCase().includes("jsdom")}export{v as PREVIEW_ROOT_NAME,ot as captureStoryComponentThumbnail,ve as disposeStoryObject3D,rt as isStoryThreeClassificationRefusal,nt as lastStoryMountPhaseTiming,Re as mountStoryObject3D,it as supportsThreeStoryCapture,k as withStoryMountTurn};
@@ -1 +1 @@
1
- import{setUserData as d}from"./user-data-dHvLdpwM.js";import"./object-marks-DwvIEBOK.js";const m="ingest:camera",y=1<<31;function I(s){return(s.layers.mask&y)!==0}function M(s){const t=s.material;if(!t)return null;const n=Array.isArray(t)?t[0]:t;return n?.color?n:null}function A(s,t){const n=new Map;let e=0,c=0,l=0;const f=(i,r)=>{const o=`ingest:${r}:${i.type}:${i.name||""}`;n.set(o,i),e++,i.isLight?l++:i.isMesh&&c++,u(i,r)},u=(i,r)=>{let o=0;for(const a of i.children)I(a)||(f(a,r?`${r}/${o}`:`${o}`),o++)};return u(s,""),t&&(n.set(m,t),e++),{byId:n,count:e,meshes:c,lights:l}}function h(s,t){const n=A(s,t);for(const[e,c]of n.byId)d(c,"entityId",e);return n}export{m as CAMERA_ID,h as assignStructuralIds,A as collectStructuralIds,M as colorMaterialOf};
1
+ import{setUserData as d}from"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";const m="ingest:camera",y=1<<31;function I(s){return(s.layers.mask&y)!==0}function M(s){const t=s.material;if(!t)return null;const n=Array.isArray(t)?t[0]:t;return n?.color?n:null}function A(s,t){const n=new Map;let e=0,c=0,l=0;const f=(i,r)=>{const o=`ingest:${r}:${i.type}:${i.name||""}`;n.set(o,i),e++,i.isLight?l++:i.isMesh&&c++,u(i,r)},u=(i,r)=>{let o=0;for(const a of i.children)I(a)||(f(a,r?`${r}/${o}`:`${o}`),o++)};return u(s,""),t&&(n.set(m,t),e++),{byId:n,count:e,meshes:c,lights:l}}function h(s,t){const n=A(s,t);for(const[e,c]of n.byId)d(c,"entityId",e);return n}export{m as CAMERA_ID,h as assignStructuralIds,A as collectStructuralIds,M as colorMaterialOf};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/spark.module-Byplgb8G.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/Pass-D1MRT672.js"])))=>i.map(i=>d[i]);
2
+ import{_ as g}from"./index-C5ZAyrKq.js";import{s as f}from"./user-data-C84W0V47.js";import{D as T,K as S,M as E}from"./KTX2Loader-CaqVE6nY.js";import{GLTFLoader as L}from"./GLTFLoader-KeoruJgS.js";import{cc as M,eX as v,fo as p,co as I,K as b}from"./three.core-3arARmh6.js";import{createStandardEnvironment as x}from"./environment-Dg-YaLsA.js";let D="/";function w(t){return t.startsWith("/")||t.startsWith("http")||t.startsWith("data:")||t.startsWith("blob:")?t:D+t}const r=new M;r.setURLModifier(w);new v(r);const h=new T(r);h.setDecoderPath("/jsm/libs/draco/gltf/");const _=new S(r);_.setTranscoderPath("/jsm/libs/basis/");const l=new L(r);l.setDRACOLoader(h);l.setKTX2Loader(_);l.setMeshoptDecoder(E);function N(t){return w(t)}const i=new Map;async function z(t,a){let e=i.get(t);!e&&a&&(e=Promise.resolve(a),i.set(t,e)),e||(e=fetch(N(t)).then(async s=>{if(!s.ok)throw new Error(`Failed to load Gaussian splat: ${t} (${s.status} ${s.statusText})`);return new Uint8Array(await s.arrayBuffer())}),i.set(t,e));try{const[{SplatMesh:s},u]=await Promise.all([g(()=>import("./spark.module-Byplgb8G.js"),__vite__mapDeps([0,1,2,3])),e]),o=new s({fileBytes:u,fileName:t,raycastable:!0});await o.initialized,f(o,"gaussianSplat",{src:t,numSplats:o.numSplats});const d=o.getBoundingBox();if(!d.isEmpty()){const m=d.getSize(new p).multiplyScalar(1.5),y=d.getCenter(new p),n=new I(new b(m.x,m.y,m.z));n.name="__volter_splat_bounds",n.position.copy(y),n.visible=!1,n.raycast=()=>{},f(n,"engineInternal",!0),o.add(n)}return o}catch(s){throw i.delete(t),s}}const O=.45,C=.25,c=new WeakMap;function K(t,a){let e=c.get(a);e||(e=x(a),c.set(a,e)),t.environment=e.texture,t.environmentIntensity=O}function V(t){const a=c.get(t);a&&(c.delete(t),a.dispose())}export{C as S,K as a,V as d,l as g,z as l,N as r};
@@ -1,3 +1,3 @@
1
- import{a as s}from"./jsx-runtime-DPjLkJKQ.js";import"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{eG as a}from"./index-BRJMIUK0.js";function $({explanation:e,testId:t,style:o}){return e?s.jsx(a,{"data-testid":t,tone:e.tone,title:e.title,description:s.jsx("span",{style:{whiteSpace:"pre-wrap"},children:e.description}),style:{position:"absolute",inset:0,pointerEvents:"none",...o}}):null}function r(e){return e.map(t=>`“${t}”`).join(", ")}function d(e,t){const o=t.map(n=>n.worldId);return{tone:"error",title:o.length===1?`${e} root ${r(o)} failed`:`${o.length} ${e} roots failed`,description:`${t.map(n=>`${n.worldId} (${n.kind}, ${n.identity}): ${n.message}`).join(`
1
+ import{a as s}from"./jsx-runtime-DPjLkJKQ.js";import"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{ex as a}from"./index-C5ZAyrKq.js";function $({explanation:e,testId:t,style:o}){return e?s.jsx(a,{"data-testid":t,tone:e.tone,title:e.title,description:s.jsx("span",{style:{whiteSpace:"pre-wrap"},children:e.description}),style:{position:"absolute",inset:0,pointerEvents:"none",...o}}):null}function r(e){return e.map(t=>`“${t}”`).join(", ")}function d(e,t){const o=t.map(n=>n.worldId);return{tone:"error",title:o.length===1?`${e} root ${r(o)} failed`:`${o.length} ${e} roots failed`,description:`${t.map(n=>`${n.worldId} (${n.kind}, ${n.identity}): ${n.message}`).join(`
2
2
  `)}
3
3
  If this followed an edit, Undo (Ctrl+Z) restores the previous source and remounts.`}}function c(e,t){return{tone:"loading",title:t.length===0?`Loading ${e}`:t.length===1?`Loading ${e} root ${r(t)}`:`Loading ${t.length} ${e} roots`,description:t.length===0?"Reading the project declaration to identify the root that belongs here.":`Waiting for ${r(t)} to finish mounting.`}}function u(e,t){return t.length===0?{tone:"neutral",title:`No ${e} root`,description:"No declared root belongs to this surface."}:{tone:"neutral",title:"No renderable content",description:(t.length===1?`Root ${r(t)} mounted successfully but currently produces no renderable content.`:`Roots ${r(t)} mounted successfully but currently produce no renderable content.`)+" If this world builds its content under its game systems, press Play (▶) to run it."}}function m(e){if(e.content==="present")return null;if(e.playSuspended)return{tone:"neutral",title:"Editing paused during Play",description:`${r(e.rootIds)} is running in the Game tab. Press Stop (⏹) to edit it here.`};const t=new Set(e.rootIds),o=(e.failures??[]).filter(i=>t.has(i.worldId));if(o.length>0)return d(e.surface,o);if(e.disclosure)return{tone:"neutral",title:`No ${e.surface} editor for ${r(e.rootIds)}`,description:e.disclosure};const n=(e.readiness??[]).filter(i=>i.state==="waiting"&&t.has(i.rootId)).map(i=>i.rootId),l=n.length>0?n:e.rootIds;return e.phase==="loading"||n.length>0||e.content==="unknown"?c(e.surface,l):u(e.surface,e.rootIds)}export{$ as S,m as e};
@@ -1 +1 @@
1
- import{aw as t}from"./index-BRJMIUK0.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";function c(e){if(!e)return{type:null};switch(e.kind){case t.SyntaxKind.StringKeyword:return{type:"string"};case t.SyntaxKind.NumberKeyword:return{type:"number"};case t.SyntaxKind.BooleanKeyword:return{type:"boolean"}}if(t.isUnionTypeNode(e)){const n=[];for(const r of e.types){if(!t.isLiteralTypeNode(r))return{type:null};if(t.isStringLiteral(r.literal))n.push(r.literal.text);else if(t.isNumericLiteral(r.literal))n.push(Number(r.literal.text));else return{type:null}}return n.length>0?{type:"enum",options:n}:{type:null}}return t.isTupleTypeNode(e)&&e.elements.length===3&&e.elements.every(n=>n.kind===t.SyntaxKind.NumberKeyword)?{type:"vec3"}:{type:null}}function y(e,n,r){if(!e||!t.isTypeReferenceNode(e)||!t.isIdentifier(e.typeName)||e.typeArguments&&e.typeArguments.length>0)return e;const s=e.typeName.text,i=f(n,s);if(i)return t.isTypeAliasDeclaration(i)?i.type:e;const a=r.get(s);return a?a.type:e}function m(e,n,r,s){for(const i of e){if(!t.isPropertySignature(i))continue;const a=t.isIdentifier(i.name)||t.isStringLiteral(i.name)?i.name.text:null;a&&n.set(a,{optional:i.questionToken!==void 0,...c(y(i.type,r,s))})}}function f(e,n){for(const r of e.statements)if((t.isTypeAliasDeclaration(r)||t.isInterfaceDeclaration(r))&&r.name.text===n)return r;return null}function p(e,n,r,s,i){if(i>4)return;if(t.isTypeLiteralNode(e)){m(e.members,s,n,r);return}if(t.isIntersectionTypeNode(e)){for(const l of e.types)p(l,n,r,s,i+1);return}if(!t.isTypeReferenceNode(e)||!t.isIdentifier(e.typeName))return;const a=e.typeName.text,o=f(n,a);if(o){t.isTypeAliasDeclaration(o)?p(o.type,n,r,s,i+1):m(o.members,s,n,r);return}const u=r.get(a);u&&p(u.type,u.sf,new Map,s,i+1)}function x(e,n){const r=e.getText(n);if(t.isStringLiteral(e)||t.isNoSubstitutionTemplateLiteral(e))return{defaultText:r,defaultValue:e.text};if(t.isNumericLiteral(e))return{defaultText:r,defaultValue:Number(e.text)};if(t.isPrefixUnaryExpression(e)&&e.operator===t.SyntaxKind.MinusToken&&t.isNumericLiteral(e.operand))return{defaultText:r,defaultValue:-Number(e.operand.text)};if(e.kind===t.SyntaxKind.TrueKeyword)return{defaultText:r,defaultValue:!0};if(e.kind===t.SyntaxKind.FalseKeyword)return{defaultText:r,defaultValue:!1};if(t.isArrayLiteralExpression(e)){const s=[];for(const i of e.elements)if(t.isNumericLiteral(i))s.push(Number(i.text));else if(t.isPrefixUnaryExpression(i)&&i.operator===t.SyntaxKind.MinusToken&&t.isNumericLiteral(i.operand))s.push(-Number(i.operand.text));else return{defaultText:r};return{defaultText:r,defaultValue:s}}return{defaultText:r}}function N(e){return t.isFunctionDeclaration(e)&&e.name&&e.parameters[0]?{name:e.name.text,parameter:e.parameters[0]}:t.isVariableDeclaration(e)&&t.isIdentifier(e.name)&&e.initializer&&(t.isArrowFunction(e.initializer)||t.isFunctionExpression(e.initializer))&&e.initializer.parameters[0]?{name:e.name.text,parameter:e.initializer.parameters[0]}:null}function V(e,n){const r=new Map,s=i=>{const a=N(i);if(a&&/^[A-Z]/.test(a.name)&&!r.has(a.name)){const o=b(a.parameter,e,n);o.length>0&&r.set(a.name,o)}(t.isSourceFile(i)||t.isVariableStatement(i)||t.isVariableDeclarationList(i))&&t.forEachChild(i,s)};return s(e),r}function b(e,n,r){const s=new Map;if(t.isObjectBindingPattern(e.name))for(const a of e.name.elements){if(a.dotDotDotToken)continue;const o=a.propertyName??a.name;!t.isIdentifier(o)||!a.initializer||s.set(o.text,x(a.initializer,n))}const i=new Map;if(e.type&&p(e.type,n,r,i,0),i.size>0){const a=[];for(const[o,u]of i){const l=s.get(o);a.push({name:o,type:u.type,...u.options?{options:u.options}:{},optional:u.optional||l!==void 0,...l??{}})}return a}return[...s].map(([a,o])=>({name:a,type:null,optional:!0,...o}))}export{V as localComponentPropSpecs};
1
+ import{ay as t}from"./index-C5ZAyrKq.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";function c(e){if(!e)return{type:null};switch(e.kind){case t.SyntaxKind.StringKeyword:return{type:"string"};case t.SyntaxKind.NumberKeyword:return{type:"number"};case t.SyntaxKind.BooleanKeyword:return{type:"boolean"}}if(t.isUnionTypeNode(e)){const n=[];for(const r of e.types){if(!t.isLiteralTypeNode(r))return{type:null};if(t.isStringLiteral(r.literal))n.push(r.literal.text);else if(t.isNumericLiteral(r.literal))n.push(Number(r.literal.text));else return{type:null}}return n.length>0?{type:"enum",options:n}:{type:null}}return t.isTupleTypeNode(e)&&e.elements.length===3&&e.elements.every(n=>n.kind===t.SyntaxKind.NumberKeyword)?{type:"vec3"}:{type:null}}function y(e,n,r){if(!e||!t.isTypeReferenceNode(e)||!t.isIdentifier(e.typeName)||e.typeArguments&&e.typeArguments.length>0)return e;const s=e.typeName.text,i=f(n,s);if(i)return t.isTypeAliasDeclaration(i)?i.type:e;const a=r.get(s);return a?a.type:e}function m(e,n,r,s){for(const i of e){if(!t.isPropertySignature(i))continue;const a=t.isIdentifier(i.name)||t.isStringLiteral(i.name)?i.name.text:null;a&&n.set(a,{optional:i.questionToken!==void 0,...c(y(i.type,r,s))})}}function f(e,n){for(const r of e.statements)if((t.isTypeAliasDeclaration(r)||t.isInterfaceDeclaration(r))&&r.name.text===n)return r;return null}function p(e,n,r,s,i){if(i>4)return;if(t.isTypeLiteralNode(e)){m(e.members,s,n,r);return}if(t.isIntersectionTypeNode(e)){for(const l of e.types)p(l,n,r,s,i+1);return}if(!t.isTypeReferenceNode(e)||!t.isIdentifier(e.typeName))return;const a=e.typeName.text,o=f(n,a);if(o){t.isTypeAliasDeclaration(o)?p(o.type,n,r,s,i+1):m(o.members,s,n,r);return}const u=r.get(a);u&&p(u.type,u.sf,new Map,s,i+1)}function x(e,n){const r=e.getText(n);if(t.isStringLiteral(e)||t.isNoSubstitutionTemplateLiteral(e))return{defaultText:r,defaultValue:e.text};if(t.isNumericLiteral(e))return{defaultText:r,defaultValue:Number(e.text)};if(t.isPrefixUnaryExpression(e)&&e.operator===t.SyntaxKind.MinusToken&&t.isNumericLiteral(e.operand))return{defaultText:r,defaultValue:-Number(e.operand.text)};if(e.kind===t.SyntaxKind.TrueKeyword)return{defaultText:r,defaultValue:!0};if(e.kind===t.SyntaxKind.FalseKeyword)return{defaultText:r,defaultValue:!1};if(t.isArrayLiteralExpression(e)){const s=[];for(const i of e.elements)if(t.isNumericLiteral(i))s.push(Number(i.text));else if(t.isPrefixUnaryExpression(i)&&i.operator===t.SyntaxKind.MinusToken&&t.isNumericLiteral(i.operand))s.push(-Number(i.operand.text));else return{defaultText:r};return{defaultText:r,defaultValue:s}}return{defaultText:r}}function N(e){return t.isFunctionDeclaration(e)&&e.name&&e.parameters[0]?{name:e.name.text,parameter:e.parameters[0]}:t.isVariableDeclaration(e)&&t.isIdentifier(e.name)&&e.initializer&&(t.isArrowFunction(e.initializer)||t.isFunctionExpression(e.initializer))&&e.initializer.parameters[0]?{name:e.name.text,parameter:e.initializer.parameters[0]}:null}function V(e,n){const r=new Map,s=i=>{const a=N(i);if(a&&/^[A-Z]/.test(a.name)&&!r.has(a.name)){const o=b(a.parameter,e,n);o.length>0&&r.set(a.name,o)}(t.isSourceFile(i)||t.isVariableStatement(i)||t.isVariableDeclarationList(i))&&t.forEachChild(i,s)};return s(e),r}function b(e,n,r){const s=new Map;if(t.isObjectBindingPattern(e.name))for(const a of e.name.elements){if(a.dotDotDotToken)continue;const o=a.propertyName??a.name;!t.isIdentifier(o)||!a.initializer||s.set(o.text,x(a.initializer,n))}const i=new Map;if(e.type&&p(e.type,n,r,i,0),i.size>0){const a=[];for(const[o,u]of i){const l=s.get(o);a.push({name:o,type:u.type,...u.options?{options:u.options}:{},optional:u.optional||l!==void 0,...l??{}})}return a}return[...s].map(([a,o])=>({name:a,type:null,optional:!0,...o}))}export{V as localComponentPropSpecs};
@@ -0,0 +1 @@
1
+ import{ah as d,ai as w,aj as b,ak as N}from"./index-C5ZAyrKq.js";import{r as m}from"./collaboration-presence-D6MC9xJN.js";import{e as v,j as P,m as I}from"./game-network-DW5ARz4R.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-BlrALjM3.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-ggQWxtu-.js";import"./contract-system-adapters-Cn7OW_ay.js";import"./game-contract-seams-tyKDsfaP.js";import"./seeded-random-BJthDRMu.js";import"./game-audio-BeCyd0Ha.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./events-156d8d12.esm-CYeuVCYr.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./index-bQE2NA0D.js";import"./live-project-verbs-CdFmLYOo.js";import"./capability-coverage-ByWftxk4.js";import"./edit-mode-authoring-D5f7aHHl.js";import"./json-history-resource-Uqrihfc8.js";import"./binding-resolver-DGbk9_XR.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-Do9J6nsb.js";import"./canvas-entry-runtime-BST8yRuK.js";import"./three-ingest-runtime-CwTqAHgX.js";import"./EffectComposer-BEAt0PtQ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-DTnDQXm0.js";import"./Pass-D1MRT672.js";import"./CSS3DRenderer-BsAqfavI.js";import"./relative-path-guard-GiM7Lsz8.js";import"./react-root-BHA-cdrW.js";import"./editor-presentation-activity-CqJH4G9t.js";import"./active-ingest-0QjJWb7i.js";import"./ingest-source-persistence-6ShMoSCa.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-hRLF0BeO.js";import"./mounted-authoring-DxMISwvR.js";import"./entity-object-MKYemTFM.js";import"./user-data-C84W0V47.js";import"./workspace-arrangement-DqG5sUns.js";import"./three-contract-Dkt6PmWY.js";import"./three-DiL6vMXq.js";import"./editor-layers-D-CTUqco.js";import"./component-instance-root-DLI40MiB.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-CkLR2zGf.js";import"./source-persistence-backend-au3WtEn6.js";import"./three-projection-core-B7Lf8tOp.js";import"./body-marks-C1LxJtQb.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./structural-ids-BOo2BRoY.js";import"./object3d-authoring-subject-XccsO0xG.js";import"./r3f-physics-binding-Cx8yhuwt.js";import"./deferred-ingest-play-B2JUlwlT.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-CnzxMtYz.js";import"./board-guides-CjHQ9Ynm.js";import"./relative-import-specifier-CPFTrxi4.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-Cz3Zyx_1.js";import"./inference-diagnostics-DLt9ql9I.js";import"./writer-tw6EcuVO.js";import"./three-state-BCACvUtm.js";import"./editor-shell-store-DHVWS8cE.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-BARIpMu-.js";const Xt="workspace.service";function Yt(){let i=null;const p=new Set;let e=null,n=null,a=d();const l=()=>{e?.(),e=null,n?.(),n=null,a=null},y=w(u=>{const k=u.participants.find(r=>r.participantId===b)?.capabilities.includes("test")??!1,t=u.activePlaytest,s=I();if(!k||!t){i=null,l(),m({playtest:null}),s?.mode==="team"&&P(),t||p.clear();return}s?.mode==="team"&&s.id===t.id||i!==t.id&&(p.has(t.id)||(i=t.id,m({playtest:{id:t.id,play:"starting",networking:"connecting",roomName:null,problem:null}}),v(t.seed,{mode:"team",id:t.id,roomKey:t.roomKey,revision:t.revision,participantId:b}).then(()=>{if(i!==t.id)return;l();const r=()=>{const o=d(),c=o?.getConnectionState?.(),f=o?.getRoomInfo?.();m({playtest:{id:t.id,play:"ready",networking:o?c==="connected"&&f?"ready":c==="error"?"error":"connecting":"not-declared",roomName:f?.roomName??null,problem:c==="error"?"The game networking adapter reported an error.":null}})},g=()=>{const o=d();o!==a&&(e?.(),a=o,e=o?.subscribe(r)??null),r()};n=N(g),g()}).catch(r=>{i===t.id&&(i=null,p.add(t.id),m({playtest:{id:t.id,play:"error",networking:"error",roomName:null,problem:r instanceof Error?r.message:String(r)}}))})))});return()=>{l(),y()}}export{Xt as point,Yt as start};
@@ -1 +1 @@
1
- import{isInEditorOwnedSubtree as V,isEditorOwnedObject as P}from"./editor-layers-BDJnAAzj.js";import{g as k}from"./user-data-Bpj7diUS.js";import{b as E,c as S}from"./component-instance-root-B0C5oNEm.js";import{n as K,e as $,s as A}from"./entity-object-JmYMfLsx.js";import{s as W}from"./viewport-editor-controls-BYaAZ_Ku.js";import{fd as z,e6 as G,B as U}from"./three.core-3arARmh6.js";function q(n){const t=k(n,"constraints");return Array.isArray(t)?t.filter(e=>!!e&&typeof e=="object"&&typeof e.getSnapshot=="function"&&!!e.config):[]}const M="ingest:camera",J=1<<31;function Q(n){return(n.layers.mask&J)!==0}function Y(n,t){const e=new Map;let r=0,s=0,f=0;const u=(i,c)=>{const o=`ingest:${c}:${i.type}:${i.name||""}`;e.set(o,i),r++,i.isLight?f++:i.isMesh&&s++,d(i,c)},d=(i,c)=>{let o=0;for(const h of i.children)Q(h)||(u(h,c?`${c}/${o}`:`${o}`),o++)};return d(n,""),t&&(e.set(M,t),r++),{byId:e,count:r,meshes:s,lights:f}}function Z(n){const t=k(n,"authoringSubject");return t&&typeof t.label=="string"&&typeof t.kind=="string"?t:null}function X(n){const t=k(n,"reflectionProbe");if(!t||typeof t!="object")return null;const e=t;return e.config&&typeof e.recapture=="function"&&typeof e.getSnapshot=="function"?t:null}let D=null;function ht(n){D=n,W(n?.editorControls??null)}function tt(){return D}function C(n){return n.depthWrite===!1&&n.side===U}function et(n){const t=n.material;return t?Array.isArray(t)?t.length>0&&t.every(C):C(t):!1}function L(n,t,e,r=()=>!1,s){const f=tt();if(!f)return[];const u=f.canvas.getBoundingClientRect();if(u.width<=0||u.height<=0||!Number.isFinite(t)||!Number.isFinite(e)||t<u.left||e<u.top||t>=u.left+u.width||e>=u.top+u.height)return[];const d=new z((t-u.left)/u.width*2-1,-((e-u.top)/u.height)*2+1),i=new G;i.layers.enableAll(),i.setFromCamera(d,f.camera);const c=new Set(s?.objects??n.objectMap.values()),o=[...c].filter(b=>{for(let I=b.parent;I;I=I.parent)if(c.has(I))return!1;return!0});for(const b of o)b.traverse(I=>{const m=I;m.isSkinnedMesh&&(m.boundingBox=null,m.boundingSphere=null)});const h=i.intersectObjects(o,!0),p=[],v=new Set;for(const b of h){if(V(b.object)||et(b.object))continue;let I=b.object,m=null;if(s)for(;I&&m===null;)m=s.idForObject3D(I),I=I.parent;else{const a=K(I);m=a?$(a)??null:null}m!==null&&!r(m)&&!v.has(m)&&(v.add(m),p.push(m))}return nt(p,o,h.length,t,e),p}function nt(n,t,e,r,s){n.length>0||r===0&&s===0||console.info(`[viewport-pick] click selected nothing (candidates ${t.length}, rayHits ${e}, resolvedIds 0)`)}function st(n,t,e,r=()=>!1,s){return L(n,t,e,r,s)[0]??null}const R={count:0,meshes:0,lights:0,instancedMeshes:0,instances:0};let x=0;function H(n){let t=0,e=0;for(const r of n.values()){const s=r.object;s.isInstancedMesh&&(t++,e+=typeof s.count=="number"?s.count:0)}return{instancedMeshes:t,instances:e}}function F(n){let t=0,e=0;for(const r of n.values()){const s=r.object;s.isLight?e++:s.isMesh&&t++}return{count:n.size,meshes:t,lights:e,...H(n)}}function T(n,t){const e=new Map,r=[],s=t.skip??P;t.begin?.(n);const f=(u,d,i,c)=>{if(s(u))return;const o=t.identify(u,{path:d,ownerId:i,ownedByAncestor:c});o!==null&&(A(u,o),e.set(o,{object:u,id:o,parentId:i,childIds:[]}),i===null?r.push(o):e.get(i)?.childIds.push(o));const h=c||o!==null;u.children.forEach((p,v)=>{f(p,[...d,v],o??i,h)}),t.leave?.(u,o)};return n.children.forEach((u,d)=>{f(u,[d],null,!1)}),{nodes:e,rootIds:r,stats:F(e)}}const it="r3f:";function O(n,t){return`${it}${n}:${t}`}function rt(n){const t=new Map,e=new Map,r=(d,i)=>d===i||d.startsWith(`${i}#`)&&/^\d+$/u.test(d.slice(i.length+1)),s=d=>{e.clear();const i=c=>{if(P(c))return;const o=E(c),h=$(c);if(o!==void 0&&h!==void 0){const p=O(n,o);r(h,p)&&!e.has(h)&&e.set(h,c)}for(const p of c.children)i(p)};for(const c of d.children)i(c)},f=(d,i)=>{const c=$(d);if(c===void 0||i===void 0)return c;const o=O(n,i);return r(c,o)?e.get(c)===d?c:void 0:c},u=(d,i)=>{const c=O(n,i);let o=t.get(i)??0,h=S(c,o);for(;e.has(h);)o+=1,h=S(c,o);return t.set(i,o+1),e.set(h,d),h};return{begin:d=>{t.clear(),s(d)},identify:(d,i)=>{const c=E(d),o=f(d,c);if(o!==void 0)return o;const h=c===void 0?void 0:u(d,c);return h!==void 0||!i.ownedByAncestor||k(d,"authoringRoot")===!0?h??`live:${n}:${x++}`:null}}}function N(n,t){return T(n,rt(t))}function pt(n,t){const{nodes:e}=N(n,t),r=new Map;for(const[s,f]of e)r.set(s,f.object);return r}function yt(n,t={}){const e=t.camera;return{incremental:{kind:"live-oid",worldId:n},project:r=>{const s=N(r,n);return!e||[...s.nodes.values()].some(f=>f.object===e)?s:(A(e,M),s.nodes.set(M,{object:e,id:M,parentId:null,childIds:[]}),s.rootIds.push(M),{...s,stats:{...s.stats,count:s.nodes.size}})}}}function gt(n={}){const t=n.camera;return{project:e=>{const r=Y(e,t),s=new Map;for(const[d,i]of r.byId)s.set(i,d);const f=new Map,u=[];for(const[d,i]of r.byId){const c=i.parent,o=(c&&c!==e?s.get(c):void 0)??null,h=i.children.map(p=>s.get(p)).filter(p=>p!==void 0);f.set(d,{object:i,id:d,parentId:o,childIds:h}),o===null&&u.push(d)}return{nodes:f,rootIds:u,stats:{count:r.count,meshes:r.meshes,lights:r.lights,...H(f)}}}}}function It(n){let t=new Map,e=new Map;return{get instanceRoots(){return t},get representatives(){return e},project:r=>{const s=new Map,f=new Map,u=new Map,d=new Set,i=new Map,c=T(r,{identify:(o,h)=>{const p=E(o);if(p===void 0)return O(n,`@${h.path.join(".")}`);const v=s.get(p)??0;return s.set(p,v+1),v===0&&u.set(p,o),d.has(p)||(f.set(p,(f.get(p)??0)+1),d.add(p),i.set(o,p)),S(O(n,p),v)},leave:o=>{const h=i.get(o);h!==void 0&&(d.delete(h),i.delete(o))}});return t=f,e=u,c}}}function mt(n){return{project:t=>T(t,{skip:e=>!!k(e,"editorHelper")||e.isSkeletonHelper===!0,identify:(e,r)=>`source-object:${n}:${r.path.join(".")}`})}}function vt(n){const t=Z(n);return t?t.kind:q(n).length>0?"constraint-owner":X(n)?"reflection-probe":n.isSkinnedMesh?"skinned-mesh":n.isBone?"bone":n.isLight?"light":n.isCamera?"camera":n.type==="Audio"||n.type==="PositionalAudio"||n.type==="AudioListener"?"audio":n.isMesh?"mesh":n.children.length>0?"group":"object"}function ot(n,t){for(let e=n.parent;e!==null;e=e.parent)if(e===t)return!0;return!1}function _(n,t){if(n===t)return!0;for(let e=n.parent;e!==null;e=e.parent)if(e===t)return!0;return!1}class wt{constructor(t,e={}){this.identity=t,this.options=e}nodesById=new Map;objectsById=new Map;idsByObjectIndex=new Map;roots=[];walkStats=R;project(t){if(!t)return this.nodesById=new Map,this.objectsById=new Map,this.idsByObjectIndex=new Map,this.roots=[],this.walkStats=R,this.walkStats;const{nodes:e,rootIds:r,stats:s}=this.identity.project(t);return this.nodesById=e,this.objectsById=new Map([...e].map(([f,u])=>[f,u.object])),this.idsByObjectIndex=new Map([...e].map(([f,u])=>[u.object,f])),this.roots=r,this.walkStats=s,s}projectSubtrees(t,e){const r=this.identity.incremental;if(t===null||r?.kind!=="live-oid")return null;const s=e.filter((a,l)=>e.indexOf(a)===l&&!e.some(y=>y!==a&&ot(a,y))),f=this.roots,u=new Set,d=new Set,i=new Set;for(const a of s)a.traverse(l=>{const y=this.idsByObjectIndex.get(l);if(y===void 0)return;const g=this.nodesById.get(y);g?.parentId!==null&&g?.parentId!==void 0&&i.add(g.parentId),u.add(y),this.nodesById.delete(y),this.objectsById.delete(y),this.idsByObjectIndex.delete(l)});const c=P,o=(a,l)=>{const y=this.objectsById.get(a);return y===void 0||y===l},h=(a,l)=>{const y=$(a);if(y!==void 0&&o(y,a))return y;const g=E(a);if(g!==void 0){const w=O(r.worldId,g);let B=0,j=S(w,B);for(;!o(j,a);)j=S(w,++B);return j}if(!l||k(a,"authoringRoot")===!0){let w=`live:${r.worldId}:${x++}`;for(;!o(w,a);)w=`live:${r.worldId}:${x++}`;return w}return null},p=(a,l,y)=>{if(c(a))return;const g=h(a,y);g!==null&&(A(a,g),this.nodesById.set(g,{object:a,id:g,parentId:l,childIds:[]}),this.objectsById.set(g,a),this.idsByObjectIndex.set(a,g),d.add(g),l!==null&&i.add(l));const w=g??l,B=y||g!==null;for(const j of a.children)p(j,w,B)};for(const a of s){if(!_(a,t))continue;let l=a.parent,y=null;for(;l!==null&&l!==t;){const g=this.idsByObjectIndex.get(l);if(g!==void 0){y=g;break}l=l.parent}p(a,y,y!==null)}const v=a=>{const l=[],y=g=>{if(c(g))return;const w=this.idsByObjectIndex.get(g);if(w!==void 0){l.push(w);return}for(const B of g.children)y(B)};for(const g of a.children)y(g);return l};for(const a of i){const l=this.nodesById.get(a);l!==void 0&&l.childIds.splice(0,l.childIds.length,...v(l.object))}for(const a of d){const l=this.nodesById.get(a);l!==void 0&&l.childIds.splice(0,l.childIds.length,...v(l.object))}const b=v(t),I=this.roots.filter(a=>{const l=this.objectsById.get(a);return l!==void 0&&!_(l,t)&&!u.has(a)});this.roots=[...b,...I],this.walkStats=F(this.nodesById);const m=f.length!==this.roots.length||f.some((a,l)=>a!==this.roots[l]);return{removedIds:u,addedIds:d,changedParentIds:i,rootsChanged:m}}get nodes(){return this.nodesById}get objects(){return this.objectsById}get idsByObject(){return this.idsByObjectIndex}get rootIds(){return this.roots}get stats(){return this.walkStats}node(t){return this.nodesById.get(t)??null}rootNodes(){return this.roots.map(t=>this.nodesById.get(t)).filter(t=>t!==void 0)}objectOf(t){return this.objectsById.get(t)??null}idOf(t){return this.idsByObjectIndex.get(t)??null}childIdsOf(t){const e=[];for(const r of t){const s=this.idsByObjectIndex.get(r);s!==void 0&&e.push(s)}return e}objectMapSnapshot(){return new Map(this.objectsById)}pick(t,e,r,s){return st(t,e,r,s,this.pickProjection())}candidates(t,e,r,s){return L(t,e,r,s,this.pickProjection())}pickProjection(){if(this.options.pickScope!=="store-object-map")return{objects:this.objectsById.values(),idForObject3D:t=>this.idOf(t)}}}export{wt as T,yt as a,gt as b,It as c,mt as d,q as e,ht as f,vt as n,Z as o,X as r,pt as s};
1
+ import{isInEditorOwnedSubtree as V,isEditorOwnedObject as P}from"./editor-layers-D-CTUqco.js";import{g as k}from"./user-data-C84W0V47.js";import{b as E,c as S}from"./component-instance-root-DLI40MiB.js";import{n as K,e as $,s as A}from"./entity-object-MKYemTFM.js";import{s as W}from"./viewport-editor-controls-BYaAZ_Ku.js";import{fd as z,e6 as G,B as U}from"./three.core-3arARmh6.js";function q(n){const t=k(n,"constraints");return Array.isArray(t)?t.filter(e=>!!e&&typeof e=="object"&&typeof e.getSnapshot=="function"&&!!e.config):[]}const M="ingest:camera",J=1<<31;function Q(n){return(n.layers.mask&J)!==0}function Y(n,t){const e=new Map;let r=0,s=0,f=0;const u=(i,c)=>{const o=`ingest:${c}:${i.type}:${i.name||""}`;e.set(o,i),r++,i.isLight?f++:i.isMesh&&s++,d(i,c)},d=(i,c)=>{let o=0;for(const h of i.children)Q(h)||(u(h,c?`${c}/${o}`:`${o}`),o++)};return d(n,""),t&&(e.set(M,t),r++),{byId:e,count:r,meshes:s,lights:f}}function Z(n){const t=k(n,"authoringSubject");return t&&typeof t.label=="string"&&typeof t.kind=="string"?t:null}function X(n){const t=k(n,"reflectionProbe");if(!t||typeof t!="object")return null;const e=t;return e.config&&typeof e.recapture=="function"&&typeof e.getSnapshot=="function"?t:null}let D=null;function ht(n){D=n,W(n?.editorControls??null)}function tt(){return D}function C(n){return n.depthWrite===!1&&n.side===U}function et(n){const t=n.material;return t?Array.isArray(t)?t.length>0&&t.every(C):C(t):!1}function L(n,t,e,r=()=>!1,s){const f=tt();if(!f)return[];const u=f.canvas.getBoundingClientRect();if(u.width<=0||u.height<=0||!Number.isFinite(t)||!Number.isFinite(e)||t<u.left||e<u.top||t>=u.left+u.width||e>=u.top+u.height)return[];const d=new z((t-u.left)/u.width*2-1,-((e-u.top)/u.height)*2+1),i=new G;i.layers.enableAll(),i.setFromCamera(d,f.camera);const c=new Set(s?.objects??n.objectMap.values()),o=[...c].filter(b=>{for(let I=b.parent;I;I=I.parent)if(c.has(I))return!1;return!0});for(const b of o)b.traverse(I=>{const m=I;m.isSkinnedMesh&&(m.boundingBox=null,m.boundingSphere=null)});const h=i.intersectObjects(o,!0),p=[],v=new Set;for(const b of h){if(V(b.object)||et(b.object))continue;let I=b.object,m=null;if(s)for(;I&&m===null;)m=s.idForObject3D(I),I=I.parent;else{const a=K(I);m=a?$(a)??null:null}m!==null&&!r(m)&&!v.has(m)&&(v.add(m),p.push(m))}return nt(p,o,h.length,t,e),p}function nt(n,t,e,r,s){n.length>0||r===0&&s===0||console.info(`[viewport-pick] click selected nothing (candidates ${t.length}, rayHits ${e}, resolvedIds 0)`)}function st(n,t,e,r=()=>!1,s){return L(n,t,e,r,s)[0]??null}const R={count:0,meshes:0,lights:0,instancedMeshes:0,instances:0};let x=0;function H(n){let t=0,e=0;for(const r of n.values()){const s=r.object;s.isInstancedMesh&&(t++,e+=typeof s.count=="number"?s.count:0)}return{instancedMeshes:t,instances:e}}function F(n){let t=0,e=0;for(const r of n.values()){const s=r.object;s.isLight?e++:s.isMesh&&t++}return{count:n.size,meshes:t,lights:e,...H(n)}}function T(n,t){const e=new Map,r=[],s=t.skip??P;t.begin?.(n);const f=(u,d,i,c)=>{if(s(u))return;const o=t.identify(u,{path:d,ownerId:i,ownedByAncestor:c});o!==null&&(A(u,o),e.set(o,{object:u,id:o,parentId:i,childIds:[]}),i===null?r.push(o):e.get(i)?.childIds.push(o));const h=c||o!==null;u.children.forEach((p,v)=>{f(p,[...d,v],o??i,h)}),t.leave?.(u,o)};return n.children.forEach((u,d)=>{f(u,[d],null,!1)}),{nodes:e,rootIds:r,stats:F(e)}}const it="r3f:";function O(n,t){return`${it}${n}:${t}`}function rt(n){const t=new Map,e=new Map,r=(d,i)=>d===i||d.startsWith(`${i}#`)&&/^\d+$/u.test(d.slice(i.length+1)),s=d=>{e.clear();const i=c=>{if(P(c))return;const o=E(c),h=$(c);if(o!==void 0&&h!==void 0){const p=O(n,o);r(h,p)&&!e.has(h)&&e.set(h,c)}for(const p of c.children)i(p)};for(const c of d.children)i(c)},f=(d,i)=>{const c=$(d);if(c===void 0||i===void 0)return c;const o=O(n,i);return r(c,o)?e.get(c)===d?c:void 0:c},u=(d,i)=>{const c=O(n,i);let o=t.get(i)??0,h=S(c,o);for(;e.has(h);)o+=1,h=S(c,o);return t.set(i,o+1),e.set(h,d),h};return{begin:d=>{t.clear(),s(d)},identify:(d,i)=>{const c=E(d),o=f(d,c);if(o!==void 0)return o;const h=c===void 0?void 0:u(d,c);return h!==void 0||!i.ownedByAncestor||k(d,"authoringRoot")===!0?h??`live:${n}:${x++}`:null}}}function N(n,t){return T(n,rt(t))}function pt(n,t){const{nodes:e}=N(n,t),r=new Map;for(const[s,f]of e)r.set(s,f.object);return r}function yt(n,t={}){const e=t.camera;return{incremental:{kind:"live-oid",worldId:n},project:r=>{const s=N(r,n);return!e||[...s.nodes.values()].some(f=>f.object===e)?s:(A(e,M),s.nodes.set(M,{object:e,id:M,parentId:null,childIds:[]}),s.rootIds.push(M),{...s,stats:{...s.stats,count:s.nodes.size}})}}}function gt(n={}){const t=n.camera;return{project:e=>{const r=Y(e,t),s=new Map;for(const[d,i]of r.byId)s.set(i,d);const f=new Map,u=[];for(const[d,i]of r.byId){const c=i.parent,o=(c&&c!==e?s.get(c):void 0)??null,h=i.children.map(p=>s.get(p)).filter(p=>p!==void 0);f.set(d,{object:i,id:d,parentId:o,childIds:h}),o===null&&u.push(d)}return{nodes:f,rootIds:u,stats:{count:r.count,meshes:r.meshes,lights:r.lights,...H(f)}}}}}function It(n){let t=new Map,e=new Map;return{get instanceRoots(){return t},get representatives(){return e},project:r=>{const s=new Map,f=new Map,u=new Map,d=new Set,i=new Map,c=T(r,{identify:(o,h)=>{const p=E(o);if(p===void 0)return O(n,`@${h.path.join(".")}`);const v=s.get(p)??0;return s.set(p,v+1),v===0&&u.set(p,o),d.has(p)||(f.set(p,(f.get(p)??0)+1),d.add(p),i.set(o,p)),S(O(n,p),v)},leave:o=>{const h=i.get(o);h!==void 0&&(d.delete(h),i.delete(o))}});return t=f,e=u,c}}}function mt(n){return{project:t=>T(t,{skip:e=>!!k(e,"editorHelper")||e.isSkeletonHelper===!0,identify:(e,r)=>`source-object:${n}:${r.path.join(".")}`})}}function vt(n){const t=Z(n);return t?t.kind:q(n).length>0?"constraint-owner":X(n)?"reflection-probe":n.isSkinnedMesh?"skinned-mesh":n.isBone?"bone":n.isLight?"light":n.isCamera?"camera":n.type==="Audio"||n.type==="PositionalAudio"||n.type==="AudioListener"?"audio":n.isMesh?"mesh":n.children.length>0?"group":"object"}function ot(n,t){for(let e=n.parent;e!==null;e=e.parent)if(e===t)return!0;return!1}function _(n,t){if(n===t)return!0;for(let e=n.parent;e!==null;e=e.parent)if(e===t)return!0;return!1}class wt{constructor(t,e={}){this.identity=t,this.options=e}nodesById=new Map;objectsById=new Map;idsByObjectIndex=new Map;roots=[];walkStats=R;project(t){if(!t)return this.nodesById=new Map,this.objectsById=new Map,this.idsByObjectIndex=new Map,this.roots=[],this.walkStats=R,this.walkStats;const{nodes:e,rootIds:r,stats:s}=this.identity.project(t);return this.nodesById=e,this.objectsById=new Map([...e].map(([f,u])=>[f,u.object])),this.idsByObjectIndex=new Map([...e].map(([f,u])=>[u.object,f])),this.roots=r,this.walkStats=s,s}projectSubtrees(t,e){const r=this.identity.incremental;if(t===null||r?.kind!=="live-oid")return null;const s=e.filter((a,l)=>e.indexOf(a)===l&&!e.some(y=>y!==a&&ot(a,y))),f=this.roots,u=new Set,d=new Set,i=new Set;for(const a of s)a.traverse(l=>{const y=this.idsByObjectIndex.get(l);if(y===void 0)return;const g=this.nodesById.get(y);g?.parentId!==null&&g?.parentId!==void 0&&i.add(g.parentId),u.add(y),this.nodesById.delete(y),this.objectsById.delete(y),this.idsByObjectIndex.delete(l)});const c=P,o=(a,l)=>{const y=this.objectsById.get(a);return y===void 0||y===l},h=(a,l)=>{const y=$(a);if(y!==void 0&&o(y,a))return y;const g=E(a);if(g!==void 0){const w=O(r.worldId,g);let B=0,j=S(w,B);for(;!o(j,a);)j=S(w,++B);return j}if(!l||k(a,"authoringRoot")===!0){let w=`live:${r.worldId}:${x++}`;for(;!o(w,a);)w=`live:${r.worldId}:${x++}`;return w}return null},p=(a,l,y)=>{if(c(a))return;const g=h(a,y);g!==null&&(A(a,g),this.nodesById.set(g,{object:a,id:g,parentId:l,childIds:[]}),this.objectsById.set(g,a),this.idsByObjectIndex.set(a,g),d.add(g),l!==null&&i.add(l));const w=g??l,B=y||g!==null;for(const j of a.children)p(j,w,B)};for(const a of s){if(!_(a,t))continue;let l=a.parent,y=null;for(;l!==null&&l!==t;){const g=this.idsByObjectIndex.get(l);if(g!==void 0){y=g;break}l=l.parent}p(a,y,y!==null)}const v=a=>{const l=[],y=g=>{if(c(g))return;const w=this.idsByObjectIndex.get(g);if(w!==void 0){l.push(w);return}for(const B of g.children)y(B)};for(const g of a.children)y(g);return l};for(const a of i){const l=this.nodesById.get(a);l!==void 0&&l.childIds.splice(0,l.childIds.length,...v(l.object))}for(const a of d){const l=this.nodesById.get(a);l!==void 0&&l.childIds.splice(0,l.childIds.length,...v(l.object))}const b=v(t),I=this.roots.filter(a=>{const l=this.objectsById.get(a);return l!==void 0&&!_(l,t)&&!u.has(a)});this.roots=[...b,...I],this.walkStats=F(this.nodesById);const m=f.length!==this.roots.length||f.some((a,l)=>a!==this.roots[l]);return{removedIds:u,addedIds:d,changedParentIds:i,rootsChanged:m}}get nodes(){return this.nodesById}get objects(){return this.objectsById}get idsByObject(){return this.idsByObjectIndex}get rootIds(){return this.roots}get stats(){return this.walkStats}node(t){return this.nodesById.get(t)??null}rootNodes(){return this.roots.map(t=>this.nodesById.get(t)).filter(t=>t!==void 0)}objectOf(t){return this.objectsById.get(t)??null}idOf(t){return this.idsByObjectIndex.get(t)??null}childIdsOf(t){const e=[];for(const r of t){const s=this.idsByObjectIndex.get(r);s!==void 0&&e.push(s)}return e}objectMapSnapshot(){return new Map(this.objectsById)}pick(t,e,r,s){return st(t,e,r,s,this.pickProjection())}candidates(t,e,r,s){return L(t,e,r,s,this.pickProjection())}pickProjection(){if(this.options.pickScope!=="store-object-map")return{objects:this.objectsById.values(),idForObject3D:t=>this.idOf(t)}}}export{wt as T,yt as a,gt as b,It as c,mt as d,q as e,ht as f,vt as n,Z as o,X as r,pt as s};
@@ -0,0 +1 @@
1
+ import{d6 as k,ec as _,O as v,as as A,aw as X,e7 as O,gz as W,gA as R,q as P,bm as U,gB as G,ah as N,bn as L,bk as Q,bl as Y,k as Z,bo as q}from"./index-C5ZAyrKq.js";import{a as ee,o as te,b as C}from"./component-instance-root-DLI40MiB.js";import{c as re,p as x,m as se,a as oe}from"./source-persistence-backend-au3WtEn6.js";import{J as ie,c as ne}from"./json-history-resource-Uqrihfc8.js";import{r as f,d as ae,a as ce}from"./ingest-source-persistence-6ShMoSCa.js";import{r as le}from"./three-projection-core-B7Lf8tOp.js";import{a as D,T as he,n as ue,b as de}from"./three-DiL6vMXq.js";import{isEditorOwnedObject as T}from"./editor-layers-D-CTUqco.js";import{bodyOwningNode as F}from"./body-marks-C1LxJtQb.js";import{colorMaterialOf as y}from"./structural-ids-BOo2BRoY.js";import{object3DAuthoringSubjectOf as H}from"./object3d-authoring-subject-XccsO0xG.js";import{createRapierBodyEditing as fe}from"./rapier-physics-adapter-CaZqWLu0.js";import{getUserData as m}from"./user-data-CODoGZqA.js";import{b as me,c as pe}from"./r3f-physics-binding-Cx8yhuwt.js";const be={position:{owner:"self",member:"position",kind:"vector3"},rotation:{owner:"self",member:"rotation",kind:"euler"},scale:{owner:"self",member:"scale",kind:"vector3"},visible:{owner:"self",member:"visible",kind:"boolean"},name:{owner:"self",member:"name",kind:"string"},"material.color":{owner:"material",member:"color",kind:"color"},"light.color":{owner:"self",member:"color",kind:"color"},"light.intensity":{owner:"self",member:"intensity",kind:"number"},"light.distance":{owner:"self",member:"distance",kind:"number"},"camera.fov":{owner:"self",member:"fov",kind:"number"},"camera.near":{owner:"self",member:"near",kind:"number"},"camera.far":{owner:"self",member:"far",kind:"number"},"shadow.cast":{owner:"self",member:"castShadow",kind:"boolean"},"shadow.receive":{owner:"self",member:"receiveShadow",kind:"boolean"}},ye={position:{owner:"self",member:"position",kind:"vector2",componentMembers:["x","y"]},rotation:{owner:"self",member:"rotation",kind:"number"},scale:{owner:"self",member:"scale",kind:"vector2"},visible:{owner:"self",member:"visible",kind:"boolean"},name:{owner:"self",member:"label",kind:"string"},alpha:{owner:"self",member:"alpha",kind:"number"},tint:{owner:"self",member:"tint",kind:"color"}},ge={position:{owner:"self",member:"position",kind:"vector3"},rotation:{owner:"self",member:"rotation",kind:"euler"},scale:{owner:"self",member:"scaling",kind:"vector3"},name:{owner:"self",member:"name",kind:"string"},visible:{owner:"self",member:"isVisible",kind:"boolean"},visibility:{owner:"self",member:"visibility",kind:"number"}};function J(l,t="three"){return(t==="pixi"?ye:t==="babylon"?ge:be)[l]??null}const K="the game's own JSX source (source-stamp write-back)",S={position:"position",rotation:"rotation",scale:"scale",visible:"visible",name:"name","material.color":"color","light.color":"color","light.intensity":"intensity","light.distance":"distance","camera.fov":"fov","camera.near":"near","camera.far":"far","shadow.cast":"castShadow","shadow.receive":"receiveShadow"};function M(l){const t=Math.round(l*1e4)/1e4;return Object.is(t,-0)?"0":String(t)}function V(l,t){const e=J(l)?.kind;return e==="vector3"||e==="euler"?!Array.isArray(t)||t.length!==3||!t.every(r=>typeof r=="number"&&Number.isFinite(r))?null:`[${t.map(M).join(", ")}]`:e==="number"?typeof t=="number"&&Number.isFinite(t)?M(t):null:e==="boolean"?typeof t=="boolean"?String(t):null:(e==="color"||e==="string")&&typeof t=="string"?t.replace(/["\\]/g,""):null}function z(l,t){const e=me(l??void 0,t);if(e)return e;const r=l?.r3fAuthoring;if(!r||t!=="position"&&t!=="rotation"&&t!=="scale")return null;const s=`<${l?.tag??"this component"}>`;return r.simulationOwnedTransform===!0?`${s} drives its own ${t} every frame — this instance is placed by the simulation, not by the editor`:r.transformProps.includes(t)?null:`${s} does not forward ${t} to its native root`}function I(l){const t=l.file.replaceAll("\\","/"),e=X()?.rootPath.replaceAll("\\","/").replace(/\/$/,""),r=e&&t.startsWith(`${e}/`)?t.slice(e.length+1):t;return{anchored:!0,kind:"source",file:r,line:l.line,col:l.col,display:`${r}:${l.line}`}}async function De(l){try{const e=await(l??k("Live source locations"))?.index?.();return r=>{const s=e?.[r];return s?I(s):null}}catch{return()=>null}}async function ve(l,t,e){const r=l.writeProp;if(!r)throw new Error("the gesture-scoped source writer cannot write JSX props");let s=0;for(const{property:o,text:i}of e){const a=await r(t,o,i,{addIfMissing:!0,allowShapeUpgrade:!0});if(a.dynamic)throw new Error(`${o} is bound to a JSX expression, not an authored literal`);if(!a.changed&&a.error)throw new Error(a.error);a.changed&&s++}return s}function we(l){const t=l.backend??k("The Play→source transform committer"),e=_(t,l.history),r=o=>o?!e?.runGesture||!e.writeProp||!e.index?{available:!1,reason:"This editor session cannot open a checksum-guarded project-source gesture."}:{available:!0}:{available:!1,reason:"This live node has no OID source stamp, so no authored literal owns its pose."},s=o=>(v.warn(`[play] Commit live transform to source refused: ${o}`,"play-mode"),{destination:A,persisted:!1});return{availability:r,async commit(o,i){const a=r(o);if(!a.available||!o||!e?.runGesture||!e.index)return s(a.reason??"the source writer is unavailable");const c=(await e.index())[o]??null;if(!c)return s(`the current source index has no entry for OID "${o}"`);const h=["position","rotation","scale"].map(d=>{const j=z(c,d);if(j)throw new Error(j);const w=i[d],$=w===void 0?null:V(d,w);if($===null)throw new Error(`${d} is not a finite transform literal`);return{property:d,text:$}});let u;try{u=await e.runGesture("Commit Play Transform to Source",d=>ve(d,o,h))}catch(d){return s(d instanceof Error?d.message:String(d))}return u===0?(v.log("[play] Source already matches the selected live transform.","play-mode"),{destination:"source already matched the live transform",persisted:!1}):(v.log(`[play] Committed ${u} live transform literal(s) to ${c.file}:${c.line}.`,"play-mode"),{destination:K,persisted:!0})}}}function Se(l){let t=null,e=new Map,r=!1;const s=async()=>{const n=t?.index;if(n)try{e=new Map(Object.entries(await n.call(t))),r=!0}catch{}},o=n=>n?e.get(n)??null:null,i=n=>{const c=o(n);return c?I(c).display:null},a=(n,c)=>{if(!n)return{ok:!1,reason:"this object carries no source stamp — the game built it at runtime rather than writing it as an element of its own source"};if(!t?.writeProp)return{ok:!1,reason:"this editor tier cannot write project source"};const h=S[c];if(!h)return{ok:!1,reason:`${c} has no JSX attribute this seam can write`};const u=z(o(n),h);if(u)return{ok:!1,reason:u};if(!O()){const d=i(n);return{ok:!1,reason:`${d?`written at ${d}`:"source-stamped"}, but this game is playing — hold it to author`}}return{ok:!0}};return{attach(){const n=l.backend??k("This world’s OID source persistence")??null;t=n?_(n,l.history)??n:null,s()},anchor(n){const c=e.get(n);return c?I(c):null},physicsPlaced(n,c){return pe(o(n)??void 0,S[c]??c)},describe({sourceOid:n,property:c}){const h=a(n,c);if(!h.ok)return`Live-only edit — ${h.reason}.`;const u=i(n);return u?`Persisting to ${u}.`:`Persisting to this element's own JSX${r?"":" (source index still loading)"}.`},gate({sourceOid:n,property:c}){return a(n,c)},armed:()=>t?.writeProp!==void 0&&O(),report:(n,c)=>f(n,c),async write(n){const c=a(n.sourceOid,n.property);if(!c.ok)return f(n.label,c.reason),!1;const h=S[n.property],u=V(n.property,n.next);if(u===null)return f(n.label,`the new ${n.property} is not a value this seam can spell as a JSX literal`),!1;try{const d=await t.writeProp(n.sourceOid,h,u,{addIfMissing:!0,allowShapeUpgrade:!0});return d.dynamic?(f(n.label,`${h} at ${i(n.sourceOid)??"this element"} is bound to a JSX expression, not a literal`),!1):d.changed?(v.log(`[ingest] ${n.label} written to the game's own source — ${h} → ${i(n.sourceOid)??n.sourceOid}`),s(),!0):(f(n.label,d.error??"the source writer made no change"),!1)}catch(d){return f(n.label,`the write failed: ${d instanceof Error?d.message:String(d)}`),!1}},removal:{available({sourceOid:n,property:c}){return t?.removeProp?a(n,c).ok:!1},async perform(n){const c=a(n.sourceOid,n.property);if(!c.ok||!t?.removeProp)return f(n.label,c.ok?"this editor tier cannot remove project source":c.reason),!1;const h=S[n.property];try{const u=await t.removeProp(n.sourceOid,h);return u.dynamic?(f(n.label,`${h} at ${i(n.sourceOid)??"this element"} is bound to a JSX expression — removing it would delete the game's own wiring, not an override`),!1):u.changed?(v.log(`[ingest] ${n.label} — ${h} dropped from the game's own source at ${i(n.sourceOid)??n.sourceOid}`),s(),!0):(f(n.label,u.error??`${i(n.sourceOid)??"this element"} authors no ${h} attribute, so there was nothing to drop`),!1)}catch(u){return f(n.label,`the removal failed: ${u instanceof Error?u.message:String(u)}`),!1}}},destination(){return t?.writeProp&&O()?K:A},dispose(){t=null,e=new Map,r=!1}}}const je={source:"live",label:"live",detail:"Running objects adopted from the live scene. Edits affect this session only and are discarded when play stops."},Oe="Applied to the running world; code that drives this transform each frame may overwrite it.",Ce={source:"foreign",label:"live-only",detail:"Unmodified ingested game — edits apply to the running game for this session only and are never saved."},Ie={source:"foreign",label:"game source",detail:"Ingested game whose own source carries the editor's authoring stamps — a literal JSX prop writes back to the game’s own file (expression-bound props stay read-only)."};function p(l){return l.isLight?l:null}function g(l){const t=l;return t.isPointLight||t.isSpotLight?t:null}function ke(l){const t=l;return t.isDirectionalLight||t.isPointLight||t.isSpotLight?t:null}function b(l){const t=l;return t.isPerspectiveCamera?t:null}function B(l){const t=l;return t.isMesh&&t.geometry?t.geometry:null}class E{constructor(t,e,r){if(this.store=t,this.options=r,this.sceneRef=e,this.identity=r.identity,this.projector=new he(this.identity,{pickScope:"projection"}),this.persist=r.persistence??null,this.loop=r.loop,this.frameControl=r.frameControl??"adapter",this.provenance=r.provenance??je,r.sourceCommit){const i={availability:a=>r.sourceCommit.availability(C(this.objectOf(a))),commit:async a=>{const n=this.objectOf(a),c=this.captureChannelBaseline(a)??{},h=await r.sourceCommit.commit(C(n),c);return h.persisted&&this.store.shell.notifyIngestEdit(),h}};Object.assign(this.transforms,{sourceCommit:i})}r.sourceDeclaresStories&&(this.stories=W("three",t.shell,i=>{const a=this.hierarchy.node(i);return a?.role!=="component"?null:{name:a.typeLabel??a.label}})),this.refresh(),this.watchStructure();const s=t.shell.projectHistory;this.historyResource=this.persist&&s?new ie({history:s,kind:"session-state",scope:"session",subject:{...r.journal,id:`${r.journal.id}/live-three-edits`},displayName:"Live edits",capture:()=>this.captureHistoryState(),conflictIdentity:i=>i.edits,restore:async i=>{this.restoreHistoryState(i)}}):null;const o=this.persist;o&&(o.attach({read:(i,a)=>this.readChannel(i,a),apply:(i,a,n)=>this.applyChannel(i,a,n)}),this.persistence={...ne(),get destination(){return o.destination()}},o.readSiteLiterals&&(this.instances=this.creationSiteInstances(o)))}sceneRef;projector;watchedForStructure=new Set;changedStructureRoots=new Set;structureRefreshQueued=!1;disposed=!1;crossSurfaceStructureRevision=0;hasCrossSurfaceStructure=!1;identity;persist;loop;frameControl;instanceLiterals=new Map;instanceLiteralRequests=new Map;markedBodies=fe(t=>{const e=this.objectOf(t);if(!e)return{kind:"unresolved"};const r=F(e);return r?{kind:"body",body:r}:{kind:"no-body"}});bodyOwnershipByObject=new WeakMap;physicsFor(t){const e=R();return e&&P(e,t)!=="unresolved"?e:null}edits={};historyResource;editStartState;editBaseline;capabilities={transform:!0,inspectorFields:!0,persist:!1};stories;instances;provenance;persistence;get scene(){return typeof this.sceneRef=="function"?this.sceneRef():this.sceneRef}refresh(){const t=this.projector.project(this.scene);return this.refreshCrossSurfacePresence(),this.crossSurfaceStructureRevision++,t}crossSurfaceStructureSignature(){return this.hasCrossSurfaceStructure?String(this.crossSurfaceStructureRevision):null}objectCarriesCrossSurfaceStructure(t){return m(t,"authoringHierarchyId")!==void 0||m(t,"authoringHierarchyParentId")!==void 0||m(t,"authoringHierarchyOrder")!==void 0}subtreeCarriesCrossSurfaceStructure(t){let e=!1;return t.traverse(r=>{this.objectCarriesCrossSurfaceStructure(r)&&(e=!0)}),e}refreshCrossSurfacePresence(){this.hasCrossSurfaceStructure=!1;for(const t of this.projector.nodes.values())if(this.objectCarriesCrossSurfaceStructure(t.object)){this.hasCrossSurfaceStructure=!0;return}}onStructureChanged=t=>{T(t.child)||this.disposed||(this.changedStructureRoots.add(t.child),!this.structureRefreshQueued&&(this.structureRefreshQueued=!0,queueMicrotask(()=>{if(this.structureRefreshQueued=!1,this.disposed)return;const e=[...this.changedStructureRoots];this.changedStructureRoots.clear();const r=e.some(o=>this.subtreeCarriesCrossSurfaceStructure(o));for(const o of e)this.unwatchStructureSubtree(o);const s=this.projector.projectSubtrees(this.scene,e);if(s===null)this.refresh(),this.watchStructure();else for(const o of e)this.structureRootIsAttached(o)&&this.watchStructureSubtree(o);r&&(this.refreshCrossSurfacePresence(),this.crossSurfaceStructureRevision++),this.syncAdoptedObjectMap(s??void 0),this.store.notifyIngestObjectMapEdit(s===null?void 0:{changedParentIds:s.changedParentIds,rootsChanged:s.rootsChanged,addedIds:s.addedIds,removedIds:s.removedIds})})))};watchStructure(){for(const e of this.watchedForStructure)e.removeEventListener("childadded",this.onStructureChanged),e.removeEventListener("childremoved",this.onStructureChanged);this.watchedForStructure.clear();const t=this.scene;t&&this.watchStructureSubtree(t)}watchStructureSubtree(t){const e=r=>{if(!(T(r)||this.watchedForStructure.has(r))){r.addEventListener("childadded",this.onStructureChanged),r.addEventListener("childremoved",this.onStructureChanged),this.watchedForStructure.add(r);for(const s of r.children)e(s)}};e(t)}structureRootIsAttached(t){const e=this.scene;if(e===null)return!1;for(let r=t;r!==null;r=r.parent)if(r===e)return!0;return!1}unwatchStructureSubtree(t){t.traverse(e=>{this.watchedForStructure.delete(e)&&(e.removeEventListener("childadded",this.onStructureChanged),e.removeEventListener("childremoved",this.onStructureChanged))})}syncAdoptedObjectMap(t){const e=this.scene;if(!e||this.store.scene!==e)return;const r=this.store.objectMap;if(t===void 0){r.clear();for(const[o,i]of this.projector.objectMapSnapshot())r.set(o,i)}else{for(const o of t.removedIds)r.delete(o);for(const o of t.addedIds){const i=this.projector.objectOf(o);i!==null&&r.set(o,i)}}const s=[...this.store.shell.selectedEntityIds].filter(o=>r.has(o));s.length!==this.store.shell.selectedEntityIds.size&&this.store.shell.selectMultiple(s)}invalidate(){this.refresh()}adoptScene(t){this.sceneRef=t,this.refresh(),this.watchStructure(),this.syncAdoptedObjectMap()}objectOf(t){return this.projector.objectOf(t)}objectMapSnapshot(){return this.projector.objectMapSnapshot()}record(t,e){this.edits[t]={...this.edits[t],...e}}toEditorNode(t){const e=t.object,r=m(e,"authoringHierarchyId"),s=m(e,"authoringHierarchyParentId"),o=m(e,"authoringHierarchyOrder"),i=ee(e)&&m(e,"authoringRoot")!==!0,a=m(e,"authoringComponent"),n=(i?m(e,"authoringLabel"):void 0)||e.name||e.type;return{id:t.id,label:n,role:i?"component":"entity",kind:ue(e),typeLabel:i?a||n:e.type,parentId:t.parentId,childIds:[...t.childIds],...r===void 0?{}:{crossSurfaceId:r},...s===void 0?{}:{crossSurfaceParentId:s},...o===void 0?{}:{crossSurfaceOrder:o}}}hierarchy={crossSurfaceStructureSignature:()=>this.crossSurfaceStructureSignature(),roots:()=>this.projector.rootNodes().map(t=>this.toEditorNode(t)),node:t=>{const e=this.projector.node(t);return e?this.toEditorNode(e):null},object3D:t=>this.objectOf(t),idForObject3D:t=>this.projector.idOf(t)};selection={get:()=>[...this.store.shell.selectedEntityIds],set:t=>this.store.shell.selectMultiple(t),resolve:(t,e)=>{const r=this.hierarchy.node(t);if(!r)return null;const s=[];let o=r,i=0;for(;o&&i++<1e3;)(o.role==="component"||o.role==="instance")&&s.push(o),o=o.parentId?this.hierarchy.node(o.parentId):null;const a=s.reverse();if(a.length===0)return{id:t};const n=e?.scopeId?a.findIndex(u=>u.id===e.scopeId):-1,c=n>=0?Math.min(n+1,a.length-1):0,h=e?.intent==="deep"?Math.min(c+1,a.length-1):c;return{id:a[h].id}}};pickable={pick:(t,e)=>(this.refresh(),this.projector.pick(this.store,t,e)),candidates:(t,e)=>(this.refresh(),this.projector.candidates(this.store,t,e))};truth={resolve:(t,e)=>{const r=this.anchorFor(t,e);return{site:r.anchor,writeAnchorKind:r.anchorKind}}};related=re(t=>this.truth.resolve(t,"position").site);transforms={get:t=>le(this.objectOf(t)),editability:(t,e)=>{if(!this.objectOf(t))return{writable:!1,reason:G};const r=N();return r?.networkId(t)&&!r.editable(t)?{writable:!1,reason:"This transform is controlled by remote or server network authority."}:this.bodyOwns(t)?{writable:!0,reason:"Moves the physics body that owns this node.",...this.removableFlag(t,e)}:this.frameControl==="host"&&this.store.shell.playState==="playing"?{writable:!0,reason:Oe,...this.removableFlag(t,e)}:this.persist?{writable:!0,reason:this.persist.describe(this.anchorFor(t,e)),...this.removableFlag(t,e)}:{writable:!0}},beginEdit:t=>{this.historyResource?.assertCanMutate(),!(!this.objectOf(t)||!this.editableByNetwork(t))&&(this.loop?.pause(),this.physicsFor(t)?.freeze(t),this.markedBodies.freeze(t),this.editStartState=this.persist?this.captureHistoryState():void 0,this.editBaseline=void 0)},apply:(t,e)=>{!this.objectOf(t)||!this.editableByNetwork(t)||(this.persist&&!this.editBaseline&&(this.editBaseline=this.captureChannelBaseline(t)),this.writeTransform(t,e),this.physicsFor(t)?.commit(t,e),this.markedBodies.commit(t,e),this.store.shell.notifyIngestEdit())},endEdit:t=>{this.loop?.resume();const e=this.objectOf(t),r=`Transform ${e?.name||"Object"}`,s=this.editStartState,o=this.editBaseline;return this.editStartState=void 0,this.editBaseline=void 0,e&&(this.physicsFor(t)?.unfreeze(t),this.markedBodies.unfreeze(t),this.store.shell.notifyIngestEdit()),this.persist?this.persistOrJournal(t,r,s,o):void 0},remove:(t,e)=>{if(this.persist?.removal)return U(this.pipedRemove(t,e))}};removableFlag(t,e){const r=this.persist?.removal;return r?r.available(this.anchorFor(t,e))?{removable:!0}:{}:{}}pipedRemove(t,e){const r=this.persist,s=r.removal,o=`Remove ${this.objectOf(t)?.name||"Object"} ${e}`;return{resolve:()=>{const i=this.anchorFor(t,e);return s.available(i)?i.anchorKind==="live-only"?L(r.describe(i)):{reaches:"writer",anchorKind:i.anchorKind,destination:r.destination(),write:()=>s.perform({...i,label:o})}:L(r.describe(i))},record:()=>{},report:i=>{r.armed()&&r.report(o,i)}}}bodyOwns(t){const e=this.objectOf(t);if(!e)return!1;const r=this.bodyOwnershipByObject.get(e);if(r!==void 0)return r;const s=R(),o=s?P(s,t):void 0;if(o==="physics")return this.bodyOwnershipByObject.set(e,!0),!0;const i=F(e)!==void 0;return(i||o==="editor")&&this.bodyOwnershipByObject.set(e,i),i}editableByNetwork(t){const e=N();return e?e.editable(t):!0}inspector={properties:t=>{const e=this.objectOf(t);if(!e)return[];const r=[{path:"name",label:"Name",type:"string"},{path:"visible",label:"Visible",type:"boolean"},{path:"object.type",label:"Native type",type:"string",readonly:!0}],s=H(e);return s?.fields&&r.push(...s.fields().filter(i=>!["name","visible"].includes(i.path)).map(({value:i,...a})=>a)),y(e)&&r.push({path:"material.color",label:"Color",type:"color",group:"Material"}),p(e)&&(r.push({path:"light.intensity",label:"Intensity",type:"number"}),r.push({path:"light.color",label:"Light Color",type:"color"}),g(e)&&r.push({path:"light.distance",label:"Distance",type:"number"}),ke(e)&&r.push({path:"shadow.cast",label:"Cast Shadow",type:"boolean"})),b(e)&&(r.push({path:"camera.fov",label:"FOV",type:"number"}),r.push({path:"camera.near",label:"Near",type:"number"}),r.push({path:"camera.far",label:"Far",type:"number"})),B(e)&&(r.push({path:"mesh.vertices",label:"Vertices",type:"number",readonly:!0}),r.push({path:"shadow.cast",label:"Cast Shadow",type:"boolean"}),r.push({path:"shadow.receive",label:"Receive Shadow",type:"boolean"})),r},get:(t,e)=>{const r=this.objectOf(t);if(!r)return;if(e==="name")return r.name;if(e==="visible")return r.visible;if(e==="object.type")return r.type;const s=H(r)?.fields?.().find(o=>o.path===e);if(s)return s.value();if(e==="material.color"){const o=y(r);return o?`#${o.color.getHexString()}`:void 0}if(e==="light.intensity")return p(r)?.intensity;if(e==="light.distance")return g(r)?.distance;if(e==="light.color"){const o=p(r);return o?`#${o.color.getHexString()}`:void 0}if(e==="camera.fov")return b(r)?.fov;if(e==="camera.near")return b(r)?.near;if(e==="camera.far")return b(r)?.far;if(e==="mesh.vertices"){const o=B(r);return o?o.getAttribute("position")?.count??0:void 0}if(e==="shadow.cast")return r.castShadow;if(e==="shadow.receive")return r.receiveShadow},set:(t,e,r)=>{if(this.historyResource?.assertCanMutate(),!this.persist){this.writeProp(t,e,r);return}const s=this.captureHistoryState(),o=this.readChannel(t,e);this.writeProp(t,e,r);const i=`Set ${this.objectOf(t)?.name||"Object"} ${e}`,a=this.readChannel(t,e);if(!(o!==void 0&&a!==void 0&&JSON.stringify(o)!==JSON.stringify(a))){this.recordHistory(i,s);return}return x({backend:this.persist,subject:()=>this.anchorFor(t,e),baseline:o,next:a,label:i,journal:()=>this.recordHistory(i,s)})}};subscribe(t){return this.store.shell.subscribe(t)}dispose(){this.disposed=!0;for(const t of this.watchedForStructure)t.removeEventListener("childadded",this.onStructureChanged),t.removeEventListener("childremoved",this.onStructureChanged);this.watchedForStructure.clear(),this.changedStructureRoots.clear(),this.historyResource?.dispose(),this.persist?.dispose()}readChannel(t,e){const r=this.objectOf(t);if(r)return e==="position"?r.position.toArray():e==="rotation"?[r.rotation.x,r.rotation.y,r.rotation.z]:e==="scale"?r.scale.toArray():this.inspector.get(t,e)}applyChannel(t,e,r){const s=this.objectOf(t);if(s){if(e==="position"&&Array.isArray(r))s.position.fromArray(r);else if(e==="rotation"&&Array.isArray(r)){const[o,i,a]=r;s.rotation.set(o??0,i??0,a??0)}else if(e==="scale"&&Array.isArray(r))s.scale.fromArray(r);else{this.writeProp(t,e,r);return}this.store.shell.notifyIngestEdit()}}writeTransform(t,e){this.historyResource?.assertCanMutate();const r=this.objectOf(t);r&&(r.position.set(e.position[0],e.position[1],e.position[2]),r.quaternion.set(e.rotation[0],e.rotation[1],e.rotation[2],e.rotation[3]),r.scale.set(e.scale[0],e.scale[1],e.scale[2]),this.record(t,{position:e.position,rotation:e.rotation,scale:e.scale}))}writeProp(t,e,r){const s=this.objectOf(t);if(s){if(e==="name")s.name=String(r);else if(e==="visible")s.visible=!!r,this.record(t,{visible:s.visible});else if(e==="material.color"){const o=y(s);o&&(o.color.set(String(r)),this.record(t,{color:`#${o.color.getHexString()}`}))}else if(e==="light.intensity"){const o=p(s);o&&(o.intensity=Number(r))}else if(e==="light.distance"){const o=g(s);o&&(o.distance=Number(r))}else if(e==="light.color")p(s)?.color.set(String(r));else if(e==="camera.fov"||e==="camera.near"||e==="camera.far"){const o=b(s);o&&(o[e.split(".")[1]]=Number(r),o.updateProjectionMatrix())}else e==="shadow.cast"?s.castShadow=!!r:e==="shadow.receive"&&(s.receiveShadow=!!r);this.store.shell.notifyIngestEdit()}}anchorFor(t,e){const r=this.objectOf(t),s=J(e),o=r&&s?.owner==="material"?y(r):r,i=s?.owner==="material"?te(o):C(o),a=i?this.persist?.anchor?.(i):null;if(a){const h=i?this.persist?.physicsPlaced?.(i,e):!1;return{entityId:t,property:e,anchor:a,anchorKind:h?"physics-binding":"source-prop",instances:1,sourceOid:i}}const n=ae(o);if(n!==null)return{entityId:t,property:e,anchor:ce(n),anchorKind:"data-record",instances:1,...i?{sourceOid:i}:{}};const c=i?this.options.sourceAnchor?.(i)??{anchored:!1,reason:"The source index has not resolved this object’s OID."}:Q(o??null);return{entityId:t,property:e,anchor:c,anchorKind:i?this.persist?.anchor?"source-prop":"live-only":c.anchored?"construction-literal":"live-only",instances:c.anchored&&c.kind==="source"?i?1:Y(c):0,...i?{sourceOid:i}:{}}}measureWriteReach(){this.refresh();let t=0;const e=Z();for(const r of this.projector.nodes.keys()){const s=this.anchorFor(r,"position");e[s.anchorKind]++,s.anchor.anchored&&t++}return{addressable:t,total:this.projector.nodes.size,destination:this.persist?.destination()??A,byKind:e}}captureChannelBaseline(t){const e=this.objectOf(t);if(e)return{position:e.position.toArray(),rotation:[e.rotation.x,e.rotation.y,e.rotation.z],scale:e.scale.toArray()}}persistOrJournal(t,e,r,s){const o=this.persist;if(!o)return;const i=s?this.captureChannelBaseline(t):void 0,a=s&&i?Object.keys(s).filter(c=>JSON.stringify(s[c])!==JSON.stringify(i[c])):[];a.length>1&&o.report(e,se(a));const n=a.length===1?a[0]:null;if(n===null){this.recordHistory(e,r);return}return x({backend:o,subject:()=>this.anchorFor(t,n),baseline:s[n],next:i[n],label:e,journal:()=>this.recordHistory(e,r)})}creationSiteKey(t){const e=t.anchor;return e.anchored&&e.kind==="source"?`${e.file}:${e.line}:${e.col}`:null}instancePropertyPaths(t,e){const r=["position","rotation","scale",...this.inspector.properties(t).filter(s=>!s.readonly).map(s=>s.path)];return[...new Set(r)].filter(s=>this.creationSiteKey(this.anchorFor(t,s))===e)}loadInstanceLiterals(t,e,r,s){const o=this.instanceLiteralRequests.get(s);if(o)return o;const i=this.instancePropertyPaths(e,s).map(n=>({property:n,live:this.readChannel(e,n)})).filter(n=>n.live!==void 0),a=t.readSiteLiterals({anchor:r.anchor,instances:r.instances,writeScope:"creation-site",properties:i}).then(n=>(this.instanceLiterals.set(s,n),this.store.shell.notifyIngestEdit(),n));return this.instanceLiteralRequests.set(s,a),a}sameInstanceValue(t,e){return Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((r,s)=>this.sameInstanceValue(r,e[s])):typeof t=="number"&&typeof e=="number"?Math.abs(t-e)<=1e-6:t===e}instanceComponentName(t){return t.constructor.name||t.type}instanceCountLabel(t){return`${t} ${t===1?"instance":"instances"}`}instanceOverride(t,e,r,s,o){const i=s[r],a=this.readChannel(e,r);if(!i||i.literal===null||a===void 0||this.sameInstanceValue(i.literal,a))return null;const n=t.gate({...this.anchorFor(e,r),writeScope:"creation-site"}),c=i.writable?n.ok?void 0:n.reason:i.reason,h=this.inspector.properties(e).find(u=>u.path===r)?.label??r;return{path:r,label:h,value:a,...i.text?{defaultText:i.text}:{},canApplyToComponent:c===void 0,...c?{applyUnavailableReason:c}:{},affectedInstanceCount:o.instances}}async applyInstanceDefault(t,e,r,s){const o={...this.anchorFor(r,s),writeScope:"creation-site"},i=this.creationSiteKey(o);if(!i)return{changed:!1,message:"This object has no source site."};const a=this.objectOf(r);if(!a)return{changed:!1,message:"This object is no longer in the live world."};const n=(await e(r,o,i))[s];if(!n)return{changed:!1,message:`The construction site names no ${s}.`};if(n.literal===null)return{changed:!1,message:`The construction site names no ${s} default.`};const c=this.readChannel(r,s);if(c===void 0)return{changed:!1,message:`${s} has no live value.`};if(!n.writable)return{changed:!1,message:n.reason??`${s} cannot be rewritten.`};const h=t.gate(o);if(!h.ok)return{changed:!1,message:h.reason};const u=o.instances,d=`Apply ${s} to ${this.instanceComponentName(a)} default (${this.instanceCountLabel(u)})`;if(!await t.write({...o,baseline:n.literal,next:c,label:d}))return{changed:!1,message:`${d} did not land; the console names why.`};this.instanceLiterals.delete(i),this.instanceLiteralRequests.delete(i),this.store.shell.notifyIngestEdit();const w=o.anchor.anchored?o.anchor.display:"this source site";return{changed:!0,message:`${s} now applies to all ${this.instanceCountLabel(u)} from ${w}.`,write:{destination:w,persisted:!0}}}creationSiteInstances(t){const e=async(r,s,o)=>this.instanceLiterals.get(o)??this.loadInstanceLiterals(t,r,s,o);return{describe:r=>{const s=this.anchorFor(r,"position"),o=this.creationSiteKey(s),i=this.objectOf(r);if(!o||!i)return null;const a=this.instanceLiterals.get(o);if(!a)return this.loadInstanceLiterals(t,r,s,o),null;if(Object.keys(a).length===0)return null;const n=this.instancePropertyPaths(r,o).map(c=>this.instanceOverride(t,r,c,a,s)).filter(c=>c!==null);return{componentName:this.instanceComponentName(i),...s.anchor.anchored?{sourcePath:s.anchor.display}:{},overrides:n}},revert:async(r,s)=>{const o=this.anchorFor(r,"position"),i=this.creationSiteKey(o);if(!i)return;const a=await e(r,o,i),n=this.captureHistoryState();let c=0;for(const h of s){const u=a[h]?.literal;u!=null&&(this.applyChannel(r,h,u),c++)}return c>0&&this.recordHistory(`Revert ${c} instance override(s)`,n),c>0?q:void 0},applyToComponent:(r,s)=>this.applyInstanceDefault(t,e,r,s)}}recordHistory(t,e){!this.historyResource||!e||this.historyResource.record(t,e,this.captureHistoryState()).catch(r=>{v.error(`[ingest] failed to journal "${t}" into project history — the edit is applied but has no history entry (it cannot be undone): ${r instanceof Error?r.message:String(r)}`)})}captureHistoryState(){const t={};for(const[e,r]of this.projector.nodes){const s=r.object,o=y(s),i=p(s),a=b(s);t[e]={name:s.name,visible:s.visible,transform:this.transforms.get(e),...o?{color:`#${o.color.getHexString()}`}:{},...i?{lightIntensity:i.intensity,lightColor:`#${i.color.getHexString()}`,...g(s)?{lightDistance:g(s).distance}:{}}:{},...a?{camera:{fov:a.fov,near:a.near,far:a.far}}:{},castShadow:s.castShadow,receiveShadow:s.receiveShadow}}return{edits:structuredClone(this.edits),objects:t}}restoreHistoryState(t){for(const[e,r]of Object.entries(t.objects)){const s=this.objectOf(e);if(!s)continue;s.name=r.name,s.visible=r.visible,s.position.fromArray(r.transform.position),s.quaternion.fromArray(r.transform.rotation),s.scale.fromArray(r.transform.scale),this.physicsFor(e)?.commit(e,r.transform),this.markedBodies.commit(e,r.transform),r.color&&y(s)?.color.set(r.color);const o=p(s);if(o&&(r.lightIntensity!==void 0&&(o.intensity=r.lightIntensity),r.lightColor&&o.color.set(r.lightColor),r.lightDistance!==void 0)){const a=g(s);a&&(a.distance=r.lightDistance)}const i=b(s);i&&r.camera&&(i.fov=r.camera.fov,i.near=r.camera.near,i.far=r.camera.far,i.updateProjectionMatrix()),s.castShadow=r.castShadow,s.receiveShadow=r.receiveShadow}this.edits=structuredClone(t.edits),this.store.shell.notifyIngestEdit()}}function Je(l,t,e){return new E(l,t,{identity:de({camera:e.camera}),journal:e.journal,persistence:oe({history:l.shell.projectHistory,writer:e.sourceWriter}),loop:e.loop,...e.frameControl?{frameControl:e.frameControl}:{},provenance:Ce})}function Ke(l,t,e){return new E(l,t,{identity:D(e.worldId,{camera:e.camera}),journal:e.journal,persistence:Se({history:l.shell.projectHistory,backend:e.backend}),loop:e.loop,...e.frameControl?{frameControl:e.frameControl}:{},provenance:Ie,sourceDeclaresStories:!0})}function Ve(l,t,e,r,s={}){return new E(l,t,{identity:D(e),journal:r,frameControl:"host",sourceAnchor:s.sourceAnchor,...s.explicitSourceCommit?{sourceCommit:we({history:l.shell.projectHistory,...s.backend?{backend:s.backend}:{}})}:{}})}export{Ke as a,Ve as o,De as r,Je as s};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/r3f-design-session-lsbFnoWH.js","assets/index-C5ZAyrKq.js","assets/index-nmcBqr7Y.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-D_NuPfjr.js","assets/jsx-runtime-DPjLkJKQ.js","assets/index-CtzuWnCS.js","assets/index-CinJrH5C.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css","assets/edit-mode-authoring-D5f7aHHl.js","assets/game-network-DW5ARz4R.js","assets/index-OZVqp6xS.js","assets/index-Da9JhEvW.js","assets/native-debug-module-BlrALjM3.js","assets/native-entry-surface-BE8LJNdu.js","assets/debug-registry-ggQWxtu-.js","assets/contract-system-adapters-Cn7OW_ay.js","assets/game-contract-seams-tyKDsfaP.js","assets/seeded-random-BJthDRMu.js","assets/game-audio-BeCyd0Ha.js","assets/rapier-physics-adapter-CaZqWLu0.js","assets/events-156d8d12.esm-CYeuVCYr.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/index-bQE2NA0D.js","assets/live-project-verbs-CdFmLYOo.js","assets/capability-coverage-ByWftxk4.js","assets/json-history-resource-Uqrihfc8.js","assets/binding-resolver-DGbk9_XR.js","assets/adapter-surface-Y37Nzcyw.js","assets/structural-signature-Dc7skRiy.js","assets/webgl-frame-capture-DdJkM2mi.js","assets/realm-services-Do9J6nsb.js","assets/canvas-entry-runtime-BST8yRuK.js","assets/three-ingest-runtime-CwTqAHgX.js","assets/EffectComposer-BEAt0PtQ.js","assets/CopyShader-BzTUYzf6.js","assets/ShaderPass-DTnDQXm0.js","assets/Pass-D1MRT672.js","assets/CSS3DRenderer-BsAqfavI.js","assets/relative-path-guard-GiM7Lsz8.js","assets/react-root-BHA-cdrW.js","assets/editor-presentation-activity-CqJH4G9t.js","assets/active-ingest-0QjJWb7i.js","assets/ingest-source-persistence-6ShMoSCa.js","assets/pixi-story-model-DNkfnWUV.js","assets/surface-content-Dg9Kkazf.js","assets/viewport-root-presentation-hRLF0BeO.js","assets/mounted-authoring-DxMISwvR.js","assets/entity-object-MKYemTFM.js","assets/user-data-C84W0V47.js","assets/workspace-arrangement-DqG5sUns.js","assets/three-contract-Dkt6PmWY.js","assets/three-DiL6vMXq.js","assets/editor-layers-D-CTUqco.js","assets/component-instance-root-DLI40MiB.js","assets/viewport-editor-controls-BYaAZ_Ku.js","assets/three-authoring-adapter-CkLR2zGf.js","assets/source-persistence-backend-au3WtEn6.js","assets/three-projection-core-B7Lf8tOp.js","assets/body-marks-C1LxJtQb.js","assets/user-data-CODoGZqA.js","assets/object-marks-BnvSuCTt.js","assets/structural-ids-BOo2BRoY.js","assets/object3d-authoring-subject-XccsO0xG.js","assets/r3f-physics-binding-Cx8yhuwt.js","assets/deferred-ingest-play-B2JUlwlT.js","assets/rrweb-Cd2ifIRP.js","assets/react-world-authoring-adapter-CnzxMtYz.js","assets/board-guides-CjHQ9Ynm.js","assets/relative-import-specifier-CPFTrxi4.js","assets/story-arg-descriptors-Ek86ExX7.js","assets/inspect-Cz3Zyx_1.js","assets/inference-diagnostics-DLt9ql9I.js","assets/writer-tw6EcuVO.js","assets/three-state-BCACvUtm.js","assets/editor-shell-store-DHVWS8cE.js","assets/output-pass-HurwNl0G.js","assets/viewport-door-BARIpMu-.js","assets/scene-framing-DkZKDwH3.js","assets/assets-BcrMQHRv.js","assets/loader-BTUKnX5Q.js","assets/KTX2Loader-CaqVE6nY.js","assets/GLTFLoader-KeoruJgS.js","assets/BufferGeometryUtils-B22h7jo4.js","assets/create-runtime-B_uTwsmi.js","assets/binding-Bmxqznjk.js","assets/root-stacking-BEd9ZvxC.js","assets/setup-renderer-F9mG7t6r.js","assets/index-DHhMOs_s.js","assets/defaults-DKiBJCPN.js","assets/render-settings-CRyDhHyz.js","assets/render-features-DMSV2qKJ.js","assets/loop-gate-report-N52EWFGD.js","assets/system-slot-E2mEdiih.js","assets/performance-profiler-CMbwGBuk.js","assets/live-gesture-lock-DJbrjOqf.js"])))=>i.map(i=>d[i]);
2
+ import{_ as s,az as n}from"./index-C5ZAyrKq.js";import{r as a}from"./design-time-mount-registry-DUpXCg1U.js";import{q as c}from"./edit-mode-authoring-D5f7aHHl.js";import{a as u}from"./json-history-resource-Uqrihfc8.js";import{o as h}from"./three-authoring-adapter-CkLR2zGf.js";import{t as i}from"./editor-shell-store-DHVWS8cE.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"./component-instance-root-DLI40MiB.js";import"./user-data-C84W0V47.js";import"./workspace-arrangement-DqG5sUns.js";import"./source-persistence-backend-au3WtEn6.js";import"./ingest-source-persistence-6ShMoSCa.js";import"./three-projection-core-B7Lf8tOp.js";import"./editor-layers-D-CTUqco.js";import"./three-DiL6vMXq.js";import"./entity-object-MKYemTFM.js";import"./three-contract-Dkt6PmWY.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three.core-3arARmh6.js";import"./body-marks-C1LxJtQb.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./structural-ids-BOo2BRoY.js";import"./object3d-authoring-subject-XccsO0xG.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./r3f-physics-binding-Cx8yhuwt.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./Pass-D1MRT672.js";const U="workspace.service";function X(){const r=s(()=>import("./r3f-design-session-lsbFnoWH.js"),__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,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98]));r.catch(()=>{});const m=n("three",(t,o)=>h(i(t),()=>i(t).scene,o,u(o))),e=a({kind:"three",owner:"@volter/editor-game/three/three-authoring",async mountWorldRootSession(t){const o=t,{mountR3FDesignSession:p}=await r;return p(o.store,o.composite,o.renderer)}});return c(),()=>{e(),m()}}export{U as point,X as start};
@@ -1 +1 @@
1
- import{T as n}from"./three.module-BLhyNg0e.js";import{EffectComposer as i}from"./EffectComposer-BEAt0PtQ.js";import{CSS3DRenderer as s}from"./CSS3DRenderer-BsAqfavI.js";import{L as m,T as c}from"./index-BRJMIUK0.js";const a={three:n,EffectComposer:i,CSS3DRenderer:s};let r=null;async function f(){const e=await import(c),t=["projectThree","EffectComposer","CSS3DRenderer"].filter(o=>e[o]===void 0||e[o]===null);if(t.length>0)throw new Error(`The packaged runtime's synthetic three-ingest module did not export ${t.join(", ")} — see vite-plugin-module-doorways.ts.`);return{three:e.projectThree,EffectComposer:e.EffectComposer,CSS3DRenderer:e.CSS3DRenderer}}async function h(){return await m()?(r||(r=f()),r):a}export{h as r};
1
+ import{T as n}from"./three.module-BLhyNg0e.js";import{EffectComposer as i}from"./EffectComposer-BEAt0PtQ.js";import{CSS3DRenderer as s}from"./CSS3DRenderer-BsAqfavI.js";import{M as m,T as c}from"./index-C5ZAyrKq.js";const a={three:n,EffectComposer:i,CSS3DRenderer:s};let r=null;async function f(){const e=await import(c),t=["projectThree","EffectComposer","CSS3DRenderer"].filter(o=>e[o]===void 0||e[o]===null);if(t.length>0)throw new Error(`The packaged runtime's synthetic three-ingest module did not export ${t.join(", ")} — see vite-plugin-module-doorways.ts.`);return{three:e.projectThree,EffectComposer:e.EffectComposer,CSS3DRenderer:e.CSS3DRenderer}}async function h(){return await m()?(r||(r=f()),r):a}export{h as r};