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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/dist/lib/browser/{app-graph-builder-6E7NCZ77.mjs → app-graph-builder-576BHZC7.mjs} +23 -23
  2. package/dist/lib/browser/app-graph-builder-576BHZC7.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-2KSDY3EZ.mjs → chunk-6AVTZPMT.mjs} +267 -325
  4. package/dist/lib/browser/chunk-6AVTZPMT.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-K3HOLGVH.mjs → chunk-PPIBZ5N4.mjs} +28 -40
  6. package/dist/lib/browser/chunk-PPIBZ5N4.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-KPRHX73H.mjs → chunk-SFPT4Z2C.mjs} +9 -9
  8. package/dist/lib/browser/chunk-SFPT4Z2C.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +8 -10
  10. package/dist/lib/browser/index.mjs.map +1 -1
  11. package/dist/lib/browser/{intent-dispatcher-VGUJBPPN.mjs → intent-dispatcher-3Q67MHZZ.mjs} +2 -2
  12. package/dist/lib/browser/{intent-resolver-QLFZY5R5.mjs → intent-resolver-O763LCLG.mjs} +3 -3
  13. package/dist/lib/browser/meta.json +1 -1
  14. package/dist/lib/browser/{store-QGVXOY4T.mjs → store-URSN7DZI.mjs} +6 -7
  15. package/dist/lib/browser/store-URSN7DZI.mjs.map +7 -0
  16. package/dist/lib/browser/testing/index.mjs +3 -7
  17. package/dist/lib/browser/testing/index.mjs.map +3 -3
  18. package/dist/lib/browser/worker.mjs +3 -5
  19. package/dist/lib/node/app-graph-builder-JZCSKYPY.cjs +146 -0
  20. package/dist/lib/node/app-graph-builder-JZCSKYPY.cjs.map +7 -0
  21. package/dist/lib/node/{chunk-JQMNABMK.cjs → chunk-JUSEAFDU.cjs} +4 -4
  22. package/dist/lib/node/chunk-JUSEAFDU.cjs.map +7 -0
  23. package/dist/lib/node/{chunk-2EBZ2ICH.cjs → chunk-YIFTVCOR.cjs} +247 -304
  24. package/dist/lib/node/chunk-YIFTVCOR.cjs.map +7 -0
  25. package/dist/lib/node/{chunk-7J66KH2T.cjs → chunk-YNTKVTVX.cjs} +67 -79
  26. package/dist/lib/node/chunk-YNTKVTVX.cjs.map +7 -0
  27. package/dist/lib/node/index.cjs +79 -81
  28. package/dist/lib/node/index.cjs.map +1 -1
  29. package/dist/lib/node/{intent-dispatcher-TASJBG5M.cjs → intent-dispatcher-H334XLFD.cjs} +8 -8
  30. package/dist/lib/node/{intent-dispatcher-TASJBG5M.cjs.map → intent-dispatcher-H334XLFD.cjs.map} +2 -2
  31. package/dist/lib/node/{intent-resolver-5CG5NIJY.cjs → intent-resolver-3F4POWAM.cjs} +12 -12
  32. package/dist/lib/node/meta.json +1 -1
  33. package/dist/lib/node/{store-IF3UR2KA.cjs → store-OFDHTDCB.cjs} +9 -10
  34. package/dist/lib/node/store-OFDHTDCB.cjs.map +7 -0
  35. package/dist/lib/node/testing/index.cjs +9 -14
  36. package/dist/lib/node/testing/index.cjs.map +3 -3
  37. package/dist/lib/node/worker.cjs +38 -40
  38. package/dist/lib/node/worker.cjs.map +2 -2
  39. package/dist/lib/node-esm/{app-graph-builder-LYCG5CO3.mjs → app-graph-builder-VYKLSMSZ.mjs} +23 -23
  40. package/dist/lib/node-esm/app-graph-builder-VYKLSMSZ.mjs.map +7 -0
  41. package/dist/lib/node-esm/{chunk-BOEJMAVK.mjs → chunk-AHKIPS2L.mjs} +267 -325
  42. package/dist/lib/node-esm/chunk-AHKIPS2L.mjs.map +7 -0
  43. package/dist/lib/node-esm/{chunk-JUJF5L4G.mjs → chunk-PHOUQACM.mjs} +9 -9
  44. package/dist/lib/node-esm/chunk-PHOUQACM.mjs.map +7 -0
  45. package/dist/lib/node-esm/{chunk-ISNBS46Y.mjs → chunk-R6A7Z4LU.mjs} +28 -40
  46. package/dist/lib/node-esm/chunk-R6A7Z4LU.mjs.map +7 -0
  47. package/dist/lib/node-esm/index.mjs +8 -10
  48. package/dist/lib/node-esm/index.mjs.map +1 -1
  49. package/dist/lib/node-esm/{intent-dispatcher-ZUSNX2OY.mjs → intent-dispatcher-YDE2ONZA.mjs} +2 -2
  50. package/dist/lib/node-esm/{intent-resolver-NGDHUKDD.mjs → intent-resolver-LAGJ7LXM.mjs} +3 -3
  51. package/dist/lib/node-esm/meta.json +1 -1
  52. package/dist/lib/node-esm/{store-NCRSE25X.mjs → store-EYSUVNCS.mjs} +6 -7
  53. package/dist/lib/node-esm/store-EYSUVNCS.mjs.map +7 -0
  54. package/dist/lib/node-esm/testing/index.mjs +3 -7
  55. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  56. package/dist/lib/node-esm/worker.mjs +3 -5
  57. package/dist/types/src/App.d.ts +1 -3
  58. package/dist/types/src/App.d.ts.map +1 -1
  59. package/dist/types/src/common/capabilities.d.ts +196 -6
  60. package/dist/types/src/common/capabilities.d.ts.map +1 -1
  61. package/dist/types/src/common/events.d.ts.map +1 -1
  62. package/dist/types/src/common/file.d.ts +7 -7
  63. package/dist/types/src/common/file.d.ts.map +1 -1
  64. package/dist/types/src/common/index.d.ts +0 -1
  65. package/dist/types/src/common/index.d.ts.map +1 -1
  66. package/dist/types/src/common/layout.d.ts +158 -164
  67. package/dist/types/src/common/layout.d.ts.map +1 -1
  68. package/dist/types/src/common/surface.d.ts.map +1 -1
  69. package/dist/types/src/common/translations.d.ts +7 -7
  70. package/dist/types/src/common/translations.d.ts.map +1 -1
  71. package/dist/types/src/core/capabilities.d.ts +15 -33
  72. package/dist/types/src/core/capabilities.d.ts.map +1 -1
  73. package/dist/types/src/core/events.d.ts +1 -4
  74. package/dist/types/src/core/events.d.ts.map +1 -1
  75. package/dist/types/src/core/manager.d.ts +11 -14
  76. package/dist/types/src/core/manager.d.ts.map +1 -1
  77. package/dist/types/src/core/plugin.d.ts +3 -4
  78. package/dist/types/src/core/plugin.d.ts.map +1 -1
  79. package/dist/types/src/helpers.d.ts.map +1 -1
  80. package/dist/types/src/playground/generator/generator.d.ts.map +1 -1
  81. package/dist/types/src/playground/logger/schema.d.ts +6 -6
  82. package/dist/types/src/playground/logger/schema.d.ts.map +1 -1
  83. package/dist/types/src/plugin-intent/actions.d.ts +14 -14
  84. package/dist/types/src/plugin-intent/actions.d.ts.map +1 -1
  85. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +3 -29
  86. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -1
  87. package/dist/types/src/plugin-intent/intent.d.ts +20 -14
  88. package/dist/types/src/plugin-intent/intent.d.ts.map +1 -1
  89. package/dist/types/src/plugin-settings/actions.d.ts +10 -10
  90. package/dist/types/src/plugin-settings/actions.d.ts.map +1 -1
  91. package/dist/types/src/plugin-settings/app-graph-builder.d.ts +195 -2
  92. package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +1 -1
  93. package/dist/types/src/plugin-settings/store.d.ts +2 -2
  94. package/dist/types/src/plugin-settings/store.d.ts.map +1 -1
  95. package/dist/types/src/react/IntentContext.d.ts.map +1 -1
  96. package/dist/types/src/react/Surface.d.ts +2 -2
  97. package/dist/types/src/react/Surface.d.ts.map +1 -1
  98. package/dist/types/src/react/useCapabilities.d.ts +2 -2
  99. package/dist/types/src/react/useCapabilities.d.ts.map +1 -1
  100. package/dist/types/src/react/useIntentResolver.d.ts.map +1 -1
  101. package/dist/types/src/testing/withPluginManager.d.ts +2 -5
  102. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
  103. package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
  104. package/dist/types/tsconfig.tsbuildinfo +1 -1
  105. package/package.json +20 -29
  106. package/project.json +1 -2
  107. package/src/App.tsx +4 -16
  108. package/src/common/capabilities.ts +4 -7
  109. package/src/common/file.ts +7 -7
  110. package/src/common/index.ts +0 -1
  111. package/src/common/layout.ts +128 -159
  112. package/src/common/translations.ts +7 -7
  113. package/src/core/capabilities.test.ts +36 -55
  114. package/src/core/capabilities.ts +58 -82
  115. package/src/core/events.ts +1 -4
  116. package/src/core/manager.test.ts +22 -22
  117. package/src/core/manager.ts +16 -24
  118. package/src/core/plugin.ts +3 -4
  119. package/src/playground/generator/generator.ts +4 -4
  120. package/src/playground/logger/schema.ts +5 -5
  121. package/src/playground/playground.stories.tsx +1 -1
  122. package/src/plugin-intent/actions.ts +9 -9
  123. package/src/plugin-intent/intent-dispatcher.test.ts +42 -23
  124. package/src/plugin-intent/intent-dispatcher.ts +13 -25
  125. package/src/plugin-intent/intent.ts +20 -22
  126. package/src/plugin-settings/actions.ts +8 -8
  127. package/src/plugin-settings/app-graph-builder.ts +94 -129
  128. package/src/plugin-settings/store.ts +17 -20
  129. package/src/react/Surface.stories.tsx +1 -1
  130. package/src/react/Surface.tsx +3 -3
  131. package/src/react/useCapabilities.ts +19 -9
  132. package/src/testing/withPluginManager.stories.tsx +1 -0
  133. package/src/testing/withPluginManager.tsx +3 -11
  134. package/tsconfig.json +0 -3
  135. package/dist/lib/browser/app-graph-builder-6E7NCZ77.mjs.map +0 -7
  136. package/dist/lib/browser/chunk-2KSDY3EZ.mjs.map +0 -7
  137. package/dist/lib/browser/chunk-K3HOLGVH.mjs.map +0 -7
  138. package/dist/lib/browser/chunk-KPRHX73H.mjs.map +0 -7
  139. package/dist/lib/browser/store-QGVXOY4T.mjs.map +0 -7
  140. package/dist/lib/node/app-graph-builder-4IWMG67O.cjs +0 -146
  141. package/dist/lib/node/app-graph-builder-4IWMG67O.cjs.map +0 -7
  142. package/dist/lib/node/chunk-2EBZ2ICH.cjs.map +0 -7
  143. package/dist/lib/node/chunk-7J66KH2T.cjs.map +0 -7
  144. package/dist/lib/node/chunk-JQMNABMK.cjs.map +0 -7
  145. package/dist/lib/node/store-IF3UR2KA.cjs.map +0 -7
  146. package/dist/lib/node-esm/app-graph-builder-LYCG5CO3.mjs.map +0 -7
  147. package/dist/lib/node-esm/chunk-BOEJMAVK.mjs.map +0 -7
  148. package/dist/lib/node-esm/chunk-ISNBS46Y.mjs.map +0 -7
  149. package/dist/lib/node-esm/chunk-JUJF5L4G.mjs.map +0 -7
  150. package/dist/lib/node-esm/store-NCRSE25X.mjs.map +0 -7
  151. package/dist/types/src/common/collaboration.d.ts +0 -26
  152. package/dist/types/src/common/collaboration.d.ts.map +0 -1
  153. package/src/common/collaboration.ts +0 -24
  154. package/typedoc/.nojekyll +0 -1
  155. package/typedoc/assets/hierarchy.js +0 -1
  156. package/typedoc/assets/highlight.css +0 -106
  157. package/typedoc/assets/icons.js +0 -18
  158. package/typedoc/assets/icons.svg +0 -1
  159. package/typedoc/assets/main.js +0 -60
  160. package/typedoc/assets/navigation.js +0 -1
  161. package/typedoc/assets/search.js +0 -1
  162. package/typedoc/assets/style.css +0 -1640
  163. package/typedoc/classes/CollaborationActions.InsertContent.html +0 -460
  164. package/typedoc/classes/ErrorBoundary.html +0 -125
  165. package/typedoc/classes/IntentAction.ShowUndo.html +0 -227
  166. package/typedoc/classes/IntentAction.Track.html +0 -266
  167. package/typedoc/classes/LayoutAction.AddToast.html +0 -265
  168. package/typedoc/classes/LayoutAction.Close.html +0 -382
  169. package/typedoc/classes/LayoutAction.Expose.html +0 -265
  170. package/typedoc/classes/LayoutAction.Open.html +0 -1123
  171. package/typedoc/classes/LayoutAction.RevertWorkspace.html +0 -343
  172. package/typedoc/classes/LayoutAction.ScrollIntoView.html +0 -460
  173. package/typedoc/classes/LayoutAction.Set.html +0 -460
  174. package/typedoc/classes/LayoutAction.SetLayoutMode.html +0 -499
  175. package/typedoc/classes/LayoutAction.SwitchWorkspace.html +0 -265
  176. package/typedoc/classes/LayoutAction.UpdateComplementary.html +0 -616
  177. package/typedoc/classes/LayoutAction.UpdateDialog.html +0 -811
  178. package/typedoc/classes/LayoutAction.UpdateLayout.html +0 -461
  179. package/typedoc/classes/LayoutAction.UpdatePopover.html +0 -1435
  180. package/typedoc/classes/LayoutAction.UpdateSidebar.html +0 -616
  181. package/typedoc/classes/Plugin.html +0 -6
  182. package/typedoc/classes/PluginContext.html +0 -38
  183. package/typedoc/classes/PluginManager.html +0 -43
  184. package/typedoc/classes/PluginModule.html +0 -18
  185. package/typedoc/classes/SettingsAction.Open.html +0 -226
  186. package/typedoc/classes/SettingsAction.OpenPluginRegistry.html +0 -265
  187. package/typedoc/functions/Events.createStateEvent.html +0 -2
  188. package/typedoc/functions/IntentPlugin.html +0 -1
  189. package/typedoc/functions/SettingsPlugin.html +0 -1
  190. package/typedoc/functions/allOf.html +0 -2
  191. package/typedoc/functions/chain.html +0 -3
  192. package/typedoc/functions/contributes.html +0 -2
  193. package/typedoc/functions/createApp.html +0 -6
  194. package/typedoc/functions/createDispatcher.html +0 -3
  195. package/typedoc/functions/createIntent.html +0 -6
  196. package/typedoc/functions/createResolver.html +0 -2
  197. package/typedoc/functions/createSurface.html +0 -2
  198. package/typedoc/functions/defineCapability.html +0 -2
  199. package/typedoc/functions/defineEvent.html +0 -2
  200. package/typedoc/functions/defineModule.html +0 -2
  201. package/typedoc/functions/definePlugin.html +0 -2
  202. package/typedoc/functions/eventKey.html +0 -2
  203. package/typedoc/functions/getEvents.html +0 -2
  204. package/typedoc/functions/isAllOf.html +0 -2
  205. package/typedoc/functions/isOneOf.html +0 -2
  206. package/typedoc/functions/isSurfaceAvailable.html +0 -2
  207. package/typedoc/functions/lazy.html +0 -2
  208. package/typedoc/functions/oneOf.html +0 -2
  209. package/typedoc/functions/useAppGraph.html +0 -1
  210. package/typedoc/functions/useCapabilities.html +0 -3
  211. package/typedoc/functions/useCapability.html +0 -4
  212. package/typedoc/functions/useIntentDispatcher.html +0 -1
  213. package/typedoc/functions/useIntentResolver.html +0 -1
  214. package/typedoc/functions/useLayout.html +0 -1
  215. package/typedoc/functions/usePluginManager.html +0 -2
  216. package/typedoc/hierarchy.html +0 -1
  217. package/typedoc/index.html +0 -16
  218. package/typedoc/interfaces/LayoutAction.Toast.html +0 -10
  219. package/typedoc/media/LICENSE +0 -8
  220. package/typedoc/modules/Capabilities.html +0 -1
  221. package/typedoc/modules/CollaborationActions.html +0 -1
  222. package/typedoc/modules/Events.html +0 -1
  223. package/typedoc/modules/IntentAction.html +0 -1
  224. package/typedoc/modules/LayoutAction.html +0 -2
  225. package/typedoc/modules/SettingsAction.html +0 -1
  226. package/typedoc/modules.html +0 -1
  227. package/typedoc/types/ActivationEvent.html +0 -8
  228. package/typedoc/types/ActivationEvents.html +0 -2
  229. package/typedoc/types/AnyCapability.html +0 -1
  230. package/typedoc/types/AnyIntent.html +0 -1
  231. package/typedoc/types/AnyIntentChain.html +0 -1
  232. package/typedoc/types/AnyIntentEffectResult.html +0 -1
  233. package/typedoc/types/AnyIntentResolver.html +0 -1
  234. package/typedoc/types/AnyIntentResult.html +0 -1
  235. package/typedoc/types/Capabilities.FileUploader.html +0 -1
  236. package/typedoc/types/Capabilities.IntentResolver.html +0 -1
  237. package/typedoc/types/Capabilities.Layout.html +0 -1
  238. package/typedoc/types/Capabilities.Metadata.html +0 -1
  239. package/typedoc/types/Capabilities.ReactContext.html +0 -1
  240. package/typedoc/types/Capabilities.ReactRoot.html +0 -1
  241. package/typedoc/types/Capabilities.ReactSurface.html +0 -1
  242. package/typedoc/types/Capabilities.Settings.html +0 -4
  243. package/typedoc/types/Capability.html +0 -9
  244. package/typedoc/types/CreateAppOptions.html +0 -10
  245. package/typedoc/types/FileInfo.html +0 -1
  246. package/typedoc/types/Intent.html +0 -10
  247. package/typedoc/types/IntentChain.html +0 -6
  248. package/typedoc/types/IntentContext.html +0 -5
  249. package/typedoc/types/IntentData.html +0 -1
  250. package/typedoc/types/IntentDispatcher.html +0 -2
  251. package/typedoc/types/IntentDispatcherResult.html +0 -2
  252. package/typedoc/types/IntentEffectDefinition.html +0 -2
  253. package/typedoc/types/IntentEffectResult.html +0 -15
  254. package/typedoc/types/IntentParams.html +0 -3
  255. package/typedoc/types/IntentResolver.html +0 -2
  256. package/typedoc/types/IntentResultData.html +0 -1
  257. package/typedoc/types/IntentSchema.html +0 -1
  258. package/typedoc/types/IntentUndo.html +0 -2
  259. package/typedoc/types/InterfaceDef.html +0 -4
  260. package/typedoc/types/Label.html +0 -1
  261. package/typedoc/types/NodeSerializer.html +0 -8
  262. package/typedoc/types/PluginManagerOptions.html +0 -6
  263. package/typedoc/types/PluginMeta.html +0 -21
  264. package/typedoc/types/PromiseIntentDispatcher.html +0 -2
  265. package/typedoc/types/PromiseIntentUndo.html +0 -2
  266. package/typedoc/types/Resource.html +0 -1
  267. package/typedoc/types/ResourceKey.html +0 -1
  268. package/typedoc/types/ResourceLanguage.html +0 -1
  269. package/typedoc/types/SerializedNode.html +0 -4
  270. package/typedoc/types/SurfaceComponent.html +0 -2
  271. package/typedoc/types/SurfaceDefinition.html +0 -2
  272. package/typedoc/types/SurfaceProps.html +0 -4
  273. package/typedoc/variables/Capabilities.AppGraph.html +0 -1
  274. package/typedoc/variables/Capabilities.AppGraphBuilder.html +0 -1
  275. package/typedoc/variables/Capabilities.AppGraphSerializer.html +0 -1
  276. package/typedoc/variables/Capabilities.ArtifactDefinition.html +0 -1
  277. package/typedoc/variables/Capabilities.FileUploader.html +0 -1
  278. package/typedoc/variables/Capabilities.IntentDispatcher.html +0 -1
  279. package/typedoc/variables/Capabilities.IntentResolver.html +0 -1
  280. package/typedoc/variables/Capabilities.Layout.html +0 -1
  281. package/typedoc/variables/Capabilities.Metadata.html +0 -1
  282. package/typedoc/variables/Capabilities.Null.html +0 -1
  283. package/typedoc/variables/Capabilities.PluginManager.html +0 -1
  284. package/typedoc/variables/Capabilities.ReactContext.html +0 -1
  285. package/typedoc/variables/Capabilities.ReactRoot.html +0 -1
  286. package/typedoc/variables/Capabilities.ReactSurface.html +0 -1
  287. package/typedoc/variables/Capabilities.RxRegistry.html +0 -1
  288. package/typedoc/variables/Capabilities.Settings.html +0 -1
  289. package/typedoc/variables/Capabilities.SettingsStore.html +0 -1
  290. package/typedoc/variables/Capabilities.Tools.html +0 -1
  291. package/typedoc/variables/Capabilities.Translations.html +0 -1
  292. package/typedoc/variables/Events.AppGraphReady.html +0 -2
  293. package/typedoc/variables/Events.DispatcherReady.html +0 -2
  294. package/typedoc/variables/Events.LayoutReady.html +0 -1
  295. package/typedoc/variables/Events.SettingsReady.html +0 -2
  296. package/typedoc/variables/Events.SetupAppGraph.html +0 -2
  297. package/typedoc/variables/Events.SetupArtifactDefinition.html +0 -2
  298. package/typedoc/variables/Events.SetupIntentResolver.html +0 -2
  299. package/typedoc/variables/Events.SetupMetadata.html +0 -2
  300. package/typedoc/variables/Events.SetupReactSurface.html +0 -2
  301. package/typedoc/variables/Events.SetupSettings.html +0 -2
  302. package/typedoc/variables/Events.SetupTranslations.html +0 -2
  303. package/typedoc/variables/Events.Startup.html +0 -2
  304. package/typedoc/variables/FileInfoSchema.html +0 -1
  305. package/typedoc/variables/INTENT_ACTION.html +0 -1
  306. package/typedoc/variables/INTENT_PLUGIN.html +0 -1
  307. package/typedoc/variables/LAYOUT_ACTION.html +0 -1
  308. package/typedoc/variables/LAYOUT_PLUGIN.html +0 -1
  309. package/typedoc/variables/Label.html +0 -1
  310. package/typedoc/variables/LayoutAction.Toast.html +0 -1
  311. package/typedoc/variables/LayoutAction.UPDATE_LAYOUT.html +0 -1
  312. package/typedoc/variables/PluginManagerProvider.html +0 -2
  313. package/typedoc/variables/Resource.html +0 -2
  314. package/typedoc/variables/ResourceKey.html +0 -1
  315. package/typedoc/variables/ResourceLanguage.html +0 -1
  316. package/typedoc/variables/SETTINGS_ACTION.html +0 -1
  317. package/typedoc/variables/SETTINGS_ID.html +0 -1
  318. package/typedoc/variables/SETTINGS_KEY.html +0 -1
  319. package/typedoc/variables/SETTINGS_PLUGIN.html +0 -1
  320. package/typedoc/variables/Surface.html +0 -2
  321. package/typedoc/variables/defaultFileTypes.html +0 -1
  322. /package/dist/lib/browser/{intent-dispatcher-VGUJBPPN.mjs.map → intent-dispatcher-3Q67MHZZ.mjs.map} +0 -0
  323. /package/dist/lib/browser/{intent-resolver-QLFZY5R5.mjs.map → intent-resolver-O763LCLG.mjs.map} +0 -0
  324. /package/dist/lib/node/{intent-resolver-5CG5NIJY.cjs.map → intent-resolver-3F4POWAM.cjs.map} +0 -0
  325. /package/dist/lib/node-esm/{intent-dispatcher-ZUSNX2OY.mjs.map → intent-dispatcher-YDE2ONZA.mjs.map} +0 -0
  326. /package/dist/lib/node-esm/{intent-resolver-NGDHUKDD.mjs.map → intent-resolver-LAGJ7LXM.mjs.map} +0 -0
@@ -1,12 +1,16 @@
1
+ /**
2
+ * Interface definition for a capability.
3
+ */
1
4
  //
2
5
  // Copyright 2025 DXOS.org
3
6
  //
4
7
 
5
- import { type Registry, Rx } from '@effect-rx/rx-react';
8
+ import { effect, untracked } from '@preact/signals-core';
6
9
  import { Effect } from 'effect';
7
10
 
8
11
  import { Trigger } from '@dxos/async';
9
12
  import { invariant } from '@dxos/invariant';
13
+ import { create } from '@dxos/live-object';
10
14
  import { log } from '@dxos/log';
11
15
  import { type MaybePromise } from '@dxos/util';
12
16
 
@@ -30,8 +34,7 @@ export const defineCapability = <T>(identifier: string) => {
30
34
  };
31
35
 
32
36
  /**
33
- * A unique string identifier with a Typescript type associated with it.
34
- * When a capability is contributed to the application an implementation of the interface is provided.
37
+ * Functionality contributed to the application by a plugin module.
35
38
  */
36
39
  export type Capability<T> = {
37
40
  /**
@@ -53,7 +56,6 @@ export type Capability<T> = {
53
56
  export type AnyCapability = Capability<any>;
54
57
 
55
58
  type PluginsContextOptions = {
56
- registry: Registry.Registry;
57
59
  activate: (event: ActivationEvent) => Effect.Effect<boolean, Error>;
58
60
  reset: (event: ActivationEvent) => Effect.Effect<boolean, Error>;
59
61
  };
@@ -93,31 +95,10 @@ export const lazy =
93
95
  };
94
96
 
95
97
  /**
96
- * Facilitates the dependency injection between [plugin modules](#pluginmodule) by allowing them contribute and request capabilities from each other.
97
- * It tracks the capabilities that are contributed in an in-memory live object.
98
- * This allows the application to subscribe to this state and incorporate plugins which are added dynamically.
98
+ * Context which is passed to plugins, allowing them to interact with each other.
99
99
  */
100
- export class PluginContext {
101
- private readonly _registry: Registry.Registry;
102
-
103
- private readonly _capabilityImpls = Rx.family<string, Rx.Writable<CapabilityImpl<unknown>[]>>(() => {
104
- return Rx.make<CapabilityImpl<unknown>[]>([]).pipe(Rx.keepAlive);
105
- });
106
-
107
- readonly _capabilities = Rx.family<string, Rx.Rx<unknown[]>>((id: string) => {
108
- return Rx.make((get) => {
109
- const current = get(this._capabilityImpls(id));
110
- return current.map((c) => c.implementation);
111
- });
112
- });
113
-
114
- readonly _capability = Rx.family<string, Rx.Rx<unknown>>((id: string) => {
115
- return Rx.make((get) => {
116
- const current = get(this._capabilities(id));
117
- invariant(current.length > 0, `No capability found for ${id}`);
118
- return current[0];
119
- });
120
- });
100
+ export class PluginsContext {
101
+ private readonly _definedCapabilities = new Map<string, CapabilityImpl<unknown>[]>();
121
102
 
122
103
  /**
123
104
  * Activates plugins based on the activation event.
@@ -133,8 +114,7 @@ export class PluginContext {
133
114
  */
134
115
  readonly reset: PluginsContextOptions['reset'];
135
116
 
136
- constructor({ registry, activate, reset }: PluginsContextOptions) {
137
- this._registry = registry;
117
+ constructor({ activate, reset }: PluginsContextOptions) {
138
118
  this.activate = activate;
139
119
  this.reset = reset;
140
120
  }
@@ -151,17 +131,18 @@ export class PluginContext {
151
131
  interface: InterfaceDef<T>;
152
132
  implementation: T;
153
133
  }) {
154
- const current = this._registry.get(this._capabilityImpls(interfaceDef.identifier));
155
- const capability = new CapabilityImpl(moduleId, implementation);
156
- if (current.includes(capability)) {
157
- return;
134
+ let current = this._definedCapabilities.get(interfaceDef.identifier);
135
+ if (!current) {
136
+ const object = create<{ value: CapabilityImpl<unknown>[] }>({ value: [] });
137
+ current = untracked(() => object.value);
138
+ this._definedCapabilities.set(interfaceDef.identifier, current);
158
139
  }
159
140
 
160
- this._registry.set(this._capabilityImpls(interfaceDef.identifier), [...current, capability]);
141
+ current.push(new CapabilityImpl(moduleId, implementation));
161
142
  log('capability contributed', {
162
143
  id: interfaceDef.identifier,
163
144
  moduleId,
164
- count: current.length,
145
+ count: untracked(() => current.length),
165
146
  });
166
147
  }
167
148
 
@@ -169,79 +150,74 @@ export class PluginContext {
169
150
  * @internal
170
151
  */
171
152
  removeCapability<T>(interfaceDef: InterfaceDef<T>, implementation: T) {
172
- const current = this._registry.get(this._capabilityImpls(interfaceDef.identifier));
173
- if (current.length === 0) {
153
+ const current = this._definedCapabilities.get(interfaceDef.identifier);
154
+ if (!current) {
174
155
  return;
175
156
  }
176
157
 
177
- const next = current.filter((c) => c.implementation !== implementation);
178
- if (next.length !== current.length) {
179
- this._registry.set(this._capabilityImpls(interfaceDef.identifier), next);
180
- log('capability removed', { id: interfaceDef.identifier, count: current.length });
158
+ const index = current.findIndex((i) => i.implementation === implementation);
159
+ if (index !== -1) {
160
+ current.splice(index, 1);
161
+ log('capability removed', { id: interfaceDef.identifier, count: untracked(() => current.length) });
181
162
  } else {
182
163
  log.warn('capability not removed', { id: interfaceDef.identifier });
183
164
  }
184
165
  }
185
166
 
186
167
  /**
187
- * Get the Rx reference to the available capabilities for a given interface.
188
- * Primarily useful for deriving other Rx values based on the capabilities or
189
- * for subscribing to changes in the capabilities.
190
- * @returns An Rx reference to the available capabilities.
168
+ * Requests capabilities from the plugin context.
169
+ * @returns An array of capabilities.
170
+ * @reactive
191
171
  */
192
- capabilities<T>(interfaceDef: InterfaceDef<T>): Rx.Rx<T[]> {
193
- // NOTE: This the type-checking for capabilities is done at the time of contribution.
194
- return this._capabilities(interfaceDef.identifier) as Rx.Rx<T[]>;
195
- }
172
+ requestCapabilities<T, U extends T = T>(
173
+ interfaceDef: InterfaceDef<T>,
174
+ filter?: (capability: T, moduleId: string) => capability is U,
175
+ ): U[] {
176
+ let current = this._definedCapabilities.get(interfaceDef.identifier);
177
+ if (!current) {
178
+ const object = create<{ value: CapabilityImpl<unknown>[] }>({ value: [] });
179
+ current = untracked(() => object.value);
180
+ this._definedCapabilities.set(interfaceDef.identifier, current);
181
+ }
196
182
 
197
- /**
198
- * Get the Rx reference to the available capabilities for a given interface.
199
- * Primarily useful for deriving other Rx values based on the capability or
200
- * for subscribing to changes in the capability.
201
- * @returns An Rx reference to the available capability.
202
- * @throws If no capability is found.
203
- */
204
- capability<T>(interfaceDef: InterfaceDef<T>): Rx.Rx<T> {
205
183
  // NOTE: This the type-checking for capabilities is done at the time of contribution.
206
- return this._capability(interfaceDef.identifier) as Rx.Rx<T>;
207
- }
208
-
209
- /**
210
- * Get capabilities from the plugin context.
211
- * @returns An array of capabilities.
212
- */
213
- getCapabilities<T>(interfaceDef: InterfaceDef<T>): T[] {
214
- return this._registry.get(this.capabilities(interfaceDef));
184
+ const capabilities = filter ? current.filter((c) => filter(c.implementation as T, c.moduleId)) : current;
185
+ return capabilities.map((c) => c.implementation) as U[];
215
186
  }
216
187
 
217
188
  /**
218
189
  * Requests a single capability from the plugin context.
219
190
  * @returns The capability.
220
191
  * @throws If no capability is found.
192
+ * @reactive
221
193
  */
222
- getCapability<T>(interfaceDef: InterfaceDef<T>): T {
223
- return this._registry.get(this.capability(interfaceDef));
194
+ requestCapability<T, U extends T = T>(
195
+ interfaceDef: InterfaceDef<T>,
196
+ filter?: (capability: T, moduleId: string) => capability is U,
197
+ ): U {
198
+ const capability = this.requestCapabilities(interfaceDef, filter)[0];
199
+ invariant(capability, `No capability found for ${interfaceDef.identifier}`);
200
+ return capability;
224
201
  }
225
202
 
226
203
  /**
227
- * Waits for a capability to be available.
204
+ * Waits for a capability to be contributed.
228
205
  * @returns The capability.
229
206
  */
230
- async waitForCapability<T>(interfaceDef: InterfaceDef<T>): Promise<T> {
231
- const [capability] = this.getCapabilities(interfaceDef);
232
- if (capability) {
233
- return capability;
234
- }
235
-
236
- const trigger = new Trigger<T>();
237
- const cancel = this._registry.subscribe(this.capabilities(interfaceDef), (capabilities) => {
238
- if (capabilities.length > 0) {
207
+ async waitForCapability<T, U extends T = T>(
208
+ interfaceDef: InterfaceDef<T>,
209
+ filter?: (capability: T) => capability is U,
210
+ ): Promise<U> {
211
+ const trigger = new Trigger<U>();
212
+ const unsubscribe = effect(() => {
213
+ const capabilities = this.requestCapabilities(interfaceDef, filter);
214
+ if (capabilities[0]) {
239
215
  trigger.wake(capabilities[0]);
240
216
  }
241
217
  });
242
- const result = await trigger.wait();
243
- cancel();
244
- return result;
218
+ const capability = await trigger.wait();
219
+ unsubscribe();
220
+ return capability;
245
221
  }
246
222
 
247
223
  async activatePromise(event: ActivationEvent): Promise<boolean> {
@@ -3,10 +3,7 @@
3
3
  //
4
4
 
5
5
  /**
6
- * A unique string identifier representing an event.
7
- * This is expected to be a URI, where initial parts are often the id of the plugin whose package defines the event.
8
- *
9
- * @example dxos.org/plugin/example/event/ready
6
+ * An event which activates a plugin module.
10
7
  */
11
8
  export type ActivationEvent = {
12
9
  id: string;
@@ -11,9 +11,9 @@ import { raise } from '@dxos/debug';
11
11
  import { updateCounter } from '@dxos/echo-schema/testing';
12
12
  import { registerSignalsRuntime } from '@dxos/echo-signals';
13
13
  import { invariant } from '@dxos/invariant';
14
- import { live } from '@dxos/live-object';
14
+ import { create } from '@dxos/live-object';
15
15
 
16
- import { contributes, defineCapability, type PluginContext } from './capabilities';
16
+ import { contributes, defineCapability, type PluginsContext } from './capabilities';
17
17
  import { allOf, defineEvent, oneOf } from './events';
18
18
  import { PluginManager } from './manager';
19
19
  import { definePlugin, defineModule, type Plugin } from './plugin';
@@ -205,22 +205,22 @@ describe('PluginManager', () => {
205
205
 
206
206
  const manager = new PluginManager({ pluginLoader });
207
207
  expect(manager.active).toEqual([]);
208
- expect(manager.context.getCapabilities(Number)).toHaveLength(0);
208
+ expect(manager.context.requestCapabilities(Number)).toHaveLength(0);
209
209
 
210
210
  await manager.add(Plugin1.meta.id);
211
211
  await manager.activate(CountEvent);
212
212
  expect(manager.active).toEqual([Plugin1.meta.id]);
213
- expect(manager.context.getCapabilities(Number)).toHaveLength(1);
213
+ expect(manager.context.requestCapabilities(Number)).toHaveLength(1);
214
214
 
215
215
  await manager.add(Plugin2.meta.id);
216
216
  await manager.activate(CountEvent);
217
217
  expect(manager.active).toEqual([Plugin1.meta.id, Plugin2.meta.id]);
218
- expect(manager.context.getCapabilities(Number)).toHaveLength(2);
218
+ expect(manager.context.requestCapabilities(Number)).toHaveLength(2);
219
219
 
220
220
  await manager.add(Plugin3.meta.id);
221
221
  await manager.activate(CountEvent);
222
222
  expect(manager.active).toEqual([Plugin1.meta.id, Plugin2.meta.id, Plugin3.meta.id]);
223
- expect(manager.context.getCapabilities(Number)).toHaveLength(3);
223
+ expect(manager.context.requestCapabilities(Number)).toHaveLength(3);
224
224
  });
225
225
 
226
226
  it('should only activate modules after all activatation events have been fired', async () => {
@@ -235,16 +235,16 @@ describe('PluginManager', () => {
235
235
 
236
236
  const manager = new PluginManager({ pluginLoader });
237
237
  expect(manager.active).toEqual([]);
238
- expect(manager.context.getCapabilities(String)).toHaveLength(0);
238
+ expect(manager.context.requestCapabilities(String)).toHaveLength(0);
239
239
 
240
240
  await manager.add(testMeta.id);
241
241
  await manager.activate(Events.Startup);
242
242
  expect(manager.active).toEqual([]);
243
- expect(manager.context.getCapabilities(String)).toHaveLength(0);
243
+ expect(manager.context.requestCapabilities(String)).toHaveLength(0);
244
244
 
245
245
  await manager.activate(CountEvent);
246
246
  expect(manager.active).toEqual([Hello.id]);
247
- expect(manager.context.getCapabilities(String)).toHaveLength(1);
247
+ expect(manager.context.requestCapabilities(String)).toHaveLength(1);
248
248
  });
249
249
 
250
250
  it('should only activate modules once when multiple activatation events have been fired', async () => {
@@ -261,25 +261,25 @@ describe('PluginManager', () => {
261
261
 
262
262
  const manager = new PluginManager({ pluginLoader });
263
263
  expect(manager.active).toEqual([]);
264
- expect(manager.context.getCapabilities(String)).toHaveLength(0);
264
+ expect(manager.context.requestCapabilities(String)).toHaveLength(0);
265
265
  expect(count).toEqual(0);
266
266
 
267
267
  await manager.add(testMeta.id);
268
268
  await manager.activate(CountEvent);
269
269
  expect(manager.active).toEqual([Hello.id]);
270
- expect(manager.context.getCapabilities(String)).toHaveLength(1);
270
+ expect(manager.context.requestCapabilities(String)).toHaveLength(1);
271
271
  expect(count).toEqual(1);
272
272
 
273
273
  await manager.activate(Events.Startup);
274
274
  expect(manager.active).toEqual([Hello.id]);
275
- expect(manager.context.getCapabilities(String)).toHaveLength(1);
275
+ expect(manager.context.requestCapabilities(String)).toHaveLength(1);
276
276
  expect(count).toEqual(1);
277
277
  });
278
278
 
279
279
  it('should be able to disable and re-enable an active plugin', async () => {
280
280
  const state = { total: 0 };
281
- const computeTotal = (context: PluginContext) => {
282
- const numbers = context.getCapabilities(Number);
281
+ const computeTotal = (context: PluginsContext) => {
282
+ const numbers = context.requestCapabilities(Number);
283
283
  state.total = numbers.reduce((acc, n) => acc + n.number, 0);
284
284
  };
285
285
 
@@ -322,7 +322,7 @@ describe('PluginManager', () => {
322
322
  expect(manager.active).toEqual([...Test.modules.map((m) => m.id), Count.meta.id]);
323
323
  expect(manager.pendingReset).toEqual([]);
324
324
 
325
- const totals = manager.context.getCapabilities(Total);
325
+ const totals = manager.context.requestCapabilities(Total);
326
326
  expect(totals).toHaveLength(1);
327
327
  expect(totals[0].total).toEqual(6);
328
328
  }
@@ -332,7 +332,7 @@ describe('PluginManager', () => {
332
332
  expect(manager.active).toEqual([Count.meta.id]);
333
333
  expect(manager.pendingReset).toEqual([]);
334
334
 
335
- const totals = manager.context.getCapabilities(Total);
335
+ const totals = manager.context.requestCapabilities(Total);
336
336
  expect(totals).toHaveLength(1);
337
337
  // Total doesn't change because it is not reactive.
338
338
  expect(totals[0].total).toEqual(6);
@@ -343,7 +343,7 @@ describe('PluginManager', () => {
343
343
  expect(manager.active).toEqual([Count.meta.id, ...Test.modules.map((m) => m.id)]);
344
344
  expect(manager.pendingReset).toEqual([]);
345
345
 
346
- const totals = manager.context.getCapabilities(Total);
346
+ const totals = manager.context.requestCapabilities(Total);
347
347
  expect(totals).toHaveLength(1);
348
348
  expect(totals[0].total).toEqual(6);
349
349
  }
@@ -358,14 +358,14 @@ describe('PluginManager', () => {
358
358
  id,
359
359
  activatesOn: Events.Startup,
360
360
  activatesAfter: [stateEvent],
361
- activate: () => contributes(Number, live({ number: 1 })),
361
+ activate: () => contributes(Number, create({ number: 1 })),
362
362
  }),
363
363
  defineModule({
364
364
  id: 'dxos.org/test/doubler',
365
365
  activatesOn: stateEvent,
366
366
  activate: (context) => {
367
- const counter = context.getCapability(Number);
368
- const state = live({ total: counter.number * 2 });
367
+ const counter = context.requestCapability(Number);
368
+ const state = create({ total: counter.number * 2 });
369
369
  const unsubscribe = effect(() => {
370
370
  state.total = counter.number * 2;
371
371
  });
@@ -380,8 +380,8 @@ describe('PluginManager', () => {
380
380
  await manager.activate(Events.Startup);
381
381
  expect(manager.active).toEqual(Test.modules.map((m) => m.id));
382
382
 
383
- const counter = manager.context.getCapability(Number);
384
- const doubler = manager.context.getCapability(Total);
383
+ const counter = manager.context.requestCapability(Number);
384
+ const doubler = manager.context.requestCapability(Total);
385
385
  expect(counter.number).toEqual(1);
386
386
  expect(doubler.total).toEqual(2);
387
387
 
@@ -2,16 +2,15 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Registry } from '@effect-rx/rx-react';
6
5
  import { untracked } from '@preact/signals-core';
7
6
  import { Array as A, Effect, Either, Match, pipe } from 'effect';
8
7
 
9
8
  import { Event } from '@dxos/async';
10
- import { live, type Live } from '@dxos/live-object';
9
+ import { create, type ReactiveObject } from '@dxos/live-object';
11
10
  import { log } from '@dxos/log';
12
11
  import { type MaybePromise } from '@dxos/util';
13
12
 
14
- import { type AnyCapability, PluginContext } from './capabilities';
13
+ import { type AnyCapability, PluginsContext } from './capabilities';
15
14
  import { type ActivationEvent, eventKey, getEvents, isAllOf } from './events';
16
15
  import { type PluginModule, type Plugin } from './plugin';
17
16
 
@@ -25,7 +24,6 @@ export type PluginManagerOptions = {
25
24
  plugins?: Plugin[];
26
25
  core?: string[];
27
26
  enabled?: string[];
28
- registry?: Registry.Registry;
29
27
  };
30
28
 
31
29
  type PluginManagerState = {
@@ -45,11 +43,13 @@ type PluginManagerState = {
45
43
 
46
44
  export class PluginManager {
47
45
  readonly activation = new Event<{ event: string; state: 'activating' | 'activated' | 'error'; error?: any }>();
48
- readonly context: PluginContext;
49
- readonly registry: Registry.Registry;
50
46
 
51
- // TODO(wittjosiah): Replace with Rx.
52
- private readonly _state: Live<PluginManagerState>;
47
+ readonly context = new PluginsContext({
48
+ activate: (event) => this._activate(event),
49
+ reset: (id) => this._reset(id),
50
+ });
51
+
52
+ private readonly _state: ReactiveObject<PluginManagerState>;
53
53
  private readonly _pluginLoader: PluginManagerOptions['pluginLoader'];
54
54
  private readonly _capabilities = new Map<string, AnyCapability[]>();
55
55
 
@@ -58,17 +58,9 @@ export class PluginManager {
58
58
  plugins = [],
59
59
  core = plugins.map(({ meta }) => meta.id),
60
60
  enabled = [],
61
- registry,
62
61
  }: PluginManagerOptions) {
63
- this.registry = registry ?? Registry.make();
64
- this.context = new PluginContext({
65
- registry: this.registry,
66
- activate: (event) => this._activate(event),
67
- reset: (id) => this._reset(id),
68
- });
69
-
70
62
  this._pluginLoader = pluginLoader;
71
- this._state = live({
63
+ this._state = create({
72
64
  plugins,
73
65
  core,
74
66
  enabled,
@@ -87,7 +79,7 @@ export class PluginManager {
87
79
  *
88
80
  * @reactive
89
81
  */
90
- get plugins(): Live<readonly Plugin[]> {
82
+ get plugins(): ReactiveObject<readonly Plugin[]> {
91
83
  return this._state.plugins;
92
84
  }
93
85
 
@@ -96,7 +88,7 @@ export class PluginManager {
96
88
  *
97
89
  * @reactive
98
90
  */
99
- get core(): Live<readonly string[]> {
91
+ get core(): ReactiveObject<readonly string[]> {
100
92
  return this._state.core;
101
93
  }
102
94
 
@@ -105,7 +97,7 @@ export class PluginManager {
105
97
  *
106
98
  * @reactive
107
99
  */
108
- get enabled(): Live<readonly string[]> {
100
+ get enabled(): ReactiveObject<readonly string[]> {
109
101
  return this._state.enabled;
110
102
  }
111
103
 
@@ -114,7 +106,7 @@ export class PluginManager {
114
106
  *
115
107
  * @reactive
116
108
  */
117
- get modules(): Live<readonly PluginModule[]> {
109
+ get modules(): ReactiveObject<readonly PluginModule[]> {
118
110
  return this._state.modules;
119
111
  }
120
112
 
@@ -123,7 +115,7 @@ export class PluginManager {
123
115
  *
124
116
  * @reactive
125
117
  */
126
- get active(): Live<readonly string[]> {
118
+ get active(): ReactiveObject<readonly string[]> {
127
119
  return this._state.active;
128
120
  }
129
121
 
@@ -132,7 +124,7 @@ export class PluginManager {
132
124
  *
133
125
  * @reactive
134
126
  */
135
- get eventsFired(): Live<readonly string[]> {
127
+ get eventsFired(): ReactiveObject<readonly string[]> {
136
128
  return this._state.eventsFired;
137
129
  }
138
130
 
@@ -141,7 +133,7 @@ export class PluginManager {
141
133
  *
142
134
  * @reactive
143
135
  */
144
- get pendingReset(): Live<readonly string[]> {
136
+ get pendingReset(): ReactiveObject<readonly string[]> {
145
137
  return this._state.pendingReset;
146
138
  }
147
139
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { type MaybePromise } from '@dxos/util';
6
6
 
7
- import { type AnyCapability, type PluginContext } from './capabilities';
7
+ import { type AnyCapability, type PluginsContext } from './capabilities';
8
8
  import { type ActivationEvent, type ActivationEvents } from './events';
9
9
 
10
10
  interface PluginModuleInterface {
@@ -36,13 +36,13 @@ interface PluginModuleInterface {
36
36
  * @returns The capabilities of the module.
37
37
  */
38
38
  activate: (
39
- context: PluginContext,
39
+ context: PluginsContext,
40
40
  ) => MaybePromise<AnyCapability | AnyCapability[]> | Promise<() => Promise<AnyCapability | AnyCapability[]>>;
41
41
  }
42
42
 
43
43
  /**
44
44
  * A unit of containment of modular functionality that can be provided to an application.
45
- * Activation of a module is async allowing for code to split and loaded lazily.
45
+ * Plugins provide things like components, state, actions, etc. to the application.
46
46
  */
47
47
  // NOTE: This is implemented as a class to prevent it from being proxied by PluginManager state.
48
48
  export class PluginModule implements PluginModuleInterface {
@@ -114,7 +114,6 @@ export type PluginMeta = {
114
114
 
115
115
  /**
116
116
  * A collection of modules that are be enabled/disabled as a unit.
117
- * Plugins provide things such as components, state, actions, etc. to the application.
118
117
  */
119
118
  // NOTE: This is implemented as a class to prevent it from being proxied by PluginManager state.
120
119
  export class Plugin {
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Schema } from 'effect';
5
+ import { Schema as S } from 'effect';
6
6
 
7
7
  import { Capabilities, Events } from '../../common';
8
8
  import { contributes, defineEvent, defineCapability, defineModule, definePlugin } from '../../core';
@@ -15,9 +15,9 @@ export const CountEvent = defineEvent('dxos.org/test/generator/count');
15
15
  export const createPluginId = (id: string) => `dxos.org/test/generator/${id}`;
16
16
 
17
17
  export const createGeneratorIntent = (id: string) => {
18
- class Alert extends Schema.TaggedClass<Alert>()(`${createPluginId(id)}/action/alert`, {
19
- input: Schema.Void,
20
- output: Schema.Void,
18
+ class Alert extends S.TaggedClass<Alert>()(`${createPluginId(id)}/action/alert`, {
19
+ input: S.Void,
20
+ output: S.Void,
21
21
  }) {}
22
22
 
23
23
  return Alert as unknown as IntentSchema<any, any>;
@@ -2,11 +2,11 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Schema } from 'effect';
5
+ import { Schema as S } from 'effect';
6
6
 
7
- export class Log extends Schema.TaggedClass<Log>()('dxos.org/test/logger/log', {
8
- input: Schema.Struct({
9
- message: Schema.String,
7
+ export class Log extends S.TaggedClass<Log>()('dxos.org/test/logger/log', {
8
+ input: S.Struct({
9
+ message: S.String,
10
10
  }),
11
- output: Schema.Void,
11
+ output: S.Void,
12
12
  }) {}
@@ -34,5 +34,5 @@ export const Playground = {};
34
34
  export default {
35
35
  title: 'sdk/app-framework/playground',
36
36
  render: Story,
37
- decorators: [withTheme, withLayout()],
37
+ decorators: [withTheme, withLayout({ tooltips: true })],
38
38
  };
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Schema } from 'effect';
5
+ import { Schema as S } from 'effect';
6
6
 
7
7
  import { Label } from './intent';
8
8
 
@@ -13,21 +13,21 @@ export namespace IntentAction {
13
13
  /**
14
14
  * Log an intent.
15
15
  */
16
- export class Track extends Schema.TaggedClass<Track>()(`${INTENT_ACTION}/track`, {
17
- input: Schema.Struct({
18
- intents: Schema.Array(Schema.String),
19
- error: Schema.optional(Schema.String),
16
+ export class Track extends S.TaggedClass<Track>()(`${INTENT_ACTION}/track`, {
17
+ input: S.Struct({
18
+ intents: S.Array(S.String),
19
+ error: S.optional(S.String),
20
20
  }),
21
- output: Schema.Void,
21
+ output: S.Void,
22
22
  }) {}
23
23
 
24
24
  /**
25
25
  * Fired after an intent is dispatched if the intent is undoable.
26
26
  */
27
- export class ShowUndo extends Schema.TaggedClass<ShowUndo>()(`${INTENT_ACTION}/show-undo`, {
28
- input: Schema.Struct({
27
+ export class ShowUndo extends S.TaggedClass<ShowUndo>()(`${INTENT_ACTION}/show-undo`, {
28
+ input: S.Struct({
29
29
  message: Label,
30
30
  }),
31
- output: Schema.Void,
31
+ output: S.Void,
32
32
  }) {}
33
33
  }