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

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 (326) hide show
  1. package/dist/lib/browser/{app-graph-builder-6E7NCZ77.mjs → app-graph-builder-576BHZC7.mjs} +23 -23
  2. package/dist/lib/browser/app-graph-builder-576BHZC7.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-2KSDY3EZ.mjs → chunk-6AVTZPMT.mjs} +267 -325
  4. package/dist/lib/browser/chunk-6AVTZPMT.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-K3HOLGVH.mjs → chunk-PPIBZ5N4.mjs} +28 -40
  6. package/dist/lib/browser/chunk-PPIBZ5N4.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-KPRHX73H.mjs → chunk-SFPT4Z2C.mjs} +9 -9
  8. package/dist/lib/browser/chunk-SFPT4Z2C.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +8 -10
  10. package/dist/lib/browser/index.mjs.map +1 -1
  11. package/dist/lib/browser/{intent-dispatcher-VGUJBPPN.mjs → intent-dispatcher-3Q67MHZZ.mjs} +2 -2
  12. package/dist/lib/browser/{intent-resolver-QLFZY5R5.mjs → intent-resolver-O763LCLG.mjs} +3 -3
  13. package/dist/lib/browser/meta.json +1 -1
  14. package/dist/lib/browser/{store-QGVXOY4T.mjs → store-URSN7DZI.mjs} +6 -7
  15. package/dist/lib/browser/store-URSN7DZI.mjs.map +7 -0
  16. package/dist/lib/browser/testing/index.mjs +3 -7
  17. package/dist/lib/browser/testing/index.mjs.map +3 -3
  18. package/dist/lib/browser/worker.mjs +3 -5
  19. package/dist/lib/node/app-graph-builder-JZCSKYPY.cjs +146 -0
  20. package/dist/lib/node/app-graph-builder-JZCSKYPY.cjs.map +7 -0
  21. package/dist/lib/node/{chunk-JQMNABMK.cjs → chunk-JUSEAFDU.cjs} +4 -4
  22. package/dist/lib/node/chunk-JUSEAFDU.cjs.map +7 -0
  23. package/dist/lib/node/{chunk-2EBZ2ICH.cjs → chunk-YIFTVCOR.cjs} +247 -304
  24. package/dist/lib/node/chunk-YIFTVCOR.cjs.map +7 -0
  25. package/dist/lib/node/{chunk-7J66KH2T.cjs → chunk-YNTKVTVX.cjs} +67 -79
  26. package/dist/lib/node/chunk-YNTKVTVX.cjs.map +7 -0
  27. package/dist/lib/node/index.cjs +79 -81
  28. package/dist/lib/node/index.cjs.map +1 -1
  29. package/dist/lib/node/{intent-dispatcher-TASJBG5M.cjs → intent-dispatcher-H334XLFD.cjs} +8 -8
  30. package/dist/lib/node/{intent-dispatcher-TASJBG5M.cjs.map → intent-dispatcher-H334XLFD.cjs.map} +2 -2
  31. package/dist/lib/node/{intent-resolver-5CG5NIJY.cjs → intent-resolver-3F4POWAM.cjs} +12 -12
  32. package/dist/lib/node/meta.json +1 -1
  33. package/dist/lib/node/{store-IF3UR2KA.cjs → store-OFDHTDCB.cjs} +9 -10
  34. package/dist/lib/node/store-OFDHTDCB.cjs.map +7 -0
  35. package/dist/lib/node/testing/index.cjs +9 -14
  36. package/dist/lib/node/testing/index.cjs.map +3 -3
  37. package/dist/lib/node/worker.cjs +38 -40
  38. package/dist/lib/node/worker.cjs.map +2 -2
  39. package/dist/lib/node-esm/{app-graph-builder-LYCG5CO3.mjs → app-graph-builder-VYKLSMSZ.mjs} +23 -23
  40. package/dist/lib/node-esm/app-graph-builder-VYKLSMSZ.mjs.map +7 -0
  41. package/dist/lib/node-esm/{chunk-BOEJMAVK.mjs → chunk-AHKIPS2L.mjs} +267 -325
  42. package/dist/lib/node-esm/chunk-AHKIPS2L.mjs.map +7 -0
  43. package/dist/lib/node-esm/{chunk-JUJF5L4G.mjs → chunk-PHOUQACM.mjs} +9 -9
  44. package/dist/lib/node-esm/chunk-PHOUQACM.mjs.map +7 -0
  45. package/dist/lib/node-esm/{chunk-ISNBS46Y.mjs → chunk-R6A7Z4LU.mjs} +28 -40
  46. package/dist/lib/node-esm/chunk-R6A7Z4LU.mjs.map +7 -0
  47. package/dist/lib/node-esm/index.mjs +8 -10
  48. package/dist/lib/node-esm/index.mjs.map +1 -1
  49. package/dist/lib/node-esm/{intent-dispatcher-ZUSNX2OY.mjs → intent-dispatcher-YDE2ONZA.mjs} +2 -2
  50. package/dist/lib/node-esm/{intent-resolver-NGDHUKDD.mjs → intent-resolver-LAGJ7LXM.mjs} +3 -3
  51. package/dist/lib/node-esm/meta.json +1 -1
  52. package/dist/lib/node-esm/{store-NCRSE25X.mjs → store-EYSUVNCS.mjs} +6 -7
  53. package/dist/lib/node-esm/store-EYSUVNCS.mjs.map +7 -0
  54. package/dist/lib/node-esm/testing/index.mjs +3 -7
  55. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  56. package/dist/lib/node-esm/worker.mjs +3 -5
  57. package/dist/types/src/App.d.ts +1 -3
  58. package/dist/types/src/App.d.ts.map +1 -1
  59. package/dist/types/src/common/capabilities.d.ts +196 -6
  60. package/dist/types/src/common/capabilities.d.ts.map +1 -1
  61. package/dist/types/src/common/events.d.ts.map +1 -1
  62. package/dist/types/src/common/file.d.ts +7 -7
  63. package/dist/types/src/common/file.d.ts.map +1 -1
  64. package/dist/types/src/common/index.d.ts +0 -1
  65. package/dist/types/src/common/index.d.ts.map +1 -1
  66. package/dist/types/src/common/layout.d.ts +158 -164
  67. package/dist/types/src/common/layout.d.ts.map +1 -1
  68. package/dist/types/src/common/surface.d.ts.map +1 -1
  69. package/dist/types/src/common/translations.d.ts +7 -7
  70. package/dist/types/src/common/translations.d.ts.map +1 -1
  71. package/dist/types/src/core/capabilities.d.ts +15 -33
  72. package/dist/types/src/core/capabilities.d.ts.map +1 -1
  73. package/dist/types/src/core/events.d.ts +1 -4
  74. package/dist/types/src/core/events.d.ts.map +1 -1
  75. package/dist/types/src/core/manager.d.ts +11 -14
  76. package/dist/types/src/core/manager.d.ts.map +1 -1
  77. package/dist/types/src/core/plugin.d.ts +3 -4
  78. package/dist/types/src/core/plugin.d.ts.map +1 -1
  79. package/dist/types/src/helpers.d.ts.map +1 -1
  80. package/dist/types/src/playground/generator/generator.d.ts.map +1 -1
  81. package/dist/types/src/playground/logger/schema.d.ts +6 -6
  82. package/dist/types/src/playground/logger/schema.d.ts.map +1 -1
  83. package/dist/types/src/plugin-intent/actions.d.ts +14 -14
  84. package/dist/types/src/plugin-intent/actions.d.ts.map +1 -1
  85. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +3 -29
  86. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -1
  87. package/dist/types/src/plugin-intent/intent.d.ts +20 -14
  88. package/dist/types/src/plugin-intent/intent.d.ts.map +1 -1
  89. package/dist/types/src/plugin-settings/actions.d.ts +10 -10
  90. package/dist/types/src/plugin-settings/actions.d.ts.map +1 -1
  91. package/dist/types/src/plugin-settings/app-graph-builder.d.ts +195 -2
  92. package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +1 -1
  93. package/dist/types/src/plugin-settings/store.d.ts +2 -2
  94. package/dist/types/src/plugin-settings/store.d.ts.map +1 -1
  95. package/dist/types/src/react/IntentContext.d.ts.map +1 -1
  96. package/dist/types/src/react/Surface.d.ts +2 -2
  97. package/dist/types/src/react/Surface.d.ts.map +1 -1
  98. package/dist/types/src/react/useCapabilities.d.ts +2 -2
  99. package/dist/types/src/react/useCapabilities.d.ts.map +1 -1
  100. package/dist/types/src/react/useIntentResolver.d.ts.map +1 -1
  101. package/dist/types/src/testing/withPluginManager.d.ts +2 -5
  102. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
  103. package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
  104. package/dist/types/tsconfig.tsbuildinfo +1 -1
  105. package/package.json +20 -29
  106. package/project.json +1 -2
  107. package/src/App.tsx +4 -16
  108. package/src/common/capabilities.ts +4 -7
  109. package/src/common/file.ts +7 -7
  110. package/src/common/index.ts +0 -1
  111. package/src/common/layout.ts +128 -159
  112. package/src/common/translations.ts +7 -7
  113. package/src/core/capabilities.test.ts +36 -55
  114. package/src/core/capabilities.ts +58 -82
  115. package/src/core/events.ts +1 -4
  116. package/src/core/manager.test.ts +22 -22
  117. package/src/core/manager.ts +16 -24
  118. package/src/core/plugin.ts +3 -4
  119. package/src/playground/generator/generator.ts +4 -4
  120. package/src/playground/logger/schema.ts +5 -5
  121. package/src/playground/playground.stories.tsx +1 -1
  122. package/src/plugin-intent/actions.ts +9 -9
  123. package/src/plugin-intent/intent-dispatcher.test.ts +42 -23
  124. package/src/plugin-intent/intent-dispatcher.ts +13 -25
  125. package/src/plugin-intent/intent.ts +20 -22
  126. package/src/plugin-settings/actions.ts +8 -8
  127. package/src/plugin-settings/app-graph-builder.ts +94 -129
  128. package/src/plugin-settings/store.ts +17 -20
  129. package/src/react/Surface.stories.tsx +1 -1
  130. package/src/react/Surface.tsx +3 -3
  131. package/src/react/useCapabilities.ts +19 -9
  132. package/src/testing/withPluginManager.stories.tsx +1 -0
  133. package/src/testing/withPluginManager.tsx +3 -11
  134. package/tsconfig.json +0 -3
  135. package/dist/lib/browser/app-graph-builder-6E7NCZ77.mjs.map +0 -7
  136. package/dist/lib/browser/chunk-2KSDY3EZ.mjs.map +0 -7
  137. package/dist/lib/browser/chunk-K3HOLGVH.mjs.map +0 -7
  138. package/dist/lib/browser/chunk-KPRHX73H.mjs.map +0 -7
  139. package/dist/lib/browser/store-QGVXOY4T.mjs.map +0 -7
  140. package/dist/lib/node/app-graph-builder-4IWMG67O.cjs +0 -146
  141. package/dist/lib/node/app-graph-builder-4IWMG67O.cjs.map +0 -7
  142. package/dist/lib/node/chunk-2EBZ2ICH.cjs.map +0 -7
  143. package/dist/lib/node/chunk-7J66KH2T.cjs.map +0 -7
  144. package/dist/lib/node/chunk-JQMNABMK.cjs.map +0 -7
  145. package/dist/lib/node/store-IF3UR2KA.cjs.map +0 -7
  146. package/dist/lib/node-esm/app-graph-builder-LYCG5CO3.mjs.map +0 -7
  147. package/dist/lib/node-esm/chunk-BOEJMAVK.mjs.map +0 -7
  148. package/dist/lib/node-esm/chunk-ISNBS46Y.mjs.map +0 -7
  149. package/dist/lib/node-esm/chunk-JUJF5L4G.mjs.map +0 -7
  150. package/dist/lib/node-esm/store-NCRSE25X.mjs.map +0 -7
  151. package/dist/types/src/common/collaboration.d.ts +0 -26
  152. package/dist/types/src/common/collaboration.d.ts.map +0 -1
  153. package/src/common/collaboration.ts +0 -24
  154. package/typedoc/.nojekyll +0 -1
  155. package/typedoc/assets/hierarchy.js +0 -1
  156. package/typedoc/assets/highlight.css +0 -106
  157. package/typedoc/assets/icons.js +0 -18
  158. package/typedoc/assets/icons.svg +0 -1
  159. package/typedoc/assets/main.js +0 -60
  160. package/typedoc/assets/navigation.js +0 -1
  161. package/typedoc/assets/search.js +0 -1
  162. package/typedoc/assets/style.css +0 -1640
  163. package/typedoc/classes/CollaborationActions.InsertContent.html +0 -460
  164. package/typedoc/classes/ErrorBoundary.html +0 -125
  165. package/typedoc/classes/IntentAction.ShowUndo.html +0 -227
  166. package/typedoc/classes/IntentAction.Track.html +0 -266
  167. package/typedoc/classes/LayoutAction.AddToast.html +0 -265
  168. package/typedoc/classes/LayoutAction.Close.html +0 -382
  169. package/typedoc/classes/LayoutAction.Expose.html +0 -265
  170. package/typedoc/classes/LayoutAction.Open.html +0 -1123
  171. package/typedoc/classes/LayoutAction.RevertWorkspace.html +0 -343
  172. package/typedoc/classes/LayoutAction.ScrollIntoView.html +0 -460
  173. package/typedoc/classes/LayoutAction.Set.html +0 -460
  174. package/typedoc/classes/LayoutAction.SetLayoutMode.html +0 -499
  175. package/typedoc/classes/LayoutAction.SwitchWorkspace.html +0 -265
  176. package/typedoc/classes/LayoutAction.UpdateComplementary.html +0 -616
  177. package/typedoc/classes/LayoutAction.UpdateDialog.html +0 -811
  178. package/typedoc/classes/LayoutAction.UpdateLayout.html +0 -461
  179. package/typedoc/classes/LayoutAction.UpdatePopover.html +0 -1435
  180. package/typedoc/classes/LayoutAction.UpdateSidebar.html +0 -616
  181. package/typedoc/classes/Plugin.html +0 -6
  182. package/typedoc/classes/PluginContext.html +0 -38
  183. package/typedoc/classes/PluginManager.html +0 -43
  184. package/typedoc/classes/PluginModule.html +0 -18
  185. package/typedoc/classes/SettingsAction.Open.html +0 -226
  186. package/typedoc/classes/SettingsAction.OpenPluginRegistry.html +0 -265
  187. package/typedoc/functions/Events.createStateEvent.html +0 -2
  188. package/typedoc/functions/IntentPlugin.html +0 -1
  189. package/typedoc/functions/SettingsPlugin.html +0 -1
  190. package/typedoc/functions/allOf.html +0 -2
  191. package/typedoc/functions/chain.html +0 -3
  192. package/typedoc/functions/contributes.html +0 -2
  193. package/typedoc/functions/createApp.html +0 -6
  194. package/typedoc/functions/createDispatcher.html +0 -3
  195. package/typedoc/functions/createIntent.html +0 -6
  196. package/typedoc/functions/createResolver.html +0 -2
  197. package/typedoc/functions/createSurface.html +0 -2
  198. package/typedoc/functions/defineCapability.html +0 -2
  199. package/typedoc/functions/defineEvent.html +0 -2
  200. package/typedoc/functions/defineModule.html +0 -2
  201. package/typedoc/functions/definePlugin.html +0 -2
  202. package/typedoc/functions/eventKey.html +0 -2
  203. package/typedoc/functions/getEvents.html +0 -2
  204. package/typedoc/functions/isAllOf.html +0 -2
  205. package/typedoc/functions/isOneOf.html +0 -2
  206. package/typedoc/functions/isSurfaceAvailable.html +0 -2
  207. package/typedoc/functions/lazy.html +0 -2
  208. package/typedoc/functions/oneOf.html +0 -2
  209. package/typedoc/functions/useAppGraph.html +0 -1
  210. package/typedoc/functions/useCapabilities.html +0 -3
  211. package/typedoc/functions/useCapability.html +0 -4
  212. package/typedoc/functions/useIntentDispatcher.html +0 -1
  213. package/typedoc/functions/useIntentResolver.html +0 -1
  214. package/typedoc/functions/useLayout.html +0 -1
  215. package/typedoc/functions/usePluginManager.html +0 -2
  216. package/typedoc/hierarchy.html +0 -1
  217. package/typedoc/index.html +0 -16
  218. package/typedoc/interfaces/LayoutAction.Toast.html +0 -10
  219. package/typedoc/media/LICENSE +0 -8
  220. package/typedoc/modules/Capabilities.html +0 -1
  221. package/typedoc/modules/CollaborationActions.html +0 -1
  222. package/typedoc/modules/Events.html +0 -1
  223. package/typedoc/modules/IntentAction.html +0 -1
  224. package/typedoc/modules/LayoutAction.html +0 -2
  225. package/typedoc/modules/SettingsAction.html +0 -1
  226. package/typedoc/modules.html +0 -1
  227. package/typedoc/types/ActivationEvent.html +0 -8
  228. package/typedoc/types/ActivationEvents.html +0 -2
  229. package/typedoc/types/AnyCapability.html +0 -1
  230. package/typedoc/types/AnyIntent.html +0 -1
  231. package/typedoc/types/AnyIntentChain.html +0 -1
  232. package/typedoc/types/AnyIntentEffectResult.html +0 -1
  233. package/typedoc/types/AnyIntentResolver.html +0 -1
  234. package/typedoc/types/AnyIntentResult.html +0 -1
  235. package/typedoc/types/Capabilities.FileUploader.html +0 -1
  236. package/typedoc/types/Capabilities.IntentResolver.html +0 -1
  237. package/typedoc/types/Capabilities.Layout.html +0 -1
  238. package/typedoc/types/Capabilities.Metadata.html +0 -1
  239. package/typedoc/types/Capabilities.ReactContext.html +0 -1
  240. package/typedoc/types/Capabilities.ReactRoot.html +0 -1
  241. package/typedoc/types/Capabilities.ReactSurface.html +0 -1
  242. package/typedoc/types/Capabilities.Settings.html +0 -4
  243. package/typedoc/types/Capability.html +0 -9
  244. package/typedoc/types/CreateAppOptions.html +0 -10
  245. package/typedoc/types/FileInfo.html +0 -1
  246. package/typedoc/types/Intent.html +0 -10
  247. package/typedoc/types/IntentChain.html +0 -6
  248. package/typedoc/types/IntentContext.html +0 -5
  249. package/typedoc/types/IntentData.html +0 -1
  250. package/typedoc/types/IntentDispatcher.html +0 -2
  251. package/typedoc/types/IntentDispatcherResult.html +0 -2
  252. package/typedoc/types/IntentEffectDefinition.html +0 -2
  253. package/typedoc/types/IntentEffectResult.html +0 -15
  254. package/typedoc/types/IntentParams.html +0 -3
  255. package/typedoc/types/IntentResolver.html +0 -2
  256. package/typedoc/types/IntentResultData.html +0 -1
  257. package/typedoc/types/IntentSchema.html +0 -1
  258. package/typedoc/types/IntentUndo.html +0 -2
  259. package/typedoc/types/InterfaceDef.html +0 -4
  260. package/typedoc/types/Label.html +0 -1
  261. package/typedoc/types/NodeSerializer.html +0 -8
  262. package/typedoc/types/PluginManagerOptions.html +0 -6
  263. package/typedoc/types/PluginMeta.html +0 -21
  264. package/typedoc/types/PromiseIntentDispatcher.html +0 -2
  265. package/typedoc/types/PromiseIntentUndo.html +0 -2
  266. package/typedoc/types/Resource.html +0 -1
  267. package/typedoc/types/ResourceKey.html +0 -1
  268. package/typedoc/types/ResourceLanguage.html +0 -1
  269. package/typedoc/types/SerializedNode.html +0 -4
  270. package/typedoc/types/SurfaceComponent.html +0 -2
  271. package/typedoc/types/SurfaceDefinition.html +0 -2
  272. package/typedoc/types/SurfaceProps.html +0 -4
  273. package/typedoc/variables/Capabilities.AppGraph.html +0 -1
  274. package/typedoc/variables/Capabilities.AppGraphBuilder.html +0 -1
  275. package/typedoc/variables/Capabilities.AppGraphSerializer.html +0 -1
  276. package/typedoc/variables/Capabilities.ArtifactDefinition.html +0 -1
  277. package/typedoc/variables/Capabilities.FileUploader.html +0 -1
  278. package/typedoc/variables/Capabilities.IntentDispatcher.html +0 -1
  279. package/typedoc/variables/Capabilities.IntentResolver.html +0 -1
  280. package/typedoc/variables/Capabilities.Layout.html +0 -1
  281. package/typedoc/variables/Capabilities.Metadata.html +0 -1
  282. package/typedoc/variables/Capabilities.Null.html +0 -1
  283. package/typedoc/variables/Capabilities.PluginManager.html +0 -1
  284. package/typedoc/variables/Capabilities.ReactContext.html +0 -1
  285. package/typedoc/variables/Capabilities.ReactRoot.html +0 -1
  286. package/typedoc/variables/Capabilities.ReactSurface.html +0 -1
  287. package/typedoc/variables/Capabilities.RxRegistry.html +0 -1
  288. package/typedoc/variables/Capabilities.Settings.html +0 -1
  289. package/typedoc/variables/Capabilities.SettingsStore.html +0 -1
  290. package/typedoc/variables/Capabilities.Tools.html +0 -1
  291. package/typedoc/variables/Capabilities.Translations.html +0 -1
  292. package/typedoc/variables/Events.AppGraphReady.html +0 -2
  293. package/typedoc/variables/Events.DispatcherReady.html +0 -2
  294. package/typedoc/variables/Events.LayoutReady.html +0 -1
  295. package/typedoc/variables/Events.SettingsReady.html +0 -2
  296. package/typedoc/variables/Events.SetupAppGraph.html +0 -2
  297. package/typedoc/variables/Events.SetupArtifactDefinition.html +0 -2
  298. package/typedoc/variables/Events.SetupIntentResolver.html +0 -2
  299. package/typedoc/variables/Events.SetupMetadata.html +0 -2
  300. package/typedoc/variables/Events.SetupReactSurface.html +0 -2
  301. package/typedoc/variables/Events.SetupSettings.html +0 -2
  302. package/typedoc/variables/Events.SetupTranslations.html +0 -2
  303. package/typedoc/variables/Events.Startup.html +0 -2
  304. package/typedoc/variables/FileInfoSchema.html +0 -1
  305. package/typedoc/variables/INTENT_ACTION.html +0 -1
  306. package/typedoc/variables/INTENT_PLUGIN.html +0 -1
  307. package/typedoc/variables/LAYOUT_ACTION.html +0 -1
  308. package/typedoc/variables/LAYOUT_PLUGIN.html +0 -1
  309. package/typedoc/variables/Label.html +0 -1
  310. package/typedoc/variables/LayoutAction.Toast.html +0 -1
  311. package/typedoc/variables/LayoutAction.UPDATE_LAYOUT.html +0 -1
  312. package/typedoc/variables/PluginManagerProvider.html +0 -2
  313. package/typedoc/variables/Resource.html +0 -2
  314. package/typedoc/variables/ResourceKey.html +0 -1
  315. package/typedoc/variables/ResourceLanguage.html +0 -1
  316. package/typedoc/variables/SETTINGS_ACTION.html +0 -1
  317. package/typedoc/variables/SETTINGS_ID.html +0 -1
  318. package/typedoc/variables/SETTINGS_KEY.html +0 -1
  319. package/typedoc/variables/SETTINGS_PLUGIN.html +0 -1
  320. package/typedoc/variables/Surface.html +0 -2
  321. package/typedoc/variables/defaultFileTypes.html +0 -1
  322. /package/dist/lib/browser/{intent-dispatcher-VGUJBPPN.mjs.map → intent-dispatcher-3Q67MHZZ.mjs.map} +0 -0
  323. /package/dist/lib/browser/{intent-resolver-QLFZY5R5.mjs.map → intent-resolver-O763LCLG.mjs.map} +0 -0
  324. /package/dist/lib/node/{intent-resolver-5CG5NIJY.cjs.map → intent-resolver-3F4POWAM.cjs.map} +0 -0
  325. /package/dist/lib/node-esm/{intent-dispatcher-ZUSNX2OY.mjs.map → intent-dispatcher-YDE2ONZA.mjs.map} +0 -0
  326. /package/dist/lib/node-esm/{intent-resolver-NGDHUKDD.mjs.map → intent-resolver-LAGJ7LXM.mjs.map} +0 -0
@@ -1,16 +1,16 @@
1
1
  // packages/sdk/app-framework/src/plugin-intent/intent-dispatcher.ts
2
- import { Effect as Effect3, Option, pipe as pipe2, Ref as Ref2 } from "effect";
3
- import { live as live2 } from "@dxos/live-object";
2
+ import { Effect as Effect3, Option, pipe as pipe2, Ref } from "effect";
3
+ import { create as create3 } from "@dxos/live-object";
4
4
  import { log as log3 } from "@dxos/log";
5
5
  import { byPosition } from "@dxos/util";
6
6
 
7
7
  // packages/sdk/app-framework/src/plugin-intent/actions.ts
8
- import { Schema as Schema2 } from "effect";
8
+ import { Schema as S2 } from "effect";
9
9
 
10
10
  // packages/sdk/app-framework/src/plugin-intent/intent.ts
11
- import { Schema } from "effect";
11
+ import { Schema as S } from "effect";
12
12
  var createIntent = (schema, data = {}, params = {}) => {
13
- const _ = Schema.validateSync(schema.fields.input)(data);
13
+ const _ = S.validateSync(schema.fields.input)(data);
14
14
  const intent = {
15
15
  ...params,
16
16
  _schema: schema,
@@ -45,9 +45,9 @@ var chain = (schema, data = {}, params = {}) => (intent) => {
45
45
  ]
46
46
  };
47
47
  };
48
- var Label = Schema.Union(Schema.String, Schema.mutable(Schema.Tuple(Schema.String, Schema.mutable(Schema.Struct({
49
- ns: Schema.String,
50
- count: Schema.optional(Schema.Number)
48
+ var Label = S.Union(S.String, S.mutable(S.Tuple(S.String, S.mutable(S.Struct({
49
+ ns: S.String,
50
+ count: S.optional(S.Number)
51
51
  })))));
52
52
 
53
53
  // packages/sdk/app-framework/src/plugin-intent/actions.ts
@@ -55,20 +55,20 @@ var INTENT_PLUGIN = "dxos.org/plugin/intent";
55
55
  var INTENT_ACTION = `${INTENT_PLUGIN}/action`;
56
56
  var IntentAction;
57
57
  (function(IntentAction2) {
58
- class Track extends Schema2.TaggedClass()(`${INTENT_ACTION}/track`, {
59
- input: Schema2.Struct({
60
- intents: Schema2.Array(Schema2.String),
61
- error: Schema2.optional(Schema2.String)
58
+ class Track extends S2.TaggedClass()(`${INTENT_ACTION}/track`, {
59
+ input: S2.Struct({
60
+ intents: S2.Array(S2.String),
61
+ error: S2.optional(S2.String)
62
62
  }),
63
- output: Schema2.Void
63
+ output: S2.Void
64
64
  }) {
65
65
  }
66
66
  IntentAction2.Track = Track;
67
- class ShowUndo extends Schema2.TaggedClass()(`${INTENT_ACTION}/show-undo`, {
68
- input: Schema2.Struct({
67
+ class ShowUndo extends S2.TaggedClass()(`${INTENT_ACTION}/show-undo`, {
68
+ input: S2.Struct({
69
69
  message: Label
70
70
  }),
71
- output: Schema2.Void
71
+ output: S2.Void
72
72
  }) {
73
73
  }
74
74
  IntentAction2.ShowUndo = ShowUndo;
@@ -100,10 +100,11 @@ var CycleDetectedError = class extends BaseError {
100
100
  };
101
101
 
102
102
  // packages/sdk/app-framework/src/core/capabilities.ts
103
- import { Rx } from "@effect-rx/rx-react";
103
+ import { effect, untracked } from "@preact/signals-core";
104
104
  import { Effect } from "effect";
105
105
  import { Trigger } from "@dxos/async";
106
106
  import { invariant } from "@dxos/invariant";
107
+ import { create } from "@dxos/live-object";
107
108
  import { log } from "@dxos/log";
108
109
  var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/core/capabilities.ts";
109
110
  var InterfaceDefTypeId = Symbol.for("InterfaceDefTypeId");
@@ -129,33 +130,9 @@ var lazy = (c) => async (props) => {
129
130
  const { default: getCapability } = await c();
130
131
  return async () => getCapability(props);
131
132
  };
132
- var PluginContext = class {
133
- constructor({ registry, activate, reset }) {
134
- this._capabilityImpls = Rx.family(() => {
135
- return Rx.make([]).pipe(Rx.keepAlive);
136
- });
137
- this._capabilities = Rx.family((id) => {
138
- return Rx.make((get) => {
139
- const current = get(this._capabilityImpls(id));
140
- return current.map((c) => c.implementation);
141
- });
142
- });
143
- this._capability = Rx.family((id) => {
144
- return Rx.make((get) => {
145
- const current = get(this._capabilities(id));
146
- invariant(current.length > 0, `No capability found for ${id}`, {
147
- F: __dxlog_file,
148
- L: 117,
149
- S: this,
150
- A: [
151
- "current.length > 0",
152
- "`No capability found for ${id}`"
153
- ]
154
- });
155
- return current[0];
156
- });
157
- });
158
- this._registry = registry;
133
+ var PluginsContext = class {
134
+ constructor({ activate, reset }) {
135
+ this._definedCapabilities = /* @__PURE__ */ new Map();
159
136
  this.activate = activate;
160
137
  this.reset = reset;
161
138
  }
@@ -163,22 +140,22 @@ var PluginContext = class {
163
140
  * @internal
164
141
  */
165
142
  contributeCapability({ module: moduleId, interface: interfaceDef, implementation }) {
166
- const current = this._registry.get(this._capabilityImpls(interfaceDef.identifier));
167
- const capability = new CapabilityImpl(moduleId, implementation);
168
- if (current.includes(capability)) {
169
- return;
143
+ let current = this._definedCapabilities.get(interfaceDef.identifier);
144
+ if (!current) {
145
+ const object = create({
146
+ value: []
147
+ });
148
+ current = untracked(() => object.value);
149
+ this._definedCapabilities.set(interfaceDef.identifier, current);
170
150
  }
171
- this._registry.set(this._capabilityImpls(interfaceDef.identifier), [
172
- ...current,
173
- capability
174
- ]);
151
+ current.push(new CapabilityImpl(moduleId, implementation));
175
152
  log("capability contributed", {
176
153
  id: interfaceDef.identifier,
177
154
  moduleId,
178
- count: current.length
155
+ count: untracked(() => current.length)
179
156
  }, {
180
157
  F: __dxlog_file,
181
- L: 161,
158
+ L: 142,
182
159
  S: this,
183
160
  C: (f, a) => f(...a)
184
161
  });
@@ -187,19 +164,19 @@ var PluginContext = class {
187
164
  * @internal
188
165
  */
189
166
  removeCapability(interfaceDef, implementation) {
190
- const current = this._registry.get(this._capabilityImpls(interfaceDef.identifier));
191
- if (current.length === 0) {
167
+ const current = this._definedCapabilities.get(interfaceDef.identifier);
168
+ if (!current) {
192
169
  return;
193
170
  }
194
- const next = current.filter((c) => c.implementation !== implementation);
195
- if (next.length !== current.length) {
196
- this._registry.set(this._capabilityImpls(interfaceDef.identifier), next);
171
+ const index = current.findIndex((i) => i.implementation === implementation);
172
+ if (index !== -1) {
173
+ current.splice(index, 1);
197
174
  log("capability removed", {
198
175
  id: interfaceDef.identifier,
199
- count: current.length
176
+ count: untracked(() => current.length)
200
177
  }, {
201
178
  F: __dxlog_file,
202
- L: 180,
179
+ L: 161,
203
180
  S: this,
204
181
  C: (f, a) => f(...a)
205
182
  });
@@ -208,64 +185,63 @@ var PluginContext = class {
208
185
  id: interfaceDef.identifier
209
186
  }, {
210
187
  F: __dxlog_file,
211
- L: 182,
188
+ L: 163,
212
189
  S: this,
213
190
  C: (f, a) => f(...a)
214
191
  });
215
192
  }
216
193
  }
217
194
  /**
218
- * Get the Rx reference to the available capabilities for a given interface.
219
- * Primarily useful for deriving other Rx values based on the capabilities or
220
- * for subscribing to changes in the capabilities.
221
- * @returns An Rx reference to the available capabilities.
222
- */
223
- capabilities(interfaceDef) {
224
- return this._capabilities(interfaceDef.identifier);
225
- }
226
- /**
227
- * Get the Rx reference to the available capabilities for a given interface.
228
- * Primarily useful for deriving other Rx values based on the capability or
229
- * for subscribing to changes in the capability.
230
- * @returns An Rx reference to the available capability.
231
- * @throws If no capability is found.
232
- */
233
- capability(interfaceDef) {
234
- return this._capability(interfaceDef.identifier);
235
- }
236
- /**
237
- * Get capabilities from the plugin context.
195
+ * Requests capabilities from the plugin context.
238
196
  * @returns An array of capabilities.
197
+ * @reactive
239
198
  */
240
- getCapabilities(interfaceDef) {
241
- return this._registry.get(this.capabilities(interfaceDef));
199
+ requestCapabilities(interfaceDef, filter) {
200
+ let current = this._definedCapabilities.get(interfaceDef.identifier);
201
+ if (!current) {
202
+ const object = create({
203
+ value: []
204
+ });
205
+ current = untracked(() => object.value);
206
+ this._definedCapabilities.set(interfaceDef.identifier, current);
207
+ }
208
+ const capabilities = filter ? current.filter((c) => filter(c.implementation, c.moduleId)) : current;
209
+ return capabilities.map((c) => c.implementation);
242
210
  }
243
211
  /**
244
212
  * Requests a single capability from the plugin context.
245
213
  * @returns The capability.
246
214
  * @throws If no capability is found.
215
+ * @reactive
247
216
  */
248
- getCapability(interfaceDef) {
249
- return this._registry.get(this.capability(interfaceDef));
217
+ requestCapability(interfaceDef, filter) {
218
+ const capability = this.requestCapabilities(interfaceDef, filter)[0];
219
+ invariant(capability, `No capability found for ${interfaceDef.identifier}`, {
220
+ F: __dxlog_file,
221
+ L: 199,
222
+ S: this,
223
+ A: [
224
+ "capability",
225
+ "`No capability found for ${interfaceDef.identifier}`"
226
+ ]
227
+ });
228
+ return capability;
250
229
  }
251
230
  /**
252
- * Waits for a capability to be available.
231
+ * Waits for a capability to be contributed.
253
232
  * @returns The capability.
254
233
  */
255
- async waitForCapability(interfaceDef) {
256
- const [capability] = this.getCapabilities(interfaceDef);
257
- if (capability) {
258
- return capability;
259
- }
234
+ async waitForCapability(interfaceDef, filter) {
260
235
  const trigger = new Trigger();
261
- const cancel = this._registry.subscribe(this.capabilities(interfaceDef), (capabilities) => {
262
- if (capabilities.length > 0) {
236
+ const unsubscribe = effect(() => {
237
+ const capabilities = this.requestCapabilities(interfaceDef, filter);
238
+ if (capabilities[0]) {
263
239
  trigger.wake(capabilities[0]);
264
240
  }
265
241
  });
266
- const result = await trigger.wait();
267
- cancel();
268
- return result;
242
+ const capability = await trigger.wait();
243
+ unsubscribe();
244
+ return capability;
269
245
  }
270
246
  async activatePromise(event) {
271
247
  return this.activate(event).pipe(Effect.runPromise);
@@ -298,28 +274,25 @@ var getEvents = (events) => "type" in events ? events.events : [
298
274
  ];
299
275
 
300
276
  // packages/sdk/app-framework/src/core/manager.ts
301
- import { Registry } from "@effect-rx/rx-react";
302
- import { untracked } from "@preact/signals-core";
277
+ import { untracked as untracked2 } from "@preact/signals-core";
303
278
  import { Array as A, Effect as Effect2, Either, Match, pipe } from "effect";
304
279
  import { Event } from "@dxos/async";
305
- import { live } from "@dxos/live-object";
280
+ import { create as create2 } from "@dxos/live-object";
306
281
  import { log as log2 } from "@dxos/log";
307
282
  var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/core/manager.ts";
308
283
  var isPromise = (value) => {
309
284
  return value !== null && typeof value === "object" && "then" in value;
310
285
  };
311
286
  var PluginManager = class {
312
- constructor({ pluginLoader, plugins = [], core = plugins.map(({ meta }) => meta.id), enabled = [], registry }) {
287
+ constructor({ pluginLoader, plugins = [], core = plugins.map(({ meta }) => meta.id), enabled = [] }) {
313
288
  this.activation = new Event();
314
- this._capabilities = /* @__PURE__ */ new Map();
315
- this.registry = registry ?? Registry.make();
316
- this.context = new PluginContext({
317
- registry: this.registry,
289
+ this.context = new PluginsContext({
318
290
  activate: (event) => this._activate(event),
319
291
  reset: (id) => this._reset(id)
320
292
  });
293
+ this._capabilities = /* @__PURE__ */ new Map();
321
294
  this._pluginLoader = pluginLoader;
322
- this._state = live({
295
+ this._state = create2({
323
296
  plugins,
324
297
  core,
325
298
  enabled,
@@ -393,12 +366,12 @@ var PluginManager = class {
393
366
  * @param id The id of the plugin.
394
367
  */
395
368
  async add(id) {
396
- return untracked(async () => {
369
+ return untracked2(async () => {
397
370
  log2("add plugin", {
398
371
  id
399
372
  }, {
400
373
  F: __dxlog_file2,
401
- L: 154,
374
+ L: 146,
402
375
  S: this,
403
376
  C: (f, a) => f(...a)
404
377
  });
@@ -412,12 +385,12 @@ var PluginManager = class {
412
385
  * @param id The id of the plugin.
413
386
  */
414
387
  enable(id) {
415
- return untracked(async () => {
388
+ return untracked2(async () => {
416
389
  log2("enable plugin", {
417
390
  id
418
391
  }, {
419
392
  F: __dxlog_file2,
420
- L: 167,
393
+ L: 159,
421
394
  S: this,
422
395
  C: (f, a) => f(...a)
423
396
  });
@@ -438,7 +411,7 @@ var PluginManager = class {
438
411
  ]
439
412
  }, {
440
413
  F: __dxlog_file2,
441
- L: 182,
414
+ L: 174,
442
415
  S: this,
443
416
  C: (f, a) => f(...a)
444
417
  });
@@ -453,12 +426,12 @@ var PluginManager = class {
453
426
  * @param id The id of the plugin.
454
427
  */
455
428
  remove(id) {
456
- return untracked(() => {
429
+ return untracked2(() => {
457
430
  log2("remove plugin", {
458
431
  id
459
432
  }, {
460
433
  F: __dxlog_file2,
461
- L: 200,
434
+ L: 192,
462
435
  S: this,
463
436
  C: (f, a) => f(...a)
464
437
  });
@@ -475,12 +448,12 @@ var PluginManager = class {
475
448
  * @param id The id of the plugin.
476
449
  */
477
450
  disable(id) {
478
- return untracked(async () => {
451
+ return untracked2(async () => {
479
452
  log2("disable plugin", {
480
453
  id
481
454
  }, {
482
455
  F: __dxlog_file2,
483
- L: 217,
456
+ L: 209,
484
457
  S: this,
485
458
  C: (f, a) => f(...a)
486
459
  });
@@ -508,7 +481,7 @@ var PluginManager = class {
508
481
  * @returns Whether the activation was successful.
509
482
  */
510
483
  activate(event) {
511
- return untracked(() => Effect2.runPromise(this._activate(event)));
484
+ return untracked2(() => Effect2.runPromise(this._activate(event)));
512
485
  }
513
486
  /**
514
487
  * Deactivates all of the modules for a plugin.
@@ -516,7 +489,7 @@ var PluginManager = class {
516
489
  * @returns Whether the deactivation was successful.
517
490
  */
518
491
  deactivate(id) {
519
- return untracked(() => Effect2.runPromise(this._deactivate(id)));
492
+ return untracked2(() => Effect2.runPromise(this._deactivate(id)));
520
493
  }
521
494
  /**
522
495
  * Re-activates the modules that were activated by the event.
@@ -524,15 +497,15 @@ var PluginManager = class {
524
497
  * @returns Whether the reset was successful.
525
498
  */
526
499
  reset(event) {
527
- return untracked(() => Effect2.runPromise(this._reset(event)));
500
+ return untracked2(() => Effect2.runPromise(this._reset(event)));
528
501
  }
529
502
  _addPlugin(plugin) {
530
- untracked(() => {
503
+ untracked2(() => {
531
504
  log2("add plugin", {
532
505
  id: plugin.meta.id
533
506
  }, {
534
507
  F: __dxlog_file2,
535
- L: 270,
508
+ L: 262,
536
509
  S: this,
537
510
  C: (f, a) => f(...a)
538
511
  });
@@ -542,12 +515,12 @@ var PluginManager = class {
542
515
  });
543
516
  }
544
517
  _removePlugin(id) {
545
- untracked(() => {
518
+ untracked2(() => {
546
519
  log2("remove plugin", {
547
520
  id
548
521
  }, {
549
522
  F: __dxlog_file2,
550
- L: 279,
523
+ L: 271,
551
524
  S: this,
552
525
  C: (f, a) => f(...a)
553
526
  });
@@ -558,12 +531,12 @@ var PluginManager = class {
558
531
  });
559
532
  }
560
533
  _addModule(module) {
561
- untracked(() => {
534
+ untracked2(() => {
562
535
  log2("add module", {
563
536
  id: module.id
564
537
  }, {
565
538
  F: __dxlog_file2,
566
- L: 289,
539
+ L: 281,
567
540
  S: this,
568
541
  C: (f, a) => f(...a)
569
542
  });
@@ -573,12 +546,12 @@ var PluginManager = class {
573
546
  });
574
547
  }
575
548
  _removeModule(id) {
576
- untracked(() => {
549
+ untracked2(() => {
577
550
  log2("remove module", {
578
551
  id
579
552
  }, {
580
553
  F: __dxlog_file2,
581
- L: 298,
554
+ L: 290,
582
555
  S: this,
583
556
  C: (f, a) => f(...a)
584
557
  });
@@ -604,7 +577,7 @@ var PluginManager = class {
604
577
  return this._getInactiveModules().filter((module) => getEvents(module.activatesOn).map(eventKey).includes(key));
605
578
  }
606
579
  _setPendingResetByModule(module) {
607
- return untracked(() => {
580
+ return untracked2(() => {
608
581
  const activationEvents = getEvents(module.activatesOn).map(eventKey).filter((key) => this._state.eventsFired.includes(key));
609
582
  const pendingReset = Array.from(new Set(activationEvents)).filter((event) => !this._state.pendingReset.includes(event));
610
583
  if (pendingReset.length > 0) {
@@ -612,7 +585,7 @@ var PluginManager = class {
612
585
  events: pendingReset
613
586
  }, {
614
587
  F: __dxlog_file2,
615
- L: 336,
588
+ L: 328,
616
589
  S: this,
617
590
  C: (f, a) => f(...a)
618
591
  });
@@ -631,7 +604,7 @@ var PluginManager = class {
631
604
  key
632
605
  }, {
633
606
  F: __dxlog_file2,
634
- L: 349,
607
+ L: 341,
635
608
  S: this,
636
609
  C: (f, a) => f(...a)
637
610
  });
@@ -652,7 +625,7 @@ var PluginManager = class {
652
625
  key
653
626
  }, {
654
627
  F: __dxlog_file2,
655
- L: 365,
628
+ L: 357,
656
629
  S: this,
657
630
  C: (f, a) => f(...a)
658
631
  });
@@ -666,7 +639,7 @@ var PluginManager = class {
666
639
  modules: modules.map((module) => module.id)
667
640
  }, {
668
641
  F: __dxlog_file2,
669
- L: 372,
642
+ L: 364,
670
643
  S: this,
671
644
  C: (f, a) => f(...a)
672
645
  });
@@ -708,7 +681,7 @@ var PluginManager = class {
708
681
  key
709
682
  }, {
710
683
  F: __dxlog_file2,
711
- L: 406,
684
+ L: 398,
712
685
  S: this,
713
686
  C: (f, a) => f(...a)
714
687
  });
@@ -724,7 +697,7 @@ var PluginManager = class {
724
697
  module: module.id
725
698
  }, {
726
699
  F: __dxlog_file2,
727
- L: 421,
700
+ L: 413,
728
701
  S: this,
729
702
  C: (f, a) => f(...a)
730
703
  });
@@ -753,7 +726,7 @@ var PluginManager = class {
753
726
  module: module.id
754
727
  }, {
755
728
  F: __dxlog_file2,
756
- L: 444,
729
+ L: 436,
757
730
  S: this,
758
731
  C: (f, a) => f(...a)
759
732
  });
@@ -782,7 +755,7 @@ var PluginManager = class {
782
755
  id
783
756
  }, {
784
757
  F: __dxlog_file2,
785
- L: 471,
758
+ L: 463,
786
759
  S: this,
787
760
  C: (f, a) => f(...a)
788
761
  });
@@ -791,7 +764,7 @@ var PluginManager = class {
791
764
  for (const capability of capabilities) {
792
765
  this.context.removeCapability(capability.interface, capability.implementation);
793
766
  const program = capability.deactivate?.();
794
- yield* Match.value(program).pipe(Match.when(Effect2.isEffect, (effect) => effect), Match.when(isPromise, (promise) => Effect2.tryPromise({
767
+ yield* Match.value(program).pipe(Match.when(Effect2.isEffect, (effect2) => effect2), Match.when(isPromise, (promise) => Effect2.tryPromise({
795
768
  try: () => promise,
796
769
  catch: (error) => error
797
770
  })), Match.orElse((program2) => Effect2.succeed(program2)));
@@ -806,7 +779,7 @@ var PluginManager = class {
806
779
  id
807
780
  }, {
808
781
  F: __dxlog_file2,
809
- L: 497,
782
+ L: 489,
810
783
  S: this,
811
784
  C: (f, a) => f(...a)
812
785
  });
@@ -820,7 +793,7 @@ var PluginManager = class {
820
793
  key
821
794
  }, {
822
795
  F: __dxlog_file2,
823
- L: 505,
796
+ L: 497,
824
797
  S: this,
825
798
  C: (f, a) => f(...a)
826
799
  });
@@ -863,7 +836,6 @@ var Capabilities;
863
836
  (function(Capabilities2) {
864
837
  Capabilities2.PluginManager = defineCapability("dxos.org/app-framework/capability/plugin-manager");
865
838
  Capabilities2.Null = defineCapability("dxos.org/app-framework/capability/null");
866
- Capabilities2.RxRegistry = defineCapability("dxos.org/app-framework/capability/rx-registry");
867
839
  Capabilities2.ReactContext = defineCapability("dxos.org/app-framework/capability/react-context");
868
840
  Capabilities2.ReactRoot = defineCapability("dxos.org/app-framework/capability/react-root");
869
841
  Capabilities2.ReactSurface = defineCapability("dxos.org/app-framework/common/react-surface");
@@ -882,27 +854,6 @@ var Capabilities;
882
854
  Capabilities2.FileUploader = defineCapability("dxos.org/app-framework/capability/file-uploader");
883
855
  })(Capabilities || (Capabilities = {}));
884
856
 
885
- // packages/sdk/app-framework/src/common/collaboration.ts
886
- import { Schema as Schema3, SchemaAST } from "effect";
887
- import { Expando, Ref } from "@dxos/echo-schema";
888
- import { SpaceId } from "@dxos/keys";
889
- var CollaborationActions;
890
- (function(CollaborationActions2) {
891
- class InsertContent extends Schema3.TaggedClass()("assistant/intent-content", {
892
- input: Schema3.Struct({
893
- spaceId: SpaceId,
894
- target: Ref(Expando),
895
- object: Ref(Expando),
896
- label: Schema3.String.pipe(Schema3.optional)
897
- }).annotations({
898
- [SchemaAST.DescriptionAnnotationId]: "Enables plugins to inject content blocks or references into a related entity."
899
- }),
900
- output: Schema3.Void
901
- }) {
902
- }
903
- CollaborationActions2.InsertContent = InsertContent;
904
- })(CollaborationActions || (CollaborationActions = {}));
905
-
906
857
  // packages/sdk/app-framework/src/common/events.ts
907
858
  var Events;
908
859
  (function(Events2) {
@@ -922,7 +873,7 @@ var Events;
922
873
  })(Events || (Events = {}));
923
874
 
924
875
  // packages/sdk/app-framework/src/common/file.ts
925
- import { Schema as Schema4 } from "effect";
876
+ import { Schema as S3 } from "effect";
926
877
  var defaultFileTypes = {
927
878
  images: [
928
879
  "png",
@@ -942,15 +893,15 @@ var defaultFileTypes = {
942
893
  "md"
943
894
  ]
944
895
  };
945
- var FileInfoSchema = Schema4.Struct({
946
- name: Schema4.String,
947
- type: Schema4.String,
948
- url: Schema4.optional(Schema4.String),
949
- cid: Schema4.optional(Schema4.String)
896
+ var FileInfoSchema = S3.Struct({
897
+ name: S3.String,
898
+ type: S3.String,
899
+ url: S3.optional(S3.String),
900
+ cid: S3.optional(S3.String)
950
901
  });
951
902
 
952
903
  // packages/sdk/app-framework/src/common/layout.ts
953
- import { Schema as Schema5 } from "effect";
904
+ import { Schema as S4 } from "effect";
954
905
 
955
906
  // packages/sdk/app-framework/src/plugin-intent/IntentPlugin.tsx
956
907
  var IntentPlugin = () => definePlugin({
@@ -966,7 +917,7 @@ var IntentPlugin = () => definePlugin({
966
917
  activatesAfter: [
967
918
  Events.DispatcherReady
968
919
  ],
969
- activate: lazy(() => import("./intent-dispatcher-VGUJBPPN.mjs"))
920
+ activate: lazy(() => import("./intent-dispatcher-3Q67MHZZ.mjs"))
970
921
  })
971
922
  ]);
972
923
 
@@ -976,323 +927,313 @@ var LAYOUT_ACTION = `${LAYOUT_PLUGIN}/action`;
976
927
  var LayoutAction;
977
928
  (function(LayoutAction2) {
978
929
  LayoutAction2.UPDATE_LAYOUT = `${LAYOUT_ACTION}/update-layout`;
979
- class UpdateLayout extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
980
- input: Schema5.Struct({
981
- part: Schema5.String.annotations({
930
+ class UpdateLayout extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
931
+ input: S4.Struct({
932
+ part: S4.String.annotations({
982
933
  description: "The part of the layout to mutate."
983
934
  }),
984
- subject: Schema5.optional(Schema5.Any.annotations({
935
+ subject: S4.optional(S4.Any.annotations({
985
936
  description: "The subject of the layout update."
986
937
  })),
987
- options: Schema5.optional(Schema5.Record({
988
- key: Schema5.String,
989
- value: Schema5.Any
938
+ options: S4.optional(S4.Record({
939
+ key: S4.String,
940
+ value: S4.Any
990
941
  }).annotations({
991
942
  description: "Additional options for the layout action."
992
943
  }))
993
944
  }),
994
- output: Schema5.Void
945
+ output: S4.Void
995
946
  }) {
996
947
  }
997
948
  LayoutAction2.UpdateLayout = UpdateLayout;
998
- class SetLayoutMode extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
999
- input: Schema5.Struct({
1000
- part: Schema5.Literal("mode").annotations({
949
+ class SetLayoutMode extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
950
+ input: S4.Struct({
951
+ part: S4.Literal("mode").annotations({
1001
952
  description: "Setting the layout mode."
1002
953
  }),
1003
- subject: Schema5.optional(Schema5.String.annotations({
954
+ subject: S4.optional(S4.String.annotations({
1004
955
  description: "Item which is the subject of the new layout mode."
1005
956
  })),
1006
- options: Schema5.Union(Schema5.Struct({
1007
- mode: Schema5.String.annotations({
957
+ options: S4.Union(S4.Struct({
958
+ mode: S4.String.annotations({
1008
959
  description: "The new layout mode."
1009
960
  })
1010
- }), Schema5.Struct({
1011
- revert: Schema5.Boolean.annotations({
961
+ }), S4.Struct({
962
+ revert: S4.Boolean.annotations({
1012
963
  description: "Revert to the previous layout mode."
1013
964
  })
1014
965
  }))
1015
966
  }),
1016
- output: Schema5.Void
967
+ output: S4.Void
1017
968
  }) {
1018
969
  }
1019
970
  LayoutAction2.SetLayoutMode = SetLayoutMode;
1020
- class UpdateSidebar extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1021
- input: Schema5.Struct({
1022
- part: Schema5.Literal("sidebar").annotations({
971
+ class UpdateSidebar extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
972
+ input: S4.Struct({
973
+ part: S4.Literal("sidebar").annotations({
1023
974
  description: "Updating the sidebar."
1024
975
  }),
1025
- subject: Schema5.optional(Schema5.String.annotations({
976
+ subject: S4.optional(S4.String.annotations({
1026
977
  description: "URI of the component to display in the sidebar."
1027
978
  })),
1028
- options: Schema5.optional(Schema5.Struct({
1029
- state: Schema5.Literal("closed", "collapsed", "expanded").annotations({
979
+ options: S4.optional(S4.Struct({
980
+ state: S4.Literal("closed", "collapsed", "expanded").annotations({
1030
981
  description: "Whether the sidebar is closed, collapsed, or expanded."
1031
982
  })
1032
983
  }))
1033
984
  }),
1034
- output: Schema5.Void
985
+ output: S4.Void
1035
986
  }) {
1036
987
  }
1037
988
  LayoutAction2.UpdateSidebar = UpdateSidebar;
1038
- class UpdateComplementary extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1039
- input: Schema5.Struct({
1040
- part: Schema5.Literal("complementary").annotations({
989
+ class UpdateComplementary extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
990
+ input: S4.Struct({
991
+ part: S4.Literal("complementary").annotations({
1041
992
  description: "Updating the complementary sidebar."
1042
993
  }),
1043
- subject: Schema5.optional(Schema5.String.annotations({
994
+ subject: S4.optional(S4.String.annotations({
1044
995
  description: "URI of the component to display in the complementary area."
1045
996
  })),
1046
- options: Schema5.optional(Schema5.Struct({
1047
- state: Schema5.Literal("closed", "collapsed", "expanded").annotations({
997
+ options: S4.optional(S4.Struct({
998
+ state: S4.Literal("closed", "collapsed", "expanded").annotations({
1048
999
  description: "Whether the complementary sidebar is closed, collapsed, or expanded."
1049
1000
  })
1050
1001
  }))
1051
1002
  }),
1052
- output: Schema5.Void
1003
+ output: S4.Void
1053
1004
  }) {
1054
1005
  }
1055
1006
  LayoutAction2.UpdateComplementary = UpdateComplementary;
1056
- class UpdateDialog extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1057
- input: Schema5.Struct({
1058
- part: Schema5.Literal("dialog").annotations({
1007
+ class UpdateDialog extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1008
+ input: S4.Struct({
1009
+ part: S4.Literal("dialog").annotations({
1059
1010
  description: "Updating the dialog."
1060
1011
  }),
1061
- subject: Schema5.optional(Schema5.String.annotations({
1012
+ subject: S4.optional(S4.String.annotations({
1062
1013
  description: "URI of the component to display in the dialog."
1063
1014
  })),
1064
- options: Schema5.Struct({
1065
- state: Schema5.optional(Schema5.Boolean.annotations({
1015
+ options: S4.Struct({
1016
+ state: S4.optional(S4.Boolean.annotations({
1066
1017
  description: "Whether the dialog is open or closed."
1067
1018
  })),
1068
- blockAlign: Schema5.optional(Schema5.Literal("start", "center", "end").annotations({
1019
+ blockAlign: S4.optional(S4.Literal("start", "center", "end").annotations({
1069
1020
  description: "The alignment of the dialog."
1070
1021
  })),
1071
- type: Schema5.optional(Schema5.Literal("default", "alert").annotations({
1022
+ type: S4.optional(S4.Literal("default", "alert").annotations({
1072
1023
  description: "The type of dialog."
1073
1024
  })),
1074
- props: Schema5.optional(Schema5.Record({
1075
- key: Schema5.String,
1076
- value: Schema5.Any
1025
+ props: S4.optional(S4.Record({
1026
+ key: S4.String,
1027
+ value: S4.Any
1077
1028
  }).annotations({
1078
1029
  description: "Additional props for the dialog."
1079
1030
  }))
1080
1031
  })
1081
1032
  }),
1082
- output: Schema5.Void
1033
+ output: S4.Void
1083
1034
  }) {
1084
1035
  }
1085
1036
  LayoutAction2.UpdateDialog = UpdateDialog;
1086
- class UpdatePopover extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1087
- input: Schema5.Struct({
1088
- part: Schema5.Literal("popover").annotations({
1037
+ class UpdatePopover extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1038
+ input: S4.Struct({
1039
+ part: S4.Literal("popover").annotations({
1089
1040
  description: "Updating the popover."
1090
1041
  }),
1091
- subject: Schema5.optional(Schema5.Any.annotations({
1092
- description: "URI of the component to display in the popover or data to pass to the popover."
1042
+ subject: S4.optional(S4.String.annotations({
1043
+ description: "URI of the component to display in the popover."
1093
1044
  })),
1094
- options: Schema5.Struct({
1095
- side: Schema5.optional(Schema5.Literal("top", "right", "bottom", "left").annotations({
1045
+ options: S4.Struct({
1046
+ anchorId: S4.String.annotations({
1047
+ description: "The id of the element to anchor the popover to."
1048
+ }),
1049
+ side: S4.optional(S4.Literal("top", "right", "bottom", "left").annotations({
1096
1050
  description: "The side of the anchor."
1097
1051
  })),
1098
- state: Schema5.optional(Schema5.Boolean.annotations({
1052
+ state: S4.optional(S4.Boolean.annotations({
1099
1053
  description: "Whether the popover is open or closed."
1100
1054
  })),
1101
- props: Schema5.optional(Schema5.Record({
1102
- key: Schema5.String,
1103
- value: Schema5.Any
1055
+ props: S4.optional(S4.Record({
1056
+ key: S4.String,
1057
+ value: S4.Any
1104
1058
  }).annotations({
1105
1059
  description: "Additional props for the popover."
1106
1060
  }))
1107
- }).pipe(Schema5.extend(Schema5.Union(Schema5.Struct({
1108
- variant: Schema5.Literal("virtual"),
1109
- anchor: Schema5.Any.annotations({
1110
- description: "The DOM element to anchor the popover to."
1111
- })
1112
- }), Schema5.Struct({
1113
- variant: Schema5.optional(Schema5.Literal("react")),
1114
- anchorId: Schema5.String.annotations({
1115
- description: "An id that can be used to determine whether to render the anchor subcomponent."
1116
- })
1117
- }))))
1061
+ })
1118
1062
  }),
1119
- output: Schema5.Void
1063
+ output: S4.Void
1120
1064
  }) {
1121
1065
  }
1122
1066
  LayoutAction2.UpdatePopover = UpdatePopover;
1123
- LayoutAction2.Toast = Schema5.Struct({
1124
- id: Schema5.String.annotations({
1067
+ LayoutAction2.Toast = S4.Struct({
1068
+ id: S4.String.annotations({
1125
1069
  description: "The id of the toast."
1126
1070
  }),
1127
- title: Schema5.optional(Label.annotations({
1071
+ title: S4.optional(Label.annotations({
1128
1072
  description: "The title of the toast."
1129
1073
  })),
1130
- description: Schema5.optional(Label.annotations({
1074
+ description: S4.optional(Label.annotations({
1131
1075
  description: "The description of the toast."
1132
1076
  })),
1133
- icon: Schema5.optional(Schema5.String.annotations({
1077
+ icon: S4.optional(S4.String.annotations({
1134
1078
  description: "The icon of the toast."
1135
1079
  })),
1136
- duration: Schema5.optional(Schema5.Number.annotations({
1080
+ duration: S4.optional(S4.Number.annotations({
1137
1081
  description: "The duration of the toast."
1138
1082
  })),
1139
- closeLabel: Schema5.optional(Label.annotations({
1083
+ closeLabel: S4.optional(Label.annotations({
1140
1084
  description: "The label of the close button."
1141
1085
  })),
1142
- actionLabel: Schema5.optional(Label.annotations({
1086
+ actionLabel: S4.optional(Label.annotations({
1143
1087
  description: "The label of the action button."
1144
1088
  })),
1145
- actionAlt: Schema5.optional(Label.annotations({
1089
+ actionAlt: S4.optional(Label.annotations({
1146
1090
  description: "The alt text of the action button."
1147
1091
  })),
1148
- onAction: Schema5.optional(Schema5.Any.annotations({
1092
+ onAction: S4.optional(S4.Any.annotations({
1149
1093
  description: "The action to perform when the action button is clicked."
1150
1094
  }))
1151
1095
  });
1152
- class AddToast extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1153
- input: Schema5.Struct({
1154
- part: Schema5.Literal("toast").annotations({
1096
+ class AddToast extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1097
+ input: S4.Struct({
1098
+ part: S4.Literal("toast").annotations({
1155
1099
  description: "Adding a toast."
1156
1100
  }),
1157
1101
  subject: LayoutAction2.Toast.annotations({
1158
1102
  description: "The toast to add."
1159
1103
  })
1160
1104
  }),
1161
- output: Schema5.Void
1105
+ output: S4.Void
1162
1106
  }) {
1163
1107
  }
1164
1108
  LayoutAction2.AddToast = AddToast;
1165
- class SwitchWorkspace extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1166
- input: Schema5.Struct({
1167
- part: Schema5.Literal("workspace").annotations({
1109
+ class SwitchWorkspace extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1110
+ input: S4.Struct({
1111
+ part: S4.Literal("workspace").annotations({
1168
1112
  description: "Switching the workspace."
1169
1113
  }),
1170
- subject: Schema5.String.annotations({
1114
+ subject: S4.String.annotations({
1171
1115
  description: "The id of the workspace to switch to."
1172
1116
  })
1173
1117
  }),
1174
- output: Schema5.Void
1118
+ output: S4.Void
1175
1119
  }) {
1176
1120
  }
1177
1121
  LayoutAction2.SwitchWorkspace = SwitchWorkspace;
1178
- class RevertWorkspace extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1179
- input: Schema5.Struct({
1180
- part: Schema5.Literal("workspace").annotations({
1122
+ class RevertWorkspace extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1123
+ input: S4.Struct({
1124
+ part: S4.Literal("workspace").annotations({
1181
1125
  description: "Switching the workspace."
1182
1126
  }),
1183
- options: Schema5.Struct({
1184
- revert: Schema5.Literal(true).annotations({
1127
+ options: S4.Struct({
1128
+ revert: S4.Literal(true).annotations({
1185
1129
  description: "Revert to the previous workspace."
1186
1130
  })
1187
1131
  })
1188
1132
  }),
1189
- output: Schema5.Void
1133
+ output: S4.Void
1190
1134
  }) {
1191
1135
  }
1192
1136
  LayoutAction2.RevertWorkspace = RevertWorkspace;
1193
- class Open extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1194
- input: Schema5.Struct({
1195
- part: Schema5.Literal("main").annotations({
1137
+ class Open extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1138
+ input: S4.Struct({
1139
+ part: S4.Literal("main").annotations({
1196
1140
  description: "Opening an item in the main content area."
1197
1141
  }),
1198
- subject: Schema5.Array(Schema5.String.annotations({
1142
+ subject: S4.Array(S4.String.annotations({
1199
1143
  description: "Ids of the items to open."
1200
1144
  })),
1201
- options: Schema5.optional(Schema5.Struct({
1202
- state: Schema5.optional(Schema5.Literal(true).annotations({
1145
+ options: S4.optional(S4.Struct({
1146
+ state: S4.optional(S4.Literal(true).annotations({
1203
1147
  description: "The items are being added."
1204
1148
  })),
1205
- variant: Schema5.optional(Schema5.String.annotations({
1149
+ variant: S4.optional(S4.String.annotations({
1206
1150
  description: "The variant of the item to open."
1207
1151
  })),
1208
- key: Schema5.optional(Schema5.String.annotations({
1152
+ key: S4.optional(S4.String.annotations({
1209
1153
  description: "If provided, will replace item with a matching key (id prefix)."
1210
1154
  })),
1211
- workspace: Schema5.optional(Schema5.String.annotations({
1212
- description: "The workspace to open the items in."
1213
- })),
1214
- scrollIntoView: Schema5.optional(Schema5.Boolean.annotations({
1155
+ scrollIntoView: S4.optional(S4.Boolean.annotations({
1215
1156
  description: "Scroll the items into view."
1216
1157
  })),
1217
- pivotId: Schema5.optional(Schema5.String.annotations({
1158
+ pivotId: S4.optional(S4.String.annotations({
1218
1159
  description: "The id of the item to place new items next to."
1219
1160
  })),
1220
- positioning: Schema5.optional(Schema5.Union(Schema5.Literal("start").annotations({
1161
+ positioning: S4.optional(S4.Union(S4.Literal("start").annotations({
1221
1162
  description: "The items are being added before the pivot item."
1222
- }), Schema5.Literal("end").annotations({
1163
+ }), S4.Literal("end").annotations({
1223
1164
  description: "The items are being added after the pivot item."
1224
1165
  })))
1225
1166
  }))
1226
1167
  }),
1227
- output: Schema5.Void
1168
+ output: S4.Void
1228
1169
  }) {
1229
1170
  }
1230
1171
  LayoutAction2.Open = Open;
1231
- class Set2 extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1232
- input: Schema5.Struct({
1233
- part: Schema5.Literal("main").annotations({
1172
+ class Set2 extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1173
+ input: S4.Struct({
1174
+ part: S4.Literal("main").annotations({
1234
1175
  description: "Setting items in the main content area."
1235
1176
  }),
1236
- subject: Schema5.Array(Schema5.String.annotations({
1177
+ subject: S4.Array(S4.String.annotations({
1237
1178
  description: "Ids of the items to set."
1238
1179
  })),
1239
- options: Schema5.Struct({
1240
- override: Schema5.Literal(true).annotations({
1180
+ options: S4.Struct({
1181
+ override: S4.Literal(true).annotations({
1241
1182
  description: "Override the current items in the main content area."
1242
1183
  })
1243
1184
  })
1244
1185
  }),
1245
- output: Schema5.Void
1186
+ output: S4.Void
1246
1187
  }) {
1247
1188
  }
1248
1189
  LayoutAction2.Set = Set2;
1249
- class Close extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1250
- input: Schema5.Struct({
1251
- part: Schema5.Literal("main").annotations({
1190
+ class Close extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1191
+ input: S4.Struct({
1192
+ part: S4.Literal("main").annotations({
1252
1193
  description: "Closing items in the main content area."
1253
1194
  }),
1254
- subject: Schema5.Array(Schema5.String.annotations({
1195
+ subject: S4.Array(S4.String.annotations({
1255
1196
  description: "Ids of the items to close."
1256
1197
  })),
1257
- options: Schema5.Struct({
1258
- state: Schema5.Literal(false).annotations({
1198
+ options: S4.Struct({
1199
+ state: S4.Literal(false).annotations({
1259
1200
  description: "The items are being removed."
1260
1201
  })
1261
1202
  })
1262
1203
  }),
1263
- output: Schema5.Void
1204
+ output: S4.Void
1264
1205
  }) {
1265
1206
  }
1266
1207
  LayoutAction2.Close = Close;
1267
- class ScrollIntoView extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1268
- input: Schema5.Struct({
1269
- part: Schema5.Literal("current").annotations({
1208
+ class ScrollIntoView extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1209
+ input: S4.Struct({
1210
+ part: S4.Literal("current").annotations({
1270
1211
  description: "Setting the current item"
1271
1212
  }),
1272
- subject: Schema5.optional(Schema5.String.annotations({
1213
+ subject: S4.optional(S4.String.annotations({
1273
1214
  description: "The id of the item to set as current."
1274
1215
  })),
1275
- options: Schema5.optional(Schema5.Record({
1276
- key: Schema5.String,
1277
- value: Schema5.Any
1216
+ options: S4.optional(S4.Record({
1217
+ key: S4.String,
1218
+ value: S4.Any
1278
1219
  }).annotations({
1279
1220
  description: "Additional options for the scroll into view."
1280
1221
  }))
1281
1222
  }),
1282
- output: Schema5.Void
1223
+ output: S4.Void
1283
1224
  }) {
1284
1225
  }
1285
1226
  LayoutAction2.ScrollIntoView = ScrollIntoView;
1286
- class Expose extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1287
- input: Schema5.Struct({
1288
- part: Schema5.Literal("navigation").annotations({
1227
+ class Expose extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1228
+ input: S4.Struct({
1229
+ part: S4.Literal("navigation").annotations({
1289
1230
  description: "Exposing an item in the navigation area."
1290
1231
  }),
1291
- subject: Schema5.String.annotations({
1232
+ subject: S4.String.annotations({
1292
1233
  description: "The id of the item to expose."
1293
1234
  })
1294
1235
  }),
1295
- output: Schema5.Void
1236
+ output: S4.Void
1296
1237
  }) {
1297
1238
  }
1298
1239
  LayoutAction2.Expose = Expose;
@@ -1302,17 +1243,17 @@ var LayoutAction;
1302
1243
  var createSurface = (definition) => definition;
1303
1244
 
1304
1245
  // packages/sdk/app-framework/src/common/translations.ts
1305
- import { Schema as Schema6 } from "effect";
1306
- var ResourceKey = Schema6.Union(Schema6.String, Schema6.Record({
1307
- key: Schema6.String,
1308
- value: Schema6.Any
1246
+ import { Schema as S5 } from "effect";
1247
+ var ResourceKey = S5.Union(S5.String, S5.Record({
1248
+ key: S5.String,
1249
+ value: S5.Any
1309
1250
  }));
1310
- var ResourceLanguage = Schema6.Record({
1311
- key: Schema6.String,
1251
+ var ResourceLanguage = S5.Record({
1252
+ key: S5.String,
1312
1253
  value: ResourceKey
1313
1254
  });
1314
- var Resource = Schema6.Record({
1315
- key: Schema6.String,
1255
+ var Resource = S5.Record({
1256
+ key: S5.String,
1316
1257
  value: ResourceLanguage
1317
1258
  });
1318
1259
 
@@ -1323,14 +1264,14 @@ var HISTORY_LIMIT = 100;
1323
1264
  var createResolver = (resolver) => resolver;
1324
1265
  var isUndoable = (historyEntry) => historyEntry.length > 0 && historyEntry.every(({ undoable }) => !!undoable);
1325
1266
  var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, historyLimit = HISTORY_LIMIT } = {}) => {
1326
- const historyRef = Effect3.runSync(Ref2.make([]));
1267
+ const historyRef = Effect3.runSync(Ref.make([]));
1327
1268
  const handleIntent = (intent) => Effect3.gen(function* () {
1328
- const candidates = getResolvers().filter((resolver) => resolver.intent._tag === intent.id).filter((resolver) => !resolver.filter || resolver.filter(intent.data)).toSorted(byPosition);
1269
+ const candidates = getResolvers(intent.module).filter((resolver) => resolver.intent._tag === intent.id).filter((resolver) => !resolver.filter || resolver.filter(intent.data)).toSorted(byPosition);
1329
1270
  if (candidates.length === 0) {
1330
1271
  yield* Effect3.fail(new NoResolversError(intent.id));
1331
1272
  }
1332
- const effect = candidates[0].resolve(intent.data, intent.undo ?? false);
1333
- const result = Effect3.isEffect(effect) ? yield* effect : yield* Effect3.promise(async () => effect);
1273
+ const effect2 = candidates[0].resolve(intent.data, intent.undo ?? false);
1274
+ const result = Effect3.isEffect(effect2) ? yield* effect2 : yield* Effect3.promise(async () => effect2);
1334
1275
  return {
1335
1276
  _intent: intent,
1336
1277
  ...result
@@ -1341,7 +1282,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1341
1282
  if (depth > executionLimit) {
1342
1283
  yield* Effect3.fail(new CycleDetectedError());
1343
1284
  }
1344
- const resultsRef = yield* Ref2.make([]);
1285
+ const resultsRef = yield* Ref.make([]);
1345
1286
  for (const intent of intentChain.all) {
1346
1287
  const { data: prev } = (yield* resultsRef.get)[0] ?? {};
1347
1288
  const result2 = yield* handleIntent({
@@ -1351,7 +1292,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1351
1292
  ...prev
1352
1293
  }
1353
1294
  });
1354
- yield* Ref2.update(resultsRef, (results2) => [
1295
+ yield* Ref.update(resultsRef, (results2) => [
1355
1296
  result2,
1356
1297
  ...results2
1357
1298
  ]);
@@ -1366,7 +1307,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1366
1307
  }
1367
1308
  const results = yield* resultsRef.get;
1368
1309
  const result = results[0];
1369
- yield* Ref2.update(historyRef, (history) => {
1310
+ yield* Ref.update(historyRef, (history) => {
1370
1311
  const next = [
1371
1312
  ...history,
1372
1313
  results
@@ -1390,7 +1331,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1390
1331
  })).catch((error) => {
1391
1332
  log3.catch(error, void 0, {
1392
1333
  F: __dxlog_file3,
1393
- L: 270,
1334
+ L: 254,
1394
1335
  S: void 0,
1395
1336
  C: (f, a) => f(...a)
1396
1337
  });
@@ -1422,7 +1363,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1422
1363
  last: all.at(-1),
1423
1364
  all
1424
1365
  };
1425
- yield* Ref2.update(historyRef, (h) => h.filter((_, index) => index !== last));
1366
+ yield* Ref.update(historyRef, (h) => h.filter((_, index) => index !== last));
1426
1367
  return yield* dispatch(intent);
1427
1368
  }
1428
1369
  });
@@ -1444,14 +1385,16 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1444
1385
  var defaultEffect = () => Effect3.fail(new Error("Intent runtime not ready"));
1445
1386
  var defaultPromise = () => Effect3.runPromise(defaultEffect());
1446
1387
  var intent_dispatcher_default = (context) => {
1447
- const state = live2({
1388
+ const state = create3({
1448
1389
  dispatch: defaultEffect,
1449
1390
  dispatchPromise: defaultPromise,
1450
1391
  undo: defaultEffect,
1451
1392
  undoPromise: defaultPromise
1452
1393
  });
1453
- const { dispatch, dispatchPromise, undo, undoPromise } = createDispatcher(() => context.getCapabilities(Capabilities.IntentResolver).flat());
1454
- const manager = context.getCapability(Capabilities.PluginManager);
1394
+ const { dispatch, dispatchPromise, undo, undoPromise } = createDispatcher((module) => context.requestCapabilities(Capabilities.IntentResolver, (c, moduleId) => {
1395
+ return module ? moduleId === module : true;
1396
+ }).flat());
1397
+ const manager = context.requestCapability(Capabilities.PluginManager);
1455
1398
  state.dispatch = (intentChain, depth) => {
1456
1399
  return Effect3.gen(function* () {
1457
1400
  yield* manager._activate(Events.SetupIntentResolver);
@@ -1471,7 +1414,7 @@ export {
1471
1414
  defineCapability,
1472
1415
  contributes,
1473
1416
  lazy,
1474
- PluginContext,
1417
+ PluginsContext,
1475
1418
  defineEvent,
1476
1419
  eventKey,
1477
1420
  oneOf,
@@ -1485,7 +1428,6 @@ export {
1485
1428
  Plugin,
1486
1429
  definePlugin,
1487
1430
  Capabilities,
1488
- CollaborationActions,
1489
1431
  Events,
1490
1432
  defaultFileTypes,
1491
1433
  FileInfoSchema,
@@ -1507,4 +1449,4 @@ export {
1507
1449
  ResourceLanguage,
1508
1450
  Resource
1509
1451
  };
1510
- //# sourceMappingURL=chunk-2KSDY3EZ.mjs.map
1452
+ //# sourceMappingURL=chunk-6AVTZPMT.mjs.map