@mxmweb/zui-layouts 1.3.7 → 1.3.10

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