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