@fangzhongya/vue-archive 0.0.2-16 → 0.0.2-18

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 (66) hide show
  1. package/dist/es/markdown-it.d.ts +1 -0
  2. package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-14 → @fangzhongya_utils@0.0.7-15}/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js +0 -0
  3. package/dist/es/node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js +6 -0
  4. package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-14 → @fangzhongya_utils@0.0.7-15}/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js +0 -0
  5. package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-14 → @fangzhongya_utils@0.0.7-15}/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.js +0 -0
  6. package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-14 → @fangzhongya_utils@0.0.7-15}/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js +0 -0
  7. package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-14 → @fangzhongya_utils@0.0.7-15}/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js +0 -0
  8. package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-14 → @fangzhongya_utils@0.0.7-15}/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js +0 -0
  9. package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-14 → @fangzhongya_utils@0.0.7-15}/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js +0 -0
  10. package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-14 → @fangzhongya_utils@0.0.7-15}/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js +0 -0
  11. package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-14 → @fangzhongya_utils@0.0.7-15}/node_modules/@fangzhongya/utils/dist/chunk-XQB2HUHZ.js +0 -0
  12. package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-14 → @fangzhongya_utils@0.0.7-15}/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js +0 -0
  13. package/dist/es/packages/components/compo/index.d.ts +4 -0
  14. package/dist/es/packages/components/compo/index.js +198 -113
  15. package/dist/es/packages/components/compo/index.vue.js +63 -143
  16. package/dist/es/packages/components/compo/top.d.ts +2 -0
  17. package/dist/es/packages/components/compo/top.js +97 -93
  18. package/dist/es/packages/components/test/top.d.ts +2 -0
  19. package/dist/es/packages/components/test/top.js +125 -121
  20. package/dist/es/packages/components/use/index.js +1 -1
  21. package/dist/es/packages/components/use/retrie/choice/index.vue.js +1 -1
  22. package/dist/es/packages/components/use/set-code.vue.js +3 -3
  23. package/dist/es/packages/config.d.ts +2 -2
  24. package/dist/es/packages/config.js +1 -1
  25. package/dist/es/packages/index.d.ts +1 -0
  26. package/dist/es/packages/index.js +7 -5
  27. package/dist/es/packages/node/index.d.ts +2 -0
  28. package/dist/es/packages/node/index.js +155 -0
  29. package/dist/es/packages/utils/common.js +25 -25
  30. package/dist/es/packages/utils/glob.js +46 -46
  31. package/dist/es/prettier.d.ts +7 -0
  32. package/dist/es/vite-env.d.ts +1 -0
  33. package/dist/lib/markdown-it.d.ts +1 -0
  34. package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-14 → @fangzhongya_utils@0.0.7-15}/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js +0 -0
  35. package/dist/lib/node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js +1 -0
  36. package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-14 → @fangzhongya_utils@0.0.7-15}/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js +0 -0
  37. package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-14 → @fangzhongya_utils@0.0.7-15}/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.js +0 -0
  38. package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-14 → @fangzhongya_utils@0.0.7-15}/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js +0 -0
  39. package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-14 → @fangzhongya_utils@0.0.7-15}/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js +0 -0
  40. package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-14 → @fangzhongya_utils@0.0.7-15}/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js +0 -0
  41. package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-14 → @fangzhongya_utils@0.0.7-15}/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js +0 -0
  42. package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-14 → @fangzhongya_utils@0.0.7-15}/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js +0 -0
  43. package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-14 → @fangzhongya_utils@0.0.7-15}/node_modules/@fangzhongya/utils/dist/chunk-XQB2HUHZ.js +0 -0
  44. package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-14 → @fangzhongya_utils@0.0.7-15}/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js +0 -0
  45. package/dist/lib/packages/components/compo/index.d.ts +4 -0
  46. package/dist/lib/packages/components/compo/index.js +1 -1
  47. package/dist/lib/packages/components/compo/index.vue.js +1 -1
  48. package/dist/lib/packages/components/compo/top.d.ts +2 -0
  49. package/dist/lib/packages/components/compo/top.js +1 -1
  50. package/dist/lib/packages/components/test/index.vue.js +1 -1
  51. package/dist/lib/packages/components/test/top.d.ts +2 -0
  52. package/dist/lib/packages/components/test/top.js +1 -1
  53. package/dist/lib/packages/components/use/index.js +1 -1
  54. package/dist/lib/packages/components/use/retrie/choice/index.vue.js +1 -1
  55. package/dist/lib/packages/components/use/set-code.vue.js +1 -1
  56. package/dist/lib/packages/config.d.ts +2 -2
  57. package/dist/lib/packages/config.js +1 -1
  58. package/dist/lib/packages/index.d.ts +1 -0
  59. package/dist/lib/packages/index.js +1 -1
  60. package/dist/lib/packages/node/index.d.ts +2 -0
  61. package/dist/lib/packages/node/index.js +1 -0
  62. package/dist/lib/packages/utils/common.js +1 -1
  63. package/dist/lib/packages/utils/glob.js +2 -2
  64. package/dist/lib/prettier.d.ts +7 -0
  65. package/dist/lib/vite-env.d.ts +1 -0
  66. package/package.json +7 -7
@@ -0,0 +1 @@
1
+ declare module 'markdown-it';
@@ -0,0 +1,6 @@
1
+ function t(r) {
2
+ return Object.prototype.toString.call(r) == "[object Array]";
3
+ }
4
+ export {
5
+ t as isArray
6
+ };
@@ -14,3 +14,7 @@ export type FTableList = {
14
14
  prop: string;
15
15
  formatter?: FTableFormatter;
16
16
  };
17
+ export declare const tprops: FTableList[];
18
+ export declare const temits: FTableList[];
19
+ export declare const texpose: FTableList[];
20
+ export declare const tslot: FTableList[];
@@ -1,46 +1,47 @@
1
- import { getTextNotes as k } from "../../utils/index.js";
2
- import { getLocalTextComponents as v } from "../../utils/glob.js";
3
- import { getKeyMds as B } from "../../utils/glob.js";
4
- function T(e, s) {
5
- let r = e.charAt(0), l = [
1
+ import { getTextNotes as N } from "../../utils/index.js";
2
+ import { getLocalTextComponents as S } from "../../utils/glob.js";
3
+ import { getKeyMds as W } from "../../utils/glob.js";
4
+ import { props as i, emits as d, expose as u, slot as g } from "../../utils/props.js";
5
+ function P(e, l) {
6
+ let r = e.charAt(0), s = [
6
7
  ['"', '"'],
7
8
  ["'", "'"],
8
9
  ["`", "`"],
9
10
  ["(", ")"],
10
11
  ["{", "}"],
11
12
  ["[", "]"]
12
- ], a = l.map((c) => c[0]).indexOf(r);
13
+ ], a = s.map((n) => n[0]).indexOf(r);
13
14
  if (a != -1) {
14
- let n = new RegExp(
15
- "^" + l[a][0] + "((.|\\n|\\r)+?)" + l[a][1] + (s ? "\\s" : ""),
15
+ let o = new RegExp(
16
+ "^" + s[a][0] + "((.|\\n|\\r)+?)" + s[a][1] + (l ? "\\s" : ""),
16
17
  "gi"
17
18
  ).exec(e);
18
- if (n)
19
- return n[0];
19
+ if (o)
20
+ return o[0];
20
21
  }
21
22
  }
22
- function F(e) {
23
+ function z(e) {
23
24
  delete e.problems, delete e.source;
24
- let s = e.tag, r = e.name, l = e.description, t = e.default, a = "";
25
- if (s == "default")
26
- r = r.trim(), r = T(r) || r;
27
- else if (s == "selectable")
25
+ let l = e.tag, r = e.name, s = e.description, t = e.default, a = "";
26
+ if (l == "default")
27
+ r = r.trim(), r = P(r) || r;
28
+ else if (l == "selectable")
28
29
  r = r.trim();
29
30
  else {
30
31
  if (r.includes("=")) {
31
- const i = r.split("=");
32
- r = i[0];
33
- const x = i[1] + " " + l, f = T(x, !0);
34
- f ? (t = f, l = x.replace(f, "")) : t = e.default || i[1] || "";
32
+ const c = r.split("=");
33
+ r = c[0];
34
+ const w = c[1] + " " + s, m = P(w, !0);
35
+ m ? (t = m, s = w.replace(m, "")) : t = e.default || c[1] || "";
35
36
  }
36
- const n = /\s*\((.*)\)\s/gi.exec(l);
37
- n && n.length > 0 && (a = n[1], l = l.replace(n[0], ""));
37
+ const o = /\s*\((.*)\)\s/gi.exec(s);
38
+ o && o.length > 0 && (a = o[1], s = s.replace(o[0], ""));
38
39
  }
39
- return e.name = r, e.default = t || "", e.description = l, e.selectable = a, e;
40
+ return e.name = r, e.default = t || "", e.description = s, e.selectable = a, e;
40
41
  }
41
- let p = [];
42
- function N(e) {
43
- let s = [
42
+ let h = [];
43
+ function A(e) {
44
+ let l = [
44
45
  "title",
45
46
  // 'name',
46
47
  "text",
@@ -48,19 +49,19 @@ function N(e) {
48
49
  "date"
49
50
  // 'description',
50
51
  // 'descriptions',
51
- ], r = u(e), l = {};
52
- s.forEach((t) => {
53
- l[t] = r.obj[t];
54
- }), d(l), r.arr.forEach((t) => {
55
- o(t.key, t.value);
52
+ ], r = p(e), s = {};
53
+ l.forEach((t) => {
54
+ s[t] = r.obj[t];
55
+ }), x(s), r.arr.forEach((t) => {
56
+ f(t.key, t.value);
56
57
  });
57
58
  }
58
- function d(e) {
59
- p.push(e);
59
+ function x(e) {
60
+ h.push(e);
60
61
  }
61
- let g = [];
62
- function S(e) {
63
- let s = [
62
+ let E = [];
63
+ function C(e) {
64
+ let l = [
64
65
  "props",
65
66
  "name",
66
67
  "type",
@@ -68,152 +69,236 @@ function S(e) {
68
69
  "selectable",
69
70
  "description",
70
71
  "descriptions"
71
- ], r = u(e), l = {};
72
- s.forEach((t) => {
73
- l[t] = r.obj[t];
74
- }), w(l), r.arr.forEach((t) => {
75
- o(t.key, t.value);
72
+ ], r = p(e), s = {};
73
+ l.forEach((t) => {
74
+ s[t] = r.obj[t];
75
+ }), O(s), r.arr.forEach((t) => {
76
+ f(t.key, t.value);
76
77
  });
77
78
  }
78
- function w(e) {
79
- g.push(e);
79
+ function O(e) {
80
+ E.push(e);
80
81
  }
81
- let h = [];
82
- function z(e) {
83
- let s = [
82
+ let b = [];
83
+ function D(e) {
84
+ let l = [
84
85
  "slot",
85
86
  "name",
86
87
  "selectable",
87
88
  "description",
88
89
  "descriptions"
89
- ], r = u(e), l = {};
90
- s.forEach((t) => {
91
- l[t] = r.obj[t];
92
- }), y(l), r.arr.forEach((t) => {
93
- o(t.key, t.value);
90
+ ], r = p(e), s = {};
91
+ l.forEach((t) => {
92
+ s[t] = r.obj[t];
93
+ }), k(s), r.arr.forEach((t) => {
94
+ f(t.key, t.value);
94
95
  });
95
96
  }
96
- function y(e) {
97
- h.push(e);
97
+ function k(e) {
98
+ b.push(e);
98
99
  }
99
- let m = [];
100
- function A(e) {
101
- let s = [
100
+ let y = [];
101
+ function K(e) {
102
+ let l = [
102
103
  "emits",
103
104
  "name",
104
105
  "selectable",
105
106
  "description",
106
107
  "descriptions"
107
- ], r = u(e), l = {};
108
- s.forEach((t) => {
109
- l[t] = r.obj[t];
110
- }), P(l), r.arr.forEach((t) => {
111
- o(t.key, t.value);
108
+ ], r = p(e), s = {};
109
+ l.forEach((t) => {
110
+ s[t] = r.obj[t];
111
+ }), v(s), r.arr.forEach((t) => {
112
+ f(t.key, t.value);
112
113
  });
113
114
  }
114
- function P(e) {
115
- m.push(e);
115
+ function v(e) {
116
+ y.push(e);
116
117
  }
117
- let E = [];
118
- function C(e) {
119
- let s = [
118
+ let T = [];
119
+ function L(e) {
120
+ let l = [
120
121
  "expose",
121
122
  "name",
122
123
  "type",
123
124
  "selectable",
124
125
  "description",
125
126
  "descriptions"
126
- ], r = u(e), l = {};
127
- s.forEach((t) => {
128
- l[t] = r.obj[t];
129
- }), O(l), r.arr.forEach((t) => {
130
- o(t.key, t.value);
127
+ ], r = p(e), s = {};
128
+ l.forEach((t) => {
129
+ s[t] = r.obj[t];
130
+ }), F(s), r.arr.forEach((t) => {
131
+ f(t.key, t.value);
131
132
  });
132
133
  }
133
- function O(e) {
134
- E.push(e);
134
+ function F(e) {
135
+ T.push(e);
135
136
  }
136
- function u(e, s) {
137
+ function p(e, l) {
137
138
  var t;
138
139
  const r = {
139
140
  descriptions: (e == null ? void 0 : e.description) || ""
140
- }, l = [];
141
+ }, s = [];
141
142
  return e != null && e.tags && ((t = e == null ? void 0 : e.tags) == null || t.forEach((a) => {
142
- let c = a.tag, n = F(a);
143
- if (!r.hasOwnProperty(c))
144
- r[c] = n;
143
+ let n = a.tag, o = z(a);
144
+ if (!r.hasOwnProperty(n))
145
+ r[n] = o;
145
146
  else {
146
- const i = {};
147
- i[c] = n, l.push({
148
- key: c,
149
- value: i
147
+ const c = {};
148
+ c[n] = o, s.push({
149
+ key: n,
150
+ value: c
150
151
  });
151
152
  }
152
153
  })), {
153
- arr: l,
154
+ arr: s,
154
155
  obj: r
155
156
  };
156
157
  }
157
- function o(e, s) {
158
+ function f(e, l) {
158
159
  switch (e) {
159
160
  case "title":
160
- return d(s), !0;
161
+ return x(l), !0;
161
162
  case "text":
162
- return d(s), !0;
163
+ return x(l), !0;
163
164
  case "props":
164
- return w(s), !0;
165
+ return O(l), !0;
165
166
  case "slot":
166
- return y(s), !0;
167
+ return k(l), !0;
167
168
  case "emits":
168
- return P(s), !0;
169
+ return v(l), !0;
169
170
  case "expose":
170
- return O(s), !0;
171
+ return F(l), !0;
171
172
  default:
172
173
  return !1;
173
174
  }
174
175
  }
175
- function D(e, s) {
176
+ function M(e, l) {
176
177
  switch (e) {
177
178
  case "title":
178
- return N(s), !0;
179
+ return A(l), !0;
179
180
  case "props":
180
- return S(s), !0;
181
+ return C(l), !0;
181
182
  case "slot":
182
- return z(s), !0;
183
+ return D(l), !0;
183
184
  case "emits":
184
- return A(s), !0;
185
+ return K(l), !0;
185
186
  case "expose":
186
- return C(s), !0;
187
+ return L(l), !0;
187
188
  default:
188
189
  return !1;
189
190
  }
190
191
  }
191
- function K(e) {
192
- return p = [], g = [], h = [], m = [], E = [], e == null || e.forEach((s) => {
193
- let r = (s == null ? void 0 : s.tags) || [], l = (r == null ? void 0 : r.length) || 0;
194
- if (l > 0)
195
- for (let t = 0; t < l; t++) {
192
+ function R(e) {
193
+ return h = [], E = [], b = [], y = [], T = [], e == null || e.forEach((l) => {
194
+ let r = (l == null ? void 0 : l.tags) || [], s = (r == null ? void 0 : r.length) || 0;
195
+ if (s > 0)
196
+ for (let t = 0; t < s; t++) {
196
197
  const a = r[t] || {};
197
- if (D(a.tag, s))
198
+ if (M(a.tag, l))
198
199
  break;
199
200
  }
200
201
  }), {
201
- titles: p,
202
- propss: g,
203
- slots: h,
204
- emitss: m,
205
- exposes: E
202
+ titles: h,
203
+ propss: E,
204
+ slots: b,
205
+ emitss: y,
206
+ exposes: T
206
207
  };
207
208
  }
208
- function R(e) {
209
- return new Promise((s) => {
210
- v(e).then((r) => {
211
- let l = k(r);
212
- s(K(l));
209
+ function G(e) {
210
+ return new Promise((l) => {
211
+ S(e).then((r) => {
212
+ let s = N(r);
213
+ l(R(s));
213
214
  });
214
215
  });
215
216
  }
217
+ const H = [
218
+ {
219
+ label: "属性名",
220
+ prop: "name",
221
+ formatter: i.name
222
+ },
223
+ {
224
+ label: "说明",
225
+ prop: "description",
226
+ formatter: i.description
227
+ },
228
+ {
229
+ label: "类型",
230
+ prop: "type",
231
+ formatter: i.type
232
+ },
233
+ {
234
+ label: "可选值",
235
+ prop: "selectable",
236
+ formatter: i.selectable
237
+ },
238
+ {
239
+ label: "默认值",
240
+ prop: "default",
241
+ formatter: i.default
242
+ }
243
+ ], I = [
244
+ {
245
+ label: "事件名",
246
+ prop: "name",
247
+ formatter: d.name
248
+ },
249
+ {
250
+ label: "说明",
251
+ prop: "description",
252
+ formatter: d.description
253
+ },
254
+ {
255
+ label: "回调参数",
256
+ prop: "selectable",
257
+ formatter: d.selectable
258
+ }
259
+ ], J = [
260
+ {
261
+ label: "方法名",
262
+ prop: "name",
263
+ formatter: u.name
264
+ },
265
+ {
266
+ label: "说明",
267
+ prop: "description",
268
+ formatter: u.description
269
+ },
270
+ {
271
+ label: "参数",
272
+ prop: "selectable",
273
+ formatter: u.selectable
274
+ },
275
+ {
276
+ label: "返回值",
277
+ prop: "type",
278
+ formatter: u.type
279
+ }
280
+ ], Q = [
281
+ {
282
+ label: "插槽名",
283
+ prop: "name",
284
+ formatter: g.name
285
+ },
286
+ {
287
+ label: "说明",
288
+ prop: "description",
289
+ formatter: g.description
290
+ },
291
+ {
292
+ label: "作用域参数",
293
+ prop: "selectable",
294
+ formatter: g.selectable
295
+ }
296
+ ];
216
297
  export {
217
- B as getKeyMds,
218
- R as getNotes
298
+ W as getKeyMds,
299
+ G as getNotes,
300
+ I as temits,
301
+ J as texpose,
302
+ H as tprops,
303
+ Q as tslot
219
304
  };