@fangzhongya/vue-archive 0.0.2-21 → 0.0.2-23

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 (60) hide show
  1. package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js +0 -0
  2. package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js +0 -0
  3. package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.js +0 -0
  4. package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js +0 -0
  5. package/dist/es/node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js +18 -0
  6. package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js +0 -0
  7. package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js +0 -0
  8. package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js +0 -0
  9. package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js +0 -0
  10. package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js +0 -0
  11. package/dist/es/packages/components/code/index.vue.js +17 -18
  12. package/dist/es/packages/components/use/index.js +1 -1
  13. package/dist/es/packages/components/use/retrie/choice/index.vue.js +1 -1
  14. package/dist/es/packages/components/use/set-code.vue.js +3 -3
  15. package/dist/es/packages/config.d.ts +2 -0
  16. package/dist/es/packages/config.js +1 -1
  17. package/dist/es/packages/index.d.ts +0 -1
  18. package/dist/es/packages/index.js +5 -7
  19. package/dist/es/packages/utils/common.d.ts +1 -1
  20. package/dist/es/packages/utils/common.js +15 -15
  21. package/dist/es/packages/utils/glob.d.ts +1 -1
  22. package/dist/es/packages/utils/glob.js +161 -137
  23. package/dist/es/packages/utils/index.d.ts +2 -1
  24. package/dist/es/packages/utils/index.js +16 -13
  25. package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js +0 -0
  26. package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js +0 -0
  27. package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.js +0 -0
  28. package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js +0 -0
  29. package/dist/lib/node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js +1 -0
  30. package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js +0 -0
  31. package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js +0 -0
  32. package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js +0 -0
  33. package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js +0 -0
  34. package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js +0 -0
  35. package/dist/lib/packages/components/code/index.vue.js +1 -1
  36. package/dist/lib/packages/components/use/index.js +1 -1
  37. package/dist/lib/packages/components/use/retrie/choice/index.vue.js +1 -1
  38. package/dist/lib/packages/components/use/set-code.vue.js +1 -1
  39. package/dist/lib/packages/config.d.ts +2 -0
  40. package/dist/lib/packages/config.js +1 -1
  41. package/dist/lib/packages/index.d.ts +0 -1
  42. package/dist/lib/packages/index.js +1 -1
  43. package/dist/lib/packages/utils/common.d.ts +1 -1
  44. package/dist/lib/packages/utils/common.js +1 -1
  45. package/dist/lib/packages/utils/glob.d.ts +1 -1
  46. package/dist/lib/packages/utils/glob.js +2 -2
  47. package/dist/lib/packages/utils/index.d.ts +2 -1
  48. package/dist/lib/packages/utils/index.js +1 -1
  49. package/dist/node/index.cjs +17984 -0
  50. package/dist/node/index.d.ts +110 -0
  51. package/dist/node/index.js +17984 -0
  52. package/package.json +10 -8
  53. package/dist/es/node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js +0 -6
  54. package/dist/es/node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-XQB2HUHZ.js +0 -18
  55. package/dist/es/packages/node/index.d.ts +0 -2
  56. package/dist/es/packages/node/index.js +0 -155
  57. package/dist/lib/node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js +0 -1
  58. package/dist/lib/node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-XQB2HUHZ.js +0 -1
  59. package/dist/lib/packages/node/index.d.ts +0 -2
  60. package/dist/lib/packages/node/index.js +0 -1
@@ -1,17 +1,17 @@
1
- import { getConfig as C } from "../config.js";
2
- import { getComponentsArr as O, getRawValue as A, defaultExtensions as I, isComprops as K, isCurprops as b } from "./common.js";
3
- import { humpToLine as h } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js";
4
- import { lineToLargeHump as E } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js";
5
- import { firstLower as T } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js";
6
- import { duplicateRemoval as M } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js";
7
- import { asyncMergeArray as N } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-XQB2HUHZ.js";
8
- import { getSuffix as w } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js";
9
- import { getTextImport as U } from "./index.js";
10
- const m = {}, d = {}, P = [], L = {}, j = {}, p = {};
11
- function S() {
12
- return C("example");
1
+ import { getConfig as P } from "../config.js";
2
+ import { getRawValue as R, getComponentsArr as E, defaultExtensions as K, isComprops as b, isCurprops as M } from "./common.js";
3
+ import { humpToLine as p } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js";
4
+ import { lineToLargeHump as T } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js";
5
+ import { firstLower as C } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js";
6
+ import { duplicateRemoval as U } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js";
7
+ import { asyncMergeArray as L } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js";
8
+ import { getSuffix as g } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js";
9
+ import { getTextImport as S } from "./index.js";
10
+ const u = {}, d = {}, j = [], y = {}, W = {}, w = {};
11
+ function V() {
12
+ return P("example");
13
13
  }
14
- function V(e, t, s) {
14
+ function F(e, t, s) {
15
15
  const n = Object.assign(
16
16
  {
17
17
  exampless: [],
@@ -21,17 +21,25 @@ function V(e, t, s) {
21
21
  s
22
22
  ), r = [], a = n.examples;
23
23
  a && Object.keys(a).forEach((o) => {
24
- r.push(o), j[o] = a[o];
25
- }), n.exampless = r, n.examples = void 0;
26
- const i = [], l = n.examplesRaw;
27
- l && Object.keys(l).forEach((o) => {
28
- i.push(o), p[o] = A(
29
- l,
24
+ r.push(o), W[o] = a[o];
25
+ });
26
+ const i = n.examplesRaw, l = [];
27
+ n.urls && n.urls.length > 0 ? (n.exampless = n.urls, n.urls.forEach((o) => {
28
+ l.push(o), i && (w[o] = N(
29
+ i,
30
30
  o
31
- );
32
- }), n.examplessRaw = i, n.examplesRaw = void 0, L[e] = n;
31
+ ));
32
+ })) : (n.exampless = r, i && Object.keys(i).forEach((o) => {
33
+ l.push(o), i && (w[o] = N(
34
+ i,
35
+ o
36
+ ));
37
+ })), n.examples = void 0, n.examplessRaw = l, n.examplesRaw = void 0, y[e] = n;
33
38
  }
34
- function k(e, t = "vue") {
39
+ function N(e, t) {
40
+ return typeof e == "function" ? e : e && (e[t] || e);
41
+ }
42
+ async function H(e, t = "vue") {
35
43
  let s = "";
36
44
  if (t == "vue") {
37
45
  let r = new RegExp(
@@ -41,7 +49,7 @@ function k(e, t = "vue") {
41
49
  } else
42
50
  (t == "js" || t == "ts") && (s = e);
43
51
  if (s) {
44
- const n = U(s);
52
+ const n = await S(s);
45
53
  let r = n == null ? void 0 : n.map((i) => i.n);
46
54
  const a = [];
47
55
  return r && r.length > 0 && r.forEach((i) => {
@@ -49,7 +57,7 @@ function k(e, t = "vue") {
49
57
  }), a;
50
58
  }
51
59
  }
52
- function re(e) {
60
+ function ie(e) {
53
61
  return new Promise((t) => {
54
62
  e ? e.raw ? t(e.raw) : e.getRaw ? e.getRaw(e).then((s) => {
55
63
  const n = (s || "") + "";
@@ -57,7 +65,7 @@ function re(e) {
57
65
  }) : t("") : t("");
58
66
  });
59
67
  }
60
- function F(e, t) {
68
+ function $(e, t) {
61
69
  e = (e || "") + "";
62
70
  let s = "";
63
71
  switch (e) {
@@ -73,39 +81,39 @@ function F(e, t) {
73
81
  }
74
82
  return s;
75
83
  }
76
- function H(e, t, s) {
84
+ function q(e, t, s) {
77
85
  var l, o;
78
86
  e = (e || "") + "", s = (s || "") + "";
79
- let n = h(t.name), r = [];
87
+ let n = p(t.name), r = [];
80
88
  const a = Object.values(t.aliass || {});
81
89
  if (e === "1")
82
90
  t.alias && r.push(t.alias + "-" + n);
83
91
  else if (e === "2")
84
- a && a.length > 0 && a.forEach((c) => {
85
- r.push(c + "-" + n);
92
+ a && a.length > 0 && a.forEach((f) => {
93
+ r.push(f + "-" + n);
86
94
  });
87
95
  else if (e === "3") {
88
- let c = "";
89
- t.alias && (c = t.alias + "-"), a == null || a.forEach((f) => {
90
- r.push(c + f + "-" + n);
96
+ let f = "";
97
+ t.alias && (f = t.alias + "-"), a == null || a.forEach((c) => {
98
+ r.push(f + c + "-" + n);
91
99
  });
92
100
  } else
93
- e === "4" ? (l = t.aliasNames) == null || l.forEach((c) => {
94
- r.push(h(c));
95
- }) : e == "9" && (r.push(n), (o = t.aliasNames) == null || o.forEach((c) => {
96
- r.push(h(c));
101
+ e === "4" ? (l = t.aliasNames) == null || l.forEach((f) => {
102
+ r.push(p(f));
103
+ }) : e == "9" && (r.push(n), (o = t.aliasNames) == null || o.forEach((f) => {
104
+ r.push(p(f));
97
105
  }));
98
106
  r.length == 0 && r.push(n);
99
107
  let i = [];
100
- return s === "1" ? r.forEach((c) => {
101
- let f = E(c);
102
- i.push(f, T(f));
103
- }) : s === "2" ? r.forEach((c) => {
104
- let f = E(c);
105
- i.push(c, f, T(f));
108
+ return s === "1" ? r.forEach((f) => {
109
+ let c = T(f);
110
+ i.push(c, C(c));
111
+ }) : s === "2" ? r.forEach((f) => {
112
+ let c = T(f);
113
+ i.push(f, c, C(c));
106
114
  }) : i = [...r], i = [...new Set(i)], i;
107
115
  }
108
- function $(e, t, s, n) {
116
+ function B(e, t, s, n) {
109
117
  const r = [];
110
118
  return s.examplessRaw.forEach((a) => {
111
119
  for (let i = 0; i < t.length; i++) {
@@ -114,50 +122,56 @@ function $(e, t, s, n) {
114
122
  r.push({
115
123
  topurl: e,
116
124
  comkey: n.key,
117
- suffix: w(a),
125
+ suffix: g(a),
118
126
  name: n.name,
119
127
  value: l,
120
128
  key: a,
121
129
  raw: "",
122
- getRaw: p[a] || p
130
+ getRaw: R(
131
+ w,
132
+ a
133
+ )
123
134
  });
124
135
  break;
125
136
  }
126
137
  }
127
138
  }), r;
128
139
  }
129
- function R(e) {
140
+ function O(e) {
130
141
  x();
131
- const t = m[e];
142
+ const t = u[e];
132
143
  if (t.tests)
133
144
  return t.tests;
134
145
  {
135
- const s = L[t.dir], n = s.dir + F(s.level || 0, t), r = H(
146
+ const s = y[t.dir], n = s.dir + $(s.level || 0, t), r = q(
136
147
  s.aliaslevel || 0,
137
148
  t,
138
149
  s.componentName || 0
139
150
  );
140
- t.mds = $(n, r, s, t);
151
+ t.mds = B(n, r, s, t);
141
152
  const a = {};
142
153
  return s.exampless.forEach((i) => {
143
154
  for (let l = 0; l < r.length; l++) {
144
155
  const o = r[l];
145
156
  if (i.startsWith(n + o + "/")) {
146
- const c = new RegExp(
147
- "^\\" + n + o + "/(.*)/index\\." + I.join("|") + "$"
157
+ const f = new RegExp(
158
+ "^\\" + n + o + "/(.*)/index\\." + K.join("|") + "$"
148
159
  );
149
- let f = "", u = i.match(c);
150
- u && u.length > 1 && (f = u[1]), a[i] = {
160
+ let c = "", m = i.match(f);
161
+ m && m.length > 1 && (c = m[1]), a[i] = {
151
162
  topurl: n,
152
163
  name: o,
153
- value: f,
154
- suffix: w(i),
164
+ value: c,
165
+ suffix: g(i),
155
166
  comname: t.name,
156
167
  comkey: t.key,
157
168
  key: i,
158
- component: j[i],
169
+ component: W[i],
159
170
  raw: "",
160
- getRaw: p[i] || p
171
+ getRaw: R(
172
+ w,
173
+ i
174
+ )
161
175
  };
162
176
  break;
163
177
  }
@@ -165,16 +179,16 @@ function R(e) {
165
179
  }), t.tests = a, a;
166
180
  }
167
181
  }
168
- function ie(e) {
182
+ function le(e) {
169
183
  if (e) {
170
- const t = R(e);
184
+ const t = O(e);
171
185
  return Object.values(t);
172
186
  } else
173
187
  return [];
174
188
  }
175
- function le(e, t, s) {
189
+ function oe(e, t, s) {
176
190
  x();
177
- const n = R(s), r = [];
191
+ const n = O(s), r = [];
178
192
  if (t) {
179
193
  let a = n[t];
180
194
  if (a)
@@ -184,35 +198,35 @@ function le(e, t, s) {
184
198
  a.name + "/" + a.value == e && r.push(a);
185
199
  }), r;
186
200
  }
187
- function oe(e) {
188
- return R(e), m[e].mds;
201
+ function fe(e) {
202
+ return O(e), u[e].mds;
189
203
  }
190
- function W(e, t, s) {
191
- let n = k(t, s) || [], r = e.split("/");
204
+ async function A(e, t, s) {
205
+ let n = await H(t, s) || [], r = e.split("/");
192
206
  return n.map((a) => {
193
207
  if (a.startsWith("./")) {
194
208
  let i = r.slice(0, r.length - 1).join("/"), l = a.substring(2);
195
209
  return {
196
210
  name: a,
197
211
  value: l,
198
- suffix: w(a),
212
+ suffix: g(a),
199
213
  head: i,
200
214
  key: i + "/" + l
201
215
  };
202
216
  } else {
203
217
  let i = a.split("/"), l = 0;
204
- for (let u = 0; u < i.length; u++)
205
- if (i[u] != "..") {
206
- l = u;
218
+ for (let m = 0; m < i.length; m++)
219
+ if (i[m] != "..") {
220
+ l = m;
207
221
  break;
208
222
  }
209
- let o = i.slice(l, i.length), c = r.slice(0, r.length - l - 1).join("/"), f = o.join("/");
223
+ let o = i.slice(l, i.length), f = r.slice(0, r.length - l - 1).join("/"), c = o.join("/");
210
224
  return {
211
225
  name: a,
212
- value: f,
213
- suffix: w(a),
214
- head: c,
215
- key: c + "/" + f
226
+ value: c,
227
+ suffix: g(a),
228
+ head: f,
229
+ key: f + "/" + c
216
230
  };
217
231
  }
218
232
  });
@@ -223,11 +237,14 @@ function ce(e) {
223
237
  let s = e.map((n) => ({
224
238
  raw: "",
225
239
  value: n.value,
226
- suffix: w(n.key),
240
+ suffix: g(n.key),
227
241
  key: n.key,
228
- getRaw: p[n.key] || p
242
+ getRaw: R(
243
+ w,
244
+ n.key
245
+ )
229
246
  }));
230
- N(
247
+ L(
231
248
  s,
232
249
  (n, r, a, i) => {
233
250
  a.raw ? n() : a.getRaw ? a.getRaw(a).then((l) => {
@@ -242,99 +259,106 @@ function ce(e) {
242
259
  t([]);
243
260
  });
244
261
  }
245
- function q() {
246
- const e = S(), t = C("components");
262
+ function D() {
263
+ const e = V(), t = P("components");
247
264
  t == null || t.forEach((s) => {
248
265
  var r;
249
- G(s);
266
+ Q(s);
250
267
  let n = s.dir || ((r = s == null ? void 0 : s.resolver) == null ? void 0 : r.dir) || "";
251
- V(n, e, s.example);
252
- }), console.log("componentsObj", m);
268
+ F(n, e, s.example);
269
+ });
253
270
  }
254
- const g = "default";
255
- function B(e) {
256
- let t = h(e.name), s = [...e.aliasNames];
271
+ const h = "default";
272
+ function G(e) {
273
+ let t = p(e.name), s = [...e.aliasNames];
257
274
  s.push(t), s.forEach((n) => {
258
- P.push({
275
+ j.push({
259
276
  name: n,
260
277
  value: e.key
261
278
  });
262
279
  });
263
280
  }
264
- function D(e, t) {
281
+ function J(e, t) {
265
282
  const s = {};
266
283
  t == null || t.forEach((n) => {
267
- m[n.key] = n, B(n);
284
+ u[n.key] = n, G(n);
268
285
  const r = Object.values(n.aliass || {});
269
286
  r && r.length ? r.forEach((a) => {
270
287
  s[a] = s[a] || [], s[a].push(n.key);
271
- }) : (s[g] = s[g] || [], s[g].push(n.key));
288
+ }) : (s[h] = s[h] || [], s[h].push(n.key));
272
289
  });
273
290
  }
274
- function G(e) {
291
+ function Q(e) {
275
292
  var n;
276
293
  let t, s;
277
- e.resolver ? (t = e.alias || ((n = e.resolver) == null ? void 0 : n.alias) || g, s = O(
278
- e.resolver.urls || [],
279
- e.resolver,
280
- e.componentsRaw,
281
- e.components,
282
- e
283
- )) : (t = e.alias || g, s = O(
284
- Object.keys(e.componentsRaw),
285
- e,
286
- e.componentsRaw,
287
- e.components,
288
- e
289
- )), s && (s != null && s.props) && s.props.forEach((r) => {
294
+ if (e.resolver)
295
+ t = e.alias || ((n = e.resolver) == null ? void 0 : n.alias) || h, s = E(
296
+ e.resolver.urls || [],
297
+ e.resolver,
298
+ e.componentsRaw,
299
+ e.components,
300
+ e
301
+ );
302
+ else {
303
+ t = e.alias || h;
304
+ let r = (e == null ? void 0 : e.urls) || Object.keys(e.componentsRaw);
305
+ s = E(
306
+ r,
307
+ e,
308
+ e.componentsRaw,
309
+ e.components,
310
+ e
311
+ );
312
+ }
313
+ s && (s != null && s.props) && s.props.forEach((r) => {
290
314
  d[r.key] = r;
291
- }), D(t, s.components);
315
+ }), J(t, s.components);
292
316
  }
293
- function fe(e) {
294
- return x(), m[e];
317
+ function ue(e) {
318
+ return x(), u[e];
295
319
  }
296
320
  function x() {
297
- return Object.keys(m).length == 0 && q(), Object.values(m);
321
+ return Object.keys(u).length == 0 && D(), Object.values(u);
298
322
  }
299
323
  function me(e, t, s) {
300
324
  x();
301
325
  const n = [];
302
326
  if (s) {
303
- let a = m[s];
327
+ let a = u[s];
304
328
  if (a && a.key)
305
329
  return [a];
306
330
  }
307
- let r = h(e);
308
- return P.forEach((a) => {
309
- t ? a.name.includes(r) && n.push(m[a.value]) : a.name == r && n.push(m[a.value]);
310
- }), M(n, "key");
331
+ let r = p(e);
332
+ return j.forEach((a) => {
333
+ t ? a.name.includes(r) && n.push(u[a.value]) : a.name == r && n.push(u[a.value]);
334
+ }), U(n, "key");
311
335
  }
312
- async function J(e, t) {
336
+ async function X(e, t) {
313
337
  let s = e;
314
338
  if (e) {
315
- let n = W(
339
+ let n = (await A(
316
340
  t.key,
317
341
  e,
318
342
  t.suffix
319
- ).filter((r) => r.key.startsWith(t.head));
320
- s += await y(n);
343
+ )).filter((r) => r.key.startsWith(t.head));
344
+ s += await I(n);
321
345
  }
322
346
  return s;
323
347
  }
324
- function Q(e) {
348
+ function Y(e) {
325
349
  return new Promise((t) => {
326
350
  if (e && e.length > 0) {
327
351
  let s = e.map((n) => d[n.key] || d[n.key + ".js"] || d[n.key + ".ts"]);
328
- N(
352
+ L(
329
353
  s,
330
354
  (n, r, a, i) => {
331
355
  a.raw ? n() : a.getRaw ? a.getRaw(a).then(async (l) => {
332
356
  const o = (l || "") + "";
333
- let c = await J(
357
+ let f = await X(
334
358
  o,
335
359
  e[i]
336
360
  );
337
- a.raw = c, a.getRaw = null, n();
361
+ a.raw = f, a.getRaw = null, n();
338
362
  }) : n();
339
363
  }
340
364
  ).then(() => {
@@ -344,33 +368,33 @@ function Q(e) {
344
368
  t([]);
345
369
  });
346
370
  }
347
- async function y(e) {
348
- const t = await Q(e);
371
+ async function I(e) {
372
+ const t = await Y(e);
349
373
  return ((t == null ? void 0 : t.map((n) => n.raw)) || []).join(`
350
374
  `);
351
375
  }
352
- async function X(e, t) {
376
+ async function Z(e, t) {
353
377
  let s = e;
354
378
  if (e && (t.comprops || t.curprops)) {
355
- let n = W(
379
+ let n = (await A(
356
380
  t.key,
357
381
  e,
358
382
  t.suffix
359
- ).filter((a) => K(
383
+ )).filter((a) => b(
360
384
  a.name,
361
385
  t.comprops || ""
362
- ) || b(a.name, t.curprops || "")), r = await y(n);
386
+ ) || M(a.name, t.curprops || "")), r = await I(n);
363
387
  s += r;
364
388
  }
365
389
  return s;
366
390
  }
367
- function ue(e) {
391
+ function pe(e) {
368
392
  return new Promise((t) => {
369
393
  if (e) {
370
394
  x();
371
- const s = m[e];
395
+ const s = u[e];
372
396
  s ? s.raw ? t(s.raw) : s.getRaw ? s.getRaw(s).then(async (n) => {
373
- const r = (n || "") + "", a = await X(
397
+ const r = (n || "") + "", a = await Z(
374
398
  r,
375
399
  s
376
400
  );
@@ -381,15 +405,15 @@ function ue(e) {
381
405
  });
382
406
  }
383
407
  export {
384
- g as defaultName,
408
+ h as defaultName,
385
409
  me as getCompoName,
386
- fe as getCompoNameKey,
410
+ ue as getCompoNameKey,
387
411
  x as getCompoNameObj,
388
- oe as getKeyMds,
412
+ fe as getKeyMds,
389
413
  ce as getLocalTextArr,
390
- ue as getLocalTextComponents,
391
- re as getLocalTextTests,
392
- W as getTestImportUrl,
393
- ie as getTestName,
394
- le as getTestNameObj
414
+ pe as getLocalTextComponents,
415
+ ie as getLocalTextTests,
416
+ A as getTestImportUrl,
417
+ le as getTestName,
418
+ oe as getTestNameObj
395
419
  };
@@ -1,3 +1,4 @@
1
+ import { type ImportSpecifier } from 'es-module-lexer';
1
2
  export type Spec = {
2
3
  tag: string;
3
4
  name: string;
@@ -25,6 +26,6 @@ interface Descriptions {
25
26
  }
26
27
  export type SpecObjs = Descriptions & Specs;
27
28
  export declare function getTextNotes(text: string): Block[] | undefined;
28
- export declare function getTextImport(jstext: string): readonly import("es-module-lexer").ImportSpecifier[];
29
+ export declare function getTextImport(jstext: string): Promise<readonly ImportSpecifier[]>;
29
30
  export declare function copyCode(text: string): void;
30
31
  export {};
@@ -1,18 +1,21 @@
1
- import { parse as o } from "../../node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/index.js";
2
- import { parse as e } from "../../node_modules/.pnpm/es-module-lexer@1.1.1/node_modules/es-module-lexer/dist/lexer.js";
3
- function p(r) {
4
- if (r)
5
- return o(r);
1
+ import { parse as e } from "../../node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/index.js";
2
+ import { init as i, parse as n } from "../../node_modules/.pnpm/es-module-lexer@1.1.1/node_modules/es-module-lexer/dist/lexer.js";
3
+ function s(t) {
4
+ if (t)
5
+ return e(t);
6
6
  }
7
- function s(r) {
8
- const [t] = e(r);
9
- return t;
7
+ function c(t) {
8
+ return new Promise(async (r) => {
9
+ await i;
10
+ const [o] = n(t);
11
+ r(o);
12
+ });
10
13
  }
11
- function a(r) {
12
- navigator.clipboard.writeText(r);
14
+ function m(t) {
15
+ navigator.clipboard.writeText(t);
13
16
  }
14
17
  export {
15
- a as copyCode,
16
- s as getTextImport,
17
- p as getTextNotes
18
+ m as copyCode,
19
+ c as getTextImport,
20
+ s as getTextNotes
18
21
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function y(e,i){return new Promise((n,c)=>{let t=0;const r=e.length;r>0?e.forEach((...o)=>{i((...s)=>{t++,r==t&&n(s)},c,...o)}):n(e)})}exports.asyncMergeArray=y;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),d=require("../boxurl/index.vue.js"),m=require("../../router/index.js"),x=require("./highlight.vue.js"),_=require("../../utils/index.js"),p=require("../../utils/glob.js"),w=require("vue-router"),E={class:"code"},N={class:"code-top"},V={class:"code-top-but"},y={class:"top-but-files"},b=["onClick"],q={class:"code-highlightjs"},B=e.defineComponent({__name:"index",props:{text:String,value:Object},setup(f){const t=f,h=w.useRouter();e.watch(()=>t.text,()=>{u()});const a=e.ref([]),o=e.ref(),i=e.ref(!1);function k(){var l;(l=o.value)!=null&&l.raw?_.copyCode(o.value.raw):_.copyCode(t.text)}function g(){i.value=!i.value}function C(){m.toSingle(h,t.value)}function r(l){i.value=!0,o.value=l}function u(){var l;if(o.value=void 0,i.value=!1,t.text){let c=p.getTestImportUrl((l=t.value)==null?void 0:l.key,t.text,"vue");p.getLocalTextArr(c).then(s=>{a.value=s.filter(n=>n.raw)})}}return u(),(l,c)=>{var s;return e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("div",N,[e.createElementVNode("div",V,[e.createElementVNode("div",{class:"but-div",onClick:C}," go "),e.createElementVNode("div",{class:"but-div",onClick:k}," 复制 "),e.createElementVNode("div",{class:"but-div",onClick:g},e.toDisplayString(i.value?"隐藏":"显示"),1),e.createElementVNode("div",y,[e.createVNode(d,{value:t.value},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["but-div",{on:!(o.value&&o.value.value)}]),onClick:c[0]||(c[0]=e.withModifiers(n=>r(),["stop"]))}," index.vue ",2)]),_:1},8,["value"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(n,S)=>(e.openBlock(),e.createBlock(d,{value:n},{default:e.withCtx(()=>{var v;return[e.createElementVNode("div",{class:e.normalizeClass(["but-div",{on:n.key==((v=o.value)==null?void 0:v.key)}]),onClick:e.withModifiers(D=>r(n),["stop"])},e.toDisplayString(n.value),11,b)]}),_:2},1032,["value"]))),256))])])]),e.withDirectives(e.createElementVNode("div",q,[e.createVNode(x,{language:"html",code:((s=o.value)==null?void 0:s.raw)||t.text},null,8,["code"])],512),[[e.vShow,i.value]])])}}});module.exports=B;
1
+ "use strict";const e=require("vue"),d=require("../boxurl/index.vue.js"),m=require("../../router/index.js"),x=require("./highlight.vue.js"),_=require("../../utils/index.js"),p=require("../../utils/glob.js"),w=require("vue-router"),E={class:"code"},N={class:"code-top"},V={class:"code-top-but"},y={class:"top-but-files"},b=["onClick"],q={class:"code-highlightjs"},B=e.defineComponent({__name:"index",props:{text:String,value:Object},setup(h){const t=h,f=w.useRouter();e.watch(()=>t.text,()=>{u()});const a=e.ref([]),o=e.ref(),i=e.ref(!1);function k(){var l;(l=o.value)!=null&&l.raw?_.copyCode(o.value.raw):_.copyCode(t.text)}function g(){i.value=!i.value}function C(){m.toSingle(f,t.value)}function r(l){i.value=!0,o.value=l}function u(){var l;o.value=void 0,i.value=!1,t.text&&p.getTestImportUrl((l=t.value)==null?void 0:l.key,t.text,"vue").then(c=>{p.getLocalTextArr(c).then(s=>{a.value=s.filter(n=>n.raw)})})}return u(),(l,c)=>{var s;return e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("div",N,[e.createElementVNode("div",V,[e.createElementVNode("div",{class:"but-div",onClick:C}," go "),e.createElementVNode("div",{class:"but-div",onClick:k}," 复制 "),e.createElementVNode("div",{class:"but-div",onClick:g},e.toDisplayString(i.value?"隐藏":"显示"),1),e.createElementVNode("div",y,[e.createVNode(d,{value:t.value},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["but-div",{on:!(o.value&&o.value.value)}]),onClick:c[0]||(c[0]=e.withModifiers(n=>r(),["stop"]))}," index.vue ",2)]),_:1},8,["value"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(n,S)=>(e.openBlock(),e.createBlock(d,{value:n},{default:e.withCtx(()=>{var v;return[e.createElementVNode("div",{class:e.normalizeClass(["but-div",{on:n.key==((v=o.value)==null?void 0:v.key)}]),onClick:e.withModifiers(D=>r(n),["stop"])},e.toDisplayString(n.value),11,b)]}),_:2},1032,["value"]))),256))])])]),e.withDirectives(e.createElementVNode("div",q,[e.createVNode(x,{language:"html",code:((s=o.value)==null?void 0:s.raw)||t.text},null,8,["code"])],512),[[e.vShow,i.value]])])}}});module.exports=B;
@@ -1 +1 @@
1
- "use strict";const t=require("vue"),x=require("./set-props.vue.js"),q=require("./set-emit.vue.js"),E=require("./set-code.vue.js"),b=require("./set-expose.vue.js"),C=require("./set-slot.vue.js"),i=require("../../utils/props.js"),V=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js"),j=t.defineComponent({props:{value:{type:Object},param:{type:Object}},render(O,T,v,D,a){console.log("render",new Date().getTime());const r=t.reactive({emitValue:{},slotValue:{}}),n=v.value;let c="div";n.component?c=t.defineAsyncComponent(n.component):n.name&&(c=t.resolveComponent(n.name));const u=v.param,d=i.getPropsValue(u.props),m=i.getEmitsValue(u.emits),y=i.getExposeValue(u.expose),h=i.getSlotValue(u.slot),l={},f={};d.forEach(s=>{let e=s.name;if(!e.includes(".")){let o=e.split("/");e=(o[0]||"").trim(),e&&(l[e]=a.propsValue[e],o&&o.length>1&&m.push({name:"update:"+e,description:s.description,selectable:"value:["+s.type+"]"}))}}),m.forEach(s=>{let e=s.name;if(e.includes("-")){let p=e.split("-");p=p.map((_,U)=>V.firstUpper(_)),e=p.join("")}else e=V.firstUpper(e);const o="on"+e;l[o]=(...p)=>{const _={arr:p,_date_:new Date().getTime()};r.emitValue[s.name]=_}});let g;return h.forEach(s=>{const e=s.name||"default";f[e]=o=>{if(r.slotValue[e])return t.h(t.defineComponent({props:{scope:{type:Object}},template:r.slotValue[e]}),{scope:o})}}),t.h("div",{class:"use"},[t.h("div",{class:"use-props"},t.h(x,{name:n.name,list:d,onChange:(s,e)=>{a.propsValue=s,a.propsText=e}})),t.h("div",{class:"use-component"},t.h(c,{...l,ref:s=>{g=s}},f)),t.h("div",{class:"use-code"},t.h(E,{name:n.name,value:l,propsText:a.propsText,slotValue:r.slotValue})),t.h("div",{class:"use-emit"},t.h(q,{name:n.name,list:m,value:r.emitValue})),t.h("div",{class:"use-expose"},t.h(b,{name:n.name,list:y,getRef:()=>g})),t.h("div",{class:"use-slot"},t.h(C,{name:n.name,list:h,onChange:(s,e)=>{r.slotValue[s]=e}}))])},data(){return{propsValue:{},propsText:{}}}});module.exports=j;
1
+ "use strict";const t=require("vue"),x=require("./set-props.vue.js"),q=require("./set-emit.vue.js"),E=require("./set-code.vue.js"),b=require("./set-expose.vue.js"),C=require("./set-slot.vue.js"),i=require("../../utils/props.js"),V=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js"),j=t.defineComponent({props:{value:{type:Object},param:{type:Object}},render(O,T,v,D,a){console.log("render",new Date().getTime());const r=t.reactive({emitValue:{},slotValue:{}}),n=v.value;let c="div";n.component?c=t.defineAsyncComponent(n.component):n.name&&(c=t.resolveComponent(n.name));const u=v.param,d=i.getPropsValue(u.props),m=i.getEmitsValue(u.emits),y=i.getExposeValue(u.expose),h=i.getSlotValue(u.slot),l={},f={};d.forEach(s=>{let e=s.name;if(!e.includes(".")){let o=e.split("/");e=(o[0]||"").trim(),e&&(l[e]=a.propsValue[e],o&&o.length>1&&m.push({name:"update:"+e,description:s.description,selectable:"value:["+s.type+"]"}))}}),m.forEach(s=>{let e=s.name;if(e.includes("-")){let p=e.split("-");p=p.map((_,U)=>V.firstUpper(_)),e=p.join("")}else e=V.firstUpper(e);const o="on"+e;l[o]=(...p)=>{const _={arr:p,_date_:new Date().getTime()};r.emitValue[s.name]=_}});let g;return h.forEach(s=>{const e=s.name||"default";f[e]=o=>{if(r.slotValue[e])return t.h(t.defineComponent({props:{scope:{type:Object}},template:r.slotValue[e]}),{scope:o})}}),t.h("div",{class:"use"},[t.h("div",{class:"use-props"},t.h(x,{name:n.name,list:d,onChange:(s,e)=>{a.propsValue=s,a.propsText=e}})),t.h("div",{class:"use-component"},t.h(c,{...l,ref:s=>{g=s}},f)),t.h("div",{class:"use-code"},t.h(E,{name:n.name,value:l,propsText:a.propsText,slotValue:r.slotValue})),t.h("div",{class:"use-emit"},t.h(q,{name:n.name,list:m,value:r.emitValue})),t.h("div",{class:"use-expose"},t.h(b,{name:n.name,list:y,getRef:()=>g})),t.h("div",{class:"use-slot"},t.h(C,{name:n.name,list:h,onChange:(s,e)=>{r.slotValue[s]=e}}))])},data(){return{propsValue:{},propsText:{}}}});module.exports=j;
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("vue"),S=require("../../../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.js"),v=require("../../util.js"),C={class:"form-select"},x=["value","disabled","onClick","onBlur"],A=["onMousemove","onMouseout"],j={class:"form-select-list"},O={key:0,class:"form-select-list-div"},T=["onClick"],q={key:1,class:"no-data"},L=e.defineComponent({__name:"index",props:{modelValue:{type:null},dataType:{type:[String,Array]},disabled:Boolean,list:{type:Array},config:{type:Object,default(){return{label:"label",prop:"prop"}}}},emits:["value","change"],setup(h,{emit:g}){const l=h,u=e.ref(),a=e.ref(!1),c=e.ref(!1),r=e.ref([]),y=e.computed(()=>r.value.map(t=>d(t)).join(",")),p=e.computed(()=>{let t=l.dataType||"";return(v.getSonType(t)||[])[1]});e.watch(()=>l.modelValue,()=>{b()},{immediate:!0});function _(t=[]){return p.value=="string"?t.map(n=>v.getString(n)):p.value=="number"?t.map(n=>{let o=Number(n);return isNaN(o)&&(o=0),o}):t}function k(t){return new Function("",`{
1
+ "use strict";const e=require("vue"),S=require("../../../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.js"),v=require("../../util.js"),C={class:"form-select"},x=["value","disabled","onClick","onBlur"],A=["onMousemove","onMouseout"],j={class:"form-select-list"},O={key:0,class:"form-select-list-div"},T=["onClick"],q={key:1,class:"no-data"},L=e.defineComponent({__name:"index",props:{modelValue:{type:null},dataType:{type:[String,Array]},disabled:Boolean,list:{type:Array},config:{type:Object,default(){return{label:"label",prop:"prop"}}}},emits:["value","change"],setup(h,{emit:g}){const l=h,u=e.ref(),a=e.ref(!1),c=e.ref(!1),r=e.ref([]),y=e.computed(()=>r.value.map(t=>d(t)).join(",")),p=e.computed(()=>{let t=l.dataType||"";return(v.getSonType(t)||[])[1]});e.watch(()=>l.modelValue,()=>{b()},{immediate:!0});function _(t=[]){return p.value=="string"?t.map(n=>v.getString(n)):p.value=="number"?t.map(n=>{let o=Number(n);return isNaN(o)&&(o=0),o}):t}function k(t){return new Function("",`{
2
2
  var a = ${t};
3
3
  return a;
4
4
  }`)}function b(){r.value=[];let t=l.modelValue,n=[];const o=k(t);if(o instanceof Array&&(n=o),l.list)for(let i=0;i<l.list.length;i++){const f=l.list[i];n.includes(s(f))&&r.value.push(f)}m()}function d(t){var o;let n=(o=l.config)==null?void 0:o.label;return n&&typeof t=="object"&&t?t[n]:t}function s(t){var o;let n=(o=l.config)==null?void 0:o.prop;return n&&typeof t=="object"&&t?t[n]:t}function B(t){return r.value.map(n=>s(n)).includes(s(t))}function w(){l.disabled||(a.value=!0)}function M(){c.value||(a.value=!1)}function V(){c.value=!0}function E(){c.value=!1}function N(t){u.value&&u.value.focus(),r.value=S.toggleArray(r.value,t,l.config.prop),m()}function m(){let t=_(r.value.map(n=>s(n)));g("value",t,JSON.stringify(t))}return(t,n)=>(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("input",{value:e.unref(y),readonly:"",placeholder:"请选择",type:"text",disabled:l.disabled,ref_key:"refInput",ref:u,onClick:e.withModifiers(w,["stop"]),onBlur:e.withModifiers(M,["stop"])},null,40,x),e.createElementVNode("div",{onMousemove:e.withModifiers(V,["stop"]),onMouseout:e.withModifiers(E,["stop"]),class:"form-select-box"},[e.withDirectives(e.createElementVNode("div",j,[l.list&&l.list.length>0?(e.openBlock(),e.createElementBlock("div",O,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.list,(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-select-list-li",{active:B(o)}]),onClick:e.withModifiers(f=>N(o),["stop"])},[e.createElementVNode("span",null,e.toDisplayString(d(o)),1)],10,T))),256))])):(e.openBlock(),e.createElementBlock("div",q," 暂无数据 "))],512),[[e.vShow,a.value]])],40,A)]))}});module.exports=L;