@dxos/plugin-deck 0.8.4-main.84f28bd → 0.8.4-main.ae835ea
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-JTFSDT2I.mjs → app-graph-builder-PCMSER2O.mjs} +17 -16
- package/dist/lib/browser/app-graph-builder-PCMSER2O.mjs.map +7 -0
- package/dist/lib/browser/{check-app-scheme-57U62A3A.mjs → check-app-scheme-HIEVFAAX.mjs} +6 -6
- package/dist/lib/browser/check-app-scheme-HIEVFAAX.mjs.map +7 -0
- package/dist/lib/browser/{chunk-QO3VIMKQ.mjs → chunk-27I7DJUG.mjs} +10 -9
- package/dist/lib/browser/chunk-27I7DJUG.mjs.map +7 -0
- package/dist/lib/browser/chunk-5KMJPIQC.mjs +16 -0
- package/dist/lib/browser/chunk-5KMJPIQC.mjs.map +7 -0
- package/dist/lib/browser/{chunk-XL7EWOGI.mjs → chunk-F3VCCHVL.mjs} +13 -13
- package/dist/lib/browser/chunk-F3VCCHVL.mjs.map +7 -0
- package/dist/lib/browser/{chunk-7LJDT5OH.mjs → chunk-MFFZK4LT.mjs} +15 -15
- package/dist/lib/browser/chunk-MFFZK4LT.mjs.map +7 -0
- package/dist/lib/browser/{chunk-QBKDUEDV.mjs → chunk-SBJLGRJV.mjs} +535 -497
- package/dist/lib/browser/chunk-SBJLGRJV.mjs.map +7 -0
- package/dist/lib/browser/chunk-UXLU6CMW.mjs +16 -0
- package/dist/lib/browser/chunk-UXLU6CMW.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +20 -14
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-6YMAE4SF.mjs → intent-resolver-Q3KETDSS.mjs} +21 -18
- package/dist/lib/browser/intent-resolver-Q3KETDSS.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-UVN2LMU3.mjs → react-root-LU3662ME.mjs} +11 -11
- package/dist/lib/browser/react-root-LU3662ME.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-WOLHGHMN.mjs → react-surface-TDBFPN5T.mjs} +13 -13
- package/dist/lib/browser/react-surface-TDBFPN5T.mjs.map +7 -0
- package/dist/lib/browser/{settings-L5CR5GTJ.mjs → settings-SDPTOCCM.mjs} +7 -6
- package/dist/lib/browser/{settings-L5CR5GTJ.mjs.map → settings-SDPTOCCM.mjs.map} +3 -3
- package/dist/lib/browser/state-QTVNH7N6.mjs +12 -0
- package/dist/lib/browser/toolkit-TM2Y6YL2.mjs +53 -0
- package/dist/lib/browser/toolkit-TM2Y6YL2.mjs.map +7 -0
- package/dist/lib/browser/{types.mjs → types/index.mjs} +3 -5
- package/dist/lib/browser/{url-handler-KZW7GBA2.mjs → url-handler-QEYGYE2H.mjs} +7 -7
- package/dist/lib/browser/url-handler-QEYGYE2H.mjs.map +7 -0
- 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 +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/check-app-scheme.d.ts +1 -1
- package/dist/types/src/capabilities/check-app-scheme.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +9 -9
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts +2 -2
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -1
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +5 -2
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts +23 -0
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
- 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 +1 -1
- 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/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 +1 -1
- package/dist/types/src/components/Plank/Plank.d.ts.map +1 -1
- package/dist/types/src/components/Plank/Plank.stories.d.ts +86 -5
- package/dist/types/src/components/Plank/Plank.stories.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 +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/events.d.ts.map +1 -1
- package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
- package/dist/types/src/hooks/useHoistStatusbar.d.ts.map +1 -1
- package/dist/types/src/hooks/useNodeActionExpander.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 +2 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/{types.d.ts → types/schema.d.ts} +11 -11
- package/dist/types/src/types/schema.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +48 -44
- package/src/DeckPlugin.ts +64 -59
- package/src/capabilities/app-graph-builder.ts +13 -11
- package/src/capabilities/capabilities.ts +3 -3
- package/src/capabilities/check-app-scheme.ts +3 -3
- package/src/capabilities/index.ts +2 -1
- package/src/capabilities/intent-resolver.ts +22 -18
- package/src/capabilities/react-root.tsx +4 -3
- package/src/capabilities/react-surface.tsx +5 -5
- package/src/capabilities/settings.ts +2 -1
- package/src/capabilities/state.ts +10 -6
- package/src/capabilities/toolkit.ts +68 -0
- package/src/capabilities/tools.ts +10 -7
- package/src/capabilities/url-handler.ts +3 -2
- package/src/components/DeckLayout/Banner.tsx +3 -3
- package/src/components/DeckLayout/ContentEmpty.tsx +1 -1
- package/src/components/DeckLayout/DeckLayout.stories.tsx +64 -0
- package/src/components/DeckLayout/DeckLayout.tsx +10 -279
- package/src/components/DeckLayout/DeckMain.tsx +285 -0
- package/src/components/DeckLayout/Fallback.tsx +2 -2
- package/src/components/DeckLayout/Popover.tsx +1 -1
- package/src/components/DeckLayout/Toast.tsx +27 -2
- package/src/components/DeckSettings/DeckSettings.tsx +80 -65
- package/src/components/Plank/Plank.stories.tsx +10 -11
- package/src/components/Plank/Plank.tsx +34 -18
- package/src/components/Plank/PlankControls.tsx +3 -3
- package/src/components/Plank/PlankError.tsx +5 -7
- package/src/components/Plank/PlankHeading.tsx +12 -10
- package/src/components/Sidebar/ComplementarySidebar.tsx +9 -8
- package/src/components/Sidebar/Sidebar.tsx +2 -2
- package/src/components/Sidebar/SidebarButton.tsx +6 -6
- package/src/events.ts +2 -2
- package/src/hooks/useDeckCompanions.ts +2 -2
- package/src/hooks/useHoistStatusbar.ts +4 -3
- package/src/hooks/useNodeActionExpander.ts +1 -1
- package/src/meta.ts +6 -3
- package/src/translations.ts +2 -0
- package/src/types/index.ts +5 -0
- package/src/{types.ts → types/schema.ts} +9 -9
- package/dist/lib/browser/app-graph-builder-JTFSDT2I.mjs.map +0 -7
- package/dist/lib/browser/check-app-scheme-57U62A3A.mjs.map +0 -7
- package/dist/lib/browser/chunk-7LJDT5OH.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-QBKDUEDV.mjs.map +0 -7
- package/dist/lib/browser/chunk-QO3VIMKQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-XL7EWOGI.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-6YMAE4SF.mjs.map +0 -7
- package/dist/lib/browser/react-root-UVN2LMU3.mjs.map +0 -7
- package/dist/lib/browser/react-surface-WOLHGHMN.mjs.map +0 -7
- package/dist/lib/browser/state-ZTYWMORZ.mjs +0 -10
- package/dist/lib/browser/tools-2YYFHQAS.mjs +0 -88
- package/dist/lib/browser/tools-2YYFHQAS.mjs.map +0 -7
- package/dist/lib/browser/url-handler-KZW7GBA2.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-YCSX45KJ.mjs +0 -153
- package/dist/lib/node-esm/app-graph-builder-YCSX45KJ.mjs.map +0 -7
- package/dist/lib/node-esm/check-app-scheme-3YZIA73T.mjs +0 -33
- package/dist/lib/node-esm/check-app-scheme-3YZIA73T.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ANLUUC3J.mjs +0 -129
- package/dist/lib/node-esm/chunk-ANLUUC3J.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-F4YIQ5GG.mjs +0 -128
- package/dist/lib/node-esm/chunk-F4YIQ5GG.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HHG6H2BX.mjs +0 -15
- package/dist/lib/node-esm/chunk-HHG6H2BX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-KTPDAVNM.mjs +0 -17
- package/dist/lib/node-esm/chunk-KTPDAVNM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NMSUKHE3.mjs +0 -1495
- package/dist/lib/node-esm/chunk-NMSUKHE3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QFKYT4JK.mjs +0 -163
- package/dist/lib/node-esm/chunk-QFKYT4JK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UJGQAMF7.mjs +0 -147
- package/dist/lib/node-esm/chunk-UJGQAMF7.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -169
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-URTWBGD7.mjs +0 -522
- package/dist/lib/node-esm/intent-resolver-URTWBGD7.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-root-GFX4GOJT.mjs +0 -44
- package/dist/lib/node-esm/react-root-GFX4GOJT.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-F6L5PLWK.mjs +0 -41
- package/dist/lib/node-esm/react-surface-F6L5PLWK.mjs.map +0 -7
- package/dist/lib/node-esm/settings-WE3TBMOC.mjs +0 -30
- package/dist/lib/node-esm/settings-WE3TBMOC.mjs.map +0 -7
- package/dist/lib/node-esm/state-DUK6WFDX.mjs +0 -11
- package/dist/lib/node-esm/state-DUK6WFDX.mjs.map +0 -7
- package/dist/lib/node-esm/tools-HH6NN7HB.mjs +0 -89
- package/dist/lib/node-esm/tools-HH6NN7HB.mjs.map +0 -7
- package/dist/lib/node-esm/types.mjs +0 -35
- package/dist/lib/node-esm/types.mjs.map +0 -7
- package/dist/lib/node-esm/url-handler-774BWWKI.mjs +0 -71
- package/dist/lib/node-esm/url-handler-774BWWKI.mjs.map +0 -7
- package/dist/types/src/types.d.ts.map +0 -1
- /package/dist/lib/browser/{state-ZTYWMORZ.mjs.map → state-QTVNH7N6.mjs.map} +0 -0
- /package/dist/lib/browser/{types.mjs.map → types/index.mjs.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
useHoistStatusbar,
|
|
7
7
|
useMainSize,
|
|
8
8
|
useNodeActionExpander
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MFFZK4LT.mjs";
|
|
10
10
|
import {
|
|
11
11
|
calculateOverscroll,
|
|
12
12
|
layoutAppliesTopbar,
|
|
@@ -14,17 +14,17 @@ import {
|
|
|
14
14
|
} from "./chunk-CNTGBCMK.mjs";
|
|
15
15
|
import {
|
|
16
16
|
DeckCapabilities
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5KMJPIQC.mjs";
|
|
18
18
|
import {
|
|
19
19
|
DeckAction,
|
|
20
20
|
NewPlankPositions,
|
|
21
21
|
OverscrollOptions,
|
|
22
22
|
PLANK_COMPANION_TYPE,
|
|
23
23
|
getMode
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-F3VCCHVL.mjs";
|
|
25
25
|
import {
|
|
26
|
-
|
|
27
|
-
} from "./chunk-
|
|
26
|
+
meta
|
|
27
|
+
} from "./chunk-UXLU6CMW.mjs";
|
|
28
28
|
|
|
29
29
|
// src/components/DeckLayout/Banner.tsx
|
|
30
30
|
import { useSignals as _useSignals9 } from "@preact-signals/safe-react/tracking";
|
|
@@ -37,94 +37,13 @@ import { mx as mx4 } from "@dxos/react-ui-theme";
|
|
|
37
37
|
import { useSignals as _useSignals7 } from "@preact-signals/safe-react/tracking";
|
|
38
38
|
import React7, { Fragment as Fragment2, useCallback as useCallback5, useEffect as useEffect3, useMemo as useMemo3, useState as useState2 } from "react";
|
|
39
39
|
import { LayoutAction as LayoutAction4, Surface as Surface3, createIntent as createIntent5, useCapability as useCapability3, useIntentDispatcher as useIntentDispatcher5 } from "@dxos/app-framework";
|
|
40
|
-
import {
|
|
40
|
+
import { IconButton as IconButton4, Main, toLocalizedString as toLocalizedString2, useTranslation as useTranslation5 } from "@dxos/react-ui";
|
|
41
41
|
import { Tabs } from "@dxos/react-ui-tabs";
|
|
42
42
|
|
|
43
|
-
// src/components/Sidebar/SidebarButton.tsx
|
|
44
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
45
|
-
import React, { useCallback } from "react";
|
|
46
|
-
import { createIntent, LayoutAction, useCapability, useIntentDispatcher } from "@dxos/app-framework";
|
|
47
|
-
import { IconButton, useTranslation } from "@dxos/react-ui";
|
|
48
|
-
var ToggleSidebarButton = ({ classNames, variant = "ghost" }) => {
|
|
49
|
-
var _effect = _useSignals();
|
|
50
|
-
try {
|
|
51
|
-
const layoutContext = useCapability(DeckCapabilities.MutableDeckState);
|
|
52
|
-
const { t } = useTranslation(DECK_PLUGIN);
|
|
53
|
-
return /* @__PURE__ */ React.createElement(IconButton, {
|
|
54
|
-
variant,
|
|
55
|
-
iconOnly: true,
|
|
56
|
-
icon: "ph--sidebar--regular",
|
|
57
|
-
size: 4,
|
|
58
|
-
label: t("open navigation sidebar label"),
|
|
59
|
-
onClick: () => layoutContext.sidebarState = layoutContext.sidebarState === "expanded" ? "collapsed" : "expanded",
|
|
60
|
-
classNames
|
|
61
|
-
});
|
|
62
|
-
} finally {
|
|
63
|
-
_effect.f();
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
var CloseSidebarButton = () => {
|
|
67
|
-
var _effect = _useSignals();
|
|
68
|
-
try {
|
|
69
|
-
const layoutContext = useCapability(DeckCapabilities.MutableDeckState);
|
|
70
|
-
const { t } = useTranslation(DECK_PLUGIN);
|
|
71
|
-
return /* @__PURE__ */ React.createElement(IconButton, {
|
|
72
|
-
variant: "ghost",
|
|
73
|
-
iconOnly: true,
|
|
74
|
-
icon: "ph--caret-line-left--regular",
|
|
75
|
-
size: 4,
|
|
76
|
-
label: t("close navigation sidebar label"),
|
|
77
|
-
onClick: () => layoutContext.sidebarState = "collapsed",
|
|
78
|
-
classNames: "rounded-none pli-1 dx-focus-ring-inset pie-[max(.5rem,env(safe-area-inset-left))]"
|
|
79
|
-
});
|
|
80
|
-
} finally {
|
|
81
|
-
_effect.f();
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
var ToggleComplementarySidebarButton = ({ inR0, classNames, current }) => {
|
|
85
|
-
var _effect = _useSignals();
|
|
86
|
-
try {
|
|
87
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
88
|
-
const layoutContext = useCapability(DeckCapabilities.MutableDeckState);
|
|
89
|
-
const { t } = useTranslation(DECK_PLUGIN);
|
|
90
|
-
const companions = useDeckCompanions();
|
|
91
|
-
const handleClick = useCallback(async () => {
|
|
92
|
-
layoutContext.complementarySidebarState = layoutContext.complementarySidebarState === "expanded" ? "collapsed" : "expanded";
|
|
93
|
-
const firstCompanion = companions[0];
|
|
94
|
-
if (layoutContext.complementarySidebarState === "expanded" && !current && firstCompanion) {
|
|
95
|
-
await dispatch(createIntent(LayoutAction.UpdateComplementary, {
|
|
96
|
-
part: "complementary",
|
|
97
|
-
subject: getCompanionId(firstCompanion.id)
|
|
98
|
-
}));
|
|
99
|
-
}
|
|
100
|
-
}, [
|
|
101
|
-
layoutContext,
|
|
102
|
-
current,
|
|
103
|
-
companions,
|
|
104
|
-
dispatch
|
|
105
|
-
]);
|
|
106
|
-
return /* @__PURE__ */ React.createElement(IconButton, {
|
|
107
|
-
iconOnly: true,
|
|
108
|
-
onClick: handleClick,
|
|
109
|
-
variant: "ghost",
|
|
110
|
-
label: t("open complementary sidebar label"),
|
|
111
|
-
classNames: [
|
|
112
|
-
"[&>svg]:-scale-x-100",
|
|
113
|
-
classNames
|
|
114
|
-
],
|
|
115
|
-
icon: "ph--sidebar-simple--regular",
|
|
116
|
-
size: inR0 ? 5 : 4,
|
|
117
|
-
tooltipSide: inR0 ? "left" : void 0
|
|
118
|
-
});
|
|
119
|
-
} finally {
|
|
120
|
-
_effect.f();
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
|
|
124
43
|
// src/components/Plank/Plank.tsx
|
|
125
|
-
import { useSignals as
|
|
126
|
-
import
|
|
127
|
-
import { LayoutAction as
|
|
44
|
+
import { useSignals as _useSignals5 } from "@preact-signals/safe-react/tracking";
|
|
45
|
+
import React5, { memo as memo2, useCallback as useCallback3, useLayoutEffect, useMemo as useMemo2, useRef } from "react";
|
|
46
|
+
import { LayoutAction as LayoutAction2, Surface as Surface2, createIntent as createIntent3, useAppGraph as useAppGraph2, useCapability, useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework";
|
|
128
47
|
import { debounce } from "@dxos/async";
|
|
129
48
|
import { useNode } from "@dxos/plugin-graph";
|
|
130
49
|
import { ATTENDABLE_PATH_SEPARATOR, useAttentionAttributes } from "@dxos/react-ui-attention";
|
|
@@ -132,31 +51,38 @@ import { StackItem as StackItem2, railGridHorizontal } from "@dxos/react-ui-stac
|
|
|
132
51
|
import { mainIntrinsicSize, mx as mx3 } from "@dxos/react-ui-theme";
|
|
133
52
|
|
|
134
53
|
// src/components/Plank/PlankError.tsx
|
|
135
|
-
import { useSignals as
|
|
136
|
-
import
|
|
137
|
-
import { useTranslation as
|
|
54
|
+
import { useSignals as _useSignals4 } from "@preact-signals/safe-react/tracking";
|
|
55
|
+
import React4, { useEffect as useEffect2, useState } from "react";
|
|
56
|
+
import { useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
138
57
|
import { descriptionMessage, mx as mx2 } from "@dxos/react-ui-theme";
|
|
139
58
|
|
|
140
59
|
// src/components/Plank/PlankHeading.tsx
|
|
141
|
-
import { useSignals as
|
|
142
|
-
import
|
|
143
|
-
import {
|
|
144
|
-
import { Icon, IconButton as
|
|
60
|
+
import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
|
|
61
|
+
import React2, { Fragment, memo, useCallback as useCallback2, useEffect, useMemo } from "react";
|
|
62
|
+
import { LayoutAction, Surface, createIntent as createIntent2, useAppGraph, useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework";
|
|
63
|
+
import { Icon, IconButton as IconButton2, Popover, toLocalizedString, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
145
64
|
import { StackItem } from "@dxos/react-ui-stack";
|
|
146
65
|
import { TextTooltip } from "@dxos/react-ui-text-tooltip";
|
|
147
66
|
import { hoverableControls, hoverableFocusedWithinControls } from "@dxos/react-ui-theme";
|
|
148
67
|
|
|
68
|
+
// src/components/fragments.ts
|
|
69
|
+
import { mx } from "@dxos/react-ui-theme";
|
|
70
|
+
var soloInlinePadding = "pis-[calc(env(safe-area-inset-left)+.25rem)] pie-[calc(env(safe-area-inset-left)+.25rem)]";
|
|
71
|
+
var sidebarToggleStyles = "bs-[--rail-item] is-[--rail-item] absolute block-end-2 z-[1] !bg-deckSurface lg:hidden";
|
|
72
|
+
var fixedSidebarToggleStyles = mx(sidebarToggleStyles, "inline-start-2");
|
|
73
|
+
var fixedComplementarySidebarToggleStyles = mx(sidebarToggleStyles, "inline-end-2");
|
|
74
|
+
|
|
149
75
|
// src/components/Plank/PlankControls.tsx
|
|
150
|
-
import { useSignals as
|
|
151
|
-
import
|
|
152
|
-
import { createIntent
|
|
76
|
+
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
77
|
+
import React, { forwardRef, useCallback } from "react";
|
|
78
|
+
import { createIntent, useIntentDispatcher } from "@dxos/app-framework";
|
|
153
79
|
import { invariant } from "@dxos/invariant";
|
|
154
|
-
import { ButtonGroup, IconButton
|
|
80
|
+
import { ButtonGroup, IconButton, useTranslation } from "@dxos/react-ui";
|
|
155
81
|
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-deck/src/components/Plank/PlankControls.tsx";
|
|
156
82
|
var PlankControl = ({ icon, label: label3, ...props }) => {
|
|
157
|
-
var _effect =
|
|
83
|
+
var _effect = _useSignals();
|
|
158
84
|
try {
|
|
159
|
-
return /* @__PURE__ */
|
|
85
|
+
return /* @__PURE__ */ React.createElement(IconButton, {
|
|
160
86
|
iconOnly: true,
|
|
161
87
|
label: label3,
|
|
162
88
|
icon,
|
|
@@ -171,11 +97,11 @@ var PlankControl = ({ icon, label: label3, ...props }) => {
|
|
|
171
97
|
};
|
|
172
98
|
var plankControlSpacing = "pli-2";
|
|
173
99
|
var PlankCompanionControls = /* @__PURE__ */ forwardRef(({ primary }, forwardedRef) => {
|
|
174
|
-
var _effect =
|
|
100
|
+
var _effect = _useSignals();
|
|
175
101
|
try {
|
|
176
|
-
const { t } =
|
|
177
|
-
const { dispatchPromise: dispatch } =
|
|
178
|
-
const handleCloseCompanion =
|
|
102
|
+
const { t } = useTranslation(meta.id);
|
|
103
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
104
|
+
const handleCloseCompanion = useCallback(() => {
|
|
179
105
|
invariant(primary, void 0, {
|
|
180
106
|
F: __dxlog_file,
|
|
181
107
|
L: 49,
|
|
@@ -185,15 +111,15 @@ var PlankCompanionControls = /* @__PURE__ */ forwardRef(({ primary }, forwardedR
|
|
|
185
111
|
""
|
|
186
112
|
]
|
|
187
113
|
});
|
|
188
|
-
return dispatch(
|
|
114
|
+
return dispatch(createIntent(DeckAction.ChangeCompanion, {
|
|
189
115
|
primary,
|
|
190
116
|
companion: null
|
|
191
117
|
}));
|
|
192
118
|
}, []);
|
|
193
|
-
return /* @__PURE__ */
|
|
119
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
194
120
|
ref: forwardedRef,
|
|
195
121
|
className: "contents app-no-drag"
|
|
196
|
-
}, /* @__PURE__ */
|
|
122
|
+
}, /* @__PURE__ */ React.createElement(PlankControl, {
|
|
197
123
|
label: t("close companion label"),
|
|
198
124
|
variant: "ghost",
|
|
199
125
|
icon: "ph--x--regular",
|
|
@@ -205,52 +131,52 @@ var PlankCompanionControls = /* @__PURE__ */ forwardRef(({ primary }, forwardedR
|
|
|
205
131
|
}
|
|
206
132
|
});
|
|
207
133
|
var PlankControls = /* @__PURE__ */ forwardRef(({ children, classNames, variant = "default", capabilities, layoutMode, pin, close = false, onClick, ...props }, forwardedRef) => {
|
|
208
|
-
var _effect =
|
|
134
|
+
var _effect = _useSignals();
|
|
209
135
|
try {
|
|
210
|
-
const { t } =
|
|
136
|
+
const { t } = useTranslation(meta.id);
|
|
211
137
|
const buttonClassNames = variant === "hide-disabled" ? `disabled:hidden ${plankControlSpacing}` : plankControlSpacing;
|
|
212
138
|
const layoutIsAnySolo = !!layoutMode?.startsWith("solo");
|
|
213
|
-
return /* @__PURE__ */
|
|
139
|
+
return /* @__PURE__ */ React.createElement(ButtonGroup, {
|
|
214
140
|
...props,
|
|
215
141
|
classNames: [
|
|
216
142
|
"app-no-drag !opacity-100",
|
|
217
143
|
classNames
|
|
218
144
|
],
|
|
219
145
|
ref: forwardedRef
|
|
220
|
-
}, capabilities.deck ? /* @__PURE__ */
|
|
146
|
+
}, capabilities.deck ? /* @__PURE__ */ React.createElement(React.Fragment, null, capabilities.solo && /* @__PURE__ */ React.createElement(React.Fragment, null, layoutMode === "solo" && /* @__PURE__ */ React.createElement(PlankControl, {
|
|
221
147
|
label: t("show fullscreen plank label"),
|
|
222
148
|
classNames: buttonClassNames,
|
|
223
149
|
icon: "ph--corners-out--regular",
|
|
224
150
|
onClick: () => onClick?.("solo--fullscreen")
|
|
225
|
-
}), /* @__PURE__ */
|
|
151
|
+
}), /* @__PURE__ */ React.createElement(PlankControl, {
|
|
226
152
|
label: t(layoutMode === "solo--fullscreen" ? "exit fullscreen label" : layoutIsAnySolo ? "show deck plank label" : "show solo plank label"),
|
|
227
153
|
classNames: buttonClassNames,
|
|
228
154
|
icon: layoutMode === "solo--fullscreen" ? "ph--corners-in--regular" : layoutIsAnySolo ? "ph--arrows-in-line-horizontal--regular" : "ph--arrows-out-line-horizontal--regular",
|
|
229
155
|
onClick: () => onClick?.(layoutMode === "solo--fullscreen" ? "solo--fullscreen" : "solo")
|
|
230
|
-
})), !layoutIsAnySolo && /* @__PURE__ */
|
|
156
|
+
})), !layoutIsAnySolo && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(PlankControl, {
|
|
231
157
|
label: t("increment start label"),
|
|
232
158
|
disabled: !capabilities.incrementStart,
|
|
233
159
|
classNames: buttonClassNames,
|
|
234
160
|
icon: "ph--caret-left--regular",
|
|
235
161
|
onClick: () => onClick?.("increment-start")
|
|
236
|
-
}), /* @__PURE__ */
|
|
162
|
+
}), /* @__PURE__ */ React.createElement(PlankControl, {
|
|
237
163
|
label: t("increment end label"),
|
|
238
164
|
disabled: !capabilities.incrementEnd,
|
|
239
165
|
classNames: buttonClassNames,
|
|
240
166
|
icon: "ph--caret-right--regular",
|
|
241
167
|
onClick: () => onClick?.("increment-end")
|
|
242
|
-
}))) : capabilities.fullscreen && /* @__PURE__ */
|
|
168
|
+
}))) : capabilities.fullscreen && /* @__PURE__ */ React.createElement(PlankControl, {
|
|
243
169
|
label: t(layoutMode === "solo--fullscreen" ? "exit fullscreen label" : "show fullscreen plank label"),
|
|
244
170
|
classNames: buttonClassNames,
|
|
245
171
|
icon: layoutMode === "solo--fullscreen" ? "ph--corners-in--regular" : "ph--corners-out--regular",
|
|
246
172
|
onClick: () => onClick?.("solo--fullscreen")
|
|
247
|
-
}), close && !layoutIsAnySolo && /* @__PURE__ */
|
|
173
|
+
}), close && !layoutIsAnySolo && /* @__PURE__ */ React.createElement(PlankControl, {
|
|
248
174
|
label: t(`${typeof close === "string" ? "minify" : "close"} label`),
|
|
249
175
|
classNames: buttonClassNames,
|
|
250
176
|
"data-testid": "plankHeading.close",
|
|
251
177
|
icon: close === "minify-start" ? "ph--caret-line-left--regular" : close === "minify-end" ? "ph--caret-line-right--regular" : "ph--x--regular",
|
|
252
178
|
onClick: () => onClick?.("close")
|
|
253
|
-
}), capabilities.companion && /* @__PURE__ */
|
|
179
|
+
}), capabilities.companion && /* @__PURE__ */ React.createElement(PlankControl, {
|
|
254
180
|
label: t("open companion label"),
|
|
255
181
|
classNames: buttonClassNames,
|
|
256
182
|
"data-testid": "plankHeading.companion",
|
|
@@ -262,27 +188,20 @@ var PlankControls = /* @__PURE__ */ forwardRef(({ children, classNames, variant
|
|
|
262
188
|
}
|
|
263
189
|
});
|
|
264
190
|
|
|
265
|
-
// src/components/fragments.ts
|
|
266
|
-
import { mx } from "@dxos/react-ui-theme";
|
|
267
|
-
var soloInlinePadding = "pis-[calc(env(safe-area-inset-left)+.25rem)] pie-[calc(env(safe-area-inset-left)+.25rem)]";
|
|
268
|
-
var sidebarToggleStyles = "bs-[--rail-item] is-[--rail-item] absolute block-end-2 z-[1] !bg-deckSurface lg:hidden";
|
|
269
|
-
var fixedSidebarToggleStyles = mx(sidebarToggleStyles, "inline-start-2");
|
|
270
|
-
var fixedComplementarySidebarToggleStyles = mx(sidebarToggleStyles, "inline-end-2");
|
|
271
|
-
|
|
272
191
|
// src/components/Plank/PlankHeading.tsx
|
|
273
192
|
var MAX_COMPANIONS = 5;
|
|
274
193
|
var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncrementStart, canIncrementEnd, popoverAnchorId, primaryId, pending, companioned, companions, layoutMode, actions = [] }) => {
|
|
275
|
-
var _effect =
|
|
194
|
+
var _effect = _useSignals2();
|
|
276
195
|
try {
|
|
277
|
-
const { t } =
|
|
278
|
-
const { dispatchPromise: dispatch } =
|
|
196
|
+
const { t } = useTranslation2(meta.id);
|
|
197
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher2();
|
|
279
198
|
const { graph } = useAppGraph();
|
|
280
199
|
const breakpoint = useBreakpoints();
|
|
281
200
|
const icon = node?.properties?.icon ?? "ph--placeholder--regular";
|
|
282
201
|
const label3 = pending ? t("pending heading") : toLocalizedString(node?.properties?.label ?? [
|
|
283
202
|
"plank heading fallback label",
|
|
284
203
|
{
|
|
285
|
-
ns:
|
|
204
|
+
ns: meta.id
|
|
286
205
|
}
|
|
287
206
|
], t);
|
|
288
207
|
const isCompanionNode = node?.type === PLANK_COMPANION_TYPE;
|
|
@@ -335,30 +254,30 @@ var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncre
|
|
|
335
254
|
variant,
|
|
336
255
|
graph
|
|
337
256
|
]);
|
|
338
|
-
const handleAction =
|
|
339
|
-
typeof action.data === "function" && action.data?.({
|
|
257
|
+
const handleAction = useCallback2((action) => {
|
|
258
|
+
typeof action.data === "function" && void action.data?.({
|
|
340
259
|
parent: node,
|
|
341
|
-
caller:
|
|
260
|
+
caller: meta.id
|
|
342
261
|
});
|
|
343
262
|
}, [
|
|
344
263
|
node
|
|
345
264
|
]);
|
|
346
|
-
const handlePlankAction =
|
|
265
|
+
const handlePlankAction = useCallback2((eventType) => {
|
|
347
266
|
if (eventType.startsWith("solo")) {
|
|
348
|
-
return dispatch(
|
|
267
|
+
return dispatch(createIntent2(DeckAction.Adjust, {
|
|
349
268
|
type: eventType,
|
|
350
269
|
id
|
|
351
270
|
}));
|
|
352
271
|
} else if (eventType === "close") {
|
|
353
272
|
if (part === "complementary") {
|
|
354
|
-
return dispatch(
|
|
273
|
+
return dispatch(createIntent2(LayoutAction.UpdateComplementary, {
|
|
355
274
|
part: "complementary",
|
|
356
275
|
options: {
|
|
357
276
|
state: "collapsed"
|
|
358
277
|
}
|
|
359
278
|
}));
|
|
360
279
|
} else {
|
|
361
|
-
return dispatch(
|
|
280
|
+
return dispatch(createIntent2(LayoutAction.Close, {
|
|
362
281
|
part: "main",
|
|
363
282
|
subject: [
|
|
364
283
|
id
|
|
@@ -369,7 +288,7 @@ var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncre
|
|
|
369
288
|
}));
|
|
370
289
|
}
|
|
371
290
|
} else {
|
|
372
|
-
return dispatch(
|
|
291
|
+
return dispatch(createIntent2(DeckAction.Adjust, {
|
|
373
292
|
type: eventType,
|
|
374
293
|
id
|
|
375
294
|
}));
|
|
@@ -379,12 +298,12 @@ var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncre
|
|
|
379
298
|
id,
|
|
380
299
|
part
|
|
381
300
|
]);
|
|
382
|
-
const ActionRoot = node && popoverAnchorId === `dxos.org/ui/${
|
|
383
|
-
const handleTabClick =
|
|
301
|
+
const ActionRoot = node && popoverAnchorId === `dxos.org/ui/${meta.id}/${node.id}` ? Popover.Anchor : Fragment;
|
|
302
|
+
const handleTabClick = useCallback2((event) => {
|
|
384
303
|
const target = event.target.closest("[data-id]");
|
|
385
304
|
const tabId = target?.dataset?.id;
|
|
386
305
|
if (primaryId && tabId) {
|
|
387
|
-
void dispatch(
|
|
306
|
+
void dispatch(createIntent2(DeckAction.ChangeCompanion, {
|
|
388
307
|
primary: primaryId,
|
|
389
308
|
companion: tabId
|
|
390
309
|
}));
|
|
@@ -392,23 +311,24 @@ var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncre
|
|
|
392
311
|
}, [
|
|
393
312
|
primaryId
|
|
394
313
|
]);
|
|
395
|
-
return /* @__PURE__ */
|
|
314
|
+
return /* @__PURE__ */ React2.createElement(StackItem.Heading, {
|
|
396
315
|
classNames: [
|
|
397
316
|
"plb-1 items-stretch gap-1 sticky inline-start-12 app-drag min-is-0 contain-layout density-coarse",
|
|
398
317
|
part === "solo" ? soloInlinePadding : "pli-1",
|
|
399
318
|
...layoutMode === "solo--fullscreen" ? [
|
|
400
319
|
hoverableControls,
|
|
401
320
|
hoverableFocusedWithinControls,
|
|
402
|
-
"*:transition-opacity *:opacity-[--controls-opacity] bg-transparent border-transparent transition-[background-color,border-color]
|
|
321
|
+
"*:transition-opacity *:opacity-[--controls-opacity] bg-transparent border-transparent transition-[background-color,border-color]",
|
|
322
|
+
"hover-hover:hover:bg-headerSurface focus-within:bg-headerSurface hover-hover:hover:border-subduedSeparator focus-within:border-subduedSeparator"
|
|
403
323
|
] : []
|
|
404
324
|
],
|
|
405
325
|
"data-plank-heading": true
|
|
406
326
|
}, companions && isCompanionNode ? (
|
|
407
327
|
/* TODO(thure): IMPORTANT: This is a tablist; it should be implemented as such. */
|
|
408
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ React2.createElement("div", {
|
|
409
329
|
role: "none",
|
|
410
330
|
className: "flex-1 min-is-0 overflow-x-auto scrollbar-none flex gap-1"
|
|
411
|
-
}, companions.map(({ id: id2, properties: { icon: icon2, label: label4 } }) => /* @__PURE__ */
|
|
331
|
+
}, companions.map(({ id: id2, properties: { icon: icon2, label: label4 } }) => /* @__PURE__ */ React2.createElement(IconButton2, {
|
|
412
332
|
key: id2,
|
|
413
333
|
"data-id": id2,
|
|
414
334
|
icon: icon2,
|
|
@@ -418,40 +338,40 @@ var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncre
|
|
|
418
338
|
variant: node?.id === id2 ? "primary" : "ghost",
|
|
419
339
|
onClick: handleTabClick
|
|
420
340
|
})))
|
|
421
|
-
) : /* @__PURE__ */
|
|
341
|
+
) : /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(ActionRoot, null, node && sigilActions ? /* @__PURE__ */ React2.createElement(StackItem.Sigil, {
|
|
422
342
|
icon,
|
|
423
343
|
related: part === "complementary",
|
|
424
344
|
attendableId,
|
|
425
345
|
triggerLabel: t("actions menu label"),
|
|
426
346
|
actions: sigilActions,
|
|
427
347
|
onAction: handleAction
|
|
428
|
-
}, /* @__PURE__ */
|
|
348
|
+
}, /* @__PURE__ */ React2.createElement(Surface, {
|
|
429
349
|
role: "menu-footer",
|
|
430
350
|
data: {
|
|
431
351
|
subject: node.data
|
|
432
352
|
}
|
|
433
|
-
})) : /* @__PURE__ */
|
|
353
|
+
})) : /* @__PURE__ */ React2.createElement(StackItem.SigilButton, null, /* @__PURE__ */ React2.createElement("span", {
|
|
434
354
|
className: "sr-only"
|
|
435
|
-
}, label3), /* @__PURE__ */
|
|
355
|
+
}, label3), /* @__PURE__ */ React2.createElement(Icon, {
|
|
436
356
|
icon,
|
|
437
357
|
size: 5
|
|
438
|
-
}))), /* @__PURE__ */
|
|
358
|
+
}))), /* @__PURE__ */ React2.createElement(TextTooltip, {
|
|
439
359
|
text: label3,
|
|
440
360
|
onlyWhenTruncating: true
|
|
441
|
-
}, /* @__PURE__ */
|
|
361
|
+
}, /* @__PURE__ */ React2.createElement(StackItem.HeadingLabel, {
|
|
442
362
|
attendableId,
|
|
443
363
|
related: part === "complementary",
|
|
444
364
|
...pending && {
|
|
445
365
|
classNames: "text-description"
|
|
446
366
|
}
|
|
447
|
-
}, label3))), node && part !== "complementary" && /* @__PURE__ */
|
|
367
|
+
}, label3))), node && part !== "complementary" && /* @__PURE__ */ React2.createElement(Surface, {
|
|
448
368
|
role: "navbar-end",
|
|
449
369
|
data: {
|
|
450
370
|
subject: node.data
|
|
451
371
|
}
|
|
452
|
-
}), companioned === "companion" ? /* @__PURE__ */
|
|
372
|
+
}), companioned === "companion" ? /* @__PURE__ */ React2.createElement(PlankCompanionControls, {
|
|
453
373
|
primary: primaryId
|
|
454
|
-
}) : /* @__PURE__ */
|
|
374
|
+
}) : /* @__PURE__ */ React2.createElement(PlankControls, {
|
|
455
375
|
capabilities,
|
|
456
376
|
layoutMode,
|
|
457
377
|
close: part === "complementary" ? "minify-end" : true,
|
|
@@ -463,12 +383,12 @@ var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncre
|
|
|
463
383
|
});
|
|
464
384
|
|
|
465
385
|
// src/components/Plank/PlankLoading.tsx
|
|
466
|
-
import { useSignals as
|
|
467
|
-
import
|
|
386
|
+
import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
|
|
387
|
+
import React3 from "react";
|
|
468
388
|
var PlankLoading = () => {
|
|
469
|
-
var _effect =
|
|
389
|
+
var _effect = _useSignals3();
|
|
470
390
|
try {
|
|
471
|
-
return /* @__PURE__ */
|
|
391
|
+
return /* @__PURE__ */ React3.createElement("div", {
|
|
472
392
|
role: "none",
|
|
473
393
|
className: "grid place-items-center attention-surface"
|
|
474
394
|
});
|
|
@@ -479,36 +399,36 @@ var PlankLoading = () => {
|
|
|
479
399
|
|
|
480
400
|
// src/components/Plank/PlankError.tsx
|
|
481
401
|
var PlankContentError = ({ error }) => {
|
|
482
|
-
var _effect =
|
|
402
|
+
var _effect = _useSignals4();
|
|
483
403
|
try {
|
|
484
|
-
const { t } =
|
|
404
|
+
const { t } = useTranslation3(meta.id);
|
|
485
405
|
const errorString = error?.toString() ?? "";
|
|
486
|
-
return /* @__PURE__ */
|
|
406
|
+
return /* @__PURE__ */ React4.createElement("div", {
|
|
487
407
|
role: "none",
|
|
488
|
-
className: "overflow-auto p-8 attention-surface grid place-items-center"
|
|
489
|
-
}, /* @__PURE__ */
|
|
408
|
+
className: "overflow-y-auto p-8 attention-surface grid place-items-center"
|
|
409
|
+
}, /* @__PURE__ */ React4.createElement("p", {
|
|
490
410
|
role: "alert",
|
|
491
|
-
className: mx2(descriptionMessage, "break-
|
|
411
|
+
className: mx2(descriptionMessage, "break-all rounded-md p-4")
|
|
492
412
|
}, error ? errorString : t("error fallback message")));
|
|
493
413
|
} finally {
|
|
494
414
|
_effect.f();
|
|
495
415
|
}
|
|
496
416
|
};
|
|
497
417
|
var PlankError = ({ id, part, node, error }) => {
|
|
498
|
-
var _effect =
|
|
418
|
+
var _effect = _useSignals4();
|
|
499
419
|
try {
|
|
500
420
|
const [timedOut, setTimedOut] = useState(false);
|
|
501
421
|
useEffect2(() => {
|
|
502
422
|
setTimeout(() => setTimedOut(true), 5e3);
|
|
503
423
|
}, []);
|
|
504
|
-
return /* @__PURE__ */
|
|
424
|
+
return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(PlankHeading, {
|
|
505
425
|
id,
|
|
506
426
|
part,
|
|
507
427
|
node,
|
|
508
428
|
pending: !timedOut
|
|
509
|
-
}), timedOut ? /* @__PURE__ */
|
|
429
|
+
}), timedOut ? /* @__PURE__ */ React4.createElement(PlankContentError, {
|
|
510
430
|
error
|
|
511
|
-
}) : /* @__PURE__ */
|
|
431
|
+
}) : /* @__PURE__ */ React4.createElement(PlankLoading, null));
|
|
512
432
|
} finally {
|
|
513
433
|
_effect.f();
|
|
514
434
|
}
|
|
@@ -517,17 +437,18 @@ var PlankError = ({ id, part, node, error }) => {
|
|
|
517
437
|
// src/components/Plank/Plank.tsx
|
|
518
438
|
var UNKNOWN_ID = "unknown_id";
|
|
519
439
|
var Plank = /* @__PURE__ */ memo2(({ id = UNKNOWN_ID, companionId, ...props }) => {
|
|
520
|
-
var _effect =
|
|
440
|
+
var _effect = _useSignals5();
|
|
521
441
|
try {
|
|
522
442
|
const { graph } = useAppGraph2();
|
|
523
443
|
const node = useNode(graph, id);
|
|
524
444
|
const companions = useCompanions(id);
|
|
525
445
|
const currentCompanion = companions.find(({ id: id2 }) => id2 === companionId);
|
|
526
446
|
const hasCompanion = !!(companionId && currentCompanion);
|
|
527
|
-
return /* @__PURE__ */
|
|
447
|
+
return /* @__PURE__ */ React5.createElement(PlankContainer, {
|
|
528
448
|
solo: props.part === "solo",
|
|
529
|
-
companion: hasCompanion
|
|
530
|
-
|
|
449
|
+
companion: hasCompanion,
|
|
450
|
+
encapsulate: !!props.settings?.encapsulatedPlanks
|
|
451
|
+
}, /* @__PURE__ */ React5.createElement(PlankComponent, {
|
|
531
452
|
id,
|
|
532
453
|
node,
|
|
533
454
|
companioned: hasCompanion ? "primary" : void 0,
|
|
@@ -536,7 +457,7 @@ var Plank = /* @__PURE__ */ memo2(({ id = UNKNOWN_ID, companionId, ...props }) =
|
|
|
536
457
|
...props.part === "solo" ? {
|
|
537
458
|
part: "solo-primary"
|
|
538
459
|
} : {}
|
|
539
|
-
}), hasCompanion && /* @__PURE__ */
|
|
460
|
+
}), hasCompanion && /* @__PURE__ */ React5.createElement(PlankComponent, {
|
|
540
461
|
id: companionId,
|
|
541
462
|
node: currentCompanion,
|
|
542
463
|
primary: node,
|
|
@@ -553,16 +474,16 @@ var Plank = /* @__PURE__ */ memo2(({ id = UNKNOWN_ID, companionId, ...props }) =
|
|
|
553
474
|
_effect.f();
|
|
554
475
|
}
|
|
555
476
|
});
|
|
556
|
-
var PlankContainer = ({ children, solo, companion }) => {
|
|
557
|
-
var _effect =
|
|
477
|
+
var PlankContainer = ({ children, solo, companion, encapsulate }) => {
|
|
478
|
+
var _effect = _useSignals5();
|
|
558
479
|
try {
|
|
559
480
|
const sizeAttrs = useMainSize();
|
|
560
481
|
if (!solo) {
|
|
561
482
|
return children;
|
|
562
483
|
}
|
|
563
|
-
return /* @__PURE__ */
|
|
484
|
+
return /* @__PURE__ */ React5.createElement("div", {
|
|
564
485
|
role: "none",
|
|
565
|
-
className: mx3("absolute inset-
|
|
486
|
+
className: mx3("absolute inset-[--main-spacing] grid", encapsulate && "border border-separator rounded overflow-hidden", companion && "grid-cols-[6fr_4fr]", railGridHorizontal, mainIntrinsicSize),
|
|
566
487
|
...sizeAttrs
|
|
567
488
|
}, children);
|
|
568
489
|
} finally {
|
|
@@ -570,10 +491,10 @@ var PlankContainer = ({ children, solo, companion }) => {
|
|
|
570
491
|
}
|
|
571
492
|
};
|
|
572
493
|
var PlankComponent = /* @__PURE__ */ memo2(({ layoutMode, id, part, path, order, active, companioned, node, primary, companions, settings }) => {
|
|
573
|
-
var _effect =
|
|
494
|
+
var _effect = _useSignals5();
|
|
574
495
|
try {
|
|
575
|
-
const { dispatchPromise: dispatch } =
|
|
576
|
-
const { deck, popoverAnchorId, scrollIntoView } =
|
|
496
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher3();
|
|
497
|
+
const { deck, popoverAnchorId, scrollIntoView } = useCapability(DeckCapabilities.DeckState);
|
|
577
498
|
const canResize = layoutMode === "deck";
|
|
578
499
|
const attentionAttrs = useAttentionAttributes(primary?.id ?? id);
|
|
579
500
|
const index = active ? active.findIndex((entryId) => entryId === id) : 0;
|
|
@@ -584,8 +505,8 @@ var PlankComponent = /* @__PURE__ */ memo2(({ layoutMode, id, part, path, order,
|
|
|
584
505
|
const { variant } = parseEntryId(id);
|
|
585
506
|
const sizeKey = `${id.split("+")[0]}${variant ? `${ATTENDABLE_PATH_SEPARATOR}${variant}` : ""}`;
|
|
586
507
|
const size = deck.plankSizing[sizeKey];
|
|
587
|
-
const handleSizeChange =
|
|
588
|
-
return dispatch(
|
|
508
|
+
const handleSizeChange = useCallback3(debounce((nextSize) => {
|
|
509
|
+
return dispatch(createIntent3(DeckAction.UpdatePlankSize, {
|
|
589
510
|
id: sizeKey,
|
|
590
511
|
size: nextSize
|
|
591
512
|
}));
|
|
@@ -593,22 +514,18 @@ var PlankComponent = /* @__PURE__ */ memo2(({ layoutMode, id, part, path, order,
|
|
|
593
514
|
dispatch,
|
|
594
515
|
sizeKey
|
|
595
516
|
]);
|
|
596
|
-
const handleKeyDown =
|
|
517
|
+
const handleKeyDown = useCallback3((event) => {
|
|
597
518
|
if (event.target === event.currentTarget && event.key === "Escape") {
|
|
598
519
|
rootElement.current?.closest("main")?.focus();
|
|
599
520
|
}
|
|
600
521
|
}, []);
|
|
601
522
|
useLayoutEffect(() => {
|
|
602
523
|
if (scrollIntoView === id) {
|
|
603
|
-
|
|
604
|
-
focusable?.focus({
|
|
605
|
-
preventScroll: true
|
|
606
|
-
});
|
|
607
|
-
layoutMode === "deck" && focusable?.scrollIntoView({
|
|
524
|
+
layoutMode === "deck" && rootElement.current?.scrollIntoView({
|
|
608
525
|
behavior: "smooth",
|
|
609
526
|
inline: "center"
|
|
610
527
|
});
|
|
611
|
-
void dispatch(
|
|
528
|
+
void dispatch(createIntent3(LayoutAction2.ScrollIntoView, {
|
|
612
529
|
part: "current",
|
|
613
530
|
subject: void 0
|
|
614
531
|
}));
|
|
@@ -622,23 +539,26 @@ var PlankComponent = /* @__PURE__ */ memo2(({ layoutMode, id, part, path, order,
|
|
|
622
539
|
const isAttendable = layoutMode.startsWith("solo") && part.startsWith("solo") || layoutMode === "deck" && part === "deck";
|
|
623
540
|
const sizeAttrs = useMainSize();
|
|
624
541
|
const data = useMemo2(() => node && {
|
|
542
|
+
attendableId: id,
|
|
625
543
|
subject: node.data,
|
|
626
544
|
companionTo: primary?.data,
|
|
545
|
+
properties: node.properties,
|
|
627
546
|
variant,
|
|
628
547
|
path,
|
|
629
548
|
popoverAnchorId
|
|
630
549
|
}, [
|
|
631
550
|
node,
|
|
632
551
|
node?.data,
|
|
552
|
+
node?.properties,
|
|
633
553
|
path,
|
|
634
554
|
popoverAnchorId,
|
|
635
555
|
primary?.data,
|
|
636
556
|
variant
|
|
637
557
|
]);
|
|
638
|
-
const placeholder = useMemo2(() => /* @__PURE__ */
|
|
558
|
+
const placeholder = useMemo2(() => /* @__PURE__ */ React5.createElement(PlankLoading, null), []);
|
|
639
559
|
const Root = part.startsWith("solo") ? "article" : StackItem2.Root;
|
|
640
|
-
const className = mx3("attention-surface relative dx-focus-ring-inset-over-all density-coarse", isSolo &&
|
|
641
|
-
return /* @__PURE__ */
|
|
560
|
+
const className = mx3("attention-surface relative dx-focus-ring-inset-over-all density-coarse", isSolo && "absolute inset-0", isSolo && mainIntrinsicSize, railGridHorizontal, part.startsWith("solo") && "grid", part === "deck" && (companioned === "companion" ? "!border-separator border-ie" : "!border-separator border-li"), part.startsWith("solo-") && "row-span-2 grid-rows-subgrid min-is-0", part === "solo-companion" && "!border-separator border-is", settings?.encapsulatedPlanks && !part.startsWith("solo") && "mli-[--main-spacing] !border-separator border rounded overflow-hidden");
|
|
561
|
+
return /* @__PURE__ */ React5.createElement(Root, {
|
|
642
562
|
ref: rootElement,
|
|
643
563
|
"data-testid": "deck.plank",
|
|
644
564
|
tabIndex: 0,
|
|
@@ -657,7 +577,7 @@ var PlankComponent = /* @__PURE__ */ memo2(({ layoutMode, id, part, path, order,
|
|
|
657
577
|
},
|
|
658
578
|
...isAttendable ? attentionAttrs : {},
|
|
659
579
|
onKeyDown: handleKeyDown
|
|
660
|
-
}, node ? /* @__PURE__ */
|
|
580
|
+
}, node ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(PlankHeading, {
|
|
661
581
|
id,
|
|
662
582
|
part: part.startsWith("solo-") ? "solo" : part,
|
|
663
583
|
node,
|
|
@@ -669,33 +589,114 @@ var PlankComponent = /* @__PURE__ */ memo2(({ layoutMode, id, part, path, order,
|
|
|
669
589
|
primaryId: primary?.id,
|
|
670
590
|
companioned,
|
|
671
591
|
companions
|
|
672
|
-
}), /* @__PURE__ */
|
|
592
|
+
}), /* @__PURE__ */ React5.createElement(Surface2, {
|
|
673
593
|
key: node.id,
|
|
674
594
|
role: "article",
|
|
675
595
|
data,
|
|
676
596
|
limit: 1,
|
|
677
597
|
fallback: PlankContentError,
|
|
678
598
|
placeholder
|
|
679
|
-
})) : /* @__PURE__ */
|
|
599
|
+
})) : /* @__PURE__ */ React5.createElement(PlankError, {
|
|
680
600
|
id,
|
|
681
601
|
part
|
|
682
|
-
}), canResize && /* @__PURE__ */
|
|
602
|
+
}), canResize && /* @__PURE__ */ React5.createElement(StackItem2.ResizeHandle, null));
|
|
683
603
|
} finally {
|
|
684
604
|
_effect.f();
|
|
685
605
|
}
|
|
686
606
|
});
|
|
687
607
|
|
|
608
|
+
// src/components/Sidebar/SidebarButton.tsx
|
|
609
|
+
import { useSignals as _useSignals6 } from "@preact-signals/safe-react/tracking";
|
|
610
|
+
import React6, { useCallback as useCallback4 } from "react";
|
|
611
|
+
import { LayoutAction as LayoutAction3, createIntent as createIntent4, useCapability as useCapability2, useIntentDispatcher as useIntentDispatcher4 } from "@dxos/app-framework";
|
|
612
|
+
import { IconButton as IconButton3, useTranslation as useTranslation4 } from "@dxos/react-ui";
|
|
613
|
+
var ToggleSidebarButton = ({ classNames, variant = "ghost" }) => {
|
|
614
|
+
var _effect = _useSignals6();
|
|
615
|
+
try {
|
|
616
|
+
const layoutContext = useCapability2(DeckCapabilities.MutableDeckState);
|
|
617
|
+
const { t } = useTranslation4(meta.id);
|
|
618
|
+
return /* @__PURE__ */ React6.createElement(IconButton3, {
|
|
619
|
+
variant,
|
|
620
|
+
iconOnly: true,
|
|
621
|
+
icon: "ph--sidebar--regular",
|
|
622
|
+
size: 4,
|
|
623
|
+
label: t("open navigation sidebar label"),
|
|
624
|
+
onClick: () => layoutContext.sidebarState = layoutContext.sidebarState === "expanded" ? "collapsed" : "expanded",
|
|
625
|
+
classNames
|
|
626
|
+
});
|
|
627
|
+
} finally {
|
|
628
|
+
_effect.f();
|
|
629
|
+
}
|
|
630
|
+
};
|
|
631
|
+
var CloseSidebarButton = () => {
|
|
632
|
+
var _effect = _useSignals6();
|
|
633
|
+
try {
|
|
634
|
+
const layoutContext = useCapability2(DeckCapabilities.MutableDeckState);
|
|
635
|
+
const { t } = useTranslation4(meta.id);
|
|
636
|
+
return /* @__PURE__ */ React6.createElement(IconButton3, {
|
|
637
|
+
variant: "ghost",
|
|
638
|
+
iconOnly: true,
|
|
639
|
+
icon: "ph--caret-line-left--regular",
|
|
640
|
+
size: 4,
|
|
641
|
+
label: t("close navigation sidebar label"),
|
|
642
|
+
onClick: () => layoutContext.sidebarState = "collapsed",
|
|
643
|
+
classNames: "rounded-none pli-1 dx-focus-ring-inset pie-[max(.5rem,env(safe-area-inset-left))]"
|
|
644
|
+
});
|
|
645
|
+
} finally {
|
|
646
|
+
_effect.f();
|
|
647
|
+
}
|
|
648
|
+
};
|
|
649
|
+
var ToggleComplementarySidebarButton = ({ inR0, classNames, current }) => {
|
|
650
|
+
var _effect = _useSignals6();
|
|
651
|
+
try {
|
|
652
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher4();
|
|
653
|
+
const layoutContext = useCapability2(DeckCapabilities.MutableDeckState);
|
|
654
|
+
const { t } = useTranslation4(meta.id);
|
|
655
|
+
const companions = useDeckCompanions();
|
|
656
|
+
const handleClick = useCallback4(async () => {
|
|
657
|
+
layoutContext.complementarySidebarState = layoutContext.complementarySidebarState === "expanded" ? "collapsed" : "expanded";
|
|
658
|
+
const firstCompanion = companions[0];
|
|
659
|
+
if (layoutContext.complementarySidebarState === "expanded" && !current && firstCompanion) {
|
|
660
|
+
await dispatch(createIntent4(LayoutAction3.UpdateComplementary, {
|
|
661
|
+
part: "complementary",
|
|
662
|
+
subject: getCompanionId(firstCompanion.id)
|
|
663
|
+
}));
|
|
664
|
+
}
|
|
665
|
+
}, [
|
|
666
|
+
layoutContext,
|
|
667
|
+
current,
|
|
668
|
+
companions,
|
|
669
|
+
dispatch
|
|
670
|
+
]);
|
|
671
|
+
return /* @__PURE__ */ React6.createElement(IconButton3, {
|
|
672
|
+
iconOnly: true,
|
|
673
|
+
onClick: handleClick,
|
|
674
|
+
variant: "ghost",
|
|
675
|
+
label: t("open complementary sidebar label"),
|
|
676
|
+
classNames: [
|
|
677
|
+
"[&>svg]:-scale-x-100",
|
|
678
|
+
classNames
|
|
679
|
+
],
|
|
680
|
+
icon: "ph--sidebar-simple--regular",
|
|
681
|
+
size: inR0 ? 5 : 4,
|
|
682
|
+
tooltipSide: inR0 ? "left" : void 0
|
|
683
|
+
});
|
|
684
|
+
} finally {
|
|
685
|
+
_effect.f();
|
|
686
|
+
}
|
|
687
|
+
};
|
|
688
|
+
|
|
688
689
|
// src/components/Sidebar/ComplementarySidebar.tsx
|
|
689
690
|
var label = [
|
|
690
691
|
"complementary sidebar title",
|
|
691
692
|
{
|
|
692
|
-
ns:
|
|
693
|
+
ns: meta.id
|
|
693
694
|
}
|
|
694
695
|
];
|
|
695
696
|
var ComplementarySidebar = ({ current }) => {
|
|
696
697
|
var _effect = _useSignals7();
|
|
697
698
|
try {
|
|
698
|
-
const { t } = useTranslation5(
|
|
699
|
+
const { t } = useTranslation5(meta.id);
|
|
699
700
|
const { dispatchPromise: dispatch } = useIntentDispatcher5();
|
|
700
701
|
const layout = useCapability3(DeckCapabilities.MutableDeckState);
|
|
701
702
|
const layoutMode = getMode(layout.deck);
|
|
@@ -791,7 +792,7 @@ var ComplementarySidebar = ({ current }) => {
|
|
|
791
792
|
value: getCompanionId(companion.id),
|
|
792
793
|
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)]',
|
|
793
794
|
...layout.complementarySidebarState !== "expanded" && {
|
|
794
|
-
inert:
|
|
795
|
+
inert: true
|
|
795
796
|
}
|
|
796
797
|
}, /* @__PURE__ */ React7.createElement(ComplementarySidebarPanel, {
|
|
797
798
|
companion,
|
|
@@ -816,7 +817,7 @@ var ScrollArea = ({ children }) => {
|
|
|
816
817
|
var ComplementarySidebarPanel = ({ companion, activeId, data, hoistStatusbar }) => {
|
|
817
818
|
var _effect = _useSignals7();
|
|
818
819
|
try {
|
|
819
|
-
const { t } = useTranslation5(
|
|
820
|
+
const { t } = useTranslation5(meta.id);
|
|
820
821
|
if (getCompanionId(companion.id) !== activeId && !data) {
|
|
821
822
|
return null;
|
|
822
823
|
}
|
|
@@ -848,7 +849,7 @@ import { Main as Main2 } from "@dxos/react-ui";
|
|
|
848
849
|
var label2 = [
|
|
849
850
|
"sidebar title",
|
|
850
851
|
{
|
|
851
|
-
ns:
|
|
852
|
+
ns: meta.id
|
|
852
853
|
}
|
|
853
854
|
];
|
|
854
855
|
var Sidebar = () => {
|
|
@@ -891,7 +892,7 @@ var Sidebar = () => {
|
|
|
891
892
|
var Banner = ({ variant, classNames }) => {
|
|
892
893
|
var _effect = _useSignals9();
|
|
893
894
|
try {
|
|
894
|
-
const { t } = useTranslation6(
|
|
895
|
+
const { t } = useTranslation6(meta.id);
|
|
895
896
|
return /* @__PURE__ */ React9.createElement("header", {
|
|
896
897
|
className: mx4("flex items-stretch relative plb-1 pis-1 pie-2", variant === "topbar" && "fixed inset-inline-0 block-start-[env(safe-area-inset-top)] bs-[--rail-size] border-be border-separator", classNames)
|
|
897
898
|
}, variant === "sidebar" ? /* @__PURE__ */ React9.createElement(CloseSidebarButton, null) : /* @__PURE__ */ React9.createElement(ToggleSidebarButton, null), /* @__PURE__ */ React9.createElement("span", {
|
|
@@ -923,14 +924,9 @@ var Banner = ({ variant, classNames }) => {
|
|
|
923
924
|
};
|
|
924
925
|
|
|
925
926
|
// src/components/DeckLayout/DeckLayout.tsx
|
|
926
|
-
import { useSignals as
|
|
927
|
-
import
|
|
928
|
-
import
|
|
929
|
-
import { Capabilities, LayoutAction as LayoutAction5, createIntent as createIntent6, useCapability as useCapability8, useIntentDispatcher as useIntentDispatcher6, usePluginManager } from "@dxos/app-framework";
|
|
930
|
-
import { AttentionCapabilities } from "@dxos/plugin-attention";
|
|
931
|
-
import { Main as Main3, useMediaQuery, useOnTransition } from "@dxos/react-ui";
|
|
932
|
-
import { Stack, StackContext, DEFAULT_HORIZONTAL_SIZE } from "@dxos/react-ui-stack";
|
|
933
|
-
import { mainPaddingTransitions } from "@dxos/react-ui-theme";
|
|
927
|
+
import { useSignals as _useSignals18 } from "@preact-signals/safe-react/tracking";
|
|
928
|
+
import React18 from "react";
|
|
929
|
+
import { useCapability as useCapability9 } from "@dxos/app-framework";
|
|
934
930
|
|
|
935
931
|
// src/components/DeckLayout/ActiveNode.tsx
|
|
936
932
|
import { useSignals as _useSignals10 } from "@preact-signals/safe-react/tracking";
|
|
@@ -960,6 +956,16 @@ var ActiveNode = () => {
|
|
|
960
956
|
}
|
|
961
957
|
};
|
|
962
958
|
|
|
959
|
+
// src/components/DeckLayout/DeckMain.tsx
|
|
960
|
+
import { useSignals as _useSignals14 } from "@preact-signals/safe-react/tracking";
|
|
961
|
+
import { untracked } from "@preact/signals-core";
|
|
962
|
+
import React14, { Fragment as Fragment3, useCallback as useCallback6, useEffect as useEffect4, useMemo as useMemo5, useRef as useRef2 } from "react";
|
|
963
|
+
import { Capabilities, LayoutAction as LayoutAction5, createIntent as createIntent6, useCapability as useCapability6, useIntentDispatcher as useIntentDispatcher6, usePluginManager } from "@dxos/app-framework";
|
|
964
|
+
import { AttentionCapabilities } from "@dxos/plugin-attention";
|
|
965
|
+
import { Main as Main3, useMediaQuery, useOnTransition } from "@dxos/react-ui";
|
|
966
|
+
import { DEFAULT_HORIZONTAL_SIZE, Stack, StackContext } from "@dxos/react-ui-stack";
|
|
967
|
+
import { mainPaddingTransitions, mx as mx5 } from "@dxos/react-ui-theme";
|
|
968
|
+
|
|
963
969
|
// src/components/DeckLayout/ContentEmpty.tsx
|
|
964
970
|
import { useSignals as _useSignals11 } from "@preact-signals/safe-react/tracking";
|
|
965
971
|
import React11 from "react";
|
|
@@ -986,207 +992,38 @@ var ContentEmpty = () => {
|
|
|
986
992
|
}
|
|
987
993
|
};
|
|
988
994
|
|
|
989
|
-
// src/components/DeckLayout/
|
|
995
|
+
// src/components/DeckLayout/StatusBar.tsx
|
|
990
996
|
import { useSignals as _useSignals12 } from "@preact-signals/safe-react/tracking";
|
|
991
997
|
import React12 from "react";
|
|
992
|
-
import { Surface as Surface8
|
|
993
|
-
import {
|
|
994
|
-
var
|
|
998
|
+
import { Surface as Surface8 } from "@dxos/app-framework";
|
|
999
|
+
import { useLandmarkMover } from "@dxos/react-ui";
|
|
1000
|
+
var StatusBar = ({ showHints }) => {
|
|
995
1001
|
var _effect = _useSignals12();
|
|
996
1002
|
try {
|
|
997
|
-
const
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
},
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
data: dialogContent,
|
|
1010
|
-
limit: 1,
|
|
1011
|
-
fallback: PlankContentError,
|
|
1012
|
-
placeholder: /* @__PURE__ */ React12.createElement("div", null)
|
|
1013
|
-
})
|
|
1014
|
-
) : /* @__PURE__ */ React12.createElement(Overlay, {
|
|
1015
|
-
blockAlign: dialogBlockAlign,
|
|
1016
|
-
classNames: dialogOverlayClasses,
|
|
1017
|
-
style: dialogOverlayStyle
|
|
1018
|
-
}, /* @__PURE__ */ React12.createElement(Surface8, {
|
|
1019
|
-
role: "dialog",
|
|
1020
|
-
data: dialogContent,
|
|
1021
|
-
limit: 1,
|
|
1022
|
-
fallback: PlankContentError
|
|
1023
|
-
})));
|
|
1003
|
+
const mover = useLandmarkMover(void 0, "3");
|
|
1004
|
+
return /* @__PURE__ */ React12.createElement("div", {
|
|
1005
|
+
role: "contentinfo",
|
|
1006
|
+
className: "fixed block-end-0 inset-inline-0 bs-[--statusbar-size] border-bs border-separator z-[2] flex text-description",
|
|
1007
|
+
...mover
|
|
1008
|
+
}, showHints && /* @__PURE__ */ React12.createElement(Surface8, {
|
|
1009
|
+
role: "hints",
|
|
1010
|
+
limit: 1
|
|
1011
|
+
}), /* @__PURE__ */ React12.createElement(Surface8, {
|
|
1012
|
+
role: "status-bar",
|
|
1013
|
+
limit: 1
|
|
1014
|
+
}));
|
|
1024
1015
|
} finally {
|
|
1025
1016
|
_effect.f();
|
|
1026
1017
|
}
|
|
1027
1018
|
};
|
|
1028
1019
|
|
|
1029
|
-
// src/components/DeckLayout/
|
|
1020
|
+
// src/components/DeckLayout/Topbar.tsx
|
|
1030
1021
|
import { useSignals as _useSignals13 } from "@preact-signals/safe-react/tracking";
|
|
1031
|
-
import
|
|
1032
|
-
|
|
1033
|
-
import { Surface as Surface9, useCapability as useCapability7 } from "@dxos/app-framework";
|
|
1034
|
-
import { Popover as Popover2 } from "@dxos/react-ui";
|
|
1035
|
-
var DEBOUNCE_DELAY = 40;
|
|
1036
|
-
var [DeckPopoverProvider, useDeckPopoverContext] = createContext("DeckPopover");
|
|
1037
|
-
var PopoverRoot = ({ children }) => {
|
|
1022
|
+
import React13 from "react";
|
|
1023
|
+
var Topbar = () => {
|
|
1038
1024
|
var _effect = _useSignals13();
|
|
1039
1025
|
try {
|
|
1040
|
-
|
|
1041
|
-
const virtualRef = useRef2(null);
|
|
1042
|
-
const [virtualIter, setVirtualIter] = useState3(0);
|
|
1043
|
-
const [open, setOpen] = useState3(false);
|
|
1044
|
-
const debounceRef = useRef2(null);
|
|
1045
|
-
useEffect4(() => {
|
|
1046
|
-
setOpen(false);
|
|
1047
|
-
if (layout.popoverOpen) {
|
|
1048
|
-
if (debounceRef.current) {
|
|
1049
|
-
clearTimeout(debounceRef.current);
|
|
1050
|
-
}
|
|
1051
|
-
if (layout.popoverAnchor && virtualRef.current !== layout.popoverAnchor) {
|
|
1052
|
-
virtualRef.current = layout.popoverAnchor ?? null;
|
|
1053
|
-
setVirtualIter((iter) => iter + 1);
|
|
1054
|
-
}
|
|
1055
|
-
debounceRef.current = setTimeout(() => setOpen(true), DEBOUNCE_DELAY);
|
|
1056
|
-
}
|
|
1057
|
-
}, [
|
|
1058
|
-
layout.popoverOpen,
|
|
1059
|
-
layout.popoverAnchorId,
|
|
1060
|
-
layout.popoverAnchor,
|
|
1061
|
-
layout.popoverContent
|
|
1062
|
-
]);
|
|
1063
|
-
return /* @__PURE__ */ React13.createElement(DeckPopoverProvider, {
|
|
1064
|
-
setOpen
|
|
1065
|
-
}, /* @__PURE__ */ React13.createElement(Popover2.Root, {
|
|
1066
|
-
modal: false,
|
|
1067
|
-
open
|
|
1068
|
-
}, layout.popoverAnchor && /* @__PURE__ */ React13.createElement(Popover2.VirtualTrigger, {
|
|
1069
|
-
key: virtualIter,
|
|
1070
|
-
virtualRef
|
|
1071
|
-
}), children));
|
|
1072
|
-
} finally {
|
|
1073
|
-
_effect.f();
|
|
1074
|
-
}
|
|
1075
|
-
};
|
|
1076
|
-
var PopoverContent = () => {
|
|
1077
|
-
var _effect = _useSignals13();
|
|
1078
|
-
try {
|
|
1079
|
-
const layout = useCapability7(DeckCapabilities.MutableDeckState);
|
|
1080
|
-
const { setOpen } = useDeckPopoverContext("PopoverContent");
|
|
1081
|
-
const handleClose = useCallback6((event) => {
|
|
1082
|
-
if (
|
|
1083
|
-
// TODO(thure): CodeMirror should not focus itself when it updates.
|
|
1084
|
-
event.type === "dismissableLayer.focusOutside" && event.currentTarget?.classList.contains("cm-content")
|
|
1085
|
-
) {
|
|
1086
|
-
event.preventDefault();
|
|
1087
|
-
} else {
|
|
1088
|
-
setOpen(false);
|
|
1089
|
-
layout.popoverOpen = false;
|
|
1090
|
-
layout.popoverAnchor = void 0;
|
|
1091
|
-
layout.popoverAnchorId = void 0;
|
|
1092
|
-
layout.popoverSide = void 0;
|
|
1093
|
-
}
|
|
1094
|
-
}, [
|
|
1095
|
-
setOpen
|
|
1096
|
-
]);
|
|
1097
|
-
const collisionBoundaries = useMemo5(() => {
|
|
1098
|
-
const closest = layout.popoverAnchor?.closest("[data-popover-collision-boundary]");
|
|
1099
|
-
return closest ? [
|
|
1100
|
-
closest
|
|
1101
|
-
] : [];
|
|
1102
|
-
}, [
|
|
1103
|
-
layout.popoverAnchor
|
|
1104
|
-
]);
|
|
1105
|
-
return /* @__PURE__ */ React13.createElement(Popover2.Portal, null, /* @__PURE__ */ React13.createElement(Popover2.Content, {
|
|
1106
|
-
side: layout.popoverSide,
|
|
1107
|
-
onInteractOutside: handleClose,
|
|
1108
|
-
onEscapeKeyDown: handleClose,
|
|
1109
|
-
collisionBoundary: collisionBoundaries,
|
|
1110
|
-
sticky: "always",
|
|
1111
|
-
hideWhenDetached: true
|
|
1112
|
-
}, /* @__PURE__ */ React13.createElement(Popover2.Viewport, null, /* @__PURE__ */ React13.createElement(Surface9, {
|
|
1113
|
-
role: "popover",
|
|
1114
|
-
data: layout.popoverContent,
|
|
1115
|
-
limit: 1
|
|
1116
|
-
})), /* @__PURE__ */ React13.createElement(Popover2.Arrow, null)));
|
|
1117
|
-
} finally {
|
|
1118
|
-
_effect.f();
|
|
1119
|
-
}
|
|
1120
|
-
};
|
|
1121
|
-
|
|
1122
|
-
// src/components/DeckLayout/StatusBar.tsx
|
|
1123
|
-
import { useSignals as _useSignals14 } from "@preact-signals/safe-react/tracking";
|
|
1124
|
-
import React14 from "react";
|
|
1125
|
-
import { Surface as Surface10 } from "@dxos/app-framework";
|
|
1126
|
-
import { useLandmarkMover } from "@dxos/react-ui";
|
|
1127
|
-
var StatusBar = ({ showHints }) => {
|
|
1128
|
-
var _effect = _useSignals14();
|
|
1129
|
-
try {
|
|
1130
|
-
const mover = useLandmarkMover(void 0, "3");
|
|
1131
|
-
return /* @__PURE__ */ React14.createElement("div", {
|
|
1132
|
-
role: "contentinfo",
|
|
1133
|
-
className: "fixed block-end-0 inset-inline-0 bs-[--statusbar-size] border-bs border-separator z-[2] flex text-description",
|
|
1134
|
-
...mover
|
|
1135
|
-
}, showHints && /* @__PURE__ */ React14.createElement(Surface10, {
|
|
1136
|
-
role: "hints",
|
|
1137
|
-
limit: 1
|
|
1138
|
-
}), /* @__PURE__ */ React14.createElement(Surface10, {
|
|
1139
|
-
role: "status-bar",
|
|
1140
|
-
limit: 1
|
|
1141
|
-
}));
|
|
1142
|
-
} finally {
|
|
1143
|
-
_effect.f();
|
|
1144
|
-
}
|
|
1145
|
-
};
|
|
1146
|
-
|
|
1147
|
-
// src/components/DeckLayout/Toast.tsx
|
|
1148
|
-
import { useSignals as _useSignals15 } from "@preact-signals/safe-react/tracking";
|
|
1149
|
-
import React15 from "react";
|
|
1150
|
-
import { Button, Icon as Icon2, Toast as NaturalToast, toLocalizedString as toLocalizedString3, useTranslation as useTranslation7 } from "@dxos/react-ui";
|
|
1151
|
-
var Toast = ({ id, title, description, icon, duration, actionLabel, actionAlt, closeLabel, onAction, onOpenChange }) => {
|
|
1152
|
-
var _effect = _useSignals15();
|
|
1153
|
-
try {
|
|
1154
|
-
const { t } = useTranslation7(DECK_PLUGIN);
|
|
1155
|
-
return /* @__PURE__ */ React15.createElement(NaturalToast.Root, {
|
|
1156
|
-
"data-testid": id,
|
|
1157
|
-
defaultOpen: true,
|
|
1158
|
-
duration,
|
|
1159
|
-
onOpenChange
|
|
1160
|
-
}, /* @__PURE__ */ React15.createElement(NaturalToast.Body, null, /* @__PURE__ */ React15.createElement(NaturalToast.Title, {
|
|
1161
|
-
classNames: "items-center"
|
|
1162
|
-
}, icon && /* @__PURE__ */ React15.createElement(Icon2, {
|
|
1163
|
-
icon,
|
|
1164
|
-
size: 5,
|
|
1165
|
-
classNames: "inline mr-1"
|
|
1166
|
-
}), title && /* @__PURE__ */ React15.createElement("span", null, toLocalizedString3(title, t))), description && /* @__PURE__ */ React15.createElement(NaturalToast.Description, null, description && toLocalizedString3(description, t))), /* @__PURE__ */ React15.createElement(NaturalToast.Actions, null, onAction && actionAlt && actionLabel && /* @__PURE__ */ React15.createElement(NaturalToast.Action, {
|
|
1167
|
-
altText: toLocalizedString3(actionAlt, t),
|
|
1168
|
-
asChild: true
|
|
1169
|
-
}, /* @__PURE__ */ React15.createElement(Button, {
|
|
1170
|
-
"data-testid": "toast.action",
|
|
1171
|
-
variant: "primary",
|
|
1172
|
-
onClick: () => onAction?.()
|
|
1173
|
-
}, toLocalizedString3(actionLabel, t))), closeLabel && /* @__PURE__ */ React15.createElement(NaturalToast.Close, {
|
|
1174
|
-
asChild: true
|
|
1175
|
-
}, /* @__PURE__ */ React15.createElement(Button, {
|
|
1176
|
-
"data-testid": "toast.close"
|
|
1177
|
-
}, toLocalizedString3(closeLabel, t)))));
|
|
1178
|
-
} finally {
|
|
1179
|
-
_effect.f();
|
|
1180
|
-
}
|
|
1181
|
-
};
|
|
1182
|
-
|
|
1183
|
-
// src/components/DeckLayout/Topbar.tsx
|
|
1184
|
-
import { useSignals as _useSignals16 } from "@preact-signals/safe-react/tracking";
|
|
1185
|
-
import React16 from "react";
|
|
1186
|
-
var Topbar = () => {
|
|
1187
|
-
var _effect = _useSignals16();
|
|
1188
|
-
try {
|
|
1189
|
-
return /* @__PURE__ */ React16.createElement(Banner, {
|
|
1026
|
+
return /* @__PURE__ */ React13.createElement(Banner, {
|
|
1190
1027
|
variant: "topbar"
|
|
1191
1028
|
});
|
|
1192
1029
|
} finally {
|
|
@@ -1194,37 +1031,23 @@ var Topbar = () => {
|
|
|
1194
1031
|
}
|
|
1195
1032
|
};
|
|
1196
1033
|
|
|
1197
|
-
// src/components/DeckLayout/
|
|
1198
|
-
var
|
|
1199
|
-
var _effect =
|
|
1200
|
-
try {
|
|
1201
|
-
return order > 0 ? /* @__PURE__ */ React17.createElement("span", {
|
|
1202
|
-
role: "separator",
|
|
1203
|
-
className: "row-span-2 bg-deckSurface is-4",
|
|
1204
|
-
style: {
|
|
1205
|
-
gridColumn: order
|
|
1206
|
-
}
|
|
1207
|
-
}) : null;
|
|
1208
|
-
} finally {
|
|
1209
|
-
_effect.f();
|
|
1210
|
-
}
|
|
1211
|
-
};
|
|
1212
|
-
var DeckLayout = ({ onDismissToast }) => {
|
|
1213
|
-
var _effect = _useSignals17();
|
|
1034
|
+
// src/components/DeckLayout/DeckMain.tsx
|
|
1035
|
+
var DeckMain = () => {
|
|
1036
|
+
var _effect = _useSignals14();
|
|
1214
1037
|
try {
|
|
1215
1038
|
const { dispatchPromise: dispatch } = useIntentDispatcher6();
|
|
1216
|
-
const settings =
|
|
1217
|
-
const context =
|
|
1218
|
-
const { sidebarState, complementarySidebarState, complementarySidebarPanel, deck
|
|
1039
|
+
const settings = useCapability6(Capabilities.SettingsStore).getStore(meta.id)?.value;
|
|
1040
|
+
const context = useCapability6(DeckCapabilities.MutableDeckState);
|
|
1041
|
+
const { sidebarState, complementarySidebarState, complementarySidebarPanel, deck } = context;
|
|
1219
1042
|
const { active, activeCompanions, fullscreen, solo, plankSizing } = deck;
|
|
1220
|
-
const breakpoint = useBreakpoints();
|
|
1221
1043
|
const layoutMode = getMode(deck);
|
|
1044
|
+
const breakpoint = useBreakpoints();
|
|
1222
1045
|
const topbar = layoutAppliesTopbar(breakpoint, layoutMode);
|
|
1223
1046
|
const hoistStatusbar = useHoistStatusbar(breakpoint, layoutMode);
|
|
1224
1047
|
const pluginManager = usePluginManager();
|
|
1225
|
-
const scrollLeftRef =
|
|
1226
|
-
const deckRef =
|
|
1227
|
-
|
|
1048
|
+
const scrollLeftRef = useRef2(null);
|
|
1049
|
+
const deckRef = useRef2(null);
|
|
1050
|
+
useEffect4(() => {
|
|
1228
1051
|
const attended = untracked(() => {
|
|
1229
1052
|
const attention = pluginManager.context.getCapability(AttentionCapabilities.Attention);
|
|
1230
1053
|
return attention.current;
|
|
@@ -1234,11 +1057,9 @@ var DeckLayout = ({ onDismissToast }) => {
|
|
|
1234
1057
|
document.querySelector(`article[data-attendable-id="${firstId}"] button`)?.focus();
|
|
1235
1058
|
}
|
|
1236
1059
|
}, []);
|
|
1237
|
-
const [isNotMobile] = useMediaQuery("md"
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
const shouldRevert = useRef3(false);
|
|
1241
|
-
useEffect5(() => {
|
|
1060
|
+
const [isNotMobile] = useMediaQuery("md");
|
|
1061
|
+
const shouldRevert = useRef2(false);
|
|
1062
|
+
useEffect4(() => {
|
|
1242
1063
|
if (!isNotMobile && getMode(deck) === "deck") {
|
|
1243
1064
|
const attended = untracked(() => {
|
|
1244
1065
|
const attention = pluginManager.context.getCapability(AttentionCapabilities.Attention);
|
|
@@ -1265,8 +1086,8 @@ var DeckLayout = ({ onDismissToast }) => {
|
|
|
1265
1086
|
deck,
|
|
1266
1087
|
dispatch
|
|
1267
1088
|
]);
|
|
1268
|
-
|
|
1269
|
-
if (!settings
|
|
1089
|
+
useEffect4(() => {
|
|
1090
|
+
if (!settings?.enableDeck && layoutMode === "deck") {
|
|
1270
1091
|
void dispatch(createIntent6(LayoutAction5.SetLayoutMode, {
|
|
1271
1092
|
part: "mode",
|
|
1272
1093
|
subject: active[0],
|
|
@@ -1276,27 +1097,27 @@ var DeckLayout = ({ onDismissToast }) => {
|
|
|
1276
1097
|
}));
|
|
1277
1098
|
}
|
|
1278
1099
|
}, [
|
|
1279
|
-
settings
|
|
1100
|
+
settings?.enableDeck,
|
|
1280
1101
|
dispatch,
|
|
1281
1102
|
active,
|
|
1282
1103
|
layoutMode
|
|
1283
1104
|
]);
|
|
1284
|
-
const handleResize =
|
|
1105
|
+
const handleResize = useCallback6(() => {
|
|
1285
1106
|
scrollLeftRef.current = null;
|
|
1286
1107
|
}, []);
|
|
1287
|
-
|
|
1108
|
+
useEffect4(() => {
|
|
1288
1109
|
window.addEventListener("resize", handleResize);
|
|
1289
1110
|
return () => window.removeEventListener("resize", handleResize);
|
|
1290
1111
|
}, [
|
|
1291
1112
|
handleResize
|
|
1292
1113
|
]);
|
|
1293
|
-
const restoreScroll =
|
|
1114
|
+
const restoreScroll = useCallback6(() => {
|
|
1294
1115
|
if (deckRef.current && scrollLeftRef.current != null) {
|
|
1295
1116
|
deckRef.current.scrollLeft = scrollLeftRef.current;
|
|
1296
1117
|
}
|
|
1297
1118
|
}, []);
|
|
1298
1119
|
useOnTransition(layoutMode, (mode) => mode !== "deck", "deck", restoreScroll);
|
|
1299
|
-
const handleScroll =
|
|
1120
|
+
const handleScroll = useCallback6((event) => {
|
|
1300
1121
|
if (!solo && event.currentTarget === event.target) {
|
|
1301
1122
|
scrollLeftRef.current = event.target.scrollLeft;
|
|
1302
1123
|
}
|
|
@@ -1304,17 +1125,17 @@ var DeckLayout = ({ onDismissToast }) => {
|
|
|
1304
1125
|
solo
|
|
1305
1126
|
]);
|
|
1306
1127
|
const isEmpty = !solo && active.length === 0;
|
|
1307
|
-
const padding =
|
|
1308
|
-
if (!solo && settings
|
|
1128
|
+
const padding = useMemo5(() => {
|
|
1129
|
+
if (!solo && settings?.overscroll === "centering") {
|
|
1309
1130
|
return calculateOverscroll(active.length);
|
|
1310
1131
|
}
|
|
1311
1132
|
return {};
|
|
1312
1133
|
}, [
|
|
1313
1134
|
solo,
|
|
1314
|
-
settings
|
|
1135
|
+
settings?.overscroll,
|
|
1315
1136
|
deck
|
|
1316
1137
|
]);
|
|
1317
|
-
const mainPosition =
|
|
1138
|
+
const mainPosition = useMemo5(() => [
|
|
1318
1139
|
"grid !block-start-[env(safe-area-inset-top)]",
|
|
1319
1140
|
topbar && "!block-start-[calc(env(safe-area-inset-top)+var(--rail-size))]",
|
|
1320
1141
|
hoistStatusbar && "lg:block-end-[--statusbar-size]"
|
|
@@ -1322,7 +1143,7 @@ var DeckLayout = ({ onDismissToast }) => {
|
|
|
1322
1143
|
topbar,
|
|
1323
1144
|
hoistStatusbar
|
|
1324
1145
|
]);
|
|
1325
|
-
const { order, itemsCount } =
|
|
1146
|
+
const { order, itemsCount } = useMemo5(() => {
|
|
1326
1147
|
return active.reduce((acc, entryId) => {
|
|
1327
1148
|
acc.order[entryId] = acc.itemsCount + 1;
|
|
1328
1149
|
acc.itemsCount += activeCompanions?.[entryId] ? 3 : 2;
|
|
@@ -1335,53 +1156,55 @@ var DeckLayout = ({ onDismissToast }) => {
|
|
|
1335
1156
|
active,
|
|
1336
1157
|
activeCompanions
|
|
1337
1158
|
]);
|
|
1338
|
-
return /* @__PURE__ */
|
|
1159
|
+
return /* @__PURE__ */ React14.createElement(Main3.Root, {
|
|
1339
1160
|
navigationSidebarState: fullscreen ? "closed" : context.sidebarState,
|
|
1340
1161
|
onNavigationSidebarStateChange: (next) => context.sidebarState = next,
|
|
1341
1162
|
complementarySidebarState: fullscreen ? "closed" : context.complementarySidebarState,
|
|
1342
1163
|
onComplementarySidebarStateChange: (next) => context.complementarySidebarState = next
|
|
1343
|
-
}, /* @__PURE__ */
|
|
1164
|
+
}, /* @__PURE__ */ React14.createElement(Sidebar, null), /* @__PURE__ */ React14.createElement(ComplementarySidebar, {
|
|
1344
1165
|
current: complementarySidebarPanel
|
|
1345
|
-
}), /* @__PURE__ */
|
|
1166
|
+
}), /* @__PURE__ */ React14.createElement(Main3.Overlay, null), isEmpty && /* @__PURE__ */ React14.createElement(Main3.Content, {
|
|
1346
1167
|
bounce: true,
|
|
1347
1168
|
handlesFocus: true,
|
|
1348
1169
|
classNames: mainPosition
|
|
1349
|
-
}, /* @__PURE__ */
|
|
1170
|
+
}, /* @__PURE__ */ React14.createElement(ContentEmpty, null)), !isEmpty && /* @__PURE__ */ React14.createElement(Main3.Content, {
|
|
1350
1171
|
bounce: true,
|
|
1351
1172
|
handlesFocus: true,
|
|
1352
1173
|
classNames: mainPosition,
|
|
1353
1174
|
style: {
|
|
1175
|
+
"--main-spacing": settings?.encapsulatedPlanks ? "0.75rem" : "0",
|
|
1354
1176
|
"--dx-main-sidebarWidth": sidebarState === "expanded" ? "var(--nav-sidebar-size)" : sidebarState === "collapsed" ? "var(--l0-size)" : "0",
|
|
1355
1177
|
"--dx-main-complementaryWidth": complementarySidebarState === "expanded" ? "var(--complementary-sidebar-size)" : complementarySidebarState === "collapsed" ? "var(--rail-size)" : "0",
|
|
1356
1178
|
"--dx-main-contentFirstWidth": `${plankSizing[active[0] ?? "never"] ?? DEFAULT_HORIZONTAL_SIZE}rem`,
|
|
1357
1179
|
"--dx-main-contentLastWidth": `${plankSizing[active[(active.length ?? 1) - 1] ?? "never"] ?? DEFAULT_HORIZONTAL_SIZE}rem`
|
|
1358
1180
|
}
|
|
1359
|
-
}, /* @__PURE__ */
|
|
1181
|
+
}, /* @__PURE__ */ React14.createElement("div", {
|
|
1360
1182
|
role: "none",
|
|
1361
1183
|
className: !solo ? "relative bg-deckSurface overflow-hidden" : "sr-only",
|
|
1362
1184
|
...solo && {
|
|
1363
|
-
inert:
|
|
1185
|
+
inert: true
|
|
1364
1186
|
}
|
|
1365
|
-
}, !topbar && !fullscreen && /* @__PURE__ */
|
|
1187
|
+
}, !topbar && !fullscreen && /* @__PURE__ */ React14.createElement(ToggleSidebarButton, {
|
|
1366
1188
|
classNames: fixedSidebarToggleStyles
|
|
1367
|
-
}), !topbar && !fullscreen && /* @__PURE__ */
|
|
1189
|
+
}), !topbar && !fullscreen && /* @__PURE__ */ React14.createElement(ToggleComplementarySidebarButton, {
|
|
1368
1190
|
classNames: fixedComplementarySidebarToggleStyles
|
|
1369
|
-
}), /* @__PURE__ */
|
|
1191
|
+
}), /* @__PURE__ */ React14.createElement(Stack, {
|
|
1370
1192
|
ref: deckRef,
|
|
1371
1193
|
orientation: "horizontal",
|
|
1372
1194
|
size: "contain",
|
|
1195
|
+
itemsCount: itemsCount - 1,
|
|
1373
1196
|
classNames: [
|
|
1374
|
-
"absolute inset-block-
|
|
1197
|
+
"absolute inset-block-[--main-spacing] -inset-inline-px bs-[calc(100%-2*var(--main-spacing))]",
|
|
1375
1198
|
mainPaddingTransitions
|
|
1376
1199
|
],
|
|
1377
|
-
itemsCount: itemsCount - 1,
|
|
1378
1200
|
style: padding,
|
|
1379
1201
|
onScroll: handleScroll
|
|
1380
|
-
}, active.map((entryId) => /* @__PURE__ */
|
|
1202
|
+
}, active.map((entryId) => /* @__PURE__ */ React14.createElement(Fragment3, {
|
|
1381
1203
|
key: entryId
|
|
1382
|
-
}, /* @__PURE__ */
|
|
1383
|
-
order: order[entryId] - 1
|
|
1384
|
-
|
|
1204
|
+
}, /* @__PURE__ */ React14.createElement(PlankSeparator, {
|
|
1205
|
+
order: order[entryId] - 1,
|
|
1206
|
+
encapsulate: !!settings?.enableDeck
|
|
1207
|
+
}), /* @__PURE__ */ React14.createElement(Plank, {
|
|
1385
1208
|
id: entryId,
|
|
1386
1209
|
companionId: activeCompanions?.[entryId],
|
|
1387
1210
|
part: "deck",
|
|
@@ -1389,36 +1212,227 @@ var DeckLayout = ({ onDismissToast }) => {
|
|
|
1389
1212
|
active,
|
|
1390
1213
|
layoutMode,
|
|
1391
1214
|
settings
|
|
1392
|
-
}))))), /* @__PURE__ */
|
|
1215
|
+
}))))), /* @__PURE__ */ React14.createElement("div", {
|
|
1393
1216
|
role: "none",
|
|
1394
|
-
className: solo ? "relative bg-deckSurface
|
|
1217
|
+
className: solo ? "relative overflow-hidden bg-deckSurface" : "sr-only",
|
|
1395
1218
|
...!solo && {
|
|
1396
|
-
inert:
|
|
1219
|
+
inert: true
|
|
1397
1220
|
}
|
|
1398
|
-
}, !topbar && !fullscreen && /* @__PURE__ */
|
|
1221
|
+
}, !topbar && !fullscreen && /* @__PURE__ */ React14.createElement(ToggleSidebarButton, {
|
|
1399
1222
|
classNames: fixedSidebarToggleStyles
|
|
1400
|
-
}), !topbar && !fullscreen && /* @__PURE__ */
|
|
1223
|
+
}), !topbar && !fullscreen && /* @__PURE__ */ React14.createElement(ToggleComplementarySidebarButton, {
|
|
1401
1224
|
classNames: fixedComplementarySidebarToggleStyles
|
|
1402
|
-
}), /* @__PURE__ */
|
|
1225
|
+
}), /* @__PURE__ */ React14.createElement(StackContext.Provider, {
|
|
1403
1226
|
value: {
|
|
1404
|
-
size: "contain",
|
|
1405
1227
|
orientation: "horizontal",
|
|
1228
|
+
size: "contain",
|
|
1406
1229
|
rail: true
|
|
1407
1230
|
}
|
|
1408
|
-
}, /* @__PURE__ */
|
|
1231
|
+
}, /* @__PURE__ */ React14.createElement(Plank, {
|
|
1409
1232
|
id: solo,
|
|
1410
1233
|
companionId: solo ? activeCompanions?.[solo] : void 0,
|
|
1411
1234
|
part: "solo",
|
|
1412
1235
|
layoutMode,
|
|
1413
1236
|
settings
|
|
1414
|
-
})))), topbar && /* @__PURE__ */
|
|
1415
|
-
showHints: settings
|
|
1416
|
-
}))
|
|
1237
|
+
})))), topbar && /* @__PURE__ */ React14.createElement(Topbar, null), hoistStatusbar && /* @__PURE__ */ React14.createElement(StatusBar, {
|
|
1238
|
+
showHints: settings?.showHints
|
|
1239
|
+
}));
|
|
1240
|
+
} finally {
|
|
1241
|
+
_effect.f();
|
|
1242
|
+
}
|
|
1243
|
+
};
|
|
1244
|
+
var PlankSeparator = ({ order, encapsulate }) => {
|
|
1245
|
+
var _effect = _useSignals14();
|
|
1246
|
+
try {
|
|
1247
|
+
return order > 0 ? /* @__PURE__ */ React14.createElement("span", {
|
|
1248
|
+
role: "separator",
|
|
1249
|
+
className: mx5("row-span-2 bg-deckSurface", encapsulate ? "is-0" : "is-4"),
|
|
1250
|
+
style: {
|
|
1251
|
+
gridColumn: order
|
|
1252
|
+
}
|
|
1253
|
+
}) : null;
|
|
1254
|
+
} finally {
|
|
1255
|
+
_effect.f();
|
|
1256
|
+
}
|
|
1257
|
+
};
|
|
1258
|
+
|
|
1259
|
+
// src/components/DeckLayout/Dialog.tsx
|
|
1260
|
+
import { useSignals as _useSignals15 } from "@preact-signals/safe-react/tracking";
|
|
1261
|
+
import React15 from "react";
|
|
1262
|
+
import { Surface as Surface9, useCapability as useCapability7 } from "@dxos/app-framework";
|
|
1263
|
+
import { AlertDialog, Dialog as NaturalDialog } from "@dxos/react-ui";
|
|
1264
|
+
var Dialog = () => {
|
|
1265
|
+
var _effect = _useSignals15();
|
|
1266
|
+
try {
|
|
1267
|
+
const context = useCapability7(DeckCapabilities.MutableDeckState);
|
|
1268
|
+
const { dialogOpen, dialogType, dialogBlockAlign, dialogOverlayClasses, dialogOverlayStyle, dialogContent } = context;
|
|
1269
|
+
const Root = dialogType === "alert" ? AlertDialog.Root : NaturalDialog.Root;
|
|
1270
|
+
const Overlay = dialogType === "alert" ? AlertDialog.Overlay : NaturalDialog.Overlay;
|
|
1271
|
+
return /* @__PURE__ */ React15.createElement(Root, {
|
|
1272
|
+
modal: dialogBlockAlign !== "end",
|
|
1273
|
+
open: dialogOpen,
|
|
1274
|
+
onOpenChange: (nextOpen) => context.dialogOpen = nextOpen
|
|
1275
|
+
}, dialogBlockAlign === "end" ? (
|
|
1276
|
+
// TODO(burdon): Placeholder creates a suspense boundary; replace with defaults.
|
|
1277
|
+
/* @__PURE__ */ React15.createElement(Surface9, {
|
|
1278
|
+
role: "dialog",
|
|
1279
|
+
data: dialogContent,
|
|
1280
|
+
limit: 1,
|
|
1281
|
+
fallback: PlankContentError,
|
|
1282
|
+
placeholder: /* @__PURE__ */ React15.createElement("div", null)
|
|
1283
|
+
})
|
|
1284
|
+
) : /* @__PURE__ */ React15.createElement(Overlay, {
|
|
1285
|
+
blockAlign: dialogBlockAlign,
|
|
1286
|
+
classNames: dialogOverlayClasses,
|
|
1287
|
+
style: dialogOverlayStyle
|
|
1288
|
+
}, /* @__PURE__ */ React15.createElement(Surface9, {
|
|
1289
|
+
role: "dialog",
|
|
1290
|
+
data: dialogContent,
|
|
1291
|
+
limit: 1,
|
|
1292
|
+
fallback: PlankContentError
|
|
1293
|
+
})));
|
|
1294
|
+
} finally {
|
|
1295
|
+
_effect.f();
|
|
1296
|
+
}
|
|
1297
|
+
};
|
|
1298
|
+
|
|
1299
|
+
// src/components/DeckLayout/Popover.tsx
|
|
1300
|
+
import { useSignals as _useSignals16 } from "@preact-signals/safe-react/tracking";
|
|
1301
|
+
import { createContext } from "@radix-ui/react-context";
|
|
1302
|
+
import React16, { useCallback as useCallback7, useEffect as useEffect5, useMemo as useMemo6, useRef as useRef3, useState as useState3 } from "react";
|
|
1303
|
+
import { Surface as Surface10, useCapability as useCapability8 } from "@dxos/app-framework";
|
|
1304
|
+
import { Popover as Popover2 } from "@dxos/react-ui";
|
|
1305
|
+
var DEBOUNCE_DELAY = 40;
|
|
1306
|
+
var [DeckPopoverProvider, useDeckPopoverContext] = createContext("DeckPopover");
|
|
1307
|
+
var PopoverRoot = ({ children }) => {
|
|
1308
|
+
var _effect = _useSignals16();
|
|
1309
|
+
try {
|
|
1310
|
+
const layout = useCapability8(DeckCapabilities.MutableDeckState);
|
|
1311
|
+
const virtualRef = useRef3(null);
|
|
1312
|
+
const [virtualIter, setVirtualIter] = useState3(0);
|
|
1313
|
+
const [open, setOpen] = useState3(false);
|
|
1314
|
+
const debounceRef = useRef3(null);
|
|
1315
|
+
useEffect5(() => {
|
|
1316
|
+
setOpen(false);
|
|
1317
|
+
if (layout.popoverOpen) {
|
|
1318
|
+
if (debounceRef.current) {
|
|
1319
|
+
clearTimeout(debounceRef.current);
|
|
1320
|
+
}
|
|
1321
|
+
if (layout.popoverAnchor && virtualRef.current !== layout.popoverAnchor) {
|
|
1322
|
+
virtualRef.current = layout.popoverAnchor ?? null;
|
|
1323
|
+
setVirtualIter((iter) => iter + 1);
|
|
1324
|
+
}
|
|
1325
|
+
debounceRef.current = setTimeout(() => setOpen(true), DEBOUNCE_DELAY);
|
|
1326
|
+
}
|
|
1327
|
+
}, [
|
|
1328
|
+
layout.popoverOpen,
|
|
1329
|
+
layout.popoverAnchorId,
|
|
1330
|
+
layout.popoverAnchor,
|
|
1331
|
+
layout.popoverContent
|
|
1332
|
+
]);
|
|
1333
|
+
return /* @__PURE__ */ React16.createElement(DeckPopoverProvider, {
|
|
1334
|
+
setOpen
|
|
1335
|
+
}, /* @__PURE__ */ React16.createElement(Popover2.Root, {
|
|
1336
|
+
modal: false,
|
|
1337
|
+
open
|
|
1338
|
+
}, layout.popoverAnchor && /* @__PURE__ */ React16.createElement(Popover2.VirtualTrigger, {
|
|
1339
|
+
key: virtualIter,
|
|
1340
|
+
virtualRef
|
|
1341
|
+
}), children));
|
|
1342
|
+
} finally {
|
|
1343
|
+
_effect.f();
|
|
1344
|
+
}
|
|
1345
|
+
};
|
|
1346
|
+
var PopoverContent = () => {
|
|
1347
|
+
var _effect = _useSignals16();
|
|
1348
|
+
try {
|
|
1349
|
+
const layout = useCapability8(DeckCapabilities.MutableDeckState);
|
|
1350
|
+
const { setOpen } = useDeckPopoverContext("PopoverContent");
|
|
1351
|
+
const handleClose = useCallback7((event) => {
|
|
1352
|
+
if (
|
|
1353
|
+
// TODO(thure): CodeMirror should not focus itself when it updates.
|
|
1354
|
+
event.type === "dismissableLayer.focusOutside" && event.currentTarget?.classList.contains("cm-content")
|
|
1355
|
+
) {
|
|
1356
|
+
event.preventDefault();
|
|
1357
|
+
} else {
|
|
1358
|
+
setOpen(false);
|
|
1359
|
+
layout.popoverOpen = false;
|
|
1360
|
+
layout.popoverAnchor = void 0;
|
|
1361
|
+
layout.popoverAnchorId = void 0;
|
|
1362
|
+
layout.popoverSide = void 0;
|
|
1363
|
+
}
|
|
1364
|
+
}, [
|
|
1365
|
+
setOpen
|
|
1366
|
+
]);
|
|
1367
|
+
const collisionBoundaries = useMemo6(() => {
|
|
1368
|
+
const closest = layout.popoverAnchor?.closest("[data-popover-collision-boundary]");
|
|
1369
|
+
return closest ? [
|
|
1370
|
+
closest
|
|
1371
|
+
] : [];
|
|
1372
|
+
}, [
|
|
1373
|
+
layout.popoverAnchor
|
|
1374
|
+
]);
|
|
1375
|
+
return /* @__PURE__ */ React16.createElement(Popover2.Portal, null, /* @__PURE__ */ React16.createElement(Popover2.Content, {
|
|
1376
|
+
side: layout.popoverSide,
|
|
1377
|
+
onInteractOutside: handleClose,
|
|
1378
|
+
onEscapeKeyDown: handleClose,
|
|
1379
|
+
collisionBoundary: collisionBoundaries,
|
|
1380
|
+
sticky: "always",
|
|
1381
|
+
hideWhenDetached: true
|
|
1382
|
+
}, /* @__PURE__ */ React16.createElement(Popover2.Viewport, null, /* @__PURE__ */ React16.createElement(Surface10, {
|
|
1383
|
+
role: "card--popover",
|
|
1384
|
+
data: layout.popoverContent,
|
|
1385
|
+
limit: 1
|
|
1386
|
+
})), /* @__PURE__ */ React16.createElement(Popover2.Arrow, null)));
|
|
1387
|
+
} finally {
|
|
1388
|
+
_effect.f();
|
|
1389
|
+
}
|
|
1390
|
+
};
|
|
1391
|
+
|
|
1392
|
+
// src/components/DeckLayout/Toast.tsx
|
|
1393
|
+
import { useSignals as _useSignals17 } from "@preact-signals/safe-react/tracking";
|
|
1394
|
+
import React17 from "react";
|
|
1395
|
+
import { Button, Icon as Icon2, Toast as NaturalToast, toLocalizedString as toLocalizedString3, useTranslation as useTranslation7 } from "@dxos/react-ui";
|
|
1396
|
+
var Toast = ({ id, title, description, icon, duration, actionLabel, actionAlt, closeLabel, onAction, onOpenChange }) => {
|
|
1397
|
+
var _effect = _useSignals17();
|
|
1398
|
+
try {
|
|
1399
|
+
const { t } = useTranslation7(meta.id);
|
|
1400
|
+
return /* @__PURE__ */ React17.createElement(NaturalToast.Root, {
|
|
1401
|
+
"data-testid": id,
|
|
1402
|
+
defaultOpen: true,
|
|
1403
|
+
duration,
|
|
1404
|
+
onOpenChange
|
|
1405
|
+
}, /* @__PURE__ */ React17.createElement(NaturalToast.Body, null, /* @__PURE__ */ React17.createElement(NaturalToast.Title, {
|
|
1406
|
+
classNames: "items-center"
|
|
1407
|
+
}, icon && /* @__PURE__ */ React17.createElement(Icon2, {
|
|
1408
|
+
icon,
|
|
1409
|
+
size: 5,
|
|
1410
|
+
classNames: "inline mr-1"
|
|
1411
|
+
}), title && /* @__PURE__ */ React17.createElement("span", null, toLocalizedString3(title, t))), description && /* @__PURE__ */ React17.createElement(NaturalToast.Description, null, description && toLocalizedString3(description, t))), /* @__PURE__ */ React17.createElement(NaturalToast.Actions, null, onAction && actionAlt && actionLabel && /* @__PURE__ */ React17.createElement(NaturalToast.Action, {
|
|
1412
|
+
altText: toLocalizedString3(actionAlt, t),
|
|
1413
|
+
asChild: true
|
|
1414
|
+
}, /* @__PURE__ */ React17.createElement(Button, {
|
|
1415
|
+
"data-testid": "toast.action",
|
|
1416
|
+
variant: "primary",
|
|
1417
|
+
onClick: () => onAction?.()
|
|
1418
|
+
}, toLocalizedString3(actionLabel, t))), closeLabel && /* @__PURE__ */ React17.createElement(NaturalToast.Close, {
|
|
1419
|
+
asChild: true
|
|
1420
|
+
}, /* @__PURE__ */ React17.createElement(Button, {
|
|
1421
|
+
"data-testid": "toast.close"
|
|
1422
|
+
}, toLocalizedString3(closeLabel, t)))));
|
|
1423
|
+
} finally {
|
|
1424
|
+
_effect.f();
|
|
1425
|
+
}
|
|
1426
|
+
};
|
|
1427
|
+
var Toaster = ({ toasts, onDismissToast }) => {
|
|
1428
|
+
var _effect = _useSignals17();
|
|
1429
|
+
try {
|
|
1430
|
+
return /* @__PURE__ */ React17.createElement(React17.Fragment, null, toasts?.map((toast) => /* @__PURE__ */ React17.createElement(Toast, {
|
|
1417
1431
|
...toast,
|
|
1418
1432
|
key: toast.id,
|
|
1419
1433
|
onOpenChange: (open) => {
|
|
1420
1434
|
if (!open) {
|
|
1421
|
-
onDismissToast(toast.id);
|
|
1435
|
+
onDismissToast?.(toast.id);
|
|
1422
1436
|
}
|
|
1423
1437
|
return open;
|
|
1424
1438
|
}
|
|
@@ -1428,59 +1442,83 @@ var DeckLayout = ({ onDismissToast }) => {
|
|
|
1428
1442
|
}
|
|
1429
1443
|
};
|
|
1430
1444
|
|
|
1445
|
+
// src/components/DeckLayout/DeckLayout.tsx
|
|
1446
|
+
var DeckLayout = ({ onDismissToast }) => {
|
|
1447
|
+
var _effect = _useSignals18();
|
|
1448
|
+
try {
|
|
1449
|
+
const context = useCapability9(DeckCapabilities.MutableDeckState);
|
|
1450
|
+
const { toasts } = context;
|
|
1451
|
+
return /* @__PURE__ */ React18.createElement(PopoverRoot, null, /* @__PURE__ */ React18.createElement(ActiveNode, null), /* @__PURE__ */ React18.createElement(DeckMain, null), /* @__PURE__ */ React18.createElement(PopoverContent, null), /* @__PURE__ */ React18.createElement(Dialog, null), /* @__PURE__ */ React18.createElement(Toaster, {
|
|
1452
|
+
toasts,
|
|
1453
|
+
onDismissToast
|
|
1454
|
+
}));
|
|
1455
|
+
} finally {
|
|
1456
|
+
_effect.f();
|
|
1457
|
+
}
|
|
1458
|
+
};
|
|
1459
|
+
|
|
1431
1460
|
// src/components/DeckSettings/DeckSettings.tsx
|
|
1432
|
-
import { useSignals as
|
|
1433
|
-
import
|
|
1461
|
+
import { useSignals as _useSignals19 } from "@preact-signals/safe-react/tracking";
|
|
1462
|
+
import React19 from "react";
|
|
1434
1463
|
import { Input, Select, useTranslation as useTranslation8 } from "@dxos/react-ui";
|
|
1435
|
-
import {
|
|
1464
|
+
import { ControlGroup, ControlItemInput, ControlPage, ControlSection } from "@dxos/react-ui-form";
|
|
1436
1465
|
var isSocket = !!globalThis.__args;
|
|
1437
1466
|
var DeckSettings = ({ settings }) => {
|
|
1438
|
-
var _effect =
|
|
1467
|
+
var _effect = _useSignals19();
|
|
1439
1468
|
try {
|
|
1440
|
-
const { t } = useTranslation8(
|
|
1441
|
-
return /* @__PURE__ */
|
|
1442
|
-
|
|
1443
|
-
|
|
1469
|
+
const { t } = useTranslation8(meta.id);
|
|
1470
|
+
return /* @__PURE__ */ React19.createElement(ControlPage, null, /* @__PURE__ */ React19.createElement(ControlSection, {
|
|
1471
|
+
title: t("settings title", {
|
|
1472
|
+
ns: meta.id
|
|
1473
|
+
})
|
|
1474
|
+
}, /* @__PURE__ */ React19.createElement(ControlGroup, null, /* @__PURE__ */ React19.createElement(ControlItemInput, {
|
|
1475
|
+
title: t("settings enable deck label")
|
|
1476
|
+
}, /* @__PURE__ */ React19.createElement(Input.Switch, {
|
|
1444
1477
|
checked: settings.enableDeck,
|
|
1445
1478
|
onCheckedChange: (checked) => settings.enableDeck = checked
|
|
1446
|
-
})), /* @__PURE__ */
|
|
1447
|
-
|
|
1448
|
-
}, /* @__PURE__ */
|
|
1479
|
+
})), /* @__PURE__ */ React19.createElement(ControlItemInput, {
|
|
1480
|
+
title: t("settings encapsulated planks label")
|
|
1481
|
+
}, /* @__PURE__ */ React19.createElement(Input.Switch, {
|
|
1482
|
+
checked: settings.encapsulatedPlanks ?? false,
|
|
1483
|
+
onCheckedChange: (checked) => settings.encapsulatedPlanks = checked
|
|
1484
|
+
})), /* @__PURE__ */ React19.createElement(ControlItemInput, {
|
|
1485
|
+
title: t("select new plank positioning label")
|
|
1486
|
+
}, /* @__PURE__ */ React19.createElement(Select.Root, {
|
|
1449
1487
|
disabled: !settings.enableDeck,
|
|
1450
1488
|
value: settings.newPlankPositioning ?? "start",
|
|
1451
1489
|
onValueChange: (value) => settings.newPlankPositioning = value
|
|
1452
|
-
}, /* @__PURE__ */
|
|
1490
|
+
}, /* @__PURE__ */ React19.createElement(Select.TriggerButton, {
|
|
1453
1491
|
placeholder: t("select new plank positioning placeholder")
|
|
1454
|
-
}), /* @__PURE__ */
|
|
1492
|
+
}), /* @__PURE__ */ React19.createElement(Select.Portal, null, /* @__PURE__ */ React19.createElement(Select.Content, null, /* @__PURE__ */ React19.createElement(Select.Viewport, null, NewPlankPositions.map((position) => /* @__PURE__ */ React19.createElement(Select.Option, {
|
|
1455
1493
|
key: position,
|
|
1456
1494
|
value: position
|
|
1457
|
-
}, t(`settings new plank position ${position} label`)))))))), /* @__PURE__ */
|
|
1458
|
-
|
|
1459
|
-
}, /* @__PURE__ */
|
|
1495
|
+
}, t(`settings new plank position ${position} label`)))), /* @__PURE__ */ React19.createElement(Select.Arrow, null))))), /* @__PURE__ */ React19.createElement(ControlItemInput, {
|
|
1496
|
+
title: t("settings overscroll label")
|
|
1497
|
+
}, /* @__PURE__ */ React19.createElement(Select.Root, {
|
|
1460
1498
|
disabled: !settings.enableDeck,
|
|
1461
1499
|
value: settings.overscroll ?? "none",
|
|
1462
1500
|
onValueChange: (value) => settings.overscroll = value
|
|
1463
|
-
}, /* @__PURE__ */
|
|
1501
|
+
}, /* @__PURE__ */ React19.createElement(Select.TriggerButton, {
|
|
1464
1502
|
placeholder: t("select overscroll placeholder")
|
|
1465
|
-
}), /* @__PURE__ */
|
|
1503
|
+
}), /* @__PURE__ */ React19.createElement(Select.Portal, null, /* @__PURE__ */ React19.createElement(Select.Content, null, /* @__PURE__ */ React19.createElement(Select.Viewport, null, OverscrollOptions.map((option) => /* @__PURE__ */ React19.createElement(Select.Option, {
|
|
1466
1504
|
key: option,
|
|
1467
1505
|
value: option
|
|
1468
|
-
}, t(`settings overscroll ${option} label`)))))))), /* @__PURE__ */
|
|
1469
|
-
|
|
1470
|
-
}, /* @__PURE__ */
|
|
1506
|
+
}, t(`settings overscroll ${option} label`)))), /* @__PURE__ */ React19.createElement(Select.Arrow, null))))), /* @__PURE__ */ React19.createElement(ControlItemInput, {
|
|
1507
|
+
title: t("settings enable statusbar label")
|
|
1508
|
+
}, /* @__PURE__ */ React19.createElement(Input.Switch, {
|
|
1471
1509
|
checked: settings.enableStatusbar,
|
|
1472
1510
|
onCheckedChange: (checked) => settings.enableStatusbar = checked
|
|
1473
|
-
})), /* @__PURE__ */
|
|
1474
|
-
|
|
1475
|
-
}, /* @__PURE__ */
|
|
1511
|
+
})), /* @__PURE__ */ React19.createElement(ControlItemInput, {
|
|
1512
|
+
title: t("settings show hints label")
|
|
1513
|
+
}, /* @__PURE__ */ React19.createElement(Input.Switch, {
|
|
1476
1514
|
checked: settings.showHints,
|
|
1477
1515
|
onCheckedChange: (checked) => settings.showHints = checked
|
|
1478
|
-
})), !isSocket && /* @__PURE__ */
|
|
1479
|
-
|
|
1480
|
-
}, /* @__PURE__ */
|
|
1516
|
+
})), !isSocket && /* @__PURE__ */ React19.createElement(ControlItemInput, {
|
|
1517
|
+
title: t("settings native redirect label")
|
|
1518
|
+
}, /* @__PURE__ */ React19.createElement(Input.Switch, {
|
|
1481
1519
|
checked: settings.enableNativeRedirect,
|
|
1482
1520
|
onCheckedChange: (checked) => settings.enableNativeRedirect = checked
|
|
1483
|
-
})));
|
|
1521
|
+
})))));
|
|
1484
1522
|
} finally {
|
|
1485
1523
|
_effect.f();
|
|
1486
1524
|
}
|
|
@@ -1491,4 +1529,4 @@ export {
|
|
|
1491
1529
|
DeckLayout,
|
|
1492
1530
|
DeckSettings
|
|
1493
1531
|
};
|
|
1494
|
-
//# sourceMappingURL=chunk-
|
|
1532
|
+
//# sourceMappingURL=chunk-SBJLGRJV.mjs.map
|