@fangzhongya/vue-archive 0.0.2-21 → 0.0.2-22

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.
Files changed (58) hide show
  1. 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
  2. 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
  3. 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
  4. 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
  5. package/dist/es/node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js +18 -0
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. package/dist/es/packages/components/code/index.vue.js +17 -18
  12. package/dist/es/packages/components/use/index.js +1 -1
  13. package/dist/es/packages/components/use/retrie/choice/index.vue.js +1 -1
  14. package/dist/es/packages/components/use/set-code.vue.js +3 -3
  15. package/dist/es/packages/config.d.ts +2 -0
  16. package/dist/es/packages/config.js +1 -1
  17. package/dist/es/packages/index.d.ts +0 -1
  18. package/dist/es/packages/index.js +5 -7
  19. package/dist/es/packages/utils/common.js +66 -66
  20. package/dist/es/packages/utils/glob.d.ts +1 -1
  21. package/dist/es/packages/utils/glob.js +150 -122
  22. package/dist/es/packages/utils/index.d.ts +2 -1
  23. package/dist/es/packages/utils/index.js +16 -13
  24. 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
  25. 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
  26. 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
  27. 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
  28. package/dist/lib/node_modules/.pnpm/@fangzhongya_utils@0.0.7-16/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js +1 -0
  29. 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
  30. 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
  31. 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
  32. 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
  33. 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
  34. package/dist/lib/packages/components/code/index.vue.js +1 -1
  35. package/dist/lib/packages/components/use/index.js +1 -1
  36. package/dist/lib/packages/components/use/retrie/choice/index.vue.js +1 -1
  37. package/dist/lib/packages/components/use/set-code.vue.js +1 -1
  38. package/dist/lib/packages/config.d.ts +2 -0
  39. package/dist/lib/packages/config.js +1 -1
  40. package/dist/lib/packages/index.d.ts +0 -1
  41. package/dist/lib/packages/index.js +1 -1
  42. package/dist/lib/packages/utils/common.js +1 -1
  43. package/dist/lib/packages/utils/glob.d.ts +1 -1
  44. package/dist/lib/packages/utils/glob.js +2 -2
  45. package/dist/lib/packages/utils/index.d.ts +2 -1
  46. package/dist/lib/packages/utils/index.js +1 -1
  47. package/dist/node/index.cjs +17975 -0
  48. package/dist/node/index.d.ts +110 -0
  49. package/dist/node/index.js +17975 -0
  50. package/package.json +10 -8
  51. package/dist/es/node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js +0 -6
  52. package/dist/es/node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-XQB2HUHZ.js +0 -18
  53. package/dist/es/packages/node/index.d.ts +0 -2
  54. package/dist/es/packages/node/index.js +0 -155
  55. package/dist/lib/node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js +0 -1
  56. package/dist/lib/node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-XQB2HUHZ.js +0 -1
  57. package/dist/lib/packages/node/index.d.ts +0 -2
  58. package/dist/lib/packages/node/index.js +0 -1
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-21",
4
+ "version": "0.0.2-22",
5
5
  "type": "module",
6
6
  "description ": "vue 组件注释生成文档",
7
7
  "author": "fangzhongya ",
@@ -19,13 +19,14 @@
19
19
  },
20
20
  "devDependencies": {
21
21
  "@fangzhongya/create": "0.2.3-6",
22
- "@fangzhongya/utils": "0.0.7-15",
22
+ "@fangzhongya/utils": "0.0.7-16",
23
23
  "@fangzhongya/vue-components": "0.1.3-8",
24
24
  "@highlightjs/vue-plugin": "^2.1.0",
25
25
  "@types/node": "^18.14.0",
26
26
  "@vitejs/plugin-vue": "^4.0.0",
27
27
  "comment-parser": "^1.3.1",
28
28
  "es-module-lexer": "^1.1.1",
29
+ "fast-glob": "^3.2.12",
29
30
  "highlight.js": "^11.7.0",
30
31
  "markdown-it": "^13.0.1",
31
32
  "prettier": "^2.8.4",
@@ -33,12 +34,12 @@
33
34
  "tsup": "^6.6.3",
34
35
  "typescript": "^4.9.5",
35
36
  "unplugin-vue-components": "^0.24.0",
36
- "vite": "^4.1.3",
37
+ "vite": "^4.1.4",
37
38
  "vite-plugin-dts": "2.0.0-beta.3",
38
39
  "vitest": "^0.28.5",
39
40
  "vue": "^3.2.47",
40
41
  "vue-router": "^4.1.6",
41
- "vue-tsc": "^1.1.5"
42
+ "vue-tsc": "^1.1.6"
42
43
  },
43
44
  "main": "./dist/lib/packages/index.js",
44
45
  "module": "./dist/es/packages/index.js",
@@ -57,9 +58,9 @@
57
58
  "exports": {
58
59
  "./*": "./*",
59
60
  "./ndoe/index": {
60
- "require": "./dist/lib/packages/ndoe/index.js",
61
- "import": "./dist/es/packages/ndoe/index.js",
62
- "types": "./dist/es/packages/ndoe/index.d.ts"
61
+ "require": "./dist/ndoe/index.js",
62
+ "import": "./dist/ndoe/index.js",
63
+ "types": "./dist/ndoe/index.d.ts"
63
64
  },
64
65
  ".": {
65
66
  "require": "./dist/lib/packages/index.js",
@@ -74,8 +75,9 @@
74
75
  "dev:tests": "ts-node node.tests.ts",
75
76
  "build": "vue-tsc && vite build",
76
77
  "pub": "pnpm publish --access public --no-git-checks",
77
- "all": "pnpm build & pnpm dev:v & pnpm pub",
78
+ "all": "pnpm build:all & pnpm dev:v & pnpm pub",
78
79
  "build:tsup": "tsup",
80
+ "build:all": "pnpm build & pnpm build:tsup",
79
81
  "preview": "vite preview",
80
82
  "test": "vitest test"
81
83
  }
@@ -1,6 +0,0 @@
1
- function t(r) {
2
- return Object.prototype.toString.call(r) == "[object Array]";
3
- }
4
- export {
5
- t as isArray
6
- };
@@ -1,18 +0,0 @@
1
- function s(e, r) {
2
- return new Promise((t, o) => {
3
- let n = 0;
4
- const c = e.length;
5
- e.forEach((...i) => {
6
- r(
7
- (...f) => {
8
- n++, c == n && t(f);
9
- },
10
- o,
11
- ...i
12
- );
13
- });
14
- });
15
- }
16
- export {
17
- s as asyncMergeArray
18
- };
@@ -1,2 +0,0 @@
1
- import type { Config } from '../config';
2
- export declare function nodeInit(c: Config): void;
@@ -1,155 +0,0 @@
1
- import { userConfig as D } from "../config.js";
2
- import { getNotes as $ } from "../components/test/index.js";
3
- import { asyncMergeArray as g } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-XQB2HUHZ.js";
4
- import { isArray as E } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js";
5
- import { getCompoNameObj as N, getKeyMds as T, getTestName as C, getLocalTextTests as b } from "../utils/glob.js";
6
- import { getNotes as M, tprops as O, temits as x, texpose as A, tslot as _ } from "../components/compo/index.js";
7
- import { getTopDom as d } from "../components/compo/top.js";
8
- let y;
9
- function S(o) {
10
- y = D(o), w();
11
- }
12
- function w() {
13
- N().forEach((o) => {
14
- H(o);
15
- });
16
- }
17
- function H(o) {
18
- U(o);
19
- }
20
- function I(o, t) {
21
- const s = C(o.key);
22
- g(s, (n, r, c, u) => {
23
- b(c).then((p) => {
24
- t.push("### 示例" + u);
25
- const { titles: h } = $(p), l = e(
26
- "div",
27
- {
28
- class: "compo-top"
29
- },
30
- d(h, e)
31
- );
32
- t.push(...m(l)), t.push(...L(o, c)), n();
33
- }).catch(() => {
34
- });
35
- }).then(() => {
36
- K();
37
- });
38
- }
39
- function K(o, t) {
40
- console.log(y.outDir);
41
- }
42
- function L(o, t) {
43
- const s = [];
44
- return console.log("key", t.key), s;
45
- }
46
- function m(o) {
47
- const t = [];
48
- return t.push("```html"), t.push(o), t.push("```"), t;
49
- }
50
- function U(o) {
51
- const t = [];
52
- t.push("# " + o.name), M(o.key).then((s) => {
53
- let { titles: n, propss: r, slots: c, emitss: u, exposes: p } = s;
54
- const h = e(
55
- "div",
56
- {
57
- class: "compo-top"
58
- },
59
- d(n, e)
60
- );
61
- t.push(...m(h));
62
- const l = [
63
- ...a(r, "组件属性", O),
64
- ...a(u, "组件事件", x),
65
- ...a(u, "组件方法", A),
66
- ...a(c, "组件插槽", _)
67
- ];
68
- t.push(...l), t.push("## 说明文档");
69
- const f = T(o.key) || [];
70
- g(f, (i, q, j) => {
71
- b(j).then((k) => {
72
- t.push(k), i();
73
- }).catch(() => {
74
- });
75
- }).then(() => {
76
- t.push("## 示例"), I(o, t);
77
- });
78
- });
79
- }
80
- function V(o, t, s, n) {
81
- return t.formatter ? t.formatter(o, t, s, n) : t.prop ? o[t.prop] : "";
82
- }
83
- function a(o, t, s) {
84
- const n = [], r = [];
85
- s.forEach((p) => {
86
- r.push(e("th", {}, [p == null ? void 0 : p.label]));
87
- });
88
- let c;
89
- o && o.length > 0 ? (c = [], o.forEach((p, h) => {
90
- const l = [];
91
- s.forEach((f, i) => {
92
- r.push(
93
- e("td", {}, [
94
- V(
95
- p,
96
- f,
97
- h,
98
- i
99
- )
100
- ])
101
- );
102
- }), c.push(
103
- e(
104
- "tr",
105
- { class: "compo-talbe-li" },
106
- l
107
- )
108
- );
109
- })) : c = [
110
- e(
111
- "tr",
112
- {
113
- class: "compo-talbe-zw"
114
- },
115
- [
116
- e(
117
- "td",
118
- {
119
- colspan: "5"
120
- },
121
- ["暂无"]
122
- )
123
- ]
124
- )
125
- ];
126
- const u = e(
127
- "table",
128
- {
129
- class: "compo-talbe-body"
130
- },
131
- [
132
- e("thead", {}, [
133
- e(
134
- "tr",
135
- {
136
- class: "compo-talbe-top"
137
- },
138
- r
139
- )
140
- ]),
141
- e("tbody", {}, c)
142
- ]
143
- );
144
- return n.push(`## ${t}`), n.push(...m(u)), n;
145
- }
146
- function e(o, t, s) {
147
- E(s) && (s = s.join(""));
148
- const n = [];
149
- return t && Object.keys(t).forEach((r) => {
150
- n.push(r + '="' + t[r] + '"');
151
- }), `<${o} ${n.join(" ")}>${s || ""}</${o}>`;
152
- }
153
- export {
154
- S as nodeInit
155
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function t(r){return Object.prototype.toString.call(r)=="[object Array]"}exports.isArray=t;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function s(e,n){return new Promise((t,o)=>{let r=0;const c=e.length;e.forEach((...i)=>{n((...a)=>{r++,c==r&&t(a)},o,...i)})})}exports.asyncMergeArray=s;
@@ -1,2 +0,0 @@
1
- import type { Config } from '../config';
2
- export declare function nodeInit(c: Config): void;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../config.js"),D=require("../components/test/index.js"),y=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-XQB2HUHZ.js"),$=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-15/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js"),a=require("../utils/glob.js"),i=require("../components/compo/index.js"),b=require("../components/compo/top.js");let j;function E(e){j=q.userConfig(e),M()}function M(){a.getCompoNameObj().forEach(e=>{x(e)})}function x(e){O(e)}function A(e,t){const o=a.getTestName(e.key);y.asyncMergeArray(o,(n,c,r,p)=>{a.getLocalTextTests(r).then(u=>{t.push("### 示例"+p);const{titles:l}=D.getNotes(u),h=s("div",{class:"compo-top"},b.getTopDom(l,s));t.push(...d(h)),t.push(...N(e,r)),n()}).catch(()=>{})}).then(()=>{C()})}function C(e,t){console.log(j.outDir)}function N(e,t){const o=[];return console.log("key",t.key),o}function d(e){const t=[];return t.push("```html"),t.push(e),t.push("```"),t}function O(e){const t=[];t.push("# "+e.name),i.getNotes(e.key).then(o=>{let{titles:n,propss:c,slots:r,emitss:p,exposes:u}=o;const l=s("div",{class:"compo-top"},b.getTopDom(n,s));t.push(...d(l));const h=[...f(c,"组件属性",i.tprops),...f(p,"组件事件",i.temits),...f(p,"组件方法",i.texpose),...f(r,"组件插槽",i.tslot)];t.push(...h),t.push("## 说明文档");const g=a.getKeyMds(e.key)||[];y.asyncMergeArray(g,(m,S,T)=>{a.getLocalTextTests(T).then(k=>{t.push(k),m()}).catch(()=>{})}).then(()=>{t.push("## 示例"),A(e,t)})})}function H(e,t,o,n){return t.formatter?t.formatter(e,t,o,n):t.prop?e[t.prop]:""}function f(e,t,o){const n=[],c=[];o.forEach(u=>{c.push(s("th",{},[u==null?void 0:u.label]))});let r;e&&e.length>0?(r=[],e.forEach((u,l)=>{const h=[];o.forEach((g,m)=>{c.push(s("td",{},[H(u,g,l,m)]))}),r.push(s("tr",{class:"compo-talbe-li"},h))})):r=[s("tr",{class:"compo-talbe-zw"},[s("td",{colspan:"5"},["暂无"])])];const p=s("table",{class:"compo-talbe-body"},[s("thead",{},[s("tr",{class:"compo-talbe-top"},c)]),s("tbody",{},r)]);return n.push(`## ${t}`),n.push(...d(p)),n}function s(e,t,o){$.isArray(o)&&(o=o.join(""));const n=[];return t&&Object.keys(t).forEach(c=>{n.push(c+'="'+t[c]+'"')}),`<${e} ${n.join(" ")}>${o||""}</${e}>`}exports.nodeInit=E;