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

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 (393) hide show
  1. package/.storybook/main.mts +11 -0
  2. package/.storybook/preview.mts +8 -0
  3. package/.swc/plugins/linux_x86_64_19.0.0/727453fb3a62f7f1d952a41e051ca8a6f88cadc45cee43c6a4d1aa45f9b75665.wasmer-v7 +0 -0
  4. package/.swc/plugins/{v7_linux_x86_64_13.0.0/fce1bdb8e20a094e4af08bad09cc81497ed0e2e7c51223b07d371063cca18429 → linux_x86_64_19.0.0/fce1bdb8e20a094e4af08bad09cc81497ed0e2e7c51223b07d371063cca18429.wasmer-v7} +0 -0
  5. package/dist/lib/browser/{app-graph-builder-BGGXLD6T.mjs → app-graph-builder-OIEZZC45.mjs} +32 -31
  6. package/dist/lib/browser/app-graph-builder-OIEZZC45.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-DHZB7HG7.mjs → chunk-6XKO24JP.mjs} +254 -184
  8. package/dist/lib/browser/chunk-6XKO24JP.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-ORWHM7CO.mjs → chunk-SCPE4ZO2.mjs} +11 -8
  10. package/dist/lib/browser/chunk-SCPE4ZO2.mjs.map +7 -0
  11. package/dist/lib/browser/{chunk-2636QSIK.mjs → chunk-WPW5VVAX.mjs} +399 -266
  12. package/dist/lib/browser/chunk-WPW5VVAX.mjs.map +7 -0
  13. package/dist/lib/browser/index.mjs +20 -56
  14. package/dist/lib/browser/index.mjs.map +3 -3
  15. package/dist/lib/browser/{intent-dispatcher-TWKB22NI.mjs → intent-dispatcher-LZ4AE66E.mjs} +2 -2
  16. package/dist/lib/browser/{intent-resolver-O67UANYP.mjs → intent-resolver-QVCKRX6G.mjs} +7 -7
  17. package/dist/lib/browser/intent-resolver-QVCKRX6G.mjs.map +7 -0
  18. package/dist/lib/browser/meta.json +1 -1
  19. package/dist/lib/browser/react/index.mjs +34 -0
  20. package/dist/lib/browser/{store-LFKDWHUQ.mjs → store-CNPHOYTJ.mjs} +5 -5
  21. package/dist/lib/browser/store-CNPHOYTJ.mjs.map +7 -0
  22. package/dist/lib/browser/testing/index.mjs +17 -21
  23. package/dist/lib/browser/testing/index.mjs.map +3 -3
  24. package/dist/lib/node-esm/{app-graph-builder-QHIJUYYW.mjs → app-graph-builder-EBU4NVWD.mjs} +32 -31
  25. package/dist/lib/node-esm/app-graph-builder-EBU4NVWD.mjs.map +7 -0
  26. package/dist/lib/node-esm/{chunk-NJAFK626.mjs → chunk-3UPX5OIS.mjs} +254 -184
  27. package/dist/lib/node-esm/chunk-3UPX5OIS.mjs.map +7 -0
  28. package/dist/lib/node-esm/{chunk-VSKRV3NW.mjs → chunk-XJZGUJ3H.mjs} +399 -266
  29. package/dist/lib/node-esm/chunk-XJZGUJ3H.mjs.map +7 -0
  30. package/dist/lib/node-esm/{chunk-UMZQERLE.mjs → chunk-ZX63QUGE.mjs} +11 -8
  31. package/dist/lib/node-esm/chunk-ZX63QUGE.mjs.map +7 -0
  32. package/dist/lib/node-esm/index.mjs +20 -56
  33. package/dist/lib/node-esm/index.mjs.map +3 -3
  34. package/dist/lib/node-esm/{intent-dispatcher-5PRM3KGH.mjs → intent-dispatcher-MGOJ3CHD.mjs} +2 -2
  35. package/dist/lib/node-esm/{intent-resolver-K3D4BXQQ.mjs → intent-resolver-URF3HN3G.mjs} +7 -7
  36. package/dist/lib/node-esm/intent-resolver-URF3HN3G.mjs.map +7 -0
  37. package/dist/lib/node-esm/meta.json +1 -1
  38. package/dist/lib/node-esm/react/index.mjs +35 -0
  39. package/dist/lib/node-esm/{store-53XDUBMD.mjs → store-RK5B4XEL.mjs} +5 -5
  40. package/dist/lib/node-esm/store-RK5B4XEL.mjs.map +7 -0
  41. package/dist/lib/node-esm/testing/index.mjs +17 -21
  42. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  43. package/dist/types/src/common/capabilities.d.ts +111 -38
  44. package/dist/types/src/common/capabilities.d.ts.map +1 -1
  45. package/dist/types/src/common/collaboration.d.ts +10 -9
  46. package/dist/types/src/common/collaboration.d.ts.map +1 -1
  47. package/dist/types/src/common/events.d.ts.map +1 -1
  48. package/dist/types/src/common/file.d.ts +1 -1
  49. package/dist/types/src/common/file.d.ts.map +1 -1
  50. package/dist/types/src/common/layout.d.ts +1 -3
  51. package/dist/types/src/common/layout.d.ts.map +1 -1
  52. package/dist/types/src/common/surface.d.ts +19 -16
  53. package/dist/types/src/common/surface.d.ts.map +1 -1
  54. package/dist/types/src/common/translations.d.ts +1 -1
  55. package/dist/types/src/common/translations.d.ts.map +1 -1
  56. package/dist/types/src/core/capabilities.d.ts +19 -16
  57. package/dist/types/src/core/capabilities.d.ts.map +1 -1
  58. package/dist/types/src/core/manager.d.ts +7 -3
  59. package/dist/types/src/core/manager.d.ts.map +1 -1
  60. package/dist/types/src/core/plugin.d.ts +8 -1
  61. package/dist/types/src/core/plugin.d.ts.map +1 -1
  62. package/dist/types/src/index.d.ts +0 -2
  63. package/dist/types/src/index.d.ts.map +1 -1
  64. package/dist/types/src/playground/debug/Debug.d.ts +1 -1
  65. package/dist/types/src/playground/debug/plugin.d.ts +1 -1
  66. package/dist/types/src/playground/debug/plugin.d.ts.map +1 -1
  67. package/dist/types/src/playground/generator/Main.d.ts +1 -1
  68. package/dist/types/src/playground/generator/Main.d.ts.map +1 -1
  69. package/dist/types/src/playground/generator/Toolbar.d.ts +1 -1
  70. package/dist/types/src/playground/generator/Toolbar.d.ts.map +1 -1
  71. package/dist/types/src/playground/generator/generator.d.ts +1 -1
  72. package/dist/types/src/playground/generator/generator.d.ts.map +1 -1
  73. package/dist/types/src/playground/generator/plugin.d.ts +1 -1
  74. package/dist/types/src/playground/generator/plugin.d.ts.map +1 -1
  75. package/dist/types/src/playground/layout/Layout.d.ts +2 -2
  76. package/dist/types/src/playground/layout/plugin.d.ts +1 -1
  77. package/dist/types/src/playground/layout/plugin.d.ts.map +1 -1
  78. package/dist/types/src/playground/logger/Toolbar.d.ts +1 -1
  79. package/dist/types/src/playground/logger/Toolbar.d.ts.map +1 -1
  80. package/dist/types/src/playground/logger/plugin.d.ts +1 -1
  81. package/dist/types/src/playground/logger/plugin.d.ts.map +1 -1
  82. package/dist/types/src/playground/logger/schema.d.ts +1 -1
  83. package/dist/types/src/playground/logger/schema.d.ts.map +1 -1
  84. package/dist/types/src/playground/playground.stories.d.ts +5 -4
  85. package/dist/types/src/playground/playground.stories.d.ts.map +1 -1
  86. package/dist/types/src/plugin-intent/IntentPlugin.d.ts +1 -1
  87. package/dist/types/src/plugin-intent/IntentPlugin.d.ts.map +1 -1
  88. package/dist/types/src/plugin-intent/actions.d.ts +5 -7
  89. package/dist/types/src/plugin-intent/actions.d.ts.map +1 -1
  90. package/dist/types/src/plugin-intent/errors.d.ts.map +1 -1
  91. package/dist/types/src/plugin-intent/index.d.ts +1 -0
  92. package/dist/types/src/plugin-intent/index.d.ts.map +1 -1
  93. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +7 -7
  94. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -1
  95. package/dist/types/src/plugin-intent/intent.d.ts +1 -1
  96. package/dist/types/src/plugin-intent/intent.d.ts.map +1 -1
  97. package/dist/types/src/plugin-intent/meta.d.ts +3 -0
  98. package/dist/types/src/plugin-intent/meta.d.ts.map +1 -0
  99. package/dist/types/src/plugin-settings/SettingsPlugin.d.ts +1 -1
  100. package/dist/types/src/plugin-settings/SettingsPlugin.d.ts.map +1 -1
  101. package/dist/types/src/plugin-settings/actions.d.ts +5 -7
  102. package/dist/types/src/plugin-settings/actions.d.ts.map +1 -1
  103. package/dist/types/src/plugin-settings/app-graph-builder.d.ts +1 -1
  104. package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +1 -1
  105. package/dist/types/src/plugin-settings/intent-resolver.d.ts +1 -1
  106. package/dist/types/src/plugin-settings/intent-resolver.d.ts.map +1 -1
  107. package/dist/types/src/plugin-settings/meta.d.ts +3 -0
  108. package/dist/types/src/plugin-settings/meta.d.ts.map +1 -0
  109. package/dist/types/src/plugin-settings/store.d.ts +1 -1
  110. package/dist/types/src/plugin-settings/store.d.ts.map +1 -1
  111. package/dist/types/src/plugin-settings/translations.d.ts +2 -1
  112. package/dist/types/src/plugin-settings/translations.d.ts.map +1 -1
  113. package/dist/types/src/react/App.d.ts +10 -0
  114. package/dist/types/src/react/App.d.ts.map +1 -0
  115. package/dist/types/src/react/App.stories.d.ts +14 -0
  116. package/dist/types/src/react/App.stories.d.ts.map +1 -0
  117. package/dist/types/src/react/DefaultFallback.d.ts +8 -0
  118. package/dist/types/src/react/DefaultFallback.d.ts.map +1 -0
  119. package/dist/types/src/react/ErrorBoundary.d.ts +13 -14
  120. package/dist/types/src/react/ErrorBoundary.d.ts.map +1 -1
  121. package/dist/types/src/react/IntentContext.d.ts.map +1 -1
  122. package/dist/types/src/react/Surface.d.ts +5 -5
  123. package/dist/types/src/react/Surface.d.ts.map +1 -1
  124. package/dist/types/src/react/Surface.stories.d.ts +8 -10
  125. package/dist/types/src/react/Surface.stories.d.ts.map +1 -1
  126. package/dist/types/src/react/common.d.ts.map +1 -1
  127. package/dist/types/src/react/index.d.ts +2 -0
  128. package/dist/types/src/react/index.d.ts.map +1 -1
  129. package/dist/types/src/react/types.d.ts +14 -0
  130. package/dist/types/src/react/types.d.ts.map +1 -0
  131. package/dist/types/src/{App.d.ts → react/useApp.d.ts} +7 -6
  132. package/dist/types/src/react/useApp.d.ts.map +1 -0
  133. package/dist/types/src/react/useCapabilities.d.ts.map +1 -1
  134. package/dist/types/src/react/useLoading.d.ts +19 -0
  135. package/dist/types/src/react/useLoading.d.ts.map +1 -0
  136. package/dist/types/src/testing/withPluginManager.d.ts +9 -8
  137. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
  138. package/dist/types/src/testing/withPluginManager.stories.d.ts +9 -3
  139. package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
  140. package/dist/types/tsconfig.tsbuildinfo +1 -1
  141. package/moon.yml +5 -1
  142. package/package.json +46 -38
  143. package/src/common/capabilities.ts +120 -19
  144. package/src/common/collaboration.ts +6 -9
  145. package/src/common/events.ts +3 -1
  146. package/src/common/file.ts +1 -1
  147. package/src/common/layout.ts +3 -4
  148. package/src/common/surface.ts +23 -21
  149. package/src/common/translations.ts +1 -1
  150. package/src/core/capabilities.test.ts +3 -3
  151. package/src/core/capabilities.ts +36 -27
  152. package/src/core/manager.test.ts +22 -21
  153. package/src/core/manager.ts +141 -56
  154. package/src/core/plugin.ts +13 -2
  155. package/src/helpers.test.ts +1 -1
  156. package/src/index.ts +0 -2
  157. package/src/playground/debug/Debug.tsx +1 -1
  158. package/src/playground/debug/plugin.ts +7 -8
  159. package/src/playground/generator/Main.tsx +0 -1
  160. package/src/playground/generator/Toolbar.tsx +2 -1
  161. package/src/playground/generator/generator.ts +4 -4
  162. package/src/playground/generator/plugin.ts +12 -13
  163. package/src/playground/layout/plugin.ts +10 -9
  164. package/src/playground/logger/Toolbar.tsx +2 -1
  165. package/src/playground/logger/plugin.ts +30 -25
  166. package/src/playground/logger/schema.ts +1 -1
  167. package/src/playground/playground.stories.tsx +20 -16
  168. package/src/plugin-intent/IntentPlugin.ts +13 -13
  169. package/src/plugin-intent/actions.ts +4 -6
  170. package/src/plugin-intent/errors.ts +2 -1
  171. package/src/plugin-intent/index.ts +1 -0
  172. package/src/plugin-intent/intent-dispatcher.test.ts +10 -3
  173. package/src/plugin-intent/intent-dispatcher.ts +21 -12
  174. package/src/plugin-intent/intent.ts +1 -1
  175. package/src/plugin-intent/meta.ts +10 -0
  176. package/src/plugin-settings/SettingsPlugin.ts +27 -28
  177. package/src/plugin-settings/actions.ts +9 -13
  178. package/src/plugin-settings/app-graph-builder.ts +25 -22
  179. package/src/plugin-settings/intent-resolver.ts +5 -4
  180. package/src/plugin-settings/meta.ts +10 -0
  181. package/src/plugin-settings/store.ts +3 -3
  182. package/src/plugin-settings/translations.ts +4 -4
  183. package/src/react/App.stories.tsx +33 -0
  184. package/src/react/App.tsx +59 -0
  185. package/src/react/DefaultFallback.tsx +26 -0
  186. package/src/react/ErrorBoundary.tsx +26 -15
  187. package/src/react/IntentContext.tsx +3 -2
  188. package/src/react/Surface.stories.tsx +81 -52
  189. package/src/react/Surface.tsx +70 -38
  190. package/src/react/common.ts +2 -1
  191. package/src/react/index.ts +4 -0
  192. package/src/react/types.ts +38 -0
  193. package/src/react/useApp.tsx +165 -0
  194. package/src/react/useCapabilities.ts +4 -3
  195. package/src/react/useLoading.tsx +70 -0
  196. package/src/testing/withPluginManager.stories.tsx +9 -5
  197. package/src/testing/withPluginManager.tsx +33 -32
  198. package/tsconfig.json +15 -10
  199. package/vitest.config.ts +8 -6
  200. package/.eslintrc.cjs +0 -9
  201. package/.swc/plugins/v7_linux_x86_64_13.0.0/f45bdff002284d9e8f9ef3f0be909de12da36c049cbcf261ac78fc00abb09a2d +0 -0
  202. package/dist/lib/browser/app-graph-builder-BGGXLD6T.mjs.map +0 -7
  203. package/dist/lib/browser/chunk-2636QSIK.mjs.map +0 -7
  204. package/dist/lib/browser/chunk-DHZB7HG7.mjs.map +0 -7
  205. package/dist/lib/browser/chunk-ORWHM7CO.mjs.map +0 -7
  206. package/dist/lib/browser/intent-resolver-O67UANYP.mjs.map +0 -7
  207. package/dist/lib/browser/store-LFKDWHUQ.mjs.map +0 -7
  208. package/dist/lib/browser/worker.mjs +0 -79
  209. package/dist/lib/node-esm/app-graph-builder-QHIJUYYW.mjs.map +0 -7
  210. package/dist/lib/node-esm/chunk-NJAFK626.mjs.map +0 -7
  211. package/dist/lib/node-esm/chunk-UMZQERLE.mjs.map +0 -7
  212. package/dist/lib/node-esm/chunk-VSKRV3NW.mjs.map +0 -7
  213. package/dist/lib/node-esm/intent-resolver-K3D4BXQQ.mjs.map +0 -7
  214. package/dist/lib/node-esm/store-53XDUBMD.mjs.map +0 -7
  215. package/dist/lib/node-esm/worker.mjs +0 -80
  216. package/dist/types/src/App.d.ts.map +0 -1
  217. package/dist/types/src/worker.d.ts +0 -4
  218. package/dist/types/src/worker.d.ts.map +0 -1
  219. package/src/App.tsx +0 -276
  220. package/src/worker.ts +0 -11
  221. package/typedoc/.nojekyll +0 -1
  222. package/typedoc/assets/hierarchy.js +0 -1
  223. package/typedoc/assets/highlight.css +0 -106
  224. package/typedoc/assets/icons.js +0 -18
  225. package/typedoc/assets/icons.svg +0 -1
  226. package/typedoc/assets/main.js +0 -60
  227. package/typedoc/assets/navigation.js +0 -1
  228. package/typedoc/assets/search.js +0 -1
  229. package/typedoc/assets/style.css +0 -1640
  230. package/typedoc/classes/CollaborationActions.InsertContent.html +0 -421
  231. package/typedoc/classes/ErrorBoundary.html +0 -125
  232. package/typedoc/classes/IntentAction.ShowUndo.html +0 -227
  233. package/typedoc/classes/IntentAction.Track.html +0 -266
  234. package/typedoc/classes/LayoutAction.AddToast.html +0 -265
  235. package/typedoc/classes/LayoutAction.Close.html +0 -382
  236. package/typedoc/classes/LayoutAction.Expose.html +0 -265
  237. package/typedoc/classes/LayoutAction.Open.html +0 -1123
  238. package/typedoc/classes/LayoutAction.RevertWorkspace.html +0 -343
  239. package/typedoc/classes/LayoutAction.ScrollIntoView.html +0 -460
  240. package/typedoc/classes/LayoutAction.Set.html +0 -460
  241. package/typedoc/classes/LayoutAction.SetLayoutMode.html +0 -499
  242. package/typedoc/classes/LayoutAction.SwitchWorkspace.html +0 -265
  243. package/typedoc/classes/LayoutAction.UpdateComplementary.html +0 -616
  244. package/typedoc/classes/LayoutAction.UpdateDialog.html +0 -1123
  245. package/typedoc/classes/LayoutAction.UpdateLayout.html +0 -461
  246. package/typedoc/classes/LayoutAction.UpdatePopover.html +0 -1435
  247. package/typedoc/classes/LayoutAction.UpdateSidebar.html +0 -616
  248. package/typedoc/classes/Plugin.html +0 -6
  249. package/typedoc/classes/PluginContext.html +0 -38
  250. package/typedoc/classes/PluginManager.html +0 -43
  251. package/typedoc/classes/PluginModule.html +0 -18
  252. package/typedoc/classes/SettingsAction.Open.html +0 -226
  253. package/typedoc/classes/SettingsAction.OpenPluginRegistry.html +0 -265
  254. package/typedoc/functions/Events.createStateEvent.html +0 -2
  255. package/typedoc/functions/IntentPlugin.html +0 -1
  256. package/typedoc/functions/SettingsPlugin.html +0 -1
  257. package/typedoc/functions/allOf.html +0 -2
  258. package/typedoc/functions/chain.html +0 -3
  259. package/typedoc/functions/contributes.html +0 -2
  260. package/typedoc/functions/createDispatcher.html +0 -3
  261. package/typedoc/functions/createIntent.html +0 -6
  262. package/typedoc/functions/createResolver.html +0 -2
  263. package/typedoc/functions/createSurface.html +0 -2
  264. package/typedoc/functions/defineCapability.html +0 -2
  265. package/typedoc/functions/defineEvent.html +0 -2
  266. package/typedoc/functions/defineModule.html +0 -2
  267. package/typedoc/functions/definePlugin.html +0 -2
  268. package/typedoc/functions/eventKey.html +0 -2
  269. package/typedoc/functions/getEvents.html +0 -2
  270. package/typedoc/functions/isAllOf.html +0 -2
  271. package/typedoc/functions/isOneOf.html +0 -2
  272. package/typedoc/functions/isSurfaceAvailable.html +0 -2
  273. package/typedoc/functions/lazy.html +0 -2
  274. package/typedoc/functions/oneOf.html +0 -2
  275. package/typedoc/functions/useApp.html +0 -6
  276. package/typedoc/functions/useAppGraph.html +0 -1
  277. package/typedoc/functions/useCapabilities.html +0 -3
  278. package/typedoc/functions/useCapability.html +0 -4
  279. package/typedoc/functions/useIntentDispatcher.html +0 -1
  280. package/typedoc/functions/useIntentResolver.html +0 -1
  281. package/typedoc/functions/useLayout.html +0 -1
  282. package/typedoc/functions/usePluginManager.html +0 -2
  283. package/typedoc/hierarchy.html +0 -1
  284. package/typedoc/index.html +0 -12
  285. package/typedoc/interfaces/LayoutAction.Toast.html +0 -10
  286. package/typedoc/media/LICENSE +0 -8
  287. package/typedoc/modules/Capabilities.html +0 -1
  288. package/typedoc/modules/CollaborationActions.html +0 -1
  289. package/typedoc/modules/Events.html +0 -1
  290. package/typedoc/modules/IntentAction.html +0 -1
  291. package/typedoc/modules/LayoutAction.html +0 -2
  292. package/typedoc/modules/SettingsAction.html +0 -1
  293. package/typedoc/modules.html +0 -1
  294. package/typedoc/types/ActivationEvent.html +0 -8
  295. package/typedoc/types/ActivationEvents.html +0 -2
  296. package/typedoc/types/AnyCapability.html +0 -1
  297. package/typedoc/types/AnyIntent.html +0 -1
  298. package/typedoc/types/AnyIntentChain.html +0 -1
  299. package/typedoc/types/AnyIntentEffectResult.html +0 -1
  300. package/typedoc/types/AnyIntentResolver.html +0 -1
  301. package/typedoc/types/AnyIntentResult.html +0 -1
  302. package/typedoc/types/Capabilities.FileUploader.html +0 -1
  303. package/typedoc/types/Capabilities.IntentResolver.html +0 -1
  304. package/typedoc/types/Capabilities.Layout.html +0 -1
  305. package/typedoc/types/Capabilities.Metadata.html +0 -1
  306. package/typedoc/types/Capabilities.ReactContext.html +0 -1
  307. package/typedoc/types/Capabilities.ReactRoot.html +0 -1
  308. package/typedoc/types/Capabilities.ReactSurface.html +0 -1
  309. package/typedoc/types/Capabilities.Settings.html +0 -4
  310. package/typedoc/types/Capability.html +0 -9
  311. package/typedoc/types/CreateAppOptions.html +0 -10
  312. package/typedoc/types/FileInfo.html +0 -1
  313. package/typedoc/types/Intent.html +0 -10
  314. package/typedoc/types/IntentChain.html +0 -6
  315. package/typedoc/types/IntentContext.html +0 -5
  316. package/typedoc/types/IntentData.html +0 -1
  317. package/typedoc/types/IntentDispatcher.html +0 -2
  318. package/typedoc/types/IntentDispatcherResult.html +0 -2
  319. package/typedoc/types/IntentEffectDefinition.html +0 -2
  320. package/typedoc/types/IntentEffectResult.html +0 -15
  321. package/typedoc/types/IntentParams.html +0 -3
  322. package/typedoc/types/IntentResolver.html +0 -2
  323. package/typedoc/types/IntentResultData.html +0 -1
  324. package/typedoc/types/IntentSchema.html +0 -1
  325. package/typedoc/types/IntentUndo.html +0 -2
  326. package/typedoc/types/InterfaceDef.html +0 -4
  327. package/typedoc/types/Label.html +0 -1
  328. package/typedoc/types/NodeSerializer.html +0 -8
  329. package/typedoc/types/PluginManagerOptions.html +0 -6
  330. package/typedoc/types/PluginMeta.html +0 -21
  331. package/typedoc/types/PromiseIntentDispatcher.html +0 -2
  332. package/typedoc/types/PromiseIntentUndo.html +0 -2
  333. package/typedoc/types/Resource.html +0 -1
  334. package/typedoc/types/ResourceKey.html +0 -1
  335. package/typedoc/types/ResourceLanguage.html +0 -1
  336. package/typedoc/types/SerializedNode.html +0 -4
  337. package/typedoc/types/SurfaceComponent.html +0 -2
  338. package/typedoc/types/SurfaceDefinition.html +0 -2
  339. package/typedoc/types/SurfaceProps.html +0 -4
  340. package/typedoc/variables/Capabilities.AnchorSort.html +0 -1
  341. package/typedoc/variables/Capabilities.AppGraph.html +0 -1
  342. package/typedoc/variables/Capabilities.AppGraphBuilder.html +0 -1
  343. package/typedoc/variables/Capabilities.AppGraphSerializer.html +0 -1
  344. package/typedoc/variables/Capabilities.ArtifactDefinition.html +0 -1
  345. package/typedoc/variables/Capabilities.FileUploader.html +0 -1
  346. package/typedoc/variables/Capabilities.IntentDispatcher.html +0 -1
  347. package/typedoc/variables/Capabilities.IntentResolver.html +0 -1
  348. package/typedoc/variables/Capabilities.Layout.html +0 -1
  349. package/typedoc/variables/Capabilities.Metadata.html +0 -1
  350. package/typedoc/variables/Capabilities.Null.html +0 -1
  351. package/typedoc/variables/Capabilities.PluginManager.html +0 -1
  352. package/typedoc/variables/Capabilities.ReactContext.html +0 -1
  353. package/typedoc/variables/Capabilities.ReactRoot.html +0 -1
  354. package/typedoc/variables/Capabilities.ReactSurface.html +0 -1
  355. package/typedoc/variables/Capabilities.RxRegistry.html +0 -1
  356. package/typedoc/variables/Capabilities.Settings.html +0 -1
  357. package/typedoc/variables/Capabilities.SettingsStore.html +0 -1
  358. package/typedoc/variables/Capabilities.Tools.html +0 -1
  359. package/typedoc/variables/Capabilities.Translations.html +0 -1
  360. package/typedoc/variables/Events.AppGraphReady.html +0 -2
  361. package/typedoc/variables/Events.DispatcherReady.html +0 -2
  362. package/typedoc/variables/Events.LayoutReady.html +0 -1
  363. package/typedoc/variables/Events.SettingsReady.html +0 -2
  364. package/typedoc/variables/Events.SetupAppGraph.html +0 -2
  365. package/typedoc/variables/Events.SetupArtifactDefinition.html +0 -2
  366. package/typedoc/variables/Events.SetupIntentResolver.html +0 -2
  367. package/typedoc/variables/Events.SetupMetadata.html +0 -2
  368. package/typedoc/variables/Events.SetupReactSurface.html +0 -2
  369. package/typedoc/variables/Events.SetupSettings.html +0 -2
  370. package/typedoc/variables/Events.SetupTranslations.html +0 -2
  371. package/typedoc/variables/Events.Startup.html +0 -2
  372. package/typedoc/variables/FileInfoSchema.html +0 -1
  373. package/typedoc/variables/INTENT_ACTION.html +0 -1
  374. package/typedoc/variables/INTENT_PLUGIN.html +0 -1
  375. package/typedoc/variables/LAYOUT_ACTION.html +0 -1
  376. package/typedoc/variables/LAYOUT_PLUGIN.html +0 -1
  377. package/typedoc/variables/Label.html +0 -1
  378. package/typedoc/variables/LayoutAction.Toast.html +0 -1
  379. package/typedoc/variables/LayoutAction.UPDATE_LAYOUT.html +0 -1
  380. package/typedoc/variables/PluginManagerProvider.html +0 -2
  381. package/typedoc/variables/Resource.html +0 -2
  382. package/typedoc/variables/ResourceKey.html +0 -1
  383. package/typedoc/variables/ResourceLanguage.html +0 -1
  384. package/typedoc/variables/SETTINGS_ACTION.html +0 -1
  385. package/typedoc/variables/SETTINGS_ID.html +0 -1
  386. package/typedoc/variables/SETTINGS_KEY.html +0 -1
  387. package/typedoc/variables/SETTINGS_PLUGIN.html +0 -1
  388. package/typedoc/variables/Surface.html +0 -2
  389. package/typedoc/variables/defaultFileTypes.html +0 -1
  390. /package/dist/lib/browser/{intent-dispatcher-TWKB22NI.mjs.map → intent-dispatcher-LZ4AE66E.mjs.map} +0 -0
  391. /package/dist/lib/browser/{worker.mjs.map → react/index.mjs.map} +0 -0
  392. /package/dist/lib/node-esm/{intent-dispatcher-5PRM3KGH.mjs.map → intent-dispatcher-MGOJ3CHD.mjs.map} +0 -0
  393. /package/dist/lib/node-esm/{worker.mjs.map → react/index.mjs.map} +0 -0
@@ -1,108 +1,17 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
 
3
3
  // src/plugin-intent/intent-dispatcher.ts
4
- import { Effect as Effect3, Option, pipe as pipe2, Ref as Ref2 } from "effect";
4
+ import * as Effect3 from "effect/Effect";
5
+ import * as Function2 from "effect/Function";
6
+ import * as Option from "effect/Option";
7
+ import * as Ref2 from "effect/Ref";
5
8
  import { live as live2 } from "@dxos/live-object";
6
9
  import { log as log3 } from "@dxos/log";
7
10
  import { byPosition } from "@dxos/util";
8
11
 
9
- // src/plugin-intent/actions.ts
10
- import { Schema as Schema2 } from "effect";
11
-
12
- // src/plugin-intent/intent.ts
13
- import { Schema } from "effect";
14
- var createIntent = (schema, data = {}, params = {}) => {
15
- const _ = Schema.validateSync(schema.fields.input)(data);
16
- const intent = {
17
- ...params,
18
- _schema: schema,
19
- id: schema._tag,
20
- data
21
- };
22
- return {
23
- first: intent,
24
- last: intent,
25
- all: [
26
- intent
27
- ]
28
- };
29
- };
30
- var chain = (schema, data = {}, params = {}) => (intent) => {
31
- const intents = "all" in intent ? intent.all : [
32
- intent
33
- ];
34
- const first = intents[0];
35
- const last = {
36
- ...params,
37
- _schema: schema,
38
- id: schema._tag,
39
- data
40
- };
41
- return {
42
- first,
43
- last,
44
- all: [
45
- ...intents,
46
- last
47
- ]
48
- };
49
- };
50
- var Label = Schema.Union(Schema.String, Schema.mutable(Schema.Tuple(Schema.String, Schema.mutable(Schema.Struct({
51
- ns: Schema.String,
52
- count: Schema.optional(Schema.Number),
53
- defaultValue: Schema.optional(Schema.String)
54
- })))));
55
-
56
- // src/plugin-intent/actions.ts
57
- var INTENT_PLUGIN = "dxos.org/plugin/intent";
58
- var INTENT_ACTION = `${INTENT_PLUGIN}/action`;
59
- (function(IntentAction2) {
60
- class Track extends Schema2.TaggedClass()(`${INTENT_ACTION}/track`, {
61
- input: Schema2.Struct({
62
- intents: Schema2.Array(Schema2.String),
63
- error: Schema2.optional(Schema2.String)
64
- }),
65
- output: Schema2.Void
66
- }) {
67
- }
68
- IntentAction2.Track = Track;
69
- class ShowUndo extends Schema2.TaggedClass()(`${INTENT_ACTION}/show-undo`, {
70
- input: Schema2.Struct({
71
- message: Label
72
- }),
73
- output: Schema2.Void
74
- }) {
75
- }
76
- IntentAction2.ShowUndo = ShowUndo;
77
- })(IntentAction || (IntentAction = {}));
78
- var IntentAction;
79
-
80
- // src/plugin-intent/errors.ts
81
- var BaseError = class extends Error {
82
- constructor(code, message, context) {
83
- super(message ?? code, {
84
- cause: context
85
- }), this.code = code, this.context = context;
86
- this.name = code;
87
- Object.setPrototypeOf(this, new.target.prototype);
88
- }
89
- };
90
- var NoResolversError = class extends BaseError {
91
- constructor(action) {
92
- super("NO_RESOLVERS", "No resolvers were found for the action", {
93
- action
94
- });
95
- }
96
- };
97
- var CycleDetectedError = class extends BaseError {
98
- constructor(context) {
99
- super("CYCLE_DETECTED", "Intent execution limit exceeded. This is likely due to an infinite loop within intent resolvers.", context);
100
- }
101
- };
102
-
103
12
  // src/core/capabilities.ts
104
- import { Rx } from "@effect-rx/rx-react";
105
- import { Effect } from "effect";
13
+ import { Atom } from "@effect-atom/atom-react";
14
+ import * as Effect from "effect/Effect";
106
15
  import { Trigger } from "@dxos/async";
107
16
  import { invariant } from "@dxos/invariant";
108
17
  import { log } from "@dxos/log";
@@ -114,6 +23,8 @@ var defineCapability = (identifier) => {
114
23
  };
115
24
  };
116
25
  var CapabilityImpl = class {
26
+ moduleId;
27
+ implementation;
117
28
  constructor(moduleId, implementation) {
118
29
  this.moduleId = moduleId;
119
30
  this.implementation = implementation;
@@ -131,31 +42,44 @@ var lazy = (c) => async (props) => {
131
42
  return async () => getCapability(props);
132
43
  };
133
44
  var PluginContext = class {
134
- constructor({ registry, activate, reset }) {
135
- this._capabilityImpls = Rx.family(() => {
136
- return Rx.make([]).pipe(Rx.keepAlive);
137
- });
138
- this._capabilities = Rx.family((id) => {
139
- return Rx.make((get) => {
140
- const current = get(this._capabilityImpls(id));
141
- return current.map((c) => c.implementation);
142
- });
45
+ _registry;
46
+ _capabilityImpls = Atom.family(() => {
47
+ return Atom.make([]).pipe(Atom.keepAlive);
48
+ });
49
+ _capabilities = Atom.family((id) => {
50
+ return Atom.make((get) => {
51
+ const current = get(this._capabilityImpls(id));
52
+ return current.map((c) => c.implementation);
143
53
  });
144
- this._capability = Rx.family((id) => {
145
- return Rx.make((get) => {
146
- const current = get(this._capabilities(id));
147
- invariant(current.length > 0, `No capability found for ${id}`, {
148
- F: __dxlog_file,
149
- L: 117,
150
- S: this,
151
- A: [
152
- "current.length > 0",
153
- "`No capability found for ${id}`"
154
- ]
155
- });
156
- return current[0];
54
+ });
55
+ _capability = Atom.family((id) => {
56
+ return Atom.make((get) => {
57
+ const current = get(this._capabilities(id));
58
+ invariant(current.length > 0, `No capability found for ${id}`, {
59
+ F: __dxlog_file,
60
+ L: 126,
61
+ S: this,
62
+ A: [
63
+ "current.length > 0",
64
+ "`No capability found for ${id}`"
65
+ ]
157
66
  });
67
+ return current[0];
158
68
  });
69
+ });
70
+ /**
71
+ * Activates plugins based on the activation event.
72
+ * @param event The activation event.
73
+ * @returns Whether the activation was successful.
74
+ */
75
+ activate;
76
+ /**
77
+ * Re-activates the modules that were activated by the event.
78
+ * @param event The activation event.
79
+ * @returns Whether the reset was successful.
80
+ */
81
+ reset;
82
+ constructor({ registry, activate, reset }) {
159
83
  this._registry = registry;
160
84
  this.activate = activate;
161
85
  this.reset = reset;
@@ -179,7 +103,7 @@ var PluginContext = class {
179
103
  count: current.length
180
104
  }, {
181
105
  F: __dxlog_file,
182
- L: 161,
106
+ L: 170,
183
107
  S: this,
184
108
  C: (f, a) => f(...a)
185
109
  });
@@ -200,7 +124,7 @@ var PluginContext = class {
200
124
  count: current.length
201
125
  }, {
202
126
  F: __dxlog_file,
203
- L: 180,
127
+ L: 189,
204
128
  S: this,
205
129
  C: (f, a) => f(...a)
206
130
  });
@@ -209,26 +133,26 @@ var PluginContext = class {
209
133
  id: interfaceDef.identifier
210
134
  }, {
211
135
  F: __dxlog_file,
212
- L: 182,
136
+ L: 191,
213
137
  S: this,
214
138
  C: (f, a) => f(...a)
215
139
  });
216
140
  }
217
141
  }
218
142
  /**
219
- * Get the Rx reference to the available capabilities for a given interface.
220
- * Primarily useful for deriving other Rx values based on the capabilities or
143
+ * Get the Atom reference to the available capabilities for a given interface.
144
+ * Primarily useful for deriving other Atom values based on the capabilities or
221
145
  * for subscribing to changes in the capabilities.
222
- * @returns An Rx reference to the available capabilities.
146
+ * @returns An atom reference to the available capabilities.
223
147
  */
224
148
  capabilities(interfaceDef) {
225
149
  return this._capabilities(interfaceDef.identifier);
226
150
  }
227
151
  /**
228
- * Get the Rx reference to the available capabilities for a given interface.
229
- * Primarily useful for deriving other Rx values based on the capability or
152
+ * Get the Atom reference to the available capabilities for a given interface.
153
+ * Primarily useful for deriving other Atom values based on the capability or
230
154
  * for subscribing to changes in the capability.
231
- * @returns An Rx reference to the available capability.
155
+ * @returns An atom reference to the available capability.
232
156
  * @throws If no capability is found.
233
157
  */
234
158
  capability(interfaceDef) {
@@ -299,20 +223,35 @@ var getEvents = (events) => "type" in events ? events.events : [
299
223
  ];
300
224
 
301
225
  // src/core/manager.ts
302
- import { Registry } from "@effect-rx/rx-react";
226
+ import { Registry } from "@effect-atom/atom-react";
303
227
  import { untracked } from "@preact/signals-core";
304
- import { Array as A, Effect as Effect2, Either, Match, pipe } from "effect";
228
+ import * as Array from "effect/Array";
229
+ import * as Duration from "effect/Duration";
230
+ import * as Effect2 from "effect/Effect";
231
+ import * as Fiber from "effect/Fiber";
232
+ import * as Function from "effect/Function";
233
+ import * as HashSet from "effect/HashSet";
234
+ import * as Match from "effect/Match";
235
+ import * as Ref from "effect/Ref";
305
236
  import { Event } from "@dxos/async";
306
237
  import { live } from "@dxos/live-object";
307
238
  import { log as log2 } from "@dxos/log";
308
239
  var __dxlog_file2 = "/__w/dxos/dxos/packages/sdk/app-framework/src/core/manager.ts";
309
- var isPromise = (value) => {
310
- return value !== null && typeof value === "object" && "then" in value;
240
+ var isPromise = (value2) => {
241
+ return value2 !== null && typeof value2 === "object" && "then" in value2;
311
242
  };
312
243
  var PluginManager = class {
313
- constructor({ pluginLoader, plugins = [], core = plugins.map(({ meta }) => meta.id), enabled = [], registry }) {
314
- this.activation = new Event();
315
- this._capabilities = /* @__PURE__ */ new Map();
244
+ activation = new Event();
245
+ context;
246
+ registry;
247
+ // TODO(wittjosiah): Replace with Atom.
248
+ _state;
249
+ _pluginLoader;
250
+ _capabilities = /* @__PURE__ */ new Map();
251
+ _moduleMemoMap = /* @__PURE__ */ new Map();
252
+ _activatingEvents = Effect2.runSync(Ref.make([]));
253
+ _activatingModules = Effect2.runSync(Ref.make([]));
254
+ constructor({ pluginLoader, plugins = [], core = plugins.map(({ meta: meta2 }) => meta2.id), enabled = [], registry }) {
316
255
  this.registry = registry ?? Registry.make();
317
256
  this.context = new PluginContext({
318
257
  registry: this.registry,
@@ -326,8 +265,8 @@ var PluginManager = class {
326
265
  enabled,
327
266
  modules: [],
328
267
  active: [],
329
- pendingReset: [],
330
- eventsFired: []
268
+ eventsFired: [],
269
+ pendingReset: []
331
270
  });
332
271
  plugins.forEach((plugin) => this._addPlugin(plugin));
333
272
  core.forEach((id) => this.enable(id));
@@ -399,7 +338,7 @@ var PluginManager = class {
399
338
  id
400
339
  }, {
401
340
  F: __dxlog_file2,
402
- L: 154,
341
+ L: 164,
403
342
  S: this,
404
343
  C: (f, a) => f(...a)
405
344
  });
@@ -418,7 +357,7 @@ var PluginManager = class {
418
357
  id
419
358
  }, {
420
359
  F: __dxlog_file2,
421
- L: 167,
360
+ L: 177,
422
361
  S: this,
423
362
  C: (f, a) => f(...a)
424
363
  });
@@ -439,7 +378,7 @@ var PluginManager = class {
439
378
  ]
440
379
  }, {
441
380
  F: __dxlog_file2,
442
- L: 182,
381
+ L: 192,
443
382
  S: this,
444
383
  C: (f, a) => f(...a)
445
384
  });
@@ -459,7 +398,7 @@ var PluginManager = class {
459
398
  id
460
399
  }, {
461
400
  F: __dxlog_file2,
462
- L: 200,
401
+ L: 210,
463
402
  S: this,
464
403
  C: (f, a) => f(...a)
465
404
  });
@@ -481,7 +420,7 @@ var PluginManager = class {
481
420
  id
482
421
  }, {
483
422
  F: __dxlog_file2,
484
- L: 217,
423
+ L: 227,
485
424
  S: this,
486
425
  C: (f, a) => f(...a)
487
426
  });
@@ -533,7 +472,7 @@ var PluginManager = class {
533
472
  id: plugin.meta.id
534
473
  }, {
535
474
  F: __dxlog_file2,
536
- L: 270,
475
+ L: 280,
537
476
  S: this,
538
477
  C: (f, a) => f(...a)
539
478
  });
@@ -548,7 +487,7 @@ var PluginManager = class {
548
487
  id
549
488
  }, {
550
489
  F: __dxlog_file2,
551
- L: 279,
490
+ L: 290,
552
491
  S: this,
553
492
  C: (f, a) => f(...a)
554
493
  });
@@ -564,7 +503,7 @@ var PluginManager = class {
564
503
  id: module.id
565
504
  }, {
566
505
  F: __dxlog_file2,
567
- L: 289,
506
+ L: 300,
568
507
  S: this,
569
508
  C: (f, a) => f(...a)
570
509
  });
@@ -579,7 +518,7 @@ var PluginManager = class {
579
518
  id
580
519
  }, {
581
520
  F: __dxlog_file2,
582
- L: 298,
521
+ L: 310,
583
522
  S: this,
584
523
  C: (f, a) => f(...a)
585
524
  });
@@ -607,13 +546,13 @@ var PluginManager = class {
607
546
  _setPendingResetByModule(module) {
608
547
  return untracked(() => {
609
548
  const activationEvents = getEvents(module.activatesOn).map(eventKey).filter((key) => this._state.eventsFired.includes(key));
610
- const pendingReset = Array.from(new Set(activationEvents)).filter((event) => !this._state.pendingReset.includes(event));
549
+ const pendingReset = Array.fromIterable(new Set(activationEvents)).filter((event) => !this._state.pendingReset.includes(event));
611
550
  if (pendingReset.length > 0) {
612
551
  log2("pending reset", {
613
552
  events: pendingReset
614
553
  }, {
615
554
  F: __dxlog_file2,
616
- L: 336,
555
+ L: 348,
617
556
  S: this,
618
557
  C: (f, a) => f(...a)
619
558
  });
@@ -625,35 +564,40 @@ var PluginManager = class {
625
564
  * @internal
626
565
  */
627
566
  // TODO(wittjosiah): Improve error typing.
628
- _activate(event) {
567
+ _activate(event, params) {
629
568
  return Effect2.gen(this, function* () {
630
569
  const key = typeof event === "string" ? event : eventKey(event);
631
570
  log2("activating", {
632
- key
571
+ key,
572
+ ...params
633
573
  }, {
634
574
  F: __dxlog_file2,
635
- L: 349,
575
+ L: 364,
636
576
  S: this,
637
577
  C: (f, a) => f(...a)
638
578
  });
579
+ yield* Ref.update(this._activatingEvents, (activating) => Array.append(activating, key));
639
580
  const pendingIndex = this._state.pendingReset.findIndex((event2) => event2 === key);
640
581
  if (pendingIndex !== -1) {
641
582
  this._state.pendingReset.splice(pendingIndex, 1);
642
583
  }
584
+ const activatingEvents = yield* this._activatingEvents;
585
+ const activatingModules = yield* this._activatingModules;
643
586
  const modules = this._getInactiveModulesByEvent(key).filter((module) => {
644
587
  const allOf2 = isAllOf(module.activatesOn);
645
588
  if (!allOf2) {
646
589
  return true;
647
590
  }
648
591
  const events = module.activatesOn.events.filter((event2) => eventKey(event2) !== key);
649
- return events.every((event2) => this._state.eventsFired.includes(eventKey(event2)));
592
+ return events.every((event2) => this._state.eventsFired.includes(eventKey(event2)) || activatingEvents.includes(eventKey(event2))) && !activatingModules.includes(module.id);
650
593
  });
594
+ yield* Ref.update(this._activatingModules, (activating) => Array.appendAll(activating, modules.map((module) => module.id)));
651
595
  if (modules.length === 0) {
652
596
  log2("no modules to activate", {
653
597
  key
654
598
  }, {
655
599
  F: __dxlog_file2,
656
- L: 365,
600
+ L: 395,
657
601
  S: this,
658
602
  C: (f, a) => f(...a)
659
603
  });
@@ -667,7 +611,7 @@ var PluginManager = class {
667
611
  modules: modules.map((module) => module.id)
668
612
  }, {
669
613
  F: __dxlog_file2,
670
- L: 372,
614
+ L: 402,
671
615
  S: this,
672
616
  C: (f, a) => f(...a)
673
617
  });
@@ -675,29 +619,34 @@ var PluginManager = class {
675
619
  event: key,
676
620
  state: "activating"
677
621
  });
678
- const getCapabilities = yield* Effect2.all(modules.map(({ activate }) => Effect2.tryPromise({
679
- try: async () => activate(this.context),
680
- catch: (error) => error
681
- })), {
622
+ yield* Function.pipe(modules, Array.flatMap((module) => module.activatesBefore ?? []), HashSet.fromIterable, HashSet.toValues, Array.filter((event2) => !activatingEvents.includes(eventKey(event2))), Array.map((event2) => this._activate(event2, {
623
+ before: key
624
+ })), Effect2.allWith({
682
625
  concurrency: "unbounded"
683
- });
684
- const result = yield* pipe(
685
- modules,
686
- A.zip(getCapabilities),
687
- A.map(([module, getCapabilities2]) => this._activateModule(module, getCapabilities2)),
688
- // TODO(wittjosiah): This currently can't be run in parallel.
689
- // Running this with concurrency causes races with `allOf` activation events.
690
- Effect2.all,
691
- Effect2.either
692
- );
693
- if (Either.isLeft(result)) {
626
+ }));
627
+ const getCapabilities = yield* Function.pipe(modules, Array.map((mod) => this._loadModule(mod)), Effect2.allWith({
628
+ concurrency: "unbounded"
629
+ }), Effect2.catchAll((error) => {
694
630
  this.activation.emit({
695
631
  event: key,
696
632
  state: "error",
697
- error: result.left
633
+ error
698
634
  });
699
- yield* Effect2.fail(result.left);
700
- }
635
+ return Effect2.fail(error);
636
+ }));
637
+ yield* Function.pipe(
638
+ modules,
639
+ Array.zip(getCapabilities),
640
+ Array.map(([module, capabilities]) => this._contributeCapabilities(module, capabilities)),
641
+ Effect2.all
642
+ );
643
+ yield* Function.pipe(modules, Array.flatMap((module) => module.activatesAfter ?? []), HashSet.fromIterable, HashSet.toValues, Array.filter((event2) => !activatingEvents.includes(eventKey(event2))), Array.map((event2) => this._activate(event2, {
644
+ after: key
645
+ })), Effect2.allWith({
646
+ concurrency: "unbounded"
647
+ }));
648
+ yield* Ref.update(this._activatingEvents, (activating) => Array.filter(activating, (event2) => event2 !== key));
649
+ yield* Ref.update(this._activatingModules, (activating) => Array.filter(activating, (module) => !modules.map((module2) => module2.id).includes(module)));
701
650
  if (!this._state.eventsFired.includes(key)) {
702
651
  this._state.eventsFired.push(key);
703
652
  }
@@ -709,39 +658,76 @@ var PluginManager = class {
709
658
  key
710
659
  }, {
711
660
  F: __dxlog_file2,
712
- L: 406,
661
+ L: 458,
713
662
  S: this,
714
663
  C: (f, a) => f(...a)
715
664
  });
716
665
  return true;
717
666
  });
718
667
  }
719
- _activateModule(module, getCapabilities) {
668
+ // Memoized with _moduleMemoMap
669
+ _loadModule = (mod) => Effect2.tryPromise({
670
+ try: async () => {
671
+ const entry = this._moduleMemoMap.get(mod.id);
672
+ if (entry) {
673
+ return entry;
674
+ }
675
+ const promise2 = (async () => {
676
+ const start = performance.now();
677
+ let failed = false;
678
+ try {
679
+ log2("loading module", {
680
+ module: mod.id
681
+ }, {
682
+ F: __dxlog_file2,
683
+ L: 477,
684
+ S: this,
685
+ C: (f, a) => f(...a)
686
+ });
687
+ let activationResult = await mod.activate(this.context);
688
+ if (typeof activationResult === "function") {
689
+ activationResult = await activationResult();
690
+ }
691
+ return Array.isArray(activationResult) ? activationResult : [
692
+ activationResult
693
+ ];
694
+ } catch (error) {
695
+ failed = true;
696
+ throw error;
697
+ } finally {
698
+ performance.measure("activate-module", {
699
+ start,
700
+ end: performance.now(),
701
+ detail: {
702
+ module: mod.id
703
+ }
704
+ });
705
+ log2("loaded module", {
706
+ module: mod.id,
707
+ elapsed: performance.now() - start,
708
+ failed
709
+ }, {
710
+ F: __dxlog_file2,
711
+ L: 495,
712
+ S: this,
713
+ C: (f, a) => f(...a)
714
+ });
715
+ }
716
+ })();
717
+ this._moduleMemoMap.set(mod.id, promise2);
718
+ return promise2;
719
+ },
720
+ catch: (error) => error
721
+ }).pipe(Effect2.withSpan("PluginManager._loadModule"), together(Effect2.sleep(Duration.seconds(10)).pipe(Effect2.andThen(Effect2.sync(() => log2.warn(`module is taking a long time to activate`, {
722
+ module: mod.id
723
+ }, {
724
+ F: __dxlog_file2,
725
+ L: 506,
726
+ S: this,
727
+ C: (f, a) => f(...a)
728
+ }))))));
729
+ _contributeCapabilities(module, capabilities) {
720
730
  return Effect2.gen(this, function* () {
721
- yield* Effect2.all(module.activatesBefore?.map((event) => this._activate(event)) ?? [], {
722
- concurrency: "unbounded"
723
- });
724
- log2("activating module...", {
725
- module: module.id
726
- }, {
727
- F: __dxlog_file2,
728
- L: 421,
729
- S: this,
730
- C: (f, a) => f(...a)
731
- });
732
- const maybeCapabilities = typeof getCapabilities === "function" ? getCapabilities() : getCapabilities;
733
- const resolvedCapabilities = yield* Match.value(maybeCapabilities).pipe(
734
- // TODO(wittjosiah): Activate with an effect?
735
- // Match.when(Effect.isEffect, (effect) => effect),
736
- Match.when(isPromise, (promise) => Effect2.tryPromise({
737
- try: () => promise,
738
- catch: (error) => error
739
- })),
740
- Match.orElse((program) => Effect2.succeed(program))
741
- );
742
- const capabilities = Match.value(resolvedCapabilities).pipe(Match.when(Array.isArray, (array) => array), Match.orElse((value) => [
743
- value
744
- ]));
745
731
  capabilities.forEach((capability) => {
746
732
  this.context.contributeCapability({
747
733
  module: module.id,
@@ -750,17 +736,6 @@ var PluginManager = class {
750
736
  });
751
737
  this._state.active.push(module.id);
752
738
  this._capabilities.set(module.id, capabilities);
753
- log2("activated module", {
754
- module: module.id
755
- }, {
756
- F: __dxlog_file2,
757
- L: 444,
758
- S: this,
759
- C: (f, a) => f(...a)
760
- });
761
- yield* Effect2.all(module.activatesAfter?.map((event) => this._activate(event)) ?? [], {
762
- concurrency: "unbounded"
763
- });
764
739
  });
765
740
  }
766
741
  _deactivate(id) {
@@ -783,17 +758,18 @@ var PluginManager = class {
783
758
  id
784
759
  }, {
785
760
  F: __dxlog_file2,
786
- L: 471,
761
+ L: 540,
787
762
  S: this,
788
763
  C: (f, a) => f(...a)
789
764
  });
765
+ this._moduleMemoMap.delete(id);
790
766
  const capabilities = this._capabilities.get(id);
791
767
  if (capabilities) {
792
768
  for (const capability of capabilities) {
793
769
  this.context.removeCapability(capability.interface, capability.implementation);
794
770
  const program = capability.deactivate?.();
795
- yield* Match.value(program).pipe(Match.when(Effect2.isEffect, (effect) => effect), Match.when(isPromise, (promise) => Effect2.tryPromise({
796
- try: () => promise,
771
+ yield* Match.value(program).pipe(Match.when(Effect2.isEffect, (effect) => effect), Match.when(isPromise, (promise2) => Effect2.tryPromise({
772
+ try: () => promise2,
797
773
  catch: (error) => error
798
774
  })), Match.orElse((program2) => Effect2.succeed(program2)));
799
775
  }
@@ -807,7 +783,7 @@ var PluginManager = class {
807
783
  id
808
784
  }, {
809
785
  F: __dxlog_file2,
810
- L: 497,
786
+ L: 567,
811
787
  S: this,
812
788
  C: (f, a) => f(...a)
813
789
  });
@@ -821,7 +797,7 @@ var PluginManager = class {
821
797
  key
822
798
  }, {
823
799
  F: __dxlog_file2,
824
- L: 505,
800
+ L: 575,
825
801
  S: this,
826
802
  C: (f, a) => f(...a)
827
803
  });
@@ -837,9 +813,20 @@ var PluginManager = class {
837
813
  });
838
814
  }
839
815
  };
816
+ var together = (togetherEffect) => (effect) => Effect2.gen(function* () {
817
+ const togetherFiber = yield* Effect2.fork(togetherEffect);
818
+ const result = yield* effect;
819
+ yield* Fiber.interrupt(togetherFiber);
820
+ return result;
821
+ });
840
822
 
841
823
  // src/core/plugin.ts
842
824
  var PluginModule = class {
825
+ id;
826
+ activatesOn;
827
+ activatesBefore;
828
+ activatesAfter;
829
+ activate;
843
830
  constructor(options) {
844
831
  this.id = options.id;
845
832
  this.activatesOn = options.activatesOn;
@@ -850,20 +837,27 @@ var PluginModule = class {
850
837
  };
851
838
  var defineModule = (options) => new PluginModule(options);
852
839
  var Plugin = class {
853
- constructor(meta, modules) {
854
- this.meta = meta;
840
+ meta;
841
+ modules;
842
+ constructor(meta2, modules) {
843
+ this.meta = meta2;
855
844
  this.modules = modules;
856
845
  }
857
846
  };
858
- var definePlugin = (meta, modules) => {
859
- return new Plugin(meta, modules);
847
+ var definePlugin = (meta2, provider) => {
848
+ const factory = (args) => {
849
+ return new Plugin(meta2, provider(args));
850
+ };
851
+ return Object.assign(factory, {
852
+ meta: meta2
853
+ });
860
854
  };
861
855
 
862
856
  // src/common/capabilities.ts
863
857
  (function(Capabilities2) {
864
- Capabilities2.PluginManager = defineCapability("dxos.org/app-framework/capability/plugin-manager");
865
858
  Capabilities2.Null = defineCapability("dxos.org/app-framework/capability/null");
866
- Capabilities2.RxRegistry = defineCapability("dxos.org/app-framework/capability/rx-registry");
859
+ Capabilities2.PluginManager = defineCapability("dxos.org/app-framework/capability/plugin-manager");
860
+ Capabilities2.AtomRegistry = defineCapability("dxos.org/app-framework/capability/atom-registry");
867
861
  Capabilities2.ReactContext = defineCapability("dxos.org/app-framework/capability/react-context");
868
862
  Capabilities2.ReactRoot = defineCapability("dxos.org/app-framework/capability/react-root");
869
863
  Capabilities2.ReactSurface = defineCapability("dxos.org/app-framework/common/react-surface");
@@ -877,30 +871,30 @@ var definePlugin = (meta, modules) => {
877
871
  Capabilities2.SettingsStore = defineCapability("dxos.org/app-framework/capability/settings-store");
878
872
  Capabilities2.Settings = defineCapability("dxos.org/app-framework/capability/settings");
879
873
  Capabilities2.Metadata = defineCapability("dxos.org/app-framework/capability/metadata");
880
- Capabilities2.Tools = defineCapability("dxos.org/app-framework/capability/tools");
881
- Capabilities2.ArtifactDefinition = defineCapability("dxos.org/app-framework/capability/artifact-definition");
874
+ Capabilities2.Toolkit = defineCapability("dxos.org/app-framework/capability/ai-toolkit");
875
+ Capabilities2.BlueprintDefinition = defineCapability("dxos.org/app-framework/capability/blueprint-definition");
876
+ Capabilities2.AiServiceLayer = defineCapability("dxos.org/app-framework/capability/ai-service-factory");
877
+ Capabilities2.AiModelResolver = defineCapability("dxos.org/app-framework/capability/ai-model-resolver");
878
+ Capabilities2.Functions = defineCapability("dxos.org/app-framework/capability/functions");
882
879
  Capabilities2.FileUploader = defineCapability("dxos.org/app-framework/capability/file-uploader");
883
880
  Capabilities2.AnchorSort = defineCapability("dxos.org/app-framework/capability/anchor-sort");
884
881
  })(Capabilities || (Capabilities = {}));
885
882
  var Capabilities;
886
883
 
887
884
  // src/common/collaboration.ts
888
- import { Schema as Schema3 } from "effect";
889
- import { Expando, Ref } from "@dxos/echo-schema";
885
+ import * as Schema from "effect/Schema";
886
+ import { ContentBlock } from "@dxos/types";
890
887
  (function(CollaborationActions2) {
891
- class InsertContent extends Schema3.TaggedClass()("assistant/intent-content", {
892
- input: Schema3.Struct({
893
- target: Expando,
894
- object: Ref(Expando),
895
- at: Schema3.optional(Schema3.String),
896
- label: Schema3.String.pipe(Schema3.optional)
897
- }).annotations({
898
- description: "Enables plugins to inject content blocks or references into a related entity."
888
+ class AcceptProposal extends Schema.TaggedClass()("collaboration/accept-proposal", {
889
+ input: Schema.Struct({
890
+ subject: Schema.Any,
891
+ anchor: Schema.String,
892
+ proposal: ContentBlock.Proposal
899
893
  }),
900
- output: Schema3.Void
894
+ output: Schema.Void
901
895
  }) {
902
896
  }
903
- CollaborationActions2.InsertContent = InsertContent;
897
+ CollaborationActions2.AcceptProposal = AcceptProposal;
904
898
  })(CollaborationActions || (CollaborationActions = {}));
905
899
  var CollaborationActions;
906
900
 
@@ -923,7 +917,7 @@ var CollaborationActions;
923
917
  var Events;
924
918
 
925
919
  // src/common/file.ts
926
- import { Schema as Schema4 } from "effect";
920
+ import * as Schema2 from "effect/Schema";
927
921
  var defaultFileTypes = {
928
922
  images: [
929
923
  "png",
@@ -943,23 +937,120 @@ var defaultFileTypes = {
943
937
  "md"
944
938
  ]
945
939
  };
946
- var FileInfoSchema = Schema4.Struct({
947
- name: Schema4.String,
948
- type: Schema4.String,
949
- url: Schema4.optional(Schema4.String),
950
- cid: Schema4.optional(Schema4.String)
940
+ var FileInfoSchema = Schema2.Struct({
941
+ name: Schema2.String,
942
+ type: Schema2.String,
943
+ url: Schema2.optional(Schema2.String),
944
+ cid: Schema2.optional(Schema2.String)
951
945
  });
952
946
 
953
947
  // src/common/layout.ts
954
- import { Schema as Schema5 } from "effect";
948
+ import * as Schema5 from "effect/Schema";
955
949
 
956
- // src/plugin-intent/IntentPlugin.ts
957
- var IntentPlugin = () => definePlugin({
958
- id: INTENT_PLUGIN,
950
+ // src/plugin-intent/actions.ts
951
+ import * as Schema4 from "effect/Schema";
952
+
953
+ // src/plugin-intent/intent.ts
954
+ import * as Schema3 from "effect/Schema";
955
+ var createIntent = (schema, data = {}, params = {}) => {
956
+ const _ = Schema3.validateSync(schema.fields.input)(data);
957
+ const intent = {
958
+ ...params,
959
+ _schema: schema,
960
+ id: schema._tag,
961
+ data
962
+ };
963
+ return {
964
+ first: intent,
965
+ last: intent,
966
+ all: [
967
+ intent
968
+ ]
969
+ };
970
+ };
971
+ var chain = (schema, data = {}, params = {}) => (intent) => {
972
+ const intents = "all" in intent ? intent.all : [
973
+ intent
974
+ ];
975
+ const first = intents[0];
976
+ const last = {
977
+ ...params,
978
+ _schema: schema,
979
+ id: schema._tag,
980
+ data
981
+ };
982
+ return {
983
+ first,
984
+ last,
985
+ all: [
986
+ ...intents,
987
+ last
988
+ ]
989
+ };
990
+ };
991
+ var Label = Schema3.Union(Schema3.String, Schema3.mutable(Schema3.Tuple(Schema3.String, Schema3.mutable(Schema3.Struct({
992
+ ns: Schema3.String,
993
+ count: Schema3.optional(Schema3.Number),
994
+ defaultValue: Schema3.optional(Schema3.String)
995
+ })))));
996
+
997
+ // src/plugin-intent/meta.ts
998
+ var meta = {
999
+ id: "dxos.org/plugin/intent",
959
1000
  name: "Intent"
960
- }, [
1001
+ };
1002
+
1003
+ // src/plugin-intent/actions.ts
1004
+ (function(IntentAction2) {
1005
+ class Track extends Schema4.TaggedClass()(`${meta.id}/action/track`, {
1006
+ input: Schema4.Struct({
1007
+ intents: Schema4.Array(Schema4.String),
1008
+ error: Schema4.optional(Schema4.String)
1009
+ }),
1010
+ output: Schema4.Void
1011
+ }) {
1012
+ }
1013
+ IntentAction2.Track = Track;
1014
+ class ShowUndo extends Schema4.TaggedClass()(`${meta.id}/action/show-undo`, {
1015
+ input: Schema4.Struct({
1016
+ message: Label
1017
+ }),
1018
+ output: Schema4.Void
1019
+ }) {
1020
+ }
1021
+ IntentAction2.ShowUndo = ShowUndo;
1022
+ })(IntentAction || (IntentAction = {}));
1023
+ var IntentAction;
1024
+
1025
+ // src/plugin-intent/errors.ts
1026
+ var BaseError = class extends Error {
1027
+ code;
1028
+ context;
1029
+ constructor(code, message, context) {
1030
+ super(message ?? code, {
1031
+ cause: context
1032
+ }), this.code = code, this.context = context;
1033
+ this.name = code;
1034
+ Object.setPrototypeOf(this, new.target.prototype);
1035
+ }
1036
+ };
1037
+ var NoResolversError = class extends BaseError {
1038
+ constructor(action) {
1039
+ super("NO_RESOLVERS", `No resolvers were found for the action: ${action}`, {
1040
+ action
1041
+ });
1042
+ }
1043
+ };
1044
+ var CycleDetectedError = class extends BaseError {
1045
+ constructor(context) {
1046
+ super("CYCLE_DETECTED", "Intent execution limit exceeded. This is likely due to an infinite loop within intent resolvers.", context);
1047
+ }
1048
+ };
1049
+
1050
+ // src/plugin-intent/IntentPlugin.ts
1051
+ var IntentPlugin = definePlugin(meta, () => [
961
1052
  defineModule({
962
- id: `${INTENT_PLUGIN}/module/dispatcher`,
1053
+ id: `${meta.id}/module/dispatcher`,
963
1054
  // TODO(wittjosiah): This will mean that startup needs to be reset when intents are added or removed.
964
1055
  // This is fine for now because it's how it worked prior to capabilities api anyways.
965
1056
  // In the future, the intent dispatcher should be able to be reset without resetting the entire app.
@@ -967,15 +1058,14 @@ var IntentPlugin = () => definePlugin({
967
1058
  activatesAfter: [
968
1059
  Events.DispatcherReady
969
1060
  ],
970
- activate: lazy(() => import("./intent-dispatcher-5PRM3KGH.mjs"))
1061
+ activate: lazy(() => import("./intent-dispatcher-MGOJ3CHD.mjs"))
971
1062
  })
972
1063
  ]);
973
1064
 
974
1065
  // src/common/layout.ts
975
1066
  var LAYOUT_PLUGIN = "dxos.org/plugin/layout";
976
- var LAYOUT_ACTION = `${LAYOUT_PLUGIN}/action`;
977
1067
  (function(LayoutAction2) {
978
- LayoutAction2.UPDATE_LAYOUT = `${LAYOUT_ACTION}/update-layout`;
1068
+ LayoutAction2.UPDATE_LAYOUT = `${LAYOUT_PLUGIN}/action/update-layout`;
979
1069
  class UpdateLayout extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
980
1070
  input: Schema5.Struct({
981
1071
  part: Schema5.String.annotations({
@@ -1312,7 +1402,7 @@ var LayoutAction;
1312
1402
  var createSurface = (definition) => definition;
1313
1403
 
1314
1404
  // src/common/translations.ts
1315
- import { Schema as Schema6 } from "effect";
1405
+ import * as Schema6 from "effect/Schema";
1316
1406
  var ResourceKey = Schema6.Union(Schema6.String, Schema6.Record({
1317
1407
  key: Schema6.String,
1318
1408
  value: Schema6.Any
@@ -1337,7 +1427,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1337
1427
  const handleIntent = (intent) => Effect3.gen(function* () {
1338
1428
  const candidates = getResolvers().filter((resolver) => resolver.intent._tag === intent.id).filter((resolver) => !resolver.filter || resolver.filter(intent.data)).toSorted(byPosition);
1339
1429
  if (candidates.length === 0) {
1340
- yield* Effect3.fail(new NoResolversError(intent.id));
1430
+ return yield* Effect3.fail(new NoResolversError(intent.id));
1341
1431
  }
1342
1432
  const effect = candidates[0].resolve(intent.data, intent.undo ?? false);
1343
1433
  const result = Effect3.isEffect(effect) ? yield* effect : yield* Effect3.promise(async () => effect);
@@ -1347,12 +1437,29 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1347
1437
  };
1348
1438
  });
1349
1439
  const dispatch = (intentChain, depth = 0) => {
1440
+ log3("dispatch", {
1441
+ intentChain: intentChain.all.map((i) => i.id),
1442
+ depth
1443
+ }, {
1444
+ F: __dxlog_file3,
1445
+ L: 212,
1446
+ S: void 0,
1447
+ C: (f, a) => f(...a)
1448
+ });
1350
1449
  return Effect3.gen(function* () {
1351
1450
  if (depth > executionLimit) {
1352
- yield* Effect3.fail(new CycleDetectedError());
1451
+ return yield* Effect3.fail(new CycleDetectedError());
1353
1452
  }
1354
1453
  const resultsRef = yield* Ref2.make([]);
1355
1454
  for (const intent of intentChain.all) {
1455
+ log3("processing", {
1456
+ intent
1457
+ }, {
1458
+ F: __dxlog_file3,
1459
+ L: 220,
1460
+ S: this,
1461
+ C: (f, a) => f(...a)
1462
+ });
1356
1463
  const { data: prev } = (yield* resultsRef.get)[0] ?? {};
1357
1464
  const result2 = yield* handleIntent({
1358
1465
  ...intent,
@@ -1361,6 +1468,15 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1361
1468
  ...prev
1362
1469
  }
1363
1470
  });
1471
+ log3("ok", {
1472
+ intent: intent.id,
1473
+ result: result2
1474
+ }, {
1475
+ F: __dxlog_file3,
1476
+ L: 223,
1477
+ S: this,
1478
+ C: (f, a) => f(...a)
1479
+ });
1364
1480
  yield* Ref2.update(resultsRef, (results2) => [
1365
1481
  result2,
1366
1482
  ...results2
@@ -1371,7 +1487,16 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1371
1487
  }
1372
1488
  }
1373
1489
  if (result2.error) {
1374
- yield* Effect3.fail(result2.error);
1490
+ log3.error("failed", {
1491
+ intent: intent.id,
1492
+ error: result2.error
1493
+ }, {
1494
+ F: __dxlog_file3,
1495
+ L: 240,
1496
+ S: this,
1497
+ C: (f, a) => f(...a)
1498
+ });
1499
+ return yield* Effect3.fail(result2.error);
1375
1500
  }
1376
1501
  }
1377
1502
  const results = yield* resultsRef.get;
@@ -1387,10 +1512,19 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1387
1512
  return next;
1388
1513
  });
1389
1514
  if (result.undoable && isUndoable(results)) {
1390
- yield* pipe2(dispatch(createIntent(IntentAction.ShowUndo, {
1515
+ yield* Function2.pipe(dispatch(createIntent(IntentAction.ShowUndo, {
1391
1516
  message: result.undoable.message
1392
1517
  })), Effect3.catchSome((err) => err instanceof NoResolversError ? Option.some(Effect3.succeed(void 0)) : Option.none()));
1393
1518
  }
1519
+ log3("done", {
1520
+ intent: intentChain.all.map((i) => i.id),
1521
+ result: result.data
1522
+ }, {
1523
+ F: __dxlog_file3,
1524
+ L: 270,
1525
+ S: this,
1526
+ C: (f, a) => f(...a)
1527
+ });
1394
1528
  return result.data;
1395
1529
  });
1396
1530
  };
@@ -1400,7 +1534,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1400
1534
  })).catch((error) => {
1401
1535
  log3.catch(error, void 0, {
1402
1536
  F: __dxlog_file3,
1403
- L: 270,
1537
+ L: 279,
1404
1538
  S: void 0,
1405
1539
  C: (f, a) => f(...a)
1406
1540
  });
@@ -1415,7 +1549,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1415
1549
  const last = history.findLastIndex(isUndoable);
1416
1550
  const result = last !== -1 ? history[last] : void 0;
1417
1551
  if (result) {
1418
- const all = result.map(({ _intent, undoable }) => {
1552
+ const all2 = result.map(({ _intent, undoable }) => {
1419
1553
  const data = _intent.data;
1420
1554
  const undoData = undoable?.data ?? {};
1421
1555
  return {
@@ -1428,9 +1562,9 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1428
1562
  };
1429
1563
  });
1430
1564
  const intent = {
1431
- first: all[0],
1432
- last: all.at(-1),
1433
- all
1565
+ first: all2[0],
1566
+ last: all2.at(-1),
1567
+ all: all2
1434
1568
  };
1435
1569
  yield* Ref2.update(historyRef, (h) => h.filter((_, index) => index !== last));
1436
1570
  return yield* dispatch(intent);
@@ -1453,7 +1587,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1453
1587
  };
1454
1588
  var defaultEffect = () => Effect3.fail(new Error("Intent runtime not ready"));
1455
1589
  var defaultPromise = () => Effect3.runPromise(defaultEffect());
1456
- var intent_dispatcher_default = (context) => {
1590
+ var intent_dispatcher_default = ((context) => {
1457
1591
  const state = live2({
1458
1592
  dispatch: defaultEffect,
1459
1593
  dispatchPromise: defaultPromise,
@@ -1475,7 +1609,7 @@ var intent_dispatcher_default = (context) => {
1475
1609
  state.undo = undo;
1476
1610
  state.undoPromise = undoPromise;
1477
1611
  return contributes(Capabilities.IntentDispatcher, state);
1478
- };
1612
+ });
1479
1613
 
1480
1614
  export {
1481
1615
  defineCapability,
@@ -1502,19 +1636,18 @@ export {
1502
1636
  createIntent,
1503
1637
  chain,
1504
1638
  Label,
1505
- INTENT_PLUGIN,
1506
- INTENT_ACTION,
1507
1639
  IntentAction,
1640
+ BaseError,
1641
+ NoResolversError,
1642
+ CycleDetectedError,
1508
1643
  createResolver,
1509
1644
  createDispatcher,
1510
1645
  intent_dispatcher_default,
1511
1646
  IntentPlugin,
1512
- LAYOUT_PLUGIN,
1513
- LAYOUT_ACTION,
1514
1647
  LayoutAction,
1515
1648
  createSurface,
1516
1649
  ResourceKey,
1517
1650
  ResourceLanguage,
1518
1651
  Resource
1519
1652
  };
1520
- //# sourceMappingURL=chunk-VSKRV3NW.mjs.map
1653
+ //# sourceMappingURL=chunk-XJZGUJ3H.mjs.map