@dxos/app-framework 0.8.2-main.f11618f → 0.8.2-staging.42af850
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{app-graph-builder-OHM2Z6YQ.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-DVNSCQJ5.mjs → chunk-5GE2ERNU.mjs} +314 -280
- 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-X2YC645Z.mjs → chunk-ZMXJV64L.mjs} +122 -62
- package/dist/lib/browser/chunk-ZMXJV64L.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +10 -10
- package/dist/lib/browser/{intent-dispatcher-J7QIFHLO.mjs → intent-dispatcher-ELZN5EM7.mjs} +2 -2
- package/dist/lib/browser/{intent-resolver-QV5MDMDV.mjs → intent-resolver-SGWLINTO.mjs} +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{store-XMPVLJOQ.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 +3 -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-I3CJYEBC.cjs → chunk-HIVITTZD.cjs} +156 -122
- package/dist/lib/node/chunk-HIVITTZD.cjs.map +7 -0
- package/dist/lib/node/{chunk-5UOVF3OR.cjs → chunk-Z2PMVDJ5.cjs} +155 -95
- package/dist/lib/node/chunk-Z2PMVDJ5.cjs.map +7 -0
- package/dist/lib/node/index.cjs +81 -81
- package/dist/lib/node/{intent-dispatcher-FQPJNKIZ.cjs → intent-dispatcher-LFXZJTAS.cjs} +8 -8
- package/dist/lib/node/{intent-dispatcher-FQPJNKIZ.cjs.map → intent-dispatcher-LFXZJTAS.cjs.map} +2 -2
- package/dist/lib/node/{intent-resolver-PBAOGJS6.cjs → intent-resolver-EPSFTHL6.cjs} +12 -12
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{store-N7JLYYDI.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 +39 -39
- package/dist/lib/node/worker.cjs.map +1 -1
- package/dist/lib/node-esm/{app-graph-builder-OMH534A4.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-QHXUTJHE.mjs → chunk-6IKYKERU.mjs} +122 -62
- 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-GSDBF2CK.mjs → chunk-Z2ZHH4HN.mjs} +314 -280
- package/dist/lib/node-esm/chunk-Z2ZHH4HN.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +10 -10
- package/dist/lib/node-esm/{intent-dispatcher-QDUGA7NT.mjs → intent-dispatcher-A2JCMWRD.mjs} +2 -2
- package/dist/lib/node-esm/{intent-resolver-P7TC5RBD.mjs → intent-resolver-5C4O43GK.mjs} +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{store-M2BYJL6K.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 +3 -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 +8 -8
- 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 +7 -7
- package/dist/types/src/common/file.d.ts.map +1 -1
- package/dist/types/src/common/layout.d.ts +165 -163
- 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 +28 -13
- package/dist/types/src/core/capabilities.d.ts.map +1 -1
- package/dist/types/src/core/events.d.ts.map +1 -1
- package/dist/types/src/core/manager.d.ts +6 -3
- package/dist/types/src/core/manager.d.ts.map +1 -1
- package/dist/types/src/core/plugin.d.ts +2 -2
- 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 +3 -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 +28 -21
- package/src/App.tsx +97 -47
- package/src/common/capabilities.ts +18 -7
- package/src/common/collaboration.ts +9 -9
- package/src/common/file.ts +7 -7
- package/src/common/layout.ts +156 -136
- package/src/common/translations.ts +7 -7
- package/src/core/capabilities.test.ts +55 -36
- package/src/core/capabilities.ts +79 -59
- package/src/core/manager.test.ts +19 -19
- package/src/core/manager.ts +24 -16
- package/src/core/plugin.ts +2 -2
- 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 +7 -11
- 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/assets/navigation.js +1 -1
- package/typedoc/assets/search.js +1 -1
- package/typedoc/classes/CollaborationActions.InsertContent.html +280 -280
- package/typedoc/classes/ErrorBoundary.html +6 -6
- package/typedoc/classes/IntentAction.ShowUndo.html +125 -125
- package/typedoc/classes/IntentAction.Track.html +239 -239
- package/typedoc/classes/LayoutAction.AddToast.html +163 -163
- package/typedoc/classes/LayoutAction.Close.html +352 -352
- package/typedoc/classes/LayoutAction.Expose.html +238 -238
- package/typedoc/classes/LayoutAction.Open.html +904 -748
- package/typedoc/classes/LayoutAction.RevertWorkspace.html +241 -241
- package/typedoc/classes/LayoutAction.ScrollIntoView.html +280 -280
- package/typedoc/classes/LayoutAction.Set.html +436 -358
- package/typedoc/classes/LayoutAction.SetLayoutMode.html +469 -391
- package/typedoc/classes/LayoutAction.SwitchWorkspace.html +238 -238
- package/typedoc/classes/LayoutAction.UpdateComplementary.html +358 -358
- package/typedoc/classes/LayoutAction.UpdateDialog.html +865 -475
- package/typedoc/classes/LayoutAction.UpdateLayout.html +281 -281
- package/typedoc/classes/LayoutAction.UpdatePopover.html +826 -826
- package/typedoc/classes/LayoutAction.UpdateSidebar.html +397 -319
- package/typedoc/classes/Plugin.html +3 -3
- package/typedoc/classes/PluginContext.html +38 -0
- package/typedoc/classes/PluginManager.html +17 -16
- package/typedoc/classes/PluginModule.html +9 -9
- package/typedoc/classes/SettingsAction.Open.html +199 -199
- package/typedoc/classes/SettingsAction.OpenPluginRegistry.html +124 -124
- package/typedoc/functions/Events.createStateEvent.html +2 -2
- package/typedoc/functions/IntentPlugin.html +1 -1
- package/typedoc/functions/SettingsPlugin.html +1 -1
- package/typedoc/functions/allOf.html +2 -2
- package/typedoc/functions/chain.html +2 -2
- package/typedoc/functions/contributes.html +2 -2
- package/typedoc/functions/createDispatcher.html +3 -3
- package/typedoc/functions/createIntent.html +3 -3
- package/typedoc/functions/createResolver.html +2 -2
- package/typedoc/functions/createSurface.html +2 -2
- package/typedoc/functions/defineCapability.html +2 -2
- package/typedoc/functions/defineEvent.html +2 -2
- package/typedoc/functions/defineModule.html +2 -2
- package/typedoc/functions/definePlugin.html +2 -2
- package/typedoc/functions/eventKey.html +2 -2
- package/typedoc/functions/getEvents.html +2 -2
- package/typedoc/functions/isAllOf.html +2 -2
- package/typedoc/functions/isOneOf.html +2 -2
- package/typedoc/functions/isSurfaceAvailable.html +2 -2
- package/typedoc/functions/lazy.html +2 -2
- package/typedoc/functions/oneOf.html +2 -2
- package/typedoc/functions/{createApp.html → useApp.html} +2 -2
- package/typedoc/functions/useAppGraph.html +1 -1
- package/typedoc/functions/useCapabilities.html +3 -3
- package/typedoc/functions/useCapability.html +3 -3
- package/typedoc/functions/useIntentDispatcher.html +1 -1
- package/typedoc/functions/useIntentResolver.html +1 -1
- package/typedoc/functions/useLayout.html +1 -1
- package/typedoc/functions/usePluginManager.html +2 -2
- package/typedoc/hierarchy.html +1 -1
- package/typedoc/index.html +2 -2
- package/typedoc/interfaces/LayoutAction.Toast.html +2 -2
- package/typedoc/modules/Capabilities.html +1 -1
- package/typedoc/modules/CollaborationActions.html +1 -1
- package/typedoc/modules/Events.html +1 -1
- package/typedoc/modules/IntentAction.html +1 -1
- package/typedoc/modules/LayoutAction.html +2 -2
- package/typedoc/modules/SettingsAction.html +1 -1
- package/typedoc/modules.html +1 -1
- package/typedoc/types/ActivationEvent.html +3 -3
- package/typedoc/types/ActivationEvents.html +2 -2
- package/typedoc/types/AnyCapability.html +1 -1
- package/typedoc/types/AnyIntent.html +1 -1
- package/typedoc/types/AnyIntentChain.html +1 -1
- package/typedoc/types/AnyIntentEffectResult.html +1 -1
- package/typedoc/types/AnyIntentResolver.html +1 -1
- package/typedoc/types/AnyIntentResult.html +1 -1
- package/typedoc/types/Capabilities.FileUploader.html +1 -1
- package/typedoc/types/Capabilities.IntentResolver.html +1 -1
- package/typedoc/types/Capabilities.Layout.html +1 -1
- package/typedoc/types/Capabilities.Metadata.html +1 -1
- package/typedoc/types/Capabilities.ReactContext.html +1 -1
- package/typedoc/types/Capabilities.ReactRoot.html +1 -1
- package/typedoc/types/Capabilities.ReactSurface.html +1 -1
- package/typedoc/types/Capabilities.Settings.html +2 -2
- package/typedoc/types/Capability.html +5 -5
- package/typedoc/types/CreateAppOptions.html +3 -2
- package/typedoc/types/FileInfo.html +1 -1
- package/typedoc/types/Intent.html +6 -10
- package/typedoc/types/IntentChain.html +3 -3
- package/typedoc/types/IntentContext.html +2 -2
- package/typedoc/types/IntentData.html +1 -1
- package/typedoc/types/IntentDispatcher.html +2 -2
- package/typedoc/types/IntentDispatcherResult.html +2 -2
- package/typedoc/types/IntentEffectDefinition.html +2 -2
- package/typedoc/types/IntentEffectResult.html +6 -6
- package/typedoc/types/IntentParams.html +2 -2
- package/typedoc/types/IntentResolver.html +2 -2
- package/typedoc/types/IntentResultData.html +1 -1
- package/typedoc/types/IntentSchema.html +1 -1
- package/typedoc/types/IntentUndo.html +2 -2
- package/typedoc/types/InterfaceDef.html +3 -3
- package/typedoc/types/Label.html +1 -1
- package/typedoc/types/NodeSerializer.html +3 -3
- package/typedoc/types/PluginManagerOptions.html +3 -2
- package/typedoc/types/PluginMeta.html +9 -9
- package/typedoc/types/PromiseIntentDispatcher.html +2 -2
- package/typedoc/types/PromiseIntentUndo.html +2 -2
- package/typedoc/types/Resource.html +1 -1
- package/typedoc/types/ResourceKey.html +1 -1
- package/typedoc/types/ResourceLanguage.html +1 -1
- package/typedoc/types/SerializedNode.html +2 -2
- package/typedoc/types/SurfaceComponent.html +2 -2
- package/typedoc/types/SurfaceDefinition.html +2 -2
- package/typedoc/types/SurfaceProps.html +2 -2
- package/typedoc/variables/Capabilities.AnchorSort.html +1 -0
- package/typedoc/variables/Capabilities.AppGraph.html +1 -1
- package/typedoc/variables/Capabilities.AppGraphBuilder.html +1 -1
- package/typedoc/variables/Capabilities.AppGraphSerializer.html +1 -1
- package/typedoc/variables/Capabilities.ArtifactDefinition.html +1 -1
- package/typedoc/variables/Capabilities.FileUploader.html +1 -1
- package/typedoc/variables/Capabilities.IntentDispatcher.html +1 -1
- package/typedoc/variables/Capabilities.IntentResolver.html +1 -1
- package/typedoc/variables/Capabilities.Layout.html +1 -1
- package/typedoc/variables/Capabilities.Metadata.html +1 -1
- package/typedoc/variables/Capabilities.Null.html +1 -1
- package/typedoc/variables/Capabilities.PluginManager.html +1 -1
- package/typedoc/variables/Capabilities.ReactContext.html +1 -1
- package/typedoc/variables/Capabilities.ReactRoot.html +1 -1
- package/typedoc/variables/Capabilities.ReactSurface.html +1 -1
- package/typedoc/variables/Capabilities.RxRegistry.html +1 -0
- package/typedoc/variables/Capabilities.Settings.html +1 -1
- package/typedoc/variables/Capabilities.SettingsStore.html +1 -1
- package/typedoc/variables/Capabilities.Tools.html +1 -1
- package/typedoc/variables/Capabilities.Translations.html +1 -1
- package/typedoc/variables/Events.AppGraphReady.html +2 -2
- package/typedoc/variables/Events.DispatcherReady.html +2 -2
- package/typedoc/variables/Events.LayoutReady.html +1 -1
- package/typedoc/variables/Events.SettingsReady.html +2 -2
- package/typedoc/variables/Events.SetupAppGraph.html +2 -2
- package/typedoc/variables/Events.SetupArtifactDefinition.html +2 -2
- package/typedoc/variables/Events.SetupIntentResolver.html +2 -2
- package/typedoc/variables/Events.SetupMetadata.html +2 -2
- package/typedoc/variables/Events.SetupReactSurface.html +2 -2
- package/typedoc/variables/Events.SetupSettings.html +2 -2
- package/typedoc/variables/Events.SetupTranslations.html +2 -2
- package/typedoc/variables/Events.Startup.html +2 -2
- package/typedoc/variables/FileInfoSchema.html +1 -1
- package/typedoc/variables/INTENT_ACTION.html +1 -1
- package/typedoc/variables/INTENT_PLUGIN.html +1 -1
- package/typedoc/variables/LAYOUT_ACTION.html +1 -1
- package/typedoc/variables/LAYOUT_PLUGIN.html +1 -1
- package/typedoc/variables/Label.html +1 -1
- package/typedoc/variables/LayoutAction.Toast.html +1 -1
- package/typedoc/variables/LayoutAction.UPDATE_LAYOUT.html +1 -1
- package/typedoc/variables/PluginManagerProvider.html +2 -2
- package/typedoc/variables/Resource.html +2 -2
- package/typedoc/variables/ResourceKey.html +1 -1
- package/typedoc/variables/ResourceLanguage.html +1 -1
- package/typedoc/variables/SETTINGS_ACTION.html +1 -1
- package/typedoc/variables/SETTINGS_ID.html +1 -1
- package/typedoc/variables/SETTINGS_KEY.html +1 -1
- package/typedoc/variables/SETTINGS_PLUGIN.html +1 -1
- package/typedoc/variables/Surface.html +2 -2
- package/typedoc/variables/defaultFileTypes.html +1 -1
- package/dist/lib/browser/app-graph-builder-OHM2Z6YQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-DVNSCQJ5.mjs.map +0 -7
- package/dist/lib/browser/chunk-SFPT4Z2C.mjs.map +0 -7
- package/dist/lib/browser/chunk-X2YC645Z.mjs.map +0 -7
- package/dist/lib/browser/store-XMPVLJOQ.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-Z45FKS52.cjs +0 -146
- package/dist/lib/node/app-graph-builder-Z45FKS52.cjs.map +0 -7
- package/dist/lib/node/chunk-5UOVF3OR.cjs.map +0 -7
- package/dist/lib/node/chunk-I3CJYEBC.cjs.map +0 -7
- package/dist/lib/node/chunk-JUSEAFDU.cjs.map +0 -7
- package/dist/lib/node/store-N7JLYYDI.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-OMH534A4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GSDBF2CK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PHOUQACM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QHXUTJHE.mjs.map +0 -7
- package/dist/lib/node-esm/store-M2BYJL6K.mjs.map +0 -7
- package/typedoc/classes/PluginsContext.html +0 -25
- /package/dist/lib/browser/{intent-dispatcher-J7QIFHLO.mjs.map → intent-dispatcher-ELZN5EM7.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-resolver-QV5MDMDV.mjs.map → intent-resolver-SGWLINTO.mjs.map} +0 -0
- /package/dist/lib/node/{intent-resolver-PBAOGJS6.cjs.map → intent-resolver-EPSFTHL6.cjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-dispatcher-QDUGA7NT.mjs.map → intent-dispatcher-A2JCMWRD.mjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-resolver-P7TC5RBD.mjs.map → intent-resolver-5C4O43GK.mjs.map} +0 -0
|
@@ -26,8 +26,8 @@ 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
32
|
CollaborationActions: () => CollaborationActions,
|
|
33
33
|
Events: () => Events,
|
|
@@ -41,9 +41,9 @@ __export(chunk_I3CJYEBC_exports, {
|
|
|
41
41
|
Label: () => Label,
|
|
42
42
|
LayoutAction: () => LayoutAction,
|
|
43
43
|
Plugin: () => Plugin,
|
|
44
|
+
PluginContext: () => PluginContext,
|
|
44
45
|
PluginManager: () => PluginManager,
|
|
45
46
|
PluginModule: () => PluginModule,
|
|
46
|
-
PluginsContext: () => PluginsContext,
|
|
47
47
|
Resource: () => Resource,
|
|
48
48
|
ResourceKey: () => ResourceKey,
|
|
49
49
|
ResourceLanguage: () => ResourceLanguage,
|
|
@@ -67,23 +67,23 @@ __export(chunk_I3CJYEBC_exports, {
|
|
|
67
67
|
lazy: () => lazy,
|
|
68
68
|
oneOf: () => oneOf
|
|
69
69
|
});
|
|
70
|
-
module.exports = __toCommonJS(
|
|
70
|
+
module.exports = __toCommonJS(chunk_HIVITTZD_exports);
|
|
71
71
|
var import_effect = require("effect");
|
|
72
72
|
var import_live_object = require("@dxos/live-object");
|
|
73
73
|
var import_log = require("@dxos/log");
|
|
74
74
|
var import_util = require("@dxos/util");
|
|
75
75
|
var import_effect2 = require("effect");
|
|
76
76
|
var import_effect3 = require("effect");
|
|
77
|
-
var
|
|
77
|
+
var import_rx_react = require("@effect-rx/rx-react");
|
|
78
78
|
var import_effect4 = require("effect");
|
|
79
79
|
var import_async = require("@dxos/async");
|
|
80
80
|
var import_invariant = require("@dxos/invariant");
|
|
81
|
-
var import_live_object2 = require("@dxos/live-object");
|
|
82
81
|
var import_log2 = require("@dxos/log");
|
|
83
|
-
var
|
|
82
|
+
var import_rx_react2 = require("@effect-rx/rx-react");
|
|
83
|
+
var import_signals_core = require("@preact/signals-core");
|
|
84
84
|
var import_effect5 = require("effect");
|
|
85
85
|
var import_async2 = require("@dxos/async");
|
|
86
|
-
var
|
|
86
|
+
var import_live_object2 = require("@dxos/live-object");
|
|
87
87
|
var import_log3 = require("@dxos/log");
|
|
88
88
|
var import_effect6 = require("effect");
|
|
89
89
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
@@ -132,7 +132,6 @@ var Label = import_effect3.Schema.Union(import_effect3.Schema.String, import_eff
|
|
|
132
132
|
})))));
|
|
133
133
|
var INTENT_PLUGIN = "dxos.org/plugin/intent";
|
|
134
134
|
var INTENT_ACTION = `${INTENT_PLUGIN}/action`;
|
|
135
|
-
var IntentAction;
|
|
136
135
|
(function(IntentAction2) {
|
|
137
136
|
class Track extends import_effect2.Schema.TaggedClass()(`${INTENT_ACTION}/track`, {
|
|
138
137
|
input: import_effect2.Schema.Struct({
|
|
@@ -152,13 +151,12 @@ var IntentAction;
|
|
|
152
151
|
}
|
|
153
152
|
IntentAction2.ShowUndo = ShowUndo;
|
|
154
153
|
})(IntentAction || (IntentAction = {}));
|
|
154
|
+
var IntentAction;
|
|
155
155
|
var BaseError = class extends Error {
|
|
156
156
|
constructor(code, message, context) {
|
|
157
157
|
super(message ?? code, {
|
|
158
158
|
cause: context
|
|
159
|
-
});
|
|
160
|
-
this.code = code;
|
|
161
|
-
this.context = context;
|
|
159
|
+
}), this.code = code, this.context = context;
|
|
162
160
|
this.name = code;
|
|
163
161
|
Object.setPrototypeOf(this, new.target.prototype);
|
|
164
162
|
}
|
|
@@ -199,9 +197,33 @@ var lazy = (c) => async (props) => {
|
|
|
199
197
|
const { default: getCapability } = await c();
|
|
200
198
|
return async () => getCapability(props);
|
|
201
199
|
};
|
|
202
|
-
var
|
|
203
|
-
constructor({ activate, reset }) {
|
|
204
|
-
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;
|
|
205
227
|
this.activate = activate;
|
|
206
228
|
this.reset = reset;
|
|
207
229
|
}
|
|
@@ -209,22 +231,22 @@ var PluginsContext = class {
|
|
|
209
231
|
* @internal
|
|
210
232
|
*/
|
|
211
233
|
contributeCapability({ module: moduleId, interface: interfaceDef, implementation }) {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
});
|
|
217
|
-
current = (0, import_signals_core.untracked)(() => object.value);
|
|
218
|
-
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;
|
|
219
238
|
}
|
|
220
|
-
|
|
239
|
+
this._registry.set(this._capabilityImpls(interfaceDef.identifier), [
|
|
240
|
+
...current,
|
|
241
|
+
capability
|
|
242
|
+
]);
|
|
221
243
|
(0, import_log2.log)("capability contributed", {
|
|
222
244
|
id: interfaceDef.identifier,
|
|
223
245
|
moduleId,
|
|
224
|
-
count:
|
|
246
|
+
count: current.length
|
|
225
247
|
}, {
|
|
226
248
|
F: __dxlog_file,
|
|
227
|
-
L:
|
|
249
|
+
L: 161,
|
|
228
250
|
S: this,
|
|
229
251
|
C: (f, a) => f(...a)
|
|
230
252
|
});
|
|
@@ -233,19 +255,19 @@ var PluginsContext = class {
|
|
|
233
255
|
* @internal
|
|
234
256
|
*/
|
|
235
257
|
removeCapability(interfaceDef, implementation) {
|
|
236
|
-
const current = this.
|
|
237
|
-
if (
|
|
258
|
+
const current = this._registry.get(this._capabilityImpls(interfaceDef.identifier));
|
|
259
|
+
if (current.length === 0) {
|
|
238
260
|
return;
|
|
239
261
|
}
|
|
240
|
-
const
|
|
241
|
-
if (
|
|
242
|
-
|
|
262
|
+
const next = current.filter((c) => c.implementation !== implementation);
|
|
263
|
+
if (next.length !== current.length) {
|
|
264
|
+
this._registry.set(this._capabilityImpls(interfaceDef.identifier), next);
|
|
243
265
|
(0, import_log2.log)("capability removed", {
|
|
244
266
|
id: interfaceDef.identifier,
|
|
245
|
-
count:
|
|
267
|
+
count: current.length
|
|
246
268
|
}, {
|
|
247
269
|
F: __dxlog_file,
|
|
248
|
-
L:
|
|
270
|
+
L: 180,
|
|
249
271
|
S: this,
|
|
250
272
|
C: (f, a) => f(...a)
|
|
251
273
|
});
|
|
@@ -254,63 +276,64 @@ var PluginsContext = class {
|
|
|
254
276
|
id: interfaceDef.identifier
|
|
255
277
|
}, {
|
|
256
278
|
F: __dxlog_file,
|
|
257
|
-
L:
|
|
279
|
+
L: 182,
|
|
258
280
|
S: this,
|
|
259
281
|
C: (f, a) => f(...a)
|
|
260
282
|
});
|
|
261
283
|
}
|
|
262
284
|
}
|
|
263
285
|
/**
|
|
264
|
-
*
|
|
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.
|
|
265
306
|
* @returns An array of capabilities.
|
|
266
|
-
* @reactive
|
|
267
307
|
*/
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
if (!current) {
|
|
271
|
-
const object = (0, import_live_object2.live)({
|
|
272
|
-
value: []
|
|
273
|
-
});
|
|
274
|
-
current = (0, import_signals_core.untracked)(() => object.value);
|
|
275
|
-
this._definedCapabilities.set(interfaceDef.identifier, current);
|
|
276
|
-
}
|
|
277
|
-
const capabilities = filter ? current.filter((c) => filter(c.implementation, c.moduleId)) : current;
|
|
278
|
-
return capabilities.map((c) => c.implementation);
|
|
308
|
+
getCapabilities(interfaceDef) {
|
|
309
|
+
return this._registry.get(this.capabilities(interfaceDef));
|
|
279
310
|
}
|
|
280
311
|
/**
|
|
281
312
|
* Requests a single capability from the plugin context.
|
|
282
313
|
* @returns The capability.
|
|
283
314
|
* @throws If no capability is found.
|
|
284
|
-
* @reactive
|
|
285
315
|
*/
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
(0, import_invariant.invariant)(capability, `No capability found for ${interfaceDef.identifier}`, {
|
|
289
|
-
F: __dxlog_file,
|
|
290
|
-
L: 203,
|
|
291
|
-
S: this,
|
|
292
|
-
A: [
|
|
293
|
-
"capability",
|
|
294
|
-
"`No capability found for ${interfaceDef.identifier}`"
|
|
295
|
-
]
|
|
296
|
-
});
|
|
297
|
-
return capability;
|
|
316
|
+
getCapability(interfaceDef) {
|
|
317
|
+
return this._registry.get(this.capability(interfaceDef));
|
|
298
318
|
}
|
|
299
319
|
/**
|
|
300
|
-
* Waits for a capability to be
|
|
320
|
+
* Waits for a capability to be available.
|
|
301
321
|
* @returns The capability.
|
|
302
322
|
*/
|
|
303
|
-
async waitForCapability(interfaceDef
|
|
323
|
+
async waitForCapability(interfaceDef) {
|
|
324
|
+
const [capability] = this.getCapabilities(interfaceDef);
|
|
325
|
+
if (capability) {
|
|
326
|
+
return capability;
|
|
327
|
+
}
|
|
304
328
|
const trigger = new import_async.Trigger();
|
|
305
|
-
const
|
|
306
|
-
|
|
307
|
-
if (capabilities[0]) {
|
|
329
|
+
const cancel = this._registry.subscribe(this.capabilities(interfaceDef), (capabilities) => {
|
|
330
|
+
if (capabilities.length > 0) {
|
|
308
331
|
trigger.wake(capabilities[0]);
|
|
309
332
|
}
|
|
310
333
|
});
|
|
311
|
-
const
|
|
312
|
-
|
|
313
|
-
return
|
|
334
|
+
const result = await trigger.wait();
|
|
335
|
+
cancel();
|
|
336
|
+
return result;
|
|
314
337
|
}
|
|
315
338
|
async activatePromise(event) {
|
|
316
339
|
return this.activate(event).pipe(import_effect4.Effect.runPromise);
|
|
@@ -344,15 +367,17 @@ var isPromise = (value) => {
|
|
|
344
367
|
return value !== null && typeof value === "object" && "then" in value;
|
|
345
368
|
};
|
|
346
369
|
var PluginManager = class {
|
|
347
|
-
constructor({ pluginLoader, plugins = [], core = plugins.map(({ meta }) => meta.id), enabled = [] }) {
|
|
370
|
+
constructor({ pluginLoader, plugins = [], core = plugins.map(({ meta }) => meta.id), enabled = [], registry }) {
|
|
348
371
|
this.activation = new import_async2.Event();
|
|
349
|
-
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,
|
|
350
376
|
activate: (event) => this._activate(event),
|
|
351
377
|
reset: (id) => this._reset(id)
|
|
352
378
|
});
|
|
353
|
-
this._capabilities = /* @__PURE__ */ new Map();
|
|
354
379
|
this._pluginLoader = pluginLoader;
|
|
355
|
-
this._state = (0,
|
|
380
|
+
this._state = (0, import_live_object2.live)({
|
|
356
381
|
plugins,
|
|
357
382
|
core,
|
|
358
383
|
enabled,
|
|
@@ -426,12 +451,12 @@ var PluginManager = class {
|
|
|
426
451
|
* @param id The id of the plugin.
|
|
427
452
|
*/
|
|
428
453
|
async add(id) {
|
|
429
|
-
return (0,
|
|
454
|
+
return (0, import_signals_core.untracked)(async () => {
|
|
430
455
|
(0, import_log3.log)("add plugin", {
|
|
431
456
|
id
|
|
432
457
|
}, {
|
|
433
458
|
F: __dxlog_file2,
|
|
434
|
-
L:
|
|
459
|
+
L: 154,
|
|
435
460
|
S: this,
|
|
436
461
|
C: (f, a) => f(...a)
|
|
437
462
|
});
|
|
@@ -445,12 +470,12 @@ var PluginManager = class {
|
|
|
445
470
|
* @param id The id of the plugin.
|
|
446
471
|
*/
|
|
447
472
|
enable(id) {
|
|
448
|
-
return (0,
|
|
473
|
+
return (0, import_signals_core.untracked)(async () => {
|
|
449
474
|
(0, import_log3.log)("enable plugin", {
|
|
450
475
|
id
|
|
451
476
|
}, {
|
|
452
477
|
F: __dxlog_file2,
|
|
453
|
-
L:
|
|
478
|
+
L: 167,
|
|
454
479
|
S: this,
|
|
455
480
|
C: (f, a) => f(...a)
|
|
456
481
|
});
|
|
@@ -471,7 +496,7 @@ var PluginManager = class {
|
|
|
471
496
|
]
|
|
472
497
|
}, {
|
|
473
498
|
F: __dxlog_file2,
|
|
474
|
-
L:
|
|
499
|
+
L: 182,
|
|
475
500
|
S: this,
|
|
476
501
|
C: (f, a) => f(...a)
|
|
477
502
|
});
|
|
@@ -486,12 +511,12 @@ var PluginManager = class {
|
|
|
486
511
|
* @param id The id of the plugin.
|
|
487
512
|
*/
|
|
488
513
|
remove(id) {
|
|
489
|
-
return (0,
|
|
514
|
+
return (0, import_signals_core.untracked)(() => {
|
|
490
515
|
(0, import_log3.log)("remove plugin", {
|
|
491
516
|
id
|
|
492
517
|
}, {
|
|
493
518
|
F: __dxlog_file2,
|
|
494
|
-
L:
|
|
519
|
+
L: 200,
|
|
495
520
|
S: this,
|
|
496
521
|
C: (f, a) => f(...a)
|
|
497
522
|
});
|
|
@@ -508,12 +533,12 @@ var PluginManager = class {
|
|
|
508
533
|
* @param id The id of the plugin.
|
|
509
534
|
*/
|
|
510
535
|
disable(id) {
|
|
511
|
-
return (0,
|
|
536
|
+
return (0, import_signals_core.untracked)(async () => {
|
|
512
537
|
(0, import_log3.log)("disable plugin", {
|
|
513
538
|
id
|
|
514
539
|
}, {
|
|
515
540
|
F: __dxlog_file2,
|
|
516
|
-
L:
|
|
541
|
+
L: 217,
|
|
517
542
|
S: this,
|
|
518
543
|
C: (f, a) => f(...a)
|
|
519
544
|
});
|
|
@@ -541,7 +566,7 @@ var PluginManager = class {
|
|
|
541
566
|
* @returns Whether the activation was successful.
|
|
542
567
|
*/
|
|
543
568
|
activate(event) {
|
|
544
|
-
return (0,
|
|
569
|
+
return (0, import_signals_core.untracked)(() => import_effect5.Effect.runPromise(this._activate(event)));
|
|
545
570
|
}
|
|
546
571
|
/**
|
|
547
572
|
* Deactivates all of the modules for a plugin.
|
|
@@ -549,7 +574,7 @@ var PluginManager = class {
|
|
|
549
574
|
* @returns Whether the deactivation was successful.
|
|
550
575
|
*/
|
|
551
576
|
deactivate(id) {
|
|
552
|
-
return (0,
|
|
577
|
+
return (0, import_signals_core.untracked)(() => import_effect5.Effect.runPromise(this._deactivate(id)));
|
|
553
578
|
}
|
|
554
579
|
/**
|
|
555
580
|
* Re-activates the modules that were activated by the event.
|
|
@@ -557,15 +582,15 @@ var PluginManager = class {
|
|
|
557
582
|
* @returns Whether the reset was successful.
|
|
558
583
|
*/
|
|
559
584
|
reset(event) {
|
|
560
|
-
return (0,
|
|
585
|
+
return (0, import_signals_core.untracked)(() => import_effect5.Effect.runPromise(this._reset(event)));
|
|
561
586
|
}
|
|
562
587
|
_addPlugin(plugin) {
|
|
563
|
-
(0,
|
|
588
|
+
(0, import_signals_core.untracked)(() => {
|
|
564
589
|
(0, import_log3.log)("add plugin", {
|
|
565
590
|
id: plugin.meta.id
|
|
566
591
|
}, {
|
|
567
592
|
F: __dxlog_file2,
|
|
568
|
-
L:
|
|
593
|
+
L: 270,
|
|
569
594
|
S: this,
|
|
570
595
|
C: (f, a) => f(...a)
|
|
571
596
|
});
|
|
@@ -575,12 +600,12 @@ var PluginManager = class {
|
|
|
575
600
|
});
|
|
576
601
|
}
|
|
577
602
|
_removePlugin(id) {
|
|
578
|
-
(0,
|
|
603
|
+
(0, import_signals_core.untracked)(() => {
|
|
579
604
|
(0, import_log3.log)("remove plugin", {
|
|
580
605
|
id
|
|
581
606
|
}, {
|
|
582
607
|
F: __dxlog_file2,
|
|
583
|
-
L:
|
|
608
|
+
L: 279,
|
|
584
609
|
S: this,
|
|
585
610
|
C: (f, a) => f(...a)
|
|
586
611
|
});
|
|
@@ -591,12 +616,12 @@ var PluginManager = class {
|
|
|
591
616
|
});
|
|
592
617
|
}
|
|
593
618
|
_addModule(module2) {
|
|
594
|
-
(0,
|
|
619
|
+
(0, import_signals_core.untracked)(() => {
|
|
595
620
|
(0, import_log3.log)("add module", {
|
|
596
621
|
id: module2.id
|
|
597
622
|
}, {
|
|
598
623
|
F: __dxlog_file2,
|
|
599
|
-
L:
|
|
624
|
+
L: 289,
|
|
600
625
|
S: this,
|
|
601
626
|
C: (f, a) => f(...a)
|
|
602
627
|
});
|
|
@@ -606,12 +631,12 @@ var PluginManager = class {
|
|
|
606
631
|
});
|
|
607
632
|
}
|
|
608
633
|
_removeModule(id) {
|
|
609
|
-
(0,
|
|
634
|
+
(0, import_signals_core.untracked)(() => {
|
|
610
635
|
(0, import_log3.log)("remove module", {
|
|
611
636
|
id
|
|
612
637
|
}, {
|
|
613
638
|
F: __dxlog_file2,
|
|
614
|
-
L:
|
|
639
|
+
L: 298,
|
|
615
640
|
S: this,
|
|
616
641
|
C: (f, a) => f(...a)
|
|
617
642
|
});
|
|
@@ -637,7 +662,7 @@ var PluginManager = class {
|
|
|
637
662
|
return this._getInactiveModules().filter((module2) => getEvents(module2.activatesOn).map(eventKey).includes(key));
|
|
638
663
|
}
|
|
639
664
|
_setPendingResetByModule(module2) {
|
|
640
|
-
return (0,
|
|
665
|
+
return (0, import_signals_core.untracked)(() => {
|
|
641
666
|
const activationEvents = getEvents(module2.activatesOn).map(eventKey).filter((key) => this._state.eventsFired.includes(key));
|
|
642
667
|
const pendingReset = Array.from(new Set(activationEvents)).filter((event) => !this._state.pendingReset.includes(event));
|
|
643
668
|
if (pendingReset.length > 0) {
|
|
@@ -645,7 +670,7 @@ var PluginManager = class {
|
|
|
645
670
|
events: pendingReset
|
|
646
671
|
}, {
|
|
647
672
|
F: __dxlog_file2,
|
|
648
|
-
L:
|
|
673
|
+
L: 336,
|
|
649
674
|
S: this,
|
|
650
675
|
C: (f, a) => f(...a)
|
|
651
676
|
});
|
|
@@ -664,7 +689,7 @@ var PluginManager = class {
|
|
|
664
689
|
key
|
|
665
690
|
}, {
|
|
666
691
|
F: __dxlog_file2,
|
|
667
|
-
L:
|
|
692
|
+
L: 349,
|
|
668
693
|
S: this,
|
|
669
694
|
C: (f, a) => f(...a)
|
|
670
695
|
});
|
|
@@ -685,7 +710,7 @@ var PluginManager = class {
|
|
|
685
710
|
key
|
|
686
711
|
}, {
|
|
687
712
|
F: __dxlog_file2,
|
|
688
|
-
L:
|
|
713
|
+
L: 365,
|
|
689
714
|
S: this,
|
|
690
715
|
C: (f, a) => f(...a)
|
|
691
716
|
});
|
|
@@ -699,7 +724,7 @@ var PluginManager = class {
|
|
|
699
724
|
modules: modules.map((module2) => module2.id)
|
|
700
725
|
}, {
|
|
701
726
|
F: __dxlog_file2,
|
|
702
|
-
L:
|
|
727
|
+
L: 372,
|
|
703
728
|
S: this,
|
|
704
729
|
C: (f, a) => f(...a)
|
|
705
730
|
});
|
|
@@ -741,7 +766,7 @@ var PluginManager = class {
|
|
|
741
766
|
key
|
|
742
767
|
}, {
|
|
743
768
|
F: __dxlog_file2,
|
|
744
|
-
L:
|
|
769
|
+
L: 406,
|
|
745
770
|
S: this,
|
|
746
771
|
C: (f, a) => f(...a)
|
|
747
772
|
});
|
|
@@ -757,7 +782,7 @@ var PluginManager = class {
|
|
|
757
782
|
module: module2.id
|
|
758
783
|
}, {
|
|
759
784
|
F: __dxlog_file2,
|
|
760
|
-
L:
|
|
785
|
+
L: 421,
|
|
761
786
|
S: this,
|
|
762
787
|
C: (f, a) => f(...a)
|
|
763
788
|
});
|
|
@@ -786,7 +811,7 @@ var PluginManager = class {
|
|
|
786
811
|
module: module2.id
|
|
787
812
|
}, {
|
|
788
813
|
F: __dxlog_file2,
|
|
789
|
-
L:
|
|
814
|
+
L: 444,
|
|
790
815
|
S: this,
|
|
791
816
|
C: (f, a) => f(...a)
|
|
792
817
|
});
|
|
@@ -815,7 +840,7 @@ var PluginManager = class {
|
|
|
815
840
|
id
|
|
816
841
|
}, {
|
|
817
842
|
F: __dxlog_file2,
|
|
818
|
-
L:
|
|
843
|
+
L: 471,
|
|
819
844
|
S: this,
|
|
820
845
|
C: (f, a) => f(...a)
|
|
821
846
|
});
|
|
@@ -824,7 +849,7 @@ var PluginManager = class {
|
|
|
824
849
|
for (const capability of capabilities) {
|
|
825
850
|
this.context.removeCapability(capability.interface, capability.implementation);
|
|
826
851
|
const program = capability.deactivate?.();
|
|
827
|
-
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({
|
|
828
853
|
try: () => promise,
|
|
829
854
|
catch: (error) => error
|
|
830
855
|
})), import_effect5.Match.orElse((program2) => import_effect5.Effect.succeed(program2)));
|
|
@@ -839,7 +864,7 @@ var PluginManager = class {
|
|
|
839
864
|
id
|
|
840
865
|
}, {
|
|
841
866
|
F: __dxlog_file2,
|
|
842
|
-
L:
|
|
867
|
+
L: 497,
|
|
843
868
|
S: this,
|
|
844
869
|
C: (f, a) => f(...a)
|
|
845
870
|
});
|
|
@@ -853,7 +878,7 @@ var PluginManager = class {
|
|
|
853
878
|
key
|
|
854
879
|
}, {
|
|
855
880
|
F: __dxlog_file2,
|
|
856
|
-
L:
|
|
881
|
+
L: 505,
|
|
857
882
|
S: this,
|
|
858
883
|
C: (f, a) => f(...a)
|
|
859
884
|
});
|
|
@@ -888,10 +913,10 @@ var Plugin = class {
|
|
|
888
913
|
var definePlugin = (meta, modules) => {
|
|
889
914
|
return new Plugin(meta, modules);
|
|
890
915
|
};
|
|
891
|
-
var Capabilities;
|
|
892
916
|
(function(Capabilities2) {
|
|
893
917
|
Capabilities2.PluginManager = defineCapability("dxos.org/app-framework/capability/plugin-manager");
|
|
894
918
|
Capabilities2.Null = defineCapability("dxos.org/app-framework/capability/null");
|
|
919
|
+
Capabilities2.RxRegistry = defineCapability("dxos.org/app-framework/capability/rx-registry");
|
|
895
920
|
Capabilities2.ReactContext = defineCapability("dxos.org/app-framework/capability/react-context");
|
|
896
921
|
Capabilities2.ReactRoot = defineCapability("dxos.org/app-framework/capability/react-root");
|
|
897
922
|
Capabilities2.ReactSurface = defineCapability("dxos.org/app-framework/common/react-surface");
|
|
@@ -908,24 +933,25 @@ var Capabilities;
|
|
|
908
933
|
Capabilities2.Tools = defineCapability("dxos.org/app-framework/capability/tools");
|
|
909
934
|
Capabilities2.ArtifactDefinition = defineCapability("dxos.org/app-framework/capability/artifact-definition");
|
|
910
935
|
Capabilities2.FileUploader = defineCapability("dxos.org/app-framework/capability/file-uploader");
|
|
936
|
+
Capabilities2.AnchorSort = defineCapability("dxos.org/app-framework/capability/anchor-sort");
|
|
911
937
|
})(Capabilities || (Capabilities = {}));
|
|
912
|
-
var
|
|
938
|
+
var Capabilities;
|
|
913
939
|
(function(CollaborationActions2) {
|
|
914
940
|
class InsertContent extends import_effect6.Schema.TaggedClass()("assistant/intent-content", {
|
|
915
941
|
input: import_effect6.Schema.Struct({
|
|
916
|
-
|
|
917
|
-
target: (0, import_echo_schema.Ref)(import_echo_schema.Expando),
|
|
942
|
+
target: import_echo_schema.Expando,
|
|
918
943
|
object: (0, import_echo_schema.Ref)(import_echo_schema.Expando),
|
|
944
|
+
at: import_effect6.Schema.optional(import_effect6.Schema.String),
|
|
919
945
|
label: import_effect6.Schema.String.pipe(import_effect6.Schema.optional)
|
|
920
946
|
}).annotations({
|
|
921
|
-
|
|
947
|
+
description: "Enables plugins to inject content blocks or references into a related entity."
|
|
922
948
|
}),
|
|
923
949
|
output: import_effect6.Schema.Void
|
|
924
950
|
}) {
|
|
925
951
|
}
|
|
926
952
|
CollaborationActions2.InsertContent = InsertContent;
|
|
927
953
|
})(CollaborationActions || (CollaborationActions = {}));
|
|
928
|
-
var
|
|
954
|
+
var CollaborationActions;
|
|
929
955
|
(function(Events2) {
|
|
930
956
|
Events2.Startup = defineEvent("dxos.org/app-framework/event/startup");
|
|
931
957
|
Events2.SetupReactSurface = defineEvent("dxos.org/app-framework/event/setup-react-surface");
|
|
@@ -941,6 +967,7 @@ var Events;
|
|
|
941
967
|
Events2.createStateEvent = (specifier) => defineEvent("dxos.org/app-framework/event/state", specifier);
|
|
942
968
|
Events2.LayoutReady = Events2.createStateEvent(Capabilities.Layout.identifier);
|
|
943
969
|
})(Events || (Events = {}));
|
|
970
|
+
var Events;
|
|
944
971
|
var defaultFileTypes = {
|
|
945
972
|
images: [
|
|
946
973
|
"png",
|
|
@@ -979,12 +1006,11 @@ var IntentPlugin = () => definePlugin({
|
|
|
979
1006
|
activatesAfter: [
|
|
980
1007
|
Events.DispatcherReady
|
|
981
1008
|
],
|
|
982
|
-
activate: lazy(() => import("./intent-dispatcher-
|
|
1009
|
+
activate: lazy(() => import("./intent-dispatcher-LFXZJTAS.cjs"))
|
|
983
1010
|
})
|
|
984
1011
|
]);
|
|
985
1012
|
var LAYOUT_PLUGIN = "dxos.org/plugin/layout";
|
|
986
1013
|
var LAYOUT_ACTION = `${LAYOUT_PLUGIN}/action`;
|
|
987
|
-
var LayoutAction;
|
|
988
1014
|
(function(LayoutAction2) {
|
|
989
1015
|
LayoutAction2.UPDATE_LAYOUT = `${LAYOUT_ACTION}/update-layout`;
|
|
990
1016
|
class UpdateLayout extends import_effect8.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
@@ -1076,11 +1102,20 @@ var LayoutAction;
|
|
|
1076
1102
|
state: import_effect8.Schema.optional(import_effect8.Schema.Boolean.annotations({
|
|
1077
1103
|
description: "Whether the dialog is open or closed."
|
|
1078
1104
|
})),
|
|
1105
|
+
type: import_effect8.Schema.optional(import_effect8.Schema.Literal("default", "alert").annotations({
|
|
1106
|
+
description: "The type of dialog."
|
|
1107
|
+
})),
|
|
1079
1108
|
blockAlign: import_effect8.Schema.optional(import_effect8.Schema.Literal("start", "center", "end").annotations({
|
|
1080
1109
|
description: "The alignment of the dialog."
|
|
1081
1110
|
})),
|
|
1082
|
-
|
|
1083
|
-
description: "
|
|
1111
|
+
overlayClasses: import_effect8.Schema.optional(import_effect8.Schema.String.annotations({
|
|
1112
|
+
description: "Additional classes for the dialog overlay."
|
|
1113
|
+
})),
|
|
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."
|
|
1084
1119
|
})),
|
|
1085
1120
|
props: import_effect8.Schema.optional(import_effect8.Schema.Record({
|
|
1086
1121
|
key: import_effect8.Schema.String,
|
|
@@ -1308,6 +1343,7 @@ var LayoutAction;
|
|
|
1308
1343
|
}
|
|
1309
1344
|
LayoutAction2.Expose = Expose;
|
|
1310
1345
|
})(LayoutAction || (LayoutAction = {}));
|
|
1346
|
+
var LayoutAction;
|
|
1311
1347
|
var createSurface = (definition) => definition;
|
|
1312
1348
|
var ResourceKey = import_effect9.Schema.Union(import_effect9.Schema.String, import_effect9.Schema.Record({
|
|
1313
1349
|
key: import_effect9.Schema.String,
|
|
@@ -1329,12 +1365,12 @@ var isUndoable = (historyEntry) => historyEntry.length > 0 && historyEntry.every
|
|
|
1329
1365
|
var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, historyLimit = HISTORY_LIMIT } = {}) => {
|
|
1330
1366
|
const historyRef = import_effect.Effect.runSync(import_effect.Ref.make([]));
|
|
1331
1367
|
const handleIntent = (intent) => import_effect.Effect.gen(function* () {
|
|
1332
|
-
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);
|
|
1333
1369
|
if (candidates.length === 0) {
|
|
1334
1370
|
yield* import_effect.Effect.fail(new NoResolversError(intent.id));
|
|
1335
1371
|
}
|
|
1336
|
-
const
|
|
1337
|
-
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);
|
|
1338
1374
|
return {
|
|
1339
1375
|
_intent: intent,
|
|
1340
1376
|
...result
|
|
@@ -1454,10 +1490,8 @@ var intent_dispatcher_default = (context) => {
|
|
|
1454
1490
|
undo: defaultEffect,
|
|
1455
1491
|
undoPromise: defaultPromise
|
|
1456
1492
|
});
|
|
1457
|
-
const { dispatch, dispatchPromise, undo, undoPromise } = createDispatcher((
|
|
1458
|
-
|
|
1459
|
-
}).flat());
|
|
1460
|
-
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);
|
|
1461
1495
|
state.dispatch = (intentChain, depth) => {
|
|
1462
1496
|
return import_effect.Effect.gen(function* () {
|
|
1463
1497
|
yield* manager._activate(Events.SetupIntentResolver);
|
|
@@ -1487,9 +1521,9 @@ var intent_dispatcher_default = (context) => {
|
|
|
1487
1521
|
Label,
|
|
1488
1522
|
LayoutAction,
|
|
1489
1523
|
Plugin,
|
|
1524
|
+
PluginContext,
|
|
1490
1525
|
PluginManager,
|
|
1491
1526
|
PluginModule,
|
|
1492
|
-
PluginsContext,
|
|
1493
1527
|
Resource,
|
|
1494
1528
|
ResourceKey,
|
|
1495
1529
|
ResourceLanguage,
|
|
@@ -1513,4 +1547,4 @@ var intent_dispatcher_default = (context) => {
|
|
|
1513
1547
|
lazy,
|
|
1514
1548
|
oneOf
|
|
1515
1549
|
});
|
|
1516
|
-
//# sourceMappingURL=chunk-
|
|
1550
|
+
//# sourceMappingURL=chunk-HIVITTZD.cjs.map
|