@dxos/app-framework 0.7.5-main.9cb18ac → 0.7.5-main.9d2a38b

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 (316) hide show
  1. package/dist/lib/browser/chunk-GNLU3GAU.mjs +1595 -0
  2. package/dist/lib/browser/chunk-GNLU3GAU.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +112 -618
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/testing/index.mjs +67 -0
  7. package/dist/lib/browser/testing/index.mjs.map +7 -0
  8. package/dist/lib/node/chunk-FBA4BB3J.cjs +1639 -0
  9. package/dist/lib/node/chunk-FBA4BB3J.cjs.map +7 -0
  10. package/dist/lib/node/index.cjs +123 -651
  11. package/dist/lib/node/index.cjs.map +4 -4
  12. package/dist/lib/node/meta.json +1 -1
  13. package/dist/lib/node/testing/index.cjs +91 -0
  14. package/dist/lib/node/testing/index.cjs.map +7 -0
  15. package/dist/lib/node-esm/chunk-KPMTPXQI.mjs +1597 -0
  16. package/dist/lib/node-esm/chunk-KPMTPXQI.mjs.map +7 -0
  17. package/dist/lib/node-esm/index.mjs +112 -618
  18. package/dist/lib/node-esm/index.mjs.map +4 -4
  19. package/dist/lib/node-esm/meta.json +1 -1
  20. package/dist/lib/node-esm/testing/index.mjs +68 -0
  21. package/dist/lib/node-esm/testing/index.mjs.map +7 -0
  22. package/dist/types/src/App.d.ts +22 -13
  23. package/dist/types/src/App.d.ts.map +1 -1
  24. package/dist/types/src/common/capabilities.d.ts +340 -0
  25. package/dist/types/src/common/capabilities.d.ts.map +1 -0
  26. package/dist/types/src/common/events.d.ts +41 -0
  27. package/dist/types/src/common/events.d.ts.map +1 -0
  28. package/dist/types/src/common/file.d.ts +14 -0
  29. package/dist/types/src/common/file.d.ts.map +1 -0
  30. package/dist/types/src/common/graph.d.ts +21 -0
  31. package/dist/types/src/common/graph.d.ts.map +1 -0
  32. package/dist/types/src/{plugins/common → common}/index.d.ts +3 -1
  33. package/dist/types/src/common/index.d.ts.map +1 -0
  34. package/dist/types/src/{plugins/common → common}/layout.d.ts +0 -11
  35. package/dist/types/src/common/layout.d.ts.map +1 -0
  36. package/dist/types/src/{plugins/common → common}/navigation.d.ts +0 -2
  37. package/dist/types/src/common/navigation.d.ts.map +1 -0
  38. package/dist/types/src/{plugins/plugin-surface/SurfaceContext.d.ts → common/surface.d.ts} +12 -29
  39. package/dist/types/src/common/surface.d.ts.map +1 -0
  40. package/dist/types/src/{plugins/common → common}/translations.d.ts +0 -11
  41. package/dist/types/src/common/translations.d.ts.map +1 -0
  42. package/dist/types/src/core/capabilities.d.ts +90 -0
  43. package/dist/types/src/core/capabilities.d.ts.map +1 -0
  44. package/dist/types/src/core/capabilities.test.d.ts +2 -0
  45. package/dist/types/src/core/capabilities.test.d.ts.map +1 -0
  46. package/dist/types/src/core/events.d.ts +58 -0
  47. package/dist/types/src/core/events.d.ts.map +1 -0
  48. package/dist/types/src/core/index.d.ts +5 -0
  49. package/dist/types/src/core/index.d.ts.map +1 -0
  50. package/dist/types/src/core/manager.d.ts +126 -0
  51. package/dist/types/src/core/manager.d.ts.map +1 -0
  52. package/dist/types/src/core/manager.test.d.ts +2 -0
  53. package/dist/types/src/core/manager.test.d.ts.map +1 -0
  54. package/dist/types/src/core/plugin.d.ts +94 -0
  55. package/dist/types/src/core/plugin.d.ts.map +1 -0
  56. package/dist/types/src/helpers.d.ts +10 -0
  57. package/dist/types/src/helpers.d.ts.map +1 -0
  58. package/dist/types/src/helpers.test.d.ts +2 -0
  59. package/dist/types/src/helpers.test.d.ts.map +1 -0
  60. package/dist/types/src/index.d.ts +5 -1
  61. package/dist/types/src/index.d.ts.map +1 -1
  62. package/dist/types/src/playground/debug/Debug.d.ts +6 -0
  63. package/dist/types/src/playground/debug/Debug.d.ts.map +1 -0
  64. package/dist/types/src/playground/debug/index.d.ts +2 -0
  65. package/dist/types/src/playground/debug/index.d.ts.map +1 -0
  66. package/dist/types/src/playground/debug/plugin.d.ts +2 -0
  67. package/dist/types/src/playground/debug/plugin.d.ts.map +1 -0
  68. package/dist/types/src/playground/generator/Main.d.ts +6 -0
  69. package/dist/types/src/playground/generator/Main.d.ts.map +1 -0
  70. package/dist/types/src/playground/generator/Toolbar.d.ts +6 -0
  71. package/dist/types/src/playground/generator/Toolbar.d.ts.map +1 -0
  72. package/dist/types/src/playground/generator/generator.d.ts +5 -0
  73. package/dist/types/src/playground/generator/generator.d.ts.map +1 -0
  74. package/dist/types/src/playground/generator/index.d.ts +3 -0
  75. package/dist/types/src/playground/generator/index.d.ts.map +1 -0
  76. package/dist/types/src/playground/generator/plugin.d.ts +2 -0
  77. package/dist/types/src/playground/generator/plugin.d.ts.map +1 -0
  78. package/dist/types/src/playground/layout/Layout.d.ts +8 -0
  79. package/dist/types/src/playground/layout/Layout.d.ts.map +1 -0
  80. package/dist/types/src/playground/layout/index.d.ts +2 -0
  81. package/dist/types/src/playground/layout/index.d.ts.map +1 -0
  82. package/dist/types/src/playground/layout/plugin.d.ts +2 -0
  83. package/dist/types/src/playground/layout/plugin.d.ts.map +1 -0
  84. package/dist/types/src/playground/logger/Toolbar.d.ts +6 -0
  85. package/dist/types/src/playground/logger/Toolbar.d.ts.map +1 -0
  86. package/dist/types/src/playground/logger/index.d.ts +2 -0
  87. package/dist/types/src/playground/logger/index.d.ts.map +1 -0
  88. package/dist/types/src/playground/logger/plugin.d.ts +2 -0
  89. package/dist/types/src/playground/logger/plugin.d.ts.map +1 -0
  90. package/dist/types/src/playground/logger/schema.d.ts +13 -0
  91. package/dist/types/src/playground/logger/schema.d.ts.map +1 -0
  92. package/dist/types/src/playground/playground.stories.d.ts +10 -0
  93. package/dist/types/src/playground/playground.stories.d.ts.map +1 -0
  94. package/dist/types/src/{plugins/plugin-intent → plugin-intent}/IntentContext.d.ts +1 -1
  95. package/dist/types/src/plugin-intent/IntentContext.d.ts.map +1 -0
  96. package/dist/types/src/plugin-intent/IntentPlugin.d.ts +2 -0
  97. package/dist/types/src/plugin-intent/IntentPlugin.d.ts.map +1 -0
  98. package/dist/types/src/plugin-intent/actions.d.ts +23 -0
  99. package/dist/types/src/plugin-intent/actions.d.ts.map +1 -0
  100. package/dist/types/src/plugin-intent/errors.d.ts +16 -0
  101. package/dist/types/src/plugin-intent/errors.d.ts.map +1 -0
  102. package/dist/types/src/plugin-intent/index.d.ts +6 -0
  103. package/dist/types/src/plugin-intent/index.d.ts.map +1 -0
  104. package/dist/types/src/{plugins/plugin-intent → plugin-intent}/intent-dispatcher.d.ts +18 -19
  105. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -0
  106. package/dist/types/src/plugin-intent/intent-dispatcher.test.d.ts.map +1 -0
  107. package/dist/types/src/{plugins/plugin-intent → plugin-intent}/intent.d.ts +5 -25
  108. package/dist/types/src/plugin-intent/intent.d.ts.map +1 -0
  109. package/dist/types/src/plugin-settings/SettingsPlugin.d.ts +2 -0
  110. package/dist/types/src/plugin-settings/SettingsPlugin.d.ts.map +1 -0
  111. package/dist/types/src/{plugins/plugin-settings/provides.d.ts → plugin-settings/actions.d.ts} +1 -10
  112. package/dist/types/src/plugin-settings/actions.d.ts.map +1 -0
  113. package/dist/types/src/plugin-settings/index.d.ts +3 -0
  114. package/dist/types/src/plugin-settings/index.d.ts.map +1 -0
  115. package/dist/types/src/react/ErrorBoundary.d.ts.map +1 -0
  116. package/dist/types/src/react/PluginManagerProvider.d.ts +10 -0
  117. package/dist/types/src/react/PluginManagerProvider.d.ts.map +1 -0
  118. package/dist/types/src/react/Surface.d.ts +12 -0
  119. package/dist/types/src/react/Surface.d.ts.map +1 -0
  120. package/dist/types/src/react/index.d.ts +5 -0
  121. package/dist/types/src/react/index.d.ts.map +1 -0
  122. package/dist/types/src/react/useCapabilities.d.ts +13 -0
  123. package/dist/types/src/react/useCapabilities.d.ts.map +1 -0
  124. package/dist/types/src/testing/index.d.ts +2 -0
  125. package/dist/types/src/testing/index.d.ts.map +1 -0
  126. package/dist/types/src/testing/withPluginManager.d.ts +10 -0
  127. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -0
  128. package/dist/types/src/testing/withPluginManager.stories.d.ts +5 -0
  129. package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -0
  130. package/dist/types/tsconfig.tsbuildinfo +1 -1
  131. package/package.json +28 -15
  132. package/project.json +2 -1
  133. package/src/App.tsx +138 -34
  134. package/src/common/capabilities.ts +82 -0
  135. package/src/common/events.ts +63 -0
  136. package/src/common/file.ts +22 -0
  137. package/src/common/graph.ts +30 -0
  138. package/src/{plugins/common → common}/index.ts +3 -1
  139. package/src/{plugins/common → common}/layout.ts +0 -16
  140. package/src/{plugins/common → common}/navigation.ts +0 -15
  141. package/src/{plugins/plugin-surface/SurfaceContext.ts → common/surface.ts} +6 -37
  142. package/src/common/translations.ts +18 -0
  143. package/src/core/capabilities.test.ts +116 -0
  144. package/src/core/capabilities.ts +213 -0
  145. package/src/core/events.ts +58 -0
  146. package/src/core/index.ts +8 -0
  147. package/src/core/manager.test.ts +567 -0
  148. package/src/core/manager.ts +497 -0
  149. package/src/core/plugin.ts +128 -0
  150. package/src/helpers.test.ts +97 -0
  151. package/src/helpers.ts +45 -0
  152. package/src/index.ts +6 -3
  153. package/src/playground/debug/Debug.tsx +39 -0
  154. package/src/playground/debug/index.ts +5 -0
  155. package/src/playground/debug/plugin.ts +17 -0
  156. package/src/playground/generator/Main.tsx +71 -0
  157. package/src/playground/generator/Toolbar.tsx +46 -0
  158. package/src/playground/generator/generator.ts +23 -0
  159. package/src/playground/generator/index.ts +6 -0
  160. package/src/playground/generator/plugin.ts +18 -0
  161. package/src/playground/layout/Layout.tsx +33 -0
  162. package/src/playground/layout/index.ts +5 -0
  163. package/src/playground/layout/plugin.ts +17 -0
  164. package/src/playground/logger/Toolbar.tsx +28 -0
  165. package/src/playground/logger/index.ts +5 -0
  166. package/src/playground/logger/plugin.ts +33 -0
  167. package/src/playground/logger/schema.ts +12 -0
  168. package/src/playground/playground.stories.tsx +34 -0
  169. package/src/{plugins/plugin-intent → plugin-intent}/IntentContext.tsx +12 -4
  170. package/src/plugin-intent/IntentPlugin.tsx +60 -0
  171. package/src/plugin-intent/actions.ts +22 -0
  172. package/src/plugin-intent/errors.ts +39 -0
  173. package/src/{plugins/plugin-intent → plugin-intent}/index.ts +2 -6
  174. package/src/{plugins/plugin-intent → plugin-intent}/intent-dispatcher.test.ts +36 -35
  175. package/src/{plugins/plugin-intent → plugin-intent}/intent-dispatcher.ts +49 -65
  176. package/src/{plugins/plugin-intent → plugin-intent}/intent.ts +5 -21
  177. package/src/plugin-settings/SettingsPlugin.ts +29 -0
  178. package/src/plugin-settings/actions.ts +17 -0
  179. package/src/plugin-settings/index.ts +6 -0
  180. package/src/react/PluginManagerProvider.ts +22 -0
  181. package/src/react/Surface.tsx +72 -0
  182. package/src/react/index.ts +8 -0
  183. package/src/react/useCapabilities.ts +39 -0
  184. package/src/testing/index.ts +5 -0
  185. package/src/testing/withPluginManager.stories.tsx +47 -0
  186. package/src/testing/withPluginManager.tsx +67 -0
  187. package/tsconfig.json +13 -1
  188. package/dist/lib/browser/chunk-3E7RY3CE.mjs +0 -72
  189. package/dist/lib/browser/chunk-3E7RY3CE.mjs.map +0 -7
  190. package/dist/lib/browser/chunk-QG25ZU2N.mjs +0 -320
  191. package/dist/lib/browser/chunk-QG25ZU2N.mjs.map +0 -7
  192. package/dist/lib/browser/chunk-SPDTXTOV.mjs +0 -163
  193. package/dist/lib/browser/chunk-SPDTXTOV.mjs.map +0 -7
  194. package/dist/lib/browser/chunk-WBOXEHBE.mjs +0 -51
  195. package/dist/lib/browser/chunk-WBOXEHBE.mjs.map +0 -7
  196. package/dist/lib/browser/plugin-intent-T7Y3MJ5C.mjs +0 -32
  197. package/dist/lib/browser/plugin-intent-T7Y3MJ5C.mjs.map +0 -7
  198. package/dist/lib/browser/plugin-settings-5U2L2NRU.mjs +0 -15
  199. package/dist/lib/browser/plugin-settings-5U2L2NRU.mjs.map +0 -7
  200. package/dist/lib/browser/plugin-surface-OKPF3EQI.mjs +0 -24
  201. package/dist/lib/browser/plugin-surface-OKPF3EQI.mjs.map +0 -7
  202. package/dist/lib/node/chunk-BW3RNEVI.cjs +0 -185
  203. package/dist/lib/node/chunk-BW3RNEVI.cjs.map +0 -7
  204. package/dist/lib/node/chunk-FCMHRU3M.cjs +0 -70
  205. package/dist/lib/node/chunk-FCMHRU3M.cjs.map +0 -7
  206. package/dist/lib/node/chunk-QBM42OQ6.cjs +0 -97
  207. package/dist/lib/node/chunk-QBM42OQ6.cjs.map +0 -7
  208. package/dist/lib/node/chunk-VWHAALIN.cjs +0 -344
  209. package/dist/lib/node/chunk-VWHAALIN.cjs.map +0 -7
  210. package/dist/lib/node/plugin-intent-F3TQZIUR.cjs +0 -53
  211. package/dist/lib/node/plugin-intent-F3TQZIUR.cjs.map +0 -7
  212. package/dist/lib/node/plugin-settings-W6UHMH5M.cjs +0 -36
  213. package/dist/lib/node/plugin-settings-W6UHMH5M.cjs.map +0 -7
  214. package/dist/lib/node/plugin-surface-CCSIONYW.cjs +0 -45
  215. package/dist/lib/node/plugin-surface-CCSIONYW.cjs.map +0 -7
  216. package/dist/lib/node-esm/chunk-3T5UIJY3.mjs +0 -53
  217. package/dist/lib/node-esm/chunk-3T5UIJY3.mjs.map +0 -7
  218. package/dist/lib/node-esm/chunk-4GX7V5ZE.mjs +0 -164
  219. package/dist/lib/node-esm/chunk-4GX7V5ZE.mjs.map +0 -7
  220. package/dist/lib/node-esm/chunk-CFOUYXQ6.mjs +0 -321
  221. package/dist/lib/node-esm/chunk-CFOUYXQ6.mjs.map +0 -7
  222. package/dist/lib/node-esm/chunk-EYCTSFEJ.mjs +0 -74
  223. package/dist/lib/node-esm/chunk-EYCTSFEJ.mjs.map +0 -7
  224. package/dist/lib/node-esm/plugin-intent-W2HQC6LC.mjs +0 -33
  225. package/dist/lib/node-esm/plugin-intent-W2HQC6LC.mjs.map +0 -7
  226. package/dist/lib/node-esm/plugin-settings-H5RHNFVC.mjs +0 -16
  227. package/dist/lib/node-esm/plugin-settings-H5RHNFVC.mjs.map +0 -7
  228. package/dist/lib/node-esm/plugin-surface-V3YET3UL.mjs +0 -25
  229. package/dist/lib/node-esm/plugin-surface-V3YET3UL.mjs.map +0 -7
  230. package/dist/types/src/plugins/common/file.d.ts +0 -22
  231. package/dist/types/src/plugins/common/file.d.ts.map +0 -1
  232. package/dist/types/src/plugins/common/graph.d.ts +0 -51
  233. package/dist/types/src/plugins/common/graph.d.ts.map +0 -1
  234. package/dist/types/src/plugins/common/index.d.ts.map +0 -1
  235. package/dist/types/src/plugins/common/layout.d.ts.map +0 -1
  236. package/dist/types/src/plugins/common/metadata.d.ts +0 -16
  237. package/dist/types/src/plugins/common/metadata.d.ts.map +0 -1
  238. package/dist/types/src/plugins/common/navigation.d.ts.map +0 -1
  239. package/dist/types/src/plugins/common/translations.d.ts.map +0 -1
  240. package/dist/types/src/plugins/helpers.d.ts +0 -41
  241. package/dist/types/src/plugins/helpers.d.ts.map +0 -1
  242. package/dist/types/src/plugins/index.d.ts +0 -7
  243. package/dist/types/src/plugins/index.d.ts.map +0 -1
  244. package/dist/types/src/plugins/plugin-host/HostPlugin.d.ts +0 -16
  245. package/dist/types/src/plugins/plugin-host/HostPlugin.d.ts.map +0 -1
  246. package/dist/types/src/plugins/plugin-host/PluginContainer.d.ts +0 -14
  247. package/dist/types/src/plugins/plugin-host/PluginContainer.d.ts.map +0 -1
  248. package/dist/types/src/plugins/plugin-host/PluginContext.d.ts +0 -47
  249. package/dist/types/src/plugins/plugin-host/PluginContext.d.ts.map +0 -1
  250. package/dist/types/src/plugins/plugin-host/index.d.ts +0 -6
  251. package/dist/types/src/plugins/plugin-host/index.d.ts.map +0 -1
  252. package/dist/types/src/plugins/plugin-host/plugin.d.ts +0 -104
  253. package/dist/types/src/plugins/plugin-host/plugin.d.ts.map +0 -1
  254. package/dist/types/src/plugins/plugin-host/plugin.test.d.ts +0 -35
  255. package/dist/types/src/plugins/plugin-host/plugin.test.d.ts.map +0 -1
  256. package/dist/types/src/plugins/plugin-intent/IntentContext.d.ts.map +0 -1
  257. package/dist/types/src/plugins/plugin-intent/IntentPlugin.d.ts +0 -8
  258. package/dist/types/src/plugins/plugin-intent/IntentPlugin.d.ts.map +0 -1
  259. package/dist/types/src/plugins/plugin-intent/index.d.ts +0 -7
  260. package/dist/types/src/plugins/plugin-intent/index.d.ts.map +0 -1
  261. package/dist/types/src/plugins/plugin-intent/intent-dispatcher.d.ts.map +0 -1
  262. package/dist/types/src/plugins/plugin-intent/intent-dispatcher.test.d.ts.map +0 -1
  263. package/dist/types/src/plugins/plugin-intent/intent.d.ts.map +0 -1
  264. package/dist/types/src/plugins/plugin-intent/meta.d.ts +0 -6
  265. package/dist/types/src/plugins/plugin-intent/meta.d.ts.map +0 -1
  266. package/dist/types/src/plugins/plugin-intent/provides.d.ts +0 -16
  267. package/dist/types/src/plugins/plugin-intent/provides.d.ts.map +0 -1
  268. package/dist/types/src/plugins/plugin-settings/SettingsPlugin.d.ts +0 -4
  269. package/dist/types/src/plugins/plugin-settings/SettingsPlugin.d.ts.map +0 -1
  270. package/dist/types/src/plugins/plugin-settings/index.d.ts +0 -4
  271. package/dist/types/src/plugins/plugin-settings/index.d.ts.map +0 -1
  272. package/dist/types/src/plugins/plugin-settings/meta.d.ts +0 -5
  273. package/dist/types/src/plugins/plugin-settings/meta.d.ts.map +0 -1
  274. package/dist/types/src/plugins/plugin-settings/provides.d.ts.map +0 -1
  275. package/dist/types/src/plugins/plugin-surface/ErrorBoundary.d.ts.map +0 -1
  276. package/dist/types/src/plugins/plugin-surface/Surface.d.ts +0 -7
  277. package/dist/types/src/plugins/plugin-surface/Surface.d.ts.map +0 -1
  278. package/dist/types/src/plugins/plugin-surface/SurfaceContext.d.ts.map +0 -1
  279. package/dist/types/src/plugins/plugin-surface/SurfacePlugin.d.ts +0 -7
  280. package/dist/types/src/plugins/plugin-surface/SurfacePlugin.d.ts.map +0 -1
  281. package/dist/types/src/plugins/plugin-surface/helpers.d.ts +0 -21
  282. package/dist/types/src/plugins/plugin-surface/helpers.d.ts.map +0 -1
  283. package/dist/types/src/plugins/plugin-surface/index.d.ts +0 -8
  284. package/dist/types/src/plugins/plugin-surface/index.d.ts.map +0 -1
  285. package/dist/types/src/plugins/plugin-surface/meta.d.ts +0 -5
  286. package/dist/types/src/plugins/plugin-surface/meta.d.ts.map +0 -1
  287. package/dist/types/src/plugins/plugin-surface/provides.d.ts +0 -17
  288. package/dist/types/src/plugins/plugin-surface/provides.d.ts.map +0 -1
  289. package/src/plugins/common/file.ts +0 -36
  290. package/src/plugins/common/graph.ts +0 -70
  291. package/src/plugins/common/metadata.ts +0 -29
  292. package/src/plugins/common/translations.ts +0 -36
  293. package/src/plugins/helpers.ts +0 -92
  294. package/src/plugins/index.ts +0 -11
  295. package/src/plugins/plugin-host/HostPlugin.tsx +0 -88
  296. package/src/plugins/plugin-host/PluginContainer.tsx +0 -120
  297. package/src/plugins/plugin-host/PluginContext.tsx +0 -79
  298. package/src/plugins/plugin-host/index.ts +0 -12
  299. package/src/plugins/plugin-host/plugin.test.ts +0 -158
  300. package/src/plugins/plugin-host/plugin.ts +0 -133
  301. package/src/plugins/plugin-intent/IntentPlugin.tsx +0 -75
  302. package/src/plugins/plugin-intent/meta.ts +0 -11
  303. package/src/plugins/plugin-intent/provides.ts +0 -26
  304. package/src/plugins/plugin-settings/SettingsPlugin.tsx +0 -22
  305. package/src/plugins/plugin-settings/index.ts +0 -9
  306. package/src/plugins/plugin-settings/meta.ts +0 -9
  307. package/src/plugins/plugin-settings/provides.ts +0 -34
  308. package/src/plugins/plugin-surface/Surface.tsx +0 -62
  309. package/src/plugins/plugin-surface/SurfacePlugin.tsx +0 -45
  310. package/src/plugins/plugin-surface/helpers.ts +0 -22
  311. package/src/plugins/plugin-surface/index.ts +0 -14
  312. package/src/plugins/plugin-surface/meta.ts +0 -9
  313. package/src/plugins/plugin-surface/provides.ts +0 -27
  314. /package/dist/types/src/{plugins/plugin-intent → plugin-intent}/intent-dispatcher.test.d.ts +0 -0
  315. /package/dist/types/src/{plugins/plugin-surface → react}/ErrorBoundary.d.ts +0 -0
  316. /package/src/{plugins/plugin-surface → react}/ErrorBoundary.tsx +0 -0
@@ -1,621 +1,121 @@
1
1
  import {
2
+ ActiveParts,
3
+ Capabilities,
4
+ ErrorBoundary,
5
+ Events,
6
+ FileInfoSchema,
2
7
  INTENT_ACTION,
8
+ INTENT_PLUGIN,
3
9
  IntentAction,
10
+ IntentPlugin,
4
11
  IntentProvider,
12
+ LAYOUT_ACTION,
13
+ LAYOUT_PLUGIN,
5
14
  Label,
15
+ Layout,
16
+ LayoutAction,
17
+ NAVIGATION_ACTION,
18
+ NAVIGATION_PLUGIN,
19
+ NavigationAction,
20
+ Plugin,
21
+ PluginManager,
22
+ PluginManagerProvider,
23
+ PluginModule,
24
+ PluginsContext,
25
+ Resource,
26
+ ResourceKey,
27
+ ResourceLanguage,
28
+ SLUG_COLLECTION_INDICATOR,
29
+ SLUG_ENTRY_SEPARATOR,
30
+ SLUG_KEY_VALUE_SEPARATOR,
31
+ SLUG_LIST_SEPARATOR,
32
+ SLUG_PATH_SEPARATOR,
33
+ Surface,
34
+ Toast,
35
+ allOf,
6
36
  chain,
37
+ contributes,
38
+ createApp,
7
39
  createDispatcher,
8
40
  createIntent,
9
41
  createResolver,
10
- meta_default,
11
- parseIntentPlugin,
12
- parseIntentResolverPlugin,
13
- useIntentDispatcher,
14
- useIntentResolver
15
- } from "./chunk-QG25ZU2N.mjs";
16
- import {
17
- ErrorBoundary,
18
- Surface,
19
- SurfaceProvider,
20
42
  createSurface,
21
- isObject,
22
- meta_default as meta_default2,
23
- parseRootSurfacePlugin,
24
- parseSurfacePlugin,
25
- useSurfaceRoot
26
- } from "./chunk-SPDTXTOV.mjs";
27
- import {
43
+ defaultFileTypes,
44
+ defineCapability,
45
+ defineEvent,
46
+ defineModule,
28
47
  definePlugin,
29
- filterPlugins,
30
- findPlugin,
31
- getPlugin,
32
- resolvePlugin
33
- } from "./chunk-3E7RY3CE.mjs";
34
- import {
35
- SETTINGS_ACTION,
36
- SETTINGS_PLUGIN,
37
- SettingsAction,
38
- meta_default as meta_default3,
39
- parseSettingsPlugin
40
- } from "./chunk-WBOXEHBE.mjs";
41
-
42
- // packages/sdk/app-framework/src/plugins/common/file.ts
43
- var defaultFileTypes = {
44
- images: [
45
- "png",
46
- "jpg",
47
- "jpeg",
48
- "gif"
49
- ],
50
- media: [
51
- "mp3",
52
- "mp4",
53
- "mov",
54
- "avi"
55
- ],
56
- text: [
57
- "pdf",
58
- "txt",
59
- "md"
60
- ]
61
- };
62
- var parseFileManagerPlugin = (plugin) => {
63
- return plugin.provides.file ? plugin : void 0;
64
- };
65
-
66
- // packages/sdk/app-framework/src/plugins/common/graph.ts
67
- var parseGraphPlugin = (plugin) => plugin.provides.graph?.root ? plugin : void 0;
68
- var parseGraphBuilderPlugin = (plugin) => plugin.provides.graph?.builder ? plugin : void 0;
69
- var parseGraphSerializerPlugin = (plugin) => plugin.provides.graph?.serializer ? plugin : void 0;
48
+ eventKey,
49
+ firstIdInPart,
50
+ getEvents,
51
+ indexInPart,
52
+ isAllOf,
53
+ isLayoutAdjustment,
54
+ isLayoutMode,
55
+ isLayoutParts,
56
+ isOneOf,
57
+ isSurfaceAvailable,
58
+ lazy,
59
+ oneOf,
60
+ openIds,
61
+ partLength,
62
+ useCapabilities,
63
+ useCapability,
64
+ useIntentDispatcher,
65
+ useIntentResolver,
66
+ usePluginManager
67
+ } from "./chunk-GNLU3GAU.mjs";
70
68
 
71
- // packages/sdk/app-framework/src/plugins/common/layout.ts
69
+ // packages/sdk/app-framework/src/plugin-settings/actions.ts
72
70
  import { S } from "@dxos/echo-schema";
73
- var Toast = S.Struct({
74
- id: S.String,
75
- title: S.optional(Label),
76
- description: S.optional(Label),
77
- icon: S.optional(S.String),
78
- duration: S.optional(S.Number),
79
- closeLabel: S.optional(Label),
80
- actionLabel: S.optional(Label),
81
- actionAlt: S.optional(Label),
82
- // TODO(wittjosiah): Make class with customizable method?
83
- onAction: S.optional(S.Any)
84
- });
85
- var LayoutMode = S.Union(S.Literal("deck"), S.Literal("solo"), S.Literal("fullscreen"));
86
- var isLayoutMode = (value) => S.is(LayoutMode)(value);
87
- var Layout = S.mutable(S.Struct({
88
- layoutMode: LayoutMode,
89
- sidebarOpen: S.Boolean,
90
- complementarySidebarOpen: S.Boolean,
91
- /**
92
- * @deprecated Data to be passed to the complementary sidebar Surface.
93
- */
94
- complementarySidebarContent: S.optional(S.Any),
95
- dialogOpen: S.Boolean,
96
- /**
97
- * Data to be passed to the dialog Surface.
98
- */
99
- dialogContent: S.optional(S.Any),
100
- // TODO(wittjosiah): Custom properties?
101
- dialogBlockAlign: S.optional(S.Literal("start", "center")),
102
- dialogType: S.optional(S.Literal("default", "alert")),
103
- popoverOpen: S.Boolean,
104
- /**
105
- * Data to be passed to the popover Surface.
106
- */
107
- popoverContent: S.optional(S.Any),
108
- popoverAnchorId: S.optional(S.String),
109
- toasts: S.mutable(S.Array(Toast)),
110
- /**
111
- * The identifier of a component to scroll into view when it is mounted.
112
- */
113
- scrollIntoView: S.optional(S.String)
114
- }));
115
- var parseLayoutPlugin = (plugin) => {
116
- const success = S.is(Layout)(plugin.provides.layout);
117
- return success ? plugin : void 0;
118
- };
119
- var LAYOUT_PLUGIN = "dxos.org/plugin/layout";
120
- var LAYOUT_ACTION = `${LAYOUT_PLUGIN}/action`;
121
- var LayoutAction;
122
- (function(LayoutAction2) {
123
- class SetLayout extends S.TaggedClass()(`${LAYOUT_ACTION}/set-layout`, {
71
+ var SETTINGS_PLUGIN = "dxos.org/plugin/settings";
72
+ var SETTINGS_ACTION = `${SETTINGS_PLUGIN}/action`;
73
+ var SettingsAction;
74
+ (function(SettingsAction2) {
75
+ class Open extends S.TaggedClass()(`${SETTINGS_ACTION}/open`, {
124
76
  input: S.Struct({
125
- /**
126
- * Element to set the state of.
127
- */
128
- element: S.Literal("fullscreen", "sidebar", "complementary", "dialog", "popover", "toast"),
129
- /**
130
- * Whether the element is on or off.
131
- *
132
- * If omitted, the element's state will be toggled or set based on other provided data.
133
- * For example, if `component` is provided, the state will be set to `true`.
134
- */
135
- state: S.optional(S.Boolean),
136
- /**
137
- * Component to render in the dialog or popover.
138
- */
139
- component: S.optional(S.String),
140
- /**
141
- * Data to be passed to the dialog or popover Surface.
142
- */
143
- subject: S.optional(S.Any),
144
- /**
145
- * Anchor ID for the popover.
146
- */
147
- anchorId: S.optional(S.String),
148
- // TODO(wittjosiah): Custom properties?
149
- /**
150
- * Block alignment for the dialog.
151
- */
152
- dialogBlockAlign: S.optional(S.Literal("start", "center")),
153
- /**
154
- * Type of dialog.
155
- */
156
- dialogType: S.optional(S.Literal("default", "alert"))
77
+ plugin: S.optional(S.String)
157
78
  }),
158
79
  output: S.Void
159
80
  }) {
160
81
  }
161
- LayoutAction2.SetLayout = SetLayout;
162
- class SetLayoutMode extends S.TaggedClass()(`${LAYOUT_ACTION}/set-layout-mode`, {
163
- input: S.Union(S.Struct({
164
- layoutMode: LayoutMode
165
- }), S.Struct({
166
- revert: S.Literal(true)
167
- })),
168
- output: S.Void
169
- }) {
170
- }
171
- LayoutAction2.SetLayoutMode = SetLayoutMode;
172
- class ScrollIntoView extends S.TaggedClass()(`${LAYOUT_ACTION}/scroll-into-view`, {
173
- input: S.Struct({
174
- id: S.optional(S.String),
175
- // TODO(wittjosiah): Factor out to thread scroll into view action?
176
- cursor: S.optional(S.String),
177
- ref: S.optional(S.String)
178
- }),
179
- output: S.Void
180
- }) {
181
- }
182
- LayoutAction2.ScrollIntoView = ScrollIntoView;
183
- })(LayoutAction || (LayoutAction = {}));
184
-
185
- // packages/sdk/app-framework/src/plugins/common/metadata.ts
186
- var parseMetadataRecordsPlugin = (plugin) => {
187
- return plugin.provides.metadata?.records ? plugin : void 0;
188
- };
189
- var parseMetadataResolverPlugin = (plugin) => {
190
- return plugin.provides.metadata?.resolver ? plugin : void 0;
191
- };
192
-
193
- // packages/sdk/app-framework/src/plugins/common/navigation.ts
194
- import { Schema as S2 } from "@effect/schema";
195
- import { pick } from "@dxos/util";
196
- var SLUG_LIST_SEPARATOR = "+";
197
- var SLUG_ENTRY_SEPARATOR = "_";
198
- var SLUG_KEY_VALUE_SEPARATOR = "-";
199
- var SLUG_PATH_SEPARATOR = "~";
200
- var SLUG_COLLECTION_INDICATOR = "";
201
- var LayoutEntrySchema = S2.mutable(S2.Struct({
202
- id: S2.String,
203
- path: S2.optional(S2.String)
204
- }));
205
- var LayoutPartSchema = S2.Union(S2.Literal("sidebar"), S2.Literal("main"), S2.Literal("solo"), S2.Literal("complementary"), S2.Literal("fullScreen"));
206
- var LayoutPartsSchema = S2.partial(S2.mutable(S2.Record({
207
- key: LayoutPartSchema,
208
- value: S2.mutable(S2.Array(LayoutEntrySchema))
209
- })));
210
- var LayoutCoordinateSchema = S2.mutable(S2.Struct({
211
- part: LayoutPartSchema,
212
- entryId: S2.String
213
- }));
214
- var PartAdjustmentSchema = S2.Union(S2.Literal("increment-start"), S2.Literal("increment-end"), S2.Literal("pin-start"), S2.Literal("pin-end"), S2.Literal("close"), S2.Literal("solo"));
215
- var LayoutAdjustmentSchema = S2.mutable(S2.Struct({
216
- layoutCoordinate: LayoutCoordinateSchema,
217
- type: PartAdjustmentSchema
218
- }));
219
- var ActiveParts = S2.Record({
220
- key: S2.String,
221
- value: S2.Union(S2.String, S2.mutable(S2.Array(S2.String)))
222
- });
223
- var LocationProvidesSchema = S2.mutable(S2.Struct({
224
- location: S2.Struct({
225
- active: LayoutPartsSchema,
226
- closed: S2.Array(S2.String)
227
- })
228
- }));
229
- var isLayoutParts = (value) => {
230
- return S2.is(LayoutPartsSchema)(value);
231
- };
232
- var isLayoutAdjustment = (value) => {
233
- return S2.is(LayoutAdjustmentSchema)(value);
234
- };
235
- var parseNavigationPlugin = (plugin) => {
236
- const location = plugin.provides?.location;
237
- if (!location) {
238
- return void 0;
239
- }
240
- if (S2.is(LocationProvidesSchema)({
241
- location
242
- })) {
243
- return plugin;
244
- }
245
- return void 0;
246
- };
247
- var openIds = (layout, parts) => {
248
- return Object.values(parts ? pick(layout, parts) : layout).flatMap((part) => part?.map((entry) => entry.id) ?? []).filter((id) => id !== void 0);
249
- };
250
- var firstIdInPart = (layout, part) => {
251
- if (!layout) {
252
- return void 0;
253
- }
254
- return layout[part]?.at(0)?.id;
255
- };
256
- var indexInPart = (layout, layoutCoordinate) => {
257
- if (!layout || !layoutCoordinate) {
258
- return void 0;
259
- }
260
- const { part, entryId } = layoutCoordinate;
261
- return layout[part]?.findIndex((entry) => entry.id === entryId);
262
- };
263
- var partLength = (layout, part) => {
264
- if (!layout || !part) {
265
- return 0;
266
- }
267
- return layout[part]?.length ?? 0;
268
- };
269
- var NAVIGATION_PLUGIN = "dxos.org/plugin/navigation";
270
- var NAVIGATION_ACTION = `${NAVIGATION_PLUGIN}/action`;
271
- var NavigationAction;
272
- (function(NavigationAction2) {
273
- class Open extends S2.TaggedClass()(`${NAVIGATION_ACTION}/open`, {
274
- input: S2.Struct({
275
- activeParts: ActiveParts,
276
- noToggle: S2.optional(S2.Boolean)
277
- }),
278
- output: S2.Struct({
279
- open: S2.Array(S2.String)
280
- })
281
- }) {
282
- }
283
- NavigationAction2.Open = Open;
284
- class AddToActive extends S2.TaggedClass()(`${NAVIGATION_ACTION}/add-to-active`, {
285
- input: S2.Struct({
286
- id: S2.String,
287
- part: LayoutPartSchema,
288
- scrollIntoView: S2.optional(S2.Boolean),
289
- pivotId: S2.optional(S2.String),
290
- positioning: S2.optional(S2.Literal("start", "end"))
291
- }),
292
- output: S2.Void
293
- }) {
294
- }
295
- NavigationAction2.AddToActive = AddToActive;
296
- class Set extends S2.TaggedClass()(`${NAVIGATION_ACTION}/set`, {
297
- input: S2.Struct({
298
- activeParts: ActiveParts
299
- }),
300
- output: S2.Void
301
- }) {
302
- }
303
- NavigationAction2.Set = Set;
304
- class Close extends S2.TaggedClass()(`${NAVIGATION_ACTION}/close`, {
305
- input: S2.Struct({
306
- activeParts: ActiveParts,
307
- noToggle: S2.optional(S2.Boolean)
308
- }),
309
- output: S2.Void
310
- }) {
311
- }
312
- NavigationAction2.Close = Close;
313
- class Adjust extends S2.TaggedClass()(`${NAVIGATION_ACTION}/adjust`, {
314
- input: LayoutAdjustmentSchema,
315
- output: S2.Void
316
- }) {
317
- }
318
- NavigationAction2.Adjust = Adjust;
319
- class Expose extends S2.TaggedClass()(`${NAVIGATION_ACTION}/expose`, {
320
- input: S2.Struct({
321
- id: S2.String
322
- }),
323
- output: S2.Void
324
- }) {
325
- }
326
- NavigationAction2.Expose = Expose;
327
- })(NavigationAction || (NavigationAction = {}));
328
-
329
- // packages/sdk/app-framework/src/plugins/common/translations.ts
330
- import { z } from "zod";
331
- var ResourceKey = z.union([
332
- z.string(),
333
- z.record(z.any())
334
- ]);
335
- var ResourceLanguage = z.record(ResourceKey);
336
- var Resource = z.record(ResourceLanguage);
337
- var parseTranslationsPlugin = (plugin) => {
338
- const { success } = z.array(Resource).safeParse(plugin.provides.translations);
339
- return success ? plugin : void 0;
340
- };
341
-
342
- // packages/sdk/app-framework/src/plugins/plugin-host/HostPlugin.tsx
343
- import React2 from "react";
344
- import { LocalStorageStore } from "@dxos/local-storage";
345
-
346
- // packages/sdk/app-framework/src/plugins/plugin-host/PluginContainer.tsx
347
- import React, { useEffect, useState } from "react";
348
- import { log } from "@dxos/log";
349
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/plugins/plugin-host/PluginContainer.tsx";
350
- var PluginContainer = ({ plugins: definitions, core, state, placeholder }) => {
351
- const [error, setError] = useState();
352
- useEffect(() => {
353
- log("initializing plugins", {
354
- enabled: state.enabled
355
- }, {
356
- F: __dxlog_file,
357
- L: 26,
358
- S: void 0,
359
- C: (f, a) => f(...a)
360
- });
361
- const t = setTimeout(async () => {
362
- try {
363
- const enabledIds = [
364
- ...core,
365
- ...state.enabled
366
- ];
367
- const enabled = await Promise.all(enabledIds.map((id) => definitions[id]).filter((definition) => Boolean(definition)).map((definition) => definition()));
368
- const plugins = await Promise.all(enabled.map(async (definition) => {
369
- const plugin = await initializePlugin(definition).catch((err) => {
370
- log.error("Failed to initialize plugin:", {
371
- id: definition.meta.id,
372
- err
373
- }, {
374
- F: __dxlog_file,
375
- L: 41,
376
- S: void 0,
377
- C: (f, a) => f(...a)
378
- });
379
- });
380
- log("initialized", {
381
- plugin: definition.meta.id
382
- }, {
383
- F: __dxlog_file,
384
- L: 44,
385
- S: void 0,
386
- C: (f, a) => f(...a)
387
- });
388
- return plugin;
389
- }));
390
- const initialized = plugins.filter((plugin) => Boolean(plugin));
391
- log("plugins initialized", {
392
- plugins: initialized
393
- }, {
394
- F: __dxlog_file,
395
- L: 50,
396
- S: void 0,
397
- C: (f, a) => f(...a)
398
- });
399
- await Promise.all(enabled.map((plugin) => plugin.ready?.({
400
- plugins: initialized
401
- })));
402
- log("plugins ready", {
403
- plugins: initialized
404
- }, {
405
- F: __dxlog_file,
406
- L: 53,
407
- S: void 0,
408
- C: (f, a) => f(...a)
409
- });
410
- state.plugins = initialized;
411
- state.ready = true;
412
- } catch (err) {
413
- setError(err);
414
- }
415
- });
416
- return () => {
417
- clearTimeout(t);
418
- state.ready = false;
419
- };
420
- }, []);
421
- if (error) {
422
- throw error;
423
- }
424
- if (!state.ready) {
425
- return /* @__PURE__ */ React.createElement(React.Fragment, null, placeholder);
426
- }
427
- const ComposedContext = composeContext(state.plugins);
428
- return /* @__PURE__ */ React.createElement(ComposedContext, null, rootComponents(state.plugins));
429
- };
430
- var initializePlugin = async (pluginDefinition) => {
431
- const provides = await pluginDefinition.initialize?.();
432
- return {
433
- ...pluginDefinition,
434
- provides: {
435
- ...pluginDefinition.provides,
436
- ...provides
437
- }
438
- };
439
- };
440
- var rootComponents = (plugins) => {
441
- return plugins.map((plugin) => {
442
- const Component = plugin.provides.root;
443
- if (Component) {
444
- return /* @__PURE__ */ React.createElement(Component, {
445
- key: plugin.meta.id
446
- });
447
- } else {
448
- return null;
449
- }
450
- }).filter((node) => Boolean(node));
451
- };
452
- var composeContext = (plugins) => {
453
- return compose(plugins.map((p) => p.provides.context).filter(Boolean));
454
- };
455
- var compose = (contexts) => {
456
- return [
457
- ...contexts
458
- ].reduce((Acc, Next) => ({ children }) => /* @__PURE__ */ React.createElement(Acc, null, /* @__PURE__ */ React.createElement(Next, null, children)));
459
- };
460
-
461
- // packages/sdk/app-framework/src/plugins/plugin-host/PluginContext.tsx
462
- import { createContext, useContext, useMemo } from "react";
463
- import { raise } from "@dxos/debug";
464
- import { nonNullable } from "@dxos/util";
465
- var PluginContext = /* @__PURE__ */ createContext(void 0);
466
- var usePlugins = () => useContext(PluginContext) ?? raise(new Error("Missing PluginContext"));
467
- var usePlugin = (id) => {
468
- const { plugins } = usePlugins();
469
- return findPlugin(plugins, id);
470
- };
471
- var useResolvePlugin = (predicate) => {
472
- const { plugins } = usePlugins();
473
- return resolvePlugin(plugins, predicate);
474
- };
475
- var useResolvePlugins = (predicate) => {
476
- const { plugins } = usePlugins();
477
- return useMemo(() => plugins.map(predicate).filter(nonNullable), [
478
- plugins,
479
- predicate
480
- ]);
481
- };
482
- var PluginProvider = PluginContext.Provider;
82
+ SettingsAction2.Open = Open;
83
+ })(SettingsAction || (SettingsAction = {}));
483
84
 
484
- // packages/sdk/app-framework/src/plugins/plugin-host/HostPlugin.tsx
485
- var HOST_PLUGIN = "dxos.org/plugin/host";
486
- var HostPlugin = ({ plugins, meta, core, defaults = [], fallback = DefaultFallback, placeholder = null }) => {
487
- const state = new LocalStorageStore(HOST_PLUGIN, {
488
- ready: false,
489
- core,
490
- enabled: [
491
- ...defaults
85
+ // packages/sdk/app-framework/src/plugin-settings/SettingsPlugin.ts
86
+ import { RootSettingsStore } from "@dxos/local-storage";
87
+ var SettingsPlugin = () => definePlugin({
88
+ id: SETTINGS_PLUGIN
89
+ }, [
90
+ defineModule({
91
+ id: `${SETTINGS_PLUGIN}/module/store`,
92
+ activatesOn: Events.Startup,
93
+ activatesBefore: [
94
+ Events.SetupSettings
492
95
  ],
493
- plugins: [],
494
- available: meta.filter(({ id }) => !core.includes(id)),
495
- // TODO(burdon): Functions should not be part of the settings type.
496
- setPlugin: (id, enabled) => {
497
- if (enabled) {
498
- state.values.enabled.push(id);
499
- } else {
500
- const index = state.values.enabled.findIndex((enabled2) => enabled2 === id);
501
- index !== -1 && state.values.enabled.splice(index, 1);
502
- }
503
- }
504
- });
505
- state.prop({
506
- key: "enabled",
507
- type: LocalStorageStore.json()
508
- });
509
- return {
510
- meta: {
511
- id: HOST_PLUGIN,
512
- name: "Plugin host"
513
- },
514
- provides: {
515
- context: ({ children }) => {
516
- return /* @__PURE__ */ React2.createElement(PluginProvider, {
517
- value: state.values
518
- }, children);
519
- },
520
- root: () => {
521
- return /* @__PURE__ */ React2.createElement(ErrorBoundary, {
522
- fallback
523
- }, /* @__PURE__ */ React2.createElement(PluginContainer, {
524
- plugins,
525
- core,
526
- state: state.values,
527
- placeholder
528
- }));
529
- }
530
- }
531
- };
532
- };
533
- var DefaultFallback = ({ error }) => {
534
- return /* @__PURE__ */ React2.createElement("div", {
535
- style: {
536
- padding: "1rem"
537
- }
538
- }, /* @__PURE__ */ React2.createElement("h1", {
539
- style: {
540
- fontSize: "1.2rem",
541
- fontWeight: 700,
542
- margin: "0.5rem 0"
543
- }
544
- }, error.message), /* @__PURE__ */ React2.createElement("pre", null, error.stack));
545
- };
546
-
547
- // packages/sdk/app-framework/src/plugins/plugin-host/plugin.ts
548
- var Plugin;
549
- (function(Plugin2) {
550
- Plugin2.lazy = (p, props) => {
551
- return () => p().then(({ default: definition }) => {
552
- return definition(props);
553
- });
554
- };
555
- })(Plugin || (Plugin = {}));
556
-
557
- // packages/sdk/app-framework/src/App.tsx
558
- import React3 from "react";
559
- import { invariant } from "@dxos/invariant";
560
- var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/App.tsx";
561
- var createApp = ({ meta, plugins, core, ...params }) => {
562
- const hostPlugin = HostPlugin({
563
- plugins: {
564
- ...plugins,
565
- [meta_default.id]: Plugin.lazy(() => import("./plugin-intent-T7Y3MJ5C.mjs")),
566
- [meta_default3.id]: Plugin.lazy(() => import("./plugin-settings-5U2L2NRU.mjs")),
567
- [meta_default2.id]: Plugin.lazy(() => import("./plugin-surface-OKPF3EQI.mjs"))
568
- },
569
- meta: [
570
- meta_default,
571
- meta_default3,
572
- meta_default2,
573
- ...meta
574
- ],
575
- core: [
576
- meta_default.id,
577
- meta_default3.id,
578
- meta_default2.id,
579
- ...core
96
+ activatesAfter: [
97
+ Events.SettingsReady
580
98
  ],
581
- ...params
582
- });
583
- invariant(hostPlugin.provides, void 0, {
584
- F: __dxlog_file2,
585
- L: 53,
586
- S: void 0,
587
- A: [
588
- "hostPlugin.provides",
589
- ""
590
- ]
591
- });
592
- const { context: Context, root: Root } = hostPlugin.provides;
593
- invariant(Context, void 0, {
594
- F: __dxlog_file2,
595
- L: 55,
596
- S: void 0,
597
- A: [
598
- "Context",
599
- ""
600
- ]
601
- });
602
- invariant(Root, void 0, {
603
- F: __dxlog_file2,
604
- L: 56,
605
- S: void 0,
606
- A: [
607
- "Root",
608
- ""
609
- ]
610
- });
611
- return () => /* @__PURE__ */ React3.createElement(Context, null, /* @__PURE__ */ React3.createElement(Root, null));
612
- };
99
+ activate: (context) => {
100
+ const allSettings = context.requestCapabilities(Capabilities.Settings);
101
+ const settingsStore = new RootSettingsStore();
102
+ allSettings.forEach((setting) => {
103
+ settingsStore.createStore(setting);
104
+ });
105
+ return contributes(Capabilities.SettingsStore, settingsStore);
106
+ }
107
+ })
108
+ ]);
613
109
  export {
614
110
  ActiveParts,
111
+ Capabilities,
615
112
  ErrorBoundary,
616
- HostPlugin,
113
+ Events,
114
+ FileInfoSchema,
617
115
  INTENT_ACTION,
116
+ INTENT_PLUGIN,
618
117
  IntentAction,
118
+ IntentPlugin,
619
119
  IntentProvider,
620
120
  LAYOUT_ACTION,
621
121
  LAYOUT_PLUGIN,
@@ -626,7 +126,10 @@ export {
626
126
  NAVIGATION_PLUGIN,
627
127
  NavigationAction,
628
128
  Plugin,
629
- PluginProvider,
129
+ PluginManager,
130
+ PluginManagerProvider,
131
+ PluginModule,
132
+ PluginsContext,
630
133
  Resource,
631
134
  ResourceKey,
632
135
  ResourceLanguage,
@@ -638,49 +141,40 @@ export {
638
141
  SLUG_LIST_SEPARATOR,
639
142
  SLUG_PATH_SEPARATOR,
640
143
  SettingsAction,
144
+ SettingsPlugin,
641
145
  Surface,
642
- SurfaceProvider,
643
146
  Toast,
147
+ allOf,
644
148
  chain,
149
+ contributes,
645
150
  createApp,
646
151
  createDispatcher,
647
152
  createIntent,
648
153
  createResolver,
649
154
  createSurface,
650
155
  defaultFileTypes,
156
+ defineCapability,
157
+ defineEvent,
158
+ defineModule,
651
159
  definePlugin,
652
- filterPlugins,
653
- findPlugin,
160
+ eventKey,
654
161
  firstIdInPart,
655
- getPlugin,
162
+ getEvents,
656
163
  indexInPart,
164
+ isAllOf,
657
165
  isLayoutAdjustment,
658
166
  isLayoutMode,
659
167
  isLayoutParts,
660
- isObject,
168
+ isOneOf,
169
+ isSurfaceAvailable,
170
+ lazy,
171
+ oneOf,
661
172
  openIds,
662
- parseFileManagerPlugin,
663
- parseGraphBuilderPlugin,
664
- parseGraphPlugin,
665
- parseGraphSerializerPlugin,
666
- parseIntentPlugin,
667
- parseIntentResolverPlugin,
668
- parseLayoutPlugin,
669
- parseMetadataRecordsPlugin,
670
- parseMetadataResolverPlugin,
671
- parseNavigationPlugin,
672
- parseRootSurfacePlugin,
673
- parseSettingsPlugin,
674
- parseSurfacePlugin,
675
- parseTranslationsPlugin,
676
173
  partLength,
677
- resolvePlugin,
174
+ useCapabilities,
175
+ useCapability,
678
176
  useIntentDispatcher,
679
177
  useIntentResolver,
680
- usePlugin,
681
- usePlugins,
682
- useResolvePlugin,
683
- useResolvePlugins,
684
- useSurfaceRoot
178
+ usePluginManager
685
179
  };
686
180
  //# sourceMappingURL=index.mjs.map