@dxos/plugin-deck 0.7.5-main.9d2a38b → 0.7.5-main.e9bb01b
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-67VRUD5K.mjs → app-graph-builder-CI6ZFMNL.mjs} +57 -31
- package/dist/lib/browser/app-graph-builder-CI6ZFMNL.mjs.map +7 -0
- package/dist/lib/browser/{check-app-scheme-GEX6W2R5.mjs → check-app-scheme-S3EYUPMF.mjs} +3 -3
- package/dist/lib/browser/{check-app-scheme-GEX6W2R5.mjs.map → check-app-scheme-S3EYUPMF.mjs.map} +2 -2
- package/dist/lib/browser/chunk-M2L53AIH.mjs +126 -0
- package/dist/lib/browser/chunk-M2L53AIH.mjs.map +7 -0
- package/dist/lib/browser/{chunk-JQJ5UWVB.mjs → chunk-N7TEPFVR.mjs} +3 -2
- package/dist/lib/browser/{chunk-JQJ5UWVB.mjs.map → chunk-N7TEPFVR.mjs.map} +3 -3
- package/dist/lib/browser/chunk-NYZJCVAU.mjs +22 -0
- package/dist/lib/browser/chunk-NYZJCVAU.mjs.map +7 -0
- package/dist/lib/browser/chunk-WXNLVMK2.mjs +1119 -0
- package/dist/lib/browser/chunk-WXNLVMK2.mjs.map +7 -0
- package/dist/lib/browser/{chunk-5VFDMW5M.mjs → chunk-YQ2GWTDU.mjs} +2 -2
- package/dist/lib/browser/chunk-YQ2GWTDU.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +32 -78
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/intent-resolver-CSXFDKTC.mjs +494 -0
- package/dist/lib/browser/intent-resolver-CSXFDKTC.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-UL7ZDRVZ.mjs → react-root-ECDQZYQT.mjs} +10 -14
- package/dist/lib/browser/react-root-ECDQZYQT.mjs.map +7 -0
- package/dist/lib/browser/react-surface-4WIQZW2S.mjs +38 -0
- package/dist/lib/browser/react-surface-4WIQZW2S.mjs.map +7 -0
- package/dist/lib/browser/{settings-FNWW6WIJ.mjs → settings-WACNLCPB.mjs} +6 -7
- package/dist/lib/browser/settings-WACNLCPB.mjs.map +7 -0
- package/dist/lib/browser/state-VPOYUKK6.mjs +117 -0
- package/dist/lib/browser/state-VPOYUKK6.mjs.map +7 -0
- package/dist/lib/browser/types.mjs +16 -4
- package/dist/lib/browser/url-handler-HLF42IHP.mjs +70 -0
- package/dist/lib/browser/url-handler-HLF42IHP.mjs.map +7 -0
- package/dist/types/src/DeckPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/{layout/app-graph-builder.d.ts → app-graph-builder.d.ts} +22 -22
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/capabilities.d.ts +132 -3
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/check-app-scheme.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +187 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/set-active.d.ts +9 -0
- package/dist/types/src/capabilities/set-active.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state.d.ts +76 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/url-handler.d.ts.map +1 -0
- package/dist/types/src/components/DeckLayout/ActiveNode.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/ComplementarySidebar.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts +1 -4
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Fullscreen.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts +3 -3
- package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Plank.d.ts +8 -6
- package/dist/types/src/components/DeckLayout/Plank.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/PlankControls.d.ts +2 -2
- package/dist/types/src/components/DeckLayout/PlankControls.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/PlankError.d.ts +4 -3
- package/dist/types/src/components/DeckLayout/PlankError.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Sidebar.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/SidebarButton.d.ts +5 -3
- package/dist/types/src/components/DeckLayout/SidebarButton.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 +2 -2
- package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
- package/dist/types/src/components/fragments.d.ts +2 -0
- package/dist/types/src/components/fragments.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useMainSize.d.ts +2 -2
- package/dist/types/src/layout.d.ts +5 -19
- package/dist/types/src/layout.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -0
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +3 -3
- package/dist/types/src/types.d.ts +107 -2
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +2 -1
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/layoutAppliesTopbar.d.ts +2 -0
- package/dist/types/src/util/layoutAppliesTopbar.d.ts.map +1 -0
- package/dist/types/src/util/useHoistStatusbar.d.ts.map +1 -1
- package/package.json +30 -30
- package/src/DeckPlugin.ts +12 -58
- package/src/capabilities/{layout/app-graph-builder.ts → app-graph-builder.ts} +36 -28
- package/src/capabilities/capabilities.ts +4 -3
- package/src/capabilities/{navigation/check-app-scheme.ts → check-app-scheme.ts} +2 -2
- package/src/capabilities/index.ts +11 -3
- package/src/capabilities/intent-resolver.ts +350 -0
- package/src/capabilities/{layout/react-root.tsx → react-root.tsx} +7 -11
- package/src/capabilities/react-surface.tsx +31 -0
- package/src/capabilities/set-active.ts +43 -0
- package/src/capabilities/{settings/settings.ts → settings.ts} +4 -5
- package/src/capabilities/state.ts +102 -0
- package/src/capabilities/url-handler.ts +63 -0
- package/src/components/DeckLayout/ActiveNode.tsx +2 -3
- package/src/components/DeckLayout/ComplementarySidebar.tsx +118 -67
- package/src/components/DeckLayout/ContentEmpty.tsx +7 -10
- package/src/components/DeckLayout/DeckLayout.tsx +103 -61
- package/src/components/DeckLayout/Fullscreen.tsx +2 -3
- package/src/components/DeckLayout/NodePlankHeading.tsx +57 -65
- package/src/components/DeckLayout/Plank.tsx +32 -41
- package/src/components/DeckLayout/PlankControls.tsx +11 -10
- package/src/components/DeckLayout/PlankError.tsx +6 -5
- package/src/components/DeckLayout/Sidebar.tsx +17 -20
- package/src/components/DeckLayout/SidebarButton.tsx +25 -31
- package/src/components/DeckLayout/StatusBar.tsx +5 -11
- package/src/components/DeckLayout/Toast.tsx +2 -2
- package/src/components/LayoutSettings.tsx +8 -8
- package/src/components/fragments.ts +8 -0
- package/src/components/index.ts +0 -2
- package/src/hooks/useMainSize.ts +3 -3
- package/src/layout.ts +43 -212
- package/src/meta.ts +1 -0
- package/src/translations.ts +8 -8
- package/src/types.ts +88 -2
- package/src/util/index.ts +2 -1
- package/src/util/layoutAppliesTopbar.ts +7 -0
- package/src/util/useHoistStatusbar.ts +17 -8
- package/dist/lib/browser/app-graph-builder-67VRUD5K.mjs.map +0 -7
- package/dist/lib/browser/chunk-2M4PXYNB.mjs +0 -1052
- package/dist/lib/browser/chunk-2M4PXYNB.mjs.map +0 -7
- package/dist/lib/browser/chunk-2PJNBVCY.mjs +0 -39
- package/dist/lib/browser/chunk-2PJNBVCY.mjs.map +0 -7
- package/dist/lib/browser/chunk-4C2AFTET.mjs +0 -186
- package/dist/lib/browser/chunk-4C2AFTET.mjs.map +0 -7
- package/dist/lib/browser/chunk-5VFDMW5M.mjs.map +0 -7
- package/dist/lib/browser/chunk-KY5WXIXY.mjs +0 -44
- package/dist/lib/browser/chunk-KY5WXIXY.mjs.map +0 -7
- package/dist/lib/browser/deck-PLCSKPGL.mjs +0 -26
- package/dist/lib/browser/deck-PLCSKPGL.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-FVOQSTBX.mjs +0 -152
- package/dist/lib/browser/intent-resolver-FVOQSTBX.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-K7GW4A2I.mjs +0 -249
- package/dist/lib/browser/intent-resolver-K7GW4A2I.mjs.map +0 -7
- package/dist/lib/browser/location-QHRBQBQN.mjs +0 -35
- package/dist/lib/browser/location-QHRBQBQN.mjs.map +0 -7
- package/dist/lib/browser/react-context-3BDW7W2N.mjs +0 -32
- package/dist/lib/browser/react-context-3BDW7W2N.mjs.map +0 -7
- package/dist/lib/browser/react-root-UL7ZDRVZ.mjs.map +0 -7
- package/dist/lib/browser/react-surface-VPNOGGNN.mjs +0 -28
- package/dist/lib/browser/react-surface-VPNOGGNN.mjs.map +0 -7
- package/dist/lib/browser/settings-FNWW6WIJ.mjs.map +0 -7
- package/dist/lib/browser/state-7I5BD7SE.mjs +0 -34
- package/dist/lib/browser/state-7I5BD7SE.mjs.map +0 -7
- package/dist/lib/browser/url-handler-Z5B7LD3N.mjs +0 -76
- package/dist/lib/browser/url-handler-Z5B7LD3N.mjs.map +0 -7
- package/dist/types/src/capabilities/layout/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/layout/deck.d.ts +0 -4
- package/dist/types/src/capabilities/layout/deck.d.ts.map +0 -1
- package/dist/types/src/capabilities/layout/index.d.ts +0 -229
- package/dist/types/src/capabilities/layout/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/layout/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/layout/react-context.d.ts +0 -8
- package/dist/types/src/capabilities/layout/react-context.d.ts.map +0 -1
- package/dist/types/src/capabilities/layout/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/layout/state.d.ts +0 -42
- package/dist/types/src/capabilities/layout/state.d.ts.map +0 -1
- package/dist/types/src/capabilities/navigation/check-app-scheme.d.ts.map +0 -1
- package/dist/types/src/capabilities/navigation/index.d.ts +0 -5
- package/dist/types/src/capabilities/navigation/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/navigation/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/navigation/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/navigation/location.d.ts +0 -4
- package/dist/types/src/capabilities/navigation/location.d.ts.map +0 -1
- package/dist/types/src/capabilities/navigation/set-location.d.ts +0 -10
- package/dist/types/src/capabilities/navigation/set-location.d.ts.map +0 -1
- package/dist/types/src/capabilities/navigation/url-handler.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/index.d.ts +0 -3
- package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
- package/dist/types/src/components/DeckContext.d.ts +0 -11
- package/dist/types/src/components/DeckContext.d.ts.map +0 -1
- package/dist/types/src/components/LayoutContext.d.ts +0 -5
- package/dist/types/src/components/LayoutContext.d.ts.map +0 -1
- package/dist/types/src/layout.test.d.ts +0 -2
- package/dist/types/src/layout.test.d.ts.map +0 -1
- package/dist/types/src/util/layout-parts.d.ts +0 -7
- package/dist/types/src/util/layout-parts.d.ts.map +0 -1
- package/src/capabilities/layout/deck.ts +0 -25
- package/src/capabilities/layout/index.ts +0 -12
- package/src/capabilities/layout/intent-resolver.ts +0 -128
- package/src/capabilities/layout/react-context.tsx +0 -26
- package/src/capabilities/layout/state.ts +0 -32
- package/src/capabilities/navigation/index.ts +0 -10
- package/src/capabilities/navigation/intent-resolver.ts +0 -216
- package/src/capabilities/navigation/location.ts +0 -28
- package/src/capabilities/navigation/set-location.ts +0 -38
- package/src/capabilities/navigation/url-handler.ts +0 -67
- package/src/capabilities/settings/index.ts +0 -8
- package/src/capabilities/settings/react-surface.tsx +0 -23
- package/src/components/DeckContext.ts +0 -19
- package/src/components/LayoutContext.ts +0 -12
- package/src/layout.test.ts +0 -380
- package/src/util/layout-parts.ts +0 -12
- /package/dist/types/src/capabilities/{navigation/check-app-scheme.d.ts → check-app-scheme.d.ts} +0 -0
- /package/dist/types/src/capabilities/{layout/intent-resolver.d.ts → intent-resolver.d.ts} +0 -0
- /package/dist/types/src/capabilities/{layout/react-root.d.ts → react-root.d.ts} +0 -0
- /package/dist/types/src/capabilities/{settings/react-surface.d.ts → react-surface.d.ts} +0 -0
- /package/dist/types/src/capabilities/{settings/settings.d.ts → settings.d.ts} +0 -0
- /package/dist/types/src/capabilities/{navigation/url-handler.d.ts → url-handler.d.ts} +0 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DeckCapabilities
|
|
3
|
+
} from "./chunk-YQ2GWTDU.mjs";
|
|
4
|
+
import {
|
|
5
|
+
getMode
|
|
6
|
+
} from "./chunk-M2L53AIH.mjs";
|
|
7
|
+
import {
|
|
8
|
+
DECK_PLUGIN
|
|
9
|
+
} from "./chunk-N7TEPFVR.mjs";
|
|
10
|
+
|
|
11
|
+
// packages/plugins/plugin-deck/src/capabilities/state.ts
|
|
12
|
+
import { Capabilities, contributes } from "@dxos/app-framework";
|
|
13
|
+
import { invariant } from "@dxos/invariant";
|
|
14
|
+
import { create } from "@dxos/live-object";
|
|
15
|
+
import { LocalStorageStore } from "@dxos/local-storage";
|
|
16
|
+
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-deck/src/capabilities/state.ts";
|
|
17
|
+
var boolean = /true|false/;
|
|
18
|
+
var migrateSidebarStateDefaults = {
|
|
19
|
+
[`${DECK_PLUGIN}/complementary-sidebar-state`]: "expanded",
|
|
20
|
+
[`${DECK_PLUGIN}/sidebar-state`]: "collapsed"
|
|
21
|
+
};
|
|
22
|
+
var migrateSidebarState = () => {
|
|
23
|
+
Object.entries(migrateSidebarStateDefaults).forEach(([key, defaultValue]) => {
|
|
24
|
+
if (boolean.test(localStorage.getItem(key) ?? "never")) {
|
|
25
|
+
localStorage.setItem(key, defaultValue);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
var state_default = () => {
|
|
30
|
+
migrateSidebarState();
|
|
31
|
+
const state = new LocalStorageStore(DECK_PLUGIN, {
|
|
32
|
+
sidebarState: "expanded",
|
|
33
|
+
complementarySidebarState: "collapsed",
|
|
34
|
+
complementarySidebarPanel: void 0,
|
|
35
|
+
dialogContent: null,
|
|
36
|
+
dialogOpen: false,
|
|
37
|
+
dialogBlockAlign: void 0,
|
|
38
|
+
dialogType: void 0,
|
|
39
|
+
popoverContent: null,
|
|
40
|
+
popoverAnchorId: void 0,
|
|
41
|
+
popoverOpen: false,
|
|
42
|
+
toasts: [],
|
|
43
|
+
currentUndoId: void 0,
|
|
44
|
+
activeDeck: "default",
|
|
45
|
+
decks: {
|
|
46
|
+
default: {
|
|
47
|
+
initialized: false,
|
|
48
|
+
active: [],
|
|
49
|
+
inactive: [],
|
|
50
|
+
fullscreen: false,
|
|
51
|
+
solo: void 0,
|
|
52
|
+
plankSizing: {}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
get deck() {
|
|
56
|
+
const deck = this.decks[this.activeDeck];
|
|
57
|
+
invariant(deck, `Deck not found: ${this.activeDeck}`, {
|
|
58
|
+
F: __dxlog_file,
|
|
59
|
+
L: 61,
|
|
60
|
+
S: this,
|
|
61
|
+
A: [
|
|
62
|
+
"deck",
|
|
63
|
+
"`Deck not found: ${this.activeDeck}`"
|
|
64
|
+
]
|
|
65
|
+
});
|
|
66
|
+
return deck;
|
|
67
|
+
},
|
|
68
|
+
previousMode: {},
|
|
69
|
+
scrollIntoView: void 0
|
|
70
|
+
});
|
|
71
|
+
state.prop({
|
|
72
|
+
key: "sidebarState",
|
|
73
|
+
type: LocalStorageStore.enum()
|
|
74
|
+
}).prop({
|
|
75
|
+
key: "complementarySidebarState",
|
|
76
|
+
type: LocalStorageStore.enum()
|
|
77
|
+
}).prop({
|
|
78
|
+
key: "decks",
|
|
79
|
+
type: LocalStorageStore.json()
|
|
80
|
+
}).prop({
|
|
81
|
+
key: "activeDeck",
|
|
82
|
+
type: LocalStorageStore.string()
|
|
83
|
+
});
|
|
84
|
+
const layout = create({
|
|
85
|
+
get mode() {
|
|
86
|
+
return getMode(state.values.deck);
|
|
87
|
+
},
|
|
88
|
+
get dialogOpen() {
|
|
89
|
+
return state.values.dialogOpen;
|
|
90
|
+
},
|
|
91
|
+
get sidebarOpen() {
|
|
92
|
+
return state.values.sidebarState === "expanded";
|
|
93
|
+
},
|
|
94
|
+
get complementarySidebarOpen() {
|
|
95
|
+
return state.values.complementarySidebarState === "expanded";
|
|
96
|
+
},
|
|
97
|
+
get active() {
|
|
98
|
+
return state.values.deck.solo ? [
|
|
99
|
+
state.values.deck.solo
|
|
100
|
+
] : state.values.deck.active;
|
|
101
|
+
},
|
|
102
|
+
get inactive() {
|
|
103
|
+
return state.values.deck.inactive;
|
|
104
|
+
},
|
|
105
|
+
get scrollIntoView() {
|
|
106
|
+
return state.values.scrollIntoView;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
return [
|
|
110
|
+
contributes(DeckCapabilities.DeckState, state.values, () => state.close()),
|
|
111
|
+
contributes(Capabilities.Layout, layout)
|
|
112
|
+
];
|
|
113
|
+
};
|
|
114
|
+
export {
|
|
115
|
+
state_default as default
|
|
116
|
+
};
|
|
117
|
+
//# sourceMappingURL=state-VPOYUKK6.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/state.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes } from '@dxos/app-framework';\nimport { invariant } from '@dxos/invariant';\nimport { create } from '@dxos/live-object';\nimport { LocalStorageStore } from '@dxos/local-storage';\nimport { type SidebarState } from '@dxos/react-ui';\n\nimport { DeckCapabilities } from './capabilities';\nimport { DECK_PLUGIN } from '../meta';\nimport { getMode, type Deck, type DeckState } from '../types';\n\nconst boolean = /true|false/;\n\n// TODO(thure, 18 Feb 2025): Remove after the next release.\n\nconst migrateSidebarStateDefaults = {\n [`${DECK_PLUGIN}/complementary-sidebar-state`]: 'expanded',\n [`${DECK_PLUGIN}/sidebar-state`]: 'collapsed',\n};\n\nconst migrateSidebarState = () => {\n Object.entries(migrateSidebarStateDefaults).forEach(([key, defaultValue]) => {\n if (boolean.test(localStorage.getItem(key) ?? 'never')) {\n localStorage.setItem(key, defaultValue);\n }\n });\n};\n\nexport default () => {\n migrateSidebarState();\n\n const state = new LocalStorageStore<DeckState>(DECK_PLUGIN, {\n sidebarState: 'expanded',\n complementarySidebarState: 'collapsed',\n complementarySidebarPanel: undefined,\n dialogContent: null,\n dialogOpen: false,\n dialogBlockAlign: undefined,\n dialogType: undefined,\n popoverContent: null,\n popoverAnchorId: undefined,\n popoverOpen: false,\n toasts: [],\n currentUndoId: undefined,\n activeDeck: 'default',\n decks: {\n default: {\n initialized: false,\n active: [],\n inactive: [],\n fullscreen: false,\n solo: undefined,\n plankSizing: {},\n },\n },\n get deck() {\n const deck = this.decks[this.activeDeck];\n invariant(deck, `Deck not found: ${this.activeDeck}`);\n return deck;\n },\n previousMode: {},\n scrollIntoView: undefined,\n });\n\n state\n .prop({ key: 'sidebarState', type: LocalStorageStore.enum<SidebarState>() })\n .prop({ key: 'complementarySidebarState', type: LocalStorageStore.enum<SidebarState>() })\n .prop({ key: 'decks', type: LocalStorageStore.json<Record<string, Deck>>() })\n .prop({ key: 'activeDeck', type: LocalStorageStore.string() });\n\n const layout = create<Capabilities.Layout>({\n get mode() {\n return getMode(state.values.deck);\n },\n get dialogOpen() {\n return state.values.dialogOpen;\n },\n get sidebarOpen() {\n return state.values.sidebarState === 'expanded';\n },\n get complementarySidebarOpen() {\n return state.values.complementarySidebarState === 'expanded';\n },\n get active() {\n return state.values.deck.solo ? [state.values.deck.solo] : state.values.deck.active;\n },\n get inactive() {\n return state.values.deck.inactive;\n },\n get scrollIntoView() {\n return state.values.scrollIntoView;\n },\n });\n\n return [\n contributes(DeckCapabilities.DeckState, state.values, () => state.close()),\n contributes(Capabilities.Layout, layout),\n ];\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAIA,SAASA,cAAcC,mBAAmB;AAC1C,SAASC,iBAAiB;AAC1B,SAASC,cAAc;AACvB,SAASC,yBAAyB;;AAOlC,IAAMC,UAAU;AAIhB,IAAMC,8BAA8B;EAClC,CAAC,GAAGC,WAAAA,8BAAyC,GAAG;EAChD,CAAC,GAAGA,WAAAA,gBAA2B,GAAG;AACpC;AAEA,IAAMC,sBAAsB,MAAA;AAC1BC,SAAOC,QAAQJ,2BAAAA,EAA6BK,QAAQ,CAAC,CAACC,KAAKC,YAAAA,MAAa;AACtE,QAAIR,QAAQS,KAAKC,aAAaC,QAAQJ,GAAAA,KAAQ,OAAA,GAAU;AACtDG,mBAAaE,QAAQL,KAAKC,YAAAA;IAC5B;EACF,CAAA;AACF;AAEA,IAAA,gBAAe,MAAA;AACbL,sBAAAA;AAEA,QAAMU,QAAQ,IAAIC,kBAA6BZ,aAAa;IAC1Da,cAAc;IACdC,2BAA2B;IAC3BC,2BAA2BC;IAC3BC,eAAe;IACfC,YAAY;IACZC,kBAAkBH;IAClBI,YAAYJ;IACZK,gBAAgB;IAChBC,iBAAiBN;IACjBO,aAAa;IACbC,QAAQ,CAAA;IACRC,eAAeT;IACfU,YAAY;IACZC,OAAO;MACLC,SAAS;QACPC,aAAa;QACbC,QAAQ,CAAA;QACRC,UAAU,CAAA;QACVC,YAAY;QACZC,MAAMjB;QACNkB,aAAa,CAAC;MAChB;IACF;IACA,IAAIC,OAAO;AACT,YAAMA,OAAO,KAAKR,MAAM,KAAKD,UAAU;AACvCU,gBAAUD,MAAM,mBAAmB,KAAKT,UAAU,IAAE;;;;;;;;;AACpD,aAAOS;IACT;IACAE,cAAc,CAAC;IACfC,gBAAgBtB;EAClB,CAAA;AAEAL,QACG4B,KAAK;IAAElC,KAAK;IAAgBmC,MAAM5B,kBAAkB6B,KAAI;EAAiB,CAAA,EACzEF,KAAK;IAAElC,KAAK;IAA6BmC,MAAM5B,kBAAkB6B,KAAI;EAAiB,CAAA,EACtFF,KAAK;IAAElC,KAAK;IAASmC,MAAM5B,kBAAkB8B,KAAI;EAAyB,CAAA,EAC1EH,KAAK;IAAElC,KAAK;IAAcmC,MAAM5B,kBAAkB+B,OAAM;EAAG,CAAA;AAE9D,QAAMC,SAASC,OAA4B;IACzC,IAAIC,OAAO;AACT,aAAOC,QAAQpC,MAAMqC,OAAOb,IAAI;IAClC;IACA,IAAIjB,aAAa;AACf,aAAOP,MAAMqC,OAAO9B;IACtB;IACA,IAAI+B,cAAc;AAChB,aAAOtC,MAAMqC,OAAOnC,iBAAiB;IACvC;IACA,IAAIqC,2BAA2B;AAC7B,aAAOvC,MAAMqC,OAAOlC,8BAA8B;IACpD;IACA,IAAIgB,SAAS;AACX,aAAOnB,MAAMqC,OAAOb,KAAKF,OAAO;QAACtB,MAAMqC,OAAOb,KAAKF;UAAQtB,MAAMqC,OAAOb,KAAKL;IAC/E;IACA,IAAIC,WAAW;AACb,aAAOpB,MAAMqC,OAAOb,KAAKJ;IAC3B;IACA,IAAIO,iBAAiB;AACnB,aAAO3B,MAAMqC,OAAOV;IACtB;EACF,CAAA;AAEA,SAAO;IACLa,YAAYC,iBAAiBC,WAAW1C,MAAMqC,QAAQ,MAAMrC,MAAM2C,MAAK,CAAA;IACvEH,YAAYI,aAAaC,QAAQZ,MAAAA;;AAErC;",
|
|
6
|
+
"names": ["Capabilities", "contributes", "invariant", "create", "LocalStorageStore", "boolean", "migrateSidebarStateDefaults", "DECK_PLUGIN", "migrateSidebarState", "Object", "entries", "forEach", "key", "defaultValue", "test", "localStorage", "getItem", "setItem", "state", "LocalStorageStore", "sidebarState", "complementarySidebarState", "complementarySidebarPanel", "undefined", "dialogContent", "dialogOpen", "dialogBlockAlign", "dialogType", "popoverContent", "popoverAnchorId", "popoverOpen", "toasts", "currentUndoId", "activeDeck", "decks", "default", "initialized", "active", "inactive", "fullscreen", "solo", "plankSizing", "deck", "invariant", "previousMode", "scrollIntoView", "prop", "type", "enum", "json", "string", "layout", "create", "mode", "getMode", "values", "sidebarOpen", "complementarySidebarOpen", "contributes", "DeckCapabilities", "DeckState", "close", "Capabilities", "Layout"]
|
|
7
|
+
}
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DECK_ACTION,
|
|
3
|
+
Deck,
|
|
3
4
|
DeckAction,
|
|
4
5
|
DeckSettingsSchema,
|
|
6
|
+
DeckState,
|
|
5
7
|
NewPlankPositions,
|
|
6
|
-
OverscrollOptions
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
OverscrollOptions,
|
|
9
|
+
PlankSizing,
|
|
10
|
+
SLUG_PATH_SEPARATOR,
|
|
11
|
+
getMode,
|
|
12
|
+
isLayoutMode
|
|
13
|
+
} from "./chunk-M2L53AIH.mjs";
|
|
14
|
+
import "./chunk-N7TEPFVR.mjs";
|
|
9
15
|
export {
|
|
10
16
|
DECK_ACTION,
|
|
17
|
+
Deck,
|
|
11
18
|
DeckAction,
|
|
12
19
|
DeckSettingsSchema,
|
|
20
|
+
DeckState,
|
|
13
21
|
NewPlankPositions,
|
|
14
|
-
OverscrollOptions
|
|
22
|
+
OverscrollOptions,
|
|
23
|
+
PlankSizing,
|
|
24
|
+
SLUG_PATH_SEPARATOR,
|
|
25
|
+
getMode,
|
|
26
|
+
isLayoutMode
|
|
15
27
|
};
|
|
16
28
|
//# sourceMappingURL=types.mjs.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DeckCapabilities
|
|
3
|
+
} from "./chunk-YQ2GWTDU.mjs";
|
|
4
|
+
import "./chunk-N7TEPFVR.mjs";
|
|
5
|
+
|
|
6
|
+
// packages/plugins/plugin-deck/src/capabilities/url-handler.ts
|
|
7
|
+
import { Capabilities, contributes, createIntent, LayoutAction } from "@dxos/app-framework";
|
|
8
|
+
import { scheduledEffect } from "@dxos/echo-signals/core";
|
|
9
|
+
var url_handler_default = async (context) => {
|
|
10
|
+
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher) ?? {};
|
|
11
|
+
const state = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
12
|
+
const handleNavigation = async () => {
|
|
13
|
+
const pathname = window.location.pathname;
|
|
14
|
+
if (pathname === "/reset") {
|
|
15
|
+
state.activeDeck = "default";
|
|
16
|
+
state.decks = {
|
|
17
|
+
default: {
|
|
18
|
+
initialized: false,
|
|
19
|
+
active: [],
|
|
20
|
+
inactive: [],
|
|
21
|
+
fullscreen: false,
|
|
22
|
+
solo: void 0,
|
|
23
|
+
plankSizing: {}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
window.location.pathname = "/";
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const [_, nextDeck, nextSolo] = pathname.split("/");
|
|
30
|
+
if (nextDeck) {
|
|
31
|
+
await dispatch(createIntent(LayoutAction.SwitchWorkspace, {
|
|
32
|
+
part: "workspace",
|
|
33
|
+
subject: nextDeck
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
if (nextSolo) {
|
|
37
|
+
await dispatch(createIntent(LayoutAction.SetLayoutMode, {
|
|
38
|
+
part: "mode",
|
|
39
|
+
subject: nextSolo,
|
|
40
|
+
options: {
|
|
41
|
+
mode: "solo"
|
|
42
|
+
}
|
|
43
|
+
}));
|
|
44
|
+
} else {
|
|
45
|
+
await dispatch(createIntent(LayoutAction.SetLayoutMode, {
|
|
46
|
+
part: "mode",
|
|
47
|
+
options: {
|
|
48
|
+
mode: "deck"
|
|
49
|
+
}
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
await handleNavigation();
|
|
54
|
+
window.addEventListener("popstate", handleNavigation);
|
|
55
|
+
const unsubscribe = scheduledEffect(() => ({
|
|
56
|
+
solo: state.deck.solo,
|
|
57
|
+
activeDeck: state.activeDeck
|
|
58
|
+
}), ({ solo, activeDeck }) => {
|
|
59
|
+
const path = solo ? `/${activeDeck}/${solo}` : `/${activeDeck}`;
|
|
60
|
+
history.pushState(null, "", `${path}${window.location.search}`);
|
|
61
|
+
});
|
|
62
|
+
return contributes(Capabilities.Null, null, () => {
|
|
63
|
+
window.removeEventListener("popstate", handleNavigation);
|
|
64
|
+
unsubscribe();
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
export {
|
|
68
|
+
url_handler_default as default
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=url-handler-HLF42IHP.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/url-handler.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, createIntent, LayoutAction, type PluginsContext } from '@dxos/app-framework';\nimport { scheduledEffect } from '@dxos/echo-signals/core';\n\nimport { DeckCapabilities } from './capabilities';\n\n// TODO(wittjosiah): Cleanup the url handling. May justify introducing routing capabilities.\nexport default async (context: PluginsContext) => {\n const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher) ?? {};\n const state = context.requestCapability(DeckCapabilities.MutableDeckState);\n\n const handleNavigation = async () => {\n const pathname = window.location.pathname;\n if (pathname === '/reset') {\n state.activeDeck = 'default';\n state.decks = {\n default: {\n initialized: false,\n active: [],\n inactive: [],\n fullscreen: false,\n solo: undefined,\n plankSizing: {},\n },\n };\n window.location.pathname = '/';\n return;\n }\n\n const [_, nextDeck, nextSolo] = pathname.split('/');\n if (nextDeck) {\n await dispatch(createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: nextDeck }));\n }\n\n if (nextSolo) {\n await dispatch(\n createIntent(LayoutAction.SetLayoutMode, { part: 'mode', subject: nextSolo, options: { mode: 'solo' } }),\n );\n } else {\n await dispatch(createIntent(LayoutAction.SetLayoutMode, { part: 'mode', options: { mode: 'deck' } }));\n }\n };\n\n await handleNavigation();\n window.addEventListener('popstate', handleNavigation);\n\n const unsubscribe = scheduledEffect(\n () => ({ solo: state.deck.solo, activeDeck: state.activeDeck }),\n ({ solo, activeDeck }) => {\n const path = solo ? `/${activeDeck}/${solo}` : `/${activeDeck}`;\n // TODO(thure): In some browsers, this only preserves the most recent state change, even though this is not `history.replace`…\n history.pushState(null, '', `${path}${window.location.search}`);\n },\n );\n\n return contributes(Capabilities.Null, null, () => {\n window.removeEventListener('popstate', handleNavigation);\n unsubscribe();\n });\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;AAIA,SAASA,cAAcC,aAAaC,cAAcC,oBAAyC;AAC3F,SAASC,uBAAuB;AAKhC,IAAA,sBAAe,OAAOC,YAAAA;AACpB,QAAM,EAAEC,iBAAiBC,SAAQ,IAAKF,QAAQG,kBAAkBC,aAAaC,gBAAgB,KAAK,CAAC;AACnG,QAAMC,QAAQN,QAAQG,kBAAkBI,iBAAiBC,gBAAgB;AAEzE,QAAMC,mBAAmB,YAAA;AACvB,UAAMC,WAAWC,OAAOC,SAASF;AACjC,QAAIA,aAAa,UAAU;AACzBJ,YAAMO,aAAa;AACnBP,YAAMQ,QAAQ;QACZC,SAAS;UACPC,aAAa;UACbC,QAAQ,CAAA;UACRC,UAAU,CAAA;UACVC,YAAY;UACZC,MAAMC;UACNC,aAAa,CAAC;QAChB;MACF;AACAX,aAAOC,SAASF,WAAW;AAC3B;IACF;AAEA,UAAM,CAACa,GAAGC,UAAUC,QAAAA,IAAYf,SAASgB,MAAM,GAAA;AAC/C,QAAIF,UAAU;AACZ,YAAMtB,SAASyB,aAAaC,aAAaC,iBAAiB;QAAEC,MAAM;QAAaC,SAASP;MAAS,CAAA,CAAA;IACnG;AAEA,QAAIC,UAAU;AACZ,YAAMvB,SACJyB,aAAaC,aAAaI,eAAe;QAAEF,MAAM;QAAQC,SAASN;QAAUQ,SAAS;UAAEC,MAAM;QAAO;MAAE,CAAA,CAAA;IAE1G,OAAO;AACL,YAAMhC,SAASyB,aAAaC,aAAaI,eAAe;QAAEF,MAAM;QAAQG,SAAS;UAAEC,MAAM;QAAO;MAAE,CAAA,CAAA;IACpG;EACF;AAEA,QAAMzB,iBAAAA;AACNE,SAAOwB,iBAAiB,YAAY1B,gBAAAA;AAEpC,QAAM2B,cAAcC,gBAClB,OAAO;IAAEjB,MAAMd,MAAMgC,KAAKlB;IAAMP,YAAYP,MAAMO;EAAW,IAC7D,CAAC,EAAEO,MAAMP,WAAU,MAAE;AACnB,UAAM0B,OAAOnB,OAAO,IAAIP,UAAAA,IAAcO,IAAAA,KAAS,IAAIP,UAAAA;AAEnD2B,YAAQC,UAAU,MAAM,IAAI,GAAGF,IAAAA,GAAO5B,OAAOC,SAAS8B,MAAM,EAAE;EAChE,CAAA;AAGF,SAAOC,YAAYvC,aAAawC,MAAM,MAAM,MAAA;AAC1CjC,WAAOkC,oBAAoB,YAAYpC,gBAAAA;AACvC2B,gBAAAA;EACF,CAAA;AACF;",
|
|
6
|
+
"names": ["Capabilities", "contributes", "createIntent", "LayoutAction", "scheduledEffect", "context", "dispatchPromise", "dispatch", "requestCapability", "Capabilities", "IntentDispatcher", "state", "DeckCapabilities", "MutableDeckState", "handleNavigation", "pathname", "window", "location", "activeDeck", "decks", "default", "initialized", "active", "inactive", "fullscreen", "solo", "undefined", "plankSizing", "_", "nextDeck", "nextSolo", "split", "createIntent", "LayoutAction", "SwitchWorkspace", "part", "subject", "SetLayoutMode", "options", "mode", "addEventListener", "unsubscribe", "scheduledEffect", "deck", "path", "history", "pushState", "search", "contributes", "Null", "removeEventListener"]
|
|
7
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeckPlugin.d.ts","sourceRoot":"","sources":["../../../src/DeckPlugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeckPlugin.d.ts","sourceRoot":"","sources":["../../../src/DeckPlugin.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,UAAU,4CAgDnB,CAAC"}
|
package/dist/types/src/capabilities/{layout/app-graph-builder.d.ts → app-graph-builder.d.ts}
RENAMED
|
@@ -2,7 +2,7 @@ import { type PluginsContext } from '@dxos/app-framework';
|
|
|
2
2
|
import { type Node } from '@dxos/plugin-graph';
|
|
3
3
|
declare const _default: (context: PluginsContext) => import("@dxos/app-framework").Capability<Readonly<{
|
|
4
4
|
id: string;
|
|
5
|
-
|
|
5
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
6
6
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
7
7
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
8
8
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -10,7 +10,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
10
10
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
11
11
|
}> | Readonly<{
|
|
12
12
|
id: string;
|
|
13
|
-
|
|
13
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
14
14
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
15
15
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
16
16
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -18,7 +18,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
18
18
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
19
19
|
}>[] | (Readonly<{
|
|
20
20
|
id: string;
|
|
21
|
-
|
|
21
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
22
22
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
23
23
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
24
24
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -26,7 +26,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
26
26
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
27
27
|
}> | Readonly<{
|
|
28
28
|
id: string;
|
|
29
|
-
|
|
29
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
30
30
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
31
31
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
32
32
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -34,7 +34,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
34
34
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
35
35
|
}>[] | (Readonly<{
|
|
36
36
|
id: string;
|
|
37
|
-
|
|
37
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
38
38
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
39
39
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
40
40
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -42,7 +42,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
42
42
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
43
43
|
}> | Readonly<{
|
|
44
44
|
id: string;
|
|
45
|
-
|
|
45
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
46
46
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
47
47
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
48
48
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -50,7 +50,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
50
50
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
51
51
|
}>[] | (Readonly<{
|
|
52
52
|
id: string;
|
|
53
|
-
|
|
53
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
54
54
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
55
55
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
56
56
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -58,7 +58,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
58
58
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
59
59
|
}> | Readonly<{
|
|
60
60
|
id: string;
|
|
61
|
-
|
|
61
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
62
62
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
63
63
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
64
64
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -66,7 +66,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
66
66
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
67
67
|
}>[] | (Readonly<{
|
|
68
68
|
id: string;
|
|
69
|
-
|
|
69
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
70
70
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
71
71
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
72
72
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -74,7 +74,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
74
74
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
75
75
|
}> | Readonly<{
|
|
76
76
|
id: string;
|
|
77
|
-
|
|
77
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
78
78
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
79
79
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
80
80
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -82,7 +82,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
82
82
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
83
83
|
}>[] | (Readonly<{
|
|
84
84
|
id: string;
|
|
85
|
-
|
|
85
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
86
86
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
87
87
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
88
88
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -90,7 +90,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
90
90
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
91
91
|
}> | Readonly<{
|
|
92
92
|
id: string;
|
|
93
|
-
|
|
93
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
94
94
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
95
95
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
96
96
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -98,7 +98,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
98
98
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
99
99
|
}>[] | (Readonly<{
|
|
100
100
|
id: string;
|
|
101
|
-
|
|
101
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
102
102
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
103
103
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
104
104
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -106,7 +106,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
106
106
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
107
107
|
}> | Readonly<{
|
|
108
108
|
id: string;
|
|
109
|
-
|
|
109
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
110
110
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
111
111
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
112
112
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -114,7 +114,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
114
114
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
115
115
|
}>[] | (Readonly<{
|
|
116
116
|
id: string;
|
|
117
|
-
|
|
117
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
118
118
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
119
119
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
120
120
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -122,7 +122,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
122
122
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
123
123
|
}> | Readonly<{
|
|
124
124
|
id: string;
|
|
125
|
-
|
|
125
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
126
126
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
127
127
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
128
128
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -130,7 +130,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
130
130
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
131
131
|
}>[] | (Readonly<{
|
|
132
132
|
id: string;
|
|
133
|
-
|
|
133
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
134
134
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
135
135
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
136
136
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -138,7 +138,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
138
138
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
139
139
|
}> | Readonly<{
|
|
140
140
|
id: string;
|
|
141
|
-
|
|
141
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
142
142
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
143
143
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
144
144
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -146,7 +146,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
146
146
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
147
147
|
}>[] | (Readonly<{
|
|
148
148
|
id: string;
|
|
149
|
-
|
|
149
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
150
150
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
151
151
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
152
152
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -154,7 +154,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
154
154
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
155
155
|
}> | Readonly<{
|
|
156
156
|
id: string;
|
|
157
|
-
|
|
157
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
158
158
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
159
159
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
160
160
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -162,7 +162,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
162
162
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
163
163
|
}>[] | (any[] | Readonly<{
|
|
164
164
|
id: string;
|
|
165
|
-
|
|
165
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
166
166
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
167
167
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
168
168
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -170,7 +170,7 @@ declare const _default: (context: PluginsContext) => import("@dxos/app-framework
|
|
|
170
170
|
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
171
171
|
}> | Readonly<{
|
|
172
172
|
id: string;
|
|
173
|
-
|
|
173
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
174
174
|
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
175
175
|
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
176
176
|
relation?: import("@dxos/plugin-graph").Relation;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-graph-builder.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/app-graph-builder.ts"],"names":[],"mappings":"AAIA,OAAO,EAAyD,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEjH,OAAO,EAAmB,KAAK,IAAI,EAAW,MAAM,oBAAoB,CAAC;kCAKhD,cAAc;;qBAgEd,qCACS;sBACX,oBACb;uBACM,oBAAe;sBAGrB,oBACH;;2BAC0C,uCAC5C;;;qBAIiB,qCACK;sBACjB,oBAAgB;uBACkB,oBAAiB;sBAEnD,oBAAQ;;2BAEqB,uCAAiB;;;qBACjC,qCAEb;sBACE,oBAAW;uBAEb,oBACH;sBAEoC,oBAAiB;;2BAGzD,uCACY;;;qBAAqF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAwF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAqF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAwF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAqF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAwF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAqF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAwF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAqF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAwF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAqF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAwF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAqF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAwF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAqF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAwF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAqF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAwF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAqF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;AAlG5xO,wBAiGI"}
|
|
@@ -1,9 +1,138 @@
|
|
|
1
1
|
import { type Label } from '@dxos/app-framework';
|
|
2
2
|
import { type DeepReadonly } from '@dxos/util';
|
|
3
|
-
import { type DeckContextType } from '../components';
|
|
4
3
|
export declare namespace DeckCapabilities {
|
|
5
|
-
const DeckState: import("@dxos/app-framework").InterfaceDef<DeepReadonly<
|
|
6
|
-
|
|
4
|
+
const DeckState: import("@dxos/app-framework").InterfaceDef<DeepReadonly<{
|
|
5
|
+
deck: {
|
|
6
|
+
solo?: string | undefined;
|
|
7
|
+
fullscreen: boolean;
|
|
8
|
+
initialized: boolean;
|
|
9
|
+
active: string[];
|
|
10
|
+
inactive: string[];
|
|
11
|
+
plankSizing: {
|
|
12
|
+
[x: string]: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
sidebarState: "closed" | "collapsed" | "expanded";
|
|
16
|
+
complementarySidebarState: "closed" | "collapsed" | "expanded";
|
|
17
|
+
complementarySidebarPanel?: string | undefined;
|
|
18
|
+
dialogOpen: boolean;
|
|
19
|
+
dialogContent?: any;
|
|
20
|
+
dialogBlockAlign?: "start" | "center" | undefined;
|
|
21
|
+
dialogType?: "default" | "alert" | undefined;
|
|
22
|
+
popoverOpen: boolean;
|
|
23
|
+
popoverContent?: any;
|
|
24
|
+
popoverAnchorId?: string | undefined;
|
|
25
|
+
toasts: {
|
|
26
|
+
readonly description?: string | [string, {
|
|
27
|
+
ns: string;
|
|
28
|
+
count?: number | undefined;
|
|
29
|
+
}] | undefined;
|
|
30
|
+
readonly id: string;
|
|
31
|
+
readonly title?: string | [string, {
|
|
32
|
+
ns: string;
|
|
33
|
+
count?: number | undefined;
|
|
34
|
+
}] | undefined;
|
|
35
|
+
readonly icon?: string | undefined;
|
|
36
|
+
readonly duration?: number | undefined;
|
|
37
|
+
readonly closeLabel?: string | [string, {
|
|
38
|
+
ns: string;
|
|
39
|
+
count?: number | undefined;
|
|
40
|
+
}] | undefined;
|
|
41
|
+
readonly actionLabel?: string | [string, {
|
|
42
|
+
ns: string;
|
|
43
|
+
count?: number | undefined;
|
|
44
|
+
}] | undefined;
|
|
45
|
+
readonly actionAlt?: string | [string, {
|
|
46
|
+
ns: string;
|
|
47
|
+
count?: number | undefined;
|
|
48
|
+
}] | undefined;
|
|
49
|
+
readonly onAction?: any;
|
|
50
|
+
}[];
|
|
51
|
+
currentUndoId?: string | undefined;
|
|
52
|
+
activeDeck: string;
|
|
53
|
+
decks: {
|
|
54
|
+
[x: string]: {
|
|
55
|
+
solo?: string | undefined;
|
|
56
|
+
fullscreen: boolean;
|
|
57
|
+
initialized: boolean;
|
|
58
|
+
active: string[];
|
|
59
|
+
inactive: string[];
|
|
60
|
+
plankSizing: {
|
|
61
|
+
[x: string]: number;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
previousMode: {
|
|
66
|
+
[x: string]: "deck" | "solo" | "fullscreen";
|
|
67
|
+
};
|
|
68
|
+
scrollIntoView?: string | undefined;
|
|
69
|
+
}>>;
|
|
70
|
+
const MutableDeckState: import("@dxos/app-framework").InterfaceDef<{
|
|
71
|
+
deck: {
|
|
72
|
+
solo?: string | undefined;
|
|
73
|
+
fullscreen: boolean;
|
|
74
|
+
initialized: boolean;
|
|
75
|
+
active: string[];
|
|
76
|
+
inactive: string[];
|
|
77
|
+
plankSizing: {
|
|
78
|
+
[x: string]: number;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
sidebarState: "closed" | "collapsed" | "expanded";
|
|
82
|
+
complementarySidebarState: "closed" | "collapsed" | "expanded";
|
|
83
|
+
complementarySidebarPanel?: string | undefined;
|
|
84
|
+
dialogOpen: boolean;
|
|
85
|
+
dialogContent?: any;
|
|
86
|
+
dialogBlockAlign?: "start" | "center" | undefined;
|
|
87
|
+
dialogType?: "default" | "alert" | undefined;
|
|
88
|
+
popoverOpen: boolean;
|
|
89
|
+
popoverContent?: any;
|
|
90
|
+
popoverAnchorId?: string | undefined;
|
|
91
|
+
toasts: {
|
|
92
|
+
readonly description?: string | [string, {
|
|
93
|
+
ns: string;
|
|
94
|
+
count?: number | undefined;
|
|
95
|
+
}] | undefined;
|
|
96
|
+
readonly id: string;
|
|
97
|
+
readonly title?: string | [string, {
|
|
98
|
+
ns: string;
|
|
99
|
+
count?: number | undefined;
|
|
100
|
+
}] | undefined;
|
|
101
|
+
readonly icon?: string | undefined;
|
|
102
|
+
readonly duration?: number | undefined;
|
|
103
|
+
readonly closeLabel?: string | [string, {
|
|
104
|
+
ns: string;
|
|
105
|
+
count?: number | undefined;
|
|
106
|
+
}] | undefined;
|
|
107
|
+
readonly actionLabel?: string | [string, {
|
|
108
|
+
ns: string;
|
|
109
|
+
count?: number | undefined;
|
|
110
|
+
}] | undefined;
|
|
111
|
+
readonly actionAlt?: string | [string, {
|
|
112
|
+
ns: string;
|
|
113
|
+
count?: number | undefined;
|
|
114
|
+
}] | undefined;
|
|
115
|
+
readonly onAction?: any;
|
|
116
|
+
}[];
|
|
117
|
+
currentUndoId?: string | undefined;
|
|
118
|
+
activeDeck: string;
|
|
119
|
+
decks: {
|
|
120
|
+
[x: string]: {
|
|
121
|
+
solo?: string | undefined;
|
|
122
|
+
fullscreen: boolean;
|
|
123
|
+
initialized: boolean;
|
|
124
|
+
active: string[];
|
|
125
|
+
inactive: string[];
|
|
126
|
+
plankSizing: {
|
|
127
|
+
[x: string]: number;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
previousMode: {
|
|
132
|
+
[x: string]: "deck" | "solo" | "fullscreen";
|
|
133
|
+
};
|
|
134
|
+
scrollIntoView?: string | undefined;
|
|
135
|
+
}>;
|
|
7
136
|
const ComplementaryPanel: import("@dxos/app-framework").InterfaceDef<{
|
|
8
137
|
id: string;
|
|
9
138
|
label: Label;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/capabilities.ts"],"names":[],"mappings":"AAIA,OAAO,EAAoB,KAAK,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/capabilities.ts"],"names":[],"mappings":"AAIA,OAAO,EAAoB,KAAK,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAK/C,yBAAiB,gBAAgB,CAAC;IACzB,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAA+E,CAAC;IAC/F,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAiE,CAAC;IAExF,MAAM,kBAAkB;YAA0B,MAAM;eAAS,KAAK;cAAQ,MAAM;MAE1F,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-app-scheme.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/check-app-scheme.ts"],"names":[],"mappings":"AAOA,OAAO,EAA6B,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;kCA4BtD,cAAc;AAA7C,wBAQE"}
|