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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/dist/lib/browser/{app-graph-builder-OHM2Z6YQ.mjs → app-graph-builder-DYEAGZPS.mjs} +23 -23
  2. package/dist/lib/browser/app-graph-builder-DYEAGZPS.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-DVNSCQJ5.mjs → chunk-5GE2ERNU.mjs} +314 -280
  4. package/dist/lib/browser/chunk-5GE2ERNU.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-SFPT4Z2C.mjs → chunk-WWEJRWFX.mjs} +10 -10
  6. package/dist/lib/browser/chunk-WWEJRWFX.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-X2YC645Z.mjs → chunk-ZMXJV64L.mjs} +122 -62
  8. package/dist/lib/browser/chunk-ZMXJV64L.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +10 -10
  10. package/dist/lib/browser/{intent-dispatcher-J7QIFHLO.mjs → intent-dispatcher-ELZN5EM7.mjs} +2 -2
  11. package/dist/lib/browser/{intent-resolver-QV5MDMDV.mjs → intent-resolver-SGWLINTO.mjs} +3 -3
  12. package/dist/lib/browser/meta.json +1 -1
  13. package/dist/lib/browser/{store-XMPVLJOQ.mjs → store-YIU6IPZ2.mjs} +7 -6
  14. package/dist/lib/browser/store-YIU6IPZ2.mjs.map +7 -0
  15. package/dist/lib/browser/testing/index.mjs +30 -14
  16. package/dist/lib/browser/testing/index.mjs.map +3 -3
  17. package/dist/lib/browser/worker.mjs +3 -3
  18. package/dist/lib/node/app-graph-builder-GBLISL7L.cjs +146 -0
  19. package/dist/lib/node/app-graph-builder-GBLISL7L.cjs.map +7 -0
  20. package/dist/lib/node/{chunk-JUSEAFDU.cjs → chunk-G774ASXO.cjs} +5 -5
  21. package/dist/lib/node/chunk-G774ASXO.cjs.map +7 -0
  22. package/dist/lib/node/{chunk-I3CJYEBC.cjs → chunk-HIVITTZD.cjs} +156 -122
  23. package/dist/lib/node/chunk-HIVITTZD.cjs.map +7 -0
  24. package/dist/lib/node/{chunk-5UOVF3OR.cjs → chunk-Z2PMVDJ5.cjs} +155 -95
  25. package/dist/lib/node/chunk-Z2PMVDJ5.cjs.map +7 -0
  26. package/dist/lib/node/index.cjs +81 -81
  27. package/dist/lib/node/{intent-dispatcher-FQPJNKIZ.cjs → intent-dispatcher-LFXZJTAS.cjs} +8 -8
  28. package/dist/lib/node/{intent-dispatcher-FQPJNKIZ.cjs.map → intent-dispatcher-LFXZJTAS.cjs.map} +2 -2
  29. package/dist/lib/node/{intent-resolver-PBAOGJS6.cjs → intent-resolver-EPSFTHL6.cjs} +12 -12
  30. package/dist/lib/node/meta.json +1 -1
  31. package/dist/lib/node/{store-N7JLYYDI.cjs → store-CVVRXUTH.cjs} +10 -9
  32. package/dist/lib/node/store-CVVRXUTH.cjs.map +7 -0
  33. package/dist/lib/node/testing/index.cjs +34 -17
  34. package/dist/lib/node/testing/index.cjs.map +3 -3
  35. package/dist/lib/node/worker.cjs +39 -39
  36. package/dist/lib/node/worker.cjs.map +1 -1
  37. package/dist/lib/node-esm/{app-graph-builder-OMH534A4.mjs → app-graph-builder-LUBDEIT6.mjs} +23 -23
  38. package/dist/lib/node-esm/app-graph-builder-LUBDEIT6.mjs.map +7 -0
  39. package/dist/lib/node-esm/{chunk-QHXUTJHE.mjs → chunk-6IKYKERU.mjs} +122 -62
  40. package/dist/lib/node-esm/chunk-6IKYKERU.mjs.map +7 -0
  41. package/dist/lib/node-esm/{chunk-PHOUQACM.mjs → chunk-I6BVZMAH.mjs} +10 -10
  42. package/dist/lib/node-esm/chunk-I6BVZMAH.mjs.map +7 -0
  43. package/dist/lib/node-esm/{chunk-GSDBF2CK.mjs → chunk-Z2ZHH4HN.mjs} +314 -280
  44. package/dist/lib/node-esm/chunk-Z2ZHH4HN.mjs.map +7 -0
  45. package/dist/lib/node-esm/index.mjs +10 -10
  46. package/dist/lib/node-esm/{intent-dispatcher-QDUGA7NT.mjs → intent-dispatcher-A2JCMWRD.mjs} +2 -2
  47. package/dist/lib/node-esm/{intent-resolver-P7TC5RBD.mjs → intent-resolver-5C4O43GK.mjs} +3 -3
  48. package/dist/lib/node-esm/meta.json +1 -1
  49. package/dist/lib/node-esm/{store-M2BYJL6K.mjs → store-HRZXZ2D2.mjs} +7 -6
  50. package/dist/lib/node-esm/store-HRZXZ2D2.mjs.map +7 -0
  51. package/dist/lib/node-esm/testing/index.mjs +30 -14
  52. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  53. package/dist/lib/node-esm/worker.mjs +3 -3
  54. package/dist/types/src/App.d.ts +3 -1
  55. package/dist/types/src/App.d.ts.map +1 -1
  56. package/dist/types/src/common/capabilities.d.ts +40 -222
  57. package/dist/types/src/common/capabilities.d.ts.map +1 -1
  58. package/dist/types/src/common/collaboration.d.ts +8 -8
  59. package/dist/types/src/common/collaboration.d.ts.map +1 -1
  60. package/dist/types/src/common/events.d.ts.map +1 -1
  61. package/dist/types/src/common/file.d.ts +7 -7
  62. package/dist/types/src/common/file.d.ts.map +1 -1
  63. package/dist/types/src/common/layout.d.ts +165 -163
  64. package/dist/types/src/common/layout.d.ts.map +1 -1
  65. package/dist/types/src/common/surface.d.ts.map +1 -1
  66. package/dist/types/src/common/translations.d.ts +7 -7
  67. package/dist/types/src/common/translations.d.ts.map +1 -1
  68. package/dist/types/src/core/capabilities.d.ts +28 -13
  69. package/dist/types/src/core/capabilities.d.ts.map +1 -1
  70. package/dist/types/src/core/events.d.ts.map +1 -1
  71. package/dist/types/src/core/manager.d.ts +6 -3
  72. package/dist/types/src/core/manager.d.ts.map +1 -1
  73. package/dist/types/src/core/plugin.d.ts +2 -2
  74. package/dist/types/src/core/plugin.d.ts.map +1 -1
  75. package/dist/types/src/helpers.d.ts.map +1 -1
  76. package/dist/types/src/playground/generator/generator.d.ts.map +1 -1
  77. package/dist/types/src/playground/logger/schema.d.ts +6 -6
  78. package/dist/types/src/playground/logger/schema.d.ts.map +1 -1
  79. package/dist/types/src/playground/playground.stories.d.ts.map +1 -1
  80. package/dist/types/src/plugin-intent/actions.d.ts +14 -14
  81. package/dist/types/src/plugin-intent/actions.d.ts.map +1 -1
  82. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +3 -3
  83. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -1
  84. package/dist/types/src/plugin-intent/intent.d.ts +14 -20
  85. package/dist/types/src/plugin-intent/intent.d.ts.map +1 -1
  86. package/dist/types/src/plugin-settings/actions.d.ts +10 -10
  87. package/dist/types/src/plugin-settings/actions.d.ts.map +1 -1
  88. package/dist/types/src/plugin-settings/app-graph-builder.d.ts +2 -195
  89. package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +1 -1
  90. package/dist/types/src/plugin-settings/store.d.ts +2 -2
  91. package/dist/types/src/plugin-settings/store.d.ts.map +1 -1
  92. package/dist/types/src/react/ErrorBoundary.d.ts +1 -1
  93. package/dist/types/src/react/ErrorBoundary.d.ts.map +1 -1
  94. package/dist/types/src/react/IntentContext.d.ts.map +1 -1
  95. package/dist/types/src/react/Surface.d.ts +2 -2
  96. package/dist/types/src/react/Surface.d.ts.map +1 -1
  97. package/dist/types/src/react/useCapabilities.d.ts +2 -2
  98. package/dist/types/src/react/useCapabilities.d.ts.map +1 -1
  99. package/dist/types/src/react/useIntentResolver.d.ts.map +1 -1
  100. package/dist/types/src/testing/withPluginManager.d.ts +6 -2
  101. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
  102. package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
  103. package/dist/types/tsconfig.tsbuildinfo +1 -1
  104. package/package.json +28 -21
  105. package/src/App.tsx +97 -47
  106. package/src/common/capabilities.ts +18 -7
  107. package/src/common/collaboration.ts +9 -9
  108. package/src/common/file.ts +7 -7
  109. package/src/common/layout.ts +156 -136
  110. package/src/common/translations.ts +7 -7
  111. package/src/core/capabilities.test.ts +55 -36
  112. package/src/core/capabilities.ts +79 -59
  113. package/src/core/manager.test.ts +19 -19
  114. package/src/core/manager.ts +24 -16
  115. package/src/core/plugin.ts +2 -2
  116. package/src/playground/generator/generator.ts +4 -4
  117. package/src/playground/logger/schema.ts +5 -5
  118. package/src/playground/playground.stories.tsx +13 -9
  119. package/src/plugin-intent/actions.ts +9 -9
  120. package/src/plugin-intent/intent-dispatcher.test.ts +23 -42
  121. package/src/plugin-intent/intent-dispatcher.ts +7 -11
  122. package/src/plugin-intent/intent.ts +22 -20
  123. package/src/plugin-settings/actions.ts +8 -8
  124. package/src/plugin-settings/app-graph-builder.ts +129 -94
  125. package/src/plugin-settings/store.ts +20 -17
  126. package/src/react/ErrorBoundary.tsx +3 -3
  127. package/src/react/Surface.stories.tsx +1 -1
  128. package/src/react/Surface.tsx +3 -3
  129. package/src/react/useCapabilities.ts +9 -19
  130. package/src/testing/withPluginManager.stories.tsx +0 -1
  131. package/src/testing/withPluginManager.tsx +35 -16
  132. package/tsconfig.json +1 -53
  133. package/typedoc/assets/navigation.js +1 -1
  134. package/typedoc/assets/search.js +1 -1
  135. package/typedoc/classes/CollaborationActions.InsertContent.html +280 -280
  136. package/typedoc/classes/ErrorBoundary.html +6 -6
  137. package/typedoc/classes/IntentAction.ShowUndo.html +125 -125
  138. package/typedoc/classes/IntentAction.Track.html +239 -239
  139. package/typedoc/classes/LayoutAction.AddToast.html +163 -163
  140. package/typedoc/classes/LayoutAction.Close.html +352 -352
  141. package/typedoc/classes/LayoutAction.Expose.html +238 -238
  142. package/typedoc/classes/LayoutAction.Open.html +904 -748
  143. package/typedoc/classes/LayoutAction.RevertWorkspace.html +241 -241
  144. package/typedoc/classes/LayoutAction.ScrollIntoView.html +280 -280
  145. package/typedoc/classes/LayoutAction.Set.html +436 -358
  146. package/typedoc/classes/LayoutAction.SetLayoutMode.html +469 -391
  147. package/typedoc/classes/LayoutAction.SwitchWorkspace.html +238 -238
  148. package/typedoc/classes/LayoutAction.UpdateComplementary.html +358 -358
  149. package/typedoc/classes/LayoutAction.UpdateDialog.html +865 -475
  150. package/typedoc/classes/LayoutAction.UpdateLayout.html +281 -281
  151. package/typedoc/classes/LayoutAction.UpdatePopover.html +826 -826
  152. package/typedoc/classes/LayoutAction.UpdateSidebar.html +397 -319
  153. package/typedoc/classes/Plugin.html +3 -3
  154. package/typedoc/classes/PluginContext.html +38 -0
  155. package/typedoc/classes/PluginManager.html +17 -16
  156. package/typedoc/classes/PluginModule.html +9 -9
  157. package/typedoc/classes/SettingsAction.Open.html +199 -199
  158. package/typedoc/classes/SettingsAction.OpenPluginRegistry.html +124 -124
  159. package/typedoc/functions/Events.createStateEvent.html +2 -2
  160. package/typedoc/functions/IntentPlugin.html +1 -1
  161. package/typedoc/functions/SettingsPlugin.html +1 -1
  162. package/typedoc/functions/allOf.html +2 -2
  163. package/typedoc/functions/chain.html +2 -2
  164. package/typedoc/functions/contributes.html +2 -2
  165. package/typedoc/functions/createDispatcher.html +3 -3
  166. package/typedoc/functions/createIntent.html +3 -3
  167. package/typedoc/functions/createResolver.html +2 -2
  168. package/typedoc/functions/createSurface.html +2 -2
  169. package/typedoc/functions/defineCapability.html +2 -2
  170. package/typedoc/functions/defineEvent.html +2 -2
  171. package/typedoc/functions/defineModule.html +2 -2
  172. package/typedoc/functions/definePlugin.html +2 -2
  173. package/typedoc/functions/eventKey.html +2 -2
  174. package/typedoc/functions/getEvents.html +2 -2
  175. package/typedoc/functions/isAllOf.html +2 -2
  176. package/typedoc/functions/isOneOf.html +2 -2
  177. package/typedoc/functions/isSurfaceAvailable.html +2 -2
  178. package/typedoc/functions/lazy.html +2 -2
  179. package/typedoc/functions/oneOf.html +2 -2
  180. package/typedoc/functions/{createApp.html → useApp.html} +2 -2
  181. package/typedoc/functions/useAppGraph.html +1 -1
  182. package/typedoc/functions/useCapabilities.html +3 -3
  183. package/typedoc/functions/useCapability.html +3 -3
  184. package/typedoc/functions/useIntentDispatcher.html +1 -1
  185. package/typedoc/functions/useIntentResolver.html +1 -1
  186. package/typedoc/functions/useLayout.html +1 -1
  187. package/typedoc/functions/usePluginManager.html +2 -2
  188. package/typedoc/hierarchy.html +1 -1
  189. package/typedoc/index.html +2 -2
  190. package/typedoc/interfaces/LayoutAction.Toast.html +2 -2
  191. package/typedoc/modules/Capabilities.html +1 -1
  192. package/typedoc/modules/CollaborationActions.html +1 -1
  193. package/typedoc/modules/Events.html +1 -1
  194. package/typedoc/modules/IntentAction.html +1 -1
  195. package/typedoc/modules/LayoutAction.html +2 -2
  196. package/typedoc/modules/SettingsAction.html +1 -1
  197. package/typedoc/modules.html +1 -1
  198. package/typedoc/types/ActivationEvent.html +3 -3
  199. package/typedoc/types/ActivationEvents.html +2 -2
  200. package/typedoc/types/AnyCapability.html +1 -1
  201. package/typedoc/types/AnyIntent.html +1 -1
  202. package/typedoc/types/AnyIntentChain.html +1 -1
  203. package/typedoc/types/AnyIntentEffectResult.html +1 -1
  204. package/typedoc/types/AnyIntentResolver.html +1 -1
  205. package/typedoc/types/AnyIntentResult.html +1 -1
  206. package/typedoc/types/Capabilities.FileUploader.html +1 -1
  207. package/typedoc/types/Capabilities.IntentResolver.html +1 -1
  208. package/typedoc/types/Capabilities.Layout.html +1 -1
  209. package/typedoc/types/Capabilities.Metadata.html +1 -1
  210. package/typedoc/types/Capabilities.ReactContext.html +1 -1
  211. package/typedoc/types/Capabilities.ReactRoot.html +1 -1
  212. package/typedoc/types/Capabilities.ReactSurface.html +1 -1
  213. package/typedoc/types/Capabilities.Settings.html +2 -2
  214. package/typedoc/types/Capability.html +5 -5
  215. package/typedoc/types/CreateAppOptions.html +3 -2
  216. package/typedoc/types/FileInfo.html +1 -1
  217. package/typedoc/types/Intent.html +6 -10
  218. package/typedoc/types/IntentChain.html +3 -3
  219. package/typedoc/types/IntentContext.html +2 -2
  220. package/typedoc/types/IntentData.html +1 -1
  221. package/typedoc/types/IntentDispatcher.html +2 -2
  222. package/typedoc/types/IntentDispatcherResult.html +2 -2
  223. package/typedoc/types/IntentEffectDefinition.html +2 -2
  224. package/typedoc/types/IntentEffectResult.html +6 -6
  225. package/typedoc/types/IntentParams.html +2 -2
  226. package/typedoc/types/IntentResolver.html +2 -2
  227. package/typedoc/types/IntentResultData.html +1 -1
  228. package/typedoc/types/IntentSchema.html +1 -1
  229. package/typedoc/types/IntentUndo.html +2 -2
  230. package/typedoc/types/InterfaceDef.html +3 -3
  231. package/typedoc/types/Label.html +1 -1
  232. package/typedoc/types/NodeSerializer.html +3 -3
  233. package/typedoc/types/PluginManagerOptions.html +3 -2
  234. package/typedoc/types/PluginMeta.html +9 -9
  235. package/typedoc/types/PromiseIntentDispatcher.html +2 -2
  236. package/typedoc/types/PromiseIntentUndo.html +2 -2
  237. package/typedoc/types/Resource.html +1 -1
  238. package/typedoc/types/ResourceKey.html +1 -1
  239. package/typedoc/types/ResourceLanguage.html +1 -1
  240. package/typedoc/types/SerializedNode.html +2 -2
  241. package/typedoc/types/SurfaceComponent.html +2 -2
  242. package/typedoc/types/SurfaceDefinition.html +2 -2
  243. package/typedoc/types/SurfaceProps.html +2 -2
  244. package/typedoc/variables/Capabilities.AnchorSort.html +1 -0
  245. package/typedoc/variables/Capabilities.AppGraph.html +1 -1
  246. package/typedoc/variables/Capabilities.AppGraphBuilder.html +1 -1
  247. package/typedoc/variables/Capabilities.AppGraphSerializer.html +1 -1
  248. package/typedoc/variables/Capabilities.ArtifactDefinition.html +1 -1
  249. package/typedoc/variables/Capabilities.FileUploader.html +1 -1
  250. package/typedoc/variables/Capabilities.IntentDispatcher.html +1 -1
  251. package/typedoc/variables/Capabilities.IntentResolver.html +1 -1
  252. package/typedoc/variables/Capabilities.Layout.html +1 -1
  253. package/typedoc/variables/Capabilities.Metadata.html +1 -1
  254. package/typedoc/variables/Capabilities.Null.html +1 -1
  255. package/typedoc/variables/Capabilities.PluginManager.html +1 -1
  256. package/typedoc/variables/Capabilities.ReactContext.html +1 -1
  257. package/typedoc/variables/Capabilities.ReactRoot.html +1 -1
  258. package/typedoc/variables/Capabilities.ReactSurface.html +1 -1
  259. package/typedoc/variables/Capabilities.RxRegistry.html +1 -0
  260. package/typedoc/variables/Capabilities.Settings.html +1 -1
  261. package/typedoc/variables/Capabilities.SettingsStore.html +1 -1
  262. package/typedoc/variables/Capabilities.Tools.html +1 -1
  263. package/typedoc/variables/Capabilities.Translations.html +1 -1
  264. package/typedoc/variables/Events.AppGraphReady.html +2 -2
  265. package/typedoc/variables/Events.DispatcherReady.html +2 -2
  266. package/typedoc/variables/Events.LayoutReady.html +1 -1
  267. package/typedoc/variables/Events.SettingsReady.html +2 -2
  268. package/typedoc/variables/Events.SetupAppGraph.html +2 -2
  269. package/typedoc/variables/Events.SetupArtifactDefinition.html +2 -2
  270. package/typedoc/variables/Events.SetupIntentResolver.html +2 -2
  271. package/typedoc/variables/Events.SetupMetadata.html +2 -2
  272. package/typedoc/variables/Events.SetupReactSurface.html +2 -2
  273. package/typedoc/variables/Events.SetupSettings.html +2 -2
  274. package/typedoc/variables/Events.SetupTranslations.html +2 -2
  275. package/typedoc/variables/Events.Startup.html +2 -2
  276. package/typedoc/variables/FileInfoSchema.html +1 -1
  277. package/typedoc/variables/INTENT_ACTION.html +1 -1
  278. package/typedoc/variables/INTENT_PLUGIN.html +1 -1
  279. package/typedoc/variables/LAYOUT_ACTION.html +1 -1
  280. package/typedoc/variables/LAYOUT_PLUGIN.html +1 -1
  281. package/typedoc/variables/Label.html +1 -1
  282. package/typedoc/variables/LayoutAction.Toast.html +1 -1
  283. package/typedoc/variables/LayoutAction.UPDATE_LAYOUT.html +1 -1
  284. package/typedoc/variables/PluginManagerProvider.html +2 -2
  285. package/typedoc/variables/Resource.html +2 -2
  286. package/typedoc/variables/ResourceKey.html +1 -1
  287. package/typedoc/variables/ResourceLanguage.html +1 -1
  288. package/typedoc/variables/SETTINGS_ACTION.html +1 -1
  289. package/typedoc/variables/SETTINGS_ID.html +1 -1
  290. package/typedoc/variables/SETTINGS_KEY.html +1 -1
  291. package/typedoc/variables/SETTINGS_PLUGIN.html +1 -1
  292. package/typedoc/variables/Surface.html +2 -2
  293. package/typedoc/variables/defaultFileTypes.html +1 -1
  294. package/dist/lib/browser/app-graph-builder-OHM2Z6YQ.mjs.map +0 -7
  295. package/dist/lib/browser/chunk-DVNSCQJ5.mjs.map +0 -7
  296. package/dist/lib/browser/chunk-SFPT4Z2C.mjs.map +0 -7
  297. package/dist/lib/browser/chunk-X2YC645Z.mjs.map +0 -7
  298. package/dist/lib/browser/store-XMPVLJOQ.mjs.map +0 -7
  299. package/dist/lib/node/app-graph-builder-Z45FKS52.cjs +0 -146
  300. package/dist/lib/node/app-graph-builder-Z45FKS52.cjs.map +0 -7
  301. package/dist/lib/node/chunk-5UOVF3OR.cjs.map +0 -7
  302. package/dist/lib/node/chunk-I3CJYEBC.cjs.map +0 -7
  303. package/dist/lib/node/chunk-JUSEAFDU.cjs.map +0 -7
  304. package/dist/lib/node/store-N7JLYYDI.cjs.map +0 -7
  305. package/dist/lib/node-esm/app-graph-builder-OMH534A4.mjs.map +0 -7
  306. package/dist/lib/node-esm/chunk-GSDBF2CK.mjs.map +0 -7
  307. package/dist/lib/node-esm/chunk-PHOUQACM.mjs.map +0 -7
  308. package/dist/lib/node-esm/chunk-QHXUTJHE.mjs.map +0 -7
  309. package/dist/lib/node-esm/store-M2BYJL6K.mjs.map +0 -7
  310. package/typedoc/classes/PluginsContext.html +0 -25
  311. /package/dist/lib/browser/{intent-dispatcher-J7QIFHLO.mjs.map → intent-dispatcher-ELZN5EM7.mjs.map} +0 -0
  312. /package/dist/lib/browser/{intent-resolver-QV5MDMDV.mjs.map → intent-resolver-SGWLINTO.mjs.map} +0 -0
  313. /package/dist/lib/node/{intent-resolver-PBAOGJS6.cjs.map → intent-resolver-EPSFTHL6.cjs.map} +0 -0
  314. /package/dist/lib/node-esm/{intent-dispatcher-QDUGA7NT.mjs.map → intent-dispatcher-A2JCMWRD.mjs.map} +0 -0
  315. /package/dist/lib/node-esm/{intent-resolver-P7TC5RBD.mjs.map → intent-resolver-5C4O43GK.mjs.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"useIntentResolver.d.ts","sourceRoot":"","sources":["../../../../src/react/useIntentResolver.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG1D,eAAO,MAAM,iBAAiB,WAAY,MAAM,YAAY,iBAAiB,SAW5E,CAAC"}
1
+ {"version":3,"file":"useIntentResolver.d.ts","sourceRoot":"","sources":["../../../../src/react/useIntentResolver.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG1D,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM,EAAE,UAAU,iBAAiB,SAW5E,CAAC"}
@@ -1,12 +1,16 @@
1
1
  import { type Decorator } from '@storybook/react';
2
2
  import { type CreateAppOptions } from '../App';
3
- import { type ActivationEvent, type AnyCapability } from '../core';
3
+ import { type ActivationEvent, type AnyCapability, type PluginContext } from '../core';
4
+ export type Provider<C, R> = (context: C) => R;
5
+ export type ProviderOrValue<C, R> = Provider<C, R> | R;
6
+ export declare const getValue: <C, R>(providerOrValue: ProviderOrValue<C, R>, context: C) => R;
4
7
  export type WithPluginManagerOptions = CreateAppOptions & {
5
- capabilities?: AnyCapability[];
8
+ capabilities?: ProviderOrValue<PluginContext, AnyCapability[]>;
6
9
  fireEvents?: (ActivationEvent | string)[];
7
10
  };
8
11
  /**
9
12
  * Wraps a story with a plugin manager.
13
+ * NOTE: This builds up and tears down the plugin manager on every render.
10
14
  */
11
15
  export declare const withPluginManager: (options?: WithPluginManagerOptions) => Decorator;
12
16
  //# sourceMappingURL=withPluginManager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"withPluginManager.d.ts","sourceRoot":"","sources":["../../../../src/testing/withPluginManager.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAKlD,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1D,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,aAAa,EAKnB,MAAM,SAAS,CAAC;AA+BjB,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,GAAG;IACxD,YAAY,CAAC,EAAE,aAAa,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,CAAC,eAAe,GAAG,MAAM,CAAC,EAAE,CAAC;CAC3C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,aAAa,wBAAwB,KAAQ,SAyB1E,CAAC"}
1
+ {"version":3,"file":"withPluginManager.d.ts","sourceRoot":"","sources":["../../../../src/testing/withPluginManager.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAKlD,OAAO,EAAU,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAEvD,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,aAAa,EAElB,KAAK,aAAa,EACnB,MAAM,SAAS,CAAC;AAGjB,MAAM,MAAM,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;AAC/C,MAAM,MAAM,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;AACvD,eAAO,MAAM,QAAQ,GAAI,CAAC,EAAE,CAAC,EAAE,iBAAiB,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC,KAAG,CAEnF,CAAC;AA+BF,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,GAAG;IACxD,YAAY,CAAC,EAAE,eAAe,CAAC,aAAa,EAAE,aAAa,EAAE,CAAC,CAAC;IAC/D,UAAU,CAAC,EAAE,CAAC,eAAe,GAAG,MAAM,CAAC,EAAE,CAAC;CAC3C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAS,wBAA6B,KAAG,SAmC1E,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"withPluginManager.stories.d.ts","sourceRoot":"","sources":["../../../../src/testing/withPluginManager.stories.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAa,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAiB7D,QAAA,MAAM,IAAI,EAAE,IAkBX,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,IAAK,CAAC"}
1
+ {"version":3,"file":"withPluginManager.stories.d.ts","sourceRoot":"","sources":["../../../../src/testing/withPluginManager.stories.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAa,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAiB7D,QAAA,MAAM,IAAI,EAAE,IAkBX,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,IAAK,CAAC"}
@@ -1 +1 @@
1
- {"version":"5.7.3"}
1
+ {"version":"5.8.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/app-framework",
3
- "version": "0.8.2-main.f11618f",
3
+ "version": "0.8.2-staging.42af850",
4
4
  "description": "A framework for building applications from composible plugins.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -37,34 +37,41 @@
37
37
  }
38
38
  },
39
39
  "dependencies": {
40
- "@preact/signals-core": "^1.6.0",
41
- "@dxos/app-graph": "0.8.2-main.f11618f",
42
- "@dxos/artifact": "0.8.2-main.f11618f",
43
- "@dxos/async": "0.8.2-main.f11618f",
44
- "@dxos/client-protocol": "0.8.2-main.f11618f",
45
- "@dxos/echo-schema": "0.8.2-main.f11618f",
46
- "@dxos/invariant": "0.8.2-main.f11618f",
47
- "@dxos/local-storage": "0.8.2-main.f11618f",
48
- "@dxos/live-object": "0.8.2-main.f11618f",
49
- "@dxos/log": "0.8.2-main.f11618f",
50
- "@dxos/debug": "0.8.2-main.f11618f",
51
- "@dxos/react-hooks": "0.8.2-main.f11618f",
52
- "@dxos/util": "0.8.2-main.f11618f"
40
+ "@preact/signals-core": "^1.9.0",
41
+ "@dxos/ai": "0.8.2-staging.42af850",
42
+ "@dxos/app-graph": "0.8.2-staging.42af850",
43
+ "@dxos/client-protocol": "0.8.2-staging.42af850",
44
+ "@dxos/artifact": "0.8.2-staging.42af850",
45
+ "@dxos/async": "0.8.2-staging.42af850",
46
+ "@dxos/invariant": "0.8.2-staging.42af850",
47
+ "@dxos/echo-schema": "0.8.2-staging.42af850",
48
+ "@dxos/debug": "0.8.2-staging.42af850",
49
+ "@dxos/keys": "0.8.2-staging.42af850",
50
+ "@dxos/local-storage": "0.8.2-staging.42af850",
51
+ "@dxos/live-object": "0.8.2-staging.42af850",
52
+ "@dxos/log": "0.8.2-staging.42af850",
53
+ "@dxos/react-hooks": "0.8.2-staging.42af850",
54
+ "@dxos/schema": "0.8.2-staging.42af850",
55
+ "@dxos/util": "0.8.2-staging.42af850"
53
56
  },
54
57
  "devDependencies": {
58
+ "@effect-rx/rx-react": "^0.34.1",
59
+ "@effect/platform": "0.80.12",
55
60
  "@phosphor-icons/react": "^2.1.5",
56
61
  "@types/react": "~18.2.0",
57
- "effect": "3.13.3",
62
+ "effect": "3.14.21",
58
63
  "react": "~18.2.0",
59
64
  "typedoc": "0.28.1",
60
- "@dxos/echo-signals": "0.8.2-main.f11618f",
61
- "@dxos/random": "0.8.2-main.f11618f",
62
- "@dxos/react-ui": "0.8.2-main.f11618f",
63
- "@dxos/react-ui-syntax-highlighter": "0.8.2-main.f11618f",
64
- "@dxos/storybook-utils": "0.8.2-main.f11618f"
65
+ "@dxos/echo-signals": "0.8.2-staging.42af850",
66
+ "@dxos/random": "0.8.2-staging.42af850",
67
+ "@dxos/react-ui-syntax-highlighter": "0.8.2-staging.42af850",
68
+ "@dxos/react-ui": "0.8.2-staging.42af850",
69
+ "@dxos/storybook-utils": "0.8.2-staging.42af850"
65
70
  },
66
71
  "peerDependencies": {
67
- "effect": "3.13.3",
72
+ "@effect-rx/rx-react": "^0.34.1",
73
+ "@effect/platform": "0.80.12",
74
+ "effect": "^3.13.3",
68
75
  "react": "~18.2.0"
69
76
  },
70
77
  "publishConfig": {
package/src/App.tsx CHANGED
@@ -2,11 +2,13 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import { RegistryContext } from '@effect-rx/rx-react';
5
6
  import { effect } from '@preact/signals-core';
6
- import React, { useEffect, useState, type FC, type PropsWithChildren } from 'react';
7
+ import React, { useCallback, useEffect, useMemo, useState, type FC, type PropsWithChildren } from 'react';
7
8
 
8
9
  import { invariant } from '@dxos/invariant';
9
10
  import { live } from '@dxos/live-object';
11
+ import { useDefaultValue } from '@dxos/react-hooks';
10
12
 
11
13
  import { Capabilities, Events } from './common';
12
14
  import { PluginManager, type PluginManagerOptions, type Plugin } from './core';
@@ -24,6 +26,7 @@ export type CreateAppOptions = {
24
26
  placeholder?: FC<{ stage: number }>;
25
27
  fallback?: ErrorBoundary['props']['fallback'];
26
28
  cacheEnabled?: boolean;
29
+ safeMode?: boolean;
27
30
  };
28
31
 
29
32
  /**
@@ -49,64 +52,111 @@ export type CreateAppOptions = {
49
52
  * @param params.placeholder Placeholder component to render during startup.
50
53
  * @param params.fallback Fallback component to render if an error occurs during startup.
51
54
  * @param params.cacheEnabled Whether to cache enabled plugins in localStorage.
55
+ * @param params.safeMode Whether to enable safe mode, which disables optional plugins.
52
56
  */
53
- export const createApp = ({
57
+ export const useApp = ({
54
58
  pluginManager,
55
59
  pluginLoader: _pluginLoader,
56
- plugins = [],
57
- core = plugins.map(({ meta }) => meta.id),
58
- defaults = [],
60
+ plugins: _plugins,
61
+ core: _core,
62
+ defaults: _defaults,
59
63
  placeholder,
60
64
  fallback = DefaultFallback,
61
65
  cacheEnabled = false,
66
+ safeMode = false,
62
67
  }: CreateAppOptions) => {
68
+ const plugins = useDefaultValue(_plugins, () => []);
69
+ const core = useDefaultValue(_core, () => plugins.map(({ meta }) => meta.id));
70
+ const defaults = useDefaultValue(_defaults, () => []);
71
+
63
72
  // TODO(wittjosiah): Provide a custom plugin loader which supports loading via url.
64
- const pluginLoader =
65
- _pluginLoader ??
66
- ((id: string) => {
67
- const plugin = plugins.find((plugin) => plugin.meta.id === id);
68
- invariant(plugin, `Plugin not found: ${id}`);
69
- return plugin;
73
+ const pluginLoader = useMemo(
74
+ () =>
75
+ _pluginLoader ??
76
+ ((id: string) => {
77
+ const plugin = plugins.find((plugin) => plugin.meta.id === id);
78
+ invariant(plugin, `Plugin not found: ${id}`);
79
+ return plugin;
80
+ }),
81
+ [_pluginLoader, plugins],
82
+ );
83
+
84
+ const state = useMemo(() => live({ ready: false, error: null }), []);
85
+ const cached: string[] = useMemo(() => JSON.parse(localStorage.getItem(ENABLED_KEY) ?? '[]'), []);
86
+ const enabled = useMemo(
87
+ () => (safeMode ? [] : cacheEnabled && cached.length > 0 ? cached : defaults),
88
+ [safeMode, cacheEnabled, cached, defaults],
89
+ );
90
+ const manager = useMemo(
91
+ () => pluginManager ?? new PluginManager({ pluginLoader, plugins, core, enabled }),
92
+ [pluginManager, pluginLoader, plugins, core, enabled],
93
+ );
94
+
95
+ useEffect(() => {
96
+ return manager.activation.on(({ event, state: _state, error }) => {
97
+ // Once the app is ready the first time, don't show the fallback again.
98
+ if (!state.ready && event === Events.Startup.id) {
99
+ state.ready = _state === 'activated';
100
+ }
101
+
102
+ if (error && !state.ready && !state.error) {
103
+ state.error = error;
104
+ }
70
105
  });
106
+ }, [manager, state]);
71
107
 
72
- const state = live({ ready: false, error: null });
73
- const cached: string[] = JSON.parse(localStorage.getItem(ENABLED_KEY) ?? '[]');
74
- const enabled = cacheEnabled && cached.length > 0 ? cached : defaults;
75
- const manager = pluginManager ?? new PluginManager({ pluginLoader, plugins, core, enabled });
108
+ useEffect(() => {
109
+ effect(() => {
110
+ cacheEnabled && localStorage.setItem(ENABLED_KEY, JSON.stringify(manager.enabled));
111
+ });
112
+ }, [cacheEnabled, manager]);
76
113
 
77
- manager.activation.on(({ event, state: _state, error }) => {
78
- // Once the app is ready the first time, don't show the fallback again.
79
- if (!state.ready && event === Events.Startup.id) {
80
- state.ready = _state === 'activated';
81
- }
114
+ useEffect(() => {
115
+ manager.context.contributeCapability({
116
+ interface: Capabilities.PluginManager,
117
+ implementation: manager,
118
+ module: 'dxos.org/app-framework/plugin-manager',
119
+ });
82
120
 
83
- if (error && !state.ready && !state.error) {
84
- state.error = error;
85
- }
86
- });
87
-
88
- effect(() => {
89
- cacheEnabled && localStorage.setItem(ENABLED_KEY, JSON.stringify(manager.enabled));
90
- });
91
-
92
- manager.context.contributeCapability({
93
- interface: Capabilities.PluginManager,
94
- implementation: manager,
95
- module: 'dxos.org/app-framework/plugin-manager',
96
- });
97
-
98
- setupDevtools(manager);
99
-
100
- // TODO(wittjosiah): Factor out such that this could be called per surface role when attempting to render.
101
- void manager.activate(Events.SetupReactSurface);
102
- void manager.activate(Events.Startup);
103
-
104
- return () => (
105
- <ErrorBoundary fallback={fallback}>
106
- <PluginManagerProvider value={manager}>
107
- <App placeholder={placeholder} state={state} />
108
- </PluginManagerProvider>
109
- </ErrorBoundary>
121
+ manager.context.contributeCapability({
122
+ interface: Capabilities.RxRegistry,
123
+ implementation: manager.registry,
124
+ module: 'dxos.org/app-framework/rx-registry',
125
+ });
126
+
127
+ return () => {
128
+ manager.context.removeCapability(Capabilities.PluginManager, manager);
129
+ manager.context.removeCapability(Capabilities.RxRegistry, manager.registry);
130
+ };
131
+ }, [manager]);
132
+
133
+ useEffect(() => {
134
+ setupDevtools(manager);
135
+ }, [manager]);
136
+
137
+ useEffect(() => {
138
+ const timeout = setTimeout(async () => {
139
+ await Promise.all([
140
+ // TODO(wittjosiah): Factor out such that this could be called per surface role when attempting to render.
141
+ manager.activate(Events.SetupReactSurface),
142
+ manager.activate(Events.Startup),
143
+ ]);
144
+ });
145
+
146
+ return () => clearTimeout(timeout);
147
+ }, [manager]);
148
+
149
+ return useCallback(
150
+ () => (
151
+ <ErrorBoundary fallback={fallback}>
152
+ <PluginManagerProvider value={manager}>
153
+ <RegistryContext.Provider value={manager.registry}>
154
+ <App placeholder={placeholder} state={state} />
155
+ </RegistryContext.Provider>
156
+ </PluginManagerProvider>
157
+ </ErrorBoundary>
158
+ ),
159
+ [fallback, manager, placeholder, state],
110
160
  );
111
161
  };
112
162
 
@@ -2,19 +2,22 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { type Schema as S } from 'effect';
5
+ import { type Registry } from '@effect-rx/rx-react';
6
+ import { type Schema } from 'effect';
6
7
  import { type FC, type PropsWithChildren } from 'react';
7
8
 
8
- import { type GraphBuilder } from '@dxos/app-graph';
9
- import { type ArtifactDefinition, type Tool } from '@dxos/artifact';
9
+ import { type ExecutableTool } from '@dxos/ai';
10
+ import { type GraphBuilder, type BuilderExtensions } from '@dxos/app-graph';
11
+ import { type ArtifactDefinition } from '@dxos/artifact';
10
12
  import { type Space } from '@dxos/client-protocol';
11
13
  import { type RootSettingsStore } from '@dxos/local-storage';
14
+ import { type AnchoredTo } from '@dxos/schema';
12
15
 
13
16
  import { type FileInfo } from './file';
14
17
  import { type NodeSerializer } from './graph';
15
18
  import { type SurfaceDefinition } from './surface';
16
19
  import { type Resource } from './translations';
17
- import { defineCapability, type PluginManager } from '../core';
20
+ import { type PluginManager, defineCapability } from '../core';
18
21
  import { type AnyIntentResolver, type IntentContext } from '../plugin-intent';
19
22
 
20
23
  export namespace Capabilities {
@@ -22,6 +25,8 @@ export namespace Capabilities {
22
25
 
23
26
  export const Null = defineCapability<null>('dxos.org/app-framework/capability/null');
24
27
 
28
+ export const RxRegistry = defineCapability<Registry.Registry>('dxos.org/app-framework/capability/rx-registry');
29
+
25
30
  export type ReactContext = Readonly<{ id: string; dependsOn?: string[]; context: FC<PropsWithChildren> }>;
26
31
  export const ReactContext = defineCapability<ReactContext>('dxos.org/app-framework/capability/react-context');
27
32
 
@@ -68,7 +73,7 @@ export namespace Capabilities {
68
73
  'dxos.org/app-framework/capability/app-graph',
69
74
  );
70
75
 
71
- export const AppGraphBuilder = defineCapability<Parameters<GraphBuilder['addExtension']>[0]>(
76
+ export const AppGraphBuilder = defineCapability<BuilderExtensions>(
72
77
  'dxos.org/app-framework/capability/app-graph-builder',
73
78
  );
74
79
 
@@ -82,7 +87,7 @@ export namespace Capabilities {
82
87
  // export type Settings = Parameters<RootSettingsStore['createStore']>[0];
83
88
  // export type Settings<T extends SettingsValue = SettingsValue> = SettingsProps<T>;
84
89
  export type Settings = {
85
- schema: S.Schema.All;
90
+ schema: Schema.Schema.All;
86
91
  prefix: string;
87
92
  value?: Record<string, any>;
88
93
  };
@@ -91,11 +96,17 @@ export namespace Capabilities {
91
96
  export type Metadata = Readonly<{ id: string; metadata: Record<string, any> }>;
92
97
  export const Metadata = defineCapability<Metadata>('dxos.org/app-framework/capability/metadata');
93
98
 
94
- export const Tools = defineCapability<Tool[]>('dxos.org/app-framework/capability/tools');
99
+ export const Tools = defineCapability<ExecutableTool[]>('dxos.org/app-framework/capability/tools');
95
100
  export const ArtifactDefinition = defineCapability<ArtifactDefinition>(
96
101
  'dxos.org/app-framework/capability/artifact-definition',
97
102
  );
98
103
 
99
104
  export type FileUploader = (file: File, space: Space) => Promise<FileInfo | undefined>;
100
105
  export const FileUploader = defineCapability<FileUploader>('dxos.org/app-framework/capability/file-uploader');
106
+
107
+ type AnchorSort = {
108
+ key: string;
109
+ sort: (anchorA: AnchoredTo, anchorB: AnchoredTo) => number;
110
+ };
111
+ export const AnchorSort = defineCapability<AnchorSort>('dxos.org/app-framework/capability/anchor-sort');
101
112
  }
@@ -2,20 +2,20 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { SchemaAST as AST, Schema as S } from 'effect';
5
+ import { Schema } from 'effect';
6
6
 
7
- import { Expando, Ref, SpaceIdSchema } from '@dxos/echo-schema';
7
+ import { Expando, Ref } from '@dxos/echo-schema';
8
8
 
9
9
  export namespace CollaborationActions {
10
- export class InsertContent extends S.TaggedClass<InsertContent>()('assistant/intent-content', {
11
- input: S.Struct({
12
- spaceId: SpaceIdSchema,
13
- target: Ref(Expando),
10
+ export class InsertContent extends Schema.TaggedClass<InsertContent>()('assistant/intent-content', {
11
+ input: Schema.Struct({
12
+ target: Expando,
14
13
  object: Ref(Expando),
15
- label: S.String.pipe(S.optional),
14
+ at: Schema.optional(Schema.String),
15
+ label: Schema.String.pipe(Schema.optional),
16
16
  }).annotations({
17
- [AST.DescriptionAnnotationId]: 'Enables plugins to inject content blocks or references into a related entity.',
17
+ description: 'Enables plugins to inject content blocks or references into a related entity.',
18
18
  }),
19
- output: S.Void,
19
+ output: Schema.Void,
20
20
  }) {}
21
21
  }
@@ -2,7 +2,7 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { Schema as S } from 'effect';
5
+ import { Schema } from 'effect';
6
6
 
7
7
  // TODO(burdon): See Accept attribute (uses MIME types).
8
8
  // E.g., 'image/*': ['.jpg', '.jpeg', '.png', '.gif'],
@@ -12,11 +12,11 @@ export const defaultFileTypes = {
12
12
  text: ['pdf', 'txt', 'md'],
13
13
  };
14
14
 
15
- export const FileInfoSchema = S.Struct({
16
- name: S.String,
17
- type: S.String,
18
- url: S.optional(S.String),
19
- cid: S.optional(S.String), // TODO(burdon): Meta key? Or other common properties with other file management system? (e.g., WNFS).
15
+ export const FileInfoSchema = Schema.Struct({
16
+ name: Schema.String,
17
+ type: Schema.String,
18
+ url: Schema.optional(Schema.String),
19
+ cid: Schema.optional(Schema.String), // TODO(burdon): Meta key? Or other common properties with other file management system? (e.g., WNFS).
20
20
  });
21
21
 
22
- export type FileInfo = S.Schema.Type<typeof FileInfoSchema>;
22
+ export type FileInfo = Schema.Schema.Type<typeof FileInfoSchema>;