@volter/game-editor 0.5.92 → 0.5.94

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 (297) 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 +2184 -2184
  5. package/dist/assets/{AssetBudgetPanel-DeJukdzT.js → AssetBudgetPanel-C7VX6s0W.js} +3 -3
  6. package/dist/assets/{AudioViewer-m9jtkgYo.js → AudioViewer-_Xe78gWH.js} +1 -1
  7. package/dist/assets/{CanvasBoardDocument-DooBGHPq.js → CanvasBoardDocument-CH510S-1.js} +1 -1
  8. package/dist/assets/{CanvasSceneViewport-CoFzzJfs.js → CanvasSceneViewport-BAV76QHT.js} +1 -1
  9. package/dist/assets/{ColorInput-NuZ1WtIR.js → ColorInput-Q9EOPIUz.js} +1 -1
  10. package/dist/assets/{ColorPicker-DYngmfYK.js → ColorPicker-5LeDk-Q3.js} +1 -1
  11. package/dist/assets/{EntityModelDocument-P3FihIlT.js → EntityModelDocument-unR8Gz-F.js} +1 -1
  12. package/dist/assets/{EnvironmentAssetDocument-UW9Fz8gy.js → EnvironmentAssetDocument-DpksBo1R.js} +1 -1
  13. package/dist/assets/{GameplaySessionTimeline-CPMUudKc.js → GameplaySessionTimeline-5eWmeryn.js} +1 -1
  14. package/dist/assets/{ImageViewer-C2TMh_cS.js → ImageViewer-DO0Ekvix.js} +1 -1
  15. package/dist/assets/InspectorObjectPreview-BDdu8_eg.js +1 -0
  16. package/dist/assets/{JsonAssetDocument-ChhlRvdh.js → JsonAssetDocument-o9GmAsdM.js} +1 -1
  17. package/dist/assets/{LiveModuleDocument-BBpws-_t.js → LiveModuleDocument-BWD3BRD5.js} +1 -1
  18. package/dist/assets/{LutAssetDocument-DYvPXEBg.js → LutAssetDocument-DyGMbNUY.js} +1 -1
  19. package/dist/assets/{ModelAssetDocument-OhbJGtHY.js → ModelAssetDocument-Cu3iz17t.js} +1 -1
  20. package/dist/assets/{NonThreeAuthoringBootstrap-DACaW5Vs.js → NonThreeAuthoringBootstrap-BSKmUNm7.js} +1 -1
  21. package/dist/assets/Object3DDocumentToolbar-DQgrgZm-.js +1 -0
  22. package/dist/assets/Object3DDocumentViewport-BO8cQpfz.js +2 -0
  23. package/dist/assets/{Object3DPreview-DtiKkA9J.js → Object3DPreview-BiV2L22J.js} +1 -1
  24. package/dist/assets/{OnlineAssetDetail-CW7WV3OO.js → OnlineAssetDetail-dzJ7zVGn.js} +1 -1
  25. package/dist/assets/{PlayBar-B_Lni0-H.js → PlayBar-BNX3VDap.js} +1 -1
  26. package/dist/assets/{QuarksAssetDocument-CG9QU-_U.js → QuarksAssetDocument-CNGkA04J.js} +1 -1
  27. package/dist/assets/{ReactCanvasControls-CVmKmPCB.js → ReactCanvasControls-B8jYd9hF.js} +1 -1
  28. package/dist/assets/{RootSelectionOverlay-BBPSUpGw.js → RootSelectionOverlay-bRZESSuF.js} +1 -1
  29. package/dist/assets/{ShaderAssetDocument-Cf8KU6yA.js → ShaderAssetDocument-Dz8nUQTd.js} +1 -1
  30. package/dist/assets/{ShadowEditor-axHBX3ZT.js → ShadowEditor-Cd42Vn5p.js} +1 -1
  31. package/dist/assets/{SourceAssetViewer-mb-qv2H4.js → SourceAssetViewer-Dn123u21.js} +1 -1
  32. package/dist/assets/StageHost-Dl828r-D.js +2 -0
  33. package/dist/assets/{StoryPreviewMount-CN9Jjj_B.js → StoryPreviewMount----1n4I9.js} +1 -1
  34. package/dist/assets/{ThreeBoardDocument-CP2sAfro.js → ThreeBoardDocument-Ddi3tJKU.js} +2 -2
  35. package/dist/assets/{ThreeIsolationSceneContent-CHm48Iwq.js → ThreeIsolationSceneContent-DhRNK_Pk.js} +1 -1
  36. package/dist/assets/{ToolObject3DPreview-BMGfohlr.js → ToolObject3DPreview-BJ36CuMz.js} +1 -1
  37. package/dist/assets/{Toolbar-By5RmjZA.js → Toolbar-ojOR9QqG.js} +1 -1
  38. package/dist/assets/{TransientHint-DvlYI-GB.js → TransientHint-zolL-usI.js} +1 -1
  39. package/dist/assets/{VideoViewer-C_Ypqrhs.js → VideoViewer-D9cRMSvt.js} +1 -1
  40. package/dist/assets/{ViewportShadingMenu-DnqUmVm4.js → ViewportShadingMenu-DFceZcoK.js} +1 -1
  41. package/dist/assets/{active-ingest-BEQcTdnB.js → active-ingest-r1yywcPp.js} +2 -2
  42. package/dist/assets/{animation-clock-DdJoDJut.js → animation-clock-DxKi6_pi.js} +1 -1
  43. package/dist/assets/{animation-mixers.service-Cwwx5Rk1.js → animation-mixers.service-Cu6qOto6.js} +1 -1
  44. package/dist/assets/{animation-timeline.utility-COGKHdbx.js → animation-timeline.utility-DRXtaPD-.js} +1 -1
  45. package/dist/assets/{asset-budget-asset.menu-Dnh4Og48.js → asset-budget-asset.menu-BY1GoDri.js} +1 -1
  46. package/dist/assets/{asset-budget.action-CWMJY1nK.js → asset-budget.action-B5KdCHk9.js} +1 -1
  47. package/dist/assets/{asset-budget.document-D0eHpYEa.js → asset-budget.document-DsMc1xZM.js} +1 -1
  48. package/dist/assets/{asset-budget.menu-BEOvkmkJ.js → asset-budget.menu-CcWUarRf.js} +1 -1
  49. package/dist/assets/{asset-editor-persistence-Bk2mBIUR.js → asset-editor-persistence-CC5GKsod.js} +1 -1
  50. package/dist/assets/{asset-loaders-CtCb12Wy.js → asset-loaders-B9eaxiOH.js} +1 -1
  51. package/dist/assets/{asset-preview-DLr3X2Ff.js → asset-preview-D2owLI9l.js} +1 -1
  52. package/dist/assets/{audio-unlock.service-g6nZnyKt.js → audio-unlock.service-BPU4OvYv.js} +1 -1
  53. package/dist/assets/{audio.utility-qHaPxVG5.js → audio.utility-CwJJPeQi.js} +1 -1
  54. package/dist/assets/autoplay.service-DXFk79y0.js +1 -0
  55. package/dist/assets/{babylon-authoring-adapter-Bflf5oll.js → babylon-authoring-adapter-CNsa_ojR.js} +1 -1
  56. package/dist/assets/{binding-resolver-Cp64QEEm.js → binding-resolver-DsCNzFA4.js} +2 -2
  57. package/dist/assets/{blender-node-editor.document-BS6XiYdy.js → blender-node-editor.document-dQgrelsI.js} +1 -1
  58. package/dist/assets/{blender-properties-tab-DPGcP6sE.js → blender-properties-tab-DrNsXzb1.js} +1 -1
  59. package/dist/assets/{blender-runtime-host-CbZll4j6.js → blender-runtime-host-Dmxej5C1.js} +1 -1
  60. package/dist/assets/{blender-runtime-skin-CU4ON8U6.js → blender-runtime-skin-bwX7Nqhl.js} +1 -1
  61. package/dist/assets/{blender-runtime.document-DFk6LfKL.js → blender-runtime.document-C0zbN8eD.js} +7 -7
  62. package/dist/assets/{blender-screenshot.menu-Zh-gSLyF.js → blender-screenshot.menu-ENgOvjqb.js} +1 -1
  63. package/dist/assets/{blender-timeline.document-DNGYxSVR.js → blender-timeline.document-BYGOuiA3.js} +1 -1
  64. package/dist/assets/{blender-uv-editor.document-DPeAgCdu.js → blender-uv-editor.document-CHRiH3Xj.js} +1 -1
  65. package/dist/assets/{blender-version.status-Csf1NdCu.js → blender-version.status-Cqoz2Xt3.js} +1 -1
  66. package/dist/assets/{blender.command-zra5rClU.js → blender.command-DKEefbj1.js} +1 -1
  67. package/dist/assets/{board-guides-Dr7UmPbr.js → board-guides-FTLvkEFa.js} +1 -1
  68. package/dist/assets/{bridge.command-Bx4V0CGQ.js → bridge.command-4jXTXHwg.js} +3 -3
  69. package/dist/assets/{browserAll-Dq7w5Sua.js → browserAll-DpiwdkXK.js} +1 -1
  70. package/dist/assets/{build-player.document-CNQbxiwV.js → build-player.document-Dl55zATx.js} +1 -1
  71. package/dist/assets/{build-profiles.document-BPB32ZWV.js → build-profiles.document-CGlu3XIb.js} +1 -1
  72. package/dist/assets/{build-progress.status-rSsHAPQ2.js → build-progress.status-DyQBUPVM.js} +1 -1
  73. package/dist/assets/{build-session-DNW4mFav.js → build-session-BfYk0ds_.js} +1 -1
  74. package/dist/assets/{build.action-Dyk6sukW.js → build.action-DyMCzYi6.js} +1 -1
  75. package/dist/assets/{build.command-BtNjabOw.js → build.command-D0C90Slq.js} +1 -1
  76. package/dist/assets/{build.header-DcJSZtCO.js → build.header-CiilZdKw.js} +1 -1
  77. package/dist/assets/{build.menu-NxQtwHgd.js → build.menu-D1SH5hRL.js} +1 -1
  78. package/dist/assets/{build.service-7Up4tNeR.js → build.service-BQmzlulw.js} +1 -1
  79. package/dist/assets/{camera-lGstadDR.js → camera-CU0xLAwk.js} +1 -1
  80. package/dist/assets/{camera-runtime.inspector-DclViJea.js → camera-runtime.inspector-C4XW_KZ_.js} +1 -1
  81. package/dist/assets/{canvas-design-mount-eCCv2or-.js → canvas-design-mount-ChRgv27V.js} +3 -3
  82. package/dist/assets/{canvas-entry-runtime-BT12lNQT.js → canvas-entry-runtime-H30RJRyu.js} +2 -2
  83. package/dist/assets/{canvas-preview-frames-CIiSC8-I.js → canvas-preview-frames-ChYPliVq.js} +1 -1
  84. package/dist/assets/{canvas-story-capture.service-DmVs5hJt.js → canvas-story-capture.service-DJ9dl1Mu.js} +2 -2
  85. package/dist/assets/{capability-coverage-D_4ewfIt.js → capability-coverage-DOavbLew.js} +1 -1
  86. package/dist/assets/{collaboration-presence-B6A41ctS.js → collaboration-presence-t7o0vi1M.js} +1 -1
  87. package/dist/assets/{collider-UIoHvnAV.js → collider-DKLkJ7lA.js} +1 -1
  88. package/dist/assets/{component-board.service-BY1eTL_6.js → component-board.service-BW_MtjdI.js} +2 -2
  89. package/dist/assets/{component-board.service-ymaR5Gc6.js → component-board.service-CWHaVL52.js} +2 -2
  90. package/dist/assets/{component-board.service-Cqv0Cqk8.js → component-board.service-D-uZS9b7.js} +2 -2
  91. package/dist/assets/{component-contracts.service-BnuCkosG.js → component-contracts.service-DZQOWyYF.js} +1 -1
  92. package/dist/assets/{component-instance-root-CPMZslj8.js → component-instance-root-DWnAyiCF.js} +1 -1
  93. package/dist/assets/{component-verbs.command-BE_JeIuS.js → component-verbs.command-DblE8n1e.js} +1 -1
  94. package/dist/assets/{component-verbs.service-1VQEboWj.js → component-verbs.service-DKMldHLz.js} +1 -1
  95. package/dist/assets/{config-BbIJR-Td.js → config-Da_2x7yp.js} +2 -2
  96. package/dist/assets/{configurations-CAI-raMi.js → configurations-Ba95Wh7h.js} +1 -1
  97. package/dist/assets/{connection.status-MORY2ecq.js → connection.status-BB95dUSR.js} +1 -1
  98. package/dist/assets/{constraints.inspector-yAWUn_QN.js → constraints.inspector-CRXTzNEc.js} +1 -1
  99. package/dist/assets/{content-bounds-DbjVwafW.js → content-bounds-B_qOatak.js} +1 -1
  100. package/dist/assets/{contract-system-adapters-B7HjmMU3.js → contract-system-adapters-CgveZ5w6.js} +1 -1
  101. package/dist/assets/{coverage.service-BpHkqGqx.js → coverage.service-Dr2w-xbV.js} +1 -1
  102. package/dist/assets/{create-runtime-CMdnacgk.js → create-runtime-toc2PJNG.js} +1 -1
  103. package/dist/assets/{curve-W-sfW-YV.js → curve-BrQUXx3G.js} +1 -1
  104. package/dist/assets/{data-asset-BwavdNYa.js → data-asset-BOM8bxL-.js} +1 -1
  105. package/dist/assets/{data-ref-BKAuxnNn.js → data-ref-CFdLBdys.js} +1 -1
  106. package/dist/assets/{debug-bridge-Ce2BNh0c.js → debug-bridge-B69WpvC9.js} +1 -1
  107. package/dist/assets/{debug-registry-Cs16f-aE.js → debug-registry-VvstjDrx.js} +1 -1
  108. package/dist/assets/{deferred-ingest-play-i3TXIcol.js → deferred-ingest-play-vdDuU6B0.js} +2 -2
  109. package/dist/assets/{design-time-canvas-mount-DRuLuHb8.js → design-time-canvas-mount-BaEYQxSc.js} +2 -2
  110. package/dist/assets/{design-time-layers-CIQmpekh.js → design-time-layers-DCgfvrVA.js} +1 -1
  111. package/dist/assets/{design-time-mount.service-FXHDWVCG.js → design-time-mount.service-B5BWrJCQ.js} +2 -2
  112. package/dist/assets/{design-time-mount.service-CVTv4ycX.js → design-time-mount.service-DoQN0mkf.js} +2 -2
  113. package/dist/assets/{design-time-react-mount-BctXdzCd.js → design-time-react-mount-D4wSv6Dz.js} +1 -1
  114. package/dist/assets/{document-preview-three-B2MgbkoT.js → document-preview-three-Bzow1uvw.js} +1 -1
  115. package/dist/assets/{dom-authoring-adapter-DIVIU5iS.js → dom-authoring-adapter-B72PZJtq.js} +1 -1
  116. package/dist/assets/{draco3d-DqB07Xwz.js → draco3d-C-EhPO89.js} +1 -1
  117. package/dist/assets/{edit-mode-audio.service-BdMtawvV.js → edit-mode-audio.service-BI-Fc9nD.js} +1 -1
  118. package/dist/assets/{edit-mode-authoring-BYKTzHxo.js → edit-mode-authoring-CRIZRixu.js} +1 -1
  119. package/dist/assets/{edit-mode-networking.service-BMgRT6VZ.js → edit-mode-networking.service-Bad2bB3N.js} +1 -1
  120. package/dist/assets/{editor-api-MVTYddFN.js → editor-api-CneTaB5M.js} +1 -1
  121. package/dist/assets/{editor-layers-DB2HoNYg.js → editor-layers-CAPby0Hv.js} +1 -1
  122. package/dist/assets/{editor-shell-store-B_3I8rkh.js → editor-shell-store-CQs9DVQJ.js} +1 -1
  123. package/dist/assets/{entity-object-Btp4Cm7a.js → entity-object-zTQM9DN_.js} +1 -1
  124. package/dist/assets/{extend-BBPSDBSg.js → extend-Bdq0io5w.js} +1 -1
  125. package/dist/assets/{fork-menu-igGxVTU5.js → fork-menu-yt5IHPcT.js} +1 -1
  126. package/dist/assets/{frame-debugger-store-CGTQsnpN.js → frame-debugger-store-DSAdYRfx.js} +1 -1
  127. package/dist/assets/{game-contract-seams-CqP5-7QG.js → game-contract-seams-B_zl6uU9.js} +1 -1
  128. package/dist/assets/{game-css-scope-transform-BLyGDsn5.js → game-css-scope-transform-ZVhdpWnP.js} +1 -1
  129. package/dist/assets/{game-document.service-BMXhV4k0.js → game-document.service-BobnaxzD.js} +1 -1
  130. package/dist/assets/{game-eval.command-BBdWh7r4.js → game-eval.command-4V0w1fNz.js} +1 -1
  131. package/dist/assets/{game-module-access-DB-3_dQL.js → game-module-access-BQ3o3C0Q.js} +1 -1
  132. package/dist/assets/{game-network-CjxVSmyx.js → game-network-BU6239o6.js} +3 -3
  133. package/dist/assets/{gameplay-export-CKg7Tr5V.js → gameplay-export-C8950Le6.js} +1 -1
  134. package/dist/assets/{gameplay-replay-BKk0MkWw.js → gameplay-replay-BJ1pJYXS.js} +1 -1
  135. package/dist/assets/{gameplay.command-BzuqC2M4.js → gameplay.command-DgHGyZ4h.js} +1 -1
  136. package/dist/assets/{generation-jobs-Bc9aPUjo.js → generation-jobs-CcknS4pv.js} +1 -1
  137. package/dist/assets/{generation.service-Ctq8vDs8.js → generation.service-BeDx1xJc.js} +1 -1
  138. package/dist/assets/{generations-v6wlWOxc.js → generations-PkqqpuzH.js} +1 -1
  139. package/dist/assets/{generations.status-D23nC6DT.js → generations.status-D1b31tOr.js} +1 -1
  140. package/dist/assets/{hierarchy-marks-BUq91mYX.js → hierarchy-marks-GUZsksxj.js} +1 -1
  141. package/dist/assets/{hosted-asset-materialization-B1mfxDMA.js → hosted-asset-materialization-981czI5Y.js} +1 -1
  142. package/dist/assets/{index-YE-BLlXn.js → index-14EpbzhC.js} +1 -1
  143. package/dist/assets/{index-CPn7DYN1.js → index-4yacfVw5.js} +1 -1
  144. package/dist/assets/{index-DyTgGJaV.js → index-BFyEWcX2.js} +187 -187
  145. package/dist/assets/{index-COGWs_Hz.js → index-Bd-fPqp1.js} +2 -2
  146. package/dist/assets/{index-Da25n7KE.js → index-D0fspcqL.js} +1 -1
  147. package/dist/assets/{index-Cq5IOeJJ.js → index-DSK8_SXt.js} +1 -1
  148. package/dist/assets/{index-Bi11wn2O.js → index-DfMlDwlh.js} +1 -1
  149. package/dist/assets/{index-C_Y18gyB.js → index-rzDnGAEw.js} +1 -1
  150. package/dist/assets/{index-BWkADFm_.js → index-zAaww6ix.js} +1 -1
  151. package/dist/assets/{inference-diagnostics--P59uVfZ.js → inference-diagnostics-C0WaA1x7.js} +1 -1
  152. package/dist/assets/{ingest-boot-viewport-CG06rhnI.js → ingest-boot-viewport-DGmxHHrb.js} +1 -1
  153. package/dist/assets/{ingest-siblings-lud-fBi3.js → ingest-siblings-Bk81x0z6.js} +1 -1
  154. package/dist/assets/{ingest-source-persistence-Dlr1NuFz.js → ingest-source-persistence-Dk4bo3Sd.js} +1 -1
  155. package/dist/assets/{ingest.service--OsL8JsR.js → ingest.service-CrJ-KUL9.js} +1 -1
  156. package/dist/assets/{inspect-DuE1D5UR.js → inspect-BFReLad2.js} +1 -1
  157. package/dist/assets/instances.command-BcJ4mH4O.js +1 -0
  158. package/dist/assets/{json-history-resource-IKUe_-vd.js → json-history-resource-DOORsgaQ.js} +1 -1
  159. package/dist/assets/{layered-pick-BtIxP5aF.js → layered-pick-DOpFeBlO.js} +1 -1
  160. package/dist/assets/{light-CWgqDXEE.js → light-BIq_QpYD.js} +1 -1
  161. package/dist/assets/{live-project-verbs-CHp_aQ8s.js → live-project-verbs-CzP4gmX4.js} +1 -1
  162. package/dist/assets/{machine.document-DnI8qlb5.js → machine.document-DdfZLt3N.js} +1 -1
  163. package/dist/assets/{machines.finder-bsxZB24L.js → machines.finder-CDnR1K1s.js} +1 -1
  164. package/dist/assets/{material-t5AUiIjm.js → material-BjW_-YEJ.js} +1 -1
  165. package/dist/assets/{material-factory-Bl4Vy50a.js → material-factory-XpbBVUnr.js} +1 -1
  166. package/dist/assets/{mesh-D0ARI7DT.js → mesh-BfZresje.js} +1 -1
  167. package/dist/assets/{model-asset-sections.service-BcfL914J.js → model-asset-sections.service-DFkR4R3M.js} +1 -1
  168. package/dist/assets/{model-inspection-BinpX_8X.js → model-inspection-56h14WYx.js} +1 -1
  169. package/dist/assets/{model-thumbnail-D5m5B4yc.js → model-thumbnail-COjS8TOV.js} +1 -1
  170. package/dist/assets/{models.finder-BbLyybE3.js → models.finder-Bce_J9iL.js} +1 -1
  171. package/dist/assets/{module-mode-CX71o-Qn.js → module-mode-CPf7Xm0H.js} +2 -2
  172. package/dist/assets/{mount-canvas-ingest-root-BL4ma7EJ.js → mount-canvas-ingest-root-C-pitVtq.js} +2 -2
  173. package/dist/assets/{mount-dom-ingest-root-BFN7fuIH.js → mount-dom-ingest-root-Cr_XDGgV.js} +2 -2
  174. package/dist/assets/{mount-ingest-root-CCtls9Pm.js → mount-ingest-root-Ctc5pwYE.js} +2 -2
  175. package/dist/assets/{mount-manifest-CesgcqbR.js → mount-manifest-Nx7h8MNc.js} +1 -1
  176. package/dist/assets/{mount-three-ingest-root-CO7xNkMs.js → mount-three-ingest-root-w3obwrRP.js} +1 -1
  177. package/dist/assets/{mounted-authoring-D5zJIfVC.js → mounted-authoring-CcGxkenJ.js} +1 -1
  178. package/dist/assets/{mounted-story-viewport-source-Cacn-FrZ.js → mounted-story-viewport-source-BXKDosoZ.js} +1 -1
  179. package/dist/assets/{native-debug-module-Cexnkzpz.js → native-debug-module-BydU22ga.js} +1 -1
  180. package/dist/assets/{navigation-C04dv_AE.js → navigation-CQmYDWUr.js} +1 -1
  181. package/dist/assets/{navmesh.menu-BR3qfEFi.js → navmesh.menu-Cxz_CrlL.js} +1 -1
  182. package/dist/assets/{navmesh.service-cZZp_aWp.js → navmesh.service-BzY3qzVs.js} +1 -1
  183. package/dist/assets/network-observer.service-Dppy6Ilx.js +1 -0
  184. package/dist/assets/{network.utility-DUizYX_I.js → network.utility-RsWh2HtM.js} +1 -1
  185. package/dist/assets/{object3d-document-session-registry-DkPO8z-D.js → object3d-document-session-registry-kGTrA1br.js} +2 -2
  186. package/dist/assets/{oid-transform-CTTG13hx.js → oid-transform-Cbf9Vl9B.js} +1 -1
  187. package/dist/assets/{particles-Cl0uw7lL.js → particles-CAO_ZwxM.js} +1 -1
  188. package/dist/assets/{pixi-authoring-adapter-Bqfxw_3m.js → pixi-authoring-adapter-cUTjI2Fi.js} +1 -1
  189. package/dist/assets/{pixi-live-write-target-DBVljmfv.js → pixi-live-write-target-BQuGxmlr.js} +1 -1
  190. package/dist/assets/{play.command-BPWKJOEz.js → play.command-CMmjbQEZ.js} +2 -2
  191. package/dist/assets/{presentation-BmRLRj9u.js → presentation-BLEtEw4u.js} +1 -1
  192. package/dist/assets/{product-CkPQ3Ux6.js → product-BZcLr5ye.js} +1 -1
  193. package/dist/assets/{profiler.action-DJPQHO0O.js → profiler.action-DvT006fB.js} +1 -1
  194. package/dist/assets/{profiler.menu-DWjSnHVe.js → profiler.menu-DG6pWc8T.js} +1 -1
  195. package/dist/assets/{profiler.utility-Y6h6m2t-.js → profiler.utility-BBaXJXzR.js} +1 -1
  196. package/dist/assets/{project-authoring-session-DBF7pYCM.js → project-authoring-session-6JT9luFO.js} +2 -2
  197. package/dist/assets/{properties-bone-constraints.inspector-DEdkTEo5.js → properties-bone-constraints.inspector-TBP_22BR.js} +1 -1
  198. package/dist/assets/{properties-bone.inspector-H-BBVZ8o.js → properties-bone.inspector-D9YNgjTc.js} +1 -1
  199. package/dist/assets/{properties-collection.inspector-BcsCcAvS.js → properties-collection.inspector-DJ6u-fss.js} +1 -1
  200. package/dist/assets/{properties-constraints.inspector-CUu-cNQ6.js → properties-constraints.inspector-BqaisUOb.js} +1 -1
  201. package/dist/assets/{properties-data.inspector-BUel_GUU.js → properties-data.inspector-CcmDY5E2.js} +1 -1
  202. package/dist/assets/{properties-material.inspector-CIDoVmLo.js → properties-material.inspector-R46saHYE.js} +1 -1
  203. package/dist/assets/{properties-modifiers.inspector--4LrHaeK.js → properties-modifiers.inspector-C68S-ChZ.js} +1 -1
  204. package/dist/assets/{properties-object.inspector-B8EgTfAi.js → properties-object.inspector-DM_w8AOW.js} +1 -1
  205. package/dist/assets/{properties-output.inspector-De86chrb.js → properties-output.inspector-fSc-juqN.js} +1 -1
  206. package/dist/assets/{properties-particles.inspector-Tcr6I9r6.js → properties-particles.inspector-CIT5hfhi.js} +1 -1
  207. package/dist/assets/{properties-physics.inspector-B1e-ODZG.js → properties-physics.inspector-SHk6WUvJ.js} +1 -1
  208. package/dist/assets/{properties-render.inspector-C8UodgyN.js → properties-render.inspector-O0ldO7Zr.js} +1 -1
  209. package/dist/assets/{properties-scene.inspector-D51KNWsk.js → properties-scene.inspector-Ci85gHWj.js} +1 -1
  210. package/dist/assets/{properties-texture.inspector-BclKARti.js → properties-texture.inspector-B-EH6rIW.js} +1 -1
  211. package/dist/assets/{properties-view-layer.inspector-BzRfWdvM.js → properties-view-layer.inspector-BszoTOSA.js} +1 -1
  212. package/dist/assets/{properties-world.inspector-XxcFLmWg.js → properties-world.inspector-BoWdXUWA.js} +1 -1
  213. package/dist/assets/{r3f-design-session-_2tBNT-r.js → r3f-design-session-Dul_kZo4.js} +2 -2
  214. package/dist/assets/{r3f-physics-binding-DyvJAWJ4.js → r3f-physics-binding-Du5rtFoC.js} +1 -1
  215. package/dist/assets/{r3f-source-authoring-adapter-Ds3u5Oet.js → r3f-source-authoring-adapter-Dn8nydrx.js} +1 -1
  216. package/dist/assets/{react-canvas-navigation-DDNw2mVf.js → react-canvas-navigation-BQa-T4MI.js} +1 -1
  217. package/dist/assets/{react-inspector.service-BOa9W_rc.js → react-inspector.service-m3uD-_5_.js} +1 -1
  218. package/dist/assets/{react-story-board-DnBISTPF.js → react-story-board-CIHXdpjI.js} +1 -1
  219. package/dist/assets/{react-three-rapier.esm-C7mV19Rd.js → react-three-rapier.esm-BhDIIKZ0.js} +1 -1
  220. package/dist/assets/{react-world-authoring-adapter-COQGilV0.js → react-world-authoring-adapter-CU99D7zP.js} +1 -1
  221. package/dist/assets/{realm-services-BVbgboYj.js → realm-services-CILJ6zey.js} +1 -1
  222. package/dist/assets/{reflection-probe-capture.inspector-9PURKnEk.js → reflection-probe-capture.inspector-AUEWKlrj.js} +1 -1
  223. package/dist/assets/{registry-BKnWLREo.js → registry-BWcuPj29.js} +1 -1
  224. package/dist/assets/{relative-import-specifier-DSTZtgN9.js → relative-import-specifier-P8rMB-CK.js} +1 -1
  225. package/dist/assets/{render-env-B-xiPHul.js → render-env-BB06tIsF.js} +1 -1
  226. package/dist/assets/{render-features-D6cEaZG_.js → render-features-uEFcjQU0.js} +1 -1
  227. package/dist/assets/{render-settings-7qvwHFf7.js → render-settings-Bb-m2kWa.js} +1 -1
  228. package/dist/assets/{resolve-three-BD3-wAF-.js → resolve-three-CD-7buTi.js} +3 -3
  229. package/dist/assets/{root-seam-contract-Dc0xW5J5.js → root-seam-contract-ByczBWZN.js} +1 -1
  230. package/dist/assets/{run-selection-_aAcIhA1.js → run-selection-BtRtlndq.js} +1 -1
  231. package/dist/assets/{scene-capture-dVfR7MjE.js → scene-capture-BVZICU3j.js} +1 -1
  232. package/dist/assets/{scene-document.service-CnUCT9fC.js → scene-document.service-MD9RNIFc.js} +2 -2
  233. package/dist/assets/{scene-framing-C7gr65sn.js → scene-framing-DvchrQCR.js} +1 -1
  234. package/dist/assets/{seeded-random-C1JwJC9g.js → seeded-random-DZtqqRJ0.js} +1 -1
  235. package/dist/assets/{setup-renderer-CRrjb8S9.js → setup-renderer-KGBMQDvQ.js} +1 -1
  236. package/dist/assets/{source-object3d-authoring-adapter-CJ9_kgH4.js → source-object3d-authoring-adapter-MR9l6cHu.js} +1 -1
  237. package/dist/assets/{source-persistence-backend-BdjiG8o9.js → source-persistence-backend-4POQX0tD.js} +1 -1
  238. package/dist/assets/{stage-keyboard-CtMpQmTO.js → stage-keyboard-DNbcw6h7.js} +1 -1
  239. package/dist/assets/{stage-overlay-set-CL7TBswp.js → stage-overlay-set-CVtktpvC.js} +1 -1
  240. package/dist/assets/{stage-presence-markers-Dkrf-OpF.js → stage-presence-markers-COSonp3_.js} +1 -1
  241. package/dist/assets/{stage-transform-tools-IQWWdhuo.js → stage-transform-tools-CYag685W.js} +1 -1
  242. package/dist/assets/{standard-viewport-dressing-TKOcIR28.js → standard-viewport-dressing-DQzqVp_M.js} +1 -1
  243. package/dist/assets/{state-watch.action-Py4YF3Vd.js → state-watch.action-Dnzd5guY.js} +1 -1
  244. package/dist/assets/{state-watch.menu-D7XAVt6T.js → state-watch.menu-CIWLWLcz.js} +1 -1
  245. package/dist/assets/{state-watch.utility-CdT0mIIq.js → state-watch.utility-_AOWUKQB.js} +1 -1
  246. package/dist/assets/{story-capture-D_XIHNG7.js → story-capture-APz8rVoc.js} +1 -1
  247. package/dist/assets/{story-documents-CRrYBLbv.js → story-documents-DEkKcXq_.js} +1 -1
  248. package/dist/assets/{story-documents.service-C-IYLdxc.js → story-documents.service-C8IJVUwq.js} +1 -1
  249. package/dist/assets/{story-documents.service-CCMjjodb.js → story-documents.service-CEwgn1G3.js} +1 -1
  250. package/dist/assets/{story-media-presence-Bw1o6E62.js → story-media-presence-hGtZ_CRR.js} +1 -1
  251. package/dist/assets/{story-pixi-preview-5WqHTgoT.js → story-pixi-preview-i5D34z_-.js} +1 -1
  252. package/dist/assets/{story-presentation-B4xwjorS.js → story-presentation-Du2nHXiE.js} +1 -1
  253. package/dist/assets/{story-three-preview-CfJiHAyJ.js → story-three-preview-CtqxaxRB.js} +2 -2
  254. package/dist/assets/{studio-environment-BTgaAUb4.js → studio-environment-Cg9kNcPo.js} +1 -1
  255. package/dist/assets/{surface-state-mdcl-Ho-.js → surface-state-DApsrbwZ.js} +1 -1
  256. package/dist/assets/{syntactic-prop-specs-BcjoSr_8.js → syntactic-prop-specs-CgzZ-eM7.js} +1 -1
  257. package/dist/assets/{team-playtest.service-gdwlVptm.js → team-playtest.service-DqNVRue_.js} +1 -1
  258. package/dist/assets/{three-authoring-adapter-DwCMnivG.js → three-authoring-adapter-BcTvwi-3.js} +1 -1
  259. package/dist/assets/three-authoring.service-Bdpnig_-.js +2 -0
  260. package/dist/assets/{three-ingest-runtime-2OKIJvOp.js → three-ingest-runtime-C88LKOHV.js} +1 -1
  261. package/dist/assets/three-integration-DmB0aiQd.js +2 -0
  262. package/dist/assets/three-integration.service-BEyI-yAw.js +1 -0
  263. package/dist/assets/{three-projection-core-BH7eWjmL.js → three-projection-core-CX_RAg4u.js} +1 -1
  264. package/dist/assets/{three-state-Beoor2qe.js → three-state-BB-aEdQ2.js} +1 -1
  265. package/dist/assets/{three-story-capture.service-D_d_HJUY.js → three-story-capture.service-DGN6D2x2.js} +2 -2
  266. package/dist/assets/{three-story-model-m26ngwoa.js → three-story-model-B2prCCT6.js} +1 -1
  267. package/dist/assets/{three-CnFqjv_X.js → three-uwF5ndav.js} +1 -1
  268. package/dist/assets/{three-viewport-presentation-Dv139ZhF.js → three-viewport-presentation-CA9LWfoO.js} +5 -5
  269. package/dist/assets/{transform-mode-request-DP_ObjSV.js → transform-mode-request-BIQ6hEzE.js} +1 -1
  270. package/dist/assets/{transport-strip-0nwKohqK.js → transport-strip-BEHUSI3R.js} +1 -1
  271. package/dist/assets/transport.header-jnZvo4qn.js +1 -0
  272. package/dist/assets/{tuples-DhXwxLo-.js → tuples-CgCEQ7dP.js} +1 -1
  273. package/dist/assets/{ui-board-document-iOzWO-IY.js → ui-board-document-BdZSSAVU.js} +2 -2
  274. package/dist/assets/{user-data-W4XQSuJh.js → user-data-jSXWWKWi.js} +1 -1
  275. package/dist/assets/{utility-view-state-VNkuk8W4.js → utility-view-state-e_tiTwn-.js} +1 -1
  276. package/dist/assets/{viewport-door-BAOv87Fs.js → viewport-door-efEPPdOc.js} +1 -1
  277. package/dist/assets/{viewport-root-presentation-Ba-vx6UG.js → viewport-root-presentation-PkBZOfkd.js} +1 -1
  278. package/dist/assets/{viewport-surface-status-qvgNJYzx.js → viewport-surface-status-C9RXutbu.js} +1 -1
  279. package/dist/assets/{webworkerAll-CiO0kb-H.js → webworkerAll-vs8kAI8B.js} +1 -1
  280. package/dist/assets/{workspace-arrangement-Dl7Q2V4T.js → workspace-arrangement-CImWaUGK.js} +1 -1
  281. package/dist/assets/{world-documents-DNFr2sNk.js → world-documents-CuZ361ET.js} +1 -1
  282. package/dist/assets/{world-root-stage-binding-DMyedsHY.js → world-root-stage-binding-DWf76qw9.js} +1 -1
  283. package/dist/assets/{xstate-animation-binding-bEAsNebg.js → xstate-animation-binding-BoDJcUiT.js} +1 -1
  284. package/dist/assets/{xstate-animation-meta-NEG890lY.js → xstate-animation-meta-DmZNTMtV.js} +1 -1
  285. package/dist-node/cli.js +25 -17
  286. package/package.json +16 -16
  287. package/dist/assets/InspectorObjectPreview-K6qqzlCF.js +0 -1
  288. package/dist/assets/Object3DDocumentToolbar-CW5xzjh7.js +0 -1
  289. package/dist/assets/Object3DDocumentViewport-C6qwIfnP.js +0 -2
  290. package/dist/assets/StageHost-CltfMwcG.js +0 -2
  291. package/dist/assets/autoplay.service-CQBU7J4-.js +0 -1
  292. package/dist/assets/instances.command-Dzidr8Yl.js +0 -1
  293. package/dist/assets/network-observer.service-DbrkhWzR.js +0 -1
  294. package/dist/assets/three-authoring.service-D6PIh-T5.js +0 -2
  295. package/dist/assets/three-integration-Bc5bObpY.js +0 -2
  296. package/dist/assets/three-integration.service-DKjGhYsk.js +0 -1
  297. package/dist/assets/transport.header-CbCAtj5s.js +0 -1
@@ -1 +1 @@
1
- import{D as v}from"./debug-registry-Cs16f-aE.js";import{r as _}from"./game-network-CjxVSmyx.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-VvstjDrx.js";import{r as _}from"./game-network-BU6239o6.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-DyTgGJaV.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-BFyEWcX2.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-BT12lNQT.js","assets/index-DyTgGJaV.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-Cs16f-aE.js","assets/mount-ingest-root-CCtls9Pm.js","assets/active-ingest-BEQcTdnB.js","assets/game-contract-seams-CqP5-7QG.js","assets/capability-coverage-D_4ewfIt.js","assets/ingest-source-persistence-Dlr1NuFz.js","assets/contract-system-adapters-B7HjmMU3.js","assets/three-state-Beoor2qe.js","assets/editor-shell-store-B_3I8rkh.js","assets/output-pass-HurwNl0G.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/Pass-D1MRT672.js","assets/editor-layers-DB2HoNYg.js","assets/workspace-arrangement-Dl7Q2V4T.js","assets/user-data-W4XQSuJh.js","assets/entity-object-Btp4Cm7a.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-DyTgGJaV.js";import{q as v}from"./edit-mode-authoring-BYKTzHxo.js";import{d as P,a as c,b as w,g as y,e as I,c as _}from"./active-ingest-BEQcTdnB.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-CqP5-7QG.js";import"./capability-coverage-D_4ewfIt.js";import"./ingest-source-persistence-Dlr1NuFz.js";import"./contract-system-adapters-B7HjmMU3.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-BT12lNQT.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-CCtls9Pm.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-H30RJRyu.js","assets/index-BFyEWcX2.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-VvstjDrx.js","assets/mount-ingest-root-Ctc5pwYE.js","assets/active-ingest-r1yywcPp.js","assets/game-contract-seams-B_zl6uU9.js","assets/capability-coverage-DOavbLew.js","assets/ingest-source-persistence-Dk4bo3Sd.js","assets/contract-system-adapters-CgveZ5w6.js","assets/three-state-BB-aEdQ2.js","assets/editor-shell-store-CQs9DVQJ.js","assets/output-pass-HurwNl0G.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/Pass-D1MRT672.js","assets/editor-layers-CAPby0Hv.js","assets/workspace-arrangement-CImWaUGK.js","assets/user-data-jSXWWKWi.js","assets/entity-object-zTQM9DN_.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-BFyEWcX2.js";import{q as v}from"./edit-mode-authoring-CRIZRixu.js";import{d as P,a as c,b as w,g as y,e as I,c as _}from"./active-ingest-r1yywcPp.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-B_zl6uU9.js";import"./capability-coverage-DOavbLew.js";import"./ingest-source-persistence-Dk4bo3Sd.js";import"./contract-system-adapters-CgveZ5w6.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-H30RJRyu.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-Ctc5pwYE.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-eCCv2or-.js","assets/index-DyTgGJaV.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-Bflf5oll.js","assets/json-history-resource-IKUe_-vd.js","assets/source-persistence-backend-BdjiG8o9.js","assets/ingest-source-persistence-Dlr1NuFz.js","assets/pixi-authoring-adapter-Bqfxw_3m.js","assets/index-COGWs_Hz.js","assets/component-instance-root-CPMZslj8.js","assets/user-data-W4XQSuJh.js","assets/workspace-arrangement-Dl7Q2V4T.js","assets/pixi-transform-channels-P4rvmusc.js","assets/relative-import-specifier-DSTZtgN9.js","assets/oid-transform-CTTG13hx.js","assets/writer-tw6EcuVO.js","assets/r3f-physics-binding-DyvJAWJ4.js","assets/canvas-preview-frames-CIiSC8-I.js","assets/canvas-entry-runtime-BT12lNQT.js","assets/debug-registry-Cs16f-aE.js","assets/realm-services-BVbgboYj.js","assets/three-ingest-runtime-2OKIJvOp.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-Cexnkzpz.js","assets/native-entry-surface-BE8LJNdu.js","assets/contract-system-adapters-B7HjmMU3.js","assets/game-contract-seams-CqP5-7QG.js","assets/assets-BcrMQHRv.js","assets/loader-BTUKnX5Q.js","assets/KTX2Loader-CaqVE6nY.js","assets/GLTFLoader-KeoruJgS.js","assets/BufferGeometryUtils-B22h7jo4.js","assets/create-runtime-CMdnacgk.js","assets/adapter-surface-Y37Nzcyw.js","assets/binding-Bmxqznjk.js","assets/root-stacking-BEd9ZvxC.js","assets/setup-renderer-CRrjb8S9.js","assets/index-DHhMOs_s.js","assets/defaults-DKiBJCPN.js","assets/render-settings-7qvwHFf7.js","assets/render-features-D6cEaZG_.js","assets/seeded-random-C1JwJC9g.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-DyTgGJaV.js";import{t as d}from"./three-state-Beoor2qe.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-B_3I8rkh.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./Pass-D1MRT672.js";import"./editor-layers-DB2HoNYg.js";import"./workspace-arrangement-Dl7Q2V4T.js";import"./user-data-W4XQSuJh.js";import"./entity-object-Btp4Cm7a.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-eCCv2or-.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-ChRgv27V.js","assets/index-BFyEWcX2.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-CNsa_ojR.js","assets/json-history-resource-DOORsgaQ.js","assets/source-persistence-backend-4POQX0tD.js","assets/ingest-source-persistence-Dk4bo3Sd.js","assets/pixi-authoring-adapter-cUTjI2Fi.js","assets/index-Bd-fPqp1.js","assets/component-instance-root-DWnAyiCF.js","assets/user-data-jSXWWKWi.js","assets/workspace-arrangement-CImWaUGK.js","assets/pixi-transform-channels-P4rvmusc.js","assets/relative-import-specifier-P8rMB-CK.js","assets/oid-transform-Cbf9Vl9B.js","assets/writer-tw6EcuVO.js","assets/r3f-physics-binding-Du5rtFoC.js","assets/canvas-preview-frames-ChYPliVq.js","assets/canvas-entry-runtime-H30RJRyu.js","assets/debug-registry-VvstjDrx.js","assets/realm-services-CILJ6zey.js","assets/three-ingest-runtime-C88LKOHV.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-BydU22ga.js","assets/native-entry-surface-BE8LJNdu.js","assets/contract-system-adapters-CgveZ5w6.js","assets/game-contract-seams-B_zl6uU9.js","assets/assets-BcrMQHRv.js","assets/loader-BTUKnX5Q.js","assets/KTX2Loader-CaqVE6nY.js","assets/GLTFLoader-KeoruJgS.js","assets/BufferGeometryUtils-B22h7jo4.js","assets/create-runtime-toc2PJNG.js","assets/adapter-surface-Y37Nzcyw.js","assets/binding-Bmxqznjk.js","assets/root-stacking-BEd9ZvxC.js","assets/setup-renderer-KGBMQDvQ.js","assets/index-DHhMOs_s.js","assets/defaults-DKiBJCPN.js","assets/render-settings-Bb-m2kWa.js","assets/render-features-uEFcjQU0.js","assets/seeded-random-DZtqqRJ0.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-BFyEWcX2.js";import{t as d}from"./three-state-BB-aEdQ2.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-CQs9DVQJ.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./Pass-D1MRT672.js";import"./editor-layers-CAPby0Hv.js";import"./workspace-arrangement-CImWaUGK.js";import"./user-data-jSXWWKWi.js";import"./entity-object-zTQM9DN_.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-ChRgv27V.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-DyTgGJaV.js";import{B as S,q as N}from"./edit-mode-authoring-BYKTzHxo.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-DnBISTPF.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-BFyEWcX2.js";import{B as S,q as N}from"./edit-mode-authoring-CRIZRixu.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-CIHXdpjI.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-DRuLuHb8.js","assets/index-DyTgGJaV.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-Beoor2qe.js","assets/editor-shell-store-B_3I8rkh.js","assets/output-pass-HurwNl0G.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/Pass-D1MRT672.js","assets/editor-layers-DB2HoNYg.js","assets/workspace-arrangement-Dl7Q2V4T.js","assets/user-data-W4XQSuJh.js","assets/entity-object-Btp4Cm7a.js","assets/three-contract-Dkt6PmWY.js"])))=>i.map(i=>d[i]);
2
- import{_ as n}from"./index-DyTgGJaV.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-DRuLuHb8.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-DRuLuHb8.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-BaEYQxSc.js","assets/index-BFyEWcX2.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-BB-aEdQ2.js","assets/editor-shell-store-CQs9DVQJ.js","assets/output-pass-HurwNl0G.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/Pass-D1MRT672.js","assets/editor-layers-CAPby0Hv.js","assets/workspace-arrangement-CImWaUGK.js","assets/user-data-jSXWWKWi.js","assets/entity-object-zTQM9DN_.js","assets/three-contract-Dkt6PmWY.js"])))=>i.map(i=>d[i]);
2
+ import{_ as n}from"./index-BFyEWcX2.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-BaEYQxSc.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-BaEYQxSc.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-BctXdzCd.js","assets/design-time-layers-CIQmpekh.js","assets/root-stacking-BEd9ZvxC.js","assets/index-DyTgGJaV.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-BYKTzHxo.js","assets/design-time-mount-registry-DUpXCg1U.js","assets/react-story-board-DnBISTPF.js","assets/game-surface-defaults-D8S4cRxi.js","assets/crash-null-boundary-v3a0uEgw.js","assets/realm-services-BVbgboYj.js","assets/canvas-entry-runtime-BT12lNQT.js","assets/debug-registry-Cs16f-aE.js","assets/three-ingest-runtime-2OKIJvOp.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-CN9Jjj_B.js","assets/story-presentation-B4xwjorS.js","assets/three-story-model-m26ngwoa.js","assets/inspect-DuE1D5UR.js","assets/inference-diagnostics--P59uVfZ.js","assets/react-world-authoring-adapter-COQGilV0.js","assets/board-guides-Dr7UmPbr.js","assets/relative-import-specifier-DSTZtgN9.js","assets/story-arg-descriptors-Ek86ExX7.js","assets/writer-tw6EcuVO.js"])))=>i.map(i=>d[i]);
2
- import{_ as i}from"./index-DyTgGJaV.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-BctXdzCd.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-BctXdzCd.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-D4wSv6Dz.js","assets/design-time-layers-DCgfvrVA.js","assets/root-stacking-BEd9ZvxC.js","assets/index-BFyEWcX2.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-CRIZRixu.js","assets/design-time-mount-registry-DUpXCg1U.js","assets/react-story-board-CIHXdpjI.js","assets/game-surface-defaults-D8S4cRxi.js","assets/crash-null-boundary-v3a0uEgw.js","assets/realm-services-CILJ6zey.js","assets/canvas-entry-runtime-H30RJRyu.js","assets/debug-registry-VvstjDrx.js","assets/three-ingest-runtime-C88LKOHV.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----1n4I9.js","assets/story-presentation-Du2nHXiE.js","assets/three-story-model-B2prCCT6.js","assets/inspect-BFReLad2.js","assets/inference-diagnostics-C0WaA1x7.js","assets/react-world-authoring-adapter-CU99D7zP.js","assets/board-guides-FTLvkEFa.js","assets/relative-import-specifier-P8rMB-CK.js","assets/story-arg-descriptors-Ek86ExX7.js","assets/writer-tw6EcuVO.js"])))=>i.map(i=>d[i]);
2
+ import{_ as i}from"./index-BFyEWcX2.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-D4wSv6Dz.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-D4wSv6Dz.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-CIQmpekh.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-DyTgGJaV.js";import{h as ht,d as gt,g as bt}from"./react-story-board-DnBISTPF.js";import{C as wt}from"./crash-null-boundary-v3a0uEgw.js";import{r as yt,a as St}from"./realm-services-BVbgboYj.js";import{r as It}from"./react-root-BHA-cdrW.js";import{m as Pt}from"./StoryPreviewMount-CN9Jjj_B.js";import{c as Rt,s as vt}from"./story-presentation-B4xwjorS.js";import{d as Mt}from"./three-story-model-m26ngwoa.js";import{c as Ct}from"./inspect-DuE1D5UR.js";import{R as J}from"./react-world-authoring-adapter-COQGilV0.js";import"./root-stacking-BEd9ZvxC.js";import"./edit-mode-authoring-BYKTzHxo.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-BT12lNQT.js";import"./debug-registry-Cs16f-aE.js";import"./three-ingest-runtime-2OKIJvOp.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--P59uVfZ.js";import"./board-guides-Dr7UmPbr.js";import"./relative-import-specifier-DSTZtgN9.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-DCgfvrVA.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-BFyEWcX2.js";import{h as ht,d as gt,g as bt}from"./react-story-board-CIHXdpjI.js";import{C as wt}from"./crash-null-boundary-v3a0uEgw.js";import{r as yt,a as St}from"./realm-services-CILJ6zey.js";import{r as It}from"./react-root-BHA-cdrW.js";import{m as Pt}from"./StoryPreviewMount----1n4I9.js";import{c as Rt,s as vt}from"./story-presentation-Du2nHXiE.js";import{d as Mt}from"./three-story-model-B2prCCT6.js";import{c as Ct}from"./inspect-BFReLad2.js";import{R as J}from"./react-world-authoring-adapter-CU99D7zP.js";import"./root-stacking-BEd9ZvxC.js";import"./edit-mode-authoring-CRIZRixu.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-H30RJRyu.js";import"./debug-registry-VvstjDrx.js";import"./three-ingest-runtime-C88LKOHV.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-C0WaA1x7.js";import"./board-guides-FTLvkEFa.js";import"./relative-import-specifier-P8rMB-CK.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-DbjVwafW.js";import{isEditorOwnedObject as u}from"./editor-layers-DB2HoNYg.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-C7gr65sn.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-BUq91mYX.js";import"./workspace-arrangement-Dl7Q2V4T.js";import"./index-DyTgGJaV.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-B_qOatak.js";import{isEditorOwnedObject as u}from"./editor-layers-CAPby0Hv.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-DvchrQCR.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-GUZsksxj.js";import"./workspace-arrangement-CImWaUGK.js";import"./index-BFyEWcX2.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-DyTgGJaV.js";import{J as R,c as x}from"./json-history-resource-IKUe_-vd.js";import{D as C,s as w,a as b,c as k,m as T}from"./react-world-authoring-adapter-COQGilV0.js";import{g as p,b as u}from"./inspect-DuE1D5UR.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-BFyEWcX2.js";import{J as R,c as x}from"./json-history-resource-DOORsgaQ.js";import{D as C,s as w,a as b,c as k,m as T}from"./react-world-authoring-adapter-CU99D7zP.js";import{g as p,b as u}from"./inspect-BFReLad2.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};