@dxos/app-framework 0.8.2-main.f11618f → 0.8.2-staging.42af850

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 (315) hide show
  1. package/dist/lib/browser/{app-graph-builder-OHM2Z6YQ.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-DVNSCQJ5.mjs → chunk-5GE2ERNU.mjs} +314 -280
  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-X2YC645Z.mjs → chunk-ZMXJV64L.mjs} +122 -62
  8. package/dist/lib/browser/chunk-ZMXJV64L.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +10 -10
  10. package/dist/lib/browser/{intent-dispatcher-J7QIFHLO.mjs → intent-dispatcher-ELZN5EM7.mjs} +2 -2
  11. package/dist/lib/browser/{intent-resolver-QV5MDMDV.mjs → intent-resolver-SGWLINTO.mjs} +3 -3
  12. package/dist/lib/browser/meta.json +1 -1
  13. package/dist/lib/browser/{store-XMPVLJOQ.mjs → store-YIU6IPZ2.mjs} +7 -6
  14. package/dist/lib/browser/store-YIU6IPZ2.mjs.map +7 -0
  15. package/dist/lib/browser/testing/index.mjs +30 -14
  16. package/dist/lib/browser/testing/index.mjs.map +3 -3
  17. package/dist/lib/browser/worker.mjs +3 -3
  18. package/dist/lib/node/app-graph-builder-GBLISL7L.cjs +146 -0
  19. package/dist/lib/node/app-graph-builder-GBLISL7L.cjs.map +7 -0
  20. package/dist/lib/node/{chunk-JUSEAFDU.cjs → chunk-G774ASXO.cjs} +5 -5
  21. package/dist/lib/node/chunk-G774ASXO.cjs.map +7 -0
  22. package/dist/lib/node/{chunk-I3CJYEBC.cjs → chunk-HIVITTZD.cjs} +156 -122
  23. package/dist/lib/node/chunk-HIVITTZD.cjs.map +7 -0
  24. package/dist/lib/node/{chunk-5UOVF3OR.cjs → chunk-Z2PMVDJ5.cjs} +155 -95
  25. package/dist/lib/node/chunk-Z2PMVDJ5.cjs.map +7 -0
  26. package/dist/lib/node/index.cjs +81 -81
  27. package/dist/lib/node/{intent-dispatcher-FQPJNKIZ.cjs → intent-dispatcher-LFXZJTAS.cjs} +8 -8
  28. package/dist/lib/node/{intent-dispatcher-FQPJNKIZ.cjs.map → intent-dispatcher-LFXZJTAS.cjs.map} +2 -2
  29. package/dist/lib/node/{intent-resolver-PBAOGJS6.cjs → intent-resolver-EPSFTHL6.cjs} +12 -12
  30. package/dist/lib/node/meta.json +1 -1
  31. package/dist/lib/node/{store-N7JLYYDI.cjs → store-CVVRXUTH.cjs} +10 -9
  32. package/dist/lib/node/store-CVVRXUTH.cjs.map +7 -0
  33. package/dist/lib/node/testing/index.cjs +34 -17
  34. package/dist/lib/node/testing/index.cjs.map +3 -3
  35. package/dist/lib/node/worker.cjs +39 -39
  36. package/dist/lib/node/worker.cjs.map +1 -1
  37. package/dist/lib/node-esm/{app-graph-builder-OMH534A4.mjs → app-graph-builder-LUBDEIT6.mjs} +23 -23
  38. package/dist/lib/node-esm/app-graph-builder-LUBDEIT6.mjs.map +7 -0
  39. package/dist/lib/node-esm/{chunk-QHXUTJHE.mjs → chunk-6IKYKERU.mjs} +122 -62
  40. package/dist/lib/node-esm/chunk-6IKYKERU.mjs.map +7 -0
  41. package/dist/lib/node-esm/{chunk-PHOUQACM.mjs → chunk-I6BVZMAH.mjs} +10 -10
  42. package/dist/lib/node-esm/chunk-I6BVZMAH.mjs.map +7 -0
  43. package/dist/lib/node-esm/{chunk-GSDBF2CK.mjs → chunk-Z2ZHH4HN.mjs} +314 -280
  44. package/dist/lib/node-esm/chunk-Z2ZHH4HN.mjs.map +7 -0
  45. package/dist/lib/node-esm/index.mjs +10 -10
  46. package/dist/lib/node-esm/{intent-dispatcher-QDUGA7NT.mjs → intent-dispatcher-A2JCMWRD.mjs} +2 -2
  47. package/dist/lib/node-esm/{intent-resolver-P7TC5RBD.mjs → intent-resolver-5C4O43GK.mjs} +3 -3
  48. package/dist/lib/node-esm/meta.json +1 -1
  49. package/dist/lib/node-esm/{store-M2BYJL6K.mjs → store-HRZXZ2D2.mjs} +7 -6
  50. package/dist/lib/node-esm/store-HRZXZ2D2.mjs.map +7 -0
  51. package/dist/lib/node-esm/testing/index.mjs +30 -14
  52. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  53. package/dist/lib/node-esm/worker.mjs +3 -3
  54. package/dist/types/src/App.d.ts +3 -1
  55. package/dist/types/src/App.d.ts.map +1 -1
  56. package/dist/types/src/common/capabilities.d.ts +40 -222
  57. package/dist/types/src/common/capabilities.d.ts.map +1 -1
  58. package/dist/types/src/common/collaboration.d.ts +8 -8
  59. package/dist/types/src/common/collaboration.d.ts.map +1 -1
  60. package/dist/types/src/common/events.d.ts.map +1 -1
  61. package/dist/types/src/common/file.d.ts +7 -7
  62. package/dist/types/src/common/file.d.ts.map +1 -1
  63. package/dist/types/src/common/layout.d.ts +165 -163
  64. package/dist/types/src/common/layout.d.ts.map +1 -1
  65. package/dist/types/src/common/surface.d.ts.map +1 -1
  66. package/dist/types/src/common/translations.d.ts +7 -7
  67. package/dist/types/src/common/translations.d.ts.map +1 -1
  68. package/dist/types/src/core/capabilities.d.ts +28 -13
  69. package/dist/types/src/core/capabilities.d.ts.map +1 -1
  70. package/dist/types/src/core/events.d.ts.map +1 -1
  71. package/dist/types/src/core/manager.d.ts +6 -3
  72. package/dist/types/src/core/manager.d.ts.map +1 -1
  73. package/dist/types/src/core/plugin.d.ts +2 -2
  74. package/dist/types/src/core/plugin.d.ts.map +1 -1
  75. package/dist/types/src/helpers.d.ts.map +1 -1
  76. package/dist/types/src/playground/generator/generator.d.ts.map +1 -1
  77. package/dist/types/src/playground/logger/schema.d.ts +6 -6
  78. package/dist/types/src/playground/logger/schema.d.ts.map +1 -1
  79. package/dist/types/src/playground/playground.stories.d.ts.map +1 -1
  80. package/dist/types/src/plugin-intent/actions.d.ts +14 -14
  81. package/dist/types/src/plugin-intent/actions.d.ts.map +1 -1
  82. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +3 -3
  83. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -1
  84. package/dist/types/src/plugin-intent/intent.d.ts +14 -20
  85. package/dist/types/src/plugin-intent/intent.d.ts.map +1 -1
  86. package/dist/types/src/plugin-settings/actions.d.ts +10 -10
  87. package/dist/types/src/plugin-settings/actions.d.ts.map +1 -1
  88. package/dist/types/src/plugin-settings/app-graph-builder.d.ts +2 -195
  89. package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +1 -1
  90. package/dist/types/src/plugin-settings/store.d.ts +2 -2
  91. package/dist/types/src/plugin-settings/store.d.ts.map +1 -1
  92. package/dist/types/src/react/ErrorBoundary.d.ts +1 -1
  93. package/dist/types/src/react/ErrorBoundary.d.ts.map +1 -1
  94. package/dist/types/src/react/IntentContext.d.ts.map +1 -1
  95. package/dist/types/src/react/Surface.d.ts +2 -2
  96. package/dist/types/src/react/Surface.d.ts.map +1 -1
  97. package/dist/types/src/react/useCapabilities.d.ts +2 -2
  98. package/dist/types/src/react/useCapabilities.d.ts.map +1 -1
  99. package/dist/types/src/react/useIntentResolver.d.ts.map +1 -1
  100. package/dist/types/src/testing/withPluginManager.d.ts +6 -2
  101. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
  102. package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
  103. package/dist/types/tsconfig.tsbuildinfo +1 -1
  104. package/package.json +28 -21
  105. package/src/App.tsx +97 -47
  106. package/src/common/capabilities.ts +18 -7
  107. package/src/common/collaboration.ts +9 -9
  108. package/src/common/file.ts +7 -7
  109. package/src/common/layout.ts +156 -136
  110. package/src/common/translations.ts +7 -7
  111. package/src/core/capabilities.test.ts +55 -36
  112. package/src/core/capabilities.ts +79 -59
  113. package/src/core/manager.test.ts +19 -19
  114. package/src/core/manager.ts +24 -16
  115. package/src/core/plugin.ts +2 -2
  116. package/src/playground/generator/generator.ts +4 -4
  117. package/src/playground/logger/schema.ts +5 -5
  118. package/src/playground/playground.stories.tsx +13 -9
  119. package/src/plugin-intent/actions.ts +9 -9
  120. package/src/plugin-intent/intent-dispatcher.test.ts +23 -42
  121. package/src/plugin-intent/intent-dispatcher.ts +7 -11
  122. package/src/plugin-intent/intent.ts +22 -20
  123. package/src/plugin-settings/actions.ts +8 -8
  124. package/src/plugin-settings/app-graph-builder.ts +129 -94
  125. package/src/plugin-settings/store.ts +20 -17
  126. package/src/react/ErrorBoundary.tsx +3 -3
  127. package/src/react/Surface.stories.tsx +1 -1
  128. package/src/react/Surface.tsx +3 -3
  129. package/src/react/useCapabilities.ts +9 -19
  130. package/src/testing/withPluginManager.stories.tsx +0 -1
  131. package/src/testing/withPluginManager.tsx +35 -16
  132. package/tsconfig.json +1 -53
  133. package/typedoc/assets/navigation.js +1 -1
  134. package/typedoc/assets/search.js +1 -1
  135. package/typedoc/classes/CollaborationActions.InsertContent.html +280 -280
  136. package/typedoc/classes/ErrorBoundary.html +6 -6
  137. package/typedoc/classes/IntentAction.ShowUndo.html +125 -125
  138. package/typedoc/classes/IntentAction.Track.html +239 -239
  139. package/typedoc/classes/LayoutAction.AddToast.html +163 -163
  140. package/typedoc/classes/LayoutAction.Close.html +352 -352
  141. package/typedoc/classes/LayoutAction.Expose.html +238 -238
  142. package/typedoc/classes/LayoutAction.Open.html +904 -748
  143. package/typedoc/classes/LayoutAction.RevertWorkspace.html +241 -241
  144. package/typedoc/classes/LayoutAction.ScrollIntoView.html +280 -280
  145. package/typedoc/classes/LayoutAction.Set.html +436 -358
  146. package/typedoc/classes/LayoutAction.SetLayoutMode.html +469 -391
  147. package/typedoc/classes/LayoutAction.SwitchWorkspace.html +238 -238
  148. package/typedoc/classes/LayoutAction.UpdateComplementary.html +358 -358
  149. package/typedoc/classes/LayoutAction.UpdateDialog.html +865 -475
  150. package/typedoc/classes/LayoutAction.UpdateLayout.html +281 -281
  151. package/typedoc/classes/LayoutAction.UpdatePopover.html +826 -826
  152. package/typedoc/classes/LayoutAction.UpdateSidebar.html +397 -319
  153. package/typedoc/classes/Plugin.html +3 -3
  154. package/typedoc/classes/PluginContext.html +38 -0
  155. package/typedoc/classes/PluginManager.html +17 -16
  156. package/typedoc/classes/PluginModule.html +9 -9
  157. package/typedoc/classes/SettingsAction.Open.html +199 -199
  158. package/typedoc/classes/SettingsAction.OpenPluginRegistry.html +124 -124
  159. package/typedoc/functions/Events.createStateEvent.html +2 -2
  160. package/typedoc/functions/IntentPlugin.html +1 -1
  161. package/typedoc/functions/SettingsPlugin.html +1 -1
  162. package/typedoc/functions/allOf.html +2 -2
  163. package/typedoc/functions/chain.html +2 -2
  164. package/typedoc/functions/contributes.html +2 -2
  165. package/typedoc/functions/createDispatcher.html +3 -3
  166. package/typedoc/functions/createIntent.html +3 -3
  167. package/typedoc/functions/createResolver.html +2 -2
  168. package/typedoc/functions/createSurface.html +2 -2
  169. package/typedoc/functions/defineCapability.html +2 -2
  170. package/typedoc/functions/defineEvent.html +2 -2
  171. package/typedoc/functions/defineModule.html +2 -2
  172. package/typedoc/functions/definePlugin.html +2 -2
  173. package/typedoc/functions/eventKey.html +2 -2
  174. package/typedoc/functions/getEvents.html +2 -2
  175. package/typedoc/functions/isAllOf.html +2 -2
  176. package/typedoc/functions/isOneOf.html +2 -2
  177. package/typedoc/functions/isSurfaceAvailable.html +2 -2
  178. package/typedoc/functions/lazy.html +2 -2
  179. package/typedoc/functions/oneOf.html +2 -2
  180. package/typedoc/functions/{createApp.html → useApp.html} +2 -2
  181. package/typedoc/functions/useAppGraph.html +1 -1
  182. package/typedoc/functions/useCapabilities.html +3 -3
  183. package/typedoc/functions/useCapability.html +3 -3
  184. package/typedoc/functions/useIntentDispatcher.html +1 -1
  185. package/typedoc/functions/useIntentResolver.html +1 -1
  186. package/typedoc/functions/useLayout.html +1 -1
  187. package/typedoc/functions/usePluginManager.html +2 -2
  188. package/typedoc/hierarchy.html +1 -1
  189. package/typedoc/index.html +2 -2
  190. package/typedoc/interfaces/LayoutAction.Toast.html +2 -2
  191. package/typedoc/modules/Capabilities.html +1 -1
  192. package/typedoc/modules/CollaborationActions.html +1 -1
  193. package/typedoc/modules/Events.html +1 -1
  194. package/typedoc/modules/IntentAction.html +1 -1
  195. package/typedoc/modules/LayoutAction.html +2 -2
  196. package/typedoc/modules/SettingsAction.html +1 -1
  197. package/typedoc/modules.html +1 -1
  198. package/typedoc/types/ActivationEvent.html +3 -3
  199. package/typedoc/types/ActivationEvents.html +2 -2
  200. package/typedoc/types/AnyCapability.html +1 -1
  201. package/typedoc/types/AnyIntent.html +1 -1
  202. package/typedoc/types/AnyIntentChain.html +1 -1
  203. package/typedoc/types/AnyIntentEffectResult.html +1 -1
  204. package/typedoc/types/AnyIntentResolver.html +1 -1
  205. package/typedoc/types/AnyIntentResult.html +1 -1
  206. package/typedoc/types/Capabilities.FileUploader.html +1 -1
  207. package/typedoc/types/Capabilities.IntentResolver.html +1 -1
  208. package/typedoc/types/Capabilities.Layout.html +1 -1
  209. package/typedoc/types/Capabilities.Metadata.html +1 -1
  210. package/typedoc/types/Capabilities.ReactContext.html +1 -1
  211. package/typedoc/types/Capabilities.ReactRoot.html +1 -1
  212. package/typedoc/types/Capabilities.ReactSurface.html +1 -1
  213. package/typedoc/types/Capabilities.Settings.html +2 -2
  214. package/typedoc/types/Capability.html +5 -5
  215. package/typedoc/types/CreateAppOptions.html +3 -2
  216. package/typedoc/types/FileInfo.html +1 -1
  217. package/typedoc/types/Intent.html +6 -10
  218. package/typedoc/types/IntentChain.html +3 -3
  219. package/typedoc/types/IntentContext.html +2 -2
  220. package/typedoc/types/IntentData.html +1 -1
  221. package/typedoc/types/IntentDispatcher.html +2 -2
  222. package/typedoc/types/IntentDispatcherResult.html +2 -2
  223. package/typedoc/types/IntentEffectDefinition.html +2 -2
  224. package/typedoc/types/IntentEffectResult.html +6 -6
  225. package/typedoc/types/IntentParams.html +2 -2
  226. package/typedoc/types/IntentResolver.html +2 -2
  227. package/typedoc/types/IntentResultData.html +1 -1
  228. package/typedoc/types/IntentSchema.html +1 -1
  229. package/typedoc/types/IntentUndo.html +2 -2
  230. package/typedoc/types/InterfaceDef.html +3 -3
  231. package/typedoc/types/Label.html +1 -1
  232. package/typedoc/types/NodeSerializer.html +3 -3
  233. package/typedoc/types/PluginManagerOptions.html +3 -2
  234. package/typedoc/types/PluginMeta.html +9 -9
  235. package/typedoc/types/PromiseIntentDispatcher.html +2 -2
  236. package/typedoc/types/PromiseIntentUndo.html +2 -2
  237. package/typedoc/types/Resource.html +1 -1
  238. package/typedoc/types/ResourceKey.html +1 -1
  239. package/typedoc/types/ResourceLanguage.html +1 -1
  240. package/typedoc/types/SerializedNode.html +2 -2
  241. package/typedoc/types/SurfaceComponent.html +2 -2
  242. package/typedoc/types/SurfaceDefinition.html +2 -2
  243. package/typedoc/types/SurfaceProps.html +2 -2
  244. package/typedoc/variables/Capabilities.AnchorSort.html +1 -0
  245. package/typedoc/variables/Capabilities.AppGraph.html +1 -1
  246. package/typedoc/variables/Capabilities.AppGraphBuilder.html +1 -1
  247. package/typedoc/variables/Capabilities.AppGraphSerializer.html +1 -1
  248. package/typedoc/variables/Capabilities.ArtifactDefinition.html +1 -1
  249. package/typedoc/variables/Capabilities.FileUploader.html +1 -1
  250. package/typedoc/variables/Capabilities.IntentDispatcher.html +1 -1
  251. package/typedoc/variables/Capabilities.IntentResolver.html +1 -1
  252. package/typedoc/variables/Capabilities.Layout.html +1 -1
  253. package/typedoc/variables/Capabilities.Metadata.html +1 -1
  254. package/typedoc/variables/Capabilities.Null.html +1 -1
  255. package/typedoc/variables/Capabilities.PluginManager.html +1 -1
  256. package/typedoc/variables/Capabilities.ReactContext.html +1 -1
  257. package/typedoc/variables/Capabilities.ReactRoot.html +1 -1
  258. package/typedoc/variables/Capabilities.ReactSurface.html +1 -1
  259. package/typedoc/variables/Capabilities.RxRegistry.html +1 -0
  260. package/typedoc/variables/Capabilities.Settings.html +1 -1
  261. package/typedoc/variables/Capabilities.SettingsStore.html +1 -1
  262. package/typedoc/variables/Capabilities.Tools.html +1 -1
  263. package/typedoc/variables/Capabilities.Translations.html +1 -1
  264. package/typedoc/variables/Events.AppGraphReady.html +2 -2
  265. package/typedoc/variables/Events.DispatcherReady.html +2 -2
  266. package/typedoc/variables/Events.LayoutReady.html +1 -1
  267. package/typedoc/variables/Events.SettingsReady.html +2 -2
  268. package/typedoc/variables/Events.SetupAppGraph.html +2 -2
  269. package/typedoc/variables/Events.SetupArtifactDefinition.html +2 -2
  270. package/typedoc/variables/Events.SetupIntentResolver.html +2 -2
  271. package/typedoc/variables/Events.SetupMetadata.html +2 -2
  272. package/typedoc/variables/Events.SetupReactSurface.html +2 -2
  273. package/typedoc/variables/Events.SetupSettings.html +2 -2
  274. package/typedoc/variables/Events.SetupTranslations.html +2 -2
  275. package/typedoc/variables/Events.Startup.html +2 -2
  276. package/typedoc/variables/FileInfoSchema.html +1 -1
  277. package/typedoc/variables/INTENT_ACTION.html +1 -1
  278. package/typedoc/variables/INTENT_PLUGIN.html +1 -1
  279. package/typedoc/variables/LAYOUT_ACTION.html +1 -1
  280. package/typedoc/variables/LAYOUT_PLUGIN.html +1 -1
  281. package/typedoc/variables/Label.html +1 -1
  282. package/typedoc/variables/LayoutAction.Toast.html +1 -1
  283. package/typedoc/variables/LayoutAction.UPDATE_LAYOUT.html +1 -1
  284. package/typedoc/variables/PluginManagerProvider.html +2 -2
  285. package/typedoc/variables/Resource.html +2 -2
  286. package/typedoc/variables/ResourceKey.html +1 -1
  287. package/typedoc/variables/ResourceLanguage.html +1 -1
  288. package/typedoc/variables/SETTINGS_ACTION.html +1 -1
  289. package/typedoc/variables/SETTINGS_ID.html +1 -1
  290. package/typedoc/variables/SETTINGS_KEY.html +1 -1
  291. package/typedoc/variables/SETTINGS_PLUGIN.html +1 -1
  292. package/typedoc/variables/Surface.html +2 -2
  293. package/typedoc/variables/defaultFileTypes.html +1 -1
  294. package/dist/lib/browser/app-graph-builder-OHM2Z6YQ.mjs.map +0 -7
  295. package/dist/lib/browser/chunk-DVNSCQJ5.mjs.map +0 -7
  296. package/dist/lib/browser/chunk-SFPT4Z2C.mjs.map +0 -7
  297. package/dist/lib/browser/chunk-X2YC645Z.mjs.map +0 -7
  298. package/dist/lib/browser/store-XMPVLJOQ.mjs.map +0 -7
  299. package/dist/lib/node/app-graph-builder-Z45FKS52.cjs +0 -146
  300. package/dist/lib/node/app-graph-builder-Z45FKS52.cjs.map +0 -7
  301. package/dist/lib/node/chunk-5UOVF3OR.cjs.map +0 -7
  302. package/dist/lib/node/chunk-I3CJYEBC.cjs.map +0 -7
  303. package/dist/lib/node/chunk-JUSEAFDU.cjs.map +0 -7
  304. package/dist/lib/node/store-N7JLYYDI.cjs.map +0 -7
  305. package/dist/lib/node-esm/app-graph-builder-OMH534A4.mjs.map +0 -7
  306. package/dist/lib/node-esm/chunk-GSDBF2CK.mjs.map +0 -7
  307. package/dist/lib/node-esm/chunk-PHOUQACM.mjs.map +0 -7
  308. package/dist/lib/node-esm/chunk-QHXUTJHE.mjs.map +0 -7
  309. package/dist/lib/node-esm/store-M2BYJL6K.mjs.map +0 -7
  310. package/typedoc/classes/PluginsContext.html +0 -25
  311. /package/dist/lib/browser/{intent-dispatcher-J7QIFHLO.mjs.map → intent-dispatcher-ELZN5EM7.mjs.map} +0 -0
  312. /package/dist/lib/browser/{intent-resolver-QV5MDMDV.mjs.map → intent-resolver-SGWLINTO.mjs.map} +0 -0
  313. /package/dist/lib/node/{intent-resolver-PBAOGJS6.cjs.map → intent-resolver-EPSFTHL6.cjs.map} +0 -0
  314. /package/dist/lib/node-esm/{intent-dispatcher-QDUGA7NT.mjs.map → intent-dispatcher-A2JCMWRD.mjs.map} +0 -0
  315. /package/dist/lib/node-esm/{intent-resolver-P7TC5RBD.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
2
  import { Effect as Effect3, Option, pipe as pipe2, Ref as Ref2 } from "effect";
3
- import { live as live3 } from "@dxos/live-object";
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 { live } 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 = live({
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: 146,
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: 165,
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: 167,
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 = live({
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: 203,
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 { live as live2 } 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 = live2({
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,30 +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;
856
883
 
857
884
  // packages/sdk/app-framework/src/common/collaboration.ts
858
- import { SchemaAST as AST, Schema as S3 } from "effect";
859
- import { Expando, Ref, SpaceIdSchema } from "@dxos/echo-schema";
860
- var CollaborationActions;
885
+ import { Schema as Schema3 } from "effect";
886
+ import { Expando, Ref } from "@dxos/echo-schema";
861
887
  (function(CollaborationActions2) {
862
- class InsertContent extends S3.TaggedClass()("assistant/intent-content", {
863
- input: S3.Struct({
864
- spaceId: SpaceIdSchema,
865
- target: Ref(Expando),
888
+ class InsertContent extends Schema3.TaggedClass()("assistant/intent-content", {
889
+ input: Schema3.Struct({
890
+ target: Expando,
866
891
  object: Ref(Expando),
867
- label: S3.String.pipe(S3.optional)
892
+ at: Schema3.optional(Schema3.String),
893
+ label: Schema3.String.pipe(Schema3.optional)
868
894
  }).annotations({
869
- [AST.DescriptionAnnotationId]: "Enables plugins to inject content blocks or references into a related entity."
895
+ description: "Enables plugins to inject content blocks or references into a related entity."
870
896
  }),
871
- output: S3.Void
897
+ output: Schema3.Void
872
898
  }) {
873
899
  }
874
900
  CollaborationActions2.InsertContent = InsertContent;
875
901
  })(CollaborationActions || (CollaborationActions = {}));
902
+ var CollaborationActions;
876
903
 
877
904
  // packages/sdk/app-framework/src/common/events.ts
878
- var Events;
879
905
  (function(Events2) {
880
906
  Events2.Startup = defineEvent("dxos.org/app-framework/event/startup");
881
907
  Events2.SetupReactSurface = defineEvent("dxos.org/app-framework/event/setup-react-surface");
@@ -891,9 +917,10 @@ var Events;
891
917
  Events2.createStateEvent = (specifier) => defineEvent("dxos.org/app-framework/event/state", specifier);
892
918
  Events2.LayoutReady = Events2.createStateEvent(Capabilities.Layout.identifier);
893
919
  })(Events || (Events = {}));
920
+ var Events;
894
921
 
895
922
  // packages/sdk/app-framework/src/common/file.ts
896
- import { Schema as S4 } from "effect";
923
+ import { Schema as Schema4 } from "effect";
897
924
  var defaultFileTypes = {
898
925
  images: [
899
926
  "png",
@@ -913,15 +940,15 @@ var defaultFileTypes = {
913
940
  "md"
914
941
  ]
915
942
  };
916
- var FileInfoSchema = S4.Struct({
917
- name: S4.String,
918
- type: S4.String,
919
- url: S4.optional(S4.String),
920
- cid: S4.optional(S4.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)
921
948
  });
922
949
 
923
950
  // packages/sdk/app-framework/src/common/layout.ts
924
- import { Schema as S5 } from "effect";
951
+ import { Schema as Schema5 } from "effect";
925
952
 
926
953
  // packages/sdk/app-framework/src/plugin-intent/IntentPlugin.tsx
927
954
  var IntentPlugin = () => definePlugin({
@@ -937,353 +964,362 @@ var IntentPlugin = () => definePlugin({
937
964
  activatesAfter: [
938
965
  Events.DispatcherReady
939
966
  ],
940
- activate: lazy(() => import("./intent-dispatcher-J7QIFHLO.mjs"))
967
+ activate: lazy(() => import("./intent-dispatcher-ELZN5EM7.mjs"))
941
968
  })
942
969
  ]);
943
970
 
944
971
  // packages/sdk/app-framework/src/common/layout.ts
945
972
  var LAYOUT_PLUGIN = "dxos.org/plugin/layout";
946
973
  var LAYOUT_ACTION = `${LAYOUT_PLUGIN}/action`;
947
- var LayoutAction;
948
974
  (function(LayoutAction2) {
949
975
  LayoutAction2.UPDATE_LAYOUT = `${LAYOUT_ACTION}/update-layout`;
950
- class UpdateLayout extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
951
- input: S5.Struct({
952
- part: S5.String.annotations({
976
+ class UpdateLayout extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
977
+ input: Schema5.Struct({
978
+ part: Schema5.String.annotations({
953
979
  description: "The part of the layout to mutate."
954
980
  }),
955
- subject: S5.optional(S5.Any.annotations({
981
+ subject: Schema5.optional(Schema5.Any.annotations({
956
982
  description: "The subject of the layout update."
957
983
  })),
958
- options: S5.optional(S5.Record({
959
- key: S5.String,
960
- value: S5.Any
984
+ options: Schema5.optional(Schema5.Record({
985
+ key: Schema5.String,
986
+ value: Schema5.Any
961
987
  }).annotations({
962
988
  description: "Additional options for the layout action."
963
989
  }))
964
990
  }),
965
- output: S5.Void
991
+ output: Schema5.Void
966
992
  }) {
967
993
  }
968
994
  LayoutAction2.UpdateLayout = UpdateLayout;
969
- class SetLayoutMode extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
970
- input: S5.Struct({
971
- part: S5.Literal("mode").annotations({
995
+ class SetLayoutMode extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
996
+ input: Schema5.Struct({
997
+ part: Schema5.Literal("mode").annotations({
972
998
  description: "Setting the layout mode."
973
999
  }),
974
- subject: S5.optional(S5.String.annotations({
1000
+ subject: Schema5.optional(Schema5.String.annotations({
975
1001
  description: "Item which is the subject of the new layout mode."
976
1002
  })),
977
- options: S5.Union(S5.Struct({
978
- mode: S5.String.annotations({
1003
+ options: Schema5.Union(Schema5.Struct({
1004
+ mode: Schema5.String.annotations({
979
1005
  description: "The new layout mode."
980
1006
  })
981
- }), S5.Struct({
982
- revert: S5.Boolean.annotations({
1007
+ }), Schema5.Struct({
1008
+ revert: Schema5.Boolean.annotations({
983
1009
  description: "Revert to the previous layout mode."
984
1010
  })
985
1011
  }))
986
1012
  }),
987
- output: S5.Void
1013
+ output: Schema5.Void
988
1014
  }) {
989
1015
  }
990
1016
  LayoutAction2.SetLayoutMode = SetLayoutMode;
991
- class UpdateSidebar extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
992
- input: S5.Struct({
993
- part: S5.Literal("sidebar").annotations({
1017
+ class UpdateSidebar extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1018
+ input: Schema5.Struct({
1019
+ part: Schema5.Literal("sidebar").annotations({
994
1020
  description: "Updating the sidebar."
995
1021
  }),
996
- subject: S5.optional(S5.String.annotations({
1022
+ subject: Schema5.optional(Schema5.String.annotations({
997
1023
  description: "URI of the component to display in the sidebar."
998
1024
  })),
999
- options: S5.optional(S5.Struct({
1000
- state: S5.Literal("closed", "collapsed", "expanded").annotations({
1025
+ options: Schema5.optional(Schema5.Struct({
1026
+ state: Schema5.Literal("closed", "collapsed", "expanded").annotations({
1001
1027
  description: "Whether the sidebar is closed, collapsed, or expanded."
1002
1028
  })
1003
1029
  }))
1004
1030
  }),
1005
- output: S5.Void
1031
+ output: Schema5.Void
1006
1032
  }) {
1007
1033
  }
1008
1034
  LayoutAction2.UpdateSidebar = UpdateSidebar;
1009
- class UpdateComplementary extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1010
- input: S5.Struct({
1011
- part: S5.Literal("complementary").annotations({
1035
+ class UpdateComplementary extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1036
+ input: Schema5.Struct({
1037
+ part: Schema5.Literal("complementary").annotations({
1012
1038
  description: "Updating the complementary sidebar."
1013
1039
  }),
1014
- subject: S5.optional(S5.String.annotations({
1040
+ subject: Schema5.optional(Schema5.String.annotations({
1015
1041
  description: "URI of the component to display in the complementary area."
1016
1042
  })),
1017
- options: S5.optional(S5.Struct({
1018
- state: S5.Literal("closed", "collapsed", "expanded").annotations({
1043
+ options: Schema5.optional(Schema5.Struct({
1044
+ state: Schema5.Literal("closed", "collapsed", "expanded").annotations({
1019
1045
  description: "Whether the complementary sidebar is closed, collapsed, or expanded."
1020
1046
  })
1021
1047
  }))
1022
1048
  }),
1023
- output: S5.Void
1049
+ output: Schema5.Void
1024
1050
  }) {
1025
1051
  }
1026
1052
  LayoutAction2.UpdateComplementary = UpdateComplementary;
1027
- class UpdateDialog extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1028
- input: S5.Struct({
1029
- part: S5.Literal("dialog").annotations({
1053
+ class UpdateDialog extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1054
+ input: Schema5.Struct({
1055
+ part: Schema5.Literal("dialog").annotations({
1030
1056
  description: "Updating the dialog."
1031
1057
  }),
1032
- subject: S5.optional(S5.String.annotations({
1058
+ subject: Schema5.optional(Schema5.String.annotations({
1033
1059
  description: "URI of the component to display in the dialog."
1034
1060
  })),
1035
- options: S5.Struct({
1036
- state: S5.optional(S5.Boolean.annotations({
1061
+ options: Schema5.Struct({
1062
+ state: Schema5.optional(Schema5.Boolean.annotations({
1037
1063
  description: "Whether the dialog is open or closed."
1038
1064
  })),
1039
- blockAlign: S5.optional(S5.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({
1040
1069
  description: "The alignment of the dialog."
1041
1070
  })),
1042
- type: S5.optional(S5.Literal("default", "alert").annotations({
1043
- description: "The type of dialog."
1071
+ overlayClasses: Schema5.optional(Schema5.String.annotations({
1072
+ description: "Additional classes for the dialog overlay."
1044
1073
  })),
1045
- props: S5.optional(S5.Record({
1046
- key: S5.String,
1047
- value: S5.Any
1074
+ overlayStyle: Schema5.optional(Schema5.Record({
1075
+ key: Schema5.String,
1076
+ value: Schema5.Any
1077
+ }).annotations({
1078
+ description: "Additional styles for the dialog overlay."
1079
+ })),
1080
+ props: Schema5.optional(Schema5.Record({
1081
+ key: Schema5.String,
1082
+ value: Schema5.Any
1048
1083
  }).annotations({
1049
1084
  description: "Additional props for the dialog."
1050
1085
  }))
1051
1086
  })
1052
1087
  }),
1053
- output: S5.Void
1088
+ output: Schema5.Void
1054
1089
  }) {
1055
1090
  }
1056
1091
  LayoutAction2.UpdateDialog = UpdateDialog;
1057
- class UpdatePopover extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1058
- input: S5.Struct({
1059
- part: S5.Literal("popover").annotations({
1092
+ class UpdatePopover extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1093
+ input: Schema5.Struct({
1094
+ part: Schema5.Literal("popover").annotations({
1060
1095
  description: "Updating the popover."
1061
1096
  }),
1062
- subject: S5.optional(S5.Any.annotations({
1097
+ subject: Schema5.optional(Schema5.Any.annotations({
1063
1098
  description: "URI of the component to display in the popover or data to pass to the popover."
1064
1099
  })),
1065
- options: S5.Struct({
1066
- side: S5.optional(S5.Literal("top", "right", "bottom", "left").annotations({
1100
+ options: Schema5.Struct({
1101
+ side: Schema5.optional(Schema5.Literal("top", "right", "bottom", "left").annotations({
1067
1102
  description: "The side of the anchor."
1068
1103
  })),
1069
- state: S5.optional(S5.Boolean.annotations({
1104
+ state: Schema5.optional(Schema5.Boolean.annotations({
1070
1105
  description: "Whether the popover is open or closed."
1071
1106
  })),
1072
- props: S5.optional(S5.Record({
1073
- key: S5.String,
1074
- value: S5.Any
1107
+ props: Schema5.optional(Schema5.Record({
1108
+ key: Schema5.String,
1109
+ value: Schema5.Any
1075
1110
  }).annotations({
1076
1111
  description: "Additional props for the popover."
1077
1112
  }))
1078
- }).pipe(S5.extend(S5.Union(S5.Struct({
1079
- variant: S5.Literal("virtual"),
1080
- anchor: S5.Any.annotations({
1113
+ }).pipe(Schema5.extend(Schema5.Union(Schema5.Struct({
1114
+ variant: Schema5.Literal("virtual"),
1115
+ anchor: Schema5.Any.annotations({
1081
1116
  description: "The DOM element to anchor the popover to."
1082
1117
  })
1083
- }), S5.Struct({
1084
- variant: S5.optional(S5.Literal("react")),
1085
- anchorId: S5.String.annotations({
1118
+ }), Schema5.Struct({
1119
+ variant: Schema5.optional(Schema5.Literal("react")),
1120
+ anchorId: Schema5.String.annotations({
1086
1121
  description: "An id that can be used to determine whether to render the anchor subcomponent."
1087
1122
  })
1088
1123
  }))))
1089
1124
  }),
1090
- output: S5.Void
1125
+ output: Schema5.Void
1091
1126
  }) {
1092
1127
  }
1093
1128
  LayoutAction2.UpdatePopover = UpdatePopover;
1094
- LayoutAction2.Toast = S5.Struct({
1095
- id: S5.String.annotations({
1129
+ LayoutAction2.Toast = Schema5.Struct({
1130
+ id: Schema5.String.annotations({
1096
1131
  description: "The id of the toast."
1097
1132
  }),
1098
- title: S5.optional(Label.annotations({
1133
+ title: Schema5.optional(Label.annotations({
1099
1134
  description: "The title of the toast."
1100
1135
  })),
1101
- description: S5.optional(Label.annotations({
1136
+ description: Schema5.optional(Label.annotations({
1102
1137
  description: "The description of the toast."
1103
1138
  })),
1104
- icon: S5.optional(S5.String.annotations({
1139
+ icon: Schema5.optional(Schema5.String.annotations({
1105
1140
  description: "The icon of the toast."
1106
1141
  })),
1107
- duration: S5.optional(S5.Number.annotations({
1142
+ duration: Schema5.optional(Schema5.Number.annotations({
1108
1143
  description: "The duration of the toast."
1109
1144
  })),
1110
- closeLabel: S5.optional(Label.annotations({
1145
+ closeLabel: Schema5.optional(Label.annotations({
1111
1146
  description: "The label of the close button."
1112
1147
  })),
1113
- actionLabel: S5.optional(Label.annotations({
1148
+ actionLabel: Schema5.optional(Label.annotations({
1114
1149
  description: "The label of the action button."
1115
1150
  })),
1116
- actionAlt: S5.optional(Label.annotations({
1151
+ actionAlt: Schema5.optional(Label.annotations({
1117
1152
  description: "The alt text of the action button."
1118
1153
  })),
1119
- onAction: S5.optional(S5.Any.annotations({
1154
+ onAction: Schema5.optional(Schema5.Any.annotations({
1120
1155
  description: "The action to perform when the action button is clicked."
1121
1156
  }))
1122
1157
  });
1123
- class AddToast extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1124
- input: S5.Struct({
1125
- part: S5.Literal("toast").annotations({
1158
+ class AddToast extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1159
+ input: Schema5.Struct({
1160
+ part: Schema5.Literal("toast").annotations({
1126
1161
  description: "Adding a toast."
1127
1162
  }),
1128
1163
  subject: LayoutAction2.Toast.annotations({
1129
1164
  description: "The toast to add."
1130
1165
  })
1131
1166
  }),
1132
- output: S5.Void
1167
+ output: Schema5.Void
1133
1168
  }) {
1134
1169
  }
1135
1170
  LayoutAction2.AddToast = AddToast;
1136
- class SwitchWorkspace extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1137
- input: S5.Struct({
1138
- part: S5.Literal("workspace").annotations({
1171
+ class SwitchWorkspace extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1172
+ input: Schema5.Struct({
1173
+ part: Schema5.Literal("workspace").annotations({
1139
1174
  description: "Switching the workspace."
1140
1175
  }),
1141
- subject: S5.String.annotations({
1176
+ subject: Schema5.String.annotations({
1142
1177
  description: "The id of the workspace to switch to."
1143
1178
  })
1144
1179
  }),
1145
- output: S5.Void
1180
+ output: Schema5.Void
1146
1181
  }) {
1147
1182
  }
1148
1183
  LayoutAction2.SwitchWorkspace = SwitchWorkspace;
1149
- class RevertWorkspace extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1150
- input: S5.Struct({
1151
- part: S5.Literal("workspace").annotations({
1184
+ class RevertWorkspace extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1185
+ input: Schema5.Struct({
1186
+ part: Schema5.Literal("workspace").annotations({
1152
1187
  description: "Switching the workspace."
1153
1188
  }),
1154
- options: S5.Struct({
1155
- revert: S5.Literal(true).annotations({
1189
+ options: Schema5.Struct({
1190
+ revert: Schema5.Literal(true).annotations({
1156
1191
  description: "Revert to the previous workspace."
1157
1192
  })
1158
1193
  })
1159
1194
  }),
1160
- output: S5.Void
1195
+ output: Schema5.Void
1161
1196
  }) {
1162
1197
  }
1163
1198
  LayoutAction2.RevertWorkspace = RevertWorkspace;
1164
- class Open extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1165
- input: S5.Struct({
1166
- part: S5.Literal("main").annotations({
1199
+ class Open extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1200
+ input: Schema5.Struct({
1201
+ part: Schema5.Literal("main").annotations({
1167
1202
  description: "Opening an item in the main content area."
1168
1203
  }),
1169
- subject: S5.Array(S5.String.annotations({
1204
+ subject: Schema5.Array(Schema5.String.annotations({
1170
1205
  description: "Ids of the items to open."
1171
1206
  })),
1172
- options: S5.optional(S5.Struct({
1173
- state: S5.optional(S5.Literal(true).annotations({
1207
+ options: Schema5.optional(Schema5.Struct({
1208
+ state: Schema5.optional(Schema5.Literal(true).annotations({
1174
1209
  description: "The items are being added."
1175
1210
  })),
1176
- variant: S5.optional(S5.String.annotations({
1211
+ variant: Schema5.optional(Schema5.String.annotations({
1177
1212
  description: "The variant of the item to open."
1178
1213
  })),
1179
- key: S5.optional(S5.String.annotations({
1214
+ key: Schema5.optional(Schema5.String.annotations({
1180
1215
  description: "If provided, will replace item with a matching key (id prefix)."
1181
1216
  })),
1182
- workspace: S5.optional(S5.String.annotations({
1217
+ workspace: Schema5.optional(Schema5.String.annotations({
1183
1218
  description: "The workspace to open the items in."
1184
1219
  })),
1185
- scrollIntoView: S5.optional(S5.Boolean.annotations({
1220
+ scrollIntoView: Schema5.optional(Schema5.Boolean.annotations({
1186
1221
  description: "Scroll the items into view."
1187
1222
  })),
1188
- pivotId: S5.optional(S5.String.annotations({
1223
+ pivotId: Schema5.optional(Schema5.String.annotations({
1189
1224
  description: "The id of the item to place new items next to."
1190
1225
  })),
1191
- positioning: S5.optional(S5.Union(S5.Literal("start").annotations({
1226
+ positioning: Schema5.optional(Schema5.Union(Schema5.Literal("start").annotations({
1192
1227
  description: "The items are being added before the pivot item."
1193
- }), S5.Literal("end").annotations({
1228
+ }), Schema5.Literal("end").annotations({
1194
1229
  description: "The items are being added after the pivot item."
1195
1230
  })))
1196
1231
  }))
1197
1232
  }),
1198
- output: S5.Void
1233
+ output: Schema5.Void
1199
1234
  }) {
1200
1235
  }
1201
1236
  LayoutAction2.Open = Open;
1202
- class Set2 extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1203
- input: S5.Struct({
1204
- part: S5.Literal("main").annotations({
1237
+ class Set2 extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1238
+ input: Schema5.Struct({
1239
+ part: Schema5.Literal("main").annotations({
1205
1240
  description: "Setting items in the main content area."
1206
1241
  }),
1207
- subject: S5.Array(S5.String.annotations({
1242
+ subject: Schema5.Array(Schema5.String.annotations({
1208
1243
  description: "Ids of the items to set."
1209
1244
  })),
1210
- options: S5.Struct({
1211
- override: S5.Literal(true).annotations({
1245
+ options: Schema5.Struct({
1246
+ override: Schema5.Literal(true).annotations({
1212
1247
  description: "Override the current items in the main content area."
1213
1248
  })
1214
1249
  })
1215
1250
  }),
1216
- output: S5.Void
1251
+ output: Schema5.Void
1217
1252
  }) {
1218
1253
  }
1219
1254
  LayoutAction2.Set = Set2;
1220
- class Close extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1221
- input: S5.Struct({
1222
- part: S5.Literal("main").annotations({
1255
+ class Close extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1256
+ input: Schema5.Struct({
1257
+ part: Schema5.Literal("main").annotations({
1223
1258
  description: "Closing items in the main content area."
1224
1259
  }),
1225
- subject: S5.Array(S5.String.annotations({
1260
+ subject: Schema5.Array(Schema5.String.annotations({
1226
1261
  description: "Ids of the items to close."
1227
1262
  })),
1228
- options: S5.Struct({
1229
- state: S5.Literal(false).annotations({
1263
+ options: Schema5.Struct({
1264
+ state: Schema5.Literal(false).annotations({
1230
1265
  description: "The items are being removed."
1231
1266
  })
1232
1267
  })
1233
1268
  }),
1234
- output: S5.Void
1269
+ output: Schema5.Void
1235
1270
  }) {
1236
1271
  }
1237
1272
  LayoutAction2.Close = Close;
1238
- class ScrollIntoView extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1239
- input: S5.Struct({
1240
- part: S5.Literal("current").annotations({
1273
+ class ScrollIntoView extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1274
+ input: Schema5.Struct({
1275
+ part: Schema5.Literal("current").annotations({
1241
1276
  description: "Setting the current item"
1242
1277
  }),
1243
- subject: S5.optional(S5.String.annotations({
1278
+ subject: Schema5.optional(Schema5.String.annotations({
1244
1279
  description: "The id of the item to set as current."
1245
1280
  })),
1246
- options: S5.optional(S5.Record({
1247
- key: S5.String,
1248
- value: S5.Any
1281
+ options: Schema5.optional(Schema5.Record({
1282
+ key: Schema5.String,
1283
+ value: Schema5.Any
1249
1284
  }).annotations({
1250
1285
  description: "Additional options for the scroll into view."
1251
1286
  }))
1252
1287
  }),
1253
- output: S5.Void
1288
+ output: Schema5.Void
1254
1289
  }) {
1255
1290
  }
1256
1291
  LayoutAction2.ScrollIntoView = ScrollIntoView;
1257
- class Expose extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1258
- input: S5.Struct({
1259
- part: S5.Literal("navigation").annotations({
1292
+ class Expose extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1293
+ input: Schema5.Struct({
1294
+ part: Schema5.Literal("navigation").annotations({
1260
1295
  description: "Exposing an item in the navigation area."
1261
1296
  }),
1262
- subject: S5.String.annotations({
1297
+ subject: Schema5.String.annotations({
1263
1298
  description: "The id of the item to expose."
1264
1299
  })
1265
1300
  }),
1266
- output: S5.Void
1301
+ output: Schema5.Void
1267
1302
  }) {
1268
1303
  }
1269
1304
  LayoutAction2.Expose = Expose;
1270
1305
  })(LayoutAction || (LayoutAction = {}));
1306
+ var LayoutAction;
1271
1307
 
1272
1308
  // packages/sdk/app-framework/src/common/surface.ts
1273
1309
  var createSurface = (definition) => definition;
1274
1310
 
1275
1311
  // packages/sdk/app-framework/src/common/translations.ts
1276
- import { Schema as S6 } from "effect";
1277
- var ResourceKey = S6.Union(S6.String, S6.Record({
1278
- key: S6.String,
1279
- value: S6.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
1280
1316
  }));
1281
- var ResourceLanguage = S6.Record({
1282
- key: S6.String,
1317
+ var ResourceLanguage = Schema6.Record({
1318
+ key: Schema6.String,
1283
1319
  value: ResourceKey
1284
1320
  });
1285
- var Resource = S6.Record({
1286
- key: S6.String,
1321
+ var Resource = Schema6.Record({
1322
+ key: Schema6.String,
1287
1323
  value: ResourceLanguage
1288
1324
  });
1289
1325
 
@@ -1296,12 +1332,12 @@ var isUndoable = (historyEntry) => historyEntry.length > 0 && historyEntry.every
1296
1332
  var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, historyLimit = HISTORY_LIMIT } = {}) => {
1297
1333
  const historyRef = Effect3.runSync(Ref2.make([]));
1298
1334
  const handleIntent = (intent) => Effect3.gen(function* () {
1299
- 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);
1300
1336
  if (candidates.length === 0) {
1301
1337
  yield* Effect3.fail(new NoResolversError(intent.id));
1302
1338
  }
1303
- const effect2 = candidates[0].resolve(intent.data, intent.undo ?? false);
1304
- 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);
1305
1341
  return {
1306
1342
  _intent: intent,
1307
1343
  ...result
@@ -1415,16 +1451,14 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1415
1451
  var defaultEffect = () => Effect3.fail(new Error("Intent runtime not ready"));
1416
1452
  var defaultPromise = () => Effect3.runPromise(defaultEffect());
1417
1453
  var intent_dispatcher_default = (context) => {
1418
- const state = live3({
1454
+ const state = live2({
1419
1455
  dispatch: defaultEffect,
1420
1456
  dispatchPromise: defaultPromise,
1421
1457
  undo: defaultEffect,
1422
1458
  undoPromise: defaultPromise
1423
1459
  });
1424
- const { dispatch, dispatchPromise, undo, undoPromise } = createDispatcher((module) => context.requestCapabilities(Capabilities.IntentResolver, (c, moduleId) => {
1425
- return module ? moduleId === module : true;
1426
- }).flat());
1427
- 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);
1428
1462
  state.dispatch = (intentChain, depth) => {
1429
1463
  return Effect3.gen(function* () {
1430
1464
  yield* manager._activate(Events.SetupIntentResolver);
@@ -1444,7 +1478,7 @@ export {
1444
1478
  defineCapability,
1445
1479
  contributes,
1446
1480
  lazy,
1447
- PluginsContext,
1481
+ PluginContext,
1448
1482
  defineEvent,
1449
1483
  eventKey,
1450
1484
  oneOf,
@@ -1480,4 +1514,4 @@ export {
1480
1514
  ResourceLanguage,
1481
1515
  Resource
1482
1516
  };
1483
- //# sourceMappingURL=chunk-DVNSCQJ5.mjs.map
1517
+ //# sourceMappingURL=chunk-5GE2ERNU.mjs.map