@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,6 +1,66 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropNames = Object.getOwnPropertyNames;
3
+ var __esm = (fn, res) => function __init() {
4
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
5
+ };
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+
11
+ // packages/components/use/prettier.ts
12
+ var prettier_exports = {};
13
+ __export(prettier_exports, {
14
+ getFormat: () => getFormat
15
+ });
16
+ import { format } from "prettier";
17
+ import html from "prettier/plugins/html";
18
+ import css from "prettier/plugins/postcss";
19
+ import ts from "prettier/plugins/typescript";
20
+ import js from "prettier/plugins/babel";
21
+ import es from "prettier/plugins/estree";
22
+ async function getFormat(text, type) {
23
+ const v = await format(text, {
24
+ ...obj[type]
25
+ });
26
+ return v;
27
+ }
28
+ var obj;
29
+ var init_prettier = __esm({
30
+ "packages/components/use/prettier.ts"() {
31
+ "use strict";
32
+ obj = {
33
+ js: {
34
+ parser: "babel",
35
+ plugins: [js, es]
36
+ },
37
+ ts: {
38
+ parser: "typescript",
39
+ plugins: [ts, es]
40
+ },
41
+ css: {
42
+ parser: "css",
43
+ plugins: [css]
44
+ },
45
+ html: {
46
+ parser: "html",
47
+ plugins: [html]
48
+ },
49
+ json: {
50
+ parser: "json5",
51
+ plugins: []
52
+ },
53
+ vue: {
54
+ parser: "vue",
55
+ plugins: [css, html, js, ts, es]
56
+ }
57
+ };
58
+ }
59
+ });
60
+
1
61
  // node_modules/.pnpm/@fangzhongya+utils@0.0.28/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js
2
- function isArray(obj) {
3
- return Object.prototype.toString.call(obj) == "[object Array]";
62
+ function isArray(obj2) {
63
+ return Object.prototype.toString.call(obj2) == "[object Array]";
4
64
  }
5
65
 
6
66
  // node_modules/.pnpm/@fangzhongya+utils@0.0.28/node_modules/@fangzhongya/utils/dist/chunk-A276ZDLP.js
@@ -22,12 +82,12 @@ function getStartSames(str, val) {
22
82
  // node_modules/.pnpm/@fangzhongya+utils@0.0.28/node_modules/@fangzhongya/utils/dist/chunk-AWC672JW.js
23
83
  function getImportUrl(url, imp) {
24
84
  const arr = getStartSames(url, imp);
25
- const ts = arr[0];
26
- if (!/[\\|\/]$/.test(ts)) {
27
- const regs = ts.match(/[\\|\/]([^\\|\/]*)$/);
85
+ const ts2 = arr[0];
86
+ if (!/[\\|\/]$/.test(ts2)) {
87
+ const regs = ts2.match(/[\\|\/]([^\\|\/]*)$/);
28
88
  if (regs && regs.length > 0) {
29
89
  const a = regs[1];
30
- arr[0] = ts.substring(
90
+ arr[0] = ts2.substring(
31
91
  0,
32
92
  regs.index + 1
33
93
  );
@@ -94,8 +154,8 @@ function getUrlCatalogueObj(str) {
94
154
  };
95
155
  }
96
156
  function getNewFileName(url) {
97
- const obj = getUrlCatalogueObj(url);
98
- let wb = obj.name;
157
+ const obj2 = getUrlCatalogueObj(url);
158
+ let wb = obj2.name;
99
159
  if (wb) {
100
160
  const reg = /([0-9]+)$/g;
101
161
  const regs = reg.exec(wb);
@@ -106,7 +166,7 @@ function getNewFileName(url) {
106
166
  } else {
107
167
  wb = wb + "1";
108
168
  }
109
- return obj.catalogue + obj.apart + wb + "." + obj.suffix;
169
+ return obj2.catalogue + obj2.apart + wb + "." + obj2.suffix;
110
170
  } else {
111
171
  return "";
112
172
  }
@@ -332,27 +392,27 @@ function writeFileUrl(url, files, callback, isDirs, isFile, issynch) {
332
392
 
333
393
  // node_modules/.pnpm/@fangzhongya+create@0.2.34/node_modules/@fangzhongya/create/dist/chunk-PXLSY3ZR.js
334
394
  import { resolve, join as join2 } from "path";
335
- function styleLog(msg = "", obj) {
395
+ function styleLog(msg = "", obj2) {
336
396
  const arr = ["\x1B[0m"];
337
- if (obj?.revert) {
397
+ if (obj2?.revert) {
338
398
  arr.push("\x1B[4m");
339
399
  }
340
- if (obj?.lineThrough) {
400
+ if (obj2?.lineThrough) {
341
401
  arr.push("\x1B[9m");
342
402
  }
343
- if (obj?.italic) {
403
+ if (obj2?.italic) {
344
404
  arr.push("\x1B[3m");
345
405
  }
346
- if (obj?.bold) {
406
+ if (obj2?.bold) {
347
407
  arr.push("\x1B[1m");
348
408
  }
349
- if (obj?.bag) {
350
- arr.push(`\x1B[4${obj?.bag}m`);
409
+ if (obj2?.bag) {
410
+ arr.push(`\x1B[4${obj2?.bag}m`);
351
411
  } else {
352
412
  arr.push("\x1B[40m");
353
413
  }
354
- if (obj?.text) {
355
- arr.push(`\x1B[3${obj?.text}m`);
414
+ if (obj2?.text) {
415
+ arr.push(`\x1B[3${obj2?.text}m`);
356
416
  } else {
357
417
  arr.push("\x1B[30m");
358
418
  }
@@ -947,10 +1007,10 @@ function getVueText(content) {
947
1007
  return result;
948
1008
  }
949
1009
  function getVueTexts(content) {
950
- const obj = getVueText(content);
1010
+ const obj2 = getVueText(content);
951
1011
  return {
952
- script: obj.scripts.join("\n"),
953
- style: obj.styles.join("\n")
1012
+ script: obj2.scripts.join("\n"),
1013
+ style: obj2.styles.join("\n")
954
1014
  };
955
1015
  }
956
1016
 
@@ -996,11 +1056,11 @@ function matchsEnd2(key, matchs) {
996
1056
 
997
1057
  // packages/utils/common.ts
998
1058
  var defaultExtensions = ["vue", "js", "ts"];
999
- function getAliassNames(obj) {
1000
- let vm = humpToLine(obj.name);
1059
+ function getAliassNames(obj2) {
1060
+ let vm = humpToLine(obj2.name);
1001
1061
  let ass = [];
1002
- if (obj.alias) {
1003
- ass.push(obj.alias + "-" + vm);
1062
+ if (obj2.alias) {
1063
+ ass.push(obj2.alias + "-" + vm);
1004
1064
  }
1005
1065
  return ass;
1006
1066
  }
@@ -1772,29 +1832,29 @@ function getTests() {
1772
1832
  return getConfig("example");
1773
1833
  }
1774
1834
  function setExampleObj(dir, example, vexample, comRaw) {
1775
- const obj = mergeObject(example, vexample || {}, 3, true);
1776
- obj.exampless = obj.exampless || [];
1777
- obj.examplessRaw = obj.examplessRaw || [];
1835
+ const obj2 = mergeObject(example, vexample || {}, 3, true);
1836
+ obj2.exampless = obj2.exampless || [];
1837
+ obj2.examplessRaw = obj2.examplessRaw || [];
1778
1838
  const arr = [];
1779
- const examples = obj.examples;
1839
+ const examples = obj2.examples;
1780
1840
  if (examples) {
1781
1841
  Object.keys(examples).forEach((key) => {
1782
1842
  arr.push(key);
1783
1843
  examplesObj[key] = examples[key];
1784
1844
  });
1785
1845
  }
1786
- const examplesRaw = obj.examplesRaw;
1846
+ const examplesRaw = obj2.examplesRaw;
1787
1847
  const arrraw = [];
1788
- if (obj.urls && obj.urls.length > 0) {
1789
- obj.exampless = obj.urls;
1790
- obj.urls.forEach((key) => {
1848
+ if (obj2.urls && obj2.urls.length > 0) {
1849
+ obj2.exampless = obj2.urls;
1850
+ obj2.urls.forEach((key) => {
1791
1851
  arrraw.push(key);
1792
1852
  if (examplesRaw) {
1793
1853
  examplesRawObj[key] = getexamplesRawObj(examplesRaw, key);
1794
1854
  }
1795
1855
  });
1796
1856
  } else {
1797
- obj.exampless = arr;
1857
+ obj2.exampless = arr;
1798
1858
  if (examplesRaw) {
1799
1859
  Object.keys(examplesRaw).forEach((key) => {
1800
1860
  arrraw.push(key);
@@ -1802,13 +1862,13 @@ function setExampleObj(dir, example, vexample, comRaw) {
1802
1862
  });
1803
1863
  }
1804
1864
  }
1805
- obj.examples = void 0;
1865
+ obj2.examples = void 0;
1806
1866
  if (example.tests && comRaw) {
1807
1867
  const testsNanme = example.testsNanme || "/tests/";
1808
1868
  if (typeof testsNanme == "string") {
1809
1869
  Object.keys(comRaw).forEach((key) => {
1810
1870
  if (key.includes(testsNanme)) {
1811
- obj.exampless.push(key);
1871
+ obj2.exampless.push(key);
1812
1872
  arrraw.push(key);
1813
1873
  examplesRawObj[key] = getexamplesRawObj(comRaw, key);
1814
1874
  }
@@ -1816,17 +1876,17 @@ function setExampleObj(dir, example, vexample, comRaw) {
1816
1876
  } else {
1817
1877
  Object.keys(comRaw).forEach((key) => {
1818
1878
  if (testsNanme.test(key)) {
1819
- obj.exampless.push(key);
1879
+ obj2.exampless.push(key);
1820
1880
  arrraw.push(key);
1821
1881
  examplesRawObj[key] = getexamplesRawObj(comRaw, key);
1822
1882
  }
1823
1883
  });
1824
1884
  }
1825
1885
  }
1826
- obj.exampless = [...new Set(obj.exampless)];
1827
- obj.examplessRaw = [...new Set(arrraw)];
1828
- obj.examplesRaw = void 0;
1829
- exampleObj[dir] = obj;
1886
+ obj2.exampless = [...new Set(obj2.exampless)];
1887
+ obj2.examplessRaw = [...new Set(arrraw)];
1888
+ obj2.examplesRaw = void 0;
1889
+ exampleObj[dir] = obj2;
1830
1890
  }
1831
1891
  function getexamplesRawObj(comRaw, key) {
1832
1892
  if (typeof comRaw == "function") {
@@ -1880,16 +1940,16 @@ async function getImport(text, type) {
1880
1940
  return yrs;
1881
1941
  }
1882
1942
  }
1883
- function getLocalTextTests(obj) {
1943
+ function getLocalTextTests(obj2) {
1884
1944
  return new Promise((resolve2) => {
1885
- if (obj) {
1886
- if (obj.raw) {
1887
- resolve2(obj.raw);
1888
- } else if (obj.getRaw) {
1889
- obj.getRaw(obj).then((s) => {
1945
+ if (obj2) {
1946
+ if (obj2.raw) {
1947
+ resolve2(obj2.raw);
1948
+ } else if (obj2.getRaw) {
1949
+ obj2.getRaw(obj2).then((s) => {
1890
1950
  const m = getGetRawValue(s);
1891
- obj.raw = m;
1892
- obj.getRaw = null;
1951
+ obj2.raw = m;
1952
+ obj2.getRaw = null;
1893
1953
  resolve2(m);
1894
1954
  });
1895
1955
  } else {
@@ -1900,43 +1960,43 @@ function getLocalTextTests(obj) {
1900
1960
  }
1901
1961
  });
1902
1962
  }
1903
- function getLevelUrl(key, obj) {
1963
+ function getLevelUrl(key, obj2) {
1904
1964
  key = (key || "") + "";
1905
1965
  let url = "";
1906
1966
  switch (key) {
1907
1967
  case "1":
1908
- url = obj.tdir + "/";
1968
+ url = obj2.tdir + "/";
1909
1969
  break;
1910
1970
  case "2":
1911
- url = obj.adir + "/";
1971
+ url = obj2.adir + "/";
1912
1972
  break;
1913
1973
  case "3":
1914
- url = obj.tdir + "/" + obj.adir + "/";
1974
+ url = obj2.tdir + "/" + obj2.adir + "/";
1915
1975
  break;
1916
1976
  }
1917
1977
  return url;
1918
1978
  }
1919
- function getAliaslevelUrl(key, obj, componentName) {
1979
+ function getAliaslevelUrl(key, obj2, componentName) {
1920
1980
  key = (key || "") + "";
1921
1981
  componentName = (componentName || "") + "";
1922
- let vm = humpToLine(obj.name);
1982
+ let vm = humpToLine(obj2.name);
1923
1983
  let arr = [];
1924
1984
  if (key === "1") {
1925
- if (obj.alias) {
1926
- arr.push(obj.alias + "-" + vm);
1985
+ if (obj2.alias) {
1986
+ arr.push(obj2.alias + "-" + vm);
1927
1987
  }
1928
1988
  } else if (key === "3") {
1929
1989
  let a = "";
1930
- if (obj.alias) {
1931
- a = obj.alias + "-";
1990
+ if (obj2.alias) {
1991
+ a = obj2.alias + "-";
1932
1992
  }
1933
1993
  } else if (key === "4") {
1934
- obj.aliasNames?.forEach((v) => {
1994
+ obj2.aliasNames?.forEach((v) => {
1935
1995
  arr.push(humpToLine(v));
1936
1996
  });
1937
1997
  } else if (key == "9") {
1938
1998
  arr.push(vm);
1939
- obj.aliasNames?.forEach((v) => {
1999
+ obj2.aliasNames?.forEach((v) => {
1940
2000
  arr.push(humpToLine(v));
1941
2001
  });
1942
2002
  }
@@ -2242,14 +2302,14 @@ function getComponents() {
2242
2302
  });
2243
2303
  }
2244
2304
  var defaultName = "default";
2245
- function setComponentNameKeys(obj) {
2246
- let vm = humpToLine(obj.name);
2247
- let ass = [...obj.aliasNames];
2305
+ function setComponentNameKeys(obj2) {
2306
+ let vm = humpToLine(obj2.name);
2307
+ let ass = [...obj2.aliasNames];
2248
2308
  ass.push(vm);
2249
2309
  ass.forEach((v) => {
2250
2310
  componentNameKeys.push({
2251
2311
  name: v,
2252
- value: obj.key
2312
+ value: obj2.key
2253
2313
  });
2254
2314
  });
2255
2315
  }
@@ -2261,7 +2321,7 @@ function setComponentsObj(alias, arr) {
2261
2321
  }
2262
2322
  function setForComponentsValue(v) {
2263
2323
  let alias;
2264
- let obj;
2324
+ let obj2;
2265
2325
  const resolver = v.resolver;
2266
2326
  if (resolver) {
2267
2327
  Object.keys(resolver).forEach((key) => {
@@ -2272,13 +2332,13 @@ function setForComponentsValue(v) {
2272
2332
  }
2273
2333
  alias = v.alias || defaultName;
2274
2334
  let urls = v?.urls || Object.keys(v.componentsRaw);
2275
- obj = getComponentsArr(urls, v, v.componentsRaw, v.components);
2276
- if (obj && obj?.props) {
2277
- obj.props.forEach((z) => {
2335
+ obj2 = getComponentsArr(urls, v, v.componentsRaw, v.components);
2336
+ if (obj2 && obj2?.props) {
2337
+ obj2.props.forEach((z) => {
2278
2338
  componentPropsObj[z.url] = z;
2279
2339
  });
2280
2340
  }
2281
- setComponentsObj(alias, obj.components);
2341
+ setComponentsObj(alias, obj2.components);
2282
2342
  return v.componentsRaw;
2283
2343
  }
2284
2344
  function getCompoNameObj() {
@@ -2287,15 +2347,15 @@ function getCompoNameObj() {
2287
2347
  }
2288
2348
  return Object.values(componentsObj);
2289
2349
  }
2290
- async function getPropsImport(text, obj) {
2291
- let ts = text;
2350
+ async function getPropsImport(text, obj2) {
2351
+ let ts2 = text;
2292
2352
  if (text) {
2293
- let arr = (await getTestImportUrl(obj, text)).filter((v) => {
2294
- return isComprops(v.key, obj.comprops) || isCurprops(v.key, obj.curprops);
2353
+ let arr = (await getTestImportUrl(obj2, text)).filter((v) => {
2354
+ return isComprops(v.key, obj2.comprops) || isCurprops(v.key, obj2.curprops);
2295
2355
  });
2296
- ts = await getPropsTexts(arr) + ts;
2356
+ ts2 = await getPropsTexts(arr) + ts2;
2297
2357
  }
2298
- return ts;
2358
+ return ts2;
2299
2359
  }
2300
2360
  function getPropsValue(o) {
2301
2361
  const u = o.url;
@@ -2314,8 +2374,8 @@ function getPropsRaws(arr) {
2314
2374
  } else if (value.getRaw) {
2315
2375
  value.getRaw(value).then(async (s) => {
2316
2376
  const m = getGetRawValue(s);
2317
- let ts = await getPropsImport(m, arr[index]);
2318
- value.raw = ts;
2377
+ let ts2 = await getPropsImport(m, arr[index]);
2378
+ value.raw = ts2;
2319
2379
  value.getRaw = null;
2320
2380
  res();
2321
2381
  });
@@ -2335,18 +2395,18 @@ async function getPropsTexts(arr) {
2335
2395
  const sts = arrs?.map((o) => o.raw) || [];
2336
2396
  return sts.join("\n");
2337
2397
  }
2338
- async function getComponentsProps(text, obj) {
2339
- let ts = text;
2398
+ async function getComponentsProps(text, obj2) {
2399
+ let ts2 = text;
2340
2400
  if (text) {
2341
- if (obj.comprops || obj.curprops) {
2342
- let arr = (await getTestImportUrl(obj, text)).filter((v) => {
2343
- return isComprops(v.key, obj.comprops) || isCurprops(v.key, obj.curprops);
2401
+ if (obj2.comprops || obj2.curprops) {
2402
+ let arr = (await getTestImportUrl(obj2, text)).filter((v) => {
2403
+ return isComprops(v.key, obj2.comprops) || isCurprops(v.key, obj2.curprops);
2344
2404
  });
2345
2405
  let str = await getPropsTexts(arr);
2346
- ts = str + ts;
2406
+ ts2 = str + ts2;
2347
2407
  }
2348
2408
  }
2349
- return ts;
2409
+ return ts2;
2350
2410
  }
2351
2411
  function getGetRawValue(s) {
2352
2412
  if (s && typeof s == "object") {
@@ -2387,223 +2447,223 @@ function getLocalTextComponents(u) {
2387
2447
 
2388
2448
  // packages/utils/props.ts
2389
2449
  var props = {
2390
- name(obj) {
2391
- if (obj.name) {
2392
- return obj.name.name + obj.name.description;
2393
- } else if (obj.props) {
2394
- return obj.props.name;
2450
+ name(obj2) {
2451
+ if (obj2.name) {
2452
+ return obj2.name.name + obj2.name.description;
2453
+ } else if (obj2.props) {
2454
+ return obj2.props.name;
2395
2455
  } else {
2396
2456
  return "";
2397
2457
  }
2398
2458
  },
2399
- description(obj) {
2400
- if (obj.description && obj.description.name) {
2401
- return obj.description.name + obj.description.description;
2402
- } else if (obj.descriptions) {
2403
- return obj.descriptions;
2404
- } else if (obj.props) {
2405
- return obj.props.description;
2459
+ description(obj2) {
2460
+ if (obj2.description && obj2.description.name) {
2461
+ return obj2.description.name + obj2.description.description;
2462
+ } else if (obj2.descriptions) {
2463
+ return obj2.descriptions;
2464
+ } else if (obj2.props) {
2465
+ return obj2.props.description;
2406
2466
  } else {
2407
2467
  return "";
2408
2468
  }
2409
2469
  },
2410
- type(obj) {
2411
- if (obj.type) {
2412
- return obj.type.type || obj.type.name + obj.type.description;
2413
- } else if (obj.props) {
2414
- return obj.props.type;
2470
+ type(obj2) {
2471
+ if (obj2.type) {
2472
+ return obj2.type.type || obj2.type.name + obj2.type.description;
2473
+ } else if (obj2.props) {
2474
+ return obj2.props.type;
2415
2475
  } else {
2416
2476
  return "";
2417
2477
  }
2418
2478
  },
2419
- selectable(obj) {
2420
- if (obj.selectable) {
2421
- return obj.selectable.name + obj.selectable.description;
2422
- } else if (obj.props) {
2423
- return obj.props.selectable;
2479
+ selectable(obj2) {
2480
+ if (obj2.selectable) {
2481
+ return obj2.selectable.name + obj2.selectable.description;
2482
+ } else if (obj2.props) {
2483
+ return obj2.props.selectable;
2424
2484
  } else {
2425
2485
  return "";
2426
2486
  }
2427
2487
  },
2428
- default(obj) {
2429
- if (obj.default) {
2430
- return obj.default.name + obj.default.description;
2431
- } else if (obj.props) {
2432
- return obj.props.default || "";
2488
+ default(obj2) {
2489
+ if (obj2.default) {
2490
+ return obj2.default.name + obj2.default.description;
2491
+ } else if (obj2.props) {
2492
+ return obj2.props.default || "";
2433
2493
  } else {
2434
2494
  return "";
2435
2495
  }
2436
2496
  },
2437
- return(obj) {
2438
- if (obj.return) {
2439
- let t = obj.return.type;
2497
+ return(obj2) {
2498
+ if (obj2.return) {
2499
+ let t = obj2.return.type;
2440
2500
  if (t) {
2441
2501
  t = `[${t}]`;
2442
2502
  }
2443
- return t + (obj.return.name + obj.return.description);
2444
- } else if (obj.props) {
2445
- return obj.props.return;
2503
+ return t + (obj2.return.name + obj2.return.description);
2504
+ } else if (obj2.props) {
2505
+ return obj2.props.return;
2446
2506
  } else {
2447
2507
  return "";
2448
2508
  }
2449
2509
  },
2450
- required(obj) {
2451
- if (obj.required) {
2452
- return obj.required.name + obj.required.description;
2453
- } else if (obj.props) {
2454
- return obj.props.required;
2510
+ required(obj2) {
2511
+ if (obj2.required) {
2512
+ return obj2.required.name + obj2.required.description;
2513
+ } else if (obj2.props) {
2514
+ return obj2.props.required;
2455
2515
  } else {
2456
2516
  return "";
2457
2517
  }
2458
2518
  }
2459
2519
  };
2460
2520
  var emits = {
2461
- name(obj) {
2462
- if (obj.name) {
2463
- return obj.name.name + obj.name.description;
2464
- } else if (obj.emits) {
2465
- return obj.emits.name;
2521
+ name(obj2) {
2522
+ if (obj2.name) {
2523
+ return obj2.name.name + obj2.name.description;
2524
+ } else if (obj2.emits) {
2525
+ return obj2.emits.name;
2466
2526
  } else {
2467
2527
  return "";
2468
2528
  }
2469
2529
  },
2470
- description(obj) {
2471
- if (obj.description && obj.description.name) {
2472
- return obj.description.name + obj.description.description;
2473
- } else if (obj.descriptions) {
2474
- return obj.descriptions;
2475
- } else if (obj.emits) {
2476
- return obj.emits.description;
2530
+ description(obj2) {
2531
+ if (obj2.description && obj2.description.name) {
2532
+ return obj2.description.name + obj2.description.description;
2533
+ } else if (obj2.descriptions) {
2534
+ return obj2.descriptions;
2535
+ } else if (obj2.emits) {
2536
+ return obj2.emits.description;
2477
2537
  } else {
2478
2538
  return "";
2479
2539
  }
2480
2540
  },
2481
- selectable(obj) {
2482
- if (obj.selectable) {
2483
- return obj.selectable.name + obj.selectable.description;
2484
- } else if (obj.emits) {
2485
- return obj.emits.selectable;
2541
+ selectable(obj2) {
2542
+ if (obj2.selectable) {
2543
+ return obj2.selectable.name + obj2.selectable.description;
2544
+ } else if (obj2.emits) {
2545
+ return obj2.emits.selectable;
2486
2546
  } else {
2487
2547
  return "";
2488
2548
  }
2489
2549
  }
2490
2550
  };
2491
2551
  var expose = {
2492
- name(obj) {
2493
- if (obj.name) {
2494
- return obj.name.name + obj.name.description;
2495
- } else if (obj.expose) {
2496
- return obj.expose.name;
2552
+ name(obj2) {
2553
+ if (obj2.name) {
2554
+ return obj2.name.name + obj2.name.description;
2555
+ } else if (obj2.expose) {
2556
+ return obj2.expose.name;
2497
2557
  } else {
2498
2558
  return "";
2499
2559
  }
2500
2560
  },
2501
- description(obj) {
2502
- if (obj.description && obj.description.name) {
2503
- return obj.description.name + obj.description.description;
2504
- } else if (obj.descriptions) {
2505
- return obj.descriptions;
2506
- } else if (obj.expose) {
2507
- return obj.expose.description;
2561
+ description(obj2) {
2562
+ if (obj2.description && obj2.description.name) {
2563
+ return obj2.description.name + obj2.description.description;
2564
+ } else if (obj2.descriptions) {
2565
+ return obj2.descriptions;
2566
+ } else if (obj2.expose) {
2567
+ return obj2.expose.description;
2508
2568
  } else {
2509
2569
  return "";
2510
2570
  }
2511
2571
  },
2512
- selectable(obj) {
2513
- if (obj.selectable) {
2514
- return obj.selectable.name + obj.selectable.description;
2515
- } else if (obj.expose) {
2516
- return obj.expose.selectable;
2572
+ selectable(obj2) {
2573
+ if (obj2.selectable) {
2574
+ return obj2.selectable.name + obj2.selectable.description;
2575
+ } else if (obj2.expose) {
2576
+ return obj2.expose.selectable;
2517
2577
  } else {
2518
2578
  return "";
2519
2579
  }
2520
2580
  },
2521
- type(obj) {
2522
- if (obj.type) {
2523
- return obj.type.type || obj.type.name + obj.type.description;
2524
- } else if (obj.expose) {
2525
- return obj.expose.type;
2581
+ type(obj2) {
2582
+ if (obj2.type) {
2583
+ return obj2.type.type || obj2.type.name + obj2.type.description;
2584
+ } else if (obj2.expose) {
2585
+ return obj2.expose.type;
2526
2586
  } else {
2527
2587
  return "";
2528
2588
  }
2529
2589
  },
2530
- return(obj) {
2531
- if (obj.return) {
2532
- let t = obj.return.type;
2590
+ return(obj2) {
2591
+ if (obj2.return) {
2592
+ let t = obj2.return.type;
2533
2593
  if (t) {
2534
2594
  t = `[${t}]`;
2535
2595
  }
2536
- return t + (obj.return.name + obj.return.description);
2537
- } else if (obj.expose) {
2538
- return obj.expose.return;
2596
+ return t + (obj2.return.name + obj2.return.description);
2597
+ } else if (obj2.expose) {
2598
+ return obj2.expose.return;
2539
2599
  } else {
2540
2600
  return "";
2541
2601
  }
2542
2602
  }
2543
2603
  };
2544
2604
  var slot = {
2545
- name(obj) {
2546
- if (obj.name) {
2547
- return obj.name.name + obj.name.description;
2548
- } else if (obj.slot) {
2549
- return obj.slot.name;
2605
+ name(obj2) {
2606
+ if (obj2.name) {
2607
+ return obj2.name.name + obj2.name.description;
2608
+ } else if (obj2.slot) {
2609
+ return obj2.slot.name;
2550
2610
  } else {
2551
2611
  return "";
2552
2612
  }
2553
2613
  },
2554
- description(obj) {
2555
- if (obj.description && obj.description.name) {
2556
- return obj.description.name + obj.description.description;
2557
- } else if (obj.descriptions) {
2558
- return obj.descriptions;
2559
- } else if (obj.slot) {
2560
- return obj.slot.description;
2614
+ description(obj2) {
2615
+ if (obj2.description && obj2.description.name) {
2616
+ return obj2.description.name + obj2.description.description;
2617
+ } else if (obj2.descriptions) {
2618
+ return obj2.descriptions;
2619
+ } else if (obj2.slot) {
2620
+ return obj2.slot.description;
2561
2621
  } else {
2562
2622
  return "";
2563
2623
  }
2564
2624
  },
2565
- selectable(obj) {
2566
- if (obj.selectable) {
2567
- return obj.selectable.name + obj.selectable.description;
2568
- } else if (obj.slot) {
2569
- return obj.slot.selectable;
2625
+ selectable(obj2) {
2626
+ if (obj2.selectable) {
2627
+ return obj2.selectable.name + obj2.selectable.description;
2628
+ } else if (obj2.slot) {
2629
+ return obj2.slot.selectable;
2570
2630
  } else {
2571
2631
  return "";
2572
2632
  }
2573
2633
  }
2574
2634
  };
2575
2635
  function getPropsValue2(arr) {
2576
- return arr.map((obj) => {
2636
+ return arr.map((obj2) => {
2577
2637
  const v = {};
2578
2638
  Object.keys(props).forEach((key) => {
2579
- v[key] = props[key](obj);
2639
+ v[key] = props[key](obj2);
2580
2640
  });
2581
2641
  return v;
2582
2642
  });
2583
2643
  }
2584
2644
  function getEmitsValue(arr) {
2585
- return arr.map((obj) => {
2645
+ return arr.map((obj2) => {
2586
2646
  const v = {};
2587
2647
  Object.keys(emits).forEach((key) => {
2588
- v[key] = emits[key](obj);
2648
+ v[key] = emits[key](obj2);
2589
2649
  });
2590
2650
  return v;
2591
2651
  });
2592
2652
  }
2593
2653
  function getExposeValue(arr) {
2594
- return arr.map((obj) => {
2654
+ return arr.map((obj2) => {
2595
2655
  const v = {};
2596
2656
  Object.keys(expose).forEach((key) => {
2597
- v[key] = expose[key](obj);
2657
+ v[key] = expose[key](obj2);
2598
2658
  });
2599
2659
  return v;
2600
2660
  });
2601
2661
  }
2602
2662
  function getSlotValue(arr) {
2603
- return arr.map((obj) => {
2663
+ return arr.map((obj2) => {
2604
2664
  const v = {};
2605
2665
  Object.keys(slot).forEach((key) => {
2606
- v[key] = slot[key](obj);
2666
+ v[key] = slot[key](obj2);
2607
2667
  });
2608
2668
  return v;
2609
2669
  });
@@ -2615,13 +2675,13 @@ function getObj(v) {
2615
2675
  delete v.source;
2616
2676
  return v;
2617
2677
  }
2618
- function getFilter(obj, keyArr) {
2678
+ function getFilter(obj2, keyArr) {
2619
2679
  const _objs = {
2620
- descriptions: obj?.description || ""
2680
+ descriptions: obj2?.description || ""
2621
2681
  };
2622
2682
  const arr = [];
2623
- if (obj?.tags) {
2624
- obj?.tags?.forEach((v, index) => {
2683
+ if (obj2?.tags) {
2684
+ obj2?.tags?.forEach((v, index) => {
2625
2685
  let tag = v.tag;
2626
2686
  let ov = getObj(v);
2627
2687
  if (!_objs.hasOwnProperty(tag) && keyArr.includes(tag)) {
@@ -2642,9 +2702,9 @@ function getFilter(obj, keyArr) {
2642
2702
  };
2643
2703
  }
2644
2704
  var titles = [];
2645
- function setTitle(obj) {
2705
+ function setTitle(obj2) {
2646
2706
  const arr = ["title", "author", "date"];
2647
- const fobj = getFilter(obj, arr);
2707
+ const fobj = getFilter(obj2, arr);
2648
2708
  const value = {};
2649
2709
  arr.forEach((key) => {
2650
2710
  value[key] = fobj.obj[key];
@@ -2655,9 +2715,9 @@ function setTitle(obj) {
2655
2715
  });
2656
2716
  }
2657
2717
  var states = [];
2658
- function setState(obj) {
2718
+ function setState(obj2) {
2659
2719
  const arr = ["state", "type"];
2660
- const fobj = getFilter(obj, arr);
2720
+ const fobj = getFilter(obj2, arr);
2661
2721
  const value = {};
2662
2722
  arr.forEach((key) => {
2663
2723
  value[key] = fobj.obj[key];
@@ -2679,34 +2739,34 @@ function addError(value) {
2679
2739
  function addState(value) {
2680
2740
  states.push(value);
2681
2741
  }
2682
- function addTags(tag, obj) {
2742
+ function addTags(tag, obj2) {
2683
2743
  switch (tag) {
2684
2744
  case "title":
2685
- addTitle(obj);
2745
+ addTitle(obj2);
2686
2746
  return true;
2687
2747
  case "proposal":
2688
- addProposal(obj);
2748
+ addProposal(obj2);
2689
2749
  return true;
2690
2750
  case "error":
2691
- addError(obj);
2751
+ addError(obj2);
2692
2752
  return true;
2693
2753
  case "state":
2694
- addState(obj);
2754
+ addState(obj2);
2695
2755
  return true;
2696
2756
  case "text":
2697
- addTitle(obj);
2757
+ addTitle(obj2);
2698
2758
  return true;
2699
2759
  case "html":
2700
- addTitle(obj);
2760
+ addTitle(obj2);
2701
2761
  return true;
2702
2762
  default:
2703
2763
  return false;
2704
2764
  }
2705
2765
  }
2706
- function setTags(tag, obj) {
2766
+ function setTags(tag, obj2) {
2707
2767
  switch (tag) {
2708
2768
  case "title":
2709
- setTitle(obj);
2769
+ setTitle(obj2);
2710
2770
  return true;
2711
2771
  // case 'proposal':
2712
2772
  // setProposal(obj);
@@ -2715,7 +2775,7 @@ function setTags(tag, obj) {
2715
2775
  // setError(obj);
2716
2776
  // return true;
2717
2777
  case "state":
2718
- setState(obj);
2778
+ setState(obj2);
2719
2779
  return true;
2720
2780
  default:
2721
2781
  return false;
@@ -2725,13 +2785,13 @@ function getNotes(text) {
2725
2785
  titles = [];
2726
2786
  states = [];
2727
2787
  const notes = getTextNotes(text);
2728
- notes?.forEach((obj) => {
2729
- let tags = obj?.tags || [];
2788
+ notes?.forEach((obj2) => {
2789
+ let tags = obj2?.tags || [];
2730
2790
  let lg = tags?.length || 0;
2731
2791
  if (lg > 0) {
2732
2792
  for (let i = 0; i < lg; i++) {
2733
2793
  const v = tags[i] || {};
2734
- let is = setTags(v.tag, obj);
2794
+ let is = setTags(v.tag, obj2);
2735
2795
  if (is) {
2736
2796
  break;
2737
2797
  }
@@ -2785,10 +2845,10 @@ function getTopDom(props2, h4, isZy) {
2785
2845
  doms = [];
2786
2846
  }
2787
2847
  };
2788
- props2?.forEach((obj) => {
2848
+ props2?.forEach((obj2) => {
2789
2849
  const info = [];
2790
2850
  let is = false;
2791
- if (obj.date) {
2851
+ if (obj2.date) {
2792
2852
  is = true;
2793
2853
  info.push(
2794
2854
  h4(
@@ -2800,14 +2860,14 @@ function getTopDom(props2, h4, isZy) {
2800
2860
  h4("span", {}, "\u66F4\u65B0\u65F6\u95F4\uFF1A"),
2801
2861
  h4("span", {}, [
2802
2862
  getValue(
2803
- obj.date.name + " " + obj.date.description
2863
+ obj2.date.name + " " + obj2.date.description
2804
2864
  )
2805
2865
  ])
2806
2866
  ]
2807
2867
  )
2808
2868
  );
2809
2869
  }
2810
- if (obj.author) {
2870
+ if (obj2.author) {
2811
2871
  is = true;
2812
2872
  info.push(
2813
2873
  h4(
@@ -2819,25 +2879,25 @@ function getTopDom(props2, h4, isZy) {
2819
2879
  h4("span", {}, "\u4F5C\u8005\uFF1A"),
2820
2880
  h4("span", {}, [
2821
2881
  getValue(
2822
- obj.author.name + " " + obj.author.description
2882
+ obj2.author.name + " " + obj2.author.description
2823
2883
  )
2824
2884
  ])
2825
2885
  ]
2826
2886
  )
2827
2887
  );
2828
2888
  }
2829
- if (obj.title && (obj.title.type || obj.title.name || obj.title.description)) {
2889
+ if (obj2.title && (obj2.title.type || obj2.title.name || obj2.title.description)) {
2830
2890
  setTitle3();
2831
2891
  if (is) {
2832
2892
  setDivision();
2833
2893
  }
2834
- let type = (obj.title.type || "div").split(".");
2894
+ let type = (obj2.title.type || "div").split(".");
2835
2895
  let c = type[1] || "";
2836
2896
  if (type[0] == "html") {
2837
2897
  doms.push(
2838
2898
  h4("div", {
2839
2899
  class: "compo-top-title " + c,
2840
- innerHTML: obj.title.name + " " + obj.title.description
2900
+ innerHTML: obj2.title.name + " " + obj2.title.description
2841
2901
  })
2842
2902
  );
2843
2903
  } else {
@@ -2850,7 +2910,7 @@ function getTopDom(props2, h4, isZy) {
2850
2910
  [
2851
2911
  h4("span", {}, [
2852
2912
  getValue(
2853
- obj.title.name + " " + obj.title.description
2913
+ obj2.title.name + " " + obj2.title.description
2854
2914
  )
2855
2915
  ])
2856
2916
  ]
@@ -2873,25 +2933,25 @@ function getTopDom(props2, h4, isZy) {
2873
2933
  )
2874
2934
  );
2875
2935
  }
2876
- if (obj.html) {
2877
- let type = (obj.html.type || "div").split(".");
2936
+ if (obj2.html) {
2937
+ let type = (obj2.html.type || "div").split(".");
2878
2938
  let c = type[1] || "";
2879
2939
  list.push(
2880
2940
  h4(type[0], {
2881
2941
  class: "compo-top-html " + c,
2882
- innerHTML: obj.html.name + " " + obj.html.description
2942
+ innerHTML: obj2.html.name + " " + obj2.html.description
2883
2943
  })
2884
2944
  );
2885
2945
  }
2886
2946
  ["text"].forEach((v) => {
2887
- if (obj[v]) {
2888
- let type = (obj[v].type || "div").split(".");
2947
+ if (obj2[v]) {
2948
+ let type = (obj2[v].type || "div").split(".");
2889
2949
  let c = type[1] || "";
2890
2950
  if (type[0] == "html") {
2891
2951
  list.push(
2892
2952
  h4("div", {
2893
2953
  class: "compo-top-" + v + " " + c,
2894
- innerHTML: obj[v].name + " " + obj[v].description
2954
+ innerHTML: obj2[v].name + " " + obj2[v].description
2895
2955
  })
2896
2956
  );
2897
2957
  } else {
@@ -2904,7 +2964,7 @@ function getTopDom(props2, h4, isZy) {
2904
2964
  [
2905
2965
  h4("span", {}, [
2906
2966
  getValue(
2907
- obj[v].name + " " + obj[v].description
2967
+ obj2[v].name + " " + obj2[v].description
2908
2968
  )
2909
2969
  ])
2910
2970
  ]
@@ -2978,10 +3038,10 @@ function getTestTopDom(props2, h4, isZy) {
2978
3038
  doms = [];
2979
3039
  }
2980
3040
  };
2981
- props2.forEach((obj) => {
3041
+ props2.forEach((obj2) => {
2982
3042
  const info = [];
2983
3043
  let is = false;
2984
- if (obj.date) {
3044
+ if (obj2.date) {
2985
3045
  is = true;
2986
3046
  info.push(
2987
3047
  h4(
@@ -2993,14 +3053,14 @@ function getTestTopDom(props2, h4, isZy) {
2993
3053
  h4("span", {}, "\u66F4\u65B0\u65F6\u95F4\uFF1A"),
2994
3054
  h4("span", {}, [
2995
3055
  getValue(
2996
- obj.date.name + " " + obj.date.description
3056
+ obj2.date.name + " " + obj2.date.description
2997
3057
  )
2998
3058
  ])
2999
3059
  ]
3000
3060
  )
3001
3061
  );
3002
3062
  }
3003
- if (obj.author) {
3063
+ if (obj2.author) {
3004
3064
  is = true;
3005
3065
  info.push(
3006
3066
  h4(
@@ -3012,25 +3072,25 @@ function getTestTopDom(props2, h4, isZy) {
3012
3072
  h4("span", {}, "\u4F5C\u8005\uFF1A"),
3013
3073
  h4("span", {}, [
3014
3074
  getValue(
3015
- obj.author.name + " " + obj.author.description
3075
+ obj2.author.name + " " + obj2.author.description
3016
3076
  )
3017
3077
  ])
3018
3078
  ]
3019
3079
  )
3020
3080
  );
3021
3081
  }
3022
- if (obj.title && (obj.title.type || obj.title.name || obj.title.description)) {
3082
+ if (obj2.title && (obj2.title.type || obj2.title.name || obj2.title.description)) {
3023
3083
  setTitle3();
3024
3084
  if (is) {
3025
3085
  setDivision();
3026
3086
  }
3027
- let type = (obj.title.type || "div").split(".");
3087
+ let type = (obj2.title.type || "div").split(".");
3028
3088
  let c = type[1] || "";
3029
3089
  if (type[0] == "html") {
3030
3090
  doms.push(
3031
3091
  h4("div", {
3032
3092
  class: "test-top-title " + c,
3033
- innerHTML: obj.title.name + " " + obj.title.description
3093
+ innerHTML: obj2.title.name + " " + obj2.title.description
3034
3094
  })
3035
3095
  );
3036
3096
  } else {
@@ -3043,7 +3103,7 @@ function getTestTopDom(props2, h4, isZy) {
3043
3103
  [
3044
3104
  h4("span", {}, [
3045
3105
  getValue(
3046
- obj.title.name + " " + obj.title.description
3106
+ obj2.title.name + " " + obj2.title.description
3047
3107
  )
3048
3108
  ])
3049
3109
  ]
@@ -3066,25 +3126,25 @@ function getTestTopDom(props2, h4, isZy) {
3066
3126
  )
3067
3127
  );
3068
3128
  }
3069
- if (obj.html) {
3070
- let type = (obj.html.type || "div").split(".");
3129
+ if (obj2.html) {
3130
+ let type = (obj2.html.type || "div").split(".");
3071
3131
  let c = type[1] || "";
3072
3132
  list.push(
3073
3133
  h4(type[0], {
3074
3134
  class: "test-top-html " + c,
3075
- innerHTML: obj.html.name + " " + obj.html.description
3135
+ innerHTML: obj2.html.name + " " + obj2.html.description
3076
3136
  })
3077
3137
  );
3078
3138
  }
3079
3139
  ["text", "proposal", "error"].forEach((v) => {
3080
- if (obj[v]) {
3081
- let type = (obj[v].type || "div").split(".");
3140
+ if (obj2[v]) {
3141
+ let type = (obj2[v].type || "div").split(".");
3082
3142
  let c = type[1] || "";
3083
3143
  if (type[0] == "html") {
3084
3144
  list.push(
3085
3145
  h4("div", {
3086
3146
  class: "test-top-" + v + " " + c,
3087
- innerHTML: obj[v].name + " " + obj[v].description
3147
+ innerHTML: obj2[v].name + " " + obj2[v].description
3088
3148
  })
3089
3149
  );
3090
3150
  } else {
@@ -3097,7 +3157,7 @@ function getTestTopDom(props2, h4, isZy) {
3097
3157
  [
3098
3158
  h4("span", {}, [
3099
3159
  getValue(
3100
- obj[v].name + " " + obj[v].description
3160
+ obj2[v].name + " " + obj2[v].description
3101
3161
  )
3102
3162
  ])
3103
3163
  ]
@@ -3199,10 +3259,27 @@ function getFunctionFormat(v) {
3199
3259
  }
3200
3260
 
3201
3261
  // packages/components/use/util.ts
3202
- function prettierFormat(st) {
3203
- return st.replace(/\;(\s|\n\r)*$/, "");
3262
+ var getFormat2 = (r) => {
3263
+ return r;
3264
+ };
3265
+ var isp = getConfig("prettier");
3266
+ if (isp) {
3267
+ Promise.resolve().then(() => (init_prettier(), prettier_exports)).then((d) => {
3268
+ getFormat2 = d.getFormat;
3269
+ });
3204
3270
  }
3205
3271
  function prettierHtml(st) {
3272
+ if (isp) {
3273
+ const v = getFormat2(st, "html");
3274
+ return v;
3275
+ }
3276
+ return st;
3277
+ }
3278
+ function prettierTs(st) {
3279
+ if (isp) {
3280
+ const v = getFormat2(st, "ts");
3281
+ return v;
3282
+ }
3206
3283
  return st;
3207
3284
  }
3208
3285
  function vueFormat(st, kg = "") {
@@ -3250,11 +3327,11 @@ function sonType(type) {
3250
3327
  }
3251
3328
  }
3252
3329
  function sonTypes(type, arr) {
3253
- let obj = sonType(type);
3254
- if (obj) {
3255
- arr.push(obj.own);
3256
- if (obj.son) {
3257
- sonTypes(obj.son, arr);
3330
+ let obj2 = sonType(type);
3331
+ if (obj2) {
3332
+ arr.push(obj2.own);
3333
+ if (obj2.son) {
3334
+ sonTypes(obj2.son, arr);
3258
3335
  }
3259
3336
  } else {
3260
3337
  arr.push(type);
@@ -3301,21 +3378,21 @@ function getTypeValue(arr) {
3301
3378
  }
3302
3379
  }
3303
3380
  function setDataType(arr) {
3304
- let ts = "";
3381
+ let ts2 = "";
3305
3382
  arr.forEach((v, index) => {
3306
3383
  v = v.trim();
3307
3384
  if (v) {
3308
- if (ts) {
3309
- ts += " | ";
3385
+ if (ts2) {
3386
+ ts2 += " | ";
3310
3387
  }
3311
3388
  if (v === "Array") {
3312
- ts += "Array<any>";
3389
+ ts2 += "Array<any>";
3313
3390
  } else {
3314
- ts += v;
3391
+ ts2 += v;
3315
3392
  }
3316
3393
  }
3317
3394
  });
3318
- return ts || "any";
3395
+ return ts2 || "any";
3319
3396
  }
3320
3397
  var splitIgnoringNesting = (str, delimiter) => {
3321
3398
  let bracketStack = [];
@@ -3418,21 +3495,21 @@ var keywords = ["class"];
3418
3495
  function getSpecObjs(specs, name) {
3419
3496
  return specs.filter((o) => o.name == name)[0];
3420
3497
  }
3421
- function getParameStr(css) {
3422
- return css.map((o) => {
3498
+ function getParameStr(css2) {
3499
+ return css2.map((o) => {
3423
3500
  const name = o.prop || "...arr";
3424
3501
  return name + ":" + setDataType(o.dataType);
3425
3502
  }).join(",");
3426
3503
  }
3427
- function getHmtl(propsname, param, value, slotValue, propsText, exposeText) {
3504
+ async function getHmtl(propsname, param, value, slotValue, propsText, exposeText) {
3428
3505
  const tarr = [];
3429
3506
  const sarr = [];
3430
3507
  let is = true;
3431
3508
  const ps = getPropsValue2(param.propss || []);
3432
- const es = getEmitsValue(param.emitss || []);
3509
+ const es2 = getEmitsValue(param.emitss || []);
3433
3510
  const res = getExposeValue(param.exposes || []);
3434
3511
  const ss = getSlotValue(param.slots || []);
3435
- Object.keys(value).forEach((key) => {
3512
+ Object.keys(value).forEach(async (key) => {
3436
3513
  let val = value[key];
3437
3514
  if (/^on[A-Z]/.test(key) && typeof val == "function") {
3438
3515
  let name = key.substring(2);
@@ -3457,13 +3534,13 @@ function getHmtl(propsname, param, value, slotValue, propsText, exposeText) {
3457
3534
  strs = arr.join("");
3458
3535
  }
3459
3536
  tarr.push(" @" + name + '="' + strs + '"');
3460
- const sp = getSpecObjs(es, name) || {};
3537
+ const sp = getSpecObjs(es2, name) || {};
3461
3538
  const s = sp.selectable || "";
3462
- const css = parseParamString(s);
3463
- const cs = getParameStr(css);
3539
+ const css2 = parseParamString(s);
3540
+ const cs = getParameStr(css2);
3464
3541
  sarr.push(`// ${sp.description} ${sp.name}: (${sp.selectable})`);
3465
3542
  sarr.push("function " + strs + "(" + cs + ") {");
3466
- css.forEach((o) => {
3543
+ css2.forEach((o) => {
3467
3544
  const name2 = o.name || "arr";
3468
3545
  sarr.push(" console.log('" + o.label + "', " + name2 + ")");
3469
3546
  });
@@ -3481,7 +3558,7 @@ function getHmtl(propsname, param, value, slotValue, propsText, exposeText) {
3481
3558
  );
3482
3559
  if (typeof val == "function" || t.dataType.length == 1 && t.type == "function" && val) {
3483
3560
  sarr.push(
3484
- "const " + key + " = " + getFunctionBody(
3561
+ "const " + key + " = " + await getFunctionBody(
3485
3562
  val,
3486
3563
  key,
3487
3564
  propsText
@@ -3523,10 +3600,10 @@ function getHmtl(propsname, param, value, slotValue, propsText, exposeText) {
3523
3600
  `// ${s.description} ${s.name}\uFF1A(${s.selectable}) ${s.type}`
3524
3601
  );
3525
3602
  const m = v.name + "Value";
3526
- const css = parseParamString(s?.selectable || "");
3603
+ const css2 = parseParamString(s?.selectable || "");
3527
3604
  const cs = [];
3528
3605
  const ps2 = v.params || [];
3529
- css.forEach((c, index) => {
3606
+ css2.forEach((c, index) => {
3530
3607
  const prop = c.name;
3531
3608
  if (prop) {
3532
3609
  const key = prop + v.name;
@@ -3572,24 +3649,27 @@ function getHmtl(propsname, param, value, slotValue, propsText, exposeText) {
3572
3649
  tarr.unshift("");
3573
3650
  }
3574
3651
  const slots = getSlots(slotValue, ss);
3575
- const st = `<!--${propsname}-->
3576
- <template>
3577
- <div>
3652
+ let template = `<template>
3653
+ <div>
3578
3654
  <${propsname}${tarr.join("\n")}>${slots.join("\n")}
3579
3655
  </${propsname}>
3580
- </div>
3581
- </template>
3656
+ </div>
3657
+ </template>`;
3658
+ template = await prettierHtml(template);
3659
+ let js2 = sarr.join("\n");
3660
+ js2 = await prettierTs(js2);
3661
+ const st = `<!--${propsname}-->
3662
+ ${template}
3582
3663
  <script lang="ts" setup>
3583
- ${sarr.join("\n")}
3584
- </script>
3585
- `;
3664
+ ${js2}
3665
+ </script>`;
3586
3666
  return st;
3587
3667
  }
3588
- function getSlots(obj = {}, ss) {
3668
+ function getSlots(obj2 = {}, ss) {
3589
3669
  const arr = [];
3590
- Object.keys(obj).forEach((key) => {
3670
+ Object.keys(obj2).forEach((key) => {
3591
3671
  const sp = getSpecObjs(ss, key) || {};
3592
- const v = obj[key];
3672
+ const v = obj2[key];
3593
3673
  if (v) {
3594
3674
  const st = ` <!-- ${sp.description} ${sp.name}\uFF1A(${sp.selectable}) -->
3595
3675
  <template #${key}="scope">
@@ -3617,8 +3697,8 @@ function getFunctionBody(v, key, propsText) {
3617
3697
  return funstr(v.toString());
3618
3698
  }
3619
3699
  }
3620
- function funstr(v) {
3621
- const st = getFunctionFormat(prettierFormat(v));
3700
+ async function funstr(v) {
3701
+ const st = getFunctionFormat(v);
3622
3702
  if (st) {
3623
3703
  let body = `{
3624
3704
  ${vueFormat(getFunBody(st.body), " ")}
@@ -3629,8 +3709,8 @@ ${vueFormat(getFunBody(st.body), " ")}
3629
3709
  }
3630
3710
  }
3631
3711
  function getTypeValueFunction(sp) {
3632
- const css = parseParamString(sp.selectable);
3633
- const cs = getParameStr(css);
3712
+ const css2 = parseParamString(sp.selectable);
3713
+ const cs = getParameStr(css2);
3634
3714
  let rs = "";
3635
3715
  if (sp.return) {
3636
3716
  rs = "return ";
@@ -3717,14 +3797,14 @@ function getObjValue(d, type) {
3717
3797
  return "" + d;
3718
3798
  }
3719
3799
  }
3720
- function getDefaultValue(obj, is = true) {
3721
- const vo = getSpecType(obj);
3800
+ function getDefaultValue(obj2, is = true) {
3801
+ const vo = getSpecType(obj2);
3722
3802
  const v = getTypeValue(vo.dataType);
3723
3803
  if (is) {
3724
- const d = (obj.default || "").trim();
3804
+ const d = (obj2.default || "").trim();
3725
3805
  return getObjValue(d || v, vo.dataType[0]);
3726
3806
  } else {
3727
- const d = (obj.default || "").trim();
3807
+ const d = (obj2.default || "").trim();
3728
3808
  return getObjValue(d, vo.dataType[0]);
3729
3809
  }
3730
3810
  }
@@ -3739,7 +3819,7 @@ var notesObj = {
3739
3819
  };
3740
3820
  function getDefault(ss, iss) {
3741
3821
  let c = ss.charAt(0);
3742
- let css = [
3822
+ let css2 = [
3743
3823
  ['"', '"'],
3744
3824
  ["'", "'"],
3745
3825
  ["`", "`"],
@@ -3747,7 +3827,7 @@ function getDefault(ss, iss) {
3747
3827
  ["{", "}"],
3748
3828
  ["[", "]"]
3749
3829
  ];
3750
- const cs = css.map((o) => o[0]);
3830
+ const cs = css2.map((o) => o[0]);
3751
3831
  let ci = cs.indexOf(c);
3752
3832
  if (ci != -1) {
3753
3833
  let bracketStack = [c];
@@ -3758,7 +3838,7 @@ function getDefault(ss, iss) {
3758
3838
  } else {
3759
3839
  let is = false;
3760
3840
  char === "]" && bracketStack[bracketStack.length - 1] === "[";
3761
- for (let v of css) {
3841
+ for (let v of css2) {
3762
3842
  if (char === v[1] && bracketStack[bracketStack.length - 1] === v[0]) {
3763
3843
  is = true;
3764
3844
  break;
@@ -3829,7 +3909,7 @@ function getObj2(v) {
3829
3909
  v.selectable = selectable;
3830
3910
  return v;
3831
3911
  }
3832
- function setTitle2(obj) {
3912
+ function setTitle2(obj2) {
3833
3913
  let title = "";
3834
3914
  let name = "";
3835
3915
  let author = "";
@@ -3844,7 +3924,7 @@ function setTitle2(obj) {
3844
3924
  // 'description',
3845
3925
  // 'descriptions',
3846
3926
  ];
3847
- let fobj = getFilter2(obj, arr);
3927
+ let fobj = getFilter2(obj2, arr);
3848
3928
  let value = {};
3849
3929
  arr.forEach((key) => {
3850
3930
  value[key] = fobj.obj[key];
@@ -3857,7 +3937,7 @@ function setTitle2(obj) {
3857
3937
  function addTitles(value) {
3858
3938
  notesObj.titles.push(value);
3859
3939
  }
3860
- function setProps(obj) {
3940
+ function setProps(obj2) {
3861
3941
  let name = "";
3862
3942
  let type = "";
3863
3943
  let defaults = "";
@@ -3874,7 +3954,7 @@ function setProps(obj) {
3874
3954
  "descriptions",
3875
3955
  "return"
3876
3956
  ];
3877
- let fobj = getFilter2(obj, arr);
3957
+ let fobj = getFilter2(obj2, arr);
3878
3958
  let value = {};
3879
3959
  arr.forEach((key) => {
3880
3960
  value[key] = fobj.obj[key];
@@ -3884,12 +3964,12 @@ function setProps(obj) {
3884
3964
  addTags2(o.key, o.value);
3885
3965
  });
3886
3966
  }
3887
- function setSlot(obj) {
3967
+ function setSlot(obj2) {
3888
3968
  let name = "";
3889
3969
  let description = "";
3890
3970
  let selectable = "";
3891
3971
  let arr = ["slot", "name", "selectable", "description", "descriptions"];
3892
- let fobj = getFilter2(obj, arr);
3972
+ let fobj = getFilter2(obj2, arr);
3893
3973
  let value = {};
3894
3974
  arr.forEach((key) => {
3895
3975
  value[key] = fobj.obj[key];
@@ -3899,9 +3979,9 @@ function setSlot(obj) {
3899
3979
  addTags2(o.key, o.value);
3900
3980
  });
3901
3981
  }
3902
- function setEmits(obj) {
3982
+ function setEmits(obj2) {
3903
3983
  let arr = ["emits", "name", "selectable", "description", "descriptions"];
3904
- let fobj = getFilter2(obj, arr);
3984
+ let fobj = getFilter2(obj2, arr);
3905
3985
  let value = {};
3906
3986
  arr.forEach((key) => {
3907
3987
  value[key] = fobj.obj[key];
@@ -3911,7 +3991,7 @@ function setEmits(obj) {
3911
3991
  addTags2(o.key, o.value);
3912
3992
  });
3913
3993
  }
3914
- function setExpose(obj) {
3994
+ function setExpose(obj2) {
3915
3995
  let arr = [
3916
3996
  "expose",
3917
3997
  "name",
@@ -3921,7 +4001,7 @@ function setExpose(obj) {
3921
4001
  "description",
3922
4002
  "descriptions"
3923
4003
  ];
3924
- let fobj = getFilter2(obj, arr);
4004
+ let fobj = getFilter2(obj2, arr);
3925
4005
  let value = {};
3926
4006
  arr.forEach((key) => {
3927
4007
  value[key] = fobj.obj[key];
@@ -3948,13 +4028,13 @@ function init() {
3948
4028
  notesObj[key] = [];
3949
4029
  });
3950
4030
  }
3951
- function getFilter2(obj, arrs) {
4031
+ function getFilter2(obj2, arrs) {
3952
4032
  const _objs = {
3953
- descriptions: obj?.description || ""
4033
+ descriptions: obj2?.description || ""
3954
4034
  };
3955
4035
  const arr = [];
3956
- if (obj?.tags) {
3957
- obj.tags?.forEach((v) => {
4036
+ if (obj2?.tags) {
4037
+ obj2.tags?.forEach((v) => {
3958
4038
  let tag = v.tag;
3959
4039
  let ov = getObj2(v);
3960
4040
  if (!_objs.hasOwnProperty(tag)) {
@@ -3974,46 +4054,46 @@ function getFilter2(obj, arrs) {
3974
4054
  obj: _objs
3975
4055
  };
3976
4056
  }
3977
- function addTags2(tag, obj) {
4057
+ function addTags2(tag, obj2) {
3978
4058
  switch (tag) {
3979
4059
  case "title":
3980
- addTitles(obj);
4060
+ addTitles(obj2);
3981
4061
  return true;
3982
4062
  case "text":
3983
- addTitles(obj);
4063
+ addTitles(obj2);
3984
4064
  return true;
3985
4065
  case "props":
3986
- addObj(obj, "props");
4066
+ addObj(obj2, "props");
3987
4067
  return true;
3988
4068
  case "slot":
3989
- addObj(obj, "slot");
4069
+ addObj(obj2, "slot");
3990
4070
  return true;
3991
4071
  case "emits":
3992
- addObj(obj, "emits");
4072
+ addObj(obj2, "emits");
3993
4073
  return true;
3994
4074
  case "expose":
3995
- addObj(obj, "expose");
4075
+ addObj(obj2, "expose");
3996
4076
  return true;
3997
4077
  default:
3998
4078
  return false;
3999
4079
  }
4000
4080
  }
4001
- function setTags2(tag, obj) {
4081
+ function setTags2(tag, obj2) {
4002
4082
  switch (tag) {
4003
4083
  case "title":
4004
- setTitle2(obj);
4084
+ setTitle2(obj2);
4005
4085
  return true;
4006
4086
  case "props":
4007
- setProps(obj);
4087
+ setProps(obj2);
4008
4088
  return true;
4009
4089
  case "slot":
4010
- setSlot(obj);
4090
+ setSlot(obj2);
4011
4091
  return true;
4012
4092
  case "emits":
4013
- setEmits(obj);
4093
+ setEmits(obj2);
4014
4094
  return true;
4015
4095
  case "expose":
4016
- setExpose(obj);
4096
+ setExpose(obj2);
4017
4097
  return true;
4018
4098
  default:
4019
4099
  return false;
@@ -4021,13 +4101,13 @@ function setTags2(tag, obj) {
4021
4101
  }
4022
4102
  function notesFilter(notes) {
4023
4103
  init();
4024
- notes?.forEach((obj) => {
4025
- let tags = obj?.tags || [];
4104
+ notes?.forEach((obj2) => {
4105
+ let tags = obj2?.tags || [];
4026
4106
  let lg = tags?.length || 0;
4027
4107
  if (lg > 0) {
4028
4108
  for (let i = 0; i < lg; i++) {
4029
4109
  const v = tags[i] || {};
4030
- let is = setTags2(v.tag, obj);
4110
+ let is = setTags2(v.tag, obj2);
4031
4111
  if (is) {
4032
4112
  break;
4033
4113
  }
@@ -4120,15 +4200,15 @@ var texpose = [
4120
4200
  {
4121
4201
  label: "\u8FD4\u56DE\u503C",
4122
4202
  prop: "return",
4123
- formatter(obj) {
4124
- return expose.return(obj) || obj.expose.default || "";
4203
+ formatter(obj2) {
4204
+ return expose.return(obj2) || obj2.expose.default || "";
4125
4205
  }
4126
4206
  },
4127
4207
  {
4128
4208
  label: "\u7C7B\u578B",
4129
4209
  prop: "type",
4130
- formatter(obj) {
4131
- return expose.type(obj) || "function";
4210
+ formatter(obj2) {
4211
+ return expose.type(obj2) || "function";
4132
4212
  }
4133
4213
  }
4134
4214
  ];
@@ -4167,15 +4247,15 @@ function h3(div, sx, v) {
4167
4247
  var setHtml = h3;
4168
4248
  var configObj;
4169
4249
  var comps = [];
4170
- function getName(obj) {
4171
- let name = obj.value;
4250
+ function getName(obj2) {
4251
+ let name = obj2.value;
4172
4252
  if (configObj.usealias) {
4173
- name = obj.alias + "-" + name;
4253
+ name = obj2.alias + "-" + name;
4174
4254
  }
4175
4255
  return lineToLargeHump(name);
4176
4256
  }
4177
- function gettests(obj, arr, n) {
4178
- const tests = getTestName(obj.key);
4257
+ function gettests(obj2, arr, n) {
4258
+ const tests = getTestName(obj2.key);
4179
4259
  if (tests && tests.length > 1 && configObj.generate?.type != 3) {
4180
4260
  asyncMergeArray(tests, (res, _reject, zv, inde) => {
4181
4261
  getLocalTextTests(zv).then((text) => {
@@ -4189,12 +4269,12 @@ function gettests(obj, arr, n) {
4189
4269
  getTestTopDom(titles2, setHtml, true)
4190
4270
  );
4191
4271
  arr.push(...setDom(dom));
4192
- arr.push(...setTestUrl(obj, zv));
4272
+ arr.push(...setTestUrl(obj2, zv));
4193
4273
  res();
4194
4274
  }).catch(() => {
4195
4275
  });
4196
4276
  }).then(() => {
4197
- setMd(obj, arr);
4277
+ setMd(obj2, arr);
4198
4278
  });
4199
4279
  } else {
4200
4280
  arr.push(`### \u793A\u4F8B 1`);
@@ -4207,33 +4287,33 @@ function gettests(obj, arr, n) {
4207
4287
  );
4208
4288
  arr.push(...setDom(dom));
4209
4289
  const v = configObj.generate?.vue || "cs/index.vue";
4210
- let key = configObj.example.dir + "/" + getLevelUrl(configObj.example.level, obj) + "/" + obj.value + "/" + v;
4290
+ let key = configObj.example.dir + "/" + getLevelUrl(configObj.example.level, obj2) + "/" + obj2.value + "/" + v;
4211
4291
  if (configObj.generate?.tests) {
4212
- const testurl = obj.url.substring(
4292
+ const testurl = obj2.url.substring(
4213
4293
  0,
4214
- obj.url.lastIndexOf("/" + obj.value + "/")
4215
- ) + "/" + obj.value;
4294
+ obj2.url.lastIndexOf("/" + obj2.value + "/")
4295
+ ) + "/" + obj2.value;
4216
4296
  const testsNanme = configObj.generate.testsNanme || "/tests/";
4217
4297
  key = testurl + testsNanme + v;
4218
4298
  }
4219
4299
  key = key.replace(/\/\//g, "/");
4220
4300
  arr.push(
4221
- ...setTestUrl(obj, {
4301
+ ...setTestUrl(obj2, {
4222
4302
  key,
4223
4303
  value: v
4224
4304
  })
4225
4305
  );
4226
4306
  if (configObj.generate?.type != 2) {
4227
- setVue(getName(obj), n, join4(configObj.dir, key));
4307
+ setVue(getName(obj2), n, join4(configObj.dir, key));
4228
4308
  }
4229
4309
  if (configObj.generate?.type != 3) {
4230
- setMd(obj, arr);
4310
+ setMd(obj2, arr);
4231
4311
  }
4232
4312
  }
4233
4313
  }
4234
- function setVue(propsname, param, url) {
4314
+ async function setVue(propsname, param, url) {
4235
4315
  const ps = getPropsValue2(param.propss || []);
4236
- const es = getEmitsValue(param.emitss || []);
4316
+ const es2 = getEmitsValue(param.emitss || []);
4237
4317
  const res = getExposeValue(param.exposes || []);
4238
4318
  const ss = getSlotValue(param.slots || []);
4239
4319
  const propsObj = {};
@@ -4245,7 +4325,7 @@ function setVue(propsname, param, url) {
4245
4325
  if (name) {
4246
4326
  propsObj[name] = getDefaultValue(val);
4247
4327
  if (arr && arr.length > 1) {
4248
- es.push({
4328
+ es2.push({
4249
4329
  name: "update:" + name,
4250
4330
  description: val.description,
4251
4331
  selectable: "value:[" + val.type + "]"
@@ -4254,7 +4334,7 @@ function setVue(propsname, param, url) {
4254
4334
  }
4255
4335
  }
4256
4336
  });
4257
- es.forEach((val) => {
4337
+ es2.forEach((val) => {
4258
4338
  let knam = val.name;
4259
4339
  if (knam.includes("-")) {
4260
4340
  let arr = knam.split("-");
@@ -4280,22 +4360,29 @@ function setVue(propsname, param, url) {
4280
4360
  type: v.type || v.default || "function"
4281
4361
  };
4282
4362
  });
4283
- const html = getHmtl(propsname, param, propsObj, slotValue, {}, exposeText);
4284
- Fang.fileOpen(url, html);
4363
+ const html2 = await getHmtl(
4364
+ propsname,
4365
+ param,
4366
+ propsObj,
4367
+ slotValue,
4368
+ {},
4369
+ exposeText
4370
+ );
4371
+ Fang.fileOpen(url, html2);
4285
4372
  }
4286
- function getMdurl(obj) {
4287
- const v = configObj.generate?.md || obj.value + ".md";
4373
+ function getMdurl(obj2) {
4374
+ const v = configObj.generate?.md || obj2.value + ".md";
4288
4375
  if (configObj.generate?.tests) {
4289
- const testurl = obj.url.substring(0, obj.url.lastIndexOf("/" + obj.value + "/")) + "/" + obj.value;
4376
+ const testurl = obj2.url.substring(0, obj2.url.lastIndexOf("/" + obj2.value + "/")) + "/" + obj2.value;
4290
4377
  const testsNanme = configObj.generate.testsNanme || "/tests/";
4291
4378
  return join4(configObj.dir, testurl + testsNanme, v);
4292
4379
  }
4293
4380
  return join4(configObj.dir, configObj.outDir, v);
4294
4381
  }
4295
4382
  var lss = 0;
4296
- function setMd(obj, arr) {
4383
+ function setMd(obj2, arr) {
4297
4384
  lss++;
4298
- const sc = getMdurl(obj);
4385
+ const sc = getMdurl(obj2);
4299
4386
  Fang.fileOpen(sc, arr.join("\n\n"));
4300
4387
  if (comps.length == lss) {
4301
4388
  if (configObj._callback_) {
@@ -4303,13 +4390,13 @@ function setMd(obj, arr) {
4303
4390
  }
4304
4391
  }
4305
4392
  }
4306
- function setTestUrl(obj, test) {
4393
+ function setTestUrl(obj2, test) {
4307
4394
  const arr = [];
4308
4395
  const tu = join4(configObj.dir, test.key);
4309
- const sc = getMdurl(obj);
4396
+ const sc = getMdurl(obj2);
4310
4397
  const url = getImportUrl(sc, tu);
4311
4398
  if (configObj.setTest) {
4312
- arr.push(...configObj.setTest(url, test, obj));
4399
+ arr.push(...configObj.setTest(url, test, obj2));
4313
4400
  } else {
4314
4401
  arr.push(`:::preview ${test.value} || `);
4315
4402
  arr.push(`demo-preview=${url}`);
@@ -4325,8 +4412,8 @@ function setDom(dom) {
4325
4412
  async function getCompoData(value) {
4326
4413
  const arr = [];
4327
4414
  arr.push("# " + getName(value));
4328
- await getNotes2(value.key).then((obj) => {
4329
- let { titles: titles2, propss, slots, emitss, exposes } = obj;
4415
+ await getNotes2(value.key).then((obj2) => {
4416
+ let { titles: titles2, propss, slots, emitss, exposes } = obj2;
4330
4417
  const dom = setHtml(
4331
4418
  "div",
4332
4419
  {
@@ -4352,7 +4439,7 @@ async function getCompoData(value) {
4352
4439
  });
4353
4440
  }).then(() => {
4354
4441
  arr.push(`## \u793A\u4F8B`);
4355
- gettests(value, arr, obj);
4442
+ gettests(value, arr, obj2);
4356
4443
  });
4357
4444
  });
4358
4445
  }