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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/dist/agent-bridge/capabilities/ui-regions.d.ts.map +1 -1
  2. package/dist/agent-bridge/capabilities/ui-regions.js +16 -0
  3. package/dist/agent-bridge/capabilities/ui-regions.js.map +1 -1
  4. package/dist/build-info.json +46 -46
  5. package/dist/internal/material-preview.d.ts +22 -0
  6. package/dist/internal/material-preview.d.ts.map +1 -0
  7. package/dist/internal/material-preview.js +186 -0
  8. package/dist/internal/material-preview.js.map +1 -0
  9. package/dist/internal/project-model-preview.d.ts +4 -0
  10. package/dist/internal/project-model-preview.d.ts.map +1 -0
  11. package/dist/internal/project-model-preview.js +359 -0
  12. package/dist/internal/project-model-preview.js.map +1 -0
  13. package/dist/local-editor-agent-context.d.ts +12 -1
  14. package/dist/local-editor-agent-context.d.ts.map +1 -1
  15. package/dist/local-editor-agent-context.js +47 -0
  16. package/dist/local-editor-agent-context.js.map +1 -1
  17. package/dist/local-editor-harness.d.ts +15 -2
  18. package/dist/local-editor-harness.d.ts.map +1 -1
  19. package/dist/local-editor-harness.js +326 -28
  20. package/dist/local-editor-harness.js.map +1 -1
  21. package/dist/local-editor-tools.d.ts +1 -0
  22. package/dist/local-editor-tools.d.ts.map +1 -1
  23. package/dist/local-editor-tools.js +3 -0
  24. package/dist/local-editor-tools.js.map +1 -1
  25. package/dist/playable-babylon-rendering.d.ts +8 -7
  26. package/dist/playable-babylon-rendering.d.ts.map +1 -1
  27. package/dist/playable-babylon-rendering.js +77 -32
  28. package/dist/playable-babylon-rendering.js.map +1 -1
  29. package/dist/playable-local-editor-host.d.ts +4 -0
  30. package/dist/playable-local-editor-host.d.ts.map +1 -1
  31. package/dist/playable-local-editor-host.js +27 -0
  32. package/dist/playable-local-editor-host.js.map +1 -1
  33. package/dist/playable-product-projection-preview.d.ts +2 -0
  34. package/dist/playable-product-projection-preview.d.ts.map +1 -1
  35. package/dist/playable-product-projection-preview.js +7 -4
  36. package/dist/playable-product-projection-preview.js.map +1 -1
  37. package/dist/playable-product-scene-capabilities.d.ts.map +1 -1
  38. package/dist/playable-product-scene-capabilities.js +9 -3
  39. package/dist/playable-product-scene-capabilities.js.map +1 -1
  40. package/dist/playable-sdk.d.ts +1 -1
  41. package/dist/playable-sdk.d.ts.map +1 -1
  42. package/dist/playable-sdk.js +1 -1
  43. package/dist/playable-sdk.js.map +1 -1
  44. package/dist/playable-standard-project.d.ts +0 -1
  45. package/dist/playable-standard-project.d.ts.map +1 -1
  46. package/dist/playable-standard-project.js +17 -5
  47. package/dist/playable-standard-project.js.map +1 -1
  48. package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.d.ts +4 -2
  49. package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.d.ts.map +1 -1
  50. package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.js +301 -121
  51. package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.js.map +1 -1
  52. package/node_modules/@fps-games/babylon-renderer/dist/environment/profile.js +5 -4
  53. package/node_modules/@fps-games/babylon-renderer/dist/environment/profile.js.map +1 -1
  54. package/node_modules/@fps-games/babylon-renderer/dist/environment/types.d.ts +4 -4
  55. package/node_modules/@fps-games/babylon-renderer/dist/environment/types.d.ts.map +1 -1
  56. package/node_modules/@fps-games/babylon-renderer/dist/environment/types.js +1 -1
  57. package/node_modules/@fps-games/babylon-renderer/dist/environment/types.js.map +1 -1
  58. package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.d.ts +2 -0
  59. package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.d.ts.map +1 -1
  60. package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.js +12 -1
  61. package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.js.map +1 -1
  62. package/node_modules/@fps-games/babylon-renderer/dist/plugin.d.ts +6 -3
  63. package/node_modules/@fps-games/babylon-renderer/dist/plugin.d.ts.map +1 -1
  64. package/node_modules/@fps-games/babylon-renderer/dist/plugin.js +100 -39
  65. package/node_modules/@fps-games/babylon-renderer/dist/plugin.js.map +1 -1
  66. package/node_modules/@fps-games/babylon-renderer/dist/reference.d.ts +1 -3
  67. package/node_modules/@fps-games/babylon-renderer/dist/reference.d.ts.map +1 -1
  68. package/node_modules/@fps-games/babylon-renderer/dist/reference.js.map +1 -1
  69. package/node_modules/@fps-games/babylon-renderer/package.json +11 -8
  70. package/node_modules/@fps-games/editor-babylon/dist/marker-overlay.js +24 -0
  71. package/node_modules/@fps-games/editor-babylon/dist/marker-overlay.js.map +1 -1
  72. package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +10 -1
  73. package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
  74. package/node_modules/@fps-games/editor-babylon/dist/projection.js +96 -1
  75. package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
  76. package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.d.ts.map +1 -1
  77. package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.js +85 -22
  78. package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.js.map +1 -1
  79. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts +2 -0
  80. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts.map +1 -1
  81. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js +150 -4
  82. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js.map +1 -1
  83. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts +1 -0
  84. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -1
  85. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +249 -15
  86. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -1
  87. package/node_modules/@fps-games/editor-babylon/dist/types.d.ts +1 -1
  88. package/node_modules/@fps-games/editor-babylon/dist/types.d.ts.map +1 -1
  89. package/node_modules/@fps-games/editor-babylon/dist/types.js.map +1 -1
  90. package/node_modules/@fps-games/editor-babylon/package.json +6 -6
  91. package/node_modules/@fps-games/editor-browser/dist/index.d.ts +5 -0
  92. package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
  93. package/node_modules/@fps-games/editor-browser/dist/index.js +3 -0
  94. package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
  95. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.d.ts +35 -0
  96. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.d.ts.map +1 -0
  97. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.js +136 -0
  98. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.js.map +1 -0
  99. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.d.ts +46 -0
  100. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.d.ts.map +1 -0
  101. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.js +283 -0
  102. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.js.map +1 -0
  103. package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.d.ts +12 -0
  104. package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.d.ts.map +1 -0
  105. package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.js +67 -0
  106. package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.js.map +1 -0
  107. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.d.ts +6 -0
  108. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.d.ts.map +1 -0
  109. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.js +9 -0
  110. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.js.map +1 -0
  111. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.d.ts +7 -0
  112. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.d.ts.map +1 -0
  113. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.js +20 -0
  114. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.js.map +1 -0
  115. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.d.ts +9 -0
  116. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.d.ts.map +1 -0
  117. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.js +219 -0
  118. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.js.map +1 -0
  119. package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.d.ts +14 -0
  120. package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.d.ts.map +1 -0
  121. package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.js +42 -0
  122. package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.js.map +1 -0
  123. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.d.ts.map +1 -1
  124. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.js +2 -0
  125. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.js.map +1 -1
  126. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.d.ts +27 -0
  127. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.d.ts.map +1 -0
  128. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.js +288 -0
  129. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.js.map +1 -0
  130. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts +1 -1
  131. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts.map +1 -1
  132. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js +29 -0
  133. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js.map +1 -1
  134. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts +20 -1
  135. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -1
  136. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +321 -60
  137. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -1
  138. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.d.ts +2 -1
  139. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.d.ts.map +1 -1
  140. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.js +4 -2
  141. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.js.map +1 -1
  142. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +63 -3
  143. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
  144. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.js.map +1 -1
  145. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.d.ts +9 -0
  146. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.d.ts.map +1 -1
  147. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js +88 -16
  148. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js.map +1 -1
  149. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +2 -1
  150. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
  151. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +1463 -356
  152. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
  153. package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.d.ts +13 -0
  154. package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.d.ts.map +1 -0
  155. package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.js +15 -0
  156. package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.js.map +1 -0
  157. package/node_modules/@fps-games/editor-browser/package.json +7 -7
  158. package/node_modules/@fps-games/editor-core/dist/editor-tools.d.ts +1 -0
  159. package/node_modules/@fps-games/editor-core/dist/editor-tools.d.ts.map +1 -1
  160. package/node_modules/@fps-games/editor-core/dist/editor-tools.js +3 -1
  161. package/node_modules/@fps-games/editor-core/dist/editor-tools.js.map +1 -1
  162. package/node_modules/@fps-games/editor-core/dist/viewport-tools.d.ts +11 -2
  163. package/node_modules/@fps-games/editor-core/dist/viewport-tools.d.ts.map +1 -1
  164. package/node_modules/@fps-games/editor-core/dist/viewport-tools.js +12 -1
  165. package/node_modules/@fps-games/editor-core/dist/viewport-tools.js.map +1 -1
  166. package/node_modules/@fps-games/editor-core/package.json +6 -6
  167. package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
  168. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.d.ts.map +1 -1
  169. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.js +10 -3
  170. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.js.map +1 -1
  171. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.d.ts +2 -1
  172. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.d.ts.map +1 -1
  173. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.js +1 -1
  174. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.js.map +1 -1
  175. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.d.ts +1 -0
  176. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.d.ts.map +1 -1
  177. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.js +5 -0
  178. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.js.map +1 -1
  179. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.d.ts +1 -1
  180. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.d.ts.map +1 -1
  181. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.js +1 -1
  182. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.js.map +1 -1
  183. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.d.ts.map +1 -1
  184. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.js +15 -1
  185. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.js.map +1 -1
  186. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.d.ts.map +1 -1
  187. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.js +3 -0
  188. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.js.map +1 -1
  189. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.d.ts +6 -1
  190. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.d.ts.map +1 -1
  191. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.js.map +1 -1
  192. package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts +1 -0
  193. package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts.map +1 -1
  194. package/node_modules/@fps-games/editor-playable-sdk/dist/index.js +1 -0
  195. package/node_modules/@fps-games/editor-playable-sdk/dist/index.js.map +1 -1
  196. package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.d.ts +1 -1
  197. package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.d.ts.map +1 -1
  198. package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.js +4 -0
  199. package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.js.map +1 -1
  200. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.d.ts +4 -0
  201. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.d.ts.map +1 -1
  202. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.js +10 -1
  203. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.js.map +1 -1
  204. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.d.ts +4 -0
  205. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.d.ts.map +1 -0
  206. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.js +4 -0
  207. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.js.map +1 -0
  208. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.d.ts +4 -0
  209. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.d.ts.map +1 -0
  210. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.js +86 -0
  211. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.js.map +1 -0
  212. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.d.ts +9 -0
  213. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.d.ts.map +1 -0
  214. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.js +76 -0
  215. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.js.map +1 -0
  216. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.d.ts +34 -0
  217. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.d.ts.map +1 -0
  218. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.js +2 -0
  219. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.js.map +1 -0
  220. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.js +4 -4
  221. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.js.map +1 -1
  222. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.d.ts +2 -1
  223. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.d.ts.map +1 -1
  224. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.js.map +1 -1
  225. package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/assets.js +1 -5
  226. package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/assets.js.map +1 -1
  227. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts +4 -0
  228. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts.map +1 -1
  229. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js +40 -0
  230. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js.map +1 -1
  231. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js +53 -0
  232. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js.map +1 -1
  233. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/types.d.ts +2 -0
  234. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/types.d.ts.map +1 -1
  235. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/types.js.map +1 -1
  236. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts +1 -0
  237. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts.map +1 -1
  238. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js +1 -0
  239. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js.map +1 -1
  240. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts +1 -0
  241. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts.map +1 -1
  242. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js +94 -0
  243. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js.map +1 -1
  244. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.d.ts +14 -0
  245. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.d.ts.map +1 -0
  246. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.js +101 -0
  247. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.js.map +1 -0
  248. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.d.ts +23 -0
  249. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.d.ts.map +1 -0
  250. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.js +180 -0
  251. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.js.map +1 -0
  252. package/node_modules/@fps-games/editor-playable-sdk/package.json +6 -6
  253. package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts +23 -3
  254. package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts.map +1 -1
  255. package/node_modules/@fps-games/editor-protocol/dist/agent.js.map +1 -1
  256. package/node_modules/@fps-games/editor-protocol/package.json +2 -2
  257. package/node_modules/@fps-games/editor-tooling/package.json +3 -3
  258. package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.d.ts.map +1 -1
  259. package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.js +103 -10
  260. package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.js.map +1 -1
  261. package/node_modules/@fps-games/editor-ui/package.json +1 -1
  262. package/node_modules/@fps-games/playable-assets/dist/identity.d.ts +1 -0
  263. package/node_modules/@fps-games/playable-assets/dist/identity.d.ts.map +1 -1
  264. package/node_modules/@fps-games/playable-assets/dist/identity.js +1 -1
  265. package/node_modules/@fps-games/playable-assets/dist/identity.js.map +1 -1
  266. package/node_modules/@fps-games/playable-assets/dist/index.d.ts +1 -0
  267. package/node_modules/@fps-games/playable-assets/dist/index.d.ts.map +1 -1
  268. package/node_modules/@fps-games/playable-assets/dist/index.js +1 -0
  269. package/node_modules/@fps-games/playable-assets/dist/index.js.map +1 -1
  270. package/node_modules/@fps-games/playable-assets/dist/resource-resolver.d.ts +46 -0
  271. package/node_modules/@fps-games/playable-assets/dist/resource-resolver.d.ts.map +1 -0
  272. package/node_modules/@fps-games/playable-assets/dist/resource-resolver.js +109 -0
  273. package/node_modules/@fps-games/playable-assets/dist/resource-resolver.js.map +1 -0
  274. package/node_modules/@fps-games/playable-assets/package.json +1 -1
  275. package/node_modules/@fps-games/playable-contracts/package.json +1 -1
  276. package/node_modules/@fps-games/playable-rendering/package.json +2 -2
  277. package/node_modules/@fps-games/playable-runtime/dist/runtime.d.ts.map +1 -1
  278. package/node_modules/@fps-games/playable-runtime/dist/runtime.js +5 -0
  279. package/node_modules/@fps-games/playable-runtime/dist/runtime.js.map +1 -1
  280. package/node_modules/@fps-games/playable-runtime/dist/types.d.ts +2 -0
  281. package/node_modules/@fps-games/playable-runtime/dist/types.d.ts.map +1 -1
  282. package/node_modules/@fps-games/playable-runtime/dist/types.js.map +1 -1
  283. package/node_modules/@fps-games/playable-runtime/package.json +12 -12
  284. package/node_modules/@fps-games/playable-runtime-data/package.json +4 -4
  285. package/node_modules/@fps-games/playable-scene/package.json +2 -2
  286. package/node_modules/@fps-games/plugin-api/package.json +1 -1
  287. package/node_modules/@fps-games/plugin-assets/dist/reference.d.ts.map +1 -1
  288. package/node_modules/@fps-games/plugin-assets/dist/reference.js +11 -4
  289. package/node_modules/@fps-games/plugin-assets/dist/reference.js.map +1 -1
  290. package/node_modules/@fps-games/plugin-assets/dist/renderer.d.ts +8 -0
  291. package/node_modules/@fps-games/plugin-assets/dist/renderer.d.ts.map +1 -0
  292. package/node_modules/@fps-games/plugin-assets/dist/renderer.js +13 -0
  293. package/node_modules/@fps-games/plugin-assets/dist/renderer.js.map +1 -0
  294. package/node_modules/@fps-games/plugin-assets/dist/resources.d.ts +12 -0
  295. package/node_modules/@fps-games/plugin-assets/dist/resources.d.ts.map +1 -0
  296. package/node_modules/@fps-games/plugin-assets/dist/resources.js +8 -0
  297. package/node_modules/@fps-games/plugin-assets/dist/resources.js.map +1 -0
  298. package/node_modules/@fps-games/plugin-assets/dist/runtime.d.ts +2 -1
  299. package/node_modules/@fps-games/plugin-assets/dist/runtime.d.ts.map +1 -1
  300. package/node_modules/@fps-games/plugin-assets/dist/runtime.js +3 -0
  301. package/node_modules/@fps-games/plugin-assets/dist/runtime.js.map +1 -1
  302. package/node_modules/@fps-games/plugin-assets/dist/version.d.ts +1 -1
  303. package/node_modules/@fps-games/plugin-assets/dist/version.js +1 -1
  304. package/node_modules/@fps-games/plugin-assets/dist/version.js.map +1 -1
  305. package/node_modules/@fps-games/plugin-assets/package.json +32 -8
  306. package/node_modules/@fps-games/plugin-hierarchy/dist/version.d.ts +1 -1
  307. package/node_modules/@fps-games/plugin-hierarchy/dist/version.js +1 -1
  308. package/node_modules/@fps-games/plugin-hierarchy/dist/version.js.map +1 -1
  309. package/node_modules/@fps-games/plugin-hierarchy/package.json +5 -5
  310. package/node_modules/@fps-games/plugin-host/package.json +2 -2
  311. package/node_modules/@fps-games/plugin-markers/dist/version.d.ts +1 -1
  312. package/node_modules/@fps-games/plugin-markers/dist/version.js +1 -1
  313. package/node_modules/@fps-games/plugin-markers/dist/version.js.map +1 -1
  314. package/node_modules/@fps-games/plugin-markers/package.json +5 -5
  315. package/node_modules/@fps-games/plugin-materials/dist/version.d.ts +1 -1
  316. package/node_modules/@fps-games/plugin-materials/dist/version.js +1 -1
  317. package/node_modules/@fps-games/plugin-materials/dist/version.js.map +1 -1
  318. package/node_modules/@fps-games/plugin-materials/package.json +5 -5
  319. package/node_modules/@fps-games/plugin-rendering/dist/version.d.ts +1 -1
  320. package/node_modules/@fps-games/plugin-rendering/dist/version.js +1 -1
  321. package/node_modules/@fps-games/plugin-rendering/dist/version.js.map +1 -1
  322. package/node_modules/@fps-games/plugin-rendering/package.json +5 -5
  323. package/node_modules/@fps-games/plugin-scene/dist/version.d.ts +1 -1
  324. package/node_modules/@fps-games/plugin-scene/dist/version.js +1 -1
  325. package/node_modules/@fps-games/plugin-scene/dist/version.js.map +1 -1
  326. package/node_modules/@fps-games/plugin-scene/package.json +5 -5
  327. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.d.ts +1 -1
  328. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js +1 -1
  329. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js.map +1 -1
  330. package/node_modules/@fps-games/plugin-shadow-map-experiment/package.json +5 -5
  331. package/node_modules/@fps-games/plugin-shadows/dist/version.d.ts +1 -1
  332. package/node_modules/@fps-games/plugin-shadows/dist/version.js +1 -1
  333. package/node_modules/@fps-games/plugin-shadows/dist/version.js.map +1 -1
  334. package/node_modules/@fps-games/plugin-shadows/package.json +7 -7
  335. package/package.json +24 -22
@@ -1 +1 @@
1
- {"version":3,"file":"ui-regions.d.ts","sourceRoot":"","sources":["../../../src/agent-bridge/capabilities/ui-regions.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,cAAc,CAAC;AAoJvE,wBAAgB,oCAAoC,CAAC,SAAS,EAAE,MAAM,EACpE,KAAK,EAAE,kCAAkC,CAAC,SAAS,EAAE,MAAM,CAAC,GAC3D,8BAA8B,CAMhC"}
1
+ {"version":3,"file":"ui-regions.d.ts","sourceRoot":"","sources":["../../../src/agent-bridge/capabilities/ui-regions.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,cAAc,CAAC;AAoKvE,wBAAgB,oCAAoC,CAAC,SAAS,EAAE,MAAM,EACpE,KAAK,EAAE,kCAAkC,CAAC,SAAS,EAAE,MAAM,CAAC,GAC3D,8BAA8B,CAMhC"}
@@ -110,6 +110,22 @@ const AGENT_BRIDGE_WORKSPACE_REGIONS = Object.freeze([
110
110
  'Do not drag assets in the browser or hand-edit generated catalogs as the primary placement path.',
111
111
  ],
112
112
  },
113
+ {
114
+ id: 'bottom-console',
115
+ label: 'Editor Console',
116
+ location: 'bottom-global',
117
+ purpose: 'Session-scoped structured output for editor save, import, compile, run, plugin, and capability operations.',
118
+ primaryCapabilities: [
119
+ EDITOR_AGENT_BRIDGE_CAPABILITY_ID.EDITOR_DIAGNOSTICS_LIST,
120
+ EDITOR_AGENT_BRIDGE_CAPABILITY_ID.EDITOR_STATE_GET,
121
+ ],
122
+ fallbackTools: ['playwright', 'chrome'],
123
+ notes: [
124
+ 'This Console is Editor-owned operation output and does not intercept browser console.* calls.',
125
+ 'Validation Center remains the revision-aware diagnostics surface and Save/Run gate.',
126
+ 'Agent Bridge Console remains a separate external observability plane.',
127
+ ],
128
+ },
113
129
  {
114
130
  id: 'agent-console',
115
131
  label: 'Agent Bridge Console',
@@ -1 +1 @@
1
- {"version":3,"file":"ui-regions.js","sourceRoot":"","sources":["../../../src/agent-bridge/capabilities/ui-regions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,GAGlC,MAAM,4BAA4B,CAAC;AAIpC,MAAM,8BAA8B,GAAgD,MAAM,CAAC,MAAM,CAAC;IAChG;QACE,EAAE,EAAE,aAAa;QACjB,KAAK,EAAE,aAAa;QACpB,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,yFAAyF;QAClG,mBAAmB,EAAE;YACnB,iCAAiC,CAAC,aAAa;YAC/C,iCAAiC,CAAC,iBAAiB;YACnD,iCAAiC,CAAC,sBAAsB;YACxD,iCAAiC,CAAC,gBAAgB;YAClD,iCAAiC,CAAC,uBAAuB;SAC1D;QACD,aAAa,EAAE,CAAC,YAAY,EAAE,QAAQ,CAAC;QACvC,KAAK,EAAE;YACL,gEAAgE;YAChE,kGAAkG;SACnG;KACF;IACD;QACE,EAAE,EAAE,gBAAgB;QACpB,KAAK,EAAE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C,wGAAwG;IACxG,0FAA0F;IAC1F,mHAAmH;IACnH,kGAAkG;IAClG,8GAA8G;CAC/G,CAAC,CAAC;AAEH,MAAM,UAAU,oCAAoC,CAClD,KAA4D;IAE5D,OAAO;QACL,UAAU;YACR,OAAO,0BAA0B,CAAC,KAAK,CAAC,CAAC;QAC3C,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,0BAA0B,CACjC,KAA4D;IAE5D,OAAO;QACL,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,WAAW,EAAE,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI;QACtE,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO;QAC9B,OAAO,EAAE,8BAA8B,CAAC,GAAG,CAAC,WAAW,CAAC;QACxD,yBAAyB,EAAE,CAAC,GAAG,2BAA2B,CAAC;QAC3D,eAAe,EAAE,CAAC,GAAG,iBAAiB,CAAC;KACxC,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,MAAwC;IAC3D,OAAO;QACL,GAAG,MAAM;QACT,mBAAmB,EAAE,CAAC,GAAG,MAAM,CAAC,mBAAmB,CAAC;QACpD,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,GAAG,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7E,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtD,CAAC;AACJ,CAAC","sourcesContent":["import {\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID,\n type EditorAgentBridgeUiRegionsGetOutput,\n type EditorAgentBridgeWorkspaceRegion,\n} from '@fps-games/editor-protocol';\nimport type { LocalEditorAgentBridgeUiSource } from '../source-types.js';\nimport type { LocalEditorAgentBridgeHarnessState } from '../shared.js';\n\nconst AGENT_BRIDGE_WORKSPACE_REGIONS: readonly EditorAgentBridgeWorkspaceRegion[] = Object.freeze([\n {\n id: 'top-toolbar',\n label: 'Top Toolbar',\n location: 'top',\n purpose: 'Mode, transform tool, viewport utility, save/history, and Agent Bridge status controls.',\n primaryCapabilities: [\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.HOST_MODE_GET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.HOST_EDITOR_ENTER,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.HOST_EDITOR_WAIT_READY,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.EDITOR_STATE_GET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.EDITOR_DIAGNOSTICS_LIST,\n ],\n fallbackTools: ['playwright', 'chrome'],\n notes: [\n 'Use host.editor.enter instead of clicking the editor entry UI.',\n 'Use editor.diagnostics.list for the same revision-aware snapshot shown in the Validation Center.',\n ],\n },\n {\n id: 'left-hierarchy',\n label: 'Hierarchy',\n location: 'left',\n purpose: 'Scene object tree, selection context, protected/locked object visibility, and hierarchy actions.',\n primaryCapabilities: [\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.SCENE_OBJECTS_LIST,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.OBJECT_RESOLVE,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.SELECTION_SET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.OBJECT_CREATE_PRIMITIVE,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.OBJECT_DELETE,\n ],\n fallbackTools: ['playwright', 'chrome'],\n notes: [\n 'Prefer object ids from scene.objects.list or object.resolve over clicking hierarchy rows.',\n 'Creation and deletion must go through editor scene graph capabilities, not manual scene JSON edits.',\n ],\n },\n {\n id: 'center-preview',\n label: 'Preview / Scene View',\n location: 'center',\n purpose: 'Rendered scene viewport, selection focus, transform gizmo, camera framing, and visual inspection.',\n primaryCapabilities: [\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.VIEWPORT_FOCUS_OBJECT,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.VIEWPORT_FRAME_SELECTION,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.VIEWPORT_CAMERA_GET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.VIEWPORT_CAMERA_SET_PRESET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.VIEWPORT_CAMERA_ORBIT,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.TRANSFORM_MOVE,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.TRANSFORM_SET,\n ],\n fallbackTools: ['playwright', 'chrome', 'computer-use'],\n notes: [\n 'Use viewport.camera.setPreset before L0 screenshots so visual evidence has a stable semantic view.',\n 'Use transform capabilities instead of dragging the gizmo when a structured transform target is known.',\n ],\n },\n {\n id: 'right-inspector',\n label: 'Inspector',\n location: 'right',\n purpose: 'Selected object properties, Transform fields, project adapter sections, and editable component data.',\n primaryCapabilities: [\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.EDITOR_STATE_GET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.EDITOR_DIAGNOSTICS_LIST,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.EDITOR_SNAPSHOT_GET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.TRANSFORM_SET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.SELECTION_SET,\n ],\n fallbackTools: ['playwright', 'chrome'],\n notes: [\n 'Prefer semantic capabilities for known fields; use Inspector UI only when a field has no capability yet.',\n 'Future material, shadow, and rendering property work should add focused capabilities before relying on form automation.',\n ],\n },\n {\n id: 'right-render-tabs',\n label: 'Render / Diagnostics Tabs',\n location: 'right',\n purpose: 'Rendering-oriented panels, diagnostics, and project-specific inspector tabs when present.',\n primaryCapabilities: [\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.EDITOR_STATE_GET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.EDITOR_SNAPSHOT_GET,\n ],\n fallbackTools: ['playwright', 'chrome'],\n notes: [\n 'Treat render tab UI as fallback until rendering/shadow capabilities are added.',\n 'Capture tab screenshots as trace artifacts when using L0 fallback for visual diagnostics.',\n ],\n },\n {\n id: 'bottom-assets',\n label: 'Asset Library',\n location: 'bottom',\n purpose: 'Project asset browsing, asset analysis, and asset placement into the scene.',\n primaryCapabilities: [\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.ASSET_LIBRARY_LIST,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.ASSET_INFO_GET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.ASSET_ANALYSIS_GET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.PREFAB_RESOLVE,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.PREFAB_STAGE_OPEN,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.PREFAB_STAGE_EXIT,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.OBJECT_CREATE_FROM_ASSET,\n ],\n fallbackTools: ['playwright', 'chrome'],\n notes: [\n 'Use asset.library.list and asset.analysis.get before object.createFromAsset.',\n 'Double-clicking a prefab asset opens the Prefab stage for users; agents should call prefab.resolve then prefab.stage.open.',\n 'Do not drag assets in the browser or hand-edit generated catalogs as the primary placement path.',\n ],\n },\n {\n id: 'agent-console',\n label: 'Agent Bridge Console',\n location: 'external-localhost',\n purpose: 'Readonly observability for MCP health, editor sessions, capabilities, recent calls, logs, traces, diagnostics, and L0 artifacts.',\n primaryCapabilities: [\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.EDITOR_STATE_GET,\n ],\n fallbackTools: ['browser', 'playwright', 'chrome'],\n notes: [\n 'The console is an observability plane, not an editing UI.',\n 'Write L0 screenshot paths and console/page errors to /api/traces/events instead of embedding binary payloads.',\n ],\n },\n]);\n\nconst RECOMMENDED_OPERATION_ORDER = Object.freeze([\n 'get_bridge_health',\n 'list_editor_sessions',\n 'list_editor_capabilities',\n 'call_editor_capability(editor.ui.regions.get)',\n 'call_editor_capability(host.editor.enter)',\n 'call_editor_capability(host.editor.waitReady when needed)',\n 'L2 semantic capability for the target region',\n 'L0 browser automation only for missing capability, disconnected bridge, page load, or screenshot evidence',\n]);\n\nconst L0_FALLBACK_RULES = Object.freeze([\n 'Do not click Hierarchy rows when selection.set or object.resolve can provide the same semantic result.',\n 'Do not drag the Preview gizmo when transform.move or transform.set can express the edit.',\n 'Do not use browser screenshots for camera setup before trying viewport.camera.setPreset or viewport.camera.orbit.',\n 'Do not drag assets from the bottom panel when object.createFromAsset can place a standard asset.',\n 'When L0 fallback is required, record screenshot paths and console/page errors through Agent Operation Trace.',\n]);\n\nexport function createLocalEditorAgentBridgeUiSource<TDocument, TPatch>(\n state: LocalEditorAgentBridgeHarnessState<TDocument, TPatch>,\n): LocalEditorAgentBridgeUiSource {\n return {\n getRegions() {\n return createAgentBridgeUiRegions(state);\n },\n };\n}\n\nfunction createAgentBridgeUiRegions<TDocument, TPatch>(\n state: LocalEditorAgentBridgeHarnessState<TDocument, TPatch>,\n): EditorAgentBridgeUiRegionsGetOutput {\n return {\n mode: state.mode,\n editorReady: state.mode === 'editor' && !!state.session && !state.busy,\n sessionActive: !!state.session,\n regions: AGENT_BRIDGE_WORKSPACE_REGIONS.map(cloneRegion),\n recommendedOperationOrder: [...RECOMMENDED_OPERATION_ORDER],\n l0FallbackRules: [...L0_FALLBACK_RULES],\n };\n}\n\nfunction cloneRegion(region: EditorAgentBridgeWorkspaceRegion): EditorAgentBridgeWorkspaceRegion {\n return {\n ...region,\n primaryCapabilities: [...region.primaryCapabilities],\n ...(region.fallbackTools ? { fallbackTools: [...region.fallbackTools] } : {}),\n ...(region.notes ? { notes: [...region.notes] } : {}),\n };\n}\n"]}
1
+ {"version":3,"file":"ui-regions.js","sourceRoot":"","sources":["../../../src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I,KAAK,QAAQ,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI;QACtE,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO;QAC9B,OAAO,EAAE,8BAA8B,CAAC,GAAG,CAAC,WAAW,CAAC;QACxD,yBAAyB,EAAE,CAAC,GAAG,2BAA2B,CAAC;QAC3D,eAAe,EAAE,CAAC,GAAG,iBAAiB,CAAC;KACxC,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,MAAwC;IAC3D,OAAO;QACL,GAAG,MAAM;QACT,mBAAmB,EAAE,CAAC,GAAG,MAAM,CAAC,mBAAmB,CAAC;QACpD,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,GAAG,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7E,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtD,CAAC;AACJ,CAAC","sourcesContent":["import {\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID,\n type EditorAgentBridgeUiRegionsGetOutput,\n type EditorAgentBridgeWorkspaceRegion,\n} from '@fps-games/editor-protocol';\nimport type { LocalEditorAgentBridgeUiSource } from '../source-types.js';\nimport type { LocalEditorAgentBridgeHarnessState } from '../shared.js';\n\nconst AGENT_BRIDGE_WORKSPACE_REGIONS: readonly EditorAgentBridgeWorkspaceRegion[] = Object.freeze([\n {\n id: 'top-toolbar',\n label: 'Top Toolbar',\n location: 'top',\n purpose: 'Mode, transform tool, viewport utility, save/history, and Agent Bridge status controls.',\n primaryCapabilities: [\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.HOST_MODE_GET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.HOST_EDITOR_ENTER,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.HOST_EDITOR_WAIT_READY,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.EDITOR_STATE_GET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.EDITOR_DIAGNOSTICS_LIST,\n ],\n fallbackTools: ['playwright', 'chrome'],\n notes: [\n 'Use host.editor.enter instead of clicking the editor entry UI.',\n 'Use editor.diagnostics.list for the same revision-aware snapshot shown in the Validation Center.',\n ],\n },\n {\n id: 'left-hierarchy',\n label: 'Hierarchy',\n location: 'left',\n purpose: 'Scene object tree, selection context, protected/locked object visibility, and hierarchy actions.',\n primaryCapabilities: [\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.SCENE_OBJECTS_LIST,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.OBJECT_RESOLVE,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.SELECTION_SET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.OBJECT_CREATE_PRIMITIVE,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.OBJECT_DELETE,\n ],\n fallbackTools: ['playwright', 'chrome'],\n notes: [\n 'Prefer object ids from scene.objects.list or object.resolve over clicking hierarchy rows.',\n 'Creation and deletion must go through editor scene graph capabilities, not manual scene JSON edits.',\n ],\n },\n {\n id: 'center-preview',\n label: 'Preview / Scene View',\n location: 'center',\n purpose: 'Rendered scene viewport, selection focus, transform gizmo, camera framing, and visual inspection.',\n primaryCapabilities: [\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.VIEWPORT_FOCUS_OBJECT,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.VIEWPORT_FRAME_SELECTION,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.VIEWPORT_CAMERA_GET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.VIEWPORT_CAMERA_SET_PRESET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.VIEWPORT_CAMERA_ORBIT,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.TRANSFORM_MOVE,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.TRANSFORM_SET,\n ],\n fallbackTools: ['playwright', 'chrome', 'computer-use'],\n notes: [\n 'Use viewport.camera.setPreset before L0 screenshots so visual evidence has a stable semantic view.',\n 'Use transform capabilities instead of dragging the gizmo when a structured transform target is known.',\n ],\n },\n {\n id: 'right-inspector',\n label: 'Inspector',\n location: 'right',\n purpose: 'Selected object properties, Transform fields, project adapter sections, and editable component data.',\n primaryCapabilities: [\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.EDITOR_STATE_GET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.EDITOR_DIAGNOSTICS_LIST,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.EDITOR_SNAPSHOT_GET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.TRANSFORM_SET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.SELECTION_SET,\n ],\n fallbackTools: ['playwright', 'chrome'],\n notes: [\n 'Prefer semantic capabilities for known fields; use Inspector UI only when a field has no capability yet.',\n 'Future material, shadow, and rendering property work should add focused capabilities before relying on form automation.',\n ],\n },\n {\n id: 'right-render-tabs',\n label: 'Render / Diagnostics Tabs',\n location: 'right',\n purpose: 'Rendering-oriented panels, diagnostics, and project-specific inspector tabs when present.',\n primaryCapabilities: [\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.EDITOR_STATE_GET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.EDITOR_SNAPSHOT_GET,\n ],\n fallbackTools: ['playwright', 'chrome'],\n notes: [\n 'Treat render tab UI as fallback until rendering/shadow capabilities are added.',\n 'Capture tab screenshots as trace artifacts when using L0 fallback for visual diagnostics.',\n ],\n },\n {\n id: 'bottom-assets',\n label: 'Asset Library',\n location: 'bottom',\n purpose: 'Project asset browsing, asset analysis, and asset placement into the scene.',\n primaryCapabilities: [\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.ASSET_LIBRARY_LIST,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.ASSET_INFO_GET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.ASSET_ANALYSIS_GET,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.PREFAB_RESOLVE,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.PREFAB_STAGE_OPEN,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.PREFAB_STAGE_EXIT,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.OBJECT_CREATE_FROM_ASSET,\n ],\n fallbackTools: ['playwright', 'chrome'],\n notes: [\n 'Use asset.library.list and asset.analysis.get before object.createFromAsset.',\n 'Double-clicking a prefab asset opens the Prefab stage for users; agents should call prefab.resolve then prefab.stage.open.',\n 'Do not drag assets in the browser or hand-edit generated catalogs as the primary placement path.',\n ],\n },\n {\n id: 'bottom-console',\n label: 'Editor Console',\n location: 'bottom-global',\n purpose: 'Session-scoped structured output for editor save, import, compile, run, plugin, and capability operations.',\n primaryCapabilities: [\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.EDITOR_DIAGNOSTICS_LIST,\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.EDITOR_STATE_GET,\n ],\n fallbackTools: ['playwright', 'chrome'],\n notes: [\n 'This Console is Editor-owned operation output and does not intercept browser console.* calls.',\n 'Validation Center remains the revision-aware diagnostics surface and Save/Run gate.',\n 'Agent Bridge Console remains a separate external observability plane.',\n ],\n },\n {\n id: 'agent-console',\n label: 'Agent Bridge Console',\n location: 'external-localhost',\n purpose: 'Readonly observability for MCP health, editor sessions, capabilities, recent calls, logs, traces, diagnostics, and L0 artifacts.',\n primaryCapabilities: [\n EDITOR_AGENT_BRIDGE_CAPABILITY_ID.EDITOR_STATE_GET,\n ],\n fallbackTools: ['browser', 'playwright', 'chrome'],\n notes: [\n 'The console is an observability plane, not an editing UI.',\n 'Write L0 screenshot paths and console/page errors to /api/traces/events instead of embedding binary payloads.',\n ],\n },\n]);\n\nconst RECOMMENDED_OPERATION_ORDER = Object.freeze([\n 'get_bridge_health',\n 'list_editor_sessions',\n 'list_editor_capabilities',\n 'call_editor_capability(editor.ui.regions.get)',\n 'call_editor_capability(host.editor.enter)',\n 'call_editor_capability(host.editor.waitReady when needed)',\n 'L2 semantic capability for the target region',\n 'L0 browser automation only for missing capability, disconnected bridge, page load, or screenshot evidence',\n]);\n\nconst L0_FALLBACK_RULES = Object.freeze([\n 'Do not click Hierarchy rows when selection.set or object.resolve can provide the same semantic result.',\n 'Do not drag the Preview gizmo when transform.move or transform.set can express the edit.',\n 'Do not use browser screenshots for camera setup before trying viewport.camera.setPreset or viewport.camera.orbit.',\n 'Do not drag assets from the bottom panel when object.createFromAsset can place a standard asset.',\n 'When L0 fallback is required, record screenshot paths and console/page errors through Agent Operation Trace.',\n]);\n\nexport function createLocalEditorAgentBridgeUiSource<TDocument, TPatch>(\n state: LocalEditorAgentBridgeHarnessState<TDocument, TPatch>,\n): LocalEditorAgentBridgeUiSource {\n return {\n getRegions() {\n return createAgentBridgeUiRegions(state);\n },\n };\n}\n\nfunction createAgentBridgeUiRegions<TDocument, TPatch>(\n state: LocalEditorAgentBridgeHarnessState<TDocument, TPatch>,\n): EditorAgentBridgeUiRegionsGetOutput {\n return {\n mode: state.mode,\n editorReady: state.mode === 'editor' && !!state.session && !state.busy,\n sessionActive: !!state.session,\n regions: AGENT_BRIDGE_WORKSPACE_REGIONS.map(cloneRegion),\n recommendedOperationOrder: [...RECOMMENDED_OPERATION_ORDER],\n l0FallbackRules: [...L0_FALLBACK_RULES],\n };\n}\n\nfunction cloneRegion(region: EditorAgentBridgeWorkspaceRegion): EditorAgentBridgeWorkspaceRegion {\n return {\n ...region,\n primaryCapabilities: [...region.primaryCapabilities],\n ...(region.fallbackTools ? { fallbackTools: [...region.fallbackTools] } : {}),\n ...(region.notes ? { notes: [...region.notes] } : {}),\n };\n}\n"]}
@@ -1,135 +1,135 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "packageName": "@fps-games/editor",
4
- "version": "0.2.1-beta.1",
5
- "gitSha": "846bae327b1debfb8ae586d7bc7a354cbb3bd072",
6
- "distHash": "ade74556aadf607a54b6b99036c3efd954d0101da481d4fba594d1905e7725e1",
7
- "cacheKey": "0.2.1-beta.1-ade74556aadf",
4
+ "version": "0.2.1-beta.3",
5
+ "gitSha": "698fdec002644a60b9641c5e23b93755489e8cfe",
6
+ "distHash": "fcb8a51f1c5603abf0775987a7d4d1b8711c2871ca515c3711e8ec71b318aaf1",
7
+ "cacheKey": "0.2.1-beta.3-fcb8a51f1c56",
8
8
  "bundledPackages": [
9
9
  {
10
10
  "name": "@fps-games/babylon-renderer",
11
- "version": "0.2.1-beta.1",
12
- "distHash": "657e87be140dca67305023a0995a57f9a2a637e6031e2c93c6cb9c9537b0fde7"
11
+ "version": "0.2.1-beta.3",
12
+ "distHash": "f8ee94d224e29418a14c076e2087d81f59e2c81128cbde8a848ee03825e9849d"
13
13
  },
14
14
  {
15
15
  "name": "@fps-games/editor-babylon",
16
- "version": "0.2.1-beta.1",
17
- "distHash": "c76798b9aa7116e9a4a891ea1956581417f97eaa2ccbb4bf04ec45468b0153a9"
16
+ "version": "0.2.1-beta.3",
17
+ "distHash": "042ba72ad85a4798bc367380e57a5e9bfb118a4234bef798d102e726fb2e2d46"
18
18
  },
19
19
  {
20
20
  "name": "@fps-games/editor-browser",
21
- "version": "0.2.1-beta.1",
22
- "distHash": "4e508a90d6c32de362949958a8bae76a0560250ec43dc14a6d027c6f63f8d463"
21
+ "version": "0.2.1-beta.3",
22
+ "distHash": "d0ea7289047415397c5a3784f59c4f47a224591ad9f9b7413d1df830b9e82cc1"
23
23
  },
24
24
  {
25
25
  "name": "@fps-games/editor-core",
26
- "version": "0.2.1-beta.1",
27
- "distHash": "5a1215dbdef3bc3a3893022ebf1261157b866d555902acdf6c3e4cfb6067c644"
26
+ "version": "0.2.1-beta.3",
27
+ "distHash": "d45d91e0ead3e332bd619202c050235b34c6a53e1328d1ae3c3c42df82045e62"
28
28
  },
29
29
  {
30
30
  "name": "@fps-games/editor-forge-play",
31
- "version": "0.2.1-beta.1",
31
+ "version": "0.2.1-beta.3",
32
32
  "distHash": "c76fb413ce05bbcae6481366d71aed662bc56c65827b6dddbde5478a2740e079"
33
33
  },
34
34
  {
35
35
  "name": "@fps-games/editor-playable-sdk",
36
- "version": "0.2.1-beta.1",
37
- "distHash": "94c35257d1ef392eb5585a0eb3d5a870a64bc8262898189a10dcde30be06e628"
36
+ "version": "0.2.1-beta.3",
37
+ "distHash": "1c3daa9b4125756031bda23e40640aab67f9cfc929bc577808159e3e4d5ef6eb"
38
38
  },
39
39
  {
40
40
  "name": "@fps-games/editor-protocol",
41
- "version": "0.2.1-beta.1",
42
- "distHash": "048d113da972fa39f4e4bd249e392a172c0f57b2b48fbcf6a8210b2c3b53bfa9"
41
+ "version": "0.2.1-beta.3",
42
+ "distHash": "085b5fd121a111de975194f4fe5c29f2f3a046294bb32a4687ff54fb5a386b26"
43
43
  },
44
44
  {
45
45
  "name": "@fps-games/editor-tooling",
46
- "version": "0.2.1-beta.1",
46
+ "version": "0.2.1-beta.3",
47
47
  "distHash": "adb386db73f3001fecddf7a5961b1d896db58b0fc65ec30d306c41e16a887a07"
48
48
  },
49
49
  {
50
50
  "name": "@fps-games/editor-ui",
51
- "version": "0.2.1-beta.1",
52
- "distHash": "56fc9f9cf4ba70755aad00e6d3e0d9c98c415225420728e43b81163edf006515"
51
+ "version": "0.2.1-beta.3",
52
+ "distHash": "58b1a9a815d851715535ad7df93fd971bdc276f39195742dae79d539a62df674"
53
53
  },
54
54
  {
55
55
  "name": "@fps-games/playable-assets",
56
- "version": "0.2.1-beta.1",
57
- "distHash": "37a544c7fef71429562a181f3e74008b1d40ed8fcb26e19b604ddaa1298cbd18"
56
+ "version": "0.2.1-beta.3",
57
+ "distHash": "b75753686d5fd646cd3a504ad54849fa9466b7db624971208c4480c94f670736"
58
58
  },
59
59
  {
60
60
  "name": "@fps-games/playable-contracts",
61
- "version": "0.2.1-beta.1",
61
+ "version": "0.2.1-beta.3",
62
62
  "distHash": "234d4c791465ed1911668589489210caa54c8198301b5a4ba644849c68eadbbb"
63
63
  },
64
64
  {
65
65
  "name": "@fps-games/playable-rendering",
66
- "version": "0.2.1-beta.1",
66
+ "version": "0.2.1-beta.3",
67
67
  "distHash": "08bad015efd9c32ec9e61cb2ea826d1c87176d447ad28dea8d4604ea31de29b8"
68
68
  },
69
69
  {
70
70
  "name": "@fps-games/playable-runtime",
71
- "version": "0.2.1-beta.1",
72
- "distHash": "9e65be3d6503d94d2e6ae6d9bc305ad429bb395d1445d3f25260feab76abe1fc"
71
+ "version": "0.2.1-beta.3",
72
+ "distHash": "13370a129ad47a618f872b128d9d4fd6d76e7bd03bd947918383f8c3d9b3db70"
73
73
  },
74
74
  {
75
75
  "name": "@fps-games/playable-runtime-data",
76
- "version": "0.2.1-beta.1",
76
+ "version": "0.2.1-beta.3",
77
77
  "distHash": "44bf5edaf873b0888d790a142895d24acae9896b5d38836d6cee1d85a5d9483e"
78
78
  },
79
79
  {
80
80
  "name": "@fps-games/playable-scene",
81
- "version": "0.2.1-beta.1",
81
+ "version": "0.2.1-beta.3",
82
82
  "distHash": "c9988e0a517dbda0250812d61c3cca1b149b25ac36231f5f2b57346f3435dd92"
83
83
  },
84
84
  {
85
85
  "name": "@fps-games/plugin-api",
86
- "version": "0.2.1-beta.1",
86
+ "version": "0.2.1-beta.3",
87
87
  "distHash": "06c15e6ba76748b069aae75d1ec325ad2842e38bad37f91a25fd878ed1bf73f6"
88
88
  },
89
89
  {
90
90
  "name": "@fps-games/plugin-assets",
91
- "version": "0.2.1-beta.1",
92
- "distHash": "52a05e755fa9db59f638bbf0789e0e2f3f6292705fb3c72c64ca07954a5a1790"
91
+ "version": "0.2.1-beta.3",
92
+ "distHash": "3a667ddb27a4ff89940418478fd5bd8a4945b37cdb0da03a2ccbc43ace3342be"
93
93
  },
94
94
  {
95
95
  "name": "@fps-games/plugin-hierarchy",
96
- "version": "0.2.1-beta.1",
97
- "distHash": "83886f88ae484caf578912b2cfc4b3782bc31843c2e0f855c1e6c887b513a425"
96
+ "version": "0.2.1-beta.3",
97
+ "distHash": "1ca61d273cf806af07368f1de4b224391b22ae72a4cbb24f39cc2ab3b70b6ed7"
98
98
  },
99
99
  {
100
100
  "name": "@fps-games/plugin-host",
101
- "version": "0.2.1-beta.1",
101
+ "version": "0.2.1-beta.3",
102
102
  "distHash": "f46e8257e5ed78b4dff21a905d3cf7c54933a6ff1ae458ae2d73126dfc0d8f56"
103
103
  },
104
104
  {
105
105
  "name": "@fps-games/plugin-markers",
106
- "version": "0.2.1-beta.1",
107
- "distHash": "64081ad4672b16b6788880f848945d4d80b90e8c35e3bac5f88fa337f345866d"
106
+ "version": "0.2.1-beta.3",
107
+ "distHash": "19e1cfb54b824637347391359e289cfe034351166d0ad51ed1b4223281661b3b"
108
108
  },
109
109
  {
110
110
  "name": "@fps-games/plugin-materials",
111
- "version": "0.2.1-beta.1",
112
- "distHash": "435ec9725d2627951b96dff837f9042d18df06ddc3ffbb7478184e4b42e3d133"
111
+ "version": "0.2.1-beta.3",
112
+ "distHash": "6e39797ad6f3e513d2499df7525c190cf0c11c6f1c0eba8d770786327e1cd588"
113
113
  },
114
114
  {
115
115
  "name": "@fps-games/plugin-rendering",
116
- "version": "0.2.1-beta.1",
117
- "distHash": "eb0c6c63f051e5333baf97ef1057fb45c9c572aab550e6a953d0ca054c53e1c3"
116
+ "version": "0.2.1-beta.3",
117
+ "distHash": "4080802832051fe434ad89d2bd2b2498edb9034abb17ee06dc48d1dfea98c45d"
118
118
  },
119
119
  {
120
120
  "name": "@fps-games/plugin-scene",
121
- "version": "0.2.1-beta.1",
122
- "distHash": "ec52ee7f62af13bb1675f5a9329f240d51364432ddcf4df9eea5a8e9802621d4"
121
+ "version": "0.2.1-beta.3",
122
+ "distHash": "adbcf106fd86301ec624f901e8ea070827fded310c8118dfe70df212c5c7b7d2"
123
123
  },
124
124
  {
125
125
  "name": "@fps-games/plugin-shadow-map-experiment",
126
- "version": "0.2.1-beta.1",
127
- "distHash": "4a45a2a37921468390cefa4524a7971ce1bed7349e08ad7333af32a60f600973"
126
+ "version": "0.2.1-beta.3",
127
+ "distHash": "d550d6054766d3ba9ce5a9ada76e51ee44490c77bf15fea83362239226323135"
128
128
  },
129
129
  {
130
130
  "name": "@fps-games/plugin-shadows",
131
- "version": "0.2.1-beta.1",
132
- "distHash": "9d04acabad58e1daa45031532cafc3e2e19d4f50f11ec97cbb283c51d003bd2f"
131
+ "version": "0.2.1-beta.3",
132
+ "distHash": "afbc294dec97896421c113d1a232b993c796dd9ed984d8cb09190a44649ef44d"
133
133
  }
134
134
  ]
135
135
  }
@@ -0,0 +1,22 @@
1
+ import type { LocalEditorBrowserMaterialPreviewCleanup, LocalEditorBrowserMaterialPreviewSource } from '@fps-games/editor-browser';
2
+ interface NormalizedMaterialPreviewSettings {
3
+ baseColor: {
4
+ r: number;
5
+ g: number;
6
+ b: number;
7
+ };
8
+ emissionColor: {
9
+ r: number;
10
+ g: number;
11
+ b: number;
12
+ };
13
+ emissionIntensity: number;
14
+ materialKind: 'pbr' | 'standard';
15
+ metallic: number;
16
+ roughness: number;
17
+ textureUrl: string | null;
18
+ }
19
+ export declare function normalizeLocalEditorMaterialPreviewSettings(source: LocalEditorBrowserMaterialPreviewSource): NormalizedMaterialPreviewSettings;
20
+ export declare function mountLocalEditorMaterialPreview(source: LocalEditorBrowserMaterialPreviewSource, canvas: HTMLCanvasElement): Promise<LocalEditorBrowserMaterialPreviewCleanup>;
21
+ export {};
22
+ //# sourceMappingURL=material-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"material-preview.d.ts","sourceRoot":"","sources":["../../src/internal/material-preview.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wCAAwC,EACxC,uCAAuC,EACxC,MAAM,2BAA2B,CAAC;AAEnC,UAAU,iCAAiC;IACzC,SAAS,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C,aAAa,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,KAAK,GAAG,UAAU,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,wBAAgB,2CAA2C,CACzD,MAAM,EAAE,uCAAuC,GAC9C,iCAAiC,CAUnC;AAED,wBAAsB,+BAA+B,CACnD,MAAM,EAAE,uCAAuC,EAC/C,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,wCAAwC,CAAC,CAoJnD"}
@@ -0,0 +1,186 @@
1
+ export function normalizeLocalEditorMaterialPreviewSettings(source) {
2
+ return {
3
+ baseColor: normalizeColor(source.preview.baseColor, { r: 0.56, g: 0.6, b: 0.66 }),
4
+ emissionColor: normalizeColor(source.preview.emissionColor, { r: 1, g: 1, b: 1 }),
5
+ emissionIntensity: clamp(source.preview.emissionIntensity ?? 0, 0, 8),
6
+ materialKind: source.materialKind === 'standard' ? 'standard' : 'pbr',
7
+ metallic: clamp(source.preview.metallic ?? 0, 0, 1),
8
+ roughness: clamp(source.preview.roughness ?? 0.55, 0.04, 1),
9
+ textureUrl: source.preview.textureUrl?.trim() || null,
10
+ };
11
+ }
12
+ export async function mountLocalEditorMaterialPreview(source, canvas) {
13
+ const settings = normalizeLocalEditorMaterialPreviewSettings(source);
14
+ const [{ Engine }, { Scene }, { ArcRotateCamera }, { DirectionalLight }, { HemisphericLight }, { MeshBuilder }, { PBRMaterial }, { StandardMaterial }, { Texture }, { Vector3 }, { Color3, Color4 },] = await Promise.all([
15
+ import('@babylonjs/core/Engines/engine'),
16
+ import('@babylonjs/core/scene'),
17
+ import('@babylonjs/core/Cameras/arcRotateCamera'),
18
+ import('@babylonjs/core/Lights/directionalLight'),
19
+ import('@babylonjs/core/Lights/hemisphericLight'),
20
+ import('@babylonjs/core/Meshes/meshBuilder'),
21
+ import('@babylonjs/core/Materials/PBR/pbrMaterial'),
22
+ import('@babylonjs/core/Materials/standardMaterial'),
23
+ import('@babylonjs/core/Materials/Textures/texture'),
24
+ import('@babylonjs/core/Maths/math.vector'),
25
+ import('@babylonjs/core/Maths/math.color'),
26
+ ]);
27
+ let disposed = false;
28
+ let engine = null;
29
+ let scene = null;
30
+ let camera = null;
31
+ let resizeObserver = null;
32
+ const cleanup = () => {
33
+ if (disposed)
34
+ return;
35
+ const errors = [];
36
+ try {
37
+ resizeObserver?.disconnect();
38
+ resizeObserver = null;
39
+ }
40
+ catch (error) {
41
+ errors.push(error);
42
+ }
43
+ try {
44
+ engine?.stopRenderLoop();
45
+ }
46
+ catch { }
47
+ try {
48
+ camera?.detachControl();
49
+ camera = null;
50
+ }
51
+ catch (error) {
52
+ errors.push(error);
53
+ }
54
+ try {
55
+ scene?.dispose();
56
+ scene = null;
57
+ }
58
+ catch (error) {
59
+ errors.push(error);
60
+ }
61
+ try {
62
+ engine?.dispose();
63
+ engine = null;
64
+ }
65
+ catch (error) {
66
+ errors.push(error);
67
+ }
68
+ disposed = !resizeObserver && !camera && !scene && !engine;
69
+ if (errors.length > 0) {
70
+ const error = new Error('Material preview cleanup failed.');
71
+ error.errors = errors;
72
+ throw error;
73
+ }
74
+ };
75
+ try {
76
+ engine = new Engine(canvas, true, {
77
+ antialias: true,
78
+ premultipliedAlpha: true,
79
+ preserveDrawingBuffer: true,
80
+ stencil: true,
81
+ limitDeviceRatio: 2,
82
+ }, true);
83
+ scene = new Scene(engine);
84
+ scene.clearColor = new Color4(0, 0, 0, 0);
85
+ scene.ambientColor = new Color3(0.08, 0.09, 0.1);
86
+ camera = new ArcRotateCamera('material-preview-camera', -Math.PI / 4, Math.PI / 2.35, 2.65, Vector3.Zero(), scene);
87
+ camera.lowerBetaLimit = 0.25;
88
+ camera.upperBetaLimit = Math.PI - 0.25;
89
+ camera.lowerRadiusLimit = 2.05;
90
+ camera.upperRadiusLimit = 4;
91
+ camera.wheelPrecision = 45;
92
+ camera.pinchPrecision = 130;
93
+ camera.panningSensibility = 0;
94
+ camera.attachControl(canvas, true);
95
+ const keyLight = new DirectionalLight('material-preview-key', new Vector3(0.55, -0.8, 0.65), scene);
96
+ keyLight.intensity = 2.15;
97
+ keyLight.diffuse = new Color3(1, 0.97, 0.92);
98
+ const rimLight = new DirectionalLight('material-preview-rim', new Vector3(-0.75, -0.25, -0.6), scene);
99
+ rimLight.intensity = 0.85;
100
+ rimLight.diffuse = new Color3(0.58, 0.72, 1);
101
+ const fillLight = new HemisphericLight('material-preview-fill', new Vector3(0, 1, 0), scene);
102
+ fillLight.intensity = 0.62;
103
+ fillLight.diffuse = new Color3(0.82, 0.87, 0.94);
104
+ fillLight.groundColor = new Color3(0.08, 0.09, 0.11);
105
+ const sphere = MeshBuilder.CreateSphere('material-preview-sphere', {
106
+ diameter: 1.72,
107
+ segments: 64,
108
+ }, scene);
109
+ let material;
110
+ if (settings.materialKind === 'standard') {
111
+ const standard = new StandardMaterial('material-preview-standard', scene);
112
+ standard.diffuseColor = new Color3(settings.baseColor.r, settings.baseColor.g, settings.baseColor.b);
113
+ standard.specularColor = Color3.Lerp(new Color3(0.16, 0.16, 0.16), new Color3(settings.baseColor.r, settings.baseColor.g, settings.baseColor.b), settings.metallic);
114
+ standard.specularPower = 4 + Math.pow(1 - settings.roughness, 2) * 252;
115
+ standard.emissiveColor = scaleColor(Color3, settings.emissionColor, settings.emissionIntensity);
116
+ material = standard;
117
+ }
118
+ else {
119
+ const pbr = new PBRMaterial('material-preview-pbr', scene);
120
+ pbr.albedoColor = new Color3(settings.baseColor.r, settings.baseColor.g, settings.baseColor.b);
121
+ pbr.metallic = settings.metallic;
122
+ pbr.roughness = settings.roughness;
123
+ pbr.emissiveColor = scaleColor(Color3, settings.emissionColor, settings.emissionIntensity);
124
+ pbr.environmentIntensity = 0.7;
125
+ material = pbr;
126
+ }
127
+ sphere.material = material;
128
+ if (settings.textureUrl) {
129
+ const texture = new Texture(settings.textureUrl, scene, false, true, Texture.TRILINEAR_SAMPLINGMODE);
130
+ if (material instanceof PBRMaterial)
131
+ material.albedoTexture = texture;
132
+ else
133
+ material.diffuseTexture = texture;
134
+ }
135
+ scene.imageProcessingConfiguration.toneMappingEnabled = true;
136
+ scene.imageProcessingConfiguration.exposure = 1.05;
137
+ scene.imageProcessingConfiguration.contrast = 1.08;
138
+ resizeObserver = typeof ResizeObserver === 'function'
139
+ ? new ResizeObserver(() => engine?.resize())
140
+ : null;
141
+ resizeObserver?.observe(canvas);
142
+ engine.resize();
143
+ engine.runRenderLoop(() => scene?.render());
144
+ return cleanup;
145
+ }
146
+ catch (error) {
147
+ try {
148
+ cleanup();
149
+ }
150
+ catch { }
151
+ throw error;
152
+ }
153
+ }
154
+ function normalizeColor(value, fallback) {
155
+ if (!value)
156
+ return fallback;
157
+ if (typeof value === 'string') {
158
+ const match = value.trim().match(/^#([0-9a-f]{6})$/i);
159
+ if (!match)
160
+ return fallback;
161
+ return {
162
+ r: Number.parseInt(match[1].slice(0, 2), 16) / 255,
163
+ g: Number.parseInt(match[1].slice(2, 4), 16) / 255,
164
+ b: Number.parseInt(match[1].slice(4, 6), 16) / 255,
165
+ };
166
+ }
167
+ return {
168
+ r: normalizeColorChannel(value.r),
169
+ g: normalizeColorChannel(value.g),
170
+ b: normalizeColorChannel(value.b),
171
+ };
172
+ }
173
+ function normalizeColorChannel(value) {
174
+ if (!Number.isFinite(value))
175
+ return 0;
176
+ return clamp(value > 1 ? value / 255 : value, 0, 1);
177
+ }
178
+ function scaleColor(Color3, color, intensity) {
179
+ return new Color3(color.r, color.g, color.b).scale(intensity);
180
+ }
181
+ function clamp(value, min, max) {
182
+ if (!Number.isFinite(value))
183
+ return min;
184
+ return Math.min(max, Math.max(min, value));
185
+ }
186
+ //# sourceMappingURL=material-preview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"material-preview.js","sourceRoot":"","sources":["../../src/internal/material-preview.ts"],"names":[],"mappings":"AAeA,MAAM,UAAU,2CAA2C,CACzD,MAA+C;IAE/C,OAAO;QACL,SAAS,EAAE,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC;QACjF,aAAa,EAAE,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QACjF,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,iBAAiB,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QACrE,YAAY,EAAE,MAAM,CAAC,YAAY,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK;QACrE,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QACnD,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,IAAI,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3D,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,IAAI;KACtD,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,+BAA+B,CACnD,MAA+C,EAC/C,MAAyB;IAEzB,MAAM,QAAQ,GAAG,2CAA2C,CAAC,MAAM,CAAC,CAAC;IACrE,MAAM,CACJ,EAAE,MAAM,EAAE,EACV,E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AAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG;SACnD,CAAC;IACJ,CAAC;IACD,OAAO;QACL,CAAC,EAAE,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC;QACjC,CAAC,EAAE,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC;QACjC,CAAC,EAAE,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC;KAClC,CAAC;AACJ,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAa;IAC1C,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IACtC,OAAO,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACtD,CAAC;AAED,SAAS,UAAU,CACjB,MAA6E,EAC7E,KAA0C,EAC1C,SAAiB;IAEjB,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AAChE,CAAC;AAED,SAAS,KAAK,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW;IACpD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,GAAG,CAAC;IACxC,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAC7C,CAAC","sourcesContent":["import type {\n LocalEditorBrowserMaterialPreviewCleanup,\n LocalEditorBrowserMaterialPreviewSource,\n} from '@fps-games/editor-browser';\n\ninterface NormalizedMaterialPreviewSettings {\n baseColor: { r: number; g: number; b: number };\n emissionColor: { r: number; g: number; b: number };\n emissionIntensity: number;\n materialKind: 'pbr' | 'standard';\n metallic: number;\n roughness: number;\n textureUrl: string | null;\n}\n\nexport function normalizeLocalEditorMaterialPreviewSettings(\n source: LocalEditorBrowserMaterialPreviewSource,\n): NormalizedMaterialPreviewSettings {\n return {\n baseColor: normalizeColor(source.preview.baseColor, { r: 0.56, g: 0.6, b: 0.66 }),\n emissionColor: normalizeColor(source.preview.emissionColor, { r: 1, g: 1, b: 1 }),\n emissionIntensity: clamp(source.preview.emissionIntensity ?? 0, 0, 8),\n materialKind: source.materialKind === 'standard' ? 'standard' : 'pbr',\n metallic: clamp(source.preview.metallic ?? 0, 0, 1),\n roughness: clamp(source.preview.roughness ?? 0.55, 0.04, 1),\n textureUrl: source.preview.textureUrl?.trim() || null,\n };\n}\n\nexport async function mountLocalEditorMaterialPreview(\n source: LocalEditorBrowserMaterialPreviewSource,\n canvas: HTMLCanvasElement,\n): Promise<LocalEditorBrowserMaterialPreviewCleanup> {\n const settings = normalizeLocalEditorMaterialPreviewSettings(source);\n const [\n { Engine },\n { Scene },\n { ArcRotateCamera },\n { DirectionalLight },\n { HemisphericLight },\n { MeshBuilder },\n { PBRMaterial },\n { StandardMaterial },\n { Texture },\n { Vector3 },\n { Color3, Color4 },\n ] = await Promise.all([\n import('@babylonjs/core/Engines/engine'),\n import('@babylonjs/core/scene'),\n import('@babylonjs/core/Cameras/arcRotateCamera'),\n import('@babylonjs/core/Lights/directionalLight'),\n import('@babylonjs/core/Lights/hemisphericLight'),\n import('@babylonjs/core/Meshes/meshBuilder'),\n import('@babylonjs/core/Materials/PBR/pbrMaterial'),\n import('@babylonjs/core/Materials/standardMaterial'),\n import('@babylonjs/core/Materials/Textures/texture'),\n import('@babylonjs/core/Maths/math.vector'),\n import('@babylonjs/core/Maths/math.color'),\n ]);\n\n let disposed = false;\n let engine: InstanceType<typeof Engine> | null = null;\n let scene: InstanceType<typeof Scene> | null = null;\n let camera: InstanceType<typeof ArcRotateCamera> | null = null;\n let resizeObserver: ResizeObserver | null = null;\n const cleanup = (): void => {\n if (disposed) return;\n const errors: unknown[] = [];\n try {\n resizeObserver?.disconnect();\n resizeObserver = null;\n } catch (error) { errors.push(error); }\n try { engine?.stopRenderLoop(); } catch {}\n try {\n camera?.detachControl();\n camera = null;\n } catch (error) { errors.push(error); }\n try {\n scene?.dispose();\n scene = null;\n } catch (error) { errors.push(error); }\n try {\n engine?.dispose();\n engine = null;\n } catch (error) { errors.push(error); }\n disposed = !resizeObserver && !camera && !scene && !engine;\n if (errors.length > 0) {\n const error = new Error('Material preview cleanup failed.') as Error & { errors: unknown[] };\n error.errors = errors;\n throw error;\n }\n };\n\n try {\n engine = new Engine(canvas, true, {\n antialias: true,\n premultipliedAlpha: true,\n preserveDrawingBuffer: true,\n stencil: true,\n limitDeviceRatio: 2,\n }, true);\n scene = new Scene(engine);\n scene.clearColor = new Color4(0, 0, 0, 0);\n scene.ambientColor = new Color3(0.08, 0.09, 0.1);\n\n camera = new ArcRotateCamera(\n 'material-preview-camera',\n -Math.PI / 4,\n Math.PI / 2.35,\n 2.65,\n Vector3.Zero(),\n scene,\n );\n camera.lowerBetaLimit = 0.25;\n camera.upperBetaLimit = Math.PI - 0.25;\n camera.lowerRadiusLimit = 2.05;\n camera.upperRadiusLimit = 4;\n camera.wheelPrecision = 45;\n camera.pinchPrecision = 130;\n camera.panningSensibility = 0;\n camera.attachControl(canvas, true);\n\n const keyLight = new DirectionalLight('material-preview-key', new Vector3(0.55, -0.8, 0.65), scene);\n keyLight.intensity = 2.15;\n keyLight.diffuse = new Color3(1, 0.97, 0.92);\n const rimLight = new DirectionalLight('material-preview-rim', new Vector3(-0.75, -0.25, -0.6), scene);\n rimLight.intensity = 0.85;\n rimLight.diffuse = new Color3(0.58, 0.72, 1);\n const fillLight = new HemisphericLight('material-preview-fill', new Vector3(0, 1, 0), scene);\n fillLight.intensity = 0.62;\n fillLight.diffuse = new Color3(0.82, 0.87, 0.94);\n fillLight.groundColor = new Color3(0.08, 0.09, 0.11);\n\n const sphere = MeshBuilder.CreateSphere('material-preview-sphere', {\n diameter: 1.72,\n segments: 64,\n }, scene);\n let material: InstanceType<typeof PBRMaterial> | InstanceType<typeof StandardMaterial>;\n if (settings.materialKind === 'standard') {\n const standard = new StandardMaterial('material-preview-standard', scene);\n standard.diffuseColor = new Color3(settings.baseColor.r, settings.baseColor.g, settings.baseColor.b);\n standard.specularColor = Color3.Lerp(\n new Color3(0.16, 0.16, 0.16),\n new Color3(settings.baseColor.r, settings.baseColor.g, settings.baseColor.b),\n settings.metallic,\n );\n standard.specularPower = 4 + Math.pow(1 - settings.roughness, 2) * 252;\n standard.emissiveColor = scaleColor(Color3, settings.emissionColor, settings.emissionIntensity);\n material = standard;\n } else {\n const pbr = new PBRMaterial('material-preview-pbr', scene);\n pbr.albedoColor = new Color3(settings.baseColor.r, settings.baseColor.g, settings.baseColor.b);\n pbr.metallic = settings.metallic;\n pbr.roughness = settings.roughness;\n pbr.emissiveColor = scaleColor(Color3, settings.emissionColor, settings.emissionIntensity);\n pbr.environmentIntensity = 0.7;\n material = pbr;\n }\n sphere.material = material;\n\n if (settings.textureUrl) {\n const texture = new Texture(settings.textureUrl, scene, false, true, Texture.TRILINEAR_SAMPLINGMODE);\n if (material instanceof PBRMaterial) material.albedoTexture = texture;\n else material.diffuseTexture = texture;\n }\n\n scene.imageProcessingConfiguration.toneMappingEnabled = true;\n scene.imageProcessingConfiguration.exposure = 1.05;\n scene.imageProcessingConfiguration.contrast = 1.08;\n resizeObserver = typeof ResizeObserver === 'function'\n ? new ResizeObserver(() => engine?.resize())\n : null;\n resizeObserver?.observe(canvas);\n engine.resize();\n engine.runRenderLoop(() => scene?.render());\n return cleanup;\n } catch (error) {\n try { cleanup(); } catch {}\n throw error;\n }\n}\n\nfunction normalizeColor(\n value: LocalEditorBrowserMaterialPreviewSource['preview']['baseColor'],\n fallback: { r: number; g: number; b: number },\n): { r: number; g: number; b: number } {\n if (!value) return fallback;\n if (typeof value === 'string') {\n const match = value.trim().match(/^#([0-9a-f]{6})$/i);\n if (!match) return fallback;\n return {\n r: Number.parseInt(match[1].slice(0, 2), 16) / 255,\n g: Number.parseInt(match[1].slice(2, 4), 16) / 255,\n b: Number.parseInt(match[1].slice(4, 6), 16) / 255,\n };\n }\n return {\n r: normalizeColorChannel(value.r),\n g: normalizeColorChannel(value.g),\n b: normalizeColorChannel(value.b),\n };\n}\n\nfunction normalizeColorChannel(value: number): number {\n if (!Number.isFinite(value)) return 0;\n return clamp(value > 1 ? value / 255 : value, 0, 1);\n}\n\nfunction scaleColor(\n Color3: new(r: number, g: number, b: number) => { scale(value: number): any },\n color: { r: number; g: number; b: number },\n intensity: number,\n): any {\n return new Color3(color.r, color.g, color.b).scale(intensity);\n}\n\nfunction clamp(value: number, min: number, max: number): number {\n if (!Number.isFinite(value)) return min;\n return Math.min(max, Math.max(min, value));\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { LocalEditorBrowserProjectMediaSource, LocalEditorBrowserProjectModelPreviewCleanup, LocalEditorBrowserProjectModelThumbnail } from '@fps-games/editor-browser';
2
+ export declare function resolveLocalEditorProjectModelThumbnail(source: LocalEditorBrowserProjectMediaSource, signal?: AbortSignal): Promise<LocalEditorBrowserProjectModelThumbnail>;
3
+ export declare function mountLocalEditorProjectModelPreview(source: LocalEditorBrowserProjectMediaSource, canvas: HTMLCanvasElement, signal?: AbortSignal): Promise<LocalEditorBrowserProjectModelPreviewCleanup>;
4
+ //# sourceMappingURL=project-model-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-model-preview.d.ts","sourceRoot":"","sources":["../../src/internal/project-model-preview.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oCAAoC,EACpC,4CAA4C,EAC5C,uCAAuC,EACxC,MAAM,2BAA2B,CAAC;AAInC,wBAAgB,uCAAuC,CACrD,MAAM,EAAE,oCAAoC,EAC5C,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,uCAAuC,CAAC,CAwBlD;AAED,wBAAsB,mCAAmC,CACvD,MAAM,EAAE,oCAAoC,EAC5C,MAAM,EAAE,iBAAiB,EACzB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,4CAA4C,CAAC,CA2HvD"}