@huyooo/ui 2.2.4 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/{AuthkitAppSetting-ZopA9Gjq.js → AuthkitAppSetting-DhLRYlL_.js} +97 -91
  2. package/dist/{Contact-BdBQ_FA4.js → Contact-CNLjyOCR.js} +3 -3
  3. package/dist/{FeedbackModal.vue_vue_type_script_setup_true_lang-C7vaGD4R.js → FeedbackModal.vue_vue_type_script_setup_true_lang-BXqxUXuu.js} +2 -2
  4. package/dist/{LegalDocViewer-wbdoeWU9.js → LegalDocViewer-DkVW9tCh.js} +622 -625
  5. package/dist/{PaySubscriptions-OZ6OFeQJ.js → PaySubscriptions-tJSQUmhE.js} +1 -1
  6. package/dist/{PricingPlans-Wf4QkUIz.js → PricingPlans-BhcDv8uk.js} +3 -3
  7. package/dist/{ReferrerReferees-DNE-htF1.js → ReferrerReferees-QTZnOCJB.js} +1 -1
  8. package/dist/{Upload.vue_vue_type_script_setup_true_lang-DtciAodp.js → Upload.vue_vue_type_script_setup_true_lang-CZjNlns_.js} +1 -1
  9. package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-ELHt9JGf.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BQgy_CeZ.js} +5 -5
  10. package/dist/WidthContainer-BEeYYOat.js +688 -0
  11. package/dist/authkit.js +8 -8
  12. package/dist/common/globalConfig.d.ts +5 -0
  13. package/dist/common.js +1 -1
  14. package/dist/components/SvgIcon.vue.d.ts +1 -1
  15. package/dist/composables/Authkit/oauthCallback.d.ts +1 -1
  16. package/dist/composables/Authkit/resolveRoutePermission.d.ts +10 -1
  17. package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +2 -0
  18. package/dist/composables/Authkit/useAuthkitAuth.d.ts +14 -3
  19. package/dist/composables/Authkit/useRoutePermission.d.ts +12 -1
  20. package/dist/composables.d.ts +1 -0
  21. package/dist/composables.js +49 -44
  22. package/dist/feedback.js +1 -1
  23. package/dist/{fetchAuthPageAboutUs-D5w21LkF.js → fetchAuthPageAboutUs--dArFYk6.js} +2 -2
  24. package/dist/main.js +284 -279
  25. package/dist/pay.js +3 -3
  26. package/dist/privateCom.js +1 -1
  27. package/dist/referrer.js +1 -1
  28. package/dist/{runtime-B_xhJ3i8.js → runtime-CDEl4QQl.js} +129 -128
  29. package/dist/style.css +1 -1
  30. package/dist/types/api/auth.generated.d.ts +23 -0
  31. package/dist/types/app.d.ts +4 -0
  32. package/dist/upload.js +2 -2
  33. package/dist/{useAuthkitAppsAuthPageInfo-KHO1mJvF.js → useAuthkitAppsAuthPageInfo-mv7hOnhi.js} +1 -1
  34. package/dist/useAuthkitAuth-CO61XogP.js +295 -0
  35. package/dist/{useAuthkitUsersProfile-BvldvaRx.js → useAuthkitUsersProfile-CF7t2Y7T.js} +1 -1
  36. package/dist/{useEnsureAuthenticated-BdXJDqVv.js → useEnsureAuthenticated-Q7EHguY4.js} +1 -1
  37. package/dist/{useLegalDocs-BCWvu1ft.js → useLegalDocs-DUbab5R9.js} +2 -2
  38. package/dist/{usePageSEO-D7eyLr8d.js → usePageSEO-D8CocvOJ.js} +1 -1
  39. package/dist/useRoutePermission-Bvn-J8bp.js +249 -0
  40. package/dist/{useSubscriptionCheckout-BHI3y7Cx.js → useSubscriptionCheckout-Bic8vKgm.js} +1 -1
  41. package/dist/user.js +1 -1
  42. package/package.json +1 -1
  43. package/dist/WidthContainer-PjmYnZwk.js +0 -706
  44. package/dist/useAuthkitAuth-C0fVP17l.js +0 -273
  45. package/dist/useRoutePermission-BuKMkOTK.js +0 -247
@@ -0,0 +1,688 @@
1
+ import { defineComponent as x, ref as A, watch as N, openBlock as o, createElementBlock as a, createElementVNode as s, createVNode as r, unref as c, withCtx as P, createTextVNode as H, renderSlot as z, toDisplayString as T, createCommentVNode as I, onMounted as G, onBeforeUnmount as F, normalizeClass as C, Fragment as B, renderList as E, createBlock as J, Teleport as ve, nextTick as q, computed as L, normalizeStyle as O } from "vue";
2
+ import { u as Q } from "./useAuthkitAuth-CO61XogP.js";
3
+ import "./apiClients-8_c5cDW5.js";
4
+ import { u as ge } from "./useAuthkitAppsAuthPageInfo-mv7hOnhi.js";
5
+ import { s as ye, a as be } from "./runtime-CDEl4QQl.js";
6
+ import "@vafast/api-client";
7
+ /* empty css */
8
+ import "@arco-design/web-vue";
9
+ import "./useAuthkitUsersProfile-CF7t2Y7T.js";
10
+ import { useRouter as X, useRoute as Y } from "vue-router";
11
+ import { d as Z, e as ee, f as te, w as ne, a as oe, j as se } from "./useRoutePermission-Bvn-J8bp.js";
12
+ import "@unhead/vue";
13
+ import "./useUserMenu-ClPBlvaM.js";
14
+ import { c as ae, h as re, k as ie, _ as ue, f as le, j as ce, d as de, g as D, U as ke, i as me } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BQgy_CeZ.js";
15
+ import "./useBillingSubscriptionSummary-C2E3p68U.js";
16
+ /* empty css */
17
+ /* empty css */
18
+ import { M as we } from "./Menu-uCexrsKP.js";
19
+ import "./CollapseItem-DUzZA6tx.js";
20
+ /* empty css */
21
+ /* empty css */
22
+ import "./userMenuModal-D-nDaYqM.js";
23
+ import "./index-D9YtlhTa.js";
24
+ /* empty css */
25
+ import "./CustomTable-B1KjkixL.js";
26
+ import "@vueuse/core";
27
+ import "./index-D56hUMeD.js";
28
+ import { Icon as R } from "@iconify/vue";
29
+ import { L as pe } from "./Logo-B9DFBxDU.js";
30
+ import { _ as S } from "./_plugin-vue_export-helper-CHgC5LLL.js";
31
+ const Me = {
32
+ class: "SidebarCom"
33
+ }, $e = {
34
+ class: "LogoContent"
35
+ }, Ce = {
36
+ class: "MenuContent"
37
+ }, Te = {
38
+ class: "sidebar-footer"
39
+ }, Se = /* @__PURE__ */ x({
40
+ __name: "AppSidebar",
41
+ props: {
42
+ menuType: {
43
+ default: "system"
44
+ },
45
+ showUserPanel: {
46
+ type: Boolean,
47
+ default: !0
48
+ }
49
+ },
50
+ setup(h) {
51
+ const e = h, {
52
+ brandLogoUrl: p,
53
+ brandName: f,
54
+ navigateToAppHome: i
55
+ } = Z(), {
56
+ signOut: _
57
+ } = Q(), {
58
+ menus: v
59
+ } = ee(e.menuType), k = X();
60
+ async function $() {
61
+ await _(), i();
62
+ }
63
+ const b = Y(), M = A([""]);
64
+ function t(d) {
65
+ const l = d.path;
66
+ ne(() => {
67
+ k.push({
68
+ path: l,
69
+ query: b.query
70
+ }), M.value = [l], window.scrollTo({
71
+ top: 0,
72
+ behavior: "smooth"
73
+ });
74
+ });
75
+ }
76
+ return N(() => [b.path, v.value], () => {
77
+ const d = te(v.value, b.path, {
78
+ // Sidebar 中,子路由应该选中子菜单项
79
+ returnParentOnChildMatch: !1,
80
+ // 后备查找函数
81
+ fallback: (l) => oe(b.matched, e.menuType, l)
82
+ });
83
+ d && (M.value = [d]);
84
+ }, {
85
+ immediate: !0,
86
+ deep: !0
87
+ }), (d, l) => (o(), a("div", Me, [s("div", $e, [r(c(pe), {
88
+ icon: c(p),
89
+ name: c(f),
90
+ onTo: c(i)
91
+ }, null, 8, ["icon", "name", "onTo"])]), s("div", Ce, [r(we, {
92
+ "selected-keys": M.value,
93
+ "onUpdate:selectedKeys": l[0] || (l[0] = (m) => M.value = m),
94
+ menus: c(v),
95
+ onChange: t
96
+ }, null, 8, ["selected-keys", "menus"])]), s("div", Te, [r(c(ae), {
97
+ position: "tr",
98
+ "dropdown-offset-y": "30px"
99
+ }, {
100
+ trigger: P(() => [r(c(ke))]),
101
+ items: P(() => [r(c(re)), r(c(ie)), r(c(ue)), r(c(le)), r(c(ce)), r(c(de)), r(c(D), {
102
+ icon: "lucide:home",
103
+ onClick: c(i)
104
+ }, {
105
+ default: P(() => [...l[1] || (l[1] = [H("主页", -1)])]),
106
+ _: 1
107
+ }, 8, ["onClick"]), r(c(D), {
108
+ icon: "lucide:log-out",
109
+ danger: "",
110
+ onClick: $
111
+ }, {
112
+ default: P(() => [...l[2] || (l[2] = [H("退出登录", -1)])]),
113
+ _: 1
114
+ })]),
115
+ _: 1
116
+ }), r(c(me))])]));
117
+ }
118
+ }), Ie = /* @__PURE__ */ S(Se, [["__scopeId", "data-v-a256a3bb"]]), xe = {
119
+ class: "layout"
120
+ }, Ae = {
121
+ class: "leftContent"
122
+ }, Pe = {
123
+ class: "content"
124
+ }, Be = {
125
+ class: "contentCenter"
126
+ }, Le = {
127
+ class: "pages"
128
+ }, Ue = /* @__PURE__ */ x({
129
+ __name: "AppLayout",
130
+ props: {
131
+ menuType: {
132
+ default: "system"
133
+ },
134
+ showUserPanel: {
135
+ type: Boolean,
136
+ default: !0
137
+ }
138
+ },
139
+ setup(h) {
140
+ const e = h;
141
+ return se(), (p, f) => (o(), a("div", xe, [s("div", Ae, [r(Ie, {
142
+ "menu-type": e.menuType,
143
+ "show-user-panel": e.showUserPanel
144
+ }, null, 8, ["menu-type", "show-user-panel"])]), s("div", Pe, [s("div", Be, [s("div", Le, [z(p.$slots, "default", {}, void 0, !0)])])])]));
145
+ }
146
+ }), tn = /* @__PURE__ */ S(Ue, [["__scopeId", "data-v-704cd141"]]), He = {
147
+ class: "ContentHead"
148
+ }, Ke = {
149
+ class: "title"
150
+ }, Ee = {
151
+ key: 0,
152
+ class: "description"
153
+ }, De = /* @__PURE__ */ x({
154
+ __name: "ContentHead",
155
+ props: {
156
+ title: {
157
+ type: String,
158
+ required: !0,
159
+ default: () => ""
160
+ },
161
+ description: {
162
+ type: String,
163
+ required: !0,
164
+ default: () => ""
165
+ }
166
+ },
167
+ setup(h) {
168
+ const e = h;
169
+ return (p, f) => (o(), a("div", He, [s("h1", Ke, T(e.title), 1), e.description ? (o(), a("p", Ee, T(e.description), 1)) : I("", !0)]));
170
+ }
171
+ }), nn = /* @__PURE__ */ S(De, [["__scopeId", "data-v-209a7bef"]]), Re = {
172
+ class: "desktop-menus"
173
+ }, Oe = {
174
+ key: 0,
175
+ class: "header-menu-item"
176
+ }, Ne = {
177
+ class: "submenu-popup"
178
+ }, ze = {
179
+ class: "submenu-content"
180
+ }, We = ["onClick"], Ve = {
181
+ key: 0,
182
+ class: "submenu-item-icon"
183
+ }, je = {
184
+ class: "submenu-item-content"
185
+ }, qe = {
186
+ class: "submenu-item-title"
187
+ }, Ge = {
188
+ key: 0,
189
+ class: "submenu-item-description"
190
+ }, Fe = ["onClick"], Je = ["aria-expanded", "aria-label"], Qe = {
191
+ class: "mobile-menu-content",
192
+ "aria-label": "主导航"
193
+ }, Xe = {
194
+ key: 0,
195
+ class: "mobile-menu-group"
196
+ }, Ye = ["aria-expanded", "onClick"], Ze = {
197
+ key: 0,
198
+ class: "mobile-submenu"
199
+ }, et = ["onClick"], tt = ["onClick"], nt = /* @__PURE__ */ x({
200
+ __name: "HeaderMenus",
201
+ props: {
202
+ menus: {
203
+ type: Array,
204
+ required: !0
205
+ },
206
+ activateKey: {
207
+ type: String,
208
+ required: !0
209
+ },
210
+ theme: {
211
+ type: String,
212
+ default: "light"
213
+ }
214
+ },
215
+ emits: ["change"],
216
+ setup(h, {
217
+ emit: e
218
+ }) {
219
+ const p = h, f = e, i = A(!1), _ = A({}), v = A(null), k = A(null);
220
+ let $ = "";
221
+ function b(n) {
222
+ return Array.from(n.querySelectorAll('button:not([disabled]), a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'));
223
+ }
224
+ function M() {
225
+ i.value || ($ = document.body.style.overflow, document.body.style.overflow = "hidden", i.value = !0, q(() => {
226
+ var n;
227
+ return (n = b(k.value ?? document.body)[0]) == null ? void 0 : n.focus();
228
+ }));
229
+ }
230
+ function t() {
231
+ i.value && (i.value = !1, document.body.style.overflow = $, q(() => {
232
+ var n;
233
+ return (n = v.value) == null ? void 0 : n.focus();
234
+ }));
235
+ }
236
+ function d() {
237
+ i.value && (i.value = !1, document.body.style.overflow = $);
238
+ }
239
+ function l() {
240
+ i.value ? t() : M();
241
+ }
242
+ function m(n) {
243
+ f("change", n);
244
+ }
245
+ function U(n) {
246
+ f("change", n), d();
247
+ }
248
+ function he(n) {
249
+ _.value[n] = !_.value[n];
250
+ }
251
+ function K(n) {
252
+ const g = p.activateKey, u = n.path;
253
+ if (g === u || g.startsWith(u + "/"))
254
+ return !0;
255
+ if (n.children && n.children.length > 0) {
256
+ for (const w of n.children)
257
+ if (g === w.path || g.startsWith(w.path + "/"))
258
+ return !0;
259
+ }
260
+ return !1;
261
+ }
262
+ function W(n) {
263
+ const g = p.activateKey, u = n.path;
264
+ return !!(g === u || g.startsWith(u + "/"));
265
+ }
266
+ function fe(n) {
267
+ f("change", n);
268
+ }
269
+ function V(n) {
270
+ n.key === "Escape" && i.value && t();
271
+ }
272
+ function _e(n) {
273
+ if (n.key !== "Tab" || !k.value) return;
274
+ const g = b(k.value);
275
+ if (g.length === 0) return;
276
+ const u = g[0], w = g[g.length - 1];
277
+ n.shiftKey && document.activeElement === u ? (n.preventDefault(), w.focus()) : !n.shiftKey && document.activeElement === w && (n.preventDefault(), u.focus());
278
+ }
279
+ return G(() => document.addEventListener("keydown", V)), F(() => {
280
+ document.removeEventListener("keydown", V), document.body.style.overflow = $;
281
+ }), (n, g) => (o(), a("div", {
282
+ class: C(["HeaderMenus", {
283
+ "HeaderMenus--dark": p.theme === "dark"
284
+ }])
285
+ }, [s("div", Re, [(o(!0), a(B, null, E(p.menus, (u, w) => (o(), a(B, {
286
+ key: w
287
+ }, [u.children && u.children.length > 0 ? (o(), a("div", Oe, [s("div", {
288
+ class: C(["headerLink hasChildren", {
289
+ activate: K(u)
290
+ }])
291
+ }, [H(T(u.name) + " ", 1), r(c(R), {
292
+ icon: "mingcute:down-line",
293
+ class: "dropdown-arrow"
294
+ })], 2), s("div", Ne, [s("div", ze, [(o(!0), a(B, null, E(u.children, (y, j) => (o(), a("div", {
295
+ key: j,
296
+ class: C(["submenu-item", {
297
+ active: W(y)
298
+ }]),
299
+ onClick: ($t) => m(y)
300
+ }, [y.icon ? (o(), a("div", Ve, [r(c(R), {
301
+ icon: y.icon
302
+ }, null, 8, ["icon"])])) : I("", !0), s("div", je, [s("div", qe, T(y.name), 1), y.description ? (o(), a("div", Ge, T(y.description), 1)) : I("", !0)])], 10, We))), 128))])])])) : (o(), a("div", {
303
+ key: 1,
304
+ class: C(["headerLink", {
305
+ activate: K(u)
306
+ }]),
307
+ onClick: (y) => fe(u)
308
+ }, T(u.name), 11, Fe))], 64))), 128))]), s("button", {
309
+ ref_key: "menuToggleRef",
310
+ ref: v,
311
+ type: "button",
312
+ class: C(["mobile-menu-toggle", {
313
+ active: i.value
314
+ }]),
315
+ "aria-expanded": i.value,
316
+ "aria-controls": "site-mobile-menu",
317
+ "aria-label": i.value ? "关闭导航菜单" : "打开导航菜单",
318
+ onClick: l
319
+ }, [...g[0] || (g[0] = [s("span", {
320
+ class: "hamburger-line"
321
+ }, null, -1), s("span", {
322
+ class: "hamburger-line"
323
+ }, null, -1), s("span", {
324
+ class: "hamburger-line"
325
+ }, null, -1)])], 10, Je), (o(), J(ve, {
326
+ to: "body"
327
+ }, [i.value ? (o(), a("div", {
328
+ key: 0,
329
+ class: "mobile-menu-overlay",
330
+ "aria-hidden": "true",
331
+ onClick: t
332
+ })) : I("", !0), i.value ? (o(), a("div", {
333
+ key: 1,
334
+ id: "site-mobile-menu",
335
+ ref_key: "mobileMenuRef",
336
+ ref: k,
337
+ class: "mobile-menu",
338
+ role: "dialog",
339
+ "aria-label": "移动导航",
340
+ "aria-modal": "true",
341
+ onKeydown: _e
342
+ }, [s("nav", Qe, [(o(!0), a(B, null, E(p.menus, (u, w) => (o(), a(B, {
343
+ key: u.path
344
+ }, [u.children && u.children.length > 0 ? (o(), a("div", Xe, [s("button", {
345
+ type: "button",
346
+ class: C(["mobile-menu-item mobile-menu-item-header", {
347
+ activate: K(u)
348
+ }]),
349
+ "aria-expanded": _.value[w] ?? !1,
350
+ onClick: (y) => he(w)
351
+ }, [s("span", null, T(u.name), 1), r(c(R), {
352
+ icon: _.value[w] ? "mingcute:up-line" : "mingcute:down-line",
353
+ class: "mobile-submenu-arrow"
354
+ }, null, 8, ["icon"])], 10, Ye), _.value[w] ? (o(), a("div", Ze, [(o(!0), a(B, null, E(u.children, (y) => (o(), a("button", {
355
+ key: y.path,
356
+ type: "button",
357
+ class: C(["mobile-submenu-item", {
358
+ active: W(y)
359
+ }]),
360
+ onClick: (j) => U(y)
361
+ }, T(y.name), 11, et))), 128))])) : I("", !0)])) : (o(), a("button", {
362
+ key: 1,
363
+ type: "button",
364
+ class: C(["mobile-menu-item", {
365
+ activate: K(u)
366
+ }]),
367
+ onClick: (y) => U(u)
368
+ }, T(u.name), 11, tt))], 64))), 128))])], 544)) : I("", !0)]))], 2));
369
+ }
370
+ }), ot = /* @__PURE__ */ S(nt, [["__scopeId", "data-v-884ca88b"]]), st = {
371
+ class: "HeaderCom"
372
+ }, at = {
373
+ class: "HeaderCom-inner"
374
+ }, rt = {
375
+ class: "left"
376
+ }, it = {
377
+ class: "right"
378
+ }, ut = ["aria-label"], lt = {
379
+ key: 0,
380
+ class: "theme-icon",
381
+ "aria-hidden": "true"
382
+ }, ct = {
383
+ key: 1,
384
+ class: "theme-icon",
385
+ "aria-hidden": "true"
386
+ }, dt = /* @__PURE__ */ x({
387
+ __name: "Header",
388
+ props: {
389
+ menuType: {
390
+ default: "header"
391
+ },
392
+ showUserPanel: {
393
+ type: Boolean,
394
+ default: !0
395
+ },
396
+ showThemeToggle: {
397
+ type: Boolean,
398
+ default: !0
399
+ },
400
+ theme: {
401
+ default: "light"
402
+ }
403
+ },
404
+ setup(h) {
405
+ const e = h, {
406
+ brandLogoUrl: p,
407
+ brandName: f,
408
+ navigateToAppHome: i
409
+ } = Z(), {
410
+ signOut: _
411
+ } = Q(), {
412
+ menus: v
413
+ } = ee(e.menuType), k = A(""), $ = X(), b = Y();
414
+ async function M() {
415
+ await _(), i();
416
+ }
417
+ function t(l) {
418
+ const m = l.path;
419
+ ne(() => {
420
+ $.push(m), k.value = m, window.scrollTo({
421
+ top: 0,
422
+ behavior: "smooth"
423
+ });
424
+ });
425
+ }
426
+ function d() {
427
+ ye(e.theme === "dark" ? "light" : "dark");
428
+ }
429
+ return N(() => [b.path, v.value], () => {
430
+ k.value = te(v.value, b.path, {
431
+ // Header 中,子菜单匹配时返回父菜单路径
432
+ returnParentOnChildMatch: !0,
433
+ // 后备查找函数
434
+ fallback: (l) => oe(b.matched, e.menuType, l)
435
+ });
436
+ }, {
437
+ immediate: !0,
438
+ deep: !0
439
+ }), (l, m) => (o(), a("header", st, [s("div", at, [s("div", rt, [r(pe, {
440
+ icon: c(p),
441
+ name: c(f),
442
+ onTo: c(i)
443
+ }, null, 8, ["icon", "name", "onTo"])]), s("div", it, [r(ot, {
444
+ menus: c(v),
445
+ activateKey: k.value,
446
+ theme: e.theme,
447
+ onChange: t
448
+ }, null, 8, ["menus", "activateKey", "theme"]), e.showThemeToggle ? (o(), a("button", {
449
+ key: 0,
450
+ type: "button",
451
+ class: "theme-toggle",
452
+ "aria-label": e.theme === "dark" ? "切换为浅色" : "切换为深色",
453
+ onClick: d
454
+ }, [e.theme === "dark" ? (o(), a("span", lt, [...m[0] || (m[0] = [s("svg", {
455
+ xmlns: "http://www.w3.org/2000/svg",
456
+ width: "20",
457
+ height: "20",
458
+ viewBox: "0 0 24 24",
459
+ fill: "none",
460
+ stroke: "currentColor",
461
+ "stroke-width": "2",
462
+ "stroke-linecap": "round",
463
+ "stroke-linejoin": "round"
464
+ }, [s("circle", {
465
+ cx: "12",
466
+ cy: "12",
467
+ r: "4"
468
+ }), s("path", {
469
+ d: "M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"
470
+ })], -1)])])) : (o(), a("span", ct, [...m[1] || (m[1] = [s("svg", {
471
+ xmlns: "http://www.w3.org/2000/svg",
472
+ width: "20",
473
+ height: "20",
474
+ viewBox: "0 0 24 24",
475
+ fill: "none",
476
+ stroke: "currentColor",
477
+ "stroke-width": "2",
478
+ "stroke-linecap": "round",
479
+ "stroke-linejoin": "round"
480
+ }, [s("path", {
481
+ d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"
482
+ })], -1)])]))], 8, ut)) : I("", !0), e.showUserPanel ? (o(), J(ae, {
483
+ key: 1
484
+ }, {
485
+ items: P(() => [r(re), r(ie), r(ue), r(le), r(ce), r(de), r(D, {
486
+ icon: "lucide:home",
487
+ onClick: c(i)
488
+ }, {
489
+ default: P(() => [...m[2] || (m[2] = [H("主页", -1)])]),
490
+ _: 1
491
+ }, 8, ["onClick"]), r(D, {
492
+ icon: "lucide:log-out",
493
+ danger: "",
494
+ onClick: M
495
+ }, {
496
+ default: P(() => [...m[3] || (m[3] = [H("退出登录", -1)])]),
497
+ _: 1
498
+ })]),
499
+ _: 1
500
+ })) : I("", !0), r(me)])])]));
501
+ }
502
+ }), mt = /* @__PURE__ */ S(dt, [["__scopeId", "data-v-86f0336c"]]), pt = {
503
+ class: "layout-inner"
504
+ }, ht = "none", ft = "var(--huyooo-layout-dark-background)", _t = /* @__PURE__ */ x({
505
+ __name: "DefaultLayout",
506
+ props: {
507
+ menuType: {
508
+ default: "header"
509
+ },
510
+ showUserPanel: {
511
+ type: Boolean,
512
+ default: !0
513
+ },
514
+ showThemeToggle: {
515
+ type: Boolean,
516
+ default: !0
517
+ },
518
+ enableRoutePermission: {
519
+ type: Boolean,
520
+ default: !0
521
+ },
522
+ backgroundImage: {
523
+ default: ""
524
+ },
525
+ theme: {
526
+ default: void 0
527
+ }
528
+ },
529
+ setup(h) {
530
+ var b, M;
531
+ const e = h, {
532
+ appsData: p
533
+ } = ge(), f = A(typeof window < "u" && ((M = (b = window.matchMedia) == null ? void 0 : b.call(window, "(prefers-color-scheme: dark)")) == null ? void 0 : M.matches));
534
+ function i() {
535
+ var t, d;
536
+ typeof window > "u" || (f.value = ((d = (t = window.matchMedia) == null ? void 0 : t.call(window, "(prefers-color-scheme: dark)")) == null ? void 0 : d.matches) ?? !1);
537
+ }
538
+ let _;
539
+ G(() => {
540
+ var d, l;
541
+ i();
542
+ const t = (d = window.matchMedia) == null ? void 0 : d.call(window, "(prefers-color-scheme: dark)");
543
+ (l = t == null ? void 0 : t.addEventListener) == null || l.call(t, "change", i), _ = () => {
544
+ var m;
545
+ return (m = t == null ? void 0 : t.removeEventListener) == null ? void 0 : m.call(t, "change", i);
546
+ };
547
+ });
548
+ const v = L(() => {
549
+ var m, U;
550
+ const t = e.theme;
551
+ if (t && t !== "system") return t;
552
+ if (t === "system") return f.value ? "dark" : "light";
553
+ const d = be.value;
554
+ if (d === "dark" || d === "light") return d;
555
+ if (d === "system") return f.value ? "dark" : "light";
556
+ const l = (U = (m = p.value) == null ? void 0 : m.brand) == null ? void 0 : U.theme;
557
+ return l === "dark" || l === "light" ? l : "light";
558
+ }), k = L(() => e.backgroundImage ? e.backgroundImage : v.value === "dark" ? ft : ht), $ = L(() => {
559
+ const t = k.value;
560
+ return !t || t === "none" ? {
561
+ backgroundImage: "none",
562
+ backgroundColor: "transparent"
563
+ } : {
564
+ backgroundImage: t,
565
+ backgroundAttachment: "fixed"
566
+ };
567
+ });
568
+ return N(v, (t) => {
569
+ typeof document > "u" || (t === "dark" ? (document.body.setAttribute("arco-theme", "dark"), document.body.classList.add("dark")) : (document.body.removeAttribute("arco-theme"), document.body.classList.remove("dark")));
570
+ }, {
571
+ immediate: !0
572
+ }), F(() => {
573
+ _ == null || _();
574
+ }), e.enableRoutePermission && se(), (t, d) => (o(), a("div", {
575
+ class: C(["layout", {
576
+ "layout--dark": v.value === "dark"
577
+ }]),
578
+ style: O($.value)
579
+ }, [r(mt, {
580
+ "menu-type": e.menuType,
581
+ "show-user-panel": e.showUserPanel,
582
+ "show-theme-toggle": e.showThemeToggle,
583
+ theme: v.value
584
+ }, null, 8, ["menu-type", "show-user-panel", "show-theme-toggle", "theme"]), s("main", pt, [z(t.$slots, "default", {}, void 0, !0)])], 6));
585
+ }
586
+ }), on = /* @__PURE__ */ S(_t, [["__scopeId", "data-v-3eddc805"]]), vt = /* @__PURE__ */ x({
587
+ __name: "Gradientbackground",
588
+ props: {
589
+ width: {
590
+ type: String,
591
+ default: "100%"
592
+ },
593
+ height: {
594
+ type: String,
595
+ default: "100%"
596
+ },
597
+ zIndex: {
598
+ type: String,
599
+ default: "-1"
600
+ },
601
+ top: {
602
+ type: String,
603
+ default: "10%"
604
+ },
605
+ left: {
606
+ type: String,
607
+ default: "0%"
608
+ },
609
+ right: {
610
+ type: String,
611
+ default: "auto"
612
+ },
613
+ blur: {
614
+ type: String,
615
+ default: "0px"
616
+ },
617
+ background: {
618
+ type: String,
619
+ required: !1,
620
+ default: () => "var(--huyooo-gradient-background)"
621
+ }
622
+ },
623
+ setup(h) {
624
+ const e = h, p = L(() => ({
625
+ pointerEvents: "none",
626
+ position: "absolute",
627
+ zIndex: e.zIndex,
628
+ width: e.width,
629
+ height: e.height,
630
+ filter: `blur(${e.blur})`
631
+ })), f = L(() => ({
632
+ width: "100%",
633
+ height: "100%",
634
+ background: e.background
635
+ }));
636
+ return (i, _) => (o(), a("div", {
637
+ class: "ellipsis",
638
+ style: O(p.value)
639
+ }, [s("div", {
640
+ class: "ellipsis-item",
641
+ style: O(f.value)
642
+ }, null, 4)], 4));
643
+ }
644
+ }), sn = /* @__PURE__ */ S(vt, [["__scopeId", "data-v-64c41f65"]]), gt = {
645
+ class: "SvgIcon"
646
+ }, yt = ["href", "fill"], bt = /* @__PURE__ */ x({
647
+ __name: "SvgIcon",
648
+ props: {
649
+ prefix: {
650
+ type: String,
651
+ required: !1,
652
+ default: "icon"
653
+ },
654
+ name: {
655
+ type: String,
656
+ required: !0
657
+ },
658
+ color: {
659
+ type: String,
660
+ required: !1,
661
+ default: "currentColor"
662
+ }
663
+ },
664
+ setup(h) {
665
+ const e = h, p = L(() => `#${e.prefix ?? "icon"}-${e.name}`);
666
+ return (f, i) => (o(), a("svg", gt, [s("use", {
667
+ href: p.value,
668
+ fill: e.color
669
+ }, null, 8, yt)]));
670
+ }
671
+ }), an = /* @__PURE__ */ S(bt, [["__scopeId", "data-v-9d0b08a0"]]), kt = {}, wt = {
672
+ class: "WidthContainer"
673
+ };
674
+ function Mt(h, e) {
675
+ return o(), a("div", wt, [z(h.$slots, "default", {}, void 0, !0)]);
676
+ }
677
+ const rn = /* @__PURE__ */ S(kt, [["render", Mt], ["__scopeId", "data-v-d06aac1f"]]);
678
+ export {
679
+ tn as A,
680
+ nn as C,
681
+ on as D,
682
+ sn as G,
683
+ mt as H,
684
+ an as S,
685
+ rn as W,
686
+ Ie as a,
687
+ ot as b
688
+ };
package/dist/authkit.js CHANGED
@@ -1,12 +1,12 @@
1
- import { A as s, B as i, a as e, _ as u, b as h, O as A, P as o, c as r, d as n, e as k, f as d, S as g, g as l, h as p, u as P, i as f } from "./AuthkitAppSetting-ZopA9Gjq.js";
2
- import { A as m, a as S, b as L, c as O, d as U, E as w, e as x, f as B, g as D, O as E, h as b, P as y, i as C, j as I, _ as v, R as V, S as _, k as R, l as T, m as G, n as M, o as j, p as z, L as F } from "./LegalDocViewer-wbdoeWU9.js";
3
- import { u as Y } from "./useAuthkitAppsAuthPageInfo-KHO1mJvF.js";
4
- import { u as H } from "./useAuthkitAuth-C0fVP17l.js";
1
+ import { A as s, B as i, a as e, _ as u, b as h, O as A, P as o, c as r, d as n, e as k, f as d, S as g, g as l, h as p, u as P, i as f } from "./AuthkitAppSetting-DhLRYlL_.js";
2
+ import { A as m, a as S, b as L, c as O, d as U, E as w, e as x, f as B, g as D, O as E, h as b, P as y, i as C, j as I, _ as v, R as V, S as _, k as R, l as T, m as G, n as M, o as j, p as z, L as F } from "./LegalDocViewer-DkVW9tCh.js";
3
+ import { u as Y } from "./useAuthkitAppsAuthPageInfo-mv7hOnhi.js";
4
+ import { u as H } from "./useAuthkitAuth-CO61XogP.js";
5
5
  import { u as N } from "./apiClients-8_c5cDW5.js";
6
- import { u as W } from "./useEnsureAuthenticated-BdXJDqVv.js";
7
- import { L as Z, a as $, b as tt, i as at, o as st, r as it, c as et, u as ut } from "./useLegalDocs-BCWvu1ft.js";
8
- import { f as At } from "./fetchAuthPageAboutUs-D5w21LkF.js";
9
- import { u as rt } from "./useAuthkitUsersProfile-BvldvaRx.js";
6
+ import { u as W } from "./useEnsureAuthenticated-Q7EHguY4.js";
7
+ import { L as Z, a as $, b as tt, i as at, o as st, r as it, c as et, u as ut } from "./useLegalDocs-DUbab5R9.js";
8
+ import { f as At } from "./fetchAuthPageAboutUs--dArFYk6.js";
9
+ import { u as rt } from "./useAuthkitUsersProfile-CF7t2Y7T.js";
10
10
  import { u as kt } from "./useAuthkitCreateAndUpdate-CYIcEuub.js";
11
11
  export {
12
12
  s as AuthkitAppSetting,