@mxmweb/zui-layouts 1.3.7 → 1.3.10
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 +515 -485
- package/lib_enter.d.ts +1 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
1
|
+
import { jsx as o, jsxs as b, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
+
import * as T from "react";
|
|
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 de, deepMergeTheme as G, defaultTheme as F, 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
|
|
18
|
-
process.env.NODE_ENV !== "production" && (
|
|
19
|
-
const
|
|
20
|
-
process.env.NODE_ENV !== "production" && (
|
|
21
|
-
const
|
|
22
|
-
process.env.NODE_ENV !== "production" && (
|
|
23
|
-
const
|
|
24
|
-
process.env.NODE_ENV !== "production" && (
|
|
25
|
-
const
|
|
26
|
-
process.env.NODE_ENV !== "production" && (
|
|
27
|
-
const
|
|
17
|
+
const ze = /* @__PURE__ */ T.createContext(null);
|
|
18
|
+
process.env.NODE_ENV !== "production" && (ze.displayName = "DataRouter");
|
|
19
|
+
const Me = /* @__PURE__ */ T.createContext(null);
|
|
20
|
+
process.env.NODE_ENV !== "production" && (Me.displayName = "DataRouterState");
|
|
21
|
+
const Re = /* @__PURE__ */ T.createContext(null);
|
|
22
|
+
process.env.NODE_ENV !== "production" && (Re.displayName = "Await");
|
|
23
|
+
const We = /* @__PURE__ */ T.createContext(null);
|
|
24
|
+
process.env.NODE_ENV !== "production" && (We.displayName = "Navigation");
|
|
25
|
+
const Oe = /* @__PURE__ */ T.createContext(null);
|
|
26
|
+
process.env.NODE_ENV !== "production" && (Oe.displayName = "Location");
|
|
27
|
+
const $e = /* @__PURE__ */ T.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
|
|
38
|
-
return
|
|
32
|
+
process.env.NODE_ENV !== "production" && ($e.displayName = "Route");
|
|
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 Ee = {
|
|
|
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 _e =
|
|
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:
|
|
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 _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:
|
|
115
|
-
iconNode:
|
|
116
|
-
className:
|
|
117
|
-
...
|
|
111
|
+
const De = (e, t) => {
|
|
112
|
+
const n = Ce(
|
|
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;
|
|
@@ -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,55 +135,55 @@ 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;
|
|
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;
|
|
183
183
|
justify-content: flex-start;
|
|
184
184
|
width: 100%;
|
|
185
185
|
min-width: 0; /* 确保 flex 子元素可以收缩 */
|
|
186
|
-
`,
|
|
186
|
+
`, qe = l.button.attrs({
|
|
187
187
|
className: "dashboard-container-back-button"
|
|
188
188
|
})`
|
|
189
189
|
display: flex;
|
|
@@ -195,12 +195,12 @@ const U = Ce("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 U = Ce("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 U = Ce("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,15 +273,15 @@ const U = Ce("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"
|
|
286
286
|
})`
|
|
287
287
|
display: flex;
|
|
@@ -291,19 +291,19 @@ const U = Ce("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,9 +314,9 @@ const U = Ce("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({
|
|
@@ -325,43 +325,48 @@ const U = Ce("ChevronRight", [
|
|
|
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({
|
|
333
333
|
className: "dashboard-container-content"
|
|
334
334
|
})`
|
|
335
335
|
display: flex;
|
|
336
336
|
flex-direction: column;
|
|
337
337
|
width: 100%;
|
|
338
|
-
height:
|
|
339
|
-
|
|
338
|
+
height: ${({ theme: e }) => {
|
|
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)`;
|
|
343
|
+
}};
|
|
344
|
+
min-height: 420px;
|
|
340
345
|
overflow: auto;
|
|
341
346
|
background: ${({ theme: e }) => {
|
|
342
|
-
var
|
|
343
|
-
return ((
|
|
347
|
+
var t, n;
|
|
348
|
+
return ((t = e.colors) == null ? void 0 : t.dashboardBackground) || ((n = e.colors) == null ? void 0 : n.background) || "#FFFFFF";
|
|
344
349
|
}};
|
|
345
350
|
/* 优先使用 dashboardBorder,如果没有则使用 border 颜色构建默认 border */
|
|
346
351
|
border: ${({ theme: e }) => {
|
|
347
|
-
var
|
|
348
|
-
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";
|
|
349
354
|
}};
|
|
350
355
|
border-radius: ${({ theme: e }) => {
|
|
351
|
-
var
|
|
352
|
-
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";
|
|
353
358
|
}};
|
|
354
359
|
/* 优先使用 dashboardShadow,如果没有则使用 shadow */
|
|
355
360
|
box-shadow: ${({ theme: e }) => {
|
|
356
|
-
var
|
|
357
|
-
return ((
|
|
361
|
+
var t, n;
|
|
362
|
+
return ((t = e.colors) == null ? void 0 : t.dashboardShadow) || ((n = e.colors) == null ? void 0 : n.shadow) || "none";
|
|
358
363
|
}};
|
|
359
|
-
`,
|
|
364
|
+
`, Qe = l.div.attrs({
|
|
360
365
|
className: "dashboard-container-nav"
|
|
361
366
|
})`
|
|
362
367
|
flex: 0 0 ${({ $isOpen: e }) => e ? "72px" : "28px"};
|
|
363
368
|
transition: flex-basis 0.2s ease;
|
|
364
|
-
`,
|
|
369
|
+
`, Ue = l.div.attrs({
|
|
365
370
|
className: "dashboard-container-main-wrapper"
|
|
366
371
|
})`
|
|
367
372
|
display: flex;
|
|
@@ -369,182 +374,182 @@ const U = Ce("ChevronRight", [
|
|
|
369
374
|
flex: 1;
|
|
370
375
|
min-width: 0;
|
|
371
376
|
background: ${({ theme: e }) => {
|
|
372
|
-
var
|
|
373
|
-
return ((
|
|
377
|
+
var t;
|
|
378
|
+
return ((t = e.colors) == null ? void 0 : t.dashboardMainBackground) ?? "transparent";
|
|
374
379
|
}};
|
|
375
|
-
`,
|
|
380
|
+
`, et = l.div.attrs({
|
|
376
381
|
className: "dashboard-container-main-layout"
|
|
377
382
|
})`
|
|
378
383
|
height: 100%;
|
|
379
384
|
display: flex;
|
|
380
385
|
width: 100%;
|
|
381
386
|
gap: ${({ theme: e }) => {
|
|
382
|
-
var
|
|
383
|
-
return ((
|
|
387
|
+
var t;
|
|
388
|
+
return ((t = e.space) == null ? void 0 : t.size) || "12px";
|
|
384
389
|
}};
|
|
385
|
-
`,
|
|
390
|
+
`, Ft = ({
|
|
386
391
|
children: e,
|
|
387
|
-
goBack:
|
|
392
|
+
goBack: t,
|
|
388
393
|
title: n,
|
|
389
|
-
description:
|
|
390
|
-
breadcrumbs:
|
|
391
|
-
dockItems:
|
|
394
|
+
description: d,
|
|
395
|
+
breadcrumbs: i,
|
|
396
|
+
dockItems: p,
|
|
392
397
|
// 以下参数为兼容旧版本保留,当前未使用
|
|
393
|
-
dockActiveMode:
|
|
394
|
-
defaultDockActiveId:
|
|
395
|
-
defaultDockActiveIds:
|
|
396
|
-
styles:
|
|
397
|
-
eventsEmit:
|
|
398
|
+
dockActiveMode: D = "single",
|
|
399
|
+
defaultDockActiveId: B,
|
|
400
|
+
defaultDockActiveIds: H,
|
|
401
|
+
styles: z,
|
|
402
|
+
eventsEmit: s
|
|
398
403
|
}) => {
|
|
399
|
-
const
|
|
404
|
+
const K = de(), I = G(
|
|
400
405
|
// 基础:默认主题 + useTheme的配置
|
|
401
|
-
|
|
406
|
+
G({ theme: F, mode: "light" }, K),
|
|
402
407
|
// 最高层:用户手动传入的styles
|
|
403
|
-
|
|
404
|
-
),
|
|
405
|
-
|
|
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();
|
|
406
411
|
}, L = () => {
|
|
407
|
-
|
|
408
|
-
},
|
|
409
|
-
|
|
410
|
-
},
|
|
411
|
-
|
|
412
|
-
},
|
|
413
|
-
if (!
|
|
414
|
-
const [
|
|
415
|
-
if (!N.current ||
|
|
416
|
-
r({ start: 0, end:
|
|
412
|
+
s != null && s.onTitleClick && s.onTitleClick();
|
|
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 });
|
|
417
422
|
return;
|
|
418
423
|
}
|
|
419
|
-
const
|
|
420
|
-
let
|
|
421
|
-
if (
|
|
422
|
-
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 });
|
|
423
428
|
return;
|
|
424
429
|
}
|
|
425
|
-
const
|
|
430
|
+
const J = 0, O = Math.min(V - 1, i.length);
|
|
426
431
|
r({
|
|
427
|
-
start:
|
|
428
|
-
end:
|
|
429
|
-
showEllipsis:
|
|
432
|
+
start: J,
|
|
433
|
+
end: O,
|
|
434
|
+
showEllipsis: O < i.length - 1
|
|
430
435
|
});
|
|
431
|
-
}, [
|
|
432
|
-
if (
|
|
433
|
-
|
|
434
|
-
const
|
|
435
|
-
|
|
436
|
+
}, [i.length]);
|
|
437
|
+
if (k.useEffect(() => {
|
|
438
|
+
R();
|
|
439
|
+
const w = new ResizeObserver(() => {
|
|
440
|
+
R();
|
|
436
441
|
});
|
|
437
|
-
return N.current &&
|
|
438
|
-
|
|
442
|
+
return N.current && w.observe(N.current), () => {
|
|
443
|
+
w.disconnect();
|
|
439
444
|
};
|
|
440
|
-
}, [
|
|
441
|
-
return /* @__PURE__ */
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
|
|
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,
|
|
444
449
|
{
|
|
445
|
-
$isLast:
|
|
446
|
-
$isClickable: !!(
|
|
447
|
-
onClick: () =>
|
|
448
|
-
theme:
|
|
449
|
-
title:
|
|
450
|
-
children:
|
|
450
|
+
$isLast: m === i.length - 1,
|
|
451
|
+
$isClickable: !!(m < i.length - 1 || w.onClick),
|
|
452
|
+
onClick: () => A(w, m),
|
|
453
|
+
theme: c,
|
|
454
|
+
title: w.label,
|
|
455
|
+
children: w.label
|
|
451
456
|
}
|
|
452
457
|
),
|
|
453
|
-
|
|
454
|
-
] },
|
|
455
|
-
const { start:
|
|
456
|
-
return /* @__PURE__ */
|
|
457
|
-
|
|
458
|
-
/* @__PURE__ */
|
|
459
|
-
|
|
458
|
+
m < i.length - 1 && /* @__PURE__ */ o(oe, { theme: c, children: /* @__PURE__ */ o(ee, { size: 14 }) })
|
|
459
|
+
] }, w.id)) });
|
|
460
|
+
const { start: E, end: W, showEllipsis: re } = g;
|
|
461
|
+
return /* @__PURE__ */ b(ke, { theme: c, children: [
|
|
462
|
+
i.slice(E, W).map((w, m) => /* @__PURE__ */ b(k.Fragment, { children: [
|
|
463
|
+
/* @__PURE__ */ o(
|
|
464
|
+
te,
|
|
460
465
|
{
|
|
461
|
-
$isLast:
|
|
462
|
-
$isClickable: !!(
|
|
463
|
-
onClick: () =>
|
|
464
|
-
theme:
|
|
465
|
-
title:
|
|
466
|
-
children:
|
|
466
|
+
$isLast: m === W - E - 1 && !re,
|
|
467
|
+
$isClickable: !!(m < W - E - 1 || w.onClick),
|
|
468
|
+
onClick: () => A(w, E + m),
|
|
469
|
+
theme: c,
|
|
470
|
+
title: w.label,
|
|
471
|
+
children: w.label
|
|
467
472
|
}
|
|
468
473
|
),
|
|
469
|
-
|
|
470
|
-
] },
|
|
471
|
-
|
|
472
|
-
/* @__PURE__ */
|
|
473
|
-
/* @__PURE__ */
|
|
474
|
-
|
|
474
|
+
m < W - E - 1 && /* @__PURE__ */ o(oe, { theme: c, children: /* @__PURE__ */ o(ee, { size: 14 }) })
|
|
475
|
+
] }, w.id)),
|
|
476
|
+
re && /* @__PURE__ */ b(ye, { children: [
|
|
477
|
+
/* @__PURE__ */ o(oe, { theme: c, children: /* @__PURE__ */ o(ee, { size: 14 }) }),
|
|
478
|
+
/* @__PURE__ */ o(
|
|
479
|
+
te,
|
|
475
480
|
{
|
|
476
481
|
$isLast: !1,
|
|
477
482
|
$isClickable: !1,
|
|
478
|
-
theme:
|
|
483
|
+
theme: c,
|
|
479
484
|
style: {
|
|
480
485
|
cursor: "default",
|
|
481
486
|
maxWidth: "auto"
|
|
482
487
|
},
|
|
483
|
-
title: `${
|
|
488
|
+
title: `${i.slice(W, -1).map((w) => w.label).join(" > ")}`,
|
|
484
489
|
children: "..."
|
|
485
490
|
}
|
|
486
491
|
),
|
|
487
|
-
/* @__PURE__ */
|
|
488
|
-
/* @__PURE__ */
|
|
489
|
-
|
|
492
|
+
/* @__PURE__ */ o(oe, { theme: c, children: /* @__PURE__ */ o(ee, { size: 14 }) }),
|
|
493
|
+
/* @__PURE__ */ o(
|
|
494
|
+
te,
|
|
490
495
|
{
|
|
491
496
|
$isLast: !0,
|
|
492
|
-
$isClickable: !!
|
|
493
|
-
onClick: () =>
|
|
494
|
-
theme:
|
|
495
|
-
title:
|
|
496
|
-
children:
|
|
497
|
+
$isClickable: !!i[i.length - 1].onClick,
|
|
498
|
+
onClick: () => A(i[i.length - 1], i.length - 1),
|
|
499
|
+
theme: c,
|
|
500
|
+
title: i[i.length - 1].label,
|
|
501
|
+
children: i[i.length - 1].label
|
|
497
502
|
}
|
|
498
503
|
)
|
|
499
504
|
] })
|
|
500
505
|
] });
|
|
501
|
-
}, [
|
|
502
|
-
return /* @__PURE__ */
|
|
503
|
-
|
|
504
|
-
|
|
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(
|
|
509
|
+
Te,
|
|
505
510
|
{
|
|
506
|
-
items:
|
|
507
|
-
open:
|
|
508
|
-
onOpenChange:
|
|
509
|
-
onItemClick: (
|
|
511
|
+
items: p,
|
|
512
|
+
open: P,
|
|
513
|
+
onOpenChange: q,
|
|
514
|
+
onItemClick: (g) => Y({ id: String(g.key), label: g.name }, 0),
|
|
510
515
|
defaultOpen: !0
|
|
511
516
|
}
|
|
512
517
|
) }),
|
|
513
|
-
/* @__PURE__ */
|
|
514
|
-
(n ||
|
|
515
|
-
|
|
516
|
-
|
|
518
|
+
/* @__PURE__ */ b(Ue, { theme: c, children: [
|
|
519
|
+
(n || d || t || i) && /* @__PURE__ */ b(Ye, { ref: N, theme: c, children: [
|
|
520
|
+
t && /* @__PURE__ */ o(
|
|
521
|
+
qe,
|
|
517
522
|
{
|
|
518
|
-
onClick:
|
|
519
|
-
theme:
|
|
523
|
+
onClick: S,
|
|
524
|
+
theme: c,
|
|
520
525
|
title: "\u8FD4\u56DE",
|
|
521
|
-
children: /* @__PURE__ */
|
|
526
|
+
children: /* @__PURE__ */ o(Ge, { size: 18 })
|
|
522
527
|
}
|
|
523
528
|
),
|
|
524
|
-
|
|
525
|
-
n && /* @__PURE__ */
|
|
526
|
-
|
|
529
|
+
j(),
|
|
530
|
+
n && /* @__PURE__ */ o(
|
|
531
|
+
Ze,
|
|
527
532
|
{
|
|
528
533
|
onClick: L,
|
|
529
|
-
theme:
|
|
534
|
+
theme: c,
|
|
530
535
|
title: n,
|
|
531
536
|
children: n
|
|
532
537
|
}
|
|
533
538
|
),
|
|
534
|
-
|
|
535
|
-
|
|
539
|
+
d && /* @__PURE__ */ o(
|
|
540
|
+
Xe,
|
|
536
541
|
{
|
|
537
|
-
theme:
|
|
538
|
-
title:
|
|
539
|
-
children:
|
|
542
|
+
theme: c,
|
|
543
|
+
title: d,
|
|
544
|
+
children: d
|
|
540
545
|
}
|
|
541
546
|
)
|
|
542
547
|
] }),
|
|
543
|
-
/* @__PURE__ */
|
|
548
|
+
/* @__PURE__ */ o(Je, { theme: c, children: e || /* @__PURE__ */ o(Pe, {}) })
|
|
544
549
|
] })
|
|
545
550
|
] }) });
|
|
546
|
-
},
|
|
547
|
-
shouldForwardProp: (e) => !["backgroundImage", "backgroundColor"].includes(e)
|
|
551
|
+
}, tt = l.div.withConfig({
|
|
552
|
+
shouldForwardProp: (e) => !["backgroundImage", "backgroundColor", "dockPosition"].includes(e)
|
|
548
553
|
})`
|
|
549
554
|
position: fixed;
|
|
550
555
|
top: 0;
|
|
@@ -553,10 +558,16 @@ const U = Ce("ChevronRight", [
|
|
|
553
558
|
height: 100vh;
|
|
554
559
|
background: ${(e) => e.backgroundImage ? `url(${e.backgroundImage}) center/cover no-repeat` : e.backgroundColor || "#1a1a1a"};
|
|
555
560
|
display: flex;
|
|
556
|
-
flex-direction: column;
|
|
561
|
+
flex-direction: ${(e) => e.dockPosition === "left" || e.dockPosition === "right" ? "row" : "column"};
|
|
557
562
|
overflow: hidden;
|
|
558
563
|
z-index: 1;
|
|
559
|
-
`,
|
|
564
|
+
`, ot = l.div.attrs({ className: "dock-container-main-area" })`
|
|
565
|
+
flex: 1;
|
|
566
|
+
display: flex;
|
|
567
|
+
flex-direction: column;
|
|
568
|
+
overflow: hidden;
|
|
569
|
+
min-width: 0;
|
|
570
|
+
`, nt = l.div`
|
|
560
571
|
height: 48px;
|
|
561
572
|
width: 100%;
|
|
562
573
|
display: flex;
|
|
@@ -565,7 +576,7 @@ const U = Ce("ChevronRight", [
|
|
|
565
576
|
background: transparent;
|
|
566
577
|
z-index: 10;
|
|
567
578
|
flex-shrink: 0;
|
|
568
|
-
`,
|
|
579
|
+
`, rt = l.div`
|
|
569
580
|
flex: 1;
|
|
570
581
|
width: 100%;
|
|
571
582
|
overflow-y: auto;
|
|
@@ -592,78 +603,97 @@ const U = Ce("ChevronRight", [
|
|
|
592
603
|
&::-webkit-scrollbar-thumb:hover {
|
|
593
604
|
background: rgba(255, 255, 255, 0.5);
|
|
594
605
|
}
|
|
595
|
-
`,
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
606
|
+
`, ne = 16, it = 48, at = it + ne * 2, me = at + ne * 2, lt = l.div.withConfig({
|
|
607
|
+
shouldForwardProp: (e) => !["dockPosition"].includes(e)
|
|
608
|
+
})`
|
|
609
|
+
${(e) => e.dockPosition === "left" || e.dockPosition === "right" ? `
|
|
610
|
+
width: ${me}px;
|
|
611
|
+
height: 100%;
|
|
612
|
+
display: flex;
|
|
613
|
+
align-items: center;
|
|
614
|
+
justify-content: center;
|
|
615
|
+
padding: ${ne}px;
|
|
616
|
+
` : `
|
|
617
|
+
height: ${me}px;
|
|
618
|
+
width: 100%;
|
|
619
|
+
display: flex;
|
|
620
|
+
align-items: ${e.dockPosition === "top" ? "flex-start" : "flex-end"};
|
|
621
|
+
justify-content: center;
|
|
622
|
+
padding: ${ne}px;
|
|
623
|
+
`}
|
|
602
624
|
background: transparent;
|
|
603
625
|
z-index: 10;
|
|
604
626
|
flex-shrink: 0;
|
|
605
|
-
`,
|
|
627
|
+
`, zt = ({
|
|
606
628
|
children: e,
|
|
607
|
-
backgroundImage:
|
|
629
|
+
backgroundImage: t,
|
|
608
630
|
backgroundColor: n,
|
|
609
|
-
header:
|
|
610
|
-
dockItems:
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
631
|
+
header: d,
|
|
632
|
+
dockItems: i,
|
|
633
|
+
dockPosition: p = "bottom",
|
|
634
|
+
dockActiveMode: D = "single",
|
|
635
|
+
defaultDockActiveId: B,
|
|
636
|
+
defaultDockActiveIds: H,
|
|
637
|
+
styles: z,
|
|
638
|
+
eventsEmit: s
|
|
616
639
|
}) => {
|
|
617
|
-
var
|
|
618
|
-
const
|
|
640
|
+
var P, q;
|
|
641
|
+
const K = de(), I = G(
|
|
619
642
|
// 基础:默认主题 + useTheme的配置
|
|
620
|
-
|
|
643
|
+
G({ theme: F, mode: "light" }, K),
|
|
621
644
|
// 最高层:用户手动传入的styles
|
|
622
|
-
|
|
623
|
-
),
|
|
624
|
-
|
|
625
|
-
},
|
|
626
|
-
|
|
627
|
-
},
|
|
628
|
-
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
|
|
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,
|
|
656
|
+
{
|
|
657
|
+
style: {
|
|
658
|
+
color: c.colors.text,
|
|
659
|
+
fontFamily: ((q = (P = c.fonts) == null ? void 0 : P.body) == null ? void 0 : q.family) || "PingFang SC, Microsoft YaHei, Arial, sans-serif"
|
|
660
|
+
},
|
|
661
|
+
children: e
|
|
662
|
+
}
|
|
663
|
+
)
|
|
664
|
+
] }), j = i && i.length > 0 && /* @__PURE__ */ o(lt, { dockPosition: p, children: /* @__PURE__ */ o(
|
|
665
|
+
Fe,
|
|
632
666
|
{
|
|
633
|
-
|
|
667
|
+
items: i,
|
|
668
|
+
itemWidth: 48,
|
|
669
|
+
itemHeight: 48,
|
|
670
|
+
magnification: 1.5,
|
|
671
|
+
itemGap: 8,
|
|
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
|
|
680
|
+
}
|
|
681
|
+
) });
|
|
682
|
+
return /* @__PURE__ */ b(
|
|
683
|
+
tt,
|
|
684
|
+
{
|
|
685
|
+
backgroundImage: t,
|
|
634
686
|
backgroundColor: n,
|
|
687
|
+
dockPosition: p,
|
|
635
688
|
children: [
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
style: {
|
|
641
|
-
color: I.colors.text,
|
|
642
|
-
fontFamily: ((T = (L = I.fonts) == null ? void 0 : L.body) == null ? void 0 : T.family) || "PingFang SC, Microsoft YaHei, Arial, sans-serif"
|
|
643
|
-
},
|
|
644
|
-
children: e
|
|
645
|
-
}
|
|
646
|
-
),
|
|
647
|
-
a && a.length > 0 && /* @__PURE__ */ t(to, { children: /* @__PURE__ */ t(
|
|
648
|
-
Te,
|
|
649
|
-
{
|
|
650
|
-
items: a,
|
|
651
|
-
itemWidth: 48,
|
|
652
|
-
itemHeight: 48,
|
|
653
|
-
magnification: 1.5,
|
|
654
|
-
itemGap: 8,
|
|
655
|
-
activeMode: $,
|
|
656
|
-
defaultActiveId: W,
|
|
657
|
-
defaultActiveIds: M,
|
|
658
|
-
onItemClick: s,
|
|
659
|
-
onActiveChange: N,
|
|
660
|
-
onActiveChangeMultiple: A
|
|
661
|
-
}
|
|
662
|
-
) })
|
|
689
|
+
p === "top" && j,
|
|
690
|
+
p === "left" && j,
|
|
691
|
+
A ? /* @__PURE__ */ o(ot, { children: Y }) : Y,
|
|
692
|
+
(p === "bottom" || p === "right") && j
|
|
663
693
|
]
|
|
664
694
|
}
|
|
665
695
|
);
|
|
666
|
-
},
|
|
696
|
+
}, st = l.div`
|
|
667
697
|
--header-height: 56px;
|
|
668
698
|
--page-gutter: 16px;
|
|
669
699
|
--sidebar-width: 264px;
|
|
@@ -676,7 +706,7 @@ const U = Ce("ChevronRight", [
|
|
|
676
706
|
min-height: 100vh;
|
|
677
707
|
height: 100vh; /* 以视口高度为基准,便于内部独立滚动布局 */
|
|
678
708
|
position: relative;
|
|
679
|
-
`,
|
|
709
|
+
`, dt = l.div`
|
|
680
710
|
position: sticky;
|
|
681
711
|
top: 0;
|
|
682
712
|
z-index: 30;
|
|
@@ -688,16 +718,16 @@ const U = Ce("ChevronRight", [
|
|
|
688
718
|
padding: 0 16px;
|
|
689
719
|
border-bottom: 1px solid rgba(0,0,0,0.06);
|
|
690
720
|
backdrop-filter: blur(8px);
|
|
691
|
-
`,
|
|
721
|
+
`, ct = l.div`
|
|
692
722
|
display: flex;
|
|
693
723
|
align-items: center;
|
|
694
724
|
gap: 12px;
|
|
695
725
|
min-width: 0;
|
|
696
|
-
`,
|
|
726
|
+
`, ht = l.div`
|
|
697
727
|
display: flex;
|
|
698
728
|
align-items: center;
|
|
699
729
|
gap: 8px;
|
|
700
|
-
`,
|
|
730
|
+
`, ve = l.button`
|
|
701
731
|
display: inline-flex;
|
|
702
732
|
align-items: center;
|
|
703
733
|
justify-content: center;
|
|
@@ -711,7 +741,7 @@ const U = Ce("ChevronRight", [
|
|
|
711
741
|
|
|
712
742
|
&:hover { background: rgba(0,0,0,0.04); }
|
|
713
743
|
&:active { transform: translateY(1px); }
|
|
714
|
-
`,
|
|
744
|
+
`, pt = l.div`
|
|
715
745
|
display: grid;
|
|
716
746
|
grid-template-columns: var(--sidebar-width) 1fr var(--toc-width);
|
|
717
747
|
gap: 16px;
|
|
@@ -732,9 +762,9 @@ const U = Ce("ChevronRight", [
|
|
|
732
762
|
gap: 12px;
|
|
733
763
|
padding: 12px 12px 20px 12px;
|
|
734
764
|
}
|
|
735
|
-
`,
|
|
765
|
+
`, ut = l.aside`
|
|
736
766
|
position: relative;
|
|
737
|
-
`,
|
|
767
|
+
`, gt = l.div`
|
|
738
768
|
height: 100%;
|
|
739
769
|
overflow: hidden;
|
|
740
770
|
padding-right: 8px;
|
|
@@ -743,7 +773,7 @@ const U = Ce("ChevronRight", [
|
|
|
743
773
|
opacity: ${(e) => e.$collapsed ? 0 : 1};
|
|
744
774
|
transform: translateX(${(e) => e.$collapsed ? "-6px" : "0px"});
|
|
745
775
|
pointer-events: ${(e) => e.$collapsed ? "none" : "auto"};
|
|
746
|
-
`,
|
|
776
|
+
`, ft = l.button`
|
|
747
777
|
position: absolute;
|
|
748
778
|
top: 6px;
|
|
749
779
|
right: -10px;
|
|
@@ -758,16 +788,16 @@ const U = Ce("ChevronRight", [
|
|
|
758
788
|
justify-content: center;
|
|
759
789
|
transition: background .15s ease;
|
|
760
790
|
&:hover { background: rgba(0,0,0,0.12); }
|
|
761
|
-
`,
|
|
791
|
+
`, xt = l.div`
|
|
762
792
|
height: 100%;
|
|
763
793
|
overflow: auto;
|
|
764
794
|
padding-right: 8px;
|
|
765
|
-
`,
|
|
795
|
+
`, bt = l.main`
|
|
766
796
|
position: relative;
|
|
767
797
|
min-width: 0;
|
|
768
798
|
height: 100%;
|
|
769
799
|
overflow: auto; /* 文档渲染区独立滚动 */
|
|
770
|
-
`,
|
|
800
|
+
`, wt = l.div`
|
|
771
801
|
width: 100%;
|
|
772
802
|
max-width: var(--content-max);
|
|
773
803
|
margin: 0 auto;
|
|
@@ -775,16 +805,16 @@ const U = Ce("ChevronRight", [
|
|
|
775
805
|
border-radius: 8px;
|
|
776
806
|
padding: 0px 12px;
|
|
777
807
|
padding-bottom: 120px; /* 底部留出足够的 margin,确保可以滚动到最底部 */
|
|
778
|
-
`,
|
|
808
|
+
`, kt = l.div`
|
|
779
809
|
height: 100%;
|
|
780
810
|
transition: opacity .5s ease;
|
|
781
811
|
opacity: ${(e) => e.$opacity};
|
|
782
|
-
`,
|
|
812
|
+
`, mt = l.aside`
|
|
783
813
|
position: relative;
|
|
784
814
|
z-index: 1;
|
|
785
815
|
height: 100%;
|
|
786
816
|
overflow: hidden;
|
|
787
|
-
`,
|
|
817
|
+
`, vt = l.div`
|
|
788
818
|
/* 右侧目录独立滚动 */
|
|
789
819
|
position: relative;
|
|
790
820
|
height: 100%;
|
|
@@ -796,7 +826,7 @@ const U = Ce("ChevronRight", [
|
|
|
796
826
|
border-left: 1px solid rgba(0,0,0,0.06);
|
|
797
827
|
background: transparent;
|
|
798
828
|
z-index: 1;
|
|
799
|
-
`,
|
|
829
|
+
`, yt = l.div`
|
|
800
830
|
transition: opacity .2s ease, transform .2s ease;
|
|
801
831
|
opacity: ${(e) => e.$collapsed ? 0 : 1};
|
|
802
832
|
transform: translateX(${(e) => e.$collapsed ? "6px" : "0px"});
|
|
@@ -821,11 +851,11 @@ l.button`
|
|
|
821
851
|
transition: background .15s ease;
|
|
822
852
|
&:hover { background: rgba(0,0,0,0.12); }
|
|
823
853
|
`;
|
|
824
|
-
const
|
|
854
|
+
const le = l.div`
|
|
825
855
|
font-size: 12px;
|
|
826
856
|
opacity: .7;
|
|
827
857
|
padding: 8px 8px;
|
|
828
|
-
`,
|
|
858
|
+
`, X = l.button`
|
|
829
859
|
width: 100%;
|
|
830
860
|
padding: 8px 10px;
|
|
831
861
|
background: transparent;
|
|
@@ -856,7 +886,7 @@ const ae = l.div`
|
|
|
856
886
|
}
|
|
857
887
|
|
|
858
888
|
${(e) => e.$active ? "background: rgba(0,0,0,0.08); font-weight: 600;" : ""}
|
|
859
|
-
`,
|
|
889
|
+
`, Ct = l.div`
|
|
860
890
|
display: flex;
|
|
861
891
|
align-items: center;
|
|
862
892
|
gap: 8px;
|
|
@@ -866,12 +896,12 @@ const ae = l.div`
|
|
|
866
896
|
overflow-y: hidden;
|
|
867
897
|
scrollbar-width: none;
|
|
868
898
|
&::-webkit-scrollbar { display: none; }
|
|
869
|
-
`,
|
|
899
|
+
`, $t = l.div`
|
|
870
900
|
width: 1px;
|
|
871
901
|
height: 16px;
|
|
872
902
|
background: currentColor;
|
|
873
903
|
opacity: .2;
|
|
874
|
-
`,
|
|
904
|
+
`, Bt = {
|
|
875
905
|
theme: {
|
|
876
906
|
...F,
|
|
877
907
|
colors: {
|
|
@@ -885,7 +915,7 @@ const ae = l.div`
|
|
|
885
915
|
shadow: "0 1px 2px rgba(0,0,0,0.06)"
|
|
886
916
|
}
|
|
887
917
|
}
|
|
888
|
-
},
|
|
918
|
+
}, Dt = {
|
|
889
919
|
theme: {
|
|
890
920
|
...F,
|
|
891
921
|
colors: {
|
|
@@ -900,237 +930,237 @@ const ae = l.div`
|
|
|
900
930
|
}
|
|
901
931
|
},
|
|
902
932
|
mode: "dark"
|
|
903
|
-
},
|
|
904
|
-
var
|
|
933
|
+
}, Mt = (e) => {
|
|
934
|
+
var ge, fe, xe, be;
|
|
905
935
|
const {
|
|
906
|
-
children:
|
|
936
|
+
children: t,
|
|
907
937
|
headerLogo: n,
|
|
908
|
-
contentKey:
|
|
909
|
-
modules:
|
|
910
|
-
activeModuleKey:
|
|
911
|
-
onModuleChange:
|
|
912
|
-
languages:
|
|
913
|
-
activeLanguageKey:
|
|
914
|
-
onLanguageChange:
|
|
915
|
-
themes:
|
|
916
|
-
activeThemeKey:
|
|
938
|
+
contentKey: d,
|
|
939
|
+
modules: i,
|
|
940
|
+
activeModuleKey: p,
|
|
941
|
+
onModuleChange: D,
|
|
942
|
+
languages: B,
|
|
943
|
+
activeLanguageKey: H,
|
|
944
|
+
onLanguageChange: z,
|
|
945
|
+
themes: s,
|
|
946
|
+
activeThemeKey: K,
|
|
917
947
|
onThemeChange: I,
|
|
918
|
-
sidebarItems:
|
|
948
|
+
sidebarItems: c,
|
|
919
949
|
activeSidebarId: N,
|
|
920
|
-
onSidebarItemClick:
|
|
950
|
+
onSidebarItemClick: S,
|
|
921
951
|
activeTocId: L,
|
|
922
|
-
onTocItemClick:
|
|
923
|
-
collapsibleSidebar:
|
|
924
|
-
styles:
|
|
925
|
-
} = e,
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
952
|
+
onTocItemClick: A,
|
|
953
|
+
collapsibleSidebar: Y = !0,
|
|
954
|
+
styles: j
|
|
955
|
+
} = e, P = de(), q = e.activeThemeKey === "dark" ? Dt : Bt, g = G(
|
|
956
|
+
G(
|
|
957
|
+
G({ theme: F, mode: "light" }, P),
|
|
958
|
+
q
|
|
929
959
|
),
|
|
930
|
-
|
|
931
|
-
), r = (
|
|
932
|
-
|
|
933
|
-
if (
|
|
934
|
-
|
|
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);
|
|
962
|
+
k.useEffect(() => {
|
|
963
|
+
if (d === void 0) {
|
|
964
|
+
he(t);
|
|
935
965
|
return;
|
|
936
966
|
}
|
|
937
|
-
|
|
938
|
-
const
|
|
939
|
-
|
|
967
|
+
pe(0);
|
|
968
|
+
const a = setTimeout(() => {
|
|
969
|
+
he(t), requestAnimationFrame(() => pe(1));
|
|
940
970
|
}, 120);
|
|
941
|
-
return () => clearTimeout(
|
|
942
|
-
}, [
|
|
943
|
-
var
|
|
971
|
+
return () => clearTimeout(a);
|
|
972
|
+
}, [d, t]), k.useMemo(() => {
|
|
973
|
+
var a, f, u, y, $, h, v, x, _, C, M, Z, Q;
|
|
944
974
|
return {
|
|
945
|
-
primaryColor: (
|
|
946
|
-
secondaryColor: (
|
|
947
|
-
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,
|
|
948
978
|
textColor: (y = r == null ? void 0 : r.colors) == null ? void 0 : y.text,
|
|
949
|
-
borderColor: (
|
|
950
|
-
disabledBackground: (
|
|
979
|
+
borderColor: ($ = r == null ? void 0 : r.colors) == null ? void 0 : $.border,
|
|
980
|
+
disabledBackground: (h = r == null ? void 0 : r.colors) == null ? void 0 : h.disabledBackground,
|
|
951
981
|
borderRadius: (v = r == null ? void 0 : r.space) == null ? void 0 : v.radius,
|
|
952
|
-
padding: (
|
|
953
|
-
margin: (
|
|
954
|
-
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
|
|
955
985
|
};
|
|
956
|
-
}, [r]),
|
|
986
|
+
}, [r]), k.useEffect(() => {
|
|
957
987
|
if (e.tocItems)
|
|
958
|
-
|
|
988
|
+
O(void 0);
|
|
959
989
|
else {
|
|
960
|
-
|
|
961
|
-
let
|
|
962
|
-
const
|
|
963
|
-
let
|
|
964
|
-
const
|
|
965
|
-
const
|
|
966
|
-
if (!
|
|
967
|
-
|
|
990
|
+
d !== void 0 && O(void 0);
|
|
991
|
+
let a = 0;
|
|
992
|
+
const f = 10;
|
|
993
|
+
let u = null, y = null;
|
|
994
|
+
const $ = () => {
|
|
995
|
+
const h = V.current;
|
|
996
|
+
if (!h) {
|
|
997
|
+
a < f ? (a++, u = setTimeout($, 200)) : O([]);
|
|
968
998
|
return;
|
|
969
999
|
}
|
|
970
|
-
const v = Array.from(
|
|
1000
|
+
const v = Array.from(h.querySelectorAll("h1, h2, h3"));
|
|
971
1001
|
if (v.length === 0) {
|
|
972
|
-
|
|
1002
|
+
a < f ? (a++, u = setTimeout($, 200)) : O([]);
|
|
973
1003
|
return;
|
|
974
1004
|
}
|
|
975
|
-
const
|
|
976
|
-
var
|
|
977
|
-
const
|
|
978
|
-
|
|
979
|
-
const
|
|
980
|
-
C.id || (C.id =
|
|
981
|
-
const
|
|
982
|
-
return { id:
|
|
1005
|
+
const x = /* @__PURE__ */ new Map(), _ = v.map((C) => {
|
|
1006
|
+
var we;
|
|
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;
|
|
1010
|
+
C.id || (C.id = Q);
|
|
1011
|
+
const Se = C.tagName === "H1" ? 1 : C.tagName === "H2" ? 2 : 3;
|
|
1012
|
+
return { id: Q, label: C.textContent || "", level: Se };
|
|
983
1013
|
});
|
|
984
|
-
|
|
1014
|
+
O(_);
|
|
985
1015
|
};
|
|
986
1016
|
return y = requestAnimationFrame(() => {
|
|
987
|
-
|
|
1017
|
+
u = setTimeout($, 100);
|
|
988
1018
|
}), () => {
|
|
989
|
-
y !== null && cancelAnimationFrame(y),
|
|
1019
|
+
y !== null && cancelAnimationFrame(y), u !== null && clearTimeout(u);
|
|
990
1020
|
};
|
|
991
1021
|
}
|
|
992
|
-
}, [
|
|
993
|
-
if (
|
|
994
|
-
const
|
|
995
|
-
if (
|
|
996
|
-
|
|
997
|
-
const
|
|
998
|
-
var
|
|
999
|
-
const v =
|
|
1000
|
-
(
|
|
1001
|
-
},
|
|
1002
|
-
return
|
|
1003
|
-
const v = document.getElementById(
|
|
1004
|
-
v &&
|
|
1005
|
-
}), () =>
|
|
1006
|
-
}, [
|
|
1007
|
-
const
|
|
1008
|
-
if (!
|
|
1009
|
-
const
|
|
1022
|
+
}, [t, e.tocItems, d]), k.useEffect(() => {
|
|
1023
|
+
if (U) return;
|
|
1024
|
+
const f = ((e.tocItems ?? J) || []).map((h) => h.id).filter(Boolean);
|
|
1025
|
+
if (f.length === 0) return;
|
|
1026
|
+
ie(void 0);
|
|
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);
|
|
1034
|
+
v && $.observe(v);
|
|
1035
|
+
}), () => $.disconnect();
|
|
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];
|
|
1010
1040
|
return y == null ? void 0 : y.key;
|
|
1011
|
-
},
|
|
1012
|
-
const
|
|
1013
|
-
|
|
1041
|
+
}, ae = (a) => {
|
|
1042
|
+
const f = document.getElementById(a);
|
|
1043
|
+
f && f.scrollIntoView({ behavior: "smooth", block: "start", inline: "nearest" });
|
|
1014
1044
|
};
|
|
1015
|
-
return /* @__PURE__ */
|
|
1016
|
-
|
|
1045
|
+
return /* @__PURE__ */ o(Ae, { theme: r, mode: g.mode, children: /* @__PURE__ */ b(
|
|
1046
|
+
st,
|
|
1017
1047
|
{
|
|
1018
1048
|
style: {
|
|
1019
1049
|
background: r.colors.appBackground,
|
|
1020
1050
|
color: r.colors.text,
|
|
1021
|
-
fontFamily: ((
|
|
1051
|
+
fontFamily: ((fe = (ge = r.fonts) == null ? void 0 : ge.body) == null ? void 0 : fe.family) || "PingFang SC, Microsoft YaHei, Arial, sans-serif"
|
|
1022
1052
|
},
|
|
1023
1053
|
children: [
|
|
1024
|
-
/* @__PURE__ */
|
|
1025
|
-
|
|
1054
|
+
/* @__PURE__ */ b(
|
|
1055
|
+
dt,
|
|
1026
1056
|
{
|
|
1027
1057
|
style: {
|
|
1028
1058
|
background: r.colors.panelBackground || r.colors.dashboardBackground || "rgba(255,255,255,0.6)",
|
|
1029
1059
|
color: r.colors.text
|
|
1030
1060
|
},
|
|
1031
1061
|
children: [
|
|
1032
|
-
/* @__PURE__ */
|
|
1062
|
+
/* @__PURE__ */ b(ct, { children: [
|
|
1033
1063
|
n,
|
|
1034
|
-
|
|
1035
|
-
|
|
1064
|
+
i && i.length > 0 && /* @__PURE__ */ o(Ct, { children: i.map((a) => /* @__PURE__ */ o(
|
|
1065
|
+
X,
|
|
1036
1066
|
{
|
|
1037
|
-
$active:
|
|
1038
|
-
onClick: () =>
|
|
1039
|
-
title:
|
|
1040
|
-
children:
|
|
1067
|
+
$active: a.key === p,
|
|
1068
|
+
onClick: () => D == null ? void 0 : D(a.key),
|
|
1069
|
+
title: a.label,
|
|
1070
|
+
children: a.label
|
|
1041
1071
|
},
|
|
1042
|
-
|
|
1072
|
+
a.key
|
|
1043
1073
|
)) })
|
|
1044
1074
|
] }),
|
|
1045
|
-
/* @__PURE__ */
|
|
1046
|
-
/* @__PURE__ */
|
|
1047
|
-
|
|
1048
|
-
|
|
1075
|
+
/* @__PURE__ */ b(ht, { children: [
|
|
1076
|
+
/* @__PURE__ */ o("div", { className: "hide-on-desktop", style: { display: "none" } }),
|
|
1077
|
+
B && B.length > 0 && /* @__PURE__ */ o(
|
|
1078
|
+
ve,
|
|
1049
1079
|
{
|
|
1050
1080
|
onClick: () => {
|
|
1051
|
-
const
|
|
1052
|
-
|
|
1081
|
+
const a = ue(B, H);
|
|
1082
|
+
a && (z == null || z(a));
|
|
1053
1083
|
},
|
|
1054
|
-
title: ((
|
|
1084
|
+
title: ((xe = B.find((a) => a.key === H)) == null ? void 0 : xe.label) || "Language",
|
|
1055
1085
|
"aria-label": "language",
|
|
1056
1086
|
style: { color: r.colors.text },
|
|
1057
|
-
children: /* @__PURE__ */
|
|
1058
|
-
/* @__PURE__ */
|
|
1059
|
-
/* @__PURE__ */
|
|
1087
|
+
children: /* @__PURE__ */ b("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
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" })
|
|
1060
1090
|
] })
|
|
1061
1091
|
}
|
|
1062
1092
|
),
|
|
1063
|
-
/* @__PURE__ */ t
|
|
1064
|
-
|
|
1065
|
-
|
|
1093
|
+
/* @__PURE__ */ o($t, {}),
|
|
1094
|
+
s && s.length > 0 && /* @__PURE__ */ o(
|
|
1095
|
+
ve,
|
|
1066
1096
|
{
|
|
1067
1097
|
onClick: () => {
|
|
1068
|
-
const
|
|
1069
|
-
|
|
1098
|
+
const a = ue(s, K);
|
|
1099
|
+
a && (I == null || I(a));
|
|
1070
1100
|
},
|
|
1071
|
-
title: ((
|
|
1101
|
+
title: ((be = s.find((a) => a.key === K)) == null ? void 0 : be.label) || "Theme",
|
|
1072
1102
|
"aria-label": "theme",
|
|
1073
1103
|
style: { color: r.colors.text },
|
|
1074
|
-
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" }) })
|
|
1075
1105
|
}
|
|
1076
1106
|
),
|
|
1077
|
-
/* @__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" }) })
|
|
1078
1108
|
] })
|
|
1079
1109
|
]
|
|
1080
1110
|
}
|
|
1081
1111
|
),
|
|
1082
1112
|
(() => {
|
|
1083
|
-
const
|
|
1084
|
-
return /* @__PURE__ */
|
|
1085
|
-
|
|
1086
|
-
/* @__PURE__ */
|
|
1087
|
-
|
|
1088
|
-
const
|
|
1089
|
-
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;
|
|
1090
1120
|
}, {})
|
|
1091
|
-
).map(([
|
|
1092
|
-
/* @__PURE__ */
|
|
1093
|
-
/* @__PURE__ */
|
|
1094
|
-
|
|
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(
|
|
1124
|
+
X,
|
|
1095
1125
|
{
|
|
1096
|
-
$active:
|
|
1126
|
+
$active: x.id === N,
|
|
1097
1127
|
onClick: () => {
|
|
1098
|
-
|
|
1128
|
+
x.href && (x.href.startsWith("#") ? ae(x.href.slice(1)) : window.location.href = x.href), S == null || S(x), m(!1);
|
|
1099
1129
|
},
|
|
1100
|
-
title:
|
|
1101
|
-
children:
|
|
1130
|
+
title: x.label,
|
|
1131
|
+
children: x.label
|
|
1102
1132
|
},
|
|
1103
|
-
|
|
1133
|
+
x.id
|
|
1104
1134
|
)) })
|
|
1105
|
-
] },
|
|
1106
|
-
|
|
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" }) }) })
|
|
1107
1137
|
] }),
|
|
1108
|
-
/* @__PURE__ */
|
|
1109
|
-
|
|
1138
|
+
/* @__PURE__ */ o(bt, { children: /* @__PURE__ */ o(
|
|
1139
|
+
wt,
|
|
1110
1140
|
{
|
|
1111
|
-
ref:
|
|
1112
|
-
children: /* @__PURE__ */
|
|
1141
|
+
ref: V,
|
|
1142
|
+
children: /* @__PURE__ */ o(kt, { $opacity: Ne, children: Ie })
|
|
1113
1143
|
}
|
|
1114
1144
|
) }),
|
|
1115
|
-
/* @__PURE__ */
|
|
1116
|
-
/* @__PURE__ */
|
|
1117
|
-
/* @__PURE__ */
|
|
1118
|
-
|
|
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(
|
|
1148
|
+
X,
|
|
1119
1149
|
{
|
|
1120
|
-
$active: (
|
|
1150
|
+
$active: (U ? L : ce) === h.id,
|
|
1121
1151
|
onClick: () => {
|
|
1122
|
-
|
|
1152
|
+
ae(h.id), A == null || A(h);
|
|
1123
1153
|
},
|
|
1124
|
-
title:
|
|
1125
|
-
style: { paddingLeft: Math.max(0, (
|
|
1126
|
-
children:
|
|
1154
|
+
title: h.label,
|
|
1155
|
+
style: { paddingLeft: Math.max(0, (h.level || 1) - 1) * 12 + 10 },
|
|
1156
|
+
children: h.label
|
|
1127
1157
|
},
|
|
1128
|
-
|
|
1158
|
+
h.id
|
|
1129
1159
|
)) })
|
|
1130
1160
|
] }) }) })
|
|
1131
1161
|
] });
|
|
1132
1162
|
})(),
|
|
1133
|
-
|
|
1163
|
+
w && /* @__PURE__ */ o(
|
|
1134
1164
|
"div",
|
|
1135
1165
|
{
|
|
1136
1166
|
role: "dialog",
|
|
@@ -1142,8 +1172,8 @@ const ae = l.div`
|
|
|
1142
1172
|
background: "rgba(0,0,0,0.45)",
|
|
1143
1173
|
display: "flex"
|
|
1144
1174
|
},
|
|
1145
|
-
onClick: () =>
|
|
1146
|
-
children: /* @__PURE__ */
|
|
1175
|
+
onClick: () => m(!1),
|
|
1176
|
+
children: /* @__PURE__ */ b(
|
|
1147
1177
|
"div",
|
|
1148
1178
|
{
|
|
1149
1179
|
style: {
|
|
@@ -1155,31 +1185,31 @@ const ae = l.div`
|
|
|
1155
1185
|
borderRight: `1px solid ${r.colors.border}`,
|
|
1156
1186
|
padding: 12
|
|
1157
1187
|
},
|
|
1158
|
-
onClick: (
|
|
1188
|
+
onClick: (a) => a.stopPropagation(),
|
|
1159
1189
|
children: [
|
|
1160
|
-
/* @__PURE__ */
|
|
1161
|
-
/* @__PURE__ */
|
|
1162
|
-
/* @__PURE__ */
|
|
1190
|
+
/* @__PURE__ */ b("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 8 }, children: [
|
|
1191
|
+
/* @__PURE__ */ o("div", { style: { fontWeight: 600 }, children: "\u76EE\u5F55" }),
|
|
1192
|
+
/* @__PURE__ */ o(X, { onClick: () => m(!1), children: "\u5173\u95ED" })
|
|
1163
1193
|
] }),
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
const
|
|
1167
|
-
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;
|
|
1168
1198
|
}, {})
|
|
1169
|
-
).map(([
|
|
1170
|
-
/* @__PURE__ */
|
|
1171
|
-
/* @__PURE__ */
|
|
1172
|
-
|
|
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(
|
|
1202
|
+
X,
|
|
1173
1203
|
{
|
|
1174
|
-
$active:
|
|
1204
|
+
$active: u.id === N,
|
|
1175
1205
|
onClick: () => {
|
|
1176
|
-
|
|
1206
|
+
u.href && (u.href.startsWith("#") ? ae(u.href.slice(1)) : window.location.href = u.href), S == null || S(u), m(!1);
|
|
1177
1207
|
},
|
|
1178
|
-
children:
|
|
1208
|
+
children: u.label
|
|
1179
1209
|
},
|
|
1180
|
-
|
|
1210
|
+
u.id
|
|
1181
1211
|
)) })
|
|
1182
|
-
] },
|
|
1212
|
+
] }, a)) })
|
|
1183
1213
|
]
|
|
1184
1214
|
}
|
|
1185
1215
|
)
|
|
@@ -1190,7 +1220,7 @@ const ae = l.div`
|
|
|
1190
1220
|
) });
|
|
1191
1221
|
};
|
|
1192
1222
|
export {
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1223
|
+
Ft as DashboardContainer,
|
|
1224
|
+
zt as DockContainer,
|
|
1225
|
+
Mt as DocumentContainer
|
|
1196
1226
|
};
|