@forgeax/view 0.2.1-beta-20260924075842

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 (585) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +742 -0
  3. package/dist/modules/backend.mjs +54 -0
  4. package/dist/modules/backend.mjs.map +7 -0
  5. package/dist/modules/browser.mjs +180 -0
  6. package/dist/modules/browser.mjs.map +7 -0
  7. package/dist/modules/carrier-contract.mjs +38 -0
  8. package/dist/modules/carrier-contract.mjs.map +7 -0
  9. package/dist/modules/carrier.mjs +13 -0
  10. package/dist/modules/carrier.mjs.map +7 -0
  11. package/dist/modules/chunks/chunk-2ASWB6IX.mjs +225 -0
  12. package/dist/modules/chunks/chunk-2ASWB6IX.mjs.map +7 -0
  13. package/dist/modules/chunks/chunk-2IJKOG2F.mjs +801 -0
  14. package/dist/modules/chunks/chunk-2IJKOG2F.mjs.map +7 -0
  15. package/dist/modules/chunks/chunk-2K3BBJ5S.mjs +9 -0
  16. package/dist/modules/chunks/chunk-2K3BBJ5S.mjs.map +7 -0
  17. package/dist/modules/chunks/chunk-32GD5LL6.mjs +482 -0
  18. package/dist/modules/chunks/chunk-32GD5LL6.mjs.map +7 -0
  19. package/dist/modules/chunks/chunk-3B4KFAEC.mjs +10 -0
  20. package/dist/modules/chunks/chunk-3B4KFAEC.mjs.map +7 -0
  21. package/dist/modules/chunks/chunk-46O5WX43.mjs +25 -0
  22. package/dist/modules/chunks/chunk-46O5WX43.mjs.map +7 -0
  23. package/dist/modules/chunks/chunk-47J5JXAB.mjs +237 -0
  24. package/dist/modules/chunks/chunk-47J5JXAB.mjs.map +7 -0
  25. package/dist/modules/chunks/chunk-4BXQOUDQ.mjs +17 -0
  26. package/dist/modules/chunks/chunk-4BXQOUDQ.mjs.map +7 -0
  27. package/dist/modules/chunks/chunk-4GQWYU2V.mjs +126 -0
  28. package/dist/modules/chunks/chunk-4GQWYU2V.mjs.map +7 -0
  29. package/dist/modules/chunks/chunk-4N5X2PRQ.mjs +48 -0
  30. package/dist/modules/chunks/chunk-4N5X2PRQ.mjs.map +7 -0
  31. package/dist/modules/chunks/chunk-4WXD2KYX.mjs +56 -0
  32. package/dist/modules/chunks/chunk-4WXD2KYX.mjs.map +7 -0
  33. package/dist/modules/chunks/chunk-6ZWWVAZK.mjs +468 -0
  34. package/dist/modules/chunks/chunk-6ZWWVAZK.mjs.map +7 -0
  35. package/dist/modules/chunks/chunk-73UZNRHN.mjs +296 -0
  36. package/dist/modules/chunks/chunk-73UZNRHN.mjs.map +7 -0
  37. package/dist/modules/chunks/chunk-7ITLCRND.mjs +10 -0
  38. package/dist/modules/chunks/chunk-7ITLCRND.mjs.map +7 -0
  39. package/dist/modules/chunks/chunk-7TGVWKH7.mjs +59 -0
  40. package/dist/modules/chunks/chunk-7TGVWKH7.mjs.map +7 -0
  41. package/dist/modules/chunks/chunk-7URFF53W.mjs +42 -0
  42. package/dist/modules/chunks/chunk-7URFF53W.mjs.map +7 -0
  43. package/dist/modules/chunks/chunk-7YSDRIFN.mjs +14 -0
  44. package/dist/modules/chunks/chunk-7YSDRIFN.mjs.map +7 -0
  45. package/dist/modules/chunks/chunk-AAFVCQPK.mjs +52 -0
  46. package/dist/modules/chunks/chunk-AAFVCQPK.mjs.map +7 -0
  47. package/dist/modules/chunks/chunk-AEK7ZESQ.mjs +18 -0
  48. package/dist/modules/chunks/chunk-AEK7ZESQ.mjs.map +7 -0
  49. package/dist/modules/chunks/chunk-AL6ZWIEU.mjs +42 -0
  50. package/dist/modules/chunks/chunk-AL6ZWIEU.mjs.map +7 -0
  51. package/dist/modules/chunks/chunk-ALT7XVMQ.mjs +73 -0
  52. package/dist/modules/chunks/chunk-ALT7XVMQ.mjs.map +7 -0
  53. package/dist/modules/chunks/chunk-ASI2HBE6.mjs +116 -0
  54. package/dist/modules/chunks/chunk-ASI2HBE6.mjs.map +7 -0
  55. package/dist/modules/chunks/chunk-ATWGCH7I.mjs +174 -0
  56. package/dist/modules/chunks/chunk-ATWGCH7I.mjs.map +7 -0
  57. package/dist/modules/chunks/chunk-C45U6IIY.mjs +692 -0
  58. package/dist/modules/chunks/chunk-C45U6IIY.mjs.map +7 -0
  59. package/dist/modules/chunks/chunk-C7R3YRA7.mjs +98 -0
  60. package/dist/modules/chunks/chunk-C7R3YRA7.mjs.map +7 -0
  61. package/dist/modules/chunks/chunk-CRMICXKN.mjs +87 -0
  62. package/dist/modules/chunks/chunk-CRMICXKN.mjs.map +7 -0
  63. package/dist/modules/chunks/chunk-CUH2G6UF.mjs +81 -0
  64. package/dist/modules/chunks/chunk-CUH2G6UF.mjs.map +7 -0
  65. package/dist/modules/chunks/chunk-D7GWRZLL.mjs +77 -0
  66. package/dist/modules/chunks/chunk-D7GWRZLL.mjs.map +7 -0
  67. package/dist/modules/chunks/chunk-DBWUIBE3.mjs +10 -0
  68. package/dist/modules/chunks/chunk-DBWUIBE3.mjs.map +7 -0
  69. package/dist/modules/chunks/chunk-DQWVWWUU.mjs +77 -0
  70. package/dist/modules/chunks/chunk-DQWVWWUU.mjs.map +7 -0
  71. package/dist/modules/chunks/chunk-DZZ2WFEU.mjs +122 -0
  72. package/dist/modules/chunks/chunk-DZZ2WFEU.mjs.map +7 -0
  73. package/dist/modules/chunks/chunk-E4UIAN26.mjs +58 -0
  74. package/dist/modules/chunks/chunk-E4UIAN26.mjs.map +7 -0
  75. package/dist/modules/chunks/chunk-EJGBVKFE.mjs +77 -0
  76. package/dist/modules/chunks/chunk-EJGBVKFE.mjs.map +7 -0
  77. package/dist/modules/chunks/chunk-EPSTTHWV.mjs +173 -0
  78. package/dist/modules/chunks/chunk-EPSTTHWV.mjs.map +7 -0
  79. package/dist/modules/chunks/chunk-ER7T6QJ3.mjs +64 -0
  80. package/dist/modules/chunks/chunk-ER7T6QJ3.mjs.map +7 -0
  81. package/dist/modules/chunks/chunk-FD4BAJ6K.mjs +389 -0
  82. package/dist/modules/chunks/chunk-FD4BAJ6K.mjs.map +7 -0
  83. package/dist/modules/chunks/chunk-FJM6WWIY.mjs +80 -0
  84. package/dist/modules/chunks/chunk-FJM6WWIY.mjs.map +7 -0
  85. package/dist/modules/chunks/chunk-FKCQYDLX.mjs +162 -0
  86. package/dist/modules/chunks/chunk-FKCQYDLX.mjs.map +7 -0
  87. package/dist/modules/chunks/chunk-FLGC65SR.mjs +10 -0
  88. package/dist/modules/chunks/chunk-FLGC65SR.mjs.map +7 -0
  89. package/dist/modules/chunks/chunk-FMCACPX5.mjs +289 -0
  90. package/dist/modules/chunks/chunk-FMCACPX5.mjs.map +7 -0
  91. package/dist/modules/chunks/chunk-FOBRLUQV.mjs +51 -0
  92. package/dist/modules/chunks/chunk-FOBRLUQV.mjs.map +7 -0
  93. package/dist/modules/chunks/chunk-FV3DSKZB.mjs +33 -0
  94. package/dist/modules/chunks/chunk-FV3DSKZB.mjs.map +7 -0
  95. package/dist/modules/chunks/chunk-G7BAFAGO.mjs +98 -0
  96. package/dist/modules/chunks/chunk-G7BAFAGO.mjs.map +7 -0
  97. package/dist/modules/chunks/chunk-GQBZMCTK.mjs +145 -0
  98. package/dist/modules/chunks/chunk-GQBZMCTK.mjs.map +7 -0
  99. package/dist/modules/chunks/chunk-GYWIY7AL.mjs +131 -0
  100. package/dist/modules/chunks/chunk-GYWIY7AL.mjs.map +7 -0
  101. package/dist/modules/chunks/chunk-H3KNBALD.mjs +256 -0
  102. package/dist/modules/chunks/chunk-H3KNBALD.mjs.map +7 -0
  103. package/dist/modules/chunks/chunk-H3M22JDL.mjs +144 -0
  104. package/dist/modules/chunks/chunk-H3M22JDL.mjs.map +7 -0
  105. package/dist/modules/chunks/chunk-HES3DNTM.mjs +40 -0
  106. package/dist/modules/chunks/chunk-HES3DNTM.mjs.map +7 -0
  107. package/dist/modules/chunks/chunk-I5BFP7SS.mjs +2392 -0
  108. package/dist/modules/chunks/chunk-I5BFP7SS.mjs.map +7 -0
  109. package/dist/modules/chunks/chunk-IGRMZYRD.mjs +15 -0
  110. package/dist/modules/chunks/chunk-IGRMZYRD.mjs.map +7 -0
  111. package/dist/modules/chunks/chunk-IKNGC766.mjs +321 -0
  112. package/dist/modules/chunks/chunk-IKNGC766.mjs.map +7 -0
  113. package/dist/modules/chunks/chunk-IVHNYKZB.mjs +35 -0
  114. package/dist/modules/chunks/chunk-IVHNYKZB.mjs.map +7 -0
  115. package/dist/modules/chunks/chunk-JHOURMYW.mjs +101 -0
  116. package/dist/modules/chunks/chunk-JHOURMYW.mjs.map +7 -0
  117. package/dist/modules/chunks/chunk-JURXMRFA.mjs +282 -0
  118. package/dist/modules/chunks/chunk-JURXMRFA.mjs.map +7 -0
  119. package/dist/modules/chunks/chunk-JWZIREC3.mjs +18 -0
  120. package/dist/modules/chunks/chunk-JWZIREC3.mjs.map +7 -0
  121. package/dist/modules/chunks/chunk-KHRTIZ56.mjs +1400 -0
  122. package/dist/modules/chunks/chunk-KHRTIZ56.mjs.map +7 -0
  123. package/dist/modules/chunks/chunk-KLJZZ23J.mjs +102 -0
  124. package/dist/modules/chunks/chunk-KLJZZ23J.mjs.map +7 -0
  125. package/dist/modules/chunks/chunk-KNBAYU5I.mjs +49 -0
  126. package/dist/modules/chunks/chunk-KNBAYU5I.mjs.map +7 -0
  127. package/dist/modules/chunks/chunk-KSZNCFU4.mjs +125 -0
  128. package/dist/modules/chunks/chunk-KSZNCFU4.mjs.map +7 -0
  129. package/dist/modules/chunks/chunk-L45W6KM6.mjs +158 -0
  130. package/dist/modules/chunks/chunk-L45W6KM6.mjs.map +7 -0
  131. package/dist/modules/chunks/chunk-LERMYZRC.mjs +239 -0
  132. package/dist/modules/chunks/chunk-LERMYZRC.mjs.map +7 -0
  133. package/dist/modules/chunks/chunk-LKJCXYSJ.mjs +91 -0
  134. package/dist/modules/chunks/chunk-LKJCXYSJ.mjs.map +7 -0
  135. package/dist/modules/chunks/chunk-MBS3EICT.mjs +25 -0
  136. package/dist/modules/chunks/chunk-MBS3EICT.mjs.map +7 -0
  137. package/dist/modules/chunks/chunk-MUOQZPVH.mjs +609 -0
  138. package/dist/modules/chunks/chunk-MUOQZPVH.mjs.map +7 -0
  139. package/dist/modules/chunks/chunk-MVEPGFSB.mjs +1 -0
  140. package/dist/modules/chunks/chunk-MVEPGFSB.mjs.map +7 -0
  141. package/dist/modules/chunks/chunk-NBJKLWJ5.mjs +42 -0
  142. package/dist/modules/chunks/chunk-NBJKLWJ5.mjs.map +7 -0
  143. package/dist/modules/chunks/chunk-NBLGKTEM.mjs +86 -0
  144. package/dist/modules/chunks/chunk-NBLGKTEM.mjs.map +7 -0
  145. package/dist/modules/chunks/chunk-NI7CS3I2.mjs +110 -0
  146. package/dist/modules/chunks/chunk-NI7CS3I2.mjs.map +7 -0
  147. package/dist/modules/chunks/chunk-NJH2OJFC.mjs +2113 -0
  148. package/dist/modules/chunks/chunk-NJH2OJFC.mjs.map +7 -0
  149. package/dist/modules/chunks/chunk-OBK4LIJB.mjs +20 -0
  150. package/dist/modules/chunks/chunk-OBK4LIJB.mjs.map +7 -0
  151. package/dist/modules/chunks/chunk-PEUT3FW7.mjs +1 -0
  152. package/dist/modules/chunks/chunk-PEUT3FW7.mjs.map +7 -0
  153. package/dist/modules/chunks/chunk-PRZOWPDN.mjs +66 -0
  154. package/dist/modules/chunks/chunk-PRZOWPDN.mjs.map +7 -0
  155. package/dist/modules/chunks/chunk-Q4RXBGQS.mjs +55 -0
  156. package/dist/modules/chunks/chunk-Q4RXBGQS.mjs.map +7 -0
  157. package/dist/modules/chunks/chunk-QBHBKOIL.mjs +55 -0
  158. package/dist/modules/chunks/chunk-QBHBKOIL.mjs.map +7 -0
  159. package/dist/modules/chunks/chunk-QD6CCRMG.mjs +20 -0
  160. package/dist/modules/chunks/chunk-QD6CCRMG.mjs.map +7 -0
  161. package/dist/modules/chunks/chunk-QF4V23GW.mjs +39 -0
  162. package/dist/modules/chunks/chunk-QF4V23GW.mjs.map +7 -0
  163. package/dist/modules/chunks/chunk-QK6W7MJO.mjs +42 -0
  164. package/dist/modules/chunks/chunk-QK6W7MJO.mjs.map +7 -0
  165. package/dist/modules/chunks/chunk-QL7V6DK7.mjs +34 -0
  166. package/dist/modules/chunks/chunk-QL7V6DK7.mjs.map +7 -0
  167. package/dist/modules/chunks/chunk-QLBQQKRI.mjs +25 -0
  168. package/dist/modules/chunks/chunk-QLBQQKRI.mjs.map +7 -0
  169. package/dist/modules/chunks/chunk-QLZQGZDC.mjs +418 -0
  170. package/dist/modules/chunks/chunk-QLZQGZDC.mjs.map +7 -0
  171. package/dist/modules/chunks/chunk-QSKQZGK7.mjs +1625 -0
  172. package/dist/modules/chunks/chunk-QSKQZGK7.mjs.map +7 -0
  173. package/dist/modules/chunks/chunk-QURKBAG4.mjs +25 -0
  174. package/dist/modules/chunks/chunk-QURKBAG4.mjs.map +7 -0
  175. package/dist/modules/chunks/chunk-R274XBEH.mjs +53 -0
  176. package/dist/modules/chunks/chunk-R274XBEH.mjs.map +7 -0
  177. package/dist/modules/chunks/chunk-R4I4JEY5.mjs +77 -0
  178. package/dist/modules/chunks/chunk-R4I4JEY5.mjs.map +7 -0
  179. package/dist/modules/chunks/chunk-RR6L6VVR.mjs +9 -0
  180. package/dist/modules/chunks/chunk-RR6L6VVR.mjs.map +7 -0
  181. package/dist/modules/chunks/chunk-RXF7SBBZ.mjs +125 -0
  182. package/dist/modules/chunks/chunk-RXF7SBBZ.mjs.map +7 -0
  183. package/dist/modules/chunks/chunk-SR66S6EJ.mjs +138 -0
  184. package/dist/modules/chunks/chunk-SR66S6EJ.mjs.map +7 -0
  185. package/dist/modules/chunks/chunk-SSQMQJ52.mjs +27 -0
  186. package/dist/modules/chunks/chunk-SSQMQJ52.mjs.map +7 -0
  187. package/dist/modules/chunks/chunk-TP26TASL.mjs +20 -0
  188. package/dist/modules/chunks/chunk-TP26TASL.mjs.map +7 -0
  189. package/dist/modules/chunks/chunk-TSAEK5P3.mjs +50 -0
  190. package/dist/modules/chunks/chunk-TSAEK5P3.mjs.map +7 -0
  191. package/dist/modules/chunks/chunk-UAY27HT3.mjs +68 -0
  192. package/dist/modules/chunks/chunk-UAY27HT3.mjs.map +7 -0
  193. package/dist/modules/chunks/chunk-UDLIWGWS.mjs +103 -0
  194. package/dist/modules/chunks/chunk-UDLIWGWS.mjs.map +7 -0
  195. package/dist/modules/chunks/chunk-UDVQHPWV.mjs +89 -0
  196. package/dist/modules/chunks/chunk-UDVQHPWV.mjs.map +7 -0
  197. package/dist/modules/chunks/chunk-UM23W3G7.mjs +237 -0
  198. package/dist/modules/chunks/chunk-UM23W3G7.mjs.map +7 -0
  199. package/dist/modules/chunks/chunk-VDZJWEAA.mjs +214 -0
  200. package/dist/modules/chunks/chunk-VDZJWEAA.mjs.map +7 -0
  201. package/dist/modules/chunks/chunk-VIGOJWSO.mjs +42 -0
  202. package/dist/modules/chunks/chunk-VIGOJWSO.mjs.map +7 -0
  203. package/dist/modules/chunks/chunk-VY3S5BWI.mjs +284 -0
  204. package/dist/modules/chunks/chunk-VY3S5BWI.mjs.map +7 -0
  205. package/dist/modules/chunks/chunk-VZXGRZYU.mjs +47 -0
  206. package/dist/modules/chunks/chunk-VZXGRZYU.mjs.map +7 -0
  207. package/dist/modules/chunks/chunk-W5DMQZB5.mjs +42 -0
  208. package/dist/modules/chunks/chunk-W5DMQZB5.mjs.map +7 -0
  209. package/dist/modules/chunks/chunk-WOMHSTVZ.mjs +918 -0
  210. package/dist/modules/chunks/chunk-WOMHSTVZ.mjs.map +7 -0
  211. package/dist/modules/chunks/chunk-XFQT7XCG.mjs +42 -0
  212. package/dist/modules/chunks/chunk-XFQT7XCG.mjs.map +7 -0
  213. package/dist/modules/chunks/chunk-XJZEVRYX.mjs +98 -0
  214. package/dist/modules/chunks/chunk-XJZEVRYX.mjs.map +7 -0
  215. package/dist/modules/chunks/chunk-XUYFV23R.mjs +317 -0
  216. package/dist/modules/chunks/chunk-XUYFV23R.mjs.map +7 -0
  217. package/dist/modules/chunks/chunk-Y5HXCPPQ.mjs +58 -0
  218. package/dist/modules/chunks/chunk-Y5HXCPPQ.mjs.map +7 -0
  219. package/dist/modules/chunks/chunk-YTHGRKGI.mjs +147 -0
  220. package/dist/modules/chunks/chunk-YTHGRKGI.mjs.map +7 -0
  221. package/dist/modules/chunks/chunk-YVQSDKAO.mjs +341 -0
  222. package/dist/modules/chunks/chunk-YVQSDKAO.mjs.map +7 -0
  223. package/dist/modules/chunks/chunk-YYXQDUVT.mjs +123 -0
  224. package/dist/modules/chunks/chunk-YYXQDUVT.mjs.map +7 -0
  225. package/dist/modules/chunks/chunk-ZFXZ2NUI.mjs +142 -0
  226. package/dist/modules/chunks/chunk-ZFXZ2NUI.mjs.map +7 -0
  227. package/dist/modules/chunks/chunk-ZLNWF4ET.mjs +9 -0
  228. package/dist/modules/chunks/chunk-ZLNWF4ET.mjs.map +7 -0
  229. package/dist/modules/chunks/chunk-ZLU5QW2O.mjs +9 -0
  230. package/dist/modules/chunks/chunk-ZLU5QW2O.mjs.map +7 -0
  231. package/dist/modules/chunks/chunk-ZNZPYE2V.mjs +28 -0
  232. package/dist/modules/chunks/chunk-ZNZPYE2V.mjs.map +7 -0
  233. package/dist/modules/chunks/core-564N45MO.mjs +7480 -0
  234. package/dist/modules/chunks/core-564N45MO.mjs.map +7 -0
  235. package/dist/modules/chunks/css-BKH4SVJG.mjs +8 -0
  236. package/dist/modules/chunks/css-BKH4SVJG.mjs.map +7 -0
  237. package/dist/modules/chunks/engine-javascript-PDVIGNGR.mjs +3241 -0
  238. package/dist/modules/chunks/engine-javascript-PDVIGNGR.mjs.map +7 -0
  239. package/dist/modules/chunks/github-dark-default-6HVTHEWF.mjs +8 -0
  240. package/dist/modules/chunks/github-dark-default-6HVTHEWF.mjs.map +7 -0
  241. package/dist/modules/chunks/github-light-default-LAXRA6XL.mjs +8 -0
  242. package/dist/modules/chunks/github-light-default-LAXRA6XL.mjs.map +7 -0
  243. package/dist/modules/chunks/glsl-UC3YWUD2.mjs +18 -0
  244. package/dist/modules/chunks/glsl-UC3YWUD2.mjs.map +7 -0
  245. package/dist/modules/chunks/html-FRVIUV63.mjs +19 -0
  246. package/dist/modules/chunks/html-FRVIUV63.mjs.map +7 -0
  247. package/dist/modules/chunks/javascript-LN3OC7S2.mjs +8 -0
  248. package/dist/modules/chunks/javascript-LN3OC7S2.mjs.map +7 -0
  249. package/dist/modules/chunks/json-5CUGWTOP.mjs +11 -0
  250. package/dist/modules/chunks/json-5CUGWTOP.mjs.map +7 -0
  251. package/dist/modules/chunks/json5-YZQI5VNO.mjs +11 -0
  252. package/dist/modules/chunks/json5-YZQI5VNO.mjs.map +7 -0
  253. package/dist/modules/chunks/jsonc-SWID6VOZ.mjs +11 -0
  254. package/dist/modules/chunks/jsonc-SWID6VOZ.mjs.map +7 -0
  255. package/dist/modules/chunks/jsx-A7RDCLJO.mjs +11 -0
  256. package/dist/modules/chunks/jsx-A7RDCLJO.mjs.map +7 -0
  257. package/dist/modules/chunks/markdown-QTCU5KP5.mjs +11 -0
  258. package/dist/modules/chunks/markdown-QTCU5KP5.mjs.map +7 -0
  259. package/dist/modules/chunks/python-LAZONBIB.mjs +11 -0
  260. package/dist/modules/chunks/python-LAZONBIB.mjs.map +7 -0
  261. package/dist/modules/chunks/rust-XWTPJFJO.mjs +11 -0
  262. package/dist/modules/chunks/rust-XWTPJFJO.mjs.map +7 -0
  263. package/dist/modules/chunks/scss-CFXRHUUW.mjs +15 -0
  264. package/dist/modules/chunks/scss-CFXRHUUW.mjs.map +7 -0
  265. package/dist/modules/chunks/shellscript-OHO3LCVU.mjs +11 -0
  266. package/dist/modules/chunks/shellscript-OHO3LCVU.mjs.map +7 -0
  267. package/dist/modules/chunks/toml-IOHFZJ5B.mjs +11 -0
  268. package/dist/modules/chunks/toml-IOHFZJ5B.mjs.map +7 -0
  269. package/dist/modules/chunks/tsx-2E6WNX2E.mjs +11 -0
  270. package/dist/modules/chunks/tsx-2E6WNX2E.mjs.map +7 -0
  271. package/dist/modules/chunks/typescript-PBKAS54P.mjs +11 -0
  272. package/dist/modules/chunks/typescript-PBKAS54P.mjs.map +7 -0
  273. package/dist/modules/chunks/wgsl-PS6QPRLZ.mjs +11 -0
  274. package/dist/modules/chunks/wgsl-PS6QPRLZ.mjs.map +7 -0
  275. package/dist/modules/chunks/xml-JECR2ACB.mjs +18 -0
  276. package/dist/modules/chunks/xml-JECR2ACB.mjs.map +7 -0
  277. package/dist/modules/chunks/yaml-P2SV4LOE.mjs +11 -0
  278. package/dist/modules/chunks/yaml-P2SV4LOE.mjs.map +7 -0
  279. package/dist/modules/cli-contributions.mjs +32 -0
  280. package/dist/modules/cli-contributions.mjs.map +7 -0
  281. package/dist/modules/cli.mjs +14 -0
  282. package/dist/modules/cli.mjs.map +7 -0
  283. package/dist/modules/command-executor.mjs +65 -0
  284. package/dist/modules/command-executor.mjs.map +7 -0
  285. package/dist/modules/commands.mjs +10 -0
  286. package/dist/modules/commands.mjs.map +7 -0
  287. package/dist/modules/embedded.mjs +18608 -0
  288. package/dist/modules/embedded.mjs.map +7 -0
  289. package/dist/modules/extension-bridge.mjs +18 -0
  290. package/dist/modules/extension-bridge.mjs.map +7 -0
  291. package/dist/modules/frontend-root.mjs +61 -0
  292. package/dist/modules/frontend-root.mjs.map +7 -0
  293. package/dist/modules/index.mjs +784 -0
  294. package/dist/modules/index.mjs.map +7 -0
  295. package/dist/modules/page.mjs +45 -0
  296. package/dist/modules/page.mjs.map +7 -0
  297. package/dist/modules/pages/scene.mjs +18 -0
  298. package/dist/modules/pages/scene.mjs.map +7 -0
  299. package/dist/modules/plugin.mjs +56 -0
  300. package/dist/modules/plugin.mjs.map +7 -0
  301. package/dist/modules/plugins/asset/frontend.mjs +23 -0
  302. package/dist/modules/plugins/asset/frontend.mjs.map +7 -0
  303. package/dist/modules/plugins/asset/i18n.mjs +15 -0
  304. package/dist/modules/plugins/asset/i18n.mjs.map +7 -0
  305. package/dist/modules/plugins/asset/identity.mjs +42 -0
  306. package/dist/modules/plugins/asset/identity.mjs.map +7 -0
  307. package/dist/modules/plugins/asset/schema.mjs +10 -0
  308. package/dist/modules/plugins/asset/schema.mjs.map +7 -0
  309. package/dist/modules/plugins/asset/ui.mjs +16 -0
  310. package/dist/modules/plugins/asset/ui.mjs.map +7 -0
  311. package/dist/modules/plugins/content-browser/frontend.mjs +17 -0
  312. package/dist/modules/plugins/content-browser/frontend.mjs.map +7 -0
  313. package/dist/modules/plugins/content-browser/i18n.mjs +15 -0
  314. package/dist/modules/plugins/content-browser/i18n.mjs.map +7 -0
  315. package/dist/modules/plugins/content-browser/identity.mjs +22 -0
  316. package/dist/modules/plugins/content-browser/identity.mjs.map +7 -0
  317. package/dist/modules/plugins/content-browser/schema.mjs +12 -0
  318. package/dist/modules/plugins/content-browser/schema.mjs.map +7 -0
  319. package/dist/modules/plugins/content-browser/ui.mjs +15 -0
  320. package/dist/modules/plugins/content-browser/ui.mjs.map +7 -0
  321. package/dist/modules/plugins/display/api.mjs +10 -0
  322. package/dist/modules/plugins/display/api.mjs.map +7 -0
  323. package/dist/modules/plugins/display/backend.mjs +16 -0
  324. package/dist/modules/plugins/display/backend.mjs.map +7 -0
  325. package/dist/modules/plugins/display/carrier-contract.mjs +38 -0
  326. package/dist/modules/plugins/display/carrier-contract.mjs.map +7 -0
  327. package/dist/modules/plugins/display/carrier.mjs +13 -0
  328. package/dist/modules/plugins/display/carrier.mjs.map +7 -0
  329. package/dist/modules/plugins/display/effects.mjs +8 -0
  330. package/dist/modules/plugins/display/effects.mjs.map +7 -0
  331. package/dist/modules/plugins/display/frontend.mjs +14 -0
  332. package/dist/modules/plugins/display/frontend.mjs.map +7 -0
  333. package/dist/modules/plugins/display/i18n.mjs +58 -0
  334. package/dist/modules/plugins/display/i18n.mjs.map +7 -0
  335. package/dist/modules/plugins/display/identity.mjs +30 -0
  336. package/dist/modules/plugins/display/identity.mjs.map +7 -0
  337. package/dist/modules/plugins/display/page-broker.mjs +12 -0
  338. package/dist/modules/plugins/display/page-broker.mjs.map +7 -0
  339. package/dist/modules/plugins/display/schema.mjs +40 -0
  340. package/dist/modules/plugins/display/schema.mjs.map +7 -0
  341. package/dist/modules/plugins/display/ui.mjs +9 -0
  342. package/dist/modules/plugins/display/ui.mjs.map +7 -0
  343. package/dist/modules/plugins/inspector/frontend.mjs +17 -0
  344. package/dist/modules/plugins/inspector/frontend.mjs.map +7 -0
  345. package/dist/modules/plugins/inspector/i18n.mjs +15 -0
  346. package/dist/modules/plugins/inspector/i18n.mjs.map +7 -0
  347. package/dist/modules/plugins/inspector/identity.mjs +22 -0
  348. package/dist/modules/plugins/inspector/identity.mjs.map +7 -0
  349. package/dist/modules/plugins/inspector/schema.mjs +12 -0
  350. package/dist/modules/plugins/inspector/schema.mjs.map +7 -0
  351. package/dist/modules/plugins/inspector/ui.mjs +16 -0
  352. package/dist/modules/plugins/inspector/ui.mjs.map +7 -0
  353. package/dist/modules/plugins/material/frontend.mjs +25 -0
  354. package/dist/modules/plugins/material/frontend.mjs.map +7 -0
  355. package/dist/modules/plugins/material/i18n.mjs +15 -0
  356. package/dist/modules/plugins/material/i18n.mjs.map +7 -0
  357. package/dist/modules/plugins/material/identity.mjs +60 -0
  358. package/dist/modules/plugins/material/identity.mjs.map +7 -0
  359. package/dist/modules/plugins/material/schema.mjs +47 -0
  360. package/dist/modules/plugins/material/schema.mjs.map +7 -0
  361. package/dist/modules/plugins/material/ui.mjs +28 -0
  362. package/dist/modules/plugins/material/ui.mjs.map +7 -0
  363. package/dist/modules/plugins/mesh/frontend.mjs +23 -0
  364. package/dist/modules/plugins/mesh/frontend.mjs.map +7 -0
  365. package/dist/modules/plugins/mesh/i18n.mjs +15 -0
  366. package/dist/modules/plugins/mesh/i18n.mjs.map +7 -0
  367. package/dist/modules/plugins/mesh/identity.mjs +54 -0
  368. package/dist/modules/plugins/mesh/identity.mjs.map +7 -0
  369. package/dist/modules/plugins/mesh/schema.mjs +10 -0
  370. package/dist/modules/plugins/mesh/schema.mjs.map +7 -0
  371. package/dist/modules/plugins/mesh/ui.mjs +26 -0
  372. package/dist/modules/plugins/mesh/ui.mjs.map +7 -0
  373. package/dist/modules/plugins/plugins/api.mjs +11 -0
  374. package/dist/modules/plugins/plugins/api.mjs.map +7 -0
  375. package/dist/modules/plugins/plugins/backend.mjs +21 -0
  376. package/dist/modules/plugins/plugins/backend.mjs.map +7 -0
  377. package/dist/modules/plugins/plugins/cli.mjs +12 -0
  378. package/dist/modules/plugins/plugins/cli.mjs.map +7 -0
  379. package/dist/modules/plugins/plugins/frontend.mjs +17 -0
  380. package/dist/modules/plugins/plugins/frontend.mjs.map +7 -0
  381. package/dist/modules/plugins/plugins/i18n.mjs +15 -0
  382. package/dist/modules/plugins/plugins/i18n.mjs.map +7 -0
  383. package/dist/modules/plugins/plugins/identity.mjs +26 -0
  384. package/dist/modules/plugins/plugins/identity.mjs.map +7 -0
  385. package/dist/modules/plugins/plugins/runtime.mjs +50 -0
  386. package/dist/modules/plugins/plugins/runtime.mjs.map +7 -0
  387. package/dist/modules/plugins/plugins/schema.mjs +12 -0
  388. package/dist/modules/plugins/plugins/schema.mjs.map +7 -0
  389. package/dist/modules/plugins/plugins/ui/panel.mjs +14 -0
  390. package/dist/modules/plugins/plugins/ui/panel.mjs.map +7 -0
  391. package/dist/modules/plugins/plugins/ui.mjs +15 -0
  392. package/dist/modules/plugins/plugins/ui.mjs.map +7 -0
  393. package/dist/modules/plugins/scene/frontend.mjs +18 -0
  394. package/dist/modules/plugins/scene/frontend.mjs.map +7 -0
  395. package/dist/modules/plugins/scene/identity.mjs +14 -0
  396. package/dist/modules/plugins/scene/identity.mjs.map +7 -0
  397. package/dist/modules/plugins/scene-tree/frontend.mjs +17 -0
  398. package/dist/modules/plugins/scene-tree/frontend.mjs.map +7 -0
  399. package/dist/modules/plugins/scene-tree/i18n.mjs +15 -0
  400. package/dist/modules/plugins/scene-tree/i18n.mjs.map +7 -0
  401. package/dist/modules/plugins/scene-tree/identity.mjs +22 -0
  402. package/dist/modules/plugins/scene-tree/identity.mjs.map +7 -0
  403. package/dist/modules/plugins/scene-tree/schema.mjs +12 -0
  404. package/dist/modules/plugins/scene-tree/schema.mjs.map +7 -0
  405. package/dist/modules/plugins/scene-tree/ui.mjs +16 -0
  406. package/dist/modules/plugins/scene-tree/ui.mjs.map +7 -0
  407. package/dist/modules/plugins/texture/frontend.mjs +23 -0
  408. package/dist/modules/plugins/texture/frontend.mjs.map +7 -0
  409. package/dist/modules/plugins/texture/i18n.mjs +15 -0
  410. package/dist/modules/plugins/texture/i18n.mjs.map +7 -0
  411. package/dist/modules/plugins/texture/identity.mjs +54 -0
  412. package/dist/modules/plugins/texture/identity.mjs.map +7 -0
  413. package/dist/modules/plugins/texture/schema.mjs +10 -0
  414. package/dist/modules/plugins/texture/schema.mjs.map +7 -0
  415. package/dist/modules/plugins/texture/ui.mjs +26 -0
  416. package/dist/modules/plugins/texture/ui.mjs.map +7 -0
  417. package/dist/modules/plugins/viewport/frontend.mjs +27 -0
  418. package/dist/modules/plugins/viewport/frontend.mjs.map +7 -0
  419. package/dist/modules/plugins/viewport/identity.mjs +28 -0
  420. package/dist/modules/plugins/viewport/identity.mjs.map +7 -0
  421. package/dist/modules/plugins/viewport/presentation-identity.mjs +10 -0
  422. package/dist/modules/plugins/viewport/presentation-identity.mjs.map +7 -0
  423. package/dist/modules/plugins/viewport/presentation.mjs +18 -0
  424. package/dist/modules/plugins/viewport/presentation.mjs.map +7 -0
  425. package/dist/modules/plugins/viewport/schema.mjs +18 -0
  426. package/dist/modules/plugins/viewport/schema.mjs.map +7 -0
  427. package/dist/modules/plugins/viewport/workspace-shell.mjs +29 -0
  428. package/dist/modules/plugins/viewport/workspace-shell.mjs.map +7 -0
  429. package/dist/modules/shell/contract.mjs +10 -0
  430. package/dist/modules/shell/contract.mjs.map +7 -0
  431. package/dist/modules/shell/frontend.mjs +14 -0
  432. package/dist/modules/shell/frontend.mjs.map +7 -0
  433. package/dist/modules/shell/layout-zones.mjs +20 -0
  434. package/dist/modules/shell/layout-zones.mjs.map +7 -0
  435. package/dist/modules/start-cli.mjs +57 -0
  436. package/dist/modules/start-cli.mjs.map +7 -0
  437. package/dist/modules/start.mjs +18 -0
  438. package/dist/modules/start.mjs.map +7 -0
  439. package/dist/modules/viewer/catalog/backend.mjs +47 -0
  440. package/dist/modules/viewer/catalog/backend.mjs.map +7 -0
  441. package/dist/modules/viewer/catalog/frontend.mjs +55 -0
  442. package/dist/modules/viewer/catalog/frontend.mjs.map +7 -0
  443. package/dist/modules/viewer/catalog/shared.mjs +43 -0
  444. package/dist/modules/viewer/catalog/shared.mjs.map +7 -0
  445. package/dist/modules/viewer/catalog.mjs +85 -0
  446. package/dist/modules/viewer/catalog.mjs.map +7 -0
  447. package/dist/modules/viewer/cli.mjs +23 -0
  448. package/dist/modules/viewer/cli.mjs.map +7 -0
  449. package/dist/modules/viewer-host/frontend.mjs +65 -0
  450. package/dist/modules/viewer-host/frontend.mjs.map +7 -0
  451. package/dist/modules/viewer-host/page-registry.mjs +27 -0
  452. package/dist/modules/viewer-host/page-registry.mjs.map +7 -0
  453. package/dist/modules/viewer-host/slot-registry.mjs +8 -0
  454. package/dist/modules/viewer-host/slot-registry.mjs.map +7 -0
  455. package/dist/modules/viewer-host.mjs +43 -0
  456. package/dist/modules/viewer-host.mjs.map +7 -0
  457. package/dist/modules/viewer.mjs +85 -0
  458. package/dist/modules/viewer.mjs.map +7 -0
  459. package/dist/modules/workspace/adopt-surface.mjs +16 -0
  460. package/dist/modules/workspace/adopt-surface.mjs.map +7 -0
  461. package/dist/modules/workspace/api.mjs +8 -0
  462. package/dist/modules/workspace/api.mjs.map +7 -0
  463. package/dist/modules/workspace/backend.mjs +23 -0
  464. package/dist/modules/workspace/backend.mjs.map +7 -0
  465. package/dist/modules/workspace/broker.mjs +16 -0
  466. package/dist/modules/workspace/broker.mjs.map +7 -0
  467. package/dist/modules/workspace/cli.mjs +9 -0
  468. package/dist/modules/workspace/cli.mjs.map +7 -0
  469. package/dist/modules/workspace/client.mjs +15 -0
  470. package/dist/modules/workspace/client.mjs.map +7 -0
  471. package/dist/modules/workspace/command-error.mjs +16 -0
  472. package/dist/modules/workspace/command-error.mjs.map +7 -0
  473. package/dist/modules/workspace/contract.mjs +71 -0
  474. package/dist/modules/workspace/contract.mjs.map +7 -0
  475. package/dist/modules/workspace/demo-client.mjs +127 -0
  476. package/dist/modules/workspace/demo-client.mjs.map +7 -0
  477. package/dist/modules/workspace/engine-adapter.mjs +16 -0
  478. package/dist/modules/workspace/engine-adapter.mjs.map +7 -0
  479. package/dist/modules/workspace/engine-presentation.mjs +10 -0
  480. package/dist/modules/workspace/engine-presentation.mjs.map +7 -0
  481. package/dist/modules/workspace/extension-bridge.mjs +18 -0
  482. package/dist/modules/workspace/extension-bridge.mjs.map +7 -0
  483. package/dist/modules/workspace/frontend-plugin.mjs +18 -0
  484. package/dist/modules/workspace/frontend-plugin.mjs.map +7 -0
  485. package/dist/modules/workspace/frontend.mjs +29 -0
  486. package/dist/modules/workspace/frontend.mjs.map +7 -0
  487. package/dist/modules/workspace/id.mjs +8 -0
  488. package/dist/modules/workspace/id.mjs.map +7 -0
  489. package/dist/modules/workspace/inspection-presentation.mjs +12 -0
  490. package/dist/modules/workspace/inspection-presentation.mjs.map +7 -0
  491. package/dist/modules/workspace/locale-bridge.mjs +14 -0
  492. package/dist/modules/workspace/locale-bridge.mjs.map +7 -0
  493. package/dist/modules/workspace/page-title.mjs +13 -0
  494. package/dist/modules/workspace/page-title.mjs.map +7 -0
  495. package/dist/modules/workspace/presentation.mjs +18 -0
  496. package/dist/modules/workspace/presentation.mjs.map +7 -0
  497. package/dist/modules/workspace/preview-surface.mjs +17 -0
  498. package/dist/modules/workspace/preview-surface.mjs.map +7 -0
  499. package/dist/modules/workspace/project-session.mjs +18 -0
  500. package/dist/modules/workspace/project-session.mjs.map +7 -0
  501. package/dist/modules/workspace/render-resize-sync.mjs +12 -0
  502. package/dist/modules/workspace/render-resize-sync.mjs.map +7 -0
  503. package/dist/modules/workspace/resident.mjs +16 -0
  504. package/dist/modules/workspace/resident.mjs.map +7 -0
  505. package/dist/modules/workspace/resource-open.mjs +34 -0
  506. package/dist/modules/workspace/resource-open.mjs.map +7 -0
  507. package/dist/modules/workspace/resource-page.mjs +27 -0
  508. package/dist/modules/workspace/resource-page.mjs.map +7 -0
  509. package/dist/modules/workspace/tool-runtime.mjs +14 -0
  510. package/dist/modules/workspace/tool-runtime.mjs.map +7 -0
  511. package/dist/modules/workspace/view-trace.mjs +60 -0
  512. package/dist/modules/workspace/view-trace.mjs.map +7 -0
  513. package/dist/modules/workspace/workspace-client-connection.mjs +22 -0
  514. package/dist/modules/workspace/workspace-client-connection.mjs.map +7 -0
  515. package/dist/modules/workspace/workspace-recovery.mjs +35 -0
  516. package/dist/modules/workspace/workspace-recovery.mjs.map +7 -0
  517. package/dist/modules/workspace/workspace-state.mjs +12 -0
  518. package/dist/modules/workspace/workspace-state.mjs.map +7 -0
  519. package/dist/modules/workspace-frontend.mjs +17 -0
  520. package/dist/modules/workspace-frontend.mjs.map +7 -0
  521. package/dist/viewer/assets/chunk-CilyBKbf.js +1 -0
  522. package/dist/viewer/assets/core-DSQma37-.js +13 -0
  523. package/dist/viewer/assets/core-DSQma37-.js.map +1 -0
  524. package/dist/viewer/assets/css-Bq1BXecw.js +2 -0
  525. package/dist/viewer/assets/css-Bq1BXecw.js.map +1 -0
  526. package/dist/viewer/assets/css-CWQWazmX.js +1 -0
  527. package/dist/viewer/assets/embedded-D4ZDx--W.js +2 -0
  528. package/dist/viewer/assets/embedded-D4ZDx--W.js.map +1 -0
  529. package/dist/viewer/assets/engine-javascript-BvokIV9O.js +142 -0
  530. package/dist/viewer/assets/engine-javascript-BvokIV9O.js.map +1 -0
  531. package/dist/viewer/assets/github-dark-default-DaDlj-WZ.js +2 -0
  532. package/dist/viewer/assets/github-dark-default-DaDlj-WZ.js.map +1 -0
  533. package/dist/viewer/assets/github-light-default-BqhWxAZd.js +2 -0
  534. package/dist/viewer/assets/github-light-default-BqhWxAZd.js.map +1 -0
  535. package/dist/viewer/assets/glsl-BJgVnv11.js +2 -0
  536. package/dist/viewer/assets/glsl-BJgVnv11.js.map +1 -0
  537. package/dist/viewer/assets/html-AaaHGGyt.js +2 -0
  538. package/dist/viewer/assets/html-AaaHGGyt.js.map +1 -0
  539. package/dist/viewer/assets/javascript-BX9W64FE.js +1 -0
  540. package/dist/viewer/assets/javascript-DQODvD07.js +2 -0
  541. package/dist/viewer/assets/javascript-DQODvD07.js.map +1 -0
  542. package/dist/viewer/assets/json-CpcIDpT7.js +2 -0
  543. package/dist/viewer/assets/json-CpcIDpT7.js.map +1 -0
  544. package/dist/viewer/assets/json5-Czq4A7dk.js +2 -0
  545. package/dist/viewer/assets/json5-Czq4A7dk.js.map +1 -0
  546. package/dist/viewer/assets/jsonc-BXDfCMmu.js +2 -0
  547. package/dist/viewer/assets/jsonc-BXDfCMmu.js.map +1 -0
  548. package/dist/viewer/assets/jsx-DAWscEnf.js +2 -0
  549. package/dist/viewer/assets/jsx-DAWscEnf.js.map +1 -0
  550. package/dist/viewer/assets/main-C-2CHTN_.js +15 -0
  551. package/dist/viewer/assets/main-C-2CHTN_.js.map +1 -0
  552. package/dist/viewer/assets/markdown-Cx1FMNw-.js +2 -0
  553. package/dist/viewer/assets/markdown-Cx1FMNw-.js.map +1 -0
  554. package/dist/viewer/assets/panels-entry-Ddhfjgf0.js +46 -0
  555. package/dist/viewer/assets/panels-entry-Ddhfjgf0.js.map +1 -0
  556. package/dist/viewer/assets/python-CYPKjWV9.js +2 -0
  557. package/dist/viewer/assets/python-CYPKjWV9.js.map +1 -0
  558. package/dist/viewer/assets/rust-0e5cNx_V.js +2 -0
  559. package/dist/viewer/assets/rust-0e5cNx_V.js.map +1 -0
  560. package/dist/viewer/assets/scss-B-aKzLbT.js +2 -0
  561. package/dist/viewer/assets/scss-B-aKzLbT.js.map +1 -0
  562. package/dist/viewer/assets/shellscript-CpXD-pSm.js +2 -0
  563. package/dist/viewer/assets/shellscript-CpXD-pSm.js.map +1 -0
  564. package/dist/viewer/assets/style-ClttNKZk.css +2 -0
  565. package/dist/viewer/assets/styles-BXozhwiU.js +11 -0
  566. package/dist/viewer/assets/styles-BXozhwiU.js.map +1 -0
  567. package/dist/viewer/assets/toml-GmchYTXa.js +2 -0
  568. package/dist/viewer/assets/toml-GmchYTXa.js.map +1 -0
  569. package/dist/viewer/assets/tsx-Crj1Bi53.js +2 -0
  570. package/dist/viewer/assets/tsx-Crj1Bi53.js.map +1 -0
  571. package/dist/viewer/assets/typescript-xi0cSHCO.js +2 -0
  572. package/dist/viewer/assets/typescript-xi0cSHCO.js.map +1 -0
  573. package/dist/viewer/assets/wgsl-BoEPRo9U.js +2 -0
  574. package/dist/viewer/assets/wgsl-BoEPRo9U.js.map +1 -0
  575. package/dist/viewer/assets/xml-B8JqQrMD.js +2 -0
  576. package/dist/viewer/assets/xml-B8JqQrMD.js.map +1 -0
  577. package/dist/viewer/assets/yaml-DsIB85X9.js +2 -0
  578. package/dist/viewer/assets/yaml-DsIB85X9.js.map +1 -0
  579. package/dist/viewer/index.html +15 -0
  580. package/dist/viewer/panels.js +1 -0
  581. package/host.pack.json +13 -0
  582. package/package.json +174 -0
  583. package/skills/forgeax-view-cli/SKILL.md +74 -0
  584. package/skills/forgeax-view-start/SKILL.md +202 -0
  585. package/skills/forgeax-view-start/scripts/start-view.mjs +202 -0
@@ -0,0 +1,692 @@
1
+ import {
2
+ runWorkspaceToolApi
3
+ } from "./chunk-H3M22JDL.mjs";
4
+ import {
5
+ isWorkspaceTargetRecoveryCode,
6
+ resolveWorkspaceFailure,
7
+ resolveWorkspaceReopenRoot
8
+ } from "./chunk-VDZJWEAA.mjs";
9
+ import {
10
+ editorSceneTargetIds,
11
+ isEditorWorkspaceAsset,
12
+ isTypePreviewAsset,
13
+ logResourceOpen,
14
+ selectEditorWorkspacePreview,
15
+ summarizeResourceAsset
16
+ } from "./chunk-FKCQYDLX.mjs";
17
+ import {
18
+ VIEW_DISPLAY_TAB_ID,
19
+ VIEW_FILE_GET_SERVICE,
20
+ VIEW_WORKSPACE_API_VERSION,
21
+ VIEW_WORKSPACE_OPERATIONS,
22
+ VIEW_WORKSPACE_SERVICES,
23
+ VIEW_WORKSPACE_STATE_TOPIC,
24
+ VIEW_WORKSPACE_TAB_ID,
25
+ assertWorkspaceRequest,
26
+ cloneWorkspaceValue,
27
+ requireWorkspaceString,
28
+ serializeWorkspaceAsset,
29
+ serializeWorkspaceInspection,
30
+ serializeWorkspaceOpenRequest,
31
+ serializeWorkspaceState,
32
+ workspaceCapabilities,
33
+ workspaceError,
34
+ workspaceUiFingerprint
35
+ } from "./chunk-32GD5LL6.mjs";
36
+ import {
37
+ createWorkspaceId
38
+ } from "./chunk-TP26TASL.mjs";
39
+
40
+ // packages/view-workspace-core/src/broker.mjs
41
+ import { randomUUID } from "node:crypto";
42
+
43
+ // packages/view-workspace-core/src/file-preview.mjs
44
+ import { readFile, stat } from "node:fs/promises";
45
+ import { extname, isAbsolute, relative, resolve } from "node:path";
46
+ var EXT_KIND = Object.freeze({
47
+ ".png": { kind: "image", mime: "image/png" },
48
+ ".jpg": { kind: "image", mime: "image/jpeg" },
49
+ ".jpeg": { kind: "image", mime: "image/jpeg" },
50
+ ".gif": { kind: "image", mime: "image/gif" },
51
+ ".webp": { kind: "image", mime: "image/webp" },
52
+ ".avif": { kind: "image", mime: "image/avif" },
53
+ ".bmp": { kind: "image", mime: "image/bmp" },
54
+ ".ico": { kind: "image", mime: "image/x-icon" },
55
+ ".svg": { kind: "image", mime: "image/svg+xml" },
56
+ ".mp3": { kind: "audio", mime: "audio/mpeg" },
57
+ ".wav": { kind: "audio", mime: "audio/wav" },
58
+ ".ogg": { kind: "audio", mime: "audio/ogg" },
59
+ ".m4a": { kind: "audio", mime: "audio/mp4" },
60
+ ".flac": { kind: "audio", mime: "audio/flac" },
61
+ ".aac": { kind: "audio", mime: "audio/aac" },
62
+ ".mp4": { kind: "video", mime: "video/mp4" },
63
+ ".webm": { kind: "video", mime: "video/webm" },
64
+ ".mov": { kind: "video", mime: "video/quicktime" },
65
+ ".glb": { kind: "model", mime: "model/gltf-binary" },
66
+ ".gltf": { kind: "model", mime: "model/gltf+json" },
67
+ ".fbx": { kind: "model", mime: "application/octet-stream" },
68
+ ".ttf": { kind: "binary", mime: "font/ttf" },
69
+ ".otf": { kind: "binary", mime: "font/otf" },
70
+ ".woff": { kind: "binary", mime: "font/woff" },
71
+ ".woff2": { kind: "binary", mime: "font/woff2" }
72
+ });
73
+ var MAX_BINARY_PREVIEW_BYTES = 10 * 1024 * 1024;
74
+ var BINARY_PREVIEW_KINDS = /* @__PURE__ */ new Set(["image", "audio", "video", "binary"]);
75
+ function classifyFile(path) {
76
+ const ext = extname(path).toLowerCase();
77
+ return EXT_KIND[ext] ?? { kind: "text", mime: "text/plain; charset=utf-8" };
78
+ }
79
+ function resolveProjectFilePath(root, input) {
80
+ if (typeof root !== "string" || root.trim() === "") return null;
81
+ if (typeof input !== "string" || input.length === 0 || input.includes("\0")) return null;
82
+ const rootAbs = resolve(root);
83
+ const abs = isAbsolute(input) ? resolve(input) : resolve(rootAbs, input);
84
+ const rel = relative(rootAbs, abs);
85
+ if (rel === "" || rel.startsWith("..") || isAbsolute(rel)) return null;
86
+ const normalized = rel.split(/[/\\]/).join("/");
87
+ if (normalized === ".forgeax/ddc" || normalized.startsWith(".forgeax/ddc/")) return null;
88
+ return { abs, rel: normalized };
89
+ }
90
+ async function readFilePreview(absPath, rel) {
91
+ let info;
92
+ try {
93
+ info = await stat(absPath);
94
+ } catch {
95
+ throw new Error("not found");
96
+ }
97
+ if (info.isDirectory()) throw new Error("is a directory");
98
+ const ext = extname(rel).toLowerCase();
99
+ const { kind, mime } = classifyFile(rel);
100
+ const base = { path: rel, kind, mime, size: info.size, mtime: info.mtimeMs };
101
+ if (kind === "text") {
102
+ const content = await readFile(absPath, "utf8");
103
+ return { ...base, content };
104
+ }
105
+ if (kind === "image" && ext === ".svg") {
106
+ const content = await readFile(absPath, "utf8");
107
+ return { ...base, content };
108
+ }
109
+ if (BINARY_PREVIEW_KINDS.has(kind)) {
110
+ if (info.size > MAX_BINARY_PREVIEW_BYTES) return base;
111
+ const buffer = await readFile(absPath);
112
+ return { ...base, dataUrl: `data:${mime};base64,${buffer.toString("base64")}` };
113
+ }
114
+ return base;
115
+ }
116
+ async function readWorkspaceFilePreview(workspace, payload = {}) {
117
+ const root = workspace?.project?.root;
118
+ if (typeof root !== "string" || root.trim() === "") {
119
+ throw workspaceError(
120
+ "view-workspace-project-closed",
121
+ "an open project",
122
+ "Open a project before previewing source files."
123
+ );
124
+ }
125
+ const resolved = resolveProjectFilePath(root, payload?.path);
126
+ if (!resolved) {
127
+ throw workspaceError(
128
+ "view-workspace-invalid-args",
129
+ "path to be a file inside the open project",
130
+ "Provide a project-relative or in-project absolute path.",
131
+ { field: "path" }
132
+ );
133
+ }
134
+ try {
135
+ return await readFilePreview(resolved.abs, resolved.rel);
136
+ } catch (error) {
137
+ const message = error instanceof Error ? error.message : String(error);
138
+ if (message.startsWith("is a directory")) {
139
+ throw workspaceError(
140
+ "view-workspace-invalid-args",
141
+ "a file path",
142
+ message,
143
+ { path: resolved.rel }
144
+ );
145
+ }
146
+ throw workspaceError(
147
+ "view-workspace-file-not-found",
148
+ "the file to exist in the open project",
149
+ "Refresh the content browser and retry.",
150
+ { path: resolved.rel }
151
+ );
152
+ }
153
+ }
154
+
155
+ // packages/view-workspace-core/src/broker.mjs
156
+ var ENGINE_SOURCE = "engine-workspace";
157
+ var UI_OPERATIONS = Object.freeze({
158
+ "target.select": (workspace, args) => workspace.selectTarget(args),
159
+ "tabs.get": (workspace) => workspace.snapshot(),
160
+ "tabs.select": (workspace, args) => workspace.selectTab(args),
161
+ "scene.select": (workspace, args, context) => workspace.selectSceneEntity(args, context),
162
+ "scene.pick": (workspace, args, context) => workspace.pickSceneEntity(args, context),
163
+ "scene.clear": (workspace, args, context) => workspace.clearSceneSelection(args, context)
164
+ });
165
+ var ViewWorkspaceBroker = class {
166
+ constructor({ engine, toolApi, display = () => void 0, accessToken = randomUUID(), authorize } = {}) {
167
+ this.engine = engine;
168
+ this.toolApi = toolApi;
169
+ this.display = display;
170
+ this.accessToken = accessToken;
171
+ this.authorize = authorize;
172
+ this.selectedTabId = VIEW_WORKSPACE_TAB_ID;
173
+ this.targetBinding = "editor";
174
+ this.editorTargetId = void 0;
175
+ this.playOwner = void 0;
176
+ this.revision = 0;
177
+ this.listeners = /* @__PURE__ */ new Set();
178
+ this.assets = null;
179
+ this.inspection = null;
180
+ this.openRequest = null;
181
+ this.openRequestSequence = 0;
182
+ this.resourceOpens = /* @__PURE__ */ new Map();
183
+ this.sceneSelection = null;
184
+ this.selectionAbort?.abort();
185
+ this.previewProjection = null;
186
+ this.projectOwner = void 0;
187
+ this.previewOwner = void 0;
188
+ this.workspaceTargetLost = false;
189
+ this.disposing = false;
190
+ this.publishFingerprint = "";
191
+ }
192
+ get project() {
193
+ return this.engine?.project?.project ?? null;
194
+ }
195
+ get projectTarget() {
196
+ return this.engine?.project?.target ?? null;
197
+ }
198
+ get preview() {
199
+ this.syncBindings();
200
+ return this.previewProjection;
201
+ }
202
+ previews() {
203
+ return this.engine?.previews ?? (this.engine?.preview ? [this.engine.preview] : []);
204
+ }
205
+ classifiedPreviews() {
206
+ return this.previews().map((preview) => ({
207
+ target: preview.target,
208
+ asset: this.hydrateAsset(preview.asset)
209
+ }));
210
+ }
211
+ editorPreview() {
212
+ const live = this.previews();
213
+ const selected = selectEditorWorkspacePreview(this.classifiedPreviews(), this.editorTargetId);
214
+ if (!selected) return void 0;
215
+ return live.find((preview) => String(preview.target.targetId) === String(selected.target.targetId));
216
+ }
217
+ boundTarget() {
218
+ return this.targetBinding === "play" ? this.engine?.play : this.previews().find((preview) => preview.target.targetId === this.previewTargetId) ?? this.editorPreview();
219
+ }
220
+ hydrateAsset(asset) {
221
+ if (!asset?.guid) return asset ?? null;
222
+ if (asset.kind) return asset;
223
+ const catalog = Array.isArray(this.assets) ? this.assets.find((entry) => entry.guid === asset.guid) : void 0;
224
+ if (!catalog?.kind) return asset;
225
+ return { ...asset, kind: catalog.kind, name: asset.name ?? catalog.name };
226
+ }
227
+ selectTarget({ targetId } = {}) {
228
+ if (targetId === this.engine?.play?.target.targetId) this.targetBinding = "play";
229
+ else {
230
+ const preview = this.previews().find((entry) => entry.target.targetId === targetId);
231
+ if (!preview) throw workspaceError("view-workspace-target-mismatch", "An existing preview or Play target", "Refresh tabs.get.");
232
+ this.targetBinding = "editor";
233
+ this.previewTargetId = targetId;
234
+ if (isEditorWorkspaceAsset(this.hydrateAsset(preview.asset))) this.editorTargetId = String(targetId);
235
+ }
236
+ this.changed();
237
+ return this.snapshot();
238
+ }
239
+ syncBindings() {
240
+ if (this.playOwner !== this.engine?.play) {
241
+ this.playOwner = this.engine?.play;
242
+ this.targetBinding = this.playOwner ? "play" : "editor";
243
+ if (!this.playOwner) this.previewTargetId = this.editorPreview()?.target.targetId;
244
+ }
245
+ if (this.projectOwner !== this.engine?.project) {
246
+ this.projectOwner = this.engine?.project;
247
+ this.assets = null;
248
+ this.inspection = null;
249
+ this.openRequest = null;
250
+ this.openRequestSequence = 0;
251
+ this.resourceOpens = /* @__PURE__ */ new Map();
252
+ this.editorTargetId = void 0;
253
+ this.sceneSelection = null;
254
+ this.selectionAbort?.abort();
255
+ }
256
+ if (this.previewOwner !== this.boundTarget()) {
257
+ this.previewOwner = this.boundTarget();
258
+ this.sceneSelection = null;
259
+ this.selectionAbort?.abort();
260
+ this.previewProjection = this.previewOwner ? {
261
+ target: this.previewOwner.target,
262
+ asset: this.previewOwner.asset,
263
+ presentation: this.previewOwner.presentation
264
+ } : null;
265
+ }
266
+ }
267
+ snapshot() {
268
+ this.syncBindings();
269
+ const display = this.display?.();
270
+ return serializeWorkspaceState({
271
+ revision: this.revision,
272
+ selectedTabId: this.selectedTabId,
273
+ tabs: [
274
+ {
275
+ tabId: VIEW_DISPLAY_TAB_ID,
276
+ kind: "display",
277
+ selected: this.selectedTabId === VIEW_DISPLAY_TAB_ID,
278
+ state: display?.state,
279
+ run: display?.occupancy?.run,
280
+ target: display?.occupancy?.target,
281
+ targetId: display?.occupancy?.targetId
282
+ },
283
+ {
284
+ tabId: VIEW_WORKSPACE_TAB_ID,
285
+ kind: "workspace",
286
+ selected: this.selectedTabId === VIEW_WORKSPACE_TAB_ID,
287
+ state: this.previewProjection ? "previewing" : this.project ? "project-open" : "empty",
288
+ ...this.previewProjection?.target ?? this.projectTarget ? { target: this.previewProjection?.target ?? this.projectTarget } : {}
289
+ }
290
+ ],
291
+ project: this.project,
292
+ projectTarget: this.projectTarget,
293
+ assets: this.assets,
294
+ preview: this.previewProjection && { ...this.previewProjection, target: this.boundTarget().target, asset: this.hydrateAsset(this.previewProjection.asset) },
295
+ editorPreview: this.editorPreview() ? { target: this.editorPreview().target, asset: this.hydrateAsset(this.editorPreview().asset) } : null,
296
+ previews: this.previews().map((preview) => ({ target: preview.target, asset: this.hydrateAsset(preview.asset) })),
297
+ play: this.engine?.play ? { target: this.engine.play.target, phase: this.engine.play.phase } : null,
298
+ targetBinding: this.targetBinding,
299
+ inspection: this.inspection,
300
+ openRequest: this.openRequest,
301
+ resourceOpens: Object.fromEntries(this.resourceOpens),
302
+ sceneSelection: this.sceneSelection,
303
+ workspaceTargetLost: this.workspaceTargetLost
304
+ });
305
+ }
306
+ changed() {
307
+ const current = this.snapshot();
308
+ const fingerprint = workspaceUiFingerprint(current);
309
+ if (fingerprint === this.publishFingerprint) return;
310
+ this.revision += 1;
311
+ const state = this.snapshot();
312
+ this.publishFingerprint = workspaceUiFingerprint(state);
313
+ for (const listener of this.listeners) {
314
+ try {
315
+ listener(state);
316
+ } catch {
317
+ }
318
+ }
319
+ }
320
+ subscribe(listener) {
321
+ this.listeners.add(listener);
322
+ const state = this.snapshot();
323
+ this.publishFingerprint ||= workspaceUiFingerprint(state);
324
+ listener(state);
325
+ return () => this.listeners.delete(listener);
326
+ }
327
+ capabilities() {
328
+ const descriptions = this.toolApi?.list().filter((record) => record.callable && (record.owner.sourceId === ENGINE_SOURCE || record.descriptor.id.startsWith("view.display."))).map((record) => ({ id: record.descriptor.id.replace(/^(engine|view)\./, ""), path: record.descriptor.path, title: record.descriptor.title, summary: record.descriptor.summary, inputSchema: record.descriptor.inputSchema, outputSchema: record.descriptor.outputSchema })) ?? [];
329
+ const operations = [
330
+ ...Object.keys(UI_OPERATIONS),
331
+ ...descriptions.map((item) => item.id),
332
+ ...VIEW_WORKSPACE_OPERATIONS.filter((id) => id.startsWith("plugins.") && this.toolApi?.describe(id, "view-backend").some((record) => record.callable))
333
+ ].filter((id) => VIEW_WORKSPACE_OPERATIONS.includes(id));
334
+ return { ...workspaceCapabilities({ ready: !!this.engine && !this.disposing, headed: this.projectTarget?.headed === true, operations }), descriptions };
335
+ }
336
+ async authorizeRequest(request, caller) {
337
+ if (this.disposing) throw workspaceError("view-workspace-stopping", "View bindings to remain available", "Reconnect to the backend.");
338
+ if (request.token !== this.accessToken || this.authorize && !await this.authorize({ clientId: request.clientId, operation: request.operation, request, caller })) {
339
+ throw workspaceError("view-workspace-unauthorized", "an authorized workspace connection", "Connect with the issued token.", { clientId: request.clientId });
340
+ }
341
+ }
342
+ async call(rawRequest, { signal, caller } = {}) {
343
+ const request = assertWorkspaceRequest(rawRequest);
344
+ await this.authorizeRequest(request, caller);
345
+ const ui = UI_OPERATIONS[request.operation];
346
+ if (ui) return ui(this, request.args, { signal, caller, clientId: request.clientId });
347
+ if (request.operation === "project.reopen") {
348
+ return this.reopenProject(request.args, {
349
+ signal,
350
+ caller,
351
+ clientId: request.clientId,
352
+ token: request.token,
353
+ requestId: request.requestId
354
+ });
355
+ }
356
+ return this.invoke(request.operation, request.args, { signal, caller, clientId: request.clientId, token: request.token, requestId: request.requestId });
357
+ }
358
+ async invoke(operation, args = {}, { signal, caller, clientId = "view-owner", token, requestId } = {}) {
359
+ const { tabId, ...input } = args;
360
+ if (tabId !== void 0) this.assertWorkspaceTab(tabId);
361
+ const inspector = operation.startsWith("plugins.");
362
+ const presentation = operation.startsWith("display.");
363
+ const id = inspector ? operation : `${presentation ? "view" : "engine"}.${operation}`;
364
+ const sourceId = inspector || presentation ? "view-backend" : ENGINE_SOURCE;
365
+ const owner = this.toolApi?.describe(id, sourceId).find((record) => record.callable)?.owner;
366
+ if (!owner) throw workspaceError("view-workspace-operation-unavailable", `Engine operation ${operation} to be installed`, "Enable the Engine capability; UI plugins do not provide domain APIs.", { operation });
367
+ const requestedPreview = [...this.previews(), this.engine?.play].find((preview) => preview?.target.targetId === input.targetId);
368
+ const terminal = await this.toolApi.run(id, inspector ? {
369
+ apiVersion: "forgeax.view.inspector/1",
370
+ operation,
371
+ args: input,
372
+ ...input,
373
+ clientId,
374
+ token,
375
+ requestId
376
+ } : presentation ? input : { ...input, clientId }, { sourceId, providerId: owner.providerId, generation: owner.generation, caller, signal }).terminal;
377
+ if (terminal.outcome === "failed") {
378
+ const resolved = resolveWorkspaceFailure(terminal.failure);
379
+ const addressesWorkspace = input.targetId === void 0 || [this.projectTarget, this.editorPreview()?.target].some((target) => target && target.targetId === input.targetId && (input.targetGeneration === void 0 || target.generation === input.targetGeneration));
380
+ if (isWorkspaceTargetRecoveryCode(resolved.code) && addressesWorkspace) {
381
+ this.workspaceTargetLost = true;
382
+ }
383
+ this.changed();
384
+ throw workspaceError(resolved.code, resolved.expected, resolved.hint, resolved.detail);
385
+ }
386
+ const result = terminal.result;
387
+ if (Array.isArray(result?.assets)) this.assets = result.assets.map((asset) => serializeWorkspaceAsset({ ...asset, ...asset.ddc || !asset.cookReceiptUrl ? {} : { ddc: { receiptUrl: asset.cookReceiptUrl } } }));
388
+ if (result?.inspection) this.inspection = serializeWorkspaceInspection(result.inspection);
389
+ if (operation === "asset.open") this.bindOpenedAsset(result, input.guid);
390
+ if (operation === "preview.close" && input.targetId != null && String(input.targetId) === this.editorTargetId) {
391
+ this.editorTargetId = void 0;
392
+ }
393
+ this.syncBindings();
394
+ if (operation === "asset.open") this.recordOpenRequest({ requestId, result, guid: input.guid });
395
+ if ((operation.startsWith("camera.") || operation === "target.control") && this.previewProjection && this.boundTarget() === requestedPreview) {
396
+ this.previewProjection.camera = result?.camera;
397
+ this.previewProjection.cameraVersion = result?.version;
398
+ this.previewProjection.interaction = result?.interaction ?? null;
399
+ }
400
+ if (!["scene-tree.get", "entity.inspect", "workspace.get", "preview.capture"].includes(operation)) this.changed();
401
+ if (["project.open", "project.close", "project.reopen", "asset.open", "preview.close", "camera.abort", "play.start", "play.ready", "play.stop"].includes(operation)) {
402
+ if (operation === "project.open" || operation === "project.reopen") this.workspaceTargetLost = false;
403
+ return this.snapshot();
404
+ }
405
+ if (operation.startsWith("camera.")) return { ...cloneWorkspaceValue(result), apiVersion: VIEW_WORKSPACE_API_VERSION, target: requestedPreview?.target };
406
+ if (operation === "assets.list") return { ...cloneWorkspaceValue(result), assets: this.assets };
407
+ return cloneWorkspaceValue(result);
408
+ }
409
+ assertWorkspaceTab(tabId) {
410
+ requireWorkspaceString(tabId, "tabId");
411
+ if (tabId !== VIEW_WORKSPACE_TAB_ID) throw workspaceError("view-workspace-tab-read-only", "the Editor binding", "Address AI execution through the Engine run API.", { tabId });
412
+ }
413
+ selectTab({ tabId } = {}) {
414
+ if (![VIEW_DISPLAY_TAB_ID, VIEW_WORKSPACE_TAB_ID].includes(tabId)) throw workspaceError("view-workspace-tab-not-found", "an existing tab", "Refresh tabs.get.", { tabId });
415
+ this.selectedTabId = tabId;
416
+ this.changed();
417
+ return this.snapshot();
418
+ }
419
+ async selectSceneEntity(args = {}, context) {
420
+ requireWorkspaceString(args.entityId, "entityId");
421
+ return this.changeSceneSelection(args, context, () => args);
422
+ }
423
+ pickSceneEntity(args = {}, context) {
424
+ return this.changeSceneSelection(args, context, async (requestContext) => {
425
+ const result = await this.invoke("target.pick", args, requestContext);
426
+ if (result?.entityId === null) return null;
427
+ requireWorkspaceString(result?.entityId, "pick.entityId");
428
+ return { entityId: result.entityId };
429
+ });
430
+ }
431
+ clearSceneSelection(args = {}, context) {
432
+ return this.changeSceneSelection(args, context, () => null);
433
+ }
434
+ async changeSceneSelection({ tabId, targetId, targetGeneration } = {}, context, resolveSelection) {
435
+ if (tabId !== void 0) this.assertWorkspaceTab(tabId);
436
+ this.syncBindings();
437
+ const requested = this.boundTarget();
438
+ if (!requested || requested.target.targetId !== targetId || requested.target.generation !== targetGeneration) throw workspaceError("view-workspace-selection-stale", "The bound target and generation", "Select the target before changing its selection.");
439
+ this.selectionAbort?.abort();
440
+ const controller = new AbortController();
441
+ this.selectionAbort = controller;
442
+ const signal = context?.signal ? AbortSignal.any([context.signal, controller.signal]) : controller.signal;
443
+ const requestContext = { ...context, signal };
444
+ const assertCurrent = () => {
445
+ signal.throwIfAborted();
446
+ if (this.boundTarget() !== requested) throw workspaceError("view-workspace-selection-stale", "The same selected target", "Refresh the hierarchy.");
447
+ };
448
+ const selection = await resolveSelection(requestContext);
449
+ assertCurrent();
450
+ const { entityId, label } = selection ?? {};
451
+ if (selection) {
452
+ const result = await this.invoke("entity.inspect", { entityId, targetId, targetGeneration }, requestContext);
453
+ assertCurrent();
454
+ if (result?.entityId !== entityId) throw workspaceError(
455
+ "view-workspace-selection-stale",
456
+ "The inspected entity on the same target",
457
+ "Refresh the hierarchy before selecting."
458
+ );
459
+ }
460
+ await this.invoke("entity.highlight", { ...selection ? { entityId } : {}, targetId, targetGeneration }, requestContext);
461
+ assertCurrent();
462
+ this.sceneSelection = selection ? { primary: { entityId, ...label === void 0 ? {} : { label: String(label) } }, targetId, targetGeneration } : null;
463
+ this.changed();
464
+ return this.snapshot();
465
+ }
466
+ openProject(args, context) {
467
+ return this.invoke("project.open", args, context);
468
+ }
469
+ async reopenProject(args = {}, context) {
470
+ const root = resolveWorkspaceReopenRoot(this.snapshot(), args.root);
471
+ const { tabId, ...rest } = args;
472
+ return this.openProject({ ...rest, root, ...tabId === void 0 ? {} : { tabId } }, context);
473
+ }
474
+ closeProject(args, context) {
475
+ return this.invoke("project.close", args, context);
476
+ }
477
+ listAssets(args, context) {
478
+ return this.invoke("assets.list", args, context);
479
+ }
480
+ inspectAsset(args, context) {
481
+ return this.invoke("asset.inspect", args, context);
482
+ }
483
+ rebuildAssetSource(args, { mode = "rebuild", ...context } = {}) {
484
+ return this.invoke(`asset-source.${mode}`, args, context);
485
+ }
486
+ bindOpenedAsset(result, guid) {
487
+ this.targetBinding = "editor";
488
+ const kind = this.hydrateAsset(result?.preview?.asset)?.kind ?? this.hydrateAsset(result?.asset)?.kind ?? this.assets?.find((entry) => entry?.guid === guid)?.kind;
489
+ if (kind && !isTypePreviewAsset({ kind })) {
490
+ const targetId = result?.preview?.target?.targetId ?? result?.target?.targetId ?? this.previews().find((entry) => this.hydrateAsset(entry.asset)?.guid === guid)?.target?.targetId;
491
+ if (targetId != null) {
492
+ this.editorTargetId = String(targetId);
493
+ this.previewTargetId = this.editorTargetId;
494
+ }
495
+ return;
496
+ }
497
+ const editorId = this.editorPreview()?.target?.targetId;
498
+ if (editorId !== void 0) this.previewTargetId = editorId;
499
+ }
500
+ recordOpenRequest({ requestId, result, guid } = {}) {
501
+ const requested = typeof guid === "string" && guid.trim() !== "" ? guid : void 0;
502
+ const editor = this.editorPreview();
503
+ const editorIds = editorSceneTargetIds(
504
+ this.classifiedPreviews(),
505
+ editor ? { target: editor.target, asset: this.hydrateAsset(editor.asset) } : void 0
506
+ );
507
+ const extras = this.previews().filter(
508
+ (entry) => entry?.target?.targetId && !editorIds.has(String(entry.target.targetId))
509
+ );
510
+ const preview = [result?.preview, ...extras].find(
511
+ (entry) => entry?.target && !editorIds.has(String(entry.target.targetId)) && (!entry.asset || requested === void 0 || entry.asset.guid === requested)
512
+ );
513
+ const catalogAsset = requested && Array.isArray(this.assets) ? this.assets.find((entry) => entry?.guid === requested && entry?.kind) : void 0;
514
+ const asset = [
515
+ this.hydrateAsset(result?.preview?.asset),
516
+ this.hydrateAsset(result?.asset),
517
+ this.hydrateAsset(preview?.asset),
518
+ catalogAsset
519
+ ].find(
520
+ (candidate) => candidate?.guid && candidate?.kind && (requested === void 0 || candidate.guid === requested)
521
+ );
522
+ if (!asset?.guid || !asset?.kind) {
523
+ logResourceOpen("open-request-skipped", {
524
+ reason: "asset-kind-unavailable",
525
+ requested: requested ?? null,
526
+ resultPreview: summarizeResourceAsset(result?.preview?.asset),
527
+ resultAsset: summarizeResourceAsset(result?.asset),
528
+ extraPreview: summarizeResourceAsset(preview?.asset),
529
+ extraPreviewCount: extras.length,
530
+ catalog: summarizeResourceAsset(catalogAsset),
531
+ editorTargetId: this.editorTargetId ?? null
532
+ }, { level: "warn" });
533
+ return;
534
+ }
535
+ this.openRequestSequence += 1;
536
+ const inspection = result?.inspection?.guid === asset.guid ? result.inspection : this.inspection?.guid === asset.guid ? this.inspection : void 0;
537
+ const previewMatches = preview?.target && (!preview.asset || preview.asset.guid === asset.guid);
538
+ const recordedPreview = previewMatches ? { asset, target: preview.target } : void 0;
539
+ this.openRequest = serializeWorkspaceOpenRequest({
540
+ requestId: typeof requestId === "string" && requestId.trim() !== "" ? requestId : createWorkspaceId("open"),
541
+ sequence: this.openRequestSequence,
542
+ asset,
543
+ preview: recordedPreview,
544
+ ...inspection === void 0 ? {} : { inspection }
545
+ });
546
+ this.resourceOpens.set(asset.kind, {
547
+ asset,
548
+ preview: recordedPreview
549
+ });
550
+ logResourceOpen("open-request-recorded", {
551
+ requestId: this.openRequest.requestId,
552
+ sequence: this.openRequest.sequence,
553
+ asset: summarizeResourceAsset(this.openRequest.asset),
554
+ hasPreview: Boolean(this.openRequest.preview?.target),
555
+ previewTargetId: this.openRequest.preview?.target?.targetId ?? null
556
+ });
557
+ }
558
+ openAsset(args, context) {
559
+ return this.invoke("asset.open", args, context);
560
+ }
561
+ closePreview(args, context) {
562
+ return this.invoke("preview.close", args, context);
563
+ }
564
+ capture(args, context) {
565
+ return this.invoke("preview.capture", args, context);
566
+ }
567
+ resizePreview(args, context) {
568
+ return this.invoke("preview.resize", args, context);
569
+ }
570
+ getCamera(args, context) {
571
+ return this.invoke("camera.get", args, context);
572
+ }
573
+ beginCamera(args, context) {
574
+ return this.invoke("camera.begin", { ...args, interactionId: args.interactionId ?? randomUUID() }, context);
575
+ }
576
+ updateCamera(args, context) {
577
+ return this.invoke("camera.update", args, context);
578
+ }
579
+ commitCamera(args, context) {
580
+ return this.invoke("camera.commit", args, context);
581
+ }
582
+ abortCamera(args, context) {
583
+ return this.invoke("camera.abort", args, context);
584
+ }
585
+ getSceneTree(args, context) {
586
+ return this.invoke("scene-tree.get", args, context);
587
+ }
588
+ async revokeConnection(connectionId) {
589
+ if (typeof connectionId !== "string") return;
590
+ for (const preview of [this.engine?.preview, this.engine?.play]) {
591
+ if (!preview) continue;
592
+ try {
593
+ const result = await preview.revokeConnection?.({ targetId: preview.target.targetId, connectionId });
594
+ this.syncBindings();
595
+ if (this.previewOwner === preview && this.previewProjection && result) {
596
+ this.previewProjection.interaction = result.interaction ?? null;
597
+ this.previewProjection.cameraVersion = result.version;
598
+ }
599
+ } catch {
600
+ }
601
+ }
602
+ this.changed();
603
+ }
604
+ /**
605
+ * Reset per-page UI session state when a new View frontend page is admitted.
606
+ * The open project and its Engine session stay; everything the previous page
607
+ * accumulated after project.open returns to the just-opened state, so a
608
+ * refreshed page's first snapshot does not inherit the old page's history.
609
+ */
610
+ resetPageSession() {
611
+ if (this.disposing) return;
612
+ this.selectedTabId = VIEW_WORKSPACE_TAB_ID;
613
+ this.targetBinding = "editor";
614
+ this.previewTargetId = void 0;
615
+ this.inspection = null;
616
+ this.openRequest = null;
617
+ this.openRequestSequence = 0;
618
+ this.resourceOpens = /* @__PURE__ */ new Map();
619
+ this.sceneSelection = null;
620
+ this.selectionAbort?.abort();
621
+ this.selectionAbort = void 0;
622
+ this.previewOwner = void 0;
623
+ this.syncBindings();
624
+ this.changed();
625
+ const project = this.project;
626
+ if (project) {
627
+ void this.invoke("assets.list", { projectId: project.id }).catch(() => {
628
+ });
629
+ }
630
+ }
631
+ registerTransport(transport, { routeThroughTools = false } = {}) {
632
+ const capabilities = transport.register(VIEW_WORKSPACE_SERVICES.capabilities, () => this.capabilities());
633
+ const call = transport.register(VIEW_WORKSPACE_SERVICES.call, async ({ payload, signal, caller }) => {
634
+ try {
635
+ return routeThroughTools ? await runWorkspaceToolApi(this.toolApi, {
636
+ operation: `view.workspace.${payload.operation}`,
637
+ args: payload.args,
638
+ clientId: payload.clientId,
639
+ token: payload.token,
640
+ requestId: payload.requestId,
641
+ caller,
642
+ signal,
643
+ sourceId: "view-workspace"
644
+ }) : await this.call(payload, { signal, caller });
645
+ } catch (error) {
646
+ if (!error.code?.startsWith("view-")) throw error;
647
+ throw Object.assign(new Error(error.message), {
648
+ name: "HostAssemblyError",
649
+ code: "host-transport-failure",
650
+ expected: error.expected,
651
+ hint: error.hint,
652
+ detail: { ...error.detail, remoteCode: error.code }
653
+ });
654
+ }
655
+ });
656
+ const fileGet = transport.register(VIEW_FILE_GET_SERVICE, async ({ payload }) => {
657
+ try {
658
+ return await readWorkspaceFilePreview(this, payload);
659
+ } catch (error) {
660
+ if (!error.code?.startsWith("view-")) throw error;
661
+ throw Object.assign(new Error(error.message), {
662
+ name: "HostAssemblyError",
663
+ code: "host-transport-failure",
664
+ expected: error.expected,
665
+ hint: error.hint,
666
+ detail: { ...error.detail, remoteCode: error.code }
667
+ });
668
+ }
669
+ });
670
+ const subscription = this.subscribe((state) => transport.publish(VIEW_WORKSPACE_STATE_TOPIC, state));
671
+ const observer = transport.connect();
672
+ const engineSubscription = observer.subscribe("engine.workspace.state", () => this.changed());
673
+ return () => {
674
+ capabilities();
675
+ call();
676
+ fileGet();
677
+ subscription();
678
+ engineSubscription();
679
+ observer.close();
680
+ };
681
+ }
682
+ async dispose() {
683
+ this.selectionAbort?.abort();
684
+ this.disposing = true;
685
+ this.listeners.clear();
686
+ }
687
+ };
688
+
689
+ export {
690
+ ViewWorkspaceBroker
691
+ };
692
+ //# sourceMappingURL=chunk-C45U6IIY.mjs.map