@fangzhongya/vue-archive 0.0.2-27 → 0.0.2-29
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 +10 -8
- package/dist/node/index.js +10 -8
- package/dist/packages/components/code/index.vue.cjs +1 -1
- package/dist/packages/components/code/index.vue.js +56 -55
- 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 +138 -134
- package/package.json +1 -1
package/dist/node/index.cjs
CHANGED
|
@@ -64470,7 +64470,7 @@ function getexamplesRawObj(comRaw, key) {
|
|
|
64470
64470
|
return comRaw;
|
|
64471
64471
|
}
|
|
64472
64472
|
}
|
|
64473
|
-
async function getImport(text, type
|
|
64473
|
+
async function getImport(text, type) {
|
|
64474
64474
|
let jstext = "";
|
|
64475
64475
|
if (type == "vue") {
|
|
64476
64476
|
const reg = new RegExp(
|
|
@@ -64480,9 +64480,7 @@ async function getImport(text, type = "vue") {
|
|
|
64480
64480
|
if (zz) {
|
|
64481
64481
|
jstext = zz[3];
|
|
64482
64482
|
}
|
|
64483
|
-
} else if (type == "js") {
|
|
64484
|
-
jstext = text;
|
|
64485
|
-
} else if (type == "ts") {
|
|
64483
|
+
} else if (type == "js" || type == "ts" || type == "") {
|
|
64486
64484
|
jstext = text;
|
|
64487
64485
|
}
|
|
64488
64486
|
if (jstext) {
|
|
@@ -64678,7 +64676,7 @@ function getKeyMds(key) {
|
|
|
64678
64676
|
getTestObj(key);
|
|
64679
64677
|
return componentsObj[key].mds;
|
|
64680
64678
|
}
|
|
64681
|
-
async function getTestImportUrl(url, text, type) {
|
|
64679
|
+
async function getTestImportUrl(url, text, type, comprops) {
|
|
64682
64680
|
let arr = await getImport(text, type) || [];
|
|
64683
64681
|
let urs = url.split("/");
|
|
64684
64682
|
return arr.map((key) => {
|
|
@@ -64687,6 +64685,7 @@ async function getTestImportUrl(url, text, type) {
|
|
|
64687
64685
|
let v = key.substring(2);
|
|
64688
64686
|
return {
|
|
64689
64687
|
name: key,
|
|
64688
|
+
comprops: comprops || "",
|
|
64690
64689
|
value: v,
|
|
64691
64690
|
suffix: getSuffix(key),
|
|
64692
64691
|
head,
|
|
@@ -64707,6 +64706,7 @@ async function getTestImportUrl(url, text, type) {
|
|
|
64707
64706
|
let v = vs.join("/");
|
|
64708
64707
|
return {
|
|
64709
64708
|
name: key,
|
|
64709
|
+
comprops: comprops || "",
|
|
64710
64710
|
value: v,
|
|
64711
64711
|
suffix: getSuffix(key),
|
|
64712
64712
|
head,
|
|
@@ -64796,9 +64796,10 @@ async function getPropsImport(text, obj) {
|
|
|
64796
64796
|
let arr = (await getTestImportUrl(
|
|
64797
64797
|
obj.key,
|
|
64798
64798
|
text,
|
|
64799
|
-
obj.suffix
|
|
64799
|
+
obj.suffix,
|
|
64800
|
+
obj.comprops
|
|
64800
64801
|
)).filter((v) => {
|
|
64801
|
-
return v.key.startsWith(obj.head);
|
|
64802
|
+
return v.key.startsWith(obj.head) || isComprops(v.name, obj.comprops || "");
|
|
64802
64803
|
});
|
|
64803
64804
|
ts += await getPropsTexts(arr);
|
|
64804
64805
|
}
|
|
@@ -64850,7 +64851,8 @@ async function getComponentsProps(text, obj) {
|
|
|
64850
64851
|
let arr = (await getTestImportUrl(
|
|
64851
64852
|
obj.key,
|
|
64852
64853
|
text,
|
|
64853
|
-
obj.suffix
|
|
64854
|
+
obj.suffix,
|
|
64855
|
+
obj.comprops || ""
|
|
64854
64856
|
)).filter((v) => {
|
|
64855
64857
|
return isComprops(
|
|
64856
64858
|
v.name,
|
package/dist/node/index.js
CHANGED
|
@@ -64470,7 +64470,7 @@ function getexamplesRawObj(comRaw, key) {
|
|
|
64470
64470
|
return comRaw;
|
|
64471
64471
|
}
|
|
64472
64472
|
}
|
|
64473
|
-
async function getImport(text, type
|
|
64473
|
+
async function getImport(text, type) {
|
|
64474
64474
|
let jstext = "";
|
|
64475
64475
|
if (type == "vue") {
|
|
64476
64476
|
const reg = new RegExp(
|
|
@@ -64480,9 +64480,7 @@ async function getImport(text, type = "vue") {
|
|
|
64480
64480
|
if (zz) {
|
|
64481
64481
|
jstext = zz[3];
|
|
64482
64482
|
}
|
|
64483
|
-
} else if (type == "js") {
|
|
64484
|
-
jstext = text;
|
|
64485
|
-
} else if (type == "ts") {
|
|
64483
|
+
} else if (type == "js" || type == "ts" || type == "") {
|
|
64486
64484
|
jstext = text;
|
|
64487
64485
|
}
|
|
64488
64486
|
if (jstext) {
|
|
@@ -64678,7 +64676,7 @@ function getKeyMds(key) {
|
|
|
64678
64676
|
getTestObj(key);
|
|
64679
64677
|
return componentsObj[key].mds;
|
|
64680
64678
|
}
|
|
64681
|
-
async function getTestImportUrl(url, text, type) {
|
|
64679
|
+
async function getTestImportUrl(url, text, type, comprops) {
|
|
64682
64680
|
let arr = await getImport(text, type) || [];
|
|
64683
64681
|
let urs = url.split("/");
|
|
64684
64682
|
return arr.map((key) => {
|
|
@@ -64687,6 +64685,7 @@ async function getTestImportUrl(url, text, type) {
|
|
|
64687
64685
|
let v = key.substring(2);
|
|
64688
64686
|
return {
|
|
64689
64687
|
name: key,
|
|
64688
|
+
comprops: comprops || "",
|
|
64690
64689
|
value: v,
|
|
64691
64690
|
suffix: getSuffix(key),
|
|
64692
64691
|
head,
|
|
@@ -64707,6 +64706,7 @@ async function getTestImportUrl(url, text, type) {
|
|
|
64707
64706
|
let v = vs.join("/");
|
|
64708
64707
|
return {
|
|
64709
64708
|
name: key,
|
|
64709
|
+
comprops: comprops || "",
|
|
64710
64710
|
value: v,
|
|
64711
64711
|
suffix: getSuffix(key),
|
|
64712
64712
|
head,
|
|
@@ -64796,9 +64796,10 @@ async function getPropsImport(text, obj) {
|
|
|
64796
64796
|
let arr = (await getTestImportUrl(
|
|
64797
64797
|
obj.key,
|
|
64798
64798
|
text,
|
|
64799
|
-
obj.suffix
|
|
64799
|
+
obj.suffix,
|
|
64800
|
+
obj.comprops
|
|
64800
64801
|
)).filter((v) => {
|
|
64801
|
-
return v.key.startsWith(obj.head);
|
|
64802
|
+
return v.key.startsWith(obj.head) || isComprops(v.name, obj.comprops || "");
|
|
64802
64803
|
});
|
|
64803
64804
|
ts += await getPropsTexts(arr);
|
|
64804
64805
|
}
|
|
@@ -64850,7 +64851,8 @@ async function getComponentsProps(text, obj) {
|
|
|
64850
64851
|
let arr = (await getTestImportUrl(
|
|
64851
64852
|
obj.key,
|
|
64852
64853
|
text,
|
|
64853
|
-
obj.suffix
|
|
64854
|
+
obj.suffix,
|
|
64855
|
+
obj.comprops || ""
|
|
64854
64856
|
)).filter((v) => {
|
|
64855
64857
|
return isComprops(
|
|
64856
64858
|
v.name,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),
|
|
1
|
+
"use strict";const e=require("vue"),p=require("../boxurl/index.vue.cjs"),x=require("../../router/index.cjs"),w=require("./highlight.vue.cjs"),_=require("../../utils/index.cjs"),h=require("../../utils/glob.cjs"),E=require("vue-router"),N={class:"code"},V={class:"code-top"},y={class:"code-top-but"},b={class:"top-but-files"},q=["onClick"],B={class:"code-highlightjs"},S=e.defineComponent({__name:"index",props:{text:String,value:Object},setup(f){const t=f,k=E.useRouter();e.watch(()=>t.text,()=>{u()});const a=e.ref([]),o=e.ref(),i=e.ref(!1);function g(){var l;(l=o.value)!=null&&l.raw?_.copyCode(o.value.raw):_.copyCode(t.text)}function m(){i.value=!i.value}function C(){x.toSingle(k,t.value)}function r(l){i.value=!0,o.value=l}function u(){var l,c;o.value=void 0,i.value=!1,t.text&&h.getTestImportUrl((l=t.value)==null?void 0:l.key,t.text,"vue",(c=t.value)==null?void 0:c.comprops).then(s=>{h.getLocalTextArr(s).then(n=>{a.value=n.filter(v=>v.raw)})})}return u(),(l,c)=>{var s;return e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("div",V,[e.createElementVNode("div",y,[e.createElementVNode("div",{class:"but-div",onClick:C}," go "),e.createElementVNode("div",{class:"but-div",onClick:g}," 复制 "),e.createElementVNode("div",{class:"but-div",onClick:m},e.toDisplayString(i.value?"隐藏":"显示"),1),e.createElementVNode("div",b,[e.createVNode(p,{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,v)=>(e.openBlock(),e.createBlock(p,{value:n},{default:e.withCtx(()=>{var d;return[e.createElementVNode("div",{class:e.normalizeClass(["but-div",{on:n.key==((d=o.value)==null?void 0:d.key)}]),onClick:e.withModifiers(D=>r(n),["stop"])},e.toDisplayString(n.value),11,q)]}),_:2},1032,["value"]))),256))])])]),e.withDirectives(e.createElementVNode("div",B,[e.createVNode(w,{language:"html",code:((s=o.value)==null?void 0:s.raw)||t.text},null,8,["code"])],512),[[e.vShow,i.value]])])}}});module.exports=S;
|
|
@@ -1,91 +1,92 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { toSingle as
|
|
4
|
-
import
|
|
5
|
-
import { copyCode as
|
|
6
|
-
import { getTestImportUrl as
|
|
7
|
-
import { useRouter as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as T, watch as $, ref as c, openBlock as u, createElementBlock as m, createElementVNode as t, toDisplayString as h, createVNode as _, withCtx as k, normalizeClass as g, withModifiers as C, Fragment as j, renderList as E, createBlock as L, withDirectives as N, vShow as V } from "vue";
|
|
2
|
+
import x from "../boxurl/index.vue.js";
|
|
3
|
+
import { toSingle as z } from "../../router/index.js";
|
|
4
|
+
import A from "./highlight.vue.js";
|
|
5
|
+
import { copyCode as w } from "../../utils/index.js";
|
|
6
|
+
import { getTestImportUrl as F, getLocalTextArr as H } from "../../utils/glob.js";
|
|
7
|
+
import { useRouter as I } from "vue-router";
|
|
8
|
+
const M = { class: "code" }, O = { class: "code-top" }, R = { class: "code-top-but" }, U = { class: "top-but-files" }, q = ["onClick"], G = { class: "code-highlightjs" }, ee = /* @__PURE__ */ T({
|
|
9
9
|
__name: "index",
|
|
10
10
|
props: {
|
|
11
11
|
text: String,
|
|
12
12
|
value: Object
|
|
13
13
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
() =>
|
|
14
|
+
setup(b) {
|
|
15
|
+
const e = b, y = I();
|
|
16
|
+
$(
|
|
17
|
+
() => e.text,
|
|
18
18
|
() => {
|
|
19
19
|
d();
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
22
|
const r = c([]), o = c(), a = c(!1);
|
|
23
|
-
function
|
|
23
|
+
function S() {
|
|
24
24
|
var l;
|
|
25
|
-
(l = o.value) != null && l.raw ?
|
|
25
|
+
(l = o.value) != null && l.raw ? w(o.value.raw) : w(e.text);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function B() {
|
|
28
28
|
a.value = !a.value;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
|
|
30
|
+
function D() {
|
|
31
|
+
z(y, e.value);
|
|
32
32
|
}
|
|
33
33
|
function v(l) {
|
|
34
34
|
a.value = !0, o.value = l;
|
|
35
35
|
}
|
|
36
36
|
function d() {
|
|
37
|
-
var l;
|
|
38
|
-
o.value = void 0, a.value = !1,
|
|
39
|
-
(l =
|
|
40
|
-
|
|
41
|
-
"vue"
|
|
37
|
+
var l, s;
|
|
38
|
+
o.value = void 0, a.value = !1, e.text && F(
|
|
39
|
+
(l = e.value) == null ? void 0 : l.key,
|
|
40
|
+
e.text,
|
|
41
|
+
"vue",
|
|
42
|
+
(s = e.value) == null ? void 0 : s.comprops
|
|
42
43
|
).then((n) => {
|
|
43
|
-
|
|
44
|
-
r.value =
|
|
44
|
+
H(n).then((i) => {
|
|
45
|
+
r.value = i.filter((f) => f.raw);
|
|
45
46
|
});
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
|
-
return d(), (l,
|
|
49
|
-
var
|
|
50
|
-
return u(),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
return d(), (l, s) => {
|
|
50
|
+
var n;
|
|
51
|
+
return u(), m("div", M, [
|
|
52
|
+
t("div", O, [
|
|
53
|
+
t("div", R, [
|
|
54
|
+
t("div", {
|
|
54
55
|
class: "but-div",
|
|
55
|
-
onClick:
|
|
56
|
+
onClick: D
|
|
56
57
|
}, " go "),
|
|
57
|
-
|
|
58
|
+
t("div", {
|
|
58
59
|
class: "but-div",
|
|
59
|
-
onClick:
|
|
60
|
+
onClick: S
|
|
60
61
|
}, " 复制 "),
|
|
61
|
-
|
|
62
|
+
t("div", {
|
|
62
63
|
class: "but-div",
|
|
63
|
-
onClick:
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
value:
|
|
64
|
+
onClick: B
|
|
65
|
+
}, h(a.value ? "隐藏" : "显示"), 1),
|
|
66
|
+
t("div", U, [
|
|
67
|
+
_(x, {
|
|
68
|
+
value: e.value
|
|
68
69
|
}, {
|
|
69
|
-
default:
|
|
70
|
-
|
|
71
|
-
class:
|
|
70
|
+
default: k(() => [
|
|
71
|
+
t("div", {
|
|
72
|
+
class: g(["but-div", {
|
|
72
73
|
on: !(o.value && o.value.value)
|
|
73
74
|
}]),
|
|
74
|
-
onClick:
|
|
75
|
+
onClick: s[0] || (s[0] = C((i) => v(), ["stop"]))
|
|
75
76
|
}, " index.vue ", 2)
|
|
76
77
|
]),
|
|
77
78
|
_: 1
|
|
78
79
|
}, 8, ["value"]),
|
|
79
|
-
(u(!0),
|
|
80
|
-
default:
|
|
81
|
-
var
|
|
80
|
+
(u(!0), m(j, null, E(r.value, (i, f) => (u(), L(x, { value: i }, {
|
|
81
|
+
default: k(() => {
|
|
82
|
+
var p;
|
|
82
83
|
return [
|
|
83
|
-
|
|
84
|
-
class:
|
|
85
|
-
on: i.key == ((
|
|
84
|
+
t("div", {
|
|
85
|
+
class: g(["but-div", {
|
|
86
|
+
on: i.key == ((p = o.value) == null ? void 0 : p.key)
|
|
86
87
|
}]),
|
|
87
|
-
onClick:
|
|
88
|
-
},
|
|
88
|
+
onClick: C((J) => v(i), ["stop"])
|
|
89
|
+
}, h(i.value), 11, q)
|
|
89
90
|
];
|
|
90
91
|
}),
|
|
91
92
|
_: 2
|
|
@@ -93,13 +94,13 @@ const I = { class: "code" }, M = { class: "code-top" }, O = { class: "code-top-b
|
|
|
93
94
|
])
|
|
94
95
|
])
|
|
95
96
|
]),
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
N(t("div", G, [
|
|
98
|
+
_(A, {
|
|
98
99
|
language: "html",
|
|
99
|
-
code: ((
|
|
100
|
+
code: ((n = o.value) == null ? void 0 : n.raw) || e.text
|
|
100
101
|
}, null, 8, ["code"])
|
|
101
102
|
], 512), [
|
|
102
|
-
[
|
|
103
|
+
[V, a.value]
|
|
103
104
|
])
|
|
104
105
|
]);
|
|
105
106
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
`)}async function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../config.cjs"),m=require("./common.cjs"),w=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs"),E=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.cjs"),L=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.cjs"),M=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.cjs"),P=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.cjs"),x=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.cjs"),H=require("./index.cjs"),f={},R={},q=[],A={},S={},d={};function I(){return y.getConfig("example")}function j(e,t,s){const n=Object.assign({exampless:[],examplessRaw:[]},t,s),r=[],a=n.examples;a&&Object.keys(a).forEach(l=>{r.push(l),S[l]=a[l]});const i=n.examplesRaw,o=[];n.urls&&n.urls.length>0?(n.exampless=n.urls,n.urls.forEach(l=>{o.push(l),i&&(d[l]=N(i,l))})):(n.exampless=r,i&&Object.keys(i).forEach(l=>{o.push(l),i&&(d[l]=N(i,l))})),n.examples=void 0,n.examplessRaw=o,n.examplesRaw=void 0,A[e]=n}function N(e,t){return typeof e=="function"?e:e&&(e[t]||e)}async function k(e,t){let s="";if(t=="vue"){let r=new RegExp(/(<script([^>]*)>)((.|\n|\r)*)(<\/script>)/g).exec(e);r&&(s=r[3])}else(t=="js"||t=="ts"||t=="")&&(s=e);if(s){const n=await H.getTextImport(s);let r=n==null?void 0:n.map(i=>i.n);const a=[];return r&&r.length>0&&r.forEach(i=>{i&&(i.startsWith("./")||i.startsWith("../"))&&a.push(i)}),a}}function U(e){return new Promise(t=>{e?e.raw?t(e.raw):e.getRaw?e.getRaw(e).then(s=>{const n=(s||"")+"";e.raw=n,e.getRaw=null,t(n)}):t(""):t("")})}function V(e,t){e=(e||"")+"";let s="";switch(e){case"1":s=t.tdir+"/";break;case"2":s=t.adir+"/";break;case"3":s=t.tdir+"/"+t.adir+"/";break}return s}function W(e,t,s){var o,l;e=(e||"")+"",s=(s||"")+"";let n=w.humpToLine(t.name),r=[];const a=Object.values(t.aliass||{});if(e==="1")t.alias&&r.push(t.alias+"-"+n);else if(e==="2")a&&a.length>0&&a.forEach(c=>{r.push(c+"-"+n)});else if(e==="3"){let c="";t.alias&&(c=t.alias+"-"),a==null||a.forEach(u=>{r.push(c+u+"-"+n)})}else e==="4"?(o=t.aliasNames)==null||o.forEach(c=>{r.push(w.humpToLine(c))}):e=="9"&&(r.push(n),(l=t.aliasNames)==null||l.forEach(c=>{r.push(w.humpToLine(c))}));r.length==0&&r.push(n);let i=[];return s==="1"?r.forEach(c=>{let u=E.lineToLargeHump(c);i.push(u,L.firstLower(u))}):s==="2"?r.forEach(c=>{let u=E.lineToLargeHump(c);i.push(c,u,L.firstLower(u))}):i=[...r],i=[...new Set(i)],i}function b(e,t,s,n){const r=[];return s.examplessRaw.forEach(a=>{for(let i=0;i<t.length;i++){const o=t[i];if(a==e+o+"/"+s.md+".md"){r.push({topurl:e,comkey:n.key,suffix:x.getSuffix(a),name:n.name,value:o,key:a,raw:"",getRaw:m.getRawValue(d,a)});break}}}),r}function T(e){h();const t=f[e];if(t.tests)return t.tests;{const s=A[t.dir],n=s.dir+V(s.level||0,t),r=W(s.aliaslevel||0,t,s.componentName||0);t.mds=b(n,r,s,t);const a={};return s.exampless.forEach(i=>{for(let o=0;o<r.length;o++){const l=r[o];if(i.startsWith(n+l+"/")){const c=new RegExp("^\\"+n+l+"/(.*)/index\\."+m.defaultExtensions.join("|")+"$");let u="",p=i.match(c);p&&p.length>1&&(u=p[1]),a[i]={topurl:n,name:l,value:u,suffix:x.getSuffix(i),comname:t.name,comkey:t.key,key:i,component:S[i],raw:"",getRaw:m.getRawValue(d,i)};break}}}),t.tests=a,a}}function B(e){if(e){const t=T(e);return Object.values(t)}else return[]}function D(e,t,s){h();const n=T(s),r=[];if(t){let a=n[t];if(a)return r.push(a),r}return Object.values(n).forEach(a=>{a.name+"/"+a.value==e&&r.push(a)}),r}function F(e){return T(e),f[e].mds}async function C(e,t,s,n){let r=await k(t,s)||[],a=e.split("/");return r.map(i=>{if(i.startsWith("./")){let o=a.slice(0,a.length-1).join("/"),l=i.substring(2);return{name:i,comprops:n||"",value:l,suffix:x.getSuffix(i),head:o,key:o+"/"+l}}else{let o=i.split("/"),l=0;for(let O=0;O<o.length;O++)if(o[O]!=".."){l=O;break}let c=o.slice(l,o.length),u=a.slice(0,a.length-l-1).join("/"),p=c.join("/");return{name:i,comprops:n||"",value:p,suffix:x.getSuffix(i),head:u,key:u+"/"+p}}})}function J(e){return new Promise(t=>{if(e&&e.length>0){let s=e.map(n=>({raw:"",value:n.value,suffix:x.getSuffix(n.key),key:n.key,getRaw:m.getRawValue(d,n.key)}));P.asyncMergeArray(s,(n,r,a,i)=>{a.raw?n():a.getRaw?a.getRaw(a).then(o=>{const l=(o||"")+"";a.raw=l,a.getRaw=null,n()}):n()}).then(()=>{t(s)})}else t([])})}function X(){const e=I(),t=y.getConfig("components");t==null||t.forEach(s=>{var r;$(s);let n=s.dir||((r=s==null?void 0:s.resolver)==null?void 0:r.dir)||"";j(n,e,s.example)})}const g="default";function Z(e){let t=w.humpToLine(e.name),s=[...e.aliasNames];s.push(t),s.forEach(n=>{q.push({name:n,value:e.key})})}function Q(e,t){const s={};t==null||t.forEach(n=>{f[n.key]=n,Z(n);const r=Object.values(n.aliass||{});r&&r.length?r.forEach(a=>{s[a]=s[a]||[],s[a].push(n.key)}):(s[g]=s[g]||[],s[g].push(n.key))})}function $(e){var n;let t,s;if(e.resolver)t=e.alias||((n=e.resolver)==null?void 0:n.alias)||g,s=m.getComponentsArr(e.resolver.urls||[],e.resolver,e.componentsRaw,e.components,e);else{t=e.alias||g;let r=(e==null?void 0:e.urls)||Object.keys(e.componentsRaw);s=m.getComponentsArr(r,e,e.componentsRaw,e.components,e)}s&&(s!=null&&s.props)&&s.props.forEach(r=>{R[r.key]=r}),Q(t,s.components)}function G(e){return h(),f[e]}function h(){return Object.keys(f).length==0&&X(),Object.values(f)}function Y(e,t,s){h();const n=[];if(s){let a=f[s];if(a&&a.key)return[a]}let r=w.humpToLine(e);return q.forEach(a=>{t?a.name.includes(r)&&n.push(f[a.value]):a.name==r&&n.push(f[a.value])}),M.duplicateRemoval(n,"key")}async function _(e,t){let s=e;if(e){let n=(await C(t.key,e,t.suffix,t.comprops)).filter(r=>r.key.startsWith(t.head)||m.isComprops(r.name,t.comprops||""));s+=await K(n)}return s}function z(e){return new Promise(t=>{if(e&&e.length>0){let s=e.map(n=>R[n.key]||R[n.key+".js"]||R[n.key+".ts"]);P.asyncMergeArray(s,(n,r,a,i)=>{a.raw?n():a.getRaw?a.getRaw(a).then(async o=>{const l=(o||"")+"";let c=await _(l,e[i]);a.raw=c,a.getRaw=null,n()}):n()}).then(()=>{t(s)})}else t([])})}async function K(e){const t=await z(e);return((t==null?void 0:t.map(n=>n.raw))||[]).join(`
|
|
2
|
+
`)}async function v(e,t){let s=e;if(e&&(t.comprops||t.curprops)){let n=(await C(t.key,e,t.suffix,t.comprops||"")).filter(a=>m.isComprops(a.name,t.comprops||"")||m.isCurprops(a.name,t.curprops||"")),r=await K(n);s+=r}return s}function ee(e){return new Promise(t=>{if(e){h();const s=f[e];s?s.raw?t(s.raw):s.getRaw?s.getRaw(s).then(async n=>{const r=(n||"")+"",a=await v(r,s);s.raw=a,s.getRaw=null,t(a)}):t(""):t("")}else t("")})}exports.defaultName=g;exports.getCompoName=Y;exports.getCompoNameKey=G;exports.getCompoNameObj=h;exports.getKeyMds=F;exports.getLocalTextArr=J;exports.getLocalTextComponents=ee;exports.getLocalTextTests=U;exports.getTestImportUrl=C;exports.getTestName=B;exports.getTestNameObj=D;
|
|
@@ -15,7 +15,7 @@ export declare function getKeyMds(key: string): MdObj[] | undefined;
|
|
|
15
15
|
* @param {*} arr
|
|
16
16
|
* @returns
|
|
17
17
|
*/
|
|
18
|
-
export declare function getTestImportUrl(url: string, text: string, type: string): Promise<Array<PropObj>>;
|
|
18
|
+
export declare function getTestImportUrl(url: string, text: string, type: string, comprops?: string): Promise<Array<PropObj>>;
|
|
19
19
|
export declare function getLocalTextArr(arr: Array<PropObj>): Promise<TextObj[]>;
|
|
20
20
|
export declare const defaultName = "default";
|
|
21
21
|
export declare function getCompoNameKey(key: string): ComponentsObj;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { getConfig as
|
|
2
|
-
import { getRawValue as
|
|
1
|
+
import { getConfig as L } from "../config.js";
|
|
2
|
+
import { getRawValue as O, getComponentsArr as T, defaultExtensions as j, isComprops as W, isCurprops as S } from "./common.js";
|
|
3
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
|
|
5
|
-
import { firstLower as
|
|
6
|
-
import { duplicateRemoval as
|
|
7
|
-
import { asyncMergeArray as
|
|
4
|
+
import { lineToLargeHump as C } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js";
|
|
5
|
+
import { firstLower as N } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js";
|
|
6
|
+
import { duplicateRemoval as V } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js";
|
|
7
|
+
import { asyncMergeArray as y } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js";
|
|
8
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
|
|
10
|
-
const
|
|
11
|
-
function
|
|
12
|
-
return
|
|
9
|
+
import { getTextImport as F } from "./index.js";
|
|
10
|
+
const m = {}, R = {}, A = [], I = {}, K = {}, w = {};
|
|
11
|
+
function H() {
|
|
12
|
+
return L("example");
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function $(e, t, s) {
|
|
15
15
|
const n = Object.assign(
|
|
16
16
|
{
|
|
17
17
|
exampless: [],
|
|
@@ -20,26 +20,26 @@ function F(e, t, s) {
|
|
|
20
20
|
t,
|
|
21
21
|
s
|
|
22
22
|
), r = [], a = n.examples;
|
|
23
|
-
a && Object.keys(a).forEach((
|
|
24
|
-
r.push(
|
|
23
|
+
a && Object.keys(a).forEach((l) => {
|
|
24
|
+
r.push(l), K[l] = a[l];
|
|
25
25
|
});
|
|
26
|
-
const i = n.examplesRaw,
|
|
27
|
-
n.urls && n.urls.length > 0 ? (n.exampless = n.urls, n.urls.forEach((
|
|
28
|
-
|
|
26
|
+
const i = n.examplesRaw, o = [];
|
|
27
|
+
n.urls && n.urls.length > 0 ? (n.exampless = n.urls, n.urls.forEach((l) => {
|
|
28
|
+
o.push(l), i && (w[l] = P(
|
|
29
29
|
i,
|
|
30
|
-
|
|
30
|
+
l
|
|
31
31
|
));
|
|
32
|
-
})) : (n.exampless = r, i && Object.keys(i).forEach((
|
|
33
|
-
|
|
32
|
+
})) : (n.exampless = r, i && Object.keys(i).forEach((l) => {
|
|
33
|
+
o.push(l), i && (w[l] = P(
|
|
34
34
|
i,
|
|
35
|
-
|
|
35
|
+
l
|
|
36
36
|
));
|
|
37
|
-
})), n.examples = void 0, n.examplessRaw =
|
|
37
|
+
})), n.examples = void 0, n.examplessRaw = o, n.examplesRaw = void 0, I[e] = n;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function P(e, t) {
|
|
40
40
|
return typeof e == "function" ? e : e && (e[t] || e);
|
|
41
41
|
}
|
|
42
|
-
async function
|
|
42
|
+
async function b(e, t) {
|
|
43
43
|
let s = "";
|
|
44
44
|
if (t == "vue") {
|
|
45
45
|
let r = new RegExp(
|
|
@@ -47,9 +47,9 @@ async function H(e, t = "vue") {
|
|
|
47
47
|
).exec(e);
|
|
48
48
|
r && (s = r[3]);
|
|
49
49
|
} else
|
|
50
|
-
(t == "js" || t == "ts") && (s = e);
|
|
50
|
+
(t == "js" || t == "ts" || t == "") && (s = e);
|
|
51
51
|
if (s) {
|
|
52
|
-
const n = await
|
|
52
|
+
const n = await F(s);
|
|
53
53
|
let r = n == null ? void 0 : n.map((i) => i.n);
|
|
54
54
|
const a = [];
|
|
55
55
|
return r && r.length > 0 && r.forEach((i) => {
|
|
@@ -57,7 +57,7 @@ async function H(e, t = "vue") {
|
|
|
57
57
|
}), a;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function le(e) {
|
|
61
61
|
return new Promise((t) => {
|
|
62
62
|
e ? e.raw ? t(e.raw) : e.getRaw ? e.getRaw(e).then((s) => {
|
|
63
63
|
const n = (s || "") + "";
|
|
@@ -65,7 +65,7 @@ function ie(e) {
|
|
|
65
65
|
}) : t("") : t("");
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function q(e, t) {
|
|
69
69
|
e = (e || "") + "";
|
|
70
70
|
let s = "";
|
|
71
71
|
switch (e) {
|
|
@@ -81,8 +81,8 @@ function $(e, t) {
|
|
|
81
81
|
}
|
|
82
82
|
return s;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
var
|
|
84
|
+
function B(e, t, s) {
|
|
85
|
+
var o, l;
|
|
86
86
|
e = (e || "") + "", s = (s || "") + "";
|
|
87
87
|
let n = p(t.name), r = [];
|
|
88
88
|
const a = Object.values(t.aliass || {});
|
|
@@ -98,36 +98,36 @@ function q(e, t, s) {
|
|
|
98
98
|
r.push(f + c + "-" + n);
|
|
99
99
|
});
|
|
100
100
|
} else
|
|
101
|
-
e === "4" ? (
|
|
101
|
+
e === "4" ? (o = t.aliasNames) == null || o.forEach((f) => {
|
|
102
102
|
r.push(p(f));
|
|
103
|
-
}) : e == "9" && (r.push(n), (
|
|
103
|
+
}) : e == "9" && (r.push(n), (l = t.aliasNames) == null || l.forEach((f) => {
|
|
104
104
|
r.push(p(f));
|
|
105
105
|
}));
|
|
106
106
|
r.length == 0 && r.push(n);
|
|
107
107
|
let i = [];
|
|
108
108
|
return s === "1" ? r.forEach((f) => {
|
|
109
|
-
let c =
|
|
110
|
-
i.push(c,
|
|
109
|
+
let c = C(f);
|
|
110
|
+
i.push(c, N(c));
|
|
111
111
|
}) : s === "2" ? r.forEach((f) => {
|
|
112
|
-
let c =
|
|
113
|
-
i.push(f, c,
|
|
112
|
+
let c = C(f);
|
|
113
|
+
i.push(f, c, N(c));
|
|
114
114
|
}) : i = [...r], i = [...new Set(i)], i;
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function D(e, t, s, n) {
|
|
117
117
|
const r = [];
|
|
118
118
|
return s.examplessRaw.forEach((a) => {
|
|
119
119
|
for (let i = 0; i < t.length; i++) {
|
|
120
|
-
const
|
|
121
|
-
if (a == e +
|
|
120
|
+
const o = t[i];
|
|
121
|
+
if (a == e + o + "/" + s.md + ".md") {
|
|
122
122
|
r.push({
|
|
123
123
|
topurl: e,
|
|
124
124
|
comkey: n.key,
|
|
125
125
|
suffix: g(a),
|
|
126
126
|
name: n.name,
|
|
127
|
-
value:
|
|
127
|
+
value: o,
|
|
128
128
|
key: a,
|
|
129
129
|
raw: "",
|
|
130
|
-
getRaw:
|
|
130
|
+
getRaw: O(
|
|
131
131
|
w,
|
|
132
132
|
a
|
|
133
133
|
)
|
|
@@ -137,38 +137,38 @@ function B(e, t, s, n) {
|
|
|
137
137
|
}
|
|
138
138
|
}), r;
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function E(e) {
|
|
141
141
|
x();
|
|
142
|
-
const t =
|
|
142
|
+
const t = m[e];
|
|
143
143
|
if (t.tests)
|
|
144
144
|
return t.tests;
|
|
145
145
|
{
|
|
146
|
-
const s =
|
|
146
|
+
const s = I[t.dir], n = s.dir + q(s.level || 0, t), r = B(
|
|
147
147
|
s.aliaslevel || 0,
|
|
148
148
|
t,
|
|
149
149
|
s.componentName || 0
|
|
150
150
|
);
|
|
151
|
-
t.mds =
|
|
151
|
+
t.mds = D(n, r, s, t);
|
|
152
152
|
const a = {};
|
|
153
153
|
return s.exampless.forEach((i) => {
|
|
154
|
-
for (let
|
|
155
|
-
const
|
|
156
|
-
if (i.startsWith(n +
|
|
154
|
+
for (let o = 0; o < r.length; o++) {
|
|
155
|
+
const l = r[o];
|
|
156
|
+
if (i.startsWith(n + l + "/")) {
|
|
157
157
|
const f = new RegExp(
|
|
158
|
-
"^\\" + n +
|
|
158
|
+
"^\\" + n + l + "/(.*)/index\\." + j.join("|") + "$"
|
|
159
159
|
);
|
|
160
|
-
let c = "",
|
|
161
|
-
|
|
160
|
+
let c = "", u = i.match(f);
|
|
161
|
+
u && u.length > 1 && (c = u[1]), a[i] = {
|
|
162
162
|
topurl: n,
|
|
163
|
-
name:
|
|
163
|
+
name: l,
|
|
164
164
|
value: c,
|
|
165
165
|
suffix: g(i),
|
|
166
166
|
comname: t.name,
|
|
167
167
|
comkey: t.key,
|
|
168
168
|
key: i,
|
|
169
|
-
component:
|
|
169
|
+
component: K[i],
|
|
170
170
|
raw: "",
|
|
171
|
-
getRaw:
|
|
171
|
+
getRaw: O(
|
|
172
172
|
w,
|
|
173
173
|
i
|
|
174
174
|
)
|
|
@@ -179,16 +179,16 @@ function O(e) {
|
|
|
179
179
|
}), t.tests = a, a;
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function oe(e) {
|
|
183
183
|
if (e) {
|
|
184
|
-
const t =
|
|
184
|
+
const t = E(e);
|
|
185
185
|
return Object.values(t);
|
|
186
186
|
} else
|
|
187
187
|
return [];
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function fe(e, t, s) {
|
|
190
190
|
x();
|
|
191
|
-
const n =
|
|
191
|
+
const n = E(s), r = [];
|
|
192
192
|
if (t) {
|
|
193
193
|
let a = n[t];
|
|
194
194
|
if (a)
|
|
@@ -198,40 +198,42 @@ function oe(e, t, s) {
|
|
|
198
198
|
a.name + "/" + a.value == e && r.push(a);
|
|
199
199
|
}), r;
|
|
200
200
|
}
|
|
201
|
-
function
|
|
202
|
-
return
|
|
201
|
+
function ce(e) {
|
|
202
|
+
return E(e), m[e].mds;
|
|
203
203
|
}
|
|
204
|
-
async function
|
|
205
|
-
let
|
|
206
|
-
return
|
|
207
|
-
if (
|
|
208
|
-
let
|
|
204
|
+
async function M(e, t, s, n) {
|
|
205
|
+
let r = await b(t, s) || [], a = e.split("/");
|
|
206
|
+
return r.map((i) => {
|
|
207
|
+
if (i.startsWith("./")) {
|
|
208
|
+
let o = a.slice(0, a.length - 1).join("/"), l = i.substring(2);
|
|
209
209
|
return {
|
|
210
|
-
name:
|
|
210
|
+
name: i,
|
|
211
|
+
comprops: n || "",
|
|
211
212
|
value: l,
|
|
212
|
-
suffix: g(
|
|
213
|
-
head:
|
|
214
|
-
key:
|
|
213
|
+
suffix: g(i),
|
|
214
|
+
head: o,
|
|
215
|
+
key: o + "/" + l
|
|
215
216
|
};
|
|
216
217
|
} else {
|
|
217
|
-
let
|
|
218
|
-
for (let
|
|
219
|
-
if (
|
|
220
|
-
l =
|
|
218
|
+
let o = i.split("/"), l = 0;
|
|
219
|
+
for (let d = 0; d < o.length; d++)
|
|
220
|
+
if (o[d] != "..") {
|
|
221
|
+
l = d;
|
|
221
222
|
break;
|
|
222
223
|
}
|
|
223
|
-
let
|
|
224
|
+
let f = o.slice(l, o.length), c = a.slice(0, a.length - l - 1).join("/"), u = f.join("/");
|
|
224
225
|
return {
|
|
225
|
-
name:
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
226
|
+
name: i,
|
|
227
|
+
comprops: n || "",
|
|
228
|
+
value: u,
|
|
229
|
+
suffix: g(i),
|
|
230
|
+
head: c,
|
|
231
|
+
key: c + "/" + u
|
|
230
232
|
};
|
|
231
233
|
}
|
|
232
234
|
});
|
|
233
235
|
}
|
|
234
|
-
function
|
|
236
|
+
function me(e) {
|
|
235
237
|
return new Promise((t) => {
|
|
236
238
|
if (e && e.length > 0) {
|
|
237
239
|
let s = e.map((n) => ({
|
|
@@ -239,17 +241,17 @@ function ce(e) {
|
|
|
239
241
|
value: n.value,
|
|
240
242
|
suffix: g(n.key),
|
|
241
243
|
key: n.key,
|
|
242
|
-
getRaw:
|
|
244
|
+
getRaw: O(
|
|
243
245
|
w,
|
|
244
246
|
n.key
|
|
245
247
|
)
|
|
246
248
|
}));
|
|
247
|
-
|
|
249
|
+
y(
|
|
248
250
|
s,
|
|
249
251
|
(n, r, a, i) => {
|
|
250
|
-
a.raw ? n() : a.getRaw ? a.getRaw(a).then((
|
|
251
|
-
const
|
|
252
|
-
a.raw =
|
|
252
|
+
a.raw ? n() : a.getRaw ? a.getRaw(a).then((o) => {
|
|
253
|
+
const l = (o || "") + "";
|
|
254
|
+
a.raw = l, a.getRaw = null, n();
|
|
253
255
|
}) : n();
|
|
254
256
|
}
|
|
255
257
|
).then(() => {
|
|
@@ -259,40 +261,40 @@ function ce(e) {
|
|
|
259
261
|
t([]);
|
|
260
262
|
});
|
|
261
263
|
}
|
|
262
|
-
function
|
|
263
|
-
const e =
|
|
264
|
+
function G() {
|
|
265
|
+
const e = H(), t = L("components");
|
|
264
266
|
t == null || t.forEach((s) => {
|
|
265
267
|
var r;
|
|
266
|
-
|
|
268
|
+
X(s);
|
|
267
269
|
let n = s.dir || ((r = s == null ? void 0 : s.resolver) == null ? void 0 : r.dir) || "";
|
|
268
|
-
|
|
270
|
+
$(n, e, s.example);
|
|
269
271
|
});
|
|
270
272
|
}
|
|
271
273
|
const h = "default";
|
|
272
|
-
function
|
|
274
|
+
function J(e) {
|
|
273
275
|
let t = p(e.name), s = [...e.aliasNames];
|
|
274
276
|
s.push(t), s.forEach((n) => {
|
|
275
|
-
|
|
277
|
+
A.push({
|
|
276
278
|
name: n,
|
|
277
279
|
value: e.key
|
|
278
280
|
});
|
|
279
281
|
});
|
|
280
282
|
}
|
|
281
|
-
function
|
|
283
|
+
function Q(e, t) {
|
|
282
284
|
const s = {};
|
|
283
285
|
t == null || t.forEach((n) => {
|
|
284
|
-
|
|
286
|
+
m[n.key] = n, J(n);
|
|
285
287
|
const r = Object.values(n.aliass || {});
|
|
286
288
|
r && r.length ? r.forEach((a) => {
|
|
287
289
|
s[a] = s[a] || [], s[a].push(n.key);
|
|
288
290
|
}) : (s[h] = s[h] || [], s[h].push(n.key));
|
|
289
291
|
});
|
|
290
292
|
}
|
|
291
|
-
function
|
|
293
|
+
function X(e) {
|
|
292
294
|
var n;
|
|
293
295
|
let t, s;
|
|
294
296
|
if (e.resolver)
|
|
295
|
-
t = e.alias || ((n = e.resolver) == null ? void 0 : n.alias) || h, s =
|
|
297
|
+
t = e.alias || ((n = e.resolver) == null ? void 0 : n.alias) || h, s = T(
|
|
296
298
|
e.resolver.urls || [],
|
|
297
299
|
e.resolver,
|
|
298
300
|
e.componentsRaw,
|
|
@@ -302,7 +304,7 @@ function Q(e) {
|
|
|
302
304
|
else {
|
|
303
305
|
t = e.alias || h;
|
|
304
306
|
let r = (e == null ? void 0 : e.urls) || Object.keys(e.componentsRaw);
|
|
305
|
-
s =
|
|
307
|
+
s = T(
|
|
306
308
|
r,
|
|
307
309
|
e,
|
|
308
310
|
e.componentsRaw,
|
|
@@ -311,51 +313,52 @@ function Q(e) {
|
|
|
311
313
|
);
|
|
312
314
|
}
|
|
313
315
|
s && (s != null && s.props) && s.props.forEach((r) => {
|
|
314
|
-
|
|
315
|
-
}),
|
|
316
|
+
R[r.key] = r;
|
|
317
|
+
}), Q(t, s.components);
|
|
316
318
|
}
|
|
317
319
|
function ue(e) {
|
|
318
|
-
return x(),
|
|
320
|
+
return x(), m[e];
|
|
319
321
|
}
|
|
320
322
|
function x() {
|
|
321
|
-
return Object.keys(
|
|
323
|
+
return Object.keys(m).length == 0 && G(), Object.values(m);
|
|
322
324
|
}
|
|
323
|
-
function
|
|
325
|
+
function pe(e, t, s) {
|
|
324
326
|
x();
|
|
325
327
|
const n = [];
|
|
326
328
|
if (s) {
|
|
327
|
-
let a =
|
|
329
|
+
let a = m[s];
|
|
328
330
|
if (a && a.key)
|
|
329
331
|
return [a];
|
|
330
332
|
}
|
|
331
333
|
let r = p(e);
|
|
332
|
-
return
|
|
333
|
-
t ? a.name.includes(r) && n.push(
|
|
334
|
-
}),
|
|
334
|
+
return A.forEach((a) => {
|
|
335
|
+
t ? a.name.includes(r) && n.push(m[a.value]) : a.name == r && n.push(m[a.value]);
|
|
336
|
+
}), V(n, "key");
|
|
335
337
|
}
|
|
336
|
-
async function
|
|
338
|
+
async function Y(e, t) {
|
|
337
339
|
let s = e;
|
|
338
340
|
if (e) {
|
|
339
|
-
let n = (await
|
|
341
|
+
let n = (await M(
|
|
340
342
|
t.key,
|
|
341
343
|
e,
|
|
342
|
-
t.suffix
|
|
343
|
-
|
|
344
|
-
|
|
344
|
+
t.suffix,
|
|
345
|
+
t.comprops
|
|
346
|
+
)).filter((r) => r.key.startsWith(t.head) || W(r.name, t.comprops || ""));
|
|
347
|
+
s += await U(n);
|
|
345
348
|
}
|
|
346
349
|
return s;
|
|
347
350
|
}
|
|
348
|
-
function
|
|
351
|
+
function Z(e) {
|
|
349
352
|
return new Promise((t) => {
|
|
350
353
|
if (e && e.length > 0) {
|
|
351
|
-
let s = e.map((n) =>
|
|
352
|
-
|
|
354
|
+
let s = e.map((n) => R[n.key] || R[n.key + ".js"] || R[n.key + ".ts"]);
|
|
355
|
+
y(
|
|
353
356
|
s,
|
|
354
357
|
(n, r, a, i) => {
|
|
355
|
-
a.raw ? n() : a.getRaw ? a.getRaw(a).then(async (
|
|
356
|
-
const
|
|
357
|
-
let f = await
|
|
358
|
-
|
|
358
|
+
a.raw ? n() : a.getRaw ? a.getRaw(a).then(async (o) => {
|
|
359
|
+
const l = (o || "") + "";
|
|
360
|
+
let f = await Y(
|
|
361
|
+
l,
|
|
359
362
|
e[i]
|
|
360
363
|
);
|
|
361
364
|
a.raw = f, a.getRaw = null, n();
|
|
@@ -368,33 +371,34 @@ function Y(e) {
|
|
|
368
371
|
t([]);
|
|
369
372
|
});
|
|
370
373
|
}
|
|
371
|
-
async function
|
|
372
|
-
const t = await
|
|
374
|
+
async function U(e) {
|
|
375
|
+
const t = await Z(e);
|
|
373
376
|
return ((t == null ? void 0 : t.map((n) => n.raw)) || []).join(`
|
|
374
377
|
`);
|
|
375
378
|
}
|
|
376
|
-
async function
|
|
379
|
+
async function _(e, t) {
|
|
377
380
|
let s = e;
|
|
378
381
|
if (e && (t.comprops || t.curprops)) {
|
|
379
|
-
let n = (await
|
|
382
|
+
let n = (await M(
|
|
380
383
|
t.key,
|
|
381
384
|
e,
|
|
382
|
-
t.suffix
|
|
383
|
-
|
|
385
|
+
t.suffix,
|
|
386
|
+
t.comprops || ""
|
|
387
|
+
)).filter((a) => W(
|
|
384
388
|
a.name,
|
|
385
389
|
t.comprops || ""
|
|
386
|
-
) ||
|
|
390
|
+
) || S(a.name, t.curprops || "")), r = await U(n);
|
|
387
391
|
s += r;
|
|
388
392
|
}
|
|
389
393
|
return s;
|
|
390
394
|
}
|
|
391
|
-
function
|
|
395
|
+
function he(e) {
|
|
392
396
|
return new Promise((t) => {
|
|
393
397
|
if (e) {
|
|
394
398
|
x();
|
|
395
|
-
const s =
|
|
399
|
+
const s = m[e];
|
|
396
400
|
s ? s.raw ? t(s.raw) : s.getRaw ? s.getRaw(s).then(async (n) => {
|
|
397
|
-
const r = (n || "") + "", a = await
|
|
401
|
+
const r = (n || "") + "", a = await _(
|
|
398
402
|
r,
|
|
399
403
|
s
|
|
400
404
|
);
|
|
@@ -406,14 +410,14 @@ function pe(e) {
|
|
|
406
410
|
}
|
|
407
411
|
export {
|
|
408
412
|
h as defaultName,
|
|
409
|
-
|
|
413
|
+
pe as getCompoName,
|
|
410
414
|
ue as getCompoNameKey,
|
|
411
415
|
x as getCompoNameObj,
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
416
|
+
ce as getKeyMds,
|
|
417
|
+
me as getLocalTextArr,
|
|
418
|
+
he as getLocalTextComponents,
|
|
419
|
+
le as getLocalTextTests,
|
|
420
|
+
M as getTestImportUrl,
|
|
421
|
+
oe as getTestName,
|
|
422
|
+
fe as getTestNameObj
|
|
419
423
|
};
|