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