@fps-games/editor 0.2.1-beta.1 → 0.2.1-beta.3

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 (335) hide show
  1. package/dist/agent-bridge/capabilities/ui-regions.d.ts.map +1 -1
  2. package/dist/agent-bridge/capabilities/ui-regions.js +16 -0
  3. package/dist/agent-bridge/capabilities/ui-regions.js.map +1 -1
  4. package/dist/build-info.json +46 -46
  5. package/dist/internal/material-preview.d.ts +22 -0
  6. package/dist/internal/material-preview.d.ts.map +1 -0
  7. package/dist/internal/material-preview.js +186 -0
  8. package/dist/internal/material-preview.js.map +1 -0
  9. package/dist/internal/project-model-preview.d.ts +4 -0
  10. package/dist/internal/project-model-preview.d.ts.map +1 -0
  11. package/dist/internal/project-model-preview.js +359 -0
  12. package/dist/internal/project-model-preview.js.map +1 -0
  13. package/dist/local-editor-agent-context.d.ts +12 -1
  14. package/dist/local-editor-agent-context.d.ts.map +1 -1
  15. package/dist/local-editor-agent-context.js +47 -0
  16. package/dist/local-editor-agent-context.js.map +1 -1
  17. package/dist/local-editor-harness.d.ts +15 -2
  18. package/dist/local-editor-harness.d.ts.map +1 -1
  19. package/dist/local-editor-harness.js +326 -28
  20. package/dist/local-editor-harness.js.map +1 -1
  21. package/dist/local-editor-tools.d.ts +1 -0
  22. package/dist/local-editor-tools.d.ts.map +1 -1
  23. package/dist/local-editor-tools.js +3 -0
  24. package/dist/local-editor-tools.js.map +1 -1
  25. package/dist/playable-babylon-rendering.d.ts +8 -7
  26. package/dist/playable-babylon-rendering.d.ts.map +1 -1
  27. package/dist/playable-babylon-rendering.js +77 -32
  28. package/dist/playable-babylon-rendering.js.map +1 -1
  29. package/dist/playable-local-editor-host.d.ts +4 -0
  30. package/dist/playable-local-editor-host.d.ts.map +1 -1
  31. package/dist/playable-local-editor-host.js +27 -0
  32. package/dist/playable-local-editor-host.js.map +1 -1
  33. package/dist/playable-product-projection-preview.d.ts +2 -0
  34. package/dist/playable-product-projection-preview.d.ts.map +1 -1
  35. package/dist/playable-product-projection-preview.js +7 -4
  36. package/dist/playable-product-projection-preview.js.map +1 -1
  37. package/dist/playable-product-scene-capabilities.d.ts.map +1 -1
  38. package/dist/playable-product-scene-capabilities.js +9 -3
  39. package/dist/playable-product-scene-capabilities.js.map +1 -1
  40. package/dist/playable-sdk.d.ts +1 -1
  41. package/dist/playable-sdk.d.ts.map +1 -1
  42. package/dist/playable-sdk.js +1 -1
  43. package/dist/playable-sdk.js.map +1 -1
  44. package/dist/playable-standard-project.d.ts +0 -1
  45. package/dist/playable-standard-project.d.ts.map +1 -1
  46. package/dist/playable-standard-project.js +17 -5
  47. package/dist/playable-standard-project.js.map +1 -1
  48. package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.d.ts +4 -2
  49. package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.d.ts.map +1 -1
  50. package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.js +301 -121
  51. package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.js.map +1 -1
  52. package/node_modules/@fps-games/babylon-renderer/dist/environment/profile.js +5 -4
  53. package/node_modules/@fps-games/babylon-renderer/dist/environment/profile.js.map +1 -1
  54. package/node_modules/@fps-games/babylon-renderer/dist/environment/types.d.ts +4 -4
  55. package/node_modules/@fps-games/babylon-renderer/dist/environment/types.d.ts.map +1 -1
  56. package/node_modules/@fps-games/babylon-renderer/dist/environment/types.js +1 -1
  57. package/node_modules/@fps-games/babylon-renderer/dist/environment/types.js.map +1 -1
  58. package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.d.ts +2 -0
  59. package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.d.ts.map +1 -1
  60. package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.js +12 -1
  61. package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.js.map +1 -1
  62. package/node_modules/@fps-games/babylon-renderer/dist/plugin.d.ts +6 -3
  63. package/node_modules/@fps-games/babylon-renderer/dist/plugin.d.ts.map +1 -1
  64. package/node_modules/@fps-games/babylon-renderer/dist/plugin.js +100 -39
  65. package/node_modules/@fps-games/babylon-renderer/dist/plugin.js.map +1 -1
  66. package/node_modules/@fps-games/babylon-renderer/dist/reference.d.ts +1 -3
  67. package/node_modules/@fps-games/babylon-renderer/dist/reference.d.ts.map +1 -1
  68. package/node_modules/@fps-games/babylon-renderer/dist/reference.js.map +1 -1
  69. package/node_modules/@fps-games/babylon-renderer/package.json +11 -8
  70. package/node_modules/@fps-games/editor-babylon/dist/marker-overlay.js +24 -0
  71. package/node_modules/@fps-games/editor-babylon/dist/marker-overlay.js.map +1 -1
  72. package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +10 -1
  73. package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
  74. package/node_modules/@fps-games/editor-babylon/dist/projection.js +96 -1
  75. package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
  76. package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.d.ts.map +1 -1
  77. package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.js +85 -22
  78. package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.js.map +1 -1
  79. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts +2 -0
  80. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts.map +1 -1
  81. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js +150 -4
  82. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js.map +1 -1
  83. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts +1 -0
  84. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -1
  85. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +249 -15
  86. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -1
  87. package/node_modules/@fps-games/editor-babylon/dist/types.d.ts +1 -1
  88. package/node_modules/@fps-games/editor-babylon/dist/types.d.ts.map +1 -1
  89. package/node_modules/@fps-games/editor-babylon/dist/types.js.map +1 -1
  90. package/node_modules/@fps-games/editor-babylon/package.json +6 -6
  91. package/node_modules/@fps-games/editor-browser/dist/index.d.ts +5 -0
  92. package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
  93. package/node_modules/@fps-games/editor-browser/dist/index.js +3 -0
  94. package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
  95. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.d.ts +35 -0
  96. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.d.ts.map +1 -0
  97. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.js +136 -0
  98. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.js.map +1 -0
  99. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.d.ts +46 -0
  100. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.d.ts.map +1 -0
  101. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.js +283 -0
  102. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.js.map +1 -0
  103. package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.d.ts +12 -0
  104. package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.d.ts.map +1 -0
  105. package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.js +67 -0
  106. package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.js.map +1 -0
  107. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.d.ts +6 -0
  108. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.d.ts.map +1 -0
  109. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.js +9 -0
  110. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.js.map +1 -0
  111. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.d.ts +7 -0
  112. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.d.ts.map +1 -0
  113. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.js +20 -0
  114. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.js.map +1 -0
  115. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.d.ts +9 -0
  116. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.d.ts.map +1 -0
  117. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.js +219 -0
  118. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.js.map +1 -0
  119. package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.d.ts +14 -0
  120. package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.d.ts.map +1 -0
  121. package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.js +42 -0
  122. package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.js.map +1 -0
  123. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.d.ts.map +1 -1
  124. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.js +2 -0
  125. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.js.map +1 -1
  126. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.d.ts +27 -0
  127. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.d.ts.map +1 -0
  128. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.js +288 -0
  129. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.js.map +1 -0
  130. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts +1 -1
  131. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts.map +1 -1
  132. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js +29 -0
  133. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js.map +1 -1
  134. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts +20 -1
  135. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -1
  136. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +321 -60
  137. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -1
  138. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.d.ts +2 -1
  139. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.d.ts.map +1 -1
  140. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.js +4 -2
  141. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.js.map +1 -1
  142. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +63 -3
  143. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
  144. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.js.map +1 -1
  145. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.d.ts +9 -0
  146. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.d.ts.map +1 -1
  147. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js +88 -16
  148. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js.map +1 -1
  149. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +2 -1
  150. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
  151. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +1463 -356
  152. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
  153. package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.d.ts +13 -0
  154. package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.d.ts.map +1 -0
  155. package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.js +15 -0
  156. package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.js.map +1 -0
  157. package/node_modules/@fps-games/editor-browser/package.json +7 -7
  158. package/node_modules/@fps-games/editor-core/dist/editor-tools.d.ts +1 -0
  159. package/node_modules/@fps-games/editor-core/dist/editor-tools.d.ts.map +1 -1
  160. package/node_modules/@fps-games/editor-core/dist/editor-tools.js +3 -1
  161. package/node_modules/@fps-games/editor-core/dist/editor-tools.js.map +1 -1
  162. package/node_modules/@fps-games/editor-core/dist/viewport-tools.d.ts +11 -2
  163. package/node_modules/@fps-games/editor-core/dist/viewport-tools.d.ts.map +1 -1
  164. package/node_modules/@fps-games/editor-core/dist/viewport-tools.js +12 -1
  165. package/node_modules/@fps-games/editor-core/dist/viewport-tools.js.map +1 -1
  166. package/node_modules/@fps-games/editor-core/package.json +6 -6
  167. package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
  168. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.d.ts.map +1 -1
  169. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.js +10 -3
  170. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.js.map +1 -1
  171. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.d.ts +2 -1
  172. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.d.ts.map +1 -1
  173. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.js +1 -1
  174. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.js.map +1 -1
  175. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.d.ts +1 -0
  176. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.d.ts.map +1 -1
  177. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.js +5 -0
  178. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.js.map +1 -1
  179. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.d.ts +1 -1
  180. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.d.ts.map +1 -1
  181. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.js +1 -1
  182. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.js.map +1 -1
  183. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.d.ts.map +1 -1
  184. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.js +15 -1
  185. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.js.map +1 -1
  186. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.d.ts.map +1 -1
  187. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.js +3 -0
  188. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.js.map +1 -1
  189. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.d.ts +6 -1
  190. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.d.ts.map +1 -1
  191. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.js.map +1 -1
  192. package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts +1 -0
  193. package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts.map +1 -1
  194. package/node_modules/@fps-games/editor-playable-sdk/dist/index.js +1 -0
  195. package/node_modules/@fps-games/editor-playable-sdk/dist/index.js.map +1 -1
  196. package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.d.ts +1 -1
  197. package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.d.ts.map +1 -1
  198. package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.js +4 -0
  199. package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.js.map +1 -1
  200. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.d.ts +4 -0
  201. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.d.ts.map +1 -1
  202. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.js +10 -1
  203. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.js.map +1 -1
  204. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.d.ts +4 -0
  205. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.d.ts.map +1 -0
  206. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.js +4 -0
  207. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.js.map +1 -0
  208. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.d.ts +4 -0
  209. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.d.ts.map +1 -0
  210. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.js +86 -0
  211. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.js.map +1 -0
  212. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.d.ts +9 -0
  213. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.d.ts.map +1 -0
  214. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.js +76 -0
  215. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.js.map +1 -0
  216. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.d.ts +34 -0
  217. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.d.ts.map +1 -0
  218. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.js +2 -0
  219. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.js.map +1 -0
  220. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.js +4 -4
  221. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.js.map +1 -1
  222. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.d.ts +2 -1
  223. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.d.ts.map +1 -1
  224. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.js.map +1 -1
  225. package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/assets.js +1 -5
  226. package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/assets.js.map +1 -1
  227. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts +4 -0
  228. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts.map +1 -1
  229. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js +40 -0
  230. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js.map +1 -1
  231. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js +53 -0
  232. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js.map +1 -1
  233. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/types.d.ts +2 -0
  234. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/types.d.ts.map +1 -1
  235. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/types.js.map +1 -1
  236. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts +1 -0
  237. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts.map +1 -1
  238. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js +1 -0
  239. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js.map +1 -1
  240. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts +1 -0
  241. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts.map +1 -1
  242. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js +94 -0
  243. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js.map +1 -1
  244. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.d.ts +14 -0
  245. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.d.ts.map +1 -0
  246. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.js +101 -0
  247. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.js.map +1 -0
  248. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.d.ts +23 -0
  249. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.d.ts.map +1 -0
  250. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.js +180 -0
  251. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.js.map +1 -0
  252. package/node_modules/@fps-games/editor-playable-sdk/package.json +6 -6
  253. package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts +23 -3
  254. package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts.map +1 -1
  255. package/node_modules/@fps-games/editor-protocol/dist/agent.js.map +1 -1
  256. package/node_modules/@fps-games/editor-protocol/package.json +2 -2
  257. package/node_modules/@fps-games/editor-tooling/package.json +3 -3
  258. package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.d.ts.map +1 -1
  259. package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.js +103 -10
  260. package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.js.map +1 -1
  261. package/node_modules/@fps-games/editor-ui/package.json +1 -1
  262. package/node_modules/@fps-games/playable-assets/dist/identity.d.ts +1 -0
  263. package/node_modules/@fps-games/playable-assets/dist/identity.d.ts.map +1 -1
  264. package/node_modules/@fps-games/playable-assets/dist/identity.js +1 -1
  265. package/node_modules/@fps-games/playable-assets/dist/identity.js.map +1 -1
  266. package/node_modules/@fps-games/playable-assets/dist/index.d.ts +1 -0
  267. package/node_modules/@fps-games/playable-assets/dist/index.d.ts.map +1 -1
  268. package/node_modules/@fps-games/playable-assets/dist/index.js +1 -0
  269. package/node_modules/@fps-games/playable-assets/dist/index.js.map +1 -1
  270. package/node_modules/@fps-games/playable-assets/dist/resource-resolver.d.ts +46 -0
  271. package/node_modules/@fps-games/playable-assets/dist/resource-resolver.d.ts.map +1 -0
  272. package/node_modules/@fps-games/playable-assets/dist/resource-resolver.js +109 -0
  273. package/node_modules/@fps-games/playable-assets/dist/resource-resolver.js.map +1 -0
  274. package/node_modules/@fps-games/playable-assets/package.json +1 -1
  275. package/node_modules/@fps-games/playable-contracts/package.json +1 -1
  276. package/node_modules/@fps-games/playable-rendering/package.json +2 -2
  277. package/node_modules/@fps-games/playable-runtime/dist/runtime.d.ts.map +1 -1
  278. package/node_modules/@fps-games/playable-runtime/dist/runtime.js +5 -0
  279. package/node_modules/@fps-games/playable-runtime/dist/runtime.js.map +1 -1
  280. package/node_modules/@fps-games/playable-runtime/dist/types.d.ts +2 -0
  281. package/node_modules/@fps-games/playable-runtime/dist/types.d.ts.map +1 -1
  282. package/node_modules/@fps-games/playable-runtime/dist/types.js.map +1 -1
  283. package/node_modules/@fps-games/playable-runtime/package.json +12 -12
  284. package/node_modules/@fps-games/playable-runtime-data/package.json +4 -4
  285. package/node_modules/@fps-games/playable-scene/package.json +2 -2
  286. package/node_modules/@fps-games/plugin-api/package.json +1 -1
  287. package/node_modules/@fps-games/plugin-assets/dist/reference.d.ts.map +1 -1
  288. package/node_modules/@fps-games/plugin-assets/dist/reference.js +11 -4
  289. package/node_modules/@fps-games/plugin-assets/dist/reference.js.map +1 -1
  290. package/node_modules/@fps-games/plugin-assets/dist/renderer.d.ts +8 -0
  291. package/node_modules/@fps-games/plugin-assets/dist/renderer.d.ts.map +1 -0
  292. package/node_modules/@fps-games/plugin-assets/dist/renderer.js +13 -0
  293. package/node_modules/@fps-games/plugin-assets/dist/renderer.js.map +1 -0
  294. package/node_modules/@fps-games/plugin-assets/dist/resources.d.ts +12 -0
  295. package/node_modules/@fps-games/plugin-assets/dist/resources.d.ts.map +1 -0
  296. package/node_modules/@fps-games/plugin-assets/dist/resources.js +8 -0
  297. package/node_modules/@fps-games/plugin-assets/dist/resources.js.map +1 -0
  298. package/node_modules/@fps-games/plugin-assets/dist/runtime.d.ts +2 -1
  299. package/node_modules/@fps-games/plugin-assets/dist/runtime.d.ts.map +1 -1
  300. package/node_modules/@fps-games/plugin-assets/dist/runtime.js +3 -0
  301. package/node_modules/@fps-games/plugin-assets/dist/runtime.js.map +1 -1
  302. package/node_modules/@fps-games/plugin-assets/dist/version.d.ts +1 -1
  303. package/node_modules/@fps-games/plugin-assets/dist/version.js +1 -1
  304. package/node_modules/@fps-games/plugin-assets/dist/version.js.map +1 -1
  305. package/node_modules/@fps-games/plugin-assets/package.json +32 -8
  306. package/node_modules/@fps-games/plugin-hierarchy/dist/version.d.ts +1 -1
  307. package/node_modules/@fps-games/plugin-hierarchy/dist/version.js +1 -1
  308. package/node_modules/@fps-games/plugin-hierarchy/dist/version.js.map +1 -1
  309. package/node_modules/@fps-games/plugin-hierarchy/package.json +5 -5
  310. package/node_modules/@fps-games/plugin-host/package.json +2 -2
  311. package/node_modules/@fps-games/plugin-markers/dist/version.d.ts +1 -1
  312. package/node_modules/@fps-games/plugin-markers/dist/version.js +1 -1
  313. package/node_modules/@fps-games/plugin-markers/dist/version.js.map +1 -1
  314. package/node_modules/@fps-games/plugin-markers/package.json +5 -5
  315. package/node_modules/@fps-games/plugin-materials/dist/version.d.ts +1 -1
  316. package/node_modules/@fps-games/plugin-materials/dist/version.js +1 -1
  317. package/node_modules/@fps-games/plugin-materials/dist/version.js.map +1 -1
  318. package/node_modules/@fps-games/plugin-materials/package.json +5 -5
  319. package/node_modules/@fps-games/plugin-rendering/dist/version.d.ts +1 -1
  320. package/node_modules/@fps-games/plugin-rendering/dist/version.js +1 -1
  321. package/node_modules/@fps-games/plugin-rendering/dist/version.js.map +1 -1
  322. package/node_modules/@fps-games/plugin-rendering/package.json +5 -5
  323. package/node_modules/@fps-games/plugin-scene/dist/version.d.ts +1 -1
  324. package/node_modules/@fps-games/plugin-scene/dist/version.js +1 -1
  325. package/node_modules/@fps-games/plugin-scene/dist/version.js.map +1 -1
  326. package/node_modules/@fps-games/plugin-scene/package.json +5 -5
  327. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.d.ts +1 -1
  328. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js +1 -1
  329. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js.map +1 -1
  330. package/node_modules/@fps-games/plugin-shadow-map-experiment/package.json +5 -5
  331. package/node_modules/@fps-games/plugin-shadows/dist/version.d.ts +1 -1
  332. package/node_modules/@fps-games/plugin-shadows/dist/version.js +1 -1
  333. package/node_modules/@fps-games/plugin-shadows/dist/version.js.map +1 -1
  334. package/node_modules/@fps-games/plugin-shadows/package.json +7 -7
  335. package/package.json +24 -22
@@ -1 +1 @@
1
- {"version":3,"file":"generated-module.js","sourceRoot":"","sources":["../../src/asset-database/generated-module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AASpC,MAAM,UAAU,wCAAwC,CACtD,QAAqD,EACrD,UAAmD,EAAE;IAErD,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,4BAA4B,CAAC;IACxE,MAAM,OAAO,GAAG,QAAQ;SACrB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,+BAA+B,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,YAAY,MAAM,CAAC,GAAG,CAAC;SAC/H,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,MAAM,cAAc,GAAG,QAAQ;SAC5B,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACb,MAAM,MAAM,GAAG;YACb,SAAS,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;YACrC,YAAY,IAAI,CAAC,SAAS,CAAC,KAAK,C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AAC,OAAO,CAAC;SAChC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;SACvF,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO;QACL,gCAAgC,WAAW,GAAG;QAC9C,yBAAyB;QACzB,EAAE;QACF,OAAO;QACP,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;QACjB,kFAAkF;QAClF,EAAE;QACF,+CAA+C;QAC/C,iBAAiB;QACjB,oBAAoB;QACpB,oCAAoC;QACpC,wBAAwB;QACxB,gBAAgB;QAChB,yBAAyB;QACzB,8BAA8B;QAC9B,qBAAqB;QACrB,sBAAsB;QACtB,wBAAwB;QACxB,yBAAyB;QACzB,wBAAwB;QACxB,0BAA0B;QAC1B,uCAAuC;QACvC,yBAAyB;QACzB,sBAAsB;QACtB,mFAAmF;QACnF,uCAAuC;QACvC,uBAAuB;QACvB,uBAAuB;QACvB,GAAG;QACH,EAAE;QACF,sFAAsF;QACtF,cAAc;QACd,IAAI;QACJ,EAAE;QACF,4DAA4D;QAC5D,4FAA4F;QAC5F,8BAA8B;QAC9B,EAAE;QACF,kEAAkE;QAClE,0IAA0I;QAC1I,8BAA8B;QAC9B,EAAE;QACF,oEAAoE;QACpE,4IAA4I;QAC5I,8BAA8B;QAC9B,EAAE;QACF,kEAAkE;QAClE,0IAA0I;QAC1I,8BAA8B;QAC9B,EAAE;QACF,kEAAkE;QAClE,0IAA0I;QAC1I,8BAA8B;QAC9B,EAAE;QACF,4BAA4B;QAC5B,SAAS;QACT,8CAA8C;QAC9C,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC","sourcesContent":["import {\n toPlayableEditorAssetImportName,\n} from '@fps-games/playable-assets';\nimport type {\n PlayableEditorAssetRegistryEntry,\n} from './types';\n\nexport interface PlayableEditorAssetCatalogModuleOptions {\n generatedBy?: string;\n}\n\nexport function generatePlayableEditorAssetCatalogModule(\n manifest: readonly PlayableEditorAssetRegistryEntry[],\n options: PlayableEditorAssetCatalogModuleOptions = {},\n): string {\n const generatedBy = options.generatedBy ?? 'scripts/register-asset.mjs';\n const imports = manifest\n .map((entry) => `import ${toPlayableEditorAssetImportName(entry.assetId)} from ${JSON.stringify(`${entry.relativePath}?url`)};`)\n .join('\\n');\n const catalogEntries = manifest\n .map((entry) => {\n const pieces = [\n `guid: ${JSON.stringify(entry.guid)}`,\n `assetId: ${JSON.stringify(entry.assetId)}`,\n `kind: ${JSON.stringify(entry.kind)}`,\n `displayName: ${JSON.stringify(entry.displayName)}`,\n `url: ${toPlayableEditorAssetImportName(entry.assetId)}`,\n `relativePath: ${JSON.stringify(entry.relativePath)}`,\n entry.originalFileName ? `originalFileName: ${JSON.stringify(entry.originalFileName)}` : '',\n entry.codeKey ? `codeKey: ${JSON.stringify(entry.codeKey)}` : '',\n entry.category ? `category: ${JSON.stringify(entry.category)}` : '',\n typeof entry.placeable === 'boolean' ? `placeable: ${JSON.stringify(entry.placeable)}` : '',\n typeof entry.warmupCount === 'number' ? `warmupCount: ${JSON.stringify(entry.warmupCount)}` : '',\n typeof entry.singleton === 'boolean' ? `singleton: ${JSON.stringify(entry.singleton)}` : '',\n entry.materialMode ? `materialMode: ${JSON.stringify(entry.materialMode)}` : '',\n entry.defaults ? `defaults: ${JSON.stringify(entry.defaults)}` : '',\n entry.contentHash ? `contentHash: ${JSON.stringify(entry.contentHash)}` : '',\n typeof entry.byteSize === 'number' ? `byteSize: ${JSON.stringify(entry.byteSize)}` : '',\n entry.external ? `external: ${JSON.stringify(entry.external)}` : '',\n entry.metadata ? `metadata: ${JSON.stringify(entry.metadata)}` : '',\n entry.createdAt ? `createdAt: ${JSON.stringify(entry.createdAt)}` : '',\n entry.updatedAt ? `updatedAt: ${JSON.stringify(entry.updatedAt)}` : '',\n ].filter(Boolean).join(', ');\n return ` ${JSON.stringify(entry.assetId)}: { ${pieces} },`;\n })\n .join('\\n');\n const idEntries = manifest\n .filter((entry) => entry.codeKey)\n .map((entry) => ` ${JSON.stringify(entry.codeKey)}: ${JSON.stringify(entry.assetId)},`)\n .join('\\n');\n\n return [\n `// This file is generated by ${generatedBy}.`,\n '// Do not edit by hand.',\n '',\n imports,\n imports ? '' : '',\n 'export type GeneratedAssetCatalogKind = \"model\" | \"texture\" | \"image\" | \"sound\";',\n '',\n 'export interface GeneratedAssetCatalogEntry {',\n ' guid: string;',\n ' assetId: string;',\n ' kind: GeneratedAssetCatalogKind;',\n ' displayName: string;',\n ' url: string;',\n ' relativePath: string;',\n ' originalFileName?: string;',\n ' codeKey?: string;',\n ' category?: string;',\n ' placeable?: boolean;',\n ' warmupCount?: number;',\n ' singleton?: boolean;',\n ' materialMode?: string;',\n ' defaults?: Record<string, unknown>;',\n ' contentHash?: string;',\n ' byteSize?: number;',\n ' external?: { platformAssetId?: string; assetPath?: string; assetUrl?: string };',\n ' metadata?: Record<string, unknown>;',\n ' createdAt?: string;',\n ' updatedAt?: string;',\n '}',\n '',\n 'export const GENERATED_ASSET_CATALOG: Record<string, GeneratedAssetCatalogEntry> = {',\n catalogEntries,\n '};',\n '',\n 'export const GENERATED_ASSET_URL_MAP = Object.fromEntries(',\n ' Object.entries(GENERATED_ASSET_CATALOG).map(([assetId, entry]) => [assetId, entry.url]),',\n ') as Record<string, string>;',\n '',\n 'export const GENERATED_MODEL_ASSET_URL_MAP = Object.fromEntries(',\n ' Object.entries(GENERATED_ASSET_CATALOG).filter(([, entry]) => entry.kind === \"model\").map(([assetId, entry]) => [assetId, entry.url]),',\n ') as Record<string, string>;',\n '',\n 'export const GENERATED_TEXTURE_ASSET_URL_MAP = Object.fromEntries(',\n ' Object.entries(GENERATED_ASSET_CATALOG).filter(([, entry]) => entry.kind === \"texture\").map(([assetId, entry]) => [assetId, entry.url]),',\n ') as Record<string, string>;',\n '',\n 'export const GENERATED_IMAGE_ASSET_URL_MAP = Object.fromEntries(',\n ' Object.entries(GENERATED_ASSET_CATALOG).filter(([, entry]) => entry.kind === \"image\").map(([assetId, entry]) => [assetId, entry.url]),',\n ') as Record<string, string>;',\n '',\n 'export const GENERATED_SOUND_ASSET_URL_MAP = Object.fromEntries(',\n ' Object.entries(GENERATED_ASSET_CATALOG).filter(([, entry]) => entry.kind === \"sound\").map(([assetId, entry]) => [assetId, entry.url]),',\n ') as Record<string, string>;',\n '',\n 'export const ASSET_IDS = {',\n idEntries,\n '} as const satisfies Record<string, string>;',\n '',\n ].join('\\n');\n}\n"]}
1
+ {"version":3,"file":"generated-module.js","sourceRoot":"","sources":["../../src/asset-database/generated-module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,8BAA8B,EAC9B,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AASpC,MAAM,UAAU,wCAAwC,CACtD,QAAqD,EACrD,UAAmD,EAAE;IAErD,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,4BAA4B,CAAC;IACxE,MAAM,OAAO,GAAG,QAAQ;SACrB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,+BAA+B,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,YAAY,MAAM,CAAC,GAAG,CAAC;SAC/H,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,MAAM,cAAc,GAAG,QAAQ;SAC5B,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACb,MAAM,MAAM,GAAG,sBAAsB,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC1D,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,wDAAwD,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QACtG,IAAI,CAAC,8BAA8B,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5C,MAAM,IAAI,KAAK,C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AC1I,8BAA8B;QAC9B,EAAE;QACF,kEAAkE;QAClE,0IAA0I;QAC1I,8BAA8B;QAC9B,EAAE;QACF,4BAA4B;QAC5B,SAAS;QACT,8CAA8C;KAC/C,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACtB,CAAC","sourcesContent":["import {\n getPlayableAssetFormat,\n isPlayableAssetFormatSupported,\n toPlayableEditorAssetImportName,\n} from '@fps-games/playable-assets';\nimport type {\n PlayableEditorAssetRegistryEntry,\n} from './types';\n\nexport interface PlayableEditorAssetCatalogModuleOptions {\n generatedBy?: string;\n}\n\nexport function generatePlayableEditorAssetCatalogModule(\n manifest: readonly PlayableEditorAssetRegistryEntry[],\n options: PlayableEditorAssetCatalogModuleOptions = {},\n): string {\n const generatedBy = options.generatedBy ?? 'scripts/register-asset.mjs';\n const imports = manifest\n .map((entry) => `import ${toPlayableEditorAssetImportName(entry.assetId)} from ${JSON.stringify(`${entry.relativePath}?url`)};`)\n .join('\\n');\n const catalogEntries = manifest\n .map((entry) => {\n const format = getPlayableAssetFormat(entry.relativePath);\n if (!format) throw new Error(`Generated asset catalog entry has no file extension: ${entry.assetId}`);\n if (!isPlayableAssetFormatSupported(format)) {\n throw new Error(`Generated asset catalog entry has unsupported format: ${entry.assetId} (${format})`);\n }\n const pieces = [\n `guid: ${JSON.stringify(entry.guid)}`,\n `assetId: ${JSON.stringify(entry.assetId)}`,\n `kind: ${JSON.stringify(entry.kind)}`,\n `displayName: ${JSON.stringify(entry.displayName)}`,\n `url: ${toPlayableEditorAssetImportName(entry.assetId)}`,\n `format: ${JSON.stringify(format)}`,\n `relativePath: ${JSON.stringify(entry.relativePath)}`,\n entry.originalFileName ? `originalFileName: ${JSON.stringify(entry.originalFileName)}` : '',\n entry.codeKey ? `codeKey: ${JSON.stringify(entry.codeKey)}` : '',\n entry.category ? `category: ${JSON.stringify(entry.category)}` : '',\n typeof entry.placeable === 'boolean' ? `placeable: ${JSON.stringify(entry.placeable)}` : '',\n typeof entry.warmupCount === 'number' ? `warmupCount: ${JSON.stringify(entry.warmupCount)}` : '',\n typeof entry.singleton === 'boolean' ? `singleton: ${JSON.stringify(entry.singleton)}` : '',\n entry.materialMode ? `materialMode: ${JSON.stringify(entry.materialMode)}` : '',\n entry.defaults ? `defaults: ${JSON.stringify(entry.defaults)}` : '',\n entry.contentHash ? `contentHash: ${JSON.stringify(entry.contentHash)}` : '',\n typeof entry.byteSize === 'number' ? `byteSize: ${JSON.stringify(entry.byteSize)}` : '',\n entry.external ? `external: ${JSON.stringify(entry.external)}` : '',\n entry.metadata ? `metadata: ${JSON.stringify(entry.metadata)}` : '',\n entry.createdAt ? `createdAt: ${JSON.stringify(entry.createdAt)}` : '',\n entry.updatedAt ? `updatedAt: ${JSON.stringify(entry.updatedAt)}` : '',\n ].filter(Boolean).join(', ');\n return ` ${JSON.stringify(entry.assetId)}: { ${pieces} },`;\n })\n .join('\\n');\n const idEntries = manifest\n .filter((entry) => entry.codeKey)\n .map((entry) => ` ${JSON.stringify(entry.codeKey)}: ${JSON.stringify(entry.assetId)},`)\n .join('\\n');\n\n return [\n `// This file is generated by ${generatedBy}.`,\n '// Do not edit by hand.',\n '',\n imports,\n imports ? '' : '',\n 'export type GeneratedAssetCatalogKind = \"model\" | \"texture\" | \"image\" | \"sound\";',\n '',\n 'export interface GeneratedAssetCatalogEntry {',\n ' guid: string;',\n ' assetId: string;',\n ' kind: GeneratedAssetCatalogKind;',\n ' displayName: string;',\n ' url: string;',\n ' format: `.${string}`;',\n ' relativePath: string;',\n ' originalFileName?: string;',\n ' codeKey?: string;',\n ' category?: string;',\n ' placeable?: boolean;',\n ' warmupCount?: number;',\n ' singleton?: boolean;',\n ' materialMode?: string;',\n ' defaults?: Record<string, unknown>;',\n ' contentHash?: string;',\n ' byteSize?: number;',\n ' external?: { platformAssetId?: string; assetPath?: string; assetUrl?: string };',\n ' metadata?: Record<string, unknown>;',\n ' createdAt?: string;',\n ' updatedAt?: string;',\n '}',\n '',\n 'export const GENERATED_ASSET_CATALOG: Record<string, GeneratedAssetCatalogEntry> = {',\n catalogEntries,\n '};',\n '',\n 'export const GENERATED_ASSET_URL_MAP = Object.fromEntries(',\n ' Object.entries(GENERATED_ASSET_CATALOG).map(([assetId, entry]) => [assetId, entry.url]),',\n ') as Record<string, string>;',\n '',\n 'export const GENERATED_MODEL_ASSET_URL_MAP = Object.fromEntries(',\n ' Object.entries(GENERATED_ASSET_CATALOG).filter(([, entry]) => entry.kind === \"model\").map(([assetId, entry]) => [assetId, entry.url]),',\n ') as Record<string, string>;',\n '',\n 'export const GENERATED_TEXTURE_ASSET_URL_MAP = Object.fromEntries(',\n ' Object.entries(GENERATED_ASSET_CATALOG).filter(([, entry]) => entry.kind === \"texture\").map(([assetId, entry]) => [assetId, entry.url]),',\n ') as Record<string, string>;',\n '',\n 'export const GENERATED_IMAGE_ASSET_URL_MAP = Object.fromEntries(',\n ' Object.entries(GENERATED_ASSET_CATALOG).filter(([, entry]) => entry.kind === \"image\").map(([assetId, entry]) => [assetId, entry.url]),',\n ') as Record<string, string>;',\n '',\n 'export const GENERATED_SOUND_ASSET_URL_MAP = Object.fromEntries(',\n ' Object.entries(GENERATED_ASSET_CATALOG).filter(([, entry]) => entry.kind === \"sound\").map(([assetId, entry]) => [assetId, entry.url]),',\n ') as Record<string, string>;',\n '',\n 'export const ASSET_IDS = {',\n idEntries,\n '} as const satisfies Record<string, string>;',\n ].join('\\n') + '\\n';\n}\n"]}
@@ -1,6 +1,7 @@
1
1
  export type { PlayableEditorAssetCatalogEntry, PlayableEditorAssetDatabaseCommands, PlayableEditorAssetDatabaseConfig, PlayableEditorAssetDatabasePaths, PlayableEditorAssetDatabasePublicUrlInput, PlayableEditorAssetDatabaseRelativePathInput, PlayableEditorAssetKind, } from './types';
2
2
  export { definePlayableEditorAssetDatabaseConfig, } from './config';
3
- export { PLAYABLE_EDITOR_ASSET_CATALOG_KINDS, PLAYABLE_EDITOR_DEFAULT_EXTENSIONS, PLAYABLE_EDITOR_ENVIRONMENT_TEXTURE_EXTENSIONS, PLAYABLE_EDITOR_IMAGE_EXTENSIONS, PLAYABLE_EDITOR_MODEL_EXTENSIONS, PLAYABLE_EDITOR_SOUND_EXTENSIONS, PLAYABLE_EDITOR_TEXTURE_EXTENSIONS, createPlayableEditorAssetGuid, createPlayableEditorAssetId, getPlayableEditorAssetKindExtensions, guidToPlayableEditorAssetStableToken, normalizePlayableEditorAssetCodeKey, normalizePlayableEditorAssetDisplayName, normalizePlayableEditorAssetKind, stripKnownPlayableEditorAssetExtension, toPlayableEditorAssetImportName, } from '@fps-games/playable-assets';
3
+ export { PLAYABLE_EDITOR_ASSET_CATALOG_KINDS, PLAYABLE_EDITOR_DEFAULT_EXTENSIONS, PLAYABLE_EDITOR_ENVIRONMENT_TEXTURE_EXTENSIONS, PLAYABLE_EDITOR_IMAGE_EXTENSIONS, PLAYABLE_EDITOR_MODEL_EXTENSIONS, PLAYABLE_EDITOR_SOUND_EXTENSIONS, PLAYABLE_EDITOR_TEXTURE_EXTENSIONS, createPlayableAssetResourceResolver, createPlayableEditorAssetGuid, createPlayableEditorAssetId, getPlayableEditorAssetKindExtensions, guidToPlayableEditorAssetStableToken, normalizePlayableEditorAssetCodeKey, normalizePlayableEditorAssetDisplayName, normalizePlayableEditorAssetKind, getPlayableAssetFormat, getPlayableAssetResourceTransport, isPlayableAssetFormatSupported, stripKnownPlayableEditorAssetExtension, toPlayableEditorAssetImportName, } from '@fps-games/playable-assets';
4
+ export type { PlayableAssetFormat, PlayableAssetResourceReference, PlayableAssetResourceResolution, PlayableAssetResourceResolutionCode, PlayableAssetResourceResolutionDiagnostic, PlayableAssetResourceResolver, PlayableAssetResourceTransport, PlayableGeneratedAssetCatalogEntry, PlayableResolvedAssetResource, } from '@fps-games/playable-assets';
4
5
  export type { PlayableEditorAssetBuildInput, PlayableEditorAssetBuildResult, PlayableEditorAssetCatalogSnapshot, PlayableEditorAssetIdentityInput, PlayableEditorManagedAssetCoreRules, PlayableEditorManagedAssetErrorCodes, PlayableEditorManagedAssetExternalRef, PlayableEditorManagedAssetMetadataRule, PlayableEditorManagedAssetScale3D, PlayableEditorAssetRegistrationPayload, PlayableEditorAssetRegistrationPlanCore, PlayableEditorAssetRegistrationPlanInput, PlayableEditorAssetRegistrationPayloadPathInput, PlayableEditorAssetTransportCommand, PlayableEditorAssetTransportPlan, PlayableEditorAssetTransportWrite, PlayableEditorAssetUnregistrationPlanCore, PlayableEditorAssetUnregistrationPlanInput, PlayableEditorAssetUnregistrationPayloadPathInput, PlayableEditorManagedAssetKind, PlayableEditorManagedSceneAsset, PlayableEditorSceneAssetDefaults, PlayableEditorSceneAssetMaterialMode, } from './manager-core';
5
6
  export { PlayableEditorManagedAssetError, buildPlayableEditorManagedAssetArgs, createPlayableEditorManagedAssetGuid, createPlayableEditorManagedAssetId, createPlayableEditorManagedSceneAsset, guidToPlayableEditorManagedAssetStableToken, planPlayableEditorAssetRegistrationCore, planPlayableEditorAssetUnregistrationCore, readPlayableEditorManagedAssetScale, resolvePlayableEditorAssetIdentity, sanitizePlayableEditorManagedAssetName, } from './manager-core';
6
7
  export { createPlayableEditorManagedAssetFacade, type PlayableEditorManagedAssetFacade, type PlayableEditorManagedAssetFacadeOptions, type PlayableEditorManagedAssetReference, } from './managed-facade';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/asset-database/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,+BAA+B,EAC/B,mCAAmC,EACnC,iCAAiC,EACjC,gCAAgC,EAChC,yCAAyC,EACzC,4CAA4C,EAC5C,uBAAuB,GACxB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,uCAAuC,GACxC,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,mCAAmC,EACnC,kCAAkC,EAClC,8CAA8C,EAC9C,gCAAgC,EAChC,gCAAgC,EAChC,gCAAgC,EAChC,kCAAkC,EAClC,6BAA6B,EAC7B,2BAA2B,EAC3B,oCAAoC,EACpC,oCAAoC,EACpC,mCAAmC,EACnC,uCAAuC,EACvC,gCAAgC,EAChC,sCAAsC,EACtC,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,EAClC,gCAAgC,EAChC,mCAAmC,EACnC,oCAAoC,EACpC,qCAAqC,EACrC,sCAAsC,EACtC,iCAAiC,EACjC,sCAAsC,EACtC,uCAAuC,EACvC,wCAAwC,EACxC,+CAA+C,EAC/C,mCAAmC,EACnC,gCAAgC,EAChC,iCAAiC,EACjC,yCAAyC,EACzC,0CAA0C,EAC1C,iDAAiD,EACjD,8BAA8B,EAC9B,+BAA+B,EAC/B,gCAAgC,EAChC,oCAAoC,GACrC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,+BAA+B,EAC/B,mCAAmC,EACnC,oCAAoC,EACpC,kCAAkC,EAClC,qCAAqC,EACrC,2CAA2C,EAC3C,uCAAuC,EACvC,yCAAyC,EACzC,mCAAmC,EACnC,kCAAkC,EAClC,sCAAsC,GACvC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,sCAAsC,EACtC,KAAK,gCAAgC,EACrC,KAAK,uCAAuC,EAC5C,KAAK,mCAAmC,GACzC,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/asset-database/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,+BAA+B,EAC/B,mCAAmC,EACnC,iCAAiC,EACjC,gCAAgC,EAChC,yCAAyC,EACzC,4CAA4C,EAC5C,uBAAuB,GACxB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,uCAAuC,GACxC,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,mCAAmC,EACnC,kCAAkC,EAClC,8CAA8C,EAC9C,gCAAgC,EAChC,gCAAgC,EAChC,gCAAgC,EAChC,kCAAkC,EAClC,mCAAmC,EACnC,6BAA6B,EAC7B,2BAA2B,EAC3B,oCAAoC,EACpC,oCAAoC,EACpC,mCAAmC,EACnC,uCAAuC,EACvC,gCAAgC,EAChC,sBAAsB,EACtB,iCAAiC,EACjC,8BAA8B,EAC9B,sCAAsC,EACtC,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,mBAAmB,EACnB,8BAA8B,EAC9B,+BAA+B,EAC/B,mCAAmC,EACnC,yCAAyC,EACzC,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,EAClC,6BAA6B,GAC9B,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,EAClC,gCAAgC,EAChC,mCAAmC,EACnC,oCAAoC,EACpC,qCAAqC,EACrC,sCAAsC,EACtC,iCAAiC,EACjC,sCAAsC,EACtC,uCAAuC,EACvC,wCAAwC,EACxC,+CAA+C,EAC/C,mCAAmC,EACnC,gCAAgC,EAChC,iCAAiC,EACjC,yCAAyC,EACzC,0CAA0C,EAC1C,iDAAiD,EACjD,8BAA8B,EAC9B,+BAA+B,EAC/B,gCAAgC,EAChC,oCAAoC,GACrC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,+BAA+B,EAC/B,mCAAmC,EACnC,oCAAoC,EACpC,kCAAkC,EAClC,qCAAqC,EACrC,2CAA2C,EAC3C,uCAAuC,EACvC,yCAAyC,EACzC,mCAAmC,EACnC,kCAAkC,EAClC,sCAAsC,GACvC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,sCAAsC,EACtC,KAAK,gCAAgC,EACrC,KAAK,uCAAuC,EAC5C,KAAK,mCAAmC,GACzC,MAAM,kBAAkB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export { definePlayableEditorAssetDatabaseConfig, } from './config.js';
2
- export { PLAYABLE_EDITOR_ASSET_CATALOG_KINDS, PLAYABLE_EDITOR_DEFAULT_EXTENSIONS, PLAYABLE_EDITOR_ENVIRONMENT_TEXTURE_EXTENSIONS, PLAYABLE_EDITOR_IMAGE_EXTENSIONS, PLAYABLE_EDITOR_MODEL_EXTENSIONS, PLAYABLE_EDITOR_SOUND_EXTENSIONS, PLAYABLE_EDITOR_TEXTURE_EXTENSIONS, createPlayableEditorAssetGuid, createPlayableEditorAssetId, getPlayableEditorAssetKindExtensions, guidToPlayableEditorAssetStableToken, normalizePlayableEditorAssetCodeKey, normalizePlayableEditorAssetDisplayName, normalizePlayableEditorAssetKind, stripKnownPlayableEditorAssetExtension, toPlayableEditorAssetImportName, } from '@fps-games/playable-assets';
2
+ export { PLAYABLE_EDITOR_ASSET_CATALOG_KINDS, PLAYABLE_EDITOR_DEFAULT_EXTENSIONS, PLAYABLE_EDITOR_ENVIRONMENT_TEXTURE_EXTENSIONS, PLAYABLE_EDITOR_IMAGE_EXTENSIONS, PLAYABLE_EDITOR_MODEL_EXTENSIONS, PLAYABLE_EDITOR_SOUND_EXTENSIONS, PLAYABLE_EDITOR_TEXTURE_EXTENSIONS, createPlayableAssetResourceResolver, createPlayableEditorAssetGuid, createPlayableEditorAssetId, getPlayableEditorAssetKindExtensions, guidToPlayableEditorAssetStableToken, normalizePlayableEditorAssetCodeKey, normalizePlayableEditorAssetDisplayName, normalizePlayableEditorAssetKind, getPlayableAssetFormat, getPlayableAssetResourceTransport, isPlayableAssetFormatSupported, stripKnownPlayableEditorAssetExtension, toPlayableEditorAssetImportName, } from '@fps-games/playable-assets';
3
3
  export { PlayableEditorManagedAssetError, buildPlayableEditorManagedAssetArgs, createPlayableEditorManagedAssetGuid, createPlayableEditorManagedAssetId, createPlayableEditorManagedSceneAsset, guidToPlayableEditorManagedAssetStableToken, planPlayableEditorAssetRegistrationCore, planPlayableEditorAssetUnregistrationCore, readPlayableEditorManagedAssetScale, resolvePlayableEditorAssetIdentity, sanitizePlayableEditorManagedAssetName, } from './manager-core.js';
4
4
  export { createPlayableEditorManagedAssetFacade, } from './managed-facade.js';
5
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/asset-database/index.ts"],"names":[],"mappings":"AASA,OAAO,EACL,uCAAuC,GACxC,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,mCAAmC,EACnC,kCAAkC,EAClC,8CAA8C,EAC9C,gCAAgC,EAChC,gCAAgC,EAChC,gCAAgC,EAChC,kCAAkC,EAClC,6BAA6B,EAC7B,2BAA2B,EAC3B,oCAAoC,EACpC,oCAAoC,EACpC,mCAAmC,EACnC,uCAAuC,EACvC,gCAAgC,EAChC,sCAAsC,EACtC,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AA0BpC,OAAO,EACL,+BAA+B,EAC/B,mCAAmC,EACnC,oCAAoC,EACpC,kCAAkC,EAClC,qCAAqC,EACrC,2CAA2C,EAC3C,uCAAuC,EACvC,yCAAyC,EACzC,mCAAmC,EACnC,kCAAkC,EAClC,sCAAsC,GACvC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,sCAAsC,GAIvC,MAAM,kBAAkB,CAAC","sourcesContent":["export type {\n PlayableEditorAssetCatalogEntry,\n PlayableEditorAssetDatabaseCommands,\n PlayableEditorAssetDatabaseConfig,\n PlayableEditorAssetDatabasePaths,\n PlayableEditorAssetDatabasePublicUrlInput,\n PlayableEditorAssetDatabaseRelativePathInput,\n PlayableEditorAssetKind,\n} from './types';\nexport {\n definePlayableEditorAssetDatabaseConfig,\n} from './config';\nexport {\n PLAYABLE_EDITOR_ASSET_CATALOG_KINDS,\n PLAYABLE_EDITOR_DEFAULT_EXTENSIONS,\n PLAYABLE_EDITOR_ENVIRONMENT_TEXTURE_EXTENSIONS,\n PLAYABLE_EDITOR_IMAGE_EXTENSIONS,\n PLAYABLE_EDITOR_MODEL_EXTENSIONS,\n PLAYABLE_EDITOR_SOUND_EXTENSIONS,\n PLAYABLE_EDITOR_TEXTURE_EXTENSIONS,\n createPlayableEditorAssetGuid,\n createPlayableEditorAssetId,\n getPlayableEditorAssetKindExtensions,\n guidToPlayableEditorAssetStableToken,\n normalizePlayableEditorAssetCodeKey,\n normalizePlayableEditorAssetDisplayName,\n normalizePlayableEditorAssetKind,\n stripKnownPlayableEditorAssetExtension,\n toPlayableEditorAssetImportName,\n} from '@fps-games/playable-assets';\nexport type {\n PlayableEditorAssetBuildInput,\n PlayableEditorAssetBuildResult,\n PlayableEditorAssetCatalogSnapshot,\n PlayableEditorAssetIdentityInput,\n PlayableEditorManagedAssetCoreRules,\n PlayableEditorManagedAssetErrorCodes,\n PlayableEditorManagedAssetExternalRef,\n PlayableEditorManagedAssetMetadataRule,\n PlayableEditorManagedAssetScale3D,\n PlayableEditorAssetRegistrationPayload,\n PlayableEditorAssetRegistrationPlanCore,\n PlayableEditorAssetRegistrationPlanInput,\n PlayableEditorAssetRegistrationPayloadPathInput,\n PlayableEditorAssetTransportCommand,\n PlayableEditorAssetTransportPlan,\n PlayableEditorAssetTransportWrite,\n PlayableEditorAssetUnregistrationPlanCore,\n PlayableEditorAssetUnregistrationPlanInput,\n PlayableEditorAssetUnregistrationPayloadPathInput,\n PlayableEditorManagedAssetKind,\n PlayableEditorManagedSceneAsset,\n PlayableEditorSceneAssetDefaults,\n PlayableEditorSceneAssetMaterialMode,\n} from './manager-core';\nexport {\n PlayableEditorManagedAssetError,\n buildPlayableEditorManagedAssetArgs,\n createPlayableEditorManagedAssetGuid,\n createPlayableEditorManagedAssetId,\n createPlayableEditorManagedSceneAsset,\n guidToPlayableEditorManagedAssetStableToken,\n planPlayableEditorAssetRegistrationCore,\n planPlayableEditorAssetUnregistrationCore,\n readPlayableEditorManagedAssetScale,\n resolvePlayableEditorAssetIdentity,\n sanitizePlayableEditorManagedAssetName,\n} from './manager-core';\nexport {\n createPlayableEditorManagedAssetFacade,\n type PlayableEditorManagedAssetFacade,\n type PlayableEditorManagedAssetFacadeOptions,\n type PlayableEditorManagedAssetReference,\n} from './managed-facade';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/asset-database/index.ts"],"names":[],"mappings":"AASA,OAAO,EACL,uCAAuC,GACxC,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,mCAAmC,EACnC,kCAAkC,EAClC,8CAA8C,EAC9C,gCAAgC,EAChC,gCAAgC,EAChC,gCAAgC,EAChC,kCAAkC,EAClC,mCAAmC,EACnC,6BAA6B,EAC7B,2BAA2B,EAC3B,oCAAoC,EACpC,oCAAoC,EACpC,mCAAmC,EACnC,uCAAuC,EACvC,gCAAgC,EAChC,sBAAsB,EACtB,iCAAiC,EACjC,8BAA8B,EAC9B,sCAAsC,EACtC,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AAqCpC,OAAO,EACL,+BAA+B,EAC/B,mCAAmC,EACnC,oCAAoC,EACpC,kCAAkC,EAClC,qCAAqC,EACrC,2CAA2C,EAC3C,uCAAuC,EACvC,yCAAyC,EACzC,mCAAmC,EACnC,kCAAkC,EAClC,sCAAsC,GACvC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,sCAAsC,GAIvC,MAAM,kBAAkB,CAAC","sourcesContent":["export type {\n PlayableEditorAssetCatalogEntry,\n PlayableEditorAssetDatabaseCommands,\n PlayableEditorAssetDatabaseConfig,\n PlayableEditorAssetDatabasePaths,\n PlayableEditorAssetDatabasePublicUrlInput,\n PlayableEditorAssetDatabaseRelativePathInput,\n PlayableEditorAssetKind,\n} from './types';\nexport {\n definePlayableEditorAssetDatabaseConfig,\n} from './config';\nexport {\n PLAYABLE_EDITOR_ASSET_CATALOG_KINDS,\n PLAYABLE_EDITOR_DEFAULT_EXTENSIONS,\n PLAYABLE_EDITOR_ENVIRONMENT_TEXTURE_EXTENSIONS,\n PLAYABLE_EDITOR_IMAGE_EXTENSIONS,\n PLAYABLE_EDITOR_MODEL_EXTENSIONS,\n PLAYABLE_EDITOR_SOUND_EXTENSIONS,\n PLAYABLE_EDITOR_TEXTURE_EXTENSIONS,\n createPlayableAssetResourceResolver,\n createPlayableEditorAssetGuid,\n createPlayableEditorAssetId,\n getPlayableEditorAssetKindExtensions,\n guidToPlayableEditorAssetStableToken,\n normalizePlayableEditorAssetCodeKey,\n normalizePlayableEditorAssetDisplayName,\n normalizePlayableEditorAssetKind,\n getPlayableAssetFormat,\n getPlayableAssetResourceTransport,\n isPlayableAssetFormatSupported,\n stripKnownPlayableEditorAssetExtension,\n toPlayableEditorAssetImportName,\n} from '@fps-games/playable-assets';\nexport type {\n PlayableAssetFormat,\n PlayableAssetResourceReference,\n PlayableAssetResourceResolution,\n PlayableAssetResourceResolutionCode,\n PlayableAssetResourceResolutionDiagnostic,\n PlayableAssetResourceResolver,\n PlayableAssetResourceTransport,\n PlayableGeneratedAssetCatalogEntry,\n PlayableResolvedAssetResource,\n} from '@fps-games/playable-assets';\nexport type {\n PlayableEditorAssetBuildInput,\n PlayableEditorAssetBuildResult,\n PlayableEditorAssetCatalogSnapshot,\n PlayableEditorAssetIdentityInput,\n PlayableEditorManagedAssetCoreRules,\n PlayableEditorManagedAssetErrorCodes,\n PlayableEditorManagedAssetExternalRef,\n PlayableEditorManagedAssetMetadataRule,\n PlayableEditorManagedAssetScale3D,\n PlayableEditorAssetRegistrationPayload,\n PlayableEditorAssetRegistrationPlanCore,\n PlayableEditorAssetRegistrationPlanInput,\n PlayableEditorAssetRegistrationPayloadPathInput,\n PlayableEditorAssetTransportCommand,\n PlayableEditorAssetTransportPlan,\n PlayableEditorAssetTransportWrite,\n PlayableEditorAssetUnregistrationPlanCore,\n PlayableEditorAssetUnregistrationPlanInput,\n PlayableEditorAssetUnregistrationPayloadPathInput,\n PlayableEditorManagedAssetKind,\n PlayableEditorManagedSceneAsset,\n PlayableEditorSceneAssetDefaults,\n PlayableEditorSceneAssetMaterialMode,\n} from './manager-core';\nexport {\n PlayableEditorManagedAssetError,\n buildPlayableEditorManagedAssetArgs,\n createPlayableEditorManagedAssetGuid,\n createPlayableEditorManagedAssetId,\n createPlayableEditorManagedSceneAsset,\n guidToPlayableEditorManagedAssetStableToken,\n planPlayableEditorAssetRegistrationCore,\n planPlayableEditorAssetUnregistrationCore,\n readPlayableEditorManagedAssetScale,\n resolvePlayableEditorAssetIdentity,\n sanitizePlayableEditorManagedAssetName,\n} from './manager-core';\nexport {\n createPlayableEditorManagedAssetFacade,\n type PlayableEditorManagedAssetFacade,\n type PlayableEditorManagedAssetFacadeOptions,\n type PlayableEditorManagedAssetReference,\n} from './managed-facade';\n"]}
@@ -4,4 +4,5 @@ export declare function createEditorSceneAssetLibrary<TExternal = unknown, TDefa
4
4
  export declare function createEditorSceneAssetHydrationCatalog<TExternal = unknown, TDefaults = unknown, TMaterialMode extends string = string>(catalogEntries: readonly EditorSceneAssetCatalogEntry<TExternal, TDefaults, TMaterialMode>[]): Array<EditorSceneAssetLibraryItem<TDefaults, TExternal, TMaterialMode>>;
5
5
  export declare function createEditorSceneAssetLibraryItem<TExternal = unknown, TDefaults = unknown, TMaterialMode extends string = string>(entry: EditorSceneAssetCatalogEntry<TExternal, TDefaults, TMaterialMode>): EditorSceneAssetLibraryItem<TDefaults, TExternal, TMaterialMode>;
6
6
  export declare function compareEditorSceneAssetLibraryItems(a: EditorSceneAssetLibraryItem, b: EditorSceneAssetLibraryItem): number;
7
+ export declare function resolveEditorSceneAssetLibraryItemRelativePath(asset: EditorSceneAssetLibraryItem): string | undefined;
7
8
  //# sourceMappingURL=catalog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/asset-library/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC5B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,4BAA4B,EAC7B,MAAM,SAAS,CAAC;AAEjB,wBAAgB,6BAA6B,CAC3C,SAAS,GAAG,OAAO,EACnB,SAAS,GAAG,OAAO,EACnB,aAAa,SAAS,MAAM,GAAG,MAAM,EAErC,cAAc,EAAE,SAAS,4BAA4B,CAAC,SAAS,EAAE,SAAS,EAAE,aAAa,CAAC,EAAE,GAC3F,KAAK,CAAC,2BAA2B,CAAC,SAAS,E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c,EAAE,SAAS,4BAA4B,CAAC,SAAS,EAAE,SAAS,EAAE,aAAa,CAAC,EAAE,GAC3F,KAAK,CAAC,2BAA2B,CAAC,SAAS,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAKzE;AAED,wBAAgB,iCAAiC,CAC/C,SAAS,GAAG,OAAO,EACnB,SAAS,GAAG,OAAO,EACnB,aAAa,SAAS,MAAM,GAAG,MAAM,EAErC,KAAK,EAAE,4BAA4B,CAAC,SAAS,EAAE,SAAS,EAAE,aAAa,CAAC,GACvE,2BAA2B,CAAC,SAAS,EAAE,SAAS,EAAE,aAAa,CAAC,CA+BlE;AAED,wBAAgB,mCAAmC,CACjD,CAAC,EAAE,2BAA2B,EAC9B,CAAC,EAAE,2BAA2B,GAC7B,MAAM,CAKR;AAED,wBAAgB,8CAA8C,CAC5D,KAAK,EAAE,2BAA2B,GACjC,MAAM,GAAG,SAAS,CAIpB"}
@@ -48,6 +48,11 @@ export function compareEditorSceneAssetLibraryItems(a, b) {
48
48
  || a.assetId.localeCompare(b.assetId)
49
49
  || a.type.localeCompare(b.type);
50
50
  }
51
+ export function resolveEditorSceneAssetLibraryItemRelativePath(asset) {
52
+ return readNonEmptyString(asset.relativePath)
53
+ ?? readNonEmptyString(asset.metadata?.relativePath)
54
+ ?? undefined;
55
+ }
51
56
  function inferEditorSceneAssetCategory(entry) {
52
57
  if (entry.kind === 'prefab')
53
58
  return 'Prefab';
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/asset-library/catalog.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,6BAA6B,CAK3C,cAA4F;IAE5F,OAAO,cAAc;SAClB,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,sCAAsC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC;SAClG,GAAG,CAAC,iCAAiC,CAAC;SACtC,IAAI,CAAC,mCAAmC,CAAC,CAAC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,KAAc;IAC5C,OAAO,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAK,KAAgB,IAAI,CAAC,CAAC,CAAC,CAAC,KAAe,CAAC,CAAC,CAAC,IAAI,CAAC;AACpF,CAAC;AAED,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAChE,CAAC,CAAC,KAAgC;QAClC,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,SAAS,aAAa,CAAI,KAAoB;IAC5C,OAAO,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;AAC5D,CAAC;AAED,SAAS,sCAAsC,CAAC,IAA0C;IACxF,OAAO,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,SAAS,CAAC;AACrE,CAAC","sourcesContent":["import type {\n EditorSceneAssetLibraryItem,\n} from '../document/index';\nimport type {\n EditorSceneAssetCatalogEntry,\n} from './types';\n\nexport function createEditorSceneAssetLibrary<\n TExternal = unknown,\n TDefaults = unknown,\n TMaterialMode extends string = string,\n>(\n catalogEntries: readonly EditorSceneAssetCatalogEntry<TExternal, TDefaults, TMaterialMode>[],\n): Array<EditorSceneAssetLibraryItem<TDefaults, TExternal, TMaterialMode>> {\n return catalogEntries\n .filter((entry) => isEditorScenePlaceableAssetCatalogKind(entry.kind) && entry.placeable !== false)\n .map(createEditorSceneAssetLibraryItem)\n .sort(compareEditorSceneAssetLibraryItems);\n}\n\nexport function createEditorSceneAssetHydrationCatalog<\n TExternal = unknown,\n TDefaults = unknown,\n TMaterialMode extends string = string,\n>(\n catalogEntries: readonly EditorSceneAssetCatalogEntry<TExternal, TDefaults, TMaterialMode>[],\n): Array<EditorSceneAssetLibraryItem<TDefaults, TExternal, TMaterialMode>> {\n return catalogEntries\n .filter((entry) => entry.kind === 'model')\n .map(createEditorSceneAssetLibraryItem)\n .sort(compareEditorSceneAssetLibraryItems);\n}\n\nexport function createEditorSceneAssetLibraryItem<\n TExternal = unknown,\n TDefaults = unknown,\n TMaterialMode extends string = string,\n>(\n entry: EditorSceneAssetCatalogEntry<TExternal, TDefaults, TMaterialMode>,\n): EditorSceneAssetLibraryItem<TDefaults, TExternal, TMaterialMode> {\n const type = entry.kind === 'texture'\n ? 'texture'\n : entry.kind === 'prefab'\n ? 'prefab'\n : 'glb';\n const guid = readNonEmptyString(entry.guid);\n const metadata = createEditorSceneAssetCatalogMetadata(entry);\n return {\n id: entry.assetId,\n ...(guid ? { guid } : {}),\n assetId: entry.assetId,\n type,\n kind: entry.kind === 'texture'\n ? 'texture'\n : entry.kind === 'prefab'\n ? 'prefab'\n : 'model',\n displayName: entry.displayName,\n category: entry.category ?? inferEditorSceneAssetCategory(entry),\n warmupCount: entry.warmupCount,\n singleton: entry.singleton,\n materialMode: entry.materialMode,\n defaults: cloneOptional(entry.defaults),\n prefab: cloneOptional(entry.prefab),\n external: cloneOptional(entry.external),\n metadata,\n origin: entry.origin ?? 'project',\n dedupeKey: entry.dedupeKey ?? guid ?? readExternalPlatformAssetId(entry.external) ?? entry.assetId,\n placeable: entry.placeable !== false,\n };\n}\n\nexport function compareEditorSceneAssetLibraryItems(\n a: EditorSceneAssetLibraryItem,\n b: EditorSceneAssetLibraryItem,\n): number {\n return (a.category ?? '').localeCompare(b.category ?? '')\n || a.displayName.localeCompare(b.displayName)\n || a.assetId.localeCompare(b.assetId)\n || a.type.localeCompare(b.type);\n}\n\nfunction inferEditorSceneAssetCategory(entry: EditorSceneAssetCatalogEntry): string {\n if (entry.kind === 'prefab') return 'Prefab';\n if (entry.kind === 'texture') return 'Texture';\n if (entry.kind === 'image') return 'Image';\n if (entry.kind === 'sound') return 'Sound';\n return 'Model';\n}\n\nfunction createEditorSceneAssetCatalogMetadata(\n entry: EditorSceneAssetCatalogEntry,\n): Record<string, unknown> {\n return normalizeEditorSceneAssetCatalogMetadata({\n originalFileName: entry.originalFileName,\n relativePath: entry.relativePath,\n codeKey: entry.codeKey,\n contentHash: entry.contentHash,\n byteSize: entry.byteSize,\n ...cloneOptional(entry.metadata),\n });\n}\n\nfunction normalizeEditorSceneAssetCatalogMetadata(\n metadata: Record<string, unknown>,\n): Record<string, unknown> {\n if (!Array.isArray(metadata.materialSlots)) return metadata;\n const analysis = readRecord(metadata.assetAnalysis);\n const meshes = Array.isArray(analysis?.meshes) ? analysis.meshes : [];\n const nodes = Array.isArray(analysis?.nodes) ? analysis.nodes : [];\n const meshNames = new Map(meshes.flatMap((mesh) => {\n const record = readRecord(mesh);\n const meshIndex = readNonNegativeInteger(record?.meshIndex);\n const name = readNonEmptyString(record?.name);\n return meshIndex == null || !name ? [] : [[meshIndex, name] as const];\n }));\n const nodeMeshNames = new Map(nodes.flatMap((node) => {\n const record = readRecord(node);\n const nodeIndex = readNonNegativeInteger(record?.nodeIndex);\n const name = readNonEmptyString(record?.meshName);\n return nodeIndex == null || !name ? [] : [[nodeIndex, name] as const];\n }));\n const analysisTruncated = isAnalysisCollectionTruncated(analysis, 'meshCount', meshes.length)\n || isAnalysisCollectionTruncated(analysis, 'nodeCount', nodes.length);\n const materialSlots = metadata.materialSlots.map((slot) => {\n const record = readRecord(slot);\n if (!record || readNonEmptyString(record.sourceMeshName)) return slot;\n const meshIndex = readNonNegativeInteger(record.meshIndex);\n if (meshIndex == null) return slot;\n const nodeIndex = readNonNegativeInteger(record.nodeIndex);\n const sourceMeshName = meshNames.get(meshIndex)\n ?? (nodeIndex == null ? undefined : nodeMeshNames.get(nodeIndex))\n ?? (analysisTruncated ? inferLegacyMaterialSlotMeshName(record) : undefined);\n return sourceMeshName ? { ...record, sourceMeshName } : slot;\n });\n return { ...metadata, materialSlots };\n}\n\nfunction inferLegacyMaterialSlotMeshName(slot: Record<string, unknown>): string | undefined {\n const label = readNonEmptyString(slot.label);\n if (label) {\n const baseLabel = label.replace(/\\s+\\/\\s+Primitive\\s+\\d+$/, '').trim();\n if (baseLabel) return baseLabel;\n }\n return readNonEmptyString(slot.ownerNodePath)?.split('/').filter(Boolean).pop();\n}\n\nfunction isAnalysisCollectionTruncated(\n analysis: Record<string, unknown> | undefined,\n countField: 'meshCount' | 'nodeCount',\n returnedCount: number,\n): boolean {\n const totalCount = readNonNegativeInteger(analysis?.[countField]);\n return totalCount != null && totalCount > returnedCount;\n}\n\nfunction readExternalPlatformAssetId(value: unknown): string | null {\n if (!value || typeof value !== 'object' || Array.isArray(value)) return null;\n return readNonEmptyString((value as Record<string, unknown>).platformAssetId);\n}\n\nfunction readNonEmptyString(value: unknown): string | null {\n return typeof value === 'string' && value.trim() ? value.trim() : null;\n}\n\nfunction readNonNegativeInteger(value: unknown): number | null {\n return Number.isInteger(value) && (value as number) >= 0 ? value as number : null;\n}\n\nfunction readRecord(value: unknown): Record<string, unknown> | undefined {\n return value && typeof value === 'object' && !Array.isArray(value)\n ? value as Record<string, unknown>\n : undefined;\n}\n\nfunction cloneOptional<T>(value: T | undefined): T | undefined {\n return value == null ? undefined : structuredClone(value);\n}\n\nfunction isEditorScenePlaceableAssetCatalogKind(kind: EditorSceneAssetCatalogEntry['kind']): boolean {\n return kind === 'model' || kind === 'prefab' || kind === 'texture';\n}\n"]}
1
+ {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/asset-library/catalog.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,6BAA6B,CAK3C,cAA4F;IAE5F,OAAO,cAAc;SAClB,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,sCAAsC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC;SAClG,GAAG,CAAC,iCAAiC,CAAC;SACtC,IAAI,CAAC,mCAAmC,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,sCAAsC,CAKpD,cAA4F;IAE5F,OAAO,cAAc;SAClB,MAAM,CAAC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AK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACzE,CAAC;AAED,SAAS,sBAAsB,CAAC,KAAc;IAC5C,OAAO,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAK,KAAgB,IAAI,CAAC,CAAC,CAAC,CAAC,KAAe,CAAC,CAAC,CAAC,IAAI,CAAC;AACpF,CAAC;AAED,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAChE,CAAC,CAAC,KAAgC;QAClC,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,SAAS,aAAa,CAAI,KAAoB;IAC5C,OAAO,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;AAC5D,CAAC;AAED,SAAS,sCAAsC,CAAC,IAA0C;IACxF,OAAO,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,SAAS,CAAC;AACrE,CAAC","sourcesContent":["import type {\n EditorSceneAssetLibraryItem,\n} from '../document/index';\nimport type {\n EditorSceneAssetCatalogEntry,\n} from './types';\n\nexport function createEditorSceneAssetLibrary<\n TExternal = unknown,\n TDefaults = unknown,\n TMaterialMode extends string = string,\n>(\n catalogEntries: readonly EditorSceneAssetCatalogEntry<TExternal, TDefaults, TMaterialMode>[],\n): Array<EditorSceneAssetLibraryItem<TDefaults, TExternal, TMaterialMode>> {\n return catalogEntries\n .filter((entry) => isEditorScenePlaceableAssetCatalogKind(entry.kind) && entry.placeable !== false)\n .map(createEditorSceneAssetLibraryItem)\n .sort(compareEditorSceneAssetLibraryItems);\n}\n\nexport function createEditorSceneAssetHydrationCatalog<\n TExternal = unknown,\n TDefaults = unknown,\n TMaterialMode extends string = string,\n>(\n catalogEntries: readonly EditorSceneAssetCatalogEntry<TExternal, TDefaults, TMaterialMode>[],\n): Array<EditorSceneAssetLibraryItem<TDefaults, TExternal, TMaterialMode>> {\n return catalogEntries\n .filter((entry) => entry.kind === 'model')\n .map(createEditorSceneAssetLibraryItem)\n .sort(compareEditorSceneAssetLibraryItems);\n}\n\nexport function createEditorSceneAssetLibraryItem<\n TExternal = unknown,\n TDefaults = unknown,\n TMaterialMode extends string = string,\n>(\n entry: EditorSceneAssetCatalogEntry<TExternal, TDefaults, TMaterialMode>,\n): EditorSceneAssetLibraryItem<TDefaults, TExternal, TMaterialMode> {\n const type = entry.kind === 'texture'\n ? 'texture'\n : entry.kind === 'prefab'\n ? 'prefab'\n : 'glb';\n const guid = readNonEmptyString(entry.guid);\n const metadata = createEditorSceneAssetCatalogMetadata(entry);\n return {\n id: entry.assetId,\n ...(guid ? { guid } : {}),\n assetId: entry.assetId,\n type,\n kind: entry.kind === 'texture'\n ? 'texture'\n : entry.kind === 'prefab'\n ? 'prefab'\n : 'model',\n displayName: entry.displayName,\n category: entry.category ?? inferEditorSceneAssetCategory(entry),\n warmupCount: entry.warmupCount,\n singleton: entry.singleton,\n materialMode: entry.materialMode,\n defaults: cloneOptional(entry.defaults),\n prefab: cloneOptional(entry.prefab),\n external: cloneOptional(entry.external),\n metadata,\n origin: entry.origin ?? 'project',\n dedupeKey: entry.dedupeKey ?? guid ?? readExternalPlatformAssetId(entry.external) ?? entry.assetId,\n placeable: entry.placeable !== false,\n };\n}\n\nexport function compareEditorSceneAssetLibraryItems(\n a: EditorSceneAssetLibraryItem,\n b: EditorSceneAssetLibraryItem,\n): number {\n return (a.category ?? '').localeCompare(b.category ?? '')\n || a.displayName.localeCompare(b.displayName)\n || a.assetId.localeCompare(b.assetId)\n || a.type.localeCompare(b.type);\n}\n\nexport function resolveEditorSceneAssetLibraryItemRelativePath(\n asset: EditorSceneAssetLibraryItem,\n): string | undefined {\n return readNonEmptyString(asset.relativePath)\n ?? readNonEmptyString(asset.metadata?.relativePath)\n ?? undefined;\n}\n\nfunction inferEditorSceneAssetCategory(entry: EditorSceneAssetCatalogEntry): string {\n if (entry.kind === 'prefab') return 'Prefab';\n if (entry.kind === 'texture') return 'Texture';\n if (entry.kind === 'image') return 'Image';\n if (entry.kind === 'sound') return 'Sound';\n return 'Model';\n}\n\nfunction createEditorSceneAssetCatalogMetadata(\n entry: EditorSceneAssetCatalogEntry,\n): Record<string, unknown> {\n return normalizeEditorSceneAssetCatalogMetadata({\n originalFileName: entry.originalFileName,\n relativePath: entry.relativePath,\n codeKey: entry.codeKey,\n contentHash: entry.contentHash,\n byteSize: entry.byteSize,\n ...cloneOptional(entry.metadata),\n });\n}\n\nfunction normalizeEditorSceneAssetCatalogMetadata(\n metadata: Record<string, unknown>,\n): Record<string, unknown> {\n if (!Array.isArray(metadata.materialSlots)) return metadata;\n const analysis = readRecord(metadata.assetAnalysis);\n const meshes = Array.isArray(analysis?.meshes) ? analysis.meshes : [];\n const nodes = Array.isArray(analysis?.nodes) ? analysis.nodes : [];\n const meshNames = new Map(meshes.flatMap((mesh) => {\n const record = readRecord(mesh);\n const meshIndex = readNonNegativeInteger(record?.meshIndex);\n const name = readNonEmptyString(record?.name);\n return meshIndex == null || !name ? [] : [[meshIndex, name] as const];\n }));\n const nodeMeshNames = new Map(nodes.flatMap((node) => {\n const record = readRecord(node);\n const nodeIndex = readNonNegativeInteger(record?.nodeIndex);\n const name = readNonEmptyString(record?.meshName);\n return nodeIndex == null || !name ? [] : [[nodeIndex, name] as const];\n }));\n const analysisTruncated = isAnalysisCollectionTruncated(analysis, 'meshCount', meshes.length)\n || isAnalysisCollectionTruncated(analysis, 'nodeCount', nodes.length);\n const materialSlots = metadata.materialSlots.map((slot) => {\n const record = readRecord(slot);\n if (!record || readNonEmptyString(record.sourceMeshName)) return slot;\n const meshIndex = readNonNegativeInteger(record.meshIndex);\n if (meshIndex == null) return slot;\n const nodeIndex = readNonNegativeInteger(record.nodeIndex);\n const sourceMeshName = meshNames.get(meshIndex)\n ?? (nodeIndex == null ? undefined : nodeMeshNames.get(nodeIndex))\n ?? (analysisTruncated ? inferLegacyMaterialSlotMeshName(record) : undefined);\n return sourceMeshName ? { ...record, sourceMeshName } : slot;\n });\n return { ...metadata, materialSlots };\n}\n\nfunction inferLegacyMaterialSlotMeshName(slot: Record<string, unknown>): string | undefined {\n const label = readNonEmptyString(slot.label);\n if (label) {\n const baseLabel = label.replace(/\\s+\\/\\s+Primitive\\s+\\d+$/, '').trim();\n if (baseLabel) return baseLabel;\n }\n return readNonEmptyString(slot.ownerNodePath)?.split('/').filter(Boolean).pop();\n}\n\nfunction isAnalysisCollectionTruncated(\n analysis: Record<string, unknown> | undefined,\n countField: 'meshCount' | 'nodeCount',\n returnedCount: number,\n): boolean {\n const totalCount = readNonNegativeInteger(analysis?.[countField]);\n return totalCount != null && totalCount > returnedCount;\n}\n\nfunction readExternalPlatformAssetId(value: unknown): string | null {\n if (!value || typeof value !== 'object' || Array.isArray(value)) return null;\n return readNonEmptyString((value as Record<string, unknown>).platformAssetId);\n}\n\nfunction readNonEmptyString(value: unknown): string | null {\n return typeof value === 'string' && value.trim() ? value.trim() : null;\n}\n\nfunction readNonNegativeInteger(value: unknown): number | null {\n return Number.isInteger(value) && (value as number) >= 0 ? value as number : null;\n}\n\nfunction readRecord(value: unknown): Record<string, unknown> | undefined {\n return value && typeof value === 'object' && !Array.isArray(value)\n ? value as Record<string, unknown>\n : undefined;\n}\n\nfunction cloneOptional<T>(value: T | undefined): T | undefined {\n return value == null ? undefined : structuredClone(value);\n}\n\nfunction isEditorScenePlaceableAssetCatalogKind(kind: EditorSceneAssetCatalogEntry['kind']): boolean {\n return kind === 'model' || kind === 'prefab' || kind === 'texture';\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  export type { DehydratedEditorSceneAsset, DehydratedEditorSceneDocument, EditorScenePersistedModelAssetReference, } from './document';
2
2
  export type { EditorSceneAssetCatalogEntry, EditorSceneAssetCatalogKind, } from './types';
3
- export { compareEditorSceneAssetLibraryItems, createEditorSceneAssetLibrary, createEditorSceneAssetHydrationCatalog, createEditorSceneAssetLibraryItem, } from './catalog';
3
+ export { compareEditorSceneAssetLibraryItems, createEditorSceneAssetLibrary, createEditorSceneAssetHydrationCatalog, createEditorSceneAssetLibraryItem, resolveEditorSceneAssetLibraryItemRelativePath, } from './catalog';
4
4
  export { assertEditorSceneDocumentAssetCatalogCompleteness, dehydrateEditorSceneDocumentAssets, enrichEditorSceneDocumentAssets, mergeEditorSceneAssetWithLibraryItem, } from './document';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/asset-library/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,0BAA0B,EAC1B,6BAA6B,EAC7B,uCAAuC,GACxC,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,mCAAmC,EACnC,6BAA6B,EAC7B,sCAAsC,EACtC,iCAAiC,GAClC,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,iDAAiD,EACjD,kCAAkC,EAClC,+BAA+B,EAC/B,oCAAoC,GACrC,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/asset-library/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,0BAA0B,EAC1B,6BAA6B,EAC7B,uCAAuC,GACxC,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,mCAAmC,EACnC,6BAA6B,EAC7B,sCAAsC,EACtC,iCAAiC,EACjC,8CAA8C,GAC/C,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,iDAAiD,EACjD,kCAAkC,EAClC,+BAA+B,EAC/B,oCAAoC,GACrC,MAAM,YAAY,CAAC"}
@@ -1,3 +1,3 @@
1
- export { compareEditorSceneAssetLibraryItems, createEditorSceneAssetLibrary, createEditorSceneAssetHydrationCatalog, createEditorSceneAssetLibraryItem, } from './catalog.js';
1
+ export { compareEditorSceneAssetLibraryItems, createEditorSceneAssetLibrary, createEditorSceneAssetHydrationCatalog, createEditorSceneAssetLibraryItem, resolveEditorSceneAssetLibraryItemRelativePath, } from './catalog.js';
2
2
  export { assertEditorSceneDocumentAssetCatalogCompleteness, dehydrateEditorSceneDocumentAssets, enrichEditorSceneDocumentAssets, mergeEditorSceneAssetWithLibraryItem, } from './document.js';
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/asset-library/index.ts"],"names":[],"mappings":"AASA,OAAO,EACL,mCAAmC,EACnC,6BAA6B,EAC7B,sCAAsC,EACtC,iCAAiC,GAClC,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,iDAAiD,EACjD,kCAAkC,EAClC,+BAA+B,EAC/B,oCAAoC,GACrC,MAAM,YAAY,CAAC","sourcesContent":["export type {\n DehydratedEditorSceneAsset,\n DehydratedEditorSceneDocument,\n EditorScenePersistedModelAssetReference,\n} from './document';\nexport type {\n EditorSceneAssetCatalogEntry,\n EditorSceneAssetCatalogKind,\n} from './types';\nexport {\n compareEditorSceneAssetLibraryItems,\n createEditorSceneAssetLibrary,\n createEditorSceneAssetHydrationCatalog,\n createEditorSceneAssetLibraryItem,\n} from './catalog';\nexport {\n assertEditorSceneDocumentAssetCatalogCompleteness,\n dehydrateEditorSceneDocumentAssets,\n enrichEditorSceneDocumentAssets,\n mergeEditorSceneAssetWithLibraryItem,\n} from './document';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/asset-library/index.ts"],"names":[],"mappings":"AASA,OAAO,EACL,mCAAmC,EACnC,6BAA6B,EAC7B,sCAAsC,EACtC,iCAAiC,EACjC,8CAA8C,GAC/C,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,iDAAiD,EACjD,kCAAkC,EAClC,+BAA+B,EAC/B,oCAAoC,GACrC,MAAM,YAAY,CAAC","sourcesContent":["export type {\n DehydratedEditorSceneAsset,\n DehydratedEditorSceneDocument,\n EditorScenePersistedModelAssetReference,\n} from './document';\nexport type {\n EditorSceneAssetCatalogEntry,\n EditorSceneAssetCatalogKind,\n} from './types';\nexport {\n compareEditorSceneAssetLibraryItems,\n createEditorSceneAssetLibrary,\n createEditorSceneAssetHydrationCatalog,\n createEditorSceneAssetLibraryItem,\n resolveEditorSceneAssetLibraryItemRelativePath,\n} from './catalog';\nexport {\n assertEditorSceneDocumentAssetCatalogCompleteness,\n dehydrateEditorSceneDocumentAssets,\n enrichEditorSceneDocumentAssets,\n mergeEditorSceneAssetWithLibraryItem,\n} from './document';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../src/authoring-server/handler.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAIV,+BAA+B,EAC/B,8BAA8B,EAC9B,+BAA+B,EAChC,MAAM,SAAS,CAAC;AAEjB,wBAAsB,oCAAoC,CACxD,OAAO,EAAE,8BAA8B,EACvC,QAAQ,EAAE,+BAA+B,GACxC,OAAO,CAAC,+BAA+B,GAAG,IAAI,CAAC,CA4BjD"}
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../src/authoring-server/handler.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAIV,+BAA+B,EAC/B,8BAA8B,EAC9B,+BAA+B,EAChC,MAAM,SAAS,CAAC;AAEjB,wBAAsB,oCAAoC,CACxD,OAAO,EAAE,8BAA8B,EACvC,QAAQ,EAAE,+BAA+B,GACxC,OAAO,CAAC,+BAA+B,GAAG,IAAI,CAAC,CAoCjD"}
@@ -14,6 +14,14 @@ export async function handlePlayableAuthoringServerRequest(request, handlers) {
14
14
  if (method !== 'GET') {
15
15
  return createPlayableAuthoringJsonResponse(405, { ok: false, error: 'method_not_allowed' });
16
16
  }
17
+ if (route.routeName === 'project-file') {
18
+ const rawPath = new URL(request.url ?? '', 'http://localhost').searchParams.get('path')?.trim() ?? '';
19
+ if (!rawPath) {
20
+ return createPlayableAuthoringJsonResponse(400, { ok: false, error: 'missing_file_path' });
21
+ }
22
+ const result = await handlers.loadProjectFile?.({ path: rawPath, route });
23
+ return createPlayableAuthoringJsonResponse(200, result ?? { ok: false, error: 'not_found' });
24
+ }
17
25
  return createPlayableAuthoringJsonResponse(200, await dispatchGetRoute(route, handlers));
18
26
  }
19
27
  if (method !== 'POST') {
@@ -33,7 +41,10 @@ export async function handlePlayableAuthoringServerRequest(request, handlers) {
33
41
  function isGetRoute(routeName) {
34
42
  return routeName === 'manifest'
35
43
  || routeName === 'editor-scene'
36
- || routeName === 'editor-asset-library';
44
+ || routeName === 'editor-asset-library'
45
+ || routeName === 'project-files'
46
+ || routeName === 'project-file'
47
+ || routeName === 'project-media';
37
48
  }
38
49
  async function dispatchGetRoute(route, handlers) {
39
50
  if (route.routeName === 'manifest' && handlers.loadManifest) {
@@ -45,6 +56,9 @@ async function dispatchGetRoute(route, handlers) {
45
56
  if (route.routeName === 'editor-asset-library' && handlers.loadEditorAssetLibrary) {
46
57
  return handlers.loadEditorAssetLibrary(route);
47
58
  }
59
+ if (route.routeName === 'project-files' && handlers.loadProjectFiles) {
60
+ return handlers.loadProjectFiles(route);
61
+ }
48
62
  return { ok: false, error: 'not_found' };
49
63
  }
50
64
  async function dispatchPostRoute(route, body, handlers) {
@@ -1 +1 @@
1
- {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../src/authoring-server/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACL,2CAA2C,GAC5C,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,oCAAoC,EACpC,mCAAmC,EACnC,qCAAqC,GACtC,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,2BAA2B,GAC5B,MAAM,UAAU,CAAC;AAUlB,MAAM,CAAC,KAAK,UAAU,oCAAoC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EAAE,KAAK;QACT,KAAK,EAAE,gCAAgC;QACvC,OAAO,EAAE,6GAA6G;KACvH,CAAC;AACJ,CAAC","sourcesContent":["import { readRecord } from '../shared/json';\nimport {\n readPlayableAuthoringPayloadPathFromCommand,\n} from './payload';\nimport {\n createPlayableAuthoringEmptyResponse,\n createPlayableAuthoringJsonResponse,\n serializePlayableAuthoringFileContent,\n} from './response';\nimport {\n matchPlayableAuthoringRoute,\n} from './routes';\nimport type {\n PlayableAuthoringRouteMatch,\n PlayableAuthoringRouteName,\n PlayableAuthoringSaveMode,\n PlayableAuthoringServerHandlers,\n PlayableAuthoringServerRequest,\n PlayableAuthoringServerResponse,\n} from './types';\n\nexport async function handlePlayableAuthoringServerRequest(\n request: PlayableAuthoringServerRequest,\n handlers: PlayableAuthoringServerHandlers,\n): Promise<PlayableAuthoringServerResponse | null> {\n const route = matchPlayableAuthoringRoute(request.url);\n if (!route) return null;\n\n const method = (request.method ?? 'GET').toUpperCase();\n if (method === 'OPTIONS') return createPlayableAuthoringEmptyResponse(204);\n\n try {\n if (isGetRoute(route.routeName)) {\n if (method !== 'GET') {\n return createPlayableAuthoringJsonResponse(405, { ok: false, error: 'method_not_allowed' });\n }\n return createPlayableAuthoringJsonResponse(200, await dispatchGetRoute(route, handlers));\n }\n\n if (method !== 'POST') {\n return createPlayableAuthoringJsonResponse(405, { ok: false, error: 'method_not_allowed' });\n }\n\n const body = request.body ?? await handlers.readBody?.(request, route) ?? {};\n return await dispatchPostRoute(route, body, handlers);\n } catch (error) {\n return createPlayableAuthoringJsonResponse(500, {\n ok: false,\n error: error instanceof Error ? error.message : String(error),\n details: readRecord((error as { details?: unknown })?.details),\n });\n }\n}\n\nfunction isGetRoute(routeName: PlayableAuthoringRouteName): boolean {\n return routeName === 'manifest'\n || routeName === 'editor-scene'\n || routeName === 'editor-asset-library';\n}\n\nasync function dispatchGetRoute(\n route: PlayableAuthoringRouteMatch,\n handlers: PlayableAuthoringServerHandlers,\n): Promise<Record<string, unknown>> {\n if (route.routeName === 'manifest' && handlers.loadManifest) {\n return handlers.loadManifest(route);\n }\n if (route.routeName === 'editor-scene' && handlers.loadEditorScene) {\n return handlers.loadEditorScene(route);\n }\n if (route.routeName === 'editor-asset-library' && handlers.loadEditorAssetLibrary) {\n return handlers.loadEditorAssetLibrary(route);\n }\n return { ok: false, error: 'not_found' };\n}\n\nasync function dispatchPostRoute(\n route: PlayableAuthoringRouteMatch,\n body: Record<string, unknown>,\n handlers: PlayableAuthoringServerHandlers,\n): Promise<PlayableAuthoringServerResponse> {\n if (route.routeName === 'file') {\n return handleFileRoute(route, body, handlers);\n }\n if (route.routeName === 'exec') {\n return handleExecRoute(route, body, handlers);\n }\n if (route.routeName === 'save-editor-scene') {\n return handleSaveRoute(route, body, handlers);\n }\n if (route.routeName === 'commit') {\n return createPlayableAuthoringJsonResponse(410, await handleCommitRoute(route, body, handlers));\n }\n return createPlayableAuthoringJsonResponse(404, { ok: false, error: 'not_found' });\n}\n\nasync function handleFileRoute(\n route: PlayableAuthoringRouteMatch,\n body: Record<string, unknown>,\n handlers: PlayableAuthoringServerHandlers,\n): Promise<PlayableAuthoringServerResponse> {\n const rawPath = String(body.path ?? '');\n const path = handlers.normalizeTransportPath?.(rawPath) ?? rawPath;\n if (!path) {\n return createPlayableAuthoringJsonResponse(400, { ok: false, error: 'missing_file_path' });\n }\n const content = body.content;\n const text = serializePlayableAuthoringFileContent(content);\n const result = await handlers.writeFile?.({ body, path, rawPath, content, text, route });\n return createPlayableAuthoringJsonResponse(200, result ?? { ok: true, path });\n}\n\nasync function handleExecRoute(\n route: PlayableAuthoringRouteMatch,\n body: Record<string, unknown>,\n handlers: PlayableAuthoringServerHandlers,\n): Promise<PlayableAuthoringServerResponse> {\n const cmd = String(body.cmd ?? '');\n const rawPayloadPath = readPlayableAuthoringPayloadPathFromCommand(cmd);\n if (!rawPayloadPath) {\n return createPlayableAuthoringJsonResponse(400, { ok: false, error: 'missing_payload_arg', cmd });\n }\n const payloadPath = handlers.normalizeTransportPath?.(rawPayloadPath) ?? rawPayloadPath;\n const result = await handlers.runCommand?.({ body, cmd, payloadPath, rawPayloadPath, route });\n return createPlayableAuthoringJsonResponse(200, result ?? { ok: true, cmd });\n}\n\nasync function handleSaveRoute(\n route: PlayableAuthoringRouteMatch,\n body: Record<string, unknown>,\n handlers: PlayableAuthoringServerHandlers,\n): Promise<PlayableAuthoringServerResponse> {\n const mode: PlayableAuthoringSaveMode = body.mode === 'prepare-platform-save'\n ? 'prepare-platform-save'\n : 'local-commit-save';\n const result = await handlers.saveEditorScene?.({\n body,\n mode,\n rawEditorScene: body.editorScene,\n route,\n });\n return createPlayableAuthoringJsonResponse(200, result ?? { ok: false, error: 'not_found' });\n}\n\nasync function handleCommitRoute(\n route: PlayableAuthoringRouteMatch,\n body: Record<string, unknown>,\n handlers: PlayableAuthoringServerHandlers,\n): Promise<Record<string, unknown>> {\n return handlers.commit?.({ body, route }) ?? {\n ok: false,\n error: 'platform_commit_route_disabled',\n message: 'Save through /__fps_editor_authoring/save-editor-scene so scene.main remains the authoring source of truth.',\n };\n}\n"]}
1
+ {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../src/authoring-server/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACL,2CAA2C,GAC5C,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,oCAAoC,EACpC,mCAAmC,EACnC,qCAAqC,GACtC,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,2BAA2B,GAC5B,MAAM,UAAU,CAAC;AAUlB,MAAM,CAAC,KAAK,UAAU,oCAAoC,CACxD,OAAuC,EACvC,QAAyC;IAEzC,MAAM,KAAK,GAAG,2BAA2B,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACvD,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAExB,MAAM,MAAM,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,KAAK,CAAC,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AAC/E,CAAC;AAED,KAAK,UAAU,eAAe,CAC5B,KAAkC,EAClC,IAA6B,EAC7B,QAAyC;IAEzC,MAAM,IAAI,GAA8B,IAAI,CAAC,IAAI,KAAK,uBAAuB;QAC3E,CAAC,CAAC,uBAAuB;QACzB,CAAC,CAAC,mBAAmB,CAAC;IACxB,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,eAAe,EAAE,CAAC;QAC9C,IAAI;QACJ,IAAI;QACJ,cAAc,EAAE,IAAI,CAAC,WAAW;QAChC,KAAK;KACN,CAAC,CAAC;IACH,OAAO,mCAAmC,CAAC,GAAG,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;AAC/F,CAAC;AAED,KAAK,UAAU,iBAAiB,CAC9B,KAAkC,EAClC,IAA6B,EAC7B,QAAyC;IAEzC,OAAO,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,IAAI;QAC3C,EAAE,EAAE,KAAK;QACT,KAAK,EAAE,gCAAgC;QACvC,OAAO,EAAE,6GAA6G;KACvH,CAAC;AACJ,CAAC","sourcesContent":["import { readRecord } from '../shared/json';\nimport {\n readPlayableAuthoringPayloadPathFromCommand,\n} from './payload';\nimport {\n createPlayableAuthoringEmptyResponse,\n createPlayableAuthoringJsonResponse,\n serializePlayableAuthoringFileContent,\n} from './response';\nimport {\n matchPlayableAuthoringRoute,\n} from './routes';\nimport type {\n PlayableAuthoringRouteMatch,\n PlayableAuthoringRouteName,\n PlayableAuthoringSaveMode,\n PlayableAuthoringServerHandlers,\n PlayableAuthoringServerRequest,\n PlayableAuthoringServerResponse,\n} from './types';\n\nexport async function handlePlayableAuthoringServerRequest(\n request: PlayableAuthoringServerRequest,\n handlers: PlayableAuthoringServerHandlers,\n): Promise<PlayableAuthoringServerResponse | null> {\n const route = matchPlayableAuthoringRoute(request.url);\n if (!route) return null;\n\n const method = (request.method ?? 'GET').toUpperCase();\n if (method === 'OPTIONS') return createPlayableAuthoringEmptyResponse(204);\n\n try {\n if (isGetRoute(route.routeName)) {\n if (method !== 'GET') {\n return createPlayableAuthoringJsonResponse(405, { ok: false, error: 'method_not_allowed' });\n }\n if (route.routeName === 'project-file') {\n const rawPath = new URL(request.url ?? '', 'http://localhost').searchParams.get('path')?.trim() ?? '';\n if (!rawPath) {\n return createPlayableAuthoringJsonResponse(400, { ok: false, error: 'missing_file_path' });\n }\n const result = await handlers.loadProjectFile?.({ path: rawPath, route });\n return createPlayableAuthoringJsonResponse(200, result ?? { ok: false, error: 'not_found' });\n }\n return createPlayableAuthoringJsonResponse(200, await dispatchGetRoute(route, handlers));\n }\n\n if (method !== 'POST') {\n return createPlayableAuthoringJsonResponse(405, { ok: false, error: 'method_not_allowed' });\n }\n\n const body = request.body ?? await handlers.readBody?.(request, route) ?? {};\n return await dispatchPostRoute(route, body, handlers);\n } catch (error) {\n return createPlayableAuthoringJsonResponse(500, {\n ok: false,\n error: error instanceof Error ? error.message : String(error),\n details: readRecord((error as { details?: unknown })?.details),\n });\n }\n}\n\nfunction isGetRoute(routeName: PlayableAuthoringRouteName): boolean {\n return routeName === 'manifest'\n || routeName === 'editor-scene'\n || routeName === 'editor-asset-library'\n || routeName === 'project-files'\n || routeName === 'project-file'\n || routeName === 'project-media';\n}\n\nasync function dispatchGetRoute(\n route: PlayableAuthoringRouteMatch,\n handlers: PlayableAuthoringServerHandlers,\n): Promise<Record<string, unknown>> {\n if (route.routeName === 'manifest' && handlers.loadManifest) {\n return handlers.loadManifest(route);\n }\n if (route.routeName === 'editor-scene' && handlers.loadEditorScene) {\n return handlers.loadEditorScene(route);\n }\n if (route.routeName === 'editor-asset-library' && handlers.loadEditorAssetLibrary) {\n return handlers.loadEditorAssetLibrary(route);\n }\n if (route.routeName === 'project-files' && handlers.loadProjectFiles) {\n return handlers.loadProjectFiles(route);\n }\n return { ok: false, error: 'not_found' };\n}\n\nasync function dispatchPostRoute(\n route: PlayableAuthoringRouteMatch,\n body: Record<string, unknown>,\n handlers: PlayableAuthoringServerHandlers,\n): Promise<PlayableAuthoringServerResponse> {\n if (route.routeName === 'file') {\n return handleFileRoute(route, body, handlers);\n }\n if (route.routeName === 'exec') {\n return handleExecRoute(route, body, handlers);\n }\n if (route.routeName === 'save-editor-scene') {\n return handleSaveRoute(route, body, handlers);\n }\n if (route.routeName === 'commit') {\n return createPlayableAuthoringJsonResponse(410, await handleCommitRoute(route, body, handlers));\n }\n return createPlayableAuthoringJsonResponse(404, { ok: false, error: 'not_found' });\n}\n\nasync function handleFileRoute(\n route: PlayableAuthoringRouteMatch,\n body: Record<string, unknown>,\n handlers: PlayableAuthoringServerHandlers,\n): Promise<PlayableAuthoringServerResponse> {\n const rawPath = String(body.path ?? '');\n const path = handlers.normalizeTransportPath?.(rawPath) ?? rawPath;\n if (!path) {\n return createPlayableAuthoringJsonResponse(400, { ok: false, error: 'missing_file_path' });\n }\n const content = body.content;\n const text = serializePlayableAuthoringFileContent(content);\n const result = await handlers.writeFile?.({ body, path, rawPath, content, text, route });\n return createPlayableAuthoringJsonResponse(200, result ?? { ok: true, path });\n}\n\nasync function handleExecRoute(\n route: PlayableAuthoringRouteMatch,\n body: Record<string, unknown>,\n handlers: PlayableAuthoringServerHandlers,\n): Promise<PlayableAuthoringServerResponse> {\n const cmd = String(body.cmd ?? '');\n const rawPayloadPath = readPlayableAuthoringPayloadPathFromCommand(cmd);\n if (!rawPayloadPath) {\n return createPlayableAuthoringJsonResponse(400, { ok: false, error: 'missing_payload_arg', cmd });\n }\n const payloadPath = handlers.normalizeTransportPath?.(rawPayloadPath) ?? rawPayloadPath;\n const result = await handlers.runCommand?.({ body, cmd, payloadPath, rawPayloadPath, route });\n return createPlayableAuthoringJsonResponse(200, result ?? { ok: true, cmd });\n}\n\nasync function handleSaveRoute(\n route: PlayableAuthoringRouteMatch,\n body: Record<string, unknown>,\n handlers: PlayableAuthoringServerHandlers,\n): Promise<PlayableAuthoringServerResponse> {\n const mode: PlayableAuthoringSaveMode = body.mode === 'prepare-platform-save'\n ? 'prepare-platform-save'\n : 'local-commit-save';\n const result = await handlers.saveEditorScene?.({\n body,\n mode,\n rawEditorScene: body.editorScene,\n route,\n });\n return createPlayableAuthoringJsonResponse(200, result ?? { ok: false, error: 'not_found' });\n}\n\nasync function handleCommitRoute(\n route: PlayableAuthoringRouteMatch,\n body: Record<string, unknown>,\n handlers: PlayableAuthoringServerHandlers,\n): Promise<Record<string, unknown>> {\n return handlers.commit?.({ body, route }) ?? {\n ok: false,\n error: 'platform_commit_route_disabled',\n message: 'Save through /__fps_editor_authoring/save-editor-scene so scene.main remains the authoring source of truth.',\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/authoring-server/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,kCAAkC,EAEnC,MAAM,SAAS,CAAC;AAcjB,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,OAAO,GAAE,kCAAuC,GAC/C,2BAA2B,GAAG,IAAI,CAcpC"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/authoring-server/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,kCAAkC,EAEnC,MAAM,SAAS,CAAC;AAiBjB,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,OAAO,GAAE,kCAAuC,GAC/C,2BAA2B,GAAG,IAAI,CAcpC"}
@@ -4,6 +4,9 @@ const ROUTE_PREFIXES = [
4
4
  ['commit', '/commit'],
5
5
  ['editor-scene', '/editor-scene'],
6
6
  ['editor-asset-library', '/editor-asset-library'],
7
+ ['project-files', '/project-files'],
8
+ ['project-media', '/project-media'],
9
+ ['project-file', '/project-file'],
7
10
  ['save-editor-scene', '/save-editor-scene'],
8
11
  ['file', '/file'],
9
12
  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AC,IAAI,IAAI,CAAC;AACxE,CAAC;AAED,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;AACpF,CAAC","sourcesContent":["import type {\n PlayableAuthoringRouteMatch,\n PlayableAuthoringRouteMatchOptions,\n PlayableAuthoringRouteName,\n} from './types';\n\nconst DEFAULT_AUTHORING_PREFIXES = ['/__fps_editor_authoring'];\n\nconst ROUTE_PREFIXES: Array<readonly [PlayableAuthoringRouteName, string]> = [\n ['manifest', '/manifest'],\n ['commit', '/commit'],\n ['editor-scene', '/editor-scene'],\n ['editor-asset-library', '/editor-asset-library'],\n ['save-editor-scene', '/save-editor-scene'],\n ['file', '/file'],\n ['exec', '/exec'],\n];\n\nexport function matchPlayableAuthoringRoute(\n url: string | undefined,\n options: PlayableAuthoringRouteMatchOptions = {},\n): PlayableAuthoringRouteMatch | null {\n const pathname = new URL(url ?? '', 'http://localhost').pathname;\n const authoringPrefixes = options.prefixes ?? DEFAULT_AUTHORING_PREFIXES;\n const matchedPrefix = findPrefix(pathname, authoringPrefixes);\n if (!matchedPrefix) return null;\n\n const route = pathname.slice(matchedPrefix.length) || '/';\n const routeName = readRouteName(route);\n if (!routeName) return null;\n return {\n route,\n routeName,\n prefix: matchedPrefix,\n };\n}\n\nfunction findPrefix(pathname: string, prefixes: readonly string[]): string | null {\n return prefixes.find((prefix) => pathname.startsWith(prefix)) ?? null;\n}\n\nfunction readRouteName(route: string): PlayableAuthoringRouteName | null {\n return ROUTE_PREFIXES.find(([, prefix]) => route.startsWith(prefix))?.[0] ?? null;\n}\n"]}
1
+ {"version":3,"file":"routes.js","sourceRoot":"","sources":["../../src/authoring-server/routes.ts"],"names":[],"mappings":"AAMA,MAAM,0BAA0B,GAAG,CAAC,yBAAyB,CAA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AC;AAED,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;AACpF,CAAC","sourcesContent":["import type {\n PlayableAuthoringRouteMatch,\n PlayableAuthoringRouteMatchOptions,\n PlayableAuthoringRouteName,\n} from './types';\n\nconst DEFAULT_AUTHORING_PREFIXES = ['/__fps_editor_authoring'];\n\nconst ROUTE_PREFIXES: Array<readonly [PlayableAuthoringRouteName, string]> = [\n ['manifest', '/manifest'],\n ['commit', '/commit'],\n ['editor-scene', '/editor-scene'],\n ['editor-asset-library', '/editor-asset-library'],\n ['project-files', '/project-files'],\n ['project-media', '/project-media'],\n ['project-file', '/project-file'],\n ['save-editor-scene', '/save-editor-scene'],\n ['file', '/file'],\n ['exec', '/exec'],\n];\n\nexport function matchPlayableAuthoringRoute(\n url: string | undefined,\n options: PlayableAuthoringRouteMatchOptions = {},\n): PlayableAuthoringRouteMatch | null {\n const pathname = new URL(url ?? '', 'http://localhost').pathname;\n const authoringPrefixes = options.prefixes ?? DEFAULT_AUTHORING_PREFIXES;\n const matchedPrefix = findPrefix(pathname, authoringPrefixes);\n if (!matchedPrefix) return null;\n\n const route = pathname.slice(matchedPrefix.length) || '/';\n const routeName = readRouteName(route);\n if (!routeName) return null;\n return {\n route,\n routeName,\n prefix: matchedPrefix,\n };\n}\n\nfunction findPrefix(pathname: string, prefixes: readonly string[]): string | null {\n return prefixes.find((prefix) => pathname.startsWith(prefix)) ?? null;\n}\n\nfunction readRouteName(route: string): PlayableAuthoringRouteName | null {\n return ROUTE_PREFIXES.find(([, prefix]) => route.startsWith(prefix))?.[0] ?? null;\n}\n"]}
@@ -1,4 +1,4 @@
1
- export type PlayableAuthoringRouteName = 'manifest' | 'commit' | 'editor-scene' | 'editor-asset-library' | 'save-editor-scene' | 'file' | 'exec';
1
+ export type PlayableAuthoringRouteName = 'manifest' | 'commit' | 'editor-scene' | 'editor-asset-library' | 'project-files' | 'project-file' | 'project-media' | 'save-editor-scene' | 'file' | 'exec';
2
2
  export type PlayableAuthoringSaveMode = 'local-commit-save' | 'prepare-platform-save';
3
3
  export interface PlayableAuthoringRouteMatch {
4
4
  route: string;
@@ -19,6 +19,11 @@ export interface PlayableAuthoringServerHandlers {
19
19
  normalizeTransportPath?: (path: string) => string;
20
20
  loadManifest?: (route: PlayableAuthoringRouteMatch) => Record<string, unknown> | Promise<Record<string, unknown>>;
21
21
  loadEditorAssetLibrary?: (route: PlayableAuthoringRouteMatch) => Record<string, unknown> | Promise<Record<string, unknown>>;
22
+ loadProjectFiles?: (route: PlayableAuthoringRouteMatch) => Record<string, unknown> | Promise<Record<string, unknown>>;
23
+ loadProjectFile?: (input: {
24
+ path: string;
25
+ route: PlayableAuthoringRouteMatch;
26
+ }) => Record<string, unknown> | Promise<Record<string, unknown>>;
22
27
  loadEditorScene?: (route: PlayableAuthoringRouteMatch) => Record<string, unknown> | Promise<Record<string, unknown>>;
23
28
  writeFile?: (input: {
24
29
  body: Record<string, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/authoring-server/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0BAA0B,GAClC,UAAU,GACV,QAAQ,GACR,cAAc,GACd,sBAAsB,GACtB,mBAAmB,GACnB,MAAM,GACN,MAAM,CAAC;AAEX,MAAM,MAAM,yBAAyB,GAAG,mBAAmB,GAAG,uBAAuB,CAAC;AAEtF,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,0BAA0B,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,8BAA8B;IAC7C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAA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ACxB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC9B,IAAI,EAAE,yBAAyB,CAAC;QAChC,cAAc,EAAE,OAAO,CAAC;QACxB,KAAK,EAAE,2BAA2B,CAAC;KACpC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACjE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE;QACf,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC9B,KAAK,EAAE,2BAA2B,CAAC;KACpC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAClE;AAED,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/authoring-server/types.ts"],"names":[],"mappings":"","sourcesContent":["export type PlayableAuthoringRouteName =\n | 'manifest'\n | 'commit'\n | 'editor-scene'\n | 'editor-asset-library'\n | 'save-editor-scene'\n | 'file'\n | 'exec';\n\nexport type PlayableAuthoringSaveMode = 'local-commit-save' | 'prepare-platform-save';\n\nexport interface PlayableAuthoringRouteMatch {\n route: string;\n routeName: PlayableAuthoringRouteName;\n prefix: string;\n}\n\nexport interface PlayableAuthoringServerRequest {\n url?: string;\n method?: string;\n body?: Record<string, unknown>;\n}\n\nexport interface PlayableAuthoringServerResponse {\n statusCode: number;\n body: Record<string, unknown> | null;\n}\n\nexport interface PlayableAuthoringServerHandlers {\n readBody?: (\n request: PlayableAuthoringServerRequest,\n route: PlayableAuthoringRouteMatch,\n ) => Record<string, unknown> | Promise<Record<string, unknown>>;\n normalizeTransportPath?: (path: string) => string;\n loadManifest?: (route: PlayableAuthoringRouteMatch) => Record<string, unknown> | Promise<Record<string, unknown>>;\n loadEditorAssetLibrary?: (route: PlayableAuthoringRouteMatch) => Record<string, unknown> | Promise<Record<string, unknown>>;\n loadEditorScene?: (route: PlayableAuthoringRouteMatch) => Record<string, unknown> | Promise<Record<string, unknown>>;\n writeFile?: (input: {\n body: Record<string, unknown>;\n path: string;\n rawPath: string;\n content: unknown;\n text: string;\n route: PlayableAuthoringRouteMatch;\n }) => Record<string, unknown> | Promise<Record<string, unknown>>;\n runCommand?: (input: {\n body: Record<string, unknown>;\n cmd: string;\n payloadPath: string;\n rawPayloadPath: string;\n route: PlayableAuthoringRouteMatch;\n }) => Record<string, unknown> | Promise<Record<string, unknown>>;\n saveEditorScene?: (input: {\n body: Record<string, unknown>;\n mode: PlayableAuthoringSaveMode;\n rawEditorScene: unknown;\n route: PlayableAuthoringRouteMatch;\n }) => Record<string, unknown> | Promise<Record<string, unknown>>;\n commit?: (input: {\n body: Record<string, unknown>;\n route: PlayableAuthoringRouteMatch;\n }) => Record<string, unknown> | Promise<Record<string, unknown>>;\n}\n\nexport interface PlayableAuthoringRouteMatchOptions {\n prefixes?: readonly string[];\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/authoring-server/types.ts"],"names":[],"mappings":"","sourcesContent":["export type PlayableAuthoringRouteName =\n | 'manifest'\n | 'commit'\n | 'editor-scene'\n | 'editor-asset-library'\n | 'project-files'\n | 'project-file'\n | 'project-media'\n | 'save-editor-scene'\n | 'file'\n | 'exec';\n\nexport type PlayableAuthoringSaveMode = 'local-commit-save' | 'prepare-platform-save';\n\nexport interface PlayableAuthoringRouteMatch {\n route: string;\n routeName: PlayableAuthoringRouteName;\n prefix: string;\n}\n\nexport interface PlayableAuthoringServerRequest {\n url?: string;\n method?: string;\n body?: Record<string, unknown>;\n}\n\nexport interface PlayableAuthoringServerResponse {\n statusCode: number;\n body: Record<string, unknown> | null;\n}\n\nexport interface PlayableAuthoringServerHandlers {\n readBody?: (\n request: PlayableAuthoringServerRequest,\n route: PlayableAuthoringRouteMatch,\n ) => Record<string, unknown> | Promise<Record<string, unknown>>;\n normalizeTransportPath?: (path: string) => string;\n loadManifest?: (route: PlayableAuthoringRouteMatch) => Record<string, unknown> | Promise<Record<string, unknown>>;\n loadEditorAssetLibrary?: (route: PlayableAuthoringRouteMatch) => Record<string, unknown> | Promise<Record<string, unknown>>;\n loadProjectFiles?: (route: PlayableAuthoringRouteMatch) => Record<string, unknown> | Promise<Record<string, unknown>>;\n loadProjectFile?: (input: {\n path: string;\n route: PlayableAuthoringRouteMatch;\n }) => Record<string, unknown> | Promise<Record<string, unknown>>;\n loadEditorScene?: (route: PlayableAuthoringRouteMatch) => Record<string, unknown> | Promise<Record<string, unknown>>;\n writeFile?: (input: {\n body: Record<string, unknown>;\n path: string;\n rawPath: string;\n content: unknown;\n text: string;\n route: PlayableAuthoringRouteMatch;\n }) => Record<string, unknown> | Promise<Record<string, unknown>>;\n runCommand?: (input: {\n body: Record<string, unknown>;\n cmd: string;\n payloadPath: string;\n rawPayloadPath: string;\n route: PlayableAuthoringRouteMatch;\n }) => Record<string, unknown> | Promise<Record<string, unknown>>;\n saveEditorScene?: (input: {\n body: Record<string, unknown>;\n mode: PlayableAuthoringSaveMode;\n rawEditorScene: unknown;\n route: PlayableAuthoringRouteMatch;\n }) => Record<string, unknown> | Promise<Record<string, unknown>>;\n commit?: (input: {\n body: Record<string, unknown>;\n route: PlayableAuthoringRouteMatch;\n }) => Record<string, unknown> | Promise<Record<string, unknown>>;\n}\n\nexport interface PlayableAuthoringRouteMatchOptions {\n prefixes?: readonly string[];\n}\n"]}
@@ -15,6 +15,7 @@ export * from './session/index';
15
15
  export * from './marker-scene/index';
16
16
  export * from './inspector/index';
17
17
  export * from './asset-library/index';
18
+ export * from './project-files/index';
18
19
  export * from './asset-database/index';
19
20
  export * from './asset-bridge/index';
20
21
  export * from './asset-registration/index';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AAItC,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0CAA0C,CAAC;AACzD,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AAGhE,cAAc,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AAItC,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0CAA0C,CAAC;AACzD,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AAGhE,cAAc,+BAA+B,CAAC"}
@@ -15,6 +15,7 @@ export * from './session/index.js';
15
15
  export * from './marker-scene/index.js';
16
16
  export * from './inspector/index.js';
17
17
  export * from './asset-library/index.js';
18
+ export * from './project-files/index.js';
18
19
  export * from './asset-database/index.js';
19
20
  export * from './asset-bridge/index.js';
20
21
  export * from './asset-registration/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,gFAAgF;AAChF,4EAA4E;AAC5E,sBAAsB;AACtB,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0CAA0C,CAAC;AACzD,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AAChE,sEAAsE;AACtE,uDAAuD;AACvD,cAAc,+BAA+B,CAAC","sourcesContent":["export * from './document/index';\nexport * from './product/index';\nexport * from './authoring/index';\nexport * from './authoring-client/index';\nexport * from './authoring-server/index';\nexport * from './bridge-command/index';\nexport * from './core-contracts/index';\nexport * from './package-resolution/index';\nexport * from './upgrade-doctor/types';\nexport * from './upgrade-doctor/report';\nexport * from './upgrade-doctor/host';\nexport * from './scene-source/index';\nexport * from './runtime-preview/index';\nexport * from './session/index';\nexport * from './marker-scene/index';\nexport * from './inspector/index';\nexport * from './asset-library/index';\nexport * from './asset-database/index';\nexport * from './asset-bridge/index';\nexport * from './asset-registration/index';\nexport * from './asset-placement/index';\nexport * from './scene-compiler/index';\nexport * from './field-schema/index';\nexport * from './commands/index';\nexport * from './serialized-property/index';\nexport * from './mutation/index';\nexport * from './local-harness/index';\n// Editor entry resource identity is part of the browser-safe public SDK, but is\n// intentionally kept out of the legacy local-harness barrel consumed by the\n// Vite Tooling graph.\nexport * from './local-harness/editor-entry-manifest';\nexport * from './local-harness/editor-entry-module';\nexport * from './local-harness/editor-entry-performance';\nexport * from './camera-debug/index';\nexport * from './lighting-debug/index';\nexport * from './lighting-preview/index';\nexport * from './material-binding/index';\nexport * from './prefab-stage/index';\nexport * from './rendering-profile/index';\nexport * from './static-shadows/index';\nexport * from './shadow-system/resolver';\nexport { canonicalizePlayableJsonNumbers } from './shared/json';\n// Temporary product-surface bridge. Step 3 moves runtime consumers to\n// @fps-games/playable-runtime and removes this export.\nexport * from '@fps-games/playable-rendering';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,gFAAgF;AAChF,4EAA4E;AAC5E,sBAAsB;AACtB,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0CAA0C,CAAC;AACzD,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AAChE,sEAAsE;AACtE,uDAAuD;AACvD,cAAc,+BAA+B,CAAC","sourcesContent":["export * from './document/index';\nexport * from './product/index';\nexport * from './authoring/index';\nexport * from './authoring-client/index';\nexport * from './authoring-server/index';\nexport * from './bridge-command/index';\nexport * from './core-contracts/index';\nexport * from './package-resolution/index';\nexport * from './upgrade-doctor/types';\nexport * from './upgrade-doctor/report';\nexport * from './upgrade-doctor/host';\nexport * from './scene-source/index';\nexport * from './runtime-preview/index';\nexport * from './session/index';\nexport * from './marker-scene/index';\nexport * from './inspector/index';\nexport * from './asset-library/index';\nexport * from './project-files/index';\nexport * from './asset-database/index';\nexport * from './asset-bridge/index';\nexport * from './asset-registration/index';\nexport * from './asset-placement/index';\nexport * from './scene-compiler/index';\nexport * from './field-schema/index';\nexport * from './commands/index';\nexport * from './serialized-property/index';\nexport * from './mutation/index';\nexport * from './local-harness/index';\n// Editor entry resource identity is part of the browser-safe public SDK, but is\n// intentionally kept out of the legacy local-harness barrel consumed by the\n// Vite Tooling graph.\nexport * from './local-harness/editor-entry-manifest';\nexport * from './local-harness/editor-entry-module';\nexport * from './local-harness/editor-entry-performance';\nexport * from './camera-debug/index';\nexport * from './lighting-debug/index';\nexport * from './lighting-preview/index';\nexport * from './material-binding/index';\nexport * from './prefab-stage/index';\nexport * from './rendering-profile/index';\nexport * from './static-shadows/index';\nexport * from './shadow-system/resolver';\nexport { canonicalizePlayableJsonNumbers } from './shared/json';\n// Temporary product-surface bridge. Step 3 moves runtime consumers to\n// @fps-games/playable-runtime and removes this export.\nexport * from '@fps-games/playable-rendering';\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { PlayableEditorBundledPackageRoots, PlayableEditorBundledPackageRootsOptions, PlayableEditorBundledPackageAliasPlanOptions, PlayableEditorFileExists, PlayableEditorMissingPackageAliasFile, PlayableEditorPackageAliasPlan, PlayableEditorSourcePackageAliasPlanOptions, PlayableEditorSourceTsconfigPathsPlanOptions, PlayableEditorTsconfigPathsPlan } from './types';
2
- export declare const PLAYABLE_EDITOR_PACKAGE_IDS: readonly ["@fps-games/editor", "@fps-games/editor/vite", "@fps-games/babylon-renderer", "@fps-games/babylon-renderer/config", "@fps-games/babylon-renderer/renderer", "@fps-games/editor-tooling", "@fps-games/editor-tooling/node", "@fps-games/editor-tooling/vite", "@fps-games/plugin-api", "@fps-games/plugin-hierarchy", "@fps-games/plugin-hierarchy/editor", "@fps-games/plugin-assets", "@fps-games/plugin-assets/runtime", "@fps-games/plugin-materials", "@fps-games/plugin-materials/runtime", "@fps-games/plugin-markers", "@fps-games/plugin-markers/runtime", "@fps-games/plugin-rendering", "@fps-games/plugin-rendering/runtime", "@fps-games/plugin-shadows", "@fps-games/plugin-shadows/runtime", "@fps-games/plugin-shadow-map-experiment", "@fps-games/plugin-shadow-map-experiment/runtime", "@fps-games/plugin-host", "@fps-games/plugin-scene", "@fps-games/plugin-scene/runtime", "@fps-games/playable-assets", "@fps-games/playable-contracts", "@fps-games/playable-rendering", "@fps-games/playable-rendering/runtime", "@fps-games/playable-runtime", "@fps-games/playable-runtime-data", "@fps-games/playable-scene", "@fps-games/editor/playable-runtime", "@fps-games/editor/playable-runtime/babylon", "@fps-games/editor/playable-sdk", "@fps-games/editor/playable-sdk/upgrade-doctor", "@fps-games/editor/playable-sdk/vite", "@fps-games/editor-playable-sdk", "@fps-games/editor-playable-sdk/upgrade-doctor", "@fps-games/editor-playable-sdk/vite", "@fps-games/editor-babylon", "@fps-games/editor-browser", "@fps-games/editor-core", "@fps-games/editor-core/plugin-host", "@fps-games/editor-forge-play", "@fps-games/editor-protocol", "@fps-games/editor-ui", "@playcanvas/observer", "@playcanvas/pcui", "semver"];
2
+ export declare const PLAYABLE_EDITOR_PACKAGE_IDS: readonly ["@fps-games/editor", "@fps-games/editor/vite", "@fps-games/babylon-renderer", "@fps-games/babylon-renderer/config", "@fps-games/babylon-renderer/renderer", "@fps-games/editor-tooling", "@fps-games/editor-tooling/node", "@fps-games/editor-tooling/vite", "@fps-games/plugin-api", "@fps-games/plugin-hierarchy", "@fps-games/plugin-hierarchy/editor", "@fps-games/plugin-assets", "@fps-games/plugin-assets/runtime", "@fps-games/plugin-assets/renderer", "@fps-games/plugin-assets/resources", "@fps-games/plugin-materials", "@fps-games/plugin-materials/runtime", "@fps-games/plugin-markers", "@fps-games/plugin-markers/runtime", "@fps-games/plugin-rendering", "@fps-games/plugin-rendering/runtime", "@fps-games/plugin-shadows", "@fps-games/plugin-shadows/runtime", "@fps-games/plugin-shadow-map-experiment", "@fps-games/plugin-shadow-map-experiment/runtime", "@fps-games/plugin-host", "@fps-games/plugin-scene", "@fps-games/plugin-scene/runtime", "@fps-games/playable-assets", "@fps-games/playable-contracts", "@fps-games/playable-rendering", "@fps-games/playable-rendering/runtime", "@fps-games/playable-runtime", "@fps-games/playable-runtime-data", "@fps-games/playable-scene", "@fps-games/editor/playable-runtime", "@fps-games/editor/playable-runtime/babylon", "@fps-games/editor/playable-sdk", "@fps-games/editor/playable-sdk/upgrade-doctor", "@fps-games/editor/playable-sdk/vite", "@fps-games/editor-playable-sdk", "@fps-games/editor-playable-sdk/upgrade-doctor", "@fps-games/editor-playable-sdk/vite", "@fps-games/editor-babylon", "@fps-games/editor-browser", "@fps-games/editor-core", "@fps-games/editor-core/plugin-host", "@fps-games/editor-forge-play", "@fps-games/editor-protocol", "@fps-games/editor-ui", "@playcanvas/observer", "@playcanvas/pcui", "semver"];
3
3
  export declare const PLAYABLE_EDITOR_BUNDLED_ALIAS_PACKAGE_IDS: readonly ["@fps-games/babylon-renderer", ...("@fps-games/plugin-hierarchy" | "@fps-games/plugin-hierarchy/editor" | "@fps-games/editor-playable-sdk/upgrade-doctor" | "@fps-games/editor-playable-sdk/vite" | "@fps-games/editor-babylon" | "@fps-games/editor-browser" | "@fps-games/editor-core" | "@fps-games/editor-core/plugin-host" | "@fps-games/editor-forge-play" | "@fps-games/editor-protocol" | "@fps-games/editor-ui")[], "semver"];
4
4
  export declare function createPlayableEditorSourcePackageAliasPlan(repoRoot: string, options?: PlayableEditorSourcePackageAliasPlanOptions): PlayableEditorPackageAliasPlan;
5
5
  export declare function createPlayableEditorSourceTsconfigPathsPlan(repoRoot: string, options?: PlayableEditorSourceTsconfigPathsPlanOptions): PlayableEditorTsconfigPathsPlan;
@@ -1 +1 @@
1
- {"version":3,"file":"aliases.d.ts","sourceRoot":"","sources":["../../src/package-resolution/aliases.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,wCAAwC,EACxC,4CAA4C,EAC5C,wBA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AM,EAChB,OAAO,GAAE,4CAAiD,GACzD,+BAA+B,CAkBjC;AAED,wBAAgB,uCAAuC,CACrD,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,wCAA6C,GACrD,iCAAiC,CAQnC;AAED,wBAAgB,2CAA2C,CACzD,OAAO,EAAE,4CAA4C,GACpD,8BAA8B,CA8BhC;AAED,wBAAgB,6CAA6C,CAC3D,IAAI,EAAE,8BAA8B,EACpC,UAAU,EAAE,wBAAwB,GACnC,qCAAqC,EAAE,CAIzC;AAED,wBAAgB,yCAAyC,CACvD,OAAO,EAAE,SAAS,qCAAqC,EAAE,EACzD,KAAK,SAAkE,GACtE,MAAM,CAKR"}
@@ -12,6 +12,8 @@ export const PLAYABLE_EDITOR_PACKAGE_IDS = [
12
12
  '@fps-games/plugin-hierarchy/editor',
13
13
  '@fps-games/plugin-assets',
14
14
  '@fps-games/plugin-assets/runtime',
15
+ '@fps-games/plugin-assets/renderer',
16
+ '@fps-games/plugin-assets/resources',
15
17
  '@fps-games/plugin-materials',
16
18
  '@fps-games/plugin-materials/runtime',
17
19
  '@fps-games/plugin-markers',
@@ -62,6 +64,8 @@ const SOURCE_ALIAS_FILES = [
62
64
  ['@fps-games/plugin-hierarchy/editor', 'packages/plugin-hierarchy/src/editor.ts'],
63
65
  ['@fps-games/plugin-hierarchy', 'packages/plugin-hierarchy/src/reference.ts'],
64
66
  ['@fps-games/plugin-assets/runtime', 'packages/plugin-assets/src/runtime.ts'],
67
+ ['@fps-games/plugin-assets/renderer', 'packages/plugin-assets/src/renderer.ts'],
68
+ ['@fps-games/plugin-assets/resources', 'packages/plugin-assets/src/resources.ts'],
65
69
  ['@fps-games/plugin-assets', 'packages/plugin-assets/src/reference.ts'],
66
70
  ['@fps-games/plugin-materials/runtime', 'packages/plugin-materials/src/runtime.ts'],
67
71
  ['@fps-games/plugin-materials', 'packages/plugin-materials/src/reference.ts'],