@fangzhongya/vue-archive 0.0.2-21 → 0.0.2-23
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/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js +0 -0
- package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js +0 -0
- package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.js +0 -0
- package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js +0 -0
- package/dist/es/node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js +18 -0
- package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js +0 -0
- package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js +0 -0
- package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js +0 -0
- package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js +0 -0
- package/dist/es/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js +0 -0
- package/dist/es/packages/components/code/index.vue.js +17 -18
- package/dist/es/packages/components/use/index.js +1 -1
- package/dist/es/packages/components/use/retrie/choice/index.vue.js +1 -1
- package/dist/es/packages/components/use/set-code.vue.js +3 -3
- package/dist/es/packages/config.d.ts +2 -0
- package/dist/es/packages/config.js +1 -1
- package/dist/es/packages/index.d.ts +0 -1
- package/dist/es/packages/index.js +5 -7
- package/dist/es/packages/utils/common.d.ts +1 -1
- package/dist/es/packages/utils/common.js +15 -15
- package/dist/es/packages/utils/glob.d.ts +1 -1
- package/dist/es/packages/utils/glob.js +161 -137
- package/dist/es/packages/utils/index.d.ts +2 -1
- package/dist/es/packages/utils/index.js +16 -13
- package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js +0 -0
- package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js +0 -0
- package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.js +0 -0
- package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js +0 -0
- package/dist/lib/node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js +1 -0
- package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js +0 -0
- package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js +0 -0
- package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js +0 -0
- package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js +0 -0
- package/dist/lib/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-15 → @fangzhongya_utils@0.0.7-16}/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js +0 -0
- package/dist/lib/packages/components/code/index.vue.js +1 -1
- package/dist/lib/packages/components/use/index.js +1 -1
- package/dist/lib/packages/components/use/retrie/choice/index.vue.js +1 -1
- package/dist/lib/packages/components/use/set-code.vue.js +1 -1
- package/dist/lib/packages/config.d.ts +2 -0
- package/dist/lib/packages/config.js +1 -1
- package/dist/lib/packages/index.d.ts +0 -1
- package/dist/lib/packages/index.js +1 -1
- 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.d.ts +1 -1
- package/dist/lib/packages/utils/glob.js +2 -2
- package/dist/lib/packages/utils/index.d.ts +2 -1
- package/dist/lib/packages/utils/index.js +1 -1
- package/dist/node/index.cjs +17984 -0
- package/dist/node/index.d.ts +110 -0
- package/dist/node/index.js +17984 -0
- package/package.json +10 -8
- package/dist/es/node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js +0 -6
- package/dist/es/node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-XQB2HUHZ.js +0 -18
- package/dist/es/packages/node/index.d.ts +0 -2
- package/dist/es/packages/node/index.js +0 -155
- package/dist/lib/node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js +0 -1
- package/dist/lib/node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-XQB2HUHZ.js +0 -1
- package/dist/lib/packages/node/index.d.ts +0 -2
- package/dist/lib/packages/node/index.js +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { getConfig as
|
|
2
|
-
import {
|
|
3
|
-
import { humpToLine as
|
|
4
|
-
import { lineToLargeHump as
|
|
5
|
-
import { firstLower as
|
|
6
|
-
import { duplicateRemoval as
|
|
7
|
-
import { asyncMergeArray as
|
|
8
|
-
import { getSuffix as
|
|
9
|
-
import { getTextImport as
|
|
10
|
-
const
|
|
11
|
-
function
|
|
12
|
-
return
|
|
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
|
+
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 T } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js";
|
|
5
|
+
import { firstLower as C } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js";
|
|
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 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: [],
|
|
@@ -21,17 +21,25 @@ function V(e, t, s) {
|
|
|
21
21
|
s
|
|
22
22
|
), r = [], a = n.examples;
|
|
23
23
|
a && Object.keys(a).forEach((o) => {
|
|
24
|
-
r.push(o),
|
|
25
|
-
})
|
|
26
|
-
const i =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
r.push(o), W[o] = a[o];
|
|
25
|
+
});
|
|
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
30
|
o
|
|
31
|
-
);
|
|
32
|
-
})
|
|
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;
|
|
33
38
|
}
|
|
34
|
-
function
|
|
39
|
+
function N(e, t) {
|
|
40
|
+
return typeof e == "function" ? e : e && (e[t] || e);
|
|
41
|
+
}
|
|
42
|
+
async function H(e, t = "vue") {
|
|
35
43
|
let s = "";
|
|
36
44
|
if (t == "vue") {
|
|
37
45
|
let r = new RegExp(
|
|
@@ -41,7 +49,7 @@ function k(e, t = "vue") {
|
|
|
41
49
|
} else
|
|
42
50
|
(t == "js" || t == "ts") && (s = e);
|
|
43
51
|
if (s) {
|
|
44
|
-
const n =
|
|
52
|
+
const n = await S(s);
|
|
45
53
|
let r = n == null ? void 0 : n.map((i) => i.n);
|
|
46
54
|
const a = [];
|
|
47
55
|
return r && r.length > 0 && r.forEach((i) => {
|
|
@@ -49,7 +57,7 @@ function k(e, t = "vue") {
|
|
|
49
57
|
}), a;
|
|
50
58
|
}
|
|
51
59
|
}
|
|
52
|
-
function
|
|
60
|
+
function ie(e) {
|
|
53
61
|
return new Promise((t) => {
|
|
54
62
|
e ? e.raw ? t(e.raw) : e.getRaw ? e.getRaw(e).then((s) => {
|
|
55
63
|
const n = (s || "") + "";
|
|
@@ -57,7 +65,7 @@ function re(e) {
|
|
|
57
65
|
}) : t("") : t("");
|
|
58
66
|
});
|
|
59
67
|
}
|
|
60
|
-
function
|
|
68
|
+
function $(e, t) {
|
|
61
69
|
e = (e || "") + "";
|
|
62
70
|
let s = "";
|
|
63
71
|
switch (e) {
|
|
@@ -73,39 +81,39 @@ function F(e, t) {
|
|
|
73
81
|
}
|
|
74
82
|
return s;
|
|
75
83
|
}
|
|
76
|
-
function
|
|
84
|
+
function q(e, t, s) {
|
|
77
85
|
var l, o;
|
|
78
86
|
e = (e || "") + "", s = (s || "") + "";
|
|
79
|
-
let n =
|
|
87
|
+
let n = p(t.name), r = [];
|
|
80
88
|
const a = Object.values(t.aliass || {});
|
|
81
89
|
if (e === "1")
|
|
82
90
|
t.alias && r.push(t.alias + "-" + n);
|
|
83
91
|
else if (e === "2")
|
|
84
|
-
a && a.length > 0 && a.forEach((
|
|
85
|
-
r.push(
|
|
92
|
+
a && a.length > 0 && a.forEach((f) => {
|
|
93
|
+
r.push(f + "-" + n);
|
|
86
94
|
});
|
|
87
95
|
else if (e === "3") {
|
|
88
|
-
let
|
|
89
|
-
t.alias && (
|
|
90
|
-
r.push(
|
|
96
|
+
let f = "";
|
|
97
|
+
t.alias && (f = t.alias + "-"), a == null || a.forEach((c) => {
|
|
98
|
+
r.push(f + c + "-" + n);
|
|
91
99
|
});
|
|
92
100
|
} else
|
|
93
|
-
e === "4" ? (l = t.aliasNames) == null || l.forEach((
|
|
94
|
-
r.push(
|
|
95
|
-
}) : e == "9" && (r.push(n), (o = t.aliasNames) == null || o.forEach((
|
|
96
|
-
r.push(
|
|
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));
|
|
97
105
|
}));
|
|
98
106
|
r.length == 0 && r.push(n);
|
|
99
107
|
let i = [];
|
|
100
|
-
return s === "1" ? r.forEach((
|
|
101
|
-
let
|
|
102
|
-
i.push(
|
|
103
|
-
}) : s === "2" ? r.forEach((
|
|
104
|
-
let
|
|
105
|
-
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));
|
|
106
114
|
}) : i = [...r], i = [...new Set(i)], i;
|
|
107
115
|
}
|
|
108
|
-
function
|
|
116
|
+
function B(e, t, s, n) {
|
|
109
117
|
const r = [];
|
|
110
118
|
return s.examplessRaw.forEach((a) => {
|
|
111
119
|
for (let i = 0; i < t.length; i++) {
|
|
@@ -114,50 +122,56 @@ function $(e, t, s, n) {
|
|
|
114
122
|
r.push({
|
|
115
123
|
topurl: e,
|
|
116
124
|
comkey: n.key,
|
|
117
|
-
suffix:
|
|
125
|
+
suffix: g(a),
|
|
118
126
|
name: n.name,
|
|
119
127
|
value: l,
|
|
120
128
|
key: a,
|
|
121
129
|
raw: "",
|
|
122
|
-
getRaw:
|
|
130
|
+
getRaw: R(
|
|
131
|
+
w,
|
|
132
|
+
a
|
|
133
|
+
)
|
|
123
134
|
});
|
|
124
135
|
break;
|
|
125
136
|
}
|
|
126
137
|
}
|
|
127
138
|
}), r;
|
|
128
139
|
}
|
|
129
|
-
function
|
|
140
|
+
function O(e) {
|
|
130
141
|
x();
|
|
131
|
-
const t =
|
|
142
|
+
const t = u[e];
|
|
132
143
|
if (t.tests)
|
|
133
144
|
return t.tests;
|
|
134
145
|
{
|
|
135
|
-
const s =
|
|
146
|
+
const s = y[t.dir], n = s.dir + $(s.level || 0, t), r = q(
|
|
136
147
|
s.aliaslevel || 0,
|
|
137
148
|
t,
|
|
138
149
|
s.componentName || 0
|
|
139
150
|
);
|
|
140
|
-
t.mds =
|
|
151
|
+
t.mds = B(n, r, s, t);
|
|
141
152
|
const a = {};
|
|
142
153
|
return s.exampless.forEach((i) => {
|
|
143
154
|
for (let l = 0; l < r.length; l++) {
|
|
144
155
|
const o = r[l];
|
|
145
156
|
if (i.startsWith(n + o + "/")) {
|
|
146
|
-
const
|
|
147
|
-
"^\\" + n + o + "/(.*)/index\\." +
|
|
157
|
+
const f = new RegExp(
|
|
158
|
+
"^\\" + n + o + "/(.*)/index\\." + K.join("|") + "$"
|
|
148
159
|
);
|
|
149
|
-
let
|
|
150
|
-
|
|
160
|
+
let c = "", m = i.match(f);
|
|
161
|
+
m && m.length > 1 && (c = m[1]), a[i] = {
|
|
151
162
|
topurl: n,
|
|
152
163
|
name: o,
|
|
153
|
-
value:
|
|
154
|
-
suffix:
|
|
164
|
+
value: c,
|
|
165
|
+
suffix: g(i),
|
|
155
166
|
comname: t.name,
|
|
156
167
|
comkey: t.key,
|
|
157
168
|
key: i,
|
|
158
|
-
component:
|
|
169
|
+
component: W[i],
|
|
159
170
|
raw: "",
|
|
160
|
-
getRaw:
|
|
171
|
+
getRaw: R(
|
|
172
|
+
w,
|
|
173
|
+
i
|
|
174
|
+
)
|
|
161
175
|
};
|
|
162
176
|
break;
|
|
163
177
|
}
|
|
@@ -165,16 +179,16 @@ function R(e) {
|
|
|
165
179
|
}), t.tests = a, a;
|
|
166
180
|
}
|
|
167
181
|
}
|
|
168
|
-
function
|
|
182
|
+
function le(e) {
|
|
169
183
|
if (e) {
|
|
170
|
-
const t =
|
|
184
|
+
const t = O(e);
|
|
171
185
|
return Object.values(t);
|
|
172
186
|
} else
|
|
173
187
|
return [];
|
|
174
188
|
}
|
|
175
|
-
function
|
|
189
|
+
function oe(e, t, s) {
|
|
176
190
|
x();
|
|
177
|
-
const n =
|
|
191
|
+
const n = O(s), r = [];
|
|
178
192
|
if (t) {
|
|
179
193
|
let a = n[t];
|
|
180
194
|
if (a)
|
|
@@ -184,35 +198,35 @@ function le(e, t, s) {
|
|
|
184
198
|
a.name + "/" + a.value == e && r.push(a);
|
|
185
199
|
}), r;
|
|
186
200
|
}
|
|
187
|
-
function
|
|
188
|
-
return
|
|
201
|
+
function fe(e) {
|
|
202
|
+
return O(e), u[e].mds;
|
|
189
203
|
}
|
|
190
|
-
function
|
|
191
|
-
let n =
|
|
204
|
+
async function A(e, t, s) {
|
|
205
|
+
let n = await H(t, s) || [], r = e.split("/");
|
|
192
206
|
return n.map((a) => {
|
|
193
207
|
if (a.startsWith("./")) {
|
|
194
208
|
let i = r.slice(0, r.length - 1).join("/"), l = a.substring(2);
|
|
195
209
|
return {
|
|
196
210
|
name: a,
|
|
197
211
|
value: l,
|
|
198
|
-
suffix:
|
|
212
|
+
suffix: g(a),
|
|
199
213
|
head: i,
|
|
200
214
|
key: i + "/" + l
|
|
201
215
|
};
|
|
202
216
|
} else {
|
|
203
217
|
let i = a.split("/"), l = 0;
|
|
204
|
-
for (let
|
|
205
|
-
if (i[
|
|
206
|
-
l =
|
|
218
|
+
for (let m = 0; m < i.length; m++)
|
|
219
|
+
if (i[m] != "..") {
|
|
220
|
+
l = m;
|
|
207
221
|
break;
|
|
208
222
|
}
|
|
209
|
-
let o = i.slice(l, i.length),
|
|
223
|
+
let o = i.slice(l, i.length), f = r.slice(0, r.length - l - 1).join("/"), c = o.join("/");
|
|
210
224
|
return {
|
|
211
225
|
name: a,
|
|
212
|
-
value:
|
|
213
|
-
suffix:
|
|
214
|
-
head:
|
|
215
|
-
key:
|
|
226
|
+
value: c,
|
|
227
|
+
suffix: g(a),
|
|
228
|
+
head: f,
|
|
229
|
+
key: f + "/" + c
|
|
216
230
|
};
|
|
217
231
|
}
|
|
218
232
|
});
|
|
@@ -223,11 +237,14 @@ function ce(e) {
|
|
|
223
237
|
let s = e.map((n) => ({
|
|
224
238
|
raw: "",
|
|
225
239
|
value: n.value,
|
|
226
|
-
suffix:
|
|
240
|
+
suffix: g(n.key),
|
|
227
241
|
key: n.key,
|
|
228
|
-
getRaw:
|
|
242
|
+
getRaw: R(
|
|
243
|
+
w,
|
|
244
|
+
n.key
|
|
245
|
+
)
|
|
229
246
|
}));
|
|
230
|
-
|
|
247
|
+
L(
|
|
231
248
|
s,
|
|
232
249
|
(n, r, a, i) => {
|
|
233
250
|
a.raw ? n() : a.getRaw ? a.getRaw(a).then((l) => {
|
|
@@ -242,99 +259,106 @@ function ce(e) {
|
|
|
242
259
|
t([]);
|
|
243
260
|
});
|
|
244
261
|
}
|
|
245
|
-
function
|
|
246
|
-
const e =
|
|
262
|
+
function D() {
|
|
263
|
+
const e = V(), t = P("components");
|
|
247
264
|
t == null || t.forEach((s) => {
|
|
248
265
|
var r;
|
|
249
|
-
|
|
266
|
+
Q(s);
|
|
250
267
|
let n = s.dir || ((r = s == null ? void 0 : s.resolver) == null ? void 0 : r.dir) || "";
|
|
251
|
-
|
|
252
|
-
})
|
|
268
|
+
F(n, e, s.example);
|
|
269
|
+
});
|
|
253
270
|
}
|
|
254
|
-
const
|
|
255
|
-
function
|
|
256
|
-
let t =
|
|
271
|
+
const h = "default";
|
|
272
|
+
function G(e) {
|
|
273
|
+
let t = p(e.name), s = [...e.aliasNames];
|
|
257
274
|
s.push(t), s.forEach((n) => {
|
|
258
|
-
|
|
275
|
+
j.push({
|
|
259
276
|
name: n,
|
|
260
277
|
value: e.key
|
|
261
278
|
});
|
|
262
279
|
});
|
|
263
280
|
}
|
|
264
|
-
function
|
|
281
|
+
function J(e, t) {
|
|
265
282
|
const s = {};
|
|
266
283
|
t == null || t.forEach((n) => {
|
|
267
|
-
|
|
284
|
+
u[n.key] = n, G(n);
|
|
268
285
|
const r = Object.values(n.aliass || {});
|
|
269
286
|
r && r.length ? r.forEach((a) => {
|
|
270
287
|
s[a] = s[a] || [], s[a].push(n.key);
|
|
271
|
-
}) : (s[
|
|
288
|
+
}) : (s[h] = s[h] || [], s[h].push(n.key));
|
|
272
289
|
});
|
|
273
290
|
}
|
|
274
|
-
function
|
|
291
|
+
function Q(e) {
|
|
275
292
|
var n;
|
|
276
293
|
let t, s;
|
|
277
|
-
|
|
278
|
-
e.resolver.
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
e.
|
|
287
|
-
e.
|
|
288
|
-
|
|
289
|
-
|
|
294
|
+
if (e.resolver)
|
|
295
|
+
t = e.alias || ((n = e.resolver) == null ? void 0 : n.alias) || h, s = E(
|
|
296
|
+
e.resolver.urls || [],
|
|
297
|
+
e.resolver,
|
|
298
|
+
e.componentsRaw,
|
|
299
|
+
e.components,
|
|
300
|
+
e
|
|
301
|
+
);
|
|
302
|
+
else {
|
|
303
|
+
t = e.alias || h;
|
|
304
|
+
let r = (e == null ? void 0 : e.urls) || Object.keys(e.componentsRaw);
|
|
305
|
+
s = E(
|
|
306
|
+
r,
|
|
307
|
+
e,
|
|
308
|
+
e.componentsRaw,
|
|
309
|
+
e.components,
|
|
310
|
+
e
|
|
311
|
+
);
|
|
312
|
+
}
|
|
313
|
+
s && (s != null && s.props) && s.props.forEach((r) => {
|
|
290
314
|
d[r.key] = r;
|
|
291
|
-
}),
|
|
315
|
+
}), J(t, s.components);
|
|
292
316
|
}
|
|
293
|
-
function
|
|
294
|
-
return x(),
|
|
317
|
+
function ue(e) {
|
|
318
|
+
return x(), u[e];
|
|
295
319
|
}
|
|
296
320
|
function x() {
|
|
297
|
-
return Object.keys(
|
|
321
|
+
return Object.keys(u).length == 0 && D(), Object.values(u);
|
|
298
322
|
}
|
|
299
323
|
function me(e, t, s) {
|
|
300
324
|
x();
|
|
301
325
|
const n = [];
|
|
302
326
|
if (s) {
|
|
303
|
-
let a =
|
|
327
|
+
let a = u[s];
|
|
304
328
|
if (a && a.key)
|
|
305
329
|
return [a];
|
|
306
330
|
}
|
|
307
|
-
let r =
|
|
308
|
-
return
|
|
309
|
-
t ? a.name.includes(r) && n.push(
|
|
310
|
-
}),
|
|
331
|
+
let r = p(e);
|
|
332
|
+
return j.forEach((a) => {
|
|
333
|
+
t ? a.name.includes(r) && n.push(u[a.value]) : a.name == r && n.push(u[a.value]);
|
|
334
|
+
}), U(n, "key");
|
|
311
335
|
}
|
|
312
|
-
async function
|
|
336
|
+
async function X(e, t) {
|
|
313
337
|
let s = e;
|
|
314
338
|
if (e) {
|
|
315
|
-
let n =
|
|
339
|
+
let n = (await A(
|
|
316
340
|
t.key,
|
|
317
341
|
e,
|
|
318
342
|
t.suffix
|
|
319
|
-
).filter((r) => r.key.startsWith(t.head));
|
|
320
|
-
s += await
|
|
343
|
+
)).filter((r) => r.key.startsWith(t.head));
|
|
344
|
+
s += await I(n);
|
|
321
345
|
}
|
|
322
346
|
return s;
|
|
323
347
|
}
|
|
324
|
-
function
|
|
348
|
+
function Y(e) {
|
|
325
349
|
return new Promise((t) => {
|
|
326
350
|
if (e && e.length > 0) {
|
|
327
351
|
let s = e.map((n) => d[n.key] || d[n.key + ".js"] || d[n.key + ".ts"]);
|
|
328
|
-
|
|
352
|
+
L(
|
|
329
353
|
s,
|
|
330
354
|
(n, r, a, i) => {
|
|
331
355
|
a.raw ? n() : a.getRaw ? a.getRaw(a).then(async (l) => {
|
|
332
356
|
const o = (l || "") + "";
|
|
333
|
-
let
|
|
357
|
+
let f = await X(
|
|
334
358
|
o,
|
|
335
359
|
e[i]
|
|
336
360
|
);
|
|
337
|
-
a.raw =
|
|
361
|
+
a.raw = f, a.getRaw = null, n();
|
|
338
362
|
}) : n();
|
|
339
363
|
}
|
|
340
364
|
).then(() => {
|
|
@@ -344,33 +368,33 @@ function Q(e) {
|
|
|
344
368
|
t([]);
|
|
345
369
|
});
|
|
346
370
|
}
|
|
347
|
-
async function
|
|
348
|
-
const t = await
|
|
371
|
+
async function I(e) {
|
|
372
|
+
const t = await Y(e);
|
|
349
373
|
return ((t == null ? void 0 : t.map((n) => n.raw)) || []).join(`
|
|
350
374
|
`);
|
|
351
375
|
}
|
|
352
|
-
async function
|
|
376
|
+
async function Z(e, t) {
|
|
353
377
|
let s = e;
|
|
354
378
|
if (e && (t.comprops || t.curprops)) {
|
|
355
|
-
let n =
|
|
379
|
+
let n = (await A(
|
|
356
380
|
t.key,
|
|
357
381
|
e,
|
|
358
382
|
t.suffix
|
|
359
|
-
).filter((a) =>
|
|
383
|
+
)).filter((a) => b(
|
|
360
384
|
a.name,
|
|
361
385
|
t.comprops || ""
|
|
362
|
-
) ||
|
|
386
|
+
) || M(a.name, t.curprops || "")), r = await I(n);
|
|
363
387
|
s += r;
|
|
364
388
|
}
|
|
365
389
|
return s;
|
|
366
390
|
}
|
|
367
|
-
function
|
|
391
|
+
function pe(e) {
|
|
368
392
|
return new Promise((t) => {
|
|
369
393
|
if (e) {
|
|
370
394
|
x();
|
|
371
|
-
const s =
|
|
395
|
+
const s = u[e];
|
|
372
396
|
s ? s.raw ? t(s.raw) : s.getRaw ? s.getRaw(s).then(async (n) => {
|
|
373
|
-
const r = (n || "") + "", a = await
|
|
397
|
+
const r = (n || "") + "", a = await Z(
|
|
374
398
|
r,
|
|
375
399
|
s
|
|
376
400
|
);
|
|
@@ -381,15 +405,15 @@ function ue(e) {
|
|
|
381
405
|
});
|
|
382
406
|
}
|
|
383
407
|
export {
|
|
384
|
-
|
|
408
|
+
h as defaultName,
|
|
385
409
|
me as getCompoName,
|
|
386
|
-
|
|
410
|
+
ue as getCompoNameKey,
|
|
387
411
|
x as getCompoNameObj,
|
|
388
|
-
|
|
412
|
+
fe as getKeyMds,
|
|
389
413
|
ce as getLocalTextArr,
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
414
|
+
pe as getLocalTextComponents,
|
|
415
|
+
ie as getLocalTextTests,
|
|
416
|
+
A as getTestImportUrl,
|
|
417
|
+
le as getTestName,
|
|
418
|
+
oe as getTestNameObj
|
|
395
419
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ImportSpecifier } from 'es-module-lexer';
|
|
1
2
|
export type Spec = {
|
|
2
3
|
tag: string;
|
|
3
4
|
name: string;
|
|
@@ -25,6 +26,6 @@ interface Descriptions {
|
|
|
25
26
|
}
|
|
26
27
|
export type SpecObjs = Descriptions & Specs;
|
|
27
28
|
export declare function getTextNotes(text: string): Block[] | undefined;
|
|
28
|
-
export declare function getTextImport(jstext: string): readonly
|
|
29
|
+
export declare function getTextImport(jstext: string): Promise<readonly ImportSpecifier[]>;
|
|
29
30
|
export declare function copyCode(text: string): void;
|
|
30
31
|
export {};
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import { parse as
|
|
2
|
-
import { parse as
|
|
3
|
-
function
|
|
4
|
-
if (
|
|
5
|
-
return
|
|
1
|
+
import { parse as e } from "../../node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/index.js";
|
|
2
|
+
import { init as i, parse as n } from "../../node_modules/.pnpm/es-module-lexer@1.1.1/node_modules/es-module-lexer/dist/lexer.js";
|
|
3
|
+
function s(t) {
|
|
4
|
+
if (t)
|
|
5
|
+
return e(t);
|
|
6
6
|
}
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
function c(t) {
|
|
8
|
+
return new Promise(async (r) => {
|
|
9
|
+
await i;
|
|
10
|
+
const [o] = n(t);
|
|
11
|
+
r(o);
|
|
12
|
+
});
|
|
10
13
|
}
|
|
11
|
-
function
|
|
12
|
-
navigator.clipboard.writeText(
|
|
14
|
+
function m(t) {
|
|
15
|
+
navigator.clipboard.writeText(t);
|
|
13
16
|
}
|
|
14
17
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
m as copyCode,
|
|
19
|
+
c as getTextImport,
|
|
20
|
+
s as getTextNotes
|
|
18
21
|
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function y(e,i){return new Promise((n,c)=>{let t=0;const r=e.length;r>0?e.forEach((...o)=>{i((...s)=>{t++,r==t&&n(s)},c,...o)}):n(e)})}exports.asyncMergeArray=y;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),d=require("../boxurl/index.vue.js"),m=require("../../router/index.js"),x=require("./highlight.vue.js"),_=require("../../utils/index.js"),p=require("../../utils/glob.js"),w=require("vue-router"),E={class:"code"},N={class:"code-top"},V={class:"code-top-but"},y={class:"top-but-files"},b=["onClick"],q={class:"code-highlightjs"},B=e.defineComponent({__name:"index",props:{text:String,value:Object},setup(
|
|
1
|
+
"use strict";const e=require("vue"),d=require("../boxurl/index.vue.js"),m=require("../../router/index.js"),x=require("./highlight.vue.js"),_=require("../../utils/index.js"),p=require("../../utils/glob.js"),w=require("vue-router"),E={class:"code"},N={class:"code-top"},V={class:"code-top-but"},y={class:"top-but-files"},b=["onClick"],q={class:"code-highlightjs"},B=e.defineComponent({__name:"index",props:{text:String,value:Object},setup(h){const t=h,f=w.useRouter();e.watch(()=>t.text,()=>{u()});const a=e.ref([]),o=e.ref(),i=e.ref(!1);function k(){var l;(l=o.value)!=null&&l.raw?_.copyCode(o.value.raw):_.copyCode(t.text)}function g(){i.value=!i.value}function C(){m.toSingle(f,t.value)}function r(l){i.value=!0,o.value=l}function u(){var l;o.value=void 0,i.value=!1,t.text&&p.getTestImportUrl((l=t.value)==null?void 0:l.key,t.text,"vue").then(c=>{p.getLocalTextArr(c).then(s=>{a.value=s.filter(n=>n.raw)})})}return u(),(l,c)=>{var s;return e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("div",N,[e.createElementVNode("div",V,[e.createElementVNode("div",{class:"but-div",onClick:C}," go "),e.createElementVNode("div",{class:"but-div",onClick:k}," 复制 "),e.createElementVNode("div",{class:"but-div",onClick:g},e.toDisplayString(i.value?"隐藏":"显示"),1),e.createElementVNode("div",y,[e.createVNode(d,{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,S)=>(e.openBlock(),e.createBlock(d,{value:n},{default:e.withCtx(()=>{var v;return[e.createElementVNode("div",{class:e.normalizeClass(["but-div",{on:n.key==((v=o.value)==null?void 0:v.key)}]),onClick:e.withModifiers(D=>r(n),["stop"])},e.toDisplayString(n.value),11,b)]}),_:2},1032,["value"]))),256))])])]),e.withDirectives(e.createElementVNode("div",q,[e.createVNode(x,{language:"html",code:((s=o.value)==null?void 0:s.raw)||t.text},null,8,["code"])],512),[[e.vShow,i.value]])])}}});module.exports=B;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("vue"),x=require("./set-props.vue.js"),q=require("./set-emit.vue.js"),E=require("./set-code.vue.js"),b=require("./set-expose.vue.js"),C=require("./set-slot.vue.js"),i=require("../../utils/props.js"),V=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
1
|
+
"use strict";const t=require("vue"),x=require("./set-props.vue.js"),q=require("./set-emit.vue.js"),E=require("./set-code.vue.js"),b=require("./set-expose.vue.js"),C=require("./set-slot.vue.js"),i=require("../../utils/props.js"),V=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js"),j=t.defineComponent({props:{value:{type:Object},param:{type:Object}},render(O,T,v,D,a){console.log("render",new Date().getTime());const r=t.reactive({emitValue:{},slotValue:{}}),n=v.value;let c="div";n.component?c=t.defineAsyncComponent(n.component):n.name&&(c=t.resolveComponent(n.name));const u=v.param,d=i.getPropsValue(u.props),m=i.getEmitsValue(u.emits),y=i.getExposeValue(u.expose),h=i.getSlotValue(u.slot),l={},f={};d.forEach(s=>{let e=s.name;if(!e.includes(".")){let o=e.split("/");e=(o[0]||"").trim(),e&&(l[e]=a.propsValue[e],o&&o.length>1&&m.push({name:"update:"+e,description:s.description,selectable:"value:["+s.type+"]"}))}}),m.forEach(s=>{let e=s.name;if(e.includes("-")){let p=e.split("-");p=p.map((_,U)=>V.firstUpper(_)),e=p.join("")}else e=V.firstUpper(e);const o="on"+e;l[o]=(...p)=>{const _={arr:p,_date_:new Date().getTime()};r.emitValue[s.name]=_}});let g;return h.forEach(s=>{const e=s.name||"default";f[e]=o=>{if(r.slotValue[e])return t.h(t.defineComponent({props:{scope:{type:Object}},template:r.slotValue[e]}),{scope:o})}}),t.h("div",{class:"use"},[t.h("div",{class:"use-props"},t.h(x,{name:n.name,list:d,onChange:(s,e)=>{a.propsValue=s,a.propsText=e}})),t.h("div",{class:"use-component"},t.h(c,{...l,ref:s=>{g=s}},f)),t.h("div",{class:"use-code"},t.h(E,{name:n.name,value:l,propsText:a.propsText,slotValue:r.slotValue})),t.h("div",{class:"use-emit"},t.h(q,{name:n.name,list:m,value:r.emitValue})),t.h("div",{class:"use-expose"},t.h(b,{name:n.name,list:y,getRef:()=>g})),t.h("div",{class:"use-slot"},t.h(C,{name:n.name,list:h,onChange:(s,e)=>{r.slotValue[s]=e}}))])},data(){return{propsValue:{},propsText:{}}}});module.exports=j;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),S=require("../../../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
1
|
+
"use strict";const e=require("vue"),S=require("../../../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.js"),v=require("../../util.js"),C={class:"form-select"},x=["value","disabled","onClick","onBlur"],A=["onMousemove","onMouseout"],j={class:"form-select-list"},O={key:0,class:"form-select-list-div"},T=["onClick"],q={key:1,class:"no-data"},L=e.defineComponent({__name:"index",props:{modelValue:{type:null},dataType:{type:[String,Array]},disabled:Boolean,list:{type:Array},config:{type:Object,default(){return{label:"label",prop:"prop"}}}},emits:["value","change"],setup(h,{emit:g}){const l=h,u=e.ref(),a=e.ref(!1),c=e.ref(!1),r=e.ref([]),y=e.computed(()=>r.value.map(t=>d(t)).join(",")),p=e.computed(()=>{let t=l.dataType||"";return(v.getSonType(t)||[])[1]});e.watch(()=>l.modelValue,()=>{b()},{immediate:!0});function _(t=[]){return p.value=="string"?t.map(n=>v.getString(n)):p.value=="number"?t.map(n=>{let o=Number(n);return isNaN(o)&&(o=0),o}):t}function k(t){return new Function("",`{
|
|
2
2
|
var a = ${t};
|
|
3
3
|
return a;
|
|
4
4
|
}`)}function b(){r.value=[];let t=l.modelValue,n=[];const o=k(t);if(o instanceof Array&&(n=o),l.list)for(let i=0;i<l.list.length;i++){const f=l.list[i];n.includes(s(f))&&r.value.push(f)}m()}function d(t){var o;let n=(o=l.config)==null?void 0:o.label;return n&&typeof t=="object"&&t?t[n]:t}function s(t){var o;let n=(o=l.config)==null?void 0:o.prop;return n&&typeof t=="object"&&t?t[n]:t}function B(t){return r.value.map(n=>s(n)).includes(s(t))}function w(){l.disabled||(a.value=!0)}function M(){c.value||(a.value=!1)}function V(){c.value=!0}function E(){c.value=!1}function N(t){u.value&&u.value.focus(),r.value=S.toggleArray(r.value,t,l.config.prop),m()}function m(){let t=_(r.value.map(n=>s(n)));g("value",t,JSON.stringify(t))}return(t,n)=>(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("input",{value:e.unref(y),readonly:"",placeholder:"请选择",type:"text",disabled:l.disabled,ref_key:"refInput",ref:u,onClick:e.withModifiers(w,["stop"]),onBlur:e.withModifiers(M,["stop"])},null,40,x),e.createElementVNode("div",{onMousemove:e.withModifiers(V,["stop"]),onMouseout:e.withModifiers(E,["stop"]),class:"form-select-box"},[e.withDirectives(e.createElementVNode("div",j,[l.list&&l.list.length>0?(e.openBlock(),e.createElementBlock("div",O,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.list,(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-select-list-li",{active:B(o)}]),onClick:e.withModifiers(f=>N(o),["stop"])},[e.createElementVNode("span",null,e.toDisplayString(d(o)),1)],10,T))),256))])):(e.openBlock(),e.createElementBlock("div",q," 暂无数据 "))],512),[[e.vShow,a.value]])],40,A)]))}});module.exports=L;
|