@dxos/app-framework 0.8.4-main.a4bbb77 → 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 (571) hide show
  1. package/.storybook/main.mts +2 -4
  2. package/.storybook/preview.mts +2 -2
  3. package/dist/lib/browser/capability-Q5XRXRD2.mjs +38 -0
  4. package/dist/lib/browser/capability-Q5XRXRD2.mjs.map +7 -0
  5. package/dist/lib/browser/capability-V7LR4LQN.mjs +35 -0
  6. package/dist/lib/browser/capability-V7LR4LQN.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-23D4SJUE.mjs +42 -0
  8. package/dist/lib/browser/chunk-23D4SJUE.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-3JWJXGLK.mjs +79 -0
  10. package/dist/lib/browser/chunk-3JWJXGLK.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-3ZS2A3DN.mjs +907 -0
  12. package/dist/lib/browser/chunk-3ZS2A3DN.mjs.map +7 -0
  13. package/dist/lib/browser/chunk-45CHLTBV.mjs +34 -0
  14. package/dist/lib/browser/chunk-45CHLTBV.mjs.map +7 -0
  15. package/dist/lib/browser/chunk-5LAIGWLU.mjs +467 -0
  16. package/dist/lib/browser/chunk-5LAIGWLU.mjs.map +7 -0
  17. package/dist/lib/browser/chunk-66IXTIVK.mjs +48 -0
  18. package/dist/lib/browser/chunk-66IXTIVK.mjs.map +7 -0
  19. package/dist/lib/browser/chunk-FJ4765WW.mjs +8 -0
  20. package/dist/lib/browser/chunk-FJ4765WW.mjs.map +7 -0
  21. package/dist/lib/browser/chunk-G7SDBRKH.mjs +1 -0
  22. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  23. package/dist/lib/browser/chunk-JXCBZSBJ.mjs +372 -0
  24. package/dist/lib/browser/chunk-JXCBZSBJ.mjs.map +7 -0
  25. package/dist/lib/browser/chunk-MX5DKEJH.mjs +584 -0
  26. package/dist/lib/browser/chunk-MX5DKEJH.mjs.map +7 -0
  27. package/dist/lib/browser/chunk-WBHCSOBW.mjs +80 -0
  28. package/dist/lib/browser/chunk-WBHCSOBW.mjs.map +7 -0
  29. package/dist/lib/browser/chunk-Z55LVAGN.mjs +213 -0
  30. package/dist/lib/browser/chunk-Z55LVAGN.mjs.map +7 -0
  31. package/dist/lib/browser/chunk-ZGJAZSNE.mjs +142 -0
  32. package/dist/lib/browser/chunk-ZGJAZSNE.mjs.map +7 -0
  33. package/dist/lib/browser/cli/index.mjs +74 -0
  34. package/dist/lib/browser/cli/index.mjs.map +7 -0
  35. package/dist/lib/browser/common/activation-events.mjs +24 -0
  36. package/dist/lib/browser/common/capabilities.mjs +46 -0
  37. package/dist/lib/browser/core/activation-event.mjs +20 -0
  38. package/dist/lib/browser/core/activation-event.mjs.map +7 -0
  39. package/dist/lib/browser/core/capability.mjs +30 -0
  40. package/dist/lib/browser/core/capability.mjs.map +7 -0
  41. package/dist/lib/browser/core/plugin-manager.mjs +17 -0
  42. package/dist/lib/browser/core/plugin-manager.mjs.map +7 -0
  43. package/dist/lib/browser/core/plugin.mjs +37 -0
  44. package/dist/lib/browser/core/plugin.mjs.map +7 -0
  45. package/dist/lib/browser/core/url-loader.mjs +20 -0
  46. package/dist/lib/browser/core/url-loader.mjs.map +7 -0
  47. package/dist/lib/browser/index.mjs +95 -148
  48. package/dist/lib/browser/index.mjs.map +4 -4
  49. package/dist/lib/browser/invoker-capability-LNX4CGIV.mjs +44 -0
  50. package/dist/lib/browser/invoker-capability-LNX4CGIV.mjs.map +7 -0
  51. package/dist/lib/browser/meta.json +1 -1
  52. package/dist/lib/browser/testing/index.mjs +227 -41
  53. package/dist/lib/browser/testing/index.mjs.map +4 -4
  54. package/dist/lib/browser/testing/react.mjs +78 -0
  55. package/dist/lib/browser/testing/react.mjs.map +7 -0
  56. package/dist/lib/browser/ui/index.mjs +48 -0
  57. package/dist/lib/browser/ui/index.mjs.map +7 -0
  58. package/dist/lib/node-esm/capability-EW5GJCI6.mjs +39 -0
  59. package/dist/lib/node-esm/capability-EW5GJCI6.mjs.map +7 -0
  60. package/dist/lib/node-esm/capability-YKBMMD53.mjs +36 -0
  61. package/dist/lib/node-esm/capability-YKBMMD53.mjs.map +7 -0
  62. package/dist/lib/node-esm/chunk-37Z53PXZ.mjs +10 -0
  63. package/dist/lib/node-esm/chunk-37Z53PXZ.mjs.map +7 -0
  64. package/dist/lib/node-esm/chunk-6XW6LET6.mjs +35 -0
  65. package/dist/lib/node-esm/chunk-6XW6LET6.mjs.map +7 -0
  66. package/dist/lib/node-esm/chunk-D347W3KO.mjs +143 -0
  67. package/dist/lib/node-esm/chunk-D347W3KO.mjs.map +7 -0
  68. package/dist/lib/node-esm/chunk-D5PO2WXX.mjs +373 -0
  69. package/dist/lib/node-esm/chunk-D5PO2WXX.mjs.map +7 -0
  70. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  71. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
  72. package/dist/lib/node-esm/chunk-HTBJU5FX.mjs +214 -0
  73. package/dist/lib/node-esm/chunk-HTBJU5FX.mjs.map +7 -0
  74. package/dist/lib/node-esm/chunk-KM2F6GH6.mjs +468 -0
  75. package/dist/lib/node-esm/chunk-KM2F6GH6.mjs.map +7 -0
  76. package/dist/lib/node-esm/chunk-OZ7DZA5Z.mjs +2 -0
  77. package/dist/lib/node-esm/chunk-OZ7DZA5Z.mjs.map +7 -0
  78. package/dist/lib/node-esm/chunk-Q7XBFII4.mjs +908 -0
  79. package/dist/lib/node-esm/chunk-Q7XBFII4.mjs.map +7 -0
  80. package/dist/lib/node-esm/chunk-SBS2YMPT.mjs +43 -0
  81. package/dist/lib/node-esm/chunk-SBS2YMPT.mjs.map +7 -0
  82. package/dist/lib/node-esm/chunk-SDJ4B2LU.mjs +80 -0
  83. package/dist/lib/node-esm/chunk-SDJ4B2LU.mjs.map +7 -0
  84. package/dist/lib/node-esm/chunk-WFSRZKBP.mjs +81 -0
  85. package/dist/lib/node-esm/chunk-WFSRZKBP.mjs.map +7 -0
  86. package/dist/lib/node-esm/chunk-WKTLE7MG.mjs +585 -0
  87. package/dist/lib/node-esm/chunk-WKTLE7MG.mjs.map +7 -0
  88. package/dist/lib/node-esm/chunk-XOCUANHO.mjs +49 -0
  89. package/dist/lib/node-esm/chunk-XOCUANHO.mjs.map +7 -0
  90. package/dist/lib/node-esm/cli/index.mjs +75 -0
  91. package/dist/lib/node-esm/cli/index.mjs.map +7 -0
  92. package/dist/lib/node-esm/common/activation-events.mjs +25 -0
  93. package/dist/lib/node-esm/common/activation-events.mjs.map +7 -0
  94. package/dist/lib/node-esm/common/capabilities.mjs +47 -0
  95. package/dist/lib/node-esm/common/capabilities.mjs.map +7 -0
  96. package/dist/lib/node-esm/core/activation-event.mjs +21 -0
  97. package/dist/lib/node-esm/core/activation-event.mjs.map +7 -0
  98. package/dist/lib/node-esm/core/capability.mjs +31 -0
  99. package/dist/lib/node-esm/core/capability.mjs.map +7 -0
  100. package/dist/lib/node-esm/core/plugin-manager.mjs +18 -0
  101. package/dist/lib/node-esm/core/plugin-manager.mjs.map +7 -0
  102. package/dist/lib/node-esm/core/plugin.mjs +38 -0
  103. package/dist/lib/node-esm/core/plugin.mjs.map +7 -0
  104. package/dist/lib/node-esm/core/url-loader.mjs +21 -0
  105. package/dist/lib/node-esm/core/url-loader.mjs.map +7 -0
  106. package/dist/lib/node-esm/index.mjs +95 -148
  107. package/dist/lib/node-esm/index.mjs.map +4 -4
  108. package/dist/lib/node-esm/invoker-capability-O4T5PHLA.mjs +45 -0
  109. package/dist/lib/node-esm/invoker-capability-O4T5PHLA.mjs.map +7 -0
  110. package/dist/lib/node-esm/meta.json +1 -1
  111. package/dist/lib/node-esm/testing/index.mjs +227 -41
  112. package/dist/lib/node-esm/testing/index.mjs.map +4 -4
  113. package/dist/lib/node-esm/testing/react.mjs +79 -0
  114. package/dist/lib/node-esm/testing/react.mjs.map +7 -0
  115. package/dist/lib/node-esm/ui/index.mjs +49 -0
  116. package/dist/lib/node-esm/ui/index.mjs.map +7 -0
  117. package/dist/plugin/node-esm/index.mjs +832 -0
  118. package/dist/plugin/node-esm/index.mjs.map +7 -0
  119. package/dist/plugin/node-esm/meta.json +1 -0
  120. package/dist/types/src/cli/cli.d.ts +39 -0
  121. package/dist/types/src/cli/cli.d.ts.map +1 -0
  122. package/dist/types/src/cli/index.d.ts +2 -0
  123. package/dist/types/src/cli/index.d.ts.map +1 -0
  124. package/dist/types/src/common/activation-events.d.ts +27 -0
  125. package/dist/types/src/common/activation-events.d.ts.map +1 -0
  126. package/dist/types/src/common/capabilities.d.ts +110 -197
  127. package/dist/types/src/common/capabilities.d.ts.map +1 -1
  128. package/dist/types/src/common/index.d.ts +4 -8
  129. package/dist/types/src/common/index.d.ts.map +1 -1
  130. package/dist/types/src/common/operations.d.ts +19 -0
  131. package/dist/types/src/common/operations.d.ts.map +1 -0
  132. package/dist/types/src/common/translations.d.ts +8 -8
  133. package/dist/types/src/common/translations.d.ts.map +1 -1
  134. package/dist/types/src/context.d.ts +5 -0
  135. package/dist/types/src/context.d.ts.map +1 -0
  136. package/dist/types/src/core/{events.d.ts → activation-event.d.ts} +11 -11
  137. package/dist/types/src/core/activation-event.d.ts.map +1 -0
  138. package/dist/types/src/core/capability-manager.d.ts +48 -0
  139. package/dist/types/src/core/capability-manager.d.ts.map +1 -0
  140. package/dist/types/src/core/capability-manager.test.d.ts +2 -0
  141. package/dist/types/src/core/capability-manager.test.d.ts.map +1 -0
  142. package/dist/types/src/core/capability.d.ts +156 -0
  143. package/dist/types/src/core/capability.d.ts.map +1 -0
  144. package/dist/types/src/core/index.d.ts +8 -4
  145. package/dist/types/src/core/index.d.ts.map +1 -1
  146. package/dist/types/src/core/plugin-asset-cache.d.ts +71 -0
  147. package/dist/types/src/core/plugin-asset-cache.d.ts.map +1 -0
  148. package/dist/types/src/core/plugin-manager.d.ts +122 -0
  149. package/dist/types/src/core/plugin-manager.d.ts.map +1 -0
  150. package/dist/types/src/core/plugin-manager.test.d.ts +2 -0
  151. package/dist/types/src/core/plugin-manager.test.d.ts.map +1 -0
  152. package/dist/types/src/core/plugin-manifest.d.ts +76 -0
  153. package/dist/types/src/core/plugin-manifest.d.ts.map +1 -0
  154. package/dist/types/src/core/plugin-manifest.test.d.ts +2 -0
  155. package/dist/types/src/core/plugin-manifest.test.d.ts.map +1 -0
  156. package/dist/types/src/core/plugin.d.ts +207 -39
  157. package/dist/types/src/core/plugin.d.ts.map +1 -1
  158. package/dist/types/src/core/url-loader.d.ts +112 -0
  159. package/dist/types/src/core/url-loader.d.ts.map +1 -0
  160. package/dist/types/src/core/url-loader.test.d.ts +2 -0
  161. package/dist/types/src/core/url-loader.test.d.ts.map +1 -0
  162. package/dist/types/src/helpers.d.ts.map +1 -1
  163. package/dist/types/src/index.d.ts +3 -4
  164. package/dist/types/src/index.d.ts.map +1 -1
  165. package/dist/types/src/plugin-operation/OperationPlugin.d.ts +3 -0
  166. package/dist/types/src/plugin-operation/OperationPlugin.d.ts.map +1 -0
  167. package/dist/types/src/plugin-operation/history/capability.d.ts +7 -0
  168. package/dist/types/src/plugin-operation/history/capability.d.ts.map +1 -0
  169. package/dist/types/src/plugin-operation/history/errors.d.ts +32 -0
  170. package/dist/types/src/plugin-operation/history/errors.d.ts.map +1 -0
  171. package/dist/types/src/plugin-operation/history/history-tracker.d.ts +18 -0
  172. package/dist/types/src/plugin-operation/history/history-tracker.d.ts.map +1 -0
  173. package/dist/types/src/plugin-operation/history/history-tracker.test.d.ts +2 -0
  174. package/dist/types/src/plugin-operation/history/history-tracker.test.d.ts.map +1 -0
  175. package/dist/types/src/plugin-operation/history/index.d.ts +6 -0
  176. package/dist/types/src/plugin-operation/history/index.d.ts.map +1 -0
  177. package/dist/types/src/plugin-operation/history/types.d.ts +13 -0
  178. package/dist/types/src/plugin-operation/history/types.d.ts.map +1 -0
  179. package/dist/types/src/plugin-operation/history/undo-mapping.d.ts +101 -0
  180. package/dist/types/src/plugin-operation/history/undo-mapping.d.ts.map +1 -0
  181. package/dist/types/src/plugin-operation/history/undo-registry.d.ts +23 -0
  182. package/dist/types/src/plugin-operation/history/undo-registry.d.ts.map +1 -0
  183. package/dist/types/src/plugin-operation/history/undo-registry.test.d.ts +2 -0
  184. package/dist/types/src/plugin-operation/history/undo-registry.test.d.ts.map +1 -0
  185. package/dist/types/src/plugin-operation/index.d.ts +3 -0
  186. package/dist/types/src/plugin-operation/index.d.ts.map +1 -0
  187. package/dist/types/src/plugin-operation/invoker-capability.d.ts +6 -0
  188. package/dist/types/src/plugin-operation/invoker-capability.d.ts.map +1 -0
  189. package/dist/types/src/plugin-operation/meta.d.ts +3 -0
  190. package/dist/types/src/plugin-operation/meta.d.ts.map +1 -0
  191. package/dist/types/src/plugin-operation/testing.d.ts +59 -0
  192. package/dist/types/src/plugin-operation/testing.d.ts.map +1 -0
  193. package/dist/types/src/plugin-runtime/RuntimePlugin.d.ts +3 -0
  194. package/dist/types/src/plugin-runtime/RuntimePlugin.d.ts.map +1 -0
  195. package/dist/types/src/plugin-runtime/capability.d.ts +6 -0
  196. package/dist/types/src/plugin-runtime/capability.d.ts.map +1 -0
  197. package/dist/types/src/plugin-runtime/index.d.ts +2 -0
  198. package/dist/types/src/plugin-runtime/index.d.ts.map +1 -0
  199. package/dist/types/src/plugin-runtime/meta.d.ts +3 -0
  200. package/dist/types/src/plugin-runtime/meta.d.ts.map +1 -0
  201. package/dist/types/src/testing/harness.d.ts +67 -0
  202. package/dist/types/src/testing/harness.d.ts.map +1 -0
  203. package/dist/types/src/testing/index.d.ts +2 -0
  204. package/dist/types/src/testing/index.d.ts.map +1 -1
  205. package/dist/types/src/testing/react.d.ts +27 -0
  206. package/dist/types/src/testing/react.d.ts.map +1 -0
  207. package/dist/types/src/testing/react.test.d.ts +2 -0
  208. package/dist/types/src/testing/react.test.d.ts.map +1 -0
  209. package/dist/types/src/testing/service.d.ts +8 -0
  210. package/dist/types/src/testing/service.d.ts.map +1 -0
  211. package/dist/types/src/testing/withPluginManager.d.ts +7 -6
  212. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
  213. package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
  214. package/dist/types/src/ui/components/App/App.d.ts +9 -0
  215. package/dist/types/src/ui/components/App/App.d.ts.map +1 -0
  216. package/dist/types/src/ui/components/App/App.stories.d.ts +19 -0
  217. package/dist/types/src/ui/components/App/App.stories.d.ts.map +1 -0
  218. package/dist/types/src/ui/components/App/index.d.ts +2 -0
  219. package/dist/types/src/ui/components/App/index.d.ts.map +1 -0
  220. package/dist/types/src/ui/components/Placeholder/Placeholder.d.ts +64 -0
  221. package/dist/types/src/ui/components/Placeholder/Placeholder.d.ts.map +1 -0
  222. package/dist/types/src/ui/components/Placeholder/Placeholder.stories.d.ts +19 -0
  223. package/dist/types/src/ui/components/Placeholder/Placeholder.stories.d.ts.map +1 -0
  224. package/dist/types/src/ui/components/Placeholder/index.d.ts +2 -0
  225. package/dist/types/src/ui/components/Placeholder/index.d.ts.map +1 -0
  226. package/dist/types/src/{playground/playground.stories.d.ts → ui/components/PluginManager/PluginManagerContext.stories.d.ts} +5 -3
  227. package/dist/types/src/ui/components/PluginManager/PluginManagerContext.stories.d.ts.map +1 -0
  228. package/dist/types/src/ui/components/PluginManager/PluginManagerProvider.d.ts +10 -0
  229. package/dist/types/src/ui/components/PluginManager/PluginManagerProvider.d.ts.map +1 -0
  230. package/dist/types/src/ui/components/PluginManager/index.d.ts +2 -0
  231. package/dist/types/src/ui/components/PluginManager/index.d.ts.map +1 -0
  232. package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts +24 -0
  233. package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts.map +1 -0
  234. package/dist/types/src/{components/App.stories.d.ts → ui/components/Surface/SurfaceComponent.stories.d.ts} +1 -1
  235. package/dist/types/src/ui/components/Surface/SurfaceComponent.stories.d.ts.map +1 -0
  236. package/dist/types/src/ui/components/Surface/SurfaceInfo.d.ts +11 -0
  237. package/dist/types/src/ui/components/Surface/SurfaceInfo.d.ts.map +1 -0
  238. package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts +48 -0
  239. package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts.map +1 -0
  240. package/dist/types/src/ui/components/Surface/context.d.ts +5 -0
  241. package/dist/types/src/ui/components/Surface/context.d.ts.map +1 -0
  242. package/dist/types/src/ui/components/Surface/index.d.ts +36 -0
  243. package/dist/types/src/ui/components/Surface/index.d.ts.map +1 -0
  244. package/dist/types/src/ui/components/Surface/types.d.ts +197 -0
  245. package/dist/types/src/ui/components/Surface/types.d.ts.map +1 -0
  246. package/dist/types/src/ui/components/Surface/types.test.d.ts +2 -0
  247. package/dist/types/src/ui/components/Surface/types.test.d.ts.map +1 -0
  248. package/dist/types/src/ui/components/index.d.ts +5 -0
  249. package/dist/types/src/ui/components/index.d.ts.map +1 -0
  250. package/dist/types/src/ui/hooks/index.d.ts +6 -0
  251. package/dist/types/src/ui/hooks/index.d.ts.map +1 -0
  252. package/dist/types/src/ui/hooks/useApp.d.ts +88 -0
  253. package/dist/types/src/ui/hooks/useApp.d.ts.map +1 -0
  254. package/dist/types/src/ui/hooks/useApp.test.d.ts +2 -0
  255. package/dist/types/src/ui/hooks/useApp.test.d.ts.map +1 -0
  256. package/dist/types/src/ui/hooks/useCapabilities.d.ts +31 -0
  257. package/dist/types/src/ui/hooks/useCapabilities.d.ts.map +1 -0
  258. package/dist/types/src/{components → ui/hooks}/useLoading.d.ts +1 -2
  259. package/dist/types/src/ui/hooks/useLoading.d.ts.map +1 -0
  260. package/dist/types/src/ui/hooks/useSettingsState.d.ts +10 -0
  261. package/dist/types/src/ui/hooks/useSettingsState.d.ts.map +1 -0
  262. package/dist/types/src/ui/hooks/useSurface.d.ts +3 -0
  263. package/dist/types/src/ui/hooks/useSurface.d.ts.map +1 -0
  264. package/dist/types/src/ui/index.d.ts +3 -0
  265. package/dist/types/src/ui/index.d.ts.map +1 -0
  266. package/dist/types/src/vite-plugin/boot-loader/BootLoader.stories.d.ts +34 -0
  267. package/dist/types/src/vite-plugin/boot-loader/BootLoader.stories.d.ts.map +1 -0
  268. package/dist/types/src/vite-plugin/boot-loader/index.d.ts +52 -0
  269. package/dist/types/src/vite-plugin/boot-loader/index.d.ts.map +1 -0
  270. package/dist/types/src/vite-plugin/composer/index.d.ts +34 -0
  271. package/dist/types/src/vite-plugin/composer/index.d.ts.map +1 -0
  272. package/dist/types/src/vite-plugin/import-map/index.d.ts +28 -0
  273. package/dist/types/src/vite-plugin/import-map/index.d.ts.map +1 -0
  274. package/dist/types/src/vite-plugin/index.d.ts +5 -0
  275. package/dist/types/src/vite-plugin/index.d.ts.map +1 -0
  276. package/dist/types/src/vite-plugin/manifest.d.ts +37 -0
  277. package/dist/types/src/vite-plugin/manifest.d.ts.map +1 -0
  278. package/dist/types/src/vite-plugin/manifest.test.d.ts +2 -0
  279. package/dist/types/src/vite-plugin/manifest.test.d.ts.map +1 -0
  280. package/dist/types/src/vite-plugin/packages.d.ts +13 -0
  281. package/dist/types/src/vite-plugin/packages.d.ts.map +1 -0
  282. package/dist/types/tsconfig.tsbuildinfo +1 -1
  283. package/moon.yml +25 -6
  284. package/package.json +112 -55
  285. package/src/cli/cli.ts +107 -0
  286. package/src/{components → cli}/index.ts +1 -1
  287. package/src/common/activation-events.ts +44 -0
  288. package/src/common/capabilities.ts +169 -210
  289. package/src/common/index.ts +4 -8
  290. package/src/common/operations.ts +35 -0
  291. package/src/common/translations.ts +18 -10
  292. package/src/context.ts +9 -0
  293. package/src/core/{events.ts → activation-event.ts} +10 -7
  294. package/src/core/capability-manager.test.ts +151 -0
  295. package/src/core/capability-manager.ts +192 -0
  296. package/src/core/capability.ts +247 -0
  297. package/src/core/index.ts +8 -4
  298. package/src/core/plugin-asset-cache.ts +60 -0
  299. package/src/core/plugin-manager.test.ts +1354 -0
  300. package/src/core/plugin-manager.ts +1025 -0
  301. package/src/core/plugin-manifest.test.ts +48 -0
  302. package/src/core/plugin-manifest.ts +102 -0
  303. package/src/core/plugin.ts +365 -45
  304. package/src/core/url-loader.test.ts +178 -0
  305. package/src/core/url-loader.ts +337 -0
  306. package/src/index.ts +3 -4
  307. package/src/plugin-operation/OperationPlugin.ts +24 -0
  308. package/src/plugin-operation/history/capability.ts +36 -0
  309. package/src/plugin-operation/history/errors.ts +7 -0
  310. package/src/plugin-operation/history/history-tracker.test.ts +374 -0
  311. package/src/plugin-operation/history/history-tracker.ts +128 -0
  312. package/src/plugin-operation/history/index.ts +9 -0
  313. package/src/plugin-operation/history/types.ts +17 -0
  314. package/src/plugin-operation/history/undo-mapping.ts +135 -0
  315. package/src/plugin-operation/history/undo-registry.test.ts +72 -0
  316. package/src/plugin-operation/history/undo-registry.ts +54 -0
  317. package/src/plugin-operation/index.ts +6 -0
  318. package/src/plugin-operation/invoker-capability.ts +55 -0
  319. package/src/plugin-operation/meta.ts +11 -0
  320. package/src/plugin-operation/testing.ts +155 -0
  321. package/src/plugin-runtime/RuntimePlugin.ts +19 -0
  322. package/src/plugin-runtime/capability.ts +53 -0
  323. package/src/{playground/layout → plugin-runtime}/index.ts +1 -1
  324. package/src/plugin-runtime/meta.ts +11 -0
  325. package/src/testing/harness.ts +229 -0
  326. package/src/testing/index.ts +2 -0
  327. package/src/testing/react.test.tsx +48 -0
  328. package/src/testing/react.tsx +113 -0
  329. package/src/testing/service.ts +52 -0
  330. package/src/testing/withPluginManager.stories.tsx +8 -9
  331. package/src/testing/withPluginManager.tsx +68 -40
  332. package/src/ui/components/App/App.stories.tsx +92 -0
  333. package/src/ui/components/App/App.tsx +81 -0
  334. package/src/{playground/debug → ui/components/App}/index.ts +1 -1
  335. package/src/ui/components/Placeholder/Placeholder.stories.tsx +77 -0
  336. package/src/ui/components/Placeholder/Placeholder.tsx +155 -0
  337. package/src/{playground/logger → ui/components/Placeholder}/index.ts +1 -1
  338. package/src/ui/components/PluginManager/PluginManagerContext.stories.tsx +185 -0
  339. package/src/{react → ui/components/PluginManager}/PluginManagerProvider.ts +3 -3
  340. package/src/ui/components/PluginManager/index.ts +5 -0
  341. package/src/ui/components/Surface/SurfaceComponent.stories.tsx +144 -0
  342. package/src/ui/components/Surface/SurfaceComponent.tsx +303 -0
  343. package/src/ui/components/Surface/SurfaceInfo.tsx +107 -0
  344. package/src/ui/components/Surface/SurfaceProfilerContext.tsx +207 -0
  345. package/src/ui/components/Surface/context.ts +12 -0
  346. package/src/ui/components/Surface/index.ts +54 -0
  347. package/src/ui/components/Surface/types.test.ts +126 -0
  348. package/src/ui/components/Surface/types.ts +269 -0
  349. package/src/ui/components/index.ts +8 -0
  350. package/src/ui/hooks/index.ts +9 -0
  351. package/src/ui/hooks/useApp.test.tsx +159 -0
  352. package/src/ui/hooks/useApp.tsx +413 -0
  353. package/src/ui/hooks/useCapabilities.ts +67 -0
  354. package/src/{components → ui/hooks}/useLoading.tsx +16 -10
  355. package/src/ui/hooks/useSettingsState.ts +26 -0
  356. package/src/ui/hooks/useSurface.ts +13 -0
  357. package/src/ui/index.ts +6 -0
  358. package/src/vite-plugin/boot-loader/BootLoader.stories.tsx +263 -0
  359. package/src/vite-plugin/boot-loader/boot-loader.css +294 -0
  360. package/src/vite-plugin/boot-loader/boot-loader.js +274 -0
  361. package/src/vite-plugin/boot-loader/index.ts +112 -0
  362. package/src/vite-plugin/composer/index.ts +277 -0
  363. package/src/vite-plugin/import-map/index.ts +524 -0
  364. package/src/vite-plugin/index.ts +10 -0
  365. package/src/vite-plugin/manifest.test.ts +24 -0
  366. package/src/vite-plugin/manifest.ts +50 -0
  367. package/src/vite-plugin/packages.ts +188 -0
  368. package/tsconfig.json +18 -15
  369. package/tsconfig.node.json +2 -4
  370. package/typedoc.json +2 -4
  371. package/vitest.config.ts +1 -1
  372. package/.swc/plugins/linux_x86_64_19.0.0/727453fb3a62f7f1d952a41e051ca8a6f88cadc45cee43c6a4d1aa45f9b75665.wasmer-v7 +0 -0
  373. package/.swc/plugins/linux_x86_64_19.0.0/fce1bdb8e20a094e4af08bad09cc81497ed0e2e7c51223b07d371063cca18429.wasmer-v7 +0 -0
  374. package/dist/lib/browser/app-graph-builder-XH4OYQLC.mjs +0 -137
  375. package/dist/lib/browser/app-graph-builder-XH4OYQLC.mjs.map +0 -7
  376. package/dist/lib/browser/chunk-6V54SRFL.mjs +0 -1638
  377. package/dist/lib/browser/chunk-6V54SRFL.mjs.map +0 -7
  378. package/dist/lib/browser/chunk-RGKMLI6U.mjs +0 -35
  379. package/dist/lib/browser/chunk-RGKMLI6U.mjs.map +0 -7
  380. package/dist/lib/browser/chunk-ZZVFNUHZ.mjs +0 -467
  381. package/dist/lib/browser/chunk-ZZVFNUHZ.mjs.map +0 -7
  382. package/dist/lib/browser/intent-dispatcher-VFMJVO2M.mjs +0 -11
  383. package/dist/lib/browser/intent-resolver-ICAPD4JL.mjs +0 -39
  384. package/dist/lib/browser/intent-resolver-ICAPD4JL.mjs.map +0 -7
  385. package/dist/lib/browser/store-7ZGMHOGB.mjs +0 -30
  386. package/dist/lib/browser/store-7ZGMHOGB.mjs.map +0 -7
  387. package/dist/lib/browser/worker.mjs +0 -77
  388. package/dist/lib/node-esm/app-graph-builder-C7H22SOL.mjs +0 -138
  389. package/dist/lib/node-esm/app-graph-builder-C7H22SOL.mjs.map +0 -7
  390. package/dist/lib/node-esm/chunk-AXSZKZFD.mjs +0 -468
  391. package/dist/lib/node-esm/chunk-AXSZKZFD.mjs.map +0 -7
  392. package/dist/lib/node-esm/chunk-LKPMRTRR.mjs +0 -37
  393. package/dist/lib/node-esm/chunk-LKPMRTRR.mjs.map +0 -7
  394. package/dist/lib/node-esm/chunk-SOVTUUAY.mjs +0 -1640
  395. package/dist/lib/node-esm/chunk-SOVTUUAY.mjs.map +0 -7
  396. package/dist/lib/node-esm/intent-dispatcher-SAPOKSLZ.mjs +0 -12
  397. package/dist/lib/node-esm/intent-resolver-CRNJ6BMD.mjs +0 -40
  398. package/dist/lib/node-esm/intent-resolver-CRNJ6BMD.mjs.map +0 -7
  399. package/dist/lib/node-esm/store-H4F4RMYD.mjs +0 -31
  400. package/dist/lib/node-esm/store-H4F4RMYD.mjs.map +0 -7
  401. package/dist/lib/node-esm/worker.mjs +0 -78
  402. package/dist/types/src/common/collaboration.d.ts +0 -20
  403. package/dist/types/src/common/collaboration.d.ts.map +0 -1
  404. package/dist/types/src/common/events.d.ts +0 -52
  405. package/dist/types/src/common/events.d.ts.map +0 -1
  406. package/dist/types/src/common/file.d.ts +0 -14
  407. package/dist/types/src/common/file.d.ts.map +0 -1
  408. package/dist/types/src/common/graph.d.ts +0 -21
  409. package/dist/types/src/common/graph.d.ts.map +0 -1
  410. package/dist/types/src/common/layout.d.ts +0 -279
  411. package/dist/types/src/common/layout.d.ts.map +0 -1
  412. package/dist/types/src/common/surface.d.ts +0 -59
  413. package/dist/types/src/common/surface.d.ts.map +0 -1
  414. package/dist/types/src/components/App.d.ts +0 -10
  415. package/dist/types/src/components/App.d.ts.map +0 -1
  416. package/dist/types/src/components/App.stories.d.ts.map +0 -1
  417. package/dist/types/src/components/DefaultFallback.d.ts +0 -8
  418. package/dist/types/src/components/DefaultFallback.d.ts.map +0 -1
  419. package/dist/types/src/components/index.d.ts +0 -2
  420. package/dist/types/src/components/index.d.ts.map +0 -1
  421. package/dist/types/src/components/useApp.d.ts +0 -44
  422. package/dist/types/src/components/useApp.d.ts.map +0 -1
  423. package/dist/types/src/components/useLoading.d.ts.map +0 -1
  424. package/dist/types/src/core/capabilities.d.ts +0 -117
  425. package/dist/types/src/core/capabilities.d.ts.map +0 -1
  426. package/dist/types/src/core/capabilities.test.d.ts +0 -2
  427. package/dist/types/src/core/capabilities.test.d.ts.map +0 -1
  428. package/dist/types/src/core/events.d.ts.map +0 -1
  429. package/dist/types/src/core/manager.d.ts +0 -126
  430. package/dist/types/src/core/manager.d.ts.map +0 -1
  431. package/dist/types/src/core/manager.test.d.ts +0 -2
  432. package/dist/types/src/core/manager.test.d.ts.map +0 -1
  433. package/dist/types/src/playground/debug/Debug.d.ts +0 -6
  434. package/dist/types/src/playground/debug/Debug.d.ts.map +0 -1
  435. package/dist/types/src/playground/debug/index.d.ts +0 -2
  436. package/dist/types/src/playground/debug/index.d.ts.map +0 -1
  437. package/dist/types/src/playground/debug/plugin.d.ts +0 -2
  438. package/dist/types/src/playground/debug/plugin.d.ts.map +0 -1
  439. package/dist/types/src/playground/generator/Main.d.ts +0 -6
  440. package/dist/types/src/playground/generator/Main.d.ts.map +0 -1
  441. package/dist/types/src/playground/generator/Toolbar.d.ts +0 -6
  442. package/dist/types/src/playground/generator/Toolbar.d.ts.map +0 -1
  443. package/dist/types/src/playground/generator/generator.d.ts +0 -7
  444. package/dist/types/src/playground/generator/generator.d.ts.map +0 -1
  445. package/dist/types/src/playground/generator/index.d.ts +0 -3
  446. package/dist/types/src/playground/generator/index.d.ts.map +0 -1
  447. package/dist/types/src/playground/generator/plugin.d.ts +0 -2
  448. package/dist/types/src/playground/generator/plugin.d.ts.map +0 -1
  449. package/dist/types/src/playground/layout/Layout.d.ts +0 -8
  450. package/dist/types/src/playground/layout/Layout.d.ts.map +0 -1
  451. package/dist/types/src/playground/layout/index.d.ts +0 -2
  452. package/dist/types/src/playground/layout/index.d.ts.map +0 -1
  453. package/dist/types/src/playground/layout/plugin.d.ts +0 -2
  454. package/dist/types/src/playground/layout/plugin.d.ts.map +0 -1
  455. package/dist/types/src/playground/logger/Toolbar.d.ts +0 -6
  456. package/dist/types/src/playground/logger/Toolbar.d.ts.map +0 -1
  457. package/dist/types/src/playground/logger/index.d.ts +0 -2
  458. package/dist/types/src/playground/logger/index.d.ts.map +0 -1
  459. package/dist/types/src/playground/logger/plugin.d.ts +0 -2
  460. package/dist/types/src/playground/logger/plugin.d.ts.map +0 -1
  461. package/dist/types/src/playground/logger/schema.d.ts +0 -13
  462. package/dist/types/src/playground/logger/schema.d.ts.map +0 -1
  463. package/dist/types/src/playground/playground.stories.d.ts.map +0 -1
  464. package/dist/types/src/plugin-intent/IntentPlugin.d.ts +0 -2
  465. package/dist/types/src/plugin-intent/IntentPlugin.d.ts.map +0 -1
  466. package/dist/types/src/plugin-intent/actions.d.ts +0 -36
  467. package/dist/types/src/plugin-intent/actions.d.ts.map +0 -1
  468. package/dist/types/src/plugin-intent/errors.d.ts +0 -16
  469. package/dist/types/src/plugin-intent/errors.d.ts.map +0 -1
  470. package/dist/types/src/plugin-intent/index.d.ts +0 -6
  471. package/dist/types/src/plugin-intent/index.d.ts.map +0 -1
  472. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +0 -139
  473. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +0 -1
  474. package/dist/types/src/plugin-intent/intent-dispatcher.test.d.ts +0 -2
  475. package/dist/types/src/plugin-intent/intent-dispatcher.test.d.ts.map +0 -1
  476. package/dist/types/src/plugin-intent/intent.d.ts +0 -63
  477. package/dist/types/src/plugin-intent/intent.d.ts.map +0 -1
  478. package/dist/types/src/plugin-intent/meta.d.ts +0 -3
  479. package/dist/types/src/plugin-intent/meta.d.ts.map +0 -1
  480. package/dist/types/src/plugin-settings/SettingsPlugin.d.ts +0 -2
  481. package/dist/types/src/plugin-settings/SettingsPlugin.d.ts.map +0 -1
  482. package/dist/types/src/plugin-settings/actions.d.ts +0 -25
  483. package/dist/types/src/plugin-settings/actions.d.ts.map +0 -1
  484. package/dist/types/src/plugin-settings/app-graph-builder.d.ts +0 -4
  485. package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +0 -1
  486. package/dist/types/src/plugin-settings/index.d.ts +0 -3
  487. package/dist/types/src/plugin-settings/index.d.ts.map +0 -1
  488. package/dist/types/src/plugin-settings/intent-resolver.d.ts +0 -4
  489. package/dist/types/src/plugin-settings/intent-resolver.d.ts.map +0 -1
  490. package/dist/types/src/plugin-settings/meta.d.ts +0 -3
  491. package/dist/types/src/plugin-settings/meta.d.ts.map +0 -1
  492. package/dist/types/src/plugin-settings/store.d.ts +0 -5
  493. package/dist/types/src/plugin-settings/store.d.ts.map +0 -1
  494. package/dist/types/src/plugin-settings/translations.d.ts +0 -11
  495. package/dist/types/src/plugin-settings/translations.d.ts.map +0 -1
  496. package/dist/types/src/react/ErrorBoundary.d.ts +0 -30
  497. package/dist/types/src/react/ErrorBoundary.d.ts.map +0 -1
  498. package/dist/types/src/react/IntentContext.d.ts +0 -8
  499. package/dist/types/src/react/IntentContext.d.ts.map +0 -1
  500. package/dist/types/src/react/PluginManagerProvider.d.ts +0 -10
  501. package/dist/types/src/react/PluginManagerProvider.d.ts.map +0 -1
  502. package/dist/types/src/react/Surface.d.ts +0 -12
  503. package/dist/types/src/react/Surface.d.ts.map +0 -1
  504. package/dist/types/src/react/Surface.stories.d.ts +0 -17
  505. package/dist/types/src/react/Surface.stories.d.ts.map +0 -1
  506. package/dist/types/src/react/common.d.ts +0 -13
  507. package/dist/types/src/react/common.d.ts.map +0 -1
  508. package/dist/types/src/react/index.d.ts +0 -7
  509. package/dist/types/src/react/index.d.ts.map +0 -1
  510. package/dist/types/src/react/useCapabilities.d.ts +0 -13
  511. package/dist/types/src/react/useCapabilities.d.ts.map +0 -1
  512. package/dist/types/src/react/useIntentResolver.d.ts +0 -3
  513. package/dist/types/src/react/useIntentResolver.d.ts.map +0 -1
  514. package/dist/types/src/worker.d.ts +0 -4
  515. package/dist/types/src/worker.d.ts.map +0 -1
  516. package/src/common/collaboration.ts +0 -18
  517. package/src/common/events.ts +0 -79
  518. package/src/common/file.ts +0 -22
  519. package/src/common/graph.ts +0 -30
  520. package/src/common/layout.ts +0 -277
  521. package/src/common/surface.ts +0 -83
  522. package/src/components/App.stories.tsx +0 -33
  523. package/src/components/App.tsx +0 -59
  524. package/src/components/DefaultFallback.tsx +0 -26
  525. package/src/components/useApp.tsx +0 -164
  526. package/src/core/capabilities.test.ts +0 -136
  527. package/src/core/capabilities.ts +0 -259
  528. package/src/core/manager.test.ts +0 -516
  529. package/src/core/manager.ts +0 -597
  530. package/src/playground/debug/Debug.tsx +0 -39
  531. package/src/playground/debug/plugin.ts +0 -16
  532. package/src/playground/generator/Main.tsx +0 -71
  533. package/src/playground/generator/Toolbar.tsx +0 -47
  534. package/src/playground/generator/generator.ts +0 -48
  535. package/src/playground/generator/index.ts +0 -6
  536. package/src/playground/generator/plugin.ts +0 -22
  537. package/src/playground/layout/Layout.tsx +0 -33
  538. package/src/playground/layout/plugin.ts +0 -18
  539. package/src/playground/logger/Toolbar.tsx +0 -30
  540. package/src/playground/logger/plugin.ts +0 -41
  541. package/src/playground/logger/schema.ts +0 -12
  542. package/src/playground/playground.stories.tsx +0 -46
  543. package/src/plugin-intent/IntentPlugin.ts +0 -20
  544. package/src/plugin-intent/actions.ts +0 -31
  545. package/src/plugin-intent/errors.ts +0 -40
  546. package/src/plugin-intent/index.ts +0 -9
  547. package/src/plugin-intent/intent-dispatcher.test.ts +0 -279
  548. package/src/plugin-intent/intent-dispatcher.ts +0 -334
  549. package/src/plugin-intent/intent.ts +0 -154
  550. package/src/plugin-intent/meta.ts +0 -10
  551. package/src/plugin-settings/SettingsPlugin.ts +0 -34
  552. package/src/plugin-settings/actions.ts +0 -25
  553. package/src/plugin-settings/app-graph-builder.ts +0 -159
  554. package/src/plugin-settings/index.ts +0 -6
  555. package/src/plugin-settings/intent-resolver.ts +0 -35
  556. package/src/plugin-settings/meta.ts +0 -10
  557. package/src/plugin-settings/store.ts +0 -33
  558. package/src/plugin-settings/translations.ts +0 -19
  559. package/src/react/ErrorBoundary.tsx +0 -54
  560. package/src/react/IntentContext.tsx +0 -35
  561. package/src/react/Surface.stories.tsx +0 -101
  562. package/src/react/Surface.tsx +0 -86
  563. package/src/react/common.ts +0 -13
  564. package/src/react/index.ts +0 -10
  565. package/src/react/useCapabilities.ts +0 -31
  566. package/src/react/useIntentResolver.ts +0 -22
  567. package/src/worker.ts +0 -11
  568. /package/dist/lib/browser/{intent-dispatcher-VFMJVO2M.mjs.map → chunk-G7SDBRKH.mjs.map} +0 -0
  569. /package/dist/lib/browser/{worker.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
  570. /package/dist/lib/{node-esm/intent-dispatcher-SAPOKSLZ.mjs.map → browser/common/activation-events.mjs.map} +0 -0
  571. /package/dist/lib/{node-esm/worker.mjs.map → browser/common/capabilities.mjs.map} +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["raw-loader:/__w/dxos/dxos/packages/sdk/app-framework/src/vite-plugin/boot-loader/boot-loader.css?raw", "raw-loader:/__w/dxos/dxos/packages/sdk/app-framework/src/vite-plugin/boot-loader/boot-loader.js?raw", "../../../src/vite-plugin/boot-loader/index.ts", "../../../src/vite-plugin/manifest.ts", "../../../src/vite-plugin/packages.ts", "../../../src/vite-plugin/composer/index.ts", "../../../src/vite-plugin/import-map/index.ts"],
4
+ "sourcesContent": ["/*\n * Boot loader stylesheet \u2014 injected into the host's `<head>` by `bootLoaderPlugin`.\n * The keyframe animation runs on the browser's compositor thread, so the bar\n * keeps moving even while the JS main thread is busy parsing modules.\n */\n\n/*\n * Defaults match `@dxos/ui-theme`'s `--color-base-surface`, which resolves to\n * Tailwind's `neutral-50` / `neutral-950` in light / dark mode respectively\n * (see `packages/ui/ui-theme/src/css/theme/semantic.css`). Hosts can override\n * with the `--boot-loader-bg-*` / `--boot-loader-fg-*` custom properties on\n * `:root` if they need a different palette. Keeping the boot loader's\n * background identical to the app's `body` eliminates the flash on handoff\n * to React's `<Placeholder>`.\n */\n#boot-loader {\n /*\n * Tunable sizes \u2014 change these in one place and every derived calc()\n * (mark size, dot orbit radius, status offset, \u2026) follows.\n */\n /*\n * Caps the disc / mark at the design pixel sizes on roomy viewports while\n * shrinking proportionally on narrow ones (`vmin` follows the smaller of\n * width / height) so neither the ring nor the mark crops on phones.\n */\n --boot-loader-disc-size: min(384px, 80vmin);\n /*\n * Match the React `Placeholder`'s logo box (`h-[300px] w-[300px]` at the\n * `stage >= 1` keyframe) so the brand mark doesn't visibly jump size when\n * the loader hands off \u2014 the responsive cap keeps the same 300/384 ratio\n * (\u224878%) at any viewport width.\n */\n --boot-loader-mark-size: min(300px, 62.5vmin);\n --boot-loader-dot-size: 6px;\n --boot-loader-line-thickness: 1px;\n --boot-loader-line-feather: 2px;\n --boot-loader-status-gap: 24px;\n\n position: fixed;\n inset: 0;\n z-index: 10;\n background: var(--boot-loader-bg-light, #fafafa);\n color: var(--boot-loader-fg-light, #0a0a0a);\n font-family:\n ui-sans-serif,\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 13px;\n}\n\n@media (prefers-color-scheme: dark) {\n #boot-loader {\n background: var(--boot-loader-bg-dark, #0a0a0a);\n color: var(--boot-loader-fg-dark, #fafafa);\n }\n}\n\n/*\n * Register the progress var as a typed custom property so the browser can\n * interpolate it. Both the conic-gradient arc and the orbiting dot derive\n * their angle from `--boot-loader-bar-progress`, so animating the var (rather\n * than the resulting `background` / `transform`) keeps them in lockstep \u2014\n * `transition: background` on a conic-gradient doesn't interpolate smoothly\n * in all engines, which previously caused the head of the arc to flicker\n * against the dot during each progress step.\n */\n@property --boot-loader-bar-progress {\n syntax: '<number>';\n inherits: true;\n initial-value: 0;\n}\n\n/*\n * Stack the ring and the brand mark in the same square so the mark sits\n * centered inside the circle. Grid stacking keeps the mark outside the ring's\n * mask (the mask would otherwise clip the SVG to the 1px-thick arc shape).\n */\n#boot-loader-disc {\n position: absolute;\n top: 50%;\n left: 50%;\n display: grid;\n place-items: center;\n width: var(--boot-loader-disc-size);\n height: var(--boot-loader-disc-size);\n transform: translate(-50%, -50%);\n transition: --boot-loader-bar-progress 240ms ease-out;\n}\n\n#boot-loader-disc > * {\n grid-column: 1;\n grid-row: 1;\n}\n\n/*\n * Default to grayscale so the mark reads as a quiet monochrome silhouette\n * before any host-driven progress lands; the brand palette swaps in once\n * the driver flips `data-host-driven` on the disc (state-2 entry \u2014 the\n * first `__bootLoader.progress()` call). Hover keeps a parallel reveal\n * affordance for inspection in the storybook. The 600ms ease lets the\n * grayscale \u2192 color transition play through the activation phase rather\n * than snapping.\n */\n#boot-loader-mark {\n width: var(--boot-loader-mark-size);\n height: var(--boot-loader-mark-size);\n display: flex;\n align-items: center;\n justify-content: center;\n filter: grayscale(100%);\n transition: filter 1000ms ease-out;\n}\n\n/*\n * `grayscale(0%)` (identity) rather than `none` \u2014 `filter: none` changes\n * the filter function list and most engines treat that as a discrete\n * transition (snap, not ease). Keeping `grayscale(...)` on both sides of\n * the rule lets the browser interpolate the percentage smoothly.\n */\n#boot-loader-disc[data-host-driven] #boot-loader-mark,\n#boot-loader-mark:hover {\n filter: grayscale(0%);\n}\n\n#boot-loader-mark svg {\n width: 100%;\n height: 100%;\n /*\n * The host SVG carries its own brand-palette fills, so we don't apply a\n * `color` cascade here. SVGs that intentionally use `fill=\"currentColor\"`\n * still pick up the loader's text colour via `#boot-loader`'s `color`.\n */\n}\n\n/*\n * Circular determinate progress \u2014 a 1px-thick ring carved out of a filled\n * disc by a radial-gradient mask. The mask applies to the element and its\n * descendants so the `::before` progress arc is clipped to the ring shape\n * too. There is no indeterminate state: the ring sits empty (0%) until the\n * host calls `__bootLoader.progress(fraction)`, then the arc grows in place.\n * The fill repaints on the compositor thread so progress remains visually\n * smooth even while the JS main thread is busy parsing modules.\n */\n#boot-loader-bar {\n position: relative;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background: rgba(127, 127, 127, 0.18);\n opacity: 0.2;\n /*\n * Feather the inner edge so the thin line gets soft anti-aliased edges\n * instead of a hard pixel cutoff (which can look stair-stepped on\n * non-retina screens). The outer edge is clipped by `border-radius: 50%`,\n * so only the inner side of the ring needs the gradient feather. The\n * solid line lives in the outermost `--boot-loader-line-thickness` of the\n * disc; the feather extends `--boot-loader-line-feather` further inward.\n */\n mask: radial-gradient(\n circle closest-side,\n transparent calc(100% - var(--boot-loader-line-thickness) - var(--boot-loader-line-feather)),\n #000 calc(100% - var(--boot-loader-line-thickness))\n );\n -webkit-mask: radial-gradient(\n circle closest-side,\n transparent calc(100% - var(--boot-loader-line-thickness) - var(--boot-loader-line-feather)),\n #000 calc(100% - var(--boot-loader-line-thickness))\n );\n}\n\n/*\n * The host writes 0\u2013100 into `--boot-loader-bar-progress` via\n * `__bootLoader.progress(fraction)`. The `transition: background` smooths\n * the transitions between counter ticks so the arc grows continuously\n * rather than snapping. `conic-gradient` is clockwise-only, so the arc is\n * mirrored horizontally with `scaleX(-1)` to grow anticlockwise from\n * 12 o'clock.\n */\n#boot-loader-bar::before {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: 50%;\n background: conic-gradient(currentcolor calc(var(--boot-loader-bar-progress, 0) * 1%), transparent 0);\n transform: scaleX(-1);\n opacity: 0.9;\n}\n\n/*\n * A small dot at the leading edge of the arc. Lives as a sibling of the\n * masked ring (inside `#boot-loader-disc`) so the radial-gradient mask\n * doesn't clip it. The `rotate(...) translateY(-50%)` recipe orbits the\n * dot around the disc centre: at progress 0 it sits at 12 o'clock; the\n * negative rotation grows it anticlockwise to match the arc.\n */\n#boot-loader-dot {\n position: absolute;\n top: 50%;\n left: 50%;\n width: var(--boot-loader-dot-size);\n height: var(--boot-loader-dot-size);\n margin: calc(var(--boot-loader-dot-size) / -2) 0 0 calc(var(--boot-loader-dot-size) / -2);\n border-radius: 50%;\n background: currentcolor;\n opacity: 0;\n /*\n * Orbit radius = `disc/2 - line/2` so the dot's centre lands on the solid\n * line's centre rather than on the disc's outer edge (the line lives in\n * the outermost `--boot-loader-line-thickness` of the disc).\n */\n transform: rotate(calc(var(--boot-loader-bar-progress, 0) * -3.6deg))\n translateY(calc(var(--boot-loader-disc-size) / -2 + var(--boot-loader-line-thickness) / 2));\n transition: opacity 200ms ease-out;\n}\n\n/*\n * The driver sets `data-progress-active` on `#boot-loader-disc` while\n * progress is strictly between 0 and 1, hiding the dot at the empty (0%)\n * and full (100%) ring states where it would either sit on a bare ring or\n * coincide with the start of the arc.\n */\n#boot-loader-disc[data-progress-active] #boot-loader-dot {\n opacity: 0.9;\n}\n\n#boot-loader-status {\n position: absolute;\n top: 50%;\n left: 50%;\n /* Sit just below the centered disc \u2014 half the disc plus the configured gap. */\n transform: translate(-50%, calc(var(--boot-loader-disc-size) / 2 + var(--boot-loader-status-gap)));\n /*\n * Slightly de-emphasised vs body text so the brand mark + ring stay the\n * dominant focus, but high enough to remain legible on both light and dark\n * backgrounds without a custom palette.\n */\n opacity: 0.5;\n /*\n * Single-line viewport over a vertically-stacked track of every status\n * the driver has emitted. The track translates upward by one line-height\n * per `status()` call (see `--boot-loader-line` below), animated via\n * CSS `transition` on `transform` so the new line slides in from below\n * while the previous line slides out \u2014 independent of any\n * `scroll-behavior` smooth-scroll support, which Playwright/headless\n * Chrome strips even from spec-compliant `scrollTo({ behavior: 'smooth' })`\n * calls.\n */\n height: 1.5em;\n line-height: 1.5;\n letter-spacing: 0.01em;\n /* \n * Fixed-width digits so the `(i/n)` counter on range-bearing status\n * updates (\"Loading plugins (12/80)\") doesn't jitter as the index\n * ticks through different glyph widths. \n */\n font-variant-numeric: tabular-nums;\n text-align: center;\n overflow: hidden;\n}\n\n/*\n * Track of every appended `.boot-loader-status-line`. The driver writes\n * `--boot-loader-line` (0 = first line visible, 1 = second, \u2026) on this\n * element and the `transform` interpolates because `--boot-loader-line` is\n * registered as a typed `<number>` custom property below.\n */\n#boot-loader-status-track {\n display: flex;\n flex-direction: column;\n /*\n * The driver writes `transform: translateY(<index>em)` directly per\n * `status()` call (see `boot-loader.js`). The transition animates the\n * change so the new line slides in from below while the previous one\n * slides out at the top.\n */\n transform: translateY(0);\n transition: transform 500ms ease-out;\n}\n\n/* Honour reduced-motion preferences explicitly \u2014 `transition` doesn't auto-respect it. */\n@media (prefers-reduced-motion: reduce) {\n #boot-loader-status-track {\n transition: none;\n }\n}\n\n.boot-loader-status-line {\n flex: 0 0 auto;\n height: 1.5em;\n white-space: nowrap;\n}\n", "//\n// Copyright 2026 DXOS.org\n//\n\n// Inline driver script \u2014 injected into the host's `<body>` by `bootLoaderPlugin`.\n// Runs before the module bundle is fetched, so the host can observe `boot:html-parsed`\n// and update the visible status from `main.tsx` between phases.\n//\n// The loader has two host-driven states (plus an unobserved idle state on\n// script entry that's promoted automatically \u2014 there's no API to opt out of\n// motion on cold load, by design):\n// - State 1 (slow tick): auto-entered the moment the inline script runs;\n// asymptotic creep toward `STATE_1_ASYMPTOTE`%.\n// - State 2 (progress): host-driven, value supplied to `progress(fraction)`.\n// The creep stays alive in state 2 too, with a\n// ceiling that climbs `STATE_2_BUMP` percent ahead\n// of the most recent `progress()` call (capped at\n// `ABSOLUTE_CEILING`). Between sparse host updates\n// the ring keeps inching forward toward that\n// ceiling, so a long activation gap doesn't read\n// as a frozen disc.\n//\n// `window.__bootLoader.status(text)` updates the visible status line.\n// `window.__bootLoader.progress(fraction)` enter state 2 with `fraction` \u2208 [0, 1].\n// `window.__bootLoader.dismiss()` remove the loader DOM (terminal).\n//\n// Kept ES5-flavoured so the bundler never has to touch it.\n\n(function () {\n performance.mark('boot:html-parsed');\n\n // Asymptotic creep \u2014 `next = raw + (ceiling - raw) * creepRate` per tick,\n // so the var eases toward `ceiling` and never quite reaches it.\n var CREEP_TICK_MS = 100;\n // State 1 creep is a \"we're alive\" hint before any real progress lands,\n // so it eases gently toward a low asymptote.\n var STATE_1_RATE = 0.04;\n var STATE_1_ASYMPTOTE = 20;\n // State 2 creep bridges the gap between sparse `progress()` calls.\n // Tuning is a trade-off:\n // - Larger `STATE_2_RATE` \u2192 fills faster, but reaches the ceiling\n // sooner and then sits idle (looks \"paused\").\n // - Larger `STATE_2_BUMP` \u2192 ring leads further ahead of the host's\n // last reported value, so subsequent host updates feel \"behind\"\n // until they cross the lead.\n // Current values aim for continuous-but-modest motion through a ~5 s\n // activation silence: 50 % \u2192 ~64 % over 5 s, ceiling at host + 15 % so\n // real progress can catch up via `Math.max` without big jumps.\n var STATE_2_RATE = 0.05;\n var STATE_2_BUMP = 15;\n // Ring never auto-creeps past this \u2014 keeps the user from interpreting the\n // ring as \"almost done\" while the host hasn't actually said so.\n var ABSOLUTE_CEILING = 90;\n\n // 0 = idle (transient \u2014 auto-promoted to 1 immediately below),\n // 1 = slow tick, 2 = host-driven progress.\n var state = 0;\n var creepHandle = null;\n var creepCeiling = STATE_1_ASYMPTOTE;\n var creepRate = STATE_1_RATE;\n var trace = /(?:^|[?&])trace=1(?:&|$)/.test(window.location.search);\n var start = Date.now();\n var last = Date.now();\n var timings = [];\n\n function ensureCreep() {\n if (creepHandle != null) {\n return;\n }\n creepHandle = setInterval(function () {\n var element = document.getElementById('boot-loader-disc');\n if (!element) {\n return;\n }\n var raw = parseFloat(element.style.getPropertyValue('--boot-loader-bar-progress')) || 0;\n // Already at (or above) the ceiling \u2014 nothing to do this tick.\n if (raw >= creepCeiling - 0.1) {\n return;\n }\n var next = raw + (creepCeiling - raw) * creepRate;\n element.style.setProperty('--boot-loader-bar-progress', String(next));\n if (next > 0 && next < 100) {\n element.setAttribute('data-progress-active', '');\n }\n }, CREEP_TICK_MS);\n }\n\n function stopCreep() {\n if (creepHandle != null) {\n clearInterval(creepHandle);\n creepHandle = null;\n }\n }\n\n window.__bootLoader = {\n /**\n * Update the visible status line. The caller owns formatting \u2014 the\n * loader just renders `humanized` and records the structured fields\n * for the trace. Idempotent on the full structured payload: equal\n * back-to-back updates are a no-op, but two updates with the same\n * visible text and different `event` / `module` ids still produce a\n * fresh trace entry so the timeline can distinguish those transitions.\n *\n * Payload: `{ event?, module?, humanized, range? }`.\n * - `humanized`: the exact string to display (e.g. \"Loading framework\u2026\",\n * \"Activating Observability: react-surface\").\n * - `event` / `module`: optional raw ids for the trace, when the\n * update originates from an activation transition.\n * - `range`: optional `{ index, total }` for ticking progress within\n * a single phase (e.g. \"Loading plugins (12/80)\"). When present,\n * the loader replaces the current line in place rather than\n * appending a new one \u2014 so 80 plugin loads produce one trace\n * entry with an updating suffix instead of 80 separate lines.\n */\n status: function (payload) {\n if (!payload || typeof payload !== 'object') {\n return;\n }\n var humanized = payload.humanized || '';\n var event = payload.event || null;\n var moduleId = payload.module || null;\n var range =\n payload.range && typeof payload.range.index === 'number' && typeof payload.range.total === 'number'\n ? payload.range\n : null;\n // Display text appends the (i/n) suffix when a range is provided so\n // the same `humanized` string can tick through a count without the\n // caller having to format it.\n var displayText = range ? humanized + ' (' + range.index + '/' + range.total + ')' : humanized;\n // Compare against the previous entry's structured fields, not the\n // DOM text alone \u2014 two different transitions can humanize to the same\n // visible string (e.g. an event-level \"Activating Foo\" followed by a\n // module-level \"Activating Foo: react-surface\" reduced to \"Activating\n // Foo\" by a custom formatter), and the trace should still carry both.\n var previous = timings.length > 0 ? timings[timings.length - 1] : null;\n if (\n previous &&\n previous.text === displayText &&\n (previous.event || null) === event &&\n (previous.module || null) === moduleId\n ) {\n return;\n }\n if (range && previous) {\n // Range tick \u2014 collapse into the previous trace entry instead of\n // appending. The trace timeline records one transition per phase,\n // not one per `(i/n)` step, keeping the boot trace compact.\n previous.text = displayText;\n } else {\n if (previous) {\n previous.duration = Date.now() - last;\n }\n var entry = { text: displayText };\n if (event) {\n entry.event = event;\n }\n if (moduleId) {\n entry.module = moduleId;\n }\n timings.push(entry);\n last = Date.now();\n }\n var element = document.getElementById('boot-loader-status');\n if (!element) {\n return;\n }\n // The track holds every appended status line. On the first\n // `status()` call we hoist any pre-existing lines (the initial\n // status injected by `bootLoaderPlugin`) into the track so the\n // CSS `transform` translation applies uniformly.\n var track = document.getElementById('boot-loader-status-track');\n if (!track) {\n track = document.createElement('div');\n track.id = 'boot-loader-status-track';\n while (element.firstChild) {\n track.appendChild(element.firstChild);\n }\n element.appendChild(track);\n }\n var lastLine = track.lastElementChild;\n if (range && lastLine) {\n // Range tick \u2014 replace the current visible line's text in place,\n // no slide. The line keeps its position so the (i/n) counter just\n // updates over the same row.\n lastLine.textContent = displayText;\n } else {\n // Fresh phase (or first line) \u2014 append and slide the track up so\n // the new line aligns with the single-line viewport. The CSS\n // `transition` on the track's `transform` eases the move; we\n // measure in pixels (not `em`) because some engines (and headless\n // Chromium) don't reliably interpolate `transform` between\n // `em`-valued translateY's.\n var line = document.createElement('div');\n line.className = 'boot-loader-status-line';\n line.textContent = displayText;\n track.appendChild(line);\n var lineHeight = line.getBoundingClientRect().height || 0;\n track.style.transform = 'translateY(' + (track.children.length - 1) * -lineHeight + 'px)';\n }\n },\n\n /**\n * Enter state 2 (host-driven progress) \u2014 set the determinate ring to\n * `fraction` \u2208 [0, 1]. Invalid / negative / non-finite values clamp to\n * 0 (the empty ring) rather than letting `NaN`/`Infinity` slip into\n * `--boot-loader-bar-progress`, which CSS would treat as invalid and\n * silently reset to the 0% var() default. The state-1 creep timer is\n * left running with a new ceiling so the ring keeps inching forward\n * between host updates.\n *\n * The ring never regresses: if the requested value is below the\n * current var (e.g. the host's first call is `progress(0)` while the\n * creep had already reached ~12%), the existing value is held. The\n * host's progress catches up once it exceeds the held floor, so the\n * ring's motion stays monotonic across the state-1 \u2192 state-2 boundary.\n */\n progress: function (fraction) {\n state = 2;\n // Set the var on the disc so both the masked ring and the orbiting\n // dot (siblings inside `#boot-loader-disc`) inherit the same value.\n var element = document.getElementById('boot-loader-disc');\n if (!element) {\n return;\n }\n // Flip into \"host-driven\" mode the first time `progress()` lands \u2014\n // CSS keys the brand mark's grayscale\u2192color transition off this\n // attribute, so the mark eases from monochrome to full palette as\n // real progress starts arriving.\n element.setAttribute('data-host-driven', '');\n var clamped = typeof fraction !== 'number' || !isFinite(fraction) || fraction < 0 ? 0 : Math.min(1, fraction);\n var requestedPct = clamped * 100;\n var currentPct = parseFloat(element.style.getPropertyValue('--boot-loader-bar-progress')) || 0;\n var nextPct = Math.max(currentPct, requestedPct);\n element.style.setProperty('--boot-loader-bar-progress', String(nextPct));\n // Switch the ongoing creep to its state-2 cadence \u2014 faster ease and\n // a larger lead bump so the ring keeps moving while the host is\n // silent (e.g. composer-app's \"Starting Composer\u2026\" stretch while the\n // first slow plugin module activates).\n creepRate = STATE_2_RATE;\n var newCeiling = Math.min(nextPct + STATE_2_BUMP, ABSOLUTE_CEILING);\n if (newCeiling > creepCeiling) {\n creepCeiling = newCeiling;\n }\n ensureCreep();\n // Toggle the leading-edge dot only while progress is strictly in (0, 1).\n if (nextPct > 0 && nextPct < 100) {\n element.setAttribute('data-progress-active', '');\n } else {\n element.removeAttribute('data-progress-active');\n }\n },\n\n dismiss: function () {\n stopCreep();\n var element = document.getElementById('boot-loader');\n if (element && element.parentNode) {\n element.parentNode.removeChild(element);\n }\n\n if (trace) {\n if (timings.length > 0) {\n timings[timings.length - 1].duration = Date.now() - last;\n }\n console.log(JSON.stringify({ total: Date.now() - start, timings }, null, 2));\n }\n },\n };\n\n // Auto-promote idle \u2192 slow tick the moment this inline script executes,\n // so the disc starts moving on the very first frame the loader paints.\n // The host calls `progress()` later to take over.\n state = 1;\n ensureCreep();\n})();\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { type Plugin } from 'vite';\n\nimport css from './boot-loader.css?raw';\nimport driverScript from './boot-loader.js?raw';\n\n/**\n * Options for {@link bootLoaderPlugin}.\n */\nexport type BootLoaderOptions = {\n /**\n * Initial status text rendered by the loader (replaced via\n * `window.__bootLoader.status(...)` once the host starts firing phase callbacks).\n */\n status?: string;\n\n /**\n * Inline SVG markup for an optional brand mark rendered above the progress bar.\n * The mark renders at full opacity with whatever fills the SVG declares, so\n * pass a colour-palette logo for the strongest visual identity. SVGs that use\n * `fill=\"currentColor\"` still inherit the loader's `prefers-color-scheme`\n * text colour. Leave empty/undefined to render only the bar.\n */\n markSvg?: string;\n};\n\n/**\n * Vite plugin that injects a tiny native-DOM \"boot loader\" into the host app's\n * `index.html`.\n *\n * The loader paints on the very first frame, before any JS bundle is fetched —\n * so the user sees something immediately on cold load instead of staring at a\n * blank document while the compiled module graph is parsed. The brand mark\n * sits centred inside a thin determinate progress ring; both layers are\n * composited so the ring's fill stays visually smooth even while the JS main\n * thread is busy.\n *\n * The host app drives the loader from `main.tsx`:\n *\n * - `window.__bootLoader.status(text)` updates the status line per phase.\n * - `window.__bootLoader.progress(fraction)` grows the determinate ring (0–1).\n * - `window.__bootLoader.dismiss()` removes the loader once React has mounted.\n *\n * Inject order:\n * - `<style>` → `<head>` (parses before any bundled stylesheet).\n * - `<div id=\"boot-loader\">…</div>` → start of `<body>` (sibling of `#root`).\n * - inline `<script>` defining `window.__bootLoader` → start of `<body>`.\n *\n * Keeping the loader as a sibling of `#root` (rather than a child of it) means\n * `createRoot(document.getElementById('root')).render(...)` does not fight the\n * loader for ownership; the host explicitly calls `dismiss()` after the first\n * React commit, which gives a deterministic handoff.\n *\n * Color tokens are exposed as CSS custom properties (`--boot-loader-bg-light`,\n * `--boot-loader-bg-dark`, etc.) defined in `boot-loader.css`, so consumers can\n * override them at the document level without us re-parameterizing this plugin.\n */\nexport const bootLoaderPlugin = ({ status, markSvg }: BootLoaderOptions = {}): Plugin => {\n return {\n name: 'app-framework:boot-loader',\n transformIndexHtml() {\n // The mark slot uses `children: <raw-svg>` (vite emits string children as\n // raw HTML, not text-escaped) so the host can pass an SVG file's contents\n // straight through. The mark and ring are siblings inside `#boot-loader-disc`\n // so CSS grid-stacking can centre the mark inside the ring without the ring's\n // radial-gradient mask clipping the SVG.\n const markChildren = markSvg ? [{ tag: 'div', attrs: { id: 'boot-loader-mark' }, children: markSvg }] : [];\n\n return [\n {\n tag: 'style',\n injectTo: 'head',\n children: css,\n },\n {\n tag: 'div',\n injectTo: 'body-prepend',\n attrs: {\n id: 'boot-loader',\n role: 'status',\n 'aria-live': 'polite',\n 'aria-label': 'Initializing',\n },\n children: [\n {\n tag: 'div',\n attrs: { id: 'boot-loader-disc' },\n children: [\n { tag: 'div', attrs: { id: 'boot-loader-bar' }, children: '' },\n { tag: 'div', attrs: { id: 'boot-loader-dot' }, children: '' },\n ...markChildren,\n ],\n },\n {\n tag: 'div',\n attrs: { id: 'boot-loader-status' },\n children: status ? [{ tag: 'div', attrs: { class: 'boot-loader-status-line' }, children: status }] : [],\n },\n ],\n },\n {\n tag: 'script',\n injectTo: 'body-prepend',\n children: driverScript,\n },\n ];\n },\n };\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { PLUGIN_ENTRY_FILENAME } from '@dxos/protocols';\n\nimport { type Plugin } from '../core';\n\n/**\n * Name of the asset written alongside the built module bundle.\n * The DXOS community registry resolves each published plugin by fetching this file\n * from the repo's latest GitHub Release, so authors should not rename it.\n */\nexport const MANIFEST_ASSET_NAME = 'manifest.json';\n\n/**\n * Canonical entry filename (re-exported from `@dxos/protocols`) so vite-plugin\n * consumers don't have to reach into the protocols package directly.\n */\nexport const ENTRY_FILENAME = PLUGIN_ENTRY_FILENAME;\n\n/**\n * Plugin metadata required to emit a manifest at build time.\n *\n * Extends `Plugin.Meta` with a build-time `version` field that is not\n * relevant to the runtime plugin definition itself.\n */\nexport type BuildMeta = Plugin.Meta & { version: string };\n\n/**\n * Serializes a plugin's public metadata + bundle layout into the format consumed\n * by the host loader (see `UrlLoader.make` and `PluginManifest.parse`).\n *\n * The host fetches this manifest, resolves every entry in `assets` against the\n * manifest URL, and persists them via the platform `PluginAssetCache` so the\n * plugin works offline. The entry module is always {@link ENTRY_FILENAME}; it\n * must appear in `assets`.\n *\n * Exported from a vite-free module so tests and tooling can validate manifests\n * without paying the cost of loading vite + esbuild.\n */\nexport const serializeManifest = (meta: BuildMeta, { assets }: { assets: readonly string[] }): string =>\n JSON.stringify(\n {\n ...meta,\n assets,\n },\n null,\n 2,\n );\n", "//\n// Copyright 2026 DXOS.org\n//\n\n/**\n * Packages shared between the Composer host app and remote plugins.\n *\n * {@link DEFAULT_PACKAGES} is the single source of truth: `importMapPlugin` emits\n * one wrapper chunk per entry so the host serves it at runtime, and `composerPlugin`\n * (via {@link isSharedPackage}) externalizes the same set from plugin bundles.\n * Adding a new `@dxos/*` (or third-party) package that plugins may depend on means\n * adding it here — in one place — so the externalization contract stays in sync\n * with what the host actually provides.\n *\n * Every entry must also be a **direct** dependency of composer-app's `package.json`,\n * including packages that are only re-exported by an umbrella (e.g. via subpath\n * re-exports from another listed package). pnpm doesn't symlink transitive deps\n * into a package's own `node_modules`, so the import-map plugin's `this.resolve`\n * call fails for transitive-only entries and the importmap silently drops them —\n * leaving plugins with bare specifiers the host can't satisfy at install time.\n *\n * Plugin packages (`@dxos/plugin-*`) are intentionally NOT listed: community plugins\n * bundle their own copy of any plugin-subpath import, which is safe because those\n * exports are limited to lightweight types/operation defs.\n */\n\n/**\n * Non-`@dxos/*` packages the Composer host provides to plugins via import map.\n * Spread into {@link DEFAULT_PACKAGES} so the third-party set lives in one place.\n */\nconst THIRD_PARTY_SHARED_PACKAGES = [\n '@effect-atom/atom',\n '@effect-atom/atom-react',\n '@effect/platform',\n 'effect',\n 'lit',\n 'react',\n 'react-dom',\n 'solid-js',\n];\n\nexport const DEFAULT_PACKAGES = [\n // packages/common\n '@dxos/async',\n '@dxos/codec-protobuf',\n '@dxos/context',\n '@dxos/crypto',\n '@dxos/debug',\n '@dxos/display-name',\n '@dxos/effect',\n '@dxos/effect-atom-solid',\n '@dxos/errors',\n '@dxos/feed-store',\n '@dxos/graph',\n '@dxos/hypercore',\n '@dxos/invariant',\n '@dxos/keyboard',\n '@dxos/keys',\n '@dxos/kv-store',\n '@dxos/log',\n '@dxos/merkle-search-tree',\n '@dxos/random',\n '@dxos/random-access-storage',\n '@dxos/timeframe',\n '@dxos/tracing',\n '@dxos/util',\n '@dxos/web-context',\n '@dxos/web-context-react',\n '@dxos/web-context-solid',\n\n // packages/core/echo\n '@dxos/echo',\n '@dxos/echo-atom',\n '@dxos/echo-db',\n '@dxos/echo-pipeline',\n '@dxos/echo-protocol',\n '@dxos/echo-query',\n '@dxos/echo-react',\n '@dxos/echo-solid',\n '@dxos/feed',\n '@dxos/index-core',\n\n // packages/core/halo\n '@dxos/credentials',\n '@dxos/keyring',\n\n // packages/core/mesh\n '@dxos/edge-client',\n '@dxos/messaging',\n '@dxos/network-manager',\n '@dxos/rpc',\n '@dxos/rpc-tunnel',\n '@dxos/teleport',\n '@dxos/teleport-extension-automerge-replicator',\n '@dxos/teleport-extension-gossip',\n '@dxos/teleport-extension-object-sync',\n '@dxos/teleport-extension-replicator',\n '@dxos/websocket-rpc',\n\n // packages/core\n '@dxos/ai',\n '@dxos/assistant',\n '@dxos/assistant-toolkit',\n '@dxos/blueprints',\n '@dxos/compute',\n '@dxos/conductor',\n '@dxos/functions',\n '@dxos/functions-runtime',\n '@dxos/mcp-client',\n '@dxos/operation',\n '@dxos/protocols',\n\n // packages/devtools\n '@dxos/devtools',\n\n // packages/sdk\n '@dxos/app-framework',\n '@dxos/app-graph',\n '@dxos/app-solid',\n '@dxos/app-toolkit',\n '@dxos/client',\n '@dxos/client-protocol',\n '@dxos/client-services',\n '@dxos/config',\n '@dxos/migrations',\n '@dxos/observability',\n '@dxos/react-client',\n '@dxos/react-edge-client',\n '@dxos/schema',\n '@dxos/types',\n\n // packages/ui\n '@dxos/lit-grid',\n '@dxos/lit-ui',\n '@dxos/react-hooks',\n '@dxos/react-ui',\n '@dxos/react-ui-attention',\n '@dxos/react-ui-board',\n '@dxos/react-ui-calendar',\n '@dxos/react-ui-canvas',\n '@dxos/react-ui-canvas-compute',\n '@dxos/react-ui-canvas-editor',\n '@dxos/react-ui-chat',\n '@dxos/react-ui-components',\n '@dxos/react-ui-dnd',\n '@dxos/react-ui-editor',\n '@dxos/react-ui-form',\n '@dxos/react-ui-gameboard',\n '@dxos/react-ui-geo',\n '@dxos/react-ui-graph',\n '@dxos/react-ui-grid',\n '@dxos/react-ui-list',\n '@dxos/react-ui-markdown',\n '@dxos/react-ui-masonry',\n '@dxos/react-ui-menu',\n '@dxos/react-ui-mosaic',\n '@dxos/react-ui-pickers',\n '@dxos/react-ui-list',\n '@dxos/react-ui-sfx',\n '@dxos/react-ui-stack',\n '@dxos/react-ui-syntax-highlighter',\n '@dxos/react-ui-table',\n '@dxos/react-ui-tabs',\n '@dxos/react-ui-text-tooltip',\n '@dxos/react-ui-thread',\n '@dxos/solid-ui',\n '@dxos/solid-ui-geo',\n '@dxos/ui',\n '@dxos/ui-editor',\n '@dxos/ui-theme',\n '@dxos/ui-types',\n\n // third-party\n ...THIRD_PARTY_SHARED_PACKAGES,\n];\n\n/**\n * True when the given bare specifier (or one of its subpaths) is provided by the\n * Composer host at runtime and must not be re-bundled by a plugin.\n *\n * Matches only packages listed in {@link DEFAULT_PACKAGES} — the same list\n * {@link importMapPlugin} consumes — so externalization cannot claim a package\n * the host isn't actually mapping. Unknown `@dxos/*` packages fall through to\n * normal bundling, which is the correct default for plugin-owned or yet-to-be\n * shared workspace packages.\n */\nexport const isSharedPackage = (id: string): boolean =>\n DEFAULT_PACKAGES.some((pkg) => id === pkg || id.startsWith(`${pkg}/`));\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { type Plugin as VitePlugin } from 'vite';\n\nimport { type BuildMeta, ENTRY_FILENAME, MANIFEST_ASSET_NAME, serializeManifest } from '../manifest';\nimport { DEFAULT_PACKAGES, isSharedPackage } from '../packages';\n\nexport { ENTRY_FILENAME, MANIFEST_ASSET_NAME, serializeManifest };\nexport type { BuildMeta };\n\nconst JSX_DEV_RUNTIME = 'react/jsx-dev-runtime';\n\n/**\n * Whether an import should be externalized by the plugin bundle.\n * Uses the shared-package predicate directly so plugins automatically pick up any\n * new `@dxos/*` (non-plugin) package the host provides, without a code change here.\n */\nconst isExternal = (id: string) => id !== JSX_DEV_RUNTIME && isSharedPackage(id);\n\n/**\n * Banner injected at the top of every plugin bundle.\n *\n * Why: rolldown emits ESM `import` for externalized deps, but when a *bundled* module\n * is CJS and contains `require('react')` (or any other external), rolldown keeps the\n * `require(...)` call in the output and relies on a runtime `require` function. The\n * browser doesn't have `require`, so rolldown's fallback shim throws:\n * `Calling `require` for \"react\" in an environment that doesn't expose the `require`\n * function`.\n *\n * The full dependency graphs of non-trivial plugins unavoidably drag in CJS-only\n * helpers (`use-sync-external-store` via xstate / zustand / preact-signals / … ),\n * and waiting for every one of those packages to ship ESM isn't realistic. Instead\n * we install a tiny module-local `require` at the top of the bundle that looks up\n * a handful of well-known host-provided modules by name and returns their already\n * ESM-imported namespaces. Rolldown's own shim honours an existing `require`\n * before falling through to the throw path, so this entirely removes the runtime\n * error without changing how externalization itself works.\n *\n * Keep the list aligned with the externals that CJS code actually reaches for;\n * adding entries here is safe (unused imports get tree-shaken), but the list is\n * deliberately small to keep the banner noise-free.\n */\nconst REQUIRE_SHIM_BANNER = [\n '// --- composer-plugin: CJS require shim ---',\n '// See @dxos/app-framework/vite-plugin/composer-plugin.ts for rationale.',\n \"import * as __composerReact from 'react';\",\n \"import * as __composerReactDom from 'react-dom';\",\n \"import * as __composerReactJsxRuntime from 'react/jsx-runtime';\",\n 'const __composerRequireShim = new Map([',\n \" ['react', __composerReact.default ?? __composerReact],\",\n \" ['react-dom', __composerReactDom.default ?? __composerReactDom],\",\n \" ['react/jsx-runtime', __composerReactJsxRuntime],\",\n ']);',\n \"// Module-local binding: rolldown's CJS fallback does a `typeof require` check\",\n '// and uses whichever `require` is in lexical scope. Declaring this as `const`',\n \"// (instead of `globalThis.require ??=`) keeps each bundle's shim isolated from\",\n '// the host page and from other plugins sharing the window.',\n 'const require = (id) => {',\n ' if (__composerRequireShim.has(id)) return __composerRequireShim.get(id);',\n \" throw new Error('composer-plugin: unsupported CJS require at runtime: ' + id);\",\n '};',\n '// --- end CJS require shim ---',\n].join('\\n');\n\nexport type ComposerPluginOptions = {\n /** Entry point for the plugin bundle. Defaults to `src/plugin.tsx`. */\n entry?: string;\n /** Dev server port. Defaults to `3967`. */\n port?: number;\n /**\n * Plugin metadata. When provided, a `manifest.json` asset is emitted alongside the bundle\n * listing every emitted file. The host fetches this manifest at install time and persists\n * the declared assets in its offline cache so the plugin works without network. The bundle's\n * entry module is always written as {@link ENTRY_FILENAME} (`index.mjs`).\n */\n meta?: BuildMeta;\n};\n\n/**\n * Vite plugin for **external Composer plugin projects**. Configures the build to produce\n * an ESM bundle that externalizes all framework dependencies, which the Composer host app\n * provides at runtime via import map.\n *\n * Handles:\n * 1. Build config — lib mode entry point, ES format output, rollup externals, code-split chunks.\n * 2. Dev externalization — marks shared deps as external during `vite serve` and strips\n * the `/@id/` prefix that Vite's import analysis adds to external bare specifiers.\n * 3. JSX dev runtime shim — bridges `react/jsx-dev-runtime` (used by React refresh in dev)\n * to `react/jsx-runtime` (which is what the externalized React provides).\n * 4. Manifest emit — when `meta` is supplied, writes `manifest.json` next to the bundled\n * module listing every emitted asset (entry, CSS, chunks, etc.) so the host can eagerly\n * cache them for offline use.\n */\nexport const composerPlugin = (options?: ComposerPluginOptions): VitePlugin[] => {\n const entry = options?.entry ?? 'src/plugin.tsx';\n const port = options?.port ?? 3967;\n const meta = options?.meta;\n const resolved = new Set<string>();\n let base = '/';\n\n const plugins: VitePlugin[] = [\n // Configure vite for library-mode builds with externalized deps.\n {\n name: 'composer-plugin',\n config: () => ({\n server: {\n port,\n // Allow the Composer host (different origin) to dynamically import plugin modules.\n cors: true,\n },\n preview: { port },\n build: {\n sourcemap: true,\n // Transitively-bundled WASM modules (automerge, tiktoken, …) emit top-level\n // await; `esnext` lets rolldown pass that through without an explicit polyfill.\n target: 'esnext',\n lib: {\n entry,\n formats: ['es'],\n fileName: () => ENTRY_FILENAME,\n },\n rolldownOptions: {\n external: (id: string) => isExternal(id),\n output: {\n chunkFileNames: 'chunks/[name]-[hash].js',\n assetFileNames: 'assets/[name]-[hash][extname]',\n // Install the CJS require shim at the top of plugin.mjs so transitively\n // bundled CJS helpers (that call `require('react')` et al. at runtime) can\n // resolve against the host-provided externals instead of throwing.\n banner: REQUIRE_SHIM_BANNER,\n },\n },\n },\n }),\n },\n\n // Dev-time externalization.\n // Vite's dev server doesn't use rollup externals, so we need to handle it manually.\n // We intercept imports of shared deps at resolve time, mark them external, and then\n // strip the `/@id/` prefix that Vite's import analysis injects for external modules.\n {\n name: 'composer-plugin:externalize',\n enforce: 'pre',\n apply: 'serve',\n // Exclude shared packages from Vite's dependency pre-bundling.\n config: () => ({\n optimizeDeps: {\n exclude: DEFAULT_PACKAGES,\n },\n }),\n // Mark shared deps as external so Vite doesn't try to bundle them.\n resolveId: (id) => {\n if (isExternal(id)) {\n resolved.add(id);\n return { id, external: true };\n }\n },\n // Return a stub for any externalized module that Vite tries to load directly.\n load: (id) => {\n if (resolved.has(id)) {\n return { code: 'export default {};' };\n }\n },\n // After all plugins are resolved, inject a late-stage transform plugin that strips\n // the `/@id/` prefix from externalized bare specifiers in the output.\n // This must run after Vite's internal import analysis which rewrites bare specifiers.\n configResolved: (config) => {\n base = config.base ?? '/';\n (config.plugins as VitePlugin[]).push({\n name: 'composer-plugin:strip-prefix',\n transform: (code: string) => {\n if (resolved.size === 0) {\n return;\n }\n const escaped = [...resolved].map((s) => s.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')).join('|');\n const pattern = new RegExp(`${base}@id/(${escaped})`, 'g');\n if (pattern.test(code)) {\n return code.replace(pattern, (_: string, dep: string) => dep);\n }\n },\n });\n },\n },\n\n // JSX dev runtime shim.\n // React refresh (used by @vitejs/plugin-react) imports from `react/jsx-dev-runtime`,\n // but the externalized React only exposes `react/jsx-runtime`. This virtual module\n // bridges the gap by re-exporting jsx-runtime's functions under jsx-dev-runtime's API.\n {\n name: 'composer-plugin:jsx-dev-shim',\n enforce: 'pre',\n apply: 'serve',\n resolveId: (id) => (id === JSX_DEV_RUNTIME ? `\\0${JSX_DEV_RUNTIME}` : undefined),\n load: (id) =>\n id === `\\0${JSX_DEV_RUNTIME}`\n ? [\n 'import { jsx, jsxs, Fragment } from \"react/jsx-runtime\";',\n 'export { Fragment };',\n 'export function jsxDEV(type, props, key, isStaticChildren) {',\n ' return isStaticChildren ? jsxs(type, props, key) : jsx(type, props, key);',\n '}',\n ].join('\\n')\n : undefined,\n },\n\n // React Refresh preamble stub.\n //\n // @vitejs/plugin-react's JSX transform prepends a runtime check to every module:\n // if (!window.$RefreshReg$) throw new Error(\"@vitejs/plugin-react can't detect preamble…\");\n // In a normal single-origin app, vite injects a `<script type=\"module\">` preamble\n // into `index.html` that sets up `$RefreshReg$` / `$RefreshSig$` on `window` before any\n // app code runs. When a community plugin is dev-served at its own origin and then\n // dynamic-imported into the Composer host at a different origin, the host's window\n // never receives that preamble, so every JSX module throws on first import.\n //\n // Inject a no-op refresh shim on the host's window from the plugin's entrypoint: fast-\n // refresh itself doesn't work cross-origin anyway, so silencing the check lets the\n // plugin load and ordinary page reloads take care of picking up edits. Production\n // builds are untouched (`apply: 'serve'`).\n {\n name: 'composer-plugin:react-refresh-shim',\n enforce: 'pre',\n apply: 'serve',\n transform(code, id) {\n // Only patch the plugin entrypoint (an absolute path ending in the configured entry).\n // Matching by suffix keeps us from prepending the shim to every transformed module,\n // which would both bloat the output and defeat vite's caching.\n if (!id.endsWith(entry.replace(/^\\.?\\//, '/'))) {\n return;\n }\n const shim = [\n '// composer-plugin: no-op React Refresh shim so cross-origin plugin modules',\n \"// don't throw the @vitejs/plugin-react preamble check at dynamic-import time.\",\n 'if (typeof window !== \"undefined\") {',\n ' window.$RefreshReg$ = window.$RefreshReg$ || (() => {});',\n ' window.$RefreshSig$ = window.$RefreshSig$ || (() => (type) => type);',\n ' window.__vite_plugin_react_preamble_installed__ = true;',\n '}',\n '',\n ].join('\\n');\n return { code: shim + code, map: null };\n },\n },\n ];\n\n if (meta) {\n // Emit `manifest.json` alongside the built module listing every emitted asset, so the\n // dist directory can be uploaded as-is to a GitHub Release for the DXOS community\n // registry to pick up. The host loader fetches this file at install time and eagerly\n // caches every listed asset for offline use.\n plugins.push({\n name: 'composer-plugin:emit-manifest',\n apply: 'build',\n // `enforce: 'post'` is load-bearing: vite's CSS extraction plugin emits sibling\n // `.css` assets in its own `generateBundle` hook. Without `post`, ours runs first\n // and sees only the JS chunks — the manifest then omits CSS, so the host can't\n // inject `<link>` tags for the plugin's stylesheet at install time.\n enforce: 'post',\n generateBundle(_options, bundle) {\n // Source maps are large and only fetched when devtools opens — exclude them\n // from the manifest so the host doesn't precache megabytes of debug data.\n const assets = Object.keys(bundle)\n .filter((name) => name !== MANIFEST_ASSET_NAME && !name.endsWith('.map'))\n .sort();\n this.emitFile({\n type: 'asset',\n fileName: MANIFEST_ASSET_NAME,\n source: serializeManifest(meta, { assets }),\n });\n },\n });\n }\n\n return plugins;\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { init as initCjsLexer, parse as parseCjs } from 'cjs-module-lexer';\nimport { existsSync, readFileSync, readdirSync, statSync } from 'node:fs';\nimport { createRequire as nodeCreateRequire } from 'node:module';\nimport path from 'node:path';\nimport { type Plugin } from 'vite';\n\nimport { DEFAULT_PACKAGES } from '../packages';\n\nconst require = nodeCreateRequire(import.meta.url);\n\n//\n// Import map helpers.\n// These utilities support `importMapPlugin` by resolving package entrypoints,\n// detecting module formats (ESM vs CJS), and extracting named exports from CJS bundles.\n//\n\n/** Strips vite query strings (e.g. `?v=123`) from resolved module IDs. */\nconst trimQueryString = (id: string) => id.replace(/\\?.*$/, '');\n\n/**\n * Determines whether a resolved file is an ESM module by checking file extension\n * first (.mjs/.cjs), then walking up to the nearest package.json for `\"type\": \"module\"`.\n */\nconst resolvedIdIsEsmModule = (resolvedId: string): boolean => {\n const file = trimQueryString(resolvedId);\n if (file.endsWith('.mjs') || file.endsWith('.mts')) {\n return true;\n }\n if (file.endsWith('.cjs') || file.endsWith('.cts')) {\n return false;\n }\n\n let directory = path.dirname(file);\n while (directory !== path.dirname(directory)) {\n const packageJsonPath = path.join(directory, 'package.json');\n if (existsSync(packageJsonPath)) {\n try {\n const pkg = JSON.parse(readFileSync(packageJsonPath, 'utf8')) as { type?: string };\n return pkg.type === 'module';\n } catch {\n return false;\n }\n }\n directory = path.dirname(directory);\n }\n\n return false;\n};\n\n/**\n * Walks up from a resolved file path to find the package.json whose `\"name\"` matches\n * the given package name. Returns the path to that package.json, or undefined.\n */\nconst findPackageJsonPath = (resolvedId: string, packageName: string): string | undefined => {\n let directory = path.dirname(trimQueryString(resolvedId));\n\n while (directory !== path.dirname(directory)) {\n const packageJsonPath = path.join(directory, 'package.json');\n if (existsSync(packageJsonPath)) {\n try {\n const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8')) as { name?: string };\n if (packageJson.name === packageName) {\n return packageJsonPath;\n }\n } catch {}\n }\n\n directory = path.dirname(directory);\n }\n\n return undefined;\n};\n\n/** Resolves a package name to its package.json path using Node's require.resolve. */\nconst resolvePackageJsonPath = (packageName: string): string | undefined => {\n try {\n return findPackageJsonPath(require.resolve(packageName), packageName);\n } catch {\n return undefined;\n }\n};\n\n/**\n * Resolves a package name to its package.json via vite's own resolver, which handles\n * workspace-linked packages whose `exports` field omits `./package.json` (so\n * `require.resolve` can't find it). Falls back to `require.resolve`.\n */\nconst resolvePackageJsonPathViaContext = async (\n ctx: { resolve: (id: string) => Promise<{ id: string } | null> },\n packageName: string,\n): Promise<string | undefined> => {\n try {\n const resolved = await ctx.resolve(packageName);\n if (resolved) {\n const viaResolved = findPackageJsonPath(resolved.id, packageName);\n if (viaResolved) {\n return viaResolved;\n }\n }\n } catch {\n // fall through\n }\n return resolvePackageJsonPath(packageName);\n};\n\n/**\n * Subpath exports that should be excluded from the import map.\n * These are node-only entrypoints (vite plugins, native addons) that shouldn't be pre-bundled for the browser.\n *\n * TODO(wittjosiah): Replace these hand-maintained lists (plus {@link GLOBALLY_EXCLUDED_SUBPATHS}\n * and {@link BUILD_TOOL_SUBPATH}) with a structural check — e.g. honour an `agent`/`node`-only\n * export condition in package.json, or probe each subpath's resolved file for `node:*` imports\n * at build time — so every new server-only entrypoint doesn't require a code change here.\n */\nconst importMapExcludedSubpaths: Readonly<Record<string, ReadonlySet<string>>> = {\n '@dxos/app-framework': new Set(['vite-plugin']),\n // `@dxos/lit-grid/testing` re-exports a playwright page-object manager and pulls\n // `@playwright/test` (and transitive playwright-core) into the browser bundle.\n '@dxos/lit-grid': new Set(['testing']),\n '@dxos/react-ui-mosaic': new Set(['playwright']),\n '@dxos/react-ui-stack': new Set(['playwright']),\n '@dxos/react-ui-table': new Set(['playwright']),\n '@dxos/ui-theme': new Set(['plugin']),\n // `solid-js/web/storage` is a server-only helper that pulls\n // `node:async_hooks` (AsyncLocalStorage) and has no browser shim. Client\n // code imports `solid-js`, `solid-js/store`, and `solid-js/web` only.\n 'solid-js': new Set(['web/storage']),\n};\n\n/**\n * Subpaths common to many packages that should always be excluded.\n * `./playwright` subdirectories house e2e test harnesses that pull in\n * `@playwright/test` (a node-only package that breaks the browser bundle).\n * `./testing` subpaths similarly expose node-only test helpers (e.g.\n * `@dxos/edge-client/testing` pulls `@dxos/node-std/http` which has no\n * browser analogue) and aren't part of the plugin-facing surface.\n */\nconst GLOBALLY_EXCLUDED_SUBPATHS = new Set(['playwright', 'testing']);\n\n/**\n * Regex for subpaths that are always node-only build tooling — vite, esbuild, and\n * rollup plugins. These use `node:*` imports and will blow up the browser bundle if\n * they end up in the import map.\n */\nconst BUILD_TOOL_SUBPATH = /^(vite-plugin|esbuild-plugin|rollup-plugin|plugin)$/;\n\n/**\n * Asset subpaths (CSS, PCSS, images, etc.) that the host already loads via its own\n * bundle — for example `@dxos/react-ui-form` pulls in `@dxos/lit-ui/dx-tag-picker.pcss`\n * on startup, so the stylesheet is already attached to the DOM by the time a remote\n * plugin runs. Community plugins should still be able to _import_ those specifiers\n * (rolldown leaves the `import \"…\"` statements in the output when the package is\n * externalized), so the import map maps them to a no-op empty ES module. The\n * resulting browser fetch is a cheap no-op; the styles are never re-downloaded\n * and never re-injected.\n */\nconst ASSET_SUBPATH = /\\.(css|pcss|scss|sass|less|json|node|wasm|html|svg|png|jpe?g|gif|webp|ico)$/;\nconst isAssetSubpath = (specifier: string) => ASSET_SUBPATH.test(specifier);\n\n/**\n * Walks `baseDir` and returns every file that matches the pattern `${baseDir}/<rest>${extension}`.\n * Used to expand wildcard exports like `./proto/*` → `./dist/src/proto/gen/*.js` into their\n * full set of bare specifiers.\n */\nconst walkDirectoryForExtension = (baseDir: string, extension: string): string[] => {\n if (!existsSync(baseDir)) {\n return [];\n }\n const results: string[] = [];\n const walk = (dir: string) => {\n let entries: string[];\n try {\n entries = readdirSync(dir);\n } catch {\n return;\n }\n for (const entry of entries) {\n const full = path.join(dir, entry);\n let stat;\n try {\n stat = statSync(full);\n } catch {\n continue;\n }\n if (stat.isDirectory()) {\n walk(full);\n } else if (entry.endsWith(extension)) {\n results.push(path.relative(baseDir, full).slice(0, -extension.length));\n }\n }\n };\n walk(baseDir);\n return results;\n};\n\n/** Resolves an `exports` value to a single target path for pattern expansion. */\nconst pickPatternTarget = (value: unknown): string | undefined => {\n if (typeof value === 'string') {\n return value;\n }\n if (value && typeof value === 'object') {\n const obj = value as Record<string, unknown>;\n const preferred = obj.browser ?? obj.import ?? obj.default ?? obj.module;\n return typeof preferred === 'string' ? preferred : undefined;\n }\n return undefined;\n};\n\n/**\n * Expands a wildcard export like `./proto/*` into concrete subpath specifiers by walking\n * the target directory. Returns `<packageName>/<subpath>` strings.\n */\nconst expandWildcardExport = (\n packageName: string,\n packageJsonDir: string,\n exportKey: string,\n exportValue: unknown,\n): string[] => {\n const target = pickPatternTarget(exportValue);\n if (!target || !target.includes('*')) {\n return [];\n }\n // Split on `*` — at most one supported (node's exports pattern semantics).\n const keyStarIndex = exportKey.indexOf('*');\n const targetStarIndex = target.indexOf('*');\n if (keyStarIndex === -1 || targetStarIndex === -1) {\n return [];\n }\n const keyPrefix = exportKey.slice(2, keyStarIndex); // drop leading './'\n const targetPrefix = target.slice(2, targetStarIndex); // drop leading './'\n const targetSuffix = target.slice(targetStarIndex + 1);\n const baseDir = path.resolve(packageJsonDir, targetPrefix);\n const files = walkDirectoryForExtension(baseDir, targetSuffix || '.js');\n return files.map((relativeNoExt) => `${packageName}/${keyPrefix}${relativeNoExt}`);\n};\n\n/**\n * Reads a package's `exports` field and returns all subpath entrypoints as bare specifiers\n * (e.g. `@dxos/client`, `@dxos/client/echo`, `@dxos/lit-ui/dx-tag-picker.pcss`,\n * `@dxos/protocols/proto/dxos/echo/metadata`). Wildcard patterns are expanded by walking\n * the corresponding output directory. Falls back to just the package name if exports is\n * absent or simple.\n */\nconst getPackageEntrypoints = (packageName: string, packageJsonPath: string): string[] => {\n const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8')) as {\n exports?: Record<string, unknown> | string | string[];\n };\n const exportsField = packageJson.exports;\n\n if (!exportsField || typeof exportsField === 'string' || Array.isArray(exportsField)) {\n return [packageName];\n }\n\n const exportKeys = Object.keys(exportsField);\n if (!exportKeys.some((key) => key.startsWith('.'))) {\n return [packageName];\n }\n\n const excluded = importMapExcludedSubpaths[packageName];\n const packageJsonDir = path.dirname(packageJsonPath);\n const modules = exportKeys.flatMap((key) => {\n if (key === '.') {\n return [packageName];\n }\n\n if (!key.startsWith('./') || key === './package.json') {\n return [];\n }\n\n // Skip `.d.ts` subpath exports — these are meant to be imported as raw text\n // (e.g. `@dxos/echo-query/api.d.ts?raw` for in-editor type hints), not as\n // ES modules. Enumerating them here would have vite try to bundle the\n // declaration file's imports (protobufjs, effect, etc.), which breaks.\n if (key.endsWith('.d.ts')) {\n return [];\n }\n\n if (key.includes('*')) {\n // Expand wildcard patterns like `./proto/*` into concrete specifiers.\n return expandWildcardExport(packageName, packageJsonDir, key, (exportsField as Record<string, unknown>)[key]);\n }\n\n const subpath = key.slice(2);\n if (excluded?.has(subpath) || GLOBALLY_EXCLUDED_SUBPATHS.has(subpath) || BUILD_TOOL_SUBPATH.test(subpath)) {\n return [];\n }\n\n return [`${packageName}/${subpath}`];\n });\n\n return modules.length > 0 ? modules : [packageName];\n};\n\n/**\n * Statically analyzes a CJS file to extract named exports using cjs-module-lexer.\n * Follows re-exports (e.g. react's index.js re-exports from cjs/react.development.js)\n * and deduplicates. Filters out `default` and `__esModule` pseudo-exports.\n */\nconst getCjsNamedExports = (filePath: string, seen = new Set<string>()): string[] => {\n const normalized = trimQueryString(filePath);\n if (seen.has(normalized)) {\n return [];\n }\n seen.add(normalized);\n\n try {\n const source = readFileSync(normalized, 'utf8');\n const { exports: directExports, reexports } = parseCjs(source);\n\n const reexportedNames = reexports.flatMap((reexport) => {\n const resolved = path.resolve(path.dirname(normalized), reexport);\n const candidates = [resolved, `${resolved}.js`, `${resolved}.cjs`];\n const found = candidates.find((candidate) => existsSync(candidate));\n return found ? getCjsNamedExports(found, seen) : [];\n });\n\n return [...new Set([...directExports, ...reexportedNames])].filter(\n (name) => name !== 'default' && name !== '__esModule',\n );\n } catch {\n return [];\n }\n};\n\n/**\n * Vite plugin for the **host app** (Composer). Generates a browser import map so that\n * shared packages are loaded once and reused by both the host and any remote plugins.\n *\n * In production, emits a dedicated chunk per specifier via virtual wrapper modules,\n * then injects a `<script type=\"importmap\">` tag into the HTML with the chunk URLs.\n *\n * Virtual wrappers are needed because directly emitting chunks for CJS packages loses\n * their named exports due to Rollup's interop. The wrapper re-exports them explicitly.\n *\n * TODO: Restore dev-mode support. The previous dev path mapped each bare specifier to\n * its absolute `/@fs/` file path during `buildStart`, which forced `this.resolve()` for\n * hundreds of subpath entrypoints and raced with Vite's optimize-deps static scan —\n * producing non-deterministic chunk content (~34 chunks drifting per warm-start) and\n * triggering Vite 8.0.10's `runOptimizer` / `commitProcessing` crashes (`fileHash` /\n * `browserHash` undefined on partial-discovery batches). Plugin is currently gated to\n * `apply: 'build'` to avoid both. A working dev-mode implementation would need to\n * resolve specifiers without participating in the optimize-deps phase — candidates:\n * - defer resolution to `transformIndexHtml` (after the optimizer settles)\n * - read resolved paths from `environment.depsOptimizer.metadata` rather than calling\n * `this.resolve()` ourselves\n * - resolve via `require.resolve` directly, bypassing the Vite plugin pipeline entirely\n */\nexport const importMapPlugin = (options?: { packages?: string[] }): Plugin[] => {\n const packages = options?.packages ?? DEFAULT_PACKAGES;\n const WRAPPER_PREFIX = '\\0import-map:';\n const chunkRefIds: Record<string, string> = {};\n const resolvedIds: Record<string, string> = {};\n let imports: Record<string, string> = {};\n let modules: string[] = [];\n let importMapIsDev = false;\n let base = '/';\n\n return [\n // Phase 1: Resolve all package entrypoints and emit chunks.\n //\n // Build-only. The dev-mode path (recording absolute `/@fs/` paths in\n // `imports[]`) is non-functional today and was actively harmful: calling\n // `this.resolve()` for every shared package's subpath entrypoints during\n // `buildStart` races with Vite's optimize-deps static scan, producing\n // non-deterministic chunk content (~34 drifting chunks per warm-start) and\n // triggering Vite 8.0.10's `runOptimizer` / `commitProcessing` crashes\n // (`fileHash` / `browserHash` undefined on partial-discovery batches) when\n // the resolved set doesn't match the optimizer's metadata. The importmap\n // is only meaningful for production builds where remote plugins consume\n // the emitted wrapper chunks.\n {\n name: 'import-map:get-chunk-ref-ids',\n apply: 'build',\n configResolved(config) {\n base = config.base ?? '/';\n },\n async buildStart() {\n importMapIsDev = this.environment.mode === 'dev';\n await initCjsLexer();\n\n // Expand each package name into its full set of subpath entrypoints\n // (e.g. '@dxos/client' -> ['@dxos/client', '@dxos/client/echo', ...]).\n modules = [\n ...new Set(\n (\n await Promise.all(\n packages.map(async (packageName) => {\n const packageJsonPath = await resolvePackageJsonPathViaContext(this, packageName);\n if (!packageJsonPath) {\n this.warn(`Unable to locate package.json for import map package: ${packageName}`);\n return [packageName];\n }\n\n return getPackageEntrypoints(packageName, packageJsonPath);\n }),\n )\n ).flat(),\n ),\n ];\n\n for (const specifier of modules) {\n if (isAssetSubpath(specifier)) {\n // Host already loaded the real asset; remote plugins need the specifier to\n // resolve to *something* that behaves as an ES module. A data URL is the\n // cheapest option — no chunk to emit (rolldown tree-shakes an empty wrapper\n // even with `preserveSignature: 'strict'`, so the referenced file wouldn't\n // exist at runtime), no extra network request, and the same path in dev and prod.\n imports[specifier] = 'data:text/javascript;charset=utf-8,export%20%7B%7D%3B';\n continue;\n }\n\n const resolved = await this.resolve(specifier);\n if (!resolved) {\n this.warn(`Import map: unable to resolve \"${specifier}\"; omitting from import map.`);\n continue;\n }\n\n if (importMapIsDev) {\n // Dev: map bare specifier to the resolved file path, prefixed with vite's\n // `/@fs/` escape hatch so absolute node_modules paths (including\n // `.vite/deps/*` pre-bundled chunks) round-trip through the dev server\n // instead of being resolved against the document origin as a 404.\n const filePath = trimQueryString(resolved.id);\n imports[specifier] = filePath.startsWith('/') ? `/@fs${filePath}` : filePath;\n } else {\n // Prod: emit a virtual wrapper chunk that re-exports from the real module.\n resolvedIds[specifier] = resolved.id;\n chunkRefIds[specifier] = this.emitFile({\n type: 'chunk',\n id: `${WRAPPER_PREFIX}${specifier}`,\n preserveSignature: 'strict',\n });\n }\n }\n },\n\n // Intercept virtual wrapper IDs so Rollup doesn't try to resolve them as files.\n resolveId(id) {\n if (id.startsWith(WRAPPER_PREFIX)) {\n return id;\n }\n },\n\n // Generate the source for each virtual wrapper module.\n // For CJS packages, explicitly re-export named exports (discovered via static analysis)\n // because Rollup's `export *` interop doesn't preserve them for CJS.\n //\n // Each wrapper also emits a local `__keepalive` export. Without this, Rolldown\n // (Vite 8) tree-shakes wrappers whose `export *` re-exports happen to coincide\n // with another already-emitted chunk's exports — typical for umbrella packages\n // (e.g. `@dxos/compute` re-exports from `@dxos/operation`, so the operation\n // wrapper looks \"redundant\" to Rolldown and gets merged away). A local const\n // export has no upstream source for Rolldown to dedupe against, so the chunk\n // is always preserved and the import-map entry resolves at runtime.\n load(id) {\n if (!id.startsWith(WRAPPER_PREFIX)) {\n return;\n }\n const specifier = id.slice(WRAPPER_PREFIX.length);\n const keepalive = `export const __dxosImportMapKeepalive = ${JSON.stringify(specifier)};`;\n const resolvedId = resolvedIds[specifier];\n if (!resolvedId) {\n return `export * from ${JSON.stringify(specifier)};\\n${keepalive}\\n`;\n }\n\n const filePath = trimQueryString(resolvedId);\n const isCjs = filePath.endsWith('.cjs') || (!filePath.endsWith('.mjs') && !resolvedIdIsEsmModule(filePath));\n\n if (isCjs) {\n const named = getCjsNamedExports(filePath);\n if (named.length > 0) {\n return `export { default, ${named.join(', ')} } from ${JSON.stringify(specifier)};\\n${keepalive}\\n`;\n }\n }\n return `export * from ${JSON.stringify(specifier)};\\n${keepalive}\\n`;\n },\n\n // After bundling, map each specifier to the URL of its emitted chunk. Preserves\n // asset-subpath entries already written to `imports` during `buildStart` (those\n // use an inline data URL rather than an emitted chunk).\n generateBundle() {\n if (importMapIsDev) {\n return;\n }\n\n imports = {\n ...imports,\n ...Object.fromEntries(\n modules\n .filter((specifier) => chunkRefIds[specifier] !== undefined)\n .map((specifier) => [specifier, `${base}${this.getFileName(chunkRefIds[specifier])}`]),\n ),\n };\n },\n },\n\n // Phase 2: Inject the import map into the HTML as a <script type=\"importmap\"> tag.\n {\n name: 'import-map:transform-index-html',\n apply: 'build',\n enforce: 'post',\n transformIndexHtml(html: string) {\n const tags = [\n {\n tag: 'script',\n attrs: {\n type: 'importmap',\n },\n children: JSON.stringify({ imports }, null, 2),\n },\n ];\n\n return {\n html,\n tags,\n };\n },\n },\n ];\n};\n"],
5
+ "mappings": ";;;AAAA;;;ACAA,IAAAA,uBAAA;;;AC4DO,IAAMC,mBAAmB,CAAC,EAAEC,QAAQC,QAAO,IAAwB,CAAC,MAAC;AAC1E,SAAO;IACLC,MAAM;IACNC,qBAAAA;AAME,YAAMC,eAAeH,UAAU;QAAC;UAAEI,KAAK;UAAOC,OAAO;YAAEC,IAAI;UAAmB;UAAGC,UAAUP;QAAQ;UAAK,CAAA;AAExG,aAAO;QACL;UACEI,KAAK;UACLI,UAAU;UACVD,UAAUE;QACZ;QACA;UACEL,KAAK;UACLI,UAAU;UACVH,OAAO;YACLC,IAAI;YACJI,MAAM;YACN,aAAa;YACb,cAAc;UAChB;UACAH,UAAU;YACR;cACEH,KAAK;cACLC,OAAO;gBAAEC,IAAI;cAAmB;cAChCC,UAAU;gBACR;kBAAEH,KAAK;kBAAOC,OAAO;oBAAEC,IAAI;kBAAkB;kBAAGC,UAAU;gBAAG;gBAC7D;kBAAEH,KAAK;kBAAOC,OAAO;oBAAEC,IAAI;kBAAkB;kBAAGC,UAAU;gBAAG;mBAC1DJ;;YAEP;YACA;cACEC,KAAK;cACLC,OAAO;gBAAEC,IAAI;cAAqB;cAClCC,UAAUR,SAAS;gBAAC;kBAAEK,KAAK;kBAAOC,OAAO;oBAAEM,OAAO;kBAA0B;kBAAGJ,UAAUR;gBAAO;kBAAK,CAAA;YACvG;;QAEJ;QACA;UACEK,KAAK;UACLI,UAAU;UACVD,UAAUK;QACZ;;IAEJ;EACF;AACF;;;AC3GA,SAASC,6BAA6B;AAS/B,IAAMC,sBAAsB;AAM5B,IAAMC,iBAAiBF;AAsBvB,IAAMG,oBAAoB,CAACC,MAAiB,EAAEC,OAAM,MACzDC,KAAKC,UACH;EACE,GAAGH;EACHC;AACF,GACA,MACA,CAAA;;;AClBJ,IAAMG,8BAA8B;EAClC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGK,IAAMC,mBAAmB;;EAE9B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAGA;EACA;;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAGA;;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;KAGGD;;AAaE,IAAME,kBAAkB,CAACC,OAC9BF,iBAAiBG,KAAK,CAACC,QAAQF,OAAOE,OAAOF,GAAGG,WAAW,GAAGD,GAAAA,GAAM,CAAA;;;AC/KtE,IAAME,kBAAkB;AAOxB,IAAMC,aAAa,CAACC,OAAeA,OAAOF,mBAAmBG,gBAAgBD,EAAAA;AAyB7E,IAAME,sBAAsB;EAC1B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAC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AAC/B,YAAY;AACf,iBAAO,iBAAiBU,KAAKyH,UAAUpG,SAAAA,CAAAA;EAAgBmG,SAAAA;;QACzD;AAEA,cAAMxC,WAAW9F,gBAAgBI,UAAAA;AACjC,cAAMoI,QAAQ1C,SAASxF,SAAS,MAAA,KAAY,CAACwF,SAASxF,SAAS,MAAA,KAAW,CAACH,sBAAsB2F,QAAAA;AAEjG,YAAI0C,OAAO;AACT,gBAAMC,QAAQ5C,mBAAmBC,QAAAA;AACjC,cAAI2C,MAAMpF,SAAS,GAAG;AACpB,mBAAO,qBAAqBoF,MAAM9H,KAAK,IAAA,CAAA,WAAgBG,KAAKyH,UAAUpG,SAAAA,CAAAA;EAAgBmG,SAAAA;;UACxF;QACF;AACA,eAAO,iBAAiBxH,KAAKyH,UAAUpG,SAAAA,CAAAA;EAAgBmG,SAAAA;;MACzD;;;;MAKAI,iBAAAA;AACE,YAAIrB,gBAAgB;AAClB;QACF;AAEAD,kBAAU;UACR,GAAGA;UACH,GAAGjC,OAAOwD,YACRlD,QACGmB,OAAO,CAACzE,cAAc+E,YAAY/E,SAAAA,MAAeb,MAAAA,EACjDqD,IAAI,CAACxC,cAAc;YAACA;YAAW,GAAGmF,IAAAA,GAAO,KAAKsB,YAAY1B,YAAY/E,SAAAA,CAAU,CAAA;WAAI,CAAA;QAE3F;MACF;IACF;;IAGA;MACEd,MAAM;MACNkG,OAAO;MACPsB,SAAS;MACTC,mBAAmBC,MAAY;AAC7B,cAAMC,OAAO;UACX;YACEC,KAAK;YACLC,OAAO;cACLjI,MAAM;YACR;YACAkI,UAAUrI,KAAKyH,UAAU;cAAEnB;YAAQ,GAAG,MAAM,CAAA;UAC9C;;AAGF,eAAO;UACL2B;UACAC;QACF;MACF;IACF;;AAEJ;",
6
+ "names": ["boot_loader_default", "bootLoaderPlugin", "status", "markSvg", "name", "transformIndexHtml", "markChildren", "tag", "attrs", "id", "children", "injectTo", "css", "role", "class", "driverScript", "PLUGIN_ENTRY_FILENAME", "MANIFEST_ASSET_NAME", "ENTRY_FILENAME", "serializeManifest", "meta", "assets", "JSON", "stringify", "THIRD_PARTY_SHARED_PACKAGES", "DEFAULT_PACKAGES", "isSharedPackage", "id", "some", "pkg", "startsWith", "JSX_DEV_RUNTIME", "isExternal", "id", "isSharedPackage", "REQUIRE_SHIM_BANNER", "join", "composerPlugin", "options", "entry", "port", "meta", "resolved", "Set", "base", "plugins", "name", "config", "server", "cors", "preview", "build", "sourcemap", "target", "lib", "formats", "fileName", "ENTRY_FILENAME", "rolldownOptions", "external", "output", "chunkFileNames", "assetFileNames", "banner", "enforce", "apply", "optimizeDeps", "exclude", "DEFAULT_PACKAGES", "resolveId", "add", "load", "has", "code", "configResolved", "push", "transform", "size", "escaped", "map", "s", "replace", "pattern", "RegExp", "test", "_", "dep", "undefined", "endsWith", "shim", "generateBundle", "_options", "bundle", "assets", "Object", "keys", "filter", "MANIFEST_ASSET_NAME", "sort", "emitFile", "type", "source", "serializeManifest", "init", "initCjsLexer", "parse", "parseCjs", "existsSync", "readFileSync", "readdirSync", "statSync", "createRequire", "nodeCreateRequire", "path", "require", "nodeCreateRequire", "url", "trimQueryString", "id", "replace", "resolvedIdIsEsmModule", "resolvedId", "file", "endsWith", "directory", "path", "dirname", "packageJsonPath", "join", "existsSync", "pkg", "JSON", "parse", "readFileSync", "type", "findPackageJsonPath", "packageName", "packageJson", "name", "undefined", "resolvePackageJsonPath", "resolve", "resolvePackageJsonPathViaContext", "ctx", "resolved", "viaResolved", "importMapExcludedSubpaths", "Set", "GLOBALLY_EXCLUDED_SUBPATHS", "BUILD_TOOL_SUBPATH", "ASSET_SUBPATH", "isAssetSubpath", "specifier", "test", "walkDirectoryForExtension", "baseDir", "extension", "results", "walk", "dir", "entries", "readdirSync", "entry", "full", "stat", "statSync", "isDirectory", "push", "relative", "slice", "length", "pickPatternTarget", "value", "obj", "preferred", "browser", "import", "default", "module", "expandWildcardExport", "packageJsonDir", "exportKey", "exportValue", "target", "includes", "keyStarIndex", "indexOf", "targetStarIndex", "keyPrefix", "targetPrefix", "targetSuffix", "files", "map", "relativeNoExt", "getPackageEntrypoints", "exportsField", "exports", "Array", "isArray", "exportKeys", "Object", "keys", "some", "key", "startsWith", "excluded", "modules", "flatMap", "subpath", "has", "getCjsNamedExports", "filePath", "seen", "normalized", "add", "source", "directExports", "reexports", "parseCjs", "reexportedNames", "reexport", "candidates", "found", "find", "candidate", "filter", "importMapPlugin", "options", "packages", "DEFAULT_PACKAGES", "WRAPPER_PREFIX", "chunkRefIds", "resolvedIds", "imports", "importMapIsDev", "base", "apply", "configResolved", "config", "buildStart", "environment", "mode", "initCjsLexer", "Promise", "all", "warn", "flat", "emitFile", "preserveSignature", "resolveId", "load", "keepalive", "stringify", "isCjs", "named", "generateBundle", "fromEntries", "getFileName", "enforce", "transformIndexHtml", "html", "tags", "tag", "attrs", "children"]
7
+ }
@@ -0,0 +1 @@
1
+ {"inputs":{"raw-loader:/__w/dxos/dxos/packages/sdk/app-framework/src/vite-plugin/boot-loader/boot-loader.css?raw":{"bytes":10642,"imports":[]},"raw-loader:/__w/dxos/dxos/packages/sdk/app-framework/src/vite-plugin/boot-loader/boot-loader.js?raw":{"bytes":12254,"imports":[]},"src/vite-plugin/boot-loader/index.ts":{"bytes":12426,"imports":[{"path":"raw-loader:/__w/dxos/dxos/packages/sdk/app-framework/src/vite-plugin/boot-loader/boot-loader.css?raw","kind":"import-statement","original":"./boot-loader.css?raw"},{"path":"raw-loader:/__w/dxos/dxos/packages/sdk/app-framework/src/vite-plugin/boot-loader/boot-loader.js?raw","kind":"import-statement","original":"./boot-loader.js?raw"}],"format":"esm"},"src/vite-plugin/manifest.ts":{"bytes":4230,"imports":[{"path":"@dxos/protocols","kind":"import-statement","external":true}],"format":"esm"},"src/vite-plugin/packages.ts":{"bytes":14395,"imports":[],"format":"esm"},"src/vite-plugin/composer/index.ts":{"bytes":35922,"imports":[{"path":"src/vite-plugin/manifest.ts","kind":"import-statement","original":"../manifest"},{"path":"src/vite-plugin/packages.ts","kind":"import-statement","original":"../packages"}],"format":"esm"},"src/vite-plugin/import-map/index.ts":{"bytes":64678,"imports":[{"path":"cjs-module-lexer","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:module","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/vite-plugin/packages.ts","kind":"import-statement","original":"../packages"}],"format":"esm"},"src/vite-plugin/index.ts":{"bytes":1044,"imports":[{"path":"src/vite-plugin/boot-loader/index.ts","kind":"import-statement","original":"./boot-loader"},{"path":"src/vite-plugin/composer/index.ts","kind":"import-statement","original":"./composer"},{"path":"src/vite-plugin/import-map/index.ts","kind":"import-statement","original":"./import-map"},{"path":"src/vite-plugin/packages.ts","kind":"import-statement","original":"./packages"}],"format":"esm"}},"outputs":{"dist/plugin/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":84517},"dist/plugin/node-esm/index.mjs":{"imports":[{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"cjs-module-lexer","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:module","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"exports":["DEFAULT_PACKAGES","ENTRY_FILENAME","MANIFEST_ASSET_NAME","bootLoaderPlugin","composerPlugin","importMapPlugin","isSharedPackage","serializeManifest"],"entryPoint":"src/vite-plugin/index.ts","inputs":{"raw-loader:/__w/dxos/dxos/packages/sdk/app-framework/src/vite-plugin/boot-loader/boot-loader.css?raw":{"bytesInOutput":11015},"raw-loader:/__w/dxos/dxos/packages/sdk/app-framework/src/vite-plugin/boot-loader/boot-loader.js?raw":{"bytesInOutput":12658},"src/vite-plugin/boot-loader/index.ts":{"bytesInOutput":1852},"src/vite-plugin/index.ts":{"bytesInOutput":0},"src/vite-plugin/manifest.ts":{"bytesInOutput":240},"src/vite-plugin/packages.ts":{"bytesInOutput":3235},"src/vite-plugin/composer/index.ts":{"bytesInOutput":8244},"src/vite-plugin/import-map/index.ts":{"bytesInOutput":13119}},"bytes":51051}}}
@@ -0,0 +1,39 @@
1
+ import * as Command from '@effect/cli/Command';
2
+ import * as Effect from 'effect/Effect';
3
+ import * as Layer from 'effect/Layer';
4
+ import { Plugin, PluginManager } from '../core';
5
+ type SubCommands = [Command.Command<any, any, any, any>, ...Array<Command.Command<any, any, any, any>>];
6
+ export type CreateCliAppOptions = {
7
+ rootCommand: Command.Command<any, any, any, any>;
8
+ subCommands?: SubCommands;
9
+ pluginManager?: PluginManager.PluginManager;
10
+ pluginLoader?: PluginManager.ManagerOptions['pluginLoader'];
11
+ plugins?: Plugin.Plugin[];
12
+ core?: string[];
13
+ enabled?: string[];
14
+ safeMode?: boolean;
15
+ };
16
+ /**
17
+ * Creates a CLI application with plugin support.
18
+ * Similar to useApp but for CLI environments.
19
+ *
20
+ * @example
21
+ * const plugins = [ClientPluginCLI()];
22
+ * const manager = await createCliApp({ plugins });
23
+ * const commands = manager.capabilities.getAll(Capabilities.Command);
24
+ *
25
+ * @param options.pluginManager Optional existing PluginManager instance.
26
+ * @param options.pluginLoader Function to load plugins by ID.
27
+ * @param options.plugins All plugins available to the application.
28
+ * @param options.core Core plugins which will always be enabled.
29
+ * @param options.enabled Enabled plugins.
30
+ * @param options.safeMode Whether to enable safe mode, which disables optional plugins.
31
+ */
32
+ export declare const createCliApp: (args_0: CreateCliAppOptions) => Effect.Effect<{
33
+ command: Command.Command<any, any, any, {
34
+ [x: string]: any;
35
+ }>;
36
+ layer: Layer.Layer<any, any, never>;
37
+ }, Error, never>;
38
+ export {};
39
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../../src/cli/cli.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAC/C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAKtC,OAAO,EAAc,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAW5D,KAAK,WAAW,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AAExG,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACjD,WAAW,CAAC,EAAE,WAAW,CAAC;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,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,YAAY;;;;;gBAuDvB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './cli';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/index.ts"],"names":[],"mappings":"AAIA,cAAc,OAAO,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { ActivationEvent as ActivationEvent$ } from '../core';
2
+ /**
3
+ * Fired when the app is started.
4
+ */
5
+ export declare const Startup: ActivationEvent$.ActivationEvent;
6
+ /**
7
+ * Fired to load any newly available surfaces.
8
+ */
9
+ export declare const SetupReactSurface: ActivationEvent$.ActivationEvent;
10
+ /**
11
+ * Fired before the operation invoker is activated.
12
+ */
13
+ export declare const SetupOperationHandler: ActivationEvent$.ActivationEvent;
14
+ /**
15
+ * Fired before the managed runtime is created.
16
+ * Plugins should contribute their Layer capabilities before this event.
17
+ */
18
+ export declare const SetupLayer: ActivationEvent$.ActivationEvent;
19
+ /**
20
+ * Fired after the operation invoker is ready.
21
+ */
22
+ export declare const OperationInvokerReady: ActivationEvent$.ActivationEvent;
23
+ /**
24
+ * Fired after the managed runtime is ready.
25
+ */
26
+ export declare const ManagedRuntimeReady: ActivationEvent$.ActivationEvent;
27
+ //# sourceMappingURL=activation-events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activation-events.d.ts","sourceRoot":"","sources":["../../../../src/common/activation-events.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,OAAO,kCAAgE,CAAC;AAMrF;;GAEG;AACH,eAAO,MAAM,iBAAiB,kCAA4E,CAAC;AAE3G;;GAEG;AACH,eAAO,MAAM,qBAAqB,kCAAgF,CAAC;AAEnH;;;GAGG;AACH,eAAO,MAAM,UAAU,kCAAoE,CAAC;AAM5F;;GAEG;AACH,eAAO,MAAM,qBAAqB,kCAAgF,CAAC;AAEnH;;GAEG;AACH,eAAO,MAAM,mBAAmB,kCAA8E,CAAC"}