@fangzhongya/vue-archive 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/node/index.cjs +163 -74
- package/dist/node/index.js +163 -74
- package/dist/packages/components/aside/index.vue.js +4 -4
- package/dist/packages/components/boxurl/index.vue.js +5 -5
- package/dist/packages/components/choice/choice.vue.js +4 -4
- package/dist/packages/components/choice/index.vue.js +1 -1
- package/dist/packages/components/code/highlight.vue.js +3 -3
- package/dist/packages/components/code/index.vue.js +3 -3
- package/dist/packages/components/compo/code.vue.js +2 -2
- package/dist/packages/components/compo/ftable.vue.js +6 -6
- package/dist/packages/components/compo/index.vue.js +1 -1
- package/dist/packages/components/compo/info-top.vue.js +2 -2
- package/dist/packages/components/compo/info.vue.js +5 -5
- package/dist/packages/components/compo/props.vue.js +1 -1
- package/dist/packages/components/header/index.vue.js +2 -2
- package/dist/packages/components/main/index.vue.js +3 -3
- package/dist/packages/components/md/index.vue.js +7 -7
- package/dist/packages/components/test/index.vue.js +4 -4
- package/dist/packages/components/use/code.d.ts +18 -25
- package/dist/packages/components/use/code.vue.js +4 -4
- package/dist/packages/components/use/effect.vue.js +2 -2
- package/dist/packages/components/use/retrie/any/index.vue.js +2 -2
- package/dist/packages/components/use/retrie/array/index.vue.js +2 -2
- package/dist/packages/components/use/retrie/boolean/index.vue.js +2 -2
- package/dist/packages/components/use/retrie/choice/index.vue.js +5 -5
- package/dist/packages/components/use/retrie/expose/index.vue.js +2 -2
- package/dist/packages/components/use/retrie/form/index.vue.js +1 -1
- package/dist/packages/components/use/retrie/function/index.vue.js +2 -2
- package/dist/packages/components/use/retrie/index.vue.js +1 -1
- package/dist/packages/components/use/retrie/input/editor/editor.d.ts +0 -49
- package/dist/packages/components/use/retrie/input/editor/editor.vue.js +2 -2
- package/dist/packages/components/use/retrie/input/index.vue.js +1 -1
- package/dist/packages/components/use/retrie/input/text.vue.js +2 -2
- package/dist/packages/components/use/retrie/number/index.vue.js +2 -2
- package/dist/packages/components/use/retrie/object/index.vue.js +2 -2
- package/dist/packages/components/use/retrie/other/index.vue.js +2 -2
- package/dist/packages/components/use/retrie/select/index.vue.js +5 -5
- package/dist/packages/components/use/retrie/slot/index.vue.js +2 -2
- package/dist/packages/components/use/retrie/string/index.vue.js +2 -2
- package/dist/packages/components/use/set-code.vue.js +2 -2
- package/dist/packages/components/use/set-emit.vue.js +4 -4
- package/dist/packages/components/use/set-expose.vue.js +6 -6
- package/dist/packages/components/use/set-props.vue.js +2 -2
- package/dist/packages/components/use/set-slot.vue.js +7 -7
- package/dist/packages/index/index.vue2.js +2 -2
- package/dist/packages/page/compon/index.vue2.js +2 -2
- package/dist/packages/page/comprops/index.vue2.js +3 -3
- package/dist/packages/page/develop/index.vue2.js +2 -2
- package/dist/packages/page/edit/index.vue2.js +2 -2
- package/dist/packages/page/index/index.vue2.js +1 -1
- package/dist/packages/page/single/index.vue2.js +2 -2
- package/dist/packages/page/tests/index.vue2.js +6 -6
- package/dist/packages/utils/glob.cjs +1 -1
- package/dist/packages/utils/glob.js +1 -1
- package/package.json +11 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as x, computed as k, ref as m,
|
|
1
|
+
import { defineComponent as x, computed as k, ref as m, openBlock as l, createElementBlock as a, createTextVNode as V, createVNode as p, createElementVNode as r, withModifiers as b, Fragment as N, renderList as R, createCommentVNode as y } from "vue";
|
|
2
2
|
import $ from "./retrie/select/index.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import B from "./retrie/expose/index.vue.js";
|
|
@@ -34,19 +34,19 @@ const E = {
|
|
|
34
34
|
function h(e, t, o, i) {
|
|
35
35
|
u[e] = { params: t, type: o, name: e, text: i }, v("change", u);
|
|
36
36
|
}
|
|
37
|
-
return (e, t) => n.list && n.list.length > 0 ? (
|
|
38
|
-
t[1] || (t[1] =
|
|
37
|
+
return (e, t) => n.list && n.list.length > 0 ? (l(), a("div", E, [
|
|
38
|
+
t[1] || (t[1] = V(" 请先选择要执行的方法 ", -1)),
|
|
39
39
|
p($, {
|
|
40
40
|
onChange: _,
|
|
41
41
|
list: g.value
|
|
42
42
|
}, null, 8, ["list"]),
|
|
43
43
|
r("div", {
|
|
44
44
|
class: "but-div com-retrie-but",
|
|
45
|
-
onClick:
|
|
45
|
+
onClick: b(C, ["stop"])
|
|
46
46
|
}, [...t[0] || (t[0] = [
|
|
47
47
|
r("span", null, "添加", -1)
|
|
48
48
|
])]),
|
|
49
|
-
(
|
|
49
|
+
(l(!0), a(N, null, R(s.value, (o, i) => (l(), a("div", F, [
|
|
50
50
|
r("span", {
|
|
51
51
|
class: "set-expose-delete",
|
|
52
52
|
onClick: (j) => s.value.splice(i, 1)
|
|
@@ -58,7 +58,7 @@ const E = {
|
|
|
58
58
|
onChange: h
|
|
59
59
|
}, null, 8, ["name", "value", "getRef"])
|
|
60
60
|
]))), 256))
|
|
61
|
-
])) :
|
|
61
|
+
])) : y("", !0);
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as T, ref as l, watch as j,
|
|
1
|
+
import { defineComponent as T, ref as l, watch as j, openBlock as k, createElementBlock as x, createVNode as B } from "vue";
|
|
2
2
|
import E from "./retrie/index.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import { getDefaultValue as S, getSpecType as w } from "./code.js";
|
|
@@ -54,7 +54,7 @@ const A = { class: "set-props" }, Q = /* @__PURE__ */ T({
|
|
|
54
54
|
{
|
|
55
55
|
immediate: !0
|
|
56
56
|
}
|
|
57
|
-
), (s, t) => (
|
|
57
|
+
), (s, t) => (k(), x("div", A, [
|
|
58
58
|
B(E, {
|
|
59
59
|
refresh: p.value,
|
|
60
60
|
modelValue: a.value,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as g, ref as _,
|
|
1
|
+
import { defineComponent as g, ref as _, openBlock as l, createElementBlock as a, createElementVNode as i, Fragment as v, renderList as h, toDisplayString as C, normalizeClass as y, createVNode as k, createCommentVNode as E } from "vue";
|
|
2
2
|
import N from "./retrie/slot/index.vue.js";
|
|
3
3
|
const V = {
|
|
4
4
|
key: 0,
|
|
@@ -19,14 +19,14 @@ const V = {
|
|
|
19
19
|
let n = t.name || "default";
|
|
20
20
|
p("change", n, e[0]);
|
|
21
21
|
}
|
|
22
|
-
return (e, t) => r.list && r.list.length > 0 ? (
|
|
22
|
+
return (e, t) => r.list && r.list.length > 0 ? (l(), a("div", V, [
|
|
23
23
|
t[0] || (t[0] = i("div", null, "当前作用域参数使用 scope ,使用 template 来渲染", -1)),
|
|
24
|
-
(
|
|
25
|
-
i("div", null,
|
|
24
|
+
(l(!0), a(v, null, h(r.list, (n, o) => (l(), a("div", { key: o }, [
|
|
25
|
+
i("div", null, C(d(n)), 1),
|
|
26
26
|
i("div", {
|
|
27
|
-
class:
|
|
27
|
+
class: y(["form-item", { error: m.value[o] }])
|
|
28
28
|
}, [
|
|
29
|
-
|
|
29
|
+
k(N, {
|
|
30
30
|
onError: (s) => {
|
|
31
31
|
m.value[o] = s;
|
|
32
32
|
},
|
|
@@ -37,7 +37,7 @@ const V = {
|
|
|
37
37
|
}, null, 8, ["onError", "onChange", "value"])
|
|
38
38
|
], 2)
|
|
39
39
|
]))), 128))
|
|
40
|
-
])) :
|
|
40
|
+
])) : E("", !0);
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as e,
|
|
1
|
+
import { defineComponent as e, openBlock as o, createElementBlock as t, createVNode as r, unref as n } from "vue";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import { RouterView as c } from "vue-router";
|
|
4
4
|
const _ = { class: "__document" }, u = /* @__PURE__ */ e({
|
|
5
5
|
__name: "index",
|
|
6
6
|
setup(m) {
|
|
7
|
-
return (i, p) => (
|
|
7
|
+
return (i, p) => (o(), t("div", _, [
|
|
8
8
|
r(n(c))
|
|
9
9
|
]));
|
|
10
10
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as t,
|
|
1
|
+
import { defineComponent as t, openBlock as n, createElementBlock as _, createVNode as e, withCtx as c } from "vue";
|
|
2
2
|
import m from "../../components/main/index.vue.js";
|
|
3
3
|
import a from "../../components/choice/index.vue.js";
|
|
4
4
|
const r = { class: "__document-com __document-compon" }, f = /* @__PURE__ */ t({
|
|
5
5
|
__name: "index",
|
|
6
6
|
setup(l) {
|
|
7
|
-
return (u, i) => (
|
|
7
|
+
return (u, i) => (n(), _("div", r, [
|
|
8
8
|
e(a, null, {
|
|
9
9
|
default: c((o) => [
|
|
10
10
|
e(m, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as g, ref as c,
|
|
1
|
+
import { defineComponent as g, ref as c, openBlock as l, createElementBlock as d, createElementVNode as e, Fragment as k, renderList as C, normalizeClass as y, createVNode as t, withCtx as u, toDisplayString as a } from "vue";
|
|
2
2
|
import f from "../../components/boxurl/index.vue.js";
|
|
3
3
|
import w from "../../components/compo/props.vue.js";
|
|
4
4
|
import $ from "../../components/header/index.vue.js";
|
|
@@ -31,11 +31,11 @@ const D = { class: "__document-index" }, O = { class: "index-aside" }, P = { cla
|
|
|
31
31
|
v.value = o.raw;
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
return p(), (s, o) => (
|
|
34
|
+
return p(), (s, o) => (l(), d("div", D, [
|
|
35
35
|
e("div", O, [
|
|
36
36
|
e("div", P, [
|
|
37
37
|
e("div", R, [
|
|
38
|
-
(
|
|
38
|
+
(l(!0), d(k, null, C(m.value, (i, U) => (l(), d("div", {
|
|
39
39
|
class: y(["aside-li", {
|
|
40
40
|
on: i.key == n.value?.key
|
|
41
41
|
}]),
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as t,
|
|
1
|
+
import { defineComponent as t, openBlock as n, createElementBlock as _, createVNode as e, withCtx as m } from "vue";
|
|
2
2
|
import a from "../../components/compo/info.vue.js";
|
|
3
3
|
import l from "../../components/compo/index.vue.js";
|
|
4
4
|
import c from "../../components/choice/index.vue.js";
|
|
5
5
|
const r = { class: "__document-com __document-compon" }, x = /* @__PURE__ */ t({
|
|
6
6
|
__name: "index",
|
|
7
7
|
setup(u) {
|
|
8
|
-
return (i, s) => (
|
|
8
|
+
return (i, s) => (n(), _("div", r, [
|
|
9
9
|
e(c, null, {
|
|
10
10
|
default: m((o) => [
|
|
11
11
|
e(a, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as o,
|
|
1
|
+
import { defineComponent as o, openBlock as _, createElementBlock as n, createVNode as e, withCtx as m } from "vue";
|
|
2
2
|
import a from "../../components/compo/info.vue.js";
|
|
3
3
|
import l from "../../components/compo/code.vue.js";
|
|
4
4
|
/* empty css */
|
|
@@ -6,7 +6,7 @@ import r from "../../components/choice/index.vue.js";
|
|
|
6
6
|
const c = { class: "__document-com __document-edit" }, h = /* @__PURE__ */ o({
|
|
7
7
|
__name: "index",
|
|
8
8
|
setup(i) {
|
|
9
|
-
return (u, s) => (
|
|
9
|
+
return (u, s) => (_(), n("div", c, [
|
|
10
10
|
e(r, null, {
|
|
11
11
|
default: m((t) => [
|
|
12
12
|
e(a, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as r, ref as _, watch as l, onMounted as u,
|
|
1
|
+
import { defineComponent as r, ref as _, watch as l, onMounted as u, openBlock as i, createElementBlock as d, createElementVNode as e, createVNode as a, withDirectives as m, createBlock as v, unref as f } from "vue";
|
|
2
2
|
import h from "../../directives/adjust/index.js";
|
|
3
3
|
import p from "../../components/aside/index.vue.js";
|
|
4
4
|
import x from "../../components/header/index.vue.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as v, ref as n,
|
|
1
|
+
import { defineComponent as v, ref as n, openBlock as f, createElementBlock as g, createVNode as i, withCtx as h, createElementVNode as e, toDisplayString as l } from "vue";
|
|
2
2
|
import k from "../../components/compo/info.vue.js";
|
|
3
3
|
import y from "../../components/choice/index.vue.js";
|
|
4
4
|
import x from "../../components/test/index.vue.js";
|
|
@@ -25,7 +25,7 @@ const w = { class: "__document-com __document-single" }, B = { class: "single-to
|
|
|
25
25
|
t.key
|
|
26
26
|
)[0];
|
|
27
27
|
}
|
|
28
|
-
return (t, o) => (
|
|
28
|
+
return (t, o) => (f(), g("div", w, [
|
|
29
29
|
i(y, {
|
|
30
30
|
"get-name": _,
|
|
31
31
|
"get-key": u,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as g, ref as i,
|
|
1
|
+
import { defineComponent as g, ref as i, openBlock as s, createElementBlock as a, createVNode as r, withCtx as y, createElementVNode as _, Fragment as v, renderList as f, normalizeClass as x, toDisplayString as $ } from "vue";
|
|
2
2
|
import N from "../../components/compo/info.vue.js";
|
|
3
3
|
import b from "../../components/choice/index.vue.js";
|
|
4
4
|
import B from "../../components/test/index.vue.js";
|
|
@@ -37,25 +37,25 @@ const L = { class: "__document-com __document-tests" }, S = { class: "tests-top"
|
|
|
37
37
|
} else
|
|
38
38
|
n.value = [...o.value];
|
|
39
39
|
}
|
|
40
|
-
return (t, l) => (
|
|
40
|
+
return (t, l) => (s(), a("div", L, [
|
|
41
41
|
r(b, { onChange: k }, {
|
|
42
42
|
default: y(() => [
|
|
43
43
|
r(N, { value: d.value }, null, 8, ["value"]),
|
|
44
44
|
_("div", S, [
|
|
45
|
-
(
|
|
45
|
+
(s(), a(v, null, f(p, (e, c) => _("span", {
|
|
46
46
|
class: x(["but-div", { on: m.value == e.id }]),
|
|
47
47
|
key: c,
|
|
48
48
|
onClick: (F) => C(e)
|
|
49
49
|
}, $(e.name), 11, V)), 64))
|
|
50
50
|
]),
|
|
51
|
-
n.value && n.value.length > 0 ? (
|
|
52
|
-
(
|
|
51
|
+
n.value && n.value.length > 0 ? (s(), a("div", j, [
|
|
52
|
+
(s(!0), a(v, null, f(n.value, (e) => (s(), a("div", w, [
|
|
53
53
|
r(B, {
|
|
54
54
|
onState: h,
|
|
55
55
|
value: e
|
|
56
56
|
}, null, 8, ["value"])
|
|
57
57
|
]))), 256))
|
|
58
|
-
])) : (
|
|
58
|
+
])) : (s(), a("div", z, "没有查询到示例"))
|
|
59
59
|
]),
|
|
60
60
|
_: 1
|
|
61
61
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../config.cjs"),z=require("@fangzhongya/utils/html/getVueText"),p=require("./common.cjs"),F=require("@fangzhongya/utils/basic/object/mergeObject");require("@fangzhongya/utils/basic/array/toggleArray");const T=require("@fangzhongya/utils/name/humpToLine"),v=require("@fangzhongya/utils/name/lineToLargeHump");require("@fangzhongya/utils/basic/string/appearNum");const A=require("@fangzhongya/utils/basic/string/firstLower"),D=require("@fangzhongya/utils/basic/array/duplicateRemoval"),W=require("@fangzhongya/utils/basic/array/asyncMergeArray");require("@fangzhongya/utils/basic/string/firstUpper");const h=require("@fangzhongya/utils/urls/getSuffix");require("@fangzhongya/utils/basic/array/replaceAfter");const J=require("./index.cjs"),w={},R={},M=[],$={},j={},m={};function Q(){return S.getConfig("example")}function X(t,e,n,r){const a=F.mergeObject(e,n||{},3,!0);a.exampless=a.exampless||[],a.examplessRaw=a.examplessRaw||[];const s=[],i=a.examples;i&&Object.keys(i).forEach(o=>{s.push(o),j[o]=i[o]});const l=a.examplesRaw,u=[];if(a.urls&&a.urls.length>0?(a.exampless=a.urls,a.urls.forEach(o=>{u.push(o),l&&(m[o]=N(l,o))})):(a.exampless=s,l&&Object.keys(l).forEach(o=>{u.push(o),m[o]=N(l,o)})),a.examples=void 0,e.tests&&r){const o=e.testsNanme||"/tests/";typeof o=="string"?Object.keys(r).forEach(f=>{f.includes(o)&&(a.exampless.push(f),u.push(f),m[f]=N(r,f))}):Object.keys(r).forEach(f=>{o.test(f)&&(a.exampless.push(f),u.push(f),m[f]=N(r,f))})}a.exampless=[...new Set(a.exampless)],a.examplessRaw=[...new Set(u)],a.examplesRaw=void 0,$[t]=a}function N(t,e){return typeof t=="function"?t:t&&(t[e]||t)}const q={};function Y(t){const e=S.getConfig("resolve");if(q[t])return q[t];for(let n of e)if(t.startsWith(n.find+"/")){const a=n.replacement.replaceAll("\\","/")+t.replace(n.find+"/","/");return q[t]=a,a}}async function Z(t,e){let n="";if(e=="vue"?n=z.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../config.cjs"),z=require("@fangzhongya/utils/html/getVueText"),p=require("./common.cjs"),F=require("@fangzhongya/utils/basic/object/mergeObject");require("@fangzhongya/utils/basic/array/toggleArray");const T=require("@fangzhongya/utils/name/humpToLine"),v=require("@fangzhongya/utils/name/lineToLargeHump");require("@fangzhongya/utils/basic/string/appearNum");const A=require("@fangzhongya/utils/basic/string/firstLower"),D=require("@fangzhongya/utils/basic/array/duplicateRemoval"),W=require("@fangzhongya/utils/basic/array/asyncMergeArray");require("@fangzhongya/utils/basic/string/firstUpper");const h=require("@fangzhongya/utils/urls/getSuffix");require("@fangzhongya/utils/basic/array/replaceAfter");const J=require("./index.cjs"),w={},R={},M=[],$={},j={},m={};function Q(){return S.getConfig("example")}function X(t,e,n,r){const a=F.mergeObject(e,n||{},3,!0);a.exampless=a.exampless||[],a.examplessRaw=a.examplessRaw||[];const s=[],i=a.examples;i&&Object.keys(i).forEach(o=>{s.push(o),j[o]=i[o]});const l=a.examplesRaw,u=[];if(a.urls&&a.urls.length>0?(a.exampless=a.urls,a.urls.forEach(o=>{u.push(o),l&&(m[o]=N(l,o))})):(a.exampless=s,l&&Object.keys(l).forEach(o=>{u.push(o),m[o]=N(l,o)})),a.examples=void 0,e.tests&&r){const o=e.testsNanme||"/tests/";typeof o=="string"?Object.keys(r).forEach(f=>{f.includes(o)&&(a.exampless.push(f),u.push(f),m[f]=N(r,f))}):Object.keys(r).forEach(f=>{o.test(f)&&(a.exampless.push(f),u.push(f),m[f]=N(r,f))})}a.exampless=[...new Set(a.exampless)],a.examplessRaw=[...new Set(u)],a.examplesRaw=void 0,$[t]=a}function N(t,e){return typeof t=="function"?t:t&&(t[e]||t)}const q={};function Y(t){const e=S.getConfig("resolve");if(q[t])return q[t];for(let n of e)if(t.startsWith(n.find+"/")){const a=n.replacement.replaceAll("\\","/")+t.replace(n.find+"/","/");return q[t]=a,a}}async function Z(t,e){let n="";if(e=="vue"?n=z.getVueText(t).script:(e=="js"||e=="ts"||e=="")&&(n=t),n){const r=await J.getTextImport(n),a=[];return r&&r.length>0&&r.forEach(s=>{if(s)if(s.startsWith("./")||s.startsWith("../"))a.push(s);else{const i=Y(s);i&&a.push(i)}}),a}}function _(t){return new Promise(e=>{t?t.raw?e(t.raw):t.getRaw?t.getRaw(t).then(n=>{const r=C(n);t.raw=r,t.getRaw=null,e(r)}):e(""):e("")})}function K(t,e){t=(t||"")+"";let n="";switch(t){case"1":n=e.tdir+"/";break;case"2":n=e.adir+"/";break;case"3":n=e.tdir+"/"+e.adir+"/";break}return n}function y(t,e,n){t=(t||"")+"",n=(n||"")+"";let r=T.humpToLine(e.name),a=[];t==="1"?e.alias&&a.push(e.alias+"-"+r):t==="3"?e.alias&&e.alias+"":t==="4"?e.aliasNames?.forEach(i=>{a.push(T.humpToLine(i))}):t=="9"&&(a.push(r),e.aliasNames?.forEach(i=>{a.push(T.humpToLine(i))})),a.length==0&&a.push(r);let s=[];return n==="1"?a.forEach(i=>{let l=v.lineToLargeHump(i);s.push(l,A.firstLower(l))}):n==="2"?a.forEach(i=>{let l=v.lineToLargeHump(i);s.push(i,l,A.firstLower(l))}):s=[...a],s=[...new Set(s)],s}function k(t,e,n,r){const a=[];return n.examplessRaw.forEach(s=>{for(let i=0;i<e.length;i++){const l=e[i];if(s==t+l+n.md+".md"){a.push({cwd:n.cwd||r.cwd,topurl:t,comkey:r.key,suffix:h.getSuffix(s),name:r.name,value:l,key:s,raw:"",getRaw:p.getRawValue(m,s)});break}}}),a}function P(t){O();const e=w[t];if(e.tests&&Object.keys(e.tests).length>0)return e.tests;{const n=$[e.dir],r=n.dir+K(n.level||0,e),a=y(n.aliaslevel||0,e,n.componentName||0);e.mds=k(r,a,n,e);const s={};return n.exampless.forEach(i=>{for(let l=0;l<a.length;l++){const u=a[l];if(i.startsWith(r+u+"/")){const o=new RegExp("/([^/]+)/index\\."+p.defaultExtensions.join("|")+"$"),f=new RegExp("/([^/]+)\\."+p.defaultExtensions.join("|")+"$");let c=i.match(o)||i.match(f);if(c&&c.length>0){let g="";c&&c.length>1&&(g=c[1]),s[i]={topurl:r,name:u,value:g,suffix:h.getSuffix(i),comname:e.name,comkey:e.key,cwd:n.cwd||e.cwd,key:i,dir:e.dir,url:i,component:j[i],raw:"",getRaw:p.getRawValue(m,i)};break}}}}),n.tests&&ee(s,e,n),e.tests=s,s}}function ee(t,e,n){const r=e.url.substring(0,e.url.lastIndexOf("/"+e.value+"/"))+"/"+e.value,a=n.testsNanme||"/tests/";typeof a=="string"?n.examplessRaw.forEach(s=>{if(s.startsWith(r+"/")){if(s==r+n.md+".md")e.mds=e.mds||[],e.mds.push({cwd:e.cwd,topurl:r,comkey:e.key,suffix:h.getSuffix(s),name:e.name,value:e.value,key:s,raw:"",getRaw:p.getRawValue(m,s)});else if(s.startsWith(r+a)){const i=new RegExp("/([^/]+)/index\\."+p.defaultExtensions.join("|")+"$"),l=new RegExp("/([^/]+)\\."+p.defaultExtensions.join("|")+"$");let u=s.match(i)||s.match(l);if(u&&u[1]){let o="";u&&u.length>1&&(o=u[1]),t[s]={topurl:r,name:e.value,value:o,suffix:h.getSuffix(s),comname:e.name,comkey:e.key,cwd:n.cwd||e.cwd,key:s,dir:e.dir,url:s,component:j[s],raw:"",getRaw:p.getRawValue(m,s)}}}}}):n.examplessRaw.forEach(s=>{if(s.startsWith(r+"/")){if(s==r+n.md+".md")e.mds=e.mds||[],e.mds.push({cwd:e.cwd,topurl:r,comkey:e.key,suffix:h.getSuffix(s),name:e.name,value:e.value,key:s,raw:"",getRaw:p.getRawValue(m,s)});else if(a.test(s)){const i=new RegExp("/([^/]+)/index\\."+p.defaultExtensions.join("|")+"$"),l=new RegExp("/([^/]+)\\."+p.defaultExtensions.join("|")+"$");let u=s.match(i)||s.match(l);if(u&&u.length>0){let o="";u&&u.length>1&&(o=u[1]),t[s]={cwd:n.cwd||e.cwd,topurl:r,name:e.value,value:o,suffix:h.getSuffix(s),comname:e.name,comkey:e.key,key:s,dir:e.dir,url:s,component:j[s],raw:"",getRaw:p.getRawValue(m,s)}}}}})}function te(t){if(t){const e=P(t);return Object.values(e)}else return[]}function se(t,e,n){O();const r=P(n),a=[];if(e){let s=r[e];if(s)return a.push(s),a}return Object.values(r).forEach(s=>{s.name+"/"+s.value==t&&a.push(s)}),a}function ne(t){return P(t),w[t].mds}async function U(t,e,n){let r=t.key,a=t.dir,s=t.url,i=t.comprops,l=t.curprops,u=await Z(e,n||t.suffix)||[],o=s.split("/");return u.map(f=>{if(f.startsWith("./")){let c=o.slice(0,o.length-1).join("/"),g=f.substring(2);const d=c.replace(/^\.\/|((\.\.\/)+)/,"/");let x=r.indexOf(d)+d.length;return{key:r.substring(0,x)+"/"+g,name:f,cwd:t.cwd,comprops:i,curprops:l,value:g,suffix:h.getSuffix(f),head:c,dir:a,url:c+"/"+g}}else if(f.startsWith("../")){let c=f.split("/"),g=0;for(let L=0;L<c.length;L++)if(c[L]!=".."){g=L;break}let d=c.slice(g,c.length),x=o.slice(0,o.length-g-1).join("/"),E=d.join("/");const b=x.replace(/^\.\/|((\.\.\/)+)/,"/");let G=r.indexOf(b)+b.length;return{key:r.substring(0,G)+"/"+E,name:E,cwd:t.cwd,comprops:i,curprops:l,value:E,suffix:h.getSuffix(f),head:x,dir:a,url:x+"/"+E}}else{const c=a.replace(/^\.\/|((\.\.\/)+)/,"/");let g=f.indexOf(c)+c.length,d=f.substring(g),x=a.substring(0,a.length-1);return{key:f,name:d,comprops:i,curprops:l,value:d,suffix:h.getSuffix(f),head:x,dir:a,cwd:t.cwd,url:x+"/"+d}}})}function re(t){return new Promise(e=>{if(t&&t.length>0){let n=t.map(r=>({...r,raw:"",suffix:h.getSuffix(r.key),getRaw:p.getRawValue(m,r.key)}));W.asyncMergeArray(n,(r,a,s,i)=>{s.raw?r():s.getRaw?s.getRaw(s).then(l=>{const u=C(l);s.raw=u,s.getRaw=null,r()}):r()}).then(()=>{e(n)})}else e([])})}function ae(){const t=Q();S.getConfig("components")?.forEach(n=>{const r=oe(n);let a=n.dir||"";X(a,t,n.example,r)})}const I="default";function ie(t){let e=T.humpToLine(t.name),n=[...t.aliasNames];n.push(e),n.forEach(r=>{M.push({name:r,value:t.key})})}function le(t,e){e?.forEach(n=>{w[n.key]=n,ie(n)})}function oe(t){let e,n;const r=t.resolver;r&&Object.keys(r).forEach(s=>{typeof t[s]>"u"&&(t[s]=r[s])}),e=t.alias||I;let a=t?.urls||Object.keys(t.componentsRaw);return n=p.getComponentsArr(a,t,t.componentsRaw,t.components),n&&n?.props&&n.props.forEach(s=>{R[s.url]=s}),le(e,n.components),t.componentsRaw}function ue(t){return O(),w[t]}function O(){return Object.keys(w).length==0&&ae(),Object.values(w)}function fe(){return O(),R}function ce(t,e,n){O();const r=[];if(n){let s=w[n];if(s&&s.key)return[s]}let a=T.humpToLine(t);return M.forEach(s=>{e?s.name.includes(a)&&r.push(w[s.value]):s.name==a&&r.push(w[s.value])}),D.duplicateRemoval(r,"key")}function pe(t){const e=t.url,n=t.key;return R[e]||R[e+".js"]||R[e+".ts"]||R[n]||R[n+".js"]||R[n+".ts"]}function H(t){return new Promise(e=>{if(t&&t.length>0){let n=t.map(r=>pe(r)).filter(r=>!!r);W.asyncMergeArray(n,(r,a,s,i)=>{s.raw?r():s.getRaw?s.getRaw(s).then(async l=>{const u=C(l);s.raw=await B(u,t[i]),s.getRaw=null,r()}):r()}).then(()=>{e(n)})}else e([])})}const V=`
|
|
2
2
|
fangzhongya@vue-archive@glob@vue-archive@fangzhongya
|
|
3
3
|
`;function ge(t){const e=t.split(V);return[...new Set(e)].join(`
|
|
4
4
|
`)}async function me(t){return((await H(t))?.map(r=>r.raw)||[]).filter(r=>!!r).join(V)}async function B(t,e){if(t){if(t=`/**${e.url}**/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getConfig as v } from "../config.js";
|
|
2
|
-
import {
|
|
2
|
+
import { getVueText as B } from "@fangzhongya/utils/html/getVueText";
|
|
3
3
|
import { getRawValue as R, isComprops as z, isCurprops as F, getComponentsArr as G, defaultExtensions as E } from "./common.js";
|
|
4
4
|
import { mergeObject as H } from "@fangzhongya/utils/basic/object/mergeObject";
|
|
5
5
|
import "@fangzhongya/utils/basic/array/toggleArray";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fangzhongya/vue-archive",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.13",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description ": "vue 组件注释生成文档",
|
|
7
7
|
"author": "fangzhongya ",
|
|
@@ -24,37 +24,37 @@
|
|
|
24
24
|
"@codemirror/lang-javascript": "^6.2.4",
|
|
25
25
|
"@codemirror/lang-json": "^6.0.2",
|
|
26
26
|
"@codemirror/state": "^6.5.4",
|
|
27
|
-
"@codemirror/view": "^6.39.
|
|
27
|
+
"@codemirror/view": "^6.39.12",
|
|
28
28
|
"@fangzhongya/create": "0.2.50",
|
|
29
|
-
"@fangzhongya/utils": "0.0.
|
|
29
|
+
"@fangzhongya/utils": "0.0.80",
|
|
30
30
|
"@fangzhongya/vue-components": "0.1.29",
|
|
31
31
|
"@highlightjs/vue-plugin": "^2.1.0",
|
|
32
|
-
"@types/node": "^25.0
|
|
33
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
32
|
+
"@types/node": "^25.2.0",
|
|
33
|
+
"@vitejs/plugin-vue": "^6.0.4",
|
|
34
34
|
"@vue/compiler-dom": "3.5.27",
|
|
35
35
|
"@vue/compiler-sfc": "3.5.27",
|
|
36
36
|
"@vue/runtime-dom": "3.5.27",
|
|
37
37
|
"@vue/server-renderer": "3.5.27",
|
|
38
38
|
"codemirror": "^6.0.2",
|
|
39
39
|
"fast-glob": "^3.3.3",
|
|
40
|
-
"sass": "^1.97.
|
|
40
|
+
"sass": "^1.97.3",
|
|
41
41
|
"ts-node": "^10.9.2",
|
|
42
42
|
"tsup": "^8.5.1",
|
|
43
43
|
"typescript": "^5.9.3",
|
|
44
44
|
"unplugin-vue-components": "^31.0.0",
|
|
45
45
|
"vite": "^7.3.1",
|
|
46
46
|
"vite-plugin-dts": "4.5.4",
|
|
47
|
-
"vitest": "^4.0.
|
|
48
|
-
"vue-tsc": "^3.2.
|
|
47
|
+
"vitest": "^4.0.18",
|
|
48
|
+
"vue-tsc": "^3.2.4"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"comment-parser": "^1.4.
|
|
51
|
+
"comment-parser": "^1.4.5",
|
|
52
52
|
"highlight.js": "^11.11.1",
|
|
53
53
|
"markdown-it": "^14.1.0",
|
|
54
54
|
"monaco-editor": "^0.55.1",
|
|
55
|
-
"prettier": "^3.8.
|
|
55
|
+
"prettier": "^3.8.1",
|
|
56
56
|
"vue": "^3.5.27",
|
|
57
|
-
"vue-router": "^
|
|
57
|
+
"vue-router": "^5.0.2"
|
|
58
58
|
},
|
|
59
59
|
"types": "./dist/packages/index.d.ts",
|
|
60
60
|
"main": "./dist/packages/index.cjs",
|