@huyooo/ui 0.11.5 → 0.11.7

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 (47) hide show
  1. package/dist/{AuthkitAppSetting-CSHkDxQT.js → AuthkitAppSetting-DrX6fwKt.js} +11 -10
  2. package/dist/{useEnsureAuthenticated-Cc64hF1O.js → AuthkitGithubBinding-r2oVuCSV.js} +631 -680
  3. package/dist/{Clipboard-CRZDADLE.js → Clipboard-ChMNfcO5.js} +1 -1
  4. package/dist/{Contact-Y0Yczmc9.js → Contact-Yqmjh47e.js} +2 -2
  5. package/dist/{FeedbackItem-D7MpOmoM.js → FeedbackItem-DHp_C0pN.js} +3 -3
  6. package/dist/{FeedbackModal-CvNF1D-5.js → FeedbackModal-Dzl0Alp7.js} +3 -3
  7. package/dist/{MessageHandle-B12koVQL.js → MessageHandle-BcRjYeVi.js} +2 -2
  8. package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-DxDn6Ok8.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-BOtgTje-.js} +2 -2
  9. package/dist/{PaySubscriptions-B8jAtG5n.js → PaySubscriptions-BsU0XmXf.js} +2 -2
  10. package/dist/PricingPlans-Cf20-GqK.js +251 -0
  11. package/dist/{ReferrerReferees-D_Iiw9wZ.js → ReferrerReferees-B-ISyXHw.js} +4 -4
  12. package/dist/{Upload.vue_vue_type_script_setup_true_lang-CbVSY_vt.js → Upload.vue_vue_type_script_setup_true_lang-CDWyo3RL.js} +1 -1
  13. package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-DpVadjMH.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-Czix4_tj.js} +8 -8
  14. package/dist/{WidthContainer-B6d4xrGT.js → WidthContainer-CYYbzXj0.js} +20 -19
  15. package/dist/{apiClients-DVz12LeW.js → apiClients-KFp-rs-C.js} +19 -19
  16. package/dist/authkit.js +31 -29
  17. package/dist/common/globalConfig.d.ts +2 -0
  18. package/dist/common.js +1 -1
  19. package/dist/composables/Billing/useBillingPlans.d.ts +29 -1
  20. package/dist/composables.js +41 -40
  21. package/dist/feedback.js +3 -3
  22. package/dist/main.d.ts +1 -0
  23. package/dist/main.js +674 -642
  24. package/dist/message.js +3 -3
  25. package/dist/pay.js +3 -3
  26. package/dist/privateCom.js +1 -1
  27. package/dist/referrer.js +1 -1
  28. package/dist/style.css +1 -1
  29. package/dist/upload.js +2 -2
  30. package/dist/{useAuthkitAppsAuthPageInfo-Du5d6VK-.js → useAuthkitAppsAuthPageInfo-B9_VzVkQ.js} +1 -1
  31. package/dist/useAuthkitAuth-Doj5VYjK.js +170 -0
  32. package/dist/{useAuthkitCreateAndUpdate-Bc9D5C6R.js → useAuthkitCreateAndUpdate-DomftQMK.js} +1 -1
  33. package/dist/useAuthkitUsersProfile-FJnHJad-.js +36 -0
  34. package/dist/{useDownloads-BFx1a-f9.js → useDownloads-CzC3gLUV.js} +1 -1
  35. package/dist/useEnsureAuthenticated-D78tsddF.js +56 -0
  36. package/dist/{useLegalLinks-Deksq9h-.js → useLegalLinks-OGVbqXVy.js} +2 -2
  37. package/dist/{useMessageNotifications-DY5xKtif.js → useMessageNotifications-DeHFJFcX.js} +1 -1
  38. package/dist/{useSEO-CvfzTZA9.js → useSEO-BZhVKEZr.js} +2 -2
  39. package/dist/useSubscriptionCheckout-BubIsxjO.js +386 -0
  40. package/dist/{useTableHandle-D71P3Ez_.js → useTableHandle-jw0P7-2a.js} +1 -1
  41. package/dist/{useUploadCos-N5pim6q1.js → useUploadCos-keDKcs0j.js} +1 -1
  42. package/dist/user.js +1 -1
  43. package/dist/utils/legacyApi.d.ts +18 -0
  44. package/package.json +1 -1
  45. package/dist/PricingPlans-CO26OcbJ.js +0 -210
  46. package/dist/useAuthkitUsersProfile-CQGyvL7g.js +0 -201
  47. package/dist/useSubscriptionCheckout-BgQJN61l.js +0 -345
package/dist/upload.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as p } from "./Upload.vue_vue_type_script_setup_true_lang-CbVSY_vt.js";
2
- import { u as s } from "./useUploadCos-N5pim6q1.js";
1
+ import { _ as p } from "./Upload.vue_vue_type_script_setup_true_lang-CDWyo3RL.js";
2
+ import { u as s } from "./useUploadCos-keDKcs0j.js";
3
3
  export {
4
4
  p as Upload,
5
5
  s as useUploadCos
@@ -1,5 +1,5 @@
1
1
  import { ref as n } from "vue";
2
- import { e as u } from "./apiClients-DVz12LeW.js";
2
+ import { e as u } from "./apiClients-KFp-rs-C.js";
3
3
  const a = n({
4
4
  id: "",
5
5
  appKey: "",
@@ -0,0 +1,170 @@
1
+ import { ref as s, readonly as P } from "vue";
2
+ import { e as c } from "./apiClients-KFp-rs-C.js";
3
+ const a = s("signIn"), m = /* @__PURE__ */ new Set(), I = /* @__PURE__ */ new Set(), S = /* @__PURE__ */ new Set(), v = /* @__PURE__ */ new Set(), t = s(null), p = "jwtToken";
4
+ function k() {
5
+ try {
6
+ const e = localStorage.getItem(p);
7
+ if (e)
8
+ return t.value = e, !0;
9
+ } catch (e) {
10
+ console.warn("Failed to access localStorage:", e);
11
+ }
12
+ return !1;
13
+ }
14
+ function U() {
15
+ try {
16
+ const e = new URL(window.location.href), r = e.searchParams.get("token");
17
+ if (!r) return !1;
18
+ const i = e.searchParams.get("userId"), d = e.searchParams.get("appId"), f = e.searchParams.get("needBindIdentity") === "true";
19
+ u(r), ["token", "userId", "appId", "needBindIdentity"].forEach((w) => e.searchParams.delete(w));
20
+ const h = `${e.pathname}${e.search}${e.hash}`;
21
+ return window.history.replaceState({}, "", h), g({
22
+ jwtToken: r,
23
+ userId: i,
24
+ appId: d,
25
+ needBindIdentity: f
26
+ }), !0;
27
+ } catch (e) {
28
+ return console.warn("Failed to handle OAuth callback:", e), !1;
29
+ }
30
+ }
31
+ function L() {
32
+ return U() ? !0 : k();
33
+ }
34
+ function E() {
35
+ return t.value || k() ? t.value : null;
36
+ }
37
+ function u(e) {
38
+ t.value = e;
39
+ try {
40
+ localStorage.setItem(p, e);
41
+ } catch (r) {
42
+ console.warn("Failed to save token to localStorage:", r);
43
+ }
44
+ }
45
+ function O(e) {
46
+ u(e.jwtToken), g(e);
47
+ }
48
+ function V() {
49
+ t.value = null;
50
+ try {
51
+ localStorage.removeItem(p);
52
+ } catch (e) {
53
+ console.warn("Failed to clear localStorage:", e);
54
+ }
55
+ b();
56
+ }
57
+ function l(e, r) {
58
+ return e.add(r), () => {
59
+ e.delete(r);
60
+ };
61
+ }
62
+ function g(e) {
63
+ m.forEach((r) => {
64
+ r(e);
65
+ });
66
+ }
67
+ function j() {
68
+ I.forEach((e) => void e());
69
+ }
70
+ function A() {
71
+ S.forEach((e) => void e());
72
+ }
73
+ function b() {
74
+ v.forEach((e) => void e());
75
+ }
76
+ function F(e) {
77
+ return l(m, e);
78
+ }
79
+ function R(e) {
80
+ return l(I, e);
81
+ }
82
+ function B(e) {
83
+ return l(S, e);
84
+ }
85
+ function $(e) {
86
+ return l(v, e);
87
+ }
88
+ function x() {
89
+ const e = s(!1), r = s(!1), i = s(!1);
90
+ async function d(n) {
91
+ e.value = !0;
92
+ const {
93
+ data: o
94
+ } = await c.auth.signIn.unified.post({
95
+ identifier: n.identifier || n.email || "",
96
+ password: n.password,
97
+ code: n.code,
98
+ emailVerifyId: n.emailVerifyId,
99
+ method: n.method || "password"
100
+ });
101
+ e.value = !1, o && (u(o.jwtToken), g(o));
102
+ }
103
+ async function f(n) {
104
+ r.value = !0;
105
+ const {
106
+ error: o
107
+ } = n.type === "phone" ? await c.auth.signUp.phone.post({
108
+ phone: n.phone || "",
109
+ code: n.code || "",
110
+ password: n.password,
111
+ referrerId: n.referrerId
112
+ }) : await c.auth.signUp.post({
113
+ email: n.email || "",
114
+ userToken: n.userToken || "",
115
+ emailVerifyId: n.emailVerifyId || "",
116
+ password: n.password || "",
117
+ referrerId: n.referrerId
118
+ });
119
+ r.value = !1, o || (a.value = "signIn", j());
120
+ }
121
+ async function h(n) {
122
+ i.value = !0;
123
+ const {
124
+ error: o
125
+ } = await c.auth.resetPassword.post({
126
+ method: n.method || "email",
127
+ email: n.email,
128
+ phone: n.phone,
129
+ userToken: n.userToken,
130
+ code: n.code,
131
+ emailVerifyId: n.emailVerifyId,
132
+ password: n.password
133
+ });
134
+ i.value = !1, o || (a.value = "signIn", A());
135
+ }
136
+ function w() {
137
+ a.value = "signUp";
138
+ }
139
+ function y() {
140
+ a.value = "resetPassword";
141
+ }
142
+ function T() {
143
+ a.value = "signIn";
144
+ }
145
+ return {
146
+ signInSubmit: d,
147
+ signUpSubmit: f,
148
+ resetPasswordSubmit: h,
149
+ currentView: a,
150
+ authSignInLoading: e,
151
+ authSignUpLoading: r,
152
+ resetPasswordLoading: i,
153
+ switchSignUp: w,
154
+ switchResetPassword: y,
155
+ switchSignIn: T,
156
+ onSignIn: F,
157
+ onSignUp: R,
158
+ onResetPassword: B,
159
+ onSignOut: $,
160
+ jwtToken: P(t),
161
+ getToken: E,
162
+ setToken: u,
163
+ completeSignIn: O,
164
+ restoreSession: L,
165
+ clearAuth: V
166
+ };
167
+ }
168
+ export {
169
+ x as u
170
+ };
@@ -1,5 +1,5 @@
1
1
  /* empty css */
2
- import "./apiClients-DVz12LeW.js";
2
+ import "./apiClients-KFp-rs-C.js";
3
3
  import { Message as u } from "@arco-design/web-vue";
4
4
  import { ref as e } from "vue";
5
5
  function h(s) {
@@ -0,0 +1,36 @@
1
+ import { ref as l, computed as f } from "vue";
2
+ import { e as c } from "./apiClients-KFp-rs-C.js";
3
+ import { u as i } from "./useAuthkitAuth-Doj5VYjK.js";
4
+ const o = l(null), u = l(!1), t = l(!1), r = f(() => !!o.value);
5
+ async function v() {
6
+ const {
7
+ getToken: n,
8
+ clearAuth: a
9
+ } = i();
10
+ if (!n()) {
11
+ console.warn("No authentication token found"), o.value = null;
12
+ return;
13
+ }
14
+ u.value = !0, t.value = !1;
15
+ const {
16
+ data: s,
17
+ error: e
18
+ } = await c.users.profile.post({});
19
+ u.value = !1, s ? (o.value = s, t.value = !0) : (o.value = null, t.value = !1, ((e == null ? void 0 : e.code) === 401 || (e == null ? void 0 : e.code) === 40101) && (console.warn("认证已过期,清除认证状态"), a()));
20
+ }
21
+ function d() {
22
+ o.value = null;
23
+ }
24
+ function P() {
25
+ return {
26
+ userProfile: o,
27
+ loading: u,
28
+ usersProfileSuccess: t,
29
+ isLoggedIn: r,
30
+ fetchUserProfile: v,
31
+ clearUserProfile: d
32
+ };
33
+ }
34
+ export {
35
+ P as u
36
+ };
@@ -1,5 +1,5 @@
1
1
  /* empty css */
2
- import { g as f } from "./apiClients-DVz12LeW.js";
2
+ import { g as f } from "./apiClients-KFp-rs-C.js";
3
3
  import { Message as u } from "@arco-design/web-vue";
4
4
  import { ref as e } from "vue";
5
5
  function g(s) {
@@ -0,0 +1,56 @@
1
+ import { computed as f } from "vue";
2
+ import { u as r } from "./useAuthkitAuth-Doj5VYjK.js";
3
+ import { u as d } from "./apiClients-KFp-rs-C.js";
4
+ const A = "jwtToken";
5
+ let e = null, i = !1;
6
+ async function h(n) {
7
+ n.intent && await n.intent();
8
+ }
9
+ function g() {
10
+ if (i) return;
11
+ i = !0;
12
+ const {
13
+ onSignIn: n
14
+ } = r();
15
+ n(() => {
16
+ const t = e;
17
+ e = null, t && h(t);
18
+ });
19
+ }
20
+ function o() {
21
+ try {
22
+ return localStorage.getItem(A);
23
+ } catch {
24
+ return null;
25
+ }
26
+ }
27
+ function k() {
28
+ g();
29
+ const {
30
+ jwtToken: n
31
+ } = r(), {
32
+ open: t
33
+ } = d(), c = f(() => !!(n.value || o()));
34
+ function u() {
35
+ return !!(n.value || o());
36
+ }
37
+ function l(a) {
38
+ return u() ? !0 : (e = {
39
+ intent: a ?? null
40
+ }, t({
41
+ view: "signIn"
42
+ }), !1);
43
+ }
44
+ function s() {
45
+ e = null;
46
+ }
47
+ return {
48
+ isAuthenticatedRef: c,
49
+ isAuthenticated: u,
50
+ ensureAuthenticated: l,
51
+ clearPendingIntent: s
52
+ };
53
+ }
54
+ export {
55
+ k as u
56
+ };
@@ -1,6 +1,6 @@
1
1
  import { computed as c } from "vue";
2
- import { g as L } from "./apiClients-DVz12LeW.js";
3
- import { u as m } from "./useAuthkitAppsAuthPageInfo-Du5d6VK-.js";
2
+ import { g as L } from "./apiClients-KFp-rs-C.js";
3
+ import { u as m } from "./useAuthkitAppsAuthPageInfo-B9_VzVkQ.js";
4
4
  const l = {
5
5
  userServiceAgreement: "用户服务协议",
6
6
  privacyPolicy: "隐私协议",
@@ -1,5 +1,5 @@
1
1
  import { ref as a, computed as L } from "vue";
2
- import { o as c } from "./apiClients-DVz12LeW.js";
2
+ import { o as c } from "./apiClients-KFp-rs-C.js";
3
3
  function S(f = "system") {
4
4
  const n = a(!0), d = a(""), i = a(!1), g = a(!1), o = a([]), t = a({
5
5
  total: 0,
@@ -1,7 +1,7 @@
1
1
  import { ref as I, computed as d, watch as _, isRef as G, toValue as B, hasInjectionContext as F, inject as J, watchEffect as Q, getCurrentInstance as Z, onBeforeUnmount as X, onDeactivated as Y, onActivated as ee } from "vue";
2
2
  import { useRouter as V, useRoute as K } from "vue-router";
3
- import { u as R } from "./useAuthkitAppsAuthPageInfo-Du5d6VK-.js";
4
- import { a as U } from "./useAuthkitUsersProfile-CQGyvL7g.js";
3
+ import { u as R } from "./useAuthkitAppsAuthPageInfo-B9_VzVkQ.js";
4
+ import { u as U } from "./useAuthkitUsersProfile-FJnHJad-.js";
5
5
  const v = I({
6
6
  key: "",
7
7
  name: ""