@huyooo/ui 2.0.2 → 2.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 (37) hide show
  1. package/dist/{AuthkitAppSetting-CPTk5V2I.js → AuthkitAppSetting-D_94iUEG.js} +1 -1
  2. package/dist/{Contact-CterQK1Z.js → Contact-CBGSJC2q.js} +2 -2
  3. package/dist/{FeedbackModal.vue_vue_type_script_setup_true_lang-DCIiz8aj.js → FeedbackModal.vue_vue_type_script_setup_true_lang-CnvQjQFT.js} +2 -2
  4. package/dist/{LegalDocViewer-CaL-MiTh.js → LegalDocViewer-D66BQiRu.js} +146 -146
  5. package/dist/{PaySubscriptions-DJBlwE0S.js → PaySubscriptions-BSkcUqHk.js} +1 -1
  6. package/dist/{PricingPlans-CqAaWjb9.js → PricingPlans-CyFvgf18.js} +1 -1
  7. package/dist/{Upload.vue_vue_type_script_setup_true_lang-B8-BHJkc.js → Upload.vue_vue_type_script_setup_true_lang-oa6LJgCY.js} +1 -1
  8. package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-pd5gnq-G.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-DqgwJ7r3.js} +5 -5
  9. package/dist/{WidthContainer-Dv6p9qbu.js → WidthContainer-BIRNIRX5.js} +7 -7
  10. package/dist/authkit.js +4 -4
  11. package/dist/common/globalConfig.d.ts +0 -12
  12. package/dist/common.js +1 -1
  13. package/dist/components/Feedback/FeedbackDetails.vue.d.ts +2 -2
  14. package/dist/composables/SEO/useAppSEO.d.ts +3 -0
  15. package/dist/composables/SEO/usePageSEO.d.ts +4 -0
  16. package/dist/composables/SEO/useResolvedPageSEO.d.ts +3 -0
  17. package/dist/composables.d.ts +4 -2
  18. package/dist/composables.js +42 -44
  19. package/dist/feedback.d.ts +1 -0
  20. package/dist/feedback.js +1 -1
  21. package/dist/{fetchAuthPageAboutUs-2gv5Lke1.js → fetchAuthPageAboutUs-CP5a7jIo.js} +1 -1
  22. package/dist/main.d.ts +2 -2
  23. package/dist/main.js +239 -241
  24. package/dist/pay.js +2 -2
  25. package/dist/privateCom.js +1 -1
  26. package/dist/{runtime-DvVJS4Vm.js → runtime-qs4IasEB.js} +31 -37
  27. package/dist/runtime.d.ts +1 -2
  28. package/dist/style.css +1 -1
  29. package/dist/types/feedbackApi.d.ts +3 -0
  30. package/dist/types/seo.d.ts +15 -0
  31. package/dist/upload.js +2 -2
  32. package/dist/{useLegalDocs-Cpy86zzQ.js → useLegalDocs-BZlntAI7.js} +1 -1
  33. package/dist/usePageSEO-DwhbUUjW.js +189 -0
  34. package/dist/user.js +1 -1
  35. package/package.json +1 -1
  36. package/dist/composables/useSEO.d.ts +0 -46
  37. package/dist/useSEO-Da2r63SX.js +0 -224
@@ -0,0 +1,3 @@
1
+ import { ApiClients } from '../utils/apiClients';
2
+ /** FeedbackDetails 实际依赖的最小 API 能力,避免绑定完整 ones-server 协议。 */
3
+ export type FeedbackApiClient = Pick<ApiClients['ones'], 'feedbackCenter' | 'messages'>;
@@ -0,0 +1,15 @@
1
+ export interface AppSEOConfig {
2
+ siteName: string;
3
+ titleSuffix?: string;
4
+ locale?: string;
5
+ defaultDescription?: string;
6
+ defaultImage?: string;
7
+ }
8
+ export interface PageSEOConfig {
9
+ title?: string;
10
+ description?: string;
11
+ keywords?: string;
12
+ image?: string;
13
+ url?: string;
14
+ type?: 'website' | 'article' | 'product';
15
+ }
package/dist/upload.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as o } from "./Upload.vue_vue_type_script_setup_true_lang-B8-BHJkc.js";
2
- import { e as s, f as p } from "./runtime-DvVJS4Vm.js";
1
+ import { _ as o } from "./Upload.vue_vue_type_script_setup_true_lang-oa6LJgCY.js";
2
+ import { b as s, d as p } from "./runtime-qs4IasEB.js";
3
3
  export {
4
4
  o as Upload,
5
5
  s as createBrowserCosTransport,
@@ -1,6 +1,6 @@
1
1
  import { computed as f } from "vue";
2
2
  import { u as d } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
3
- import { g as L } from "./runtime-DvVJS4Vm.js";
3
+ import { g as L } from "./runtime-qs4IasEB.js";
4
4
  const c = {
5
5
  userServiceAgreement: "用户服务协议",
6
6
  privacyPolicy: "隐私协议",
@@ -0,0 +1,189 @@
1
+ /* empty css */
2
+ import "./apiClients-Ctcq8NZs.js";
3
+ import { Message as y } from "@arco-design/web-vue";
4
+ import { ref as a, computed as s, toValue as A } from "vue";
5
+ import { u as N } from "./runtime-qs4IasEB.js";
6
+ import { useHead as g, useSeoMeta as w } from "@unhead/vue";
7
+ import { useRoute as E } from "vue-router";
8
+ function M(t) {
9
+ const e = a(!1), l = a(), n = a(!1), i = a(""), d = a("");
10
+ function c(o) {
11
+ y.success(o), n.value = !1, e.value = !1, t("confirm");
12
+ }
13
+ function u() {
14
+ n.value = !1, t("cancel");
15
+ }
16
+ return {
17
+ loading: e,
18
+ formRef: l,
19
+ submitSuccess: c,
20
+ modelType: i,
21
+ changeType: d,
22
+ show: n,
23
+ handleCancel: u
24
+ };
25
+ }
26
+ function _(t) {
27
+ const e = a(t), l = a(!1), n = a(!1), i = a({
28
+ total: 0,
29
+ current: 1,
30
+ pageSize: 10,
31
+ showTotal: !0,
32
+ showPageSize: !0
33
+ }), d = a([]), c = a(), u = a(Symbol("key")), o = a(), p = a(Symbol("key")), f = a(), v = a(Symbol("key"));
34
+ function b(r) {
35
+ c.value.setData(r, !0, "edit");
36
+ }
37
+ function h(r) {
38
+ f.value.setData(r, !0, "view");
39
+ }
40
+ function D() {
41
+ c.value.setData(null, !0, "create");
42
+ }
43
+ const k = (r, P) => {
44
+ i.value.current = r, i.value.pageSize = P;
45
+ };
46
+ function O() {
47
+ u.value = Symbol("key");
48
+ }
49
+ function T() {
50
+ p.value = Symbol("key");
51
+ }
52
+ function C(r) {
53
+ o.value.setData(r, !0);
54
+ }
55
+ function R() {
56
+ v.value = Symbol("key");
57
+ }
58
+ function U(r) {
59
+ f.value.setData(r, !0);
60
+ }
61
+ function L(r) {
62
+ y.success(r), n.value = !1;
63
+ }
64
+ return {
65
+ CreateAndUpdateRef: c,
66
+ CreateAndUpdateKey: u,
67
+ OperationLogRef: o,
68
+ OperationLogKey: p,
69
+ DetailsRef: f,
70
+ DetailsKey: v,
71
+ pagination: i,
72
+ title: e,
73
+ edit: b,
74
+ create: D,
75
+ view: h,
76
+ dataSource: d,
77
+ setPage: k,
78
+ cancel: O,
79
+ OperationLogCancel: T,
80
+ openOperationLog: C,
81
+ DetailsCancel: R,
82
+ openDetails: U,
83
+ loading: l,
84
+ submitRemove: L,
85
+ removeLoading: n
86
+ };
87
+ }
88
+ function G() {
89
+ const {
90
+ config: t
91
+ } = N(), e = a([]), l = a(!1), n = a(""), i = a("");
92
+ async function d() {
93
+ l.value = !0, n.value = "";
94
+ try {
95
+ const u = await (await fetch(`${t.onesPrefixUrl}/releases/latest`, {
96
+ method: "POST",
97
+ headers: {
98
+ "Content-Type": "application/json",
99
+ "app-id": t.appId
100
+ },
101
+ body: JSON.stringify({})
102
+ })).json();
103
+ i.value = u.version, e.value = u.downloads.map((o) => {
104
+ const p = {
105
+ id: o.id,
106
+ name: o.name,
107
+ description: o.description,
108
+ version: o.version,
109
+ updateDate: o.updateDate,
110
+ icon: "",
111
+ downloadUrl: o.downloadUrl,
112
+ platform: o.platform,
113
+ requirements: o.requirements
114
+ };
115
+ return o.arch && (p.arch = o.arch), o.badge && (p.badge = o.badge), p;
116
+ });
117
+ } catch {
118
+ n.value = "获取版本信息失败,请刷新重试";
119
+ } finally {
120
+ l.value = !1;
121
+ }
122
+ }
123
+ return {
124
+ downloads: e,
125
+ loading: l,
126
+ error: n,
127
+ version: i,
128
+ fetchDownloads: d
129
+ };
130
+ }
131
+ function m(t) {
132
+ return !t || t.length <= 155 ? t : `${t.substring(0, 152)}...`;
133
+ }
134
+ function I(t) {
135
+ return t === "article" ? "article" : "website";
136
+ }
137
+ function S(t) {
138
+ const e = s(() => A(t));
139
+ g({
140
+ title: s(() => e.value.title),
141
+ link: s(() => e.value.url ? [{
142
+ rel: "canonical",
143
+ href: e.value.url
144
+ }] : [])
145
+ }), w({
146
+ description: s(() => m(e.value.description)),
147
+ keywords: s(() => e.value.keywords),
148
+ ogTitle: s(() => e.value.title),
149
+ ogDescription: s(() => m(e.value.description)),
150
+ ogType: s(() => I(e.value.type)),
151
+ ogUrl: s(() => e.value.url),
152
+ ogImage: s(() => e.value.image),
153
+ twitterCard: "summary_large_image",
154
+ twitterTitle: s(() => e.value.title),
155
+ twitterDescription: s(() => m(e.value.description)),
156
+ twitterImage: s(() => e.value.image)
157
+ });
158
+ }
159
+ function J(t) {
160
+ const e = E(), l = s(() => ({
161
+ title: typeof e.meta.title == "string" ? e.meta.title : void 0,
162
+ description: typeof e.meta.description == "string" ? e.meta.description : t.defaultDescription,
163
+ keywords: typeof e.meta.keywords == "string" ? e.meta.keywords : void 0,
164
+ image: typeof e.meta.image == "string" ? e.meta.image : t.defaultImage,
165
+ url: typeof e.meta.url == "string" ? e.meta.url : void 0,
166
+ type: e.meta.type === "article" || e.meta.type === "product" || e.meta.type === "website" ? e.meta.type : "website"
167
+ }));
168
+ g({
169
+ htmlAttrs: t.locale ? {
170
+ lang: t.locale
171
+ } : void 0,
172
+ titleTemplate(n) {
173
+ return !n || n === t.siteName ? t.siteName : `${n}${t.titleSuffix ?? ""}`;
174
+ }
175
+ }), w({
176
+ ogSiteName: t.siteName,
177
+ ogLocale: t.locale
178
+ }), S(l);
179
+ }
180
+ function V(t) {
181
+ S(t);
182
+ }
183
+ export {
184
+ M as a,
185
+ G as b,
186
+ V as c,
187
+ _ as d,
188
+ J as u
189
+ };
package/dist/user.js CHANGED
@@ -1,4 +1,4 @@
1
- import { U as a, a as n, b as r, c as t, d as U, _ as u, e as i, f as M, g as o, h as m, i as I, j as c, k as d, l as b, m as f } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-pd5gnq-G.js";
1
+ import { U as a, a as n, b as r, c as t, d as U, _ as u, e as i, f as M, g as o, h as m, i as I, j as c, k as d, l as b, m as f } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-DqgwJ7r3.js";
2
2
  export {
3
3
  a as UserAccountMenu,
4
4
  n as UserAvatar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huyooo/ui",
3
- "version": "2.0.2",
3
+ "version": "2.0.5",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [
@@ -1,46 +0,0 @@
1
- /**
2
- * 全局 SEO 配置接口
3
- */
4
- export interface GlobalSEOConfig {
5
- /** 网站名称 */
6
- siteName?: string;
7
- /** 标题后缀 */
8
- titleSuffix?: string;
9
- /** 默认语言 */
10
- locale?: string;
11
- }
12
- /**
13
- * 页面级别 SEO 配置接口
14
- */
15
- export interface PageSEOConfig {
16
- /** 页面标题 */
17
- title: string;
18
- /** 页面描述 */
19
- description?: string;
20
- /** 关键词 */
21
- keywords?: string;
22
- /** 图片 URL */
23
- image?: string;
24
- /** 页面 URL */
25
- url?: string;
26
- /**
27
- * Open Graph 类型:
28
- * - website: 普通页面(首页、关于等)
29
- * - article: 文章/博客/新闻页面
30
- * - product: 商品/产品页面
31
- */
32
- type?: 'website' | 'article' | 'product';
33
- }
34
- /**
35
- * SEO 管理 composable
36
- * 提供全局和页面级别的 SEO 设置方法
37
- */
38
- export declare function useSEO(): {
39
- setGlobalSEO: (config: GlobalSEOConfig) => void;
40
- setPageSEO: (config: PageSEOConfig) => void;
41
- };
42
- /**
43
- * 自动从当前路由的 meta 信息设置页面 SEO
44
- * 必须在已 app.use(router) 的 Vue 组件中使用;宿主 Vite 需 dedupe vue-router
45
- */
46
- export declare function useRouteSEO(): void;
@@ -1,224 +0,0 @@
1
- /* empty css */
2
- import "./apiClients-Ctcq8NZs.js";
3
- import { Message as y } from "@arco-design/web-vue";
4
- import { ref as a, getCurrentInstance as I, computed as i } from "vue";
5
- import { u as L } from "./runtime-DvVJS4Vm.js";
6
- import { useHead as v, useSeoMeta as p } from "@unhead/vue";
7
- import { useRoute as P } from "vue-router";
8
- function M(s) {
9
- const n = a(!1), t = a(), e = a(!1), r = a(""), m = a("");
10
- function d(o) {
11
- y.success(o), e.value = !1, n.value = !1, s("confirm");
12
- }
13
- function c() {
14
- e.value = !1, s("cancel");
15
- }
16
- return {
17
- loading: n,
18
- formRef: t,
19
- submitSuccess: d,
20
- modelType: r,
21
- changeType: m,
22
- show: e,
23
- handleCancel: c
24
- };
25
- }
26
- function N(s) {
27
- const n = a(s), t = a(!1), e = a(!1), r = a({
28
- total: 0,
29
- current: 1,
30
- pageSize: 10,
31
- showTotal: !0,
32
- showPageSize: !0
33
- }), m = a([]), d = a(), c = a(Symbol("key")), o = a(), l = a(Symbol("key")), f = a(), g = a(Symbol("key"));
34
- function w(u) {
35
- d.value.setData(u, !0, "edit");
36
- }
37
- function b(u) {
38
- f.value.setData(u, !0, "view");
39
- }
40
- function h() {
41
- d.value.setData(null, !0, "create");
42
- }
43
- const S = (u, U) => {
44
- r.value.current = u, r.value.pageSize = U;
45
- };
46
- function D() {
47
- c.value = Symbol("key");
48
- }
49
- function T() {
50
- l.value = Symbol("key");
51
- }
52
- function k(u) {
53
- o.value.setData(u, !0);
54
- }
55
- function C() {
56
- g.value = Symbol("key");
57
- }
58
- function O(u) {
59
- f.value.setData(u, !0);
60
- }
61
- function R(u) {
62
- y.success(u), e.value = !1;
63
- }
64
- return {
65
- CreateAndUpdateRef: d,
66
- CreateAndUpdateKey: c,
67
- OperationLogRef: o,
68
- OperationLogKey: l,
69
- DetailsRef: f,
70
- DetailsKey: g,
71
- pagination: r,
72
- title: n,
73
- edit: w,
74
- create: h,
75
- view: b,
76
- dataSource: m,
77
- setPage: S,
78
- cancel: D,
79
- OperationLogCancel: T,
80
- openOperationLog: k,
81
- DetailsCancel: C,
82
- openDetails: O,
83
- loading: t,
84
- submitRemove: R,
85
- removeLoading: e
86
- };
87
- }
88
- function j() {
89
- const {
90
- config: s
91
- } = L(), n = a([]), t = a(!1), e = a(""), r = a("");
92
- async function m() {
93
- t.value = !0, e.value = "";
94
- try {
95
- const c = await (await fetch(`${s.onesPrefixUrl}/releases/latest`, {
96
- method: "POST",
97
- headers: {
98
- "Content-Type": "application/json",
99
- "app-id": s.appId
100
- },
101
- body: JSON.stringify({})
102
- })).json();
103
- r.value = c.version, n.value = c.downloads.map((o) => {
104
- const l = {
105
- id: o.id,
106
- name: o.name,
107
- description: o.description,
108
- version: o.version,
109
- updateDate: o.updateDate,
110
- icon: "",
111
- downloadUrl: o.downloadUrl,
112
- platform: o.platform,
113
- requirements: o.requirements
114
- };
115
- return o.arch && (l.arch = o.arch), o.badge && (l.badge = o.badge), l;
116
- });
117
- } catch {
118
- e.value = "获取版本信息失败,请刷新重试";
119
- } finally {
120
- t.value = !1;
121
- }
122
- }
123
- return {
124
- downloads: n,
125
- loading: t,
126
- error: e,
127
- version: r,
128
- fetchDownloads: m
129
- };
130
- }
131
- function q() {
132
- function s(t) {
133
- p({
134
- ogSiteName: t.siteName,
135
- ogLocale: t.locale
136
- });
137
- }
138
- function n(t) {
139
- const {
140
- title: e,
141
- description: r,
142
- keywords: m,
143
- image: d,
144
- url: c,
145
- type: o = "website"
146
- } = t, l = r && r.length > 155 ? `${r.substring(0, 152)}...` : r;
147
- v({
148
- title: e,
149
- link: c ? [{
150
- rel: "canonical",
151
- href: c
152
- }] : []
153
- }), p({
154
- description: l || r,
155
- keywords: m,
156
- ogTitle: e,
157
- ogDescription: l || r,
158
- ogType: o === "product" ? void 0 : o,
159
- // product 类型不被支持,跳过
160
- ogUrl: c,
161
- ogImage: d,
162
- twitterCard: "summary_large_image",
163
- twitterTitle: e,
164
- twitterDescription: l || r,
165
- twitterImage: d
166
- });
167
- }
168
- return {
169
- setGlobalSEO: s,
170
- setPageSEO: n
171
- };
172
- }
173
- function x() {
174
- if (!I())
175
- return;
176
- const s = P();
177
- if (!(s != null && s.meta))
178
- return;
179
- const n = () => s.meta;
180
- v({
181
- title: i(() => n().title || ""),
182
- link: i(() => {
183
- const t = n();
184
- return t.url ? [{
185
- rel: "canonical",
186
- href: t.url
187
- }] : [];
188
- })
189
- }), p({
190
- description: i(() => {
191
- const e = n().description;
192
- if (e)
193
- return e.length > 155 ? `${e.substring(0, 152)}...` : e;
194
- }),
195
- keywords: i(() => n().keywords),
196
- ogTitle: i(() => n().title),
197
- ogDescription: i(() => {
198
- const e = n().description;
199
- if (e)
200
- return e.length > 155 ? `${e.substring(0, 152)}...` : e;
201
- }),
202
- ogType: i(() => {
203
- const e = n().type || "website";
204
- return e === "product" ? void 0 : e;
205
- }),
206
- ogUrl: i(() => n().url),
207
- ogImage: i(() => n().image),
208
- twitterCard: "summary_large_image",
209
- twitterTitle: i(() => n().title),
210
- twitterDescription: i(() => {
211
- const e = n().description;
212
- if (e)
213
- return e.length > 155 ? `${e.substring(0, 152)}...` : e;
214
- }),
215
- twitterImage: i(() => n().image)
216
- });
217
- }
218
- export {
219
- j as a,
220
- x as b,
221
- q as c,
222
- N as d,
223
- M as u
224
- };