@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,158 @@
1
+ import {
2
+ ViewResourceBroker
3
+ } from "./chunk-XUYFV23R.mjs";
4
+ import {
5
+ createDisplayApiTools,
6
+ runViewToolApi
7
+ } from "./chunk-JHOURMYW.mjs";
8
+ import {
9
+ BACKEND_MODULE,
10
+ BACKEND_PLUGIN_ID,
11
+ VIEW_STATUS_SERVICE,
12
+ VIEW_STATUS_TOPIC
13
+ } from "./chunk-KNBAYU5I.mjs";
14
+ import {
15
+ createViewCarrierAdapter
16
+ } from "./chunk-CUH2G6UF.mjs";
17
+
18
+ // packages/view-plugin-display/src/backend.mjs
19
+ import { registerTools } from "@forgeax/engine-plugin";
20
+ function bindPlatform(platform) {
21
+ return {
22
+ createPage: platform.createPage.bind(platform),
23
+ ...typeof platform.getCapabilities === "function" ? { getCapabilities: platform.getCapabilities.bind(platform) } : {},
24
+ ...typeof platform.dispose === "function" ? { dispose: platform.dispose.bind(platform) } : {}
25
+ };
26
+ }
27
+ var viewDisplayBackendPlugin = {
28
+ name: BACKEND_PLUGIN_ID,
29
+ inject: ["viewWorkspaceCore"],
30
+ provide: ["viewCapabilities", "viewStatus"],
31
+ async apply(ctx, config = {}) {
32
+ if (!config.platform) return installRunObserver(ctx);
33
+ const broker = new ViewResourceBroker({
34
+ platform: bindPlatform(config.platform),
35
+ capabilities: config.capabilities
36
+ });
37
+ const carrier = createViewCarrierAdapter({
38
+ broker,
39
+ attachTarget(target) {
40
+ const page = broker.getPage(target);
41
+ return {
42
+ page,
43
+ execution: broker.getExecution(target),
44
+ close: (reason = "engine-release") => broker.release(target, reason)
45
+ };
46
+ }
47
+ });
48
+ const status = () => broker.handshake();
49
+ const transport = ctx.get?.("hostTransport", false);
50
+ const unsubscribeStatus = broker.subscribe((snapshot) => {
51
+ transport?.publish?.(VIEW_STATUS_TOPIC, snapshot);
52
+ });
53
+ const toolApi = ctx.get?.("toolApi", false);
54
+ const workspace = ctx.get("viewWorkspaceCore");
55
+ const statusTools = toolApi ? createDisplayApiTools(broker, workspace) : void 0;
56
+ const statusProviderId = `view-display-status:${String(ctx.fiber.uid)}`;
57
+ let statusOwner;
58
+ if (toolApi && statusTools) {
59
+ ctx.effect(() => registerTools(ctx, statusTools, {
60
+ providerId: statusProviderId,
61
+ sourceId: "view-backend",
62
+ module: BACKEND_MODULE,
63
+ realm: "host"
64
+ }));
65
+ statusOwner = toolApi.describe(statusTools[0]?.descriptor.id, "view-backend")[0]?.owner;
66
+ }
67
+ const unregisterStatus = transport?.register?.(
68
+ VIEW_STATUS_SERVICE,
69
+ ({ payload, signal, caller }) => statusOwner === void 0 ? broker.handshake() : runViewToolApi(toolApi, {
70
+ operation: statusTools[0].descriptor.id,
71
+ args: payload ?? {},
72
+ signal,
73
+ caller,
74
+ providerId: statusOwner.providerId,
75
+ generation: statusOwner.generation
76
+ })
77
+ );
78
+ ctx.provide("viewBroker", broker);
79
+ ctx.provide("viewCarrier", carrier);
80
+ ctx.provide("viewCapabilities", broker.capabilities);
81
+ ctx.provide("viewStatus", status);
82
+ ctx.effect(() => async () => {
83
+ await broker.dispose();
84
+ unregisterStatus?.();
85
+ unsubscribeStatus();
86
+ });
87
+ }
88
+ };
89
+ var backend_default = viewDisplayBackendPlugin;
90
+ async function installRunObserver(ctx) {
91
+ const transport = ctx.get("hostTransport");
92
+ const api = ctx.get("toolApi");
93
+ let binding = null;
94
+ let snapshot = { status: "idle", binding, observation: null };
95
+ let disposed = false;
96
+ let timer;
97
+ let controller = new AbortController();
98
+ const refresh = async () => {
99
+ const selected = binding;
100
+ const signal = controller.signal;
101
+ if (disposed || !selected || signal.aborted) return;
102
+ try {
103
+ const owner = api.describe("engine.run.observe", "engine-workspace").find((record) => record.callable)?.owner;
104
+ if (!owner) throw new Error("Engine run observation is unavailable.");
105
+ else {
106
+ const terminal = await api.run("engine.run.observe", { root: selected.root }, {
107
+ sourceId: "engine-workspace",
108
+ providerId: owner.providerId,
109
+ generation: owner.generation,
110
+ signal
111
+ }).terminal;
112
+ if (disposed || signal.aborted || binding !== selected) return;
113
+ if (terminal.outcome === "failed") throw new Error(terminal.failure.hint);
114
+ const observation = terminal.result;
115
+ snapshot = observation.status?.runId === selected.runId ? { status: observation.status?.phase === "ready" ? "running" : observation.status?.phase ?? "idle", binding, observation } : { status: "unavailable", binding, observation: null, error: "The bound run is no longer active. Bind the new run explicitly." };
116
+ }
117
+ } catch (error) {
118
+ if (!signal.aborted && binding === selected) snapshot = { status: "unavailable", binding, observation: null, error: String(error) };
119
+ } finally {
120
+ if (!disposed && !signal.aborted && binding === selected) {
121
+ transport.publish(VIEW_STATUS_TOPIC, snapshot);
122
+ timer = setTimeout(refresh, 1e3);
123
+ timer.unref?.();
124
+ }
125
+ }
126
+ };
127
+ const status = () => snapshot;
128
+ const unregister = transport.register(VIEW_STATUS_SERVICE, status);
129
+ const tools = createDisplayApiTools({ handshake: status, bind({ root, runId }) {
130
+ controller.abort();
131
+ clearTimeout(timer);
132
+ controller = new AbortController();
133
+ binding = root === null ? null : { root: root.trim(), runId: runId.trim() };
134
+ snapshot = { status: binding ? "connecting" : "idle", binding, observation: null };
135
+ transport.publish(VIEW_STATUS_TOPIC, snapshot);
136
+ void refresh();
137
+ return snapshot;
138
+ } });
139
+ ctx.effect(() => registerTools(ctx, tools, {
140
+ providerId: `view-observer:${ctx.fiber.uid}`,
141
+ sourceId: "view-backend",
142
+ realm: "host",
143
+ module: BACKEND_MODULE
144
+ }));
145
+ ctx.provide("viewStatus", status);
146
+ ctx.provide("viewCapabilities", { ready: true, supportsPage: false });
147
+ ctx.effect(() => () => {
148
+ disposed = true;
149
+ controller.abort();
150
+ clearTimeout(timer);
151
+ unregister();
152
+ });
153
+ }
154
+
155
+ export {
156
+ backend_default
157
+ };
158
+ //# sourceMappingURL=chunk-L45W6KM6.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/view-plugin-display/src/backend.mjs"],
4
+ "sourcesContent": ["import { registerTools } from '@forgeax/engine-plugin';\nimport { ViewResourceBroker } from './page-broker.mjs';\nimport { createViewCarrierAdapter } from './carrier-adapter.mjs';\nimport { runViewToolApi } from './tool-runtime.mjs';\nimport {\n BACKEND_PLUGIN_ID,\n BACKEND_MODULE,\n VIEW_STATUS_SERVICE,\n VIEW_STATUS_TOPIC,\n} from './identity.mjs';\nimport { createDisplayApiTools } from './api.mjs';\n\nfunction bindPlatform(platform) {\n return {\n createPage: platform.createPage.bind(platform),\n ...(typeof platform.getCapabilities === 'function'\n ? { getCapabilities: platform.getCapabilities.bind(platform) }\n : {}),\n ...(typeof platform.dispose === 'function' ? { dispose: platform.dispose.bind(platform) } : {}),\n };\n}\n\nconst viewDisplayBackendPlugin = {\n name: BACKEND_PLUGIN_ID,\n inject: ['viewWorkspaceCore'],\n provide: ['viewCapabilities', 'viewStatus'],\n async apply(ctx, config = {}) {\n if (!config.platform) return installRunObserver(ctx);\n const broker = new ViewResourceBroker({\n platform: bindPlatform(config.platform),\n capabilities: config.capabilities,\n });\n const carrier = createViewCarrierAdapter({\n broker,\n attachTarget(target) {\n const page = broker.getPage(target);\n return {\n page,\n execution: broker.getExecution(target),\n close: (reason = 'engine-release') => broker.release(target, reason),\n };\n },\n });\n const status = () => broker.handshake();\n const transport = ctx.get?.('hostTransport', false);\n const unsubscribeStatus = broker.subscribe((snapshot) => {\n transport?.publish?.(VIEW_STATUS_TOPIC, snapshot);\n });\n const toolApi = ctx.get?.('toolApi', false);\n const workspace = ctx.get('viewWorkspaceCore');\n const statusTools = toolApi ? createDisplayApiTools(broker, workspace) : undefined;\n const statusProviderId = `view-display-status:${String(ctx.fiber.uid)}`;\n let statusOwner;\n if (toolApi && statusTools) {\n ctx.effect(() => registerTools(ctx, statusTools, {\n providerId: statusProviderId,\n sourceId: 'view-backend',\n module: BACKEND_MODULE,\n realm: 'host',\n }));\n statusOwner = toolApi.describe(statusTools[0]?.descriptor.id, 'view-backend')[0]?.owner;\n }\n const unregisterStatus = transport?.register?.(VIEW_STATUS_SERVICE, ({ payload, signal, caller }) =>\n statusOwner === undefined\n ? broker.handshake()\n : runViewToolApi(toolApi, {\n operation: statusTools[0].descriptor.id,\n args: payload ?? {},\n signal,\n caller,\n providerId: statusOwner.providerId,\n generation: statusOwner.generation,\n }),\n );\n ctx.provide('viewBroker', broker);\n ctx.provide('viewCarrier', carrier);\n ctx.provide('viewCapabilities', broker.capabilities);\n ctx.provide('viewStatus', status);\n ctx.effect(() => async () => {\n await broker.dispose();\n unregisterStatus?.();\n unsubscribeStatus();\n });\n },\n};\n\nexport default viewDisplayBackendPlugin;\n\n/** Observe cached Engine output; this plugin never owns or drives a run. */\nasync function installRunObserver(ctx) {\n const transport = ctx.get('hostTransport');\n const api = ctx.get('toolApi');\n let binding = null;\n let snapshot = { status: 'idle', binding, observation: null };\n let disposed = false;\n let timer;\n let controller = new AbortController();\n const refresh = async () => {\n const selected = binding;\n const signal = controller.signal;\n if (disposed || !selected || signal.aborted) return;\n try {\n const owner = api.describe('engine.run.observe', 'engine-workspace').find(record => record.callable)?.owner;\n if (!owner) throw new Error('Engine run observation is unavailable.');\n else {\n const terminal = await api.run('engine.run.observe', { root: selected.root }, {\n sourceId: 'engine-workspace', providerId: owner.providerId, generation: owner.generation, signal,\n }).terminal;\n if (disposed || signal.aborted || binding !== selected) return;\n if (terminal.outcome === 'failed') throw new Error(terminal.failure.hint);\n const observation = terminal.result;\n snapshot = observation.status?.runId === selected.runId\n ? { status: observation.status?.phase === 'ready' ? 'running' : observation.status?.phase ?? 'idle', binding, observation }\n : { status: 'unavailable', binding, observation: null, error: 'The bound run is no longer active. Bind the new run explicitly.' };\n }\n } catch (error) {\n if (!signal.aborted && binding === selected) snapshot = { status: 'unavailable', binding, observation: null, error: String(error) };\n } finally {\n if (!disposed && !signal.aborted && binding === selected) {\n transport.publish(VIEW_STATUS_TOPIC, snapshot);\n timer = setTimeout(refresh, 1000);\n timer.unref?.();\n }\n }\n };\n const status = () => snapshot;\n const unregister = transport.register(VIEW_STATUS_SERVICE, status);\n const tools = createDisplayApiTools({ handshake: status, bind({ root, runId }) {\n controller.abort();\n clearTimeout(timer);\n controller = new AbortController();\n binding = root === null ? null : { root: root.trim(), runId: runId.trim() };\n snapshot = { status: binding ? 'connecting' : 'idle', binding, observation: null };\n transport.publish(VIEW_STATUS_TOPIC, snapshot);\n void refresh();\n return snapshot;\n } });\n ctx.effect(() => registerTools(ctx, tools, {\n providerId: `view-observer:${ctx.fiber.uid}`, sourceId: 'view-backend', realm: 'host',\n module: BACKEND_MODULE,\n }));\n ctx.provide('viewStatus', status);\n ctx.provide('viewCapabilities', { ready: true, supportsPage: false });\n ctx.effect(() => () => {\n disposed = true;\n controller.abort();\n clearTimeout(timer);\n unregister();\n });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B,iBAAa,IAAI,gBAAgB;AACjC,cAAU,SAAS,OAAO,OAAO,EAAE,MAAM,KAAK,KAAK,GAAG,OAAO,MAAM,KAAK,EAAE;AAC1E,eAAW,EAAE,QAAQ,UAAU,eAAe,QAAQ,SAAS,aAAa,KAAK;AACjF,cAAU,QAAQ,mBAAmB,QAAQ;AAC7C,SAAK,QAAQ;AACb,WAAO;AAAA,EACT,EAAE,CAAC;AACH,MAAI,OAAO,MAAM,cAAc,KAAK,OAAO;AAAA,IACzC,YAAY,iBAAiB,IAAI,MAAM,GAAG;AAAA,IAAI,UAAU;AAAA,IAAgB,OAAO;AAAA,IAC/E,QAAQ;AAAA,EACV,CAAC,CAAC;AACF,MAAI,QAAQ,cAAc,MAAM;AAChC,MAAI,QAAQ,oBAAoB,EAAE,OAAO,MAAM,cAAc,MAAM,CAAC;AACpE,MAAI,OAAO,MAAM,MAAM;AACrB,eAAW;AACX,eAAW,MAAM;AACjB,iBAAa,KAAK;AAClB,eAAW;AAAA,EACb,CAAC;AACH;",
6
+ "names": []
7
+ }
@@ -0,0 +1,239 @@
1
+ import {
2
+ attachPreviewRenderResizeSync
3
+ } from "./chunk-ALT7XVMQ.mjs";
4
+ import {
5
+ keepSurfaceInContainer,
6
+ placeSurface,
7
+ watchUntilReady
8
+ } from "./chunk-C7R3YRA7.mjs";
9
+ import {
10
+ logResourceOpen
11
+ } from "./chunk-FKCQYDLX.mjs";
12
+
13
+ // packages/view-workspace-core/src/preview-surface.mjs
14
+ var OWNER_PLACEMENT = "owner";
15
+ var containerOwners = /* @__PURE__ */ new WeakMap();
16
+ function previewSurfaceError(code, expected, hint) {
17
+ return Object.freeze({
18
+ ok: false,
19
+ error: Object.freeze({ code, expected, hint })
20
+ });
21
+ }
22
+ function placementOf(presentation) {
23
+ return presentation?.surfacePlacement === OWNER_PLACEMENT ? OWNER_PLACEMENT : "shell";
24
+ }
25
+ function isCanvasNode(node) {
26
+ return node?.tagName?.toLowerCase?.() === "canvas";
27
+ }
28
+ function isPanelContainer(node) {
29
+ if (!node || typeof node !== "object" || isCanvasNode(node)) return false;
30
+ return typeof node.replaceChildren === "function" || typeof node.append === "function";
31
+ }
32
+ function surfaceCanvas(surface) {
33
+ if (isCanvasNode(surface)) return surface;
34
+ return typeof surface?.querySelector === "function" ? surface.querySelector("canvas") : null;
35
+ }
36
+ function isEditorOwnerSurface(surface, container, { target, editorTargetId } = {}) {
37
+ if (surface?.id === "app-shell" || surface?.id === "app") return true;
38
+ if (editorTargetId != null && target?.targetId != null && String(editorTargetId) === String(target.targetId)) {
39
+ return true;
40
+ }
41
+ const marker = surface?.dataset?.forgeaxViewSurface;
42
+ if (marker === "engine-canvas" || marker === "engine-target") return true;
43
+ if (typeof surface?.closest !== "function") return false;
44
+ const viewport = surface.closest('[data-forgeax-view-mount-host="viewport"]');
45
+ if (!viewport) return false;
46
+ if (container === viewport || container?.contains?.(viewport)) return false;
47
+ return true;
48
+ }
49
+ function adoptSurface(container, surface) {
50
+ placeSurface(container, surface, { replace: true });
51
+ }
52
+ function fillPresentationSurface(surface) {
53
+ if (!surface?.style) return;
54
+ Object.assign(surface.style, {
55
+ width: "100%",
56
+ height: "100%",
57
+ maxWidth: "100%",
58
+ maxHeight: "100%",
59
+ transform: "none",
60
+ position: "relative",
61
+ overflow: "hidden",
62
+ flex: "1 1 auto",
63
+ minWidth: "0",
64
+ minHeight: "0",
65
+ display: "block"
66
+ });
67
+ }
68
+ function dedicatedPreviewPresentation(presentation, owner) {
69
+ if (!presentation || typeof presentation !== "object") return void 0;
70
+ return {
71
+ get surfacePlacement() {
72
+ return presentation.surfacePlacement;
73
+ },
74
+ get owner() {
75
+ return owner ?? presentation.owner;
76
+ },
77
+ createSurface(input) {
78
+ return presentation.createSurface?.(input);
79
+ },
80
+ attach(input = {}) {
81
+ return presentation.attach?.({ ...input, owner });
82
+ },
83
+ detach(input) {
84
+ return presentation.detach?.(input);
85
+ }
86
+ };
87
+ }
88
+ function bindWorkspacePreviewSurface({
89
+ presentation,
90
+ target,
91
+ container,
92
+ canvas,
93
+ owner,
94
+ editorTargetId,
95
+ api
96
+ } = {}) {
97
+ if (canvas !== void 0 || isCanvasNode(container)) {
98
+ throw new TypeError("bindWorkspacePreviewSurface requires a panel-owned container, not a canvas");
99
+ }
100
+ if (!isPanelContainer(container)) {
101
+ throw new TypeError("bindWorkspacePreviewSurface requires a panel-owned container");
102
+ }
103
+ if (!target || typeof target.targetId !== "string" && typeof target.targetId !== "number") {
104
+ return previewSurfaceError(
105
+ "view-preview-target-unavailable",
106
+ "an Engine preview target identity",
107
+ "Open the asset through Engine asset.open before attaching a preview surface."
108
+ );
109
+ }
110
+ if (placementOf(presentation) === OWNER_PLACEMENT) {
111
+ return previewSurfaceError(
112
+ "view-preview-surface-unavailable",
113
+ "a shell-placed Engine preview surface dedicated to this panel",
114
+ "The Engine owner surface stays on the Editor viewport; asset preview cannot relocate that iframe."
115
+ );
116
+ }
117
+ if (!presentation || typeof presentation.createSurface !== "function") {
118
+ return previewSurfaceError(
119
+ "view-preview-surface-unavailable",
120
+ "an Engine presentation that can create a type-preview surface",
121
+ "The asset tab hosts a DOM container; Engine createSurface places the live canvas into it."
122
+ );
123
+ }
124
+ const surfaceOwner = owner ?? presentation.owner;
125
+ if (!surfaceOwner?.panelId || !surfaceOwner?.pageType) {
126
+ return previewSurfaceError(
127
+ "view-preview-owner-unavailable",
128
+ "a stable asset preview panel owner",
129
+ "Bind the preview through its PageType panel contribution."
130
+ );
131
+ }
132
+ const claimedBy = containerOwners.get(container);
133
+ if (claimedBy !== void 0 && claimedBy !== surfaceOwner) {
134
+ return previewSurfaceError(
135
+ "view-preview-canvas-owned",
136
+ "a container used by exactly one asset preview panel",
137
+ "Create a new container for this asset preview panel."
138
+ );
139
+ }
140
+ const missingSurface = () => previewSurfaceError(
141
+ "view-preview-surface-unavailable",
142
+ "an Engine type-preview surface for this target",
143
+ "Engine must expose a type-preview surface via createSurface; the tab does not create a canvas."
144
+ );
145
+ const refuseEditor = () => previewSurfaceError(
146
+ "view-preview-surface-unavailable",
147
+ "a shell-placed Engine preview surface dedicated to this panel",
148
+ "The Engine owner surface stays on the Editor viewport; asset preview cannot relocate that iframe."
149
+ );
150
+ const resolveSurface = () => {
151
+ const surface = presentation.createSurface({
152
+ target,
153
+ document: container.ownerDocument
154
+ });
155
+ return surface && typeof surface === "object" ? surface : null;
156
+ };
157
+ const installSurface = (surface) => {
158
+ containerOwners.set(container, surfaceOwner);
159
+ container.dataset.forgeaxPreviewPanel = surfaceOwner.panelId;
160
+ container.dataset.forgeaxPreviewPage = surfaceOwner.pageType;
161
+ container.dataset.forgeaxAssetPreview = String(target.targetId);
162
+ adoptSurface(container, surface);
163
+ fillPresentationSurface(surface);
164
+ const canvasNode = surfaceCanvas(surface);
165
+ fillPresentationSurface(canvasNode);
166
+ const resizeTarget = Number.isSafeInteger(target.generation) ? { targetId: String(target.targetId), generation: target.generation } : null;
167
+ const detachResize = resizeTarget && api ? attachPreviewRenderResizeSync({ api, surface: container, target: resizeTarget }) : () => {
168
+ };
169
+ if (canvasNode?.dataset) {
170
+ canvasNode.dataset.forgeaxAssetPreview = String(target.targetId);
171
+ canvasNode.dataset.forgeaxPreviewPanel = surfaceOwner.panelId;
172
+ canvasNode.dataset.forgeaxPreviewPage = surfaceOwner.pageType;
173
+ }
174
+ logResourceOpen("preview-surface-hosted", {
175
+ pageType: surfaceOwner.pageType,
176
+ panelId: surfaceOwner.panelId,
177
+ targetId: String(target.targetId),
178
+ surfaceTag: surface.tagName ?? null
179
+ });
180
+ const attachment = typeof presentation.attach === "function" ? Promise.resolve(presentation.attach({ target, element: surface, owner: surfaceOwner })) : Promise.resolve();
181
+ const stopKeep = keepSurfaceInContainer({
182
+ document: container.ownerDocument,
183
+ getContainer: () => container,
184
+ getSurface: () => surface,
185
+ replace: true
186
+ });
187
+ return {
188
+ ok: true,
189
+ dispose: async () => {
190
+ stopKeep();
191
+ detachResize();
192
+ if (surface.parentNode === container) {
193
+ if (typeof container.removeChild === "function") container.removeChild(surface);
194
+ else container.replaceChildren?.();
195
+ }
196
+ if (containerOwners.get(container) === surfaceOwner) containerOwners.delete(container);
197
+ delete container.dataset.forgeaxPreviewPanel;
198
+ delete container.dataset.forgeaxPreviewPage;
199
+ delete container.dataset.forgeaxAssetPreview;
200
+ const detach = await attachment;
201
+ await detach?.();
202
+ }
203
+ };
204
+ };
205
+ const first = resolveSurface();
206
+ if (first) {
207
+ if (isEditorOwnerSurface(first, container, { target, editorTargetId })) return refuseEditor();
208
+ return installSurface(first);
209
+ }
210
+ const document = container.ownerDocument;
211
+ const win = document?.defaultView ?? globalThis;
212
+ const Observer = document?.defaultView?.MutationObserver ?? globalThis.MutationObserver;
213
+ const canWatch = typeof Observer === "function" || typeof win.requestAnimationFrame === "function";
214
+ if (!canWatch) return missingSurface();
215
+ let hosted;
216
+ const stopWatch = watchUntilReady({
217
+ document,
218
+ probe: () => {
219
+ if (hosted) return true;
220
+ const surface = resolveSurface();
221
+ if (!surface || isEditorOwnerSurface(surface, container, { target, editorTargetId })) return false;
222
+ hosted = installSurface(surface);
223
+ return true;
224
+ }
225
+ });
226
+ return {
227
+ ok: true,
228
+ dispose: async () => {
229
+ stopWatch();
230
+ await hosted?.dispose?.();
231
+ }
232
+ };
233
+ }
234
+
235
+ export {
236
+ dedicatedPreviewPresentation,
237
+ bindWorkspacePreviewSurface
238
+ };
239
+ //# sourceMappingURL=chunk-LERMYZRC.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/view-workspace-core/src/preview-surface.mjs"],
4
+ "sourcesContent": ["import { keepSurfaceInContainer, placeSurface, watchUntilReady } from './adopt-surface.mjs';\nimport { logResourceOpen } from './resource-open.mjs';\nimport { attachPreviewRenderResizeSync } from './render-resize-sync.mjs';\n\nconst OWNER_PLACEMENT = 'owner';\nconst containerOwners = new WeakMap();\n\nfunction previewSurfaceError(code, expected, hint) {\n return Object.freeze({\n ok: false,\n error: Object.freeze({ code, expected, hint }),\n });\n}\n\nfunction placementOf(presentation) {\n return presentation?.surfacePlacement === OWNER_PLACEMENT ? OWNER_PLACEMENT : 'shell';\n}\n\nfunction isCanvasNode(node) {\n return node?.tagName?.toLowerCase?.() === 'canvas';\n}\n\nfunction isPanelContainer(node) {\n if (!node || typeof node !== 'object' || isCanvasNode(node)) return false;\n return typeof node.replaceChildren === 'function' || typeof node.append === 'function';\n}\n\nfunction surfaceCanvas(surface) {\n if (isCanvasNode(surface)) return surface;\n return typeof surface?.querySelector === 'function' ? surface.querySelector('canvas') : null;\n}\n\nfunction isEditorOwnerSurface(surface, container, { target, editorTargetId } = {}) {\n if (surface?.id === 'app-shell' || surface?.id === 'app') return true;\n if (\n editorTargetId != null &&\n target?.targetId != null &&\n String(editorTargetId) === String(target.targetId)\n ) {\n return true;\n }\n const marker = surface?.dataset?.forgeaxViewSurface;\n if (marker === 'engine-canvas' || marker === 'engine-target') return true;\n if (typeof surface?.closest !== 'function') return false;\n const viewport = surface.closest('[data-forgeax-view-mount-host=\"viewport\"]');\n if (!viewport) return false;\n if (container === viewport || container?.contains?.(viewport)) return false;\n return true;\n}\n\nfunction adoptSurface(container, surface) {\n placeSurface(container, surface, { replace: true });\n}\n\nfunction fillPresentationSurface(surface) {\n if (!surface?.style) return;\n Object.assign(surface.style, {\n width: '100%',\n height: '100%',\n maxWidth: '100%',\n maxHeight: '100%',\n transform: 'none',\n position: 'relative',\n overflow: 'hidden',\n flex: '1 1 auto',\n minWidth: '0',\n minHeight: '0',\n display: 'block',\n });\n}\n\n/**\n * Stamp a panel/page owner onto presentation. Asset pages only host the\n * Engine type-preview surface; they do not create a canvas.\n */\nexport function dedicatedPreviewPresentation(presentation, owner) {\n if (!presentation || typeof presentation !== 'object') return undefined;\n return {\n get surfacePlacement() {\n return presentation.surfacePlacement;\n },\n get owner() {\n return owner ?? presentation.owner;\n },\n createSurface(input) {\n return presentation.createSurface?.(input);\n },\n attach(input = {}) {\n return presentation.attach?.({ ...input, owner });\n },\n detach(input) {\n return presentation.detach?.(input);\n },\n };\n}\n\n/**\n * Place an Engine type-preview surface into the container owned by one asset\n * panel. The panel never creates a canvas; Engine `createSurface` returns the\n * live surface. Editor owner canvases are refused.\n *\n * @param {{\n * presentation?: object,\n * target?: { targetId?: string | number },\n * container?: HTMLElement,\n * owner?: { panelId?: string, pageType?: string },\n * editorTargetId?: string | number,\n * api?: { resizePreview?: (input: object) => Promise<unknown> },\n * }} [options]\n * @returns {{ ok: true, dispose?: () => unknown } | { ok: false, error: { code: string, expected: string, hint: string } }}\n */\nexport function bindWorkspacePreviewSurface({\n presentation,\n target,\n container,\n canvas,\n owner,\n editorTargetId,\n api,\n} = {}) {\n if (canvas !== undefined || isCanvasNode(container)) {\n throw new TypeError('bindWorkspacePreviewSurface requires a panel-owned container, not a canvas');\n }\n if (!isPanelContainer(container)) {\n throw new TypeError('bindWorkspacePreviewSurface requires a panel-owned container');\n }\n if (!target || (typeof target.targetId !== 'string' && typeof target.targetId !== 'number')) {\n return previewSurfaceError(\n 'view-preview-target-unavailable',\n 'an Engine preview target identity',\n 'Open the asset through Engine asset.open before attaching a preview surface.',\n );\n }\n if (placementOf(presentation) === OWNER_PLACEMENT) {\n return previewSurfaceError(\n 'view-preview-surface-unavailable',\n 'a shell-placed Engine preview surface dedicated to this panel',\n 'The Engine owner surface stays on the Editor viewport; asset preview cannot relocate that iframe.',\n );\n }\n if (!presentation || typeof presentation.createSurface !== 'function') {\n return previewSurfaceError(\n 'view-preview-surface-unavailable',\n 'an Engine presentation that can create a type-preview surface',\n 'The asset tab hosts a DOM container; Engine createSurface places the live canvas into it.',\n );\n }\n const surfaceOwner = owner ?? presentation.owner;\n if (!surfaceOwner?.panelId || !surfaceOwner?.pageType) {\n return previewSurfaceError(\n 'view-preview-owner-unavailable',\n 'a stable asset preview panel owner',\n 'Bind the preview through its PageType panel contribution.',\n );\n }\n const claimedBy = containerOwners.get(container);\n if (claimedBy !== undefined && claimedBy !== surfaceOwner) {\n return previewSurfaceError(\n 'view-preview-canvas-owned',\n 'a container used by exactly one asset preview panel',\n 'Create a new container for this asset preview panel.',\n );\n }\n\n const missingSurface = () => previewSurfaceError(\n 'view-preview-surface-unavailable',\n 'an Engine type-preview surface for this target',\n 'Engine must expose a type-preview surface via createSurface; the tab does not create a canvas.',\n );\n const refuseEditor = () => previewSurfaceError(\n 'view-preview-surface-unavailable',\n 'a shell-placed Engine preview surface dedicated to this panel',\n 'The Engine owner surface stays on the Editor viewport; asset preview cannot relocate that iframe.',\n );\n\n const resolveSurface = () => {\n const surface = presentation.createSurface({\n target,\n document: container.ownerDocument,\n });\n return surface && typeof surface === 'object' ? surface : null;\n };\n\n const installSurface = (surface) => {\n containerOwners.set(container, surfaceOwner);\n container.dataset.forgeaxPreviewPanel = surfaceOwner.panelId;\n container.dataset.forgeaxPreviewPage = surfaceOwner.pageType;\n container.dataset.forgeaxAssetPreview = String(target.targetId);\n adoptSurface(container, surface);\n fillPresentationSurface(surface);\n const canvasNode = surfaceCanvas(surface);\n fillPresentationSurface(canvasNode);\n const resizeTarget = Number.isSafeInteger(target.generation)\n ? { targetId: String(target.targetId), generation: target.generation }\n : null;\n const detachResize = resizeTarget && api\n ? attachPreviewRenderResizeSync({ api, surface: container, target: resizeTarget })\n : () => {};\n if (canvasNode?.dataset) {\n canvasNode.dataset.forgeaxAssetPreview = String(target.targetId);\n canvasNode.dataset.forgeaxPreviewPanel = surfaceOwner.panelId;\n canvasNode.dataset.forgeaxPreviewPage = surfaceOwner.pageType;\n }\n logResourceOpen('preview-surface-hosted', {\n pageType: surfaceOwner.pageType,\n panelId: surfaceOwner.panelId,\n targetId: String(target.targetId),\n surfaceTag: surface.tagName ?? null,\n });\n const attachment = typeof presentation.attach === 'function'\n ? Promise.resolve(presentation.attach({ target, element: surface, owner: surfaceOwner }))\n : Promise.resolve();\n const stopKeep = keepSurfaceInContainer({\n document: container.ownerDocument,\n getContainer: () => container,\n getSurface: () => surface,\n replace: true,\n });\n return {\n ok: true,\n dispose: async () => {\n stopKeep();\n detachResize();\n // React may bind this same Engine surface again before detach resolves.\n // Release this placement synchronously so old cleanup cannot remove it.\n if (surface.parentNode === container) {\n if (typeof container.removeChild === 'function') container.removeChild(surface);\n else container.replaceChildren?.();\n }\n if (containerOwners.get(container) === surfaceOwner) containerOwners.delete(container);\n delete container.dataset.forgeaxPreviewPanel;\n delete container.dataset.forgeaxPreviewPage;\n delete container.dataset.forgeaxAssetPreview;\n const detach = await attachment;\n await detach?.();\n },\n };\n };\n\n const first = resolveSurface();\n if (first) {\n if (isEditorOwnerSurface(first, container, { target, editorTargetId })) return refuseEditor();\n return installSurface(first);\n }\n\n const document = container.ownerDocument;\n const win = document?.defaultView ?? globalThis;\n const Observer = document?.defaultView?.MutationObserver ?? globalThis.MutationObserver;\n const canWatch = typeof Observer === 'function' || typeof win.requestAnimationFrame === 'function';\n if (!canWatch) return missingSurface();\n\n let hosted;\n const stopWatch = watchUntilReady({\n document,\n probe: () => {\n if (hosted) return true;\n const surface = resolveSurface();\n if (!surface || isEditorOwnerSurface(surface, container, { target, editorTargetId })) return false;\n hosted = installSurface(surface);\n return true;\n },\n });\n return {\n ok: true,\n dispose: async () => {\n stopWatch();\n await hosted?.dispose?.();\n },\n };\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;AAIA,IAAM,kBAAkB;AACxB,IAAM,kBAAkB,oBAAI,QAAQ;AAEpC,SAAS,oBAAoB,MAAM,UAAU,MAAM;AACjD,SAAO,OAAO,OAAO;AAAA,IACnB,IAAI;AAAA,IACJ,OAAO,OAAO,OAAO,EAAE,MAAM,UAAU,KAAK,CAAC;AAAA,EAC/C,CAAC;AACH;AAEA,SAAS,YAAY,cAAc;AACjC,SAAO,cAAc,qBAAqB,kBAAkB,kBAAkB;AAChF;AAEA,SAAS,aAAa,MAAM;AAC1B,SAAO,MAAM,SAAS,cAAc,MAAM;AAC5C;AAEA,SAAS,iBAAiB,MAAM;AAC9B,MAAI,CAAC,QAAQ,OAAO,SAAS,YAAY,aAAa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AO;AAAA,IACL,IAAI;AAAA,IACJ,SAAS,YAAY;AACnB,gBAAU;AACV,YAAM,QAAQ,UAAU;AAAA,IAC1B;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,91 @@
1
+ import {
2
+ createViewWorkspaceClient
3
+ } from "./chunk-VY3S5BWI.mjs";
4
+ import {
5
+ VIEW_FILE_GET_SERVICE,
6
+ VIEW_WORKSPACE_DOMAIN_OPERATIONS,
7
+ VIEW_WORKSPACE_SERVICES,
8
+ workspaceError
9
+ } from "./chunk-32GD5LL6.mjs";
10
+
11
+ // packages/view-workspace-core/src/extension-bridge.mjs
12
+ var VIEW_EXTENSION_ID = "@forgeax-extension/view";
13
+ var VIEW_EXTENSION_CAPABILITIES = Object.freeze({
14
+ read: "view.workspace.read",
15
+ author: "view.workspace.author",
16
+ inspect: "view.plugins.read"
17
+ });
18
+ var AUTHORING_OPERATIONS = /* @__PURE__ */ new Set(["asset-source.rebuild", "asset-source.cold-cook"]);
19
+ var WORKSPACE_OPERATIONS = new Set(VIEW_WORKSPACE_DOMAIN_OPERATIONS);
20
+ function requiredCapability(service, request) {
21
+ if (service === VIEW_WORKSPACE_SERVICES.call) {
22
+ if (!WORKSPACE_OPERATIONS.has(request?.operation)) {
23
+ throw workspaceError(
24
+ "view-extension-operation-unknown",
25
+ "operation to be declared by the View workspace contract",
26
+ "Refresh the View extension capability descriptor.",
27
+ { operation: request?.operation }
28
+ );
29
+ }
30
+ return AUTHORING_OPERATIONS.has(request.operation) ? VIEW_EXTENSION_CAPABILITIES.author : VIEW_EXTENSION_CAPABILITIES.read;
31
+ }
32
+ if (service === VIEW_WORKSPACE_SERVICES.capabilities) return VIEW_EXTENSION_CAPABILITIES.read;
33
+ if (service === VIEW_FILE_GET_SERVICE) return VIEW_EXTENSION_CAPABILITIES.read;
34
+ throw workspaceError(
35
+ "view-extension-service-unknown",
36
+ "service to be declared by the View extension contract",
37
+ "Use the typed View workspace client rather than a raw Host service name.",
38
+ { service }
39
+ );
40
+ }
41
+ function createViewExtensionTransport({
42
+ invoke,
43
+ extensionId = VIEW_EXTENSION_ID,
44
+ capabilities = []
45
+ } = {}) {
46
+ if (typeof invoke !== "function") {
47
+ throw new TypeError("View extension transport requires a host capability invoke function");
48
+ }
49
+ if (extensionId !== VIEW_EXTENSION_ID) {
50
+ throw new TypeError(`View extension transport only admits ${VIEW_EXTENSION_ID}`);
51
+ }
52
+ const granted = new Set(capabilities);
53
+ return Object.freeze({
54
+ request(service, request, options = {}) {
55
+ const capability = requiredCapability(service, request);
56
+ if (!granted.has(capability)) {
57
+ return Promise.reject(workspaceError(
58
+ "view-extension-capability-denied",
59
+ `the ${capability} capability to be granted`,
60
+ "Install or re-authorize the View extension with the required permission.",
61
+ { extensionId, capability, service, operation: request?.operation }
62
+ ));
63
+ }
64
+ const { signal, generation } = options;
65
+ return Promise.resolve(invoke({
66
+ extensionId,
67
+ capability,
68
+ service,
69
+ request,
70
+ ...signal === void 0 ? {} : { signal },
71
+ ...generation === void 0 ? {} : { generation }
72
+ }));
73
+ },
74
+ close() {
75
+ }
76
+ });
77
+ }
78
+ function createViewExtensionWorkspaceClient({ invoke, capabilities, clientId } = {}) {
79
+ return createViewWorkspaceClient({
80
+ transport: createViewExtensionTransport({ invoke, capabilities }),
81
+ clientId
82
+ });
83
+ }
84
+
85
+ export {
86
+ VIEW_EXTENSION_ID,
87
+ VIEW_EXTENSION_CAPABILITIES,
88
+ createViewExtensionTransport,
89
+ createViewExtensionWorkspaceClient
90
+ };
91
+ //# sourceMappingURL=chunk-LKJCXYSJ.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/view-workspace-core/src/extension-bridge.mjs"],
4
+ "sourcesContent": ["import { VIEW_FILE_GET_SERVICE, VIEW_WORKSPACE_SERVICES, VIEW_WORKSPACE_DOMAIN_OPERATIONS, workspaceError } from './contract.mjs';\nimport { createViewWorkspaceClient } from './client.mjs';\n\nexport const VIEW_EXTENSION_ID = '@forgeax-extension/view';\nexport const VIEW_EXTENSION_CAPABILITIES = Object.freeze({\n read: 'view.workspace.read',\n author: 'view.workspace.author',\n inspect: 'view.plugins.read',\n});\n\nconst AUTHORING_OPERATIONS = new Set(['asset-source.rebuild', 'asset-source.cold-cook']);\nconst WORKSPACE_OPERATIONS = new Set(VIEW_WORKSPACE_DOMAIN_OPERATIONS);\n\nfunction requiredCapability(service, request) {\n if (service === VIEW_WORKSPACE_SERVICES.call) {\n if (!WORKSPACE_OPERATIONS.has(request?.operation)) {\n throw workspaceError(\n 'view-extension-operation-unknown',\n 'operation to be declared by the View workspace contract',\n 'Refresh the View extension capability descriptor.',\n { operation: request?.operation },\n );\n }\n return AUTHORING_OPERATIONS.has(request.operation)\n ? VIEW_EXTENSION_CAPABILITIES.author\n : VIEW_EXTENSION_CAPABILITIES.read;\n }\n if (service === VIEW_WORKSPACE_SERVICES.capabilities) return VIEW_EXTENSION_CAPABILITIES.read;\n if (service === VIEW_FILE_GET_SERVICE) return VIEW_EXTENSION_CAPABILITIES.read;\n throw workspaceError(\n 'view-extension-service-unknown',\n 'service to be declared by the View extension contract',\n 'Use the typed View workspace client rather than a raw Host service name.',\n { service },\n );\n}\n\n/**\n * Browser-side adapter for an Editor-issued, session-bound View capability.\n * The host authenticates the iframe; this transport never receives or forwards\n * the resident Host endpoint or its bearer token.\n */\nexport function createViewExtensionTransport({\n invoke,\n extensionId = VIEW_EXTENSION_ID,\n capabilities = [],\n} = {}) {\n if (typeof invoke !== 'function') {\n throw new TypeError('View extension transport requires a host capability invoke function');\n }\n if (extensionId !== VIEW_EXTENSION_ID) {\n throw new TypeError(`View extension transport only admits ${VIEW_EXTENSION_ID}`);\n }\n const granted = new Set(capabilities);\n return Object.freeze({\n request(service, request, options = {}) {\n const capability = requiredCapability(service, request);\n if (!granted.has(capability)) {\n return Promise.reject(workspaceError(\n 'view-extension-capability-denied',\n `the ${capability} capability to be granted`,\n 'Install or re-authorize the View extension with the required permission.',\n { extensionId, capability, service, operation: request?.operation },\n ));\n }\n const { signal, generation } = options;\n return Promise.resolve(invoke({\n extensionId,\n capability,\n service,\n request,\n ...(signal === undefined ? {} : { signal }),\n ...(generation === undefined ? {} : { generation }),\n }));\n },\n close() {},\n });\n}\n\nexport function createViewExtensionWorkspaceClient({ invoke, capabilities, clientId } = {}) {\n return createViewWorkspaceClient({\n transport: createViewExtensionTransport({ invoke, capabilities }),\n clientId,\n });\n}\n"],
5
+ "mappings": ";;;;;;;;;;;AAGO,IAAM,oBAAoB;AAC1B,IAAM,8BAA8B,OAAO,OAAO;AAAA,EACvD,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,SAAS;AACX,CAAC;AAED,IAAM,uBAAuB,oBAAI,IAAI,CAAC,wBAAwB,wBAAwB,CAAC;AACvF,IAAM,uBAAuB,IAAI,IAAI,gCAAgC;AAErE,SAAS,mBAAmB,SAAS,SAAS;AAC5C,MAAI,YAAY,wBAAwB,MAAM;AAC5C,QAAI,CAAC,qBAAqB,IAAI,SAAS,SAAS,GAAG;AACjD,YAAM;AAAA,QACJ;AAAA,QACA;AAAA,QACA;AAAA,QACA,EAAE,WAAW,SAAS,UAAU;AAAA,MAClC;AAAA,IACF;AACA,WAAO,qBAAqB,IAAI,QAAQ,SAAS,IAC7C,4BAA4B,SAC5B,4BAA4B;AAAA,EAClC;AACA,MAAI,YAAY,wBAAwB,aAAc,QAAO,4BAA4B;AACzF,MAAI,YAAY,sBAAuB,QAAO,4BAA4B;AAC1E,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,EAAE,QAAQ;AAAA,EACZ;AACF;AAOO,SAAS,6BAA6B;AAAA,EAC3C;AAAA,EACA,cAAc;AAAA,EACd,eAAe,CAAC;AAClB,IAAI,CAAC,GAAG;AACN,MAAI,OAAO,WAAW,YAAY;AAChC,UAAM,IAAI,UAAU,qEAAqE;AAAA,EAC3F;AACA,MAAI,gBAAgB,mBAAmB;AACrC,UAAM,IAAI,UAAU,wCAAwC,iBAAiB,EAAE;AAAA,EACjF;AACA,QAAM,UAAU,IAAI,IAAI,YAAY;AACpC,SAAO,OAAO,OAAO;AAAA,IACnB,QAAQ,SAAS,SAAS,UAAU,CAAC,GAAG;AACtC,YAAM,aAAa,mBAAmB,SAAS,OAAO;AACtD,UAAI,CAAC,QAAQ,IAAI,UAAU,GAAG;AAC5B,eAAO,QAAQ,OAAO;AAAA,UACpB;AAAA,UACA,OAAO,UAAU;AAAA,UACjB;AAAA,UACA,EAAE,aAAa,YAAY,SAAS,WAAW,SAAS,UAAU;AAAA,QACpE,CAAC;AAAA,MACH;AACA,YAAM,EAAE,QAAQ,WAAW,IAAI;AAC/B,aAAO,QAAQ,QAAQ,OAAO;AAAA,QAC5B;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,GAAI,WAAW,SAAY,CAAC,IAAI,EAAE,OAAO;AAAA,QACzC,GAAI,eAAe,SAAY,CAAC,IAAI,EAAE,WAAW;AAAA,MACnD,CAAC,CAAC;AAAA,IACJ;AAAA,IACA,QAAQ;AAAA,IAAC;AAAA,EACX,CAAC;AACH;AAEO,SAAS,mCAAmC,EAAE,QAAQ,cAAc,SAAS,IAAI,CAAC,GAAG;AAC1F,SAAO,0BAA0B;AAAA,IAC/B,WAAW,6BAA6B,EAAE,QAAQ,aAAa,CAAC;AAAA,IAChE;AAAA,EACF,CAAC;AACH;",
6
+ "names": []
7
+ }
@@ -0,0 +1,25 @@
1
+ import {
2
+ FRONTEND_PLUGIN_ID,
3
+ identity_exports
4
+ } from "./chunk-EJGBVKFE.mjs";
5
+ import {
6
+ applyResourcePagePlugin
7
+ } from "./chunk-YYXQDUVT.mjs";
8
+
9
+ // packages/view-plugin-mesh/src/frontend.mjs
10
+ var VIEW_MESH_FRONTEND_PLUGIN_ID = FRONTEND_PLUGIN_ID;
11
+ var viewMeshFrontendPlugin = {
12
+ name: VIEW_MESH_FRONTEND_PLUGIN_ID,
13
+ inject: ["viewOperationClient"],
14
+ async apply(ctx, config = {}) {
15
+ await applyResourcePagePlugin(ctx, config, identity_exports);
16
+ }
17
+ };
18
+ var frontend_default = viewMeshFrontendPlugin;
19
+
20
+ export {
21
+ VIEW_MESH_FRONTEND_PLUGIN_ID,
22
+ viewMeshFrontendPlugin,
23
+ frontend_default
24
+ };
25
+ //# sourceMappingURL=chunk-MBS3EICT.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/view-plugin-mesh/src/frontend.mjs"],
4
+ "sourcesContent": ["import * as identity from './identity.mjs';\nimport { applyResourcePagePlugin } from '@forgeax/view-workspace-core/resource-page';\n\nexport const VIEW_MESH_FRONTEND_PLUGIN_ID = identity.FRONTEND_PLUGIN_ID;\n\nconst viewMeshFrontendPlugin = {\n name: VIEW_MESH_FRONTEND_PLUGIN_ID,\n inject: ['viewOperationClient'],\n async apply(ctx, config = {}) {\n await applyResourcePagePlugin(ctx, config, identity);\n },\n};\n\nexport { viewMeshFrontendPlugin };\nexport default viewMeshFrontendPlugin;\n"],
5
+ "mappings": ";;;;;;;;;AAGO,IAAM,+BAAwC;AAErD,IAAM,yBAAyB;AAAA,EAC7B,MAAM;AAAA,EACN,QAAQ,CAAC,qBAAqB;AAAA,EAC9B,MAAM,MAAM,KAAK,SAAS,CAAC,GAAG;AAC5B,UAAM,wBAAwB,KAAK,QAAQ,gBAAQ;AAAA,EACrD;AACF;AAGA,IAAO,mBAAQ;",
6
+ "names": []
7
+ }