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