@dxos/plugin-deck 0.8.4-main.e098934 → 0.8.4-main.ead640a
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-DVEKLXB4.mjs → app-graph-builder-YYP67JHW.mjs} +15 -14
- package/dist/lib/browser/app-graph-builder-YYP67JHW.mjs.map +7 -0
- package/dist/lib/browser/{check-app-scheme-3BQJXWEY.mjs → check-app-scheme-GCOL6YDT.mjs} +6 -6
- package/dist/lib/browser/check-app-scheme-GCOL6YDT.mjs.map +7 -0
- package/dist/lib/browser/{chunk-F5BQOOEG.mjs → chunk-7I6H3N4Q.mjs} +8 -6
- package/dist/lib/browser/chunk-7I6H3N4Q.mjs.map +7 -0
- package/dist/lib/browser/chunk-HUWUYTOI.mjs +16 -0
- package/dist/lib/browser/chunk-HUWUYTOI.mjs.map +7 -0
- package/dist/lib/browser/{chunk-NU7H23SK.mjs → chunk-JQKOS2HB.mjs} +341 -308
- package/dist/lib/browser/chunk-JQKOS2HB.mjs.map +7 -0
- package/dist/lib/browser/chunk-MHP4GPX5.mjs +11 -0
- package/dist/lib/browser/chunk-MHP4GPX5.mjs.map +7 -0
- package/dist/lib/browser/{chunk-WILMPGDV.mjs → chunk-RJP5R7PY.mjs} +14 -14
- package/dist/lib/browser/{chunk-WILMPGDV.mjs.map → chunk-RJP5R7PY.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-NRCPV6AV.mjs → chunk-VX7MMQOW.mjs} +9 -9
- package/dist/lib/browser/chunk-VX7MMQOW.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +8 -9
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-2SUIIV6N.mjs → intent-resolver-7XNOEPVN.mjs} +20 -17
- package/dist/lib/browser/intent-resolver-7XNOEPVN.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-7PRVDLF7.mjs → react-root-OJEF7YCH.mjs} +11 -11
- package/dist/lib/browser/react-root-OJEF7YCH.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-FNY2YC2F.mjs → react-surface-XN2NJYHO.mjs} +13 -13
- package/dist/lib/browser/react-surface-XN2NJYHO.mjs.map +7 -0
- package/dist/lib/browser/{settings-LUPQPZ27.mjs → settings-M3KSKRAP.mjs} +7 -6
- package/dist/lib/browser/{settings-LUPQPZ27.mjs.map → settings-M3KSKRAP.mjs.map} +3 -3
- package/dist/lib/browser/state-6ZSDTF6Q.mjs +12 -0
- package/dist/lib/browser/{toolkit-XGJSBY67.mjs → toolkit-L7C3UAEU.mjs} +14 -12
- package/dist/lib/browser/toolkit-L7C3UAEU.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/browser/{url-handler-LROZYQ26.mjs → url-handler-EHTLXZRR.mjs} +6 -6
- package/dist/lib/browser/{url-handler-LROZYQ26.mjs.map → url-handler-EHTLXZRR.mjs.map} +1 -1
- package/dist/types/src/DeckPlugin.d.ts +1 -1
- package/dist/types/src/DeckPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +3 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts +3 -2
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts +2 -3
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts +74 -0
- package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts.map +1 -0
- package/dist/types/src/components/DeckLayout/DeckMain.d.ts +3 -0
- package/dist/types/src/components/DeckLayout/DeckMain.d.ts.map +1 -0
- package/dist/types/src/components/DeckLayout/Toast.d.ts +5 -0
- package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
- package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +1 -1
- package/dist/types/src/components/Plank/Plank.d.ts.map +1 -1
- package/dist/types/src/components/Plank/Plank.stories.d.ts +2 -1
- package/dist/types/src/components/Plank/Plank.stories.d.ts.map +1 -1
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/hooks/useHoistStatusbar.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +0 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +1 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +4 -3
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +43 -43
- package/src/DeckPlugin.ts +62 -63
- package/src/capabilities/app-graph-builder.ts +10 -9
- package/src/capabilities/capabilities.ts +3 -3
- package/src/capabilities/check-app-scheme.ts +2 -2
- package/src/capabilities/intent-resolver.ts +12 -9
- package/src/capabilities/react-root.tsx +2 -2
- package/src/capabilities/react-surface.tsx +4 -4
- package/src/capabilities/settings.ts +1 -0
- package/src/capabilities/state.ts +7 -4
- package/src/capabilities/toolkit.ts +9 -7
- package/src/capabilities/tools.ts +1 -1
- package/src/components/DeckLayout/Banner.tsx +2 -2
- package/src/components/DeckLayout/DeckLayout.stories.tsx +64 -0
- package/src/components/DeckLayout/DeckLayout.tsx +8 -278
- package/src/components/DeckLayout/DeckMain.tsx +285 -0
- package/src/components/DeckLayout/Fallback.tsx +2 -2
- package/src/components/DeckLayout/Toast.tsx +27 -2
- package/src/components/DeckSettings/DeckSettings.tsx +9 -3
- package/src/components/Plank/Plank.stories.tsx +3 -5
- package/src/components/Plank/Plank.tsx +25 -9
- package/src/components/Plank/PlankControls.tsx +3 -3
- package/src/components/Plank/PlankError.tsx +2 -2
- package/src/components/Plank/PlankHeading.tsx +5 -5
- package/src/components/Sidebar/ComplementarySidebar.tsx +5 -5
- package/src/components/Sidebar/Sidebar.tsx +2 -2
- package/src/components/Sidebar/SidebarButton.tsx +4 -4
- package/src/events.ts +2 -2
- package/src/hooks/useHoistStatusbar.ts +4 -3
- package/src/meta.ts +1 -3
- package/src/translations.ts +1 -0
- package/src/types/schema.ts +5 -3
- package/dist/lib/browser/app-graph-builder-DVEKLXB4.mjs.map +0 -7
- package/dist/lib/browser/check-app-scheme-3BQJXWEY.mjs.map +0 -7
- package/dist/lib/browser/chunk-F5BQOOEG.mjs.map +0 -7
- package/dist/lib/browser/chunk-M57WD3V6.mjs +0 -16
- package/dist/lib/browser/chunk-M57WD3V6.mjs.map +0 -7
- package/dist/lib/browser/chunk-NRCPV6AV.mjs.map +0 -7
- package/dist/lib/browser/chunk-NU7H23SK.mjs.map +0 -7
- package/dist/lib/browser/chunk-Z5KITAZW.mjs +0 -13
- package/dist/lib/browser/chunk-Z5KITAZW.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-2SUIIV6N.mjs.map +0 -7
- package/dist/lib/browser/react-root-7PRVDLF7.mjs.map +0 -7
- package/dist/lib/browser/react-surface-FNY2YC2F.mjs.map +0 -7
- package/dist/lib/browser/state-CRXR7X63.mjs +0 -12
- package/dist/lib/browser/toolkit-XGJSBY67.mjs.map +0 -7
- /package/dist/lib/browser/{state-CRXR7X63.mjs.map → state-6ZSDTF6Q.mjs.map} +0 -0
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
@@ -11,8 +9,8 @@ import { IntentPlugin, SettingsPlugin } from '@dxos/app-framework';
|
|
|
11
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
12
10
|
import { AttentionPlugin } from '@dxos/plugin-attention';
|
|
13
11
|
import { GraphPlugin } from '@dxos/plugin-graph';
|
|
12
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
14
13
|
import { Stack } from '@dxos/react-ui-stack';
|
|
15
|
-
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
16
14
|
|
|
17
15
|
import { DeckStateFactory } from '../../capabilities';
|
|
18
16
|
import { translations } from '../../translations';
|
|
@@ -30,14 +28,14 @@ const meta = {
|
|
|
30
28
|
);
|
|
31
29
|
},
|
|
32
30
|
decorators: [
|
|
31
|
+
withTheme,
|
|
33
32
|
withPluginManager({
|
|
34
33
|
plugins: [AttentionPlugin(), SettingsPlugin(), IntentPlugin(), GraphPlugin()],
|
|
35
34
|
capabilities: () => DeckStateFactory(),
|
|
36
35
|
}),
|
|
37
|
-
withTheme,
|
|
38
|
-
withLayout({ fullscreen: true }),
|
|
39
36
|
],
|
|
40
37
|
parameters: {
|
|
38
|
+
layout: 'fullscreen',
|
|
41
39
|
translations,
|
|
42
40
|
},
|
|
43
41
|
} satisfies Meta<typeof Plank>;
|
|
@@ -68,7 +68,11 @@ export const Plank = memo(({ id = UNKNOWN_ID, companionId, ...props }: PlankProp
|
|
|
68
68
|
const hasCompanion = !!(companionId && currentCompanion);
|
|
69
69
|
|
|
70
70
|
return (
|
|
71
|
-
<PlankContainer
|
|
71
|
+
<PlankContainer
|
|
72
|
+
solo={props.part === 'solo'}
|
|
73
|
+
companion={hasCompanion}
|
|
74
|
+
encapsulate={!!props.settings?.encapsulatedPlanks}
|
|
75
|
+
>
|
|
72
76
|
<PlankComponent
|
|
73
77
|
id={id}
|
|
74
78
|
node={node}
|
|
@@ -92,7 +96,12 @@ export const Plank = memo(({ id = UNKNOWN_ID, companionId, ...props }: PlankProp
|
|
|
92
96
|
);
|
|
93
97
|
});
|
|
94
98
|
|
|
95
|
-
const PlankContainer = ({
|
|
99
|
+
const PlankContainer = ({
|
|
100
|
+
children,
|
|
101
|
+
solo,
|
|
102
|
+
companion,
|
|
103
|
+
encapsulate,
|
|
104
|
+
}: PropsWithChildren<{ solo: boolean; companion: boolean; encapsulate: boolean }>) => {
|
|
96
105
|
const sizeAttrs = useMainSize();
|
|
97
106
|
if (!solo) {
|
|
98
107
|
return children;
|
|
@@ -102,7 +111,13 @@ const PlankContainer = ({ children, solo, companion }: PropsWithChildren<{ solo:
|
|
|
102
111
|
return (
|
|
103
112
|
<div
|
|
104
113
|
role='none'
|
|
105
|
-
className={mx(
|
|
114
|
+
className={mx(
|
|
115
|
+
'absolute inset-[--main-spacing] grid',
|
|
116
|
+
encapsulate && 'border border-separator rounded overflow-hidden',
|
|
117
|
+
companion && 'grid-cols-[6fr_4fr]',
|
|
118
|
+
railGridHorizontal,
|
|
119
|
+
mainIntrinsicSize,
|
|
120
|
+
)}
|
|
106
121
|
{...sizeAttrs}
|
|
107
122
|
>
|
|
108
123
|
{children}
|
|
@@ -171,11 +186,7 @@ const PlankComponent = memo(
|
|
|
171
186
|
|
|
172
187
|
useLayoutEffect(() => {
|
|
173
188
|
if (scrollIntoView === id) {
|
|
174
|
-
|
|
175
|
-
// Forcing focus to something smaller than the plank prevents large focus ring in the interim.
|
|
176
|
-
const focusable = rootElement.current?.querySelector('button') || rootElement.current;
|
|
177
|
-
focusable?.focus({ preventScroll: true });
|
|
178
|
-
layoutMode === 'deck' && focusable?.scrollIntoView({ behavior: 'smooth', inline: 'center' });
|
|
189
|
+
layoutMode === 'deck' && rootElement.current?.scrollIntoView({ behavior: 'smooth', inline: 'center' });
|
|
179
190
|
// Clear the scroll into view state once it has been actioned.
|
|
180
191
|
void dispatch(createIntent(LayoutAction.ScrollIntoView, { part: 'current', subject: undefined }));
|
|
181
192
|
}
|
|
@@ -190,13 +201,15 @@ const PlankComponent = memo(
|
|
|
190
201
|
const data = useMemo(
|
|
191
202
|
() =>
|
|
192
203
|
node && {
|
|
204
|
+
attendableId: id,
|
|
193
205
|
subject: node.data,
|
|
194
206
|
companionTo: primary?.data,
|
|
207
|
+
properties: node.properties,
|
|
195
208
|
variant,
|
|
196
209
|
path,
|
|
197
210
|
popoverAnchorId,
|
|
198
211
|
},
|
|
199
|
-
[node, node?.data, path, popoverAnchorId, primary?.data, variant],
|
|
212
|
+
[node, node?.data, node?.properties, path, popoverAnchorId, primary?.data, variant],
|
|
200
213
|
);
|
|
201
214
|
|
|
202
215
|
// TODO(wittjosiah): Change prop to accept a component.
|
|
@@ -212,6 +225,9 @@ const PlankComponent = memo(
|
|
|
212
225
|
part === 'deck' && (companioned === 'companion' ? '!border-separator border-ie' : '!border-separator border-li'),
|
|
213
226
|
part.startsWith('solo-') && 'row-span-2 grid-rows-subgrid min-is-0',
|
|
214
227
|
part === 'solo-companion' && '!border-separator border-is',
|
|
228
|
+
settings?.encapsulatedPlanks &&
|
|
229
|
+
!part.startsWith('solo') &&
|
|
230
|
+
'mli-[--main-spacing] !border-separator border rounded overflow-hidden',
|
|
215
231
|
);
|
|
216
232
|
|
|
217
233
|
return (
|
|
@@ -8,7 +8,7 @@ import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
|
8
8
|
import { invariant } from '@dxos/invariant';
|
|
9
9
|
import { ButtonGroup, type ButtonGroupProps, type ButtonProps, IconButton, useTranslation } from '@dxos/react-ui';
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { meta } from '../../meta';
|
|
12
12
|
import { DeckAction, type LayoutMode } from '../../types';
|
|
13
13
|
|
|
14
14
|
export type PlankControlHandler = (event: DeckAction.PartAdjustment) => void;
|
|
@@ -43,7 +43,7 @@ type PlankComplimentControlsProps = {
|
|
|
43
43
|
|
|
44
44
|
export const PlankCompanionControls = forwardRef<HTMLDivElement, PlankComplimentControlsProps>(
|
|
45
45
|
({ primary }, forwardedRef) => {
|
|
46
|
-
const { t } = useTranslation(
|
|
46
|
+
const { t } = useTranslation(meta.id);
|
|
47
47
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
48
48
|
const handleCloseCompanion = useCallback(() => {
|
|
49
49
|
invariant(primary);
|
|
@@ -71,7 +71,7 @@ export const PlankControls = forwardRef<HTMLDivElement, PlankControlsProps>(
|
|
|
71
71
|
{ children, classNames, variant = 'default', capabilities, layoutMode, pin, close = false, onClick, ...props },
|
|
72
72
|
forwardedRef,
|
|
73
73
|
) => {
|
|
74
|
-
const { t } = useTranslation(
|
|
74
|
+
const { t } = useTranslation(meta.id);
|
|
75
75
|
const buttonClassNames =
|
|
76
76
|
variant === 'hide-disabled' ? `disabled:hidden ${plankControlSpacing}` : plankControlSpacing;
|
|
77
77
|
|
|
@@ -8,13 +8,13 @@ import { type Node } from '@dxos/plugin-graph';
|
|
|
8
8
|
import { useTranslation } from '@dxos/react-ui';
|
|
9
9
|
import { descriptionMessage, mx } from '@dxos/react-ui-theme';
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { meta } from '../../meta';
|
|
12
12
|
|
|
13
13
|
import { PlankHeading, type PlankHeadingProps } from './PlankHeading';
|
|
14
14
|
import { PlankLoading } from './PlankLoading';
|
|
15
15
|
|
|
16
16
|
export const PlankContentError = ({ error }: { error?: Error }) => {
|
|
17
|
-
const { t } = useTranslation(
|
|
17
|
+
const { t } = useTranslation(meta.id);
|
|
18
18
|
const errorString = error?.toString() ?? '';
|
|
19
19
|
return (
|
|
20
20
|
<div role='none' className='overflow-y-auto p-8 attention-surface grid place-items-center'>
|
|
@@ -13,7 +13,7 @@ import { hoverableControls, hoverableFocusedWithinControls } from '@dxos/react-u
|
|
|
13
13
|
|
|
14
14
|
import { useBreakpoints } from '../../hooks';
|
|
15
15
|
import { parseEntryId } from '../../layout';
|
|
16
|
-
import {
|
|
16
|
+
import { meta } from '../../meta';
|
|
17
17
|
import { DeckAction, type LayoutMode, PLANK_COMPANION_TYPE, type ResolvedPart } from '../../types';
|
|
18
18
|
import { soloInlinePadding } from '../fragments';
|
|
19
19
|
|
|
@@ -53,14 +53,14 @@ export const PlankHeading = memo(
|
|
|
53
53
|
layoutMode,
|
|
54
54
|
actions = [],
|
|
55
55
|
}: PlankHeadingProps) => {
|
|
56
|
-
const { t } = useTranslation(
|
|
56
|
+
const { t } = useTranslation(meta.id);
|
|
57
57
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
58
58
|
const { graph } = useAppGraph();
|
|
59
59
|
const breakpoint = useBreakpoints();
|
|
60
60
|
const icon = node?.properties?.icon ?? 'ph--placeholder--regular';
|
|
61
61
|
const label = pending
|
|
62
62
|
? t('pending heading')
|
|
63
|
-
: toLocalizedString(node?.properties?.label ?? ['plank heading fallback label', { ns:
|
|
63
|
+
: toLocalizedString(node?.properties?.label ?? ['plank heading fallback label', { ns: meta.id }], t);
|
|
64
64
|
|
|
65
65
|
const isCompanionNode = node?.type === PLANK_COMPANION_TYPE;
|
|
66
66
|
|
|
@@ -106,7 +106,7 @@ export const PlankHeading = memo(
|
|
|
106
106
|
|
|
107
107
|
const handleAction = useCallback(
|
|
108
108
|
(action: StackItemSigilAction) => {
|
|
109
|
-
typeof action.data === 'function' && void action.data?.({ parent: node, caller:
|
|
109
|
+
typeof action.data === 'function' && void action.data?.({ parent: node, caller: meta.id });
|
|
110
110
|
},
|
|
111
111
|
[node],
|
|
112
112
|
);
|
|
@@ -135,7 +135,7 @@ export const PlankHeading = memo(
|
|
|
135
135
|
[dispatch, id, part],
|
|
136
136
|
);
|
|
137
137
|
|
|
138
|
-
const ActionRoot = node && popoverAnchorId === `dxos.org/ui/${
|
|
138
|
+
const ActionRoot = node && popoverAnchorId === `dxos.org/ui/${meta.id}/${node.id}` ? Popover.Anchor : Fragment;
|
|
139
139
|
|
|
140
140
|
const handleTabClick = useCallback(
|
|
141
141
|
(event: MouseEvent) => {
|
|
@@ -18,21 +18,21 @@ import { Tabs } from '@dxos/react-ui-tabs';
|
|
|
18
18
|
|
|
19
19
|
import { DeckCapabilities } from '../../capabilities';
|
|
20
20
|
import { type DeckCompanion, getCompanionId, useBreakpoints, useDeckCompanions, useHoistStatusbar } from '../../hooks';
|
|
21
|
-
import {
|
|
21
|
+
import { meta } from '../../meta';
|
|
22
22
|
import { getMode } from '../../types';
|
|
23
23
|
import { layoutAppliesTopbar } from '../../util';
|
|
24
24
|
import { PlankContentError, PlankLoading } from '../Plank';
|
|
25
25
|
|
|
26
26
|
import { ToggleComplementarySidebarButton } from './SidebarButton';
|
|
27
27
|
|
|
28
|
-
const label = ['complementary sidebar title', { ns:
|
|
28
|
+
const label = ['complementary sidebar title', { ns: meta.id }] satisfies Label;
|
|
29
29
|
|
|
30
30
|
export type ComplementarySidebarProps = {
|
|
31
31
|
current?: string;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
export const ComplementarySidebar = ({ current }: ComplementarySidebarProps) => {
|
|
35
|
-
const { t } = useTranslation(
|
|
35
|
+
const { t } = useTranslation(meta.id);
|
|
36
36
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
37
37
|
const layout = useCapability(DeckCapabilities.MutableDeckState);
|
|
38
38
|
const layoutMode = getMode(layout.deck);
|
|
@@ -130,7 +130,7 @@ export const ComplementarySidebar = ({ current }: ComplementarySidebarProps) =>
|
|
|
130
130
|
key={getCompanionId(companion.id)}
|
|
131
131
|
value={getCompanionId(companion.id)}
|
|
132
132
|
classNames='absolute data-[state="inactive"]:-z-[1] inset-block-0 inline-start-0 is-[calc(100%-var(--r0-size))] lg:is-[--r1-size] grid grid-cols-1 grid-rows-[var(--rail-size)_1fr_min-content] pbs-[env(safe-area-inset-top)]'
|
|
133
|
-
{...(layout.complementarySidebarState !== 'expanded' && { inert:
|
|
133
|
+
{...(layout.complementarySidebarState !== 'expanded' && { inert: true })}
|
|
134
134
|
>
|
|
135
135
|
<ComplementarySidebarPanel
|
|
136
136
|
companion={companion}
|
|
@@ -160,7 +160,7 @@ const ScrollArea = ({ children }: PropsWithChildren) => {
|
|
|
160
160
|
};
|
|
161
161
|
|
|
162
162
|
const ComplementarySidebarPanel = ({ companion, activeId, data, hoistStatusbar }: ComplementarySidebarPanelProps) => {
|
|
163
|
-
const { t } = useTranslation(
|
|
163
|
+
const { t } = useTranslation(meta.id);
|
|
164
164
|
|
|
165
165
|
if (getCompanionId(companion.id) !== activeId && !data) {
|
|
166
166
|
return null;
|
|
@@ -9,11 +9,11 @@ import { type Label, Main } from '@dxos/react-ui';
|
|
|
9
9
|
|
|
10
10
|
import { DeckCapabilities } from '../../capabilities';
|
|
11
11
|
import { useBreakpoints, useHoistStatusbar } from '../../hooks';
|
|
12
|
-
import {
|
|
12
|
+
import { meta } from '../../meta';
|
|
13
13
|
import { getMode } from '../../types';
|
|
14
14
|
import { layoutAppliesTopbar } from '../../util';
|
|
15
15
|
|
|
16
|
-
const label = ['sidebar title', { ns:
|
|
16
|
+
const label = ['sidebar title', { ns: meta.id }] satisfies Label;
|
|
17
17
|
|
|
18
18
|
export const Sidebar = () => {
|
|
19
19
|
const { popoverAnchorId, activeDeck: current, deck } = useCapability(DeckCapabilities.DeckState);
|
|
@@ -9,14 +9,14 @@ import { IconButton, type IconButtonProps, type ThemedClassName, useTranslation
|
|
|
9
9
|
|
|
10
10
|
import { DeckCapabilities } from '../../capabilities';
|
|
11
11
|
import { getCompanionId, useDeckCompanions } from '../../hooks';
|
|
12
|
-
import {
|
|
12
|
+
import { meta } from '../../meta';
|
|
13
13
|
|
|
14
14
|
export const ToggleSidebarButton = ({
|
|
15
15
|
classNames,
|
|
16
16
|
variant = 'ghost',
|
|
17
17
|
}: ThemedClassName<Pick<IconButtonProps, 'variant'>>) => {
|
|
18
18
|
const layoutContext = useCapability(DeckCapabilities.MutableDeckState);
|
|
19
|
-
const { t } = useTranslation(
|
|
19
|
+
const { t } = useTranslation(meta.id);
|
|
20
20
|
return (
|
|
21
21
|
<IconButton
|
|
22
22
|
variant={variant}
|
|
@@ -34,7 +34,7 @@ export const ToggleSidebarButton = ({
|
|
|
34
34
|
|
|
35
35
|
export const CloseSidebarButton = () => {
|
|
36
36
|
const layoutContext = useCapability(DeckCapabilities.MutableDeckState);
|
|
37
|
-
const { t } = useTranslation(
|
|
37
|
+
const { t } = useTranslation(meta.id);
|
|
38
38
|
return (
|
|
39
39
|
<IconButton
|
|
40
40
|
variant='ghost'
|
|
@@ -55,7 +55,7 @@ export const ToggleComplementarySidebarButton = ({
|
|
|
55
55
|
}: ThemedClassName<{ inR0?: boolean; current?: string }>) => {
|
|
56
56
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
57
57
|
const layoutContext = useCapability(DeckCapabilities.MutableDeckState);
|
|
58
|
-
const { t } = useTranslation(
|
|
58
|
+
const { t } = useTranslation(meta.id);
|
|
59
59
|
|
|
60
60
|
const companions = useDeckCompanions();
|
|
61
61
|
const handleClick = useCallback(async () => {
|
package/src/events.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import { Events } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { meta } from './meta';
|
|
8
8
|
|
|
9
9
|
export namespace DeckEvents {
|
|
10
|
-
export const StateReady = Events.createStateEvent(`${
|
|
10
|
+
export const StateReady = Events.createStateEvent(`${meta.id}/state-ready`);
|
|
11
11
|
}
|
|
@@ -7,13 +7,14 @@ import { useMemo } from 'react';
|
|
|
7
7
|
import { Capabilities, useCapability } from '@dxos/app-framework';
|
|
8
8
|
import { useThemeContext } from '@dxos/react-ui';
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { meta } from '../meta';
|
|
11
11
|
import type { DeckSettingsProps, LayoutMode } from '../types';
|
|
12
12
|
|
|
13
13
|
export const useHoistStatusbar = (breakpoint: string, layoutMode?: LayoutMode): boolean => {
|
|
14
|
-
const enableStatusbar = useCapability(Capabilities.SettingsStore).getStore<DeckSettingsProps>(DECK_PLUGIN)!.value
|
|
15
|
-
.enableStatusbar;
|
|
16
14
|
const { safeAreaPadding } = useThemeContext();
|
|
15
|
+
const enableStatusbar = useCapability(Capabilities.SettingsStore).getStore<DeckSettingsProps>(meta.id)?.value
|
|
16
|
+
.enableStatusbar;
|
|
17
|
+
|
|
17
18
|
return useMemo(() => {
|
|
18
19
|
return (
|
|
19
20
|
breakpoint === 'desktop' &&
|
package/src/meta.ts
CHANGED
|
@@ -4,10 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import { type PluginMeta } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
-
export const DECK_PLUGIN = 'dxos.org/plugin/deck' as const;
|
|
8
|
-
|
|
9
7
|
export const meta: PluginMeta = {
|
|
10
|
-
id:
|
|
8
|
+
id: 'dxos.org/plugin/deck',
|
|
11
9
|
name: 'Layout',
|
|
12
10
|
icon: 'ph--layout--regular',
|
|
13
11
|
};
|
package/src/translations.ts
CHANGED
|
@@ -59,6 +59,7 @@ export const translations = [
|
|
|
59
59
|
'settings overscroll none label': 'None',
|
|
60
60
|
'settings enable statusbar label': 'Show status bar',
|
|
61
61
|
'settings enable deck label': 'Enable Deck',
|
|
62
|
+
'settings encapsulated planks label': 'Encapsulated planks',
|
|
62
63
|
'close current label': 'Close current plank',
|
|
63
64
|
'close others label': 'Close other planks',
|
|
64
65
|
'close all label': 'Close all planks',
|
package/src/types/schema.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
7
|
import { LayoutAction } from '@dxos/app-framework';
|
|
8
8
|
import { type DeepReadonly } from '@dxos/util';
|
|
@@ -11,8 +11,8 @@ import { meta } from '../meta';
|
|
|
11
11
|
|
|
12
12
|
export { ATTENDABLE_PATH_SEPARATOR } from '@dxos/react-ui-attention';
|
|
13
13
|
|
|
14
|
-
export const PLANK_COMPANION_TYPE =
|
|
15
|
-
export const DECK_COMPANION_TYPE =
|
|
14
|
+
export const PLANK_COMPANION_TYPE = `${meta.id}/plank-companion`;
|
|
15
|
+
export const DECK_COMPANION_TYPE = `${meta.id}/deck-companion`;
|
|
16
16
|
|
|
17
17
|
// TODO(Zan): In the future we should consider adding new planks adjacent to the attended plank.
|
|
18
18
|
export const NewPlankPositions = ['start', 'end'] as const;
|
|
@@ -31,6 +31,8 @@ export const DeckSettingsSchema = Schema.Struct({
|
|
|
31
31
|
enableNativeRedirect: Schema.optional(Schema.Boolean),
|
|
32
32
|
newPlankPositioning: Schema.optional(Schema.Literal(...NewPlankPositions)),
|
|
33
33
|
overscroll: Schema.optional(Schema.Literal(...OverscrollOptions)),
|
|
34
|
+
// TODO(burdon): Rename layoutMode? (e.g., bento | encapsulated?)
|
|
35
|
+
encapsulatedPlanks: Schema.optional(Schema.Boolean),
|
|
34
36
|
}).pipe(Schema.mutable);
|
|
35
37
|
export type DeckSettingsProps = Schema.Schema.Type<typeof DeckSettingsSchema>;
|
|
36
38
|
|
|
@@ -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 { Rx } from '@effect-rx/rx-react';\nimport { Option, pipe } from 'effect';\n\nimport { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';\nimport { AttentionCapabilities } from '@dxos/plugin-attention';\nimport { ROOT_ID, createExtension, rxFromSignal } from '@dxos/plugin-graph';\n\nimport { DECK_PLUGIN } from '../meta';\n\nimport { DeckCapabilities } from './capabilities';\n\nexport default (context: PluginContext) =>\n contributes(\n Capabilities.AppGraphBuilder,\n createExtension({\n id: DECK_PLUGIN,\n actions: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),\n Option.map(() => {\n const state = context.getCapability(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.getCapability(Capabilities.IntentDispatcher);\n await dispatch(\n createIntent(LayoutAction.SetLayoutMode, { part: 'mode', options: { mode: 'fullscreen' } }),\n );\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.getCapability(AttentionCapabilities.Attention);\n const attended = attention.current.at(-1);\n if (attended) {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n await dispatch(\n createIntent(LayoutAction.Close, {\n part: 'main',\n subject: [attended],\n options: { state: false },\n }),\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.getCapability(Capabilities.IntentDispatcher);\n const attention = context.getCapability(AttentionCapabilities.Attention);\n const attended = attention.current.at(-1);\n const ids = state.deck.active.filter((id) => id !== attended) ?? [];\n await dispatch(\n createIntent(LayoutAction.Close, { part: 'main', subject: ids, options: { state: false } }),\n );\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.getCapability(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 get(\n rxFromSignal(() =>\n state.sidebarState === 'expanded'\n ? 'collapse navigation sidebar label'\n : 'open navigation sidebar label',\n ),\n ),\n { ns: DECK_PLUGIN },\n ],\n icon: 'ph--sidebar--regular',\n keyBinding: {\n macos: \"meta+'\",\n },\n disposition: 'pin-end',\n position: 'hoist',\n l0Breakpoint: 'lg',\n },\n };\n\n return get(\n rxFromSignal(() =>\n !state.deck.solo ? [closeCurrent, closeOthers, closeAll, toggleSidebar] : [toggleSidebar],\n ),\n );\n }),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n );\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAIA,SAASA,UAAU;AACnB,SAASC,QAAQC,YAAY;AAE7B,SAASC,cAAcC,cAAkCC,aAAaC,oBAAoB;AAC1F,SAASC,6BAA6B;AACtC,SAASC,SAASC,iBAAiBC,oBAAoB;AAMvD,IAAA,4BAAe,CAACC,YACdC,YACEC,aAAaC,iBACbC,gBAAgB;EACdC,IAAIC;EACJC,SAAS,CAACC,SACRC,GAAGC,KAAK,CAACC,QACPC,KACED,IAAIH,IAAAA,GACJK,OAAOC,QAAQ,CAACN,UAAUA,MAAKH,OAAOU,UAAUF,OAAOG,KAAKR,KAAAA,IAAQK,OAAOI,KAAI,CAAA,GAC/EJ,OAAOK,IAAI,MAAA;AACT,UAAMC,QAAQnB,QAAQoB,cAAcC,iBAAiBC,gBAAgB;AAIrE,UAAMC,cAAc;MAClBlB,IAAI,GAAGmB,aAAaC,aAAaC,IAAI;MACrCC,MAAM,YAAA;AACJ,cAAM,EAAEC,iBAAiBC,SAAQ,IAAK7B,QAAQoB,cAAclB,aAAa4B,gBAAgB;AACzF,cAAMD,SACJE,aAAaP,aAAaQ,eAAe;UAAEC,MAAM;UAAQC,SAAS;YAAEC,MAAM;UAAa;QAAE,CAAA,CAAA;MAE7F;MACAC,YAAY;QACVC,OAAO;UAAC;UAA2B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AI;MAC9BC,MAAM,YAAA;AACJ,cAAM,EAAEC,iBAAiBC,SAAQ,IAAK7B,QAAQoB,cAAclB,aAAa4B,gBAAgB;AACzF,cAAMD,SACJE,aAAaP,aAAaoB,OAAO;UAC/BX,MAAM;UACNkB,SAAShC,MAAMmC,KAAKC;UACpBrB,SAAS;YAAEf,OAAO;UAAM;QAC1B,CAAA,CAAA;MAEJ;MACAiB,YAAY;QACVC,OAAO;UAAC;UAAmB;YAAEC,IAAIhC;UAAY;;QAC7CiC,MAAM;MACR;IACF;AAEA,UAAMmB,gBAAgB;MACpBrD,IAAI,GAAGmB,aAAamC,cAAcjC,IAAI;MACtCC,MAAM,YAAA;AACJR,cAAMyC,eAAezC,MAAMyC,iBAAiB,aAAa,cAAc;MACzE;MACAxB,YAAY;QACVC,OAAO;UACL1B,IACEkD,aAAa,MACX1C,MAAMyC,iBAAiB,aACnB,sCACA,+BAAA,CAAA;UAGR;YAAEtB,IAAIhC;UAAY;;QAEpBiC,MAAM;QACNC,YAAY;UACVC,OAAO;QACT;QACAqB,aAAa;QACbC,UAAU;QACVC,cAAc;MAChB;IACF;AAEA,WAAOrD,IACLkD,aAAa,MACX,CAAC1C,MAAMmC,KAAKW,OAAO;MAACtB;MAAcS;MAAaK;MAAUC;QAAiB;MAACA;KAAc,CAAA;EAG/F,CAAA,GACA7C,OAAOqD,UAAU,MAAM,CAAA,CAAE,CAAA,CAAA;AAGjC,CAAA,CAAA;",
|
|
6
|
-
"names": ["Rx", "Option", "pipe", "Capabilities", "LayoutAction", "contributes", "createIntent", "AttentionCapabilities", "ROOT_ID", "createExtension", "rxFromSignal", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "DECK_PLUGIN", "actions", "node", "Rx", "make", "get", "pipe", "Option", "flatMap", "ROOT_ID", "some", "none", "map", "state", "getCapability", "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", "filter", "closeAll", "toggleSidebar", "UpdateSidebar", "sidebarState", "rxFromSignal", "disposition", "position", "l0Breakpoint", "solo", "getOrElse"]
|
|
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, type PluginContext, contributes } 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: PluginContext) => {\n const settings = context.getCapability(Capabilities.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": ";;;;;AAIA,SAASA,cAAkCC,mBAAmB;AAK9D,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,QAAQE,cAAcC,aAAaC,aAAa,EAAEC,SAA4BC,WAAAA,GAAcC;AAC7G,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", "getCapability", "Capabilities", "SettingsStore", "getStore", "DECK_PLUGIN", "value", "enableNativeRedirect", "contributes", "Null"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/schema.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { LayoutAction } from '@dxos/app-framework';\nimport { type DeepReadonly } from '@dxos/util';\n\nimport { meta } from '../meta';\n\nexport { ATTENDABLE_PATH_SEPARATOR } from '@dxos/react-ui-attention';\n\nexport const PLANK_COMPANION_TYPE = 'dxos.org/plugin/deck/plank-companion';\nexport const DECK_COMPANION_TYPE = 'dxos.org/plugin/deck/deck-companion';\n\n// TODO(Zan): In the future we should consider adding new planks adjacent to the attended plank.\nexport const NewPlankPositions = ['start', 'end'] as const;\nexport type NewPlankPositioning = (typeof NewPlankPositions)[number];\n\nexport const OverscrollOptions = ['none', 'centering'] as const;\nexport type Overscroll = (typeof OverscrollOptions)[number];\n\nexport type Part = 'solo' | 'deck' | 'complementary';\nexport type ResolvedPart = Part | 'solo-primary' | 'solo-companion';\n\nexport const DeckSettingsSchema = Schema.Struct({\n showHints: Schema.optional(Schema.Boolean),\n enableDeck: Schema.optional(Schema.Boolean),\n enableStatusbar: Schema.optional(Schema.Boolean),\n enableNativeRedirect: Schema.optional(Schema.Boolean),\n newPlankPositioning: Schema.optional(Schema.Literal(...NewPlankPositions)),\n overscroll: Schema.optional(Schema.Literal(...OverscrollOptions)),\n}).pipe(Schema.mutable);\nexport type DeckSettingsProps = Schema.Schema.Type<typeof DeckSettingsSchema>;\n\nexport const PlankSizing = Schema.Record({ key: Schema.String, value: Schema.Number });\nexport type PlankSizing = Schema.Schema.Type<typeof PlankSizing>;\n\n// State of an individual deck.\nexport const DeckState = Schema.Struct({\n /** If false, the deck has not yet left solo mode and new planks should be soloed. */\n initialized: Schema.Boolean,\n active: Schema.mutable(Schema.Array(Schema.String)),\n // TODO(wittjosiah): Piping into both mutable and optional caused invalid typescript output.\n activeCompanions: Schema.optional(Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.String }))),\n inactive: Schema.mutable(Schema.Array(Schema.String)),\n solo: Schema.optional(Schema.String),\n fullscreen: Schema.Boolean,\n plankSizing: Schema.mutable(PlankSizing),\n companionFrameSizing: Schema.mutable(PlankSizing),\n});\nexport type DeckState = Schema.Schema.Type<typeof DeckState>;\n\nexport const defaultDeck: DeckState = {\n initialized: false,\n active: [],\n activeCompanions: {},\n inactive: [],\n solo: undefined,\n fullscreen: false,\n plankSizing: {},\n companionFrameSizing: {},\n};\n\nconst LayoutMode = Schema.Literal('deck', 'solo', 'solo--fullscreen');\nexport type LayoutMode = Schema.Schema.Type<typeof LayoutMode>;\nexport const isLayoutMode = (value: any): value is LayoutMode => Schema.is(LayoutMode)(value);\n\nexport const getMode = (deck: DeckState | DeepReadonly<DeckState>): LayoutMode => {\n if (deck.solo) {\n return deck.fullscreen ? 'solo--fullscreen' : 'solo';\n }\n\n return 'deck';\n};\n\n// State of the deck plugin.\nexport const DeckPluginState = Schema.Struct({\n sidebarState: Schema.Literal('closed', 'collapsed', 'expanded'),\n complementarySidebarState: Schema.Literal('closed', 'collapsed', 'expanded'),\n complementarySidebarPanel: Schema.optional(Schema.String),\n\n dialogOpen: Schema.Boolean,\n dialogType: Schema.optional(Schema.Literal('default', 'alert')),\n dialogBlockAlign: Schema.optional(Schema.Literal('start', 'center', 'end')),\n dialogOverlayClasses: Schema.optional(Schema.String),\n dialogOverlayStyle: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n /** Data to be passed to the dialog Surface. */\n dialogContent: Schema.optional(Schema.Any),\n\n popoverOpen: Schema.Boolean,\n popoverSide: Schema.optional(Schema.Literal('top', 'right', 'bottom', 'left')),\n popoverAnchor: Schema.optional(Schema.Any),\n popoverAnchorId: Schema.optional(Schema.String),\n /** Data to be passed to the popover Surface. */\n popoverContent: Schema.optional(Schema.Any),\n\n toasts: Schema.mutable(Schema.Array(LayoutAction.Toast)),\n currentUndoId: Schema.optional(Schema.String),\n\n activeDeck: Schema.String,\n previousDeck: Schema.String,\n decks: Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.mutable(DeckState) })),\n previousMode: Schema.mutable(Schema.Record({ key: Schema.String, value: LayoutMode })),\n deck: Schema.mutable(DeckState),\n\n /** The identifier of a component to scroll into view when it is mounted. */\n scrollIntoView: Schema.optional(Schema.String),\n}).pipe(Schema.mutable);\n\nexport type DeckPluginState = Schema.Schema.Type<typeof DeckPluginState>;\n\nexport namespace DeckAction {\n const PartAdjustmentSchema = Schema.Union(\n Schema.Literal('close').annotations({ description: 'Close the plank.' }),\n Schema.Literal('companion').annotations({ description: 'Open the companion plank.' }),\n Schema.Literal('solo').annotations({ description: 'Solo the plank.' }),\n Schema.Literal('solo--fullscreen').annotations({ description: 'Fullscreen the plank.' }),\n Schema.Literal('increment-start').annotations({ description: 'Move the plank towards the start of the deck.' }),\n Schema.Literal('increment-end').annotations({ description: 'Move the plank towards the end of the deck.' }),\n );\n export type PartAdjustment = Schema.Schema.Type<typeof PartAdjustmentSchema>;\n export const Adjustment = Schema.mutable(Schema.Struct({ id: Schema.String, type: PartAdjustmentSchema }));\n export type Adjustment = Schema.Schema.Type<typeof Adjustment>;\n\n // An atomic transaction to apply to the deck, describing which element to move to which location.\n export class Adjust extends Schema.TaggedClass<Adjust>()(`${meta.id}/action/adjust`, {\n input: Adjustment,\n output: Schema.Void,\n }) {}\n\n export class UpdatePlankSize extends Schema.TaggedClass<UpdatePlankSize>()(`${meta.id}/action/update-plank-size`, {\n input: Schema.Struct({\n id: Schema.String,\n size: Schema.Number,\n }),\n output: Schema.Void,\n }) {}\n\n export class ChangeCompanion extends Schema.TaggedClass<ChangeCompanion>()(`${meta.id}/action/change-companion`, {\n input: Schema.Struct({\n primary: Schema.String,\n companion: Schema.Union(Schema.String, Schema.Null),\n }),\n output: Schema.Void,\n }) {}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;AAIA,SAASA,cAAc;AAEvB,SAASC,oBAAoB;AAK7B,SAASC,iCAAiC;AAEnC,IAAMC,uBAAuB;AAC7B,IAAMC,sBAAsB;AAG5B,IAAMC,oBAAoB;EAAC;EAAS;;AAGpC,IAAMC,oBAAoB;EAAC;EAAQ;;AAMnC,IAAMC,qBAAqBC,OAAOC,OAAO;EAC9CC,WAAWF,OAAOG,SAASH,OAAOI,OAAO;EACzCC,YAAYL,OAAOG,SAASH,OAAOI,OAAO;EAC1CE,iBAAiBN,OAAOG,SAASH,OAAOI,OAAO;EAC/CG,sBAAsBP,OAAOG,SAASH,OAAOI,OAAO;EACpDI,qBAAqBR,OA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AA,aAAAA,CAAAA,EAAAA;;",
|
|
6
|
-
"names": ["Schema", "LayoutAction", "ATTENDABLE_PATH_SEPARATOR", "PLANK_COMPANION_TYPE", "DECK_COMPANION_TYPE", "NewPlankPositions", "OverscrollOptions", "DeckSettingsSchema", "Schema", "Struct", "showHints", "optional", "Boolean", "enableDeck", "enableStatusbar", "enableNativeRedirect", "newPlankPositioning", "Literal", "overscroll", "pipe", "mutable", "PlankSizing", "Record", "key", "String", "value", "Number", "DeckState", "initialized", "active", "Array", "activeCompanions", "inactive", "solo", "fullscreen", "plankSizing", "companionFrameSizing", "defaultDeck", "undefined", "LayoutMode", "isLayoutMode", "is", "getMode", "deck", "DeckPluginState", "sidebarState", "complementarySidebarState", "complementarySidebarPanel", "dialogOpen", "dialogType", "dialogBlockAlign", "dialogOverlayClasses", "dialogOverlayStyle", "Any", "dialogContent", "popoverOpen", "popoverSide", "popoverAnchor", "popoverAnchorId", "popoverContent", "toasts", "LayoutAction", "Toast", "currentUndoId", "activeDeck", "previousDeck", "decks", "previousMode", "scrollIntoView", "DeckAction", "PartAdjustmentSchema", "Union", "annotations", "description", "Adjustment", "id", "type", "Adjust", "TaggedClass", "meta", "input", "output", "Void", "UpdatePlankSize", "size", "ChangeCompanion", "primary", "companion", "Null"]
|
|
7
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DECK_PLUGIN
|
|
3
|
-
} from "./chunk-Z5KITAZW.mjs";
|
|
4
|
-
|
|
5
|
-
// src/capabilities/capabilities.ts
|
|
6
|
-
import { defineCapability } from "@dxos/app-framework";
|
|
7
|
-
(function(DeckCapabilities2) {
|
|
8
|
-
DeckCapabilities2.DeckState = defineCapability(`${DECK_PLUGIN}/capability/state`);
|
|
9
|
-
DeckCapabilities2.MutableDeckState = defineCapability(`${DECK_PLUGIN}/capability/state`);
|
|
10
|
-
})(DeckCapabilities || (DeckCapabilities = {}));
|
|
11
|
-
var DeckCapabilities;
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
DeckCapabilities
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=chunk-M57WD3V6.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
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 DeckPluginState } from '../types';\n\nexport namespace DeckCapabilities {\n export const DeckState = defineCapability<DeepReadonly<DeckPluginState>>(`${DECK_PLUGIN}/capability/state`);\n export const MutableDeckState = defineCapability<DeckPluginState>(`${DECK_PLUGIN}/capability/state`);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;AAIA,SAASA,wBAAwB;UAMhBC,mBAAAA;oBACFC,YAAYC,iBAAgD,GAAGC,WAAAA,mBAA8B;oBAC7FC,mBAAmBF,iBAAkC,GAAGC,WAAAA,mBAA8B;AACrG,GAHiBH,qBAAAA,mBAAAA,CAAAA,EAAAA;;",
|
|
6
|
-
"names": ["defineCapability", "DeckCapabilities", "DeckState", "defineCapability", "DECK_PLUGIN", "MutableDeckState"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/state.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes } from '@dxos/app-framework';\nimport { invariant } from '@dxos/invariant';\nimport { live } from '@dxos/live-object';\nimport { LocalStorageStore } from '@dxos/local-storage';\nimport { type SidebarState } from '@dxos/react-ui';\n\nimport { DECK_PLUGIN } from '../meta';\nimport { type DeckPluginState, type DeckState, defaultDeck, getMode } from '../types';\n\nimport { DeckCapabilities } from './capabilities';\n\nconst boolean = /true|false/;\n\n// TODO(thure, 18 Feb 2025): Remove after the next release.\n\nconst migrateSidebarStateDefaults = {\n [`${DECK_PLUGIN}/complementary-sidebar-state`]: 'expanded',\n [`${DECK_PLUGIN}/sidebar-state`]: 'collapsed',\n};\n\nconst migrateSidebarState = () => {\n Object.entries(migrateSidebarStateDefaults).forEach(([key, defaultValue]) => {\n if (boolean.test(localStorage.getItem(key) ?? 'never')) {\n localStorage.setItem(key, defaultValue);\n }\n });\n};\n\nexport const DeckStateFactory = () => {\n migrateSidebarState();\n\n const state = new LocalStorageStore<DeckPluginState>(DECK_PLUGIN, {\n sidebarState: 'expanded',\n complementarySidebarState: 'collapsed',\n complementarySidebarPanel: undefined,\n dialogContent: null,\n dialogOpen: false,\n dialogBlockAlign: undefined,\n dialogType: undefined,\n popoverContent: null,\n popoverAnchor: undefined,\n popoverAnchorId: undefined,\n popoverOpen: false,\n toasts: [],\n currentUndoId: undefined,\n activeDeck: 'default',\n previousDeck: 'default',\n decks: {\n default: { ...defaultDeck },\n },\n get deck() {\n const deck = this.decks[this.activeDeck];\n invariant(deck, `Deck not found: ${this.activeDeck}`);\n return deck;\n },\n previousMode: {},\n scrollIntoView: undefined,\n });\n\n state\n .prop({ key: 'sidebarState', type: LocalStorageStore.enum<SidebarState>() })\n .prop({ key: 'complementarySidebarState', type: LocalStorageStore.enum<SidebarState>() })\n .prop({ key: 'complementarySidebarPanel', type: LocalStorageStore.string({ allowUndefined: true }) })\n .prop({ key: 'decks', type: LocalStorageStore.json<Record<string, DeckState>>() })\n .prop({ key: 'activeDeck', type: LocalStorageStore.string() })\n .prop({ key: 'previousDeck', type: LocalStorageStore.string() });\n\n const layout = live<Capabilities.Layout>({\n get mode() {\n return getMode(state.values.deck);\n },\n get dialogOpen() {\n return state.values.dialogOpen;\n },\n get sidebarOpen() {\n return state.values.sidebarState === 'expanded';\n },\n get complementarySidebarOpen() {\n return state.values.complementarySidebarState === 'expanded';\n },\n get workspace() {\n return state.values.activeDeck;\n },\n get active() {\n return state.values.deck.solo ? [state.values.deck.solo] : state.values.deck.active;\n },\n get inactive() {\n return state.values.deck.inactive;\n },\n get scrollIntoView() {\n return state.values.scrollIntoView;\n },\n });\n\n return [\n contributes(DeckCapabilities.DeckState, state.values, () => state.close()),\n contributes(Capabilities.Layout, layout),\n ];\n};\n\nexport default DeckStateFactory;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;AAIA,SAASA,cAAcC,mBAAmB;AAC1C,SAASC,iBAAiB;AAC1B,SAASC,YAAY;AACrB,SAASC,yBAAyB;;AAQlC,IAAMC,UAAU;AAIhB,IAAMC,8BAA8B;EAClC,CAAC,GAAGC,WAAAA,8BAAyC,GAAG;EAChD,CAAC,GAAGA,WAAAA,gBAA2B,GAAG;AACpC;AAEA,IAAMC,sBAAsB,MAAA;AAC1BC,SAAOC,QAAQJ,2BAAAA,EAA6BK,QAAQ,CAAC,CAACC,KAAKC,YAAAA,MAAa;AACtE,QAAIR,QAAQS,KAAKC,aAAaC,QAAQJ,GAAAA,KAAQ,OAAA,GAAU;AACtDG,mBAAaE,QAAQL,KAAKC,YAAAA;IAC5B;EACF,CAAA;AACF;AAEO,IAAMK,mBAAmB,MAAA;AAC9BV,sBAAAA;AAEA,QAAMW,QAAQ,IAAIC,kBAAmCb,aAAa;IAChEc,cAAc;IACdC,2BAA2B;IAC3BC,2BAA2BC;IAC3BC,eAAe;IACfC,YAAY;IACZC,kBAAkBH;IAClBI,YAAYJ;IACZK,gBAAgB;IAChBC,eAAeN;IACfO,iBAAiBP;IACjBQ,aAAa;IACbC,QAAQ,CAAA;IACRC,eAAeV;IACfW,YAAY;IACZC,cAAc;IACdC,OAAO;MACLC,SAAS;QAAE,GAAGC;MAAY;IAC5B;IACA,IAAIC,OAAO;AACT,YAAMA,OAAO,KAAKH,MAAM,KAAKF,UAAU;AACvCM,gBAAUD,MAAM,mBAAmB,KAAKL,UAAU,IAAE;;;;;;;;;AACpD,aAAOK;IACT;IACAE,cAAc,CAAC;IACfC,gBAAgBnB;E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,IAAA,gBAAehC;",
|
|
6
|
-
"names": ["Capabilities", "contributes", "invariant", "live", "LocalStorageStore", "boolean", "migrateSidebarStateDefaults", "DECK_PLUGIN", "migrateSidebarState", "Object", "entries", "forEach", "key", "defaultValue", "test", "localStorage", "getItem", "setItem", "DeckStateFactory", "state", "LocalStorageStore", "sidebarState", "complementarySidebarState", "complementarySidebarPanel", "undefined", "dialogContent", "dialogOpen", "dialogBlockAlign", "dialogType", "popoverContent", "popoverAnchor", "popoverAnchorId", "popoverOpen", "toasts", "currentUndoId", "activeDeck", "previousDeck", "decks", "default", "defaultDeck", "deck", "invariant", "previousMode", "scrollIntoView", "prop", "type", "enum", "string", "allowUndefined", "json", "layout", "live", "mode", "getMode", "values", "sidebarOpen", "complementarySidebarOpen", "workspace", "active", "solo", "inactive", "contributes", "DeckCapabilities", "DeckState", "close", "Capabilities", "Layout"]
|
|
7
|
-
}
|