@dxos/plugin-deck 0.8.2-main.5885341 → 0.8.2-main.5ca3450
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/{chunk-RDFJGGGX.mjs → chunk-AHTP72DY.mjs} +3 -3
- package/dist/lib/browser/chunk-E7TOEOGO.mjs +157 -0
- package/dist/lib/browser/chunk-E7TOEOGO.mjs.map +7 -0
- package/dist/lib/browser/{chunk-6HJZL3WT.mjs → chunk-PGSJT5PG.mjs} +2 -2
- package/dist/lib/browser/{chunk-RBJ6DLAC.mjs → chunk-RKYIMUKW.mjs} +8 -8
- package/dist/lib/browser/index.mjs +3 -3
- package/dist/lib/browser/{intent-resolver-JKWXWUV6.mjs → intent-resolver-NO6L67KF.mjs} +23 -23
- package/dist/lib/browser/intent-resolver-NO6L67KF.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-S6ZAKNZA.mjs → react-root-5RWCIUXV.mjs} +5 -5
- package/dist/lib/browser/{react-surface-I7WZBOGM.mjs → react-surface-DIDOPTH7.mjs} +5 -5
- package/dist/lib/browser/{settings-6NU7CF2B.mjs → settings-C7LX2GXF.mjs} +2 -2
- package/dist/lib/browser/{state-Z6UY2Z3M.mjs → state-AX74YEJD.mjs} +2 -2
- package/dist/lib/browser/{tools-VDVQTJMD.mjs → tools-7W7KZRAX.mjs} +7 -7
- package/dist/lib/browser/tools-7W7KZRAX.mjs.map +7 -0
- package/dist/lib/browser/types.mjs +1 -1
- package/dist/lib/browser/{url-handler-3CARFXQK.mjs → url-handler-AF5SYROZ.mjs} +2 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/check-app-scheme.d.ts.map +1 -1
- 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/tools.d.ts.map +1 -1
- package/dist/types/src/capabilities/url-handler.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Banner.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Popover.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/StatusBar.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
- package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +1 -1
- package/dist/types/src/components/Plank/Plank.d.ts.map +1 -1
- package/dist/types/src/components/Plank/PlankError.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/SidebarButton.d.ts.map +1 -1
- package/dist/types/src/hooks/useNodeActionExpander.d.ts.map +1 -1
- package/dist/types/src/layout.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +104 -104
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/src/util/layoutAppliesTopbar.d.ts.map +1 -1
- package/dist/types/src/util/overscroll.d.ts.map +1 -1
- package/dist/types/src/util/set-active.d.ts.map +1 -1
- package/dist/types/src/util/useCompanions.d.ts.map +1 -1
- package/dist/types/src/util/useHoistStatusbar.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +29 -28
- package/src/capabilities/intent-resolver.ts +32 -32
- package/src/capabilities/tools.ts +4 -3
- package/src/types.ts +72 -71
- package/dist/lib/browser/chunk-ZMJMCN7O.mjs +0 -157
- package/dist/lib/browser/chunk-ZMJMCN7O.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-JKWXWUV6.mjs.map +0 -7
- package/dist/lib/browser/tools-VDVQTJMD.mjs.map +0 -7
- /package/dist/lib/browser/{chunk-RDFJGGGX.mjs.map → chunk-AHTP72DY.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-6HJZL3WT.mjs.map → chunk-PGSJT5PG.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-RBJ6DLAC.mjs.map → chunk-RKYIMUKW.mjs.map} +0 -0
- /package/dist/lib/browser/{react-root-S6ZAKNZA.mjs.map → react-root-5RWCIUXV.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-I7WZBOGM.mjs.map → react-surface-DIDOPTH7.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-6NU7CF2B.mjs.map → settings-C7LX2GXF.mjs.map} +0 -0
- /package/dist/lib/browser/{state-Z6UY2Z3M.mjs.map → state-AX74YEJD.mjs.map} +0 -0
- /package/dist/lib/browser/{url-handler-3CARFXQK.mjs.map → url-handler-AF5SYROZ.mjs.map} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
useBreakpoints,
|
|
8
8
|
useCompanions,
|
|
9
9
|
useHoistStatusbar
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PGSJT5PG.mjs";
|
|
11
11
|
import {
|
|
12
12
|
DeckCapabilities
|
|
13
13
|
} from "./chunk-XMCG42ID.mjs";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
OverscrollOptions,
|
|
20
20
|
PLANK_COMPANION_TYPE,
|
|
21
21
|
getMode
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-E7TOEOGO.mjs";
|
|
23
23
|
import {
|
|
24
24
|
DECK_PLUGIN
|
|
25
25
|
} from "./chunk-NSATFAEE.mjs";
|
|
@@ -1331,4 +1331,4 @@ export {
|
|
|
1331
1331
|
DeckLayout,
|
|
1332
1332
|
DeckSettings
|
|
1333
1333
|
};
|
|
1334
|
-
//# sourceMappingURL=chunk-
|
|
1334
|
+
//# sourceMappingURL=chunk-AHTP72DY.mjs.map
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DECK_PLUGIN
|
|
3
|
+
} from "./chunk-NSATFAEE.mjs";
|
|
4
|
+
|
|
5
|
+
// packages/plugins/plugin-deck/src/types.ts
|
|
6
|
+
import { Schema } from "effect";
|
|
7
|
+
import { LayoutAction } from "@dxos/app-framework";
|
|
8
|
+
import { ATTENDABLE_PATH_SEPARATOR } from "@dxos/react-ui-attention";
|
|
9
|
+
var PLANK_COMPANION_TYPE = "dxos.org/plugin/deck/plank-companion";
|
|
10
|
+
var DECK_COMPANION_TYPE = "dxos.org/plugin/deck/deck-companion";
|
|
11
|
+
var NewPlankPositions = [
|
|
12
|
+
"start",
|
|
13
|
+
"end"
|
|
14
|
+
];
|
|
15
|
+
var OverscrollOptions = [
|
|
16
|
+
"none",
|
|
17
|
+
"centering"
|
|
18
|
+
];
|
|
19
|
+
var DeckSettingsSchema = Schema.Struct({
|
|
20
|
+
showHints: Schema.optional(Schema.Boolean),
|
|
21
|
+
enableDeck: Schema.optional(Schema.Boolean),
|
|
22
|
+
enableNativeRedirect: Schema.optional(Schema.Boolean),
|
|
23
|
+
enableStatusbar: Schema.optional(Schema.Boolean),
|
|
24
|
+
newPlankPositioning: Schema.optional(Schema.Literal(...NewPlankPositions)),
|
|
25
|
+
overscroll: Schema.optional(Schema.Literal(...OverscrollOptions))
|
|
26
|
+
}).pipe(Schema.mutable);
|
|
27
|
+
var PlankSizing = Schema.Record({
|
|
28
|
+
key: Schema.String,
|
|
29
|
+
value: Schema.Number
|
|
30
|
+
});
|
|
31
|
+
var DeckState = Schema.Struct({
|
|
32
|
+
/** If false, the deck has not yet left solo mode and new planks should be soloed. */
|
|
33
|
+
initialized: Schema.Boolean,
|
|
34
|
+
active: Schema.mutable(Schema.Array(Schema.String)),
|
|
35
|
+
// TODO(wittjosiah): Piping into both mutable and optional caused invalid typescript output.
|
|
36
|
+
activeCompanions: Schema.optional(Schema.mutable(Schema.Record({
|
|
37
|
+
key: Schema.String,
|
|
38
|
+
value: Schema.String
|
|
39
|
+
}))),
|
|
40
|
+
inactive: Schema.mutable(Schema.Array(Schema.String)),
|
|
41
|
+
solo: Schema.optional(Schema.String),
|
|
42
|
+
fullscreen: Schema.Boolean,
|
|
43
|
+
plankSizing: Schema.mutable(PlankSizing),
|
|
44
|
+
companionFrameSizing: Schema.mutable(PlankSizing)
|
|
45
|
+
});
|
|
46
|
+
var defaultDeck = {
|
|
47
|
+
initialized: false,
|
|
48
|
+
active: [],
|
|
49
|
+
activeCompanions: {},
|
|
50
|
+
inactive: [],
|
|
51
|
+
solo: void 0,
|
|
52
|
+
fullscreen: false,
|
|
53
|
+
plankSizing: {},
|
|
54
|
+
companionFrameSizing: {}
|
|
55
|
+
};
|
|
56
|
+
var LayoutMode = Schema.Literal("deck", "solo", "solo--fullscreen");
|
|
57
|
+
var isLayoutMode = (value) => Schema.is(LayoutMode)(value);
|
|
58
|
+
var getMode = (deck) => {
|
|
59
|
+
if (deck.solo) {
|
|
60
|
+
return deck.fullscreen ? "solo--fullscreen" : "solo";
|
|
61
|
+
}
|
|
62
|
+
return "deck";
|
|
63
|
+
};
|
|
64
|
+
var DeckPluginState = Schema.Struct({
|
|
65
|
+
sidebarState: Schema.Literal("closed", "collapsed", "expanded"),
|
|
66
|
+
complementarySidebarState: Schema.Literal("closed", "collapsed", "expanded"),
|
|
67
|
+
complementarySidebarPanel: Schema.optional(Schema.String),
|
|
68
|
+
dialogOpen: Schema.Boolean,
|
|
69
|
+
dialogBlockAlign: Schema.optional(Schema.Literal("start", "center", "end")),
|
|
70
|
+
dialogType: Schema.optional(Schema.Literal("default", "alert")),
|
|
71
|
+
/** Data to be passed to the dialog Surface. */
|
|
72
|
+
dialogContent: Schema.optional(Schema.Any),
|
|
73
|
+
popoverOpen: Schema.Boolean,
|
|
74
|
+
popoverSide: Schema.optional(Schema.Literal("top", "right", "bottom", "left")),
|
|
75
|
+
popoverAnchor: Schema.optional(Schema.Any),
|
|
76
|
+
popoverAnchorId: Schema.optional(Schema.String),
|
|
77
|
+
/** Data to be passed to the popover Surface. */
|
|
78
|
+
popoverContent: Schema.optional(Schema.Any),
|
|
79
|
+
toasts: Schema.mutable(Schema.Array(LayoutAction.Toast)),
|
|
80
|
+
currentUndoId: Schema.optional(Schema.String),
|
|
81
|
+
activeDeck: Schema.String,
|
|
82
|
+
previousDeck: Schema.String,
|
|
83
|
+
decks: Schema.mutable(Schema.Record({
|
|
84
|
+
key: Schema.String,
|
|
85
|
+
value: Schema.mutable(DeckState)
|
|
86
|
+
})),
|
|
87
|
+
previousMode: Schema.mutable(Schema.Record({
|
|
88
|
+
key: Schema.String,
|
|
89
|
+
value: LayoutMode
|
|
90
|
+
})),
|
|
91
|
+
deck: Schema.mutable(DeckState),
|
|
92
|
+
/** The identifier of a component to scroll into view when it is mounted. */
|
|
93
|
+
scrollIntoView: Schema.optional(Schema.String)
|
|
94
|
+
}).pipe(Schema.mutable);
|
|
95
|
+
var DECK_ACTION = `${DECK_PLUGIN}/action`;
|
|
96
|
+
var DeckAction;
|
|
97
|
+
(function(DeckAction2) {
|
|
98
|
+
const PartAdjustmentSchema = Schema.Union(Schema.Literal("close").annotations({
|
|
99
|
+
description: "Close the plank."
|
|
100
|
+
}), Schema.Literal("companion").annotations({
|
|
101
|
+
description: "Open the companion plank."
|
|
102
|
+
}), Schema.Literal("solo").annotations({
|
|
103
|
+
description: "Solo the plank."
|
|
104
|
+
}), Schema.Literal("solo--fullscreen").annotations({
|
|
105
|
+
description: "Fullscreen the plank."
|
|
106
|
+
}), Schema.Literal("increment-start").annotations({
|
|
107
|
+
description: "Move the plank towards the start of the deck."
|
|
108
|
+
}), Schema.Literal("increment-end").annotations({
|
|
109
|
+
description: "Move the plank towards the end of the deck."
|
|
110
|
+
}));
|
|
111
|
+
DeckAction2.Adjustment = Schema.mutable(Schema.Struct({
|
|
112
|
+
id: Schema.String,
|
|
113
|
+
type: PartAdjustmentSchema
|
|
114
|
+
}));
|
|
115
|
+
class Adjust extends Schema.TaggedClass()(`${DECK_ACTION}/adjust`, {
|
|
116
|
+
input: DeckAction2.Adjustment,
|
|
117
|
+
output: Schema.Void
|
|
118
|
+
}) {
|
|
119
|
+
}
|
|
120
|
+
DeckAction2.Adjust = Adjust;
|
|
121
|
+
class UpdatePlankSize extends Schema.TaggedClass()(`${DECK_ACTION}/update-plank-size`, {
|
|
122
|
+
input: Schema.Struct({
|
|
123
|
+
id: Schema.String,
|
|
124
|
+
size: Schema.Number
|
|
125
|
+
}),
|
|
126
|
+
output: Schema.Void
|
|
127
|
+
}) {
|
|
128
|
+
}
|
|
129
|
+
DeckAction2.UpdatePlankSize = UpdatePlankSize;
|
|
130
|
+
class ChangeCompanion extends Schema.TaggedClass()(`${DECK_ACTION}/change-companion`, {
|
|
131
|
+
input: Schema.Struct({
|
|
132
|
+
primary: Schema.String,
|
|
133
|
+
companion: Schema.Union(Schema.String, Schema.Null)
|
|
134
|
+
}),
|
|
135
|
+
output: Schema.Void
|
|
136
|
+
}) {
|
|
137
|
+
}
|
|
138
|
+
DeckAction2.ChangeCompanion = ChangeCompanion;
|
|
139
|
+
})(DeckAction || (DeckAction = {}));
|
|
140
|
+
|
|
141
|
+
export {
|
|
142
|
+
PLANK_COMPANION_TYPE,
|
|
143
|
+
DECK_COMPANION_TYPE,
|
|
144
|
+
NewPlankPositions,
|
|
145
|
+
OverscrollOptions,
|
|
146
|
+
DeckSettingsSchema,
|
|
147
|
+
PlankSizing,
|
|
148
|
+
DeckState,
|
|
149
|
+
defaultDeck,
|
|
150
|
+
isLayoutMode,
|
|
151
|
+
getMode,
|
|
152
|
+
DeckPluginState,
|
|
153
|
+
DECK_ACTION,
|
|
154
|
+
DeckAction,
|
|
155
|
+
ATTENDABLE_PATH_SEPARATOR
|
|
156
|
+
};
|
|
157
|
+
//# sourceMappingURL=chunk-E7TOEOGO.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { LayoutAction } from '@dxos/app-framework';\nimport { type DeepReadonly } from '@dxos/util';\n\nimport { DECK_PLUGIN } from './meta';\n\nexport { ATTENDABLE_PATH_SEPARATOR } from '@dxos/react-ui-attention';\n\nexport const PLANK_COMPANION_TYPE = 'dxos.org/plugin/deck/plank-companion';\nexport const DECK_COMPANION_TYPE = 'dxos.org/plugin/deck/deck-companion';\n\n// TODO(Zan): In the future we should consider adding new planks adjacent to the attended plank.\nexport const NewPlankPositions = ['start', 'end'] as const;\nexport type NewPlankPositioning = (typeof NewPlankPositions)[number];\n\nexport const OverscrollOptions = ['none', 'centering'] as const;\nexport type Overscroll = (typeof OverscrollOptions)[number];\n\nexport type Part = 'solo' | 'deck' | 'complementary';\nexport type ResolvedPart = Part | 'solo-primary' | 'solo-companion';\n\nexport const DeckSettingsSchema = Schema.Struct({\n showHints: Schema.optional(Schema.Boolean),\n enableDeck: Schema.optional(Schema.Boolean),\n enableNativeRedirect: Schema.optional(Schema.Boolean),\n enableStatusbar: Schema.optional(Schema.Boolean),\n newPlankPositioning: Schema.optional(Schema.Literal(...NewPlankPositions)),\n overscroll: Schema.optional(Schema.Literal(...OverscrollOptions)),\n}).pipe(Schema.mutable);\nexport type DeckSettingsProps = Schema.Schema.Type<typeof DeckSettingsSchema>;\n\nexport const PlankSizing = Schema.Record({ key: Schema.String, value: Schema.Number });\nexport type PlankSizing = Schema.Schema.Type<typeof PlankSizing>;\n\n// State of an individual deck.\nexport const DeckState = Schema.Struct({\n /** If false, the deck has not yet left solo mode and new planks should be soloed. */\n initialized: Schema.Boolean,\n active: Schema.mutable(Schema.Array(Schema.String)),\n // TODO(wittjosiah): Piping into both mutable and optional caused invalid typescript output.\n activeCompanions: Schema.optional(Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.String }))),\n inactive: Schema.mutable(Schema.Array(Schema.String)),\n solo: Schema.optional(Schema.String),\n fullscreen: Schema.Boolean,\n plankSizing: Schema.mutable(PlankSizing),\n companionFrameSizing: Schema.mutable(PlankSizing),\n});\nexport type DeckState = Schema.Schema.Type<typeof DeckState>;\n\nexport const defaultDeck: DeckState = {\n initialized: false,\n active: [],\n activeCompanions: {},\n inactive: [],\n solo: undefined,\n fullscreen: false,\n plankSizing: {},\n companionFrameSizing: {},\n};\n\nconst LayoutMode = Schema.Literal('deck', 'solo', 'solo--fullscreen');\nexport type LayoutMode = Schema.Schema.Type<typeof LayoutMode>;\nexport const isLayoutMode = (value: any): value is LayoutMode => Schema.is(LayoutMode)(value);\n\nexport const getMode = (deck: DeckState | DeepReadonly<DeckState>): LayoutMode => {\n if (deck.solo) {\n return deck.fullscreen ? 'solo--fullscreen' : 'solo';\n }\n\n return 'deck';\n};\n\n// State of the deck plugin.\nexport const DeckPluginState = Schema.Struct({\n sidebarState: Schema.Literal('closed', 'collapsed', 'expanded'),\n complementarySidebarState: Schema.Literal('closed', 'collapsed', 'expanded'),\n complementarySidebarPanel: Schema.optional(Schema.String),\n\n dialogOpen: Schema.Boolean,\n dialogBlockAlign: Schema.optional(Schema.Literal('start', 'center', 'end')),\n dialogType: Schema.optional(Schema.Literal('default', 'alert')),\n /** Data to be passed to the dialog Surface. */\n dialogContent: Schema.optional(Schema.Any),\n\n popoverOpen: Schema.Boolean,\n popoverSide: Schema.optional(Schema.Literal('top', 'right', 'bottom', 'left')),\n popoverAnchor: Schema.optional(Schema.Any),\n popoverAnchorId: Schema.optional(Schema.String),\n /** Data to be passed to the popover Surface. */\n popoverContent: Schema.optional(Schema.Any),\n\n toasts: Schema.mutable(Schema.Array(LayoutAction.Toast)),\n currentUndoId: Schema.optional(Schema.String),\n\n activeDeck: Schema.String,\n previousDeck: Schema.String,\n decks: Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.mutable(DeckState) })),\n previousMode: Schema.mutable(Schema.Record({ key: Schema.String, value: LayoutMode })),\n deck: Schema.mutable(DeckState),\n\n /** The identifier of a component to scroll into view when it is mounted. */\n scrollIntoView: Schema.optional(Schema.String),\n}).pipe(Schema.mutable);\n\nexport type DeckPluginState = Schema.Schema.Type<typeof DeckPluginState>;\n\nexport const DECK_ACTION = `${DECK_PLUGIN}/action`;\n\nexport namespace DeckAction {\n const PartAdjustmentSchema = Schema.Union(\n Schema.Literal('close').annotations({ description: 'Close the plank.' }),\n Schema.Literal('companion').annotations({ description: 'Open the companion plank.' }),\n Schema.Literal('solo').annotations({ description: 'Solo the plank.' }),\n Schema.Literal('solo--fullscreen').annotations({ description: 'Fullscreen the plank.' }),\n Schema.Literal('increment-start').annotations({ description: 'Move the plank towards the start of the deck.' }),\n Schema.Literal('increment-end').annotations({ description: 'Move the plank towards the end of the deck.' }),\n );\n export type PartAdjustment = Schema.Schema.Type<typeof PartAdjustmentSchema>;\n export const Adjustment = Schema.mutable(Schema.Struct({ id: Schema.String, type: PartAdjustmentSchema }));\n export type Adjustment = Schema.Schema.Type<typeof Adjustment>;\n\n // An atomic transaction to apply to the deck, describing which element to move to which location.\n export class Adjust extends Schema.TaggedClass<Adjust>()(`${DECK_ACTION}/adjust`, {\n input: Adjustment,\n output: Schema.Void,\n }) {}\n\n export class UpdatePlankSize extends Schema.TaggedClass<UpdatePlankSize>()(`${DECK_ACTION}/update-plank-size`, {\n input: Schema.Struct({\n id: Schema.String,\n size: Schema.Number,\n }),\n output: Schema.Void,\n }) {}\n\n export class ChangeCompanion extends Schema.TaggedClass<ChangeCompanion>()(`${DECK_ACTION}/change-companion`, {\n input: Schema.Struct({\n primary: Schema.String,\n companion: Schema.Union(Schema.String, Schema.Null),\n }),\n output: Schema.Void,\n }) {}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,SAASA,cAAc;AAEvB,SAASC,oBAAoB;AAK7B,SAASC,iCAAiC;AAEnC,IAAMC,uBAAuB;AAC7B,IAAMC,sBAAsB;AAG5B,IAAMC,oBAAoB;EAAC;EAAS;;AAGpC,IAAMC,oBAAoB;EAAC;EAAQ;;AAMnC,IAAMC,qBAAqBC,OAAOC,OAAO;EAC9CC,WAAWF,OAAOG,SAASH,OAAOI,OAAO;EACzCC,YAAYL,OAAOG,SAASH,OAAOI,OAAO;EAC1CE,sBAAsBN,OAAOG,SAASH,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"ATTENDABLE_PATH_SEPARATOR", "PLANK_COMPANION_TYPE", "DECK_COMPANION_TYPE", "NewPlankPositions", "OverscrollOptions", "DeckSettingsSchema", "Schema", "Struct", "showHints", "optional", "Boolean", "enableDeck", "enableNativeRedirect", "enableStatusbar", "newPlankPositioning", "Literal", "overscroll", "pipe", "mutable", "PlankSizing", "Record", "key", "String", "value", "Number", "DeckState", "initialized", "active", "Array", "activeCompanions", "inactive", "solo", "fullscreen", "plankSizing", "companionFrameSizing", "defaultDeck", "undefined", "LayoutMode", "isLayoutMode", "is", "getMode", "deck", "DeckPluginState", "sidebarState", "complementarySidebarState", "complementarySidebarPanel", "dialogOpen", "dialogBlockAlign", "dialogType", "dialogContent", "Any", "popoverOpen", "popoverSide", "popoverAnchor", "popoverAnchorId", "popoverContent", "toasts", "LayoutAction", "Toast", "currentUndoId", "activeDeck", "previousDeck", "decks", "previousMode", "scrollIntoView", "DECK_ACTION", "DECK_PLUGIN", "DeckAction", "PartAdjustmentSchema", "Union", "annotations", "description", "Adjustment", "id", "type", "Adjust", "TaggedClass", "input", "output", "Void", "UpdatePlankSize", "size", "ChangeCompanion", "primary", "companion", "Null"]
|
|
7
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PLANK_COMPANION_TYPE
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E7TOEOGO.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DECK_PLUGIN
|
|
6
6
|
} from "./chunk-NSATFAEE.mjs";
|
|
@@ -115,4 +115,4 @@ export {
|
|
|
115
115
|
useHoistStatusbar,
|
|
116
116
|
useCompanions
|
|
117
117
|
};
|
|
118
|
-
//# sourceMappingURL=chunk-
|
|
118
|
+
//# sourceMappingURL=chunk-PGSJT5PG.mjs.map
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { lazy } from "@dxos/app-framework";
|
|
3
3
|
var AppGraphBuilder = lazy(() => import("./app-graph-builder-VYZ4IWI3.mjs"));
|
|
4
4
|
var CheckAppScheme = lazy(() => import("./check-app-scheme-O7JPE4TM.mjs"));
|
|
5
|
-
var DeckSettings = lazy(() => import("./settings-
|
|
6
|
-
var DeckState = lazy(() => import("./state-
|
|
7
|
-
var LayoutIntentResolver = lazy(() => import("./intent-resolver-
|
|
8
|
-
var ReactRoot = lazy(() => import("./react-root-
|
|
9
|
-
var ReactSurface = lazy(() => import("./react-surface-
|
|
10
|
-
var Tools = lazy(() => import("./tools-
|
|
11
|
-
var UrlHandler = lazy(() => import("./url-handler-
|
|
5
|
+
var DeckSettings = lazy(() => import("./settings-C7LX2GXF.mjs"));
|
|
6
|
+
var DeckState = lazy(() => import("./state-AX74YEJD.mjs"));
|
|
7
|
+
var LayoutIntentResolver = lazy(() => import("./intent-resolver-NO6L67KF.mjs"));
|
|
8
|
+
var ReactRoot = lazy(() => import("./react-root-5RWCIUXV.mjs"));
|
|
9
|
+
var ReactSurface = lazy(() => import("./react-surface-DIDOPTH7.mjs"));
|
|
10
|
+
var Tools = lazy(() => import("./tools-7W7KZRAX.mjs"));
|
|
11
|
+
var UrlHandler = lazy(() => import("./url-handler-AF5SYROZ.mjs"));
|
|
12
12
|
|
|
13
13
|
export {
|
|
14
14
|
AppGraphBuilder,
|
|
@@ -21,4 +21,4 @@ export {
|
|
|
21
21
|
Tools,
|
|
22
22
|
UrlHandler
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=chunk-
|
|
24
|
+
//# sourceMappingURL=chunk-RKYIMUKW.mjs.map
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
ReactSurface,
|
|
9
9
|
Tools,
|
|
10
10
|
UrlHandler
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RKYIMUKW.mjs";
|
|
12
12
|
import {
|
|
13
13
|
useCompanions
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-PGSJT5PG.mjs";
|
|
15
15
|
import {
|
|
16
16
|
DeckCapabilities
|
|
17
17
|
} from "./chunk-XMCG42ID.mjs";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-E7TOEOGO.mjs";
|
|
19
19
|
import {
|
|
20
20
|
DECK_PLUGIN,
|
|
21
21
|
meta
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-FLOVGNYB.mjs";
|
|
7
7
|
import {
|
|
8
8
|
setActive
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PGSJT5PG.mjs";
|
|
10
10
|
import {
|
|
11
11
|
DeckCapabilities
|
|
12
12
|
} from "./chunk-XMCG42ID.mjs";
|
|
@@ -16,16 +16,16 @@ import {
|
|
|
16
16
|
defaultDeck,
|
|
17
17
|
getMode,
|
|
18
18
|
isLayoutMode
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-E7TOEOGO.mjs";
|
|
20
20
|
import {
|
|
21
21
|
DECK_PLUGIN
|
|
22
22
|
} from "./chunk-NSATFAEE.mjs";
|
|
23
23
|
|
|
24
24
|
// packages/plugins/plugin-deck/src/capabilities/intent-resolver.ts
|
|
25
25
|
import { batch } from "@preact/signals-core";
|
|
26
|
-
import { Effect, pipe } from "effect";
|
|
26
|
+
import { Schema, Effect, pipe } from "effect";
|
|
27
27
|
import { Capabilities, createResolver, contributes, IntentAction, LayoutAction, createIntent, chain } from "@dxos/app-framework";
|
|
28
|
-
import { getTypename
|
|
28
|
+
import { getTypename } from "@dxos/echo-schema";
|
|
29
29
|
import { invariant } from "@dxos/invariant";
|
|
30
30
|
import { isLiveObject } from "@dxos/live-object";
|
|
31
31
|
import { log } from "@dxos/log";
|
|
@@ -79,9 +79,9 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
79
79
|
}),
|
|
80
80
|
createResolver({
|
|
81
81
|
intent: LayoutAction.UpdateLayout,
|
|
82
|
-
// TODO(wittjosiah): This should be able to just be `
|
|
82
|
+
// TODO(wittjosiah): This should be able to just be `Schema.is(LayoutAction.UpdateSidebar.fields.input)`
|
|
83
83
|
// but the filter is not being applied correctly.
|
|
84
|
-
filter: (data) =>
|
|
84
|
+
filter: (data) => Schema.is(LayoutAction.UpdateSidebar.fields.input)(data),
|
|
85
85
|
resolve: ({ options }) => {
|
|
86
86
|
const layout = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
87
87
|
const next = options?.state ?? layout.sidebarState;
|
|
@@ -92,9 +92,9 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
92
92
|
}),
|
|
93
93
|
createResolver({
|
|
94
94
|
intent: LayoutAction.UpdateLayout,
|
|
95
|
-
// TODO(wittjosiah): This should be able to just be `
|
|
95
|
+
// TODO(wittjosiah): This should be able to just be `Schema.is(LayoutAction.UpdateComplementary.fields.input)`
|
|
96
96
|
// but the filter is not being applied correctly.
|
|
97
|
-
filter: (data) =>
|
|
97
|
+
filter: (data) => Schema.is(LayoutAction.UpdateComplementary.fields.input)(data),
|
|
98
98
|
resolve: ({ subject, options }) => {
|
|
99
99
|
const layout = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
100
100
|
if (layout.complementarySidebarPanel !== subject) {
|
|
@@ -108,9 +108,9 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
108
108
|
}),
|
|
109
109
|
createResolver({
|
|
110
110
|
intent: LayoutAction.UpdateLayout,
|
|
111
|
-
// TODO(wittjosiah): This should be able to just be `
|
|
111
|
+
// TODO(wittjosiah): This should be able to just be `Schema.is(LayoutAction.UpdateDialog.fields.input)`
|
|
112
112
|
// but the filter is not being applied correctly.
|
|
113
|
-
filter: (data) =>
|
|
113
|
+
filter: (data) => Schema.is(LayoutAction.UpdateDialog.fields.input)(data),
|
|
114
114
|
resolve: ({ subject, options }) => {
|
|
115
115
|
const layout = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
116
116
|
layout.dialogOpen = options.state ?? Boolean(subject);
|
|
@@ -124,9 +124,9 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
124
124
|
}),
|
|
125
125
|
createResolver({
|
|
126
126
|
intent: LayoutAction.UpdateLayout,
|
|
127
|
-
// TODO(wittjosiah): This should be able to just be `
|
|
127
|
+
// TODO(wittjosiah): This should be able to just be `Schema.is(LayoutAction.UpdatePopover.fields.input)`
|
|
128
128
|
// but the filter is not being applied correctly.
|
|
129
|
-
filter: (data) =>
|
|
129
|
+
filter: (data) => Schema.is(LayoutAction.UpdatePopover.fields.input)(data),
|
|
130
130
|
resolve: ({ subject, options }) => {
|
|
131
131
|
const layout = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
132
132
|
layout.popoverOpen = options.state ?? Boolean(subject);
|
|
@@ -146,9 +146,9 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
146
146
|
}),
|
|
147
147
|
createResolver({
|
|
148
148
|
intent: LayoutAction.UpdateLayout,
|
|
149
|
-
// TODO(wittjosiah): This should be able to just be `
|
|
149
|
+
// TODO(wittjosiah): This should be able to just be `Schema.is(LayoutAction.AddToast.fields.input)`
|
|
150
150
|
// but the filter is not being applied correctly.
|
|
151
|
-
filter: (data) =>
|
|
151
|
+
filter: (data) => Schema.is(LayoutAction.AddToast.fields.input)(data),
|
|
152
152
|
resolve: ({ subject }) => {
|
|
153
153
|
const layout = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
154
154
|
layout.toasts.push(subject);
|
|
@@ -156,10 +156,10 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
156
156
|
}),
|
|
157
157
|
createResolver({
|
|
158
158
|
intent: LayoutAction.UpdateLayout,
|
|
159
|
-
// TODO(wittjosiah): This should be able to just be `
|
|
159
|
+
// TODO(wittjosiah): This should be able to just be `Schema.is(LayoutAction.SetLayoutMode.fields.input)`
|
|
160
160
|
// but the filter is not being applied correctly.
|
|
161
161
|
filter: (data) => {
|
|
162
|
-
if (!
|
|
162
|
+
if (!Schema.is(LayoutAction.SetLayoutMode.fields.input)(data)) {
|
|
163
163
|
return false;
|
|
164
164
|
}
|
|
165
165
|
if ("mode" in data.options) {
|
|
@@ -219,7 +219,7 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
219
219
|
}),
|
|
220
220
|
createResolver({
|
|
221
221
|
intent: LayoutAction.UpdateLayout,
|
|
222
|
-
filter: (data) =>
|
|
222
|
+
filter: (data) => Schema.is(LayoutAction.SwitchWorkspace.fields.input)(data),
|
|
223
223
|
resolve: ({ subject }) => {
|
|
224
224
|
const state = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
225
225
|
batch(() => {
|
|
@@ -248,7 +248,7 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
248
248
|
}),
|
|
249
249
|
createResolver({
|
|
250
250
|
intent: LayoutAction.UpdateLayout,
|
|
251
|
-
filter: (data) =>
|
|
251
|
+
filter: (data) => Schema.is(LayoutAction.RevertWorkspace.fields.input)(data),
|
|
252
252
|
resolve: () => {
|
|
253
253
|
const state = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
254
254
|
return {
|
|
@@ -263,7 +263,7 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
263
263
|
}),
|
|
264
264
|
createResolver({
|
|
265
265
|
intent: LayoutAction.UpdateLayout,
|
|
266
|
-
filter: (data) =>
|
|
266
|
+
filter: (data) => Schema.is(LayoutAction.Open.fields.input)(data),
|
|
267
267
|
resolve: ({ subject, options }) => Effect.gen(function* () {
|
|
268
268
|
const { graph } = context.requestCapability(Capabilities.AppGraph);
|
|
269
269
|
const state = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
@@ -325,7 +325,7 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
325
325
|
}),
|
|
326
326
|
createResolver({
|
|
327
327
|
intent: LayoutAction.UpdateLayout,
|
|
328
|
-
filter: (data) =>
|
|
328
|
+
filter: (data) => Schema.is(LayoutAction.Close.fields.input)(data),
|
|
329
329
|
resolve: ({ subject }) => {
|
|
330
330
|
const state = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
331
331
|
const attention = context.requestCapability(AttentionCapabilities.Attention);
|
|
@@ -357,7 +357,7 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
357
357
|
}),
|
|
358
358
|
createResolver({
|
|
359
359
|
intent: LayoutAction.UpdateLayout,
|
|
360
|
-
filter: (data) =>
|
|
360
|
+
filter: (data) => Schema.is(LayoutAction.Set.fields.input)(data),
|
|
361
361
|
resolve: ({ subject }) => {
|
|
362
362
|
const state = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
363
363
|
const attention = context.requestCapability(AttentionCapabilities.Attention);
|
|
@@ -378,7 +378,7 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
378
378
|
}),
|
|
379
379
|
createResolver({
|
|
380
380
|
intent: LayoutAction.UpdateLayout,
|
|
381
|
-
filter: (data) =>
|
|
381
|
+
filter: (data) => Schema.is(LayoutAction.ScrollIntoView.fields.input)(data),
|
|
382
382
|
resolve: ({ subject }) => {
|
|
383
383
|
const layout = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
384
384
|
layout.scrollIntoView = subject;
|
|
@@ -500,4 +500,4 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
500
500
|
export {
|
|
501
501
|
intent_resolver_default as default
|
|
502
502
|
};
|
|
503
|
-
//# sourceMappingURL=intent-resolver-
|
|
503
|
+
//# sourceMappingURL=intent-resolver-NO6L67KF.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/intent-resolver.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { batch } from '@preact/signals-core';\nimport { Schema, Effect, 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 } from '@dxos/echo-schema';\nimport { invariant } from '@dxos/invariant';\nimport { isLiveObject } from '@dxos/live-object';\nimport { log } from '@dxos/log';\nimport { AttentionCapabilities } from '@dxos/plugin-attention';\nimport { type Node } from '@dxos/plugin-graph';\nimport { ObservabilityAction } from '@dxos/plugin-observability/types';\nimport { byPosition, isNonNullable } from '@dxos/util';\n\nimport { DeckCapabilities } from './capabilities';\nimport { closeEntry, createEntryId, incrementPlank, openEntry } from '../layout';\nimport { DECK_PLUGIN } from '../meta';\nimport {\n DeckAction,\n type LayoutMode,\n type DeckSettingsProps,\n isLayoutMode,\n getMode,\n defaultDeck,\n PLANK_COMPANION_TYPE,\n} 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 `Schema.is(LayoutAction.UpdateSidebar.fields.input)`\n // but the filter is not being applied correctly.\n filter: (data): data is Schema.Schema.Type<typeof LayoutAction.UpdateSidebar.fields.input> =>\n Schema.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 `Schema.is(LayoutAction.UpdateComplementary.fields.input)`\n // but the filter is not being applied correctly.\n filter: (data): data is Schema.Schema.Type<typeof LayoutAction.UpdateComplementary.fields.input> =>\n Schema.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 `Schema.is(LayoutAction.UpdateDialog.fields.input)`\n // but the filter is not being applied correctly.\n filter: (data): data is Schema.Schema.Type<typeof LayoutAction.UpdateDialog.fields.input> =>\n Schema.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 `Schema.is(LayoutAction.UpdatePopover.fields.input)`\n // but the filter is not being applied correctly.\n filter: (data): data is Schema.Schema.Type<typeof LayoutAction.UpdatePopover.fields.input> =>\n Schema.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 =\n typeof subject === 'string' ? { component: subject, props: options.props } : subject ? { subject } : null;\n layout.popoverSide = options.side;\n if (options.variant === 'virtual') {\n layout.popoverAnchor = options.anchor;\n } else {\n layout.popoverAnchorId = options.anchorId;\n }\n },\n }),\n createResolver({\n intent: LayoutAction.UpdateLayout,\n // TODO(wittjosiah): This should be able to just be `Schema.is(LayoutAction.AddToast.fields.input)`\n // but the filter is not being applied correctly.\n filter: (data): data is Schema.Schema.Type<typeof LayoutAction.AddToast.fields.input> =>\n Schema.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 `Schema.is(LayoutAction.SetLayoutMode.fields.input)`\n // but the filter is not being applied correctly.\n filter: (data): data is Schema.Schema.Type<typeof LayoutAction.SetLayoutMode.fields.input> => {\n if (!Schema.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 === 'solo--fullscreen') {\n deck.fullscreen = !deck.fullscreen;\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 Schema.Schema.Type<typeof LayoutAction.SwitchWorkspace.fields.input> =>\n Schema.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] = { ...defaultDeck };\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 Schema.Schema.Type<typeof LayoutAction.RevertWorkspace.fields.input> =>\n Schema.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 Schema.Schema.Type<typeof LayoutAction.Open.fields.input> =>\n Schema.is(LayoutAction.Open.fields.input)(data),\n resolve: ({ subject, options }) =>\n Effect.gen(function* () {\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 if (options?.workspace && state.activeDeck !== options?.workspace) {\n const { dispatch } = context.requestCapability(Capabilities.IntentDispatcher);\n yield* dispatch(\n createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: options.workspace }),\n );\n }\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[]).map((id) => createEntryId(id, options?.variant))\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 variant: options?.variant,\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((subjectId) => {\n const active = graph?.findNode(subjectId)?.data;\n const typename = isLiveObject(active) ? getTypename(active) : undefined;\n return createIntent(ObservabilityAction.SendEvent, {\n name: 'navigation.activate',\n properties: {\n subjectId,\n typename,\n },\n });\n }),\n ],\n };\n }),\n }),\n createResolver({\n intent: LayoutAction.UpdateLayout,\n filter: (data): data is Schema.Schema.Type<typeof LayoutAction.Close.fields.input> =>\n Schema.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\n const clearCompanionIntents = subject\n .filter((id) => state.deck.activeCompanions && id in state.deck.activeCompanions)\n .map((primary) => createIntent(DeckAction.ChangeCompanion, { primary, companion: null }));\n\n return {\n intents: [\n ...clearCompanionIntents,\n ...(toAttend ? [createIntent(LayoutAction.ScrollIntoView, { part: 'current', subject: toAttend })] : []),\n ],\n };\n },\n }),\n createResolver({\n intent: LayoutAction.UpdateLayout,\n filter: (data): data is Schema.Schema.Type<typeof LayoutAction.Set.fields.input> =>\n Schema.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 Schema.Schema.Type<typeof LayoutAction.ScrollIntoView.fields.input> =>\n Schema.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.ChangeCompanion,\n resolve: (data) => {\n const state = context.requestCapability(DeckCapabilities.MutableDeckState);\n // TODO(thure): Reactivity only works when creating a lexically new `activeCompanions`… Are these not proxy objects?\n if (data.companion === null) {\n const { [data.primary]: _, ...nextActiveCompanions } = state.deck.activeCompanions ?? {};\n state.deck.activeCompanions = nextActiveCompanions;\n } else {\n invariant(data.companion !== data.primary);\n state.deck.activeCompanions = {\n ...state.deck.activeCompanions,\n [data.primary]: data.companion,\n };\n }\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 const { graph } = context.requestCapability(Capabilities.AppGraph);\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 === 'companion') {\n const node = graph.findNode(adjustment.id);\n const [companion] = node\n ? graph\n .nodes(node, { filter: (n): n is Node<any> => n.type === PLANK_COMPANION_TYPE })\n .toSorted((a, b) => byPosition(a.properties, b.properties))\n : [];\n if (companion) {\n return {\n intents: [\n // TODO(wittjosiah): This should remember the previously selected companion.\n createIntent(DeckAction.ChangeCompanion, { primary: adjustment.id, companion: companion.id }),\n ],\n };\n }\n }\n\n if (adjustment.type.startsWith('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: adjustment.type },\n }),\n ],\n };\n } else {\n if (adjustment.type === 'solo--fullscreen') {\n // Toggle fullscreen on the current entry.\n return {\n intents: [\n createIntent(LayoutAction.SetLayoutMode, {\n part: 'mode',\n subject: entryId,\n options: { mode: 'solo--fullscreen' },\n }),\n ],\n };\n } else if (adjustment.type === 'solo') {\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"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAASA,aAAa;AACtB,SAASC,QAAQC,QAAQC,YAAY;AAErC,SACEC,cACAC,gBACAC,aACAC,cACAC,cAEAC,cACAC,aACK;AACP,SAASC,mBAAmB;AAC5B,SAASC,iBAAiB;AAC1B,SAASC,o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MAAM;kBACN5D,SAASkF;kBACTvF,SAAS;oBAAEgC,MAAM6F,WAAW5G;kBAAK;gBACnC,CAAA;;YAEJ;UACF,OAAO;AACL,gBAAI4G,WAAW5G,SAAS,oBAAoB;AAE1C,qBAAO;gBACL6C,SAAS;kBACPC,aAAatE,aAAaqC,eAAe;oBACvCmC,MAAM;oBACN5D,SAASkF;oBACTvF,SAAS;sBAAEgC,MAAM;oBAAmB;kBACtC,CAAA;;cAEJ;YACF,WAAW6F,WAAW5G,SAAS,QAAQ;AAErC,qBAAO;gBACL6C,SAAS;;kBAEPyE,KACExE,aAAatE,aAAaqC,eAAe;oBAAEmC,MAAM;oBAAQjE,SAAS;sBAAEgC,MAAM;oBAAO;kBAAE,CAAA,GACnFwG,MAAM/I,aAAa0E,MAAM;oBAAEF,MAAM;oBAAQ5D,SAAS;sBAACkF;;kBAAS,CAAA,CAAA;;cAGlE;YACF;UACF;QACF;MACF,CAAA;IACF;EACF,CAAA;CACD;",
|
|
6
|
+
"names": ["batch", "Schema", "Effect", "pipe", "Capabilities", "createResolver", "contributes", "IntentAction", "LayoutAction", "createIntent", "chain", "getTypename", "invariant", "isLiveObject", "log", "AttentionCapabilities", "ObservabilityAction", "byPosition", "isNonNullable", "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", "Schema", "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", "popoverSide", "side", "variant", "popoverAnchor", "anchor", "popoverAnchorId", "anchorId", "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", "defaultDeck", "first", "intents", "createIntent", "ScrollIntoView", "part", "RevertWorkspace", "Open", "Effect", "gen", "graph", "AppGraph", "attention", "AttentionCapabilities", "Attention", "settings", "requestCapabilities", "SettingsStore", "getStore", "value", "workspace", "dispatch", "previouslyOpenIds", "map", "createEntryId", "reduce", "acc", "entryId", "openEntry", "key", "positioning", "newPlankPositioning", "pivotId", "setActive", "ids", "newlyOpen", "i", "has", "scrollIntoView", "Expose", "subjectId", "findNode", "typename", "isLiveObject", "getTypename", "ObservabilityAction", "SendEvent", "name", "properties", "Close", "closeEntry", "toAttend", "clearCompanionIntents", "activeCompanions", "primary", "DeckAction", "ChangeCompanion", "companion", "UpdatePlankSize", "plankSizing", "size", "_", "nextActiveCompanions", "invariant", "Adjust", "adjustment", "incrementPlank", "node", "nodes", "n", "PLANK_COMPANION_TYPE", "toSorted", "a", "b", "byPosition", "pipe", "chain"]
|
|
7
|
+
}
|