@volter/game-editor 0.5.82 → 0.5.83

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 (332) 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/catalog/entries/reflections.json +1 -1
  5. package/catalog/project-source/src/lib/reflections/ReflectionProbe.tsx +34 -5
  6. package/catalog/project-source/src/lib/reflections/index.ts +1 -0
  7. package/catalog/project-source/src/lib/reflections/probe-controller.ts +44 -3
  8. package/catalog/project-source/src/lib/reflections/reflection-probe-registry.ts +32 -7
  9. package/catalog/project-source/src/lib/reflections/volume-reflection-material.ts +638 -160
  10. package/dist/.vite/manifest.json +2206 -2188
  11. package/dist/assets/{AssetBudgetPanel-Iip49rxI.js → AssetBudgetPanel-SrgQ5Lx5.js} +3 -3
  12. package/dist/assets/{AudioViewer-DmkOvskF.js → AudioViewer-BqEwLSZN.js} +1 -1
  13. package/dist/assets/{CanvasBoardDocument-DCS8uzQo.js → CanvasBoardDocument-BfzWZdLX.js} +1 -1
  14. package/dist/assets/{CanvasSceneViewport-CfOuQiQ0.js → CanvasSceneViewport-CQ7ewAlO.js} +1 -1
  15. package/dist/assets/{ColorInput-7CPpl8MI.js → ColorInput-DQ6YyPD_.js} +1 -1
  16. package/dist/assets/EntityModelDocument-By-BM9dS.js +1 -0
  17. package/dist/assets/{EnvironmentAssetDocument-DlS6KFJu.js → EnvironmentAssetDocument-CrD37BI0.js} +1 -1
  18. package/dist/assets/{GameplaySessionTimeline-C3zH6edi.js → GameplaySessionTimeline-DYtnW0Si.js} +1 -1
  19. package/dist/assets/{ImageViewer-C0lQ6YO0.js → ImageViewer-CZNpdUEA.js} +1 -1
  20. package/dist/assets/InspectorObjectPreview-gWOVV6Ll.js +1 -0
  21. package/dist/assets/{JsonAssetDocument-DjmH9CQH.js → JsonAssetDocument-Bg74MDXy.js} +1 -1
  22. package/dist/assets/{LiveModuleDocument-Hiot8Q5L.js → LiveModuleDocument-CSqzNMjn.js} +1 -1
  23. package/dist/assets/{LutAssetDocument-6bBwNMOn.js → LutAssetDocument-CsboXa8x.js} +1 -1
  24. package/dist/assets/ModelAssetDocument-DDVoKZpQ.js +1 -0
  25. package/dist/assets/{NonThreeAuthoringBootstrap-DpieYAMC.js → NonThreeAuthoringBootstrap-DcqD6_34.js} +1 -1
  26. package/dist/assets/{Object3DDocumentToolbar-BtZkDxKa.js → Object3DDocumentToolbar-p2pd2TuS.js} +1 -1
  27. package/dist/assets/Object3DDocumentViewport-BvNfSHi_.js +2 -0
  28. package/dist/assets/{Object3DPreview-DdrYVJUZ.js → Object3DPreview-Bv0fZcdS.js} +1 -1
  29. package/dist/assets/{OnlineAssetDetail-D06eTe3y.js → OnlineAssetDetail-CPDafN4x.js} +1 -1
  30. package/dist/assets/{PlayBar-BbzjgLFJ.js → PlayBar-CBD4rcED.js} +1 -1
  31. package/dist/assets/{QuarksAssetDocument-wGHNt4ov.js → QuarksAssetDocument-DUUhKUxZ.js} +1 -1
  32. package/dist/assets/{ReactCanvasControls-BL2tOUj6.js → ReactCanvasControls-3ual87uP.js} +1 -1
  33. package/dist/assets/{RootSelectionOverlay-C6Wu8nIs.js → RootSelectionOverlay-DtX8yWUQ.js} +1 -1
  34. package/dist/assets/{ShaderAssetDocument-BDi8iNLA.js → ShaderAssetDocument-rkhRdPRk.js} +3 -3
  35. package/dist/assets/{ShadowEditor-C3L0UWSH.js → ShadowEditor-B-3FlftY.js} +1 -1
  36. package/dist/assets/{SourceAssetViewer-D832bARo.js → SourceAssetViewer-CsMPohqK.js} +1 -1
  37. package/dist/assets/StageHost-BOaImrmu.js +2 -0
  38. package/dist/assets/{StoryPreviewMount-CmOEFzZY.js → StoryPreviewMount-BI-ANJix.js} +1 -1
  39. package/dist/assets/{ThreeBoardDocument-BtBMGtiQ.js → ThreeBoardDocument-CoBjs8BP.js} +2 -2
  40. package/dist/assets/{ThreeIsolationSceneContent-BEHNSEsi.js → ThreeIsolationSceneContent-uShwSK1O.js} +1 -1
  41. package/dist/assets/{ToolObject3DPreview-76LMkfin.js → ToolObject3DPreview-CBZdWA_7.js} +1 -1
  42. package/dist/assets/{Toolbar-BEBQdxRz.js → Toolbar-DJK7o_be.js} +1 -1
  43. package/dist/assets/{TransientHint-CzsdY8W6.js → TransientHint-Dgu6u7U5.js} +1 -1
  44. package/dist/assets/{VideoViewer-Ckrawyuq.js → VideoViewer-BwTcASO2.js} +1 -1
  45. package/dist/assets/{ViewportShadingMenu-BofQt6_4.js → ViewportShadingMenu-DUROUZdC.js} +1 -1
  46. package/dist/assets/{active-ingest-D_ryI_R4.js → active-ingest-Ra07ruDo.js} +3 -3
  47. package/dist/assets/{animation-clock-QjtJDIsR.js → animation-clock-CKeqYCt9.js} +1 -1
  48. package/dist/assets/{animation-mixers.service-BInUs1US.js → animation-mixers.service-BNiEU2dA.js} +1 -1
  49. package/dist/assets/{animation-timeline.utility-DUrfNSwn.js → animation-timeline.utility-DQqMh1lF.js} +1 -1
  50. package/dist/assets/{asset-budget-asset.menu-DVQEksFp.js → asset-budget-asset.menu-DFFih9b4.js} +1 -1
  51. package/dist/assets/{asset-budget.action-C-ENAa52.js → asset-budget.action-C3SMMeSX.js} +1 -1
  52. package/dist/assets/{asset-budget.document-Bb1PyL3H.js → asset-budget.document-B5NTy5dU.js} +1 -1
  53. package/dist/assets/{asset-budget.menu-CPi2yjBA.js → asset-budget.menu-Cclz2utV.js} +1 -1
  54. package/dist/assets/{asset-editor-persistence-Duoq7o22.js → asset-editor-persistence-DsIjTddX.js} +1 -1
  55. package/dist/assets/{asset-loaders-BftJ2m7-.js → asset-loaders-CQiLyapK.js} +1 -1
  56. package/dist/assets/{asset-preview-BS71mXsZ.js → asset-preview-BkFAKkZH.js} +1 -1
  57. package/dist/assets/{audio-unlock.service-C3ygvDjU.js → audio-unlock.service-CupzdUuC.js} +1 -1
  58. package/dist/assets/{audio.utility-DF55sgHW.js → audio.utility-0il96T5s.js} +1 -1
  59. package/dist/assets/autoplay.service-SQBFaKvM.js +1 -0
  60. package/dist/assets/{babylon-authoring-adapter-CmeehOBt.js → babylon-authoring-adapter-HZ_SbAet.js} +1 -1
  61. package/dist/assets/{binding-resolver-DUz8C8Fs.js → binding-resolver-BoecCqTq.js} +2 -2
  62. package/dist/assets/blender-emscripten-engine-Dk-rq4bm.js +2 -0
  63. package/dist/assets/{blender-node-editor.document-B8S2TVMM.js → blender-node-editor.document-B_MGPd1D.js} +1 -1
  64. package/dist/assets/{blender-properties-tab-y-_BeZDx.js → blender-properties-tab-ITmWT_gZ.js} +1 -1
  65. package/dist/assets/{blender-runtime-host-CUH6peXj.js → blender-runtime-host-CACzxt1b.js} +1 -1
  66. package/dist/assets/{blender-runtime-skin-B1tYITn2.js → blender-runtime-skin-CwFW2Hj7.js} +13 -13
  67. package/dist/assets/blender-runtime.document-CozOB5TX.js +13 -0
  68. package/dist/assets/blender-screenshot.menu-BFR44H0L.js +1 -0
  69. package/dist/assets/{blender-timeline.document-CeCylyXB.js → blender-timeline.document-C0Zzi8Vo.js} +1 -1
  70. package/dist/assets/{blender-uv-editor.document-DEllMw3a.js → blender-uv-editor.document-BktbYoor.js} +1 -1
  71. package/dist/assets/{blender-version.status-CrT9NqK-.js → blender-version.status-CLPjDPFV.js} +1 -1
  72. package/dist/assets/blender-wali-engine-CUWSQ_vI.js +2 -0
  73. package/dist/assets/{blender.command-GIjMG1-m.js → blender.command-DdHEHM62.js} +1 -1
  74. package/dist/assets/{board-guides-B6TEPOPi.js → board-guides-DhwRYHGT.js} +1 -1
  75. package/dist/assets/bridge.command-D4O9w4ft.js +3 -0
  76. package/dist/assets/{browserAll-k35XRFil.js → browserAll-BhQBgoJL.js} +1 -1
  77. package/dist/assets/{build-player.document-CHxj4P8q.js → build-player.document-DFr-d97N.js} +1 -1
  78. package/dist/assets/{build-profiles.document-CZCk1HYA.js → build-profiles.document-C-64YHSV.js} +2 -2
  79. package/dist/assets/{build-progress.status-BNwBxP2a.js → build-progress.status-DVm95Lmt.js} +1 -1
  80. package/dist/assets/{build-session-CW2UyYFF.js → build-session-C_SD2MNJ.js} +1 -1
  81. package/dist/assets/{build.action-EmCcMu47.js → build.action-CPee4b_9.js} +1 -1
  82. package/dist/assets/{build.command-CzEckGcR.js → build.command-CrZ5sHYt.js} +1 -1
  83. package/dist/assets/{build.header-CsYLpZbh.js → build.header-DDbhXD6t.js} +1 -1
  84. package/dist/assets/{build.menu-CaDkDQuy.js → build.menu-Ci-W_A1E.js} +1 -1
  85. package/dist/assets/{build.service-BcKtbU0-.js → build.service-CpUtTLP4.js} +1 -1
  86. package/dist/assets/{camera-BwWZUyKt.js → camera-BZM67LhS.js} +1 -1
  87. package/dist/assets/{camera-runtime.inspector-CJyi3zmp.js → camera-runtime.inspector-BLgPGd97.js} +1 -1
  88. package/dist/assets/{canvas-design-mount-B_uwZkEU.js → canvas-design-mount-DPAhHuIQ.js} +4 -4
  89. package/dist/assets/{canvas-entry-runtime-DskaohHK.js → canvas-entry-runtime-DeyvFKWS.js} +2 -2
  90. package/dist/assets/{canvas-preview-frames-BzLeTumX.js → canvas-preview-frames-Cm0GJ-40.js} +1 -1
  91. package/dist/assets/{canvas-story-capture.service-C80CsS8r.js → canvas-story-capture.service-Ziv9XNot.js} +2 -2
  92. package/dist/assets/{capability-coverage-wd6bAhv3.js → capability-coverage-39yK3DGt.js} +3 -3
  93. package/dist/assets/collaboration-presence-MR8LW4mZ.js +1 -0
  94. package/dist/assets/{collider-Dw2iWV3F.js → collider-4Sgmy-qt.js} +1 -1
  95. package/dist/assets/component-board.service-BdcOkwgn.js +2 -0
  96. package/dist/assets/{component-board.service-CH99sgj0.js → component-board.service-DO_oHdnS.js} +2 -2
  97. package/dist/assets/{component-board.service-XAxyLCnM.js → component-board.service-DRJcETCR.js} +2 -2
  98. package/dist/assets/{component-contracts.service-DerT0BP-.js → component-contracts.service-BYQTO1HK.js} +1 -1
  99. package/dist/assets/{component-instance-root-Cw_-ajBX.js → component-instance-root-CzRnRMe6.js} +1 -1
  100. package/dist/assets/{component-verbs.command-BHK9M2Rk.js → component-verbs.command-CFv5y_pR.js} +1 -1
  101. package/dist/assets/component-verbs.service-BMBAwqjA.js +1 -0
  102. package/dist/assets/{config-1rCvm02z.js → config-C6iAsozB.js} +3 -3
  103. package/dist/assets/{configurations-CRTYw0r9.js → configurations-Dua_x6Wx.js} +1 -1
  104. package/dist/assets/{connection.status-D4fjnH24.js → connection.status-DQJvEgdT.js} +1 -1
  105. package/dist/assets/{constraints.inspector-BgnafOLf.js → constraints.inspector-AHeP-LBc.js} +1 -1
  106. package/dist/assets/{content-bounds-D5pXeHJN.js → content-bounds-tMCAobKq.js} +1 -1
  107. package/dist/assets/{contract-system-adapters-rVGdworX.js → contract-system-adapters-D6ion7SF.js} +1 -1
  108. package/dist/assets/{coverage.service-BNme5Agb.js → coverage.service-Dm_H5o74.js} +2 -2
  109. package/dist/assets/{create-runtime-CcuQTSfy.js → create-runtime-C82CmCbc.js} +2 -2
  110. package/dist/assets/{curve-DorFv33R.js → curve-C7Gg05DV.js} +1 -1
  111. package/dist/assets/{data-asset-CAE35Emh.js → data-asset-BquhdFX2.js} +1 -1
  112. package/dist/assets/{data-ref-DXqRnZsJ.js → data-ref-Dcq9KJIG.js} +1 -1
  113. package/dist/assets/{debug-bridge-DdCJSEni.js → debug-bridge-DODnLefz.js} +1 -1
  114. package/dist/assets/{debug-registry-xQJcVubm.js → debug-registry-CwYeaZ9J.js} +1 -1
  115. package/dist/assets/{deferred-ingest-play-CEnsC3uN.js → deferred-ingest-play-7EJo_GNB.js} +2 -2
  116. package/dist/assets/{design-time-canvas-mount-CPRrCPFA.js → design-time-canvas-mount-DCINR1Hg.js} +2 -2
  117. package/dist/assets/{design-time-layers-hmGqBp06.js → design-time-layers-i1N-JjPz.js} +1 -1
  118. package/dist/assets/{design-time-mount.service-CLL-1Za4.js → design-time-mount.service-CtnijZJJ.js} +2 -2
  119. package/dist/assets/{design-time-mount.service-CEmJjRIJ.js → design-time-mount.service-DrUVDx2-.js} +2 -2
  120. package/dist/assets/{design-time-react-mount-DmXi3GBy.js → design-time-react-mount-CpgoPMGr.js} +1 -1
  121. package/dist/assets/{document-preview-three-B4j_zNef.js → document-preview-three-CuBUMP4o.js} +1 -1
  122. package/dist/assets/{dom-authoring-adapter-BklRbjZB.js → dom-authoring-adapter-DSM-2JgU.js} +1 -1
  123. package/dist/assets/{draco3d-CFWI1XDT.js → draco3d--d91Ay95.js} +1 -1
  124. package/dist/assets/{edit-mode-audio.service-SUzv0nHs.js → edit-mode-audio.service-C9_299G0.js} +1 -1
  125. package/dist/assets/{edit-mode-authoring-CSt3zzmS.js → edit-mode-authoring-DgvzXpiM.js} +1 -1
  126. package/dist/assets/{edit-mode-networking.service-D6UohrCr.js → edit-mode-networking.service-B6l9ESo-.js} +1 -1
  127. package/dist/assets/editor-api-D9NJWRVZ.js +1 -0
  128. package/dist/assets/{editor-layers-CjeYrUlm.js → editor-layers-D7HXdvWY.js} +1 -1
  129. package/dist/assets/{editor-shell-store-DckLm6m8.js → editor-shell-store-CGWO4Ldz.js} +1 -1
  130. package/dist/assets/{entity-object-V13bGmay.js → entity-object-Dl04-FE8.js} +1 -1
  131. package/dist/assets/{extend-BQeRA-aV.js → extend-GXzJ7XU_.js} +1 -1
  132. package/dist/assets/fork-menu-DO1KASKk.js +1 -0
  133. package/dist/assets/{frame-debugger-store-DDxWlDPK.js → frame-debugger-store-DOewah-x.js} +1 -1
  134. package/dist/assets/{game-contract-seams-DrYyE5PX.js → game-contract-seams-B5a-Ev-f.js} +1 -1
  135. package/dist/assets/{game-css-scope-transform-D5hQWaci.js → game-css-scope-transform-CQhuDfMR.js} +1 -1
  136. package/dist/assets/{game-document.service-cJ1yKc2V.js → game-document.service-CMc6SfH9.js} +1 -1
  137. package/dist/assets/{game-eval.command-CKo-W17_.js → game-eval.command-MY5YxNL-.js} +1 -1
  138. package/dist/assets/{game-module-access-DuptGLGx.js → game-module-access-BafPamOR.js} +1 -1
  139. package/dist/assets/{game-network-CAH_Jsh6.js → game-network-COQRxS_4.js} +3 -3
  140. package/dist/assets/{gameplay-export-B-JE4uSD.js → gameplay-export-i_fnSpRp.js} +1 -1
  141. package/dist/assets/gameplay-replay-BM_frdpr.js +1 -0
  142. package/dist/assets/{gameplay.command-D4cY3nOq.js → gameplay.command-Dkp2IG9Q.js} +1 -1
  143. package/dist/assets/{generation-jobs-CcCrhKLM.js → generation-jobs-B6T_j2D_.js} +1 -1
  144. package/dist/assets/{generation.service-CQwmLAOQ.js → generation.service-BXJTa6dr.js} +1 -1
  145. package/dist/assets/{generations-qfhCRH8C.js → generations-DqNhoKz8.js} +1 -1
  146. package/dist/assets/{generations.status-CcbR2OfF.js → generations.status-Dt8TW7Lk.js} +1 -1
  147. package/dist/assets/{hierarchy-marks-B1jSqxSv.js → hierarchy-marks-fSNwXIFe.js} +1 -1
  148. package/dist/assets/{hosted-asset-materialization-BZf-8JA1.js → hosted-asset-materialization-76jdNP28.js} +2 -2
  149. package/dist/assets/ibl-override-material-C09OAhCc.js +6 -0
  150. package/dist/assets/{index-V4J7xfRg.js → index-C5tasxXb.js} +294 -294
  151. package/dist/assets/{index-DXtfej3G.js → index-CKznhnFr.js} +1 -1
  152. package/dist/assets/index-CO6HFW9e.js +1 -0
  153. package/dist/assets/{index-aREcGExk.js → index-Cf-uQvPt.js} +1 -1
  154. package/dist/assets/{index-D_ViOFCz.js → index-Cub6ESrb.js} +2 -2
  155. package/dist/assets/{index-DrEVdQvN.js → index-D5pDWxZH.js} +1 -1
  156. package/dist/assets/{index-Cj_b0Ygc.js → index-c6fd_bqy.js} +1 -1
  157. package/dist/assets/{index-CHa43s2p.js → index-cGaEzVz5.js} +1 -1
  158. package/dist/assets/{index-D-RMHSzb.js → index-cNdu8TlA.js} +1 -1
  159. package/dist/assets/{inference-diagnostics-DoZQ1mpg.js → inference-diagnostics-D7uYs70A.js} +1 -1
  160. package/dist/assets/{ingest-boot-viewport-DWdOtGGE.js → ingest-boot-viewport-CjtFKkMD.js} +1 -1
  161. package/dist/assets/{ingest-siblings-DyvasVDH.js → ingest-siblings-Dlx0quan.js} +1 -1
  162. package/dist/assets/{ingest-source-persistence-CQOJeGhj.js → ingest-source-persistence-SAe0xIy-.js} +1 -1
  163. package/dist/assets/{ingest.service-CqIcydem.js → ingest.service-BXkZ1vXa.js} +1 -1
  164. package/dist/assets/{inspect-DiSjB-N1.js → inspect-BqIL-41D.js} +1 -1
  165. package/dist/assets/instances.command-wpQVWPb9.js +1 -0
  166. package/dist/assets/{json-history-resource-CH2nzMZh.js → json-history-resource-BUJgH5iK.js} +1 -1
  167. package/dist/assets/layered-pick-RElCrqXb.js +1 -0
  168. package/dist/assets/{light-CxiGIJma.js → light-DLADuHH2.js} +1 -1
  169. package/dist/assets/{live-project-verbs-CnknlUlT.js → live-project-verbs-Cc1GXtG5.js} +1 -1
  170. package/dist/assets/{machine.document-D7jMrzXt.js → machine.document-ER7OD-37.js} +1 -1
  171. package/dist/assets/{machines.finder-Dor3O0uf.js → machines.finder-CZ2ZxPFR.js} +1 -1
  172. package/dist/assets/material-CspuVO3Q.js +1 -0
  173. package/dist/assets/{material-factory-BN3Lax5C.js → material-factory-KV4mqSzl.js} +1 -1
  174. package/dist/assets/{mesh-Cj-CYroI.js → mesh-CrIkl8_H.js} +1 -1
  175. package/dist/assets/{model-asset-sections.service-mC4WJFTA.js → model-asset-sections.service-Cyom1FRs.js} +1 -1
  176. package/dist/assets/{model-inspection-8o57YSZW.js → model-inspection-BLOiPoW4.js} +1 -1
  177. package/dist/assets/{model-thumbnail-chePRlH7.js → model-thumbnail-B7DVMYtQ.js} +1 -1
  178. package/dist/assets/{models.finder-CKkT5ZdU.js → models.finder-At2wuWE3.js} +1 -1
  179. package/dist/assets/{module-mode-BMiMhHI3.js → module-mode-CHqvCb69.js} +2 -2
  180. package/dist/assets/{mount-canvas-ingest-root-B1swVIUJ.js → mount-canvas-ingest-root-uISMj3zn.js} +2 -2
  181. package/dist/assets/{mount-dom-ingest-root-B8hO5mht.js → mount-dom-ingest-root-C8PsgrCd.js} +2 -2
  182. package/dist/assets/{mount-ingest-root-Cbnh-mSw.js → mount-ingest-root-Dmb_D_oY.js} +2 -2
  183. package/dist/assets/{mount-manifest-B7oL1Abg.js → mount-manifest-CGwCOZO6.js} +1 -1
  184. package/dist/assets/{mount-three-ingest-root-BdUJx6ix.js → mount-three-ingest-root-BGdd6UoG.js} +1 -1
  185. package/dist/assets/{mounted-authoring-C47L5H5t.js → mounted-authoring-BS53gpIm.js} +1 -1
  186. package/dist/assets/{mounted-story-viewport-source-CyEK_vaq.js → mounted-story-viewport-source-CL9Ra-_N.js} +1 -1
  187. package/dist/assets/{native-debug-module-JJOFtIVz.js → native-debug-module-DRmkIrIW.js} +1 -1
  188. package/dist/assets/{navigation-ROJM2w84.js → navigation-DOuNvaV6.js} +1 -1
  189. package/dist/assets/{navmesh.menu-DjefqtkI.js → navmesh.menu-9g4nO2dp.js} +1 -1
  190. package/dist/assets/{navmesh.service-BPqjEQiq.js → navmesh.service-B7MllQj9.js} +1 -1
  191. package/dist/assets/network-observer.service-DY_39EdG.js +1 -0
  192. package/dist/assets/{network.utility-6Y5u53n8.js → network.utility-BgzPLUS5.js} +1 -1
  193. package/dist/assets/{object3d-document-session-registry-DNCOGA3i.js → object3d-document-session-registry-Bk-I9jZH.js} +2 -2
  194. package/dist/assets/{oid-transform-DQzN_Gl_.js → oid-transform-CHeHFNUu.js} +1 -1
  195. package/dist/assets/{particles-DGdUmqOr.js → particles-RD4cI69F.js} +1 -1
  196. package/dist/assets/{pixi-authoring-adapter-BRktdcIz.js → pixi-authoring-adapter-BuP3Qc7X.js} +1 -1
  197. package/dist/assets/{pixi-live-write-target-Dg0mdLaa.js → pixi-live-write-target-DzyXhmiw.js} +1 -1
  198. package/dist/assets/{play.command-4IDAqR5W.js → play.command-C7iZbm26.js} +2 -2
  199. package/dist/assets/{presentation-8m-RDKIS.js → presentation-43UAzXCV.js} +1 -1
  200. package/dist/assets/{product-t6tauO7R.js → product-BfaoEtK8.js} +1 -1
  201. package/dist/assets/{profiler.action-CXA4IkQB.js → profiler.action-DIp4OPNA.js} +1 -1
  202. package/dist/assets/{profiler.menu-BgIBv4-I.js → profiler.menu-tHZqii7c.js} +1 -1
  203. package/dist/assets/{profiler.utility-BYoRbfIK.js → profiler.utility-CSg5WNN8.js} +1 -1
  204. package/dist/assets/{project-authoring-session-DkekCxNv.js → project-authoring-session-BbwFHEzZ.js} +2 -2
  205. package/dist/assets/{properties-bone-constraints.inspector-DXpiCtf9.js → properties-bone-constraints.inspector-ooGWoGiI.js} +1 -1
  206. package/dist/assets/{properties-bone.inspector-wIDsP4c5.js → properties-bone.inspector-C_UdJjDe.js} +1 -1
  207. package/dist/assets/{properties-collection.inspector-5SRPbqfM.js → properties-collection.inspector-Dm4MNZQK.js} +1 -1
  208. package/dist/assets/{properties-constraints.inspector-DIjKz692.js → properties-constraints.inspector-DlCHF3Nd.js} +1 -1
  209. package/dist/assets/{properties-data.inspector-DE6i8biZ.js → properties-data.inspector-DTfv2ILq.js} +1 -1
  210. package/dist/assets/{properties-material.inspector-Cu1UCPY4.js → properties-material.inspector-C_-GsOvF.js} +1 -1
  211. package/dist/assets/{properties-modifiers.inspector-DsQzA638.js → properties-modifiers.inspector-BELGiG49.js} +1 -1
  212. package/dist/assets/{properties-object.inspector-C57X0GJq.js → properties-object.inspector-COLlzAo4.js} +1 -1
  213. package/dist/assets/{properties-output.inspector-DzrcFuRM.js → properties-output.inspector-DLpqLRCp.js} +1 -1
  214. package/dist/assets/{properties-particles.inspector-DGqSnelN.js → properties-particles.inspector-C8ZhuG-X.js} +1 -1
  215. package/dist/assets/{properties-physics.inspector-DIjhtiLe.js → properties-physics.inspector-DQ3fUdPx.js} +1 -1
  216. package/dist/assets/{properties-render.inspector-CX0orwn9.js → properties-render.inspector-DlPuoXQ-.js} +1 -1
  217. package/dist/assets/{properties-scene.inspector-DaHNL_sq.js → properties-scene.inspector-itnV8qGu.js} +1 -1
  218. package/dist/assets/{properties-texture.inspector-B5hmxPRy.js → properties-texture.inspector-BZbBAQ_O.js} +1 -1
  219. package/dist/assets/{properties-view-layer.inspector-C7hdJgei.js → properties-view-layer.inspector-CNOevOy3.js} +1 -1
  220. package/dist/assets/{properties-world.inspector-EWTC6jNw.js → properties-world.inspector-C7u-dAkO.js} +1 -1
  221. package/dist/assets/{r3f-design-session-CXlGV9hp.js → r3f-design-session-DbXiRez3.js} +2 -2
  222. package/dist/assets/{r3f-physics-binding-DZSIB0d_.js → r3f-physics-binding-B8Je7bNy.js} +1 -1
  223. package/dist/assets/{r3f-source-authoring-adapter-GR97EmII.js → r3f-source-authoring-adapter-CarxaAwC.js} +1 -1
  224. package/dist/assets/{react-canvas-navigation-L_mOnybL.js → react-canvas-navigation-BTVCmK_d.js} +1 -1
  225. package/dist/assets/{react-inspector.service-B4P3UnSY.js → react-inspector.service-BV9ZVls7.js} +1 -1
  226. package/dist/assets/{react-story-board-CT1_3sk_.js → react-story-board-CETbMKNG.js} +1 -1
  227. package/dist/assets/{react-three-rapier.esm-DyMNYoA_.js → react-three-rapier.esm-BQ3IBcaP.js} +1 -1
  228. package/dist/assets/{react-world-authoring-adapter-OR1SW2jI.js → react-world-authoring-adapter-DsywMgco.js} +1 -1
  229. package/dist/assets/{realm-services-u0mnjXU9.js → realm-services-DoN23Ol2.js} +1 -1
  230. package/dist/assets/{reflection-probe-capture.inspector-CTNlSaGW.js → reflection-probe-capture.inspector-D0grUDdX.js} +1 -1
  231. package/dist/assets/{registry-wqakYaDW.js → registry-CZxNkOhN.js} +1 -1
  232. package/dist/assets/{relative-import-specifier-DXWVQf0o.js → relative-import-specifier-DMppRnNH.js} +1 -1
  233. package/dist/assets/{render-env-CN09NtDf.js → render-env-BAO3Rc6G.js} +1 -1
  234. package/dist/assets/{render-features-HCEupUJ6.js → render-features-CBm-s0QE.js} +1 -1
  235. package/dist/assets/{render-settings-Clt6d05o.js → render-settings-DCZaLK-j.js} +1 -1
  236. package/dist/assets/{resolve-three-CLzKVMx2.js → resolve-three-Bwj7rkZB.js} +3 -3
  237. package/dist/assets/{root-seam-contract-D2uQHWF9.js → root-seam-contract-DMUsCBFW.js} +1 -1
  238. package/dist/assets/{run-selection-AyelFc9T.js → run-selection-DRkjJF-w.js} +1 -1
  239. package/dist/assets/{scene-capture-WbPcLfJl.js → scene-capture-DVXdql_1.js} +1 -1
  240. package/dist/assets/{scene-document.service-4U6rDhCp.js → scene-document.service-CxGQ1BN-.js} +2 -2
  241. package/dist/assets/{scene-framing-DzSL2Cld.js → scene-framing-DUd4lKtW.js} +1 -1
  242. package/dist/assets/{seeded-random-tpdJjdqy.js → seeded-random-DzZFJTfh.js} +1 -1
  243. package/dist/assets/{setup-renderer-B5vZmCyu.js → setup-renderer-DF2zFw-E.js} +1 -1
  244. package/dist/assets/{source-object3d-authoring-adapter-BQnQ3Qzg.js → source-object3d-authoring-adapter-RimvAMDG.js} +1 -1
  245. package/dist/assets/{source-persistence-backend-uyd6NiWD.js → source-persistence-backend-BRcy23H9.js} +1 -1
  246. package/dist/assets/{stage-keyboard-B2yrk2zu.js → stage-keyboard-JRZ1CNbL.js} +1 -1
  247. package/dist/assets/{stage-overlay-set-Cqtz3s06.js → stage-overlay-set-DHN11xPU.js} +1 -1
  248. package/dist/assets/{stage-presence-markers-BgLs0Aj5.js → stage-presence-markers-AQuGIbnu.js} +1 -1
  249. package/dist/assets/stage-transform-tools-B8u8n8gJ.js +1 -0
  250. package/dist/assets/{standard-viewport-dressing-uhv_3JvQ.js → standard-viewport-dressing-NHKaiGVg.js} +3 -3
  251. package/dist/assets/{state-watch.action-BJ08HgcO.js → state-watch.action-B_conRk5.js} +1 -1
  252. package/dist/assets/{state-watch.menu-rAULwijr.js → state-watch.menu-B6GNrnYH.js} +1 -1
  253. package/dist/assets/{state-watch.utility-eEbQcj8t.js → state-watch.utility-CxuUOPhl.js} +1 -1
  254. package/dist/assets/story-capture-DYXQlnlZ.js +1 -0
  255. package/dist/assets/{story-documents-Cm4jCkW5.js → story-documents-D_Tg0idt.js} +2 -2
  256. package/dist/assets/{story-documents.service-Cgtg6rXn.js → story-documents.service-DQh0SkkQ.js} +1 -1
  257. package/dist/assets/{story-documents.service-BDvQCslK.js → story-documents.service-ES8nxeNu.js} +1 -1
  258. package/dist/assets/story-media-presence-D4w-waFJ.js +1 -0
  259. package/dist/assets/{story-pixi-preview-D62Q_vIW.js → story-pixi-preview-B6GFGUQG.js} +1 -1
  260. package/dist/assets/{story-presentation-CofUdEU7.js → story-presentation-6qhUDkv4.js} +1 -1
  261. package/dist/assets/{story-three-preview-B9O1wapP.js → story-three-preview-BgLSJIlN.js} +2 -2
  262. package/dist/assets/{studio-environment-BIhqrtFc.js → studio-environment-BGU84AOG.js} +1 -1
  263. package/dist/assets/{surface-state-DrM3wsrr.js → surface-state-BtNEZzCd.js} +1 -1
  264. package/dist/assets/{syntactic-prop-specs-BGz0N7Dg.js → syntactic-prop-specs-B309atpv.js} +1 -1
  265. package/dist/assets/{team-playtest.service-CiE8UJAe.js → team-playtest.service-B8leDEE-.js} +1 -1
  266. package/dist/assets/{three-BQfhEwUz.js → three-BRZq2Px5.js} +1 -1
  267. package/dist/assets/{three-authoring-adapter-COBwREQO.js → three-authoring-adapter-DkfGlaNQ.js} +1 -1
  268. package/dist/assets/three-authoring.service-sOchR4o8.js +2 -0
  269. package/dist/assets/{three-ingest-runtime-BnRF_nJN.js → three-ingest-runtime-D9JoNRjk.js} +1 -1
  270. package/dist/assets/three-integration-D3zBmOoj.js +2 -0
  271. package/dist/assets/three-integration.service-CE8aNHob.js +1 -0
  272. package/dist/assets/{three-projection-core-PQm-CO61.js → three-projection-core-Dt5ARGlM.js} +1 -1
  273. package/dist/assets/{three-state-C7khRIQE.js → three-state-3qPk0Sq8.js} +1 -1
  274. package/dist/assets/{three-story-capture.service-B0oiGIfp.js → three-story-capture.service-B3U2L4qG.js} +2 -2
  275. package/dist/assets/three-story-model-C96x-E0V.js +1 -0
  276. package/dist/assets/{three-viewport-presentation-B_tBudM-.js → three-viewport-presentation-DGctcUkE.js} +1 -1
  277. package/dist/assets/{transform-mode-request-DWM6BdRA.js → transform-mode-request-C0cdwtJf.js} +1 -1
  278. package/dist/assets/{transport-strip-vgXGDgkI.js → transport-strip-8OsPiJIm.js} +1 -1
  279. package/dist/assets/transport.header-D1Otpit3.js +1 -0
  280. package/dist/assets/{tuples-BnYrlQqS.js → tuples-CaBWqclR.js} +1 -1
  281. package/dist/assets/ui-board-document-BMTAhmJP.js +2 -0
  282. package/dist/assets/{user-data-CifDDvSr.js → user-data-4Ls0MsfF.js} +1 -1
  283. package/dist/assets/{utility-view-state-BPl8Asup.js → utility-view-state-gIzv2Oo_.js} +1 -1
  284. package/dist/assets/{viewport-door-BCXEYmon.js → viewport-door-C4Fu0zS3.js} +1 -1
  285. package/dist/assets/{viewport-root-presentation-DJLpUuf0.js → viewport-root-presentation-DMMIH4rt.js} +1 -1
  286. package/dist/assets/{viewport-surface-status-jwLhIK_M.js → viewport-surface-status-CdI6sQko.js} +1 -1
  287. package/dist/assets/{webworkerAll-P6jePa6X.js → webworkerAll-BINEvomm.js} +1 -1
  288. package/dist/assets/worker-Cu9kIzIf.js +2 -0
  289. package/dist/assets/{workspace-arrangement-B_OcbQbj.js → workspace-arrangement-w-T2xUGF.js} +1 -1
  290. package/dist/assets/{world-documents-Bx3j867R.js → world-documents-feEUCgVE.js} +1 -1
  291. package/dist/assets/{world-root-stage-binding-LEhjWDkn.js → world-root-stage-binding-BDb6wt_C.js} +1 -1
  292. package/dist/assets/{xstate-animation-binding-Dionc_fC.js → xstate-animation-binding-Bhz1Uhhw.js} +1 -1
  293. package/dist/assets/{xstate-animation-meta-XEmD_qc_.js → xstate-animation-meta-CvDlYgrt.js} +1 -1
  294. package/dist-node/cli.js +21 -18
  295. package/package.json +16 -16
  296. package/template/src/lib/reflections/ReflectionProbe.tsx +34 -5
  297. package/template/src/lib/reflections/index.ts +1 -0
  298. package/template/src/lib/reflections/probe-controller.ts +44 -3
  299. package/template/src/lib/reflections/reflection-probe-registry.ts +32 -7
  300. package/template/src/lib/reflections/volume-reflection-material.ts +638 -160
  301. package/dist/assets/EntityModelDocument-CplmAib0.js +0 -1
  302. package/dist/assets/InspectorObjectPreview-Bjc1Tn-I.js +0 -1
  303. package/dist/assets/ModelAssetDocument-G6ajiV51.js +0 -1
  304. package/dist/assets/Object3DDocumentViewport-BhH8afDi.js +0 -2
  305. package/dist/assets/StageHost-Bor1eHEO.js +0 -2
  306. package/dist/assets/autoplay.service-DaonKf7O.js +0 -1
  307. package/dist/assets/blender-emscripten-engine-DQljvfR7.js +0 -2
  308. package/dist/assets/blender-runtime.document-DnSl0twI.js +0 -12
  309. package/dist/assets/blender-wali-engine-CO-jG_ik.js +0 -2
  310. package/dist/assets/bridge.command-D6qTcgje.js +0 -3
  311. package/dist/assets/collaboration-presence-DcPhahtF.js +0 -1
  312. package/dist/assets/component-board.service-Cd1c9oSN.js +0 -2
  313. package/dist/assets/component-verbs.service-DsxhVcvk.js +0 -1
  314. package/dist/assets/editor-api-WeHVNlEo.js +0 -1
  315. package/dist/assets/fork-menu-Bthg9viY.js +0 -1
  316. package/dist/assets/gameplay-replay-WyopKGyB.js +0 -1
  317. package/dist/assets/ibl-override-material-CMo_a49U.js +0 -6
  318. package/dist/assets/index-yXSK_qPW.js +0 -1
  319. package/dist/assets/instances.command-COw2QpbN.js +0 -1
  320. package/dist/assets/layered-pick-BUr1U8lU.js +0 -1
  321. package/dist/assets/material-B6cH1Oqw.js +0 -1
  322. package/dist/assets/network-observer.service-GFzXuBMb.js +0 -1
  323. package/dist/assets/stage-transform-tools-BHcz53td.js +0 -1
  324. package/dist/assets/story-capture-B8wfSf5s.js +0 -1
  325. package/dist/assets/story-media-presence-SGlp_afL.js +0 -1
  326. package/dist/assets/three-authoring.service-C0azvoq8.js +0 -2
  327. package/dist/assets/three-integration-DeWYFf1x.js +0 -2
  328. package/dist/assets/three-integration.service-CoWCBTmg.js +0 -1
  329. package/dist/assets/three-story-model-D7g2pqfJ.js +0 -1
  330. package/dist/assets/transport.header-CfVHXjrT.js +0 -1
  331. package/dist/assets/ui-board-document-B_-K9luq.js +0 -2
  332. package/dist/assets/worker-CJIsrsP6.js +0 -2
@@ -1 +1 @@
1
- import{a2 as l,a3 as a,ab as c}from"./index-V4J7xfRg.js";const g={version:1,jobs:[]};let u=g,i=null,s=0,o=!1;const r=new Set;function w(e,n=null){u=e,i=n,s++;for(const d of r)d()}function J(){return u}function v(){return i}function E(){return s}function b(e){return r.add(e),()=>r.delete(e)}function p(e){return e.status==="queued"||e.status==="running"}function h(e){return!p(e)&&(!e.readAt||Date.parse(e.readAt)<Date.parse(e.updatedAt))}function y(e){return e.filter(h).length}async function t(){try{const e=await fetch("/__editor/generations");w(await l(e,"Generation activity request failed"))}catch(e){i=e instanceof Error?e.message:String(e),s++;for(const n of r)n()}}async function G(){if(!o){o=!0;try{const e=await fetch("/__editor/generations/reconcile",{method:"POST"});a(e,"Generation reconciliation failed"),await t()}finally{o=!1}}}async function _(e){const n=await c(e.poll.tool,e.poll.input);if(!n.ok)throw new Error(n.error.message);if(n.generationWarning)throw new Error(n.generationWarning);return await t(),await f(e.id),n.data}async function S(e){if(!e.accept)throw new Error("This completed generation has no project asset to add.");const n=await c(e.accept.tool,e.accept.input,{confirm:!0});if(!n.ok)throw new Error(n.error.message);if(n.generationWarning)throw new Error(n.generationWarning);await t(),await f(e.id)}async function f(e){const n=await fetch(`/__editor/generations/${encodeURIComponent(e)}/read`,{method:"POST"});a(n,"Mark generation read failed"),await t()}async function T(e){const n=await fetch(`/__editor/generations/${encodeURIComponent(e)}`,{method:"DELETE"});a(n,"Forget generation job failed"),await t()}function A(){t();const e=window.setInterval(()=>void t(),2e3);return()=>{window.clearInterval(e)}}export{y as a,p as b,S as c,v as d,h as e,T as f,J as g,A as h,_ as i,E as j,f as m,G as p,t as r,b as s};
1
+ import{a3 as l,a4 as a,ac as c}from"./index-C5tasxXb.js";const g={version:1,jobs:[]};let u=g,i=null,s=0,o=!1;const r=new Set;function w(e,n=null){u=e,i=n,s++;for(const d of r)d()}function J(){return u}function v(){return i}function E(){return s}function y(e){return r.add(e),()=>r.delete(e)}function p(e){return e.status==="queued"||e.status==="running"}function h(e){return!p(e)&&(!e.readAt||Date.parse(e.readAt)<Date.parse(e.updatedAt))}function b(e){return e.filter(h).length}async function t(){try{const e=await fetch("/__editor/generations");w(await l(e,"Generation activity request failed"))}catch(e){i=e instanceof Error?e.message:String(e),s++;for(const n of r)n()}}async function G(){if(!o){o=!0;try{const e=await fetch("/__editor/generations/reconcile",{method:"POST"});a(e,"Generation reconciliation failed"),await t()}finally{o=!1}}}async function _(e){const n=await c(e.poll.tool,e.poll.input);if(!n.ok)throw new Error(n.error.message);if(n.generationWarning)throw new Error(n.generationWarning);return await t(),await f(e.id),n.data}async function S(e){if(!e.accept)throw new Error("This completed generation has no project asset to add.");const n=await c(e.accept.tool,e.accept.input,{confirm:!0});if(!n.ok)throw new Error(n.error.message);if(n.generationWarning)throw new Error(n.generationWarning);await t(),await f(e.id)}async function f(e){const n=await fetch(`/__editor/generations/${encodeURIComponent(e)}/read`,{method:"POST"});a(n,"Mark generation read failed"),await t()}async function T(e){const n=await fetch(`/__editor/generations/${encodeURIComponent(e)}`,{method:"DELETE"});a(n,"Forget generation job failed"),await t()}function A(){t();const e=window.setInterval(()=>void t(),2e3);return()=>{window.clearInterval(e)}}export{b as a,p as b,S as c,v as d,h as e,T as f,J as g,A as h,_ as i,E as j,f as m,G as p,t as r,y as s};
@@ -1 +1 @@
1
- import{jj as V,jk as Y,f9 as O,dM as D,g$ as E,jl as Q,jm as A,aM as X,a5 as p,h1 as H,fl as Z,jn as ee,jo as te,jp as w,jq as ne,jr as re,js as ae,jt as oe,ju as se,jv as ie,bu as le,aK as h,hU as ce,ex as P,hE as R,bP as B,Y as de,a6 as M,gf as ue,jw as me,jx as ge,jy as pe,gY as ve,jz as fe,b6 as he,jA as xe,f3 as je,ac as ye,f5 as Ce}from"./index-V4J7xfRg.js";import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{r as u}from"./index-nmcBqr7Y.js";import{m as Ne}from"./model-thumbnail-chePRlH7.js";import"./index-CtzuWnCS.js";import{s as T,g as x,c as _,f as z,i as Ee,b as U,p as Se,r as J,d as ke,e as Te,m as $e,h as be,j as Ae,a as we}from"./generation-jobs-CcCrhKLM.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./renderer-ownership-BovSEcLv.js";import"./studio-environment-BIhqrtFc.js";import"./user-data-CifDDvSr.js";import"./workspace-arrangement-B_OcbQbj.js";import"./KTX2Loader-CaqVE6nY.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";function j(e){switch(e.status){case"queued":return"queued";case"running":return"running";case"failed":return"failed";case"cancelled":return"cancelled";default:return e.acceptedAt?"ready":e.accept?e.pollError?"save-failed":"saving":"no-asset"}}function q(e){const n=j(e);return n!=="queued"&&n!=="running"&&n!=="saving"}function F(e,n){return e.status==="succeeded"&&!!e.accept&&!e.acceptedAt&&!!(e.pollError??n)}const $={queued:"Queued",running:"Running",saving:"Saving","save-failed":"Couldn't save",ready:"In project","no-asset":"No file",failed:"Failed",cancelled:"Cancelled"},Re=new Map([...["png","jpg","jpeg","webp","gif","avif","svg","bmp"].map(e=>[e,"image"]),...["mp4","webm","ogv","mov","m4v"].map(e=>[e,"video"]),...["mp3","wav","ogg","oga","m4a","flac","aac"].map(e=>[e,"audio"]),...["glb","gltf","fbx","obj","stl","ply","dae","3ds","usdz","spz"].map(e=>[e,"model"])]);function Ge(e){const n=e.slice(e.lastIndexOf("/")+1).toLowerCase(),r=n.lastIndexOf(".");return r>0?n.slice(r+1):""}function L(e){return(e.outputPaths??[]).map(n=>{const r=V.find(a=>n.startsWith(`${a}/`)),o=r?Y(r,n.slice(r.length+1)):null;return{path:n,name:n.slice(n.lastIndexOf("/")+1),kind:Re.get(Ge(n))??"file",url:o}})}function G(e,n){const r=e.trim();return r.length<=n?r:`${r.slice(0,n-1).trimEnd()}…`}function N(e){const n=De(e);if(n)return n;const r=L(e);if(r.length===0)return G(e.label,64);const o=r[0],a=Oe(o.path);return r.length>1?a?`${a} · ${r.length} files`:`${r.length} files`:Ie.test(o.name)?a?`${a}/${o.name}`:G(e.label,64):o.name}const Ie=/^(image|video|audio|model|panorama|output)(-\d+)?\./;function Oe(e){const n=e.split("/").slice(-2,-1)[0];return n?/^[0-9a-f]{8,}$/i.test(n)||/^[0-9a-f-]{16,}$/i.test(n)?null:n:null}function De(e){const n=e.accept?.input;if(!n||typeof n!="object")return null;const r=n.outputName;return typeof r=="string"&&r.trim().length>0?r.trim():null}function Pe(e){for(const n of[e.accept?.input,e.poll.input]){const r=W(n,0);if(r)return r}return null}function W(e,n){if(n>3||typeof e!="object"||e===null)return null;const r=e,o=r.prompt;if(typeof o=="string"&&o.trim().length>0)return o.trim();for(const a of Object.values(r)){const l=W(a,n+1);if(l)return l}return null}function I(e){return e.operation}function Be(e){return e.mode==="managed"?"Volter subscription":e.mode==="direct"?"Your provider key":"Mock"}function Me(e){return e.route==="mock"?"Free · mock":e.route==="managed"?e.settledCredits!==void 0?`${e.settledCredits} credits`:e.estimatedCredits!==void 0?`Up to ${e.estimatedCredits} credits`:"Credit estimate unavailable":e.settledAmount!==void 0?`$${e.settledAmount.toFixed(3)}`:e.estimatedAmount!==void 0?`Up to $${e.estimatedAmount.toFixed(3)}`:"USD estimate unavailable"}function _e(e){return e.route==="mock"?!0:e.route==="managed"?e.settledCredits!==void 0:e.settledAmount!==void 0}function ze(e){const n=Math.floor((Date.now()-Date.parse(e))/6e4);if(!Number.isFinite(n)||n<1)return"just now";if(n<60)return`${n}m ago`;const r=Math.floor(n/60);if(r<24)return`${r}h ago`;const o=Math.floor(r/24);return o<7?`${o}d ago`:`${Math.floor(o/7)}w ago`}const S="generation:",Ue="generation:create";function Je(e){return e.route==="mock"?"Free mock":e.route==="managed"?e.settledCredits!==void 0?`${e.settledCredits} credits settled`:e.estimatedCredits!==void 0?`Up to ${e.estimatedCredits} credits`:"Volter subscription · estimate unavailable":e.settledAmount!==void 0?`$${e.settledAmount.toFixed(3)} settled`:e.estimatedAmount!==void 0?`Up to $${e.estimatedAmount.toFixed(3)}`:"BYOK · estimate unavailable"}function K(e){return O({id:`${S}${e.id}`,title:e.label,kind:"generation",workspaceRole:"authored-subject",provenance:{origin:`${e.provider}:${e.externalId}`},Content:Le,closeable:!0,presentation:()=>({kind:"generation",id:e.id})})}function k(){return O({id:Ue,title:"Create Asset",kind:"generation",workspaceRole:"workspace-task",provenance:{origin:"registered generation tools"},Content:qe,closeable:!0,presentation:()=>({kind:"generation",id:"create"})})}function qe(){u.useSyncExternalStore(D,E),u.useSyncExternalStore(Q,A,A);const e=ee(),[n,r]=u.useState(""),o=n.trim().toLowerCase(),a=E().filter(i=>i.point==="workspace.document"&&i.tool?.generation?.role==="submit").filter(i=>o?[i.title,i.tool?.generation?.provider,i.tool?.summary,i.tool?.description].filter(Boolean).some(c=>String(c).toLowerCase().includes(o)):!0),l=new Map;for(const i of a){const c=i.tool?.generation?.provider??"other";l.set(c,[...l.get(c)??[],i])}return t.jsxs("div",{className:"volter-tool-page","data-testid":"generation-create-catalog",children:[t.jsxs("header",{className:"volter-tool-header",children:[t.jsx("div",{className:"volter-tool-eyebrow",children:"Installed provider extensions"}),t.jsx("h2",{className:"volter-tool-title",children:"Create an asset"}),t.jsxs("p",{className:"volter-tool-description",children:["Choose a native provider operation. Mock, managed, and BYOK execution remain explicit in the operation you open. Current default: ",e.preferredRoute,"."]})]}),t.jsx(X,{type:"search","aria-label":"Search generation tools",placeholder:"Search operations or providers…",value:n,onChange:i=>r(i.target.value)}),[...l.entries()].map(([i,c])=>t.jsxs("section",{className:"volter-tool-card",children:[t.jsx("h3",{className:"volter-tool-section-title",children:i}),t.jsx("div",{className:"volter-generation-create-grid",children:c.map(m=>t.jsxs(p,{variant:"ghost",className:"volter-generation-create-card",onClick:()=>H(m.id),children:[t.jsx("strong",{children:m.title}),t.jsx("span",{children:m.tool?.summary})]},m.id))})]},i)),a.length===0&&t.jsx("div",{className:"volter-generation-document-empty",children:"No installed generation operation matches this search."})]})}function Fe({job:e,result:n,documentId:r,active:o}){u.useSyncExternalStore(D,E),u.useSyncExternalStore(te,w,w);const a=ne(e.poll.tool,e,n);if(!a)return t.jsx("pre",{className:"volter-generation-native-result",children:JSON.stringify(n,null,2)});const l=a.Component;return t.jsx(re,{file:a.file,children:t.jsx(l,{tool:a.tool,contributionId:a.id,client:ie(),surfaces:ae,account:se(),play:oe(),documentId:r,active:o,job:e,result:n})})}function Le({documentId:e,active:n}){const{jobs:r}=u.useSyncExternalStore(T,x,x),o=e.startsWith(S)?e.slice(S.length):e,a=r.find(d=>d.id===o),[l,i]=u.useState(),[c,m]=u.useState(!1),[s,g]=u.useState(null),[v,f]=u.useState(!1),y=async d=>{m(!0),g(null);try{i(await Ee(d))}catch(C){g(C instanceof Error?C.message:String(C))}finally{m(!1)}};if(u.useEffect(()=>{a&&y(a)},[a?.id,a?.status]),!a)return t.jsx("div",{className:"volter-generation-document-empty",children:"This generation is no longer in project activity."});const b=s??(j(a)==="save-failed"?`Could not save into the project: ${a.pollError}`:null);return t.jsxs("div",{className:"volter-generation-document","data-status":a.status,children:[t.jsxs("header",{className:"volter-generation-document-header",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"volter-tool-eyebrow",children:[a.provider," · ",a.operation]}),t.jsx("h2",{className:"volter-tool-title",children:a.label}),t.jsxs("div",{className:"volter-generation-job-meta",children:[$[j(a)]," · ",Je(a.billing)]})]}),t.jsxs("div",{className:"volter-tool-actions",children:[t.jsx(p,{size:"compact",variant:"ghost",disabled:c,onClick:()=>void y(a),children:c?"Refreshing…":"Refresh"}),F(a,s)&&t.jsx(p,{size:"compact",variant:"primary",disabled:v,onClick:()=>{f(!0),g(null),_(a).catch(d=>g(d instanceof Error?d.message:String(d))).finally(()=>f(!1))},children:v?"Saving…":"Retry save"})]})]}),a.message&&t.jsx("div",{className:"volter-tool-status",children:a.message}),b&&t.jsx("div",{className:"volter-tool-status","data-tone":"error",role:"alert",children:b}),t.jsx("section",{className:"volter-generation-result","aria-label":"Generation result",children:l===void 0?t.jsx("div",{className:"volter-generation-document-empty",children:c?"Loading provider result…":"No provider result is available yet."}):t.jsx(Fe,{job:a,result:l,documentId:e,active:n})}),a.outputPaths&&a.outputPaths.length>0&&t.jsxs("section",{className:"volter-generation-output-paths",children:[t.jsx("strong",{children:"Project assets"}),a.outputPaths.map(d=>t.jsx("code",{children:d},d))]}),q(a)&&t.jsx("div",{className:"volter-generation-document-footer",children:t.jsx(p,{size:"compact",variant:"ghost",disabled:v,onClick:()=>{f(!0),z(a.id).then(()=>Z(e)).catch(d=>g(d instanceof Error?d.message:String(d))).finally(()=>f(!1))},children:"Remove from activity"})})]})}function We({output:e,onOpen:n}){const r=e.url;if(r&&e.kind==="image"){const o=t.jsx("img",{className:"volter-generation-output-media",src:r,alt:e.name,loading:"lazy"});return n?t.jsx(p,{variant:"ghost",className:"volter-generation-output-open",onClick:n,"aria-label":`Open ${e.name}`,children:o}):o}return r&&e.kind==="video"?t.jsx("video",{className:"volter-generation-output-media",src:r,controls:!0,preload:"metadata",playsInline:!0,title:e.name}):r&&e.kind==="audio"?t.jsxs("div",{className:"volter-generation-output-audio",children:[t.jsx(me,{url:r,name:e.name}),t.jsx("audio",{src:r,controls:!0,preload:"metadata",title:e.name})]}):e.url&&e.kind==="model"&&Ne(e.url)?t.jsx(ge,{url:e.url}):t.jsxs("div",{className:"volter-generation-output-file",children:[t.jsx(M,{icon:e.kind==="model"?pe:ve}),t.jsx(h,{variant:"caption",tone:"muted",children:e.name}),n&&t.jsx(p,{size:"compact",variant:"ghost",onClick:n,children:"Open file"})]})}const Ke={queued:"loading",running:"loading",saving:"loading","save-failed":"error",ready:"success","no-asset":"neutral",failed:"error",cancelled:"neutral"},Ve={queued:e=>e.queuePosition===void 0?"Waiting for the provider to start.":`Position ${e.queuePosition} in the provider queue.`,running:e=>e.message??"The provider is working on it.",saving:()=>"Downloading the finished output into this project.","save-failed":e=>e.pollError??"The finished output could not be saved.",ready:()=>"Saved into this project.","no-asset":()=>"The operation finished without a file this project can hold.",failed:e=>e.message??"The provider reported a failure.",cancelled:()=>"This generation was cancelled."};function Ye({job:e,state:n}){const r=n==="queued"||n==="running"||n==="saving",o=n==="failed"||n==="save-failed";return t.jsxs("div",{className:"volter-generation-state-media","data-state":n,children:[t.jsx(P,{compact:!0,tone:Ke[n],...o?{icon:t.jsx(M,{icon:ue})}:{},title:$[n],description:Ve[n](e)}),r&&t.jsx("progress",{className:"volter-generation-progress","aria-label":`${e.label} progress`,...n==="running"&&e.progress!==void 0?{value:e.progress,max:1}:{}})]})}function Qe({job:e,busy:n,error:r,run:o}){return t.jsxs("div",{className:"volter-generation-card-actions",children:[F(e,r)&&t.jsx(p,{size:"compact",variant:"primary",disabled:n,onClick:()=>o(()=>_(e)),children:n?"Saving…":"Retry save"}),t.jsx(p,{size:"compact",variant:"ghost",onClick:()=>K(e),children:"Details"}),q(e)&&t.jsx(p,{size:"compact",variant:"ghost",disabled:n,onClick:()=>o(()=>z(e.id)),children:"Remove"})]})}function Xe({job:e,busy:n,error:r,run:o}){const a=j(e),l=L(e),i=Pe(e),c=Te(e),m=s=>{if(!s.url)return;const g=fe(he(s.name));if(g)return()=>xe(s.url,g)};return t.jsxs("article",{className:"volter-generation-card","data-state":a,"aria-busy":U(e),"aria-label":N(e),onClickCapture:()=>{c&&$e(e.id).catch(s=>{de.warn(`Could not mark generation as seen: ${s instanceof Error?s.message:String(s)}`,"generations")})},children:[t.jsx("div",{className:"volter-generation-card-media","data-outputs":Math.min(l.length,4),children:l.length===0?t.jsx(Ye,{job:e,state:a}):l.map(s=>t.jsx("div",{className:"volter-generation-output",title:s.path,children:t.jsx(We,{output:s,onOpen:m(s)})},s.path))}),t.jsxs("div",{className:"volter-generation-card-body",children:[t.jsxs("div",{className:"volter-generation-card-heading",children:[t.jsx(h,{variant:"label",truncate:!0,title:N(e),children:N(e)}),t.jsxs(R,{className:"volter-generation-chip","data-state":a,children:[$[a],a==="running"&&e.progress!==void 0?` · ${Math.round(e.progress*100)}%`:""]}),c&&t.jsx(R,{className:"volter-generation-chip","data-state":"new",children:"New"})]}),t.jsxs(h,{variant:"caption",tone:"muted",truncate:!0,title:I(e),children:[e.provider," · ",I(e)]}),t.jsxs(h,{variant:"caption",tone:"dim",children:[Me(e.billing),_e(e.billing)?"":" (est.)"," · ",Be(e)," ·"," ",ze(e.updatedAt)]}),i&&t.jsx("p",{className:"volter-generation-card-prompt",title:i,children:i}),(r??e.pollError)&&t.jsx(B,{tone:r||a==="save-failed"?"error":"warning",className:"volter-generation-card-alert",children:r??(a==="save-failed"?`Could not save into the project: ${e.pollError}`:`Polling will retry: ${e.pollError}`)}),t.jsx(Qe,{job:e,busy:n,error:r,run:o})]})]})}function He(){const{jobs:e}=u.useSyncExternalStore(T,x,x),[n,r]=u.useState(null),[o,a]=u.useState({}),l=e.filter(U).length,i=e.filter(s=>j(s)==="saving").length,c=async(s,g)=>{r(s),a(v=>{const f={...v};return delete f[s],f});try{await g()}catch(v){const f=v instanceof Error?v.message:String(v);a(y=>({...y,[s]:f}))}finally{r(null)}},m=ke();return t.jsxs("div",{className:"volter-generation-gallery",children:[t.jsxs(le,{label:"Generations",compact:!0,className:"volter-generation-gallery-bar",children:[t.jsx(h,{variant:"label",children:"Generations"}),t.jsxs(h,{variant:"caption",tone:"muted",children:[e.length," ",e.length===1?"generation":"generations",l>0?` · ${l} running`:"",i>0?` · ${i} saving`:""]}),t.jsx(ce,{}),t.jsx(p,{size:"compact",variant:"ghost",onClick:()=>void Se().then(J),children:"Refresh"}),t.jsx(p,{size:"compact",variant:"primary",onClick:()=>k(),children:"New asset"})]}),m&&t.jsx(B,{tone:"error",className:"volter-generation-gallery-alert",children:m}),e.length===0?t.jsx(P,{className:"volter-generation-gallery-empty",title:"No generated assets yet",description:"Preview generated images, video, audio and models here. Create an asset to get started.",action:t.jsx(p,{size:"compact",variant:"primary",onClick:()=>k(),children:"New asset"})}):t.jsx("section",{className:"volter-generation-grid","aria-label":"Generated assets",children:e.map(s=>t.jsx(Xe,{job:s,busy:n===s.id,error:o[s.id]??null,run:g=>void c(s.id,g)},s.id))})]})}const kt="workspace.service",Ze="generation";function et(){const e=we(x().jobs);return e>0?{count:e,severity:"info"}:null}function Tt(){const e=[be(),je({...ye.generations,order:15,Content:He,badge:et,subscribeBadge:T,badgeSnapshot:Ae,visibleByDefault:!1,closeable:!0}),Ce({id:Ze,owner:"@volter/editor-game/generation",open:(n,r)=>{if(r.id==="create")return k();const o=x().jobs.find(a=>a.id===r.id);return o?K(o):null},settle:J})];return()=>{for(const n of e)n()}}export{kt as point,Tt as start};
1
+ import{jn as K,jo as Q,fa as I,dN as O,h0 as E,jp as Y,jq as A,aN as Z,a6 as p,h2 as X,fm as H,jr as ee,js as te,jt as w,ju as ne,jv as re,jw as ae,jx as oe,jy as se,jz as ie,bv as le,aL as h,hV as ce,ey as P,hF as R,bQ as B,Z as de,a7 as _,gg as ue,jA as me,jB as ge,jC as pe,gZ as ve,jD as fe,b7 as he,jE as xe,f4 as je,ad as ye,f6 as Ne}from"./index-C5tasxXb.js";import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{r as u}from"./index-nmcBqr7Y.js";import{m as Ce}from"./model-thumbnail-B7DVMYtQ.js";import"./index-CtzuWnCS.js";import{s as T,g as x,c as z,f as M,i as Ee,b as F,p as Se,r as J,d as ke,e as Te,m as $e,h as be,j as Ae,a as we}from"./generation-jobs-B6T_j2D_.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./renderer-ownership-BovSEcLv.js";import"./studio-environment-BGU84AOG.js";import"./user-data-4Ls0MsfF.js";import"./workspace-arrangement-w-T2xUGF.js";import"./KTX2Loader-CaqVE6nY.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";function j(e){switch(e.status){case"queued":return"queued";case"running":return"running";case"failed":return"failed";case"cancelled":return"cancelled";default:return e.acceptedAt?"ready":e.accept?e.pollError?"save-failed":"saving":"no-asset"}}function L(e){const n=j(e);return n!=="queued"&&n!=="running"&&n!=="saving"}function U(e,n){return e.status==="succeeded"&&!!e.accept&&!e.acceptedAt&&!!(e.pollError??n)}const $={queued:"Queued",running:"Running",saving:"Saving","save-failed":"Couldn't save",ready:"In project","no-asset":"No file",failed:"Failed",cancelled:"Cancelled"},Re=new Map([...["png","jpg","jpeg","webp","gif","avif","svg","bmp"].map(e=>[e,"image"]),...["mp4","webm","ogv","mov","m4v"].map(e=>[e,"video"]),...["mp3","wav","ogg","oga","m4a","flac","aac"].map(e=>[e,"audio"]),...["glb","gltf","fbx","obj","stl","ply","dae","3ds","usdz","spz"].map(e=>[e,"model"])]);function De(e){const n=e.slice(e.lastIndexOf("/")+1).toLowerCase(),r=n.lastIndexOf(".");return r>0?n.slice(r+1):""}function q(e){return(e.outputPaths??[]).map(n=>{const r=K.find(a=>n.startsWith(`${a}/`)),o=r?Q(r,n.slice(r.length+1)):null;return{path:n,name:n.slice(n.lastIndexOf("/")+1),kind:Re.get(De(n))??"file",url:o}})}function D(e,n){const r=e.trim();return r.length<=n?r:`${r.slice(0,n-1).trimEnd()}…`}function C(e){const n=Oe(e);if(n)return n;const r=q(e);if(r.length===0)return D(e.label,64);const o=r[0],a=Ie(o.path);return r.length>1?a?`${a} · ${r.length} files`:`${r.length} files`:Ge.test(o.name)?a?`${a}/${o.name}`:D(e.label,64):o.name}const Ge=/^(image|video|audio|model|panorama|output)(-\d+)?\./;function Ie(e){const n=e.split("/").slice(-2,-1)[0];return n?/^[0-9a-f]{8,}$/i.test(n)||/^[0-9a-f-]{16,}$/i.test(n)?null:n:null}function Oe(e){const n=e.accept?.input;if(!n||typeof n!="object")return null;const r=n.outputName;return typeof r=="string"&&r.trim().length>0?r.trim():null}function Pe(e){for(const n of[e.accept?.input,e.poll.input]){const r=W(n,0);if(r)return r}return null}function W(e,n){if(n>3||typeof e!="object"||e===null)return null;const r=e,o=r.prompt;if(typeof o=="string"&&o.trim().length>0)return o.trim();for(const a of Object.values(r)){const l=W(a,n+1);if(l)return l}return null}function G(e){return e.operation}function Be(e){return e.mode==="managed"?"Volter subscription":e.mode==="direct"?"Your provider key":"Mock"}function _e(e){return e.route==="mock"?"Free · mock":e.route==="managed"?e.settledCredits!==void 0?`${e.settledCredits} credits`:e.estimatedCredits!==void 0?`Up to ${e.estimatedCredits} credits`:"Credit estimate unavailable":e.settledAmount!==void 0?`$${e.settledAmount.toFixed(3)}`:e.estimatedAmount!==void 0?`Up to $${e.estimatedAmount.toFixed(3)}`:"USD estimate unavailable"}function ze(e){return e.route==="mock"?!0:e.route==="managed"?e.settledCredits!==void 0:e.settledAmount!==void 0}function Me(e){const n=Math.floor((Date.now()-Date.parse(e))/6e4);if(!Number.isFinite(n)||n<1)return"just now";if(n<60)return`${n}m ago`;const r=Math.floor(n/60);if(r<24)return`${r}h ago`;const o=Math.floor(r/24);return o<7?`${o}d ago`:`${Math.floor(o/7)}w ago`}const S="generation:",Fe="generation:create";function Je(e){return e.route==="mock"?"Free mock":e.route==="managed"?e.settledCredits!==void 0?`${e.settledCredits} credits settled`:e.estimatedCredits!==void 0?`Up to ${e.estimatedCredits} credits`:"Volter subscription · estimate unavailable":e.settledAmount!==void 0?`$${e.settledAmount.toFixed(3)} settled`:e.estimatedAmount!==void 0?`Up to $${e.estimatedAmount.toFixed(3)}`:"BYOK · estimate unavailable"}function V(e){return I({id:`${S}${e.id}`,title:e.label,kind:"generation",workspaceRole:"authored-subject",provenance:{origin:`${e.provider}:${e.externalId}`},Content:qe,closeable:!0,presentation:()=>({kind:"generation",id:e.id})})}function k(){return I({id:Fe,title:"Create Asset",kind:"generation",workspaceRole:"workspace-task",provenance:{origin:"registered generation tools"},Content:Le,closeable:!0,presentation:()=>({kind:"generation",id:"create"})})}function Le(){u.useSyncExternalStore(O,E),u.useSyncExternalStore(Y,A,A);const e=ee(),[n,r]=u.useState(""),o=n.trim().toLowerCase(),a=E().filter(i=>i.point==="workspace.document"&&i.tool?.generation?.role==="submit").filter(i=>o?[i.title,i.tool?.generation?.provider,i.tool?.summary,i.tool?.description].filter(Boolean).some(c=>String(c).toLowerCase().includes(o)):!0),l=new Map;for(const i of a){const c=i.tool?.generation?.provider??"other";l.set(c,[...l.get(c)??[],i])}return t.jsxs("div",{className:"volter-tool-page","data-testid":"generation-create-catalog",children:[t.jsxs("header",{className:"volter-tool-header",children:[t.jsx("div",{className:"volter-tool-eyebrow",children:"Installed provider extensions"}),t.jsx("h2",{className:"volter-tool-title",children:"Create an asset"}),t.jsxs("p",{className:"volter-tool-description",children:["Choose a native provider operation. Mock, managed, and BYOK execution remain explicit in the operation you open. Current default: ",e.preferredRoute,"."]})]}),t.jsx(Z,{type:"search","aria-label":"Search generation tools",placeholder:"Search operations or providers…",value:n,onChange:i=>r(i.target.value)}),[...l.entries()].map(([i,c])=>t.jsxs("section",{className:"volter-tool-card",children:[t.jsx("h3",{className:"volter-tool-section-title",children:i}),t.jsx("div",{className:"volter-generation-create-grid",children:c.map(m=>t.jsxs(p,{variant:"ghost",className:"volter-generation-create-card",onClick:()=>X(m.id),children:[t.jsx("strong",{children:m.title}),t.jsx("span",{children:m.tool?.summary})]},m.id))})]},i)),a.length===0&&t.jsx("div",{className:"volter-generation-document-empty",children:"No installed generation operation matches this search."})]})}function Ue({job:e,result:n,documentId:r,active:o}){u.useSyncExternalStore(O,E),u.useSyncExternalStore(te,w,w);const a=ne(e.poll.tool,e,n);if(!a)return t.jsx("pre",{className:"volter-generation-native-result",children:JSON.stringify(n,null,2)});const l=a.Component;return t.jsx(re,{file:a.file,children:t.jsx(l,{tool:a.tool,contributionId:a.id,client:ie(),surfaces:ae,account:se(),play:oe(),documentId:r,active:o,job:e,result:n})})}function qe({documentId:e,active:n}){const{jobs:r}=u.useSyncExternalStore(T,x,x),o=e.startsWith(S)?e.slice(S.length):e,a=r.find(d=>d.id===o),[l,i]=u.useState(),[c,m]=u.useState(!1),[s,g]=u.useState(null),[v,f]=u.useState(!1),y=async d=>{m(!0),g(null);try{i(await Ee(d))}catch(N){g(N instanceof Error?N.message:String(N))}finally{m(!1)}};if(u.useEffect(()=>{a&&y(a)},[a?.id,a?.status]),!a)return t.jsx("div",{className:"volter-generation-document-empty",children:"This generation is no longer in project activity."});const b=s??(j(a)==="save-failed"?`Could not save into the project: ${a.pollError}`:null);return t.jsxs("div",{className:"volter-generation-document","data-status":a.status,children:[t.jsxs("header",{className:"volter-generation-document-header",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"volter-tool-eyebrow",children:[a.provider," · ",a.operation]}),t.jsx("h2",{className:"volter-tool-title",children:a.label}),t.jsxs("div",{className:"volter-generation-job-meta",children:[$[j(a)]," · ",Je(a.billing)]})]}),t.jsxs("div",{className:"volter-tool-actions",children:[t.jsx(p,{size:"compact",variant:"ghost",disabled:c,onClick:()=>void y(a),children:c?"Refreshing…":"Refresh"}),U(a,s)&&t.jsx(p,{size:"compact",variant:"primary",disabled:v,onClick:()=>{f(!0),g(null),z(a).catch(d=>g(d instanceof Error?d.message:String(d))).finally(()=>f(!1))},children:v?"Saving…":"Retry save"})]})]}),a.message&&t.jsx("div",{className:"volter-tool-status",children:a.message}),b&&t.jsx("div",{className:"volter-tool-status","data-tone":"error",role:"alert",children:b}),t.jsx("section",{className:"volter-generation-result","aria-label":"Generation result",children:l===void 0?t.jsx("div",{className:"volter-generation-document-empty",children:c?"Loading provider result…":"No provider result is available yet."}):t.jsx(Ue,{job:a,result:l,documentId:e,active:n})}),a.outputPaths&&a.outputPaths.length>0&&t.jsxs("section",{className:"volter-generation-output-paths",children:[t.jsx("strong",{children:"Project assets"}),a.outputPaths.map(d=>t.jsx("code",{children:d},d))]}),L(a)&&t.jsx("div",{className:"volter-generation-document-footer",children:t.jsx(p,{size:"compact",variant:"ghost",disabled:v,onClick:()=>{f(!0),M(a.id).then(()=>H(e)).catch(d=>g(d instanceof Error?d.message:String(d))).finally(()=>f(!1))},children:"Remove from activity"})})]})}function We({output:e,onOpen:n}){const r=e.url;if(r&&e.kind==="image"){const o=t.jsx("img",{className:"volter-generation-output-media",src:r,alt:e.name,loading:"lazy"});return n?t.jsx(p,{variant:"ghost",className:"volter-generation-output-open",onClick:n,"aria-label":`Open ${e.name}`,children:o}):o}return r&&e.kind==="video"?t.jsx("video",{className:"volter-generation-output-media",src:r,controls:!0,preload:"metadata",playsInline:!0,title:e.name}):r&&e.kind==="audio"?t.jsxs("div",{className:"volter-generation-output-audio",children:[t.jsx(me,{url:r,name:e.name}),t.jsx("audio",{src:r,controls:!0,preload:"metadata",title:e.name})]}):e.url&&e.kind==="model"&&Ce(e.url)?t.jsx(ge,{url:e.url}):t.jsxs("div",{className:"volter-generation-output-file",children:[t.jsx(_,{icon:e.kind==="model"?pe:ve}),t.jsx(h,{variant:"caption",tone:"muted",children:e.name}),n&&t.jsx(p,{size:"compact",variant:"ghost",onClick:n,children:"Open file"})]})}const Ve={queued:"loading",running:"loading",saving:"loading","save-failed":"error",ready:"success","no-asset":"neutral",failed:"error",cancelled:"neutral"},Ke={queued:e=>e.queuePosition===void 0?"Waiting for the provider to start.":`Position ${e.queuePosition} in the provider queue.`,running:e=>e.message??"The provider is working on it.",saving:()=>"Downloading the finished output into this project.","save-failed":e=>e.pollError??"The finished output could not be saved.",ready:()=>"Saved into this project.","no-asset":()=>"The operation finished without a file this project can hold.",failed:e=>e.message??"The provider reported a failure.",cancelled:()=>"This generation was cancelled."};function Qe({job:e,state:n}){const r=n==="queued"||n==="running"||n==="saving",o=n==="failed"||n==="save-failed";return t.jsxs("div",{className:"volter-generation-state-media","data-state":n,children:[t.jsx(P,{compact:!0,tone:Ve[n],...o?{icon:t.jsx(_,{icon:ue})}:{},title:$[n],description:Ke[n](e)}),r&&t.jsx("progress",{className:"volter-generation-progress","aria-label":`${e.label} progress`,...n==="running"&&e.progress!==void 0?{value:e.progress,max:1}:{}})]})}function Ye({job:e,busy:n,error:r,run:o}){return t.jsxs("div",{className:"volter-generation-card-actions",children:[U(e,r)&&t.jsx(p,{size:"compact",variant:"primary",disabled:n,onClick:()=>o(()=>z(e)),children:n?"Saving…":"Retry save"}),t.jsx(p,{size:"compact",variant:"ghost",onClick:()=>V(e),children:"Details"}),L(e)&&t.jsx(p,{size:"compact",variant:"ghost",disabled:n,onClick:()=>o(()=>M(e.id)),children:"Remove"})]})}function Ze({job:e,busy:n,error:r,run:o}){const a=j(e),l=q(e),i=Pe(e),c=Te(e),m=s=>{if(!s.url)return;const g=fe(he(s.name));if(g)return()=>xe(s.url,g)};return t.jsxs("article",{className:"volter-generation-card","data-state":a,"aria-busy":F(e),"aria-label":C(e),onClickCapture:()=>{c&&$e(e.id).catch(s=>{de.warn(`Could not mark generation as seen: ${s instanceof Error?s.message:String(s)}`,"generations")})},children:[t.jsx("div",{className:"volter-generation-card-media","data-outputs":Math.min(l.length,4),children:l.length===0?t.jsx(Qe,{job:e,state:a}):l.map(s=>t.jsx("div",{className:"volter-generation-output",title:s.path,children:t.jsx(We,{output:s,onOpen:m(s)})},s.path))}),t.jsxs("div",{className:"volter-generation-card-body",children:[t.jsxs("div",{className:"volter-generation-card-heading",children:[t.jsx(h,{variant:"label",truncate:!0,title:C(e),children:C(e)}),t.jsxs(R,{className:"volter-generation-chip","data-state":a,children:[$[a],a==="running"&&e.progress!==void 0?` · ${Math.round(e.progress*100)}%`:""]}),c&&t.jsx(R,{className:"volter-generation-chip","data-state":"new",children:"New"})]}),t.jsxs(h,{variant:"caption",tone:"muted",truncate:!0,title:G(e),children:[e.provider," · ",G(e)]}),t.jsxs(h,{variant:"caption",tone:"dim",children:[_e(e.billing),ze(e.billing)?"":" (est.)"," · ",Be(e)," ·"," ",Me(e.updatedAt)]}),i&&t.jsx("p",{className:"volter-generation-card-prompt",title:i,children:i}),(r??e.pollError)&&t.jsx(B,{tone:r||a==="save-failed"?"error":"warning",className:"volter-generation-card-alert",children:r??(a==="save-failed"?`Could not save into the project: ${e.pollError}`:`Polling will retry: ${e.pollError}`)}),t.jsx(Ye,{job:e,busy:n,error:r,run:o})]})]})}function Xe(){const{jobs:e}=u.useSyncExternalStore(T,x,x),[n,r]=u.useState(null),[o,a]=u.useState({}),l=e.filter(F).length,i=e.filter(s=>j(s)==="saving").length,c=async(s,g)=>{r(s),a(v=>{const f={...v};return delete f[s],f});try{await g()}catch(v){const f=v instanceof Error?v.message:String(v);a(y=>({...y,[s]:f}))}finally{r(null)}},m=ke();return t.jsxs("div",{className:"volter-generation-gallery",children:[t.jsxs(le,{label:"Generations",compact:!0,className:"volter-generation-gallery-bar",children:[t.jsx(h,{variant:"label",children:"Generations"}),t.jsxs(h,{variant:"caption",tone:"muted",children:[e.length," ",e.length===1?"generation":"generations",l>0?` · ${l} running`:"",i>0?` · ${i} saving`:""]}),t.jsx(ce,{}),t.jsx(p,{size:"compact",variant:"ghost",onClick:()=>void Se().then(J),children:"Refresh"}),t.jsx(p,{size:"compact",variant:"primary",onClick:()=>k(),children:"New asset"})]}),m&&t.jsx(B,{tone:"error",className:"volter-generation-gallery-alert",children:m}),e.length===0?t.jsx(P,{className:"volter-generation-gallery-empty",title:"No generated assets yet",description:"Preview generated images, video, audio and models here. Create an asset to get started.",action:t.jsx(p,{size:"compact",variant:"primary",onClick:()=>k(),children:"New asset"})}):t.jsx("section",{className:"volter-generation-grid","aria-label":"Generated assets",children:e.map(s=>t.jsx(Ze,{job:s,busy:n===s.id,error:o[s.id]??null,run:g=>void c(s.id,g)},s.id))})]})}const kt="workspace.service",He="generation";function et(){const e=we(x().jobs);return e>0?{count:e,severity:"info"}:null}function Tt(){const e=[be(),je({...ye.generations,order:15,Content:Xe,badge:et,subscribeBadge:T,badgeSnapshot:Ae,visibleByDefault:!1,closeable:!0}),Ne({id:He,owner:"@volter/editor-game/generation",open:(n,r)=>{if(r.id==="create")return k();const o=x().jobs.find(a=>a.id===r.id);return o?V(o):null},settle:J})];return()=>{for(const n of e)n()}}export{kt as point,Tt as start};
@@ -1 +1 @@
1
- import{dY as p,t as o,w as n,c5 as e,u as l,v as t,c3 as d,e0 as c}from"./index-V4J7xfRg.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const u=d(["queued","running","succeeded","failed","cancelled"]),g=p("route",[o({route:n("mock")}).strict(),o({route:n("managed"),estimatedCredits:e().nonnegative().optional(),settledCredits:e().nonnegative().optional()}).strict(),o({route:n("byok"),currency:n("USD"),estimatedAmount:e().nonnegative().optional(),settledAmount:e().nonnegative().optional()}).strict()]),r=o({tool:t().min(1),input:c()}).strict(),v=o({id:t().min(1),provider:t().min(1),externalId:t().min(1),label:t().min(1),operation:t().min(1),mode:d(["mock","direct","managed"]),status:u,createdAt:t().datetime(),updatedAt:t().datetime(),progress:e().min(0).max(1).optional(),providerStatus:t().optional(),queuePosition:e().int().nonnegative().optional(),message:t().optional(),lastPolledAt:t().datetime().optional(),lastProviderChangeAt:t().datetime().optional(),pollError:t().optional(),pollErrorAt:t().datetime().optional(),pollFailureCount:e().int().nonnegative().optional(),nextPollAt:t().datetime().optional(),billing:g,poll:r,cancel:r.optional(),accept:r.optional(),acceptedAt:t().datetime().optional(),readAt:t().datetime().optional(),provenanceOperationId:t().optional(),outputPaths:l(t()).optional()}).strict(),x=o({version:n(1),jobs:l(v)}).strict();function y(m,s){if(m!=="managed")return{};const{estimatedCredits:i,settledCredits:a}=s;return i===void 0&&a===void 0?{}:{billing:{route:"managed",...i===void 0?{}:{estimatedCredits:i},...a===void 0?{}:{settledCredits:a}}}}export{g as GenerationBillingSchema,v as GenerationJobSchema,u as GenerationJobStatusSchema,x as GenerationJobsDocumentSchema,y as managedBilling};
1
+ import{dZ as p,u as o,x as n,c6 as e,v as l,w as t,c4 as d,e1 as c}from"./index-C5tasxXb.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 u=d(["queued","running","succeeded","failed","cancelled"]),g=p("route",[o({route:n("mock")}).strict(),o({route:n("managed"),estimatedCredits:e().nonnegative().optional(),settledCredits:e().nonnegative().optional()}).strict(),o({route:n("byok"),currency:n("USD"),estimatedAmount:e().nonnegative().optional(),settledAmount:e().nonnegative().optional()}).strict()]),r=o({tool:t().min(1),input:c()}).strict(),v=o({id:t().min(1),provider:t().min(1),externalId:t().min(1),label:t().min(1),operation:t().min(1),mode:d(["mock","direct","managed"]),status:u,createdAt:t().datetime(),updatedAt:t().datetime(),progress:e().min(0).max(1).optional(),providerStatus:t().optional(),queuePosition:e().int().nonnegative().optional(),message:t().optional(),lastPolledAt:t().datetime().optional(),lastProviderChangeAt:t().datetime().optional(),pollError:t().optional(),pollErrorAt:t().datetime().optional(),pollFailureCount:e().int().nonnegative().optional(),nextPollAt:t().datetime().optional(),billing:g,poll:r,cancel:r.optional(),accept:r.optional(),acceptedAt:t().datetime().optional(),readAt:t().datetime().optional(),provenanceOperationId:t().optional(),outputPaths:l(t()).optional()}).strict(),k=o({version:n(1),jobs:l(v)}).strict();function y(m,s){if(m!=="managed")return{};const{estimatedCredits:i,settledCredits:a}=s;return i===void 0&&a===void 0?{}:{billing:{route:"managed",...i===void 0?{}:{estimatedCredits:i},...a===void 0?{}:{settledCredits:a}}}}export{g as GenerationBillingSchema,v as GenerationJobSchema,u as GenerationJobStatusSchema,k as GenerationJobsDocumentSchema,y as managedBilling};
@@ -1 +1 @@
1
- import{a as s}from"./jsx-runtime-DPjLkJKQ.js";import{a5 as r,r as a,ac as i}from"./index-V4J7xfRg.js";import{r as c}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{s as u,g as o,a as p,b as m}from"./generation-jobs-CcCrhKLM.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";const I="workspace.status",$="Generations",C="left",T=24;function U(){const{jobs:e}=c.useSyncExternalStore(u,o,o),n=p(e),t=e.filter(m).length;return s.jsxs(r,{type:"button",variant:"ghost",size:"compact",className:"volter-status-action","data-testid":"status-generations","aria-label":`Generations, ${n} unseen, ${t} running`,title:`${n} unseen generation results, ${t} running — open Generations`,onClick:()=>a().workspace.showUtility(i.generations.id),children:["Generations · ",n,t>0?` · ${t} running`:""]})}export{C as align,U as default,T as order,I as point,$ as title};
1
+ import{a as s}from"./jsx-runtime-DPjLkJKQ.js";import{a6 as r,r as a,ad as i}from"./index-C5tasxXb.js";import{r as u}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{s as c,g as o,a as p,b as m}from"./generation-jobs-B6T_j2D_.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";const I="workspace.status",$="Generations",C="left",T=24;function U(){const{jobs:e}=u.useSyncExternalStore(c,o,o),n=p(e),t=e.filter(m).length;return s.jsxs(r,{type:"button",variant:"ghost",size:"compact",className:"volter-status-action","data-testid":"status-generations","aria-label":`Generations, ${n} unseen, ${t} running`,title:`${n} unseen generation results, ${t} running — open Generations`,onClick:()=>a().workspace.showUtility(i.generations.id),children:["Generations · ",n,t>0?` · ${t} running`:""]})}export{C as align,U as default,T as order,I as point,$ as title};
@@ -1 +1 @@
1
- import{g as n}from"./workspace-arrangement-B_OcbQbj.js";function r(t){const o=n(t,"volterComponentRoot");return typeof o=="string"&&o?o:void 0}function i(t){return n(t,"volterBuiltInternal")===!0}export{r as c,i};
1
+ import{g as n}from"./workspace-arrangement-w-T2xUGF.js";function r(t){const o=n(t,"volterComponentRoot");return typeof o=="string"&&o?o:void 0}function i(t){return n(t,"volterBuiltInternal")===!0}export{r as c,i};
@@ -1,2 +1,2 @@
1
- import{kz as k,v as l,t as y,kA as P,u as b,b2 as T}from"./index-V4J7xfRg.js";import{i as x}from"./relative-path-guard-GiM7Lsz8.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 d=".volter/assets.json",E=y({key:l().min(1),license:l().min(1).optional(),sourceHash:l().regex(/^sha256-[a-f0-9]{64}$/,'sourceHash must be "sha256-<64 hex>"').optional(),materializedAt:l().datetime()}).strict(),O=k(l().min(1),E);function z(e){if(!/^[a-f0-9]{64}$/.test(e))throw new Error(`Not a sha256 digest, refusing to record it as a sourceHash: ${e}`);return`sha256-${e}`}function m(e){const t=e.replaceAll("\\","/").replace(/^\.\//,"").replace(/^\/+/,"");if(!t)throw new Error("An asset ledger path cannot be empty.");if(!x(t))throw new Error(`An asset ledger path cannot escape the project: ${e}`);return t}function _(e){return O.parse(e)}function D(e){if(e==null||e.trim()==="")return{};let t;try{t=JSON.parse(e)}catch(s){throw new Error(`${d} is not valid JSON: ${String(s)}`)}return _(t)}function I(e,t,s){const r=m(t),n=E.parse(s),a={...e,[r]:n},i={};for(const u of Object.keys(a).sort())i[u]=a[u];return i}function M(e){const t={};for(const s of Object.keys(e).sort())t[s]=e[s];return`${JSON.stringify(t,null,2)}
2
- `}function U(e,t,s){const r=globalThis.navigator?.locks;return r?r.request(`volter:${e}:${P(t)}`,s):s()}const H=1e4,N=15;function j(){return globalThis.crypto?.randomUUID?.()??`${Date.now()}-${Math.random()}`}async function R(e,t,s={}){const r=s.staleAfterMs??H,n=s.retryDelayMs??N,a=s.now??Date.now,i=s.sleep??(o=>new Promise(c=>setTimeout(c,o))),u=s.token??j;for(;;){const o=JSON.stringify({at:a(),owner:s.owner??"unknown",token:u()});if(await e.createIfAbsent(o))try{return await t()}finally{await e.removeIfHeldBy(o)}const c=await e.read();if(c!==null){if(a()-B(c)>r){await e.removeIfHeldBy(c);continue}await i(n)}}}function B(e){try{const t=JSON.parse(e);return typeof t.at=="number"?t.at:0}catch{return 0}}function J(){const e=new Map;return(t,s)=>{const n=(e.get(t)??Promise.resolve()).then(s,s),a=n.then(()=>{},()=>{});return e.set(t,a),a.then(()=>{e.get(t)===a&&e.delete(t)}),n}}async function S(e){return await e.exists(d)?D(await e.read(d)):{}}async function F(e,t){await e.write(d,M(t))}const f=`${d}.lock`,C=J(),A=new WeakMap;let $=0;function K(e){const t=A.get(e);if(t!==void 0)return t;$+=1;const s=`${e.id}#${$}`;return A.set(e,s),s}async function W(e,t){const s={key:t.key,...t.license?{license:t.license}:{},...t.sourceSha256?{sourceHash:z(t.sourceSha256)}:{},materializedAt:t.materializedAt??new Date().toISOString()};await C(K(e),()=>R({createIfAbsent:r=>e.writeIfAbsent(f,r),read:async()=>await e.exists(f)?e.read(f):null,removeIfHeldBy:r=>U(e.id,f,async()=>{await e.exists(f)&&await e.read(f)===r&&await e.remove(f)})},async()=>{const r=await S(e);await F(e,I(r,m(t.destPath),s))},{owner:e.id}))}const G=y({key:l().regex(/^[^:]+:.+$/,'An asset key must be "source:id"'),dest:l().min(1),sha256:l().regex(/^[a-f0-9]{64}$/,"A pack entry must pin the sha256 of its bytes as 64 lowercase hex digits")}).strict(),Y=y({packs:k(l().min(1),b(G))}).strict();function q(e){return Y.parse(e)}function V(e){const t=[],s=new Map;for(const[r,n]of Object.entries(e.packs))for(const a of n){const i=s.get(a.dest);if(i!==void 0)throw new Error(`Two packs declare the same destination "${a.dest}": "${i}" and "${r}".`);s.set(a.dest,r),t.push({...a,pack:r})}return t}const w="asset-manifest.json",v="https://volter-asset-library.aaron-0ed.workers.dev";function L(e){return(e.baseUrl??v).replace(/\/+$/,"")}function Q(e){return e.signal?{signal:e.signal}:{}}async function X(e,t={}){const s=L(t),r=await fetch(`${s}/v1/assets/${encodeURIComponent(e)}`,Q(t));if(!r.ok)return null;const n=await r.json();return!n||typeof n!="object"||!Array.isArray(n.files)?null:n}function Z(e,t,s,r){return`${L(e?{baseUrl:e}:{})}/v1/assets/${encodeURIComponent(t)}/files/${s}`}async function he(e,t={}){const s=await ee(e),r={declared:s.length,materialized:[],alreadyPresent:[],failed:[]};if(s.length===0)return r;const n=await S(e);for(const a of s){if(t.signal?.aborted)break;if(n[m(a.dest)]&&await e.exists(a.dest)){r.alreadyPresent.push(a),t.onProgress?.(a,"already-present");continue}try{await te(e,a,t),r.materialized.push(a),t.onProgress?.(a,"materialized")}catch(i){r.failed.push({entry:a,reason:i instanceof Error?i.message:String(i)}),t.onProgress?.(a,"failed")}}return r}async function ee(e){if(!await e.exists(w))return[];const t=await e.read(w);let s;try{s=JSON.parse(t)}catch(r){throw new Error(`${w} is not valid JSON: ${r instanceof Error?r.message:String(r)}`)}return V(q(s))}async function te(e,t,s){const r=await se(t,s);await e.write(t.dest,r.bytes),await W(e,{destPath:t.dest,key:t.key,license:r.license,sourceSha256:t.sha256})}async function se(e,t={}){const s=e.key.indexOf(":");if(s<0)throw new Error(`Malformed asset key "${e.key}" (expected "source:id").`);const r=e.key.slice(0,s),n=e.key.slice(s+1);if(r!=="local")throw new Error(`Asset key "${e.key}": only the "local" (cloud-hosted) source can be materialized from the cloud worker.`);const a=t.baseUrl??v,i=t.signal?{baseUrl:a,signal:t.signal}:{baseUrl:a},u=await X(n,i);if(!u)throw new Error(`"${e.key}" is not hosted by the cloud asset library.`);const o=u.files[0];if(!o)throw new Error(`"${e.key}" has no files in the cloud library.`);if(o.dependencies.length>0)throw new Error(`"${e.key}" has ${o.dependencies.length} dependency file(s) — a pack entry names exactly one destination file.`);if(o.main.sha256!==e.sha256)throw new Error(`"${e.key}" → ${e.dest}: the cloud library reports sha256:${o.main.sha256} but ${w} pins sha256:${e.sha256}. Nothing was fetched or written; the pin is only re-cut by a reviewed change to the declaration.`);const c=Z(a,n,0),h=await fetch(c,t.signal?{signal:t.signal}:{});if(!h.ok)throw new Error(`${c} returned ${h.status} ${h.statusText}.`);const p=new Uint8Array(await h.arrayBuffer()),g=await T(p);if(g!==e.sha256)throw new Error(`"${e.key}" → ${e.dest}: ${c} delivered sha256:${g} but the declaration pins sha256:${e.sha256}. Nothing was written.`);return{bytes:p,license:u.license}}export{w as ASSET_MANIFEST_PATH,se as fetchVerifiedPackEntry,he as materializeDeclaredAssetPacks};
1
+ import{kD as E,w as l,u as y,kE as P,v as b,b3 as T}from"./index-C5tasxXb.js";import{i as x}from"./relative-path-guard-GiM7Lsz8.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 d=".volter/assets.json",k=y({key:l().min(1),license:l().min(1).optional(),sourceHash:l().regex(/^sha256-[a-f0-9]{64}$/,'sourceHash must be "sha256-<64 hex>"').optional(),materializedAt:l().datetime()}).strict(),O=E(l().min(1),k);function z(e){if(!/^[a-f0-9]{64}$/.test(e))throw new Error(`Not a sha256 digest, refusing to record it as a sourceHash: ${e}`);return`sha256-${e}`}function m(e){const t=e.replaceAll("\\","/").replace(/^\.\//,"").replace(/^\/+/,"");if(!t)throw new Error("An asset ledger path cannot be empty.");if(!x(t))throw new Error(`An asset ledger path cannot escape the project: ${e}`);return t}function D(e){return O.parse(e)}function _(e){if(e==null||e.trim()==="")return{};let t;try{t=JSON.parse(e)}catch(s){throw new Error(`${d} is not valid JSON: ${String(s)}`)}return D(t)}function I(e,t,s){const r=m(t),n=k.parse(s),a={...e,[r]:n},i={};for(const u of Object.keys(a).sort())i[u]=a[u];return i}function M(e){const t={};for(const s of Object.keys(e).sort())t[s]=e[s];return`${JSON.stringify(t,null,2)}
2
+ `}function U(e,t,s){const r=globalThis.navigator?.locks;return r?r.request(`volter:${e}:${P(t)}`,s):s()}const H=1e4,N=15;function j(){return globalThis.crypto?.randomUUID?.()??`${Date.now()}-${Math.random()}`}async function R(e,t,s={}){const r=s.staleAfterMs??H,n=s.retryDelayMs??N,a=s.now??Date.now,i=s.sleep??(o=>new Promise(c=>setTimeout(c,o))),u=s.token??j;for(;;){const o=JSON.stringify({at:a(),owner:s.owner??"unknown",token:u()});if(await e.createIfAbsent(o))try{return await t()}finally{await e.removeIfHeldBy(o)}const c=await e.read();if(c!==null){if(a()-B(c)>r){await e.removeIfHeldBy(c);continue}await i(n)}}}function B(e){try{const t=JSON.parse(e);return typeof t.at=="number"?t.at:0}catch{return 0}}function J(){const e=new Map;return(t,s)=>{const n=(e.get(t)??Promise.resolve()).then(s,s),a=n.then(()=>{},()=>{});return e.set(t,a),a.then(()=>{e.get(t)===a&&e.delete(t)}),n}}async function S(e){return await e.exists(d)?_(await e.read(d)):{}}async function F(e,t){await e.write(d,M(t))}const f=`${d}.lock`,C=J(),A=new WeakMap;let $=0;function K(e){const t=A.get(e);if(t!==void 0)return t;$+=1;const s=`${e.id}#${$}`;return A.set(e,s),s}async function W(e,t){const s={key:t.key,...t.license?{license:t.license}:{},...t.sourceSha256?{sourceHash:z(t.sourceSha256)}:{},materializedAt:t.materializedAt??new Date().toISOString()};await C(K(e),()=>R({createIfAbsent:r=>e.writeIfAbsent(f,r),read:async()=>await e.exists(f)?e.read(f):null,removeIfHeldBy:r=>U(e.id,f,async()=>{await e.exists(f)&&await e.read(f)===r&&await e.remove(f)})},async()=>{const r=await S(e);await F(e,I(r,m(t.destPath),s))},{owner:e.id}))}const G=y({key:l().regex(/^[^:]+:.+$/,'An asset key must be "source:id"'),dest:l().min(1),sha256:l().regex(/^[a-f0-9]{64}$/,"A pack entry must pin the sha256 of its bytes as 64 lowercase hex digits")}).strict(),Y=y({packs:E(l().min(1),b(G))}).strict();function q(e){return Y.parse(e)}function V(e){const t=[],s=new Map;for(const[r,n]of Object.entries(e.packs))for(const a of n){const i=s.get(a.dest);if(i!==void 0)throw new Error(`Two packs declare the same destination "${a.dest}": "${i}" and "${r}".`);s.set(a.dest,r),t.push({...a,pack:r})}return t}const w="asset-manifest.json",v="https://volter-asset-library.aaron-0ed.workers.dev";function L(e){return(e.baseUrl??v).replace(/\/+$/,"")}function Q(e){return e.signal?{signal:e.signal}:{}}async function X(e,t={}){const s=L(t),r=await fetch(`${s}/v1/assets/${encodeURIComponent(e)}`,Q(t));if(!r.ok)return null;const n=await r.json();return!n||typeof n!="object"||!Array.isArray(n.files)?null:n}function Z(e,t,s,r){return`${L(e?{baseUrl:e}:{})}/v1/assets/${encodeURIComponent(t)}/files/${s}`}async function he(e,t={}){const s=await ee(e),r={declared:s.length,materialized:[],alreadyPresent:[],failed:[]};if(s.length===0)return r;const n=await S(e);for(const a of s){if(t.signal?.aborted)break;if(n[m(a.dest)]&&await e.exists(a.dest)){r.alreadyPresent.push(a),t.onProgress?.(a,"already-present");continue}try{await te(e,a,t),r.materialized.push(a),t.onProgress?.(a,"materialized")}catch(i){r.failed.push({entry:a,reason:i instanceof Error?i.message:String(i)}),t.onProgress?.(a,"failed")}}return r}async function ee(e){if(!await e.exists(w))return[];const t=await e.read(w);let s;try{s=JSON.parse(t)}catch(r){throw new Error(`${w} is not valid JSON: ${r instanceof Error?r.message:String(r)}`)}return V(q(s))}async function te(e,t,s){const r=await se(t,s);await e.write(t.dest,r.bytes),await W(e,{destPath:t.dest,key:t.key,license:r.license,sourceSha256:t.sha256})}async function se(e,t={}){const s=e.key.indexOf(":");if(s<0)throw new Error(`Malformed asset key "${e.key}" (expected "source:id").`);const r=e.key.slice(0,s),n=e.key.slice(s+1);if(r!=="local")throw new Error(`Asset key "${e.key}": only the "local" (cloud-hosted) source can be materialized from the cloud worker.`);const a=t.baseUrl??v,i=t.signal?{baseUrl:a,signal:t.signal}:{baseUrl:a},u=await X(n,i);if(!u)throw new Error(`"${e.key}" is not hosted by the cloud asset library.`);const o=u.files[0];if(!o)throw new Error(`"${e.key}" has no files in the cloud library.`);if(o.dependencies.length>0)throw new Error(`"${e.key}" has ${o.dependencies.length} dependency file(s) — a pack entry names exactly one destination file.`);if(o.main.sha256!==e.sha256)throw new Error(`"${e.key}" → ${e.dest}: the cloud library reports sha256:${o.main.sha256} but ${w} pins sha256:${e.sha256}. Nothing was fetched or written; the pin is only re-cut by a reviewed change to the declaration.`);const c=Z(a,n,0),h=await fetch(c,t.signal?{signal:t.signal}:{});if(!h.ok)throw new Error(`${c} returned ${h.status} ${h.statusText}.`);const p=new Uint8Array(await h.arrayBuffer()),g=await T(p);if(g!==e.sha256)throw new Error(`"${e.key}" → ${e.dest}: ${c} delivered sha256:${g} but the declaration pins sha256:${e.sha256}. Nothing was written.`);return{bytes:p,license:u.license}}export{w as ASSET_MANIFEST_PATH,se as fetchVerifiedPackEntry,he as materializeDeclaredAssetPacks};
@@ -0,0 +1,6 @@
1
+ import{S as f}from"./three.module-BLhyNg0e.js";import{au as m,dw as g,ff as v,ae as y}from"./three.core-3arARmh6.js";const o="volterIblWorldPosition";function C(){return f.envmap_physical_pars_fragment.replaceAll("getIBLIrradiance","getBaseIBLIrradiance").replaceAll("getIBLRadiance","getBaseIBLRadiance")}function I(e){return(Array.isArray(e.material)?e.material:[e.material]).filter(t=>!!t.isMeshStandardMaterial)}function w(){const e=new m(new Uint8Array(1024),16,16,g,v);return e.mapping=y,e.needsUpdate=!0,e}function x(e,n){const t=e.onBeforeCompile,i=e.customProgramCacheKey;let a=null,l=!1;const c=(r,d)=>{t.call(e,r,d);const u=n.fragment();if(u===null)return;const p=_(r);if(p!==null){l||(l=!0,console.warn(`[overrideMaterialIbl] material "${e.name}" keeps three's own lighting: its program no longer contains ${p}, which an earlier onBeforeCompile replaced.`));return}r.vertexShader=`varying vec3 ${o};
2
+ ${r.vertexShader.replace("#include <worldpos_vertex>",`#include <worldpos_vertex>
3
+ #if defined(USE_ENVMAP)
4
+ ${o} = worldPosition.xyz;
5
+ #endif`)}`,r.fragmentShader=`varying vec3 ${o};
6
+ ${r.fragmentShader.replace("#include <envmap_physical_pars_fragment>",u)}`,a=r,n.onCompile?.(r)},s=()=>`${i.call(e)}|${n.cacheKey()}`;return e.onBeforeCompile=c,e.customProgramCacheKey=s,e.needsUpdate=!0,{material:e,get shader(){return a},restore(){return e.onBeforeCompile!==c||e.customProgramCacheKey!==s?!1:(e.onBeforeCompile=t,e.customProgramCacheKey=i,e.needsUpdate=!0,a=null,!0)}}}function _(e){return e.vertexShader.includes("#include <worldpos_vertex>")?e.fragmentShader.includes("#include <envmap_physical_pars_fragment>")?null:"#include <envmap_physical_pars_fragment>":"#include <worldpos_vertex>"}export{o as IBL_WORLD_POSITION,C as baseIblFunctions,w as createIblSentinelTexture,x as overrideMaterialIbl,I as standardMaterialsOf};