@dxos/app-framework 0.8.4-main.f9ba587 → 0.8.4-main.fffef41
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.
- package/.storybook/main.mts +11 -0
- package/.storybook/preview.mts +8 -0
- package/.swc/plugins/linux_x86_64_19.0.0/727453fb3a62f7f1d952a41e051ca8a6f88cadc45cee43c6a4d1aa45f9b75665.wasmer-v7 +0 -0
- package/.swc/plugins/{v7_linux_x86_64_13.0.0/fce1bdb8e20a094e4af08bad09cc81497ed0e2e7c51223b07d371063cca18429 → linux_x86_64_19.0.0/fce1bdb8e20a094e4af08bad09cc81497ed0e2e7c51223b07d371063cca18429.wasmer-v7} +0 -0
- package/dist/lib/browser/{app-graph-builder-BGGXLD6T.mjs → app-graph-builder-OIEZZC45.mjs} +32 -31
- package/dist/lib/browser/app-graph-builder-OIEZZC45.mjs.map +7 -0
- package/dist/lib/browser/{chunk-DHZB7HG7.mjs → chunk-6XKO24JP.mjs} +254 -184
- package/dist/lib/browser/chunk-6XKO24JP.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ORWHM7CO.mjs → chunk-SCPE4ZO2.mjs} +11 -8
- package/dist/lib/browser/chunk-SCPE4ZO2.mjs.map +7 -0
- package/dist/lib/browser/{chunk-2636QSIK.mjs → chunk-WPW5VVAX.mjs} +399 -266
- package/dist/lib/browser/chunk-WPW5VVAX.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +20 -56
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-dispatcher-TWKB22NI.mjs → intent-dispatcher-LZ4AE66E.mjs} +2 -2
- package/dist/lib/browser/{intent-resolver-O67UANYP.mjs → intent-resolver-QVCKRX6G.mjs} +7 -7
- package/dist/lib/browser/intent-resolver-QVCKRX6G.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react/index.mjs +34 -0
- package/dist/lib/browser/{store-LFKDWHUQ.mjs → store-CNPHOYTJ.mjs} +5 -5
- package/dist/lib/browser/store-CNPHOYTJ.mjs.map +7 -0
- package/dist/lib/browser/testing/index.mjs +17 -21
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/{app-graph-builder-QHIJUYYW.mjs → app-graph-builder-EBU4NVWD.mjs} +32 -31
- package/dist/lib/node-esm/app-graph-builder-EBU4NVWD.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-NJAFK626.mjs → chunk-3UPX5OIS.mjs} +254 -184
- package/dist/lib/node-esm/chunk-3UPX5OIS.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-VSKRV3NW.mjs → chunk-XJZGUJ3H.mjs} +399 -266
- package/dist/lib/node-esm/chunk-XJZGUJ3H.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-UMZQERLE.mjs → chunk-ZX63QUGE.mjs} +11 -8
- package/dist/lib/node-esm/chunk-ZX63QUGE.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +20 -56
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-dispatcher-5PRM3KGH.mjs → intent-dispatcher-MGOJ3CHD.mjs} +2 -2
- package/dist/lib/node-esm/{intent-resolver-K3D4BXQQ.mjs → intent-resolver-URF3HN3G.mjs} +7 -7
- package/dist/lib/node-esm/intent-resolver-URF3HN3G.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react/index.mjs +35 -0
- package/dist/lib/node-esm/{store-53XDUBMD.mjs → store-RK5B4XEL.mjs} +5 -5
- package/dist/lib/node-esm/store-RK5B4XEL.mjs.map +7 -0
- package/dist/lib/node-esm/testing/index.mjs +17 -21
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/types/src/common/capabilities.d.ts +111 -38
- package/dist/types/src/common/capabilities.d.ts.map +1 -1
- package/dist/types/src/common/collaboration.d.ts +10 -9
- package/dist/types/src/common/collaboration.d.ts.map +1 -1
- package/dist/types/src/common/events.d.ts.map +1 -1
- package/dist/types/src/common/file.d.ts +1 -1
- package/dist/types/src/common/file.d.ts.map +1 -1
- package/dist/types/src/common/layout.d.ts +1 -3
- package/dist/types/src/common/layout.d.ts.map +1 -1
- package/dist/types/src/common/surface.d.ts +19 -16
- package/dist/types/src/common/surface.d.ts.map +1 -1
- package/dist/types/src/common/translations.d.ts +1 -1
- package/dist/types/src/common/translations.d.ts.map +1 -1
- package/dist/types/src/core/capabilities.d.ts +19 -16
- package/dist/types/src/core/capabilities.d.ts.map +1 -1
- package/dist/types/src/core/manager.d.ts +7 -3
- package/dist/types/src/core/manager.d.ts.map +1 -1
- package/dist/types/src/core/plugin.d.ts +8 -1
- package/dist/types/src/core/plugin.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/playground/debug/Debug.d.ts +1 -1
- package/dist/types/src/playground/debug/plugin.d.ts +1 -1
- package/dist/types/src/playground/debug/plugin.d.ts.map +1 -1
- package/dist/types/src/playground/generator/Main.d.ts +1 -1
- package/dist/types/src/playground/generator/Main.d.ts.map +1 -1
- package/dist/types/src/playground/generator/Toolbar.d.ts +1 -1
- package/dist/types/src/playground/generator/Toolbar.d.ts.map +1 -1
- package/dist/types/src/playground/generator/generator.d.ts +1 -1
- package/dist/types/src/playground/generator/generator.d.ts.map +1 -1
- package/dist/types/src/playground/generator/plugin.d.ts +1 -1
- package/dist/types/src/playground/generator/plugin.d.ts.map +1 -1
- package/dist/types/src/playground/layout/Layout.d.ts +2 -2
- package/dist/types/src/playground/layout/plugin.d.ts +1 -1
- package/dist/types/src/playground/layout/plugin.d.ts.map +1 -1
- package/dist/types/src/playground/logger/Toolbar.d.ts +1 -1
- package/dist/types/src/playground/logger/Toolbar.d.ts.map +1 -1
- package/dist/types/src/playground/logger/plugin.d.ts +1 -1
- package/dist/types/src/playground/logger/plugin.d.ts.map +1 -1
- package/dist/types/src/playground/logger/schema.d.ts +1 -1
- package/dist/types/src/playground/logger/schema.d.ts.map +1 -1
- package/dist/types/src/playground/playground.stories.d.ts +5 -4
- package/dist/types/src/playground/playground.stories.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/IntentPlugin.d.ts +1 -1
- package/dist/types/src/plugin-intent/IntentPlugin.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/actions.d.ts +5 -7
- package/dist/types/src/plugin-intent/actions.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/errors.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/index.d.ts +1 -0
- package/dist/types/src/plugin-intent/index.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +7 -7
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/intent.d.ts +1 -1
- package/dist/types/src/plugin-intent/intent.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/meta.d.ts +3 -0
- package/dist/types/src/plugin-intent/meta.d.ts.map +1 -0
- package/dist/types/src/plugin-settings/SettingsPlugin.d.ts +1 -1
- package/dist/types/src/plugin-settings/SettingsPlugin.d.ts.map +1 -1
- package/dist/types/src/plugin-settings/actions.d.ts +5 -7
- package/dist/types/src/plugin-settings/actions.d.ts.map +1 -1
- package/dist/types/src/plugin-settings/app-graph-builder.d.ts +1 -1
- package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/plugin-settings/intent-resolver.d.ts +1 -1
- package/dist/types/src/plugin-settings/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/plugin-settings/meta.d.ts +3 -0
- package/dist/types/src/plugin-settings/meta.d.ts.map +1 -0
- package/dist/types/src/plugin-settings/store.d.ts +1 -1
- package/dist/types/src/plugin-settings/store.d.ts.map +1 -1
- package/dist/types/src/plugin-settings/translations.d.ts +2 -1
- package/dist/types/src/plugin-settings/translations.d.ts.map +1 -1
- package/dist/types/src/react/App.d.ts +10 -0
- package/dist/types/src/react/App.d.ts.map +1 -0
- package/dist/types/src/react/App.stories.d.ts +14 -0
- package/dist/types/src/react/App.stories.d.ts.map +1 -0
- package/dist/types/src/react/DefaultFallback.d.ts +8 -0
- package/dist/types/src/react/DefaultFallback.d.ts.map +1 -0
- package/dist/types/src/react/ErrorBoundary.d.ts +13 -14
- package/dist/types/src/react/ErrorBoundary.d.ts.map +1 -1
- package/dist/types/src/react/IntentContext.d.ts.map +1 -1
- package/dist/types/src/react/Surface.d.ts +5 -5
- package/dist/types/src/react/Surface.d.ts.map +1 -1
- package/dist/types/src/react/Surface.stories.d.ts +8 -10
- package/dist/types/src/react/Surface.stories.d.ts.map +1 -1
- package/dist/types/src/react/common.d.ts.map +1 -1
- package/dist/types/src/react/index.d.ts +2 -0
- package/dist/types/src/react/index.d.ts.map +1 -1
- package/dist/types/src/react/types.d.ts +14 -0
- package/dist/types/src/react/types.d.ts.map +1 -0
- package/dist/types/src/{App.d.ts → react/useApp.d.ts} +7 -6
- package/dist/types/src/react/useApp.d.ts.map +1 -0
- package/dist/types/src/react/useCapabilities.d.ts.map +1 -1
- package/dist/types/src/react/useLoading.d.ts +19 -0
- package/dist/types/src/react/useLoading.d.ts.map +1 -0
- package/dist/types/src/testing/withPluginManager.d.ts +9 -8
- package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
- package/dist/types/src/testing/withPluginManager.stories.d.ts +9 -3
- package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/moon.yml +5 -1
- package/package.json +46 -38
- package/src/common/capabilities.ts +120 -19
- package/src/common/collaboration.ts +6 -9
- package/src/common/events.ts +3 -1
- package/src/common/file.ts +1 -1
- package/src/common/layout.ts +3 -4
- package/src/common/surface.ts +23 -21
- package/src/common/translations.ts +1 -1
- package/src/core/capabilities.test.ts +3 -3
- package/src/core/capabilities.ts +36 -27
- package/src/core/manager.test.ts +22 -21
- package/src/core/manager.ts +141 -56
- package/src/core/plugin.ts +13 -2
- package/src/helpers.test.ts +1 -1
- package/src/index.ts +0 -2
- package/src/playground/debug/Debug.tsx +1 -1
- package/src/playground/debug/plugin.ts +7 -8
- package/src/playground/generator/Main.tsx +0 -1
- package/src/playground/generator/Toolbar.tsx +2 -1
- package/src/playground/generator/generator.ts +4 -4
- package/src/playground/generator/plugin.ts +12 -13
- package/src/playground/layout/plugin.ts +10 -9
- package/src/playground/logger/Toolbar.tsx +2 -1
- package/src/playground/logger/plugin.ts +30 -25
- package/src/playground/logger/schema.ts +1 -1
- package/src/playground/playground.stories.tsx +20 -16
- package/src/plugin-intent/IntentPlugin.ts +13 -13
- package/src/plugin-intent/actions.ts +4 -6
- package/src/plugin-intent/errors.ts +2 -1
- package/src/plugin-intent/index.ts +1 -0
- package/src/plugin-intent/intent-dispatcher.test.ts +10 -3
- package/src/plugin-intent/intent-dispatcher.ts +21 -12
- package/src/plugin-intent/intent.ts +1 -1
- package/src/plugin-intent/meta.ts +10 -0
- package/src/plugin-settings/SettingsPlugin.ts +27 -28
- package/src/plugin-settings/actions.ts +9 -13
- package/src/plugin-settings/app-graph-builder.ts +25 -22
- package/src/plugin-settings/intent-resolver.ts +5 -4
- package/src/plugin-settings/meta.ts +10 -0
- package/src/plugin-settings/store.ts +3 -3
- package/src/plugin-settings/translations.ts +4 -4
- package/src/react/App.stories.tsx +33 -0
- package/src/react/App.tsx +59 -0
- package/src/react/DefaultFallback.tsx +26 -0
- package/src/react/ErrorBoundary.tsx +26 -15
- package/src/react/IntentContext.tsx +3 -2
- package/src/react/Surface.stories.tsx +81 -52
- package/src/react/Surface.tsx +70 -38
- package/src/react/common.ts +2 -1
- package/src/react/index.ts +4 -0
- package/src/react/types.ts +38 -0
- package/src/react/useApp.tsx +165 -0
- package/src/react/useCapabilities.ts +4 -3
- package/src/react/useLoading.tsx +70 -0
- package/src/testing/withPluginManager.stories.tsx +9 -5
- package/src/testing/withPluginManager.tsx +33 -32
- package/tsconfig.json +15 -10
- package/vitest.config.ts +8 -6
- package/.eslintrc.cjs +0 -9
- package/.swc/plugins/v7_linux_x86_64_13.0.0/f45bdff002284d9e8f9ef3f0be909de12da36c049cbcf261ac78fc00abb09a2d +0 -0
- package/dist/lib/browser/app-graph-builder-BGGXLD6T.mjs.map +0 -7
- package/dist/lib/browser/chunk-2636QSIK.mjs.map +0 -7
- package/dist/lib/browser/chunk-DHZB7HG7.mjs.map +0 -7
- package/dist/lib/browser/chunk-ORWHM7CO.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-O67UANYP.mjs.map +0 -7
- package/dist/lib/browser/store-LFKDWHUQ.mjs.map +0 -7
- package/dist/lib/browser/worker.mjs +0 -79
- package/dist/lib/node-esm/app-graph-builder-QHIJUYYW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NJAFK626.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UMZQERLE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VSKRV3NW.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-K3D4BXQQ.mjs.map +0 -7
- package/dist/lib/node-esm/store-53XDUBMD.mjs.map +0 -7
- package/dist/lib/node-esm/worker.mjs +0 -80
- package/dist/types/src/App.d.ts.map +0 -1
- package/dist/types/src/worker.d.ts +0 -4
- package/dist/types/src/worker.d.ts.map +0 -1
- package/src/App.tsx +0 -276
- package/src/worker.ts +0 -11
- package/typedoc/.nojekyll +0 -1
- package/typedoc/assets/hierarchy.js +0 -1
- package/typedoc/assets/highlight.css +0 -106
- package/typedoc/assets/icons.js +0 -18
- package/typedoc/assets/icons.svg +0 -1
- package/typedoc/assets/main.js +0 -60
- package/typedoc/assets/navigation.js +0 -1
- package/typedoc/assets/search.js +0 -1
- package/typedoc/assets/style.css +0 -1640
- package/typedoc/classes/CollaborationActions.InsertContent.html +0 -421
- package/typedoc/classes/ErrorBoundary.html +0 -125
- package/typedoc/classes/IntentAction.ShowUndo.html +0 -227
- package/typedoc/classes/IntentAction.Track.html +0 -266
- package/typedoc/classes/LayoutAction.AddToast.html +0 -265
- package/typedoc/classes/LayoutAction.Close.html +0 -382
- package/typedoc/classes/LayoutAction.Expose.html +0 -265
- package/typedoc/classes/LayoutAction.Open.html +0 -1123
- package/typedoc/classes/LayoutAction.RevertWorkspace.html +0 -343
- package/typedoc/classes/LayoutAction.ScrollIntoView.html +0 -460
- package/typedoc/classes/LayoutAction.Set.html +0 -460
- package/typedoc/classes/LayoutAction.SetLayoutMode.html +0 -499
- package/typedoc/classes/LayoutAction.SwitchWorkspace.html +0 -265
- package/typedoc/classes/LayoutAction.UpdateComplementary.html +0 -616
- package/typedoc/classes/LayoutAction.UpdateDialog.html +0 -1123
- package/typedoc/classes/LayoutAction.UpdateLayout.html +0 -461
- package/typedoc/classes/LayoutAction.UpdatePopover.html +0 -1435
- package/typedoc/classes/LayoutAction.UpdateSidebar.html +0 -616
- package/typedoc/classes/Plugin.html +0 -6
- package/typedoc/classes/PluginContext.html +0 -38
- package/typedoc/classes/PluginManager.html +0 -43
- package/typedoc/classes/PluginModule.html +0 -18
- package/typedoc/classes/SettingsAction.Open.html +0 -226
- package/typedoc/classes/SettingsAction.OpenPluginRegistry.html +0 -265
- package/typedoc/functions/Events.createStateEvent.html +0 -2
- package/typedoc/functions/IntentPlugin.html +0 -1
- package/typedoc/functions/SettingsPlugin.html +0 -1
- package/typedoc/functions/allOf.html +0 -2
- package/typedoc/functions/chain.html +0 -3
- package/typedoc/functions/contributes.html +0 -2
- package/typedoc/functions/createDispatcher.html +0 -3
- package/typedoc/functions/createIntent.html +0 -6
- package/typedoc/functions/createResolver.html +0 -2
- package/typedoc/functions/createSurface.html +0 -2
- package/typedoc/functions/defineCapability.html +0 -2
- package/typedoc/functions/defineEvent.html +0 -2
- package/typedoc/functions/defineModule.html +0 -2
- package/typedoc/functions/definePlugin.html +0 -2
- package/typedoc/functions/eventKey.html +0 -2
- package/typedoc/functions/getEvents.html +0 -2
- package/typedoc/functions/isAllOf.html +0 -2
- package/typedoc/functions/isOneOf.html +0 -2
- package/typedoc/functions/isSurfaceAvailable.html +0 -2
- package/typedoc/functions/lazy.html +0 -2
- package/typedoc/functions/oneOf.html +0 -2
- package/typedoc/functions/useApp.html +0 -6
- package/typedoc/functions/useAppGraph.html +0 -1
- package/typedoc/functions/useCapabilities.html +0 -3
- package/typedoc/functions/useCapability.html +0 -4
- package/typedoc/functions/useIntentDispatcher.html +0 -1
- package/typedoc/functions/useIntentResolver.html +0 -1
- package/typedoc/functions/useLayout.html +0 -1
- package/typedoc/functions/usePluginManager.html +0 -2
- package/typedoc/hierarchy.html +0 -1
- package/typedoc/index.html +0 -12
- package/typedoc/interfaces/LayoutAction.Toast.html +0 -10
- package/typedoc/media/LICENSE +0 -8
- package/typedoc/modules/Capabilities.html +0 -1
- package/typedoc/modules/CollaborationActions.html +0 -1
- package/typedoc/modules/Events.html +0 -1
- package/typedoc/modules/IntentAction.html +0 -1
- package/typedoc/modules/LayoutAction.html +0 -2
- package/typedoc/modules/SettingsAction.html +0 -1
- package/typedoc/modules.html +0 -1
- package/typedoc/types/ActivationEvent.html +0 -8
- package/typedoc/types/ActivationEvents.html +0 -2
- package/typedoc/types/AnyCapability.html +0 -1
- package/typedoc/types/AnyIntent.html +0 -1
- package/typedoc/types/AnyIntentChain.html +0 -1
- package/typedoc/types/AnyIntentEffectResult.html +0 -1
- package/typedoc/types/AnyIntentResolver.html +0 -1
- package/typedoc/types/AnyIntentResult.html +0 -1
- package/typedoc/types/Capabilities.FileUploader.html +0 -1
- package/typedoc/types/Capabilities.IntentResolver.html +0 -1
- package/typedoc/types/Capabilities.Layout.html +0 -1
- package/typedoc/types/Capabilities.Metadata.html +0 -1
- package/typedoc/types/Capabilities.ReactContext.html +0 -1
- package/typedoc/types/Capabilities.ReactRoot.html +0 -1
- package/typedoc/types/Capabilities.ReactSurface.html +0 -1
- package/typedoc/types/Capabilities.Settings.html +0 -4
- package/typedoc/types/Capability.html +0 -9
- package/typedoc/types/CreateAppOptions.html +0 -10
- package/typedoc/types/FileInfo.html +0 -1
- package/typedoc/types/Intent.html +0 -10
- package/typedoc/types/IntentChain.html +0 -6
- package/typedoc/types/IntentContext.html +0 -5
- package/typedoc/types/IntentData.html +0 -1
- package/typedoc/types/IntentDispatcher.html +0 -2
- package/typedoc/types/IntentDispatcherResult.html +0 -2
- package/typedoc/types/IntentEffectDefinition.html +0 -2
- package/typedoc/types/IntentEffectResult.html +0 -15
- package/typedoc/types/IntentParams.html +0 -3
- package/typedoc/types/IntentResolver.html +0 -2
- package/typedoc/types/IntentResultData.html +0 -1
- package/typedoc/types/IntentSchema.html +0 -1
- package/typedoc/types/IntentUndo.html +0 -2
- package/typedoc/types/InterfaceDef.html +0 -4
- package/typedoc/types/Label.html +0 -1
- package/typedoc/types/NodeSerializer.html +0 -8
- package/typedoc/types/PluginManagerOptions.html +0 -6
- package/typedoc/types/PluginMeta.html +0 -21
- package/typedoc/types/PromiseIntentDispatcher.html +0 -2
- package/typedoc/types/PromiseIntentUndo.html +0 -2
- package/typedoc/types/Resource.html +0 -1
- package/typedoc/types/ResourceKey.html +0 -1
- package/typedoc/types/ResourceLanguage.html +0 -1
- package/typedoc/types/SerializedNode.html +0 -4
- package/typedoc/types/SurfaceComponent.html +0 -2
- package/typedoc/types/SurfaceDefinition.html +0 -2
- package/typedoc/types/SurfaceProps.html +0 -4
- package/typedoc/variables/Capabilities.AnchorSort.html +0 -1
- package/typedoc/variables/Capabilities.AppGraph.html +0 -1
- package/typedoc/variables/Capabilities.AppGraphBuilder.html +0 -1
- package/typedoc/variables/Capabilities.AppGraphSerializer.html +0 -1
- package/typedoc/variables/Capabilities.ArtifactDefinition.html +0 -1
- package/typedoc/variables/Capabilities.FileUploader.html +0 -1
- package/typedoc/variables/Capabilities.IntentDispatcher.html +0 -1
- package/typedoc/variables/Capabilities.IntentResolver.html +0 -1
- package/typedoc/variables/Capabilities.Layout.html +0 -1
- package/typedoc/variables/Capabilities.Metadata.html +0 -1
- package/typedoc/variables/Capabilities.Null.html +0 -1
- package/typedoc/variables/Capabilities.PluginManager.html +0 -1
- package/typedoc/variables/Capabilities.ReactContext.html +0 -1
- package/typedoc/variables/Capabilities.ReactRoot.html +0 -1
- package/typedoc/variables/Capabilities.ReactSurface.html +0 -1
- package/typedoc/variables/Capabilities.RxRegistry.html +0 -1
- package/typedoc/variables/Capabilities.Settings.html +0 -1
- package/typedoc/variables/Capabilities.SettingsStore.html +0 -1
- package/typedoc/variables/Capabilities.Tools.html +0 -1
- package/typedoc/variables/Capabilities.Translations.html +0 -1
- package/typedoc/variables/Events.AppGraphReady.html +0 -2
- package/typedoc/variables/Events.DispatcherReady.html +0 -2
- package/typedoc/variables/Events.LayoutReady.html +0 -1
- package/typedoc/variables/Events.SettingsReady.html +0 -2
- package/typedoc/variables/Events.SetupAppGraph.html +0 -2
- package/typedoc/variables/Events.SetupArtifactDefinition.html +0 -2
- package/typedoc/variables/Events.SetupIntentResolver.html +0 -2
- package/typedoc/variables/Events.SetupMetadata.html +0 -2
- package/typedoc/variables/Events.SetupReactSurface.html +0 -2
- package/typedoc/variables/Events.SetupSettings.html +0 -2
- package/typedoc/variables/Events.SetupTranslations.html +0 -2
- package/typedoc/variables/Events.Startup.html +0 -2
- package/typedoc/variables/FileInfoSchema.html +0 -1
- package/typedoc/variables/INTENT_ACTION.html +0 -1
- package/typedoc/variables/INTENT_PLUGIN.html +0 -1
- package/typedoc/variables/LAYOUT_ACTION.html +0 -1
- package/typedoc/variables/LAYOUT_PLUGIN.html +0 -1
- package/typedoc/variables/Label.html +0 -1
- package/typedoc/variables/LayoutAction.Toast.html +0 -1
- package/typedoc/variables/LayoutAction.UPDATE_LAYOUT.html +0 -1
- package/typedoc/variables/PluginManagerProvider.html +0 -2
- package/typedoc/variables/Resource.html +0 -2
- package/typedoc/variables/ResourceKey.html +0 -1
- package/typedoc/variables/ResourceLanguage.html +0 -1
- package/typedoc/variables/SETTINGS_ACTION.html +0 -1
- package/typedoc/variables/SETTINGS_ID.html +0 -1
- package/typedoc/variables/SETTINGS_KEY.html +0 -1
- package/typedoc/variables/SETTINGS_PLUGIN.html +0 -1
- package/typedoc/variables/Surface.html +0 -2
- package/typedoc/variables/defaultFileTypes.html +0 -1
- /package/dist/lib/browser/{intent-dispatcher-TWKB22NI.mjs.map → intent-dispatcher-LZ4AE66E.mjs.map} +0 -0
- /package/dist/lib/browser/{worker.mjs.map → react/index.mjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-dispatcher-5PRM3KGH.mjs.map → intent-dispatcher-MGOJ3CHD.mjs.map} +0 -0
- /package/dist/lib/node-esm/{worker.mjs.map → react/index.mjs.map} +0 -0
|
@@ -1,45 +1,73 @@
|
|
|
1
|
-
import { type Registry } from '@effect-
|
|
2
|
-
import
|
|
1
|
+
import { type Registry } from '@effect-atom/atom-react';
|
|
2
|
+
import type * as Layer from 'effect/Layer';
|
|
3
|
+
import type * as Schema from 'effect/Schema';
|
|
3
4
|
import { type FC, type PropsWithChildren } from 'react';
|
|
4
|
-
import { type
|
|
5
|
-
import
|
|
6
|
-
import { type
|
|
5
|
+
import { type AiService } from '@dxos/ai';
|
|
6
|
+
import type * as AiServiceRouter from '@dxos/ai/AiServiceRouter';
|
|
7
|
+
import { type BuilderExtensions, type GraphBuilder } from '@dxos/app-graph';
|
|
8
|
+
import { type GenericToolkit } from '@dxos/assistant';
|
|
9
|
+
import { type Blueprint } from '@dxos/blueprints';
|
|
7
10
|
import { type Space } from '@dxos/client-protocol';
|
|
11
|
+
import { type FunctionDefinition } from '@dxos/functions';
|
|
8
12
|
import { type RootSettingsStore } from '@dxos/local-storage';
|
|
9
|
-
import { type AnchoredTo } from '@dxos/
|
|
13
|
+
import { type AnchoredTo } from '@dxos/types';
|
|
14
|
+
import { type PluginManager } from '../core';
|
|
15
|
+
import { type AnyIntentResolver, type IntentContext } from '../plugin-intent';
|
|
10
16
|
import { type FileInfo } from './file';
|
|
11
17
|
import { type NodeSerializer } from './graph';
|
|
12
18
|
import { type SurfaceDefinition } from './surface';
|
|
13
|
-
import { type PluginManager } from '../core';
|
|
14
|
-
import { type AnyIntentResolver, type IntentContext } from '../plugin-intent';
|
|
15
19
|
export declare namespace Capabilities {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
/**
|
|
21
|
+
* @category Capability
|
|
22
|
+
*/
|
|
23
|
+
const Null: import("..").InterfaceDef<null>;
|
|
24
|
+
/**
|
|
25
|
+
* @category Capability
|
|
26
|
+
*/
|
|
27
|
+
const PluginManager: import("..").InterfaceDef<PluginManager>;
|
|
28
|
+
/**
|
|
29
|
+
* @category Capability
|
|
30
|
+
*/
|
|
31
|
+
const AtomRegistry: import("..").InterfaceDef<Registry.Registry>;
|
|
32
|
+
type ReactContext = Readonly<{
|
|
20
33
|
id: string;
|
|
21
34
|
dependsOn?: string[];
|
|
22
35
|
context: FC<PropsWithChildren>;
|
|
23
36
|
}>;
|
|
24
|
-
|
|
37
|
+
/**
|
|
38
|
+
* @category Capability
|
|
39
|
+
*/
|
|
40
|
+
const ReactContext: import("..").InterfaceDef<Readonly<{
|
|
25
41
|
id: string;
|
|
26
42
|
dependsOn?: string[];
|
|
27
43
|
context: FC<PropsWithChildren>;
|
|
28
44
|
}>>;
|
|
29
|
-
|
|
45
|
+
type ReactRoot = Readonly<{
|
|
30
46
|
id: string;
|
|
31
47
|
root: FC<PropsWithChildren>;
|
|
32
48
|
}>;
|
|
33
|
-
|
|
49
|
+
/**
|
|
50
|
+
* @category Capability
|
|
51
|
+
*/
|
|
52
|
+
const ReactRoot: import("..").InterfaceDef<Readonly<{
|
|
34
53
|
id: string;
|
|
35
54
|
root: FC<PropsWithChildren>;
|
|
36
55
|
}>>;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
56
|
+
type ReactSurface = SurfaceDefinition | readonly SurfaceDefinition[];
|
|
57
|
+
/**
|
|
58
|
+
* @category Capability
|
|
59
|
+
*/
|
|
60
|
+
const ReactSurface: import("..").InterfaceDef<ReactSurface>;
|
|
61
|
+
type IntentResolver = AnyIntentResolver | readonly AnyIntentResolver[];
|
|
62
|
+
/**
|
|
63
|
+
* @category Capability
|
|
64
|
+
*/
|
|
65
|
+
const IntentResolver: import("..").InterfaceDef<IntentResolver>;
|
|
66
|
+
/**
|
|
67
|
+
* @category Capability
|
|
68
|
+
*/
|
|
69
|
+
const IntentDispatcher: import("..").InterfaceDef<IntentContext>;
|
|
70
|
+
type Layout = Readonly<{
|
|
43
71
|
mode: string;
|
|
44
72
|
dialogOpen: boolean;
|
|
45
73
|
sidebarOpen: boolean;
|
|
@@ -61,7 +89,10 @@ export declare namespace Capabilities {
|
|
|
61
89
|
*/
|
|
62
90
|
scrollIntoView: string | undefined;
|
|
63
91
|
}>;
|
|
64
|
-
|
|
92
|
+
/**
|
|
93
|
+
* @category Capability
|
|
94
|
+
*/
|
|
95
|
+
const Layout: import("..").InterfaceDef<Readonly<{
|
|
65
96
|
mode: string;
|
|
66
97
|
dialogOpen: boolean;
|
|
67
98
|
sidebarOpen: boolean;
|
|
@@ -83,40 +114,82 @@ export declare namespace Capabilities {
|
|
|
83
114
|
*/
|
|
84
115
|
scrollIntoView: string | undefined;
|
|
85
116
|
}>>;
|
|
86
|
-
|
|
117
|
+
/**
|
|
118
|
+
* @category Capability
|
|
119
|
+
*/
|
|
120
|
+
const Translations: import("..").InterfaceDef<readonly {
|
|
87
121
|
readonly [x: string]: {
|
|
88
122
|
readonly [x: string]: string | {
|
|
89
123
|
readonly [x: string]: any;
|
|
90
124
|
};
|
|
91
125
|
};
|
|
92
126
|
}[]>;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
127
|
+
/**
|
|
128
|
+
* @category Capability
|
|
129
|
+
*/
|
|
130
|
+
const AppGraph: import("..").InterfaceDef<Readonly<Pick<GraphBuilder, "graph" | "explore">>>;
|
|
131
|
+
/**
|
|
132
|
+
* @category Capability
|
|
133
|
+
*/
|
|
134
|
+
const AppGraphBuilder: import("..").InterfaceDef<BuilderExtensions>;
|
|
135
|
+
/**
|
|
136
|
+
* @category Capability
|
|
137
|
+
*/
|
|
138
|
+
const AppGraphSerializer: import("..").InterfaceDef<NodeSerializer[]>;
|
|
139
|
+
/**
|
|
140
|
+
* @category Capability
|
|
141
|
+
*/
|
|
142
|
+
const SettingsStore: import("..").InterfaceDef<RootSettingsStore>;
|
|
143
|
+
type Settings = {
|
|
98
144
|
prefix: string;
|
|
99
145
|
schema: Schema.Schema.All;
|
|
100
146
|
value?: Record<string, any>;
|
|
101
147
|
};
|
|
102
|
-
|
|
103
|
-
|
|
148
|
+
/**
|
|
149
|
+
* @category Capability
|
|
150
|
+
*/
|
|
151
|
+
const Settings: import("..").InterfaceDef<Settings>;
|
|
152
|
+
type Metadata = Readonly<{
|
|
104
153
|
id: string;
|
|
105
154
|
metadata: Record<string, any>;
|
|
106
155
|
}>;
|
|
107
|
-
|
|
156
|
+
/**
|
|
157
|
+
* @category Capability
|
|
158
|
+
*/
|
|
159
|
+
const Metadata: import("..").InterfaceDef<Readonly<{
|
|
108
160
|
id: string;
|
|
109
161
|
metadata: Record<string, any>;
|
|
110
162
|
}>>;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
163
|
+
/**
|
|
164
|
+
* @category Capability
|
|
165
|
+
*/
|
|
166
|
+
const Toolkit: import("..").InterfaceDef<GenericToolkit.GenericToolkit<never, never, never>>;
|
|
167
|
+
/**
|
|
168
|
+
* @category Capability
|
|
169
|
+
*/
|
|
170
|
+
const BlueprintDefinition: import("..").InterfaceDef<Blueprint.Blueprint>;
|
|
171
|
+
type AiServiceLayer = Layer.Layer<AiService.AiService>;
|
|
172
|
+
const AiServiceLayer: import("..").InterfaceDef<AiServiceLayer>;
|
|
173
|
+
/**
|
|
174
|
+
* Plugins can contribute them to provide model resolvers.
|
|
175
|
+
*/
|
|
176
|
+
const AiModelResolver: import("..").InterfaceDef<Layer.Layer<AiServiceRouter.AiModelResolver, never, never>>;
|
|
177
|
+
/**
|
|
178
|
+
* @category Capability
|
|
179
|
+
*/
|
|
180
|
+
const Functions: import("..").InterfaceDef<FunctionDefinition.Any[]>;
|
|
181
|
+
type FileUploader = (space: Space, file: File) => Promise<FileInfo | undefined>;
|
|
182
|
+
/**
|
|
183
|
+
* @category Capability
|
|
184
|
+
*/
|
|
185
|
+
const FileUploader: import("..").InterfaceDef<FileUploader>;
|
|
115
186
|
type AnchorSort = {
|
|
116
187
|
key: string;
|
|
117
|
-
sort: (anchorA: AnchoredTo, anchorB: AnchoredTo) => number;
|
|
188
|
+
sort: (anchorA: AnchoredTo.AnchoredTo, anchorB: AnchoredTo.AnchoredTo) => number;
|
|
118
189
|
};
|
|
119
|
-
|
|
120
|
-
|
|
190
|
+
/**
|
|
191
|
+
* @category Capability
|
|
192
|
+
*/
|
|
193
|
+
const AnchorSort: import("..").InterfaceDef<AnchorSort>;
|
|
121
194
|
}
|
|
122
195
|
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/common/capabilities.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/common/capabilities.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,KAAK,eAAe,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,YAAY,EAAE,MA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+
import * as Schema from 'effect/Schema';
|
|
3
2
|
export declare namespace CollaborationActions {
|
|
4
|
-
const
|
|
5
|
-
readonly _tag: Schema.tag<"
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
|
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,
|
|
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":"
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../src/common/file.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/common/layout.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/common/layout.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM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;KAAG;;CACN"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { type
|
|
1
|
+
import type { ComponentType, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
import { 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>> =
|
|
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,19 @@ 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
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
+
* Exclude known prop names to prevent overriding well-defined props.
|
|
23
|
+
*/
|
|
24
|
+
{
|
|
25
|
+
[K in keyof Record<string, any>]: K extends keyof CoreSurfaceProps<T> | 'fallback' | 'placeholder' ? never : any;
|
|
24
26
|
};
|
|
25
|
-
|
|
27
|
+
/**
|
|
28
|
+
* NOTE: If `[key: string]: unknown` is included in shared types, when re-used other fields become unknown as well.
|
|
29
|
+
*/
|
|
30
|
+
export type CoreSurfaceProps<T extends Record<string, any> = Record<string, unknown>> = PropsWithChildren<{
|
|
26
31
|
/**
|
|
27
32
|
* ID for debugging.
|
|
28
33
|
*/
|
|
@@ -33,20 +38,19 @@ type CoreSurfaceProps<T extends Record<string, any> = Record<string, unknown>> =
|
|
|
33
38
|
role: string;
|
|
34
39
|
/**
|
|
35
40
|
* The data to be rendered by the surface.
|
|
41
|
+
* NOTE: This must be a stable value.
|
|
36
42
|
*/
|
|
37
43
|
data: T;
|
|
38
44
|
/**
|
|
39
45
|
* If more than one component is resolved, the limit determines how many are rendered.
|
|
40
46
|
*/
|
|
41
47
|
limit?: number | undefined;
|
|
42
|
-
};
|
|
43
|
-
type SurfaceComponentProps<T extends Record<string, any> = Record<string, unknown>> = PropsWithChildren<CoreSurfaceProps<T> & {
|
|
44
|
-
[key: string]: unknown;
|
|
45
48
|
}>;
|
|
49
|
+
export type SurfaceComponentProps<T extends Record<string, any> = Record<string, any>> = CoreSurfaceProps<T> & Record<string, any>;
|
|
46
50
|
/**
|
|
47
51
|
* React component used to render a surface once is has matched.
|
|
48
52
|
*/
|
|
49
|
-
export type SurfaceComponent<T extends Record<string, any> = Record<string,
|
|
53
|
+
export type SurfaceComponent<T extends Record<string, any> = Record<string, any>> = ComponentType<SurfaceComponentProps<T>>;
|
|
50
54
|
/**
|
|
51
55
|
* Definition of when a SurfaceComponent should be rendered.
|
|
52
56
|
*/
|
|
@@ -54,12 +58,11 @@ export type SurfaceDefinition<T extends Record<string, any> = any> = Readonly<{
|
|
|
54
58
|
id: string;
|
|
55
59
|
role: string | string[];
|
|
56
60
|
position?: Position;
|
|
61
|
+
component: SurfaceComponent<T>;
|
|
57
62
|
filter?: (data: Record<string, unknown>) => data is T;
|
|
58
|
-
component: SurfaceComponent<GuardedType<SurfaceDefinition<T>['filter']>>;
|
|
59
63
|
}>;
|
|
60
64
|
/**
|
|
61
65
|
* Creates a surface definition.
|
|
62
66
|
*/
|
|
63
67
|
export declare const createSurface: <T extends Record<string, any> = any>(definition: SurfaceDefinition<T>) => SurfaceDefinition<T>;
|
|
64
|
-
export {};
|
|
65
68
|
//# sourceMappingURL=surface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../../../src/common/surface.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../../../src/common/surface.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE9D,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;IAClF;;;OAGG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC;IAE9C;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;AAClD;;;;GAIG;AACH;KACG,CAAC,IAAI,MAAM,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,SAAS,MAAM,gBAAgB,CAAC,CAAC,CAAC,GAAG,UAAU,GAAG,aAAa,GAAG,KAAK,GAAG,GAAG;CACjH,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,iBAAiB,CAAC;IACxG;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,IAAI,EAAE,CAAC,CAAC;IAER;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC,CAAC;AAEH,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAC1G,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEtB;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,aAAa,CAC/F,qBAAqB,CAAC,CAAC,CAAC,CACzB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,IAAI,QAAQ,CAAC;IAC5E,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAC/B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC;CACvD,CAAC,CAAC;AAEH;;GAEG;AACH,eAAO,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
|
|
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,
|
|
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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Registry
|
|
2
|
-
import
|
|
1
|
+
import { Atom, type Registry } from '@effect-atom/atom-react';
|
|
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,15 +25,15 @@ 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
|
*/
|
|
33
|
-
deactivate?: () => MaybePromise<void> | Effect.Effect<void, Error>;
|
|
36
|
+
readonly deactivate?: () => MaybePromise<void> | Effect.Effect<void, Error>;
|
|
34
37
|
};
|
|
35
38
|
export type AnyCapability = Capability<any>;
|
|
36
39
|
type PluginsContextOptions = {
|
|
@@ -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: <
|
|
47
|
+
export declare const contributes: <I extends InterfaceDef<any>>(interfaceDef: I, implementation: Capability<InterfaceDef.Implementation<I>>["implementation"], 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
|
}>;
|
|
@@ -61,8 +64,8 @@ export declare const lazy: <T, U>(c: LoadCapability<T, U> | LoadCapabilities<T>)
|
|
|
61
64
|
export declare class PluginContext {
|
|
62
65
|
private readonly _registry;
|
|
63
66
|
private readonly _capabilityImpls;
|
|
64
|
-
readonly _capabilities: (arg: string) =>
|
|
65
|
-
readonly _capability: (arg: string) =>
|
|
67
|
+
readonly _capabilities: (arg: string) => Atom.Atom<unknown[]>;
|
|
68
|
+
readonly _capability: (arg: string) => Atom.Atom<unknown>;
|
|
66
69
|
/**
|
|
67
70
|
* Activates plugins based on the activation event.
|
|
68
71
|
* @param event The activation event.
|
|
@@ -77,20 +80,20 @@ export declare class PluginContext {
|
|
|
77
80
|
readonly reset: PluginsContextOptions['reset'];
|
|
78
81
|
constructor({ registry, activate, reset }: PluginsContextOptions);
|
|
79
82
|
/**
|
|
80
|
-
* Get the
|
|
81
|
-
* Primarily useful for deriving other
|
|
83
|
+
* Get the Atom reference to the available capabilities for a given interface.
|
|
84
|
+
* Primarily useful for deriving other Atom values based on the capabilities or
|
|
82
85
|
* for subscribing to changes in the capabilities.
|
|
83
|
-
* @returns An
|
|
86
|
+
* @returns An atom reference to the available capabilities.
|
|
84
87
|
*/
|
|
85
|
-
capabilities<T>(interfaceDef: InterfaceDef<T>):
|
|
88
|
+
capabilities<T>(interfaceDef: InterfaceDef<T>): Atom.Atom<T[]>;
|
|
86
89
|
/**
|
|
87
|
-
* Get the
|
|
88
|
-
* Primarily useful for deriving other
|
|
90
|
+
* Get the Atom reference to the available capabilities for a given interface.
|
|
91
|
+
* Primarily useful for deriving other Atom values based on the capability or
|
|
89
92
|
* for subscribing to changes in the capability.
|
|
90
|
-
* @returns An
|
|
93
|
+
* @returns An atom reference to the available capability.
|
|
91
94
|
* @throws If no capability is found.
|
|
92
95
|
*/
|
|
93
|
-
capability<T>(interfaceDef: InterfaceDef<T>):
|
|
96
|
+
capability<T>(interfaceDef: InterfaceDef<T>): Atom.Atom<T>;
|
|
94
97
|
/**
|
|
95
98
|
* Get capabilities from the plugin context.
|
|
96
99
|
* @returns An array of capabilities.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/core/capabilities.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/core/capabilities.ts"],"names":[],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AQ,CAAC,SAAS,CAAoB;IAE9C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAE9B;IAEH,QAAQ,CAAC,aAAa,wCAKnB;IAEH,QAAQ,CAAC,WAAW,sCAMjB;IAEH;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAErD;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAC;gBAEnC,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,qBAAqB;IAkDhE;;;;;OAKG;IACH,YAAY,CAAC,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;IAK9D;;;;;;OAMG;IACH,UAAU,CAAC,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAK1D;;;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"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Registry } from '@effect-
|
|
1
|
+
import { Registry } from '@effect-atom/atom-react';
|
|
2
2
|
import { Event } from '@dxos/async';
|
|
3
3
|
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
|
|
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
|
|
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,
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../../src/core/manager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAWnD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,IAAI,EAAQ,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YA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,CAAC,wBAAwB;IA+HhC,OAAO,CAAC,WAAW,CA4Cf;IAEJ,OAAO,CAAC,uBAAuB;IAU/B,OAAO,CAAC,WAAW;IAgBnB,OAAO,CAAC,iBAAiB;IAmCzB,OAAO,CAAC,MAAM;CAiBf"}
|
|
@@ -80,6 +80,10 @@ export type PluginMeta = {
|
|
|
80
80
|
* A grep-able symbol string which can be resolved to an icon asset by @ch-ui/icons, via @ch-ui/vite-plugin-icons.
|
|
81
81
|
*/
|
|
82
82
|
icon?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Icon hue (ChromaticPalette).
|
|
85
|
+
*/
|
|
86
|
+
iconHue?: string;
|
|
83
87
|
};
|
|
84
88
|
/**
|
|
85
89
|
* A collection of modules that are be enabled/disabled as a unit.
|
|
@@ -90,9 +94,12 @@ export declare class Plugin {
|
|
|
90
94
|
readonly modules: PluginModule[];
|
|
91
95
|
constructor(meta: PluginMeta, modules: PluginModule[]);
|
|
92
96
|
}
|
|
97
|
+
export type PluginFactory<T = void> = ((args: T) => Plugin) & {
|
|
98
|
+
meta: PluginMeta;
|
|
99
|
+
};
|
|
93
100
|
/**
|
|
94
101
|
* Helper to define a plugin.
|
|
95
102
|
*/
|
|
96
|
-
export declare const definePlugin: (meta: PluginMeta,
|
|
103
|
+
export declare const definePlugin: <T = void>(meta: PluginMeta, provider: (args: T) => PluginModule[]) => PluginFactory<T>;
|
|
97
104
|
export {};
|
|
98
105
|
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/core/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEvE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,eAAO,MAAM,YAAY,GAAI,SAAS,qBAAqB,iBAA8B,CAAC;AAE1F,MAAM,MAAM,UAAU,GAAG;IACvB;;;;;;OAMG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IAEvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;GAGG;AAEH,qBAAa,MAAM;IAEf,QAAQ,CAAC,IAAI,EAAE,UAAU;IACzB,QAAQ,CAAC,OAAO,EAAE,YAAY,EAAE;gBADvB,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,YAAY,EAAE;CAEnC;AAED,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC,GAAG;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC;AAEnF;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,GAAG,IAAI,EAAE,MAAM,UAAU,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC,KAAK,YAAY,EAAE,KAAG,aAAa,CAAC,CAAC,CAM/G,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Capabilities } from '../../common';
|
|
3
3
|
export declare const Debug: () => React.JSX.Element;
|
|
4
|
-
declare const _default: () => import("../..").Capability<Capabilities.ReactSurface
|
|
4
|
+
declare const _default: () => import("../..").Capability<import("../..").InterfaceDef<Capabilities.ReactSurface>>;
|
|
5
5
|
export default _default;
|
|
6
6
|
//# sourceMappingURL=Debug.d.ts.map
|