@dxos/app-framework 0.8.1 → 0.8.2-main.12df754
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{app-graph-builder-576BHZC7.mjs → app-graph-builder-RHU5WUGJ.mjs} +2 -2
- package/dist/lib/browser/{chunk-6AVTZPMT.mjs → chunk-5WHZ3ORL.mjs} +187 -159
- package/dist/lib/browser/chunk-5WHZ3ORL.mjs.map +7 -0
- package/dist/lib/browser/{chunk-PPIBZ5N4.mjs → chunk-GYFO2C4Q.mjs} +4 -4
- package/dist/lib/browser/chunk-GYFO2C4Q.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +7 -5
- package/dist/lib/browser/index.mjs.map +1 -1
- package/dist/lib/browser/{intent-dispatcher-3Q67MHZZ.mjs → intent-dispatcher-T6YETUE7.mjs} +2 -2
- package/dist/lib/browser/{intent-resolver-O763LCLG.mjs → intent-resolver-UQFD7VBJ.mjs} +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{store-URSN7DZI.mjs → store-NP42FCZO.mjs} +2 -2
- package/dist/lib/browser/testing/index.mjs +2 -2
- package/dist/lib/browser/worker.mjs +3 -1
- package/dist/lib/node/{app-graph-builder-JZCSKYPY.cjs → app-graph-builder-QGHI2J2R.cjs} +12 -12
- package/dist/lib/node/{chunk-YIFTVCOR.cjs → chunk-EGY2ANJA.cjs} +177 -150
- package/dist/lib/node/chunk-EGY2ANJA.cjs.map +7 -0
- package/dist/lib/node/{chunk-YNTKVTVX.cjs → chunk-PIFNLI5K.cjs} +20 -20
- package/dist/lib/node/{chunk-YNTKVTVX.cjs.map → chunk-PIFNLI5K.cjs.map} +3 -3
- package/dist/lib/node/index.cjs +68 -66
- package/dist/lib/node/index.cjs.map +1 -1
- package/dist/lib/node/{intent-dispatcher-H334XLFD.cjs → intent-dispatcher-BEKV2HG3.cjs} +8 -8
- package/dist/lib/node/{intent-dispatcher-H334XLFD.cjs.map → intent-dispatcher-BEKV2HG3.cjs.map} +2 -2
- package/dist/lib/node/{intent-resolver-3F4POWAM.cjs → intent-resolver-NALI2KSH.cjs} +8 -8
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{store-OFDHTDCB.cjs → store-I7KM7GGP.cjs} +7 -7
- package/dist/lib/node/testing/index.cjs +8 -8
- package/dist/lib/node/worker.cjs +39 -37
- package/dist/lib/node/worker.cjs.map +2 -2
- package/dist/lib/node-esm/{app-graph-builder-VYKLSMSZ.mjs → app-graph-builder-45FJO6JA.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-R6A7Z4LU.mjs → chunk-KFDC5QSQ.mjs} +4 -4
- package/dist/lib/{browser/chunk-PPIBZ5N4.mjs.map → node-esm/chunk-KFDC5QSQ.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-AHKIPS2L.mjs → chunk-YQMLJUYN.mjs} +187 -159
- package/dist/lib/node-esm/chunk-YQMLJUYN.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +7 -5
- package/dist/lib/node-esm/index.mjs.map +1 -1
- package/dist/lib/node-esm/{intent-dispatcher-YDE2ONZA.mjs → intent-dispatcher-MYETZPUW.mjs} +2 -2
- package/dist/lib/node-esm/{intent-resolver-LAGJ7LXM.mjs → intent-resolver-BW5I7SOS.mjs} +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{store-EYSUVNCS.mjs → store-MKIES4HL.mjs} +2 -2
- package/dist/lib/node-esm/testing/index.mjs +2 -2
- package/dist/lib/node-esm/worker.mjs +3 -1
- package/dist/types/src/common/collaboration.d.ts +19 -0
- package/dist/types/src/common/collaboration.d.ts.map +1 -0
- package/dist/types/src/common/index.d.ts +1 -0
- package/dist/types/src/common/index.d.ts.map +1 -1
- package/dist/types/src/common/layout.d.ts +9 -4
- package/dist/types/src/common/layout.d.ts.map +1 -1
- package/dist/types/src/core/capabilities.d.ts +5 -2
- package/dist/types/src/core/capabilities.d.ts.map +1 -1
- package/dist/types/src/core/events.d.ts +4 -1
- package/dist/types/src/core/events.d.ts.map +1 -1
- package/dist/types/src/core/manager.d.ts +8 -8
- package/dist/types/src/core/manager.d.ts.map +1 -1
- package/dist/types/src/core/plugin.d.ts +2 -1
- package/dist/types/src/core/plugin.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +27 -1
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -1
- package/package.json +22 -18
- package/project.json +2 -1
- package/src/App.tsx +2 -2
- package/src/common/collaboration.ts +21 -0
- package/src/common/index.ts +1 -0
- package/src/common/layout.ts +21 -3
- package/src/core/capabilities.ts +9 -5
- package/src/core/events.ts +4 -1
- package/src/core/manager.test.ts +3 -3
- package/src/core/manager.ts +10 -10
- package/src/core/plugin.ts +2 -1
- package/src/plugin-intent/intent-dispatcher.ts +18 -2
- package/typedoc/.nojekyll +1 -0
- package/typedoc/assets/hierarchy.js +1 -0
- package/typedoc/assets/highlight.css +106 -0
- package/typedoc/assets/icons.js +18 -0
- package/typedoc/assets/icons.svg +1 -0
- package/typedoc/assets/main.js +60 -0
- package/typedoc/assets/navigation.js +1 -0
- package/typedoc/assets/search.js +1 -0
- package/typedoc/assets/style.css +1640 -0
- package/typedoc/classes/CollaborationActions.InsertContent.html +421 -0
- package/typedoc/classes/ErrorBoundary.html +125 -0
- package/typedoc/classes/IntentAction.ShowUndo.html +227 -0
- package/typedoc/classes/IntentAction.Track.html +266 -0
- package/typedoc/classes/LayoutAction.AddToast.html +265 -0
- package/typedoc/classes/LayoutAction.Close.html +382 -0
- package/typedoc/classes/LayoutAction.Expose.html +265 -0
- package/typedoc/classes/LayoutAction.Open.html +928 -0
- package/typedoc/classes/LayoutAction.RevertWorkspace.html +343 -0
- package/typedoc/classes/LayoutAction.ScrollIntoView.html +460 -0
- package/typedoc/classes/LayoutAction.Set.html +382 -0
- package/typedoc/classes/LayoutAction.SetLayoutMode.html +421 -0
- package/typedoc/classes/LayoutAction.SwitchWorkspace.html +265 -0
- package/typedoc/classes/LayoutAction.UpdateComplementary.html +616 -0
- package/typedoc/classes/LayoutAction.UpdateDialog.html +733 -0
- package/typedoc/classes/LayoutAction.UpdateLayout.html +461 -0
- package/typedoc/classes/LayoutAction.UpdatePopover.html +1435 -0
- package/typedoc/classes/LayoutAction.UpdateSidebar.html +538 -0
- package/typedoc/classes/Plugin.html +6 -0
- package/typedoc/classes/PluginManager.html +42 -0
- package/typedoc/classes/PluginModule.html +18 -0
- package/typedoc/classes/PluginsContext.html +25 -0
- package/typedoc/classes/SettingsAction.Open.html +226 -0
- package/typedoc/classes/SettingsAction.OpenPluginRegistry.html +265 -0
- package/typedoc/functions/Events.createStateEvent.html +2 -0
- package/typedoc/functions/IntentPlugin.html +1 -0
- package/typedoc/functions/SettingsPlugin.html +1 -0
- package/typedoc/functions/allOf.html +2 -0
- package/typedoc/functions/chain.html +3 -0
- package/typedoc/functions/contributes.html +2 -0
- package/typedoc/functions/createApp.html +6 -0
- package/typedoc/functions/createDispatcher.html +3 -0
- package/typedoc/functions/createIntent.html +6 -0
- package/typedoc/functions/createResolver.html +2 -0
- package/typedoc/functions/createSurface.html +2 -0
- package/typedoc/functions/defineCapability.html +2 -0
- package/typedoc/functions/defineEvent.html +2 -0
- package/typedoc/functions/defineModule.html +2 -0
- package/typedoc/functions/definePlugin.html +2 -0
- package/typedoc/functions/eventKey.html +2 -0
- package/typedoc/functions/getEvents.html +2 -0
- package/typedoc/functions/isAllOf.html +2 -0
- package/typedoc/functions/isOneOf.html +2 -0
- package/typedoc/functions/isSurfaceAvailable.html +2 -0
- package/typedoc/functions/lazy.html +2 -0
- package/typedoc/functions/oneOf.html +2 -0
- package/typedoc/functions/useAppGraph.html +1 -0
- package/typedoc/functions/useCapabilities.html +3 -0
- package/typedoc/functions/useCapability.html +4 -0
- package/typedoc/functions/useIntentDispatcher.html +1 -0
- package/typedoc/functions/useIntentResolver.html +1 -0
- package/typedoc/functions/useLayout.html +1 -0
- package/typedoc/functions/usePluginManager.html +2 -0
- package/typedoc/hierarchy.html +1 -0
- package/typedoc/index.html +16 -0
- package/typedoc/interfaces/LayoutAction.Toast.html +10 -0
- package/typedoc/media/LICENSE +8 -0
- package/typedoc/modules/Capabilities.html +1 -0
- package/typedoc/modules/CollaborationActions.html +1 -0
- package/typedoc/modules/Events.html +1 -0
- package/typedoc/modules/IntentAction.html +1 -0
- package/typedoc/modules/LayoutAction.html +2 -0
- package/typedoc/modules/SettingsAction.html +1 -0
- package/typedoc/modules.html +1 -0
- package/typedoc/types/ActivationEvent.html +8 -0
- package/typedoc/types/ActivationEvents.html +2 -0
- package/typedoc/types/AnyCapability.html +1 -0
- package/typedoc/types/AnyIntent.html +1 -0
- package/typedoc/types/AnyIntentChain.html +1 -0
- package/typedoc/types/AnyIntentEffectResult.html +1 -0
- package/typedoc/types/AnyIntentResolver.html +1 -0
- package/typedoc/types/AnyIntentResult.html +1 -0
- package/typedoc/types/Capabilities.FileUploader.html +1 -0
- package/typedoc/types/Capabilities.IntentResolver.html +1 -0
- package/typedoc/types/Capabilities.Layout.html +1 -0
- package/typedoc/types/Capabilities.Metadata.html +1 -0
- package/typedoc/types/Capabilities.ReactContext.html +1 -0
- package/typedoc/types/Capabilities.ReactRoot.html +1 -0
- package/typedoc/types/Capabilities.ReactSurface.html +1 -0
- package/typedoc/types/Capabilities.Settings.html +4 -0
- package/typedoc/types/Capability.html +9 -0
- package/typedoc/types/CreateAppOptions.html +9 -0
- package/typedoc/types/FileInfo.html +1 -0
- package/typedoc/types/Intent.html +14 -0
- package/typedoc/types/IntentChain.html +6 -0
- package/typedoc/types/IntentContext.html +5 -0
- package/typedoc/types/IntentData.html +1 -0
- package/typedoc/types/IntentDispatcher.html +2 -0
- package/typedoc/types/IntentDispatcherResult.html +2 -0
- package/typedoc/types/IntentEffectDefinition.html +2 -0
- package/typedoc/types/IntentEffectResult.html +15 -0
- package/typedoc/types/IntentParams.html +3 -0
- package/typedoc/types/IntentResolver.html +2 -0
- package/typedoc/types/IntentResultData.html +1 -0
- package/typedoc/types/IntentSchema.html +1 -0
- package/typedoc/types/IntentUndo.html +2 -0
- package/typedoc/types/InterfaceDef.html +4 -0
- package/typedoc/types/Label.html +1 -0
- package/typedoc/types/NodeSerializer.html +8 -0
- package/typedoc/types/PluginManagerOptions.html +5 -0
- package/typedoc/types/PluginMeta.html +21 -0
- package/typedoc/types/PromiseIntentDispatcher.html +2 -0
- package/typedoc/types/PromiseIntentUndo.html +2 -0
- package/typedoc/types/Resource.html +1 -0
- package/typedoc/types/ResourceKey.html +1 -0
- package/typedoc/types/ResourceLanguage.html +1 -0
- package/typedoc/types/SerializedNode.html +4 -0
- package/typedoc/types/SurfaceComponent.html +2 -0
- package/typedoc/types/SurfaceDefinition.html +2 -0
- package/typedoc/types/SurfaceProps.html +4 -0
- package/typedoc/variables/Capabilities.AppGraph.html +1 -0
- package/typedoc/variables/Capabilities.AppGraphBuilder.html +1 -0
- package/typedoc/variables/Capabilities.AppGraphSerializer.html +1 -0
- package/typedoc/variables/Capabilities.ArtifactDefinition.html +1 -0
- package/typedoc/variables/Capabilities.FileUploader.html +1 -0
- package/typedoc/variables/Capabilities.IntentDispatcher.html +1 -0
- package/typedoc/variables/Capabilities.IntentResolver.html +1 -0
- package/typedoc/variables/Capabilities.Layout.html +1 -0
- package/typedoc/variables/Capabilities.Metadata.html +1 -0
- package/typedoc/variables/Capabilities.Null.html +1 -0
- package/typedoc/variables/Capabilities.PluginManager.html +1 -0
- package/typedoc/variables/Capabilities.ReactContext.html +1 -0
- package/typedoc/variables/Capabilities.ReactRoot.html +1 -0
- package/typedoc/variables/Capabilities.ReactSurface.html +1 -0
- package/typedoc/variables/Capabilities.Settings.html +1 -0
- package/typedoc/variables/Capabilities.SettingsStore.html +1 -0
- package/typedoc/variables/Capabilities.Tools.html +1 -0
- package/typedoc/variables/Capabilities.Translations.html +1 -0
- package/typedoc/variables/Events.AppGraphReady.html +2 -0
- package/typedoc/variables/Events.DispatcherReady.html +2 -0
- package/typedoc/variables/Events.LayoutReady.html +1 -0
- package/typedoc/variables/Events.SettingsReady.html +2 -0
- package/typedoc/variables/Events.SetupAppGraph.html +2 -0
- package/typedoc/variables/Events.SetupArtifactDefinition.html +2 -0
- package/typedoc/variables/Events.SetupIntentResolver.html +2 -0
- package/typedoc/variables/Events.SetupMetadata.html +2 -0
- package/typedoc/variables/Events.SetupReactSurface.html +2 -0
- package/typedoc/variables/Events.SetupSettings.html +2 -0
- package/typedoc/variables/Events.SetupTranslations.html +2 -0
- package/typedoc/variables/Events.Startup.html +2 -0
- package/typedoc/variables/FileInfoSchema.html +1 -0
- package/typedoc/variables/INTENT_ACTION.html +1 -0
- package/typedoc/variables/INTENT_PLUGIN.html +1 -0
- package/typedoc/variables/LAYOUT_ACTION.html +1 -0
- package/typedoc/variables/LAYOUT_PLUGIN.html +1 -0
- package/typedoc/variables/Label.html +1 -0
- package/typedoc/variables/LayoutAction.Toast.html +1 -0
- package/typedoc/variables/LayoutAction.UPDATE_LAYOUT.html +1 -0
- package/typedoc/variables/PluginManagerProvider.html +2 -0
- package/typedoc/variables/Resource.html +2 -0
- package/typedoc/variables/ResourceKey.html +1 -0
- package/typedoc/variables/ResourceLanguage.html +1 -0
- package/typedoc/variables/SETTINGS_ACTION.html +1 -0
- package/typedoc/variables/SETTINGS_ID.html +1 -0
- package/typedoc/variables/SETTINGS_KEY.html +1 -0
- package/typedoc/variables/SETTINGS_PLUGIN.html +1 -0
- package/typedoc/variables/Surface.html +2 -0
- package/typedoc/variables/defaultFileTypes.html +1 -0
- package/dist/lib/browser/chunk-6AVTZPMT.mjs.map +0 -7
- package/dist/lib/node/chunk-YIFTVCOR.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-AHKIPS2L.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-R6A7Z4LU.mjs.map +0 -7
- /package/dist/lib/browser/{app-graph-builder-576BHZC7.mjs.map → app-graph-builder-RHU5WUGJ.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-dispatcher-3Q67MHZZ.mjs.map → intent-dispatcher-T6YETUE7.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-resolver-O763LCLG.mjs.map → intent-resolver-UQFD7VBJ.mjs.map} +0 -0
- /package/dist/lib/browser/{store-URSN7DZI.mjs.map → store-NP42FCZO.mjs.map} +0 -0
- /package/dist/lib/node/{app-graph-builder-JZCSKYPY.cjs.map → app-graph-builder-QGHI2J2R.cjs.map} +0 -0
- /package/dist/lib/node/{intent-resolver-3F4POWAM.cjs.map → intent-resolver-NALI2KSH.cjs.map} +0 -0
- /package/dist/lib/node/{store-OFDHTDCB.cjs.map → store-I7KM7GGP.cjs.map} +0 -0
- /package/dist/lib/node-esm/{app-graph-builder-VYKLSMSZ.mjs.map → app-graph-builder-45FJO6JA.mjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-dispatcher-YDE2ONZA.mjs.map → intent-dispatcher-MYETZPUW.mjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-resolver-LAGJ7LXM.mjs.map → intent-resolver-BW5I7SOS.mjs.map} +0 -0
- /package/dist/lib/node-esm/{store-EYSUVNCS.mjs.map → store-MKIES4HL.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 } from "effect";
|
|
5
|
-
import {
|
|
4
|
+
import { Effect as Effect3, Option, pipe as pipe2, Ref as Ref2 } from "effect";
|
|
5
|
+
import { live as live3 } 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 { live } 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 = live({
|
|
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: 146,
|
|
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: 165,
|
|
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: 167,
|
|
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 = live({
|
|
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: 203,
|
|
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 { live as live2 } 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 = live2({
|
|
298
298
|
plugins,
|
|
299
299
|
core,
|
|
300
300
|
enabled,
|
|
@@ -856,6 +856,26 @@ 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
|
+
|
|
859
879
|
// packages/sdk/app-framework/src/common/events.ts
|
|
860
880
|
var Events;
|
|
861
881
|
(function(Events2) {
|
|
@@ -875,7 +895,7 @@ var Events;
|
|
|
875
895
|
})(Events || (Events = {}));
|
|
876
896
|
|
|
877
897
|
// packages/sdk/app-framework/src/common/file.ts
|
|
878
|
-
import { Schema as
|
|
898
|
+
import { Schema as S4 } from "effect";
|
|
879
899
|
var defaultFileTypes = {
|
|
880
900
|
images: [
|
|
881
901
|
"png",
|
|
@@ -895,15 +915,15 @@ var defaultFileTypes = {
|
|
|
895
915
|
"md"
|
|
896
916
|
]
|
|
897
917
|
};
|
|
898
|
-
var FileInfoSchema =
|
|
899
|
-
name:
|
|
900
|
-
type:
|
|
901
|
-
url:
|
|
902
|
-
cid:
|
|
918
|
+
var FileInfoSchema = S4.Struct({
|
|
919
|
+
name: S4.String,
|
|
920
|
+
type: S4.String,
|
|
921
|
+
url: S4.optional(S4.String),
|
|
922
|
+
cid: S4.optional(S4.String)
|
|
903
923
|
});
|
|
904
924
|
|
|
905
925
|
// packages/sdk/app-framework/src/common/layout.ts
|
|
906
|
-
import { Schema as
|
|
926
|
+
import { Schema as S5 } from "effect";
|
|
907
927
|
|
|
908
928
|
// packages/sdk/app-framework/src/plugin-intent/IntentPlugin.tsx
|
|
909
929
|
var IntentPlugin = () => definePlugin({
|
|
@@ -919,7 +939,7 @@ var IntentPlugin = () => definePlugin({
|
|
|
919
939
|
activatesAfter: [
|
|
920
940
|
Events.DispatcherReady
|
|
921
941
|
],
|
|
922
|
-
activate: lazy(() => import("./intent-dispatcher-
|
|
942
|
+
activate: lazy(() => import("./intent-dispatcher-MYETZPUW.mjs"))
|
|
923
943
|
})
|
|
924
944
|
]);
|
|
925
945
|
|
|
@@ -929,313 +949,320 @@ var LAYOUT_ACTION = `${LAYOUT_PLUGIN}/action`;
|
|
|
929
949
|
var LayoutAction;
|
|
930
950
|
(function(LayoutAction2) {
|
|
931
951
|
LayoutAction2.UPDATE_LAYOUT = `${LAYOUT_ACTION}/update-layout`;
|
|
932
|
-
class UpdateLayout extends
|
|
933
|
-
input:
|
|
934
|
-
part:
|
|
952
|
+
class UpdateLayout extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
953
|
+
input: S5.Struct({
|
|
954
|
+
part: S5.String.annotations({
|
|
935
955
|
description: "The part of the layout to mutate."
|
|
936
956
|
}),
|
|
937
|
-
subject:
|
|
957
|
+
subject: S5.optional(S5.Any.annotations({
|
|
938
958
|
description: "The subject of the layout update."
|
|
939
959
|
})),
|
|
940
|
-
options:
|
|
941
|
-
key:
|
|
942
|
-
value:
|
|
960
|
+
options: S5.optional(S5.Record({
|
|
961
|
+
key: S5.String,
|
|
962
|
+
value: S5.Any
|
|
943
963
|
}).annotations({
|
|
944
964
|
description: "Additional options for the layout action."
|
|
945
965
|
}))
|
|
946
966
|
}),
|
|
947
|
-
output:
|
|
967
|
+
output: S5.Void
|
|
948
968
|
}) {
|
|
949
969
|
}
|
|
950
970
|
LayoutAction2.UpdateLayout = UpdateLayout;
|
|
951
|
-
class SetLayoutMode extends
|
|
952
|
-
input:
|
|
953
|
-
part:
|
|
971
|
+
class SetLayoutMode extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
972
|
+
input: S5.Struct({
|
|
973
|
+
part: S5.Literal("mode").annotations({
|
|
954
974
|
description: "Setting the layout mode."
|
|
955
975
|
}),
|
|
956
|
-
subject:
|
|
976
|
+
subject: S5.optional(S5.String.annotations({
|
|
957
977
|
description: "Item which is the subject of the new layout mode."
|
|
958
978
|
})),
|
|
959
|
-
options:
|
|
960
|
-
mode:
|
|
979
|
+
options: S5.Union(S5.Struct({
|
|
980
|
+
mode: S5.String.annotations({
|
|
961
981
|
description: "The new layout mode."
|
|
962
982
|
})
|
|
963
|
-
}),
|
|
964
|
-
revert:
|
|
983
|
+
}), S5.Struct({
|
|
984
|
+
revert: S5.Boolean.annotations({
|
|
965
985
|
description: "Revert to the previous layout mode."
|
|
966
986
|
})
|
|
967
987
|
}))
|
|
968
988
|
}),
|
|
969
|
-
output:
|
|
989
|
+
output: S5.Void
|
|
970
990
|
}) {
|
|
971
991
|
}
|
|
972
992
|
LayoutAction2.SetLayoutMode = SetLayoutMode;
|
|
973
|
-
class UpdateSidebar extends
|
|
974
|
-
input:
|
|
975
|
-
part:
|
|
993
|
+
class UpdateSidebar extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
994
|
+
input: S5.Struct({
|
|
995
|
+
part: S5.Literal("sidebar").annotations({
|
|
976
996
|
description: "Updating the sidebar."
|
|
977
997
|
}),
|
|
978
|
-
subject:
|
|
998
|
+
subject: S5.optional(S5.String.annotations({
|
|
979
999
|
description: "URI of the component to display in the sidebar."
|
|
980
1000
|
})),
|
|
981
|
-
options:
|
|
982
|
-
state:
|
|
1001
|
+
options: S5.optional(S5.Struct({
|
|
1002
|
+
state: S5.Literal("closed", "collapsed", "expanded").annotations({
|
|
983
1003
|
description: "Whether the sidebar is closed, collapsed, or expanded."
|
|
984
1004
|
})
|
|
985
1005
|
}))
|
|
986
1006
|
}),
|
|
987
|
-
output:
|
|
1007
|
+
output: S5.Void
|
|
988
1008
|
}) {
|
|
989
1009
|
}
|
|
990
1010
|
LayoutAction2.UpdateSidebar = UpdateSidebar;
|
|
991
|
-
class UpdateComplementary extends
|
|
992
|
-
input:
|
|
993
|
-
part:
|
|
1011
|
+
class UpdateComplementary extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1012
|
+
input: S5.Struct({
|
|
1013
|
+
part: S5.Literal("complementary").annotations({
|
|
994
1014
|
description: "Updating the complementary sidebar."
|
|
995
1015
|
}),
|
|
996
|
-
subject:
|
|
1016
|
+
subject: S5.optional(S5.String.annotations({
|
|
997
1017
|
description: "URI of the component to display in the complementary area."
|
|
998
1018
|
})),
|
|
999
|
-
options:
|
|
1000
|
-
state:
|
|
1019
|
+
options: S5.optional(S5.Struct({
|
|
1020
|
+
state: S5.Literal("closed", "collapsed", "expanded").annotations({
|
|
1001
1021
|
description: "Whether the complementary sidebar is closed, collapsed, or expanded."
|
|
1002
1022
|
})
|
|
1003
1023
|
}))
|
|
1004
1024
|
}),
|
|
1005
|
-
output:
|
|
1025
|
+
output: S5.Void
|
|
1006
1026
|
}) {
|
|
1007
1027
|
}
|
|
1008
1028
|
LayoutAction2.UpdateComplementary = UpdateComplementary;
|
|
1009
|
-
class UpdateDialog extends
|
|
1010
|
-
input:
|
|
1011
|
-
part:
|
|
1029
|
+
class UpdateDialog extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1030
|
+
input: S5.Struct({
|
|
1031
|
+
part: S5.Literal("dialog").annotations({
|
|
1012
1032
|
description: "Updating the dialog."
|
|
1013
1033
|
}),
|
|
1014
|
-
subject:
|
|
1034
|
+
subject: S5.optional(S5.String.annotations({
|
|
1015
1035
|
description: "URI of the component to display in the dialog."
|
|
1016
1036
|
})),
|
|
1017
|
-
options:
|
|
1018
|
-
state:
|
|
1037
|
+
options: S5.Struct({
|
|
1038
|
+
state: S5.optional(S5.Boolean.annotations({
|
|
1019
1039
|
description: "Whether the dialog is open or closed."
|
|
1020
1040
|
})),
|
|
1021
|
-
blockAlign:
|
|
1041
|
+
blockAlign: S5.optional(S5.Literal("start", "center", "end").annotations({
|
|
1022
1042
|
description: "The alignment of the dialog."
|
|
1023
1043
|
})),
|
|
1024
|
-
type:
|
|
1044
|
+
type: S5.optional(S5.Literal("default", "alert").annotations({
|
|
1025
1045
|
description: "The type of dialog."
|
|
1026
1046
|
})),
|
|
1027
|
-
props:
|
|
1028
|
-
key:
|
|
1029
|
-
value:
|
|
1047
|
+
props: S5.optional(S5.Record({
|
|
1048
|
+
key: S5.String,
|
|
1049
|
+
value: S5.Any
|
|
1030
1050
|
}).annotations({
|
|
1031
1051
|
description: "Additional props for the dialog."
|
|
1032
1052
|
}))
|
|
1033
1053
|
})
|
|
1034
1054
|
}),
|
|
1035
|
-
output:
|
|
1055
|
+
output: S5.Void
|
|
1036
1056
|
}) {
|
|
1037
1057
|
}
|
|
1038
1058
|
LayoutAction2.UpdateDialog = UpdateDialog;
|
|
1039
|
-
class UpdatePopover extends
|
|
1040
|
-
input:
|
|
1041
|
-
part:
|
|
1059
|
+
class UpdatePopover extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1060
|
+
input: S5.Struct({
|
|
1061
|
+
part: S5.Literal("popover").annotations({
|
|
1042
1062
|
description: "Updating the popover."
|
|
1043
1063
|
}),
|
|
1044
|
-
subject:
|
|
1045
|
-
description: "URI of the component to display in the popover."
|
|
1064
|
+
subject: S5.optional(S5.Any.annotations({
|
|
1065
|
+
description: "URI of the component to display in the popover or data to pass to the popover."
|
|
1046
1066
|
})),
|
|
1047
|
-
options:
|
|
1048
|
-
|
|
1049
|
-
description: "The id of the element to anchor the popover to."
|
|
1050
|
-
}),
|
|
1051
|
-
side: S4.optional(S4.Literal("top", "right", "bottom", "left").annotations({
|
|
1067
|
+
options: S5.Struct({
|
|
1068
|
+
side: S5.optional(S5.Literal("top", "right", "bottom", "left").annotations({
|
|
1052
1069
|
description: "The side of the anchor."
|
|
1053
1070
|
})),
|
|
1054
|
-
state:
|
|
1071
|
+
state: S5.optional(S5.Boolean.annotations({
|
|
1055
1072
|
description: "Whether the popover is open or closed."
|
|
1056
1073
|
})),
|
|
1057
|
-
props:
|
|
1058
|
-
key:
|
|
1059
|
-
value:
|
|
1074
|
+
props: S5.optional(S5.Record({
|
|
1075
|
+
key: S5.String,
|
|
1076
|
+
value: S5.Any
|
|
1060
1077
|
}).annotations({
|
|
1061
1078
|
description: "Additional props for the popover."
|
|
1062
1079
|
}))
|
|
1063
|
-
})
|
|
1080
|
+
}).pipe(S5.extend(S5.Union(S5.Struct({
|
|
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
|
+
}))))
|
|
1064
1091
|
}),
|
|
1065
|
-
output:
|
|
1092
|
+
output: S5.Void
|
|
1066
1093
|
}) {
|
|
1067
1094
|
}
|
|
1068
1095
|
LayoutAction2.UpdatePopover = UpdatePopover;
|
|
1069
|
-
LayoutAction2.Toast =
|
|
1070
|
-
id:
|
|
1096
|
+
LayoutAction2.Toast = S5.Struct({
|
|
1097
|
+
id: S5.String.annotations({
|
|
1071
1098
|
description: "The id of the toast."
|
|
1072
1099
|
}),
|
|
1073
|
-
title:
|
|
1100
|
+
title: S5.optional(Label.annotations({
|
|
1074
1101
|
description: "The title of the toast."
|
|
1075
1102
|
})),
|
|
1076
|
-
description:
|
|
1103
|
+
description: S5.optional(Label.annotations({
|
|
1077
1104
|
description: "The description of the toast."
|
|
1078
1105
|
})),
|
|
1079
|
-
icon:
|
|
1106
|
+
icon: S5.optional(S5.String.annotations({
|
|
1080
1107
|
description: "The icon of the toast."
|
|
1081
1108
|
})),
|
|
1082
|
-
duration:
|
|
1109
|
+
duration: S5.optional(S5.Number.annotations({
|
|
1083
1110
|
description: "The duration of the toast."
|
|
1084
1111
|
})),
|
|
1085
|
-
closeLabel:
|
|
1112
|
+
closeLabel: S5.optional(Label.annotations({
|
|
1086
1113
|
description: "The label of the close button."
|
|
1087
1114
|
})),
|
|
1088
|
-
actionLabel:
|
|
1115
|
+
actionLabel: S5.optional(Label.annotations({
|
|
1089
1116
|
description: "The label of the action button."
|
|
1090
1117
|
})),
|
|
1091
|
-
actionAlt:
|
|
1118
|
+
actionAlt: S5.optional(Label.annotations({
|
|
1092
1119
|
description: "The alt text of the action button."
|
|
1093
1120
|
})),
|
|
1094
|
-
onAction:
|
|
1121
|
+
onAction: S5.optional(S5.Any.annotations({
|
|
1095
1122
|
description: "The action to perform when the action button is clicked."
|
|
1096
1123
|
}))
|
|
1097
1124
|
});
|
|
1098
|
-
class AddToast extends
|
|
1099
|
-
input:
|
|
1100
|
-
part:
|
|
1125
|
+
class AddToast extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1126
|
+
input: S5.Struct({
|
|
1127
|
+
part: S5.Literal("toast").annotations({
|
|
1101
1128
|
description: "Adding a toast."
|
|
1102
1129
|
}),
|
|
1103
1130
|
subject: LayoutAction2.Toast.annotations({
|
|
1104
1131
|
description: "The toast to add."
|
|
1105
1132
|
})
|
|
1106
1133
|
}),
|
|
1107
|
-
output:
|
|
1134
|
+
output: S5.Void
|
|
1108
1135
|
}) {
|
|
1109
1136
|
}
|
|
1110
1137
|
LayoutAction2.AddToast = AddToast;
|
|
1111
|
-
class SwitchWorkspace extends
|
|
1112
|
-
input:
|
|
1113
|
-
part:
|
|
1138
|
+
class SwitchWorkspace extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1139
|
+
input: S5.Struct({
|
|
1140
|
+
part: S5.Literal("workspace").annotations({
|
|
1114
1141
|
description: "Switching the workspace."
|
|
1115
1142
|
}),
|
|
1116
|
-
subject:
|
|
1143
|
+
subject: S5.String.annotations({
|
|
1117
1144
|
description: "The id of the workspace to switch to."
|
|
1118
1145
|
})
|
|
1119
1146
|
}),
|
|
1120
|
-
output:
|
|
1147
|
+
output: S5.Void
|
|
1121
1148
|
}) {
|
|
1122
1149
|
}
|
|
1123
1150
|
LayoutAction2.SwitchWorkspace = SwitchWorkspace;
|
|
1124
|
-
class RevertWorkspace extends
|
|
1125
|
-
input:
|
|
1126
|
-
part:
|
|
1151
|
+
class RevertWorkspace extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1152
|
+
input: S5.Struct({
|
|
1153
|
+
part: S5.Literal("workspace").annotations({
|
|
1127
1154
|
description: "Switching the workspace."
|
|
1128
1155
|
}),
|
|
1129
|
-
options:
|
|
1130
|
-
revert:
|
|
1156
|
+
options: S5.Struct({
|
|
1157
|
+
revert: S5.Literal(true).annotations({
|
|
1131
1158
|
description: "Revert to the previous workspace."
|
|
1132
1159
|
})
|
|
1133
1160
|
})
|
|
1134
1161
|
}),
|
|
1135
|
-
output:
|
|
1162
|
+
output: S5.Void
|
|
1136
1163
|
}) {
|
|
1137
1164
|
}
|
|
1138
1165
|
LayoutAction2.RevertWorkspace = RevertWorkspace;
|
|
1139
|
-
class Open extends
|
|
1140
|
-
input:
|
|
1141
|
-
part:
|
|
1166
|
+
class Open extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1167
|
+
input: S5.Struct({
|
|
1168
|
+
part: S5.Literal("main").annotations({
|
|
1142
1169
|
description: "Opening an item in the main content area."
|
|
1143
1170
|
}),
|
|
1144
|
-
subject:
|
|
1171
|
+
subject: S5.Array(S5.String.annotations({
|
|
1145
1172
|
description: "Ids of the items to open."
|
|
1146
1173
|
})),
|
|
1147
|
-
options:
|
|
1148
|
-
state:
|
|
1174
|
+
options: S5.optional(S5.Struct({
|
|
1175
|
+
state: S5.optional(S5.Literal(true).annotations({
|
|
1149
1176
|
description: "The items are being added."
|
|
1150
1177
|
})),
|
|
1151
|
-
variant:
|
|
1178
|
+
variant: S5.optional(S5.String.annotations({
|
|
1152
1179
|
description: "The variant of the item to open."
|
|
1153
1180
|
})),
|
|
1154
|
-
key:
|
|
1181
|
+
key: S5.optional(S5.String.annotations({
|
|
1155
1182
|
description: "If provided, will replace item with a matching key (id prefix)."
|
|
1156
1183
|
})),
|
|
1157
|
-
scrollIntoView:
|
|
1184
|
+
scrollIntoView: S5.optional(S5.Boolean.annotations({
|
|
1158
1185
|
description: "Scroll the items into view."
|
|
1159
1186
|
})),
|
|
1160
|
-
pivotId:
|
|
1187
|
+
pivotId: S5.optional(S5.String.annotations({
|
|
1161
1188
|
description: "The id of the item to place new items next to."
|
|
1162
1189
|
})),
|
|
1163
|
-
positioning:
|
|
1190
|
+
positioning: S5.optional(S5.Union(S5.Literal("start").annotations({
|
|
1164
1191
|
description: "The items are being added before the pivot item."
|
|
1165
|
-
}),
|
|
1192
|
+
}), S5.Literal("end").annotations({
|
|
1166
1193
|
description: "The items are being added after the pivot item."
|
|
1167
1194
|
})))
|
|
1168
1195
|
}))
|
|
1169
1196
|
}),
|
|
1170
|
-
output:
|
|
1197
|
+
output: S5.Void
|
|
1171
1198
|
}) {
|
|
1172
1199
|
}
|
|
1173
1200
|
LayoutAction2.Open = Open;
|
|
1174
|
-
class Set2 extends
|
|
1175
|
-
input:
|
|
1176
|
-
part:
|
|
1201
|
+
class Set2 extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1202
|
+
input: S5.Struct({
|
|
1203
|
+
part: S5.Literal("main").annotations({
|
|
1177
1204
|
description: "Setting items in the main content area."
|
|
1178
1205
|
}),
|
|
1179
|
-
subject:
|
|
1206
|
+
subject: S5.Array(S5.String.annotations({
|
|
1180
1207
|
description: "Ids of the items to set."
|
|
1181
1208
|
})),
|
|
1182
|
-
options:
|
|
1183
|
-
override:
|
|
1209
|
+
options: S5.Struct({
|
|
1210
|
+
override: S5.Literal(true).annotations({
|
|
1184
1211
|
description: "Override the current items in the main content area."
|
|
1185
1212
|
})
|
|
1186
1213
|
})
|
|
1187
1214
|
}),
|
|
1188
|
-
output:
|
|
1215
|
+
output: S5.Void
|
|
1189
1216
|
}) {
|
|
1190
1217
|
}
|
|
1191
1218
|
LayoutAction2.Set = Set2;
|
|
1192
|
-
class Close extends
|
|
1193
|
-
input:
|
|
1194
|
-
part:
|
|
1219
|
+
class Close extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1220
|
+
input: S5.Struct({
|
|
1221
|
+
part: S5.Literal("main").annotations({
|
|
1195
1222
|
description: "Closing items in the main content area."
|
|
1196
1223
|
}),
|
|
1197
|
-
subject:
|
|
1224
|
+
subject: S5.Array(S5.String.annotations({
|
|
1198
1225
|
description: "Ids of the items to close."
|
|
1199
1226
|
})),
|
|
1200
|
-
options:
|
|
1201
|
-
state:
|
|
1227
|
+
options: S5.Struct({
|
|
1228
|
+
state: S5.Literal(false).annotations({
|
|
1202
1229
|
description: "The items are being removed."
|
|
1203
1230
|
})
|
|
1204
1231
|
})
|
|
1205
1232
|
}),
|
|
1206
|
-
output:
|
|
1233
|
+
output: S5.Void
|
|
1207
1234
|
}) {
|
|
1208
1235
|
}
|
|
1209
1236
|
LayoutAction2.Close = Close;
|
|
1210
|
-
class ScrollIntoView extends
|
|
1211
|
-
input:
|
|
1212
|
-
part:
|
|
1237
|
+
class ScrollIntoView extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1238
|
+
input: S5.Struct({
|
|
1239
|
+
part: S5.Literal("current").annotations({
|
|
1213
1240
|
description: "Setting the current item"
|
|
1214
1241
|
}),
|
|
1215
|
-
subject:
|
|
1242
|
+
subject: S5.optional(S5.String.annotations({
|
|
1216
1243
|
description: "The id of the item to set as current."
|
|
1217
1244
|
})),
|
|
1218
|
-
options:
|
|
1219
|
-
key:
|
|
1220
|
-
value:
|
|
1245
|
+
options: S5.optional(S5.Record({
|
|
1246
|
+
key: S5.String,
|
|
1247
|
+
value: S5.Any
|
|
1221
1248
|
}).annotations({
|
|
1222
1249
|
description: "Additional options for the scroll into view."
|
|
1223
1250
|
}))
|
|
1224
1251
|
}),
|
|
1225
|
-
output:
|
|
1252
|
+
output: S5.Void
|
|
1226
1253
|
}) {
|
|
1227
1254
|
}
|
|
1228
1255
|
LayoutAction2.ScrollIntoView = ScrollIntoView;
|
|
1229
|
-
class Expose extends
|
|
1230
|
-
input:
|
|
1231
|
-
part:
|
|
1256
|
+
class Expose extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1257
|
+
input: S5.Struct({
|
|
1258
|
+
part: S5.Literal("navigation").annotations({
|
|
1232
1259
|
description: "Exposing an item in the navigation area."
|
|
1233
1260
|
}),
|
|
1234
|
-
subject:
|
|
1261
|
+
subject: S5.String.annotations({
|
|
1235
1262
|
description: "The id of the item to expose."
|
|
1236
1263
|
})
|
|
1237
1264
|
}),
|
|
1238
|
-
output:
|
|
1265
|
+
output: S5.Void
|
|
1239
1266
|
}) {
|
|
1240
1267
|
}
|
|
1241
1268
|
LayoutAction2.Expose = Expose;
|
|
@@ -1245,17 +1272,17 @@ var LayoutAction;
|
|
|
1245
1272
|
var createSurface = (definition) => definition;
|
|
1246
1273
|
|
|
1247
1274
|
// packages/sdk/app-framework/src/common/translations.ts
|
|
1248
|
-
import { Schema as
|
|
1249
|
-
var ResourceKey =
|
|
1250
|
-
key:
|
|
1251
|
-
value:
|
|
1275
|
+
import { Schema as S6 } from "effect";
|
|
1276
|
+
var ResourceKey = S6.Union(S6.String, S6.Record({
|
|
1277
|
+
key: S6.String,
|
|
1278
|
+
value: S6.Any
|
|
1252
1279
|
}));
|
|
1253
|
-
var ResourceLanguage =
|
|
1254
|
-
key:
|
|
1280
|
+
var ResourceLanguage = S6.Record({
|
|
1281
|
+
key: S6.String,
|
|
1255
1282
|
value: ResourceKey
|
|
1256
1283
|
});
|
|
1257
|
-
var Resource =
|
|
1258
|
-
key:
|
|
1284
|
+
var Resource = S6.Record({
|
|
1285
|
+
key: S6.String,
|
|
1259
1286
|
value: ResourceLanguage
|
|
1260
1287
|
});
|
|
1261
1288
|
|
|
@@ -1266,7 +1293,7 @@ var HISTORY_LIMIT = 100;
|
|
|
1266
1293
|
var createResolver = (resolver) => resolver;
|
|
1267
1294
|
var isUndoable = (historyEntry) => historyEntry.length > 0 && historyEntry.every(({ undoable }) => !!undoable);
|
|
1268
1295
|
var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, historyLimit = HISTORY_LIMIT } = {}) => {
|
|
1269
|
-
const historyRef = Effect3.runSync(
|
|
1296
|
+
const historyRef = Effect3.runSync(Ref2.make([]));
|
|
1270
1297
|
const handleIntent = (intent) => Effect3.gen(function* () {
|
|
1271
1298
|
const candidates = getResolvers(intent.module).filter((resolver) => resolver.intent._tag === intent.id).filter((resolver) => !resolver.filter || resolver.filter(intent.data)).toSorted(byPosition);
|
|
1272
1299
|
if (candidates.length === 0) {
|
|
@@ -1284,7 +1311,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1284
1311
|
if (depth > executionLimit) {
|
|
1285
1312
|
yield* Effect3.fail(new CycleDetectedError());
|
|
1286
1313
|
}
|
|
1287
|
-
const resultsRef = yield*
|
|
1314
|
+
const resultsRef = yield* Ref2.make([]);
|
|
1288
1315
|
for (const intent of intentChain.all) {
|
|
1289
1316
|
const { data: prev } = (yield* resultsRef.get)[0] ?? {};
|
|
1290
1317
|
const result2 = yield* handleIntent({
|
|
@@ -1294,7 +1321,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1294
1321
|
...prev
|
|
1295
1322
|
}
|
|
1296
1323
|
});
|
|
1297
|
-
yield*
|
|
1324
|
+
yield* Ref2.update(resultsRef, (results2) => [
|
|
1298
1325
|
result2,
|
|
1299
1326
|
...results2
|
|
1300
1327
|
]);
|
|
@@ -1309,7 +1336,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1309
1336
|
}
|
|
1310
1337
|
const results = yield* resultsRef.get;
|
|
1311
1338
|
const result = results[0];
|
|
1312
|
-
yield*
|
|
1339
|
+
yield* Ref2.update(historyRef, (history) => {
|
|
1313
1340
|
const next = [
|
|
1314
1341
|
...history,
|
|
1315
1342
|
results
|
|
@@ -1333,7 +1360,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1333
1360
|
})).catch((error) => {
|
|
1334
1361
|
log3.catch(error, void 0, {
|
|
1335
1362
|
F: __dxlog_file3,
|
|
1336
|
-
L:
|
|
1363
|
+
L: 270,
|
|
1337
1364
|
S: void 0,
|
|
1338
1365
|
C: (f, a) => f(...a)
|
|
1339
1366
|
});
|
|
@@ -1365,7 +1392,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1365
1392
|
last: all.at(-1),
|
|
1366
1393
|
all
|
|
1367
1394
|
};
|
|
1368
|
-
yield*
|
|
1395
|
+
yield* Ref2.update(historyRef, (h) => h.filter((_, index) => index !== last));
|
|
1369
1396
|
return yield* dispatch(intent);
|
|
1370
1397
|
}
|
|
1371
1398
|
});
|
|
@@ -1387,7 +1414,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1387
1414
|
var defaultEffect = () => Effect3.fail(new Error("Intent runtime not ready"));
|
|
1388
1415
|
var defaultPromise = () => Effect3.runPromise(defaultEffect());
|
|
1389
1416
|
var intent_dispatcher_default = (context) => {
|
|
1390
|
-
const state =
|
|
1417
|
+
const state = live3({
|
|
1391
1418
|
dispatch: defaultEffect,
|
|
1392
1419
|
dispatchPromise: defaultPromise,
|
|
1393
1420
|
undo: defaultEffect,
|
|
@@ -1430,6 +1457,7 @@ export {
|
|
|
1430
1457
|
Plugin,
|
|
1431
1458
|
definePlugin,
|
|
1432
1459
|
Capabilities,
|
|
1460
|
+
CollaborationActions,
|
|
1433
1461
|
Events,
|
|
1434
1462
|
defaultFileTypes,
|
|
1435
1463
|
FileInfoSchema,
|
|
@@ -1451,4 +1479,4 @@ export {
|
|
|
1451
1479
|
ResourceLanguage,
|
|
1452
1480
|
Resource
|
|
1453
1481
|
};
|
|
1454
|
-
//# sourceMappingURL=chunk-
|
|
1482
|
+
//# sourceMappingURL=chunk-YQMLJUYN.mjs.map
|