@dxos/app-framework 0.8.2-main.f11618f → 0.8.2-staging.7ac8446
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-576BHZC7.mjs} +2 -2
- package/dist/lib/browser/{chunk-DVNSCQJ5.mjs → chunk-6AVTZPMT.mjs} +159 -190
- package/dist/lib/browser/chunk-6AVTZPMT.mjs.map +7 -0
- package/dist/lib/browser/{chunk-X2YC645Z.mjs → chunk-PPIBZ5N4.mjs} +4 -4
- package/dist/lib/{node-esm/chunk-QHXUTJHE.mjs.map → browser/chunk-PPIBZ5N4.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +5 -7
- package/dist/lib/browser/index.mjs.map +1 -1
- package/dist/lib/browser/{intent-dispatcher-J7QIFHLO.mjs → intent-dispatcher-3Q67MHZZ.mjs} +2 -2
- package/dist/lib/browser/{intent-resolver-QV5MDMDV.mjs → intent-resolver-O763LCLG.mjs} +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{store-XMPVLJOQ.mjs → store-URSN7DZI.mjs} +2 -2
- package/dist/lib/browser/testing/index.mjs +2 -2
- package/dist/lib/browser/worker.mjs +1 -3
- package/dist/lib/node/{app-graph-builder-Z45FKS52.cjs → app-graph-builder-JZCSKYPY.cjs} +12 -12
- package/dist/lib/node/{chunk-I3CJYEBC.cjs → chunk-YIFTVCOR.cjs} +150 -180
- package/dist/lib/node/chunk-YIFTVCOR.cjs.map +7 -0
- package/dist/lib/node/{chunk-5UOVF3OR.cjs → chunk-YNTKVTVX.cjs} +20 -20
- package/dist/lib/node/{chunk-5UOVF3OR.cjs.map → chunk-YNTKVTVX.cjs.map} +3 -3
- package/dist/lib/node/index.cjs +66 -68
- package/dist/lib/node/index.cjs.map +1 -1
- package/dist/lib/node/{intent-dispatcher-FQPJNKIZ.cjs → intent-dispatcher-H334XLFD.cjs} +8 -8
- package/dist/lib/node/{intent-dispatcher-FQPJNKIZ.cjs.map → intent-dispatcher-H334XLFD.cjs.map} +2 -2
- package/dist/lib/node/{intent-resolver-PBAOGJS6.cjs → intent-resolver-3F4POWAM.cjs} +8 -8
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{store-N7JLYYDI.cjs → store-OFDHTDCB.cjs} +7 -7
- package/dist/lib/node/testing/index.cjs +8 -8
- package/dist/lib/node/worker.cjs +37 -39
- package/dist/lib/node/worker.cjs.map +2 -2
- package/dist/lib/node-esm/{app-graph-builder-OMH534A4.mjs → app-graph-builder-VYKLSMSZ.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-GSDBF2CK.mjs → chunk-AHKIPS2L.mjs} +159 -190
- package/dist/lib/node-esm/chunk-AHKIPS2L.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-QHXUTJHE.mjs → chunk-R6A7Z4LU.mjs} +4 -4
- package/dist/lib/node-esm/chunk-R6A7Z4LU.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +5 -7
- package/dist/lib/node-esm/index.mjs.map +1 -1
- package/dist/lib/node-esm/{intent-dispatcher-QDUGA7NT.mjs → intent-dispatcher-YDE2ONZA.mjs} +2 -2
- package/dist/lib/node-esm/{intent-resolver-P7TC5RBD.mjs → intent-resolver-LAGJ7LXM.mjs} +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{store-M2BYJL6K.mjs → store-EYSUVNCS.mjs} +2 -2
- package/dist/lib/node-esm/testing/index.mjs +2 -2
- package/dist/lib/node-esm/worker.mjs +1 -3
- package/dist/types/src/common/index.d.ts +0 -1
- package/dist/types/src/common/index.d.ts.map +1 -1
- package/dist/types/src/common/layout.d.ts +4 -10
- package/dist/types/src/common/layout.d.ts.map +1 -1
- package/dist/types/src/core/capabilities.d.ts +2 -5
- package/dist/types/src/core/capabilities.d.ts.map +1 -1
- package/dist/types/src/core/events.d.ts +1 -4
- package/dist/types/src/core/events.d.ts.map +1 -1
- package/dist/types/src/core/manager.d.ts +8 -8
- package/dist/types/src/core/manager.d.ts.map +1 -1
- package/dist/types/src/core/plugin.d.ts +1 -2
- package/dist/types/src/core/plugin.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +1 -27
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -1
- package/package.json +18 -22
- package/project.json +1 -2
- package/src/App.tsx +2 -2
- package/src/common/index.ts +0 -1
- package/src/common/layout.ts +3 -22
- package/src/core/capabilities.ts +5 -9
- package/src/core/events.ts +1 -4
- package/src/core/manager.test.ts +3 -3
- package/src/core/manager.ts +10 -10
- package/src/core/plugin.ts +1 -2
- package/src/plugin-intent/intent-dispatcher.ts +2 -18
- package/dist/lib/browser/chunk-DVNSCQJ5.mjs.map +0 -7
- package/dist/lib/browser/chunk-X2YC645Z.mjs.map +0 -7
- package/dist/lib/node/chunk-I3CJYEBC.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-GSDBF2CK.mjs.map +0 -7
- package/dist/types/src/common/collaboration.d.ts +0 -19
- package/dist/types/src/common/collaboration.d.ts.map +0 -1
- package/src/common/collaboration.ts +0 -21
- package/typedoc/.nojekyll +0 -1
- package/typedoc/assets/hierarchy.js +0 -1
- package/typedoc/assets/highlight.css +0 -106
- package/typedoc/assets/icons.js +0 -18
- package/typedoc/assets/icons.svg +0 -1
- package/typedoc/assets/main.js +0 -60
- package/typedoc/assets/navigation.js +0 -1
- package/typedoc/assets/search.js +0 -1
- package/typedoc/assets/style.css +0 -1640
- package/typedoc/classes/CollaborationActions.InsertContent.html +0 -421
- package/typedoc/classes/ErrorBoundary.html +0 -125
- package/typedoc/classes/IntentAction.ShowUndo.html +0 -227
- package/typedoc/classes/IntentAction.Track.html +0 -266
- package/typedoc/classes/LayoutAction.AddToast.html +0 -265
- package/typedoc/classes/LayoutAction.Close.html +0 -382
- package/typedoc/classes/LayoutAction.Expose.html +0 -265
- package/typedoc/classes/LayoutAction.Open.html +0 -967
- package/typedoc/classes/LayoutAction.RevertWorkspace.html +0 -343
- package/typedoc/classes/LayoutAction.ScrollIntoView.html +0 -460
- package/typedoc/classes/LayoutAction.Set.html +0 -382
- package/typedoc/classes/LayoutAction.SetLayoutMode.html +0 -421
- package/typedoc/classes/LayoutAction.SwitchWorkspace.html +0 -265
- package/typedoc/classes/LayoutAction.UpdateComplementary.html +0 -616
- package/typedoc/classes/LayoutAction.UpdateDialog.html +0 -733
- package/typedoc/classes/LayoutAction.UpdateLayout.html +0 -461
- package/typedoc/classes/LayoutAction.UpdatePopover.html +0 -1435
- package/typedoc/classes/LayoutAction.UpdateSidebar.html +0 -538
- package/typedoc/classes/Plugin.html +0 -6
- package/typedoc/classes/PluginManager.html +0 -42
- package/typedoc/classes/PluginModule.html +0 -18
- package/typedoc/classes/PluginsContext.html +0 -25
- package/typedoc/classes/SettingsAction.Open.html +0 -226
- package/typedoc/classes/SettingsAction.OpenPluginRegistry.html +0 -265
- package/typedoc/functions/Events.createStateEvent.html +0 -2
- package/typedoc/functions/IntentPlugin.html +0 -1
- package/typedoc/functions/SettingsPlugin.html +0 -1
- package/typedoc/functions/allOf.html +0 -2
- package/typedoc/functions/chain.html +0 -3
- package/typedoc/functions/contributes.html +0 -2
- package/typedoc/functions/createApp.html +0 -6
- package/typedoc/functions/createDispatcher.html +0 -3
- package/typedoc/functions/createIntent.html +0 -6
- package/typedoc/functions/createResolver.html +0 -2
- package/typedoc/functions/createSurface.html +0 -2
- package/typedoc/functions/defineCapability.html +0 -2
- package/typedoc/functions/defineEvent.html +0 -2
- package/typedoc/functions/defineModule.html +0 -2
- package/typedoc/functions/definePlugin.html +0 -2
- package/typedoc/functions/eventKey.html +0 -2
- package/typedoc/functions/getEvents.html +0 -2
- package/typedoc/functions/isAllOf.html +0 -2
- package/typedoc/functions/isOneOf.html +0 -2
- package/typedoc/functions/isSurfaceAvailable.html +0 -2
- package/typedoc/functions/lazy.html +0 -2
- package/typedoc/functions/oneOf.html +0 -2
- package/typedoc/functions/useAppGraph.html +0 -1
- package/typedoc/functions/useCapabilities.html +0 -3
- package/typedoc/functions/useCapability.html +0 -4
- package/typedoc/functions/useIntentDispatcher.html +0 -1
- package/typedoc/functions/useIntentResolver.html +0 -1
- package/typedoc/functions/useLayout.html +0 -1
- package/typedoc/functions/usePluginManager.html +0 -2
- package/typedoc/hierarchy.html +0 -1
- package/typedoc/index.html +0 -16
- package/typedoc/interfaces/LayoutAction.Toast.html +0 -10
- package/typedoc/media/LICENSE +0 -8
- package/typedoc/modules/Capabilities.html +0 -1
- package/typedoc/modules/CollaborationActions.html +0 -1
- package/typedoc/modules/Events.html +0 -1
- package/typedoc/modules/IntentAction.html +0 -1
- package/typedoc/modules/LayoutAction.html +0 -2
- package/typedoc/modules/SettingsAction.html +0 -1
- package/typedoc/modules.html +0 -1
- package/typedoc/types/ActivationEvent.html +0 -8
- package/typedoc/types/ActivationEvents.html +0 -2
- package/typedoc/types/AnyCapability.html +0 -1
- package/typedoc/types/AnyIntent.html +0 -1
- package/typedoc/types/AnyIntentChain.html +0 -1
- package/typedoc/types/AnyIntentEffectResult.html +0 -1
- package/typedoc/types/AnyIntentResolver.html +0 -1
- package/typedoc/types/AnyIntentResult.html +0 -1
- package/typedoc/types/Capabilities.FileUploader.html +0 -1
- package/typedoc/types/Capabilities.IntentResolver.html +0 -1
- package/typedoc/types/Capabilities.Layout.html +0 -1
- package/typedoc/types/Capabilities.Metadata.html +0 -1
- package/typedoc/types/Capabilities.ReactContext.html +0 -1
- package/typedoc/types/Capabilities.ReactRoot.html +0 -1
- package/typedoc/types/Capabilities.ReactSurface.html +0 -1
- package/typedoc/types/Capabilities.Settings.html +0 -4
- package/typedoc/types/Capability.html +0 -9
- package/typedoc/types/CreateAppOptions.html +0 -9
- package/typedoc/types/FileInfo.html +0 -1
- package/typedoc/types/Intent.html +0 -14
- package/typedoc/types/IntentChain.html +0 -6
- package/typedoc/types/IntentContext.html +0 -5
- package/typedoc/types/IntentData.html +0 -1
- package/typedoc/types/IntentDispatcher.html +0 -2
- package/typedoc/types/IntentDispatcherResult.html +0 -2
- package/typedoc/types/IntentEffectDefinition.html +0 -2
- package/typedoc/types/IntentEffectResult.html +0 -15
- package/typedoc/types/IntentParams.html +0 -3
- package/typedoc/types/IntentResolver.html +0 -2
- package/typedoc/types/IntentResultData.html +0 -1
- package/typedoc/types/IntentSchema.html +0 -1
- package/typedoc/types/IntentUndo.html +0 -2
- package/typedoc/types/InterfaceDef.html +0 -4
- package/typedoc/types/Label.html +0 -1
- package/typedoc/types/NodeSerializer.html +0 -8
- package/typedoc/types/PluginManagerOptions.html +0 -5
- package/typedoc/types/PluginMeta.html +0 -21
- package/typedoc/types/PromiseIntentDispatcher.html +0 -2
- package/typedoc/types/PromiseIntentUndo.html +0 -2
- package/typedoc/types/Resource.html +0 -1
- package/typedoc/types/ResourceKey.html +0 -1
- package/typedoc/types/ResourceLanguage.html +0 -1
- package/typedoc/types/SerializedNode.html +0 -4
- package/typedoc/types/SurfaceComponent.html +0 -2
- package/typedoc/types/SurfaceDefinition.html +0 -2
- package/typedoc/types/SurfaceProps.html +0 -4
- package/typedoc/variables/Capabilities.AppGraph.html +0 -1
- package/typedoc/variables/Capabilities.AppGraphBuilder.html +0 -1
- package/typedoc/variables/Capabilities.AppGraphSerializer.html +0 -1
- package/typedoc/variables/Capabilities.ArtifactDefinition.html +0 -1
- package/typedoc/variables/Capabilities.FileUploader.html +0 -1
- package/typedoc/variables/Capabilities.IntentDispatcher.html +0 -1
- package/typedoc/variables/Capabilities.IntentResolver.html +0 -1
- package/typedoc/variables/Capabilities.Layout.html +0 -1
- package/typedoc/variables/Capabilities.Metadata.html +0 -1
- package/typedoc/variables/Capabilities.Null.html +0 -1
- package/typedoc/variables/Capabilities.PluginManager.html +0 -1
- package/typedoc/variables/Capabilities.ReactContext.html +0 -1
- package/typedoc/variables/Capabilities.ReactRoot.html +0 -1
- package/typedoc/variables/Capabilities.ReactSurface.html +0 -1
- package/typedoc/variables/Capabilities.Settings.html +0 -1
- package/typedoc/variables/Capabilities.SettingsStore.html +0 -1
- package/typedoc/variables/Capabilities.Tools.html +0 -1
- package/typedoc/variables/Capabilities.Translations.html +0 -1
- package/typedoc/variables/Events.AppGraphReady.html +0 -2
- package/typedoc/variables/Events.DispatcherReady.html +0 -2
- package/typedoc/variables/Events.LayoutReady.html +0 -1
- package/typedoc/variables/Events.SettingsReady.html +0 -2
- package/typedoc/variables/Events.SetupAppGraph.html +0 -2
- package/typedoc/variables/Events.SetupArtifactDefinition.html +0 -2
- package/typedoc/variables/Events.SetupIntentResolver.html +0 -2
- package/typedoc/variables/Events.SetupMetadata.html +0 -2
- package/typedoc/variables/Events.SetupReactSurface.html +0 -2
- package/typedoc/variables/Events.SetupSettings.html +0 -2
- package/typedoc/variables/Events.SetupTranslations.html +0 -2
- package/typedoc/variables/Events.Startup.html +0 -2
- package/typedoc/variables/FileInfoSchema.html +0 -1
- package/typedoc/variables/INTENT_ACTION.html +0 -1
- package/typedoc/variables/INTENT_PLUGIN.html +0 -1
- package/typedoc/variables/LAYOUT_ACTION.html +0 -1
- package/typedoc/variables/LAYOUT_PLUGIN.html +0 -1
- package/typedoc/variables/Label.html +0 -1
- package/typedoc/variables/LayoutAction.Toast.html +0 -1
- package/typedoc/variables/LayoutAction.UPDATE_LAYOUT.html +0 -1
- package/typedoc/variables/PluginManagerProvider.html +0 -2
- package/typedoc/variables/Resource.html +0 -2
- package/typedoc/variables/ResourceKey.html +0 -1
- package/typedoc/variables/ResourceLanguage.html +0 -1
- package/typedoc/variables/SETTINGS_ACTION.html +0 -1
- package/typedoc/variables/SETTINGS_ID.html +0 -1
- package/typedoc/variables/SETTINGS_KEY.html +0 -1
- package/typedoc/variables/SETTINGS_PLUGIN.html +0 -1
- package/typedoc/variables/Surface.html +0 -2
- package/typedoc/variables/defaultFileTypes.html +0 -1
- /package/dist/lib/browser/{app-graph-builder-OHM2Z6YQ.mjs.map → app-graph-builder-576BHZC7.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-dispatcher-J7QIFHLO.mjs.map → intent-dispatcher-3Q67MHZZ.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-resolver-QV5MDMDV.mjs.map → intent-resolver-O763LCLG.mjs.map} +0 -0
- /package/dist/lib/browser/{store-XMPVLJOQ.mjs.map → store-URSN7DZI.mjs.map} +0 -0
- /package/dist/lib/node/{app-graph-builder-Z45FKS52.cjs.map → app-graph-builder-JZCSKYPY.cjs.map} +0 -0
- /package/dist/lib/node/{intent-resolver-PBAOGJS6.cjs.map → intent-resolver-3F4POWAM.cjs.map} +0 -0
- /package/dist/lib/node/{store-N7JLYYDI.cjs.map → store-OFDHTDCB.cjs.map} +0 -0
- /package/dist/lib/node-esm/{app-graph-builder-OMH534A4.mjs.map → app-graph-builder-VYKLSMSZ.mjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-dispatcher-QDUGA7NT.mjs.map → intent-dispatcher-YDE2ONZA.mjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-resolver-P7TC5RBD.mjs.map → intent-resolver-LAGJ7LXM.mjs.map} +0 -0
- /package/dist/lib/node-esm/{store-M2BYJL6K.mjs.map → store-EYSUVNCS.mjs.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// packages/sdk/app-framework/src/plugin-intent/intent-dispatcher.ts
|
|
2
|
-
import { Effect as Effect3, Option, pipe as pipe2, Ref
|
|
3
|
-
import {
|
|
2
|
+
import { Effect as Effect3, Option, pipe as pipe2, Ref } from "effect";
|
|
3
|
+
import { create as create3 } from "@dxos/live-object";
|
|
4
4
|
import { log as log3 } from "@dxos/log";
|
|
5
5
|
import { byPosition } from "@dxos/util";
|
|
6
6
|
|
|
@@ -104,7 +104,7 @@ import { effect, untracked } from "@preact/signals-core";
|
|
|
104
104
|
import { Effect } from "effect";
|
|
105
105
|
import { Trigger } from "@dxos/async";
|
|
106
106
|
import { invariant } from "@dxos/invariant";
|
|
107
|
-
import {
|
|
107
|
+
import { create } from "@dxos/live-object";
|
|
108
108
|
import { log } from "@dxos/log";
|
|
109
109
|
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/core/capabilities.ts";
|
|
110
110
|
var InterfaceDefTypeId = Symbol.for("InterfaceDefTypeId");
|
|
@@ -142,7 +142,7 @@ var PluginsContext = class {
|
|
|
142
142
|
contributeCapability({ module: moduleId, interface: interfaceDef, implementation }) {
|
|
143
143
|
let current = this._definedCapabilities.get(interfaceDef.identifier);
|
|
144
144
|
if (!current) {
|
|
145
|
-
const object =
|
|
145
|
+
const object = create({
|
|
146
146
|
value: []
|
|
147
147
|
});
|
|
148
148
|
current = untracked(() => object.value);
|
|
@@ -155,7 +155,7 @@ var PluginsContext = class {
|
|
|
155
155
|
count: untracked(() => current.length)
|
|
156
156
|
}, {
|
|
157
157
|
F: __dxlog_file,
|
|
158
|
-
L:
|
|
158
|
+
L: 142,
|
|
159
159
|
S: this,
|
|
160
160
|
C: (f, a) => f(...a)
|
|
161
161
|
});
|
|
@@ -176,7 +176,7 @@ var PluginsContext = class {
|
|
|
176
176
|
count: untracked(() => current.length)
|
|
177
177
|
}, {
|
|
178
178
|
F: __dxlog_file,
|
|
179
|
-
L:
|
|
179
|
+
L: 161,
|
|
180
180
|
S: this,
|
|
181
181
|
C: (f, a) => f(...a)
|
|
182
182
|
});
|
|
@@ -185,7 +185,7 @@ var PluginsContext = class {
|
|
|
185
185
|
id: interfaceDef.identifier
|
|
186
186
|
}, {
|
|
187
187
|
F: __dxlog_file,
|
|
188
|
-
L:
|
|
188
|
+
L: 163,
|
|
189
189
|
S: this,
|
|
190
190
|
C: (f, a) => f(...a)
|
|
191
191
|
});
|
|
@@ -199,7 +199,7 @@ var PluginsContext = class {
|
|
|
199
199
|
requestCapabilities(interfaceDef, filter) {
|
|
200
200
|
let current = this._definedCapabilities.get(interfaceDef.identifier);
|
|
201
201
|
if (!current) {
|
|
202
|
-
const object =
|
|
202
|
+
const object = create({
|
|
203
203
|
value: []
|
|
204
204
|
});
|
|
205
205
|
current = untracked(() => object.value);
|
|
@@ -218,7 +218,7 @@ var PluginsContext = class {
|
|
|
218
218
|
const capability = this.requestCapabilities(interfaceDef, filter)[0];
|
|
219
219
|
invariant(capability, `No capability found for ${interfaceDef.identifier}`, {
|
|
220
220
|
F: __dxlog_file,
|
|
221
|
-
L:
|
|
221
|
+
L: 199,
|
|
222
222
|
S: this,
|
|
223
223
|
A: [
|
|
224
224
|
"capability",
|
|
@@ -277,7 +277,7 @@ var getEvents = (events) => "type" in events ? events.events : [
|
|
|
277
277
|
import { untracked as untracked2 } from "@preact/signals-core";
|
|
278
278
|
import { Array as A, Effect as Effect2, Either, Match, pipe } from "effect";
|
|
279
279
|
import { Event } from "@dxos/async";
|
|
280
|
-
import {
|
|
280
|
+
import { create as create2 } from "@dxos/live-object";
|
|
281
281
|
import { log as log2 } from "@dxos/log";
|
|
282
282
|
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/core/manager.ts";
|
|
283
283
|
var isPromise = (value) => {
|
|
@@ -292,7 +292,7 @@ var PluginManager = class {
|
|
|
292
292
|
});
|
|
293
293
|
this._capabilities = /* @__PURE__ */ new Map();
|
|
294
294
|
this._pluginLoader = pluginLoader;
|
|
295
|
-
this._state =
|
|
295
|
+
this._state = create2({
|
|
296
296
|
plugins,
|
|
297
297
|
core,
|
|
298
298
|
enabled,
|
|
@@ -854,26 +854,6 @@ var Capabilities;
|
|
|
854
854
|
Capabilities2.FileUploader = defineCapability("dxos.org/app-framework/capability/file-uploader");
|
|
855
855
|
})(Capabilities || (Capabilities = {}));
|
|
856
856
|
|
|
857
|
-
// packages/sdk/app-framework/src/common/collaboration.ts
|
|
858
|
-
import { SchemaAST as AST, Schema as S3 } from "effect";
|
|
859
|
-
import { Expando, Ref, SpaceIdSchema } from "@dxos/echo-schema";
|
|
860
|
-
var CollaborationActions;
|
|
861
|
-
(function(CollaborationActions2) {
|
|
862
|
-
class InsertContent extends S3.TaggedClass()("assistant/intent-content", {
|
|
863
|
-
input: S3.Struct({
|
|
864
|
-
spaceId: SpaceIdSchema,
|
|
865
|
-
target: Ref(Expando),
|
|
866
|
-
object: Ref(Expando),
|
|
867
|
-
label: S3.String.pipe(S3.optional)
|
|
868
|
-
}).annotations({
|
|
869
|
-
[AST.DescriptionAnnotationId]: "Enables plugins to inject content blocks or references into a related entity."
|
|
870
|
-
}),
|
|
871
|
-
output: S3.Void
|
|
872
|
-
}) {
|
|
873
|
-
}
|
|
874
|
-
CollaborationActions2.InsertContent = InsertContent;
|
|
875
|
-
})(CollaborationActions || (CollaborationActions = {}));
|
|
876
|
-
|
|
877
857
|
// packages/sdk/app-framework/src/common/events.ts
|
|
878
858
|
var Events;
|
|
879
859
|
(function(Events2) {
|
|
@@ -893,7 +873,7 @@ var Events;
|
|
|
893
873
|
})(Events || (Events = {}));
|
|
894
874
|
|
|
895
875
|
// packages/sdk/app-framework/src/common/file.ts
|
|
896
|
-
import { Schema as
|
|
876
|
+
import { Schema as S3 } from "effect";
|
|
897
877
|
var defaultFileTypes = {
|
|
898
878
|
images: [
|
|
899
879
|
"png",
|
|
@@ -913,15 +893,15 @@ var defaultFileTypes = {
|
|
|
913
893
|
"md"
|
|
914
894
|
]
|
|
915
895
|
};
|
|
916
|
-
var FileInfoSchema =
|
|
917
|
-
name:
|
|
918
|
-
type:
|
|
919
|
-
url:
|
|
920
|
-
cid:
|
|
896
|
+
var FileInfoSchema = S3.Struct({
|
|
897
|
+
name: S3.String,
|
|
898
|
+
type: S3.String,
|
|
899
|
+
url: S3.optional(S3.String),
|
|
900
|
+
cid: S3.optional(S3.String)
|
|
921
901
|
});
|
|
922
902
|
|
|
923
903
|
// packages/sdk/app-framework/src/common/layout.ts
|
|
924
|
-
import { Schema as
|
|
904
|
+
import { Schema as S4 } from "effect";
|
|
925
905
|
|
|
926
906
|
// packages/sdk/app-framework/src/plugin-intent/IntentPlugin.tsx
|
|
927
907
|
var IntentPlugin = () => definePlugin({
|
|
@@ -937,7 +917,7 @@ var IntentPlugin = () => definePlugin({
|
|
|
937
917
|
activatesAfter: [
|
|
938
918
|
Events.DispatcherReady
|
|
939
919
|
],
|
|
940
|
-
activate: lazy(() => import("./intent-dispatcher-
|
|
920
|
+
activate: lazy(() => import("./intent-dispatcher-3Q67MHZZ.mjs"))
|
|
941
921
|
})
|
|
942
922
|
]);
|
|
943
923
|
|
|
@@ -947,323 +927,313 @@ var LAYOUT_ACTION = `${LAYOUT_PLUGIN}/action`;
|
|
|
947
927
|
var LayoutAction;
|
|
948
928
|
(function(LayoutAction2) {
|
|
949
929
|
LayoutAction2.UPDATE_LAYOUT = `${LAYOUT_ACTION}/update-layout`;
|
|
950
|
-
class UpdateLayout extends
|
|
951
|
-
input:
|
|
952
|
-
part:
|
|
930
|
+
class UpdateLayout extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
931
|
+
input: S4.Struct({
|
|
932
|
+
part: S4.String.annotations({
|
|
953
933
|
description: "The part of the layout to mutate."
|
|
954
934
|
}),
|
|
955
|
-
subject:
|
|
935
|
+
subject: S4.optional(S4.Any.annotations({
|
|
956
936
|
description: "The subject of the layout update."
|
|
957
937
|
})),
|
|
958
|
-
options:
|
|
959
|
-
key:
|
|
960
|
-
value:
|
|
938
|
+
options: S4.optional(S4.Record({
|
|
939
|
+
key: S4.String,
|
|
940
|
+
value: S4.Any
|
|
961
941
|
}).annotations({
|
|
962
942
|
description: "Additional options for the layout action."
|
|
963
943
|
}))
|
|
964
944
|
}),
|
|
965
|
-
output:
|
|
945
|
+
output: S4.Void
|
|
966
946
|
}) {
|
|
967
947
|
}
|
|
968
948
|
LayoutAction2.UpdateLayout = UpdateLayout;
|
|
969
|
-
class SetLayoutMode extends
|
|
970
|
-
input:
|
|
971
|
-
part:
|
|
949
|
+
class SetLayoutMode extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
950
|
+
input: S4.Struct({
|
|
951
|
+
part: S4.Literal("mode").annotations({
|
|
972
952
|
description: "Setting the layout mode."
|
|
973
953
|
}),
|
|
974
|
-
subject:
|
|
954
|
+
subject: S4.optional(S4.String.annotations({
|
|
975
955
|
description: "Item which is the subject of the new layout mode."
|
|
976
956
|
})),
|
|
977
|
-
options:
|
|
978
|
-
mode:
|
|
957
|
+
options: S4.Union(S4.Struct({
|
|
958
|
+
mode: S4.String.annotations({
|
|
979
959
|
description: "The new layout mode."
|
|
980
960
|
})
|
|
981
|
-
}),
|
|
982
|
-
revert:
|
|
961
|
+
}), S4.Struct({
|
|
962
|
+
revert: S4.Boolean.annotations({
|
|
983
963
|
description: "Revert to the previous layout mode."
|
|
984
964
|
})
|
|
985
965
|
}))
|
|
986
966
|
}),
|
|
987
|
-
output:
|
|
967
|
+
output: S4.Void
|
|
988
968
|
}) {
|
|
989
969
|
}
|
|
990
970
|
LayoutAction2.SetLayoutMode = SetLayoutMode;
|
|
991
|
-
class UpdateSidebar extends
|
|
992
|
-
input:
|
|
993
|
-
part:
|
|
971
|
+
class UpdateSidebar extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
972
|
+
input: S4.Struct({
|
|
973
|
+
part: S4.Literal("sidebar").annotations({
|
|
994
974
|
description: "Updating the sidebar."
|
|
995
975
|
}),
|
|
996
|
-
subject:
|
|
976
|
+
subject: S4.optional(S4.String.annotations({
|
|
997
977
|
description: "URI of the component to display in the sidebar."
|
|
998
978
|
})),
|
|
999
|
-
options:
|
|
1000
|
-
state:
|
|
979
|
+
options: S4.optional(S4.Struct({
|
|
980
|
+
state: S4.Literal("closed", "collapsed", "expanded").annotations({
|
|
1001
981
|
description: "Whether the sidebar is closed, collapsed, or expanded."
|
|
1002
982
|
})
|
|
1003
983
|
}))
|
|
1004
984
|
}),
|
|
1005
|
-
output:
|
|
985
|
+
output: S4.Void
|
|
1006
986
|
}) {
|
|
1007
987
|
}
|
|
1008
988
|
LayoutAction2.UpdateSidebar = UpdateSidebar;
|
|
1009
|
-
class UpdateComplementary extends
|
|
1010
|
-
input:
|
|
1011
|
-
part:
|
|
989
|
+
class UpdateComplementary extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
990
|
+
input: S4.Struct({
|
|
991
|
+
part: S4.Literal("complementary").annotations({
|
|
1012
992
|
description: "Updating the complementary sidebar."
|
|
1013
993
|
}),
|
|
1014
|
-
subject:
|
|
994
|
+
subject: S4.optional(S4.String.annotations({
|
|
1015
995
|
description: "URI of the component to display in the complementary area."
|
|
1016
996
|
})),
|
|
1017
|
-
options:
|
|
1018
|
-
state:
|
|
997
|
+
options: S4.optional(S4.Struct({
|
|
998
|
+
state: S4.Literal("closed", "collapsed", "expanded").annotations({
|
|
1019
999
|
description: "Whether the complementary sidebar is closed, collapsed, or expanded."
|
|
1020
1000
|
})
|
|
1021
1001
|
}))
|
|
1022
1002
|
}),
|
|
1023
|
-
output:
|
|
1003
|
+
output: S4.Void
|
|
1024
1004
|
}) {
|
|
1025
1005
|
}
|
|
1026
1006
|
LayoutAction2.UpdateComplementary = UpdateComplementary;
|
|
1027
|
-
class UpdateDialog extends
|
|
1028
|
-
input:
|
|
1029
|
-
part:
|
|
1007
|
+
class UpdateDialog extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1008
|
+
input: S4.Struct({
|
|
1009
|
+
part: S4.Literal("dialog").annotations({
|
|
1030
1010
|
description: "Updating the dialog."
|
|
1031
1011
|
}),
|
|
1032
|
-
subject:
|
|
1012
|
+
subject: S4.optional(S4.String.annotations({
|
|
1033
1013
|
description: "URI of the component to display in the dialog."
|
|
1034
1014
|
})),
|
|
1035
|
-
options:
|
|
1036
|
-
state:
|
|
1015
|
+
options: S4.Struct({
|
|
1016
|
+
state: S4.optional(S4.Boolean.annotations({
|
|
1037
1017
|
description: "Whether the dialog is open or closed."
|
|
1038
1018
|
})),
|
|
1039
|
-
blockAlign:
|
|
1019
|
+
blockAlign: S4.optional(S4.Literal("start", "center", "end").annotations({
|
|
1040
1020
|
description: "The alignment of the dialog."
|
|
1041
1021
|
})),
|
|
1042
|
-
type:
|
|
1022
|
+
type: S4.optional(S4.Literal("default", "alert").annotations({
|
|
1043
1023
|
description: "The type of dialog."
|
|
1044
1024
|
})),
|
|
1045
|
-
props:
|
|
1046
|
-
key:
|
|
1047
|
-
value:
|
|
1025
|
+
props: S4.optional(S4.Record({
|
|
1026
|
+
key: S4.String,
|
|
1027
|
+
value: S4.Any
|
|
1048
1028
|
}).annotations({
|
|
1049
1029
|
description: "Additional props for the dialog."
|
|
1050
1030
|
}))
|
|
1051
1031
|
})
|
|
1052
1032
|
}),
|
|
1053
|
-
output:
|
|
1033
|
+
output: S4.Void
|
|
1054
1034
|
}) {
|
|
1055
1035
|
}
|
|
1056
1036
|
LayoutAction2.UpdateDialog = UpdateDialog;
|
|
1057
|
-
class UpdatePopover extends
|
|
1058
|
-
input:
|
|
1059
|
-
part:
|
|
1037
|
+
class UpdatePopover extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1038
|
+
input: S4.Struct({
|
|
1039
|
+
part: S4.Literal("popover").annotations({
|
|
1060
1040
|
description: "Updating the popover."
|
|
1061
1041
|
}),
|
|
1062
|
-
subject:
|
|
1063
|
-
description: "URI of the component to display in the popover
|
|
1042
|
+
subject: S4.optional(S4.String.annotations({
|
|
1043
|
+
description: "URI of the component to display in the popover."
|
|
1064
1044
|
})),
|
|
1065
|
-
options:
|
|
1066
|
-
|
|
1045
|
+
options: S4.Struct({
|
|
1046
|
+
anchorId: S4.String.annotations({
|
|
1047
|
+
description: "The id of the element to anchor the popover to."
|
|
1048
|
+
}),
|
|
1049
|
+
side: S4.optional(S4.Literal("top", "right", "bottom", "left").annotations({
|
|
1067
1050
|
description: "The side of the anchor."
|
|
1068
1051
|
})),
|
|
1069
|
-
state:
|
|
1052
|
+
state: S4.optional(S4.Boolean.annotations({
|
|
1070
1053
|
description: "Whether the popover is open or closed."
|
|
1071
1054
|
})),
|
|
1072
|
-
props:
|
|
1073
|
-
key:
|
|
1074
|
-
value:
|
|
1055
|
+
props: S4.optional(S4.Record({
|
|
1056
|
+
key: S4.String,
|
|
1057
|
+
value: S4.Any
|
|
1075
1058
|
}).annotations({
|
|
1076
1059
|
description: "Additional props for the popover."
|
|
1077
1060
|
}))
|
|
1078
|
-
})
|
|
1079
|
-
variant: S5.Literal("virtual"),
|
|
1080
|
-
anchor: S5.Any.annotations({
|
|
1081
|
-
description: "The DOM element to anchor the popover to."
|
|
1082
|
-
})
|
|
1083
|
-
}), S5.Struct({
|
|
1084
|
-
variant: S5.optional(S5.Literal("react")),
|
|
1085
|
-
anchorId: S5.String.annotations({
|
|
1086
|
-
description: "An id that can be used to determine whether to render the anchor subcomponent."
|
|
1087
|
-
})
|
|
1088
|
-
}))))
|
|
1061
|
+
})
|
|
1089
1062
|
}),
|
|
1090
|
-
output:
|
|
1063
|
+
output: S4.Void
|
|
1091
1064
|
}) {
|
|
1092
1065
|
}
|
|
1093
1066
|
LayoutAction2.UpdatePopover = UpdatePopover;
|
|
1094
|
-
LayoutAction2.Toast =
|
|
1095
|
-
id:
|
|
1067
|
+
LayoutAction2.Toast = S4.Struct({
|
|
1068
|
+
id: S4.String.annotations({
|
|
1096
1069
|
description: "The id of the toast."
|
|
1097
1070
|
}),
|
|
1098
|
-
title:
|
|
1071
|
+
title: S4.optional(Label.annotations({
|
|
1099
1072
|
description: "The title of the toast."
|
|
1100
1073
|
})),
|
|
1101
|
-
description:
|
|
1074
|
+
description: S4.optional(Label.annotations({
|
|
1102
1075
|
description: "The description of the toast."
|
|
1103
1076
|
})),
|
|
1104
|
-
icon:
|
|
1077
|
+
icon: S4.optional(S4.String.annotations({
|
|
1105
1078
|
description: "The icon of the toast."
|
|
1106
1079
|
})),
|
|
1107
|
-
duration:
|
|
1080
|
+
duration: S4.optional(S4.Number.annotations({
|
|
1108
1081
|
description: "The duration of the toast."
|
|
1109
1082
|
})),
|
|
1110
|
-
closeLabel:
|
|
1083
|
+
closeLabel: S4.optional(Label.annotations({
|
|
1111
1084
|
description: "The label of the close button."
|
|
1112
1085
|
})),
|
|
1113
|
-
actionLabel:
|
|
1086
|
+
actionLabel: S4.optional(Label.annotations({
|
|
1114
1087
|
description: "The label of the action button."
|
|
1115
1088
|
})),
|
|
1116
|
-
actionAlt:
|
|
1089
|
+
actionAlt: S4.optional(Label.annotations({
|
|
1117
1090
|
description: "The alt text of the action button."
|
|
1118
1091
|
})),
|
|
1119
|
-
onAction:
|
|
1092
|
+
onAction: S4.optional(S4.Any.annotations({
|
|
1120
1093
|
description: "The action to perform when the action button is clicked."
|
|
1121
1094
|
}))
|
|
1122
1095
|
});
|
|
1123
|
-
class AddToast extends
|
|
1124
|
-
input:
|
|
1125
|
-
part:
|
|
1096
|
+
class AddToast extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1097
|
+
input: S4.Struct({
|
|
1098
|
+
part: S4.Literal("toast").annotations({
|
|
1126
1099
|
description: "Adding a toast."
|
|
1127
1100
|
}),
|
|
1128
1101
|
subject: LayoutAction2.Toast.annotations({
|
|
1129
1102
|
description: "The toast to add."
|
|
1130
1103
|
})
|
|
1131
1104
|
}),
|
|
1132
|
-
output:
|
|
1105
|
+
output: S4.Void
|
|
1133
1106
|
}) {
|
|
1134
1107
|
}
|
|
1135
1108
|
LayoutAction2.AddToast = AddToast;
|
|
1136
|
-
class SwitchWorkspace extends
|
|
1137
|
-
input:
|
|
1138
|
-
part:
|
|
1109
|
+
class SwitchWorkspace extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1110
|
+
input: S4.Struct({
|
|
1111
|
+
part: S4.Literal("workspace").annotations({
|
|
1139
1112
|
description: "Switching the workspace."
|
|
1140
1113
|
}),
|
|
1141
|
-
subject:
|
|
1114
|
+
subject: S4.String.annotations({
|
|
1142
1115
|
description: "The id of the workspace to switch to."
|
|
1143
1116
|
})
|
|
1144
1117
|
}),
|
|
1145
|
-
output:
|
|
1118
|
+
output: S4.Void
|
|
1146
1119
|
}) {
|
|
1147
1120
|
}
|
|
1148
1121
|
LayoutAction2.SwitchWorkspace = SwitchWorkspace;
|
|
1149
|
-
class RevertWorkspace extends
|
|
1150
|
-
input:
|
|
1151
|
-
part:
|
|
1122
|
+
class RevertWorkspace extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1123
|
+
input: S4.Struct({
|
|
1124
|
+
part: S4.Literal("workspace").annotations({
|
|
1152
1125
|
description: "Switching the workspace."
|
|
1153
1126
|
}),
|
|
1154
|
-
options:
|
|
1155
|
-
revert:
|
|
1127
|
+
options: S4.Struct({
|
|
1128
|
+
revert: S4.Literal(true).annotations({
|
|
1156
1129
|
description: "Revert to the previous workspace."
|
|
1157
1130
|
})
|
|
1158
1131
|
})
|
|
1159
1132
|
}),
|
|
1160
|
-
output:
|
|
1133
|
+
output: S4.Void
|
|
1161
1134
|
}) {
|
|
1162
1135
|
}
|
|
1163
1136
|
LayoutAction2.RevertWorkspace = RevertWorkspace;
|
|
1164
|
-
class Open extends
|
|
1165
|
-
input:
|
|
1166
|
-
part:
|
|
1137
|
+
class Open extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1138
|
+
input: S4.Struct({
|
|
1139
|
+
part: S4.Literal("main").annotations({
|
|
1167
1140
|
description: "Opening an item in the main content area."
|
|
1168
1141
|
}),
|
|
1169
|
-
subject:
|
|
1142
|
+
subject: S4.Array(S4.String.annotations({
|
|
1170
1143
|
description: "Ids of the items to open."
|
|
1171
1144
|
})),
|
|
1172
|
-
options:
|
|
1173
|
-
state:
|
|
1145
|
+
options: S4.optional(S4.Struct({
|
|
1146
|
+
state: S4.optional(S4.Literal(true).annotations({
|
|
1174
1147
|
description: "The items are being added."
|
|
1175
1148
|
})),
|
|
1176
|
-
variant:
|
|
1149
|
+
variant: S4.optional(S4.String.annotations({
|
|
1177
1150
|
description: "The variant of the item to open."
|
|
1178
1151
|
})),
|
|
1179
|
-
key:
|
|
1152
|
+
key: S4.optional(S4.String.annotations({
|
|
1180
1153
|
description: "If provided, will replace item with a matching key (id prefix)."
|
|
1181
1154
|
})),
|
|
1182
|
-
|
|
1183
|
-
description: "The workspace to open the items in."
|
|
1184
|
-
})),
|
|
1185
|
-
scrollIntoView: S5.optional(S5.Boolean.annotations({
|
|
1155
|
+
scrollIntoView: S4.optional(S4.Boolean.annotations({
|
|
1186
1156
|
description: "Scroll the items into view."
|
|
1187
1157
|
})),
|
|
1188
|
-
pivotId:
|
|
1158
|
+
pivotId: S4.optional(S4.String.annotations({
|
|
1189
1159
|
description: "The id of the item to place new items next to."
|
|
1190
1160
|
})),
|
|
1191
|
-
positioning:
|
|
1161
|
+
positioning: S4.optional(S4.Union(S4.Literal("start").annotations({
|
|
1192
1162
|
description: "The items are being added before the pivot item."
|
|
1193
|
-
}),
|
|
1163
|
+
}), S4.Literal("end").annotations({
|
|
1194
1164
|
description: "The items are being added after the pivot item."
|
|
1195
1165
|
})))
|
|
1196
1166
|
}))
|
|
1197
1167
|
}),
|
|
1198
|
-
output:
|
|
1168
|
+
output: S4.Void
|
|
1199
1169
|
}) {
|
|
1200
1170
|
}
|
|
1201
1171
|
LayoutAction2.Open = Open;
|
|
1202
|
-
class Set2 extends
|
|
1203
|
-
input:
|
|
1204
|
-
part:
|
|
1172
|
+
class Set2 extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1173
|
+
input: S4.Struct({
|
|
1174
|
+
part: S4.Literal("main").annotations({
|
|
1205
1175
|
description: "Setting items in the main content area."
|
|
1206
1176
|
}),
|
|
1207
|
-
subject:
|
|
1177
|
+
subject: S4.Array(S4.String.annotations({
|
|
1208
1178
|
description: "Ids of the items to set."
|
|
1209
1179
|
})),
|
|
1210
|
-
options:
|
|
1211
|
-
override:
|
|
1180
|
+
options: S4.Struct({
|
|
1181
|
+
override: S4.Literal(true).annotations({
|
|
1212
1182
|
description: "Override the current items in the main content area."
|
|
1213
1183
|
})
|
|
1214
1184
|
})
|
|
1215
1185
|
}),
|
|
1216
|
-
output:
|
|
1186
|
+
output: S4.Void
|
|
1217
1187
|
}) {
|
|
1218
1188
|
}
|
|
1219
1189
|
LayoutAction2.Set = Set2;
|
|
1220
|
-
class Close extends
|
|
1221
|
-
input:
|
|
1222
|
-
part:
|
|
1190
|
+
class Close extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1191
|
+
input: S4.Struct({
|
|
1192
|
+
part: S4.Literal("main").annotations({
|
|
1223
1193
|
description: "Closing items in the main content area."
|
|
1224
1194
|
}),
|
|
1225
|
-
subject:
|
|
1195
|
+
subject: S4.Array(S4.String.annotations({
|
|
1226
1196
|
description: "Ids of the items to close."
|
|
1227
1197
|
})),
|
|
1228
|
-
options:
|
|
1229
|
-
state:
|
|
1198
|
+
options: S4.Struct({
|
|
1199
|
+
state: S4.Literal(false).annotations({
|
|
1230
1200
|
description: "The items are being removed."
|
|
1231
1201
|
})
|
|
1232
1202
|
})
|
|
1233
1203
|
}),
|
|
1234
|
-
output:
|
|
1204
|
+
output: S4.Void
|
|
1235
1205
|
}) {
|
|
1236
1206
|
}
|
|
1237
1207
|
LayoutAction2.Close = Close;
|
|
1238
|
-
class ScrollIntoView extends
|
|
1239
|
-
input:
|
|
1240
|
-
part:
|
|
1208
|
+
class ScrollIntoView extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1209
|
+
input: S4.Struct({
|
|
1210
|
+
part: S4.Literal("current").annotations({
|
|
1241
1211
|
description: "Setting the current item"
|
|
1242
1212
|
}),
|
|
1243
|
-
subject:
|
|
1213
|
+
subject: S4.optional(S4.String.annotations({
|
|
1244
1214
|
description: "The id of the item to set as current."
|
|
1245
1215
|
})),
|
|
1246
|
-
options:
|
|
1247
|
-
key:
|
|
1248
|
-
value:
|
|
1216
|
+
options: S4.optional(S4.Record({
|
|
1217
|
+
key: S4.String,
|
|
1218
|
+
value: S4.Any
|
|
1249
1219
|
}).annotations({
|
|
1250
1220
|
description: "Additional options for the scroll into view."
|
|
1251
1221
|
}))
|
|
1252
1222
|
}),
|
|
1253
|
-
output:
|
|
1223
|
+
output: S4.Void
|
|
1254
1224
|
}) {
|
|
1255
1225
|
}
|
|
1256
1226
|
LayoutAction2.ScrollIntoView = ScrollIntoView;
|
|
1257
|
-
class Expose extends
|
|
1258
|
-
input:
|
|
1259
|
-
part:
|
|
1227
|
+
class Expose extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1228
|
+
input: S4.Struct({
|
|
1229
|
+
part: S4.Literal("navigation").annotations({
|
|
1260
1230
|
description: "Exposing an item in the navigation area."
|
|
1261
1231
|
}),
|
|
1262
|
-
subject:
|
|
1232
|
+
subject: S4.String.annotations({
|
|
1263
1233
|
description: "The id of the item to expose."
|
|
1264
1234
|
})
|
|
1265
1235
|
}),
|
|
1266
|
-
output:
|
|
1236
|
+
output: S4.Void
|
|
1267
1237
|
}) {
|
|
1268
1238
|
}
|
|
1269
1239
|
LayoutAction2.Expose = Expose;
|
|
@@ -1273,17 +1243,17 @@ var LayoutAction;
|
|
|
1273
1243
|
var createSurface = (definition) => definition;
|
|
1274
1244
|
|
|
1275
1245
|
// packages/sdk/app-framework/src/common/translations.ts
|
|
1276
|
-
import { Schema as
|
|
1277
|
-
var ResourceKey =
|
|
1278
|
-
key:
|
|
1279
|
-
value:
|
|
1246
|
+
import { Schema as S5 } from "effect";
|
|
1247
|
+
var ResourceKey = S5.Union(S5.String, S5.Record({
|
|
1248
|
+
key: S5.String,
|
|
1249
|
+
value: S5.Any
|
|
1280
1250
|
}));
|
|
1281
|
-
var ResourceLanguage =
|
|
1282
|
-
key:
|
|
1251
|
+
var ResourceLanguage = S5.Record({
|
|
1252
|
+
key: S5.String,
|
|
1283
1253
|
value: ResourceKey
|
|
1284
1254
|
});
|
|
1285
|
-
var Resource =
|
|
1286
|
-
key:
|
|
1255
|
+
var Resource = S5.Record({
|
|
1256
|
+
key: S5.String,
|
|
1287
1257
|
value: ResourceLanguage
|
|
1288
1258
|
});
|
|
1289
1259
|
|
|
@@ -1294,7 +1264,7 @@ var HISTORY_LIMIT = 100;
|
|
|
1294
1264
|
var createResolver = (resolver) => resolver;
|
|
1295
1265
|
var isUndoable = (historyEntry) => historyEntry.length > 0 && historyEntry.every(({ undoable }) => !!undoable);
|
|
1296
1266
|
var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, historyLimit = HISTORY_LIMIT } = {}) => {
|
|
1297
|
-
const historyRef = Effect3.runSync(
|
|
1267
|
+
const historyRef = Effect3.runSync(Ref.make([]));
|
|
1298
1268
|
const handleIntent = (intent) => Effect3.gen(function* () {
|
|
1299
1269
|
const candidates = getResolvers(intent.module).filter((resolver) => resolver.intent._tag === intent.id).filter((resolver) => !resolver.filter || resolver.filter(intent.data)).toSorted(byPosition);
|
|
1300
1270
|
if (candidates.length === 0) {
|
|
@@ -1312,7 +1282,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1312
1282
|
if (depth > executionLimit) {
|
|
1313
1283
|
yield* Effect3.fail(new CycleDetectedError());
|
|
1314
1284
|
}
|
|
1315
|
-
const resultsRef = yield*
|
|
1285
|
+
const resultsRef = yield* Ref.make([]);
|
|
1316
1286
|
for (const intent of intentChain.all) {
|
|
1317
1287
|
const { data: prev } = (yield* resultsRef.get)[0] ?? {};
|
|
1318
1288
|
const result2 = yield* handleIntent({
|
|
@@ -1322,7 +1292,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1322
1292
|
...prev
|
|
1323
1293
|
}
|
|
1324
1294
|
});
|
|
1325
|
-
yield*
|
|
1295
|
+
yield* Ref.update(resultsRef, (results2) => [
|
|
1326
1296
|
result2,
|
|
1327
1297
|
...results2
|
|
1328
1298
|
]);
|
|
@@ -1337,7 +1307,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1337
1307
|
}
|
|
1338
1308
|
const results = yield* resultsRef.get;
|
|
1339
1309
|
const result = results[0];
|
|
1340
|
-
yield*
|
|
1310
|
+
yield* Ref.update(historyRef, (history) => {
|
|
1341
1311
|
const next = [
|
|
1342
1312
|
...history,
|
|
1343
1313
|
results
|
|
@@ -1361,7 +1331,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1361
1331
|
})).catch((error) => {
|
|
1362
1332
|
log3.catch(error, void 0, {
|
|
1363
1333
|
F: __dxlog_file3,
|
|
1364
|
-
L:
|
|
1334
|
+
L: 254,
|
|
1365
1335
|
S: void 0,
|
|
1366
1336
|
C: (f, a) => f(...a)
|
|
1367
1337
|
});
|
|
@@ -1393,7 +1363,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1393
1363
|
last: all.at(-1),
|
|
1394
1364
|
all
|
|
1395
1365
|
};
|
|
1396
|
-
yield*
|
|
1366
|
+
yield* Ref.update(historyRef, (h) => h.filter((_, index) => index !== last));
|
|
1397
1367
|
return yield* dispatch(intent);
|
|
1398
1368
|
}
|
|
1399
1369
|
});
|
|
@@ -1415,7 +1385,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1415
1385
|
var defaultEffect = () => Effect3.fail(new Error("Intent runtime not ready"));
|
|
1416
1386
|
var defaultPromise = () => Effect3.runPromise(defaultEffect());
|
|
1417
1387
|
var intent_dispatcher_default = (context) => {
|
|
1418
|
-
const state =
|
|
1388
|
+
const state = create3({
|
|
1419
1389
|
dispatch: defaultEffect,
|
|
1420
1390
|
dispatchPromise: defaultPromise,
|
|
1421
1391
|
undo: defaultEffect,
|
|
@@ -1458,7 +1428,6 @@ export {
|
|
|
1458
1428
|
Plugin,
|
|
1459
1429
|
definePlugin,
|
|
1460
1430
|
Capabilities,
|
|
1461
|
-
CollaborationActions,
|
|
1462
1431
|
Events,
|
|
1463
1432
|
defaultFileTypes,
|
|
1464
1433
|
FileInfoSchema,
|
|
@@ -1480,4 +1449,4 @@ export {
|
|
|
1480
1449
|
ResourceLanguage,
|
|
1481
1450
|
Resource
|
|
1482
1451
|
};
|
|
1483
|
-
//# sourceMappingURL=chunk-
|
|
1452
|
+
//# sourceMappingURL=chunk-6AVTZPMT.mjs.map
|