@dxos/plugin-simple-layout 0.8.4-main.6fa680abb7 → 0.8.4-main.7996785055
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/{chunk-MDPEKLKR.mjs → chunk-J5FQ32AV.mjs} +302 -209
- package/dist/lib/browser/chunk-J5FQ32AV.mjs.map +7 -0
- package/dist/lib/browser/chunk-XJVW3PRY.mjs +22 -0
- package/dist/lib/browser/chunk-XJVW3PRY.mjs.map +7 -0
- package/dist/lib/browser/close-OT5JOGVY.mjs +34 -0
- package/dist/lib/browser/close-OT5JOGVY.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +23 -22
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/open-4FQ44Z5G.mjs +31 -0
- package/dist/lib/browser/open-4FQ44Z5G.mjs.map +7 -0
- package/dist/lib/browser/operation-handler-OAD7LISD.mjs +16 -0
- package/dist/lib/browser/operation-handler-OAD7LISD.mjs.map +7 -0
- package/dist/lib/browser/{react-root-WVQYY2JA.mjs → react-root-6KIGPLUT.mjs} +2 -2
- package/dist/lib/browser/{react-surface-VLBR37ED.mjs → react-surface-JLIEQGOL.mjs} +2 -2
- package/dist/lib/browser/revert-workspace-DLE265AN.mjs +21 -0
- package/dist/lib/browser/revert-workspace-DLE265AN.mjs.map +7 -0
- package/dist/lib/browser/set-52HGTSH4.mjs +21 -0
- package/dist/lib/browser/set-52HGTSH4.mjs.map +7 -0
- package/dist/lib/browser/set-layout-mode-T6QI3DGU.mjs +11 -0
- package/dist/lib/browser/set-layout-mode-T6QI3DGU.mjs.map +7 -0
- package/dist/lib/browser/switch-workspace-5Y6T4BWJ.mjs +24 -0
- package/dist/lib/browser/switch-workspace-5Y6T4BWJ.mjs.map +7 -0
- package/dist/lib/browser/update-complementary-MX3TTVAB.mjs +31 -0
- package/dist/lib/browser/update-complementary-MX3TTVAB.mjs.map +7 -0
- package/dist/lib/browser/update-dialog-FPAPZXKO.mjs +29 -0
- package/dist/lib/browser/update-dialog-FPAPZXKO.mjs.map +7 -0
- package/dist/lib/browser/update-popover-6V5ZTIYN.mjs +33 -0
- package/dist/lib/browser/update-popover-6V5ZTIYN.mjs.map +7 -0
- package/dist/lib/browser/update-sidebar-WHDKYMV7.mjs +10 -0
- package/dist/lib/browser/update-sidebar-WHDKYMV7.mjs.map +7 -0
- package/dist/lib/browser/{url-handler-RBRONH7S.mjs → url-handler-GUJ3L7Y3.mjs} +24 -12
- package/dist/lib/browser/url-handler-GUJ3L7Y3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-27K22G6S.mjs +23 -0
- package/dist/lib/node-esm/chunk-27K22G6S.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-DCKASLMP.mjs → chunk-EXNDYZTP.mjs} +302 -209
- package/dist/lib/node-esm/chunk-EXNDYZTP.mjs.map +7 -0
- package/dist/lib/node-esm/close-PEVHREL2.mjs +35 -0
- package/dist/lib/node-esm/close-PEVHREL2.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +23 -22
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/open-LMJY7JCJ.mjs +32 -0
- package/dist/lib/node-esm/open-LMJY7JCJ.mjs.map +7 -0
- package/dist/lib/node-esm/operation-handler-A2DC4WHC.mjs +18 -0
- package/dist/lib/node-esm/operation-handler-A2DC4WHC.mjs.map +7 -0
- package/dist/lib/node-esm/{react-root-XBNDM7BE.mjs → react-root-5SCW2KTH.mjs} +2 -2
- package/dist/lib/node-esm/{react-surface-U5NHA367.mjs → react-surface-WLKB6AET.mjs} +2 -2
- package/dist/lib/node-esm/revert-workspace-XZXT64YA.mjs +22 -0
- package/dist/lib/node-esm/revert-workspace-XZXT64YA.mjs.map +7 -0
- package/dist/lib/node-esm/set-5I6LFH5L.mjs +22 -0
- package/dist/lib/node-esm/set-5I6LFH5L.mjs.map +7 -0
- package/dist/lib/node-esm/set-layout-mode-F5B6QLZM.mjs +13 -0
- package/dist/lib/node-esm/set-layout-mode-F5B6QLZM.mjs.map +7 -0
- package/dist/lib/node-esm/switch-workspace-PB6T2SGY.mjs +25 -0
- package/dist/lib/node-esm/switch-workspace-PB6T2SGY.mjs.map +7 -0
- package/dist/lib/node-esm/update-complementary-FTW423IY.mjs +32 -0
- package/dist/lib/node-esm/update-complementary-FTW423IY.mjs.map +7 -0
- package/dist/lib/node-esm/update-dialog-ID267DCL.mjs +30 -0
- package/dist/lib/node-esm/update-dialog-ID267DCL.mjs.map +7 -0
- package/dist/lib/node-esm/update-popover-RLHU2HF4.mjs +34 -0
- package/dist/lib/node-esm/update-popover-RLHU2HF4.mjs.map +7 -0
- package/dist/lib/node-esm/update-sidebar-BJ7HTNZ4.mjs +12 -0
- package/dist/lib/node-esm/update-sidebar-BJ7HTNZ4.mjs.map +7 -0
- package/dist/lib/node-esm/{url-handler-QSMCH3JB.mjs → url-handler-WMONO2T6.mjs} +24 -12
- package/dist/lib/node-esm/url-handler-WMONO2T6.mjs.map +7 -0
- package/dist/types/src/SimpleLayoutPlugin.d.ts +1 -1
- package/dist/types/src/SimpleLayoutPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +1 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler/index.d.ts +4 -0
- package/dist/types/src/capabilities/operation-handler/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/url-handler/url-handler.d.ts.map +1 -1
- package/dist/types/src/components/ContentError.stories.d.ts +6 -1
- package/dist/types/src/components/ContentError.stories.d.ts.map +1 -1
- package/dist/types/src/components/DebugOverlay/DebugOverlay.d.ts +19 -0
- package/dist/types/src/components/DebugOverlay/DebugOverlay.d.ts.map +1 -0
- package/dist/types/src/components/DebugOverlay/index.d.ts +2 -0
- package/dist/types/src/components/DebugOverlay/index.d.ts.map +1 -0
- package/dist/types/src/components/Home/Home.d.ts.map +1 -1
- package/dist/types/src/components/Loading/Loading.d.ts +3 -0
- package/dist/types/src/components/Loading/Loading.d.ts.map +1 -0
- package/dist/types/src/components/{ContentLoading/ContentLoading.stories.d.ts → Loading/Loading.stories.d.ts} +1 -1
- package/dist/types/src/components/Loading/Loading.stories.d.ts.map +1 -0
- package/dist/types/src/components/Loading/index.d.ts +2 -0
- package/dist/types/src/components/Loading/index.d.ts.map +1 -0
- package/dist/types/src/components/MobileLayout/MobileLayout.d.ts.map +1 -1
- package/dist/types/src/components/MobileLayout/MobileLayout.stories.d.ts.map +1 -1
- package/dist/types/src/components/NavBranch/NavBranch.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/AppBar.d.ts +9 -7
- package/dist/types/src/components/SimpleLayout/AppBar.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/AppBar.stories.d.ts +9 -4
- package/dist/types/src/components/SimpleLayout/AppBar.stories.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/Main.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/NavBar.d.ts +9 -7
- package/dist/types/src/components/SimpleLayout/NavBar.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts +13 -5
- package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/SimpleLayout.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts +10 -11
- package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/operations/close.d.ts +5 -0
- package/dist/types/src/operations/close.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/open.d.ts +5 -0
- package/dist/types/src/operations/open.d.ts.map +1 -0
- package/dist/types/src/operations/revert-workspace.d.ts +5 -0
- package/dist/types/src/operations/revert-workspace.d.ts.map +1 -0
- package/dist/types/src/operations/set-layout-mode.d.ts +5 -0
- package/dist/types/src/operations/set-layout-mode.d.ts.map +1 -0
- package/dist/types/src/operations/set.d.ts +5 -0
- package/dist/types/src/operations/set.d.ts.map +1 -0
- package/dist/types/src/operations/state-access.d.ts +8 -0
- package/dist/types/src/operations/state-access.d.ts.map +1 -0
- package/dist/types/src/operations/switch-workspace.d.ts +5 -0
- package/dist/types/src/operations/switch-workspace.d.ts.map +1 -0
- package/dist/types/src/operations/update-complementary.d.ts +5 -0
- package/dist/types/src/operations/update-complementary.d.ts.map +1 -0
- package/dist/types/src/operations/update-dialog.d.ts +5 -0
- package/dist/types/src/operations/update-dialog.d.ts.map +1 -0
- package/dist/types/src/operations/update-popover.d.ts +5 -0
- package/dist/types/src/operations/update-popover.d.ts.map +1 -0
- package/dist/types/src/operations/update-sidebar.d.ts +5 -0
- package/dist/types/src/operations/update-sidebar.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +6 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +29 -29
- package/src/SimpleLayoutPlugin.ts +3 -3
- package/src/capabilities/index.ts +1 -1
- package/src/capabilities/operation-handler/index.ts +9 -0
- package/src/capabilities/operation-handler/operation-handler.ts +14 -0
- package/src/capabilities/url-handler/url-handler.ts +15 -3
- package/src/components/DebugOverlay/DebugOverlay.tsx +96 -0
- package/src/components/DebugOverlay/index.ts +5 -0
- package/src/components/Home/Home.tsx +27 -28
- package/src/components/{ContentLoading/ContentLoading.stories.tsx → Loading/Loading.stories.tsx} +4 -4
- package/src/components/{ContentLoading/ContentLoading.tsx → Loading/Loading.tsx} +1 -1
- package/src/components/{ContentLoading → Loading}/index.ts +1 -1
- package/src/components/MobileLayout/MobileLayout.stories.tsx +10 -6
- package/src/components/MobileLayout/MobileLayout.tsx +118 -49
- package/src/components/NavBranch/NavBranch.tsx +27 -30
- package/src/components/Popover/Popover.tsx +2 -12
- package/src/components/SimpleLayout/AppBar.stories.tsx +3 -3
- package/src/components/SimpleLayout/AppBar.tsx +58 -59
- package/src/components/SimpleLayout/Drawer.tsx +6 -6
- package/src/components/SimpleLayout/Main.tsx +15 -19
- package/src/components/SimpleLayout/NavBar.tsx +8 -9
- package/src/components/SimpleLayout/SimpleLayout.stories.tsx +41 -64
- package/src/components/SimpleLayout/SimpleLayout.tsx +29 -30
- package/src/components/index.ts +2 -1
- package/src/hooks/useAppBarProps.ts +6 -6
- package/src/hooks/useDrawerActions.ts +1 -1
- package/src/operations/close.ts +34 -0
- package/src/operations/index.ts +16 -0
- package/src/operations/open.ts +32 -0
- package/src/operations/revert-workspace.ts +22 -0
- package/src/operations/set-layout-mode.ts +12 -0
- package/src/operations/set.ts +23 -0
- package/src/operations/state-access.ts +19 -0
- package/src/operations/switch-workspace.ts +26 -0
- package/src/operations/update-complementary.ts +34 -0
- package/src/operations/update-dialog.ts +28 -0
- package/src/operations/update-popover.ts +35 -0
- package/src/operations/update-sidebar.ts +12 -0
- package/src/translations.ts +2 -1
- package/dist/lib/browser/chunk-MDPEKLKR.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-VTZ6HZ4B.mjs +0 -194
- package/dist/lib/browser/operation-resolver-VTZ6HZ4B.mjs.map +0 -7
- package/dist/lib/browser/url-handler-RBRONH7S.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DCKASLMP.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-R7CQ6ERU.mjs +0 -195
- package/dist/lib/node-esm/operation-resolver-R7CQ6ERU.mjs.map +0 -7
- package/dist/lib/node-esm/url-handler-QSMCH3JB.mjs.map +0 -7
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/components/ContentLoading/ContentLoading.d.ts +0 -3
- package/dist/types/src/components/ContentLoading/ContentLoading.d.ts.map +0 -1
- package/dist/types/src/components/ContentLoading/ContentLoading.stories.d.ts.map +0 -1
- package/dist/types/src/components/ContentLoading/index.d.ts +0 -2
- package/dist/types/src/components/ContentLoading/index.d.ts.map +0 -1
- package/src/capabilities/operation-resolver/index.ts +0 -10
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -202
- /package/dist/lib/browser/{react-root-WVQYY2JA.mjs.map → react-root-6KIGPLUT.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-VLBR37ED.mjs.map → react-surface-JLIEQGOL.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-root-XBNDM7BE.mjs.map → react-root-5SCW2KTH.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-U5NHA367.mjs.map → react-surface-WLKB6AET.mjs.map} +0 -0
|
@@ -9,12 +9,12 @@ import { useOperationInvoker } from "@dxos/app-framework/ui";
|
|
|
9
9
|
import { LayoutOperation } from "@dxos/app-toolkit";
|
|
10
10
|
import { useAppGraph as useAppGraph2 } from "@dxos/app-toolkit/ui";
|
|
11
11
|
import { Node, useConnections } from "@dxos/plugin-graph";
|
|
12
|
-
import { Avatar, Icon,
|
|
12
|
+
import { Avatar, Icon, ScrollArea, toLocalizedString, useTranslation } from "@dxos/react-ui";
|
|
13
13
|
import { Card } from "@dxos/react-ui";
|
|
14
14
|
import { Mosaic } from "@dxos/react-ui-mosaic";
|
|
15
|
-
import {
|
|
15
|
+
import { SearchPanel, useSearchListItem, useSearchListResults } from "@dxos/react-ui-search";
|
|
16
16
|
import { mx } from "@dxos/ui-theme";
|
|
17
|
-
import { byPosition } from "@dxos/util";
|
|
17
|
+
import { byPosition, getHostPlatform, isTauri } from "@dxos/util";
|
|
18
18
|
|
|
19
19
|
// src/components/hooks.ts
|
|
20
20
|
import { useEffect } from "react";
|
|
@@ -57,26 +57,22 @@ var Home = (_) => {
|
|
|
57
57
|
items,
|
|
58
58
|
extract: (node) => toLocalizedString(node.properties.label, t)
|
|
59
59
|
});
|
|
60
|
-
|
|
60
|
+
const autoFocus = !isTauri() || getHostPlatform() !== "ios";
|
|
61
|
+
return /* @__PURE__ */ React.createElement(SearchPanel, {
|
|
61
62
|
onSearch: handleSearch
|
|
62
|
-
}, /* @__PURE__ */ React.createElement(
|
|
63
|
-
asChild: true
|
|
64
|
-
}, /* @__PURE__ */ React.createElement(Toolbar.Root, null, /* @__PURE__ */ React.createElement(SearchList.Input, {
|
|
65
|
-
placeholder: t("search placeholder"),
|
|
66
|
-
autoFocus: true
|
|
67
|
-
}))), /* @__PURE__ */ React.createElement(Panel.Content, {
|
|
68
|
-
asChild: true
|
|
69
|
-
}, /* @__PURE__ */ React.createElement(SearchList.Content, null, /* @__PURE__ */ React.createElement(Mosaic.Container, {
|
|
63
|
+
}, /* @__PURE__ */ React.createElement(Mosaic.Container, {
|
|
70
64
|
asChild: true
|
|
71
65
|
}, /* @__PURE__ */ React.createElement(ScrollArea.Root, {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}, /* @__PURE__ */ React.createElement(Mosaic.Stack, {
|
|
66
|
+
centered: true,
|
|
67
|
+
padding: true,
|
|
68
|
+
thin: true
|
|
69
|
+
}, /* @__PURE__ */ React.createElement(ScrollArea.Viewport, null, /* @__PURE__ */ React.createElement(Mosaic.Stack, {
|
|
70
|
+
classNames: "gap-1",
|
|
71
|
+
draggable: false,
|
|
76
72
|
items: results,
|
|
77
|
-
getId: (
|
|
73
|
+
getId: (item) => item.id,
|
|
78
74
|
Tile: WorkspaceTile
|
|
79
|
-
})))))
|
|
75
|
+
})))));
|
|
80
76
|
};
|
|
81
77
|
var WorkspaceTile = (props) => {
|
|
82
78
|
const data = props.data;
|
|
@@ -123,15 +119,17 @@ var WorkspaceTile = (props) => {
|
|
|
123
119
|
onClick: handleSelect,
|
|
124
120
|
ref: cardRef
|
|
125
121
|
}, /* @__PURE__ */ React.createElement(Card.Toolbar, {
|
|
126
|
-
density: "
|
|
122
|
+
density: "fine"
|
|
127
123
|
}, /* @__PURE__ */ React.createElement(Avatar.Root, null, /* @__PURE__ */ React.createElement(Avatar.Content, {
|
|
128
124
|
icon: data.properties.icon,
|
|
129
125
|
hue: data.properties.hue,
|
|
130
126
|
hueVariant: "transparent",
|
|
131
127
|
variant: "square",
|
|
132
|
-
size:
|
|
128
|
+
size: 8,
|
|
133
129
|
fallback: name
|
|
134
|
-
}), /* @__PURE__ */ React.createElement(Avatar.Label,
|
|
130
|
+
}), /* @__PURE__ */ React.createElement(Avatar.Label, {
|
|
131
|
+
classNames: "cursor-pointer"
|
|
132
|
+
}, name), /* @__PURE__ */ React.createElement(Icon, {
|
|
135
133
|
icon: "ph--caret-right--regular"
|
|
136
134
|
}))));
|
|
137
135
|
};
|
|
@@ -141,12 +139,18 @@ var filterItems = (node, disposition) => {
|
|
|
141
139
|
var useItemsByDisposition = (disposition, sort = false) => {
|
|
142
140
|
const { graph } = useAppGraph2();
|
|
143
141
|
const connections = useConnections(graph, Node.RootId, "child");
|
|
144
|
-
|
|
145
|
-
|
|
142
|
+
return useMemo(() => {
|
|
143
|
+
const filtered = connections.filter((node) => filterItems(node, disposition));
|
|
144
|
+
return sort ? filtered.toSorted((a, b) => byPosition(a.properties, b.properties)) : filtered;
|
|
145
|
+
}, [
|
|
146
|
+
connections,
|
|
147
|
+
disposition,
|
|
148
|
+
sort
|
|
149
|
+
]);
|
|
146
150
|
};
|
|
147
151
|
|
|
148
152
|
// src/components/SimpleLayout/SimpleLayout.tsx
|
|
149
|
-
import
|
|
153
|
+
import React12, { useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as useState3 } from "react";
|
|
150
154
|
import { Splitter } from "@dxos/react-ui";
|
|
151
155
|
import { Mosaic as Mosaic3 } from "@dxos/react-ui-mosaic";
|
|
152
156
|
|
|
@@ -165,7 +169,7 @@ var useAppBarProps = () => {
|
|
|
165
169
|
const stateAtom = useCapability(SimpleLayoutState);
|
|
166
170
|
const state = useAtomValue(stateAtom);
|
|
167
171
|
const { graph } = useAppGraph3();
|
|
168
|
-
const {
|
|
172
|
+
const { invokePromise } = useOperationInvoker2();
|
|
169
173
|
const runAction = useActionRunner();
|
|
170
174
|
const activeId = state.active ?? state.workspace;
|
|
171
175
|
const node = useNode(graph, activeId);
|
|
@@ -191,7 +195,7 @@ var useAppBarProps = () => {
|
|
|
191
195
|
const settingsAction = {
|
|
192
196
|
id: `appbar-settings-${alternateTreeNode.id}`,
|
|
193
197
|
type: Node2.ActionType,
|
|
194
|
-
data: () => Effect.
|
|
198
|
+
data: () => Effect.promise(() => invokePromise(LayoutOperation2.Open, {
|
|
195
199
|
subject: [
|
|
196
200
|
alternateTreeNode.id
|
|
197
201
|
]
|
|
@@ -221,24 +225,24 @@ var useAppBarProps = () => {
|
|
|
221
225
|
if (state.active) {
|
|
222
226
|
const isWorkspace = Graph2.getNode(graph, state.active).pipe(Option.map((node2) => node2.properties.disposition === "workspace"), Option.getOrElse(() => false));
|
|
223
227
|
if (state.history.length === 0 && isWorkspace) {
|
|
224
|
-
|
|
228
|
+
void invokePromise(LayoutOperation2.SwitchWorkspace, {
|
|
225
229
|
subject: Node2.RootId
|
|
226
230
|
});
|
|
227
231
|
} else {
|
|
228
|
-
|
|
232
|
+
void invokePromise(LayoutOperation2.Close, {
|
|
229
233
|
subject: [
|
|
230
234
|
state.active
|
|
231
235
|
]
|
|
232
236
|
});
|
|
233
237
|
}
|
|
234
238
|
} else {
|
|
235
|
-
|
|
239
|
+
void invokePromise(LayoutOperation2.SwitchWorkspace, {
|
|
236
240
|
subject: Node2.RootId
|
|
237
241
|
});
|
|
238
242
|
}
|
|
239
243
|
}, [
|
|
240
244
|
graph,
|
|
241
|
-
|
|
245
|
+
invokePromise,
|
|
242
246
|
state.active,
|
|
243
247
|
state.history.length
|
|
244
248
|
]);
|
|
@@ -328,18 +332,63 @@ import { Node as Node4, useActionRunner as useActionRunner2 } from "@dxos/plugin
|
|
|
328
332
|
import { useTranslation as useTranslation6 } from "@dxos/react-ui";
|
|
329
333
|
import { createGapSeparator } from "@dxos/react-ui-menu";
|
|
330
334
|
|
|
331
|
-
// src/components/
|
|
332
|
-
import
|
|
333
|
-
|
|
334
|
-
|
|
335
|
+
// src/components/DebugOverlay/DebugOverlay.tsx
|
|
336
|
+
import { createContext } from "@radix-ui/react-context";
|
|
337
|
+
import React2, { useCallback as useCallback3, useRef as useRef2 } from "react";
|
|
338
|
+
var DEBUG_OVERLAY_NAME = "DebugOverlay";
|
|
339
|
+
var [DebugOverlayProvider, useDebugLog] = createContext(DEBUG_OVERLAY_NAME, {
|
|
340
|
+
dbg: () => {
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
var DebugOverlayRoot = ({ children, enabled = true, maxLines = 10 }) => {
|
|
344
|
+
const overlayRef = useRef2(null);
|
|
345
|
+
const dbg = useCallback3((msg) => {
|
|
346
|
+
if (!overlayRef.current) {
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
const line = document.createElement("pre");
|
|
350
|
+
line.textContent = `${(performance.now() / 1e3).toFixed(2).padStart(8, " ")} ${msg}`;
|
|
351
|
+
overlayRef.current.prepend(line);
|
|
352
|
+
while (overlayRef.current.children.length > maxLines) {
|
|
353
|
+
overlayRef.current.lastChild?.remove();
|
|
354
|
+
}
|
|
355
|
+
}, []);
|
|
356
|
+
return /* @__PURE__ */ React2.createElement(DebugOverlayProvider, {
|
|
357
|
+
dbg
|
|
358
|
+
}, children, enabled && /* @__PURE__ */ React2.createElement("div", {
|
|
359
|
+
ref: overlayRef,
|
|
360
|
+
style: {
|
|
361
|
+
position: "fixed",
|
|
362
|
+
bottom: "calc(var(--kb-height, 0px) + 8px)",
|
|
363
|
+
left: 8,
|
|
364
|
+
right: 8,
|
|
365
|
+
background: "rgba(0,0,0,0.8)",
|
|
366
|
+
color: "#0f0",
|
|
367
|
+
fontSize: 10,
|
|
368
|
+
fontFamily: "monospace",
|
|
369
|
+
padding: 6,
|
|
370
|
+
borderRadius: 4,
|
|
371
|
+
zIndex: 9999,
|
|
372
|
+
pointerEvents: "none"
|
|
373
|
+
}
|
|
374
|
+
}));
|
|
375
|
+
};
|
|
376
|
+
var DebugOverlay = {
|
|
377
|
+
Root: DebugOverlayRoot
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
// src/components/Loading/Loading.tsx
|
|
381
|
+
import React3 from "react";
|
|
382
|
+
var Loading = () => {
|
|
383
|
+
return /* @__PURE__ */ React3.createElement("div", {
|
|
335
384
|
role: "none",
|
|
336
385
|
className: "grid place-items-center dx-attention-surface"
|
|
337
386
|
});
|
|
338
387
|
};
|
|
339
388
|
|
|
340
389
|
// src/components/MobileLayout/MobileLayout.tsx
|
|
341
|
-
import { createContext } from "@radix-ui/react-context";
|
|
342
|
-
import
|
|
390
|
+
import { createContext as createContext2 } from "@radix-ui/react-context";
|
|
391
|
+
import React4, { forwardRef, useEffect as useEffect3, useLayoutEffect, useState } from "react";
|
|
343
392
|
import { addEventListener, combine } from "@dxos/async";
|
|
344
393
|
import { log } from "@dxos/log";
|
|
345
394
|
import { mx as mx2 } from "@dxos/ui-theme";
|
|
@@ -347,38 +396,38 @@ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-simple-layout/src/com
|
|
|
347
396
|
var MOBILE_LAYOUT_NAME = "MobileLayout";
|
|
348
397
|
var MOBILE_LAYOUT_ROOT_NAME = "MobileLayout.Root";
|
|
349
398
|
var MOBILE_LAYOUT_PANEL_NAME = "MobileLayout.Panel";
|
|
350
|
-
var [MobileLayoutProvider, useMobileLayout] =
|
|
351
|
-
var MobileLayoutRoot = /* @__PURE__ */ forwardRef(({ classNames, children, transition =
|
|
399
|
+
var [MobileLayoutProvider, useMobileLayout] = createContext2(MOBILE_LAYOUT_NAME);
|
|
400
|
+
var MobileLayoutRoot = /* @__PURE__ */ forwardRef(({ classNames, children, transition = 500, onKeyboardOpenChange, ...props }, forwardedRef) => {
|
|
352
401
|
const { open: keyboardOpen } = useIOSKeyboard();
|
|
402
|
+
useLockBodyScroll(keyboardOpen);
|
|
353
403
|
useAutoScroll();
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
404
|
+
useLayoutEffect(() => onKeyboardOpenChange?.(keyboardOpen), [
|
|
405
|
+
keyboardOpen,
|
|
406
|
+
onKeyboardOpenChange
|
|
357
407
|
]);
|
|
358
|
-
|
|
359
|
-
return /* @__PURE__ */ React3.createElement(MobileLayoutProvider, {
|
|
408
|
+
return /* @__PURE__ */ React4.createElement(MobileLayoutProvider, {
|
|
360
409
|
keyboardOpen
|
|
361
|
-
}, /* @__PURE__ */
|
|
410
|
+
}, /* @__PURE__ */ React4.createElement("div", {
|
|
362
411
|
...props,
|
|
363
412
|
role: "none",
|
|
364
413
|
style: {
|
|
365
|
-
|
|
366
|
-
|
|
414
|
+
height: "calc(100vh - var(--kb-height, 0px))",
|
|
415
|
+
transition: `height ${keyboardOpen ? 0 : transition}ms ease-out`
|
|
367
416
|
},
|
|
368
|
-
className: mx2("
|
|
417
|
+
className: mx2("fixed top-0 left-0 right-0 grid overflow-hidden", classNames),
|
|
369
418
|
ref: forwardedRef
|
|
370
419
|
}, children));
|
|
371
420
|
});
|
|
372
421
|
MobileLayoutRoot.displayName = MOBILE_LAYOUT_ROOT_NAME;
|
|
373
422
|
var MobileLayoutPanel = /* @__PURE__ */ forwardRef(({ classNames, children, safe, ...props }, forwardedRef) => {
|
|
374
|
-
return /* @__PURE__ */
|
|
423
|
+
return /* @__PURE__ */ React4.createElement("div", {
|
|
375
424
|
...props,
|
|
376
425
|
role: "none",
|
|
377
426
|
style: {
|
|
378
427
|
paddingTop: safe?.top ? "env(safe-area-inset-top)" : void 0,
|
|
379
428
|
paddingBottom: safe?.bottom ? `calc((1 - var(--kb-open, 0)) * env(safe-area-inset-bottom))` : void 0
|
|
380
429
|
},
|
|
381
|
-
className: mx2(
|
|
430
|
+
className: mx2(classNames),
|
|
382
431
|
ref: forwardedRef
|
|
383
432
|
}, children);
|
|
384
433
|
});
|
|
@@ -388,30 +437,51 @@ var MobileLayout = {
|
|
|
388
437
|
Panel: MobileLayoutPanel
|
|
389
438
|
};
|
|
390
439
|
var useAutoScroll = () => {
|
|
440
|
+
const { dbg } = useDebugLog("useAutoScroll");
|
|
391
441
|
useEffect3(() => {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
}
|
|
442
|
+
const resetScroll = () => {
|
|
443
|
+
if (window.scrollX !== 0 || window.scrollY !== 0) {
|
|
444
|
+
window.scrollTo(0, 0);
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
const detectContainerScroll = (event) => {
|
|
448
|
+
const el = event.target;
|
|
449
|
+
if (el === document.documentElement || el === document.body) {
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
dbg(`scroll: ${el.tagName}.${Array.from(el.classList).slice(0, 2).join(".")} top=${el.scrollTop.toFixed(0)}`);
|
|
453
|
+
};
|
|
454
|
+
return combine(
|
|
455
|
+
addEventListener(window, "scroll", resetScroll),
|
|
456
|
+
window.visualViewport ? addEventListener(window.visualViewport, "scroll", resetScroll) : () => {
|
|
408
457
|
},
|
|
409
|
-
//
|
|
410
|
-
{
|
|
458
|
+
// TODO(burdon): Remove debug logging.
|
|
459
|
+
addEventListener(document, "scroll", detectContainerScroll, {
|
|
411
460
|
capture: true
|
|
412
|
-
}
|
|
461
|
+
}),
|
|
462
|
+
// Prevent focus-triggered scroll-into-view on inputs.
|
|
463
|
+
(() => {
|
|
464
|
+
let focusingWithPreventScroll = false;
|
|
465
|
+
return addEventListener(document, "focus", (event) => {
|
|
466
|
+
if (focusingWithPreventScroll) {
|
|
467
|
+
return;
|
|
468
|
+
}
|
|
469
|
+
const target = event.target;
|
|
470
|
+
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.isContentEditable) {
|
|
471
|
+
focusingWithPreventScroll = true;
|
|
472
|
+
target.focus({
|
|
473
|
+
preventScroll: true
|
|
474
|
+
});
|
|
475
|
+
focusingWithPreventScroll = false;
|
|
476
|
+
}
|
|
477
|
+
}, {
|
|
478
|
+
capture: true
|
|
479
|
+
});
|
|
480
|
+
})()
|
|
413
481
|
);
|
|
414
|
-
}, [
|
|
482
|
+
}, [
|
|
483
|
+
dbg
|
|
484
|
+
]);
|
|
415
485
|
};
|
|
416
486
|
var useLockBodyScroll = (enabled) => {
|
|
417
487
|
useEffect3(() => {
|
|
@@ -464,17 +534,20 @@ var useLockBodyScroll = (enabled) => {
|
|
|
464
534
|
]);
|
|
465
535
|
};
|
|
466
536
|
var useIOSKeyboard = () => {
|
|
537
|
+
const { dbg } = useDebugLog("useIOSKeyboard");
|
|
467
538
|
const [open, setOpen] = useState(false);
|
|
468
539
|
const [height, setHeight] = useState(0);
|
|
540
|
+
const [duration, setDuration] = useState(void 0);
|
|
469
541
|
useEffect3(() => {
|
|
470
542
|
const viewport = window.visualViewport;
|
|
471
543
|
if (!viewport) {
|
|
472
544
|
return;
|
|
473
545
|
}
|
|
474
546
|
const initialHeight = viewport.height ?? window.innerHeight;
|
|
475
|
-
const updateState = (keyboardHeight, keyboardOpen) => {
|
|
547
|
+
const updateState = (keyboardHeight, keyboardOpen, animationDuration) => {
|
|
476
548
|
setOpen(keyboardOpen);
|
|
477
549
|
setHeight(keyboardHeight);
|
|
550
|
+
setDuration(animationDuration);
|
|
478
551
|
const vvh = initialHeight - keyboardHeight;
|
|
479
552
|
document.documentElement.style.setProperty("--vvh", `${vvh}px`);
|
|
480
553
|
document.documentElement.style.setProperty("--kb-height", `${keyboardHeight}px`);
|
|
@@ -483,52 +556,84 @@ var useIOSKeyboard = () => {
|
|
|
483
556
|
initialHeight,
|
|
484
557
|
vvh,
|
|
485
558
|
keyboardHeight,
|
|
486
|
-
keyboardOpen
|
|
559
|
+
keyboardOpen,
|
|
560
|
+
animationDuration
|
|
487
561
|
}, {
|
|
488
562
|
F: __dxlog_file,
|
|
489
|
-
L:
|
|
563
|
+
L: 318,
|
|
490
564
|
S: void 0,
|
|
491
565
|
C: (f, a) => f(...a)
|
|
492
566
|
});
|
|
493
567
|
};
|
|
568
|
+
let rafId;
|
|
494
569
|
return combine(
|
|
495
570
|
// Handler for native iOS keyboard events (from KeyboardObserver.swift).
|
|
496
571
|
addEventListener(window, "keyboard", (event) => {
|
|
497
|
-
const { type, height: height2 } = event.detail;
|
|
572
|
+
const { type, height: height2, duration: duration2 } = event.detail;
|
|
573
|
+
const durationMs = duration2 < 1 ? duration2 * 1e3 : duration2;
|
|
574
|
+
const vp = window.visualViewport;
|
|
575
|
+
dbg(`kb:${type} h=${height2} dur=${duration2} scrollY=${window.scrollY} vpOffset=${vp?.offsetTop?.toFixed(0) ?? "?"}`);
|
|
498
576
|
log.info("keyboard event", {
|
|
499
577
|
type,
|
|
500
|
-
height: height2
|
|
578
|
+
height: height2,
|
|
579
|
+
duration: duration2
|
|
501
580
|
}, {
|
|
502
581
|
F: __dxlog_file,
|
|
503
|
-
L:
|
|
582
|
+
L: 338,
|
|
504
583
|
S: void 0,
|
|
505
584
|
C: (f, a) => f(...a)
|
|
506
585
|
});
|
|
507
|
-
updateState(height2, type === "show");
|
|
508
|
-
|
|
586
|
+
updateState(height2, type === "show", durationMs);
|
|
587
|
+
const end = performance.now() + durationMs + 300;
|
|
588
|
+
let prevOffsetTop = vp?.offsetTop ?? 0;
|
|
589
|
+
let prevScrollY = window.scrollY;
|
|
590
|
+
const monitorFrame = () => {
|
|
591
|
+
const offsetTop = vp?.offsetTop ?? 0;
|
|
592
|
+
const scrollY = window.scrollY;
|
|
593
|
+
if (offsetTop !== prevOffsetTop || scrollY !== prevScrollY) {
|
|
594
|
+
dbg(`\u0394 vpOffset=${offsetTop.toFixed(0)} scrollY=${scrollY.toFixed(0)}`);
|
|
595
|
+
prevOffsetTop = offsetTop;
|
|
596
|
+
prevScrollY = scrollY;
|
|
597
|
+
}
|
|
598
|
+
if (scrollY !== 0) {
|
|
599
|
+
window.scrollTo(0, 0);
|
|
600
|
+
}
|
|
601
|
+
if (performance.now() < end) {
|
|
602
|
+
rafId = requestAnimationFrame(monitorFrame);
|
|
603
|
+
}
|
|
604
|
+
};
|
|
605
|
+
rafId = requestAnimationFrame(monitorFrame);
|
|
606
|
+
}),
|
|
607
|
+
() => {
|
|
608
|
+
if (rafId !== void 0) {
|
|
609
|
+
cancelAnimationFrame(rafId);
|
|
610
|
+
}
|
|
611
|
+
}
|
|
509
612
|
);
|
|
510
|
-
}, [
|
|
613
|
+
}, [
|
|
614
|
+
dbg
|
|
615
|
+
]);
|
|
511
616
|
return {
|
|
512
617
|
open,
|
|
513
|
-
height
|
|
618
|
+
height,
|
|
619
|
+
duration
|
|
514
620
|
};
|
|
515
621
|
};
|
|
516
622
|
|
|
517
623
|
// src/components/Popover/Popover.tsx
|
|
518
|
-
import { createContext as
|
|
519
|
-
import
|
|
624
|
+
import { createContext as createContext3 } from "@radix-ui/react-context";
|
|
625
|
+
import React5, { useCallback as useCallback4, useEffect as useEffect4, useMemo as useMemo4, useRef as useRef3, useState as useState2 } from "react";
|
|
520
626
|
import { Surface } from "@dxos/app-framework/ui";
|
|
521
|
-
import { useObjectNavigate } from "@dxos/app-toolkit/ui";
|
|
522
627
|
import { Popover, toLocalizedString as toLocalizedString3, useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
523
628
|
import { Card as Card2 } from "@dxos/react-ui";
|
|
524
629
|
var DEBOUNCE_DELAY = 40;
|
|
525
|
-
var [LayoutPopoverProvider, useLayoutPopoverContext] =
|
|
630
|
+
var [LayoutPopoverProvider, useLayoutPopoverContext] = createContext3("LayoutPopover");
|
|
526
631
|
var PopoverRoot = ({ children }) => {
|
|
527
632
|
const { state } = useSimpleLayoutState();
|
|
528
633
|
const [open, setOpen] = useState2(false);
|
|
529
|
-
const virtualRef =
|
|
634
|
+
const virtualRef = useRef3(null);
|
|
530
635
|
const [virtualIter, setVirtualIter] = useState2(0);
|
|
531
|
-
const debounceRef =
|
|
636
|
+
const debounceRef = useRef3(null);
|
|
532
637
|
useEffect4(() => {
|
|
533
638
|
setOpen(false);
|
|
534
639
|
if (state.popoverOpen) {
|
|
@@ -547,23 +652,21 @@ var PopoverRoot = ({ children }) => {
|
|
|
547
652
|
state.popoverAnchor,
|
|
548
653
|
state.popoverContent
|
|
549
654
|
]);
|
|
550
|
-
return /* @__PURE__ */
|
|
655
|
+
return /* @__PURE__ */ React5.createElement(LayoutPopoverProvider, {
|
|
551
656
|
setOpen
|
|
552
|
-
}, /* @__PURE__ */
|
|
657
|
+
}, /* @__PURE__ */ React5.createElement(Popover.Root, {
|
|
553
658
|
modal: false,
|
|
554
659
|
open
|
|
555
|
-
}, state.popoverAnchor && /* @__PURE__ */
|
|
660
|
+
}, state.popoverAnchor && /* @__PURE__ */ React5.createElement(Popover.VirtualTrigger, {
|
|
556
661
|
key: virtualIter,
|
|
557
662
|
virtualRef
|
|
558
663
|
}), children));
|
|
559
664
|
};
|
|
560
|
-
var getPopoverSubject = (content) => content && typeof content === "object" && "subject" in content ? content.subject : content;
|
|
561
665
|
var PopoverContent = () => {
|
|
562
666
|
const { t } = useTranslation3(meta.id);
|
|
563
667
|
const { state, updateState } = useSimpleLayoutState();
|
|
564
668
|
const { setOpen } = useLayoutPopoverContext("PopoverContent");
|
|
565
|
-
const
|
|
566
|
-
const handleClose = useCallback3(() => {
|
|
669
|
+
const handleClose = useCallback4(() => {
|
|
567
670
|
setOpen(false);
|
|
568
671
|
updateState((s) => ({
|
|
569
672
|
...s,
|
|
@@ -576,7 +679,7 @@ var PopoverContent = () => {
|
|
|
576
679
|
setOpen,
|
|
577
680
|
updateState
|
|
578
681
|
]);
|
|
579
|
-
const handleInteractOutside =
|
|
682
|
+
const handleInteractOutside = useCallback4((event) => {
|
|
580
683
|
if (
|
|
581
684
|
// TODO(thure): CodeMirror should not focus itself when it updates.
|
|
582
685
|
event.type === "dismissableLayer.focusOutside" && event.currentTarget?.classList.contains("cm-content")
|
|
@@ -596,41 +699,39 @@ var PopoverContent = () => {
|
|
|
596
699
|
}, [
|
|
597
700
|
state.popoverAnchor
|
|
598
701
|
]);
|
|
599
|
-
return /* @__PURE__ */
|
|
702
|
+
return /* @__PURE__ */ React5.createElement(Popover.Portal, null, /* @__PURE__ */ React5.createElement(Popover.Content, {
|
|
600
703
|
side: state.popoverSide,
|
|
601
704
|
sticky: "always",
|
|
602
705
|
hideWhenDetached: true,
|
|
603
706
|
collisionBoundary: collisionBoundaries,
|
|
604
707
|
onInteractOutside: handleInteractOutside,
|
|
605
708
|
onEscapeKeyDown: handleInteractOutside
|
|
606
|
-
}, /* @__PURE__ */
|
|
709
|
+
}, /* @__PURE__ */ React5.createElement(Popover.Viewport, null, state.popoverKind === "base" && /* @__PURE__ */ React5.createElement(Surface.Surface, {
|
|
607
710
|
role: "popover",
|
|
608
711
|
data: state.popoverContent,
|
|
609
712
|
limit: 1
|
|
610
|
-
}), state.popoverKind === "card" && /* @__PURE__ */
|
|
713
|
+
}), state.popoverKind === "card" && /* @__PURE__ */ React5.createElement(Card2.Root, {
|
|
611
714
|
border: false,
|
|
612
715
|
classNames: "dx-card-popover"
|
|
613
|
-
}, /* @__PURE__ */
|
|
614
|
-
onClick: handleNavigate
|
|
615
|
-
}, toLocalizedString3(state.popoverTitle, t)) : /* @__PURE__ */ React4.createElement("span", null), /* @__PURE__ */ React4.createElement(Card2.CloseIconButton, {
|
|
716
|
+
}, /* @__PURE__ */ React5.createElement(Card2.Toolbar, null, /* @__PURE__ */ React5.createElement("span", null), state.popoverTitle ? /* @__PURE__ */ React5.createElement(Card2.Title, null, toLocalizedString3(state.popoverTitle, t)) : /* @__PURE__ */ React5.createElement("span", null), /* @__PURE__ */ React5.createElement(Card2.CloseIconButton, {
|
|
616
717
|
onClick: handleClose
|
|
617
|
-
})), /* @__PURE__ */
|
|
718
|
+
})), /* @__PURE__ */ React5.createElement(Surface.Surface, {
|
|
618
719
|
role: "card--content",
|
|
619
720
|
data: state.popoverContent,
|
|
620
721
|
limit: 1
|
|
621
|
-
}))), /* @__PURE__ */
|
|
722
|
+
}))), /* @__PURE__ */ React5.createElement(Popover.Arrow, null)));
|
|
622
723
|
};
|
|
623
724
|
|
|
624
725
|
// src/components/SimpleLayout/AppBar.tsx
|
|
625
726
|
import { useAtomValue as useAtomValue2 } from "@effect-atom/atom-react";
|
|
626
|
-
import
|
|
627
|
-
import { IconButton, Popover as Popover2, Toolbar
|
|
727
|
+
import React6, { Fragment } from "react";
|
|
728
|
+
import { IconButton, Popover as Popover2, Toolbar, useTranslation as useTranslation4 } from "@dxos/react-ui";
|
|
628
729
|
import { Menu, useMenuActions } from "@dxos/react-ui-menu";
|
|
629
|
-
import {
|
|
730
|
+
import { composable, composableProps, osTranslations } from "@dxos/ui-theme";
|
|
630
731
|
var APP_BAR_NAME = "SimpleLayout.AppBar";
|
|
631
|
-
var AppBar = ({ classNames, title, actions, showBackButton, popoverAnchorId, onAction, onBack }) => {
|
|
732
|
+
var AppBar = composable(({ classNames, title, actions, showBackButton, popoverAnchorId, onAction, onBack, ...props }, forwardedRef) => {
|
|
632
733
|
const { t } = useTranslation4(meta.id);
|
|
633
|
-
const
|
|
734
|
+
const menuActions = useMenuActions(actions);
|
|
634
735
|
const actionsValue = useAtomValue2(actions);
|
|
635
736
|
const hasActions = actionsValue.nodes.length > 0;
|
|
636
737
|
const { keyboardOpen } = useMobileLayout(APP_BAR_NAME);
|
|
@@ -638,62 +739,64 @@ var AppBar = ({ classNames, title, actions, showBackButton, popoverAnchorId, onA
|
|
|
638
739
|
ns: osTranslations
|
|
639
740
|
});
|
|
640
741
|
const AnchorRoot = popoverAnchorId ? Popover2.Anchor : Fragment;
|
|
641
|
-
return /* @__PURE__ */
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
742
|
+
return /* @__PURE__ */ React6.createElement(Toolbar.Root, {
|
|
743
|
+
...composableProps(props, {
|
|
744
|
+
role: "banner",
|
|
745
|
+
classNames: "grid grid-cols-[var(--dx-rail-size)_1fr_var(--dx-rail-size)] items-center dx-density-fine"
|
|
746
|
+
}),
|
|
747
|
+
ref: forwardedRef
|
|
748
|
+
}, keyboardOpen ? /* @__PURE__ */ React6.createElement(IconButton, {
|
|
645
749
|
variant: "ghost",
|
|
646
750
|
icon: "ph--x--regular",
|
|
647
751
|
iconOnly: true,
|
|
648
752
|
label: t("done label")
|
|
649
|
-
}) : showBackButton ? /* @__PURE__ */
|
|
753
|
+
}) : showBackButton ? /* @__PURE__ */ React6.createElement(IconButton, {
|
|
650
754
|
variant: "ghost",
|
|
651
755
|
icon: "ph--caret-left--regular",
|
|
652
756
|
iconOnly: true,
|
|
653
757
|
label: t("back label"),
|
|
654
758
|
onClick: onBack
|
|
655
|
-
}) : /* @__PURE__ */
|
|
759
|
+
}) : /* @__PURE__ */ React6.createElement("div", null), /* @__PURE__ */ React6.createElement("h1", {
|
|
656
760
|
className: "text-center truncate font-thin uppercase"
|
|
657
|
-
}, displayTitle), hasActions ? /* @__PURE__ */
|
|
658
|
-
...
|
|
761
|
+
}, displayTitle), hasActions ? /* @__PURE__ */ React6.createElement(AnchorRoot, null, /* @__PURE__ */ React6.createElement(Menu.Root, {
|
|
762
|
+
...menuActions,
|
|
659
763
|
caller: meta.id,
|
|
660
764
|
onAction
|
|
661
|
-
}, /* @__PURE__ */
|
|
765
|
+
}, /* @__PURE__ */ React6.createElement(Menu.Trigger, {
|
|
662
766
|
asChild: true
|
|
663
|
-
}, /* @__PURE__ */
|
|
767
|
+
}, /* @__PURE__ */ React6.createElement(IconButton, {
|
|
664
768
|
variant: "ghost",
|
|
665
769
|
icon: "ph--dots-three-vertical--regular",
|
|
666
770
|
iconOnly: true,
|
|
667
771
|
label: t("actions menu label")
|
|
668
|
-
})), /* @__PURE__ */
|
|
669
|
-
};
|
|
772
|
+
})), /* @__PURE__ */ React6.createElement(Menu.Content, null))) : /* @__PURE__ */ React6.createElement("span", null));
|
|
773
|
+
});
|
|
670
774
|
AppBar.displayName = APP_BAR_NAME;
|
|
671
775
|
|
|
672
776
|
// src/components/SimpleLayout/Main.tsx
|
|
673
|
-
import
|
|
777
|
+
import React8, { useMemo as useMemo5 } from "react";
|
|
674
778
|
import { Surface as Surface2 } from "@dxos/app-framework/ui";
|
|
675
779
|
import { useAppGraph as useAppGraph5 } from "@dxos/app-toolkit/ui";
|
|
676
780
|
import { useNode as useNode2 } from "@dxos/plugin-graph";
|
|
677
|
-
import { ErrorFallback } from "@dxos/react-ui";
|
|
781
|
+
import { ErrorFallback, Panel } from "@dxos/react-ui";
|
|
678
782
|
import { useAttentionAttributes } from "@dxos/react-ui-attention";
|
|
679
|
-
import { mx as mx5 } from "@dxos/ui-theme";
|
|
680
783
|
|
|
681
784
|
// src/components/SimpleLayout/NavBar.tsx
|
|
682
|
-
import
|
|
785
|
+
import React7 from "react";
|
|
683
786
|
import { Menu as Menu2, useMenuActions as useMenuActions2 } from "@dxos/react-ui-menu";
|
|
684
|
-
import {
|
|
787
|
+
import { composable as composable2, composableProps as composableProps2 } from "@dxos/ui-theme";
|
|
685
788
|
var NAVBAR_NAME = "SimpleLayout.NavBar";
|
|
686
|
-
var NavBar = ({
|
|
687
|
-
const
|
|
688
|
-
return /* @__PURE__ */
|
|
689
|
-
...
|
|
789
|
+
var NavBar = composable2(({ actions, onAction, ...props }, forwardedRef) => {
|
|
790
|
+
const menuActions = useMenuActions2(actions);
|
|
791
|
+
return /* @__PURE__ */ React7.createElement(Menu2.Root, {
|
|
792
|
+
...menuActions,
|
|
690
793
|
alwaysActive: true,
|
|
691
794
|
onAction
|
|
692
|
-
}, /* @__PURE__ */
|
|
693
|
-
|
|
694
|
-
|
|
795
|
+
}, /* @__PURE__ */ React7.createElement(Menu2.Toolbar, {
|
|
796
|
+
...composableProps2(props),
|
|
797
|
+
ref: forwardedRef
|
|
695
798
|
}));
|
|
696
|
-
};
|
|
799
|
+
});
|
|
697
800
|
NavBar.displayName = NAVBAR_NAME;
|
|
698
801
|
|
|
699
802
|
// src/components/SimpleLayout/Main.tsx
|
|
@@ -705,7 +808,7 @@ var Main = () => {
|
|
|
705
808
|
const { keyboardOpen } = useMobileLayout(MAIN_NAME);
|
|
706
809
|
const { actions, onAction } = useNavbarActions();
|
|
707
810
|
const appBarProps = useAppBarProps();
|
|
708
|
-
const placeholder = useMemo5(() => /* @__PURE__ */
|
|
811
|
+
const placeholder = useMemo5(() => /* @__PURE__ */ React8.createElement(Loading, null), []);
|
|
709
812
|
const { graph } = useAppGraph5();
|
|
710
813
|
const node = useNode2(graph, id);
|
|
711
814
|
const data = useMemo5(() => {
|
|
@@ -724,85 +827,83 @@ var Main = () => {
|
|
|
724
827
|
]);
|
|
725
828
|
useExpandPath(id);
|
|
726
829
|
const showNavBar = !keyboardOpen && !state.isPopover && state.drawerState === "closed";
|
|
727
|
-
return /* @__PURE__ */
|
|
728
|
-
|
|
729
|
-
className:
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
830
|
+
return /* @__PURE__ */ React8.createElement(Panel.Root, {
|
|
831
|
+
...attentionAttrs,
|
|
832
|
+
className: "dx-document"
|
|
833
|
+
}, /* @__PURE__ */ React8.createElement(Panel.Toolbar, {
|
|
834
|
+
asChild: true
|
|
835
|
+
}, /* @__PURE__ */ React8.createElement(AppBar, appBarProps)), /* @__PURE__ */ React8.createElement(Panel.Content, {
|
|
836
|
+
role: "article",
|
|
837
|
+
className: "bg-base-surface"
|
|
838
|
+
}, /* @__PURE__ */ React8.createElement(Surface2.Surface, {
|
|
734
839
|
key: id,
|
|
735
840
|
role: "article",
|
|
736
841
|
data,
|
|
737
842
|
limit: 1,
|
|
738
843
|
fallback: ErrorFallback,
|
|
739
844
|
placeholder
|
|
740
|
-
})), showNavBar && /* @__PURE__ */
|
|
741
|
-
|
|
845
|
+
})), showNavBar && /* @__PURE__ */ React8.createElement(Panel.Statusbar, {
|
|
846
|
+
asChild: true
|
|
847
|
+
}, /* @__PURE__ */ React8.createElement(NavBar, {
|
|
742
848
|
actions,
|
|
743
849
|
onAction
|
|
744
|
-
}));
|
|
850
|
+
})));
|
|
745
851
|
};
|
|
746
852
|
Main.displayName = MAIN_NAME;
|
|
747
853
|
|
|
748
854
|
// src/components/NavBranch/NavBranch.tsx
|
|
749
|
-
import
|
|
855
|
+
import React9, { useCallback as useCallback5, useEffect as useEffect5, useMemo as useMemo6, useRef as useRef4 } from "react";
|
|
750
856
|
import { useOperationInvoker as useOperationInvoker3 } from "@dxos/app-framework/ui";
|
|
751
857
|
import { LayoutOperation as LayoutOperation3 } from "@dxos/app-toolkit";
|
|
752
858
|
import { useAppGraph as useAppGraph6 } from "@dxos/app-toolkit/ui";
|
|
753
859
|
import { useConnections as useConnections3 } from "@dxos/plugin-graph";
|
|
754
|
-
import { Avatar as Avatar2, Icon as Icon2,
|
|
860
|
+
import { Avatar as Avatar2, Icon as Icon2, ScrollArea as ScrollArea2, toLocalizedString as toLocalizedString4, useTranslation as useTranslation5 } from "@dxos/react-ui";
|
|
755
861
|
import { Card as Card3 } from "@dxos/react-ui";
|
|
756
862
|
import { Mosaic as Mosaic2 } from "@dxos/react-ui-mosaic";
|
|
757
|
-
import {
|
|
758
|
-
import { mx as
|
|
863
|
+
import { SearchPanel as SearchPanel2, useSearchListItem as useSearchListItem2, useSearchListResults as useSearchListResults2 } from "@dxos/react-ui-search";
|
|
864
|
+
import { mx as mx3 } from "@dxos/ui-theme";
|
|
759
865
|
var NavBranch = ({ id }) => {
|
|
760
866
|
const { t } = useTranslation5(meta.id);
|
|
761
867
|
const { graph } = useAppGraph6();
|
|
762
868
|
useExpandPath(id);
|
|
763
869
|
const children = useConnections3(graph, id, "child");
|
|
764
|
-
const visibleChildren = useMemo6(() => children.filter((node) => node.properties.disposition !== "alternate-tree"), [
|
|
870
|
+
const visibleChildren = useMemo6(() => children.filter((node) => node.properties.disposition !== "alternate-tree" && node.properties.disposition !== "hidden"), [
|
|
765
871
|
children
|
|
766
872
|
]);
|
|
767
873
|
const { results, handleSearch } = useSearchListResults2({
|
|
768
874
|
items: visibleChildren,
|
|
769
875
|
extract: (child) => toLocalizedString4(child.properties.label, t)
|
|
770
876
|
});
|
|
771
|
-
return /* @__PURE__ */
|
|
877
|
+
return /* @__PURE__ */ React9.createElement(SearchPanel2, {
|
|
772
878
|
onSearch: handleSearch
|
|
773
|
-
}, /* @__PURE__ */
|
|
774
|
-
asChild: true
|
|
775
|
-
}, /* @__PURE__ */ React8.createElement(Toolbar3.Root, null, /* @__PURE__ */ React8.createElement(SearchList2.Input, {
|
|
776
|
-
placeholder: t("search placeholder"),
|
|
777
|
-
autoFocus: true
|
|
778
|
-
}))), /* @__PURE__ */ React8.createElement(Panel2.Content, {
|
|
779
|
-
asChild: true
|
|
780
|
-
}, /* @__PURE__ */ React8.createElement(SearchList2.Content, null, /* @__PURE__ */ React8.createElement(Mosaic2.Container, {
|
|
879
|
+
}, /* @__PURE__ */ React9.createElement(Mosaic2.Container, {
|
|
781
880
|
asChild: true
|
|
782
|
-
}, /* @__PURE__ */
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
}, /* @__PURE__ */
|
|
881
|
+
}, /* @__PURE__ */ React9.createElement(ScrollArea2.Root, {
|
|
882
|
+
centered: true,
|
|
883
|
+
padding: true,
|
|
884
|
+
thin: true
|
|
885
|
+
}, /* @__PURE__ */ React9.createElement(ScrollArea2.Viewport, null, /* @__PURE__ */ React9.createElement(Mosaic2.Stack, {
|
|
886
|
+
classNames: "gap-1",
|
|
887
|
+
draggable: false,
|
|
787
888
|
items: results,
|
|
788
|
-
getId: (
|
|
889
|
+
getId: (item) => item.id,
|
|
789
890
|
Tile: NavBranchTile
|
|
790
|
-
})))))
|
|
891
|
+
})))));
|
|
791
892
|
};
|
|
792
893
|
var NavBranchTile = (props) => {
|
|
793
894
|
const data = props.data;
|
|
794
895
|
const { t } = useTranslation5(meta.id);
|
|
795
|
-
const {
|
|
796
|
-
const ref =
|
|
896
|
+
const { invokePromise } = useOperationInvoker3();
|
|
897
|
+
const ref = useRef4(null);
|
|
797
898
|
const { selectedValue, registerItem, unregisterItem } = useSearchListItem2();
|
|
798
899
|
const isSelected = selectedValue === data.id;
|
|
799
900
|
const name = toLocalizedString4(data.properties.label, t);
|
|
800
|
-
const handleSelect =
|
|
901
|
+
const handleSelect = useCallback5(() => void invokePromise(LayoutOperation3.Open, {
|
|
801
902
|
subject: [
|
|
802
903
|
data.id
|
|
803
904
|
]
|
|
804
905
|
}), [
|
|
805
|
-
|
|
906
|
+
invokePromise,
|
|
806
907
|
data.id
|
|
807
908
|
]);
|
|
808
909
|
useEffect5(() => {
|
|
@@ -826,37 +927,35 @@ var NavBranchTile = (props) => {
|
|
|
826
927
|
}, [
|
|
827
928
|
isSelected
|
|
828
929
|
]);
|
|
829
|
-
return /* @__PURE__ */
|
|
930
|
+
return /* @__PURE__ */ React9.createElement(Card3.Root, {
|
|
830
931
|
ref,
|
|
831
932
|
role: "button",
|
|
832
933
|
fullWidth: true,
|
|
833
934
|
tabIndex: -1,
|
|
834
935
|
"data-selected": isSelected,
|
|
835
|
-
classNames:
|
|
936
|
+
classNames: mx3("dx-focus-ring cursor-pointer", isSelected && "bg-hover-overlay"),
|
|
836
937
|
onClick: handleSelect
|
|
837
|
-
}, /* @__PURE__ */
|
|
838
|
-
density: "coarse"
|
|
839
|
-
}, /* @__PURE__ */ React8.createElement(Avatar2.Root, null, /* @__PURE__ */ React8.createElement(Avatar2.Content, {
|
|
938
|
+
}, /* @__PURE__ */ React9.createElement(Card3.Toolbar, null, /* @__PURE__ */ React9.createElement(Avatar2.Root, null, /* @__PURE__ */ React9.createElement(Avatar2.Content, {
|
|
840
939
|
hue: data.properties.hue,
|
|
841
940
|
icon: data.properties.icon,
|
|
842
941
|
hueVariant: "transparent",
|
|
843
942
|
variant: "square",
|
|
844
|
-
size:
|
|
943
|
+
size: 8,
|
|
845
944
|
fallback: name
|
|
846
|
-
}), /* @__PURE__ */
|
|
945
|
+
}), /* @__PURE__ */ React9.createElement(Avatar2.Label, null, name), /* @__PURE__ */ React9.createElement(Icon2, {
|
|
847
946
|
icon: "ph--caret-right--regular"
|
|
848
947
|
}))));
|
|
849
948
|
};
|
|
850
949
|
|
|
851
950
|
// src/hooks/useSimpleLayoutState.ts
|
|
852
951
|
import { RegistryContext, useAtomValue as useAtomValue3 } from "@effect-atom/atom-react";
|
|
853
|
-
import { useCallback as
|
|
952
|
+
import { useCallback as useCallback6, useContext } from "react";
|
|
854
953
|
import { useCapability as useCapability2 } from "@dxos/app-framework/ui";
|
|
855
954
|
var useSimpleLayoutState = () => {
|
|
856
955
|
const registry = useContext(RegistryContext);
|
|
857
956
|
const stateAtom = useCapability2(SimpleLayoutState);
|
|
858
957
|
const state = useAtomValue3(stateAtom);
|
|
859
|
-
const updateState =
|
|
958
|
+
const updateState = useCallback6((fn) => {
|
|
860
959
|
registry.set(stateAtom, fn(registry.get(stateAtom)));
|
|
861
960
|
}, [
|
|
862
961
|
registry,
|
|
@@ -880,7 +979,7 @@ var useDrawerActions = (consumerName) => {
|
|
|
880
979
|
const state = get(stateAtom);
|
|
881
980
|
const { nodes, edges } = createCompanionActions(graph, stateAtom, get, {
|
|
882
981
|
idPrefix: "drawer",
|
|
883
|
-
selectedVariant: state.companionVariant,
|
|
982
|
+
selectedVariant: state.drawerState !== "closed" ? state.companionVariant : void 0,
|
|
884
983
|
updateState
|
|
885
984
|
});
|
|
886
985
|
const gapSeparator = createGapSeparator("drawer-gap");
|
|
@@ -1008,7 +1107,7 @@ var useNavbarActions = () => {
|
|
|
1008
1107
|
};
|
|
1009
1108
|
|
|
1010
1109
|
// src/components/Dialog/Dialog.tsx
|
|
1011
|
-
import
|
|
1110
|
+
import React10 from "react";
|
|
1012
1111
|
import { Surface as Surface3 } from "@dxos/app-framework/ui";
|
|
1013
1112
|
import { AlertDialog, Dialog as NaturalDialog } from "@dxos/react-ui";
|
|
1014
1113
|
import { ErrorFallback as ErrorFallback2 } from "@dxos/react-ui";
|
|
@@ -1016,23 +1115,23 @@ var Dialog = () => {
|
|
|
1016
1115
|
const { state, updateState } = useSimpleLayoutState();
|
|
1017
1116
|
const DialogRoot = state.dialogType === "alert" ? AlertDialog.Root : NaturalDialog.Root;
|
|
1018
1117
|
const DialogOverlay = state.dialogType === "alert" ? AlertDialog.Overlay : NaturalDialog.Overlay;
|
|
1019
|
-
return /* @__PURE__ */
|
|
1118
|
+
return /* @__PURE__ */ React10.createElement(DialogRoot, {
|
|
1020
1119
|
modal: state.dialogBlockAlign !== "end",
|
|
1021
1120
|
open: state.dialogOpen,
|
|
1022
1121
|
onOpenChange: (nextOpen) => updateState((state2) => ({
|
|
1023
1122
|
...state2,
|
|
1024
1123
|
dialogOpen: nextOpen
|
|
1025
1124
|
}))
|
|
1026
|
-
}, state.dialogBlockAlign === "end" ? /* @__PURE__ */
|
|
1125
|
+
}, state.dialogBlockAlign === "end" ? /* @__PURE__ */ React10.createElement(Surface3.Surface, {
|
|
1027
1126
|
role: "dialog",
|
|
1028
1127
|
data: state.dialogContent,
|
|
1029
1128
|
limit: 1,
|
|
1030
1129
|
fallback: ErrorFallback2
|
|
1031
|
-
}) : /* @__PURE__ */
|
|
1130
|
+
}) : /* @__PURE__ */ React10.createElement(DialogOverlay, {
|
|
1032
1131
|
blockAlign: state.dialogBlockAlign,
|
|
1033
1132
|
classNames: state.dialogOverlayClasses,
|
|
1034
1133
|
style: state.dialogOverlayStyle
|
|
1035
|
-
}, /* @__PURE__ */
|
|
1134
|
+
}, /* @__PURE__ */ React10.createElement(Surface3.Surface, {
|
|
1036
1135
|
role: "dialog",
|
|
1037
1136
|
data: state.dialogContent,
|
|
1038
1137
|
limit: 1,
|
|
@@ -1041,18 +1140,18 @@ var Dialog = () => {
|
|
|
1041
1140
|
};
|
|
1042
1141
|
|
|
1043
1142
|
// src/components/SimpleLayout/Drawer.tsx
|
|
1044
|
-
import
|
|
1143
|
+
import React11, { useMemo as useMemo9 } from "react";
|
|
1045
1144
|
import { Surface as Surface4 } from "@dxos/app-framework/ui";
|
|
1046
1145
|
import { getCompanionVariant as getCompanionVariant2 } from "@dxos/app-toolkit";
|
|
1047
1146
|
import { useAppGraph as useAppGraph9 } from "@dxos/app-toolkit/ui";
|
|
1048
1147
|
import { useNode as useNode3 } from "@dxos/plugin-graph";
|
|
1049
|
-
import { ErrorFallback as ErrorFallback3, Panel as
|
|
1148
|
+
import { ErrorFallback as ErrorFallback3, Panel as Panel2 } from "@dxos/react-ui";
|
|
1050
1149
|
import { Menu as Menu3, useMenuActions as useMenuActions3 } from "@dxos/react-ui-menu";
|
|
1051
1150
|
var DRAWER_NAME = "SimpleLayout.Drawer";
|
|
1052
1151
|
var Drawer = () => {
|
|
1053
1152
|
const { graph } = useAppGraph9();
|
|
1054
1153
|
const { state: layoutState } = useSimpleLayoutState();
|
|
1055
|
-
const placeholder = useMemo9(() => /* @__PURE__ */
|
|
1154
|
+
const placeholder = useMemo9(() => /* @__PURE__ */ React11.createElement(Loading, null), []);
|
|
1056
1155
|
const activeId = layoutState.active ?? layoutState.workspace;
|
|
1057
1156
|
const companions = useCompanions(activeId);
|
|
1058
1157
|
const { companionId, variant } = useSelectedCompanion(companions, layoutState.companionVariant);
|
|
@@ -1073,16 +1172,12 @@ var Drawer = () => {
|
|
|
1073
1172
|
variant
|
|
1074
1173
|
]);
|
|
1075
1174
|
const { actions, onAction } = useDrawerActions(DRAWER_NAME);
|
|
1076
|
-
const
|
|
1077
|
-
return /* @__PURE__ */
|
|
1078
|
-
...
|
|
1175
|
+
const menuActions = useMenuActions3(actions);
|
|
1176
|
+
return /* @__PURE__ */ React11.createElement(Panel2.Root, null, /* @__PURE__ */ React11.createElement(Panel2.Toolbar, null, /* @__PURE__ */ React11.createElement(Menu3.Root, {
|
|
1177
|
+
...menuActions,
|
|
1079
1178
|
alwaysActive: true,
|
|
1080
1179
|
onAction
|
|
1081
|
-
}, /* @__PURE__ */
|
|
1082
|
-
density: "coarse"
|
|
1083
|
-
}))), /* @__PURE__ */ React10.createElement(Panel3.Content, {
|
|
1084
|
-
asChild: true
|
|
1085
|
-
}, /* @__PURE__ */ React10.createElement(Surface4.Surface, {
|
|
1180
|
+
}, /* @__PURE__ */ React11.createElement(Menu3.Toolbar, null))), /* @__PURE__ */ React11.createElement(Panel2.Content, null, /* @__PURE__ */ React11.createElement(Surface4.Surface, {
|
|
1086
1181
|
role: "article",
|
|
1087
1182
|
data,
|
|
1088
1183
|
limit: 1,
|
|
@@ -1121,38 +1216,36 @@ var SimpleLayout = () => {
|
|
|
1121
1216
|
const { state } = useSimpleLayoutState();
|
|
1122
1217
|
const [keyboardOpen, setKeyboardOpen] = useState3(false);
|
|
1123
1218
|
const [splitterMode, setSplitterMode] = useState3("upper");
|
|
1124
|
-
const drawerRef =
|
|
1125
|
-
|
|
1126
|
-
if (keyboardOpen) {
|
|
1127
|
-
const activeElement = document.activeElement;
|
|
1128
|
-
const drawerHasFocus = drawerRef.current?.contains(activeElement);
|
|
1129
|
-
setSplitterMode(drawerHasFocus ? "lower" : "upper");
|
|
1130
|
-
} else {
|
|
1219
|
+
const drawerRef = useRef5(null);
|
|
1220
|
+
useLayoutEffect2(() => {
|
|
1221
|
+
if (!keyboardOpen) {
|
|
1131
1222
|
setSplitterMode(state.drawerState === "closed" ? "upper" : state.drawerState === "open" ? "both" : "lower");
|
|
1132
1223
|
}
|
|
1133
1224
|
}, [
|
|
1134
1225
|
state.drawerState,
|
|
1135
1226
|
keyboardOpen
|
|
1136
1227
|
]);
|
|
1137
|
-
return /* @__PURE__ */
|
|
1138
|
-
|
|
1139
|
-
}, /* @__PURE__ */
|
|
1228
|
+
return /* @__PURE__ */ React12.createElement(DebugOverlay.Root, {
|
|
1229
|
+
enabled: false
|
|
1230
|
+
}, /* @__PURE__ */ React12.createElement(PopoverRoot, null, /* @__PURE__ */ React12.createElement(Mosaic3.Root, {
|
|
1231
|
+
classNames: "dx-container grid relative"
|
|
1232
|
+
}, /* @__PURE__ */ React12.createElement(MobileLayout.Root, {
|
|
1140
1233
|
classNames: "bg-toolbar-surface",
|
|
1141
|
-
onKeyboardOpenChange: (
|
|
1142
|
-
}, /* @__PURE__ */
|
|
1234
|
+
onKeyboardOpenChange: (nextKeyboardOpen) => setKeyboardOpen(nextKeyboardOpen)
|
|
1235
|
+
}, /* @__PURE__ */ React12.createElement(MobileLayout.Panel, {
|
|
1143
1236
|
safe: {
|
|
1144
1237
|
top: true,
|
|
1145
1238
|
bottom: splitterMode === "upper"
|
|
1146
1239
|
}
|
|
1147
|
-
}, /* @__PURE__ */
|
|
1240
|
+
}, /* @__PURE__ */ React12.createElement(Splitter.Root, {
|
|
1148
1241
|
mode: splitterMode,
|
|
1149
1242
|
ratio: 0.55
|
|
1150
|
-
}, /* @__PURE__ */
|
|
1243
|
+
}, /* @__PURE__ */ React12.createElement(Splitter.Panel, {
|
|
1151
1244
|
position: "upper"
|
|
1152
|
-
}, /* @__PURE__ */
|
|
1245
|
+
}, /* @__PURE__ */ React12.createElement(Main, null)), /* @__PURE__ */ React12.createElement(Splitter.Panel, {
|
|
1153
1246
|
position: "lower",
|
|
1154
1247
|
ref: drawerRef
|
|
1155
|
-
}, /* @__PURE__ */
|
|
1248
|
+
}, /* @__PURE__ */ React12.createElement(Drawer, null))), /* @__PURE__ */ React12.createElement(Dialog, null), /* @__PURE__ */ React12.createElement(PopoverContent, null))))));
|
|
1156
1249
|
};
|
|
1157
1250
|
|
|
1158
1251
|
export {
|
|
@@ -1160,4 +1253,4 @@ export {
|
|
|
1160
1253
|
SimpleLayout,
|
|
1161
1254
|
NavBranch
|
|
1162
1255
|
};
|
|
1163
|
-
//# sourceMappingURL=chunk-
|
|
1256
|
+
//# sourceMappingURL=chunk-J5FQ32AV.mjs.map
|