@dxos/plugin-deck 0.8.4-main.c1de068 → 0.8.4-main.c4373fc
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-YYP67JHW.mjs} +17 -16
- package/dist/lib/browser/app-graph-builder-YYP67JHW.mjs.map +7 -0
- package/dist/lib/browser/{check-app-scheme-57U62A3A.mjs → check-app-scheme-GCOL6YDT.mjs} +6 -6
- package/dist/lib/browser/check-app-scheme-GCOL6YDT.mjs.map +7 -0
- package/dist/lib/browser/{chunk-D7KTFCUV.mjs → chunk-3SV2V3AN.mjs} +223 -222
- package/dist/lib/browser/chunk-3SV2V3AN.mjs.map +7 -0
- package/dist/lib/browser/{chunk-F5BQOOEG.mjs → chunk-A4SRCSJX.mjs} +5 -5
- package/dist/lib/browser/chunk-A4SRCSJX.mjs.map +7 -0
- package/dist/lib/browser/chunk-HUWUYTOI.mjs +16 -0
- package/dist/lib/browser/chunk-HUWUYTOI.mjs.map +7 -0
- package/dist/lib/browser/{chunk-JFTXENFN.mjs → chunk-JH4ZCG5I.mjs} +9 -9
- package/dist/lib/browser/chunk-JH4ZCG5I.mjs.map +7 -0
- package/dist/lib/browser/chunk-MHP4GPX5.mjs +11 -0
- package/dist/lib/browser/chunk-MHP4GPX5.mjs.map +7 -0
- package/dist/lib/browser/{chunk-QDZO4AJ4.mjs → chunk-YRDCQS7E.mjs} +15 -15
- package/dist/lib/browser/chunk-YRDCQS7E.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +19 -14
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-P2OBK5HK.mjs → intent-resolver-2NFDKRFG.mjs} +21 -18
- package/dist/lib/browser/intent-resolver-2NFDKRFG.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-PO64J7ML.mjs → react-root-JTWYCDJT.mjs} +11 -11
- package/dist/lib/browser/react-root-JTWYCDJT.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-E45YOVF5.mjs → react-surface-PZKJ73JS.mjs} +13 -13
- package/dist/lib/browser/react-surface-PZKJ73JS.mjs.map +7 -0
- package/dist/lib/browser/{settings-6AJZPZPM.mjs → settings-JK7UIZSB.mjs} +5 -5
- package/dist/lib/browser/{settings-6AJZPZPM.mjs.map → settings-JK7UIZSB.mjs.map} +2 -2
- package/dist/lib/browser/state-IFKFOBBX.mjs +12 -0
- package/dist/lib/browser/toolkit-L7C3UAEU.mjs +63 -0
- package/dist/lib/browser/toolkit-L7C3UAEU.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/browser/{url-handler-7L7M6IKH.mjs → url-handler-MRYBE3HF.mjs} +7 -7
- package/dist/lib/browser/url-handler-MRYBE3HF.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/state.d.ts +2 -2
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts +6 -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.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 +85 -5
- package/dist/types/src/components/Plank/Plank.stories.d.ts.map +1 -1
- package/dist/types/src/components/Plank/PlankError.d.ts.map +1 -1
- package/dist/types/src/components/Plank/PlankHeading.d.ts +1 -1
- package/dist/types/src/components/Plank/PlankHeading.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +1 -1
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
- package/dist/types/src/hooks/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 +1 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +3 -3
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +45 -41
- package/src/DeckPlugin.ts +64 -59
- package/src/capabilities/app-graph-builder.ts +13 -11
- package/src/capabilities/capabilities.ts +3 -3
- package/src/capabilities/check-app-scheme.ts +3 -3
- package/src/capabilities/index.ts +2 -1
- package/src/capabilities/intent-resolver.ts +21 -17
- package/src/capabilities/react-root.tsx +4 -3
- package/src/capabilities/react-surface.tsx +5 -5
- package/src/capabilities/settings.ts +1 -1
- package/src/capabilities/state.ts +6 -5
- package/src/capabilities/toolkit.ts +57 -0
- package/src/capabilities/tools.ts +10 -7
- package/src/capabilities/url-handler.ts +3 -2
- package/src/components/DeckLayout/Banner.tsx +3 -3
- package/src/components/DeckLayout/ContentEmpty.tsx +1 -1
- package/src/components/DeckLayout/DeckLayout.tsx +16 -15
- package/src/components/DeckLayout/Fallback.tsx +2 -2
- package/src/components/DeckLayout/Toast.tsx +2 -2
- package/src/components/DeckSettings/DeckSettings.tsx +74 -65
- package/src/components/Plank/Plank.stories.tsx +9 -10
- package/src/components/Plank/Plank.tsx +12 -13
- package/src/components/Plank/PlankControls.tsx +3 -3
- package/src/components/Plank/PlankError.tsx +3 -2
- package/src/components/Plank/PlankHeading.tsx +10 -9
- package/src/components/Sidebar/ComplementarySidebar.tsx +9 -8
- package/src/components/Sidebar/Sidebar.tsx +2 -2
- package/src/components/Sidebar/SidebarButton.tsx +6 -6
- package/src/events.ts +2 -2
- package/src/hooks/useDeckCompanions.ts +2 -2
- package/src/hooks/useHoistStatusbar.ts +2 -2
- package/src/hooks/useNodeActionExpander.ts +1 -1
- package/src/meta.ts +1 -3
- package/src/translations.ts +1 -0
- package/src/types/schema.ts +3 -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-IFKFOBBX.mjs.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
useHoistStatusbar,
|
|
7
7
|
useMainSize,
|
|
8
8
|
useNodeActionExpander
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YRDCQS7E.mjs";
|
|
10
10
|
import {
|
|
11
11
|
calculateOverscroll,
|
|
12
12
|
layoutAppliesTopbar,
|
|
@@ -14,17 +14,17 @@ import {
|
|
|
14
14
|
} from "./chunk-CNTGBCMK.mjs";
|
|
15
15
|
import {
|
|
16
16
|
DeckCapabilities
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HUWUYTOI.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-A4SRCSJX.mjs";
|
|
25
25
|
import {
|
|
26
|
-
|
|
27
|
-
} from "./chunk-
|
|
26
|
+
meta
|
|
27
|
+
} from "./chunk-MHP4GPX5.mjs";
|
|
28
28
|
|
|
29
29
|
// src/components/DeckLayout/Banner.tsx
|
|
30
30
|
import { useSignals as _useSignals9 } from "@preact-signals/safe-react/tracking";
|
|
@@ -37,94 +37,13 @@ import { mx as mx4 } from "@dxos/react-ui-theme";
|
|
|
37
37
|
import { useSignals as _useSignals7 } from "@preact-signals/safe-react/tracking";
|
|
38
38
|
import React7, { Fragment as Fragment2, useCallback as useCallback5, useEffect as useEffect3, useMemo as useMemo3, useState as useState2 } from "react";
|
|
39
39
|
import { LayoutAction as LayoutAction4, Surface as Surface3, createIntent as createIntent5, useCapability as useCapability3, useIntentDispatcher as useIntentDispatcher5 } from "@dxos/app-framework";
|
|
40
|
-
import {
|
|
40
|
+
import { IconButton as IconButton4, Main, toLocalizedString as toLocalizedString2, useTranslation as useTranslation5 } from "@dxos/react-ui";
|
|
41
41
|
import { Tabs } from "@dxos/react-ui-tabs";
|
|
42
42
|
|
|
43
|
-
// src/components/Sidebar/SidebarButton.tsx
|
|
44
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
45
|
-
import React, { useCallback } from "react";
|
|
46
|
-
import { createIntent, LayoutAction, useCapability, useIntentDispatcher } from "@dxos/app-framework";
|
|
47
|
-
import { IconButton, useTranslation } from "@dxos/react-ui";
|
|
48
|
-
var ToggleSidebarButton = ({ classNames, variant = "ghost" }) => {
|
|
49
|
-
var _effect = _useSignals();
|
|
50
|
-
try {
|
|
51
|
-
const layoutContext = useCapability(DeckCapabilities.MutableDeckState);
|
|
52
|
-
const { t } = useTranslation(DECK_PLUGIN);
|
|
53
|
-
return /* @__PURE__ */ React.createElement(IconButton, {
|
|
54
|
-
variant,
|
|
55
|
-
iconOnly: true,
|
|
56
|
-
icon: "ph--sidebar--regular",
|
|
57
|
-
size: 4,
|
|
58
|
-
label: t("open navigation sidebar label"),
|
|
59
|
-
onClick: () => layoutContext.sidebarState = layoutContext.sidebarState === "expanded" ? "collapsed" : "expanded",
|
|
60
|
-
classNames
|
|
61
|
-
});
|
|
62
|
-
} finally {
|
|
63
|
-
_effect.f();
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
var CloseSidebarButton = () => {
|
|
67
|
-
var _effect = _useSignals();
|
|
68
|
-
try {
|
|
69
|
-
const layoutContext = useCapability(DeckCapabilities.MutableDeckState);
|
|
70
|
-
const { t } = useTranslation(DECK_PLUGIN);
|
|
71
|
-
return /* @__PURE__ */ React.createElement(IconButton, {
|
|
72
|
-
variant: "ghost",
|
|
73
|
-
iconOnly: true,
|
|
74
|
-
icon: "ph--caret-line-left--regular",
|
|
75
|
-
size: 4,
|
|
76
|
-
label: t("close navigation sidebar label"),
|
|
77
|
-
onClick: () => layoutContext.sidebarState = "collapsed",
|
|
78
|
-
classNames: "rounded-none pli-1 dx-focus-ring-inset pie-[max(.5rem,env(safe-area-inset-left))]"
|
|
79
|
-
});
|
|
80
|
-
} finally {
|
|
81
|
-
_effect.f();
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
var ToggleComplementarySidebarButton = ({ inR0, classNames, current }) => {
|
|
85
|
-
var _effect = _useSignals();
|
|
86
|
-
try {
|
|
87
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
88
|
-
const layoutContext = useCapability(DeckCapabilities.MutableDeckState);
|
|
89
|
-
const { t } = useTranslation(DECK_PLUGIN);
|
|
90
|
-
const companions = useDeckCompanions();
|
|
91
|
-
const handleClick = useCallback(async () => {
|
|
92
|
-
layoutContext.complementarySidebarState = layoutContext.complementarySidebarState === "expanded" ? "collapsed" : "expanded";
|
|
93
|
-
const firstCompanion = companions[0];
|
|
94
|
-
if (layoutContext.complementarySidebarState === "expanded" && !current && firstCompanion) {
|
|
95
|
-
await dispatch(createIntent(LayoutAction.UpdateComplementary, {
|
|
96
|
-
part: "complementary",
|
|
97
|
-
subject: getCompanionId(firstCompanion.id)
|
|
98
|
-
}));
|
|
99
|
-
}
|
|
100
|
-
}, [
|
|
101
|
-
layoutContext,
|
|
102
|
-
current,
|
|
103
|
-
companions,
|
|
104
|
-
dispatch
|
|
105
|
-
]);
|
|
106
|
-
return /* @__PURE__ */ React.createElement(IconButton, {
|
|
107
|
-
iconOnly: true,
|
|
108
|
-
onClick: handleClick,
|
|
109
|
-
variant: "ghost",
|
|
110
|
-
label: t("open complementary sidebar label"),
|
|
111
|
-
classNames: [
|
|
112
|
-
"[&>svg]:-scale-x-100",
|
|
113
|
-
classNames
|
|
114
|
-
],
|
|
115
|
-
icon: "ph--sidebar-simple--regular",
|
|
116
|
-
size: inR0 ? 5 : 4,
|
|
117
|
-
tooltipSide: inR0 ? "left" : void 0
|
|
118
|
-
});
|
|
119
|
-
} finally {
|
|
120
|
-
_effect.f();
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
|
|
124
43
|
// src/components/Plank/Plank.tsx
|
|
125
|
-
import { useSignals as
|
|
126
|
-
import
|
|
127
|
-
import { LayoutAction as
|
|
44
|
+
import { useSignals as _useSignals5 } from "@preact-signals/safe-react/tracking";
|
|
45
|
+
import React5, { memo as memo2, useCallback as useCallback3, useLayoutEffect, useMemo as useMemo2, useRef } from "react";
|
|
46
|
+
import { LayoutAction as LayoutAction2, Surface as Surface2, createIntent as createIntent3, useAppGraph as useAppGraph2, useCapability, useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework";
|
|
128
47
|
import { debounce } from "@dxos/async";
|
|
129
48
|
import { useNode } from "@dxos/plugin-graph";
|
|
130
49
|
import { ATTENDABLE_PATH_SEPARATOR, useAttentionAttributes } from "@dxos/react-ui-attention";
|
|
@@ -132,31 +51,38 @@ import { StackItem as StackItem2, railGridHorizontal } from "@dxos/react-ui-stac
|
|
|
132
51
|
import { mainIntrinsicSize, mx as mx3 } from "@dxos/react-ui-theme";
|
|
133
52
|
|
|
134
53
|
// src/components/Plank/PlankError.tsx
|
|
135
|
-
import { useSignals as
|
|
136
|
-
import
|
|
137
|
-
import { useTranslation as
|
|
54
|
+
import { useSignals as _useSignals4 } from "@preact-signals/safe-react/tracking";
|
|
55
|
+
import React4, { useEffect as useEffect2, useState } from "react";
|
|
56
|
+
import { useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
138
57
|
import { descriptionMessage, mx as mx2 } from "@dxos/react-ui-theme";
|
|
139
58
|
|
|
140
59
|
// src/components/Plank/PlankHeading.tsx
|
|
141
|
-
import { useSignals as
|
|
142
|
-
import
|
|
143
|
-
import {
|
|
144
|
-
import { Icon, IconButton as
|
|
60
|
+
import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
|
|
61
|
+
import React2, { Fragment, memo, useCallback as useCallback2, useEffect, useMemo } from "react";
|
|
62
|
+
import { LayoutAction, Surface, createIntent as createIntent2, useAppGraph, useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework";
|
|
63
|
+
import { Icon, IconButton as IconButton2, Popover, toLocalizedString, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
145
64
|
import { StackItem } from "@dxos/react-ui-stack";
|
|
146
65
|
import { TextTooltip } from "@dxos/react-ui-text-tooltip";
|
|
147
66
|
import { hoverableControls, hoverableFocusedWithinControls } from "@dxos/react-ui-theme";
|
|
148
67
|
|
|
68
|
+
// src/components/fragments.ts
|
|
69
|
+
import { mx } from "@dxos/react-ui-theme";
|
|
70
|
+
var soloInlinePadding = "pis-[calc(env(safe-area-inset-left)+.25rem)] pie-[calc(env(safe-area-inset-left)+.25rem)]";
|
|
71
|
+
var sidebarToggleStyles = "bs-[--rail-item] is-[--rail-item] absolute block-end-2 z-[1] !bg-deckSurface lg:hidden";
|
|
72
|
+
var fixedSidebarToggleStyles = mx(sidebarToggleStyles, "inline-start-2");
|
|
73
|
+
var fixedComplementarySidebarToggleStyles = mx(sidebarToggleStyles, "inline-end-2");
|
|
74
|
+
|
|
149
75
|
// src/components/Plank/PlankControls.tsx
|
|
150
|
-
import { useSignals as
|
|
151
|
-
import
|
|
152
|
-
import { createIntent
|
|
76
|
+
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
77
|
+
import React, { forwardRef, useCallback } from "react";
|
|
78
|
+
import { createIntent, useIntentDispatcher } from "@dxos/app-framework";
|
|
153
79
|
import { invariant } from "@dxos/invariant";
|
|
154
|
-
import { ButtonGroup, IconButton
|
|
80
|
+
import { ButtonGroup, IconButton, useTranslation } from "@dxos/react-ui";
|
|
155
81
|
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-deck/src/components/Plank/PlankControls.tsx";
|
|
156
82
|
var PlankControl = ({ icon, label: label3, ...props }) => {
|
|
157
|
-
var _effect =
|
|
83
|
+
var _effect = _useSignals();
|
|
158
84
|
try {
|
|
159
|
-
return /* @__PURE__ */
|
|
85
|
+
return /* @__PURE__ */ React.createElement(IconButton, {
|
|
160
86
|
iconOnly: true,
|
|
161
87
|
label: label3,
|
|
162
88
|
icon,
|
|
@@ -171,11 +97,11 @@ var PlankControl = ({ icon, label: label3, ...props }) => {
|
|
|
171
97
|
};
|
|
172
98
|
var plankControlSpacing = "pli-2";
|
|
173
99
|
var PlankCompanionControls = /* @__PURE__ */ forwardRef(({ primary }, forwardedRef) => {
|
|
174
|
-
var _effect =
|
|
100
|
+
var _effect = _useSignals();
|
|
175
101
|
try {
|
|
176
|
-
const { t } =
|
|
177
|
-
const { dispatchPromise: dispatch } =
|
|
178
|
-
const handleCloseCompanion =
|
|
102
|
+
const { t } = useTranslation(meta.id);
|
|
103
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
104
|
+
const handleCloseCompanion = useCallback(() => {
|
|
179
105
|
invariant(primary, void 0, {
|
|
180
106
|
F: __dxlog_file,
|
|
181
107
|
L: 49,
|
|
@@ -185,15 +111,15 @@ var PlankCompanionControls = /* @__PURE__ */ forwardRef(({ primary }, forwardedR
|
|
|
185
111
|
""
|
|
186
112
|
]
|
|
187
113
|
});
|
|
188
|
-
return dispatch(
|
|
114
|
+
return dispatch(createIntent(DeckAction.ChangeCompanion, {
|
|
189
115
|
primary,
|
|
190
116
|
companion: null
|
|
191
117
|
}));
|
|
192
118
|
}, []);
|
|
193
|
-
return /* @__PURE__ */
|
|
119
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
194
120
|
ref: forwardedRef,
|
|
195
121
|
className: "contents app-no-drag"
|
|
196
|
-
}, /* @__PURE__ */
|
|
122
|
+
}, /* @__PURE__ */ React.createElement(PlankControl, {
|
|
197
123
|
label: t("close companion label"),
|
|
198
124
|
variant: "ghost",
|
|
199
125
|
icon: "ph--x--regular",
|
|
@@ -205,52 +131,52 @@ var PlankCompanionControls = /* @__PURE__ */ forwardRef(({ primary }, forwardedR
|
|
|
205
131
|
}
|
|
206
132
|
});
|
|
207
133
|
var PlankControls = /* @__PURE__ */ forwardRef(({ children, classNames, variant = "default", capabilities, layoutMode, pin, close = false, onClick, ...props }, forwardedRef) => {
|
|
208
|
-
var _effect =
|
|
134
|
+
var _effect = _useSignals();
|
|
209
135
|
try {
|
|
210
|
-
const { t } =
|
|
136
|
+
const { t } = useTranslation(meta.id);
|
|
211
137
|
const buttonClassNames = variant === "hide-disabled" ? `disabled:hidden ${plankControlSpacing}` : plankControlSpacing;
|
|
212
138
|
const layoutIsAnySolo = !!layoutMode?.startsWith("solo");
|
|
213
|
-
return /* @__PURE__ */
|
|
139
|
+
return /* @__PURE__ */ React.createElement(ButtonGroup, {
|
|
214
140
|
...props,
|
|
215
141
|
classNames: [
|
|
216
142
|
"app-no-drag !opacity-100",
|
|
217
143
|
classNames
|
|
218
144
|
],
|
|
219
145
|
ref: forwardedRef
|
|
220
|
-
}, capabilities.deck ? /* @__PURE__ */
|
|
146
|
+
}, capabilities.deck ? /* @__PURE__ */ React.createElement(React.Fragment, null, capabilities.solo && /* @__PURE__ */ React.createElement(React.Fragment, null, layoutMode === "solo" && /* @__PURE__ */ React.createElement(PlankControl, {
|
|
221
147
|
label: t("show fullscreen plank label"),
|
|
222
148
|
classNames: buttonClassNames,
|
|
223
149
|
icon: "ph--corners-out--regular",
|
|
224
150
|
onClick: () => onClick?.("solo--fullscreen")
|
|
225
|
-
}), /* @__PURE__ */
|
|
151
|
+
}), /* @__PURE__ */ React.createElement(PlankControl, {
|
|
226
152
|
label: t(layoutMode === "solo--fullscreen" ? "exit fullscreen label" : layoutIsAnySolo ? "show deck plank label" : "show solo plank label"),
|
|
227
153
|
classNames: buttonClassNames,
|
|
228
154
|
icon: layoutMode === "solo--fullscreen" ? "ph--corners-in--regular" : layoutIsAnySolo ? "ph--arrows-in-line-horizontal--regular" : "ph--arrows-out-line-horizontal--regular",
|
|
229
155
|
onClick: () => onClick?.(layoutMode === "solo--fullscreen" ? "solo--fullscreen" : "solo")
|
|
230
|
-
})), !layoutIsAnySolo && /* @__PURE__ */
|
|
156
|
+
})), !layoutIsAnySolo && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(PlankControl, {
|
|
231
157
|
label: t("increment start label"),
|
|
232
158
|
disabled: !capabilities.incrementStart,
|
|
233
159
|
classNames: buttonClassNames,
|
|
234
160
|
icon: "ph--caret-left--regular",
|
|
235
161
|
onClick: () => onClick?.("increment-start")
|
|
236
|
-
}), /* @__PURE__ */
|
|
162
|
+
}), /* @__PURE__ */ React.createElement(PlankControl, {
|
|
237
163
|
label: t("increment end label"),
|
|
238
164
|
disabled: !capabilities.incrementEnd,
|
|
239
165
|
classNames: buttonClassNames,
|
|
240
166
|
icon: "ph--caret-right--regular",
|
|
241
167
|
onClick: () => onClick?.("increment-end")
|
|
242
|
-
}))) : capabilities.fullscreen && /* @__PURE__ */
|
|
168
|
+
}))) : capabilities.fullscreen && /* @__PURE__ */ React.createElement(PlankControl, {
|
|
243
169
|
label: t(layoutMode === "solo--fullscreen" ? "exit fullscreen label" : "show fullscreen plank label"),
|
|
244
170
|
classNames: buttonClassNames,
|
|
245
171
|
icon: layoutMode === "solo--fullscreen" ? "ph--corners-in--regular" : "ph--corners-out--regular",
|
|
246
172
|
onClick: () => onClick?.("solo--fullscreen")
|
|
247
|
-
}), close && !layoutIsAnySolo && /* @__PURE__ */
|
|
173
|
+
}), close && !layoutIsAnySolo && /* @__PURE__ */ React.createElement(PlankControl, {
|
|
248
174
|
label: t(`${typeof close === "string" ? "minify" : "close"} label`),
|
|
249
175
|
classNames: buttonClassNames,
|
|
250
176
|
"data-testid": "plankHeading.close",
|
|
251
177
|
icon: close === "minify-start" ? "ph--caret-line-left--regular" : close === "minify-end" ? "ph--caret-line-right--regular" : "ph--x--regular",
|
|
252
178
|
onClick: () => onClick?.("close")
|
|
253
|
-
}), capabilities.companion && /* @__PURE__ */
|
|
179
|
+
}), capabilities.companion && /* @__PURE__ */ React.createElement(PlankControl, {
|
|
254
180
|
label: t("open companion label"),
|
|
255
181
|
classNames: buttonClassNames,
|
|
256
182
|
"data-testid": "plankHeading.companion",
|
|
@@ -262,27 +188,20 @@ var PlankControls = /* @__PURE__ */ forwardRef(({ children, classNames, variant
|
|
|
262
188
|
}
|
|
263
189
|
});
|
|
264
190
|
|
|
265
|
-
// src/components/fragments.ts
|
|
266
|
-
import { mx } from "@dxos/react-ui-theme";
|
|
267
|
-
var soloInlinePadding = "pis-[calc(env(safe-area-inset-left)+.25rem)] pie-[calc(env(safe-area-inset-left)+.25rem)]";
|
|
268
|
-
var sidebarToggleStyles = "bs-[--rail-item] is-[--rail-item] absolute block-end-2 z-[1] !bg-deckSurface lg:hidden";
|
|
269
|
-
var fixedSidebarToggleStyles = mx(sidebarToggleStyles, "inline-start-2");
|
|
270
|
-
var fixedComplementarySidebarToggleStyles = mx(sidebarToggleStyles, "inline-end-2");
|
|
271
|
-
|
|
272
191
|
// src/components/Plank/PlankHeading.tsx
|
|
273
192
|
var MAX_COMPANIONS = 5;
|
|
274
193
|
var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncrementStart, canIncrementEnd, popoverAnchorId, primaryId, pending, companioned, companions, layoutMode, actions = [] }) => {
|
|
275
|
-
var _effect =
|
|
194
|
+
var _effect = _useSignals2();
|
|
276
195
|
try {
|
|
277
|
-
const { t } =
|
|
278
|
-
const { dispatchPromise: dispatch } =
|
|
196
|
+
const { t } = useTranslation2(meta.id);
|
|
197
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher2();
|
|
279
198
|
const { graph } = useAppGraph();
|
|
280
199
|
const breakpoint = useBreakpoints();
|
|
281
200
|
const icon = node?.properties?.icon ?? "ph--placeholder--regular";
|
|
282
201
|
const label3 = pending ? t("pending heading") : toLocalizedString(node?.properties?.label ?? [
|
|
283
202
|
"plank heading fallback label",
|
|
284
203
|
{
|
|
285
|
-
ns:
|
|
204
|
+
ns: meta.id
|
|
286
205
|
}
|
|
287
206
|
], t);
|
|
288
207
|
const isCompanionNode = node?.type === PLANK_COMPANION_TYPE;
|
|
@@ -335,30 +254,30 @@ var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncre
|
|
|
335
254
|
variant,
|
|
336
255
|
graph
|
|
337
256
|
]);
|
|
338
|
-
const handleAction =
|
|
257
|
+
const handleAction = useCallback2((action) => {
|
|
339
258
|
typeof action.data === "function" && void action.data?.({
|
|
340
259
|
parent: node,
|
|
341
|
-
caller:
|
|
260
|
+
caller: meta.id
|
|
342
261
|
});
|
|
343
262
|
}, [
|
|
344
263
|
node
|
|
345
264
|
]);
|
|
346
|
-
const handlePlankAction =
|
|
265
|
+
const handlePlankAction = useCallback2((eventType) => {
|
|
347
266
|
if (eventType.startsWith("solo")) {
|
|
348
|
-
return dispatch(
|
|
267
|
+
return dispatch(createIntent2(DeckAction.Adjust, {
|
|
349
268
|
type: eventType,
|
|
350
269
|
id
|
|
351
270
|
}));
|
|
352
271
|
} else if (eventType === "close") {
|
|
353
272
|
if (part === "complementary") {
|
|
354
|
-
return dispatch(
|
|
273
|
+
return dispatch(createIntent2(LayoutAction.UpdateComplementary, {
|
|
355
274
|
part: "complementary",
|
|
356
275
|
options: {
|
|
357
276
|
state: "collapsed"
|
|
358
277
|
}
|
|
359
278
|
}));
|
|
360
279
|
} else {
|
|
361
|
-
return dispatch(
|
|
280
|
+
return dispatch(createIntent2(LayoutAction.Close, {
|
|
362
281
|
part: "main",
|
|
363
282
|
subject: [
|
|
364
283
|
id
|
|
@@ -369,7 +288,7 @@ var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncre
|
|
|
369
288
|
}));
|
|
370
289
|
}
|
|
371
290
|
} else {
|
|
372
|
-
return dispatch(
|
|
291
|
+
return dispatch(createIntent2(DeckAction.Adjust, {
|
|
373
292
|
type: eventType,
|
|
374
293
|
id
|
|
375
294
|
}));
|
|
@@ -379,12 +298,12 @@ var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncre
|
|
|
379
298
|
id,
|
|
380
299
|
part
|
|
381
300
|
]);
|
|
382
|
-
const ActionRoot = node && popoverAnchorId === `dxos.org/ui/${
|
|
383
|
-
const handleTabClick =
|
|
301
|
+
const ActionRoot = node && popoverAnchorId === `dxos.org/ui/${meta.id}/${node.id}` ? Popover.Anchor : Fragment;
|
|
302
|
+
const handleTabClick = useCallback2((event) => {
|
|
384
303
|
const target = event.target.closest("[data-id]");
|
|
385
304
|
const tabId = target?.dataset?.id;
|
|
386
305
|
if (primaryId && tabId) {
|
|
387
|
-
void dispatch(
|
|
306
|
+
void dispatch(createIntent2(DeckAction.ChangeCompanion, {
|
|
388
307
|
primary: primaryId,
|
|
389
308
|
companion: tabId
|
|
390
309
|
}));
|
|
@@ -392,7 +311,7 @@ var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncre
|
|
|
392
311
|
}, [
|
|
393
312
|
primaryId
|
|
394
313
|
]);
|
|
395
|
-
return /* @__PURE__ */
|
|
314
|
+
return /* @__PURE__ */ React2.createElement(StackItem.Heading, {
|
|
396
315
|
classNames: [
|
|
397
316
|
"plb-1 items-stretch gap-1 sticky inline-start-12 app-drag min-is-0 contain-layout density-coarse",
|
|
398
317
|
part === "solo" ? soloInlinePadding : "pli-1",
|
|
@@ -405,10 +324,10 @@ var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncre
|
|
|
405
324
|
"data-plank-heading": true
|
|
406
325
|
}, companions && isCompanionNode ? (
|
|
407
326
|
/* TODO(thure): IMPORTANT: This is a tablist; it should be implemented as such. */
|
|
408
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ React2.createElement("div", {
|
|
409
328
|
role: "none",
|
|
410
329
|
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__ */
|
|
330
|
+
}, companions.map(({ id: id2, properties: { icon: icon2, label: label4 } }) => /* @__PURE__ */ React2.createElement(IconButton2, {
|
|
412
331
|
key: id2,
|
|
413
332
|
"data-id": id2,
|
|
414
333
|
icon: icon2,
|
|
@@ -418,40 +337,40 @@ var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncre
|
|
|
418
337
|
variant: node?.id === id2 ? "primary" : "ghost",
|
|
419
338
|
onClick: handleTabClick
|
|
420
339
|
})))
|
|
421
|
-
) : /* @__PURE__ */
|
|
340
|
+
) : /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(ActionRoot, null, node && sigilActions ? /* @__PURE__ */ React2.createElement(StackItem.Sigil, {
|
|
422
341
|
icon,
|
|
423
342
|
related: part === "complementary",
|
|
424
343
|
attendableId,
|
|
425
344
|
triggerLabel: t("actions menu label"),
|
|
426
345
|
actions: sigilActions,
|
|
427
346
|
onAction: handleAction
|
|
428
|
-
}, /* @__PURE__ */
|
|
347
|
+
}, /* @__PURE__ */ React2.createElement(Surface, {
|
|
429
348
|
role: "menu-footer",
|
|
430
349
|
data: {
|
|
431
350
|
subject: node.data
|
|
432
351
|
}
|
|
433
|
-
})) : /* @__PURE__ */
|
|
352
|
+
})) : /* @__PURE__ */ React2.createElement(StackItem.SigilButton, null, /* @__PURE__ */ React2.createElement("span", {
|
|
434
353
|
className: "sr-only"
|
|
435
|
-
}, label3), /* @__PURE__ */
|
|
354
|
+
}, label3), /* @__PURE__ */ React2.createElement(Icon, {
|
|
436
355
|
icon,
|
|
437
356
|
size: 5
|
|
438
|
-
}))), /* @__PURE__ */
|
|
357
|
+
}))), /* @__PURE__ */ React2.createElement(TextTooltip, {
|
|
439
358
|
text: label3,
|
|
440
359
|
onlyWhenTruncating: true
|
|
441
|
-
}, /* @__PURE__ */
|
|
360
|
+
}, /* @__PURE__ */ React2.createElement(StackItem.HeadingLabel, {
|
|
442
361
|
attendableId,
|
|
443
362
|
related: part === "complementary",
|
|
444
363
|
...pending && {
|
|
445
364
|
classNames: "text-description"
|
|
446
365
|
}
|
|
447
|
-
}, label3))), node && part !== "complementary" && /* @__PURE__ */
|
|
366
|
+
}, label3))), node && part !== "complementary" && /* @__PURE__ */ React2.createElement(Surface, {
|
|
448
367
|
role: "navbar-end",
|
|
449
368
|
data: {
|
|
450
369
|
subject: node.data
|
|
451
370
|
}
|
|
452
|
-
}), companioned === "companion" ? /* @__PURE__ */
|
|
371
|
+
}), companioned === "companion" ? /* @__PURE__ */ React2.createElement(PlankCompanionControls, {
|
|
453
372
|
primary: primaryId
|
|
454
|
-
}) : /* @__PURE__ */
|
|
373
|
+
}) : /* @__PURE__ */ React2.createElement(PlankControls, {
|
|
455
374
|
capabilities,
|
|
456
375
|
layoutMode,
|
|
457
376
|
close: part === "complementary" ? "minify-end" : true,
|
|
@@ -463,12 +382,12 @@ var PlankHeading = /* @__PURE__ */ memo(({ id, part, node, deckEnabled, canIncre
|
|
|
463
382
|
});
|
|
464
383
|
|
|
465
384
|
// src/components/Plank/PlankLoading.tsx
|
|
466
|
-
import { useSignals as
|
|
467
|
-
import
|
|
385
|
+
import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
|
|
386
|
+
import React3 from "react";
|
|
468
387
|
var PlankLoading = () => {
|
|
469
|
-
var _effect =
|
|
388
|
+
var _effect = _useSignals3();
|
|
470
389
|
try {
|
|
471
|
-
return /* @__PURE__ */
|
|
390
|
+
return /* @__PURE__ */ React3.createElement("div", {
|
|
472
391
|
role: "none",
|
|
473
392
|
className: "grid place-items-center attention-surface"
|
|
474
393
|
});
|
|
@@ -479,14 +398,14 @@ var PlankLoading = () => {
|
|
|
479
398
|
|
|
480
399
|
// src/components/Plank/PlankError.tsx
|
|
481
400
|
var PlankContentError = ({ error }) => {
|
|
482
|
-
var _effect =
|
|
401
|
+
var _effect = _useSignals4();
|
|
483
402
|
try {
|
|
484
|
-
const { t } =
|
|
403
|
+
const { t } = useTranslation3(meta.id);
|
|
485
404
|
const errorString = error?.toString() ?? "";
|
|
486
|
-
return /* @__PURE__ */
|
|
405
|
+
return /* @__PURE__ */ React4.createElement("div", {
|
|
487
406
|
role: "none",
|
|
488
407
|
className: "overflow-y-auto p-8 attention-surface grid place-items-center"
|
|
489
|
-
}, /* @__PURE__ */
|
|
408
|
+
}, /* @__PURE__ */ React4.createElement("p", {
|
|
490
409
|
role: "alert",
|
|
491
410
|
className: mx2(descriptionMessage, "break-all rounded-md p-4")
|
|
492
411
|
}, error ? errorString : t("error fallback message")));
|
|
@@ -495,20 +414,20 @@ var PlankContentError = ({ error }) => {
|
|
|
495
414
|
}
|
|
496
415
|
};
|
|
497
416
|
var PlankError = ({ id, part, node, error }) => {
|
|
498
|
-
var _effect =
|
|
417
|
+
var _effect = _useSignals4();
|
|
499
418
|
try {
|
|
500
419
|
const [timedOut, setTimedOut] = useState(false);
|
|
501
420
|
useEffect2(() => {
|
|
502
421
|
setTimeout(() => setTimedOut(true), 5e3);
|
|
503
422
|
}, []);
|
|
504
|
-
return /* @__PURE__ */
|
|
423
|
+
return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(PlankHeading, {
|
|
505
424
|
id,
|
|
506
425
|
part,
|
|
507
426
|
node,
|
|
508
427
|
pending: !timedOut
|
|
509
|
-
}), timedOut ? /* @__PURE__ */
|
|
428
|
+
}), timedOut ? /* @__PURE__ */ React4.createElement(PlankContentError, {
|
|
510
429
|
error
|
|
511
|
-
}) : /* @__PURE__ */
|
|
430
|
+
}) : /* @__PURE__ */ React4.createElement(PlankLoading, null));
|
|
512
431
|
} finally {
|
|
513
432
|
_effect.f();
|
|
514
433
|
}
|
|
@@ -517,17 +436,17 @@ var PlankError = ({ id, part, node, error }) => {
|
|
|
517
436
|
// src/components/Plank/Plank.tsx
|
|
518
437
|
var UNKNOWN_ID = "unknown_id";
|
|
519
438
|
var Plank = /* @__PURE__ */ memo2(({ id = UNKNOWN_ID, companionId, ...props }) => {
|
|
520
|
-
var _effect =
|
|
439
|
+
var _effect = _useSignals5();
|
|
521
440
|
try {
|
|
522
441
|
const { graph } = useAppGraph2();
|
|
523
442
|
const node = useNode(graph, id);
|
|
524
443
|
const companions = useCompanions(id);
|
|
525
444
|
const currentCompanion = companions.find(({ id: id2 }) => id2 === companionId);
|
|
526
445
|
const hasCompanion = !!(companionId && currentCompanion);
|
|
527
|
-
return /* @__PURE__ */
|
|
446
|
+
return /* @__PURE__ */ React5.createElement(PlankContainer, {
|
|
528
447
|
solo: props.part === "solo",
|
|
529
448
|
companion: hasCompanion
|
|
530
|
-
}, /* @__PURE__ */
|
|
449
|
+
}, /* @__PURE__ */ React5.createElement(PlankComponent, {
|
|
531
450
|
id,
|
|
532
451
|
node,
|
|
533
452
|
companioned: hasCompanion ? "primary" : void 0,
|
|
@@ -536,7 +455,7 @@ var Plank = /* @__PURE__ */ memo2(({ id = UNKNOWN_ID, companionId, ...props }) =
|
|
|
536
455
|
...props.part === "solo" ? {
|
|
537
456
|
part: "solo-primary"
|
|
538
457
|
} : {}
|
|
539
|
-
}), hasCompanion && /* @__PURE__ */
|
|
458
|
+
}), hasCompanion && /* @__PURE__ */ React5.createElement(PlankComponent, {
|
|
540
459
|
id: companionId,
|
|
541
460
|
node: currentCompanion,
|
|
542
461
|
primary: node,
|
|
@@ -554,15 +473,15 @@ var Plank = /* @__PURE__ */ memo2(({ id = UNKNOWN_ID, companionId, ...props }) =
|
|
|
554
473
|
}
|
|
555
474
|
});
|
|
556
475
|
var PlankContainer = ({ children, solo, companion }) => {
|
|
557
|
-
var _effect =
|
|
476
|
+
var _effect = _useSignals5();
|
|
558
477
|
try {
|
|
559
478
|
const sizeAttrs = useMainSize();
|
|
560
479
|
if (!solo) {
|
|
561
480
|
return children;
|
|
562
481
|
}
|
|
563
|
-
return /* @__PURE__ */
|
|
482
|
+
return /* @__PURE__ */ React5.createElement("div", {
|
|
564
483
|
role: "none",
|
|
565
|
-
className: mx3("absolute inset-0 grid", companion && "grid-cols-[
|
|
484
|
+
className: mx3("absolute inset-0 grid", companion && "grid-cols-[6fr_4fr]", railGridHorizontal, mainIntrinsicSize),
|
|
566
485
|
...sizeAttrs
|
|
567
486
|
}, children);
|
|
568
487
|
} finally {
|
|
@@ -570,10 +489,10 @@ var PlankContainer = ({ children, solo, companion }) => {
|
|
|
570
489
|
}
|
|
571
490
|
};
|
|
572
491
|
var PlankComponent = /* @__PURE__ */ memo2(({ layoutMode, id, part, path, order, active, companioned, node, primary, companions, settings }) => {
|
|
573
|
-
var _effect =
|
|
492
|
+
var _effect = _useSignals5();
|
|
574
493
|
try {
|
|
575
|
-
const { dispatchPromise: dispatch } =
|
|
576
|
-
const { deck, popoverAnchorId, scrollIntoView } =
|
|
494
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher3();
|
|
495
|
+
const { deck, popoverAnchorId, scrollIntoView } = useCapability(DeckCapabilities.DeckState);
|
|
577
496
|
const canResize = layoutMode === "deck";
|
|
578
497
|
const attentionAttrs = useAttentionAttributes(primary?.id ?? id);
|
|
579
498
|
const index = active ? active.findIndex((entryId) => entryId === id) : 0;
|
|
@@ -584,8 +503,8 @@ var PlankComponent = /* @__PURE__ */ memo2(({ layoutMode, id, part, path, order,
|
|
|
584
503
|
const { variant } = parseEntryId(id);
|
|
585
504
|
const sizeKey = `${id.split("+")[0]}${variant ? `${ATTENDABLE_PATH_SEPARATOR}${variant}` : ""}`;
|
|
586
505
|
const size = deck.plankSizing[sizeKey];
|
|
587
|
-
const handleSizeChange =
|
|
588
|
-
return dispatch(
|
|
506
|
+
const handleSizeChange = useCallback3(debounce((nextSize) => {
|
|
507
|
+
return dispatch(createIntent3(DeckAction.UpdatePlankSize, {
|
|
589
508
|
id: sizeKey,
|
|
590
509
|
size: nextSize
|
|
591
510
|
}));
|
|
@@ -593,22 +512,18 @@ var PlankComponent = /* @__PURE__ */ memo2(({ layoutMode, id, part, path, order,
|
|
|
593
512
|
dispatch,
|
|
594
513
|
sizeKey
|
|
595
514
|
]);
|
|
596
|
-
const handleKeyDown =
|
|
515
|
+
const handleKeyDown = useCallback3((event) => {
|
|
597
516
|
if (event.target === event.currentTarget && event.key === "Escape") {
|
|
598
517
|
rootElement.current?.closest("main")?.focus();
|
|
599
518
|
}
|
|
600
519
|
}, []);
|
|
601
520
|
useLayoutEffect(() => {
|
|
602
521
|
if (scrollIntoView === id) {
|
|
603
|
-
|
|
604
|
-
focusable?.focus({
|
|
605
|
-
preventScroll: true
|
|
606
|
-
});
|
|
607
|
-
layoutMode === "deck" && focusable?.scrollIntoView({
|
|
522
|
+
layoutMode === "deck" && rootElement.current?.scrollIntoView({
|
|
608
523
|
behavior: "smooth",
|
|
609
524
|
inline: "center"
|
|
610
525
|
});
|
|
611
|
-
void dispatch(
|
|
526
|
+
void dispatch(createIntent3(LayoutAction2.ScrollIntoView, {
|
|
612
527
|
part: "current",
|
|
613
528
|
subject: void 0
|
|
614
529
|
}));
|
|
@@ -622,23 +537,26 @@ var PlankComponent = /* @__PURE__ */ memo2(({ layoutMode, id, part, path, order,
|
|
|
622
537
|
const isAttendable = layoutMode.startsWith("solo") && part.startsWith("solo") || layoutMode === "deck" && part === "deck";
|
|
623
538
|
const sizeAttrs = useMainSize();
|
|
624
539
|
const data = useMemo2(() => node && {
|
|
540
|
+
attendableId: id,
|
|
625
541
|
subject: node.data,
|
|
626
542
|
companionTo: primary?.data,
|
|
543
|
+
properties: node.properties,
|
|
627
544
|
variant,
|
|
628
545
|
path,
|
|
629
546
|
popoverAnchorId
|
|
630
547
|
}, [
|
|
631
548
|
node,
|
|
632
549
|
node?.data,
|
|
550
|
+
node?.properties,
|
|
633
551
|
path,
|
|
634
552
|
popoverAnchorId,
|
|
635
553
|
primary?.data,
|
|
636
554
|
variant
|
|
637
555
|
]);
|
|
638
|
-
const placeholder = useMemo2(() => /* @__PURE__ */
|
|
556
|
+
const placeholder = useMemo2(() => /* @__PURE__ */ React5.createElement(PlankLoading, null), []);
|
|
639
557
|
const Root = part.startsWith("solo") ? "article" : StackItem2.Root;
|
|
640
558
|
const className = mx3("attention-surface relative dx-focus-ring-inset-over-all density-coarse", isSolo && mainIntrinsicSize, isSolo && railGridHorizontal, isSolo && "absolute inset-0", part.startsWith("solo") && "grid", part === "deck" && (companioned === "companion" ? "!border-separator border-ie" : "!border-separator border-li"), part.startsWith("solo-") && "row-span-2 grid-rows-subgrid min-is-0", part === "solo-companion" && "!border-separator border-is");
|
|
641
|
-
return /* @__PURE__ */
|
|
559
|
+
return /* @__PURE__ */ React5.createElement(Root, {
|
|
642
560
|
ref: rootElement,
|
|
643
561
|
"data-testid": "deck.plank",
|
|
644
562
|
tabIndex: 0,
|
|
@@ -657,7 +575,7 @@ var PlankComponent = /* @__PURE__ */ memo2(({ layoutMode, id, part, path, order,
|
|
|
657
575
|
},
|
|
658
576
|
...isAttendable ? attentionAttrs : {},
|
|
659
577
|
onKeyDown: handleKeyDown
|
|
660
|
-
}, node ? /* @__PURE__ */
|
|
578
|
+
}, node ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(PlankHeading, {
|
|
661
579
|
id,
|
|
662
580
|
part: part.startsWith("solo-") ? "solo" : part,
|
|
663
581
|
node,
|
|
@@ -669,33 +587,114 @@ var PlankComponent = /* @__PURE__ */ memo2(({ layoutMode, id, part, path, order,
|
|
|
669
587
|
primaryId: primary?.id,
|
|
670
588
|
companioned,
|
|
671
589
|
companions
|
|
672
|
-
}), /* @__PURE__ */
|
|
590
|
+
}), /* @__PURE__ */ React5.createElement(Surface2, {
|
|
673
591
|
key: node.id,
|
|
674
592
|
role: "article",
|
|
675
593
|
data,
|
|
676
594
|
limit: 1,
|
|
677
595
|
fallback: PlankContentError,
|
|
678
596
|
placeholder
|
|
679
|
-
})) : /* @__PURE__ */
|
|
597
|
+
})) : /* @__PURE__ */ React5.createElement(PlankError, {
|
|
680
598
|
id,
|
|
681
599
|
part
|
|
682
|
-
}), canResize && /* @__PURE__ */
|
|
600
|
+
}), canResize && /* @__PURE__ */ React5.createElement(StackItem2.ResizeHandle, null));
|
|
683
601
|
} finally {
|
|
684
602
|
_effect.f();
|
|
685
603
|
}
|
|
686
604
|
});
|
|
687
605
|
|
|
606
|
+
// src/components/Sidebar/SidebarButton.tsx
|
|
607
|
+
import { useSignals as _useSignals6 } from "@preact-signals/safe-react/tracking";
|
|
608
|
+
import React6, { useCallback as useCallback4 } from "react";
|
|
609
|
+
import { LayoutAction as LayoutAction3, createIntent as createIntent4, useCapability as useCapability2, useIntentDispatcher as useIntentDispatcher4 } from "@dxos/app-framework";
|
|
610
|
+
import { IconButton as IconButton3, useTranslation as useTranslation4 } from "@dxos/react-ui";
|
|
611
|
+
var ToggleSidebarButton = ({ classNames, variant = "ghost" }) => {
|
|
612
|
+
var _effect = _useSignals6();
|
|
613
|
+
try {
|
|
614
|
+
const layoutContext = useCapability2(DeckCapabilities.MutableDeckState);
|
|
615
|
+
const { t } = useTranslation4(meta.id);
|
|
616
|
+
return /* @__PURE__ */ React6.createElement(IconButton3, {
|
|
617
|
+
variant,
|
|
618
|
+
iconOnly: true,
|
|
619
|
+
icon: "ph--sidebar--regular",
|
|
620
|
+
size: 4,
|
|
621
|
+
label: t("open navigation sidebar label"),
|
|
622
|
+
onClick: () => layoutContext.sidebarState = layoutContext.sidebarState === "expanded" ? "collapsed" : "expanded",
|
|
623
|
+
classNames
|
|
624
|
+
});
|
|
625
|
+
} finally {
|
|
626
|
+
_effect.f();
|
|
627
|
+
}
|
|
628
|
+
};
|
|
629
|
+
var CloseSidebarButton = () => {
|
|
630
|
+
var _effect = _useSignals6();
|
|
631
|
+
try {
|
|
632
|
+
const layoutContext = useCapability2(DeckCapabilities.MutableDeckState);
|
|
633
|
+
const { t } = useTranslation4(meta.id);
|
|
634
|
+
return /* @__PURE__ */ React6.createElement(IconButton3, {
|
|
635
|
+
variant: "ghost",
|
|
636
|
+
iconOnly: true,
|
|
637
|
+
icon: "ph--caret-line-left--regular",
|
|
638
|
+
size: 4,
|
|
639
|
+
label: t("close navigation sidebar label"),
|
|
640
|
+
onClick: () => layoutContext.sidebarState = "collapsed",
|
|
641
|
+
classNames: "rounded-none pli-1 dx-focus-ring-inset pie-[max(.5rem,env(safe-area-inset-left))]"
|
|
642
|
+
});
|
|
643
|
+
} finally {
|
|
644
|
+
_effect.f();
|
|
645
|
+
}
|
|
646
|
+
};
|
|
647
|
+
var ToggleComplementarySidebarButton = ({ inR0, classNames, current }) => {
|
|
648
|
+
var _effect = _useSignals6();
|
|
649
|
+
try {
|
|
650
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher4();
|
|
651
|
+
const layoutContext = useCapability2(DeckCapabilities.MutableDeckState);
|
|
652
|
+
const { t } = useTranslation4(meta.id);
|
|
653
|
+
const companions = useDeckCompanions();
|
|
654
|
+
const handleClick = useCallback4(async () => {
|
|
655
|
+
layoutContext.complementarySidebarState = layoutContext.complementarySidebarState === "expanded" ? "collapsed" : "expanded";
|
|
656
|
+
const firstCompanion = companions[0];
|
|
657
|
+
if (layoutContext.complementarySidebarState === "expanded" && !current && firstCompanion) {
|
|
658
|
+
await dispatch(createIntent4(LayoutAction3.UpdateComplementary, {
|
|
659
|
+
part: "complementary",
|
|
660
|
+
subject: getCompanionId(firstCompanion.id)
|
|
661
|
+
}));
|
|
662
|
+
}
|
|
663
|
+
}, [
|
|
664
|
+
layoutContext,
|
|
665
|
+
current,
|
|
666
|
+
companions,
|
|
667
|
+
dispatch
|
|
668
|
+
]);
|
|
669
|
+
return /* @__PURE__ */ React6.createElement(IconButton3, {
|
|
670
|
+
iconOnly: true,
|
|
671
|
+
onClick: handleClick,
|
|
672
|
+
variant: "ghost",
|
|
673
|
+
label: t("open complementary sidebar label"),
|
|
674
|
+
classNames: [
|
|
675
|
+
"[&>svg]:-scale-x-100",
|
|
676
|
+
classNames
|
|
677
|
+
],
|
|
678
|
+
icon: "ph--sidebar-simple--regular",
|
|
679
|
+
size: inR0 ? 5 : 4,
|
|
680
|
+
tooltipSide: inR0 ? "left" : void 0
|
|
681
|
+
});
|
|
682
|
+
} finally {
|
|
683
|
+
_effect.f();
|
|
684
|
+
}
|
|
685
|
+
};
|
|
686
|
+
|
|
688
687
|
// src/components/Sidebar/ComplementarySidebar.tsx
|
|
689
688
|
var label = [
|
|
690
689
|
"complementary sidebar title",
|
|
691
690
|
{
|
|
692
|
-
ns:
|
|
691
|
+
ns: meta.id
|
|
693
692
|
}
|
|
694
693
|
];
|
|
695
694
|
var ComplementarySidebar = ({ current }) => {
|
|
696
695
|
var _effect = _useSignals7();
|
|
697
696
|
try {
|
|
698
|
-
const { t } = useTranslation5(
|
|
697
|
+
const { t } = useTranslation5(meta.id);
|
|
699
698
|
const { dispatchPromise: dispatch } = useIntentDispatcher5();
|
|
700
699
|
const layout = useCapability3(DeckCapabilities.MutableDeckState);
|
|
701
700
|
const layoutMode = getMode(layout.deck);
|
|
@@ -791,7 +790,7 @@ var ComplementarySidebar = ({ current }) => {
|
|
|
791
790
|
value: getCompanionId(companion.id),
|
|
792
791
|
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
792
|
...layout.complementarySidebarState !== "expanded" && {
|
|
794
|
-
inert:
|
|
793
|
+
inert: true
|
|
795
794
|
}
|
|
796
795
|
}, /* @__PURE__ */ React7.createElement(ComplementarySidebarPanel, {
|
|
797
796
|
companion,
|
|
@@ -816,7 +815,7 @@ var ScrollArea = ({ children }) => {
|
|
|
816
815
|
var ComplementarySidebarPanel = ({ companion, activeId, data, hoistStatusbar }) => {
|
|
817
816
|
var _effect = _useSignals7();
|
|
818
817
|
try {
|
|
819
|
-
const { t } = useTranslation5(
|
|
818
|
+
const { t } = useTranslation5(meta.id);
|
|
820
819
|
if (getCompanionId(companion.id) !== activeId && !data) {
|
|
821
820
|
return null;
|
|
822
821
|
}
|
|
@@ -848,7 +847,7 @@ import { Main as Main2 } from "@dxos/react-ui";
|
|
|
848
847
|
var label2 = [
|
|
849
848
|
"sidebar title",
|
|
850
849
|
{
|
|
851
|
-
ns:
|
|
850
|
+
ns: meta.id
|
|
852
851
|
}
|
|
853
852
|
];
|
|
854
853
|
var Sidebar = () => {
|
|
@@ -891,7 +890,7 @@ var Sidebar = () => {
|
|
|
891
890
|
var Banner = ({ variant, classNames }) => {
|
|
892
891
|
var _effect = _useSignals9();
|
|
893
892
|
try {
|
|
894
|
-
const { t } = useTranslation6(
|
|
893
|
+
const { t } = useTranslation6(meta.id);
|
|
895
894
|
return /* @__PURE__ */ React9.createElement("header", {
|
|
896
895
|
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
896
|
}, variant === "sidebar" ? /* @__PURE__ */ React9.createElement(CloseSidebarButton, null) : /* @__PURE__ */ React9.createElement(ToggleSidebarButton, null), /* @__PURE__ */ React9.createElement("span", {
|
|
@@ -925,11 +924,11 @@ var Banner = ({ variant, classNames }) => {
|
|
|
925
924
|
// src/components/DeckLayout/DeckLayout.tsx
|
|
926
925
|
import { useSignals as _useSignals17 } from "@preact-signals/safe-react/tracking";
|
|
927
926
|
import { untracked } from "@preact/signals-core";
|
|
928
|
-
import React17, { useCallback as useCallback7, useEffect as useEffect5, useMemo as useMemo6, useRef as useRef3
|
|
927
|
+
import React17, { Fragment as Fragment3, useCallback as useCallback7, useEffect as useEffect5, useMemo as useMemo6, useRef as useRef3 } from "react";
|
|
929
928
|
import { Capabilities, LayoutAction as LayoutAction5, createIntent as createIntent6, useCapability as useCapability8, useIntentDispatcher as useIntentDispatcher6, usePluginManager } from "@dxos/app-framework";
|
|
930
929
|
import { AttentionCapabilities } from "@dxos/plugin-attention";
|
|
931
930
|
import { Main as Main3, useMediaQuery, useOnTransition } from "@dxos/react-ui";
|
|
932
|
-
import { Stack, StackContext
|
|
931
|
+
import { DEFAULT_HORIZONTAL_SIZE, Stack, StackContext } from "@dxos/react-ui-stack";
|
|
933
932
|
import { mainPaddingTransitions } from "@dxos/react-ui-theme";
|
|
934
933
|
|
|
935
934
|
// src/components/DeckLayout/ActiveNode.tsx
|
|
@@ -1151,7 +1150,7 @@ import { Button, Icon as Icon2, Toast as NaturalToast, toLocalizedString as toLo
|
|
|
1151
1150
|
var Toast = ({ id, title, description, icon, duration, actionLabel, actionAlt, closeLabel, onAction, onOpenChange }) => {
|
|
1152
1151
|
var _effect = _useSignals15();
|
|
1153
1152
|
try {
|
|
1154
|
-
const { t } = useTranslation7(
|
|
1153
|
+
const { t } = useTranslation7(meta.id);
|
|
1155
1154
|
return /* @__PURE__ */ React15.createElement(NaturalToast.Root, {
|
|
1156
1155
|
"data-testid": id,
|
|
1157
1156
|
defaultOpen: true,
|
|
@@ -1213,7 +1212,7 @@ var DeckLayout = ({ onDismissToast }) => {
|
|
|
1213
1212
|
var _effect = _useSignals17();
|
|
1214
1213
|
try {
|
|
1215
1214
|
const { dispatchPromise: dispatch } = useIntentDispatcher6();
|
|
1216
|
-
const settings = useCapability8(Capabilities.SettingsStore).getStore(
|
|
1215
|
+
const settings = useCapability8(Capabilities.SettingsStore).getStore(meta.id).value;
|
|
1217
1216
|
const context = useCapability8(DeckCapabilities.MutableDeckState);
|
|
1218
1217
|
const { sidebarState, complementarySidebarState, complementarySidebarPanel, deck, toasts } = context;
|
|
1219
1218
|
const { active, activeCompanions, fullscreen, solo, plankSizing } = deck;
|
|
@@ -1222,7 +1221,7 @@ var DeckLayout = ({ onDismissToast }) => {
|
|
|
1222
1221
|
const topbar = layoutAppliesTopbar(breakpoint, layoutMode);
|
|
1223
1222
|
const hoistStatusbar = useHoistStatusbar(breakpoint, layoutMode);
|
|
1224
1223
|
const pluginManager = usePluginManager();
|
|
1225
|
-
const scrollLeftRef = useRef3();
|
|
1224
|
+
const scrollLeftRef = useRef3(null);
|
|
1226
1225
|
const deckRef = useRef3(null);
|
|
1227
1226
|
useEffect5(() => {
|
|
1228
1227
|
const attended = untracked(() => {
|
|
@@ -1234,9 +1233,7 @@ var DeckLayout = ({ onDismissToast }) => {
|
|
|
1234
1233
|
document.querySelector(`article[data-attendable-id="${firstId}"] button`)?.focus();
|
|
1235
1234
|
}
|
|
1236
1235
|
}, []);
|
|
1237
|
-
const [isNotMobile] = useMediaQuery("md"
|
|
1238
|
-
ssr: false
|
|
1239
|
-
});
|
|
1236
|
+
const [isNotMobile] = useMediaQuery("md");
|
|
1240
1237
|
const shouldRevert = useRef3(false);
|
|
1241
1238
|
useEffect5(() => {
|
|
1242
1239
|
if (!isNotMobile && getMode(deck) === "deck") {
|
|
@@ -1360,7 +1357,7 @@ var DeckLayout = ({ onDismissToast }) => {
|
|
|
1360
1357
|
role: "none",
|
|
1361
1358
|
className: !solo ? "relative bg-deckSurface overflow-hidden" : "sr-only",
|
|
1362
1359
|
...solo && {
|
|
1363
|
-
inert:
|
|
1360
|
+
inert: true
|
|
1364
1361
|
}
|
|
1365
1362
|
}, !topbar && !fullscreen && /* @__PURE__ */ React17.createElement(ToggleSidebarButton, {
|
|
1366
1363
|
classNames: fixedSidebarToggleStyles
|
|
@@ -1393,7 +1390,7 @@ var DeckLayout = ({ onDismissToast }) => {
|
|
|
1393
1390
|
role: "none",
|
|
1394
1391
|
className: solo ? "relative bg-deckSurface overflow-hidden" : "sr-only",
|
|
1395
1392
|
...!solo && {
|
|
1396
|
-
inert:
|
|
1393
|
+
inert: true
|
|
1397
1394
|
}
|
|
1398
1395
|
}, !topbar && !fullscreen && /* @__PURE__ */ React17.createElement(ToggleSidebarButton, {
|
|
1399
1396
|
classNames: fixedSidebarToggleStyles
|
|
@@ -1432,19 +1429,23 @@ var DeckLayout = ({ onDismissToast }) => {
|
|
|
1432
1429
|
import { useSignals as _useSignals18 } from "@preact-signals/safe-react/tracking";
|
|
1433
1430
|
import React18 from "react";
|
|
1434
1431
|
import { Input, Select, useTranslation as useTranslation8 } from "@dxos/react-ui";
|
|
1435
|
-
import {
|
|
1432
|
+
import { ControlGroup, ControlItemInput, ControlPage, ControlSection } from "@dxos/react-ui-form";
|
|
1436
1433
|
var isSocket = !!globalThis.__args;
|
|
1437
1434
|
var DeckSettings = ({ settings }) => {
|
|
1438
1435
|
var _effect = _useSignals18();
|
|
1439
1436
|
try {
|
|
1440
|
-
const { t } = useTranslation8(
|
|
1441
|
-
return /* @__PURE__ */ React18.createElement(
|
|
1442
|
-
|
|
1437
|
+
const { t } = useTranslation8(meta.id);
|
|
1438
|
+
return /* @__PURE__ */ React18.createElement(ControlPage, null, /* @__PURE__ */ React18.createElement(ControlSection, {
|
|
1439
|
+
title: t("settings title", {
|
|
1440
|
+
ns: meta.id
|
|
1441
|
+
})
|
|
1442
|
+
}, /* @__PURE__ */ React18.createElement(ControlGroup, null, /* @__PURE__ */ React18.createElement(ControlItemInput, {
|
|
1443
|
+
title: t("settings enable deck label")
|
|
1443
1444
|
}, /* @__PURE__ */ React18.createElement(Input.Switch, {
|
|
1444
1445
|
checked: settings.enableDeck,
|
|
1445
1446
|
onCheckedChange: (checked) => settings.enableDeck = checked
|
|
1446
|
-
})), /* @__PURE__ */ React18.createElement(
|
|
1447
|
-
|
|
1447
|
+
})), /* @__PURE__ */ React18.createElement(ControlItemInput, {
|
|
1448
|
+
title: t("select new plank positioning label")
|
|
1448
1449
|
}, /* @__PURE__ */ React18.createElement(Select.Root, {
|
|
1449
1450
|
disabled: !settings.enableDeck,
|
|
1450
1451
|
value: settings.newPlankPositioning ?? "start",
|
|
@@ -1454,8 +1455,8 @@ var DeckSettings = ({ settings }) => {
|
|
|
1454
1455
|
}), /* @__PURE__ */ React18.createElement(Select.Portal, null, /* @__PURE__ */ React18.createElement(Select.Content, null, /* @__PURE__ */ React18.createElement(Select.Viewport, null, NewPlankPositions.map((position) => /* @__PURE__ */ React18.createElement(Select.Option, {
|
|
1455
1456
|
key: position,
|
|
1456
1457
|
value: position
|
|
1457
|
-
}, t(`settings new plank position ${position} label`)))))))), /* @__PURE__ */ React18.createElement(
|
|
1458
|
-
|
|
1458
|
+
}, t(`settings new plank position ${position} label`)))), /* @__PURE__ */ React18.createElement(Select.Arrow, null))))), /* @__PURE__ */ React18.createElement(ControlItemInput, {
|
|
1459
|
+
title: t("settings overscroll label")
|
|
1459
1460
|
}, /* @__PURE__ */ React18.createElement(Select.Root, {
|
|
1460
1461
|
disabled: !settings.enableDeck,
|
|
1461
1462
|
value: settings.overscroll ?? "none",
|
|
@@ -1465,22 +1466,22 @@ var DeckSettings = ({ settings }) => {
|
|
|
1465
1466
|
}), /* @__PURE__ */ React18.createElement(Select.Portal, null, /* @__PURE__ */ React18.createElement(Select.Content, null, /* @__PURE__ */ React18.createElement(Select.Viewport, null, OverscrollOptions.map((option) => /* @__PURE__ */ React18.createElement(Select.Option, {
|
|
1466
1467
|
key: option,
|
|
1467
1468
|
value: option
|
|
1468
|
-
}, t(`settings overscroll ${option} label`)))))))), /* @__PURE__ */ React18.createElement(
|
|
1469
|
-
|
|
1469
|
+
}, t(`settings overscroll ${option} label`)))), /* @__PURE__ */ React18.createElement(Select.Arrow, null))))), /* @__PURE__ */ React18.createElement(ControlItemInput, {
|
|
1470
|
+
title: t("settings enable statusbar label")
|
|
1470
1471
|
}, /* @__PURE__ */ React18.createElement(Input.Switch, {
|
|
1471
1472
|
checked: settings.enableStatusbar,
|
|
1472
1473
|
onCheckedChange: (checked) => settings.enableStatusbar = checked
|
|
1473
|
-
})), /* @__PURE__ */ React18.createElement(
|
|
1474
|
-
|
|
1474
|
+
})), /* @__PURE__ */ React18.createElement(ControlItemInput, {
|
|
1475
|
+
title: t("settings show hints label")
|
|
1475
1476
|
}, /* @__PURE__ */ React18.createElement(Input.Switch, {
|
|
1476
1477
|
checked: settings.showHints,
|
|
1477
1478
|
onCheckedChange: (checked) => settings.showHints = checked
|
|
1478
|
-
})), !isSocket && /* @__PURE__ */ React18.createElement(
|
|
1479
|
-
|
|
1479
|
+
})), !isSocket && /* @__PURE__ */ React18.createElement(ControlItemInput, {
|
|
1480
|
+
title: t("settings native redirect label")
|
|
1480
1481
|
}, /* @__PURE__ */ React18.createElement(Input.Switch, {
|
|
1481
1482
|
checked: settings.enableNativeRedirect,
|
|
1482
1483
|
onCheckedChange: (checked) => settings.enableNativeRedirect = checked
|
|
1483
|
-
})));
|
|
1484
|
+
})))));
|
|
1484
1485
|
} finally {
|
|
1485
1486
|
_effect.f();
|
|
1486
1487
|
}
|
|
@@ -1491,4 +1492,4 @@ export {
|
|
|
1491
1492
|
DeckLayout,
|
|
1492
1493
|
DeckSettings
|
|
1493
1494
|
};
|
|
1494
|
-
//# sourceMappingURL=chunk-
|
|
1495
|
+
//# sourceMappingURL=chunk-3SV2V3AN.mjs.map
|