@dxos/plugin-deck 0.7.5-main.ff8607b → 0.7.5-staging.b81e783
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-CI6ZFMNL.mjs → app-graph-builder-IYHAGFA3.mjs} +6 -2
- package/dist/lib/browser/{app-graph-builder-CI6ZFMNL.mjs.map → app-graph-builder-IYHAGFA3.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-YQ2GWTDU.mjs → chunk-22AQ5IVX.mjs} +1 -1
- package/dist/lib/browser/{chunk-YQ2GWTDU.mjs.map → chunk-22AQ5IVX.mjs.map} +2 -2
- package/dist/lib/browser/chunk-AOAWF7JV.mjs +24 -0
- package/dist/lib/browser/{chunk-NYZJCVAU.mjs.map → chunk-AOAWF7JV.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-M2L53AIH.mjs → chunk-CYE6QZBQ.mjs} +4 -2
- package/dist/lib/browser/chunk-CYE6QZBQ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-WXNLVMK2.mjs → chunk-DIXE74SK.mjs} +95 -117
- package/dist/lib/browser/chunk-DIXE74SK.mjs.map +7 -0
- package/dist/lib/browser/chunk-KANJBSIX.mjs +97 -0
- package/dist/lib/browser/chunk-KANJBSIX.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +18 -5
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-CSXFDKTC.mjs → intent-resolver-MWUADUNI.mjs} +42 -48
- package/dist/lib/browser/intent-resolver-MWUADUNI.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-ECDQZYQT.mjs → react-root-XCWQYEOK.mjs} +7 -8
- package/dist/lib/browser/react-root-XCWQYEOK.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-4WIQZW2S.mjs → react-surface-IU3LLZDI.mjs} +6 -5
- package/dist/lib/browser/{react-surface-4WIQZW2S.mjs.map → react-surface-IU3LLZDI.mjs.map} +1 -1
- package/dist/lib/browser/{settings-WACNLCPB.mjs → settings-YONG3QB7.mjs} +2 -2
- package/dist/lib/browser/{state-VPOYUKK6.mjs → state-MZZL5S2D.mjs} +11 -4
- package/dist/lib/browser/state-MZZL5S2D.mjs.map +7 -0
- package/dist/lib/browser/tools-5LDJNU56.mjs +51 -0
- package/dist/lib/browser/tools-5LDJNU56.mjs.map +7 -0
- package/dist/lib/browser/types.mjs +1 -1
- package/dist/lib/browser/{url-handler-HLF42IHP.mjs → url-handler-BIEBKATX.mjs} +5 -5
- package/dist/lib/browser/{url-handler-HLF42IHP.mjs.map → url-handler-BIEBKATX.mjs.map} +3 -3
- package/dist/types/src/DeckPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +8 -8
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +1 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +4 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/tools.d.ts +10 -0
- package/dist/types/src/capabilities/tools.d.ts.map +1 -0
- package/dist/types/src/components/DeckLayout/ActiveNode.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/ActiveNode.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Banner.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/Banner.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/ComplementarySidebar.d.ts +1 -4
- package/dist/types/src/components/DeckLayout/ComplementarySidebar.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts +2 -4
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Fallback.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/Fallback.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Fullscreen.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/Fullscreen.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts +1 -1
- package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Plank.d.ts +1 -1
- package/dist/types/src/components/DeckLayout/Plank.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/PlankError.d.ts +2 -3
- package/dist/types/src/components/DeckLayout/PlankError.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/PlankLoading.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/PlankLoading.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Sidebar.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/Sidebar.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/SidebarButton.d.ts +3 -4
- package/dist/types/src/components/DeckLayout/SidebarButton.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/StatusBar.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/StatusBar.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Toast.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Topbar.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/Topbar.d.ts.map +1 -1
- package/dist/types/src/components/LayoutSettings.d.ts +1 -2
- package/dist/types/src/components/LayoutSettings.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +1 -0
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/hooks/useNode.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +5 -1
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +1 -0
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/set-active.d.ts.map +1 -0
- package/dist/types/src/util/useHoistStatusbar.d.ts.map +1 -1
- package/package.json +31 -30
- package/src/DeckPlugin.ts +14 -4
- package/src/capabilities/app-graph-builder.ts +4 -0
- package/src/capabilities/capabilities.ts +3 -6
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/intent-resolver.ts +26 -8
- package/src/capabilities/react-root.tsx +1 -3
- package/src/capabilities/state.ts +6 -1
- package/src/capabilities/tools.ts +61 -0
- package/src/capabilities/url-handler.ts +3 -3
- package/src/components/DeckLayout/ComplementarySidebar.tsx +33 -23
- package/src/components/DeckLayout/DeckLayout.tsx +41 -26
- package/src/components/DeckLayout/Plank.tsx +4 -3
- package/src/components/DeckLayout/PlankControls.tsx +1 -1
- package/src/events.ts +1 -0
- package/src/hooks/useNode.ts +3 -1
- package/src/layout.ts +1 -1
- package/src/types.ts +10 -3
- package/src/util/index.ts +1 -0
- package/src/{capabilities → util}/set-active.ts +4 -0
- package/src/util/useHoistStatusbar.ts +4 -8
- package/dist/lib/browser/chunk-M2L53AIH.mjs.map +0 -7
- package/dist/lib/browser/chunk-NYZJCVAU.mjs +0 -22
- package/dist/lib/browser/chunk-WXNLVMK2.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-CSXFDKTC.mjs.map +0 -7
- package/dist/lib/browser/react-root-ECDQZYQT.mjs.map +0 -7
- package/dist/lib/browser/state-VPOYUKK6.mjs.map +0 -7
- package/dist/types/src/capabilities/set-active.d.ts.map +0 -1
- /package/dist/lib/browser/{settings-WACNLCPB.mjs.map → settings-YONG3QB7.mjs.map} +0 -0
- /package/dist/types/src/{capabilities → util}/set-active.d.ts +0 -0
|
@@ -1,17 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
setActive
|
|
3
|
+
} from "./chunk-KANJBSIX.mjs";
|
|
1
4
|
import {
|
|
2
5
|
DeckCapabilities
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-22AQ5IVX.mjs";
|
|
4
7
|
import {
|
|
5
8
|
DeckAction,
|
|
6
9
|
getMode,
|
|
7
10
|
isLayoutMode
|
|
8
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CYE6QZBQ.mjs";
|
|
9
12
|
import {
|
|
10
13
|
DECK_PLUGIN
|
|
11
14
|
} from "./chunk-N7TEPFVR.mjs";
|
|
12
15
|
|
|
13
16
|
// packages/plugins/plugin-deck/src/capabilities/intent-resolver.ts
|
|
14
|
-
import { batch
|
|
17
|
+
import { batch } from "@preact/signals-core";
|
|
15
18
|
import { pipe } from "effect";
|
|
16
19
|
import { Capabilities, createResolver, contributes, IntentAction, LayoutAction, createIntent, chain } from "@dxos/app-framework";
|
|
17
20
|
import { getTypename, S } from "@dxos/echo-schema";
|
|
@@ -19,38 +22,7 @@ import { isReactiveObject } from "@dxos/live-object";
|
|
|
19
22
|
import { log } from "@dxos/log";
|
|
20
23
|
import { AttentionCapabilities } from "@dxos/plugin-attention";
|
|
21
24
|
import { ObservabilityAction } from "@dxos/plugin-observability/types";
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
// packages/plugins/plugin-deck/src/capabilities/set-active.ts
|
|
25
|
-
import { batch } from "@preact/signals-core";
|
|
26
|
-
var setActive = ({ next, state, attention }) => {
|
|
27
|
-
return batch(() => {
|
|
28
|
-
const active = state.deck.solo ? [
|
|
29
|
-
state.deck.solo
|
|
30
|
-
] : state.deck.active;
|
|
31
|
-
const removed = active.filter((id) => !next.includes(id));
|
|
32
|
-
const closed = Array.from(/* @__PURE__ */ new Set([
|
|
33
|
-
...state.deck.inactive.filter((id) => !next.includes(id)),
|
|
34
|
-
...removed
|
|
35
|
-
]));
|
|
36
|
-
state.deck.inactive = closed;
|
|
37
|
-
if (state.deck.solo || !state.deck.initialized) {
|
|
38
|
-
state.deck.solo = next[0];
|
|
39
|
-
} else {
|
|
40
|
-
state.deck.active = next;
|
|
41
|
-
}
|
|
42
|
-
if (attention) {
|
|
43
|
-
const attended = attention.current;
|
|
44
|
-
const [attendedId] = Array.from(attended);
|
|
45
|
-
const isAttendedAvailable = !!attendedId && next.includes(attendedId);
|
|
46
|
-
if (!isAttendedAvailable) {
|
|
47
|
-
const attendedIndex = active.indexOf(attendedId);
|
|
48
|
-
const index = attendedIndex === -1 ? 0 : attendedIndex >= next.length ? next.length - 1 : attendedIndex;
|
|
49
|
-
return next[index];
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
};
|
|
25
|
+
import { isNonNullable } from "@dxos/util";
|
|
54
26
|
|
|
55
27
|
// packages/plugins/plugin-deck/src/layout.ts
|
|
56
28
|
import { produce } from "immer";
|
|
@@ -63,7 +35,7 @@ var openEntry = (deck, entryId, options) => {
|
|
|
63
35
|
const plankPositioning = options?.positioning ?? "start";
|
|
64
36
|
const pivotId = options?.pivotId;
|
|
65
37
|
if (key) {
|
|
66
|
-
const index = draft.findIndex((id) => id.
|
|
38
|
+
const index = draft.findIndex((id) => id.split("+")[0] === key);
|
|
67
39
|
if (index !== -1) {
|
|
68
40
|
draft.splice(index, 1, entryId);
|
|
69
41
|
return;
|
|
@@ -219,6 +191,7 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
219
191
|
props: options.props
|
|
220
192
|
} : null;
|
|
221
193
|
layout.popoverAnchorId = options.anchorId;
|
|
194
|
+
layout.popoverSide = options.side;
|
|
222
195
|
}
|
|
223
196
|
}),
|
|
224
197
|
createResolver({
|
|
@@ -251,21 +224,21 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
251
224
|
const current = deck.solo ? [
|
|
252
225
|
deck.solo
|
|
253
226
|
] : deck.active;
|
|
254
|
-
const next = (mode
|
|
227
|
+
const next = (mode !== "deck" ? [
|
|
255
228
|
subject ?? deck.solo ?? deck.active[0]
|
|
256
229
|
] : [
|
|
257
230
|
...deck.active,
|
|
258
231
|
deck.solo
|
|
259
|
-
]).filter(
|
|
232
|
+
]).filter(isNonNullable);
|
|
260
233
|
const removed = current.filter((id) => !next.includes(id));
|
|
261
234
|
const closed = Array.from(/* @__PURE__ */ new Set([
|
|
262
235
|
...deck.inactive.filter((id) => !next.includes(id)),
|
|
263
236
|
...removed
|
|
264
237
|
]));
|
|
265
238
|
deck.inactive = closed;
|
|
266
|
-
if (mode
|
|
239
|
+
if (mode !== "deck" && next[0]) {
|
|
267
240
|
deck.solo = next[0];
|
|
268
|
-
} else if (mode
|
|
241
|
+
} else if (mode === "deck" && deck.solo) {
|
|
269
242
|
deck.solo = void 0;
|
|
270
243
|
deck.initialized = true;
|
|
271
244
|
}
|
|
@@ -275,7 +248,7 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
275
248
|
deck.fullscreen = false;
|
|
276
249
|
}
|
|
277
250
|
};
|
|
278
|
-
return
|
|
251
|
+
return batch(() => {
|
|
279
252
|
if ("mode" in options) {
|
|
280
253
|
const current = getMode(state.deck);
|
|
281
254
|
if (current !== options.mode) {
|
|
@@ -288,7 +261,7 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
288
261
|
} else {
|
|
289
262
|
log.warn("Invalid layout mode", options, {
|
|
290
263
|
F: __dxlog_file,
|
|
291
|
-
L:
|
|
264
|
+
L: 185,
|
|
292
265
|
S: void 0,
|
|
293
266
|
C: (f, a) => f(...a)
|
|
294
267
|
});
|
|
@@ -301,7 +274,10 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
301
274
|
filter: (data) => S.is(LayoutAction.SwitchWorkspace.fields.input)(data),
|
|
302
275
|
resolve: ({ subject }) => {
|
|
303
276
|
const state = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
304
|
-
|
|
277
|
+
batch(() => {
|
|
278
|
+
if (!state.activeDeck.startsWith("!")) {
|
|
279
|
+
state.previousDeck = state.activeDeck;
|
|
280
|
+
}
|
|
305
281
|
state.activeDeck = subject;
|
|
306
282
|
if (!state.decks[subject]) {
|
|
307
283
|
state.decks[subject] = {
|
|
@@ -313,7 +289,7 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
313
289
|
};
|
|
314
290
|
}
|
|
315
291
|
});
|
|
316
|
-
const first = state.
|
|
292
|
+
const first = state.deck.solo ? state.deck.solo : state.deck.active[0];
|
|
317
293
|
if (first) {
|
|
318
294
|
return {
|
|
319
295
|
intents: [
|
|
@@ -326,6 +302,21 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
326
302
|
}
|
|
327
303
|
}
|
|
328
304
|
}),
|
|
305
|
+
createResolver({
|
|
306
|
+
intent: LayoutAction.UpdateLayout,
|
|
307
|
+
filter: (data) => S.is(LayoutAction.RevertWorkspace.fields.input)(data),
|
|
308
|
+
resolve: () => {
|
|
309
|
+
const state = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
310
|
+
return {
|
|
311
|
+
intents: [
|
|
312
|
+
createIntent(LayoutAction.SwitchWorkspace, {
|
|
313
|
+
part: "workspace",
|
|
314
|
+
subject: state.previousDeck
|
|
315
|
+
})
|
|
316
|
+
]
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
}),
|
|
329
320
|
createResolver({
|
|
330
321
|
intent: LayoutAction.UpdateLayout,
|
|
331
322
|
filter: (data) => S.is(LayoutAction.Open.fields.input)(data),
|
|
@@ -337,7 +328,7 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
337
328
|
const previouslyOpenIds = new Set(state.deck.solo ? [
|
|
338
329
|
state.deck.solo
|
|
339
330
|
] : state.deck.active);
|
|
340
|
-
|
|
331
|
+
batch(() => {
|
|
341
332
|
const next = state.deck.solo ? subject : subject.reduce((acc, entryId) => openEntry(acc, entryId, {
|
|
342
333
|
key: options?.key,
|
|
343
334
|
positioning: options?.positioning ?? settings?.newPlankPositioning,
|
|
@@ -386,7 +377,10 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
386
377
|
resolve: ({ subject }) => {
|
|
387
378
|
const state = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
388
379
|
const attention = context.requestCapability(AttentionCapabilities.Attention);
|
|
389
|
-
const
|
|
380
|
+
const active = state.deck.solo ? [
|
|
381
|
+
state.deck.solo
|
|
382
|
+
] : state.deck.active;
|
|
383
|
+
const next = subject.reduce((acc, id) => closeEntry(acc, id), active);
|
|
390
384
|
const toAttend = setActive({
|
|
391
385
|
next,
|
|
392
386
|
state,
|
|
@@ -443,7 +437,7 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
443
437
|
resolve: (adjustment) => {
|
|
444
438
|
const state = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
445
439
|
const attention = context.requestCapability(AttentionCapabilities.Attention);
|
|
446
|
-
return
|
|
440
|
+
return batch(() => {
|
|
447
441
|
if (adjustment.type === "increment-end" || adjustment.type === "increment-start") {
|
|
448
442
|
setActive({
|
|
449
443
|
next: incrementPlank(state.deck.active, adjustment),
|
|
@@ -491,4 +485,4 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
491
485
|
export {
|
|
492
486
|
intent_resolver_default as default
|
|
493
487
|
};
|
|
494
|
-
//# sourceMappingURL=intent-resolver-
|
|
488
|
+
//# sourceMappingURL=intent-resolver-MWUADUNI.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/intent-resolver.ts", "../../../src/layout.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { batch } from '@preact/signals-core';\nimport { pipe } from 'effect';\n\nimport {\n Capabilities,\n createResolver,\n contributes,\n IntentAction,\n LayoutAction,\n type PluginsContext,\n createIntent,\n chain,\n} from '@dxos/app-framework';\nimport { getTypename, S } from '@dxos/echo-schema';\nimport { isReactiveObject } from '@dxos/live-object';\nimport { log } from '@dxos/log';\nimport { AttentionCapabilities } from '@dxos/plugin-attention';\nimport { ObservabilityAction } from '@dxos/plugin-observability/types';\nimport { isNonNullable } from '@dxos/util';\n\nimport { DeckCapabilities } from './capabilities';\nimport { closeEntry, incrementPlank, openEntry } from '../layout';\nimport { DECK_PLUGIN } from '../meta';\nimport { DeckAction, type LayoutMode, type DeckSettingsProps, isLayoutMode, getMode } from '../types';\nimport { setActive } from '../util';\n\nexport default (context: PluginsContext) =>\n contributes(Capabilities.IntentResolver, [\n createResolver({\n intent: IntentAction.ShowUndo,\n resolve: (data) => {\n const layout = context.requestCapability(DeckCapabilities.MutableDeckState);\n const { undoPromise: undo } = context.requestCapability(Capabilities.IntentDispatcher);\n\n // TODO(wittjosiah): Support undoing further back than the last action.\n if (layout.currentUndoId) {\n layout.toasts = layout.toasts.filter((toast) => toast.id !== layout.currentUndoId);\n }\n layout.currentUndoId = `${IntentAction.ShowUndo._tag}-${Date.now()}`;\n layout.toasts = [\n ...layout.toasts,\n {\n id: layout.currentUndoId,\n title: data.message ?? ['undo available label', { ns: DECK_PLUGIN }],\n duration: 10_000,\n actionLabel: ['undo action label', { ns: DECK_PLUGIN }],\n actionAlt: ['undo action alt', { ns: DECK_PLUGIN }],\n closeLabel: ['undo close label', { ns: DECK_PLUGIN }],\n onAction: () => undo(),\n },\n ];\n },\n }),\n createResolver({\n intent: LayoutAction.UpdateLayout,\n // TODO(wittjosiah): This should be able to just be `S.is(LayoutAction.UpdateSidebar.fields.input)`\n // but the filter is not being applied correctly.\n filter: (data): data is S.Schema.Type<typeof LayoutAction.UpdateSidebar.fields.input> =>\n S.is(LayoutAction.UpdateSidebar.fields.input)(data),\n resolve: ({ options }) => {\n const layout = context.requestCapability(DeckCapabilities.MutableDeckState);\n const next = options?.state ?? layout.sidebarState;\n if (next !== layout.sidebarState) {\n layout.sidebarState = next;\n }\n },\n }),\n createResolver({\n intent: LayoutAction.UpdateLayout,\n // TODO(wittjosiah): This should be able to just be `S.is(LayoutAction.UpdateComplementary.fields.input)`\n // but the filter is not being applied correctly.\n filter: (data): data is S.Schema.Type<typeof LayoutAction.UpdateComplementary.fields.input> =>\n S.is(LayoutAction.UpdateComplementary.fields.input)(data),\n resolve: ({ subject, options }) => {\n const layout = context.requestCapability(DeckCapabilities.MutableDeckState);\n\n if (layout.complementarySidebarPanel !== subject) {\n layout.complementarySidebarPanel = subject;\n }\n\n const next = subject ? 'expanded' : options?.state ?? layout.complementarySidebarState;\n if (next !== layout.complementarySidebarState) {\n layout.complementarySidebarState = next;\n }\n },\n }),\n createResolver({\n intent: LayoutAction.UpdateLayout,\n // TODO(wittjosiah): This should be able to just be `S.is(LayoutAction.UpdateDialog.fields.input)`\n // but the filter is not being applied correctly.\n filter: (data): data is S.Schema.Type<typeof LayoutAction.UpdateDialog.fields.input> =>\n S.is(LayoutAction.UpdateDialog.fields.input)(data),\n resolve: ({ subject, options }) => {\n const layout = context.requestCapability(DeckCapabilities.MutableDeckState);\n layout.dialogOpen = options.state ?? Boolean(subject);\n layout.dialogContent = subject ? { component: subject, props: options.props } : null;\n layout.dialogBlockAlign = options.blockAlign ?? 'center';\n layout.dialogType = options.type ?? 'default';\n },\n }),\n createResolver({\n intent: LayoutAction.UpdateLayout,\n // TODO(wittjosiah): This should be able to just be `S.is(LayoutAction.UpdatePopover.fields.input)`\n // but the filter is not being applied correctly.\n filter: (data): data is S.Schema.Type<typeof LayoutAction.UpdatePopover.fields.input> =>\n S.is(LayoutAction.UpdatePopover.fields.input)(data),\n resolve: ({ subject, options }) => {\n const layout = context.requestCapability(DeckCapabilities.MutableDeckState);\n layout.popoverOpen = options.state ?? Boolean(subject);\n layout.popoverContent = subject ? { component: subject, props: options.props } : null;\n layout.popoverAnchorId = options.anchorId;\n layout.popoverSide = options.side;\n },\n }),\n createResolver({\n intent: LayoutAction.UpdateLayout,\n // TODO(wittjosiah): This should be able to just be `S.is(LayoutAction.AddToast.fields.input)`\n // but the filter is not being applied correctly.\n filter: (data): data is S.Schema.Type<typeof LayoutAction.AddToast.fields.input> =>\n S.is(LayoutAction.AddToast.fields.input)(data),\n resolve: ({ subject }) => {\n const layout = context.requestCapability(DeckCapabilities.MutableDeckState);\n layout.toasts.push(subject);\n },\n }),\n createResolver({\n intent: LayoutAction.UpdateLayout,\n // TODO(wittjosiah): This should be able to just be `S.is(LayoutAction.SetLayoutMode.fields.input)`\n // but the filter is not being applied correctly.\n filter: (data): data is S.Schema.Type<typeof LayoutAction.SetLayoutMode.fields.input> => {\n if (!S.is(LayoutAction.SetLayoutMode.fields.input)(data)) {\n return false;\n }\n\n if ('mode' in data.options) {\n return isLayoutMode(data.options.mode);\n }\n\n return true;\n },\n resolve: ({ subject, options }) => {\n const state = context.requestCapability(DeckCapabilities.MutableDeckState);\n\n const setMode = (mode: LayoutMode) => {\n const deck = state.deck;\n const current = deck.solo ? [deck.solo] : deck.active;\n // When un-soloing, the solo entry is added to the deck.\n const next = (\n mode !== 'deck' ? [subject ?? deck.solo ?? deck.active[0]] : [...deck.active, deck.solo]\n ).filter(isNonNullable);\n\n const removed = current.filter((id) => !next.includes(id));\n const closed = Array.from(new Set([...deck.inactive.filter((id) => !next.includes(id)), ...removed]));\n deck.inactive = closed;\n\n if (mode !== 'deck' && next[0]) {\n deck.solo = next[0];\n } else if (mode === 'deck' && deck.solo) {\n deck.solo = undefined;\n deck.initialized = true;\n }\n\n if (mode === 'fullscreen' && !deck.fullscreen) {\n deck.fullscreen = true;\n } else if (mode !== 'fullscreen' && deck.fullscreen) {\n deck.fullscreen = false;\n }\n };\n\n return batch(() => {\n if ('mode' in options) {\n const current = getMode(state.deck);\n if (current !== options.mode) {\n state.previousMode[state.activeDeck] = current;\n }\n setMode(options.mode as LayoutMode);\n } else if ('revert' in options) {\n const last = state.previousMode[state.activeDeck];\n setMode(last ?? 'solo');\n } else {\n log.warn('Invalid layout mode', options);\n }\n });\n },\n }),\n createResolver({\n intent: LayoutAction.UpdateLayout,\n filter: (data): data is S.Schema.Type<typeof LayoutAction.SwitchWorkspace.fields.input> =>\n S.is(LayoutAction.SwitchWorkspace.fields.input)(data),\n resolve: ({ subject }) => {\n const state = context.requestCapability(DeckCapabilities.MutableDeckState);\n batch(() => {\n // TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.\n // Ideally this should be worked into the data model in a generic way.\n if (!state.activeDeck.startsWith('!')) {\n state.previousDeck = state.activeDeck;\n }\n state.activeDeck = subject;\n if (!state.decks[subject]) {\n state.decks[subject] = { initialized: false, active: [], inactive: [], fullscreen: false, plankSizing: {} };\n }\n });\n\n const first = state.deck.solo ? state.deck.solo : state.deck.active[0];\n if (first) {\n return {\n intents: [createIntent(LayoutAction.ScrollIntoView, { part: 'current', subject: first })],\n };\n }\n },\n }),\n createResolver({\n intent: LayoutAction.UpdateLayout,\n filter: (data): data is S.Schema.Type<typeof LayoutAction.RevertWorkspace.fields.input> =>\n S.is(LayoutAction.RevertWorkspace.fields.input)(data),\n resolve: () => {\n const state = context.requestCapability(DeckCapabilities.MutableDeckState);\n return {\n intents: [createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: state.previousDeck })],\n };\n },\n }),\n createResolver({\n intent: LayoutAction.UpdateLayout,\n filter: (data): data is S.Schema.Type<typeof LayoutAction.Open.fields.input> =>\n S.is(LayoutAction.Open.fields.input)(data),\n resolve: ({ subject, options }) => {\n const { graph } = context.requestCapability(Capabilities.AppGraph);\n const state = context.requestCapability(DeckCapabilities.MutableDeckState);\n const attention = context.requestCapability(AttentionCapabilities.Attention);\n const settings = context\n .requestCapabilities(Capabilities.SettingsStore)[0]\n ?.getStore<DeckSettingsProps>(DECK_PLUGIN)?.value;\n\n const previouslyOpenIds = new Set<string>(state.deck.solo ? [state.deck.solo] : state.deck.active);\n batch(() => {\n const next = state.deck.solo\n ? (subject as string[])\n : subject.reduce(\n (acc, entryId) =>\n openEntry(acc, entryId, {\n key: options?.key,\n positioning: options?.positioning ?? settings?.newPlankPositioning,\n pivotId: options?.pivotId,\n }),\n state.deck.active,\n );\n\n return setActive({ next, state, attention });\n });\n\n const ids = state.deck.solo ? [state.deck.solo] : state.deck.active;\n const newlyOpen = ids.filter((i) => !previouslyOpenIds.has(i));\n\n return {\n intents: [\n ...(options?.scrollIntoView !== false\n ? [createIntent(LayoutAction.ScrollIntoView, { part: 'current', subject: newlyOpen[0] ?? subject[0] })]\n : []),\n createIntent(LayoutAction.Expose, { part: 'navigation', subject: newlyOpen[0] ?? subject[0] }),\n ...newlyOpen.map((id) => {\n const active = graph?.findNode(id)?.data;\n const typename = isReactiveObject(active) ? getTypename(active) : undefined;\n return createIntent(ObservabilityAction.SendEvent, {\n name: 'navigation.activate',\n properties: {\n id,\n typename,\n },\n });\n }),\n ],\n };\n },\n }),\n createResolver({\n intent: LayoutAction.UpdateLayout,\n filter: (data): data is S.Schema.Type<typeof LayoutAction.Close.fields.input> =>\n S.is(LayoutAction.Close.fields.input)(data),\n resolve: ({ subject }) => {\n const state = context.requestCapability(DeckCapabilities.MutableDeckState);\n const attention = context.requestCapability(AttentionCapabilities.Attention);\n const active = state.deck.solo ? [state.deck.solo] : state.deck.active;\n const next = subject.reduce((acc, id) => closeEntry(acc, id), active);\n const toAttend = setActive({ next, state, attention });\n return {\n intents: toAttend ? [createIntent(LayoutAction.ScrollIntoView, { part: 'current', subject: toAttend })] : [],\n };\n },\n }),\n createResolver({\n intent: LayoutAction.UpdateLayout,\n filter: (data): data is S.Schema.Type<typeof LayoutAction.Set.fields.input> =>\n S.is(LayoutAction.Set.fields.input)(data),\n resolve: ({ subject }) => {\n const state = context.requestCapability(DeckCapabilities.MutableDeckState);\n const attention = context.requestCapability(AttentionCapabilities.Attention);\n const toAttend = setActive({ next: subject as string[], state, attention });\n return {\n intents: toAttend ? [createIntent(LayoutAction.ScrollIntoView, { part: 'current', subject: toAttend })] : [],\n };\n },\n }),\n createResolver({\n intent: LayoutAction.UpdateLayout,\n filter: (data): data is S.Schema.Type<typeof LayoutAction.ScrollIntoView.fields.input> =>\n S.is(LayoutAction.ScrollIntoView.fields.input)(data),\n resolve: ({ subject }) => {\n const layout = context.requestCapability(DeckCapabilities.MutableDeckState);\n layout.scrollIntoView = subject;\n },\n }),\n createResolver({\n intent: DeckAction.UpdatePlankSize,\n resolve: (data) => {\n const state = context.requestCapability(DeckCapabilities.MutableDeckState);\n state.deck.plankSizing[data.id] = data.size;\n },\n }),\n createResolver({\n intent: DeckAction.Adjust,\n resolve: (adjustment) => {\n const state = context.requestCapability(DeckCapabilities.MutableDeckState);\n const attention = context.requestCapability(AttentionCapabilities.Attention);\n\n return batch(() => {\n if (adjustment.type === 'increment-end' || adjustment.type === 'increment-start') {\n setActive({\n next: incrementPlank(state.deck.active, adjustment),\n state,\n attention,\n });\n }\n\n if (adjustment.type === 'solo') {\n const entryId = adjustment.id;\n if (!state.deck.solo) {\n // Solo the entry.\n return {\n intents: [\n createIntent(LayoutAction.SetLayoutMode, {\n part: 'mode',\n subject: entryId,\n options: { mode: 'solo' },\n }),\n ],\n };\n } else {\n // Un-solo the current entry.\n return {\n intents: [\n // NOTE: The order of these is important.\n pipe(\n createIntent(LayoutAction.SetLayoutMode, { part: 'mode', options: { mode: 'deck' } }),\n chain(LayoutAction.Open, { part: 'main', subject: [entryId] }),\n ),\n ],\n };\n }\n }\n });\n },\n }),\n ]);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { produce } from 'immer';\n\nimport { type DeckAction, type NewPlankPositioning } from './types';\n\ntype OpenLayoutEntryOptions = { key?: string; positioning?: NewPlankPositioning; pivotId?: string };\n\nexport const openEntry = (deck: string[], entryId: string, options?: OpenLayoutEntryOptions): string[] => {\n return produce(deck, (draft) => {\n // Check that the entry is not already in the part\n if (draft.find((id) => id === entryId)) {\n return;\n }\n\n const key = options?.key;\n const plankPositioning = options?.positioning ?? 'start';\n const pivotId = options?.pivotId;\n\n if (key) {\n const index = draft.findIndex((id) => id.split('+')[0] === key);\n if (index !== -1) {\n draft.splice(index, 1, entryId);\n return;\n }\n }\n\n if (pivotId) {\n const pivotIndex = draft.findIndex((id) => id === pivotId);\n if (pivotIndex !== -1) {\n if (plankPositioning === 'start') {\n draft.splice(pivotIndex, 0, entryId);\n } else {\n draft.splice(pivotIndex + 1, 0, entryId);\n }\n return;\n }\n }\n\n // If no pivot found or provided, fall back to original behavior\n if (plankPositioning === 'start') {\n draft.unshift(entryId);\n } else {\n draft.push(entryId);\n }\n });\n};\n\nexport const closeEntry = (deck: string[], entryId: string): string[] => {\n return produce(deck, (draft) => {\n const index = draft.findIndex((id) => id === entryId);\n if (index !== -1) {\n draft.splice(index, 1);\n }\n });\n};\n\nexport const incrementPlank = (deck: string[], adjustment: DeckAction.Adjustment): string[] => {\n return produce(deck, (draft) => {\n const index = draft.findIndex((id) => id === adjustment.id);\n if (\n index === -1 ||\n (adjustment.type === 'increment-start' && index === 0) ||\n (adjustment.type === 'increment-end' && index === draft.length - 1)\n ) {\n return;\n }\n\n if (adjustment.type === 'increment-start') {\n // Swap the current item with the previous item.\n [draft[index - 1], draft[index]] = [draft[index], draft[index - 1]];\n } else if (adjustment.type === 'increment-end') {\n // Swap the current item with the next item.\n [draft[index], draft[index + 1]] = [draft[index + 1], draft[index]];\n }\n });\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAIA,SAASA,aAAa;AACtB,SAASC,YAAY;AAErB,SACEC,cACAC,gBACAC,aACAC,cACAC,cAEAC,cACAC,aACK;AACP,SAASC,aAAaC,SAAS;AAC/B,SAASC,wBAAwB;AACjC,SAASC,WAAW;AACpB,SAASC,6BAA6B;AACtC,SAASC,2BAA2B;AACpC,SAASC,qBAAqB;;;AClB9B,SAASC,eAAe;AAMjB,IAAMC,YAAY,CAACC,MAAgBC,SAAiBC,YAAAA;AACzD,SAAOC,QAAQH,MAAM,CAACI,UAAAA;AAEpB,QAAIA,MAAMC,KAAK,CAACC,OAAOA,OAAOL,OAAAA,GAAU;AACtC;IACF;AAEA,UAAMM,MAAML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,aAAauE,MAAM;kBAAEF,MAAM;kBAAQzD,SAAS;oBAACyE;;gBAAS,CAAA,CAAA;;YAGlE;UACF;QACF;MACF,CAAA;IACF;EACF,CAAA;CACD;",
|
|
6
|
+
"names": ["batch", "pipe", "Capabilities", "createResolver", "contributes", "IntentAction", "LayoutAction", "createIntent", "chain", "getTypename", "S", "isReactiveObject", "log", "AttentionCapabilities", "ObservabilityAction", "isNonNullable", "produce", "openEntry", "deck", "entryId", "options", "produce", "draft", "find", "id", "key", "plankPositioning", "positioning", "pivotId", "index", "findIndex", "split", "splice", "pivotIndex", "unshift", "push", "closeEntry", "incrementPlank", "adjustment", "type", "length", "context", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "IntentAction", "ShowUndo", "resolve", "data", "layout", "requestCapability", "DeckCapabilities", "MutableDeckState", "undoPromise", "undo", "IntentDispatcher", "currentUndoId", "toasts", "filter", "toast", "id", "_tag", "Date", "now", "title", "message", "ns", "DECK_PLUGIN", "duration", "actionLabel", "actionAlt", "closeLabel", "onAction", "LayoutAction", "UpdateLayout", "S", "is", "UpdateSidebar", "fields", "input", "options", "next", "state", "sidebarState", "UpdateComplementary", "subject", "complementarySidebarPanel", "complementarySidebarState", "UpdateDialog", "dialogOpen", "Boolean", "dialogContent", "component", "props", "dialogBlockAlign", "blockAlign", "dialogType", "type", "UpdatePopover", "popoverOpen", "popoverContent", "popoverAnchorId", "anchorId", "popoverSide", "side", "AddToast", "push", "SetLayoutMode", "isLayoutMode", "mode", "setMode", "deck", "current", "solo", "active", "isNonNullable", "removed", "includes", "closed", "Array", "from", "Set", "inactive", "undefined", "initialized", "fullscreen", "batch", "getMode", "previousMode", "activeDeck", "last", "log", "warn", "SwitchWorkspace", "startsWith", "previousDeck", "decks", "plankSizing", "first", "intents", "createIntent", "ScrollIntoView", "part", "RevertWorkspace", "Open", "graph", "AppGraph", "attention", "AttentionCapabilities", "Attention", "settings", "requestCapabilities", "SettingsStore", "getStore", "value", "previouslyOpenIds", "reduce", "acc", "entryId", "openEntry", "key", "positioning", "newPlankPositioning", "pivotId", "setActive", "ids", "newlyOpen", "i", "has", "scrollIntoView", "Expose", "map", "findNode", "typename", "isReactiveObject", "getTypename", "ObservabilityAction", "SendEvent", "name", "properties", "Close", "closeEntry", "toAttend", "DeckAction", "UpdatePlankSize", "size", "Adjust", "adjustment", "incrementPlank", "pipe", "chain"]
|
|
7
|
+
}
|