@robot-admin/layout 3.1.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,2338 +1,3 @@
1
- import { Fragment as e, KeepAlive as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createTextVNode as l, createVNode as u, defineComponent as d, h as f, inject as p, mergeModels as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onMounted as v, onUnmounted as y, openBlock as b, provide as x, ref as S, renderList as C, renderSlot as w, resolveComponent as T, resolveDynamicComponent as E, toDisplayString as D, toValue as O, unref as k, useModel as A, watch as j, withCtx as M, withKeys as N, withModifiers as P } from "vue";
2
- import { NButton as F, NColorPicker as I, NDrawer as L, NDrawerContent as R, NDropdown as z, NInput as B, NLayout as V, NLayoutContent as H, NLayoutSider as U, NMenu as ee, NRadioButton as W, NRadioGroup as te, NSlider as ne, NSwitch as G, NTabPane as re, NTabs as ie, useDialog as ae, useMessage as oe } from "naive-ui";
3
- import { useRoute as K, useRouter as q } from "vue-router";
4
- import { defineStore as se } from "pinia";
5
- //#region src/composables/useLayoutContext.ts
6
- var J = Symbol("layout-context"), ce = Symbol("layout-settings"), le = Symbol("menu-collapse"), ue = Symbol("drawer-handlers");
7
- function Y() {
8
- let e = p(J);
9
- if (!e) throw Error("[Layout] LayoutContext not provided. 请在上层组件中使用 provide(LAYOUT_CONTEXT_KEY, ...) 注入布局数据。");
10
- return e;
11
- }
12
- function de(e) {
13
- return x(J, e), e;
14
- }
15
- var X = {
16
- name: "Admin",
17
- subtitle: "",
18
- logoSrc: "",
19
- logoType: "image",
20
- logoSize: 36,
21
- homePath: "/home",
22
- copyright: ""
23
- };
24
- //#endregion
25
- //#region src/composables/useLayoutCache.ts
26
- function fe(e) {
27
- return typeof e.name == "string" && e.meta.keepAlive === !0;
28
- }
29
- function Z(e = {}) {
30
- let { maxCacheCount: t = 20, enableDevLog: n = !1, exposeToWindow: r = !1 } = e, i = K(), a = Number.isFinite(t) && t > 0 ? Math.floor(t) : 20, o = S([]), s = S(a), c = (e) => {
31
- e && !o.value.includes(e) && (o.value.push(e), o.value.length > s.value && o.value.shift(), n && console.debug(`[KeepAlive] ✅ 缓存: ${e} (${o.value.length}/${s.value})`));
32
- }, l = (e) => {
33
- let t = o.value.indexOf(e);
34
- t > -1 && (o.value.splice(t, 1), n && console.debug(`[KeepAlive] ❌ 移除: ${e}`));
35
- }, u = () => {
36
- o.value = [], n && console.debug("[KeepAlive] 🗑️ 清空所有缓存");
37
- }, d = () => o.value;
38
- if (r && typeof window < "u") {
39
- let e = window;
40
- e.__clearCache__ = u, e.__removeCache__ = l, e.__getCachedViews__ = d, y(() => {
41
- e.__clearCache__ === u && delete e.__clearCache__, e.__removeCache__ === l && delete e.__removeCache__, e.__getCachedViews__ === d && delete e.__getCachedViews__;
42
- });
43
- }
44
- return j(() => [i.name, i.meta.keepAlive], () => {
45
- fe(i) && c(i.name);
46
- }, { immediate: !0 }), {
47
- cachedViews: o,
48
- maxCacheCount: s,
49
- addCache: c,
50
- removeCache: l,
51
- clearAllCache: u
52
- };
53
- }
54
- //#endregion
55
- //#region src/components/layouts/SideLayout/index.vue
56
- var pe = /* @__PURE__ */ d({
57
- name: "SideLayout",
58
- __name: "index",
59
- props: { collapsed: {
60
- type: Boolean,
61
- default: !1
62
- } },
63
- emits: ["update:collapsed"],
64
- setup(e, { expose: a, emit: o }) {
65
- let s = e, c = o, l = Y(), { cachedViews: d, maxCacheCount: f } = Z(), p = S(s.collapsed);
66
- j(() => s.collapsed, (e) => {
67
- p.value = e;
68
- });
69
- let m = r(() => p.value), h = (e) => {
70
- p.value = e, c("update:collapsed", e);
71
- };
72
- return a({
73
- collapsed: m,
74
- toggleCollapse: () => {
75
- let e = !p.value;
76
- p.value = e, c("update:collapsed", e);
77
- }
78
- }), (e, r) => {
79
- let a = T("RouterView");
80
- return b(), i(k(V), { "has-sider": "" }, {
81
- default: M(() => [u(k(U), {
82
- bordered: "",
83
- "collapse-mode": "width",
84
- "collapsed-width": k(l).sidebarCollapsedWidth.value,
85
- width: k(l).sidebarWidth.value,
86
- "native-scrollbar": !1,
87
- collapsed: m.value,
88
- "onUpdate:collapsed": h,
89
- class: g([
90
- "layout-sider",
91
- "no-horizontal-scroll",
92
- k(l).isDark.value ? "dark-theme" : "light-theme"
93
- ])
94
- }, {
95
- default: M(() => [w(e.$slots, "logo"), w(e.$slots, "menu", { collapsed: m.value })]),
96
- _: 3
97
- }, 8, [
98
- "collapsed-width",
99
- "width",
100
- "collapsed",
101
- "class"
102
- ]), u(k(V), null, {
103
- default: M(() => [
104
- w(e.$slots, "header"),
105
- u(k(H), { class: "content-with-header p16px app-content" }, {
106
- default: M(() => [u(a, null, {
107
- default: M(({ Component: e, route: r }) => [u(n, {
108
- name: k(l).transitionName.value,
109
- mode: "out-in"
110
- }, {
111
- default: M(() => [(b(), i(t, {
112
- include: k(d),
113
- max: k(f)
114
- }, [(b(), i(E(e), { key: r.path }))], 1032, ["include", "max"]))]),
115
- _: 2
116
- }, 1032, ["name"])]),
117
- _: 1
118
- })]),
119
- _: 1
120
- }),
121
- w(e.$slots, "footer")
122
- ]),
123
- _: 3
124
- })]),
125
- _: 3
126
- });
127
- };
128
- }
129
- }), me = { class: "responsive-menu__visible" }, he = { class: "responsive-menu__more" }, ge = /* @__PURE__ */ d({
130
- name: "ResponsiveMenu",
131
- __name: "index",
132
- props: { data: {} },
133
- setup(e) {
134
- let t = e, n = K(), c = q(), l = Y(), d = r(() => t.data || []), p = r(() => n.path), m = l.isDark, g = {
135
- itemTextColor: "rgba(51, 65, 85, 0.85)",
136
- itemTextColorHover: "rgba(30, 64, 175, 0.95)",
137
- itemTextColorActive: "rgba(30, 64, 175, 1)",
138
- itemTextColorActiveHover: "rgba(30, 64, 175, 1)",
139
- itemTextColorChildActive: "rgba(30, 64, 175, 1)",
140
- itemIconColor: "rgba(51, 65, 85, 0.7)",
141
- itemIconColorHover: "rgba(30, 64, 175, 0.85)",
142
- itemIconColorActive: "rgba(30, 64, 175, 1)",
143
- itemIconColorActiveHover: "rgba(30, 64, 175, 1)",
144
- itemIconColorChildActive: "rgba(30, 64, 175, 1)",
145
- itemColorHover: "rgba(30, 64, 175, 0.06)",
146
- itemColorActive: "rgba(30, 64, 175, 0.1)",
147
- itemColorActiveHover: "rgba(30, 64, 175, 0.12)",
148
- itemColorActiveCollapsed: "rgba(30, 64, 175, 0.1)",
149
- arrowColor: "rgba(51, 65, 85, 0.6)",
150
- arrowColorHover: "rgba(30, 64, 175, 0.8)",
151
- arrowColorActive: "rgba(30, 64, 175, 1)",
152
- arrowColorChildActive: "rgba(30, 64, 175, 1)",
153
- itemHeight: "42px",
154
- itemPadding: "0 18px",
155
- itemBorderRadius: "10px",
156
- groupTextColor: "rgba(51, 65, 85, 0.65)"
157
- }, _ = {
158
- itemTextColor: "rgba(226, 232, 240, 0.85)",
159
- itemTextColorHover: "rgba(255, 255, 255, 0.95)",
160
- itemTextColorActive: "rgba(147, 197, 253, 1)",
161
- itemTextColorActiveHover: "rgba(147, 197, 253, 1)",
162
- itemTextColorChildActive: "rgba(147, 197, 253, 1)",
163
- itemIconColor: "rgba(226, 232, 240, 0.7)",
164
- itemIconColorHover: "rgba(255, 255, 255, 0.85)",
165
- itemIconColorActive: "rgba(147, 197, 253, 1)",
166
- itemIconColorActiveHover: "rgba(147, 197, 253, 1)",
167
- itemIconColorChildActive: "rgba(147, 197, 253, 1)",
168
- itemColorHover: "rgba(59, 130, 246, 0.1)",
169
- itemColorActive: "rgba(59, 130, 246, 0.15)",
170
- itemColorActiveHover: "rgba(59, 130, 246, 0.18)",
171
- itemColorActiveCollapsed: "rgba(59, 130, 246, 0.15)",
172
- arrowColor: "rgba(226, 232, 240, 0.5)",
173
- arrowColorHover: "rgba(255, 255, 255, 0.7)",
174
- arrowColorActive: "rgba(147, 197, 253, 1)",
175
- arrowColorChildActive: "rgba(147, 197, 253, 1)",
176
- itemHeight: "42px",
177
- itemPadding: "0 18px",
178
- itemBorderRadius: "10px",
179
- groupTextColor: "rgba(226, 232, 240, 0.6)"
180
- }, x = r(() => m.value ? _ : g), C = (e, t = 18) => l.iconComponent ? () => f(l.iconComponent, {
181
- name: e,
182
- size: t
183
- }) : () => f("i", {
184
- class: e,
185
- style: {
186
- fontSize: `${t}px`,
187
- display: "inline-flex",
188
- alignItems: "center"
189
- }
190
- }), w = (e) => ({
191
- key: e.path || "",
192
- label: e.meta?.title || e.name || "",
193
- icon: e.meta?.icon ? C(e.meta.icon, 18) : void 0,
194
- children: e.children?.length ? e.children.map(w) : void 0
195
- }), T = S(), E = S([]), D = S([]), O = r(() => E.value.map(w)), A = r(() => D.value.map((e) => ({
196
- key: e.path || "",
197
- label: e.meta?.title || e.name || "",
198
- icon: e.meta?.icon ? C(e.meta.icon, 16) : void 0,
199
- children: e.children?.length ? e.children.map((e) => ({
200
- key: e.path || "",
201
- label: e.meta?.title || e.name || "",
202
- icon: e.meta?.icon ? C(e.meta.icon, 16) : void 0
203
- })) : void 0
204
- }))), N = (e) => {
205
- e && c.push(e);
206
- }, P = (e) => {
207
- let t = e.meta?.title || e.name || "", n = 0;
208
- for (let e of t) {
209
- let t = e.charCodeAt(0);
210
- t >= 19968 && t <= 40959 || t >= 13312 && t <= 19903 || t >= 12288 && t <= 12351 || t >= 65280 && t <= 65519 || t >= 12352 && t <= 12447 || t >= 12448 && t <= 12543 ? n += 15 : n += 8;
211
- }
212
- let r = e.meta?.icon ? 26 : 0;
213
- return n + r + 36 + 8 + 8;
214
- }, I = (e) => {
215
- if (!d.value.length) return 0;
216
- let t = 0;
217
- for (let e of d.value) t += P(e);
218
- if (t + 15 <= e) return d.value.length;
219
- let n = 0, r = 0, i = e - 80 - 15;
220
- for (let e of d.value) {
221
- let t = P(e);
222
- if (n + t <= i) n += t, r++;
223
- else break;
224
- }
225
- return Math.max(r, 1);
226
- }, L = () => {
227
- if (!T.value || !d.value.length) return;
228
- let e = T.value.offsetWidth;
229
- if (e <= 0) return;
230
- let t = I(e);
231
- E.value = d.value.slice(0, t), D.value = d.value.slice(t);
232
- }, R = null, B = () => {
233
- R && clearTimeout(R), R = setTimeout(() => L(), 100);
234
- }, V = null;
235
- return v(() => {
236
- h(() => L()), T.value && typeof ResizeObserver < "u" ? (V = new ResizeObserver(() => B()), V.observe(T.value)) : typeof window < "u" && window.addEventListener("resize", B, { passive: !0 });
237
- }), y(() => {
238
- V?.disconnect(), typeof window < "u" && window.removeEventListener("resize", B), R && clearTimeout(R);
239
- }), j(() => t.data, () => h(() => L()), { deep: !0 }), (e, t) => (b(), o("div", {
240
- ref_key: "containerRef",
241
- ref: T,
242
- class: "responsive-menu"
243
- }, [s("div", me, [O.value.length > 0 ? (b(), i(k(ee), {
244
- key: 0,
245
- mode: "horizontal",
246
- value: p.value,
247
- options: O.value,
248
- "theme-overrides": x.value,
249
- "onUpdate:value": N
250
- }, null, 8, [
251
- "value",
252
- "options",
253
- "theme-overrides"
254
- ])) : a("", !0)]), D.value.length > 0 ? (b(), i(k(z), {
255
- key: 0,
256
- options: A.value,
257
- placement: "bottom-end",
258
- trigger: "hover",
259
- onSelect: N
260
- }, {
261
- default: M(() => [s("div", he, [u(k(F), {
262
- text: "",
263
- class: "responsive-menu__more-btn"
264
- }, {
265
- default: M(() => [...t[0] ||= [s("span", { class: "dots-icon" }, [
266
- s("span"),
267
- s("span"),
268
- s("span")
269
- ], -1)]]),
270
- _: 1
271
- })])]),
272
- _: 1
273
- }, 8, ["options"])) : a("", !0)], 512));
274
- }
275
- }), Q = (e, t) => {
276
- let n = e.__vccOpts || e;
277
- for (let [e, r] of t) n[e] = r;
278
- return n;
279
- }, _e = /* @__PURE__ */ Q(ge, [["__scopeId", "data-v-01fd38ee"]]), ve = { class: "top-layout-container" }, ye = { class: "navbar-left" }, be = { class: "logo-container" }, xe = [
280
- "src",
281
- "width",
282
- "height"
283
- ], Se = [
284
- "src",
285
- "width",
286
- "height",
287
- "alt"
288
- ], Ce = { class: "brand-name" }, we = { class: "brand-title" }, Te = { class: "brand-subtitle" }, Ee = { class: "navbar-center" }, De = { class: "page-content" }, Oe = /* @__PURE__ */ d({
289
- name: "TopLayout",
290
- __name: "index",
291
- setup(e) {
292
- let c = Y(), { cachedViews: l, maxCacheCount: d } = Z(), f = c.isDark, p = r(() => c.menus.value), m = r(() => c.showTagsView.value), h = r(() => c.tagsViewHeight.value), v = r(() => c.showFooter.value), y = r(() => c.transitionName.value), x = {
293
- ...X,
294
- ...c.brand
295
- };
296
- return (e, r) => {
297
- let c = T("RouterView");
298
- return b(), o("div", ve, [
299
- s("div", { class: g(["top-navbar", [k(f) ? "dark-theme" : "light-theme"]]) }, [
300
- s("div", ye, [w(e.$slots, "logo", {}, () => [
301
- s("div", be, [r[0] ||= s("div", { class: "logo-glow" }, null, -1), x.logoType === "video" && x.logoSrc ? (b(), o("video", {
302
- key: 0,
303
- src: x.logoSrc,
304
- width: x.logoSize || 36,
305
- height: x.logoSize || 36,
306
- autoplay: "",
307
- loop: "",
308
- muted: "",
309
- playsinline: "",
310
- class: "logo-video"
311
- }, " 您的浏览器不支持 video 标签。 ", 8, xe)) : x.logoSrc ? (b(), o("img", {
312
- key: 1,
313
- src: x.logoSrc,
314
- width: x.logoSize || 36,
315
- height: x.logoSize || 36,
316
- class: "logo-video",
317
- alt: x.name || "Logo"
318
- }, null, 8, Se)) : a("", !0)]),
319
- s("div", Ce, [s("span", we, D(x.name), 1), s("span", Te, D(x.subtitle), 1)]),
320
- r[1] ||= s("div", { class: "navbar-divider" }, null, -1)
321
- ])]),
322
- s("div", Ee, [w(e.$slots, "menu", {}, () => [u(_e, { data: p.value }, null, 8, ["data"])])]),
323
- w(e.$slots, "header-extra")
324
- ], 2),
325
- m.value ? (b(), o("div", {
326
- key: 0,
327
- class: "tags-view-container",
328
- style: _({ height: `${h.value}px` })
329
- }, [w(e.$slots, "tags-view")], 4)) : a("", !0),
330
- u(k(V), null, {
331
- default: M(() => [u(k(H), { class: "main-content" }, {
332
- default: M(() => [s("div", De, [u(c, null, {
333
- default: M(({ Component: e, route: r }) => [u(n, {
334
- name: y.value,
335
- mode: "out-in"
336
- }, {
337
- default: M(() => [(b(), i(t, {
338
- include: k(l),
339
- max: k(d)
340
- }, [(b(), i(E(e), { key: r.path }))], 1032, ["include", "max"]))]),
341
- _: 2
342
- }, 1032, ["name"])]),
343
- _: 1
344
- })])]),
345
- _: 1
346
- }), v.value ? w(e.$slots, "footer", {}, void 0, void 0, 0) : a("", !0)]),
347
- _: 3
348
- })
349
- ]);
350
- };
351
- }
352
- });
353
- //#endregion
354
- //#region src/composables/useMenuSplit.ts
355
- function ke(e, t) {
356
- if (!e) return !1;
357
- let n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
358
- return n.length === 0 ? r.length === 0 : n.every((e, t) => r[t] === e);
359
- }
360
- function Ae(e) {
361
- let { menus: t, floatingSecondMenu: n = !1 } = e, i = K(), a = q(), o = S(""), s = S(null), c = S(!1), l = r(() => s.value || f.value || null), u = (e) => ke(e, i.path), d = (e) => {
362
- for (let t of e) if (u(t.path) || t.children?.length && d(t.children)) return t;
363
- return null;
364
- }, f = r(() => t.value.find((e) => e.path === o.value)), p = r(() => f.value?.children || []), m = (e) => {
365
- e.disabled || (O(n) ? e.children && e.children.length > 0 ? c.value && o.value === e.path ? c.value = !1 : (o.value = e.path || "", c.value = !0) : (o.value = e.path || "", c.value = !1, e.path && a.push(e.path)) : (!e.children || e.children.length === 0) && e.path && a.push(e.path));
366
- }, h = (e) => {
367
- !e.disabled && e.path && a.push(e.path);
368
- }, g = () => {
369
- let e = t.value, r = d(e);
370
- r ? (o.value = r.path || "", O(n) && r.children?.length && (c.value = !0)) : e.length > 0 && !o.value && (o.value = e[0].path || "");
371
- };
372
- return j(() => i.path, () => g(), { immediate: !0 }), j(t, (e) => {
373
- e && e.length > 0 && g();
374
- }, { immediate: !0 }), v(() => g()), {
375
- activeFirstMenu: o,
376
- activeFirstMenuItem: f,
377
- currentSecondMenus: p,
378
- hoveredMenuItem: s,
379
- displayMenuItem: l,
380
- showSecondMenu: c,
381
- handleFirstMenuClick: m,
382
- handleSecondMenuClick: h,
383
- isMenuItemActive: u
384
- };
385
- }
386
- //#endregion
387
- //#region src/components/layouts/MixLayout/index.vue?vue&type=script&setup=true&lang.ts
388
- var je = { class: "mix-layout-container" }, Me = { class: "logo-container" }, Ne = [
389
- "src",
390
- "width",
391
- "height"
392
- ], Pe = [
393
- "src",
394
- "width",
395
- "height",
396
- "alt"
397
- ], Fe = { class: "first-menu-list" }, Ie = [
398
- "tabindex",
399
- "aria-disabled",
400
- "onClick",
401
- "onKeydown"
402
- ], Le = { class: "menu-item-content" }, Re = {
403
- key: 1,
404
- class: "menu-item-text"
405
- }, ze = { class: "menu-item-label" }, Be = { class: "second-menu-header" }, Ve = { class: "menu-title" }, He = { class: "second-menu-list" }, Ue = [
406
- "tabindex",
407
- "aria-disabled",
408
- "onClick",
409
- "onKeydown"
410
- ], We = { class: "menu-item-label" }, Ge = { class: "main-layout" }, Ke = /* @__PURE__ */ d({
411
- name: "MixLayout",
412
- __name: "index",
413
- setup(c) {
414
- let l = Y(), { cachedViews: p, maxCacheCount: m } = Z(), h = l.isDark, _ = r(() => l.menus.value), v = r(() => l.showFooter.value), y = r(() => l.transitionName.value), x = {
415
- ...X,
416
- ...l.brand
417
- }, S = Ae({
418
- menus: l.menus,
419
- floatingSecondMenu: r(() => !0)
420
- }), O = l.iconComponent ?? d({
421
- name: "LayoutIcon",
422
- props: {
423
- name: String,
424
- size: {
425
- type: Number,
426
- default: 18
427
- }
428
- },
429
- setup(e) {
430
- return () => f("i", {
431
- class: e.name,
432
- style: {
433
- fontSize: `${e.size}px`,
434
- display: "inline-flex",
435
- alignItems: "center",
436
- justifyContent: "center"
437
- }
438
- });
439
- }
440
- });
441
- return (r, c) => {
442
- let l = T("RouterView");
443
- return b(), o("div", je, [
444
- s("div", { class: g(["first-level-menu", [k(h) ? "dark-theme" : "light-theme"]]) }, [s("div", Me, [w(r.$slots, "logo", {}, () => [c[0] ||= s("div", { class: "logo-glow" }, null, -1), x.logoType === "video" && x.logoSrc ? (b(), o("video", {
445
- key: 0,
446
- src: x.logoSrc,
447
- width: x.logoSize || 40,
448
- height: x.logoSize || 40,
449
- autoplay: "",
450
- loop: "",
451
- muted: "",
452
- playsinline: "",
453
- class: "logo-video"
454
- }, " 您的浏览器不支持 video 标签。 ", 8, Ne)) : x.logoSrc ? (b(), o("img", {
455
- key: 1,
456
- src: x.logoSrc,
457
- width: x.logoSize || 40,
458
- height: x.logoSize || 40,
459
- class: "logo-video",
460
- alt: x.name || "Logo"
461
- }, null, 8, Pe)) : a("", !0)])]), s("div", Fe, [(b(!0), o(e, null, C(_.value, (e) => (b(), o("div", {
462
- key: e.path,
463
- class: g(["first-menu-item", { active: k(S).activeFirstMenu.value === e.path }]),
464
- role: "button",
465
- tabindex: e.disabled ? -1 : 0,
466
- "aria-disabled": e.disabled || void 0,
467
- onClick: (t) => k(S).handleFirstMenuClick(e),
468
- onKeydown: [N((t) => k(S).handleFirstMenuClick(e), ["enter"]), N(P((t) => k(S).handleFirstMenuClick(e), ["prevent"]), ["space"])]
469
- }, [s("div", Le, [e.meta?.icon ? (b(), i(E(k(O)), {
470
- key: 0,
471
- name: e.meta.icon,
472
- size: 22
473
- }, null, 8, ["name"])) : (b(), o("span", Re, D((e.meta?.title || "")[0]), 1))]), s("span", ze, D(e.meta?.title), 1)], 42, Ie))), 128))])], 2),
474
- u(n, { name: "slide-fade" }, {
475
- default: M(() => [k(S).showSecondMenu.value ? (b(), o("div", {
476
- key: 0,
477
- class: g(["second-level-menu-popup", [k(h) ? "dark-theme" : "light-theme"]])
478
- }, [s("div", Be, [k(S).displayMenuItem.value?.meta?.icon ? (b(), i(E(k(O)), {
479
- key: 0,
480
- name: k(S).displayMenuItem.value.meta.icon,
481
- size: 20
482
- }, null, 8, ["name"])) : a("", !0), s("span", Ve, D(k(S).displayMenuItem.value?.meta?.title), 1)]), s("div", He, [(b(!0), o(e, null, C(k(S).displayMenuItem.value?.children || [], (e) => (b(), o("div", {
483
- key: e.path,
484
- class: g(["second-menu-item", { active: k(S).isMenuItemActive(e.path) }]),
485
- role: "link",
486
- tabindex: e.disabled ? -1 : 0,
487
- "aria-disabled": e.disabled || void 0,
488
- onClick: (t) => k(S).handleSecondMenuClick(e),
489
- onKeydown: [N((t) => k(S).handleSecondMenuClick(e), ["enter"]), N(P((t) => k(S).handleSecondMenuClick(e), ["prevent"]), ["space"])]
490
- }, [e.meta?.icon ? (b(), i(E(k(O)), {
491
- key: 0,
492
- name: e.meta.icon,
493
- size: 16
494
- }, null, 8, ["name"])) : a("", !0), s("span", We, D(e.meta?.title), 1)], 42, Ue))), 128))])], 2)) : a("", !0)]),
495
- _: 1
496
- }),
497
- s("div", Ge, [w(r.$slots, "header"), u(k(V), null, {
498
- default: M(() => [u(k(H), { class: "content-with-header p16px app-content" }, {
499
- default: M(() => [u(l, null, {
500
- default: M(({ Component: e, route: r }) => [u(n, {
501
- name: y.value,
502
- mode: "out-in"
503
- }, {
504
- default: M(() => [(b(), i(t, {
505
- include: k(p),
506
- max: k(m)
507
- }, [(b(), i(E(e), { key: r.path }))], 1032, ["include", "max"]))]),
508
- _: 2
509
- }, 1032, ["name"])]),
510
- _: 1
511
- })]),
512
- _: 1
513
- }), v.value ? w(r.$slots, "footer", {}, void 0, void 0, 0) : a("", !0)]),
514
- _: 3
515
- })])
516
- ]);
517
- };
518
- }
519
- }), qe = { class: "mix-top-layout-container" }, Je = { class: "logo-container" }, Ye = [
520
- "src",
521
- "width",
522
- "height"
523
- ], Xe = [
524
- "src",
525
- "width",
526
- "height",
527
- "alt"
528
- ], Ze = { class: "first-menu-list" }, Qe = [
529
- "tabindex",
530
- "aria-disabled",
531
- "aria-current",
532
- "onClick",
533
- "onKeydown"
534
- ], $e = { class: "menu-item-content" }, et = {
535
- key: 1,
536
- class: "menu-item-text"
537
- }, tt = { class: "menu-item-label" }, nt = { class: "main-area" }, rt = { class: "navbar-left" }, it = { class: "brand-name" }, at = { class: "brand-title" }, ot = { class: "brand-subtitle" }, st = { class: "navbar-center" }, ct = { class: "page-content" }, lt = /* @__PURE__ */ d({
538
- name: "MixTopLayout",
539
- __name: "index",
540
- setup(c) {
541
- let l = Y(), { cachedViews: p, maxCacheCount: m } = Z(), h = l.isDark, v = r(() => l.menus.value), y = r(() => l.showTagsView.value), x = r(() => l.tagsViewHeight.value), S = r(() => l.showFooter.value), O = r(() => l.transitionName.value), A = {
542
- ...X,
543
- ...l.brand
544
- }, j = Ae({
545
- menus: l.menus,
546
- floatingSecondMenu: r(() => !1)
547
- }), F = l.iconComponent ?? d({
548
- name: "LayoutIcon",
549
- props: {
550
- name: String,
551
- size: {
552
- type: Number,
553
- default: 18
554
- }
555
- },
556
- setup(e) {
557
- return () => f("i", {
558
- class: e.name,
559
- style: {
560
- fontSize: `${e.size}px`,
561
- display: "inline-flex",
562
- alignItems: "center",
563
- justifyContent: "center"
564
- }
565
- });
566
- }
567
- });
568
- return (r, c) => {
569
- let l = T("RouterView");
570
- return b(), o("div", qe, [s("div", { class: g(["first-level-sidebar", [k(h) ? "dark-theme" : "light-theme"]]) }, [s("div", Je, [w(r.$slots, "logo", {}, () => [c[0] ||= s("div", { class: "logo-glow" }, null, -1), A.logoType === "video" && A.logoSrc ? (b(), o("video", {
571
- key: 0,
572
- src: A.logoSrc,
573
- width: A.logoSize || 40,
574
- height: A.logoSize || 40,
575
- autoplay: "",
576
- loop: "",
577
- muted: "",
578
- playsinline: "",
579
- class: "logo-video"
580
- }, " 您的浏览器不支持 video 标签。 ", 8, Ye)) : A.logoSrc ? (b(), o("img", {
581
- key: 1,
582
- src: A.logoSrc,
583
- width: A.logoSize || 40,
584
- height: A.logoSize || 40,
585
- class: "logo-video",
586
- alt: A.name || "Logo"
587
- }, null, 8, Xe)) : a("", !0)])]), s("div", Ze, [(b(!0), o(e, null, C(v.value, (e) => (b(), o("div", {
588
- key: e.path,
589
- class: g(["first-menu-item", { active: k(j).activeFirstMenu.value === e.path }]),
590
- role: "button",
591
- tabindex: e.disabled ? -1 : 0,
592
- "aria-disabled": e.disabled || void 0,
593
- "aria-current": k(j).activeFirstMenu.value === e.path ? "page" : void 0,
594
- onClick: (t) => k(j).handleFirstMenuClick(e),
595
- onKeydown: [N((t) => k(j).handleFirstMenuClick(e), ["enter"]), N(P((t) => k(j).handleFirstMenuClick(e), ["prevent"]), ["space"])]
596
- }, [s("div", $e, [e.meta?.icon ? (b(), i(E(k(F)), {
597
- key: 0,
598
- name: e.meta.icon,
599
- size: 22
600
- }, null, 8, ["name"])) : (b(), o("span", et, D((e.meta?.title || "")[0]), 1))]), s("span", tt, D(e.meta?.title), 1)], 42, Qe))), 128))])], 2), s("div", nt, [
601
- s("div", { class: g(["top-navbar", [k(h) ? "dark-theme" : "light-theme"]]) }, [
602
- s("div", rt, [w(r.$slots, "brand", {}, () => [s("div", it, [s("span", at, D(A.name), 1), s("span", ot, D(A.subtitle), 1)]), c[1] ||= s("div", { class: "navbar-divider" }, null, -1)])]),
603
- s("div", st, [w(r.$slots, "top-menu", {}, () => [k(j).currentSecondMenus.value.length > 0 ? (b(), i(_e, {
604
- key: 0,
605
- data: k(j).currentSecondMenus.value
606
- }, null, 8, ["data"])) : a("", !0)])]),
607
- w(r.$slots, "header-extra")
608
- ], 2),
609
- y.value ? (b(), o("div", {
610
- key: 0,
611
- class: "tags-view-container",
612
- style: _({ height: `${x.value}px` })
613
- }, [w(r.$slots, "tags-view")], 4)) : a("", !0),
614
- u(k(V), { class: "content-layout" }, {
615
- default: M(() => [u(k(H), { class: "main-content" }, {
616
- default: M(() => [s("div", ct, [u(l, null, {
617
- default: M(({ Component: e, route: r }) => [u(n, {
618
- name: O.value,
619
- mode: "out-in"
620
- }, {
621
- default: M(() => [(b(), i(t, {
622
- include: k(p),
623
- max: k(m)
624
- }, [(b(), i(E(e), { key: r.path }))], 1032, ["include", "max"]))]),
625
- _: 2
626
- }, 1032, ["name"])]),
627
- _: 1
628
- })])]),
629
- _: 1
630
- }), S.value ? w(r.$slots, "footer", {}, void 0, void 0, 0) : a("", !0)]),
631
- _: 3
632
- })
633
- ])]);
634
- };
635
- }
636
- }), ut = { class: "reverse-horizontal-mix-layout-container" }, dt = { class: "navbar-left" }, ft = { class: "logo-container" }, pt = [
637
- "src",
638
- "width",
639
- "height"
640
- ], mt = [
641
- "src",
642
- "width",
643
- "height",
644
- "alt"
645
- ], ht = { class: "brand-name" }, gt = { class: "brand-title" }, _t = { class: "brand-subtitle" }, vt = { class: "navbar-center" }, yt = { class: "main-area" }, bt = { class: "page-content" }, xt = ["aria-expanded", "onKeydown"], St = { class: "header-icon" }, Ct = { class: "header-title" }, wt = { class: "sidebar-menu-list" }, Tt = {
646
- key: 0,
647
- class: "menu-group"
648
- }, Et = { class: "group-title" }, Dt = [
649
- "tabindex",
650
- "aria-disabled",
651
- "aria-current",
652
- "onClick",
653
- "onKeydown"
654
- ], Ot = { class: "item-title" }, kt = [
655
- "tabindex",
656
- "aria-disabled",
657
- "aria-current",
658
- "onClick",
659
- "onKeydown"
660
- ], At = { class: "item-title" }, jt = /* @__PURE__ */ d({
661
- name: "ReverseHorizontalMixLayout",
662
- __name: "index",
663
- setup(c) {
664
- let l = Y(), { cachedViews: p, maxCacheCount: m } = Z(), h = l.isDark, v = r(() => l.menus.value), y = r(() => l.showTagsView.value), x = r(() => l.tagsViewHeight.value), O = r(() => l.showFooter.value), A = r(() => l.transitionName.value), j = {
665
- ...X,
666
- ...l.brand
667
- }, F = Ae({
668
- menus: l.menus,
669
- floatingSecondMenu: r(() => !1)
670
- }), I = S(!1), L = () => {
671
- I.value = !I.value;
672
- }, R = l.iconComponent ?? d({
673
- name: "LayoutIcon",
674
- props: {
675
- name: String,
676
- size: {
677
- type: Number,
678
- default: 18
679
- }
680
- },
681
- setup(e) {
682
- return () => f("i", {
683
- class: e.name,
684
- style: {
685
- fontSize: `${e.size}px`,
686
- display: "inline-flex",
687
- alignItems: "center",
688
- justifyContent: "center"
689
- }
690
- });
691
- }
692
- });
693
- return (r, c) => {
694
- let l = T("RouterView");
695
- return b(), o("div", ut, [
696
- s("div", { class: g(["top-navbar", [k(h) ? "dark-theme" : "light-theme"]]) }, [
697
- s("div", dt, [w(r.$slots, "logo", {}, () => [
698
- s("div", ft, [c[0] ||= s("div", { class: "logo-glow" }, null, -1), j.logoType === "video" && j.logoSrc ? (b(), o("video", {
699
- key: 0,
700
- src: j.logoSrc,
701
- width: j.logoSize || 36,
702
- height: j.logoSize || 36,
703
- autoplay: "",
704
- loop: "",
705
- muted: "",
706
- playsinline: "",
707
- class: "logo-video"
708
- }, " 您的浏览器不支持 video 标签。 ", 8, pt)) : j.logoSrc ? (b(), o("img", {
709
- key: 1,
710
- src: j.logoSrc,
711
- width: j.logoSize || 36,
712
- height: j.logoSize || 36,
713
- class: "logo-video",
714
- alt: j.name || "Logo"
715
- }, null, 8, mt)) : a("", !0)]),
716
- s("div", ht, [s("span", gt, D(j.name), 1), s("span", _t, D(j.subtitle), 1)]),
717
- c[1] ||= s("div", { class: "navbar-divider" }, null, -1)
718
- ])]),
719
- s("div", vt, [w(r.$slots, "top-menu", {}, () => [u(_e, { data: v.value }, null, 8, ["data"])])]),
720
- w(r.$slots, "header-extra")
721
- ], 2),
722
- y.value ? (b(), o("div", {
723
- key: 0,
724
- class: "tags-view-container",
725
- style: _({ height: `${x.value}px` })
726
- }, [w(r.$slots, "tags-view")], 4)) : a("", !0),
727
- s("div", yt, [
728
- u(k(V), { class: "content-layout" }, {
729
- default: M(() => [u(k(H), { class: "main-content" }, {
730
- default: M(() => [s("div", bt, [u(l, null, {
731
- default: M(({ Component: e, route: r }) => [u(n, {
732
- name: A.value,
733
- mode: "out-in"
734
- }, {
735
- default: M(() => [(b(), i(t, {
736
- include: k(p),
737
- max: k(m)
738
- }, [(b(), i(E(e), { key: r.path }))], 1032, ["include", "max"]))]),
739
- _: 2
740
- }, 1032, ["name"])]),
741
- _: 1
742
- })])]),
743
- _: 1
744
- }), O.value ? w(r.$slots, "footer", {}, void 0, void 0, 0) : a("", !0)]),
745
- _: 3
746
- }),
747
- k(F).currentSecondMenus.value.length > 0 ? (b(), o("div", {
748
- key: 0,
749
- class: g(["sidebar-toggle", [k(h) ? "dark-theme" : "light-theme", { active: !I.value }]]),
750
- onClick: L,
751
- role: "button",
752
- tabindex: "0",
753
- "aria-expanded": !I.value,
754
- onKeydown: [N(L, ["enter"]), N(P(L, ["prevent"]), ["space"])]
755
- }, [s("span", { class: g([
756
- "collapse-arrow",
757
- "toggle-icon",
758
- I.value ? "collapsed" : "expanded"
759
- ]) }, [...c[2] ||= [s("span", { class: "arrow-line" }, null, -1), s("span", { class: "arrow-line" }, null, -1)]], 2)], 42, xt)) : a("", !0),
760
- k(F).currentSecondMenus.value.length > 0 ? (b(), o("div", {
761
- key: 1,
762
- class: g(["right-sidebar-wrapper", { collapsed: I.value }])
763
- }, [s("div", { class: g(["right-sidebar", [k(h) ? "dark-theme" : "light-theme"]]) }, [s("div", { class: g(["sidebar-header", [k(h) ? "dark-theme" : "light-theme"]]) }, [s("div", St, [k(F).activeFirstMenuItem.value?.meta?.icon ? (b(), i(E(k(R)), {
764
- key: 0,
765
- name: k(F).activeFirstMenuItem.value.meta.icon,
766
- size: 20
767
- }, null, 8, ["name"])) : a("", !0)]), s("span", Ct, D(k(F).activeFirstMenuItem.value?.meta?.title || "菜单"), 1)], 2), s("div", wt, [(b(!0), o(e, null, C(k(F).currentSecondMenus.value, (t) => (b(), o(e, { key: t.path }, [t.children && t.children.length > 0 ? (b(), o("div", Tt, [s("div", Et, [t.meta?.icon ? (b(), i(E(k(R)), {
768
- key: 0,
769
- name: t.meta.icon,
770
- size: 16
771
- }, null, 8, ["name"])) : a("", !0), s("span", null, D(t.meta?.title), 1)]), (b(!0), o(e, null, C(t.children, (e) => (b(), o("div", {
772
- key: e.path,
773
- class: g(["menu-item sub-item", { active: k(F).isMenuItemActive(e.path) }]),
774
- role: "button",
775
- tabindex: e.disabled ? -1 : 0,
776
- "aria-disabled": e.disabled || void 0,
777
- "aria-current": k(F).isMenuItemActive(e.path) ? "page" : void 0,
778
- onClick: (t) => k(F).handleSecondMenuClick(e),
779
- onKeydown: [N((t) => k(F).handleSecondMenuClick(e), ["enter"]), N(P((t) => k(F).handleSecondMenuClick(e), ["prevent"]), ["space"])]
780
- }, [e.meta?.icon ? (b(), i(E(k(R)), {
781
- key: 0,
782
- name: e.meta.icon,
783
- size: 16
784
- }, null, 8, ["name"])) : a("", !0), s("span", Ot, D(e.meta?.title), 1)], 42, Dt))), 128))])) : (b(), o("div", {
785
- key: 1,
786
- class: g(["menu-item", { active: k(F).isMenuItemActive(t.path) }]),
787
- role: "button",
788
- tabindex: t.disabled ? -1 : 0,
789
- "aria-disabled": t.disabled || void 0,
790
- "aria-current": k(F).isMenuItemActive(t.path) ? "page" : void 0,
791
- onClick: (e) => k(F).handleSecondMenuClick(t),
792
- onKeydown: [N((e) => k(F).handleSecondMenuClick(t), ["enter"]), N(P((e) => k(F).handleSecondMenuClick(t), ["prevent"]), ["space"])]
793
- }, [t.meta?.icon ? (b(), i(E(k(R)), {
794
- key: 0,
795
- name: t.meta.icon,
796
- size: 18
797
- }, null, 8, ["name"])) : a("", !0), s("span", At, D(t.meta?.title), 1)], 42, kt))], 64))), 128))])], 2)], 2)) : a("", !0)
798
- ])
799
- ]);
800
- };
801
- }
802
- }), Mt = { class: "card-layout-container" }, Nt = { class: "navbar-left" }, Pt = { class: "logo-container" }, Ft = [
803
- "src",
804
- "width",
805
- "height"
806
- ], It = [
807
- "src",
808
- "width",
809
- "height",
810
- "alt"
811
- ], Lt = { class: "brand-name" }, Rt = { class: "brand-title" }, zt = { class: "brand-subtitle" }, Bt = { class: "drawer-content" }, Vt = { class: "menu-grid" }, Ht = [
812
- "tabindex",
813
- "aria-disabled",
814
- "onClick",
815
- "onKeydown"
816
- ], Ut = {
817
- key: 0,
818
- class: "category-items"
819
- }, Wt = [
820
- "tabindex",
821
- "aria-disabled",
822
- "onClick",
823
- "onKeydown"
824
- ], Gt = { class: "item-title" }, Kt = {
825
- key: 0,
826
- class: "submenu-items"
827
- }, qt = { class: "submenu-title" }, Jt = [
828
- "tabindex",
829
- "aria-disabled",
830
- "onClick",
831
- "onKeydown"
832
- ], Yt = { class: "item-title" }, Xt = { class: "main-content-area" }, Zt = { class: "page-content" }, Qt = /* @__PURE__ */ Q(/* @__PURE__ */ d({
833
- name: "CardLayout",
834
- __name: "index",
835
- setup(c) {
836
- let l = Y(), { cachedViews: p, maxCacheCount: m } = Z(), h = q(), v = l.isDark, x = r(() => l.menus.value), O = r(() => l.showTagsView.value), A = r(() => l.tagsViewHeight.value), j = r(() => l.showFooter.value), F = r(() => l.transitionName.value), I = {
837
- ...X,
838
- ...l.brand
839
- }, L = S(!1), R = S(null), z = () => {
840
- R.value && clearTimeout(R.value), R.value = setTimeout(() => {
841
- L.value = !1;
842
- }, 300);
843
- }, B = () => {
844
- R.value &&= (clearTimeout(R.value), null), L.value = !0;
845
- }, U = (e) => {
846
- !e.disabled && e.path && (h.push(e.path), L.value = !1);
847
- }, ee = l.iconComponent ?? d({
848
- name: "LayoutIcon",
849
- props: {
850
- name: String,
851
- size: {
852
- type: Number,
853
- default: 18
854
- }
855
- },
856
- setup(e) {
857
- return () => f("i", {
858
- class: e.name,
859
- style: {
860
- fontSize: `${e.size}px`,
861
- display: "inline-flex",
862
- alignItems: "center",
863
- justifyContent: "center"
864
- }
865
- });
866
- }
867
- });
868
- return y(() => {
869
- R.value && clearTimeout(R.value);
870
- }), (r, c) => {
871
- let l = T("RouterView");
872
- return b(), o("div", Mt, [
873
- s("div", { class: g(["top-navbar", [k(v) ? "dark-theme" : "light-theme"]]) }, [s("div", Nt, [s("div", {
874
- class: "hover-trigger-area",
875
- onMouseenter: B,
876
- onMouseleave: z
877
- }, [w(r.$slots, "menu-trigger", {}, () => [c[0] ||= s("div", { class: "menu-indicator" }, [s("span", { class: "hamburger-icon" }, [
878
- s("span"),
879
- s("span"),
880
- s("span")
881
- ])], -1)], !0)], 32), w(r.$slots, "logo", {}, () => [
882
- s("div", Pt, [c[1] ||= s("div", { class: "logo-glow" }, null, -1), I.logoType === "video" && I.logoSrc ? (b(), o("video", {
883
- key: 0,
884
- src: I.logoSrc,
885
- width: I.logoSize || 36,
886
- height: I.logoSize || 36,
887
- autoplay: "",
888
- loop: "",
889
- muted: "",
890
- playsinline: "",
891
- class: "logo-video"
892
- }, " 您的浏览器不支持 video 标签。 ", 8, Ft)) : I.logoSrc ? (b(), o("img", {
893
- key: 1,
894
- src: I.logoSrc,
895
- width: I.logoSize || 36,
896
- height: I.logoSize || 36,
897
- class: "logo-video",
898
- alt: I.name || "Logo"
899
- }, null, 8, It)) : a("", !0)]),
900
- s("div", Lt, [s("span", Rt, D(I.name), 1), s("span", zt, D(I.subtitle), 1)]),
901
- c[2] ||= s("div", { class: "navbar-divider" }, null, -1)
902
- ], !0)]), w(r.$slots, "header-extra", {}, void 0, !0)], 2),
903
- O.value ? (b(), o("div", {
904
- key: 0,
905
- class: "tags-view-container",
906
- style: _({ height: `${A.value}px` })
907
- }, [w(r.$slots, "tags-view", {}, void 0, !0)], 4)) : a("", !0),
908
- s("div", {
909
- class: g(["drawer-menu", [k(v) ? "dark-theme" : "light-theme", { visible: L.value }]]),
910
- onMouseenter: B,
911
- onMouseleave: z
912
- }, [w(r.$slots, "drawer-menu", {}, () => [c[3] ||= s("div", { class: "drawer-header" }, [s("div", { class: "drawer-title" }, [s("span", { class: "grid-icon" }, [
913
- s("span"),
914
- s("span"),
915
- s("span"),
916
- s("span")
917
- ]), s("span", null, "功能导航")])], -1), s("div", Bt, [s("div", Vt, [(b(!0), o(e, null, C(x.value, (t) => (b(), o("div", {
918
- key: t.path,
919
- class: "menu-category"
920
- }, [s("div", {
921
- class: "category-header",
922
- role: "link",
923
- tabindex: t.disabled ? -1 : 0,
924
- "aria-disabled": t.disabled || void 0,
925
- onClick: (e) => U(t),
926
- onKeydown: [N((e) => U(t), ["enter"]), N(P((e) => U(t), ["prevent"]), ["space"])]
927
- }, [t.meta?.icon ? (b(), i(E(k(ee)), {
928
- key: 0,
929
- name: t.meta.icon,
930
- size: 18
931
- }, null, 8, ["name"])) : a("", !0), s("span", null, D(t.meta?.title), 1)], 40, Ht), t.children && t.children.length > 0 ? (b(), o("div", Ut, [(b(!0), o(e, null, C(t.children, (e) => (b(), o("div", {
932
- key: e.path,
933
- class: "menu-item",
934
- role: "link",
935
- tabindex: e.disabled ? -1 : 0,
936
- "aria-disabled": e.disabled || void 0,
937
- onClick: (t) => U(e),
938
- onKeydown: [N((t) => U(e), ["enter"]), N(P((t) => U(e), ["prevent"]), ["space"])]
939
- }, [e.meta?.icon ? (b(), i(E(k(ee)), {
940
- key: 0,
941
- name: e.meta.icon,
942
- size: 16
943
- }, null, 8, ["name"])) : a("", !0), s("span", Gt, D(e.meta?.title), 1)], 40, Wt))), 128)), (b(!0), o(e, null, C(t.children, (t) => (b(), o(e, { key: "sub-" + t.path }, [t.children && t.children.length > 0 ? (b(), o("div", Kt, [s("div", qt, D(t.meta?.title), 1), (b(!0), o(e, null, C(t.children, (e) => (b(), o("div", {
944
- key: e.path,
945
- class: "menu-item submenu-item",
946
- role: "link",
947
- tabindex: e.disabled ? -1 : 0,
948
- "aria-disabled": e.disabled || void 0,
949
- onClick: (t) => U(e),
950
- onKeydown: [N((t) => U(e), ["enter"]), N(P((t) => U(e), ["prevent"]), ["space"])]
951
- }, [e.meta?.icon ? (b(), i(E(k(ee)), {
952
- key: 0,
953
- name: e.meta.icon,
954
- size: 14
955
- }, null, 8, ["name"])) : a("", !0), s("span", Yt, D(e.meta?.title), 1)], 40, Jt))), 128))])) : a("", !0)], 64))), 128))])) : a("", !0)]))), 128))])])], !0)], 34),
956
- s("div", Xt, [u(k(V), { class: "content-layout" }, {
957
- default: M(() => [u(k(H), { class: "main-content p16px app-content" }, {
958
- default: M(() => [s("div", Zt, [u(l, null, {
959
- default: M(({ Component: e, route: r }) => [u(n, {
960
- name: F.value,
961
- mode: "out-in"
962
- }, {
963
- default: M(() => [(b(), i(t, {
964
- include: k(p),
965
- max: k(m)
966
- }, [(b(), i(E(e), { key: r.path }))], 1032, ["include", "max"]))]),
967
- _: 2
968
- }, 1032, ["name"])]),
969
- _: 1
970
- })])]),
971
- _: 1
972
- }), j.value ? w(r.$slots, "footer", {}, void 0, !0, 0) : a("", !0)]),
973
- _: 3
974
- })])
975
- ]);
976
- };
977
- }
978
- }), [["__scopeId", "data-v-c5ad8728"]]), $t = {
979
- key: 6,
980
- class: "layout-coming-soon"
981
- }, en = /* @__PURE__ */ d({
982
- name: "C_LayoutContainer",
983
- __name: "index",
984
- setup(e) {
985
- let t = Y(), n = t.layoutMode, a = t.isDark, l = S(!1), u = r({
986
- get: () => t.collapsed?.value ?? l.value,
987
- set: (e) => {
988
- t.collapsed ? t.collapsed.value = e : l.value = e;
989
- }
990
- }), d = {
991
- isCollapsed: u,
992
- handleCollapsedChange: (e) => {
993
- u.value = e;
994
- }
995
- };
996
- return x(le, d), x("menuCollapse", d), (e, t) => (b(), o("div", { class: g(["layout-container", k(a) ? "dark-mode" : "light-mode"]) }, [k(n) === "side" ? (b(), i(pe, {
997
- key: 0,
998
- collapsed: u.value,
999
- "onUpdate:collapsed": t[0] ||= (e) => u.value = e
1000
- }, c({
1001
- menu: M(() => [w(e.$slots, "menu", { collapsed: u.value })]),
1002
- header: M(() => [w(e.$slots, "header")]),
1003
- footer: M(() => [w(e.$slots, "footer")]),
1004
- _: 2
1005
- }, [e.$slots.logo ? {
1006
- name: "logo",
1007
- fn: M(() => [w(e.$slots, "logo")]),
1008
- key: "0"
1009
- } : void 0]), 1032, ["collapsed"])) : k(n) === "top" ? (b(), i(Oe, { key: 1 }, c({ _: 2 }, [
1010
- e.$slots.logo ? {
1011
- name: "logo",
1012
- fn: M(() => [w(e.$slots, "logo")]),
1013
- key: "0"
1014
- } : void 0,
1015
- e.$slots["top-menu"] ? {
1016
- name: "menu",
1017
- fn: M(() => [w(e.$slots, "top-menu")]),
1018
- key: "1"
1019
- } : void 0,
1020
- e.$slots["header-extra"] ? {
1021
- name: "header-extra",
1022
- fn: M(() => [w(e.$slots, "header-extra")]),
1023
- key: "2"
1024
- } : void 0,
1025
- e.$slots["tags-view"] ? {
1026
- name: "tags-view",
1027
- fn: M(() => [w(e.$slots, "tags-view")]),
1028
- key: "3"
1029
- } : void 0,
1030
- e.$slots.footer ? {
1031
- name: "footer",
1032
- fn: M(() => [w(e.$slots, "footer")]),
1033
- key: "4"
1034
- } : void 0
1035
- ]), 1024)) : k(n) === "mix" ? (b(), i(Ke, { key: 2 }, c({
1036
- header: M(() => [w(e.$slots, "header")]),
1037
- _: 2
1038
- }, [e.$slots.logo ? {
1039
- name: "logo",
1040
- fn: M(() => [w(e.$slots, "logo")]),
1041
- key: "0"
1042
- } : void 0, e.$slots.footer ? {
1043
- name: "footer",
1044
- fn: M(() => [w(e.$slots, "footer")]),
1045
- key: "1"
1046
- } : void 0]), 1024)) : k(n) === "mix-top" ? (b(), i(lt, { key: 3 }, c({ _: 2 }, [
1047
- e.$slots.logo ? {
1048
- name: "logo",
1049
- fn: M(() => [w(e.$slots, "logo")]),
1050
- key: "0"
1051
- } : void 0,
1052
- e.$slots.brand ? {
1053
- name: "brand",
1054
- fn: M(() => [w(e.$slots, "brand")]),
1055
- key: "1"
1056
- } : void 0,
1057
- e.$slots["top-menu"] ? {
1058
- name: "top-menu",
1059
- fn: M(() => [w(e.$slots, "top-menu")]),
1060
- key: "2"
1061
- } : void 0,
1062
- e.$slots["header-extra"] ? {
1063
- name: "header-extra",
1064
- fn: M(() => [w(e.$slots, "header-extra")]),
1065
- key: "3"
1066
- } : void 0,
1067
- e.$slots["tags-view"] ? {
1068
- name: "tags-view",
1069
- fn: M(() => [w(e.$slots, "tags-view")]),
1070
- key: "4"
1071
- } : void 0,
1072
- e.$slots.footer ? {
1073
- name: "footer",
1074
- fn: M(() => [w(e.$slots, "footer")]),
1075
- key: "5"
1076
- } : void 0
1077
- ]), 1024)) : k(n) === "reverse-horizontal-mix" ? (b(), i(jt, { key: 4 }, c({ _: 2 }, [
1078
- e.$slots.logo ? {
1079
- name: "logo",
1080
- fn: M(() => [w(e.$slots, "logo")]),
1081
- key: "0"
1082
- } : void 0,
1083
- e.$slots["top-menu"] ? {
1084
- name: "top-menu",
1085
- fn: M(() => [w(e.$slots, "top-menu")]),
1086
- key: "1"
1087
- } : void 0,
1088
- e.$slots["header-extra"] ? {
1089
- name: "header-extra",
1090
- fn: M(() => [w(e.$slots, "header-extra")]),
1091
- key: "2"
1092
- } : void 0,
1093
- e.$slots["tags-view"] ? {
1094
- name: "tags-view",
1095
- fn: M(() => [w(e.$slots, "tags-view")]),
1096
- key: "3"
1097
- } : void 0,
1098
- e.$slots.footer ? {
1099
- name: "footer",
1100
- fn: M(() => [w(e.$slots, "footer")]),
1101
- key: "4"
1102
- } : void 0
1103
- ]), 1024)) : k(n) === "card-layout" ? (b(), i(Qt, { key: 5 }, c({ _: 2 }, [
1104
- e.$slots["menu-trigger"] ? {
1105
- name: "menu-trigger",
1106
- fn: M(() => [w(e.$slots, "menu-trigger")]),
1107
- key: "0"
1108
- } : void 0,
1109
- e.$slots.logo ? {
1110
- name: "logo",
1111
- fn: M(() => [w(e.$slots, "logo")]),
1112
- key: "1"
1113
- } : void 0,
1114
- e.$slots["header-extra"] ? {
1115
- name: "header-extra",
1116
- fn: M(() => [w(e.$slots, "header-extra")]),
1117
- key: "2"
1118
- } : void 0,
1119
- e.$slots["tags-view"] ? {
1120
- name: "tags-view",
1121
- fn: M(() => [w(e.$slots, "tags-view")]),
1122
- key: "3"
1123
- } : void 0,
1124
- e.$slots["drawer-menu"] ? {
1125
- name: "drawer-menu",
1126
- fn: M(() => [w(e.$slots, "drawer-menu")]),
1127
- key: "4"
1128
- } : void 0,
1129
- e.$slots.footer ? {
1130
- name: "footer",
1131
- fn: M(() => [w(e.$slots, "footer")]),
1132
- key: "5"
1133
- } : void 0
1134
- ]), 1024)) : (b(), o("div", $t, [...t[1] ||= [s("div", { class: "coming-soon-content" }, [s("div", { class: "coming-soon-icon" }, "🚧"), s("div", { class: "coming-soon-title" }, "布局开发中")], -1)]]))], 2));
1135
- }
1136
- }), tn = [
1137
- {
1138
- name: "拂晓蓝",
1139
- value: "#409eff"
1140
- },
1141
- {
1142
- name: "薄暮红",
1143
- value: "#f5222d"
1144
- },
1145
- {
1146
- name: "火山橙",
1147
- value: "#fa541c"
1148
- },
1149
- {
1150
- name: "日暮黄",
1151
- value: "#faad14"
1152
- },
1153
- {
1154
- name: "极光绿",
1155
- value: "#52c41a"
1156
- },
1157
- {
1158
- name: "明青",
1159
- value: "#13c2c2"
1160
- },
1161
- {
1162
- name: "极客蓝",
1163
- value: "#2f54eb"
1164
- },
1165
- {
1166
- name: "酱紫",
1167
- value: "#722ed1"
1168
- }
1169
- ], nn = [
1170
- {
1171
- name: "科技蓝",
1172
- icon: "💙",
1173
- primaryColor: "#409eff"
1174
- },
1175
- {
1176
- name: "清新绿",
1177
- icon: "💚",
1178
- primaryColor: "#52c41a"
1179
- },
1180
- {
1181
- name: "商务灰",
1182
- icon: "🖤",
1183
- primaryColor: "#595959"
1184
- },
1185
- {
1186
- name: "活力橙",
1187
- icon: "🧡",
1188
- primaryColor: "#fa8c16"
1189
- },
1190
- {
1191
- name: "优雅紫",
1192
- icon: "💜",
1193
- primaryColor: "#722ed1"
1194
- },
1195
- {
1196
- name: "经典红",
1197
- icon: "❤️",
1198
- primaryColor: "#f5222d"
1199
- }
1200
- ], rn = [
1201
- {
1202
- mode: "side",
1203
- label: "左侧菜单",
1204
- description: "经典的左侧导航布局",
1205
- icon: "i-mdi:page-layout-sidebar-left"
1206
- },
1207
- {
1208
- mode: "top",
1209
- label: "顶部菜单",
1210
- description: "顶部水平导航布局",
1211
- icon: "i-mdi:page-layout-header"
1212
- },
1213
- {
1214
- mode: "mix",
1215
- label: "混合菜单",
1216
- description: "顶部 + 侧边混合布局",
1217
- icon: "i-mdi:view-dashboard-outline"
1218
- },
1219
- {
1220
- mode: "mix-top",
1221
- label: "顶部混合",
1222
- description: "侧边优先的混合布局",
1223
- icon: "i-mdi:view-dashboard-variant-outline"
1224
- },
1225
- {
1226
- mode: "reverse-horizontal-mix",
1227
- label: "反转混合",
1228
- description: "反转的水平混合布局",
1229
- icon: "i-mdi:page-layout-header-footer"
1230
- },
1231
- {
1232
- mode: "card-layout",
1233
- label: "卡片布局",
1234
- description: "卡片式布局风格",
1235
- icon: "i-mdi:card-outline"
1236
- }
1237
- ], an = {
1238
- small: "4px",
1239
- medium: "6px",
1240
- large: "8px"
1241
- }, on = {
1242
- fade: "fade-transform",
1243
- slide: "fade-slide",
1244
- zoom: "fade-zoom",
1245
- none: ""
1246
- }, $ = {
1247
- themeMode: "light",
1248
- primaryColor: "#409eff",
1249
- borderRadius: "medium",
1250
- transitionType: "slide",
1251
- enableTransition: !0,
1252
- layoutMode: "side",
1253
- menuExpandMode: "inline",
1254
- collapsed: !1,
1255
- fixedHeader: !0,
1256
- showBreadcrumb: !0,
1257
- showBreadcrumbIcon: !0,
1258
- showTagsView: !0,
1259
- tagsViewHeight: 44,
1260
- tagsViewStyle: "default",
1261
- showFooter: !0,
1262
- sidebarWidth: 220,
1263
- sidebarCollapsedWidth: 64,
1264
- headerHeight: 56,
1265
- enableHotkeys: !0,
1266
- version: "3.1.0"
1267
- }, sn = tn.map((e) => e.value), cn = {
1268
- themeMode: new Set([
1269
- "light",
1270
- "dark",
1271
- "system"
1272
- ]),
1273
- borderRadius: new Set([
1274
- "small",
1275
- "medium",
1276
- "large"
1277
- ]),
1278
- transitionType: new Set([
1279
- "fade",
1280
- "slide",
1281
- "zoom",
1282
- "none"
1283
- ]),
1284
- layoutMode: new Set([
1285
- "side",
1286
- "top",
1287
- "mix",
1288
- "mix-top",
1289
- "reverse-horizontal-mix",
1290
- "card-layout"
1291
- ]),
1292
- menuExpandMode: new Set(["inline", "panel"]),
1293
- tagsViewStyle: new Set([
1294
- "default",
1295
- "card",
1296
- "smart"
1297
- ])
1298
- }, ln = new Set([
1299
- "enableTransition",
1300
- "collapsed",
1301
- "fixedHeader",
1302
- "showBreadcrumb",
1303
- "showBreadcrumbIcon",
1304
- "showTagsView",
1305
- "showFooter",
1306
- "enableHotkeys"
1307
- ]), un = {
1308
- tagsViewHeight: [24, 100],
1309
- sidebarWidth: [120, 480],
1310
- sidebarCollapsedWidth: [32, 160],
1311
- headerHeight: [32, 160]
1312
- }, dn = 1;
1313
- function fn(e) {
1314
- if (!e || typeof e != "object" || Array.isArray(e)) throw TypeError("settings 必须是对象");
1315
- let t = e, n = {}, r = (e, t) => {
1316
- n[e] = t;
1317
- };
1318
- for (let [e, n] of Object.entries(cn)) {
1319
- let i = t[e];
1320
- if (i !== void 0) {
1321
- if (typeof i != "string" || !n.has(i)) throw RangeError(`无效的设置项 ${e}: ${String(i)}`);
1322
- r(e, i);
1323
- }
1324
- }
1325
- for (let e of ln) {
1326
- let n = t[e];
1327
- if (n !== void 0) {
1328
- if (typeof n != "boolean") throw TypeError(`设置项 ${e} 必须是布尔值`);
1329
- r(e, n);
1330
- }
1331
- }
1332
- for (let [e, n] of Object.entries(un)) {
1333
- let i = t[e];
1334
- if (i !== void 0) {
1335
- if (typeof i != "number" || !Number.isFinite(i) || i < n[0] || i > n[1]) throw RangeError(`设置项 ${e} 超出允许范围`);
1336
- r(e, i);
1337
- }
1338
- }
1339
- if (t.primaryColor !== void 0) {
1340
- if (typeof t.primaryColor != "string" || !/^#[0-9a-fA-F]{6}$/.test(t.primaryColor)) throw RangeError("primaryColor 必须是 #rrggbb 格式");
1341
- n.primaryColor = t.primaryColor;
1342
- }
1343
- if (t.version !== void 0) {
1344
- if (typeof t.version != "string" || t.version.length > 50) throw TypeError("version 必须是长度不超过 50 的字符串");
1345
- n.version = t.version;
1346
- }
1347
- return n;
1348
- }
1349
- function pn(e) {
1350
- if (!e || typeof e != "object" || Array.isArray(e)) throw TypeError("配置文件根节点必须是对象");
1351
- let t = e, n = {};
1352
- if (t.schemaVersion !== void 0) {
1353
- if (typeof t.schemaVersion != "number" || !Number.isInteger(t.schemaVersion) || t.schemaVersion < 1 || t.schemaVersion > 1) throw RangeError("不支持的配置格式版本");
1354
- n.schemaVersion = t.schemaVersion;
1355
- }
1356
- t.settings !== void 0 && (n.settings = fn(t.settings));
1357
- for (let e of ["gray", "colorWeak"]) {
1358
- let r = t[e];
1359
- if (r !== void 0) {
1360
- if (typeof r != "boolean") throw TypeError(`${e} 必须是布尔值`);
1361
- n[e] = r;
1362
- }
1363
- }
1364
- if (t.watermark !== void 0) {
1365
- if (!t.watermark || typeof t.watermark != "object" || Array.isArray(t.watermark)) throw TypeError("watermark 必须是对象");
1366
- let e = t.watermark;
1367
- if (typeof e.enabled != "boolean" || typeof e.text != "string" || e.text.length > 200) throw TypeError("watermark 配置无效");
1368
- n.watermark = {
1369
- enabled: e.enabled,
1370
- text: e.text
1371
- };
1372
- }
1373
- return n;
1374
- }
1375
- function mn(e, t) {
1376
- if (typeof e != "string") return "#000000";
1377
- if (!Number.isFinite(t)) return e;
1378
- let n = Math.round(t), r = e.trim(), i = r.startsWith("#") ? r.slice(1) : r;
1379
- if (i.length === 3 && (i = i.split("").map((e) => e + e).join("")), !/^[0-9a-fA-F]{6}$/.test(i)) return e;
1380
- let a = parseInt(i, 16), o = Math.min(255, Math.max(0, (a >> 16) + n)), s = Math.min(255, Math.max(0, (a >> 8 & 255) + n)), c = Math.min(255, Math.max(0, (a & 255) + n));
1381
- return `#${(o << 16 | s << 8 | c).toString(16).padStart(6, "0")}`;
1382
- }
1383
- //#endregion
1384
- //#region src/stores/settings.ts
1385
- function hn(e = {}) {
1386
- let { id: t = "settings", defaults: n = {}, onThemeModeChange: i } = e;
1387
- if (typeof t != "string" || !t.trim()) throw RangeError("Settings store id 不能为空");
1388
- let a = {
1389
- ...$,
1390
- ...fn(n)
1391
- };
1392
- return se(t, () => {
1393
- let e = S(a.themeMode), t = S(a.primaryColor), n = S(a.borderRadius), o = S(a.transitionType), s = S(a.enableTransition), c = S(a.layoutMode), l = S(a.menuExpandMode), u = S(a.collapsed), d = S(a.fixedHeader), f = S(a.showBreadcrumb), p = S(a.showBreadcrumbIcon), m = S(a.showTagsView), h = S(a.tagsViewHeight), g = S(a.tagsViewStyle), _ = S(a.showFooter), v = S(a.sidebarWidth), y = S(a.sidebarCollapsedWidth), b = S(a.headerHeight), x = S(a.enableHotkeys), C = S(a.version), w = r(() => an[n.value]), T = r(() => s.value && o.value !== "none"), E = r(() => T.value ? on[o.value] : ""), D = r(() => ({
1394
- themeMode: e.value,
1395
- primaryColor: t.value,
1396
- borderRadius: n.value,
1397
- transitionType: o.value,
1398
- enableTransition: s.value,
1399
- layoutMode: c.value,
1400
- menuExpandMode: l.value,
1401
- collapsed: u.value,
1402
- fixedHeader: d.value,
1403
- showBreadcrumb: f.value,
1404
- showBreadcrumbIcon: p.value,
1405
- showTagsView: m.value,
1406
- tagsViewHeight: h.value,
1407
- tagsViewStyle: g.value,
1408
- showFooter: _.value,
1409
- sidebarWidth: v.value,
1410
- sidebarCollapsedWidth: y.value,
1411
- headerHeight: b.value,
1412
- enableHotkeys: x.value,
1413
- version: C.value
1414
- })), O = () => {
1415
- if (typeof document > "u") return;
1416
- let e = document.documentElement;
1417
- e.style.setProperty("--primary-color", t.value), e.style.setProperty("--primary-color-hover", mn(t.value, 10)), e.style.setProperty("--primary-color-pressed", mn(t.value, -10)), e.style.setProperty("--border-radius", w.value), e.style.setProperty("--sidebar-width", `${v.value}px`), e.style.setProperty("--sidebar-collapsed-width", `${y.value}px`), e.style.setProperty("--header-height", `${b.value}px`), e.style.setProperty("--tags-view-height", `${h.value}px`);
1418
- };
1419
- return j([
1420
- t,
1421
- w,
1422
- v,
1423
- y,
1424
- b,
1425
- h
1426
- ], () => {
1427
- O();
1428
- }, { immediate: !0 }), {
1429
- themeMode: e,
1430
- primaryColor: t,
1431
- borderRadius: n,
1432
- transitionType: o,
1433
- enableTransition: s,
1434
- layoutMode: c,
1435
- menuExpandMode: l,
1436
- collapsed: u,
1437
- fixedHeader: d,
1438
- showBreadcrumb: f,
1439
- showBreadcrumbIcon: p,
1440
- showTagsView: m,
1441
- tagsViewHeight: h,
1442
- tagsViewStyle: g,
1443
- showFooter: _,
1444
- sidebarWidth: v,
1445
- sidebarCollapsedWidth: y,
1446
- headerHeight: b,
1447
- enableHotkeys: x,
1448
- version: C,
1449
- borderRadiusValue: w,
1450
- transitionName: E,
1451
- shouldEnableTransition: T,
1452
- settingsState: D,
1453
- syncCSSVariables: O,
1454
- applyPreset: async (e) => {
1455
- t.value = e.primaryColor, e.settings && (e.settings.borderRadius && (n.value = e.settings.borderRadius), e.settings.transitionType && (o.value = e.settings.transitionType), e.settings.showBreadcrumb !== void 0 && (f.value = e.settings.showBreadcrumb), e.settings.showTagsView !== void 0 && (m.value = e.settings.showTagsView), e.settings.tagsViewStyle && (g.value = e.settings.tagsViewStyle));
1456
- },
1457
- resetSettings: () => {
1458
- e.value = a.themeMode, t.value = a.primaryColor, n.value = a.borderRadius, o.value = a.transitionType, s.value = a.enableTransition, c.value = a.layoutMode, l.value = a.menuExpandMode, u.value = a.collapsed, d.value = a.fixedHeader, f.value = a.showBreadcrumb, p.value = a.showBreadcrumbIcon, m.value = a.showTagsView, h.value = a.tagsViewHeight, g.value = a.tagsViewStyle, _.value = a.showFooter, v.value = a.sidebarWidth, y.value = a.sidebarCollapsedWidth, b.value = a.headerHeight, x.value = a.enableHotkeys, C.value = a.version;
1459
- },
1460
- updateThemeMode: async (t) => {
1461
- fn({ themeMode: t });
1462
- let n = e.value;
1463
- e.value = t;
1464
- try {
1465
- i && await i(t);
1466
- } catch (t) {
1467
- throw e.value = n, t;
1468
- }
1469
- },
1470
- toggleCollapse: () => {
1471
- u.value = !u.value;
1472
- }
1473
- };
1474
- });
1475
- }
1476
- var gn = hn(), _n = [
1477
- {
1478
- label: "左侧菜单(默认)",
1479
- value: "side",
1480
- disabled: !1,
1481
- svg: "\n <rect x=\"0\" y=\"0\" width=\"16\" height=\"48\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.9\"/>\n <rect x=\"18\" y=\"0\" width=\"38\" height=\"10\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.7\"/>\n <rect x=\"18\" y=\"12\" width=\"38\" height=\"34\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.4\"/>\n "
1482
- },
1483
- {
1484
- label: "顶部菜单(清爽)",
1485
- value: "top",
1486
- disabled: !1,
1487
- svg: "\n <rect x=\"0\" y=\"0\" width=\"56\" height=\"10\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.9\"/>\n <rect x=\"0\" y=\"12\" width=\"56\" height=\"8\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.7\"/>\n <rect x=\"0\" y=\"22\" width=\"56\" height=\"24\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.4\"/>\n "
1488
- },
1489
- {
1490
- label: "左侧混合(灵巧)",
1491
- value: "mix",
1492
- disabled: !1,
1493
- svg: "\n <rect x=\"0\" y=\"0\" width=\"8\" height=\"48\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.9\"/>\n <rect x=\"10\" y=\"0\" width=\"14\" height=\"48\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.7\"/>\n <rect x=\"26\" y=\"0\" width=\"30\" height=\"10\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.6\"/>\n <rect x=\"26\" y=\"12\" width=\"30\" height=\"34\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.4\"/>\n "
1494
- },
1495
- {
1496
- label: "顶部混合(侧优)",
1497
- value: "mix-top",
1498
- disabled: !1,
1499
- svg: "\n <rect x=\"0\" y=\"0\" width=\"8\" height=\"48\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.9\"/>\n <rect x=\"10\" y=\"0\" width=\"46\" height=\"10\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.7\"/>\n <rect x=\"10\" y=\"12\" width=\"46\" height=\"34\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.4\"/>\n "
1500
- },
1501
- {
1502
- label: "反转混合(另类)",
1503
- value: "reverse-horizontal-mix",
1504
- disabled: !1,
1505
- svg: "\n <rect x=\"0\" y=\"0\" width=\"56\" height=\"10\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.9\"/>\n <rect x=\"44\" y=\"12\" width=\"12\" height=\"34\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.7\"/>\n <rect x=\"0\" y=\"12\" width=\"42\" height=\"34\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.4\"/>\n "
1506
- },
1507
- {
1508
- label: "卡片网格(新颖)",
1509
- value: "card-layout",
1510
- disabled: !1,
1511
- svg: "\n <rect x=\"0\" y=\"0\" width=\"24\" height=\"20\" rx=\"2\" fill=\"currentColor\" fill-opacity=\"0.9\"/>\n <rect x=\"32\" y=\"0\" width=\"24\" height=\"20\" rx=\"2\" fill=\"currentColor\" fill-opacity=\"0.7\"/>\n <rect x=\"0\" y=\"24\" width=\"24\" height=\"20\" rx=\"2\" fill=\"currentColor\" fill-opacity=\"0.6\"/>\n <rect x=\"32\" y=\"24\" width=\"24\" height=\"20\" rx=\"2\" fill=\"currentColor\" fill-opacity=\"0.4\"/>\n "
1512
- }
1513
- ], vn = { class: "settings-section" }, yn = { class: "preset-grid" }, bn = [
1514
- "aria-pressed",
1515
- "onClick",
1516
- "onKeydown"
1517
- ], xn = { class: "preset-icon" }, Sn = { class: "preset-name" }, Cn = { class: "preset-color" }, wn = { class: "settings-section" }, Tn = { class: "settings-section" }, En = { class: "color-picker-wrapper" }, Dn = { class: "color-value" }, On = { class: "settings-section" }, kn = { class: "settings-section" }, An = { class: "flex items-center justify-between mb-2" }, jn = { class: "settings-section" }, Mn = { class: "settings-section" }, Nn = { class: "layout-grid" }, Pn = [
1518
- "tabindex",
1519
- "aria-disabled",
1520
- "aria-pressed",
1521
- "onClick",
1522
- "onKeydown"
1523
- ], Fn = { class: "layout-screenshot" }, In = {
1524
- class: "layout-svg",
1525
- viewBox: "0 0 56 48",
1526
- fill: "none",
1527
- xmlns: "http://www.w3.org/2000/svg"
1528
- }, Ln = ["innerHTML"], Rn = { class: "layout-label" }, zn = {
1529
- key: 0,
1530
- class: "badge-soon"
1531
- }, Bn = {
1532
- class: "settings-section menu-expand-section",
1533
- "data-menu-expand-mode": "built-in"
1534
- }, Vn = { class: "settings-section" }, Hn = { class: "setting-item" }, Un = { class: "setting-item" }, Wn = { class: "setting-item" }, Gn = { class: "setting-item" }, Kn = { class: "settings-section" }, qn = { class: "slider-item" }, Jn = { class: "slider-label" }, Yn = { class: "slider-value" }, Xn = { class: "slider-item" }, Zn = { class: "slider-label" }, Qn = { class: "slider-value" }, $n = { class: "settings-section" }, er = { class: "settings-section" }, tr = { class: "action-buttons-grid" }, nr = { class: "settings-section" }, rr = { class: "action-buttons-grid" }, ir = { class: "settings-section" }, ar = { class: "setting-item" }, or = { class: "setting-item" }, sr = { class: "settings-section" }, cr = { class: "setting-item" }, lr = {
1535
- key: 0,
1536
- class: "mt-2"
1537
- }, ur = { class: "settings-section" }, dr = { class: "system-info" }, fr = { class: "info-item" }, pr = { class: "info-value" }, mr = { class: "info-item" }, hr = { class: "info-value" }, gr = { class: "info-item" }, _r = { class: "info-value" }, vr = { class: "info-item" }, yr = { class: "info-value" }, br = { class: "info-item" }, xr = { class: "info-value" }, Sr = { class: "info-item" }, Cr = { class: "info-value" }, wr = /* @__PURE__ */ Q(/* @__PURE__ */ d({
1538
- __name: "index",
1539
- props: /* @__PURE__ */ m({
1540
- width: { default: 380 },
1541
- store: {},
1542
- actions: {},
1543
- maxImportBytes: { default: 1024 * 1024 }
1544
- }, {
1545
- show: {
1546
- type: Boolean,
1547
- default: !1
1548
- },
1549
- showModifiers: {}
1550
- }),
1551
- emits: ["update:show"],
1552
- setup(t) {
1553
- let n = t, c = oe(), d = ae(), f = p(ce, null), m = n.store ?? f ?? gn(), h = A(t, "show"), v = S("appearance"), x = typeof document < "u" && document.documentElement.classList.contains("gray-mode"), T = typeof document < "u" && document.documentElement.classList.contains("color-weak-mode"), E = S(x), O = S(T), z = S(!1), V = S("Robot Admin"), H = null, U = (e) => {
1554
- if (typeof document > "u") return;
1555
- H &&= (H.remove(), null);
1556
- let t = document.createElement("canvas"), n = t.getContext("2d");
1557
- if (!n) {
1558
- c.error("当前浏览器无法创建水印画布");
1559
- return;
1560
- }
1561
- t.width = 200, t.height = 150, n.font = "14px Microsoft JhengHei", n.fillStyle = "rgba(120, 120, 120, 0.15)", n.rotate(-20 * Math.PI / 180), n.fillText(e, 0, 80), H = document.createElement("div"), H.dataset.robotAdminLayoutWatermark = "true", H.style.cssText = `
1562
- position: fixed;
1563
- top: 0;
1564
- left: 0;
1565
- width: 100%;
1566
- height: 100%;
1567
- pointer-events: none;
1568
- background-image: url(${t.toDataURL()});
1569
- background-repeat: repeat;
1570
- z-index: 9999;
1571
- user-select: none;
1572
- `, document.body.appendChild(H);
1573
- }, ee = () => {
1574
- H &&= (H.remove(), null);
1575
- };
1576
- j(E, (e) => {
1577
- typeof document < "u" && document.documentElement.classList.toggle("gray-mode", e);
1578
- }), j(O, (e) => {
1579
- typeof document < "u" && document.documentElement.classList.toggle("color-weak-mode", e);
1580
- }), j(z, (e) => {
1581
- e ? U(V.value) : ee();
1582
- }), j(V, (e) => {
1583
- z.value && U(e);
1584
- });
1585
- let K = r(() => {
1586
- if (typeof navigator > "u" || typeof window > "u") return {
1587
- browser: "Unknown",
1588
- os: "Unknown",
1589
- resolution: "Unknown",
1590
- pixelRatio: "Unknown",
1591
- language: "Unknown",
1592
- timezone: "Unknown"
1593
- };
1594
- let e = navigator.userAgent, t = "Unknown", n = "Unknown";
1595
- return e.includes("Edg/") ? t = "Edge" : e.includes("Firefox") ? t = "Firefox" : e.includes("Chrome") ? t = "Chrome" : e.includes("Safari") && (t = "Safari"), e.includes("Windows") ? n = "Windows" : e.includes("Mac") ? n = "macOS" : e.includes("Android") ? n = "Android" : e.includes("iOS") ? n = "iOS" : e.includes("Linux") && (n = "Linux"), {
1596
- browser: t,
1597
- os: n,
1598
- resolution: `${window.screen.width} × ${window.screen.height}`,
1599
- pixelRatio: window.devicePixelRatio + "x",
1600
- language: navigator.language,
1601
- timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
1602
- };
1603
- });
1604
- y(() => {
1605
- ee(), typeof document < "u" && (document.documentElement.classList.toggle("gray-mode", x), document.documentElement.classList.toggle("color-weak-mode", T));
1606
- });
1607
- let q = (e, t) => {
1608
- t || (m.layoutMode = e);
1609
- }, se = (e) => m.primaryColor === e.primaryColor, J = (e) => {
1610
- m.applyPreset(e), c.success(`已应用「${e.name}」主题方案`);
1611
- }, le = async (e) => {
1612
- try {
1613
- await m.updateThemeMode(e);
1614
- } catch {
1615
- c.error("主题模式切换失败");
1616
- }
1617
- }, ue = async () => {
1618
- try {
1619
- await m.updateThemeMode($.themeMode), m.primaryColor = $.primaryColor, m.borderRadius = $.borderRadius, m.transitionType = $.transitionType, m.enableTransition = $.enableTransition, c.success("已恢复外观默认设置");
1620
- } catch {
1621
- c.error("恢复外观默认设置失败");
1622
- }
1623
- }, Y = () => {
1624
- m.layoutMode = $.layoutMode, m.menuExpandMode = $.menuExpandMode, m.fixedHeader = $.fixedHeader, m.showBreadcrumb = $.showBreadcrumb, m.showBreadcrumbIcon = $.showBreadcrumbIcon, m.showTagsView = $.showTagsView, m.tagsViewHeight = $.tagsViewHeight, m.tagsViewStyle = $.tagsViewStyle, m.showFooter = $.showFooter, m.sidebarWidth = $.sidebarWidth, m.sidebarCollapsedWidth = $.sidebarCollapsedWidth, m.headerHeight = $.headerHeight, c.success("已恢复布局默认设置");
1625
- }, de = () => {
1626
- d.warning({
1627
- title: "确认重置",
1628
- content: "确定要恢复默认配置吗?此操作不可撤销。",
1629
- positiveText: "确认",
1630
- negativeText: "取消",
1631
- onPositiveClick: async () => {
1632
- let e = { ...m.settingsState };
1633
- try {
1634
- m.resetSettings(), await m.updateThemeMode(m.themeMode), c.success("已恢复默认配置");
1635
- } catch {
1636
- m.$patch(e), c.error("恢复默认配置失败");
1637
- }
1638
- }
1639
- });
1640
- }, X = () => {
1641
- d.warning({
1642
- title: "确认清除",
1643
- content: "确定要清除浏览器缓存吗?",
1644
- positiveText: "确认",
1645
- negativeText: "取消",
1646
- onPositiveClick: async () => {
1647
- if (!n.actions?.clearCache) {
1648
- c.warning("宿主应用未配置可安全清理的缓存");
1649
- return;
1650
- }
1651
- try {
1652
- await n.actions.clearCache(), c.success("缓存已清除");
1653
- } catch {
1654
- c.error("缓存清除失败");
1655
- }
1656
- }
1657
- });
1658
- }, fe = () => {
1659
- n.actions?.reloadPage ? n.actions.reloadPage() : typeof window < "u" && window.location.reload();
1660
- }, Z = () => {
1661
- let e = {
1662
- schemaVersion: 1,
1663
- settings: m.settingsState,
1664
- gray: E.value,
1665
- colorWeak: O.value,
1666
- watermark: {
1667
- enabled: z.value,
1668
- text: V.value
1669
- },
1670
- exportTime: (/* @__PURE__ */ new Date()).toISOString()
1671
- }, t = new Blob([JSON.stringify(e, null, 2)], { type: "application/json" }), n = URL.createObjectURL(t), r = document.createElement("a");
1672
- r.href = n, r.download = `robot-admin-config-${Date.now()}.json`, r.click(), URL.revokeObjectURL(n), c.success("配置已导出");
1673
- }, pe = () => {
1674
- if (typeof document > "u") return;
1675
- let e = document.createElement("input");
1676
- e.type = "file", e.accept = "application/json", e.onchange = async (e) => {
1677
- let t = e.target.files?.[0];
1678
- if (t) try {
1679
- if (t.size > n.maxImportBytes) throw RangeError("配置文件过大");
1680
- let e = await t.text(), r = pn(JSON.parse(e));
1681
- if (r.settings !== void 0) {
1682
- let { themeMode: e, ...t } = r.settings;
1683
- e !== void 0 && await m.updateThemeMode(e), m.$patch(t);
1684
- }
1685
- r.gray !== void 0 && (E.value = r.gray), r.colorWeak !== void 0 && (O.value = r.colorWeak), r.watermark !== void 0 && (z.value = r.watermark.enabled, V.value = r.watermark.text), c.success("配置已导入");
1686
- } catch {
1687
- c.error("配置文件格式错误");
1688
- }
1689
- }, e.click();
1690
- };
1691
- return (n, r) => (b(), i(k(L), {
1692
- show: h.value,
1693
- "onUpdate:show": r[16] ||= (e) => h.value = e,
1694
- width: t.width,
1695
- placement: "right",
1696
- "trap-focus": !0,
1697
- "block-scroll": !0
1698
- }, {
1699
- default: M(() => [u(k(R), {
1700
- title: "⚙️ 布局配置",
1701
- closable: ""
1702
- }, {
1703
- default: M(() => [u(k(ie), {
1704
- value: v.value,
1705
- "onUpdate:value": r[15] ||= (e) => v.value = e,
1706
- animated: "",
1707
- class: "settings-tabs"
1708
- }, {
1709
- default: M(() => [
1710
- u(k(re), {
1711
- name: "appearance",
1712
- tab: "🎨 外观"
1713
- }, {
1714
- default: M(() => [
1715
- w(n.$slots, "appearance-prepend", { settings: k(m) }, void 0, !0),
1716
- s("div", vn, [s("div", yn, [(b(!0), o(e, null, C(k(nn), (e) => (b(), o("div", {
1717
- key: e.name,
1718
- class: g(["preset-card", { active: se(e) }]),
1719
- role: "button",
1720
- tabindex: "0",
1721
- "aria-pressed": se(e),
1722
- onClick: (t) => J(e),
1723
- onKeydown: [N((t) => J(e), ["enter"]), N(P((t) => J(e), ["prevent"]), ["space"])]
1724
- }, [
1725
- s("div", xn, D(e.icon), 1),
1726
- s("div", Sn, D(e.name), 1),
1727
- s("div", Cn, [s("span", {
1728
- class: "color-dot",
1729
- style: _({ backgroundColor: e.primaryColor })
1730
- }, null, 4)])
1731
- ], 42, bn))), 128))])]),
1732
- s("div", wn, [r[20] ||= s("div", { class: "section-title" }, "主题模式", -1), u(k(te), {
1733
- value: k(m).themeMode,
1734
- class: "mode-group",
1735
- "onUpdate:value": le
1736
- }, {
1737
- default: M(() => [
1738
- u(k(W), { value: "light" }, {
1739
- default: M(() => [...r[17] ||= [s("span", { class: "i-mdi:white-balance-sunny mr-1" }, null, -1), l(" 浅色 ", -1)]]),
1740
- _: 1
1741
- }),
1742
- u(k(W), { value: "dark" }, {
1743
- default: M(() => [...r[18] ||= [s("span", { class: "i-mdi:moon-waning-crescent mr-1" }, null, -1), l(" 深色 ", -1)]]),
1744
- _: 1
1745
- }),
1746
- u(k(W), { value: "system" }, {
1747
- default: M(() => [...r[19] ||= [s("span", { class: "i-mdi:theme-light-dark mr-1" }, null, -1), l(" 自动 ", -1)]]),
1748
- _: 1
1749
- })
1750
- ]),
1751
- _: 1
1752
- }, 8, ["value"])]),
1753
- s("div", Tn, [r[21] ||= s("div", { class: "section-title" }, "主题色", -1), s("div", En, [u(k(I), {
1754
- value: k(m).primaryColor,
1755
- "onUpdate:value": r[0] ||= (e) => k(m).primaryColor = e,
1756
- "show-alpha": !1,
1757
- swatches: k(sn),
1758
- actions: ["confirm"]
1759
- }, null, 8, ["value", "swatches"]), s("span", Dn, D(k(m).primaryColor), 1)])]),
1760
- s("div", On, [r[25] ||= s("div", { class: "section-title" }, "圆角大小", -1), u(k(te), {
1761
- value: k(m).borderRadius,
1762
- "onUpdate:value": r[1] ||= (e) => k(m).borderRadius = e,
1763
- class: "radius-group"
1764
- }, {
1765
- default: M(() => [
1766
- u(k(W), { value: "small" }, {
1767
- default: M(() => [...r[22] ||= [l("小 (4px)", -1)]]),
1768
- _: 1
1769
- }),
1770
- u(k(W), { value: "medium" }, {
1771
- default: M(() => [...r[23] ||= [l("中 (6px)", -1)]]),
1772
- _: 1
1773
- }),
1774
- u(k(W), { value: "large" }, {
1775
- default: M(() => [...r[24] ||= [l("大 (8px)", -1)]]),
1776
- _: 1
1777
- })
1778
- ]),
1779
- _: 1
1780
- }, 8, ["value"])]),
1781
- s("div", kn, [
1782
- r[31] ||= s("div", { class: "section-title" }, "页面动画", -1),
1783
- s("div", An, [r[26] ||= s("span", { class: "text-sm" }, "启用动画", -1), u(k(G), {
1784
- value: k(m).enableTransition,
1785
- "onUpdate:value": r[2] ||= (e) => k(m).enableTransition = e
1786
- }, null, 8, ["value"])]),
1787
- u(k(te), {
1788
- value: k(m).transitionType,
1789
- "onUpdate:value": r[3] ||= (e) => k(m).transitionType = e,
1790
- disabled: !k(m).enableTransition,
1791
- class: "transition-group"
1792
- }, {
1793
- default: M(() => [
1794
- u(k(W), { value: "fade" }, {
1795
- default: M(() => [...r[27] ||= [l("淡入", -1)]]),
1796
- _: 1
1797
- }),
1798
- u(k(W), { value: "slide" }, {
1799
- default: M(() => [...r[28] ||= [l("滑动", -1)]]),
1800
- _: 1
1801
- }),
1802
- u(k(W), { value: "zoom" }, {
1803
- default: M(() => [...r[29] ||= [l("缩放", -1)]]),
1804
- _: 1
1805
- }),
1806
- u(k(W), { value: "none" }, {
1807
- default: M(() => [...r[30] ||= [l("无", -1)]]),
1808
- _: 1
1809
- })
1810
- ]),
1811
- _: 1
1812
- }, 8, ["value", "disabled"])
1813
- ]),
1814
- s("div", jn, [u(k(F), {
1815
- block: "",
1816
- secondary: "",
1817
- onClick: ue
1818
- }, {
1819
- icon: M(() => [...r[32] ||= [s("span", { class: "i-mdi:restore" }, null, -1)]]),
1820
- default: M(() => [r[33] ||= l(" 恢复外观默认设置 ", -1)]),
1821
- _: 1
1822
- })]),
1823
- w(n.$slots, "appearance-append", { settings: k(m) }, void 0, !0)
1824
- ]),
1825
- _: 3
1826
- }),
1827
- u(k(re), {
1828
- name: "layout",
1829
- tab: "📐 布局"
1830
- }, {
1831
- default: M(() => [
1832
- w(n.$slots, "layout-prepend", { settings: k(m) }, void 0, !0),
1833
- s("div", Mn, [r[34] ||= s("div", { class: "section-title" }, "布局模式", -1), s("div", Nn, [(b(!0), o(e, null, C(k(_n), (e) => (b(), o("div", {
1834
- key: e.value,
1835
- class: g(["layout-item", {
1836
- active: k(m).layoutMode === e.value,
1837
- disabled: e.disabled
1838
- }]),
1839
- role: "button",
1840
- tabindex: e.disabled ? -1 : 0,
1841
- "aria-disabled": e.disabled,
1842
- "aria-pressed": k(m).layoutMode === e.value,
1843
- onClick: P((t) => q(e.value, e.disabled), ["stop"]),
1844
- onKeydown: [N(P((t) => q(e.value, e.disabled), ["stop"]), ["enter"]), N(P((t) => q(e.value, e.disabled), ["stop", "prevent"]), ["space"])]
1845
- }, [s("div", Fn, [(b(), o("svg", In, [s("g", { innerHTML: e.svg }, null, 8, Ln)]))]), s("div", Rn, [l(D(e.label) + " ", 1), e.disabled ? (b(), o("span", zn, "敬请期待")) : a("", !0)])], 42, Pn))), 128))])]),
1846
- w(n.$slots, "layout-after-mode", { settings: k(m) }, void 0, !0),
1847
- s("div", Bn, [r[37] ||= s("div", { class: "section-title" }, "菜单展开方式", -1), u(k(te), {
1848
- value: k(m).menuExpandMode,
1849
- "onUpdate:value": r[4] ||= (e) => k(m).menuExpandMode = e,
1850
- class: "menu-expand-group"
1851
- }, {
1852
- default: M(() => [u(k(W), { value: "inline" }, {
1853
- default: M(() => [...r[35] ||= [l("传统展开", -1)]]),
1854
- _: 1
1855
- }), u(k(W), { value: "panel" }, {
1856
- default: M(() => [...r[36] ||= [l("右侧面板", -1)]]),
1857
- _: 1
1858
- })]),
1859
- _: 1
1860
- }, 8, ["value"])]),
1861
- s("div", Vn, [
1862
- r[42] ||= s("div", { class: "section-title" }, "界面元素", -1),
1863
- s("div", Hn, [r[38] ||= s("span", null, "显示面包屑", -1), u(k(G), {
1864
- value: k(m).showBreadcrumb,
1865
- "onUpdate:value": r[5] ||= (e) => k(m).showBreadcrumb = e
1866
- }, null, 8, ["value"])]),
1867
- s("div", Un, [r[39] ||= s("span", null, "显示面包屑图标", -1), u(k(G), {
1868
- value: k(m).showBreadcrumbIcon,
1869
- "onUpdate:value": r[6] ||= (e) => k(m).showBreadcrumbIcon = e,
1870
- disabled: !k(m).showBreadcrumb
1871
- }, null, 8, ["value", "disabled"])]),
1872
- s("div", Wn, [r[40] ||= s("span", null, "显示标签页", -1), u(k(G), {
1873
- value: k(m).showTagsView,
1874
- "onUpdate:value": r[7] ||= (e) => k(m).showTagsView = e
1875
- }, null, 8, ["value"])]),
1876
- s("div", Gn, [r[41] ||= s("span", null, "显示页脚", -1), u(k(G), {
1877
- value: k(m).showFooter,
1878
- "onUpdate:value": r[8] ||= (e) => k(m).showFooter = e
1879
- }, null, 8, ["value"])])
1880
- ]),
1881
- s("div", Kn, [
1882
- r[45] ||= s("div", { class: "section-title" }, "尺寸调整", -1),
1883
- s("div", qn, [s("div", Jn, [r[43] ||= s("span", null, "侧边栏宽度", -1), s("span", Yn, D(k(m).sidebarWidth) + "px", 1)]), u(k(ne), {
1884
- value: k(m).sidebarWidth,
1885
- "onUpdate:value": r[9] ||= (e) => k(m).sidebarWidth = e,
1886
- min: 180,
1887
- max: 280,
1888
- step: 10,
1889
- marks: {
1890
- 180: "180",
1891
- 220: "220",
1892
- 280: "280"
1893
- }
1894
- }, null, 8, ["value"])]),
1895
- s("div", Xn, [s("div", Zn, [r[44] ||= s("span", null, "头部高度", -1), s("span", Qn, D(k(m).headerHeight) + "px", 1)]), u(k(ne), {
1896
- value: k(m).headerHeight,
1897
- "onUpdate:value": r[10] ||= (e) => k(m).headerHeight = e,
1898
- min: 48,
1899
- max: 64,
1900
- step: 4,
1901
- marks: {
1902
- 48: "48",
1903
- 56: "56",
1904
- 64: "64"
1905
- }
1906
- }, null, 8, ["value"])])
1907
- ]),
1908
- s("div", $n, [u(k(F), {
1909
- block: "",
1910
- secondary: "",
1911
- onClick: Y
1912
- }, {
1913
- icon: M(() => [...r[46] ||= [s("span", { class: "i-mdi:restore" }, null, -1)]]),
1914
- default: M(() => [r[47] ||= l(" 恢复布局默认设置 ", -1)]),
1915
- _: 1
1916
- })]),
1917
- w(n.$slots, "layout-append", { settings: k(m) }, void 0, !0)
1918
- ]),
1919
- _: 3
1920
- }),
1921
- u(k(re), {
1922
- name: "features",
1923
- tab: "🔧 功能"
1924
- }, {
1925
- default: M(() => [
1926
- w(n.$slots, "features-prepend", { settings: k(m) }, void 0, !0),
1927
- s("div", er, [r[52] ||= s("div", { class: "section-title" }, "缓存管理", -1), s("div", tr, [u(k(F), {
1928
- secondary: "",
1929
- onClick: X
1930
- }, {
1931
- icon: M(() => [...r[48] ||= [s("span", { class: "i-mdi:delete-sweep" }, null, -1)]]),
1932
- default: M(() => [r[49] ||= l(" 清除缓存 ", -1)]),
1933
- _: 1
1934
- }), u(k(F), {
1935
- secondary: "",
1936
- onClick: fe
1937
- }, {
1938
- icon: M(() => [...r[50] ||= [s("span", { class: "i-mdi:refresh" }, null, -1)]]),
1939
- default: M(() => [r[51] ||= l(" 重新加载 ", -1)]),
1940
- _: 1
1941
- })])]),
1942
- s("div", nr, [
1943
- r[59] ||= s("div", { class: "section-title" }, "配置管理", -1),
1944
- s("div", rr, [u(k(F), {
1945
- secondary: "",
1946
- onClick: Z
1947
- }, {
1948
- icon: M(() => [...r[53] ||= [s("span", { class: "i-mdi:download" }, null, -1)]]),
1949
- default: M(() => [r[54] ||= l(" 导出配置 ", -1)]),
1950
- _: 1
1951
- }), u(k(F), {
1952
- secondary: "",
1953
- onClick: pe
1954
- }, {
1955
- icon: M(() => [...r[55] ||= [s("span", { class: "i-mdi:upload" }, null, -1)]]),
1956
- default: M(() => [r[56] ||= l(" 导入配置 ", -1)]),
1957
- _: 1
1958
- })]),
1959
- u(k(F), {
1960
- block: "",
1961
- type: "error",
1962
- secondary: "",
1963
- class: "mt-2",
1964
- onClick: de
1965
- }, {
1966
- icon: M(() => [...r[57] ||= [s("span", { class: "i-mdi:restore" }, null, -1)]]),
1967
- default: M(() => [r[58] ||= l(" 重置所有配置 ", -1)]),
1968
- _: 1
1969
- })
1970
- ]),
1971
- s("div", ir, [
1972
- r[62] ||= s("div", { class: "section-title" }, "系统模式", -1),
1973
- s("div", ar, [r[60] ||= s("div", { class: "setting-label" }, [s("span", null, "灰色模式"), s("span", { class: "setting-desc" }, "用于哀悼日场景")], -1), u(k(G), {
1974
- value: E.value,
1975
- "onUpdate:value": r[11] ||= (e) => E.value = e
1976
- }, null, 8, ["value"])]),
1977
- s("div", or, [r[61] ||= s("div", { class: "setting-label" }, [s("span", null, "色弱模式"), s("span", { class: "setting-desc" }, "提供无障碍访问支持")], -1), u(k(G), {
1978
- value: O.value,
1979
- "onUpdate:value": r[12] ||= (e) => O.value = e
1980
- }, null, 8, ["value"])])
1981
- ]),
1982
- s("div", sr, [
1983
- r[64] ||= s("div", { class: "section-title" }, "水印设置", -1),
1984
- s("div", cr, [r[63] ||= s("span", null, "启用水印", -1), u(k(G), {
1985
- value: z.value,
1986
- "onUpdate:value": r[13] ||= (e) => z.value = e
1987
- }, null, 8, ["value"])]),
1988
- z.value ? (b(), o("div", lr, [u(k(B), {
1989
- value: V.value,
1990
- "onUpdate:value": r[14] ||= (e) => V.value = e,
1991
- placeholder: "请输入水印内容",
1992
- size: "small"
1993
- }, null, 8, ["value"])])) : a("", !0)
1994
- ]),
1995
- s("div", ur, [r[71] ||= s("div", { class: "section-title" }, "系统信息", -1), s("div", dr, [
1996
- s("div", fr, [r[65] ||= s("span", { class: "info-label" }, "浏览器", -1), s("span", pr, D(K.value.browser), 1)]),
1997
- s("div", mr, [r[66] ||= s("span", { class: "info-label" }, "操作系统", -1), s("span", hr, D(K.value.os), 1)]),
1998
- s("div", gr, [r[67] ||= s("span", { class: "info-label" }, "屏幕分辨率", -1), s("span", _r, D(K.value.resolution), 1)]),
1999
- s("div", vr, [r[68] ||= s("span", { class: "info-label" }, "设备像素比", -1), s("span", yr, D(K.value.pixelRatio), 1)]),
2000
- s("div", br, [r[69] ||= s("span", { class: "info-label" }, "语言", -1), s("span", xr, D(K.value.language), 1)]),
2001
- s("div", Sr, [r[70] ||= s("span", { class: "info-label" }, "时区", -1), s("span", Cr, D(K.value.timezone), 1)])
2002
- ])]),
2003
- w(n.$slots, "features-append", { settings: k(m) }, void 0, !0)
2004
- ]),
2005
- _: 3
2006
- })
2007
- ]),
2008
- _: 3
2009
- }, 8, ["value"])]),
2010
- _: 3
2011
- })]),
2012
- _: 3
2013
- }, 8, ["show", "width"]));
2014
- }
2015
- }), [["__scopeId", "data-v-d9843552"]]), Tr = { class: "brand-logo__icon" }, Er = [
2016
- "src",
2017
- "width",
2018
- "height"
2019
- ], Dr = [
2020
- "src",
2021
- "width",
2022
- "height"
2023
- ], Or = { class: "brand-logo__name" }, kr = { class: "brand-logo__title" }, Ar = {
2024
- key: 0,
2025
- class: "brand-logo__subtitle"
2026
- }, jr = {
2027
- key: 0,
2028
- class: "brand-logo__divider"
2029
- }, Mr = /* @__PURE__ */ Q(/* @__PURE__ */ d({
2030
- name: "BrandLogo",
2031
- __name: "index",
2032
- props: {
2033
- showName: {
2034
- type: Boolean,
2035
- default: !1
2036
- },
2037
- showDivider: {
2038
- type: Boolean,
2039
- default: !1
2040
- },
2041
- size: { default: 36 },
2042
- collapsed: {
2043
- type: Boolean,
2044
- default: !1
2045
- },
2046
- variant: { default: "horizontal" }
2047
- },
2048
- setup(t) {
2049
- let n = Y(), r = {
2050
- ...X,
2051
- ...n.brand
2052
- };
2053
- return (n, i) => (b(), o("div", { class: g(["brand-logo", {
2054
- "brand-logo--collapsed": t.collapsed,
2055
- "brand-logo--horizontal": t.variant === "horizontal"
2056
- }]) }, [s("div", Tr, [i[0] ||= s("div", { class: "brand-logo__glow" }, null, -1), r.logoType === "video" && r.logoSrc ? (b(), o("video", {
2057
- key: 0,
2058
- src: r.logoSrc,
2059
- width: t.size,
2060
- height: t.size,
2061
- autoplay: "",
2062
- loop: "",
2063
- muted: "",
2064
- playsinline: "",
2065
- class: "brand-logo__media"
2066
- }, null, 8, Er)) : r.logoSrc ? (b(), o("img", {
2067
- key: 1,
2068
- src: r.logoSrc,
2069
- width: t.size,
2070
- height: t.size,
2071
- class: "brand-logo__media",
2072
- alt: "Logo"
2073
- }, null, 8, Dr)) : a("", !0)]), t.showName && !t.collapsed ? (b(), o(e, { key: 0 }, [s("div", Or, [s("span", kr, D(r.name), 1), r.subtitle ? (b(), o("span", Ar, D(r.subtitle), 1)) : a("", !0)]), t.showDivider ? (b(), o("div", jr)) : a("", !0)], 64)) : a("", !0)], 2));
2074
- }
2075
- }), [["__scopeId", "data-v-fd1c2eec"]]), Nr = { class: "icon-menu" }, Pr = ["onClick"], Fr = { class: "icon-menu__icon" }, Ir = {
2076
- key: 1,
2077
- class: "icon-menu__fallback"
2078
- }, Lr = { class: "icon-menu__label" }, Rr = /* @__PURE__ */ Q(/* @__PURE__ */ d({
2079
- name: "IconMenu",
2080
- __name: "index",
2081
- props: {
2082
- menus: {},
2083
- active: {}
2084
- },
2085
- emits: ["click"],
2086
- setup(t, { emit: n }) {
2087
- let r = n, a = Y();
2088
- return (n, c) => (b(), o("div", Nr, [(b(!0), o(e, null, C(t.menus, (e) => (b(), o("div", {
2089
- key: e.path,
2090
- class: g(["icon-menu__item", { "icon-menu__item--active": t.active === e.path }]),
2091
- onClick: (t) => r("click", e)
2092
- }, [s("div", Fr, [k(a).iconComponent && e.meta?.icon ? (b(), i(E(k(a).iconComponent), {
2093
- key: 0,
2094
- name: e.meta.icon,
2095
- size: 20
2096
- }, null, 8, ["name"])) : (b(), o("span", Ir, D(e.meta?.title?.charAt(0) || "?"), 1))]), s("div", Lr, D(e.meta?.title), 1)], 10, Pr))), 128))]));
2097
- }
2098
- }), [["__scopeId", "data-v-f985d475"]]), zr = { class: "floating-menu__header" }, Br = { class: "floating-menu__brand" }, Vr = { class: "floating-menu__brand-title" }, Hr = { class: "floating-menu__brand-subtitle" }, Ur = { class: "floating-menu__list" }, Wr = {
2099
- key: 0,
2100
- class: "floating-menu__group"
2101
- }, Gr = { class: "floating-menu__group-title" }, Kr = ["onClick", "onKeydown"], qr = { class: "floating-menu__item-text" }, Jr = ["onClick", "onKeydown"], Yr = { class: "floating-menu__item-text" }, Xr = /* @__PURE__ */ Q(/* @__PURE__ */ d({
2102
- name: "FloatingMenu",
2103
- __name: "index",
2104
- props: {
2105
- show: { type: Boolean },
2106
- menuItem: {},
2107
- isActive: { type: Function }
2108
- },
2109
- emits: ["click"],
2110
- setup(t, { emit: r }) {
2111
- let c = r, l = Y(), u = {
2112
- ...X,
2113
- ...l.brand
2114
- };
2115
- return (r, d) => (b(), i(n, { name: "slide-fade" }, {
2116
- default: M(() => [t.show && t.menuItem ? (b(), o("div", {
2117
- key: 0,
2118
- class: g(["floating-menu", [k(l).isDark.value ? "dark-theme" : "light-theme"]]),
2119
- role: "navigation",
2120
- "aria-label": "二级功能导航"
2121
- }, [s("div", zr, [s("div", Br, [s("span", Vr, D(u.name), 1), s("span", Hr, D(u.subtitle), 1)])]), s("div", Ur, [(b(!0), o(e, null, C(t.menuItem.children, (n) => (b(), o(e, { key: n.path }, [n.children && n.children.length > 0 ? (b(), o("div", Wr, [s("div", Gr, [k(l).iconComponent && n.meta?.icon ? (b(), i(E(k(l).iconComponent), {
2122
- key: 0,
2123
- name: n.meta.icon,
2124
- size: 16
2125
- }, null, 8, ["name"])) : a("", !0), s("span", null, D(n.meta?.title), 1)]), (b(!0), o(e, null, C(n.children, (e) => (b(), o("div", {
2126
- key: e.path,
2127
- class: g(["floating-menu__item floating-menu__item--sub", { active: t.isActive?.(e.path) }]),
2128
- role: "link",
2129
- tabindex: "0",
2130
- onClick: (t) => c("click", e),
2131
- onKeydown: [N((t) => c("click", e), ["enter"]), N(P((t) => c("click", e), ["prevent"]), ["space"])]
2132
- }, [k(l).iconComponent && e.meta?.icon ? (b(), i(E(k(l).iconComponent), {
2133
- key: 0,
2134
- name: e.meta.icon,
2135
- size: 16
2136
- }, null, 8, ["name"])) : a("", !0), s("span", qr, D(e.meta?.title), 1)], 42, Kr))), 128))])) : (b(), o("div", {
2137
- key: 1,
2138
- class: g(["floating-menu__item", { active: t.isActive?.(n.path) }]),
2139
- role: "link",
2140
- tabindex: "0",
2141
- onClick: (e) => c("click", n),
2142
- onKeydown: [N((e) => c("click", n), ["enter"]), N(P((e) => c("click", n), ["prevent"]), ["space"])]
2143
- }, [k(l).iconComponent && n.meta?.icon ? (b(), i(E(k(l).iconComponent), {
2144
- key: 0,
2145
- name: n.meta.icon,
2146
- size: 18
2147
- }, null, 8, ["name"])) : a("", !0), s("span", Yr, D(n.meta?.title), 1)], 42, Jr))], 64))), 128))])], 2)) : a("", !0)]),
2148
- _: 1
2149
- }));
2150
- }
2151
- }), [["__scopeId", "data-v-3dc6f434"]]), Zr = { class: "side-menu__header" }, Qr = { class: "side-menu__header-icon" }, $r = { class: "side-menu__header-title" }, ei = { class: "side-menu__list" }, ti = {
2152
- key: 0,
2153
- class: "side-menu__group"
2154
- }, ni = { class: "side-menu__group-label" }, ri = ["onClick"], ii = { class: "side-menu__item-text" }, ai = ["onClick"], oi = { class: "side-menu__item-text" }, si = /* @__PURE__ */ Q(/* @__PURE__ */ d({
2155
- name: "SideMenu",
2156
- __name: "index",
2157
- props: {
2158
- menus: {},
2159
- activeItem: {},
2160
- isActive: { type: Function }
2161
- },
2162
- emits: ["click"],
2163
- setup(t, { emit: r }) {
2164
- let c = r, l = Y(), d = S(!1);
2165
- return (r, f) => t.menus.length > 0 ? (b(), o(e, { key: 0 }, [s("div", {
2166
- class: g(["side-menu-toggle", [k(l).isDark.value ? "dark-theme" : "light-theme", { active: !d.value }]]),
2167
- onClick: f[0] ||= (e) => d.value = !d.value
2168
- }, [s("i", { class: g(["toggle-icon", d.value ? "i-ri:side-bar-line" : "i-ri:arrow-right-s-line"]) }, null, 2)], 2), u(n, { name: "glass-slide" }, {
2169
- default: M(() => [d.value ? a("", !0) : (b(), o("div", {
2170
- key: 0,
2171
- class: g(["side-menu", [k(l).isDark.value ? "dark-theme" : "light-theme"]])
2172
- }, [s("div", Zr, [s("div", Qr, [k(l).iconComponent && t.activeItem?.meta?.icon ? (b(), i(E(k(l).iconComponent), {
2173
- key: 0,
2174
- name: t.activeItem.meta.icon,
2175
- size: 17
2176
- }, null, 8, ["name"])) : a("", !0)]), s("span", $r, D(t.activeItem?.meta?.title || "菜单"), 1)]), s("div", ei, [(b(!0), o(e, null, C(t.menus, (n) => (b(), o(e, { key: n.path }, [n.children && n.children.length > 0 ? (b(), o("div", ti, [s("div", ni, [k(l).iconComponent && n.meta?.icon ? (b(), i(E(k(l).iconComponent), {
2177
- key: 0,
2178
- name: n.meta.icon,
2179
- size: 14
2180
- }, null, 8, ["name"])) : a("", !0), s("span", null, D(n.meta?.title), 1)]), (b(!0), o(e, null, C(n.children, (e) => (b(), o("div", {
2181
- key: e.path,
2182
- class: g(["side-menu__item", { active: t.isActive?.(e.path) }]),
2183
- onClick: (t) => c("click", e)
2184
- }, [k(l).iconComponent && e.meta?.icon ? (b(), i(E(k(l).iconComponent), {
2185
- key: 0,
2186
- name: e.meta.icon,
2187
- size: 15
2188
- }, null, 8, ["name"])) : a("", !0), s("span", ii, D(e.meta?.title), 1)], 10, ri))), 128))])) : (b(), o("div", {
2189
- key: 1,
2190
- class: g(["side-menu__item", { active: t.isActive?.(n.path) }]),
2191
- onClick: (e) => c("click", n)
2192
- }, [k(l).iconComponent && n.meta?.icon ? (b(), i(E(k(l).iconComponent), {
2193
- key: 0,
2194
- name: n.meta.icon,
2195
- size: 16
2196
- }, null, 8, ["name"])) : a("", !0), s("span", oi, D(n.meta?.title), 1)], 10, ai))], 64))), 128))])], 2))]),
2197
- _: 1
2198
- })], 64)) : a("", !0);
2199
- }
2200
- }), [["__scopeId", "data-v-1909f229"]]), ci = ["aria-hidden"], li = { class: "drawer-menu__content" }, ui = { class: "drawer-menu__grid" }, di = ["onClick", "onKeydown"], fi = {
2201
- key: 0,
2202
- class: "drawer-menu__items"
2203
- }, pi = ["onClick", "onKeydown"], mi = { class: "drawer-menu__item-text" }, hi = {
2204
- key: 0,
2205
- class: "drawer-menu__sub-items"
2206
- }, gi = { class: "drawer-menu__sub-title" }, _i = ["onClick", "onKeydown"], vi = { class: "drawer-menu__item-text" }, yi = /* @__PURE__ */ Q(/* @__PURE__ */ d({
2207
- name: "DrawerMenu",
2208
- __name: "index",
2209
- props: {
2210
- menus: {},
2211
- show: { type: Boolean }
2212
- },
2213
- setup(t) {
2214
- let n = Y(), r = q(), c = p(ue, {
2215
- show: () => {},
2216
- startHide: () => {},
2217
- hide: () => {}
2218
- }), l = (e) => {
2219
- e.path && (r.push(e.path), c.hide());
2220
- };
2221
- return (r, u) => (b(), o("div", {
2222
- class: g(["drawer-menu", [k(n).isDark.value ? "dark-theme" : "light-theme", { visible: t.show }]]),
2223
- role: "navigation",
2224
- "aria-label": "功能导航",
2225
- "aria-hidden": !t.show,
2226
- onMouseenter: u[0] ||= (e) => k(c).show(),
2227
- onMouseleave: u[1] ||= (e) => k(c).startHide()
2228
- }, [u[2] ||= s("div", { class: "drawer-menu__header" }, [s("div", { class: "drawer-menu__title" }, [s("span", { class: "grid-icon" }, [
2229
- s("span"),
2230
- s("span"),
2231
- s("span"),
2232
- s("span")
2233
- ]), s("span", null, "功能导航")])], -1), s("div", li, [s("div", ui, [(b(!0), o(e, null, C(t.menus, (t) => (b(), o("div", {
2234
- key: t.path,
2235
- class: "drawer-menu__category"
2236
- }, [s("div", {
2237
- class: "drawer-menu__category-header",
2238
- role: "link",
2239
- tabindex: "0",
2240
- onClick: (e) => l(t),
2241
- onKeydown: [N((e) => l(t), ["enter"]), N(P((e) => l(t), ["prevent"]), ["space"])]
2242
- }, [k(n).iconComponent && t.meta?.icon ? (b(), i(E(k(n).iconComponent), {
2243
- key: 0,
2244
- name: t.meta.icon,
2245
- size: 18
2246
- }, null, 8, ["name"])) : a("", !0), s("span", null, D(t.meta?.title), 1)], 40, di), t.children && t.children.length > 0 ? (b(), o("div", fi, [(b(!0), o(e, null, C(t.children, (e) => (b(), o("div", {
2247
- key: e.path,
2248
- class: "drawer-menu__item",
2249
- role: "link",
2250
- tabindex: "0",
2251
- onClick: (t) => l(e),
2252
- onKeydown: [N((t) => l(e), ["enter"]), N(P((t) => l(e), ["prevent"]), ["space"])]
2253
- }, [k(n).iconComponent && e.meta?.icon ? (b(), i(E(k(n).iconComponent), {
2254
- key: 0,
2255
- name: e.meta.icon,
2256
- size: 16
2257
- }, null, 8, ["name"])) : a("", !0), s("span", mi, D(e.meta?.title), 1)], 40, pi))), 128)), (b(!0), o(e, null, C(t.children, (t) => (b(), o(e, { key: t.path }, [t.children && t.children.length > 0 ? (b(), o("div", hi, [s("div", gi, D(t.meta?.title), 1), (b(!0), o(e, null, C(t.children, (e) => (b(), o("div", {
2258
- key: e.path,
2259
- class: "drawer-menu__item drawer-menu__item--sub",
2260
- role: "link",
2261
- tabindex: "0",
2262
- onClick: (t) => l(e),
2263
- onKeydown: [N((t) => l(e), ["enter"]), N(P((t) => l(e), ["prevent"]), ["space"])]
2264
- }, [k(n).iconComponent && e.meta?.icon ? (b(), i(E(k(n).iconComponent), {
2265
- key: 0,
2266
- name: e.meta.icon,
2267
- size: 14
2268
- }, null, 8, ["name"])) : a("", !0), s("span", vi, D(e.meta?.title), 1)], 40, _i))), 128))])) : a("", !0)], 64))), 128))])) : a("", !0)]))), 128))])])], 42, ci));
2269
- }
2270
- }), [["__scopeId", "data-v-91d54a20"]]), bi = /* @__PURE__ */ Q(/* @__PURE__ */ d({
2271
- name: "MenuTrigger",
2272
- __name: "index",
2273
- props: { show: { type: Boolean } },
2274
- setup(e) {
2275
- let t = p(ue, {
2276
- show: () => {},
2277
- startHide: () => {},
2278
- hide: () => {}
2279
- });
2280
- return (e, n) => (b(), o("div", {
2281
- class: "menu-trigger",
2282
- onMouseenter: n[0] ||= (e) => k(t).show(),
2283
- onMouseleave: n[1] ||= (e) => k(t).startHide()
2284
- }, [...n[2] ||= [s("div", { class: "menu-trigger__indicator" }, [s("span", { class: "hamburger-icon" }, [
2285
- s("span"),
2286
- s("span"),
2287
- s("span")
2288
- ])], -1)]], 32));
2289
- }
2290
- }), [["__scopeId", "data-v-2c20af78"]]);
2291
- //#endregion
2292
- //#region src/setup.ts
2293
- function xi(e, t = {}) {
2294
- let n = hn(t), r = n();
2295
- return e.provide(ce, r), n;
2296
- }
2297
- //#endregion
2298
- //#region src/composables/createLayoutContext.ts
2299
- function Si(e) {
2300
- let { settings: t } = e;
2301
- return {
2302
- menus: r(() => O(e.menus)),
2303
- isDark: r(() => O(e.isDark)),
2304
- layoutMode: r(() => t.layoutMode),
2305
- collapsed: r({
2306
- get: () => t.collapsed,
2307
- set: (e) => {
2308
- t.collapsed = e;
2309
- }
2310
- }),
2311
- menuExpandMode: r(() => t.menuExpandMode),
2312
- sidebarWidth: r(() => t.sidebarWidth),
2313
- sidebarCollapsedWidth: r(() => t.sidebarCollapsedWidth),
2314
- showFooter: r(() => t.showFooter),
2315
- showTagsView: r(() => t.showTagsView),
2316
- tagsViewHeight: r(() => t.tagsViewHeight),
2317
- headerHeight: r(() => t.headerHeight),
2318
- transitionName: r(() => t.transitionName),
2319
- showBreadcrumb: r(() => t.showBreadcrumb),
2320
- showBreadcrumbIcon: r(() => t.showBreadcrumbIcon),
2321
- fixedHeader: r(() => t.fixedHeader),
2322
- brand: {
2323
- ...X,
2324
- ...e.brand
2325
- },
2326
- iconComponent: e.iconComponent
2327
- };
2328
- }
2329
- function Ci(e) {
2330
- return de(Si(e));
2331
- }
2332
- //#endregion
2333
- //#region src/index.ts
2334
- var wi = pe, Ti = Oe, Ei = Ke, Di = lt, Oi = jt, ki = Qt;
2335
- //#endregion
2336
- export { an as BORDER_RADIUS_MAP, Mr as BrandLogo, sn as COLOR_SWATCHES, ki as C_CardLayout, en as C_LayoutContainer, Ei as C_MixLayout, Di as C_MixTopLayout, Oi as C_ReverseHorizontalMixLayout, wi as C_SideLayout, Ti as C_TopLayout, Qt as CardLayout, X as DEFAULT_BRAND_CONFIG, $ as DEFAULT_SETTINGS, ue as DRAWER_HANDLER_KEY, yi as DrawerMenu, Xr as FloatingMenu, Rr as IconMenu, J as LAYOUT_CONTEXT_KEY, rn as LAYOUT_MODES, ce as LAYOUT_SETTINGS_KEY, le as MENU_COLLAPSE_KEY, bi as MenuTrigger, Ke as MixLayout, lt as MixTopLayout, tn as PRESET_COLORS, _e as ResponsiveMenu, jt as ReverseHorizontalMixLayout, dn as SETTINGS_CONFIG_SCHEMA_VERSION, wr as SettingsDrawer, pe as SideLayout, si as SideMenu, nn as THEME_PRESETS, on as TRANSITION_MAP, Oe as TopLayout, mn as adjustColor, Si as createLayoutContext, hn as createSettingsStore, Ci as provideLayout, de as provideLayoutContext, pn as sanitizeLayoutSettingsConfig, fn as sanitizeSettingsPatch, xi as setupLayout, fe as shouldCacheRoute, Z as useLayoutCache, Y as useLayoutContext, Ae as useMenuSplit, gn as useSettingsStore };
2337
-
2338
- //# sourceMappingURL=index.js.map
1
+ import { A as e, C as t, D as n, E as r, F as i, I as a, L as o, M as s, N as c, O as l, P as u, S as d, T as f, _ as p, a as m, b as h, c as g, d as _, f as v, g as y, h as b, i as x, j as S, k as C, l as w, m as T, n as E, o as D, p as O, r as k, s as A, t as j, u as M, v as N, w as P, x as F, y as I } from "./vue-h8jl2I5K.js";
2
+ import { _ as L, a as R, b as z, c as B, d as V, f as H, g as U, h as W, i as G, l as K, m as q, n as J, o as Y, p as X, r as Z, s as Q, t as $, u as ee, v as te, x as ne, y as re } from "./naive-AliKeHvO.js";
3
+ export { _ as BORDER_RADIUS_MAP, te as BrandLogo, v as COLOR_SWATCHES, $ as C_CardLayout, z as C_LayoutContainer, J as C_MixLayout, Z as C_MixTopLayout, G as C_ReverseHorizontalMixLayout, R as C_SideLayout, Y as C_TopLayout, Q as CardLayout, S as DEFAULT_BRAND_CONFIG, O as DEFAULT_SETTINGS, s as DRAWER_HANDLER_KEY, q as DrawerMenu, U as FloatingMenu, L as IconMenu, c as LAYOUT_CONTEXT_KEY, T as LAYOUT_MODES, u as LAYOUT_SETTINGS_KEY, j as LayoutActionUnavailableError, i as MENU_COLLAPSE_KEY, X as MenuTrigger, B as MixLayout, K as MixTopLayout, b as PRESET_COLORS, ne as ResponsiveMenu, ee as ReverseHorizontalMixLayout, N as SETTINGS_CONFIG_SCHEMA_VERSION, re as SettingsDrawer, V as SideLayout, W as SideMenu, y as THEME_PRESETS, p as TRANSITION_MAP, H as TopLayout, I as adjustColor, h as assertLayoutSettingsRelationships, w as bindLayoutCssVariables, r as calculateVisibleMenuCount, k as createLayoutContext, A as createSettingsStore, n as estimateMenuItemWidth, P as isPathSegmentPrefix, m as normalizeLayoutMenus, x as provideLayout, a as provideLayoutContext, F as sanitizeLayoutSettingsConfig, d as sanitizeSettingsPatch, D as setupLayout, C as shouldCacheRoute, e as useLayoutCache, o as useLayoutContext, M as useLayoutCssVariables, t as useLayoutIcon, f as useMenuSplit, l as useResponsiveMenu, E as useSettingsController, g as useSettingsStore };