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