@dxos/app-framework 0.8.4-main.9be5663bfe → 0.8.4-main.abd8ff62ef

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 (278) hide show
  1. package/dist/lib/browser/{capability-BBBBAPDI.mjs → capability-Q5XRXRD2.mjs} +10 -10
  2. package/dist/lib/browser/{capability-OP63CD5N.mjs → capability-V7LR4LQN.mjs} +11 -11
  3. package/dist/lib/browser/capability-V7LR4LQN.mjs.map +7 -0
  4. package/dist/lib/browser/{chunk-T3Y4AEKX.mjs → chunk-23D4SJUE.mjs} +3 -3
  5. package/dist/lib/browser/{chunk-T3Y4AEKX.mjs.map → chunk-23D4SJUE.mjs.map} +1 -1
  6. package/dist/lib/browser/{chunk-2CKCJ6PN.mjs → chunk-3JWJXGLK.mjs} +1 -1
  7. package/dist/lib/browser/{chunk-2CKCJ6PN.mjs.map → chunk-3JWJXGLK.mjs.map} +1 -1
  8. package/dist/lib/browser/{chunk-GX4TUNM6.mjs → chunk-3ZS2A3DN.mjs} +170 -226
  9. package/dist/lib/browser/chunk-3ZS2A3DN.mjs.map +7 -0
  10. package/dist/lib/browser/{chunk-I34GF4NG.mjs → chunk-45CHLTBV.mjs} +2 -2
  11. package/dist/lib/browser/chunk-5LAIGWLU.mjs +467 -0
  12. package/dist/lib/browser/chunk-5LAIGWLU.mjs.map +7 -0
  13. package/dist/lib/browser/{chunk-QSXYHXCE.mjs → chunk-66IXTIVK.mjs} +1 -1
  14. package/dist/lib/browser/{chunk-QSXYHXCE.mjs.map → chunk-66IXTIVK.mjs.map} +2 -2
  15. package/dist/lib/browser/{chunk-TGX63LTL.mjs → chunk-FJ4765WW.mjs} +1 -1
  16. package/dist/lib/browser/{chunk-TGX63LTL.mjs.map → chunk-FJ4765WW.mjs.map} +2 -2
  17. package/dist/lib/browser/chunk-G7SDBRKH.mjs +1 -0
  18. package/dist/lib/browser/chunk-JXCBZSBJ.mjs +372 -0
  19. package/dist/lib/browser/chunk-JXCBZSBJ.mjs.map +7 -0
  20. package/dist/lib/browser/chunk-MX5DKEJH.mjs +584 -0
  21. package/dist/lib/browser/chunk-MX5DKEJH.mjs.map +7 -0
  22. package/dist/lib/browser/{chunk-JKWMHZP6.mjs → chunk-WBHCSOBW.mjs} +2 -2
  23. package/dist/lib/browser/chunk-WBHCSOBW.mjs.map +7 -0
  24. package/dist/lib/browser/{chunk-FU4GAFUQ.mjs → chunk-Z55LVAGN.mjs} +80 -15
  25. package/dist/lib/browser/chunk-Z55LVAGN.mjs.map +7 -0
  26. package/dist/lib/browser/{chunk-F7FW2RK2.mjs → chunk-ZGJAZSNE.mjs} +7 -32
  27. package/dist/lib/browser/chunk-ZGJAZSNE.mjs.map +7 -0
  28. package/dist/lib/browser/cli/index.mjs +11 -27
  29. package/dist/lib/browser/cli/index.mjs.map +2 -2
  30. package/dist/lib/browser/common/activation-events.mjs +7 -7
  31. package/dist/lib/browser/common/capabilities.mjs +7 -7
  32. package/dist/lib/browser/core/activation-event.mjs +1 -1
  33. package/dist/lib/browser/core/capability.mjs +1 -1
  34. package/dist/lib/browser/core/plugin-manager.mjs +6 -4
  35. package/dist/lib/browser/core/plugin.mjs +10 -2
  36. package/dist/lib/browser/core/url-loader.mjs +13 -5
  37. package/dist/lib/browser/index.mjs +22 -18
  38. package/dist/lib/browser/index.mjs.map +3 -3
  39. package/dist/lib/browser/{invoker-capability-H5PPENOC.mjs → invoker-capability-LNX4CGIV.mjs} +12 -11
  40. package/dist/lib/browser/invoker-capability-LNX4CGIV.mjs.map +7 -0
  41. package/dist/lib/browser/meta.json +1 -1
  42. package/dist/lib/browser/testing/index.mjs +144 -27
  43. package/dist/lib/browser/testing/index.mjs.map +4 -4
  44. package/dist/lib/browser/testing/react.mjs +78 -0
  45. package/dist/lib/browser/testing/react.mjs.map +7 -0
  46. package/dist/lib/browser/ui/index.mjs +18 -14
  47. package/dist/lib/node-esm/{capability-AWBEMRYR.mjs → capability-EW5GJCI6.mjs} +10 -10
  48. package/dist/lib/node-esm/{capability-WFEG6CIZ.mjs → capability-YKBMMD53.mjs} +11 -11
  49. package/dist/lib/node-esm/capability-YKBMMD53.mjs.map +7 -0
  50. package/dist/lib/node-esm/{chunk-FKE4Z3D6.mjs → chunk-37Z53PXZ.mjs} +1 -1
  51. package/dist/lib/node-esm/{chunk-FKE4Z3D6.mjs.map → chunk-37Z53PXZ.mjs.map} +2 -2
  52. package/dist/lib/node-esm/{chunk-WZCSOX5Q.mjs → chunk-6XW6LET6.mjs} +2 -2
  53. package/dist/lib/node-esm/{chunk-URWHJQT2.mjs → chunk-D347W3KO.mjs} +7 -32
  54. package/dist/lib/node-esm/chunk-D347W3KO.mjs.map +7 -0
  55. package/dist/lib/node-esm/chunk-D5PO2WXX.mjs +373 -0
  56. package/dist/lib/node-esm/chunk-D5PO2WXX.mjs.map +7 -0
  57. package/dist/lib/node-esm/{chunk-ULUEXB7Q.mjs → chunk-HTBJU5FX.mjs} +80 -15
  58. package/dist/lib/node-esm/chunk-HTBJU5FX.mjs.map +7 -0
  59. package/dist/lib/node-esm/chunk-KM2F6GH6.mjs +468 -0
  60. package/dist/lib/node-esm/chunk-KM2F6GH6.mjs.map +7 -0
  61. package/dist/lib/node-esm/{chunk-EL3R25OQ.mjs → chunk-OZ7DZA5Z.mjs} +1 -1
  62. package/dist/lib/node-esm/{chunk-BCEOLX47.mjs → chunk-Q7XBFII4.mjs} +170 -226
  63. package/dist/lib/node-esm/chunk-Q7XBFII4.mjs.map +7 -0
  64. package/dist/lib/node-esm/{chunk-VKHGNEDB.mjs → chunk-SBS2YMPT.mjs} +3 -3
  65. package/dist/lib/node-esm/{chunk-VKHGNEDB.mjs.map → chunk-SBS2YMPT.mjs.map} +1 -1
  66. package/dist/lib/node-esm/{chunk-42KBWDE4.mjs → chunk-SDJ4B2LU.mjs} +1 -1
  67. package/dist/lib/node-esm/{chunk-42KBWDE4.mjs.map → chunk-SDJ4B2LU.mjs.map} +1 -1
  68. package/dist/lib/node-esm/{chunk-G3RTFSNG.mjs → chunk-WFSRZKBP.mjs} +2 -2
  69. package/dist/lib/node-esm/chunk-WFSRZKBP.mjs.map +7 -0
  70. package/dist/lib/node-esm/chunk-WKTLE7MG.mjs +585 -0
  71. package/dist/lib/node-esm/chunk-WKTLE7MG.mjs.map +7 -0
  72. package/dist/lib/node-esm/{chunk-ZZ7CKK6W.mjs → chunk-XOCUANHO.mjs} +1 -1
  73. package/dist/lib/node-esm/{chunk-ZZ7CKK6W.mjs.map → chunk-XOCUANHO.mjs.map} +2 -2
  74. package/dist/lib/node-esm/cli/index.mjs +11 -27
  75. package/dist/lib/node-esm/cli/index.mjs.map +2 -2
  76. package/dist/lib/node-esm/common/activation-events.mjs +7 -7
  77. package/dist/lib/node-esm/common/capabilities.mjs +7 -7
  78. package/dist/lib/node-esm/core/activation-event.mjs +1 -1
  79. package/dist/lib/node-esm/core/capability.mjs +1 -1
  80. package/dist/lib/node-esm/core/plugin-manager.mjs +6 -4
  81. package/dist/lib/node-esm/core/plugin.mjs +10 -2
  82. package/dist/lib/node-esm/core/url-loader.mjs +13 -5
  83. package/dist/lib/node-esm/index.mjs +22 -18
  84. package/dist/lib/node-esm/index.mjs.map +3 -3
  85. package/dist/lib/node-esm/{invoker-capability-S3ZA527J.mjs → invoker-capability-O4T5PHLA.mjs} +12 -11
  86. package/dist/lib/node-esm/invoker-capability-O4T5PHLA.mjs.map +7 -0
  87. package/dist/lib/node-esm/meta.json +1 -1
  88. package/dist/lib/node-esm/testing/index.mjs +144 -27
  89. package/dist/lib/node-esm/testing/index.mjs.map +4 -4
  90. package/dist/lib/node-esm/testing/react.mjs +79 -0
  91. package/dist/lib/node-esm/testing/react.mjs.map +7 -0
  92. package/dist/lib/node-esm/ui/index.mjs +18 -14
  93. package/dist/plugin/node-esm/index.mjs +480 -32
  94. package/dist/plugin/node-esm/index.mjs.map +4 -4
  95. package/dist/plugin/node-esm/meta.json +1 -1
  96. package/dist/types/src/common/capabilities.d.ts +2 -1
  97. package/dist/types/src/common/capabilities.d.ts.map +1 -1
  98. package/dist/types/src/common/operations.d.ts +1 -1
  99. package/dist/types/src/common/operations.d.ts.map +1 -1
  100. package/dist/types/src/core/activation-event.d.ts +4 -4
  101. package/dist/types/src/core/activation-event.d.ts.map +1 -1
  102. package/dist/types/src/core/capability-manager.d.ts.map +1 -1
  103. package/dist/types/src/core/capability.d.ts +2 -2
  104. package/dist/types/src/core/capability.d.ts.map +1 -1
  105. package/dist/types/src/core/index.d.ts +2 -0
  106. package/dist/types/src/core/index.d.ts.map +1 -1
  107. package/dist/types/src/core/plugin-asset-cache.d.ts +71 -0
  108. package/dist/types/src/core/plugin-asset-cache.d.ts.map +1 -0
  109. package/dist/types/src/core/plugin-manager.d.ts +51 -2
  110. package/dist/types/src/core/plugin-manager.d.ts.map +1 -1
  111. package/dist/types/src/core/plugin-manifest.d.ts +76 -0
  112. package/dist/types/src/core/plugin-manifest.d.ts.map +1 -0
  113. package/dist/types/src/core/plugin-manifest.test.d.ts +2 -0
  114. package/dist/types/src/core/plugin-manifest.test.d.ts.map +1 -0
  115. package/dist/types/src/core/plugin.d.ts +107 -6
  116. package/dist/types/src/core/plugin.d.ts.map +1 -1
  117. package/dist/types/src/core/url-loader.d.ts +90 -3
  118. package/dist/types/src/core/url-loader.d.ts.map +1 -1
  119. package/dist/types/src/helpers.d.ts.map +1 -1
  120. package/dist/types/src/plugin-operation/history/capability.d.ts.map +1 -1
  121. package/dist/types/src/plugin-operation/history/errors.d.ts +6 -6
  122. package/dist/types/src/plugin-operation/history/errors.d.ts.map +1 -1
  123. package/dist/types/src/plugin-operation/history/history-tracker.d.ts +1 -1
  124. package/dist/types/src/plugin-operation/history/history-tracker.d.ts.map +1 -1
  125. package/dist/types/src/plugin-operation/history/types.d.ts +1 -1
  126. package/dist/types/src/plugin-operation/history/types.d.ts.map +1 -1
  127. package/dist/types/src/plugin-operation/history/undo-mapping.d.ts +1 -1
  128. package/dist/types/src/plugin-operation/history/undo-mapping.d.ts.map +1 -1
  129. package/dist/types/src/plugin-operation/history/undo-registry.d.ts +1 -1
  130. package/dist/types/src/plugin-operation/history/undo-registry.d.ts.map +1 -1
  131. package/dist/types/src/plugin-operation/invoker-capability.d.ts +1 -1
  132. package/dist/types/src/plugin-operation/invoker-capability.d.ts.map +1 -1
  133. package/dist/types/src/plugin-operation/testing.d.ts +2 -1
  134. package/dist/types/src/plugin-operation/testing.d.ts.map +1 -1
  135. package/dist/types/src/plugin-runtime/capability.d.ts +1 -1
  136. package/dist/types/src/plugin-runtime/capability.d.ts.map +1 -1
  137. package/dist/types/src/testing/harness.d.ts +67 -0
  138. package/dist/types/src/testing/harness.d.ts.map +1 -0
  139. package/dist/types/src/testing/index.d.ts +1 -0
  140. package/dist/types/src/testing/index.d.ts.map +1 -1
  141. package/dist/types/src/testing/react.d.ts +27 -0
  142. package/dist/types/src/testing/react.d.ts.map +1 -0
  143. package/dist/types/src/testing/react.test.d.ts +2 -0
  144. package/dist/types/src/testing/react.test.d.ts.map +1 -0
  145. package/dist/types/src/testing/service.d.ts.map +1 -1
  146. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
  147. package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
  148. package/dist/types/src/ui/components/App/App.d.ts.map +1 -1
  149. package/dist/types/src/ui/components/App/App.stories.d.ts.map +1 -1
  150. package/dist/types/src/ui/components/Placeholder/Placeholder.d.ts +64 -0
  151. package/dist/types/src/ui/components/Placeholder/Placeholder.d.ts.map +1 -0
  152. package/dist/types/src/ui/components/Placeholder/Placeholder.stories.d.ts +19 -0
  153. package/dist/types/src/ui/components/Placeholder/Placeholder.stories.d.ts.map +1 -0
  154. package/dist/types/src/ui/components/Placeholder/index.d.ts +2 -0
  155. package/dist/types/src/ui/components/Placeholder/index.d.ts.map +1 -0
  156. package/dist/types/src/ui/components/PluginManager/PluginManagerContext.stories.d.ts.map +1 -1
  157. package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts +16 -4
  158. package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts.map +1 -1
  159. package/dist/types/src/ui/components/Surface/SurfaceComponent.stories.d.ts.map +1 -1
  160. package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts.map +1 -1
  161. package/dist/types/src/ui/components/Surface/index.d.ts +16 -6
  162. package/dist/types/src/ui/components/Surface/index.d.ts.map +1 -1
  163. package/dist/types/src/ui/components/Surface/types.d.ts +110 -9
  164. package/dist/types/src/ui/components/Surface/types.d.ts.map +1 -1
  165. package/dist/types/src/ui/components/Surface/types.test.d.ts +2 -0
  166. package/dist/types/src/ui/components/Surface/types.test.d.ts.map +1 -0
  167. package/dist/types/src/ui/components/index.d.ts +1 -0
  168. package/dist/types/src/ui/components/index.d.ts.map +1 -1
  169. package/dist/types/src/ui/hooks/useApp.d.ts +29 -3
  170. package/dist/types/src/ui/hooks/useApp.d.ts.map +1 -1
  171. package/dist/types/src/ui/hooks/useCapabilities.d.ts.map +1 -1
  172. package/dist/types/src/ui/hooks/useLoading.d.ts.map +1 -1
  173. package/dist/types/src/ui/hooks/useSettingsState.d.ts.map +1 -1
  174. package/dist/types/src/vite-plugin/boot-loader/BootLoader.stories.d.ts +34 -0
  175. package/dist/types/src/vite-plugin/boot-loader/BootLoader.stories.d.ts.map +1 -0
  176. package/dist/types/src/vite-plugin/boot-loader/index.d.ts +52 -0
  177. package/dist/types/src/vite-plugin/boot-loader/index.d.ts.map +1 -0
  178. package/dist/types/src/vite-plugin/composer/index.d.ts +34 -0
  179. package/dist/types/src/vite-plugin/composer/index.d.ts.map +1 -0
  180. package/dist/types/src/vite-plugin/import-map/index.d.ts +28 -0
  181. package/dist/types/src/vite-plugin/import-map/index.d.ts.map +1 -0
  182. package/dist/types/src/vite-plugin/index.d.ts +4 -2
  183. package/dist/types/src/vite-plugin/index.d.ts.map +1 -1
  184. package/dist/types/src/vite-plugin/manifest.d.ts +37 -0
  185. package/dist/types/src/vite-plugin/manifest.d.ts.map +1 -0
  186. package/dist/types/src/vite-plugin/manifest.test.d.ts +2 -0
  187. package/dist/types/src/vite-plugin/manifest.test.d.ts.map +1 -0
  188. package/dist/types/src/vite-plugin/packages.d.ts +10 -4
  189. package/dist/types/src/vite-plugin/packages.d.ts.map +1 -1
  190. package/dist/types/tsconfig.tsbuildinfo +1 -1
  191. package/moon.yml +1 -0
  192. package/package.json +33 -59
  193. package/src/common/capabilities.ts +2 -1
  194. package/src/common/operations.ts +1 -1
  195. package/src/core/capability.ts +1 -1
  196. package/src/core/index.ts +2 -0
  197. package/src/core/plugin-asset-cache.ts +60 -0
  198. package/src/core/plugin-manager.test.ts +246 -5
  199. package/src/core/plugin-manager.ts +167 -25
  200. package/src/core/plugin-manifest.test.ts +48 -0
  201. package/src/core/plugin-manifest.ts +102 -0
  202. package/src/core/plugin.ts +135 -10
  203. package/src/core/url-loader.test.ts +104 -5
  204. package/src/core/url-loader.ts +226 -37
  205. package/src/plugin-operation/OperationPlugin.ts +2 -2
  206. package/src/plugin-operation/history/capability.ts +1 -1
  207. package/src/plugin-operation/history/history-tracker.test.ts +2 -1
  208. package/src/plugin-operation/history/history-tracker.ts +1 -1
  209. package/src/plugin-operation/history/types.ts +1 -1
  210. package/src/plugin-operation/history/undo-mapping.ts +1 -1
  211. package/src/plugin-operation/history/undo-registry.ts +1 -1
  212. package/src/plugin-operation/invoker-capability.ts +2 -1
  213. package/src/plugin-operation/testing.ts +2 -1
  214. package/src/plugin-runtime/RuntimePlugin.ts +2 -2
  215. package/src/testing/harness.ts +229 -0
  216. package/src/testing/index.ts +1 -0
  217. package/src/testing/react.test.tsx +48 -0
  218. package/src/testing/react.tsx +113 -0
  219. package/src/testing/withPluginManager.stories.tsx +1 -1
  220. package/src/ui/components/App/App.stories.tsx +1 -1
  221. package/src/ui/components/App/App.tsx +25 -2
  222. package/src/ui/components/Placeholder/Placeholder.stories.tsx +77 -0
  223. package/src/ui/components/Placeholder/Placeholder.tsx +155 -0
  224. package/src/ui/components/Placeholder/index.ts +5 -0
  225. package/src/ui/components/PluginManager/PluginManagerContext.stories.tsx +4 -2
  226. package/src/ui/components/Surface/SurfaceComponent.stories.tsx +1 -1
  227. package/src/ui/components/Surface/SurfaceComponent.tsx +83 -46
  228. package/src/ui/components/Surface/index.ts +20 -1
  229. package/src/ui/components/Surface/types.test.ts +126 -0
  230. package/src/ui/components/Surface/types.ts +164 -12
  231. package/src/ui/components/index.ts +1 -0
  232. package/src/ui/hooks/useApp.tsx +165 -41
  233. package/src/ui/hooks/useLoading.tsx +14 -6
  234. package/src/vite-plugin/boot-loader/BootLoader.stories.tsx +263 -0
  235. package/src/vite-plugin/boot-loader/boot-loader.css +294 -0
  236. package/src/vite-plugin/boot-loader/boot-loader.js +274 -0
  237. package/src/vite-plugin/boot-loader/index.ts +112 -0
  238. package/src/vite-plugin/composer/index.ts +277 -0
  239. package/src/vite-plugin/import-map/index.ts +524 -0
  240. package/src/vite-plugin/index.ts +6 -2
  241. package/src/vite-plugin/manifest.test.ts +24 -0
  242. package/src/vite-plugin/manifest.ts +50 -0
  243. package/src/vite-plugin/packages.ts +169 -10
  244. package/tsconfig.json +9 -0
  245. package/.swc/plugins/linux_x86_64_19.0.0/727453fb3a62f7f1d952a41e051ca8a6f88cadc45cee43c6a4d1aa45f9b75665.wasmer-v7 +0 -0
  246. package/dist/lib/browser/capability-OP63CD5N.mjs.map +0 -7
  247. package/dist/lib/browser/chunk-F7FW2RK2.mjs.map +0 -7
  248. package/dist/lib/browser/chunk-FU4GAFUQ.mjs.map +0 -7
  249. package/dist/lib/browser/chunk-GX4TUNM6.mjs.map +0 -7
  250. package/dist/lib/browser/chunk-JKWMHZP6.mjs.map +0 -7
  251. package/dist/lib/browser/chunk-LVJW5EFU.mjs +0 -157
  252. package/dist/lib/browser/chunk-LVJW5EFU.mjs.map +0 -7
  253. package/dist/lib/browser/chunk-RFSO3JRG.mjs +0 -1
  254. package/dist/lib/browser/chunk-WPE6AL7I.mjs +0 -905
  255. package/dist/lib/browser/chunk-WPE6AL7I.mjs.map +0 -7
  256. package/dist/lib/browser/invoker-capability-H5PPENOC.mjs.map +0 -7
  257. package/dist/lib/node-esm/capability-WFEG6CIZ.mjs.map +0 -7
  258. package/dist/lib/node-esm/chunk-4A3ZCMI3.mjs +0 -158
  259. package/dist/lib/node-esm/chunk-4A3ZCMI3.mjs.map +0 -7
  260. package/dist/lib/node-esm/chunk-BCEOLX47.mjs.map +0 -7
  261. package/dist/lib/node-esm/chunk-G3RTFSNG.mjs.map +0 -7
  262. package/dist/lib/node-esm/chunk-LQKOTNJW.mjs +0 -906
  263. package/dist/lib/node-esm/chunk-LQKOTNJW.mjs.map +0 -7
  264. package/dist/lib/node-esm/chunk-ULUEXB7Q.mjs.map +0 -7
  265. package/dist/lib/node-esm/chunk-URWHJQT2.mjs.map +0 -7
  266. package/dist/lib/node-esm/invoker-capability-S3ZA527J.mjs.map +0 -7
  267. package/dist/types/src/vite-plugin/composer-plugin.d.ts +0 -18
  268. package/dist/types/src/vite-plugin/composer-plugin.d.ts.map +0 -1
  269. package/dist/types/src/vite-plugin/import-map-plugin.d.ts +0 -16
  270. package/dist/types/src/vite-plugin/import-map-plugin.d.ts.map +0 -1
  271. package/src/vite-plugin/composer-plugin.ts +0 -128
  272. package/src/vite-plugin/import-map-plugin.ts +0 -314
  273. /package/dist/lib/browser/{capability-BBBBAPDI.mjs.map → capability-Q5XRXRD2.mjs.map} +0 -0
  274. /package/dist/lib/browser/{chunk-I34GF4NG.mjs.map → chunk-45CHLTBV.mjs.map} +0 -0
  275. /package/dist/lib/browser/{chunk-RFSO3JRG.mjs.map → chunk-G7SDBRKH.mjs.map} +0 -0
  276. /package/dist/lib/node-esm/{capability-AWBEMRYR.mjs.map → capability-EW5GJCI6.mjs.map} +0 -0
  277. /package/dist/lib/node-esm/{chunk-WZCSOX5Q.mjs.map → chunk-6XW6LET6.mjs.map} +0 -0
  278. /package/dist/lib/node-esm/{chunk-EL3R25OQ.mjs.map → chunk-OZ7DZA5Z.mjs.map} +0 -0
@@ -8,8 +8,33 @@ export type StartupProgress = {
8
8
  total: number;
9
9
  /** Fractional progress (0-1). */
10
10
  progress: number;
11
- /** Human-readable label for the currently activating module. */
12
- status?: string;
11
+ /**
12
+ * Raw activation event key (e.g. `org.dxos.app-framework.event.startup`).
13
+ * Set on event-level transitions, *and* on module-level transitions where
14
+ * it carries the parent activation event that first triggered the
15
+ * module's load (plumbed through `_loadCapabilitiesForModules` →
16
+ * `_loadModule`). Consumers can use this either as the primary id (when
17
+ * {@link module} is absent) or as an extra "context" field alongside
18
+ * {@link module}.
19
+ */
20
+ event?: string;
21
+ /**
22
+ * Raw module id (e.g. `org.dxos.plugin.observability.module.ReactSurface`)
23
+ * when the in-flight activation is module-level. When present,
24
+ * {@link event} may also be set, identifying the parent activation that
25
+ * triggered this module's load.
26
+ */
27
+ module?: string;
28
+ /**
29
+ * Pre-humanized label for the currently surfaced transition (module
30
+ * label if {@link module} is set, otherwise the event label), supplied
31
+ * for consumers that want a sensible default. Hosts that prefer to
32
+ * render their own label can read the raw {@link event}/{@link module}
33
+ * fields and ignore this — the framework leaves the policy choice
34
+ * (which transitions to surface, how to format them, whether to drop
35
+ * sub-modules entirely) to the host's `Placeholder`.
36
+ */
37
+ humanizedName?: string;
13
38
  };
14
39
  export type PlaceholderProps = {
15
40
  stage?: number;
@@ -18,6 +43,7 @@ export type PlaceholderProps = {
18
43
  export type UseAppOptions = {
19
44
  pluginManager?: PluginManager.PluginManager;
20
45
  pluginLoader?: PluginManager.ManagerOptions['pluginLoader'];
46
+ onPluginRemove?: PluginManager.ManagerOptions['onRemove'];
21
47
  plugins?: Plugin.Plugin[];
22
48
  core?: string[];
23
49
  defaults?: string[];
@@ -58,5 +84,5 @@ export type UseAppOptions = {
58
84
  * @param params.fallback Fallback component to render if an error occurs during startup.
59
85
  * @param params.placeholder Placeholder component to render during startup.
60
86
  */
61
- export declare const useApp: ({ pluginManager, pluginLoader: pluginLoaderProp, plugins: pluginsProp, core: coreProp, defaults: defaultsProp, setupEvents: setupEventsProp, placeholder, fallback, cacheEnabled, safeMode, debounce, timeout, }: UseAppOptions) => () => React.JSX.Element;
87
+ export declare const useApp: ({ pluginManager, pluginLoader: pluginLoaderProp, onPluginRemove, plugins: pluginsProp, core: coreProp, defaults: defaultsProp, setupEvents: setupEventsProp, placeholder, fallback, cacheEnabled, safeMode, debounce, timeout, }: UseAppOptions) => () => React.JSX.Element;
62
88
  //# sourceMappingURL=useApp.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useApp.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useApp.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAqD,MAAM,OAAO,CAAC;AAK1F,OAAO,EAAgC,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAM9F,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,MAAM,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAK9E,MAAM,MAAM,eAAe,GAAG;IAC5B,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,aAAa,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC;IAC5C,YAAY,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB;;;OA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AC,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,CAWrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,QAAO,YAAY,CAAC,gBAAgE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useLoading.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useLoading.tsx"],"names":[],"mappings":"AAMA,oBAAY,YAAY;IACtB,OAAO,IAAI;IACX,MAAM,IAAI;IACV,OAAO,IAAI;IACX,IAAI,IAAI;CACT;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,OAAO,EAAE,iBAAY,iBA4CtD,CAAC"}
1
+ {"version":3,"file":"useLoading.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useLoading.tsx"],"names":[],"mappings":"AAMA,oBAAY,YAAY;IACtB,OAAO,IAAI;IACX,MAAM,IAAI;IACV,OAAO,IAAI;IACX,IAAI,IAAI;CACT;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,UAAW,OAAO,oCAoDxC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useSettingsState.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useSettingsState.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAiC,MAAM,yBAAyB,CAAC;AAGnF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,EAChC,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,KACrB;IAAE,QAAQ,EAAE,CAAC,CAAC;IAAC,cAAc,EAAE,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,CAAA;CAYhE,CAAC"}
1
+ {"version":3,"file":"useSettingsState.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useSettingsState.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAiC,MAAM,yBAAyB,CAAC;AAGnF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,QAC1B,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,KACrB;IAAE,QAAQ,EAAE,CAAC,CAAC;IAAC,cAAc,EAAE,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,CAAA;CAYhE,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
2
+ import React from 'react';
3
+ /**
4
+ * Storybook host that runs the **real** inline driver script (`boot-loader.js`)
5
+ * against the same DOM structure {@link bootLoaderPlugin} injects in production
6
+ * via `transformIndexHtml`. The component injects `<style>` + the loader DOM,
7
+ * evaluates the driver, and exposes `window.__bootLoader` for the stories to
8
+ * call — no React reimplementation of the state machine.
9
+ *
10
+ * On unmount, the host calls `__bootLoader.dismiss()` (which clears the creep
11
+ * timer and removes the `#boot-loader` node) and clears the global so a fresh
12
+ * mount re-runs the driver from scratch.
13
+ */
14
+ type BootLoaderHostProps = {
15
+ initialStatus?: string;
16
+ markSvg?: string;
17
+ };
18
+ declare const BootLoaderHost: ({ initialStatus, markSvg }: BootLoaderHostProps) => React.JSX.Element;
19
+ declare const meta: Meta<typeof BootLoaderHost>;
20
+ export default meta;
21
+ type Story = StoryObj<typeof BootLoaderHost>;
22
+ export declare const Default: Story;
23
+ /**
24
+ * Renders the React `Placeholder` from `@dxos/app-framework/ui` on its own —
25
+ * useful for eyeballing the handoff target the boot loader dismisses to.
26
+ */
27
+ export declare const PlaceholderHandoff: Story;
28
+ /**
29
+ * End-to-end handoff sim: the driver ticks 0 → 100% then the host calls
30
+ * `dismiss()` and the underlying `Placeholder` fades the mark in / out,
31
+ * mirroring the production sequence.
32
+ */
33
+ export declare const Handoff: Story;
34
+ //# sourceMappingURL=BootLoader.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BootLoader.stories.d.ts","sourceRoot":"","sources":["../../../../../src/vite-plugin/boot-loader/BootLoader.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAsC,MAAM,OAAO,CAAC;AAU3D;;;;;;;;;;GAUG;AACH,KAAK,mBAAmB,GAAG;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAMF,QAAA,MAAM,cAAc,+BAA6C,mBAAmB,sBA4CnF,CAAC;AA0IF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAYrC,CAAC;eAEa,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAC;AAE7C,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAGhC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,KAWrB,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { type Plugin } from 'vite';
2
+ /**
3
+ * Options for {@link bootLoaderPlugin}.
4
+ */
5
+ export type BootLoaderOptions = {
6
+ /**
7
+ * Initial status text rendered by the loader (replaced via
8
+ * `window.__bootLoader.status(...)` once the host starts firing phase callbacks).
9
+ */
10
+ status?: string;
11
+ /**
12
+ * Inline SVG markup for an optional brand mark rendered above the progress bar.
13
+ * The mark renders at full opacity with whatever fills the SVG declares, so
14
+ * pass a colour-palette logo for the strongest visual identity. SVGs that use
15
+ * `fill="currentColor"` still inherit the loader's `prefers-color-scheme`
16
+ * text colour. Leave empty/undefined to render only the bar.
17
+ */
18
+ markSvg?: string;
19
+ };
20
+ /**
21
+ * Vite plugin that injects a tiny native-DOM "boot loader" into the host app's
22
+ * `index.html`.
23
+ *
24
+ * The loader paints on the very first frame, before any JS bundle is fetched —
25
+ * so the user sees something immediately on cold load instead of staring at a
26
+ * blank document while the compiled module graph is parsed. The brand mark
27
+ * sits centred inside a thin determinate progress ring; both layers are
28
+ * composited so the ring's fill stays visually smooth even while the JS main
29
+ * thread is busy.
30
+ *
31
+ * The host app drives the loader from `main.tsx`:
32
+ *
33
+ * - `window.__bootLoader.status(text)` updates the status line per phase.
34
+ * - `window.__bootLoader.progress(fraction)` grows the determinate ring (0–1).
35
+ * - `window.__bootLoader.dismiss()` removes the loader once React has mounted.
36
+ *
37
+ * Inject order:
38
+ * - `<style>` → `<head>` (parses before any bundled stylesheet).
39
+ * - `<div id="boot-loader">…</div>` → start of `<body>` (sibling of `#root`).
40
+ * - inline `<script>` defining `window.__bootLoader` → start of `<body>`.
41
+ *
42
+ * Keeping the loader as a sibling of `#root` (rather than a child of it) means
43
+ * `createRoot(document.getElementById('root')).render(...)` does not fight the
44
+ * loader for ownership; the host explicitly calls `dismiss()` after the first
45
+ * React commit, which gives a deterministic handoff.
46
+ *
47
+ * Color tokens are exposed as CSS custom properties (`--boot-loader-bg-light`,
48
+ * `--boot-loader-bg-dark`, etc.) defined in `boot-loader.css`, so consumers can
49
+ * override them at the document level without us re-parameterizing this plugin.
50
+ */
51
+ export declare const bootLoaderPlugin: ({ status, markSvg }?: BootLoaderOptions) => Plugin;
52
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/vite-plugin/boot-loader/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,MAAM,CAAC;AAKnC;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,gBAAgB,yBAAyB,iBAAiB,KAAQ,MAmD9E,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { type Plugin as VitePlugin } from 'vite';
2
+ import { type BuildMeta, ENTRY_FILENAME, MANIFEST_ASSET_NAME, serializeManifest } from '../manifest';
3
+ export { ENTRY_FILENAME, MANIFEST_ASSET_NAME, serializeManifest };
4
+ export type { BuildMeta };
5
+ export type ComposerPluginOptions = {
6
+ /** Entry point for the plugin bundle. Defaults to `src/plugin.tsx`. */
7
+ entry?: string;
8
+ /** Dev server port. Defaults to `3967`. */
9
+ port?: number;
10
+ /**
11
+ * Plugin metadata. When provided, a `manifest.json` asset is emitted alongside the bundle
12
+ * listing every emitted file. The host fetches this manifest at install time and persists
13
+ * the declared assets in its offline cache so the plugin works without network. The bundle's
14
+ * entry module is always written as {@link ENTRY_FILENAME} (`index.mjs`).
15
+ */
16
+ meta?: BuildMeta;
17
+ };
18
+ /**
19
+ * Vite plugin for **external Composer plugin projects**. Configures the build to produce
20
+ * an ESM bundle that externalizes all framework dependencies, which the Composer host app
21
+ * provides at runtime via import map.
22
+ *
23
+ * Handles:
24
+ * 1. Build config — lib mode entry point, ES format output, rollup externals, code-split chunks.
25
+ * 2. Dev externalization — marks shared deps as external during `vite serve` and strips
26
+ * the `/@id/` prefix that Vite's import analysis adds to external bare specifiers.
27
+ * 3. JSX dev runtime shim — bridges `react/jsx-dev-runtime` (used by React refresh in dev)
28
+ * to `react/jsx-runtime` (which is what the externalized React provides).
29
+ * 4. Manifest emit — when `meta` is supplied, writes `manifest.json` next to the bundled
30
+ * module listing every emitted asset (entry, CSS, chunks, etc.) so the host can eagerly
31
+ * cache them for offline use.
32
+ */
33
+ export declare const composerPlugin: (options?: ComposerPluginOptions) => VitePlugin[];
34
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/vite-plugin/composer/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,IAAI,UAAU,EAAE,MAAM,MAAM,CAAC;AAEjD,OAAO,EAAE,KAAK,SAAS,EAAE,cAAc,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrG,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,CAAC;AAClE,YAAY,EAAE,SAAS,EAAE,CAAC;AAwD1B,MAAM,MAAM,qBAAqB,GAAG;IAClC,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,aAAc,qBAAqB,KAAG,UAAU,EAqL1E,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { type Plugin } from 'vite';
2
+ /**
3
+ * Vite plugin for the **host app** (Composer). Generates a browser import map so that
4
+ * shared packages are loaded once and reused by both the host and any remote plugins.
5
+ *
6
+ * In production, emits a dedicated chunk per specifier via virtual wrapper modules,
7
+ * then injects a `<script type="importmap">` tag into the HTML with the chunk URLs.
8
+ *
9
+ * Virtual wrappers are needed because directly emitting chunks for CJS packages loses
10
+ * their named exports due to Rollup's interop. The wrapper re-exports them explicitly.
11
+ *
12
+ * TODO: Restore dev-mode support. The previous dev path mapped each bare specifier to
13
+ * its absolute `/@fs/` file path during `buildStart`, which forced `this.resolve()` for
14
+ * hundreds of subpath entrypoints and raced with Vite's optimize-deps static scan —
15
+ * producing non-deterministic chunk content (~34 chunks drifting per warm-start) and
16
+ * triggering Vite 8.0.10's `runOptimizer` / `commitProcessing` crashes (`fileHash` /
17
+ * `browserHash` undefined on partial-discovery batches). Plugin is currently gated to
18
+ * `apply: 'build'` to avoid both. A working dev-mode implementation would need to
19
+ * resolve specifiers without participating in the optimize-deps phase — candidates:
20
+ * - defer resolution to `transformIndexHtml` (after the optimizer settles)
21
+ * - read resolved paths from `environment.depsOptimizer.metadata` rather than calling
22
+ * `this.resolve()` ourselves
23
+ * - resolve via `require.resolve` directly, bypassing the Vite plugin pipeline entirely
24
+ */
25
+ export declare const importMapPlugin: (options?: {
26
+ packages?: string[];
27
+ }) => Plugin[];
28
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/vite-plugin/import-map/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,MAAM,CAAC;AAgUnC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,eAAe,aAAc;IAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,KAAG,MAAM,EA4KzE,CAAC"}
@@ -1,3 +1,5 @@
1
- export * from './composer-plugin';
2
- export * from './import-map-plugin';
1
+ export * from './boot-loader';
2
+ export * from './composer';
3
+ export * from './import-map';
4
+ export * from './packages';
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/vite-plugin/index.ts"],"names":[],"mappings":"AAIA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/vite-plugin/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAG7B,cAAc,YAAY,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { type Plugin } from '../core';
2
+ /**
3
+ * Name of the asset written alongside the built module bundle.
4
+ * The DXOS community registry resolves each published plugin by fetching this file
5
+ * from the repo's latest GitHub Release, so authors should not rename it.
6
+ */
7
+ export declare const MANIFEST_ASSET_NAME = "manifest.json";
8
+ /**
9
+ * Canonical entry filename (re-exported from `@dxos/protocols`) so vite-plugin
10
+ * consumers don't have to reach into the protocols package directly.
11
+ */
12
+ export declare const ENTRY_FILENAME = "index.mjs";
13
+ /**
14
+ * Plugin metadata required to emit a manifest at build time.
15
+ *
16
+ * Extends `Plugin.Meta` with a build-time `version` field that is not
17
+ * relevant to the runtime plugin definition itself.
18
+ */
19
+ export type BuildMeta = Plugin.Meta & {
20
+ version: string;
21
+ };
22
+ /**
23
+ * Serializes a plugin's public metadata + bundle layout into the format consumed
24
+ * by the host loader (see `UrlLoader.make` and `PluginManifest.parse`).
25
+ *
26
+ * The host fetches this manifest, resolves every entry in `assets` against the
27
+ * manifest URL, and persists them via the platform `PluginAssetCache` so the
28
+ * plugin works offline. The entry module is always {@link ENTRY_FILENAME}; it
29
+ * must appear in `assets`.
30
+ *
31
+ * Exported from a vite-free module so tests and tooling can validate manifests
32
+ * without paying the cost of loading vite + esbuild.
33
+ */
34
+ export declare const serializeManifest: (meta: BuildMeta, { assets }: {
35
+ assets: readonly string[];
36
+ }) => string;
37
+ //# sourceMappingURL=manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../../src/vite-plugin/manifest.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAC;AAEtC;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,cAAc,cAAwB,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,SAAU,SAAS,cAAc;IAAE,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,KAAG,MAQ5F,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=manifest.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.test.d.ts","sourceRoot":"","sources":["../../../../src/vite-plugin/manifest.test.ts"],"names":[],"mappings":""}
@@ -1,7 +1,13 @@
1
+ export declare const DEFAULT_PACKAGES: string[];
1
2
  /**
2
- * Packages shared between the Composer host app and remote plugins.
3
- * The host provides these via import map so plugins don't bundle their own copies.
4
- * Used as the default list for both `importMapPlugin` (host) and `composerPlugin` (plugin).
3
+ * True when the given bare specifier (or one of its subpaths) is provided by the
4
+ * Composer host at runtime and must not be re-bundled by a plugin.
5
+ *
6
+ * Matches only packages listed in {@link DEFAULT_PACKAGES} — the same list
7
+ * {@link importMapPlugin} consumes — so externalization cannot claim a package
8
+ * the host isn't actually mapping. Unknown `@dxos/*` packages fall through to
9
+ * normal bundling, which is the correct default for plugin-owned or yet-to-be
10
+ * shared workspace packages.
5
11
  */
6
- export declare const DEFAULT_PACKAGES: string[];
12
+ export declare const isSharedPackage: (id: string) => boolean;
7
13
  //# sourceMappingURL=packages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"packages.d.ts","sourceRoot":"","sources":["../../../../src/vite-plugin/packages.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,UAmB5B,CAAC"}
1
+ {"version":3,"file":"packages.d.ts","sourceRoot":"","sources":["../../../../src/vite-plugin/packages.ts"],"names":[],"mappings":"AAyCA,eAAO,MAAM,gBAAgB,UAqI5B,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,OAAQ,MAAM,KAAG,OAC2B,CAAC"}