@mxmweb/zui-layouts 1.3.5 → 1.3.9
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/index.js +431 -396
- package/lib_enter.d.ts +1 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as b, Fragment as ye } from "react/jsx-runtime";
|
|
2
2
|
import * as S from "react";
|
|
3
|
-
import
|
|
3
|
+
import k, { forwardRef as Ce, createElement as se } from "react";
|
|
4
4
|
import l from "styled-components";
|
|
5
|
-
import { useTheme as
|
|
6
|
-
import { GoogleNavbar as
|
|
5
|
+
import { useTheme as ce, deepMergeTheme as G, defaultTheme as A, ThemeProvider as Ae } from "@mxmweb/zui-theme";
|
|
6
|
+
import { GoogleNavbar as Te, CustomDock as Fe } from "@mxmweb/zui-components";
|
|
7
7
|
/**
|
|
8
8
|
* React Router v6.30.1
|
|
9
9
|
*
|
|
@@ -14,33 +14,33 @@ import { GoogleNavbar as Ae, CustomDock as Te } from "@mxmweb/zui-components";
|
|
|
14
14
|
*
|
|
15
15
|
* @license MIT
|
|
16
16
|
*/
|
|
17
|
-
const Se = /* @__PURE__ */ S.createContext(null);
|
|
18
|
-
process.env.NODE_ENV !== "production" && (Se.displayName = "DataRouter");
|
|
19
|
-
const Fe = /* @__PURE__ */ S.createContext(null);
|
|
20
|
-
process.env.NODE_ENV !== "production" && (Fe.displayName = "DataRouterState");
|
|
21
|
-
const Me = /* @__PURE__ */ S.createContext(null);
|
|
22
|
-
process.env.NODE_ENV !== "production" && (Me.displayName = "Await");
|
|
23
17
|
const ze = /* @__PURE__ */ S.createContext(null);
|
|
24
|
-
process.env.NODE_ENV !== "production" && (ze.displayName = "
|
|
18
|
+
process.env.NODE_ENV !== "production" && (ze.displayName = "DataRouter");
|
|
19
|
+
const Me = /* @__PURE__ */ S.createContext(null);
|
|
20
|
+
process.env.NODE_ENV !== "production" && (Me.displayName = "DataRouterState");
|
|
25
21
|
const Re = /* @__PURE__ */ S.createContext(null);
|
|
26
|
-
process.env.NODE_ENV !== "production" && (Re.displayName = "
|
|
27
|
-
const
|
|
22
|
+
process.env.NODE_ENV !== "production" && (Re.displayName = "Await");
|
|
23
|
+
const We = /* @__PURE__ */ S.createContext(null);
|
|
24
|
+
process.env.NODE_ENV !== "production" && (We.displayName = "Navigation");
|
|
25
|
+
const Oe = /* @__PURE__ */ S.createContext(null);
|
|
26
|
+
process.env.NODE_ENV !== "production" && (Oe.displayName = "Location");
|
|
27
|
+
const $e = /* @__PURE__ */ S.createContext({
|
|
28
28
|
outlet: null,
|
|
29
29
|
matches: [],
|
|
30
30
|
isDataRoute: !1
|
|
31
31
|
});
|
|
32
|
-
process.env.NODE_ENV !== "production" && (
|
|
33
|
-
const
|
|
34
|
-
process.env.NODE_ENV !== "production" && (
|
|
35
|
-
const
|
|
36
|
-
function
|
|
37
|
-
let o = S.useContext(
|
|
38
|
-
return o && /* @__PURE__ */ S.createElement(
|
|
32
|
+
process.env.NODE_ENV !== "production" && ($e.displayName = "Route");
|
|
33
|
+
const Le = /* @__PURE__ */ S.createContext(null);
|
|
34
|
+
process.env.NODE_ENV !== "production" && (Le.displayName = "RouteError");
|
|
35
|
+
const je = /* @__PURE__ */ S.createContext(null);
|
|
36
|
+
function He(e) {
|
|
37
|
+
let o = S.useContext($e).outlet;
|
|
38
|
+
return o && /* @__PURE__ */ S.createElement(je.Provider, {
|
|
39
39
|
value: e
|
|
40
40
|
}, o);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
return
|
|
42
|
+
function Ee(e) {
|
|
43
|
+
return He(e.context);
|
|
44
44
|
}
|
|
45
45
|
new Promise(() => {
|
|
46
46
|
});
|
|
@@ -50,14 +50,14 @@ new Promise(() => {
|
|
|
50
50
|
* This source code is licensed under the ISC license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
52
|
*/
|
|
53
|
-
const
|
|
53
|
+
const Ve = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Be = (...e) => e.filter((o, n, p) => !!o && o.trim() !== "" && p.indexOf(o) === n).join(" ").trim();
|
|
54
54
|
/**
|
|
55
55
|
* @license lucide-react v0.456.0 - ISC
|
|
56
56
|
*
|
|
57
57
|
* This source code is licensed under the ISC license.
|
|
58
58
|
* See the LICENSE file in the root directory of this source tree.
|
|
59
59
|
*/
|
|
60
|
-
var
|
|
60
|
+
var _e = {
|
|
61
61
|
xmlns: "http://www.w3.org/2000/svg",
|
|
62
62
|
width: 24,
|
|
63
63
|
height: 24,
|
|
@@ -74,31 +74,31 @@ var He = {
|
|
|
74
74
|
* This source code is licensed under the ISC license.
|
|
75
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
76
|
*/
|
|
77
|
-
const
|
|
77
|
+
const Pe = Ce(
|
|
78
78
|
({
|
|
79
79
|
color: e = "currentColor",
|
|
80
80
|
size: o = 24,
|
|
81
81
|
strokeWidth: n = 2,
|
|
82
|
-
absoluteStrokeWidth:
|
|
82
|
+
absoluteStrokeWidth: p,
|
|
83
83
|
className: a = "",
|
|
84
|
-
children:
|
|
85
|
-
iconNode:
|
|
86
|
-
...
|
|
87
|
-
},
|
|
84
|
+
children: x,
|
|
85
|
+
iconNode: M,
|
|
86
|
+
...T
|
|
87
|
+
}, L) => se(
|
|
88
88
|
"svg",
|
|
89
89
|
{
|
|
90
|
-
ref:
|
|
91
|
-
...
|
|
90
|
+
ref: L,
|
|
91
|
+
..._e,
|
|
92
92
|
width: o,
|
|
93
93
|
height: o,
|
|
94
94
|
stroke: e,
|
|
95
|
-
strokeWidth:
|
|
96
|
-
className:
|
|
97
|
-
...
|
|
95
|
+
strokeWidth: p ? Number(n) * 24 / Number(o) : n,
|
|
96
|
+
className: Be("lucide", a),
|
|
97
|
+
...T
|
|
98
98
|
},
|
|
99
99
|
[
|
|
100
|
-
...
|
|
101
|
-
...Array.isArray(
|
|
100
|
+
...M.map(([F, s]) => se(F, s)),
|
|
101
|
+
...Array.isArray(x) ? x : [x]
|
|
102
102
|
]
|
|
103
103
|
)
|
|
104
104
|
);
|
|
@@ -108,12 +108,12 @@ const _e = ve(
|
|
|
108
108
|
* This source code is licensed under the ISC license.
|
|
109
109
|
* See the LICENSE file in the root directory of this source tree.
|
|
110
110
|
*/
|
|
111
|
-
const
|
|
112
|
-
const n =
|
|
113
|
-
({ className:
|
|
114
|
-
ref:
|
|
111
|
+
const De = (e, o) => {
|
|
112
|
+
const n = Ce(
|
|
113
|
+
({ className: p, ...a }, x) => se(Pe, {
|
|
114
|
+
ref: x,
|
|
115
115
|
iconNode: o,
|
|
116
|
-
className:
|
|
116
|
+
className: Be(`lucide-${Ve(e)}`, p),
|
|
117
117
|
...a
|
|
118
118
|
})
|
|
119
119
|
);
|
|
@@ -125,7 +125,7 @@ const Ce = (e, o) => {
|
|
|
125
125
|
* This source code is licensed under the ISC license.
|
|
126
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
127
127
|
*/
|
|
128
|
-
const
|
|
128
|
+
const Ge = De("ArrowLeft", [
|
|
129
129
|
["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
|
|
130
130
|
["path", { d: "M19 12H5", key: "x3x0zl" }]
|
|
131
131
|
]);
|
|
@@ -135,9 +135,9 @@ const Ve = Ce("ArrowLeft", [
|
|
|
135
135
|
* This source code is licensed under the ISC license.
|
|
136
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
137
|
*/
|
|
138
|
-
const
|
|
138
|
+
const ee = De("ChevronRight", [
|
|
139
139
|
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
140
|
-
]),
|
|
140
|
+
]), Ke = l.div.attrs({
|
|
141
141
|
className: "dashboard-container-wrapper"
|
|
142
142
|
})`
|
|
143
143
|
display: flex;
|
|
@@ -153,8 +153,8 @@ const U = Ce("ChevronRight", [
|
|
|
153
153
|
max-width: 98%;
|
|
154
154
|
position: relative;
|
|
155
155
|
background: ${({ theme: e }) => {
|
|
156
|
-
var o;
|
|
157
|
-
return ((o = e.colors) == null ? void 0 : o.appBackground)
|
|
156
|
+
var o, n;
|
|
157
|
+
return ((o = e.colors) == null ? void 0 : o.dashboardBackground) ?? ((n = e.colors) == null ? void 0 : n.appBackground) ?? "transparent";
|
|
158
158
|
}};
|
|
159
159
|
color: ${({ theme: e }) => {
|
|
160
160
|
var o;
|
|
@@ -164,11 +164,14 @@ const U = Ce("ChevronRight", [
|
|
|
164
164
|
var o, n;
|
|
165
165
|
return ((n = (o = e.fonts) == null ? void 0 : o.body) == null ? void 0 : n.family) || "PingFang SC, Microsoft YaHei, Arial, sans-serif";
|
|
166
166
|
}};
|
|
167
|
-
`,
|
|
167
|
+
`, Ye = l.div.attrs({
|
|
168
168
|
className: "dashboard-container-header"
|
|
169
169
|
})`
|
|
170
170
|
display: flex;
|
|
171
|
-
height:
|
|
171
|
+
height: ${({ theme: e }) => {
|
|
172
|
+
var o;
|
|
173
|
+
return ((o = e.space) == null ? void 0 : o.dashboardHeaderHeight) ?? "38px";
|
|
174
|
+
}};
|
|
172
175
|
z-index: 10;
|
|
173
176
|
background: transparent;
|
|
174
177
|
gap: ${({ theme: e }) => {
|
|
@@ -180,7 +183,7 @@ const U = Ce("ChevronRight", [
|
|
|
180
183
|
justify-content: flex-start;
|
|
181
184
|
width: 100%;
|
|
182
185
|
min-width: 0; /* 确保 flex 子元素可以收缩 */
|
|
183
|
-
`,
|
|
186
|
+
`, qe = l.button.attrs({
|
|
184
187
|
className: "dashboard-container-back-button"
|
|
185
188
|
})`
|
|
186
189
|
display: flex;
|
|
@@ -224,7 +227,7 @@ const U = Ce("ChevronRight", [
|
|
|
224
227
|
return ((o = e.colors) == null ? void 0 : o.primaryActive) || ((n = e.colors) == null ? void 0 : n.primary) || "#2D4BE0";
|
|
225
228
|
}};
|
|
226
229
|
}
|
|
227
|
-
`,
|
|
230
|
+
`, Ze = l.div.attrs({
|
|
228
231
|
className: "dashboard-container-title"
|
|
229
232
|
})`
|
|
230
233
|
line-height: ${({ theme: e }) => {
|
|
@@ -257,7 +260,7 @@ const U = Ce("ChevronRight", [
|
|
|
257
260
|
return ((o = e.colors) == null ? void 0 : o.primary) || "#4E6EF2";
|
|
258
261
|
}};
|
|
259
262
|
}
|
|
260
|
-
`,
|
|
263
|
+
`, Xe = l.div.attrs({
|
|
261
264
|
className: "dashboard-container-description"
|
|
262
265
|
})`
|
|
263
266
|
line-height: ${({ theme: e }) => {
|
|
@@ -278,7 +281,7 @@ const U = Ce("ChevronRight", [
|
|
|
278
281
|
var o, n;
|
|
279
282
|
return ((n = (o = e.fonts) == null ? void 0 : o.body) == null ? void 0 : n.size) || "12px";
|
|
280
283
|
}};
|
|
281
|
-
`,
|
|
284
|
+
`, ke = l.div.attrs({
|
|
282
285
|
className: "dashboard-container-breadcrumb"
|
|
283
286
|
})`
|
|
284
287
|
display: flex;
|
|
@@ -288,7 +291,7 @@ const U = Ce("ChevronRight", [
|
|
|
288
291
|
max-width: 50%;
|
|
289
292
|
min-width: 0;
|
|
290
293
|
overflow: hidden;
|
|
291
|
-
`,
|
|
294
|
+
`, oe = l.div.attrs({
|
|
292
295
|
className: "dashboard-container-breadcrumb-item"
|
|
293
296
|
})`
|
|
294
297
|
display: flex;
|
|
@@ -299,8 +302,8 @@ const U = Ce("ChevronRight", [
|
|
|
299
302
|
return ((n = (o = e.fonts) == null ? void 0 : o.body) == null ? void 0 : n.size) || "14px";
|
|
300
303
|
}};
|
|
301
304
|
color: ${({ $isLast: e, theme: o }) => {
|
|
302
|
-
var n,
|
|
303
|
-
return e ? ((n = o.colors) == null ? void 0 : n.text) || "#343a40" : ((
|
|
305
|
+
var n, p, a;
|
|
306
|
+
return e ? ((n = o.colors) == null ? void 0 : n.text) || "#343a40" : ((p = o.colors) == null ? void 0 : p.textSecondary) || ((a = o.colors) == null ? void 0 : a.disabledText) || "#6c757d";
|
|
304
307
|
}};
|
|
305
308
|
font-weight: ${({ $isLast: e }) => e ? "600" : "normal"};
|
|
306
309
|
cursor: ${({ $isClickable: e }) => e ? "pointer" : "default"};
|
|
@@ -316,7 +319,7 @@ const U = Ce("ChevronRight", [
|
|
|
316
319
|
return e ? ((n = o.colors) == null ? void 0 : n.primary) || "#4E6EF2" : "inherit";
|
|
317
320
|
}};
|
|
318
321
|
}
|
|
319
|
-
`,
|
|
322
|
+
`, te = l.div.attrs({
|
|
320
323
|
className: "dashboard-container-breadcrumb-separator"
|
|
321
324
|
})`
|
|
322
325
|
display: flex;
|
|
@@ -326,13 +329,16 @@ const U = Ce("ChevronRight", [
|
|
|
326
329
|
return ((o = e.colors) == null ? void 0 : o.textSecondary) || ((n = e.colors) == null ? void 0 : n.disabledText) || "#6c757d";
|
|
327
330
|
}};
|
|
328
331
|
margin: 0 2px;
|
|
329
|
-
`,
|
|
332
|
+
`, Je = l.div.attrs({
|
|
330
333
|
className: "dashboard-container-content"
|
|
331
334
|
})`
|
|
332
335
|
display: flex;
|
|
333
336
|
flex-direction: column;
|
|
334
337
|
width: 100%;
|
|
335
|
-
height:
|
|
338
|
+
height: ${({ theme: e }) => {
|
|
339
|
+
var o;
|
|
340
|
+
return `calc(100% - ${((o = e.space) == null ? void 0 : o.dashboardHeaderHeight) ?? "38px"} - 10px)`;
|
|
341
|
+
}};
|
|
336
342
|
min-height: 650px;
|
|
337
343
|
overflow: auto;
|
|
338
344
|
background: ${({ theme: e }) => {
|
|
@@ -345,27 +351,31 @@ const U = Ce("ChevronRight", [
|
|
|
345
351
|
return ((o = e.colors) == null ? void 0 : o.dashboardBorder) !== void 0 ? e.colors.dashboardBorder : (n = e.colors) != null && n.border ? `1px solid ${e.colors.border}` : "none";
|
|
346
352
|
}};
|
|
347
353
|
border-radius: ${({ theme: e }) => {
|
|
348
|
-
var o;
|
|
349
|
-
return ((o = e.space) == null ? void 0 : o.radius)
|
|
354
|
+
var o, n, p;
|
|
355
|
+
return ((o = e.space) == null ? void 0 : o.dashboardContentRadius) ?? ((n = e.colors) == null ? void 0 : n.dashboardContentRadius) ?? ((p = e.space) == null ? void 0 : p.radius) ?? "4px";
|
|
350
356
|
}};
|
|
351
357
|
/* 优先使用 dashboardShadow,如果没有则使用 shadow */
|
|
352
358
|
box-shadow: ${({ theme: e }) => {
|
|
353
359
|
var o, n;
|
|
354
360
|
return ((o = e.colors) == null ? void 0 : o.dashboardShadow) || ((n = e.colors) == null ? void 0 : n.shadow) || "none";
|
|
355
361
|
}};
|
|
356
|
-
`,
|
|
362
|
+
`, Qe = l.div.attrs({
|
|
357
363
|
className: "dashboard-container-nav"
|
|
358
364
|
})`
|
|
359
365
|
flex: 0 0 ${({ $isOpen: e }) => e ? "72px" : "28px"};
|
|
360
366
|
transition: flex-basis 0.2s ease;
|
|
361
|
-
`,
|
|
367
|
+
`, Ue = l.div.attrs({
|
|
362
368
|
className: "dashboard-container-main-wrapper"
|
|
363
369
|
})`
|
|
364
370
|
display: flex;
|
|
365
371
|
flex-direction: column;
|
|
366
372
|
flex: 1;
|
|
367
373
|
min-width: 0;
|
|
368
|
-
|
|
374
|
+
background: ${({ theme: e }) => {
|
|
375
|
+
var o;
|
|
376
|
+
return ((o = e.colors) == null ? void 0 : o.dashboardMainBackground) ?? "transparent";
|
|
377
|
+
}};
|
|
378
|
+
`, eo = l.div.attrs({
|
|
369
379
|
className: "dashboard-container-main-layout"
|
|
370
380
|
})`
|
|
371
381
|
height: 100%;
|
|
@@ -375,169 +385,169 @@ const U = Ce("ChevronRight", [
|
|
|
375
385
|
var o;
|
|
376
386
|
return ((o = e.space) == null ? void 0 : o.size) || "12px";
|
|
377
387
|
}};
|
|
378
|
-
`,
|
|
388
|
+
`, zo = ({
|
|
379
389
|
children: e,
|
|
380
390
|
goBack: o,
|
|
381
391
|
title: n,
|
|
382
|
-
description:
|
|
392
|
+
description: p,
|
|
383
393
|
breadcrumbs: a,
|
|
384
|
-
dockItems:
|
|
394
|
+
dockItems: x,
|
|
385
395
|
// 以下参数为兼容旧版本保留,当前未使用
|
|
386
|
-
dockActiveMode:
|
|
387
|
-
defaultDockActiveId:
|
|
388
|
-
defaultDockActiveIds:
|
|
389
|
-
styles:
|
|
390
|
-
eventsEmit:
|
|
396
|
+
dockActiveMode: M = "single",
|
|
397
|
+
defaultDockActiveId: T,
|
|
398
|
+
defaultDockActiveIds: L,
|
|
399
|
+
styles: F,
|
|
400
|
+
eventsEmit: s
|
|
391
401
|
}) => {
|
|
392
|
-
const
|
|
402
|
+
const K = ce(), B = G(
|
|
393
403
|
// 基础:默认主题 + useTheme的配置
|
|
394
|
-
|
|
404
|
+
G({ theme: A, mode: "light" }, K),
|
|
395
405
|
// 最高层:用户手动传入的styles
|
|
396
|
-
|
|
397
|
-
),
|
|
398
|
-
|
|
399
|
-
},
|
|
400
|
-
|
|
401
|
-
},
|
|
402
|
-
|
|
403
|
-
},
|
|
404
|
-
|
|
405
|
-
},
|
|
406
|
+
F
|
|
407
|
+
), c = (B == null ? void 0 : B.theme) || A, D = k.useRef(null), I = () => {
|
|
408
|
+
s != null && s.onGoBack ? s.onGoBack() : o && o();
|
|
409
|
+
}, j = () => {
|
|
410
|
+
s != null && s.onTitleClick && s.onTitleClick();
|
|
411
|
+
}, N = (u, r) => {
|
|
412
|
+
s != null && s.onBreadcrumbClick ? s.onBreadcrumbClick(u, r) : u.onClick && u.onClick();
|
|
413
|
+
}, Y = (u, r) => {
|
|
414
|
+
s != null && s.onDockItemClick && s.onDockItemClick(u, r);
|
|
415
|
+
}, H = () => {
|
|
406
416
|
if (!a || a.length === 0) return null;
|
|
407
|
-
const [
|
|
408
|
-
if (!
|
|
417
|
+
const [u, r] = k.useState({ start: 0, end: a.length, showEllipsis: !1 }), R = k.useCallback(() => {
|
|
418
|
+
if (!D.current || a.length <= 3) {
|
|
409
419
|
r({ start: 0, end: a.length, showEllipsis: !1 });
|
|
410
420
|
return;
|
|
411
421
|
}
|
|
412
|
-
const
|
|
413
|
-
let
|
|
414
|
-
if (
|
|
422
|
+
const m = D.current.offsetWidth * 0.5;
|
|
423
|
+
let _ = Math.floor((m - 30) / (120 + 20));
|
|
424
|
+
if (_ < 2 && (_ = 2), _ >= a.length) {
|
|
415
425
|
r({ start: 0, end: a.length, showEllipsis: !1 });
|
|
416
426
|
return;
|
|
417
427
|
}
|
|
418
|
-
const
|
|
428
|
+
const J = 0, O = Math.min(_ - 1, a.length);
|
|
419
429
|
r({
|
|
420
|
-
start:
|
|
421
|
-
end:
|
|
422
|
-
showEllipsis:
|
|
430
|
+
start: J,
|
|
431
|
+
end: O,
|
|
432
|
+
showEllipsis: O < a.length - 1
|
|
423
433
|
});
|
|
424
434
|
}, [a.length]);
|
|
425
|
-
if (
|
|
426
|
-
|
|
427
|
-
const
|
|
428
|
-
|
|
435
|
+
if (k.useEffect(() => {
|
|
436
|
+
R();
|
|
437
|
+
const w = new ResizeObserver(() => {
|
|
438
|
+
R();
|
|
429
439
|
});
|
|
430
|
-
return
|
|
431
|
-
|
|
440
|
+
return D.current && w.observe(D.current), () => {
|
|
441
|
+
w.disconnect();
|
|
432
442
|
};
|
|
433
|
-
}, [
|
|
434
|
-
return /* @__PURE__ */ t(
|
|
443
|
+
}, [R]), a.length <= 3)
|
|
444
|
+
return /* @__PURE__ */ t(ke, { theme: c, children: a.map((w, m) => /* @__PURE__ */ b(k.Fragment, { children: [
|
|
435
445
|
/* @__PURE__ */ t(
|
|
436
|
-
|
|
446
|
+
oe,
|
|
437
447
|
{
|
|
438
|
-
$isLast:
|
|
439
|
-
$isClickable: !!(
|
|
440
|
-
onClick: () =>
|
|
441
|
-
theme:
|
|
442
|
-
title:
|
|
443
|
-
children:
|
|
448
|
+
$isLast: m === a.length - 1,
|
|
449
|
+
$isClickable: !!(m < a.length - 1 || w.onClick),
|
|
450
|
+
onClick: () => N(w, m),
|
|
451
|
+
theme: c,
|
|
452
|
+
title: w.label,
|
|
453
|
+
children: w.label
|
|
444
454
|
}
|
|
445
455
|
),
|
|
446
|
-
|
|
447
|
-
] },
|
|
448
|
-
const { start: V, end:
|
|
449
|
-
return /* @__PURE__ */
|
|
450
|
-
a.slice(V,
|
|
456
|
+
m < a.length - 1 && /* @__PURE__ */ t(te, { theme: c, children: /* @__PURE__ */ t(ee, { size: 14 }) })
|
|
457
|
+
] }, w.id)) });
|
|
458
|
+
const { start: V, end: W, showEllipsis: re } = u;
|
|
459
|
+
return /* @__PURE__ */ b(ke, { theme: c, children: [
|
|
460
|
+
a.slice(V, W).map((w, m) => /* @__PURE__ */ b(k.Fragment, { children: [
|
|
451
461
|
/* @__PURE__ */ t(
|
|
452
|
-
|
|
462
|
+
oe,
|
|
453
463
|
{
|
|
454
|
-
$isLast:
|
|
455
|
-
$isClickable: !!(
|
|
456
|
-
onClick: () =>
|
|
457
|
-
theme:
|
|
458
|
-
title:
|
|
459
|
-
children:
|
|
464
|
+
$isLast: m === W - V - 1 && !re,
|
|
465
|
+
$isClickable: !!(m < W - V - 1 || w.onClick),
|
|
466
|
+
onClick: () => N(w, V + m),
|
|
467
|
+
theme: c,
|
|
468
|
+
title: w.label,
|
|
469
|
+
children: w.label
|
|
460
470
|
}
|
|
461
471
|
),
|
|
462
|
-
|
|
463
|
-
] },
|
|
464
|
-
|
|
465
|
-
/* @__PURE__ */ t(
|
|
472
|
+
m < W - V - 1 && /* @__PURE__ */ t(te, { theme: c, children: /* @__PURE__ */ t(ee, { size: 14 }) })
|
|
473
|
+
] }, w.id)),
|
|
474
|
+
re && /* @__PURE__ */ b(ye, { children: [
|
|
475
|
+
/* @__PURE__ */ t(te, { theme: c, children: /* @__PURE__ */ t(ee, { size: 14 }) }),
|
|
466
476
|
/* @__PURE__ */ t(
|
|
467
|
-
|
|
477
|
+
oe,
|
|
468
478
|
{
|
|
469
479
|
$isLast: !1,
|
|
470
480
|
$isClickable: !1,
|
|
471
|
-
theme:
|
|
481
|
+
theme: c,
|
|
472
482
|
style: {
|
|
473
483
|
cursor: "default",
|
|
474
484
|
maxWidth: "auto"
|
|
475
485
|
},
|
|
476
|
-
title: `${a.slice(
|
|
486
|
+
title: `${a.slice(W, -1).map((w) => w.label).join(" > ")}`,
|
|
477
487
|
children: "..."
|
|
478
488
|
}
|
|
479
489
|
),
|
|
480
|
-
/* @__PURE__ */ t(
|
|
490
|
+
/* @__PURE__ */ t(te, { theme: c, children: /* @__PURE__ */ t(ee, { size: 14 }) }),
|
|
481
491
|
/* @__PURE__ */ t(
|
|
482
|
-
|
|
492
|
+
oe,
|
|
483
493
|
{
|
|
484
494
|
$isLast: !0,
|
|
485
495
|
$isClickable: !!a[a.length - 1].onClick,
|
|
486
|
-
onClick: () =>
|
|
487
|
-
theme:
|
|
496
|
+
onClick: () => N(a[a.length - 1], a.length - 1),
|
|
497
|
+
theme: c,
|
|
488
498
|
title: a[a.length - 1].label,
|
|
489
499
|
children: a[a.length - 1].label
|
|
490
500
|
}
|
|
491
501
|
)
|
|
492
502
|
] })
|
|
493
503
|
] });
|
|
494
|
-
}, [
|
|
495
|
-
return /* @__PURE__ */ t(
|
|
496
|
-
|
|
497
|
-
|
|
504
|
+
}, [E, q] = k.useState(!0);
|
|
505
|
+
return /* @__PURE__ */ t(Ke, { theme: c, children: /* @__PURE__ */ b(eo, { theme: c, children: [
|
|
506
|
+
x && x.length > 0 && /* @__PURE__ */ t(Qe, { $isOpen: E, theme: c, children: /* @__PURE__ */ t(
|
|
507
|
+
Te,
|
|
498
508
|
{
|
|
499
|
-
items:
|
|
500
|
-
open:
|
|
501
|
-
onOpenChange:
|
|
502
|
-
onItemClick: (
|
|
509
|
+
items: x,
|
|
510
|
+
open: E,
|
|
511
|
+
onOpenChange: q,
|
|
512
|
+
onItemClick: (u) => Y({ id: String(u.key), label: u.name }, 0),
|
|
503
513
|
defaultOpen: !0
|
|
504
514
|
}
|
|
505
515
|
) }),
|
|
506
|
-
/* @__PURE__ */
|
|
507
|
-
(n ||
|
|
516
|
+
/* @__PURE__ */ b(Ue, { theme: c, children: [
|
|
517
|
+
(n || p || o || a) && /* @__PURE__ */ b(Ye, { ref: D, theme: c, children: [
|
|
508
518
|
o && /* @__PURE__ */ t(
|
|
509
|
-
|
|
519
|
+
qe,
|
|
510
520
|
{
|
|
511
|
-
onClick:
|
|
512
|
-
theme:
|
|
521
|
+
onClick: I,
|
|
522
|
+
theme: c,
|
|
513
523
|
title: "\u8FD4\u56DE",
|
|
514
|
-
children: /* @__PURE__ */ t(
|
|
524
|
+
children: /* @__PURE__ */ t(Ge, { size: 18 })
|
|
515
525
|
}
|
|
516
526
|
),
|
|
517
|
-
|
|
527
|
+
H(),
|
|
518
528
|
n && /* @__PURE__ */ t(
|
|
519
|
-
|
|
529
|
+
Ze,
|
|
520
530
|
{
|
|
521
|
-
onClick:
|
|
522
|
-
theme:
|
|
531
|
+
onClick: j,
|
|
532
|
+
theme: c,
|
|
523
533
|
title: n,
|
|
524
534
|
children: n
|
|
525
535
|
}
|
|
526
536
|
),
|
|
527
|
-
|
|
528
|
-
|
|
537
|
+
p && /* @__PURE__ */ t(
|
|
538
|
+
Xe,
|
|
529
539
|
{
|
|
530
|
-
theme:
|
|
531
|
-
title:
|
|
532
|
-
children:
|
|
540
|
+
theme: c,
|
|
541
|
+
title: p,
|
|
542
|
+
children: p
|
|
533
543
|
}
|
|
534
544
|
)
|
|
535
545
|
] }),
|
|
536
|
-
/* @__PURE__ */ t(
|
|
546
|
+
/* @__PURE__ */ t(Je, { theme: c, children: e || /* @__PURE__ */ t(Ee, {}) })
|
|
537
547
|
] })
|
|
538
548
|
] }) });
|
|
539
|
-
},
|
|
540
|
-
shouldForwardProp: (e) => !["backgroundImage", "backgroundColor"].includes(e)
|
|
549
|
+
}, oo = l.div.withConfig({
|
|
550
|
+
shouldForwardProp: (e) => !["backgroundImage", "backgroundColor", "dockPosition"].includes(e)
|
|
541
551
|
})`
|
|
542
552
|
position: fixed;
|
|
543
553
|
top: 0;
|
|
@@ -546,10 +556,16 @@ const U = Ce("ChevronRight", [
|
|
|
546
556
|
height: 100vh;
|
|
547
557
|
background: ${(e) => e.backgroundImage ? `url(${e.backgroundImage}) center/cover no-repeat` : e.backgroundColor || "#1a1a1a"};
|
|
548
558
|
display: flex;
|
|
549
|
-
flex-direction: column;
|
|
559
|
+
flex-direction: ${(e) => e.dockPosition === "left" || e.dockPosition === "right" ? "row" : "column"};
|
|
550
560
|
overflow: hidden;
|
|
551
561
|
z-index: 1;
|
|
552
|
-
`,
|
|
562
|
+
`, to = l.div.attrs({ className: "dock-container-main-area" })`
|
|
563
|
+
flex: 1;
|
|
564
|
+
display: flex;
|
|
565
|
+
flex-direction: column;
|
|
566
|
+
overflow: hidden;
|
|
567
|
+
min-width: 0;
|
|
568
|
+
`, no = l.div`
|
|
553
569
|
height: 48px;
|
|
554
570
|
width: 100%;
|
|
555
571
|
display: flex;
|
|
@@ -558,7 +574,7 @@ const U = Ce("ChevronRight", [
|
|
|
558
574
|
background: transparent;
|
|
559
575
|
z-index: 10;
|
|
560
576
|
flex-shrink: 0;
|
|
561
|
-
`,
|
|
577
|
+
`, ro = l.div`
|
|
562
578
|
flex: 1;
|
|
563
579
|
width: 100%;
|
|
564
580
|
overflow-y: auto;
|
|
@@ -585,78 +601,97 @@ const U = Ce("ChevronRight", [
|
|
|
585
601
|
&::-webkit-scrollbar-thumb:hover {
|
|
586
602
|
background: rgba(255, 255, 255, 0.5);
|
|
587
603
|
}
|
|
588
|
-
`,
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
604
|
+
`, ne = 16, io = 48, ao = io + ne * 2, me = ao + ne * 2, lo = l.div.withConfig({
|
|
605
|
+
shouldForwardProp: (e) => !["dockPosition"].includes(e)
|
|
606
|
+
})`
|
|
607
|
+
${(e) => e.dockPosition === "left" || e.dockPosition === "right" ? `
|
|
608
|
+
width: ${me}px;
|
|
609
|
+
height: 100%;
|
|
610
|
+
display: flex;
|
|
611
|
+
align-items: center;
|
|
612
|
+
justify-content: center;
|
|
613
|
+
padding: ${ne}px;
|
|
614
|
+
` : `
|
|
615
|
+
height: ${me}px;
|
|
616
|
+
width: 100%;
|
|
617
|
+
display: flex;
|
|
618
|
+
align-items: ${e.dockPosition === "top" ? "flex-start" : "flex-end"};
|
|
619
|
+
justify-content: center;
|
|
620
|
+
padding: ${ne}px;
|
|
621
|
+
`}
|
|
595
622
|
background: transparent;
|
|
596
623
|
z-index: 10;
|
|
597
624
|
flex-shrink: 0;
|
|
598
|
-
`,
|
|
625
|
+
`, Mo = ({
|
|
599
626
|
children: e,
|
|
600
627
|
backgroundImage: o,
|
|
601
628
|
backgroundColor: n,
|
|
602
|
-
header:
|
|
629
|
+
header: p,
|
|
603
630
|
dockItems: a,
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
631
|
+
dockPosition: x = "bottom",
|
|
632
|
+
dockActiveMode: M = "single",
|
|
633
|
+
defaultDockActiveId: T,
|
|
634
|
+
defaultDockActiveIds: L,
|
|
635
|
+
styles: F,
|
|
636
|
+
eventsEmit: s
|
|
609
637
|
}) => {
|
|
610
|
-
var
|
|
611
|
-
const
|
|
638
|
+
var E, q;
|
|
639
|
+
const K = ce(), B = G(
|
|
612
640
|
// 基础:默认主题 + useTheme的配置
|
|
613
|
-
|
|
641
|
+
G({ theme: A, mode: "light" }, K),
|
|
614
642
|
// 最高层:用户手动传入的styles
|
|
615
|
-
|
|
616
|
-
),
|
|
617
|
-
|
|
618
|
-
},
|
|
619
|
-
|
|
620
|
-
},
|
|
621
|
-
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
|
|
643
|
+
F
|
|
644
|
+
), c = (B == null ? void 0 : B.theme) || A, D = (u, r) => {
|
|
645
|
+
s != null && s.onDockItemClick ? s.onDockItemClick(u, r) : u.onClick && u.onClick();
|
|
646
|
+
}, I = (u, r) => {
|
|
647
|
+
s != null && s.onDockActiveChange && s.onDockActiveChange(u, r);
|
|
648
|
+
}, j = (u, r) => {
|
|
649
|
+
s != null && s.onDockActiveChangeMultiple && s.onDockActiveChangeMultiple(u, r);
|
|
650
|
+
}, N = x === "left" || x === "right", Y = /* @__PURE__ */ b(ye, { children: [
|
|
651
|
+
p && /* @__PURE__ */ t(no, { children: p }),
|
|
652
|
+
/* @__PURE__ */ t(
|
|
653
|
+
ro,
|
|
654
|
+
{
|
|
655
|
+
style: {
|
|
656
|
+
color: c.colors.text,
|
|
657
|
+
fontFamily: ((q = (E = c.fonts) == null ? void 0 : E.body) == null ? void 0 : q.family) || "PingFang SC, Microsoft YaHei, Arial, sans-serif"
|
|
658
|
+
},
|
|
659
|
+
children: e
|
|
660
|
+
}
|
|
661
|
+
)
|
|
662
|
+
] }), H = a && a.length > 0 && /* @__PURE__ */ t(lo, { dockPosition: x, children: /* @__PURE__ */ t(
|
|
663
|
+
Fe,
|
|
664
|
+
{
|
|
665
|
+
items: a,
|
|
666
|
+
itemWidth: 48,
|
|
667
|
+
itemHeight: 48,
|
|
668
|
+
magnification: 1.5,
|
|
669
|
+
itemGap: 8,
|
|
670
|
+
direction: N ? "vertical" : "horizontal",
|
|
671
|
+
dockPosition: x,
|
|
672
|
+
activeMode: M,
|
|
673
|
+
defaultActiveId: T,
|
|
674
|
+
defaultActiveIds: L,
|
|
675
|
+
onItemClick: D,
|
|
676
|
+
onActiveChange: I,
|
|
677
|
+
onActiveChangeMultiple: j
|
|
678
|
+
}
|
|
679
|
+
) });
|
|
680
|
+
return /* @__PURE__ */ b(
|
|
681
|
+
oo,
|
|
625
682
|
{
|
|
626
683
|
backgroundImage: o,
|
|
627
684
|
backgroundColor: n,
|
|
685
|
+
dockPosition: x,
|
|
628
686
|
children: [
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
style: {
|
|
634
|
-
color: I.colors.text,
|
|
635
|
-
fontFamily: ((T = (L = I.fonts) == null ? void 0 : L.body) == null ? void 0 : T.family) || "PingFang SC, Microsoft YaHei, Arial, sans-serif"
|
|
636
|
-
},
|
|
637
|
-
children: e
|
|
638
|
-
}
|
|
639
|
-
),
|
|
640
|
-
a && a.length > 0 && /* @__PURE__ */ t(to, { children: /* @__PURE__ */ t(
|
|
641
|
-
Te,
|
|
642
|
-
{
|
|
643
|
-
items: a,
|
|
644
|
-
itemWidth: 48,
|
|
645
|
-
itemHeight: 48,
|
|
646
|
-
magnification: 1.5,
|
|
647
|
-
itemGap: 8,
|
|
648
|
-
activeMode: $,
|
|
649
|
-
defaultActiveId: W,
|
|
650
|
-
defaultActiveIds: M,
|
|
651
|
-
onItemClick: s,
|
|
652
|
-
onActiveChange: N,
|
|
653
|
-
onActiveChangeMultiple: A
|
|
654
|
-
}
|
|
655
|
-
) })
|
|
687
|
+
x === "top" && H,
|
|
688
|
+
x === "left" && H,
|
|
689
|
+
N ? /* @__PURE__ */ t(to, { children: Y }) : Y,
|
|
690
|
+
(x === "bottom" || x === "right") && H
|
|
656
691
|
]
|
|
657
692
|
}
|
|
658
693
|
);
|
|
659
|
-
},
|
|
694
|
+
}, so = l.div`
|
|
660
695
|
--header-height: 56px;
|
|
661
696
|
--page-gutter: 16px;
|
|
662
697
|
--sidebar-width: 264px;
|
|
@@ -669,7 +704,7 @@ const U = Ce("ChevronRight", [
|
|
|
669
704
|
min-height: 100vh;
|
|
670
705
|
height: 100vh; /* 以视口高度为基准,便于内部独立滚动布局 */
|
|
671
706
|
position: relative;
|
|
672
|
-
`,
|
|
707
|
+
`, co = l.div`
|
|
673
708
|
position: sticky;
|
|
674
709
|
top: 0;
|
|
675
710
|
z-index: 30;
|
|
@@ -681,16 +716,16 @@ const U = Ce("ChevronRight", [
|
|
|
681
716
|
padding: 0 16px;
|
|
682
717
|
border-bottom: 1px solid rgba(0,0,0,0.06);
|
|
683
718
|
backdrop-filter: blur(8px);
|
|
684
|
-
`,
|
|
719
|
+
`, ho = l.div`
|
|
685
720
|
display: flex;
|
|
686
721
|
align-items: center;
|
|
687
722
|
gap: 12px;
|
|
688
723
|
min-width: 0;
|
|
689
|
-
`,
|
|
724
|
+
`, po = l.div`
|
|
690
725
|
display: flex;
|
|
691
726
|
align-items: center;
|
|
692
727
|
gap: 8px;
|
|
693
|
-
`,
|
|
728
|
+
`, ve = l.button`
|
|
694
729
|
display: inline-flex;
|
|
695
730
|
align-items: center;
|
|
696
731
|
justify-content: center;
|
|
@@ -704,7 +739,7 @@ const U = Ce("ChevronRight", [
|
|
|
704
739
|
|
|
705
740
|
&:hover { background: rgba(0,0,0,0.04); }
|
|
706
741
|
&:active { transform: translateY(1px); }
|
|
707
|
-
`,
|
|
742
|
+
`, uo = l.div`
|
|
708
743
|
display: grid;
|
|
709
744
|
grid-template-columns: var(--sidebar-width) 1fr var(--toc-width);
|
|
710
745
|
gap: 16px;
|
|
@@ -725,9 +760,9 @@ const U = Ce("ChevronRight", [
|
|
|
725
760
|
gap: 12px;
|
|
726
761
|
padding: 12px 12px 20px 12px;
|
|
727
762
|
}
|
|
728
|
-
`,
|
|
763
|
+
`, go = l.aside`
|
|
729
764
|
position: relative;
|
|
730
|
-
`,
|
|
765
|
+
`, fo = l.div`
|
|
731
766
|
height: 100%;
|
|
732
767
|
overflow: hidden;
|
|
733
768
|
padding-right: 8px;
|
|
@@ -736,7 +771,7 @@ const U = Ce("ChevronRight", [
|
|
|
736
771
|
opacity: ${(e) => e.$collapsed ? 0 : 1};
|
|
737
772
|
transform: translateX(${(e) => e.$collapsed ? "-6px" : "0px"});
|
|
738
773
|
pointer-events: ${(e) => e.$collapsed ? "none" : "auto"};
|
|
739
|
-
`,
|
|
774
|
+
`, xo = l.button`
|
|
740
775
|
position: absolute;
|
|
741
776
|
top: 6px;
|
|
742
777
|
right: -10px;
|
|
@@ -751,16 +786,16 @@ const U = Ce("ChevronRight", [
|
|
|
751
786
|
justify-content: center;
|
|
752
787
|
transition: background .15s ease;
|
|
753
788
|
&:hover { background: rgba(0,0,0,0.12); }
|
|
754
|
-
`,
|
|
789
|
+
`, bo = l.div`
|
|
755
790
|
height: 100%;
|
|
756
791
|
overflow: auto;
|
|
757
792
|
padding-right: 8px;
|
|
758
|
-
`,
|
|
793
|
+
`, wo = l.main`
|
|
759
794
|
position: relative;
|
|
760
795
|
min-width: 0;
|
|
761
796
|
height: 100%;
|
|
762
797
|
overflow: auto; /* 文档渲染区独立滚动 */
|
|
763
|
-
`,
|
|
798
|
+
`, ko = l.div`
|
|
764
799
|
width: 100%;
|
|
765
800
|
max-width: var(--content-max);
|
|
766
801
|
margin: 0 auto;
|
|
@@ -768,16 +803,16 @@ const U = Ce("ChevronRight", [
|
|
|
768
803
|
border-radius: 8px;
|
|
769
804
|
padding: 0px 12px;
|
|
770
805
|
padding-bottom: 120px; /* 底部留出足够的 margin,确保可以滚动到最底部 */
|
|
771
|
-
`,
|
|
806
|
+
`, mo = l.div`
|
|
772
807
|
height: 100%;
|
|
773
808
|
transition: opacity .5s ease;
|
|
774
809
|
opacity: ${(e) => e.$opacity};
|
|
775
|
-
`,
|
|
810
|
+
`, vo = l.aside`
|
|
776
811
|
position: relative;
|
|
777
812
|
z-index: 1;
|
|
778
813
|
height: 100%;
|
|
779
814
|
overflow: hidden;
|
|
780
|
-
`,
|
|
815
|
+
`, yo = l.div`
|
|
781
816
|
/* 右侧目录独立滚动 */
|
|
782
817
|
position: relative;
|
|
783
818
|
height: 100%;
|
|
@@ -789,7 +824,7 @@ const U = Ce("ChevronRight", [
|
|
|
789
824
|
border-left: 1px solid rgba(0,0,0,0.06);
|
|
790
825
|
background: transparent;
|
|
791
826
|
z-index: 1;
|
|
792
|
-
`,
|
|
827
|
+
`, Co = l.div`
|
|
793
828
|
transition: opacity .2s ease, transform .2s ease;
|
|
794
829
|
opacity: ${(e) => e.$collapsed ? 0 : 1};
|
|
795
830
|
transform: translateX(${(e) => e.$collapsed ? "6px" : "0px"});
|
|
@@ -814,11 +849,11 @@ l.button`
|
|
|
814
849
|
transition: background .15s ease;
|
|
815
850
|
&:hover { background: rgba(0,0,0,0.12); }
|
|
816
851
|
`;
|
|
817
|
-
const
|
|
852
|
+
const le = l.div`
|
|
818
853
|
font-size: 12px;
|
|
819
854
|
opacity: .7;
|
|
820
855
|
padding: 8px 8px;
|
|
821
|
-
`,
|
|
856
|
+
`, X = l.button`
|
|
822
857
|
width: 100%;
|
|
823
858
|
padding: 8px 10px;
|
|
824
859
|
background: transparent;
|
|
@@ -849,7 +884,7 @@ const ae = l.div`
|
|
|
849
884
|
}
|
|
850
885
|
|
|
851
886
|
${(e) => e.$active ? "background: rgba(0,0,0,0.08); font-weight: 600;" : ""}
|
|
852
|
-
`,
|
|
887
|
+
`, $o = l.div`
|
|
853
888
|
display: flex;
|
|
854
889
|
align-items: center;
|
|
855
890
|
gap: 8px;
|
|
@@ -859,16 +894,16 @@ const ae = l.div`
|
|
|
859
894
|
overflow-y: hidden;
|
|
860
895
|
scrollbar-width: none;
|
|
861
896
|
&::-webkit-scrollbar { display: none; }
|
|
862
|
-
`,
|
|
897
|
+
`, Bo = l.div`
|
|
863
898
|
width: 1px;
|
|
864
899
|
height: 16px;
|
|
865
900
|
background: currentColor;
|
|
866
901
|
opacity: .2;
|
|
867
|
-
`,
|
|
902
|
+
`, Do = {
|
|
868
903
|
theme: {
|
|
869
|
-
...
|
|
904
|
+
...A,
|
|
870
905
|
colors: {
|
|
871
|
-
...
|
|
906
|
+
...A.colors,
|
|
872
907
|
appBackground: "#ffffff",
|
|
873
908
|
panelBackground: "#ffffff",
|
|
874
909
|
dashboardBackground: "#ffffff",
|
|
@@ -878,11 +913,11 @@ const ae = l.div`
|
|
|
878
913
|
shadow: "0 1px 2px rgba(0,0,0,0.06)"
|
|
879
914
|
}
|
|
880
915
|
}
|
|
881
|
-
},
|
|
916
|
+
}, Io = {
|
|
882
917
|
theme: {
|
|
883
|
-
...
|
|
918
|
+
...A,
|
|
884
919
|
colors: {
|
|
885
|
-
...
|
|
920
|
+
...A.colors,
|
|
886
921
|
appBackground: "#0f172a",
|
|
887
922
|
panelBackground: "#111827",
|
|
888
923
|
dashboardBackground: "#0b1220",
|
|
@@ -893,237 +928,237 @@ const ae = l.div`
|
|
|
893
928
|
}
|
|
894
929
|
},
|
|
895
930
|
mode: "dark"
|
|
896
|
-
},
|
|
897
|
-
var
|
|
931
|
+
}, Ro = (e) => {
|
|
932
|
+
var ge, fe, xe, be;
|
|
898
933
|
const {
|
|
899
934
|
children: o,
|
|
900
935
|
headerLogo: n,
|
|
901
|
-
contentKey:
|
|
936
|
+
contentKey: p,
|
|
902
937
|
modules: a,
|
|
903
|
-
activeModuleKey:
|
|
904
|
-
onModuleChange:
|
|
905
|
-
languages:
|
|
906
|
-
activeLanguageKey:
|
|
907
|
-
onLanguageChange:
|
|
908
|
-
themes:
|
|
909
|
-
activeThemeKey:
|
|
910
|
-
onThemeChange:
|
|
911
|
-
sidebarItems:
|
|
912
|
-
activeSidebarId:
|
|
913
|
-
onSidebarItemClick:
|
|
914
|
-
activeTocId:
|
|
915
|
-
onTocItemClick:
|
|
916
|
-
collapsibleSidebar:
|
|
917
|
-
styles:
|
|
918
|
-
} = e,
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
938
|
+
activeModuleKey: x,
|
|
939
|
+
onModuleChange: M,
|
|
940
|
+
languages: T,
|
|
941
|
+
activeLanguageKey: L,
|
|
942
|
+
onLanguageChange: F,
|
|
943
|
+
themes: s,
|
|
944
|
+
activeThemeKey: K,
|
|
945
|
+
onThemeChange: B,
|
|
946
|
+
sidebarItems: c,
|
|
947
|
+
activeSidebarId: D,
|
|
948
|
+
onSidebarItemClick: I,
|
|
949
|
+
activeTocId: j,
|
|
950
|
+
onTocItemClick: N,
|
|
951
|
+
collapsibleSidebar: Y = !0,
|
|
952
|
+
styles: H
|
|
953
|
+
} = e, E = ce(), q = e.activeThemeKey === "dark" ? Io : Do, u = G(
|
|
954
|
+
G(
|
|
955
|
+
G({ theme: A, mode: "light" }, E),
|
|
956
|
+
q
|
|
922
957
|
),
|
|
923
|
-
|
|
924
|
-
), r = (
|
|
925
|
-
|
|
926
|
-
if (
|
|
927
|
-
|
|
958
|
+
H
|
|
959
|
+
), r = (u == null ? void 0 : u.theme) || A, [R, V] = k.useState(!1), [W, re] = k.useState(!1), [w, m] = k.useState(!1), U = typeof j == "string", [de, ie] = k.useState(j), _ = k.useRef(null), [J, O] = k.useState(void 0), [Ie, he] = k.useState(o), [Ne, pe] = k.useState(1);
|
|
960
|
+
k.useEffect(() => {
|
|
961
|
+
if (p === void 0) {
|
|
962
|
+
he(o);
|
|
928
963
|
return;
|
|
929
964
|
}
|
|
930
|
-
|
|
965
|
+
pe(0);
|
|
931
966
|
const i = setTimeout(() => {
|
|
932
|
-
|
|
967
|
+
he(o), requestAnimationFrame(() => pe(1));
|
|
933
968
|
}, 120);
|
|
934
969
|
return () => clearTimeout(i);
|
|
935
|
-
}, [
|
|
936
|
-
var i,
|
|
970
|
+
}, [p, o]), k.useMemo(() => {
|
|
971
|
+
var i, g, h, y, $, d, v, f, P, C, z, Z, Q;
|
|
937
972
|
return {
|
|
938
973
|
primaryColor: (i = r == null ? void 0 : r.colors) == null ? void 0 : i.primary,
|
|
939
|
-
secondaryColor: (
|
|
940
|
-
backgroundColor: (
|
|
974
|
+
secondaryColor: (g = r == null ? void 0 : r.colors) == null ? void 0 : g.secondary,
|
|
975
|
+
backgroundColor: (h = r == null ? void 0 : r.colors) == null ? void 0 : h.appBackground,
|
|
941
976
|
textColor: (y = r == null ? void 0 : r.colors) == null ? void 0 : y.text,
|
|
942
|
-
borderColor: (
|
|
943
|
-
disabledBackground: (
|
|
977
|
+
borderColor: ($ = r == null ? void 0 : r.colors) == null ? void 0 : $.border,
|
|
978
|
+
disabledBackground: (d = r == null ? void 0 : r.colors) == null ? void 0 : d.disabledBackground,
|
|
944
979
|
borderRadius: (v = r == null ? void 0 : r.space) == null ? void 0 : v.radius,
|
|
945
|
-
padding: (
|
|
946
|
-
margin: (
|
|
947
|
-
baseFontSize: (
|
|
980
|
+
padding: (f = r == null ? void 0 : r.space) == null ? void 0 : f.padding,
|
|
981
|
+
margin: (P = r == null ? void 0 : r.space) == null ? void 0 : P.margin,
|
|
982
|
+
baseFontSize: (z = (C = r == null ? void 0 : r.fonts) == null ? void 0 : C.body) != null && z.size ? parseInt((Q = (Z = r == null ? void 0 : r.fonts) == null ? void 0 : Z.body) == null ? void 0 : Q.size, 10) : void 0
|
|
948
983
|
};
|
|
949
|
-
}, [r]),
|
|
984
|
+
}, [r]), k.useEffect(() => {
|
|
950
985
|
if (e.tocItems)
|
|
951
|
-
|
|
986
|
+
O(void 0);
|
|
952
987
|
else {
|
|
953
|
-
|
|
988
|
+
p !== void 0 && O(void 0);
|
|
954
989
|
let i = 0;
|
|
955
|
-
const
|
|
956
|
-
let
|
|
957
|
-
const
|
|
958
|
-
const
|
|
959
|
-
if (!
|
|
960
|
-
i <
|
|
990
|
+
const g = 10;
|
|
991
|
+
let h = null, y = null;
|
|
992
|
+
const $ = () => {
|
|
993
|
+
const d = _.current;
|
|
994
|
+
if (!d) {
|
|
995
|
+
i < g ? (i++, h = setTimeout($, 200)) : O([]);
|
|
961
996
|
return;
|
|
962
997
|
}
|
|
963
|
-
const v = Array.from(
|
|
998
|
+
const v = Array.from(d.querySelectorAll("h1, h2, h3"));
|
|
964
999
|
if (v.length === 0) {
|
|
965
|
-
i <
|
|
1000
|
+
i < g ? (i++, h = setTimeout($, 200)) : O([]);
|
|
966
1001
|
return;
|
|
967
1002
|
}
|
|
968
|
-
const
|
|
969
|
-
var
|
|
970
|
-
const
|
|
971
|
-
|
|
972
|
-
const
|
|
973
|
-
C.id || (C.id =
|
|
974
|
-
const
|
|
975
|
-
return { id:
|
|
1003
|
+
const f = /* @__PURE__ */ new Map(), P = v.map((C) => {
|
|
1004
|
+
var we;
|
|
1005
|
+
const z = C.id || ((we = C.textContent) == null ? void 0 : we.trim().replace(/\s+/g, "-").toLowerCase()) || "", Z = f.get(z) || 0;
|
|
1006
|
+
f.set(z, Z + 1);
|
|
1007
|
+
const Q = Z > 0 ? `${z}-${Z}` : z;
|
|
1008
|
+
C.id || (C.id = Q);
|
|
1009
|
+
const Se = C.tagName === "H1" ? 1 : C.tagName === "H2" ? 2 : 3;
|
|
1010
|
+
return { id: Q, label: C.textContent || "", level: Se };
|
|
976
1011
|
});
|
|
977
|
-
|
|
1012
|
+
O(P);
|
|
978
1013
|
};
|
|
979
1014
|
return y = requestAnimationFrame(() => {
|
|
980
|
-
|
|
1015
|
+
h = setTimeout($, 100);
|
|
981
1016
|
}), () => {
|
|
982
|
-
y !== null && cancelAnimationFrame(y),
|
|
1017
|
+
y !== null && cancelAnimationFrame(y), h !== null && clearTimeout(h);
|
|
983
1018
|
};
|
|
984
1019
|
}
|
|
985
|
-
}, [o, e.tocItems,
|
|
986
|
-
if (
|
|
987
|
-
const
|
|
988
|
-
if (
|
|
989
|
-
|
|
990
|
-
const
|
|
991
|
-
var
|
|
992
|
-
const v =
|
|
993
|
-
(
|
|
994
|
-
},
|
|
995
|
-
return
|
|
996
|
-
const v = document.getElementById(
|
|
997
|
-
v &&
|
|
998
|
-
}), () =>
|
|
999
|
-
}, [
|
|
1000
|
-
const
|
|
1020
|
+
}, [o, e.tocItems, p]), k.useEffect(() => {
|
|
1021
|
+
if (U) return;
|
|
1022
|
+
const g = ((e.tocItems ?? J) || []).map((d) => d.id).filter(Boolean);
|
|
1023
|
+
if (g.length === 0) return;
|
|
1024
|
+
ie(void 0);
|
|
1025
|
+
const h = { root: null, rootMargin: "0px 0px -70% 0px", threshold: 0 }, y = (d) => {
|
|
1026
|
+
var f, P;
|
|
1027
|
+
const v = d.filter((C) => C.isIntersecting).sort((C, z) => C.boundingClientRect.top - z.boundingClientRect.top);
|
|
1028
|
+
(P = (f = v[0]) == null ? void 0 : f.target) != null && P.id && ie(v[0].target.id);
|
|
1029
|
+
}, $ = new IntersectionObserver(y, h);
|
|
1030
|
+
return g.forEach((d) => {
|
|
1031
|
+
const v = document.getElementById(d);
|
|
1032
|
+
v && $.observe(v);
|
|
1033
|
+
}), () => $.disconnect();
|
|
1034
|
+
}, [J, U, e.tocItems, p]);
|
|
1035
|
+
const ue = (i, g) => {
|
|
1001
1036
|
if (!i || i.length === 0) return;
|
|
1002
|
-
const
|
|
1037
|
+
const h = Math.max(0, i.findIndex(($) => $.key === g)), y = i[(h + 1) % i.length];
|
|
1003
1038
|
return y == null ? void 0 : y.key;
|
|
1004
|
-
},
|
|
1005
|
-
const
|
|
1006
|
-
|
|
1039
|
+
}, ae = (i) => {
|
|
1040
|
+
const g = document.getElementById(i);
|
|
1041
|
+
g && g.scrollIntoView({ behavior: "smooth", block: "start", inline: "nearest" });
|
|
1007
1042
|
};
|
|
1008
|
-
return /* @__PURE__ */ t(
|
|
1009
|
-
|
|
1043
|
+
return /* @__PURE__ */ t(Ae, { theme: r, mode: u.mode, children: /* @__PURE__ */ b(
|
|
1044
|
+
so,
|
|
1010
1045
|
{
|
|
1011
1046
|
style: {
|
|
1012
1047
|
background: r.colors.appBackground,
|
|
1013
1048
|
color: r.colors.text,
|
|
1014
|
-
fontFamily: ((
|
|
1049
|
+
fontFamily: ((fe = (ge = r.fonts) == null ? void 0 : ge.body) == null ? void 0 : fe.family) || "PingFang SC, Microsoft YaHei, Arial, sans-serif"
|
|
1015
1050
|
},
|
|
1016
1051
|
children: [
|
|
1017
|
-
/* @__PURE__ */
|
|
1018
|
-
|
|
1052
|
+
/* @__PURE__ */ b(
|
|
1053
|
+
co,
|
|
1019
1054
|
{
|
|
1020
1055
|
style: {
|
|
1021
1056
|
background: r.colors.panelBackground || r.colors.dashboardBackground || "rgba(255,255,255,0.6)",
|
|
1022
1057
|
color: r.colors.text
|
|
1023
1058
|
},
|
|
1024
1059
|
children: [
|
|
1025
|
-
/* @__PURE__ */
|
|
1060
|
+
/* @__PURE__ */ b(ho, { children: [
|
|
1026
1061
|
n,
|
|
1027
|
-
a && a.length > 0 && /* @__PURE__ */ t(
|
|
1028
|
-
|
|
1062
|
+
a && a.length > 0 && /* @__PURE__ */ t($o, { children: a.map((i) => /* @__PURE__ */ t(
|
|
1063
|
+
X,
|
|
1029
1064
|
{
|
|
1030
|
-
$active: i.key ===
|
|
1031
|
-
onClick: () =>
|
|
1065
|
+
$active: i.key === x,
|
|
1066
|
+
onClick: () => M == null ? void 0 : M(i.key),
|
|
1032
1067
|
title: i.label,
|
|
1033
1068
|
children: i.label
|
|
1034
1069
|
},
|
|
1035
1070
|
i.key
|
|
1036
1071
|
)) })
|
|
1037
1072
|
] }),
|
|
1038
|
-
/* @__PURE__ */
|
|
1073
|
+
/* @__PURE__ */ b(po, { children: [
|
|
1039
1074
|
/* @__PURE__ */ t("div", { className: "hide-on-desktop", style: { display: "none" } }),
|
|
1040
|
-
|
|
1041
|
-
|
|
1075
|
+
T && T.length > 0 && /* @__PURE__ */ t(
|
|
1076
|
+
ve,
|
|
1042
1077
|
{
|
|
1043
1078
|
onClick: () => {
|
|
1044
|
-
const i =
|
|
1045
|
-
i && (
|
|
1079
|
+
const i = ue(T, L);
|
|
1080
|
+
i && (F == null || F(i));
|
|
1046
1081
|
},
|
|
1047
|
-
title: ((
|
|
1082
|
+
title: ((xe = T.find((i) => i.key === L)) == null ? void 0 : xe.label) || "Language",
|
|
1048
1083
|
"aria-label": "language",
|
|
1049
1084
|
style: { color: r.colors.text },
|
|
1050
|
-
children: /* @__PURE__ */
|
|
1085
|
+
children: /* @__PURE__ */ b("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1051
1086
|
/* @__PURE__ */ t("path", { d: "M12 21c4.97 0 9-4.03 9-9s-4.03-9-9-9-9 4.03-9 9 4.03 9 9 9Z", stroke: "currentColor", strokeWidth: "1.6" }),
|
|
1052
1087
|
/* @__PURE__ */ t("path", { d: "M3 12h18M12 3c-2.5 2.5-3.75 5.167-3.75 9S9.5 19.5 12 21c2.5-1.5 3.75-4.167 3.75-8S14.5 5.5 12 3Z", stroke: "currentColor", strokeWidth: "1.6" })
|
|
1053
1088
|
] })
|
|
1054
1089
|
}
|
|
1055
1090
|
),
|
|
1056
|
-
/* @__PURE__ */ t(
|
|
1057
|
-
|
|
1058
|
-
|
|
1091
|
+
/* @__PURE__ */ t(Bo, {}),
|
|
1092
|
+
s && s.length > 0 && /* @__PURE__ */ t(
|
|
1093
|
+
ve,
|
|
1059
1094
|
{
|
|
1060
1095
|
onClick: () => {
|
|
1061
|
-
const i =
|
|
1062
|
-
i && (
|
|
1096
|
+
const i = ue(s, K);
|
|
1097
|
+
i && (B == null || B(i));
|
|
1063
1098
|
},
|
|
1064
|
-
title: ((
|
|
1099
|
+
title: ((be = s.find((i) => i.key === K)) == null ? void 0 : be.label) || "Theme",
|
|
1065
1100
|
"aria-label": "theme",
|
|
1066
1101
|
style: { color: r.colors.text },
|
|
1067
1102
|
children: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z", stroke: "currentColor", strokeWidth: "1.6" }) })
|
|
1068
1103
|
}
|
|
1069
1104
|
),
|
|
1070
|
-
/* @__PURE__ */ t("div", { className: "mobile-only", style: { display: "none" }, children: /* @__PURE__ */ t(
|
|
1105
|
+
/* @__PURE__ */ t("div", { className: "mobile-only", style: { display: "none" }, children: /* @__PURE__ */ t(X, { onClick: () => m(!0), title: "\u6253\u5F00\u76EE\u5F55", children: "\u76EE\u5F55" }) })
|
|
1071
1106
|
] })
|
|
1072
1107
|
]
|
|
1073
1108
|
}
|
|
1074
1109
|
),
|
|
1075
1110
|
(() => {
|
|
1076
|
-
const
|
|
1077
|
-
return /* @__PURE__ */
|
|
1078
|
-
|
|
1079
|
-
/* @__PURE__ */ t(
|
|
1080
|
-
|
|
1081
|
-
const
|
|
1082
|
-
return
|
|
1111
|
+
const g = (Array.isArray(c) ? c.length : 0) > 1, h = g ? R ? "10px" : "var(--sidebar-width)" : "0px", y = W ? "10px" : "var(--toc-width)", $ = g ? `${h} 1fr ${y}` : `1fr ${y}`;
|
|
1112
|
+
return /* @__PURE__ */ b(uo, { style: { gridTemplateColumns: $ }, children: [
|
|
1113
|
+
g && /* @__PURE__ */ b(go, { children: [
|
|
1114
|
+
/* @__PURE__ */ t(fo, { $collapsed: R, children: /* @__PURE__ */ t(bo, { children: c && c.length > 0 && /* @__PURE__ */ t("div", { children: Object.entries(
|
|
1115
|
+
c.reduce((d, v) => {
|
|
1116
|
+
const f = v.group || "\u6587\u6863";
|
|
1117
|
+
return d[f] = d[f] || [], d[f].push(v), d;
|
|
1083
1118
|
}, {})
|
|
1084
|
-
).map(([
|
|
1085
|
-
/* @__PURE__ */ t(
|
|
1086
|
-
/* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px" }, children: v.map((
|
|
1087
|
-
|
|
1119
|
+
).map(([d, v]) => /* @__PURE__ */ b("div", { children: [
|
|
1120
|
+
/* @__PURE__ */ t(le, { children: d }),
|
|
1121
|
+
/* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px" }, children: v.map((f) => /* @__PURE__ */ t(
|
|
1122
|
+
X,
|
|
1088
1123
|
{
|
|
1089
|
-
$active:
|
|
1124
|
+
$active: f.id === D,
|
|
1090
1125
|
onClick: () => {
|
|
1091
|
-
|
|
1126
|
+
f.href && (f.href.startsWith("#") ? ae(f.href.slice(1)) : window.location.href = f.href), I == null || I(f), m(!1);
|
|
1092
1127
|
},
|
|
1093
|
-
title:
|
|
1094
|
-
children:
|
|
1128
|
+
title: f.label,
|
|
1129
|
+
children: f.label
|
|
1095
1130
|
},
|
|
1096
|
-
|
|
1131
|
+
f.id
|
|
1097
1132
|
)) })
|
|
1098
|
-
] },
|
|
1099
|
-
|
|
1133
|
+
] }, d)) }) }) }),
|
|
1134
|
+
Y && g && /* @__PURE__ */ t(xo, { onClick: () => V((d) => !d), title: R ? "\u5C55\u5F00\u5DE6\u4FA7\u680F" : "\u6536\u8D77\u5DE6\u4FA7\u680F", "aria-label": "toggle-left", children: R ? /* @__PURE__ */ t("svg", { width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M9 6l6 6-6 6", stroke: "currentColor", strokeWidth: "1.6" }) }) : /* @__PURE__ */ t("svg", { width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M15 6l-6 6 6 6", stroke: "currentColor", strokeWidth: "1.6" }) }) })
|
|
1100
1135
|
] }),
|
|
1101
|
-
/* @__PURE__ */ t(
|
|
1102
|
-
|
|
1136
|
+
/* @__PURE__ */ t(wo, { children: /* @__PURE__ */ t(
|
|
1137
|
+
ko,
|
|
1103
1138
|
{
|
|
1104
|
-
ref:
|
|
1105
|
-
children: /* @__PURE__ */ t(
|
|
1139
|
+
ref: _,
|
|
1140
|
+
children: /* @__PURE__ */ t(mo, { $opacity: Ne, children: Ie })
|
|
1106
1141
|
}
|
|
1107
1142
|
) }),
|
|
1108
|
-
/* @__PURE__ */ t(
|
|
1109
|
-
/* @__PURE__ */ t(
|
|
1110
|
-
/* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px", width: "100%", maxWidth: "100%", overflow: "hidden" }, children: ((e.tocItems ??
|
|
1111
|
-
|
|
1143
|
+
/* @__PURE__ */ t(vo, { children: /* @__PURE__ */ t(yo, { children: /* @__PURE__ */ b(Co, { $collapsed: W, children: [
|
|
1144
|
+
/* @__PURE__ */ t(le, { children: "\u672C\u9875\u76EE\u5F55" }),
|
|
1145
|
+
/* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px", width: "100%", maxWidth: "100%", overflow: "hidden" }, children: ((e.tocItems ?? J) || []).map((d) => /* @__PURE__ */ t(
|
|
1146
|
+
X,
|
|
1112
1147
|
{
|
|
1113
|
-
$active: (
|
|
1148
|
+
$active: (U ? j : de) === d.id,
|
|
1114
1149
|
onClick: () => {
|
|
1115
|
-
|
|
1150
|
+
ae(d.id), N == null || N(d);
|
|
1116
1151
|
},
|
|
1117
|
-
title:
|
|
1118
|
-
style: { paddingLeft: Math.max(0, (
|
|
1119
|
-
children:
|
|
1152
|
+
title: d.label,
|
|
1153
|
+
style: { paddingLeft: Math.max(0, (d.level || 1) - 1) * 12 + 10 },
|
|
1154
|
+
children: d.label
|
|
1120
1155
|
},
|
|
1121
|
-
|
|
1156
|
+
d.id
|
|
1122
1157
|
)) })
|
|
1123
1158
|
] }) }) })
|
|
1124
1159
|
] });
|
|
1125
1160
|
})(),
|
|
1126
|
-
|
|
1161
|
+
w && /* @__PURE__ */ t(
|
|
1127
1162
|
"div",
|
|
1128
1163
|
{
|
|
1129
1164
|
role: "dialog",
|
|
@@ -1135,8 +1170,8 @@ const ae = l.div`
|
|
|
1135
1170
|
background: "rgba(0,0,0,0.45)",
|
|
1136
1171
|
display: "flex"
|
|
1137
1172
|
},
|
|
1138
|
-
onClick: () =>
|
|
1139
|
-
children: /* @__PURE__ */
|
|
1173
|
+
onClick: () => m(!1),
|
|
1174
|
+
children: /* @__PURE__ */ b(
|
|
1140
1175
|
"div",
|
|
1141
1176
|
{
|
|
1142
1177
|
style: {
|
|
@@ -1150,27 +1185,27 @@ const ae = l.div`
|
|
|
1150
1185
|
},
|
|
1151
1186
|
onClick: (i) => i.stopPropagation(),
|
|
1152
1187
|
children: [
|
|
1153
|
-
/* @__PURE__ */
|
|
1188
|
+
/* @__PURE__ */ b("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 8 }, children: [
|
|
1154
1189
|
/* @__PURE__ */ t("div", { style: { fontWeight: 600 }, children: "\u76EE\u5F55" }),
|
|
1155
|
-
/* @__PURE__ */ t(
|
|
1190
|
+
/* @__PURE__ */ t(X, { onClick: () => m(!1), children: "\u5173\u95ED" })
|
|
1156
1191
|
] }),
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
const
|
|
1160
|
-
return i[
|
|
1192
|
+
c && c.length > 0 && /* @__PURE__ */ t("div", { style: { overflow: "auto", height: "calc(100% - 40px)" }, children: Object.entries(
|
|
1193
|
+
c.reduce((i, g) => {
|
|
1194
|
+
const h = g.group || "\u6587\u6863";
|
|
1195
|
+
return i[h] = i[h] || [], i[h].push(g), i;
|
|
1161
1196
|
}, {})
|
|
1162
|
-
).map(([i,
|
|
1163
|
-
/* @__PURE__ */ t(
|
|
1164
|
-
/* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px" }, children:
|
|
1165
|
-
|
|
1197
|
+
).map(([i, g]) => /* @__PURE__ */ b("div", { children: [
|
|
1198
|
+
/* @__PURE__ */ t(le, { children: i }),
|
|
1199
|
+
/* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px" }, children: g.map((h) => /* @__PURE__ */ t(
|
|
1200
|
+
X,
|
|
1166
1201
|
{
|
|
1167
|
-
$active:
|
|
1202
|
+
$active: h.id === D,
|
|
1168
1203
|
onClick: () => {
|
|
1169
|
-
|
|
1204
|
+
h.href && (h.href.startsWith("#") ? ae(h.href.slice(1)) : window.location.href = h.href), I == null || I(h), m(!1);
|
|
1170
1205
|
},
|
|
1171
|
-
children:
|
|
1206
|
+
children: h.label
|
|
1172
1207
|
},
|
|
1173
|
-
|
|
1208
|
+
h.id
|
|
1174
1209
|
)) })
|
|
1175
1210
|
] }, i)) })
|
|
1176
1211
|
]
|
|
@@ -1183,7 +1218,7 @@ const ae = l.div`
|
|
|
1183
1218
|
) });
|
|
1184
1219
|
};
|
|
1185
1220
|
export {
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1221
|
+
zo as DashboardContainer,
|
|
1222
|
+
Mo as DockContainer,
|
|
1223
|
+
Ro as DocumentContainer
|
|
1189
1224
|
};
|