@huyooo/ui 0.11.2 → 0.11.5

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 (98) hide show
  1. package/dist/AuthkitAppSetting-CSHkDxQT.js +1914 -0
  2. package/dist/{Clipboard---tG2Zxz.js → Clipboard-CRZDADLE.js} +1 -1
  3. package/dist/{Contact-BEUbBGiB.js → Contact-Y0Yczmc9.js} +8 -7
  4. package/dist/{CustomTable-CVZ4mFzi.js → CustomTable-BUkwlbzN.js} +3 -2
  5. package/dist/{FeedbackItem-CN041vTm.js → FeedbackItem-D7MpOmoM.js} +3 -3
  6. package/dist/FeedbackModal-CvNF1D-5.js +1050 -0
  7. package/dist/LandingPageFAQ-CZJXvor9.js +80 -0
  8. package/dist/LandingPageLinkGroup-DDNRivMt.js +521 -0
  9. package/dist/LandingPageSectionHeader-D_74W4My.js +69 -0
  10. package/dist/{LandingPageSectionTabs-B6ZVxR47.js → LandingPageSectionTabs-Ce3_Rc2L.js} +354 -426
  11. package/dist/MessageHandle-B12koVQL.js +924 -0
  12. package/dist/MessageList-Bo6YCfRO.js +233 -0
  13. package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-F6neJUg3.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-DxDn6Ok8.js} +2 -2
  14. package/dist/PaySubscriptions-B8jAtG5n.js +515 -0
  15. package/dist/PricingPlans-CO26OcbJ.js +210 -0
  16. package/dist/ReferrerReferees-D_Iiw9wZ.js +106 -0
  17. package/dist/{Upload.vue_vue_type_script_setup_true_lang-D_-oMTOo.js → Upload.vue_vue_type_script_setup_true_lang-CbVSY_vt.js} +1 -1
  18. package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-DpVadjMH.js +508 -0
  19. package/dist/WidthContainer-B6d4xrGT.js +693 -0
  20. package/dist/{apiClients-9b4zNZ2S.js → apiClients-DVz12LeW.js} +81 -75
  21. package/dist/authkit.d.ts +7 -0
  22. package/dist/authkit.js +52 -45
  23. package/dist/common/globalConfig.d.ts +2 -2
  24. package/dist/common/userMenuModal.d.ts +1 -0
  25. package/dist/common.js +2 -2
  26. package/dist/components/Authkit/AppSetting/AuthkitOAuthBinding.vue.d.ts +31 -0
  27. package/dist/components/Authkit/AppSetting/AuthkitPhoneBinding.vue.d.ts +14 -0
  28. package/dist/components/Authkit/AppSetting/AuthkitPhoneVerify.vue.d.ts +66 -0
  29. package/dist/components/Authkit/Auth/AuthkitBindPhone.vue.d.ts +27 -0
  30. package/dist/components/Authkit/Auth/AuthkitEmailUpdate.vue.d.ts +11 -1
  31. package/dist/components/Authkit/Auth/AuthkitOauthCallback.vue.d.ts +2 -2
  32. package/dist/components/Authkit/Auth/AuthkitOauthItem.vue.d.ts +1 -1
  33. package/dist/components/Authkit/Auth/AuthkitPasswordAuth.vue.d.ts +11 -1
  34. package/dist/components/Authkit/Auth/AuthkitPhonePasswordUpdateAndVerify.vue.d.ts +68 -0
  35. package/dist/components/Authkit/Auth/AuthkitSignInEmailCode.vue.d.ts +68 -0
  36. package/dist/components/Authkit/Auth/AuthkitSwitchSignUpOrResetPassword.vue.d.ts +15 -3
  37. package/dist/components/Authkit/AuthkitOAuthCallbackProvider.vue.d.ts +11 -0
  38. package/dist/components/Authkit/AuthkitProvider.vue.d.ts +45 -0
  39. package/dist/components/Feedback/FeedbackBubbleEnd.vue.d.ts +9 -0
  40. package/dist/components/Feedback/FeedbackBubbleStart.vue.d.ts +11 -6
  41. package/dist/components/LandingPage/LandingPageSections.vue.d.ts +1 -1
  42. package/dist/components/Pay/PaySubscriptions.vue.d.ts +2 -1
  43. package/dist/components/Pay/PricingFAQ.vue.d.ts +17 -0
  44. package/dist/components/Pay/PricingPlans.vue.d.ts +12 -0
  45. package/dist/components/UserMenu/UserMenuModals.vue.d.ts +2 -2
  46. package/dist/components/UserMenu/parts/UserSubscriptionBaseInformation.vue.d.ts +8 -0
  47. package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +26 -0
  48. package/dist/composables/Authkit/useAuthkitAuth.d.ts +21 -9
  49. package/dist/composables/Authkit/useEnsureAuthenticated.d.ts +26 -0
  50. package/dist/composables/Authkit/useOauth.d.ts +4 -1
  51. package/dist/composables/Billing/useBillingPlans.d.ts +201 -0
  52. package/dist/composables/Billing/useBillingSubscriptionSummary.d.ts +280 -0
  53. package/dist/composables/Billing/useSubscriptionCheckout.d.ts +12 -0
  54. package/dist/composables/UserMenu/useUserMenu.d.ts +5 -1
  55. package/dist/composables.d.ts +2 -0
  56. package/dist/composables.js +25 -22
  57. package/dist/feedback.js +3 -3
  58. package/dist/index-D3Kp6R4z.js +4 -0
  59. package/dist/landingPage.js +42 -40
  60. package/dist/main.js +285 -269
  61. package/dist/message.js +19 -18
  62. package/dist/pay.d.ts +5 -0
  63. package/dist/pay.js +9 -2
  64. package/dist/privateCom.js +1 -1
  65. package/dist/referrer.js +1 -1
  66. package/dist/style.css +1 -1
  67. package/dist/types/api/auth.generated.d.ts +103 -39
  68. package/dist/types/api/billing.generated.d.ts +61 -28
  69. package/dist/types/api.d.ts +1 -1
  70. package/dist/types/app.d.ts +14 -0
  71. package/dist/upload.js +2 -2
  72. package/dist/{useAuthkitAppsAuthPageInfo-494yLvsu.js → useAuthkitAppsAuthPageInfo-Du5d6VK-.js} +20 -7
  73. package/dist/{useAuthkitCreateAndUpdate-DyRtFxZS.js → useAuthkitCreateAndUpdate-Bc9D5C6R.js} +1 -1
  74. package/dist/useAuthkitUsersProfile-CQGyvL7g.js +201 -0
  75. package/dist/{useDownloads-DaeIY0E9.js → useDownloads-BFx1a-f9.js} +1 -1
  76. package/dist/useEnsureAuthenticated-Cc64hF1O.js +2247 -0
  77. package/dist/{useLegalLinks-CPbWqlu6.js → useLegalLinks-Deksq9h-.js} +2 -2
  78. package/dist/{useMessageNotifications-Dg5q-C_o.js → useMessageNotifications-DY5xKtif.js} +1 -1
  79. package/dist/{useSEO-CXX9dcBx.js → useSEO-CvfzTZA9.js} +2 -2
  80. package/dist/useSubscriptionCheckout-BgQJN61l.js +345 -0
  81. package/dist/{useTableHandle-Cjq4gcC0.js → useTableHandle-D71P3Ez_.js} +1 -1
  82. package/dist/{useUploadCos-DiJmmbRf.js → useUploadCos-N5pim6q1.js} +501 -515
  83. package/dist/useUserMenu-ClPBlvaM.js +44 -0
  84. package/dist/user.js +12 -13
  85. package/dist/utils/apiMiddlewares.d.ts +6 -0
  86. package/package.json +1 -1
  87. package/dist/AuthkitAppSetting-BCrLMpLg.js +0 -1322
  88. package/dist/AuthkitSignInPhone-DmCQ2fWs.js +0 -1721
  89. package/dist/FeedbackModal-aI28o-w5.js +0 -1053
  90. package/dist/LandingPageSectionHeader-Cs1x8i3q.js +0 -584
  91. package/dist/MessageHandle-BV1nKlxs.js +0 -1147
  92. package/dist/PaySubscriptions-B3gI1Eme.js +0 -408
  93. package/dist/ReferrerReferees-DJzPo7X5.js +0 -106
  94. package/dist/UserAccountMenu-CJ9KKVYa.js +0 -371
  95. package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-ClAXNSgl.js +0 -81
  96. package/dist/WidthContainer-BG10rumn.js +0 -669
  97. package/dist/useAuthkitUsersProfile-lGlQP54m.js +0 -186
  98. package/dist/useUserMenu-B3HKZKJ4.js +0 -43
@@ -0,0 +1,201 @@
1
+ export type BillingInterval = "day" | "week" | "month" | "year";
2
+ export type BillingIntervalKey = `${BillingInterval}:${number}`;
3
+ export type BillingQuotaPeriod = "day" | "week" | "month" | "year" | "lifetime";
4
+ export interface BillingProductFeature {
5
+ key: string;
6
+ name: string;
7
+ description?: string;
8
+ type: "boolean" | "quota" | "unlimited";
9
+ value?: boolean | number;
10
+ highlight?: boolean;
11
+ quotaPeriod?: BillingQuotaPeriod;
12
+ }
13
+ export interface BillingPrice {
14
+ id: string;
15
+ type: "free" | "one_time" | "recurring";
16
+ currency: string;
17
+ unitAmount: number;
18
+ interval?: "day" | "week" | BillingInterval;
19
+ intervalCount?: number;
20
+ trialPeriodDays?: number;
21
+ metadata?: Record<string, unknown>;
22
+ features?: BillingProductFeature[];
23
+ }
24
+ export interface BillingProduct {
25
+ id: string;
26
+ name: string;
27
+ description?: string;
28
+ features: BillingProductFeature[];
29
+ metadata?: Record<string, unknown>;
30
+ displayOrder?: number;
31
+ prices: BillingPrice[];
32
+ }
33
+ export interface BillingPlan extends BillingProduct {
34
+ selectedPrice: BillingPrice;
35
+ }
36
+ export interface BillingSubscription {
37
+ id: string;
38
+ productId: string;
39
+ productName: string;
40
+ priceId?: string;
41
+ interval?: string;
42
+ intervalCount?: number;
43
+ unitAmount?: number;
44
+ currency?: string;
45
+ status: string;
46
+ currentPeriodStart?: string;
47
+ currentPeriodEnd: string | null;
48
+ cancelAtPeriodEnd: boolean;
49
+ trialStart?: string | null;
50
+ trialEnd: string | null;
51
+ canceledAt?: string | null;
52
+ endedAt?: string | null;
53
+ createAt?: string;
54
+ }
55
+ export interface BillingFeatureItem {
56
+ title: string;
57
+ description: string;
58
+ }
59
+ export interface BillingFeatureGroup {
60
+ title: string;
61
+ items: BillingFeatureItem[];
62
+ }
63
+ export interface BillingIntervalTab {
64
+ value: BillingIntervalKey;
65
+ label: string;
66
+ badge?: string;
67
+ }
68
+ export interface BillingPlanBadge {
69
+ label: string;
70
+ type: "current" | "recommended" | "trial";
71
+ }
72
+ export declare function useBillingPlans(defaultInterval?: BillingInterval | BillingIntervalKey): {
73
+ products: import('vue').Ref<{
74
+ id: string;
75
+ name: string;
76
+ description?: string | undefined;
77
+ features: {
78
+ key: string;
79
+ name: string;
80
+ description?: string | undefined;
81
+ type: "boolean" | "quota" | "unlimited";
82
+ value?: boolean | number | undefined;
83
+ highlight?: boolean | undefined;
84
+ quotaPeriod?: BillingQuotaPeriod | undefined;
85
+ }[];
86
+ metadata?: Record<string, unknown> | undefined;
87
+ displayOrder?: number | undefined;
88
+ prices: {
89
+ id: string;
90
+ type: "free" | "one_time" | "recurring";
91
+ currency: string;
92
+ unitAmount: number;
93
+ interval?: ("day" | "week" | BillingInterval) | undefined;
94
+ intervalCount?: number | undefined;
95
+ trialPeriodDays?: number | undefined;
96
+ metadata?: Record<string, unknown> | undefined;
97
+ features?: {
98
+ key: string;
99
+ name: string;
100
+ description?: string | undefined;
101
+ type: "boolean" | "quota" | "unlimited";
102
+ value?: boolean | number | undefined;
103
+ highlight?: boolean | undefined;
104
+ quotaPeriod?: BillingQuotaPeriod | undefined;
105
+ }[] | undefined;
106
+ }[];
107
+ }[], BillingProduct[] | {
108
+ id: string;
109
+ name: string;
110
+ description?: string | undefined;
111
+ features: {
112
+ key: string;
113
+ name: string;
114
+ description?: string | undefined;
115
+ type: "boolean" | "quota" | "unlimited";
116
+ value?: boolean | number | undefined;
117
+ highlight?: boolean | undefined;
118
+ quotaPeriod?: BillingQuotaPeriod | undefined;
119
+ }[];
120
+ metadata?: Record<string, unknown> | undefined;
121
+ displayOrder?: number | undefined;
122
+ prices: {
123
+ id: string;
124
+ type: "free" | "one_time" | "recurring";
125
+ currency: string;
126
+ unitAmount: number;
127
+ interval?: ("day" | "week" | BillingInterval) | undefined;
128
+ intervalCount?: number | undefined;
129
+ trialPeriodDays?: number | undefined;
130
+ metadata?: Record<string, unknown> | undefined;
131
+ features?: {
132
+ key: string;
133
+ name: string;
134
+ description?: string | undefined;
135
+ type: "boolean" | "quota" | "unlimited";
136
+ value?: boolean | number | undefined;
137
+ highlight?: boolean | undefined;
138
+ quotaPeriod?: BillingQuotaPeriod | undefined;
139
+ }[] | undefined;
140
+ }[];
141
+ }[]>;
142
+ plans: import('vue').ComputedRef<BillingPlan[]>;
143
+ currentSubscription: import('vue').Ref<{
144
+ id: string;
145
+ productId: string;
146
+ productName: string;
147
+ priceId?: string | undefined;
148
+ interval?: string | undefined;
149
+ intervalCount?: number | undefined;
150
+ unitAmount?: number | undefined;
151
+ currency?: string | undefined;
152
+ status: string;
153
+ currentPeriodStart?: string | undefined;
154
+ currentPeriodEnd: string | null;
155
+ cancelAtPeriodEnd: boolean;
156
+ trialStart?: string | null | undefined;
157
+ trialEnd: string | null;
158
+ canceledAt?: string | null | undefined;
159
+ endedAt?: string | null | undefined;
160
+ createAt?: string | undefined;
161
+ } | null, BillingSubscription | {
162
+ id: string;
163
+ productId: string;
164
+ productName: string;
165
+ priceId?: string | undefined;
166
+ interval?: string | undefined;
167
+ intervalCount?: number | undefined;
168
+ unitAmount?: number | undefined;
169
+ currency?: string | undefined;
170
+ status: string;
171
+ currentPeriodStart?: string | undefined;
172
+ currentPeriodEnd: string | null;
173
+ cancelAtPeriodEnd: boolean;
174
+ trialStart?: string | null | undefined;
175
+ trialEnd: string | null;
176
+ canceledAt?: string | null | undefined;
177
+ endedAt?: string | null | undefined;
178
+ createAt?: string | undefined;
179
+ } | null>;
180
+ listLoading: import('vue').Ref<boolean, boolean>;
181
+ currentLoading: import('vue').Ref<boolean, boolean>;
182
+ billingInterval: import('vue').Ref<`day:${number}` | `month:${number}` | `year:${number}` | `week:${number}`, `day:${number}` | `month:${number}` | `year:${number}` | `week:${number}`>;
183
+ billingIntervalTabs: import('vue').ComputedRef<BillingIntervalTab[]>;
184
+ setBillingInterval: (value: BillingIntervalKey) => void;
185
+ isCurrentPlan: (plan: BillingPlan) => boolean;
186
+ isSameProduct: (plan: BillingPlan) => boolean;
187
+ isRecommendedPlan: (plan: BillingPlan) => boolean;
188
+ getDisplayPrice: (plan: BillingPlan) => number;
189
+ getDisplayOriginalPrice: (plan: BillingPlan) => number | undefined;
190
+ getDisplayCycle: (plan: BillingPlan) => string;
191
+ getPromotionLabel: (plan: BillingPlan) => string;
192
+ getBadgeLabel: (plan: BillingPlan) => "" | "当前方案" | "最受欢迎";
193
+ getBadgeLabels: (plan: BillingPlan) => BillingPlanBadge[];
194
+ getButtonLabel: (plan: BillingPlan) => "当前方案" | "立即订阅" | "切换周期" | "升级方案" | "切换方案";
195
+ getPlanSummary: (plan: BillingPlan, index: number) => string;
196
+ getFeatureItems: (features: BillingProductFeature[]) => BillingFeatureItem[];
197
+ getFeatureGroups: (features: BillingProductFeature[]) => BillingFeatureGroup[];
198
+ loadProducts: () => Promise<void>;
199
+ loadCurrentSubscription: () => Promise<void>;
200
+ refresh: () => Promise<void>;
201
+ };
@@ -0,0 +1,280 @@
1
+ export interface BillingSubscriptionSummaryCurrent {
2
+ id: string;
3
+ productId: string;
4
+ productName: string;
5
+ priceId: string;
6
+ priceNickname?: string;
7
+ status: "active" | "trialing" | "past_due" | "canceled" | "incomplete" | string;
8
+ interval?: "day" | "week" | "month" | "year";
9
+ intervalCount?: number;
10
+ unitAmount?: number;
11
+ currency?: string;
12
+ trialStart?: string | null;
13
+ trialEnd?: string | null;
14
+ currentPeriodStart?: string | null;
15
+ currentPeriodEnd?: string | null;
16
+ cancelAtPeriodEnd?: boolean;
17
+ canceledAt?: string | null;
18
+ endedAt?: string | null;
19
+ createAt?: string;
20
+ }
21
+ export interface BillingSubscriptionSummaryFeature {
22
+ key: string;
23
+ name?: string;
24
+ description?: string;
25
+ type: "boolean" | "quota" | "unlimited" | string;
26
+ value?: boolean | number | string | null;
27
+ highlight?: boolean;
28
+ }
29
+ export interface BillingSubscriptionSummaryQuota {
30
+ id: string;
31
+ featureKey: string;
32
+ name: string;
33
+ description?: string;
34
+ limit: number;
35
+ used: number;
36
+ remaining: number;
37
+ unlimited: boolean;
38
+ period: "day" | "week" | "month" | "year" | "lifetime" | string;
39
+ resetsAt?: string | null;
40
+ percentage: number;
41
+ }
42
+ export interface BillingSubscriptionSummaryPointsBalance {
43
+ totalPoints: number;
44
+ updateAt?: string | null;
45
+ }
46
+ export interface BillingSubscriptionSummaryPendingInvoice {
47
+ id: string;
48
+ total: number;
49
+ status: string;
50
+ createAt: string;
51
+ }
52
+ export interface BillingSubscriptionSummaryTrial {
53
+ id: string;
54
+ productId: string;
55
+ productName: string;
56
+ status: string;
57
+ startAt?: string | null;
58
+ endAt?: string | null;
59
+ }
60
+ export interface BillingSubscriptionSummaryEntitlement {
61
+ type: "subscription" | "trial";
62
+ productName: string;
63
+ status: string;
64
+ startAt?: string | null;
65
+ endAt?: string | null;
66
+ }
67
+ export interface BillingSubscriptionSummary {
68
+ current: BillingSubscriptionSummaryCurrent | null;
69
+ trial: BillingSubscriptionSummaryTrial | null;
70
+ entitlement: BillingSubscriptionSummaryEntitlement | null;
71
+ features: BillingSubscriptionSummaryFeature[];
72
+ quotas: BillingSubscriptionSummaryQuota[];
73
+ pointsBalance: BillingSubscriptionSummaryPointsBalance | null;
74
+ pendingInvoice: BillingSubscriptionSummaryPendingInvoice | null;
75
+ }
76
+ export declare function useBillingSubscriptionSummary(): {
77
+ summary: import('vue').Ref<{
78
+ current: {
79
+ id: string;
80
+ productId: string;
81
+ productName: string;
82
+ priceId: string;
83
+ priceNickname?: string | undefined;
84
+ status: "active" | "trialing" | "past_due" | "canceled" | "incomplete" | string;
85
+ interval?: "day" | "week" | "month" | "year" | undefined;
86
+ intervalCount?: number | undefined;
87
+ unitAmount?: number | undefined;
88
+ currency?: string | undefined;
89
+ trialStart?: string | null | undefined;
90
+ trialEnd?: string | null | undefined;
91
+ currentPeriodStart?: string | null | undefined;
92
+ currentPeriodEnd?: string | null | undefined;
93
+ cancelAtPeriodEnd?: boolean | undefined;
94
+ canceledAt?: string | null | undefined;
95
+ endedAt?: string | null | undefined;
96
+ createAt?: string | undefined;
97
+ } | null;
98
+ trial: {
99
+ id: string;
100
+ productId: string;
101
+ productName: string;
102
+ status: string;
103
+ startAt?: string | null | undefined;
104
+ endAt?: string | null | undefined;
105
+ } | null;
106
+ entitlement: {
107
+ type: "subscription" | "trial";
108
+ productName: string;
109
+ status: string;
110
+ startAt?: string | null | undefined;
111
+ endAt?: string | null | undefined;
112
+ } | null;
113
+ features: {
114
+ key: string;
115
+ name?: string | undefined;
116
+ description?: string | undefined;
117
+ type: "boolean" | "quota" | "unlimited" | string;
118
+ value?: boolean | number | string | null | undefined;
119
+ highlight?: boolean | undefined;
120
+ }[];
121
+ quotas: {
122
+ id: string;
123
+ featureKey: string;
124
+ name: string;
125
+ description?: string | undefined;
126
+ limit: number;
127
+ used: number;
128
+ remaining: number;
129
+ unlimited: boolean;
130
+ period: "day" | "week" | "month" | "year" | "lifetime" | string;
131
+ resetsAt?: string | null | undefined;
132
+ percentage: number;
133
+ }[];
134
+ pointsBalance: {
135
+ totalPoints: number;
136
+ updateAt?: string | null | undefined;
137
+ } | null;
138
+ pendingInvoice: {
139
+ id: string;
140
+ total: number;
141
+ status: string;
142
+ createAt: string;
143
+ } | null;
144
+ }, BillingSubscriptionSummary | {
145
+ current: {
146
+ id: string;
147
+ productId: string;
148
+ productName: string;
149
+ priceId: string;
150
+ priceNickname?: string | undefined;
151
+ status: "active" | "trialing" | "past_due" | "canceled" | "incomplete" | string;
152
+ interval?: "day" | "week" | "month" | "year" | undefined;
153
+ intervalCount?: number | undefined;
154
+ unitAmount?: number | undefined;
155
+ currency?: string | undefined;
156
+ trialStart?: string | null | undefined;
157
+ trialEnd?: string | null | undefined;
158
+ currentPeriodStart?: string | null | undefined;
159
+ currentPeriodEnd?: string | null | undefined;
160
+ cancelAtPeriodEnd?: boolean | undefined;
161
+ canceledAt?: string | null | undefined;
162
+ endedAt?: string | null | undefined;
163
+ createAt?: string | undefined;
164
+ } | null;
165
+ trial: {
166
+ id: string;
167
+ productId: string;
168
+ productName: string;
169
+ status: string;
170
+ startAt?: string | null | undefined;
171
+ endAt?: string | null | undefined;
172
+ } | null;
173
+ entitlement: {
174
+ type: "subscription" | "trial";
175
+ productName: string;
176
+ status: string;
177
+ startAt?: string | null | undefined;
178
+ endAt?: string | null | undefined;
179
+ } | null;
180
+ features: {
181
+ key: string;
182
+ name?: string | undefined;
183
+ description?: string | undefined;
184
+ type: "boolean" | "quota" | "unlimited" | string;
185
+ value?: boolean | number | string | null | undefined;
186
+ highlight?: boolean | undefined;
187
+ }[];
188
+ quotas: {
189
+ id: string;
190
+ featureKey: string;
191
+ name: string;
192
+ description?: string | undefined;
193
+ limit: number;
194
+ used: number;
195
+ remaining: number;
196
+ unlimited: boolean;
197
+ period: "day" | "week" | "month" | "year" | "lifetime" | string;
198
+ resetsAt?: string | null | undefined;
199
+ percentage: number;
200
+ }[];
201
+ pointsBalance: {
202
+ totalPoints: number;
203
+ updateAt?: string | null | undefined;
204
+ } | null;
205
+ pendingInvoice: {
206
+ id: string;
207
+ total: number;
208
+ status: string;
209
+ createAt: string;
210
+ } | null;
211
+ }>;
212
+ current: import('vue').ComputedRef<{
213
+ id: string;
214
+ productId: string;
215
+ productName: string;
216
+ priceId: string;
217
+ priceNickname?: string | undefined;
218
+ status: "active" | "trialing" | "past_due" | "canceled" | "incomplete" | string;
219
+ interval?: "day" | "week" | "month" | "year" | undefined;
220
+ intervalCount?: number | undefined;
221
+ unitAmount?: number | undefined;
222
+ currency?: string | undefined;
223
+ trialStart?: string | null | undefined;
224
+ trialEnd?: string | null | undefined;
225
+ currentPeriodStart?: string | null | undefined;
226
+ currentPeriodEnd?: string | null | undefined;
227
+ cancelAtPeriodEnd?: boolean | undefined;
228
+ canceledAt?: string | null | undefined;
229
+ endedAt?: string | null | undefined;
230
+ createAt?: string | undefined;
231
+ } | null>;
232
+ trial: import('vue').ComputedRef<{
233
+ id: string;
234
+ productId: string;
235
+ productName: string;
236
+ status: string;
237
+ startAt?: string | null | undefined;
238
+ endAt?: string | null | undefined;
239
+ } | null>;
240
+ entitlement: import('vue').ComputedRef<{
241
+ type: "subscription" | "trial";
242
+ productName: string;
243
+ status: string;
244
+ startAt?: string | null | undefined;
245
+ endAt?: string | null | undefined;
246
+ } | null>;
247
+ features: import('vue').ComputedRef<{
248
+ key: string;
249
+ name?: string | undefined;
250
+ description?: string | undefined;
251
+ type: "boolean" | "quota" | "unlimited" | string;
252
+ value?: boolean | number | string | null | undefined;
253
+ highlight?: boolean | undefined;
254
+ }[]>;
255
+ quotas: import('vue').ComputedRef<{
256
+ id: string;
257
+ featureKey: string;
258
+ name: string;
259
+ description?: string | undefined;
260
+ limit: number;
261
+ used: number;
262
+ remaining: number;
263
+ unlimited: boolean;
264
+ period: "day" | "week" | "month" | "year" | "lifetime" | string;
265
+ resetsAt?: string | null | undefined;
266
+ percentage: number;
267
+ }[]>;
268
+ pointsBalance: import('vue').ComputedRef<{
269
+ totalPoints: number;
270
+ updateAt?: string | null | undefined;
271
+ } | null>;
272
+ pendingInvoice: import('vue').ComputedRef<{
273
+ id: string;
274
+ total: number;
275
+ status: string;
276
+ createAt: string;
277
+ } | null>;
278
+ loading: import('vue').Ref<boolean, boolean>;
279
+ refresh: () => Promise<void>;
280
+ };
@@ -0,0 +1,12 @@
1
+ import { Ref } from 'vue';
2
+ import { BillingPlan, BillingSubscription } from './useBillingPlans';
3
+ interface UseSubscriptionCheckoutOptions {
4
+ currentSubscription: Ref<BillingSubscription | null>;
5
+ refreshCurrentSubscription: () => Promise<void>;
6
+ }
7
+ export declare function useSubscriptionCheckout(options: UseSubscriptionCheckoutOptions): {
8
+ checkoutPlanId: Ref<string | null, string | null>;
9
+ checkout: (plan: BillingPlan) => Promise<void>;
10
+ isCheckingOut: (plan: BillingPlan) => boolean;
11
+ };
12
+ export {};
@@ -1,4 +1,7 @@
1
1
  import { ComputedRef, Ref } from 'vue';
2
+ export interface OpenSubscriptionsOptions {
3
+ target?: "overview" | "invoices" | "subscriptions" | "quotas";
4
+ }
2
5
  export interface UseUserMenuReturn {
3
6
  isOpen: ComputedRef<boolean>;
4
7
  open: () => void;
@@ -9,7 +12,8 @@ export interface UseUserMenuReturn {
9
12
  settingTrigger: Readonly<Ref<number>>;
10
13
  openSetting: () => void;
11
14
  subscriptionsTrigger: Readonly<Ref<number>>;
12
- openSubscriptions: () => void;
15
+ subscriptionsOptions: Readonly<Ref<OpenSubscriptionsOptions | null>>;
16
+ openSubscriptions: (options?: OpenSubscriptionsOptions) => void;
13
17
  messagesTrigger: Readonly<Ref<number>>;
14
18
  openMessages: () => void;
15
19
  feedbackTrigger: Readonly<Ref<number>>;
@@ -16,3 +16,5 @@ export { useAuthMenu, findMenuPath, findActiveMenuPath, getPathOnly } from './co
16
16
  export { useRoutePermission } from './composables/Authkit/useRoutePermission';
17
17
  export { useSEO, useRouteSEO, type GlobalSEOConfig, type PageSEOConfig } from './composables/useSEO';
18
18
  export { useUserMenu, type UseUserMenuReturn } from './composables/UserMenu/useUserMenu';
19
+ export { useBillingPlans, type BillingFeatureItem, type BillingInterval, type BillingIntervalTab, type BillingPlan, type BillingPrice, type BillingProduct, type BillingProductFeature, type BillingSubscription, } from './composables/Billing/useBillingPlans';
20
+ export { useSubscriptionCheckout } from './composables/Billing/useSubscriptionCheckout';
@@ -1,40 +1,43 @@
1
- import { u as a, a as o } from "./useAuthkitUsersProfile-lGlQP54m.js";
2
- import { g as u, a as r, b as i, s as f, c as n, d as l, u as m } from "./apiClients-9b4zNZ2S.js";
3
- import { u as h } from "./useLegalLinks-CPbWqlu6.js";
4
- import { u as g } from "./useAuthkitAppsAuthPageInfo-494yLvsu.js";
5
- import { u as x } from "./useAuthkitCreateAndUpdate-DyRtFxZS.js";
6
- import { u as C } from "./useMessageNotifications-Dg5q-C_o.js";
7
- import { u as k, a as M } from "./useDownloads-DaeIY0E9.js";
8
- import { u as O } from "./useTableHandle-Cjq4gcC0.js";
9
- import { f as w, a as E, g as S, u as T, b as R, c as v, d as D, e as G, w as L } from "./useSEO-CXX9dcBx.js";
10
- import { u as H } from "./useUploadCos-DiJmmbRf.js";
11
- import { u as N } from "./useUserMenu-B3HKZKJ4.js";
1
+ import { u as a, a as o } from "./useAuthkitUsersProfile-CQGyvL7g.js";
2
+ import { g as t, a as r, b as i, s as n, c as f, d as l, u as p } from "./apiClients-DVz12LeW.js";
3
+ import { u as h } from "./useLegalLinks-Deksq9h-.js";
4
+ import { u as A } from "./useAuthkitAppsAuthPageInfo-Du5d6VK-.js";
5
+ import { u as x } from "./useAuthkitCreateAndUpdate-Bc9D5C6R.js";
6
+ import { u as C } from "./useMessageNotifications-DY5xKtif.js";
7
+ import { u as k, a as P } from "./useDownloads-BFx1a-f9.js";
8
+ import { u as O } from "./useTableHandle-D71P3Ez_.js";
9
+ import { f as U, a as w, g as E, u as T, b as R, c as v, d as D, e as G, w as L } from "./useSEO-CvfzTZA9.js";
10
+ import { u as B } from "./useUploadCos-N5pim6q1.js";
11
+ import { u as I } from "./useUserMenu-ClPBlvaM.js";
12
+ import { u as V, a as j } from "./useSubscriptionCheckout-BgQJN61l.js";
12
13
  export {
13
- w as findActiveMenuPath,
14
- E as findMenuPath,
15
- S as getPathOnly,
16
- u as globalConfig,
14
+ U as findActiveMenuPath,
15
+ w as findMenuPath,
16
+ E as getPathOnly,
17
+ t as globalConfig,
17
18
  r as globalSEOConfig,
18
19
  i as globalThemeRef,
19
- f as setGlobalConfig,
20
- n as setGlobalSEOConfig,
20
+ n as setGlobalConfig,
21
+ f as setGlobalSEOConfig,
21
22
  l as setTheme,
22
23
  T as useActiveDoc,
23
24
  R as useAuthMenu,
24
- g as useAuthkitAppsAuthPageInfo,
25
+ A as useAuthkitAppsAuthPageInfo,
25
26
  a as useAuthkitAuth,
26
- m as useAuthkitAuthModal,
27
+ p as useAuthkitAuthModal,
27
28
  x as useAuthkitCreateAndUpdate,
28
29
  o as useAuthkitUsersProfile,
30
+ V as useBillingPlans,
29
31
  k as useCommonCreateAndUpdate,
30
- M as useDownloads,
32
+ P as useDownloads,
31
33
  h as useLegalLinks,
32
34
  C as useMessageNotifications,
33
35
  v as useRoutePermission,
34
36
  D as useRouteSEO,
35
37
  G as useSEO,
38
+ j as useSubscriptionCheckout,
36
39
  O as useTableHandle,
37
- H as useUploadCos,
38
- N as useUserMenu,
40
+ B as useUploadCos,
41
+ I as useUserMenu,
39
42
  L as withViewTransition
40
43
  };
package/dist/feedback.js CHANGED
@@ -1,6 +1,6 @@
1
- import { B as b, a as s, F as d, b as F, c, d as o, R as t } from "./FeedbackModal-aI28o-w5.js";
2
- import { C as r } from "./Clipboard---tG2Zxz.js";
3
- import { F as m, a as n, b as f, c as i, d as p } from "./FeedbackItem-CN041vTm.js";
1
+ import { B as b, a as s, F as d, b as F, c, d as o, R as t } from "./FeedbackModal-CvNF1D-5.js";
2
+ import { C as r } from "./Clipboard-CRZDADLE.js";
3
+ import { F as m, a as n, b as f, c as i, d as p } from "./FeedbackItem-D7MpOmoM.js";
4
4
  export {
5
5
  r as Clipboard,
6
6
  b as FeedbackBubbleEnd,
@@ -0,0 +1,4 @@
1
+ const c = "min(920px, calc(100vw - 32px))";
2
+ export {
3
+ c as U
4
+ };