@dxos/plugin-deck 0.8.2-main.f11618f → 0.8.2-staging.42af850
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-VYZ4IWI3.mjs → app-graph-builder-M5BT34YG.mjs} +17 -16
- package/dist/lib/browser/app-graph-builder-M5BT34YG.mjs.map +7 -0
- package/dist/lib/browser/{check-app-scheme-O7JPE4TM.mjs → check-app-scheme-7AXGR6UT.mjs} +2 -2
- package/dist/lib/browser/check-app-scheme-7AXGR6UT.mjs.map +7 -0
- package/dist/lib/browser/{state-Z6UY2Z3M.mjs → chunk-FX44YX3G.mjs} +7 -5
- package/dist/lib/browser/chunk-FX44YX3G.mjs.map +7 -0
- package/dist/lib/browser/chunk-JE2ARGEB.mjs +1487 -0
- package/dist/lib/browser/chunk-JE2ARGEB.mjs.map +7 -0
- package/dist/lib/browser/{chunk-XMCG42ID.mjs → chunk-KLN73CM3.mjs} +2 -2
- package/dist/lib/browser/{chunk-XMCG42ID.mjs.map → chunk-KLN73CM3.mjs.map} +1 -1
- package/dist/lib/browser/chunk-SLQNOATN.mjs +127 -0
- package/dist/lib/browser/chunk-SLQNOATN.mjs.map +7 -0
- package/dist/lib/browser/chunk-TRFYUEBA.mjs +145 -0
- package/dist/lib/browser/chunk-TRFYUEBA.mjs.map +7 -0
- package/dist/lib/browser/chunk-YN5OZEGS.mjs +162 -0
- package/dist/lib/browser/chunk-YN5OZEGS.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +6 -8
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/{intent-resolver-JKWXWUV6.mjs → intent-resolver-3GAC57UA.mjs} +84 -66
- package/dist/lib/browser/intent-resolver-3GAC57UA.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-S6ZAKNZA.mjs → react-root-ISFFOJZX.mjs} +7 -7
- package/dist/lib/browser/{react-surface-I7WZBOGM.mjs → react-surface-A63RQB5N.mjs} +7 -7
- package/dist/lib/browser/{settings-6NU7CF2B.mjs → settings-X7GDEXU3.mjs} +4 -4
- package/dist/lib/browser/{settings-6NU7CF2B.mjs.map → settings-X7GDEXU3.mjs.map} +3 -3
- package/dist/lib/browser/state-VJ6E3ADY.mjs +10 -0
- package/dist/lib/browser/state-VJ6E3ADY.mjs.map +7 -0
- package/dist/lib/browser/{tools-VDVQTJMD.mjs → tools-N57NQ2LH.mjs} +28 -18
- package/dist/lib/browser/tools-N57NQ2LH.mjs.map +7 -0
- package/dist/lib/browser/types.mjs +1 -1
- package/dist/lib/browser/{url-handler-3CARFXQK.mjs → url-handler-BUGI6XRE.mjs} +5 -5
- package/dist/lib/browser/url-handler-BUGI6XRE.mjs.map +7 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -179
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +10 -2
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/check-app-scheme.d.ts +2 -2
- package/dist/types/src/capabilities/check-app-scheme.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +6 -181
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +7 -3
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/tools.d.ts +1 -1
- package/dist/types/src/capabilities/tools.d.ts.map +1 -1
- package/dist/types/src/capabilities/url-handler.d.ts +2 -2
- package/dist/types/src/capabilities/url-handler.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Banner.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Popover.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/StatusBar.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
- package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +1 -1
- package/dist/types/src/components/Plank/Plank.d.ts +18 -5
- package/dist/types/src/components/Plank/Plank.d.ts.map +1 -1
- package/dist/types/src/components/Plank/Plank.stories.d.ts +3 -3
- package/dist/types/src/components/Plank/Plank.stories.d.ts.map +1 -1
- package/dist/types/src/components/Plank/PlankControls.d.ts +1 -0
- package/dist/types/src/components/Plank/PlankControls.d.ts.map +1 -1
- package/dist/types/src/components/Plank/PlankError.d.ts.map +1 -1
- package/dist/types/src/components/Plank/PlankHeading.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/SidebarButton.d.ts +2 -1
- package/dist/types/src/components/Sidebar/SidebarButton.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +5 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBreakpoints.d.ts.map +1 -0
- package/dist/types/src/hooks/useCompanions.d.ts.map +1 -0
- package/dist/types/src/hooks/useDeckCompanions.d.ts +13 -0
- package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -0
- package/dist/types/src/hooks/useHoistStatusbar.d.ts.map +1 -0
- package/dist/types/src/hooks/useNodeActionExpander.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/layout.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +0 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +106 -104
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +1 -4
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/layoutAppliesTopbar.d.ts.map +1 -1
- package/dist/types/src/util/overscroll.d.ts.map +1 -1
- package/dist/types/src/util/set-active.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +38 -30
- package/src/capabilities/app-graph-builder.ts +120 -92
- package/src/capabilities/check-app-scheme.ts +3 -5
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/intent-resolver.ts +100 -78
- package/src/capabilities/settings.ts +2 -2
- package/src/capabilities/state.ts +4 -2
- package/src/capabilities/tools.ts +15 -12
- package/src/capabilities/url-handler.ts +4 -4
- package/src/components/DeckLayout/ContentEmpty.tsx +3 -2
- package/src/components/DeckLayout/DeckLayout.tsx +12 -10
- package/src/components/DeckLayout/Dialog.tsx +2 -2
- package/src/components/Plank/Plank.stories.tsx +20 -8
- package/src/components/Plank/Plank.tsx +101 -68
- package/src/components/Plank/PlankControls.tsx +15 -25
- package/src/components/Plank/PlankHeading.tsx +22 -10
- package/src/components/Sidebar/ComplementarySidebar.tsx +7 -38
- package/src/components/Sidebar/Sidebar.tsx +2 -1
- package/src/components/Sidebar/SidebarButton.tsx +26 -7
- package/src/components/fragments.ts +1 -1
- package/src/hooks/index.ts +5 -1
- package/src/{util → hooks}/useCompanions.ts +3 -3
- package/src/hooks/useDeckCompanions.ts +33 -0
- package/src/hooks/useNodeActionExpander.ts +3 -8
- package/src/index.ts +1 -1
- package/src/translations.ts +0 -1
- package/src/types.ts +74 -71
- package/src/util/index.ts +1 -4
- package/dist/lib/browser/app-graph-builder-VYZ4IWI3.mjs.map +0 -7
- package/dist/lib/browser/check-app-scheme-O7JPE4TM.mjs.map +0 -7
- package/dist/lib/browser/chunk-6HJZL3WT.mjs +0 -118
- package/dist/lib/browser/chunk-6HJZL3WT.mjs.map +0 -7
- package/dist/lib/browser/chunk-FLOVGNYB.mjs +0 -81
- package/dist/lib/browser/chunk-FLOVGNYB.mjs.map +0 -7
- package/dist/lib/browser/chunk-RBJ6DLAC.mjs +0 -24
- package/dist/lib/browser/chunk-RBJ6DLAC.mjs.map +0 -7
- package/dist/lib/browser/chunk-RDFJGGGX.mjs +0 -1334
- package/dist/lib/browser/chunk-RDFJGGGX.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZMJMCN7O.mjs +0 -157
- package/dist/lib/browser/chunk-ZMJMCN7O.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-JKWXWUV6.mjs.map +0 -7
- package/dist/lib/browser/state-Z6UY2Z3M.mjs.map +0 -7
- package/dist/lib/browser/tools-VDVQTJMD.mjs.map +0 -7
- package/dist/lib/browser/url-handler-3CARFXQK.mjs.map +0 -7
- package/dist/types/src/util/useBreakpoints.d.ts.map +0 -1
- package/dist/types/src/util/useCompanions.d.ts.map +0 -1
- package/dist/types/src/util/useHoistStatusbar.d.ts.map +0 -1
- /package/dist/lib/browser/{react-root-S6ZAKNZA.mjs.map → react-root-ISFFOJZX.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-I7WZBOGM.mjs.map → react-surface-A63RQB5N.mjs.map} +0 -0
- /package/dist/types/src/{util → hooks}/useBreakpoints.d.ts +0 -0
- /package/dist/types/src/{util → hooks}/useCompanions.d.ts +0 -0
- /package/dist/types/src/{util → hooks}/useHoistStatusbar.d.ts +0 -0
- /package/src/{util → hooks}/useBreakpoints.ts +0 -0
- /package/src/{util → hooks}/useHoistStatusbar.ts +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Label, useAppGraph } from '@dxos/app-framework';
|
|
6
|
+
import { ROOT_ID, useConnections, type Node } from '@dxos/plugin-graph';
|
|
7
|
+
import { byPosition, type Position } from '@dxos/util';
|
|
8
|
+
|
|
9
|
+
import { ATTENDABLE_PATH_SEPARATOR, DECK_COMPANION_TYPE } from '../types';
|
|
10
|
+
|
|
11
|
+
export const getCompanionId = (id: string) => {
|
|
12
|
+
const [_, companionId] = id.split(ATTENDABLE_PATH_SEPARATOR);
|
|
13
|
+
return companionId ?? 'never';
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type DeckCompanion = Node<
|
|
17
|
+
any,
|
|
18
|
+
{
|
|
19
|
+
label: Label;
|
|
20
|
+
icon: string;
|
|
21
|
+
// TODO(burdon): Scroll area should be controlled by surface.
|
|
22
|
+
/** If true, the panel will not be wrapped in a scroll area. */
|
|
23
|
+
fixed?: boolean;
|
|
24
|
+
position?: Position;
|
|
25
|
+
}
|
|
26
|
+
>;
|
|
27
|
+
|
|
28
|
+
export const useDeckCompanions = (): DeckCompanion[] => {
|
|
29
|
+
const { graph } = useAppGraph();
|
|
30
|
+
const connections = useConnections(graph, ROOT_ID);
|
|
31
|
+
const companions = connections.filter((node) => node.type === DECK_COMPANION_TYPE) as DeckCompanion[];
|
|
32
|
+
return companions.toSorted((a, b) => byPosition(a.properties, b.properties));
|
|
33
|
+
};
|
|
@@ -4,19 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import { useEffect } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
const expandNodeActions = async (node: Node) => {
|
|
10
|
-
const graph = getGraph(node);
|
|
11
|
-
await graph.expand(node, 'outbound', ACTION_GROUP_TYPE);
|
|
12
|
-
await graph.expand(node, 'outbound', ACTION_TYPE);
|
|
13
|
-
};
|
|
7
|
+
import { getGraph, type Node } from '@dxos/plugin-graph';
|
|
14
8
|
|
|
15
9
|
export const useNodeActionExpander = (node?: Node) => {
|
|
16
10
|
useEffect(() => {
|
|
17
11
|
if (node) {
|
|
18
12
|
const frame = requestAnimationFrame(() => {
|
|
19
|
-
|
|
13
|
+
const graph = getGraph(node);
|
|
14
|
+
void graph.expand(node.id);
|
|
20
15
|
});
|
|
21
16
|
return () => cancelAnimationFrame(frame);
|
|
22
17
|
}
|
package/src/index.ts
CHANGED
package/src/translations.ts
CHANGED
|
@@ -35,7 +35,6 @@ export default [
|
|
|
35
35
|
'plank heading fallback label': 'Untitled',
|
|
36
36
|
'actions menu label': 'Options',
|
|
37
37
|
'settings deck label': 'Disable deck',
|
|
38
|
-
'reload required message': 'Reload required.',
|
|
39
38
|
'pending heading': 'Loading…',
|
|
40
39
|
'insert plank label': 'Open',
|
|
41
40
|
'resize label': 'Drag to resize',
|
package/src/types.ts
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { Schema } from 'effect';
|
|
6
|
+
|
|
5
7
|
import { LayoutAction } from '@dxos/app-framework';
|
|
6
|
-
import { S } from '@dxos/echo-schema';
|
|
7
8
|
import { type DeepReadonly } from '@dxos/util';
|
|
8
9
|
|
|
9
10
|
import { DECK_PLUGIN } from './meta';
|
|
@@ -23,33 +24,33 @@ export type Overscroll = (typeof OverscrollOptions)[number];
|
|
|
23
24
|
export type Part = 'solo' | 'deck' | 'complementary';
|
|
24
25
|
export type ResolvedPart = Part | 'solo-primary' | 'solo-companion';
|
|
25
26
|
|
|
26
|
-
export const DeckSettingsSchema =
|
|
27
|
-
showHints:
|
|
28
|
-
enableDeck:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
newPlankPositioning:
|
|
32
|
-
overscroll:
|
|
33
|
-
}).pipe(
|
|
34
|
-
export type DeckSettingsProps =
|
|
27
|
+
export const DeckSettingsSchema = Schema.Struct({
|
|
28
|
+
showHints: Schema.optional(Schema.Boolean),
|
|
29
|
+
enableDeck: Schema.optional(Schema.Boolean),
|
|
30
|
+
enableStatusbar: Schema.optional(Schema.Boolean),
|
|
31
|
+
enableNativeRedirect: Schema.optional(Schema.Boolean),
|
|
32
|
+
newPlankPositioning: Schema.optional(Schema.Literal(...NewPlankPositions)),
|
|
33
|
+
overscroll: Schema.optional(Schema.Literal(...OverscrollOptions)),
|
|
34
|
+
}).pipe(Schema.mutable);
|
|
35
|
+
export type DeckSettingsProps = Schema.Schema.Type<typeof DeckSettingsSchema>;
|
|
35
36
|
|
|
36
|
-
export const PlankSizing =
|
|
37
|
-
export type PlankSizing =
|
|
37
|
+
export const PlankSizing = Schema.Record({ key: Schema.String, value: Schema.Number });
|
|
38
|
+
export type PlankSizing = Schema.Schema.Type<typeof PlankSizing>;
|
|
38
39
|
|
|
39
40
|
// State of an individual deck.
|
|
40
|
-
export const DeckState =
|
|
41
|
+
export const DeckState = Schema.Struct({
|
|
41
42
|
/** If false, the deck has not yet left solo mode and new planks should be soloed. */
|
|
42
|
-
initialized:
|
|
43
|
-
active:
|
|
43
|
+
initialized: Schema.Boolean,
|
|
44
|
+
active: Schema.mutable(Schema.Array(Schema.String)),
|
|
44
45
|
// TODO(wittjosiah): Piping into both mutable and optional caused invalid typescript output.
|
|
45
|
-
activeCompanions:
|
|
46
|
-
inactive:
|
|
47
|
-
solo:
|
|
48
|
-
fullscreen:
|
|
49
|
-
plankSizing:
|
|
50
|
-
companionFrameSizing:
|
|
46
|
+
activeCompanions: Schema.optional(Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.String }))),
|
|
47
|
+
inactive: Schema.mutable(Schema.Array(Schema.String)),
|
|
48
|
+
solo: Schema.optional(Schema.String),
|
|
49
|
+
fullscreen: Schema.Boolean,
|
|
50
|
+
plankSizing: Schema.mutable(PlankSizing),
|
|
51
|
+
companionFrameSizing: Schema.mutable(PlankSizing),
|
|
51
52
|
});
|
|
52
|
-
export type DeckState =
|
|
53
|
+
export type DeckState = Schema.Schema.Type<typeof DeckState>;
|
|
53
54
|
|
|
54
55
|
export const defaultDeck: DeckState = {
|
|
55
56
|
initialized: false,
|
|
@@ -62,9 +63,9 @@ export const defaultDeck: DeckState = {
|
|
|
62
63
|
companionFrameSizing: {},
|
|
63
64
|
};
|
|
64
65
|
|
|
65
|
-
const LayoutMode =
|
|
66
|
-
export type LayoutMode =
|
|
67
|
-
export const isLayoutMode = (value: any): value is LayoutMode =>
|
|
66
|
+
const LayoutMode = Schema.Literal('deck', 'solo', 'solo--fullscreen');
|
|
67
|
+
export type LayoutMode = Schema.Schema.Type<typeof LayoutMode>;
|
|
68
|
+
export const isLayoutMode = (value: any): value is LayoutMode => Schema.is(LayoutMode)(value);
|
|
68
69
|
|
|
69
70
|
export const getMode = (deck: DeckState | DeepReadonly<DeckState>): LayoutMode => {
|
|
70
71
|
if (deck.solo) {
|
|
@@ -75,73 +76,75 @@ export const getMode = (deck: DeckState | DeepReadonly<DeckState>): LayoutMode =
|
|
|
75
76
|
};
|
|
76
77
|
|
|
77
78
|
// State of the deck plugin.
|
|
78
|
-
export const DeckPluginState =
|
|
79
|
-
sidebarState:
|
|
80
|
-
complementarySidebarState:
|
|
81
|
-
complementarySidebarPanel:
|
|
82
|
-
|
|
83
|
-
dialogOpen:
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
export const DeckPluginState = Schema.Struct({
|
|
80
|
+
sidebarState: Schema.Literal('closed', 'collapsed', 'expanded'),
|
|
81
|
+
complementarySidebarState: Schema.Literal('closed', 'collapsed', 'expanded'),
|
|
82
|
+
complementarySidebarPanel: Schema.optional(Schema.String),
|
|
83
|
+
|
|
84
|
+
dialogOpen: Schema.Boolean,
|
|
85
|
+
dialogType: Schema.optional(Schema.Literal('default', 'alert')),
|
|
86
|
+
dialogBlockAlign: Schema.optional(Schema.Literal('start', 'center', 'end')),
|
|
87
|
+
dialogOverlayClasses: Schema.optional(Schema.String),
|
|
88
|
+
dialogOverlayStyle: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),
|
|
86
89
|
/** Data to be passed to the dialog Surface. */
|
|
87
|
-
dialogContent:
|
|
90
|
+
dialogContent: Schema.optional(Schema.Any),
|
|
88
91
|
|
|
89
|
-
popoverOpen:
|
|
90
|
-
popoverSide:
|
|
91
|
-
popoverAnchor:
|
|
92
|
-
popoverAnchorId:
|
|
92
|
+
popoverOpen: Schema.Boolean,
|
|
93
|
+
popoverSide: Schema.optional(Schema.Literal('top', 'right', 'bottom', 'left')),
|
|
94
|
+
popoverAnchor: Schema.optional(Schema.Any),
|
|
95
|
+
popoverAnchorId: Schema.optional(Schema.String),
|
|
93
96
|
/** Data to be passed to the popover Surface. */
|
|
94
|
-
popoverContent:
|
|
97
|
+
popoverContent: Schema.optional(Schema.Any),
|
|
95
98
|
|
|
96
|
-
toasts:
|
|
97
|
-
currentUndoId:
|
|
99
|
+
toasts: Schema.mutable(Schema.Array(LayoutAction.Toast)),
|
|
100
|
+
currentUndoId: Schema.optional(Schema.String),
|
|
98
101
|
|
|
99
|
-
activeDeck:
|
|
100
|
-
previousDeck:
|
|
101
|
-
decks:
|
|
102
|
-
previousMode:
|
|
103
|
-
deck:
|
|
102
|
+
activeDeck: Schema.String,
|
|
103
|
+
previousDeck: Schema.String,
|
|
104
|
+
decks: Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.mutable(DeckState) })),
|
|
105
|
+
previousMode: Schema.mutable(Schema.Record({ key: Schema.String, value: LayoutMode })),
|
|
106
|
+
deck: Schema.mutable(DeckState),
|
|
104
107
|
|
|
105
108
|
/** The identifier of a component to scroll into view when it is mounted. */
|
|
106
|
-
scrollIntoView:
|
|
107
|
-
}).pipe(
|
|
109
|
+
scrollIntoView: Schema.optional(Schema.String),
|
|
110
|
+
}).pipe(Schema.mutable);
|
|
108
111
|
|
|
109
|
-
export type DeckPluginState =
|
|
112
|
+
export type DeckPluginState = Schema.Schema.Type<typeof DeckPluginState>;
|
|
110
113
|
|
|
111
114
|
export const DECK_ACTION = `${DECK_PLUGIN}/action`;
|
|
112
115
|
|
|
113
116
|
export namespace DeckAction {
|
|
114
|
-
const PartAdjustmentSchema =
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
const PartAdjustmentSchema = Schema.Union(
|
|
118
|
+
Schema.Literal('close').annotations({ description: 'Close the plank.' }),
|
|
119
|
+
Schema.Literal('companion').annotations({ description: 'Open the companion plank.' }),
|
|
120
|
+
Schema.Literal('solo').annotations({ description: 'Solo the plank.' }),
|
|
121
|
+
Schema.Literal('solo--fullscreen').annotations({ description: 'Fullscreen the plank.' }),
|
|
122
|
+
Schema.Literal('increment-start').annotations({ description: 'Move the plank towards the start of the deck.' }),
|
|
123
|
+
Schema.Literal('increment-end').annotations({ description: 'Move the plank towards the end of the deck.' }),
|
|
121
124
|
);
|
|
122
|
-
export type PartAdjustment =
|
|
123
|
-
export const Adjustment =
|
|
124
|
-
export type Adjustment =
|
|
125
|
+
export type PartAdjustment = Schema.Schema.Type<typeof PartAdjustmentSchema>;
|
|
126
|
+
export const Adjustment = Schema.mutable(Schema.Struct({ id: Schema.String, type: PartAdjustmentSchema }));
|
|
127
|
+
export type Adjustment = Schema.Schema.Type<typeof Adjustment>;
|
|
125
128
|
|
|
126
129
|
// An atomic transaction to apply to the deck, describing which element to move to which location.
|
|
127
|
-
export class Adjust extends
|
|
130
|
+
export class Adjust extends Schema.TaggedClass<Adjust>()(`${DECK_ACTION}/adjust`, {
|
|
128
131
|
input: Adjustment,
|
|
129
|
-
output:
|
|
132
|
+
output: Schema.Void,
|
|
130
133
|
}) {}
|
|
131
134
|
|
|
132
|
-
export class UpdatePlankSize extends
|
|
133
|
-
input:
|
|
134
|
-
id:
|
|
135
|
-
size:
|
|
135
|
+
export class UpdatePlankSize extends Schema.TaggedClass<UpdatePlankSize>()(`${DECK_ACTION}/update-plank-size`, {
|
|
136
|
+
input: Schema.Struct({
|
|
137
|
+
id: Schema.String,
|
|
138
|
+
size: Schema.Number,
|
|
136
139
|
}),
|
|
137
|
-
output:
|
|
140
|
+
output: Schema.Void,
|
|
138
141
|
}) {}
|
|
139
142
|
|
|
140
|
-
export class ChangeCompanion extends
|
|
141
|
-
input:
|
|
142
|
-
primary:
|
|
143
|
-
companion:
|
|
143
|
+
export class ChangeCompanion extends Schema.TaggedClass<ChangeCompanion>()(`${DECK_ACTION}/change-companion`, {
|
|
144
|
+
input: Schema.Struct({
|
|
145
|
+
primary: Schema.String,
|
|
146
|
+
companion: Schema.Union(Schema.String, Schema.Null),
|
|
144
147
|
}),
|
|
145
|
-
output:
|
|
148
|
+
output: Schema.Void,
|
|
146
149
|
}) {}
|
|
147
150
|
}
|
package/src/util/index.ts
CHANGED
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
export * from './layoutAppliesTopbar';
|
|
5
6
|
export * from './overscroll';
|
|
6
7
|
export * from './set-active';
|
|
7
|
-
export * from './useBreakpoints';
|
|
8
|
-
export * from './layoutAppliesTopbar';
|
|
9
|
-
export * from './useHoistStatusbar';
|
|
10
|
-
export * from './useCompanions';
|
|
@@ -1,7 +0,0 @@
|
|
|
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',\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AiB,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
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/check-app-scheme.ts"],
|
|
4
|
-
"sourcesContent": ["//\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 settings = context\n .requestCapability(Capabilities.SettingsStore)\n .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": ";;;;;AAIA,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,WAAWD,QACdE,kBAAkBC,aAAaC,aAAa,EAC5CC,SAA4BC,WAAAA,GAAcC;AAC7C,MAAI,CAAChC,YAAY0B,UAAUO,sBAAsB;AAC/C7B,mBAAeD,SAAAA;EACjB;AAEA,SAAO+B,YAAYN,aAAaO,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", "settings", "requestCapability", "Capabilities", "SettingsStore", "getStore", "DECK_PLUGIN", "value", "enableNativeRedirect", "contributes", "Null"]
|
|
7
|
-
}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PLANK_COMPANION_TYPE
|
|
3
|
-
} from "./chunk-ZMJMCN7O.mjs";
|
|
4
|
-
import {
|
|
5
|
-
DECK_PLUGIN
|
|
6
|
-
} from "./chunk-NSATFAEE.mjs";
|
|
7
|
-
|
|
8
|
-
// packages/plugins/plugin-deck/src/util/set-active.ts
|
|
9
|
-
import { batch } from "@preact/signals-core";
|
|
10
|
-
var setActive = ({ next, state, attention }) => {
|
|
11
|
-
return batch(() => {
|
|
12
|
-
const active = state.deck.solo ? [
|
|
13
|
-
state.deck.solo
|
|
14
|
-
] : state.deck.active;
|
|
15
|
-
const removed = active.filter((id) => !next.includes(id));
|
|
16
|
-
const closed = Array.from(/* @__PURE__ */ new Set([
|
|
17
|
-
...state.deck.inactive.filter((id) => !next.includes(id)),
|
|
18
|
-
...removed
|
|
19
|
-
]));
|
|
20
|
-
state.deck.inactive = closed;
|
|
21
|
-
if (state.deck.solo || !state.deck.initialized) {
|
|
22
|
-
state.deck.solo = next[0];
|
|
23
|
-
} else {
|
|
24
|
-
state.deck.active = next;
|
|
25
|
-
}
|
|
26
|
-
if (state.deck.fullscreen && !state.deck.solo) {
|
|
27
|
-
state.deck.fullscreen = false;
|
|
28
|
-
}
|
|
29
|
-
if (attention) {
|
|
30
|
-
const attended = attention.current;
|
|
31
|
-
const [attendedId] = Array.from(attended);
|
|
32
|
-
const isAttendedAvailable = !!attendedId && next.includes(attendedId);
|
|
33
|
-
if (!isAttendedAvailable) {
|
|
34
|
-
const attendedIndex = active.indexOf(attendedId);
|
|
35
|
-
const index = attendedIndex === -1 ? 0 : attendedIndex >= next.length ? next.length - 1 : attendedIndex;
|
|
36
|
-
return next[index];
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
// packages/plugins/plugin-deck/src/util/useCompanions.ts
|
|
43
|
-
import { useMemo } from "react";
|
|
44
|
-
import { useAppGraph } from "@dxos/app-framework";
|
|
45
|
-
import { useNode } from "@dxos/plugin-graph";
|
|
46
|
-
import { byPosition } from "@dxos/util";
|
|
47
|
-
var useCompanions = (id) => {
|
|
48
|
-
const { graph } = useAppGraph();
|
|
49
|
-
const node = useNode(graph, id);
|
|
50
|
-
const companions = node ? graph.nodes(node, {
|
|
51
|
-
type: PLANK_COMPANION_TYPE
|
|
52
|
-
}) : [];
|
|
53
|
-
return useMemo(() => companions.toSorted((a, b) => byPosition(a.properties, b.properties)), [
|
|
54
|
-
companions
|
|
55
|
-
]);
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
// packages/plugins/plugin-deck/src/util/overscroll.ts
|
|
59
|
-
var calculateOverscroll = (planksCount) => {
|
|
60
|
-
if (!planksCount) {
|
|
61
|
-
return {
|
|
62
|
-
paddingInlineStart: 0,
|
|
63
|
-
paddingInlineEnd: 0
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
if (planksCount === 1) {
|
|
67
|
-
const overscrollPadding = "max(0px, calc(((100dvw - var(--dx-main-sidebarWidth) - var(--dx-main-complementaryWidth) - (var(--dx-main-contentFirstWidth) + 1px)) / 2)))";
|
|
68
|
-
return {
|
|
69
|
-
paddingInlineStart: overscrollPadding,
|
|
70
|
-
paddingInlineEnd: overscrollPadding
|
|
71
|
-
};
|
|
72
|
-
} else {
|
|
73
|
-
return {
|
|
74
|
-
paddingInlineStart: "max(0px, calc(((100dvw - (var(--dx-main-contentFirstWidth) + 1px)) / 2) - var(--dx-main-sidebarWidth)))",
|
|
75
|
-
paddingInlineEnd: "max(0px, calc(((100dvw - (var(--dx-main-contentLastWidth) + 1px)) / 2) - var(--dx-main-complementaryWidth)))"
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
// packages/plugins/plugin-deck/src/util/useBreakpoints.ts
|
|
81
|
-
import { useMediaQuery } from "@dxos/react-ui";
|
|
82
|
-
var useBreakpoints = () => {
|
|
83
|
-
const [isNotMobile] = useMediaQuery("md");
|
|
84
|
-
const [isDesktop] = useMediaQuery("lg");
|
|
85
|
-
return isDesktop ? "desktop" : isNotMobile ? "tablet" : "mobile";
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
// packages/plugins/plugin-deck/src/util/layoutAppliesTopbar.ts
|
|
89
|
-
var layoutAppliesTopbar = (breakpoint, layoutMode) => {
|
|
90
|
-
return document.body.getAttribute("data-platform") === "win" && breakpoint === "desktop" && layoutMode !== "solo--fullscreen";
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
// packages/plugins/plugin-deck/src/util/useHoistStatusbar.ts
|
|
94
|
-
import { useMemo as useMemo2 } from "react";
|
|
95
|
-
import { Capabilities, useCapability } from "@dxos/app-framework";
|
|
96
|
-
import { useThemeContext } from "@dxos/react-ui";
|
|
97
|
-
var useHoistStatusbar = (breakpoint, layoutMode) => {
|
|
98
|
-
const enableStatusbar = useCapability(Capabilities.SettingsStore).getStore(DECK_PLUGIN).value.enableStatusbar;
|
|
99
|
-
const { safeAreaPadding } = useThemeContext();
|
|
100
|
-
return useMemo2(() => {
|
|
101
|
-
return breakpoint === "desktop" && layoutMode !== "solo--fullscreen" && !!enableStatusbar && safeAreaPadding?.bottom === 0;
|
|
102
|
-
}, [
|
|
103
|
-
enableStatusbar,
|
|
104
|
-
breakpoint,
|
|
105
|
-
safeAreaPadding?.bottom,
|
|
106
|
-
layoutMode
|
|
107
|
-
]);
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
export {
|
|
111
|
-
calculateOverscroll,
|
|
112
|
-
setActive,
|
|
113
|
-
useBreakpoints,
|
|
114
|
-
layoutAppliesTopbar,
|
|
115
|
-
useHoistStatusbar,
|
|
116
|
-
useCompanions
|
|
117
|
-
};
|
|
118
|
-
//# sourceMappingURL=chunk-6HJZL3WT.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/util/set-active.ts", "../../../src/util/useCompanions.ts", "../../../src/util/overscroll.ts", "../../../src/util/useBreakpoints.ts", "../../../src/util/layoutAppliesTopbar.ts", "../../../src/util/useHoistStatusbar.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { batch } from '@preact/signals-core';\n\nimport { type AttentionManager } from '@dxos/plugin-attention';\n\nimport { type DeckPluginState } from '../types';\n\nexport type SetActiveOptions = {\n next: string[];\n state: DeckPluginState;\n attention?: AttentionManager;\n};\n\nexport const setActive = ({ next, state, attention }: SetActiveOptions) => {\n return batch(() => {\n const active = state.deck.solo ? [state.deck.solo] : state.deck.active;\n const removed = active.filter((id) => !next.includes(id));\n const closed = Array.from(new Set([...state.deck.inactive.filter((id) => !next.includes(id)), ...removed]));\n\n state.deck.inactive = closed;\n\n if (state.deck.solo || !state.deck.initialized) {\n state.deck.solo = next[0];\n } else {\n state.deck.active = next;\n }\n\n if (state.deck.fullscreen && !state.deck.solo) {\n state.deck.fullscreen = false;\n }\n\n if (attention) {\n const attended = attention.current;\n const [attendedId] = Array.from(attended);\n const isAttendedAvailable = !!attendedId && next.includes(attendedId);\n if (!isAttendedAvailable) {\n const attendedIndex = active.indexOf(attendedId);\n // If outside of bounds, focus on the first/last plank, otherwise focus on the new plank in the same position.\n const index = attendedIndex === -1 ? 0 : attendedIndex >= next.length ? next.length - 1 : attendedIndex;\n return next[index];\n }\n }\n });\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useMemo } from 'react';\n\nimport { useAppGraph } from '@dxos/app-framework';\nimport { useNode } from '@dxos/plugin-graph';\nimport { byPosition } from '@dxos/util';\n\nimport { PLANK_COMPANION_TYPE } from '../types';\n\nexport const useCompanions = (id?: string) => {\n const { graph } = useAppGraph();\n const node = useNode(graph, id);\n const companions = node ? graph.nodes(node, { type: PLANK_COMPANION_TYPE }) : [];\n return useMemo(() => companions.toSorted((a, b) => byPosition(a.properties, b.properties)), [companions]);\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type { CSSProperties } from 'react';\n\n/**\n * ┌────────────────────────────────────────────────────────────────────────────────────────────────────┐\n * | Overscroll Padding Calculation for Centering Planks on Screen. │\n * ├────────────────────────────────────────────────────────────────────────────────────────────────────┤\n * │ NOTE(Zan): I found the way you calculate the overscroll padding to center a plank on the screen │\n * │ at the edges of the scroll context a bit confusing, so I've diagrammed it here. │\n * │ │\n * │ Multiple Planks: │\n * │ ─────────────── │\n * | Use the following overscroll padding calculation centering the boundary planks on the SCREEN. │\n * │ │\n * │ Left Padding: Right Padding: │\n * │ ┌───┬────┬──────────────────┬──────┐ ┌──────┬──────────────────┬────┬───┐ │\n * │ │ │████│ Ideal │ │ │ │ Ideal │████│ │ │\n * │ │ S │█PL█│ first │ │ │ │ last │█PR█│ C │ │\n * │ │ │████│ plank │ │ │ │ plank │████│ │ │\n * │ └───┴────┴──────────────────┴──────┘ └──────┴──────────────────┴────┴───┘ │\n * │ <--------- screen width -----------> <---------- screen width ----------> │\n * │ │\n * │ PL = ((screen width - Plank Width) / 2) - S │\n * │ PR = ((screen width - Plank Width) / 2) - C │\n * │ │\n * │ S = Sidebar width C = Complementary sidebar width │\n * │ PL = Padding Left PR = Padding Right │\n * │ │\n * │ Single Plank: │\n * │ ───────────── │\n * │ For a single plank we use the following overscroll padding calculation to center the plank in │\n * │ the content area: │\n * │ │\n * │ ┌───┬───────────────────────┬───┬───────────────────────┬───┐ │\n * │ │ │███████████████████████│ │███████████████████████│ │ │\n * │ │ S │█████ Left Padding ████│ P │████ Right Padding ████│ C │ │\n * │ │ │███████████████████████│ │███████████████████████│ │ │\n * │ └───┴───────────────────────┴───┴───────────────────────┴───┘ │\n * │ <------------------------ screen width ---------------------> │\n * │ │\n * │ Left/Right Padding Width = (screen width - S - P - C) / 2 │\n * │ │\n * │ S = Sidebar width (may be 0) │\n * │ P = Plank width (centered) │\n * │ C = Complementary sidebar width (may be 0) │\n * └────────────────────────────────────────────────────────────────────────────────────────────────────┘\n */\nexport const calculateOverscroll = (\n planksCount: number,\n): Pick<CSSProperties, 'paddingInlineStart' | 'paddingInlineEnd'> | undefined => {\n if (!planksCount) {\n return { paddingInlineStart: 0, paddingInlineEnd: 0 };\n }\n if (planksCount === 1) {\n const overscrollPadding =\n 'max(0px, calc(((100dvw - var(--dx-main-sidebarWidth) - var(--dx-main-complementaryWidth) - (var(--dx-main-contentFirstWidth) + 1px)) / 2)))';\n return { paddingInlineStart: overscrollPadding, paddingInlineEnd: overscrollPadding };\n } else {\n return {\n paddingInlineStart:\n 'max(0px, calc(((100dvw - (var(--dx-main-contentFirstWidth) + 1px)) / 2) - var(--dx-main-sidebarWidth)))',\n paddingInlineEnd:\n 'max(0px, calc(((100dvw - (var(--dx-main-contentLastWidth) + 1px)) / 2) - var(--dx-main-complementaryWidth)))',\n };\n }\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useMediaQuery } from '@dxos/react-ui';\n\nexport const useBreakpoints = () => {\n const [isNotMobile] = useMediaQuery('md');\n const [isDesktop] = useMediaQuery('lg');\n return isDesktop ? 'desktop' : isNotMobile ? 'tablet' : 'mobile';\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type LayoutMode } from '../types';\n\nexport const layoutAppliesTopbar = (breakpoint: string, layoutMode?: LayoutMode) => {\n return (\n document.body.getAttribute('data-platform') === 'win' &&\n breakpoint === 'desktop' &&\n layoutMode !== 'solo--fullscreen'\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useMemo } from 'react';\n\nimport { Capabilities, useCapability } from '@dxos/app-framework';\nimport { useThemeContext } from '@dxos/react-ui';\n\nimport { DECK_PLUGIN } from '../meta';\nimport type { DeckSettingsProps, LayoutMode } from '../types';\n\nexport const useHoistStatusbar = (breakpoint: string, layoutMode?: LayoutMode): boolean => {\n const enableStatusbar = useCapability(Capabilities.SettingsStore).getStore<DeckSettingsProps>(DECK_PLUGIN)!.value\n .enableStatusbar;\n const { safeAreaPadding } = useThemeContext();\n return useMemo(() => {\n return (\n breakpoint === 'desktop' &&\n layoutMode !== 'solo--fullscreen' &&\n !!enableStatusbar &&\n safeAreaPadding?.bottom === 0\n );\n }, [enableStatusbar, breakpoint, safeAreaPadding?.bottom, layoutMode]);\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAIA,SAASA,aAAa;AAYf,IAAMC,YAAY,CAAC,EAAEC,MAAMC,OAAOC,UAAS,MAAoB;AACpE,SAAOC,MAAM,MAAA;AACX,UAAMC,SAASH,MAAMI,KAAKC,OAAO;MAACL,MAAMI,KAAKC;QAAQL,MAAMI,KAAKD;AAChE,UAAMG,UAAUH,OAAOI,OAAO,CAACC,OAAO,CAACT,KAAKU,SAASD,EAAAA,CAAAA;AACrD,UAAME,SAASC,MAAMC,KAAK,oBAAIC,IAAI;SAAIb,MAAMI,KAAKU,SAASP,OAAO,CAACC,OAAO,CAACT,KAAKU,SAASD,EAAAA,CAAAA;SAASF;KAAQ,CAAA;AAEzGN,UAAMI,KAAKU,WAAWJ;AAEtB,QAAIV,MAAMI,KAAKC,QAAQ,CAACL,MAAMI,KAAKW,aAAa;AAC9Cf,YAAMI,KAAKC,OAAON,KAAK,CAAA;IACzB,OAAO;AACLC,YAAMI,KAAKD,SAASJ;IACtB;AAEA,QAAIC,MAAMI,KAAKY,cAAc,CAAChB,MAAMI,KAAKC,MAAM;AAC7CL,YAAMI,KAAKY,aAAa;IAC1B;AAEA,QAAIf,WAAW;AACb,YAAMgB,WAAWhB,UAAUiB;AAC3B,YAAM,CAACC,UAAAA,IAAcR,MAAMC,KAAKK,QAAAA;AAChC,YAAMG,sBAAsB,CAAC,CAACD,cAAcpB,KAAKU,SAASU,UAAAA;AAC1D,UAAI,CAACC,qBAAqB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BAAe;AAExB,SAASC,cAAcC,qBAAqB;AAC5C,SAASC,uBAAuB;AAKzB,IAAMC,oBAAoB,CAACC,YAAoBC,eAAAA;AACpD,QAAMC,kBAAkBC,cAAcC,aAAaC,aAAa,EAAEC,SAA4BC,WAAAA,EAAcC,MACzGN;AACH,QAAM,EAAEO,gBAAe,IAAKC,gBAAAA;AAC5B,SAAOC,SAAQ,MAAA;AACb,WACEX,eAAe,aACfC,eAAe,sBACf,CAAC,CAACC,mBACFO,iBAAiBG,WAAW;EAEhC,GAAG;IAACV;IAAiBF;IAAYS,iBAAiBG;IAAQX;GAAW;AACvE;",
|
|
6
|
-
"names": ["batch", "setActive", "next", "state", "attention", "batch", "active", "deck", "solo", "removed", "filter", "id", "includes", "closed", "Array", "from", "Set", "inactive", "initialized", "fullscreen", "attended", "current", "attendedId", "isAttendedAvailable", "attendedIndex", "indexOf", "index", "length", "useMemo", "useAppGraph", "useNode", "byPosition", "useCompanions", "id", "graph", "useAppGraph", "node", "useNode", "companions", "nodes", "type", "PLANK_COMPANION_TYPE", "useMemo", "toSorted", "a", "b", "byPosition", "properties", "calculateOverscroll", "planksCount", "paddingInlineStart", "paddingInlineEnd", "overscrollPadding", "useMediaQuery", "useBreakpoints", "isNotMobile", "useMediaQuery", "isDesktop", "layoutAppliesTopbar", "breakpoint", "layoutMode", "document", "body", "getAttribute", "useMemo", "Capabilities", "useCapability", "useThemeContext", "useHoistStatusbar", "breakpoint", "layoutMode", "enableStatusbar", "useCapability", "Capabilities", "SettingsStore", "getStore", "DECK_PLUGIN", "value", "safeAreaPadding", "useThemeContext", "useMemo", "bottom"]
|
|
7
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
// packages/plugins/plugin-deck/src/layout.ts
|
|
2
|
-
import { produce } from "immer";
|
|
3
|
-
import { ATTENDABLE_PATH_SEPARATOR } from "@dxos/react-ui-attention";
|
|
4
|
-
var createEntryId = (entryId, variant) => variant ? `${entryId}${ATTENDABLE_PATH_SEPARATOR}${variant}` : entryId;
|
|
5
|
-
var parseEntryId = (entryId) => {
|
|
6
|
-
const [id, variant] = entryId.split(ATTENDABLE_PATH_SEPARATOR);
|
|
7
|
-
return {
|
|
8
|
-
id,
|
|
9
|
-
variant
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
var openEntry = (deck, _entryId, options) => {
|
|
13
|
-
return produce(deck, (draft) => {
|
|
14
|
-
const entryId = createEntryId(_entryId, options?.variant);
|
|
15
|
-
if (draft.find((id) => id === entryId)) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
const key = options?.key;
|
|
19
|
-
const plankPositioning = options?.positioning ?? "start";
|
|
20
|
-
const pivotId = options?.pivotId;
|
|
21
|
-
if (key) {
|
|
22
|
-
const index = draft.findIndex((id) => id.split("+")[0] === key);
|
|
23
|
-
if (index !== -1) {
|
|
24
|
-
draft.splice(index, 1, entryId);
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
if (pivotId) {
|
|
29
|
-
const pivotIndex = draft.findIndex((id) => id === pivotId);
|
|
30
|
-
if (pivotIndex !== -1) {
|
|
31
|
-
if (plankPositioning === "start") {
|
|
32
|
-
draft.splice(pivotIndex, 0, entryId);
|
|
33
|
-
} else {
|
|
34
|
-
draft.splice(pivotIndex + 1, 0, entryId);
|
|
35
|
-
}
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
if (plankPositioning === "start") {
|
|
40
|
-
draft.unshift(entryId);
|
|
41
|
-
} else {
|
|
42
|
-
draft.push(entryId);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
var closeEntry = (deck, entryId) => {
|
|
47
|
-
return produce(deck, (draft) => {
|
|
48
|
-
const index = draft.findIndex((id) => id === entryId);
|
|
49
|
-
if (index !== -1) {
|
|
50
|
-
draft.splice(index, 1);
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
var incrementPlank = (deck, adjustment) => {
|
|
55
|
-
return produce(deck, (draft) => {
|
|
56
|
-
const index = draft.findIndex((id) => id === adjustment.id);
|
|
57
|
-
if (index === -1 || adjustment.type === "increment-start" && index === 0 || adjustment.type === "increment-end" && index === draft.length - 1) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
if (adjustment.type === "increment-start") {
|
|
61
|
-
[draft[index - 1], draft[index]] = [
|
|
62
|
-
draft[index],
|
|
63
|
-
draft[index - 1]
|
|
64
|
-
];
|
|
65
|
-
} else if (adjustment.type === "increment-end") {
|
|
66
|
-
[draft[index], draft[index + 1]] = [
|
|
67
|
-
draft[index + 1],
|
|
68
|
-
draft[index]
|
|
69
|
-
];
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
export {
|
|
75
|
-
createEntryId,
|
|
76
|
-
parseEntryId,
|
|
77
|
-
openEntry,
|
|
78
|
-
closeEntry,
|
|
79
|
-
incrementPlank
|
|
80
|
-
};
|
|
81
|
-
//# sourceMappingURL=chunk-FLOVGNYB.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/layout.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { produce } from 'immer';\n\nimport { ATTENDABLE_PATH_SEPARATOR } from '@dxos/react-ui-attention';\n\nimport { type DeckAction, type NewPlankPositioning } from './types';\n\nexport const createEntryId = (entryId: string, variant?: string) =>\n variant ? `${entryId}${ATTENDABLE_PATH_SEPARATOR}${variant}` : entryId;\n\nexport const parseEntryId = (entryId: string) => {\n const [id, variant] = entryId.split(ATTENDABLE_PATH_SEPARATOR);\n return { id, variant };\n};\n\ntype OpenLayoutEntryOptions = {\n key?: string;\n positioning?: NewPlankPositioning;\n pivotId?: string;\n variant?: string;\n};\n\nexport const openEntry = (deck: string[], _entryId: string, options?: OpenLayoutEntryOptions): string[] => {\n return produce(deck, (draft) => {\n const entryId = createEntryId(_entryId, options?.variant);\n\n // Check that the entry is not already in the part\n if (draft.find((id) => id === entryId)) {\n return;\n }\n\n const key = options?.key;\n const plankPositioning = options?.positioning ?? 'start';\n const pivotId = options?.pivotId;\n\n if (key) {\n const index = draft.findIndex((id) => id.split('+')[0] === key);\n if (index !== -1) {\n draft.splice(index, 1, entryId);\n return;\n }\n }\n\n if (pivotId) {\n const pivotIndex = draft.findIndex((id) => id === pivotId);\n if (pivotIndex !== -1) {\n if (plankPositioning === 'start') {\n draft.splice(pivotIndex, 0, entryId);\n } else {\n draft.splice(pivotIndex + 1, 0, entryId);\n }\n return;\n }\n }\n\n // If no pivot found or provided, fall back to original behavior\n if (plankPositioning === 'start') {\n draft.unshift(entryId);\n } else {\n draft.push(entryId);\n }\n });\n};\n\nexport const closeEntry = (deck: string[], entryId: string): string[] => {\n return produce(deck, (draft) => {\n const index = draft.findIndex((id) => id === entryId);\n if (index !== -1) {\n draft.splice(index, 1);\n }\n });\n};\n\nexport const incrementPlank = (deck: string[], adjustment: DeckAction.Adjustment): string[] => {\n return produce(deck, (draft) => {\n const index = draft.findIndex((id) => id === adjustment.id);\n if (\n index === -1 ||\n (adjustment.type === 'increment-start' && index === 0) ||\n (adjustment.type === 'increment-end' && index === draft.length - 1)\n ) {\n return;\n }\n\n if (adjustment.type === 'increment-start') {\n // Swap the current item with the previous item.\n [draft[index - 1], draft[index]] = [draft[index], draft[index - 1]];\n } else if (adjustment.type === 'increment-end') {\n // Swap the current item with the next item.\n [draft[index], draft[index + 1]] = [draft[index + 1], draft[index]];\n }\n });\n};\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,eAAe;AAExB,SAASC,iCAAiC;AAInC,IAAMC,gBAAgB,CAACC,SAAiBC,YAC7CA,UAAU,GAAGD,OAAAA,GAAUE,yBAAAA,GAA4BD,OAAAA,KAAYD;AAE1D,IAAMG,eAAe,CAACH,YAAAA;AAC3B,QAAM,CAACI,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eAAAA;AAC7C,SAAOf,QAAQH,MAAM,CAACI,UAAAA;AACpB,UAAMM,QAAQN,MAAMO,UAAU,CAACd,OAAOA,OAAOqB,WAAWrB,EAAE;AAC1D,QACEa,UAAU,MACTQ,WAAWC,SAAS,qBAAqBT,UAAU,KACnDQ,WAAWC,SAAS,mBAAmBT,UAAUN,MAAMgB,SAAS,GACjE;AACA;IACF;AAEA,QAAIF,WAAWC,SAAS,mBAAmB;AAEzC,OAACf,MAAMM,QAAQ,CAAA,GAAIN,MAAMM,KAAAA,CAAM,IAAI;QAACN,MAAMM,KAAAA;QAAQN,MAAMM,QAAQ,CAAA;;IAClE,WAAWQ,WAAWC,SAAS,iBAAiB;AAE9C,OAACf,MAAMM,KAAAA,GAAQN,MAAMM,QAAQ,CAAA,CAAE,IAAI;QAACN,MAAMM,QAAQ,CAAA;QAAIN,MAAMM,KAAAA;;IAC9D;EACF,CAAA;AACF;",
|
|
6
|
-
"names": ["produce", "ATTENDABLE_PATH_SEPARATOR", "createEntryId", "entryId", "variant", "ATTENDABLE_PATH_SEPARATOR", "parseEntryId", "id", "split", "openEntry", "deck", "_entryId", "options", "produce", "draft", "find", "key", "plankPositioning", "positioning", "pivotId", "index", "findIndex", "splice", "pivotIndex", "unshift", "push", "closeEntry", "incrementPlank", "adjustment", "type", "length"]
|
|
7
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// packages/plugins/plugin-deck/src/capabilities/index.ts
|
|
2
|
-
import { lazy } from "@dxos/app-framework";
|
|
3
|
-
var AppGraphBuilder = lazy(() => import("./app-graph-builder-VYZ4IWI3.mjs"));
|
|
4
|
-
var CheckAppScheme = lazy(() => import("./check-app-scheme-O7JPE4TM.mjs"));
|
|
5
|
-
var DeckSettings = lazy(() => import("./settings-6NU7CF2B.mjs"));
|
|
6
|
-
var DeckState = lazy(() => import("./state-Z6UY2Z3M.mjs"));
|
|
7
|
-
var LayoutIntentResolver = lazy(() => import("./intent-resolver-JKWXWUV6.mjs"));
|
|
8
|
-
var ReactRoot = lazy(() => import("./react-root-S6ZAKNZA.mjs"));
|
|
9
|
-
var ReactSurface = lazy(() => import("./react-surface-I7WZBOGM.mjs"));
|
|
10
|
-
var Tools = lazy(() => import("./tools-VDVQTJMD.mjs"));
|
|
11
|
-
var UrlHandler = lazy(() => import("./url-handler-3CARFXQK.mjs"));
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
AppGraphBuilder,
|
|
15
|
-
CheckAppScheme,
|
|
16
|
-
DeckSettings,
|
|
17
|
-
DeckState,
|
|
18
|
-
LayoutIntentResolver,
|
|
19
|
-
ReactRoot,
|
|
20
|
-
ReactSurface,
|
|
21
|
-
Tools,
|
|
22
|
-
UrlHandler
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=chunk-RBJ6DLAC.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
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 DeckSettings = lazy(() => import('./settings'));\nexport const DeckState = lazy(() => import('./state'));\nexport const LayoutIntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactRoot = lazy(() => import('./react-root'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\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,eAAeF,KAAK,MAAM,OAAO,yBAAA,CAAA;AACvC,IAAMG,YAAYH,KAAK,MAAM,OAAO,sBAAA,CAAA;AACpC,IAAMI,uBAAuBJ,KAAK,MAAM,OAAO,gCAAA,CAAA;AAC/C,IAAMK,YAAYL,KAAK,MAAM,OAAO,2BAAA,CAAA;AACpC,IAAMM,eAAeN,KAAK,MAAM,OAAO,8BAAA,CAAA;AACvC,IAAMO,QAAQP,KAAK,MAAM,OAAO,sBAAA,CAAA;AAChC,IAAMQ,aAAaR,KAAK,MAAM,OAAO,4BAAA,CAAA;",
|
|
6
|
-
"names": ["lazy", "AppGraphBuilder", "lazy", "CheckAppScheme", "DeckSettings", "DeckState", "LayoutIntentResolver", "ReactRoot", "ReactSurface", "Tools", "UrlHandler"]
|
|
7
|
-
}
|