@huyooo/ui 1.0.3 → 1.0.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 (188) hide show
  1. package/dist/AuthkitAppSetting-BN8-xgNq.js +2674 -0
  2. package/dist/{Contact-M6iyuyNL.js → Contact-BWuVR9ho.js} +105 -113
  3. package/dist/CustomTable-BzGfaAVH.js +276 -0
  4. package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-B9BqGWm8.js +1480 -0
  5. package/dist/LandingPageDescription-BczWZHKy.js +12 -0
  6. package/dist/{LandingPageLinkGroup-DDNRivMt.js → LandingPageLinkGroup-BZJ48Yss.js} +87 -88
  7. package/dist/{LandingPageFAQ-CZJXvor9.js → LandingPageSectionHeader-3hiuw6G0.js} +44 -25
  8. package/dist/{LandingPageSectionTabs-Ce3_Rc2L.js → LandingPageSectionTabs-jRjkWlM-.js} +475 -375
  9. package/dist/LegalDocViewer-DM8FYBpf.js +2501 -0
  10. package/dist/Menu-uCexrsKP.js +199 -0
  11. package/dist/MessageHandle-mEkCsv9e.js +1173 -0
  12. package/dist/MessageList-Ce-_LNTk.js +244 -0
  13. package/dist/PaySubscriptions-CXkEjqr2.js +1326 -0
  14. package/dist/PricingPlans-CV97ck9p.js +427 -0
  15. package/dist/ReferrerReferees-DgygiIiE.js +237 -0
  16. package/dist/{Upload.vue_vue_type_script_setup_true_lang-B6NOZjK0.js → Upload.vue_vue_type_script_setup_true_lang-VGh2V4o0.js} +1 -1
  17. package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-zgjpFVln.js +592 -0
  18. package/dist/WidthContainer-PeWkCK0p.js +721 -0
  19. package/dist/{apiClients-DrGX2iJy.js → apiClients-BcXOLuYu.js} +131 -98
  20. package/dist/authkit.d.ts +6 -2
  21. package/dist/authkit.js +53 -44
  22. package/dist/common/authProviderIcons.d.ts +12 -0
  23. package/dist/common/globalConfig.d.ts +5 -0
  24. package/dist/common/tableColumnWidths.d.ts +11 -0
  25. package/dist/common.js +3 -3
  26. package/dist/components/AuthProviderIcon.vue.d.ts +12 -0
  27. package/dist/components/Authkit/AppSetting/AuthkitEmailVerify.vue.d.ts +2 -2
  28. package/dist/components/Authkit/AppSetting/AuthkitOAuthBinding.vue.d.ts +2 -1
  29. package/dist/components/Authkit/AppSetting/AuthkitPasskeyBinding.vue.d.ts +14 -0
  30. package/dist/components/Authkit/AppSetting/AuthkitPasswordUpdate.vue.d.ts +11 -1
  31. package/dist/components/Authkit/AppSetting/AuthkitPersonalInformation.vue.d.ts +1 -3
  32. package/dist/components/Authkit/AppSetting/AuthkitPhoneVerify.vue.d.ts +13 -3
  33. package/dist/components/Authkit/Auth/AuthkitBindEmail.vue.d.ts +29 -2
  34. package/dist/components/Authkit/Auth/AuthkitBindPhone.vue.d.ts +2 -2
  35. package/dist/components/Authkit/Auth/AuthkitEmailUpdate.vue.d.ts +2 -2
  36. package/dist/components/Authkit/Auth/AuthkitOauthItem.vue.d.ts +37 -9
  37. package/dist/components/Authkit/Auth/AuthkitOauthList.vue.d.ts +7 -11
  38. package/dist/components/Authkit/Auth/AuthkitPasswordUpdateAndVerify.vue.d.ts +2 -2
  39. package/dist/components/Authkit/Auth/AuthkitPhonePasswordUpdateAndVerify.vue.d.ts +2 -2
  40. package/dist/components/Authkit/Auth/AuthkitServiceAgreementAndPrivacyProtection.vue.d.ts +11 -7
  41. package/dist/components/Authkit/Auth/AuthkitSignInEmailCode.vue.d.ts +2 -2
  42. package/dist/components/Authkit/Auth/AuthkitSignInPhone.vue.d.ts +3 -62
  43. package/dist/components/Authkit/Auth/AuthkitSignUpPhone.vue.d.ts +2 -2
  44. package/dist/components/Authkit/Auth/AuthkitSwitchSignUpOrResetPassword.vue.d.ts +9 -0
  45. package/dist/components/Authkit/AuthkitAuth.vue.d.ts +2 -8
  46. package/dist/components/Authkit/AuthkitAuthModal.vue.d.ts +0 -4
  47. package/dist/components/Authkit/AuthkitProvider.vue.d.ts +5 -2
  48. package/dist/components/Authkit/AuthkitSendVerifyCode.vue.d.ts +2 -1
  49. package/dist/components/CustomTable.vue.d.ts +27 -1
  50. package/dist/components/Ellipsis.vue.d.ts +2 -6
  51. package/dist/components/Feedback/FeedbackList.vue.d.ts +4 -1
  52. package/dist/components/Gradientbackground.vue.d.ts +2 -2
  53. package/dist/components/HeaderMenus.vue.d.ts +4 -1
  54. package/dist/components/InfiniteLoading.vue.d.ts +1 -1
  55. package/dist/components/LandingPage/LandingPageButton.vue.d.ts +2 -2
  56. package/dist/components/LandingPage/LandingPageContainer.vue.d.ts +2 -2
  57. package/dist/components/LandingPage/LandingPageFeaturePanels.vue.d.ts +19 -0
  58. package/dist/components/LandingPage/LandingPageHero.vue.d.ts +9 -0
  59. package/dist/components/LandingPage/LandingPagePageContent.vue.d.ts +2 -2
  60. package/dist/components/LandingPage/LandingPageSectionHeader.vue.d.ts +1 -14
  61. package/dist/components/LandingPage/LandingPageSections.vue.d.ts +1 -1
  62. package/dist/components/LegalDoc/LegalDocViewer.vue.d.ts +7 -0
  63. package/dist/components/Menu.vue.d.ts +2 -1
  64. package/dist/components/MenuItem.vue.d.ts +3 -1
  65. package/dist/components/Message/MessageAppMessage.vue.d.ts +12 -2
  66. package/dist/components/Message/MessageDetails.vue.d.ts +9 -161
  67. package/dist/components/Message/MessageHandle.vue.d.ts +16 -4
  68. package/dist/components/Message/MessageList.vue.d.ts +4 -3
  69. package/dist/components/Message/MessageNotificationDetails.vue.d.ts +13 -0
  70. package/dist/components/Message/messageBody/DescriptionsMessageBody.vue.d.ts +3 -0
  71. package/dist/components/Message/messageBody/JsonMessageBodyFallback.vue.d.ts +3 -0
  72. package/dist/components/Message/messageBody/TextMessageBody.vue.d.ts +3 -0
  73. package/dist/components/Message/messageBody/descriptionRows.d.ts +14 -0
  74. package/dist/components/Message/messageBody/descriptionsMessageBody.d.ts +32 -0
  75. package/dist/components/Message/messageBody/descriptionsValueRender.d.ts +4 -0
  76. package/dist/components/Message/messageBody/messageBodyRegistry.d.ts +9 -0
  77. package/dist/components/Message/messageBody/registerBuiltinMessageBodies.d.ts +2 -0
  78. package/dist/components/Message/messageBody/types.d.ts +7 -0
  79. package/dist/components/Referrer/ReferrerRefereeCell.vue.d.ts +7 -0
  80. package/dist/components/Referrer/ReferrerReferees.vue.d.ts +1 -0
  81. package/dist/components/UserMenu/UserAccountMenu.vue.d.ts +1 -16
  82. package/dist/components/UserMenu/UserMenuItem.vue.d.ts +4 -0
  83. package/dist/components/UserMenu/UserMenuModals.vue.d.ts +18 -4
  84. package/dist/components/UserMenu/parts/UserAvatar.vue.d.ts +6 -0
  85. package/dist/components/UserMenu/parts/UserBasicInformation.vue.d.ts +7 -2
  86. package/dist/composables/Authkit/fetchAuthPageAboutUs.d.ts +3 -0
  87. package/dist/composables/Authkit/resolveRoutePermission.d.ts +2 -0
  88. package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +16 -0
  89. package/dist/composables/Authkit/useAuthkitAuth.d.ts +2 -0
  90. package/dist/composables/Authkit/useAuthkitPasskey.d.ts +10 -0
  91. package/dist/composables/Authkit/useLegalDocHostActions.d.ts +6 -0
  92. package/dist/composables/Authkit/useLegalDocs.d.ts +19 -0
  93. package/dist/composables/Authkit/useOauth.d.ts +17 -4
  94. package/dist/composables/Authkit/useRegistrationTerms.d.ts +24 -0
  95. package/dist/composables/Authkit/verifyCodeCooldown.d.ts +19 -0
  96. package/dist/composables/Billing/useBillingPlans.d.ts +0 -4
  97. package/dist/composables/Billing/useBillingStatusOptions.d.ts +2 -6
  98. package/dist/composables/Billing/useBillingSubscriptionSummary.d.ts +16 -0
  99. package/dist/composables/Billing/usePaidProductOptions.d.ts +5 -0
  100. package/dist/composables/Message/messageCenterBadgeCounts.d.ts +28 -0
  101. package/dist/composables/UserMenu/useUserMenuBadgeCounts.d.ts +9 -0
  102. package/dist/composables/useInfiniteList.d.ts +19 -0
  103. package/dist/composables/useMessageNotifications.d.ts +3 -6
  104. package/dist/composables.d.ts +4 -2
  105. package/dist/composables.js +50 -45
  106. package/dist/feedback.d.ts +1 -0
  107. package/dist/feedback.js +12 -11
  108. package/dist/fetchAuthPageAboutUs-dzTSwRsB.js +25 -0
  109. package/dist/{Clipboard-Bo7gdpR6.js → index-BkLvw1PU.js} +1 -1
  110. package/dist/landingPage.d.ts +1 -0
  111. package/dist/landingPage.js +41 -40
  112. package/dist/legalDocs/buildBuiltinUrl.d.ts +3 -0
  113. package/dist/{utils/legalLinks.d.ts → legalDocs/constants.d.ts} +0 -10
  114. package/dist/legalDocs/index.d.ts +7 -0
  115. package/dist/legalDocs/isConfigured.d.ts +7 -0
  116. package/dist/legalDocs/open.d.ts +3 -0
  117. package/dist/legalDocs/resolveAppId.d.ts +8 -0
  118. package/dist/legalDocs/resolveTarget.d.ts +4 -0
  119. package/dist/legalDocs/types.d.ts +12 -0
  120. package/dist/main.js +321 -308
  121. package/dist/message.d.ts +3 -0
  122. package/dist/message.js +301 -21
  123. package/dist/pay.d.ts +1 -1
  124. package/dist/pay.js +14 -17
  125. package/dist/privateCom.js +1 -1
  126. package/dist/referrer.js +1 -1
  127. package/dist/style.css +1 -1
  128. package/dist/types/api/auth.generated.d.ts +1385 -328
  129. package/dist/types/api/billing.generated.d.ts +907 -76
  130. package/dist/types/api/ones.generated.d.ts +131 -2
  131. package/dist/types/api.d.ts +1 -0
  132. package/dist/types/app.d.ts +10 -0
  133. package/dist/types/user.d.ts +1 -0
  134. package/dist/upload.js +2 -2
  135. package/dist/{useAuthkitAppsAuthPageInfo-C2yKgl8t.js → useAuthkitAppsAuthPageInfo-CNudJd04.js} +18 -17
  136. package/dist/useAuthkitAuth-3m0yW6uP.js +267 -0
  137. package/dist/{useAuthkitCreateAndUpdate-oo9517Gj.js → useAuthkitCreateAndUpdate-BsINsI-E.js} +1 -1
  138. package/dist/{useAuthkitUsersProfile-BZDk21c8.js → useAuthkitUsersProfile-DJlMsftY.js} +3 -3
  139. package/dist/useBillingStatusOptions-CfHQOFNw.js +71 -0
  140. package/dist/{useEnsureAuthenticated-BuIbxqsO.js → useEnsureAuthenticated-DNkCCy_Y.js} +2 -2
  141. package/dist/useLegalDocs-DQP_Yq6B.js +106 -0
  142. package/dist/{useMessageNotifications-D85_-mDq.js → useMessageNotifications-CAphguOm.js} +21 -24
  143. package/dist/useRoutePermission-CEiya9AM.js +218 -0
  144. package/dist/useSEO-CDWxbk8B.js +221 -0
  145. package/dist/useSubscriptionCheckout-d_M_rKRa.js +368 -0
  146. package/dist/{useUploadCos-BRKRzSy3.js → useUploadCos-C8BqFPkx.js} +1 -1
  147. package/dist/user.js +1 -1
  148. package/dist/userMenuModal-D-nDaYqM.js +66 -0
  149. package/dist/utils/apiMiddlewares.d.ts +5 -5
  150. package/dist/utils/apiResponse.d.ts +11 -0
  151. package/dist/utils/authProviderIcon.d.ts +3 -0
  152. package/dist/utils/authkit.d.ts +20 -7
  153. package/dist/utils/formatPoints.d.ts +8 -0
  154. package/dist/utils/messageNotificationContent.d.ts +4 -0
  155. package/dist/utils/messageTextLink.d.ts +9 -0
  156. package/dist/utils/passkeySupport.d.ts +8 -0
  157. package/dist/utils/pointsFlowTypes.d.ts +10 -0
  158. package/dist/utils/pointsHistoryDisplay.d.ts +8 -0
  159. package/dist/utils/refundStatusDisplay.d.ts +1 -0
  160. package/dist/utils/subscriptionDisplay.d.ts +7 -0
  161. package/dist/utils/userDisplay.d.ts +41 -0
  162. package/package.json +11 -3
  163. package/dist/AuthkitAppSetting-C-0uuLSg.js +0 -1921
  164. package/dist/AuthkitGithubBinding-C5zEy9zN.js +0 -2207
  165. package/dist/CustomTable-nsxN4Ja4.js +0 -276
  166. package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-M1NQ-rx-.js +0 -1396
  167. package/dist/LandingPageSectionHeader-D_74W4My.js +0 -69
  168. package/dist/Menu-Cy2ZPeaz.js +0 -170
  169. package/dist/MessageHandle-BG12aX0i.js +0 -924
  170. package/dist/MessageList-CrCF8mU6.js +0 -233
  171. package/dist/MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-gsjL6yAe.js +0 -142
  172. package/dist/PaySubscriptions-lWnEioX5.js +0 -1241
  173. package/dist/PricingPlans-DFcjOMWS.js +0 -404
  174. package/dist/ReferrerReferees-Cn7KaO8z.js +0 -106
  175. package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-P0X1Exyu.js +0 -520
  176. package/dist/WidthContainer-CF3qOLWW.js +0 -688
  177. package/dist/common/authPanelWidth.d.ts +0 -2
  178. package/dist/components/Feedback/FeedbackDetails.vue.d.ts +0 -178
  179. package/dist/composables/Authkit/useLegalLinks.d.ts +0 -34
  180. package/dist/index-D3Kp6R4z.js +0 -4
  181. package/dist/useAuthkitAuth-DmS-H7M2.js +0 -175
  182. package/dist/useBillingStatusOptions-B7xLU3fs.js +0 -145
  183. package/dist/useLegalLinks-Cwr45PBT.js +0 -60
  184. package/dist/useRoutePermission-CaWtjLRA.js +0 -212
  185. package/dist/useSEO-BSMQdBR9.js +0 -158
  186. package/dist/useSubscriptionCheckout-BRk5h9aC.js +0 -365
  187. package/dist/useTableHandle-BdujaiNX.js +0 -69
  188. /package/dist/components/{Feedback/FeedbackVideoPreview.vue.d.ts → VideoPreview.vue.d.ts} +0 -0
@@ -1,212 +0,0 @@
1
- import { ref as w, computed as b, watch as S } from "vue";
2
- import { useRouter as I, useRoute as T } from "vue-router";
3
- import { u as k } from "./useAuthkitAppsAuthPageInfo-C2yKgl8t.js";
4
- import { u as M } from "./useAuthkitUsersProfile-BZDk21c8.js";
5
- const y = w({
6
- key: "",
7
- name: ""
8
- });
9
- function W() {
10
- function t(r, s) {
11
- y.value.key = r, y.value.name = s;
12
- }
13
- return {
14
- activeDoc: y,
15
- setActiveDoc: t
16
- };
17
- }
18
- function j(t, r = "default") {
19
- const s = document;
20
- if (s && typeof s.startViewTransition == "function") {
21
- const n = document.body;
22
- n.classList.add(`vt-${r}`), s.startViewTransition(() => {
23
- try {
24
- t();
25
- } catch {
26
- }
27
- }).finished.finally(() => {
28
- n.classList.remove(`vt-${r}`);
29
- });
30
- } else
31
- t();
32
- }
33
- function K(t) {
34
- const r = /* @__PURE__ */ new Set();
35
- r.add(t);
36
- const s = t.split("/").filter(Boolean);
37
- for (let n = s.length - 1; n > 0; n--)
38
- r.add(`/${s.slice(0, n).join("/")}`);
39
- return [...r];
40
- }
41
- function L(t, r) {
42
- const s = new Set(r);
43
- return K(t).some((n) => s.has(n));
44
- }
45
- function C(t, r) {
46
- return Array.isArray(t == null ? void 0 : t.menuTypes) ? t.menuTypes.includes(r) : !1;
47
- }
48
- function z(t, r, s) {
49
- for (let n = t.length - 1; n >= 0; n--) {
50
- const f = t[n];
51
- if (C(f.meta, r))
52
- return f.path;
53
- }
54
- return s;
55
- }
56
- function R(t) {
57
- return t.split("?")[0].split("#")[0];
58
- }
59
- function B(t, r, s) {
60
- const n = R(r), f = (s == null ? void 0 : s.returnParentOnChildMatch) ?? !1;
61
- function m(u, p) {
62
- for (const a of u) {
63
- if (R(a.path) === p)
64
- return a.path;
65
- if (a.children && a.children.length > 0) {
66
- const e = m(a.children, p);
67
- if (e)
68
- return f ? a.path : e;
69
- }
70
- }
71
- return null;
72
- }
73
- const d = m(t, n);
74
- if (d)
75
- return d;
76
- for (const u of t) {
77
- const p = R(u.path);
78
- if (n.startsWith(p + "/") || n === p) {
79
- if (u.children && u.children.length > 0)
80
- for (const a of u.children) {
81
- const v = R(a.path);
82
- if (n.startsWith(v + "/") || n === v)
83
- return f ? u.path : a.path;
84
- }
85
- return u.path;
86
- }
87
- }
88
- return s != null && s.fallback ? s.fallback(n) : n;
89
- }
90
- function F(t) {
91
- const r = I(), {
92
- appsData: s
93
- } = k(), {
94
- isLoggedIn: n,
95
- userProfile: f
96
- } = M(), m = b(() => {
97
- var e;
98
- return !n.value || !f.value ? [] : ((e = f.value.permissions) == null ? void 0 : e.map((c) => c.permissionKey)) || [];
99
- });
100
- function d(e) {
101
- return (s.value.publicRoutes || []).some((l) => l.permissionKey === e);
102
- }
103
- function u(e) {
104
- return n.value ? L(e, m.value) : !1;
105
- }
106
- function p(e) {
107
- var c;
108
- return {
109
- path: e.path,
110
- name: e.name,
111
- meta: e.meta,
112
- children: (c = e.children) == null ? void 0 : c.map((l) => p(l))
113
- };
114
- }
115
- function a(e, c) {
116
- const l = [];
117
- for (const o of e) {
118
- if (o.path === "/" || o.path === "/:catchAll(.*)")
119
- continue;
120
- const i = o.meta;
121
- if (C(i, c)) {
122
- const P = o.path;
123
- if (d(P) || u(P)) {
124
- const h = {
125
- name: (i == null ? void 0 : i.menuName) || (i == null ? void 0 : i.title) || (typeof o.name == "string" ? o.name : o.path),
126
- path: o.path,
127
- icon: (i == null ? void 0 : i.menuIcon) || (i == null ? void 0 : i.icon),
128
- description: (i == null ? void 0 : i.menuDescription) || (i == null ? void 0 : i.description),
129
- hidden: i == null ? void 0 : i.hidden
130
- };
131
- if (o.children && o.children.length > 0) {
132
- const g = a(o.children, c);
133
- g.length > 0 && (h.children = g);
134
- }
135
- l.push(h);
136
- }
137
- } else if (o.children && o.children.length > 0) {
138
- const P = a(o.children, c);
139
- l.push(...P);
140
- }
141
- }
142
- return l;
143
- }
144
- return {
145
- menus: b(() => {
146
- if (!t)
147
- return [];
148
- const e = r.getRoutes(), c = e.find((h) => h.path === "/"), l = c != null && c.children ? c.children.map((h) => p(h)) : [], o = new Set(l.map((h) => h.path)), P = e.filter((h) => h.path === "/" || h.path === "/:catchAll(.*)" || o.has(h.path) ? !1 : h.path.split("/").filter((D) => D).length === 1).map(p), A = [...l, ...P];
149
- return a(A, t);
150
- }),
151
- isRoutePublic: d,
152
- hasPermission: (e) => d(e) ? !0 : u(e),
153
- isLoggedIn: n
154
- };
155
- }
156
- function N() {
157
- const t = I(), r = T(), {
158
- appsData: s,
159
- appsAuthPageInfoSuccess: n
160
- } = k(), {
161
- userProfile: f,
162
- isLoggedIn: m,
163
- usersProfileReady: d
164
- } = M(), u = w(!1);
165
- function p(e) {
166
- return (s.value.publicRoutes || []).some((l) => l.permissionKey === e);
167
- }
168
- function a(e) {
169
- var l;
170
- if (!m.value || !f.value)
171
- return !1;
172
- const c = ((l = f.value.permissions) == null ? void 0 : l.map((o) => o.permissionKey)) || [];
173
- return L(e, c);
174
- }
175
- function v(e) {
176
- if (!n.value) {
177
- u.value = !0;
178
- return;
179
- }
180
- if (u.value = !0, p(e)) {
181
- u.value = !1;
182
- return;
183
- }
184
- if (!d.value) {
185
- u.value = !0;
186
- return;
187
- }
188
- if (!m.value) {
189
- t.replace("/"), u.value = !1;
190
- return;
191
- }
192
- a(e) || t.replace("/"), u.value = !1;
193
- }
194
- return S([() => r.path, n, d, m], () => {
195
- v(r.path);
196
- }, {
197
- immediate: !0
198
- }), {
199
- isChecking: u,
200
- isRoutePublic: p,
201
- hasPermission: a
202
- };
203
- }
204
- export {
205
- z as a,
206
- F as b,
207
- N as c,
208
- B as f,
209
- R as g,
210
- W as u,
211
- j as w
212
- };
@@ -1,158 +0,0 @@
1
- /* empty css */
2
- import { g } from "./apiClients-DrGX2iJy.js";
3
- import { Message as f } from "@arco-design/web-vue";
4
- import { ref as i, getCurrentInstance as w, computed as a } from "vue";
5
- import { useHead as p, useSeoMeta as m } from "@unhead/vue";
6
- import { useRoute as v } from "vue-router";
7
- function C(o) {
8
- const n = i(!1), t = i(), e = i(!1), s = i(""), u = i("");
9
- function l(c) {
10
- f.success(c), e.value = !1, n.value = !1, o("confirm");
11
- }
12
- function r() {
13
- e.value = !1, o("cancel");
14
- }
15
- return {
16
- loading: n,
17
- formRef: t,
18
- submitSuccess: l,
19
- modelType: s,
20
- changeType: u,
21
- show: e,
22
- handleCancel: r
23
- };
24
- }
25
- function I() {
26
- const o = i([]), n = i(!1), t = i(""), e = i("");
27
- async function s() {
28
- n.value = !0, t.value = "";
29
- try {
30
- const l = await (await fetch(`${g.onesPrefixUrl}/releases/latest`, {
31
- method: "POST",
32
- headers: {
33
- "Content-Type": "application/json",
34
- "app-id": g.appId
35
- },
36
- body: JSON.stringify({})
37
- })).json();
38
- e.value = l.version, o.value = l.downloads.map((r) => {
39
- const c = {
40
- id: r.id,
41
- name: r.name,
42
- description: r.description,
43
- version: r.version,
44
- updateDate: r.updateDate,
45
- icon: "",
46
- downloadUrl: r.downloadUrl,
47
- platform: r.platform,
48
- requirements: r.requirements
49
- };
50
- return r.arch && (c.arch = r.arch), r.badge && (c.badge = r.badge), c;
51
- });
52
- } catch {
53
- t.value = "获取版本信息失败,请刷新重试";
54
- } finally {
55
- n.value = !1;
56
- }
57
- }
58
- return {
59
- downloads: o,
60
- loading: n,
61
- error: t,
62
- version: e,
63
- fetchDownloads: s
64
- };
65
- }
66
- function O() {
67
- function o(t) {
68
- m({
69
- ogSiteName: t.siteName,
70
- ogLocale: t.locale
71
- });
72
- }
73
- function n(t) {
74
- const {
75
- title: e,
76
- description: s,
77
- keywords: u,
78
- image: l,
79
- url: r,
80
- type: c = "website"
81
- } = t, d = s && s.length > 155 ? `${s.substring(0, 152)}...` : s;
82
- p({
83
- title: e,
84
- link: r ? [{
85
- rel: "canonical",
86
- href: r
87
- }] : []
88
- }), m({
89
- description: d || s,
90
- keywords: u,
91
- ogTitle: e,
92
- ogDescription: d || s,
93
- ogType: c === "product" ? void 0 : c,
94
- // product 类型不被支持,跳过
95
- ogUrl: r,
96
- ogImage: l,
97
- twitterCard: "summary_large_image",
98
- twitterTitle: e,
99
- twitterDescription: d || s,
100
- twitterImage: l
101
- });
102
- }
103
- return {
104
- setGlobalSEO: o,
105
- setPageSEO: n
106
- };
107
- }
108
- function U() {
109
- if (!w())
110
- return;
111
- const o = v();
112
- if (!(o != null && o.meta))
113
- return;
114
- const n = () => o.meta;
115
- p({
116
- title: a(() => n().title || ""),
117
- link: a(() => {
118
- const t = n();
119
- return t.url ? [{
120
- rel: "canonical",
121
- href: t.url
122
- }] : [];
123
- })
124
- }), m({
125
- description: a(() => {
126
- const e = n().description;
127
- if (e)
128
- return e.length > 155 ? `${e.substring(0, 152)}...` : e;
129
- }),
130
- keywords: a(() => n().keywords),
131
- ogTitle: a(() => n().title),
132
- ogDescription: a(() => {
133
- const e = n().description;
134
- if (e)
135
- return e.length > 155 ? `${e.substring(0, 152)}...` : e;
136
- }),
137
- ogType: a(() => {
138
- const e = n().type || "website";
139
- return e === "product" ? void 0 : e;
140
- }),
141
- ogUrl: a(() => n().url),
142
- ogImage: a(() => n().image),
143
- twitterCard: "summary_large_image",
144
- twitterTitle: a(() => n().title),
145
- twitterDescription: a(() => {
146
- const e = n().description;
147
- if (e)
148
- return e.length > 155 ? `${e.substring(0, 152)}...` : e;
149
- }),
150
- twitterImage: a(() => n().image)
151
- });
152
- }
153
- export {
154
- I as a,
155
- U as b,
156
- O as c,
157
- C as u
158
- };