@fangzhongya/vue-archive 0.1.5 → 0.1.7
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/node/index.cjs +27 -20
- package/dist/node/index.d.cts +1 -1
- package/dist/node/index.d.ts +1 -1
- package/dist/node/index.js +27 -20
- package/dist/packages/node/index.d.ts +1 -1
- package/dist/packages/router/index.cjs +1 -1
- package/dist/packages/router/index.js +44 -44
- package/dist/packages/utils/annotat.d.ts +37 -0
- package/package.json +8 -8
package/dist/node/index.cjs
CHANGED
|
@@ -87,12 +87,12 @@ __export(index_exports, {
|
|
|
87
87
|
});
|
|
88
88
|
module.exports = __toCommonJS(index_exports);
|
|
89
89
|
|
|
90
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
90
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js
|
|
91
91
|
function isArray(obj2) {
|
|
92
92
|
return Object.prototype.toString.call(obj2) == "[object Array]";
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
95
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-A276ZDLP.js
|
|
96
96
|
function getStartSames(str, val) {
|
|
97
97
|
let s = "";
|
|
98
98
|
const vs = [...val];
|
|
@@ -108,7 +108,7 @@ function getStartSames(str, val) {
|
|
|
108
108
|
return [s, str.substring(index), val.substring(index)];
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
111
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-KDOS4NFR.js
|
|
112
112
|
function getImportUrl(url, imp) {
|
|
113
113
|
const arr = getStartSames(url, imp);
|
|
114
114
|
const ts2 = arr[0];
|
|
@@ -132,12 +132,12 @@ function getImportUrl(url, imp) {
|
|
|
132
132
|
return ds.join("") + arr[2].replace(/\\/g, "/");
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
135
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js
|
|
136
136
|
function firstUpper(str) {
|
|
137
137
|
return str.slice(0, 1).toUpperCase() + str.slice(1);
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
140
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js
|
|
141
141
|
function lineToLargeHump(name) {
|
|
142
142
|
let arr = name.split("-");
|
|
143
143
|
arr = arr.map((vs) => {
|
|
@@ -146,7 +146,7 @@ function lineToLargeHump(name) {
|
|
|
146
146
|
return arr.join("");
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
// node_modules/.pnpm/@fangzhongya+create@0.2.
|
|
149
|
+
// node_modules/.pnpm/@fangzhongya+create@0.2.50/node_modules/@fangzhongya/create/dist/chunk-36XULS54.js
|
|
150
150
|
var import_fs = require("fs");
|
|
151
151
|
var import_path = require("path");
|
|
152
152
|
function getUrlCatalogueObj(str) {
|
|
@@ -405,7 +405,7 @@ function writeFileUrl(url, files, callback, isDirs, isFile, issynch) {
|
|
|
405
405
|
});
|
|
406
406
|
}
|
|
407
407
|
|
|
408
|
-
// node_modules/.pnpm/@fangzhongya+create@0.2.
|
|
408
|
+
// node_modules/.pnpm/@fangzhongya+create@0.2.50/node_modules/@fangzhongya/create/dist/chunk-55GZI3ZZ.js
|
|
409
409
|
var import_path2 = require("path");
|
|
410
410
|
function styleLog(msg = "", obj2) {
|
|
411
411
|
const arr = ["\x1B[0m"];
|
|
@@ -827,7 +827,7 @@ var FangCom = class {
|
|
|
827
827
|
}
|
|
828
828
|
};
|
|
829
829
|
|
|
830
|
-
// node_modules/.pnpm/@fangzhongya+create@0.2.
|
|
830
|
+
// node_modules/.pnpm/@fangzhongya+create@0.2.50/node_modules/@fangzhongya/create/dist/bins/md.js
|
|
831
831
|
var defaultConfig2 = Object.assign({}, defaultConfig, {
|
|
832
832
|
name: "md"
|
|
833
833
|
});
|
|
@@ -846,7 +846,7 @@ function runDev(config2, configCallback) {
|
|
|
846
846
|
return new FangMd(config2, configCallback);
|
|
847
847
|
}
|
|
848
848
|
|
|
849
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
849
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-NCSN3MC5.js
|
|
850
850
|
var zObj = {
|
|
851
851
|
"<": "<",
|
|
852
852
|
">": ">",
|
|
@@ -867,7 +867,7 @@ function htmlEscape(str) {
|
|
|
867
867
|
// packages/node/index.ts
|
|
868
868
|
var import_node_path = require("path");
|
|
869
869
|
|
|
870
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
870
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js
|
|
871
871
|
function mergeObject(a, b, j = 0, i) {
|
|
872
872
|
if (a instanceof Array) {
|
|
873
873
|
if (j > 0 && i) {
|
|
@@ -921,7 +921,7 @@ function getConfig(key) {
|
|
|
921
921
|
return config[key];
|
|
922
922
|
}
|
|
923
923
|
|
|
924
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
924
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-7PJ2D3KR.js
|
|
925
925
|
function getVueText(content) {
|
|
926
926
|
const result = {
|
|
927
927
|
template: "",
|
|
@@ -968,7 +968,7 @@ function getVueTexts(content) {
|
|
|
968
968
|
};
|
|
969
969
|
}
|
|
970
970
|
|
|
971
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
971
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js
|
|
972
972
|
function humpToLine(name) {
|
|
973
973
|
const reg = /(([A-Z])([^A-Z]*))/g;
|
|
974
974
|
let result;
|
|
@@ -990,12 +990,12 @@ function humpToLine(name) {
|
|
|
990
990
|
}
|
|
991
991
|
}
|
|
992
992
|
|
|
993
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
993
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js
|
|
994
994
|
function firstLower(str) {
|
|
995
995
|
return str.slice(0, 1).toLowerCase() + str.slice(1);
|
|
996
996
|
}
|
|
997
997
|
|
|
998
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
998
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js
|
|
999
999
|
function asyncMergeArray(arr, callback) {
|
|
1000
1000
|
return new Promise((resolve2, reject) => {
|
|
1001
1001
|
let index = 0;
|
|
@@ -1019,7 +1019,7 @@ function asyncMergeArray(arr, callback) {
|
|
|
1019
1019
|
});
|
|
1020
1020
|
}
|
|
1021
1021
|
|
|
1022
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
1022
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-Z7NTQAAJ.js
|
|
1023
1023
|
function getSuffix2(url) {
|
|
1024
1024
|
const reg = /\.([a-z|A-Z][a-z|A-Z|0-9]*)$/;
|
|
1025
1025
|
const regs = reg.exec(url);
|
|
@@ -1029,7 +1029,7 @@ function getSuffix2(url) {
|
|
|
1029
1029
|
return "";
|
|
1030
1030
|
}
|
|
1031
1031
|
|
|
1032
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
1032
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-S6JRKYPY.js
|
|
1033
1033
|
function matchsStart2(key, matchs) {
|
|
1034
1034
|
if (matchs && matchs.length > 0) {
|
|
1035
1035
|
for (const value of matchs) {
|
|
@@ -1049,7 +1049,7 @@ function matchsStart2(key, matchs) {
|
|
|
1049
1049
|
}
|
|
1050
1050
|
}
|
|
1051
1051
|
|
|
1052
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
1052
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-YNOFNHEK.js
|
|
1053
1053
|
function matchsEnd2(key, matchs) {
|
|
1054
1054
|
if (matchs && matchs.length > 0) {
|
|
1055
1055
|
for (const value of matchs) {
|
|
@@ -1712,7 +1712,7 @@ function parse(source, options = {}) {
|
|
|
1712
1712
|
}
|
|
1713
1713
|
var stringify = getStringifier();
|
|
1714
1714
|
|
|
1715
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
1715
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-FS4JPT23.js
|
|
1716
1716
|
function deComment(code) {
|
|
1717
1717
|
let output = "";
|
|
1718
1718
|
let state = "code";
|
|
@@ -1804,7 +1804,7 @@ function deComment(code) {
|
|
|
1804
1804
|
return output;
|
|
1805
1805
|
}
|
|
1806
1806
|
|
|
1807
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
1807
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-N5Y3XGHX.js
|
|
1808
1808
|
function getImports(code, includeType = false) {
|
|
1809
1809
|
code = deComment(code);
|
|
1810
1810
|
const imports = /* @__PURE__ */ new Set();
|
|
@@ -3230,7 +3230,7 @@ var top_default2 = (0, import_vue2.defineComponent)({
|
|
|
3230
3230
|
}
|
|
3231
3231
|
});
|
|
3232
3232
|
|
|
3233
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
3233
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-Q6BNW3MO.js
|
|
3234
3234
|
var FUNCTION_REGEX = /^\s*(?:(async)\s+)?(?:function\s*(\*?)\s*(\w*)\s*\(([\s\S]*?)\)|(\*?\s*)\b(\w+)\s*\(([\s\S]*?)\)|\(([\s\S]*?)\)|([^=>,\(\)]+?))\s*(?:=>)?\s*(?:\{([\s\S]*?)\}|([\s\S]*))$/;
|
|
3235
3235
|
function getFunctionFormat(v) {
|
|
3236
3236
|
if (!v) return;
|
|
@@ -4408,6 +4408,7 @@ var tslot = [
|
|
|
4408
4408
|
|
|
4409
4409
|
// packages/node/index.ts
|
|
4410
4410
|
var Fang;
|
|
4411
|
+
var annotat = {};
|
|
4411
4412
|
function h3(div, sx, v) {
|
|
4412
4413
|
if (isArray(v)) {
|
|
4413
4414
|
v = v.join("");
|
|
@@ -4589,6 +4590,10 @@ async function getCompoData(value) {
|
|
|
4589
4590
|
const arr = [];
|
|
4590
4591
|
arr.push("# " + getName(value));
|
|
4591
4592
|
await getNotes2(value.key).then((obj2) => {
|
|
4593
|
+
annotat[value.key] = {
|
|
4594
|
+
key: value,
|
|
4595
|
+
value: obj2
|
|
4596
|
+
};
|
|
4592
4597
|
let { titles: titles2, propss, slots, emitss, exposes } = obj2;
|
|
4593
4598
|
const dom = setHtml(
|
|
4594
4599
|
"div",
|
|
@@ -4694,6 +4699,7 @@ function getlistDom(arr, t, list) {
|
|
|
4694
4699
|
return arrs;
|
|
4695
4700
|
}
|
|
4696
4701
|
async function nodeInit(c, callback) {
|
|
4702
|
+
annotat = {};
|
|
4697
4703
|
configObj = userConfig(c);
|
|
4698
4704
|
configObj._callback_ = callback;
|
|
4699
4705
|
if (typeof c.setHtml === "function") {
|
|
@@ -4705,6 +4711,7 @@ async function nodeInit(c, callback) {
|
|
|
4705
4711
|
const element = comps[index];
|
|
4706
4712
|
await getCompoData(element);
|
|
4707
4713
|
}
|
|
4714
|
+
return annotat;
|
|
4708
4715
|
}
|
|
4709
4716
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4710
4717
|
0 && (module.exports = {
|
package/dist/node/index.d.cts
CHANGED
|
@@ -143,6 +143,6 @@ interface NodeConfig extends Config {
|
|
|
143
143
|
[key: string]: any;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
declare function nodeInit(c: NodeConfig, callback: (mls: ComponentsObj[]) => void): Promise<
|
|
146
|
+
declare function nodeInit(c: NodeConfig, callback: (mls: ComponentsObj[]) => void): Promise<Record<string, any>>;
|
|
147
147
|
|
|
148
148
|
export { type ComponentsObj, type TextObj, nodeInit };
|
package/dist/node/index.d.ts
CHANGED
|
@@ -143,6 +143,6 @@ interface NodeConfig extends Config {
|
|
|
143
143
|
[key: string]: any;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
declare function nodeInit(c: NodeConfig, callback: (mls: ComponentsObj[]) => void): Promise<
|
|
146
|
+
declare function nodeInit(c: NodeConfig, callback: (mls: ComponentsObj[]) => void): Promise<Record<string, any>>;
|
|
147
147
|
|
|
148
148
|
export { type ComponentsObj, type TextObj, nodeInit };
|
package/dist/node/index.js
CHANGED
|
@@ -58,12 +58,12 @@ var init_prettier = __esm({
|
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
|
|
61
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
61
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js
|
|
62
62
|
function isArray(obj2) {
|
|
63
63
|
return Object.prototype.toString.call(obj2) == "[object Array]";
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
66
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-A276ZDLP.js
|
|
67
67
|
function getStartSames(str, val) {
|
|
68
68
|
let s = "";
|
|
69
69
|
const vs = [...val];
|
|
@@ -79,7 +79,7 @@ function getStartSames(str, val) {
|
|
|
79
79
|
return [s, str.substring(index), val.substring(index)];
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
82
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-KDOS4NFR.js
|
|
83
83
|
function getImportUrl(url, imp) {
|
|
84
84
|
const arr = getStartSames(url, imp);
|
|
85
85
|
const ts2 = arr[0];
|
|
@@ -103,12 +103,12 @@ function getImportUrl(url, imp) {
|
|
|
103
103
|
return ds.join("") + arr[2].replace(/\\/g, "/");
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
106
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js
|
|
107
107
|
function firstUpper(str) {
|
|
108
108
|
return str.slice(0, 1).toUpperCase() + str.slice(1);
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
111
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js
|
|
112
112
|
function lineToLargeHump(name) {
|
|
113
113
|
let arr = name.split("-");
|
|
114
114
|
arr = arr.map((vs) => {
|
|
@@ -117,7 +117,7 @@ function lineToLargeHump(name) {
|
|
|
117
117
|
return arr.join("");
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
// node_modules/.pnpm/@fangzhongya+create@0.2.
|
|
120
|
+
// node_modules/.pnpm/@fangzhongya+create@0.2.50/node_modules/@fangzhongya/create/dist/chunk-36XULS54.js
|
|
121
121
|
import {
|
|
122
122
|
open,
|
|
123
123
|
readdir,
|
|
@@ -387,7 +387,7 @@ function writeFileUrl(url, files, callback, isDirs, isFile, issynch) {
|
|
|
387
387
|
});
|
|
388
388
|
}
|
|
389
389
|
|
|
390
|
-
// node_modules/.pnpm/@fangzhongya+create@0.2.
|
|
390
|
+
// node_modules/.pnpm/@fangzhongya+create@0.2.50/node_modules/@fangzhongya/create/dist/chunk-55GZI3ZZ.js
|
|
391
391
|
import { resolve, join as join2 } from "path";
|
|
392
392
|
function styleLog(msg = "", obj2) {
|
|
393
393
|
const arr = ["\x1B[0m"];
|
|
@@ -809,7 +809,7 @@ var FangCom = class {
|
|
|
809
809
|
}
|
|
810
810
|
};
|
|
811
811
|
|
|
812
|
-
// node_modules/.pnpm/@fangzhongya+create@0.2.
|
|
812
|
+
// node_modules/.pnpm/@fangzhongya+create@0.2.50/node_modules/@fangzhongya/create/dist/bins/md.js
|
|
813
813
|
var defaultConfig2 = Object.assign({}, defaultConfig, {
|
|
814
814
|
name: "md"
|
|
815
815
|
});
|
|
@@ -828,7 +828,7 @@ function runDev(config2, configCallback) {
|
|
|
828
828
|
return new FangMd(config2, configCallback);
|
|
829
829
|
}
|
|
830
830
|
|
|
831
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
831
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-NCSN3MC5.js
|
|
832
832
|
var zObj = {
|
|
833
833
|
"<": "<",
|
|
834
834
|
">": ">",
|
|
@@ -849,7 +849,7 @@ function htmlEscape(str) {
|
|
|
849
849
|
// packages/node/index.ts
|
|
850
850
|
import { join as join4 } from "path";
|
|
851
851
|
|
|
852
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
852
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js
|
|
853
853
|
function mergeObject(a, b, j = 0, i) {
|
|
854
854
|
if (a instanceof Array) {
|
|
855
855
|
if (j > 0 && i) {
|
|
@@ -903,7 +903,7 @@ function getConfig(key) {
|
|
|
903
903
|
return config[key];
|
|
904
904
|
}
|
|
905
905
|
|
|
906
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
906
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-7PJ2D3KR.js
|
|
907
907
|
function getVueText(content) {
|
|
908
908
|
const result = {
|
|
909
909
|
template: "",
|
|
@@ -950,7 +950,7 @@ function getVueTexts(content) {
|
|
|
950
950
|
};
|
|
951
951
|
}
|
|
952
952
|
|
|
953
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
953
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js
|
|
954
954
|
function humpToLine(name) {
|
|
955
955
|
const reg = /(([A-Z])([^A-Z]*))/g;
|
|
956
956
|
let result;
|
|
@@ -972,12 +972,12 @@ function humpToLine(name) {
|
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
974
|
|
|
975
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
975
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js
|
|
976
976
|
function firstLower(str) {
|
|
977
977
|
return str.slice(0, 1).toLowerCase() + str.slice(1);
|
|
978
978
|
}
|
|
979
979
|
|
|
980
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
980
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js
|
|
981
981
|
function asyncMergeArray(arr, callback) {
|
|
982
982
|
return new Promise((resolve2, reject) => {
|
|
983
983
|
let index = 0;
|
|
@@ -1001,7 +1001,7 @@ function asyncMergeArray(arr, callback) {
|
|
|
1001
1001
|
});
|
|
1002
1002
|
}
|
|
1003
1003
|
|
|
1004
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
1004
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-Z7NTQAAJ.js
|
|
1005
1005
|
function getSuffix2(url) {
|
|
1006
1006
|
const reg = /\.([a-z|A-Z][a-z|A-Z|0-9]*)$/;
|
|
1007
1007
|
const regs = reg.exec(url);
|
|
@@ -1011,7 +1011,7 @@ function getSuffix2(url) {
|
|
|
1011
1011
|
return "";
|
|
1012
1012
|
}
|
|
1013
1013
|
|
|
1014
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
1014
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-S6JRKYPY.js
|
|
1015
1015
|
function matchsStart2(key, matchs) {
|
|
1016
1016
|
if (matchs && matchs.length > 0) {
|
|
1017
1017
|
for (const value of matchs) {
|
|
@@ -1031,7 +1031,7 @@ function matchsStart2(key, matchs) {
|
|
|
1031
1031
|
}
|
|
1032
1032
|
}
|
|
1033
1033
|
|
|
1034
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
1034
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-YNOFNHEK.js
|
|
1035
1035
|
function matchsEnd2(key, matchs) {
|
|
1036
1036
|
if (matchs && matchs.length > 0) {
|
|
1037
1037
|
for (const value of matchs) {
|
|
@@ -1694,7 +1694,7 @@ function parse(source, options = {}) {
|
|
|
1694
1694
|
}
|
|
1695
1695
|
var stringify = getStringifier();
|
|
1696
1696
|
|
|
1697
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
1697
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-FS4JPT23.js
|
|
1698
1698
|
function deComment(code) {
|
|
1699
1699
|
let output = "";
|
|
1700
1700
|
let state = "code";
|
|
@@ -1786,7 +1786,7 @@ function deComment(code) {
|
|
|
1786
1786
|
return output;
|
|
1787
1787
|
}
|
|
1788
1788
|
|
|
1789
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
1789
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-N5Y3XGHX.js
|
|
1790
1790
|
function getImports(code, includeType = false) {
|
|
1791
1791
|
code = deComment(code);
|
|
1792
1792
|
const imports = /* @__PURE__ */ new Set();
|
|
@@ -3212,7 +3212,7 @@ var top_default2 = defineComponent2({
|
|
|
3212
3212
|
}
|
|
3213
3213
|
});
|
|
3214
3214
|
|
|
3215
|
-
// node_modules/.pnpm/@fangzhongya+utils@0.0.
|
|
3215
|
+
// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-Q6BNW3MO.js
|
|
3216
3216
|
var FUNCTION_REGEX = /^\s*(?:(async)\s+)?(?:function\s*(\*?)\s*(\w*)\s*\(([\s\S]*?)\)|(\*?\s*)\b(\w+)\s*\(([\s\S]*?)\)|\(([\s\S]*?)\)|([^=>,\(\)]+?))\s*(?:=>)?\s*(?:\{([\s\S]*?)\}|([\s\S]*))$/;
|
|
3217
3217
|
function getFunctionFormat(v) {
|
|
3218
3218
|
if (!v) return;
|
|
@@ -4390,6 +4390,7 @@ var tslot = [
|
|
|
4390
4390
|
|
|
4391
4391
|
// packages/node/index.ts
|
|
4392
4392
|
var Fang;
|
|
4393
|
+
var annotat = {};
|
|
4393
4394
|
function h3(div, sx, v) {
|
|
4394
4395
|
if (isArray(v)) {
|
|
4395
4396
|
v = v.join("");
|
|
@@ -4571,6 +4572,10 @@ async function getCompoData(value) {
|
|
|
4571
4572
|
const arr = [];
|
|
4572
4573
|
arr.push("# " + getName(value));
|
|
4573
4574
|
await getNotes2(value.key).then((obj2) => {
|
|
4575
|
+
annotat[value.key] = {
|
|
4576
|
+
key: value,
|
|
4577
|
+
value: obj2
|
|
4578
|
+
};
|
|
4574
4579
|
let { titles: titles2, propss, slots, emitss, exposes } = obj2;
|
|
4575
4580
|
const dom = setHtml(
|
|
4576
4581
|
"div",
|
|
@@ -4676,6 +4681,7 @@ function getlistDom(arr, t, list) {
|
|
|
4676
4681
|
return arrs;
|
|
4677
4682
|
}
|
|
4678
4683
|
async function nodeInit(c, callback) {
|
|
4684
|
+
annotat = {};
|
|
4679
4685
|
configObj = userConfig(c);
|
|
4680
4686
|
configObj._callback_ = callback;
|
|
4681
4687
|
if (typeof c.setHtml === "function") {
|
|
@@ -4687,6 +4693,7 @@ async function nodeInit(c, callback) {
|
|
|
4687
4693
|
const element = comps[index];
|
|
4688
4694
|
await getCompoData(element);
|
|
4689
4695
|
}
|
|
4696
|
+
return annotat;
|
|
4690
4697
|
}
|
|
4691
4698
|
export {
|
|
4692
4699
|
nodeInit
|
|
@@ -4,4 +4,4 @@ interface NodeConfig extends Config {
|
|
|
4
4
|
[key: string]: any;
|
|
5
5
|
}
|
|
6
6
|
export type { TextObj, ComponentsObj };
|
|
7
|
-
export declare function nodeInit(c: NodeConfig, callback: (mls: ComponentsObj[]) => void): Promise<
|
|
7
|
+
export declare function nodeInit(c: NodeConfig, callback: (mls: ComponentsObj[]) => void): Promise<Record<string, any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../config.cjs"),c=require("../utils/storage.cjs");require("@fangzhongya/utils/basic/string/firstUpper");const g=require("./file.cjs"),y=e=>Object.freeze(Object.defineProperty({__proto__:null,default:e},Symbol.toStringTag,{value:"Module"})),l="__document",i=[{path:"/"+l,name:l,component:()=>Promise.resolve().then(()=>y(require("../index/index.vue.cjs"))),redirect:{name:l+"Index"},meta:{title:"文档"},children:[]}];let d=0;document.addEventListener("keydown",h);function h(e){e=e||window.event,(e.ctrlKey&&e.location==82||e.location==116)&&c.setSession("-keydown-F5",2)}let o=l;function k(e){o=u.getConfig("router")||l;let t="/"+o;if(i[0].path=t,i[0].name=o,i[0].redirect={name:o+"Index"},i[0].children?.unshift({path:t+"/:chapters+",redirect:{name:o+"Index"}}),g.getFileName().forEach(n=>{i[0].children?.push({path:n.value,name:o+n.name,component:n.component})}),i.forEach(n=>{e.addRoute(n)}),e.beforeEach((n,r,m)=>{if(r.fullPath=="/"){let p=c.getSession("-keydown-F5");document.referrer||p==2?(console.log("刷新"),d=2):(console.log("地址栏输入 或者 刷新"),d=3)}else console.log("跳转"),d=1;c.setSession("-keydown-F5",0),m()}),u.getConfig("redirect")){const n=e.getRoutes().filter(r=>r.path=="/")[0]||{path:"/"};n.redirect=t,n.name?e.addRoute(n.name,n):e.addRoute(n)}}const f={};function v(e){let t=e.path,a=e.params;if(a&&Object.keys(a).length)return a;{let n=f[t];return n&&Object.keys(n).length?n:d==3?{}:c.getSession("router.toPage."+t)}}function s(e,t,a="push"){let n=t.path||"";const r=t.name,m=t.params||{};delete t.params,e[a](t),r&&(n=e.resolve({name:r}).path),f[n]=m,c.setSession("router.toPage."+n,m)}function P(e,t){s(e,{name:o+"Single",query:{id:t?.name+"/"+t?.value},params:{key:t?.key,comkey:t?.comkey}})}function S(e,t){s(e,{name:o+"Develop",query:{id:t?.value},params:{key:t?.key}})}function q(e,t){s(e,{name:o+"Edit",query:{id:t?.value},params:{key:t?.key}})}function w(e,t){s(e,{name:o+"Tests",query:{id:t?.value},params:{key:t?.key}})}function E(e,t){s(e,{name:o+"Compon",query:{id:t?.value},params:{key:t?.key}})}exports.getPageParams=v;exports.init=k;exports.toCompon=E;exports.toDevelop=S;exports.toEdit=q;exports.toPage=s;exports.toSingle=P;exports.toTests=w;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { getConfig as
|
|
2
|
-
import { setSession as
|
|
1
|
+
import { getConfig as p } from "../config.js";
|
|
2
|
+
import { setSession as d, getSession as f } from "../utils/storage.js";
|
|
3
3
|
import "@fangzhongya/utils/basic/string/firstUpper";
|
|
4
|
-
import { getFileName as
|
|
5
|
-
const i = [
|
|
4
|
+
import { getFileName as h } from "./file.js";
|
|
5
|
+
const m = "__document", i = [
|
|
6
6
|
{
|
|
7
|
-
path: "/
|
|
8
|
-
name:
|
|
7
|
+
path: "/" + m,
|
|
8
|
+
name: m,
|
|
9
9
|
component: () => import("../index/index.vue.js"),
|
|
10
|
-
redirect: { name: "
|
|
10
|
+
redirect: { name: m + "Index" },
|
|
11
11
|
meta: { title: "文档" },
|
|
12
12
|
children: []
|
|
13
13
|
}
|
|
14
14
|
];
|
|
15
|
-
let
|
|
16
|
-
document.addEventListener("keydown",
|
|
17
|
-
function
|
|
15
|
+
let s = 0;
|
|
16
|
+
document.addEventListener("keydown", k);
|
|
17
|
+
function k(t) {
|
|
18
18
|
t = t || window.event, (t.ctrlKey && t.location == 82 || //ctrl+R
|
|
19
|
-
t.location == 116) &&
|
|
19
|
+
t.location == 116) && d("-keydown-F5", 2);
|
|
20
20
|
}
|
|
21
|
-
let a =
|
|
22
|
-
function
|
|
23
|
-
a =
|
|
21
|
+
let a = m;
|
|
22
|
+
function x(t) {
|
|
23
|
+
a = p("router") || m;
|
|
24
24
|
let e = "/" + a;
|
|
25
25
|
if (i[0].path = e, i[0].name = a, i[0].redirect = { name: a + "Index" }, i[0].children?.unshift({
|
|
26
26
|
path: e + "/:chapters+",
|
|
27
27
|
redirect: { name: a + "Index" }
|
|
28
|
-
}),
|
|
28
|
+
}), h().forEach((n) => {
|
|
29
29
|
i[0].children?.push({
|
|
30
30
|
path: n.value,
|
|
31
31
|
name: a + n.name,
|
|
@@ -33,14 +33,14 @@ function P(t) {
|
|
|
33
33
|
});
|
|
34
34
|
}), i.forEach((n) => {
|
|
35
35
|
t.addRoute(n);
|
|
36
|
-
}), t.beforeEach((n, r,
|
|
36
|
+
}), t.beforeEach((n, r, l) => {
|
|
37
37
|
if (r.fullPath == "/") {
|
|
38
|
-
let
|
|
39
|
-
document.referrer ||
|
|
38
|
+
let y = f("-keydown-F5");
|
|
39
|
+
document.referrer || y == 2 ? (console.log("刷新"), s = 2) : (console.log("地址栏输入 或者 刷新"), s = 3);
|
|
40
40
|
} else
|
|
41
|
-
console.log("跳转"),
|
|
42
|
-
|
|
43
|
-
}),
|
|
41
|
+
console.log("跳转"), s = 1;
|
|
42
|
+
d("-keydown-F5", 0), l();
|
|
43
|
+
}), p("redirect")) {
|
|
44
44
|
const n = t.getRoutes().filter((r) => r.path == "/")[0] || {
|
|
45
45
|
path: "/"
|
|
46
46
|
};
|
|
@@ -48,22 +48,22 @@ function P(t) {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
const u = {};
|
|
51
|
-
function
|
|
51
|
+
function E(t) {
|
|
52
52
|
let e = t.path, o = t.params;
|
|
53
53
|
if (o && Object.keys(o).length)
|
|
54
54
|
return o;
|
|
55
55
|
{
|
|
56
56
|
let n = u[e];
|
|
57
|
-
return n && Object.keys(n).length ? n :
|
|
57
|
+
return n && Object.keys(n).length ? n : s == 3 ? {} : f("router.toPage." + e);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function c(t, e, o = "push") {
|
|
61
61
|
let n = e.path || "";
|
|
62
|
-
const r = e.name,
|
|
63
|
-
delete e.params, t[o](e), r && (n = t.resolve({ name: r }).path), u[n] =
|
|
62
|
+
const r = e.name, l = e.params || {};
|
|
63
|
+
delete e.params, t[o](e), r && (n = t.resolve({ name: r }).path), u[n] = l, d("router.toPage." + n, l);
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
|
|
65
|
+
function q(t, e) {
|
|
66
|
+
c(t, {
|
|
67
67
|
name: a + "Single",
|
|
68
68
|
query: {
|
|
69
69
|
id: e?.name + "/" + e?.value
|
|
@@ -71,8 +71,8 @@ function E(t, e) {
|
|
|
71
71
|
params: { key: e?.key, comkey: e?.comkey }
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
|
|
74
|
+
function F(t, e) {
|
|
75
|
+
c(t, {
|
|
76
76
|
name: a + "Develop",
|
|
77
77
|
query: {
|
|
78
78
|
id: e?.value
|
|
@@ -80,8 +80,8 @@ function q(t, e) {
|
|
|
80
80
|
params: { key: e?.key }
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
|
|
83
|
+
function R(t, e) {
|
|
84
|
+
c(t, {
|
|
85
85
|
name: a + "Edit",
|
|
86
86
|
query: {
|
|
87
87
|
id: e?.value
|
|
@@ -89,8 +89,8 @@ function x(t, e) {
|
|
|
89
89
|
params: { key: e?.key }
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
|
|
92
|
+
function S(t, e) {
|
|
93
|
+
c(t, {
|
|
94
94
|
name: a + "Tests",
|
|
95
95
|
query: {
|
|
96
96
|
id: e?.value
|
|
@@ -98,8 +98,8 @@ function F(t, e) {
|
|
|
98
98
|
params: { key: e?.key }
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
|
|
101
|
+
function C(t, e) {
|
|
102
|
+
c(t, {
|
|
103
103
|
name: a + "Compon",
|
|
104
104
|
query: {
|
|
105
105
|
id: e?.value
|
|
@@ -108,12 +108,12 @@ function R(t, e) {
|
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
export {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
111
|
+
E as getPageParams,
|
|
112
|
+
x as init,
|
|
113
|
+
C as toCompon,
|
|
114
|
+
F as toDevelop,
|
|
115
|
+
R as toEdit,
|
|
116
|
+
c as toPage,
|
|
117
|
+
q as toSingle,
|
|
118
|
+
S as toTests
|
|
119
119
|
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
type Spec = {
|
|
2
|
+
tag: string;
|
|
3
|
+
name: string;
|
|
4
|
+
default?: string;
|
|
5
|
+
type: string;
|
|
6
|
+
optional: boolean;
|
|
7
|
+
description: string;
|
|
8
|
+
selectable: string;
|
|
9
|
+
problems?: unknown;
|
|
10
|
+
source?: unknown;
|
|
11
|
+
} & {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
};
|
|
14
|
+
interface Block {
|
|
15
|
+
description: string;
|
|
16
|
+
tags: Spec[];
|
|
17
|
+
source: unknown;
|
|
18
|
+
problems: unknown;
|
|
19
|
+
}
|
|
20
|
+
interface Specs {
|
|
21
|
+
[key: string]: Spec;
|
|
22
|
+
}
|
|
23
|
+
interface Descriptions {
|
|
24
|
+
descriptions: string;
|
|
25
|
+
}
|
|
26
|
+
type SpecObjs = Descriptions & Specs;
|
|
27
|
+
type NotesObj = {
|
|
28
|
+
titles: SpecObjs[];
|
|
29
|
+
propss: SpecObjs[];
|
|
30
|
+
slots: SpecObjs[];
|
|
31
|
+
emitss: SpecObjs[];
|
|
32
|
+
exposes: SpecObjs[];
|
|
33
|
+
[key: string]: any[];
|
|
34
|
+
};
|
|
35
|
+
export declare function getTextNotes(text: string): Block[] | undefined;
|
|
36
|
+
export declare function getNotesText(text: string): NotesObj;
|
|
37
|
+
export {};
|
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.7",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description ": "vue 组件注释生成文档",
|
|
7
7
|
"author": "fangzhongya ",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"@codemirror/lang-javascript": "^6.2.4",
|
|
25
25
|
"@codemirror/lang-json": "^6.0.2",
|
|
26
26
|
"@codemirror/state": "^6.5.3",
|
|
27
|
-
"@codemirror/view": "^6.39.
|
|
28
|
-
"@fangzhongya/create": "0.2.
|
|
29
|
-
"@fangzhongya/utils": "0.0.
|
|
27
|
+
"@codemirror/view": "^6.39.9",
|
|
28
|
+
"@fangzhongya/create": "0.2.50",
|
|
29
|
+
"@fangzhongya/utils": "0.0.73",
|
|
30
30
|
"@fangzhongya/vue-components": "0.1.20",
|
|
31
31
|
"@highlightjs/vue-plugin": "^2.1.0",
|
|
32
32
|
"@types/node": "^25.0.3",
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
"@vue/server-renderer": "3.5.26",
|
|
38
38
|
"codemirror": "^6.0.2",
|
|
39
39
|
"fast-glob": "^3.3.3",
|
|
40
|
-
"sass": "^1.97.
|
|
40
|
+
"sass": "^1.97.2",
|
|
41
41
|
"ts-node": "^10.9.2",
|
|
42
42
|
"tsup": "^8.5.1",
|
|
43
43
|
"typescript": "^5.9.3",
|
|
44
44
|
"unplugin-vue-components": "^30.0.0",
|
|
45
|
-
"vite": "^7.3.
|
|
45
|
+
"vite": "^7.3.1",
|
|
46
46
|
"vite-plugin-dts": "4.5.4",
|
|
47
47
|
"vitest": "^4.0.16",
|
|
48
|
-
"vue-tsc": "^3.2.
|
|
48
|
+
"vue-tsc": "^3.2.2"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"comment-parser": "^1.4.1",
|
|
@@ -95,8 +95,8 @@
|
|
|
95
95
|
"devx:tests": "ts-node node/tests.ts",
|
|
96
96
|
"build": "vue-tsc && vite build",
|
|
97
97
|
"pub": "pnpm publish --access public --no-git-checks",
|
|
98
|
-
"all": "pnpm build:all & pnpm dev:v & pnpm pub",
|
|
99
98
|
"build:tsup": "tsup",
|
|
99
|
+
"all": "pnpm build:all & pnpm dev:v & pnpm pub",
|
|
100
100
|
"build:all": "pnpm build & pnpm build:tsup",
|
|
101
101
|
"preview": "vite preview",
|
|
102
102
|
"test": "vitest test"
|