@dxos/app-framework 0.8.1-staging.391c573 → 0.8.1-staging.97aedb1
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-IAEV7KKF.mjs → app-graph-builder-576BHZC7.mjs} +3 -3
- package/dist/lib/browser/{chunk-PWAAJE2Z.mjs → chunk-6AVTZPMT.mjs} +65 -45
- package/dist/lib/browser/chunk-6AVTZPMT.mjs.map +7 -0
- package/dist/lib/browser/{chunk-CIP4C47B.mjs → chunk-PPIBZ5N4.mjs} +55 -11
- package/dist/lib/browser/chunk-PPIBZ5N4.mjs.map +7 -0
- package/dist/lib/browser/{chunk-CB3W6T5E.mjs → chunk-SFPT4Z2C.mjs} +1 -1
- package/dist/lib/browser/{chunk-CB3W6T5E.mjs.map → chunk-SFPT4Z2C.mjs.map} +2 -2
- package/dist/lib/browser/index.mjs +8 -7
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-dispatcher-UR566RVO.mjs → intent-dispatcher-3Q67MHZZ.mjs} +2 -2
- package/dist/lib/browser/{intent-resolver-LEJ3X6CP.mjs → intent-resolver-O763LCLG.mjs} +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{store-5TN4OLFQ.mjs → store-URSN7DZI.mjs} +2 -2
- package/dist/lib/browser/testing/index.mjs +4 -3
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/browser/worker.mjs +1 -1
- package/dist/lib/node/{app-graph-builder-3RWOZENP.cjs → app-graph-builder-JZCSKYPY.cjs} +28 -28
- package/dist/lib/node/{chunk-SCHC4AZQ.cjs → chunk-JUSEAFDU.cjs} +4 -4
- package/dist/lib/node/{chunk-SCHC4AZQ.cjs.map → chunk-JUSEAFDU.cjs.map} +2 -2
- package/dist/lib/node/{chunk-XP4TI5DS.cjs → chunk-YIFTVCOR.cjs} +191 -171
- package/dist/lib/node/chunk-YIFTVCOR.cjs.map +7 -0
- package/dist/lib/node/{chunk-JLQABYHB.cjs → chunk-YNTKVTVX.cjs} +70 -26
- package/dist/lib/node/chunk-YNTKVTVX.cjs.map +7 -0
- package/dist/lib/node/index.cjs +79 -78
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-dispatcher-EDW7NFJ4.cjs → intent-dispatcher-H334XLFD.cjs} +8 -8
- package/dist/lib/node/{intent-dispatcher-EDW7NFJ4.cjs.map → intent-dispatcher-H334XLFD.cjs.map} +2 -2
- package/dist/lib/node/{intent-resolver-34J5IM27.cjs → intent-resolver-3F4POWAM.cjs} +12 -12
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{store-3I3UFH5D.cjs → store-OFDHTDCB.cjs} +7 -7
- package/dist/lib/node/testing/index.cjs +10 -9
- package/dist/lib/node/testing/index.cjs.map +3 -3
- package/dist/lib/node/worker.cjs +37 -37
- package/dist/lib/node/worker.cjs.map +1 -1
- package/dist/lib/node-esm/{app-graph-builder-RG3DT2OD.mjs → app-graph-builder-VYKLSMSZ.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-NIVSBD3D.mjs → chunk-AHKIPS2L.mjs} +65 -45
- package/dist/lib/node-esm/chunk-AHKIPS2L.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-BSYAFUZ7.mjs → chunk-PHOUQACM.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-BSYAFUZ7.mjs.map → chunk-PHOUQACM.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-T2URISUU.mjs → chunk-R6A7Z4LU.mjs} +55 -11
- package/dist/lib/node-esm/chunk-R6A7Z4LU.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +8 -7
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-dispatcher-7GCMKMSQ.mjs → intent-dispatcher-YDE2ONZA.mjs} +2 -2
- package/dist/lib/node-esm/{intent-resolver-7T6UOQOS.mjs → intent-resolver-LAGJ7LXM.mjs} +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{store-PTKVELJP.mjs → store-EYSUVNCS.mjs} +2 -2
- package/dist/lib/node-esm/testing/index.mjs +4 -3
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/worker.mjs +1 -1
- package/dist/types/src/App.d.ts +4 -2
- package/dist/types/src/App.d.ts.map +1 -1
- package/dist/types/src/common/layout.d.ts +1 -0
- package/dist/types/src/common/layout.d.ts.map +1 -1
- package/dist/types/src/common/surface.d.ts +4 -7
- package/dist/types/src/common/surface.d.ts.map +1 -1
- package/dist/types/src/core/capabilities.d.ts +5 -3
- package/dist/types/src/core/capabilities.d.ts.map +1 -1
- package/dist/types/src/core/plugin.d.ts +1 -1
- package/dist/types/src/core/plugin.d.ts.map +1 -1
- package/dist/types/src/playground/playground.stories.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/actions.d.ts +14 -0
- package/dist/types/src/plugin-intent/actions.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +1 -1
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -1
- package/dist/types/src/plugin-settings/actions.d.ts.map +1 -1
- package/dist/types/src/react/Surface.d.ts.map +1 -1
- package/package.json +20 -19
- package/src/App.tsx +65 -8
- package/src/common/layout.ts +1 -0
- package/src/common/surface.ts +6 -1
- package/src/core/capabilities.test.ts +3 -2
- package/src/core/capabilities.ts +11 -3
- package/src/core/manager.test.ts +30 -30
- package/src/core/manager.ts +2 -2
- package/src/core/plugin.ts +1 -1
- package/src/playground/debug/plugin.ts +1 -1
- package/src/playground/generator/generator.ts +1 -1
- package/src/playground/generator/plugin.ts +1 -1
- package/src/playground/layout/plugin.ts +1 -1
- package/src/playground/logger/plugin.ts +1 -1
- package/src/playground/playground.stories.tsx +5 -1
- package/src/plugin-intent/IntentPlugin.tsx +1 -1
- package/src/plugin-intent/actions.ts +11 -0
- package/src/plugin-intent/intent-dispatcher.ts +18 -5
- package/src/plugin-settings/SettingsPlugin.ts +1 -1
- package/src/plugin-settings/actions.ts +2 -0
- package/src/react/Surface.tsx +5 -3
- package/src/testing/withPluginManager.stories.tsx +2 -2
- package/src/testing/withPluginManager.tsx +1 -1
- package/dist/lib/browser/chunk-CIP4C47B.mjs.map +0 -7
- package/dist/lib/browser/chunk-PWAAJE2Z.mjs.map +0 -7
- package/dist/lib/node/chunk-JLQABYHB.cjs.map +0 -7
- package/dist/lib/node/chunk-XP4TI5DS.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-NIVSBD3D.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-T2URISUU.mjs.map +0 -7
- /package/dist/lib/browser/{app-graph-builder-IAEV7KKF.mjs.map → app-graph-builder-576BHZC7.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-dispatcher-UR566RVO.mjs.map → intent-dispatcher-3Q67MHZZ.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-resolver-LEJ3X6CP.mjs.map → intent-resolver-O763LCLG.mjs.map} +0 -0
- /package/dist/lib/browser/{store-5TN4OLFQ.mjs.map → store-URSN7DZI.mjs.map} +0 -0
- /package/dist/lib/node/{app-graph-builder-3RWOZENP.cjs.map → app-graph-builder-JZCSKYPY.cjs.map} +0 -0
- /package/dist/lib/node/{intent-resolver-34J5IM27.cjs.map → intent-resolver-3F4POWAM.cjs.map} +0 -0
- /package/dist/lib/node/{store-3I3UFH5D.cjs.map → store-OFDHTDCB.cjs.map} +0 -0
- /package/dist/lib/node-esm/{app-graph-builder-RG3DT2OD.mjs.map → app-graph-builder-VYKLSMSZ.mjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-dispatcher-7GCMKMSQ.mjs.map → intent-dispatcher-YDE2ONZA.mjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-resolver-7T6UOQOS.mjs.map → intent-resolver-LAGJ7LXM.mjs.map} +0 -0
- /package/dist/lib/node-esm/{store-PTKVELJP.mjs.map → store-EYSUVNCS.mjs.map} +0 -0
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_YIFTVCOR_exports = {};
|
|
30
|
+
__export(chunk_YIFTVCOR_exports, {
|
|
31
31
|
Capabilities: () => Capabilities,
|
|
32
32
|
Events: () => Events,
|
|
33
33
|
FileInfoSchema: () => FileInfoSchema,
|
|
@@ -66,7 +66,7 @@ __export(chunk_XP4TI5DS_exports, {
|
|
|
66
66
|
lazy: () => lazy,
|
|
67
67
|
oneOf: () => oneOf
|
|
68
68
|
});
|
|
69
|
-
module.exports = __toCommonJS(
|
|
69
|
+
module.exports = __toCommonJS(chunk_YIFTVCOR_exports);
|
|
70
70
|
var import_effect = require("effect");
|
|
71
71
|
var import_live_object = require("@dxos/live-object");
|
|
72
72
|
var import_log = require("@dxos/log");
|
|
@@ -74,18 +74,19 @@ var import_util = require("@dxos/util");
|
|
|
74
74
|
var import_effect2 = require("effect");
|
|
75
75
|
var import_effect3 = require("effect");
|
|
76
76
|
var import_signals_core = require("@preact/signals-core");
|
|
77
|
+
var import_effect4 = require("effect");
|
|
77
78
|
var import_async = require("@dxos/async");
|
|
78
79
|
var import_invariant = require("@dxos/invariant");
|
|
79
80
|
var import_live_object2 = require("@dxos/live-object");
|
|
80
81
|
var import_log2 = require("@dxos/log");
|
|
81
82
|
var import_signals_core2 = require("@preact/signals-core");
|
|
82
|
-
var
|
|
83
|
+
var import_effect5 = require("effect");
|
|
83
84
|
var import_async2 = require("@dxos/async");
|
|
84
85
|
var import_live_object3 = require("@dxos/live-object");
|
|
85
86
|
var import_log3 = require("@dxos/log");
|
|
86
|
-
var import_effect5 = require("effect");
|
|
87
87
|
var import_effect6 = require("effect");
|
|
88
88
|
var import_effect7 = require("effect");
|
|
89
|
+
var import_effect8 = require("effect");
|
|
89
90
|
var createIntent = (schema, data = {}, params = {}) => {
|
|
90
91
|
const _ = import_effect3.Schema.validateSync(schema.fields.input)(data);
|
|
91
92
|
const intent = {
|
|
@@ -130,6 +131,15 @@ var INTENT_PLUGIN = "dxos.org/plugin/intent";
|
|
|
130
131
|
var INTENT_ACTION = `${INTENT_PLUGIN}/action`;
|
|
131
132
|
var IntentAction;
|
|
132
133
|
(function(IntentAction2) {
|
|
134
|
+
class Track extends import_effect2.Schema.TaggedClass()(`${INTENT_ACTION}/track`, {
|
|
135
|
+
input: import_effect2.Schema.Struct({
|
|
136
|
+
intents: import_effect2.Schema.Array(import_effect2.Schema.String),
|
|
137
|
+
error: import_effect2.Schema.optional(import_effect2.Schema.String)
|
|
138
|
+
}),
|
|
139
|
+
output: import_effect2.Schema.Void
|
|
140
|
+
}) {
|
|
141
|
+
}
|
|
142
|
+
IntentAction2.Track = Track;
|
|
133
143
|
class ShowUndo extends import_effect2.Schema.TaggedClass()(`${INTENT_ACTION}/show-undo`, {
|
|
134
144
|
input: import_effect2.Schema.Struct({
|
|
135
145
|
message: Label
|
|
@@ -299,6 +309,12 @@ var PluginsContext = class {
|
|
|
299
309
|
unsubscribe();
|
|
300
310
|
return capability;
|
|
301
311
|
}
|
|
312
|
+
async activatePromise(event) {
|
|
313
|
+
return this.activate(event).pipe(import_effect4.Effect.runPromise);
|
|
314
|
+
}
|
|
315
|
+
async resetPromise(event) {
|
|
316
|
+
return this.reset(event).pipe(import_effect4.Effect.runPromise);
|
|
317
|
+
}
|
|
302
318
|
};
|
|
303
319
|
var defineEvent = (id, specifier) => {
|
|
304
320
|
return {
|
|
@@ -328,8 +344,8 @@ var PluginManager = class {
|
|
|
328
344
|
constructor({ pluginLoader, plugins = [], core = plugins.map(({ meta }) => meta.id), enabled = [] }) {
|
|
329
345
|
this.activation = new import_async2.Event();
|
|
330
346
|
this.context = new PluginsContext({
|
|
331
|
-
activate: (event) => this.
|
|
332
|
-
reset: (id) => this.
|
|
347
|
+
activate: (event) => this._activate(event),
|
|
348
|
+
reset: (id) => this._reset(id)
|
|
333
349
|
});
|
|
334
350
|
this._capabilities = /* @__PURE__ */ new Map();
|
|
335
351
|
this._pluginLoader = pluginLoader;
|
|
@@ -456,7 +472,7 @@ var PluginManager = class {
|
|
|
456
472
|
S: this,
|
|
457
473
|
C: (f, a) => f(...a)
|
|
458
474
|
});
|
|
459
|
-
await
|
|
475
|
+
await import_effect5.Effect.runPromise(import_effect5.Effect.all(this.pendingReset.map((event) => this._activate(event)), {
|
|
460
476
|
concurrency: "unbounded"
|
|
461
477
|
}));
|
|
462
478
|
return true;
|
|
@@ -508,7 +524,7 @@ var PluginManager = class {
|
|
|
508
524
|
const enabledIndex = this._state.enabled.findIndex((enabled) => enabled === id);
|
|
509
525
|
if (enabledIndex !== -1) {
|
|
510
526
|
this._state.enabled.splice(enabledIndex, 1);
|
|
511
|
-
await
|
|
527
|
+
await import_effect5.Effect.runPromise(this._deactivate(id));
|
|
512
528
|
plugin.modules.forEach((module2) => {
|
|
513
529
|
this._removeModule(module2.id);
|
|
514
530
|
});
|
|
@@ -522,7 +538,7 @@ var PluginManager = class {
|
|
|
522
538
|
* @returns Whether the activation was successful.
|
|
523
539
|
*/
|
|
524
540
|
activate(event) {
|
|
525
|
-
return (0, import_signals_core2.untracked)(() =>
|
|
541
|
+
return (0, import_signals_core2.untracked)(() => import_effect5.Effect.runPromise(this._activate(event)));
|
|
526
542
|
}
|
|
527
543
|
/**
|
|
528
544
|
* Deactivates all of the modules for a plugin.
|
|
@@ -530,7 +546,7 @@ var PluginManager = class {
|
|
|
530
546
|
* @returns Whether the deactivation was successful.
|
|
531
547
|
*/
|
|
532
548
|
deactivate(id) {
|
|
533
|
-
return (0, import_signals_core2.untracked)(() =>
|
|
549
|
+
return (0, import_signals_core2.untracked)(() => import_effect5.Effect.runPromise(this._deactivate(id)));
|
|
534
550
|
}
|
|
535
551
|
/**
|
|
536
552
|
* Re-activates the modules that were activated by the event.
|
|
@@ -538,7 +554,7 @@ var PluginManager = class {
|
|
|
538
554
|
* @returns Whether the reset was successful.
|
|
539
555
|
*/
|
|
540
556
|
reset(event) {
|
|
541
|
-
return (0, import_signals_core2.untracked)(() =>
|
|
557
|
+
return (0, import_signals_core2.untracked)(() => import_effect5.Effect.runPromise(this._reset(event)));
|
|
542
558
|
}
|
|
543
559
|
_addPlugin(plugin) {
|
|
544
560
|
(0, import_signals_core2.untracked)(() => {
|
|
@@ -639,7 +655,7 @@ var PluginManager = class {
|
|
|
639
655
|
*/
|
|
640
656
|
// TODO(wittjosiah): Improve error typing.
|
|
641
657
|
_activate(event) {
|
|
642
|
-
return
|
|
658
|
+
return import_effect5.Effect.gen(this, function* () {
|
|
643
659
|
const key = typeof event === "string" ? event : eventKey(event);
|
|
644
660
|
(0, import_log3.log)("activating", {
|
|
645
661
|
key
|
|
@@ -688,28 +704,28 @@ var PluginManager = class {
|
|
|
688
704
|
event: key,
|
|
689
705
|
state: "activating"
|
|
690
706
|
});
|
|
691
|
-
const getCapabilities = yield*
|
|
707
|
+
const getCapabilities = yield* import_effect5.Effect.all(modules.map(({ activate }) => import_effect5.Effect.tryPromise({
|
|
692
708
|
try: async () => activate(this.context),
|
|
693
709
|
catch: (error) => error
|
|
694
710
|
})), {
|
|
695
711
|
concurrency: "unbounded"
|
|
696
712
|
});
|
|
697
|
-
const result = yield* (0,
|
|
713
|
+
const result = yield* (0, import_effect5.pipe)(
|
|
698
714
|
modules,
|
|
699
|
-
|
|
700
|
-
|
|
715
|
+
import_effect5.Array.zip(getCapabilities),
|
|
716
|
+
import_effect5.Array.map(([module2, getCapabilities2]) => this._activateModule(module2, getCapabilities2)),
|
|
701
717
|
// TODO(wittjosiah): This currently can't be run in parallel.
|
|
702
718
|
// Running this with concurrency causes races with `allOf` activation events.
|
|
703
|
-
|
|
704
|
-
|
|
719
|
+
import_effect5.Effect.all,
|
|
720
|
+
import_effect5.Effect.either
|
|
705
721
|
);
|
|
706
|
-
if (
|
|
722
|
+
if (import_effect5.Either.isLeft(result)) {
|
|
707
723
|
this.activation.emit({
|
|
708
724
|
event: key,
|
|
709
725
|
state: "error",
|
|
710
726
|
error: result.left
|
|
711
727
|
});
|
|
712
|
-
yield*
|
|
728
|
+
yield* import_effect5.Effect.fail(result.left);
|
|
713
729
|
}
|
|
714
730
|
if (!this._state.eventsFired.includes(key)) {
|
|
715
731
|
this._state.eventsFired.push(key);
|
|
@@ -730,8 +746,8 @@ var PluginManager = class {
|
|
|
730
746
|
});
|
|
731
747
|
}
|
|
732
748
|
_activateModule(module2, getCapabilities) {
|
|
733
|
-
return
|
|
734
|
-
yield*
|
|
749
|
+
return import_effect5.Effect.gen(this, function* () {
|
|
750
|
+
yield* import_effect5.Effect.all(module2.activatesBefore?.map((event) => this._activate(event)) ?? [], {
|
|
735
751
|
concurrency: "unbounded"
|
|
736
752
|
});
|
|
737
753
|
(0, import_log3.log)("activating module...", {
|
|
@@ -743,16 +759,16 @@ var PluginManager = class {
|
|
|
743
759
|
C: (f, a) => f(...a)
|
|
744
760
|
});
|
|
745
761
|
const maybeCapabilities = typeof getCapabilities === "function" ? getCapabilities() : getCapabilities;
|
|
746
|
-
const resolvedCapabilities = yield*
|
|
762
|
+
const resolvedCapabilities = yield* import_effect5.Match.value(maybeCapabilities).pipe(
|
|
747
763
|
// TODO(wittjosiah): Activate with an effect?
|
|
748
764
|
// Match.when(Effect.isEffect, (effect) => effect),
|
|
749
|
-
|
|
765
|
+
import_effect5.Match.when(isPromise, (promise) => import_effect5.Effect.tryPromise({
|
|
750
766
|
try: () => promise,
|
|
751
767
|
catch: (error) => error
|
|
752
768
|
})),
|
|
753
|
-
|
|
769
|
+
import_effect5.Match.orElse((program) => import_effect5.Effect.succeed(program))
|
|
754
770
|
);
|
|
755
|
-
const capabilities =
|
|
771
|
+
const capabilities = import_effect5.Match.value(resolvedCapabilities).pipe(import_effect5.Match.when(Array.isArray, (array) => array), import_effect5.Match.orElse((value) => [
|
|
756
772
|
value
|
|
757
773
|
]));
|
|
758
774
|
capabilities.forEach((capability) => {
|
|
@@ -771,26 +787,26 @@ var PluginManager = class {
|
|
|
771
787
|
S: this,
|
|
772
788
|
C: (f, a) => f(...a)
|
|
773
789
|
});
|
|
774
|
-
yield*
|
|
790
|
+
yield* import_effect5.Effect.all(module2.activatesAfter?.map((event) => this._activate(event)) ?? [], {
|
|
775
791
|
concurrency: "unbounded"
|
|
776
792
|
});
|
|
777
793
|
});
|
|
778
794
|
}
|
|
779
795
|
_deactivate(id) {
|
|
780
|
-
return
|
|
796
|
+
return import_effect5.Effect.gen(this, function* () {
|
|
781
797
|
const plugin = this._getPlugin(id);
|
|
782
798
|
if (!plugin) {
|
|
783
799
|
return false;
|
|
784
800
|
}
|
|
785
801
|
const modules = plugin.modules;
|
|
786
|
-
const results = yield*
|
|
802
|
+
const results = yield* import_effect5.Effect.all(modules.map((module2) => this._deactivateModule(module2)), {
|
|
787
803
|
concurrency: "unbounded"
|
|
788
804
|
});
|
|
789
805
|
return results.every((result) => result);
|
|
790
806
|
});
|
|
791
807
|
}
|
|
792
808
|
_deactivateModule(module2) {
|
|
793
|
-
return
|
|
809
|
+
return import_effect5.Effect.gen(this, function* () {
|
|
794
810
|
const id = module2.id;
|
|
795
811
|
(0, import_log3.log)("deactivating", {
|
|
796
812
|
id
|
|
@@ -805,10 +821,10 @@ var PluginManager = class {
|
|
|
805
821
|
for (const capability of capabilities) {
|
|
806
822
|
this.context.removeCapability(capability.interface, capability.implementation);
|
|
807
823
|
const program = capability.deactivate?.();
|
|
808
|
-
yield*
|
|
824
|
+
yield* import_effect5.Match.value(program).pipe(import_effect5.Match.when(import_effect5.Effect.isEffect, (effect2) => effect2), import_effect5.Match.when(isPromise, (promise) => import_effect5.Effect.tryPromise({
|
|
809
825
|
try: () => promise,
|
|
810
826
|
catch: (error) => error
|
|
811
|
-
})),
|
|
827
|
+
})), import_effect5.Match.orElse((program2) => import_effect5.Effect.succeed(program2)));
|
|
812
828
|
}
|
|
813
829
|
this._capabilities.delete(id);
|
|
814
830
|
}
|
|
@@ -828,7 +844,7 @@ var PluginManager = class {
|
|
|
828
844
|
});
|
|
829
845
|
}
|
|
830
846
|
_reset(event) {
|
|
831
|
-
return
|
|
847
|
+
return import_effect5.Effect.gen(this, function* () {
|
|
832
848
|
const key = typeof event === "string" ? event : eventKey(event);
|
|
833
849
|
(0, import_log3.log)("reset", {
|
|
834
850
|
key
|
|
@@ -839,7 +855,7 @@ var PluginManager = class {
|
|
|
839
855
|
C: (f, a) => f(...a)
|
|
840
856
|
});
|
|
841
857
|
const modules = this._getActiveModulesByEvent(key);
|
|
842
|
-
const results = yield*
|
|
858
|
+
const results = yield* import_effect5.Effect.all(modules.map((module2) => this._deactivateModule(module2)), {
|
|
843
859
|
concurrency: "unbounded"
|
|
844
860
|
});
|
|
845
861
|
if (results.every((result) => result)) {
|
|
@@ -925,14 +941,15 @@ var defaultFileTypes = {
|
|
|
925
941
|
"md"
|
|
926
942
|
]
|
|
927
943
|
};
|
|
928
|
-
var FileInfoSchema =
|
|
929
|
-
name:
|
|
930
|
-
type:
|
|
931
|
-
url:
|
|
932
|
-
cid:
|
|
944
|
+
var FileInfoSchema = import_effect6.Schema.Struct({
|
|
945
|
+
name: import_effect6.Schema.String,
|
|
946
|
+
type: import_effect6.Schema.String,
|
|
947
|
+
url: import_effect6.Schema.optional(import_effect6.Schema.String),
|
|
948
|
+
cid: import_effect6.Schema.optional(import_effect6.Schema.String)
|
|
933
949
|
});
|
|
934
950
|
var IntentPlugin = () => definePlugin({
|
|
935
|
-
id: INTENT_PLUGIN
|
|
951
|
+
id: INTENT_PLUGIN,
|
|
952
|
+
name: "Intent"
|
|
936
953
|
}, [
|
|
937
954
|
defineModule({
|
|
938
955
|
id: `${INTENT_PLUGIN}/module/dispatcher`,
|
|
@@ -943,7 +960,7 @@ var IntentPlugin = () => definePlugin({
|
|
|
943
960
|
activatesAfter: [
|
|
944
961
|
Events.DispatcherReady
|
|
945
962
|
],
|
|
946
|
-
activate: lazy(() => import("./intent-dispatcher-
|
|
963
|
+
activate: lazy(() => import("./intent-dispatcher-H334XLFD.cjs"))
|
|
947
964
|
})
|
|
948
965
|
]);
|
|
949
966
|
var LAYOUT_PLUGIN = "dxos.org/plugin/layout";
|
|
@@ -951,325 +968,328 @@ var LAYOUT_ACTION = `${LAYOUT_PLUGIN}/action`;
|
|
|
951
968
|
var LayoutAction;
|
|
952
969
|
(function(LayoutAction2) {
|
|
953
970
|
LayoutAction2.UPDATE_LAYOUT = `${LAYOUT_ACTION}/update-layout`;
|
|
954
|
-
class UpdateLayout extends
|
|
955
|
-
input:
|
|
956
|
-
part:
|
|
971
|
+
class UpdateLayout extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
972
|
+
input: import_effect7.Schema.Struct({
|
|
973
|
+
part: import_effect7.Schema.String.annotations({
|
|
957
974
|
description: "The part of the layout to mutate."
|
|
958
975
|
}),
|
|
959
|
-
subject:
|
|
976
|
+
subject: import_effect7.Schema.optional(import_effect7.Schema.Any.annotations({
|
|
960
977
|
description: "The subject of the layout update."
|
|
961
978
|
})),
|
|
962
|
-
options:
|
|
963
|
-
key:
|
|
964
|
-
value:
|
|
979
|
+
options: import_effect7.Schema.optional(import_effect7.Schema.Record({
|
|
980
|
+
key: import_effect7.Schema.String,
|
|
981
|
+
value: import_effect7.Schema.Any
|
|
965
982
|
}).annotations({
|
|
966
983
|
description: "Additional options for the layout action."
|
|
967
984
|
}))
|
|
968
985
|
}),
|
|
969
|
-
output:
|
|
986
|
+
output: import_effect7.Schema.Void
|
|
970
987
|
}) {
|
|
971
988
|
}
|
|
972
989
|
LayoutAction2.UpdateLayout = UpdateLayout;
|
|
973
|
-
class SetLayoutMode extends
|
|
974
|
-
input:
|
|
975
|
-
part:
|
|
990
|
+
class SetLayoutMode extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
991
|
+
input: import_effect7.Schema.Struct({
|
|
992
|
+
part: import_effect7.Schema.Literal("mode").annotations({
|
|
976
993
|
description: "Setting the layout mode."
|
|
977
994
|
}),
|
|
978
|
-
subject:
|
|
995
|
+
subject: import_effect7.Schema.optional(import_effect7.Schema.String.annotations({
|
|
979
996
|
description: "Item which is the subject of the new layout mode."
|
|
980
997
|
})),
|
|
981
|
-
options:
|
|
982
|
-
mode:
|
|
998
|
+
options: import_effect7.Schema.Union(import_effect7.Schema.Struct({
|
|
999
|
+
mode: import_effect7.Schema.String.annotations({
|
|
983
1000
|
description: "The new layout mode."
|
|
984
1001
|
})
|
|
985
|
-
}),
|
|
986
|
-
revert:
|
|
1002
|
+
}), import_effect7.Schema.Struct({
|
|
1003
|
+
revert: import_effect7.Schema.Boolean.annotations({
|
|
987
1004
|
description: "Revert to the previous layout mode."
|
|
988
1005
|
})
|
|
989
1006
|
}))
|
|
990
1007
|
}),
|
|
991
|
-
output:
|
|
1008
|
+
output: import_effect7.Schema.Void
|
|
992
1009
|
}) {
|
|
993
1010
|
}
|
|
994
1011
|
LayoutAction2.SetLayoutMode = SetLayoutMode;
|
|
995
|
-
class UpdateSidebar extends
|
|
996
|
-
input:
|
|
997
|
-
part:
|
|
1012
|
+
class UpdateSidebar extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1013
|
+
input: import_effect7.Schema.Struct({
|
|
1014
|
+
part: import_effect7.Schema.Literal("sidebar").annotations({
|
|
998
1015
|
description: "Updating the sidebar."
|
|
999
1016
|
}),
|
|
1000
|
-
subject:
|
|
1017
|
+
subject: import_effect7.Schema.optional(import_effect7.Schema.String.annotations({
|
|
1001
1018
|
description: "URI of the component to display in the sidebar."
|
|
1002
1019
|
})),
|
|
1003
|
-
options:
|
|
1004
|
-
state:
|
|
1020
|
+
options: import_effect7.Schema.optional(import_effect7.Schema.Struct({
|
|
1021
|
+
state: import_effect7.Schema.Literal("closed", "collapsed", "expanded").annotations({
|
|
1005
1022
|
description: "Whether the sidebar is closed, collapsed, or expanded."
|
|
1006
1023
|
})
|
|
1007
1024
|
}))
|
|
1008
1025
|
}),
|
|
1009
|
-
output:
|
|
1026
|
+
output: import_effect7.Schema.Void
|
|
1010
1027
|
}) {
|
|
1011
1028
|
}
|
|
1012
1029
|
LayoutAction2.UpdateSidebar = UpdateSidebar;
|
|
1013
|
-
class UpdateComplementary extends
|
|
1014
|
-
input:
|
|
1015
|
-
part:
|
|
1030
|
+
class UpdateComplementary extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1031
|
+
input: import_effect7.Schema.Struct({
|
|
1032
|
+
part: import_effect7.Schema.Literal("complementary").annotations({
|
|
1016
1033
|
description: "Updating the complementary sidebar."
|
|
1017
1034
|
}),
|
|
1018
|
-
subject:
|
|
1035
|
+
subject: import_effect7.Schema.optional(import_effect7.Schema.String.annotations({
|
|
1019
1036
|
description: "URI of the component to display in the complementary area."
|
|
1020
1037
|
})),
|
|
1021
|
-
options:
|
|
1022
|
-
state:
|
|
1038
|
+
options: import_effect7.Schema.optional(import_effect7.Schema.Struct({
|
|
1039
|
+
state: import_effect7.Schema.Literal("closed", "collapsed", "expanded").annotations({
|
|
1023
1040
|
description: "Whether the complementary sidebar is closed, collapsed, or expanded."
|
|
1024
1041
|
})
|
|
1025
1042
|
}))
|
|
1026
1043
|
}),
|
|
1027
|
-
output:
|
|
1044
|
+
output: import_effect7.Schema.Void
|
|
1028
1045
|
}) {
|
|
1029
1046
|
}
|
|
1030
1047
|
LayoutAction2.UpdateComplementary = UpdateComplementary;
|
|
1031
|
-
class UpdateDialog extends
|
|
1032
|
-
input:
|
|
1033
|
-
part:
|
|
1048
|
+
class UpdateDialog extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1049
|
+
input: import_effect7.Schema.Struct({
|
|
1050
|
+
part: import_effect7.Schema.Literal("dialog").annotations({
|
|
1034
1051
|
description: "Updating the dialog."
|
|
1035
1052
|
}),
|
|
1036
|
-
subject:
|
|
1053
|
+
subject: import_effect7.Schema.optional(import_effect7.Schema.String.annotations({
|
|
1037
1054
|
description: "URI of the component to display in the dialog."
|
|
1038
1055
|
})),
|
|
1039
|
-
options:
|
|
1040
|
-
state:
|
|
1056
|
+
options: import_effect7.Schema.Struct({
|
|
1057
|
+
state: import_effect7.Schema.optional(import_effect7.Schema.Boolean.annotations({
|
|
1041
1058
|
description: "Whether the dialog is open or closed."
|
|
1042
1059
|
})),
|
|
1043
|
-
blockAlign:
|
|
1060
|
+
blockAlign: import_effect7.Schema.optional(import_effect7.Schema.Literal("start", "center", "end").annotations({
|
|
1044
1061
|
description: "The alignment of the dialog."
|
|
1045
1062
|
})),
|
|
1046
|
-
type:
|
|
1063
|
+
type: import_effect7.Schema.optional(import_effect7.Schema.Literal("default", "alert").annotations({
|
|
1047
1064
|
description: "The type of dialog."
|
|
1048
1065
|
})),
|
|
1049
|
-
props:
|
|
1050
|
-
key:
|
|
1051
|
-
value:
|
|
1066
|
+
props: import_effect7.Schema.optional(import_effect7.Schema.Record({
|
|
1067
|
+
key: import_effect7.Schema.String,
|
|
1068
|
+
value: import_effect7.Schema.Any
|
|
1052
1069
|
}).annotations({
|
|
1053
1070
|
description: "Additional props for the dialog."
|
|
1054
1071
|
}))
|
|
1055
1072
|
})
|
|
1056
1073
|
}),
|
|
1057
|
-
output:
|
|
1074
|
+
output: import_effect7.Schema.Void
|
|
1058
1075
|
}) {
|
|
1059
1076
|
}
|
|
1060
1077
|
LayoutAction2.UpdateDialog = UpdateDialog;
|
|
1061
|
-
class UpdatePopover extends
|
|
1062
|
-
input:
|
|
1063
|
-
part:
|
|
1078
|
+
class UpdatePopover extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1079
|
+
input: import_effect7.Schema.Struct({
|
|
1080
|
+
part: import_effect7.Schema.Literal("popover").annotations({
|
|
1064
1081
|
description: "Updating the popover."
|
|
1065
1082
|
}),
|
|
1066
|
-
subject:
|
|
1083
|
+
subject: import_effect7.Schema.optional(import_effect7.Schema.String.annotations({
|
|
1067
1084
|
description: "URI of the component to display in the popover."
|
|
1068
1085
|
})),
|
|
1069
|
-
options:
|
|
1070
|
-
anchorId:
|
|
1086
|
+
options: import_effect7.Schema.Struct({
|
|
1087
|
+
anchorId: import_effect7.Schema.String.annotations({
|
|
1071
1088
|
description: "The id of the element to anchor the popover to."
|
|
1072
1089
|
}),
|
|
1073
|
-
side:
|
|
1090
|
+
side: import_effect7.Schema.optional(import_effect7.Schema.Literal("top", "right", "bottom", "left").annotations({
|
|
1074
1091
|
description: "The side of the anchor."
|
|
1075
1092
|
})),
|
|
1076
|
-
state:
|
|
1093
|
+
state: import_effect7.Schema.optional(import_effect7.Schema.Boolean.annotations({
|
|
1077
1094
|
description: "Whether the popover is open or closed."
|
|
1078
1095
|
})),
|
|
1079
|
-
props:
|
|
1080
|
-
key:
|
|
1081
|
-
value:
|
|
1096
|
+
props: import_effect7.Schema.optional(import_effect7.Schema.Record({
|
|
1097
|
+
key: import_effect7.Schema.String,
|
|
1098
|
+
value: import_effect7.Schema.Any
|
|
1082
1099
|
}).annotations({
|
|
1083
1100
|
description: "Additional props for the popover."
|
|
1084
1101
|
}))
|
|
1085
1102
|
})
|
|
1086
1103
|
}),
|
|
1087
|
-
output:
|
|
1104
|
+
output: import_effect7.Schema.Void
|
|
1088
1105
|
}) {
|
|
1089
1106
|
}
|
|
1090
1107
|
LayoutAction2.UpdatePopover = UpdatePopover;
|
|
1091
|
-
LayoutAction2.Toast =
|
|
1092
|
-
id:
|
|
1108
|
+
LayoutAction2.Toast = import_effect7.Schema.Struct({
|
|
1109
|
+
id: import_effect7.Schema.String.annotations({
|
|
1093
1110
|
description: "The id of the toast."
|
|
1094
1111
|
}),
|
|
1095
|
-
title:
|
|
1112
|
+
title: import_effect7.Schema.optional(Label.annotations({
|
|
1096
1113
|
description: "The title of the toast."
|
|
1097
1114
|
})),
|
|
1098
|
-
description:
|
|
1115
|
+
description: import_effect7.Schema.optional(Label.annotations({
|
|
1099
1116
|
description: "The description of the toast."
|
|
1100
1117
|
})),
|
|
1101
|
-
icon:
|
|
1118
|
+
icon: import_effect7.Schema.optional(import_effect7.Schema.String.annotations({
|
|
1102
1119
|
description: "The icon of the toast."
|
|
1103
1120
|
})),
|
|
1104
|
-
duration:
|
|
1121
|
+
duration: import_effect7.Schema.optional(import_effect7.Schema.Number.annotations({
|
|
1105
1122
|
description: "The duration of the toast."
|
|
1106
1123
|
})),
|
|
1107
|
-
closeLabel:
|
|
1124
|
+
closeLabel: import_effect7.Schema.optional(Label.annotations({
|
|
1108
1125
|
description: "The label of the close button."
|
|
1109
1126
|
})),
|
|
1110
|
-
actionLabel:
|
|
1127
|
+
actionLabel: import_effect7.Schema.optional(Label.annotations({
|
|
1111
1128
|
description: "The label of the action button."
|
|
1112
1129
|
})),
|
|
1113
|
-
actionAlt:
|
|
1130
|
+
actionAlt: import_effect7.Schema.optional(Label.annotations({
|
|
1114
1131
|
description: "The alt text of the action button."
|
|
1115
1132
|
})),
|
|
1116
|
-
onAction:
|
|
1133
|
+
onAction: import_effect7.Schema.optional(import_effect7.Schema.Any.annotations({
|
|
1117
1134
|
description: "The action to perform when the action button is clicked."
|
|
1118
1135
|
}))
|
|
1119
1136
|
});
|
|
1120
|
-
class AddToast extends
|
|
1121
|
-
input:
|
|
1122
|
-
part:
|
|
1137
|
+
class AddToast extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1138
|
+
input: import_effect7.Schema.Struct({
|
|
1139
|
+
part: import_effect7.Schema.Literal("toast").annotations({
|
|
1123
1140
|
description: "Adding a toast."
|
|
1124
1141
|
}),
|
|
1125
1142
|
subject: LayoutAction2.Toast.annotations({
|
|
1126
1143
|
description: "The toast to add."
|
|
1127
1144
|
})
|
|
1128
1145
|
}),
|
|
1129
|
-
output:
|
|
1146
|
+
output: import_effect7.Schema.Void
|
|
1130
1147
|
}) {
|
|
1131
1148
|
}
|
|
1132
1149
|
LayoutAction2.AddToast = AddToast;
|
|
1133
|
-
class SwitchWorkspace extends
|
|
1134
|
-
input:
|
|
1135
|
-
part:
|
|
1150
|
+
class SwitchWorkspace extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1151
|
+
input: import_effect7.Schema.Struct({
|
|
1152
|
+
part: import_effect7.Schema.Literal("workspace").annotations({
|
|
1136
1153
|
description: "Switching the workspace."
|
|
1137
1154
|
}),
|
|
1138
|
-
subject:
|
|
1155
|
+
subject: import_effect7.Schema.String.annotations({
|
|
1139
1156
|
description: "The id of the workspace to switch to."
|
|
1140
1157
|
})
|
|
1141
1158
|
}),
|
|
1142
|
-
output:
|
|
1159
|
+
output: import_effect7.Schema.Void
|
|
1143
1160
|
}) {
|
|
1144
1161
|
}
|
|
1145
1162
|
LayoutAction2.SwitchWorkspace = SwitchWorkspace;
|
|
1146
|
-
class RevertWorkspace extends
|
|
1147
|
-
input:
|
|
1148
|
-
part:
|
|
1163
|
+
class RevertWorkspace extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1164
|
+
input: import_effect7.Schema.Struct({
|
|
1165
|
+
part: import_effect7.Schema.Literal("workspace").annotations({
|
|
1149
1166
|
description: "Switching the workspace."
|
|
1150
1167
|
}),
|
|
1151
|
-
options:
|
|
1152
|
-
revert:
|
|
1168
|
+
options: import_effect7.Schema.Struct({
|
|
1169
|
+
revert: import_effect7.Schema.Literal(true).annotations({
|
|
1153
1170
|
description: "Revert to the previous workspace."
|
|
1154
1171
|
})
|
|
1155
1172
|
})
|
|
1156
1173
|
}),
|
|
1157
|
-
output:
|
|
1174
|
+
output: import_effect7.Schema.Void
|
|
1158
1175
|
}) {
|
|
1159
1176
|
}
|
|
1160
1177
|
LayoutAction2.RevertWorkspace = RevertWorkspace;
|
|
1161
|
-
class Open extends
|
|
1162
|
-
input:
|
|
1163
|
-
part:
|
|
1178
|
+
class Open extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1179
|
+
input: import_effect7.Schema.Struct({
|
|
1180
|
+
part: import_effect7.Schema.Literal("main").annotations({
|
|
1164
1181
|
description: "Opening an item in the main content area."
|
|
1165
1182
|
}),
|
|
1166
|
-
subject:
|
|
1183
|
+
subject: import_effect7.Schema.Array(import_effect7.Schema.String.annotations({
|
|
1167
1184
|
description: "Ids of the items to open."
|
|
1168
1185
|
})),
|
|
1169
|
-
options:
|
|
1170
|
-
state:
|
|
1186
|
+
options: import_effect7.Schema.optional(import_effect7.Schema.Struct({
|
|
1187
|
+
state: import_effect7.Schema.optional(import_effect7.Schema.Literal(true).annotations({
|
|
1171
1188
|
description: "The items are being added."
|
|
1172
1189
|
})),
|
|
1173
|
-
|
|
1190
|
+
variant: import_effect7.Schema.optional(import_effect7.Schema.String.annotations({
|
|
1191
|
+
description: "The variant of the item to open."
|
|
1192
|
+
})),
|
|
1193
|
+
key: import_effect7.Schema.optional(import_effect7.Schema.String.annotations({
|
|
1174
1194
|
description: "If provided, will replace item with a matching key (id prefix)."
|
|
1175
1195
|
})),
|
|
1176
|
-
scrollIntoView:
|
|
1196
|
+
scrollIntoView: import_effect7.Schema.optional(import_effect7.Schema.Boolean.annotations({
|
|
1177
1197
|
description: "Scroll the items into view."
|
|
1178
1198
|
})),
|
|
1179
|
-
pivotId:
|
|
1199
|
+
pivotId: import_effect7.Schema.optional(import_effect7.Schema.String.annotations({
|
|
1180
1200
|
description: "The id of the item to place new items next to."
|
|
1181
1201
|
})),
|
|
1182
|
-
positioning:
|
|
1202
|
+
positioning: import_effect7.Schema.optional(import_effect7.Schema.Union(import_effect7.Schema.Literal("start").annotations({
|
|
1183
1203
|
description: "The items are being added before the pivot item."
|
|
1184
|
-
}),
|
|
1204
|
+
}), import_effect7.Schema.Literal("end").annotations({
|
|
1185
1205
|
description: "The items are being added after the pivot item."
|
|
1186
1206
|
})))
|
|
1187
1207
|
}))
|
|
1188
1208
|
}),
|
|
1189
|
-
output:
|
|
1209
|
+
output: import_effect7.Schema.Void
|
|
1190
1210
|
}) {
|
|
1191
1211
|
}
|
|
1192
1212
|
LayoutAction2.Open = Open;
|
|
1193
|
-
class Set2 extends
|
|
1194
|
-
input:
|
|
1195
|
-
part:
|
|
1213
|
+
class Set2 extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1214
|
+
input: import_effect7.Schema.Struct({
|
|
1215
|
+
part: import_effect7.Schema.Literal("main").annotations({
|
|
1196
1216
|
description: "Setting items in the main content area."
|
|
1197
1217
|
}),
|
|
1198
|
-
subject:
|
|
1218
|
+
subject: import_effect7.Schema.Array(import_effect7.Schema.String.annotations({
|
|
1199
1219
|
description: "Ids of the items to set."
|
|
1200
1220
|
})),
|
|
1201
|
-
options:
|
|
1202
|
-
override:
|
|
1221
|
+
options: import_effect7.Schema.Struct({
|
|
1222
|
+
override: import_effect7.Schema.Literal(true).annotations({
|
|
1203
1223
|
description: "Override the current items in the main content area."
|
|
1204
1224
|
})
|
|
1205
1225
|
})
|
|
1206
1226
|
}),
|
|
1207
|
-
output:
|
|
1227
|
+
output: import_effect7.Schema.Void
|
|
1208
1228
|
}) {
|
|
1209
1229
|
}
|
|
1210
1230
|
LayoutAction2.Set = Set2;
|
|
1211
|
-
class Close extends
|
|
1212
|
-
input:
|
|
1213
|
-
part:
|
|
1231
|
+
class Close extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1232
|
+
input: import_effect7.Schema.Struct({
|
|
1233
|
+
part: import_effect7.Schema.Literal("main").annotations({
|
|
1214
1234
|
description: "Closing items in the main content area."
|
|
1215
1235
|
}),
|
|
1216
|
-
subject:
|
|
1236
|
+
subject: import_effect7.Schema.Array(import_effect7.Schema.String.annotations({
|
|
1217
1237
|
description: "Ids of the items to close."
|
|
1218
1238
|
})),
|
|
1219
|
-
options:
|
|
1220
|
-
state:
|
|
1239
|
+
options: import_effect7.Schema.Struct({
|
|
1240
|
+
state: import_effect7.Schema.Literal(false).annotations({
|
|
1221
1241
|
description: "The items are being removed."
|
|
1222
1242
|
})
|
|
1223
1243
|
})
|
|
1224
1244
|
}),
|
|
1225
|
-
output:
|
|
1245
|
+
output: import_effect7.Schema.Void
|
|
1226
1246
|
}) {
|
|
1227
1247
|
}
|
|
1228
1248
|
LayoutAction2.Close = Close;
|
|
1229
|
-
class ScrollIntoView extends
|
|
1230
|
-
input:
|
|
1231
|
-
part:
|
|
1249
|
+
class ScrollIntoView extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1250
|
+
input: import_effect7.Schema.Struct({
|
|
1251
|
+
part: import_effect7.Schema.Literal("current").annotations({
|
|
1232
1252
|
description: "Setting the current item"
|
|
1233
1253
|
}),
|
|
1234
|
-
subject:
|
|
1254
|
+
subject: import_effect7.Schema.optional(import_effect7.Schema.String.annotations({
|
|
1235
1255
|
description: "The id of the item to set as current."
|
|
1236
1256
|
})),
|
|
1237
|
-
options:
|
|
1238
|
-
key:
|
|
1239
|
-
value:
|
|
1257
|
+
options: import_effect7.Schema.optional(import_effect7.Schema.Record({
|
|
1258
|
+
key: import_effect7.Schema.String,
|
|
1259
|
+
value: import_effect7.Schema.Any
|
|
1240
1260
|
}).annotations({
|
|
1241
1261
|
description: "Additional options for the scroll into view."
|
|
1242
1262
|
}))
|
|
1243
1263
|
}),
|
|
1244
|
-
output:
|
|
1264
|
+
output: import_effect7.Schema.Void
|
|
1245
1265
|
}) {
|
|
1246
1266
|
}
|
|
1247
1267
|
LayoutAction2.ScrollIntoView = ScrollIntoView;
|
|
1248
|
-
class Expose extends
|
|
1249
|
-
input:
|
|
1250
|
-
part:
|
|
1268
|
+
class Expose extends import_effect7.Schema.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
|
|
1269
|
+
input: import_effect7.Schema.Struct({
|
|
1270
|
+
part: import_effect7.Schema.Literal("navigation").annotations({
|
|
1251
1271
|
description: "Exposing an item in the navigation area."
|
|
1252
1272
|
}),
|
|
1253
|
-
subject:
|
|
1273
|
+
subject: import_effect7.Schema.String.annotations({
|
|
1254
1274
|
description: "The id of the item to expose."
|
|
1255
1275
|
})
|
|
1256
1276
|
}),
|
|
1257
|
-
output:
|
|
1277
|
+
output: import_effect7.Schema.Void
|
|
1258
1278
|
}) {
|
|
1259
1279
|
}
|
|
1260
1280
|
LayoutAction2.Expose = Expose;
|
|
1261
1281
|
})(LayoutAction || (LayoutAction = {}));
|
|
1262
1282
|
var createSurface = (definition) => definition;
|
|
1263
|
-
var ResourceKey =
|
|
1264
|
-
key:
|
|
1265
|
-
value:
|
|
1283
|
+
var ResourceKey = import_effect8.Schema.Union(import_effect8.Schema.String, import_effect8.Schema.Record({
|
|
1284
|
+
key: import_effect8.Schema.String,
|
|
1285
|
+
value: import_effect8.Schema.Any
|
|
1266
1286
|
}));
|
|
1267
|
-
var ResourceLanguage =
|
|
1268
|
-
key:
|
|
1287
|
+
var ResourceLanguage = import_effect8.Schema.Record({
|
|
1288
|
+
key: import_effect8.Schema.String,
|
|
1269
1289
|
value: ResourceKey
|
|
1270
1290
|
});
|
|
1271
|
-
var Resource =
|
|
1272
|
-
key:
|
|
1291
|
+
var Resource = import_effect8.Schema.Record({
|
|
1292
|
+
key: import_effect8.Schema.String,
|
|
1273
1293
|
value: ResourceLanguage
|
|
1274
1294
|
});
|
|
1275
1295
|
var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/plugin-intent/intent-dispatcher.ts";
|
|
@@ -1280,7 +1300,7 @@ var isUndoable = (historyEntry) => historyEntry.length > 0 && historyEntry.every
|
|
|
1280
1300
|
var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, historyLimit = HISTORY_LIMIT } = {}) => {
|
|
1281
1301
|
const historyRef = import_effect.Effect.runSync(import_effect.Ref.make([]));
|
|
1282
1302
|
const handleIntent = (intent) => import_effect.Effect.gen(function* () {
|
|
1283
|
-
const candidates = getResolvers(intent.module).filter((
|
|
1303
|
+
const candidates = getResolvers(intent.module).filter((resolver) => resolver.intent._tag === intent.id).filter((resolver) => !resolver.filter || resolver.filter(intent.data)).toSorted(import_util.byPosition);
|
|
1284
1304
|
if (candidates.length === 0) {
|
|
1285
1305
|
yield* import_effect.Effect.fail(new NoResolversError(intent.id));
|
|
1286
1306
|
}
|
|
@@ -1345,7 +1365,7 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
|
|
|
1345
1365
|
})).catch((error) => {
|
|
1346
1366
|
import_log.log.catch(error, void 0, {
|
|
1347
1367
|
F: __dxlog_file3,
|
|
1348
|
-
L:
|
|
1368
|
+
L: 254,
|
|
1349
1369
|
S: void 0,
|
|
1350
1370
|
C: (f, a) => f(...a)
|
|
1351
1371
|
});
|
|
@@ -1463,4 +1483,4 @@ var intent_dispatcher_default = (context) => {
|
|
|
1463
1483
|
lazy,
|
|
1464
1484
|
oneOf
|
|
1465
1485
|
});
|
|
1466
|
-
//# sourceMappingURL=chunk-
|
|
1486
|
+
//# sourceMappingURL=chunk-YIFTVCOR.cjs.map
|