@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
@@ -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 } from "effect";
3
- import { create as create3 } from "@dxos/live-object";
2
+ import { Effect as Effect3, Option, pipe as pipe2, Ref as Ref2 } from "effect";
3
+ import { live as live2 } 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 S2 } from "effect";
8
+ import { Schema as Schema2 } from "effect";
9
9
 
10
10
  // packages/sdk/app-framework/src/plugin-intent/intent.ts
11
- import { Schema as S } from "effect";
11
+ import { Schema } from "effect";
12
12
  var createIntent = (schema, data = {}, params = {}) => {
13
- const _ = S.validateSync(schema.fields.input)(data);
13
+ const _ = Schema.validateSync(schema.fields.input)(data);
14
14
  const intent = {
15
15
  ...params,
16
16
  _schema: schema,
@@ -45,43 +45,41 @@ var chain = (schema, data = {}, params = {}) => (intent) => {
45
45
  ]
46
46
  };
47
47
  };
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)
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)
51
51
  })))));
52
52
 
53
53
  // packages/sdk/app-framework/src/plugin-intent/actions.ts
54
54
  var INTENT_PLUGIN = "dxos.org/plugin/intent";
55
55
  var INTENT_ACTION = `${INTENT_PLUGIN}/action`;
56
- var IntentAction;
57
56
  (function(IntentAction2) {
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)
57
+ class Track extends Schema2.TaggedClass()(`${INTENT_ACTION}/track`, {
58
+ input: Schema2.Struct({
59
+ intents: Schema2.Array(Schema2.String),
60
+ error: Schema2.optional(Schema2.String)
62
61
  }),
63
- output: S2.Void
62
+ output: Schema2.Void
64
63
  }) {
65
64
  }
66
65
  IntentAction2.Track = Track;
67
- class ShowUndo extends S2.TaggedClass()(`${INTENT_ACTION}/show-undo`, {
68
- input: S2.Struct({
66
+ class ShowUndo extends Schema2.TaggedClass()(`${INTENT_ACTION}/show-undo`, {
67
+ input: Schema2.Struct({
69
68
  message: Label
70
69
  }),
71
- output: S2.Void
70
+ output: Schema2.Void
72
71
  }) {
73
72
  }
74
73
  IntentAction2.ShowUndo = ShowUndo;
75
74
  })(IntentAction || (IntentAction = {}));
75
+ var IntentAction;
76
76
 
77
77
  // packages/sdk/app-framework/src/plugin-intent/errors.ts
78
78
  var BaseError = class extends Error {
79
79
  constructor(code, message, context) {
80
80
  super(message ?? code, {
81
81
  cause: context
82
- });
83
- this.code = code;
84
- this.context = context;
82
+ }), this.code = code, this.context = context;
85
83
  this.name = code;
86
84
  Object.setPrototypeOf(this, new.target.prototype);
87
85
  }
@@ -100,11 +98,10 @@ var CycleDetectedError = class extends BaseError {
100
98
  };
101
99
 
102
100
  // packages/sdk/app-framework/src/core/capabilities.ts
103
- import { effect, untracked } from "@preact/signals-core";
101
+ import { Rx } from "@effect-rx/rx-react";
104
102
  import { Effect } from "effect";
105
103
  import { Trigger } from "@dxos/async";
106
104
  import { invariant } from "@dxos/invariant";
107
- import { create } from "@dxos/live-object";
108
105
  import { log } from "@dxos/log";
109
106
  var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/core/capabilities.ts";
110
107
  var InterfaceDefTypeId = Symbol.for("InterfaceDefTypeId");
@@ -130,9 +127,33 @@ var lazy = (c) => async (props) => {
130
127
  const { default: getCapability } = await c();
131
128
  return async () => getCapability(props);
132
129
  };
133
- var PluginsContext = class {
134
- constructor({ activate, reset }) {
135
- this._definedCapabilities = /* @__PURE__ */ new Map();
130
+ var PluginContext = class {
131
+ constructor({ registry, activate, reset }) {
132
+ this._capabilityImpls = Rx.family(() => {
133
+ return Rx.make([]).pipe(Rx.keepAlive);
134
+ });
135
+ this._capabilities = Rx.family((id) => {
136
+ return Rx.make((get) => {
137
+ const current = get(this._capabilityImpls(id));
138
+ return current.map((c) => c.implementation);
139
+ });
140
+ });
141
+ this._capability = Rx.family((id) => {
142
+ return Rx.make((get) => {
143
+ const current = get(this._capabilities(id));
144
+ invariant(current.length > 0, `No capability found for ${id}`, {
145
+ F: __dxlog_file,
146
+ L: 117,
147
+ S: this,
148
+ A: [
149
+ "current.length > 0",
150
+ "`No capability found for ${id}`"
151
+ ]
152
+ });
153
+ return current[0];
154
+ });
155
+ });
156
+ this._registry = registry;
136
157
  this.activate = activate;
137
158
  this.reset = reset;
138
159
  }
@@ -140,22 +161,22 @@ var PluginsContext = class {
140
161
  * @internal
141
162
  */
142
163
  contributeCapability({ module: moduleId, interface: interfaceDef, implementation }) {
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);
164
+ const current = this._registry.get(this._capabilityImpls(interfaceDef.identifier));
165
+ const capability = new CapabilityImpl(moduleId, implementation);
166
+ if (current.includes(capability)) {
167
+ return;
150
168
  }
151
- current.push(new CapabilityImpl(moduleId, implementation));
169
+ this._registry.set(this._capabilityImpls(interfaceDef.identifier), [
170
+ ...current,
171
+ capability
172
+ ]);
152
173
  log("capability contributed", {
153
174
  id: interfaceDef.identifier,
154
175
  moduleId,
155
- count: untracked(() => current.length)
176
+ count: current.length
156
177
  }, {
157
178
  F: __dxlog_file,
158
- L: 142,
179
+ L: 161,
159
180
  S: this,
160
181
  C: (f, a) => f(...a)
161
182
  });
@@ -164,19 +185,19 @@ var PluginsContext = class {
164
185
  * @internal
165
186
  */
166
187
  removeCapability(interfaceDef, implementation) {
167
- const current = this._definedCapabilities.get(interfaceDef.identifier);
168
- if (!current) {
188
+ const current = this._registry.get(this._capabilityImpls(interfaceDef.identifier));
189
+ if (current.length === 0) {
169
190
  return;
170
191
  }
171
- const index = current.findIndex((i) => i.implementation === implementation);
172
- if (index !== -1) {
173
- current.splice(index, 1);
192
+ const next = current.filter((c) => c.implementation !== implementation);
193
+ if (next.length !== current.length) {
194
+ this._registry.set(this._capabilityImpls(interfaceDef.identifier), next);
174
195
  log("capability removed", {
175
196
  id: interfaceDef.identifier,
176
- count: untracked(() => current.length)
197
+ count: current.length
177
198
  }, {
178
199
  F: __dxlog_file,
179
- L: 161,
200
+ L: 180,
180
201
  S: this,
181
202
  C: (f, a) => f(...a)
182
203
  });
@@ -185,63 +206,64 @@ var PluginsContext = class {
185
206
  id: interfaceDef.identifier
186
207
  }, {
187
208
  F: __dxlog_file,
188
- L: 163,
209
+ L: 182,
189
210
  S: this,
190
211
  C: (f, a) => f(...a)
191
212
  });
192
213
  }
193
214
  }
194
215
  /**
195
- * Requests capabilities from the plugin context.
216
+ * Get the Rx reference to the available capabilities for a given interface.
217
+ * Primarily useful for deriving other Rx values based on the capabilities or
218
+ * for subscribing to changes in the capabilities.
219
+ * @returns An Rx reference to the available capabilities.
220
+ */
221
+ capabilities(interfaceDef) {
222
+ return this._capabilities(interfaceDef.identifier);
223
+ }
224
+ /**
225
+ * Get the Rx reference to the available capabilities for a given interface.
226
+ * Primarily useful for deriving other Rx values based on the capability or
227
+ * for subscribing to changes in the capability.
228
+ * @returns An Rx reference to the available capability.
229
+ * @throws If no capability is found.
230
+ */
231
+ capability(interfaceDef) {
232
+ return this._capability(interfaceDef.identifier);
233
+ }
234
+ /**
235
+ * Get capabilities from the plugin context.
196
236
  * @returns An array of capabilities.
197
- * @reactive
198
237
  */
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);
238
+ getCapabilities(interfaceDef) {
239
+ return this._registry.get(this.capabilities(interfaceDef));
210
240
  }
211
241
  /**
212
242
  * Requests a single capability from the plugin context.
213
243
  * @returns The capability.
214
244
  * @throws If no capability is found.
215
- * @reactive
216
245
  */
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;
246
+ getCapability(interfaceDef) {
247
+ return this._registry.get(this.capability(interfaceDef));
229
248
  }
230
249
  /**
231
- * Waits for a capability to be contributed.
250
+ * Waits for a capability to be available.
232
251
  * @returns The capability.
233
252
  */
234
- async waitForCapability(interfaceDef, filter) {
253
+ async waitForCapability(interfaceDef) {
254
+ const [capability] = this.getCapabilities(interfaceDef);
255
+ if (capability) {
256
+ return capability;
257
+ }
235
258
  const trigger = new Trigger();
236
- const unsubscribe = effect(() => {
237
- const capabilities = this.requestCapabilities(interfaceDef, filter);
238
- if (capabilities[0]) {
259
+ const cancel = this._registry.subscribe(this.capabilities(interfaceDef), (capabilities) => {
260
+ if (capabilities.length > 0) {
239
261
  trigger.wake(capabilities[0]);
240
262
  }
241
263
  });
242
- const capability = await trigger.wait();
243
- unsubscribe();
244
- return capability;
264
+ const result = await trigger.wait();
265
+ cancel();
266
+ return result;
245
267
  }
246
268
  async activatePromise(event) {
247
269
  return this.activate(event).pipe(Effect.runPromise);
@@ -274,25 +296,28 @@ var getEvents = (events) => "type" in events ? events.events : [
274
296
  ];
275
297
 
276
298
  // packages/sdk/app-framework/src/core/manager.ts
277
- import { untracked as untracked2 } from "@preact/signals-core";
299
+ import { Registry } from "@effect-rx/rx-react";
300
+ import { untracked } from "@preact/signals-core";
278
301
  import { Array as A, Effect as Effect2, Either, Match, pipe } from "effect";
279
302
  import { Event } from "@dxos/async";
280
- import { create as create2 } from "@dxos/live-object";
303
+ import { live } from "@dxos/live-object";
281
304
  import { log as log2 } from "@dxos/log";
282
305
  var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/core/manager.ts";
283
306
  var isPromise = (value) => {
284
307
  return value !== null && typeof value === "object" && "then" in value;
285
308
  };
286
309
  var PluginManager = class {
287
- constructor({ pluginLoader, plugins = [], core = plugins.map(({ meta }) => meta.id), enabled = [] }) {
310
+ constructor({ pluginLoader, plugins = [], core = plugins.map(({ meta }) => meta.id), enabled = [], registry }) {
288
311
  this.activation = new Event();
289
- this.context = new PluginsContext({
312
+ this._capabilities = /* @__PURE__ */ new Map();
313
+ this.registry = registry ?? Registry.make();
314
+ this.context = new PluginContext({
315
+ registry: this.registry,
290
316
  activate: (event) => this._activate(event),
291
317
  reset: (id) => this._reset(id)
292
318
  });
293
- this._capabilities = /* @__PURE__ */ new Map();
294
319
  this._pluginLoader = pluginLoader;
295
- this._state = create2({
320
+ this._state = live({
296
321
  plugins,
297
322
  core,
298
323
  enabled,
@@ -366,12 +391,12 @@ var PluginManager = class {
366
391
  * @param id The id of the plugin.
367
392
  */
368
393
  async add(id) {
369
- return untracked2(async () => {
394
+ return untracked(async () => {
370
395
  log2("add plugin", {
371
396
  id
372
397
  }, {
373
398
  F: __dxlog_file2,
374
- L: 146,
399
+ L: 154,
375
400
  S: this,
376
401
  C: (f, a) => f(...a)
377
402
  });
@@ -385,12 +410,12 @@ var PluginManager = class {
385
410
  * @param id The id of the plugin.
386
411
  */
387
412
  enable(id) {
388
- return untracked2(async () => {
413
+ return untracked(async () => {
389
414
  log2("enable plugin", {
390
415
  id
391
416
  }, {
392
417
  F: __dxlog_file2,
393
- L: 159,
418
+ L: 167,
394
419
  S: this,
395
420
  C: (f, a) => f(...a)
396
421
  });
@@ -411,7 +436,7 @@ var PluginManager = class {
411
436
  ]
412
437
  }, {
413
438
  F: __dxlog_file2,
414
- L: 174,
439
+ L: 182,
415
440
  S: this,
416
441
  C: (f, a) => f(...a)
417
442
  });
@@ -426,12 +451,12 @@ var PluginManager = class {
426
451
  * @param id The id of the plugin.
427
452
  */
428
453
  remove(id) {
429
- return untracked2(() => {
454
+ return untracked(() => {
430
455
  log2("remove plugin", {
431
456
  id
432
457
  }, {
433
458
  F: __dxlog_file2,
434
- L: 192,
459
+ L: 200,
435
460
  S: this,
436
461
  C: (f, a) => f(...a)
437
462
  });
@@ -448,12 +473,12 @@ var PluginManager = class {
448
473
  * @param id The id of the plugin.
449
474
  */
450
475
  disable(id) {
451
- return untracked2(async () => {
476
+ return untracked(async () => {
452
477
  log2("disable plugin", {
453
478
  id
454
479
  }, {
455
480
  F: __dxlog_file2,
456
- L: 209,
481
+ L: 217,
457
482
  S: this,
458
483
  C: (f, a) => f(...a)
459
484
  });
@@ -481,7 +506,7 @@ var PluginManager = class {
481
506
  * @returns Whether the activation was successful.
482
507
  */
483
508
  activate(event) {
484
- return untracked2(() => Effect2.runPromise(this._activate(event)));
509
+ return untracked(() => Effect2.runPromise(this._activate(event)));
485
510
  }
486
511
  /**
487
512
  * Deactivates all of the modules for a plugin.
@@ -489,7 +514,7 @@ var PluginManager = class {
489
514
  * @returns Whether the deactivation was successful.
490
515
  */
491
516
  deactivate(id) {
492
- return untracked2(() => Effect2.runPromise(this._deactivate(id)));
517
+ return untracked(() => Effect2.runPromise(this._deactivate(id)));
493
518
  }
494
519
  /**
495
520
  * Re-activates the modules that were activated by the event.
@@ -497,15 +522,15 @@ var PluginManager = class {
497
522
  * @returns Whether the reset was successful.
498
523
  */
499
524
  reset(event) {
500
- return untracked2(() => Effect2.runPromise(this._reset(event)));
525
+ return untracked(() => Effect2.runPromise(this._reset(event)));
501
526
  }
502
527
  _addPlugin(plugin) {
503
- untracked2(() => {
528
+ untracked(() => {
504
529
  log2("add plugin", {
505
530
  id: plugin.meta.id
506
531
  }, {
507
532
  F: __dxlog_file2,
508
- L: 262,
533
+ L: 270,
509
534
  S: this,
510
535
  C: (f, a) => f(...a)
511
536
  });
@@ -515,12 +540,12 @@ var PluginManager = class {
515
540
  });
516
541
  }
517
542
  _removePlugin(id) {
518
- untracked2(() => {
543
+ untracked(() => {
519
544
  log2("remove plugin", {
520
545
  id
521
546
  }, {
522
547
  F: __dxlog_file2,
523
- L: 271,
548
+ L: 279,
524
549
  S: this,
525
550
  C: (f, a) => f(...a)
526
551
  });
@@ -531,12 +556,12 @@ var PluginManager = class {
531
556
  });
532
557
  }
533
558
  _addModule(module) {
534
- untracked2(() => {
559
+ untracked(() => {
535
560
  log2("add module", {
536
561
  id: module.id
537
562
  }, {
538
563
  F: __dxlog_file2,
539
- L: 281,
564
+ L: 289,
540
565
  S: this,
541
566
  C: (f, a) => f(...a)
542
567
  });
@@ -546,12 +571,12 @@ var PluginManager = class {
546
571
  });
547
572
  }
548
573
  _removeModule(id) {
549
- untracked2(() => {
574
+ untracked(() => {
550
575
  log2("remove module", {
551
576
  id
552
577
  }, {
553
578
  F: __dxlog_file2,
554
- L: 290,
579
+ L: 298,
555
580
  S: this,
556
581
  C: (f, a) => f(...a)
557
582
  });
@@ -577,7 +602,7 @@ var PluginManager = class {
577
602
  return this._getInactiveModules().filter((module) => getEvents(module.activatesOn).map(eventKey).includes(key));
578
603
  }
579
604
  _setPendingResetByModule(module) {
580
- return untracked2(() => {
605
+ return untracked(() => {
581
606
  const activationEvents = getEvents(module.activatesOn).map(eventKey).filter((key) => this._state.eventsFired.includes(key));
582
607
  const pendingReset = Array.from(new Set(activationEvents)).filter((event) => !this._state.pendingReset.includes(event));
583
608
  if (pendingReset.length > 0) {
@@ -585,7 +610,7 @@ var PluginManager = class {
585
610
  events: pendingReset
586
611
  }, {
587
612
  F: __dxlog_file2,
588
- L: 328,
613
+ L: 336,
589
614
  S: this,
590
615
  C: (f, a) => f(...a)
591
616
  });
@@ -604,7 +629,7 @@ var PluginManager = class {
604
629
  key
605
630
  }, {
606
631
  F: __dxlog_file2,
607
- L: 341,
632
+ L: 349,
608
633
  S: this,
609
634
  C: (f, a) => f(...a)
610
635
  });
@@ -625,7 +650,7 @@ var PluginManager = class {
625
650
  key
626
651
  }, {
627
652
  F: __dxlog_file2,
628
- L: 357,
653
+ L: 365,
629
654
  S: this,
630
655
  C: (f, a) => f(...a)
631
656
  });
@@ -639,7 +664,7 @@ var PluginManager = class {
639
664
  modules: modules.map((module) => module.id)
640
665
  }, {
641
666
  F: __dxlog_file2,
642
- L: 364,
667
+ L: 372,
643
668
  S: this,
644
669
  C: (f, a) => f(...a)
645
670
  });
@@ -681,7 +706,7 @@ var PluginManager = class {
681
706
  key
682
707
  }, {
683
708
  F: __dxlog_file2,
684
- L: 398,
709
+ L: 406,
685
710
  S: this,
686
711
  C: (f, a) => f(...a)
687
712
  });
@@ -697,7 +722,7 @@ var PluginManager = class {
697
722
  module: module.id
698
723
  }, {
699
724
  F: __dxlog_file2,
700
- L: 413,
725
+ L: 421,
701
726
  S: this,
702
727
  C: (f, a) => f(...a)
703
728
  });
@@ -726,7 +751,7 @@ var PluginManager = class {
726
751
  module: module.id
727
752
  }, {
728
753
  F: __dxlog_file2,
729
- L: 436,
754
+ L: 444,
730
755
  S: this,
731
756
  C: (f, a) => f(...a)
732
757
  });
@@ -755,7 +780,7 @@ var PluginManager = class {
755
780
  id
756
781
  }, {
757
782
  F: __dxlog_file2,
758
- L: 463,
783
+ L: 471,
759
784
  S: this,
760
785
  C: (f, a) => f(...a)
761
786
  });
@@ -764,7 +789,7 @@ var PluginManager = class {
764
789
  for (const capability of capabilities) {
765
790
  this.context.removeCapability(capability.interface, capability.implementation);
766
791
  const program = capability.deactivate?.();
767
- yield* Match.value(program).pipe(Match.when(Effect2.isEffect, (effect2) => effect2), Match.when(isPromise, (promise) => Effect2.tryPromise({
792
+ yield* Match.value(program).pipe(Match.when(Effect2.isEffect, (effect) => effect), Match.when(isPromise, (promise) => Effect2.tryPromise({
768
793
  try: () => promise,
769
794
  catch: (error) => error
770
795
  })), Match.orElse((program2) => Effect2.succeed(program2)));
@@ -779,7 +804,7 @@ var PluginManager = class {
779
804
  id
780
805
  }, {
781
806
  F: __dxlog_file2,
782
- L: 489,
807
+ L: 497,
783
808
  S: this,
784
809
  C: (f, a) => f(...a)
785
810
  });
@@ -793,7 +818,7 @@ var PluginManager = class {
793
818
  key
794
819
  }, {
795
820
  F: __dxlog_file2,
796
- L: 497,
821
+ L: 505,
797
822
  S: this,
798
823
  C: (f, a) => f(...a)
799
824
  });
@@ -832,10 +857,10 @@ var definePlugin = (meta, modules) => {
832
857
  };
833
858
 
834
859
  // packages/sdk/app-framework/src/common/capabilities.ts
835
- var Capabilities;
836
860
  (function(Capabilities2) {
837
861
  Capabilities2.PluginManager = defineCapability("dxos.org/app-framework/capability/plugin-manager");
838
862
  Capabilities2.Null = defineCapability("dxos.org/app-framework/capability/null");
863
+ Capabilities2.RxRegistry = defineCapability("dxos.org/app-framework/capability/rx-registry");
839
864
  Capabilities2.ReactContext = defineCapability("dxos.org/app-framework/capability/react-context");
840
865
  Capabilities2.ReactRoot = defineCapability("dxos.org/app-framework/capability/react-root");
841
866
  Capabilities2.ReactSurface = defineCapability("dxos.org/app-framework/common/react-surface");
@@ -852,10 +877,31 @@ var Capabilities;
852
877
  Capabilities2.Tools = defineCapability("dxos.org/app-framework/capability/tools");
853
878
  Capabilities2.ArtifactDefinition = defineCapability("dxos.org/app-framework/capability/artifact-definition");
854
879
  Capabilities2.FileUploader = defineCapability("dxos.org/app-framework/capability/file-uploader");
880
+ Capabilities2.AnchorSort = defineCapability("dxos.org/app-framework/capability/anchor-sort");
855
881
  })(Capabilities || (Capabilities = {}));
882
+ var Capabilities;
883
+
884
+ // packages/sdk/app-framework/src/common/collaboration.ts
885
+ import { Schema as Schema3 } from "effect";
886
+ import { Expando, Ref } from "@dxos/echo-schema";
887
+ (function(CollaborationActions2) {
888
+ class InsertContent extends Schema3.TaggedClass()("assistant/intent-content", {
889
+ input: Schema3.Struct({
890
+ target: Expando,
891
+ object: Ref(Expando),
892
+ at: Schema3.optional(Schema3.String),
893
+ label: Schema3.String.pipe(Schema3.optional)
894
+ }).annotations({
895
+ description: "Enables plugins to inject content blocks or references into a related entity."
896
+ }),
897
+ output: Schema3.Void
898
+ }) {
899
+ }
900
+ CollaborationActions2.InsertContent = InsertContent;
901
+ })(CollaborationActions || (CollaborationActions = {}));
902
+ var CollaborationActions;
856
903
 
857
904
  // packages/sdk/app-framework/src/common/events.ts
858
- var Events;
859
905
  (function(Events2) {
860
906
  Events2.Startup = defineEvent("dxos.org/app-framework/event/startup");
861
907
  Events2.SetupReactSurface = defineEvent("dxos.org/app-framework/event/setup-react-surface");
@@ -871,9 +917,10 @@ var Events;
871
917
  Events2.createStateEvent = (specifier) => defineEvent("dxos.org/app-framework/event/state", specifier);
872
918
  Events2.LayoutReady = Events2.createStateEvent(Capabilities.Layout.identifier);
873
919
  })(Events || (Events = {}));
920
+ var Events;
874
921
 
875
922
  // packages/sdk/app-framework/src/common/file.ts
876
- import { Schema as S3 } from "effect";
923
+ import { Schema as Schema4 } from "effect";
877
924
  var defaultFileTypes = {
878
925
  images: [
879
926
  "png",
@@ -893,15 +940,15 @@ var defaultFileTypes = {
893
940
  "md"
894
941
  ]
895
942
  };
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)
943
+ var FileInfoSchema = Schema4.Struct({
944
+ name: Schema4.String,
945
+ type: Schema4.String,
946
+ url: Schema4.optional(Schema4.String),
947
+ cid: Schema4.optional(Schema4.String)
901
948
  });
902
949
 
903
950
  // packages/sdk/app-framework/src/common/layout.ts
904
- import { Schema as S4 } from "effect";
951
+ import { Schema as Schema5 } from "effect";
905
952
 
906
953
  // packages/sdk/app-framework/src/plugin-intent/IntentPlugin.tsx
907
954
  var IntentPlugin = () => definePlugin({
@@ -917,343 +964,362 @@ var IntentPlugin = () => definePlugin({
917
964
  activatesAfter: [
918
965
  Events.DispatcherReady
919
966
  ],
920
- activate: lazy(() => import("./intent-dispatcher-3Q67MHZZ.mjs"))
967
+ activate: lazy(() => import("./intent-dispatcher-ELZN5EM7.mjs"))
921
968
  })
922
969
  ]);
923
970
 
924
971
  // packages/sdk/app-framework/src/common/layout.ts
925
972
  var LAYOUT_PLUGIN = "dxos.org/plugin/layout";
926
973
  var LAYOUT_ACTION = `${LAYOUT_PLUGIN}/action`;
927
- var LayoutAction;
928
974
  (function(LayoutAction2) {
929
975
  LayoutAction2.UPDATE_LAYOUT = `${LAYOUT_ACTION}/update-layout`;
930
- class UpdateLayout extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
931
- input: S4.Struct({
932
- part: S4.String.annotations({
976
+ class UpdateLayout extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
977
+ input: Schema5.Struct({
978
+ part: Schema5.String.annotations({
933
979
  description: "The part of the layout to mutate."
934
980
  }),
935
- subject: S4.optional(S4.Any.annotations({
981
+ subject: Schema5.optional(Schema5.Any.annotations({
936
982
  description: "The subject of the layout update."
937
983
  })),
938
- options: S4.optional(S4.Record({
939
- key: S4.String,
940
- value: S4.Any
984
+ options: Schema5.optional(Schema5.Record({
985
+ key: Schema5.String,
986
+ value: Schema5.Any
941
987
  }).annotations({
942
988
  description: "Additional options for the layout action."
943
989
  }))
944
990
  }),
945
- output: S4.Void
991
+ output: Schema5.Void
946
992
  }) {
947
993
  }
948
994
  LayoutAction2.UpdateLayout = UpdateLayout;
949
- class SetLayoutMode extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
950
- input: S4.Struct({
951
- part: S4.Literal("mode").annotations({
995
+ class SetLayoutMode extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
996
+ input: Schema5.Struct({
997
+ part: Schema5.Literal("mode").annotations({
952
998
  description: "Setting the layout mode."
953
999
  }),
954
- subject: S4.optional(S4.String.annotations({
1000
+ subject: Schema5.optional(Schema5.String.annotations({
955
1001
  description: "Item which is the subject of the new layout mode."
956
1002
  })),
957
- options: S4.Union(S4.Struct({
958
- mode: S4.String.annotations({
1003
+ options: Schema5.Union(Schema5.Struct({
1004
+ mode: Schema5.String.annotations({
959
1005
  description: "The new layout mode."
960
1006
  })
961
- }), S4.Struct({
962
- revert: S4.Boolean.annotations({
1007
+ }), Schema5.Struct({
1008
+ revert: Schema5.Boolean.annotations({
963
1009
  description: "Revert to the previous layout mode."
964
1010
  })
965
1011
  }))
966
1012
  }),
967
- output: S4.Void
1013
+ output: Schema5.Void
968
1014
  }) {
969
1015
  }
970
1016
  LayoutAction2.SetLayoutMode = SetLayoutMode;
971
- class UpdateSidebar extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
972
- input: S4.Struct({
973
- part: S4.Literal("sidebar").annotations({
1017
+ class UpdateSidebar extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1018
+ input: Schema5.Struct({
1019
+ part: Schema5.Literal("sidebar").annotations({
974
1020
  description: "Updating the sidebar."
975
1021
  }),
976
- subject: S4.optional(S4.String.annotations({
1022
+ subject: Schema5.optional(Schema5.String.annotations({
977
1023
  description: "URI of the component to display in the sidebar."
978
1024
  })),
979
- options: S4.optional(S4.Struct({
980
- state: S4.Literal("closed", "collapsed", "expanded").annotations({
1025
+ options: Schema5.optional(Schema5.Struct({
1026
+ state: Schema5.Literal("closed", "collapsed", "expanded").annotations({
981
1027
  description: "Whether the sidebar is closed, collapsed, or expanded."
982
1028
  })
983
1029
  }))
984
1030
  }),
985
- output: S4.Void
1031
+ output: Schema5.Void
986
1032
  }) {
987
1033
  }
988
1034
  LayoutAction2.UpdateSidebar = UpdateSidebar;
989
- class UpdateComplementary extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
990
- input: S4.Struct({
991
- part: S4.Literal("complementary").annotations({
1035
+ class UpdateComplementary extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1036
+ input: Schema5.Struct({
1037
+ part: Schema5.Literal("complementary").annotations({
992
1038
  description: "Updating the complementary sidebar."
993
1039
  }),
994
- subject: S4.optional(S4.String.annotations({
1040
+ subject: Schema5.optional(Schema5.String.annotations({
995
1041
  description: "URI of the component to display in the complementary area."
996
1042
  })),
997
- options: S4.optional(S4.Struct({
998
- state: S4.Literal("closed", "collapsed", "expanded").annotations({
1043
+ options: Schema5.optional(Schema5.Struct({
1044
+ state: Schema5.Literal("closed", "collapsed", "expanded").annotations({
999
1045
  description: "Whether the complementary sidebar is closed, collapsed, or expanded."
1000
1046
  })
1001
1047
  }))
1002
1048
  }),
1003
- output: S4.Void
1049
+ output: Schema5.Void
1004
1050
  }) {
1005
1051
  }
1006
1052
  LayoutAction2.UpdateComplementary = UpdateComplementary;
1007
- class UpdateDialog extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1008
- input: S4.Struct({
1009
- part: S4.Literal("dialog").annotations({
1053
+ class UpdateDialog extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1054
+ input: Schema5.Struct({
1055
+ part: Schema5.Literal("dialog").annotations({
1010
1056
  description: "Updating the dialog."
1011
1057
  }),
1012
- subject: S4.optional(S4.String.annotations({
1058
+ subject: Schema5.optional(Schema5.String.annotations({
1013
1059
  description: "URI of the component to display in the dialog."
1014
1060
  })),
1015
- options: S4.Struct({
1016
- state: S4.optional(S4.Boolean.annotations({
1061
+ options: Schema5.Struct({
1062
+ state: Schema5.optional(Schema5.Boolean.annotations({
1017
1063
  description: "Whether the dialog is open or closed."
1018
1064
  })),
1019
- blockAlign: S4.optional(S4.Literal("start", "center", "end").annotations({
1065
+ type: Schema5.optional(Schema5.Literal("default", "alert").annotations({
1066
+ description: "The type of dialog."
1067
+ })),
1068
+ blockAlign: Schema5.optional(Schema5.Literal("start", "center", "end").annotations({
1020
1069
  description: "The alignment of the dialog."
1021
1070
  })),
1022
- type: S4.optional(S4.Literal("default", "alert").annotations({
1023
- description: "The type of dialog."
1071
+ overlayClasses: Schema5.optional(Schema5.String.annotations({
1072
+ description: "Additional classes for the dialog overlay."
1073
+ })),
1074
+ overlayStyle: Schema5.optional(Schema5.Record({
1075
+ key: Schema5.String,
1076
+ value: Schema5.Any
1077
+ }).annotations({
1078
+ description: "Additional styles for the dialog overlay."
1024
1079
  })),
1025
- props: S4.optional(S4.Record({
1026
- key: S4.String,
1027
- value: S4.Any
1080
+ props: Schema5.optional(Schema5.Record({
1081
+ key: Schema5.String,
1082
+ value: Schema5.Any
1028
1083
  }).annotations({
1029
1084
  description: "Additional props for the dialog."
1030
1085
  }))
1031
1086
  })
1032
1087
  }),
1033
- output: S4.Void
1088
+ output: Schema5.Void
1034
1089
  }) {
1035
1090
  }
1036
1091
  LayoutAction2.UpdateDialog = UpdateDialog;
1037
- class UpdatePopover extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1038
- input: S4.Struct({
1039
- part: S4.Literal("popover").annotations({
1092
+ class UpdatePopover extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1093
+ input: Schema5.Struct({
1094
+ part: Schema5.Literal("popover").annotations({
1040
1095
  description: "Updating the popover."
1041
1096
  }),
1042
- subject: S4.optional(S4.String.annotations({
1043
- description: "URI of the component to display in the popover."
1097
+ subject: Schema5.optional(Schema5.Any.annotations({
1098
+ description: "URI of the component to display in the popover or data to pass to the popover."
1044
1099
  })),
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({
1100
+ options: Schema5.Struct({
1101
+ side: Schema5.optional(Schema5.Literal("top", "right", "bottom", "left").annotations({
1050
1102
  description: "The side of the anchor."
1051
1103
  })),
1052
- state: S4.optional(S4.Boolean.annotations({
1104
+ state: Schema5.optional(Schema5.Boolean.annotations({
1053
1105
  description: "Whether the popover is open or closed."
1054
1106
  })),
1055
- props: S4.optional(S4.Record({
1056
- key: S4.String,
1057
- value: S4.Any
1107
+ props: Schema5.optional(Schema5.Record({
1108
+ key: Schema5.String,
1109
+ value: Schema5.Any
1058
1110
  }).annotations({
1059
1111
  description: "Additional props for the popover."
1060
1112
  }))
1061
- })
1113
+ }).pipe(Schema5.extend(Schema5.Union(Schema5.Struct({
1114
+ variant: Schema5.Literal("virtual"),
1115
+ anchor: Schema5.Any.annotations({
1116
+ description: "The DOM element to anchor the popover to."
1117
+ })
1118
+ }), Schema5.Struct({
1119
+ variant: Schema5.optional(Schema5.Literal("react")),
1120
+ anchorId: Schema5.String.annotations({
1121
+ description: "An id that can be used to determine whether to render the anchor subcomponent."
1122
+ })
1123
+ }))))
1062
1124
  }),
1063
- output: S4.Void
1125
+ output: Schema5.Void
1064
1126
  }) {
1065
1127
  }
1066
1128
  LayoutAction2.UpdatePopover = UpdatePopover;
1067
- LayoutAction2.Toast = S4.Struct({
1068
- id: S4.String.annotations({
1129
+ LayoutAction2.Toast = Schema5.Struct({
1130
+ id: Schema5.String.annotations({
1069
1131
  description: "The id of the toast."
1070
1132
  }),
1071
- title: S4.optional(Label.annotations({
1133
+ title: Schema5.optional(Label.annotations({
1072
1134
  description: "The title of the toast."
1073
1135
  })),
1074
- description: S4.optional(Label.annotations({
1136
+ description: Schema5.optional(Label.annotations({
1075
1137
  description: "The description of the toast."
1076
1138
  })),
1077
- icon: S4.optional(S4.String.annotations({
1139
+ icon: Schema5.optional(Schema5.String.annotations({
1078
1140
  description: "The icon of the toast."
1079
1141
  })),
1080
- duration: S4.optional(S4.Number.annotations({
1142
+ duration: Schema5.optional(Schema5.Number.annotations({
1081
1143
  description: "The duration of the toast."
1082
1144
  })),
1083
- closeLabel: S4.optional(Label.annotations({
1145
+ closeLabel: Schema5.optional(Label.annotations({
1084
1146
  description: "The label of the close button."
1085
1147
  })),
1086
- actionLabel: S4.optional(Label.annotations({
1148
+ actionLabel: Schema5.optional(Label.annotations({
1087
1149
  description: "The label of the action button."
1088
1150
  })),
1089
- actionAlt: S4.optional(Label.annotations({
1151
+ actionAlt: Schema5.optional(Label.annotations({
1090
1152
  description: "The alt text of the action button."
1091
1153
  })),
1092
- onAction: S4.optional(S4.Any.annotations({
1154
+ onAction: Schema5.optional(Schema5.Any.annotations({
1093
1155
  description: "The action to perform when the action button is clicked."
1094
1156
  }))
1095
1157
  });
1096
- class AddToast extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1097
- input: S4.Struct({
1098
- part: S4.Literal("toast").annotations({
1158
+ class AddToast extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1159
+ input: Schema5.Struct({
1160
+ part: Schema5.Literal("toast").annotations({
1099
1161
  description: "Adding a toast."
1100
1162
  }),
1101
1163
  subject: LayoutAction2.Toast.annotations({
1102
1164
  description: "The toast to add."
1103
1165
  })
1104
1166
  }),
1105
- output: S4.Void
1167
+ output: Schema5.Void
1106
1168
  }) {
1107
1169
  }
1108
1170
  LayoutAction2.AddToast = AddToast;
1109
- class SwitchWorkspace extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1110
- input: S4.Struct({
1111
- part: S4.Literal("workspace").annotations({
1171
+ class SwitchWorkspace extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1172
+ input: Schema5.Struct({
1173
+ part: Schema5.Literal("workspace").annotations({
1112
1174
  description: "Switching the workspace."
1113
1175
  }),
1114
- subject: S4.String.annotations({
1176
+ subject: Schema5.String.annotations({
1115
1177
  description: "The id of the workspace to switch to."
1116
1178
  })
1117
1179
  }),
1118
- output: S4.Void
1180
+ output: Schema5.Void
1119
1181
  }) {
1120
1182
  }
1121
1183
  LayoutAction2.SwitchWorkspace = SwitchWorkspace;
1122
- class RevertWorkspace extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1123
- input: S4.Struct({
1124
- part: S4.Literal("workspace").annotations({
1184
+ class RevertWorkspace extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1185
+ input: Schema5.Struct({
1186
+ part: Schema5.Literal("workspace").annotations({
1125
1187
  description: "Switching the workspace."
1126
1188
  }),
1127
- options: S4.Struct({
1128
- revert: S4.Literal(true).annotations({
1189
+ options: Schema5.Struct({
1190
+ revert: Schema5.Literal(true).annotations({
1129
1191
  description: "Revert to the previous workspace."
1130
1192
  })
1131
1193
  })
1132
1194
  }),
1133
- output: S4.Void
1195
+ output: Schema5.Void
1134
1196
  }) {
1135
1197
  }
1136
1198
  LayoutAction2.RevertWorkspace = RevertWorkspace;
1137
- class Open extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1138
- input: S4.Struct({
1139
- part: S4.Literal("main").annotations({
1199
+ class Open extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1200
+ input: Schema5.Struct({
1201
+ part: Schema5.Literal("main").annotations({
1140
1202
  description: "Opening an item in the main content area."
1141
1203
  }),
1142
- subject: S4.Array(S4.String.annotations({
1204
+ subject: Schema5.Array(Schema5.String.annotations({
1143
1205
  description: "Ids of the items to open."
1144
1206
  })),
1145
- options: S4.optional(S4.Struct({
1146
- state: S4.optional(S4.Literal(true).annotations({
1207
+ options: Schema5.optional(Schema5.Struct({
1208
+ state: Schema5.optional(Schema5.Literal(true).annotations({
1147
1209
  description: "The items are being added."
1148
1210
  })),
1149
- variant: S4.optional(S4.String.annotations({
1211
+ variant: Schema5.optional(Schema5.String.annotations({
1150
1212
  description: "The variant of the item to open."
1151
1213
  })),
1152
- key: S4.optional(S4.String.annotations({
1214
+ key: Schema5.optional(Schema5.String.annotations({
1153
1215
  description: "If provided, will replace item with a matching key (id prefix)."
1154
1216
  })),
1155
- scrollIntoView: S4.optional(S4.Boolean.annotations({
1217
+ workspace: Schema5.optional(Schema5.String.annotations({
1218
+ description: "The workspace to open the items in."
1219
+ })),
1220
+ scrollIntoView: Schema5.optional(Schema5.Boolean.annotations({
1156
1221
  description: "Scroll the items into view."
1157
1222
  })),
1158
- pivotId: S4.optional(S4.String.annotations({
1223
+ pivotId: Schema5.optional(Schema5.String.annotations({
1159
1224
  description: "The id of the item to place new items next to."
1160
1225
  })),
1161
- positioning: S4.optional(S4.Union(S4.Literal("start").annotations({
1226
+ positioning: Schema5.optional(Schema5.Union(Schema5.Literal("start").annotations({
1162
1227
  description: "The items are being added before the pivot item."
1163
- }), S4.Literal("end").annotations({
1228
+ }), Schema5.Literal("end").annotations({
1164
1229
  description: "The items are being added after the pivot item."
1165
1230
  })))
1166
1231
  }))
1167
1232
  }),
1168
- output: S4.Void
1233
+ output: Schema5.Void
1169
1234
  }) {
1170
1235
  }
1171
1236
  LayoutAction2.Open = Open;
1172
- class Set2 extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1173
- input: S4.Struct({
1174
- part: S4.Literal("main").annotations({
1237
+ class Set2 extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1238
+ input: Schema5.Struct({
1239
+ part: Schema5.Literal("main").annotations({
1175
1240
  description: "Setting items in the main content area."
1176
1241
  }),
1177
- subject: S4.Array(S4.String.annotations({
1242
+ subject: Schema5.Array(Schema5.String.annotations({
1178
1243
  description: "Ids of the items to set."
1179
1244
  })),
1180
- options: S4.Struct({
1181
- override: S4.Literal(true).annotations({
1245
+ options: Schema5.Struct({
1246
+ override: Schema5.Literal(true).annotations({
1182
1247
  description: "Override the current items in the main content area."
1183
1248
  })
1184
1249
  })
1185
1250
  }),
1186
- output: S4.Void
1251
+ output: Schema5.Void
1187
1252
  }) {
1188
1253
  }
1189
1254
  LayoutAction2.Set = Set2;
1190
- class Close extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1191
- input: S4.Struct({
1192
- part: S4.Literal("main").annotations({
1255
+ class Close extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1256
+ input: Schema5.Struct({
1257
+ part: Schema5.Literal("main").annotations({
1193
1258
  description: "Closing items in the main content area."
1194
1259
  }),
1195
- subject: S4.Array(S4.String.annotations({
1260
+ subject: Schema5.Array(Schema5.String.annotations({
1196
1261
  description: "Ids of the items to close."
1197
1262
  })),
1198
- options: S4.Struct({
1199
- state: S4.Literal(false).annotations({
1263
+ options: Schema5.Struct({
1264
+ state: Schema5.Literal(false).annotations({
1200
1265
  description: "The items are being removed."
1201
1266
  })
1202
1267
  })
1203
1268
  }),
1204
- output: S4.Void
1269
+ output: Schema5.Void
1205
1270
  }) {
1206
1271
  }
1207
1272
  LayoutAction2.Close = Close;
1208
- class ScrollIntoView extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1209
- input: S4.Struct({
1210
- part: S4.Literal("current").annotations({
1273
+ class ScrollIntoView extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1274
+ input: Schema5.Struct({
1275
+ part: Schema5.Literal("current").annotations({
1211
1276
  description: "Setting the current item"
1212
1277
  }),
1213
- subject: S4.optional(S4.String.annotations({
1278
+ subject: Schema5.optional(Schema5.String.annotations({
1214
1279
  description: "The id of the item to set as current."
1215
1280
  })),
1216
- options: S4.optional(S4.Record({
1217
- key: S4.String,
1218
- value: S4.Any
1281
+ options: Schema5.optional(Schema5.Record({
1282
+ key: Schema5.String,
1283
+ value: Schema5.Any
1219
1284
  }).annotations({
1220
1285
  description: "Additional options for the scroll into view."
1221
1286
  }))
1222
1287
  }),
1223
- output: S4.Void
1288
+ output: Schema5.Void
1224
1289
  }) {
1225
1290
  }
1226
1291
  LayoutAction2.ScrollIntoView = ScrollIntoView;
1227
- class Expose extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1228
- input: S4.Struct({
1229
- part: S4.Literal("navigation").annotations({
1292
+ class Expose extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1293
+ input: Schema5.Struct({
1294
+ part: Schema5.Literal("navigation").annotations({
1230
1295
  description: "Exposing an item in the navigation area."
1231
1296
  }),
1232
- subject: S4.String.annotations({
1297
+ subject: Schema5.String.annotations({
1233
1298
  description: "The id of the item to expose."
1234
1299
  })
1235
1300
  }),
1236
- output: S4.Void
1301
+ output: Schema5.Void
1237
1302
  }) {
1238
1303
  }
1239
1304
  LayoutAction2.Expose = Expose;
1240
1305
  })(LayoutAction || (LayoutAction = {}));
1306
+ var LayoutAction;
1241
1307
 
1242
1308
  // packages/sdk/app-framework/src/common/surface.ts
1243
1309
  var createSurface = (definition) => definition;
1244
1310
 
1245
1311
  // packages/sdk/app-framework/src/common/translations.ts
1246
- import { Schema as S5 } from "effect";
1247
- var ResourceKey = S5.Union(S5.String, S5.Record({
1248
- key: S5.String,
1249
- value: S5.Any
1312
+ import { Schema as Schema6 } from "effect";
1313
+ var ResourceKey = Schema6.Union(Schema6.String, Schema6.Record({
1314
+ key: Schema6.String,
1315
+ value: Schema6.Any
1250
1316
  }));
1251
- var ResourceLanguage = S5.Record({
1252
- key: S5.String,
1317
+ var ResourceLanguage = Schema6.Record({
1318
+ key: Schema6.String,
1253
1319
  value: ResourceKey
1254
1320
  });
1255
- var Resource = S5.Record({
1256
- key: S5.String,
1321
+ var Resource = Schema6.Record({
1322
+ key: Schema6.String,
1257
1323
  value: ResourceLanguage
1258
1324
  });
1259
1325
 
@@ -1264,14 +1330,14 @@ var HISTORY_LIMIT = 100;
1264
1330
  var createResolver = (resolver) => resolver;
1265
1331
  var isUndoable = (historyEntry) => historyEntry.length > 0 && historyEntry.every(({ undoable }) => !!undoable);
1266
1332
  var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, historyLimit = HISTORY_LIMIT } = {}) => {
1267
- const historyRef = Effect3.runSync(Ref.make([]));
1333
+ const historyRef = Effect3.runSync(Ref2.make([]));
1268
1334
  const handleIntent = (intent) => Effect3.gen(function* () {
1269
- const candidates = getResolvers(intent.module).filter((resolver) => resolver.intent._tag === intent.id).filter((resolver) => !resolver.filter || resolver.filter(intent.data)).toSorted(byPosition);
1335
+ const candidates = getResolvers().filter((resolver) => resolver.intent._tag === intent.id).filter((resolver) => !resolver.filter || resolver.filter(intent.data)).toSorted(byPosition);
1270
1336
  if (candidates.length === 0) {
1271
1337
  yield* Effect3.fail(new NoResolversError(intent.id));
1272
1338
  }
1273
- const effect2 = candidates[0].resolve(intent.data, intent.undo ?? false);
1274
- const result = Effect3.isEffect(effect2) ? yield* effect2 : yield* Effect3.promise(async () => effect2);
1339
+ const effect = candidates[0].resolve(intent.data, intent.undo ?? false);
1340
+ const result = Effect3.isEffect(effect) ? yield* effect : yield* Effect3.promise(async () => effect);
1275
1341
  return {
1276
1342
  _intent: intent,
1277
1343
  ...result
@@ -1282,7 +1348,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1282
1348
  if (depth > executionLimit) {
1283
1349
  yield* Effect3.fail(new CycleDetectedError());
1284
1350
  }
1285
- const resultsRef = yield* Ref.make([]);
1351
+ const resultsRef = yield* Ref2.make([]);
1286
1352
  for (const intent of intentChain.all) {
1287
1353
  const { data: prev } = (yield* resultsRef.get)[0] ?? {};
1288
1354
  const result2 = yield* handleIntent({
@@ -1292,7 +1358,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1292
1358
  ...prev
1293
1359
  }
1294
1360
  });
1295
- yield* Ref.update(resultsRef, (results2) => [
1361
+ yield* Ref2.update(resultsRef, (results2) => [
1296
1362
  result2,
1297
1363
  ...results2
1298
1364
  ]);
@@ -1307,7 +1373,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1307
1373
  }
1308
1374
  const results = yield* resultsRef.get;
1309
1375
  const result = results[0];
1310
- yield* Ref.update(historyRef, (history) => {
1376
+ yield* Ref2.update(historyRef, (history) => {
1311
1377
  const next = [
1312
1378
  ...history,
1313
1379
  results
@@ -1331,7 +1397,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1331
1397
  })).catch((error) => {
1332
1398
  log3.catch(error, void 0, {
1333
1399
  F: __dxlog_file3,
1334
- L: 254,
1400
+ L: 270,
1335
1401
  S: void 0,
1336
1402
  C: (f, a) => f(...a)
1337
1403
  });
@@ -1363,7 +1429,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1363
1429
  last: all.at(-1),
1364
1430
  all
1365
1431
  };
1366
- yield* Ref.update(historyRef, (h) => h.filter((_, index) => index !== last));
1432
+ yield* Ref2.update(historyRef, (h) => h.filter((_, index) => index !== last));
1367
1433
  return yield* dispatch(intent);
1368
1434
  }
1369
1435
  });
@@ -1385,16 +1451,14 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1385
1451
  var defaultEffect = () => Effect3.fail(new Error("Intent runtime not ready"));
1386
1452
  var defaultPromise = () => Effect3.runPromise(defaultEffect());
1387
1453
  var intent_dispatcher_default = (context) => {
1388
- const state = create3({
1454
+ const state = live2({
1389
1455
  dispatch: defaultEffect,
1390
1456
  dispatchPromise: defaultPromise,
1391
1457
  undo: defaultEffect,
1392
1458
  undoPromise: defaultPromise
1393
1459
  });
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);
1460
+ const { dispatch, dispatchPromise, undo, undoPromise } = createDispatcher(() => context.getCapabilities(Capabilities.IntentResolver).flat());
1461
+ const manager = context.getCapability(Capabilities.PluginManager);
1398
1462
  state.dispatch = (intentChain, depth) => {
1399
1463
  return Effect3.gen(function* () {
1400
1464
  yield* manager._activate(Events.SetupIntentResolver);
@@ -1414,7 +1478,7 @@ export {
1414
1478
  defineCapability,
1415
1479
  contributes,
1416
1480
  lazy,
1417
- PluginsContext,
1481
+ PluginContext,
1418
1482
  defineEvent,
1419
1483
  eventKey,
1420
1484
  oneOf,
@@ -1428,6 +1492,7 @@ export {
1428
1492
  Plugin,
1429
1493
  definePlugin,
1430
1494
  Capabilities,
1495
+ CollaborationActions,
1431
1496
  Events,
1432
1497
  defaultFileTypes,
1433
1498
  FileInfoSchema,
@@ -1449,4 +1514,4 @@ export {
1449
1514
  ResourceLanguage,
1450
1515
  Resource
1451
1516
  };
1452
- //# sourceMappingURL=chunk-6AVTZPMT.mjs.map
1517
+ //# sourceMappingURL=chunk-5GE2ERNU.mjs.map