@dxos/app-framework 0.8.2-staging.7ac8446 → 0.8.2

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 (331) hide show
  1. package/dist/lib/browser/{app-graph-builder-576BHZC7.mjs → app-graph-builder-DYEAGZPS.mjs} +23 -23
  2. package/dist/lib/browser/app-graph-builder-DYEAGZPS.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-6AVTZPMT.mjs → chunk-5GE2ERNU.mjs} +340 -275
  4. package/dist/lib/browser/chunk-5GE2ERNU.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-SFPT4Z2C.mjs → chunk-WWEJRWFX.mjs} +10 -10
  6. package/dist/lib/browser/chunk-WWEJRWFX.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-PPIBZ5N4.mjs → chunk-ZMXJV64L.mjs} +123 -63
  8. package/dist/lib/browser/chunk-ZMXJV64L.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +12 -10
  10. package/dist/lib/browser/index.mjs.map +1 -1
  11. package/dist/lib/browser/{intent-dispatcher-3Q67MHZZ.mjs → intent-dispatcher-ELZN5EM7.mjs} +2 -2
  12. package/dist/lib/browser/{intent-resolver-O763LCLG.mjs → intent-resolver-SGWLINTO.mjs} +3 -3
  13. package/dist/lib/browser/meta.json +1 -1
  14. package/dist/lib/browser/{store-URSN7DZI.mjs → store-YIU6IPZ2.mjs} +7 -6
  15. package/dist/lib/browser/store-YIU6IPZ2.mjs.map +7 -0
  16. package/dist/lib/browser/testing/index.mjs +30 -14
  17. package/dist/lib/browser/testing/index.mjs.map +3 -3
  18. package/dist/lib/browser/worker.mjs +5 -3
  19. package/dist/lib/node/app-graph-builder-GBLISL7L.cjs +146 -0
  20. package/dist/lib/node/app-graph-builder-GBLISL7L.cjs.map +7 -0
  21. package/dist/lib/node/{chunk-JUSEAFDU.cjs → chunk-G774ASXO.cjs} +5 -5
  22. package/dist/lib/node/chunk-G774ASXO.cjs.map +7 -0
  23. package/dist/lib/node/{chunk-YIFTVCOR.cjs → chunk-HIVITTZD.cjs} +319 -255
  24. package/dist/lib/node/chunk-HIVITTZD.cjs.map +7 -0
  25. package/dist/lib/node/{chunk-YNTKVTVX.cjs → chunk-Z2PMVDJ5.cjs} +155 -95
  26. package/dist/lib/node/chunk-Z2PMVDJ5.cjs.map +7 -0
  27. package/dist/lib/node/index.cjs +82 -80
  28. package/dist/lib/node/index.cjs.map +1 -1
  29. package/dist/lib/node/{intent-dispatcher-H334XLFD.cjs → intent-dispatcher-LFXZJTAS.cjs} +8 -8
  30. package/dist/lib/node/{intent-dispatcher-H334XLFD.cjs.map → intent-dispatcher-LFXZJTAS.cjs.map} +2 -2
  31. package/dist/lib/node/{intent-resolver-3F4POWAM.cjs → intent-resolver-EPSFTHL6.cjs} +12 -12
  32. package/dist/lib/node/meta.json +1 -1
  33. package/dist/lib/node/{store-OFDHTDCB.cjs → store-CVVRXUTH.cjs} +10 -9
  34. package/dist/lib/node/store-CVVRXUTH.cjs.map +7 -0
  35. package/dist/lib/node/testing/index.cjs +34 -17
  36. package/dist/lib/node/testing/index.cjs.map +3 -3
  37. package/dist/lib/node/worker.cjs +40 -38
  38. package/dist/lib/node/worker.cjs.map +2 -2
  39. package/dist/lib/node-esm/{app-graph-builder-VYKLSMSZ.mjs → app-graph-builder-LUBDEIT6.mjs} +23 -23
  40. package/dist/lib/node-esm/app-graph-builder-LUBDEIT6.mjs.map +7 -0
  41. package/dist/lib/node-esm/{chunk-R6A7Z4LU.mjs → chunk-6IKYKERU.mjs} +123 -63
  42. package/dist/lib/node-esm/chunk-6IKYKERU.mjs.map +7 -0
  43. package/dist/lib/node-esm/{chunk-PHOUQACM.mjs → chunk-I6BVZMAH.mjs} +10 -10
  44. package/dist/lib/node-esm/chunk-I6BVZMAH.mjs.map +7 -0
  45. package/dist/lib/node-esm/{chunk-AHKIPS2L.mjs → chunk-Z2ZHH4HN.mjs} +340 -275
  46. package/dist/lib/node-esm/chunk-Z2ZHH4HN.mjs.map +7 -0
  47. package/dist/lib/node-esm/index.mjs +12 -10
  48. package/dist/lib/node-esm/index.mjs.map +1 -1
  49. package/dist/lib/node-esm/{intent-dispatcher-YDE2ONZA.mjs → intent-dispatcher-A2JCMWRD.mjs} +2 -2
  50. package/dist/lib/node-esm/{intent-resolver-LAGJ7LXM.mjs → intent-resolver-5C4O43GK.mjs} +3 -3
  51. package/dist/lib/node-esm/meta.json +1 -1
  52. package/dist/lib/node-esm/{store-EYSUVNCS.mjs → store-HRZXZ2D2.mjs} +7 -6
  53. package/dist/lib/node-esm/store-HRZXZ2D2.mjs.map +7 -0
  54. package/dist/lib/node-esm/testing/index.mjs +30 -14
  55. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  56. package/dist/lib/node-esm/worker.mjs +5 -3
  57. package/dist/types/src/App.d.ts +3 -1
  58. package/dist/types/src/App.d.ts.map +1 -1
  59. package/dist/types/src/common/capabilities.d.ts +40 -222
  60. package/dist/types/src/common/capabilities.d.ts.map +1 -1
  61. package/dist/types/src/common/collaboration.d.ts +19 -0
  62. package/dist/types/src/common/collaboration.d.ts.map +1 -0
  63. package/dist/types/src/common/events.d.ts.map +1 -1
  64. package/dist/types/src/common/file.d.ts +7 -7
  65. package/dist/types/src/common/file.d.ts.map +1 -1
  66. package/dist/types/src/common/index.d.ts +1 -0
  67. package/dist/types/src/common/index.d.ts.map +1 -1
  68. package/dist/types/src/common/layout.d.ts +166 -158
  69. package/dist/types/src/common/layout.d.ts.map +1 -1
  70. package/dist/types/src/common/surface.d.ts.map +1 -1
  71. package/dist/types/src/common/translations.d.ts +7 -7
  72. package/dist/types/src/common/translations.d.ts.map +1 -1
  73. package/dist/types/src/core/capabilities.d.ts +33 -15
  74. package/dist/types/src/core/capabilities.d.ts.map +1 -1
  75. package/dist/types/src/core/events.d.ts +4 -1
  76. package/dist/types/src/core/events.d.ts.map +1 -1
  77. package/dist/types/src/core/manager.d.ts +14 -11
  78. package/dist/types/src/core/manager.d.ts.map +1 -1
  79. package/dist/types/src/core/plugin.d.ts +4 -3
  80. package/dist/types/src/core/plugin.d.ts.map +1 -1
  81. package/dist/types/src/helpers.d.ts.map +1 -1
  82. package/dist/types/src/playground/generator/generator.d.ts.map +1 -1
  83. package/dist/types/src/playground/logger/schema.d.ts +6 -6
  84. package/dist/types/src/playground/logger/schema.d.ts.map +1 -1
  85. package/dist/types/src/playground/playground.stories.d.ts.map +1 -1
  86. package/dist/types/src/plugin-intent/actions.d.ts +14 -14
  87. package/dist/types/src/plugin-intent/actions.d.ts.map +1 -1
  88. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +29 -3
  89. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -1
  90. package/dist/types/src/plugin-intent/intent.d.ts +14 -20
  91. package/dist/types/src/plugin-intent/intent.d.ts.map +1 -1
  92. package/dist/types/src/plugin-settings/actions.d.ts +10 -10
  93. package/dist/types/src/plugin-settings/actions.d.ts.map +1 -1
  94. package/dist/types/src/plugin-settings/app-graph-builder.d.ts +2 -195
  95. package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +1 -1
  96. package/dist/types/src/plugin-settings/store.d.ts +2 -2
  97. package/dist/types/src/plugin-settings/store.d.ts.map +1 -1
  98. package/dist/types/src/react/ErrorBoundary.d.ts +1 -1
  99. package/dist/types/src/react/ErrorBoundary.d.ts.map +1 -1
  100. package/dist/types/src/react/IntentContext.d.ts.map +1 -1
  101. package/dist/types/src/react/Surface.d.ts +2 -2
  102. package/dist/types/src/react/Surface.d.ts.map +1 -1
  103. package/dist/types/src/react/useCapabilities.d.ts +2 -2
  104. package/dist/types/src/react/useCapabilities.d.ts.map +1 -1
  105. package/dist/types/src/react/useIntentResolver.d.ts.map +1 -1
  106. package/dist/types/src/testing/withPluginManager.d.ts +6 -2
  107. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
  108. package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
  109. package/dist/types/tsconfig.tsbuildinfo +1 -1
  110. package/package.json +32 -21
  111. package/project.json +2 -1
  112. package/src/App.tsx +98 -48
  113. package/src/common/capabilities.ts +18 -7
  114. package/src/common/collaboration.ts +21 -0
  115. package/src/common/file.ts +7 -7
  116. package/src/common/index.ts +1 -0
  117. package/src/common/layout.ts +167 -128
  118. package/src/common/translations.ts +7 -7
  119. package/src/core/capabilities.test.ts +55 -36
  120. package/src/core/capabilities.ts +84 -60
  121. package/src/core/events.ts +4 -1
  122. package/src/core/manager.test.ts +22 -22
  123. package/src/core/manager.ts +34 -26
  124. package/src/core/plugin.ts +4 -3
  125. package/src/playground/generator/generator.ts +4 -4
  126. package/src/playground/logger/schema.ts +5 -5
  127. package/src/playground/playground.stories.tsx +13 -9
  128. package/src/plugin-intent/actions.ts +9 -9
  129. package/src/plugin-intent/intent-dispatcher.test.ts +23 -42
  130. package/src/plugin-intent/intent-dispatcher.ts +25 -13
  131. package/src/plugin-intent/intent.ts +22 -20
  132. package/src/plugin-settings/actions.ts +8 -8
  133. package/src/plugin-settings/app-graph-builder.ts +129 -94
  134. package/src/plugin-settings/store.ts +20 -17
  135. package/src/react/ErrorBoundary.tsx +3 -3
  136. package/src/react/Surface.stories.tsx +1 -1
  137. package/src/react/Surface.tsx +3 -3
  138. package/src/react/useCapabilities.ts +9 -19
  139. package/src/testing/withPluginManager.stories.tsx +0 -1
  140. package/src/testing/withPluginManager.tsx +35 -16
  141. package/tsconfig.json +1 -53
  142. package/typedoc/.nojekyll +1 -0
  143. package/typedoc/assets/hierarchy.js +1 -0
  144. package/typedoc/assets/highlight.css +106 -0
  145. package/typedoc/assets/icons.js +18 -0
  146. package/typedoc/assets/icons.svg +1 -0
  147. package/typedoc/assets/main.js +60 -0
  148. package/typedoc/assets/navigation.js +1 -0
  149. package/typedoc/assets/search.js +1 -0
  150. package/typedoc/assets/style.css +1640 -0
  151. package/typedoc/classes/CollaborationActions.InsertContent.html +421 -0
  152. package/typedoc/classes/ErrorBoundary.html +125 -0
  153. package/typedoc/classes/IntentAction.ShowUndo.html +227 -0
  154. package/typedoc/classes/IntentAction.Track.html +266 -0
  155. package/typedoc/classes/LayoutAction.AddToast.html +265 -0
  156. package/typedoc/classes/LayoutAction.Close.html +382 -0
  157. package/typedoc/classes/LayoutAction.Expose.html +265 -0
  158. package/typedoc/classes/LayoutAction.Open.html +1123 -0
  159. package/typedoc/classes/LayoutAction.RevertWorkspace.html +343 -0
  160. package/typedoc/classes/LayoutAction.ScrollIntoView.html +460 -0
  161. package/typedoc/classes/LayoutAction.Set.html +460 -0
  162. package/typedoc/classes/LayoutAction.SetLayoutMode.html +499 -0
  163. package/typedoc/classes/LayoutAction.SwitchWorkspace.html +265 -0
  164. package/typedoc/classes/LayoutAction.UpdateComplementary.html +616 -0
  165. package/typedoc/classes/LayoutAction.UpdateDialog.html +1123 -0
  166. package/typedoc/classes/LayoutAction.UpdateLayout.html +461 -0
  167. package/typedoc/classes/LayoutAction.UpdatePopover.html +1435 -0
  168. package/typedoc/classes/LayoutAction.UpdateSidebar.html +616 -0
  169. package/typedoc/classes/Plugin.html +6 -0
  170. package/typedoc/classes/PluginContext.html +38 -0
  171. package/typedoc/classes/PluginManager.html +43 -0
  172. package/typedoc/classes/PluginModule.html +18 -0
  173. package/typedoc/classes/SettingsAction.Open.html +226 -0
  174. package/typedoc/classes/SettingsAction.OpenPluginRegistry.html +265 -0
  175. package/typedoc/functions/Events.createStateEvent.html +2 -0
  176. package/typedoc/functions/IntentPlugin.html +1 -0
  177. package/typedoc/functions/SettingsPlugin.html +1 -0
  178. package/typedoc/functions/allOf.html +2 -0
  179. package/typedoc/functions/chain.html +3 -0
  180. package/typedoc/functions/contributes.html +2 -0
  181. package/typedoc/functions/createDispatcher.html +3 -0
  182. package/typedoc/functions/createIntent.html +6 -0
  183. package/typedoc/functions/createResolver.html +2 -0
  184. package/typedoc/functions/createSurface.html +2 -0
  185. package/typedoc/functions/defineCapability.html +2 -0
  186. package/typedoc/functions/defineEvent.html +2 -0
  187. package/typedoc/functions/defineModule.html +2 -0
  188. package/typedoc/functions/definePlugin.html +2 -0
  189. package/typedoc/functions/eventKey.html +2 -0
  190. package/typedoc/functions/getEvents.html +2 -0
  191. package/typedoc/functions/isAllOf.html +2 -0
  192. package/typedoc/functions/isOneOf.html +2 -0
  193. package/typedoc/functions/isSurfaceAvailable.html +2 -0
  194. package/typedoc/functions/lazy.html +2 -0
  195. package/typedoc/functions/oneOf.html +2 -0
  196. package/typedoc/functions/useApp.html +6 -0
  197. package/typedoc/functions/useAppGraph.html +1 -0
  198. package/typedoc/functions/useCapabilities.html +3 -0
  199. package/typedoc/functions/useCapability.html +4 -0
  200. package/typedoc/functions/useIntentDispatcher.html +1 -0
  201. package/typedoc/functions/useIntentResolver.html +1 -0
  202. package/typedoc/functions/useLayout.html +1 -0
  203. package/typedoc/functions/usePluginManager.html +2 -0
  204. package/typedoc/hierarchy.html +1 -0
  205. package/typedoc/index.html +16 -0
  206. package/typedoc/interfaces/LayoutAction.Toast.html +10 -0
  207. package/typedoc/media/LICENSE +8 -0
  208. package/typedoc/modules/Capabilities.html +1 -0
  209. package/typedoc/modules/CollaborationActions.html +1 -0
  210. package/typedoc/modules/Events.html +1 -0
  211. package/typedoc/modules/IntentAction.html +1 -0
  212. package/typedoc/modules/LayoutAction.html +2 -0
  213. package/typedoc/modules/SettingsAction.html +1 -0
  214. package/typedoc/modules.html +1 -0
  215. package/typedoc/types/ActivationEvent.html +8 -0
  216. package/typedoc/types/ActivationEvents.html +2 -0
  217. package/typedoc/types/AnyCapability.html +1 -0
  218. package/typedoc/types/AnyIntent.html +1 -0
  219. package/typedoc/types/AnyIntentChain.html +1 -0
  220. package/typedoc/types/AnyIntentEffectResult.html +1 -0
  221. package/typedoc/types/AnyIntentResolver.html +1 -0
  222. package/typedoc/types/AnyIntentResult.html +1 -0
  223. package/typedoc/types/Capabilities.FileUploader.html +1 -0
  224. package/typedoc/types/Capabilities.IntentResolver.html +1 -0
  225. package/typedoc/types/Capabilities.Layout.html +1 -0
  226. package/typedoc/types/Capabilities.Metadata.html +1 -0
  227. package/typedoc/types/Capabilities.ReactContext.html +1 -0
  228. package/typedoc/types/Capabilities.ReactRoot.html +1 -0
  229. package/typedoc/types/Capabilities.ReactSurface.html +1 -0
  230. package/typedoc/types/Capabilities.Settings.html +4 -0
  231. package/typedoc/types/Capability.html +9 -0
  232. package/typedoc/types/CreateAppOptions.html +10 -0
  233. package/typedoc/types/FileInfo.html +1 -0
  234. package/typedoc/types/Intent.html +10 -0
  235. package/typedoc/types/IntentChain.html +6 -0
  236. package/typedoc/types/IntentContext.html +5 -0
  237. package/typedoc/types/IntentData.html +1 -0
  238. package/typedoc/types/IntentDispatcher.html +2 -0
  239. package/typedoc/types/IntentDispatcherResult.html +2 -0
  240. package/typedoc/types/IntentEffectDefinition.html +2 -0
  241. package/typedoc/types/IntentEffectResult.html +15 -0
  242. package/typedoc/types/IntentParams.html +3 -0
  243. package/typedoc/types/IntentResolver.html +2 -0
  244. package/typedoc/types/IntentResultData.html +1 -0
  245. package/typedoc/types/IntentSchema.html +1 -0
  246. package/typedoc/types/IntentUndo.html +2 -0
  247. package/typedoc/types/InterfaceDef.html +4 -0
  248. package/typedoc/types/Label.html +1 -0
  249. package/typedoc/types/NodeSerializer.html +8 -0
  250. package/typedoc/types/PluginManagerOptions.html +6 -0
  251. package/typedoc/types/PluginMeta.html +21 -0
  252. package/typedoc/types/PromiseIntentDispatcher.html +2 -0
  253. package/typedoc/types/PromiseIntentUndo.html +2 -0
  254. package/typedoc/types/Resource.html +1 -0
  255. package/typedoc/types/ResourceKey.html +1 -0
  256. package/typedoc/types/ResourceLanguage.html +1 -0
  257. package/typedoc/types/SerializedNode.html +4 -0
  258. package/typedoc/types/SurfaceComponent.html +2 -0
  259. package/typedoc/types/SurfaceDefinition.html +2 -0
  260. package/typedoc/types/SurfaceProps.html +4 -0
  261. package/typedoc/variables/Capabilities.AnchorSort.html +1 -0
  262. package/typedoc/variables/Capabilities.AppGraph.html +1 -0
  263. package/typedoc/variables/Capabilities.AppGraphBuilder.html +1 -0
  264. package/typedoc/variables/Capabilities.AppGraphSerializer.html +1 -0
  265. package/typedoc/variables/Capabilities.ArtifactDefinition.html +1 -0
  266. package/typedoc/variables/Capabilities.FileUploader.html +1 -0
  267. package/typedoc/variables/Capabilities.IntentDispatcher.html +1 -0
  268. package/typedoc/variables/Capabilities.IntentResolver.html +1 -0
  269. package/typedoc/variables/Capabilities.Layout.html +1 -0
  270. package/typedoc/variables/Capabilities.Metadata.html +1 -0
  271. package/typedoc/variables/Capabilities.Null.html +1 -0
  272. package/typedoc/variables/Capabilities.PluginManager.html +1 -0
  273. package/typedoc/variables/Capabilities.ReactContext.html +1 -0
  274. package/typedoc/variables/Capabilities.ReactRoot.html +1 -0
  275. package/typedoc/variables/Capabilities.ReactSurface.html +1 -0
  276. package/typedoc/variables/Capabilities.RxRegistry.html +1 -0
  277. package/typedoc/variables/Capabilities.Settings.html +1 -0
  278. package/typedoc/variables/Capabilities.SettingsStore.html +1 -0
  279. package/typedoc/variables/Capabilities.Tools.html +1 -0
  280. package/typedoc/variables/Capabilities.Translations.html +1 -0
  281. package/typedoc/variables/Events.AppGraphReady.html +2 -0
  282. package/typedoc/variables/Events.DispatcherReady.html +2 -0
  283. package/typedoc/variables/Events.LayoutReady.html +1 -0
  284. package/typedoc/variables/Events.SettingsReady.html +2 -0
  285. package/typedoc/variables/Events.SetupAppGraph.html +2 -0
  286. package/typedoc/variables/Events.SetupArtifactDefinition.html +2 -0
  287. package/typedoc/variables/Events.SetupIntentResolver.html +2 -0
  288. package/typedoc/variables/Events.SetupMetadata.html +2 -0
  289. package/typedoc/variables/Events.SetupReactSurface.html +2 -0
  290. package/typedoc/variables/Events.SetupSettings.html +2 -0
  291. package/typedoc/variables/Events.SetupTranslations.html +2 -0
  292. package/typedoc/variables/Events.Startup.html +2 -0
  293. package/typedoc/variables/FileInfoSchema.html +1 -0
  294. package/typedoc/variables/INTENT_ACTION.html +1 -0
  295. package/typedoc/variables/INTENT_PLUGIN.html +1 -0
  296. package/typedoc/variables/LAYOUT_ACTION.html +1 -0
  297. package/typedoc/variables/LAYOUT_PLUGIN.html +1 -0
  298. package/typedoc/variables/Label.html +1 -0
  299. package/typedoc/variables/LayoutAction.Toast.html +1 -0
  300. package/typedoc/variables/LayoutAction.UPDATE_LAYOUT.html +1 -0
  301. package/typedoc/variables/PluginManagerProvider.html +2 -0
  302. package/typedoc/variables/Resource.html +2 -0
  303. package/typedoc/variables/ResourceKey.html +1 -0
  304. package/typedoc/variables/ResourceLanguage.html +1 -0
  305. package/typedoc/variables/SETTINGS_ACTION.html +1 -0
  306. package/typedoc/variables/SETTINGS_ID.html +1 -0
  307. package/typedoc/variables/SETTINGS_KEY.html +1 -0
  308. package/typedoc/variables/SETTINGS_PLUGIN.html +1 -0
  309. package/typedoc/variables/Surface.html +2 -0
  310. package/typedoc/variables/defaultFileTypes.html +1 -0
  311. package/dist/lib/browser/app-graph-builder-576BHZC7.mjs.map +0 -7
  312. package/dist/lib/browser/chunk-6AVTZPMT.mjs.map +0 -7
  313. package/dist/lib/browser/chunk-PPIBZ5N4.mjs.map +0 -7
  314. package/dist/lib/browser/chunk-SFPT4Z2C.mjs.map +0 -7
  315. package/dist/lib/browser/store-URSN7DZI.mjs.map +0 -7
  316. package/dist/lib/node/app-graph-builder-JZCSKYPY.cjs +0 -146
  317. package/dist/lib/node/app-graph-builder-JZCSKYPY.cjs.map +0 -7
  318. package/dist/lib/node/chunk-JUSEAFDU.cjs.map +0 -7
  319. package/dist/lib/node/chunk-YIFTVCOR.cjs.map +0 -7
  320. package/dist/lib/node/chunk-YNTKVTVX.cjs.map +0 -7
  321. package/dist/lib/node/store-OFDHTDCB.cjs.map +0 -7
  322. package/dist/lib/node-esm/app-graph-builder-VYKLSMSZ.mjs.map +0 -7
  323. package/dist/lib/node-esm/chunk-AHKIPS2L.mjs.map +0 -7
  324. package/dist/lib/node-esm/chunk-PHOUQACM.mjs.map +0 -7
  325. package/dist/lib/node-esm/chunk-R6A7Z4LU.mjs.map +0 -7
  326. package/dist/lib/node-esm/store-EYSUVNCS.mjs.map +0 -7
  327. /package/dist/lib/browser/{intent-dispatcher-3Q67MHZZ.mjs.map → intent-dispatcher-ELZN5EM7.mjs.map} +0 -0
  328. /package/dist/lib/browser/{intent-resolver-O763LCLG.mjs.map → intent-resolver-SGWLINTO.mjs.map} +0 -0
  329. /package/dist/lib/node/{intent-resolver-3F4POWAM.cjs.map → intent-resolver-EPSFTHL6.cjs.map} +0 -0
  330. /package/dist/lib/node-esm/{intent-dispatcher-YDE2ONZA.mjs.map → intent-dispatcher-A2JCMWRD.mjs.map} +0 -0
  331. /package/dist/lib/node-esm/{intent-resolver-LAGJ7LXM.mjs.map → intent-resolver-5C4O43GK.mjs.map} +0 -0
@@ -26,9 +26,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_YIFTVCOR_exports = {};
30
- __export(chunk_YIFTVCOR_exports, {
29
+ var chunk_HIVITTZD_exports = {};
30
+ __export(chunk_HIVITTZD_exports, {
31
31
  Capabilities: () => Capabilities,
32
+ CollaborationActions: () => CollaborationActions,
32
33
  Events: () => Events,
33
34
  FileInfoSchema: () => FileInfoSchema,
34
35
  INTENT_ACTION: () => INTENT_ACTION,
@@ -40,9 +41,9 @@ __export(chunk_YIFTVCOR_exports, {
40
41
  Label: () => Label,
41
42
  LayoutAction: () => LayoutAction,
42
43
  Plugin: () => Plugin,
44
+ PluginContext: () => PluginContext,
43
45
  PluginManager: () => PluginManager,
44
46
  PluginModule: () => PluginModule,
45
- PluginsContext: () => PluginsContext,
46
47
  Resource: () => Resource,
47
48
  ResourceKey: () => ResourceKey,
48
49
  ResourceLanguage: () => ResourceLanguage,
@@ -66,27 +67,29 @@ __export(chunk_YIFTVCOR_exports, {
66
67
  lazy: () => lazy,
67
68
  oneOf: () => oneOf
68
69
  });
69
- module.exports = __toCommonJS(chunk_YIFTVCOR_exports);
70
+ module.exports = __toCommonJS(chunk_HIVITTZD_exports);
70
71
  var import_effect = require("effect");
71
72
  var import_live_object = require("@dxos/live-object");
72
73
  var import_log = require("@dxos/log");
73
74
  var import_util = require("@dxos/util");
74
75
  var import_effect2 = require("effect");
75
76
  var import_effect3 = require("effect");
76
- var import_signals_core = require("@preact/signals-core");
77
+ var import_rx_react = require("@effect-rx/rx-react");
77
78
  var import_effect4 = require("effect");
78
79
  var import_async = require("@dxos/async");
79
80
  var import_invariant = require("@dxos/invariant");
80
- var import_live_object2 = require("@dxos/live-object");
81
81
  var import_log2 = require("@dxos/log");
82
- var import_signals_core2 = require("@preact/signals-core");
82
+ var import_rx_react2 = require("@effect-rx/rx-react");
83
+ var import_signals_core = require("@preact/signals-core");
83
84
  var import_effect5 = require("effect");
84
85
  var import_async2 = require("@dxos/async");
85
- var import_live_object3 = require("@dxos/live-object");
86
+ var import_live_object2 = require("@dxos/live-object");
86
87
  var import_log3 = require("@dxos/log");
87
88
  var import_effect6 = require("effect");
89
+ var import_echo_schema = require("@dxos/echo-schema");
88
90
  var import_effect7 = require("effect");
89
91
  var import_effect8 = require("effect");
92
+ var import_effect9 = require("effect");
90
93
  var createIntent = (schema, data = {}, params = {}) => {
91
94
  const _ = import_effect3.Schema.validateSync(schema.fields.input)(data);
92
95
  const intent = {
@@ -129,7 +132,6 @@ var Label = import_effect3.Schema.Union(import_effect3.Schema.String, import_eff
129
132
  })))));
130
133
  var INTENT_PLUGIN = "dxos.org/plugin/intent";
131
134
  var INTENT_ACTION = `${INTENT_PLUGIN}/action`;
132
- var IntentAction;
133
135
  (function(IntentAction2) {
134
136
  class Track extends import_effect2.Schema.TaggedClass()(`${INTENT_ACTION}/track`, {
135
137
  input: import_effect2.Schema.Struct({
@@ -149,13 +151,12 @@ var IntentAction;
149
151
  }
150
152
  IntentAction2.ShowUndo = ShowUndo;
151
153
  })(IntentAction || (IntentAction = {}));
154
+ var IntentAction;
152
155
  var BaseError = class extends Error {
153
156
  constructor(code, message, context) {
154
157
  super(message ?? code, {
155
158
  cause: context
156
- });
157
- this.code = code;
158
- this.context = context;
159
+ }), this.code = code, this.context = context;
159
160
  this.name = code;
160
161
  Object.setPrototypeOf(this, new.target.prototype);
161
162
  }
@@ -196,9 +197,33 @@ var lazy = (c) => async (props) => {
196
197
  const { default: getCapability } = await c();
197
198
  return async () => getCapability(props);
198
199
  };
199
- var PluginsContext = class {
200
- constructor({ activate, reset }) {
201
- this._definedCapabilities = /* @__PURE__ */ new Map();
200
+ var PluginContext = class {
201
+ constructor({ registry, activate, reset }) {
202
+ this._capabilityImpls = import_rx_react.Rx.family(() => {
203
+ return import_rx_react.Rx.make([]).pipe(import_rx_react.Rx.keepAlive);
204
+ });
205
+ this._capabilities = import_rx_react.Rx.family((id) => {
206
+ return import_rx_react.Rx.make((get) => {
207
+ const current = get(this._capabilityImpls(id));
208
+ return current.map((c) => c.implementation);
209
+ });
210
+ });
211
+ this._capability = import_rx_react.Rx.family((id) => {
212
+ return import_rx_react.Rx.make((get) => {
213
+ const current = get(this._capabilities(id));
214
+ (0, import_invariant.invariant)(current.length > 0, `No capability found for ${id}`, {
215
+ F: __dxlog_file,
216
+ L: 117,
217
+ S: this,
218
+ A: [
219
+ "current.length > 0",
220
+ "`No capability found for ${id}`"
221
+ ]
222
+ });
223
+ return current[0];
224
+ });
225
+ });
226
+ this._registry = registry;
202
227
  this.activate = activate;
203
228
  this.reset = reset;
204
229
  }
@@ -206,22 +231,22 @@ var PluginsContext = class {
206
231
  * @internal
207
232
  */
208
233
  contributeCapability({ module: moduleId, interface: interfaceDef, implementation }) {
209
- let current = this._definedCapabilities.get(interfaceDef.identifier);
210
- if (!current) {
211
- const object = (0, import_live_object2.create)({
212
- value: []
213
- });
214
- current = (0, import_signals_core.untracked)(() => object.value);
215
- this._definedCapabilities.set(interfaceDef.identifier, current);
234
+ const current = this._registry.get(this._capabilityImpls(interfaceDef.identifier));
235
+ const capability = new CapabilityImpl(moduleId, implementation);
236
+ if (current.includes(capability)) {
237
+ return;
216
238
  }
217
- current.push(new CapabilityImpl(moduleId, implementation));
239
+ this._registry.set(this._capabilityImpls(interfaceDef.identifier), [
240
+ ...current,
241
+ capability
242
+ ]);
218
243
  (0, import_log2.log)("capability contributed", {
219
244
  id: interfaceDef.identifier,
220
245
  moduleId,
221
- count: (0, import_signals_core.untracked)(() => current.length)
246
+ count: current.length
222
247
  }, {
223
248
  F: __dxlog_file,
224
- L: 142,
249
+ L: 161,
225
250
  S: this,
226
251
  C: (f, a) => f(...a)
227
252
  });
@@ -230,19 +255,19 @@ var PluginsContext = class {
230
255
  * @internal
231
256
  */
232
257
  removeCapability(interfaceDef, implementation) {
233
- const current = this._definedCapabilities.get(interfaceDef.identifier);
234
- if (!current) {
258
+ const current = this._registry.get(this._capabilityImpls(interfaceDef.identifier));
259
+ if (current.length === 0) {
235
260
  return;
236
261
  }
237
- const index = current.findIndex((i) => i.implementation === implementation);
238
- if (index !== -1) {
239
- current.splice(index, 1);
262
+ const next = current.filter((c) => c.implementation !== implementation);
263
+ if (next.length !== current.length) {
264
+ this._registry.set(this._capabilityImpls(interfaceDef.identifier), next);
240
265
  (0, import_log2.log)("capability removed", {
241
266
  id: interfaceDef.identifier,
242
- count: (0, import_signals_core.untracked)(() => current.length)
267
+ count: current.length
243
268
  }, {
244
269
  F: __dxlog_file,
245
- L: 161,
270
+ L: 180,
246
271
  S: this,
247
272
  C: (f, a) => f(...a)
248
273
  });
@@ -251,63 +276,64 @@ var PluginsContext = class {
251
276
  id: interfaceDef.identifier
252
277
  }, {
253
278
  F: __dxlog_file,
254
- L: 163,
279
+ L: 182,
255
280
  S: this,
256
281
  C: (f, a) => f(...a)
257
282
  });
258
283
  }
259
284
  }
260
285
  /**
261
- * Requests capabilities from the plugin context.
286
+ * Get the Rx reference to the available capabilities for a given interface.
287
+ * Primarily useful for deriving other Rx values based on the capabilities or
288
+ * for subscribing to changes in the capabilities.
289
+ * @returns An Rx reference to the available capabilities.
290
+ */
291
+ capabilities(interfaceDef) {
292
+ return this._capabilities(interfaceDef.identifier);
293
+ }
294
+ /**
295
+ * Get the Rx reference to the available capabilities for a given interface.
296
+ * Primarily useful for deriving other Rx values based on the capability or
297
+ * for subscribing to changes in the capability.
298
+ * @returns An Rx reference to the available capability.
299
+ * @throws If no capability is found.
300
+ */
301
+ capability(interfaceDef) {
302
+ return this._capability(interfaceDef.identifier);
303
+ }
304
+ /**
305
+ * Get capabilities from the plugin context.
262
306
  * @returns An array of capabilities.
263
- * @reactive
264
307
  */
265
- requestCapabilities(interfaceDef, filter) {
266
- let current = this._definedCapabilities.get(interfaceDef.identifier);
267
- if (!current) {
268
- const object = (0, import_live_object2.create)({
269
- value: []
270
- });
271
- current = (0, import_signals_core.untracked)(() => object.value);
272
- this._definedCapabilities.set(interfaceDef.identifier, current);
273
- }
274
- const capabilities = filter ? current.filter((c) => filter(c.implementation, c.moduleId)) : current;
275
- return capabilities.map((c) => c.implementation);
308
+ getCapabilities(interfaceDef) {
309
+ return this._registry.get(this.capabilities(interfaceDef));
276
310
  }
277
311
  /**
278
312
  * Requests a single capability from the plugin context.
279
313
  * @returns The capability.
280
314
  * @throws If no capability is found.
281
- * @reactive
282
315
  */
283
- requestCapability(interfaceDef, filter) {
284
- const capability = this.requestCapabilities(interfaceDef, filter)[0];
285
- (0, import_invariant.invariant)(capability, `No capability found for ${interfaceDef.identifier}`, {
286
- F: __dxlog_file,
287
- L: 199,
288
- S: this,
289
- A: [
290
- "capability",
291
- "`No capability found for ${interfaceDef.identifier}`"
292
- ]
293
- });
294
- return capability;
316
+ getCapability(interfaceDef) {
317
+ return this._registry.get(this.capability(interfaceDef));
295
318
  }
296
319
  /**
297
- * Waits for a capability to be contributed.
320
+ * Waits for a capability to be available.
298
321
  * @returns The capability.
299
322
  */
300
- async waitForCapability(interfaceDef, filter) {
323
+ async waitForCapability(interfaceDef) {
324
+ const [capability] = this.getCapabilities(interfaceDef);
325
+ if (capability) {
326
+ return capability;
327
+ }
301
328
  const trigger = new import_async.Trigger();
302
- const unsubscribe = (0, import_signals_core.effect)(() => {
303
- const capabilities = this.requestCapabilities(interfaceDef, filter);
304
- if (capabilities[0]) {
329
+ const cancel = this._registry.subscribe(this.capabilities(interfaceDef), (capabilities) => {
330
+ if (capabilities.length > 0) {
305
331
  trigger.wake(capabilities[0]);
306
332
  }
307
333
  });
308
- const capability = await trigger.wait();
309
- unsubscribe();
310
- return capability;
334
+ const result = await trigger.wait();
335
+ cancel();
336
+ return result;
311
337
  }
312
338
  async activatePromise(event) {
313
339
  return this.activate(event).pipe(import_effect4.Effect.runPromise);
@@ -341,15 +367,17 @@ var isPromise = (value) => {
341
367
  return value !== null && typeof value === "object" && "then" in value;
342
368
  };
343
369
  var PluginManager = class {
344
- constructor({ pluginLoader, plugins = [], core = plugins.map(({ meta }) => meta.id), enabled = [] }) {
370
+ constructor({ pluginLoader, plugins = [], core = plugins.map(({ meta }) => meta.id), enabled = [], registry }) {
345
371
  this.activation = new import_async2.Event();
346
- this.context = new PluginsContext({
372
+ this._capabilities = /* @__PURE__ */ new Map();
373
+ this.registry = registry ?? import_rx_react2.Registry.make();
374
+ this.context = new PluginContext({
375
+ registry: this.registry,
347
376
  activate: (event) => this._activate(event),
348
377
  reset: (id) => this._reset(id)
349
378
  });
350
- this._capabilities = /* @__PURE__ */ new Map();
351
379
  this._pluginLoader = pluginLoader;
352
- this._state = (0, import_live_object3.create)({
380
+ this._state = (0, import_live_object2.live)({
353
381
  plugins,
354
382
  core,
355
383
  enabled,
@@ -423,12 +451,12 @@ var PluginManager = class {
423
451
  * @param id The id of the plugin.
424
452
  */
425
453
  async add(id) {
426
- return (0, import_signals_core2.untracked)(async () => {
454
+ return (0, import_signals_core.untracked)(async () => {
427
455
  (0, import_log3.log)("add plugin", {
428
456
  id
429
457
  }, {
430
458
  F: __dxlog_file2,
431
- L: 146,
459
+ L: 154,
432
460
  S: this,
433
461
  C: (f, a) => f(...a)
434
462
  });
@@ -442,12 +470,12 @@ var PluginManager = class {
442
470
  * @param id The id of the plugin.
443
471
  */
444
472
  enable(id) {
445
- return (0, import_signals_core2.untracked)(async () => {
473
+ return (0, import_signals_core.untracked)(async () => {
446
474
  (0, import_log3.log)("enable plugin", {
447
475
  id
448
476
  }, {
449
477
  F: __dxlog_file2,
450
- L: 159,
478
+ L: 167,
451
479
  S: this,
452
480
  C: (f, a) => f(...a)
453
481
  });
@@ -468,7 +496,7 @@ var PluginManager = class {
468
496
  ]
469
497
  }, {
470
498
  F: __dxlog_file2,
471
- L: 174,
499
+ L: 182,
472
500
  S: this,
473
501
  C: (f, a) => f(...a)
474
502
  });
@@ -483,12 +511,12 @@ var PluginManager = class {
483
511
  * @param id The id of the plugin.
484
512
  */
485
513
  remove(id) {
486
- return (0, import_signals_core2.untracked)(() => {
514
+ return (0, import_signals_core.untracked)(() => {
487
515
  (0, import_log3.log)("remove plugin", {
488
516
  id
489
517
  }, {
490
518
  F: __dxlog_file2,
491
- L: 192,
519
+ L: 200,
492
520
  S: this,
493
521
  C: (f, a) => f(...a)
494
522
  });
@@ -505,12 +533,12 @@ var PluginManager = class {
505
533
  * @param id The id of the plugin.
506
534
  */
507
535
  disable(id) {
508
- return (0, import_signals_core2.untracked)(async () => {
536
+ return (0, import_signals_core.untracked)(async () => {
509
537
  (0, import_log3.log)("disable plugin", {
510
538
  id
511
539
  }, {
512
540
  F: __dxlog_file2,
513
- L: 209,
541
+ L: 217,
514
542
  S: this,
515
543
  C: (f, a) => f(...a)
516
544
  });
@@ -538,7 +566,7 @@ var PluginManager = class {
538
566
  * @returns Whether the activation was successful.
539
567
  */
540
568
  activate(event) {
541
- return (0, import_signals_core2.untracked)(() => import_effect5.Effect.runPromise(this._activate(event)));
569
+ return (0, import_signals_core.untracked)(() => import_effect5.Effect.runPromise(this._activate(event)));
542
570
  }
543
571
  /**
544
572
  * Deactivates all of the modules for a plugin.
@@ -546,7 +574,7 @@ var PluginManager = class {
546
574
  * @returns Whether the deactivation was successful.
547
575
  */
548
576
  deactivate(id) {
549
- return (0, import_signals_core2.untracked)(() => import_effect5.Effect.runPromise(this._deactivate(id)));
577
+ return (0, import_signals_core.untracked)(() => import_effect5.Effect.runPromise(this._deactivate(id)));
550
578
  }
551
579
  /**
552
580
  * Re-activates the modules that were activated by the event.
@@ -554,15 +582,15 @@ var PluginManager = class {
554
582
  * @returns Whether the reset was successful.
555
583
  */
556
584
  reset(event) {
557
- return (0, import_signals_core2.untracked)(() => import_effect5.Effect.runPromise(this._reset(event)));
585
+ return (0, import_signals_core.untracked)(() => import_effect5.Effect.runPromise(this._reset(event)));
558
586
  }
559
587
  _addPlugin(plugin) {
560
- (0, import_signals_core2.untracked)(() => {
588
+ (0, import_signals_core.untracked)(() => {
561
589
  (0, import_log3.log)("add plugin", {
562
590
  id: plugin.meta.id
563
591
  }, {
564
592
  F: __dxlog_file2,
565
- L: 262,
593
+ L: 270,
566
594
  S: this,
567
595
  C: (f, a) => f(...a)
568
596
  });
@@ -572,12 +600,12 @@ var PluginManager = class {
572
600
  });
573
601
  }
574
602
  _removePlugin(id) {
575
- (0, import_signals_core2.untracked)(() => {
603
+ (0, import_signals_core.untracked)(() => {
576
604
  (0, import_log3.log)("remove plugin", {
577
605
  id
578
606
  }, {
579
607
  F: __dxlog_file2,
580
- L: 271,
608
+ L: 279,
581
609
  S: this,
582
610
  C: (f, a) => f(...a)
583
611
  });
@@ -588,12 +616,12 @@ var PluginManager = class {
588
616
  });
589
617
  }
590
618
  _addModule(module2) {
591
- (0, import_signals_core2.untracked)(() => {
619
+ (0, import_signals_core.untracked)(() => {
592
620
  (0, import_log3.log)("add module", {
593
621
  id: module2.id
594
622
  }, {
595
623
  F: __dxlog_file2,
596
- L: 281,
624
+ L: 289,
597
625
  S: this,
598
626
  C: (f, a) => f(...a)
599
627
  });
@@ -603,12 +631,12 @@ var PluginManager = class {
603
631
  });
604
632
  }
605
633
  _removeModule(id) {
606
- (0, import_signals_core2.untracked)(() => {
634
+ (0, import_signals_core.untracked)(() => {
607
635
  (0, import_log3.log)("remove module", {
608
636
  id
609
637
  }, {
610
638
  F: __dxlog_file2,
611
- L: 290,
639
+ L: 298,
612
640
  S: this,
613
641
  C: (f, a) => f(...a)
614
642
  });
@@ -634,7 +662,7 @@ var PluginManager = class {
634
662
  return this._getInactiveModules().filter((module2) => getEvents(module2.activatesOn).map(eventKey).includes(key));
635
663
  }
636
664
  _setPendingResetByModule(module2) {
637
- return (0, import_signals_core2.untracked)(() => {
665
+ return (0, import_signals_core.untracked)(() => {
638
666
  const activationEvents = getEvents(module2.activatesOn).map(eventKey).filter((key) => this._state.eventsFired.includes(key));
639
667
  const pendingReset = Array.from(new Set(activationEvents)).filter((event) => !this._state.pendingReset.includes(event));
640
668
  if (pendingReset.length > 0) {
@@ -642,7 +670,7 @@ var PluginManager = class {
642
670
  events: pendingReset
643
671
  }, {
644
672
  F: __dxlog_file2,
645
- L: 328,
673
+ L: 336,
646
674
  S: this,
647
675
  C: (f, a) => f(...a)
648
676
  });
@@ -661,7 +689,7 @@ var PluginManager = class {
661
689
  key
662
690
  }, {
663
691
  F: __dxlog_file2,
664
- L: 341,
692
+ L: 349,
665
693
  S: this,
666
694
  C: (f, a) => f(...a)
667
695
  });
@@ -682,7 +710,7 @@ var PluginManager = class {
682
710
  key
683
711
  }, {
684
712
  F: __dxlog_file2,
685
- L: 357,
713
+ L: 365,
686
714
  S: this,
687
715
  C: (f, a) => f(...a)
688
716
  });
@@ -696,7 +724,7 @@ var PluginManager = class {
696
724
  modules: modules.map((module2) => module2.id)
697
725
  }, {
698
726
  F: __dxlog_file2,
699
- L: 364,
727
+ L: 372,
700
728
  S: this,
701
729
  C: (f, a) => f(...a)
702
730
  });
@@ -738,7 +766,7 @@ var PluginManager = class {
738
766
  key
739
767
  }, {
740
768
  F: __dxlog_file2,
741
- L: 398,
769
+ L: 406,
742
770
  S: this,
743
771
  C: (f, a) => f(...a)
744
772
  });
@@ -754,7 +782,7 @@ var PluginManager = class {
754
782
  module: module2.id
755
783
  }, {
756
784
  F: __dxlog_file2,
757
- L: 413,
785
+ L: 421,
758
786
  S: this,
759
787
  C: (f, a) => f(...a)
760
788
  });
@@ -783,7 +811,7 @@ var PluginManager = class {
783
811
  module: module2.id
784
812
  }, {
785
813
  F: __dxlog_file2,
786
- L: 436,
814
+ L: 444,
787
815
  S: this,
788
816
  C: (f, a) => f(...a)
789
817
  });
@@ -812,7 +840,7 @@ var PluginManager = class {
812
840
  id
813
841
  }, {
814
842
  F: __dxlog_file2,
815
- L: 463,
843
+ L: 471,
816
844
  S: this,
817
845
  C: (f, a) => f(...a)
818
846
  });
@@ -821,7 +849,7 @@ var PluginManager = class {
821
849
  for (const capability of capabilities) {
822
850
  this.context.removeCapability(capability.interface, capability.implementation);
823
851
  const program = capability.deactivate?.();
824
- yield* import_effect5.Match.value(program).pipe(import_effect5.Match.when(import_effect5.Effect.isEffect, (effect2) => effect2), import_effect5.Match.when(isPromise, (promise) => import_effect5.Effect.tryPromise({
852
+ yield* import_effect5.Match.value(program).pipe(import_effect5.Match.when(import_effect5.Effect.isEffect, (effect) => effect), import_effect5.Match.when(isPromise, (promise) => import_effect5.Effect.tryPromise({
825
853
  try: () => promise,
826
854
  catch: (error) => error
827
855
  })), import_effect5.Match.orElse((program2) => import_effect5.Effect.succeed(program2)));
@@ -836,7 +864,7 @@ var PluginManager = class {
836
864
  id
837
865
  }, {
838
866
  F: __dxlog_file2,
839
- L: 489,
867
+ L: 497,
840
868
  S: this,
841
869
  C: (f, a) => f(...a)
842
870
  });
@@ -850,7 +878,7 @@ var PluginManager = class {
850
878
  key
851
879
  }, {
852
880
  F: __dxlog_file2,
853
- L: 497,
881
+ L: 505,
854
882
  S: this,
855
883
  C: (f, a) => f(...a)
856
884
  });
@@ -885,10 +913,10 @@ var Plugin = class {
885
913
  var definePlugin = (meta, modules) => {
886
914
  return new Plugin(meta, modules);
887
915
  };
888
- var Capabilities;
889
916
  (function(Capabilities2) {
890
917
  Capabilities2.PluginManager = defineCapability("dxos.org/app-framework/capability/plugin-manager");
891
918
  Capabilities2.Null = defineCapability("dxos.org/app-framework/capability/null");
919
+ Capabilities2.RxRegistry = defineCapability("dxos.org/app-framework/capability/rx-registry");
892
920
  Capabilities2.ReactContext = defineCapability("dxos.org/app-framework/capability/react-context");
893
921
  Capabilities2.ReactRoot = defineCapability("dxos.org/app-framework/capability/react-root");
894
922
  Capabilities2.ReactSurface = defineCapability("dxos.org/app-framework/common/react-surface");
@@ -905,8 +933,25 @@ var Capabilities;
905
933
  Capabilities2.Tools = defineCapability("dxos.org/app-framework/capability/tools");
906
934
  Capabilities2.ArtifactDefinition = defineCapability("dxos.org/app-framework/capability/artifact-definition");
907
935
  Capabilities2.FileUploader = defineCapability("dxos.org/app-framework/capability/file-uploader");
936
+ Capabilities2.AnchorSort = defineCapability("dxos.org/app-framework/capability/anchor-sort");
908
937
  })(Capabilities || (Capabilities = {}));
909
- var Events;
938
+ var Capabilities;
939
+ (function(CollaborationActions2) {
940
+ class InsertContent extends import_effect6.Schema.TaggedClass()("assistant/intent-content", {
941
+ input: import_effect6.Schema.Struct({
942
+ target: import_echo_schema.Expando,
943
+ object: (0, import_echo_schema.Ref)(import_echo_schema.Expando),
944
+ at: import_effect6.Schema.optional(import_effect6.Schema.String),
945
+ label: import_effect6.Schema.String.pipe(import_effect6.Schema.optional)
946
+ }).annotations({
947
+ description: "Enables plugins to inject content blocks or references into a related entity."
948
+ }),
949
+ output: import_effect6.Schema.Void
950
+ }) {
951
+ }
952
+ CollaborationActions2.InsertContent = InsertContent;
953
+ })(CollaborationActions || (CollaborationActions = {}));
954
+ var CollaborationActions;
910
955
  (function(Events2) {
911
956
  Events2.Startup = defineEvent("dxos.org/app-framework/event/startup");
912
957
  Events2.SetupReactSurface = defineEvent("dxos.org/app-framework/event/setup-react-surface");
@@ -922,6 +967,7 @@ var Events;
922
967
  Events2.createStateEvent = (specifier) => defineEvent("dxos.org/app-framework/event/state", specifier);
923
968
  Events2.LayoutReady = Events2.createStateEvent(Capabilities.Layout.identifier);
924
969
  })(Events || (Events = {}));
970
+ var Events;
925
971
  var defaultFileTypes = {
926
972
  images: [
927
973
  "png",
@@ -941,11 +987,11 @@ var defaultFileTypes = {
941
987
  "md"
942
988
  ]
943
989
  };
944
- var FileInfoSchema = import_effect6.Schema.Struct({
945
- name: import_effect6.Schema.String,
946
- type: import_effect6.Schema.String,
947
- url: import_effect6.Schema.optional(import_effect6.Schema.String),
948
- cid: import_effect6.Schema.optional(import_effect6.Schema.String)
990
+ var FileInfoSchema = import_effect7.Schema.Struct({
991
+ name: import_effect7.Schema.String,
992
+ type: import_effect7.Schema.String,
993
+ url: import_effect7.Schema.optional(import_effect7.Schema.String),
994
+ cid: import_effect7.Schema.optional(import_effect7.Schema.String)
949
995
  });
950
996
  var IntentPlugin = () => definePlugin({
951
997
  id: INTENT_PLUGIN,
@@ -960,336 +1006,355 @@ var IntentPlugin = () => definePlugin({
960
1006
  activatesAfter: [
961
1007
  Events.DispatcherReady
962
1008
  ],
963
- activate: lazy(() => import("./intent-dispatcher-H334XLFD.cjs"))
1009
+ activate: lazy(() => import("./intent-dispatcher-LFXZJTAS.cjs"))
964
1010
  })
965
1011
  ]);
966
1012
  var LAYOUT_PLUGIN = "dxos.org/plugin/layout";
967
1013
  var LAYOUT_ACTION = `${LAYOUT_PLUGIN}/action`;
968
- var LayoutAction;
969
1014
  (function(LayoutAction2) {
970
1015
  LayoutAction2.UPDATE_LAYOUT = `${LAYOUT_ACTION}/update-layout`;
971
- class UpdateLayout extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
972
- input: import_effect7.Schema.Struct({
973
- part: import_effect7.Schema.String.annotations({
1016
+ class UpdateLayout extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1017
+ input: import_effect8.Schema.Struct({
1018
+ part: import_effect8.Schema.String.annotations({
974
1019
  description: "The part of the layout to mutate."
975
1020
  }),
976
- subject: import_effect7.Schema.optional(import_effect7.Schema.Any.annotations({
1021
+ subject: import_effect8.Schema.optional(import_effect8.Schema.Any.annotations({
977
1022
  description: "The subject of the layout update."
978
1023
  })),
979
- options: import_effect7.Schema.optional(import_effect7.Schema.Record({
980
- key: import_effect7.Schema.String,
981
- value: import_effect7.Schema.Any
1024
+ options: import_effect8.Schema.optional(import_effect8.Schema.Record({
1025
+ key: import_effect8.Schema.String,
1026
+ value: import_effect8.Schema.Any
982
1027
  }).annotations({
983
1028
  description: "Additional options for the layout action."
984
1029
  }))
985
1030
  }),
986
- output: import_effect7.Schema.Void
1031
+ output: import_effect8.Schema.Void
987
1032
  }) {
988
1033
  }
989
1034
  LayoutAction2.UpdateLayout = UpdateLayout;
990
- class SetLayoutMode extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
991
- input: import_effect7.Schema.Struct({
992
- part: import_effect7.Schema.Literal("mode").annotations({
1035
+ class SetLayoutMode extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1036
+ input: import_effect8.Schema.Struct({
1037
+ part: import_effect8.Schema.Literal("mode").annotations({
993
1038
  description: "Setting the layout mode."
994
1039
  }),
995
- subject: import_effect7.Schema.optional(import_effect7.Schema.String.annotations({
1040
+ subject: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
996
1041
  description: "Item which is the subject of the new layout mode."
997
1042
  })),
998
- options: import_effect7.Schema.Union(import_effect7.Schema.Struct({
999
- mode: import_effect7.Schema.String.annotations({
1043
+ options: import_effect8.Schema.Union(import_effect8.Schema.Struct({
1044
+ mode: import_effect8.Schema.String.annotations({
1000
1045
  description: "The new layout mode."
1001
1046
  })
1002
- }), import_effect7.Schema.Struct({
1003
- revert: import_effect7.Schema.Boolean.annotations({
1047
+ }), import_effect8.Schema.Struct({
1048
+ revert: import_effect8.Schema.Boolean.annotations({
1004
1049
  description: "Revert to the previous layout mode."
1005
1050
  })
1006
1051
  }))
1007
1052
  }),
1008
- output: import_effect7.Schema.Void
1053
+ output: import_effect8.Schema.Void
1009
1054
  }) {
1010
1055
  }
1011
1056
  LayoutAction2.SetLayoutMode = SetLayoutMode;
1012
- class UpdateSidebar extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1013
- input: import_effect7.Schema.Struct({
1014
- part: import_effect7.Schema.Literal("sidebar").annotations({
1057
+ class UpdateSidebar extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1058
+ input: import_effect8.Schema.Struct({
1059
+ part: import_effect8.Schema.Literal("sidebar").annotations({
1015
1060
  description: "Updating the sidebar."
1016
1061
  }),
1017
- subject: import_effect7.Schema.optional(import_effect7.Schema.String.annotations({
1062
+ subject: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
1018
1063
  description: "URI of the component to display in the sidebar."
1019
1064
  })),
1020
- options: import_effect7.Schema.optional(import_effect7.Schema.Struct({
1021
- state: import_effect7.Schema.Literal("closed", "collapsed", "expanded").annotations({
1065
+ options: import_effect8.Schema.optional(import_effect8.Schema.Struct({
1066
+ state: import_effect8.Schema.Literal("closed", "collapsed", "expanded").annotations({
1022
1067
  description: "Whether the sidebar is closed, collapsed, or expanded."
1023
1068
  })
1024
1069
  }))
1025
1070
  }),
1026
- output: import_effect7.Schema.Void
1071
+ output: import_effect8.Schema.Void
1027
1072
  }) {
1028
1073
  }
1029
1074
  LayoutAction2.UpdateSidebar = UpdateSidebar;
1030
- class UpdateComplementary extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1031
- input: import_effect7.Schema.Struct({
1032
- part: import_effect7.Schema.Literal("complementary").annotations({
1075
+ class UpdateComplementary extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1076
+ input: import_effect8.Schema.Struct({
1077
+ part: import_effect8.Schema.Literal("complementary").annotations({
1033
1078
  description: "Updating the complementary sidebar."
1034
1079
  }),
1035
- subject: import_effect7.Schema.optional(import_effect7.Schema.String.annotations({
1080
+ subject: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
1036
1081
  description: "URI of the component to display in the complementary area."
1037
1082
  })),
1038
- options: import_effect7.Schema.optional(import_effect7.Schema.Struct({
1039
- state: import_effect7.Schema.Literal("closed", "collapsed", "expanded").annotations({
1083
+ options: import_effect8.Schema.optional(import_effect8.Schema.Struct({
1084
+ state: import_effect8.Schema.Literal("closed", "collapsed", "expanded").annotations({
1040
1085
  description: "Whether the complementary sidebar is closed, collapsed, or expanded."
1041
1086
  })
1042
1087
  }))
1043
1088
  }),
1044
- output: import_effect7.Schema.Void
1089
+ output: import_effect8.Schema.Void
1045
1090
  }) {
1046
1091
  }
1047
1092
  LayoutAction2.UpdateComplementary = UpdateComplementary;
1048
- class UpdateDialog extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1049
- input: import_effect7.Schema.Struct({
1050
- part: import_effect7.Schema.Literal("dialog").annotations({
1093
+ class UpdateDialog extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1094
+ input: import_effect8.Schema.Struct({
1095
+ part: import_effect8.Schema.Literal("dialog").annotations({
1051
1096
  description: "Updating the dialog."
1052
1097
  }),
1053
- subject: import_effect7.Schema.optional(import_effect7.Schema.String.annotations({
1098
+ subject: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
1054
1099
  description: "URI of the component to display in the dialog."
1055
1100
  })),
1056
- options: import_effect7.Schema.Struct({
1057
- state: import_effect7.Schema.optional(import_effect7.Schema.Boolean.annotations({
1101
+ options: import_effect8.Schema.Struct({
1102
+ state: import_effect8.Schema.optional(import_effect8.Schema.Boolean.annotations({
1058
1103
  description: "Whether the dialog is open or closed."
1059
1104
  })),
1060
- blockAlign: import_effect7.Schema.optional(import_effect7.Schema.Literal("start", "center", "end").annotations({
1105
+ type: import_effect8.Schema.optional(import_effect8.Schema.Literal("default", "alert").annotations({
1106
+ description: "The type of dialog."
1107
+ })),
1108
+ blockAlign: import_effect8.Schema.optional(import_effect8.Schema.Literal("start", "center", "end").annotations({
1061
1109
  description: "The alignment of the dialog."
1062
1110
  })),
1063
- type: import_effect7.Schema.optional(import_effect7.Schema.Literal("default", "alert").annotations({
1064
- description: "The type of dialog."
1111
+ overlayClasses: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
1112
+ description: "Additional classes for the dialog overlay."
1065
1113
  })),
1066
- props: import_effect7.Schema.optional(import_effect7.Schema.Record({
1067
- key: import_effect7.Schema.String,
1068
- value: import_effect7.Schema.Any
1114
+ overlayStyle: import_effect8.Schema.optional(import_effect8.Schema.Record({
1115
+ key: import_effect8.Schema.String,
1116
+ value: import_effect8.Schema.Any
1117
+ }).annotations({
1118
+ description: "Additional styles for the dialog overlay."
1119
+ })),
1120
+ props: import_effect8.Schema.optional(import_effect8.Schema.Record({
1121
+ key: import_effect8.Schema.String,
1122
+ value: import_effect8.Schema.Any
1069
1123
  }).annotations({
1070
1124
  description: "Additional props for the dialog."
1071
1125
  }))
1072
1126
  })
1073
1127
  }),
1074
- output: import_effect7.Schema.Void
1128
+ output: import_effect8.Schema.Void
1075
1129
  }) {
1076
1130
  }
1077
1131
  LayoutAction2.UpdateDialog = UpdateDialog;
1078
- class UpdatePopover extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1079
- input: import_effect7.Schema.Struct({
1080
- part: import_effect7.Schema.Literal("popover").annotations({
1132
+ class UpdatePopover extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1133
+ input: import_effect8.Schema.Struct({
1134
+ part: import_effect8.Schema.Literal("popover").annotations({
1081
1135
  description: "Updating the popover."
1082
1136
  }),
1083
- subject: import_effect7.Schema.optional(import_effect7.Schema.String.annotations({
1084
- description: "URI of the component to display in the popover."
1137
+ subject: import_effect8.Schema.optional(import_effect8.Schema.Any.annotations({
1138
+ description: "URI of the component to display in the popover or data to pass to the popover."
1085
1139
  })),
1086
- options: import_effect7.Schema.Struct({
1087
- anchorId: import_effect7.Schema.String.annotations({
1088
- description: "The id of the element to anchor the popover to."
1089
- }),
1090
- side: import_effect7.Schema.optional(import_effect7.Schema.Literal("top", "right", "bottom", "left").annotations({
1140
+ options: import_effect8.Schema.Struct({
1141
+ side: import_effect8.Schema.optional(import_effect8.Schema.Literal("top", "right", "bottom", "left").annotations({
1091
1142
  description: "The side of the anchor."
1092
1143
  })),
1093
- state: import_effect7.Schema.optional(import_effect7.Schema.Boolean.annotations({
1144
+ state: import_effect8.Schema.optional(import_effect8.Schema.Boolean.annotations({
1094
1145
  description: "Whether the popover is open or closed."
1095
1146
  })),
1096
- props: import_effect7.Schema.optional(import_effect7.Schema.Record({
1097
- key: import_effect7.Schema.String,
1098
- value: import_effect7.Schema.Any
1147
+ props: import_effect8.Schema.optional(import_effect8.Schema.Record({
1148
+ key: import_effect8.Schema.String,
1149
+ value: import_effect8.Schema.Any
1099
1150
  }).annotations({
1100
1151
  description: "Additional props for the popover."
1101
1152
  }))
1102
- })
1153
+ }).pipe(import_effect8.Schema.extend(import_effect8.Schema.Union(import_effect8.Schema.Struct({
1154
+ variant: import_effect8.Schema.Literal("virtual"),
1155
+ anchor: import_effect8.Schema.Any.annotations({
1156
+ description: "The DOM element to anchor the popover to."
1157
+ })
1158
+ }), import_effect8.Schema.Struct({
1159
+ variant: import_effect8.Schema.optional(import_effect8.Schema.Literal("react")),
1160
+ anchorId: import_effect8.Schema.String.annotations({
1161
+ description: "An id that can be used to determine whether to render the anchor subcomponent."
1162
+ })
1163
+ }))))
1103
1164
  }),
1104
- output: import_effect7.Schema.Void
1165
+ output: import_effect8.Schema.Void
1105
1166
  }) {
1106
1167
  }
1107
1168
  LayoutAction2.UpdatePopover = UpdatePopover;
1108
- LayoutAction2.Toast = import_effect7.Schema.Struct({
1109
- id: import_effect7.Schema.String.annotations({
1169
+ LayoutAction2.Toast = import_effect8.Schema.Struct({
1170
+ id: import_effect8.Schema.String.annotations({
1110
1171
  description: "The id of the toast."
1111
1172
  }),
1112
- title: import_effect7.Schema.optional(Label.annotations({
1173
+ title: import_effect8.Schema.optional(Label.annotations({
1113
1174
  description: "The title of the toast."
1114
1175
  })),
1115
- description: import_effect7.Schema.optional(Label.annotations({
1176
+ description: import_effect8.Schema.optional(Label.annotations({
1116
1177
  description: "The description of the toast."
1117
1178
  })),
1118
- icon: import_effect7.Schema.optional(import_effect7.Schema.String.annotations({
1179
+ icon: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
1119
1180
  description: "The icon of the toast."
1120
1181
  })),
1121
- duration: import_effect7.Schema.optional(import_effect7.Schema.Number.annotations({
1182
+ duration: import_effect8.Schema.optional(import_effect8.Schema.Number.annotations({
1122
1183
  description: "The duration of the toast."
1123
1184
  })),
1124
- closeLabel: import_effect7.Schema.optional(Label.annotations({
1185
+ closeLabel: import_effect8.Schema.optional(Label.annotations({
1125
1186
  description: "The label of the close button."
1126
1187
  })),
1127
- actionLabel: import_effect7.Schema.optional(Label.annotations({
1188
+ actionLabel: import_effect8.Schema.optional(Label.annotations({
1128
1189
  description: "The label of the action button."
1129
1190
  })),
1130
- actionAlt: import_effect7.Schema.optional(Label.annotations({
1191
+ actionAlt: import_effect8.Schema.optional(Label.annotations({
1131
1192
  description: "The alt text of the action button."
1132
1193
  })),
1133
- onAction: import_effect7.Schema.optional(import_effect7.Schema.Any.annotations({
1194
+ onAction: import_effect8.Schema.optional(import_effect8.Schema.Any.annotations({
1134
1195
  description: "The action to perform when the action button is clicked."
1135
1196
  }))
1136
1197
  });
1137
- class AddToast extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1138
- input: import_effect7.Schema.Struct({
1139
- part: import_effect7.Schema.Literal("toast").annotations({
1198
+ class AddToast extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1199
+ input: import_effect8.Schema.Struct({
1200
+ part: import_effect8.Schema.Literal("toast").annotations({
1140
1201
  description: "Adding a toast."
1141
1202
  }),
1142
1203
  subject: LayoutAction2.Toast.annotations({
1143
1204
  description: "The toast to add."
1144
1205
  })
1145
1206
  }),
1146
- output: import_effect7.Schema.Void
1207
+ output: import_effect8.Schema.Void
1147
1208
  }) {
1148
1209
  }
1149
1210
  LayoutAction2.AddToast = AddToast;
1150
- class SwitchWorkspace extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1151
- input: import_effect7.Schema.Struct({
1152
- part: import_effect7.Schema.Literal("workspace").annotations({
1211
+ class SwitchWorkspace extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1212
+ input: import_effect8.Schema.Struct({
1213
+ part: import_effect8.Schema.Literal("workspace").annotations({
1153
1214
  description: "Switching the workspace."
1154
1215
  }),
1155
- subject: import_effect7.Schema.String.annotations({
1216
+ subject: import_effect8.Schema.String.annotations({
1156
1217
  description: "The id of the workspace to switch to."
1157
1218
  })
1158
1219
  }),
1159
- output: import_effect7.Schema.Void
1220
+ output: import_effect8.Schema.Void
1160
1221
  }) {
1161
1222
  }
1162
1223
  LayoutAction2.SwitchWorkspace = SwitchWorkspace;
1163
- class RevertWorkspace extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1164
- input: import_effect7.Schema.Struct({
1165
- part: import_effect7.Schema.Literal("workspace").annotations({
1224
+ class RevertWorkspace extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1225
+ input: import_effect8.Schema.Struct({
1226
+ part: import_effect8.Schema.Literal("workspace").annotations({
1166
1227
  description: "Switching the workspace."
1167
1228
  }),
1168
- options: import_effect7.Schema.Struct({
1169
- revert: import_effect7.Schema.Literal(true).annotations({
1229
+ options: import_effect8.Schema.Struct({
1230
+ revert: import_effect8.Schema.Literal(true).annotations({
1170
1231
  description: "Revert to the previous workspace."
1171
1232
  })
1172
1233
  })
1173
1234
  }),
1174
- output: import_effect7.Schema.Void
1235
+ output: import_effect8.Schema.Void
1175
1236
  }) {
1176
1237
  }
1177
1238
  LayoutAction2.RevertWorkspace = RevertWorkspace;
1178
- class Open extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1179
- input: import_effect7.Schema.Struct({
1180
- part: import_effect7.Schema.Literal("main").annotations({
1239
+ class Open extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1240
+ input: import_effect8.Schema.Struct({
1241
+ part: import_effect8.Schema.Literal("main").annotations({
1181
1242
  description: "Opening an item in the main content area."
1182
1243
  }),
1183
- subject: import_effect7.Schema.Array(import_effect7.Schema.String.annotations({
1244
+ subject: import_effect8.Schema.Array(import_effect8.Schema.String.annotations({
1184
1245
  description: "Ids of the items to open."
1185
1246
  })),
1186
- options: import_effect7.Schema.optional(import_effect7.Schema.Struct({
1187
- state: import_effect7.Schema.optional(import_effect7.Schema.Literal(true).annotations({
1247
+ options: import_effect8.Schema.optional(import_effect8.Schema.Struct({
1248
+ state: import_effect8.Schema.optional(import_effect8.Schema.Literal(true).annotations({
1188
1249
  description: "The items are being added."
1189
1250
  })),
1190
- variant: import_effect7.Schema.optional(import_effect7.Schema.String.annotations({
1251
+ variant: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
1191
1252
  description: "The variant of the item to open."
1192
1253
  })),
1193
- key: import_effect7.Schema.optional(import_effect7.Schema.String.annotations({
1254
+ key: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
1194
1255
  description: "If provided, will replace item with a matching key (id prefix)."
1195
1256
  })),
1196
- scrollIntoView: import_effect7.Schema.optional(import_effect7.Schema.Boolean.annotations({
1257
+ workspace: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
1258
+ description: "The workspace to open the items in."
1259
+ })),
1260
+ scrollIntoView: import_effect8.Schema.optional(import_effect8.Schema.Boolean.annotations({
1197
1261
  description: "Scroll the items into view."
1198
1262
  })),
1199
- pivotId: import_effect7.Schema.optional(import_effect7.Schema.String.annotations({
1263
+ pivotId: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
1200
1264
  description: "The id of the item to place new items next to."
1201
1265
  })),
1202
- positioning: import_effect7.Schema.optional(import_effect7.Schema.Union(import_effect7.Schema.Literal("start").annotations({
1266
+ positioning: import_effect8.Schema.optional(import_effect8.Schema.Union(import_effect8.Schema.Literal("start").annotations({
1203
1267
  description: "The items are being added before the pivot item."
1204
- }), import_effect7.Schema.Literal("end").annotations({
1268
+ }), import_effect8.Schema.Literal("end").annotations({
1205
1269
  description: "The items are being added after the pivot item."
1206
1270
  })))
1207
1271
  }))
1208
1272
  }),
1209
- output: import_effect7.Schema.Void
1273
+ output: import_effect8.Schema.Void
1210
1274
  }) {
1211
1275
  }
1212
1276
  LayoutAction2.Open = Open;
1213
- class Set2 extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1214
- input: import_effect7.Schema.Struct({
1215
- part: import_effect7.Schema.Literal("main").annotations({
1277
+ class Set2 extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1278
+ input: import_effect8.Schema.Struct({
1279
+ part: import_effect8.Schema.Literal("main").annotations({
1216
1280
  description: "Setting items in the main content area."
1217
1281
  }),
1218
- subject: import_effect7.Schema.Array(import_effect7.Schema.String.annotations({
1282
+ subject: import_effect8.Schema.Array(import_effect8.Schema.String.annotations({
1219
1283
  description: "Ids of the items to set."
1220
1284
  })),
1221
- options: import_effect7.Schema.Struct({
1222
- override: import_effect7.Schema.Literal(true).annotations({
1285
+ options: import_effect8.Schema.Struct({
1286
+ override: import_effect8.Schema.Literal(true).annotations({
1223
1287
  description: "Override the current items in the main content area."
1224
1288
  })
1225
1289
  })
1226
1290
  }),
1227
- output: import_effect7.Schema.Void
1291
+ output: import_effect8.Schema.Void
1228
1292
  }) {
1229
1293
  }
1230
1294
  LayoutAction2.Set = Set2;
1231
- class Close extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1232
- input: import_effect7.Schema.Struct({
1233
- part: import_effect7.Schema.Literal("main").annotations({
1295
+ class Close extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1296
+ input: import_effect8.Schema.Struct({
1297
+ part: import_effect8.Schema.Literal("main").annotations({
1234
1298
  description: "Closing items in the main content area."
1235
1299
  }),
1236
- subject: import_effect7.Schema.Array(import_effect7.Schema.String.annotations({
1300
+ subject: import_effect8.Schema.Array(import_effect8.Schema.String.annotations({
1237
1301
  description: "Ids of the items to close."
1238
1302
  })),
1239
- options: import_effect7.Schema.Struct({
1240
- state: import_effect7.Schema.Literal(false).annotations({
1303
+ options: import_effect8.Schema.Struct({
1304
+ state: import_effect8.Schema.Literal(false).annotations({
1241
1305
  description: "The items are being removed."
1242
1306
  })
1243
1307
  })
1244
1308
  }),
1245
- output: import_effect7.Schema.Void
1309
+ output: import_effect8.Schema.Void
1246
1310
  }) {
1247
1311
  }
1248
1312
  LayoutAction2.Close = Close;
1249
- class ScrollIntoView extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1250
- input: import_effect7.Schema.Struct({
1251
- part: import_effect7.Schema.Literal("current").annotations({
1313
+ class ScrollIntoView extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1314
+ input: import_effect8.Schema.Struct({
1315
+ part: import_effect8.Schema.Literal("current").annotations({
1252
1316
  description: "Setting the current item"
1253
1317
  }),
1254
- subject: import_effect7.Schema.optional(import_effect7.Schema.String.annotations({
1318
+ subject: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
1255
1319
  description: "The id of the item to set as current."
1256
1320
  })),
1257
- options: import_effect7.Schema.optional(import_effect7.Schema.Record({
1258
- key: import_effect7.Schema.String,
1259
- value: import_effect7.Schema.Any
1321
+ options: import_effect8.Schema.optional(import_effect8.Schema.Record({
1322
+ key: import_effect8.Schema.String,
1323
+ value: import_effect8.Schema.Any
1260
1324
  }).annotations({
1261
1325
  description: "Additional options for the scroll into view."
1262
1326
  }))
1263
1327
  }),
1264
- output: import_effect7.Schema.Void
1328
+ output: import_effect8.Schema.Void
1265
1329
  }) {
1266
1330
  }
1267
1331
  LayoutAction2.ScrollIntoView = ScrollIntoView;
1268
- class Expose extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1269
- input: import_effect7.Schema.Struct({
1270
- part: import_effect7.Schema.Literal("navigation").annotations({
1332
+ class Expose extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1333
+ input: import_effect8.Schema.Struct({
1334
+ part: import_effect8.Schema.Literal("navigation").annotations({
1271
1335
  description: "Exposing an item in the navigation area."
1272
1336
  }),
1273
- subject: import_effect7.Schema.String.annotations({
1337
+ subject: import_effect8.Schema.String.annotations({
1274
1338
  description: "The id of the item to expose."
1275
1339
  })
1276
1340
  }),
1277
- output: import_effect7.Schema.Void
1341
+ output: import_effect8.Schema.Void
1278
1342
  }) {
1279
1343
  }
1280
1344
  LayoutAction2.Expose = Expose;
1281
1345
  })(LayoutAction || (LayoutAction = {}));
1346
+ var LayoutAction;
1282
1347
  var createSurface = (definition) => definition;
1283
- var ResourceKey = import_effect8.Schema.Union(import_effect8.Schema.String, import_effect8.Schema.Record({
1284
- key: import_effect8.Schema.String,
1285
- value: import_effect8.Schema.Any
1348
+ var ResourceKey = import_effect9.Schema.Union(import_effect9.Schema.String, import_effect9.Schema.Record({
1349
+ key: import_effect9.Schema.String,
1350
+ value: import_effect9.Schema.Any
1286
1351
  }));
1287
- var ResourceLanguage = import_effect8.Schema.Record({
1288
- key: import_effect8.Schema.String,
1352
+ var ResourceLanguage = import_effect9.Schema.Record({
1353
+ key: import_effect9.Schema.String,
1289
1354
  value: ResourceKey
1290
1355
  });
1291
- var Resource = import_effect8.Schema.Record({
1292
- key: import_effect8.Schema.String,
1356
+ var Resource = import_effect9.Schema.Record({
1357
+ key: import_effect9.Schema.String,
1293
1358
  value: ResourceLanguage
1294
1359
  });
1295
1360
  var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/plugin-intent/intent-dispatcher.ts";
@@ -1300,12 +1365,12 @@ var isUndoable = (historyEntry) => historyEntry.length > 0 && historyEntry.every
1300
1365
  var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, historyLimit = HISTORY_LIMIT } = {}) => {
1301
1366
  const historyRef = import_effect.Effect.runSync(import_effect.Ref.make([]));
1302
1367
  const handleIntent = (intent) => import_effect.Effect.gen(function* () {
1303
- const candidates = getResolvers(intent.module).filter((resolver) => resolver.intent._tag === intent.id).filter((resolver) => !resolver.filter || resolver.filter(intent.data)).toSorted(import_util.byPosition);
1368
+ const candidates = getResolvers().filter((resolver) => resolver.intent._tag === intent.id).filter((resolver) => !resolver.filter || resolver.filter(intent.data)).toSorted(import_util.byPosition);
1304
1369
  if (candidates.length === 0) {
1305
1370
  yield* import_effect.Effect.fail(new NoResolversError(intent.id));
1306
1371
  }
1307
- const effect2 = candidates[0].resolve(intent.data, intent.undo ?? false);
1308
- const result = import_effect.Effect.isEffect(effect2) ? yield* effect2 : yield* import_effect.Effect.promise(async () => effect2);
1372
+ const effect = candidates[0].resolve(intent.data, intent.undo ?? false);
1373
+ const result = import_effect.Effect.isEffect(effect) ? yield* effect : yield* import_effect.Effect.promise(async () => effect);
1309
1374
  return {
1310
1375
  _intent: intent,
1311
1376
  ...result
@@ -1365,7 +1430,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1365
1430
  })).catch((error) => {
1366
1431
  import_log.log.catch(error, void 0, {
1367
1432
  F: __dxlog_file3,
1368
- L: 254,
1433
+ L: 270,
1369
1434
  S: void 0,
1370
1435
  C: (f, a) => f(...a)
1371
1436
  });
@@ -1419,16 +1484,14 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1419
1484
  var defaultEffect = () => import_effect.Effect.fail(new Error("Intent runtime not ready"));
1420
1485
  var defaultPromise = () => import_effect.Effect.runPromise(defaultEffect());
1421
1486
  var intent_dispatcher_default = (context) => {
1422
- const state = (0, import_live_object.create)({
1487
+ const state = (0, import_live_object.live)({
1423
1488
  dispatch: defaultEffect,
1424
1489
  dispatchPromise: defaultPromise,
1425
1490
  undo: defaultEffect,
1426
1491
  undoPromise: defaultPromise
1427
1492
  });
1428
- const { dispatch, dispatchPromise, undo, undoPromise } = createDispatcher((module2) => context.requestCapabilities(Capabilities.IntentResolver, (c, moduleId) => {
1429
- return module2 ? moduleId === module2 : true;
1430
- }).flat());
1431
- const manager = context.requestCapability(Capabilities.PluginManager);
1493
+ const { dispatch, dispatchPromise, undo, undoPromise } = createDispatcher(() => context.getCapabilities(Capabilities.IntentResolver).flat());
1494
+ const manager = context.getCapability(Capabilities.PluginManager);
1432
1495
  state.dispatch = (intentChain, depth) => {
1433
1496
  return import_effect.Effect.gen(function* () {
1434
1497
  yield* manager._activate(Events.SetupIntentResolver);
@@ -1446,6 +1509,7 @@ var intent_dispatcher_default = (context) => {
1446
1509
  // Annotate the CommonJS export names for ESM import in node:
1447
1510
  0 && (module.exports = {
1448
1511
  Capabilities,
1512
+ CollaborationActions,
1449
1513
  Events,
1450
1514
  FileInfoSchema,
1451
1515
  INTENT_ACTION,
@@ -1457,9 +1521,9 @@ var intent_dispatcher_default = (context) => {
1457
1521
  Label,
1458
1522
  LayoutAction,
1459
1523
  Plugin,
1524
+ PluginContext,
1460
1525
  PluginManager,
1461
1526
  PluginModule,
1462
- PluginsContext,
1463
1527
  Resource,
1464
1528
  ResourceKey,
1465
1529
  ResourceLanguage,
@@ -1483,4 +1547,4 @@ var intent_dispatcher_default = (context) => {
1483
1547
  lazy,
1484
1548
  oneOf
1485
1549
  });
1486
- //# sourceMappingURL=chunk-YIFTVCOR.cjs.map
1550
+ //# sourceMappingURL=chunk-HIVITTZD.cjs.map