@dxos/app-framework 0.8.3 → 0.8.4-main.1f223c7

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 (352) hide show
  1. package/.swc/plugins/linux_x86_64_19.0.0/727453fb3a62f7f1d952a41e051ca8a6f88cadc45cee43c6a4d1aa45f9b75665.wasmer-v7 +0 -0
  2. package/.swc/plugins/linux_x86_64_19.0.0/fce1bdb8e20a094e4af08bad09cc81497ed0e2e7c51223b07d371063cca18429.wasmer-v7 +0 -0
  3. package/README.md +0 -8
  4. package/dist/lib/browser/{app-graph-builder-BI4VVKSW.mjs → app-graph-builder-AFFC6VB2.mjs} +5 -5
  5. package/dist/lib/browser/app-graph-builder-AFFC6VB2.mjs.map +7 -0
  6. package/dist/lib/browser/{chunk-WWEJRWFX.mjs → chunk-ORWHM7CO.mjs} +2 -2
  7. package/dist/lib/browser/{chunk-EHM4UI3V.mjs → chunk-OZY7HV2A.mjs} +396 -271
  8. package/dist/lib/browser/chunk-OZY7HV2A.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-DIBVO47Z.mjs → chunk-T6M7JB7M.mjs} +194 -129
  10. package/dist/lib/browser/chunk-T6M7JB7M.mjs.map +7 -0
  11. package/dist/lib/browser/index.mjs +16 -10
  12. package/dist/lib/browser/index.mjs.map +3 -3
  13. package/dist/lib/browser/{intent-dispatcher-XVBOMF2Y.mjs → intent-dispatcher-QG7UPGQX.mjs} +2 -2
  14. package/dist/lib/browser/{intent-resolver-3QMBXLIY.mjs → intent-resolver-4S4PSTM5.mjs} +4 -4
  15. package/dist/lib/browser/intent-resolver-4S4PSTM5.mjs.map +7 -0
  16. package/dist/lib/browser/meta.json +1 -1
  17. package/dist/lib/browser/{store-5H7XPJGA.mjs → store-6E33KLGK.mjs} +3 -3
  18. package/dist/lib/browser/{store-5H7XPJGA.mjs.map → store-6E33KLGK.mjs.map} +1 -1
  19. package/dist/lib/browser/testing/index.mjs +6 -8
  20. package/dist/lib/browser/testing/index.mjs.map +3 -3
  21. package/dist/lib/browser/worker.mjs +7 -1
  22. package/dist/lib/node-esm/{app-graph-builder-NROP6RPQ.mjs → app-graph-builder-S4OAULX5.mjs} +5 -5
  23. package/dist/lib/node-esm/app-graph-builder-S4OAULX5.mjs.map +7 -0
  24. package/dist/lib/node-esm/{chunk-2J6FVECI.mjs → chunk-F63ZRXMK.mjs} +396 -271
  25. package/dist/lib/node-esm/chunk-F63ZRXMK.mjs.map +7 -0
  26. package/dist/lib/node-esm/{chunk-FHNZZWP4.mjs → chunk-HJFU7QOR.mjs} +194 -129
  27. package/dist/lib/node-esm/chunk-HJFU7QOR.mjs.map +7 -0
  28. package/dist/lib/node-esm/{chunk-I6BVZMAH.mjs → chunk-UMZQERLE.mjs} +2 -2
  29. package/dist/lib/node-esm/index.mjs +16 -10
  30. package/dist/lib/node-esm/index.mjs.map +3 -3
  31. package/dist/lib/node-esm/{intent-dispatcher-7JPGLCQ5.mjs → intent-dispatcher-NXBGPJOX.mjs} +2 -2
  32. package/dist/lib/node-esm/{intent-resolver-VY4X5UHN.mjs → intent-resolver-2ZKXI5ET.mjs} +4 -4
  33. package/dist/lib/node-esm/intent-resolver-2ZKXI5ET.mjs.map +7 -0
  34. package/dist/lib/node-esm/meta.json +1 -1
  35. package/dist/lib/node-esm/{store-UKD2R2KA.mjs → store-QQUTQHHT.mjs} +3 -3
  36. package/dist/lib/node-esm/{store-UKD2R2KA.mjs.map → store-QQUTQHHT.mjs.map} +1 -1
  37. package/dist/lib/node-esm/testing/index.mjs +6 -8
  38. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  39. package/dist/lib/node-esm/worker.mjs +7 -1
  40. package/dist/types/src/common/capabilities.d.ts +78 -9
  41. package/dist/types/src/common/capabilities.d.ts.map +1 -1
  42. package/dist/types/src/common/collaboration.d.ts +9 -8
  43. package/dist/types/src/common/collaboration.d.ts.map +1 -1
  44. package/dist/types/src/common/events.d.ts.map +1 -1
  45. package/dist/types/src/common/surface.d.ts +1 -1
  46. package/dist/types/src/common/surface.d.ts.map +1 -1
  47. package/dist/types/src/components/App.d.ts +10 -0
  48. package/dist/types/src/components/App.d.ts.map +1 -0
  49. package/dist/types/src/components/App.stories.d.ts +15 -0
  50. package/dist/types/src/components/App.stories.d.ts.map +1 -0
  51. package/dist/types/src/components/DefaultFallback.d.ts +8 -0
  52. package/dist/types/src/components/DefaultFallback.d.ts.map +1 -0
  53. package/dist/types/src/components/index.d.ts +2 -0
  54. package/dist/types/src/components/index.d.ts.map +1 -0
  55. package/dist/types/src/{App.d.ts → components/useApp.d.ts} +7 -6
  56. package/dist/types/src/components/useApp.d.ts.map +1 -0
  57. package/dist/types/src/components/useLoading.d.ts +19 -0
  58. package/dist/types/src/components/useLoading.d.ts.map +1 -0
  59. package/dist/types/src/core/capabilities.d.ts +4 -1
  60. package/dist/types/src/core/capabilities.d.ts.map +1 -1
  61. package/dist/types/src/core/manager.d.ts +6 -2
  62. package/dist/types/src/core/manager.d.ts.map +1 -1
  63. package/dist/types/src/index.d.ts +1 -1
  64. package/dist/types/src/index.d.ts.map +1 -1
  65. package/dist/types/src/playground/debug/Debug.d.ts +1 -1
  66. package/dist/types/src/playground/generator/Main.d.ts +1 -1
  67. package/dist/types/src/playground/generator/Toolbar.d.ts +1 -1
  68. package/dist/types/src/playground/generator/Toolbar.d.ts.map +1 -1
  69. package/dist/types/src/playground/generator/generator.d.ts.map +1 -1
  70. package/dist/types/src/playground/layout/Layout.d.ts +2 -2
  71. package/dist/types/src/playground/logger/Toolbar.d.ts +1 -1
  72. package/dist/types/src/playground/logger/Toolbar.d.ts.map +1 -1
  73. package/dist/types/src/playground/logger/plugin.d.ts.map +1 -1
  74. package/dist/types/src/playground/playground.stories.d.ts +5 -3
  75. package/dist/types/src/playground/playground.stories.d.ts.map +1 -1
  76. package/dist/types/src/plugin-intent/IntentPlugin.d.ts.map +1 -1
  77. package/dist/types/src/plugin-intent/index.d.ts +1 -0
  78. package/dist/types/src/plugin-intent/index.d.ts.map +1 -1
  79. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +3 -3
  80. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -1
  81. package/dist/types/src/plugin-settings/SettingsPlugin.d.ts.map +1 -1
  82. package/dist/types/src/plugin-settings/app-graph-builder.d.ts +1 -1
  83. package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +1 -1
  84. package/dist/types/src/plugin-settings/intent-resolver.d.ts +1 -1
  85. package/dist/types/src/plugin-settings/intent-resolver.d.ts.map +1 -1
  86. package/dist/types/src/plugin-settings/store.d.ts +1 -1
  87. package/dist/types/src/plugin-settings/store.d.ts.map +1 -1
  88. package/dist/types/src/plugin-settings/translations.d.ts +7 -8
  89. package/dist/types/src/plugin-settings/translations.d.ts.map +1 -1
  90. package/dist/types/src/react/ErrorBoundary.d.ts +13 -14
  91. package/dist/types/src/react/ErrorBoundary.d.ts.map +1 -1
  92. package/dist/types/src/react/IntentContext.d.ts.map +1 -1
  93. package/dist/types/src/react/Surface.d.ts.map +1 -1
  94. package/dist/types/src/react/Surface.stories.d.ts +6 -4
  95. package/dist/types/src/react/Surface.stories.d.ts.map +1 -1
  96. package/dist/types/src/react/common.d.ts.map +1 -1
  97. package/dist/types/src/react/useCapabilities.d.ts.map +1 -1
  98. package/dist/types/src/testing/withPluginManager.d.ts +4 -2
  99. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
  100. package/dist/types/src/testing/withPluginManager.stories.d.ts +9 -3
  101. package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
  102. package/dist/types/tsconfig.tsbuildinfo +1 -1
  103. package/moon.yml +14 -0
  104. package/package.json +32 -28
  105. package/src/common/capabilities.ts +98 -11
  106. package/src/common/collaboration.ts +5 -8
  107. package/src/common/events.ts +3 -1
  108. package/src/common/surface.ts +1 -1
  109. package/src/components/App.stories.tsx +35 -0
  110. package/src/components/App.tsx +59 -0
  111. package/src/components/DefaultFallback.tsx +26 -0
  112. package/src/components/index.ts +5 -0
  113. package/src/{App.tsx → components/useApp.tsx} +20 -130
  114. package/src/components/useLoading.tsx +70 -0
  115. package/src/core/capabilities.test.ts +1 -1
  116. package/src/core/capabilities.ts +11 -6
  117. package/src/core/manager.test.ts +5 -5
  118. package/src/core/manager.ts +132 -54
  119. package/src/helpers.test.ts +1 -1
  120. package/src/index.ts +1 -1
  121. package/src/playground/debug/Debug.tsx +1 -1
  122. package/src/playground/generator/Toolbar.tsx +2 -1
  123. package/src/playground/generator/generator.ts +2 -2
  124. package/src/playground/layout/plugin.ts +1 -1
  125. package/src/playground/logger/Toolbar.tsx +2 -1
  126. package/src/playground/logger/plugin.ts +3 -2
  127. package/src/playground/playground.stories.tsx +15 -10
  128. package/src/plugin-intent/IntentPlugin.ts +2 -1
  129. package/src/plugin-intent/index.ts +1 -0
  130. package/src/plugin-intent/intent-dispatcher.test.ts +1 -1
  131. package/src/plugin-intent/intent-dispatcher.ts +10 -8
  132. package/src/plugin-settings/SettingsPlugin.ts +3 -2
  133. package/src/plugin-settings/app-graph-builder.ts +4 -3
  134. package/src/plugin-settings/intent-resolver.ts +3 -2
  135. package/src/plugin-settings/store.ts +1 -1
  136. package/src/plugin-settings/translations.ts +4 -2
  137. package/src/react/ErrorBoundary.tsx +24 -15
  138. package/src/react/IntentContext.tsx +3 -2
  139. package/src/react/Surface.stories.tsx +21 -13
  140. package/src/react/Surface.tsx +4 -3
  141. package/src/react/common.ts +2 -1
  142. package/src/react/useCapabilities.ts +2 -1
  143. package/src/testing/withPluginManager.stories.tsx +9 -5
  144. package/src/testing/withPluginManager.tsx +13 -13
  145. package/tsconfig.json +5 -9
  146. package/vitest.config.ts +5 -2
  147. package/.eslintrc.cjs +0 -9
  148. package/README.yml +0 -5
  149. package/dist/lib/browser/app-graph-builder-BI4VVKSW.mjs.map +0 -7
  150. package/dist/lib/browser/chunk-DIBVO47Z.mjs.map +0 -7
  151. package/dist/lib/browser/chunk-EHM4UI3V.mjs.map +0 -7
  152. package/dist/lib/browser/intent-resolver-3QMBXLIY.mjs.map +0 -7
  153. package/dist/lib/node/app-graph-builder-H7QVE4MJ.cjs +0 -146
  154. package/dist/lib/node/app-graph-builder-H7QVE4MJ.cjs.map +0 -7
  155. package/dist/lib/node/chunk-G774ASXO.cjs +0 -58
  156. package/dist/lib/node/chunk-G774ASXO.cjs.map +0 -7
  157. package/dist/lib/node/chunk-VSOSVDQ3.cjs +0 -1551
  158. package/dist/lib/node/chunk-VSOSVDQ3.cjs.map +0 -7
  159. package/dist/lib/node/chunk-YGAY3H34.cjs +0 -429
  160. package/dist/lib/node/chunk-YGAY3H34.cjs.map +0 -7
  161. package/dist/lib/node/index.cjs +0 -193
  162. package/dist/lib/node/index.cjs.map +0 -7
  163. package/dist/lib/node/intent-dispatcher-C3SVKJ62.cjs +0 -32
  164. package/dist/lib/node/intent-dispatcher-C3SVKJ62.cjs.map +0 -7
  165. package/dist/lib/node/intent-resolver-IOJDYO34.cjs +0 -46
  166. package/dist/lib/node/intent-resolver-IOJDYO34.cjs.map +0 -7
  167. package/dist/lib/node/meta.json +0 -1
  168. package/dist/lib/node/store-ESF5VR57.cjs +0 -45
  169. package/dist/lib/node/store-ESF5VR57.cjs.map +0 -7
  170. package/dist/lib/node/testing/index.cjs +0 -119
  171. package/dist/lib/node/testing/index.cjs.map +0 -7
  172. package/dist/lib/node/worker.cjs +0 -101
  173. package/dist/lib/node/worker.cjs.map +0 -7
  174. package/dist/lib/node-esm/app-graph-builder-NROP6RPQ.mjs.map +0 -7
  175. package/dist/lib/node-esm/chunk-2J6FVECI.mjs.map +0 -7
  176. package/dist/lib/node-esm/chunk-FHNZZWP4.mjs.map +0 -7
  177. package/dist/lib/node-esm/intent-resolver-VY4X5UHN.mjs.map +0 -7
  178. package/dist/types/src/App.d.ts.map +0 -1
  179. package/project.json +0 -29
  180. package/typedoc/.nojekyll +0 -1
  181. package/typedoc/assets/hierarchy.js +0 -1
  182. package/typedoc/assets/highlight.css +0 -106
  183. package/typedoc/assets/icons.js +0 -18
  184. package/typedoc/assets/icons.svg +0 -1
  185. package/typedoc/assets/main.js +0 -60
  186. package/typedoc/assets/navigation.js +0 -1
  187. package/typedoc/assets/search.js +0 -1
  188. package/typedoc/assets/style.css +0 -1640
  189. package/typedoc/classes/CollaborationActions.InsertContent.html +0 -421
  190. package/typedoc/classes/ErrorBoundary.html +0 -125
  191. package/typedoc/classes/IntentAction.ShowUndo.html +0 -227
  192. package/typedoc/classes/IntentAction.Track.html +0 -266
  193. package/typedoc/classes/LayoutAction.AddToast.html +0 -265
  194. package/typedoc/classes/LayoutAction.Close.html +0 -382
  195. package/typedoc/classes/LayoutAction.Expose.html +0 -265
  196. package/typedoc/classes/LayoutAction.Open.html +0 -1123
  197. package/typedoc/classes/LayoutAction.RevertWorkspace.html +0 -343
  198. package/typedoc/classes/LayoutAction.ScrollIntoView.html +0 -460
  199. package/typedoc/classes/LayoutAction.Set.html +0 -460
  200. package/typedoc/classes/LayoutAction.SetLayoutMode.html +0 -499
  201. package/typedoc/classes/LayoutAction.SwitchWorkspace.html +0 -265
  202. package/typedoc/classes/LayoutAction.UpdateComplementary.html +0 -616
  203. package/typedoc/classes/LayoutAction.UpdateDialog.html +0 -1123
  204. package/typedoc/classes/LayoutAction.UpdateLayout.html +0 -461
  205. package/typedoc/classes/LayoutAction.UpdatePopover.html +0 -1435
  206. package/typedoc/classes/LayoutAction.UpdateSidebar.html +0 -616
  207. package/typedoc/classes/Plugin.html +0 -6
  208. package/typedoc/classes/PluginContext.html +0 -38
  209. package/typedoc/classes/PluginManager.html +0 -43
  210. package/typedoc/classes/PluginModule.html +0 -18
  211. package/typedoc/classes/SettingsAction.Open.html +0 -226
  212. package/typedoc/classes/SettingsAction.OpenPluginRegistry.html +0 -265
  213. package/typedoc/functions/Events.createStateEvent.html +0 -2
  214. package/typedoc/functions/IntentPlugin.html +0 -1
  215. package/typedoc/functions/SettingsPlugin.html +0 -1
  216. package/typedoc/functions/allOf.html +0 -2
  217. package/typedoc/functions/chain.html +0 -3
  218. package/typedoc/functions/contributes.html +0 -2
  219. package/typedoc/functions/createDispatcher.html +0 -3
  220. package/typedoc/functions/createIntent.html +0 -6
  221. package/typedoc/functions/createResolver.html +0 -2
  222. package/typedoc/functions/createSurface.html +0 -2
  223. package/typedoc/functions/defineCapability.html +0 -2
  224. package/typedoc/functions/defineEvent.html +0 -2
  225. package/typedoc/functions/defineModule.html +0 -2
  226. package/typedoc/functions/definePlugin.html +0 -2
  227. package/typedoc/functions/eventKey.html +0 -2
  228. package/typedoc/functions/getEvents.html +0 -2
  229. package/typedoc/functions/isAllOf.html +0 -2
  230. package/typedoc/functions/isOneOf.html +0 -2
  231. package/typedoc/functions/isSurfaceAvailable.html +0 -2
  232. package/typedoc/functions/lazy.html +0 -2
  233. package/typedoc/functions/oneOf.html +0 -2
  234. package/typedoc/functions/useApp.html +0 -6
  235. package/typedoc/functions/useAppGraph.html +0 -1
  236. package/typedoc/functions/useCapabilities.html +0 -3
  237. package/typedoc/functions/useCapability.html +0 -4
  238. package/typedoc/functions/useIntentDispatcher.html +0 -1
  239. package/typedoc/functions/useIntentResolver.html +0 -1
  240. package/typedoc/functions/useLayout.html +0 -1
  241. package/typedoc/functions/usePluginManager.html +0 -2
  242. package/typedoc/hierarchy.html +0 -1
  243. package/typedoc/index.html +0 -16
  244. package/typedoc/interfaces/LayoutAction.Toast.html +0 -10
  245. package/typedoc/media/LICENSE +0 -8
  246. package/typedoc/modules/Capabilities.html +0 -1
  247. package/typedoc/modules/CollaborationActions.html +0 -1
  248. package/typedoc/modules/Events.html +0 -1
  249. package/typedoc/modules/IntentAction.html +0 -1
  250. package/typedoc/modules/LayoutAction.html +0 -2
  251. package/typedoc/modules/SettingsAction.html +0 -1
  252. package/typedoc/modules.html +0 -1
  253. package/typedoc/types/ActivationEvent.html +0 -8
  254. package/typedoc/types/ActivationEvents.html +0 -2
  255. package/typedoc/types/AnyCapability.html +0 -1
  256. package/typedoc/types/AnyIntent.html +0 -1
  257. package/typedoc/types/AnyIntentChain.html +0 -1
  258. package/typedoc/types/AnyIntentEffectResult.html +0 -1
  259. package/typedoc/types/AnyIntentResolver.html +0 -1
  260. package/typedoc/types/AnyIntentResult.html +0 -1
  261. package/typedoc/types/Capabilities.FileUploader.html +0 -1
  262. package/typedoc/types/Capabilities.IntentResolver.html +0 -1
  263. package/typedoc/types/Capabilities.Layout.html +0 -1
  264. package/typedoc/types/Capabilities.Metadata.html +0 -1
  265. package/typedoc/types/Capabilities.ReactContext.html +0 -1
  266. package/typedoc/types/Capabilities.ReactRoot.html +0 -1
  267. package/typedoc/types/Capabilities.ReactSurface.html +0 -1
  268. package/typedoc/types/Capabilities.Settings.html +0 -4
  269. package/typedoc/types/Capability.html +0 -9
  270. package/typedoc/types/CreateAppOptions.html +0 -10
  271. package/typedoc/types/FileInfo.html +0 -1
  272. package/typedoc/types/Intent.html +0 -10
  273. package/typedoc/types/IntentChain.html +0 -6
  274. package/typedoc/types/IntentContext.html +0 -5
  275. package/typedoc/types/IntentData.html +0 -1
  276. package/typedoc/types/IntentDispatcher.html +0 -2
  277. package/typedoc/types/IntentDispatcherResult.html +0 -2
  278. package/typedoc/types/IntentEffectDefinition.html +0 -2
  279. package/typedoc/types/IntentEffectResult.html +0 -15
  280. package/typedoc/types/IntentParams.html +0 -3
  281. package/typedoc/types/IntentResolver.html +0 -2
  282. package/typedoc/types/IntentResultData.html +0 -1
  283. package/typedoc/types/IntentSchema.html +0 -1
  284. package/typedoc/types/IntentUndo.html +0 -2
  285. package/typedoc/types/InterfaceDef.html +0 -4
  286. package/typedoc/types/Label.html +0 -1
  287. package/typedoc/types/NodeSerializer.html +0 -8
  288. package/typedoc/types/PluginManagerOptions.html +0 -6
  289. package/typedoc/types/PluginMeta.html +0 -21
  290. package/typedoc/types/PromiseIntentDispatcher.html +0 -2
  291. package/typedoc/types/PromiseIntentUndo.html +0 -2
  292. package/typedoc/types/Resource.html +0 -1
  293. package/typedoc/types/ResourceKey.html +0 -1
  294. package/typedoc/types/ResourceLanguage.html +0 -1
  295. package/typedoc/types/SerializedNode.html +0 -4
  296. package/typedoc/types/SurfaceComponent.html +0 -2
  297. package/typedoc/types/SurfaceDefinition.html +0 -2
  298. package/typedoc/types/SurfaceProps.html +0 -4
  299. package/typedoc/variables/Capabilities.AnchorSort.html +0 -1
  300. package/typedoc/variables/Capabilities.AppGraph.html +0 -1
  301. package/typedoc/variables/Capabilities.AppGraphBuilder.html +0 -1
  302. package/typedoc/variables/Capabilities.AppGraphSerializer.html +0 -1
  303. package/typedoc/variables/Capabilities.ArtifactDefinition.html +0 -1
  304. package/typedoc/variables/Capabilities.FileUploader.html +0 -1
  305. package/typedoc/variables/Capabilities.IntentDispatcher.html +0 -1
  306. package/typedoc/variables/Capabilities.IntentResolver.html +0 -1
  307. package/typedoc/variables/Capabilities.Layout.html +0 -1
  308. package/typedoc/variables/Capabilities.Metadata.html +0 -1
  309. package/typedoc/variables/Capabilities.Null.html +0 -1
  310. package/typedoc/variables/Capabilities.PluginManager.html +0 -1
  311. package/typedoc/variables/Capabilities.ReactContext.html +0 -1
  312. package/typedoc/variables/Capabilities.ReactRoot.html +0 -1
  313. package/typedoc/variables/Capabilities.ReactSurface.html +0 -1
  314. package/typedoc/variables/Capabilities.RxRegistry.html +0 -1
  315. package/typedoc/variables/Capabilities.Settings.html +0 -1
  316. package/typedoc/variables/Capabilities.SettingsStore.html +0 -1
  317. package/typedoc/variables/Capabilities.Tools.html +0 -1
  318. package/typedoc/variables/Capabilities.Translations.html +0 -1
  319. package/typedoc/variables/Events.AppGraphReady.html +0 -2
  320. package/typedoc/variables/Events.DispatcherReady.html +0 -2
  321. package/typedoc/variables/Events.LayoutReady.html +0 -1
  322. package/typedoc/variables/Events.SettingsReady.html +0 -2
  323. package/typedoc/variables/Events.SetupAppGraph.html +0 -2
  324. package/typedoc/variables/Events.SetupArtifactDefinition.html +0 -2
  325. package/typedoc/variables/Events.SetupIntentResolver.html +0 -2
  326. package/typedoc/variables/Events.SetupMetadata.html +0 -2
  327. package/typedoc/variables/Events.SetupReactSurface.html +0 -2
  328. package/typedoc/variables/Events.SetupSettings.html +0 -2
  329. package/typedoc/variables/Events.SetupTranslations.html +0 -2
  330. package/typedoc/variables/Events.Startup.html +0 -2
  331. package/typedoc/variables/FileInfoSchema.html +0 -1
  332. package/typedoc/variables/INTENT_ACTION.html +0 -1
  333. package/typedoc/variables/INTENT_PLUGIN.html +0 -1
  334. package/typedoc/variables/LAYOUT_ACTION.html +0 -1
  335. package/typedoc/variables/LAYOUT_PLUGIN.html +0 -1
  336. package/typedoc/variables/Label.html +0 -1
  337. package/typedoc/variables/LayoutAction.Toast.html +0 -1
  338. package/typedoc/variables/LayoutAction.UPDATE_LAYOUT.html +0 -1
  339. package/typedoc/variables/PluginManagerProvider.html +0 -2
  340. package/typedoc/variables/Resource.html +0 -2
  341. package/typedoc/variables/ResourceKey.html +0 -1
  342. package/typedoc/variables/ResourceLanguage.html +0 -1
  343. package/typedoc/variables/SETTINGS_ACTION.html +0 -1
  344. package/typedoc/variables/SETTINGS_ID.html +0 -1
  345. package/typedoc/variables/SETTINGS_KEY.html +0 -1
  346. package/typedoc/variables/SETTINGS_PLUGIN.html +0 -1
  347. package/typedoc/variables/Surface.html +0 -2
  348. package/typedoc/variables/defaultFileTypes.html +0 -1
  349. /package/dist/lib/browser/{chunk-WWEJRWFX.mjs.map → chunk-ORWHM7CO.mjs.map} +0 -0
  350. /package/dist/lib/browser/{intent-dispatcher-XVBOMF2Y.mjs.map → intent-dispatcher-QG7UPGQX.mjs.map} +0 -0
  351. /package/dist/lib/node-esm/{chunk-I6BVZMAH.mjs.map → chunk-UMZQERLE.mjs.map} +0 -0
  352. /package/dist/lib/node-esm/{intent-dispatcher-7JPGLCQ5.mjs.map → intent-dispatcher-NXBGPJOX.mjs.map} +0 -0
package/moon.yml ADDED
@@ -0,0 +1,14 @@
1
+ type: library
2
+ language: typescript
3
+ tags:
4
+ - pack
5
+ - ts-build
6
+ - ts-test
7
+ - typedoc
8
+ tasks:
9
+ compile:
10
+ args:
11
+ - '--entryPoint=src/index.ts'
12
+ - '--entryPoint=src/testing/index.ts'
13
+ - '--entryPoint=src/worker.ts'
14
+ - '--preactSignalTracking'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/app-framework",
3
- "version": "0.8.3",
3
+ "version": "0.8.4-main.1f223c7",
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",
@@ -10,16 +10,19 @@
10
10
  "type": "module",
11
11
  "exports": {
12
12
  ".": {
13
+ "source": "./src/index.ts",
13
14
  "types": "./dist/types/src/index.d.ts",
14
15
  "browser": "./dist/lib/browser/index.mjs",
15
16
  "node": "./dist/lib/node-esm/index.mjs"
16
17
  },
17
18
  "./testing": {
19
+ "source": "./src/testing/index.ts",
18
20
  "types": "./dist/types/src/testing/index.d.ts",
19
21
  "browser": "./dist/lib/browser/testing/index.mjs",
20
22
  "node": "./dist/lib/node-esm/testing/index.mjs"
21
23
  },
22
24
  "./worker": {
25
+ "source": "./src/worker.ts",
23
26
  "types": "./dist/types/src/worker.d.ts",
24
27
  "browser": "./dist/lib/browser/worker.mjs",
25
28
  "node": "./dist/lib/node-esm/worker.mjs"
@@ -28,50 +31,51 @@
28
31
  "types": "dist/types/src/index.d.ts",
29
32
  "typesVersions": {
30
33
  "*": {
31
- "./testing": [
34
+ "testing": [
32
35
  "dist/types/src/testing/index.d.ts"
33
36
  ],
34
- "./worker": [
37
+ "worker": [
35
38
  "dist/types/src/worker.d.ts"
36
39
  ]
37
40
  }
38
41
  },
39
42
  "dependencies": {
43
+ "@effect/ai": "0.25.2",
40
44
  "@preact-signals/safe-react": "^0.9.0",
41
45
  "@preact/signals-core": "^1.9.0",
42
- "@dxos/app-graph": "0.8.3",
43
- "@dxos/ai": "0.8.3",
44
- "@dxos/artifact": "0.8.3",
45
- "@dxos/client-protocol": "0.8.3",
46
- "@dxos/debug": "0.8.3",
47
- "@dxos/async": "0.8.3",
48
- "@dxos/invariant": "0.8.3",
49
- "@dxos/echo-schema": "0.8.3",
50
- "@dxos/keys": "0.8.3",
51
- "@dxos/live-object": "0.8.3",
52
- "@dxos/log": "0.8.3",
53
- "@dxos/local-storage": "0.8.3",
54
- "@dxos/react-hooks": "0.8.3",
55
- "@dxos/util": "0.8.3",
56
- "@dxos/schema": "0.8.3"
46
+ "@dxos/ai": "0.8.4-main.1f223c7",
47
+ "@dxos/app-graph": "0.8.4-main.1f223c7",
48
+ "@dxos/blueprints": "0.8.4-main.1f223c7",
49
+ "@dxos/client-protocol": "0.8.4-main.1f223c7",
50
+ "@dxos/debug": "0.8.4-main.1f223c7",
51
+ "@dxos/functions": "0.8.4-main.1f223c7",
52
+ "@dxos/echo-schema": "0.8.4-main.1f223c7",
53
+ "@dxos/async": "0.8.4-main.1f223c7",
54
+ "@dxos/invariant": "0.8.4-main.1f223c7",
55
+ "@dxos/keys": "0.8.4-main.1f223c7",
56
+ "@dxos/live-object": "0.8.4-main.1f223c7",
57
+ "@dxos/react-hooks": "0.8.4-main.1f223c7",
58
+ "@dxos/schema": "0.8.4-main.1f223c7",
59
+ "@dxos/log": "0.8.4-main.1f223c7",
60
+ "@dxos/util": "0.8.4-main.1f223c7",
61
+ "@dxos/local-storage": "0.8.4-main.1f223c7"
57
62
  },
58
63
  "devDependencies": {
59
- "@effect-rx/rx-react": "^0.34.1",
60
- "@effect/platform": "0.80.12",
61
- "@phosphor-icons/react": "^2.1.5",
64
+ "@effect-rx/rx-react": "0.38.0",
65
+ "@effect/platform": "0.90.2",
62
66
  "@types/react": "~18.2.0",
63
- "effect": "3.14.21",
67
+ "effect": "3.17.7",
64
68
  "react": "~18.2.0",
65
69
  "typedoc": "0.28.1",
66
- "@dxos/echo-signals": "0.8.3",
67
- "@dxos/react-ui": "0.8.3",
68
- "@dxos/random": "0.8.3",
69
- "@dxos/react-ui-syntax-highlighter": "0.8.3",
70
- "@dxos/storybook-utils": "0.8.3"
70
+ "@dxos/random": "0.8.4-main.1f223c7",
71
+ "@dxos/react-ui": "0.8.4-main.1f223c7",
72
+ "@dxos/echo-signals": "0.8.4-main.1f223c7",
73
+ "@dxos/react-ui-syntax-highlighter": "0.8.4-main.1f223c7",
74
+ "@dxos/storybook-utils": "0.8.4-main.1f223c7"
71
75
  },
72
76
  "peerDependencies": {
73
77
  "@effect-rx/rx-react": "^0.34.1",
74
- "@effect/platform": "0.80.12",
78
+ "@effect/platform": "^0.80.12",
75
79
  "effect": "^3.13.3",
76
80
  "react": "~18.2.0"
77
81
  },
@@ -2,43 +2,74 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import { type AiTool, type AiToolkit } from '@effect/ai';
5
6
  import { type Registry } from '@effect-rx/rx-react';
6
- import { type Schema } from 'effect';
7
+ import { type Layer, type Schema } from 'effect';
7
8
  import { type FC, type PropsWithChildren } from 'react';
8
9
 
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
+ import { type BuilderExtensions, type GraphBuilder } from '@dxos/app-graph';
11
+ import { type Blueprint } from '@dxos/blueprints';
12
12
  import { type Space } from '@dxos/client-protocol';
13
+ import { type FunctionDefinition } from '@dxos/functions';
13
14
  import { type RootSettingsStore } from '@dxos/local-storage';
14
15
  import { type AnchoredTo } from '@dxos/schema';
15
16
 
17
+ import { type PluginManager, defineCapability } from '../core';
18
+ import { type AnyIntentResolver, type IntentContext } from '../plugin-intent';
19
+
16
20
  import { type FileInfo } from './file';
17
21
  import { type NodeSerializer } from './graph';
18
22
  import { type SurfaceDefinition } from './surface';
19
23
  import { type Resource } from './translations';
20
- import { type PluginManager, defineCapability } from '../core';
21
- import { type AnyIntentResolver, type IntentContext } from '../plugin-intent';
22
24
 
25
+ // TODO(burdon): Sort.
23
26
  export namespace Capabilities {
24
- export const PluginManager = defineCapability<PluginManager>('dxos.org/app-framework/capability/plugin-manager');
25
-
27
+ /**
28
+ * @category Capability
29
+ */
26
30
  export const Null = defineCapability<null>('dxos.org/app-framework/capability/null');
27
31
 
32
+ /**
33
+ * @category Capability
34
+ */
35
+ export const PluginManager = defineCapability<PluginManager>('dxos.org/app-framework/capability/plugin-manager');
36
+
37
+ /**
38
+ * @category Capability
39
+ */
28
40
  export const RxRegistry = defineCapability<Registry.Registry>('dxos.org/app-framework/capability/rx-registry');
29
41
 
30
42
  export type ReactContext = Readonly<{ id: string; dependsOn?: string[]; context: FC<PropsWithChildren> }>;
43
+
44
+ /**
45
+ * @category Capability
46
+ */
31
47
  export const ReactContext = defineCapability<ReactContext>('dxos.org/app-framework/capability/react-context');
32
48
 
33
49
  export type ReactRoot = Readonly<{ id: string; root: FC<PropsWithChildren> }>;
50
+
51
+ /**
52
+ * @category Capability
53
+ */
34
54
  export const ReactRoot = defineCapability<ReactRoot>('dxos.org/app-framework/capability/react-root');
35
55
 
36
56
  export type ReactSurface = SurfaceDefinition | readonly SurfaceDefinition[];
57
+
58
+ /**
59
+ * @category Capability
60
+ */
37
61
  export const ReactSurface = defineCapability<ReactSurface>('dxos.org/app-framework/common/react-surface');
38
62
 
39
63
  export type IntentResolver = AnyIntentResolver | readonly AnyIntentResolver[];
64
+
65
+ /**
66
+ * @category Capability
67
+ */
40
68
  export const IntentResolver = defineCapability<IntentResolver>('dxos.org/app-framework/capability/intent-resolver');
41
69
 
70
+ /**
71
+ * @category Capability
72
+ */
42
73
  export const IntentDispatcher = defineCapability<IntentContext>(
43
74
  'dxos.org/app-framework/capability/intent-dispatcher',
44
75
  );
@@ -65,22 +96,41 @@ export namespace Capabilities {
65
96
  */
66
97
  scrollIntoView: string | undefined;
67
98
  }>;
99
+
100
+ /**
101
+ * @category Capability
102
+ */
68
103
  export const Layout = defineCapability<Layout>('dxos.org/app-framework/capability/layout');
69
104
 
105
+ /**
106
+ * @category Capability
107
+ */
70
108
  export const Translations = defineCapability<Readonly<Resource[]>>('dxos.org/app-framework/capability/translations');
71
109
 
110
+ /**
111
+ * @category Capability
112
+ */
72
113
  export const AppGraph = defineCapability<Readonly<Pick<GraphBuilder, 'graph' | 'explore'>>>(
73
114
  'dxos.org/app-framework/capability/app-graph',
74
115
  );
75
116
 
117
+ /**
118
+ * @category Capability
119
+ */
76
120
  export const AppGraphBuilder = defineCapability<BuilderExtensions>(
77
121
  'dxos.org/app-framework/capability/app-graph-builder',
78
122
  );
79
123
 
124
+ /**
125
+ * @category Capability
126
+ */
80
127
  export const AppGraphSerializer = defineCapability<NodeSerializer[]>(
81
128
  'dxos.org/app-framework/capability/app-graph-serializer',
82
129
  );
83
130
 
131
+ /**
132
+ * @category Capability
133
+ */
84
134
  export const SettingsStore = defineCapability<RootSettingsStore>('dxos.org/app-framework/capability/settings-store');
85
135
 
86
136
  // TODO(wittjosiah): The generics caused type inference issues for schemas when contributing settings.
@@ -91,22 +141,59 @@ export namespace Capabilities {
91
141
  schema: Schema.Schema.All;
92
142
  value?: Record<string, any>;
93
143
  };
144
+
145
+ /**
146
+ * @category Capability
147
+ */
94
148
  export const Settings = defineCapability<Settings>('dxos.org/app-framework/capability/settings');
95
149
 
96
150
  export type Metadata = Readonly<{ id: string; metadata: Record<string, any> }>;
151
+
152
+ /**
153
+ * @category Capability
154
+ */
97
155
  export const Metadata = defineCapability<Metadata>('dxos.org/app-framework/capability/metadata');
98
156
 
99
- export const Tools = defineCapability<ExecutableTool[]>('dxos.org/app-framework/capability/tools');
100
- export const ArtifactDefinition = defineCapability<ArtifactDefinition>(
101
- 'dxos.org/app-framework/capability/artifact-definition',
157
+ /**
158
+ * @category Capability
159
+ */
160
+ export const Toolkit = defineCapability<AiToolkit.Any>('dxos.org/app-framework/capability/ai-toolkit');
161
+
162
+ /**
163
+ * @category Capability
164
+ */
165
+ export const ToolkitHandler = defineCapability<Layer.Layer<AiTool.ToHandler<AiTool.AiTool<any>>, never, never>>(
166
+ 'dxos.org/app-framework/capability/ai-toolkit-handler',
167
+ );
168
+
169
+ /**
170
+ * @category Capability
171
+ */
172
+ export const BlueprintDefinition = defineCapability<Blueprint.Blueprint>(
173
+ 'dxos.org/app-framework/capability/blueprint-definition',
174
+ );
175
+
176
+ /**
177
+ * @category Capability
178
+ */
179
+ export const Functions = defineCapability<FunctionDefinition<any, any>[]>(
180
+ 'dxos.org/app-framework/capability/functions',
102
181
  );
103
182
 
104
183
  export type FileUploader = (file: File, space: Space) => Promise<FileInfo | undefined>;
184
+
185
+ /**
186
+ * @category Capability
187
+ */
105
188
  export const FileUploader = defineCapability<FileUploader>('dxos.org/app-framework/capability/file-uploader');
106
189
 
107
190
  type AnchorSort = {
108
191
  key: string;
109
192
  sort: (anchorA: AnchoredTo, anchorB: AnchoredTo) => number;
110
193
  };
194
+
195
+ /**
196
+ * @category Capability
197
+ */
111
198
  export const AnchorSort = defineCapability<AnchorSort>('dxos.org/app-framework/capability/anchor-sort');
112
199
  }
@@ -4,17 +4,14 @@
4
4
 
5
5
  import { Schema } from 'effect';
6
6
 
7
- import { Expando, Ref } from '@dxos/echo-schema';
7
+ import { DataType } from '@dxos/schema';
8
8
 
9
9
  export namespace CollaborationActions {
10
- export class InsertContent extends Schema.TaggedClass<InsertContent>()('assistant/intent-content', {
10
+ export class AcceptProposal extends Schema.TaggedClass<AcceptProposal>()('collaboration/accept-proposal', {
11
11
  input: Schema.Struct({
12
- target: Expando,
13
- object: Ref(Expando),
14
- at: Schema.optional(Schema.String),
15
- label: Schema.String.pipe(Schema.optional),
16
- }).annotations({
17
- description: 'Enables plugins to inject content blocks or references into a related entity.',
12
+ subject: Schema.Any,
13
+ anchor: Schema.String,
14
+ proposal: DataType.MessageBlock.Proposal,
18
15
  }),
19
16
  output: Schema.Void,
20
17
  }) {}
@@ -2,9 +2,10 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities } from './capabilities';
6
5
  import { defineEvent } from '../core';
7
6
 
7
+ import { Capabilities } from './capabilities';
8
+
8
9
  export namespace Events {
9
10
  /**
10
11
  * Fired when the app is started.
@@ -48,6 +49,7 @@ export namespace Events {
48
49
  /**
49
50
  * Fired to load any newly available artifacts definitions.
50
51
  */
52
+ // TODO(burdon): Rename.
51
53
  export const SetupArtifactDefinition = defineEvent('dxos.org/app-framework/event/setup-artifact-definition');
52
54
 
53
55
  //
@@ -2,7 +2,7 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { type JSX, type ForwardedRef, type PropsWithChildren, type ReactNode } from 'react';
5
+ import { type ForwardedRef, type JSX, type PropsWithChildren, type ReactNode } from 'react';
6
6
 
7
7
  import { type GuardedType, type MakeOptional, type Position } from '@dxos/util';
8
8
 
@@ -0,0 +1,35 @@
1
+ //
2
+ // Copyright 2022 DXOS.org
3
+ //
4
+
5
+ import '@dxos-theme';
6
+
7
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
8
+ import React from 'react';
9
+
10
+ import { withTheme } from '@dxos/storybook-utils';
11
+
12
+ import { useApp } from './useApp';
13
+
14
+ const DefaultStory = () => {
15
+ const App = useApp({
16
+ placeholder: () => <div className='fixed inset-0 flex items-center justify-center'>Loading...</div>,
17
+ });
18
+
19
+ return <App />;
20
+ };
21
+
22
+ const meta = {
23
+ title: 'sdk/app-framework/App',
24
+ render: DefaultStory,
25
+ decorators: [withTheme],
26
+ parameters: {
27
+ layout: 'fullscreen',
28
+ },
29
+ } satisfies Meta;
30
+
31
+ export default meta;
32
+
33
+ type Story = StoryObj<typeof meta>;
34
+
35
+ export const Default: Story = {};
@@ -0,0 +1,59 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React, { type PropsWithChildren } from 'react';
6
+
7
+ import { Capabilities } from '../common';
8
+ import { topologicalSort } from '../helpers';
9
+ import { useCapabilities } from '../react';
10
+
11
+ import { type UseAppOptions } from './useApp';
12
+ import { LoadingState, useLoading } from './useLoading';
13
+
14
+ export type AppProps = Pick<UseAppOptions, 'placeholder' | 'debounce'> & {
15
+ state: { ready: boolean; error: unknown };
16
+ };
17
+
18
+ export const App = ({ placeholder: Placeholder, state, debounce }: AppProps) => {
19
+ const reactContexts = useCapabilities(Capabilities.ReactContext);
20
+ const reactRoots = useCapabilities(Capabilities.ReactRoot);
21
+ const stage = useLoading(state, debounce);
22
+
23
+ if (state.error) {
24
+ // This triggers the error boundary to provide UI feedback for the startup error.
25
+ throw state.error;
26
+ }
27
+
28
+ // TODO(wittjosiah): Consider using Suspense instead.
29
+ if (stage < LoadingState.Done) {
30
+ if (!Placeholder) {
31
+ return null;
32
+ }
33
+
34
+ return <Placeholder stage={stage} />;
35
+ }
36
+
37
+ const ComposedContext = composeContexts(reactContexts);
38
+ return (
39
+ <ComposedContext>
40
+ {reactRoots.map(({ id, root: Component }) => (
41
+ <Component key={id} />
42
+ ))}
43
+ </ComposedContext>
44
+ );
45
+ };
46
+
47
+ const composeContexts = (contexts: Capabilities.ReactContext[]) => {
48
+ if (contexts.length === 0) {
49
+ return ({ children }: PropsWithChildren) => <>{children}</>;
50
+ }
51
+
52
+ return topologicalSort(contexts)
53
+ .map(({ context }) => context)
54
+ .reduce((Acc, Next) => ({ children }) => (
55
+ <Acc>
56
+ <Next>{children}</Next>
57
+ </Acc>
58
+ ));
59
+ };
@@ -0,0 +1,26 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ /**
8
+ * NOTE: Default fallback should not use tailwind or theme.
9
+ */
10
+ export const DefaultFallback = ({ error }: { error: Error }) => {
11
+ return (
12
+ <div
13
+ style={{
14
+ margin: '1rem',
15
+ padding: '1rem',
16
+ overflow: 'hidden',
17
+ border: '4px solid teal',
18
+ borderRadius: '1rem',
19
+ }}
20
+ >
21
+ {/* TODO(wittjosiah): Link to docs for replacing default. */}
22
+ <h1 style={{ margin: '0.5rem 0', fontSize: '1.2rem' }}>[ERROR]: {error.message}</h1>
23
+ <pre style={{ overflow: 'auto', fontSize: '1rem', whiteSpace: 'pre-wrap', color: '#888888' }}>{error.stack}</pre>
24
+ </div>
25
+ );
26
+ };
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export * from './useApp';