@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,8 +1,8 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
|
|
3
3
|
// packages/sdk/app-framework/src/plugin-intent/intent-dispatcher.ts
|
|
4
|
-
import { Effect as Effect3, Option, pipe as pipe2, Ref
|
|
5
|
-
import {
|
|
4
|
+
import { Effect as Effect3, Option, pipe as pipe2, Ref } from "effect";
|
|
5
|
+
import { create as create3 } from "@dxos/live-object";
|
|
6
6
|
import { log as log3 } from "@dxos/log";
|
|
7
7
|
import { byPosition } from "@dxos/util";
|
|
8
8
|
|
|
@@ -106,7 +106,7 @@ import { effect, untracked } from "@preact/signals-core";
|
|
|
106
106
|
import { Effect } from "effect";
|
|
107
107
|
import { Trigger } from "@dxos/async";
|
|
108
108
|
import { invariant } from "@dxos/invariant";
|
|
109
|
-
import {
|
|
109
|
+
import { create } from "@dxos/live-object";
|
|
110
110
|
import { log } from "@dxos/log";
|
|
111
111
|
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/core/capabilities.ts";
|
|
112
112
|
var InterfaceDefTypeId = Symbol.for("InterfaceDefTypeId");
|
|
@@ -144,7 +144,7 @@ var PluginsContext = class {
|
|
|
144
144
|
contributeCapability({ module: moduleId, interface: interfaceDef, implementation }) {
|
|
145
145
|
let current = this._definedCapabilities.get(interfaceDef.identifier);
|
|
146
146
|
if (!current) {
|
|
147
|
-
const object =
|
|
147
|
+
const object = create({
|
|
148
148
|
value: []
|
|
149
149
|
});
|
|
150
150
|
current = untracked(() => object.value);
|
|
@@ -157,7 +157,7 @@ var PluginsContext = class {
|
|
|
157
157
|
count: untracked(() => current.length)
|
|
158
158
|
}, {
|
|
159
159
|
F: __dxlog_file,
|
|
160
|
-
L:
|
|
160
|
+
L: 142,
|
|
161
161
|
S: this,
|
|
162
162
|
C: (f, a) => f(...a)
|
|
163
163
|
});
|
|
@@ -178,7 +178,7 @@ var PluginsContext = class {
|
|
|
178
178
|
count: untracked(() => current.length)
|
|
179
179
|
}, {
|
|
180
180
|
F: __dxlog_file,
|
|
181
|
-
L:
|
|
181
|
+
L: 161,
|
|
182
182
|
S: this,
|
|
183
183
|
C: (f, a) => f(...a)
|
|
184
184
|
});
|
|
@@ -187,7 +187,7 @@ var PluginsContext = class {
|
|
|
187
187
|
id: interfaceDef.identifier
|
|
188
188
|
}, {
|
|
189
189
|
F: __dxlog_file,
|
|
190
|
-
L:
|
|
190
|
+
L: 163,
|
|
191
191
|
S: this,
|
|
192
192
|
C: (f, a) => f(...a)
|
|
193
193
|
});
|
|
@@ -201,7 +201,7 @@ var PluginsContext = class {
|
|
|
201
201
|
requestCapabilities(interfaceDef, filter) {
|
|
202
202
|
let current = this._definedCapabilities.get(interfaceDef.identifier);
|
|
203
203
|
if (!current) {
|
|
204
|
-
const object =
|
|
204
|
+
const object = create({
|
|
205
205
|
value: []
|
|
206
206
|
});
|
|
207
207
|
current = untracked(() => object.value);
|
|
@@ -220,7 +220,7 @@ var PluginsContext = class {
|
|
|
220
220
|
const capability = this.requestCapabilities(interfaceDef, filter)[0];
|
|
221
221
|
invariant(capability, `No capability found for ${interfaceDef.identifier}`, {
|
|
222
222
|
F: __dxlog_file,
|
|
223
|
-
L:
|
|
223
|
+
L: 199,
|
|
224
224
|
S: this,
|
|
225
225
|
A: [
|
|
226
226
|
"capability",
|
|
@@ -279,7 +279,7 @@ var getEvents = (events) => "type" in events ? events.events : [
|
|
|
279
279
|
import { untracked as untracked2 } from "@preact/signals-core";
|
|
280
280
|
import { Array as A, Effect as Effect2, Either, Match, pipe } from "effect";
|
|
281
281
|
import { Event } from "@dxos/async";
|
|
282
|
-
import {
|
|
282
|
+
import { create as create2 } from "@dxos/live-object";
|
|
283
283
|
import { log as log2 } from "@dxos/log";
|
|
284
284
|
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/core/manager.ts";
|
|
285
285
|
var isPromise = (value) => {
|
|
@@ -294,7 +294,7 @@ var PluginManager = class {
|
|
|
294
294
|
});
|
|
295
295
|
this._capabilities = /* @__PURE__ */ new Map();
|
|
296
296
|
this._pluginLoader = pluginLoader;
|
|
297
|
-
this._state =
|
|
297
|
+
this._state = create2({
|
|
298
298
|
plugins,
|
|
299
299
|
core,
|
|
300
300
|
enabled,
|
|
@@ -856,26 +856,6 @@ var Capabilities;
|
|
|
856
856
|
Capabilities2.FileUploader = defineCapability("dxos.org/app-framework/capability/file-uploader");
|
|
857
857
|
})(Capabilities || (Capabilities = {}));
|
|
858
858
|
|
|
859
|
-
// packages/sdk/app-framework/src/common/collaboration.ts
|
|
860
|
-
import { SchemaAST as AST, Schema as S3 } from "effect";
|
|
861
|
-
import { Expando, Ref, SpaceIdSchema } from "@dxos/echo-schema";
|
|
862
|
-
var CollaborationActions;
|
|
863
|
-
(function(CollaborationActions2) {
|
|
864
|
-
class InsertContent extends S3.TaggedClass()("assistant/intent-content", {
|
|
865
|
-
input: S3.Struct({
|
|
866
|
-
spaceId: SpaceIdSchema,
|
|
867
|
-
target: Ref(Expando),
|
|
868
|
-
object: Ref(Expando),
|
|
869
|
-
label: S3.String.pipe(S3.optional)
|
|
870
|
-
}).annotations({
|
|
871
|
-
[AST.DescriptionAnnotationId]: "Enables plugins to inject content blocks or references into a related entity."
|
|
872
|
-
}),
|
|
873
|
-
output: S3.Void
|
|
874
|
-
}) {
|
|
875
|
-
}
|
|
876
|
-
CollaborationActions2.InsertContent = InsertContent;
|
|
877
|
-
})(CollaborationActions || (CollaborationActions = {}));
|
|
878
|
-
|
|
879
859
|
// packages/sdk/app-framework/src/common/events.ts
|
|
880
860
|
var Events;
|
|
881
861
|
(function(Events2) {
|
|
@@ -895,7 +875,7 @@ var Events;
|
|
|
895
875
|
})(Events || (Events = {}));
|
|
896
876
|
|
|
897
877
|
// packages/sdk/app-framework/src/common/file.ts
|
|
898
|
-
import { Schema as
|
|
878
|
+
import { Schema as S3 } from "effect";
|
|
899
879
|
var defaultFileTypes = {
|
|
900
880
|
images: [
|
|
901
881
|
"png",
|
|
@@ -915,15 +895,15 @@ var defaultFileTypes = {
|
|
|
915
895
|
"md"
|
|
916
896
|
]
|
|
917
897
|
};
|
|
918
|
-
var FileInfoSchema =
|
|
919
|
-
name:
|
|
920
|
-
type:
|
|
921
|
-
url:
|
|
922
|
-
cid:
|
|
898
|
+
var FileInfoSchema = S3.Struct({
|
|
899
|
+
name: S3.String,
|
|
900
|
+
type: S3.String,
|
|
901
|
+
url: S3.optional(S3.String),
|
|
902
|
+
cid: S3.optional(S3.String)
|
|
923
903
|
});
|
|
924
904
|
|
|
925
905
|
// packages/sdk/app-framework/src/common/layout.ts
|
|
926
|
-
import { Schema as
|
|
906
|
+
import { Schema as S4 } from "effect";
|
|
927
907
|
|
|
928
908
|
// packages/sdk/app-framework/src/plugin-intent/IntentPlugin.tsx
|
|
929
909
|
var IntentPlugin = () => definePlugin({
|
|
@@ -939,7 +919,7 @@ var IntentPlugin = () => definePlugin({
|
|
|
939
919
|
activatesAfter: [
|
|
940
920
|
Events.DispatcherReady
|
|
941
921
|
],
|
|
942
|
-
activate: lazy(() => import("./intent-dispatcher-
|
|
922
|
+
activate: lazy(() => import("./intent-dispatcher-YDE2ONZA.mjs"))
|
|
943
923
|
})
|
|
944
924
|
]);
|
|
945
925
|
|
|
@@ -949,323 +929,313 @@ var LAYOUT_ACTION = `${LAYOUT_PLUGIN}/action`;
|
|
|
949
929
|
var LayoutAction;
|
|
950
930
|
(function(LayoutAction2) {
|
|
951
931
|
LayoutAction2.UPDATE_LAYOUT = `${LAYOUT_ACTION}/update-layout`;
|
|
952
|
-
class UpdateLayout extends
|
|
953
|
-
input:
|
|
954
|
-
part:
|
|
932
|
+
class UpdateLayout extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
933
|
+
input: S4.Struct({
|
|
934
|
+
part: S4.String.annotations({
|
|
955
935
|
description: "The part of the layout to mutate."
|
|
956
936
|
}),
|
|
957
|
-
subject:
|
|
937
|
+
subject: S4.optional(S4.Any.annotations({
|
|
958
938
|
description: "The subject of the layout update."
|
|
959
939
|
})),
|
|
960
|
-
options:
|
|
961
|
-
key:
|
|
962
|
-
value:
|
|
940
|
+
options: S4.optional(S4.Record({
|
|
941
|
+
key: S4.String,
|
|
942
|
+
value: S4.Any
|
|
963
943
|
}).annotations({
|
|
964
944
|
description: "Additional options for the layout action."
|
|
965
945
|
}))
|
|
966
946
|
}),
|
|
967
|
-
output:
|
|
947
|
+
output: S4.Void
|
|
968
948
|
}) {
|
|
969
949
|
}
|
|
970
950
|
LayoutAction2.UpdateLayout = UpdateLayout;
|
|
971
|
-
class SetLayoutMode extends
|
|
972
|
-
input:
|
|
973
|
-
part:
|
|
951
|
+
class SetLayoutMode extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
952
|
+
input: S4.Struct({
|
|
953
|
+
part: S4.Literal("mode").annotations({
|
|
974
954
|
description: "Setting the layout mode."
|
|
975
955
|
}),
|
|
976
|
-
subject:
|
|
956
|
+
subject: S4.optional(S4.String.annotations({
|
|
977
957
|
description: "Item which is the subject of the new layout mode."
|
|
978
958
|
})),
|
|
979
|
-
options:
|
|
980
|
-
mode:
|
|
959
|
+
options: S4.Union(S4.Struct({
|
|
960
|
+
mode: S4.String.annotations({
|
|
981
961
|
description: "The new layout mode."
|
|
982
962
|
})
|
|
983
|
-
}),
|
|
984
|
-
revert:
|
|
963
|
+
}), S4.Struct({
|
|
964
|
+
revert: S4.Boolean.annotations({
|
|
985
965
|
description: "Revert to the previous layout mode."
|
|
986
966
|
})
|
|
987
967
|
}))
|
|
988
968
|
}),
|
|
989
|
-
output:
|
|
969
|
+
output: S4.Void
|
|
990
970
|
}) {
|
|
991
971
|
}
|
|
992
972
|
LayoutAction2.SetLayoutMode = SetLayoutMode;
|
|
993
|
-
class UpdateSidebar extends
|
|
994
|
-
input:
|
|
995
|
-
part:
|
|
973
|
+
class UpdateSidebar extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
974
|
+
input: S4.Struct({
|
|
975
|
+
part: S4.Literal("sidebar").annotations({
|
|
996
976
|
description: "Updating the sidebar."
|
|
997
977
|
}),
|
|
998
|
-
subject:
|
|
978
|
+
subject: S4.optional(S4.String.annotations({
|
|
999
979
|
description: "URI of the component to display in the sidebar."
|
|
1000
980
|
})),
|
|
1001
|
-
options:
|
|
1002
|
-
state:
|
|
981
|
+
options: S4.optional(S4.Struct({
|
|
982
|
+
state: S4.Literal("closed", "collapsed", "expanded").annotations({
|
|
1003
983
|
description: "Whether the sidebar is closed, collapsed, or expanded."
|
|
1004
984
|
})
|
|
1005
985
|
}))
|
|
1006
986
|
}),
|
|
1007
|
-
output:
|
|
987
|
+
output: S4.Void
|
|
1008
988
|
}) {
|
|
1009
989
|
}
|
|
1010
990
|
LayoutAction2.UpdateSidebar = UpdateSidebar;
|
|
1011
|
-
class UpdateComplementary extends
|
|
1012
|
-
input:
|
|
1013
|
-
part:
|
|
991
|
+
class UpdateComplementary extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
992
|
+
input: S4.Struct({
|
|
993
|
+
part: S4.Literal("complementary").annotations({
|
|
1014
994
|
description: "Updating the complementary sidebar."
|
|
1015
995
|
}),
|
|
1016
|
-
subject:
|
|
996
|
+
subject: S4.optional(S4.String.annotations({
|
|
1017
997
|
description: "URI of the component to display in the complementary area."
|
|
1018
998
|
})),
|
|
1019
|
-
options:
|
|
1020
|
-
state:
|
|
999
|
+
options: S4.optional(S4.Struct({
|
|
1000
|
+
state: S4.Literal("closed", "collapsed", "expanded").annotations({
|
|
1021
1001
|
description: "Whether the complementary sidebar is closed, collapsed, or expanded."
|
|
1022
1002
|
})
|
|
1023
1003
|
}))
|
|
1024
1004
|
}),
|
|
1025
|
-
output:
|
|
1005
|
+
output: S4.Void
|
|
1026
1006
|
}) {
|
|
1027
1007
|
}
|
|
1028
1008
|
LayoutAction2.UpdateComplementary = UpdateComplementary;
|
|
1029
|
-
class UpdateDialog extends
|
|
1030
|
-
input:
|
|
1031
|
-
part:
|
|
1009
|
+
class UpdateDialog extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1010
|
+
input: S4.Struct({
|
|
1011
|
+
part: S4.Literal("dialog").annotations({
|
|
1032
1012
|
description: "Updating the dialog."
|
|
1033
1013
|
}),
|
|
1034
|
-
subject:
|
|
1014
|
+
subject: S4.optional(S4.String.annotations({
|
|
1035
1015
|
description: "URI of the component to display in the dialog."
|
|
1036
1016
|
})),
|
|
1037
|
-
options:
|
|
1038
|
-
state:
|
|
1017
|
+
options: S4.Struct({
|
|
1018
|
+
state: S4.optional(S4.Boolean.annotations({
|
|
1039
1019
|
description: "Whether the dialog is open or closed."
|
|
1040
1020
|
})),
|
|
1041
|
-
blockAlign:
|
|
1021
|
+
blockAlign: S4.optional(S4.Literal("start", "center", "end").annotations({
|
|
1042
1022
|
description: "The alignment of the dialog."
|
|
1043
1023
|
})),
|
|
1044
|
-
type:
|
|
1024
|
+
type: S4.optional(S4.Literal("default", "alert").annotations({
|
|
1045
1025
|
description: "The type of dialog."
|
|
1046
1026
|
})),
|
|
1047
|
-
props:
|
|
1048
|
-
key:
|
|
1049
|
-
value:
|
|
1027
|
+
props: S4.optional(S4.Record({
|
|
1028
|
+
key: S4.String,
|
|
1029
|
+
value: S4.Any
|
|
1050
1030
|
}).annotations({
|
|
1051
1031
|
description: "Additional props for the dialog."
|
|
1052
1032
|
}))
|
|
1053
1033
|
})
|
|
1054
1034
|
}),
|
|
1055
|
-
output:
|
|
1035
|
+
output: S4.Void
|
|
1056
1036
|
}) {
|
|
1057
1037
|
}
|
|
1058
1038
|
LayoutAction2.UpdateDialog = UpdateDialog;
|
|
1059
|
-
class UpdatePopover extends
|
|
1060
|
-
input:
|
|
1061
|
-
part:
|
|
1039
|
+
class UpdatePopover extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1040
|
+
input: S4.Struct({
|
|
1041
|
+
part: S4.Literal("popover").annotations({
|
|
1062
1042
|
description: "Updating the popover."
|
|
1063
1043
|
}),
|
|
1064
|
-
subject:
|
|
1065
|
-
description: "URI of the component to display in the popover
|
|
1044
|
+
subject: S4.optional(S4.String.annotations({
|
|
1045
|
+
description: "URI of the component to display in the popover."
|
|
1066
1046
|
})),
|
|
1067
|
-
options:
|
|
1068
|
-
|
|
1047
|
+
options: S4.Struct({
|
|
1048
|
+
anchorId: S4.String.annotations({
|
|
1049
|
+
description: "The id of the element to anchor the popover to."
|
|
1050
|
+
}),
|
|
1051
|
+
side: S4.optional(S4.Literal("top", "right", "bottom", "left").annotations({
|
|
1069
1052
|
description: "The side of the anchor."
|
|
1070
1053
|
})),
|
|
1071
|
-
state:
|
|
1054
|
+
state: S4.optional(S4.Boolean.annotations({
|
|
1072
1055
|
description: "Whether the popover is open or closed."
|
|
1073
1056
|
})),
|
|
1074
|
-
props:
|
|
1075
|
-
key:
|
|
1076
|
-
value:
|
|
1057
|
+
props: S4.optional(S4.Record({
|
|
1058
|
+
key: S4.String,
|
|
1059
|
+
value: S4.Any
|
|
1077
1060
|
}).annotations({
|
|
1078
1061
|
description: "Additional props for the popover."
|
|
1079
1062
|
}))
|
|
1080
|
-
})
|
|
1081
|
-
variant: S5.Literal("virtual"),
|
|
1082
|
-
anchor: S5.Any.annotations({
|
|
1083
|
-
description: "The DOM element to anchor the popover to."
|
|
1084
|
-
})
|
|
1085
|
-
}), S5.Struct({
|
|
1086
|
-
variant: S5.optional(S5.Literal("react")),
|
|
1087
|
-
anchorId: S5.String.annotations({
|
|
1088
|
-
description: "An id that can be used to determine whether to render the anchor subcomponent."
|
|
1089
|
-
})
|
|
1090
|
-
}))))
|
|
1063
|
+
})
|
|
1091
1064
|
}),
|
|
1092
|
-
output:
|
|
1065
|
+
output: S4.Void
|
|
1093
1066
|
}) {
|
|
1094
1067
|
}
|
|
1095
1068
|
LayoutAction2.UpdatePopover = UpdatePopover;
|
|
1096
|
-
LayoutAction2.Toast =
|
|
1097
|
-
id:
|
|
1069
|
+
LayoutAction2.Toast = S4.Struct({
|
|
1070
|
+
id: S4.String.annotations({
|
|
1098
1071
|
description: "The id of the toast."
|
|
1099
1072
|
}),
|
|
1100
|
-
title:
|
|
1073
|
+
title: S4.optional(Label.annotations({
|
|
1101
1074
|
description: "The title of the toast."
|
|
1102
1075
|
})),
|
|
1103
|
-
description:
|
|
1076
|
+
description: S4.optional(Label.annotations({
|
|
1104
1077
|
description: "The description of the toast."
|
|
1105
1078
|
})),
|
|
1106
|
-
icon:
|
|
1079
|
+
icon: S4.optional(S4.String.annotations({
|
|
1107
1080
|
description: "The icon of the toast."
|
|
1108
1081
|
})),
|
|
1109
|
-
duration:
|
|
1082
|
+
duration: S4.optional(S4.Number.annotations({
|
|
1110
1083
|
description: "The duration of the toast."
|
|
1111
1084
|
})),
|
|
1112
|
-
closeLabel:
|
|
1085
|
+
closeLabel: S4.optional(Label.annotations({
|
|
1113
1086
|
description: "The label of the close button."
|
|
1114
1087
|
})),
|
|
1115
|
-
actionLabel:
|
|
1088
|
+
actionLabel: S4.optional(Label.annotations({
|
|
1116
1089
|
description: "The label of the action button."
|
|
1117
1090
|
})),
|
|
1118
|
-
actionAlt:
|
|
1091
|
+
actionAlt: S4.optional(Label.annotations({
|
|
1119
1092
|
description: "The alt text of the action button."
|
|
1120
1093
|
})),
|
|
1121
|
-
onAction:
|
|
1094
|
+
onAction: S4.optional(S4.Any.annotations({
|
|
1122
1095
|
description: "The action to perform when the action button is clicked."
|
|
1123
1096
|
}))
|
|
1124
1097
|
});
|
|
1125
|
-
class AddToast extends
|
|
1126
|
-
input:
|
|
1127
|
-
part:
|
|
1098
|
+
class AddToast extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1099
|
+
input: S4.Struct({
|
|
1100
|
+
part: S4.Literal("toast").annotations({
|
|
1128
1101
|
description: "Adding a toast."
|
|
1129
1102
|
}),
|
|
1130
1103
|
subject: LayoutAction2.Toast.annotations({
|
|
1131
1104
|
description: "The toast to add."
|
|
1132
1105
|
})
|
|
1133
1106
|
}),
|
|
1134
|
-
output:
|
|
1107
|
+
output: S4.Void
|
|
1135
1108
|
}) {
|
|
1136
1109
|
}
|
|
1137
1110
|
LayoutAction2.AddToast = AddToast;
|
|
1138
|
-
class SwitchWorkspace extends
|
|
1139
|
-
input:
|
|
1140
|
-
part:
|
|
1111
|
+
class SwitchWorkspace extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1112
|
+
input: S4.Struct({
|
|
1113
|
+
part: S4.Literal("workspace").annotations({
|
|
1141
1114
|
description: "Switching the workspace."
|
|
1142
1115
|
}),
|
|
1143
|
-
subject:
|
|
1116
|
+
subject: S4.String.annotations({
|
|
1144
1117
|
description: "The id of the workspace to switch to."
|
|
1145
1118
|
})
|
|
1146
1119
|
}),
|
|
1147
|
-
output:
|
|
1120
|
+
output: S4.Void
|
|
1148
1121
|
}) {
|
|
1149
1122
|
}
|
|
1150
1123
|
LayoutAction2.SwitchWorkspace = SwitchWorkspace;
|
|
1151
|
-
class RevertWorkspace extends
|
|
1152
|
-
input:
|
|
1153
|
-
part:
|
|
1124
|
+
class RevertWorkspace extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1125
|
+
input: S4.Struct({
|
|
1126
|
+
part: S4.Literal("workspace").annotations({
|
|
1154
1127
|
description: "Switching the workspace."
|
|
1155
1128
|
}),
|
|
1156
|
-
options:
|
|
1157
|
-
revert:
|
|
1129
|
+
options: S4.Struct({
|
|
1130
|
+
revert: S4.Literal(true).annotations({
|
|
1158
1131
|
description: "Revert to the previous workspace."
|
|
1159
1132
|
})
|
|
1160
1133
|
})
|
|
1161
1134
|
}),
|
|
1162
|
-
output:
|
|
1135
|
+
output: S4.Void
|
|
1163
1136
|
}) {
|
|
1164
1137
|
}
|
|
1165
1138
|
LayoutAction2.RevertWorkspace = RevertWorkspace;
|
|
1166
|
-
class Open extends
|
|
1167
|
-
input:
|
|
1168
|
-
part:
|
|
1139
|
+
class Open extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1140
|
+
input: S4.Struct({
|
|
1141
|
+
part: S4.Literal("main").annotations({
|
|
1169
1142
|
description: "Opening an item in the main content area."
|
|
1170
1143
|
}),
|
|
1171
|
-
subject:
|
|
1144
|
+
subject: S4.Array(S4.String.annotations({
|
|
1172
1145
|
description: "Ids of the items to open."
|
|
1173
1146
|
})),
|
|
1174
|
-
options:
|
|
1175
|
-
state:
|
|
1147
|
+
options: S4.optional(S4.Struct({
|
|
1148
|
+
state: S4.optional(S4.Literal(true).annotations({
|
|
1176
1149
|
description: "The items are being added."
|
|
1177
1150
|
})),
|
|
1178
|
-
variant:
|
|
1151
|
+
variant: S4.optional(S4.String.annotations({
|
|
1179
1152
|
description: "The variant of the item to open."
|
|
1180
1153
|
})),
|
|
1181
|
-
key:
|
|
1154
|
+
key: S4.optional(S4.String.annotations({
|
|
1182
1155
|
description: "If provided, will replace item with a matching key (id prefix)."
|
|
1183
1156
|
})),
|
|
1184
|
-
|
|
1185
|
-
description: "The workspace to open the items in."
|
|
1186
|
-
})),
|
|
1187
|
-
scrollIntoView: S5.optional(S5.Boolean.annotations({
|
|
1157
|
+
scrollIntoView: S4.optional(S4.Boolean.annotations({
|
|
1188
1158
|
description: "Scroll the items into view."
|
|
1189
1159
|
})),
|
|
1190
|
-
pivotId:
|
|
1160
|
+
pivotId: S4.optional(S4.String.annotations({
|
|
1191
1161
|
description: "The id of the item to place new items next to."
|
|
1192
1162
|
})),
|
|
1193
|
-
positioning:
|
|
1163
|
+
positioning: S4.optional(S4.Union(S4.Literal("start").annotations({
|
|
1194
1164
|
description: "The items are being added before the pivot item."
|
|
1195
|
-
}),
|
|
1165
|
+
}), S4.Literal("end").annotations({
|
|
1196
1166
|
description: "The items are being added after the pivot item."
|
|
1197
1167
|
})))
|
|
1198
1168
|
}))
|
|
1199
1169
|
}),
|
|
1200
|
-
output:
|
|
1170
|
+
output: S4.Void
|
|
1201
1171
|
}) {
|
|
1202
1172
|
}
|
|
1203
1173
|
LayoutAction2.Open = Open;
|
|
1204
|
-
class Set2 extends
|
|
1205
|
-
input:
|
|
1206
|
-
part:
|
|
1174
|
+
class Set2 extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1175
|
+
input: S4.Struct({
|
|
1176
|
+
part: S4.Literal("main").annotations({
|
|
1207
1177
|
description: "Setting items in the main content area."
|
|
1208
1178
|
}),
|
|
1209
|
-
subject:
|
|
1179
|
+
subject: S4.Array(S4.String.annotations({
|
|
1210
1180
|
description: "Ids of the items to set."
|
|
1211
1181
|
})),
|
|
1212
|
-
options:
|
|
1213
|
-
override:
|
|
1182
|
+
options: S4.Struct({
|
|
1183
|
+
override: S4.Literal(true).annotations({
|
|
1214
1184
|
description: "Override the current items in the main content area."
|
|
1215
1185
|
})
|
|
1216
1186
|
})
|
|
1217
1187
|
}),
|
|
1218
|
-
output:
|
|
1188
|
+
output: S4.Void
|
|
1219
1189
|
}) {
|
|
1220
1190
|
}
|
|
1221
1191
|
LayoutAction2.Set = Set2;
|
|
1222
|
-
class Close extends
|
|
1223
|
-
input:
|
|
1224
|
-
part:
|
|
1192
|
+
class Close extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1193
|
+
input: S4.Struct({
|
|
1194
|
+
part: S4.Literal("main").annotations({
|
|
1225
1195
|
description: "Closing items in the main content area."
|
|
1226
1196
|
}),
|
|
1227
|
-
subject:
|
|
1197
|
+
subject: S4.Array(S4.String.annotations({
|
|
1228
1198
|
description: "Ids of the items to close."
|
|
1229
1199
|
})),
|
|
1230
|
-
options:
|
|
1231
|
-
state:
|
|
1200
|
+
options: S4.Struct({
|
|
1201
|
+
state: S4.Literal(false).annotations({
|
|
1232
1202
|
description: "The items are being removed."
|
|
1233
1203
|
})
|
|
1234
1204
|
})
|
|
1235
1205
|
}),
|
|
1236
|
-
output:
|
|
1206
|
+
output: S4.Void
|
|
1237
1207
|
}) {
|
|
1238
1208
|
}
|
|
1239
1209
|
LayoutAction2.Close = Close;
|
|
1240
|
-
class ScrollIntoView extends
|
|
1241
|
-
input:
|
|
1242
|
-
part:
|
|
1210
|
+
class ScrollIntoView extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1211
|
+
input: S4.Struct({
|
|
1212
|
+
part: S4.Literal("current").annotations({
|
|
1243
1213
|
description: "Setting the current item"
|
|
1244
1214
|
}),
|
|
1245
|
-
subject:
|
|
1215
|
+
subject: S4.optional(S4.String.annotations({
|
|
1246
1216
|
description: "The id of the item to set as current."
|
|
1247
1217
|
})),
|
|
1248
|
-
options:
|
|
1249
|
-
key:
|
|
1250
|
-
value:
|
|
1218
|
+
options: S4.optional(S4.Record({
|
|
1219
|
+
key: S4.String,
|
|
1220
|
+
value: S4.Any
|
|
1251
1221
|
}).annotations({
|
|
1252
1222
|
description: "Additional options for the scroll into view."
|
|
1253
1223
|
}))
|
|
1254
1224
|
}),
|
|
1255
|
-
output:
|
|
1225
|
+
output: S4.Void
|
|
1256
1226
|
}) {
|
|
1257
1227
|
}
|
|
1258
1228
|
LayoutAction2.ScrollIntoView = ScrollIntoView;
|
|
1259
|
-
class Expose extends
|
|
1260
|
-
input:
|
|
1261
|
-
part:
|
|
1229
|
+
class Expose extends S4.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1230
|
+
input: S4.Struct({
|
|
1231
|
+
part: S4.Literal("navigation").annotations({
|
|
1262
1232
|
description: "Exposing an item in the navigation area."
|
|
1263
1233
|
}),
|
|
1264
|
-
subject:
|
|
1234
|
+
subject: S4.String.annotations({
|
|
1265
1235
|
description: "The id of the item to expose."
|
|
1266
1236
|
})
|
|
1267
1237
|
}),
|
|
1268
|
-
output:
|
|
1238
|
+
output: S4.Void
|
|
1269
1239
|
}) {
|
|
1270
1240
|
}
|
|
1271
1241
|
LayoutAction2.Expose = Expose;
|
|
@@ -1275,17 +1245,17 @@ var LayoutAction;
|
|
|
1275
1245
|
var createSurface = (definition) => definition;
|
|
1276
1246
|
|
|
1277
1247
|
// packages/sdk/app-framework/src/common/translations.ts
|
|
1278
|
-
import { Schema as
|
|
1279
|
-
var ResourceKey =
|
|
1280
|
-
key:
|
|
1281
|
-
value:
|
|
1248
|
+
import { Schema as S5 } from "effect";
|
|
1249
|
+
var ResourceKey = S5.Union(S5.String, S5.Record({
|
|
1250
|
+
key: S5.String,
|
|
1251
|
+
value: S5.Any
|
|
1282
1252
|
}));
|
|
1283
|
-
var ResourceLanguage =
|
|
1284
|
-
key:
|
|
1253
|
+
var ResourceLanguage = S5.Record({
|
|
1254
|
+
key: S5.String,
|
|
1285
1255
|
value: ResourceKey
|
|
1286
1256
|
});
|
|
1287
|
-
var Resource =
|
|
1288
|
-
key:
|
|
1257
|
+
var Resource = S5.Record({
|
|
1258
|
+
key: S5.String,
|
|
1289
1259
|
value: ResourceLanguage
|
|
1290
1260
|
});
|
|
1291
1261
|
|
|
@@ -1296,7 +1266,7 @@ var HISTORY_LIMIT = 100;
|
|
|
1296
1266
|
var createResolver = (resolver) => resolver;
|
|
1297
1267
|
var isUndoable = (historyEntry) => historyEntry.length > 0 && historyEntry.every(({ undoable }) => !!undoable);
|
|
1298
1268
|
var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, historyLimit = HISTORY_LIMIT } = {}) => {
|
|
1299
|
-
const historyRef = Effect3.runSync(
|
|
1269
|
+
const historyRef = Effect3.runSync(Ref.make([]));
|
|
1300
1270
|
const handleIntent = (intent) => Effect3.gen(function* () {
|
|
1301
1271
|
const candidates = getResolvers(intent.module).filter((resolver) => resolver.intent._tag === intent.id).filter((resolver) => !resolver.filter || resolver.filter(intent.data)).toSorted(byPosition);
|
|
1302
1272
|
if (candidates.length === 0) {
|
|
@@ -1314,7 +1284,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1314
1284
|
if (depth > executionLimit) {
|
|
1315
1285
|
yield* Effect3.fail(new CycleDetectedError());
|
|
1316
1286
|
}
|
|
1317
|
-
const resultsRef = yield*
|
|
1287
|
+
const resultsRef = yield* Ref.make([]);
|
|
1318
1288
|
for (const intent of intentChain.all) {
|
|
1319
1289
|
const { data: prev } = (yield* resultsRef.get)[0] ?? {};
|
|
1320
1290
|
const result2 = yield* handleIntent({
|
|
@@ -1324,7 +1294,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1324
1294
|
...prev
|
|
1325
1295
|
}
|
|
1326
1296
|
});
|
|
1327
|
-
yield*
|
|
1297
|
+
yield* Ref.update(resultsRef, (results2) => [
|
|
1328
1298
|
result2,
|
|
1329
1299
|
...results2
|
|
1330
1300
|
]);
|
|
@@ -1339,7 +1309,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1339
1309
|
}
|
|
1340
1310
|
const results = yield* resultsRef.get;
|
|
1341
1311
|
const result = results[0];
|
|
1342
|
-
yield*
|
|
1312
|
+
yield* Ref.update(historyRef, (history) => {
|
|
1343
1313
|
const next = [
|
|
1344
1314
|
...history,
|
|
1345
1315
|
results
|
|
@@ -1363,7 +1333,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1363
1333
|
})).catch((error) => {
|
|
1364
1334
|
log3.catch(error, void 0, {
|
|
1365
1335
|
F: __dxlog_file3,
|
|
1366
|
-
L:
|
|
1336
|
+
L: 254,
|
|
1367
1337
|
S: void 0,
|
|
1368
1338
|
C: (f, a) => f(...a)
|
|
1369
1339
|
});
|
|
@@ -1395,7 +1365,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1395
1365
|
last: all.at(-1),
|
|
1396
1366
|
all
|
|
1397
1367
|
};
|
|
1398
|
-
yield*
|
|
1368
|
+
yield* Ref.update(historyRef, (h) => h.filter((_, index) => index !== last));
|
|
1399
1369
|
return yield* dispatch(intent);
|
|
1400
1370
|
}
|
|
1401
1371
|
});
|
|
@@ -1417,7 +1387,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1417
1387
|
var defaultEffect = () => Effect3.fail(new Error("Intent runtime not ready"));
|
|
1418
1388
|
var defaultPromise = () => Effect3.runPromise(defaultEffect());
|
|
1419
1389
|
var intent_dispatcher_default = (context) => {
|
|
1420
|
-
const state =
|
|
1390
|
+
const state = create3({
|
|
1421
1391
|
dispatch: defaultEffect,
|
|
1422
1392
|
dispatchPromise: defaultPromise,
|
|
1423
1393
|
undo: defaultEffect,
|
|
@@ -1460,7 +1430,6 @@ export {
|
|
|
1460
1430
|
Plugin,
|
|
1461
1431
|
definePlugin,
|
|
1462
1432
|
Capabilities,
|
|
1463
|
-
CollaborationActions,
|
|
1464
1433
|
Events,
|
|
1465
1434
|
defaultFileTypes,
|
|
1466
1435
|
FileInfoSchema,
|
|
@@ -1482,4 +1451,4 @@ export {
|
|
|
1482
1451
|
ResourceLanguage,
|
|
1483
1452
|
Resource
|
|
1484
1453
|
};
|
|
1485
|
-
//# sourceMappingURL=chunk-
|
|
1454
|
+
//# sourceMappingURL=chunk-AHKIPS2L.mjs.map
|