@fangzhongya/vue-archive 0.0.69 → 0.0.71

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 (65) hide show
  1. package/README.md +0 -2
  2. package/dist/index.css +2 -2
  3. package/dist/node/index.cjs +448 -358
  4. package/dist/node/index.d.cts +2 -0
  5. package/dist/node/index.d.ts +2 -0
  6. package/dist/node/index.js +445 -358
  7. package/dist/packages/components/use/code.cjs +15 -16
  8. package/dist/packages/components/use/code.d.ts +25 -17
  9. package/dist/packages/components/use/code.js +76 -74
  10. package/dist/packages/components/use/edit.cjs +11 -11
  11. package/dist/packages/components/use/edit.d.ts +1 -1
  12. package/dist/packages/components/use/edit.js +119 -94
  13. package/dist/packages/components/use/prettier.cjs +1 -0
  14. package/dist/packages/components/use/prettier.d.ts +1 -4
  15. package/dist/packages/components/use/prettier.js +40 -0
  16. package/dist/packages/components/use/retrie/array/index.vue.cjs +2 -2
  17. package/dist/packages/components/use/retrie/array/index.vue.js +17 -16
  18. package/dist/packages/components/use/retrie/function/index.vue.cjs +2 -2
  19. package/dist/packages/components/use/retrie/function/index.vue.js +22 -20
  20. package/dist/packages/components/use/retrie/input/codemirror/codemirror.cjs +3 -0
  21. package/dist/packages/components/use/retrie/input/codemirror/codemirror.js +58 -0
  22. package/dist/packages/components/use/retrie/input/codemirror/codemirror.vue.cjs +1 -0
  23. package/dist/packages/components/use/retrie/input/codemirror/codemirror.vue.js +62 -0
  24. package/dist/packages/components/use/retrie/input/codemirror/codemirror.vue3.cjs +1 -0
  25. package/dist/packages/components/use/retrie/input/codemirror/codemirror.vue3.js +5 -0
  26. package/dist/packages/components/use/retrie/input/editor/editor.cjs +3 -0
  27. package/dist/packages/components/use/retrie/input/{codemirror.d.ts → editor/editor.d.ts} +9 -9
  28. package/dist/packages/components/use/retrie/input/editor/editor.js +39 -0
  29. package/dist/packages/components/use/retrie/input/editor/editor.vue.cjs +1 -0
  30. package/dist/packages/components/use/retrie/input/editor/editor.vue.js +53 -0
  31. package/dist/packages/components/use/retrie/input/editor/editor.vue3.cjs +1 -0
  32. package/dist/packages/components/use/retrie/input/editor/editor.vue3.js +5 -0
  33. package/dist/packages/components/use/retrie/input/editor/init.cjs +1 -0
  34. package/dist/packages/components/use/retrie/input/editor/init.d.ts +1 -0
  35. package/dist/packages/components/use/retrie/input/editor/init.js +16 -0
  36. package/dist/packages/components/use/retrie/input/index.vue.cjs +1 -1
  37. package/dist/packages/components/use/retrie/input/index.vue.js +25 -15
  38. package/dist/packages/components/use/retrie/input/text.vue.cjs +1 -1
  39. package/dist/packages/components/use/retrie/input/text.vue.js +21 -13
  40. package/dist/packages/components/use/retrie/number/index.vue.cjs +1 -1
  41. package/dist/packages/components/use/retrie/number/index.vue.js +24 -22
  42. package/dist/packages/components/use/retrie/object/index.vue.cjs +2 -2
  43. package/dist/packages/components/use/retrie/object/index.vue.js +15 -14
  44. package/dist/packages/components/use/retrie/other/index.vue.cjs +1 -1
  45. package/dist/packages/components/use/retrie/other/index.vue.js +17 -16
  46. package/dist/packages/components/use/retrie/slot/index.vue.cjs +1 -1
  47. package/dist/packages/components/use/retrie/slot/index.vue.js +19 -17
  48. package/dist/packages/components/use/retrie/string/index.vue.cjs +1 -1
  49. package/dist/packages/components/use/retrie/string/index.vue.js +20 -18
  50. package/dist/packages/components/use/set-code.vue.cjs +1 -1
  51. package/dist/packages/components/use/set-code.vue.js +7 -7
  52. package/dist/packages/components/use/util.cjs +3 -3
  53. package/dist/packages/components/use/util.d.ts +10 -5
  54. package/dist/packages/components/use/util.js +88 -62
  55. package/dist/packages/config.d.ts +3 -1
  56. package/dist/packages/page/edit/index.vue2.cjs +1 -1
  57. package/dist/packages/page/edit/index.vue2.js +11 -7
  58. package/package.json +3 -2
  59. package/dist/packages/components/use/codemirror.cjs +0 -3
  60. package/dist/packages/components/use/codemirror.js +0 -31
  61. package/dist/packages/components/use/retrie/input/codemirror.vue.cjs +0 -1
  62. package/dist/packages/components/use/retrie/input/codemirror.vue.js +0 -43
  63. package/dist/packages/components/use/retrie/input/codemirror.vue2.cjs +0 -1
  64. package/dist/packages/components/use/retrie/input/codemirror.vue2.js +0 -4
  65. /package/dist/packages/components/use/{codemirror.d.ts → retrie/input/codemirror/codemirror.d.ts} +0 -0
@@ -1,8 +1,13 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __esm = (fn, res) => function __init() {
9
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
+ };
6
11
  var __export = (target, all) => {
7
12
  for (var name in all)
8
13
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -15,8 +20,66 @@ var __copyProps = (to, from, except, desc) => {
15
20
  }
16
21
  return to;
17
22
  };
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
+ // If the importer is in node compatibility mode or this is not an ESM
25
+ // file that has been converted to a CommonJS file using a Babel-
26
+ // compatible transform (i.e. "__esModule" has not been set), then set
27
+ // "default" to the CommonJS "module.exports" for node compatibility.
28
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
+ mod
30
+ ));
18
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
32
 
33
+ // packages/components/use/prettier.ts
34
+ var prettier_exports = {};
35
+ __export(prettier_exports, {
36
+ getFormat: () => getFormat
37
+ });
38
+ async function getFormat(text, type) {
39
+ const v = await (0, import_prettier.format)(text, {
40
+ ...obj[type]
41
+ });
42
+ return v;
43
+ }
44
+ var import_prettier, import_html, import_postcss, import_typescript, import_babel, import_estree, obj;
45
+ var init_prettier = __esm({
46
+ "packages/components/use/prettier.ts"() {
47
+ "use strict";
48
+ import_prettier = require("prettier");
49
+ import_html = __toESM(require("prettier/plugins/html"), 1);
50
+ import_postcss = __toESM(require("prettier/plugins/postcss"), 1);
51
+ import_typescript = __toESM(require("prettier/plugins/typescript"), 1);
52
+ import_babel = __toESM(require("prettier/plugins/babel"), 1);
53
+ import_estree = __toESM(require("prettier/plugins/estree"), 1);
54
+ obj = {
55
+ js: {
56
+ parser: "babel",
57
+ plugins: [import_babel.default, import_estree.default]
58
+ },
59
+ ts: {
60
+ parser: "typescript",
61
+ plugins: [import_typescript.default, import_estree.default]
62
+ },
63
+ css: {
64
+ parser: "css",
65
+ plugins: [import_postcss.default]
66
+ },
67
+ html: {
68
+ parser: "html",
69
+ plugins: [import_html.default]
70
+ },
71
+ json: {
72
+ parser: "json5",
73
+ plugins: []
74
+ },
75
+ vue: {
76
+ parser: "vue",
77
+ plugins: [import_postcss.default, import_html.default, import_babel.default, import_typescript.default, import_estree.default]
78
+ }
79
+ };
80
+ }
81
+ });
82
+
20
83
  // packages/node/index.ts
21
84
  var index_exports = {};
22
85
  __export(index_exports, {
@@ -25,8 +88,8 @@ __export(index_exports, {
25
88
  module.exports = __toCommonJS(index_exports);
26
89
 
27
90
  // node_modules/.pnpm/@fangzhongya+utils@0.0.28/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js
28
- function isArray(obj) {
29
- return Object.prototype.toString.call(obj) == "[object Array]";
91
+ function isArray(obj2) {
92
+ return Object.prototype.toString.call(obj2) == "[object Array]";
30
93
  }
31
94
 
32
95
  // node_modules/.pnpm/@fangzhongya+utils@0.0.28/node_modules/@fangzhongya/utils/dist/chunk-A276ZDLP.js
@@ -48,12 +111,12 @@ function getStartSames(str, val) {
48
111
  // node_modules/.pnpm/@fangzhongya+utils@0.0.28/node_modules/@fangzhongya/utils/dist/chunk-AWC672JW.js
49
112
  function getImportUrl(url, imp) {
50
113
  const arr = getStartSames(url, imp);
51
- const ts = arr[0];
52
- if (!/[\\|\/]$/.test(ts)) {
53
- const regs = ts.match(/[\\|\/]([^\\|\/]*)$/);
114
+ const ts2 = arr[0];
115
+ if (!/[\\|\/]$/.test(ts2)) {
116
+ const regs = ts2.match(/[\\|\/]([^\\|\/]*)$/);
54
117
  if (regs && regs.length > 0) {
55
118
  const a = regs[1];
56
- arr[0] = ts.substring(
119
+ arr[0] = ts2.substring(
57
120
  0,
58
121
  regs.index + 1
59
122
  );
@@ -109,8 +172,8 @@ function getUrlCatalogueObj(str) {
109
172
  };
110
173
  }
111
174
  function getNewFileName(url) {
112
- const obj = getUrlCatalogueObj(url);
113
- let wb = obj.name;
175
+ const obj2 = getUrlCatalogueObj(url);
176
+ let wb = obj2.name;
114
177
  if (wb) {
115
178
  const reg = /([0-9]+)$/g;
116
179
  const regs = reg.exec(wb);
@@ -121,7 +184,7 @@ function getNewFileName(url) {
121
184
  } else {
122
185
  wb = wb + "1";
123
186
  }
124
- return obj.catalogue + obj.apart + wb + "." + obj.suffix;
187
+ return obj2.catalogue + obj2.apart + wb + "." + obj2.suffix;
125
188
  } else {
126
189
  return "";
127
190
  }
@@ -347,27 +410,27 @@ function writeFileUrl(url, files, callback, isDirs, isFile, issynch) {
347
410
 
348
411
  // node_modules/.pnpm/@fangzhongya+create@0.2.34/node_modules/@fangzhongya/create/dist/chunk-PXLSY3ZR.js
349
412
  var import_path2 = require("path");
350
- function styleLog(msg = "", obj) {
413
+ function styleLog(msg = "", obj2) {
351
414
  const arr = ["\x1B[0m"];
352
- if (obj?.revert) {
415
+ if (obj2?.revert) {
353
416
  arr.push("\x1B[4m");
354
417
  }
355
- if (obj?.lineThrough) {
418
+ if (obj2?.lineThrough) {
356
419
  arr.push("\x1B[9m");
357
420
  }
358
- if (obj?.italic) {
421
+ if (obj2?.italic) {
359
422
  arr.push("\x1B[3m");
360
423
  }
361
- if (obj?.bold) {
424
+ if (obj2?.bold) {
362
425
  arr.push("\x1B[1m");
363
426
  }
364
- if (obj?.bag) {
365
- arr.push(`\x1B[4${obj?.bag}m`);
427
+ if (obj2?.bag) {
428
+ arr.push(`\x1B[4${obj2?.bag}m`);
366
429
  } else {
367
430
  arr.push("\x1B[40m");
368
431
  }
369
- if (obj?.text) {
370
- arr.push(`\x1B[3${obj?.text}m`);
432
+ if (obj2?.text) {
433
+ arr.push(`\x1B[3${obj2?.text}m`);
371
434
  } else {
372
435
  arr.push("\x1B[30m");
373
436
  }
@@ -962,10 +1025,10 @@ function getVueText(content) {
962
1025
  return result;
963
1026
  }
964
1027
  function getVueTexts(content) {
965
- const obj = getVueText(content);
1028
+ const obj2 = getVueText(content);
966
1029
  return {
967
- script: obj.scripts.join("\n"),
968
- style: obj.styles.join("\n")
1030
+ script: obj2.scripts.join("\n"),
1031
+ style: obj2.styles.join("\n")
969
1032
  };
970
1033
  }
971
1034
 
@@ -1011,11 +1074,11 @@ function matchsEnd2(key, matchs) {
1011
1074
 
1012
1075
  // packages/utils/common.ts
1013
1076
  var defaultExtensions = ["vue", "js", "ts"];
1014
- function getAliassNames(obj) {
1015
- let vm = humpToLine(obj.name);
1077
+ function getAliassNames(obj2) {
1078
+ let vm = humpToLine(obj2.name);
1016
1079
  let ass = [];
1017
- if (obj.alias) {
1018
- ass.push(obj.alias + "-" + vm);
1080
+ if (obj2.alias) {
1081
+ ass.push(obj2.alias + "-" + vm);
1019
1082
  }
1020
1083
  return ass;
1021
1084
  }
@@ -1787,29 +1850,29 @@ function getTests() {
1787
1850
  return getConfig("example");
1788
1851
  }
1789
1852
  function setExampleObj(dir, example, vexample, comRaw) {
1790
- const obj = mergeObject(example, vexample || {}, 3, true);
1791
- obj.exampless = obj.exampless || [];
1792
- obj.examplessRaw = obj.examplessRaw || [];
1853
+ const obj2 = mergeObject(example, vexample || {}, 3, true);
1854
+ obj2.exampless = obj2.exampless || [];
1855
+ obj2.examplessRaw = obj2.examplessRaw || [];
1793
1856
  const arr = [];
1794
- const examples = obj.examples;
1857
+ const examples = obj2.examples;
1795
1858
  if (examples) {
1796
1859
  Object.keys(examples).forEach((key) => {
1797
1860
  arr.push(key);
1798
1861
  examplesObj[key] = examples[key];
1799
1862
  });
1800
1863
  }
1801
- const examplesRaw = obj.examplesRaw;
1864
+ const examplesRaw = obj2.examplesRaw;
1802
1865
  const arrraw = [];
1803
- if (obj.urls && obj.urls.length > 0) {
1804
- obj.exampless = obj.urls;
1805
- obj.urls.forEach((key) => {
1866
+ if (obj2.urls && obj2.urls.length > 0) {
1867
+ obj2.exampless = obj2.urls;
1868
+ obj2.urls.forEach((key) => {
1806
1869
  arrraw.push(key);
1807
1870
  if (examplesRaw) {
1808
1871
  examplesRawObj[key] = getexamplesRawObj(examplesRaw, key);
1809
1872
  }
1810
1873
  });
1811
1874
  } else {
1812
- obj.exampless = arr;
1875
+ obj2.exampless = arr;
1813
1876
  if (examplesRaw) {
1814
1877
  Object.keys(examplesRaw).forEach((key) => {
1815
1878
  arrraw.push(key);
@@ -1817,13 +1880,13 @@ function setExampleObj(dir, example, vexample, comRaw) {
1817
1880
  });
1818
1881
  }
1819
1882
  }
1820
- obj.examples = void 0;
1883
+ obj2.examples = void 0;
1821
1884
  if (example.tests && comRaw) {
1822
1885
  const testsNanme = example.testsNanme || "/tests/";
1823
1886
  if (typeof testsNanme == "string") {
1824
1887
  Object.keys(comRaw).forEach((key) => {
1825
1888
  if (key.includes(testsNanme)) {
1826
- obj.exampless.push(key);
1889
+ obj2.exampless.push(key);
1827
1890
  arrraw.push(key);
1828
1891
  examplesRawObj[key] = getexamplesRawObj(comRaw, key);
1829
1892
  }
@@ -1831,17 +1894,17 @@ function setExampleObj(dir, example, vexample, comRaw) {
1831
1894
  } else {
1832
1895
  Object.keys(comRaw).forEach((key) => {
1833
1896
  if (testsNanme.test(key)) {
1834
- obj.exampless.push(key);
1897
+ obj2.exampless.push(key);
1835
1898
  arrraw.push(key);
1836
1899
  examplesRawObj[key] = getexamplesRawObj(comRaw, key);
1837
1900
  }
1838
1901
  });
1839
1902
  }
1840
1903
  }
1841
- obj.exampless = [...new Set(obj.exampless)];
1842
- obj.examplessRaw = [...new Set(arrraw)];
1843
- obj.examplesRaw = void 0;
1844
- exampleObj[dir] = obj;
1904
+ obj2.exampless = [...new Set(obj2.exampless)];
1905
+ obj2.examplessRaw = [...new Set(arrraw)];
1906
+ obj2.examplesRaw = void 0;
1907
+ exampleObj[dir] = obj2;
1845
1908
  }
1846
1909
  function getexamplesRawObj(comRaw, key) {
1847
1910
  if (typeof comRaw == "function") {
@@ -1895,16 +1958,16 @@ async function getImport(text, type) {
1895
1958
  return yrs;
1896
1959
  }
1897
1960
  }
1898
- function getLocalTextTests(obj) {
1961
+ function getLocalTextTests(obj2) {
1899
1962
  return new Promise((resolve2) => {
1900
- if (obj) {
1901
- if (obj.raw) {
1902
- resolve2(obj.raw);
1903
- } else if (obj.getRaw) {
1904
- obj.getRaw(obj).then((s) => {
1963
+ if (obj2) {
1964
+ if (obj2.raw) {
1965
+ resolve2(obj2.raw);
1966
+ } else if (obj2.getRaw) {
1967
+ obj2.getRaw(obj2).then((s) => {
1905
1968
  const m = getGetRawValue(s);
1906
- obj.raw = m;
1907
- obj.getRaw = null;
1969
+ obj2.raw = m;
1970
+ obj2.getRaw = null;
1908
1971
  resolve2(m);
1909
1972
  });
1910
1973
  } else {
@@ -1915,43 +1978,43 @@ function getLocalTextTests(obj) {
1915
1978
  }
1916
1979
  });
1917
1980
  }
1918
- function getLevelUrl(key, obj) {
1981
+ function getLevelUrl(key, obj2) {
1919
1982
  key = (key || "") + "";
1920
1983
  let url = "";
1921
1984
  switch (key) {
1922
1985
  case "1":
1923
- url = obj.tdir + "/";
1986
+ url = obj2.tdir + "/";
1924
1987
  break;
1925
1988
  case "2":
1926
- url = obj.adir + "/";
1989
+ url = obj2.adir + "/";
1927
1990
  break;
1928
1991
  case "3":
1929
- url = obj.tdir + "/" + obj.adir + "/";
1992
+ url = obj2.tdir + "/" + obj2.adir + "/";
1930
1993
  break;
1931
1994
  }
1932
1995
  return url;
1933
1996
  }
1934
- function getAliaslevelUrl(key, obj, componentName) {
1997
+ function getAliaslevelUrl(key, obj2, componentName) {
1935
1998
  key = (key || "") + "";
1936
1999
  componentName = (componentName || "") + "";
1937
- let vm = humpToLine(obj.name);
2000
+ let vm = humpToLine(obj2.name);
1938
2001
  let arr = [];
1939
2002
  if (key === "1") {
1940
- if (obj.alias) {
1941
- arr.push(obj.alias + "-" + vm);
2003
+ if (obj2.alias) {
2004
+ arr.push(obj2.alias + "-" + vm);
1942
2005
  }
1943
2006
  } else if (key === "3") {
1944
2007
  let a = "";
1945
- if (obj.alias) {
1946
- a = obj.alias + "-";
2008
+ if (obj2.alias) {
2009
+ a = obj2.alias + "-";
1947
2010
  }
1948
2011
  } else if (key === "4") {
1949
- obj.aliasNames?.forEach((v) => {
2012
+ obj2.aliasNames?.forEach((v) => {
1950
2013
  arr.push(humpToLine(v));
1951
2014
  });
1952
2015
  } else if (key == "9") {
1953
2016
  arr.push(vm);
1954
- obj.aliasNames?.forEach((v) => {
2017
+ obj2.aliasNames?.forEach((v) => {
1955
2018
  arr.push(humpToLine(v));
1956
2019
  });
1957
2020
  }
@@ -2257,14 +2320,14 @@ function getComponents() {
2257
2320
  });
2258
2321
  }
2259
2322
  var defaultName = "default";
2260
- function setComponentNameKeys(obj) {
2261
- let vm = humpToLine(obj.name);
2262
- let ass = [...obj.aliasNames];
2323
+ function setComponentNameKeys(obj2) {
2324
+ let vm = humpToLine(obj2.name);
2325
+ let ass = [...obj2.aliasNames];
2263
2326
  ass.push(vm);
2264
2327
  ass.forEach((v) => {
2265
2328
  componentNameKeys.push({
2266
2329
  name: v,
2267
- value: obj.key
2330
+ value: obj2.key
2268
2331
  });
2269
2332
  });
2270
2333
  }
@@ -2276,7 +2339,7 @@ function setComponentsObj(alias, arr) {
2276
2339
  }
2277
2340
  function setForComponentsValue(v) {
2278
2341
  let alias;
2279
- let obj;
2342
+ let obj2;
2280
2343
  const resolver = v.resolver;
2281
2344
  if (resolver) {
2282
2345
  Object.keys(resolver).forEach((key) => {
@@ -2287,13 +2350,13 @@ function setForComponentsValue(v) {
2287
2350
  }
2288
2351
  alias = v.alias || defaultName;
2289
2352
  let urls = v?.urls || Object.keys(v.componentsRaw);
2290
- obj = getComponentsArr(urls, v, v.componentsRaw, v.components);
2291
- if (obj && obj?.props) {
2292
- obj.props.forEach((z) => {
2353
+ obj2 = getComponentsArr(urls, v, v.componentsRaw, v.components);
2354
+ if (obj2 && obj2?.props) {
2355
+ obj2.props.forEach((z) => {
2293
2356
  componentPropsObj[z.url] = z;
2294
2357
  });
2295
2358
  }
2296
- setComponentsObj(alias, obj.components);
2359
+ setComponentsObj(alias, obj2.components);
2297
2360
  return v.componentsRaw;
2298
2361
  }
2299
2362
  function getCompoNameObj() {
@@ -2302,15 +2365,15 @@ function getCompoNameObj() {
2302
2365
  }
2303
2366
  return Object.values(componentsObj);
2304
2367
  }
2305
- async function getPropsImport(text, obj) {
2306
- let ts = text;
2368
+ async function getPropsImport(text, obj2) {
2369
+ let ts2 = text;
2307
2370
  if (text) {
2308
- let arr = (await getTestImportUrl(obj, text)).filter((v) => {
2309
- return isComprops(v.key, obj.comprops) || isCurprops(v.key, obj.curprops);
2371
+ let arr = (await getTestImportUrl(obj2, text)).filter((v) => {
2372
+ return isComprops(v.key, obj2.comprops) || isCurprops(v.key, obj2.curprops);
2310
2373
  });
2311
- ts = await getPropsTexts(arr) + ts;
2374
+ ts2 = await getPropsTexts(arr) + ts2;
2312
2375
  }
2313
- return ts;
2376
+ return ts2;
2314
2377
  }
2315
2378
  function getPropsValue(o) {
2316
2379
  const u = o.url;
@@ -2329,8 +2392,8 @@ function getPropsRaws(arr) {
2329
2392
  } else if (value.getRaw) {
2330
2393
  value.getRaw(value).then(async (s) => {
2331
2394
  const m = getGetRawValue(s);
2332
- let ts = await getPropsImport(m, arr[index]);
2333
- value.raw = ts;
2395
+ let ts2 = await getPropsImport(m, arr[index]);
2396
+ value.raw = ts2;
2334
2397
  value.getRaw = null;
2335
2398
  res();
2336
2399
  });
@@ -2350,18 +2413,18 @@ async function getPropsTexts(arr) {
2350
2413
  const sts = arrs?.map((o) => o.raw) || [];
2351
2414
  return sts.join("\n");
2352
2415
  }
2353
- async function getComponentsProps(text, obj) {
2354
- let ts = text;
2416
+ async function getComponentsProps(text, obj2) {
2417
+ let ts2 = text;
2355
2418
  if (text) {
2356
- if (obj.comprops || obj.curprops) {
2357
- let arr = (await getTestImportUrl(obj, text)).filter((v) => {
2358
- return isComprops(v.key, obj.comprops) || isCurprops(v.key, obj.curprops);
2419
+ if (obj2.comprops || obj2.curprops) {
2420
+ let arr = (await getTestImportUrl(obj2, text)).filter((v) => {
2421
+ return isComprops(v.key, obj2.comprops) || isCurprops(v.key, obj2.curprops);
2359
2422
  });
2360
2423
  let str = await getPropsTexts(arr);
2361
- ts = str + ts;
2424
+ ts2 = str + ts2;
2362
2425
  }
2363
2426
  }
2364
- return ts;
2427
+ return ts2;
2365
2428
  }
2366
2429
  function getGetRawValue(s) {
2367
2430
  if (s && typeof s == "object") {
@@ -2402,223 +2465,223 @@ function getLocalTextComponents(u) {
2402
2465
 
2403
2466
  // packages/utils/props.ts
2404
2467
  var props = {
2405
- name(obj) {
2406
- if (obj.name) {
2407
- return obj.name.name + obj.name.description;
2408
- } else if (obj.props) {
2409
- return obj.props.name;
2468
+ name(obj2) {
2469
+ if (obj2.name) {
2470
+ return obj2.name.name + obj2.name.description;
2471
+ } else if (obj2.props) {
2472
+ return obj2.props.name;
2410
2473
  } else {
2411
2474
  return "";
2412
2475
  }
2413
2476
  },
2414
- description(obj) {
2415
- if (obj.description && obj.description.name) {
2416
- return obj.description.name + obj.description.description;
2417
- } else if (obj.descriptions) {
2418
- return obj.descriptions;
2419
- } else if (obj.props) {
2420
- return obj.props.description;
2477
+ description(obj2) {
2478
+ if (obj2.description && obj2.description.name) {
2479
+ return obj2.description.name + obj2.description.description;
2480
+ } else if (obj2.descriptions) {
2481
+ return obj2.descriptions;
2482
+ } else if (obj2.props) {
2483
+ return obj2.props.description;
2421
2484
  } else {
2422
2485
  return "";
2423
2486
  }
2424
2487
  },
2425
- type(obj) {
2426
- if (obj.type) {
2427
- return obj.type.type || obj.type.name + obj.type.description;
2428
- } else if (obj.props) {
2429
- return obj.props.type;
2488
+ type(obj2) {
2489
+ if (obj2.type) {
2490
+ return obj2.type.type || obj2.type.name + obj2.type.description;
2491
+ } else if (obj2.props) {
2492
+ return obj2.props.type;
2430
2493
  } else {
2431
2494
  return "";
2432
2495
  }
2433
2496
  },
2434
- selectable(obj) {
2435
- if (obj.selectable) {
2436
- return obj.selectable.name + obj.selectable.description;
2437
- } else if (obj.props) {
2438
- return obj.props.selectable;
2497
+ selectable(obj2) {
2498
+ if (obj2.selectable) {
2499
+ return obj2.selectable.name + obj2.selectable.description;
2500
+ } else if (obj2.props) {
2501
+ return obj2.props.selectable;
2439
2502
  } else {
2440
2503
  return "";
2441
2504
  }
2442
2505
  },
2443
- default(obj) {
2444
- if (obj.default) {
2445
- return obj.default.name + obj.default.description;
2446
- } else if (obj.props) {
2447
- return obj.props.default || "";
2506
+ default(obj2) {
2507
+ if (obj2.default) {
2508
+ return obj2.default.name + obj2.default.description;
2509
+ } else if (obj2.props) {
2510
+ return obj2.props.default || "";
2448
2511
  } else {
2449
2512
  return "";
2450
2513
  }
2451
2514
  },
2452
- return(obj) {
2453
- if (obj.return) {
2454
- let t = obj.return.type;
2515
+ return(obj2) {
2516
+ if (obj2.return) {
2517
+ let t = obj2.return.type;
2455
2518
  if (t) {
2456
2519
  t = `[${t}]`;
2457
2520
  }
2458
- return t + (obj.return.name + obj.return.description);
2459
- } else if (obj.props) {
2460
- return obj.props.return;
2521
+ return t + (obj2.return.name + obj2.return.description);
2522
+ } else if (obj2.props) {
2523
+ return obj2.props.return;
2461
2524
  } else {
2462
2525
  return "";
2463
2526
  }
2464
2527
  },
2465
- required(obj) {
2466
- if (obj.required) {
2467
- return obj.required.name + obj.required.description;
2468
- } else if (obj.props) {
2469
- return obj.props.required;
2528
+ required(obj2) {
2529
+ if (obj2.required) {
2530
+ return obj2.required.name + obj2.required.description;
2531
+ } else if (obj2.props) {
2532
+ return obj2.props.required;
2470
2533
  } else {
2471
2534
  return "";
2472
2535
  }
2473
2536
  }
2474
2537
  };
2475
2538
  var emits = {
2476
- name(obj) {
2477
- if (obj.name) {
2478
- return obj.name.name + obj.name.description;
2479
- } else if (obj.emits) {
2480
- return obj.emits.name;
2539
+ name(obj2) {
2540
+ if (obj2.name) {
2541
+ return obj2.name.name + obj2.name.description;
2542
+ } else if (obj2.emits) {
2543
+ return obj2.emits.name;
2481
2544
  } else {
2482
2545
  return "";
2483
2546
  }
2484
2547
  },
2485
- description(obj) {
2486
- if (obj.description && obj.description.name) {
2487
- return obj.description.name + obj.description.description;
2488
- } else if (obj.descriptions) {
2489
- return obj.descriptions;
2490
- } else if (obj.emits) {
2491
- return obj.emits.description;
2548
+ description(obj2) {
2549
+ if (obj2.description && obj2.description.name) {
2550
+ return obj2.description.name + obj2.description.description;
2551
+ } else if (obj2.descriptions) {
2552
+ return obj2.descriptions;
2553
+ } else if (obj2.emits) {
2554
+ return obj2.emits.description;
2492
2555
  } else {
2493
2556
  return "";
2494
2557
  }
2495
2558
  },
2496
- selectable(obj) {
2497
- if (obj.selectable) {
2498
- return obj.selectable.name + obj.selectable.description;
2499
- } else if (obj.emits) {
2500
- return obj.emits.selectable;
2559
+ selectable(obj2) {
2560
+ if (obj2.selectable) {
2561
+ return obj2.selectable.name + obj2.selectable.description;
2562
+ } else if (obj2.emits) {
2563
+ return obj2.emits.selectable;
2501
2564
  } else {
2502
2565
  return "";
2503
2566
  }
2504
2567
  }
2505
2568
  };
2506
2569
  var expose = {
2507
- name(obj) {
2508
- if (obj.name) {
2509
- return obj.name.name + obj.name.description;
2510
- } else if (obj.expose) {
2511
- return obj.expose.name;
2570
+ name(obj2) {
2571
+ if (obj2.name) {
2572
+ return obj2.name.name + obj2.name.description;
2573
+ } else if (obj2.expose) {
2574
+ return obj2.expose.name;
2512
2575
  } else {
2513
2576
  return "";
2514
2577
  }
2515
2578
  },
2516
- description(obj) {
2517
- if (obj.description && obj.description.name) {
2518
- return obj.description.name + obj.description.description;
2519
- } else if (obj.descriptions) {
2520
- return obj.descriptions;
2521
- } else if (obj.expose) {
2522
- return obj.expose.description;
2579
+ description(obj2) {
2580
+ if (obj2.description && obj2.description.name) {
2581
+ return obj2.description.name + obj2.description.description;
2582
+ } else if (obj2.descriptions) {
2583
+ return obj2.descriptions;
2584
+ } else if (obj2.expose) {
2585
+ return obj2.expose.description;
2523
2586
  } else {
2524
2587
  return "";
2525
2588
  }
2526
2589
  },
2527
- selectable(obj) {
2528
- if (obj.selectable) {
2529
- return obj.selectable.name + obj.selectable.description;
2530
- } else if (obj.expose) {
2531
- return obj.expose.selectable;
2590
+ selectable(obj2) {
2591
+ if (obj2.selectable) {
2592
+ return obj2.selectable.name + obj2.selectable.description;
2593
+ } else if (obj2.expose) {
2594
+ return obj2.expose.selectable;
2532
2595
  } else {
2533
2596
  return "";
2534
2597
  }
2535
2598
  },
2536
- type(obj) {
2537
- if (obj.type) {
2538
- return obj.type.type || obj.type.name + obj.type.description;
2539
- } else if (obj.expose) {
2540
- return obj.expose.type;
2599
+ type(obj2) {
2600
+ if (obj2.type) {
2601
+ return obj2.type.type || obj2.type.name + obj2.type.description;
2602
+ } else if (obj2.expose) {
2603
+ return obj2.expose.type;
2541
2604
  } else {
2542
2605
  return "";
2543
2606
  }
2544
2607
  },
2545
- return(obj) {
2546
- if (obj.return) {
2547
- let t = obj.return.type;
2608
+ return(obj2) {
2609
+ if (obj2.return) {
2610
+ let t = obj2.return.type;
2548
2611
  if (t) {
2549
2612
  t = `[${t}]`;
2550
2613
  }
2551
- return t + (obj.return.name + obj.return.description);
2552
- } else if (obj.expose) {
2553
- return obj.expose.return;
2614
+ return t + (obj2.return.name + obj2.return.description);
2615
+ } else if (obj2.expose) {
2616
+ return obj2.expose.return;
2554
2617
  } else {
2555
2618
  return "";
2556
2619
  }
2557
2620
  }
2558
2621
  };
2559
2622
  var slot = {
2560
- name(obj) {
2561
- if (obj.name) {
2562
- return obj.name.name + obj.name.description;
2563
- } else if (obj.slot) {
2564
- return obj.slot.name;
2623
+ name(obj2) {
2624
+ if (obj2.name) {
2625
+ return obj2.name.name + obj2.name.description;
2626
+ } else if (obj2.slot) {
2627
+ return obj2.slot.name;
2565
2628
  } else {
2566
2629
  return "";
2567
2630
  }
2568
2631
  },
2569
- description(obj) {
2570
- if (obj.description && obj.description.name) {
2571
- return obj.description.name + obj.description.description;
2572
- } else if (obj.descriptions) {
2573
- return obj.descriptions;
2574
- } else if (obj.slot) {
2575
- return obj.slot.description;
2632
+ description(obj2) {
2633
+ if (obj2.description && obj2.description.name) {
2634
+ return obj2.description.name + obj2.description.description;
2635
+ } else if (obj2.descriptions) {
2636
+ return obj2.descriptions;
2637
+ } else if (obj2.slot) {
2638
+ return obj2.slot.description;
2576
2639
  } else {
2577
2640
  return "";
2578
2641
  }
2579
2642
  },
2580
- selectable(obj) {
2581
- if (obj.selectable) {
2582
- return obj.selectable.name + obj.selectable.description;
2583
- } else if (obj.slot) {
2584
- return obj.slot.selectable;
2643
+ selectable(obj2) {
2644
+ if (obj2.selectable) {
2645
+ return obj2.selectable.name + obj2.selectable.description;
2646
+ } else if (obj2.slot) {
2647
+ return obj2.slot.selectable;
2585
2648
  } else {
2586
2649
  return "";
2587
2650
  }
2588
2651
  }
2589
2652
  };
2590
2653
  function getPropsValue2(arr) {
2591
- return arr.map((obj) => {
2654
+ return arr.map((obj2) => {
2592
2655
  const v = {};
2593
2656
  Object.keys(props).forEach((key) => {
2594
- v[key] = props[key](obj);
2657
+ v[key] = props[key](obj2);
2595
2658
  });
2596
2659
  return v;
2597
2660
  });
2598
2661
  }
2599
2662
  function getEmitsValue(arr) {
2600
- return arr.map((obj) => {
2663
+ return arr.map((obj2) => {
2601
2664
  const v = {};
2602
2665
  Object.keys(emits).forEach((key) => {
2603
- v[key] = emits[key](obj);
2666
+ v[key] = emits[key](obj2);
2604
2667
  });
2605
2668
  return v;
2606
2669
  });
2607
2670
  }
2608
2671
  function getExposeValue(arr) {
2609
- return arr.map((obj) => {
2672
+ return arr.map((obj2) => {
2610
2673
  const v = {};
2611
2674
  Object.keys(expose).forEach((key) => {
2612
- v[key] = expose[key](obj);
2675
+ v[key] = expose[key](obj2);
2613
2676
  });
2614
2677
  return v;
2615
2678
  });
2616
2679
  }
2617
2680
  function getSlotValue(arr) {
2618
- return arr.map((obj) => {
2681
+ return arr.map((obj2) => {
2619
2682
  const v = {};
2620
2683
  Object.keys(slot).forEach((key) => {
2621
- v[key] = slot[key](obj);
2684
+ v[key] = slot[key](obj2);
2622
2685
  });
2623
2686
  return v;
2624
2687
  });
@@ -2630,13 +2693,13 @@ function getObj(v) {
2630
2693
  delete v.source;
2631
2694
  return v;
2632
2695
  }
2633
- function getFilter(obj, keyArr) {
2696
+ function getFilter(obj2, keyArr) {
2634
2697
  const _objs = {
2635
- descriptions: obj?.description || ""
2698
+ descriptions: obj2?.description || ""
2636
2699
  };
2637
2700
  const arr = [];
2638
- if (obj?.tags) {
2639
- obj?.tags?.forEach((v, index) => {
2701
+ if (obj2?.tags) {
2702
+ obj2?.tags?.forEach((v, index) => {
2640
2703
  let tag = v.tag;
2641
2704
  let ov = getObj(v);
2642
2705
  if (!_objs.hasOwnProperty(tag) && keyArr.includes(tag)) {
@@ -2657,9 +2720,9 @@ function getFilter(obj, keyArr) {
2657
2720
  };
2658
2721
  }
2659
2722
  var titles = [];
2660
- function setTitle(obj) {
2723
+ function setTitle(obj2) {
2661
2724
  const arr = ["title", "author", "date"];
2662
- const fobj = getFilter(obj, arr);
2725
+ const fobj = getFilter(obj2, arr);
2663
2726
  const value = {};
2664
2727
  arr.forEach((key) => {
2665
2728
  value[key] = fobj.obj[key];
@@ -2670,9 +2733,9 @@ function setTitle(obj) {
2670
2733
  });
2671
2734
  }
2672
2735
  var states = [];
2673
- function setState(obj) {
2736
+ function setState(obj2) {
2674
2737
  const arr = ["state", "type"];
2675
- const fobj = getFilter(obj, arr);
2738
+ const fobj = getFilter(obj2, arr);
2676
2739
  const value = {};
2677
2740
  arr.forEach((key) => {
2678
2741
  value[key] = fobj.obj[key];
@@ -2694,34 +2757,34 @@ function addError(value) {
2694
2757
  function addState(value) {
2695
2758
  states.push(value);
2696
2759
  }
2697
- function addTags(tag, obj) {
2760
+ function addTags(tag, obj2) {
2698
2761
  switch (tag) {
2699
2762
  case "title":
2700
- addTitle(obj);
2763
+ addTitle(obj2);
2701
2764
  return true;
2702
2765
  case "proposal":
2703
- addProposal(obj);
2766
+ addProposal(obj2);
2704
2767
  return true;
2705
2768
  case "error":
2706
- addError(obj);
2769
+ addError(obj2);
2707
2770
  return true;
2708
2771
  case "state":
2709
- addState(obj);
2772
+ addState(obj2);
2710
2773
  return true;
2711
2774
  case "text":
2712
- addTitle(obj);
2775
+ addTitle(obj2);
2713
2776
  return true;
2714
2777
  case "html":
2715
- addTitle(obj);
2778
+ addTitle(obj2);
2716
2779
  return true;
2717
2780
  default:
2718
2781
  return false;
2719
2782
  }
2720
2783
  }
2721
- function setTags(tag, obj) {
2784
+ function setTags(tag, obj2) {
2722
2785
  switch (tag) {
2723
2786
  case "title":
2724
- setTitle(obj);
2787
+ setTitle(obj2);
2725
2788
  return true;
2726
2789
  // case 'proposal':
2727
2790
  // setProposal(obj);
@@ -2730,7 +2793,7 @@ function setTags(tag, obj) {
2730
2793
  // setError(obj);
2731
2794
  // return true;
2732
2795
  case "state":
2733
- setState(obj);
2796
+ setState(obj2);
2734
2797
  return true;
2735
2798
  default:
2736
2799
  return false;
@@ -2740,13 +2803,13 @@ function getNotes(text) {
2740
2803
  titles = [];
2741
2804
  states = [];
2742
2805
  const notes = getTextNotes(text);
2743
- notes?.forEach((obj) => {
2744
- let tags = obj?.tags || [];
2806
+ notes?.forEach((obj2) => {
2807
+ let tags = obj2?.tags || [];
2745
2808
  let lg = tags?.length || 0;
2746
2809
  if (lg > 0) {
2747
2810
  for (let i = 0; i < lg; i++) {
2748
2811
  const v = tags[i] || {};
2749
- let is = setTags(v.tag, obj);
2812
+ let is = setTags(v.tag, obj2);
2750
2813
  if (is) {
2751
2814
  break;
2752
2815
  }
@@ -2800,10 +2863,10 @@ function getTopDom(props2, h4, isZy) {
2800
2863
  doms = [];
2801
2864
  }
2802
2865
  };
2803
- props2?.forEach((obj) => {
2866
+ props2?.forEach((obj2) => {
2804
2867
  const info = [];
2805
2868
  let is = false;
2806
- if (obj.date) {
2869
+ if (obj2.date) {
2807
2870
  is = true;
2808
2871
  info.push(
2809
2872
  h4(
@@ -2815,14 +2878,14 @@ function getTopDom(props2, h4, isZy) {
2815
2878
  h4("span", {}, "\u66F4\u65B0\u65F6\u95F4\uFF1A"),
2816
2879
  h4("span", {}, [
2817
2880
  getValue(
2818
- obj.date.name + " " + obj.date.description
2881
+ obj2.date.name + " " + obj2.date.description
2819
2882
  )
2820
2883
  ])
2821
2884
  ]
2822
2885
  )
2823
2886
  );
2824
2887
  }
2825
- if (obj.author) {
2888
+ if (obj2.author) {
2826
2889
  is = true;
2827
2890
  info.push(
2828
2891
  h4(
@@ -2834,25 +2897,25 @@ function getTopDom(props2, h4, isZy) {
2834
2897
  h4("span", {}, "\u4F5C\u8005\uFF1A"),
2835
2898
  h4("span", {}, [
2836
2899
  getValue(
2837
- obj.author.name + " " + obj.author.description
2900
+ obj2.author.name + " " + obj2.author.description
2838
2901
  )
2839
2902
  ])
2840
2903
  ]
2841
2904
  )
2842
2905
  );
2843
2906
  }
2844
- if (obj.title && (obj.title.type || obj.title.name || obj.title.description)) {
2907
+ if (obj2.title && (obj2.title.type || obj2.title.name || obj2.title.description)) {
2845
2908
  setTitle3();
2846
2909
  if (is) {
2847
2910
  setDivision();
2848
2911
  }
2849
- let type = (obj.title.type || "div").split(".");
2912
+ let type = (obj2.title.type || "div").split(".");
2850
2913
  let c = type[1] || "";
2851
2914
  if (type[0] == "html") {
2852
2915
  doms.push(
2853
2916
  h4("div", {
2854
2917
  class: "compo-top-title " + c,
2855
- innerHTML: obj.title.name + " " + obj.title.description
2918
+ innerHTML: obj2.title.name + " " + obj2.title.description
2856
2919
  })
2857
2920
  );
2858
2921
  } else {
@@ -2865,7 +2928,7 @@ function getTopDom(props2, h4, isZy) {
2865
2928
  [
2866
2929
  h4("span", {}, [
2867
2930
  getValue(
2868
- obj.title.name + " " + obj.title.description
2931
+ obj2.title.name + " " + obj2.title.description
2869
2932
  )
2870
2933
  ])
2871
2934
  ]
@@ -2888,25 +2951,25 @@ function getTopDom(props2, h4, isZy) {
2888
2951
  )
2889
2952
  );
2890
2953
  }
2891
- if (obj.html) {
2892
- let type = (obj.html.type || "div").split(".");
2954
+ if (obj2.html) {
2955
+ let type = (obj2.html.type || "div").split(".");
2893
2956
  let c = type[1] || "";
2894
2957
  list.push(
2895
2958
  h4(type[0], {
2896
2959
  class: "compo-top-html " + c,
2897
- innerHTML: obj.html.name + " " + obj.html.description
2960
+ innerHTML: obj2.html.name + " " + obj2.html.description
2898
2961
  })
2899
2962
  );
2900
2963
  }
2901
2964
  ["text"].forEach((v) => {
2902
- if (obj[v]) {
2903
- let type = (obj[v].type || "div").split(".");
2965
+ if (obj2[v]) {
2966
+ let type = (obj2[v].type || "div").split(".");
2904
2967
  let c = type[1] || "";
2905
2968
  if (type[0] == "html") {
2906
2969
  list.push(
2907
2970
  h4("div", {
2908
2971
  class: "compo-top-" + v + " " + c,
2909
- innerHTML: obj[v].name + " " + obj[v].description
2972
+ innerHTML: obj2[v].name + " " + obj2[v].description
2910
2973
  })
2911
2974
  );
2912
2975
  } else {
@@ -2919,7 +2982,7 @@ function getTopDom(props2, h4, isZy) {
2919
2982
  [
2920
2983
  h4("span", {}, [
2921
2984
  getValue(
2922
- obj[v].name + " " + obj[v].description
2985
+ obj2[v].name + " " + obj2[v].description
2923
2986
  )
2924
2987
  ])
2925
2988
  ]
@@ -2993,10 +3056,10 @@ function getTestTopDom(props2, h4, isZy) {
2993
3056
  doms = [];
2994
3057
  }
2995
3058
  };
2996
- props2.forEach((obj) => {
3059
+ props2.forEach((obj2) => {
2997
3060
  const info = [];
2998
3061
  let is = false;
2999
- if (obj.date) {
3062
+ if (obj2.date) {
3000
3063
  is = true;
3001
3064
  info.push(
3002
3065
  h4(
@@ -3008,14 +3071,14 @@ function getTestTopDom(props2, h4, isZy) {
3008
3071
  h4("span", {}, "\u66F4\u65B0\u65F6\u95F4\uFF1A"),
3009
3072
  h4("span", {}, [
3010
3073
  getValue(
3011
- obj.date.name + " " + obj.date.description
3074
+ obj2.date.name + " " + obj2.date.description
3012
3075
  )
3013
3076
  ])
3014
3077
  ]
3015
3078
  )
3016
3079
  );
3017
3080
  }
3018
- if (obj.author) {
3081
+ if (obj2.author) {
3019
3082
  is = true;
3020
3083
  info.push(
3021
3084
  h4(
@@ -3027,25 +3090,25 @@ function getTestTopDom(props2, h4, isZy) {
3027
3090
  h4("span", {}, "\u4F5C\u8005\uFF1A"),
3028
3091
  h4("span", {}, [
3029
3092
  getValue(
3030
- obj.author.name + " " + obj.author.description
3093
+ obj2.author.name + " " + obj2.author.description
3031
3094
  )
3032
3095
  ])
3033
3096
  ]
3034
3097
  )
3035
3098
  );
3036
3099
  }
3037
- if (obj.title && (obj.title.type || obj.title.name || obj.title.description)) {
3100
+ if (obj2.title && (obj2.title.type || obj2.title.name || obj2.title.description)) {
3038
3101
  setTitle3();
3039
3102
  if (is) {
3040
3103
  setDivision();
3041
3104
  }
3042
- let type = (obj.title.type || "div").split(".");
3105
+ let type = (obj2.title.type || "div").split(".");
3043
3106
  let c = type[1] || "";
3044
3107
  if (type[0] == "html") {
3045
3108
  doms.push(
3046
3109
  h4("div", {
3047
3110
  class: "test-top-title " + c,
3048
- innerHTML: obj.title.name + " " + obj.title.description
3111
+ innerHTML: obj2.title.name + " " + obj2.title.description
3049
3112
  })
3050
3113
  );
3051
3114
  } else {
@@ -3058,7 +3121,7 @@ function getTestTopDom(props2, h4, isZy) {
3058
3121
  [
3059
3122
  h4("span", {}, [
3060
3123
  getValue(
3061
- obj.title.name + " " + obj.title.description
3124
+ obj2.title.name + " " + obj2.title.description
3062
3125
  )
3063
3126
  ])
3064
3127
  ]
@@ -3081,25 +3144,25 @@ function getTestTopDom(props2, h4, isZy) {
3081
3144
  )
3082
3145
  );
3083
3146
  }
3084
- if (obj.html) {
3085
- let type = (obj.html.type || "div").split(".");
3147
+ if (obj2.html) {
3148
+ let type = (obj2.html.type || "div").split(".");
3086
3149
  let c = type[1] || "";
3087
3150
  list.push(
3088
3151
  h4(type[0], {
3089
3152
  class: "test-top-html " + c,
3090
- innerHTML: obj.html.name + " " + obj.html.description
3153
+ innerHTML: obj2.html.name + " " + obj2.html.description
3091
3154
  })
3092
3155
  );
3093
3156
  }
3094
3157
  ["text", "proposal", "error"].forEach((v) => {
3095
- if (obj[v]) {
3096
- let type = (obj[v].type || "div").split(".");
3158
+ if (obj2[v]) {
3159
+ let type = (obj2[v].type || "div").split(".");
3097
3160
  let c = type[1] || "";
3098
3161
  if (type[0] == "html") {
3099
3162
  list.push(
3100
3163
  h4("div", {
3101
3164
  class: "test-top-" + v + " " + c,
3102
- innerHTML: obj[v].name + " " + obj[v].description
3165
+ innerHTML: obj2[v].name + " " + obj2[v].description
3103
3166
  })
3104
3167
  );
3105
3168
  } else {
@@ -3112,7 +3175,7 @@ function getTestTopDom(props2, h4, isZy) {
3112
3175
  [
3113
3176
  h4("span", {}, [
3114
3177
  getValue(
3115
- obj[v].name + " " + obj[v].description
3178
+ obj2[v].name + " " + obj2[v].description
3116
3179
  )
3117
3180
  ])
3118
3181
  ]
@@ -3214,10 +3277,27 @@ function getFunctionFormat(v) {
3214
3277
  }
3215
3278
 
3216
3279
  // packages/components/use/util.ts
3217
- function prettierFormat(st) {
3218
- return st.replace(/\;(\s|\n\r)*$/, "");
3280
+ var getFormat2 = (r) => {
3281
+ return r;
3282
+ };
3283
+ var isp = getConfig("prettier");
3284
+ if (isp) {
3285
+ Promise.resolve().then(() => (init_prettier(), prettier_exports)).then((d) => {
3286
+ getFormat2 = d.getFormat;
3287
+ });
3219
3288
  }
3220
3289
  function prettierHtml(st) {
3290
+ if (isp) {
3291
+ const v = getFormat2(st, "html");
3292
+ return v;
3293
+ }
3294
+ return st;
3295
+ }
3296
+ function prettierTs(st) {
3297
+ if (isp) {
3298
+ const v = getFormat2(st, "ts");
3299
+ return v;
3300
+ }
3221
3301
  return st;
3222
3302
  }
3223
3303
  function vueFormat(st, kg = "") {
@@ -3265,11 +3345,11 @@ function sonType(type) {
3265
3345
  }
3266
3346
  }
3267
3347
  function sonTypes(type, arr) {
3268
- let obj = sonType(type);
3269
- if (obj) {
3270
- arr.push(obj.own);
3271
- if (obj.son) {
3272
- sonTypes(obj.son, arr);
3348
+ let obj2 = sonType(type);
3349
+ if (obj2) {
3350
+ arr.push(obj2.own);
3351
+ if (obj2.son) {
3352
+ sonTypes(obj2.son, arr);
3273
3353
  }
3274
3354
  } else {
3275
3355
  arr.push(type);
@@ -3316,21 +3396,21 @@ function getTypeValue(arr) {
3316
3396
  }
3317
3397
  }
3318
3398
  function setDataType(arr) {
3319
- let ts = "";
3399
+ let ts2 = "";
3320
3400
  arr.forEach((v, index) => {
3321
3401
  v = v.trim();
3322
3402
  if (v) {
3323
- if (ts) {
3324
- ts += " | ";
3403
+ if (ts2) {
3404
+ ts2 += " | ";
3325
3405
  }
3326
3406
  if (v === "Array") {
3327
- ts += "Array<any>";
3407
+ ts2 += "Array<any>";
3328
3408
  } else {
3329
- ts += v;
3409
+ ts2 += v;
3330
3410
  }
3331
3411
  }
3332
3412
  });
3333
- return ts || "any";
3413
+ return ts2 || "any";
3334
3414
  }
3335
3415
  var splitIgnoringNesting = (str, delimiter) => {
3336
3416
  let bracketStack = [];
@@ -3433,21 +3513,21 @@ var keywords = ["class"];
3433
3513
  function getSpecObjs(specs, name) {
3434
3514
  return specs.filter((o) => o.name == name)[0];
3435
3515
  }
3436
- function getParameStr(css) {
3437
- return css.map((o) => {
3516
+ function getParameStr(css2) {
3517
+ return css2.map((o) => {
3438
3518
  const name = o.prop || "...arr";
3439
3519
  return name + ":" + setDataType(o.dataType);
3440
3520
  }).join(",");
3441
3521
  }
3442
- function getHmtl(propsname, param, value, slotValue, propsText, exposeText) {
3522
+ async function getHmtl(propsname, param, value, slotValue, propsText, exposeText) {
3443
3523
  const tarr = [];
3444
3524
  const sarr = [];
3445
3525
  let is = true;
3446
3526
  const ps = getPropsValue2(param.propss || []);
3447
- const es = getEmitsValue(param.emitss || []);
3527
+ const es2 = getEmitsValue(param.emitss || []);
3448
3528
  const res = getExposeValue(param.exposes || []);
3449
3529
  const ss = getSlotValue(param.slots || []);
3450
- Object.keys(value).forEach((key) => {
3530
+ Object.keys(value).forEach(async (key) => {
3451
3531
  let val = value[key];
3452
3532
  if (/^on[A-Z]/.test(key) && typeof val == "function") {
3453
3533
  let name = key.substring(2);
@@ -3472,13 +3552,13 @@ function getHmtl(propsname, param, value, slotValue, propsText, exposeText) {
3472
3552
  strs = arr.join("");
3473
3553
  }
3474
3554
  tarr.push(" @" + name + '="' + strs + '"');
3475
- const sp = getSpecObjs(es, name) || {};
3555
+ const sp = getSpecObjs(es2, name) || {};
3476
3556
  const s = sp.selectable || "";
3477
- const css = parseParamString(s);
3478
- const cs = getParameStr(css);
3557
+ const css2 = parseParamString(s);
3558
+ const cs = getParameStr(css2);
3479
3559
  sarr.push(`// ${sp.description} ${sp.name}: (${sp.selectable})`);
3480
3560
  sarr.push("function " + strs + "(" + cs + ") {");
3481
- css.forEach((o) => {
3561
+ css2.forEach((o) => {
3482
3562
  const name2 = o.name || "arr";
3483
3563
  sarr.push(" console.log('" + o.label + "', " + name2 + ")");
3484
3564
  });
@@ -3496,7 +3576,7 @@ function getHmtl(propsname, param, value, slotValue, propsText, exposeText) {
3496
3576
  );
3497
3577
  if (typeof val == "function" || t.dataType.length == 1 && t.type == "function" && val) {
3498
3578
  sarr.push(
3499
- "const " + key + " = " + getFunctionBody(
3579
+ "const " + key + " = " + await getFunctionBody(
3500
3580
  val,
3501
3581
  key,
3502
3582
  propsText
@@ -3538,10 +3618,10 @@ function getHmtl(propsname, param, value, slotValue, propsText, exposeText) {
3538
3618
  `// ${s.description} ${s.name}\uFF1A(${s.selectable}) ${s.type}`
3539
3619
  );
3540
3620
  const m = v.name + "Value";
3541
- const css = parseParamString(s?.selectable || "");
3621
+ const css2 = parseParamString(s?.selectable || "");
3542
3622
  const cs = [];
3543
3623
  const ps2 = v.params || [];
3544
- css.forEach((c, index) => {
3624
+ css2.forEach((c, index) => {
3545
3625
  const prop = c.name;
3546
3626
  if (prop) {
3547
3627
  const key = prop + v.name;
@@ -3587,24 +3667,27 @@ function getHmtl(propsname, param, value, slotValue, propsText, exposeText) {
3587
3667
  tarr.unshift("");
3588
3668
  }
3589
3669
  const slots = getSlots(slotValue, ss);
3590
- const st = `<!--${propsname}-->
3591
- <template>
3592
- <div>
3670
+ let template = `<template>
3671
+ <div>
3593
3672
  <${propsname}${tarr.join("\n")}>${slots.join("\n")}
3594
3673
  </${propsname}>
3595
- </div>
3596
- </template>
3674
+ </div>
3675
+ </template>`;
3676
+ template = await prettierHtml(template);
3677
+ let js2 = sarr.join("\n");
3678
+ js2 = await prettierTs(js2);
3679
+ const st = `<!--${propsname}-->
3680
+ ${template}
3597
3681
  <script lang="ts" setup>
3598
- ${sarr.join("\n")}
3599
- </script>
3600
- `;
3682
+ ${js2}
3683
+ </script>`;
3601
3684
  return st;
3602
3685
  }
3603
- function getSlots(obj = {}, ss) {
3686
+ function getSlots(obj2 = {}, ss) {
3604
3687
  const arr = [];
3605
- Object.keys(obj).forEach((key) => {
3688
+ Object.keys(obj2).forEach((key) => {
3606
3689
  const sp = getSpecObjs(ss, key) || {};
3607
- const v = obj[key];
3690
+ const v = obj2[key];
3608
3691
  if (v) {
3609
3692
  const st = ` <!-- ${sp.description} ${sp.name}\uFF1A(${sp.selectable}) -->
3610
3693
  <template #${key}="scope">
@@ -3632,8 +3715,8 @@ function getFunctionBody(v, key, propsText) {
3632
3715
  return funstr(v.toString());
3633
3716
  }
3634
3717
  }
3635
- function funstr(v) {
3636
- const st = getFunctionFormat(prettierFormat(v));
3718
+ async function funstr(v) {
3719
+ const st = getFunctionFormat(v);
3637
3720
  if (st) {
3638
3721
  let body = `{
3639
3722
  ${vueFormat(getFunBody(st.body), " ")}
@@ -3644,8 +3727,8 @@ ${vueFormat(getFunBody(st.body), " ")}
3644
3727
  }
3645
3728
  }
3646
3729
  function getTypeValueFunction(sp) {
3647
- const css = parseParamString(sp.selectable);
3648
- const cs = getParameStr(css);
3730
+ const css2 = parseParamString(sp.selectable);
3731
+ const cs = getParameStr(css2);
3649
3732
  let rs = "";
3650
3733
  if (sp.return) {
3651
3734
  rs = "return ";
@@ -3732,14 +3815,14 @@ function getObjValue(d, type) {
3732
3815
  return "" + d;
3733
3816
  }
3734
3817
  }
3735
- function getDefaultValue(obj, is = true) {
3736
- const vo = getSpecType(obj);
3818
+ function getDefaultValue(obj2, is = true) {
3819
+ const vo = getSpecType(obj2);
3737
3820
  const v = getTypeValue(vo.dataType);
3738
3821
  if (is) {
3739
- const d = (obj.default || "").trim();
3822
+ const d = (obj2.default || "").trim();
3740
3823
  return getObjValue(d || v, vo.dataType[0]);
3741
3824
  } else {
3742
- const d = (obj.default || "").trim();
3825
+ const d = (obj2.default || "").trim();
3743
3826
  return getObjValue(d, vo.dataType[0]);
3744
3827
  }
3745
3828
  }
@@ -3754,7 +3837,7 @@ var notesObj = {
3754
3837
  };
3755
3838
  function getDefault(ss, iss) {
3756
3839
  let c = ss.charAt(0);
3757
- let css = [
3840
+ let css2 = [
3758
3841
  ['"', '"'],
3759
3842
  ["'", "'"],
3760
3843
  ["`", "`"],
@@ -3762,7 +3845,7 @@ function getDefault(ss, iss) {
3762
3845
  ["{", "}"],
3763
3846
  ["[", "]"]
3764
3847
  ];
3765
- const cs = css.map((o) => o[0]);
3848
+ const cs = css2.map((o) => o[0]);
3766
3849
  let ci = cs.indexOf(c);
3767
3850
  if (ci != -1) {
3768
3851
  let bracketStack = [c];
@@ -3773,7 +3856,7 @@ function getDefault(ss, iss) {
3773
3856
  } else {
3774
3857
  let is = false;
3775
3858
  char === "]" && bracketStack[bracketStack.length - 1] === "[";
3776
- for (let v of css) {
3859
+ for (let v of css2) {
3777
3860
  if (char === v[1] && bracketStack[bracketStack.length - 1] === v[0]) {
3778
3861
  is = true;
3779
3862
  break;
@@ -3844,7 +3927,7 @@ function getObj2(v) {
3844
3927
  v.selectable = selectable;
3845
3928
  return v;
3846
3929
  }
3847
- function setTitle2(obj) {
3930
+ function setTitle2(obj2) {
3848
3931
  let title = "";
3849
3932
  let name = "";
3850
3933
  let author = "";
@@ -3859,7 +3942,7 @@ function setTitle2(obj) {
3859
3942
  // 'description',
3860
3943
  // 'descriptions',
3861
3944
  ];
3862
- let fobj = getFilter2(obj, arr);
3945
+ let fobj = getFilter2(obj2, arr);
3863
3946
  let value = {};
3864
3947
  arr.forEach((key) => {
3865
3948
  value[key] = fobj.obj[key];
@@ -3872,7 +3955,7 @@ function setTitle2(obj) {
3872
3955
  function addTitles(value) {
3873
3956
  notesObj.titles.push(value);
3874
3957
  }
3875
- function setProps(obj) {
3958
+ function setProps(obj2) {
3876
3959
  let name = "";
3877
3960
  let type = "";
3878
3961
  let defaults = "";
@@ -3889,7 +3972,7 @@ function setProps(obj) {
3889
3972
  "descriptions",
3890
3973
  "return"
3891
3974
  ];
3892
- let fobj = getFilter2(obj, arr);
3975
+ let fobj = getFilter2(obj2, arr);
3893
3976
  let value = {};
3894
3977
  arr.forEach((key) => {
3895
3978
  value[key] = fobj.obj[key];
@@ -3899,12 +3982,12 @@ function setProps(obj) {
3899
3982
  addTags2(o.key, o.value);
3900
3983
  });
3901
3984
  }
3902
- function setSlot(obj) {
3985
+ function setSlot(obj2) {
3903
3986
  let name = "";
3904
3987
  let description = "";
3905
3988
  let selectable = "";
3906
3989
  let arr = ["slot", "name", "selectable", "description", "descriptions"];
3907
- let fobj = getFilter2(obj, arr);
3990
+ let fobj = getFilter2(obj2, arr);
3908
3991
  let value = {};
3909
3992
  arr.forEach((key) => {
3910
3993
  value[key] = fobj.obj[key];
@@ -3914,9 +3997,9 @@ function setSlot(obj) {
3914
3997
  addTags2(o.key, o.value);
3915
3998
  });
3916
3999
  }
3917
- function setEmits(obj) {
4000
+ function setEmits(obj2) {
3918
4001
  let arr = ["emits", "name", "selectable", "description", "descriptions"];
3919
- let fobj = getFilter2(obj, arr);
4002
+ let fobj = getFilter2(obj2, arr);
3920
4003
  let value = {};
3921
4004
  arr.forEach((key) => {
3922
4005
  value[key] = fobj.obj[key];
@@ -3926,7 +4009,7 @@ function setEmits(obj) {
3926
4009
  addTags2(o.key, o.value);
3927
4010
  });
3928
4011
  }
3929
- function setExpose(obj) {
4012
+ function setExpose(obj2) {
3930
4013
  let arr = [
3931
4014
  "expose",
3932
4015
  "name",
@@ -3936,7 +4019,7 @@ function setExpose(obj) {
3936
4019
  "description",
3937
4020
  "descriptions"
3938
4021
  ];
3939
- let fobj = getFilter2(obj, arr);
4022
+ let fobj = getFilter2(obj2, arr);
3940
4023
  let value = {};
3941
4024
  arr.forEach((key) => {
3942
4025
  value[key] = fobj.obj[key];
@@ -3963,13 +4046,13 @@ function init() {
3963
4046
  notesObj[key] = [];
3964
4047
  });
3965
4048
  }
3966
- function getFilter2(obj, arrs) {
4049
+ function getFilter2(obj2, arrs) {
3967
4050
  const _objs = {
3968
- descriptions: obj?.description || ""
4051
+ descriptions: obj2?.description || ""
3969
4052
  };
3970
4053
  const arr = [];
3971
- if (obj?.tags) {
3972
- obj.tags?.forEach((v) => {
4054
+ if (obj2?.tags) {
4055
+ obj2.tags?.forEach((v) => {
3973
4056
  let tag = v.tag;
3974
4057
  let ov = getObj2(v);
3975
4058
  if (!_objs.hasOwnProperty(tag)) {
@@ -3989,46 +4072,46 @@ function getFilter2(obj, arrs) {
3989
4072
  obj: _objs
3990
4073
  };
3991
4074
  }
3992
- function addTags2(tag, obj) {
4075
+ function addTags2(tag, obj2) {
3993
4076
  switch (tag) {
3994
4077
  case "title":
3995
- addTitles(obj);
4078
+ addTitles(obj2);
3996
4079
  return true;
3997
4080
  case "text":
3998
- addTitles(obj);
4081
+ addTitles(obj2);
3999
4082
  return true;
4000
4083
  case "props":
4001
- addObj(obj, "props");
4084
+ addObj(obj2, "props");
4002
4085
  return true;
4003
4086
  case "slot":
4004
- addObj(obj, "slot");
4087
+ addObj(obj2, "slot");
4005
4088
  return true;
4006
4089
  case "emits":
4007
- addObj(obj, "emits");
4090
+ addObj(obj2, "emits");
4008
4091
  return true;
4009
4092
  case "expose":
4010
- addObj(obj, "expose");
4093
+ addObj(obj2, "expose");
4011
4094
  return true;
4012
4095
  default:
4013
4096
  return false;
4014
4097
  }
4015
4098
  }
4016
- function setTags2(tag, obj) {
4099
+ function setTags2(tag, obj2) {
4017
4100
  switch (tag) {
4018
4101
  case "title":
4019
- setTitle2(obj);
4102
+ setTitle2(obj2);
4020
4103
  return true;
4021
4104
  case "props":
4022
- setProps(obj);
4105
+ setProps(obj2);
4023
4106
  return true;
4024
4107
  case "slot":
4025
- setSlot(obj);
4108
+ setSlot(obj2);
4026
4109
  return true;
4027
4110
  case "emits":
4028
- setEmits(obj);
4111
+ setEmits(obj2);
4029
4112
  return true;
4030
4113
  case "expose":
4031
- setExpose(obj);
4114
+ setExpose(obj2);
4032
4115
  return true;
4033
4116
  default:
4034
4117
  return false;
@@ -4036,13 +4119,13 @@ function setTags2(tag, obj) {
4036
4119
  }
4037
4120
  function notesFilter(notes) {
4038
4121
  init();
4039
- notes?.forEach((obj) => {
4040
- let tags = obj?.tags || [];
4122
+ notes?.forEach((obj2) => {
4123
+ let tags = obj2?.tags || [];
4041
4124
  let lg = tags?.length || 0;
4042
4125
  if (lg > 0) {
4043
4126
  for (let i = 0; i < lg; i++) {
4044
4127
  const v = tags[i] || {};
4045
- let is = setTags2(v.tag, obj);
4128
+ let is = setTags2(v.tag, obj2);
4046
4129
  if (is) {
4047
4130
  break;
4048
4131
  }
@@ -4135,15 +4218,15 @@ var texpose = [
4135
4218
  {
4136
4219
  label: "\u8FD4\u56DE\u503C",
4137
4220
  prop: "return",
4138
- formatter(obj) {
4139
- return expose.return(obj) || obj.expose.default || "";
4221
+ formatter(obj2) {
4222
+ return expose.return(obj2) || obj2.expose.default || "";
4140
4223
  }
4141
4224
  },
4142
4225
  {
4143
4226
  label: "\u7C7B\u578B",
4144
4227
  prop: "type",
4145
- formatter(obj) {
4146
- return expose.type(obj) || "function";
4228
+ formatter(obj2) {
4229
+ return expose.type(obj2) || "function";
4147
4230
  }
4148
4231
  }
4149
4232
  ];
@@ -4182,15 +4265,15 @@ function h3(div, sx, v) {
4182
4265
  var setHtml = h3;
4183
4266
  var configObj;
4184
4267
  var comps = [];
4185
- function getName(obj) {
4186
- let name = obj.value;
4268
+ function getName(obj2) {
4269
+ let name = obj2.value;
4187
4270
  if (configObj.usealias) {
4188
- name = obj.alias + "-" + name;
4271
+ name = obj2.alias + "-" + name;
4189
4272
  }
4190
4273
  return lineToLargeHump(name);
4191
4274
  }
4192
- function gettests(obj, arr, n) {
4193
- const tests = getTestName(obj.key);
4275
+ function gettests(obj2, arr, n) {
4276
+ const tests = getTestName(obj2.key);
4194
4277
  if (tests && tests.length > 1 && configObj.generate?.type != 3) {
4195
4278
  asyncMergeArray(tests, (res, _reject, zv, inde) => {
4196
4279
  getLocalTextTests(zv).then((text) => {
@@ -4204,12 +4287,12 @@ function gettests(obj, arr, n) {
4204
4287
  getTestTopDom(titles2, setHtml, true)
4205
4288
  );
4206
4289
  arr.push(...setDom(dom));
4207
- arr.push(...setTestUrl(obj, zv));
4290
+ arr.push(...setTestUrl(obj2, zv));
4208
4291
  res();
4209
4292
  }).catch(() => {
4210
4293
  });
4211
4294
  }).then(() => {
4212
- setMd(obj, arr);
4295
+ setMd(obj2, arr);
4213
4296
  });
4214
4297
  } else {
4215
4298
  arr.push(`### \u793A\u4F8B 1`);
@@ -4222,33 +4305,33 @@ function gettests(obj, arr, n) {
4222
4305
  );
4223
4306
  arr.push(...setDom(dom));
4224
4307
  const v = configObj.generate?.vue || "cs/index.vue";
4225
- let key = configObj.example.dir + "/" + getLevelUrl(configObj.example.level, obj) + "/" + obj.value + "/" + v;
4308
+ let key = configObj.example.dir + "/" + getLevelUrl(configObj.example.level, obj2) + "/" + obj2.value + "/" + v;
4226
4309
  if (configObj.generate?.tests) {
4227
- const testurl = obj.url.substring(
4310
+ const testurl = obj2.url.substring(
4228
4311
  0,
4229
- obj.url.lastIndexOf("/" + obj.value + "/")
4230
- ) + "/" + obj.value;
4312
+ obj2.url.lastIndexOf("/" + obj2.value + "/")
4313
+ ) + "/" + obj2.value;
4231
4314
  const testsNanme = configObj.generate.testsNanme || "/tests/";
4232
4315
  key = testurl + testsNanme + v;
4233
4316
  }
4234
4317
  key = key.replace(/\/\//g, "/");
4235
4318
  arr.push(
4236
- ...setTestUrl(obj, {
4319
+ ...setTestUrl(obj2, {
4237
4320
  key,
4238
4321
  value: v
4239
4322
  })
4240
4323
  );
4241
4324
  if (configObj.generate?.type != 2) {
4242
- setVue(getName(obj), n, (0, import_node_path.join)(configObj.dir, key));
4325
+ setVue(getName(obj2), n, (0, import_node_path.join)(configObj.dir, key));
4243
4326
  }
4244
4327
  if (configObj.generate?.type != 3) {
4245
- setMd(obj, arr);
4328
+ setMd(obj2, arr);
4246
4329
  }
4247
4330
  }
4248
4331
  }
4249
- function setVue(propsname, param, url) {
4332
+ async function setVue(propsname, param, url) {
4250
4333
  const ps = getPropsValue2(param.propss || []);
4251
- const es = getEmitsValue(param.emitss || []);
4334
+ const es2 = getEmitsValue(param.emitss || []);
4252
4335
  const res = getExposeValue(param.exposes || []);
4253
4336
  const ss = getSlotValue(param.slots || []);
4254
4337
  const propsObj = {};
@@ -4260,7 +4343,7 @@ function setVue(propsname, param, url) {
4260
4343
  if (name) {
4261
4344
  propsObj[name] = getDefaultValue(val);
4262
4345
  if (arr && arr.length > 1) {
4263
- es.push({
4346
+ es2.push({
4264
4347
  name: "update:" + name,
4265
4348
  description: val.description,
4266
4349
  selectable: "value:[" + val.type + "]"
@@ -4269,7 +4352,7 @@ function setVue(propsname, param, url) {
4269
4352
  }
4270
4353
  }
4271
4354
  });
4272
- es.forEach((val) => {
4355
+ es2.forEach((val) => {
4273
4356
  let knam = val.name;
4274
4357
  if (knam.includes("-")) {
4275
4358
  let arr = knam.split("-");
@@ -4295,22 +4378,29 @@ function setVue(propsname, param, url) {
4295
4378
  type: v.type || v.default || "function"
4296
4379
  };
4297
4380
  });
4298
- const html = getHmtl(propsname, param, propsObj, slotValue, {}, exposeText);
4299
- Fang.fileOpen(url, html);
4381
+ const html2 = await getHmtl(
4382
+ propsname,
4383
+ param,
4384
+ propsObj,
4385
+ slotValue,
4386
+ {},
4387
+ exposeText
4388
+ );
4389
+ Fang.fileOpen(url, html2);
4300
4390
  }
4301
- function getMdurl(obj) {
4302
- const v = configObj.generate?.md || obj.value + ".md";
4391
+ function getMdurl(obj2) {
4392
+ const v = configObj.generate?.md || obj2.value + ".md";
4303
4393
  if (configObj.generate?.tests) {
4304
- const testurl = obj.url.substring(0, obj.url.lastIndexOf("/" + obj.value + "/")) + "/" + obj.value;
4394
+ const testurl = obj2.url.substring(0, obj2.url.lastIndexOf("/" + obj2.value + "/")) + "/" + obj2.value;
4305
4395
  const testsNanme = configObj.generate.testsNanme || "/tests/";
4306
4396
  return (0, import_node_path.join)(configObj.dir, testurl + testsNanme, v);
4307
4397
  }
4308
4398
  return (0, import_node_path.join)(configObj.dir, configObj.outDir, v);
4309
4399
  }
4310
4400
  var lss = 0;
4311
- function setMd(obj, arr) {
4401
+ function setMd(obj2, arr) {
4312
4402
  lss++;
4313
- const sc = getMdurl(obj);
4403
+ const sc = getMdurl(obj2);
4314
4404
  Fang.fileOpen(sc, arr.join("\n\n"));
4315
4405
  if (comps.length == lss) {
4316
4406
  if (configObj._callback_) {
@@ -4318,13 +4408,13 @@ function setMd(obj, arr) {
4318
4408
  }
4319
4409
  }
4320
4410
  }
4321
- function setTestUrl(obj, test) {
4411
+ function setTestUrl(obj2, test) {
4322
4412
  const arr = [];
4323
4413
  const tu = (0, import_node_path.join)(configObj.dir, test.key);
4324
- const sc = getMdurl(obj);
4414
+ const sc = getMdurl(obj2);
4325
4415
  const url = getImportUrl(sc, tu);
4326
4416
  if (configObj.setTest) {
4327
- arr.push(...configObj.setTest(url, test, obj));
4417
+ arr.push(...configObj.setTest(url, test, obj2));
4328
4418
  } else {
4329
4419
  arr.push(`:::preview ${test.value} || `);
4330
4420
  arr.push(`demo-preview=${url}`);
@@ -4340,8 +4430,8 @@ function setDom(dom) {
4340
4430
  async function getCompoData(value) {
4341
4431
  const arr = [];
4342
4432
  arr.push("# " + getName(value));
4343
- await getNotes2(value.key).then((obj) => {
4344
- let { titles: titles2, propss, slots, emitss, exposes } = obj;
4433
+ await getNotes2(value.key).then((obj2) => {
4434
+ let { titles: titles2, propss, slots, emitss, exposes } = obj2;
4345
4435
  const dom = setHtml(
4346
4436
  "div",
4347
4437
  {
@@ -4367,7 +4457,7 @@ async function getCompoData(value) {
4367
4457
  });
4368
4458
  }).then(() => {
4369
4459
  arr.push(`## \u793A\u4F8B`);
4370
- gettests(value, arr, obj);
4460
+ gettests(value, arr, obj2);
4371
4461
  });
4372
4462
  });
4373
4463
  }