@dxos/app-framework 0.8.4-main.fffef41 → 0.9.0

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 (569) hide show
  1. package/.storybook/main.mts +2 -4
  2. package/.storybook/preview.mts +2 -2
  3. package/LICENSE +102 -5
  4. package/README.md +1 -1
  5. package/dist/lib/browser/capability-BOPAKKWG.mjs +35 -0
  6. package/dist/lib/browser/capability-BOPAKKWG.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-5GY3YOEL.mjs +28 -0
  8. package/dist/lib/browser/chunk-5GY3YOEL.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-66IXTIVK.mjs +48 -0
  10. package/dist/lib/browser/chunk-66IXTIVK.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-CO3XLNUX.mjs +95 -0
  12. package/dist/lib/browser/chunk-CO3XLNUX.mjs.map +7 -0
  13. package/dist/lib/browser/chunk-DC3WRPBV.mjs +227 -0
  14. package/dist/lib/browser/chunk-DC3WRPBV.mjs.map +7 -0
  15. package/dist/lib/browser/chunk-FJ4765WW.mjs +8 -0
  16. package/dist/lib/browser/chunk-FJ4765WW.mjs.map +7 -0
  17. package/dist/lib/browser/chunk-FO3IYSLV.mjs +68 -0
  18. package/dist/lib/browser/chunk-FO3IYSLV.mjs.map +7 -0
  19. package/dist/lib/browser/chunk-HFLKXMT7.mjs +587 -0
  20. package/dist/lib/browser/chunk-HFLKXMT7.mjs.map +7 -0
  21. package/dist/lib/browser/chunk-IW44C7UL.mjs +83 -0
  22. package/dist/lib/browser/chunk-IW44C7UL.mjs.map +7 -0
  23. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  24. package/dist/lib/browser/chunk-KZUDO43J.mjs +422 -0
  25. package/dist/lib/browser/chunk-KZUDO43J.mjs.map +7 -0
  26. package/dist/lib/browser/chunk-Q2GLJTVV.mjs +12 -0
  27. package/dist/lib/browser/chunk-Q2GLJTVV.mjs.map +7 -0
  28. package/dist/lib/browser/chunk-SYXIYT6T.mjs +143 -0
  29. package/dist/lib/browser/chunk-SYXIYT6T.mjs.map +7 -0
  30. package/dist/lib/browser/chunk-XHS5KDNX.mjs +1471 -0
  31. package/dist/lib/browser/chunk-XHS5KDNX.mjs.map +7 -0
  32. package/dist/lib/browser/chunk-Y66ELD4U.mjs +476 -0
  33. package/dist/lib/browser/chunk-Y66ELD4U.mjs.map +7 -0
  34. package/dist/lib/browser/cli/index.mjs +74 -0
  35. package/dist/lib/browser/cli/index.mjs.map +7 -0
  36. package/dist/lib/browser/common/activation-events.mjs +20 -0
  37. package/dist/lib/browser/common/capabilities.mjs +56 -0
  38. package/dist/lib/browser/core/activation-event.mjs +20 -0
  39. package/dist/lib/browser/core/capability.mjs +32 -0
  40. package/dist/lib/browser/core/capability.mjs.map +7 -0
  41. package/dist/lib/browser/core/plugin-manager.mjs +19 -0
  42. package/dist/lib/browser/core/plugin-manager.mjs.map +7 -0
  43. package/dist/lib/browser/core/plugin.mjs +41 -0
  44. package/dist/lib/browser/core/plugin.mjs.map +7 -0
  45. package/dist/lib/browser/core/url-loader.mjs +24 -0
  46. package/dist/lib/browser/core/url-loader.mjs.map +7 -0
  47. package/dist/lib/browser/index.mjs +86 -122
  48. package/dist/lib/browser/index.mjs.map +4 -4
  49. package/dist/lib/browser/meta.json +1 -1
  50. package/dist/lib/browser/process-manager-capability-GXNUO7AR.mjs +132 -0
  51. package/dist/lib/browser/process-manager-capability-GXNUO7AR.mjs.map +7 -0
  52. package/dist/lib/browser/testing/index.mjs +316 -47
  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 +52 -0
  57. package/dist/lib/browser/ui/index.mjs.map +7 -0
  58. package/dist/lib/node-esm/capability-KZWRTX7R.mjs +36 -0
  59. package/dist/lib/node-esm/capability-KZWRTX7R.mjs.map +7 -0
  60. package/dist/lib/node-esm/chunk-37Z53PXZ.mjs +10 -0
  61. package/dist/lib/node-esm/chunk-37Z53PXZ.mjs.map +7 -0
  62. package/dist/lib/node-esm/chunk-A5CHGAZE.mjs +588 -0
  63. package/dist/lib/node-esm/chunk-A5CHGAZE.mjs.map +7 -0
  64. package/dist/lib/node-esm/chunk-COHOWGGJ.mjs +144 -0
  65. package/dist/lib/node-esm/chunk-COHOWGGJ.mjs.map +7 -0
  66. package/dist/lib/node-esm/chunk-CTKEZHKF.mjs +84 -0
  67. package/dist/lib/node-esm/chunk-CTKEZHKF.mjs.map +7 -0
  68. package/dist/lib/node-esm/chunk-FPW45EZH.mjs +14 -0
  69. package/dist/lib/node-esm/chunk-FPW45EZH.mjs.map +7 -0
  70. package/dist/lib/node-esm/chunk-FSVGKTF6.mjs +477 -0
  71. package/dist/lib/node-esm/chunk-FSVGKTF6.mjs.map +7 -0
  72. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  73. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
  74. package/dist/lib/node-esm/chunk-KFZEB6BV.mjs +29 -0
  75. package/dist/lib/node-esm/chunk-KFZEB6BV.mjs.map +7 -0
  76. package/dist/lib/node-esm/chunk-NULBHQYS.mjs +96 -0
  77. package/dist/lib/node-esm/chunk-NULBHQYS.mjs.map +7 -0
  78. package/dist/lib/node-esm/chunk-SX5NVETP.mjs +1472 -0
  79. package/dist/lib/node-esm/chunk-SX5NVETP.mjs.map +7 -0
  80. package/dist/lib/node-esm/chunk-WK7OIQKI.mjs +70 -0
  81. package/dist/lib/node-esm/chunk-WK7OIQKI.mjs.map +7 -0
  82. package/dist/lib/node-esm/chunk-XGBUKRCK.mjs +423 -0
  83. package/dist/lib/node-esm/chunk-XGBUKRCK.mjs.map +7 -0
  84. package/dist/lib/node-esm/chunk-XIGPWXCQ.mjs +228 -0
  85. package/dist/lib/node-esm/chunk-XIGPWXCQ.mjs.map +7 -0
  86. package/dist/lib/node-esm/chunk-XOCUANHO.mjs +49 -0
  87. package/dist/lib/node-esm/chunk-XOCUANHO.mjs.map +7 -0
  88. package/dist/lib/node-esm/cli/index.mjs +75 -0
  89. package/dist/lib/node-esm/cli/index.mjs.map +7 -0
  90. package/dist/lib/node-esm/common/activation-events.mjs +21 -0
  91. package/dist/lib/node-esm/common/activation-events.mjs.map +7 -0
  92. package/dist/lib/node-esm/common/capabilities.mjs +57 -0
  93. package/dist/lib/node-esm/common/capabilities.mjs.map +7 -0
  94. package/dist/lib/node-esm/core/activation-event.mjs +21 -0
  95. package/dist/lib/node-esm/core/activation-event.mjs.map +7 -0
  96. package/dist/lib/node-esm/core/capability.mjs +33 -0
  97. package/dist/lib/node-esm/core/capability.mjs.map +7 -0
  98. package/dist/lib/node-esm/core/plugin-manager.mjs +20 -0
  99. package/dist/lib/node-esm/core/plugin-manager.mjs.map +7 -0
  100. package/dist/lib/node-esm/core/plugin.mjs +42 -0
  101. package/dist/lib/node-esm/core/plugin.mjs.map +7 -0
  102. package/dist/lib/node-esm/core/url-loader.mjs +25 -0
  103. package/dist/lib/node-esm/core/url-loader.mjs.map +7 -0
  104. package/dist/lib/node-esm/index.mjs +86 -122
  105. package/dist/lib/node-esm/index.mjs.map +4 -4
  106. package/dist/lib/node-esm/meta.json +1 -1
  107. package/dist/lib/node-esm/process-manager-capability-TX5TA6YN.mjs +133 -0
  108. package/dist/lib/node-esm/process-manager-capability-TX5TA6YN.mjs.map +7 -0
  109. package/dist/lib/node-esm/testing/index.mjs +316 -47
  110. package/dist/lib/node-esm/testing/index.mjs.map +4 -4
  111. package/dist/lib/node-esm/testing/react.mjs +79 -0
  112. package/dist/lib/node-esm/testing/react.mjs.map +7 -0
  113. package/dist/lib/node-esm/ui/index.mjs +53 -0
  114. package/dist/lib/node-esm/ui/index.mjs.map +7 -0
  115. package/dist/plugin/node-esm/index.mjs +977 -0
  116. package/dist/plugin/node-esm/index.mjs.map +7 -0
  117. package/dist/plugin/node-esm/meta.json +1 -0
  118. package/dist/types/src/cli/cli.d.ts +37 -0
  119. package/dist/types/src/cli/cli.d.ts.map +1 -0
  120. package/dist/types/src/cli/index.d.ts +2 -0
  121. package/dist/types/src/cli/index.d.ts.map +1 -0
  122. package/dist/types/src/common/activation-events.d.ts +24 -0
  123. package/dist/types/src/common/activation-events.d.ts.map +1 -0
  124. package/dist/types/src/common/annotations.d.ts +1 -0
  125. package/dist/types/src/common/annotations.d.ts.map +1 -0
  126. package/dist/types/src/common/capabilities.d.ts +214 -193
  127. package/dist/types/src/common/capabilities.d.ts.map +1 -1
  128. package/dist/types/src/common/index.d.ts +3 -8
  129. package/dist/types/src/common/index.d.ts.map +1 -1
  130. package/dist/types/src/common/translations.d.ts +7 -7
  131. package/dist/types/src/common/translations.d.ts.map +1 -1
  132. package/dist/types/src/context.d.ts +5 -0
  133. package/dist/types/src/context.d.ts.map +1 -0
  134. package/dist/types/src/core/{events.d.ts → activation-event.d.ts} +11 -11
  135. package/dist/types/src/core/activation-event.d.ts.map +1 -0
  136. package/dist/types/src/core/capability-manager.d.ts +52 -0
  137. package/dist/types/src/core/capability-manager.d.ts.map +1 -0
  138. package/dist/types/src/core/capability-manager.test.d.ts +2 -0
  139. package/dist/types/src/core/capability-manager.test.d.ts.map +1 -0
  140. package/dist/types/src/core/capability.d.ts +161 -0
  141. package/dist/types/src/core/capability.d.ts.map +1 -0
  142. package/dist/types/src/core/edge-registry-plugin-provider.d.ts +30 -0
  143. package/dist/types/src/core/edge-registry-plugin-provider.d.ts.map +1 -0
  144. package/dist/types/src/core/index.d.ts +11 -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 +297 -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 +101 -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 +303 -43
  157. package/dist/types/src/core/plugin.d.ts.map +1 -1
  158. package/dist/types/src/core/registry.d.ts +107 -0
  159. package/dist/types/src/core/registry.d.ts.map +1 -0
  160. package/dist/types/src/core/url-loader.d.ts +127 -0
  161. package/dist/types/src/core/url-loader.d.ts.map +1 -0
  162. package/dist/types/src/core/url-loader.test.d.ts +2 -0
  163. package/dist/types/src/core/url-loader.test.d.ts.map +1 -0
  164. package/dist/types/src/helpers.d.ts.map +1 -1
  165. package/dist/types/src/index.d.ts +2 -2
  166. package/dist/types/src/index.d.ts.map +1 -1
  167. package/dist/types/src/plugin-process-manager/ProcessManagerPlugin.d.ts +3 -0
  168. package/dist/types/src/plugin-process-manager/ProcessManagerPlugin.d.ts.map +1 -0
  169. package/dist/types/src/plugin-process-manager/history/capability.d.ts +7 -0
  170. package/dist/types/src/plugin-process-manager/history/capability.d.ts.map +1 -0
  171. package/dist/types/src/plugin-process-manager/history/errors.d.ts +32 -0
  172. package/dist/types/src/plugin-process-manager/history/errors.d.ts.map +1 -0
  173. package/dist/types/src/plugin-process-manager/history/history-tracker.d.ts +32 -0
  174. package/dist/types/src/plugin-process-manager/history/history-tracker.d.ts.map +1 -0
  175. package/dist/types/src/plugin-process-manager/history/history-tracker.test.d.ts +2 -0
  176. package/dist/types/src/plugin-process-manager/history/history-tracker.test.d.ts.map +1 -0
  177. package/dist/types/src/plugin-process-manager/history/index.d.ts +6 -0
  178. package/dist/types/src/plugin-process-manager/history/index.d.ts.map +1 -0
  179. package/dist/types/src/plugin-process-manager/history/types.d.ts +13 -0
  180. package/dist/types/src/plugin-process-manager/history/types.d.ts.map +1 -0
  181. package/dist/types/src/plugin-process-manager/history/undo-mapping.d.ts +101 -0
  182. package/dist/types/src/plugin-process-manager/history/undo-mapping.d.ts.map +1 -0
  183. package/dist/types/src/plugin-process-manager/history/undo-registry.d.ts +23 -0
  184. package/dist/types/src/plugin-process-manager/history/undo-registry.d.ts.map +1 -0
  185. package/dist/types/src/plugin-process-manager/history/undo-registry.test.d.ts +2 -0
  186. package/dist/types/src/plugin-process-manager/history/undo-registry.test.d.ts.map +1 -0
  187. package/dist/types/src/plugin-process-manager/idb-key-value-store.d.ts +10 -0
  188. package/dist/types/src/plugin-process-manager/idb-key-value-store.d.ts.map +1 -0
  189. package/dist/types/src/plugin-process-manager/index.d.ts +3 -0
  190. package/dist/types/src/plugin-process-manager/index.d.ts.map +1 -0
  191. package/dist/types/src/plugin-process-manager/meta.d.ts +3 -0
  192. package/dist/types/src/plugin-process-manager/meta.d.ts.map +1 -0
  193. package/dist/types/src/plugin-process-manager/process-manager-capability.d.ts +8 -0
  194. package/dist/types/src/plugin-process-manager/process-manager-capability.d.ts.map +1 -0
  195. package/dist/types/src/plugin-process-manager/testing.d.ts +59 -0
  196. package/dist/types/src/plugin-process-manager/testing.d.ts.map +1 -0
  197. package/dist/types/src/testing/harness.d.ts +79 -0
  198. package/dist/types/src/testing/harness.d.ts.map +1 -0
  199. package/dist/types/src/testing/index.d.ts +3 -0
  200. package/dist/types/src/testing/index.d.ts.map +1 -1
  201. package/dist/types/src/testing/operationCapture.d.ts +64 -0
  202. package/dist/types/src/testing/operationCapture.d.ts.map +1 -0
  203. package/dist/types/src/testing/react.d.ts +27 -0
  204. package/dist/types/src/testing/react.d.ts.map +1 -0
  205. package/dist/types/src/testing/react.test.d.ts +2 -0
  206. package/dist/types/src/testing/react.test.d.ts.map +1 -0
  207. package/dist/types/src/testing/service.d.ts +8 -0
  208. package/dist/types/src/testing/service.d.ts.map +1 -0
  209. package/dist/types/src/testing/withPluginManager.d.ts +4 -4
  210. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
  211. package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
  212. package/dist/types/src/ui/components/App/App.d.ts +41 -0
  213. package/dist/types/src/ui/components/App/App.d.ts.map +1 -0
  214. package/dist/types/src/ui/components/App/App.stories.d.ts +19 -0
  215. package/dist/types/src/ui/components/App/App.stories.d.ts.map +1 -0
  216. package/dist/types/src/ui/components/App/index.d.ts +2 -0
  217. package/dist/types/src/ui/components/App/index.d.ts.map +1 -0
  218. package/dist/types/src/{react/Surface.stories.d.ts → ui/components/PluginManager/PluginManagerContext.stories.d.ts} +2 -3
  219. package/dist/types/src/ui/components/PluginManager/PluginManagerContext.stories.d.ts.map +1 -0
  220. package/dist/types/src/ui/components/PluginManager/PluginManagerProvider.d.ts +10 -0
  221. package/dist/types/src/ui/components/PluginManager/PluginManagerProvider.d.ts.map +1 -0
  222. package/dist/types/src/ui/components/PluginManager/index.d.ts +2 -0
  223. package/dist/types/src/ui/components/PluginManager/index.d.ts.map +1 -0
  224. package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts +24 -0
  225. package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts.map +1 -0
  226. package/dist/types/src/{react/App.stories.d.ts → ui/components/Surface/SurfaceComponent.stories.d.ts} +1 -1
  227. package/dist/types/src/ui/components/Surface/SurfaceComponent.stories.d.ts.map +1 -0
  228. package/dist/types/src/ui/components/Surface/SurfaceInfo.d.ts +11 -0
  229. package/dist/types/src/ui/components/Surface/SurfaceInfo.d.ts.map +1 -0
  230. package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts +48 -0
  231. package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts.map +1 -0
  232. package/dist/types/src/ui/components/Surface/context.d.ts +5 -0
  233. package/dist/types/src/ui/components/Surface/context.d.ts.map +1 -0
  234. package/dist/types/src/ui/components/Surface/index.d.ts +36 -0
  235. package/dist/types/src/ui/components/Surface/index.d.ts.map +1 -0
  236. package/dist/types/src/ui/components/Surface/types.d.ts +197 -0
  237. package/dist/types/src/ui/components/Surface/types.d.ts.map +1 -0
  238. package/dist/types/src/ui/components/Surface/types.test.d.ts +2 -0
  239. package/dist/types/src/ui/components/Surface/types.test.d.ts.map +1 -0
  240. package/dist/types/src/ui/components/index.d.ts +4 -0
  241. package/dist/types/src/ui/components/index.d.ts.map +1 -0
  242. package/dist/types/src/ui/hooks/index.d.ts +7 -0
  243. package/dist/types/src/ui/hooks/index.d.ts.map +1 -0
  244. package/dist/types/src/ui/hooks/useApp.d.ts +80 -0
  245. package/dist/types/src/ui/hooks/useApp.d.ts.map +1 -0
  246. package/dist/types/src/ui/hooks/useApp.test.d.ts +2 -0
  247. package/dist/types/src/ui/hooks/useApp.test.d.ts.map +1 -0
  248. package/dist/types/src/ui/hooks/useCapabilities.d.ts +31 -0
  249. package/dist/types/src/ui/hooks/useCapabilities.d.ts.map +1 -0
  250. package/dist/types/src/{react → ui/hooks}/useLoading.d.ts +1 -2
  251. package/dist/types/src/ui/hooks/useLoading.d.ts.map +1 -0
  252. package/dist/types/src/ui/hooks/useProcessManagerRuntime.d.ts +30 -0
  253. package/dist/types/src/ui/hooks/useProcessManagerRuntime.d.ts.map +1 -0
  254. package/dist/types/src/ui/hooks/useSettingsState.d.ts +10 -0
  255. package/dist/types/src/ui/hooks/useSettingsState.d.ts.map +1 -0
  256. package/dist/types/src/ui/hooks/useSurface.d.ts +3 -0
  257. package/dist/types/src/ui/hooks/useSurface.d.ts.map +1 -0
  258. package/dist/types/src/ui/index.d.ts +3 -0
  259. package/dist/types/src/ui/index.d.ts.map +1 -0
  260. package/dist/types/src/vite-plugin/boot-loader/index.d.ts +2 -0
  261. package/dist/types/src/vite-plugin/boot-loader/index.d.ts.map +1 -0
  262. package/dist/types/src/vite-plugin/boot-loader/loader.d.ts +59 -0
  263. package/dist/types/src/vite-plugin/boot-loader/loader.d.ts.map +1 -0
  264. package/dist/types/src/vite-plugin/composer/index.d.ts +34 -0
  265. package/dist/types/src/vite-plugin/composer/index.d.ts.map +1 -0
  266. package/dist/types/src/vite-plugin/import-map/index.d.ts +28 -0
  267. package/dist/types/src/vite-plugin/import-map/index.d.ts.map +1 -0
  268. package/dist/types/src/vite-plugin/index.d.ts +5 -0
  269. package/dist/types/src/vite-plugin/index.d.ts.map +1 -0
  270. package/dist/types/src/vite-plugin/manifest.d.ts +41 -0
  271. package/dist/types/src/vite-plugin/manifest.d.ts.map +1 -0
  272. package/dist/types/src/vite-plugin/manifest.test.d.ts +2 -0
  273. package/dist/types/src/vite-plugin/manifest.test.d.ts.map +1 -0
  274. package/dist/types/src/vite-plugin/packages.d.ts +13 -0
  275. package/dist/types/src/vite-plugin/packages.d.ts.map +1 -0
  276. package/dist/types/tsconfig.tsbuildinfo +1 -1
  277. package/moon.yml +25 -6
  278. package/package.json +125 -59
  279. package/src/cli/cli.ts +102 -0
  280. package/src/{playground/debug → cli}/index.ts +1 -1
  281. package/src/common/activation-events.ts +39 -0
  282. package/src/{playground/logger/index.ts → common/annotations.ts} +0 -2
  283. package/src/common/capabilities.ts +287 -192
  284. package/src/common/index.ts +3 -8
  285. package/src/common/translations.ts +17 -9
  286. package/src/context.ts +9 -0
  287. package/src/core/{events.ts → activation-event.ts} +10 -7
  288. package/src/core/capability-manager.test.ts +154 -0
  289. package/src/core/capability-manager.ts +213 -0
  290. package/src/core/capability.ts +254 -0
  291. package/src/core/edge-registry-plugin-provider.ts +92 -0
  292. package/src/core/index.ts +11 -4
  293. package/src/core/plugin-asset-cache.ts +60 -0
  294. package/src/core/plugin-manager.test.ts +1929 -0
  295. package/src/core/plugin-manager.ts +1696 -0
  296. package/src/core/plugin-manifest.test.ts +75 -0
  297. package/src/core/plugin-manifest.ts +134 -0
  298. package/src/core/plugin.ts +449 -48
  299. package/src/core/registry.ts +163 -0
  300. package/src/core/url-loader.test.ts +222 -0
  301. package/src/core/url-loader.ts +388 -0
  302. package/src/index.ts +2 -2
  303. package/src/plugin-process-manager/ProcessManagerPlugin.ts +24 -0
  304. package/src/plugin-process-manager/history/capability.ts +36 -0
  305. package/src/plugin-process-manager/history/errors.ts +7 -0
  306. package/src/plugin-process-manager/history/history-tracker.test.ts +353 -0
  307. package/src/plugin-process-manager/history/history-tracker.ts +144 -0
  308. package/src/plugin-process-manager/history/index.ts +9 -0
  309. package/src/plugin-process-manager/history/types.ts +17 -0
  310. package/src/plugin-process-manager/history/undo-mapping.ts +135 -0
  311. package/src/plugin-process-manager/history/undo-registry.test.ts +74 -0
  312. package/src/plugin-process-manager/history/undo-registry.ts +54 -0
  313. package/src/plugin-process-manager/idb-key-value-store.ts +64 -0
  314. package/src/plugin-process-manager/index.ts +6 -0
  315. package/src/plugin-process-manager/meta.ts +16 -0
  316. package/src/plugin-process-manager/process-manager-capability.ts +178 -0
  317. package/src/plugin-process-manager/testing.ts +156 -0
  318. package/src/testing/harness.ts +247 -0
  319. package/src/testing/index.ts +3 -0
  320. package/src/testing/operationCapture.ts +144 -0
  321. package/src/testing/react.test.tsx +50 -0
  322. package/src/testing/react.tsx +113 -0
  323. package/src/testing/service.ts +52 -0
  324. package/src/testing/withPluginManager.stories.tsx +8 -9
  325. package/src/testing/withPluginManager.tsx +69 -42
  326. package/src/ui/components/App/App.stories.tsx +84 -0
  327. package/src/ui/components/App/App.tsx +144 -0
  328. package/src/{playground/layout → ui/components/App}/index.ts +1 -1
  329. package/src/ui/components/PluginManager/PluginManagerContext.stories.tsx +179 -0
  330. package/src/{react → ui/components/PluginManager}/PluginManagerProvider.ts +3 -3
  331. package/src/ui/components/PluginManager/index.ts +5 -0
  332. package/src/ui/components/Surface/SurfaceComponent.stories.tsx +144 -0
  333. package/src/ui/components/Surface/SurfaceComponent.tsx +303 -0
  334. package/src/ui/components/Surface/SurfaceInfo.tsx +106 -0
  335. package/src/ui/components/Surface/SurfaceProfilerContext.tsx +207 -0
  336. package/src/ui/components/Surface/context.ts +12 -0
  337. package/src/ui/components/Surface/index.ts +54 -0
  338. package/src/ui/components/Surface/types.test.ts +126 -0
  339. package/src/ui/components/Surface/types.ts +290 -0
  340. package/src/ui/components/index.ts +7 -0
  341. package/src/ui/hooks/index.ts +10 -0
  342. package/src/ui/hooks/useApp.test.tsx +161 -0
  343. package/src/ui/hooks/useApp.tsx +404 -0
  344. package/src/ui/hooks/useCapabilities.ts +68 -0
  345. package/src/{react → ui/hooks}/useLoading.tsx +16 -10
  346. package/src/ui/hooks/useProcessManagerRuntime.ts +78 -0
  347. package/src/ui/hooks/useSettingsState.ts +26 -0
  348. package/src/ui/hooks/useSurface.ts +13 -0
  349. package/src/ui/index.ts +6 -0
  350. package/src/vite-plugin/boot-loader/BootLoader.solid-stories.tsx +198 -0
  351. package/src/vite-plugin/boot-loader/index.ts +5 -0
  352. package/src/vite-plugin/boot-loader/loader-app/Loader.tsx +166 -0
  353. package/src/vite-plugin/boot-loader/loader-app/boot-loader.css +311 -0
  354. package/src/vite-plugin/boot-loader/loader-app/bridge.ts +25 -0
  355. package/src/vite-plugin/boot-loader/loader-app/entry.tsx +21 -0
  356. package/src/vite-plugin/boot-loader/loader-app/mount.tsx +70 -0
  357. package/src/vite-plugin/boot-loader/loader-app/store.test.ts +137 -0
  358. package/src/vite-plugin/boot-loader/loader-app/store.ts +149 -0
  359. package/src/vite-plugin/boot-loader/loader-app/tsconfig.json +11 -0
  360. package/src/vite-plugin/boot-loader/loader-app/types.ts +78 -0
  361. package/src/vite-plugin/boot-loader/loader.ts +204 -0
  362. package/src/vite-plugin/composer/index.ts +306 -0
  363. package/src/vite-plugin/import-map/index.ts +527 -0
  364. package/src/vite-plugin/index.ts +10 -0
  365. package/src/vite-plugin/manifest.test.ts +55 -0
  366. package/src/vite-plugin/manifest.ts +63 -0
  367. package/src/vite-plugin/packages.ts +187 -0
  368. package/tsconfig.json +27 -22
  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-OIEZZC45.mjs +0 -138
  375. package/dist/lib/browser/app-graph-builder-OIEZZC45.mjs.map +0 -7
  376. package/dist/lib/browser/chunk-6XKO24JP.mjs +0 -483
  377. package/dist/lib/browser/chunk-6XKO24JP.mjs.map +0 -7
  378. package/dist/lib/browser/chunk-SCPE4ZO2.mjs +0 -35
  379. package/dist/lib/browser/chunk-SCPE4ZO2.mjs.map +0 -7
  380. package/dist/lib/browser/chunk-WPW5VVAX.mjs +0 -1651
  381. package/dist/lib/browser/chunk-WPW5VVAX.mjs.map +0 -7
  382. package/dist/lib/browser/intent-dispatcher-LZ4AE66E.mjs +0 -11
  383. package/dist/lib/browser/intent-resolver-QVCKRX6G.mjs +0 -39
  384. package/dist/lib/browser/intent-resolver-QVCKRX6G.mjs.map +0 -7
  385. package/dist/lib/browser/react/index.mjs +0 -34
  386. package/dist/lib/browser/store-CNPHOYTJ.mjs +0 -30
  387. package/dist/lib/browser/store-CNPHOYTJ.mjs.map +0 -7
  388. package/dist/lib/node-esm/app-graph-builder-EBU4NVWD.mjs +0 -139
  389. package/dist/lib/node-esm/app-graph-builder-EBU4NVWD.mjs.map +0 -7
  390. package/dist/lib/node-esm/chunk-3UPX5OIS.mjs +0 -484
  391. package/dist/lib/node-esm/chunk-3UPX5OIS.mjs.map +0 -7
  392. package/dist/lib/node-esm/chunk-XJZGUJ3H.mjs +0 -1653
  393. package/dist/lib/node-esm/chunk-XJZGUJ3H.mjs.map +0 -7
  394. package/dist/lib/node-esm/chunk-ZX63QUGE.mjs +0 -37
  395. package/dist/lib/node-esm/chunk-ZX63QUGE.mjs.map +0 -7
  396. package/dist/lib/node-esm/intent-dispatcher-MGOJ3CHD.mjs +0 -12
  397. package/dist/lib/node-esm/intent-resolver-URF3HN3G.mjs +0 -40
  398. package/dist/lib/node-esm/intent-resolver-URF3HN3G.mjs.map +0 -7
  399. package/dist/lib/node-esm/react/index.mjs +0 -35
  400. package/dist/lib/node-esm/store-RK5B4XEL.mjs +0 -31
  401. package/dist/lib/node-esm/store-RK5B4XEL.mjs.map +0 -7
  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 -68
  413. package/dist/types/src/common/surface.d.ts.map +0 -1
  414. package/dist/types/src/core/capabilities.d.ts +0 -117
  415. package/dist/types/src/core/capabilities.d.ts.map +0 -1
  416. package/dist/types/src/core/capabilities.test.d.ts +0 -2
  417. package/dist/types/src/core/capabilities.test.d.ts.map +0 -1
  418. package/dist/types/src/core/events.d.ts.map +0 -1
  419. package/dist/types/src/core/manager.d.ts +0 -126
  420. package/dist/types/src/core/manager.d.ts.map +0 -1
  421. package/dist/types/src/core/manager.test.d.ts +0 -2
  422. package/dist/types/src/core/manager.test.d.ts.map +0 -1
  423. package/dist/types/src/playground/debug/Debug.d.ts +0 -6
  424. package/dist/types/src/playground/debug/Debug.d.ts.map +0 -1
  425. package/dist/types/src/playground/debug/index.d.ts +0 -2
  426. package/dist/types/src/playground/debug/index.d.ts.map +0 -1
  427. package/dist/types/src/playground/debug/plugin.d.ts +0 -2
  428. package/dist/types/src/playground/debug/plugin.d.ts.map +0 -1
  429. package/dist/types/src/playground/generator/Main.d.ts +0 -6
  430. package/dist/types/src/playground/generator/Main.d.ts.map +0 -1
  431. package/dist/types/src/playground/generator/Toolbar.d.ts +0 -6
  432. package/dist/types/src/playground/generator/Toolbar.d.ts.map +0 -1
  433. package/dist/types/src/playground/generator/generator.d.ts +0 -7
  434. package/dist/types/src/playground/generator/generator.d.ts.map +0 -1
  435. package/dist/types/src/playground/generator/index.d.ts +0 -3
  436. package/dist/types/src/playground/generator/index.d.ts.map +0 -1
  437. package/dist/types/src/playground/generator/plugin.d.ts +0 -2
  438. package/dist/types/src/playground/generator/plugin.d.ts.map +0 -1
  439. package/dist/types/src/playground/layout/Layout.d.ts +0 -8
  440. package/dist/types/src/playground/layout/Layout.d.ts.map +0 -1
  441. package/dist/types/src/playground/layout/index.d.ts +0 -2
  442. package/dist/types/src/playground/layout/index.d.ts.map +0 -1
  443. package/dist/types/src/playground/layout/plugin.d.ts +0 -2
  444. package/dist/types/src/playground/layout/plugin.d.ts.map +0 -1
  445. package/dist/types/src/playground/logger/Toolbar.d.ts +0 -6
  446. package/dist/types/src/playground/logger/Toolbar.d.ts.map +0 -1
  447. package/dist/types/src/playground/logger/index.d.ts +0 -2
  448. package/dist/types/src/playground/logger/index.d.ts.map +0 -1
  449. package/dist/types/src/playground/logger/plugin.d.ts +0 -2
  450. package/dist/types/src/playground/logger/plugin.d.ts.map +0 -1
  451. package/dist/types/src/playground/logger/schema.d.ts +0 -13
  452. package/dist/types/src/playground/logger/schema.d.ts.map +0 -1
  453. package/dist/types/src/playground/playground.stories.d.ts +0 -11
  454. package/dist/types/src/playground/playground.stories.d.ts.map +0 -1
  455. package/dist/types/src/plugin-intent/IntentPlugin.d.ts +0 -2
  456. package/dist/types/src/plugin-intent/IntentPlugin.d.ts.map +0 -1
  457. package/dist/types/src/plugin-intent/actions.d.ts +0 -36
  458. package/dist/types/src/plugin-intent/actions.d.ts.map +0 -1
  459. package/dist/types/src/plugin-intent/errors.d.ts +0 -16
  460. package/dist/types/src/plugin-intent/errors.d.ts.map +0 -1
  461. package/dist/types/src/plugin-intent/index.d.ts +0 -6
  462. package/dist/types/src/plugin-intent/index.d.ts.map +0 -1
  463. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +0 -139
  464. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +0 -1
  465. package/dist/types/src/plugin-intent/intent-dispatcher.test.d.ts +0 -2
  466. package/dist/types/src/plugin-intent/intent-dispatcher.test.d.ts.map +0 -1
  467. package/dist/types/src/plugin-intent/intent.d.ts +0 -63
  468. package/dist/types/src/plugin-intent/intent.d.ts.map +0 -1
  469. package/dist/types/src/plugin-intent/meta.d.ts +0 -3
  470. package/dist/types/src/plugin-intent/meta.d.ts.map +0 -1
  471. package/dist/types/src/plugin-settings/SettingsPlugin.d.ts +0 -2
  472. package/dist/types/src/plugin-settings/SettingsPlugin.d.ts.map +0 -1
  473. package/dist/types/src/plugin-settings/actions.d.ts +0 -25
  474. package/dist/types/src/plugin-settings/actions.d.ts.map +0 -1
  475. package/dist/types/src/plugin-settings/app-graph-builder.d.ts +0 -4
  476. package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +0 -1
  477. package/dist/types/src/plugin-settings/index.d.ts +0 -3
  478. package/dist/types/src/plugin-settings/index.d.ts.map +0 -1
  479. package/dist/types/src/plugin-settings/intent-resolver.d.ts +0 -4
  480. package/dist/types/src/plugin-settings/intent-resolver.d.ts.map +0 -1
  481. package/dist/types/src/plugin-settings/meta.d.ts +0 -3
  482. package/dist/types/src/plugin-settings/meta.d.ts.map +0 -1
  483. package/dist/types/src/plugin-settings/store.d.ts +0 -5
  484. package/dist/types/src/plugin-settings/store.d.ts.map +0 -1
  485. package/dist/types/src/plugin-settings/translations.d.ts +0 -11
  486. package/dist/types/src/plugin-settings/translations.d.ts.map +0 -1
  487. package/dist/types/src/react/App.d.ts +0 -10
  488. package/dist/types/src/react/App.d.ts.map +0 -1
  489. package/dist/types/src/react/App.stories.d.ts.map +0 -1
  490. package/dist/types/src/react/DefaultFallback.d.ts +0 -8
  491. package/dist/types/src/react/DefaultFallback.d.ts.map +0 -1
  492. package/dist/types/src/react/ErrorBoundary.d.ts +0 -30
  493. package/dist/types/src/react/ErrorBoundary.d.ts.map +0 -1
  494. package/dist/types/src/react/IntentContext.d.ts +0 -8
  495. package/dist/types/src/react/IntentContext.d.ts.map +0 -1
  496. package/dist/types/src/react/PluginManagerProvider.d.ts +0 -10
  497. package/dist/types/src/react/PluginManagerProvider.d.ts.map +0 -1
  498. package/dist/types/src/react/Surface.d.ts +0 -12
  499. package/dist/types/src/react/Surface.d.ts.map +0 -1
  500. package/dist/types/src/react/Surface.stories.d.ts.map +0 -1
  501. package/dist/types/src/react/common.d.ts +0 -13
  502. package/dist/types/src/react/common.d.ts.map +0 -1
  503. package/dist/types/src/react/index.d.ts +0 -9
  504. package/dist/types/src/react/index.d.ts.map +0 -1
  505. package/dist/types/src/react/types.d.ts +0 -14
  506. package/dist/types/src/react/types.d.ts.map +0 -1
  507. package/dist/types/src/react/useApp.d.ts +0 -44
  508. package/dist/types/src/react/useApp.d.ts.map +0 -1
  509. package/dist/types/src/react/useCapabilities.d.ts +0 -13
  510. package/dist/types/src/react/useCapabilities.d.ts.map +0 -1
  511. package/dist/types/src/react/useIntentResolver.d.ts +0 -3
  512. package/dist/types/src/react/useIntentResolver.d.ts.map +0 -1
  513. package/dist/types/src/react/useLoading.d.ts.map +0 -1
  514. package/src/common/collaboration.ts +0 -18
  515. package/src/common/events.ts +0 -79
  516. package/src/common/file.ts +0 -22
  517. package/src/common/graph.ts +0 -30
  518. package/src/common/layout.ts +0 -277
  519. package/src/common/surface.ts +0 -88
  520. package/src/core/capabilities.test.ts +0 -136
  521. package/src/core/capabilities.ts +0 -263
  522. package/src/core/manager.test.ts +0 -516
  523. package/src/core/manager.ts +0 -604
  524. package/src/playground/debug/Debug.tsx +0 -39
  525. package/src/playground/debug/plugin.ts +0 -16
  526. package/src/playground/generator/Main.tsx +0 -70
  527. package/src/playground/generator/Toolbar.tsx +0 -47
  528. package/src/playground/generator/generator.ts +0 -48
  529. package/src/playground/generator/index.ts +0 -6
  530. package/src/playground/generator/plugin.ts +0 -22
  531. package/src/playground/layout/Layout.tsx +0 -33
  532. package/src/playground/layout/plugin.ts +0 -18
  533. package/src/playground/logger/Toolbar.tsx +0 -30
  534. package/src/playground/logger/plugin.ts +0 -41
  535. package/src/playground/logger/schema.ts +0 -12
  536. package/src/playground/playground.stories.tsx +0 -46
  537. package/src/plugin-intent/IntentPlugin.ts +0 -20
  538. package/src/plugin-intent/actions.ts +0 -31
  539. package/src/plugin-intent/errors.ts +0 -40
  540. package/src/plugin-intent/index.ts +0 -9
  541. package/src/plugin-intent/intent-dispatcher.test.ts +0 -286
  542. package/src/plugin-intent/intent-dispatcher.ts +0 -342
  543. package/src/plugin-intent/intent.ts +0 -154
  544. package/src/plugin-intent/meta.ts +0 -10
  545. package/src/plugin-settings/SettingsPlugin.ts +0 -34
  546. package/src/plugin-settings/actions.ts +0 -25
  547. package/src/plugin-settings/app-graph-builder.ts +0 -160
  548. package/src/plugin-settings/index.ts +0 -6
  549. package/src/plugin-settings/intent-resolver.ts +0 -35
  550. package/src/plugin-settings/meta.ts +0 -10
  551. package/src/plugin-settings/store.ts +0 -33
  552. package/src/plugin-settings/translations.ts +0 -19
  553. package/src/react/App.stories.tsx +0 -33
  554. package/src/react/App.tsx +0 -59
  555. package/src/react/DefaultFallback.tsx +0 -26
  556. package/src/react/ErrorBoundary.tsx +0 -56
  557. package/src/react/IntentContext.tsx +0 -35
  558. package/src/react/Surface.stories.tsx +0 -125
  559. package/src/react/Surface.tsx +0 -109
  560. package/src/react/common.ts +0 -13
  561. package/src/react/index.ts +0 -14
  562. package/src/react/types.ts +0 -38
  563. package/src/react/useApp.tsx +0 -165
  564. package/src/react/useCapabilities.ts +0 -31
  565. package/src/react/useIntentResolver.ts +0 -22
  566. /package/dist/lib/browser/{intent-dispatcher-LZ4AE66E.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
  567. /package/dist/lib/browser/{react/index.mjs.map → common/activation-events.mjs.map} +0 -0
  568. /package/dist/lib/{node-esm/intent-dispatcher-MGOJ3CHD.mjs.map → browser/common/capabilities.mjs.map} +0 -0
  569. /package/dist/lib/{node-esm/react/index.mjs.map → browser/core/activation-event.mjs.map} +0 -0
@@ -0,0 +1,311 @@
1
+ /*
2
+ * Boot loader stylesheet — injected into the host's `<head>` by `bootLoaderPlugin`
3
+ * so the full-screen backdrop paints before any JS bundle is fetched. The Solid
4
+ * `Loader` renders the ring + status into the `#boot-loader` backdrop; this
5
+ * sheet styles both. Class/id names here form a contract with `Loader.tsx`,
6
+ * guarded by `BootLoader.solid-stories.tsx` (it mounts the real component).
7
+ */
8
+
9
+ body {
10
+ margin: 0;
11
+ overflow: hidden;
12
+ }
13
+
14
+ /*
15
+ * Defaults match `@dxos/ui-theme`'s `--color-base-surface`, which resolves to
16
+ * Tailwind's `neutral-50` / `neutral-950` in light / dark mode respectively
17
+ * (see `packages/ui/ui-theme/src/css/theme/semantic.css`). Hosts can override
18
+ * with the `--boot-loader-bg-*` / `--boot-loader-fg-*` custom properties on
19
+ * `:root` if they need a different palette. Keeping the boot loader's
20
+ * background identical to the app's `body` eliminates the flash on handoff
21
+ * to the rendered React shell.
22
+ */
23
+ #boot-loader {
24
+ --color-composer-100: rgb(5 40 61);
25
+ --color-composer-200: rgb(10 75 105);
26
+ --color-composer-300: rgb(1 122 183);
27
+ --color-composer-400: rgb(6 197 253);
28
+
29
+ /*
30
+ * Caps the disc / mark at the design pixel sizes on roomy viewports while
31
+ * shrinking proportionally on narrow ones (`vmin` follows the smaller of
32
+ * width / height) so neither the ring nor the mark crops on phones.
33
+ */
34
+ --boot-loader-disc-size: min(384px, 80vmin);
35
+ /*
36
+ * Match the React `Placeholder`'s logo box (`h-[300px] w-[300px]` at the
37
+ * `stage >= 1` keyframe) so the brand mark doesn't visibly jump size when
38
+ * the loader hands off — the responsive cap keeps the same 300/384 ratio
39
+ * (≈78%) at any viewport width.
40
+ */
41
+ --boot-loader-mark-size: min(300px, 62.5vmin);
42
+ --boot-loader-status-gap: 32px;
43
+
44
+ position: fixed;
45
+ inset: 0;
46
+ z-index: 10;
47
+ font-size: 13px;
48
+ font-family:
49
+ ui-sans-serif,
50
+ system-ui,
51
+ -apple-system,
52
+ BlinkMacSystemFont,
53
+ 'Segoe UI',
54
+ sans-serif;
55
+ /*
56
+ * Dismissal outro — `mountLoader` toggles `data-dismissing` on this element
57
+ * when the host calls `__bootLoader.ready()`; the loader cross-fades out over
58
+ * the real app shell rendering beneath it, and removes itself once this
59
+ * opacity transition completes (a fallback timer covers reduced-motion).
60
+ */
61
+ transition: opacity 500ms ease-out;
62
+ }
63
+
64
+ #boot-loader {
65
+ background: var(--boot-loader-bg-light, #fafafa);
66
+ color: var(--boot-loader-fg-light, #0a0a0a);
67
+ --boot-loader-accent: var(--boot-loader-accent-light, var(--color-composer-200));
68
+ }
69
+
70
+ @media (prefers-color-scheme: dark) {
71
+ #boot-loader {
72
+ background: var(--boot-loader-bg-dark, #0a0a0a);
73
+ color: var(--boot-loader-fg-dark, #f0f0f0);
74
+ --boot-loader-accent: var(--boot-loader-accent-dark, var(--color-composer-300));
75
+ }
76
+ }
77
+
78
+ #boot-loader[data-dismissing] {
79
+ opacity: 0;
80
+ }
81
+
82
+ /* Gently shrink the disc + mark as the loader fades, echoing the prior handoff. */
83
+ #boot-loader[data-dismissing] #boot-loader-disc {
84
+ transform: translate(-50%, -50%) scale(0.92);
85
+ transition: transform 500ms ease-out;
86
+ }
87
+
88
+ /*
89
+ * Stack the ring (the SVG `#boot-loader-ring`) and the brand mark in the same
90
+ * grid cell so the mark sits centered inside the circle.
91
+ */
92
+ #boot-loader-disc {
93
+ position: absolute;
94
+ top: 50%;
95
+ left: 50%;
96
+ display: grid;
97
+ place-items: center;
98
+ width: var(--boot-loader-disc-size);
99
+ height: var(--boot-loader-disc-size);
100
+ transform: translate(-50%, -50%);
101
+ }
102
+
103
+ #boot-loader-disc > * {
104
+ grid-column: 1;
105
+ grid-row: 1;
106
+ }
107
+
108
+ /*
109
+ * Default to grayscale so the mark reads as a quiet monochrome silhouette
110
+ * before any host-driven progress lands; the brand palette swaps in once
111
+ * `Loader.tsx` sets `data-host-driven` on the disc (the first
112
+ * `__bootLoader.progress()` call). Hover keeps a parallel reveal affordance
113
+ * for inspection in the storybook. The 1000ms ease lets the grayscale → color
114
+ * transition play through the activation phase rather than snapping.
115
+ */
116
+ #boot-loader-mark {
117
+ width: var(--boot-loader-mark-size);
118
+ height: var(--boot-loader-mark-size);
119
+ display: flex;
120
+ align-items: center;
121
+ justify-content: center;
122
+ filter: grayscale(100%);
123
+ transition: filter 1000ms ease-out;
124
+ }
125
+
126
+ /*
127
+ * `grayscale(0%)` (identity) rather than `none` — `filter: none` changes
128
+ * the filter function list and most engines treat that as a discrete
129
+ * transition (snap, not ease). Keeping `grayscale(...)` on both sides of
130
+ * the rule lets the browser interpolate the percentage smoothly.
131
+ */
132
+ #boot-loader-disc[data-host-driven] #boot-loader-mark,
133
+ #boot-loader-mark:hover {
134
+ filter: grayscale(0%);
135
+ }
136
+
137
+ #boot-loader-mark svg {
138
+ width: 100%;
139
+ height: 100%;
140
+ /*
141
+ * The host SVG carries its own brand-palette fills, so we don't apply a
142
+ * `color` cascade here. SVGs that intentionally use `fill="currentColor"`
143
+ * still pick up the loader's text colour via `#boot-loader`'s `color`.
144
+ */
145
+ }
146
+
147
+ /*
148
+ * Circular determinate progress — a single SVG `<path>` arc that sweeps
149
+ * anticlockwise from 12 o'clock, its angle growing with progress (the `d` is
150
+ * recomputed by the component each tick). There is no static track;
151
+ * `stroke-linecap: round` rounds the trailing edge, and `marker-end` paints the
152
+ * leading-edge dot. Stroke width is in viewBox units so it scales with the disc.
153
+ */
154
+ #boot-loader-ring {
155
+ width: var(--boot-loader-disc-size);
156
+ height: var(--boot-loader-disc-size);
157
+ overflow: visible;
158
+ /*
159
+ * Fade the arc linearly from the head (the marker, fully opaque) back to the
160
+ * tail (12 o'clock, transparent). A conic-gradient mask does this along the
161
+ * curve — `Loader.tsx` writes the eased progress into `--boot-loader-arc`
162
+ * (0–100), and the arc occupies the conic range `(100 - arc)%`…`100%`, so the
163
+ * head sits at `(100 - arc)%` (opaque) and the tail at `100%` (transparent).
164
+ * NOTE: We start at -1.16deg so that we don't mask the marker.
165
+ */
166
+ --boot-loader-arc: 0;
167
+ mask: conic-gradient(
168
+ from -1.16deg at 50% 50%,
169
+ transparent 0,
170
+ transparent calc((100 - var(--boot-loader-arc)) * 1%),
171
+ #000 calc((100 - var(--boot-loader-arc)) * 1%),
172
+ transparent 100%
173
+ );
174
+ -webkit-mask: conic-gradient(
175
+ from -1.16deg at 50% 50%,
176
+ transparent 0,
177
+ transparent calc((100 - var(--boot-loader-arc)) * 1%),
178
+ #000 calc((100 - var(--boot-loader-arc)) * 1%),
179
+ transparent 100%
180
+ );
181
+ }
182
+
183
+ /*
184
+ * The leading-edge dot's layer — same geometry as `#boot-loader-ring` but with no
185
+ * mask, so the dot renders as a full circle (the ring's conic fade mask would
186
+ * otherwise bisect it where it sits on the mask's transparent→opaque edge).
187
+ */
188
+ #boot-loader-ring-head {
189
+ width: var(--boot-loader-disc-size);
190
+ height: var(--boot-loader-disc-size);
191
+ overflow: visible;
192
+ }
193
+
194
+ .boot-loader-ring-progress {
195
+ fill: none;
196
+ stroke: var(--boot-loader-accent);
197
+ /* viewBox units: ~1.9px on the 384px disc, scaling down on smaller viewports. */
198
+ stroke-width: 0.5;
199
+ opacity: 0.5;
200
+ stroke-linecap: butt;
201
+ overflow: visible;
202
+ /* Dashed line: dash + gap lengths in viewBox units (~2 units ≈ 7.7px @384px). */
203
+ /* stroke-dasharray: 2 1; */
204
+ }
205
+
206
+ /* The `marker-end` dot at the arc's leading edge. */
207
+ .boot-loader-ring-marker {
208
+ fill: var(--boot-loader-accent);
209
+ stroke: none;
210
+ overflow: visible;
211
+ /* opacity: 0.5; */
212
+ }
213
+
214
+ #boot-loader-status {
215
+ position: absolute;
216
+ top: 50%;
217
+ left: 0;
218
+ right: 0;
219
+ /*
220
+ * Sit just below the centered disc — half the disc plus the configured gap.
221
+ */
222
+ transform: translate(0, calc(var(--boot-loader-disc-size) / 2 + var(--boot-loader-status-gap)));
223
+ /*
224
+ * Slightly de-emphasised vs body text so the brand mark + ring stay the
225
+ * dominant focus, but high enough to remain legible on both light and dark
226
+ * backgrounds without a custom palette.
227
+ */
228
+ opacity: 0.5;
229
+ /*
230
+ * Terminal-style log viewport (3 rows at the default `line-height`) over
231
+ * a vertically-stacked track of every status the driver has emitted. The
232
+ * track is bottom-anchored via `justify-content: flex-end` so the newest
233
+ * line always sits on the last visible row, older lines stack above it,
234
+ * and anything that doesn't fit is clipped at the top by
235
+ * `overflow: hidden`. The driver runs a FLIP-style transform animation
236
+ * per append so each new line slides up from below the bottom edge —
237
+ * independent of any `scroll-behavior` smooth-scroll support, which
238
+ * Playwright/headless Chrome strips even from spec-compliant
239
+ * `scrollTo({ behavior: 'smooth' })` calls.
240
+ */
241
+ display: flex;
242
+ flex-direction: column;
243
+ justify-content: flex-end;
244
+ height: 4.5em;
245
+ line-height: 1.5;
246
+ letter-spacing: 0.01em;
247
+ /*
248
+ * Fixed-width digits so the `(i/n)` counter on range-bearing status
249
+ * updates ("Loading plugins (12/80)") doesn't jitter as the index
250
+ * ticks through different glyph widths.
251
+ */
252
+ font-variant-numeric: tabular-nums;
253
+ text-align: center;
254
+ overflow: hidden;
255
+ }
256
+
257
+ #boot-loader-status-fade {
258
+ position: absolute;
259
+ top: 0;
260
+ left: 0;
261
+ width: 100%;
262
+ height: 32px;
263
+ background: linear-gradient(to bottom, var(--boot-loader-bg-light, #fafafa), transparent);
264
+ z-index: 1;
265
+ }
266
+ @media (prefers-color-scheme: dark) {
267
+ #boot-loader-status-fade {
268
+ background: linear-gradient(to bottom, var(--boot-loader-bg-dark, #0a0a0a), transparent);
269
+ }
270
+ }
271
+
272
+ #boot-loader-rss {
273
+ background: var(--boot-loader-bg-light, #fafafa);
274
+ text-wrap: balance;
275
+ }
276
+ @media (prefers-color-scheme: dark) {
277
+ #boot-loader-rss {
278
+ background: var(--boot-loader-bg-dark, #0a0a0a);
279
+ }
280
+ }
281
+
282
+ /*
283
+ * Track of every appended `.boot-loader-status-line`.
284
+ */
285
+ #boot-loader-status-track {
286
+ display: flex;
287
+ flex-direction: column;
288
+ /*
289
+ * Resting transform is `translateY(0)` — the bottom-anchored flex parent
290
+ * already positions the newest line on the last visible row. On each append
291
+ * `Loader.tsx` runs a one-shot FLIP: snap to `translateY(<lineHeight>px)` with
292
+ * no transition (placing the new line just below the viewport), force a
293
+ * reflow, then animate back to 0 so the track rises by one line-height and the
294
+ * new entry slides up into the bottom row.
295
+ */
296
+ transform: translateY(0);
297
+ transition: transform 500ms ease-out;
298
+ }
299
+
300
+ /* Honour reduced-motion preferences explicitly — `transition` doesn't auto-respect it. */
301
+ @media (prefers-reduced-motion: reduce) {
302
+ #boot-loader-status-track {
303
+ transition: none;
304
+ }
305
+ }
306
+
307
+ .boot-loader-status-line {
308
+ flex: 0 0 auto;
309
+ height: 1.5em;
310
+ white-space: nowrap;
311
+ }
@@ -0,0 +1,25 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { type LoaderStore } from './store';
6
+ import { type BootLoaderApi } from './types';
7
+
8
+ /**
9
+ * Wrap a reactive {@link LoaderStore} as the imperative `window.__bootLoader`
10
+ * facade the host app drives. `status` / `progress` write into the store;
11
+ * `ready` plays the graceful dismissal outro; `dismiss` is the immediate-remove
12
+ * backstop for the fast-load path (and a no-op once an outro is already in
13
+ * flight, so a late `dismiss()` from the framework never cuts the animation).
14
+ */
15
+ export const createBridge = (store: LoaderStore, dismissNow: () => void): BootLoaderApi => ({
16
+ status: (payload) => store.pushStatus(payload),
17
+ progress: (fraction) => store.setProgress(fraction),
18
+ ready: () => store.ready(),
19
+ dismiss: () => {
20
+ if (store.phase() === 'dismissing') {
21
+ return;
22
+ }
23
+ dismissNow();
24
+ },
25
+ });
@@ -0,0 +1,21 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { mountLoader } from './mount';
6
+ import { DEFAULT_ROOT_ID } from './types';
7
+
8
+ //
9
+ // Production entry — bundled to a self-contained IIFE by `bootLoaderPlugin` and
10
+ // inlined into `index.html` ahead of the app bundle. Mounts the loader into the
11
+ // static backdrop using the config the plugin baked in just before this script
12
+ // (including the backdrop id, so the id has a single source). The storybook
13
+ // does NOT use this entry; it imports `mountLoader` directly so Vite compiles
14
+ // the Solid source with HMR.
15
+ //
16
+
17
+ const config = window.__BOOT_LOADER_CONFIG__ ?? {};
18
+ const el = document.getElementById(config.rootId ?? DEFAULT_ROOT_ID);
19
+ if (el) {
20
+ mountLoader(el, config);
21
+ }
@@ -0,0 +1,70 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { createEffect } from 'solid-js';
6
+ import { render } from 'solid-js/web';
7
+
8
+ import { createBridge } from './bridge';
9
+ import { Loader } from './Loader';
10
+ import { createLoaderStore } from './store';
11
+ import { type BootLoaderConfig } from './types';
12
+
13
+ /** Fallback teardown if the outro's `transitionend` never fires (e.g. no opacity transition). */
14
+ const OUTRO_FALLBACK_MS = 800;
15
+
16
+ /**
17
+ * Mount the boot loader into a host element (`#boot-loader`, the static backdrop
18
+ * the plugin injects — or any container in the storybook) and install the
19
+ * `window.__bootLoader` facade. Renders the disc + status into the host, toggles
20
+ * `data-dismissing` on it for the outro, and removes everything once the outro
21
+ * completes.
22
+ *
23
+ * Returns a disposer that tears the loader down immediately (idempotent).
24
+ */
25
+ export const mountLoader = (el: HTMLElement, config: BootLoaderConfig = {}): (() => void) => {
26
+ const store = createLoaderStore(config.status);
27
+
28
+ let removed = false;
29
+ // Forward-declared so `remove` can dispose the Solid render created below.
30
+ let disposeRender: (() => void) | undefined;
31
+
32
+ const remove = (): void => {
33
+ if (removed) {
34
+ return;
35
+ }
36
+ removed = true;
37
+ el.removeEventListener('transitionend', handleTransitionEnd);
38
+ store.dispose();
39
+ disposeRender?.();
40
+ el.remove();
41
+ if (window.__bootLoader === api) {
42
+ delete window.__bootLoader;
43
+ }
44
+ };
45
+
46
+ const handleTransitionEnd = (event: TransitionEvent): void => {
47
+ if (event.propertyName === 'opacity' && store.phase() === 'dismissing') {
48
+ remove();
49
+ }
50
+ };
51
+ el.addEventListener('transitionend', handleTransitionEnd);
52
+
53
+ disposeRender = render(() => {
54
+ // Drive the backdrop's outro from the host element (Solid owns the host's
55
+ // children; the host attribute is toggled imperatively within this owner).
56
+ createEffect(() => {
57
+ const dismissing = store.phase() === 'dismissing';
58
+ el.toggleAttribute('data-dismissing', dismissing);
59
+ if (dismissing) {
60
+ setTimeout(remove, OUTRO_FALLBACK_MS);
61
+ }
62
+ });
63
+ return <Loader store={store} markSvg={config.markSvg} />;
64
+ }, el);
65
+
66
+ const api = createBridge(store, remove);
67
+ window.__bootLoader = api;
68
+
69
+ return remove;
70
+ };
@@ -0,0 +1,137 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { afterEach, beforeEach, describe, test, vi } from 'vitest';
6
+
7
+ import {
8
+ ABSOLUTE_CEILING,
9
+ CREEP_TICK_MS,
10
+ STATE_1_ASYMPTOTE,
11
+ clampPercent,
12
+ createLoaderStore,
13
+ displayText,
14
+ easeToward,
15
+ } from './store';
16
+
17
+ describe('easeToward', () => {
18
+ test('eases toward the ceiling without overshooting', ({ expect }) => {
19
+ const next = easeToward(0, 20, 0.04);
20
+ expect(next).toBeCloseTo(0.8);
21
+ expect(next).toBeLessThan(20);
22
+ });
23
+
24
+ test('holds when already at (or past) the ceiling', ({ expect }) => {
25
+ expect(easeToward(20, 20, 0.04)).toBe(20);
26
+ expect(easeToward(95, 90, 0.05)).toBe(95);
27
+ });
28
+ });
29
+
30
+ describe('clampPercent', () => {
31
+ test('maps a fraction to a percent', ({ expect }) => {
32
+ expect(clampPercent(0.5)).toBe(50);
33
+ });
34
+
35
+ test('clamps out-of-range and invalid values to a safe percent', ({ expect }) => {
36
+ expect(clampPercent(2)).toBe(100);
37
+ expect(clampPercent(-1)).toBe(0);
38
+ expect(clampPercent(Number.NaN)).toBe(0);
39
+ expect(clampPercent(Number.POSITIVE_INFINITY)).toBe(0);
40
+ expect(clampPercent(undefined)).toBe(0);
41
+ });
42
+ });
43
+
44
+ describe('displayText', () => {
45
+ test('passes humanized text through unchanged', ({ expect }) => {
46
+ expect(displayText({ humanized: 'Loading framework…' })).toBe('Loading framework…');
47
+ });
48
+
49
+ test('appends an (index/total) suffix for range payloads', ({ expect }) => {
50
+ expect(displayText({ humanized: 'Loading plugins', range: { index: 12, total: 80 } })).toBe(
51
+ 'Loading plugins (12/80)',
52
+ );
53
+ });
54
+ });
55
+
56
+ describe('createLoaderStore', () => {
57
+ beforeEach(() => {
58
+ vi.useFakeTimers();
59
+ });
60
+
61
+ afterEach(() => {
62
+ vi.restoreAllMocks();
63
+ vi.useRealTimers();
64
+ });
65
+
66
+ test('seeds the initial status line', ({ expect }) => {
67
+ const store = createLoaderStore('Loading…');
68
+ expect(store.lines().map((line) => line.text)).toEqual(['Loading…']);
69
+ store.dispose();
70
+ });
71
+
72
+ test('appends distinct status lines and dedups identical back-to-back updates', ({ expect }) => {
73
+ const store = createLoaderStore();
74
+ store.pushStatus({ humanized: 'A' });
75
+ store.pushStatus({ humanized: 'A' });
76
+ store.pushStatus({ humanized: 'B' });
77
+ expect(store.lines().map((line) => line.text)).toEqual(['A', 'B']);
78
+ store.dispose();
79
+ });
80
+
81
+ test('collapses range ticks into the current line in place', ({ expect }) => {
82
+ const store = createLoaderStore();
83
+ store.pushStatus({ humanized: 'Loading plugins', range: { index: 1, total: 80 } });
84
+ store.pushStatus({ humanized: 'Loading plugins', range: { index: 40, total: 80 } });
85
+ const lines = store.lines();
86
+ expect(lines).toHaveLength(1);
87
+ expect(lines[0].text).toBe('Loading plugins (40/80)');
88
+ store.dispose();
89
+ });
90
+
91
+ test('progress never regresses and enters the host phase', ({ expect }) => {
92
+ const store = createLoaderStore();
93
+ store.setProgress(0.5);
94
+ expect(store.phase()).toBe('host');
95
+ expect(store.progress()).toBe(50);
96
+ store.setProgress(0.2);
97
+ expect(store.progress()).toBe(50);
98
+ store.dispose();
99
+ });
100
+
101
+ test('ready snaps to 100% and enters the dismissing phase', ({ expect }) => {
102
+ const store = createLoaderStore();
103
+ store.setProgress(0.4);
104
+ store.ready();
105
+ expect(store.progress()).toBe(100);
106
+ expect(store.phase()).toBe('dismissing');
107
+ store.dispose();
108
+ });
109
+
110
+ test('auto-creep inches the ring toward the state-1 asymptote', ({ expect }) => {
111
+ const store = createLoaderStore();
112
+ expect(store.progress()).toBe(0);
113
+ vi.advanceTimersByTime(CREEP_TICK_MS * 20);
114
+ expect(store.progress()).toBeGreaterThan(0);
115
+ expect(store.progress()).toBeLessThan(STATE_1_ASYMPTOTE);
116
+ store.dispose();
117
+ });
118
+
119
+ test('disposed store stops creeping', ({ expect }) => {
120
+ const store = createLoaderStore();
121
+ vi.advanceTimersByTime(CREEP_TICK_MS * 5);
122
+ const halted = store.progress();
123
+ store.dispose();
124
+ vi.advanceTimersByTime(CREEP_TICK_MS * 50);
125
+ expect(store.progress()).toBe(halted);
126
+ });
127
+
128
+ test('auto-creep honours the absolute ceiling', ({ expect }) => {
129
+ const store = createLoaderStore();
130
+ // Host at 80% leads the creep ceiling to min(80 + 15, 90) = 90; the creep
131
+ // must ease toward 90 and never cross it (the host owns the last 10%).
132
+ store.setProgress(0.8);
133
+ vi.advanceTimersByTime(CREEP_TICK_MS * 500);
134
+ expect(store.progress()).toBeLessThanOrEqual(ABSOLUTE_CEILING + 0.1);
135
+ store.dispose();
136
+ });
137
+ });