@fangzhongya/vue-archive 0.0.2-22 → 0.0.2-24
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/es/packages/utils/common.d.ts +1 -1
- package/dist/es/packages/utils/common.js +59 -59
- package/dist/es/packages/utils/glob.js +139 -143
- package/dist/es/style.css +2 -2
- package/dist/lib/packages/utils/common.d.ts +1 -1
- package/dist/lib/packages/utils/common.js +1 -1
- package/dist/lib/packages/utils/glob.js +2 -2
- package/dist/node/index.cjs +22 -13
- package/dist/node/index.js +22 -13
- package/package.json +6 -1
|
@@ -73,4 +73,4 @@ export interface ComponentsObjs {
|
|
|
73
73
|
components: Array<ComponentsObj>;
|
|
74
74
|
}
|
|
75
75
|
export declare function getComponentsArr(urls: Array<string>, v: Resolver, comRaw: Globs, com: GlobComs, config: Components): ComponentsObjs;
|
|
76
|
-
export declare function getRawValue(comRaw: Globs, key: string): GetRaw;
|
|
76
|
+
export declare function getRawValue(comRaw: Globs, key: string): GetRaw | null;
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { setSession as E, getSession as w } from "./storage.js";
|
|
2
2
|
import { humpToLine as N } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js";
|
|
3
3
|
import { lineToLargeHump as A } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js";
|
|
4
|
-
import { appearNum as
|
|
4
|
+
import { appearNum as h } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js";
|
|
5
5
|
import { getSuffix as x } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js";
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
let n = N(
|
|
9
|
-
return
|
|
10
|
-
|
|
6
|
+
const R = ["vue", "js"];
|
|
7
|
+
function S(t, e) {
|
|
8
|
+
let n = N(t.name), i = [];
|
|
9
|
+
return t.alias && i.push(t.alias + "-" + n), e && e.length > 0 && e.forEach((r) => {
|
|
10
|
+
t.alias && i.push(t.alias + "-" + r + "-" + n), i.push(r + "-" + n);
|
|
11
11
|
}), i;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
return
|
|
15
|
-
let i =
|
|
16
|
-
return i == r ? n.length -
|
|
17
|
-
}),
|
|
13
|
+
function $(t) {
|
|
14
|
+
return t.sort((e, n) => {
|
|
15
|
+
let i = h(e, "/"), r = h(n, "/");
|
|
16
|
+
return i == r ? n.length - e.length : r - i;
|
|
17
|
+
}), t;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
let i =
|
|
21
|
-
(!i || i.length == 0) && (i =
|
|
19
|
+
function C(t = [], e = [], n = []) {
|
|
20
|
+
let i = e;
|
|
21
|
+
(!i || i.length == 0) && (i = R);
|
|
22
22
|
let r = [];
|
|
23
|
-
return
|
|
23
|
+
return t && t.length > 0 && (r = t), n && n.length > 0 && n.forEach((u) => {
|
|
24
24
|
i == null || i.forEach((p) => {
|
|
25
25
|
r.push(u + "." + p);
|
|
26
26
|
});
|
|
27
|
-
}), r = [...new Set(r)],
|
|
27
|
+
}), r = [...new Set(r)], $(r);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
for (let r = 0; r <
|
|
31
|
-
const u =
|
|
32
|
-
let f =
|
|
29
|
+
function T(t, e, n = {}, i = "") {
|
|
30
|
+
for (let r = 0; r < e.length; r++) {
|
|
31
|
+
const u = e[r], p = new RegExp("^.*/([^/]+)" + u + "$");
|
|
32
|
+
let f = t.match(p);
|
|
33
33
|
if (f) {
|
|
34
34
|
const a = [], o = {};
|
|
35
35
|
let c = "";
|
|
36
|
-
Object.keys(n).forEach((
|
|
37
|
-
let
|
|
38
|
-
|
|
36
|
+
Object.keys(n).forEach((m) => {
|
|
37
|
+
let g = n[m];
|
|
38
|
+
t.startsWith(g + "/") && (c = g, o[m] = g, a.push(m));
|
|
39
39
|
});
|
|
40
40
|
let l = f[1], s = {
|
|
41
41
|
dir: "",
|
|
42
|
-
suffix: x(
|
|
42
|
+
suffix: x(t),
|
|
43
43
|
name: A(l),
|
|
44
44
|
value: l,
|
|
45
45
|
key: "",
|
|
@@ -53,70 +53,70 @@ function v(e, t, n = {}, i = "") {
|
|
|
53
53
|
mds: [],
|
|
54
54
|
tests: void 0
|
|
55
55
|
};
|
|
56
|
-
return s.aliasNames =
|
|
56
|
+
return s.aliasNames = S(
|
|
57
57
|
s,
|
|
58
58
|
a
|
|
59
59
|
), s;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
function O(
|
|
64
|
-
E("aside.key",
|
|
63
|
+
function O(t) {
|
|
64
|
+
E("aside.key", t);
|
|
65
65
|
}
|
|
66
66
|
function U() {
|
|
67
67
|
return w("aside.key");
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
let
|
|
71
|
-
return
|
|
69
|
+
function v(t) {
|
|
70
|
+
let e = t.match(/\/([^\/]+)\/$/);
|
|
71
|
+
return e && e.length > 1 ? e[1] : "";
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
return
|
|
75
|
-
|
|
76
|
-
).test(
|
|
73
|
+
function K(t, e) {
|
|
74
|
+
return e ? new RegExp(
|
|
75
|
+
e + ".+(\\.(js|ts))?$"
|
|
76
|
+
).test(t) : !1;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
return
|
|
80
|
-
"/" +
|
|
81
|
-
).test(
|
|
78
|
+
function L(t, e) {
|
|
79
|
+
return e ? new RegExp(
|
|
80
|
+
"/" + e + "(\\.(js|ts))?$"
|
|
81
|
+
).test(t) : !1;
|
|
82
82
|
}
|
|
83
|
-
function V(
|
|
84
|
-
const u = [], p = [], f =
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
), a =
|
|
89
|
-
return
|
|
90
|
-
const c = new RegExp("^" +
|
|
83
|
+
function V(t, e, n, i, r) {
|
|
84
|
+
const u = [], p = [], f = C(
|
|
85
|
+
e.matchexts,
|
|
86
|
+
e.extensions,
|
|
87
|
+
e.matchs
|
|
88
|
+
), a = v(e.dir);
|
|
89
|
+
return t.forEach((o) => {
|
|
90
|
+
const c = new RegExp("^" + e.dir);
|
|
91
91
|
let l = o.replace(c, "");
|
|
92
|
-
if (r.comprops &&
|
|
92
|
+
if (r.comprops && K(l, r.comprops) || r.curprops && L(l, r.curprops)) {
|
|
93
93
|
let s = {};
|
|
94
|
-
s.comprops = r.comprops || "", s.curprops = r.curprops || "", s.value = l, s.dir =
|
|
94
|
+
s.comprops = r.comprops || "", s.curprops = r.curprops || "", s.value = l, s.dir = e.dir, s.suffix = x(o), s.tdir = a, s.key = o, s.raw = "", s.getRaw = d(n, o), u.push(s);
|
|
95
95
|
} else {
|
|
96
|
-
let s =
|
|
96
|
+
let s = T(
|
|
97
97
|
l,
|
|
98
98
|
f,
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
e.aliass,
|
|
100
|
+
e.alias
|
|
101
101
|
);
|
|
102
|
-
s && (s.comprops = r.comprops, s.curprops = r.curprops, s.dir =
|
|
102
|
+
s && (s.comprops = r.comprops, s.curprops = r.curprops, s.dir = e.dir, s.tdir = a, s.key = o, s.component = i[o], s.getRaw = d(n, o), p.push(s));
|
|
103
103
|
}
|
|
104
104
|
}), {
|
|
105
105
|
props: u,
|
|
106
106
|
components: p
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
|
-
function d(
|
|
110
|
-
return typeof
|
|
109
|
+
function d(t, e) {
|
|
110
|
+
return typeof t == "function" ? t : t ? t[e] : null;
|
|
111
111
|
}
|
|
112
112
|
export {
|
|
113
|
-
|
|
113
|
+
R as defaultExtensions,
|
|
114
114
|
U as getAsideKey,
|
|
115
115
|
V as getComponentsArr,
|
|
116
|
-
|
|
116
|
+
C as getMatchs,
|
|
117
117
|
d as getRawValue,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
T as getUrlName,
|
|
119
|
+
K as isComprops,
|
|
120
|
+
L as isCurprops,
|
|
121
121
|
O as setAsideKey
|
|
122
122
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { getConfig as
|
|
2
|
-
import { getRawValue as
|
|
1
|
+
import { getConfig as P } from "../config.js";
|
|
2
|
+
import { getRawValue as R, getComponentsArr as E, defaultExtensions as K, isComprops as b, isCurprops as M } 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
4
|
import { lineToLargeHump as T } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js";
|
|
5
5
|
import { firstLower as C } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js";
|
|
6
6
|
import { duplicateRemoval as U } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js";
|
|
7
|
-
import { asyncMergeArray as
|
|
8
|
-
import { getSuffix as
|
|
9
|
-
import { getTextImport as
|
|
10
|
-
const
|
|
11
|
-
function
|
|
12
|
-
return
|
|
7
|
+
import { asyncMergeArray as L } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js";
|
|
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 S } from "./index.js";
|
|
10
|
+
const u = {}, d = {}, j = [], y = {}, W = {}, w = {};
|
|
11
|
+
function V() {
|
|
12
|
+
return P("example");
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function F(e, t, s) {
|
|
15
15
|
const n = Object.assign(
|
|
16
16
|
{
|
|
17
17
|
exampless: [],
|
|
@@ -20,30 +20,26 @@ function V(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((o) => {
|
|
24
|
+
r.push(o), W[o] = a[o];
|
|
25
25
|
});
|
|
26
|
-
const i = [];
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
i
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
i.push(c), n.examplesRaw && (x[c] = g(
|
|
39
|
-
n.examplesRaw,
|
|
40
|
-
c
|
|
41
|
-
));
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
n.examples = void 0, n.examplessRaw = i, n.examplesRaw = void 0, W[e] = n;
|
|
26
|
+
const i = n.examplesRaw, l = [];
|
|
27
|
+
n.urls && n.urls.length > 0 ? (n.exampless = n.urls, n.urls.forEach((o) => {
|
|
28
|
+
l.push(o), i && (w[o] = N(
|
|
29
|
+
i,
|
|
30
|
+
o
|
|
31
|
+
));
|
|
32
|
+
})) : (n.exampless = r, i && Object.keys(i).forEach((o) => {
|
|
33
|
+
l.push(o), i && (w[o] = N(
|
|
34
|
+
i,
|
|
35
|
+
o
|
|
36
|
+
));
|
|
37
|
+
})), n.examples = void 0, n.examplessRaw = l, n.examplesRaw = void 0, y[e] = n;
|
|
45
38
|
}
|
|
46
|
-
|
|
39
|
+
function N(e, t) {
|
|
40
|
+
return typeof e == "function" ? e : e && (e[t] || e);
|
|
41
|
+
}
|
|
42
|
+
async function H(e, t = "vue") {
|
|
47
43
|
let s = "";
|
|
48
44
|
if (t == "vue") {
|
|
49
45
|
let r = new RegExp(
|
|
@@ -53,7 +49,7 @@ async function F(e, t = "vue") {
|
|
|
53
49
|
} else
|
|
54
50
|
(t == "js" || t == "ts") && (s = e);
|
|
55
51
|
if (s) {
|
|
56
|
-
const n = await
|
|
52
|
+
const n = await S(s);
|
|
57
53
|
let r = n == null ? void 0 : n.map((i) => i.n);
|
|
58
54
|
const a = [];
|
|
59
55
|
return r && r.length > 0 && r.forEach((i) => {
|
|
@@ -61,7 +57,7 @@ async function F(e, t = "vue") {
|
|
|
61
57
|
}), a;
|
|
62
58
|
}
|
|
63
59
|
}
|
|
64
|
-
function
|
|
60
|
+
function ie(e) {
|
|
65
61
|
return new Promise((t) => {
|
|
66
62
|
e ? e.raw ? t(e.raw) : e.getRaw ? e.getRaw(e).then((s) => {
|
|
67
63
|
const n = (s || "") + "";
|
|
@@ -69,7 +65,7 @@ function re(e) {
|
|
|
69
65
|
}) : t("") : t("");
|
|
70
66
|
});
|
|
71
67
|
}
|
|
72
|
-
function
|
|
68
|
+
function $(e, t) {
|
|
73
69
|
e = (e || "") + "";
|
|
74
70
|
let s = "";
|
|
75
71
|
switch (e) {
|
|
@@ -85,39 +81,39 @@ function H(e, t) {
|
|
|
85
81
|
}
|
|
86
82
|
return s;
|
|
87
83
|
}
|
|
88
|
-
function
|
|
89
|
-
var l,
|
|
84
|
+
function q(e, t, s) {
|
|
85
|
+
var l, o;
|
|
90
86
|
e = (e || "") + "", s = (s || "") + "";
|
|
91
87
|
let n = p(t.name), r = [];
|
|
92
88
|
const a = Object.values(t.aliass || {});
|
|
93
89
|
if (e === "1")
|
|
94
90
|
t.alias && r.push(t.alias + "-" + n);
|
|
95
91
|
else if (e === "2")
|
|
96
|
-
a && a.length > 0 && a.forEach((
|
|
97
|
-
r.push(
|
|
92
|
+
a && a.length > 0 && a.forEach((f) => {
|
|
93
|
+
r.push(f + "-" + n);
|
|
98
94
|
});
|
|
99
95
|
else if (e === "3") {
|
|
100
|
-
let
|
|
101
|
-
t.alias && (
|
|
102
|
-
r.push(
|
|
96
|
+
let f = "";
|
|
97
|
+
t.alias && (f = t.alias + "-"), a == null || a.forEach((c) => {
|
|
98
|
+
r.push(f + c + "-" + n);
|
|
103
99
|
});
|
|
104
100
|
} else
|
|
105
|
-
e === "4" ? (l = t.aliasNames) == null || l.forEach((
|
|
106
|
-
r.push(p(
|
|
107
|
-
}) : e == "9" && (r.push(n), (
|
|
108
|
-
r.push(p(
|
|
101
|
+
e === "4" ? (l = t.aliasNames) == null || l.forEach((f) => {
|
|
102
|
+
r.push(p(f));
|
|
103
|
+
}) : e == "9" && (r.push(n), (o = t.aliasNames) == null || o.forEach((f) => {
|
|
104
|
+
r.push(p(f));
|
|
109
105
|
}));
|
|
110
106
|
r.length == 0 && r.push(n);
|
|
111
107
|
let i = [];
|
|
112
|
-
return s === "1" ? r.forEach((
|
|
113
|
-
let
|
|
114
|
-
i.push(
|
|
115
|
-
}) : s === "2" ? r.forEach((
|
|
116
|
-
let
|
|
117
|
-
i.push(
|
|
108
|
+
return s === "1" ? r.forEach((f) => {
|
|
109
|
+
let c = T(f);
|
|
110
|
+
i.push(c, C(c));
|
|
111
|
+
}) : s === "2" ? r.forEach((f) => {
|
|
112
|
+
let c = T(f);
|
|
113
|
+
i.push(f, c, C(c));
|
|
118
114
|
}) : i = [...r], i = [...new Set(i)], i;
|
|
119
115
|
}
|
|
120
|
-
function
|
|
116
|
+
function B(e, t, s, n) {
|
|
121
117
|
const r = [];
|
|
122
118
|
return s.examplessRaw.forEach((a) => {
|
|
123
119
|
for (let i = 0; i < t.length; i++) {
|
|
@@ -126,13 +122,13 @@ function q(e, t, s, n) {
|
|
|
126
122
|
r.push({
|
|
127
123
|
topurl: e,
|
|
128
124
|
comkey: n.key,
|
|
129
|
-
suffix:
|
|
125
|
+
suffix: g(a),
|
|
130
126
|
name: n.name,
|
|
131
127
|
value: l,
|
|
132
128
|
key: a,
|
|
133
129
|
raw: "",
|
|
134
|
-
getRaw:
|
|
135
|
-
|
|
130
|
+
getRaw: R(
|
|
131
|
+
w,
|
|
136
132
|
a
|
|
137
133
|
)
|
|
138
134
|
});
|
|
@@ -141,39 +137,39 @@ function q(e, t, s, n) {
|
|
|
141
137
|
}
|
|
142
138
|
}), r;
|
|
143
139
|
}
|
|
144
|
-
function
|
|
145
|
-
|
|
146
|
-
const t =
|
|
140
|
+
function O(e) {
|
|
141
|
+
x();
|
|
142
|
+
const t = u[e];
|
|
147
143
|
if (t.tests)
|
|
148
144
|
return t.tests;
|
|
149
145
|
{
|
|
150
|
-
const s =
|
|
146
|
+
const s = y[t.dir], n = s.dir + $(s.level || 0, t), r = q(
|
|
151
147
|
s.aliaslevel || 0,
|
|
152
148
|
t,
|
|
153
149
|
s.componentName || 0
|
|
154
150
|
);
|
|
155
|
-
t.mds =
|
|
151
|
+
t.mds = B(n, r, s, t);
|
|
156
152
|
const a = {};
|
|
157
153
|
return s.exampless.forEach((i) => {
|
|
158
154
|
for (let l = 0; l < r.length; l++) {
|
|
159
|
-
const
|
|
160
|
-
if (i.startsWith(n +
|
|
161
|
-
const
|
|
162
|
-
"^\\" + n +
|
|
155
|
+
const o = r[l];
|
|
156
|
+
if (i.startsWith(n + o + "/")) {
|
|
157
|
+
const f = new RegExp(
|
|
158
|
+
"^\\" + n + o + "/(.*)/index\\." + K.join("|") + "$"
|
|
163
159
|
);
|
|
164
|
-
let
|
|
165
|
-
|
|
160
|
+
let c = "", m = i.match(f);
|
|
161
|
+
m && m.length > 1 && (c = m[1]), a[i] = {
|
|
166
162
|
topurl: n,
|
|
167
|
-
name:
|
|
168
|
-
value:
|
|
169
|
-
suffix:
|
|
163
|
+
name: o,
|
|
164
|
+
value: c,
|
|
165
|
+
suffix: g(i),
|
|
170
166
|
comname: t.name,
|
|
171
167
|
comkey: t.key,
|
|
172
168
|
key: i,
|
|
173
|
-
component:
|
|
169
|
+
component: W[i],
|
|
174
170
|
raw: "",
|
|
175
|
-
getRaw:
|
|
176
|
-
|
|
171
|
+
getRaw: R(
|
|
172
|
+
w,
|
|
177
173
|
i
|
|
178
174
|
)
|
|
179
175
|
};
|
|
@@ -183,16 +179,16 @@ function E(e) {
|
|
|
183
179
|
}), t.tests = a, a;
|
|
184
180
|
}
|
|
185
181
|
}
|
|
186
|
-
function
|
|
182
|
+
function le(e) {
|
|
187
183
|
if (e) {
|
|
188
|
-
const t =
|
|
184
|
+
const t = O(e);
|
|
189
185
|
return Object.values(t);
|
|
190
186
|
} else
|
|
191
187
|
return [];
|
|
192
188
|
}
|
|
193
|
-
function
|
|
194
|
-
|
|
195
|
-
const n =
|
|
189
|
+
function oe(e, t, s) {
|
|
190
|
+
x();
|
|
191
|
+
const n = O(s), r = [];
|
|
196
192
|
if (t) {
|
|
197
193
|
let a = n[t];
|
|
198
194
|
if (a)
|
|
@@ -202,35 +198,35 @@ function le(e, t, s) {
|
|
|
202
198
|
a.name + "/" + a.value == e && r.push(a);
|
|
203
199
|
}), r;
|
|
204
200
|
}
|
|
205
|
-
function
|
|
206
|
-
return
|
|
201
|
+
function fe(e) {
|
|
202
|
+
return O(e), u[e].mds;
|
|
207
203
|
}
|
|
208
|
-
async function
|
|
209
|
-
let n = await
|
|
204
|
+
async function A(e, t, s) {
|
|
205
|
+
let n = await H(t, s) || [], r = e.split("/");
|
|
210
206
|
return n.map((a) => {
|
|
211
207
|
if (a.startsWith("./")) {
|
|
212
208
|
let i = r.slice(0, r.length - 1).join("/"), l = a.substring(2);
|
|
213
209
|
return {
|
|
214
210
|
name: a,
|
|
215
211
|
value: l,
|
|
216
|
-
suffix:
|
|
212
|
+
suffix: g(a),
|
|
217
213
|
head: i,
|
|
218
214
|
key: i + "/" + l
|
|
219
215
|
};
|
|
220
216
|
} else {
|
|
221
217
|
let i = a.split("/"), l = 0;
|
|
222
|
-
for (let
|
|
223
|
-
if (i[
|
|
224
|
-
l =
|
|
218
|
+
for (let m = 0; m < i.length; m++)
|
|
219
|
+
if (i[m] != "..") {
|
|
220
|
+
l = m;
|
|
225
221
|
break;
|
|
226
222
|
}
|
|
227
|
-
let
|
|
223
|
+
let o = i.slice(l, i.length), f = r.slice(0, r.length - l - 1).join("/"), c = o.join("/");
|
|
228
224
|
return {
|
|
229
225
|
name: a,
|
|
230
|
-
value:
|
|
231
|
-
suffix:
|
|
232
|
-
head:
|
|
233
|
-
key:
|
|
226
|
+
value: c,
|
|
227
|
+
suffix: g(a),
|
|
228
|
+
head: f,
|
|
229
|
+
key: f + "/" + c
|
|
234
230
|
};
|
|
235
231
|
}
|
|
236
232
|
});
|
|
@@ -241,19 +237,19 @@ function ce(e) {
|
|
|
241
237
|
let s = e.map((n) => ({
|
|
242
238
|
raw: "",
|
|
243
239
|
value: n.value,
|
|
244
|
-
suffix:
|
|
240
|
+
suffix: g(n.key),
|
|
245
241
|
key: n.key,
|
|
246
|
-
getRaw:
|
|
247
|
-
|
|
242
|
+
getRaw: R(
|
|
243
|
+
w,
|
|
248
244
|
n.key
|
|
249
245
|
)
|
|
250
246
|
}));
|
|
251
|
-
|
|
247
|
+
L(
|
|
252
248
|
s,
|
|
253
249
|
(n, r, a, i) => {
|
|
254
250
|
a.raw ? n() : a.getRaw ? a.getRaw(a).then((l) => {
|
|
255
|
-
const
|
|
256
|
-
a.raw =
|
|
251
|
+
const o = (l || "") + "";
|
|
252
|
+
a.raw = o, a.getRaw = null, n();
|
|
257
253
|
}) : n();
|
|
258
254
|
}
|
|
259
255
|
).then(() => {
|
|
@@ -263,40 +259,40 @@ function ce(e) {
|
|
|
263
259
|
t([]);
|
|
264
260
|
});
|
|
265
261
|
}
|
|
266
|
-
function
|
|
267
|
-
const e =
|
|
262
|
+
function D() {
|
|
263
|
+
const e = V(), t = P("components");
|
|
268
264
|
t == null || t.forEach((s) => {
|
|
269
265
|
var r;
|
|
270
|
-
|
|
266
|
+
Q(s);
|
|
271
267
|
let n = s.dir || ((r = s == null ? void 0 : s.resolver) == null ? void 0 : r.dir) || "";
|
|
272
|
-
|
|
268
|
+
F(n, e, s.example);
|
|
273
269
|
});
|
|
274
270
|
}
|
|
275
271
|
const h = "default";
|
|
276
|
-
function
|
|
272
|
+
function G(e) {
|
|
277
273
|
let t = p(e.name), s = [...e.aliasNames];
|
|
278
274
|
s.push(t), s.forEach((n) => {
|
|
279
|
-
|
|
275
|
+
j.push({
|
|
280
276
|
name: n,
|
|
281
277
|
value: e.key
|
|
282
278
|
});
|
|
283
279
|
});
|
|
284
280
|
}
|
|
285
|
-
function
|
|
281
|
+
function J(e, t) {
|
|
286
282
|
const s = {};
|
|
287
283
|
t == null || t.forEach((n) => {
|
|
288
|
-
|
|
284
|
+
u[n.key] = n, G(n);
|
|
289
285
|
const r = Object.values(n.aliass || {});
|
|
290
286
|
r && r.length ? r.forEach((a) => {
|
|
291
287
|
s[a] = s[a] || [], s[a].push(n.key);
|
|
292
288
|
}) : (s[h] = s[h] || [], s[h].push(n.key));
|
|
293
289
|
});
|
|
294
290
|
}
|
|
295
|
-
function
|
|
291
|
+
function Q(e) {
|
|
296
292
|
var n;
|
|
297
293
|
let t, s;
|
|
298
294
|
if (e.resolver)
|
|
299
|
-
t = e.alias || ((n = e.resolver) == null ? void 0 : n.alias) || h, s =
|
|
295
|
+
t = e.alias || ((n = e.resolver) == null ? void 0 : n.alias) || h, s = E(
|
|
300
296
|
e.resolver.urls || [],
|
|
301
297
|
e.resolver,
|
|
302
298
|
e.componentsRaw,
|
|
@@ -306,7 +302,7 @@ function J(e) {
|
|
|
306
302
|
else {
|
|
307
303
|
t = e.alias || h;
|
|
308
304
|
let r = (e == null ? void 0 : e.urls) || Object.keys(e.componentsRaw);
|
|
309
|
-
s =
|
|
305
|
+
s = E(
|
|
310
306
|
r,
|
|
311
307
|
e,
|
|
312
308
|
e.componentsRaw,
|
|
@@ -316,53 +312,53 @@ function J(e) {
|
|
|
316
312
|
}
|
|
317
313
|
s && (s != null && s.props) && s.props.forEach((r) => {
|
|
318
314
|
d[r.key] = r;
|
|
319
|
-
}),
|
|
315
|
+
}), J(t, s.components);
|
|
320
316
|
}
|
|
321
|
-
function
|
|
322
|
-
return
|
|
317
|
+
function ue(e) {
|
|
318
|
+
return x(), u[e];
|
|
323
319
|
}
|
|
324
|
-
function
|
|
325
|
-
return Object.keys(
|
|
320
|
+
function x() {
|
|
321
|
+
return Object.keys(u).length == 0 && D(), Object.values(u);
|
|
326
322
|
}
|
|
327
323
|
function me(e, t, s) {
|
|
328
|
-
|
|
324
|
+
x();
|
|
329
325
|
const n = [];
|
|
330
326
|
if (s) {
|
|
331
|
-
let a =
|
|
327
|
+
let a = u[s];
|
|
332
328
|
if (a && a.key)
|
|
333
329
|
return [a];
|
|
334
330
|
}
|
|
335
331
|
let r = p(e);
|
|
336
|
-
return
|
|
337
|
-
t ? a.name.includes(r) && n.push(
|
|
332
|
+
return j.forEach((a) => {
|
|
333
|
+
t ? a.name.includes(r) && n.push(u[a.value]) : a.name == r && n.push(u[a.value]);
|
|
338
334
|
}), U(n, "key");
|
|
339
335
|
}
|
|
340
|
-
async function
|
|
336
|
+
async function X(e, t) {
|
|
341
337
|
let s = e;
|
|
342
338
|
if (e) {
|
|
343
|
-
let n = (await
|
|
339
|
+
let n = (await A(
|
|
344
340
|
t.key,
|
|
345
341
|
e,
|
|
346
342
|
t.suffix
|
|
347
343
|
)).filter((r) => r.key.startsWith(t.head));
|
|
348
|
-
s += await
|
|
344
|
+
s += await I(n);
|
|
349
345
|
}
|
|
350
346
|
return s;
|
|
351
347
|
}
|
|
352
|
-
function
|
|
348
|
+
function Y(e) {
|
|
353
349
|
return new Promise((t) => {
|
|
354
350
|
if (e && e.length > 0) {
|
|
355
351
|
let s = e.map((n) => d[n.key] || d[n.key + ".js"] || d[n.key + ".ts"]);
|
|
356
|
-
|
|
352
|
+
L(
|
|
357
353
|
s,
|
|
358
354
|
(n, r, a, i) => {
|
|
359
355
|
a.raw ? n() : a.getRaw ? a.getRaw(a).then(async (l) => {
|
|
360
|
-
const
|
|
361
|
-
let
|
|
362
|
-
|
|
356
|
+
const o = (l || "") + "";
|
|
357
|
+
let f = await X(
|
|
358
|
+
o,
|
|
363
359
|
e[i]
|
|
364
360
|
);
|
|
365
|
-
a.raw =
|
|
361
|
+
a.raw = f, a.getRaw = null, n();
|
|
366
362
|
}) : n();
|
|
367
363
|
}
|
|
368
364
|
).then(() => {
|
|
@@ -372,33 +368,33 @@ function X(e) {
|
|
|
372
368
|
t([]);
|
|
373
369
|
});
|
|
374
370
|
}
|
|
375
|
-
async function
|
|
376
|
-
const t = await
|
|
371
|
+
async function I(e) {
|
|
372
|
+
const t = await Y(e);
|
|
377
373
|
return ((t == null ? void 0 : t.map((n) => n.raw)) || []).join(`
|
|
378
374
|
`);
|
|
379
375
|
}
|
|
380
|
-
async function
|
|
376
|
+
async function Z(e, t) {
|
|
381
377
|
let s = e;
|
|
382
378
|
if (e && (t.comprops || t.curprops)) {
|
|
383
|
-
let n = (await
|
|
379
|
+
let n = (await A(
|
|
384
380
|
t.key,
|
|
385
381
|
e,
|
|
386
382
|
t.suffix
|
|
387
|
-
)).filter((a) =>
|
|
383
|
+
)).filter((a) => b(
|
|
388
384
|
a.name,
|
|
389
385
|
t.comprops || ""
|
|
390
|
-
) || M(a.name, t.curprops || "")), r = await
|
|
386
|
+
) || M(a.name, t.curprops || "")), r = await I(n);
|
|
391
387
|
s += r;
|
|
392
388
|
}
|
|
393
389
|
return s;
|
|
394
390
|
}
|
|
395
|
-
function
|
|
391
|
+
function pe(e) {
|
|
396
392
|
return new Promise((t) => {
|
|
397
393
|
if (e) {
|
|
398
|
-
|
|
399
|
-
const s =
|
|
394
|
+
x();
|
|
395
|
+
const s = u[e];
|
|
400
396
|
s ? s.raw ? t(s.raw) : s.getRaw ? s.getRaw(s).then(async (n) => {
|
|
401
|
-
const r = (n || "") + "", a = await
|
|
397
|
+
const r = (n || "") + "", a = await Z(
|
|
402
398
|
r,
|
|
403
399
|
s
|
|
404
400
|
);
|
|
@@ -411,13 +407,13 @@ function ue(e) {
|
|
|
411
407
|
export {
|
|
412
408
|
h as defaultName,
|
|
413
409
|
me as getCompoName,
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
410
|
+
ue as getCompoNameKey,
|
|
411
|
+
x as getCompoNameObj,
|
|
412
|
+
fe as getKeyMds,
|
|
417
413
|
ce as getLocalTextArr,
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
414
|
+
pe as getLocalTextComponents,
|
|
415
|
+
ie as getLocalTextTests,
|
|
416
|
+
A as getTestImportUrl,
|
|
417
|
+
le as getTestName,
|
|
418
|
+
oe as getTestNameObj
|
|
423
419
|
};
|
package/dist/es/style.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
:root{--bor-cor: rgb(239, 248, 255);--but-cor: rgb(27, 155, 253);--but-hover-cor: rgb(0, 145, 255);--bg-but-hover-cor: rgb(128, 199, 253);--bg-aside-cor: rgb(228, 251, 197);--bg-aside-on-cor: rgb(78, 250, 87);--bg-index-cor: rgb(248, 248, 248);--bg-table-th-cor: rgb(207, 246, 251);--bg-table-td-cor: rgb(221, 243, 246);--bg-test-cor: rgb(236 255 236);--bg-test-err-cor: rgb(255, 210, 210);--bg-test-pro-cor: rgb(203, 246, 255);--bg-test-err-pro-cor: rgb(251, 203, 255);--te-test-err-cor: rgb(247, 56, 56);--te-test-pro-cor: rgb(106, 131, 255);--bg-test-body: rgb(255, 255, 255);--bg-code-highlig: rgb(255, 251, 223);--bg-box-cor: rgb(198, 198, 198);--bg-md-cor: rgb(255, 233, 243);--bg-use-cor: rgb(193, 219, 255);--bg-use-component-cor: rgb(246, 246, 246);--text-cor: rgb(0, 0, 0);--fs-1: 12px;--fs-2: 14px;--fs-3: 16px;--fs-4: 18px;--fs-5: 20px}.__document{position:fixed;top:0;left:0;width:100vw;height:100vh;overflow:auto;text-align:left;width:100%;height:100%;padding:0;margin:0}.__document .but-div{cursor:pointer;color:var(--but-cor);padding:5px 10px}.__document .but-div:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside{padding:20px 0}.__document .aside .aside-li{padding:5px 10px;height:60px;font-size:20px;font-weight:600;border-bottom:1px solid var(--bor-cor);cursor:pointer;display:flex;flex-direction:row;align-items:center}.__document .aside .aside-li:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside .aside-li.on{background-color:var(--bg-aside-on-cor)}.__document .aside .aside-li .aside-li-name{width:100%}.__document .aside .aside-li .aside-li-name .aside-li-name-alias{font-size:var(--fs-2)}.__document .aside .aside-li .aside-li-name .aside-li-name-aliass{font-size:var(--fs-1)}.__document .md{position:relative}.__document .use .use-component{padding:10px;display:flex;justify-content:center;align-items:center;height:300px;background-color:var(--bg-use-component-cor)}.__document .set-code .set-code-buts{display:flex;align-items:center}.__document .form-item.error{background-color:var(--te-test-err-cor)}.__document .compo .compo-top .compo-top-name{padding:10px;font-size:var(--fs-4)}.__document .compo .compo-top .compo-top-name .compo-top-name-li{font-size:var(--fs-2)}.__document .compo .compo-top .compo-top-info{padding:10px;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-info .compo-top-athor,.__document .compo .compo-top .compo-top-info .compo-top-date{flex:1;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-descriptions{padding:0 10px;font-size:var(--fs-2)}.__document .compo .compo-li h4{margin:10px 0 0;padding:10px}.__document .compo .compo-li .compo-talbe{width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body{border:1px solid var(--bor-cor);width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body td,.__document .compo .compo-li .compo-talbe .compo-talbe-body th{padding:5px 10px;border-bottom:1px solid var(--bor-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body th{background-color:var(--bg-table-th-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body td{background-color:var(--bg-table-td-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body tr:last-child td{border-bottom:0}.__document .compo .compo-li .compo-talbe .compo-talbe-body .compo-talbe-zw{width:100%;text-align:center;padding:10px}.__document .compo .compo-md{padding:10px;background-color:var(--bg-md-cor)}.__document .compo .compo-use{padding:10px;background-color:var(--bg-use-cor)}.__document .main .main-but{text-align:right;display:flex;flex-direction:row;align-items:center}.__document .test.error .test-top{background-color:var(--bg-test-err-cor)}.__document .test.proposal .test-top{background-color:var(--bg-test-pro-cor)}.__document .test.error-proposal .test-top{background-color:var(--bg-test-err-pro-cor)}.__document .test .test-top{padding:5px;background-color:var(--bg-test-cor)}.__document .test .test-top .test-top-error{color:var(--te-test-err-cor)}.__document .test .test-top .test-top-proposal{color:var(--te-test-pro-cor)}.__document .test .test-div .test-body{padding:5px;background-color:var(--bg-test-body)}.__document .code{padding:0}.__document .code .code-top .code-top-but,.__document .code .code-top .code-top-but .top-but-files{display:flex;flex-direction:row;align-items:center}.__document .code .code-highlightjs{padding:0}.__document .code .code-highlightjs .hljs{background-color:var(--bg-code-highlig)}.__document .box-url{position:relative}.__document .box-url:hover .box-url-box{display:block}.__document .box-url .box-url-box{position:fixed;top:25px;display:none;background-color:var(--bg-box-cor);font-size:var(--fs-1);color:var(--text-cor);z-index:100000}.__document .box-url .box-url-box .box-div-li{height:20px;line-height:20px;display:flex;flex-direction:row;align-items:center}.__document .box-url .box-url-box .box-div-li .box-div-li-span{white-space:nowrap;padding:5px 10px}.__document .__document-index{width:100%;height:100%;padding:0;margin:0;display:flex;flex-direction:row}.__document .__document-index .index-aside{width:250px;position:relative;z-index:100}.__document .__document-index .index-aside .index-aside-div{height:100%;overflow-y:auto;background-color:var(--bg-aside-cor)}.__document .__document-index .index-body{flex:1;position:relative;background-color:var(--bg-index-cor)}.__document .__document-index .index-body .index-div{padding:20px;position:absolute;top:0;right:0;left:0;bottom:0;overflow-y:auto}.__document .__document-tests{padding:10px;height:100%;position:relative}.__document .__document-tests .tests-top .but-div.on{background-color:var(--bg-aside-on-cor)}.__document .__document-develop,.__document .__document-single{padding:10px;height:100%;position:relative}.__document .__document-single .single-top .single-top-li{display:flex;flex-direction:row;align-items:center}.__document .__document-single .single-top .single-top-li .single-top-li-span{padding:5px 10px}.__document .__document-compon{padding:10px;height:100%;position:relative}.__document .__document-compon .__document-compon-body.choice{padding-left:30px}.__document .__document-compon .__document-compon-choice{position:absolute;top:0;bottom:0;left:0;z-index:100;display:flex;overflow-y:auto;background-color:var(--bg-aside-cor)}.__document .__document-compon .__document-compon-choice .__document-compon-choice-but{cursor:pointer}.__document .__document-compon .__document-compon-choice .__document-compon-choice-but:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
|
1
|
+
:root{--bor-cor: rgb(239, 248, 255);--but-cor: rgb(27, 155, 253);--but-hover-cor: rgb(0, 145, 255);--bg-but-hover-cor: rgb(128, 199, 253);--bg-aside-cor: rgb(228, 251, 197);--bg-aside-on-cor: rgb(78, 250, 87);--bg-index-cor: rgb(248, 248, 248);--bg-table-th-cor: rgb(207, 246, 251);--bg-table-td-cor: rgb(221, 243, 246);--bg-test-cor: rgb(236 255 236);--bg-test-err-cor: rgb(255, 210, 210);--bg-test-pro-cor: rgb(203, 246, 255);--bg-test-err-pro-cor: rgb(251, 203, 255);--te-test-err-cor: rgb(247, 56, 56);--te-test-pro-cor: rgb(106, 131, 255);--bg-test-body: rgb(255, 255, 255);--bg-code-highlig: rgb(255, 251, 223);--bg-box-cor: rgb(198, 198, 198);--bg-md-cor: rgb(255, 233, 243);--bg-use-cor: rgb(193, 219, 255);--bg-use-component-cor: rgb(246, 246, 246);--text-cor: rgb(0, 0, 0);--fs-1: 12px;--fs-2: 14px;--fs-3: 16px;--fs-4: 18px;--fs-5: 20px}.__document{position:fixed;top:0;left:0;width:100vw;height:100vh;overflow:auto;text-align:left;width:100%;height:100%;padding:0;margin:0}.__document .but-div{cursor:pointer;color:var(--but-cor);padding:5px 10px}.__document .but-div:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside{padding:20px 0}.__document .aside .aside-li{padding:5px 10px;height:60px;font-size:20px;font-weight:600;border-bottom:1px solid var(--bor-cor);cursor:pointer;display:flex;flex-direction:row;align-items:center}.__document .aside .aside-li:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside .aside-li.on{background-color:var(--bg-aside-on-cor)}.__document .aside .aside-li .aside-li-name{width:100%}.__document .aside .aside-li .aside-li-name .aside-li-name-alias{font-size:var(--fs-2)}.__document .aside .aside-li .aside-li-name .aside-li-name-aliass{font-size:var(--fs-1)}.__document .md{position:relative}.__document .use .use-component{padding:10px;display:flex;justify-content:center;align-items:center;height:300px;background-color:var(--bg-use-component-cor)}.__document .set-code .set-code-buts{display:flex;align-items:center}.__document .form-item.error{background-color:var(--te-test-err-cor)}.__document .compo .compo-top .compo-top-name{padding:10px;font-size:var(--fs-4)}.__document .compo .compo-top .compo-top-name .compo-top-name-li{font-size:var(--fs-2)}.__document .compo .compo-top .compo-top-info{padding:10px;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-info .compo-top-athor,.__document .compo .compo-top .compo-top-info .compo-top-date{flex:1;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-descriptions{padding:0 10px;font-size:var(--fs-2)}.__document .compo .compo-li h4{margin:10px 0 0;padding:10px}.__document .compo .compo-li .compo-talbe{width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body{border:1px solid var(--bor-cor);width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body td,.__document .compo .compo-li .compo-talbe .compo-talbe-body th{padding:5px 10px;border-bottom:1px solid var(--bor-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body th{background-color:var(--bg-table-th-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body td{background-color:var(--bg-table-td-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body tr:last-child td{border-bottom:0}.__document .compo .compo-li .compo-talbe .compo-talbe-body .compo-talbe-zw{width:100%;text-align:center;padding:10px}.__document .compo .compo-md{padding:10px;background-color:var(--bg-md-cor)}.__document .compo .compo-use{padding:10px;background-color:var(--bg-use-cor)}.__document .main .main-but{text-align:right;display:flex;flex-direction:row;align-items:center}.__document .test.error .test-top{background-color:var(--bg-test-err-cor)}.__document .test.proposal .test-top{background-color:var(--bg-test-pro-cor)}.__document .test.error-proposal .test-top{background-color:var(--bg-test-err-pro-cor)}.__document .test .test-top{padding:5px;background-color:var(--bg-test-cor)}.__document .test .test-top .test-top-error{color:var(--te-test-err-cor)}.__document .test .test-top .test-top-proposal{color:var(--te-test-pro-cor)}.__document .test .test-div .test-body{padding:5px;background-color:var(--bg-test-body)}.__document .code{padding:0}.__document .code .code-top .code-top-but,.__document .code .code-top .code-top-but .top-but-files{display:flex;flex-direction:row;align-items:center}.__document .code .code-highlightjs{padding:0}.__document .code .code-highlightjs .hljs{background-color:var(--bg-code-highlig)}.__document .box-url{position:relative}.__document .box-url:hover .box-url-box{display:block}.__document .box-url .box-url-box{position:fixed;top:25px;display:none;background-color:var(--bg-box-cor);font-size:var(--fs-1);color:var(--text-cor);z-index:100000}.__document .box-url .box-url-box .box-div-li{height:20px;line-height:20px;display:flex;flex-direction:row;align-items:center}.__document .box-url .box-url-box .box-div-li .box-div-li-span{white-space:nowrap;padding:5px 10px}.__document .__document-index{width:100%;height:100%;padding:0;margin:0;display:flex;flex-direction:row}.__document .__document-index .index-aside{width:250px;position:relative;z-index:100}.__document .__document-index .index-aside .index-aside-div{height:100%;overflow-y:auto;background-color:var(--bg-aside-cor)}.__document .__document-index .index-body{flex:1;position:relative;background-color:var(--bg-index-cor)}.__document .__document-index .index-body .index-div{padding:20px;position:absolute;top:0;right:0;left:0;bottom:0;overflow-y:auto}.__document .__document-tests{padding:10px;height:100%;position:relative}.__document .__document-tests .tests-top .but-div.on{background-color:var(--bg-aside-on-cor)}.__document .__document-develop,.__document .__document-single{padding:10px;height:100%;position:relative}.__document .__document-single .single-top .single-top-li{display:flex;flex-direction:row;align-items:center}.__document .__document-single .single-top .single-top-li .single-top-li-span{padding:5px 10px}.__document .__document-compon{padding:10px;height:100%;position:relative}.__document .__document-compon .__document-compon-body.choice{padding-left:30px}.__document .__document-compon .__document-compon-choice{position:absolute;top:0;bottom:0;left:0;z-index:100;display:flex;overflow-y:auto;background-color:var(--bg-aside-cor)}.__document .__document-compon .__document-compon-choice .__document-compon-choice-but{cursor:pointer}.__document .__document-compon .__document-compon-choice .__document-compon-choice-but:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.form-select .form-select-box{position:absolute;z-index:100;background-color:#fff;text-align:center}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
|
2
2
|
Theme: StackOverflow Light
|
|
3
3
|
Description: Light theme as used on stackoverflow.com
|
|
4
4
|
Author: stackoverflow.com
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
Updated for @stackoverflow/stacks v0.64.0
|
|
11
11
|
Code Blocks: /blob/v0.64.0/lib/css/components/_stacks-code-blocks.less
|
|
12
12
|
Colors: /blob/v0.64.0/lib/css/exports/_stacks-constants-colors.less
|
|
13
|
-
*/.hljs{color:#2f3337;background:#f6f6f6}.hljs-subst{color:#2f3337}.hljs-comment{color:#656e77}.hljs-attr,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-section,.hljs-selector-tag{color:#015692}.hljs-attribute{color:#803378}.hljs-name,.hljs-number,.hljs-quote,.hljs-selector-id,.hljs-template-tag,.hljs-type{color:#b75501}.hljs-selector-class{color:#015692}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-string,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#54790d}.hljs-meta,.hljs-selector-pseudo{color:#015692}.hljs-built_in,.hljs-literal,.hljs-title{color:#b75501}.hljs-bullet,.hljs-code{color:#535a60}.hljs-meta .hljs-string{color:#54790d}.hljs-deletion{color:#c02d2e}.hljs-addition{color:#2f6f44}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.form-select
|
|
13
|
+
*/.hljs{color:#2f3337;background:#f6f6f6}.hljs-subst{color:#2f3337}.hljs-comment{color:#656e77}.hljs-attr,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-section,.hljs-selector-tag{color:#015692}.hljs-attribute{color:#803378}.hljs-name,.hljs-number,.hljs-quote,.hljs-selector-id,.hljs-template-tag,.hljs-type{color:#b75501}.hljs-selector-class{color:#015692}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-string,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#54790d}.hljs-meta,.hljs-selector-pseudo{color:#015692}.hljs-built_in,.hljs-literal,.hljs-title{color:#b75501}.hljs-bullet,.hljs-code{color:#535a60}.hljs-meta .hljs-string{color:#54790d}.hljs-deletion{color:#c02d2e}.hljs-addition{color:#2f6f44}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.form-select{position:relative}.form-select .form-select-box{position:absolute;background-color:#fff;text-align:center}.form-select .form-select-box .form-select-list-div{border:1px solid #fff}.form-select .form-select-box .form-select-list-div .form-select-list-li{padding:10px;border-bottom:1px solid #eee}.form-select .form-select-box .form-select-list-div .form-select-list-li:last-child{border:0}.form-select .form-select-box .form-select-list-div .form-select-list-li.active{color:#0051ff}
|
|
@@ -73,4 +73,4 @@ export interface ComponentsObjs {
|
|
|
73
73
|
components: Array<ComponentsObj>;
|
|
74
74
|
}
|
|
75
75
|
export declare function getComponentsArr(urls: Array<string>, v: Resolver, comRaw: Globs, com: GlobComs, config: Components): ComponentsObjs;
|
|
76
|
-
export declare function getRawValue(comRaw: Globs, key: string): GetRaw;
|
|
76
|
+
export declare function getRawValue(comRaw: Globs, key: string): GetRaw | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./storage.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./storage.js"),R=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js"),q=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js"),m=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js"),E=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js"),A=["vue","js"];function K(t,e){let n=R.humpToLine(t.name),i=[];return t.alias&&i.push(t.alias+"-"+n),e&&e.length>0&&e.forEach(s=>{t.alias&&i.push(t.alias+"-"+s+"-"+n),i.push(s+"-"+n)}),i}function T(t){return t.sort((e,n)=>{let i=m.appearNum(e,"/"),s=m.appearNum(n,"/");return i==s?n.length-e.length:s-i}),t}function C(t=[],e=[],n=[]){let i=e;(!i||i.length==0)&&(i=A);let s=[];return t&&t.length>0&&(s=t),n&&n.length>0&&n.forEach(l=>{i==null||i.forEach(a=>{s.push(l+"."+a)})}),s=[...new Set(s)],T(s)}function N(t,e,n={},i=""){for(let s=0;s<e.length;s++){const l=e[s],a=new RegExp("^.*/([^/]+)"+l+"$");let c=t.match(a);if(c){const p=[],u={};let f="";Object.keys(n).forEach(g=>{let h=n[g];t.startsWith(h+"/")&&(f=h,u[g]=h,p.push(g))});let o=c[1],r={dir:"",suffix:E.getSuffix(t),name:q.lineToLargeHump(o),value:o,key:"",tdir:"",adir:f,alias:i,aliass:u,aliasNames:[],raw:"",getRaw:null,mds:[],tests:void 0};return r.aliasNames=K(r,p),r}}}function y(t){x.setSession("aside.key",t)}function D(){return x.getSession("aside.key")}function H(t){let e=t.match(/\/([^\/]+)\/$/);return e&&e.length>1?e[1]:""}function w(t,e){return e?new RegExp(e+".+(\\.(js|ts))?$").test(t):!1}function S(t,e){return e?new RegExp("/"+e+"(\\.(js|ts))?$").test(t):!1}function M(t,e,n,i,s){const l=[],a=[],c=C(e.matchexts,e.extensions,e.matchs),p=H(e.dir);return t.forEach(u=>{const f=new RegExp("^"+e.dir);let o=u.replace(f,"");if(s.comprops&&w(o,s.comprops)||s.curprops&&S(o,s.curprops)){let r={};r.comprops=s.comprops||"",r.curprops=s.curprops||"",r.value=o,r.dir=e.dir,r.suffix=E.getSuffix(u),r.tdir=p,r.key=u,r.raw="",r.getRaw=d(n,u),l.push(r)}else{let r=N(o,c,e.aliass,e.alias);r&&(r.comprops=s.comprops,r.curprops=s.curprops,r.dir=e.dir,r.tdir=p,r.key=u,r.component=i[u],r.getRaw=d(n,u),a.push(r))}}),{props:l,components:a}}function d(t,e){return typeof t=="function"?t:t?t[e]:null}exports.defaultExtensions=A;exports.getAsideKey=D;exports.getComponentsArr=M;exports.getMatchs=C;exports.getRawValue=d;exports.getUrlName=N;exports.isComprops=w;exports.isCurprops=S;exports.setAsideKey=y;
|
|
@@ -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 N=require("../config.js"),p=require("./common.js"),w=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js"),E=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js"),C=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js"),j=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js"),y=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js"),x=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js"),K=require("./index.js"),f={},O={},P=[],q={},A={},d={};function b(){return N.getConfig("example")}function M(e,t,s){const n=Object.assign({exampless:[],examplessRaw:[]},t,s),r=[],a=n.examples;a&&Object.keys(a).forEach(o=>{r.push(o),A[o]=a[o]});const i=n.examplesRaw,l=[];n.urls&&n.urls.length>0?(n.exampless=n.urls,n.urls.forEach(o=>{l.push(o),i&&(d[o]=L(i,o))})):(n.exampless=r,i&&Object.keys(i).forEach(o=>{l.push(o),i&&(d[o]=L(i,o))})),n.examples=void 0,n.examplessRaw=l,n.examplesRaw=void 0,q[e]=n}function L(e,t){return typeof e=="function"?e:e&&(e[t]||e)}async function H(e,t="vue"){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")&&(s=e);if(s){const n=await K.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 I(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 k(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 U(e,t,s){var l,o;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"?(l=t.aliasNames)==null||l.forEach(c=>{r.push(w.humpToLine(c))}):e=="9"&&(r.push(n),(o=t.aliasNames)==null||o.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,C.firstLower(u))}):s==="2"?r.forEach(c=>{let u=E.lineToLargeHump(c);i.push(c,u,C.firstLower(u))}):i=[...r],i=[...new Set(i)],i}function V(e,t,s,n){const r=[];return s.examplessRaw.forEach(a=>{for(let i=0;i<t.length;i++){const l=t[i];if(a==e+l+"/"+s.md+".md"){r.push({topurl:e,comkey:n.key,suffix:x.getSuffix(a),name:n.name,value:l,key:a,raw:"",getRaw:p.getRawValue(d,a)});break}}}),r}function R(e){h();const t=f[e];if(t.tests)return t.tests;{const s=q[t.dir],n=s.dir+k(s.level||0,t),r=U(s.aliaslevel||0,t,s.componentName||0);t.mds=V(n,r,s,t);const a={};return s.exampless.forEach(i=>{for(let l=0;l<r.length;l++){const o=r[l];if(i.startsWith(n+o+"/")){const c=new RegExp("^\\"+n+o+"/(.*)/index\\."+p.defaultExtensions.join("|")+"$");let u="",m=i.match(c);m&&m.length>1&&(u=m[1]),a[i]={topurl:n,name:o,value:u,suffix:x.getSuffix(i),comname:t.name,comkey:t.key,key:i,component:A[i],raw:"",getRaw:p.getRawValue(d,i)};break}}}),t.tests=a,a}}function W(e){if(e){const t=R(e);return Object.values(t)}else return[]}function B(e,t,s){h();const n=R(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 D(e){return R(e),f[e].mds}async function T(e,t,s){let n=await H(t,s)||[],r=e.split("/");return n.map(a=>{if(a.startsWith("./")){let i=r.slice(0,r.length-1).join("/"),l=a.substring(2);return{name:a,value:l,suffix:x.getSuffix(a),head:i,key:i+"/"+l}}else{let i=a.split("/"),l=0;for(let m=0;m<i.length;m++)if(i[m]!=".."){l=m;break}let o=i.slice(l,i.length),c=r.slice(0,r.length-l-1).join("/"),u=o.join("/");return{name:a,value:u,suffix:x.getSuffix(a),head:c,key:c+"/"+u}}})}function F(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:p.getRawValue(d,n.key)}));y.asyncMergeArray(s,(n,r,a,i)=>{a.raw?n():a.getRaw?a.getRaw(a).then(l=>{const o=(l||"")+"";a.raw=o,a.getRaw=null,n()}):n()}).then(()=>{t(s)})}else t([])})}function J(){const e=b(),t=N.getConfig("components");t==null||t.forEach(s=>{var r;Q(s);let n=s.dir||((r=s==null?void 0:s.resolver)==null?void 0:r.dir)||"";M(n,e,s.example)})}const g="default";function X(e){let t=w.humpToLine(e.name),s=[...e.aliasNames];s.push(t),s.forEach(n=>{P.push({name:n,value:e.key})})}function Z(e,t){const s={};t==null||t.forEach(n=>{f[n.key]=n,X(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 Q(e){var n;let t,s;if(e.resolver)t=e.alias||((n=e.resolver)==null?void 0:n.alias)||g,s=p.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=p.getComponentsArr(r,e,e.componentsRaw,e.components,e)}s&&(s!=null&&s.props)&&s.props.forEach(r=>{O[r.key]=r}),Z(t,s.components)}function $(e){return h(),f[e]}function h(){return Object.keys(f).length==0&&J(),Object.values(f)}function G(e,t,s){h();const n=[];if(s){let a=f[s];if(a&&a.key)return[a]}let r=w.humpToLine(e);return P.forEach(a=>{t?a.name.includes(r)&&n.push(f[a.value]):a.name==r&&n.push(f[a.value])}),j.duplicateRemoval(n,"key")}async function Y(e,t){let s=e;if(e){let n=(await T(t.key,e,t.suffix)).filter(r=>r.key.startsWith(t.head));s+=await S(n)}return s}function _(e){return new Promise(t=>{if(e&&e.length>0){let s=e.map(n=>O[n.key]||O[n.key+".js"]||O[n.key+".ts"]);y.asyncMergeArray(s,(n,r,a,i)=>{a.raw?n():a.getRaw?a.getRaw(a).then(async l=>{const o=(l||"")+"";let c=await Y(o,e[i]);a.raw=c,a.getRaw=null,n()}):n()}).then(()=>{t(s)})}else t([])})}async function S(e){const t=await _(e);return((t==null?void 0:t.map(n=>n.raw))||[]).join(`
|
|
2
|
+
`)}async function z(e,t){let s=e;if(e&&(t.comprops||t.curprops)){let n=(await T(t.key,e,t.suffix)).filter(a=>p.isComprops(a.name,t.comprops||"")||p.isCurprops(a.name,t.curprops||"")),r=await S(n);s+=r}return s}function v(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 z(r,s);s.raw=a,s.getRaw=null,t(a)}):t(""):t("")}else t("")})}exports.defaultName=g;exports.getCompoName=G;exports.getCompoNameKey=$;exports.getCompoNameObj=h;exports.getKeyMds=D;exports.getLocalTextArr=F;exports.getLocalTextComponents=v;exports.getLocalTextTests=I;exports.getTestImportUrl=T;exports.getTestName=W;exports.getTestNameObj=B;
|
package/dist/node/index.cjs
CHANGED
|
@@ -15925,9 +15925,9 @@ function getRawValue(comRaw, key) {
|
|
|
15925
15925
|
if (typeof comRaw == "function") {
|
|
15926
15926
|
return comRaw;
|
|
15927
15927
|
} else if (comRaw) {
|
|
15928
|
-
return comRaw[key]
|
|
15928
|
+
return comRaw[key];
|
|
15929
15929
|
} else {
|
|
15930
|
-
return
|
|
15930
|
+
return null;
|
|
15931
15931
|
}
|
|
15932
15932
|
}
|
|
15933
15933
|
|
|
@@ -15959,27 +15959,27 @@ function setExampleObj(dir, example, vexample) {
|
|
|
15959
15959
|
examplesObj[key] = examples[key];
|
|
15960
15960
|
});
|
|
15961
15961
|
}
|
|
15962
|
+
const examplesRaw = obj.examplesRaw;
|
|
15962
15963
|
const arrraw = [];
|
|
15963
|
-
if (obj.urls) {
|
|
15964
|
+
if (obj.urls && obj.urls.length > 0) {
|
|
15964
15965
|
obj.exampless = obj.urls;
|
|
15965
15966
|
obj.urls.forEach((key) => {
|
|
15966
15967
|
arrraw.push(key);
|
|
15967
|
-
if (
|
|
15968
|
-
examplesRawObj[key] =
|
|
15969
|
-
|
|
15968
|
+
if (examplesRaw) {
|
|
15969
|
+
examplesRawObj[key] = getexamplesRawObj(
|
|
15970
|
+
examplesRaw,
|
|
15970
15971
|
key
|
|
15971
15972
|
);
|
|
15972
15973
|
}
|
|
15973
15974
|
});
|
|
15974
15975
|
} else {
|
|
15975
15976
|
obj.exampless = arr;
|
|
15976
|
-
const examplesRaw = obj.examplesRaw;
|
|
15977
15977
|
if (examplesRaw) {
|
|
15978
15978
|
Object.keys(examplesRaw).forEach((key) => {
|
|
15979
15979
|
arrraw.push(key);
|
|
15980
|
-
if (
|
|
15981
|
-
examplesRawObj[key] =
|
|
15982
|
-
|
|
15980
|
+
if (examplesRaw) {
|
|
15981
|
+
examplesRawObj[key] = getexamplesRawObj(
|
|
15982
|
+
examplesRaw,
|
|
15983
15983
|
key
|
|
15984
15984
|
);
|
|
15985
15985
|
}
|
|
@@ -15991,6 +15991,15 @@ function setExampleObj(dir, example, vexample) {
|
|
|
15991
15991
|
obj.examplesRaw = void 0;
|
|
15992
15992
|
exampleObj[dir] = obj;
|
|
15993
15993
|
}
|
|
15994
|
+
function getexamplesRawObj(comRaw, key) {
|
|
15995
|
+
if (typeof comRaw == "function") {
|
|
15996
|
+
return comRaw;
|
|
15997
|
+
} else if (comRaw) {
|
|
15998
|
+
return comRaw[key] || comRaw;
|
|
15999
|
+
} else {
|
|
16000
|
+
return comRaw;
|
|
16001
|
+
}
|
|
16002
|
+
}
|
|
15994
16003
|
async function getImport(text, type = "vue") {
|
|
15995
16004
|
let jstext = "";
|
|
15996
16005
|
if (type == "vue") {
|
|
@@ -17790,7 +17799,7 @@ function nodeInit(c, callback) {
|
|
|
17790
17799
|
if (typeof c.setHtml === "function") {
|
|
17791
17800
|
setHtml = c.setHtml;
|
|
17792
17801
|
}
|
|
17793
|
-
runDev(_optionalChain([c, 'optionalAccess', _54 => _54.create]));
|
|
17802
|
+
Fang = runDev(_optionalChain([c, 'optionalAccess', _54 => _54.create]));
|
|
17794
17803
|
getCompoNameObj().forEach((v) => {
|
|
17795
17804
|
mls.push(v);
|
|
17796
17805
|
getCompoData(v);
|
|
@@ -17803,7 +17812,7 @@ function gettests(obj, arr) {
|
|
|
17803
17812
|
const tests = getTestName(obj.key);
|
|
17804
17813
|
asyncMergeArray(tests, (res, _reject, zv, inde) => {
|
|
17805
17814
|
getLocalTextTests(zv).then((text) => {
|
|
17806
|
-
arr.push(`### \u793A\u4F8B` + inde);
|
|
17815
|
+
arr.push(`### \u793A\u4F8B` + inde + 1);
|
|
17807
17816
|
const { titles: titles3 } = getNotes(text);
|
|
17808
17817
|
const dom = setHtml(
|
|
17809
17818
|
"div",
|
|
@@ -17910,7 +17919,7 @@ function getlistDom(arr, t, list) {
|
|
|
17910
17919
|
arr.forEach((data, index) => {
|
|
17911
17920
|
const vs = [];
|
|
17912
17921
|
list.forEach((item, key) => {
|
|
17913
|
-
|
|
17922
|
+
vs.push(
|
|
17914
17923
|
setHtml("td", {}, [
|
|
17915
17924
|
setValue(
|
|
17916
17925
|
data,
|
package/dist/node/index.js
CHANGED
|
@@ -15925,9 +15925,9 @@ function getRawValue(comRaw, key) {
|
|
|
15925
15925
|
if (typeof comRaw == "function") {
|
|
15926
15926
|
return comRaw;
|
|
15927
15927
|
} else if (comRaw) {
|
|
15928
|
-
return comRaw[key]
|
|
15928
|
+
return comRaw[key];
|
|
15929
15929
|
} else {
|
|
15930
|
-
return
|
|
15930
|
+
return null;
|
|
15931
15931
|
}
|
|
15932
15932
|
}
|
|
15933
15933
|
|
|
@@ -15959,27 +15959,27 @@ function setExampleObj(dir, example, vexample) {
|
|
|
15959
15959
|
examplesObj[key] = examples[key];
|
|
15960
15960
|
});
|
|
15961
15961
|
}
|
|
15962
|
+
const examplesRaw = obj.examplesRaw;
|
|
15962
15963
|
const arrraw = [];
|
|
15963
|
-
if (obj.urls) {
|
|
15964
|
+
if (obj.urls && obj.urls.length > 0) {
|
|
15964
15965
|
obj.exampless = obj.urls;
|
|
15965
15966
|
obj.urls.forEach((key) => {
|
|
15966
15967
|
arrraw.push(key);
|
|
15967
|
-
if (
|
|
15968
|
-
examplesRawObj[key] =
|
|
15969
|
-
|
|
15968
|
+
if (examplesRaw) {
|
|
15969
|
+
examplesRawObj[key] = getexamplesRawObj(
|
|
15970
|
+
examplesRaw,
|
|
15970
15971
|
key
|
|
15971
15972
|
);
|
|
15972
15973
|
}
|
|
15973
15974
|
});
|
|
15974
15975
|
} else {
|
|
15975
15976
|
obj.exampless = arr;
|
|
15976
|
-
const examplesRaw = obj.examplesRaw;
|
|
15977
15977
|
if (examplesRaw) {
|
|
15978
15978
|
Object.keys(examplesRaw).forEach((key) => {
|
|
15979
15979
|
arrraw.push(key);
|
|
15980
|
-
if (
|
|
15981
|
-
examplesRawObj[key] =
|
|
15982
|
-
|
|
15980
|
+
if (examplesRaw) {
|
|
15981
|
+
examplesRawObj[key] = getexamplesRawObj(
|
|
15982
|
+
examplesRaw,
|
|
15983
15983
|
key
|
|
15984
15984
|
);
|
|
15985
15985
|
}
|
|
@@ -15991,6 +15991,15 @@ function setExampleObj(dir, example, vexample) {
|
|
|
15991
15991
|
obj.examplesRaw = void 0;
|
|
15992
15992
|
exampleObj[dir] = obj;
|
|
15993
15993
|
}
|
|
15994
|
+
function getexamplesRawObj(comRaw, key) {
|
|
15995
|
+
if (typeof comRaw == "function") {
|
|
15996
|
+
return comRaw;
|
|
15997
|
+
} else if (comRaw) {
|
|
15998
|
+
return comRaw[key] || comRaw;
|
|
15999
|
+
} else {
|
|
16000
|
+
return comRaw;
|
|
16001
|
+
}
|
|
16002
|
+
}
|
|
15994
16003
|
async function getImport(text, type = "vue") {
|
|
15995
16004
|
let jstext = "";
|
|
15996
16005
|
if (type == "vue") {
|
|
@@ -17790,7 +17799,7 @@ function nodeInit(c, callback) {
|
|
|
17790
17799
|
if (typeof c.setHtml === "function") {
|
|
17791
17800
|
setHtml = c.setHtml;
|
|
17792
17801
|
}
|
|
17793
|
-
runDev(c?.create);
|
|
17802
|
+
Fang = runDev(c?.create);
|
|
17794
17803
|
getCompoNameObj().forEach((v) => {
|
|
17795
17804
|
mls.push(v);
|
|
17796
17805
|
getCompoData(v);
|
|
@@ -17803,7 +17812,7 @@ function gettests(obj, arr) {
|
|
|
17803
17812
|
const tests = getTestName(obj.key);
|
|
17804
17813
|
asyncMergeArray(tests, (res, _reject, zv, inde) => {
|
|
17805
17814
|
getLocalTextTests(zv).then((text) => {
|
|
17806
|
-
arr.push(`### \u793A\u4F8B` + inde);
|
|
17815
|
+
arr.push(`### \u793A\u4F8B` + inde + 1);
|
|
17807
17816
|
const { titles: titles3 } = getNotes(text);
|
|
17808
17817
|
const dom = setHtml(
|
|
17809
17818
|
"div",
|
|
@@ -17910,7 +17919,7 @@ function getlistDom(arr, t, list) {
|
|
|
17910
17919
|
arr.forEach((data, index) => {
|
|
17911
17920
|
const vs = [];
|
|
17912
17921
|
list.forEach((item, key) => {
|
|
17913
|
-
|
|
17922
|
+
vs.push(
|
|
17914
17923
|
setHtml("td", {}, [
|
|
17915
17924
|
setValue(
|
|
17916
17925
|
data,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fangzhongya/vue-archive",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.2-
|
|
4
|
+
"version": "0.0.2-24",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description ": "vue 组件注释生成文档",
|
|
7
7
|
"author": "fangzhongya ",
|
|
@@ -62,6 +62,11 @@
|
|
|
62
62
|
"import": "./dist/ndoe/index.js",
|
|
63
63
|
"types": "./dist/ndoe/index.d.ts"
|
|
64
64
|
},
|
|
65
|
+
"./index": {
|
|
66
|
+
"require": "./dist/lib/packages/index.js",
|
|
67
|
+
"import": "./dist/es/packages/index.js",
|
|
68
|
+
"types": "./dist/es/packages/index.d.ts"
|
|
69
|
+
},
|
|
65
70
|
".": {
|
|
66
71
|
"require": "./dist/lib/packages/index.js",
|
|
67
72
|
"import": "./dist/es/packages/index.js",
|