@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,6 +1,6 @@
1
1
  {
2
2
  "name": "@fps-games/editor-babylon",
3
- "version": "0.2.1-beta.3",
3
+ "version": "0.2.1-beta.4",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "BabylonJS runtime integrations for fps-game-editor.",
@@ -14,10 +14,10 @@
14
14
  }
15
15
  },
16
16
  "dependencies": {
17
- "@fps-games/babylon-renderer": "0.2.1-beta.3",
18
- "@fps-games/editor-browser": "0.2.1-beta.3",
19
- "@fps-games/editor-core": "0.2.1-beta.3",
20
- "@fps-games/editor-protocol": "0.2.1-beta.3",
21
- "@fps-games/playable-contracts": "0.2.1-beta.3"
17
+ "@fps-games/babylon-renderer": "0.2.1-beta.4",
18
+ "@fps-games/editor-browser": "0.2.1-beta.4",
19
+ "@fps-games/editor-core": "0.2.1-beta.4",
20
+ "@fps-games/editor-protocol": "0.2.1-beta.4",
21
+ "@fps-games/playable-contracts": "0.2.1-beta.4"
22
22
  }
23
23
  }
@@ -0,0 +1,32 @@
1
+ import { type EditorAuthoringEvent, type EditorAuthoringSnapshot, type EditorBrowserAttachmentCommandRequest, type EditorCommandJsonValue, type EditorServiceGatewayRequest, type EditorServiceGatewayResponse } from '@fps-games/editor-protocol';
2
+ export interface LocalEditorInjectedCommandRuntime {
3
+ readonly protocolVersion: number;
4
+ readonly serviceInstanceId: string;
5
+ readonly gatewayPath: string;
6
+ readonly token: string;
7
+ }
8
+ export interface LocalEditorCommandServiceClient {
9
+ readonly serviceInstanceId: string;
10
+ request(request: EditorServiceGatewayRequest): Promise<EditorServiceGatewayResponse>;
11
+ attach(input: LocalEditorCommandServiceAttachmentOptions): Promise<() => Promise<void>>;
12
+ watchAuthoring(input: LocalEditorCommandServiceAuthoringWatchOptions): Promise<() => void>;
13
+ }
14
+ export interface LocalEditorCommandServiceAttachmentOptions {
15
+ readonly attachmentId: string;
16
+ readonly label?: string;
17
+ readonly handlers: Readonly<Record<string, (input: EditorCommandJsonValue | undefined, request: EditorBrowserAttachmentCommandRequest) => unknown | Promise<unknown>>>;
18
+ }
19
+ export interface LocalEditorCommandServiceAuthoringWatchOptions {
20
+ onSnapshot(snapshot: EditorAuthoringSnapshot): void | Promise<void>;
21
+ onEvents?(events: readonly EditorAuthoringEvent[]): void | Promise<void>;
22
+ onIdle?(): void | Promise<void>;
23
+ onError?(error: unknown): void | Promise<void>;
24
+ pollIntervalMs?: number;
25
+ }
26
+ export declare function readInjectedLocalEditorCommandRuntime(): LocalEditorInjectedCommandRuntime | null;
27
+ export declare function createLocalEditorCommandServiceClient(options?: {
28
+ runtime?: LocalEditorInjectedCommandRuntime;
29
+ fetch?: typeof fetch;
30
+ origin?: string;
31
+ }): LocalEditorCommandServiceClient | null;
32
+ //# sourceMappingURL=editor-command-service-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor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C,MAAM,EAAE,SAAS,oBAAoB,EAAE,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzE,MAAM,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,OAAO,CAAC,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,qCAAqC,IAAI,iCAAiC,GAAG,IAAI,CAQhG;AAED,wBAAgB,qCAAqC,CAAC,OAAO,GAAE;IAC7D,OAAO,CAAC,EAAE,iCAAiC,CAAC;IAC5C,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACZ,GAAG,+BAA+B,GAAG,IAAI,CA0L9C"}
@@ -0,0 +1,254 @@
1
+ import { EDITOR_SERVICE_PROTOCOL_VERSION, } from '@fps-games/editor-protocol';
2
+ export function readInjectedLocalEditorCommandRuntime() {
3
+ if (typeof __FPS_EDITOR_AGENT_RUNTIME__ === 'undefined')
4
+ return null;
5
+ const value = __FPS_EDITOR_AGENT_RUNTIME__;
6
+ if (!value || value.protocolVersion !== EDITOR_SERVICE_PROTOCOL_VERSION
7
+ || typeof value.serviceInstanceId !== 'string' || !value.serviceInstanceId
8
+ || typeof value.gatewayPath !== 'string' || !value.gatewayPath.startsWith('/')
9
+ || typeof value.token !== 'string' || !value.token)
10
+ return null;
11
+ return Object.freeze({ ...value });
12
+ }
13
+ export function createLocalEditorCommandServiceClient(options = {}) {
14
+ const runtime = options.runtime ?? readInjectedLocalEditorCommandRuntime();
15
+ if (!runtime)
16
+ return null;
17
+ const fetchImpl = options.fetch ?? globalThis.fetch;
18
+ if (typeof fetchImpl !== 'function')
19
+ return null;
20
+ let currentServiceInstanceId = runtime.serviceInstanceId;
21
+ const endpoint = new URL(runtime.gatewayPath, options.origin ?? globalThis.location?.origin ?? 'http://fps-editor.local').href;
22
+ const sendRequest = async (body, signal) => {
23
+ const response = await fetchImpl(endpoint, {
24
+ method: 'POST',
25
+ headers: { authorization: `Bearer ${runtime.token}`, 'content-type': 'application/json' },
26
+ body: JSON.stringify(body),
27
+ ...(signal ? { signal } : {}),
28
+ });
29
+ const value = await response.json();
30
+ if (!response.ok && value.ok)
31
+ throw new Error(`Editor Command Gateway returned HTTP ${response.status}.`);
32
+ if (value.ok && value.kind === 'status')
33
+ currentServiceInstanceId = value.status.serviceInstanceId;
34
+ return value;
35
+ };
36
+ const request = (body) => (sendRequest(body));
37
+ return Object.freeze({
38
+ get serviceInstanceId() { return currentServiceInstanceId; },
39
+ request,
40
+ async attach(input) {
41
+ await assertServiceIdentity(request, currentServiceInstanceId);
42
+ const commandIds = await resolveAttachmentCommandIds(request, input.handlers);
43
+ let active = true;
44
+ let attachmentGeneration = 0;
45
+ const register = async () => {
46
+ await assertServiceIdentity(request, currentServiceInstanceId);
47
+ const registration = await request({
48
+ kind: 'attachment.register',
49
+ attachment: {
50
+ attachmentId: input.attachmentId,
51
+ ...(input.label ? { label: input.label } : {}),
52
+ targets: ['view', 'renderer'],
53
+ commandIds,
54
+ },
55
+ });
56
+ if (!registration.ok)
57
+ throw new Error(formatDiagnostics(registration));
58
+ attachmentGeneration += 1;
59
+ };
60
+ await register();
61
+ const controller = new AbortController();
62
+ const poll = async () => {
63
+ while (!controller.signal.aborted) {
64
+ let response;
65
+ try {
66
+ response = await sendRequest({ kind: 'attachment.poll', attachmentId: input.attachmentId, timeoutMs: 25000 }, controller.signal);
67
+ }
68
+ catch {
69
+ if (controller.signal.aborted)
70
+ return;
71
+ await wait(250);
72
+ continue;
73
+ }
74
+ if (!response.ok) {
75
+ const missing = response.diagnostics.some(diagnostic => diagnostic.code === 'attachment.notFound');
76
+ if (missing) {
77
+ try {
78
+ await register();
79
+ }
80
+ catch { /* retry after bounded backoff */ }
81
+ }
82
+ await wait(250);
83
+ continue;
84
+ }
85
+ if (response.kind !== 'attachment.poll' || !response.request)
86
+ continue;
87
+ const generation = attachmentGeneration;
88
+ void settleAttachmentRequest(response.request, generation);
89
+ }
90
+ };
91
+ const settleAttachmentRequest = async (forwarded, generation) => {
92
+ if (!active || generation !== attachmentGeneration)
93
+ return;
94
+ const handler = input.handlers[forwarded.invocation.commandId];
95
+ try {
96
+ if (!handler)
97
+ throw new Error(`Browser command handler is unavailable: ${forwarded.invocation.commandId}`);
98
+ const output = await handler(forwarded.invocation.input, forwarded);
99
+ if (!active || generation !== attachmentGeneration)
100
+ return;
101
+ await request({
102
+ kind: 'attachment.result',
103
+ attachmentId: input.attachmentId,
104
+ result: {
105
+ requestId: forwarded.requestId,
106
+ operationId: forwarded.operationId,
107
+ ok: true,
108
+ output: toJsonValue(output),
109
+ },
110
+ });
111
+ }
112
+ catch (error) {
113
+ if (!active || generation !== attachmentGeneration)
114
+ return;
115
+ await request({
116
+ kind: 'attachment.result',
117
+ attachmentId: input.attachmentId,
118
+ result: {
119
+ requestId: forwarded.requestId,
120
+ operationId: forwarded.operationId,
121
+ ok: false,
122
+ diagnostics: [{
123
+ severity: 'error',
124
+ source: 'adapter',
125
+ code: 'browser.commandFailed',
126
+ message: error instanceof Error ? error.message : String(error),
127
+ }],
128
+ },
129
+ }).catch(() => undefined);
130
+ }
131
+ };
132
+ void poll();
133
+ return async () => {
134
+ if (!active)
135
+ return;
136
+ active = false;
137
+ attachmentGeneration += 1;
138
+ controller.abort();
139
+ await request({ kind: 'attachment.unregister', attachmentId: input.attachmentId }).catch(() => undefined);
140
+ };
141
+ },
142
+ async watchAuthoring(input) {
143
+ await assertServiceIdentity(request, runtime.serviceInstanceId);
144
+ let active = true;
145
+ const controller = new AbortController();
146
+ let serviceInstanceId = currentServiceInstanceId;
147
+ let cursor = 0;
148
+ const initial = await request({ kind: 'authoring.snapshot' });
149
+ if (!initial.ok || initial.kind !== 'authoring.snapshot' || initial.result.kind !== 'snapshot-required') {
150
+ throw new Error('Editor Service did not return an initial authoring snapshot.');
151
+ }
152
+ serviceInstanceId = initial.result.snapshot.serviceInstanceId;
153
+ cursor = initial.result.snapshot.eventCursor;
154
+ await input.onSnapshot(initial.result.snapshot);
155
+ currentServiceInstanceId = serviceInstanceId;
156
+ const loop = async () => {
157
+ while (active) {
158
+ try {
159
+ const response = await sendRequest({
160
+ kind: 'authoring.snapshot',
161
+ afterEventCursor: cursor,
162
+ serviceInstanceId,
163
+ }, controller.signal);
164
+ if (!active || controller.signal.aborted)
165
+ return;
166
+ if (!response.ok || response.kind !== 'authoring.snapshot')
167
+ throw new Error('Authoring event request failed.');
168
+ if (response.result.kind === 'snapshot-required') {
169
+ if (!active)
170
+ return;
171
+ await input.onSnapshot(response.result.snapshot);
172
+ if (!active)
173
+ return;
174
+ serviceInstanceId = response.result.snapshot.serviceInstanceId;
175
+ currentServiceInstanceId = serviceInstanceId;
176
+ cursor = response.result.snapshot.eventCursor;
177
+ }
178
+ else {
179
+ if (!active)
180
+ return;
181
+ if (response.result.events.length) {
182
+ await input.onEvents?.(response.result.events);
183
+ }
184
+ else {
185
+ await input.onIdle?.();
186
+ }
187
+ if (!active)
188
+ return;
189
+ serviceInstanceId = response.result.serviceInstanceId;
190
+ currentServiceInstanceId = serviceInstanceId;
191
+ cursor = response.result.latestCursor;
192
+ }
193
+ }
194
+ catch (error) {
195
+ if (!active || controller.signal.aborted)
196
+ return;
197
+ // A Browser projection is reconnectable. The next successful read
198
+ // uses the same cursor and the service decides events vs snapshot.
199
+ try {
200
+ await input.onError?.(error);
201
+ }
202
+ catch { /* keep the reconnect loop alive */ }
203
+ }
204
+ if (active)
205
+ await wait(Math.max(25, input.pollIntervalMs ?? 250));
206
+ }
207
+ };
208
+ void loop();
209
+ return () => {
210
+ if (!active)
211
+ return;
212
+ active = false;
213
+ controller.abort();
214
+ };
215
+ },
216
+ });
217
+ }
218
+ async function resolveAttachmentCommandIds(request, handlers) {
219
+ const candidates = new Set(Object.keys(handlers));
220
+ const result = [];
221
+ let cursor;
222
+ do {
223
+ const response = await request({ kind: 'commands.list', limit: 100, ...(cursor ? { cursor } : {}) });
224
+ if (!response.ok || response.kind !== 'commands')
225
+ throw new Error('Editor Command catalog is unavailable for Browser attachment.');
226
+ for (const entry of response.page.commands) {
227
+ if (candidates.has(entry.manifest.id)
228
+ && (entry.manifest.target === 'view' || entry.manifest.target === 'renderer')) {
229
+ result.push(entry.manifest.id);
230
+ }
231
+ }
232
+ cursor = response.page.nextCursor;
233
+ } while (cursor);
234
+ return result.sort();
235
+ }
236
+ async function assertServiceIdentity(request, expectedServiceInstanceId) {
237
+ const response = await request({ kind: 'status' });
238
+ if (!response.ok || response.kind !== 'status'
239
+ || response.status.protocolVersion !== EDITOR_SERVICE_PROTOCOL_VERSION
240
+ || response.status.serviceInstanceId !== expectedServiceInstanceId) {
241
+ throw new Error('Injected Editor Service identity or protocol is incompatible.');
242
+ }
243
+ }
244
+ function formatDiagnostics(response) {
245
+ return response.diagnostics.map(diagnostic => diagnostic.message).join('; ') || 'Editor Command Gateway request failed.';
246
+ }
247
+ function toJsonValue(value) {
248
+ const serialized = JSON.stringify(value ?? null);
249
+ return serialized === undefined ? null : JSON.parse(serialized);
250
+ }
251
+ function wait(timeoutMs) {
252
+ return new Promise(resolve => setTimeout(resolve, timeoutMs));
253
+ }
254
+ //# sourceMappingURL=editor-command-service-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-command-service-client.js","sourceRoot":"","sources":["../src/editor-command-service-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,GAOhC,MAAM,4BAA4B,CAAC;AAmCpC,MAAM,UAAU,qCAAqC;IACnD,IAAI,OAAO,4BAA4B,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IACrE,MAAM,KAAK,GAAG,4BAA4B,CAAC;IAC3C,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,eAAe,KAAK,+BAA+B;WAClE,OAAO,KAAK,CAAC,iBAAiB,KAAK,QAAQ,IAAI,CAAC,KAAK,C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C,MAAM,CAAC,eAAe,KAAK,+BAA+B;WACnE,QAAQ,CAAC,MAAM,CAAC,iBAAiB,KAAK,yBAAyB,EAAE,CAAC;QACrE,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;IACnF,CAAC;AACH,CAAC;AAED,SAAS,iBAAiB,CAAC,QAA8D;IACvF,OAAO,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,wCAAwC,CAAC;AAC3H,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC;IACjD,OAAO,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAA2B,CAAC;AAC5F,CAAC;AAED,SAAS,IAAI,CAAC,SAAiB;IAC7B,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AAChE,CAAC","sourcesContent":["import {\n EDITOR_SERVICE_PROTOCOL_VERSION,\n type EditorAuthoringEvent,\n type EditorAuthoringSnapshot,\n type EditorBrowserAttachmentCommandRequest,\n type EditorCommandJsonValue,\n type EditorServiceGatewayRequest,\n type EditorServiceGatewayResponse,\n} from '@fps-games/editor-protocol';\n\ndeclare const __FPS_EDITOR_AGENT_RUNTIME__: LocalEditorInjectedCommandRuntime | undefined;\n\nexport interface LocalEditorInjectedCommandRuntime {\n readonly protocolVersion: number;\n readonly serviceInstanceId: string;\n readonly gatewayPath: string;\n readonly token: string;\n}\n\nexport interface LocalEditorCommandServiceClient {\n readonly serviceInstanceId: string;\n request(request: EditorServiceGatewayRequest): Promise<EditorServiceGatewayResponse>;\n attach(input: LocalEditorCommandServiceAttachmentOptions): Promise<() => Promise<void>>;\n watchAuthoring(input: LocalEditorCommandServiceAuthoringWatchOptions): Promise<() => void>;\n}\n\nexport interface LocalEditorCommandServiceAttachmentOptions {\n readonly attachmentId: string;\n readonly label?: string;\n readonly handlers: Readonly<Record<string, (\n input: EditorCommandJsonValue | undefined,\n request: EditorBrowserAttachmentCommandRequest,\n ) => unknown | Promise<unknown>>>;\n}\n\nexport interface LocalEditorCommandServiceAuthoringWatchOptions {\n onSnapshot(snapshot: EditorAuthoringSnapshot): void | Promise<void>;\n onEvents?(events: readonly EditorAuthoringEvent[]): void | Promise<void>;\n onIdle?(): void | Promise<void>;\n onError?(error: unknown): void | Promise<void>;\n pollIntervalMs?: number;\n}\n\nexport function readInjectedLocalEditorCommandRuntime(): LocalEditorInjectedCommandRuntime | null {\n if (typeof __FPS_EDITOR_AGENT_RUNTIME__ === 'undefined') return null;\n const value = __FPS_EDITOR_AGENT_RUNTIME__;\n if (!value || value.protocolVersion !== EDITOR_SERVICE_PROTOCOL_VERSION\n || typeof value.serviceInstanceId !== 'string' || !value.serviceInstanceId\n || typeof value.gatewayPath !== 'string' || !value.gatewayPath.startsWith('/')\n || typeof value.token !== 'string' || !value.token) return null;\n return Object.freeze({ ...value });\n}\n\nexport function createLocalEditorCommandServiceClient(options: {\n runtime?: LocalEditorInjectedCommandRuntime;\n fetch?: typeof fetch;\n origin?: string;\n} = {}): LocalEditorCommandServiceClient | null {\n const runtime = options.runtime ?? readInjectedLocalEditorCommandRuntime();\n if (!runtime) return null;\n const fetchImpl = options.fetch ?? globalThis.fetch;\n if (typeof fetchImpl !== 'function') return null;\n let currentServiceInstanceId = runtime.serviceInstanceId;\n const endpoint = new URL(runtime.gatewayPath, options.origin ?? globalThis.location?.origin ?? 'http://fps-editor.local').href;\n const sendRequest = async (\n body: EditorServiceGatewayRequest,\n signal?: AbortSignal,\n ): Promise<EditorServiceGatewayResponse> => {\n const response = await fetchImpl(endpoint, {\n method: 'POST',\n headers: { authorization: `Bearer ${runtime.token}`, 'content-type': 'application/json' },\n body: JSON.stringify(body),\n ...(signal ? { signal } : {}),\n });\n const value = await response.json() as EditorServiceGatewayResponse;\n if (!response.ok && value.ok) throw new Error(`Editor Command Gateway returned HTTP ${response.status}.`);\n if (value.ok && value.kind === 'status') currentServiceInstanceId = value.status.serviceInstanceId;\n return value;\n };\n const request = (body: EditorServiceGatewayRequest): Promise<EditorServiceGatewayResponse> => (\n sendRequest(body)\n );\n return Object.freeze({\n get serviceInstanceId() { return currentServiceInstanceId; },\n request,\n async attach(input: LocalEditorCommandServiceAttachmentOptions) {\n await assertServiceIdentity(request, currentServiceInstanceId);\n const commandIds = await resolveAttachmentCommandIds(request, input.handlers);\n let active = true;\n let attachmentGeneration = 0;\n const register = async (): Promise<void> => {\n await assertServiceIdentity(request, currentServiceInstanceId);\n const registration = await request({\n kind: 'attachment.register',\n attachment: {\n attachmentId: input.attachmentId,\n ...(input.label ? { label: input.label } : {}),\n targets: ['view', 'renderer'],\n commandIds,\n },\n });\n if (!registration.ok) throw new Error(formatDiagnostics(registration));\n attachmentGeneration += 1;\n };\n await register();\n const controller = new AbortController();\n const poll = async (): Promise<void> => {\n while (!controller.signal.aborted) {\n let response: EditorServiceGatewayResponse;\n try {\n response = await sendRequest(\n { kind: 'attachment.poll', attachmentId: input.attachmentId, timeoutMs: 25_000 },\n controller.signal,\n );\n } catch {\n if (controller.signal.aborted) return;\n await wait(250);\n continue;\n }\n if (!response.ok) {\n const missing = response.diagnostics.some(diagnostic => diagnostic.code === 'attachment.notFound');\n if (missing) {\n try { await register(); } catch { /* retry after bounded backoff */ }\n }\n await wait(250);\n continue;\n }\n if (response.kind !== 'attachment.poll' || !response.request) continue;\n const generation = attachmentGeneration;\n void settleAttachmentRequest(response.request, generation);\n }\n };\n const settleAttachmentRequest = async (\n forwarded: EditorBrowserAttachmentCommandRequest,\n generation: number,\n ): Promise<void> => {\n if (!active || generation !== attachmentGeneration) return;\n const handler = input.handlers[forwarded.invocation.commandId];\n try {\n if (!handler) throw new Error(`Browser command handler is unavailable: ${forwarded.invocation.commandId}`);\n const output = await handler(forwarded.invocation.input, forwarded);\n if (!active || generation !== attachmentGeneration) return;\n await request({\n kind: 'attachment.result',\n attachmentId: input.attachmentId,\n result: {\n requestId: forwarded.requestId,\n operationId: forwarded.operationId,\n ok: true,\n output: toJsonValue(output),\n },\n });\n } catch (error) {\n if (!active || generation !== attachmentGeneration) return;\n await request({\n kind: 'attachment.result',\n attachmentId: input.attachmentId,\n result: {\n requestId: forwarded.requestId,\n operationId: forwarded.operationId,\n ok: false,\n diagnostics: [{\n severity: 'error',\n source: 'adapter',\n code: 'browser.commandFailed',\n message: error instanceof Error ? error.message : String(error),\n }],\n },\n }).catch(() => undefined);\n }\n };\n void poll();\n return async () => {\n if (!active) return;\n active = false;\n attachmentGeneration += 1;\n controller.abort();\n await request({ kind: 'attachment.unregister', attachmentId: input.attachmentId }).catch(() => undefined);\n };\n },\n async watchAuthoring(input: LocalEditorCommandServiceAuthoringWatchOptions) {\n await assertServiceIdentity(request, runtime.serviceInstanceId);\n let active = true;\n const controller = new AbortController();\n let serviceInstanceId = currentServiceInstanceId;\n let cursor = 0;\n const initial = await request({ kind: 'authoring.snapshot' });\n if (!initial.ok || initial.kind !== 'authoring.snapshot' || initial.result.kind !== 'snapshot-required') {\n throw new Error('Editor Service did not return an initial authoring snapshot.');\n }\n serviceInstanceId = initial.result.snapshot.serviceInstanceId;\n cursor = initial.result.snapshot.eventCursor;\n await input.onSnapshot(initial.result.snapshot);\n currentServiceInstanceId = serviceInstanceId;\n const loop = async (): Promise<void> => {\n while (active) {\n try {\n const response = await sendRequest(\n {\n kind: 'authoring.snapshot',\n afterEventCursor: cursor,\n serviceInstanceId,\n },\n controller.signal,\n );\n if (!active || controller.signal.aborted) return;\n if (!response.ok || response.kind !== 'authoring.snapshot') throw new Error('Authoring event request failed.');\n if (response.result.kind === 'snapshot-required') {\n if (!active) return;\n await input.onSnapshot(response.result.snapshot);\n if (!active) return;\n serviceInstanceId = response.result.snapshot.serviceInstanceId;\n currentServiceInstanceId = serviceInstanceId;\n cursor = response.result.snapshot.eventCursor;\n } else {\n if (!active) return;\n if (response.result.events.length) {\n await input.onEvents?.(response.result.events);\n } else {\n await input.onIdle?.();\n }\n if (!active) return;\n serviceInstanceId = response.result.serviceInstanceId;\n currentServiceInstanceId = serviceInstanceId;\n cursor = response.result.latestCursor;\n }\n } catch (error) {\n if (!active || controller.signal.aborted) return;\n // A Browser projection is reconnectable. The next successful read\n // uses the same cursor and the service decides events vs snapshot.\n try { await input.onError?.(error); } catch { /* keep the reconnect loop alive */ }\n }\n if (active) await wait(Math.max(25, input.pollIntervalMs ?? 250));\n }\n };\n void loop();\n return () => {\n if (!active) return;\n active = false;\n controller.abort();\n };\n },\n });\n}\n\nasync function resolveAttachmentCommandIds(\n request: (request: EditorServiceGatewayRequest) => Promise<EditorServiceGatewayResponse>,\n handlers: LocalEditorCommandServiceAttachmentOptions['handlers'],\n): Promise<string[]> {\n const candidates = new Set(Object.keys(handlers));\n const result: string[] = [];\n let cursor: string | undefined;\n do {\n const response = await request({ kind: 'commands.list', limit: 100, ...(cursor ? { cursor } : {}) });\n if (!response.ok || response.kind !== 'commands') throw new Error('Editor Command catalog is unavailable for Browser attachment.');\n for (const entry of response.page.commands) {\n if (candidates.has(entry.manifest.id)\n && (entry.manifest.target === 'view' || entry.manifest.target === 'renderer')) {\n result.push(entry.manifest.id);\n }\n }\n cursor = response.page.nextCursor;\n } while (cursor);\n return result.sort();\n}\n\nasync function assertServiceIdentity(\n request: (request: EditorServiceGatewayRequest) => Promise<EditorServiceGatewayResponse>,\n expectedServiceInstanceId: string,\n): Promise<void> {\n const response = await request({ kind: 'status' });\n if (!response.ok || response.kind !== 'status'\n || response.status.protocolVersion !== EDITOR_SERVICE_PROTOCOL_VERSION\n || response.status.serviceInstanceId !== expectedServiceInstanceId) {\n throw new Error('Injected Editor Service identity or protocol is incompatible.');\n }\n}\n\nfunction formatDiagnostics(response: Extract<EditorServiceGatewayResponse, { ok: false }>): string {\n return response.diagnostics.map(diagnostic => diagnostic.message).join('; ') || 'Editor Command Gateway request failed.';\n}\n\nfunction toJsonValue(value: unknown): EditorCommandJsonValue {\n const serialized = JSON.stringify(value ?? null);\n return serialized === undefined ? null : JSON.parse(serialized) as EditorCommandJsonValue;\n}\n\nfunction wait(timeoutMs: number): Promise<void> {\n return new Promise(resolve => setTimeout(resolve, timeoutMs));\n}\n"]}
@@ -1,7 +1,9 @@
1
1
  /** Browser host adapter for editor runtimes running inside a project page. */
2
2
  export * from './local-editor-ui';
3
+ export * from './editor-command-service-client';
4
+ export * from './local-editor-command-center';
3
5
  export * from './local-editor-project-file-preview';
4
- export type { LocalEditorBrowserAgentBridgeStatus, LocalEditorBrowserAgentBridgeStatusKind, LocalEditorBrowserPerformanceMeshCategoryCounts, LocalEditorBrowserPerformanceMeshClassCounts, LocalEditorBrowserPerformanceProjectionRoleCounts, LocalEditorBrowserPerformanceStats, LocalEditorBrowserPluginPanelDiagnostic, LocalEditorBrowserPluginPanelItem, LocalEditorBrowserPluginPanelState, LocalEditorBrowserPluginLifecycleState, LocalEditorBrowserInspectorActionInput, LocalEditorBrowserPrefabStageImportStats, LocalEditorBrowserPrefabStageState, LocalEditorBrowserPrefabStageStructureItem, LocalEditorBrowserPrefabStageStructureItemKind, LocalEditorBrowserPreviewCommandSurface, LocalEditorBrowserPreviewScope, LocalEditorBrowserPreviewScopeKind, LocalEditorBrowserPreviewTarget, LocalEditorBrowserUi, LocalEditorBrowserUiPreviewState, LocalEditorBrowserMarkerRelationActionInput, LocalEditorBrowserMarkerRelationEndpointItem, LocalEditorBrowserMarkerRelationEndpointInput, LocalEditorBrowserMarkerRelationItem, LocalEditorBrowserMarkerRelationPickState, LocalEditorBrowserMarkerRelationTypeItem, } from './local-editor-ui-types';
6
+ export type { LocalEditorBrowserPerformanceMeshCategoryCounts, LocalEditorBrowserPerformanceMeshClassCounts, LocalEditorBrowserPerformanceProjectionRoleCounts, LocalEditorBrowserPerformanceStats, LocalEditorBrowserPluginPanelDiagnostic, LocalEditorBrowserPluginPanelItem, LocalEditorBrowserPluginPanelState, LocalEditorBrowserPluginLifecycleState, LocalEditorBrowserInspectorActionInput, LocalEditorBrowserPrefabStageImportStats, LocalEditorBrowserPrefabStageState, LocalEditorBrowserPrefabStageStructureItem, LocalEditorBrowserPrefabStageStructureItemKind, LocalEditorBrowserPreviewCommandSurface, LocalEditorBrowserPreviewScope, LocalEditorBrowserPreviewScopeKind, LocalEditorBrowserPreviewTarget, LocalEditorBrowserUi, LocalEditorBrowserUiPreviewState, LocalEditorBrowserInspectorPresentationPatch, LocalEditorBrowserPresentationDelta, LocalEditorBrowserMarkerRelationActionInput, LocalEditorBrowserMarkerRelationEndpointItem, LocalEditorBrowserMarkerRelationEndpointInput, LocalEditorBrowserMarkerRelationItem, LocalEditorBrowserMarkerRelationPickState, LocalEditorBrowserMarkerRelationTypeItem, } from './local-editor-ui-types';
5
7
  export * from './runtime-debug';
6
8
  export { registerLocalEditorBrowserInspectorControl, resolveLocalEditorBrowserInspectorControls, } from './plugin-contributions';
7
9
  export { toTransformOperationPolicyStatusLabel, } from './local-editor-ui-shared';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAE9E,cAAc,mBAAmB,CAAC;AAClC,cAAc,qCAAqC,CAAC;AACpD,YAAY,EACV,mCAAmC,EACnC,uCAAuC,EACvC,+CAA+C,EAC/C,4CAA4C,EAC5C,iDAAiD,EACjD,kCAAkC,EAClC,uCAAuC,EACvC,iCAAiC,EACjC,kCAAkC,EAClC,sCAAsC,EACtC,sCAAsC,EACtC,wCAAwC,EACxC,kCAAkC,EAClC,0CAA0C,EAC1C,8CAA8C,EAC9C,uCAAuC,EACvC,8BAA8B,EAC9B,kCAAkC,EAClC,+BAA+B,EAC/B,oBAAoB,EACpB,gCAAgC,EAChC,2CAA2C,EAC3C,4CAA4C,EAC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,IAAI,CAAC;IACd,gBAAgB,CAAC,CAAC,SAAS,MAAM,gBAAgB,EAC/C,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,IAAI,EAC9C,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,MAAM,IAAI,CAAC;IACd,qBAAqB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,MAAM,CAAC;IAC9D,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,UAAU,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5D,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAaD,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAMnD;AAED,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,QAAQ,EACb,MAAM,CAAC,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,GACzC,iBAAiB,GAAG,IAAI,CAI1B;AAED,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,kBAAuB,GAAG,WAAW,CA2B/E"}
@@ -1,5 +1,7 @@
1
1
  /** Browser host adapter for editor runtimes running inside a project page. */
2
2
  export * from './local-editor-ui.js';
3
+ export * from './editor-command-service-client.js';
4
+ export * from './local-editor-command-center.js';
3
5
  export * from './local-editor-project-file-preview.js';
4
6
  export * from './runtime-debug.js';
5
7
  export { registerLocalEditorBrowserInspectorControl, resolveLocalEditorBrowserInspectorControls, } from './plugin-contributions.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAE9E,cAAc,mBAAmB,CAAC;AAClC,cAAc,qCAAqC,CAAC;AA8BpD,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,0CAA0C,EAC1C,0CAA0C,GA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AAQ,EAAE;QAC9B,gBAAgB,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,aAAa;QACzC,aAAa;QACb,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,YAAY;YACzC,GAAG,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAyB,EAAE,YAAY,CAAC,CAAC;YACpE,OAAO,GAAG,EAAE,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAyB,EAAE,YAAY,CAAC,CAAC;QACtF,CAAC;QACD,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,YAAY;YAC3C,GAAG,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAyB,EAAE,YAAY,CAAC,CAAC;YACpE,OAAO,GAAG,EAAE,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAyB,EAAE,YAAY,CAAC,CAAC;QACtF,CAAC;QACD,qBAAqB,EAAE,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,qBAAqB,CAAC,QAAQ,CAAC;QACtE,oBAAoB,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,oBAAoB,CAAC,MAAM,CAAC;QAChE,UAAU,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,EAAE,SAAS,CAAC;QACxE,YAAY,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC;KACjD,CAAC;AACJ,CAAC","sourcesContent":["/** Browser host adapter for editor runtimes running inside a project page. */\n\nexport * from './local-editor-ui';\nexport * from './local-editor-project-file-preview';\nexport type {\n LocalEditorBrowserAgentBridgeStatus,\n LocalEditorBrowserAgentBridgeStatusKind,\n LocalEditorBrowserPerformanceMeshCategoryCounts,\n LocalEditorBrowserPerformanceMeshClassCounts,\n LocalEditorBrowserPerformanceProjectionRoleCounts,\n LocalEditorBrowserPerformanceStats,\n LocalEditorBrowserPluginPanelDiagnostic,\n LocalEditorBrowserPluginPanelItem,\n LocalEditorBrowserPluginPanelState,\n LocalEditorBrowserPluginLifecycleState,\n LocalEditorBrowserInspectorActionInput,\n LocalEditorBrowserPrefabStageImportStats,\n LocalEditorBrowserPrefabStageState,\n LocalEditorBrowserPrefabStageStructureItem,\n LocalEditorBrowserPrefabStageStructureItemKind,\n LocalEditorBrowserPreviewCommandSurface,\n LocalEditorBrowserPreviewScope,\n LocalEditorBrowserPreviewScopeKind,\n LocalEditorBrowserPreviewTarget,\n LocalEditorBrowserUi,\n LocalEditorBrowserUiPreviewState,\n LocalEditorBrowserMarkerRelationActionInput,\n LocalEditorBrowserMarkerRelationEndpointItem,\n LocalEditorBrowserMarkerRelationEndpointInput,\n LocalEditorBrowserMarkerRelationItem,\n LocalEditorBrowserMarkerRelationPickState,\n LocalEditorBrowserMarkerRelationTypeItem,\n} from './local-editor-ui-types';\nexport * from './runtime-debug';\nexport {\n registerLocalEditorBrowserInspectorControl,\n resolveLocalEditorBrowserInspectorControls,\n} from './plugin-contributions';\nexport {\n toTransformOperationPolicyStatusLabel,\n} from './local-editor-ui-shared';\nexport {\n createLocalEditorModalDialog,\n} from './local-editor-ui-modal-dialog';\nexport type {\n LocalEditorModalDialogController,\n LocalEditorModalDialogInput,\n LocalEditorModalDialogOptions,\n LocalEditorModalDialogTone,\n} from './local-editor-ui-modal-dialog';\nexport {\n resolveLocalEditorAssetBrowserTab,\n resolveLocalEditorBrowserAssetKind,\n} from './local-editor-ui-asset-kind';\nexport {\n createLocalEditorAssetFilesystemSnapshot,\n filterLocalEditorAssetFilesystemEntries,\n filterLocalEditorAssetFilesystemAssets,\n resolveLocalEditorAssetFilesystemBreadcrumbs,\n resolveLocalEditorAssetFilesystemEntryTab,\n resolveLocalEditorAssetFilesystemFolderPath,\n resolveLocalEditorAssetFilesystemParentPath,\n resolveLocalEditorAssetFilesystemVisibleFolders,\n resolveLocalEditorProjectMediaThumbnailCacheKey,\n resolveLocalEditorProjectMediaThumbnailKind,\n} from './local-editor-asset-filesystem';\nexport {\n LOCAL_EDITOR_COORDINATE_AXIS_DIRECTIONS,\n resolveLocalEditorCoordinateAxisActiveDirection,\n resolveLocalEditorCoordinateAxisDirection,\n} from './local-editor-viewport-orientation';\nexport type {\n LocalEditorCoordinateAxisDirection,\n LocalEditorCoordinateAxisDirectionId,\n} from './local-editor-viewport-orientation';\nexport type {\n LocalEditorAssetFilesystemFolder,\n LocalEditorAssetFilesystemBreadcrumb,\n LocalEditorAssetFilesystemEntry,\n LocalEditorAssetFilesystemSnapshot,\n LocalEditorAssetFilesystemViewMode,\n LocalEditorProjectMediaThumbnailKind,\n} from './local-editor-asset-filesystem';\nexport {\n createLocalEditorPrefabStageTitle,\n findLocalEditorPrefabStageStructureItem,\n flattenLocalEditorPrefabStageStructureItems,\n resolveLocalEditorPreviewToolSupport,\n resolveLocalEditorRightDockVisibility,\n resolveLocalEditorPrefabStageWorkbenchLayout,\n shouldLocalEditorClosePerformanceMonitor,\n type LocalEditorPreviewControlKey,\n type LocalEditorPreviewToolSupport,\n type LocalEditorPreviewToolSupportState,\n} from './local-editor-ui-prefab-stage';\nexport {\n isHierarchyMenuAuthorityCurrent,\n isHierarchyCompositionSessionCurrent,\n isHierarchyRenderedAuthorityCurrent,\n resolveHierarchyTransportDragIds,\n sameHierarchyIdSet,\n shouldDeferHierarchyDomRender,\n shouldCommitHierarchyRenameAfterCompositionEnd,\n type HierarchyCompositionSession,\n type HierarchyRenderedAuthority,\n} from './local-editor-ui-hierarchy-controller';\nexport {\n formatLocalEditorStatusDiagnostic,\n formatLocalEditorStatusDiagnosticDetails,\n} from './local-editor-ui-status-format';\nexport {\n createLocalEditorStatusCenterViewModel,\n resolveLocalEditorStatusDiagnosticLocatePlan,\n resolveLocalEditorStatusDiagnosticLocator,\n settleLocalEditorStatusDiagnosticRequest,\n resolveLocalEditorStatusDiagnostics,\n resolveLocalEditorStatusDiagnosticSeverity,\n shouldCloseLocalEditorStatusCenter,\n type LocalEditorStatusCenterViewModel,\n type LocalEditorStatusDiagnosticLocatePlan,\n type LocalEditorStatusDiagnosticRequestToken,\n} from './local-editor-ui-status-diagnostics';\nexport type {\n LocalEditorBrowserStatusDiagnostic,\n LocalEditorBrowserStatusDiagnosticPhase,\n LocalEditorBrowserStatusDiagnosticSeverity,\n} from './local-editor-ui-types';\nexport type {\n LocalEditorBrowserResolvedAssetKind,\n} from './local-editor-ui-asset-kind';\nexport {\n resolveLocalEditorHierarchyDragOperation,\n resolveLocalEditorHierarchyDropSlot,\n type LocalEditorHierarchyDragLayout,\n type LocalEditorHierarchyDragLayoutRow,\n type LocalEditorHierarchyDragOperation,\n type LocalEditorHierarchyDropPreview,\n type LocalEditorHierarchyDropSlot,\n type LocalEditorHierarchyDropSlotKind,\n} from './local-editor-ui-hierarchy-drag-policy';\nexport {\n resolveLocalEditorHierarchyAutoScroll,\n type LocalEditorHierarchyAutoScrollInput,\n type LocalEditorHierarchyAutoScrollResolution,\n} from './local-editor-ui-hierarchy-auto-scroll';\nexport {\n normalizeLocalEditorWorkbenchLayout,\n normalizeLocalEditorWorkbenchUserLayout,\n resolveLocalEditorWorkbenchDockDisplay,\n resolveLocalEditorWorkbenchVisibility,\n} from './local-editor-ui-workbench';\nexport type {\n LocalEditorWorkbenchDockDisplay,\n LocalEditorWorkbenchLayoutControllerOptions,\n LocalEditorWorkbenchLayoutState,\n LocalEditorWorkbenchOverlayState,\n LocalEditorWorkbenchVisibility,\n LocalEditorWorkbenchViewport,\n} from './local-editor-ui-workbench';\n\nexport type BrowserEventTargetLike = Pick<EventTarget, 'addEventListener' | 'removeEventListener'>;\n\nexport interface BrowserHostOptions {\n window?: Window;\n document?: Document;\n canvas?: HTMLCanvasElement | string | null;\n}\n\nexport interface BrowserHost {\n window: Window;\n document: Document;\n canvas: HTMLCanvasElement | null;\n isIframe: boolean;\n searchParams: URLSearchParams;\n hasFocus(): boolean;\n getActiveElement(): Element | null;\n resolveCanvas(canvas?: HTMLCanvasElement | string | null): HTMLCanvasElement | null;\n addWindowEvent<K extends keyof WindowEventMap>(\n type: K,\n listener: (event: WindowEventMap[K]) => void,\n options?: boolean | AddEventListenerOptions,\n ): () => void;\n addDocumentEvent<K extends keyof DocumentEventMap>(\n type: K,\n listener: (event: DocumentEventMap[K]) => void,\n options?: boolean | AddEventListenerOptions,\n ): () => void;\n requestAnimationFrame(callback: FrameRequestCallback): number;\n cancelAnimationFrame(handle: number): void;\n setTimeout(callback: () => void, timeoutMs: number): number;\n clearTimeout(handle: number): void;\n}\n\nfunction getDefaultWindow(): Window {\n if (typeof window === 'undefined') {\n throw new Error('createBrowserHost requires a browser Window. Pass options.window in non-browser environments.');\n }\n return window;\n}\n\nfunction resolveDocument(win: Window, doc?: Document): Document {\n return doc ?? win.document;\n}\n\nexport function isIframeWindow(win: Window): boolean {\n try {\n return win.self !== win.top;\n } catch {\n return true;\n }\n}\n\nexport function resolveCanvasElement(\n doc: Document,\n canvas?: HTMLCanvasElement | string | null,\n): HTMLCanvasElement | null {\n if (!canvas) return null;\n if (typeof canvas !== 'string') return canvas;\n return doc.getElementById(canvas) as HTMLCanvasElement | null;\n}\n\nexport function createBrowserHost(options: BrowserHostOptions = {}): BrowserHost {\n const win = options.window ?? getDefaultWindow();\n const doc = resolveDocument(win, options.document);\n const resolveCanvas = (canvas = options.canvas ?? null) => resolveCanvasElement(doc, canvas);\n\n return {\n window: win,\n document: doc,\n canvas: resolveCanvas(),\n isIframe: isIframeWindow(win),\n searchParams: new URLSearchParams(win.location?.search ?? ''),\n hasFocus: () => doc.hasFocus(),\n getActiveElement: () => doc.activeElement,\n resolveCanvas,\n addWindowEvent(type, listener, eventOptions) {\n win.addEventListener(type, listener as EventListener, eventOptions);\n return () => win.removeEventListener(type, listener as EventListener, eventOptions);\n },\n addDocumentEvent(type, listener, eventOptions) {\n doc.addEventListener(type, listener as EventListener, eventOptions);\n return () => doc.removeEventListener(type, listener as EventListener, eventOptions);\n },\n requestAnimationFrame: callback => win.requestAnimationFrame(callback),\n cancelAnimationFrame: handle => win.cancelAnimationFrame(handle),\n setTimeout: (callback, timeoutMs) => win.setTimeout(callback, timeoutMs),\n clearTimeout: handle => win.clearTimeout(handle),\n };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAE9E,cAAc,mBAAmB,CAAC;AAClC,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AA8BpD,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,0CAA0C,EAC1C,0CAA0C,GAC3C,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,qCAAqC,GACtC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,4BAA4B,GAC7B,MAAM,gCAAgC,CAAC;AAOxC,OAAO,EACL,iCAAiC,EACjC,kCAAkC,GACnC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,wCAAwC,EACxC,uCAAuC,EACvC,sCAAsC,EACtC,4CAA4C,EAC5C,yCAAyC,EACzC,2CAA2C,EAC3C,2CAA2C,EAC3C,+CAA+C,EAC/C,+CAA+C,EAC/C,2CAA2C,GAC5C,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,uCAAuC,EACvC,+CAA+C,EAC/C,yCAAyC,GAC1C,MAAM,qCAAqC,CAAC;AAa7C,OAAO,EACL,iCAAiC,EACjC,uCAAuC,EACvC,2CAA2C,EAC3C,oCAAoC,EACpC,qCAAqC,EACrC,4CAA4C,EAC5C,wCAAwC,GAIzC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,+BAA+B,EAC/B,oCAAoC,EACpC,mCAAmC,EACnC,gCAAgC,EAChC,kBAAkB,EAClB,6BAA6B,EAC7B,8CAA8C,GAG/C,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,iCAAiC,EACjC,wCAAwC,GACzC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,sCAAsC,EACt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AE,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC;KACjD,CAAC;AACJ,CAAC","sourcesContent":["/** Browser host adapter for editor runtimes running inside a project page. */\n\nexport * from './local-editor-ui';\nexport * from './editor-command-service-client';\nexport * from './local-editor-command-center';\nexport * from './local-editor-project-file-preview';\nexport type {\n LocalEditorBrowserPerformanceMeshCategoryCounts,\n LocalEditorBrowserPerformanceMeshClassCounts,\n LocalEditorBrowserPerformanceProjectionRoleCounts,\n LocalEditorBrowserPerformanceStats,\n LocalEditorBrowserPluginPanelDiagnostic,\n LocalEditorBrowserPluginPanelItem,\n LocalEditorBrowserPluginPanelState,\n LocalEditorBrowserPluginLifecycleState,\n LocalEditorBrowserInspectorActionInput,\n LocalEditorBrowserPrefabStageImportStats,\n LocalEditorBrowserPrefabStageState,\n LocalEditorBrowserPrefabStageStructureItem,\n LocalEditorBrowserPrefabStageStructureItemKind,\n LocalEditorBrowserPreviewCommandSurface,\n LocalEditorBrowserPreviewScope,\n LocalEditorBrowserPreviewScopeKind,\n LocalEditorBrowserPreviewTarget,\n LocalEditorBrowserUi,\n LocalEditorBrowserUiPreviewState,\n LocalEditorBrowserInspectorPresentationPatch,\n LocalEditorBrowserPresentationDelta,\n LocalEditorBrowserMarkerRelationActionInput,\n LocalEditorBrowserMarkerRelationEndpointItem,\n LocalEditorBrowserMarkerRelationEndpointInput,\n LocalEditorBrowserMarkerRelationItem,\n LocalEditorBrowserMarkerRelationPickState,\n LocalEditorBrowserMarkerRelationTypeItem,\n} from './local-editor-ui-types';\nexport * from './runtime-debug';\nexport {\n registerLocalEditorBrowserInspectorControl,\n resolveLocalEditorBrowserInspectorControls,\n} from './plugin-contributions';\nexport {\n toTransformOperationPolicyStatusLabel,\n} from './local-editor-ui-shared';\nexport {\n createLocalEditorModalDialog,\n} from './local-editor-ui-modal-dialog';\nexport type {\n LocalEditorModalDialogController,\n LocalEditorModalDialogInput,\n LocalEditorModalDialogOptions,\n LocalEditorModalDialogTone,\n} from './local-editor-ui-modal-dialog';\nexport {\n resolveLocalEditorAssetBrowserTab,\n resolveLocalEditorBrowserAssetKind,\n} from './local-editor-ui-asset-kind';\nexport {\n createLocalEditorAssetFilesystemSnapshot,\n filterLocalEditorAssetFilesystemEntries,\n filterLocalEditorAssetFilesystemAssets,\n resolveLocalEditorAssetFilesystemBreadcrumbs,\n resolveLocalEditorAssetFilesystemEntryTab,\n resolveLocalEditorAssetFilesystemFolderPath,\n resolveLocalEditorAssetFilesystemParentPath,\n resolveLocalEditorAssetFilesystemVisibleFolders,\n resolveLocalEditorProjectMediaThumbnailCacheKey,\n resolveLocalEditorProjectMediaThumbnailKind,\n} from './local-editor-asset-filesystem';\nexport {\n LOCAL_EDITOR_COORDINATE_AXIS_DIRECTIONS,\n resolveLocalEditorCoordinateAxisActiveDirection,\n resolveLocalEditorCoordinateAxisDirection,\n} from './local-editor-viewport-orientation';\nexport type {\n LocalEditorCoordinateAxisDirection,\n LocalEditorCoordinateAxisDirectionId,\n} from './local-editor-viewport-orientation';\nexport type {\n LocalEditorAssetFilesystemFolder,\n LocalEditorAssetFilesystemBreadcrumb,\n LocalEditorAssetFilesystemEntry,\n LocalEditorAssetFilesystemSnapshot,\n LocalEditorAssetFilesystemViewMode,\n LocalEditorProjectMediaThumbnailKind,\n} from './local-editor-asset-filesystem';\nexport {\n createLocalEditorPrefabStageTitle,\n findLocalEditorPrefabStageStructureItem,\n flattenLocalEditorPrefabStageStructureItems,\n resolveLocalEditorPreviewToolSupport,\n resolveLocalEditorRightDockVisibility,\n resolveLocalEditorPrefabStageWorkbenchLayout,\n shouldLocalEditorClosePerformanceMonitor,\n type LocalEditorPreviewControlKey,\n type LocalEditorPreviewToolSupport,\n type LocalEditorPreviewToolSupportState,\n} from './local-editor-ui-prefab-stage';\nexport {\n isHierarchyMenuAuthorityCurrent,\n isHierarchyCompositionSessionCurrent,\n isHierarchyRenderedAuthorityCurrent,\n resolveHierarchyTransportDragIds,\n sameHierarchyIdSet,\n shouldDeferHierarchyDomRender,\n shouldCommitHierarchyRenameAfterCompositionEnd,\n type HierarchyCompositionSession,\n type HierarchyRenderedAuthority,\n} from './local-editor-ui-hierarchy-controller';\nexport {\n formatLocalEditorStatusDiagnostic,\n formatLocalEditorStatusDiagnosticDetails,\n} from './local-editor-ui-status-format';\nexport {\n createLocalEditorStatusCenterViewModel,\n resolveLocalEditorStatusDiagnosticLocatePlan,\n resolveLocalEditorStatusDiagnosticLocator,\n settleLocalEditorStatusDiagnosticRequest,\n resolveLocalEditorStatusDiagnostics,\n resolveLocalEditorStatusDiagnosticSeverity,\n shouldCloseLocalEditorStatusCenter,\n type LocalEditorStatusCenterViewModel,\n type LocalEditorStatusDiagnosticLocatePlan,\n type LocalEditorStatusDiagnosticRequestToken,\n} from './local-editor-ui-status-diagnostics';\nexport type {\n LocalEditorBrowserStatusDiagnostic,\n LocalEditorBrowserStatusDiagnosticPhase,\n LocalEditorBrowserStatusDiagnosticSeverity,\n} from './local-editor-ui-types';\nexport type {\n LocalEditorBrowserResolvedAssetKind,\n} from './local-editor-ui-asset-kind';\nexport {\n resolveLocalEditorHierarchyDragOperation,\n resolveLocalEditorHierarchyDropSlot,\n type LocalEditorHierarchyDragLayout,\n type LocalEditorHierarchyDragLayoutRow,\n type LocalEditorHierarchyDragOperation,\n type LocalEditorHierarchyDropPreview,\n type LocalEditorHierarchyDropSlot,\n type LocalEditorHierarchyDropSlotKind,\n} from './local-editor-ui-hierarchy-drag-policy';\nexport {\n resolveLocalEditorHierarchyAutoScroll,\n type LocalEditorHierarchyAutoScrollInput,\n type LocalEditorHierarchyAutoScrollResolution,\n} from './local-editor-ui-hierarchy-auto-scroll';\nexport {\n normalizeLocalEditorWorkbenchLayout,\n normalizeLocalEditorWorkbenchUserLayout,\n resolveLocalEditorWorkbenchDockDisplay,\n resolveLocalEditorWorkbenchVisibility,\n} from './local-editor-ui-workbench';\nexport type {\n LocalEditorWorkbenchDockDisplay,\n LocalEditorWorkbenchLayoutControllerOptions,\n LocalEditorWorkbenchLayoutState,\n LocalEditorWorkbenchOverlayState,\n LocalEditorWorkbenchVisibility,\n LocalEditorWorkbenchViewport,\n} from './local-editor-ui-workbench';\n\nexport type BrowserEventTargetLike = Pick<EventTarget, 'addEventListener' | 'removeEventListener'>;\n\nexport interface BrowserHostOptions {\n window?: Window;\n document?: Document;\n canvas?: HTMLCanvasElement | string | null;\n}\n\nexport interface BrowserHost {\n window: Window;\n document: Document;\n canvas: HTMLCanvasElement | null;\n isIframe: boolean;\n searchParams: URLSearchParams;\n hasFocus(): boolean;\n getActiveElement(): Element | null;\n resolveCanvas(canvas?: HTMLCanvasElement | string | null): HTMLCanvasElement | null;\n addWindowEvent<K extends keyof WindowEventMap>(\n type: K,\n listener: (event: WindowEventMap[K]) => void,\n options?: boolean | AddEventListenerOptions,\n ): () => void;\n addDocumentEvent<K extends keyof DocumentEventMap>(\n type: K,\n listener: (event: DocumentEventMap[K]) => void,\n options?: boolean | AddEventListenerOptions,\n ): () => void;\n requestAnimationFrame(callback: FrameRequestCallback): number;\n cancelAnimationFrame(handle: number): void;\n setTimeout(callback: () => void, timeoutMs: number): number;\n clearTimeout(handle: number): void;\n}\n\nfunction getDefaultWindow(): Window {\n if (typeof window === 'undefined') {\n throw new Error('createBrowserHost requires a browser Window. Pass options.window in non-browser environments.');\n }\n return window;\n}\n\nfunction resolveDocument(win: Window, doc?: Document): Document {\n return doc ?? win.document;\n}\n\nexport function isIframeWindow(win: Window): boolean {\n try {\n return win.self !== win.top;\n } catch {\n return true;\n }\n}\n\nexport function resolveCanvasElement(\n doc: Document,\n canvas?: HTMLCanvasElement | string | null,\n): HTMLCanvasElement | null {\n if (!canvas) return null;\n if (typeof canvas !== 'string') return canvas;\n return doc.getElementById(canvas) as HTMLCanvasElement | null;\n}\n\nexport function createBrowserHost(options: BrowserHostOptions = {}): BrowserHost {\n const win = options.window ?? getDefaultWindow();\n const doc = resolveDocument(win, options.document);\n const resolveCanvas = (canvas = options.canvas ?? null) => resolveCanvasElement(doc, canvas);\n\n return {\n window: win,\n document: doc,\n canvas: resolveCanvas(),\n isIframe: isIframeWindow(win),\n searchParams: new URLSearchParams(win.location?.search ?? ''),\n hasFocus: () => doc.hasFocus(),\n getActiveElement: () => doc.activeElement,\n resolveCanvas,\n addWindowEvent(type, listener, eventOptions) {\n win.addEventListener(type, listener as EventListener, eventOptions);\n return () => win.removeEventListener(type, listener as EventListener, eventOptions);\n },\n addDocumentEvent(type, listener, eventOptions) {\n doc.addEventListener(type, listener as EventListener, eventOptions);\n return () => doc.removeEventListener(type, listener as EventListener, eventOptions);\n },\n requestAnimationFrame: callback => win.requestAnimationFrame(callback),\n cancelAnimationFrame: handle => win.cancelAnimationFrame(handle),\n setTimeout: (callback, timeoutMs) => win.setTimeout(callback, timeoutMs),\n clearTimeout: handle => win.clearTimeout(handle),\n };\n}\n"]}
@@ -0,0 +1,68 @@
1
+ import { type EditorCommandCatalogEntry, type EditorCommandJsonValue, type EditorCommandManifest } from '@fps-games/editor-protocol';
2
+ import type { LocalEditorCommandServiceClient } from './editor-command-service-client';
3
+ export interface LocalEditorCommandCenterOptions {
4
+ readonly document: Document;
5
+ readonly host: HTMLElement;
6
+ readonly client: LocalEditorCommandServiceClient;
7
+ readonly clientId?: string;
8
+ readonly getSelectionIds?: () => {
9
+ selectedIds: readonly string[];
10
+ activeId: string | null;
11
+ };
12
+ readonly onOpenChange?: (open: boolean) => void;
13
+ }
14
+ export interface LocalEditorCommandCenter {
15
+ readonly root: HTMLDivElement;
16
+ open(query?: string): Promise<void>;
17
+ close(): void;
18
+ dispose(): void;
19
+ }
20
+ export type LocalEditorCommandConsoleInstruction = {
21
+ kind: 'help';
22
+ commandId?: string;
23
+ } | {
24
+ kind: 'search';
25
+ query: string;
26
+ } | {
27
+ kind: 'history';
28
+ } | {
29
+ kind: 'rerun';
30
+ index: number;
31
+ } | {
32
+ kind: 'invoke';
33
+ commandId: string;
34
+ input: EditorCommandJsonValue;
35
+ };
36
+ export interface LocalEditorCommandShortcutEvent {
37
+ readonly key: string;
38
+ readonly metaKey?: boolean;
39
+ readonly ctrlKey?: boolean;
40
+ readonly altKey?: boolean;
41
+ readonly shiftKey?: boolean;
42
+ }
43
+ export interface LocalEditorCommandShortcutDispatchEvent extends LocalEditorCommandShortcutEvent {
44
+ preventDefault(): void;
45
+ }
46
+ export interface LocalEditorCommandPresentationCatalog {
47
+ get(commandId: string): EditorCommandCatalogEntry | undefined;
48
+ refresh(): Promise<boolean>;
49
+ queueShortcut(commandId: string, event: LocalEditorCommandShortcutDispatchEvent, canInvoke: () => boolean, invoke: () => void): boolean;
50
+ dispose(): void;
51
+ }
52
+ export interface LocalEditorCommandMenuEntry {
53
+ readonly entry: EditorCommandCatalogEntry;
54
+ readonly path: readonly string[];
55
+ readonly group?: string;
56
+ readonly order: number;
57
+ }
58
+ export declare function listLocalEditorCommandMenuEntries(entries: readonly EditorCommandCatalogEntry[]): LocalEditorCommandMenuEntry[];
59
+ export declare function matchesLocalEditorCommandShortcut(shortcut: string | undefined, event: LocalEditorCommandShortcutEvent): boolean;
60
+ export declare function createLocalEditorCommandPresentationCatalog(loadEntries: () => Promise<readonly EditorCommandCatalogEntry[]>): LocalEditorCommandPresentationCatalog;
61
+ export declare function applyLocalEditorCommandSelection(manifest: EditorCommandManifest, input: Record<string, EditorCommandJsonValue>, selection: {
62
+ selectedIds: readonly string[];
63
+ activeId: string | null;
64
+ }): Record<string, EditorCommandJsonValue>;
65
+ export declare function formatLocalEditorCommandMetadata(manifest: EditorCommandManifest): string;
66
+ export declare function parseLocalEditorCommandConsole(input: string): LocalEditorCommandConsoleInstruction;
67
+ export declare function createLocalEditorCommandCenter(options: LocalEditorCommandCenterOptions): LocalEditorCommandCenter;
68
+ //# sourceMappingURL=local-editor-command-center.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-editor-command-center.d.ts","sourceRoot":"","sources":["../src/local-editor-command-center.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KA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