@dxos/plugin-deck 0.7.5-main.9d2a38b → 0.7.5-main.c41020f
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-IYHAGFA3.mjs} +61 -31
- package/dist/lib/browser/app-graph-builder-IYHAGFA3.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-5VFDMW5M.mjs → chunk-22AQ5IVX.mjs} +2 -2
- package/dist/lib/browser/chunk-22AQ5IVX.mjs.map +7 -0
- package/dist/lib/browser/chunk-FT33W5CI.mjs +128 -0
- package/dist/lib/browser/chunk-FT33W5CI.mjs.map +7 -0
- package/dist/lib/browser/chunk-G2X3ZDCE.mjs +24 -0
- package/dist/lib/browser/chunk-G2X3ZDCE.mjs.map +7 -0
- package/dist/lib/browser/chunk-KANJBSIX.mjs +97 -0
- package/dist/lib/browser/chunk-KANJBSIX.mjs.map +7 -0
- package/dist/lib/browser/{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-O4RFYYQ6.mjs +1114 -0
- package/dist/lib/browser/chunk-O4RFYYQ6.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +45 -78
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/intent-resolver-ZD67BRUI.mjs +488 -0
- package/dist/lib/browser/intent-resolver-ZD67BRUI.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-UL7ZDRVZ.mjs → react-root-6ILKHD5J.mjs} +12 -17
- package/dist/lib/browser/react-root-6ILKHD5J.mjs.map +7 -0
- package/dist/lib/browser/react-surface-O75FKXAI.mjs +39 -0
- package/dist/lib/browser/react-surface-O75FKXAI.mjs.map +7 -0
- package/dist/lib/browser/{settings-FNWW6WIJ.mjs → settings-H35U6NHE.mjs} +6 -7
- package/dist/lib/browser/settings-H35U6NHE.mjs.map +7 -0
- package/dist/lib/browser/state-U4SHOPJW.mjs +129 -0
- package/dist/lib/browser/state-U4SHOPJW.mjs.map +7 -0
- package/dist/lib/browser/tools-64LXGLYR.mjs +59 -0
- package/dist/lib/browser/tools-64LXGLYR.mjs.map +7 -0
- package/dist/lib/browser/types.mjs +16 -4
- package/dist/lib/browser/url-handler-MVHTKUYA.mjs +72 -0
- package/dist/lib/browser/url-handler-MVHTKUYA.mjs.map +7 -0
- package/dist/types/src/DeckPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +181 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/capabilities.d.ts +137 -8
- 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 +188 -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/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state.d.ts +79 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/tools.d.ts +10 -0
- package/dist/types/src/capabilities/tools.d.ts.map +1 -0
- package/dist/types/src/capabilities/url-handler.d.ts.map +1 -0
- package/dist/types/src/components/DeckLayout/ActiveNode.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/ActiveNode.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Banner.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/Banner.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/ComplementarySidebar.d.ts +1 -4
- package/dist/types/src/components/DeckLayout/ComplementarySidebar.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts +2 -7
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Fallback.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/Fallback.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Fullscreen.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/Fullscreen.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts +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 +6 -6
- package/dist/types/src/components/DeckLayout/PlankError.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/PlankLoading.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/PlankLoading.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Sidebar.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/Sidebar.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/SidebarButton.d.ts +6 -5
- package/dist/types/src/components/DeckLayout/SidebarButton.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/StatusBar.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/StatusBar.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Toast.d.ts +2 -3
- package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Topbar.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/Topbar.d.ts.map +1 -1
- package/dist/types/src/components/LayoutSettings.d.ts +1 -2
- package/dist/types/src/components/LayoutSettings.d.ts.map +1 -1
- package/dist/types/src/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/events.d.ts +1 -0
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/hooks/useMainSize.d.ts +2 -2
- package/dist/types/src/hooks/useNode.d.ts.map +1 -1
- 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 +117 -2
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +3 -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/set-active.d.ts +9 -0
- package/dist/types/src/util/set-active.d.ts.map +1 -0
- package/dist/types/src/util/useHoistStatusbar.d.ts.map +1 -1
- package/package.json +32 -31
- package/src/DeckPlugin.ts +23 -59
- package/src/capabilities/{layout/app-graph-builder.ts → app-graph-builder.ts} +40 -28
- package/src/capabilities/capabilities.ts +5 -7
- package/src/capabilities/{navigation/check-app-scheme.ts → check-app-scheme.ts} +2 -2
- package/src/capabilities/index.ts +12 -3
- package/src/capabilities/intent-resolver.ts +368 -0
- package/src/capabilities/{layout/react-root.tsx → react-root.tsx} +8 -14
- package/src/capabilities/react-surface.tsx +31 -0
- package/src/capabilities/{settings/settings.ts → settings.ts} +4 -5
- package/src/capabilities/state.ts +108 -0
- package/src/capabilities/tools.ts +66 -0
- package/src/capabilities/url-handler.ts +65 -0
- package/src/components/DeckLayout/ActiveNode.tsx +2 -3
- package/src/components/DeckLayout/ComplementarySidebar.tsx +185 -77
- package/src/components/DeckLayout/ContentEmpty.tsx +7 -10
- package/src/components/DeckLayout/DeckLayout.tsx +141 -84
- package/src/components/DeckLayout/Fullscreen.tsx +2 -3
- package/src/components/DeckLayout/NodePlankHeading.tsx +57 -65
- package/src/components/DeckLayout/Plank.tsx +33 -41
- package/src/components/DeckLayout/PlankControls.tsx +12 -11
- 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/events.ts +1 -0
- package/src/hooks/useMainSize.ts +3 -3
- package/src/hooks/useNode.ts +3 -1
- package/src/layout.ts +43 -212
- package/src/meta.ts +1 -0
- package/src/translations.ts +8 -8
- package/src/types.ts +103 -4
- package/src/util/index.ts +3 -1
- package/src/util/layoutAppliesTopbar.ts +7 -0
- package/src/util/set-active.ts +47 -0
- package/src/util/useHoistStatusbar.ts +13 -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 +0 -181
- 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,129 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DeckCapabilities
|
|
3
|
+
} from "./chunk-22AQ5IVX.mjs";
|
|
4
|
+
import {
|
|
5
|
+
getMode
|
|
6
|
+
} from "./chunk-FT33W5CI.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
|
+
previousDeck: "default",
|
|
46
|
+
decks: {
|
|
47
|
+
default: {
|
|
48
|
+
initialized: false,
|
|
49
|
+
active: [],
|
|
50
|
+
inactive: [],
|
|
51
|
+
fullscreen: false,
|
|
52
|
+
solo: void 0,
|
|
53
|
+
plankSizing: {}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
get deck() {
|
|
57
|
+
const deck = this.decks[this.activeDeck];
|
|
58
|
+
invariant(deck, `Deck not found: ${this.activeDeck}`, {
|
|
59
|
+
F: __dxlog_file,
|
|
60
|
+
L: 62,
|
|
61
|
+
S: this,
|
|
62
|
+
A: [
|
|
63
|
+
"deck",
|
|
64
|
+
"`Deck not found: ${this.activeDeck}`"
|
|
65
|
+
]
|
|
66
|
+
});
|
|
67
|
+
return deck;
|
|
68
|
+
},
|
|
69
|
+
previousMode: {},
|
|
70
|
+
scrollIntoView: void 0
|
|
71
|
+
});
|
|
72
|
+
state.prop({
|
|
73
|
+
key: "sidebarState",
|
|
74
|
+
type: LocalStorageStore.enum()
|
|
75
|
+
}).prop({
|
|
76
|
+
key: "complementarySidebarState",
|
|
77
|
+
type: LocalStorageStore.enum()
|
|
78
|
+
}).prop({
|
|
79
|
+
key: "complementarySidebarPanel",
|
|
80
|
+
type: LocalStorageStore.string({
|
|
81
|
+
allowUndefined: true
|
|
82
|
+
})
|
|
83
|
+
}).prop({
|
|
84
|
+
key: "decks",
|
|
85
|
+
type: LocalStorageStore.json()
|
|
86
|
+
}).prop({
|
|
87
|
+
key: "activeDeck",
|
|
88
|
+
type: LocalStorageStore.string()
|
|
89
|
+
}).prop({
|
|
90
|
+
key: "previousDeck",
|
|
91
|
+
type: LocalStorageStore.string()
|
|
92
|
+
});
|
|
93
|
+
const layout = create({
|
|
94
|
+
get mode() {
|
|
95
|
+
return getMode(state.values.deck);
|
|
96
|
+
},
|
|
97
|
+
get dialogOpen() {
|
|
98
|
+
return state.values.dialogOpen;
|
|
99
|
+
},
|
|
100
|
+
get sidebarOpen() {
|
|
101
|
+
return state.values.sidebarState === "expanded";
|
|
102
|
+
},
|
|
103
|
+
get complementarySidebarOpen() {
|
|
104
|
+
return state.values.complementarySidebarState === "expanded";
|
|
105
|
+
},
|
|
106
|
+
get workspace() {
|
|
107
|
+
return state.values.activeDeck;
|
|
108
|
+
},
|
|
109
|
+
get active() {
|
|
110
|
+
return state.values.deck.solo ? [
|
|
111
|
+
state.values.deck.solo
|
|
112
|
+
] : state.values.deck.active;
|
|
113
|
+
},
|
|
114
|
+
get inactive() {
|
|
115
|
+
return state.values.deck.inactive;
|
|
116
|
+
},
|
|
117
|
+
get scrollIntoView() {
|
|
118
|
+
return state.values.scrollIntoView;
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
return [
|
|
122
|
+
contributes(DeckCapabilities.DeckState, state.values, () => state.close()),
|
|
123
|
+
contributes(Capabilities.Layout, layout)
|
|
124
|
+
];
|
|
125
|
+
};
|
|
126
|
+
export {
|
|
127
|
+
state_default as default
|
|
128
|
+
};
|
|
129
|
+
//# sourceMappingURL=state-U4SHOPJW.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 previousDeck: '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: 'complementarySidebarPanel', type: LocalStorageStore.string({ allowUndefined: true }) })\n .prop({ key: 'decks', type: LocalStorageStore.json<Record<string, Deck>>() })\n .prop({ key: 'activeDeck', type: LocalStorageStore.string() })\n .prop({ key: 'previousDeck', 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 workspace() {\n return state.values.activeDeck;\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,cAAc;IACdC,OAAO;MACLC,SAAS;QACPC,aAAa;QACbC,QAAQ,CAAA;QACRC,UAAU,CAAA;QACVC,YAAY;QACZC,MAAMlB;QACNmB,aAAa,CAAC;MAChB;IACF;IACA,IAAIC,OAAO;AACT,YAAMA,OAAO,KAAKR,MAAM,KAAKF,UAAU;AACvCW,gBAAUD,MAAM,mBAAmB,KAAKV,UAAU,IAAE;;;;;;;;;AACpD,aAAOU;IACT;IACAE,cAAc,CAAC;IACfC,gBAAgBvB;EAClB,CAAA;AAEAL,QACG6B,KAAK;IAAEnC,KAAK;IAAgBoC,MAAM7B,kBAAkB8B,KAAI;EAAiB,CAAA,EACzEF,KAAK;IAAEnC,KAAK;IAA6BoC,MAAM7B,kBAAkB8B,KAAI;EAAiB,CAAA,EACtFF,KAAK;IAAEnC,KAAK;IAA6BoC,MAAM7B,kBAAkB+B,OAAO;MAAEC,gBAAgB;IAAK,CAAA;EAAG,CAAA,EAClGJ,KAAK;IAAEnC,KAAK;IAASoC,MAAM7B,kBAAkBiC,KAAI;EAAyB,CAAA,EAC1EL,KAAK;IAAEnC,KAAK;IAAcoC,MAAM7B,kBAAkB+B,OAAM;EAAG,CAAA,EAC3DH,KAAK;IAAEnC,KAAK;IAAgBoC,MAAM7B,kBAAkB+B,OAAM;EAAG,CAAA;AAEhE,QAAMG,SAASC,OAA4B;IACzC,IAAIC,OAAO;AACT,aAAOC,QAAQtC,MAAMuC,OAAOd,IAAI;IAClC;IACA,IAAIlB,aAAa;AACf,aAAOP,MAAMuC,OAAOhC;IACtB;IACA,IAAIiC,cAAc;AAChB,aAAOxC,MAAMuC,OAAOrC,iBAAiB;IACvC;IACA,IAAIuC,2BAA2B;AAC7B,aAAOzC,MAAMuC,OAAOpC,8BAA8B;IACpD;IACA,IAAIuC,YAAY;AACd,aAAO1C,MAAMuC,OAAOxB;IACtB;IACA,IAAIK,SAAS;AACX,aAAOpB,MAAMuC,OAAOd,KAAKF,OAAO;QAACvB,MAAMuC,OAAOd,KAAKF;UAAQvB,MAAMuC,OAAOd,KAAKL;IAC/E;IACA,IAAIC,WAAW;AACb,aAAOrB,MAAMuC,OAAOd,KAAKJ;IAC3B;IACA,IAAIO,iBAAiB;AACnB,aAAO5B,MAAMuC,OAAOX;IACtB;EACF,CAAA;AAEA,SAAO;IACLe,YAAYC,iBAAiBC,WAAW7C,MAAMuC,QAAQ,MAAMvC,MAAM8C,MAAK,CAAA;IACvEH,YAAYI,aAAaC,QAAQb,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", "previousDeck", "decks", "default", "initialized", "active", "inactive", "fullscreen", "solo", "plankSizing", "deck", "invariant", "previousMode", "scrollIntoView", "prop", "type", "enum", "string", "allowUndefined", "json", "layout", "create", "mode", "getMode", "values", "sidebarOpen", "complementarySidebarOpen", "workspace", "contributes", "DeckCapabilities", "DeckState", "close", "Capabilities", "Layout"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
meta
|
|
3
|
+
} from "./chunk-N7TEPFVR.mjs";
|
|
4
|
+
|
|
5
|
+
// packages/plugins/plugin-deck/src/capabilities/tools.ts
|
|
6
|
+
import { contributes, createIntent, Capabilities, LayoutAction } from "@dxos/app-framework";
|
|
7
|
+
import { defineTool, ToolResult } from "@dxos/artifact";
|
|
8
|
+
import { S } from "@dxos/echo-schema";
|
|
9
|
+
import { invariant } from "@dxos/invariant";
|
|
10
|
+
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-deck/src/capabilities/tools.ts";
|
|
11
|
+
var tools_default = () => contributes(Capabilities.Tools, [
|
|
12
|
+
defineTool(meta.id, {
|
|
13
|
+
name: "show",
|
|
14
|
+
// TODO(ZaymonFC): We should update the prompt to teach the LLM the difference between object ids and fully qualified ids.
|
|
15
|
+
description: `
|
|
16
|
+
Show an item in the app. Use this tool to open an artifact.
|
|
17
|
+
When supplying IDs to show, they must be fully qualified like space:object.
|
|
18
|
+
`,
|
|
19
|
+
caption: "Showing item...",
|
|
20
|
+
// TODO(wittjosiah): Refactor Layout/Navigation/Deck actions so that they can be used directly.
|
|
21
|
+
schema: S.Struct({
|
|
22
|
+
id: S.String.annotations({
|
|
23
|
+
description: "The ID of the item to show."
|
|
24
|
+
}),
|
|
25
|
+
pivotId: S.optional(S.String.annotations({
|
|
26
|
+
description: "The ID of the chat. If provided, the item will be added after the pivot item."
|
|
27
|
+
}))
|
|
28
|
+
}),
|
|
29
|
+
execute: async ({ id }, { extensions }) => {
|
|
30
|
+
invariant(extensions?.dispatch, "No intent dispatcher", {
|
|
31
|
+
F: __dxlog_file,
|
|
32
|
+
L: 48,
|
|
33
|
+
S: void 0,
|
|
34
|
+
A: [
|
|
35
|
+
"extensions?.dispatch",
|
|
36
|
+
"'No intent dispatcher'"
|
|
37
|
+
]
|
|
38
|
+
});
|
|
39
|
+
const { data, error } = await extensions.dispatch(createIntent(LayoutAction.Open, {
|
|
40
|
+
subject: [
|
|
41
|
+
id
|
|
42
|
+
],
|
|
43
|
+
part: "main",
|
|
44
|
+
options: {
|
|
45
|
+
pivotId: extensions.pivotId,
|
|
46
|
+
positioning: "end"
|
|
47
|
+
}
|
|
48
|
+
}));
|
|
49
|
+
if (error) {
|
|
50
|
+
return ToolResult.Error(error.message);
|
|
51
|
+
}
|
|
52
|
+
return ToolResult.Success(data);
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
]);
|
|
56
|
+
export {
|
|
57
|
+
tools_default as default
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=tools-64LXGLYR.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/tools.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport {\n contributes,\n createIntent,\n Capabilities,\n LayoutAction,\n type PromiseIntentDispatcher,\n} from '@dxos/app-framework';\nimport { defineTool, ToolResult } from '@dxos/artifact';\nimport { S } from '@dxos/echo-schema';\nimport { invariant } from '@dxos/invariant';\n\nimport { meta } from '../meta';\n\n// TODO(burdon): Factor out.\ndeclare global {\n interface ToolContextExtensions {\n dispatch?: PromiseIntentDispatcher;\n pivotId?: string;\n }\n}\n\nexport default () =>\n contributes(Capabilities.Tools, [\n defineTool(meta.id, {\n name: 'show',\n // TODO(ZaymonFC): We should update the prompt to teach the LLM the difference between object ids and fully qualified ids.\n description: `\n Show an item in the app. Use this tool to open an artifact. \n When supplying IDs to show, they must be fully qualified like space:object.\n `,\n caption: 'Showing item...',\n // TODO(wittjosiah): Refactor Layout/Navigation/Deck actions so that they can be used directly.\n schema: S.Struct({\n id: S.String.annotations({\n description: 'The ID of the item to show.',\n }),\n pivotId: S.optional(\n S.String.annotations({\n description: 'The ID of the chat. If provided, the item will be added after the pivot item.',\n }),\n ),\n }),\n execute: async ({ id }, { extensions }) => {\n invariant(extensions?.dispatch, 'No intent dispatcher');\n const { data, error } = await extensions.dispatch(\n createIntent(LayoutAction.Open, {\n subject: [id],\n part: 'main',\n options: {\n pivotId: extensions.pivotId,\n positioning: 'end',\n },\n }),\n );\n if (error) {\n return ToolResult.Error(error.message);\n }\n\n return ToolResult.Success(data);\n },\n }),\n ]);\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,SACEA,aACAC,cACAC,cACAC,oBAEK;AACP,SAASC,YAAYC,kBAAkB;AACvC,SAASC,SAAS;AAClB,SAASC,iBAAiB;;AAY1B,IAAA,gBAAe,MACbC,YAAYC,aAAaC,OAAO;EAC9BC,WAAWC,KAAKC,IAAI;IAClBC,MAAM;;IAENC,aAAa;;;;IAIbC,SAAS;;IAETC,QAAQC,EAAEC,OAAO;MACfN,IAAIK,EAAEE,OAAOC,YAAY;QACvBN,aAAa;MACf,CAAA;MACAO,SAASJ,EAAEK,SACTL,EAAEE,OAAOC,YAAY;QACnBN,aAAa;MACf,CAAA,CAAA;IAEJ,CAAA;IACAS,SAAS,OAAO,EAAEX,GAAE,GAAI,EAAEY,WAAU,MAAE;AACpCC,gBAAUD,YAAYE,UAAU,wBAAA;;;;;;;;;AAChC,YAAM,EAAEC,MAAMC,MAAK,IAAK,MAAMJ,WAAWE,SACvCG,aAAaC,aAAaC,MAAM;QAC9BC,SAAS;UAACpB;;QACVqB,MAAM;QACNC,SAAS;UACPb,SAASG,WAAWH;UACpBc,aAAa;QACf;MACF,CAAA,CAAA;AAEF,UAAIP,OAAO;AACT,eAAOQ,WAAWC,MAAMT,MAAMU,OAAO;MACvC;AAEA,aAAOF,WAAWG,QAAQZ,IAAAA;IAC5B;EACF,CAAA;CACD;",
|
|
6
|
+
"names": ["contributes", "createIntent", "Capabilities", "LayoutAction", "defineTool", "ToolResult", "S", "invariant", "contributes", "Capabilities", "Tools", "defineTool", "meta", "id", "name", "description", "caption", "schema", "S", "Struct", "String", "annotations", "pivotId", "optional", "execute", "extensions", "invariant", "dispatch", "data", "error", "createIntent", "LayoutAction", "Open", "subject", "part", "options", "positioning", "ToolResult", "Error", "message", "Success"]
|
|
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-FT33W5CI.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,72 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DeckCapabilities
|
|
3
|
+
} from "./chunk-22AQ5IVX.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 && nextDeck !== state.activeDeck) {
|
|
31
|
+
await dispatch(createIntent(LayoutAction.SwitchWorkspace, {
|
|
32
|
+
part: "workspace",
|
|
33
|
+
subject: nextDeck
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
if (nextSolo && nextSolo !== state.deck.solo) {
|
|
37
|
+
await dispatch(createIntent(LayoutAction.SetLayoutMode, {
|
|
38
|
+
part: "mode",
|
|
39
|
+
subject: nextSolo,
|
|
40
|
+
options: {
|
|
41
|
+
mode: "solo"
|
|
42
|
+
}
|
|
43
|
+
}));
|
|
44
|
+
} else if (!nextSolo && state.deck.solo) {
|
|
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
|
+
if (window.location.pathname !== path) {
|
|
61
|
+
history.pushState(null, "", `${path}${window.location.search}`);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
return contributes(Capabilities.Null, null, () => {
|
|
65
|
+
window.removeEventListener("popstate", handleNavigation);
|
|
66
|
+
unsubscribe();
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
url_handler_default as default
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=url-handler-MVHTKUYA.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 && nextDeck !== state.activeDeck) {\n await dispatch(createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: nextDeck }));\n }\n\n if (nextSolo && nextSolo !== state.deck.solo) {\n await dispatch(\n createIntent(LayoutAction.SetLayoutMode, { part: 'mode', subject: nextSolo, options: { mode: 'solo' } }),\n );\n } else if (!nextSolo && state.deck.solo) {\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 if (window.location.pathname !== path) {\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\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,YAAYA,aAAalB,MAAMO,YAAY;AAC7C,YAAMX,SAASyB,aAAaC,aAAaC,iBAAiB;QAAEC,MAAM;QAAaC,SAASP;MAAS,CAAA,CAAA;IACnG;AAEA,QAAIC,YAAYA,aAAanB,MAAM0B,KAAKZ,MAAM;AAC5C,YAAMlB,SACJyB,aAAaC,aAAaK,eAAe;QAAEH,MAAM;QAAQC,SAASN;QAAUS,SAAS;UAAEC,MAAM;QAAO;MAAE,CAAA,CAAA;IAE1G,WAAW,CAACV,YAAYnB,MAAM0B,KAAKZ,MAAM;AACvC,YAAMlB,SAASyB,aAAaC,aAAaK,eAAe;QAAEH,MAAM;QAAQI,SAAS;UAAEC,MAAM;QAAO;MAAE,CAAA,CAAA;IACpG;EACF;AAEA,QAAM1B,iBAAAA;AACNE,SAAOyB,iBAAiB,YAAY3B,gBAAAA;AAEpC,QAAM4B,cAAcC,gBAClB,OAAO;IAAElB,MAAMd,MAAM0B,KAAKZ;IAAMP,YAAYP,MAAMO;EAAW,IAC7D,CAAC,EAAEO,MAAMP,WAAU,MAAE;AACnB,UAAM0B,OAAOnB,OAAO,IAAIP,UAAAA,IAAcO,IAAAA,KAAS,IAAIP,UAAAA;AACnD,QAAIF,OAAOC,SAASF,aAAa6B,MAAM;AAErCC,cAAQC,UAAU,MAAM,IAAI,GAAGF,IAAAA,GAAO5B,OAAOC,SAAS8B,MAAM,EAAE;IAChE;EACF,CAAA;AAGF,SAAOC,YAAYvC,aAAawC,MAAM,MAAM,MAAA;AAC1CjC,WAAOkC,oBAAoB,YAAYpC,gBAAAA;AACvC4B,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", "deck", "SetLayoutMode", "options", "mode", "addEventListener", "unsubscribe", "scheduledEffect", "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":"AA6BA,eAAO,MAAM,UAAU,4CAyDnB,CAAC"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { type PluginsContext } from '@dxos/app-framework';
|
|
2
|
+
import { type Node } from '@dxos/plugin-graph';
|
|
3
|
+
declare const _default: (context: PluginsContext) => import("@dxos/app-framework").Capability<Readonly<{
|
|
4
|
+
id: string;
|
|
5
|
+
position: import("@dxos/util").Position;
|
|
6
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
7
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
8
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
9
|
+
type?: string;
|
|
10
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
11
|
+
}> | Readonly<{
|
|
12
|
+
id: string;
|
|
13
|
+
position: import("@dxos/util").Position;
|
|
14
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
15
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
16
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
17
|
+
type?: string;
|
|
18
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
19
|
+
}>[] | (Readonly<{
|
|
20
|
+
id: string;
|
|
21
|
+
position: import("@dxos/util").Position;
|
|
22
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
23
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
24
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
25
|
+
type?: string;
|
|
26
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
27
|
+
}> | Readonly<{
|
|
28
|
+
id: string;
|
|
29
|
+
position: import("@dxos/util").Position;
|
|
30
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
31
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
32
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
33
|
+
type?: string;
|
|
34
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
35
|
+
}>[] | (Readonly<{
|
|
36
|
+
id: string;
|
|
37
|
+
position: import("@dxos/util").Position;
|
|
38
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
39
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
40
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
41
|
+
type?: string;
|
|
42
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
43
|
+
}> | Readonly<{
|
|
44
|
+
id: string;
|
|
45
|
+
position: import("@dxos/util").Position;
|
|
46
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
47
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
48
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
49
|
+
type?: string;
|
|
50
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
51
|
+
}>[] | (Readonly<{
|
|
52
|
+
id: string;
|
|
53
|
+
position: import("@dxos/util").Position;
|
|
54
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
55
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
56
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
57
|
+
type?: string;
|
|
58
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
59
|
+
}> | Readonly<{
|
|
60
|
+
id: string;
|
|
61
|
+
position: import("@dxos/util").Position;
|
|
62
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
63
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
64
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
65
|
+
type?: string;
|
|
66
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
67
|
+
}>[] | (Readonly<{
|
|
68
|
+
id: string;
|
|
69
|
+
position: import("@dxos/util").Position;
|
|
70
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
71
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
72
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
73
|
+
type?: string;
|
|
74
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
75
|
+
}> | Readonly<{
|
|
76
|
+
id: string;
|
|
77
|
+
position: import("@dxos/util").Position;
|
|
78
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
79
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
80
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
81
|
+
type?: string;
|
|
82
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
83
|
+
}>[] | (Readonly<{
|
|
84
|
+
id: string;
|
|
85
|
+
position: import("@dxos/util").Position;
|
|
86
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
87
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
88
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
89
|
+
type?: string;
|
|
90
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
91
|
+
}> | Readonly<{
|
|
92
|
+
id: string;
|
|
93
|
+
position: import("@dxos/util").Position;
|
|
94
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
95
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
96
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
97
|
+
type?: string;
|
|
98
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
99
|
+
}>[] | (Readonly<{
|
|
100
|
+
id: string;
|
|
101
|
+
position: import("@dxos/util").Position;
|
|
102
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
103
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
104
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
105
|
+
type?: string;
|
|
106
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
107
|
+
}> | Readonly<{
|
|
108
|
+
id: string;
|
|
109
|
+
position: import("@dxos/util").Position;
|
|
110
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
111
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
112
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
113
|
+
type?: string;
|
|
114
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
115
|
+
}>[] | (Readonly<{
|
|
116
|
+
id: string;
|
|
117
|
+
position: import("@dxos/util").Position;
|
|
118
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
119
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
120
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
121
|
+
type?: string;
|
|
122
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
123
|
+
}> | Readonly<{
|
|
124
|
+
id: string;
|
|
125
|
+
position: import("@dxos/util").Position;
|
|
126
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
127
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
128
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
129
|
+
type?: string;
|
|
130
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
131
|
+
}>[] | (Readonly<{
|
|
132
|
+
id: string;
|
|
133
|
+
position: import("@dxos/util").Position;
|
|
134
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
135
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
136
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
137
|
+
type?: string;
|
|
138
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
139
|
+
}> | Readonly<{
|
|
140
|
+
id: string;
|
|
141
|
+
position: import("@dxos/util").Position;
|
|
142
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
143
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
144
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
145
|
+
type?: string;
|
|
146
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
147
|
+
}>[] | (Readonly<{
|
|
148
|
+
id: string;
|
|
149
|
+
position: import("@dxos/util").Position;
|
|
150
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
151
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
152
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
153
|
+
type?: string;
|
|
154
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
155
|
+
}> | Readonly<{
|
|
156
|
+
id: string;
|
|
157
|
+
position: import("@dxos/util").Position;
|
|
158
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
159
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
160
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
161
|
+
type?: string;
|
|
162
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
163
|
+
}>[] | (any[] | Readonly<{
|
|
164
|
+
id: string;
|
|
165
|
+
position: import("@dxos/util").Position;
|
|
166
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
167
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
168
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
169
|
+
type?: string;
|
|
170
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
171
|
+
}> | Readonly<{
|
|
172
|
+
id: string;
|
|
173
|
+
position: import("@dxos/util").Position;
|
|
174
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
175
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
176
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
177
|
+
type?: string;
|
|
178
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
179
|
+
}>[])[])[])[])[])[])[])[])[])[])[]>;
|
|
180
|
+
export default _default;
|
|
181
|
+
//# sourceMappingURL=app-graph-builder.d.ts.map
|
|
@@ -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;;qBAyEY,YACjD;sBAAsC,iBAEvC;uBAGS,iBAAY;sBACR,iBACb;;2BAAkE,iBAAiB;;;qBAIpE,YAAY;sBAAsC,iBAAiB;uBACrE,iBAAa;sBAEF,iBACzB;;2BAEY,iBACD;;;qBAGD,YAAE;sBAGa,iBAAiB;uBAAgD,iBACzF;sBAG0B,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAwF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAwF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAwF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAwF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAwF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAwF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAwF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAwF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAwF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;AAtGj7N,wBAqGI"}
|