@volter/game-editor 0.5.91 → 0.5.93

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 (295) hide show
  1. package/BUNDLED_NOTICES +22 -22
  2. package/catalog/entries/blender.json +2 -2
  3. package/catalog/entries/music.json +2 -2
  4. package/dist/.vite/manifest.json +2182 -2182
  5. package/dist/assets/{AssetBudgetPanel-DoHols3L.js → AssetBudgetPanel-CqH8eFqI.js} +3 -3
  6. package/dist/assets/{AudioViewer-DJpWQMh1.js → AudioViewer-D9cLnL2x.js} +1 -1
  7. package/dist/assets/{CanvasBoardDocument-DUkSFZ3M.js → CanvasBoardDocument-VJp9kXIl.js} +1 -1
  8. package/dist/assets/{CanvasSceneViewport-lY7d92L2.js → CanvasSceneViewport-DdIbRDvz.js} +1 -1
  9. package/dist/assets/{ColorInput-7cF4Leq3.js → ColorInput-BTlGF3dp.js} +1 -1
  10. package/dist/assets/{ColorPicker-B2gSkOna.js → ColorPicker-DetzTdVS.js} +1 -1
  11. package/dist/assets/{EntityModelDocument-DFLHmO4x.js → EntityModelDocument-KBE9cE0B.js} +1 -1
  12. package/dist/assets/{EnvironmentAssetDocument-C_10a-a0.js → EnvironmentAssetDocument-CGphHTa4.js} +1 -1
  13. package/dist/assets/{GameplaySessionTimeline-BMz5GHq5.js → GameplaySessionTimeline-3O5-N0Mq.js} +1 -1
  14. package/dist/assets/{ImageViewer-CEtC82uC.js → ImageViewer-CPaNjp2K.js} +1 -1
  15. package/dist/assets/InspectorObjectPreview-CBddqApL.js +1 -0
  16. package/dist/assets/{JsonAssetDocument-BjmItF9c.js → JsonAssetDocument-DpuY20Xh.js} +1 -1
  17. package/dist/assets/{LiveModuleDocument-DxsfqWPz.js → LiveModuleDocument-DCUT8W_y.js} +1 -1
  18. package/dist/assets/{LutAssetDocument-BWgoofXc.js → LutAssetDocument-88jyvqQL.js} +1 -1
  19. package/dist/assets/{ModelAssetDocument-CCOUnfNZ.js → ModelAssetDocument-C6aKVWOk.js} +1 -1
  20. package/dist/assets/{NonThreeAuthoringBootstrap-U8pDO_5y.js → NonThreeAuthoringBootstrap-B68s1sia.js} +1 -1
  21. package/dist/assets/Object3DDocumentToolbar-D75tk2dW.js +1 -0
  22. package/dist/assets/Object3DDocumentViewport-Cd1mOnu4.js +2 -0
  23. package/dist/assets/{Object3DPreview-CbcdszHX.js → Object3DPreview-lFm8pGJR.js} +1 -1
  24. package/dist/assets/{OnlineAssetDetail-BaW-VQoM.js → OnlineAssetDetail-D-VEQl7S.js} +1 -1
  25. package/dist/assets/{PlayBar-Dt55-XQi.js → PlayBar-mfBxszI6.js} +1 -1
  26. package/dist/assets/{QuarksAssetDocument-B6NS06Qk.js → QuarksAssetDocument-DsDNaZXY.js} +1 -1
  27. package/dist/assets/{ReactCanvasControls-B3DU4o7S.js → ReactCanvasControls-BO6VQ4VE.js} +1 -1
  28. package/dist/assets/{RootSelectionOverlay-DGhqE3ru.js → RootSelectionOverlay-BDhYO7vB.js} +1 -1
  29. package/dist/assets/{ShaderAssetDocument-C6ew-WgT.js → ShaderAssetDocument-C-JfqCOP.js} +1 -1
  30. package/dist/assets/{ShadowEditor-BTWOn0NH.js → ShadowEditor-BDCAcPPT.js} +1 -1
  31. package/dist/assets/{SourceAssetViewer-BHIPNJyW.js → SourceAssetViewer-BMUvxLky.js} +1 -1
  32. package/dist/assets/{StageHost-CgQvlJ6q.js → StageHost-B6npzI_N.js} +2 -2
  33. package/dist/assets/{StoryPreviewMount-BODkiKx5.js → StoryPreviewMount-zuCAkhXk.js} +1 -1
  34. package/dist/assets/{ThreeBoardDocument-2Hape4Gq.js → ThreeBoardDocument-Cb5ShRia.js} +2 -2
  35. package/dist/assets/{ThreeIsolationSceneContent-DmeEOKni.js → ThreeIsolationSceneContent-DEXiCMdL.js} +1 -1
  36. package/dist/assets/{ToolObject3DPreview-BLUyNI0a.js → ToolObject3DPreview-DlXTrXSy.js} +1 -1
  37. package/dist/assets/{Toolbar-BaTvvAae.js → Toolbar-BcVhV4HO.js} +1 -1
  38. package/dist/assets/{TransientHint-Bf1GHsWL.js → TransientHint-8hS698wl.js} +1 -1
  39. package/dist/assets/{VideoViewer-D_aUwqjA.js → VideoViewer-C3zbvP1D.js} +1 -1
  40. package/dist/assets/{ViewportShadingMenu-C3thhpMD.js → ViewportShadingMenu-_NT1t1ki.js} +1 -1
  41. package/dist/assets/{active-ingest-CPY5d7Ae.js → active-ingest-DmggGh3n.js} +2 -2
  42. package/dist/assets/{animation-clock-BUG7-Hj6.js → animation-clock-BeIuDISw.js} +1 -1
  43. package/dist/assets/{animation-mixers.service-UqRHpBS5.js → animation-mixers.service-ClnMefdL.js} +1 -1
  44. package/dist/assets/{animation-timeline.utility-vjZNsvAC.js → animation-timeline.utility-wI1WPvyu.js} +1 -1
  45. package/dist/assets/{asset-budget-asset.menu-Btshx1dW.js → asset-budget-asset.menu-Dl9OG8Fh.js} +1 -1
  46. package/dist/assets/{asset-budget.action-Jb6hBA39.js → asset-budget.action-2KDAHN2u.js} +1 -1
  47. package/dist/assets/{asset-budget.document-BFWXwNI0.js → asset-budget.document-DoaC9QhG.js} +1 -1
  48. package/dist/assets/{asset-budget.menu-BTPSwcMa.js → asset-budget.menu-CEg_tRrU.js} +1 -1
  49. package/dist/assets/{asset-editor-persistence-CL-0YalT.js → asset-editor-persistence-B97D2j9V.js} +1 -1
  50. package/dist/assets/{asset-loaders-nDvCLina.js → asset-loaders-DZpoMJMz.js} +1 -1
  51. package/dist/assets/{asset-preview-BqLvTtnb.js → asset-preview-DV3GTIQp.js} +1 -1
  52. package/dist/assets/{audio-unlock.service-DnCb3tjQ.js → audio-unlock.service-DsLP5SwR.js} +1 -1
  53. package/dist/assets/{audio.utility-DlkiEBfp.js → audio.utility-BxXUdxvc.js} +1 -1
  54. package/dist/assets/autoplay.service-DIvQKM4s.js +1 -0
  55. package/dist/assets/{babylon-authoring-adapter-CnxkYjhp.js → babylon-authoring-adapter-DOzhuS5E.js} +1 -1
  56. package/dist/assets/{binding-resolver-cWcQuwXj.js → binding-resolver-BlBh8LwO.js} +2 -2
  57. package/dist/assets/{blender-node-editor.document-DIAjTz4F.js → blender-node-editor.document-DvHMzTBg.js} +1 -1
  58. package/dist/assets/{blender-properties-tab-DXuz6Cpg.js → blender-properties-tab-DRUdVFzY.js} +1 -1
  59. package/dist/assets/{blender-runtime-host-CJwNrADC.js → blender-runtime-host-BByeSIlt.js} +1 -1
  60. package/dist/assets/{blender-runtime-skin-6IzekhAd.js → blender-runtime-skin-BgzfURUq.js} +2 -2
  61. package/dist/assets/{blender-runtime.document-Rf7NwTan.js → blender-runtime.document-D87p65XR.js} +7 -7
  62. package/dist/assets/{blender-screenshot.menu-CZagx_wX.js → blender-screenshot.menu-DoZuxwnq.js} +1 -1
  63. package/dist/assets/{blender-timeline.document-DzhgQIDL.js → blender-timeline.document-WR5C1UGa.js} +1 -1
  64. package/dist/assets/{blender-uv-editor.document-ClearI2D.js → blender-uv-editor.document-fTHqxbQ0.js} +1 -1
  65. package/dist/assets/{blender-version.status-BkFPoDDf.js → blender-version.status-C2QHqECl.js} +1 -1
  66. package/dist/assets/{blender.command-BrtEn062.js → blender.command-DGS-5fDC.js} +1 -1
  67. package/dist/assets/{board-guides-D-k2cJcJ.js → board-guides-b_JfsCO5.js} +1 -1
  68. package/dist/assets/{bridge.command-CgLcpLfB.js → bridge.command-C8-Yd-JC.js} +3 -3
  69. package/dist/assets/{browserAll-CGgcubIt.js → browserAll-DM6xi90e.js} +1 -1
  70. package/dist/assets/{build-player.document-DhIDZKN-.js → build-player.document-BW6tw_fH.js} +1 -1
  71. package/dist/assets/{build-profiles.document-3r5ZhcB2.js → build-profiles.document-DSMeMXxo.js} +1 -1
  72. package/dist/assets/{build-progress.status-B1PXTSq7.js → build-progress.status-BeOlYvcH.js} +1 -1
  73. package/dist/assets/{build-session-ulklRzSk.js → build-session-jrsTLfm0.js} +1 -1
  74. package/dist/assets/{build.action-B5miC2Fi.js → build.action-TyqPgrOs.js} +1 -1
  75. package/dist/assets/{build.command-Cys5G5ZA.js → build.command-CSbsgzp4.js} +1 -1
  76. package/dist/assets/{build.header-BJLJN9mP.js → build.header-aN-vUtOe.js} +1 -1
  77. package/dist/assets/{build.menu-bi39YVfp.js → build.menu-CeIF200u.js} +1 -1
  78. package/dist/assets/{build.service-DC4h7GhW.js → build.service-CpvAEm48.js} +1 -1
  79. package/dist/assets/{camera-B9Y3RW7X.js → camera-DQk7Jyi0.js} +1 -1
  80. package/dist/assets/{camera-runtime.inspector-D22mhDzD.js → camera-runtime.inspector-ByloA_vO.js} +1 -1
  81. package/dist/assets/{canvas-design-mount-Bp3K3717.js → canvas-design-mount-DVWp3O_D.js} +3 -3
  82. package/dist/assets/{canvas-entry-runtime-BHOqndB_.js → canvas-entry-runtime-Ce7wP4vm.js} +2 -2
  83. package/dist/assets/{canvas-preview-frames-2tJZVdS2.js → canvas-preview-frames-CHeT2IAu.js} +1 -1
  84. package/dist/assets/{canvas-story-capture.service-DANEGQnC.js → canvas-story-capture.service-C8vmQA9c.js} +2 -2
  85. package/dist/assets/{capability-coverage-BOaPg0KC.js → capability-coverage-O6aDzS_g.js} +1 -1
  86. package/dist/assets/{collaboration-presence-CaATXsiz.js → collaboration-presence-crxzmNq2.js} +1 -1
  87. package/dist/assets/{collider-DZkp1rvK.js → collider-c4USWOsu.js} +1 -1
  88. package/dist/assets/{component-board.service-CwKm1aEc.js → component-board.service-B9lXv1G_.js} +2 -2
  89. package/dist/assets/{component-board.service-Bba7cD7r.js → component-board.service-BC-X4fpN.js} +2 -2
  90. package/dist/assets/{component-board.service-CDeqmtPt.js → component-board.service-CXaTAE3i.js} +2 -2
  91. package/dist/assets/{component-contracts.service-kh4-IF8j.js → component-contracts.service-B7TyW4yG.js} +1 -1
  92. package/dist/assets/{component-instance-root-JAQpC4Pi.js → component-instance-root-C1Xyh79V.js} +1 -1
  93. package/dist/assets/{component-verbs.command-DNG8KytX.js → component-verbs.command-_1qrRMBb.js} +1 -1
  94. package/dist/assets/{component-verbs.service-CQCmsdNk.js → component-verbs.service-DiGB6WpZ.js} +1 -1
  95. package/dist/assets/{config-D8XyIZPl.js → config-b-yIYDNm.js} +2 -2
  96. package/dist/assets/{configurations-Bzh9kmrk.js → configurations-Nuyn3MCc.js} +1 -1
  97. package/dist/assets/{connection.status-ChQR4f5Y.js → connection.status-DsqpfunN.js} +1 -1
  98. package/dist/assets/{constraints.inspector-Ddo1UQNJ.js → constraints.inspector-D97NPk_2.js} +1 -1
  99. package/dist/assets/{content-bounds-B_xPBrsP.js → content-bounds-DetzUl3q.js} +1 -1
  100. package/dist/assets/{contract-system-adapters-C1oaetXB.js → contract-system-adapters-BOybM-Sv.js} +1 -1
  101. package/dist/assets/{coverage.service-DIQXHW6Q.js → coverage.service-C8DuZbAJ.js} +1 -1
  102. package/dist/assets/{create-runtime-BQdKNIfc.js → create-runtime-C232YTVD.js} +1 -1
  103. package/dist/assets/{curve-BEKFgt87.js → curve-DVwdpVlr.js} +1 -1
  104. package/dist/assets/{data-asset-BZA163so.js → data-asset-DWShrZTd.js} +1 -1
  105. package/dist/assets/{data-ref-BUMaOgK6.js → data-ref-mlP7PknV.js} +1 -1
  106. package/dist/assets/{debug-bridge-B8Do4Q6K.js → debug-bridge-BgNHixNJ.js} +1 -1
  107. package/dist/assets/{debug-registry-CoiJ_gHM.js → debug-registry-CS3ZmHpb.js} +1 -1
  108. package/dist/assets/{deferred-ingest-play-DJeWQ-He.js → deferred-ingest-play-Br7lD74w.js} +2 -2
  109. package/dist/assets/{design-time-canvas-mount-B_5sxSjq.js → design-time-canvas-mount-BxG0btu3.js} +2 -2
  110. package/dist/assets/{design-time-layers-Bspf2qH5.js → design-time-layers-C2fW3RP2.js} +1 -1
  111. package/dist/assets/{design-time-mount.service-038G1MnB.js → design-time-mount.service-CZpbFfg4.js} +2 -2
  112. package/dist/assets/{design-time-mount.service-BE5vpW1Y.js → design-time-mount.service-RwUW68DY.js} +2 -2
  113. package/dist/assets/{design-time-react-mount--CifCE6t.js → design-time-react-mount-DsV5z0NJ.js} +1 -1
  114. package/dist/assets/{document-preview-three-D46Hv_l-.js → document-preview-three-Cw1dnqQJ.js} +1 -1
  115. package/dist/assets/{dom-authoring-adapter-CI_qQmaE.js → dom-authoring-adapter-CCGflNez.js} +1 -1
  116. package/dist/assets/{draco3d-FJXe8NCw.js → draco3d-MAZHlZsV.js} +1 -1
  117. package/dist/assets/{edit-mode-audio.service-qKdc6y7a.js → edit-mode-audio.service-ir8WvTus.js} +1 -1
  118. package/dist/assets/{edit-mode-authoring-C0sf0ewd.js → edit-mode-authoring-CFh9mf99.js} +1 -1
  119. package/dist/assets/{edit-mode-networking.service-D-eLZBVJ.js → edit-mode-networking.service-KUb9s9m1.js} +1 -1
  120. package/dist/assets/{editor-api-DeTJ2F2f.js → editor-api-Di5jF1jM.js} +1 -1
  121. package/dist/assets/{editor-layers-B43PZgUF.js → editor-layers-JmP4C0fP.js} +1 -1
  122. package/dist/assets/{editor-shell-store-CW9Fjab9.js → editor-shell-store-BRBXaK6_.js} +1 -1
  123. package/dist/assets/{entity-object-C40NpVSX.js → entity-object-FbYj5hy6.js} +1 -1
  124. package/dist/assets/{extend-CB1ggOZp.js → extend-B8RJQ5RF.js} +1 -1
  125. package/dist/assets/{fork-menu-ByAv7gfK.js → fork-menu-Djl0ZpaE.js} +1 -1
  126. package/dist/assets/{frame-debugger-store-BOL6rL6i.js → frame-debugger-store-CKHjhO2u.js} +1 -1
  127. package/dist/assets/{game-contract-seams-Dq1YiGya.js → game-contract-seams-BfTLgo42.js} +1 -1
  128. package/dist/assets/{game-css-scope-transform-zF8z1rZz.js → game-css-scope-transform-Cj0iqoul.js} +1 -1
  129. package/dist/assets/{game-document.service-DlSkuYvA.js → game-document.service-C240l1eg.js} +1 -1
  130. package/dist/assets/{game-eval.command-Cnr70bCU.js → game-eval.command-CE54gmgT.js} +1 -1
  131. package/dist/assets/{game-module-access-Pz5cgPiz.js → game-module-access-BvOoy6np.js} +1 -1
  132. package/dist/assets/{game-network-D8nKKSRC.js → game-network-C7J9j85F.js} +3 -3
  133. package/dist/assets/{gameplay-export-FFcX1OzU.js → gameplay-export-BPVDdtiT.js} +1 -1
  134. package/dist/assets/{gameplay-replay-CVwLaTax.js → gameplay-replay-CMWloPvb.js} +1 -1
  135. package/dist/assets/{gameplay.command-64STQYm4.js → gameplay.command-BGYQD9oQ.js} +1 -1
  136. package/dist/assets/{generation-jobs-BOOUx41p.js → generation-jobs-BQRS91CG.js} +1 -1
  137. package/dist/assets/{generation.service-BJn-hOAW.js → generation.service-DYDb6ud0.js} +1 -1
  138. package/dist/assets/{generations-BuBWfmYF.js → generations-J9oJcT7T.js} +1 -1
  139. package/dist/assets/{generations.status-Cw7FBmHO.js → generations.status-7KG9Txty.js} +1 -1
  140. package/dist/assets/{hierarchy-marks-r1SCnl92.js → hierarchy-marks-DWnBwmhe.js} +1 -1
  141. package/dist/assets/{hosted-asset-materialization-CCfM8rX8.js → hosted-asset-materialization-BRC2G7NT.js} +1 -1
  142. package/dist/assets/{index-C5X85WM3.js → index--o2s6am1.js} +1 -1
  143. package/dist/assets/{index-CiKYIRrk.js → index-BO3sy09K.js} +1 -1
  144. package/dist/assets/{index-EO6Vl92s.js → index-BT8W9a7k.js} +266 -266
  145. package/dist/assets/{index-CRFTAXpT.js → index-BXMdqkmO.js} +1 -1
  146. package/dist/assets/{index-DNuUwvUR.js → index-BnDSegwv.js} +1 -1
  147. package/dist/assets/{index-DnZE2Fb2.js → index-BvBIQ7OC.js} +1 -1
  148. package/dist/assets/{index-tsU_SOUL.js → index-CIdT41XG.js} +1 -1
  149. package/dist/assets/{index-BTlpcjdl.js → index-DL2Takj5.js} +2 -2
  150. package/dist/assets/{index-CDTbPbQM.js → index-EWucKHMo.js} +1 -1
  151. package/dist/assets/{inference-diagnostics-18bkEAju.js → inference-diagnostics-C2jsr-K4.js} +1 -1
  152. package/dist/assets/{ingest-boot-viewport-BuSUroou.js → ingest-boot-viewport-DhLjnn8m.js} +1 -1
  153. package/dist/assets/{ingest-siblings-B3ExLPmT.js → ingest-siblings-nIImQgug.js} +1 -1
  154. package/dist/assets/{ingest-source-persistence-C2eN6TUG.js → ingest-source-persistence-BSy_j1I6.js} +1 -1
  155. package/dist/assets/{ingest.service-DPCT2mkC.js → ingest.service-BRJsVkle.js} +1 -1
  156. package/dist/assets/{inspect-BqpAh85y.js → inspect-CewZ8N7e.js} +1 -1
  157. package/dist/assets/instances.command-CLmaRUbS.js +1 -0
  158. package/dist/assets/{json-history-resource-BjCvVkMa.js → json-history-resource-Kth9eAdl.js} +1 -1
  159. package/dist/assets/{layered-pick-Ciu7uLFh.js → layered-pick-Ba5bN3pV.js} +1 -1
  160. package/dist/assets/{light-CXcgEBDG.js → light-CELsbQVq.js} +1 -1
  161. package/dist/assets/{live-project-verbs-BBbF8usb.js → live-project-verbs-puMj_ac5.js} +1 -1
  162. package/dist/assets/{machine.document-Bdci5A4S.js → machine.document-PU1D7pGw.js} +1 -1
  163. package/dist/assets/{machines.finder-CvEKAnGk.js → machines.finder-DC3vmPmt.js} +1 -1
  164. package/dist/assets/{material-ClpgTT47.js → material-Dzm1eZh1.js} +1 -1
  165. package/dist/assets/{material-factory-Df67vZ1z.js → material-factory-BgBGneoy.js} +1 -1
  166. package/dist/assets/{mesh-DkaFE4sY.js → mesh-BlgI7C6P.js} +1 -1
  167. package/dist/assets/{model-asset-sections.service-CBOHxNFe.js → model-asset-sections.service-itY21Ju0.js} +1 -1
  168. package/dist/assets/{model-inspection-DcL5cH7Y.js → model-inspection-CNvWXEly.js} +1 -1
  169. package/dist/assets/{model-thumbnail-C6YzkBEi.js → model-thumbnail-BOFnggyX.js} +1 -1
  170. package/dist/assets/{models.finder-DfEs64WT.js → models.finder-t8DwGJSQ.js} +1 -1
  171. package/dist/assets/{module-mode-f-SD3z04.js → module-mode-DlvLWvyZ.js} +2 -2
  172. package/dist/assets/{mount-canvas-ingest-root-BnxcPl2U.js → mount-canvas-ingest-root-BQ7FEyTX.js} +2 -2
  173. package/dist/assets/{mount-dom-ingest-root-CfwImvJz.js → mount-dom-ingest-root-DRIY0mwS.js} +2 -2
  174. package/dist/assets/{mount-ingest-root-Dh6Z1uso.js → mount-ingest-root-BgFa-gMa.js} +2 -2
  175. package/dist/assets/{mount-manifest-CAxRLPYT.js → mount-manifest-CNy0ulXi.js} +1 -1
  176. package/dist/assets/{mount-three-ingest-root-CoqxTpZB.js → mount-three-ingest-root-02iAM15N.js} +1 -1
  177. package/dist/assets/{mounted-authoring-DfEm9qgt.js → mounted-authoring-B4MQTZte.js} +1 -1
  178. package/dist/assets/{mounted-story-viewport-source-WBFaoqod.js → mounted-story-viewport-source-D1uicpwC.js} +1 -1
  179. package/dist/assets/{native-debug-module-piwWLOP6.js → native-debug-module-zuPnGFn7.js} +1 -1
  180. package/dist/assets/{navigation-DYa_HSby.js → navigation-DiBo4eih.js} +1 -1
  181. package/dist/assets/{navmesh.menu-B0MJEIPE.js → navmesh.menu-BfZu5XcC.js} +1 -1
  182. package/dist/assets/{navmesh.service-BpsPIRLZ.js → navmesh.service-DqXGRph3.js} +1 -1
  183. package/dist/assets/network-observer.service-D25O4Z1u.js +1 -0
  184. package/dist/assets/{network.utility-DMr-AxKs.js → network.utility-B9bsTu3h.js} +1 -1
  185. package/dist/assets/{object3d-document-session-registry-3YUZT4RT.js → object3d-document-session-registry-DOBWYBmc.js} +2 -2
  186. package/dist/assets/{oid-transform-DsAJ1P8o.js → oid-transform-AhgVgFiI.js} +1 -1
  187. package/dist/assets/{particles-vZ9UmSDz.js → particles-CnyBA4U4.js} +1 -1
  188. package/dist/assets/{pixi-authoring-adapter-QT0kN-JP.js → pixi-authoring-adapter-HA__hq94.js} +1 -1
  189. package/dist/assets/{pixi-live-write-target-DM9cdS1_.js → pixi-live-write-target-Bs9OTI_x.js} +1 -1
  190. package/dist/assets/{play.command-DH2eNjdZ.js → play.command-SXE_KYU-.js} +2 -2
  191. package/dist/assets/{presentation-VcgXp-GO.js → presentation-CrrrfvP9.js} +1 -1
  192. package/dist/assets/{product-x_cfmfQ9.js → product-7prSWXZy.js} +1 -1
  193. package/dist/assets/{profiler.action-C3xlnyom.js → profiler.action-Dd1_MPEk.js} +1 -1
  194. package/dist/assets/{profiler.menu-DSUi8xT3.js → profiler.menu-CwZGsLvP.js} +1 -1
  195. package/dist/assets/{profiler.utility-BRSMJoGZ.js → profiler.utility-CXhlEiq8.js} +1 -1
  196. package/dist/assets/{project-authoring-session-CwEQV0bP.js → project-authoring-session-Dxi88QnW.js} +2 -2
  197. package/dist/assets/{properties-bone-constraints.inspector-Ct1jO5Ue.js → properties-bone-constraints.inspector-DuDWHYs-.js} +1 -1
  198. package/dist/assets/{properties-bone.inspector-DxGQlndA.js → properties-bone.inspector-BCpk3uPl.js} +1 -1
  199. package/dist/assets/{properties-collection.inspector-lK30X7Jh.js → properties-collection.inspector-z8O9BBRd.js} +1 -1
  200. package/dist/assets/{properties-constraints.inspector-Da8piE2V.js → properties-constraints.inspector-4saiH8Ro.js} +1 -1
  201. package/dist/assets/{properties-data.inspector-WI4fuv2D.js → properties-data.inspector-CVDOVZny.js} +1 -1
  202. package/dist/assets/{properties-material.inspector-CQwIjVw1.js → properties-material.inspector-DZtnbfCQ.js} +1 -1
  203. package/dist/assets/{properties-modifiers.inspector-BzQAh_u0.js → properties-modifiers.inspector-PRa6MD_F.js} +1 -1
  204. package/dist/assets/{properties-object.inspector-Du6jNcII.js → properties-object.inspector-DFFp41qh.js} +1 -1
  205. package/dist/assets/{properties-output.inspector-BQzIXPdl.js → properties-output.inspector-CYJmwpKr.js} +1 -1
  206. package/dist/assets/{properties-particles.inspector-C-lSFNSf.js → properties-particles.inspector-BTB6ISve.js} +1 -1
  207. package/dist/assets/{properties-physics.inspector-CwC0aupw.js → properties-physics.inspector-CwxYUTIE.js} +1 -1
  208. package/dist/assets/{properties-render.inspector-D0P3nYYJ.js → properties-render.inspector-DUDAxNw2.js} +1 -1
  209. package/dist/assets/{properties-scene.inspector-bM362PAU.js → properties-scene.inspector-DNNmsuNN.js} +1 -1
  210. package/dist/assets/{properties-texture.inspector-8ucuWCLj.js → properties-texture.inspector-DD6bWfQ4.js} +1 -1
  211. package/dist/assets/{properties-view-layer.inspector-DWOu3YE3.js → properties-view-layer.inspector-CA235i54.js} +1 -1
  212. package/dist/assets/{properties-world.inspector-BDTb__xL.js → properties-world.inspector-CdTyWS-3.js} +1 -1
  213. package/dist/assets/{r3f-design-session-gQuaJFCS.js → r3f-design-session-mIAk6fZ_.js} +2 -2
  214. package/dist/assets/{r3f-physics-binding-CFwn2dZ0.js → r3f-physics-binding-DivDhpIZ.js} +1 -1
  215. package/dist/assets/{r3f-source-authoring-adapter-DhFdCSs7.js → r3f-source-authoring-adapter-BU7HGqw5.js} +1 -1
  216. package/dist/assets/{react-canvas-navigation-VKHmF9L9.js → react-canvas-navigation-DqwQuzs1.js} +1 -1
  217. package/dist/assets/{react-inspector.service-DheFnb_w.js → react-inspector.service-BO6zvtnm.js} +1 -1
  218. package/dist/assets/{react-story-board-BdHhG7gL.js → react-story-board-BIV6SjrH.js} +1 -1
  219. package/dist/assets/{react-three-rapier.esm-W_y4UeT-.js → react-three-rapier.esm-cTqJ0Ab9.js} +1 -1
  220. package/dist/assets/{react-world-authoring-adapter-Cey0R-Ml.js → react-world-authoring-adapter-C1Pf_Ti4.js} +1 -1
  221. package/dist/assets/{realm-services-Bw73w74M.js → realm-services-CLLV-0p7.js} +1 -1
  222. package/dist/assets/{reflection-probe-capture.inspector-Dqj4TwMY.js → reflection-probe-capture.inspector-B_A9WjRQ.js} +1 -1
  223. package/dist/assets/{registry-DCdpQPdB.js → registry-hs8ynXgD.js} +1 -1
  224. package/dist/assets/{relative-import-specifier-DjG-Lv03.js → relative-import-specifier-D8ICYdXp.js} +1 -1
  225. package/dist/assets/{render-env-D12b4e03.js → render-env-CCwOJnKi.js} +1 -1
  226. package/dist/assets/{render-features-w9Z-Cv_p.js → render-features-PxgXd53t.js} +1 -1
  227. package/dist/assets/{render-settings-CGDwkhhL.js → render-settings-DoSjRl16.js} +1 -1
  228. package/dist/assets/{resolve-three-Bl4aEdGL.js → resolve-three-CJYxqrQD.js} +3 -3
  229. package/dist/assets/{root-seam-contract-Dx597Ute.js → root-seam-contract-Hpt_EoHH.js} +1 -1
  230. package/dist/assets/{run-selection-D-nxwjch.js → run-selection-B28D0dVZ.js} +1 -1
  231. package/dist/assets/{scene-capture-BYzNQlcZ.js → scene-capture-BdnKEkty.js} +1 -1
  232. package/dist/assets/{scene-document.service-DvdbtjUB.js → scene-document.service-DNoSvWoe.js} +2 -2
  233. package/dist/assets/{scene-framing-zyo6Dgey.js → scene-framing-B-Zvn5pm.js} +1 -1
  234. package/dist/assets/{seeded-random-BcjdE8-O.js → seeded-random-BscHstMm.js} +1 -1
  235. package/dist/assets/{setup-renderer-BoEjWIJ6.js → setup-renderer-D2Jvr2h9.js} +1 -1
  236. package/dist/assets/{source-object3d-authoring-adapter-D-mc1Hsq.js → source-object3d-authoring-adapter-Dk4cjzFm.js} +1 -1
  237. package/dist/assets/{source-persistence-backend-DPS956_W.js → source-persistence-backend-Bs_c6UA-.js} +1 -1
  238. package/dist/assets/{stage-keyboard-DD-47U0X.js → stage-keyboard-DmoIXoIV.js} +1 -1
  239. package/dist/assets/{stage-overlay-set-jLin7LCZ.js → stage-overlay-set-iu8AeZPy.js} +1 -1
  240. package/dist/assets/{stage-presence-markers-BzL60lxC.js → stage-presence-markers-B_QEEO-M.js} +1 -1
  241. package/dist/assets/{stage-transform-tools-CXEtn6e_.js → stage-transform-tools-B4_Vna3u.js} +1 -1
  242. package/dist/assets/{standard-viewport-dressing-DzgsLMqH.js → standard-viewport-dressing-Cqc3upSK.js} +1 -1
  243. package/dist/assets/{state-watch.action-C0r205X2.js → state-watch.action-DwbqOYJb.js} +1 -1
  244. package/dist/assets/{state-watch.menu-CIOq9XcQ.js → state-watch.menu-C9pu3XfU.js} +1 -1
  245. package/dist/assets/{state-watch.utility-B5Mps4k8.js → state-watch.utility-SzNyBG5Z.js} +1 -1
  246. package/dist/assets/{story-capture-BL_OEjAJ.js → story-capture-RxFtvptE.js} +1 -1
  247. package/dist/assets/{story-documents-uyxMmUzs.js → story-documents-RnpVbpMP.js} +1 -1
  248. package/dist/assets/{story-documents.service-Cu17YnfS.js → story-documents.service-C7UNDFG9.js} +1 -1
  249. package/dist/assets/{story-documents.service-L9mW5dVf.js → story-documents.service-DFbzVaKv.js} +1 -1
  250. package/dist/assets/{story-media-presence-CsYCXCgg.js → story-media-presence-D8aagE7-.js} +1 -1
  251. package/dist/assets/{story-pixi-preview-BaS3gW36.js → story-pixi-preview-DD5zQqGj.js} +1 -1
  252. package/dist/assets/{story-presentation-Inb0tF8V.js → story-presentation-DCpop4w8.js} +1 -1
  253. package/dist/assets/{story-three-preview-N78COIhD.js → story-three-preview-CHq5WHPd.js} +2 -2
  254. package/dist/assets/{studio-environment-BRMTYTp1.js → studio-environment-ChEwdjoc.js} +1 -1
  255. package/dist/assets/{surface-state-l4D0tVlT.js → surface-state-CFqL5gLs.js} +1 -1
  256. package/dist/assets/{syntactic-prop-specs-DOQMV1SJ.js → syntactic-prop-specs-MmHU8Snh.js} +1 -1
  257. package/dist/assets/{team-playtest.service-CHIX8ZaT.js → team-playtest.service-BMRamJM8.js} +1 -1
  258. package/dist/assets/{three-DItubEyv.js → three-HBDNjMxy.js} +1 -1
  259. package/dist/assets/{three-authoring-adapter-jGnbMYIc.js → three-authoring-adapter-OKrj_Yfz.js} +1 -1
  260. package/dist/assets/three-authoring.service-DOFfbQ1i.js +2 -0
  261. package/dist/assets/{three-ingest-runtime-DlApOywz.js → three-ingest-runtime-DhyHlcLT.js} +1 -1
  262. package/dist/assets/{three-integration-lFHyckTb.js → three-integration-B_X1dRN3.js} +2 -2
  263. package/dist/assets/three-integration.service-Ddy-s__9.js +1 -0
  264. package/dist/assets/{three-projection-core-Bsu421K7.js → three-projection-core-BQjGIfYP.js} +1 -1
  265. package/dist/assets/{three-state-15gXjQ51.js → three-state-BPIdxcKm.js} +1 -1
  266. package/dist/assets/{three-story-capture.service-B369fV1j.js → three-story-capture.service-qwUNAWlj.js} +2 -2
  267. package/dist/assets/{three-story-model-D8xXaW4_.js → three-story-model-B6RT2tEb.js} +1 -1
  268. package/dist/assets/{three-viewport-presentation-DlCyoe_E.js → three-viewport-presentation-jvn1ownx.js} +5 -5
  269. package/dist/assets/{transform-mode-request-BT4Zmx_G.js → transform-mode-request-DSr__Uu7.js} +1 -1
  270. package/dist/assets/{transport-strip-DHbAk_5x.js → transport-strip-B3s-LzLC.js} +1 -1
  271. package/dist/assets/transport.header-CrVGCDtt.js +1 -0
  272. package/dist/assets/{tuples-BcU64Mu6.js → tuples-C31jYZT7.js} +1 -1
  273. package/dist/assets/{ui-board-document-CptsO8E6.js → ui-board-document-Cfpw8u3U.js} +2 -2
  274. package/dist/assets/{user-data-DnahhlAD.js → user-data-CqubllMS.js} +1 -1
  275. package/dist/assets/{utility-view-state-GfzV3cfg.js → utility-view-state-3zmxNFCA.js} +1 -1
  276. package/dist/assets/{viewport-door-Dbl8EH3p.js → viewport-door-BQlwQEp5.js} +1 -1
  277. package/dist/assets/{viewport-root-presentation-CG43sAj5.js → viewport-root-presentation-ds37zRH-.js} +1 -1
  278. package/dist/assets/{viewport-surface-status-C9vuKKQB.js → viewport-surface-status-CVu88cZ8.js} +1 -1
  279. package/dist/assets/{webworkerAll-DE92JZIw.js → webworkerAll-DfTIWQX5.js} +1 -1
  280. package/dist/assets/{workspace-arrangement-COs530TA.js → workspace-arrangement-B1xtK850.js} +1 -1
  281. package/dist/assets/{world-documents-80AAIyS9.js → world-documents-RmUr_mpg.js} +1 -1
  282. package/dist/assets/{world-root-stage-binding-umHFwInD.js → world-root-stage-binding-BAbAZClT.js} +1 -1
  283. package/dist/assets/{xstate-animation-binding-_aMqz-nR.js → xstate-animation-binding-D46iVstj.js} +1 -1
  284. package/dist/assets/{xstate-animation-meta-CzxfXjaY.js → xstate-animation-meta-DoZp29qk.js} +1 -1
  285. package/dist-node/cli.js +16 -16
  286. package/package.json +16 -16
  287. package/dist/assets/InspectorObjectPreview-CO8cF8ht.js +0 -1
  288. package/dist/assets/Object3DDocumentToolbar-CJE4T3cC.js +0 -1
  289. package/dist/assets/Object3DDocumentViewport-CmgIuzQv.js +0 -2
  290. package/dist/assets/autoplay.service-CJv46a1s.js +0 -1
  291. package/dist/assets/instances.command-BTMfzHFj.js +0 -1
  292. package/dist/assets/network-observer.service-CBgzPOhw.js +0 -1
  293. package/dist/assets/three-authoring.service-UK1utJDS.js +0 -2
  294. package/dist/assets/three-integration.service-CvbLexeR.js +0 -1
  295. package/dist/assets/transport.header-D6MQXDZh.js +0 -1
@@ -1 +1 @@
1
- import{D as v}from"./debug-registry-CoiJ_gHM.js";import{r as _}from"./game-network-D8nKKSRC.js";const D="volter-debug",T=100,E=50,k=100,P=60,b=2e3,V="the host loop reported liveness 'loop-starved' and this session has no way to drive ticks — no recent rAF progress was observed. Check `volter-game-editor status` for the separate visibility readings; foreground/reload the editor, or start play to wire the run-ticks target, then retry.";async function L(n,s,d){const i=()=>n.state("time"),c=i();let l=c.tick,u=0,g=0;for(;;){const r=i();if(r.simSeconds-c.simSeconds>=s)return{stalled:!1};if(r.loopLiveness==="loop-starved"){if(!d)return{stalled:!0,starvedWithoutDriver:!0};if(g>=b)return{stalled:!0};g+=1;const e=s-(r.simSeconds-c.simSeconds),t=r.fixedDt,o=t!==void 0&&Number.isFinite(t)&&t>0?Math.max(1,Math.ceil(e/t-1e-9)):1;d(Math.min(P,o));const a=i();if(a.tick===r.tick&&a.simSeconds===r.simSeconds)return{stalled:!0};l=a.tick,u=0,await Promise.resolve();continue}if(u=r.tick===l?u+1:0,l=r.tick,u>=k)return{stalled:!0};await new Promise(e=>setTimeout(e,E))}}function h(){return typeof window<"u"}function S(n){return new URLSearchParams(n.search).get(D)==="1"}function A(n){return n.debug?.allowInProduction===!0}function I(n){const{registry:s,manifest:d}=n,i=s.adapter,c=[];function l(e){c.push(e),c.length>T&&c.shift()}const u=e=>{l(e.message||String(e.error))},g=e=>{l(`Unhandled promise rejection: ${String(e.reason)}`)};n.window.addEventListener?.("error",u),n.window.addEventListener?.("unhandledrejection",g);function r(e,t){const o=s.getVirtualInputTarget(t);if(!o)throw new v("DEBUG_INPUT_UNAVAILABLE",`debug bridge: ${e}() has no virtual-input target wired — no root entry exports \`debug.input\` (the game's own input door), or none has mounted yet`);return o}return{version:1,providers:i.providers,state:i.state,stateAll:i.stateAll,commands:i.commands,events:i.events,async invoke(e,t){if(!A(d))throw new v("DEBUG_COMMANDS_UNSUPPORTED",`debug: command "${e}" invocation refused — production build without debug.allowInProduction (D18)`,{name:e});return i.invoke(e,t)},input:{setVirtualAction:(e,t,o)=>r("setVirtualAction",o).setVirtualAction(e,t),tapVirtualAction:(e,t)=>r("tapVirtualAction",t).tapVirtualAction(e),clearVirtualActions:e=>r("clearVirtualActions",e).clearVirtualActions(),scheduleActionAtTick:(e,t,o,a)=>r("scheduleActionAtTick",a).scheduleActionAtTick(e,t,o),startRecording:e=>r("startRecording",e).startInputRecording(),stopRecording:e=>r("stopRecording",e).stopInputRecording(),isRecording:e=>r("isRecording",e).isInputRecording(),injectPointerDelta:(e,t,o)=>r("injectPointerDelta",o).injectPointerDelta(e,t),injectPointerPosition:(e,t,o)=>r("injectPointerPosition",o).injectPointerPosition(e,t)},snapshot(e){return{time:i.state("time"),state:i.stateAll(),events:i.events(e),pageErrors:c.slice()}},runTicks(e,t){const o=s.getRunTicksTarget();if(!o)throw new v("DEBUG_RUN_TICKS_UNAVAILABLE","debug bridge: runTicks() has no run-ticks target wired — no Game has mounted yet");o.runTicks(e,t)},runTicksSettled(e,t){return _(s,e,t)},async holdFor(e,t,o){const a=r("holdFor",o),w=a.setVirtualAction(e,!0);if(!w.delivered)return a.clearVirtualActions(),w.reason!==void 0?{delivered:!1,reason:w.reason}:{delivered:!1};const f=s.getRunTicksTarget(),{stalled:m,starvedWithoutDriver:p}=await L(i,t,f?R=>f.runTicks(R,{render:"last"}):void 0);return a.clearVirtualActions(),m?{delivered:!1,reason:p?V:"play stopped during hold"}:{delivered:!0}},uninstall(){n.window.removeEventListener?.("error",u),n.window.removeEventListener?.("unhandledrejection",g),delete n.window.__volter}}}function U(n){const s=n.url??(h()?window.location:void 0);if(!s||!S(s))return;const d=n.window??(h()?window:void 0);if(!d)return;if(!A(n.manifest)){console.warn("[debug] ?volter-debug=1 ignored: production build without debug.allowInProduction (D18)");return}const i=I({registry:n.registry,manifest:n.manifest,window:d});return d.__volter=i,i}export{V as H,U as m,L as w};
1
+ import{D as v}from"./debug-registry-CS3ZmHpb.js";import{r as _}from"./game-network-C7J9j85F.js";const D="volter-debug",T=100,E=50,k=100,P=60,b=2e3,V="the host loop reported liveness 'loop-starved' and this session has no way to drive ticks — no recent rAF progress was observed. Check `volter-game-editor status` for the separate visibility readings; foreground/reload the editor, or start play to wire the run-ticks target, then retry.";async function L(n,s,d){const i=()=>n.state("time"),c=i();let l=c.tick,u=0,g=0;for(;;){const r=i();if(r.simSeconds-c.simSeconds>=s)return{stalled:!1};if(r.loopLiveness==="loop-starved"){if(!d)return{stalled:!0,starvedWithoutDriver:!0};if(g>=b)return{stalled:!0};g+=1;const e=s-(r.simSeconds-c.simSeconds),t=r.fixedDt,o=t!==void 0&&Number.isFinite(t)&&t>0?Math.max(1,Math.ceil(e/t-1e-9)):1;d(Math.min(P,o));const a=i();if(a.tick===r.tick&&a.simSeconds===r.simSeconds)return{stalled:!0};l=a.tick,u=0,await Promise.resolve();continue}if(u=r.tick===l?u+1:0,l=r.tick,u>=k)return{stalled:!0};await new Promise(e=>setTimeout(e,E))}}function h(){return typeof window<"u"}function S(n){return new URLSearchParams(n.search).get(D)==="1"}function A(n){return n.debug?.allowInProduction===!0}function I(n){const{registry:s,manifest:d}=n,i=s.adapter,c=[];function l(e){c.push(e),c.length>T&&c.shift()}const u=e=>{l(e.message||String(e.error))},g=e=>{l(`Unhandled promise rejection: ${String(e.reason)}`)};n.window.addEventListener?.("error",u),n.window.addEventListener?.("unhandledrejection",g);function r(e,t){const o=s.getVirtualInputTarget(t);if(!o)throw new v("DEBUG_INPUT_UNAVAILABLE",`debug bridge: ${e}() has no virtual-input target wired — no root entry exports \`debug.input\` (the game's own input door), or none has mounted yet`);return o}return{version:1,providers:i.providers,state:i.state,stateAll:i.stateAll,commands:i.commands,events:i.events,async invoke(e,t){if(!A(d))throw new v("DEBUG_COMMANDS_UNSUPPORTED",`debug: command "${e}" invocation refused — production build without debug.allowInProduction (D18)`,{name:e});return i.invoke(e,t)},input:{setVirtualAction:(e,t,o)=>r("setVirtualAction",o).setVirtualAction(e,t),tapVirtualAction:(e,t)=>r("tapVirtualAction",t).tapVirtualAction(e),clearVirtualActions:e=>r("clearVirtualActions",e).clearVirtualActions(),scheduleActionAtTick:(e,t,o,a)=>r("scheduleActionAtTick",a).scheduleActionAtTick(e,t,o),startRecording:e=>r("startRecording",e).startInputRecording(),stopRecording:e=>r("stopRecording",e).stopInputRecording(),isRecording:e=>r("isRecording",e).isInputRecording(),injectPointerDelta:(e,t,o)=>r("injectPointerDelta",o).injectPointerDelta(e,t),injectPointerPosition:(e,t,o)=>r("injectPointerPosition",o).injectPointerPosition(e,t)},snapshot(e){return{time:i.state("time"),state:i.stateAll(),events:i.events(e),pageErrors:c.slice()}},runTicks(e,t){const o=s.getRunTicksTarget();if(!o)throw new v("DEBUG_RUN_TICKS_UNAVAILABLE","debug bridge: runTicks() has no run-ticks target wired — no Game has mounted yet");o.runTicks(e,t)},runTicksSettled(e,t){return _(s,e,t)},async holdFor(e,t,o){const a=r("holdFor",o),w=a.setVirtualAction(e,!0);if(!w.delivered)return a.clearVirtualActions(),w.reason!==void 0?{delivered:!1,reason:w.reason}:{delivered:!1};const f=s.getRunTicksTarget(),{stalled:m,starvedWithoutDriver:p}=await L(i,t,f?R=>f.runTicks(R,{render:"last"}):void 0);return a.clearVirtualActions(),m?{delivered:!1,reason:p?V:"play stopped during hold"}:{delivered:!0}},uninstall(){n.window.removeEventListener?.("error",u),n.window.removeEventListener?.("unhandledrejection",g),delete n.window.__volter}}}function U(n){const s=n.url??(h()?window.location:void 0);if(!s||!S(s))return;const d=n.window??(h()?window:void 0);if(!d)return;if(!A(n.manifest)){console.warn("[debug] ?volter-debug=1 ignored: production build without debug.allowInProduction (D18)");return}const i=I({registry:n.registry,manifest:n.manifest,window:d});return d.__volter=i,i}export{V as H,U as m,L as w};
@@ -1 +1 @@
1
- import{e0 as L}from"./index-EO6Vl92s.js";function B(o){const s=Symbol.for(`@volter/game-runtime/game-scoped/${o}`);return{set(u,d){Object.defineProperty(u,s,{configurable:!0,enumerable:!1,value:d})},get(u){return u[s]??null}}}class c extends Error{code;data;constructor(s,u,d){super(u),this.name="DebugError",this.code=s,this.data=d}}const T="ctx.debug.registerStateProvider(name, fn) — see the template example component";function P(o){if(o instanceof Error){const s={causeName:o.name,causeMessage:o.message};return o.stack===void 0?s:{...s,causeStack:o.stack}}return{causeName:typeof o,causeMessage:String(o)}}const q=1e4;function y(o,s,u,d){o.has(s)||(o.add(s),console.warn(`[debug] ${u} "${s}" re-registered (world "${d}")`))}function V(o){const s=new Map,u=new Map,d=new Set,S=new Set,m=[],R=500;let p=0,I=!1;const _=new Map,w=new Map,l=new Map;let E=null;const D=new Set;let b=null;const g=new Map;let N=0;function C(e){if(e!==void 0){if(!l.has(e))throw new c("DEBUG_INPUT_WORLD_NOT_FOUND",`debug: no input door wired for world "${e}" — registered: `+(l.size?[...l.keys()].join(", "):"(none)"),{worldId:e,registered:[...l.keys()]});return e}return h(l.keys())}function h(e){const t=[...e];if(t.length===0)return null;const r=o.getDefaultRootId?.()??null;return r!==null&&t.includes(r)?r:t[0]}s.set("time",{fn:()=>({simSeconds:o.getSimT(),tick:o.getTick(),loopLiveness:o.getLoopLiveness?.()??null,...o.getFixedDt===void 0?{}:{fixedDt:o.getFixedDt()}}),tier:"observable",worldId:"__engine__",builtin:!0}),s.set("input.actions",{fn:()=>{const e=h(_.keys());return(e?_.get(e):void 0)?.()??[]},tier:"observable",worldId:"__engine__",builtin:!0}),s.set("input.trace",{fn:()=>{const e=h(w.keys());return(e?w.get(e):void 0)?.()??{version:1,seed:null,fixedDt:null,ticks:[]}},tier:"observable",worldId:"__engine__",builtin:!0});function O(e,t,r,i){const n=s.get(t);if(n?.builtin)throw new c("DEBUG_BUILTIN_RESERVED",`debug: "${t}" is a built-in state provider (registered by "${n.worldId}") — built-in names cannot be registered over from a world`,{name:t,registered:n.worldId});if(n){if(n.worldId!==e)throw new c("DEBUG_NAME_COLLISION",`debug: state provider "${t}" is registered by both world "${n.worldId}" and world "${e}" — each provider name must be unique across live roots`,{name:t,roots:[n.worldId,e]});y(d,t,"provider",e)}s.set(t,{fn:r,tier:i,worldId:e,builtin:!1})}function A(e,t,r,i){if(r.locus===void 0&&I)throw new c("DEBUG_COMMAND_LOCUS_REQUIRED","this project declares a Colyseus room — declare locus: 'client' | 'server' so fixtures mutate authoritative state, not client prediction",{name:t,worldId:e});const n=u.get(t);if(n){if(n.worldId!==e)throw new c("DEBUG_NAME_COLLISION",`debug: command "${t}" is registered by both world "${n.worldId}" and world "${e}" — each command name must be unique across live roots`,{name:t,roots:[n.worldId,e]});y(S,t,"command",e)}u.set(t,{description:r.description,argsSchema:r.args,locus:r.locus,fn:i,worldId:e})}function k(e,t){p+=1,m.push({tick:o.getTick(),simT:o.getSimT(),event:e,detail:t,seq:p}),m.length>R&&m.shift()}function $(e){return e===void 0?m.slice():m.filter(t=>t.seq>e)}function G(e,t){if(!b)throw new c("DEBUG_COMMAND_FAILED",`debug: command "${e}" is locus:'server' but no Colyseus room is attached (call ctx.debug.attachRoom(room) once your game joins its room)`,{reason:"no room connection"});const r=`dbg-${++N}`,i=b;return new Promise((n,a)=>{const f=setTimeout(()=>{g.delete(r),a(new c("DEBUG_COMMAND_FAILED",`debug: command "${e}" (requestId "${r}") timed out waiting for the server`,{reason:"server timeout"}))},q);g.set(r,{resolve:n,reject:a,timer:f}),i.send("__volter:debugCommand",{name:e,args:t,requestId:r})})}let v=null;function U(e){v?.(),b=e;const t=e.onMessage("__volter:debugCommandResult",i=>{const n=i,a=n?.requestId;if(a===void 0)return;const f=g.get(a);f&&(g.delete(a),clearTimeout(f.timer),n?.ok?f.resolve(n.result):f.reject(new c("DEBUG_COMMAND_FAILED",`debug: server command failed: ${String(n?.error)}`,{cause:n?.error})))}),r=()=>{if(v===r){v=null,b===e&&(b=null),typeof t=="function"&&t();for(const[i,n]of g)clearTimeout(n.timer),n.reject(new c("DEBUG_COMMAND_FAILED",`debug: command (requestId "${i}") failed — its room was detached before a reply arrived`,{reason:"no room connection"}));g.clear()}};return v=r,r}return{adapter:{providers(){return[...s.entries()].map(([e,t])=>({name:e,tier:t.tier}))},state(e){const t=s.get(e);if(!t)throw new c("STATE_PROVIDER_NOT_FOUND",`debug: no state provider registered under "${e}"`,{registered:[...s.keys()],registrationHint:T});return t.fn()},stateAll(){const e={};for(const[t,r]of s)try{e[t]=r.fn()}catch(i){e[t]={__error:String(i)}}return e},commands(){return[...u.entries()].map(([e,t])=>({name:e,description:t.description,argsJsonSchema:t.argsSchema?L(t.argsSchema,{unrepresentable:"any"}):void 0,locus:t.locus??"client"}))},async invoke(e,t){const r=u.get(e);if(!r)throw new c("DEBUG_COMMAND_NOT_REGISTERED",`debug: no command registered under "${e}"`,{registered:[...u.keys()],registrationHint:T});let i=t;if(r.argsSchema){const n=r.argsSchema.safeParse(t);if(!n.success)throw new c("DEBUG_COMMAND_ARGS_INVALID",`debug: command "${e}" received invalid args`,{issues:n.error.issues});i=n.data}if((r.locus??"client")==="server")return G(e,i);try{return await r.fn(...i)}catch(n){const a=P(n);throw new c("DEBUG_COMMAND_FAILED",`debug: command "${e}" threw: ${a.causeMessage}`,{cause:n,...a})}},events(e){return $(e)}},forRoot(e){return{registerStateProvider(t,r,i){O(e,t,r,i?.tier??"observable")},registerCommand(t,r,i){A(e,t,r,i)},emit(t,r){k(t,r)},attachRoom(t){return U(t)}}},strip(e){for(const[t,r]of s)r.builtin||e!==void 0&&r.worldId!==e||(s.delete(t),d.delete(t));for(const[t,r]of u)e!==void 0&&r.worldId!==e||(u.delete(t),S.delete(t))},setRoomDeclared(e){I=e},setInputActionsSource(e,t){_.set(e,t)},setInputTraceSource(e,t){w.set(e,t)},setVirtualInputTarget(e,t){l.set(e,t)},getVirtualInputTarget(e){const t=C(e);return t!==null?l.get(t)??null:null},setRunTicksTarget(e){E=e},getRunTicksTarget(){return E},registerWorldSettledProbe(e){return D.add(e),()=>{D.delete(e)}},worldSettled(){for(const e of D)try{if(!e())return!1}catch{return!1}return!0},getGameTick(){return o.getTick()}}}const M=B("debug-registry");function j(o,s){M.set(o,s)}function H(o){return M.get(o)??null}export{c as D,V as a,B as c,H as g,j as r};
1
+ import{e0 as L}from"./index-BT8W9a7k.js";function B(o){const s=Symbol.for(`@volter/game-runtime/game-scoped/${o}`);return{set(u,d){Object.defineProperty(u,s,{configurable:!0,enumerable:!1,value:d})},get(u){return u[s]??null}}}class c extends Error{code;data;constructor(s,u,d){super(u),this.name="DebugError",this.code=s,this.data=d}}const T="ctx.debug.registerStateProvider(name, fn) — see the template example component";function P(o){if(o instanceof Error){const s={causeName:o.name,causeMessage:o.message};return o.stack===void 0?s:{...s,causeStack:o.stack}}return{causeName:typeof o,causeMessage:String(o)}}const q=1e4;function y(o,s,u,d){o.has(s)||(o.add(s),console.warn(`[debug] ${u} "${s}" re-registered (world "${d}")`))}function V(o){const s=new Map,u=new Map,d=new Set,S=new Set,m=[],R=500;let p=0,I=!1;const _=new Map,w=new Map,l=new Map;let E=null;const D=new Set;let b=null;const g=new Map;let N=0;function C(e){if(e!==void 0){if(!l.has(e))throw new c("DEBUG_INPUT_WORLD_NOT_FOUND",`debug: no input door wired for world "${e}" — registered: `+(l.size?[...l.keys()].join(", "):"(none)"),{worldId:e,registered:[...l.keys()]});return e}return h(l.keys())}function h(e){const t=[...e];if(t.length===0)return null;const r=o.getDefaultRootId?.()??null;return r!==null&&t.includes(r)?r:t[0]}s.set("time",{fn:()=>({simSeconds:o.getSimT(),tick:o.getTick(),loopLiveness:o.getLoopLiveness?.()??null,...o.getFixedDt===void 0?{}:{fixedDt:o.getFixedDt()}}),tier:"observable",worldId:"__engine__",builtin:!0}),s.set("input.actions",{fn:()=>{const e=h(_.keys());return(e?_.get(e):void 0)?.()??[]},tier:"observable",worldId:"__engine__",builtin:!0}),s.set("input.trace",{fn:()=>{const e=h(w.keys());return(e?w.get(e):void 0)?.()??{version:1,seed:null,fixedDt:null,ticks:[]}},tier:"observable",worldId:"__engine__",builtin:!0});function O(e,t,r,i){const n=s.get(t);if(n?.builtin)throw new c("DEBUG_BUILTIN_RESERVED",`debug: "${t}" is a built-in state provider (registered by "${n.worldId}") — built-in names cannot be registered over from a world`,{name:t,registered:n.worldId});if(n){if(n.worldId!==e)throw new c("DEBUG_NAME_COLLISION",`debug: state provider "${t}" is registered by both world "${n.worldId}" and world "${e}" — each provider name must be unique across live roots`,{name:t,roots:[n.worldId,e]});y(d,t,"provider",e)}s.set(t,{fn:r,tier:i,worldId:e,builtin:!1})}function A(e,t,r,i){if(r.locus===void 0&&I)throw new c("DEBUG_COMMAND_LOCUS_REQUIRED","this project declares a Colyseus room — declare locus: 'client' | 'server' so fixtures mutate authoritative state, not client prediction",{name:t,worldId:e});const n=u.get(t);if(n){if(n.worldId!==e)throw new c("DEBUG_NAME_COLLISION",`debug: command "${t}" is registered by both world "${n.worldId}" and world "${e}" — each command name must be unique across live roots`,{name:t,roots:[n.worldId,e]});y(S,t,"command",e)}u.set(t,{description:r.description,argsSchema:r.args,locus:r.locus,fn:i,worldId:e})}function k(e,t){p+=1,m.push({tick:o.getTick(),simT:o.getSimT(),event:e,detail:t,seq:p}),m.length>R&&m.shift()}function $(e){return e===void 0?m.slice():m.filter(t=>t.seq>e)}function G(e,t){if(!b)throw new c("DEBUG_COMMAND_FAILED",`debug: command "${e}" is locus:'server' but no Colyseus room is attached (call ctx.debug.attachRoom(room) once your game joins its room)`,{reason:"no room connection"});const r=`dbg-${++N}`,i=b;return new Promise((n,a)=>{const f=setTimeout(()=>{g.delete(r),a(new c("DEBUG_COMMAND_FAILED",`debug: command "${e}" (requestId "${r}") timed out waiting for the server`,{reason:"server timeout"}))},q);g.set(r,{resolve:n,reject:a,timer:f}),i.send("__volter:debugCommand",{name:e,args:t,requestId:r})})}let v=null;function U(e){v?.(),b=e;const t=e.onMessage("__volter:debugCommandResult",i=>{const n=i,a=n?.requestId;if(a===void 0)return;const f=g.get(a);f&&(g.delete(a),clearTimeout(f.timer),n?.ok?f.resolve(n.result):f.reject(new c("DEBUG_COMMAND_FAILED",`debug: server command failed: ${String(n?.error)}`,{cause:n?.error})))}),r=()=>{if(v===r){v=null,b===e&&(b=null),typeof t=="function"&&t();for(const[i,n]of g)clearTimeout(n.timer),n.reject(new c("DEBUG_COMMAND_FAILED",`debug: command (requestId "${i}") failed — its room was detached before a reply arrived`,{reason:"no room connection"}));g.clear()}};return v=r,r}return{adapter:{providers(){return[...s.entries()].map(([e,t])=>({name:e,tier:t.tier}))},state(e){const t=s.get(e);if(!t)throw new c("STATE_PROVIDER_NOT_FOUND",`debug: no state provider registered under "${e}"`,{registered:[...s.keys()],registrationHint:T});return t.fn()},stateAll(){const e={};for(const[t,r]of s)try{e[t]=r.fn()}catch(i){e[t]={__error:String(i)}}return e},commands(){return[...u.entries()].map(([e,t])=>({name:e,description:t.description,argsJsonSchema:t.argsSchema?L(t.argsSchema,{unrepresentable:"any"}):void 0,locus:t.locus??"client"}))},async invoke(e,t){const r=u.get(e);if(!r)throw new c("DEBUG_COMMAND_NOT_REGISTERED",`debug: no command registered under "${e}"`,{registered:[...u.keys()],registrationHint:T});let i=t;if(r.argsSchema){const n=r.argsSchema.safeParse(t);if(!n.success)throw new c("DEBUG_COMMAND_ARGS_INVALID",`debug: command "${e}" received invalid args`,{issues:n.error.issues});i=n.data}if((r.locus??"client")==="server")return G(e,i);try{return await r.fn(...i)}catch(n){const a=P(n);throw new c("DEBUG_COMMAND_FAILED",`debug: command "${e}" threw: ${a.causeMessage}`,{cause:n,...a})}},events(e){return $(e)}},forRoot(e){return{registerStateProvider(t,r,i){O(e,t,r,i?.tier??"observable")},registerCommand(t,r,i){A(e,t,r,i)},emit(t,r){k(t,r)},attachRoom(t){return U(t)}}},strip(e){for(const[t,r]of s)r.builtin||e!==void 0&&r.worldId!==e||(s.delete(t),d.delete(t));for(const[t,r]of u)e!==void 0&&r.worldId!==e||(u.delete(t),S.delete(t))},setRoomDeclared(e){I=e},setInputActionsSource(e,t){_.set(e,t)},setInputTraceSource(e,t){w.set(e,t)},setVirtualInputTarget(e,t){l.set(e,t)},getVirtualInputTarget(e){const t=C(e);return t!==null?l.get(t)??null:null},setRunTicksTarget(e){E=e},getRunTicksTarget(){return E},registerWorldSettledProbe(e){return D.add(e),()=>{D.delete(e)}},worldSettled(){for(const e of D)try{if(!e())return!1}catch{return!1}return!0},getGameTick(){return o.getTick()}}}const M=B("debug-registry");function j(o,s){M.set(o,s)}function H(o){return M.get(o)??null}export{c as D,V as a,B as c,H as g,j as r};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/canvas-entry-runtime-BHOqndB_.js","assets/index-EO6Vl92s.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/debug-registry-CoiJ_gHM.js","assets/mount-ingest-root-Dh6Z1uso.js","assets/active-ingest-CPY5d7Ae.js","assets/game-contract-seams-Dq1YiGya.js","assets/capability-coverage-BOaPg0KC.js","assets/ingest-source-persistence-C2eN6TUG.js","assets/contract-system-adapters-C1oaetXB.js","assets/three-state-15gXjQ51.js","assets/editor-shell-store-CW9Fjab9.js","assets/output-pass-HurwNl0G.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/Pass-D1MRT672.js","assets/editor-layers-B43PZgUF.js","assets/workspace-arrangement-COs530TA.js","assets/user-data-DnahhlAD.js","assets/entity-object-C40NpVSX.js","assets/three-contract-Dkt6PmWY.js"])))=>i.map(i=>d[i]);
2
- import{I as u,J as f,_ as i,K as d,L as n,M as m,O as p,Q as g}from"./index-EO6Vl92s.js";import{q as v}from"./edit-mode-authoring-C0sf0ewd.js";import{d as P,a as c,b as w,g as y,e as I,c as _}from"./active-ingest-CPY5d7Ae.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./game-contract-seams-Dq1YiGya.js";import"./capability-coverage-BOaPg0KC.js";import"./ingest-source-persistence-C2eN6TUG.js";import"./contract-system-adapters-C1oaetXB.js";async function h(){const e=await u().catch(()=>null);if(!e)return!1;const t=f(e);if(t.length!==1)return!1;if(t[0].world!==void 0)return!0;const a=await R();return A(a)}const D=4e3;function R(){const e=n();return e?Promise.resolve(e):new Promise(t=>{const a=setTimeout(()=>{s(),t(n())},D),s=m(()=>{const r=n();r&&(clearTimeout(a),s(),t(r))})})}function A(e){return e?p(e.scenes).some(t=>t.plan.kind==="isolation-document"):!1}async function G(e){if(!await h())return!1;const t=await u().catch(()=>null);if((t?f(t).some(r=>r.adapter.surface==="canvas"):!1)&&!c()){const{resolveCanvasPixiForEditor:r}=await i(async()=>{const{resolveCanvasPixiForEditor:l}=await import("./canvas-entry-runtime-BHOqndB_.js");return{resolveCanvasPixiForEditor:l}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]));(await r()).Assets.reset()}const{launchIngestRoutes:s}=await i(async()=>{const{launchIngestRoutes:r}=await import("./mount-ingest-root-Dh6Z1uso.js").then(o=>o.m);return{launchIngestRoutes:r}},__vite__mapDeps([12,1,2,3,4,5,6,7,8,9,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28]));if(await s(e),!c())throw new Error(`Play could not start: this project's ingest root failed to mount — see the mount failure reported above (and in ${d("status")}).`);return w(),g(),y()?.play(),!0}function J(e){return P()?(I(),_(),e.shell.setPlayState("stopped"),v(),!0):!1}export{P as deferredIngestPlayActive,J as exitDeferredIngestPlay,h as ingestMountIsDeferredToPlay,G as mountDeferredIngestForPlay};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/canvas-entry-runtime-Ce7wP4vm.js","assets/index-BT8W9a7k.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/debug-registry-CS3ZmHpb.js","assets/mount-ingest-root-BgFa-gMa.js","assets/active-ingest-DmggGh3n.js","assets/game-contract-seams-BfTLgo42.js","assets/capability-coverage-O6aDzS_g.js","assets/ingest-source-persistence-BSy_j1I6.js","assets/contract-system-adapters-BOybM-Sv.js","assets/three-state-BPIdxcKm.js","assets/editor-shell-store-BRBXaK6_.js","assets/output-pass-HurwNl0G.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/Pass-D1MRT672.js","assets/editor-layers-JmP4C0fP.js","assets/workspace-arrangement-B1xtK850.js","assets/user-data-CqubllMS.js","assets/entity-object-FbYj5hy6.js","assets/three-contract-Dkt6PmWY.js"])))=>i.map(i=>d[i]);
2
+ import{I as u,J as f,_ as i,K as d,L as n,M as m,O as p,Q as g}from"./index-BT8W9a7k.js";import{q as v}from"./edit-mode-authoring-CFh9mf99.js";import{d as P,a as c,b as w,g as y,e as I,c as _}from"./active-ingest-DmggGh3n.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./game-contract-seams-BfTLgo42.js";import"./capability-coverage-O6aDzS_g.js";import"./ingest-source-persistence-BSy_j1I6.js";import"./contract-system-adapters-BOybM-Sv.js";async function h(){const e=await u().catch(()=>null);if(!e)return!1;const t=f(e);if(t.length!==1)return!1;if(t[0].world!==void 0)return!0;const a=await R();return A(a)}const D=4e3;function R(){const e=n();return e?Promise.resolve(e):new Promise(t=>{const a=setTimeout(()=>{s(),t(n())},D),s=m(()=>{const r=n();r&&(clearTimeout(a),s(),t(r))})})}function A(e){return e?p(e.scenes).some(t=>t.plan.kind==="isolation-document"):!1}async function G(e){if(!await h())return!1;const t=await u().catch(()=>null);if((t?f(t).some(r=>r.adapter.surface==="canvas"):!1)&&!c()){const{resolveCanvasPixiForEditor:r}=await i(async()=>{const{resolveCanvasPixiForEditor:l}=await import("./canvas-entry-runtime-Ce7wP4vm.js");return{resolveCanvasPixiForEditor:l}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]));(await r()).Assets.reset()}const{launchIngestRoutes:s}=await i(async()=>{const{launchIngestRoutes:r}=await import("./mount-ingest-root-BgFa-gMa.js").then(o=>o.m);return{launchIngestRoutes:r}},__vite__mapDeps([12,1,2,3,4,5,6,7,8,9,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28]));if(await s(e),!c())throw new Error(`Play could not start: this project's ingest root failed to mount — see the mount failure reported above (and in ${d("status")}).`);return w(),g(),y()?.play(),!0}function J(e){return P()?(I(),_(),e.shell.setPlayState("stopped"),v(),!0):!1}export{P as deferredIngestPlayActive,J as exitDeferredIngestPlay,h as ingestMountIsDeferredToPlay,G as mountDeferredIngestForPlay};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/canvas-design-mount-Bp3K3717.js","assets/index-EO6Vl92s.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/babylon-authoring-adapter-CnxkYjhp.js","assets/json-history-resource-BjCvVkMa.js","assets/source-persistence-backend-DPS956_W.js","assets/ingest-source-persistence-C2eN6TUG.js","assets/pixi-authoring-adapter-QT0kN-JP.js","assets/index-BTlpcjdl.js","assets/component-instance-root-JAQpC4Pi.js","assets/user-data-DnahhlAD.js","assets/workspace-arrangement-COs530TA.js","assets/pixi-transform-channels-P4rvmusc.js","assets/relative-import-specifier-DjG-Lv03.js","assets/oid-transform-DsAJ1P8o.js","assets/writer-tw6EcuVO.js","assets/r3f-physics-binding-CFwn2dZ0.js","assets/canvas-preview-frames-2tJZVdS2.js","assets/canvas-entry-runtime-BHOqndB_.js","assets/debug-registry-CoiJ_gHM.js","assets/realm-services-Bw73w74M.js","assets/three-ingest-runtime-DlApOywz.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/EffectComposer-BEAt0PtQ.js","assets/CopyShader-BzTUYzf6.js","assets/ShaderPass-DTnDQXm0.js","assets/Pass-D1MRT672.js","assets/CSS3DRenderer-BsAqfavI.js","assets/native-debug-module-piwWLOP6.js","assets/native-entry-surface-BE8LJNdu.js","assets/contract-system-adapters-C1oaetXB.js","assets/game-contract-seams-Dq1YiGya.js","assets/assets-BcrMQHRv.js","assets/loader-BTUKnX5Q.js","assets/KTX2Loader-CaqVE6nY.js","assets/GLTFLoader-KeoruJgS.js","assets/BufferGeometryUtils-B22h7jo4.js","assets/create-runtime-BQdKNIfc.js","assets/adapter-surface-Y37Nzcyw.js","assets/binding-Bmxqznjk.js","assets/root-stacking-BEd9ZvxC.js","assets/setup-renderer-BoEjWIJ6.js","assets/index-DHhMOs_s.js","assets/defaults-DKiBJCPN.js","assets/render-settings-CGDwkhhL.js","assets/render-features-w9Z-Cv_p.js","assets/seeded-random-BcjdE8-O.js","assets/loop-gate-report-N52EWFGD.js","assets/system-slot-E2mEdiih.js","assets/user-data-CODoGZqA.js","assets/object-marks-BnvSuCTt.js","assets/performance-profiler-CMbwGBuk.js"])))=>i.map(i=>d[i]);
2
- import{_ as u,dI as c,dJ as l}from"./index-EO6Vl92s.js";import{t as d}from"./three-state-15gXjQ51.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"./editor-shell-store-CW9Fjab9.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./Pass-D1MRT672.js";import"./editor-layers-B43PZgUF.js";import"./workspace-arrangement-COs530TA.js";import"./user-data-DnahhlAD.js";import"./entity-object-C40NpVSX.js";import"./three-contract-Dkt6PmWY.js";async function W(o,t,e){const{mountCanvasDesignLayer:r}=await u(async()=>{const{mountCanvasDesignLayer:p}=await import("./canvas-design-mount-Bp3K3717.js");return{mountCanvasDesignLayer:p}},__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])),{projectRootPath:s,view:a,activationDocumentId:i}=e,n=d();if(!n)throw new Error(`canvas root "${o.worldId}": the editor store is not bound yet.`);const m=await r(o.worldId,o.path,t,s,n,a,i?()=>c(i):void 0);return{adapter:m.adapter,dispose:()=>m.dispose()}}function $(o){let t=null;const e=l(r=>{r!==""&&!/^src\/.+\.(?:[cm]?tsx?|jsx?)$/.test(r)||(t!==null&&clearTimeout(t),t=setTimeout(()=>{t=null,o()},150))});return()=>{t!==null&&clearTimeout(t),t=null,e()}}export{W as mountCanvasDesignTimeLayer,$ as remountWhenSourceIsWritten};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/canvas-design-mount-DVWp3O_D.js","assets/index-BT8W9a7k.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/babylon-authoring-adapter-DOzhuS5E.js","assets/json-history-resource-Kth9eAdl.js","assets/source-persistence-backend-Bs_c6UA-.js","assets/ingest-source-persistence-BSy_j1I6.js","assets/pixi-authoring-adapter-HA__hq94.js","assets/index-DL2Takj5.js","assets/component-instance-root-C1Xyh79V.js","assets/user-data-CqubllMS.js","assets/workspace-arrangement-B1xtK850.js","assets/pixi-transform-channels-P4rvmusc.js","assets/relative-import-specifier-D8ICYdXp.js","assets/oid-transform-AhgVgFiI.js","assets/writer-tw6EcuVO.js","assets/r3f-physics-binding-DivDhpIZ.js","assets/canvas-preview-frames-CHeT2IAu.js","assets/canvas-entry-runtime-Ce7wP4vm.js","assets/debug-registry-CS3ZmHpb.js","assets/realm-services-CLLV-0p7.js","assets/three-ingest-runtime-DhyHlcLT.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/EffectComposer-BEAt0PtQ.js","assets/CopyShader-BzTUYzf6.js","assets/ShaderPass-DTnDQXm0.js","assets/Pass-D1MRT672.js","assets/CSS3DRenderer-BsAqfavI.js","assets/native-debug-module-zuPnGFn7.js","assets/native-entry-surface-BE8LJNdu.js","assets/contract-system-adapters-BOybM-Sv.js","assets/game-contract-seams-BfTLgo42.js","assets/assets-BcrMQHRv.js","assets/loader-BTUKnX5Q.js","assets/KTX2Loader-CaqVE6nY.js","assets/GLTFLoader-KeoruJgS.js","assets/BufferGeometryUtils-B22h7jo4.js","assets/create-runtime-C232YTVD.js","assets/adapter-surface-Y37Nzcyw.js","assets/binding-Bmxqznjk.js","assets/root-stacking-BEd9ZvxC.js","assets/setup-renderer-D2Jvr2h9.js","assets/index-DHhMOs_s.js","assets/defaults-DKiBJCPN.js","assets/render-settings-DoSjRl16.js","assets/render-features-PxgXd53t.js","assets/seeded-random-BscHstMm.js","assets/loop-gate-report-N52EWFGD.js","assets/system-slot-E2mEdiih.js","assets/user-data-CODoGZqA.js","assets/object-marks-BnvSuCTt.js","assets/performance-profiler-CMbwGBuk.js"])))=>i.map(i=>d[i]);
2
+ import{_ as u,dI as c,dJ as l}from"./index-BT8W9a7k.js";import{t as d}from"./three-state-BPIdxcKm.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"./editor-shell-store-BRBXaK6_.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./Pass-D1MRT672.js";import"./editor-layers-JmP4C0fP.js";import"./workspace-arrangement-B1xtK850.js";import"./user-data-CqubllMS.js";import"./entity-object-FbYj5hy6.js";import"./three-contract-Dkt6PmWY.js";async function W(o,t,e){const{mountCanvasDesignLayer:r}=await u(async()=>{const{mountCanvasDesignLayer:p}=await import("./canvas-design-mount-DVWp3O_D.js");return{mountCanvasDesignLayer:p}},__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])),{projectRootPath:s,view:a,activationDocumentId:i}=e,n=d();if(!n)throw new Error(`canvas root "${o.worldId}": the editor store is not bound yet.`);const m=await r(o.worldId,o.path,t,s,n,a,i?()=>c(i):void 0);return{adapter:m.adapter,dispose:()=>m.dispose()}}function $(o){let t=null;const e=l(r=>{r!==""&&!/^src\/.+\.(?:[cm]?tsx?|jsx?)$/.test(r)||(t!==null&&clearTimeout(t),t=setTimeout(()=>{t=null,o()},150))});return()=>{t!==null&&clearTimeout(t),t=null,e()}}export{W as mountCanvasDesignTimeLayer,$ as remountWhenSourceIsWritten};
@@ -1 +1 @@
1
- import{stackOrder as se}from"./root-stacking-BEd9ZvxC.js";import{dM as ie,dN as de,dO as le,dB as ue,aC as ae,dP as q,bY as fe,Z as P,bX as pe,aH as ce,dQ as we,dE as he,dC as ye}from"./index-EO6Vl92s.js";import{B as S,q as N}from"./edit-mode-authoring-C0sf0ewd.js";import{s as me,d as I,a as ge}from"./design-time-mount-registry-DUpXCg1U.js";import{d as Ie,s as be,g as ve,e as Se}from"./react-story-board-BdHhG7gL.js";import{m as ke}from"./game-surface-defaults-D8S4cRxi.js";const H=new Map;function X(n,r){return`${n}\0${r}`}function De(n,r){return H.get(X(n,r))}function Ve(n,r,t){H.set(X(n,r),t)}const Ce=1;function Y(n){const r=[];for(const{worldId:t,adapter:d}of n.childAdapters()){if(!(d instanceof S))continue;const u=d.inspector.get(t,"kind");if(u!=="dom"&&u!=="canvas"||d.inspector.get(t,"reason")!==void 0)continue;const b=d.inspector.get(t,"adapter");b?.startsWith("ingest")||b?.startsWith("module")||r.push({worldId:t,kind:u,path:d.inspector.get(t,"path"),zOrder:Number(d.inspector.get(t,"zOrder")??0),pausable:d.inspector.get(t,"pausable")!==!1})}return r}function xe(n){return Y(n)}const Oe="ui-components-board";function j(n,r){return n.childAdapters().some(t=>t.worldId===r)}function We(){return{worldId:Oe,kind:"dom",path:void 0,zOrder:0,pausable:!0}}function Z(n,r,t="dom"){const d=ce(r)?"none":"block";n.style.display=d,n.style.pointerEvents=I(t)?.alwaysInteractive||we(r)?"auto":"none";for(const u of Array.from(n.parentElement?.children??[]))u instanceof HTMLElement&&u.dataset.volterStoryBoardChromeFor===r&&(u.style.display=d)}function Re(n,r,t,d){const{worldId:u}=r,s=document.createElement("div");return s.dataset.worldId=u,s.dataset.volterRootSurface="true",d&&(s.dataset.volterCanvasScene="true"),s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.width="100%",s.style.height="100%",s.style.zIndex=String(t),s.style.contain="layout paint",ke(s),Z(s,u,r.kind),D(s),n.appendChild(s),s}function D(n){if(n.dataset.volterCanvasScene==="true"){n.style.transform="",n.style.width="100%",n.style.height="100%";return}if(n.style.transform=he(ye())??"",n.style.transformOrigin="0 0",n.dataset.volterReactStoryBoard==="true")return;const r=ve();n.style.width=r.width===null?"100%":`${r.width}px`,n.style.height=r.height===null?"100%":`${r.height}px`}const E=new Map;function Ae(n,r,t,d,u,s,b){s?s.canvasSceneView.reset():ie(),Se();const k=ae();if(!s&&k?.config.resolution&&Ie(k.config.resolution.width,k.config.resolution.height),t.playState!=="stopped"){let e=!1,o=!1;const i=t.subscribe(()=>{e||o||t.playState!=="stopped"||(o=!0,e||N())});return()=>{e=!0,i()}}const V=k?.rootPath,z=d?[...d]:Y(r);if(z.length===0||!V)return()=>{};const G=V,y=se(z.map(e=>({id:e.worldId,zOrder:e.zOrder}))).map(e=>z.find(o=>o.worldId===e.id)),x=new Map(y.map(e=>[e.worldId,e])),a=new Map,m=new Map,C=new Map,O=new Set,R=new Set,T=new Set;let h=!1,p=!1,W=!1;function A(){for(const e of m.values())try{e()}catch(o){P.error(`[design-time-layers] dispose failed: ${o}`,"authoring")}m.clear();for(const e of a.values())e.remove();a.clear();for(const e of y)u?.(e.worldId,null)}function J(){A();for(const e of O){const o=x.get(e);if(!o)continue;const i={id:o.worldId,kind:o.kind,entryOrScenePath:o.path,zOrder:o.zOrder,pausable:o.pausable};r.replaceChild(e,new S(t,i,"Design-time layer suspended by play mode — Stop restores it."))}O.clear(),t.notifyIngestEdit()}function M(e,o,i){const l=I(e.kind);if(!l){R.add(e.worldId);return}R.delete(e.worldId);const f=(C.get(e.worldId)??0)+1;C.set(e.worldId,f);const c=Re(n,e,Ce+o,!!s);a.set(e.worldId,c);const B={projectRootPath:G,store:t,...s?{view:s.canvasSceneView}:{},...b?{activationDocumentId:b}:{}},L=E.get(e.worldId),$=(async()=>(L&&await L,l.mount(e,c,B)))().then(w=>{if(h||p||C.get(e.worldId)!==f){w.dispose();return}if(w.adapter)j(r,e.worldId)&&(r.replaceChild(e.worldId,w.adapter),O.add(e.worldId)),u?.(e.worldId,w.adapter);else if(w.pick){const v={id:e.worldId,kind:e.kind,entryOrScenePath:e.path,zOrder:e.zOrder,pausable:e.pausable};r.replaceChild(e.worldId,new S(t,v,void 0,w.pick)),O.add(e.worldId)}m.set(e.worldId,w.dispose),q(e.worldId),t.notifyIngestEdit(),i?.()}).catch(w=>{if(C.get(e.worldId)!==f||(i?.(),c.remove(),a.get(e.worldId)===c&&a.delete(e.worldId),h||p))return;const v=fe(w);P.error(`[design-time-layers] world "${e.worldId}" (${e.kind}) failed to mount: ${v}`,"authoring");const ne={id:e.worldId,kind:e.kind,entryOrScenePath:e.path,zOrder:e.zOrder,pausable:e.pausable};u?.(e.worldId,null),j(r,e.worldId)&&r.replaceChild(e.worldId,new S(t,ne,v)),pe({worldId:e.worldId,kind:e.kind,identity:l.identity,message:v}),t.notifyIngestEdit()});E.set(e.worldId,$),$.then(()=>{E.get(e.worldId)===$&&E.delete(e.worldId)})}y.forEach((e,o)=>{M(e,o)});function K(e,o){const i=m.get(e.worldId);m.delete(e.worldId);const l=a.get(e.worldId);a.delete(e.worldId),M(e,o,()=>{const c=a.get(e.worldId);if(c&&(c.style.visibility=""),i)try{i()}catch(B){P.error(`[design-time-layers] re-projection dispose failed: ${B}`,"authoring")}l?.remove()});const f=a.get(e.worldId);f&&f!==l&&(f.style.visibility="hidden")}function Q(e,o){const i=m.get(e.worldId);if(m.delete(e.worldId),i)try{i()}catch(f){P.error(`[design-time-layers] remount dispose failed: ${f}`,"authoring")}const l=a.get(e.worldId);l&&(l.remove(),a.delete(e.worldId)),M(e,o)}const g=new Map;function F(){for(const[e,o]of g)I(e.kind)!==e&&(o(),g.delete(e));for(const e of ge()){if(g.has(e)||I(e.kind)!==e||!y.some(l=>l.kind===e.kind))continue;const o=[],i=l=>()=>{h||p||t.playState!=="stopped"||y.forEach((f,c)=>{f.kind===e.kind&&l(f,c)})};e.remountWhen&&o.push(e.remountWhen(i(Q))),e.reprojectWhen&&o.push(e.reprojectWhen(i(K))),g.set(e,()=>{for(const l of o)l()})}}F();const U=me(()=>{h||p||t.playState!=="stopped"||(y.forEach((e,o)=>{R.has(e.worldId)&&I(e.kind)&&(T.delete(e.worldId),q(e.worldId),M(e,o))}),F())}),_=()=>{if(h||p)return;let e=!1;for(const o of y){if(!R.has(o.worldId)||T.has(o.worldId)||I(o.kind)||(T.add(o.worldId),!j(r,o.worldId)))continue;const i={id:o.worldId,kind:o.kind,entryOrScenePath:o.path,zOrder:o.zOrder,pausable:o.pausable};r.replaceChild(o.worldId,new S(t,i,`No package in this editor registered a design-time mount for a "${o.kind}" world, so there is nothing here to author it with.`)),e=!0}e&&t.notifyIngestEdit()},ee=de(_);le()&&_();const oe=ue(()=>{for(const e of a.values())D(e)}),te=be(()=>{for(const e of a.values())D(e)}),re=t.subscribe(()=>{if(!p&&t.playState!=="stopped"){p=!0,J();return}if(p&&!W&&t.playState==="stopped"&&!h){W=!0,h||N();return}if(!p)for(const[e,o]of a)Z(o,e,x.get(e)?.kind??"dom")});return()=>{h=!0;for(const e of g.values())e();g.clear(),U(),ee(),re(),oe(),te(),A()}}export{Ve as a,xe as d,Ae as m,We as p,De as r};
1
+ import{stackOrder as se}from"./root-stacking-BEd9ZvxC.js";import{dM as ie,dN as de,dO as le,dB as ue,aC as ae,dP as q,bY as fe,Z as P,bX as pe,aH as ce,dQ as we,dE as he,dC as ye}from"./index-BT8W9a7k.js";import{B as S,q as N}from"./edit-mode-authoring-CFh9mf99.js";import{s as me,d as I,a as ge}from"./design-time-mount-registry-DUpXCg1U.js";import{d as Ie,s as be,g as ve,e as Se}from"./react-story-board-BIV6SjrH.js";import{m as ke}from"./game-surface-defaults-D8S4cRxi.js";const H=new Map;function X(n,r){return`${n}\0${r}`}function De(n,r){return H.get(X(n,r))}function Ve(n,r,t){H.set(X(n,r),t)}const Ce=1;function Y(n){const r=[];for(const{worldId:t,adapter:d}of n.childAdapters()){if(!(d instanceof S))continue;const u=d.inspector.get(t,"kind");if(u!=="dom"&&u!=="canvas"||d.inspector.get(t,"reason")!==void 0)continue;const b=d.inspector.get(t,"adapter");b?.startsWith("ingest")||b?.startsWith("module")||r.push({worldId:t,kind:u,path:d.inspector.get(t,"path"),zOrder:Number(d.inspector.get(t,"zOrder")??0),pausable:d.inspector.get(t,"pausable")!==!1})}return r}function xe(n){return Y(n)}const Oe="ui-components-board";function j(n,r){return n.childAdapters().some(t=>t.worldId===r)}function We(){return{worldId:Oe,kind:"dom",path:void 0,zOrder:0,pausable:!0}}function Z(n,r,t="dom"){const d=ce(r)?"none":"block";n.style.display=d,n.style.pointerEvents=I(t)?.alwaysInteractive||we(r)?"auto":"none";for(const u of Array.from(n.parentElement?.children??[]))u instanceof HTMLElement&&u.dataset.volterStoryBoardChromeFor===r&&(u.style.display=d)}function Re(n,r,t,d){const{worldId:u}=r,s=document.createElement("div");return s.dataset.worldId=u,s.dataset.volterRootSurface="true",d&&(s.dataset.volterCanvasScene="true"),s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.width="100%",s.style.height="100%",s.style.zIndex=String(t),s.style.contain="layout paint",ke(s),Z(s,u,r.kind),D(s),n.appendChild(s),s}function D(n){if(n.dataset.volterCanvasScene==="true"){n.style.transform="",n.style.width="100%",n.style.height="100%";return}if(n.style.transform=he(ye())??"",n.style.transformOrigin="0 0",n.dataset.volterReactStoryBoard==="true")return;const r=ve();n.style.width=r.width===null?"100%":`${r.width}px`,n.style.height=r.height===null?"100%":`${r.height}px`}const E=new Map;function Ae(n,r,t,d,u,s,b){s?s.canvasSceneView.reset():ie(),Se();const k=ae();if(!s&&k?.config.resolution&&Ie(k.config.resolution.width,k.config.resolution.height),t.playState!=="stopped"){let e=!1,o=!1;const i=t.subscribe(()=>{e||o||t.playState!=="stopped"||(o=!0,e||N())});return()=>{e=!0,i()}}const V=k?.rootPath,z=d?[...d]:Y(r);if(z.length===0||!V)return()=>{};const G=V,y=se(z.map(e=>({id:e.worldId,zOrder:e.zOrder}))).map(e=>z.find(o=>o.worldId===e.id)),x=new Map(y.map(e=>[e.worldId,e])),a=new Map,m=new Map,C=new Map,O=new Set,R=new Set,T=new Set;let h=!1,p=!1,W=!1;function A(){for(const e of m.values())try{e()}catch(o){P.error(`[design-time-layers] dispose failed: ${o}`,"authoring")}m.clear();for(const e of a.values())e.remove();a.clear();for(const e of y)u?.(e.worldId,null)}function J(){A();for(const e of O){const o=x.get(e);if(!o)continue;const i={id:o.worldId,kind:o.kind,entryOrScenePath:o.path,zOrder:o.zOrder,pausable:o.pausable};r.replaceChild(e,new S(t,i,"Design-time layer suspended by play mode — Stop restores it."))}O.clear(),t.notifyIngestEdit()}function M(e,o,i){const l=I(e.kind);if(!l){R.add(e.worldId);return}R.delete(e.worldId);const f=(C.get(e.worldId)??0)+1;C.set(e.worldId,f);const c=Re(n,e,Ce+o,!!s);a.set(e.worldId,c);const B={projectRootPath:G,store:t,...s?{view:s.canvasSceneView}:{},...b?{activationDocumentId:b}:{}},L=E.get(e.worldId),$=(async()=>(L&&await L,l.mount(e,c,B)))().then(w=>{if(h||p||C.get(e.worldId)!==f){w.dispose();return}if(w.adapter)j(r,e.worldId)&&(r.replaceChild(e.worldId,w.adapter),O.add(e.worldId)),u?.(e.worldId,w.adapter);else if(w.pick){const v={id:e.worldId,kind:e.kind,entryOrScenePath:e.path,zOrder:e.zOrder,pausable:e.pausable};r.replaceChild(e.worldId,new S(t,v,void 0,w.pick)),O.add(e.worldId)}m.set(e.worldId,w.dispose),q(e.worldId),t.notifyIngestEdit(),i?.()}).catch(w=>{if(C.get(e.worldId)!==f||(i?.(),c.remove(),a.get(e.worldId)===c&&a.delete(e.worldId),h||p))return;const v=fe(w);P.error(`[design-time-layers] world "${e.worldId}" (${e.kind}) failed to mount: ${v}`,"authoring");const ne={id:e.worldId,kind:e.kind,entryOrScenePath:e.path,zOrder:e.zOrder,pausable:e.pausable};u?.(e.worldId,null),j(r,e.worldId)&&r.replaceChild(e.worldId,new S(t,ne,v)),pe({worldId:e.worldId,kind:e.kind,identity:l.identity,message:v}),t.notifyIngestEdit()});E.set(e.worldId,$),$.then(()=>{E.get(e.worldId)===$&&E.delete(e.worldId)})}y.forEach((e,o)=>{M(e,o)});function K(e,o){const i=m.get(e.worldId);m.delete(e.worldId);const l=a.get(e.worldId);a.delete(e.worldId),M(e,o,()=>{const c=a.get(e.worldId);if(c&&(c.style.visibility=""),i)try{i()}catch(B){P.error(`[design-time-layers] re-projection dispose failed: ${B}`,"authoring")}l?.remove()});const f=a.get(e.worldId);f&&f!==l&&(f.style.visibility="hidden")}function Q(e,o){const i=m.get(e.worldId);if(m.delete(e.worldId),i)try{i()}catch(f){P.error(`[design-time-layers] remount dispose failed: ${f}`,"authoring")}const l=a.get(e.worldId);l&&(l.remove(),a.delete(e.worldId)),M(e,o)}const g=new Map;function F(){for(const[e,o]of g)I(e.kind)!==e&&(o(),g.delete(e));for(const e of ge()){if(g.has(e)||I(e.kind)!==e||!y.some(l=>l.kind===e.kind))continue;const o=[],i=l=>()=>{h||p||t.playState!=="stopped"||y.forEach((f,c)=>{f.kind===e.kind&&l(f,c)})};e.remountWhen&&o.push(e.remountWhen(i(Q))),e.reprojectWhen&&o.push(e.reprojectWhen(i(K))),g.set(e,()=>{for(const l of o)l()})}}F();const U=me(()=>{h||p||t.playState!=="stopped"||(y.forEach((e,o)=>{R.has(e.worldId)&&I(e.kind)&&(T.delete(e.worldId),q(e.worldId),M(e,o))}),F())}),_=()=>{if(h||p)return;let e=!1;for(const o of y){if(!R.has(o.worldId)||T.has(o.worldId)||I(o.kind)||(T.add(o.worldId),!j(r,o.worldId)))continue;const i={id:o.worldId,kind:o.kind,entryOrScenePath:o.path,zOrder:o.zOrder,pausable:o.pausable};r.replaceChild(o.worldId,new S(t,i,`No package in this editor registered a design-time mount for a "${o.kind}" world, so there is nothing here to author it with.`)),e=!0}e&&t.notifyIngestEdit()},ee=de(_);le()&&_();const oe=ue(()=>{for(const e of a.values())D(e)}),te=be(()=>{for(const e of a.values())D(e)}),re=t.subscribe(()=>{if(!p&&t.playState!=="stopped"){p=!0,J();return}if(p&&!W&&t.playState==="stopped"&&!h){W=!0,h||N();return}if(!p)for(const[e,o]of a)Z(o,e,x.get(e)?.kind??"dom")});return()=>{h=!0;for(const e of g.values())e();g.clear(),U(),ee(),re(),oe(),te(),A()}}export{Ve as a,xe as d,Ae as m,We as p,De as r};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/design-time-canvas-mount-B_5sxSjq.js","assets/index-EO6Vl92s.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-state-15gXjQ51.js","assets/editor-shell-store-CW9Fjab9.js","assets/output-pass-HurwNl0G.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/Pass-D1MRT672.js","assets/editor-layers-B43PZgUF.js","assets/workspace-arrangement-COs530TA.js","assets/user-data-DnahhlAD.js","assets/entity-object-C40NpVSX.js","assets/three-contract-Dkt6PmWY.js"])))=>i.map(i=>d[i]);
2
- import{_ as n}from"./index-EO6Vl92s.js";import{r as a}from"./design-time-mount-registry-DUpXCg1U.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const g="workspace.service";function y(){return a({kind:"canvas",owner:"@volter/editor-game/canvas/design-time-mount",identity:"default-pixi",alwaysInteractive:!0,mount:async(r,e,t)=>{const{mountCanvasDesignTimeLayer:i}=await n(async()=>{const{mountCanvasDesignTimeLayer:o}=await import("./design-time-canvas-mount-B_5sxSjq.js");return{mountCanvasDesignTimeLayer:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]));return i(r,e,t)},remountWhen:r=>{let e=!1,t=null;return n(()=>import("./design-time-canvas-mount-B_5sxSjq.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])).then(i=>{e||(t=i.remountWhenSourceIsWritten(r))}),()=>{e=!0,t?.(),t=null}}})}export{g as point,y as start};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/design-time-canvas-mount-BxG0btu3.js","assets/index-BT8W9a7k.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-state-BPIdxcKm.js","assets/editor-shell-store-BRBXaK6_.js","assets/output-pass-HurwNl0G.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/Pass-D1MRT672.js","assets/editor-layers-JmP4C0fP.js","assets/workspace-arrangement-B1xtK850.js","assets/user-data-CqubllMS.js","assets/entity-object-FbYj5hy6.js","assets/three-contract-Dkt6PmWY.js"])))=>i.map(i=>d[i]);
2
+ import{_ as n}from"./index-BT8W9a7k.js";import{r as a}from"./design-time-mount-registry-DUpXCg1U.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const g="workspace.service";function y(){return a({kind:"canvas",owner:"@volter/editor-game/canvas/design-time-mount",identity:"default-pixi",alwaysInteractive:!0,mount:async(r,e,t)=>{const{mountCanvasDesignTimeLayer:i}=await n(async()=>{const{mountCanvasDesignTimeLayer:o}=await import("./design-time-canvas-mount-BxG0btu3.js");return{mountCanvasDesignTimeLayer:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]));return i(r,e,t)},remountWhen:r=>{let e=!1,t=null;return n(()=>import("./design-time-canvas-mount-BxG0btu3.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])).then(i=>{e||(t=i.remountWhenSourceIsWritten(r))}),()=>{e=!0,t?.(),t=null}}})}export{g as point,y as start};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/design-time-react-mount--CifCE6t.js","assets/design-time-layers-Bspf2qH5.js","assets/root-stacking-BEd9ZvxC.js","assets/index-EO6Vl92s.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-C0sf0ewd.js","assets/design-time-mount-registry-DUpXCg1U.js","assets/react-story-board-BdHhG7gL.js","assets/game-surface-defaults-D8S4cRxi.js","assets/crash-null-boundary-v3a0uEgw.js","assets/realm-services-Bw73w74M.js","assets/canvas-entry-runtime-BHOqndB_.js","assets/debug-registry-CoiJ_gHM.js","assets/three-ingest-runtime-DlApOywz.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/EffectComposer-BEAt0PtQ.js","assets/CopyShader-BzTUYzf6.js","assets/ShaderPass-DTnDQXm0.js","assets/Pass-D1MRT672.js","assets/CSS3DRenderer-BsAqfavI.js","assets/react-root-BHA-cdrW.js","assets/StoryPreviewMount-BODkiKx5.js","assets/story-presentation-Inb0tF8V.js","assets/three-story-model-D8xXaW4_.js","assets/inspect-BqpAh85y.js","assets/inference-diagnostics-18bkEAju.js","assets/react-world-authoring-adapter-Cey0R-Ml.js","assets/board-guides-D-k2cJcJ.js","assets/relative-import-specifier-DjG-Lv03.js","assets/story-arg-descriptors-Ek86ExX7.js","assets/writer-tw6EcuVO.js"])))=>i.map(i=>d[i]);
2
- import{_ as i}from"./index-EO6Vl92s.js";import{r as m}from"./design-time-mount-registry-DUpXCg1U.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const v="workspace.service";function y(){return m({kind:"dom",owner:"@volter/editor-game/react/design-time-mount",identity:"default-react",mount:async(r,e,t)=>{const{mountReactDesignLayer:o}=await i(async()=>{const{mountReactDesignLayer:n}=await import("./design-time-react-mount--CifCE6t.js");return{mountReactDesignLayer:n}},__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]));return o(r,e,t)},reprojectWhen:r=>{let e=!1,t=null;return i(()=>import("./design-time-react-mount--CifCE6t.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])).then(o=>{e||(t=o.reprojectWhenStoriesRepublish(r))}),()=>{e=!0,t?.(),t=null}}})}export{v as point,y as start};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/design-time-react-mount-DsV5z0NJ.js","assets/design-time-layers-C2fW3RP2.js","assets/root-stacking-BEd9ZvxC.js","assets/index-BT8W9a7k.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-CFh9mf99.js","assets/design-time-mount-registry-DUpXCg1U.js","assets/react-story-board-BIV6SjrH.js","assets/game-surface-defaults-D8S4cRxi.js","assets/crash-null-boundary-v3a0uEgw.js","assets/realm-services-CLLV-0p7.js","assets/canvas-entry-runtime-Ce7wP4vm.js","assets/debug-registry-CS3ZmHpb.js","assets/three-ingest-runtime-DhyHlcLT.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/EffectComposer-BEAt0PtQ.js","assets/CopyShader-BzTUYzf6.js","assets/ShaderPass-DTnDQXm0.js","assets/Pass-D1MRT672.js","assets/CSS3DRenderer-BsAqfavI.js","assets/react-root-BHA-cdrW.js","assets/StoryPreviewMount-zuCAkhXk.js","assets/story-presentation-DCpop4w8.js","assets/three-story-model-B6RT2tEb.js","assets/inspect-CewZ8N7e.js","assets/inference-diagnostics-C2jsr-K4.js","assets/react-world-authoring-adapter-C1Pf_Ti4.js","assets/board-guides-b_JfsCO5.js","assets/relative-import-specifier-D8ICYdXp.js","assets/story-arg-descriptors-Ek86ExX7.js","assets/writer-tw6EcuVO.js"])))=>i.map(i=>d[i]);
2
+ import{_ as i}from"./index-BT8W9a7k.js";import{r as m}from"./design-time-mount-registry-DUpXCg1U.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const v="workspace.service";function y(){return m({kind:"dom",owner:"@volter/editor-game/react/design-time-mount",identity:"default-react",mount:async(r,e,t)=>{const{mountReactDesignLayer:o}=await i(async()=>{const{mountReactDesignLayer:n}=await import("./design-time-react-mount-DsV5z0NJ.js");return{mountReactDesignLayer:n}},__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]));return o(r,e,t)},reprojectWhen:r=>{let e=!1,t=null;return i(()=>import("./design-time-react-mount-DsV5z0NJ.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])).then(o=>{e||(t=o.reprojectWhenStoriesRepublish(r))}),()=>{e=!0,t?.(),t=null}}})}export{v as point,y as start};
@@ -1 +1 @@
1
- import{r as it,a as at}from"./design-time-layers-Bspf2qH5.js";import{fb as st,ba as lt,gb as ut,gc as dt,Z as E,gd as mt,ge as Y,bY as q,dI as U,as as ct,eL as z,at as $,dw as pt,cP as ft,gf as H}from"./index-EO6Vl92s.js";import{h as ht,d as gt,g as bt}from"./react-story-board-BdHhG7gL.js";import{C as wt}from"./crash-null-boundary-v3a0uEgw.js";import{r as yt,a as St}from"./realm-services-Bw73w74M.js";import{r as It}from"./react-root-BHA-cdrW.js";import{m as Pt}from"./StoryPreviewMount-BODkiKx5.js";import{c as Rt,s as vt}from"./story-presentation-Inb0tF8V.js";import{d as Mt}from"./three-story-model-D8xXaW4_.js";import{c as Ct}from"./inspect-BqpAh85y.js";import{R as J}from"./react-world-authoring-adapter-Cey0R-Ml.js";import"./root-stacking-BEd9ZvxC.js";import"./edit-mode-authoring-C0sf0ewd.js";import"./design-time-mount-registry-DUpXCg1U.js";import"./game-surface-defaults-D8S4cRxi.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./canvas-entry-runtime-BHOqndB_.js";import"./debug-registry-CoiJ_gHM.js";import"./three-ingest-runtime-DlApOywz.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./EffectComposer-BEAt0PtQ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-DTnDQXm0.js";import"./Pass-D1MRT672.js";import"./CSS3DRenderer-BsAqfavI.js";import"./inference-diagnostics-18bkEAju.js";import"./board-guides-D-k2cJcJ.js";import"./relative-import-specifier-DjG-Lv03.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./writer-tw6EcuVO.js";function Et(e){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="svg"||o==="SVG"||o==="PICTURE")return!0;const r=getComputedStyle(e);if(r.visibility==="hidden"||r.display==="none")return!1;if(xt(r.backgroundColor)||r.backgroundImage&&r.backgroundImage!=="none"||r.boxShadow&&r.boxShadow!=="none"||r.borderStyle!=="none"&&r.borderStyle!==""&&(parseFloat(r.borderTopWidth)>0||parseFloat(r.borderRightWidth)>0||parseFloat(r.borderBottomWidth)>0||parseFloat(r.borderLeftWidth)>0))return!0;for(const n of e.childNodes)if(n.nodeType===Node.TEXT_NODE&&(n.textContent??"").trim()!=="")return!0;return!1}function xt(e){if(!e||e==="transparent")return!1;const o=/^rgba\(\s*[\d.]+\s*,\s*[\d.]+\s*,\s*[\d.]+\s*,\s*([\d.]+)\s*\)$/.exec(e);return o?parseFloat(o[1])>0:!0}function Nt(e,o=r=>r.getBoundingClientRect()){const r=o(e),n=e.offsetWidth;if(r.width<=0||n<=0)return null;const s=r.width/n;let d=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,y=Number.NEGATIVE_INFINITY;for(const p of e.querySelectorAll("*")){if(!Et(p))continue;const m=o(p);m.width<=0||m.height<=0||(d=Math.min(d,(m.left-r.left)/s),c=Math.min(c,(m.top-r.top)/s),i=Math.max(i,(m.right-r.left)/s),y=Math.max(y,(m.bottom-r.top)/s))}return i<=d||y<=c?null:{x:d,y:c,width:i-d,height:y-c}}let x=!1;function kt(e,o){if(!e)return;H({adapter:e,seam:"editor.stories.apply",stage:"effect",detail:`the design board applied portable story ${o}`,run:()=>e.stories.apply(o,o)});const r=e.selection;r&&H({adapter:e,seam:"editor.selection.set",stage:"effect",detail:`the design board selected portable story ${o}`,run:()=>r.set([o])})}let X=!1;async function Ft(){if(X)return;X=!0;const e=bt();if(!(e.width!==null||e.height!==null))try{const o=await ft("volter.project.json");if(!o)return;const r=JSON.parse(o),n=r.resolution?.width,s=r.resolution?.height;if(typeof n!="number"||typeof s!="number"||n<64||s<64||n>4096||s>4096)return;gt(n,s)}catch{}}function Tt(e,o){return{id:e,surface:"dom",description:void 0,adapter:{type:"builtin",identity:"dom",surface:"dom"},entry:o,zOrder:0,pausable:!0,loop:"gated"}}async function At(e,o){try{const r=await St(o,pt());return{ok:!0,Entry:await It(e,r)}}catch(r){return{ok:!1,error:r}}}async function we(e,o,r){const{projectRootPath:n,store:s,activationDocumentId:d}=r;x?x=!1:await st({rootPath:n});const c=lt(),i=Mt(c),y=e.path,p=y?await At(Tt(e.worldId,y),n):{ok:!1,error:new Error(`design-time react layer "${e.worldId}": no \`entry\` declared — nothing to mount.`)},m=p.ok?ut(p.Entry):void 0,K=m?dt(m,e.path):null,j=i.find(g=>g.id===K?.id)??null;if(i.length>0){const g=it(n,e.worldId),P=i.find(t=>t.id===g)??j??i[0];e.path&&!j&&E.warn(`[design-time-layers] React root "${e.worldId}" has no story naming its entry component${m?` "${m}"`:""} — the board opens on "${P.label}". Give a *.stories.tsx a \`meta.component\` of this root's entry component to choose its default preview.`,"authoring");let k=!1,M=null,F=null;const T=new Map,D=Rt(i);await Ft();const l=ht(o,i.map(t=>({id:t.id,label:t.label,modulePath:t.modulePath,...t.title?{title:t.title}:{},parameters:t.parameters,...t.globals?{globals:t.globals}:{},...t.viewportLocked!==void 0?{viewportLocked:t.viewportLocked}:{}})),P.id,(t,u)=>{F=u,kt(M,t)},vt(i,D)),_=t=>{if(k)return;const u=l.frames.get(t.id);if(!u)return;if(t.parameters?.layout==="fullscreen"){l.setMeasuredFrame(t.id,null);return}const a={width:u.content.offsetWidth,height:u.content.offsetHeight},h=a.width>0?Nt(u.content):null;if(!h){l.setMeasuredFrame(t.id,null);return}const C=8,S=48;let b=Math.max(0,h.x-C),w=Math.max(0,h.y-C),R=Math.min(a.width,h.x+h.width+C),v=Math.min(a.height,h.y+h.height+C);if(R-b<S){const A=(S-(R-b))/2;b=Math.max(0,b-A),R=Math.min(a.width,b+S)}if(v-w<S){const A=(S-(v-w))/2;w=Math.max(0,w-A),v=Math.min(a.height,w+S)}if(R-b>=a.width*.9&&v-w>=a.height*.9){l.setMeasuredFrame(t.id,null);return}l.setMeasuredFrame(t.id,{frame:{width:Math.round(R-b),height:Math.round(v-w)},mount:a,offset:{x:Math.round(b),y:Math.round(w)}})},rt=t=>{setTimeout(()=>_(t),0),setTimeout(()=>_(t),1e3)},G=async(t,u=t.args)=>{const f=l.frames.get(t.id)?.content;if(f){try{const a=await Pt(f,t.modulePath,t.name,t.Component,u);if(!a)return;if(k){a.unmount();return}T.set(t.id,a),l.clearError(t.id),rt(t)}catch(a){const h=q(a);l.setError(t.id,h),E.error(`[design-time-layers] React root "${e.worldId}" failed mounting portable story "${t.name}": ${h}`,"authoring")}s.notifyIngestEdit()}};await Promise.all(i.map(t=>G(t))),l.setNote(mt().note),g&&l.activate(P.id,!0);const L=new Map(i.map(t=>[t.id,t])),nt={tagName:"DIV",get children(){return l.activeContent().children},getAttribute:t=>o.getAttribute(t),getBoundingClientRect:()=>o.getBoundingClientRect(),get style(){return o.style},get textContent(){return l.activeContent().textContent}},O=await Y();return M=new J(nt,s,{...O?{writeBackend:O}:{},designTokens:()=>{const t=l.activeContent(),u=t.closest?.("[data-volter-game-styles]")??t.querySelector?.("[data-volter-game-styles]")??t;return Ct(getComputedStyle(u))},assetRoot:o,portableStories:i.map(t=>({id:t.id,label:t.label,args:t.args,name:t.name,modulePath:t.modulePath})),portableHierarchy:D,activePortableStoryId:P.id,onPortableStoryApplied:t=>{const u=(t?L.get(t):null)??P;at(n,e.worldId,u.id);const f=F;F=null,l.activate(u.id,f===null||f==="zoom")},onPortableStoryArgsChanged:(t,u)=>{const f=L.get(t);f&&G(f,u).catch(a=>{E.error(`[design-time-layers] React root "${e.worldId}" failed updating portable story "${f.name}" args: ${q(a)}`,"authoring")})}}),d&&requestAnimationFrame(()=>U(d)),{adapter:M,dispose:()=>{k=!0,M.disposeReactRootAdapter();for(const t of T.values())t.unmount();T.clear(),l.dispose()}}}if(!p.ok)throw p.error instanceof Error?p.error:new Error(String(p.error));E.warn(`[design-time-layers] React root "${e.worldId}" has no portable CSF preview — the project declares no UI stories. Add a *.stories.tsx; give it a \`meta.component\` of this root's entry component${m?` (${m}, ${e.path})`:""} to make it this root’s default preview. Falling back to rendering the entry bare.`,"authoring");const Q=p.Entry,{createElement:B,createRoot:tt,flushSync:et}=await yt(),N=tt(o),ot=g=>{N.render(B(wt,{key:"__entry__",onCaught:g,children:B(Q)}))};let I=null;if(et(()=>{ot(g=>{I=g})}),I!==null)throw N.unmount(),I instanceof Error?I:new Error(String(I));const V=await Y(),W=new J(o,s,{...V?{writeBackend:V}:{}});return d&&requestAnimationFrame(()=>U(d)),{adapter:W,dispose:()=>{W.disposeReactRootAdapter(),N.unmount()}}}function Z(){return $().map(e=>e.ok?e.stories.map(o=>o.id).join(","):`!${e.modulePath}`).join("|")}function ye(e){let o=z()?$():null,r=o===null?null:Z(),n=null;const s=ct(()=>{if(!z())return;const d=$(),c=Z();if(o===null){o=d,r=c;return}const i=c!==r;o=d,r=c,i&&(n!==null&&clearTimeout(n),n=setTimeout(()=>{n=null,x=!0,e(),setTimeout(()=>{x=!1},0)},250))});return()=>{n!==null&&clearTimeout(n),n=null,s()}}export{we as mountReactDesignLayer,ye as reprojectWhenStoriesRepublish};
1
+ import{r as it,a as at}from"./design-time-layers-C2fW3RP2.js";import{fb as st,ba as lt,gb as ut,gc as dt,Z as E,gd as mt,ge as Y,bY as q,dI as U,as as ct,eL as z,at as $,dw as pt,cP as ft,gf as H}from"./index-BT8W9a7k.js";import{h as ht,d as gt,g as bt}from"./react-story-board-BIV6SjrH.js";import{C as wt}from"./crash-null-boundary-v3a0uEgw.js";import{r as yt,a as St}from"./realm-services-CLLV-0p7.js";import{r as It}from"./react-root-BHA-cdrW.js";import{m as Pt}from"./StoryPreviewMount-zuCAkhXk.js";import{c as Rt,s as vt}from"./story-presentation-DCpop4w8.js";import{d as Mt}from"./three-story-model-B6RT2tEb.js";import{c as Ct}from"./inspect-CewZ8N7e.js";import{R as J}from"./react-world-authoring-adapter-C1Pf_Ti4.js";import"./root-stacking-BEd9ZvxC.js";import"./edit-mode-authoring-CFh9mf99.js";import"./design-time-mount-registry-DUpXCg1U.js";import"./game-surface-defaults-D8S4cRxi.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./canvas-entry-runtime-Ce7wP4vm.js";import"./debug-registry-CS3ZmHpb.js";import"./three-ingest-runtime-DhyHlcLT.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./EffectComposer-BEAt0PtQ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-DTnDQXm0.js";import"./Pass-D1MRT672.js";import"./CSS3DRenderer-BsAqfavI.js";import"./inference-diagnostics-C2jsr-K4.js";import"./board-guides-b_JfsCO5.js";import"./relative-import-specifier-D8ICYdXp.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./writer-tw6EcuVO.js";function Et(e){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="svg"||o==="SVG"||o==="PICTURE")return!0;const r=getComputedStyle(e);if(r.visibility==="hidden"||r.display==="none")return!1;if(xt(r.backgroundColor)||r.backgroundImage&&r.backgroundImage!=="none"||r.boxShadow&&r.boxShadow!=="none"||r.borderStyle!=="none"&&r.borderStyle!==""&&(parseFloat(r.borderTopWidth)>0||parseFloat(r.borderRightWidth)>0||parseFloat(r.borderBottomWidth)>0||parseFloat(r.borderLeftWidth)>0))return!0;for(const n of e.childNodes)if(n.nodeType===Node.TEXT_NODE&&(n.textContent??"").trim()!=="")return!0;return!1}function xt(e){if(!e||e==="transparent")return!1;const o=/^rgba\(\s*[\d.]+\s*,\s*[\d.]+\s*,\s*[\d.]+\s*,\s*([\d.]+)\s*\)$/.exec(e);return o?parseFloat(o[1])>0:!0}function Nt(e,o=r=>r.getBoundingClientRect()){const r=o(e),n=e.offsetWidth;if(r.width<=0||n<=0)return null;const s=r.width/n;let d=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,y=Number.NEGATIVE_INFINITY;for(const p of e.querySelectorAll("*")){if(!Et(p))continue;const m=o(p);m.width<=0||m.height<=0||(d=Math.min(d,(m.left-r.left)/s),c=Math.min(c,(m.top-r.top)/s),i=Math.max(i,(m.right-r.left)/s),y=Math.max(y,(m.bottom-r.top)/s))}return i<=d||y<=c?null:{x:d,y:c,width:i-d,height:y-c}}let x=!1;function kt(e,o){if(!e)return;H({adapter:e,seam:"editor.stories.apply",stage:"effect",detail:`the design board applied portable story ${o}`,run:()=>e.stories.apply(o,o)});const r=e.selection;r&&H({adapter:e,seam:"editor.selection.set",stage:"effect",detail:`the design board selected portable story ${o}`,run:()=>r.set([o])})}let X=!1;async function Ft(){if(X)return;X=!0;const e=bt();if(!(e.width!==null||e.height!==null))try{const o=await ft("volter.project.json");if(!o)return;const r=JSON.parse(o),n=r.resolution?.width,s=r.resolution?.height;if(typeof n!="number"||typeof s!="number"||n<64||s<64||n>4096||s>4096)return;gt(n,s)}catch{}}function Tt(e,o){return{id:e,surface:"dom",description:void 0,adapter:{type:"builtin",identity:"dom",surface:"dom"},entry:o,zOrder:0,pausable:!0,loop:"gated"}}async function At(e,o){try{const r=await St(o,pt());return{ok:!0,Entry:await It(e,r)}}catch(r){return{ok:!1,error:r}}}async function we(e,o,r){const{projectRootPath:n,store:s,activationDocumentId:d}=r;x?x=!1:await st({rootPath:n});const c=lt(),i=Mt(c),y=e.path,p=y?await At(Tt(e.worldId,y),n):{ok:!1,error:new Error(`design-time react layer "${e.worldId}": no \`entry\` declared — nothing to mount.`)},m=p.ok?ut(p.Entry):void 0,K=m?dt(m,e.path):null,j=i.find(g=>g.id===K?.id)??null;if(i.length>0){const g=it(n,e.worldId),P=i.find(t=>t.id===g)??j??i[0];e.path&&!j&&E.warn(`[design-time-layers] React root "${e.worldId}" has no story naming its entry component${m?` "${m}"`:""} — the board opens on "${P.label}". Give a *.stories.tsx a \`meta.component\` of this root's entry component to choose its default preview.`,"authoring");let k=!1,M=null,F=null;const T=new Map,D=Rt(i);await Ft();const l=ht(o,i.map(t=>({id:t.id,label:t.label,modulePath:t.modulePath,...t.title?{title:t.title}:{},parameters:t.parameters,...t.globals?{globals:t.globals}:{},...t.viewportLocked!==void 0?{viewportLocked:t.viewportLocked}:{}})),P.id,(t,u)=>{F=u,kt(M,t)},vt(i,D)),_=t=>{if(k)return;const u=l.frames.get(t.id);if(!u)return;if(t.parameters?.layout==="fullscreen"){l.setMeasuredFrame(t.id,null);return}const a={width:u.content.offsetWidth,height:u.content.offsetHeight},h=a.width>0?Nt(u.content):null;if(!h){l.setMeasuredFrame(t.id,null);return}const C=8,S=48;let b=Math.max(0,h.x-C),w=Math.max(0,h.y-C),R=Math.min(a.width,h.x+h.width+C),v=Math.min(a.height,h.y+h.height+C);if(R-b<S){const A=(S-(R-b))/2;b=Math.max(0,b-A),R=Math.min(a.width,b+S)}if(v-w<S){const A=(S-(v-w))/2;w=Math.max(0,w-A),v=Math.min(a.height,w+S)}if(R-b>=a.width*.9&&v-w>=a.height*.9){l.setMeasuredFrame(t.id,null);return}l.setMeasuredFrame(t.id,{frame:{width:Math.round(R-b),height:Math.round(v-w)},mount:a,offset:{x:Math.round(b),y:Math.round(w)}})},rt=t=>{setTimeout(()=>_(t),0),setTimeout(()=>_(t),1e3)},G=async(t,u=t.args)=>{const f=l.frames.get(t.id)?.content;if(f){try{const a=await Pt(f,t.modulePath,t.name,t.Component,u);if(!a)return;if(k){a.unmount();return}T.set(t.id,a),l.clearError(t.id),rt(t)}catch(a){const h=q(a);l.setError(t.id,h),E.error(`[design-time-layers] React root "${e.worldId}" failed mounting portable story "${t.name}": ${h}`,"authoring")}s.notifyIngestEdit()}};await Promise.all(i.map(t=>G(t))),l.setNote(mt().note),g&&l.activate(P.id,!0);const L=new Map(i.map(t=>[t.id,t])),nt={tagName:"DIV",get children(){return l.activeContent().children},getAttribute:t=>o.getAttribute(t),getBoundingClientRect:()=>o.getBoundingClientRect(),get style(){return o.style},get textContent(){return l.activeContent().textContent}},O=await Y();return M=new J(nt,s,{...O?{writeBackend:O}:{},designTokens:()=>{const t=l.activeContent(),u=t.closest?.("[data-volter-game-styles]")??t.querySelector?.("[data-volter-game-styles]")??t;return Ct(getComputedStyle(u))},assetRoot:o,portableStories:i.map(t=>({id:t.id,label:t.label,args:t.args,name:t.name,modulePath:t.modulePath})),portableHierarchy:D,activePortableStoryId:P.id,onPortableStoryApplied:t=>{const u=(t?L.get(t):null)??P;at(n,e.worldId,u.id);const f=F;F=null,l.activate(u.id,f===null||f==="zoom")},onPortableStoryArgsChanged:(t,u)=>{const f=L.get(t);f&&G(f,u).catch(a=>{E.error(`[design-time-layers] React root "${e.worldId}" failed updating portable story "${f.name}" args: ${q(a)}`,"authoring")})}}),d&&requestAnimationFrame(()=>U(d)),{adapter:M,dispose:()=>{k=!0,M.disposeReactRootAdapter();for(const t of T.values())t.unmount();T.clear(),l.dispose()}}}if(!p.ok)throw p.error instanceof Error?p.error:new Error(String(p.error));E.warn(`[design-time-layers] React root "${e.worldId}" has no portable CSF preview — the project declares no UI stories. Add a *.stories.tsx; give it a \`meta.component\` of this root's entry component${m?` (${m}, ${e.path})`:""} to make it this root’s default preview. Falling back to rendering the entry bare.`,"authoring");const Q=p.Entry,{createElement:B,createRoot:tt,flushSync:et}=await yt(),N=tt(o),ot=g=>{N.render(B(wt,{key:"__entry__",onCaught:g,children:B(Q)}))};let I=null;if(et(()=>{ot(g=>{I=g})}),I!==null)throw N.unmount(),I instanceof Error?I:new Error(String(I));const V=await Y(),W=new J(o,s,{...V?{writeBackend:V}:{}});return d&&requestAnimationFrame(()=>U(d)),{adapter:W,dispose:()=>{W.disposeReactRootAdapter(),N.unmount()}}}function Z(){return $().map(e=>e.ok?e.stories.map(o=>o.id).join(","):`!${e.modulePath}`).join("|")}function ye(e){let o=z()?$():null,r=o===null?null:Z(),n=null;const s=ct(()=>{if(!z())return;const d=$(),c=Z();if(o===null){o=d,r=c;return}const i=c!==r;o=d,r=c,i&&(n!==null&&clearTimeout(n),n=setTimeout(()=>{n=null,x=!0,e(),setTimeout(()=>{x=!1},0)},250))});return()=>{n!==null&&clearTimeout(n),n=null,s()}}export{we as mountReactDesignLayer,ye as reprojectWhenStoriesRepublish};
@@ -1 +1 @@
1
- import{c as g}from"./content-bounds-B_xPBrsP.js";import{isEditorOwnedObject as u}from"./editor-layers-B43PZgUF.js";import{m as x}from"./renderer-ownership-BovSEcLv.js";import{W as w}from"./three.module-BLhyNg0e.js";import{f as C}from"./scene-framing-zyo6Dgey.js";import{ej as y,A as M,d9 as d,fo as s,ex as v,cj as S}from"./three.core-3arARmh6.js";import"./hierarchy-marks-r1SCnl92.js";import"./workspace-arrangement-COs530TA.js";import"./index-EO6Vl92s.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 W(n){const e=[];return n.traverse(a=>{!u(a)&&a.isCamera&&e.push(a)}),e}function R(n,e){const a=[];n.traverse(r=>{r.parent&&u(r)&&a.push({object:r,parent:r.parent})});for(const{object:r}of a)r.removeFromParent();let t;try{t=g(n)}finally{for(const{object:r,parent:h}of a)h.add(r)}const o=t.filter(r=>!r.overlay&&!r.enclosure),c=C(o.map(r=>r.box)),i=new d(42,e,.01,1e5),f=c.isEmpty()?new s:c.getCenter(new s),m=c.isEmpty()?1:Math.max(.01,c.getBoundingSphere(new v).radius),p=m/Math.sin(S.degToRad(i.fov/2));return i.position.copy(f).addScaledVector(new s(1,.75,1).normalize(),p*1.15),i.lookAt(f),i.near=Math.max(.001,p-m*2.5),i.far=p+m*3,i.updateProjectionMatrix(),i.updateMatrixWorld(!0),i}function P(n,e){if(e.camera){const t=new d(e.camera.fov??42,e.width/e.height,.01,1e5);return t.position.set(e.camera.position.x,e.camera.position.y,e.camera.position.z),t.lookAt(e.camera.target.x,e.camera.target.y,e.camera.target.z),t.updateMatrixWorld(!0),t}const a=W(n);if(a.length===1){const t=a[0].clone();return t.matrixWorld.copy(a[0].matrixWorld),t.matrixWorld.decompose(t.position,t.quaternion,t.scale),t instanceof d&&(t.aspect=e.width/e.height,t.updateProjectionMatrix()),t}return R(n,e.width/e.height)}function I(n,e,a,t){e.updateMatrixWorld(!0);const l=P(n,a),o=x(new w({antialias:!0,alpha:!0,preserveDrawingBuffer:!0}));let c;try{return c=t?.(o),o.setPixelRatio(1),o.setSize(a.width,a.height,!1),o.outputColorSpace=y,o.toneMapping=M,o.setClearColor(2106411,e.background===null?0:1),o.render(e,l),o.domElement.toDataURL("image/png")}finally{c?.(),o.dispose(),o.forceContextLoss()}}export{I as captureAuthoredThreeScenePreview};
1
+ import{c as g}from"./content-bounds-DetzUl3q.js";import{isEditorOwnedObject as u}from"./editor-layers-JmP4C0fP.js";import{m as x}from"./renderer-ownership-BovSEcLv.js";import{W as w}from"./three.module-BLhyNg0e.js";import{f as C}from"./scene-framing-B-Zvn5pm.js";import{ej as y,A as M,d9 as d,fo as s,ex as v,cj as S}from"./three.core-3arARmh6.js";import"./hierarchy-marks-DWnBwmhe.js";import"./workspace-arrangement-B1xtK850.js";import"./index-BT8W9a7k.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 W(n){const e=[];return n.traverse(a=>{!u(a)&&a.isCamera&&e.push(a)}),e}function R(n,e){const a=[];n.traverse(r=>{r.parent&&u(r)&&a.push({object:r,parent:r.parent})});for(const{object:r}of a)r.removeFromParent();let t;try{t=g(n)}finally{for(const{object:r,parent:h}of a)h.add(r)}const o=t.filter(r=>!r.overlay&&!r.enclosure),c=C(o.map(r=>r.box)),i=new d(42,e,.01,1e5),f=c.isEmpty()?new s:c.getCenter(new s),m=c.isEmpty()?1:Math.max(.01,c.getBoundingSphere(new v).radius),p=m/Math.sin(S.degToRad(i.fov/2));return i.position.copy(f).addScaledVector(new s(1,.75,1).normalize(),p*1.15),i.lookAt(f),i.near=Math.max(.001,p-m*2.5),i.far=p+m*3,i.updateProjectionMatrix(),i.updateMatrixWorld(!0),i}function P(n,e){if(e.camera){const t=new d(e.camera.fov??42,e.width/e.height,.01,1e5);return t.position.set(e.camera.position.x,e.camera.position.y,e.camera.position.z),t.lookAt(e.camera.target.x,e.camera.target.y,e.camera.target.z),t.updateMatrixWorld(!0),t}const a=W(n);if(a.length===1){const t=a[0].clone();return t.matrixWorld.copy(a[0].matrixWorld),t.matrixWorld.decompose(t.position,t.quaternion,t.scale),t instanceof d&&(t.aspect=e.width/e.height,t.updateProjectionMatrix()),t}return R(n,e.width/e.height)}function I(n,e,a,t){e.updateMatrixWorld(!0);const l=P(n,a),o=x(new w({antialias:!0,alpha:!0,preserveDrawingBuffer:!0}));let c;try{return c=t?.(o),o.setPixelRatio(1),o.setSize(a.width,a.height,!1),o.outputColorSpace=y,o.toneMapping=M,o.setClearColor(2106411,e.background===null?0:1),o.render(e,l),o.domElement.toDataURL("image/png")}finally{c?.(),o.dispose(),o.forceContextLoss()}}export{I as captureAuthoredThreeScenePreview};
@@ -1 +1 @@
1
- import{ax as y,ay as v}from"./index-EO6Vl92s.js";import{J as R,c as x}from"./json-history-resource-BjCvVkMa.js";import{D as C,s as w,a as b,c as k,m as T}from"./react-world-authoring-adapter-Cey0R-Ml.js";import{g as p,b as u}from"./inspect-BqpAh85y.js";function H(a){const e=(typeof a=="string"?a:a?.baseVal)?.trim()??"";if(e)return e.split(/\s+/)[0]}function S(a,t){if(a.id)return`${t}#${a.id}`;const e=H(a.className??"");return e?`${t}.${e}`:t}function j(a){const t=new Map;for(const[e,s]of a.nodes)t.set(e,{id:e,tag:s.object.tagName.toLowerCase(),el:s.object,parentId:s.parentId,childIds:[...s.childIds]});return{nodes:t,rootIds:[...a.rootIds]}}const g=[{prop:"color",label:"Color",type:"color"},{prop:"backgroundColor",label:"Background",type:"color"},{prop:"borderColor",label:"Border Color",type:"color"},{prop:"fontSize",label:"Font Size",type:"number"},{prop:"width",label:"Width",type:"number"},{prop:"height",label:"Height",type:"number"},{prop:"padding",label:"Padding",type:"number"},{prop:"margin",label:"Margin",type:"number"},{prop:"borderRadius",label:"Border Radius",type:"number"},{prop:"gap",label:"Gap",type:"number"},{prop:"display",label:"Display",type:"enum",options:["flex","block","none","grid"]},{prop:"textAlign",label:"Text Align",type:"enum",options:["left","center","right"]},{prop:"flexDirection",label:"Flex Direction",type:"enum",options:["row","column"]}],f="style.",M=new Map(g.map(({prop:a,type:t})=>[a,t]));class D{constructor(t,e,s){this.root=t,this.store=e;const o=e.shell.projectHistory;this.historyResource=o?new R({history:o,kind:"session-state",scope:"session",subject:{...s.journal,id:`${s.journal.id}/react-dom-edits`},displayName:"React DOM edits",capture:()=>this.captureHistoryState(),restore:async i=>{this.restoreHistoryState(i)}}):null}capabilities={transform:!1,inspectorFields:!0,persist:!1};provenance={source:"foreign",label:"live-only",detail:"Unmodified ingested React game — style edits apply for this session only and are never saved."};doc={};historyResource;projector=new C(w());snapCache=null;snapInvalidationScheduled=!1;boxEditSession=null;lockedIds=new Set;snapshot(){if(this.snapCache)return this.snapCache;this.projector.project(this.root);const t=j(this.projector);return this.snapCache=t,this.snapInvalidationScheduled||(this.snapInvalidationScheduled=!0,queueMicrotask(()=>{this.snapCache=null,this.snapInvalidationScheduled=!1})),t}nodeCount(){return this.snapshot().nodes.size}toEditorNode(t){return{id:t.id,label:S(t.el,t.tag),role:"element",kind:t.tag,parentId:t.parentId,childIds:t.childIds}}applyStyleToElement(t,e,s){t.style&&(t.style[e]=s)}recordStyleEdit(t,e,s){const o=this.doc[t]??{};o[e]=s,this.doc[t]=o}hierarchy={roots:()=>{const{nodes:t,rootIds:e}=this.snapshot();return e.map(s=>this.toEditorNode(t.get(s)))},node:t=>{const e=this.snapshot().nodes.get(t);return e?this.toEditorNode(e):null}};selection={get:()=>[...this.store.shell.selectedEntityIds],set:t=>this.store.shell.selectMultiple(t)};pickable={pick:(t,e)=>{const{nodes:s}=this.snapshot();let o=null,i=Number.POSITIVE_INFINITY,r=-1,l=-1;for(const c of s.values()){if(l++,this.lockedIds.has(c.id)||c.el.style?.pointerEvents==="none")continue;const n=c.el.getBoundingClientRect?.();if(!n||t<n.left||t>n.right||e<n.top||e>n.bottom)continue;const h=n.width*n.height;(h<i||h===i&&l>r)&&(o=c.id,i=h,r=l)}return o}};hostRect(){const t=this.root.getBoundingClientRect?.();return{left:t?.left??0,top:t?.top??0}}toHostRelative(t){const e=this.hostRect();return{x:t.left-e.left,y:t.top-e.top,width:t.width,height:t.height}}rects={rect:t=>{const s=this.snapshot().nodes.get(t)?.el.getBoundingClientRect?.();return s?this.toHostRelative(s):null},contextRects:t=>{const{nodes:e}=this.snapshot(),s=e.get(t);if(!s)return{};const o=s.parentId?e.get(s.parentId):void 0,i=o?.el.getBoundingClientRect?.(),l=(o?o.childIds:this.snapshot().rootIds).filter(d=>d!==t).map(d=>e.get(d)?.el.getBoundingClientRect?.()).filter(d=>d!=null).map(d=>this.toHostRelative(d)),c=s.el,n=c.getBoundingClientRect?.();let h;if(n){const d=y(p(c,"borderTopWidth",u))??0,I=y(p(c,"borderRightWidth",u))??0,E=y(p(c,"borderBottomWidth",u))??0,m=y(p(c,"borderLeftWidth",u))??0;h=this.toHostRelative({left:n.left+m,top:n.top+d,width:Math.max(0,n.width-m-I),height:Math.max(0,n.height-d-E)})}return{...i?{parent:this.toHostRelative(i)}:{},...l.length?{siblings:l}:{},...h?{paddingBox:h}:{}}}};colorSample={backgroundChainAt:(t,e)=>{const s=this.pickable.pick(t,e);if(!s)return null;const{nodes:o}=this.snapshot(),i=[];let r=o.get(s);for(;r;)i.push(p(r.el,"backgroundColor",u)),r=r.parentId?o.get(r.parentId):void 0;return i}};boxEdit={begin:t=>{this.historyResource?.assertCanMutate(),this.boxEditSession={id:t,touched:new Map,priorInline:new Map}},apply:(t,e)=>{this.historyResource?.assertCanMutate();const s=this.boxEditSession;if(!s||s.id!==t)return;const o=this.snapshot().nodes.get(t);if(!o)return;const i=p(o.el,"position",u),r=i==="absolute"||i==="fixed";for(const[l,c]of Object.entries(e)){const n=T(l,r);if(!n){console.warn(`[DomAuthoringAdapter] boxEdit: dropping patch key "${l}" for "${t}" — `+(l==="x"||l==="y"?`node is not absolutely/fixed positioned (computed position: "${i}"), no left/top to move`:"unrecognized box-edit patch key"));continue}if(!s.priorInline.has(n.prop)){const d=b(o.el.style,n.prop);s.priorInline.set(n.prop,d==null?"":String(d))}const h=n.cssValue(c);this.applyStyleToElement(o.el,n.prop,h),s.touched.set(n.prop,h)}},end:t=>{const e=this.boxEditSession;this.boxEditSession=null,!(!e||e.id!==t||e.touched.size===0)&&this.commitBoxEdit(t,e.touched,e.priorInline)}};commitBoxEdit(t,e,s){this.historyResource?.assertCanMutate();const o=this.captureHistoryState(),i=o.styles[t]??{};o.styles[t]=i;for(const[l,c]of s)i[l]=c;let r=!1;for(const[l,c]of e)r=this.writeStyleEntry(t,l,c)||r;r&&this.historyResource&&this.historyResource.record(`Edit ${e.size} Styles`,o,this.captureHistoryState()).catch(()=>{})}inspector={properties:()=>g.map(({prop:t,label:e,type:s,options:o})=>({path:`${f}${t}`,label:e,type:s,...o?{options:o}:{}})),get:(t,e)=>{if(e==="locked")return this.lockedIds.has(t);if(e==="visible"){const l=this.snapshot().nodes.get(t);return l?b(l.el.style,"visibility")!=="hidden":void 0}if(!e.startsWith(f))return;const s=e.slice(f.length),o=this.snapshot().nodes.get(t);if(!o)return;const i=b(o.el.style,s),r=M.get(s);return r==="number"?y(i):r==="color"?k(i):i},set:(t,e,s)=>{if(e==="locked"){s?this.lockedIds.add(t):this.lockedIds.delete(t),this.store.shell.notifyIngestEdit();return}if(e==="visible"){this.writeStyle(t,"visibility",s?"visible":"hidden");return}if(!e.startsWith(f))return;const o=e.slice(f.length);this.writeStyle(t,o,String(s))}};assetSubject={get:t=>this.assetSubjectForNode(this.snapshot(),t),entries:()=>{const t=this.snapshot();return[...t.nodes.keys()].flatMap(e=>{const s=this.assetSubjectForNode(t,e);return s?[{id:e,subject:s}]:[]})}};assetSubjectForNode(t,e){const s=t.nodes.get(e);return!s||s.tag!=="svg"||!s.el.outerHTML?null:{kind:"image",name:S(s.el,s.tag),mediaType:"image/svg+xml",text:s.el.outerHTML}}writeStyleEntry(t,e,s){const o=this.snapshot().nodes.get(t);return o?(this.applyStyleToElement(o.el,e,s),this.recordStyleEdit(t,e,s),this.store.shell.notifyIngestEdit(),!0):!1}writeStyle(t,e,s){this.historyResource?.assertCanMutate();const o=this.captureHistoryState();this.writeStyleEntry(t,e,s)&&this.historyResource&&this.historyResource.record(`Set ${e}`,o,this.captureHistoryState()).catch(()=>{})}dispose(){this.historyResource?.dispose()}captureHistoryState(){const t={};for(const[e,s]of this.snapshot().nodes){const o={};for(const{prop:i}of g){const r=b(s.el.style,i);r!==""&&(o[i]=String(r))}t[e]=o}return{edits:structuredClone(this.doc),styles:t}}restoreHistoryState(t){for(const s of Object.keys(this.doc))delete this.doc[s];Object.assign(this.doc,structuredClone(t.edits));const{nodes:e}=this.snapshot();for(const[s,o]of e){const i=t.styles[s]??{};for(const{prop:r}of g)this.applyStyleToElement(o.el,r,i[r]??"")}this.store.shell.notifyIngestEdit()}subscribe(t){return this.store.shell.subscribe(t)}get persistence(){return{...x(),destination:v}}}export{D};
1
+ import{ax as y,ay as v}from"./index-BT8W9a7k.js";import{J as R,c as x}from"./json-history-resource-Kth9eAdl.js";import{D as C,s as w,a as b,c as k,m as T}from"./react-world-authoring-adapter-C1Pf_Ti4.js";import{g as p,b as u}from"./inspect-CewZ8N7e.js";function H(a){const e=(typeof a=="string"?a:a?.baseVal)?.trim()??"";if(e)return e.split(/\s+/)[0]}function S(a,t){if(a.id)return`${t}#${a.id}`;const e=H(a.className??"");return e?`${t}.${e}`:t}function j(a){const t=new Map;for(const[e,s]of a.nodes)t.set(e,{id:e,tag:s.object.tagName.toLowerCase(),el:s.object,parentId:s.parentId,childIds:[...s.childIds]});return{nodes:t,rootIds:[...a.rootIds]}}const g=[{prop:"color",label:"Color",type:"color"},{prop:"backgroundColor",label:"Background",type:"color"},{prop:"borderColor",label:"Border Color",type:"color"},{prop:"fontSize",label:"Font Size",type:"number"},{prop:"width",label:"Width",type:"number"},{prop:"height",label:"Height",type:"number"},{prop:"padding",label:"Padding",type:"number"},{prop:"margin",label:"Margin",type:"number"},{prop:"borderRadius",label:"Border Radius",type:"number"},{prop:"gap",label:"Gap",type:"number"},{prop:"display",label:"Display",type:"enum",options:["flex","block","none","grid"]},{prop:"textAlign",label:"Text Align",type:"enum",options:["left","center","right"]},{prop:"flexDirection",label:"Flex Direction",type:"enum",options:["row","column"]}],f="style.",M=new Map(g.map(({prop:a,type:t})=>[a,t]));class D{constructor(t,e,s){this.root=t,this.store=e;const o=e.shell.projectHistory;this.historyResource=o?new R({history:o,kind:"session-state",scope:"session",subject:{...s.journal,id:`${s.journal.id}/react-dom-edits`},displayName:"React DOM edits",capture:()=>this.captureHistoryState(),restore:async i=>{this.restoreHistoryState(i)}}):null}capabilities={transform:!1,inspectorFields:!0,persist:!1};provenance={source:"foreign",label:"live-only",detail:"Unmodified ingested React game — style edits apply for this session only and are never saved."};doc={};historyResource;projector=new C(w());snapCache=null;snapInvalidationScheduled=!1;boxEditSession=null;lockedIds=new Set;snapshot(){if(this.snapCache)return this.snapCache;this.projector.project(this.root);const t=j(this.projector);return this.snapCache=t,this.snapInvalidationScheduled||(this.snapInvalidationScheduled=!0,queueMicrotask(()=>{this.snapCache=null,this.snapInvalidationScheduled=!1})),t}nodeCount(){return this.snapshot().nodes.size}toEditorNode(t){return{id:t.id,label:S(t.el,t.tag),role:"element",kind:t.tag,parentId:t.parentId,childIds:t.childIds}}applyStyleToElement(t,e,s){t.style&&(t.style[e]=s)}recordStyleEdit(t,e,s){const o=this.doc[t]??{};o[e]=s,this.doc[t]=o}hierarchy={roots:()=>{const{nodes:t,rootIds:e}=this.snapshot();return e.map(s=>this.toEditorNode(t.get(s)))},node:t=>{const e=this.snapshot().nodes.get(t);return e?this.toEditorNode(e):null}};selection={get:()=>[...this.store.shell.selectedEntityIds],set:t=>this.store.shell.selectMultiple(t)};pickable={pick:(t,e)=>{const{nodes:s}=this.snapshot();let o=null,i=Number.POSITIVE_INFINITY,r=-1,l=-1;for(const c of s.values()){if(l++,this.lockedIds.has(c.id)||c.el.style?.pointerEvents==="none")continue;const n=c.el.getBoundingClientRect?.();if(!n||t<n.left||t>n.right||e<n.top||e>n.bottom)continue;const h=n.width*n.height;(h<i||h===i&&l>r)&&(o=c.id,i=h,r=l)}return o}};hostRect(){const t=this.root.getBoundingClientRect?.();return{left:t?.left??0,top:t?.top??0}}toHostRelative(t){const e=this.hostRect();return{x:t.left-e.left,y:t.top-e.top,width:t.width,height:t.height}}rects={rect:t=>{const s=this.snapshot().nodes.get(t)?.el.getBoundingClientRect?.();return s?this.toHostRelative(s):null},contextRects:t=>{const{nodes:e}=this.snapshot(),s=e.get(t);if(!s)return{};const o=s.parentId?e.get(s.parentId):void 0,i=o?.el.getBoundingClientRect?.(),l=(o?o.childIds:this.snapshot().rootIds).filter(d=>d!==t).map(d=>e.get(d)?.el.getBoundingClientRect?.()).filter(d=>d!=null).map(d=>this.toHostRelative(d)),c=s.el,n=c.getBoundingClientRect?.();let h;if(n){const d=y(p(c,"borderTopWidth",u))??0,I=y(p(c,"borderRightWidth",u))??0,E=y(p(c,"borderBottomWidth",u))??0,m=y(p(c,"borderLeftWidth",u))??0;h=this.toHostRelative({left:n.left+m,top:n.top+d,width:Math.max(0,n.width-m-I),height:Math.max(0,n.height-d-E)})}return{...i?{parent:this.toHostRelative(i)}:{},...l.length?{siblings:l}:{},...h?{paddingBox:h}:{}}}};colorSample={backgroundChainAt:(t,e)=>{const s=this.pickable.pick(t,e);if(!s)return null;const{nodes:o}=this.snapshot(),i=[];let r=o.get(s);for(;r;)i.push(p(r.el,"backgroundColor",u)),r=r.parentId?o.get(r.parentId):void 0;return i}};boxEdit={begin:t=>{this.historyResource?.assertCanMutate(),this.boxEditSession={id:t,touched:new Map,priorInline:new Map}},apply:(t,e)=>{this.historyResource?.assertCanMutate();const s=this.boxEditSession;if(!s||s.id!==t)return;const o=this.snapshot().nodes.get(t);if(!o)return;const i=p(o.el,"position",u),r=i==="absolute"||i==="fixed";for(const[l,c]of Object.entries(e)){const n=T(l,r);if(!n){console.warn(`[DomAuthoringAdapter] boxEdit: dropping patch key "${l}" for "${t}" — `+(l==="x"||l==="y"?`node is not absolutely/fixed positioned (computed position: "${i}"), no left/top to move`:"unrecognized box-edit patch key"));continue}if(!s.priorInline.has(n.prop)){const d=b(o.el.style,n.prop);s.priorInline.set(n.prop,d==null?"":String(d))}const h=n.cssValue(c);this.applyStyleToElement(o.el,n.prop,h),s.touched.set(n.prop,h)}},end:t=>{const e=this.boxEditSession;this.boxEditSession=null,!(!e||e.id!==t||e.touched.size===0)&&this.commitBoxEdit(t,e.touched,e.priorInline)}};commitBoxEdit(t,e,s){this.historyResource?.assertCanMutate();const o=this.captureHistoryState(),i=o.styles[t]??{};o.styles[t]=i;for(const[l,c]of s)i[l]=c;let r=!1;for(const[l,c]of e)r=this.writeStyleEntry(t,l,c)||r;r&&this.historyResource&&this.historyResource.record(`Edit ${e.size} Styles`,o,this.captureHistoryState()).catch(()=>{})}inspector={properties:()=>g.map(({prop:t,label:e,type:s,options:o})=>({path:`${f}${t}`,label:e,type:s,...o?{options:o}:{}})),get:(t,e)=>{if(e==="locked")return this.lockedIds.has(t);if(e==="visible"){const l=this.snapshot().nodes.get(t);return l?b(l.el.style,"visibility")!=="hidden":void 0}if(!e.startsWith(f))return;const s=e.slice(f.length),o=this.snapshot().nodes.get(t);if(!o)return;const i=b(o.el.style,s),r=M.get(s);return r==="number"?y(i):r==="color"?k(i):i},set:(t,e,s)=>{if(e==="locked"){s?this.lockedIds.add(t):this.lockedIds.delete(t),this.store.shell.notifyIngestEdit();return}if(e==="visible"){this.writeStyle(t,"visibility",s?"visible":"hidden");return}if(!e.startsWith(f))return;const o=e.slice(f.length);this.writeStyle(t,o,String(s))}};assetSubject={get:t=>this.assetSubjectForNode(this.snapshot(),t),entries:()=>{const t=this.snapshot();return[...t.nodes.keys()].flatMap(e=>{const s=this.assetSubjectForNode(t,e);return s?[{id:e,subject:s}]:[]})}};assetSubjectForNode(t,e){const s=t.nodes.get(e);return!s||s.tag!=="svg"||!s.el.outerHTML?null:{kind:"image",name:S(s.el,s.tag),mediaType:"image/svg+xml",text:s.el.outerHTML}}writeStyleEntry(t,e,s){const o=this.snapshot().nodes.get(t);return o?(this.applyStyleToElement(o.el,e,s),this.recordStyleEdit(t,e,s),this.store.shell.notifyIngestEdit(),!0):!1}writeStyle(t,e,s){this.historyResource?.assertCanMutate();const o=this.captureHistoryState();this.writeStyleEntry(t,e,s)&&this.historyResource&&this.historyResource.record(`Set ${e}`,o,this.captureHistoryState()).catch(()=>{})}dispose(){this.historyResource?.dispose()}captureHistoryState(){const t={};for(const[e,s]of this.snapshot().nodes){const o={};for(const{prop:i}of g){const r=b(s.el.style,i);r!==""&&(o[i]=String(r))}t[e]=o}return{edits:structuredClone(this.doc),styles:t}}restoreHistoryState(t){for(const s of Object.keys(this.doc))delete this.doc[s];Object.assign(this.doc,structuredClone(t.edits));const{nodes:e}=this.snapshot();for(const[s,o]of e){const i=t.styles[s]??{};for(const{prop:r}of g)this.applyStyleToElement(o.el,r,i[r]??"")}this.store.shell.notifyIngestEdit()}subscribe(t){return this.store.shell.subscribe(t)}get persistence(){return{...x(),destination:v}}}export{D};