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

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 (514) hide show
  1. package/dist/build-info.json +44 -44
  2. package/dist/editor-commands/capabilities/assets.d.ts +8 -0
  3. package/dist/editor-commands/capabilities/assets.d.ts.map +1 -0
  4. package/dist/{agent-bridge → editor-commands}/capabilities/assets.js +41 -41
  5. package/dist/editor-commands/capabilities/assets.js.map +1 -0
  6. package/dist/editor-commands/capabilities/editor-state.d.ts +5 -0
  7. package/dist/editor-commands/capabilities/editor-state.d.ts.map +1 -0
  8. package/dist/{agent-bridge → editor-commands}/capabilities/editor-state.js +22 -22
  9. package/dist/editor-commands/capabilities/editor-state.js.map +1 -0
  10. package/dist/editor-commands/capabilities/hierarchy.d.ts +4 -0
  11. package/dist/editor-commands/capabilities/hierarchy.d.ts.map +1 -0
  12. package/dist/{agent-bridge → editor-commands}/capabilities/hierarchy.js +5 -5
  13. package/dist/editor-commands/capabilities/hierarchy.js.map +1 -0
  14. package/dist/editor-commands/capabilities/host-lifecycle.d.ts +11 -0
  15. package/dist/editor-commands/capabilities/host-lifecycle.d.ts.map +1 -0
  16. package/dist/editor-commands/capabilities/host-lifecycle.js +149 -0
  17. package/dist/editor-commands/capabilities/host-lifecycle.js.map +1 -0
  18. package/dist/editor-commands/capabilities/prefabs.d.ts +5 -0
  19. package/dist/editor-commands/capabilities/prefabs.d.ts.map +1 -0
  20. package/dist/{agent-bridge → editor-commands}/capabilities/prefabs.js +93 -93
  21. package/dist/editor-commands/capabilities/prefabs.js.map +1 -0
  22. package/dist/editor-commands/capabilities/scene-objects.d.ts +8 -0
  23. package/dist/editor-commands/capabilities/scene-objects.d.ts.map +1 -0
  24. package/dist/editor-commands/capabilities/scene-objects.js +480 -0
  25. package/dist/editor-commands/capabilities/scene-objects.js.map +1 -0
  26. package/dist/editor-commands/capabilities/selection.d.ts +5 -0
  27. package/dist/editor-commands/capabilities/selection.d.ts.map +1 -0
  28. package/dist/editor-commands/capabilities/selection.js +60 -0
  29. package/dist/editor-commands/capabilities/selection.js.map +1 -0
  30. package/dist/editor-commands/capabilities/shadows.d.ts +5 -0
  31. package/dist/editor-commands/capabilities/shadows.d.ts.map +1 -0
  32. package/dist/{agent-bridge → editor-commands}/capabilities/shadows.js +74 -74
  33. package/dist/editor-commands/capabilities/shadows.js.map +1 -0
  34. package/dist/editor-commands/capabilities/transform.d.ts +5 -0
  35. package/dist/editor-commands/capabilities/transform.d.ts.map +1 -0
  36. package/dist/editor-commands/capabilities/transform.js +164 -0
  37. package/dist/editor-commands/capabilities/transform.js.map +1 -0
  38. package/dist/editor-commands/capabilities/ui-regions.d.ts +4 -0
  39. package/dist/editor-commands/capabilities/ui-regions.d.ts.map +1 -0
  40. package/dist/{agent-bridge → editor-commands}/capabilities/ui-regions.js +55 -57
  41. package/dist/editor-commands/capabilities/ui-regions.js.map +1 -0
  42. package/dist/editor-commands/capabilities/viewport.d.ts +5 -0
  43. package/dist/editor-commands/capabilities/viewport.d.ts.map +1 -0
  44. package/dist/{agent-bridge → editor-commands}/capabilities/viewport.js +100 -100
  45. package/dist/editor-commands/capabilities/viewport.js.map +1 -0
  46. package/dist/editor-commands/command-sources.d.ts +7 -0
  47. package/dist/editor-commands/command-sources.d.ts.map +1 -0
  48. package/dist/editor-commands/command-sources.js +34 -0
  49. package/dist/editor-commands/command-sources.js.map +1 -0
  50. package/dist/editor-commands/diagnostics.d.ts +12 -0
  51. package/dist/editor-commands/diagnostics.d.ts.map +1 -0
  52. package/dist/{agent-bridge → editor-commands}/diagnostics.js +4 -4
  53. package/dist/editor-commands/diagnostics.js.map +1 -0
  54. package/dist/{agent-bridge → editor-commands}/index.d.ts +1 -1
  55. package/dist/editor-commands/index.d.ts.map +1 -0
  56. package/dist/{agent-bridge → editor-commands}/index.js +1 -1
  57. package/dist/editor-commands/index.js.map +1 -0
  58. package/dist/editor-commands/register.d.ts +4 -0
  59. package/dist/editor-commands/register.d.ts.map +1 -0
  60. package/dist/{agent-bridge → editor-commands}/register.js +323 -286
  61. package/dist/editor-commands/register.js.map +1 -0
  62. package/dist/{agent-bridge → editor-commands}/shared.d.ts +80 -80
  63. package/dist/editor-commands/shared.d.ts.map +1 -0
  64. package/dist/{agent-bridge → editor-commands}/shared.js +29 -29
  65. package/dist/editor-commands/shared.js.map +1 -0
  66. package/dist/editor-commands/source-types.d.ts +110 -0
  67. package/dist/editor-commands/source-types.d.ts.map +1 -0
  68. package/dist/editor-commands/source-types.js.map +1 -0
  69. package/dist/editor-plugin-commands.d.ts +4 -0
  70. package/dist/editor-plugin-commands.d.ts.map +1 -0
  71. package/dist/editor-plugin-commands.js +18 -0
  72. package/dist/editor-plugin-commands.js.map +1 -0
  73. package/dist/index.d.ts +2 -2
  74. package/dist/index.d.ts.map +1 -1
  75. package/dist/index.js +1 -1
  76. package/dist/index.js.map +1 -1
  77. package/dist/local-editor-commands.d.ts +2 -0
  78. package/dist/local-editor-commands.d.ts.map +1 -0
  79. package/dist/local-editor-commands.js +2 -0
  80. package/dist/local-editor-commands.js.map +1 -0
  81. package/dist/local-editor-harness.d.ts +35 -21
  82. package/dist/local-editor-harness.d.ts.map +1 -1
  83. package/dist/local-editor-harness.js +1721 -367
  84. package/dist/local-editor-harness.js.map +1 -1
  85. package/dist/local-editor-prefab-stage-transaction.d.ts +2 -1
  86. package/dist/local-editor-prefab-stage-transaction.d.ts.map +1 -1
  87. package/dist/local-editor-prefab-stage-transaction.js +6 -5
  88. package/dist/local-editor-prefab-stage-transaction.js.map +1 -1
  89. package/dist/local-editor-scene-view-interaction-runtime.d.ts.map +1 -1
  90. package/dist/local-editor-scene-view-interaction-runtime.js +2 -5
  91. package/dist/local-editor-scene-view-interaction-runtime.js.map +1 -1
  92. package/dist/playable-local-editor-entry.d.ts +10 -0
  93. package/dist/playable-local-editor-entry.d.ts.map +1 -1
  94. package/dist/playable-local-editor-entry.js +10 -2
  95. package/dist/playable-local-editor-entry.js.map +1 -1
  96. package/dist/playable-local-editor-host.d.ts +3 -32
  97. package/dist/playable-local-editor-host.d.ts.map +1 -1
  98. package/dist/playable-local-editor-host.js +6 -70
  99. package/dist/playable-local-editor-host.js.map +1 -1
  100. package/dist/playable-product-local-editor.d.ts +1 -2
  101. package/dist/playable-product-local-editor.d.ts.map +1 -1
  102. package/dist/playable-product-local-editor.js +0 -1
  103. package/dist/playable-product-local-editor.js.map +1 -1
  104. package/dist/playable-product-projection-preview.d.ts.map +1 -1
  105. package/dist/playable-product-projection-preview.js +1 -1
  106. package/dist/playable-product-projection-preview.js.map +1 -1
  107. package/dist/playable-product-scene-capabilities.d.ts +0 -2
  108. package/dist/playable-product-scene-capabilities.d.ts.map +1 -1
  109. package/dist/playable-product-scene-capabilities.js +33 -6
  110. package/dist/playable-product-scene-capabilities.js.map +1 -1
  111. package/dist/playable-runtime-babylon.d.ts +4 -0
  112. package/dist/playable-runtime-babylon.d.ts.map +1 -1
  113. package/dist/playable-runtime-babylon.js +4 -0
  114. package/dist/playable-runtime-babylon.js.map +1 -1
  115. package/dist/playable-sdk.d.ts +1 -1
  116. package/dist/playable-sdk.d.ts.map +1 -1
  117. package/dist/playable-sdk.js.map +1 -1
  118. package/dist/playable-standard-project.d.ts +0 -2
  119. package/dist/playable-standard-project.d.ts.map +1 -1
  120. package/dist/playable-standard-project.js +1 -2
  121. package/dist/playable-standard-project.js.map +1 -1
  122. package/dist/project-service-projection.d.ts +16 -0
  123. package/dist/project-service-projection.d.ts.map +1 -0
  124. package/dist/project-service-projection.js +67 -0
  125. package/dist/project-service-projection.js.map +1 -0
  126. package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.d.ts +18 -0
  127. package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.d.ts.map +1 -1
  128. package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.js +54 -18
  129. package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.js.map +1 -1
  130. package/node_modules/@fps-games/babylon-renderer/package.json +9 -9
  131. package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +1 -0
  132. package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
  133. package/node_modules/@fps-games/editor-babylon/dist/projection.js +1 -1
  134. package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
  135. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts.map +1 -1
  136. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js +127 -13
  137. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js.map +1 -1
  138. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -1
  139. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +66 -1
  140. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -1
  141. package/node_modules/@fps-games/editor-babylon/package.json +6 -6
  142. package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.d.ts +32 -0
  143. package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.d.ts.map +1 -0
  144. package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.js +254 -0
  145. package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.js.map +1 -0
  146. package/node_modules/@fps-games/editor-browser/dist/index.d.ts +3 -1
  147. package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
  148. package/node_modules/@fps-games/editor-browser/dist/index.js +2 -0
  149. package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
  150. package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.d.ts +68 -0
  151. package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.d.ts.map +1 -0
  152. package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.js +650 -0
  153. package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.js.map +1 -0
  154. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.d.ts +1 -0
  155. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.d.ts.map +1 -1
  156. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.js +22 -0
  157. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.js.map +1 -1
  158. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.d.ts +8 -0
  159. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.d.ts.map +1 -1
  160. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js +117 -6
  161. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js.map +1 -1
  162. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.d.ts +14 -1
  163. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.d.ts.map +1 -1
  164. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.js +100 -1
  165. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.js.map +1 -1
  166. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts +8 -1
  167. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -1
  168. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +75 -2
  169. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -1
  170. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +37 -12
  171. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
  172. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.js.map +1 -1
  173. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +25 -2
  174. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
  175. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +332 -107
  176. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
  177. package/node_modules/@fps-games/editor-browser/package.json +7 -7
  178. package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.d.ts +107 -0
  179. package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.d.ts.map +1 -0
  180. package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.js +1211 -0
  181. package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.js.map +1 -0
  182. package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.d.ts +34 -0
  183. package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.d.ts.map +1 -0
  184. package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.js +260 -0
  185. package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.js.map +1 -0
  186. package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.d.ts +9 -0
  187. package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.d.ts.map +1 -0
  188. package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.js +14 -0
  189. package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.js.map +1 -0
  190. package/node_modules/@fps-games/editor-core/dist/editor-command-observability.d.ts +18 -0
  191. package/node_modules/@fps-games/editor-core/dist/editor-command-observability.d.ts.map +1 -0
  192. package/node_modules/@fps-games/editor-core/dist/editor-command-observability.js +113 -0
  193. package/node_modules/@fps-games/editor-core/dist/editor-command-observability.js.map +1 -0
  194. package/node_modules/@fps-games/editor-core/dist/editor-command-system.d.ts +82 -0
  195. package/node_modules/@fps-games/editor-core/dist/editor-command-system.d.ts.map +1 -0
  196. package/node_modules/@fps-games/editor-core/dist/editor-command-system.js +1098 -0
  197. package/node_modules/@fps-games/editor-core/dist/editor-command-system.js.map +1 -0
  198. package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.d.ts +6 -7
  199. package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.d.ts.map +1 -1
  200. package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.js +62 -103
  201. package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.js.map +1 -1
  202. package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.d.ts +30 -0
  203. package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.d.ts.map +1 -0
  204. package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.js +540 -0
  205. package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.js.map +1 -0
  206. package/node_modules/@fps-games/editor-core/dist/editor-session-authority.d.ts +9 -0
  207. package/node_modules/@fps-games/editor-core/dist/editor-session-authority.d.ts.map +1 -0
  208. package/node_modules/@fps-games/editor-core/dist/editor-session-authority.js +61 -0
  209. package/node_modules/@fps-games/editor-core/dist/editor-session-authority.js.map +1 -0
  210. package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts +55 -0
  211. package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts.map +1 -1
  212. package/node_modules/@fps-games/editor-core/dist/editor-session.js +247 -6
  213. package/node_modules/@fps-games/editor-core/dist/editor-session.js.map +1 -1
  214. package/node_modules/@fps-games/editor-core/dist/index.d.ts +6 -2
  215. package/node_modules/@fps-games/editor-core/dist/index.d.ts.map +1 -1
  216. package/node_modules/@fps-games/editor-core/dist/index.js +6 -2
  217. package/node_modules/@fps-games/editor-core/dist/index.js.map +1 -1
  218. package/node_modules/@fps-games/editor-core/package.json +6 -6
  219. package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts +0 -1
  220. package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts.map +1 -1
  221. package/node_modules/@fps-games/editor-forge-play/dist/index.js +0 -1
  222. package/node_modules/@fps-games/editor-forge-play/dist/index.js.map +1 -1
  223. package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
  224. package/node_modules/@fps-games/editor-playable-sdk/dist/bridge-command/protocol.d.ts +2 -0
  225. package/node_modules/@fps-games/editor-playable-sdk/dist/bridge-command/protocol.d.ts.map +1 -1
  226. package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.d.ts.map +1 -1
  227. package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js +41 -1
  228. package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js.map +1 -1
  229. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts +27 -1
  230. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts.map +1 -1
  231. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.js.map +1 -1
  232. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.d.ts +2 -0
  233. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.d.ts.map +1 -1
  234. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js +214 -7
  235. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js.map +1 -1
  236. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.d.ts +1 -0
  237. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.d.ts.map +1 -1
  238. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.js +11 -3
  239. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.js.map +1 -1
  240. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.d.ts +2 -4
  241. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.d.ts.map +1 -1
  242. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.js +0 -1
  243. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.js.map +1 -1
  244. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.d.ts.map +1 -1
  245. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.js +77 -31
  246. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.js.map +1 -1
  247. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.d.ts +8 -1
  248. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.d.ts.map +1 -1
  249. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.js.map +1 -1
  250. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.d.ts +21 -1
  251. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.d.ts.map +1 -1
  252. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.js +90 -4
  253. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.js.map +1 -1
  254. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.d.ts +27 -1
  255. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.d.ts.map +1 -1
  256. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.js +161 -1
  257. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.js.map +1 -1
  258. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.d.ts +2 -2
  259. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.d.ts.map +1 -1
  260. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.js +5 -92
  261. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.js.map +1 -1
  262. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.d.ts +7 -0
  263. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.d.ts.map +1 -1
  264. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.js +26 -9
  265. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.js.map +1 -1
  266. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.d.ts +9 -0
  267. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.d.ts.map +1 -1
  268. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.js +19 -8
  269. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.js.map +1 -1
  270. package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.d.ts +5 -0
  271. package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.d.ts.map +1 -1
  272. package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.js +16 -4
  273. package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.js.map +1 -1
  274. package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.d.ts +9 -0
  275. package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.d.ts.map +1 -1
  276. package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.js +12 -2
  277. package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.js.map +1 -1
  278. package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.d.ts +2 -1
  279. package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.d.ts.map +1 -1
  280. package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.js +10 -5
  281. package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.js.map +1 -1
  282. package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.d.ts +1 -0
  283. package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.d.ts.map +1 -1
  284. package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.js +1 -0
  285. package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.js.map +1 -1
  286. package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.d.ts +17 -82
  287. package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.d.ts.map +1 -1
  288. package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.js +53 -57
  289. package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.js.map +1 -1
  290. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.d.ts.map +1 -1
  291. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.js +3 -2
  292. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.js.map +1 -1
  293. package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.d.ts +10 -0
  294. package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.d.ts.map +1 -0
  295. package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.js +256 -0
  296. package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.js.map +1 -0
  297. package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.d.ts.map +1 -1
  298. package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.js +7 -5
  299. package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.js.map +1 -1
  300. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts.map +1 -1
  301. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js +8 -0
  302. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js.map +1 -1
  303. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts +1 -0
  304. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts.map +1 -1
  305. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.js.map +1 -1
  306. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js +134 -12
  307. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js.map +1 -1
  308. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.d.ts.map +1 -1
  309. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.js +47 -0
  310. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.js.map +1 -1
  311. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.d.ts +27 -0
  312. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.d.ts.map +1 -0
  313. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.js +592 -0
  314. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.js.map +1 -0
  315. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts +3 -1
  316. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts.map +1 -1
  317. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js +2 -1
  318. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js.map +1 -1
  319. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.d.ts.map +1 -1
  320. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.js +61 -6
  321. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.js.map +1 -1
  322. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.d.ts +0 -2
  323. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.d.ts.map +1 -1
  324. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.js +1 -10
  325. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.js.map +1 -1
  326. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts.map +1 -1
  327. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js +21 -0
  328. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js.map +1 -1
  329. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.d.ts +13 -0
  330. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.d.ts.map +1 -0
  331. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.js +18 -0
  332. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.js.map +1 -0
  333. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.d.ts +28 -0
  334. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.d.ts.map +1 -0
  335. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.js +863 -0
  336. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.js.map +1 -0
  337. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.d.ts +2 -0
  338. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.d.ts.map +1 -1
  339. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.js.map +1 -1
  340. package/node_modules/@fps-games/editor-playable-sdk/package.json +6 -6
  341. package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.d.ts +1626 -0
  342. package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.d.ts.map +1 -0
  343. package/node_modules/@fps-games/editor-protocol/dist/{agent-bridge.js → editor-command-capabilities.js} +766 -620
  344. package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.js.map +1 -0
  345. package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.d.ts +69 -0
  346. package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.d.ts.map +1 -0
  347. package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.js +22 -0
  348. package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.js.map +1 -0
  349. package/node_modules/@fps-games/editor-protocol/dist/editor-command.d.ts +136 -0
  350. package/node_modules/@fps-games/editor-protocol/dist/editor-command.d.ts.map +1 -0
  351. package/node_modules/@fps-games/editor-protocol/dist/editor-command.js +2 -0
  352. package/node_modules/@fps-games/editor-protocol/dist/editor-command.js.map +1 -0
  353. package/node_modules/@fps-games/editor-protocol/dist/editor-service.d.ts +225 -0
  354. package/node_modules/@fps-games/editor-protocol/dist/editor-service.d.ts.map +1 -0
  355. package/node_modules/@fps-games/editor-protocol/dist/editor-service.js +4 -0
  356. package/node_modules/@fps-games/editor-protocol/dist/editor-service.js.map +1 -0
  357. package/node_modules/@fps-games/editor-protocol/dist/index.d.ts +6 -3
  358. package/node_modules/@fps-games/editor-protocol/dist/index.d.ts.map +1 -1
  359. package/node_modules/@fps-games/editor-protocol/dist/index.js +6 -3
  360. package/node_modules/@fps-games/editor-protocol/dist/index.js.map +1 -1
  361. package/node_modules/@fps-games/editor-protocol/package.json +2 -2
  362. package/node_modules/@fps-games/editor-tooling/package.json +3 -3
  363. package/node_modules/@fps-games/editor-ui/package.json +1 -1
  364. package/node_modules/@fps-games/playable-assets/package.json +1 -1
  365. package/node_modules/@fps-games/playable-contracts/package.json +1 -1
  366. package/node_modules/@fps-games/playable-rendering/package.json +2 -2
  367. package/node_modules/@fps-games/playable-runtime/package.json +12 -12
  368. package/node_modules/@fps-games/playable-runtime-data/package.json +4 -4
  369. package/node_modules/@fps-games/playable-scene/package.json +2 -2
  370. package/node_modules/@fps-games/plugin-api/package.json +1 -1
  371. package/node_modules/@fps-games/plugin-assets/dist/version.d.ts +1 -1
  372. package/node_modules/@fps-games/plugin-assets/dist/version.js +1 -1
  373. package/node_modules/@fps-games/plugin-assets/dist/version.js.map +1 -1
  374. package/node_modules/@fps-games/plugin-assets/package.json +6 -6
  375. package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.d.ts +1 -0
  376. package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.d.ts.map +1 -1
  377. package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.js +78 -4
  378. package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.js.map +1 -1
  379. package/node_modules/@fps-games/plugin-hierarchy/dist/version.d.ts +1 -1
  380. package/node_modules/@fps-games/plugin-hierarchy/dist/version.js +1 -1
  381. package/node_modules/@fps-games/plugin-hierarchy/dist/version.js.map +1 -1
  382. package/node_modules/@fps-games/plugin-hierarchy/package.json +5 -5
  383. package/node_modules/@fps-games/plugin-host/package.json +2 -2
  384. package/node_modules/@fps-games/plugin-markers/dist/version.d.ts +1 -1
  385. package/node_modules/@fps-games/plugin-markers/dist/version.js +1 -1
  386. package/node_modules/@fps-games/plugin-markers/dist/version.js.map +1 -1
  387. package/node_modules/@fps-games/plugin-markers/package.json +5 -5
  388. package/node_modules/@fps-games/plugin-materials/dist/version.d.ts +1 -1
  389. package/node_modules/@fps-games/plugin-materials/dist/version.js +1 -1
  390. package/node_modules/@fps-games/plugin-materials/dist/version.js.map +1 -1
  391. package/node_modules/@fps-games/plugin-materials/package.json +5 -5
  392. package/node_modules/@fps-games/plugin-rendering/dist/version.d.ts +1 -1
  393. package/node_modules/@fps-games/plugin-rendering/dist/version.js +1 -1
  394. package/node_modules/@fps-games/plugin-rendering/dist/version.js.map +1 -1
  395. package/node_modules/@fps-games/plugin-rendering/package.json +5 -5
  396. package/node_modules/@fps-games/plugin-scene/dist/version.d.ts +1 -1
  397. package/node_modules/@fps-games/plugin-scene/dist/version.js +1 -1
  398. package/node_modules/@fps-games/plugin-scene/dist/version.js.map +1 -1
  399. package/node_modules/@fps-games/plugin-scene/package.json +5 -5
  400. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.d.ts +1 -1
  401. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js +1 -1
  402. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js.map +1 -1
  403. package/node_modules/@fps-games/plugin-shadow-map-experiment/package.json +5 -5
  404. package/node_modules/@fps-games/plugin-shadows/dist/version.d.ts +1 -1
  405. package/node_modules/@fps-games/plugin-shadows/dist/version.js +1 -1
  406. package/node_modules/@fps-games/plugin-shadows/dist/version.js.map +1 -1
  407. package/node_modules/@fps-games/plugin-shadows/package.json +7 -7
  408. package/package.json +23 -23
  409. package/dist/agent-bridge/capabilities/assets.d.ts +0 -8
  410. package/dist/agent-bridge/capabilities/assets.d.ts.map +0 -1
  411. package/dist/agent-bridge/capabilities/assets.js.map +0 -1
  412. package/dist/agent-bridge/capabilities/editor-state.d.ts +0 -5
  413. package/dist/agent-bridge/capabilities/editor-state.d.ts.map +0 -1
  414. package/dist/agent-bridge/capabilities/editor-state.js.map +0 -1
  415. package/dist/agent-bridge/capabilities/hierarchy.d.ts +0 -4
  416. package/dist/agent-bridge/capabilities/hierarchy.d.ts.map +0 -1
  417. package/dist/agent-bridge/capabilities/hierarchy.js.map +0 -1
  418. package/dist/agent-bridge/capabilities/host-lifecycle.d.ts +0 -11
  419. package/dist/agent-bridge/capabilities/host-lifecycle.d.ts.map +0 -1
  420. package/dist/agent-bridge/capabilities/host-lifecycle.js +0 -149
  421. package/dist/agent-bridge/capabilities/host-lifecycle.js.map +0 -1
  422. package/dist/agent-bridge/capabilities/prefabs.d.ts +0 -5
  423. package/dist/agent-bridge/capabilities/prefabs.d.ts.map +0 -1
  424. package/dist/agent-bridge/capabilities/prefabs.js.map +0 -1
  425. package/dist/agent-bridge/capabilities/scene-objects.d.ts +0 -8
  426. package/dist/agent-bridge/capabilities/scene-objects.d.ts.map +0 -1
  427. package/dist/agent-bridge/capabilities/scene-objects.js +0 -480
  428. package/dist/agent-bridge/capabilities/scene-objects.js.map +0 -1
  429. package/dist/agent-bridge/capabilities/selection.d.ts +0 -5
  430. package/dist/agent-bridge/capabilities/selection.d.ts.map +0 -1
  431. package/dist/agent-bridge/capabilities/selection.js +0 -60
  432. package/dist/agent-bridge/capabilities/selection.js.map +0 -1
  433. package/dist/agent-bridge/capabilities/shadows.d.ts +0 -5
  434. package/dist/agent-bridge/capabilities/shadows.d.ts.map +0 -1
  435. package/dist/agent-bridge/capabilities/shadows.js.map +0 -1
  436. package/dist/agent-bridge/capabilities/transform.d.ts +0 -5
  437. package/dist/agent-bridge/capabilities/transform.d.ts.map +0 -1
  438. package/dist/agent-bridge/capabilities/transform.js +0 -164
  439. package/dist/agent-bridge/capabilities/transform.js.map +0 -1
  440. package/dist/agent-bridge/capabilities/ui-regions.d.ts +0 -4
  441. package/dist/agent-bridge/capabilities/ui-regions.d.ts.map +0 -1
  442. package/dist/agent-bridge/capabilities/ui-regions.js.map +0 -1
  443. package/dist/agent-bridge/capabilities/viewport.d.ts +0 -5
  444. package/dist/agent-bridge/capabilities/viewport.d.ts.map +0 -1
  445. package/dist/agent-bridge/capabilities/viewport.js.map +0 -1
  446. package/dist/agent-bridge/capability-sources.d.ts +0 -7
  447. package/dist/agent-bridge/capability-sources.d.ts.map +0 -1
  448. package/dist/agent-bridge/capability-sources.js +0 -34
  449. package/dist/agent-bridge/capability-sources.js.map +0 -1
  450. package/dist/agent-bridge/diagnostics.d.ts +0 -12
  451. package/dist/agent-bridge/diagnostics.d.ts.map +0 -1
  452. package/dist/agent-bridge/diagnostics.js.map +0 -1
  453. package/dist/agent-bridge/index.d.ts.map +0 -1
  454. package/dist/agent-bridge/index.js.map +0 -1
  455. package/dist/agent-bridge/register.d.ts +0 -4
  456. package/dist/agent-bridge/register.d.ts.map +0 -1
  457. package/dist/agent-bridge/register.js.map +0 -1
  458. package/dist/agent-bridge/shared.d.ts.map +0 -1
  459. package/dist/agent-bridge/shared.js.map +0 -1
  460. package/dist/agent-bridge/source-types.d.ts +0 -110
  461. package/dist/agent-bridge/source-types.d.ts.map +0 -1
  462. package/dist/agent-bridge/source-types.js.map +0 -1
  463. package/dist/editor-plugin-agent-capabilities.d.ts +0 -4
  464. package/dist/editor-plugin-agent-capabilities.d.ts.map +0 -1
  465. package/dist/editor-plugin-agent-capabilities.js +0 -64
  466. package/dist/editor-plugin-agent-capabilities.js.map +0 -1
  467. package/dist/local-editor-agent-actions.d.ts +0 -43
  468. package/dist/local-editor-agent-actions.d.ts.map +0 -1
  469. package/dist/local-editor-agent-actions.js +0 -321
  470. package/dist/local-editor-agent-actions.js.map +0 -1
  471. package/dist/local-editor-agent-bridge-transport.d.ts +0 -129
  472. package/dist/local-editor-agent-bridge-transport.d.ts.map +0 -1
  473. package/dist/local-editor-agent-bridge-transport.js +0 -403
  474. package/dist/local-editor-agent-bridge-transport.js.map +0 -1
  475. package/dist/local-editor-agent-bridge.d.ts +0 -2
  476. package/dist/local-editor-agent-bridge.d.ts.map +0 -1
  477. package/dist/local-editor-agent-bridge.js +0 -2
  478. package/dist/local-editor-agent-bridge.js.map +0 -1
  479. package/dist/local-editor-agent-context.d.ts +0 -68
  480. package/dist/local-editor-agent-context.d.ts.map +0 -1
  481. package/dist/local-editor-agent-context.js +0 -716
  482. package/dist/local-editor-agent-context.js.map +0 -1
  483. package/node_modules/@fps-games/editor-core/dist/agent-bridge.d.ts +0 -22
  484. package/node_modules/@fps-games/editor-core/dist/agent-bridge.d.ts.map +0 -1
  485. package/node_modules/@fps-games/editor-core/dist/agent-bridge.js +0 -106
  486. package/node_modules/@fps-games/editor-core/dist/agent-bridge.js.map +0 -1
  487. package/node_modules/@fps-games/editor-core/dist/agent-interaction.d.ts +0 -17
  488. package/node_modules/@fps-games/editor-core/dist/agent-interaction.d.ts.map +0 -1
  489. package/node_modules/@fps-games/editor-core/dist/agent-interaction.js +0 -14
  490. package/node_modules/@fps-games/editor-core/dist/agent-interaction.js.map +0 -1
  491. package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.d.ts +0 -23
  492. package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.d.ts.map +0 -1
  493. package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.js +0 -47
  494. package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.js.map +0 -1
  495. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.d.ts +0 -112
  496. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.d.ts.map +0 -1
  497. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.js +0 -159
  498. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.js.map +0 -1
  499. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.d.ts +0 -15
  500. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.d.ts.map +0 -1
  501. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.js +0 -76
  502. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.js.map +0 -1
  503. package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts +0 -1622
  504. package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts.map +0 -1
  505. package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.js.map +0 -1
  506. package/node_modules/@fps-games/editor-protocol/dist/agent-trace.d.ts +0 -68
  507. package/node_modules/@fps-games/editor-protocol/dist/agent-trace.d.ts.map +0 -1
  508. package/node_modules/@fps-games/editor-protocol/dist/agent-trace.js +0 -23
  509. package/node_modules/@fps-games/editor-protocol/dist/agent-trace.js.map +0 -1
  510. package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts +0 -187
  511. package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts.map +0 -1
  512. package/node_modules/@fps-games/editor-protocol/dist/agent.js +0 -5
  513. package/node_modules/@fps-games/editor-protocol/dist/agent.js.map +0 -1
  514. /package/dist/{agent-bridge → editor-commands}/source-types.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"product-authoring-api.js","sourceRoot":"","sources":["../../src/vite/product-authoring-api.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EACL,oCAAoC,GAGrC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,8CAA8C,EAC9C,6BAA6B,EAC7B,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,gCAAgC,EAAE,MAAM,uBAAuB,CAAC;AACz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AAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACtC,OAAO,CAAC,GAAG,GAAG,CAAC,KAAK,EAAE,EAAE;QACtB,MAAM,KAAK,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC;QAC/D,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,mCAAmC,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC,CAAC;QACzG,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,OAAO,CAAC;QAC1C,OAAO,GAAG,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,0BAA0B,CAAC,EACxC,IAAI,EAAE,UAAU,EAChB,IAAI,GACqE;IACzE,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3D,MAAM,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1C,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AACxC,CAAC","sourcesContent":["import path from 'node:path';\nimport { mkdir, writeFile } from 'node:fs/promises';\nimport { pipeline } from 'node:stream/promises';\nimport type { HmrContext, Plugin, ViteDevServer } from 'vite';\nimport {\n handlePlayableAuthoringServerRequest,\n type PlayableAuthoringServerHandlers,\n type PlayableAuthoringServerResponse,\n} from '../authoring-server/index';\nimport {\n createPlayableAuthoringTransportPathNormalizer,\n readPlayableAuthoringJsonBody,\n sendPlayableAuthoringHttpResponse,\n setPlayableAuthoringCorsHeaders,\n} from './authoring-http';\nimport { resolveEditorProjectMediaSupport } from '../project-files/index';\nimport { resolveFpsGameEditorViteFilePath } from './module-invalidation';\nimport {\n closeEditorProjectFileHandle,\n openVerifiedEditorProjectFile,\n resolveEditorProjectMediaMaxBytes,\n} from './project-file-handle';\nimport { readEditorProjectFile, scanEditorProjectFiles } from './project-files';\n\nexport interface FpsGameEditorProjectAuthoringApiPluginOptions {\n projectRoot: string;\n projectMediaMaxBytes?: number;\n name?: string;\n createAssetAuthoringHandlers(server: ViteDevServer): Promise<Pick<\n PlayableAuthoringServerHandlers,\n 'loadManifest' | 'loadEditorAssetLibrary' | 'runCommand'\n >>;\n getAuthoringWrittenFiles?: (server: ViteDevServer) => Promise<readonly string[]>;\n handleRenderingProfileRoute?: (input: {\n server: ViteDevServer;\n req: unknown;\n readJsonBody: typeof readPlayableAuthoringJsonBody;\n }) => Promise<PlayableAuthoringServerResponse>;\n loadEditorScene(server: ViteDevServer): Promise<Record<string, unknown>>;\n saveEditorScene(input: {\n server: ViteDevServer;\n saveMode: string;\n rawEditorScene: Record<string, unknown>;\n body: Record<string, unknown>;\n }): Promise<Record<string, unknown>>;\n writeFile?: PlayableAuthoringServerHandlers['writeFile'];\n logger?: Pick<Console, 'log' | 'warn'>;\n}\n\nexport function createFpsGameEditorProjectAuthoringApiPlugin(\n options: FpsGameEditorProjectAuthoringApiPluginOptions,\n): Plugin {\n let authoringWrittenFilesPromise: Promise<readonly string[]> = Promise.resolve([]);\n return {\n name: options.name ?? 'fps-editor-project-authoring-api',\n enforce: 'post' as const,\n apply: 'serve' as const,\n async configureServer(server) {\n const assetAuthoringHandlersPromise = options.createAssetAuthoringHandlers(server);\n if (options.getAuthoringWrittenFiles) {\n authoringWrittenFilesPromise = options.getAuthoringWrittenFiles(server)\n .then(paths => paths.map(file => path.resolve(options.projectRoot, file)))\n .then(async (paths) => {\n suppressFpsGameEditorAuthoringFullReloads(server, paths);\n suppressFpsGameEditorAuthoringWatcherAdds(server.watcher, paths);\n await server.watcher?.unwatch?.(paths);\n options.logger?.log?.('[ProjectAuthoring][Vite] watcher and HMR suppressed for authoring-written files', paths);\n return paths;\n })\n .catch((error) => {\n options.logger?.warn?.('[ProjectAuthoring][Vite] failed to resolve authoring files for HMR suppression', error);\n return [];\n });\n await authoringWrittenFilesPromise;\n }\n\n server.middlewares.use(async (req: any, res: any, next: any) => {\n const requestUrl = new URL(req.url ?? '', 'http://localhost');\n const pathname = requestUrl.pathname;\n const isProjectAuthoringRoute = pathname.startsWith('/__fps_editor_authoring');\n const route = isProjectAuthoringRoute\n ? pathname\n .replace(/^\\/__fps_editor_authoring/, '') || '/'\n : '/';\n\n if (isProjectAuthoringRoute && route === '/project-media') {\n setPlayableAuthoringCorsHeaders(res);\n if (req.method === 'OPTIONS') {\n res.statusCode = 204;\n res.end();\n return;\n }\n if (req.method !== 'GET') {\n sendPlayableAuthoringHttpResponse(res, { statusCode: 405, body: { ok: false, error: 'method_not_allowed' } });\n return;\n }\n const requestedPath = requestUrl.searchParams.get('path')?.trim() ?? '';\n if (!requestedPath) {\n sendPlayableAuthoringHttpResponse(res, { statusCode: 400, body: { ok: false, error: 'missing_file_path' } });\n return;\n }\n try {\n const opened = await openVerifiedEditorProjectFile(options.projectRoot, requestedPath);\n let operationError: unknown = null;\n let finalByte: Buffer | null = null;\n try {\n const support = resolveEditorProjectMediaSupport(opened.relativePath);\n if (!support) throw new Error('project_file_media_unsupported');\n if (opened.stat.size > resolveEditorProjectMediaMaxBytes(options.projectMediaMaxBytes)) {\n throw new Error('project_file_media_too_large');\n }\n const name = path.basename(opened.relativePath);\n res.statusCode = 200;\n res.setHeader('Content-Type', support.mimeType);\n res.setHeader('Content-Length', String(opened.stat.size));\n res.setHeader('Content-Disposition', `inline; filename*=UTF-8''${encodeURIComponent(name)}`);\n res.setHeader('X-Content-Type-Options', 'nosniff');\n if (opened.stat.size > 0) {\n finalByte = Buffer.allocUnsafe(1);\n const read = await opened.handle.read(finalByte, 0, 1, opened.stat.size - 1);\n if (read.bytesRead !== 1) throw new Error('project_file_changed_during_read');\n }\n if (opened.stat.size > 1) {\n await pipeline(opened.handle.createReadStream({\n autoClose: false,\n start: 0,\n end: opened.stat.size - 2,\n }), res, { end: false });\n }\n } catch (error) {\n operationError = error;\n }\n try {\n await closeEditorProjectFileHandle(opened.handle);\n } catch (closeError) {\n if (operationError) {\n const aggregate = new Error('project_file_close_failed') as Error & { errors: unknown[] };\n aggregate.errors = [operationError, closeError];\n operationError = aggregate;\n } else {\n operationError = closeError;\n }\n }\n if (operationError) throw operationError;\n if (finalByte) res.end(finalByte);\n else res.end();\n } catch (error) {\n if (!res.headersSent) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n sendPlayableAuthoringHttpResponse(res, {\n statusCode: errorMessage === 'project_file_media_too_large' ? 413 : 404,\n body: { ok: false, error: errorMessage },\n });\n } else {\n res.destroy(error instanceof Error ? error : undefined);\n }\n }\n return;\n }\n\n if (isProjectAuthoringRoute && route.startsWith('/rendering-profile')) {\n if (!options.handleRenderingProfileRoute) {\n next();\n return;\n }\n setPlayableAuthoringCorsHeaders(res);\n if (req.method === 'OPTIONS') {\n res.statusCode = 204;\n res.end();\n return;\n }\n\n try {\n const response = await options.handleRenderingProfileRoute({\n server,\n req,\n readJsonBody: readPlayableAuthoringJsonBody,\n });\n sendPlayableAuthoringHttpResponse(res, response);\n } catch (error) {\n sendPlayableAuthoringHttpResponse(res, {\n statusCode: 500,\n body: {\n ok: false,\n error: error instanceof Error ? error.message : String(error),\n details: (error as any)?.details,\n },\n });\n }\n return;\n }\n\n const response = await handlePlayableAuthoringServerRequest({\n url: req.url ?? '',\n method: req.method ?? 'GET',\n }, {\n readBody: () => readPlayableAuthoringJsonBody(req),\n normalizeTransportPath: createPlayableAuthoringTransportPathNormalizer(options.projectRoot, {\n relativeRoot: '.platform-sim',\n }),\n async loadManifest(routeInput) {\n const handlers = await assetAuthoringHandlersPromise;\n if (!handlers.loadManifest) throw new Error('asset_manifest_handler_unavailable');\n return handlers.loadManifest(routeInput);\n },\n async loadEditorAssetLibrary(routeInput) {\n const handlers = await assetAuthoringHandlersPromise;\n if (!handlers.loadEditorAssetLibrary) throw new Error('asset_library_handler_unavailable');\n return handlers.loadEditorAssetLibrary(routeInput);\n },\n async loadProjectFiles() {\n return scanEditorProjectFiles(options.projectRoot);\n },\n async loadProjectFile({ path: requestedPath }) {\n return readEditorProjectFile(options.projectRoot, requestedPath);\n },\n async loadEditorScene() {\n return options.loadEditorScene(server);\n },\n writeFile: options.writeFile ?? writePlayableAuthoringFile,\n async runCommand(commandInput) {\n const handlers = await assetAuthoringHandlersPromise;\n if (!handlers.runCommand) throw new Error('asset_command_handler_unavailable');\n return handlers.runCommand(commandInput);\n },\n async saveEditorScene({ mode: saveMode, rawEditorScene, body }) {\n return options.saveEditorScene({\n server,\n saveMode,\n rawEditorScene: rawEditorScene as Record<string, unknown>,\n body: body as Record<string, unknown>,\n });\n },\n });\n\n if (!response) {\n next();\n return;\n }\n sendPlayableAuthoringHttpResponse(res, response);\n });\n },\n async handleHotUpdate(context: HmrContext) {\n if (typeof context.file !== 'string') return;\n const authoringWrittenFiles = await authoringWrittenFilesPromise;\n if (isFpsGameEditorAuthoringWrittenFile(context.file, authoringWrittenFiles)) {\n // Keep the watcher event active until Vite has finished running every\n // hot-update hook. Vite may emit its full-reload message only after\n // this hook resolves; clearing here lets canonical asset replacements\n // reload the whole Editor before the freshness coordinator can rebase\n // the active session.\n return [];\n }\n },\n };\n}\n\nexport function isFpsGameEditorAuthoringWrittenFile(\n candidateFile: string,\n authoringWrittenFiles: readonly string[],\n): boolean {\n const candidate = resolveFpsGameEditorViteFilePath(candidateFile);\n return authoringWrittenFiles.some((configuredFile) => {\n const configured = resolveFpsGameEditorViteFilePath(configuredFile);\n if (candidate === configured) return true;\n const relative = path.relative(configured, candidate);\n return relative.length > 0 && relative !== '..' && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative);\n });\n}\n\nfunction suppressFpsGameEditorAuthoringFullReloads(\n server: {\n watcher?: { prependListener?: (event: string, listener: (file: unknown) => void) => unknown };\n ws?: { send?: (payload: any, ...args: any[]) => unknown };\n },\n authoringWrittenFiles: readonly string[],\n): void {\n if (!server.watcher?.prependListener || !server.ws?.send) return;\n let activeAuthoringFile: string | null = null;\n let clearTimer: ReturnType<typeof setTimeout> | null = null;\n const clearActiveFile = (): void => {\n activeAuthoringFile = null;\n if (clearTimer) clearTimeout(clearTimer);\n clearTimer = null;\n };\n const markFile = (file: unknown): void => {\n clearActiveFile();\n activeAuthoringFile = typeof file === 'string'\n && isFpsGameEditorAuthoringWrittenFile(file, authoringWrittenFiles)\n ? resolveFpsGameEditorViteFilePath(file)\n : null;\n if (activeAuthoringFile) {\n clearTimer = setTimeout(clearActiveFile, 1_000);\n }\n };\n for (const event of ['add', 'change', 'unlink']) {\n server.watcher.prependListener(event, markFile);\n }\n\n const send = server.ws.send.bind(server.ws);\n server.ws.send = (payload: any, ...args: any[]) => {\n const triggeredBy = typeof payload?.triggeredBy === 'string' ? payload.triggeredBy : undefined;\n const isOwnedTriggeredFile = triggeredBy\n ? isFpsGameEditorAuthoringWrittenFile(triggeredBy, authoringWrittenFiles)\n : false;\n if (payload?.type === 'full-reload' && (isOwnedTriggeredFile || (activeAuthoringFile && !triggeredBy))) {\n return;\n }\n return send(payload, ...args);\n };\n}\n\nfunction suppressFpsGameEditorAuthoringWatcherAdds(\n watcher: { add?: (paths: string | readonly string[]) => unknown } | undefined,\n authoringWrittenFiles: readonly string[],\n): void {\n if (!watcher?.add) return;\n const add = watcher.add.bind(watcher);\n watcher.add = (input) => {\n const paths = typeof input === 'string' ? [input] : [...input];\n const filtered = paths.filter(file => !isFpsGameEditorAuthoringWrittenFile(file, authoringWrittenFiles));\n if (filtered.length === 0) return watcher;\n return add(typeof input === 'string' ? filtered[0] : filtered);\n };\n}\n\nasync function writePlayableAuthoringFile({\n path: targetPath,\n text,\n}: Parameters<NonNullable<PlayableAuthoringServerHandlers['writeFile']>>[0]) {\n await mkdir(path.dirname(targetPath), { recursive: true });\n await writeFile(targetPath, text, 'utf8');\n return { ok: true, path: targetPath };\n}\n"]}
1
+ {"version":3,"file":"product-authoring-api.js","sourceRoot":"","sources":["../../src/vite/product-authoring-api.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EACL,oCAAoC,GAGrC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,8CAA8C,EAC9C,6BAA6B,EAC7B,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,gCAAgC,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,2CAA2C,EAAE,MAAM,6BAA6B,CAAC;AAC1F,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC7B,iCAAiC,GAClC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AA2BhF,MAAM,UAAU,4CAA4C,CAC1D,OAAsD;IAEtD,IAAI,4BAA4B,GAA+B,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACnF,OAAO;QACL,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,kCAAkC;QACxD,OAAO,EAAE,MAAe;QACxB,KAAK,EAAE,OAAgB;QACvB,KAAK,CAAC,eAAe,CAAC,MAAM;YAC1B,MAAM,6BAA6B,GAAG,OAAO,CAAC,4BAA4B,CAAC,MAAM,CAAC,CAAC;YACnF,MAAM,2BAA2B,GAAG,2CAA2C,CAAC,MAAM,EAAE;gBACtF,eAAe,EAAE,GAAG,EAAE,CAAC,OAA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AAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AACxC,CAAC","sourcesContent":["import path from 'node:path';\nimport { mkdir, writeFile } from 'node:fs/promises';\nimport { pipeline } from 'node:stream/promises';\nimport type { HmrContext, Plugin, ViteDevServer } from 'vite';\nimport {\n handlePlayableAuthoringServerRequest,\n type PlayableAuthoringServerHandlers,\n type PlayableAuthoringServerResponse,\n} from '../authoring-server/index';\nimport {\n createPlayableAuthoringTransportPathNormalizer,\n readPlayableAuthoringJsonBody,\n sendPlayableAuthoringHttpResponse,\n setPlayableAuthoringCorsHeaders,\n} from './authoring-http';\nimport { resolveEditorProjectMediaSupport } from '../project-files/index';\nimport { resolveFpsGameEditorViteFilePath } from './module-invalidation';\nimport { installFpsGameEditorProjectAuthoringBackend } from './project-authoring-backend';\nimport {\n closeEditorProjectFileHandle,\n openVerifiedEditorProjectFile,\n resolveEditorProjectMediaMaxBytes,\n} from './project-file-handle';\nimport { readEditorProjectFile, scanEditorProjectFiles } from './project-files';\n\nexport interface FpsGameEditorProjectAuthoringApiPluginOptions {\n projectRoot: string;\n projectMediaMaxBytes?: number;\n name?: string;\n createAssetAuthoringHandlers(server: ViteDevServer): Promise<Pick<\n PlayableAuthoringServerHandlers,\n 'loadManifest' | 'loadEditorAssetLibrary' | 'runCommand'\n >>;\n getAuthoringWrittenFiles?: (server: ViteDevServer) => Promise<readonly string[]>;\n handleRenderingProfileRoute?: (input: {\n server: ViteDevServer;\n req: unknown;\n readJsonBody: typeof readPlayableAuthoringJsonBody;\n }) => Promise<PlayableAuthoringServerResponse>;\n loadEditorScene(server: ViteDevServer): Promise<Record<string, unknown>>;\n saveEditorScene(input: {\n server: ViteDevServer;\n saveMode: string;\n rawEditorScene: Record<string, unknown>;\n body: Record<string, unknown>;\n }): Promise<Record<string, unknown>>;\n writeFile?: PlayableAuthoringServerHandlers['writeFile'];\n logger?: Pick<Console, 'log' | 'warn'>;\n}\n\nexport function createFpsGameEditorProjectAuthoringApiPlugin(\n options: FpsGameEditorProjectAuthoringApiPluginOptions,\n): Plugin {\n let authoringWrittenFilesPromise: Promise<readonly string[]> = Promise.resolve([]);\n return {\n name: options.name ?? 'fps-editor-project-authoring-api',\n enforce: 'post' as const,\n apply: 'serve' as const,\n async configureServer(server) {\n const assetAuthoringHandlersPromise = options.createAssetAuthoringHandlers(server);\n const releaseEditorServiceBackend = installFpsGameEditorProjectAuthoringBackend(server, {\n loadEditorScene: () => options.loadEditorScene(server),\n async listEditorAssets() {\n const handlers = await assetAuthoringHandlersPromise;\n if (!handlers.loadEditorAssetLibrary) return [];\n const result = await handlers.loadEditorAssetLibrary({} as never);\n if (Array.isArray(result)) return result as Record<string, unknown>[];\n if (result && typeof result === 'object') {\n const record = result as Record<string, unknown>;\n const assets = record.assets ?? record.items;\n if (Array.isArray(assets)) return assets as Record<string, unknown>[];\n }\n return [];\n },\n saveEditorScene: input => options.saveEditorScene({ server, ...input }),\n });\n server.httpServer?.once('close', releaseEditorServiceBackend);\n if (options.getAuthoringWrittenFiles) {\n authoringWrittenFilesPromise = options.getAuthoringWrittenFiles(server)\n .then(paths => paths.map(file => path.resolve(options.projectRoot, file)))\n .then(async (paths) => {\n suppressFpsGameEditorAuthoringFullReloads(server, paths);\n suppressFpsGameEditorAuthoringWatcherAdds(server.watcher, paths);\n await server.watcher?.unwatch?.(paths);\n options.logger?.log?.('[ProjectAuthoring][Vite] watcher and HMR suppressed for authoring-written files', paths);\n return paths;\n })\n .catch((error) => {\n options.logger?.warn?.('[ProjectAuthoring][Vite] failed to resolve authoring files for HMR suppression', error);\n return [];\n });\n await authoringWrittenFilesPromise;\n }\n\n server.middlewares.use(async (req: any, res: any, next: any) => {\n const requestUrl = new URL(req.url ?? '', 'http://localhost');\n const pathname = requestUrl.pathname;\n const isProjectAuthoringRoute = pathname.startsWith('/__fps_editor_authoring');\n const route = isProjectAuthoringRoute\n ? pathname\n .replace(/^\\/__fps_editor_authoring/, '') || '/'\n : '/';\n\n if (isProjectAuthoringRoute && route === '/project-media') {\n setPlayableAuthoringCorsHeaders(res);\n if (req.method === 'OPTIONS') {\n res.statusCode = 204;\n res.end();\n return;\n }\n if (req.method !== 'GET') {\n sendPlayableAuthoringHttpResponse(res, { statusCode: 405, body: { ok: false, error: 'method_not_allowed' } });\n return;\n }\n const requestedPath = requestUrl.searchParams.get('path')?.trim() ?? '';\n if (!requestedPath) {\n sendPlayableAuthoringHttpResponse(res, { statusCode: 400, body: { ok: false, error: 'missing_file_path' } });\n return;\n }\n try {\n const opened = await openVerifiedEditorProjectFile(options.projectRoot, requestedPath);\n let operationError: unknown = null;\n let finalByte: Buffer | null = null;\n try {\n const support = resolveEditorProjectMediaSupport(opened.relativePath);\n if (!support) throw new Error('project_file_media_unsupported');\n if (opened.stat.size > resolveEditorProjectMediaMaxBytes(options.projectMediaMaxBytes)) {\n throw new Error('project_file_media_too_large');\n }\n const name = path.basename(opened.relativePath);\n res.statusCode = 200;\n res.setHeader('Content-Type', support.mimeType);\n res.setHeader('Content-Length', String(opened.stat.size));\n res.setHeader('Content-Disposition', `inline; filename*=UTF-8''${encodeURIComponent(name)}`);\n res.setHeader('X-Content-Type-Options', 'nosniff');\n if (opened.stat.size > 0) {\n finalByte = Buffer.allocUnsafe(1);\n const read = await opened.handle.read(finalByte, 0, 1, opened.stat.size - 1);\n if (read.bytesRead !== 1) throw new Error('project_file_changed_during_read');\n }\n if (opened.stat.size > 1) {\n await pipeline(opened.handle.createReadStream({\n autoClose: false,\n start: 0,\n end: opened.stat.size - 2,\n }), res, { end: false });\n }\n } catch (error) {\n operationError = error;\n }\n try {\n await closeEditorProjectFileHandle(opened.handle);\n } catch (closeError) {\n if (operationError) {\n const aggregate = new Error('project_file_close_failed') as Error & { errors: unknown[] };\n aggregate.errors = [operationError, closeError];\n operationError = aggregate;\n } else {\n operationError = closeError;\n }\n }\n if (operationError) throw operationError;\n if (finalByte) res.end(finalByte);\n else res.end();\n } catch (error) {\n if (!res.headersSent) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n sendPlayableAuthoringHttpResponse(res, {\n statusCode: errorMessage === 'project_file_media_too_large' ? 413 : 404,\n body: { ok: false, error: errorMessage },\n });\n } else {\n res.destroy(error instanceof Error ? error : undefined);\n }\n }\n return;\n }\n\n if (isProjectAuthoringRoute && route.startsWith('/rendering-profile')) {\n if (!options.handleRenderingProfileRoute) {\n next();\n return;\n }\n setPlayableAuthoringCorsHeaders(res);\n if (req.method === 'OPTIONS') {\n res.statusCode = 204;\n res.end();\n return;\n }\n\n try {\n const response = await options.handleRenderingProfileRoute({\n server,\n req,\n readJsonBody: readPlayableAuthoringJsonBody,\n });\n sendPlayableAuthoringHttpResponse(res, response);\n } catch (error) {\n sendPlayableAuthoringHttpResponse(res, {\n statusCode: 500,\n body: {\n ok: false,\n error: error instanceof Error ? error.message : String(error),\n details: (error as any)?.details,\n },\n });\n }\n return;\n }\n\n const response = await handlePlayableAuthoringServerRequest({\n url: req.url ?? '',\n method: req.method ?? 'GET',\n }, {\n readBody: () => readPlayableAuthoringJsonBody(req),\n normalizeTransportPath: createPlayableAuthoringTransportPathNormalizer(options.projectRoot, {\n relativeRoot: '.platform-sim',\n }),\n async loadManifest(routeInput) {\n const handlers = await assetAuthoringHandlersPromise;\n if (!handlers.loadManifest) throw new Error('asset_manifest_handler_unavailable');\n return handlers.loadManifest(routeInput);\n },\n async loadEditorAssetLibrary(routeInput) {\n const handlers = await assetAuthoringHandlersPromise;\n if (!handlers.loadEditorAssetLibrary) throw new Error('asset_library_handler_unavailable');\n return handlers.loadEditorAssetLibrary(routeInput);\n },\n async loadProjectFiles() {\n return scanEditorProjectFiles(options.projectRoot);\n },\n async loadProjectFile({ path: requestedPath }) {\n return readEditorProjectFile(options.projectRoot, requestedPath);\n },\n async loadEditorScene() {\n return options.loadEditorScene(server);\n },\n writeFile: options.writeFile ?? writePlayableAuthoringFile,\n async runCommand(commandInput) {\n const handlers = await assetAuthoringHandlersPromise;\n if (!handlers.runCommand) throw new Error('asset_command_handler_unavailable');\n return handlers.runCommand(commandInput);\n },\n async saveEditorScene({ mode: saveMode, rawEditorScene, body }) {\n return options.saveEditorScene({\n server,\n saveMode,\n rawEditorScene: rawEditorScene as Record<string, unknown>,\n body: body as Record<string, unknown>,\n });\n },\n });\n\n if (!response) {\n next();\n return;\n }\n sendPlayableAuthoringHttpResponse(res, response);\n });\n },\n async handleHotUpdate(context: HmrContext) {\n if (typeof context.file !== 'string') return;\n const authoringWrittenFiles = await authoringWrittenFilesPromise;\n if (isFpsGameEditorAuthoringWrittenFile(context.file, authoringWrittenFiles)) {\n // Keep the watcher event active until Vite has finished running every\n // hot-update hook. Vite may emit its full-reload message only after\n // this hook resolves; clearing here lets canonical asset replacements\n // reload the whole Editor before the freshness coordinator can rebase\n // the active session.\n return [];\n }\n },\n };\n}\n\nexport function isFpsGameEditorAuthoringWrittenFile(\n candidateFile: string,\n authoringWrittenFiles: readonly string[],\n): boolean {\n const candidate = resolveFpsGameEditorViteFilePath(candidateFile);\n return authoringWrittenFiles.some((configuredFile) => {\n const configured = resolveFpsGameEditorViteFilePath(configuredFile);\n if (candidate === configured) return true;\n const relative = path.relative(configured, candidate);\n return relative.length > 0 && relative !== '..' && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative);\n });\n}\n\nfunction suppressFpsGameEditorAuthoringFullReloads(\n server: {\n watcher?: { prependListener?: (event: string, listener: (file: unknown) => void) => unknown };\n ws?: { send?: (payload: any, ...args: any[]) => unknown };\n },\n authoringWrittenFiles: readonly string[],\n): void {\n if (!server.watcher?.prependListener || !server.ws?.send) return;\n let activeAuthoringFile: string | null = null;\n let clearTimer: ReturnType<typeof setTimeout> | null = null;\n const clearActiveFile = (): void => {\n activeAuthoringFile = null;\n if (clearTimer) clearTimeout(clearTimer);\n clearTimer = null;\n };\n const markFile = (file: unknown): void => {\n clearActiveFile();\n activeAuthoringFile = typeof file === 'string'\n && isFpsGameEditorAuthoringWrittenFile(file, authoringWrittenFiles)\n ? resolveFpsGameEditorViteFilePath(file)\n : null;\n if (activeAuthoringFile) {\n clearTimer = setTimeout(clearActiveFile, 1_000);\n }\n };\n for (const event of ['add', 'change', 'unlink']) {\n server.watcher.prependListener(event, markFile);\n }\n\n const send = server.ws.send.bind(server.ws);\n server.ws.send = (payload: any, ...args: any[]) => {\n const triggeredBy = typeof payload?.triggeredBy === 'string' ? payload.triggeredBy : undefined;\n const isOwnedTriggeredFile = triggeredBy\n ? isFpsGameEditorAuthoringWrittenFile(triggeredBy, authoringWrittenFiles)\n : false;\n if (payload?.type === 'full-reload' && (isOwnedTriggeredFile || (activeAuthoringFile && !triggeredBy))) {\n return;\n }\n return send(payload, ...args);\n };\n}\n\nfunction suppressFpsGameEditorAuthoringWatcherAdds(\n watcher: { add?: (paths: string | readonly string[]) => unknown } | undefined,\n authoringWrittenFiles: readonly string[],\n): void {\n if (!watcher?.add) return;\n const add = watcher.add.bind(watcher);\n watcher.add = (input) => {\n const paths = typeof input === 'string' ? [input] : [...input];\n const filtered = paths.filter(file => !isFpsGameEditorAuthoringWrittenFile(file, authoringWrittenFiles));\n if (filtered.length === 0) return watcher;\n return add(typeof input === 'string' ? filtered[0] : filtered);\n };\n}\n\nasync function writePlayableAuthoringFile({\n path: targetPath,\n text,\n}: Parameters<NonNullable<PlayableAuthoringServerHandlers['writeFile']>>[0]) {\n await mkdir(path.dirname(targetPath), { recursive: true });\n await writeFile(targetPath, text, 'utf8');\n return { ok: true, path: targetPath };\n}\n"]}
@@ -0,0 +1,13 @@
1
+ import type { ViteDevServer } from 'vite';
2
+ export interface FpsGameEditorProjectAuthoringBackend {
3
+ loadEditorScene(): Promise<Record<string, unknown>>;
4
+ listEditorAssets(): Promise<readonly Record<string, unknown>[]>;
5
+ saveEditorScene(input: {
6
+ saveMode: string;
7
+ rawEditorScene: Record<string, unknown>;
8
+ body: Record<string, unknown>;
9
+ }): Promise<Record<string, unknown>>;
10
+ }
11
+ export declare function installFpsGameEditorProjectAuthoringBackend(server: ViteDevServer, backend: FpsGameEditorProjectAuthoringBackend): () => void;
12
+ export declare function getFpsGameEditorProjectAuthoringBackend(server: ViteDevServer): FpsGameEditorProjectAuthoringBackend | null;
13
+ //# sourceMappingURL=project-authoring-backend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-authoring-backend.d.ts","sourceRoot":"","sources":["../../src/vite/project-authoring-backend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AAE1C,MAAM,WAAW,oCAAoC;IACnD,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACpD,gBAAgB,IAAI,OAAO,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IAChE,eAAe,CAAC,KAAK,EAAE;QACrB,QAAQ,EAAE,MAAM,CAAC;QACjB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACxC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/B,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACtC;AAID,wBAAgB,2CAA2C,CACzD,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,oCAAoC,GAC5C,MAAM,IAAI,CASZ;AAED,wBAAgB,uCAAuC,CACrD,MAAM,EAAE,aAAa,GACpB,oCAAoC,GAAG,IAAI,CAE7C"}
@@ -0,0 +1,18 @@
1
+ const backends = new WeakMap();
2
+ export function installFpsGameEditorProjectAuthoringBackend(server, backend) {
3
+ if (backends.has(server))
4
+ throw new Error('Project authoring backend is already installed on this Vite server.');
5
+ backends.set(server, backend);
6
+ let active = true;
7
+ return () => {
8
+ if (!active)
9
+ return;
10
+ active = false;
11
+ if (backends.get(server) === backend)
12
+ backends.delete(server);
13
+ };
14
+ }
15
+ export function getFpsGameEditorProjectAuthoringBackend(server) {
16
+ return backends.get(server) ?? null;
17
+ }
18
+ //# sourceMappingURL=project-authoring-backend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-authoring-backend.js","sourceRoot":"","sources":["../../src/vite/project-authoring-backend.ts"],"names":[],"mappings":"AAYA,MAAM,QAAQ,GAAG,IAAI,OAAO,EAAgD,CAAC;AAE7E,MAAM,UAAU,2CAA2C,CACzD,MAAqB,EACrB,OAA6C;IAE7C,IAAI,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;IACjH,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,IAAI,MAAM,GAAG,IAAI,CAAC;IAClB,OAAO,GAAG,EAAE;QACV,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,MAAM,GAAG,KAAK,CAAC;QACf,IAAI,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,OAAO;YAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAChE,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uCAAuC,CACrD,MAAqB;IAErB,OAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC;AACtC,CAAC","sourcesContent":["import type { ViteDevServer } from 'vite';\n\nexport interface FpsGameEditorProjectAuthoringBackend {\n loadEditorScene(): Promise<Record<string, unknown>>;\n listEditorAssets(): Promise<readonly Record<string, unknown>[]>;\n saveEditorScene(input: {\n saveMode: string;\n rawEditorScene: Record<string, unknown>;\n body: Record<string, unknown>;\n }): Promise<Record<string, unknown>>;\n}\n\nconst backends = new WeakMap<object, FpsGameEditorProjectAuthoringBackend>();\n\nexport function installFpsGameEditorProjectAuthoringBackend(\n server: ViteDevServer,\n backend: FpsGameEditorProjectAuthoringBackend,\n): () => void {\n if (backends.has(server)) throw new Error('Project authoring backend is already installed on this Vite server.');\n backends.set(server, backend);\n let active = true;\n return () => {\n if (!active) return;\n active = false;\n if (backends.get(server) === backend) backends.delete(server);\n };\n}\n\nexport function getFpsGameEditorProjectAuthoringBackend(\n server: ViteDevServer,\n): FpsGameEditorProjectAuthoringBackend | null {\n return backends.get(server) ?? null;\n}\n"]}
@@ -0,0 +1,28 @@
1
+ import { createEditorCommandObservabilityStore, type EditorAuthoringHost, type EditorCommandHandlerContext, type EditorCommandHandlerOutcome } from '@fps-games/editor-core';
2
+ import { type EditorServiceDocumentExportArtifact } from '@fps-games/editor-protocol';
3
+ import type { EditorSceneDocument, EditorSceneGameObject } from '../document/index';
4
+ import type { FpsGameEditorProjectDefinition } from '../product/index';
5
+ import type { ViteDevServer } from 'vite';
6
+ type ProjectDocument = EditorSceneDocument<EditorSceneGameObject> & Record<string, unknown>;
7
+ type ProjectPatch = {
8
+ kind: 'replace';
9
+ document: ProjectDocument;
10
+ };
11
+ type PreparedProjectExport = EditorServiceDocumentExportArtifact<ProjectDocument>;
12
+ export interface FpsGameEditorProjectServiceAuthority {
13
+ readonly host: EditorAuthoringHost<ProjectDocument, ProjectPatch>;
14
+ readonly readTraces: ReturnType<typeof createEditorCommandObservabilityStore>['read'];
15
+ readonly recordOperation: ReturnType<typeof createEditorCommandObservabilityStore>['recordOperation'];
16
+ readDocumentExport(transactionId: string): PreparedProjectExport | null;
17
+ bindBrowserCommandForwarder(forwarder: (context: EditorCommandHandlerContext, target: 'view' | 'renderer') => Promise<EditorCommandHandlerOutcome<unknown>>): () => void;
18
+ dispose(): Promise<void>;
19
+ }
20
+ export interface CreateFpsGameEditorProjectServiceAuthorityOptions {
21
+ readonly projectRoot: string;
22
+ readonly project?: FpsGameEditorProjectDefinition;
23
+ readonly serviceInstanceId: string;
24
+ readonly server: ViteDevServer;
25
+ }
26
+ export declare function createFpsGameEditorProjectServiceAuthority(options: CreateFpsGameEditorProjectServiceAuthorityOptions): Promise<FpsGameEditorProjectServiceAuthority>;
27
+ export {};
28
+ //# sourceMappingURL=project-editor-service.d.ts.map
@@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