@mxmweb/zui-layouts 1.3.9 → 1.3.11
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 +396 -394
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsx as o, jsxs as b, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
+
import * as T from "react";
|
|
3
3
|
import k, { forwardRef as Ce, createElement as se } from "react";
|
|
4
4
|
import l from "styled-components";
|
|
5
|
-
import { useTheme as
|
|
5
|
+
import { useTheme as de, deepMergeTheme as G, defaultTheme as F, ThemeProvider as Ae } from "@mxmweb/zui-theme";
|
|
6
6
|
import { GoogleNavbar as Te, CustomDock as Fe } from "@mxmweb/zui-components";
|
|
7
7
|
/**
|
|
8
8
|
* React Router v6.30.1
|
|
@@ -14,33 +14,33 @@ import { GoogleNavbar as Te, CustomDock as Fe } from "@mxmweb/zui-components";
|
|
|
14
14
|
*
|
|
15
15
|
* @license MIT
|
|
16
16
|
*/
|
|
17
|
-
const ze = /* @__PURE__ */
|
|
17
|
+
const ze = /* @__PURE__ */ T.createContext(null);
|
|
18
18
|
process.env.NODE_ENV !== "production" && (ze.displayName = "DataRouter");
|
|
19
|
-
const Me = /* @__PURE__ */
|
|
19
|
+
const Me = /* @__PURE__ */ T.createContext(null);
|
|
20
20
|
process.env.NODE_ENV !== "production" && (Me.displayName = "DataRouterState");
|
|
21
|
-
const Re = /* @__PURE__ */
|
|
21
|
+
const Re = /* @__PURE__ */ T.createContext(null);
|
|
22
22
|
process.env.NODE_ENV !== "production" && (Re.displayName = "Await");
|
|
23
|
-
const We = /* @__PURE__ */
|
|
23
|
+
const We = /* @__PURE__ */ T.createContext(null);
|
|
24
24
|
process.env.NODE_ENV !== "production" && (We.displayName = "Navigation");
|
|
25
|
-
const Oe = /* @__PURE__ */
|
|
25
|
+
const Oe = /* @__PURE__ */ T.createContext(null);
|
|
26
26
|
process.env.NODE_ENV !== "production" && (Oe.displayName = "Location");
|
|
27
|
-
const $e = /* @__PURE__ */
|
|
27
|
+
const $e = /* @__PURE__ */ T.createContext({
|
|
28
28
|
outlet: null,
|
|
29
29
|
matches: [],
|
|
30
30
|
isDataRoute: !1
|
|
31
31
|
});
|
|
32
32
|
process.env.NODE_ENV !== "production" && ($e.displayName = "Route");
|
|
33
|
-
const
|
|
34
|
-
process.env.NODE_ENV !== "production" && (
|
|
35
|
-
const
|
|
36
|
-
function
|
|
37
|
-
let
|
|
38
|
-
return
|
|
33
|
+
const He = /* @__PURE__ */ T.createContext(null);
|
|
34
|
+
process.env.NODE_ENV !== "production" && (He.displayName = "RouteError");
|
|
35
|
+
const Le = /* @__PURE__ */ T.createContext(null);
|
|
36
|
+
function je(e) {
|
|
37
|
+
let t = T.useContext($e).outlet;
|
|
38
|
+
return t && /* @__PURE__ */ T.createElement(Le.Provider, {
|
|
39
39
|
value: e
|
|
40
|
-
},
|
|
40
|
+
}, t);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
return
|
|
42
|
+
function Pe(e) {
|
|
43
|
+
return je(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 Ee = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Be = (...e) => e.filter((t, n, d) => !!t && t.trim() !== "" && d.indexOf(t) === 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 Ve = {
|
|
61
61
|
xmlns: "http://www.w3.org/2000/svg",
|
|
62
62
|
width: 24,
|
|
63
63
|
height: 24,
|
|
@@ -74,31 +74,31 @@ var _e = {
|
|
|
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 _e = Ce(
|
|
78
78
|
({
|
|
79
79
|
color: e = "currentColor",
|
|
80
|
-
size:
|
|
80
|
+
size: t = 24,
|
|
81
81
|
strokeWidth: n = 2,
|
|
82
|
-
absoluteStrokeWidth:
|
|
83
|
-
className:
|
|
84
|
-
children:
|
|
85
|
-
iconNode:
|
|
86
|
-
...
|
|
87
|
-
},
|
|
82
|
+
absoluteStrokeWidth: d,
|
|
83
|
+
className: i = "",
|
|
84
|
+
children: p,
|
|
85
|
+
iconNode: D,
|
|
86
|
+
...B
|
|
87
|
+
}, H) => se(
|
|
88
88
|
"svg",
|
|
89
89
|
{
|
|
90
|
-
ref:
|
|
91
|
-
...
|
|
92
|
-
width:
|
|
93
|
-
height:
|
|
90
|
+
ref: H,
|
|
91
|
+
...Ve,
|
|
92
|
+
width: t,
|
|
93
|
+
height: t,
|
|
94
94
|
stroke: e,
|
|
95
|
-
strokeWidth:
|
|
96
|
-
className: Be("lucide",
|
|
97
|
-
...
|
|
95
|
+
strokeWidth: d ? Number(n) * 24 / Number(t) : n,
|
|
96
|
+
className: Be("lucide", i),
|
|
97
|
+
...B
|
|
98
98
|
},
|
|
99
99
|
[
|
|
100
|
-
...
|
|
101
|
-
...Array.isArray(
|
|
100
|
+
...D.map(([z, s]) => se(z, s)),
|
|
101
|
+
...Array.isArray(p) ? p : [p]
|
|
102
102
|
]
|
|
103
103
|
)
|
|
104
104
|
);
|
|
@@ -108,13 +108,13 @@ const Pe = Ce(
|
|
|
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 De = (e,
|
|
111
|
+
const De = (e, t) => {
|
|
112
112
|
const n = Ce(
|
|
113
|
-
({ className:
|
|
114
|
-
ref:
|
|
115
|
-
iconNode:
|
|
116
|
-
className: Be(`lucide-${
|
|
117
|
-
...
|
|
113
|
+
({ className: d, ...i }, p) => se(_e, {
|
|
114
|
+
ref: p,
|
|
115
|
+
iconNode: t,
|
|
116
|
+
className: Be(`lucide-${Ee(e)}`, d),
|
|
117
|
+
...i
|
|
118
118
|
})
|
|
119
119
|
);
|
|
120
120
|
return n.displayName = `${e}`, n;
|
|
@@ -143,40 +143,40 @@ const ee = De("ChevronRight", [
|
|
|
143
143
|
display: flex;
|
|
144
144
|
justify-content: flex-start;
|
|
145
145
|
align-items: flex-start;
|
|
146
|
-
margin-left: ${({ theme: e }) => {
|
|
147
|
-
var o;
|
|
148
|
-
return ((o = e.space) == null ? void 0 : o.margin) || "20px";
|
|
149
|
-
}};
|
|
150
146
|
flex-direction: column;
|
|
151
147
|
height: 100%;
|
|
152
148
|
width: 100%;
|
|
153
|
-
max-width:
|
|
149
|
+
max-width: 100%;
|
|
154
150
|
position: relative;
|
|
155
151
|
background: ${({ theme: e }) => {
|
|
156
|
-
var
|
|
157
|
-
return ((
|
|
152
|
+
var t, n;
|
|
153
|
+
return ((t = e.colors) == null ? void 0 : t.dashboardBackground) ?? ((n = e.colors) == null ? void 0 : n.appBackground) ?? "transparent";
|
|
158
154
|
}};
|
|
159
155
|
color: ${({ theme: e }) => {
|
|
160
|
-
var
|
|
161
|
-
return ((
|
|
156
|
+
var t;
|
|
157
|
+
return ((t = e.colors) == null ? void 0 : t.text) || "#1D2129";
|
|
162
158
|
}};
|
|
163
159
|
font-family: ${({ theme: e }) => {
|
|
164
|
-
var
|
|
165
|
-
return ((n = (
|
|
160
|
+
var t, n;
|
|
161
|
+
return ((n = (t = e.fonts) == null ? void 0 : t.body) == null ? void 0 : n.family) || "PingFang SC, Microsoft YaHei, Arial, sans-serif";
|
|
166
162
|
}};
|
|
167
163
|
`, Ye = l.div.attrs({
|
|
168
164
|
className: "dashboard-container-header"
|
|
169
165
|
})`
|
|
170
166
|
display: flex;
|
|
171
167
|
height: ${({ theme: e }) => {
|
|
172
|
-
var
|
|
173
|
-
return ((
|
|
168
|
+
var t;
|
|
169
|
+
return ((t = e.space) == null ? void 0 : t.dashboardHeaderHeight) ?? "38px";
|
|
174
170
|
}};
|
|
175
171
|
z-index: 10;
|
|
176
172
|
background: transparent;
|
|
177
173
|
gap: ${({ theme: e }) => {
|
|
178
|
-
var
|
|
179
|
-
return ((
|
|
174
|
+
var t;
|
|
175
|
+
return ((t = e.space) == null ? void 0 : t.padding) || "8px";
|
|
176
|
+
}};
|
|
177
|
+
padding: ${({ theme: e }) => {
|
|
178
|
+
var t;
|
|
179
|
+
return ((t = e.space) == null ? void 0 : t.dashboardHeaderPadding) ?? "0 0 8px 0";
|
|
180
180
|
}};
|
|
181
181
|
flex-direction: row;
|
|
182
182
|
align-items: center;
|
|
@@ -195,12 +195,12 @@ const ee = De("ChevronRight", [
|
|
|
195
195
|
border: none;
|
|
196
196
|
cursor: pointer;
|
|
197
197
|
color: ${({ theme: e }) => {
|
|
198
|
-
var
|
|
199
|
-
return ((
|
|
198
|
+
var t;
|
|
199
|
+
return ((t = e.colors) == null ? void 0 : t.primary) || "#4E6EF2";
|
|
200
200
|
}};
|
|
201
201
|
border-radius: ${({ theme: e }) => {
|
|
202
|
-
var
|
|
203
|
-
return ((
|
|
202
|
+
var t;
|
|
203
|
+
return ((t = e.space) == null ? void 0 : t.radius) || "6px";
|
|
204
204
|
}};
|
|
205
205
|
|
|
206
206
|
/* 仅让图标在 hover 时上浮,按钮背景保持透明 */
|
|
@@ -215,24 +215,24 @@ const ee = De("ChevronRight", [
|
|
|
215
215
|
&:hover svg {
|
|
216
216
|
transform: translateY(-1px);
|
|
217
217
|
color: ${({ theme: e }) => {
|
|
218
|
-
var
|
|
219
|
-
return ((
|
|
218
|
+
var t, n;
|
|
219
|
+
return ((t = e.colors) == null ? void 0 : t.primaryHover) || ((n = e.colors) == null ? void 0 : n.primary) || "#6D86F5";
|
|
220
220
|
}};
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
&:active svg {
|
|
224
224
|
transform: translateY(0);
|
|
225
225
|
color: ${({ theme: e }) => {
|
|
226
|
-
var
|
|
227
|
-
return ((
|
|
226
|
+
var t, n;
|
|
227
|
+
return ((t = e.colors) == null ? void 0 : t.primaryActive) || ((n = e.colors) == null ? void 0 : n.primary) || "#2D4BE0";
|
|
228
228
|
}};
|
|
229
229
|
}
|
|
230
230
|
`, Ze = l.div.attrs({
|
|
231
231
|
className: "dashboard-container-title"
|
|
232
232
|
})`
|
|
233
233
|
line-height: ${({ theme: e }) => {
|
|
234
|
-
var
|
|
235
|
-
return ((
|
|
234
|
+
var t;
|
|
235
|
+
return ((t = e.space) == null ? void 0 : t.lineHeight) || "1.4";
|
|
236
236
|
}};
|
|
237
237
|
cursor: pointer;
|
|
238
238
|
transition: color 0.2s ease;
|
|
@@ -242,30 +242,30 @@ const ee = De("ChevronRight", [
|
|
|
242
242
|
max-width: 200px;
|
|
243
243
|
min-width: 0;
|
|
244
244
|
color: ${({ theme: e }) => {
|
|
245
|
-
var
|
|
246
|
-
return ((
|
|
245
|
+
var t;
|
|
246
|
+
return ((t = e.colors) == null ? void 0 : t.text) || "#1D2129";
|
|
247
247
|
}};
|
|
248
248
|
font-size: ${({ theme: e }) => {
|
|
249
|
-
var
|
|
250
|
-
return ((n = (
|
|
249
|
+
var t, n;
|
|
250
|
+
return ((n = (t = e.fonts) == null ? void 0 : t.heading) == null ? void 0 : n.size) || "16px";
|
|
251
251
|
}};
|
|
252
252
|
font-weight: ${({ theme: e }) => {
|
|
253
|
-
var
|
|
254
|
-
return ((n = (
|
|
253
|
+
var t, n;
|
|
254
|
+
return ((n = (t = e.fonts) == null ? void 0 : t.heading) == null ? void 0 : n.weight) || "600";
|
|
255
255
|
}};
|
|
256
256
|
|
|
257
257
|
&:hover {
|
|
258
258
|
color: ${({ theme: e }) => {
|
|
259
|
-
var
|
|
260
|
-
return ((
|
|
259
|
+
var t;
|
|
260
|
+
return ((t = e.colors) == null ? void 0 : t.primary) || "#4E6EF2";
|
|
261
261
|
}};
|
|
262
262
|
}
|
|
263
263
|
`, Xe = l.div.attrs({
|
|
264
264
|
className: "dashboard-container-description"
|
|
265
265
|
})`
|
|
266
266
|
line-height: ${({ theme: e }) => {
|
|
267
|
-
var
|
|
268
|
-
return ((
|
|
267
|
+
var t;
|
|
268
|
+
return ((t = e.space) == null ? void 0 : t.lineHeight) || "1.4";
|
|
269
269
|
}};
|
|
270
270
|
white-space: nowrap;
|
|
271
271
|
overflow: hidden;
|
|
@@ -273,13 +273,13 @@ const ee = De("ChevronRight", [
|
|
|
273
273
|
flex: 1;
|
|
274
274
|
min-width: 0;
|
|
275
275
|
color: ${({ theme: e }) => {
|
|
276
|
-
var
|
|
277
|
-
return ((
|
|
276
|
+
var t, n;
|
|
277
|
+
return ((t = e.colors) == null ? void 0 : t.textSecondary) || ((n = e.colors) == null ? void 0 : n.disabledText) || "#4E5969";
|
|
278
278
|
}};
|
|
279
279
|
opacity: 0.7;
|
|
280
280
|
font-size: ${({ theme: e }) => {
|
|
281
|
-
var
|
|
282
|
-
return ((n = (
|
|
281
|
+
var t, n;
|
|
282
|
+
return ((n = (t = e.fonts) == null ? void 0 : t.body) == null ? void 0 : n.size) || "12px";
|
|
283
283
|
}};
|
|
284
284
|
`, ke = l.div.attrs({
|
|
285
285
|
className: "dashboard-container-breadcrumb"
|
|
@@ -291,19 +291,19 @@ const ee = De("ChevronRight", [
|
|
|
291
291
|
max-width: 50%;
|
|
292
292
|
min-width: 0;
|
|
293
293
|
overflow: hidden;
|
|
294
|
-
`,
|
|
294
|
+
`, te = l.div.attrs({
|
|
295
295
|
className: "dashboard-container-breadcrumb-item"
|
|
296
296
|
})`
|
|
297
297
|
display: flex;
|
|
298
298
|
align-items: center;
|
|
299
299
|
gap: 4px;
|
|
300
300
|
font-size: ${({ theme: e }) => {
|
|
301
|
-
var
|
|
302
|
-
return ((n = (
|
|
301
|
+
var t, n;
|
|
302
|
+
return ((n = (t = e.fonts) == null ? void 0 : t.body) == null ? void 0 : n.size) || "14px";
|
|
303
303
|
}};
|
|
304
|
-
color: ${({ $isLast: e, theme:
|
|
305
|
-
var n,
|
|
306
|
-
return e ? ((n =
|
|
304
|
+
color: ${({ $isLast: e, theme: t }) => {
|
|
305
|
+
var n, d, i;
|
|
306
|
+
return e ? ((n = t.colors) == null ? void 0 : n.text) || "#343a40" : ((d = t.colors) == null ? void 0 : d.textSecondary) || ((i = t.colors) == null ? void 0 : i.disabledText) || "#6c757d";
|
|
307
307
|
}};
|
|
308
308
|
font-weight: ${({ $isLast: e }) => e ? "600" : "normal"};
|
|
309
309
|
cursor: ${({ $isClickable: e }) => e ? "pointer" : "default"};
|
|
@@ -314,19 +314,19 @@ const ee = De("ChevronRight", [
|
|
|
314
314
|
max-width: 120px;
|
|
315
315
|
|
|
316
316
|
&:hover {
|
|
317
|
-
color: ${({ $isLast: e, theme:
|
|
317
|
+
color: ${({ $isLast: e, theme: t }) => {
|
|
318
318
|
var n;
|
|
319
|
-
return e ? ((n =
|
|
319
|
+
return e ? ((n = t.colors) == null ? void 0 : n.primary) || "#4E6EF2" : "inherit";
|
|
320
320
|
}};
|
|
321
321
|
}
|
|
322
|
-
`,
|
|
322
|
+
`, oe = l.div.attrs({
|
|
323
323
|
className: "dashboard-container-breadcrumb-separator"
|
|
324
324
|
})`
|
|
325
325
|
display: flex;
|
|
326
326
|
align-items: center;
|
|
327
327
|
color: ${({ theme: e }) => {
|
|
328
|
-
var
|
|
329
|
-
return ((
|
|
328
|
+
var t, n;
|
|
329
|
+
return ((t = e.colors) == null ? void 0 : t.textSecondary) || ((n = e.colors) == null ? void 0 : n.disabledText) || "#6c757d";
|
|
330
330
|
}};
|
|
331
331
|
margin: 0 2px;
|
|
332
332
|
`, Je = l.div.attrs({
|
|
@@ -336,28 +336,30 @@ const ee = De("ChevronRight", [
|
|
|
336
336
|
flex-direction: column;
|
|
337
337
|
width: 100%;
|
|
338
338
|
height: ${({ theme: e }) => {
|
|
339
|
-
var
|
|
340
|
-
|
|
339
|
+
var D, B;
|
|
340
|
+
const t = ((D = e.space) == null ? void 0 : D.dashboardHeaderHeight) ?? "38px", d = (((B = e.space) == null ? void 0 : B.dashboardHeaderPadding) ?? "0 0 8px 0").trim().split(/\s+/);
|
|
341
|
+
let i = "0px", p = "0px";
|
|
342
|
+
return d.length === 1 ? i = p = d[0] : d.length === 2 ? ([i] = d, p = d[0]) : d.length === 3 ? [i, , p] = d : d.length >= 4 && ([i, , p] = d), t === "auto" ? `calc(100% - ${i} - ${p} - 10px)` : `calc(100% - ${t} - ${i} - ${p} - 10px)`;
|
|
341
343
|
}};
|
|
342
|
-
min-height:
|
|
344
|
+
min-height: 420px;
|
|
343
345
|
overflow: auto;
|
|
344
346
|
background: ${({ theme: e }) => {
|
|
345
|
-
var
|
|
346
|
-
return ((
|
|
347
|
+
var t, n;
|
|
348
|
+
return ((t = e.colors) == null ? void 0 : t.dashboardBackground) || ((n = e.colors) == null ? void 0 : n.background) || "#FFFFFF";
|
|
347
349
|
}};
|
|
348
350
|
/* 优先使用 dashboardBorder,如果没有则使用 border 颜色构建默认 border */
|
|
349
351
|
border: ${({ theme: e }) => {
|
|
350
|
-
var
|
|
351
|
-
return ((
|
|
352
|
+
var t, n;
|
|
353
|
+
return ((t = e.colors) == null ? void 0 : t.dashboardBorder) !== void 0 ? e.colors.dashboardBorder : (n = e.colors) != null && n.border ? `1px solid ${e.colors.border}` : "none";
|
|
352
354
|
}};
|
|
353
355
|
border-radius: ${({ theme: e }) => {
|
|
354
|
-
var
|
|
355
|
-
return ((
|
|
356
|
+
var t, n, d;
|
|
357
|
+
return ((t = e.space) == null ? void 0 : t.dashboardContentRadius) ?? ((n = e.colors) == null ? void 0 : n.dashboardContentRadius) ?? ((d = e.space) == null ? void 0 : d.radius) ?? "4px";
|
|
356
358
|
}};
|
|
357
359
|
/* 优先使用 dashboardShadow,如果没有则使用 shadow */
|
|
358
360
|
box-shadow: ${({ theme: e }) => {
|
|
359
|
-
var
|
|
360
|
-
return ((
|
|
361
|
+
var t, n;
|
|
362
|
+
return ((t = e.colors) == null ? void 0 : t.dashboardShadow) || ((n = e.colors) == null ? void 0 : n.shadow) || "none";
|
|
361
363
|
}};
|
|
362
364
|
`, Qe = l.div.attrs({
|
|
363
365
|
className: "dashboard-container-nav"
|
|
@@ -372,109 +374,109 @@ const ee = De("ChevronRight", [
|
|
|
372
374
|
flex: 1;
|
|
373
375
|
min-width: 0;
|
|
374
376
|
background: ${({ theme: e }) => {
|
|
375
|
-
var
|
|
376
|
-
return ((
|
|
377
|
+
var t;
|
|
378
|
+
return ((t = e.colors) == null ? void 0 : t.dashboardMainBackground) ?? "transparent";
|
|
377
379
|
}};
|
|
378
|
-
`,
|
|
380
|
+
`, et = l.div.attrs({
|
|
379
381
|
className: "dashboard-container-main-layout"
|
|
380
382
|
})`
|
|
381
383
|
height: 100%;
|
|
382
384
|
display: flex;
|
|
383
385
|
width: 100%;
|
|
384
386
|
gap: ${({ theme: e }) => {
|
|
385
|
-
var
|
|
386
|
-
return ((
|
|
387
|
+
var t;
|
|
388
|
+
return ((t = e.space) == null ? void 0 : t.size) || "12px";
|
|
387
389
|
}};
|
|
388
|
-
`,
|
|
390
|
+
`, Ft = ({
|
|
389
391
|
children: e,
|
|
390
|
-
goBack:
|
|
392
|
+
goBack: t,
|
|
391
393
|
title: n,
|
|
392
|
-
description:
|
|
393
|
-
breadcrumbs:
|
|
394
|
-
dockItems:
|
|
394
|
+
description: d,
|
|
395
|
+
breadcrumbs: i,
|
|
396
|
+
dockItems: p,
|
|
395
397
|
// 以下参数为兼容旧版本保留,当前未使用
|
|
396
|
-
dockActiveMode:
|
|
397
|
-
defaultDockActiveId:
|
|
398
|
-
defaultDockActiveIds:
|
|
399
|
-
styles:
|
|
398
|
+
dockActiveMode: D = "single",
|
|
399
|
+
defaultDockActiveId: B,
|
|
400
|
+
defaultDockActiveIds: H,
|
|
401
|
+
styles: z,
|
|
400
402
|
eventsEmit: s
|
|
401
403
|
}) => {
|
|
402
|
-
const K =
|
|
404
|
+
const K = de(), I = G(
|
|
403
405
|
// 基础:默认主题 + useTheme的配置
|
|
404
|
-
G({ theme:
|
|
406
|
+
G({ theme: F, mode: "light" }, K),
|
|
405
407
|
// 最高层:用户手动传入的styles
|
|
406
|
-
|
|
407
|
-
), c = (
|
|
408
|
-
s != null && s.onGoBack ? s.onGoBack() :
|
|
409
|
-
},
|
|
408
|
+
z
|
|
409
|
+
), c = (I == null ? void 0 : I.theme) || F, N = k.useRef(null), S = () => {
|
|
410
|
+
s != null && s.onGoBack ? s.onGoBack() : t && t();
|
|
411
|
+
}, L = () => {
|
|
410
412
|
s != null && s.onTitleClick && s.onTitleClick();
|
|
411
|
-
},
|
|
412
|
-
s != null && s.onBreadcrumbClick ? s.onBreadcrumbClick(
|
|
413
|
-
}, Y = (
|
|
414
|
-
s != null && s.onDockItemClick && s.onDockItemClick(
|
|
415
|
-
},
|
|
416
|
-
if (!
|
|
417
|
-
const [
|
|
418
|
-
if (!
|
|
419
|
-
r({ start: 0, end:
|
|
413
|
+
}, A = (g, r) => {
|
|
414
|
+
s != null && s.onBreadcrumbClick ? s.onBreadcrumbClick(g, r) : g.onClick && g.onClick();
|
|
415
|
+
}, Y = (g, r) => {
|
|
416
|
+
s != null && s.onDockItemClick && s.onDockItemClick(g, r);
|
|
417
|
+
}, j = () => {
|
|
418
|
+
if (!i || i.length === 0) return null;
|
|
419
|
+
const [g, r] = k.useState({ start: 0, end: i.length, showEllipsis: !1 }), R = k.useCallback(() => {
|
|
420
|
+
if (!N.current || i.length <= 3) {
|
|
421
|
+
r({ start: 0, end: i.length, showEllipsis: !1 });
|
|
420
422
|
return;
|
|
421
423
|
}
|
|
422
|
-
const m =
|
|
423
|
-
let
|
|
424
|
-
if (
|
|
425
|
-
r({ start: 0, end:
|
|
424
|
+
const m = N.current.offsetWidth * 0.5;
|
|
425
|
+
let V = Math.floor((m - 30) / (120 + 20));
|
|
426
|
+
if (V < 2 && (V = 2), V >= i.length) {
|
|
427
|
+
r({ start: 0, end: i.length, showEllipsis: !1 });
|
|
426
428
|
return;
|
|
427
429
|
}
|
|
428
|
-
const J = 0, O = Math.min(
|
|
430
|
+
const J = 0, O = Math.min(V - 1, i.length);
|
|
429
431
|
r({
|
|
430
432
|
start: J,
|
|
431
433
|
end: O,
|
|
432
|
-
showEllipsis: O <
|
|
434
|
+
showEllipsis: O < i.length - 1
|
|
433
435
|
});
|
|
434
|
-
}, [
|
|
436
|
+
}, [i.length]);
|
|
435
437
|
if (k.useEffect(() => {
|
|
436
438
|
R();
|
|
437
439
|
const w = new ResizeObserver(() => {
|
|
438
440
|
R();
|
|
439
441
|
});
|
|
440
|
-
return
|
|
442
|
+
return N.current && w.observe(N.current), () => {
|
|
441
443
|
w.disconnect();
|
|
442
444
|
};
|
|
443
|
-
}, [R]),
|
|
444
|
-
return /* @__PURE__ */
|
|
445
|
-
/* @__PURE__ */
|
|
446
|
-
|
|
445
|
+
}, [R]), i.length <= 3)
|
|
446
|
+
return /* @__PURE__ */ o(ke, { theme: c, children: i.map((w, m) => /* @__PURE__ */ b(k.Fragment, { children: [
|
|
447
|
+
/* @__PURE__ */ o(
|
|
448
|
+
te,
|
|
447
449
|
{
|
|
448
|
-
$isLast: m ===
|
|
449
|
-
$isClickable: !!(m <
|
|
450
|
-
onClick: () =>
|
|
450
|
+
$isLast: m === i.length - 1,
|
|
451
|
+
$isClickable: !!(m < i.length - 1 || w.onClick),
|
|
452
|
+
onClick: () => A(w, m),
|
|
451
453
|
theme: c,
|
|
452
454
|
title: w.label,
|
|
453
455
|
children: w.label
|
|
454
456
|
}
|
|
455
457
|
),
|
|
456
|
-
m <
|
|
458
|
+
m < i.length - 1 && /* @__PURE__ */ o(oe, { theme: c, children: /* @__PURE__ */ o(ee, { size: 14 }) })
|
|
457
459
|
] }, w.id)) });
|
|
458
|
-
const { start:
|
|
460
|
+
const { start: E, end: W, showEllipsis: re } = g;
|
|
459
461
|
return /* @__PURE__ */ b(ke, { theme: c, children: [
|
|
460
|
-
|
|
461
|
-
/* @__PURE__ */
|
|
462
|
-
|
|
462
|
+
i.slice(E, W).map((w, m) => /* @__PURE__ */ b(k.Fragment, { children: [
|
|
463
|
+
/* @__PURE__ */ o(
|
|
464
|
+
te,
|
|
463
465
|
{
|
|
464
|
-
$isLast: m === W -
|
|
465
|
-
$isClickable: !!(m < W -
|
|
466
|
-
onClick: () =>
|
|
466
|
+
$isLast: m === W - E - 1 && !re,
|
|
467
|
+
$isClickable: !!(m < W - E - 1 || w.onClick),
|
|
468
|
+
onClick: () => A(w, E + m),
|
|
467
469
|
theme: c,
|
|
468
470
|
title: w.label,
|
|
469
471
|
children: w.label
|
|
470
472
|
}
|
|
471
473
|
),
|
|
472
|
-
m < W -
|
|
474
|
+
m < W - E - 1 && /* @__PURE__ */ o(oe, { theme: c, children: /* @__PURE__ */ o(ee, { size: 14 }) })
|
|
473
475
|
] }, w.id)),
|
|
474
476
|
re && /* @__PURE__ */ b(ye, { children: [
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
-
/* @__PURE__ */
|
|
477
|
-
|
|
477
|
+
/* @__PURE__ */ o(oe, { theme: c, children: /* @__PURE__ */ o(ee, { size: 14 }) }),
|
|
478
|
+
/* @__PURE__ */ o(
|
|
479
|
+
te,
|
|
478
480
|
{
|
|
479
481
|
$isLast: !1,
|
|
480
482
|
$isClickable: !1,
|
|
@@ -483,70 +485,70 @@ const ee = De("ChevronRight", [
|
|
|
483
485
|
cursor: "default",
|
|
484
486
|
maxWidth: "auto"
|
|
485
487
|
},
|
|
486
|
-
title: `${
|
|
488
|
+
title: `${i.slice(W, -1).map((w) => w.label).join(" > ")}`,
|
|
487
489
|
children: "..."
|
|
488
490
|
}
|
|
489
491
|
),
|
|
490
|
-
/* @__PURE__ */
|
|
491
|
-
/* @__PURE__ */
|
|
492
|
-
|
|
492
|
+
/* @__PURE__ */ o(oe, { theme: c, children: /* @__PURE__ */ o(ee, { size: 14 }) }),
|
|
493
|
+
/* @__PURE__ */ o(
|
|
494
|
+
te,
|
|
493
495
|
{
|
|
494
496
|
$isLast: !0,
|
|
495
|
-
$isClickable: !!
|
|
496
|
-
onClick: () =>
|
|
497
|
+
$isClickable: !!i[i.length - 1].onClick,
|
|
498
|
+
onClick: () => A(i[i.length - 1], i.length - 1),
|
|
497
499
|
theme: c,
|
|
498
|
-
title:
|
|
499
|
-
children:
|
|
500
|
+
title: i[i.length - 1].label,
|
|
501
|
+
children: i[i.length - 1].label
|
|
500
502
|
}
|
|
501
503
|
)
|
|
502
504
|
] })
|
|
503
505
|
] });
|
|
504
|
-
}, [
|
|
505
|
-
return /* @__PURE__ */
|
|
506
|
-
|
|
506
|
+
}, [P, q] = k.useState(!0);
|
|
507
|
+
return /* @__PURE__ */ o(Ke, { theme: c, children: /* @__PURE__ */ b(et, { theme: c, children: [
|
|
508
|
+
p && p.length > 0 && /* @__PURE__ */ o(Qe, { $isOpen: P, theme: c, children: /* @__PURE__ */ o(
|
|
507
509
|
Te,
|
|
508
510
|
{
|
|
509
|
-
items:
|
|
510
|
-
open:
|
|
511
|
+
items: p,
|
|
512
|
+
open: P,
|
|
511
513
|
onOpenChange: q,
|
|
512
|
-
onItemClick: (
|
|
514
|
+
onItemClick: (g) => Y({ id: String(g.key), label: g.name }, 0),
|
|
513
515
|
defaultOpen: !0
|
|
514
516
|
}
|
|
515
517
|
) }),
|
|
516
518
|
/* @__PURE__ */ b(Ue, { theme: c, children: [
|
|
517
|
-
(n ||
|
|
518
|
-
|
|
519
|
+
(n || d || t || i) && /* @__PURE__ */ b(Ye, { ref: N, theme: c, children: [
|
|
520
|
+
t && /* @__PURE__ */ o(
|
|
519
521
|
qe,
|
|
520
522
|
{
|
|
521
|
-
onClick:
|
|
523
|
+
onClick: S,
|
|
522
524
|
theme: c,
|
|
523
525
|
title: "\u8FD4\u56DE",
|
|
524
|
-
children: /* @__PURE__ */
|
|
526
|
+
children: /* @__PURE__ */ o(Ge, { size: 18 })
|
|
525
527
|
}
|
|
526
528
|
),
|
|
527
|
-
|
|
528
|
-
n && /* @__PURE__ */
|
|
529
|
+
j(),
|
|
530
|
+
n && /* @__PURE__ */ o(
|
|
529
531
|
Ze,
|
|
530
532
|
{
|
|
531
|
-
onClick:
|
|
533
|
+
onClick: L,
|
|
532
534
|
theme: c,
|
|
533
535
|
title: n,
|
|
534
536
|
children: n
|
|
535
537
|
}
|
|
536
538
|
),
|
|
537
|
-
|
|
539
|
+
d && /* @__PURE__ */ o(
|
|
538
540
|
Xe,
|
|
539
541
|
{
|
|
540
542
|
theme: c,
|
|
541
|
-
title:
|
|
542
|
-
children:
|
|
543
|
+
title: d,
|
|
544
|
+
children: d
|
|
543
545
|
}
|
|
544
546
|
)
|
|
545
547
|
] }),
|
|
546
|
-
/* @__PURE__ */
|
|
548
|
+
/* @__PURE__ */ o(Je, { theme: c, children: e || /* @__PURE__ */ o(Pe, {}) })
|
|
547
549
|
] })
|
|
548
550
|
] }) });
|
|
549
|
-
},
|
|
551
|
+
}, tt = l.div.withConfig({
|
|
550
552
|
shouldForwardProp: (e) => !["backgroundImage", "backgroundColor", "dockPosition"].includes(e)
|
|
551
553
|
})`
|
|
552
554
|
position: fixed;
|
|
@@ -559,13 +561,13 @@ const ee = De("ChevronRight", [
|
|
|
559
561
|
flex-direction: ${(e) => e.dockPosition === "left" || e.dockPosition === "right" ? "row" : "column"};
|
|
560
562
|
overflow: hidden;
|
|
561
563
|
z-index: 1;
|
|
562
|
-
`,
|
|
564
|
+
`, ot = l.div.attrs({ className: "dock-container-main-area" })`
|
|
563
565
|
flex: 1;
|
|
564
566
|
display: flex;
|
|
565
567
|
flex-direction: column;
|
|
566
568
|
overflow: hidden;
|
|
567
569
|
min-width: 0;
|
|
568
|
-
`,
|
|
570
|
+
`, nt = l.div`
|
|
569
571
|
height: 48px;
|
|
570
572
|
width: 100%;
|
|
571
573
|
display: flex;
|
|
@@ -574,7 +576,7 @@ const ee = De("ChevronRight", [
|
|
|
574
576
|
background: transparent;
|
|
575
577
|
z-index: 10;
|
|
576
578
|
flex-shrink: 0;
|
|
577
|
-
`,
|
|
579
|
+
`, rt = l.div`
|
|
578
580
|
flex: 1;
|
|
579
581
|
width: 100%;
|
|
580
582
|
overflow-y: auto;
|
|
@@ -601,7 +603,7 @@ const ee = De("ChevronRight", [
|
|
|
601
603
|
&::-webkit-scrollbar-thumb:hover {
|
|
602
604
|
background: rgba(255, 255, 255, 0.5);
|
|
603
605
|
}
|
|
604
|
-
`, ne = 16,
|
|
606
|
+
`, ne = 16, it = 48, at = it + ne * 2, me = at + ne * 2, lt = l.div.withConfig({
|
|
605
607
|
shouldForwardProp: (e) => !["dockPosition"].includes(e)
|
|
606
608
|
})`
|
|
607
609
|
${(e) => e.dockPosition === "left" || e.dockPosition === "right" ? `
|
|
@@ -622,76 +624,76 @@ const ee = De("ChevronRight", [
|
|
|
622
624
|
background: transparent;
|
|
623
625
|
z-index: 10;
|
|
624
626
|
flex-shrink: 0;
|
|
625
|
-
`,
|
|
627
|
+
`, zt = ({
|
|
626
628
|
children: e,
|
|
627
|
-
backgroundImage:
|
|
629
|
+
backgroundImage: t,
|
|
628
630
|
backgroundColor: n,
|
|
629
|
-
header:
|
|
630
|
-
dockItems:
|
|
631
|
-
dockPosition:
|
|
632
|
-
dockActiveMode:
|
|
633
|
-
defaultDockActiveId:
|
|
634
|
-
defaultDockActiveIds:
|
|
635
|
-
styles:
|
|
631
|
+
header: d,
|
|
632
|
+
dockItems: i,
|
|
633
|
+
dockPosition: p = "bottom",
|
|
634
|
+
dockActiveMode: D = "single",
|
|
635
|
+
defaultDockActiveId: B,
|
|
636
|
+
defaultDockActiveIds: H,
|
|
637
|
+
styles: z,
|
|
636
638
|
eventsEmit: s
|
|
637
639
|
}) => {
|
|
638
|
-
var
|
|
639
|
-
const K =
|
|
640
|
+
var P, q;
|
|
641
|
+
const K = de(), I = G(
|
|
640
642
|
// 基础:默认主题 + useTheme的配置
|
|
641
|
-
G({ theme:
|
|
643
|
+
G({ theme: F, mode: "light" }, K),
|
|
642
644
|
// 最高层:用户手动传入的styles
|
|
643
|
-
|
|
644
|
-
), c = (
|
|
645
|
-
s != null && s.onDockItemClick ? s.onDockItemClick(
|
|
646
|
-
},
|
|
647
|
-
s != null && s.onDockActiveChange && s.onDockActiveChange(
|
|
648
|
-
},
|
|
649
|
-
s != null && s.onDockActiveChangeMultiple && s.onDockActiveChangeMultiple(
|
|
650
|
-
},
|
|
651
|
-
|
|
652
|
-
/* @__PURE__ */
|
|
653
|
-
|
|
645
|
+
z
|
|
646
|
+
), c = (I == null ? void 0 : I.theme) || F, N = (g, r) => {
|
|
647
|
+
s != null && s.onDockItemClick ? s.onDockItemClick(g, r) : g.onClick && g.onClick();
|
|
648
|
+
}, S = (g, r) => {
|
|
649
|
+
s != null && s.onDockActiveChange && s.onDockActiveChange(g, r);
|
|
650
|
+
}, L = (g, r) => {
|
|
651
|
+
s != null && s.onDockActiveChangeMultiple && s.onDockActiveChangeMultiple(g, r);
|
|
652
|
+
}, A = p === "left" || p === "right", Y = /* @__PURE__ */ b(ye, { children: [
|
|
653
|
+
d && /* @__PURE__ */ o(nt, { children: d }),
|
|
654
|
+
/* @__PURE__ */ o(
|
|
655
|
+
rt,
|
|
654
656
|
{
|
|
655
657
|
style: {
|
|
656
658
|
color: c.colors.text,
|
|
657
|
-
fontFamily: ((q = (
|
|
659
|
+
fontFamily: ((q = (P = c.fonts) == null ? void 0 : P.body) == null ? void 0 : q.family) || "PingFang SC, Microsoft YaHei, Arial, sans-serif"
|
|
658
660
|
},
|
|
659
661
|
children: e
|
|
660
662
|
}
|
|
661
663
|
)
|
|
662
|
-
] }),
|
|
664
|
+
] }), j = i && i.length > 0 && /* @__PURE__ */ o(lt, { dockPosition: p, children: /* @__PURE__ */ o(
|
|
663
665
|
Fe,
|
|
664
666
|
{
|
|
665
|
-
items:
|
|
667
|
+
items: i,
|
|
666
668
|
itemWidth: 48,
|
|
667
669
|
itemHeight: 48,
|
|
668
670
|
magnification: 1.5,
|
|
669
671
|
itemGap: 8,
|
|
670
|
-
direction:
|
|
671
|
-
dockPosition:
|
|
672
|
-
activeMode:
|
|
673
|
-
defaultActiveId:
|
|
674
|
-
defaultActiveIds:
|
|
675
|
-
onItemClick:
|
|
676
|
-
onActiveChange:
|
|
677
|
-
onActiveChangeMultiple:
|
|
672
|
+
direction: A ? "vertical" : "horizontal",
|
|
673
|
+
dockPosition: p,
|
|
674
|
+
activeMode: D,
|
|
675
|
+
defaultActiveId: B,
|
|
676
|
+
defaultActiveIds: H,
|
|
677
|
+
onItemClick: N,
|
|
678
|
+
onActiveChange: S,
|
|
679
|
+
onActiveChangeMultiple: L
|
|
678
680
|
}
|
|
679
681
|
) });
|
|
680
682
|
return /* @__PURE__ */ b(
|
|
681
|
-
|
|
683
|
+
tt,
|
|
682
684
|
{
|
|
683
|
-
backgroundImage:
|
|
685
|
+
backgroundImage: t,
|
|
684
686
|
backgroundColor: n,
|
|
685
|
-
dockPosition:
|
|
687
|
+
dockPosition: p,
|
|
686
688
|
children: [
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
(
|
|
689
|
+
p === "top" && j,
|
|
690
|
+
p === "left" && j,
|
|
691
|
+
A ? /* @__PURE__ */ o(ot, { children: Y }) : Y,
|
|
692
|
+
(p === "bottom" || p === "right") && j
|
|
691
693
|
]
|
|
692
694
|
}
|
|
693
695
|
);
|
|
694
|
-
},
|
|
696
|
+
}, st = l.div`
|
|
695
697
|
--header-height: 56px;
|
|
696
698
|
--page-gutter: 16px;
|
|
697
699
|
--sidebar-width: 264px;
|
|
@@ -704,7 +706,7 @@ const ee = De("ChevronRight", [
|
|
|
704
706
|
min-height: 100vh;
|
|
705
707
|
height: 100vh; /* 以视口高度为基准,便于内部独立滚动布局 */
|
|
706
708
|
position: relative;
|
|
707
|
-
`,
|
|
709
|
+
`, dt = l.div`
|
|
708
710
|
position: sticky;
|
|
709
711
|
top: 0;
|
|
710
712
|
z-index: 30;
|
|
@@ -716,12 +718,12 @@ const ee = De("ChevronRight", [
|
|
|
716
718
|
padding: 0 16px;
|
|
717
719
|
border-bottom: 1px solid rgba(0,0,0,0.06);
|
|
718
720
|
backdrop-filter: blur(8px);
|
|
719
|
-
`,
|
|
721
|
+
`, ct = l.div`
|
|
720
722
|
display: flex;
|
|
721
723
|
align-items: center;
|
|
722
724
|
gap: 12px;
|
|
723
725
|
min-width: 0;
|
|
724
|
-
`,
|
|
726
|
+
`, ht = l.div`
|
|
725
727
|
display: flex;
|
|
726
728
|
align-items: center;
|
|
727
729
|
gap: 8px;
|
|
@@ -739,7 +741,7 @@ const ee = De("ChevronRight", [
|
|
|
739
741
|
|
|
740
742
|
&:hover { background: rgba(0,0,0,0.04); }
|
|
741
743
|
&:active { transform: translateY(1px); }
|
|
742
|
-
`,
|
|
744
|
+
`, pt = l.div`
|
|
743
745
|
display: grid;
|
|
744
746
|
grid-template-columns: var(--sidebar-width) 1fr var(--toc-width);
|
|
745
747
|
gap: 16px;
|
|
@@ -760,9 +762,9 @@ const ee = De("ChevronRight", [
|
|
|
760
762
|
gap: 12px;
|
|
761
763
|
padding: 12px 12px 20px 12px;
|
|
762
764
|
}
|
|
763
|
-
`,
|
|
765
|
+
`, ut = l.aside`
|
|
764
766
|
position: relative;
|
|
765
|
-
`,
|
|
767
|
+
`, gt = l.div`
|
|
766
768
|
height: 100%;
|
|
767
769
|
overflow: hidden;
|
|
768
770
|
padding-right: 8px;
|
|
@@ -771,7 +773,7 @@ const ee = De("ChevronRight", [
|
|
|
771
773
|
opacity: ${(e) => e.$collapsed ? 0 : 1};
|
|
772
774
|
transform: translateX(${(e) => e.$collapsed ? "-6px" : "0px"});
|
|
773
775
|
pointer-events: ${(e) => e.$collapsed ? "none" : "auto"};
|
|
774
|
-
`,
|
|
776
|
+
`, ft = l.button`
|
|
775
777
|
position: absolute;
|
|
776
778
|
top: 6px;
|
|
777
779
|
right: -10px;
|
|
@@ -786,16 +788,16 @@ const ee = De("ChevronRight", [
|
|
|
786
788
|
justify-content: center;
|
|
787
789
|
transition: background .15s ease;
|
|
788
790
|
&:hover { background: rgba(0,0,0,0.12); }
|
|
789
|
-
`,
|
|
791
|
+
`, xt = l.div`
|
|
790
792
|
height: 100%;
|
|
791
793
|
overflow: auto;
|
|
792
794
|
padding-right: 8px;
|
|
793
|
-
`,
|
|
795
|
+
`, bt = l.main`
|
|
794
796
|
position: relative;
|
|
795
797
|
min-width: 0;
|
|
796
798
|
height: 100%;
|
|
797
799
|
overflow: auto; /* 文档渲染区独立滚动 */
|
|
798
|
-
`,
|
|
800
|
+
`, wt = l.div`
|
|
799
801
|
width: 100%;
|
|
800
802
|
max-width: var(--content-max);
|
|
801
803
|
margin: 0 auto;
|
|
@@ -803,16 +805,16 @@ const ee = De("ChevronRight", [
|
|
|
803
805
|
border-radius: 8px;
|
|
804
806
|
padding: 0px 12px;
|
|
805
807
|
padding-bottom: 120px; /* 底部留出足够的 margin,确保可以滚动到最底部 */
|
|
806
|
-
`,
|
|
808
|
+
`, kt = l.div`
|
|
807
809
|
height: 100%;
|
|
808
810
|
transition: opacity .5s ease;
|
|
809
811
|
opacity: ${(e) => e.$opacity};
|
|
810
|
-
`,
|
|
812
|
+
`, mt = l.aside`
|
|
811
813
|
position: relative;
|
|
812
814
|
z-index: 1;
|
|
813
815
|
height: 100%;
|
|
814
816
|
overflow: hidden;
|
|
815
|
-
`,
|
|
817
|
+
`, vt = l.div`
|
|
816
818
|
/* 右侧目录独立滚动 */
|
|
817
819
|
position: relative;
|
|
818
820
|
height: 100%;
|
|
@@ -824,7 +826,7 @@ const ee = De("ChevronRight", [
|
|
|
824
826
|
border-left: 1px solid rgba(0,0,0,0.06);
|
|
825
827
|
background: transparent;
|
|
826
828
|
z-index: 1;
|
|
827
|
-
`,
|
|
829
|
+
`, yt = l.div`
|
|
828
830
|
transition: opacity .2s ease, transform .2s ease;
|
|
829
831
|
opacity: ${(e) => e.$collapsed ? 0 : 1};
|
|
830
832
|
transform: translateX(${(e) => e.$collapsed ? "6px" : "0px"});
|
|
@@ -884,7 +886,7 @@ const le = l.div`
|
|
|
884
886
|
}
|
|
885
887
|
|
|
886
888
|
${(e) => e.$active ? "background: rgba(0,0,0,0.08); font-weight: 600;" : ""}
|
|
887
|
-
`,
|
|
889
|
+
`, Ct = l.div`
|
|
888
890
|
display: flex;
|
|
889
891
|
align-items: center;
|
|
890
892
|
gap: 8px;
|
|
@@ -894,16 +896,16 @@ const le = l.div`
|
|
|
894
896
|
overflow-y: hidden;
|
|
895
897
|
scrollbar-width: none;
|
|
896
898
|
&::-webkit-scrollbar { display: none; }
|
|
897
|
-
`,
|
|
899
|
+
`, $t = l.div`
|
|
898
900
|
width: 1px;
|
|
899
901
|
height: 16px;
|
|
900
902
|
background: currentColor;
|
|
901
903
|
opacity: .2;
|
|
902
|
-
`,
|
|
904
|
+
`, Bt = {
|
|
903
905
|
theme: {
|
|
904
|
-
...
|
|
906
|
+
...F,
|
|
905
907
|
colors: {
|
|
906
|
-
...
|
|
908
|
+
...F.colors,
|
|
907
909
|
appBackground: "#ffffff",
|
|
908
910
|
panelBackground: "#ffffff",
|
|
909
911
|
dashboardBackground: "#ffffff",
|
|
@@ -913,11 +915,11 @@ const le = l.div`
|
|
|
913
915
|
shadow: "0 1px 2px rgba(0,0,0,0.06)"
|
|
914
916
|
}
|
|
915
917
|
}
|
|
916
|
-
},
|
|
918
|
+
}, Dt = {
|
|
917
919
|
theme: {
|
|
918
|
-
...
|
|
920
|
+
...F,
|
|
919
921
|
colors: {
|
|
920
|
-
...
|
|
922
|
+
...F.colors,
|
|
921
923
|
appBackground: "#0f172a",
|
|
922
924
|
panelBackground: "#111827",
|
|
923
925
|
dashboardBackground: "#0b1220",
|
|
@@ -928,120 +930,120 @@ const le = l.div`
|
|
|
928
930
|
}
|
|
929
931
|
},
|
|
930
932
|
mode: "dark"
|
|
931
|
-
},
|
|
933
|
+
}, Mt = (e) => {
|
|
932
934
|
var ge, fe, xe, be;
|
|
933
935
|
const {
|
|
934
|
-
children:
|
|
936
|
+
children: t,
|
|
935
937
|
headerLogo: n,
|
|
936
|
-
contentKey:
|
|
937
|
-
modules:
|
|
938
|
-
activeModuleKey:
|
|
939
|
-
onModuleChange:
|
|
940
|
-
languages:
|
|
941
|
-
activeLanguageKey:
|
|
942
|
-
onLanguageChange:
|
|
938
|
+
contentKey: d,
|
|
939
|
+
modules: i,
|
|
940
|
+
activeModuleKey: p,
|
|
941
|
+
onModuleChange: D,
|
|
942
|
+
languages: B,
|
|
943
|
+
activeLanguageKey: H,
|
|
944
|
+
onLanguageChange: z,
|
|
943
945
|
themes: s,
|
|
944
946
|
activeThemeKey: K,
|
|
945
|
-
onThemeChange:
|
|
947
|
+
onThemeChange: I,
|
|
946
948
|
sidebarItems: c,
|
|
947
|
-
activeSidebarId:
|
|
948
|
-
onSidebarItemClick:
|
|
949
|
-
activeTocId:
|
|
950
|
-
onTocItemClick:
|
|
949
|
+
activeSidebarId: N,
|
|
950
|
+
onSidebarItemClick: S,
|
|
951
|
+
activeTocId: L,
|
|
952
|
+
onTocItemClick: A,
|
|
951
953
|
collapsibleSidebar: Y = !0,
|
|
952
|
-
styles:
|
|
953
|
-
} = e,
|
|
954
|
+
styles: j
|
|
955
|
+
} = e, P = de(), q = e.activeThemeKey === "dark" ? Dt : Bt, g = G(
|
|
954
956
|
G(
|
|
955
|
-
G({ theme:
|
|
957
|
+
G({ theme: F, mode: "light" }, P),
|
|
956
958
|
q
|
|
957
959
|
),
|
|
958
|
-
|
|
959
|
-
), r = (
|
|
960
|
+
j
|
|
961
|
+
), r = (g == null ? void 0 : g.theme) || F, [R, E] = k.useState(!1), [W, re] = k.useState(!1), [w, m] = k.useState(!1), U = typeof L == "string", [ce, ie] = k.useState(L), V = k.useRef(null), [J, O] = k.useState(void 0), [Ie, he] = k.useState(t), [Ne, pe] = k.useState(1);
|
|
960
962
|
k.useEffect(() => {
|
|
961
|
-
if (
|
|
962
|
-
he(
|
|
963
|
+
if (d === void 0) {
|
|
964
|
+
he(t);
|
|
963
965
|
return;
|
|
964
966
|
}
|
|
965
967
|
pe(0);
|
|
966
|
-
const
|
|
967
|
-
he(
|
|
968
|
+
const a = setTimeout(() => {
|
|
969
|
+
he(t), requestAnimationFrame(() => pe(1));
|
|
968
970
|
}, 120);
|
|
969
|
-
return () => clearTimeout(
|
|
970
|
-
}, [
|
|
971
|
-
var
|
|
971
|
+
return () => clearTimeout(a);
|
|
972
|
+
}, [d, t]), k.useMemo(() => {
|
|
973
|
+
var a, f, u, y, $, h, v, x, _, C, M, Z, Q;
|
|
972
974
|
return {
|
|
973
|
-
primaryColor: (
|
|
974
|
-
secondaryColor: (
|
|
975
|
-
backgroundColor: (
|
|
975
|
+
primaryColor: (a = r == null ? void 0 : r.colors) == null ? void 0 : a.primary,
|
|
976
|
+
secondaryColor: (f = r == null ? void 0 : r.colors) == null ? void 0 : f.secondary,
|
|
977
|
+
backgroundColor: (u = r == null ? void 0 : r.colors) == null ? void 0 : u.appBackground,
|
|
976
978
|
textColor: (y = r == null ? void 0 : r.colors) == null ? void 0 : y.text,
|
|
977
979
|
borderColor: ($ = r == null ? void 0 : r.colors) == null ? void 0 : $.border,
|
|
978
|
-
disabledBackground: (
|
|
980
|
+
disabledBackground: (h = r == null ? void 0 : r.colors) == null ? void 0 : h.disabledBackground,
|
|
979
981
|
borderRadius: (v = r == null ? void 0 : r.space) == null ? void 0 : v.radius,
|
|
980
|
-
padding: (
|
|
981
|
-
margin: (
|
|
982
|
-
baseFontSize: (
|
|
982
|
+
padding: (x = r == null ? void 0 : r.space) == null ? void 0 : x.padding,
|
|
983
|
+
margin: (_ = r == null ? void 0 : r.space) == null ? void 0 : _.margin,
|
|
984
|
+
baseFontSize: (M = (C = r == null ? void 0 : r.fonts) == null ? void 0 : C.body) != null && M.size ? parseInt((Q = (Z = r == null ? void 0 : r.fonts) == null ? void 0 : Z.body) == null ? void 0 : Q.size, 10) : void 0
|
|
983
985
|
};
|
|
984
986
|
}, [r]), k.useEffect(() => {
|
|
985
987
|
if (e.tocItems)
|
|
986
988
|
O(void 0);
|
|
987
989
|
else {
|
|
988
|
-
|
|
989
|
-
let
|
|
990
|
-
const
|
|
991
|
-
let
|
|
990
|
+
d !== void 0 && O(void 0);
|
|
991
|
+
let a = 0;
|
|
992
|
+
const f = 10;
|
|
993
|
+
let u = null, y = null;
|
|
992
994
|
const $ = () => {
|
|
993
|
-
const
|
|
994
|
-
if (!
|
|
995
|
-
|
|
995
|
+
const h = V.current;
|
|
996
|
+
if (!h) {
|
|
997
|
+
a < f ? (a++, u = setTimeout($, 200)) : O([]);
|
|
996
998
|
return;
|
|
997
999
|
}
|
|
998
|
-
const v = Array.from(
|
|
1000
|
+
const v = Array.from(h.querySelectorAll("h1, h2, h3"));
|
|
999
1001
|
if (v.length === 0) {
|
|
1000
|
-
|
|
1002
|
+
a < f ? (a++, u = setTimeout($, 200)) : O([]);
|
|
1001
1003
|
return;
|
|
1002
1004
|
}
|
|
1003
|
-
const
|
|
1005
|
+
const x = /* @__PURE__ */ new Map(), _ = v.map((C) => {
|
|
1004
1006
|
var we;
|
|
1005
|
-
const
|
|
1006
|
-
|
|
1007
|
-
const Q = Z > 0 ? `${
|
|
1007
|
+
const M = C.id || ((we = C.textContent) == null ? void 0 : we.trim().replace(/\s+/g, "-").toLowerCase()) || "", Z = x.get(M) || 0;
|
|
1008
|
+
x.set(M, Z + 1);
|
|
1009
|
+
const Q = Z > 0 ? `${M}-${Z}` : M;
|
|
1008
1010
|
C.id || (C.id = Q);
|
|
1009
1011
|
const Se = C.tagName === "H1" ? 1 : C.tagName === "H2" ? 2 : 3;
|
|
1010
1012
|
return { id: Q, label: C.textContent || "", level: Se };
|
|
1011
1013
|
});
|
|
1012
|
-
O(
|
|
1014
|
+
O(_);
|
|
1013
1015
|
};
|
|
1014
1016
|
return y = requestAnimationFrame(() => {
|
|
1015
|
-
|
|
1017
|
+
u = setTimeout($, 100);
|
|
1016
1018
|
}), () => {
|
|
1017
|
-
y !== null && cancelAnimationFrame(y),
|
|
1019
|
+
y !== null && cancelAnimationFrame(y), u !== null && clearTimeout(u);
|
|
1018
1020
|
};
|
|
1019
1021
|
}
|
|
1020
|
-
}, [
|
|
1022
|
+
}, [t, e.tocItems, d]), k.useEffect(() => {
|
|
1021
1023
|
if (U) return;
|
|
1022
|
-
const
|
|
1023
|
-
if (
|
|
1024
|
+
const f = ((e.tocItems ?? J) || []).map((h) => h.id).filter(Boolean);
|
|
1025
|
+
if (f.length === 0) return;
|
|
1024
1026
|
ie(void 0);
|
|
1025
|
-
const
|
|
1026
|
-
var
|
|
1027
|
-
const v =
|
|
1028
|
-
(
|
|
1029
|
-
}, $ = new IntersectionObserver(y,
|
|
1030
|
-
return
|
|
1031
|
-
const v = document.getElementById(
|
|
1027
|
+
const u = { root: null, rootMargin: "0px 0px -70% 0px", threshold: 0 }, y = (h) => {
|
|
1028
|
+
var x, _;
|
|
1029
|
+
const v = h.filter((C) => C.isIntersecting).sort((C, M) => C.boundingClientRect.top - M.boundingClientRect.top);
|
|
1030
|
+
(_ = (x = v[0]) == null ? void 0 : x.target) != null && _.id && ie(v[0].target.id);
|
|
1031
|
+
}, $ = new IntersectionObserver(y, u);
|
|
1032
|
+
return f.forEach((h) => {
|
|
1033
|
+
const v = document.getElementById(h);
|
|
1032
1034
|
v && $.observe(v);
|
|
1033
1035
|
}), () => $.disconnect();
|
|
1034
|
-
}, [J, U, e.tocItems,
|
|
1035
|
-
const ue = (
|
|
1036
|
-
if (!
|
|
1037
|
-
const
|
|
1036
|
+
}, [J, U, e.tocItems, d]);
|
|
1037
|
+
const ue = (a, f) => {
|
|
1038
|
+
if (!a || a.length === 0) return;
|
|
1039
|
+
const u = Math.max(0, a.findIndex(($) => $.key === f)), y = a[(u + 1) % a.length];
|
|
1038
1040
|
return y == null ? void 0 : y.key;
|
|
1039
|
-
}, ae = (
|
|
1040
|
-
const
|
|
1041
|
-
|
|
1041
|
+
}, ae = (a) => {
|
|
1042
|
+
const f = document.getElementById(a);
|
|
1043
|
+
f && f.scrollIntoView({ behavior: "smooth", block: "start", inline: "nearest" });
|
|
1042
1044
|
};
|
|
1043
|
-
return /* @__PURE__ */
|
|
1044
|
-
|
|
1045
|
+
return /* @__PURE__ */ o(Ae, { theme: r, mode: g.mode, children: /* @__PURE__ */ b(
|
|
1046
|
+
st,
|
|
1045
1047
|
{
|
|
1046
1048
|
style: {
|
|
1047
1049
|
background: r.colors.appBackground,
|
|
@@ -1050,115 +1052,115 @@ const le = l.div`
|
|
|
1050
1052
|
},
|
|
1051
1053
|
children: [
|
|
1052
1054
|
/* @__PURE__ */ b(
|
|
1053
|
-
|
|
1055
|
+
dt,
|
|
1054
1056
|
{
|
|
1055
1057
|
style: {
|
|
1056
1058
|
background: r.colors.panelBackground || r.colors.dashboardBackground || "rgba(255,255,255,0.6)",
|
|
1057
1059
|
color: r.colors.text
|
|
1058
1060
|
},
|
|
1059
1061
|
children: [
|
|
1060
|
-
/* @__PURE__ */ b(
|
|
1062
|
+
/* @__PURE__ */ b(ct, { children: [
|
|
1061
1063
|
n,
|
|
1062
|
-
|
|
1064
|
+
i && i.length > 0 && /* @__PURE__ */ o(Ct, { children: i.map((a) => /* @__PURE__ */ o(
|
|
1063
1065
|
X,
|
|
1064
1066
|
{
|
|
1065
|
-
$active:
|
|
1066
|
-
onClick: () =>
|
|
1067
|
-
title:
|
|
1068
|
-
children:
|
|
1067
|
+
$active: a.key === p,
|
|
1068
|
+
onClick: () => D == null ? void 0 : D(a.key),
|
|
1069
|
+
title: a.label,
|
|
1070
|
+
children: a.label
|
|
1069
1071
|
},
|
|
1070
|
-
|
|
1072
|
+
a.key
|
|
1071
1073
|
)) })
|
|
1072
1074
|
] }),
|
|
1073
|
-
/* @__PURE__ */ b(
|
|
1074
|
-
/* @__PURE__ */
|
|
1075
|
-
|
|
1075
|
+
/* @__PURE__ */ b(ht, { children: [
|
|
1076
|
+
/* @__PURE__ */ o("div", { className: "hide-on-desktop", style: { display: "none" } }),
|
|
1077
|
+
B && B.length > 0 && /* @__PURE__ */ o(
|
|
1076
1078
|
ve,
|
|
1077
1079
|
{
|
|
1078
1080
|
onClick: () => {
|
|
1079
|
-
const
|
|
1080
|
-
|
|
1081
|
+
const a = ue(B, H);
|
|
1082
|
+
a && (z == null || z(a));
|
|
1081
1083
|
},
|
|
1082
|
-
title: ((xe =
|
|
1084
|
+
title: ((xe = B.find((a) => a.key === H)) == null ? void 0 : xe.label) || "Language",
|
|
1083
1085
|
"aria-label": "language",
|
|
1084
1086
|
style: { color: r.colors.text },
|
|
1085
1087
|
children: /* @__PURE__ */ b("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1086
|
-
/* @__PURE__ */
|
|
1087
|
-
/* @__PURE__ */
|
|
1088
|
+
/* @__PURE__ */ o("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" }),
|
|
1089
|
+
/* @__PURE__ */ o("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" })
|
|
1088
1090
|
] })
|
|
1089
1091
|
}
|
|
1090
1092
|
),
|
|
1091
|
-
/* @__PURE__ */ t
|
|
1092
|
-
s && s.length > 0 && /* @__PURE__ */
|
|
1093
|
+
/* @__PURE__ */ o($t, {}),
|
|
1094
|
+
s && s.length > 0 && /* @__PURE__ */ o(
|
|
1093
1095
|
ve,
|
|
1094
1096
|
{
|
|
1095
1097
|
onClick: () => {
|
|
1096
|
-
const
|
|
1097
|
-
|
|
1098
|
+
const a = ue(s, K);
|
|
1099
|
+
a && (I == null || I(a));
|
|
1098
1100
|
},
|
|
1099
|
-
title: ((be = s.find((
|
|
1101
|
+
title: ((be = s.find((a) => a.key === K)) == null ? void 0 : be.label) || "Theme",
|
|
1100
1102
|
"aria-label": "theme",
|
|
1101
1103
|
style: { color: r.colors.text },
|
|
1102
|
-
children: /* @__PURE__ */
|
|
1104
|
+
children: /* @__PURE__ */ o("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ o("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" }) })
|
|
1103
1105
|
}
|
|
1104
1106
|
),
|
|
1105
|
-
/* @__PURE__ */
|
|
1107
|
+
/* @__PURE__ */ o("div", { className: "mobile-only", style: { display: "none" }, children: /* @__PURE__ */ o(X, { onClick: () => m(!0), title: "\u6253\u5F00\u76EE\u5F55", children: "\u76EE\u5F55" }) })
|
|
1106
1108
|
] })
|
|
1107
1109
|
]
|
|
1108
1110
|
}
|
|
1109
1111
|
),
|
|
1110
1112
|
(() => {
|
|
1111
|
-
const
|
|
1112
|
-
return /* @__PURE__ */ b(
|
|
1113
|
-
|
|
1114
|
-
/* @__PURE__ */
|
|
1115
|
-
c.reduce((
|
|
1116
|
-
const
|
|
1117
|
-
return
|
|
1113
|
+
const f = (Array.isArray(c) ? c.length : 0) > 1, u = f ? R ? "10px" : "var(--sidebar-width)" : "0px", y = W ? "10px" : "var(--toc-width)", $ = f ? `${u} 1fr ${y}` : `1fr ${y}`;
|
|
1114
|
+
return /* @__PURE__ */ b(pt, { style: { gridTemplateColumns: $ }, children: [
|
|
1115
|
+
f && /* @__PURE__ */ b(ut, { children: [
|
|
1116
|
+
/* @__PURE__ */ o(gt, { $collapsed: R, children: /* @__PURE__ */ o(xt, { children: c && c.length > 0 && /* @__PURE__ */ o("div", { children: Object.entries(
|
|
1117
|
+
c.reduce((h, v) => {
|
|
1118
|
+
const x = v.group || "\u6587\u6863";
|
|
1119
|
+
return h[x] = h[x] || [], h[x].push(v), h;
|
|
1118
1120
|
}, {})
|
|
1119
|
-
).map(([
|
|
1120
|
-
/* @__PURE__ */
|
|
1121
|
-
/* @__PURE__ */
|
|
1121
|
+
).map(([h, v]) => /* @__PURE__ */ b("div", { children: [
|
|
1122
|
+
/* @__PURE__ */ o(le, { children: h }),
|
|
1123
|
+
/* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px" }, children: v.map((x) => /* @__PURE__ */ o(
|
|
1122
1124
|
X,
|
|
1123
1125
|
{
|
|
1124
|
-
$active:
|
|
1126
|
+
$active: x.id === N,
|
|
1125
1127
|
onClick: () => {
|
|
1126
|
-
|
|
1128
|
+
x.href && (x.href.startsWith("#") ? ae(x.href.slice(1)) : window.location.href = x.href), S == null || S(x), m(!1);
|
|
1127
1129
|
},
|
|
1128
|
-
title:
|
|
1129
|
-
children:
|
|
1130
|
+
title: x.label,
|
|
1131
|
+
children: x.label
|
|
1130
1132
|
},
|
|
1131
|
-
|
|
1133
|
+
x.id
|
|
1132
1134
|
)) })
|
|
1133
|
-
] },
|
|
1134
|
-
Y &&
|
|
1135
|
+
] }, h)) }) }) }),
|
|
1136
|
+
Y && f && /* @__PURE__ */ o(ft, { onClick: () => E((h) => !h), title: R ? "\u5C55\u5F00\u5DE6\u4FA7\u680F" : "\u6536\u8D77\u5DE6\u4FA7\u680F", "aria-label": "toggle-left", children: R ? /* @__PURE__ */ o("svg", { width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ o("path", { d: "M9 6l6 6-6 6", stroke: "currentColor", strokeWidth: "1.6" }) }) : /* @__PURE__ */ o("svg", { width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ o("path", { d: "M15 6l-6 6 6 6", stroke: "currentColor", strokeWidth: "1.6" }) }) })
|
|
1135
1137
|
] }),
|
|
1136
|
-
/* @__PURE__ */
|
|
1137
|
-
|
|
1138
|
+
/* @__PURE__ */ o(bt, { children: /* @__PURE__ */ o(
|
|
1139
|
+
wt,
|
|
1138
1140
|
{
|
|
1139
|
-
ref:
|
|
1140
|
-
children: /* @__PURE__ */
|
|
1141
|
+
ref: V,
|
|
1142
|
+
children: /* @__PURE__ */ o(kt, { $opacity: Ne, children: Ie })
|
|
1141
1143
|
}
|
|
1142
1144
|
) }),
|
|
1143
|
-
/* @__PURE__ */
|
|
1144
|
-
/* @__PURE__ */
|
|
1145
|
-
/* @__PURE__ */
|
|
1145
|
+
/* @__PURE__ */ o(mt, { children: /* @__PURE__ */ o(vt, { children: /* @__PURE__ */ b(yt, { $collapsed: W, children: [
|
|
1146
|
+
/* @__PURE__ */ o(le, { children: "\u672C\u9875\u76EE\u5F55" }),
|
|
1147
|
+
/* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px", width: "100%", maxWidth: "100%", overflow: "hidden" }, children: ((e.tocItems ?? J) || []).map((h) => /* @__PURE__ */ o(
|
|
1146
1148
|
X,
|
|
1147
1149
|
{
|
|
1148
|
-
$active: (U ?
|
|
1150
|
+
$active: (U ? L : ce) === h.id,
|
|
1149
1151
|
onClick: () => {
|
|
1150
|
-
ae(
|
|
1152
|
+
ae(h.id), A == null || A(h);
|
|
1151
1153
|
},
|
|
1152
|
-
title:
|
|
1153
|
-
style: { paddingLeft: Math.max(0, (
|
|
1154
|
-
children:
|
|
1154
|
+
title: h.label,
|
|
1155
|
+
style: { paddingLeft: Math.max(0, (h.level || 1) - 1) * 12 + 10 },
|
|
1156
|
+
children: h.label
|
|
1155
1157
|
},
|
|
1156
|
-
|
|
1158
|
+
h.id
|
|
1157
1159
|
)) })
|
|
1158
1160
|
] }) }) })
|
|
1159
1161
|
] });
|
|
1160
1162
|
})(),
|
|
1161
|
-
w && /* @__PURE__ */
|
|
1163
|
+
w && /* @__PURE__ */ o(
|
|
1162
1164
|
"div",
|
|
1163
1165
|
{
|
|
1164
1166
|
role: "dialog",
|
|
@@ -1183,31 +1185,31 @@ const le = l.div`
|
|
|
1183
1185
|
borderRight: `1px solid ${r.colors.border}`,
|
|
1184
1186
|
padding: 12
|
|
1185
1187
|
},
|
|
1186
|
-
onClick: (
|
|
1188
|
+
onClick: (a) => a.stopPropagation(),
|
|
1187
1189
|
children: [
|
|
1188
1190
|
/* @__PURE__ */ b("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 8 }, children: [
|
|
1189
|
-
/* @__PURE__ */
|
|
1190
|
-
/* @__PURE__ */
|
|
1191
|
+
/* @__PURE__ */ o("div", { style: { fontWeight: 600 }, children: "\u76EE\u5F55" }),
|
|
1192
|
+
/* @__PURE__ */ o(X, { onClick: () => m(!1), children: "\u5173\u95ED" })
|
|
1191
1193
|
] }),
|
|
1192
|
-
c && c.length > 0 && /* @__PURE__ */
|
|
1193
|
-
c.reduce((
|
|
1194
|
-
const
|
|
1195
|
-
return
|
|
1194
|
+
c && c.length > 0 && /* @__PURE__ */ o("div", { style: { overflow: "auto", height: "calc(100% - 40px)" }, children: Object.entries(
|
|
1195
|
+
c.reduce((a, f) => {
|
|
1196
|
+
const u = f.group || "\u6587\u6863";
|
|
1197
|
+
return a[u] = a[u] || [], a[u].push(f), a;
|
|
1196
1198
|
}, {})
|
|
1197
|
-
).map(([
|
|
1198
|
-
/* @__PURE__ */
|
|
1199
|
-
/* @__PURE__ */
|
|
1199
|
+
).map(([a, f]) => /* @__PURE__ */ b("div", { children: [
|
|
1200
|
+
/* @__PURE__ */ o(le, { children: a }),
|
|
1201
|
+
/* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px" }, children: f.map((u) => /* @__PURE__ */ o(
|
|
1200
1202
|
X,
|
|
1201
1203
|
{
|
|
1202
|
-
$active:
|
|
1204
|
+
$active: u.id === N,
|
|
1203
1205
|
onClick: () => {
|
|
1204
|
-
|
|
1206
|
+
u.href && (u.href.startsWith("#") ? ae(u.href.slice(1)) : window.location.href = u.href), S == null || S(u), m(!1);
|
|
1205
1207
|
},
|
|
1206
|
-
children:
|
|
1208
|
+
children: u.label
|
|
1207
1209
|
},
|
|
1208
|
-
|
|
1210
|
+
u.id
|
|
1209
1211
|
)) })
|
|
1210
|
-
] },
|
|
1212
|
+
] }, a)) })
|
|
1211
1213
|
]
|
|
1212
1214
|
}
|
|
1213
1215
|
)
|
|
@@ -1218,7 +1220,7 @@ const le = l.div`
|
|
|
1218
1220
|
) });
|
|
1219
1221
|
};
|
|
1220
1222
|
export {
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1223
|
+
Ft as DashboardContainer,
|
|
1224
|
+
zt as DockContainer,
|
|
1225
|
+
Mt as DocumentContainer
|
|
1224
1226
|
};
|