@dxos/app-framework 0.8.4-main.84f28bd → 0.8.4-main.ae835ea

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 (378) hide show
  1. package/.storybook/main.mts +11 -0
  2. package/.storybook/preview.mts +8 -0
  3. package/.swc/plugins/linux_x86_64_19.0.0/727453fb3a62f7f1d952a41e051ca8a6f88cadc45cee43c6a4d1aa45f9b75665.wasmer-v7 +0 -0
  4. package/.swc/plugins/{v7_linux_x86_64_13.0.0/fce1bdb8e20a094e4af08bad09cc81497ed0e2e7c51223b07d371063cca18429 → linux_x86_64_19.0.0/fce1bdb8e20a094e4af08bad09cc81497ed0e2e7c51223b07d371063cca18429.wasmer-v7} +0 -0
  5. package/dist/lib/browser/{app-graph-builder-BGGXLD6T.mjs → app-graph-builder-PSA3RESL.mjs} +31 -30
  6. package/dist/lib/browser/app-graph-builder-PSA3RESL.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-2636QSIK.mjs → chunk-2VZ4RF4A.mjs} +347 -257
  8. package/dist/lib/browser/chunk-2VZ4RF4A.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-DHZB7HG7.mjs → chunk-CPVYIS24.mjs} +172 -134
  10. package/dist/lib/browser/chunk-CPVYIS24.mjs.map +7 -0
  11. package/dist/lib/browser/{chunk-ORWHM7CO.mjs → chunk-SCPE4ZO2.mjs} +11 -8
  12. package/dist/lib/browser/chunk-SCPE4ZO2.mjs.map +7 -0
  13. package/dist/lib/browser/index.mjs +20 -28
  14. package/dist/lib/browser/index.mjs.map +3 -3
  15. package/dist/lib/browser/{intent-dispatcher-TWKB22NI.mjs → intent-dispatcher-BND6IF4U.mjs} +2 -2
  16. package/dist/lib/browser/{intent-resolver-O67UANYP.mjs → intent-resolver-27FJAJDE.mjs} +7 -7
  17. package/dist/lib/browser/intent-resolver-27FJAJDE.mjs.map +7 -0
  18. package/dist/lib/browser/meta.json +1 -1
  19. package/dist/lib/browser/{store-LFKDWHUQ.mjs → store-F545UOIR.mjs} +4 -4
  20. package/dist/lib/browser/{store-LFKDWHUQ.mjs.map → store-F545UOIR.mjs.map} +2 -2
  21. package/dist/lib/browser/testing/index.mjs +17 -21
  22. package/dist/lib/browser/testing/index.mjs.map +3 -3
  23. package/dist/lib/browser/worker.mjs +7 -9
  24. package/dist/lib/node-esm/{app-graph-builder-QHIJUYYW.mjs → app-graph-builder-VJGZ6KH7.mjs} +31 -30
  25. package/dist/lib/node-esm/app-graph-builder-VJGZ6KH7.mjs.map +7 -0
  26. package/dist/lib/node-esm/{chunk-VSKRV3NW.mjs → chunk-3RRWO5TD.mjs} +347 -257
  27. package/dist/lib/node-esm/chunk-3RRWO5TD.mjs.map +7 -0
  28. package/dist/lib/node-esm/{chunk-NJAFK626.mjs → chunk-MN37WUJ2.mjs} +172 -134
  29. package/dist/lib/node-esm/chunk-MN37WUJ2.mjs.map +7 -0
  30. package/dist/lib/node-esm/{chunk-UMZQERLE.mjs → chunk-ZX63QUGE.mjs} +11 -8
  31. package/dist/lib/node-esm/chunk-ZX63QUGE.mjs.map +7 -0
  32. package/dist/lib/node-esm/index.mjs +20 -28
  33. package/dist/lib/node-esm/index.mjs.map +3 -3
  34. package/dist/lib/node-esm/{intent-dispatcher-5PRM3KGH.mjs → intent-dispatcher-254AZ6EE.mjs} +2 -2
  35. package/dist/lib/node-esm/{intent-resolver-K3D4BXQQ.mjs → intent-resolver-NPMOPNFL.mjs} +7 -7
  36. package/dist/lib/node-esm/intent-resolver-NPMOPNFL.mjs.map +7 -0
  37. package/dist/lib/node-esm/meta.json +1 -1
  38. package/dist/lib/node-esm/{store-53XDUBMD.mjs → store-CINC4R4L.mjs} +4 -4
  39. package/dist/lib/node-esm/{store-53XDUBMD.mjs.map → store-CINC4R4L.mjs.map} +2 -2
  40. package/dist/lib/node-esm/testing/index.mjs +17 -21
  41. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  42. package/dist/lib/node-esm/worker.mjs +7 -9
  43. package/dist/types/src/common/capabilities.d.ts +89 -10
  44. package/dist/types/src/common/capabilities.d.ts.map +1 -1
  45. package/dist/types/src/common/collaboration.d.ts +10 -9
  46. package/dist/types/src/common/collaboration.d.ts.map +1 -1
  47. package/dist/types/src/common/events.d.ts.map +1 -1
  48. package/dist/types/src/common/file.d.ts +1 -1
  49. package/dist/types/src/common/file.d.ts.map +1 -1
  50. package/dist/types/src/common/layout.d.ts +1 -3
  51. package/dist/types/src/common/layout.d.ts.map +1 -1
  52. package/dist/types/src/common/surface.d.ts +7 -13
  53. package/dist/types/src/common/surface.d.ts.map +1 -1
  54. package/dist/types/src/common/translations.d.ts +1 -1
  55. package/dist/types/src/common/translations.d.ts.map +1 -1
  56. package/dist/types/src/components/App.d.ts +10 -0
  57. package/dist/types/src/components/App.d.ts.map +1 -0
  58. package/dist/types/src/components/App.stories.d.ts +14 -0
  59. package/dist/types/src/components/App.stories.d.ts.map +1 -0
  60. package/dist/types/src/components/DefaultFallback.d.ts +8 -0
  61. package/dist/types/src/components/DefaultFallback.d.ts.map +1 -0
  62. package/dist/types/src/components/index.d.ts +2 -0
  63. package/dist/types/src/components/index.d.ts.map +1 -0
  64. package/dist/types/src/{App.d.ts → components/useApp.d.ts} +7 -6
  65. package/dist/types/src/components/useApp.d.ts.map +1 -0
  66. package/dist/types/src/components/useLoading.d.ts +19 -0
  67. package/dist/types/src/components/useLoading.d.ts.map +1 -0
  68. package/dist/types/src/core/capabilities.d.ts +7 -4
  69. package/dist/types/src/core/capabilities.d.ts.map +1 -1
  70. package/dist/types/src/core/manager.d.ts +6 -2
  71. package/dist/types/src/core/manager.d.ts.map +1 -1
  72. package/dist/types/src/core/plugin.d.ts +8 -1
  73. package/dist/types/src/core/plugin.d.ts.map +1 -1
  74. package/dist/types/src/index.d.ts +1 -1
  75. package/dist/types/src/index.d.ts.map +1 -1
  76. package/dist/types/src/playground/debug/Debug.d.ts +1 -1
  77. package/dist/types/src/playground/debug/plugin.d.ts +1 -1
  78. package/dist/types/src/playground/debug/plugin.d.ts.map +1 -1
  79. package/dist/types/src/playground/generator/Main.d.ts +1 -1
  80. package/dist/types/src/playground/generator/Toolbar.d.ts +1 -1
  81. package/dist/types/src/playground/generator/Toolbar.d.ts.map +1 -1
  82. package/dist/types/src/playground/generator/generator.d.ts +1 -1
  83. package/dist/types/src/playground/generator/generator.d.ts.map +1 -1
  84. package/dist/types/src/playground/generator/plugin.d.ts +1 -1
  85. package/dist/types/src/playground/generator/plugin.d.ts.map +1 -1
  86. package/dist/types/src/playground/layout/Layout.d.ts +2 -2
  87. package/dist/types/src/playground/layout/plugin.d.ts +1 -1
  88. package/dist/types/src/playground/layout/plugin.d.ts.map +1 -1
  89. package/dist/types/src/playground/logger/Toolbar.d.ts +1 -1
  90. package/dist/types/src/playground/logger/Toolbar.d.ts.map +1 -1
  91. package/dist/types/src/playground/logger/plugin.d.ts +1 -1
  92. package/dist/types/src/playground/logger/plugin.d.ts.map +1 -1
  93. package/dist/types/src/playground/logger/schema.d.ts +1 -1
  94. package/dist/types/src/playground/logger/schema.d.ts.map +1 -1
  95. package/dist/types/src/playground/playground.stories.d.ts +5 -4
  96. package/dist/types/src/playground/playground.stories.d.ts.map +1 -1
  97. package/dist/types/src/plugin-intent/IntentPlugin.d.ts +1 -1
  98. package/dist/types/src/plugin-intent/IntentPlugin.d.ts.map +1 -1
  99. package/dist/types/src/plugin-intent/actions.d.ts +5 -7
  100. package/dist/types/src/plugin-intent/actions.d.ts.map +1 -1
  101. package/dist/types/src/plugin-intent/errors.d.ts.map +1 -1
  102. package/dist/types/src/plugin-intent/index.d.ts +1 -0
  103. package/dist/types/src/plugin-intent/index.d.ts.map +1 -1
  104. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +7 -7
  105. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -1
  106. package/dist/types/src/plugin-intent/intent.d.ts +1 -1
  107. package/dist/types/src/plugin-intent/intent.d.ts.map +1 -1
  108. package/dist/types/src/plugin-intent/meta.d.ts +3 -0
  109. package/dist/types/src/plugin-intent/meta.d.ts.map +1 -0
  110. package/dist/types/src/plugin-settings/SettingsPlugin.d.ts +1 -1
  111. package/dist/types/src/plugin-settings/SettingsPlugin.d.ts.map +1 -1
  112. package/dist/types/src/plugin-settings/actions.d.ts +5 -7
  113. package/dist/types/src/plugin-settings/actions.d.ts.map +1 -1
  114. package/dist/types/src/plugin-settings/app-graph-builder.d.ts +1 -1
  115. package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +1 -1
  116. package/dist/types/src/plugin-settings/intent-resolver.d.ts +1 -1
  117. package/dist/types/src/plugin-settings/intent-resolver.d.ts.map +1 -1
  118. package/dist/types/src/plugin-settings/meta.d.ts +3 -0
  119. package/dist/types/src/plugin-settings/meta.d.ts.map +1 -0
  120. package/dist/types/src/plugin-settings/store.d.ts +1 -1
  121. package/dist/types/src/plugin-settings/store.d.ts.map +1 -1
  122. package/dist/types/src/plugin-settings/translations.d.ts +2 -1
  123. package/dist/types/src/plugin-settings/translations.d.ts.map +1 -1
  124. package/dist/types/src/react/ErrorBoundary.d.ts +13 -14
  125. package/dist/types/src/react/ErrorBoundary.d.ts.map +1 -1
  126. package/dist/types/src/react/IntentContext.d.ts.map +1 -1
  127. package/dist/types/src/react/Surface.d.ts +2 -2
  128. package/dist/types/src/react/Surface.d.ts.map +1 -1
  129. package/dist/types/src/react/Surface.stories.d.ts +6 -5
  130. package/dist/types/src/react/Surface.stories.d.ts.map +1 -1
  131. package/dist/types/src/react/common.d.ts.map +1 -1
  132. package/dist/types/src/react/useCapabilities.d.ts.map +1 -1
  133. package/dist/types/src/testing/withPluginManager.d.ts +9 -8
  134. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
  135. package/dist/types/src/testing/withPluginManager.stories.d.ts +9 -3
  136. package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
  137. package/dist/types/tsconfig.tsbuildinfo +1 -1
  138. package/moon.yml +4 -0
  139. package/package.json +34 -29
  140. package/src/common/capabilities.ts +117 -13
  141. package/src/common/collaboration.ts +6 -9
  142. package/src/common/events.ts +3 -1
  143. package/src/common/file.ts +1 -1
  144. package/src/common/layout.ts +3 -4
  145. package/src/common/surface.ts +15 -18
  146. package/src/common/translations.ts +1 -1
  147. package/src/components/App.stories.tsx +33 -0
  148. package/src/components/App.tsx +59 -0
  149. package/src/components/DefaultFallback.tsx +26 -0
  150. package/src/components/index.ts +5 -0
  151. package/src/{App.tsx → components/useApp.tsx} +24 -136
  152. package/src/components/useLoading.tsx +70 -0
  153. package/src/core/capabilities.test.ts +2 -2
  154. package/src/core/capabilities.ts +18 -9
  155. package/src/core/manager.test.ts +22 -21
  156. package/src/core/manager.ts +139 -54
  157. package/src/core/plugin.ts +13 -2
  158. package/src/helpers.test.ts +1 -1
  159. package/src/index.ts +1 -1
  160. package/src/playground/debug/Debug.tsx +1 -1
  161. package/src/playground/debug/plugin.ts +7 -8
  162. package/src/playground/generator/Toolbar.tsx +2 -1
  163. package/src/playground/generator/generator.ts +4 -4
  164. package/src/playground/generator/plugin.ts +12 -13
  165. package/src/playground/layout/plugin.ts +10 -9
  166. package/src/playground/logger/Toolbar.tsx +2 -1
  167. package/src/playground/logger/plugin.ts +30 -25
  168. package/src/playground/logger/schema.ts +1 -1
  169. package/src/playground/playground.stories.tsx +20 -16
  170. package/src/plugin-intent/IntentPlugin.ts +13 -13
  171. package/src/plugin-intent/actions.ts +4 -6
  172. package/src/plugin-intent/errors.ts +2 -1
  173. package/src/plugin-intent/index.ts +1 -0
  174. package/src/plugin-intent/intent-dispatcher.test.ts +10 -3
  175. package/src/plugin-intent/intent-dispatcher.ts +16 -12
  176. package/src/plugin-intent/intent.ts +1 -1
  177. package/src/plugin-intent/meta.ts +10 -0
  178. package/src/plugin-settings/SettingsPlugin.ts +27 -28
  179. package/src/plugin-settings/actions.ts +9 -13
  180. package/src/plugin-settings/app-graph-builder.ts +20 -17
  181. package/src/plugin-settings/intent-resolver.ts +5 -4
  182. package/src/plugin-settings/meta.ts +10 -0
  183. package/src/plugin-settings/store.ts +1 -1
  184. package/src/plugin-settings/translations.ts +3 -3
  185. package/src/react/ErrorBoundary.tsx +26 -15
  186. package/src/react/IntentContext.tsx +3 -2
  187. package/src/react/Surface.stories.tsx +23 -18
  188. package/src/react/Surface.tsx +14 -5
  189. package/src/react/common.ts +2 -1
  190. package/src/react/useCapabilities.ts +2 -1
  191. package/src/testing/withPluginManager.stories.tsx +9 -5
  192. package/src/testing/withPluginManager.tsx +33 -32
  193. package/tsconfig.json +6 -10
  194. package/vitest.config.ts +8 -6
  195. package/.eslintrc.cjs +0 -9
  196. package/.swc/plugins/v7_linux_x86_64_13.0.0/f45bdff002284d9e8f9ef3f0be909de12da36c049cbcf261ac78fc00abb09a2d +0 -0
  197. package/dist/lib/browser/app-graph-builder-BGGXLD6T.mjs.map +0 -7
  198. package/dist/lib/browser/chunk-2636QSIK.mjs.map +0 -7
  199. package/dist/lib/browser/chunk-DHZB7HG7.mjs.map +0 -7
  200. package/dist/lib/browser/chunk-ORWHM7CO.mjs.map +0 -7
  201. package/dist/lib/browser/intent-resolver-O67UANYP.mjs.map +0 -7
  202. package/dist/lib/node-esm/app-graph-builder-QHIJUYYW.mjs.map +0 -7
  203. package/dist/lib/node-esm/chunk-NJAFK626.mjs.map +0 -7
  204. package/dist/lib/node-esm/chunk-UMZQERLE.mjs.map +0 -7
  205. package/dist/lib/node-esm/chunk-VSKRV3NW.mjs.map +0 -7
  206. package/dist/lib/node-esm/intent-resolver-K3D4BXQQ.mjs.map +0 -7
  207. package/dist/types/src/App.d.ts.map +0 -1
  208. package/typedoc/.nojekyll +0 -1
  209. package/typedoc/assets/hierarchy.js +0 -1
  210. package/typedoc/assets/highlight.css +0 -106
  211. package/typedoc/assets/icons.js +0 -18
  212. package/typedoc/assets/icons.svg +0 -1
  213. package/typedoc/assets/main.js +0 -60
  214. package/typedoc/assets/navigation.js +0 -1
  215. package/typedoc/assets/search.js +0 -1
  216. package/typedoc/assets/style.css +0 -1640
  217. package/typedoc/classes/CollaborationActions.InsertContent.html +0 -421
  218. package/typedoc/classes/ErrorBoundary.html +0 -125
  219. package/typedoc/classes/IntentAction.ShowUndo.html +0 -227
  220. package/typedoc/classes/IntentAction.Track.html +0 -266
  221. package/typedoc/classes/LayoutAction.AddToast.html +0 -265
  222. package/typedoc/classes/LayoutAction.Close.html +0 -382
  223. package/typedoc/classes/LayoutAction.Expose.html +0 -265
  224. package/typedoc/classes/LayoutAction.Open.html +0 -1123
  225. package/typedoc/classes/LayoutAction.RevertWorkspace.html +0 -343
  226. package/typedoc/classes/LayoutAction.ScrollIntoView.html +0 -460
  227. package/typedoc/classes/LayoutAction.Set.html +0 -460
  228. package/typedoc/classes/LayoutAction.SetLayoutMode.html +0 -499
  229. package/typedoc/classes/LayoutAction.SwitchWorkspace.html +0 -265
  230. package/typedoc/classes/LayoutAction.UpdateComplementary.html +0 -616
  231. package/typedoc/classes/LayoutAction.UpdateDialog.html +0 -1123
  232. package/typedoc/classes/LayoutAction.UpdateLayout.html +0 -461
  233. package/typedoc/classes/LayoutAction.UpdatePopover.html +0 -1435
  234. package/typedoc/classes/LayoutAction.UpdateSidebar.html +0 -616
  235. package/typedoc/classes/Plugin.html +0 -6
  236. package/typedoc/classes/PluginContext.html +0 -38
  237. package/typedoc/classes/PluginManager.html +0 -43
  238. package/typedoc/classes/PluginModule.html +0 -18
  239. package/typedoc/classes/SettingsAction.Open.html +0 -226
  240. package/typedoc/classes/SettingsAction.OpenPluginRegistry.html +0 -265
  241. package/typedoc/functions/Events.createStateEvent.html +0 -2
  242. package/typedoc/functions/IntentPlugin.html +0 -1
  243. package/typedoc/functions/SettingsPlugin.html +0 -1
  244. package/typedoc/functions/allOf.html +0 -2
  245. package/typedoc/functions/chain.html +0 -3
  246. package/typedoc/functions/contributes.html +0 -2
  247. package/typedoc/functions/createDispatcher.html +0 -3
  248. package/typedoc/functions/createIntent.html +0 -6
  249. package/typedoc/functions/createResolver.html +0 -2
  250. package/typedoc/functions/createSurface.html +0 -2
  251. package/typedoc/functions/defineCapability.html +0 -2
  252. package/typedoc/functions/defineEvent.html +0 -2
  253. package/typedoc/functions/defineModule.html +0 -2
  254. package/typedoc/functions/definePlugin.html +0 -2
  255. package/typedoc/functions/eventKey.html +0 -2
  256. package/typedoc/functions/getEvents.html +0 -2
  257. package/typedoc/functions/isAllOf.html +0 -2
  258. package/typedoc/functions/isOneOf.html +0 -2
  259. package/typedoc/functions/isSurfaceAvailable.html +0 -2
  260. package/typedoc/functions/lazy.html +0 -2
  261. package/typedoc/functions/oneOf.html +0 -2
  262. package/typedoc/functions/useApp.html +0 -6
  263. package/typedoc/functions/useAppGraph.html +0 -1
  264. package/typedoc/functions/useCapabilities.html +0 -3
  265. package/typedoc/functions/useCapability.html +0 -4
  266. package/typedoc/functions/useIntentDispatcher.html +0 -1
  267. package/typedoc/functions/useIntentResolver.html +0 -1
  268. package/typedoc/functions/useLayout.html +0 -1
  269. package/typedoc/functions/usePluginManager.html +0 -2
  270. package/typedoc/hierarchy.html +0 -1
  271. package/typedoc/index.html +0 -12
  272. package/typedoc/interfaces/LayoutAction.Toast.html +0 -10
  273. package/typedoc/media/LICENSE +0 -8
  274. package/typedoc/modules/Capabilities.html +0 -1
  275. package/typedoc/modules/CollaborationActions.html +0 -1
  276. package/typedoc/modules/Events.html +0 -1
  277. package/typedoc/modules/IntentAction.html +0 -1
  278. package/typedoc/modules/LayoutAction.html +0 -2
  279. package/typedoc/modules/SettingsAction.html +0 -1
  280. package/typedoc/modules.html +0 -1
  281. package/typedoc/types/ActivationEvent.html +0 -8
  282. package/typedoc/types/ActivationEvents.html +0 -2
  283. package/typedoc/types/AnyCapability.html +0 -1
  284. package/typedoc/types/AnyIntent.html +0 -1
  285. package/typedoc/types/AnyIntentChain.html +0 -1
  286. package/typedoc/types/AnyIntentEffectResult.html +0 -1
  287. package/typedoc/types/AnyIntentResolver.html +0 -1
  288. package/typedoc/types/AnyIntentResult.html +0 -1
  289. package/typedoc/types/Capabilities.FileUploader.html +0 -1
  290. package/typedoc/types/Capabilities.IntentResolver.html +0 -1
  291. package/typedoc/types/Capabilities.Layout.html +0 -1
  292. package/typedoc/types/Capabilities.Metadata.html +0 -1
  293. package/typedoc/types/Capabilities.ReactContext.html +0 -1
  294. package/typedoc/types/Capabilities.ReactRoot.html +0 -1
  295. package/typedoc/types/Capabilities.ReactSurface.html +0 -1
  296. package/typedoc/types/Capabilities.Settings.html +0 -4
  297. package/typedoc/types/Capability.html +0 -9
  298. package/typedoc/types/CreateAppOptions.html +0 -10
  299. package/typedoc/types/FileInfo.html +0 -1
  300. package/typedoc/types/Intent.html +0 -10
  301. package/typedoc/types/IntentChain.html +0 -6
  302. package/typedoc/types/IntentContext.html +0 -5
  303. package/typedoc/types/IntentData.html +0 -1
  304. package/typedoc/types/IntentDispatcher.html +0 -2
  305. package/typedoc/types/IntentDispatcherResult.html +0 -2
  306. package/typedoc/types/IntentEffectDefinition.html +0 -2
  307. package/typedoc/types/IntentEffectResult.html +0 -15
  308. package/typedoc/types/IntentParams.html +0 -3
  309. package/typedoc/types/IntentResolver.html +0 -2
  310. package/typedoc/types/IntentResultData.html +0 -1
  311. package/typedoc/types/IntentSchema.html +0 -1
  312. package/typedoc/types/IntentUndo.html +0 -2
  313. package/typedoc/types/InterfaceDef.html +0 -4
  314. package/typedoc/types/Label.html +0 -1
  315. package/typedoc/types/NodeSerializer.html +0 -8
  316. package/typedoc/types/PluginManagerOptions.html +0 -6
  317. package/typedoc/types/PluginMeta.html +0 -21
  318. package/typedoc/types/PromiseIntentDispatcher.html +0 -2
  319. package/typedoc/types/PromiseIntentUndo.html +0 -2
  320. package/typedoc/types/Resource.html +0 -1
  321. package/typedoc/types/ResourceKey.html +0 -1
  322. package/typedoc/types/ResourceLanguage.html +0 -1
  323. package/typedoc/types/SerializedNode.html +0 -4
  324. package/typedoc/types/SurfaceComponent.html +0 -2
  325. package/typedoc/types/SurfaceDefinition.html +0 -2
  326. package/typedoc/types/SurfaceProps.html +0 -4
  327. package/typedoc/variables/Capabilities.AnchorSort.html +0 -1
  328. package/typedoc/variables/Capabilities.AppGraph.html +0 -1
  329. package/typedoc/variables/Capabilities.AppGraphBuilder.html +0 -1
  330. package/typedoc/variables/Capabilities.AppGraphSerializer.html +0 -1
  331. package/typedoc/variables/Capabilities.ArtifactDefinition.html +0 -1
  332. package/typedoc/variables/Capabilities.FileUploader.html +0 -1
  333. package/typedoc/variables/Capabilities.IntentDispatcher.html +0 -1
  334. package/typedoc/variables/Capabilities.IntentResolver.html +0 -1
  335. package/typedoc/variables/Capabilities.Layout.html +0 -1
  336. package/typedoc/variables/Capabilities.Metadata.html +0 -1
  337. package/typedoc/variables/Capabilities.Null.html +0 -1
  338. package/typedoc/variables/Capabilities.PluginManager.html +0 -1
  339. package/typedoc/variables/Capabilities.ReactContext.html +0 -1
  340. package/typedoc/variables/Capabilities.ReactRoot.html +0 -1
  341. package/typedoc/variables/Capabilities.ReactSurface.html +0 -1
  342. package/typedoc/variables/Capabilities.RxRegistry.html +0 -1
  343. package/typedoc/variables/Capabilities.Settings.html +0 -1
  344. package/typedoc/variables/Capabilities.SettingsStore.html +0 -1
  345. package/typedoc/variables/Capabilities.Tools.html +0 -1
  346. package/typedoc/variables/Capabilities.Translations.html +0 -1
  347. package/typedoc/variables/Events.AppGraphReady.html +0 -2
  348. package/typedoc/variables/Events.DispatcherReady.html +0 -2
  349. package/typedoc/variables/Events.LayoutReady.html +0 -1
  350. package/typedoc/variables/Events.SettingsReady.html +0 -2
  351. package/typedoc/variables/Events.SetupAppGraph.html +0 -2
  352. package/typedoc/variables/Events.SetupArtifactDefinition.html +0 -2
  353. package/typedoc/variables/Events.SetupIntentResolver.html +0 -2
  354. package/typedoc/variables/Events.SetupMetadata.html +0 -2
  355. package/typedoc/variables/Events.SetupReactSurface.html +0 -2
  356. package/typedoc/variables/Events.SetupSettings.html +0 -2
  357. package/typedoc/variables/Events.SetupTranslations.html +0 -2
  358. package/typedoc/variables/Events.Startup.html +0 -2
  359. package/typedoc/variables/FileInfoSchema.html +0 -1
  360. package/typedoc/variables/INTENT_ACTION.html +0 -1
  361. package/typedoc/variables/INTENT_PLUGIN.html +0 -1
  362. package/typedoc/variables/LAYOUT_ACTION.html +0 -1
  363. package/typedoc/variables/LAYOUT_PLUGIN.html +0 -1
  364. package/typedoc/variables/Label.html +0 -1
  365. package/typedoc/variables/LayoutAction.Toast.html +0 -1
  366. package/typedoc/variables/LayoutAction.UPDATE_LAYOUT.html +0 -1
  367. package/typedoc/variables/PluginManagerProvider.html +0 -2
  368. package/typedoc/variables/Resource.html +0 -2
  369. package/typedoc/variables/ResourceKey.html +0 -1
  370. package/typedoc/variables/ResourceLanguage.html +0 -1
  371. package/typedoc/variables/SETTINGS_ACTION.html +0 -1
  372. package/typedoc/variables/SETTINGS_ID.html +0 -1
  373. package/typedoc/variables/SETTINGS_KEY.html +0 -1
  374. package/typedoc/variables/SETTINGS_PLUGIN.html +0 -1
  375. package/typedoc/variables/Surface.html +0 -2
  376. package/typedoc/variables/defaultFileTypes.html +0 -1
  377. /package/dist/lib/browser/{intent-dispatcher-TWKB22NI.mjs.map → intent-dispatcher-BND6IF4U.mjs.map} +0 -0
  378. /package/dist/lib/node-esm/{intent-dispatcher-5PRM3KGH.mjs.map → intent-dispatcher-254AZ6EE.mjs.map} +0 -0
@@ -1,17 +1,16 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
  import {
3
+ BaseError,
3
4
  Capabilities,
4
5
  CollaborationActions,
6
+ CycleDetectedError,
5
7
  Events,
6
8
  FileInfoSchema,
7
- INTENT_ACTION,
8
- INTENT_PLUGIN,
9
9
  IntentAction,
10
10
  IntentPlugin,
11
- LAYOUT_ACTION,
12
- LAYOUT_PLUGIN,
13
11
  Label,
14
12
  LayoutAction,
13
+ NoResolversError,
15
14
  Plugin,
16
15
  PluginContext,
17
16
  PluginManager,
@@ -37,20 +36,19 @@ import {
37
36
  isOneOf,
38
37
  lazy,
39
38
  oneOf
40
- } from "./chunk-VSKRV3NW.mjs";
39
+ } from "./chunk-3RRWO5TD.mjs";
41
40
  export {
41
+ BaseError,
42
42
  Capabilities,
43
43
  CollaborationActions,
44
+ CycleDetectedError,
44
45
  Events,
45
46
  FileInfoSchema,
46
- INTENT_ACTION,
47
- INTENT_PLUGIN,
48
47
  IntentAction,
49
48
  IntentPlugin,
50
- LAYOUT_ACTION,
51
- LAYOUT_PLUGIN,
52
49
  Label,
53
50
  LayoutAction,
51
+ NoResolversError,
54
52
  Plugin,
55
53
  PluginContext,
56
54
  PluginManager,
@@ -1,26 +1,43 @@
1
+ import type * as Tool from '@effect/ai/Tool';
2
+ import type * as Toolkit from '@effect/ai/Toolkit';
1
3
  import { type Registry } from '@effect-rx/rx-react';
2
- import { type Schema } from 'effect';
4
+ import type * as Layer from 'effect/Layer';
5
+ import type * as Schema from 'effect/Schema';
3
6
  import { type FC, type PropsWithChildren } from 'react';
4
- import { type ExecutableTool } from '@dxos/ai';
5
- import { type GraphBuilder, type BuilderExtensions } from '@dxos/app-graph';
6
- import { type ArtifactDefinition } from '@dxos/artifact';
7
+ import { type AiService } from '@dxos/ai';
8
+ import type * as AiServiceRouter from '@dxos/ai/AiServiceRouter';
9
+ import { type BuilderExtensions, type GraphBuilder } from '@dxos/app-graph';
10
+ import { type Blueprint } from '@dxos/blueprints';
7
11
  import { type Space } from '@dxos/client-protocol';
12
+ import { type FunctionDefinition } from '@dxos/functions';
8
13
  import { type RootSettingsStore } from '@dxos/local-storage';
9
14
  import { type AnchoredTo } from '@dxos/schema';
15
+ import { type PluginManager } from '../core';
16
+ import { type AnyIntentResolver, type IntentContext } from '../plugin-intent';
10
17
  import { type FileInfo } from './file';
11
18
  import { type NodeSerializer } from './graph';
12
19
  import { type SurfaceDefinition } from './surface';
13
- import { type PluginManager } from '../core';
14
- import { type AnyIntentResolver, type IntentContext } from '../plugin-intent';
15
20
  export declare namespace Capabilities {
16
- export const PluginManager: import("..").InterfaceDef<PluginManager>;
21
+ /**
22
+ * @category Capability
23
+ */
17
24
  export const Null: import("..").InterfaceDef<null>;
25
+ /**
26
+ * @category Capability
27
+ */
28
+ export const PluginManager: import("..").InterfaceDef<PluginManager>;
29
+ /**
30
+ * @category Capability
31
+ */
18
32
  export const RxRegistry: import("..").InterfaceDef<Registry.Registry>;
19
33
  export type ReactContext = Readonly<{
20
34
  id: string;
21
35
  dependsOn?: string[];
22
36
  context: FC<PropsWithChildren>;
23
37
  }>;
38
+ /**
39
+ * @category Capability
40
+ */
24
41
  export const ReactContext: import("..").InterfaceDef<Readonly<{
25
42
  id: string;
26
43
  dependsOn?: string[];
@@ -30,14 +47,26 @@ export declare namespace Capabilities {
30
47
  id: string;
31
48
  root: FC<PropsWithChildren>;
32
49
  }>;
50
+ /**
51
+ * @category Capability
52
+ */
33
53
  export const ReactRoot: import("..").InterfaceDef<Readonly<{
34
54
  id: string;
35
55
  root: FC<PropsWithChildren>;
36
56
  }>>;
37
57
  export type ReactSurface = SurfaceDefinition | readonly SurfaceDefinition[];
58
+ /**
59
+ * @category Capability
60
+ */
38
61
  export const ReactSurface: import("..").InterfaceDef<ReactSurface>;
39
62
  export type IntentResolver = AnyIntentResolver | readonly AnyIntentResolver[];
63
+ /**
64
+ * @category Capability
65
+ */
40
66
  export const IntentResolver: import("..").InterfaceDef<IntentResolver>;
67
+ /**
68
+ * @category Capability
69
+ */
41
70
  export const IntentDispatcher: import("..").InterfaceDef<IntentContext>;
42
71
  export type Layout = Readonly<{
43
72
  mode: string;
@@ -61,6 +90,9 @@ export declare namespace Capabilities {
61
90
  */
62
91
  scrollIntoView: string | undefined;
63
92
  }>;
93
+ /**
94
+ * @category Capability
95
+ */
64
96
  export const Layout: import("..").InterfaceDef<Readonly<{
65
97
  mode: string;
66
98
  dialogOpen: boolean;
@@ -83,6 +115,9 @@ export declare namespace Capabilities {
83
115
  */
84
116
  scrollIntoView: string | undefined;
85
117
  }>>;
118
+ /**
119
+ * @category Capability
120
+ */
86
121
  export const Translations: import("..").InterfaceDef<readonly {
87
122
  readonly [x: string]: {
88
123
  readonly [x: string]: string | {
@@ -90,32 +125,76 @@ export declare namespace Capabilities {
90
125
  };
91
126
  };
92
127
  }[]>;
128
+ /**
129
+ * @category Capability
130
+ */
93
131
  export const AppGraph: import("..").InterfaceDef<Readonly<Pick<GraphBuilder, "graph" | "explore">>>;
132
+ /**
133
+ * @category Capability
134
+ */
94
135
  export const AppGraphBuilder: import("..").InterfaceDef<BuilderExtensions>;
136
+ /**
137
+ * @category Capability
138
+ */
95
139
  export const AppGraphSerializer: import("..").InterfaceDef<NodeSerializer[]>;
140
+ /**
141
+ * @category Capability
142
+ */
96
143
  export const SettingsStore: import("..").InterfaceDef<RootSettingsStore>;
97
144
  export type Settings = {
98
145
  prefix: string;
99
146
  schema: Schema.Schema.All;
100
147
  value?: Record<string, any>;
101
148
  };
149
+ /**
150
+ * @category Capability
151
+ */
102
152
  export const Settings: import("..").InterfaceDef<Settings>;
103
153
  export type Metadata = Readonly<{
104
154
  id: string;
105
155
  metadata: Record<string, any>;
106
156
  }>;
157
+ /**
158
+ * @category Capability
159
+ */
107
160
  export const Metadata: import("..").InterfaceDef<Readonly<{
108
161
  id: string;
109
162
  metadata: Record<string, any>;
110
163
  }>>;
111
- export const Tools: import("..").InterfaceDef<ExecutableTool[]>;
112
- export const ArtifactDefinition: import("..").InterfaceDef<ArtifactDefinition>;
113
- export type FileUploader = (file: File, space: Space) => Promise<FileInfo | undefined>;
164
+ /**
165
+ * @category Capability
166
+ */
167
+ export const Toolkit: import("..").InterfaceDef<Toolkit.Any>;
168
+ /**
169
+ * @category Capability
170
+ */
171
+ export const ToolkitHandler: import("..").InterfaceDef<Layer.Layer<Tool.Handler<any>, never, never>>;
172
+ /**
173
+ * @category Capability
174
+ */
175
+ export const BlueprintDefinition: import("..").InterfaceDef<Blueprint.Blueprint>;
176
+ export type AiServiceLayer = Layer.Layer<AiService.AiService>;
177
+ export const AiServiceLayer: import("..").InterfaceDef<AiServiceLayer>;
178
+ /**
179
+ * Plugins can contribute them to provide model resolvers.
180
+ */
181
+ export const AiModelResolver: import("..").InterfaceDef<Layer.Layer<AiServiceRouter.AiModelResolver, never, never>>;
182
+ /**
183
+ * @category Capability
184
+ */
185
+ export const Functions: import("..").InterfaceDef<FunctionDefinition<any, any>[]>;
186
+ export type FileUploader = (space: Space, file: File) => Promise<FileInfo | undefined>;
187
+ /**
188
+ * @category Capability
189
+ */
114
190
  export const FileUploader: import("..").InterfaceDef<FileUploader>;
115
191
  type AnchorSort = {
116
192
  key: string;
117
193
  sort: (anchorA: AnchoredTo, anchorB: AnchoredTo) => number;
118
194
  };
195
+ /**
196
+ * @category Capability
197
+ */
119
198
  export const AnchorSort: import("..").InterfaceDef<AnchorSort>;
120
199
  export {};
121
200
  }
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/common/capabilities.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,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AC;IAEF;;OAEG;IACH,MAAM,CAAC,MAAM,UAAU,uCAAgF,CAAC;;CACzG"}
@@ -1,18 +1,19 @@
1
- import { Schema } from 'effect';
2
- import { Expando } from '@dxos/echo-schema';
1
+ import * as Schema from 'effect/Schema';
3
2
  export declare namespace CollaborationActions {
4
- const InsertContent_base: Schema.TaggedClass<InsertContent, "assistant/intent-content", {
5
- readonly _tag: Schema.tag<"assistant/intent-content">;
3
+ const AcceptProposal_base: Schema.TaggedClass<AcceptProposal, "collaboration/accept-proposal", {
4
+ readonly _tag: Schema.tag<"collaboration/accept-proposal">;
6
5
  } & {
7
6
  input: Schema.Struct<{
8
- target: Schema.Schema<Expando, Expando, never>;
9
- object: import("@dxos/echo-schema").Ref$<Expando>;
10
- at: Schema.optional<typeof Schema.String>;
11
- label: Schema.optional<typeof Schema.String>;
7
+ subject: typeof Schema.Any;
8
+ anchor: typeof Schema.String;
9
+ proposal: Schema.mutable<Schema.TaggedStruct<"proposal", {
10
+ pending: Schema.optional<typeof Schema.Boolean>;
11
+ text: typeof Schema.String;
12
+ }>>;
12
13
  }>;
13
14
  output: typeof Schema.Void;
14
15
  }>;
15
- export class InsertContent extends InsertContent_base {
16
+ export class AcceptProposal extends AcceptProposal_base {
16
17
  }
17
18
  export {};
18
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"collaboration.d.ts","sourceRoot":"","sources":["../../../../src/common/collaboration.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAO,MAAM,mBAAmB,CAAC;AAEjD,yBAAiB,oBAAoB,CAAC;;;;;;;;;;;;IACpC,MAAM,OAAO,aAAc,SAAQ,kBAUjC;KAAG;;CACN"}
1
+ {"version":3,"file":"collaboration.d.ts","sourceRoot":"","sources":["../../../../src/common/collaboration.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,yBAAiB,oBAAoB,CAAC;;;;;;;;;;;;;;IACpC,MAAM,OAAO,cAAe,SAAQ,mBAOlC;KAAG;;CACN"}
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/common/events.ts"],"names":[],"mappings":"AAOA,yBAAiB,MAAM,CAAC;IACtB;;OAEG;IACI,MAAM,OAAO,8BAAsD,CAAC;IAM3E;;OAEG;IACI,MAAM,iBAAiB,8BAAkE,CAAC;IAEjG;;OAEG;IACI,MAAM,aAAa,8BAA6D,CAAC;IAExF;;OAEG;IACI,MAAM,mBAAmB,8BAAoE,CAAC;IAErG;;OAEG;IACI,MAAM,aAAa,8BAA6D,CAAC;IAExF;;OAEG;IACI,MAAM,aAAa,8BAA0D,CAAC;IAErF;;OAEG;IACI,MAAM,iBAAiB,8BAAiE,CAAC;IAEhG;;OAEG;IACI,MAAM,uBAAuB,8BAAwE,CAAC;IAM7G;;OAEG;IACI,MAAM,eAAe,8BAA+D,CAAC;IAE5F;;OAEG;IACI,MAAM,aAAa,8BAA6D,CAAC;IAExF;;OAEG;IACI,MAAM,aAAa,8BAA0D,CAAC;IAErF;;OAEG;IACI,MAAM,gBAAgB,GAAI,WAAW,MAAM,iCAAiE,CAAC;IAC7G,MAAM,WAAW,8BAAmD,CAAC;CAC7E"}
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/common/events.ts"],"names":[],"mappings":"AAQA,yBAAiB,MAAM,CAAC;IACtB;;OAEG;IACI,MAAM,OAAO,8BAAsD,CAAC;IAM3E;;OAEG;IACI,MAAM,iBAAiB,8BAAkE,CAAC;IAEjG;;OAEG;IACI,MAAM,aAAa,8BAA6D,CAAC;IAExF;;OAEG;IACI,MAAM,mBAAmB,8BAAoE,CAAC;IAErG;;OAEG;IACI,MAAM,aAAa,8BAA6D,CAAC;IAExF;;OAEG;IACI,MAAM,aAAa,8BAA0D,CAAC;IAErF;;OAEG;IACI,MAAM,iBAAiB,8BAAiE,CAAC;IAEhG;;OAEG;IAEI,MAAM,uBAAuB,8BAAwE,CAAC;IAM7G;;OAEG;IACI,MAAM,eAAe,8BAA+D,CAAC;IAE5F;;OAEG;IACI,MAAM,aAAa,8BAA6D,CAAC;IAExF;;OAEG;IACI,MAAM,aAAa,8BAA0D,CAAC;IAErF;;OAEG;IACI,MAAM,gBAAgB,GAAI,WAAW,MAAM,iCAAiE,CAAC;IAC7G,MAAM,WAAW,8BAAmD,CAAC;CAC7E"}
@@ -1,4 +1,4 @@
1
- import { Schema } from 'effect';
1
+ import * as Schema from 'effect/Schema';
2
2
  export declare const defaultFileTypes: {
3
3
  images: string[];
4
4
  media: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../src/common/file.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIhC,eAAO,MAAM,gBAAgB;;;;CAI5B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;EAKzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,cAAc,CAAC,CAAC"}
1
+ {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../src/common/file.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,eAAO,MAAM,gBAAgB;;;;CAI5B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;EAKzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -1,6 +1,4 @@
1
- import { Schema } from 'effect';
2
- export declare const LAYOUT_PLUGIN = "dxos.org/plugin/layout";
3
- export declare const LAYOUT_ACTION = "dxos.org/plugin/layout/action";
1
+ import * as Schema from 'effect/Schema';
4
2
  /**
5
3
  * Expected payload for layout actions.
6
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","s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;;;;;;;;;IAEL,MAAM,OAAO,IAAK,SAAQ,SA4BxB;KAAG;;;;;;;;;;;;;IAEL,MAAM,OAAO,GAAI,SAAQ,QAWvB;KAAG;;;;;;;;;;;;;IAEL,MAAM,OAAO,KAAM,SAAQ,UASzB;KAAG;;;;;;;;;;;IAEL,MAAM,OAAO,cAAe,SAAQ,mBAWlC;KAAG;;;;;;;;;;IAEL,MAAM,OAAO,MAAO,SAAQ,WAM1B;KAAG;;CACN"}
@@ -1,10 +1,10 @@
1
- import { type JSX, type ForwardedRef, type PropsWithChildren, type ReactNode } from 'react';
1
+ import type { ComponentType, PropsWithChildren, ReactNode } from 'react';
2
2
  import { type GuardedType, type MakeOptional, type Position } from '@dxos/util';
3
3
  import { type ErrorBoundary } from '../react';
4
4
  /**
5
5
  * SurfaceProps are the props that are passed to the Surface component.
6
6
  */
7
- export type SurfaceProps<T extends Record<string, any> = Record<string, unknown>> = PropsWithChildren<{
7
+ export type SurfaceProps<T extends Record<string, any> = Record<string, unknown>> = {
8
8
  /**
9
9
  * If specified, the Surface will be wrapped in an error boundary.
10
10
  * The fallback component will be rendered if an error occurs.
@@ -15,14 +15,10 @@ export type SurfaceProps<T extends Record<string, any> = Record<string, unknown>
15
15
  * The placeholder component will be rendered while the surface component is loading.
16
16
  */
17
17
  placeholder?: ReactNode;
18
- }> & MakeOptional<CoreSurfaceProps<T>, 'id' | 'data'> & {
19
- /**
20
- * Additional props to pass to the component.
21
- * These props are not used by Surface itself but may be used by components which resolve the surface.
22
- */
23
- [key: string]: unknown;
18
+ } & MakeOptional<CoreSurfaceProps<T>, 'id' | 'data'> & {
19
+ [K in keyof Record<string, any>]: K extends keyof CoreSurfaceProps<T> | 'fallback' | 'placeholder' ? never : any;
24
20
  };
25
- type CoreSurfaceProps<T extends Record<string, any> = Record<string, unknown>> = {
21
+ type CoreSurfaceProps<T extends Record<string, any> = Record<string, unknown>> = PropsWithChildren<{
26
22
  /**
27
23
  * ID for debugging.
28
24
  */
@@ -39,14 +35,12 @@ type CoreSurfaceProps<T extends Record<string, any> = Record<string, unknown>> =
39
35
  * If more than one component is resolved, the limit determines how many are rendered.
40
36
  */
41
37
  limit?: number | undefined;
42
- };
43
- type SurfaceComponentProps<T extends Record<string, any> = Record<string, unknown>> = PropsWithChildren<CoreSurfaceProps<T> & {
44
- [key: string]: unknown;
45
38
  }>;
39
+ type SurfaceComponentProps<T extends Record<string, any> = Record<string, unknown>> = CoreSurfaceProps<T> & Record<string, any>;
46
40
  /**
47
41
  * React component used to render a surface once is has matched.
48
42
  */
49
- export type SurfaceComponent<T extends Record<string, any> = Record<string, unknown>> = (props: SurfaceComponentProps<T>, forwardedRef: ForwardedRef<HTMLElement>) => JSX.Element | null;
43
+ export type SurfaceComponent<T extends Record<string, any> = Record<string, unknown>> = ComponentType<SurfaceComponentProps<T>>;
50
44
  /**
51
45
  * Definition of when a SurfaceComponent should be rendered.
52
46
  */
@@ -1 +1 @@
1
- {"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../../../src/common/surface.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5F,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEhF,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,iBAAiB,CAAC;IACpG;;;OAGG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC;IAE9C;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,CAAC,GACA,YAAY,CAAC,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MAAM,aAAa,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAC/D,YAAY,iBAAiB,CAAC,CAAC,CAAC,KAC/B,iBAAiB,CAAC,CAAC,CAAe,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Schema } from 'effect';
1
+ import * as Schema from 'effect/Schema';
2
2
  export declare const ResourceKey: Schema.Union<[typeof Schema.String, Schema.Record$<typeof Schema.String, typeof Schema.Any>]>;
3
3
  export type ResourceKey = Schema.Schema.Type<typeof ResourceKey>;
4
4
  export declare const ResourceLanguage: Schema.Record$<typeof Schema.String, Schema.Union<[typeof Schema.String, Schema.Record$<typeof Schema.String, typeof Schema.Any>]>>;
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../../src/common/translations.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,eAAO,MAAM,WAAW,+FAAwF,CAAC;AACjH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC,CAAC;AAEjE,eAAO,MAAM,gBAAgB,qIAA4D,CAAC;AAC1F,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,QAAQ,2KAAiE,CAAC;AACvF,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../../src/common/translations.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,eAAO,MAAM,WAAW,+FAAwF,CAAC;AACjH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC,CAAC;AAEjE,eAAO,MAAM,gBAAgB,qIAA4D,CAAC;AAC1F,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,QAAQ,2KAAiE,CAAC;AACvF,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,QAAQ,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { type UseAppOptions } from './useApp';
3
+ export type AppProps = Pick<UseAppOptions, 'placeholder' | 'debounce'> & {
4
+ state: {
5
+ ready: boolean;
6
+ error: unknown;
7
+ };
8
+ };
9
+ export declare const App: ({ placeholder: Placeholder, state, debounce }: AppProps) => React.JSX.Element | null;
10
+ //# sourceMappingURL=App.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../../../src/components/App.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAiC,MAAM,OAAO,CAAC;AAMtD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,EAAE,aAAa,GAAG,UAAU,CAAC,GAAG;IACvE,KAAK,EAAE;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,GAAG,GAAI,+CAA+C,QAAQ,6BA2B1E,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { type StoryObj } from '@storybook/react-vite';
2
+ import React from 'react';
3
+ declare const meta: {
4
+ title: string;
5
+ render: () => React.JSX.Element;
6
+ decorators: import("@storybook/react").Decorator[];
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ //# sourceMappingURL=App.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"App.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/App.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,QAAA,MAAM,IAAI;;;;;;;CAOM,CAAC;AAEjB,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ /**
3
+ * NOTE: Default fallback should not use tailwind or theme.
4
+ */
5
+ export declare const DefaultFallback: ({ error }: {
6
+ error: Error;
7
+ }) => React.JSX.Element;
8
+ //# sourceMappingURL=DefaultFallback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultFallback.d.ts","sourceRoot":"","sources":["../../../../src/components/DefaultFallback.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,WAAW;IAAE,KAAK,EAAE,KAAK,CAAA;CAAE,sBAgB1D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './useApp';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import React, { type FC } from 'react';
2
- import { PluginManager, type PluginManagerOptions, type Plugin } from './core';
3
- import { ErrorBoundary } from './react';
4
- export type CreateAppOptions = {
2
+ import { type Plugin, PluginManager, type PluginManagerOptions } from '../core';
3
+ import { ErrorBoundary } from '../react';
4
+ export type UseAppOptions = {
5
5
  pluginManager?: PluginManager;
6
6
  pluginLoader?: PluginManagerOptions['pluginLoader'];
7
7
  plugins?: Plugin[];
@@ -13,6 +13,7 @@ export type CreateAppOptions = {
13
13
  fallback?: ErrorBoundary['props']['fallback'];
14
14
  cacheEnabled?: boolean;
15
15
  safeMode?: boolean;
16
+ debounce?: number;
16
17
  };
17
18
  /**
18
19
  * Expected usage is for this to be the entrypoint of the application.
@@ -23,7 +24,7 @@ export type CreateAppOptions = {
23
24
  * const core = [LayoutPluginId];
24
25
  * const default = [MyPluginId];
25
26
  * const fallback = <div>Initializing Plugins...</div>;
26
- * const App = createApp({ plugins, core, default, fallback });
27
+ * const App = useApp({ plugins, core, default, fallback });
27
28
  * createRoot(document.getElementById('root')!).render(
28
29
  * <StrictMode>
29
30
  * <App />
@@ -39,5 +40,5 @@ export type CreateAppOptions = {
39
40
  * @param params.cacheEnabled Whether to cache enabled plugins in localStorage.
40
41
  * @param params.safeMode Whether to enable safe mode, which disables optional plugins.
41
42
  */
42
- export declare const useApp: ({ pluginManager, pluginLoader: _pluginLoader, plugins: _plugins, core: _core, defaults: _defaults, placeholder, fallback, cacheEnabled, safeMode, }: CreateAppOptions) => () => React.JSX.Element;
43
- //# sourceMappingURL=App.d.ts.map
43
+ export declare const useApp: ({ pluginManager, pluginLoader: _pluginLoader, plugins: _plugins, core: _core, defaults: _defaults, placeholder, fallback, cacheEnabled, safeMode, debounce, }: UseAppOptions) => () => React.JSX.Element;
44
+ //# sourceMappingURL=useApp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useApp.d.ts","sourceRoot":"","sources":["../../../../src/components/useApp.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAmC,MAAM,OAAO,CAAC;AAOxE,OAAO,EAAE,KAAK,MAAM,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAChF,OAAO,EAAE,aAAa,EAAyB,MAAM,UAAU,CAAC;AAOhE,MAAM,MAAM,aAAa,GAAG;IAC1B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,YAAY,CAAC,EAAE,oBAAoB,CAAC,cAAc,CAAC,CAAC;IACpD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,EAAE,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC;IAC9C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,MAAM,GAAI,+JAWpB,aAAa,4BAwFf,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { type AppProps } from './App';
2
+ export declare enum LoadingState {
3
+ Loading = 0,
4
+ FadeIn = 1,
5
+ FadeOut = 2,
6
+ Done = 3
7
+ }
8
+ /**
9
+ * To avoid "flashing" the placeholder, we wait a period of time before starting the loading animation.
10
+ * If loading completes during this time the placehoder is not shown, otherwise is it displayed for a minimum period of time.
11
+ *
12
+ * States:
13
+ * 0: Loading - Wait for a period of time before starting the loading animation.
14
+ * 1: Fade-in - Display a loading animation.
15
+ * 2: Fade-out - Fade out the loading animation.
16
+ * 3: Done - Remove the placeholder.
17
+ */
18
+ export declare const useLoading: (state: AppProps["state"], debounce?: number) => LoadingState;
19
+ //# sourceMappingURL=useLoading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLoading.d.ts","sourceRoot":"","sources":["../../../../src/components/useLoading.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,oBAAY,YAAY;IACtB,OAAO,IAAI;IACX,MAAM,IAAI;IACV,OAAO,IAAI;IACX,IAAI,IAAI;CACT;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,QAAQ,CAAC,OAAO,CAAC,EAAE,iBAAY,iBA4ChE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { type Registry, Rx } from '@effect-rx/rx-react';
2
- import { Effect } from 'effect';
2
+ import * as Effect from 'effect/Effect';
3
3
  import { type MaybePromise } from '@dxos/util';
4
4
  import { type ActivationEvent } from './events';
5
5
  declare const InterfaceDefTypeId: unique symbol;
@@ -10,6 +10,9 @@ export type InterfaceDef<T> = {
10
10
  [InterfaceDefTypeId]: T;
11
11
  identifier: string;
12
12
  };
13
+ export declare namespace InterfaceDef {
14
+ type Implementation<I extends InterfaceDef<any>> = I extends InterfaceDef<infer T> ? T : never;
15
+ }
13
16
  /**
14
17
  * Helper to define the interface of a capability.
15
18
  */
@@ -22,11 +25,11 @@ export type Capability<T> = {
22
25
  /**
23
26
  * The interface definition of the capability.
24
27
  */
25
- interface: InterfaceDef<T>;
28
+ readonly interface: InterfaceDef<T>;
26
29
  /**
27
30
  * The implementation of the capability.
28
31
  */
29
- implementation: T;
32
+ readonly implementation: T;
30
33
  /**
31
34
  * Called when the capability is deactivated.
32
35
  */
@@ -41,7 +44,7 @@ type PluginsContextOptions = {
41
44
  /**
42
45
  * Helper to define the implementation of a capability.
43
46
  */
44
- export declare const contributes: <T>(interfaceDef: Capability<T>["interface"], implementation: Capability<T>["implementation"], deactivate?: Capability<T>["deactivate"]) => Capability<T>;
47
+ export declare const contributes: <I extends InterfaceDef<any>, T = InterfaceDef.Implementation<I>>(interfaceDef: I, implementation: T, deactivate?: Capability<InterfaceDef.Implementation<I>>["deactivate"]) => Capability<I>;
45
48
  type LoadCapability<T, U> = () => Promise<{
46
49
  default: (props: T) => MaybePromise<Capability<U>>;
47
50
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.d.ts","sourceRo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K,EAAE,EAAE,qBAAqB;IAkDhE;;;;;OAKG;IACH,YAAY,CAAC,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;IAK1D;;;;;;OAMG;IACH,UAAU,CAAC,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAKtD;;;OAGG;IACH,eAAe,CAAC,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;IAItD;;;;OAIG;IACH,aAAa,CAAC,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC;IAIlD;;;OAGG;IACG,iBAAiB,CAAC,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAiB/D,eAAe,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC;IAIzD,YAAY,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC;CAG7D"}
@@ -4,7 +4,7 @@ import { type Live } from '@dxos/live-object';
4
4
  import { type MaybePromise } from '@dxos/util';
5
5
  import { PluginContext } from './capabilities';
6
6
  import { type ActivationEvent } from './events';
7
- import { type PluginModule, type Plugin } from './plugin';
7
+ import { type Plugin, type PluginModule } from './plugin';
8
8
  export type PluginManagerOptions = {
9
9
  pluginLoader: (id: string) => MaybePromise<Plugin>;
10
10
  plugins?: Plugin[];
@@ -23,6 +23,9 @@ export declare class PluginManager {
23
23
  private readonly _state;
24
24
  private readonly _pluginLoader;
25
25
  private readonly _capabilities;
26
+ private readonly _moduleMemoMap;
27
+ private readonly _activatingEvents;
28
+ private readonly _activatingModules;
26
29
  constructor({ pluginLoader, plugins, core, enabled, registry, }: PluginManagerOptions);
27
30
  /**
28
31
  * Plugins that are currently registered.
@@ -114,7 +117,8 @@ export declare class PluginManager {
114
117
  private _getActiveModulesByEvent;
115
118
  private _getInactiveModulesByEvent;
116
119
  private _setPendingResetByModule;
117
- private _activateModule;
120
+ private _loadModule;
121
+ private _contributeCapabilities;
118
122
  private _deactivate;
119
123
  private _deactivateModule;
120
124
  private _reset;
@@ -1 +1 @@
1
- {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../../src/core/manager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAI/C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAQ,KAAK,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,EAAsB,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,KAAK,eAAe,EAAgC,MAAM,UAAU,CAAC;AAC9E,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAC;AAO1D,MAAM,MAAM,oBAAoB,GAAG;IACjC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,YAAY,CAAC,MAAM,CAAC,CAAC;IACnD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;CAC9B,CAAC;AAiBF,qBAAa,aAAa;IACxB,QAAQ,CAAC,UAAU;eAAsB,MAAM;eAAS,YAAY,GAAG,WAAW,GAAG,OAAO;gBAAU,GAAG;OAAM;IAC/G,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAGrC,OAAO,CAAC,QAAQ,CAAC,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