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