@mxmweb/zui-layouts 1.3.2 → 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 +620 -514
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { jsx as e, jsxs as f, 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, w, b) => !!c && c.trim() !== "" && b.indexOf(c) === w).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: w = 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(w) * 24 / Number(c) : w,
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 w = 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 w.displayName = `${t}`, w;
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
- `, ye = 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: w,
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 = (k, G) => {
276
- d != null && d.onBreadcrumbClick ? d.onBreadcrumbClick(k, G) : k.onClick && k.onClick();
277
- }, I = (k, G) => {
278
- d != null && d.onDockItemClick && d.onDockItemClick(k, G);
279
- }, F = () => {
280
- if (!i || i.length === 0) return null;
281
- const k = x.useRef(null), [G, X] = x.useState({ start: 0, end: i.length, showEllipsis: !1 }), Z = x.useCallback(() => {
282
- if (!k.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 v = k.current.offsetWidth * 0.5;
287
- let K = Math.floor((v - 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 g = new ResizeObserver(() => {
302
- Z();
424
+ }, [a.length]);
425
+ if (w.useEffect(() => {
426
+ j();
427
+ const b = new ResizeObserver(() => {
428
+ j();
303
429
  });
304
- return k.current && g.observe(k.current), () => {
305
- g.disconnect();
430
+ return N.current && b.observe(N.current), () => {
431
+ b.disconnect();
306
432
  };
307
- }, [Z]), i.length <= 3)
308
- return /* @__PURE__ */ e(ye, { children: i.map((g, v) => /* @__PURE__ */ f(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: v === i.length - 1,
313
- $isClickable: !!(v < i.length - 1 || g.onClick),
314
- onClick: () => A(g, v),
315
- style: {
316
- color: v === i.length - 1 ? r.colors.text : r.colors.textSecondary || r.colors.disabledText
317
- },
318
- title: g.label,
319
- children: g.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
- v < i.length - 1 && /* @__PURE__ */ e(de, { children: /* @__PURE__ */ e(se, { size: 14 }) })
323
- ] }, g.id)) });
324
- const { start: N, end: D, showEllipsis: ee } = G;
325
- return /* @__PURE__ */ f(ye, { children: [
326
- i.slice(N, D).map((g, v) => /* @__PURE__ */ f(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: v === D - N - 1 && !ee,
331
- $isClickable: !!(v < D - N - 1 || g.onClick),
332
- onClick: () => A(g, N + v),
333
- style: {
334
- color: v === D - N - 1 && !ee ? r.colors.text : r.colors.textSecondary || r.colors.disabledText
335
- },
336
- title: g.label,
337
- children: g.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
- v < D - N - 1 && /* @__PURE__ */ e(de, { children: /* @__PURE__ */ e(se, { size: 14 }) })
341
- ] }, g.id)),
342
- ee && /* @__PURE__ */ f(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((g) => g.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__ */ f("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: (k) => I({ id: String(k.key), label: k.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__ */ f("div", { style: { display: "flex", flexDirection: "column", flex: 1, minWidth: 0 }, children: [
395
- (w || b || c || i) && /* @__PURE__ */ f(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
- w && /* @__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: w,
416
- children: w
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: w,
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__ */ f(
533
- Ze,
623
+ return /* @__PURE__ */ x(
624
+ Ue,
534
625
  {
535
- backgroundImage: c,
536
- backgroundColor: w,
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
- `, ve = 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,29 +768,34 @@ 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%;
693
- overflow: auto;
784
+ width: 100%;
785
+ max-width: var(--toc-width);
786
+ overflow-x: hidden; /* 禁止横向滚动 */
787
+ overflow-y: auto; /* 只允许垂直滚动 */
694
788
  padding-left: 8px;
695
789
  border-left: 1px solid rgba(0,0,0,0.06);
696
790
  background: transparent;
697
791
  z-index: 1;
698
- `, gt = l.div`
792
+ `, wo = l.div`
699
793
  transition: opacity .2s ease, transform .2s ease;
700
- opacity: ${(t) => t.$collapsed ? 0 : 1};
701
- transform: translateX(${(t) => t.$collapsed ? "6px" : "0px"});
702
- 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"};
797
+ width: 100%;
798
+ max-width: 100%;
703
799
  /* 不设置高度限制,让内容自然流动,由父容器 TocFloat 控制滚动 */
704
800
  `;
705
801
  l.button`
@@ -718,15 +814,12 @@ l.button`
718
814
  transition: background .15s ease;
719
815
  &:hover { background: rgba(0,0,0,0.12); }
720
816
  `;
721
- const fe = l.div`
817
+ const ae = l.div`
722
818
  font-size: 12px;
723
819
  opacity: .7;
724
820
  padding: 8px 8px;
725
- `, Q = l.button`
821
+ `, q = l.button`
726
822
  width: 100%;
727
- display: flex;
728
- align-items: center;
729
- gap: 8px;
730
823
  padding: 8px 10px;
731
824
  background: transparent;
732
825
  border: none;
@@ -736,14 +829,27 @@ const fe = l.div`
736
829
  color: inherit;
737
830
  transition: background .15s ease, color .15s ease;
738
831
  font-size: 13px;
739
- white-space: nowrap;
832
+ line-height: 1.5;
833
+ word-wrap: break-word;
834
+ word-break: break-word;
835
+ overflow-wrap: break-word;
836
+ box-sizing: border-box; /* 确保 padding 包含在高度内 */
837
+ /* 限制为最多两行,超出显示省略号 */
838
+ display: -webkit-box;
839
+ -webkit-line-clamp: 2;
840
+ -webkit-box-orient: vertical;
841
+ overflow: hidden;
842
+ text-overflow: ellipsis;
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); /* 强制限制高度,防止第三行显示 */
740
846
 
741
847
  &:hover {
742
848
  background: rgba(0,0,0,0.04);
743
849
  }
744
850
 
745
- ${(t) => t.$active ? "background: rgba(0,0,0,0.08); font-weight: 600;" : ""}
746
- `, ft = l.div`
851
+ ${(e) => e.$active ? "background: rgba(0,0,0,0.08); font-weight: 600;" : ""}
852
+ `, ko = l.div`
747
853
  display: flex;
748
854
  align-items: center;
749
855
  gap: 8px;
@@ -753,16 +859,16 @@ const fe = l.div`
753
859
  overflow-y: hidden;
754
860
  scrollbar-width: none;
755
861
  &::-webkit-scrollbar { display: none; }
756
- `, xt = l.div`
862
+ `, vo = l.div`
757
863
  width: 1px;
758
864
  height: 16px;
759
865
  background: currentColor;
760
866
  opacity: .2;
761
- `, bt = {
867
+ `, mo = {
762
868
  theme: {
763
- ...M,
869
+ ...F,
764
870
  colors: {
765
- ...M.colors,
871
+ ...F.colors,
766
872
  appBackground: "#ffffff",
767
873
  panelBackground: "#ffffff",
768
874
  dashboardBackground: "#ffffff",
@@ -772,11 +878,11 @@ const fe = l.div`
772
878
  shadow: "0 1px 2px rgba(0,0,0,0.06)"
773
879
  }
774
880
  }
775
- }, kt = {
881
+ }, yo = {
776
882
  theme: {
777
- ...M,
883
+ ...F,
778
884
  colors: {
779
- ...M.colors,
885
+ ...F.colors,
780
886
  appBackground: "#0f172a",
781
887
  panelBackground: "#111827",
782
888
  dashboardBackground: "#0b1220",
@@ -787,237 +893,237 @@ const fe = l.div`
787
893
  }
788
894
  },
789
895
  mode: "dark"
790
- }, Dt = (t) => {
791
- var K, ae, te, ke;
896
+ }, To = (e) => {
897
+ var ue, ge, fe, xe;
792
898
  const {
793
- children: c,
794
- headerLogo: w,
795
- contentKey: b,
796
- modules: i,
899
+ children: o,
900
+ headerLogo: n,
901
+ contentKey: u,
902
+ modules: a,
797
903
  activeModuleKey: $,
798
- onModuleChange: O,
799
- languages: z,
800
- activeLanguageKey: P,
801
- onLanguageChange: u,
802
- themes: d,
803
- activeThemeKey: L,
804
- onThemeChange: S,
805
- sidebarItems: r,
806
- activeSidebarId: q,
807
- onSidebarItemClick: T,
808
- activeTocId: j,
809
- onTocItemClick: A,
810
- collapsibleSidebar: I = !0,
811
- styles: F
812
- } = t, ne = be(), he = t.activeThemeKey === "dark" ? kt : bt, H = E(
813
- E(
814
- E({ theme: M, mode: "light" }, ne),
815
- 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
816
922
  ),
817
- F
818
- ), o = (H == null ? void 0 : H.theme) || M, [_, ie] = x.useState(!1), [U, pe] = x.useState(!1), [re, V] = x.useState(!1), k = typeof j == "string", [G, X] = x.useState(j), Z = x.useRef(null), [N, D] = x.useState(void 0), [ee, g] = x.useState(c), [v, ue] = x.useState(1);
819
- x.useEffect(() => {
820
- if (b === void 0) {
821
- g(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);
822
928
  return;
823
929
  }
824
- ue(0);
825
- const n = setTimeout(() => {
826
- g(c), requestAnimationFrame(() => ue(1));
930
+ he(0);
931
+ const i = setTimeout(() => {
932
+ de(o), requestAnimationFrame(() => he(1));
827
933
  }, 120);
828
- return () => clearTimeout(n);
829
- }, [b, c]), x.useMemo(() => {
830
- var n, h, s, m, B, a, y, 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;
831
937
  return {
832
- primaryColor: (n = o == null ? void 0 : o.colors) == null ? void 0 : n.primary,
833
- secondaryColor: (h = o == null ? void 0 : o.colors) == null ? void 0 : h.secondary,
834
- backgroundColor: (s = o == null ? void 0 : o.colors) == null ? void 0 : s.appBackground,
835
- textColor: (m = o == null ? void 0 : o.colors) == null ? void 0 : m.text,
836
- borderColor: (B = o == null ? void 0 : o.colors) == null ? void 0 : B.border,
837
- disabledBackground: (a = o == null ? void 0 : o.colors) == null ? void 0 : a.disabledBackground,
838
- borderRadius: (y = o == null ? void 0 : o.space) == null ? void 0 : y.radius,
839
- padding: (p = o == null ? void 0 : o.space) == null ? void 0 : p.padding,
840
- margin: (Y = o == null ? void 0 : o.space) == null ? void 0 : Y.margin,
841
- 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
842
948
  };
843
- }, [o]), x.useEffect(() => {
844
- if (t.tocItems)
845
- D(void 0);
949
+ }, [r]), w.useEffect(() => {
950
+ if (e.tocItems)
951
+ H(void 0);
846
952
  else {
847
- b !== void 0 && D(void 0);
848
- let n = 0;
849
- const h = 10;
850
- let s = null, m = null;
851
- const B = () => {
852
- const a = Z.current;
853
- if (!a) {
854
- 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([]);
855
961
  return;
856
962
  }
857
- const y = Array.from(a.querySelectorAll("h1, h2, h3"));
858
- if (y.length === 0) {
859
- n < h ? (n++, s = setTimeout(B, 200)) : D([]);
963
+ const v = Array.from(c.querySelectorAll("h1, h2, h3"));
964
+ if (v.length === 0) {
965
+ i < p ? (i++, d = setTimeout(D, 200)) : H([]);
860
966
  return;
861
967
  }
862
- const p = /* @__PURE__ */ new Map(), Y = y.map((C) => {
863
- var we;
864
- const W = C.id || ((we = C.textContent) == null ? void 0 : we.trim().replace(/\s+/g, "-").toLowerCase()) || "", J = p.get(W) || 0;
865
- p.set(W, J + 1);
866
- const oe = J > 0 ? `${W}-${J}` : W;
867
- C.id || (C.id = oe);
868
- const De = C.tagName === "H1" ? 1 : C.tagName === "H2" ? 2 : 3;
869
- 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 };
870
976
  });
871
- D(Y);
977
+ H(G);
872
978
  };
873
- return m = requestAnimationFrame(() => {
874
- s = setTimeout(B, 100);
979
+ return y = requestAnimationFrame(() => {
980
+ d = setTimeout(D, 100);
875
981
  }), () => {
876
- m !== null && cancelAnimationFrame(m), s !== null && clearTimeout(s);
982
+ y !== null && cancelAnimationFrame(y), d !== null && clearTimeout(d);
877
983
  };
878
984
  }
879
- }, [c, t.tocItems, b]), x.useEffect(() => {
880
- if (k) return;
881
- const h = ((t.tocItems ?? N) || []).map((a) => a.id).filter(Boolean);
882
- if (h.length === 0) return;
883
- X(void 0);
884
- const s = { root: null, rootMargin: "0px 0px -70% 0px", threshold: 0 }, m = (a) => {
885
- var p, Y;
886
- const y = a.filter((C) => C.isIntersecting).sort((C, W) => C.boundingClientRect.top - W.boundingClientRect.top);
887
- (Y = (p = y[0]) == null ? void 0 : p.target) != null && Y.id && X(y[0].target.id);
888
- }, B = new IntersectionObserver(m, s);
889
- return h.forEach((a) => {
890
- const y = document.getElementById(a);
891
- y && B.observe(y);
892
- }), () => B.disconnect();
893
- }, [N, k, t.tocItems, b]);
894
- const ge = (n, h) => {
895
- if (!n || n.length === 0) return;
896
- const s = Math.max(0, n.findIndex((B) => B.key === h)), m = n[(s + 1) % n.length];
897
- return m == null ? void 0 : m.key;
898
- }, le = (n) => {
899
- const h = document.getElementById(n);
900
- 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" });
901
1007
  };
902
- return /* @__PURE__ */ e(Se, { theme: o, mode: H.mode, children: /* @__PURE__ */ f(
903
- et,
1008
+ return /* @__PURE__ */ t(Ne, { theme: r, mode: m.mode, children: /* @__PURE__ */ x(
1009
+ no,
904
1010
  {
905
1011
  style: {
906
- background: o.colors.appBackground,
907
- color: o.colors.text,
908
- 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"
909
1015
  },
910
1016
  children: [
911
- /* @__PURE__ */ f(
912
- tt,
1017
+ /* @__PURE__ */ x(
1018
+ ro,
913
1019
  {
914
1020
  style: {
915
- background: o.colors.panelBackground || o.colors.dashboardBackground || "rgba(255,255,255,0.6)",
916
- color: o.colors.text
1021
+ background: r.colors.panelBackground || r.colors.dashboardBackground || "rgba(255,255,255,0.6)",
1022
+ color: r.colors.text
917
1023
  },
918
1024
  children: [
919
- /* @__PURE__ */ f(ot, { children: [
920
- w,
921
- i && i.length > 0 && /* @__PURE__ */ e(ft, { children: i.map((n) => /* @__PURE__ */ e(
922
- Q,
1025
+ /* @__PURE__ */ x(io, { children: [
1026
+ n,
1027
+ a && a.length > 0 && /* @__PURE__ */ t(ko, { children: a.map((i) => /* @__PURE__ */ t(
1028
+ q,
923
1029
  {
924
- $active: n.key === $,
925
- onClick: () => O == null ? void 0 : O(n.key),
926
- title: n.label,
927
- children: n.label
1030
+ $active: i.key === $,
1031
+ onClick: () => W == null ? void 0 : W(i.key),
1032
+ title: i.label,
1033
+ children: i.label
928
1034
  },
929
- n.key
1035
+ i.key
930
1036
  )) })
931
1037
  ] }),
932
- /* @__PURE__ */ f(nt, { children: [
933
- /* @__PURE__ */ e("div", { className: "hide-on-desktop", style: { display: "none" } }),
934
- z && z.length > 0 && /* @__PURE__ */ e(
935
- ve,
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,
936
1042
  {
937
1043
  onClick: () => {
938
- const n = ge(z, P);
939
- n && (u == null || u(n));
1044
+ const i = pe(M, _);
1045
+ i && (f == null || f(i));
940
1046
  },
941
- 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",
942
1048
  "aria-label": "language",
943
- style: { color: o.colors.text },
944
- children: /* @__PURE__ */ f("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
945
- /* @__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" }),
946
- /* @__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" })
947
1053
  ] })
948
1054
  }
949
1055
  ),
950
- /* @__PURE__ */ e(xt, {}),
951
- d && d.length > 0 && /* @__PURE__ */ e(
952
- ve,
1056
+ /* @__PURE__ */ t(vo, {}),
1057
+ h && h.length > 0 && /* @__PURE__ */ t(
1058
+ ke,
953
1059
  {
954
1060
  onClick: () => {
955
- const n = ge(d, L);
956
- n && (S == null || S(n));
1061
+ const i = pe(h, O);
1062
+ i && (I == null || I(i));
957
1063
  },
958
- title: ((ke = d.find((n) => n.key === L)) == null ? void 0 : ke.label) || "Theme",
1064
+ title: ((xe = h.find((i) => i.key === O)) == null ? void 0 : xe.label) || "Theme",
959
1065
  "aria-label": "theme",
960
- style: { color: o.colors.text },
961
- 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" }) })
962
1068
  }
963
1069
  ),
964
- /* @__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" }) })
965
1071
  ] })
966
1072
  ]
967
1073
  }
968
1074
  ),
969
1075
  (() => {
970
- 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}`;
971
- return /* @__PURE__ */ f(it, { style: { gridTemplateColumns: B }, children: [
972
- h && /* @__PURE__ */ f(rt, { children: [
973
- /* @__PURE__ */ e(lt, { $collapsed: _, children: /* @__PURE__ */ e(st, { children: r && r.length > 0 && /* @__PURE__ */ e("div", { children: Object.entries(
974
- r.reduce((a, y) => {
975
- const p = y.group || "\u6587\u6863";
976
- return a[p] = a[p] || [], a[p].push(y), 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;
977
1083
  }, {})
978
- ).map(([a, y]) => /* @__PURE__ */ f("div", { children: [
979
- /* @__PURE__ */ e(fe, { children: a }),
980
- /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px" }, children: y.map((p) => /* @__PURE__ */ e(
981
- 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,
982
1088
  {
983
- $active: p.id === q,
1089
+ $active: g.id === N,
984
1090
  onClick: () => {
985
- 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);
986
1092
  },
987
- title: p.label,
988
- children: p.label
1093
+ title: g.label,
1094
+ children: g.label
989
1095
  },
990
- p.id
1096
+ g.id
991
1097
  )) })
992
- ] }, a)) }) }) }),
993
- 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" }) }) })
994
1100
  ] }),
995
- /* @__PURE__ */ e(ct, { children: /* @__PURE__ */ e(
996
- dt,
1101
+ /* @__PURE__ */ t(uo, { children: /* @__PURE__ */ t(
1102
+ go,
997
1103
  {
998
- ref: Z,
999
- children: /* @__PURE__ */ e(ht, { $opacity: v, children: ee })
1104
+ ref: P,
1105
+ children: /* @__PURE__ */ t(fo, { $opacity: De, children: $e })
1000
1106
  }
1001
1107
  ) }),
1002
- /* @__PURE__ */ e(pt, { children: /* @__PURE__ */ e(ut, { children: /* @__PURE__ */ f(gt, { $collapsed: U, children: [
1003
- /* @__PURE__ */ e(fe, { children: "\u672C\u9875\u76EE\u5F55" }),
1004
- /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px" }, children: ((t.tocItems ?? N) || []).map((a) => /* @__PURE__ */ e(
1005
- 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,
1006
1112
  {
1007
- $active: (k ? j : G) === a.id,
1113
+ $active: (Q ? L : ce) === c.id,
1008
1114
  onClick: () => {
1009
- le(a.id), A == null || A(a);
1115
+ ie(c.id), T == null || T(c);
1010
1116
  },
1011
- title: a.label,
1012
- style: { paddingLeft: Math.max(0, (a.level || 1) - 1) * 12 + 10 },
1013
- children: a.label
1117
+ title: c.label,
1118
+ style: { paddingLeft: Math.max(0, (c.level || 1) - 1) * 12 + 10 },
1119
+ children: c.label
1014
1120
  },
1015
- a.id
1121
+ c.id
1016
1122
  )) })
1017
1123
  ] }) }) })
1018
1124
  ] });
1019
1125
  })(),
1020
- re && /* @__PURE__ */ e(
1126
+ b && /* @__PURE__ */ t(
1021
1127
  "div",
1022
1128
  {
1023
1129
  role: "dialog",
@@ -1029,44 +1135,44 @@ const fe = l.div`
1029
1135
  background: "rgba(0,0,0,0.45)",
1030
1136
  display: "flex"
1031
1137
  },
1032
- onClick: () => V(!1),
1033
- children: /* @__PURE__ */ f(
1138
+ onClick: () => k(!1),
1139
+ children: /* @__PURE__ */ x(
1034
1140
  "div",
1035
1141
  {
1036
1142
  style: {
1037
1143
  width: "82%",
1038
1144
  maxWidth: 320,
1039
1145
  height: "100%",
1040
- background: o.colors.panelBackground || o.colors.dashboardBackground || "#fff",
1041
- color: o.colors.text,
1042
- 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}`,
1043
1149
  padding: 12
1044
1150
  },
1045
- onClick: (n) => n.stopPropagation(),
1151
+ onClick: (i) => i.stopPropagation(),
1046
1152
  children: [
1047
- /* @__PURE__ */ f("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 8 }, children: [
1048
- /* @__PURE__ */ e("div", { style: { fontWeight: 600 }, children: "\u76EE\u5F55" }),
1049
- /* @__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" })
1050
1156
  ] }),
1051
- r && r.length > 0 && /* @__PURE__ */ e("div", { style: { overflow: "auto", height: "calc(100% - 40px)" }, children: Object.entries(
1052
- r.reduce((n, h) => {
1053
- const s = h.group || "\u6587\u6863";
1054
- 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;
1055
1161
  }, {})
1056
- ).map(([n, h]) => /* @__PURE__ */ f("div", { children: [
1057
- /* @__PURE__ */ e(fe, { children: n }),
1058
- /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px" }, children: h.map((s) => /* @__PURE__ */ e(
1059
- 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,
1060
1166
  {
1061
- $active: s.id === q,
1167
+ $active: d.id === N,
1062
1168
  onClick: () => {
1063
- 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);
1064
1170
  },
1065
- children: s.label
1171
+ children: d.label
1066
1172
  },
1067
- s.id
1173
+ d.id
1068
1174
  )) })
1069
- ] }, n)) })
1175
+ ] }, i)) })
1070
1176
  ]
1071
1177
  }
1072
1178
  )
@@ -1077,7 +1183,7 @@ const fe = l.div`
1077
1183
  ) });
1078
1184
  };
1079
1185
  export {
1080
- $t as DashboardContainer,
1081
- Bt as DockContainer,
1082
- Dt as DocumentContainer
1186
+ No as DashboardContainer,
1187
+ Ao as DockContainer,
1188
+ To as DocumentContainer
1083
1189
  };