@dxos/app-framework 0.8.2-staging.7ac8446 → 0.8.2
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/dist/lib/browser/{app-graph-builder-576BHZC7.mjs → app-graph-builder-DYEAGZPS.mjs} +23 -23
- package/dist/lib/browser/app-graph-builder-DYEAGZPS.mjs.map +7 -0
- package/dist/lib/browser/{chunk-6AVTZPMT.mjs → chunk-5GE2ERNU.mjs} +340 -275
- package/dist/lib/browser/chunk-5GE2ERNU.mjs.map +7 -0
- package/dist/lib/browser/{chunk-SFPT4Z2C.mjs → chunk-WWEJRWFX.mjs} +10 -10
- package/dist/lib/browser/chunk-WWEJRWFX.mjs.map +7 -0
- package/dist/lib/browser/{chunk-PPIBZ5N4.mjs → chunk-ZMXJV64L.mjs} +123 -63
- package/dist/lib/browser/chunk-ZMXJV64L.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +12 -10
- package/dist/lib/browser/index.mjs.map +1 -1
- package/dist/lib/browser/{intent-dispatcher-3Q67MHZZ.mjs → intent-dispatcher-ELZN5EM7.mjs} +2 -2
- package/dist/lib/browser/{intent-resolver-O763LCLG.mjs → intent-resolver-SGWLINTO.mjs} +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{store-URSN7DZI.mjs → store-YIU6IPZ2.mjs} +7 -6
- package/dist/lib/browser/store-YIU6IPZ2.mjs.map +7 -0
- package/dist/lib/browser/testing/index.mjs +30 -14
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/browser/worker.mjs +5 -3
- package/dist/lib/node/app-graph-builder-GBLISL7L.cjs +146 -0
- package/dist/lib/node/app-graph-builder-GBLISL7L.cjs.map +7 -0
- package/dist/lib/node/{chunk-JUSEAFDU.cjs → chunk-G774ASXO.cjs} +5 -5
- package/dist/lib/node/chunk-G774ASXO.cjs.map +7 -0
- package/dist/lib/node/{chunk-YIFTVCOR.cjs → chunk-HIVITTZD.cjs} +319 -255
- package/dist/lib/node/chunk-HIVITTZD.cjs.map +7 -0
- package/dist/lib/node/{chunk-YNTKVTVX.cjs → chunk-Z2PMVDJ5.cjs} +155 -95
- package/dist/lib/node/chunk-Z2PMVDJ5.cjs.map +7 -0
- package/dist/lib/node/index.cjs +82 -80
- package/dist/lib/node/index.cjs.map +1 -1
- package/dist/lib/node/{intent-dispatcher-H334XLFD.cjs → intent-dispatcher-LFXZJTAS.cjs} +8 -8
- package/dist/lib/node/{intent-dispatcher-H334XLFD.cjs.map → intent-dispatcher-LFXZJTAS.cjs.map} +2 -2
- package/dist/lib/node/{intent-resolver-3F4POWAM.cjs → intent-resolver-EPSFTHL6.cjs} +12 -12
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{store-OFDHTDCB.cjs → store-CVVRXUTH.cjs} +10 -9
- package/dist/lib/node/store-CVVRXUTH.cjs.map +7 -0
- package/dist/lib/node/testing/index.cjs +34 -17
- package/dist/lib/node/testing/index.cjs.map +3 -3
- package/dist/lib/node/worker.cjs +40 -38
- package/dist/lib/node/worker.cjs.map +2 -2
- package/dist/lib/node-esm/{app-graph-builder-VYKLSMSZ.mjs → app-graph-builder-LUBDEIT6.mjs} +23 -23
- package/dist/lib/node-esm/app-graph-builder-LUBDEIT6.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-R6A7Z4LU.mjs → chunk-6IKYKERU.mjs} +123 -63
- package/dist/lib/node-esm/chunk-6IKYKERU.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-PHOUQACM.mjs → chunk-I6BVZMAH.mjs} +10 -10
- package/dist/lib/node-esm/chunk-I6BVZMAH.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-AHKIPS2L.mjs → chunk-Z2ZHH4HN.mjs} +340 -275
- package/dist/lib/node-esm/chunk-Z2ZHH4HN.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +12 -10
- package/dist/lib/node-esm/index.mjs.map +1 -1
- package/dist/lib/node-esm/{intent-dispatcher-YDE2ONZA.mjs → intent-dispatcher-A2JCMWRD.mjs} +2 -2
- package/dist/lib/node-esm/{intent-resolver-LAGJ7LXM.mjs → intent-resolver-5C4O43GK.mjs} +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{store-EYSUVNCS.mjs → store-HRZXZ2D2.mjs} +7 -6
- package/dist/lib/node-esm/store-HRZXZ2D2.mjs.map +7 -0
- package/dist/lib/node-esm/testing/index.mjs +30 -14
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/worker.mjs +5 -3
- package/dist/types/src/App.d.ts +3 -1
- package/dist/types/src/App.d.ts.map +1 -1
- package/dist/types/src/common/capabilities.d.ts +40 -222
- package/dist/types/src/common/capabilities.d.ts.map +1 -1
- package/dist/types/src/common/collaboration.d.ts +19 -0
- package/dist/types/src/common/collaboration.d.ts.map +1 -0
- package/dist/types/src/common/events.d.ts.map +1 -1
- package/dist/types/src/common/file.d.ts +7 -7
- package/dist/types/src/common/file.d.ts.map +1 -1
- package/dist/types/src/common/index.d.ts +1 -0
- package/dist/types/src/common/index.d.ts.map +1 -1
- package/dist/types/src/common/layout.d.ts +166 -158
- package/dist/types/src/common/layout.d.ts.map +1 -1
- package/dist/types/src/common/surface.d.ts.map +1 -1
- package/dist/types/src/common/translations.d.ts +7 -7
- package/dist/types/src/common/translations.d.ts.map +1 -1
- package/dist/types/src/core/capabilities.d.ts +33 -15
- package/dist/types/src/core/capabilities.d.ts.map +1 -1
- package/dist/types/src/core/events.d.ts +4 -1
- package/dist/types/src/core/events.d.ts.map +1 -1
- package/dist/types/src/core/manager.d.ts +14 -11
- package/dist/types/src/core/manager.d.ts.map +1 -1
- package/dist/types/src/core/plugin.d.ts +4 -3
- package/dist/types/src/core/plugin.d.ts.map +1 -1
- package/dist/types/src/helpers.d.ts.map +1 -1
- package/dist/types/src/playground/generator/generator.d.ts.map +1 -1
- package/dist/types/src/playground/logger/schema.d.ts +6 -6
- package/dist/types/src/playground/logger/schema.d.ts.map +1 -1
- package/dist/types/src/playground/playground.stories.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/actions.d.ts +14 -14
- package/dist/types/src/plugin-intent/actions.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +29 -3
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/intent.d.ts +14 -20
- package/dist/types/src/plugin-intent/intent.d.ts.map +1 -1
- package/dist/types/src/plugin-settings/actions.d.ts +10 -10
- package/dist/types/src/plugin-settings/actions.d.ts.map +1 -1
- package/dist/types/src/plugin-settings/app-graph-builder.d.ts +2 -195
- package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/plugin-settings/store.d.ts +2 -2
- package/dist/types/src/plugin-settings/store.d.ts.map +1 -1
- package/dist/types/src/react/ErrorBoundary.d.ts +1 -1
- 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 +2 -2
- package/dist/types/src/react/Surface.d.ts.map +1 -1
- package/dist/types/src/react/useCapabilities.d.ts +2 -2
- package/dist/types/src/react/useCapabilities.d.ts.map +1 -1
- package/dist/types/src/react/useIntentResolver.d.ts.map +1 -1
- package/dist/types/src/testing/withPluginManager.d.ts +6 -2
- package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
- package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +32 -21
- package/project.json +2 -1
- package/src/App.tsx +98 -48
- package/src/common/capabilities.ts +18 -7
- package/src/common/collaboration.ts +21 -0
- package/src/common/file.ts +7 -7
- package/src/common/index.ts +1 -0
- package/src/common/layout.ts +167 -128
- package/src/common/translations.ts +7 -7
- package/src/core/capabilities.test.ts +55 -36
- package/src/core/capabilities.ts +84 -60
- package/src/core/events.ts +4 -1
- package/src/core/manager.test.ts +22 -22
- package/src/core/manager.ts +34 -26
- package/src/core/plugin.ts +4 -3
- package/src/playground/generator/generator.ts +4 -4
- package/src/playground/logger/schema.ts +5 -5
- package/src/playground/playground.stories.tsx +13 -9
- package/src/plugin-intent/actions.ts +9 -9
- package/src/plugin-intent/intent-dispatcher.test.ts +23 -42
- package/src/plugin-intent/intent-dispatcher.ts +25 -13
- package/src/plugin-intent/intent.ts +22 -20
- package/src/plugin-settings/actions.ts +8 -8
- package/src/plugin-settings/app-graph-builder.ts +129 -94
- package/src/plugin-settings/store.ts +20 -17
- package/src/react/ErrorBoundary.tsx +3 -3
- package/src/react/Surface.stories.tsx +1 -1
- package/src/react/Surface.tsx +3 -3
- package/src/react/useCapabilities.ts +9 -19
- package/src/testing/withPluginManager.stories.tsx +0 -1
- package/src/testing/withPluginManager.tsx +35 -16
- package/tsconfig.json +1 -53
- package/typedoc/.nojekyll +1 -0
- package/typedoc/assets/hierarchy.js +1 -0
- package/typedoc/assets/highlight.css +106 -0
- package/typedoc/assets/icons.js +18 -0
- package/typedoc/assets/icons.svg +1 -0
- package/typedoc/assets/main.js +60 -0
- package/typedoc/assets/navigation.js +1 -0
- package/typedoc/assets/search.js +1 -0
- package/typedoc/assets/style.css +1640 -0
- package/typedoc/classes/CollaborationActions.InsertContent.html +421 -0
- package/typedoc/classes/ErrorBoundary.html +125 -0
- package/typedoc/classes/IntentAction.ShowUndo.html +227 -0
- package/typedoc/classes/IntentAction.Track.html +266 -0
- package/typedoc/classes/LayoutAction.AddToast.html +265 -0
- package/typedoc/classes/LayoutAction.Close.html +382 -0
- package/typedoc/classes/LayoutAction.Expose.html +265 -0
- package/typedoc/classes/LayoutAction.Open.html +1123 -0
- package/typedoc/classes/LayoutAction.RevertWorkspace.html +343 -0
- package/typedoc/classes/LayoutAction.ScrollIntoView.html +460 -0
- package/typedoc/classes/LayoutAction.Set.html +460 -0
- package/typedoc/classes/LayoutAction.SetLayoutMode.html +499 -0
- package/typedoc/classes/LayoutAction.SwitchWorkspace.html +265 -0
- package/typedoc/classes/LayoutAction.UpdateComplementary.html +616 -0
- package/typedoc/classes/LayoutAction.UpdateDialog.html +1123 -0
- package/typedoc/classes/LayoutAction.UpdateLayout.html +461 -0
- package/typedoc/classes/LayoutAction.UpdatePopover.html +1435 -0
- package/typedoc/classes/LayoutAction.UpdateSidebar.html +616 -0
- package/typedoc/classes/Plugin.html +6 -0
- package/typedoc/classes/PluginContext.html +38 -0
- package/typedoc/classes/PluginManager.html +43 -0
- package/typedoc/classes/PluginModule.html +18 -0
- package/typedoc/classes/SettingsAction.Open.html +226 -0
- package/typedoc/classes/SettingsAction.OpenPluginRegistry.html +265 -0
- package/typedoc/functions/Events.createStateEvent.html +2 -0
- package/typedoc/functions/IntentPlugin.html +1 -0
- package/typedoc/functions/SettingsPlugin.html +1 -0
- package/typedoc/functions/allOf.html +2 -0
- package/typedoc/functions/chain.html +3 -0
- package/typedoc/functions/contributes.html +2 -0
- package/typedoc/functions/createDispatcher.html +3 -0
- package/typedoc/functions/createIntent.html +6 -0
- package/typedoc/functions/createResolver.html +2 -0
- package/typedoc/functions/createSurface.html +2 -0
- package/typedoc/functions/defineCapability.html +2 -0
- package/typedoc/functions/defineEvent.html +2 -0
- package/typedoc/functions/defineModule.html +2 -0
- package/typedoc/functions/definePlugin.html +2 -0
- package/typedoc/functions/eventKey.html +2 -0
- package/typedoc/functions/getEvents.html +2 -0
- package/typedoc/functions/isAllOf.html +2 -0
- package/typedoc/functions/isOneOf.html +2 -0
- package/typedoc/functions/isSurfaceAvailable.html +2 -0
- package/typedoc/functions/lazy.html +2 -0
- package/typedoc/functions/oneOf.html +2 -0
- package/typedoc/functions/useApp.html +6 -0
- package/typedoc/functions/useAppGraph.html +1 -0
- package/typedoc/functions/useCapabilities.html +3 -0
- package/typedoc/functions/useCapability.html +4 -0
- package/typedoc/functions/useIntentDispatcher.html +1 -0
- package/typedoc/functions/useIntentResolver.html +1 -0
- package/typedoc/functions/useLayout.html +1 -0
- package/typedoc/functions/usePluginManager.html +2 -0
- package/typedoc/hierarchy.html +1 -0
- package/typedoc/index.html +16 -0
- package/typedoc/interfaces/LayoutAction.Toast.html +10 -0
- package/typedoc/media/LICENSE +8 -0
- package/typedoc/modules/Capabilities.html +1 -0
- package/typedoc/modules/CollaborationActions.html +1 -0
- package/typedoc/modules/Events.html +1 -0
- package/typedoc/modules/IntentAction.html +1 -0
- package/typedoc/modules/LayoutAction.html +2 -0
- package/typedoc/modules/SettingsAction.html +1 -0
- package/typedoc/modules.html +1 -0
- package/typedoc/types/ActivationEvent.html +8 -0
- package/typedoc/types/ActivationEvents.html +2 -0
- package/typedoc/types/AnyCapability.html +1 -0
- package/typedoc/types/AnyIntent.html +1 -0
- package/typedoc/types/AnyIntentChain.html +1 -0
- package/typedoc/types/AnyIntentEffectResult.html +1 -0
- package/typedoc/types/AnyIntentResolver.html +1 -0
- package/typedoc/types/AnyIntentResult.html +1 -0
- package/typedoc/types/Capabilities.FileUploader.html +1 -0
- package/typedoc/types/Capabilities.IntentResolver.html +1 -0
- package/typedoc/types/Capabilities.Layout.html +1 -0
- package/typedoc/types/Capabilities.Metadata.html +1 -0
- package/typedoc/types/Capabilities.ReactContext.html +1 -0
- package/typedoc/types/Capabilities.ReactRoot.html +1 -0
- package/typedoc/types/Capabilities.ReactSurface.html +1 -0
- package/typedoc/types/Capabilities.Settings.html +4 -0
- package/typedoc/types/Capability.html +9 -0
- package/typedoc/types/CreateAppOptions.html +10 -0
- package/typedoc/types/FileInfo.html +1 -0
- package/typedoc/types/Intent.html +10 -0
- package/typedoc/types/IntentChain.html +6 -0
- package/typedoc/types/IntentContext.html +5 -0
- package/typedoc/types/IntentData.html +1 -0
- package/typedoc/types/IntentDispatcher.html +2 -0
- package/typedoc/types/IntentDispatcherResult.html +2 -0
- package/typedoc/types/IntentEffectDefinition.html +2 -0
- package/typedoc/types/IntentEffectResult.html +15 -0
- package/typedoc/types/IntentParams.html +3 -0
- package/typedoc/types/IntentResolver.html +2 -0
- package/typedoc/types/IntentResultData.html +1 -0
- package/typedoc/types/IntentSchema.html +1 -0
- package/typedoc/types/IntentUndo.html +2 -0
- package/typedoc/types/InterfaceDef.html +4 -0
- package/typedoc/types/Label.html +1 -0
- package/typedoc/types/NodeSerializer.html +8 -0
- package/typedoc/types/PluginManagerOptions.html +6 -0
- package/typedoc/types/PluginMeta.html +21 -0
- package/typedoc/types/PromiseIntentDispatcher.html +2 -0
- package/typedoc/types/PromiseIntentUndo.html +2 -0
- package/typedoc/types/Resource.html +1 -0
- package/typedoc/types/ResourceKey.html +1 -0
- package/typedoc/types/ResourceLanguage.html +1 -0
- package/typedoc/types/SerializedNode.html +4 -0
- package/typedoc/types/SurfaceComponent.html +2 -0
- package/typedoc/types/SurfaceDefinition.html +2 -0
- package/typedoc/types/SurfaceProps.html +4 -0
- package/typedoc/variables/Capabilities.AnchorSort.html +1 -0
- package/typedoc/variables/Capabilities.AppGraph.html +1 -0
- package/typedoc/variables/Capabilities.AppGraphBuilder.html +1 -0
- package/typedoc/variables/Capabilities.AppGraphSerializer.html +1 -0
- package/typedoc/variables/Capabilities.ArtifactDefinition.html +1 -0
- package/typedoc/variables/Capabilities.FileUploader.html +1 -0
- package/typedoc/variables/Capabilities.IntentDispatcher.html +1 -0
- package/typedoc/variables/Capabilities.IntentResolver.html +1 -0
- package/typedoc/variables/Capabilities.Layout.html +1 -0
- package/typedoc/variables/Capabilities.Metadata.html +1 -0
- package/typedoc/variables/Capabilities.Null.html +1 -0
- package/typedoc/variables/Capabilities.PluginManager.html +1 -0
- package/typedoc/variables/Capabilities.ReactContext.html +1 -0
- package/typedoc/variables/Capabilities.ReactRoot.html +1 -0
- package/typedoc/variables/Capabilities.ReactSurface.html +1 -0
- package/typedoc/variables/Capabilities.RxRegistry.html +1 -0
- package/typedoc/variables/Capabilities.Settings.html +1 -0
- package/typedoc/variables/Capabilities.SettingsStore.html +1 -0
- package/typedoc/variables/Capabilities.Tools.html +1 -0
- package/typedoc/variables/Capabilities.Translations.html +1 -0
- package/typedoc/variables/Events.AppGraphReady.html +2 -0
- package/typedoc/variables/Events.DispatcherReady.html +2 -0
- package/typedoc/variables/Events.LayoutReady.html +1 -0
- package/typedoc/variables/Events.SettingsReady.html +2 -0
- package/typedoc/variables/Events.SetupAppGraph.html +2 -0
- package/typedoc/variables/Events.SetupArtifactDefinition.html +2 -0
- package/typedoc/variables/Events.SetupIntentResolver.html +2 -0
- package/typedoc/variables/Events.SetupMetadata.html +2 -0
- package/typedoc/variables/Events.SetupReactSurface.html +2 -0
- package/typedoc/variables/Events.SetupSettings.html +2 -0
- package/typedoc/variables/Events.SetupTranslations.html +2 -0
- package/typedoc/variables/Events.Startup.html +2 -0
- package/typedoc/variables/FileInfoSchema.html +1 -0
- package/typedoc/variables/INTENT_ACTION.html +1 -0
- package/typedoc/variables/INTENT_PLUGIN.html +1 -0
- package/typedoc/variables/LAYOUT_ACTION.html +1 -0
- package/typedoc/variables/LAYOUT_PLUGIN.html +1 -0
- package/typedoc/variables/Label.html +1 -0
- package/typedoc/variables/LayoutAction.Toast.html +1 -0
- package/typedoc/variables/LayoutAction.UPDATE_LAYOUT.html +1 -0
- package/typedoc/variables/PluginManagerProvider.html +2 -0
- package/typedoc/variables/Resource.html +2 -0
- package/typedoc/variables/ResourceKey.html +1 -0
- package/typedoc/variables/ResourceLanguage.html +1 -0
- package/typedoc/variables/SETTINGS_ACTION.html +1 -0
- package/typedoc/variables/SETTINGS_ID.html +1 -0
- package/typedoc/variables/SETTINGS_KEY.html +1 -0
- package/typedoc/variables/SETTINGS_PLUGIN.html +1 -0
- package/typedoc/variables/Surface.html +2 -0
- package/typedoc/variables/defaultFileTypes.html +1 -0
- package/dist/lib/browser/app-graph-builder-576BHZC7.mjs.map +0 -7
- package/dist/lib/browser/chunk-6AVTZPMT.mjs.map +0 -7
- package/dist/lib/browser/chunk-PPIBZ5N4.mjs.map +0 -7
- package/dist/lib/browser/chunk-SFPT4Z2C.mjs.map +0 -7
- package/dist/lib/browser/store-URSN7DZI.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-JZCSKYPY.cjs +0 -146
- package/dist/lib/node/app-graph-builder-JZCSKYPY.cjs.map +0 -7
- package/dist/lib/node/chunk-JUSEAFDU.cjs.map +0 -7
- package/dist/lib/node/chunk-YIFTVCOR.cjs.map +0 -7
- package/dist/lib/node/chunk-YNTKVTVX.cjs.map +0 -7
- package/dist/lib/node/store-OFDHTDCB.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-VYKLSMSZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AHKIPS2L.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PHOUQACM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-R6A7Z4LU.mjs.map +0 -7
- package/dist/lib/node-esm/store-EYSUVNCS.mjs.map +0 -7
- /package/dist/lib/browser/{intent-dispatcher-3Q67MHZZ.mjs.map → intent-dispatcher-ELZN5EM7.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-resolver-O763LCLG.mjs.map → intent-resolver-SGWLINTO.mjs.map} +0 -0
- /package/dist/lib/node/{intent-resolver-3F4POWAM.cjs.map → intent-resolver-EPSFTHL6.cjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-dispatcher-YDE2ONZA.mjs.map → intent-dispatcher-A2JCMWRD.mjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-resolver-LAGJ7LXM.mjs.map → intent-resolver-5C4O43GK.mjs.map} +0 -0
|
@@ -26,9 +26,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_HIVITTZD_exports = {};
|
|
30
|
+
__export(chunk_HIVITTZD_exports, {
|
|
31
31
|
Capabilities: () => Capabilities,
|
|
32
|
+
CollaborationActions: () => CollaborationActions,
|
|
32
33
|
Events: () => Events,
|
|
33
34
|
FileInfoSchema: () => FileInfoSchema,
|
|
34
35
|
INTENT_ACTION: () => INTENT_ACTION,
|
|
@@ -40,9 +41,9 @@ __export(chunk_YIFTVCOR_exports, {
|
|
|
40
41
|
Label: () => Label,
|
|
41
42
|
LayoutAction: () => LayoutAction,
|
|
42
43
|
Plugin: () => Plugin,
|
|
44
|
+
PluginContext: () => PluginContext,
|
|
43
45
|
PluginManager: () => PluginManager,
|
|
44
46
|
PluginModule: () => PluginModule,
|
|
45
|
-
PluginsContext: () => PluginsContext,
|
|
46
47
|
Resource: () => Resource,
|
|
47
48
|
ResourceKey: () => ResourceKey,
|
|
48
49
|
ResourceLanguage: () => ResourceLanguage,
|
|
@@ -66,27 +67,29 @@ __export(chunk_YIFTVCOR_exports, {
|
|
|
66
67
|
lazy: () => lazy,
|
|
67
68
|
oneOf: () => oneOf
|
|
68
69
|
});
|
|
69
|
-
module.exports = __toCommonJS(
|
|
70
|
+
module.exports = __toCommonJS(chunk_HIVITTZD_exports);
|
|
70
71
|
var import_effect = require("effect");
|
|
71
72
|
var import_live_object = require("@dxos/live-object");
|
|
72
73
|
var import_log = require("@dxos/log");
|
|
73
74
|
var import_util = require("@dxos/util");
|
|
74
75
|
var import_effect2 = require("effect");
|
|
75
76
|
var import_effect3 = require("effect");
|
|
76
|
-
var
|
|
77
|
+
var import_rx_react = require("@effect-rx/rx-react");
|
|
77
78
|
var import_effect4 = require("effect");
|
|
78
79
|
var import_async = require("@dxos/async");
|
|
79
80
|
var import_invariant = require("@dxos/invariant");
|
|
80
|
-
var import_live_object2 = require("@dxos/live-object");
|
|
81
81
|
var import_log2 = require("@dxos/log");
|
|
82
|
-
var
|
|
82
|
+
var import_rx_react2 = require("@effect-rx/rx-react");
|
|
83
|
+
var import_signals_core = require("@preact/signals-core");
|
|
83
84
|
var import_effect5 = require("effect");
|
|
84
85
|
var import_async2 = require("@dxos/async");
|
|
85
|
-
var
|
|
86
|
+
var import_live_object2 = require("@dxos/live-object");
|
|
86
87
|
var import_log3 = require("@dxos/log");
|
|
87
88
|
var import_effect6 = require("effect");
|
|
89
|
+
var import_echo_schema = require("@dxos/echo-schema");
|
|
88
90
|
var import_effect7 = require("effect");
|
|
89
91
|
var import_effect8 = require("effect");
|
|
92
|
+
var import_effect9 = require("effect");
|
|
90
93
|
var createIntent = (schema, data = {}, params = {}) => {
|
|
91
94
|
const _ = import_effect3.Schema.validateSync(schema.fields.input)(data);
|
|
92
95
|
const intent = {
|
|
@@ -129,7 +132,6 @@ var Label = import_effect3.Schema.Union(import_effect3.Schema.String, import_eff
|
|
|
129
132
|
})))));
|
|
130
133
|
var INTENT_PLUGIN = "dxos.org/plugin/intent";
|
|
131
134
|
var INTENT_ACTION = `${INTENT_PLUGIN}/action`;
|
|
132
|
-
var IntentAction;
|
|
133
135
|
(function(IntentAction2) {
|
|
134
136
|
class Track extends import_effect2.Schema.TaggedClass()(`${INTENT_ACTION}/track`, {
|
|
135
137
|
input: import_effect2.Schema.Struct({
|
|
@@ -149,13 +151,12 @@ var IntentAction;
|
|
|
149
151
|
}
|
|
150
152
|
IntentAction2.ShowUndo = ShowUndo;
|
|
151
153
|
})(IntentAction || (IntentAction = {}));
|
|
154
|
+
var IntentAction;
|
|
152
155
|
var BaseError = class extends Error {
|
|
153
156
|
constructor(code, message, context) {
|
|
154
157
|
super(message ?? code, {
|
|
155
158
|
cause: context
|
|
156
|
-
});
|
|
157
|
-
this.code = code;
|
|
158
|
-
this.context = context;
|
|
159
|
+
}), this.code = code, this.context = context;
|
|
159
160
|
this.name = code;
|
|
160
161
|
Object.setPrototypeOf(this, new.target.prototype);
|
|
161
162
|
}
|
|
@@ -196,9 +197,33 @@ var lazy = (c) => async (props) => {
|
|
|
196
197
|
const { default: getCapability } = await c();
|
|
197
198
|
return async () => getCapability(props);
|
|
198
199
|
};
|
|
199
|
-
var
|
|
200
|
-
constructor({ activate, reset }) {
|
|
201
|
-
this.
|
|
200
|
+
var PluginContext = class {
|
|
201
|
+
constructor({ registry, activate, reset }) {
|
|
202
|
+
this._capabilityImpls = import_rx_react.Rx.family(() => {
|
|
203
|
+
return import_rx_react.Rx.make([]).pipe(import_rx_react.Rx.keepAlive);
|
|
204
|
+
});
|
|
205
|
+
this._capabilities = import_rx_react.Rx.family((id) => {
|
|
206
|
+
return import_rx_react.Rx.make((get) => {
|
|
207
|
+
const current = get(this._capabilityImpls(id));
|
|
208
|
+
return current.map((c) => c.implementation);
|
|
209
|
+
});
|
|
210
|
+
});
|
|
211
|
+
this._capability = import_rx_react.Rx.family((id) => {
|
|
212
|
+
return import_rx_react.Rx.make((get) => {
|
|
213
|
+
const current = get(this._capabilities(id));
|
|
214
|
+
(0, import_invariant.invariant)(current.length > 0, `No capability found for ${id}`, {
|
|
215
|
+
F: __dxlog_file,
|
|
216
|
+
L: 117,
|
|
217
|
+
S: this,
|
|
218
|
+
A: [
|
|
219
|
+
"current.length > 0",
|
|
220
|
+
"`No capability found for ${id}`"
|
|
221
|
+
]
|
|
222
|
+
});
|
|
223
|
+
return current[0];
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
this._registry = registry;
|
|
202
227
|
this.activate = activate;
|
|
203
228
|
this.reset = reset;
|
|
204
229
|
}
|
|
@@ -206,22 +231,22 @@ var PluginsContext = class {
|
|
|
206
231
|
* @internal
|
|
207
232
|
*/
|
|
208
233
|
contributeCapability({ module: moduleId, interface: interfaceDef, implementation }) {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
});
|
|
214
|
-
current = (0, import_signals_core.untracked)(() => object.value);
|
|
215
|
-
this._definedCapabilities.set(interfaceDef.identifier, current);
|
|
234
|
+
const current = this._registry.get(this._capabilityImpls(interfaceDef.identifier));
|
|
235
|
+
const capability = new CapabilityImpl(moduleId, implementation);
|
|
236
|
+
if (current.includes(capability)) {
|
|
237
|
+
return;
|
|
216
238
|
}
|
|
217
|
-
|
|
239
|
+
this._registry.set(this._capabilityImpls(interfaceDef.identifier), [
|
|
240
|
+
...current,
|
|
241
|
+
capability
|
|
242
|
+
]);
|
|
218
243
|
(0, import_log2.log)("capability contributed", {
|
|
219
244
|
id: interfaceDef.identifier,
|
|
220
245
|
moduleId,
|
|
221
|
-
count:
|
|
246
|
+
count: current.length
|
|
222
247
|
}, {
|
|
223
248
|
F: __dxlog_file,
|
|
224
|
-
L:
|
|
249
|
+
L: 161,
|
|
225
250
|
S: this,
|
|
226
251
|
C: (f, a) => f(...a)
|
|
227
252
|
});
|
|
@@ -230,19 +255,19 @@ var PluginsContext = class {
|
|
|
230
255
|
* @internal
|
|
231
256
|
*/
|
|
232
257
|
removeCapability(interfaceDef, implementation) {
|
|
233
|
-
const current = this.
|
|
234
|
-
if (
|
|
258
|
+
const current = this._registry.get(this._capabilityImpls(interfaceDef.identifier));
|
|
259
|
+
if (current.length === 0) {
|
|
235
260
|
return;
|
|
236
261
|
}
|
|
237
|
-
const
|
|
238
|
-
if (
|
|
239
|
-
|
|
262
|
+
const next = current.filter((c) => c.implementation !== implementation);
|
|
263
|
+
if (next.length !== current.length) {
|
|
264
|
+
this._registry.set(this._capabilityImpls(interfaceDef.identifier), next);
|
|
240
265
|
(0, import_log2.log)("capability removed", {
|
|
241
266
|
id: interfaceDef.identifier,
|
|
242
|
-
count:
|
|
267
|
+
count: current.length
|
|
243
268
|
}, {
|
|
244
269
|
F: __dxlog_file,
|
|
245
|
-
L:
|
|
270
|
+
L: 180,
|
|
246
271
|
S: this,
|
|
247
272
|
C: (f, a) => f(...a)
|
|
248
273
|
});
|
|
@@ -251,63 +276,64 @@ var PluginsContext = class {
|
|
|
251
276
|
id: interfaceDef.identifier
|
|
252
277
|
}, {
|
|
253
278
|
F: __dxlog_file,
|
|
254
|
-
L:
|
|
279
|
+
L: 182,
|
|
255
280
|
S: this,
|
|
256
281
|
C: (f, a) => f(...a)
|
|
257
282
|
});
|
|
258
283
|
}
|
|
259
284
|
}
|
|
260
285
|
/**
|
|
261
|
-
*
|
|
286
|
+
* Get the Rx reference to the available capabilities for a given interface.
|
|
287
|
+
* Primarily useful for deriving other Rx values based on the capabilities or
|
|
288
|
+
* for subscribing to changes in the capabilities.
|
|
289
|
+
* @returns An Rx reference to the available capabilities.
|
|
290
|
+
*/
|
|
291
|
+
capabilities(interfaceDef) {
|
|
292
|
+
return this._capabilities(interfaceDef.identifier);
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Get the Rx reference to the available capabilities for a given interface.
|
|
296
|
+
* Primarily useful for deriving other Rx values based on the capability or
|
|
297
|
+
* for subscribing to changes in the capability.
|
|
298
|
+
* @returns An Rx reference to the available capability.
|
|
299
|
+
* @throws If no capability is found.
|
|
300
|
+
*/
|
|
301
|
+
capability(interfaceDef) {
|
|
302
|
+
return this._capability(interfaceDef.identifier);
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Get capabilities from the plugin context.
|
|
262
306
|
* @returns An array of capabilities.
|
|
263
|
-
* @reactive
|
|
264
307
|
*/
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
if (!current) {
|
|
268
|
-
const object = (0, import_live_object2.create)({
|
|
269
|
-
value: []
|
|
270
|
-
});
|
|
271
|
-
current = (0, import_signals_core.untracked)(() => object.value);
|
|
272
|
-
this._definedCapabilities.set(interfaceDef.identifier, current);
|
|
273
|
-
}
|
|
274
|
-
const capabilities = filter ? current.filter((c) => filter(c.implementation, c.moduleId)) : current;
|
|
275
|
-
return capabilities.map((c) => c.implementation);
|
|
308
|
+
getCapabilities(interfaceDef) {
|
|
309
|
+
return this._registry.get(this.capabilities(interfaceDef));
|
|
276
310
|
}
|
|
277
311
|
/**
|
|
278
312
|
* Requests a single capability from the plugin context.
|
|
279
313
|
* @returns The capability.
|
|
280
314
|
* @throws If no capability is found.
|
|
281
|
-
* @reactive
|
|
282
315
|
*/
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
(0, import_invariant.invariant)(capability, `No capability found for ${interfaceDef.identifier}`, {
|
|
286
|
-
F: __dxlog_file,
|
|
287
|
-
L: 199,
|
|
288
|
-
S: this,
|
|
289
|
-
A: [
|
|
290
|
-
"capability",
|
|
291
|
-
"`No capability found for ${interfaceDef.identifier}`"
|
|
292
|
-
]
|
|
293
|
-
});
|
|
294
|
-
return capability;
|
|
316
|
+
getCapability(interfaceDef) {
|
|
317
|
+
return this._registry.get(this.capability(interfaceDef));
|
|
295
318
|
}
|
|
296
319
|
/**
|
|
297
|
-
* Waits for a capability to be
|
|
320
|
+
* Waits for a capability to be available.
|
|
298
321
|
* @returns The capability.
|
|
299
322
|
*/
|
|
300
|
-
async waitForCapability(interfaceDef
|
|
323
|
+
async waitForCapability(interfaceDef) {
|
|
324
|
+
const [capability] = this.getCapabilities(interfaceDef);
|
|
325
|
+
if (capability) {
|
|
326
|
+
return capability;
|
|
327
|
+
}
|
|
301
328
|
const trigger = new import_async.Trigger();
|
|
302
|
-
const
|
|
303
|
-
|
|
304
|
-
if (capabilities[0]) {
|
|
329
|
+
const cancel = this._registry.subscribe(this.capabilities(interfaceDef), (capabilities) => {
|
|
330
|
+
if (capabilities.length > 0) {
|
|
305
331
|
trigger.wake(capabilities[0]);
|
|
306
332
|
}
|
|
307
333
|
});
|
|
308
|
-
const
|
|
309
|
-
|
|
310
|
-
return
|
|
334
|
+
const result = await trigger.wait();
|
|
335
|
+
cancel();
|
|
336
|
+
return result;
|
|
311
337
|
}
|
|
312
338
|
async activatePromise(event) {
|
|
313
339
|
return this.activate(event).pipe(import_effect4.Effect.runPromise);
|
|
@@ -341,15 +367,17 @@ var isPromise = (value) => {
|
|
|
341
367
|
return value !== null && typeof value === "object" && "then" in value;
|
|
342
368
|
};
|
|
343
369
|
var PluginManager = class {
|
|
344
|
-
constructor({ pluginLoader, plugins = [], core = plugins.map(({ meta }) => meta.id), enabled = [] }) {
|
|
370
|
+
constructor({ pluginLoader, plugins = [], core = plugins.map(({ meta }) => meta.id), enabled = [], registry }) {
|
|
345
371
|
this.activation = new import_async2.Event();
|
|
346
|
-
this.
|
|
372
|
+
this._capabilities = /* @__PURE__ */ new Map();
|
|
373
|
+
this.registry = registry ?? import_rx_react2.Registry.make();
|
|
374
|
+
this.context = new PluginContext({
|
|
375
|
+
registry: this.registry,
|
|
347
376
|
activate: (event) => this._activate(event),
|
|
348
377
|
reset: (id) => this._reset(id)
|
|
349
378
|
});
|
|
350
|
-
this._capabilities = /* @__PURE__ */ new Map();
|
|
351
379
|
this._pluginLoader = pluginLoader;
|
|
352
|
-
this._state = (0,
|
|
380
|
+
this._state = (0, import_live_object2.live)({
|
|
353
381
|
plugins,
|
|
354
382
|
core,
|
|
355
383
|
enabled,
|
|
@@ -423,12 +451,12 @@ var PluginManager = class {
|
|
|
423
451
|
* @param id The id of the plugin.
|
|
424
452
|
*/
|
|
425
453
|
async add(id) {
|
|
426
|
-
return (0,
|
|
454
|
+
return (0, import_signals_core.untracked)(async () => {
|
|
427
455
|
(0, import_log3.log)("add plugin", {
|
|
428
456
|
id
|
|
429
457
|
}, {
|
|
430
458
|
F: __dxlog_file2,
|
|
431
|
-
L:
|
|
459
|
+
L: 154,
|
|
432
460
|
S: this,
|
|
433
461
|
C: (f, a) => f(...a)
|
|
434
462
|
});
|
|
@@ -442,12 +470,12 @@ var PluginManager = class {
|
|
|
442
470
|
* @param id The id of the plugin.
|
|
443
471
|
*/
|
|
444
472
|
enable(id) {
|
|
445
|
-
return (0,
|
|
473
|
+
return (0, import_signals_core.untracked)(async () => {
|
|
446
474
|
(0, import_log3.log)("enable plugin", {
|
|
447
475
|
id
|
|
448
476
|
}, {
|
|
449
477
|
F: __dxlog_file2,
|
|
450
|
-
L:
|
|
478
|
+
L: 167,
|
|
451
479
|
S: this,
|
|
452
480
|
C: (f, a) => f(...a)
|
|
453
481
|
});
|
|
@@ -468,7 +496,7 @@ var PluginManager = class {
|
|
|
468
496
|
]
|
|
469
497
|
}, {
|
|
470
498
|
F: __dxlog_file2,
|
|
471
|
-
L:
|
|
499
|
+
L: 182,
|
|
472
500
|
S: this,
|
|
473
501
|
C: (f, a) => f(...a)
|
|
474
502
|
});
|
|
@@ -483,12 +511,12 @@ var PluginManager = class {
|
|
|
483
511
|
* @param id The id of the plugin.
|
|
484
512
|
*/
|
|
485
513
|
remove(id) {
|
|
486
|
-
return (0,
|
|
514
|
+
return (0, import_signals_core.untracked)(() => {
|
|
487
515
|
(0, import_log3.log)("remove plugin", {
|
|
488
516
|
id
|
|
489
517
|
}, {
|
|
490
518
|
F: __dxlog_file2,
|
|
491
|
-
L:
|
|
519
|
+
L: 200,
|
|
492
520
|
S: this,
|
|
493
521
|
C: (f, a) => f(...a)
|
|
494
522
|
});
|
|
@@ -505,12 +533,12 @@ var PluginManager = class {
|
|
|
505
533
|
* @param id The id of the plugin.
|
|
506
534
|
*/
|
|
507
535
|
disable(id) {
|
|
508
|
-
return (0,
|
|
536
|
+
return (0, import_signals_core.untracked)(async () => {
|
|
509
537
|
(0, import_log3.log)("disable plugin", {
|
|
510
538
|
id
|
|
511
539
|
}, {
|
|
512
540
|
F: __dxlog_file2,
|
|
513
|
-
L:
|
|
541
|
+
L: 217,
|
|
514
542
|
S: this,
|
|
515
543
|
C: (f, a) => f(...a)
|
|
516
544
|
});
|
|
@@ -538,7 +566,7 @@ var PluginManager = class {
|
|
|
538
566
|
* @returns Whether the activation was successful.
|
|
539
567
|
*/
|
|
540
568
|
activate(event) {
|
|
541
|
-
return (0,
|
|
569
|
+
return (0, import_signals_core.untracked)(() => import_effect5.Effect.runPromise(this._activate(event)));
|
|
542
570
|
}
|
|
543
571
|
/**
|
|
544
572
|
* Deactivates all of the modules for a plugin.
|
|
@@ -546,7 +574,7 @@ var PluginManager = class {
|
|
|
546
574
|
* @returns Whether the deactivation was successful.
|
|
547
575
|
*/
|
|
548
576
|
deactivate(id) {
|
|
549
|
-
return (0,
|
|
577
|
+
return (0, import_signals_core.untracked)(() => import_effect5.Effect.runPromise(this._deactivate(id)));
|
|
550
578
|
}
|
|
551
579
|
/**
|
|
552
580
|
* Re-activates the modules that were activated by the event.
|
|
@@ -554,15 +582,15 @@ var PluginManager = class {
|
|
|
554
582
|
* @returns Whether the reset was successful.
|
|
555
583
|
*/
|
|
556
584
|
reset(event) {
|
|
557
|
-
return (0,
|
|
585
|
+
return (0, import_signals_core.untracked)(() => import_effect5.Effect.runPromise(this._reset(event)));
|
|
558
586
|
}
|
|
559
587
|
_addPlugin(plugin) {
|
|
560
|
-
(0,
|
|
588
|
+
(0, import_signals_core.untracked)(() => {
|
|
561
589
|
(0, import_log3.log)("add plugin", {
|
|
562
590
|
id: plugin.meta.id
|
|
563
591
|
}, {
|
|
564
592
|
F: __dxlog_file2,
|
|
565
|
-
L:
|
|
593
|
+
L: 270,
|
|
566
594
|
S: this,
|
|
567
595
|
C: (f, a) => f(...a)
|
|
568
596
|
});
|
|
@@ -572,12 +600,12 @@ var PluginManager = class {
|
|
|
572
600
|
});
|
|
573
601
|
}
|
|
574
602
|
_removePlugin(id) {
|
|
575
|
-
(0,
|
|
603
|
+
(0, import_signals_core.untracked)(() => {
|
|
576
604
|
(0, import_log3.log)("remove plugin", {
|
|
577
605
|
id
|
|
578
606
|
}, {
|
|
579
607
|
F: __dxlog_file2,
|
|
580
|
-
L:
|
|
608
|
+
L: 279,
|
|
581
609
|
S: this,
|
|
582
610
|
C: (f, a) => f(...a)
|
|
583
611
|
});
|
|
@@ -588,12 +616,12 @@ var PluginManager = class {
|
|
|
588
616
|
});
|
|
589
617
|
}
|
|
590
618
|
_addModule(module2) {
|
|
591
|
-
(0,
|
|
619
|
+
(0, import_signals_core.untracked)(() => {
|
|
592
620
|
(0, import_log3.log)("add module", {
|
|
593
621
|
id: module2.id
|
|
594
622
|
}, {
|
|
595
623
|
F: __dxlog_file2,
|
|
596
|
-
L:
|
|
624
|
+
L: 289,
|
|
597
625
|
S: this,
|
|
598
626
|
C: (f, a) => f(...a)
|
|
599
627
|
});
|
|
@@ -603,12 +631,12 @@ var PluginManager = class {
|
|
|
603
631
|
});
|
|
604
632
|
}
|
|
605
633
|
_removeModule(id) {
|
|
606
|
-
(0,
|
|
634
|
+
(0, import_signals_core.untracked)(() => {
|
|
607
635
|
(0, import_log3.log)("remove module", {
|
|
608
636
|
id
|
|
609
637
|
}, {
|
|
610
638
|
F: __dxlog_file2,
|
|
611
|
-
L:
|
|
639
|
+
L: 298,
|
|
612
640
|
S: this,
|
|
613
641
|
C: (f, a) => f(...a)
|
|
614
642
|
});
|
|
@@ -634,7 +662,7 @@ var PluginManager = class {
|
|
|
634
662
|
return this._getInactiveModules().filter((module2) => getEvents(module2.activatesOn).map(eventKey).includes(key));
|
|
635
663
|
}
|
|
636
664
|
_setPendingResetByModule(module2) {
|
|
637
|
-
return (0,
|
|
665
|
+
return (0, import_signals_core.untracked)(() => {
|
|
638
666
|
const activationEvents = getEvents(module2.activatesOn).map(eventKey).filter((key) => this._state.eventsFired.includes(key));
|
|
639
667
|
const pendingReset = Array.from(new Set(activationEvents)).filter((event) => !this._state.pendingReset.includes(event));
|
|
640
668
|
if (pendingReset.length > 0) {
|
|
@@ -642,7 +670,7 @@ var PluginManager = class {
|
|
|
642
670
|
events: pendingReset
|
|
643
671
|
}, {
|
|
644
672
|
F: __dxlog_file2,
|
|
645
|
-
L:
|
|
673
|
+
L: 336,
|
|
646
674
|
S: this,
|
|
647
675
|
C: (f, a) => f(...a)
|
|
648
676
|
});
|
|
@@ -661,7 +689,7 @@ var PluginManager = class {
|
|
|
661
689
|
key
|
|
662
690
|
}, {
|
|
663
691
|
F: __dxlog_file2,
|
|
664
|
-
L:
|
|
692
|
+
L: 349,
|
|
665
693
|
S: this,
|
|
666
694
|
C: (f, a) => f(...a)
|
|
667
695
|
});
|
|
@@ -682,7 +710,7 @@ var PluginManager = class {
|
|
|
682
710
|
key
|
|
683
711
|
}, {
|
|
684
712
|
F: __dxlog_file2,
|
|
685
|
-
L:
|
|
713
|
+
L: 365,
|
|
686
714
|
S: this,
|
|
687
715
|
C: (f, a) => f(...a)
|
|
688
716
|
});
|
|
@@ -696,7 +724,7 @@ var PluginManager = class {
|
|
|
696
724
|
modules: modules.map((module2) => module2.id)
|
|
697
725
|
}, {
|
|
698
726
|
F: __dxlog_file2,
|
|
699
|
-
L:
|
|
727
|
+
L: 372,
|
|
700
728
|
S: this,
|
|
701
729
|
C: (f, a) => f(...a)
|
|
702
730
|
});
|
|
@@ -738,7 +766,7 @@ var PluginManager = class {
|
|
|
738
766
|
key
|
|
739
767
|
}, {
|
|
740
768
|
F: __dxlog_file2,
|
|
741
|
-
L:
|
|
769
|
+
L: 406,
|
|
742
770
|
S: this,
|
|
743
771
|
C: (f, a) => f(...a)
|
|
744
772
|
});
|
|
@@ -754,7 +782,7 @@ var PluginManager = class {
|
|
|
754
782
|
module: module2.id
|
|
755
783
|
}, {
|
|
756
784
|
F: __dxlog_file2,
|
|
757
|
-
L:
|
|
785
|
+
L: 421,
|
|
758
786
|
S: this,
|
|
759
787
|
C: (f, a) => f(...a)
|
|
760
788
|
});
|
|
@@ -783,7 +811,7 @@ var PluginManager = class {
|
|
|
783
811
|
module: module2.id
|
|
784
812
|
}, {
|
|
785
813
|
F: __dxlog_file2,
|
|
786
|
-
L:
|
|
814
|
+
L: 444,
|
|
787
815
|
S: this,
|
|
788
816
|
C: (f, a) => f(...a)
|
|
789
817
|
});
|
|
@@ -812,7 +840,7 @@ var PluginManager = class {
|
|
|
812
840
|
id
|
|
813
841
|
}, {
|
|
814
842
|
F: __dxlog_file2,
|
|
815
|
-
L:
|
|
843
|
+
L: 471,
|
|
816
844
|
S: this,
|
|
817
845
|
C: (f, a) => f(...a)
|
|
818
846
|
});
|
|
@@ -821,7 +849,7 @@ var PluginManager = class {
|
|
|
821
849
|
for (const capability of capabilities) {
|
|
822
850
|
this.context.removeCapability(capability.interface, capability.implementation);
|
|
823
851
|
const program = capability.deactivate?.();
|
|
824
|
-
yield* import_effect5.Match.value(program).pipe(import_effect5.Match.when(import_effect5.Effect.isEffect, (
|
|
852
|
+
yield* import_effect5.Match.value(program).pipe(import_effect5.Match.when(import_effect5.Effect.isEffect, (effect) => effect), import_effect5.Match.when(isPromise, (promise) => import_effect5.Effect.tryPromise({
|
|
825
853
|
try: () => promise,
|
|
826
854
|
catch: (error) => error
|
|
827
855
|
})), import_effect5.Match.orElse((program2) => import_effect5.Effect.succeed(program2)));
|
|
@@ -836,7 +864,7 @@ var PluginManager = class {
|
|
|
836
864
|
id
|
|
837
865
|
}, {
|
|
838
866
|
F: __dxlog_file2,
|
|
839
|
-
L:
|
|
867
|
+
L: 497,
|
|
840
868
|
S: this,
|
|
841
869
|
C: (f, a) => f(...a)
|
|
842
870
|
});
|
|
@@ -850,7 +878,7 @@ var PluginManager = class {
|
|
|
850
878
|
key
|
|
851
879
|
}, {
|
|
852
880
|
F: __dxlog_file2,
|
|
853
|
-
L:
|
|
881
|
+
L: 505,
|
|
854
882
|
S: this,
|
|
855
883
|
C: (f, a) => f(...a)
|
|
856
884
|
});
|
|
@@ -885,10 +913,10 @@ var Plugin = class {
|
|
|
885
913
|
var definePlugin = (meta, modules) => {
|
|
886
914
|
return new Plugin(meta, modules);
|
|
887
915
|
};
|
|
888
|
-
var Capabilities;
|
|
889
916
|
(function(Capabilities2) {
|
|
890
917
|
Capabilities2.PluginManager = defineCapability("dxos.org/app-framework/capability/plugin-manager");
|
|
891
918
|
Capabilities2.Null = defineCapability("dxos.org/app-framework/capability/null");
|
|
919
|
+
Capabilities2.RxRegistry = defineCapability("dxos.org/app-framework/capability/rx-registry");
|
|
892
920
|
Capabilities2.ReactContext = defineCapability("dxos.org/app-framework/capability/react-context");
|
|
893
921
|
Capabilities2.ReactRoot = defineCapability("dxos.org/app-framework/capability/react-root");
|
|
894
922
|
Capabilities2.ReactSurface = defineCapability("dxos.org/app-framework/common/react-surface");
|
|
@@ -905,8 +933,25 @@ var Capabilities;
|
|
|
905
933
|
Capabilities2.Tools = defineCapability("dxos.org/app-framework/capability/tools");
|
|
906
934
|
Capabilities2.ArtifactDefinition = defineCapability("dxos.org/app-framework/capability/artifact-definition");
|
|
907
935
|
Capabilities2.FileUploader = defineCapability("dxos.org/app-framework/capability/file-uploader");
|
|
936
|
+
Capabilities2.AnchorSort = defineCapability("dxos.org/app-framework/capability/anchor-sort");
|
|
908
937
|
})(Capabilities || (Capabilities = {}));
|
|
909
|
-
var
|
|
938
|
+
var Capabilities;
|
|
939
|
+
(function(CollaborationActions2) {
|
|
940
|
+
class InsertContent extends import_effect6.Schema.TaggedClass()("assistant/intent-content", {
|
|
941
|
+
input: import_effect6.Schema.Struct({
|
|
942
|
+
target: import_echo_schema.Expando,
|
|
943
|
+
object: (0, import_echo_schema.Ref)(import_echo_schema.Expando),
|
|
944
|
+
at: import_effect6.Schema.optional(import_effect6.Schema.String),
|
|
945
|
+
label: import_effect6.Schema.String.pipe(import_effect6.Schema.optional)
|
|
946
|
+
}).annotations({
|
|
947
|
+
description: "Enables plugins to inject content blocks or references into a related entity."
|
|
948
|
+
}),
|
|
949
|
+
output: import_effect6.Schema.Void
|
|
950
|
+
}) {
|
|
951
|
+
}
|
|
952
|
+
CollaborationActions2.InsertContent = InsertContent;
|
|
953
|
+
})(CollaborationActions || (CollaborationActions = {}));
|
|
954
|
+
var CollaborationActions;
|
|
910
955
|
(function(Events2) {
|
|
911
956
|
Events2.Startup = defineEvent("dxos.org/app-framework/event/startup");
|
|
912
957
|
Events2.SetupReactSurface = defineEvent("dxos.org/app-framework/event/setup-react-surface");
|
|
@@ -922,6 +967,7 @@ var Events;
|
|
|
922
967
|
Events2.createStateEvent = (specifier) => defineEvent("dxos.org/app-framework/event/state", specifier);
|
|
923
968
|
Events2.LayoutReady = Events2.createStateEvent(Capabilities.Layout.identifier);
|
|
924
969
|
})(Events || (Events = {}));
|
|
970
|
+
var Events;
|
|
925
971
|
var defaultFileTypes = {
|
|
926
972
|
images: [
|
|
927
973
|
"png",
|
|
@@ -941,11 +987,11 @@ var defaultFileTypes = {
|
|
|
941
987
|
"md"
|
|
942
988
|
]
|
|
943
989
|
};
|
|
944
|
-
var FileInfoSchema =
|
|
945
|
-
name:
|
|
946
|
-
type:
|
|
947
|
-
url:
|
|
948
|
-
cid:
|
|
990
|
+
var FileInfoSchema = import_effect7.Schema.Struct({
|
|
991
|
+
name: import_effect7.Schema.String,
|
|
992
|
+
type: import_effect7.Schema.String,
|
|
993
|
+
url: import_effect7.Schema.optional(import_effect7.Schema.String),
|
|
994
|
+
cid: import_effect7.Schema.optional(import_effect7.Schema.String)
|
|
949
995
|
});
|
|
950
996
|
var IntentPlugin = () => definePlugin({
|
|
951
997
|
id: INTENT_PLUGIN,
|
|
@@ -960,336 +1006,355 @@ var IntentPlugin = () => definePlugin({
|
|
|
960
1006
|
activatesAfter: [
|
|
961
1007
|
Events.DispatcherReady
|
|
962
1008
|
],
|
|
963
|
-
activate: lazy(() => import("./intent-dispatcher-
|
|
1009
|
+
activate: lazy(() => import("./intent-dispatcher-LFXZJTAS.cjs"))
|
|
964
1010
|
})
|
|
965
1011
|
]);
|
|
966
1012
|
var LAYOUT_PLUGIN = "dxos.org/plugin/layout";
|
|
967
1013
|
var LAYOUT_ACTION = `${LAYOUT_PLUGIN}/action`;
|
|
968
|
-
var LayoutAction;
|
|
969
1014
|
(function(LayoutAction2) {
|
|
970
1015
|
LayoutAction2.UPDATE_LAYOUT = `${LAYOUT_ACTION}/update-layout`;
|
|
971
|
-
class UpdateLayout extends
|
|
972
|
-
input:
|
|
973
|
-
part:
|
|
1016
|
+
class UpdateLayout extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1017
|
+
input: import_effect8.Schema.Struct({
|
|
1018
|
+
part: import_effect8.Schema.String.annotations({
|
|
974
1019
|
description: "The part of the layout to mutate."
|
|
975
1020
|
}),
|
|
976
|
-
subject:
|
|
1021
|
+
subject: import_effect8.Schema.optional(import_effect8.Schema.Any.annotations({
|
|
977
1022
|
description: "The subject of the layout update."
|
|
978
1023
|
})),
|
|
979
|
-
options:
|
|
980
|
-
key:
|
|
981
|
-
value:
|
|
1024
|
+
options: import_effect8.Schema.optional(import_effect8.Schema.Record({
|
|
1025
|
+
key: import_effect8.Schema.String,
|
|
1026
|
+
value: import_effect8.Schema.Any
|
|
982
1027
|
}).annotations({
|
|
983
1028
|
description: "Additional options for the layout action."
|
|
984
1029
|
}))
|
|
985
1030
|
}),
|
|
986
|
-
output:
|
|
1031
|
+
output: import_effect8.Schema.Void
|
|
987
1032
|
}) {
|
|
988
1033
|
}
|
|
989
1034
|
LayoutAction2.UpdateLayout = UpdateLayout;
|
|
990
|
-
class SetLayoutMode extends
|
|
991
|
-
input:
|
|
992
|
-
part:
|
|
1035
|
+
class SetLayoutMode extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1036
|
+
input: import_effect8.Schema.Struct({
|
|
1037
|
+
part: import_effect8.Schema.Literal("mode").annotations({
|
|
993
1038
|
description: "Setting the layout mode."
|
|
994
1039
|
}),
|
|
995
|
-
subject:
|
|
1040
|
+
subject: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
|
|
996
1041
|
description: "Item which is the subject of the new layout mode."
|
|
997
1042
|
})),
|
|
998
|
-
options:
|
|
999
|
-
mode:
|
|
1043
|
+
options: import_effect8.Schema.Union(import_effect8.Schema.Struct({
|
|
1044
|
+
mode: import_effect8.Schema.String.annotations({
|
|
1000
1045
|
description: "The new layout mode."
|
|
1001
1046
|
})
|
|
1002
|
-
}),
|
|
1003
|
-
revert:
|
|
1047
|
+
}), import_effect8.Schema.Struct({
|
|
1048
|
+
revert: import_effect8.Schema.Boolean.annotations({
|
|
1004
1049
|
description: "Revert to the previous layout mode."
|
|
1005
1050
|
})
|
|
1006
1051
|
}))
|
|
1007
1052
|
}),
|
|
1008
|
-
output:
|
|
1053
|
+
output: import_effect8.Schema.Void
|
|
1009
1054
|
}) {
|
|
1010
1055
|
}
|
|
1011
1056
|
LayoutAction2.SetLayoutMode = SetLayoutMode;
|
|
1012
|
-
class UpdateSidebar extends
|
|
1013
|
-
input:
|
|
1014
|
-
part:
|
|
1057
|
+
class UpdateSidebar extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1058
|
+
input: import_effect8.Schema.Struct({
|
|
1059
|
+
part: import_effect8.Schema.Literal("sidebar").annotations({
|
|
1015
1060
|
description: "Updating the sidebar."
|
|
1016
1061
|
}),
|
|
1017
|
-
subject:
|
|
1062
|
+
subject: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
|
|
1018
1063
|
description: "URI of the component to display in the sidebar."
|
|
1019
1064
|
})),
|
|
1020
|
-
options:
|
|
1021
|
-
state:
|
|
1065
|
+
options: import_effect8.Schema.optional(import_effect8.Schema.Struct({
|
|
1066
|
+
state: import_effect8.Schema.Literal("closed", "collapsed", "expanded").annotations({
|
|
1022
1067
|
description: "Whether the sidebar is closed, collapsed, or expanded."
|
|
1023
1068
|
})
|
|
1024
1069
|
}))
|
|
1025
1070
|
}),
|
|
1026
|
-
output:
|
|
1071
|
+
output: import_effect8.Schema.Void
|
|
1027
1072
|
}) {
|
|
1028
1073
|
}
|
|
1029
1074
|
LayoutAction2.UpdateSidebar = UpdateSidebar;
|
|
1030
|
-
class UpdateComplementary extends
|
|
1031
|
-
input:
|
|
1032
|
-
part:
|
|
1075
|
+
class UpdateComplementary extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1076
|
+
input: import_effect8.Schema.Struct({
|
|
1077
|
+
part: import_effect8.Schema.Literal("complementary").annotations({
|
|
1033
1078
|
description: "Updating the complementary sidebar."
|
|
1034
1079
|
}),
|
|
1035
|
-
subject:
|
|
1080
|
+
subject: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
|
|
1036
1081
|
description: "URI of the component to display in the complementary area."
|
|
1037
1082
|
})),
|
|
1038
|
-
options:
|
|
1039
|
-
state:
|
|
1083
|
+
options: import_effect8.Schema.optional(import_effect8.Schema.Struct({
|
|
1084
|
+
state: import_effect8.Schema.Literal("closed", "collapsed", "expanded").annotations({
|
|
1040
1085
|
description: "Whether the complementary sidebar is closed, collapsed, or expanded."
|
|
1041
1086
|
})
|
|
1042
1087
|
}))
|
|
1043
1088
|
}),
|
|
1044
|
-
output:
|
|
1089
|
+
output: import_effect8.Schema.Void
|
|
1045
1090
|
}) {
|
|
1046
1091
|
}
|
|
1047
1092
|
LayoutAction2.UpdateComplementary = UpdateComplementary;
|
|
1048
|
-
class UpdateDialog extends
|
|
1049
|
-
input:
|
|
1050
|
-
part:
|
|
1093
|
+
class UpdateDialog extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1094
|
+
input: import_effect8.Schema.Struct({
|
|
1095
|
+
part: import_effect8.Schema.Literal("dialog").annotations({
|
|
1051
1096
|
description: "Updating the dialog."
|
|
1052
1097
|
}),
|
|
1053
|
-
subject:
|
|
1098
|
+
subject: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
|
|
1054
1099
|
description: "URI of the component to display in the dialog."
|
|
1055
1100
|
})),
|
|
1056
|
-
options:
|
|
1057
|
-
state:
|
|
1101
|
+
options: import_effect8.Schema.Struct({
|
|
1102
|
+
state: import_effect8.Schema.optional(import_effect8.Schema.Boolean.annotations({
|
|
1058
1103
|
description: "Whether the dialog is open or closed."
|
|
1059
1104
|
})),
|
|
1060
|
-
|
|
1105
|
+
type: import_effect8.Schema.optional(import_effect8.Schema.Literal("default", "alert").annotations({
|
|
1106
|
+
description: "The type of dialog."
|
|
1107
|
+
})),
|
|
1108
|
+
blockAlign: import_effect8.Schema.optional(import_effect8.Schema.Literal("start", "center", "end").annotations({
|
|
1061
1109
|
description: "The alignment of the dialog."
|
|
1062
1110
|
})),
|
|
1063
|
-
|
|
1064
|
-
description: "
|
|
1111
|
+
overlayClasses: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
|
|
1112
|
+
description: "Additional classes for the dialog overlay."
|
|
1065
1113
|
})),
|
|
1066
|
-
|
|
1067
|
-
key:
|
|
1068
|
-
value:
|
|
1114
|
+
overlayStyle: import_effect8.Schema.optional(import_effect8.Schema.Record({
|
|
1115
|
+
key: import_effect8.Schema.String,
|
|
1116
|
+
value: import_effect8.Schema.Any
|
|
1117
|
+
}).annotations({
|
|
1118
|
+
description: "Additional styles for the dialog overlay."
|
|
1119
|
+
})),
|
|
1120
|
+
props: import_effect8.Schema.optional(import_effect8.Schema.Record({
|
|
1121
|
+
key: import_effect8.Schema.String,
|
|
1122
|
+
value: import_effect8.Schema.Any
|
|
1069
1123
|
}).annotations({
|
|
1070
1124
|
description: "Additional props for the dialog."
|
|
1071
1125
|
}))
|
|
1072
1126
|
})
|
|
1073
1127
|
}),
|
|
1074
|
-
output:
|
|
1128
|
+
output: import_effect8.Schema.Void
|
|
1075
1129
|
}) {
|
|
1076
1130
|
}
|
|
1077
1131
|
LayoutAction2.UpdateDialog = UpdateDialog;
|
|
1078
|
-
class UpdatePopover extends
|
|
1079
|
-
input:
|
|
1080
|
-
part:
|
|
1132
|
+
class UpdatePopover extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1133
|
+
input: import_effect8.Schema.Struct({
|
|
1134
|
+
part: import_effect8.Schema.Literal("popover").annotations({
|
|
1081
1135
|
description: "Updating the popover."
|
|
1082
1136
|
}),
|
|
1083
|
-
subject:
|
|
1084
|
-
description: "URI of the component to display in the popover."
|
|
1137
|
+
subject: import_effect8.Schema.optional(import_effect8.Schema.Any.annotations({
|
|
1138
|
+
description: "URI of the component to display in the popover or data to pass to the popover."
|
|
1085
1139
|
})),
|
|
1086
|
-
options:
|
|
1087
|
-
|
|
1088
|
-
description: "The id of the element to anchor the popover to."
|
|
1089
|
-
}),
|
|
1090
|
-
side: import_effect7.Schema.optional(import_effect7.Schema.Literal("top", "right", "bottom", "left").annotations({
|
|
1140
|
+
options: import_effect8.Schema.Struct({
|
|
1141
|
+
side: import_effect8.Schema.optional(import_effect8.Schema.Literal("top", "right", "bottom", "left").annotations({
|
|
1091
1142
|
description: "The side of the anchor."
|
|
1092
1143
|
})),
|
|
1093
|
-
state:
|
|
1144
|
+
state: import_effect8.Schema.optional(import_effect8.Schema.Boolean.annotations({
|
|
1094
1145
|
description: "Whether the popover is open or closed."
|
|
1095
1146
|
})),
|
|
1096
|
-
props:
|
|
1097
|
-
key:
|
|
1098
|
-
value:
|
|
1147
|
+
props: import_effect8.Schema.optional(import_effect8.Schema.Record({
|
|
1148
|
+
key: import_effect8.Schema.String,
|
|
1149
|
+
value: import_effect8.Schema.Any
|
|
1099
1150
|
}).annotations({
|
|
1100
1151
|
description: "Additional props for the popover."
|
|
1101
1152
|
}))
|
|
1102
|
-
})
|
|
1153
|
+
}).pipe(import_effect8.Schema.extend(import_effect8.Schema.Union(import_effect8.Schema.Struct({
|
|
1154
|
+
variant: import_effect8.Schema.Literal("virtual"),
|
|
1155
|
+
anchor: import_effect8.Schema.Any.annotations({
|
|
1156
|
+
description: "The DOM element to anchor the popover to."
|
|
1157
|
+
})
|
|
1158
|
+
}), import_effect8.Schema.Struct({
|
|
1159
|
+
variant: import_effect8.Schema.optional(import_effect8.Schema.Literal("react")),
|
|
1160
|
+
anchorId: import_effect8.Schema.String.annotations({
|
|
1161
|
+
description: "An id that can be used to determine whether to render the anchor subcomponent."
|
|
1162
|
+
})
|
|
1163
|
+
}))))
|
|
1103
1164
|
}),
|
|
1104
|
-
output:
|
|
1165
|
+
output: import_effect8.Schema.Void
|
|
1105
1166
|
}) {
|
|
1106
1167
|
}
|
|
1107
1168
|
LayoutAction2.UpdatePopover = UpdatePopover;
|
|
1108
|
-
LayoutAction2.Toast =
|
|
1109
|
-
id:
|
|
1169
|
+
LayoutAction2.Toast = import_effect8.Schema.Struct({
|
|
1170
|
+
id: import_effect8.Schema.String.annotations({
|
|
1110
1171
|
description: "The id of the toast."
|
|
1111
1172
|
}),
|
|
1112
|
-
title:
|
|
1173
|
+
title: import_effect8.Schema.optional(Label.annotations({
|
|
1113
1174
|
description: "The title of the toast."
|
|
1114
1175
|
})),
|
|
1115
|
-
description:
|
|
1176
|
+
description: import_effect8.Schema.optional(Label.annotations({
|
|
1116
1177
|
description: "The description of the toast."
|
|
1117
1178
|
})),
|
|
1118
|
-
icon:
|
|
1179
|
+
icon: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
|
|
1119
1180
|
description: "The icon of the toast."
|
|
1120
1181
|
})),
|
|
1121
|
-
duration:
|
|
1182
|
+
duration: import_effect8.Schema.optional(import_effect8.Schema.Number.annotations({
|
|
1122
1183
|
description: "The duration of the toast."
|
|
1123
1184
|
})),
|
|
1124
|
-
closeLabel:
|
|
1185
|
+
closeLabel: import_effect8.Schema.optional(Label.annotations({
|
|
1125
1186
|
description: "The label of the close button."
|
|
1126
1187
|
})),
|
|
1127
|
-
actionLabel:
|
|
1188
|
+
actionLabel: import_effect8.Schema.optional(Label.annotations({
|
|
1128
1189
|
description: "The label of the action button."
|
|
1129
1190
|
})),
|
|
1130
|
-
actionAlt:
|
|
1191
|
+
actionAlt: import_effect8.Schema.optional(Label.annotations({
|
|
1131
1192
|
description: "The alt text of the action button."
|
|
1132
1193
|
})),
|
|
1133
|
-
onAction:
|
|
1194
|
+
onAction: import_effect8.Schema.optional(import_effect8.Schema.Any.annotations({
|
|
1134
1195
|
description: "The action to perform when the action button is clicked."
|
|
1135
1196
|
}))
|
|
1136
1197
|
});
|
|
1137
|
-
class AddToast extends
|
|
1138
|
-
input:
|
|
1139
|
-
part:
|
|
1198
|
+
class AddToast extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1199
|
+
input: import_effect8.Schema.Struct({
|
|
1200
|
+
part: import_effect8.Schema.Literal("toast").annotations({
|
|
1140
1201
|
description: "Adding a toast."
|
|
1141
1202
|
}),
|
|
1142
1203
|
subject: LayoutAction2.Toast.annotations({
|
|
1143
1204
|
description: "The toast to add."
|
|
1144
1205
|
})
|
|
1145
1206
|
}),
|
|
1146
|
-
output:
|
|
1207
|
+
output: import_effect8.Schema.Void
|
|
1147
1208
|
}) {
|
|
1148
1209
|
}
|
|
1149
1210
|
LayoutAction2.AddToast = AddToast;
|
|
1150
|
-
class SwitchWorkspace extends
|
|
1151
|
-
input:
|
|
1152
|
-
part:
|
|
1211
|
+
class SwitchWorkspace extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1212
|
+
input: import_effect8.Schema.Struct({
|
|
1213
|
+
part: import_effect8.Schema.Literal("workspace").annotations({
|
|
1153
1214
|
description: "Switching the workspace."
|
|
1154
1215
|
}),
|
|
1155
|
-
subject:
|
|
1216
|
+
subject: import_effect8.Schema.String.annotations({
|
|
1156
1217
|
description: "The id of the workspace to switch to."
|
|
1157
1218
|
})
|
|
1158
1219
|
}),
|
|
1159
|
-
output:
|
|
1220
|
+
output: import_effect8.Schema.Void
|
|
1160
1221
|
}) {
|
|
1161
1222
|
}
|
|
1162
1223
|
LayoutAction2.SwitchWorkspace = SwitchWorkspace;
|
|
1163
|
-
class RevertWorkspace extends
|
|
1164
|
-
input:
|
|
1165
|
-
part:
|
|
1224
|
+
class RevertWorkspace extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1225
|
+
input: import_effect8.Schema.Struct({
|
|
1226
|
+
part: import_effect8.Schema.Literal("workspace").annotations({
|
|
1166
1227
|
description: "Switching the workspace."
|
|
1167
1228
|
}),
|
|
1168
|
-
options:
|
|
1169
|
-
revert:
|
|
1229
|
+
options: import_effect8.Schema.Struct({
|
|
1230
|
+
revert: import_effect8.Schema.Literal(true).annotations({
|
|
1170
1231
|
description: "Revert to the previous workspace."
|
|
1171
1232
|
})
|
|
1172
1233
|
})
|
|
1173
1234
|
}),
|
|
1174
|
-
output:
|
|
1235
|
+
output: import_effect8.Schema.Void
|
|
1175
1236
|
}) {
|
|
1176
1237
|
}
|
|
1177
1238
|
LayoutAction2.RevertWorkspace = RevertWorkspace;
|
|
1178
|
-
class Open extends
|
|
1179
|
-
input:
|
|
1180
|
-
part:
|
|
1239
|
+
class Open extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1240
|
+
input: import_effect8.Schema.Struct({
|
|
1241
|
+
part: import_effect8.Schema.Literal("main").annotations({
|
|
1181
1242
|
description: "Opening an item in the main content area."
|
|
1182
1243
|
}),
|
|
1183
|
-
subject:
|
|
1244
|
+
subject: import_effect8.Schema.Array(import_effect8.Schema.String.annotations({
|
|
1184
1245
|
description: "Ids of the items to open."
|
|
1185
1246
|
})),
|
|
1186
|
-
options:
|
|
1187
|
-
state:
|
|
1247
|
+
options: import_effect8.Schema.optional(import_effect8.Schema.Struct({
|
|
1248
|
+
state: import_effect8.Schema.optional(import_effect8.Schema.Literal(true).annotations({
|
|
1188
1249
|
description: "The items are being added."
|
|
1189
1250
|
})),
|
|
1190
|
-
variant:
|
|
1251
|
+
variant: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
|
|
1191
1252
|
description: "The variant of the item to open."
|
|
1192
1253
|
})),
|
|
1193
|
-
key:
|
|
1254
|
+
key: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
|
|
1194
1255
|
description: "If provided, will replace item with a matching key (id prefix)."
|
|
1195
1256
|
})),
|
|
1196
|
-
|
|
1257
|
+
workspace: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
|
|
1258
|
+
description: "The workspace to open the items in."
|
|
1259
|
+
})),
|
|
1260
|
+
scrollIntoView: import_effect8.Schema.optional(import_effect8.Schema.Boolean.annotations({
|
|
1197
1261
|
description: "Scroll the items into view."
|
|
1198
1262
|
})),
|
|
1199
|
-
pivotId:
|
|
1263
|
+
pivotId: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
|
|
1200
1264
|
description: "The id of the item to place new items next to."
|
|
1201
1265
|
})),
|
|
1202
|
-
positioning:
|
|
1266
|
+
positioning: import_effect8.Schema.optional(import_effect8.Schema.Union(import_effect8.Schema.Literal("start").annotations({
|
|
1203
1267
|
description: "The items are being added before the pivot item."
|
|
1204
|
-
}),
|
|
1268
|
+
}), import_effect8.Schema.Literal("end").annotations({
|
|
1205
1269
|
description: "The items are being added after the pivot item."
|
|
1206
1270
|
})))
|
|
1207
1271
|
}))
|
|
1208
1272
|
}),
|
|
1209
|
-
output:
|
|
1273
|
+
output: import_effect8.Schema.Void
|
|
1210
1274
|
}) {
|
|
1211
1275
|
}
|
|
1212
1276
|
LayoutAction2.Open = Open;
|
|
1213
|
-
class Set2 extends
|
|
1214
|
-
input:
|
|
1215
|
-
part:
|
|
1277
|
+
class Set2 extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1278
|
+
input: import_effect8.Schema.Struct({
|
|
1279
|
+
part: import_effect8.Schema.Literal("main").annotations({
|
|
1216
1280
|
description: "Setting items in the main content area."
|
|
1217
1281
|
}),
|
|
1218
|
-
subject:
|
|
1282
|
+
subject: import_effect8.Schema.Array(import_effect8.Schema.String.annotations({
|
|
1219
1283
|
description: "Ids of the items to set."
|
|
1220
1284
|
})),
|
|
1221
|
-
options:
|
|
1222
|
-
override:
|
|
1285
|
+
options: import_effect8.Schema.Struct({
|
|
1286
|
+
override: import_effect8.Schema.Literal(true).annotations({
|
|
1223
1287
|
description: "Override the current items in the main content area."
|
|
1224
1288
|
})
|
|
1225
1289
|
})
|
|
1226
1290
|
}),
|
|
1227
|
-
output:
|
|
1291
|
+
output: import_effect8.Schema.Void
|
|
1228
1292
|
}) {
|
|
1229
1293
|
}
|
|
1230
1294
|
LayoutAction2.Set = Set2;
|
|
1231
|
-
class Close extends
|
|
1232
|
-
input:
|
|
1233
|
-
part:
|
|
1295
|
+
class Close extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1296
|
+
input: import_effect8.Schema.Struct({
|
|
1297
|
+
part: import_effect8.Schema.Literal("main").annotations({
|
|
1234
1298
|
description: "Closing items in the main content area."
|
|
1235
1299
|
}),
|
|
1236
|
-
subject:
|
|
1300
|
+
subject: import_effect8.Schema.Array(import_effect8.Schema.String.annotations({
|
|
1237
1301
|
description: "Ids of the items to close."
|
|
1238
1302
|
})),
|
|
1239
|
-
options:
|
|
1240
|
-
state:
|
|
1303
|
+
options: import_effect8.Schema.Struct({
|
|
1304
|
+
state: import_effect8.Schema.Literal(false).annotations({
|
|
1241
1305
|
description: "The items are being removed."
|
|
1242
1306
|
})
|
|
1243
1307
|
})
|
|
1244
1308
|
}),
|
|
1245
|
-
output:
|
|
1309
|
+
output: import_effect8.Schema.Void
|
|
1246
1310
|
}) {
|
|
1247
1311
|
}
|
|
1248
1312
|
LayoutAction2.Close = Close;
|
|
1249
|
-
class ScrollIntoView extends
|
|
1250
|
-
input:
|
|
1251
|
-
part:
|
|
1313
|
+
class ScrollIntoView extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1314
|
+
input: import_effect8.Schema.Struct({
|
|
1315
|
+
part: import_effect8.Schema.Literal("current").annotations({
|
|
1252
1316
|
description: "Setting the current item"
|
|
1253
1317
|
}),
|
|
1254
|
-
subject:
|
|
1318
|
+
subject: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
|
|
1255
1319
|
description: "The id of the item to set as current."
|
|
1256
1320
|
})),
|
|
1257
|
-
options:
|
|
1258
|
-
key:
|
|
1259
|
-
value:
|
|
1321
|
+
options: import_effect8.Schema.optional(import_effect8.Schema.Record({
|
|
1322
|
+
key: import_effect8.Schema.String,
|
|
1323
|
+
value: import_effect8.Schema.Any
|
|
1260
1324
|
}).annotations({
|
|
1261
1325
|
description: "Additional options for the scroll into view."
|
|
1262
1326
|
}))
|
|
1263
1327
|
}),
|
|
1264
|
-
output:
|
|
1328
|
+
output: import_effect8.Schema.Void
|
|
1265
1329
|
}) {
|
|
1266
1330
|
}
|
|
1267
1331
|
LayoutAction2.ScrollIntoView = ScrollIntoView;
|
|
1268
|
-
class Expose extends
|
|
1269
|
-
input:
|
|
1270
|
-
part:
|
|
1332
|
+
class Expose extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1333
|
+
input: import_effect8.Schema.Struct({
|
|
1334
|
+
part: import_effect8.Schema.Literal("navigation").annotations({
|
|
1271
1335
|
description: "Exposing an item in the navigation area."
|
|
1272
1336
|
}),
|
|
1273
|
-
subject:
|
|
1337
|
+
subject: import_effect8.Schema.String.annotations({
|
|
1274
1338
|
description: "The id of the item to expose."
|
|
1275
1339
|
})
|
|
1276
1340
|
}),
|
|
1277
|
-
output:
|
|
1341
|
+
output: import_effect8.Schema.Void
|
|
1278
1342
|
}) {
|
|
1279
1343
|
}
|
|
1280
1344
|
LayoutAction2.Expose = Expose;
|
|
1281
1345
|
})(LayoutAction || (LayoutAction = {}));
|
|
1346
|
+
var LayoutAction;
|
|
1282
1347
|
var createSurface = (definition) => definition;
|
|
1283
|
-
var ResourceKey =
|
|
1284
|
-
key:
|
|
1285
|
-
value:
|
|
1348
|
+
var ResourceKey = import_effect9.Schema.Union(import_effect9.Schema.String, import_effect9.Schema.Record({
|
|
1349
|
+
key: import_effect9.Schema.String,
|
|
1350
|
+
value: import_effect9.Schema.Any
|
|
1286
1351
|
}));
|
|
1287
|
-
var ResourceLanguage =
|
|
1288
|
-
key:
|
|
1352
|
+
var ResourceLanguage = import_effect9.Schema.Record({
|
|
1353
|
+
key: import_effect9.Schema.String,
|
|
1289
1354
|
value: ResourceKey
|
|
1290
1355
|
});
|
|
1291
|
-
var Resource =
|
|
1292
|
-
key:
|
|
1356
|
+
var Resource = import_effect9.Schema.Record({
|
|
1357
|
+
key: import_effect9.Schema.String,
|
|
1293
1358
|
value: ResourceLanguage
|
|
1294
1359
|
});
|
|
1295
1360
|
var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/plugin-intent/intent-dispatcher.ts";
|
|
@@ -1300,12 +1365,12 @@ var isUndoable = (historyEntry) => historyEntry.length > 0 && historyEntry.every
|
|
|
1300
1365
|
var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, historyLimit = HISTORY_LIMIT } = {}) => {
|
|
1301
1366
|
const historyRef = import_effect.Effect.runSync(import_effect.Ref.make([]));
|
|
1302
1367
|
const handleIntent = (intent) => import_effect.Effect.gen(function* () {
|
|
1303
|
-
const candidates = getResolvers(
|
|
1368
|
+
const candidates = getResolvers().filter((resolver) => resolver.intent._tag === intent.id).filter((resolver) => !resolver.filter || resolver.filter(intent.data)).toSorted(import_util.byPosition);
|
|
1304
1369
|
if (candidates.length === 0) {
|
|
1305
1370
|
yield* import_effect.Effect.fail(new NoResolversError(intent.id));
|
|
1306
1371
|
}
|
|
1307
|
-
const
|
|
1308
|
-
const result = import_effect.Effect.isEffect(
|
|
1372
|
+
const effect = candidates[0].resolve(intent.data, intent.undo ?? false);
|
|
1373
|
+
const result = import_effect.Effect.isEffect(effect) ? yield* effect : yield* import_effect.Effect.promise(async () => effect);
|
|
1309
1374
|
return {
|
|
1310
1375
|
_intent: intent,
|
|
1311
1376
|
...result
|
|
@@ -1365,7 +1430,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1365
1430
|
})).catch((error) => {
|
|
1366
1431
|
import_log.log.catch(error, void 0, {
|
|
1367
1432
|
F: __dxlog_file3,
|
|
1368
|
-
L:
|
|
1433
|
+
L: 270,
|
|
1369
1434
|
S: void 0,
|
|
1370
1435
|
C: (f, a) => f(...a)
|
|
1371
1436
|
});
|
|
@@ -1419,16 +1484,14 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1419
1484
|
var defaultEffect = () => import_effect.Effect.fail(new Error("Intent runtime not ready"));
|
|
1420
1485
|
var defaultPromise = () => import_effect.Effect.runPromise(defaultEffect());
|
|
1421
1486
|
var intent_dispatcher_default = (context) => {
|
|
1422
|
-
const state = (0, import_live_object.
|
|
1487
|
+
const state = (0, import_live_object.live)({
|
|
1423
1488
|
dispatch: defaultEffect,
|
|
1424
1489
|
dispatchPromise: defaultPromise,
|
|
1425
1490
|
undo: defaultEffect,
|
|
1426
1491
|
undoPromise: defaultPromise
|
|
1427
1492
|
});
|
|
1428
|
-
const { dispatch, dispatchPromise, undo, undoPromise } = createDispatcher((
|
|
1429
|
-
|
|
1430
|
-
}).flat());
|
|
1431
|
-
const manager = context.requestCapability(Capabilities.PluginManager);
|
|
1493
|
+
const { dispatch, dispatchPromise, undo, undoPromise } = createDispatcher(() => context.getCapabilities(Capabilities.IntentResolver).flat());
|
|
1494
|
+
const manager = context.getCapability(Capabilities.PluginManager);
|
|
1432
1495
|
state.dispatch = (intentChain, depth) => {
|
|
1433
1496
|
return import_effect.Effect.gen(function* () {
|
|
1434
1497
|
yield* manager._activate(Events.SetupIntentResolver);
|
|
@@ -1446,6 +1509,7 @@ var intent_dispatcher_default = (context) => {
|
|
|
1446
1509
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1447
1510
|
0 && (module.exports = {
|
|
1448
1511
|
Capabilities,
|
|
1512
|
+
CollaborationActions,
|
|
1449
1513
|
Events,
|
|
1450
1514
|
FileInfoSchema,
|
|
1451
1515
|
INTENT_ACTION,
|
|
@@ -1457,9 +1521,9 @@ var intent_dispatcher_default = (context) => {
|
|
|
1457
1521
|
Label,
|
|
1458
1522
|
LayoutAction,
|
|
1459
1523
|
Plugin,
|
|
1524
|
+
PluginContext,
|
|
1460
1525
|
PluginManager,
|
|
1461
1526
|
PluginModule,
|
|
1462
|
-
PluginsContext,
|
|
1463
1527
|
Resource,
|
|
1464
1528
|
ResourceKey,
|
|
1465
1529
|
ResourceLanguage,
|
|
@@ -1483,4 +1547,4 @@ var intent_dispatcher_default = (context) => {
|
|
|
1483
1547
|
lazy,
|
|
1484
1548
|
oneOf
|
|
1485
1549
|
});
|
|
1486
|
-
//# sourceMappingURL=chunk-
|
|
1550
|
+
//# sourceMappingURL=chunk-HIVITTZD.cjs.map
|