@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.
Files changed (3) hide show
  1. package/assets/style.css +1 -1
  2. package/index.js +602 -508
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { jsx as e, jsxs as g, Fragment as Ie } from "react/jsx-runtime";
2
- import * as R from "react";
3
- import x, { forwardRef as me, createElement as xe } from "react";
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 be, deepMergeTheme as E, defaultTheme as M, ThemeProvider as Se } from "@mxmweb/zui-theme";
6
- import { GoogleNavbar as Te, CustomDock as Ae } from "@mxmweb/zui-components";
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 Ne = /* @__PURE__ */ R.createContext(null);
18
- process.env.NODE_ENV !== "production" && (Ne.displayName = "DataRouter");
19
- const Re = /* @__PURE__ */ R.createContext(null);
20
- process.env.NODE_ENV !== "production" && (Re.displayName = "DataRouterState");
21
- const Me = /* @__PURE__ */ R.createContext(null);
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__ */ R.createContext(null);
23
+ const ze = /* @__PURE__ */ S.createContext(null);
24
24
  process.env.NODE_ENV !== "production" && (ze.displayName = "Navigation");
25
- const Fe = /* @__PURE__ */ R.createContext(null);
26
- process.env.NODE_ENV !== "production" && (Fe.displayName = "Location");
27
- const Ce = /* @__PURE__ */ R.createContext({
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" && (Ce.displayName = "Route");
33
- const We = /* @__PURE__ */ R.createContext(null);
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__ */ R.createContext(null);
36
- function Le(t) {
37
- let c = R.useContext(Ce).outlet;
38
- return c && /* @__PURE__ */ R.createElement(Oe.Provider, {
39
- value: t
40
- }, c);
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(t) {
43
- return Le(t.context);
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 Ve = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), $e = (...t) => t.filter((c, k, b) => !!c && c.trim() !== "" && b.indexOf(c) === k).join(" ").trim();
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 Pe = {
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 He = me(
77
+ const _e = ve(
78
78
  ({
79
- color: t = "currentColor",
80
- size: c = 24,
81
- strokeWidth: k = 2,
82
- absoluteStrokeWidth: b,
83
- className: i = "",
79
+ color: e = "currentColor",
80
+ size: o = 24,
81
+ strokeWidth: n = 2,
82
+ absoluteStrokeWidth: u,
83
+ className: a = "",
84
84
  children: $,
85
- iconNode: O,
86
- ...z
87
- }, P) => xe(
85
+ iconNode: W,
86
+ ...M
87
+ }, _) => le(
88
88
  "svg",
89
89
  {
90
- ref: P,
91
- ...Pe,
92
- width: c,
93
- height: c,
94
- stroke: t,
95
- strokeWidth: b ? Number(k) * 24 / Number(c) : k,
96
- className: $e("lucide", i),
97
- ...z
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
- ...O.map(([u, d]) => xe(u, d)),
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 Be = (t, c) => {
112
- const k = me(
113
- ({ className: b, ...i }, $) => xe(He, {
111
+ const Ce = (e, o) => {
112
+ const n = ve(
113
+ ({ className: u, ...a }, $) => le(_e, {
114
114
  ref: $,
115
- iconNode: c,
116
- className: $e(`lucide-${Ve(t)}`, b),
117
- ...i
115
+ iconNode: o,
116
+ className: ye(`lucide-${Ee(e)}`, u),
117
+ ...a
118
118
  })
119
119
  );
120
- return k.displayName = `${t}`, k;
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 _e = Be("ArrowLeft", [
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 se = Be("ChevronRight", [
138
+ const U = Ce("ChevronRight", [
139
139
  ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
140
- ]), Ge = l.div`
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: 20px;
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
- `, Ke = l.div`
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: 8px;
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
- `, Ye = l.button`
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
- `, Ee = l.div`
188
- line-height: 1.4;
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: #007bff;
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
- line-height: 1.4;
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
- `, ve = l.div`
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
- `, ce = l.div`
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: 14px;
220
- color: ${(t) => t.$isLast ? "#343a40" : "#6c757d"};
221
- font-weight: ${(t) => t.$isLast ? "600" : "normal"};
222
- cursor: ${(t) => t.$isClickable ? "pointer" : "default"};
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: ${(t) => t.$isLast ? "#007bff" : "inherit"};
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
- `, de = l.div`
319
+ `, oe = l.div.attrs({
320
+ className: "dashboard-container-breadcrumb-separator"
321
+ })`
233
322
  display: flex;
234
323
  align-items: center;
235
- color: #6c757d;
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
- `, Xe = l.div`
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
- l.div`
246
- position: fixed;
247
- bottom: 20px;
248
- left: 50%;
249
- transform: translateX(-50%);
250
- z-index: 1000;
251
- `;
252
- const $t = ({
253
- children: t,
254
- goBack: c,
255
- title: k,
256
- description: b,
257
- breadcrumbs: i,
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
- dockActiveMode: O = "single",
260
- defaultDockActiveId: z,
261
- defaultDockActiveIds: P,
262
- styles: u,
263
- eventsEmit: d
385
+ // 以下参数为兼容旧版本保留,当前未使用
386
+ dockActiveMode: W = "single",
387
+ defaultDockActiveId: M,
388
+ defaultDockActiveIds: _,
389
+ styles: f,
390
+ eventsEmit: h
264
391
  }) => {
265
- var H, o, _, ie, U, pe, re, V;
266
- const L = be(), S = E(
392
+ const O = se(), I = K(
267
393
  // 基础:默认主题 + useTheme的配置
268
- E({ theme: M, mode: "light" }, L),
394
+ K({ theme: F, mode: "light" }, O),
269
395
  // 最高层:用户手动传入的styles
270
- u
271
- ), r = (S == null ? void 0 : S.theme) || M, q = x.useRef(null), T = () => {
272
- d != null && d.onGoBack ? d.onGoBack() : c && c();
273
- }, j = () => {
274
- d != null && d.onTitleClick && d.onTitleClick();
275
- }, A = (w, G) => {
276
- d != null && d.onBreadcrumbClick ? d.onBreadcrumbClick(w, G) : w.onClick && w.onClick();
277
- }, I = (w, G) => {
278
- d != null && d.onDockItemClick && d.onDockItemClick(w, G);
279
- }, F = () => {
280
- if (!i || i.length === 0) return null;
281
- const w = x.useRef(null), [G, X] = x.useState({ start: 0, end: i.length, showEllipsis: !1 }), Z = x.useCallback(() => {
282
- if (!w.current || i.length <= 3) {
283
- X({ start: 0, end: i.length, showEllipsis: !1 });
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 y = w.current.offsetWidth * 0.5;
287
- let K = Math.floor((y - 30) / (120 + 20));
288
- if (K < 2 && (K = 2), K >= i.length) {
289
- X({ start: 0, end: i.length, showEllipsis: !1 });
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 ae = 0, te = Math.min(K - 1, i.length);
293
- X({
294
- start: ae,
295
- end: te,
296
- showEllipsis: te < i.length - 1
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
- }, [i.length]);
299
- if (x.useEffect(() => {
300
- Z();
301
- const f = new ResizeObserver(() => {
302
- Z();
424
+ }, [a.length]);
425
+ if (w.useEffect(() => {
426
+ j();
427
+ const b = new ResizeObserver(() => {
428
+ j();
303
429
  });
304
- return w.current && f.observe(w.current), () => {
305
- f.disconnect();
430
+ return N.current && b.observe(N.current), () => {
431
+ b.disconnect();
306
432
  };
307
- }, [Z]), i.length <= 3)
308
- return /* @__PURE__ */ e(ve, { children: i.map((f, y) => /* @__PURE__ */ g(x.Fragment, { children: [
309
- /* @__PURE__ */ e(
310
- ce,
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: y === i.length - 1,
313
- $isClickable: !!(y < i.length - 1 || f.onClick),
314
- onClick: () => A(f, y),
315
- style: {
316
- color: y === i.length - 1 ? r.colors.text : r.colors.textSecondary || r.colors.disabledText
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
- y < i.length - 1 && /* @__PURE__ */ e(de, { children: /* @__PURE__ */ e(se, { size: 14 }) })
323
- ] }, f.id)) });
324
- const { start: N, end: D, showEllipsis: ee } = G;
325
- return /* @__PURE__ */ g(ve, { children: [
326
- i.slice(N, D).map((f, y) => /* @__PURE__ */ g(x.Fragment, { children: [
327
- /* @__PURE__ */ e(
328
- ce,
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: y === D - N - 1 && !ee,
331
- $isClickable: !!(y < D - N - 1 || f.onClick),
332
- onClick: () => A(f, N + y),
333
- style: {
334
- color: y === D - N - 1 && !ee ? r.colors.text : r.colors.textSecondary || r.colors.disabledText
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
- y < D - N - 1 && /* @__PURE__ */ e(de, { children: /* @__PURE__ */ e(se, { size: 14 }) })
341
- ] }, f.id)),
342
- ee && /* @__PURE__ */ g(Ie, { children: [
343
- /* @__PURE__ */ e(de, { children: /* @__PURE__ */ e(se, { size: 14 }) }),
344
- /* @__PURE__ */ e(
345
- ce,
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: `${i.slice(D, -1).map((f) => f.label).join(" > ")}`,
476
+ title: `${a.slice(E, -1).map((b) => b.label).join(" > ")}`,
355
477
  children: "..."
356
478
  }
357
479
  ),
358
- /* @__PURE__ */ e(de, { children: /* @__PURE__ */ e(se, { size: 14 }) }),
359
- /* @__PURE__ */ e(
360
- ce,
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: !!i[i.length - 1].onClick,
364
- onClick: () => A(i[i.length - 1], i.length - 1),
365
- style: {
366
- color: r.colors.text
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
- }, [ne, he] = x.useState(!0);
375
- return /* @__PURE__ */ e(
376
- Ge,
377
- {
378
- style: {
379
- background: r.colors.appBackground,
380
- color: r.colors.text,
381
- fontFamily: ((o = (H = r.fonts) == null ? void 0 : H.body) == null ? void 0 : o.family) || "PingFang SC, Microsoft YaHei, Arial, sans-serif"
382
- },
383
- children: /* @__PURE__ */ g("div", { style: { height: "100%", display: "flex", width: "100%", gap: 12 }, children: [
384
- $ && $.length > 0 && /* @__PURE__ */ e("div", { style: { flex: `0 0 ${ne ? 72 : 28}px`, transition: "flex-basis .2s ease" }, children: /* @__PURE__ */ e(
385
- Te,
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
- items: $,
388
- open: ne,
389
- onOpenChange: he,
390
- onItemClick: (w) => I({ id: String(w.key), label: w.name }, 0),
391
- defaultOpen: !0
511
+ onClick: A,
512
+ theme: s,
513
+ title: "\u8FD4\u56DE",
514
+ children: /* @__PURE__ */ t(Ve, { size: 18 })
392
515
  }
393
- ) }),
394
- /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", flex: 1, minWidth: 0 }, children: [
395
- (k || b || c || i) && /* @__PURE__ */ g(Ke, { ref: q, children: [
396
- c && /* @__PURE__ */ e(
397
- Ye,
398
- {
399
- onClick: T,
400
- style: { color: r.colors.primary, borderRadius: r.space.radius || "6px" },
401
- title: "\u8FD4\u56DE",
402
- children: /* @__PURE__ */ e(_e, { size: 18 })
403
- }
404
- ),
405
- F(),
406
- k && /* @__PURE__ */ e(
407
- Ee,
408
- {
409
- onClick: j,
410
- style: {
411
- color: r.colors.text,
412
- fontSize: ((ie = (_ = r.fonts) == null ? void 0 : _.heading) == null ? void 0 : ie.size) || "16px",
413
- fontWeight: ((pe = (U = r.fonts) == null ? void 0 : U.heading) == null ? void 0 : pe.weight) || "600"
414
- },
415
- title: k,
416
- children: k
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: ${(t) => t.backgroundImage ? `url(${t.backgroundImage}) center/cover no-repeat` : t.backgroundColor || "#1a1a1a"};
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
- `, Je = l.div`
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
- `, Qe = l.div`
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
- `, Ue = l.div`
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
- `, Bt = ({
508
- children: t,
509
- backgroundImage: c,
510
- backgroundColor: k,
511
- header: b,
512
- dockItems: i,
598
+ `, Ao = ({
599
+ children: e,
600
+ backgroundImage: o,
601
+ backgroundColor: n,
602
+ header: u,
603
+ dockItems: a,
513
604
  dockActiveMode: $ = "single",
514
- defaultDockActiveId: O,
515
- defaultDockActiveIds: z,
516
- styles: P,
517
- eventsEmit: u
605
+ defaultDockActiveId: W,
606
+ defaultDockActiveIds: M,
607
+ styles: _,
608
+ eventsEmit: f
518
609
  }) => {
519
- var j, A;
520
- const d = be(), L = E(
610
+ var L, T;
611
+ const h = se(), O = K(
521
612
  // 基础:默认主题 + useTheme的配置
522
- E({ theme: M, mode: "light" }, d),
613
+ K({ theme: F, mode: "light" }, h),
523
614
  // 最高层:用户手动传入的styles
524
- P
525
- ), S = (L == null ? void 0 : L.theme) || M, r = (I, F) => {
526
- u != null && u.onDockItemClick ? u.onDockItemClick(I, F) : I.onClick && I.onClick();
527
- }, q = (I, F) => {
528
- u != null && u.onDockActiveChange && u.onDockActiveChange(I, F);
529
- }, T = (I, F) => {
530
- u != null && u.onDockActiveChangeMultiple && u.onDockActiveChangeMultiple(I, F);
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__ */ g(
533
- Ze,
623
+ return /* @__PURE__ */ x(
624
+ Ue,
534
625
  {
535
- backgroundImage: c,
536
- backgroundColor: k,
626
+ backgroundImage: o,
627
+ backgroundColor: n,
537
628
  children: [
538
- b && /* @__PURE__ */ e(Je, { children: b }),
539
- /* @__PURE__ */ e(
540
- Qe,
629
+ u && /* @__PURE__ */ t(eo, { children: u }),
630
+ /* @__PURE__ */ t(
631
+ oo,
541
632
  {
542
633
  style: {
543
- color: S.colors.text,
544
- fontFamily: ((A = (j = S.fonts) == null ? void 0 : j.body) == null ? void 0 : A.family) || "PingFang SC, Microsoft YaHei, Arial, sans-serif"
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: t
637
+ children: e
547
638
  }
548
639
  ),
549
- i && i.length > 0 && /* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ e(
550
- Ae,
640
+ a && a.length > 0 && /* @__PURE__ */ t(to, { children: /* @__PURE__ */ t(
641
+ Te,
551
642
  {
552
- items: i,
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: O,
559
- defaultActiveIds: z,
560
- onItemClick: r,
561
- onActiveChange: q,
562
- onActiveChangeMultiple: T
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
- }, et = l.div`
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
- `, tt = l.div`
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
- `, ot = l.div`
684
+ `, io = l.div`
594
685
  display: flex;
595
686
  align-items: center;
596
687
  gap: 12px;
597
688
  min-width: 0;
598
- `, nt = l.div`
689
+ `, ao = l.div`
599
690
  display: flex;
600
691
  align-items: center;
601
692
  gap: 8px;
602
- `, ye = l.button`
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
- `, it = l.div`
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
- `, rt = l.aside`
728
+ `, so = l.aside`
638
729
  position: relative;
639
- `, lt = l.div`
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: ${(t) => t.$collapsed ? 0 : 1};
646
- transform: translateX(${(t) => t.$collapsed ? "-6px" : "0px"});
647
- pointer-events: ${(t) => t.$collapsed ? "none" : "auto"};
648
- `, at = l.button`
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
- `, st = l.div`
754
+ `, po = l.div`
664
755
  height: 100%;
665
756
  overflow: auto;
666
757
  padding-right: 8px;
667
- `, ct = l.main`
758
+ `, uo = l.main`
668
759
  position: relative;
669
760
  min-width: 0;
670
761
  height: 100%;
671
762
  overflow: auto; /* 文档渲染区独立滚动 */
672
- `, dt = l.div`
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
- `, ht = l.div`
771
+ `, fo = l.div`
681
772
  height: 100%;
682
773
  transition: opacity .5s ease;
683
- opacity: ${(t) => t.$opacity};
684
- `, pt = l.aside`
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
- `, ut = l.div`
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
- `, ft = l.div`
792
+ `, wo = l.div`
702
793
  transition: opacity .2s ease, transform .2s ease;
703
- opacity: ${(t) => t.$collapsed ? 0 : 1};
704
- transform: translateX(${(t) => t.$collapsed ? "6px" : "0px"});
705
- pointer-events: ${(t) => t.$collapsed ? "none" : "auto"};
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 ge = l.div`
817
+ const ae = l.div`
727
818
  font-size: 12px;
728
819
  opacity: .7;
729
820
  padding: 8px 8px;
730
- `, Q = l.button`
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
- ${(t) => t.$active ? "background: rgba(0,0,0,0.08); font-weight: 600;" : ""}
758
- `, gt = l.div`
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
- `, xt = l.div`
862
+ `, vo = l.div`
769
863
  width: 1px;
770
864
  height: 16px;
771
865
  background: currentColor;
772
866
  opacity: .2;
773
- `, bt = {
867
+ `, mo = {
774
868
  theme: {
775
- ...M,
869
+ ...F,
776
870
  colors: {
777
- ...M.colors,
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
- }, wt = {
881
+ }, yo = {
788
882
  theme: {
789
- ...M,
883
+ ...F,
790
884
  colors: {
791
- ...M.colors,
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
- }, Dt = (t) => {
803
- var K, ae, te, we;
896
+ }, To = (e) => {
897
+ var ue, ge, fe, xe;
804
898
  const {
805
- children: c,
806
- headerLogo: k,
807
- contentKey: b,
808
- modules: i,
899
+ children: o,
900
+ headerLogo: n,
901
+ contentKey: u,
902
+ modules: a,
809
903
  activeModuleKey: $,
810
- onModuleChange: O,
811
- languages: z,
812
- activeLanguageKey: P,
813
- onLanguageChange: u,
814
- themes: d,
815
- activeThemeKey: L,
816
- onThemeChange: S,
817
- sidebarItems: r,
818
- activeSidebarId: q,
819
- onSidebarItemClick: T,
820
- activeTocId: j,
821
- onTocItemClick: A,
822
- collapsibleSidebar: I = !0,
823
- styles: F
824
- } = t, ne = be(), he = t.activeThemeKey === "dark" ? wt : bt, H = E(
825
- E(
826
- E({ theme: M, mode: "light" }, ne),
827
- he
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
- F
830
- ), o = (H == null ? void 0 : H.theme) || M, [_, ie] = x.useState(!1), [U, pe] = x.useState(!1), [re, V] = x.useState(!1), w = typeof j == "string", [G, X] = x.useState(j), Z = x.useRef(null), [N, D] = x.useState(void 0), [ee, f] = x.useState(c), [y, ue] = x.useState(1);
831
- x.useEffect(() => {
832
- if (b === void 0) {
833
- f(c);
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
- ue(0);
837
- const n = setTimeout(() => {
838
- f(c), requestAnimationFrame(() => ue(1));
930
+ he(0);
931
+ const i = setTimeout(() => {
932
+ de(o), requestAnimationFrame(() => he(1));
839
933
  }, 120);
840
- return () => clearTimeout(n);
841
- }, [b, c]), x.useMemo(() => {
842
- var n, h, s, m, B, a, v, p, Y, C, W, J, oe;
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: (n = o == null ? void 0 : o.colors) == null ? void 0 : n.primary,
845
- secondaryColor: (h = o == null ? void 0 : o.colors) == null ? void 0 : h.secondary,
846
- backgroundColor: (s = o == null ? void 0 : o.colors) == null ? void 0 : s.appBackground,
847
- textColor: (m = o == null ? void 0 : o.colors) == null ? void 0 : m.text,
848
- borderColor: (B = o == null ? void 0 : o.colors) == null ? void 0 : B.border,
849
- disabledBackground: (a = o == null ? void 0 : o.colors) == null ? void 0 : a.disabledBackground,
850
- borderRadius: (v = o == null ? void 0 : o.space) == null ? void 0 : v.radius,
851
- padding: (p = o == null ? void 0 : o.space) == null ? void 0 : p.padding,
852
- margin: (Y = o == null ? void 0 : o.space) == null ? void 0 : Y.margin,
853
- baseFontSize: (W = (C = o == null ? void 0 : o.fonts) == null ? void 0 : C.body) != null && W.size ? parseInt((oe = (J = o == null ? void 0 : o.fonts) == null ? void 0 : J.body) == null ? void 0 : oe.size, 10) : void 0
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
- }, [o]), x.useEffect(() => {
856
- if (t.tocItems)
857
- D(void 0);
949
+ }, [r]), w.useEffect(() => {
950
+ if (e.tocItems)
951
+ H(void 0);
858
952
  else {
859
- b !== void 0 && D(void 0);
860
- let n = 0;
861
- const h = 10;
862
- let s = null, m = null;
863
- const B = () => {
864
- const a = Z.current;
865
- if (!a) {
866
- n < h ? (n++, s = setTimeout(B, 200)) : D([]);
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(a.querySelectorAll("h1, h2, h3"));
963
+ const v = Array.from(c.querySelectorAll("h1, h2, h3"));
870
964
  if (v.length === 0) {
871
- n < h ? (n++, s = setTimeout(B, 200)) : D([]);
965
+ i < p ? (i++, d = setTimeout(D, 200)) : H([]);
872
966
  return;
873
967
  }
874
- const p = /* @__PURE__ */ new Map(), Y = v.map((C) => {
875
- var ke;
876
- const W = C.id || ((ke = C.textContent) == null ? void 0 : ke.trim().replace(/\s+/g, "-").toLowerCase()) || "", J = p.get(W) || 0;
877
- p.set(W, J + 1);
878
- const oe = J > 0 ? `${W}-${J}` : W;
879
- C.id || (C.id = oe);
880
- const De = C.tagName === "H1" ? 1 : C.tagName === "H2" ? 2 : 3;
881
- return { id: oe, label: C.textContent || "", level: De };
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
- D(Y);
977
+ H(G);
884
978
  };
885
- return m = requestAnimationFrame(() => {
886
- s = setTimeout(B, 100);
979
+ return y = requestAnimationFrame(() => {
980
+ d = setTimeout(D, 100);
887
981
  }), () => {
888
- m !== null && cancelAnimationFrame(m), s !== null && clearTimeout(s);
982
+ y !== null && cancelAnimationFrame(y), d !== null && clearTimeout(d);
889
983
  };
890
984
  }
891
- }, [c, t.tocItems, b]), x.useEffect(() => {
892
- if (w) return;
893
- const h = ((t.tocItems ?? N) || []).map((a) => a.id).filter(Boolean);
894
- if (h.length === 0) return;
895
- X(void 0);
896
- const s = { root: null, rootMargin: "0px 0px -70% 0px", threshold: 0 }, m = (a) => {
897
- var p, Y;
898
- const v = a.filter((C) => C.isIntersecting).sort((C, W) => C.boundingClientRect.top - W.boundingClientRect.top);
899
- (Y = (p = v[0]) == null ? void 0 : p.target) != null && Y.id && X(v[0].target.id);
900
- }, B = new IntersectionObserver(m, s);
901
- return h.forEach((a) => {
902
- const v = document.getElementById(a);
903
- v && B.observe(v);
904
- }), () => B.disconnect();
905
- }, [N, w, t.tocItems, b]);
906
- const fe = (n, h) => {
907
- if (!n || n.length === 0) return;
908
- const s = Math.max(0, n.findIndex((B) => B.key === h)), m = n[(s + 1) % n.length];
909
- return m == null ? void 0 : m.key;
910
- }, le = (n) => {
911
- const h = document.getElementById(n);
912
- h && h.scrollIntoView({ behavior: "smooth", block: "start", inline: "nearest" });
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__ */ e(Se, { theme: o, mode: H.mode, children: /* @__PURE__ */ g(
915
- et,
1008
+ return /* @__PURE__ */ t(Ne, { theme: r, mode: m.mode, children: /* @__PURE__ */ x(
1009
+ no,
916
1010
  {
917
1011
  style: {
918
- background: o.colors.appBackground,
919
- color: o.colors.text,
920
- fontFamily: ((ae = (K = o.fonts) == null ? void 0 : K.body) == null ? void 0 : ae.family) || "PingFang SC, Microsoft YaHei, Arial, sans-serif"
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__ */ g(
924
- tt,
1017
+ /* @__PURE__ */ x(
1018
+ ro,
925
1019
  {
926
1020
  style: {
927
- background: o.colors.panelBackground || o.colors.dashboardBackground || "rgba(255,255,255,0.6)",
928
- color: o.colors.text
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__ */ g(ot, { children: [
932
- k,
933
- i && i.length > 0 && /* @__PURE__ */ e(gt, { children: i.map((n) => /* @__PURE__ */ e(
934
- Q,
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: n.key === $,
937
- onClick: () => O == null ? void 0 : O(n.key),
938
- title: n.label,
939
- children: n.label
1030
+ $active: i.key === $,
1031
+ onClick: () => W == null ? void 0 : W(i.key),
1032
+ title: i.label,
1033
+ children: i.label
940
1034
  },
941
- n.key
1035
+ i.key
942
1036
  )) })
943
1037
  ] }),
944
- /* @__PURE__ */ g(nt, { children: [
945
- /* @__PURE__ */ e("div", { className: "hide-on-desktop", style: { display: "none" } }),
946
- z && z.length > 0 && /* @__PURE__ */ e(
947
- ye,
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 n = fe(z, P);
951
- n && (u == null || u(n));
1044
+ const i = pe(M, _);
1045
+ i && (f == null || f(i));
952
1046
  },
953
- title: ((te = z.find((n) => n.key === P)) == null ? void 0 : te.label) || "Language",
1047
+ title: ((fe = M.find((i) => i.key === _)) == null ? void 0 : fe.label) || "Language",
954
1048
  "aria-label": "language",
955
- style: { color: o.colors.text },
956
- children: /* @__PURE__ */ g("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
957
- /* @__PURE__ */ e("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" }),
958
- /* @__PURE__ */ e("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" })
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__ */ e(xt, {}),
963
- d && d.length > 0 && /* @__PURE__ */ e(
964
- ye,
1056
+ /* @__PURE__ */ t(vo, {}),
1057
+ h && h.length > 0 && /* @__PURE__ */ t(
1058
+ ke,
965
1059
  {
966
1060
  onClick: () => {
967
- const n = fe(d, L);
968
- n && (S == null || S(n));
1061
+ const i = pe(h, O);
1062
+ i && (I == null || I(i));
969
1063
  },
970
- title: ((we = d.find((n) => n.key === L)) == null ? void 0 : we.label) || "Theme",
1064
+ title: ((xe = h.find((i) => i.key === O)) == null ? void 0 : xe.label) || "Theme",
971
1065
  "aria-label": "theme",
972
- style: { color: o.colors.text },
973
- children: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("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" }) })
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__ */ e("div", { className: "mobile-only", style: { display: "none" }, children: /* @__PURE__ */ e(Q, { onClick: () => V(!0), title: "\u6253\u5F00\u76EE\u5F55", children: "\u76EE\u5F55" }) })
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 h = (Array.isArray(r) ? r.length : 0) > 1, s = h ? _ ? "10px" : "var(--sidebar-width)" : "0px", m = U ? "10px" : "var(--toc-width)", B = h ? `${s} 1fr ${m}` : `1fr ${m}`;
983
- return /* @__PURE__ */ g(it, { style: { gridTemplateColumns: B }, children: [
984
- h && /* @__PURE__ */ g(rt, { children: [
985
- /* @__PURE__ */ e(lt, { $collapsed: _, children: /* @__PURE__ */ e(st, { children: r && r.length > 0 && /* @__PURE__ */ e("div", { children: Object.entries(
986
- r.reduce((a, v) => {
987
- const p = v.group || "\u6587\u6863";
988
- return a[p] = a[p] || [], a[p].push(v), a;
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(([a, v]) => /* @__PURE__ */ g("div", { children: [
991
- /* @__PURE__ */ e(ge, { children: a }),
992
- /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px" }, children: v.map((p) => /* @__PURE__ */ e(
993
- Q,
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: p.id === q,
1089
+ $active: g.id === N,
996
1090
  onClick: () => {
997
- p.href && (p.href.startsWith("#") ? le(p.href.slice(1)) : window.location.href = p.href), T == null || T(p), V(!1);
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: p.label,
1000
- children: p.label
1093
+ title: g.label,
1094
+ children: g.label
1001
1095
  },
1002
- p.id
1096
+ g.id
1003
1097
  )) })
1004
- ] }, a)) }) }) }),
1005
- I && h && /* @__PURE__ */ e(at, { onClick: () => ie((a) => !a), title: _ ? "\u5C55\u5F00\u5DE6\u4FA7\u680F" : "\u6536\u8D77\u5DE6\u4FA7\u680F", "aria-label": "toggle-left", children: _ ? /* @__PURE__ */ e("svg", { width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("path", { d: "M9 6l6 6-6 6", stroke: "currentColor", strokeWidth: "1.6" }) }) : /* @__PURE__ */ e("svg", { width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("path", { d: "M15 6l-6 6 6 6", stroke: "currentColor", strokeWidth: "1.6" }) }) })
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__ */ e(ct, { children: /* @__PURE__ */ e(
1008
- dt,
1101
+ /* @__PURE__ */ t(uo, { children: /* @__PURE__ */ t(
1102
+ go,
1009
1103
  {
1010
- ref: Z,
1011
- children: /* @__PURE__ */ e(ht, { $opacity: y, children: ee })
1104
+ ref: P,
1105
+ children: /* @__PURE__ */ t(fo, { $opacity: De, children: $e })
1012
1106
  }
1013
1107
  ) }),
1014
- /* @__PURE__ */ e(pt, { children: /* @__PURE__ */ e(ut, { children: /* @__PURE__ */ g(ft, { $collapsed: U, children: [
1015
- /* @__PURE__ */ e(ge, { children: "\u672C\u9875\u76EE\u5F55" }),
1016
- /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px" }, children: ((t.tocItems ?? N) || []).map((a) => /* @__PURE__ */ e(
1017
- Q,
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: (w ? j : G) === a.id,
1113
+ $active: (Q ? L : ce) === c.id,
1020
1114
  onClick: () => {
1021
- le(a.id), A == null || A(a);
1115
+ ie(c.id), T == null || T(c);
1022
1116
  },
1023
- title: a.label,
1024
- style: { paddingLeft: Math.max(0, (a.level || 1) - 1) * 12 + 10 },
1025
- children: a.label
1117
+ title: c.label,
1118
+ style: { paddingLeft: Math.max(0, (c.level || 1) - 1) * 12 + 10 },
1119
+ children: c.label
1026
1120
  },
1027
- a.id
1121
+ c.id
1028
1122
  )) })
1029
1123
  ] }) }) })
1030
1124
  ] });
1031
1125
  })(),
1032
- re && /* @__PURE__ */ e(
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: () => V(!1),
1045
- children: /* @__PURE__ */ g(
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: o.colors.panelBackground || o.colors.dashboardBackground || "#fff",
1053
- color: o.colors.text,
1054
- borderRight: `1px solid ${o.colors.border}`,
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: (n) => n.stopPropagation(),
1151
+ onClick: (i) => i.stopPropagation(),
1058
1152
  children: [
1059
- /* @__PURE__ */ g("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 8 }, children: [
1060
- /* @__PURE__ */ e("div", { style: { fontWeight: 600 }, children: "\u76EE\u5F55" }),
1061
- /* @__PURE__ */ e(Q, { onClick: () => V(!1), children: "\u5173\u95ED" })
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
- r && r.length > 0 && /* @__PURE__ */ e("div", { style: { overflow: "auto", height: "calc(100% - 40px)" }, children: Object.entries(
1064
- r.reduce((n, h) => {
1065
- const s = h.group || "\u6587\u6863";
1066
- return n[s] = n[s] || [], n[s].push(h), n;
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(([n, h]) => /* @__PURE__ */ g("div", { children: [
1069
- /* @__PURE__ */ e(ge, { children: n }),
1070
- /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px" }, children: h.map((s) => /* @__PURE__ */ e(
1071
- Q,
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: s.id === q,
1167
+ $active: d.id === N,
1074
1168
  onClick: () => {
1075
- s.href && (s.href.startsWith("#") ? le(s.href.slice(1)) : window.location.href = s.href), T == null || T(s), V(!1);
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: s.label
1171
+ children: d.label
1078
1172
  },
1079
- s.id
1173
+ d.id
1080
1174
  )) })
1081
- ] }, n)) })
1175
+ ] }, i)) })
1082
1176
  ]
1083
1177
  }
1084
1178
  )
@@ -1089,7 +1183,7 @@ const ge = l.div`
1089
1183
  ) });
1090
1184
  };
1091
1185
  export {
1092
- $t as DashboardContainer,
1093
- Bt as DockContainer,
1094
- Dt as DocumentContainer
1186
+ No as DashboardContainer,
1187
+ Ao as DockContainer,
1188
+ To as DocumentContainer
1095
1189
  };