@huyooo/ui 2.1.3 → 2.1.6

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 (62) hide show
  1. package/dist/{AuthkitAppSetting-1FsF45E3.js → AuthkitAppSetting-CHVSyEY1.js} +9 -9
  2. package/dist/{Contact-DBG20I8Y.js → Contact-BTQf8tEx.js} +3 -3
  3. package/dist/{CustomTable-HDwqEcmB.js → CustomTable-BY0oHLXc.js} +1 -1
  4. package/dist/{FeedbackModal.vue_vue_type_script_setup_true_lang-hveEkBb4.js → FeedbackModal.vue_vue_type_script_setup_true_lang-FIZdBxIZ.js} +5 -5
  5. package/dist/{LandingPageSectionTabs-BT08gT7_.js → LandingPageSectionTabs-Bl6X2W5W.js} +2 -2
  6. package/dist/{LegalDocViewer-DvsnAv6f.js → LegalDocViewer-DiNoy_oj.js} +10 -10
  7. package/dist/{MessageHandle-BUufez4S.js → MessageHandle-DDGFSJMg.js} +3 -3
  8. package/dist/{MessageList-rttvPmxV.js → MessageList-CE5E_5Uv.js} +1 -1
  9. package/dist/PaySubscriptions-pEZtjp1g.js +1287 -0
  10. package/dist/{PricingPlans-CQaXgOIR.js → PricingPlans-DNPKQwFa.js} +4 -4
  11. package/dist/{ReferrerReferees-CGrH-gYJ.js → ReferrerReferees-t5s4LzbY.js} +4 -4
  12. package/dist/{Upload.vue_vue_type_script_setup_true_lang-CgZQOZYt.js → Upload.vue_vue_type_script_setup_true_lang-DsrqOACa.js} +1 -1
  13. package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-DbkGYZ2f.js +601 -0
  14. package/dist/{WidthContainer-BzU8aEwN.js → WidthContainer-FXZqDMid.js} +10 -10
  15. package/dist/apiClients-CWSwNzGk.js +272 -0
  16. package/dist/authkit.js +10 -10
  17. package/dist/common.js +2 -2
  18. package/dist/components/Authkit/AuthkitAppSetting.vue.d.ts +2 -2
  19. package/dist/components/Feedback/FeedbackModal.vue.d.ts +2 -2
  20. package/dist/components/LandingPage/LandingPageSections.vue.d.ts +1 -1
  21. package/dist/components/Message/MessageTabs.vue.d.ts +2 -2
  22. package/dist/components/Pay/PaySubscriptions.vue.d.ts +2 -2
  23. package/dist/components/UserMenu/UserMenuModals.vue.d.ts +9 -9
  24. package/dist/composables/Billing/useBillingSubscriptionSummary.d.ts +77 -258
  25. package/dist/composables.js +13 -13
  26. package/dist/feedback.js +2 -2
  27. package/dist/{fetchAuthPageAboutUs-DV7ArpNZ.js → fetchAuthPageAboutUs-CLQlGhQy.js} +2 -2
  28. package/dist/{index-Cn6LcfZO.js → index-BYH7DaQf.js} +1 -1
  29. package/dist/landingPage.js +1 -1
  30. package/dist/main.js +117 -116
  31. package/dist/message.js +5 -5
  32. package/dist/pay.d.ts +1 -1
  33. package/dist/pay.js +18 -17
  34. package/dist/privateCom.js +1 -1
  35. package/dist/referrer.js +1 -1
  36. package/dist/{runtime-Dp7MgwhI.js → runtime-DDJRAtkv.js} +1 -1
  37. package/dist/style.css +1 -1
  38. package/dist/types/api/billing.generated.d.ts +2 -2
  39. package/dist/types/subscription.d.ts +57 -0
  40. package/dist/types/user.d.ts +3 -0
  41. package/dist/upload.js +2 -2
  42. package/dist/{useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js → useAuthkitAppsAuthPageInfo-2izIyMfu.js} +6 -2
  43. package/dist/{useAuthkitAuth-cHrJMM8E.js → useAuthkitAuth-CWHJs8zY.js} +2 -2
  44. package/dist/{useAuthkitCreateAndUpdate-Bbv7vZZn.js → useAuthkitCreateAndUpdate-COI5KVPJ.js} +1 -1
  45. package/dist/useAuthkitUsersProfile-D4H_Gxgd.js +67 -0
  46. package/dist/{useBillingStatusOptions-Br-iL77Z.js → useBillingStatusOptions-C6edto7H.js} +1 -1
  47. package/dist/useBillingSubscriptionSummary-BC3G0N4t.js +43 -0
  48. package/dist/{useEnsureAuthenticated-C8qS8DLL.js → useEnsureAuthenticated-RZ1DflLz.js} +2 -2
  49. package/dist/{useLegalDocs-C4qk5CTb.js → useLegalDocs-xXYvYpPC.js} +2 -2
  50. package/dist/{useMessageNotifications-D9uikt21.js → useMessageNotifications-pxa5LHjV.js} +1 -1
  51. package/dist/{usePageSEO-Dl6_kBWP.js → usePageSEO-B3stKP3n.js} +2 -2
  52. package/dist/{useRoutePermission-DYPZgvYv.js → useRoutePermission-CGq_LIZM.js} +3 -3
  53. package/dist/useSubscriptionCheckout-3BtQARep.js +388 -0
  54. package/dist/user.js +1 -1
  55. package/dist/utils/passkeySupport.d.ts +1 -1
  56. package/dist/utils/subscriptionDisplay.d.ts +6 -6
  57. package/package.json +1 -1
  58. package/dist/PaySubscriptions-Bv6LQ_Pf.js +0 -1331
  59. package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-Di-VAlur.js +0 -598
  60. package/dist/apiClients-Ctcq8NZs.js +0 -245
  61. package/dist/useAuthkitUsersProfile-8FzLTfUJ.js +0 -55
  62. package/dist/useSubscriptionCheckout-CYU2Ke0y.js +0 -353
@@ -287,7 +287,7 @@ export type Api = {
287
287
  };
288
288
  };
289
289
  summary: {
290
- /** 获取当前用户订阅、配额、积分和待支付账单摘要 */
290
+ /** 获取当前用户订阅快照(产品、价格、权益、配额、积分) */
291
291
  post: {
292
292
  return: any;
293
293
  };
@@ -3581,7 +3581,7 @@ export interface ApiClient {
3581
3581
  }, config?: RequestConfig) => RequestBuilder<any>;
3582
3582
  };
3583
3583
  summary: {
3584
- /** 获取当前用户订阅、配额、积分和待支付账单摘要 */
3584
+ /** 获取当前用户订阅快照(产品、价格、权益、配额、积分) */
3585
3585
  post: (config?: RequestConfig) => RequestBuilder<any>;
3586
3586
  };
3587
3587
  userDetail: {
@@ -0,0 +1,57 @@
1
+ /** 与 billing / profile.subscription 对齐的用户订阅快照 */
2
+ export interface UserSubscriptionSnapshotFeature {
3
+ key: string;
4
+ name?: string;
5
+ description?: string;
6
+ type: string;
7
+ value?: boolean | number | string | null;
8
+ highlight?: boolean;
9
+ }
10
+ export interface UserSubscriptionSnapshotQuota {
11
+ id: string;
12
+ featureKey: string;
13
+ name: string;
14
+ description?: string;
15
+ limit: number;
16
+ used: number;
17
+ remaining: number;
18
+ unlimited: boolean;
19
+ period: string;
20
+ resetsAt: string | null;
21
+ percentage: number;
22
+ }
23
+ export interface UserSubscriptionSnapshotEntitlement {
24
+ kind: 'plan' | 'beta';
25
+ status: string;
26
+ startAt: string | null;
27
+ endAt: string | null;
28
+ acquiredBy: 'subscribe' | 'free' | 'grant';
29
+ grantType?: 'backfill' | 'beta' | null;
30
+ sourceId: string;
31
+ cancelAtPeriodEnd?: boolean;
32
+ pendingChange?: Record<string, unknown> | null;
33
+ }
34
+ export interface UserSubscriptionSnapshot {
35
+ syncedAt: string;
36
+ product: {
37
+ id: string;
38
+ name: string;
39
+ description?: string | null;
40
+ } | null;
41
+ price: {
42
+ id: string;
43
+ nickname?: string | null;
44
+ type: string;
45
+ interval?: string | null;
46
+ intervalCount?: number | null;
47
+ unitAmount?: number | null;
48
+ currency?: string | null;
49
+ } | null;
50
+ entitlement: UserSubscriptionSnapshotEntitlement | null;
51
+ features: UserSubscriptionSnapshotFeature[];
52
+ quotas: UserSubscriptionSnapshotQuota[];
53
+ pointsBalance: {
54
+ totalPoints: number;
55
+ updateAt: string | null;
56
+ } | null;
57
+ }
@@ -1,3 +1,4 @@
1
+ import { UserSubscriptionSnapshot } from './subscription';
1
2
  export type UserStatusType = 'inactive' | 'normal';
2
3
  export interface BaseEntity {
3
4
  id: string;
@@ -105,6 +106,8 @@ export interface UserProfileType extends AuditableEntity, UserBaseInfo {
105
106
  personalInviteCode: string;
106
107
  role: RoleInfo | null;
107
108
  permissions: PermissionInfo[];
109
+ /** 订阅快照(产品 / 价格 / 权益 / 配额) */
110
+ subscription?: UserSubscriptionSnapshot | null;
108
111
  creatorInfo?: OperatorInfo;
109
112
  updatorInfo?: OperatorInfo;
110
113
  }
package/dist/upload.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as o } from "./Upload.vue_vue_type_script_setup_true_lang-CgZQOZYt.js";
2
- import { b as s, d as p } from "./runtime-Dp7MgwhI.js";
1
+ import { _ as o } from "./Upload.vue_vue_type_script_setup_true_lang-DsrqOACa.js";
2
+ import { b as s, d as p } from "./runtime-DDJRAtkv.js";
3
3
  export {
4
4
  o as Upload,
5
5
  s as createBrowserCosTransport,
@@ -1,5 +1,5 @@
1
1
  import { ref as r } from "vue";
2
- import { g as s } from "./apiClients-Ctcq8NZs.js";
2
+ import { g as s } from "./apiClients-CWSwNzGk.js";
3
3
  function i() {
4
4
  return {
5
5
  type: "doc",
@@ -100,7 +100,11 @@ async function g() {
100
100
  const {
101
101
  data: e,
102
102
  error: l
103
- } = await s().auth.apps.authPageInfo.post({});
103
+ } = await s().auth.apps.authPageInfo.post({
104
+ meta: {
105
+ silentError: !0
106
+ }
107
+ });
104
108
  n.value = !1, !(l || !e) && (f(e), t.value = !0);
105
109
  }
106
110
  function d() {
@@ -1,6 +1,6 @@
1
1
  import { ref as u, computed as h, nextTick as _, readonly as x } from "vue";
2
- import { o as M, g as m, r as $, s as F } from "./apiClients-Ctcq8NZs.js";
3
- import { u as D } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
2
+ import { o as M, g as m, r as $, s as F } from "./apiClients-CWSwNzGk.js";
3
+ import { u as D } from "./useAuthkitAppsAuthPageInfo-2izIyMfu.js";
4
4
  const g = u(!1), w = u(!1);
5
5
  let I;
6
6
  const G = "请先阅读并同意用户协议与隐私政策", K = {
@@ -1,5 +1,5 @@
1
1
  /* empty css */
2
- import "./apiClients-Ctcq8NZs.js";
2
+ import "./apiClients-CWSwNzGk.js";
3
3
  import { Message as u } from "@arco-design/web-vue";
4
4
  import { ref as e } from "vue";
5
5
  function h(o) {
@@ -0,0 +1,67 @@
1
+ import { ref as a, computed as i } from "vue";
2
+ import { g as p } from "./apiClients-CWSwNzGk.js";
3
+ import { u as l } from "./useAuthkitAuth-CWHJs8zY.js";
4
+ const e = a(null), n = a(!1), u = a(!1), s = a(!1);
5
+ function v() {
6
+ s.value = !0;
7
+ }
8
+ function d(t) {
9
+ return t === 401 || t === 40101;
10
+ }
11
+ const h = i(() => !!e.value), m = i(() => {
12
+ if (!s.value || !u.value)
13
+ return "pending";
14
+ if (e.value)
15
+ return "authenticated";
16
+ const {
17
+ getToken: t
18
+ } = l();
19
+ return t() ? "authenticated" : "unauthenticated";
20
+ });
21
+ async function g() {
22
+ const {
23
+ getToken: t,
24
+ clearAuth: f
25
+ } = l();
26
+ if (!t()) {
27
+ e.value = null, u.value = !0;
28
+ return;
29
+ }
30
+ n.value = !0, u.value = !1;
31
+ const {
32
+ data: r,
33
+ error: o
34
+ } = await p().auth.users.profile.post({
35
+ meta: {
36
+ silentError: !0
37
+ }
38
+ });
39
+ if (n.value = !1, r) {
40
+ if (e.value = r, r.subscription) {
41
+ const {
42
+ useBillingSubscriptionSummary: c
43
+ } = await import("./useBillingSubscriptionSummary-BC3G0N4t.js");
44
+ c().hydrateFromProfile(r.subscription);
45
+ }
46
+ } else d(o == null ? void 0 : o.code) && (e.value = null, console.warn("认证已过期,清除认证状态"), f());
47
+ u.value = !0;
48
+ }
49
+ function k() {
50
+ e.value = null, n.value = !1, u.value = !0;
51
+ }
52
+ function b() {
53
+ return {
54
+ userProfile: e,
55
+ loading: n,
56
+ usersProfileReady: u,
57
+ authSessionBootstrapped: s,
58
+ isLoggedIn: h,
59
+ authSessionState: m,
60
+ fetchUserProfile: g,
61
+ clearUserProfile: k,
62
+ markAuthSessionBootstrapped: v
63
+ };
64
+ }
65
+ export {
66
+ b as u
67
+ };
@@ -1,4 +1,4 @@
1
- import { g as s } from "./apiClients-Ctcq8NZs.js";
1
+ import { g as s } from "./apiClients-CWSwNzGk.js";
2
2
  import { ref as c } from "vue";
3
3
  const v = {
4
4
  async productOptions() {
@@ -0,0 +1,43 @@
1
+ import { ref as u, computed as t } from "vue";
2
+ import { g as d } from "./apiClients-CWSwNzGk.js";
3
+ function r() {
4
+ return {
5
+ syncedAt: "",
6
+ product: null,
7
+ price: null,
8
+ entitlement: null,
9
+ features: [],
10
+ quotas: [],
11
+ pointsBalance: null
12
+ };
13
+ }
14
+ const e = u(r()), a = u(!1);
15
+ function B() {
16
+ const o = t(() => e.value.product), l = t(() => e.value.price), s = t(() => e.value.entitlement), i = t(() => e.value.features), c = t(() => e.value.quotas), f = t(() => e.value.pointsBalance);
17
+ async function m() {
18
+ a.value = !0;
19
+ const {
20
+ data: n,
21
+ error: v
22
+ } = await d().billing.subscriptions.summary.post();
23
+ a.value = !1, !v && (e.value = n || r());
24
+ }
25
+ function p(n) {
26
+ n && (e.value = n);
27
+ }
28
+ return {
29
+ summary: e,
30
+ product: o,
31
+ price: l,
32
+ entitlement: s,
33
+ features: i,
34
+ quotas: c,
35
+ pointsBalance: f,
36
+ loading: a,
37
+ refresh: m,
38
+ hydrateFromProfile: p
39
+ };
40
+ }
41
+ export {
42
+ B as useBillingSubscriptionSummary
43
+ };
@@ -1,6 +1,6 @@
1
1
  import { computed as f } from "vue";
2
- import { u as r } from "./useAuthkitAuth-cHrJMM8E.js";
3
- import { u as d } from "./apiClients-Ctcq8NZs.js";
2
+ import { u as r } from "./useAuthkitAuth-CWHJs8zY.js";
3
+ import { u as d } from "./apiClients-CWSwNzGk.js";
4
4
  const A = "jwtToken";
5
5
  let e = null, i = !1;
6
6
  async function h(n) {
@@ -1,6 +1,6 @@
1
1
  import { computed as f } from "vue";
2
- import { u as d } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
3
- import { g as L } from "./runtime-Dp7MgwhI.js";
2
+ import { u as d } from "./useAuthkitAppsAuthPageInfo-2izIyMfu.js";
3
+ import { g as L } from "./runtime-DDJRAtkv.js";
4
4
  const c = {
5
5
  userServiceAgreement: "用户服务协议",
6
6
  privacyPolicy: "隐私协议",
@@ -1,5 +1,5 @@
1
1
  import { ref as a, computed as y } from "vue";
2
- import { g as f } from "./apiClients-Ctcq8NZs.js";
2
+ import { g as f } from "./apiClients-CWSwNzGk.js";
3
3
  function z() {
4
4
  const n = a(!0), d = a(""), i = a(!1), g = a(!1), o = a([]), t = a({
5
5
  total: 0,
@@ -1,8 +1,8 @@
1
1
  /* empty css */
2
- import "./apiClients-Ctcq8NZs.js";
2
+ import "./apiClients-CWSwNzGk.js";
3
3
  import { Message as y } from "@arco-design/web-vue";
4
4
  import { ref as a, computed as s, toValue as A } from "vue";
5
- import { u as N } from "./runtime-Dp7MgwhI.js";
5
+ import { u as N } from "./runtime-DDJRAtkv.js";
6
6
  import { useHead as g, useSeoMeta as w } from "@unhead/vue";
7
7
  import { useRoute as E } from "vue-router";
8
8
  function M(t) {
@@ -1,8 +1,8 @@
1
1
  import { computed as g, ref as L, watch as S } from "vue";
2
2
  import { useRouter as w, useRoute as C } from "vue-router";
3
- import { u as k } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
4
- import { u as M } from "./useAuthkitUsersProfile-8FzLTfUJ.js";
5
- import { u as K } from "./useAuthkitAuth-cHrJMM8E.js";
3
+ import { u as k } from "./useAuthkitAppsAuthPageInfo-2izIyMfu.js";
4
+ import { u as M } from "./useAuthkitUsersProfile-D4H_Gxgd.js";
5
+ import { u as K } from "./useAuthkitAuth-CWHJs8zY.js";
6
6
  function O(e, s = "default") {
7
7
  const n = document;
8
8
  if (n && typeof n.startViewTransition == "function") {