@fangzhongya/vue-archive 0.1.10 → 0.1.12
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 +63 -36
- package/dist/node/index.js +63 -36
- 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/highlight.vue2.cjs +1 -1
- package/dist/packages/components/code/highlight.vue2.js +1 -1
- 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/annotat.cjs +1 -1
- package/dist/packages/utils/annotat.js +1 -0
- package/package.json +19 -19
- /package/dist/node_modules/.pnpm/{@highlightjs_vue-plugin@2.1_088738b011f896e680b57492efece010 → @highlightjs_vue-plugin@2.1_09b7e5d2c19325dc414e3a91415b2e91}/node_modules/@highlightjs/vue-plugin/dist/highlightjs-vue.esm.min.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@highlightjs_vue-plugin@2.1_088738b011f896e680b57492efece010 → @highlightjs_vue-plugin@2.1_09b7e5d2c19325dc414e3a91415b2e91}/node_modules/@highlightjs/vue-plugin/dist/highlightjs-vue.esm.min.js +0 -0
|
@@ -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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("comment-parser"),q=require("@fangzhongya/utils/basic/string/firstLower"),p={titles:[],propss:[],slots:[],emitss:[],exposes:[]};function w(){Object.keys(p).forEach(e=>{p[e]=[]})}function S(e,r){let t=e.charAt(0),n=[['"','"'],["'","'"],["`","`"],["(",")"],["{","}"],["[","]"]];const s=n.map(i=>i[0]);let l=s.indexOf(t);if(l!=-1){let i=[t];for(let o=1;o<e.length;o++){if(t=e[o],l=s.indexOf(t),l!=-1)l>2?i.push(t):i[i.length-1]===t?i.pop():i.push(t);else{let u=!1;for(let a of n)if(t===a[1]&&i[i.length-1]===a[0]){u=!0;break}u&&i.pop()}if(i.length===0)return r&&e[o+1]===" ",e.substring(0,o+1)}}else return r?e.substring(0,e.indexOf(" ")):e}function A(e){delete e.problems,delete e.source;let r=e.tag,t=e.name,n=e.description,s=e.default,l="",i="";if(r=="default")t=t.trim(),t=S(t)||t;else if(r=="selectable")t=t.trim();else{const o=e.name.indexOf("=");if(o!=-1){const m=t.substring(0,o),d=t.substring(o+1);t=m;const T=d+" "+n,f=S(T,!0);f?(n=T.replace(f,""),f.startsWith("(")?s=f.substring(1,f.length-1):s=f):s=e.default||d||""}const a=/\s*\((.*)\)\s*/gi.exec(n);a&&a.length>0&&(l=a[1],n=n.replace(a[0],""))}return t.endsWith("*")&&(i="*",t=t.substring(0,t.length-1)),e.name=t,e.required=i,e.default=s||"",e.description=n,e.selectable=l,e}function P(e){let r=["title","text","author","date"],t=b(e),n={};r.forEach(s=>{n[s]=t.obj[s]}),E(n),t.arr.forEach(s=>{y(s.key,s.value)})}function E(e){p.titles.push(e)}function v(e){let r=["props","name","type","default","required","selectable","description","descriptions","model","return"],t=b(e),n={};r.forEach(s=>{n[s]=t.obj[s]}),g(n,"props"),t.arr.forEach(s=>{y(s.key,s.value)})}function F(e){let r=["slot","name","selectable","description","descriptions"],t=b(e),n={};r.forEach(s=>{n[s]=t.obj[s]}),g(n,"slot"),t.arr.forEach(s=>{y(s.key,s.value)})}function B(e){let r=["emits","name","selectable","description","descriptions"],t=b(e),n={};r.forEach(s=>{n[s]=t.obj[s]}),g(n,"emits"),t.arr.forEach(s=>{y(s.key,s.value)})}function I(e){let r=["expose","name","type","return","selectable","description","descriptions"],t=b(e),n={};r.forEach(s=>{n[s]=t.obj[s]}),g(n,"expose"),t.arr.forEach(s=>{y(s.key,s.value)})}function g(e,r){const t=p[r+"name"]||[],n=e.name??e[r]?.name,s=t.indexOf(n);s>=0&&(p[r+"s"].splice(s,1),t.splice(s,1)),p[r+"s"].push(e),t.push(n),p[r+"name"]=t}function b(e,r){const t={descriptions:e?.description||""},n=[];return e?.tags&&e.tags?.forEach(s=>{let l=s.tag,i=A(s);if(!t.hasOwnProperty(l))t[l]=i;else{const o={};o[l]=i,n.push({key:l,value:o})}}),{arr:n,obj:t}}function y(e,r){switch(e){case"title":return E(r),!0;case"text":return E(r),!0;case"props":return g(r,"props"),!0;case"slot":return g(r,"slot"),!0;case"emits":return g(r,"emits"),!0;case"expose":return g(r,"expose"),!0;default:return!1}}function J(e,r){switch(e){case"title":return P(r),!0;case"props":return v(r),!0;case"slot":return F(r),!0;case"emits":return B(r),!0;case"expose":return I(r),!0;default:return!1}}function L(e){return w(),e?.forEach(r=>{let t=r?.tags||[],n=t?.length||0;if(n>0)for(let s=0;s<n;s++){const l=t[s]||{};if(J(l.tag,r))break}}),JSON.parse(JSON.stringify(p))}function W(e){if(e)return j.parse(e)}function M(e){let r=W(e);return L(r)}const z=["Boolean","Any","String","Number","Array","Object","Function"];function _(e){return z.includes(e)?q.firstLower(e):e}const C=e=>{let r=[],t=!1,n=!1,s=0;for(let l=0;l<e.length;l++){const i=e[l];if(i==="["||i==="<"||i==="("?(n=!0,r.push(i),i=="["&&(t=!0),s==0&&(s=l)):(i==="]"&&r[r.length-1]==="["||i===">"&&r[r.length-1]==="<"||i===")"&&r[r.length-1]==="(")&&r.pop(),n&&r.length===0)return t&&s+1==l?{top:"Array",type:e.substring(0,s)}:{top:e.substring(0,s),type:e.substring(s+1,l)}}return{top:e,type:""}},x=(e,r)=>{let t=[],n=[],s="";for(let l=0;l<e.length;l++){const i=e[l];i==="["||i==="<"||i==="("?(t.push(i),s+=i):i==="]"&&t.length>0&&t[t.length-1]==="["||i===">"&&t.length>0&&t[t.length-1]==="<"||i===")"&&t.length>0&&t[t.length-1]==="("?(t.pop(),s+=i):i===r&&t.length===0?(n.push(s.trim()),s=""):s+=i}return s.trim()!==""&&n.push(s.trim()),n};function G(e){let r="";return typeof e=="string"?r=e:r=e.value,_(r||"any")}function N(e){const r=e[0]||"any";return G(r)}const O=e=>{if(e)if(e.startsWith("[")&&e.endsWith("]")||e.startsWith("(")&&e.endsWith(")")){const r=e.slice(1,-1).trim();return r?x(r,","):["any"]}else{if(e.startsWith("{")&&e.endsWith("}"))return["Object"];if(e.startsWith("<")&&e.endsWith(">")){const r=e.slice(1,-1).trim();return r?x(r,"|"):["any"]}else return x(e,",")}else return["any"]};function k(e){const r=[];return e.forEach(t=>{const n=C(t);if(n.type){const s=O(n.type),l=k(s);r.push({label:t,value:n.top,children:l})}else r.push(n.top)}),r}function H(e){return x(e,",").map(t=>{const n=t.trim(),s=t.match(/^([^:?]+)(\??):/);if(!s)return null;const l=s[1].trim(),i=!s[2],o=s[0].length,u=t.substring(o).trim();let a=[],m="",d="";for(let h=0;h<u.length;h++){const c=u[h];if(c==="["||c==="<"||c==="("||c==="{"?a.push(c):(c==="]"&&a[a.length-1]==="["||c===">"&&a[a.length-1]==="<"||c==="}"&&a[a.length-1]==="{"||c===")"&&a[a.length-1]==="(")&&a.pop(),a.length===0&&h>0){h==1&&c!=="]"&&c!==">"&&c!=="}"&&c!==")"?(m="",d=u.substring(0)):(m=u.substring(0,h+1).trim(),d=u.substring(h+1));break}}const T=O(m),f=k(T);return{name:l,prop:l,type:N(f),dataType:f,must:i,label:n,description:d}}).filter(Boolean)}exports.getDataType=k;exports.getDataTypeType=N;exports.getNotesText=M;exports.getTextNotes=W;exports.parseParamString=H;exports.parseTypeDefinition=O;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("comment-parser"),q=require("@fangzhongya/utils/basic/string/firstLower"),p={titles:[],propss:[],slots:[],emitss:[],exposes:[]};function w(){Object.keys(p).forEach(e=>{p[e]=[]})}function S(e,r){let t=e.charAt(0),n=[['"','"'],["'","'"],["`","`"],["(",")"],["{","}"],["[","]"]];const s=n.map(i=>i[0]);let l=s.indexOf(t);if(l!=-1){let i=[t];for(let o=1;o<e.length;o++){if(t=e[o],l=s.indexOf(t),l!=-1)l>2?i.push(t):i[i.length-1]===t?i.pop():i.push(t);else{let u=!1;for(let a of n)if(t===a[1]&&i[i.length-1]===a[0]){u=!0;break}u&&i.pop()}if(i.length===0)return r&&e[o+1]===" ",e.substring(0,o+1)}}else return r?e.substring(0,e.indexOf(" ")):e}function A(e){delete e.problems,delete e.source;let r=e.tag,t=e.name,n=e.description,s=e.default,l="",i="";if(r=="default")t=t.trim(),t=S(t)||t;else if(r=="selectable")t=t.trim();else{const o=e.name.indexOf("=");if(o!=-1){const m=t.substring(0,o),d=t.substring(o+1);t=m;const T=d+" "+n,f=S(T,!0);f?(n=T.replace(f,""),f.startsWith("(")?s=f.substring(1,f.length-1):s=f):s=e.default||d||""}const a=/\s*\((.*)\)\s*/gi.exec(n);a&&a.length>0&&(l=a[1],n=n.replace(a[0],""))}return t.endsWith("*")&&(i="*",t=t.substring(0,t.length-1)),e.name=t,e.required=i,e.default=s||"",e.description=n,e.selectable=l,e}function P(e){let r=["title","state","text","author","date"],t=b(e),n={};r.forEach(s=>{n[s]=t.obj[s]}),E(n),t.arr.forEach(s=>{y(s.key,s.value)})}function E(e){p.titles.push(e)}function v(e){let r=["props","name","type","default","required","selectable","description","descriptions","model","return"],t=b(e),n={};r.forEach(s=>{n[s]=t.obj[s]}),g(n,"props"),t.arr.forEach(s=>{y(s.key,s.value)})}function F(e){let r=["slot","name","selectable","description","descriptions"],t=b(e),n={};r.forEach(s=>{n[s]=t.obj[s]}),g(n,"slot"),t.arr.forEach(s=>{y(s.key,s.value)})}function B(e){let r=["emits","name","selectable","description","descriptions"],t=b(e),n={};r.forEach(s=>{n[s]=t.obj[s]}),g(n,"emits"),t.arr.forEach(s=>{y(s.key,s.value)})}function I(e){let r=["expose","name","type","return","selectable","description","descriptions"],t=b(e),n={};r.forEach(s=>{n[s]=t.obj[s]}),g(n,"expose"),t.arr.forEach(s=>{y(s.key,s.value)})}function g(e,r){const t=p[r+"name"]||[],n=e.name??e[r]?.name,s=t.indexOf(n);s>=0&&(p[r+"s"].splice(s,1),t.splice(s,1)),p[r+"s"].push(e),t.push(n),p[r+"name"]=t}function b(e,r){const t={descriptions:e?.description||""},n=[];return e?.tags&&e.tags?.forEach(s=>{let l=s.tag,i=A(s);if(!t.hasOwnProperty(l))t[l]=i;else{const o={};o[l]=i,n.push({key:l,value:o})}}),{arr:n,obj:t}}function y(e,r){switch(e){case"title":return E(r),!0;case"text":return E(r),!0;case"props":return g(r,"props"),!0;case"slot":return g(r,"slot"),!0;case"emits":return g(r,"emits"),!0;case"expose":return g(r,"expose"),!0;default:return!1}}function J(e,r){switch(e){case"title":return P(r),!0;case"props":return v(r),!0;case"slot":return F(r),!0;case"emits":return B(r),!0;case"expose":return I(r),!0;default:return!1}}function L(e){return w(),e?.forEach(r=>{let t=r?.tags||[],n=t?.length||0;if(n>0)for(let s=0;s<n;s++){const l=t[s]||{};if(J(l.tag,r))break}}),JSON.parse(JSON.stringify(p))}function W(e){if(e)return j.parse(e)}function M(e){let r=W(e);return L(r)}const z=["Boolean","Any","String","Number","Array","Object","Function"];function _(e){return z.includes(e)?q.firstLower(e):e}const C=e=>{let r=[],t=!1,n=!1,s=0;for(let l=0;l<e.length;l++){const i=e[l];if(i==="["||i==="<"||i==="("?(n=!0,r.push(i),i=="["&&(t=!0),s==0&&(s=l)):(i==="]"&&r[r.length-1]==="["||i===">"&&r[r.length-1]==="<"||i===")"&&r[r.length-1]==="(")&&r.pop(),n&&r.length===0)return t&&s+1==l?{top:"Array",type:e.substring(0,s)}:{top:e.substring(0,s),type:e.substring(s+1,l)}}return{top:e,type:""}},x=(e,r)=>{let t=[],n=[],s="";for(let l=0;l<e.length;l++){const i=e[l];i==="["||i==="<"||i==="("?(t.push(i),s+=i):i==="]"&&t.length>0&&t[t.length-1]==="["||i===">"&&t.length>0&&t[t.length-1]==="<"||i===")"&&t.length>0&&t[t.length-1]==="("?(t.pop(),s+=i):i===r&&t.length===0?(n.push(s.trim()),s=""):s+=i}return s.trim()!==""&&n.push(s.trim()),n};function G(e){let r="";return typeof e=="string"?r=e:r=e.value,_(r||"any")}function N(e){const r=e[0]||"any";return G(r)}const O=e=>{if(e)if(e.startsWith("[")&&e.endsWith("]")||e.startsWith("(")&&e.endsWith(")")){const r=e.slice(1,-1).trim();return r?x(r,","):["any"]}else{if(e.startsWith("{")&&e.endsWith("}"))return["Object"];if(e.startsWith("<")&&e.endsWith(">")){const r=e.slice(1,-1).trim();return r?x(r,"|"):["any"]}else return x(e,",")}else return["any"]};function k(e){const r=[];return e.forEach(t=>{const n=C(t);if(n.type){const s=O(n.type),l=k(s);r.push({label:t,value:n.top,children:l})}else r.push(n.top)}),r}function H(e){return x(e,",").map(t=>{const n=t.trim(),s=t.match(/^([^:?]+)(\??):/);if(!s)return null;const l=s[1].trim(),i=!s[2],o=s[0].length,u=t.substring(o).trim();let a=[],m="",d="";for(let h=0;h<u.length;h++){const c=u[h];if(c==="["||c==="<"||c==="("||c==="{"?a.push(c):(c==="]"&&a[a.length-1]==="["||c===">"&&a[a.length-1]==="<"||c==="}"&&a[a.length-1]==="{"||c===")"&&a[a.length-1]==="(")&&a.pop(),a.length===0&&h>0){h==1&&c!=="]"&&c!==">"&&c!=="}"&&c!==")"?(m="",d=u.substring(0)):(m=u.substring(0,h+1).trim(),d=u.substring(h+1));break}}const T=O(m),f=k(T);return{name:l,prop:l,type:N(f),dataType:f,must:i,label:n,description:d}}).filter(Boolean)}exports.getDataType=k;exports.getDataTypeType=N;exports.getNotesText=M;exports.getTextNotes=W;exports.parseParamString=H;exports.parseTypeDefinition=O;
|
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.12",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description ": "vue 组件注释生成文档",
|
|
7
7
|
"author": "fangzhongya ",
|
|
@@ -23,38 +23,38 @@
|
|
|
23
23
|
"@codemirror/lang-html": "^6.4.11",
|
|
24
24
|
"@codemirror/lang-javascript": "^6.2.4",
|
|
25
25
|
"@codemirror/lang-json": "^6.0.2",
|
|
26
|
-
"@codemirror/state": "^6.5.
|
|
27
|
-
"@codemirror/view": "^6.39.
|
|
26
|
+
"@codemirror/state": "^6.5.4",
|
|
27
|
+
"@codemirror/view": "^6.39.12",
|
|
28
28
|
"@fangzhongya/create": "0.2.50",
|
|
29
|
-
"@fangzhongya/utils": "0.0.
|
|
30
|
-
"@fangzhongya/vue-components": "0.1.
|
|
29
|
+
"@fangzhongya/utils": "0.0.78",
|
|
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.
|
|
34
|
-
"@vue/compiler-dom": "3.5.
|
|
35
|
-
"@vue/compiler-sfc": "3.5.
|
|
36
|
-
"@vue/runtime-dom": "3.5.
|
|
37
|
-
"@vue/server-renderer": "3.5.
|
|
32
|
+
"@types/node": "^25.2.0",
|
|
33
|
+
"@vitejs/plugin-vue": "^6.0.4",
|
|
34
|
+
"@vue/compiler-dom": "3.5.27",
|
|
35
|
+
"@vue/compiler-sfc": "3.5.27",
|
|
36
|
+
"@vue/runtime-dom": "3.5.27",
|
|
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
|
-
"unplugin-vue-components": "^
|
|
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.
|
|
56
|
-
"vue": "^3.5.
|
|
57
|
-
"vue-router": "^
|
|
55
|
+
"prettier": "^3.8.1",
|
|
56
|
+
"vue": "^3.5.27",
|
|
57
|
+
"vue-router": "^5.0.2"
|
|
58
58
|
},
|
|
59
59
|
"types": "./dist/packages/index.d.ts",
|
|
60
60
|
"main": "./dist/packages/index.cjs",
|
|
File without changes
|