@dxos/plugin-deck 0.7.5-main.9d26e3a → 0.7.5-main.b19bfc8
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-IYHAGFA3.mjs +151 -0
- package/dist/lib/browser/app-graph-builder-IYHAGFA3.mjs.map +7 -0
- package/dist/lib/browser/check-app-scheme-S3EYUPMF.mjs +33 -0
- package/dist/lib/browser/check-app-scheme-S3EYUPMF.mjs.map +7 -0
- package/dist/lib/browser/chunk-22AQ5IVX.mjs +17 -0
- package/dist/lib/browser/chunk-22AQ5IVX.mjs.map +7 -0
- package/dist/lib/browser/chunk-CYE6QZBQ.mjs +128 -0
- package/dist/lib/browser/chunk-CYE6QZBQ.mjs.map +7 -0
- package/dist/lib/browser/chunk-DIM5INBX.mjs +24 -0
- package/dist/lib/browser/chunk-DIM5INBX.mjs.map +7 -0
- package/dist/lib/browser/chunk-DIXE74SK.mjs +1097 -0
- package/dist/lib/browser/chunk-DIXE74SK.mjs.map +7 -0
- package/dist/lib/browser/chunk-KANJBSIX.mjs +97 -0
- package/dist/lib/browser/chunk-KANJBSIX.mjs.map +7 -0
- package/dist/lib/browser/{chunk-GVOGPULO.mjs → chunk-N7TEPFVR.mjs} +5 -4
- package/dist/lib/browser/chunk-N7TEPFVR.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +104 -1776
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/intent-resolver-MWUADUNI.mjs +488 -0
- package/dist/lib/browser/intent-resolver-MWUADUNI.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-root-IELFERPV.mjs +45 -0
- package/dist/lib/browser/react-root-IELFERPV.mjs.map +7 -0
- package/dist/lib/browser/react-surface-WL45R43W.mjs +39 -0
- package/dist/lib/browser/react-surface-WL45R43W.mjs.map +7 -0
- package/dist/lib/browser/settings-YONG3QB7.mjs +28 -0
- package/dist/lib/browser/settings-YONG3QB7.mjs.map +7 -0
- package/dist/lib/browser/state-MZZL5S2D.mjs +124 -0
- package/dist/lib/browser/state-MZZL5S2D.mjs.map +7 -0
- package/dist/lib/browser/tools-5LDJNU56.mjs +51 -0
- package/dist/lib/browser/tools-5LDJNU56.mjs.map +7 -0
- package/dist/lib/browser/types.mjs +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 +1 -5
- 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 +142 -0
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
- package/dist/types/src/capabilities/check-app-scheme.d.ts +4 -0
- package/dist/types/src/capabilities/check-app-scheme.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +190 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/intent-resolver.d.ts +4 -0
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root.d.ts +7 -0
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +4 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings.d.ts +4 -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 +4 -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 +5 -0
- package/dist/types/src/components/DeckLayout/Banner.d.ts.map +1 -0
- 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 -6
- package/dist/types/src/components/DeckLayout/Sidebar.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/SidebarButton.d.ts +7 -0
- package/dist/types/src/components/DeckLayout/SidebarButton.d.ts.map +1 -0
- 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 +2 -0
- package/dist/types/src/components/DeckLayout/Topbar.d.ts.map +1 -0
- 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 +4 -0
- package/dist/types/src/components/fragments.d.ts.map +1 -0
- 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 +5 -0
- package/dist/types/src/events.d.ts.map +1 -0
- 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/index.d.ts +3 -2
- package/dist/types/src/index.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 +4 -4
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +4 -2
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +121 -20
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +4 -2
- 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/useBreakpoints.d.ts +2 -0
- package/dist/types/src/util/useBreakpoints.d.ts.map +1 -0
- package/dist/types/src/util/useHoistStatusbar.d.ts +2 -0
- package/dist/types/src/util/useHoistStatusbar.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +32 -37
- package/src/DeckPlugin.ts +87 -0
- package/src/capabilities/app-graph-builder.ts +113 -0
- package/src/capabilities/capabilities.ts +15 -0
- package/src/capabilities/check-app-scheme.ts +44 -0
- package/src/capabilities/index.ts +17 -0
- package/src/capabilities/intent-resolver.ts +368 -0
- package/src/capabilities/react-root.tsx +46 -0
- package/src/capabilities/react-surface.tsx +31 -0
- package/src/capabilities/settings.ts +21 -0
- package/src/capabilities/state.ts +107 -0
- package/src/capabilities/tools.ts +61 -0
- package/src/capabilities/url-handler.ts +65 -0
- package/src/components/DeckLayout/ActiveNode.tsx +2 -3
- package/src/components/DeckLayout/Banner.tsx +37 -0
- package/src/components/DeckLayout/ComplementarySidebar.tsx +142 -59
- package/src/components/DeckLayout/ContentEmpty.tsx +9 -4
- package/src/components/DeckLayout/DeckLayout.tsx +151 -99
- package/src/components/DeckLayout/Fullscreen.tsx +2 -3
- package/src/components/DeckLayout/NodePlankHeading.tsx +64 -77
- package/src/components/DeckLayout/Plank.tsx +35 -43
- package/src/components/DeckLayout/PlankControls.tsx +12 -11
- package/src/components/DeckLayout/PlankError.tsx +6 -5
- package/src/components/DeckLayout/Sidebar.tsx +19 -9
- package/src/components/DeckLayout/SidebarButton.tsx +68 -0
- package/src/components/DeckLayout/StatusBar.tsx +6 -12
- package/src/components/DeckLayout/Toast.tsx +2 -2
- package/src/components/DeckLayout/Topbar.tsx +11 -0
- package/src/components/LayoutSettings.tsx +8 -8
- package/src/components/fragments.ts +14 -0
- package/src/components/index.ts +0 -2
- package/src/events.ts +12 -0
- package/src/hooks/useMainSize.ts +3 -3
- package/src/hooks/useNode.ts +3 -1
- package/src/index.ts +3 -4
- package/src/layout.ts +43 -212
- package/src/meta.ts +3 -2
- package/src/translations.ts +8 -6
- package/src/types.ts +104 -36
- package/src/util/index.ts +4 -2
- package/src/util/layoutAppliesTopbar.ts +7 -0
- package/src/util/set-active.ts +47 -0
- package/src/util/useBreakpoints.ts +11 -0
- package/src/util/useHoistStatusbar.ts +20 -0
- package/dist/lib/browser/chunk-GVOGPULO.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZC3K6C2W.mjs +0 -37
- package/dist/lib/browser/chunk-ZC3K6C2W.mjs.map +0 -7
- package/dist/lib/browser/meta.mjs +0 -9
- package/dist/lib/browser/meta.mjs.map +0 -7
- package/dist/types/src/components/DeckContext.d.ts +0 -8
- 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/check-app-scheme.d.ts +0 -2
- package/dist/types/src/util/check-app-scheme.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/DeckPlugin.tsx +0 -623
- package/src/components/DeckContext.ts +0 -14
- package/src/components/LayoutContext.ts +0 -12
- package/src/layout.test.ts +0 -380
- package/src/util/check-app-scheme.ts +0 -21
- package/src/util/layout-parts.ts +0 -12
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DeckCapabilities
|
|
3
|
+
} from "./chunk-22AQ5IVX.mjs";
|
|
4
|
+
import {
|
|
5
|
+
DECK_PLUGIN
|
|
6
|
+
} from "./chunk-N7TEPFVR.mjs";
|
|
7
|
+
|
|
8
|
+
// packages/plugins/plugin-deck/src/capabilities/app-graph-builder.ts
|
|
9
|
+
import { Capabilities, contributes, createIntent, LayoutAction } from "@dxos/app-framework";
|
|
10
|
+
import { AttentionCapabilities } from "@dxos/plugin-attention";
|
|
11
|
+
import { createExtension, ROOT_ID } from "@dxos/plugin-graph";
|
|
12
|
+
var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBuilder, createExtension({
|
|
13
|
+
id: DECK_PLUGIN,
|
|
14
|
+
filter: (node) => node.id === ROOT_ID,
|
|
15
|
+
actions: () => {
|
|
16
|
+
const state = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
17
|
+
const _fullscreen = {
|
|
18
|
+
id: `${LayoutAction.UpdateLayout._tag}/fullscreen`,
|
|
19
|
+
data: async () => {
|
|
20
|
+
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
21
|
+
await dispatch(createIntent(LayoutAction.SetLayoutMode, {
|
|
22
|
+
part: "mode",
|
|
23
|
+
options: {
|
|
24
|
+
mode: "fullscreen"
|
|
25
|
+
}
|
|
26
|
+
}));
|
|
27
|
+
},
|
|
28
|
+
properties: {
|
|
29
|
+
label: [
|
|
30
|
+
"toggle fullscreen label",
|
|
31
|
+
{
|
|
32
|
+
ns: DECK_PLUGIN
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
icon: "ph--arrows-out--regular",
|
|
36
|
+
keyBinding: {
|
|
37
|
+
macos: "ctrl+meta+f",
|
|
38
|
+
windows: "shift+ctrl+f"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const closeCurrent = {
|
|
43
|
+
id: `${LayoutAction.Close._tag}/current`,
|
|
44
|
+
data: async () => {
|
|
45
|
+
const attention = context.requestCapability(AttentionCapabilities.Attention);
|
|
46
|
+
const attended = attention.current.at(-1);
|
|
47
|
+
if (attended) {
|
|
48
|
+
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
49
|
+
await dispatch(createIntent(LayoutAction.Close, {
|
|
50
|
+
part: "main",
|
|
51
|
+
subject: [
|
|
52
|
+
attended
|
|
53
|
+
],
|
|
54
|
+
options: {
|
|
55
|
+
state: false
|
|
56
|
+
}
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
properties: {
|
|
61
|
+
label: [
|
|
62
|
+
"close current label",
|
|
63
|
+
{
|
|
64
|
+
ns: DECK_PLUGIN
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
icon: "ph--x--regular"
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const closeOthers = {
|
|
71
|
+
id: `${LayoutAction.Close._tag}/others`,
|
|
72
|
+
data: async () => {
|
|
73
|
+
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
74
|
+
const attention = context.requestCapability(AttentionCapabilities.Attention);
|
|
75
|
+
const attended = attention.current.at(-1);
|
|
76
|
+
const ids = state.deck.active.filter((id) => id !== attended) ?? [];
|
|
77
|
+
await dispatch(createIntent(LayoutAction.Close, {
|
|
78
|
+
part: "main",
|
|
79
|
+
subject: ids,
|
|
80
|
+
options: {
|
|
81
|
+
state: false
|
|
82
|
+
}
|
|
83
|
+
}));
|
|
84
|
+
},
|
|
85
|
+
properties: {
|
|
86
|
+
label: [
|
|
87
|
+
"close others label",
|
|
88
|
+
{
|
|
89
|
+
ns: DECK_PLUGIN
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
icon: "ph--x-square--regular"
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
const closeAll = {
|
|
96
|
+
id: `${LayoutAction.Close._tag}/all`,
|
|
97
|
+
data: async () => {
|
|
98
|
+
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
99
|
+
await dispatch(createIntent(LayoutAction.Close, {
|
|
100
|
+
part: "main",
|
|
101
|
+
subject: state.deck.active,
|
|
102
|
+
options: {
|
|
103
|
+
state: false
|
|
104
|
+
}
|
|
105
|
+
}));
|
|
106
|
+
},
|
|
107
|
+
properties: {
|
|
108
|
+
label: [
|
|
109
|
+
"close all label",
|
|
110
|
+
{
|
|
111
|
+
ns: DECK_PLUGIN
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
icon: "ph--x-circle--regular"
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
const toggleSidebar = {
|
|
118
|
+
id: `${LayoutAction.UpdateSidebar._tag}/nav`,
|
|
119
|
+
data: async () => {
|
|
120
|
+
state.sidebarState = state.sidebarState === "expanded" ? "collapsed" : "expanded";
|
|
121
|
+
},
|
|
122
|
+
properties: {
|
|
123
|
+
label: [
|
|
124
|
+
state.sidebarState === "expanded" ? "collapse navigation sidebar label" : "open navigation sidebar label",
|
|
125
|
+
{
|
|
126
|
+
ns: DECK_PLUGIN
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
icon: "ph--sidebar--regular",
|
|
130
|
+
keyBinding: {
|
|
131
|
+
macos: "meta+b"
|
|
132
|
+
},
|
|
133
|
+
disposition: "pin-end",
|
|
134
|
+
position: "hoist",
|
|
135
|
+
l0Breakpoint: "lg"
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
return !state.deck.solo ? [
|
|
139
|
+
closeCurrent,
|
|
140
|
+
closeOthers,
|
|
141
|
+
closeAll,
|
|
142
|
+
toggleSidebar
|
|
143
|
+
] : [
|
|
144
|
+
toggleSidebar
|
|
145
|
+
];
|
|
146
|
+
}
|
|
147
|
+
}));
|
|
148
|
+
export {
|
|
149
|
+
app_graph_builder_default as default
|
|
150
|
+
};
|
|
151
|
+
//# sourceMappingURL=app-graph-builder-IYHAGFA3.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, createIntent, LayoutAction, type PluginsContext } from '@dxos/app-framework';\nimport { AttentionCapabilities } from '@dxos/plugin-attention';\nimport { createExtension, type Node, ROOT_ID } from '@dxos/plugin-graph';\n\nimport { DeckCapabilities } from './capabilities';\nimport { DECK_PLUGIN } from '../meta';\n\nexport default (context: PluginsContext) =>\n contributes(\n Capabilities.AppGraphBuilder,\n createExtension({\n id: DECK_PLUGIN,\n filter: (node): node is Node<null> => node.id === ROOT_ID,\n actions: () => {\n const state = context.requestCapability(DeckCapabilities.MutableDeckState);\n\n // NOTE(Zan): This is currently disabled.\n // TODO(Zan): Fullscreen needs to know the active node and provide that to the layout part.\n const _fullscreen = {\n id: `${LayoutAction.UpdateLayout._tag}/fullscreen`,\n data: async () => {\n const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);\n await dispatch(createIntent(LayoutAction.SetLayoutMode, { part: 'mode', options: { mode: 'fullscreen' } }));\n },\n properties: {\n label: ['toggle fullscreen label', { ns: DECK_PLUGIN }],\n icon: 'ph--arrows-out--regular',\n keyBinding: {\n macos: 'ctrl+meta+f',\n windows: 'shift+ctrl+f',\n },\n },\n };\n\n const closeCurrent = {\n id: `${LayoutAction.Close._tag}/current`,\n data: async () => {\n const attention = context.requestCapability(AttentionCapabilities.Attention);\n const attended = attention.current.at(-1);\n if (attended) {\n const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);\n await dispatch(\n createIntent(LayoutAction.Close, { part: 'main', subject: [attended], options: { state: false } }),\n );\n }\n },\n properties: {\n label: ['close current label', { ns: DECK_PLUGIN }],\n icon: 'ph--x--regular',\n },\n };\n\n const closeOthers = {\n id: `${LayoutAction.Close._tag}/others`,\n data: async () => {\n const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);\n const attention = context.requestCapability(AttentionCapabilities.Attention);\n const attended = attention.current.at(-1);\n const ids = state.deck.active.filter((id) => id !== attended) ?? [];\n await dispatch(createIntent(LayoutAction.Close, { part: 'main', subject: ids, options: { state: false } }));\n },\n properties: {\n label: ['close others label', { ns: DECK_PLUGIN }],\n icon: 'ph--x-square--regular',\n },\n };\n\n const closeAll = {\n id: `${LayoutAction.Close._tag}/all`,\n data: async () => {\n const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);\n await dispatch(\n createIntent(LayoutAction.Close, {\n part: 'main',\n subject: state.deck.active,\n options: { state: false },\n }),\n );\n },\n properties: {\n label: ['close all label', { ns: DECK_PLUGIN }],\n icon: 'ph--x-circle--regular',\n },\n };\n\n const toggleSidebar = {\n id: `${LayoutAction.UpdateSidebar._tag}/nav`,\n data: async () => {\n state.sidebarState = state.sidebarState === 'expanded' ? 'collapsed' : 'expanded';\n },\n properties: {\n label: [\n state.sidebarState === 'expanded' ? 'collapse navigation sidebar label' : 'open navigation sidebar label',\n { ns: DECK_PLUGIN },\n ],\n icon: 'ph--sidebar--regular',\n keyBinding: {\n macos: 'meta+b',\n },\n disposition: 'pin-end',\n position: 'hoist',\n l0Breakpoint: 'lg',\n },\n };\n\n return !state.deck.solo ? [closeCurrent, closeOthers, closeAll, toggleSidebar] : [toggleSidebar];\n },\n }),\n );\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAIA,SAASA,cAAcC,aAAaC,cAAcC,oBAAyC;AAC3F,SAASC,6BAA6B;AACtC,SAASC,iBAA4BC,eAAe;AAKpD,IAAA,4BAAe,CAACC,YACdC,YACEC,aAAaC,iBACbC,gBAAgB;EACdC,IAAIC;EACJC,QAAQ,CAACC,SAA6BA,KAAKH,OAAOI;EAClDC,SAAS,MAAA;AACP,UAAMC,QAAQX,QAAQY,kBAAkBC,iBAAiBC,gBAAgB;AAIzE,UAAMC,cAAc;MAClBV,IAAI,GAAGW,aAAaC,aAAaC,IAAI;MACrCC,MAAM,YAAA;AACJ,cAAM,EAAEC,iBAAiBC,SAAQ,IAAKrB,QAAQY,kBAAkBV,aAAaoB,gBAAgB;AAC7F,cAAMD,SAASE,aAAaP,aAAaQ,eAAe;UAAEC,MAAM;UAAQC,SAAS;YAAEC,MAAM;UAAa;QAAE,CAAA,CAAA;MAC1G;MACAC,YAAY;QACVC,OAAO;UAAC;UAA2B;YAAEC,IAAIxB;UAAY;;QACrDyB,MAAM;QACNC,YAAY;UACVC,OAAO;UACPC,SAAS;QACX;MACF;IACF;AAEA,UAAMC,eAAe;MACnB9B,IAAI,GAAGW,aAAaoB,MAAMlB,IAAI;MAC9BC,MAAM,YAAA;AACJ,cAAMkB,YAAYrC,QAAQY,kBAAkB0B,sBAAsBC,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AAM;QAC1B,CAAA,CAAA;MAEJ;MACAiB,YAAY;QACVC,OAAO;UAAC;UAAmB;YAAEC,IAAIxB;UAAY;;QAC7CyB,MAAM;MACR;IACF;AAEA,UAAMkB,gBAAgB;MACpB5C,IAAI,GAAGW,aAAakC,cAAchC,IAAI;MACtCC,MAAM,YAAA;AACJR,cAAMwC,eAAexC,MAAMwC,iBAAiB,aAAa,cAAc;MACzE;MACAvB,YAAY;QACVC,OAAO;UACLlB,MAAMwC,iBAAiB,aAAa,sCAAsC;UAC1E;YAAErB,IAAIxB;UAAY;;QAEpByB,MAAM;QACNC,YAAY;UACVC,OAAO;QACT;QACAmB,aAAa;QACbC,UAAU;QACVC,cAAc;MAChB;IACF;AAEA,WAAO,CAAC3C,MAAMmC,KAAKS,OAAO;MAACpB;MAAcS;MAAaI;MAAUC;QAAiB;MAACA;;EACpF;AACF,CAAA,CAAA;",
|
|
6
|
+
"names": ["Capabilities", "contributes", "createIntent", "LayoutAction", "AttentionCapabilities", "createExtension", "ROOT_ID", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "DECK_PLUGIN", "filter", "node", "ROOT_ID", "actions", "state", "requestCapability", "DeckCapabilities", "MutableDeckState", "_fullscreen", "LayoutAction", "UpdateLayout", "_tag", "data", "dispatchPromise", "dispatch", "IntentDispatcher", "createIntent", "SetLayoutMode", "part", "options", "mode", "properties", "label", "ns", "icon", "keyBinding", "macos", "windows", "closeCurrent", "Close", "attention", "AttentionCapabilities", "Attention", "attended", "current", "at", "subject", "closeOthers", "ids", "deck", "active", "closeAll", "toggleSidebar", "UpdateSidebar", "sidebarState", "disposition", "position", "l0Breakpoint", "solo"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DECK_PLUGIN
|
|
3
|
+
} from "./chunk-N7TEPFVR.mjs";
|
|
4
|
+
|
|
5
|
+
// packages/plugins/plugin-deck/src/capabilities/check-app-scheme.ts
|
|
6
|
+
import { Capabilities, contributes } from "@dxos/app-framework";
|
|
7
|
+
var isSocket = !!globalThis.__args;
|
|
8
|
+
var appScheme = "composer://";
|
|
9
|
+
var checkAppScheme = (url) => {
|
|
10
|
+
const iframe = document.createElement("iframe");
|
|
11
|
+
iframe.style.display = "none";
|
|
12
|
+
document.body.appendChild(iframe);
|
|
13
|
+
iframe.src = url + window.location.pathname.replace(/^\/+/, "") + window.location.search;
|
|
14
|
+
const timer = setTimeout(() => {
|
|
15
|
+
document.body.removeChild(iframe);
|
|
16
|
+
}, 3e3);
|
|
17
|
+
window.addEventListener("pagehide", (event) => {
|
|
18
|
+
clearTimeout(timer);
|
|
19
|
+
document.body.removeChild(iframe);
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var check_app_scheme_default = async (context) => {
|
|
23
|
+
const settingsStore = context.requestCapability(Capabilities.SettingsStore);
|
|
24
|
+
const settings = settingsStore.getStore(DECK_PLUGIN)?.value;
|
|
25
|
+
if (!isSocket && settings?.enableNativeRedirect) {
|
|
26
|
+
checkAppScheme(appScheme);
|
|
27
|
+
}
|
|
28
|
+
return contributes(Capabilities.Null, null);
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
check_app_scheme_default as default
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=check-app-scheme-S3EYUPMF.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/check-app-scheme.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, type PluginsContext } from '@dxos/app-framework';\n\nimport { DECK_PLUGIN } from '../meta';\nimport { type DeckSettingsProps } from '../types';\n\nconst isSocket = !!(globalThis as any).__args;\n\n// TODO(mjamesderocher): Can we get this directly from Socket?\nconst appScheme = 'composer://';\n\n// TODO(mjamesderocher): Factor out as part of NavigationPlugin.\nconst checkAppScheme = (url: string) => {\n const iframe = document.createElement('iframe');\n iframe.style.display = 'none';\n document.body.appendChild(iframe);\n\n iframe.src = url + window.location.pathname.replace(/^\\/+/, '') + window.location.search;\n\n const timer = setTimeout(() => {\n document.body.removeChild(iframe);\n }, 3000);\n\n window.addEventListener('pagehide', (event) => {\n clearTimeout(timer);\n document.body.removeChild(iframe);\n });\n};\n\nexport default async (context: PluginsContext) => {\n const settingsStore = context.requestCapability(Capabilities.SettingsStore);\n const settings = settingsStore.getStore<DeckSettingsProps>(DECK_PLUGIN)?.value;\n if (!isSocket && settings?.enableNativeRedirect) {\n checkAppScheme(appScheme);\n }\n\n return contributes(Capabilities.Null, null);\n};\n"],
|
|
5
|
+
"mappings": ";;;;;AAOA,SAASA,cAAcC,mBAAwC;AAK/D,IAAMC,WAAW,CAAC,CAAEC,WAAmBC;AAGvC,IAAMC,YAAY;AAGlB,IAAMC,iBAAiB,CAACC,QAAAA;AACtB,QAAMC,SAASC,SAASC,cAAc,QAAA;AACtCF,SAAOG,MAAMC,UAAU;AACvBH,WAASI,KAAKC,YAAYN,MAAAA;AAE1BA,SAAOO,MAAMR,MAAMS,OAAOC,SAASC,SAASC,QAAQ,QAAQ,EAAA,IAAMH,OAAOC,SAASG;AAElF,QAAMC,QAAQC,WAAW,MAAA;AACvBb,aAASI,KAAKU,YAAYf,MAAAA;EAC5B,GAAG,GAAA;AAEHQ,SAAOQ,iBAAiB,YAAY,CAACC,UAAAA;AACnCC,iBAAaL,KAAAA;AACbZ,aAASI,KAAKU,YAAYf,MAAAA;EAC5B,CAAA;AACF;AAEA,IAAA,2BAAe,OAAOmB,YAAAA;AACpB,QAAMC,gBAAgBD,QAAQE,kBAAkBC,aAAaC,aAAa;AAC1E,QAAMC,WAAWJ,cAAcK,SAA4BC,WAAAA,GAAcC;AACzE,MAAI,CAACjC,YAAY8B,UAAUI,sBAAsB;AAC/C9B,mBAAeD,SAAAA;EACjB;AAEA,SAAOgC,YAAYP,aAAaQ,MAAM,IAAA;AACxC;",
|
|
6
|
+
"names": ["Capabilities", "contributes", "isSocket", "globalThis", "__args", "appScheme", "checkAppScheme", "url", "iframe", "document", "createElement", "style", "display", "body", "appendChild", "src", "window", "location", "pathname", "replace", "search", "timer", "setTimeout", "removeChild", "addEventListener", "event", "clearTimeout", "context", "settingsStore", "requestCapability", "Capabilities", "SettingsStore", "settings", "getStore", "DECK_PLUGIN", "value", "enableNativeRedirect", "contributes", "Null"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DECK_PLUGIN
|
|
3
|
+
} from "./chunk-N7TEPFVR.mjs";
|
|
4
|
+
|
|
5
|
+
// packages/plugins/plugin-deck/src/capabilities/capabilities.ts
|
|
6
|
+
import { defineCapability } from "@dxos/app-framework";
|
|
7
|
+
var DeckCapabilities;
|
|
8
|
+
(function(DeckCapabilities2) {
|
|
9
|
+
DeckCapabilities2.DeckState = defineCapability(`${DECK_PLUGIN}/capability/state`);
|
|
10
|
+
DeckCapabilities2.MutableDeckState = defineCapability(`${DECK_PLUGIN}/capability/state`);
|
|
11
|
+
DeckCapabilities2.ComplementaryPanel = defineCapability(`${DECK_PLUGIN}/capability/complementary-panel`);
|
|
12
|
+
})(DeckCapabilities || (DeckCapabilities = {}));
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
DeckCapabilities
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=chunk-22AQ5IVX.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/capabilities.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineCapability } from '@dxos/app-framework';\nimport { type DeepReadonly } from '@dxos/util';\n\nimport { DECK_PLUGIN } from '../meta';\nimport { type DeckState, type Panel } from '../types';\n\nexport namespace DeckCapabilities {\n export const DeckState = defineCapability<DeepReadonly<DeckState>>(`${DECK_PLUGIN}/capability/state`);\n export const MutableDeckState = defineCapability<DeckState>(`${DECK_PLUGIN}/capability/state`);\n export const ComplementaryPanel = defineCapability<Panel>(`${DECK_PLUGIN}/capability/complementary-panel`);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,SAASA,wBAAwB;;UAMhBC,mBAAAA;oBACFC,YAAYC,iBAA0C,GAAGC,WAAAA,mBAA8B;oBACvFC,mBAAmBF,iBAA4B,GAAGC,WAAAA,mBAA8B;oBAChFE,qBAAqBH,iBAAwB,GAAGC,WAAAA,iCAA4C;AAC3G,GAJiBH,qBAAAA,mBAAAA,CAAAA,EAAAA;",
|
|
6
|
+
"names": ["defineCapability", "DeckCapabilities", "DeckState", "defineCapability", "DECK_PLUGIN", "MutableDeckState", "ComplementaryPanel"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DECK_PLUGIN
|
|
3
|
+
} from "./chunk-N7TEPFVR.mjs";
|
|
4
|
+
|
|
5
|
+
// packages/plugins/plugin-deck/src/types.ts
|
|
6
|
+
import { LayoutAction } from "@dxos/app-framework";
|
|
7
|
+
import { S } from "@dxos/echo-schema";
|
|
8
|
+
var NewPlankPositions = [
|
|
9
|
+
"start",
|
|
10
|
+
"end"
|
|
11
|
+
];
|
|
12
|
+
var OverscrollOptions = [
|
|
13
|
+
"none",
|
|
14
|
+
"centering"
|
|
15
|
+
];
|
|
16
|
+
var DeckSettingsSchema = S.mutable(S.Struct({
|
|
17
|
+
showHints: S.Boolean,
|
|
18
|
+
enableNativeRedirect: S.Boolean,
|
|
19
|
+
enableIdeStyleStatusbar: S.Boolean,
|
|
20
|
+
newPlankPositioning: S.Literal(...NewPlankPositions),
|
|
21
|
+
overscroll: S.Literal(...OverscrollOptions)
|
|
22
|
+
}));
|
|
23
|
+
var LayoutMode = S.Union(S.Literal("deck"), S.Literal("solo"), S.Literal("fullscreen"));
|
|
24
|
+
var isLayoutMode = (value) => S.is(LayoutMode)(value);
|
|
25
|
+
var PlankSizing = S.Record({
|
|
26
|
+
key: S.String,
|
|
27
|
+
value: S.Number
|
|
28
|
+
});
|
|
29
|
+
var Deck = S.Struct({
|
|
30
|
+
initialized: S.Boolean.annotations({
|
|
31
|
+
description: "If false, the deck has not yet left solo mode and new planks should be solo'd."
|
|
32
|
+
}),
|
|
33
|
+
active: S.mutable(S.Array(S.String)),
|
|
34
|
+
inactive: S.mutable(S.Array(S.String)),
|
|
35
|
+
solo: S.optional(S.String),
|
|
36
|
+
fullscreen: S.Boolean,
|
|
37
|
+
plankSizing: S.mutable(PlankSizing)
|
|
38
|
+
});
|
|
39
|
+
var DeckState = S.mutable(S.Struct({
|
|
40
|
+
sidebarState: S.Literal("closed", "collapsed", "expanded"),
|
|
41
|
+
complementarySidebarState: S.Literal("closed", "collapsed", "expanded"),
|
|
42
|
+
complementarySidebarPanel: S.optional(S.String),
|
|
43
|
+
dialogOpen: S.Boolean,
|
|
44
|
+
/**
|
|
45
|
+
* Data to be passed to the dialog Surface.
|
|
46
|
+
*/
|
|
47
|
+
dialogContent: S.optional(S.Any),
|
|
48
|
+
dialogBlockAlign: S.optional(S.Literal("start", "center", "end")),
|
|
49
|
+
dialogType: S.optional(S.Literal("default", "alert")),
|
|
50
|
+
popoverOpen: S.Boolean,
|
|
51
|
+
popoverSide: S.optional(S.Literal("top", "right", "bottom", "left")),
|
|
52
|
+
/**
|
|
53
|
+
* Data to be passed to the popover Surface.
|
|
54
|
+
*/
|
|
55
|
+
popoverContent: S.optional(S.Any),
|
|
56
|
+
popoverAnchorId: S.optional(S.String),
|
|
57
|
+
toasts: S.mutable(S.Array(LayoutAction.Toast)),
|
|
58
|
+
currentUndoId: S.optional(S.String),
|
|
59
|
+
activeDeck: S.String,
|
|
60
|
+
previousDeck: S.String,
|
|
61
|
+
decks: S.mutable(S.Record({
|
|
62
|
+
key: S.String,
|
|
63
|
+
value: S.mutable(Deck)
|
|
64
|
+
})),
|
|
65
|
+
previousMode: S.mutable(S.Record({
|
|
66
|
+
key: S.String,
|
|
67
|
+
value: LayoutMode
|
|
68
|
+
})),
|
|
69
|
+
deck: S.mutable(Deck),
|
|
70
|
+
/**
|
|
71
|
+
* The identifier of a component to scroll into view when it is mounted.
|
|
72
|
+
*/
|
|
73
|
+
scrollIntoView: S.optional(S.String)
|
|
74
|
+
}));
|
|
75
|
+
var getMode = (deck) => {
|
|
76
|
+
if (deck.solo) {
|
|
77
|
+
return deck.fullscreen ? "fullscreen" : "solo";
|
|
78
|
+
}
|
|
79
|
+
return "deck";
|
|
80
|
+
};
|
|
81
|
+
var SLUG_PATH_SEPARATOR = "~";
|
|
82
|
+
var DECK_ACTION = `${DECK_PLUGIN}/action`;
|
|
83
|
+
var DeckAction;
|
|
84
|
+
(function(DeckAction2) {
|
|
85
|
+
const PartAdjustmentSchema = S.Union(S.Literal("close").annotations({
|
|
86
|
+
description: "Close the plank."
|
|
87
|
+
}), S.Literal("solo").annotations({
|
|
88
|
+
description: "Solo the plank."
|
|
89
|
+
}), S.Literal("increment-start").annotations({
|
|
90
|
+
description: "Move the plank towards the start of the deck."
|
|
91
|
+
}), S.Literal("increment-end").annotations({
|
|
92
|
+
description: "Move the plank towards the end of the deck."
|
|
93
|
+
}));
|
|
94
|
+
DeckAction2.Adjustment = S.mutable(S.Struct({
|
|
95
|
+
id: S.String,
|
|
96
|
+
type: PartAdjustmentSchema
|
|
97
|
+
}));
|
|
98
|
+
class Adjust extends S.TaggedClass()(`${DECK_ACTION}/adjust`, {
|
|
99
|
+
input: DeckAction2.Adjustment,
|
|
100
|
+
output: S.Void
|
|
101
|
+
}) {
|
|
102
|
+
}
|
|
103
|
+
DeckAction2.Adjust = Adjust;
|
|
104
|
+
class UpdatePlankSize extends S.TaggedClass()(`${DECK_ACTION}/update-plank-size`, {
|
|
105
|
+
input: S.Struct({
|
|
106
|
+
id: S.String,
|
|
107
|
+
size: S.Number
|
|
108
|
+
}),
|
|
109
|
+
output: S.Void
|
|
110
|
+
}) {
|
|
111
|
+
}
|
|
112
|
+
DeckAction2.UpdatePlankSize = UpdatePlankSize;
|
|
113
|
+
})(DeckAction || (DeckAction = {}));
|
|
114
|
+
|
|
115
|
+
export {
|
|
116
|
+
NewPlankPositions,
|
|
117
|
+
OverscrollOptions,
|
|
118
|
+
DeckSettingsSchema,
|
|
119
|
+
isLayoutMode,
|
|
120
|
+
PlankSizing,
|
|
121
|
+
Deck,
|
|
122
|
+
DeckState,
|
|
123
|
+
getMode,
|
|
124
|
+
SLUG_PATH_SEPARATOR,
|
|
125
|
+
DECK_ACTION,
|
|
126
|
+
DeckAction
|
|
127
|
+
};
|
|
128
|
+
//# sourceMappingURL=chunk-CYE6QZBQ.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { LayoutAction } from '@dxos/app-framework';\nimport { S } from '@dxos/echo-schema';\nimport { type Node } from '@dxos/plugin-graph';\nimport { type Label } from '@dxos/react-ui';\n\nimport { DECK_PLUGIN } from './meta';\n\n// TODO(Zan): In the future we should consider adding new planks adjacent to the attended plank.\nexport const NewPlankPositions = ['start', 'end'] as const;\nexport type NewPlankPositioning = (typeof NewPlankPositions)[number];\n\nexport const OverscrollOptions = ['none', 'centering'] as const;\nexport type Overscroll = (typeof OverscrollOptions)[number];\n\nexport type Panel = {\n id: string;\n label: Label;\n icon: string;\n filter?: (node: Node) => boolean;\n};\n\nexport const DeckSettingsSchema = S.mutable(\n S.Struct({\n showHints: S.Boolean,\n enableNativeRedirect: S.Boolean,\n enableIdeStyleStatusbar: S.Boolean,\n newPlankPositioning: S.Literal(...NewPlankPositions),\n overscroll: S.Literal(...OverscrollOptions),\n }),\n);\n\nexport type DeckSettingsProps = S.Schema.Type<typeof DeckSettingsSchema>;\n\nconst LayoutMode = S.Union(S.Literal('deck'), S.Literal('solo'), S.Literal('fullscreen'));\nexport const isLayoutMode = (value: any): value is LayoutMode => S.is(LayoutMode)(value);\nexport type LayoutMode = S.Schema.Type<typeof LayoutMode>;\n\nexport const PlankSizing = S.Record({ key: S.String, value: S.Number });\nexport type PlankSizing = S.Schema.Type<typeof PlankSizing>;\n\nexport const Deck = S.Struct({\n initialized: S.Boolean.annotations({\n description: \"If false, the deck has not yet left solo mode and new planks should be solo'd.\",\n }),\n active: S.mutable(S.Array(S.String)),\n inactive: S.mutable(S.Array(S.String)),\n solo: S.optional(S.String),\n fullscreen: S.Boolean,\n plankSizing: S.mutable(PlankSizing),\n});\nexport type Deck = S.Schema.Type<typeof Deck>;\n\nexport const DeckState = S.mutable(\n S.Struct({\n sidebarState: S.Literal('closed', 'collapsed', 'expanded'),\n complementarySidebarState: S.Literal('closed', 'collapsed', 'expanded'),\n complementarySidebarPanel: S.optional(S.String),\n\n dialogOpen: S.Boolean,\n /**\n * Data to be passed to the dialog Surface.\n */\n dialogContent: S.optional(S.Any),\n dialogBlockAlign: S.optional(S.Literal('start', 'center', 'end')),\n dialogType: S.optional(S.Literal('default', 'alert')),\n\n popoverOpen: S.Boolean,\n popoverSide: S.optional(S.Literal('top', 'right', 'bottom', 'left')),\n /**\n * Data to be passed to the popover Surface.\n */\n popoverContent: S.optional(S.Any),\n popoverAnchorId: S.optional(S.String),\n\n toasts: S.mutable(S.Array(LayoutAction.Toast)),\n currentUndoId: S.optional(S.String),\n\n activeDeck: S.String,\n previousDeck: S.String,\n decks: S.mutable(S.Record({ key: S.String, value: S.mutable(Deck) })),\n previousMode: S.mutable(S.Record({ key: S.String, value: LayoutMode })),\n deck: S.mutable(Deck),\n\n /**\n * The identifier of a component to scroll into view when it is mounted.\n */\n scrollIntoView: S.optional(S.String),\n }),\n);\n\nexport type DeckState = S.Schema.Type<typeof DeckState>;\n\nexport const getMode = (deck: Deck): LayoutMode => {\n if (deck.solo) {\n return deck.fullscreen ? 'fullscreen' : 'solo';\n }\n\n return 'deck';\n};\n\n// NOTE: Chosen from RFC 1738’s `safe` characters: http://www.faqs.org/rfcs/rfc1738.html\nexport const SLUG_PATH_SEPARATOR = '~';\n\nexport const DECK_ACTION = `${DECK_PLUGIN}/action`;\n\nexport namespace DeckAction {\n const PartAdjustmentSchema = S.Union(\n S.Literal('close').annotations({ description: 'Close the plank.' }),\n S.Literal('solo').annotations({ description: 'Solo the plank.' }),\n S.Literal('increment-start').annotations({ description: 'Move the plank towards the start of the deck.' }),\n S.Literal('increment-end').annotations({ description: 'Move the plank towards the end of the deck.' }),\n );\n export type PartAdjustment = S.Schema.Type<typeof PartAdjustmentSchema>;\n export const Adjustment = S.mutable(S.Struct({ id: S.String, type: PartAdjustmentSchema }));\n export type Adjustment = S.Schema.Type<typeof Adjustment>;\n\n /**\n * An atomic transaction to apply to the deck, describing which element to move to which location.\n */\n export class Adjust extends S.TaggedClass<Adjust>()(`${DECK_ACTION}/adjust`, {\n input: Adjustment,\n output: S.Void,\n }) {}\n\n export class UpdatePlankSize extends S.TaggedClass<UpdatePlankSize>()(`${DECK_ACTION}/update-plank-size`, {\n input: S.Struct({\n id: S.String,\n size: S.Number,\n }),\n output: S.Void,\n }) {}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,SAASA,oBAAoB;AAC7B,SAASC,SAAS;AAOX,IAAMC,oBAAoB;EAAC;EAAS;;AAGpC,IAAMC,oBAAoB;EAAC;EAAQ;;AAUnC,IAAMC,qBAAqBC,EAAEC,QAClCD,EAAEE,OAAO;EACPC,WAAWH,EAAEI;EACbC,sBAAsBL,EAAEI;EACxBE,yBAAyBN,EAAEI;EAC3BG,qBAAqBP,EAAEQ,QAAO,GAAIX,iBAAAA;EAClCY,YAAYT,EAAEQ,QAAO,GAAIV,iBAAAA;AAC3B,CAAA,CAAA;AAKF,IAAMY,aAAaV,EAAEW,MAAMX,EAAEQ,QAAQ,MAAA,GAASR,EAAEQ,QAAQ,MAAA,GAASR,EAAEQ,QAAQ,YAAA,CAAA;A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gE,YAAW,EAAoB,GAAGR,WAAAA,sBAAiC;IACxGS,OAAOjE,EAAEE,OAAO;MACd2D,IAAI7D,EAAEkB;MACNmD,MAAMrE,EAAEmB;IACV,CAAA;IACA+C,QAAQlE,EAAEmE;EACZ,CAAA,EAAA;EAAI;cANSC,kBAAAA;AAOf,GA1BiBV,eAAAA,aAAAA,CAAAA,EAAAA;",
|
|
6
|
+
"names": ["LayoutAction", "S", "NewPlankPositions", "OverscrollOptions", "DeckSettingsSchema", "S", "mutable", "Struct", "showHints", "Boolean", "enableNativeRedirect", "enableIdeStyleStatusbar", "newPlankPositioning", "Literal", "overscroll", "LayoutMode", "Union", "isLayoutMode", "value", "is", "PlankSizing", "Record", "key", "String", "Number", "Deck", "initialized", "annotations", "description", "active", "Array", "inactive", "solo", "optional", "fullscreen", "plankSizing", "DeckState", "sidebarState", "complementarySidebarState", "complementarySidebarPanel", "dialogOpen", "dialogContent", "Any", "dialogBlockAlign", "dialogType", "popoverOpen", "popoverSide", "popoverContent", "popoverAnchorId", "toasts", "LayoutAction", "Toast", "currentUndoId", "activeDeck", "previousDeck", "decks", "previousMode", "deck", "scrollIntoView", "getMode", "SLUG_PATH_SEPARATOR", "DECK_ACTION", "DECK_PLUGIN", "DeckAction", "PartAdjustmentSchema", "Adjustment", "id", "type", "Adjust", "TaggedClass", "input", "output", "Void", "UpdatePlankSize", "size"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// packages/plugins/plugin-deck/src/capabilities/index.ts
|
|
2
|
+
import { lazy } from "@dxos/app-framework";
|
|
3
|
+
var AppGraphBuilder = lazy(() => import("./app-graph-builder-IYHAGFA3.mjs"));
|
|
4
|
+
var CheckAppScheme = lazy(() => import("./check-app-scheme-S3EYUPMF.mjs"));
|
|
5
|
+
var LayoutIntentResolver = lazy(() => import("./intent-resolver-MWUADUNI.mjs"));
|
|
6
|
+
var ReactRoot = lazy(() => import("./react-root-IELFERPV.mjs"));
|
|
7
|
+
var ReactSurface = lazy(() => import("./react-surface-WL45R43W.mjs"));
|
|
8
|
+
var DeckSettings = lazy(() => import("./settings-YONG3QB7.mjs"));
|
|
9
|
+
var DeckState = lazy(() => import("./state-MZZL5S2D.mjs"));
|
|
10
|
+
var Tools = lazy(() => import("./tools-5LDJNU56.mjs"));
|
|
11
|
+
var UrlHandler = lazy(() => import("./url-handler-MVHTKUYA.mjs"));
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
AppGraphBuilder,
|
|
15
|
+
CheckAppScheme,
|
|
16
|
+
LayoutIntentResolver,
|
|
17
|
+
ReactRoot,
|
|
18
|
+
ReactSurface,
|
|
19
|
+
DeckSettings,
|
|
20
|
+
DeckState,
|
|
21
|
+
Tools,
|
|
22
|
+
UrlHandler
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=chunk-DIM5INBX.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = lazy(() => import('./app-graph-builder'));\nexport const CheckAppScheme = lazy(() => import('./check-app-scheme'));\nexport const LayoutIntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactRoot = lazy(() => import('./react-root'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\nexport const DeckSettings = lazy(() => import('./settings'));\nexport const DeckState = lazy(() => import('./state'));\nexport const Tools = lazy(() => import('./tools'));\nexport const UrlHandler = lazy(() => import('./url-handler'));\n\nexport * from './capabilities';\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,YAAY;AAEd,IAAMC,kBAAkBC,KAAK,MAAM,OAAO,kCAAA,CAAA;AAC1C,IAAMC,iBAAiBD,KAAK,MAAM,OAAO,iCAAA,CAAA;AACzC,IAAME,uBAAuBF,KAAK,MAAM,OAAO,gCAAA,CAAA;AAC/C,IAAMG,YAAYH,KAAK,MAAM,OAAO,2BAAA,CAAA;AACpC,IAAMI,eAAeJ,KAAK,MAAM,OAAO,8BAAA,CAAA;AACvC,IAAMK,eAAeL,KAAK,MAAM,OAAO,yBAAA,CAAA;AACvC,IAAMM,YAAYN,KAAK,MAAM,OAAO,sBAAA,CAAA;AACpC,IAAMO,QAAQP,KAAK,MAAM,OAAO,sBAAA,CAAA;AAChC,IAAMQ,aAAaR,KAAK,MAAM,OAAO,4BAAA,CAAA;",
|
|
6
|
+
"names": ["lazy", "AppGraphBuilder", "lazy", "CheckAppScheme", "LayoutIntentResolver", "ReactRoot", "ReactSurface", "DeckSettings", "DeckState", "Tools", "UrlHandler"]
|
|
7
|
+
}
|