@fangzhongya/vue-archive 0.0.60 → 0.0.62
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.
- package/dist/index.css +1 -1
- package/dist/node/index.cjs +206 -135
- package/dist/node/index.d.cts +28 -10
- package/dist/node/index.d.ts +28 -10
- package/dist/node/index.js +206 -135
- package/dist/packages/components/compo/index.cjs +1 -1
- package/dist/packages/components/compo/index.js +12 -10
- package/dist/packages/components/use/code.d.ts +17 -25
- package/dist/packages/components/use/index.cjs +1 -1
- package/dist/packages/components/use/index.js +1 -1
- package/dist/packages/components/use/retrie/array/index.d.ts +2 -2
- package/dist/packages/components/use/retrie/boolean/index.d.ts +2 -2
- package/dist/packages/components/use/retrie/choice/index.d.ts +2 -2
- package/dist/packages/components/use/retrie/function/index.d.ts +2 -2
- package/dist/packages/components/use/retrie/number/index.d.ts +2 -2
- package/dist/packages/components/use/retrie/object/index.d.ts +2 -2
- package/dist/packages/components/use/retrie/other/index.d.ts +2 -2
- package/dist/packages/components/use/retrie/select/index.d.ts +2 -2
- package/dist/packages/config.d.ts +26 -5
- package/dist/packages/page/index/index.vue2.cjs +1 -1
- package/dist/packages/page/index/index.vue2.js +1 -1
- package/dist/packages/utils/common.cjs +1 -1
- package/dist/packages/utils/common.d.ts +11 -12
- package/dist/packages/utils/common.js +149 -84
- package/dist/packages/utils/glob.cjs +2 -2
- package/dist/packages/utils/glob.js +140 -158
- package/package.json +3 -3
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import { getConfig as
|
|
2
|
-
import { getVueTexts as
|
|
3
|
-
import { getRawValue as R, isComprops as
|
|
4
|
-
import { mergeObject as
|
|
1
|
+
import { getConfig as A } from "../config.js";
|
|
2
|
+
import { getVueTexts as H } from "@fangzhongya/utils/html/getVueText";
|
|
3
|
+
import { getRawValue as R, isComprops as K, isCurprops as S, defaultExtensions as E, getComponentsArr as q } from "./common.js";
|
|
4
|
+
import { mergeObject as D } from "@fangzhongya/utils/basic/object/mergeObject";
|
|
5
5
|
import "@fangzhongya/utils/basic/array/toggleArray";
|
|
6
6
|
import { humpToLine as C } from "@fangzhongya/utils/name/humpToLine";
|
|
7
|
-
import { lineToLargeHump as
|
|
7
|
+
import { lineToLargeHump as I } from "@fangzhongya/utils/name/lineToLargeHump";
|
|
8
8
|
import "@fangzhongya/utils/basic/string/appearNum";
|
|
9
|
-
import { firstLower as
|
|
10
|
-
import { duplicateRemoval as
|
|
11
|
-
import { asyncMergeArray as
|
|
9
|
+
import { firstLower as V } from "@fangzhongya/utils/basic/string/firstLower";
|
|
10
|
+
import { duplicateRemoval as J } from "@fangzhongya/utils/basic/array/duplicateRemoval";
|
|
11
|
+
import { asyncMergeArray as U } from "@fangzhongya/utils/basic/array/asyncMergeArray";
|
|
12
12
|
import "@fangzhongya/utils/basic/string/firstUpper";
|
|
13
|
-
import { getSuffix as
|
|
13
|
+
import { getSuffix as g } from "@fangzhongya/utils/urls/getSuffix";
|
|
14
14
|
import "@fangzhongya/utils/basic/array/replaceAfter";
|
|
15
|
-
import { getTextImport as
|
|
16
|
-
const
|
|
17
|
-
function
|
|
18
|
-
return
|
|
15
|
+
import { getTextImport as Q } from "./index.js";
|
|
16
|
+
const h = {}, x = {}, M = [], v = {}, P = {}, m = {};
|
|
17
|
+
function X() {
|
|
18
|
+
return A("example");
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
const a =
|
|
20
|
+
function Y(t, e, n, r) {
|
|
21
|
+
const a = D(e, n || {}, 3, !0);
|
|
22
22
|
a.exampless = a.exampless || [], a.examplessRaw = a.examplessRaw || [];
|
|
23
23
|
const s = [], i = a.examples;
|
|
24
|
-
i && Object.keys(i).forEach((
|
|
25
|
-
s.push(
|
|
24
|
+
i && Object.keys(i).forEach((o) => {
|
|
25
|
+
s.push(o), P[o] = i[o];
|
|
26
26
|
});
|
|
27
|
-
const l = a.examplesRaw,
|
|
28
|
-
if (a.urls && a.urls.length > 0 ? (a.exampless = a.urls, a.urls.forEach((
|
|
29
|
-
|
|
30
|
-
})) : (a.exampless = s, l && Object.keys(l).forEach((
|
|
31
|
-
|
|
27
|
+
const l = a.examplesRaw, f = [];
|
|
28
|
+
if (a.urls && a.urls.length > 0 ? (a.exampless = a.urls, a.urls.forEach((o) => {
|
|
29
|
+
f.push(o), l && (m[o] = j(l, o));
|
|
30
|
+
})) : (a.exampless = s, l && Object.keys(l).forEach((o) => {
|
|
31
|
+
f.push(o), m[o] = j(l, o);
|
|
32
32
|
})), a.examples = void 0, e.tests && r) {
|
|
33
|
-
const
|
|
34
|
-
typeof
|
|
35
|
-
c.includes(
|
|
33
|
+
const o = e.testsNanme || "/tests/";
|
|
34
|
+
typeof o == "string" ? Object.keys(r).forEach((c) => {
|
|
35
|
+
c.includes(o) && (a.exampless.push(c), f.push(c), m[c] = j(r, c));
|
|
36
36
|
}) : Object.keys(r).forEach((c) => {
|
|
37
|
-
|
|
37
|
+
o.test(c) && (a.exampless.push(c), f.push(c), m[c] = j(r, c));
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
a.exampless = [...new Set(a.exampless)], a.examplessRaw = [...new Set(
|
|
40
|
+
a.exampless = [...new Set(a.exampless)], a.examplessRaw = [...new Set(f)], a.examplesRaw = void 0, v[t] = a;
|
|
41
41
|
}
|
|
42
42
|
function j(t, e) {
|
|
43
43
|
return typeof t == "function" ? t : t && (t[e] || t);
|
|
44
44
|
}
|
|
45
|
-
const
|
|
46
|
-
function
|
|
47
|
-
const e =
|
|
48
|
-
if (
|
|
49
|
-
return
|
|
45
|
+
const L = {};
|
|
46
|
+
function Z(t) {
|
|
47
|
+
const e = A("resolve");
|
|
48
|
+
if (L[t])
|
|
49
|
+
return L[t];
|
|
50
50
|
for (let n of e)
|
|
51
51
|
if (t.startsWith(n.find + "/")) {
|
|
52
52
|
const a = n.replacement.replaceAll("\\", "/") + t.replace(n.find + "/", "/");
|
|
53
|
-
return
|
|
53
|
+
return L[t] = a, a;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
async function
|
|
56
|
+
async function _(t, e) {
|
|
57
57
|
let n = "";
|
|
58
|
-
if (e == "vue" ? n =
|
|
59
|
-
const r = await
|
|
58
|
+
if (e == "vue" ? n = H(t).script : (e == "js" || e == "ts" || e == "") && (n = t), n) {
|
|
59
|
+
const r = await Q(n), a = [];
|
|
60
60
|
return r && r.length > 0 && r.forEach((s) => {
|
|
61
61
|
if (s)
|
|
62
62
|
if (s.startsWith("./") || s.startsWith("../"))
|
|
63
63
|
a.push(s);
|
|
64
64
|
else {
|
|
65
|
-
const i =
|
|
65
|
+
const i = Z(s);
|
|
66
66
|
i && a.push(i);
|
|
67
67
|
}
|
|
68
68
|
}), a;
|
|
@@ -71,12 +71,12 @@ async function z(t, e) {
|
|
|
71
71
|
function We(t) {
|
|
72
72
|
return new Promise((e) => {
|
|
73
73
|
t ? t.raw ? e(t.raw) : t.getRaw ? t.getRaw(t).then((n) => {
|
|
74
|
-
const r =
|
|
74
|
+
const r = b(n);
|
|
75
75
|
t.raw = r, t.getRaw = null, e(r);
|
|
76
76
|
}) : e("") : e("");
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function z(t, e) {
|
|
80
80
|
t = (t || "") + "";
|
|
81
81
|
let n = "";
|
|
82
82
|
switch (t) {
|
|
@@ -92,37 +92,24 @@ function y(t, e) {
|
|
|
92
92
|
}
|
|
93
93
|
return n;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function y(t, e, n) {
|
|
96
96
|
t = (t || "") + "", n = (n || "") + "";
|
|
97
97
|
let r = C(e.name), a = [];
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
a.push(C(l));
|
|
112
|
-
}) : t == "9" && (a.push(r), e.aliasNames?.forEach((l) => {
|
|
113
|
-
a.push(C(l));
|
|
114
|
-
}));
|
|
115
|
-
a.length == 0 && a.push(r);
|
|
116
|
-
let i = [];
|
|
117
|
-
return n === "1" ? a.forEach((l) => {
|
|
118
|
-
let o = V(l);
|
|
119
|
-
i.push(o, K(o));
|
|
120
|
-
}) : n === "2" ? a.forEach((l) => {
|
|
121
|
-
let o = V(l);
|
|
122
|
-
i.push(l, o, K(o));
|
|
123
|
-
}) : i = [...a], i = [...new Set(i)], i;
|
|
98
|
+
t === "1" ? e.alias && a.push(e.alias + "-" + r) : t === "3" ? e.alias && e.alias + "" : t === "4" ? e.aliasNames?.forEach((i) => {
|
|
99
|
+
a.push(C(i));
|
|
100
|
+
}) : t == "9" && (a.push(r), e.aliasNames?.forEach((i) => {
|
|
101
|
+
a.push(C(i));
|
|
102
|
+
})), a.length == 0 && a.push(r);
|
|
103
|
+
let s = [];
|
|
104
|
+
return n === "1" ? a.forEach((i) => {
|
|
105
|
+
let l = I(i);
|
|
106
|
+
s.push(l, V(l));
|
|
107
|
+
}) : n === "2" ? a.forEach((i) => {
|
|
108
|
+
let l = I(i);
|
|
109
|
+
s.push(i, l, V(l));
|
|
110
|
+
}) : s = [...a], s = [...new Set(s)], s;
|
|
124
111
|
}
|
|
125
|
-
function
|
|
112
|
+
function k(t, e, n, r) {
|
|
126
113
|
const a = [];
|
|
127
114
|
return n.examplessRaw.forEach((s) => {
|
|
128
115
|
for (let i = 0; i < e.length; i++) {
|
|
@@ -132,7 +119,7 @@ function ee(t, e, n, r) {
|
|
|
132
119
|
cwd: n.cwd || r.cwd,
|
|
133
120
|
topurl: t,
|
|
134
121
|
comkey: r.key,
|
|
135
|
-
suffix:
|
|
122
|
+
suffix: g(s),
|
|
136
123
|
name: r.name,
|
|
137
124
|
value: l,
|
|
138
125
|
key: s,
|
|
@@ -144,43 +131,43 @@ function ee(t, e, n, r) {
|
|
|
144
131
|
}
|
|
145
132
|
}), a;
|
|
146
133
|
}
|
|
147
|
-
function
|
|
134
|
+
function $(t) {
|
|
148
135
|
T();
|
|
149
|
-
const e =
|
|
136
|
+
const e = h[t];
|
|
150
137
|
if (e.tests && Object.keys(e.tests).length > 0)
|
|
151
138
|
return e.tests;
|
|
152
139
|
{
|
|
153
|
-
const n =
|
|
140
|
+
const n = v[e.dir], r = n.dir + z(n.level || 0, e), a = y(
|
|
154
141
|
n.aliaslevel || 0,
|
|
155
142
|
e,
|
|
156
143
|
n.componentName || 0
|
|
157
144
|
);
|
|
158
|
-
e.mds =
|
|
145
|
+
e.mds = k(r, a, n, e);
|
|
159
146
|
const s = {};
|
|
160
147
|
return n.exampless.forEach((i) => {
|
|
161
148
|
for (let l = 0; l < a.length; l++) {
|
|
162
|
-
const
|
|
163
|
-
if (i.startsWith(r +
|
|
164
|
-
const
|
|
149
|
+
const f = a[l];
|
|
150
|
+
if (i.startsWith(r + f + "/")) {
|
|
151
|
+
const o = new RegExp(
|
|
165
152
|
"/([^/]+)/index\\." + E.join("|") + "$"
|
|
166
153
|
), c = new RegExp(
|
|
167
154
|
"/([^/]+)\\." + E.join("|") + "$"
|
|
168
155
|
);
|
|
169
|
-
let u = i.match(
|
|
156
|
+
let u = i.match(o) || i.match(c);
|
|
170
157
|
if (u && u.length > 0) {
|
|
171
158
|
let p = "";
|
|
172
159
|
u && u.length > 1 && (p = u[1]), s[i] = {
|
|
173
160
|
topurl: r,
|
|
174
|
-
name:
|
|
161
|
+
name: f,
|
|
175
162
|
value: p,
|
|
176
|
-
suffix:
|
|
163
|
+
suffix: g(i),
|
|
177
164
|
comname: e.name,
|
|
178
165
|
comkey: e.key,
|
|
179
166
|
cwd: n.cwd || e.cwd,
|
|
180
167
|
key: i,
|
|
181
168
|
dir: e.dir,
|
|
182
169
|
url: i,
|
|
183
|
-
component:
|
|
170
|
+
component: P[i],
|
|
184
171
|
raw: "",
|
|
185
172
|
getRaw: R(m, i)
|
|
186
173
|
};
|
|
@@ -188,10 +175,10 @@ function I(t) {
|
|
|
188
175
|
}
|
|
189
176
|
}
|
|
190
177
|
}
|
|
191
|
-
}), n.tests &&
|
|
178
|
+
}), n.tests && ee(s, e, n), e.tests = s, s;
|
|
192
179
|
}
|
|
193
180
|
}
|
|
194
|
-
function
|
|
181
|
+
function ee(t, e, n) {
|
|
195
182
|
const r = e.url.substring(0, e.url.lastIndexOf("/" + e.value + "/")) + "/" + e.value, a = n.testsNanme || "/tests/";
|
|
196
183
|
typeof a == "string" ? n.examplessRaw.forEach((s) => {
|
|
197
184
|
if (s.startsWith(r + "/")) {
|
|
@@ -200,7 +187,7 @@ function te(t, e, n) {
|
|
|
200
187
|
cwd: e.cwd,
|
|
201
188
|
topurl: r,
|
|
202
189
|
comkey: e.key,
|
|
203
|
-
suffix:
|
|
190
|
+
suffix: g(s),
|
|
204
191
|
name: e.name,
|
|
205
192
|
value: e.value,
|
|
206
193
|
key: s,
|
|
@@ -213,21 +200,21 @@ function te(t, e, n) {
|
|
|
213
200
|
), l = new RegExp(
|
|
214
201
|
"/([^/]+)\\." + E.join("|") + "$"
|
|
215
202
|
);
|
|
216
|
-
let
|
|
217
|
-
if (
|
|
218
|
-
let
|
|
219
|
-
|
|
203
|
+
let f = s.match(i) || s.match(l);
|
|
204
|
+
if (f && f.length > 0) {
|
|
205
|
+
let o = "";
|
|
206
|
+
f && f.length > 1 && (o = f[1]), t[s] = {
|
|
220
207
|
topurl: r,
|
|
221
208
|
name: e.value,
|
|
222
|
-
value:
|
|
223
|
-
suffix:
|
|
209
|
+
value: o,
|
|
210
|
+
suffix: g(s),
|
|
224
211
|
comname: e.name,
|
|
225
212
|
comkey: e.key,
|
|
226
213
|
cwd: n.cwd || e.cwd,
|
|
227
214
|
key: s,
|
|
228
215
|
dir: e.dir,
|
|
229
216
|
url: s,
|
|
230
|
-
component:
|
|
217
|
+
component: P[s],
|
|
231
218
|
raw: "",
|
|
232
219
|
getRaw: R(m, s)
|
|
233
220
|
};
|
|
@@ -241,7 +228,7 @@ function te(t, e, n) {
|
|
|
241
228
|
cwd: e.cwd,
|
|
242
229
|
topurl: r,
|
|
243
230
|
comkey: e.key,
|
|
244
|
-
suffix:
|
|
231
|
+
suffix: g(s),
|
|
245
232
|
name: e.name,
|
|
246
233
|
value: e.value,
|
|
247
234
|
key: s,
|
|
@@ -254,21 +241,21 @@ function te(t, e, n) {
|
|
|
254
241
|
), l = new RegExp(
|
|
255
242
|
"/([^/]+)\\." + E.join("|") + "$"
|
|
256
243
|
);
|
|
257
|
-
let
|
|
258
|
-
if (
|
|
259
|
-
let
|
|
260
|
-
|
|
244
|
+
let f = s.match(i) || s.match(l);
|
|
245
|
+
if (f && f.length > 0) {
|
|
246
|
+
let o = "";
|
|
247
|
+
f && f.length > 1 && (o = f[1]), t[s] = {
|
|
261
248
|
cwd: n.cwd || e.cwd,
|
|
262
249
|
topurl: r,
|
|
263
250
|
name: e.value,
|
|
264
|
-
value:
|
|
265
|
-
suffix:
|
|
251
|
+
value: o,
|
|
252
|
+
suffix: g(s),
|
|
266
253
|
comname: e.name,
|
|
267
254
|
comkey: e.key,
|
|
268
255
|
key: s,
|
|
269
256
|
dir: e.dir,
|
|
270
257
|
url: s,
|
|
271
|
-
component:
|
|
258
|
+
component: P[s],
|
|
272
259
|
raw: "",
|
|
273
260
|
getRaw: R(m, s)
|
|
274
261
|
};
|
|
@@ -279,14 +266,14 @@ function te(t, e, n) {
|
|
|
279
266
|
}
|
|
280
267
|
function Le(t) {
|
|
281
268
|
if (t) {
|
|
282
|
-
const e =
|
|
269
|
+
const e = $(t);
|
|
283
270
|
return Object.values(e);
|
|
284
271
|
} else
|
|
285
272
|
return [];
|
|
286
273
|
}
|
|
287
274
|
function Ae(t, e, n) {
|
|
288
275
|
T();
|
|
289
|
-
const r =
|
|
276
|
+
const r = $(n), a = [];
|
|
290
277
|
if (e) {
|
|
291
278
|
let s = r[e];
|
|
292
279
|
if (s)
|
|
@@ -297,23 +284,23 @@ function Ae(t, e, n) {
|
|
|
297
284
|
}), a;
|
|
298
285
|
}
|
|
299
286
|
function $e(t) {
|
|
300
|
-
return
|
|
287
|
+
return $(t), h[t].mds;
|
|
301
288
|
}
|
|
302
|
-
async function
|
|
303
|
-
let r = t.key, a = t.dir, s = t.url, i = t.comprops, l = t.curprops,
|
|
304
|
-
return
|
|
289
|
+
async function B(t, e, n) {
|
|
290
|
+
let r = t.key, a = t.dir, s = t.url, i = t.comprops, l = t.curprops, f = await _(e, n || t.suffix) || [], o = s.split("/");
|
|
291
|
+
return f.map((c) => {
|
|
305
292
|
if (c.startsWith("./")) {
|
|
306
|
-
let u =
|
|
293
|
+
let u = o.slice(0, o.length - 1).join("/"), p = c.substring(2);
|
|
307
294
|
const w = u.replace(/^\.\/|((\.\.\/)+)/, "/");
|
|
308
295
|
let d = r.indexOf(w) + w.length;
|
|
309
296
|
return {
|
|
310
297
|
key: r.substring(0, d) + "/" + p,
|
|
311
298
|
name: c,
|
|
312
299
|
cwd: t.cwd,
|
|
313
|
-
comprops: i
|
|
314
|
-
curprops: l
|
|
300
|
+
comprops: i,
|
|
301
|
+
curprops: l,
|
|
315
302
|
value: p,
|
|
316
|
-
suffix:
|
|
303
|
+
suffix: g(c),
|
|
317
304
|
head: u,
|
|
318
305
|
dir: a,
|
|
319
306
|
url: u + "/" + p
|
|
@@ -325,17 +312,17 @@ async function F(t, e, n) {
|
|
|
325
312
|
p = N;
|
|
326
313
|
break;
|
|
327
314
|
}
|
|
328
|
-
let w = u.slice(p, u.length), d =
|
|
329
|
-
const
|
|
330
|
-
let
|
|
315
|
+
let w = u.slice(p, u.length), d = o.slice(0, o.length - p - 1).join("/"), O = w.join("/");
|
|
316
|
+
const W = d.replace(/^\.\/|((\.\.\/)+)/, "/");
|
|
317
|
+
let G = r.indexOf(W) + W.length;
|
|
331
318
|
return {
|
|
332
|
-
key: r.substring(0,
|
|
319
|
+
key: r.substring(0, G) + "/" + O,
|
|
333
320
|
name: O,
|
|
334
321
|
cwd: t.cwd,
|
|
335
|
-
comprops: i
|
|
336
|
-
curprops: l
|
|
322
|
+
comprops: i,
|
|
323
|
+
curprops: l,
|
|
337
324
|
value: O,
|
|
338
|
-
suffix:
|
|
325
|
+
suffix: g(c),
|
|
339
326
|
head: d,
|
|
340
327
|
dir: a,
|
|
341
328
|
url: d + "/" + O
|
|
@@ -346,10 +333,10 @@ async function F(t, e, n) {
|
|
|
346
333
|
return {
|
|
347
334
|
key: c,
|
|
348
335
|
name: w,
|
|
349
|
-
comprops: i
|
|
350
|
-
curprops: l
|
|
336
|
+
comprops: i,
|
|
337
|
+
curprops: l,
|
|
351
338
|
value: w,
|
|
352
|
-
suffix:
|
|
339
|
+
suffix: g(c),
|
|
353
340
|
head: d,
|
|
354
341
|
dir: a,
|
|
355
342
|
cwd: t.cwd,
|
|
@@ -364,13 +351,13 @@ function Ie(t) {
|
|
|
364
351
|
let n = t.map((r) => ({
|
|
365
352
|
...r,
|
|
366
353
|
raw: "",
|
|
367
|
-
suffix:
|
|
354
|
+
suffix: g(r.key),
|
|
368
355
|
getRaw: R(m, r.key)
|
|
369
356
|
}));
|
|
370
|
-
|
|
357
|
+
U(n, (r, a, s, i) => {
|
|
371
358
|
s.raw ? r() : s.getRaw ? s.getRaw(s).then((l) => {
|
|
372
|
-
const
|
|
373
|
-
s.raw =
|
|
359
|
+
const f = b(l);
|
|
360
|
+
s.raw = f, s.getRaw = null, r();
|
|
374
361
|
}) : r();
|
|
375
362
|
}).then(() => {
|
|
376
363
|
e(n);
|
|
@@ -379,32 +366,27 @@ function Ie(t) {
|
|
|
379
366
|
e([]);
|
|
380
367
|
});
|
|
381
368
|
}
|
|
382
|
-
function
|
|
383
|
-
const t =
|
|
384
|
-
|
|
369
|
+
function te() {
|
|
370
|
+
const t = X();
|
|
371
|
+
A("components")?.forEach((n) => {
|
|
385
372
|
const r = ae(n);
|
|
386
373
|
let a = n.dir || "";
|
|
387
|
-
|
|
374
|
+
Y(a, t, n.example, r);
|
|
388
375
|
});
|
|
389
376
|
}
|
|
390
|
-
const
|
|
377
|
+
const se = "default";
|
|
391
378
|
function ne(t) {
|
|
392
379
|
let e = C(t.name), n = [...t.aliasNames];
|
|
393
380
|
n.push(e), n.forEach((r) => {
|
|
394
|
-
|
|
381
|
+
M.push({
|
|
395
382
|
name: r,
|
|
396
383
|
value: t.key
|
|
397
384
|
});
|
|
398
385
|
});
|
|
399
386
|
}
|
|
400
387
|
function re(t, e) {
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
g[r.key] = r, ne(r);
|
|
404
|
-
const a = Object.values(r.aliass || {});
|
|
405
|
-
a && a.length ? a.forEach((s) => {
|
|
406
|
-
n[s] = n[s] || [], n[s].push(r.key);
|
|
407
|
-
}) : (n[P] = n[P] || [], n[P].push(r.key));
|
|
388
|
+
e?.forEach((n) => {
|
|
389
|
+
h[n.key] = n, ne(n);
|
|
408
390
|
});
|
|
409
391
|
}
|
|
410
392
|
function ae(t) {
|
|
@@ -412,17 +394,17 @@ function ae(t) {
|
|
|
412
394
|
const r = t.resolver;
|
|
413
395
|
r && Object.keys(r).forEach((s) => {
|
|
414
396
|
typeof t[s] > "u" && (t[s] = r[s]);
|
|
415
|
-
}), e = t.alias ||
|
|
397
|
+
}), e = t.alias || se;
|
|
416
398
|
let a = t?.urls || Object.keys(t.componentsRaw);
|
|
417
|
-
return n =
|
|
399
|
+
return n = q(a, t, t.componentsRaw, t.components), n && n?.props && n.props.forEach((s) => {
|
|
418
400
|
x[s.url] = s;
|
|
419
401
|
}), re(e, n.components), t.componentsRaw;
|
|
420
402
|
}
|
|
421
403
|
function Ve(t) {
|
|
422
|
-
return T(),
|
|
404
|
+
return T(), h[t];
|
|
423
405
|
}
|
|
424
406
|
function T() {
|
|
425
|
-
return Object.keys(
|
|
407
|
+
return Object.keys(h).length == 0 && te(), Object.values(h);
|
|
426
408
|
}
|
|
427
409
|
function Ke() {
|
|
428
410
|
return T(), x;
|
|
@@ -431,20 +413,20 @@ function Se(t, e, n) {
|
|
|
431
413
|
T();
|
|
432
414
|
const r = [];
|
|
433
415
|
if (n) {
|
|
434
|
-
let s =
|
|
416
|
+
let s = h[n];
|
|
435
417
|
if (s && s.key)
|
|
436
418
|
return [s];
|
|
437
419
|
}
|
|
438
420
|
let a = C(t);
|
|
439
|
-
return
|
|
440
|
-
e ? s.name.includes(a) && r.push(
|
|
441
|
-
}),
|
|
421
|
+
return M.forEach((s) => {
|
|
422
|
+
e ? s.name.includes(a) && r.push(h[s.value]) : s.name == a && r.push(h[s.value]);
|
|
423
|
+
}), J(r, "key");
|
|
442
424
|
}
|
|
443
425
|
async function ie(t, e) {
|
|
444
426
|
let n = t;
|
|
445
427
|
if (t) {
|
|
446
|
-
let r = (await
|
|
447
|
-
n = await
|
|
428
|
+
let r = (await B(e, t)).filter((a) => K(a.key, e.comprops) || S(a.key, e.curprops));
|
|
429
|
+
n = await F(r) + n;
|
|
448
430
|
}
|
|
449
431
|
return n;
|
|
450
432
|
}
|
|
@@ -456,11 +438,11 @@ function oe(t) {
|
|
|
456
438
|
return new Promise((e) => {
|
|
457
439
|
if (t && t.length > 0) {
|
|
458
440
|
let n = t.map((r) => le(r)).filter((r) => !!r);
|
|
459
|
-
|
|
441
|
+
U(n, (r, a, s, i) => {
|
|
460
442
|
s.raw ? r() : s.getRaw ? s.getRaw(s).then(async (l) => {
|
|
461
|
-
const
|
|
462
|
-
let
|
|
463
|
-
s.raw =
|
|
443
|
+
const f = b(l);
|
|
444
|
+
let o = await ie(f, t[i]);
|
|
445
|
+
s.raw = o, s.getRaw = null, r();
|
|
464
446
|
}) : r();
|
|
465
447
|
}).then(() => {
|
|
466
448
|
e(n);
|
|
@@ -469,28 +451,28 @@ function oe(t) {
|
|
|
469
451
|
e([]);
|
|
470
452
|
});
|
|
471
453
|
}
|
|
472
|
-
async function
|
|
454
|
+
async function F(t) {
|
|
473
455
|
return ((await oe(t))?.map((r) => r.raw) || []).join(`
|
|
474
456
|
`);
|
|
475
457
|
}
|
|
476
458
|
async function fe(t, e) {
|
|
477
459
|
let n = t;
|
|
478
460
|
if (t && (e.comprops || e.curprops)) {
|
|
479
|
-
let r = (await
|
|
480
|
-
n = await
|
|
461
|
+
let r = (await B(e, t)).filter((s) => K(s.key, e.comprops) || S(s.key, e.curprops));
|
|
462
|
+
n = await F(r) + n;
|
|
481
463
|
}
|
|
482
464
|
return n;
|
|
483
465
|
}
|
|
484
|
-
function
|
|
466
|
+
function b(t) {
|
|
485
467
|
return t && typeof t == "object" ? t.default || "" : (t || "") + "";
|
|
486
468
|
}
|
|
487
469
|
function Ue(t) {
|
|
488
470
|
return new Promise((e) => {
|
|
489
471
|
if (t) {
|
|
490
472
|
T();
|
|
491
|
-
const n =
|
|
473
|
+
const n = h[t];
|
|
492
474
|
n ? n.raw ? e(n.raw) : n.getRaw ? n.getRaw(n).then((r) => {
|
|
493
|
-
const a =
|
|
475
|
+
const a = b(r);
|
|
494
476
|
fe(a, n).then((s) => {
|
|
495
477
|
n.raw = s, n.getRaw = null, e(s);
|
|
496
478
|
});
|
|
@@ -500,19 +482,19 @@ function Ue(t) {
|
|
|
500
482
|
});
|
|
501
483
|
}
|
|
502
484
|
export {
|
|
503
|
-
|
|
485
|
+
se as defaultName,
|
|
504
486
|
Se as getCompoName,
|
|
505
487
|
Ve as getCompoNameKey,
|
|
506
488
|
T as getCompoNameObj,
|
|
507
489
|
Ke as getComponentPropsObjs,
|
|
508
|
-
|
|
490
|
+
b as getGetRawValue,
|
|
509
491
|
$e as getKeyMds,
|
|
510
|
-
|
|
492
|
+
z as getLevelUrl,
|
|
511
493
|
Ie as getLocalTextArr,
|
|
512
494
|
Ue as getLocalTextComponents,
|
|
513
495
|
We as getLocalTextTests,
|
|
514
496
|
oe as getPropsRaws,
|
|
515
|
-
|
|
497
|
+
B as getTestImportUrl,
|
|
516
498
|
Le as getTestName,
|
|
517
499
|
Ae as getTestNameObj
|
|
518
500
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fangzhongya/vue-archive",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.62",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description ": "vue 组件注释生成文档",
|
|
7
7
|
"author": "fangzhongya ",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@fangzhongya/create": "0.2.34",
|
|
22
22
|
"@fangzhongya/utils": "0.0.28",
|
|
23
|
-
"@fangzhongya/vue-components": "0.1.
|
|
23
|
+
"@fangzhongya/vue-components": "0.1.15",
|
|
24
24
|
"@highlightjs/vue-plugin": "^2.1.0",
|
|
25
|
-
"@types/node": "^24.
|
|
25
|
+
"@types/node": "^24.3.0",
|
|
26
26
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
27
27
|
"fast-glob": "^3.3.3",
|
|
28
28
|
"sass": "^1.90.0",
|