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