@fangzhongya/vue-archive 0.0.46 → 0.0.48

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 (40) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/node/index.cjs +166 -134
  3. package/dist/node/index.d.cts +4 -0
  4. package/dist/node/index.d.ts +4 -0
  5. package/dist/node/index.js +166 -134
  6. package/dist/packages/components/boxurl/index.vue.cjs +1 -1
  7. package/dist/packages/components/boxurl/index.vue.js +37 -27
  8. package/dist/packages/components/code/index.vue.cjs +1 -1
  9. package/dist/packages/components/code/index.vue.js +67 -57
  10. package/dist/packages/components/compo/index.vue.cjs +1 -1
  11. package/dist/packages/components/compo/index.vue.js +18 -16
  12. package/dist/packages/components/compo/info-top.vue.cjs +1 -0
  13. package/dist/packages/components/compo/info-top.vue.js +32 -0
  14. package/dist/packages/components/compo/info-top.vue2.cjs +1 -0
  15. package/dist/packages/components/compo/info-top.vue2.js +4 -0
  16. package/dist/packages/components/compo/props.vue.cjs +1 -1
  17. package/dist/packages/components/compo/props.vue.js +44 -40
  18. package/dist/packages/components/compo/top.cjs +1 -1
  19. package/dist/packages/components/compo/top.js +69 -48
  20. package/dist/packages/components/main/index.vue.cjs +1 -1
  21. package/dist/packages/components/main/index.vue.js +30 -25
  22. package/dist/packages/components/test/index.cjs +1 -1
  23. package/dist/packages/components/test/index.js +24 -22
  24. package/dist/packages/components/test/top.cjs +1 -1
  25. package/dist/packages/components/test/top.js +69 -84
  26. package/dist/packages/components/use/set-code.vue.cjs +1 -1
  27. package/dist/packages/components/use/set-code.vue.js +31 -36
  28. package/dist/packages/config.d.ts +3 -0
  29. package/dist/packages/page/develop/index.vue2.cjs +1 -1
  30. package/dist/packages/page/develop/index.vue2.js +2 -1
  31. package/dist/packages/utils/common.cjs +1 -1
  32. package/dist/packages/utils/common.d.ts +2 -0
  33. package/dist/packages/utils/common.js +13 -12
  34. package/dist/packages/utils/glob.cjs +2 -2
  35. package/dist/packages/utils/glob.d.ts +1 -1
  36. package/dist/packages/utils/glob.js +226 -235
  37. package/dist/packages/utils/util.cjs +1 -0
  38. package/dist/packages/utils/util.d.ts +4 -0
  39. package/dist/packages/utils/util.js +46 -0
  40. package/package.json +2 -2
@@ -1,9 +1,9 @@
1
- // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js
1
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js
2
2
  function isArray(obj) {
3
3
  return Object.prototype.toString.call(obj) == "[object Array]";
4
4
  }
5
5
 
6
- // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-A276ZDLP.js
6
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-A276ZDLP.js
7
7
  function getStartSames(str, val) {
8
8
  let s = "";
9
9
  const vs = [...val];
@@ -19,7 +19,7 @@ function getStartSames(str, val) {
19
19
  return [s, str.substring(index), val.substring(index)];
20
20
  }
21
21
 
22
- // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-AWC672JW.js
22
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-AWC672JW.js
23
23
  function getImportUrl(url, imp) {
24
24
  const arr = getStartSames(url, imp);
25
25
  const ts = arr[0];
@@ -46,12 +46,12 @@ function getImportUrl(url, imp) {
46
46
  return ds.join("") + arr[2].replace(/\\/g, "/");
47
47
  }
48
48
 
49
- // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js
49
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js
50
50
  function firstUpper(str) {
51
51
  return str.slice(0, 1).toUpperCase() + str.slice(1);
52
52
  }
53
53
 
54
- // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js
54
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js
55
55
  function lineToLargeHump(name) {
56
56
  let arr = name.split("-");
57
57
  arr = arr.map((vs) => {
@@ -771,7 +771,7 @@ function runDev(config2, configCallback) {
771
771
  return new FangMd(config2, configCallback);
772
772
  }
773
773
 
774
- // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-NCSN3MC5.js
774
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-NCSN3MC5.js
775
775
  var zObj = {
776
776
  "<": "&lt;",
777
777
  ">": "&gt;",
@@ -792,7 +792,7 @@ function htmlEscape(str) {
792
792
  // packages/node/index.ts
793
793
  import { join as join4 } from "path";
794
794
 
795
- // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js
795
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js
796
796
  function mergeObject(a, b, j = 0, i) {
797
797
  if (a instanceof Array) {
798
798
  if (j > 0 && i) {
@@ -835,7 +835,7 @@ function mergeObject(a, b, j = 0, i) {
835
835
  return a;
836
836
  }
837
837
 
838
- // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js
838
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js
839
839
  function humpToLine(name) {
840
840
  const reg = /(([A-Z])([^A-Z]*))/g;
841
841
  let result;
@@ -857,7 +857,7 @@ function humpToLine(name) {
857
857
  }
858
858
  }
859
859
 
860
- // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-LPMR5W6M.js
860
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-LPMR5W6M.js
861
861
  function appearNum(str, t) {
862
862
  let reg = t;
863
863
  if (typeof t == "string") {
@@ -868,12 +868,12 @@ function appearNum(str, t) {
868
868
  return c;
869
869
  }
870
870
 
871
- // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js
871
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js
872
872
  function firstLower(str) {
873
873
  return str.slice(0, 1).toLowerCase() + str.slice(1);
874
874
  }
875
875
 
876
- // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js
876
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js
877
877
  function asyncMergeArray(arr, callback) {
878
878
  return new Promise((resolve2, reject) => {
879
879
  let index = 0;
@@ -897,7 +897,7 @@ function asyncMergeArray(arr, callback) {
897
897
  });
898
898
  }
899
899
 
900
- // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js
900
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js
901
901
  function getSuffix2(url) {
902
902
  const reg = /\.([a-z|A-Z]+)$/;
903
903
  const regs = reg.exec(url);
@@ -918,7 +918,7 @@ function getConfig(key) {
918
918
  return config[key];
919
919
  }
920
920
 
921
- // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-7PJ2D3KR.js
921
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-7PJ2D3KR.js
922
922
  function getVueText(content) {
923
923
  const result = {
924
924
  template: "",
@@ -1035,6 +1035,7 @@ function getUrlName(url, pps, raliass = {}, alias = "") {
1035
1035
  let rsobj = {
1036
1036
  url: "",
1037
1037
  dir: "",
1038
+ cwd: "",
1038
1039
  suffix: getSuffix2(url),
1039
1040
  name: lineToLargeHump(value),
1040
1041
  value,
@@ -1097,6 +1098,7 @@ function getComponentsArr(urls, v, comRaw, com, config2) {
1097
1098
  value.curprops = config2.curprops || "";
1098
1099
  value.value = k;
1099
1100
  value.dir = v.dir;
1101
+ value.cwd = v.cwd;
1100
1102
  value.suffix = getSuffix2(key);
1101
1103
  value.tdir = tdir;
1102
1104
  value.key = key;
@@ -1110,6 +1112,7 @@ function getComponentsArr(urls, v, comRaw, com, config2) {
1110
1112
  value.comprops = config2.comprops;
1111
1113
  value.curprops = config2.curprops;
1112
1114
  value.dir = v.dir;
1115
+ value.cwd = v.cwd;
1113
1116
  value.tdir = tdir;
1114
1117
  value.key = key;
1115
1118
  value.component = com[key];
@@ -1504,7 +1507,7 @@ function parse(source, options = {}) {
1504
1507
  }
1505
1508
  var stringify = getStringifier();
1506
1509
 
1507
- // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-FS4JPT23.js
1510
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-FS4JPT23.js
1508
1511
  function deComment(code) {
1509
1512
  let output = "";
1510
1513
  let state = "code";
@@ -1596,7 +1599,7 @@ function deComment(code) {
1596
1599
  return output;
1597
1600
  }
1598
1601
 
1599
- // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-DILPRD5C.js
1602
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-DILPRD5C.js
1600
1603
  function getImports(code, includeType = false) {
1601
1604
  code = deComment(code);
1602
1605
  const imports = /* @__PURE__ */ new Set();
@@ -1845,6 +1848,7 @@ function getTestMd(topurl, mlurl, exa, com) {
1845
1848
  const comName = mlurl[index];
1846
1849
  if (key == topurl + comName + exa.md + ".md") {
1847
1850
  arr.push({
1851
+ cwd: exa.cwd || com.cwd,
1848
1852
  topurl,
1849
1853
  comkey: com.key,
1850
1854
  suffix: getSuffix2(key),
@@ -1898,6 +1902,7 @@ function getTestObj(key) {
1898
1902
  suffix: getSuffix2(key2),
1899
1903
  comname: com.name,
1900
1904
  comkey: com.key,
1905
+ cwd: exa.cwd || com.cwd,
1901
1906
  key: key2,
1902
1907
  dir: com.dir,
1903
1908
  url: key2,
@@ -1926,6 +1931,7 @@ function getTestArrs(arr, com, exa) {
1926
1931
  if (key == testurl + exa.md + ".md") {
1927
1932
  com.mds = com.mds || [];
1928
1933
  com.mds.push({
1934
+ cwd: com.cwd,
1929
1935
  topurl: testurl,
1930
1936
  comkey: com.key,
1931
1937
  suffix: getSuffix2(key),
@@ -1955,6 +1961,7 @@ function getTestArrs(arr, com, exa) {
1955
1961
  suffix: getSuffix2(key),
1956
1962
  comname: com.name,
1957
1963
  comkey: com.key,
1964
+ cwd: exa.cwd || com.cwd,
1958
1965
  key,
1959
1966
  dir: com.dir,
1960
1967
  url: key,
@@ -1972,6 +1979,7 @@ function getTestArrs(arr, com, exa) {
1972
1979
  if (key == testurl + exa.md + ".md") {
1973
1980
  com.mds = com.mds || [];
1974
1981
  com.mds.push({
1982
+ cwd: com.cwd,
1975
1983
  topurl: testurl,
1976
1984
  comkey: com.key,
1977
1985
  suffix: getSuffix2(key),
@@ -1995,6 +2003,7 @@ function getTestArrs(arr, com, exa) {
1995
2003
  value = ms[1];
1996
2004
  }
1997
2005
  arr[key] = {
2006
+ cwd: exa.cwd || com.cwd,
1998
2007
  topurl: testurl,
1999
2008
  name: com.value,
2000
2009
  value,
@@ -2026,8 +2035,13 @@ function getKeyMds(key) {
2026
2035
  getTestObj(key);
2027
2036
  return componentsObj[key].mds;
2028
2037
  }
2029
- async function getTestImportUrl(key, text, type, dir, url, comprops, curprops) {
2030
- let arr = await getImport(text, type) || [];
2038
+ async function getTestImportUrl(cobj, text, type) {
2039
+ let key = cobj.key;
2040
+ let dir = cobj.dir;
2041
+ let url = cobj.url;
2042
+ let comprops = cobj.comprops;
2043
+ let curprops = cobj.curprops;
2044
+ let arr = await getImport(text, type || cobj.suffix) || [];
2031
2045
  let urs = url.split("/");
2032
2046
  return arr.map((value) => {
2033
2047
  if (value.startsWith("./")) {
@@ -2039,6 +2053,7 @@ async function getTestImportUrl(key, text, type, dir, url, comprops, curprops) {
2039
2053
  const rv = {
2040
2054
  key: ukey,
2041
2055
  name: value,
2056
+ cwd: cobj.cwd,
2042
2057
  comprops: comprops || "",
2043
2058
  curprops: curprops || "",
2044
2059
  value: v,
@@ -2067,6 +2082,7 @@ async function getTestImportUrl(key, text, type, dir, url, comprops, curprops) {
2067
2082
  const rv = {
2068
2083
  key: ukey,
2069
2084
  name: v,
2085
+ cwd: cobj.cwd,
2070
2086
  comprops: comprops || "",
2071
2087
  curprops: curprops || "",
2072
2088
  value: v,
@@ -2090,6 +2106,7 @@ async function getTestImportUrl(key, text, type, dir, url, comprops, curprops) {
2090
2106
  suffix: getSuffix2(value),
2091
2107
  head,
2092
2108
  dir,
2109
+ cwd: cobj.cwd,
2093
2110
  url: head + "/" + v
2094
2111
  };
2095
2112
  return rv;
@@ -2166,15 +2183,7 @@ function getCompoNameObj() {
2166
2183
  async function getPropsImport(text, obj) {
2167
2184
  let ts = text;
2168
2185
  if (text) {
2169
- let arr = (await getTestImportUrl(
2170
- obj.key,
2171
- text,
2172
- obj.suffix,
2173
- obj.dir,
2174
- obj.url,
2175
- obj.comprops,
2176
- obj.curprops
2177
- )).filter((v) => {
2186
+ let arr = (await getTestImportUrl(obj, text)).filter((v) => {
2178
2187
  return isComprops(v.key, obj.comprops || "") || isCurprops(v.key, obj.curprops || "");
2179
2188
  });
2180
2189
  ts = await getPropsTexts(arr) + ts;
@@ -2223,15 +2232,7 @@ async function getComponentsProps(text, obj) {
2223
2232
  let ts = text;
2224
2233
  if (text) {
2225
2234
  if (obj.comprops || obj.curprops) {
2226
- let arr = (await getTestImportUrl(
2227
- obj.key,
2228
- text,
2229
- obj.suffix,
2230
- obj.dir,
2231
- obj.url,
2232
- obj.comprops || "",
2233
- obj.curprops
2234
- )).filter((v) => {
2235
+ let arr = (await getTestImportUrl(obj, text)).filter((v) => {
2235
2236
  return isComprops(v.key, obj.comprops || "") || isCurprops(v.key, obj.curprops || "");
2236
2237
  });
2237
2238
  let str = await getPropsTexts(arr);
@@ -2579,6 +2580,9 @@ function addTags(tag, obj) {
2579
2580
  case "text":
2580
2581
  addTitle(obj);
2581
2582
  return true;
2583
+ case "html":
2584
+ addTitle(obj);
2585
+ return true;
2582
2586
  default:
2583
2587
  return false;
2584
2588
  }
@@ -2711,22 +2715,32 @@ function getTopDom(props2, h4, isZy) {
2711
2715
  if (is) {
2712
2716
  setDivision();
2713
2717
  }
2714
- let type = obj.title.type || "div";
2715
- doms.push(
2716
- h4(
2717
- type,
2718
- {
2719
- class: "compo-top-title"
2720
- },
2721
- [
2722
- h4("span", {}, [
2723
- getValue(
2724
- obj.title.name + " " + obj.title.description
2725
- )
2726
- ])
2727
- ]
2728
- )
2729
- );
2718
+ let type = (obj.title.type || "div").split(".");
2719
+ let c = type[1] || "";
2720
+ if (type[0] == "html") {
2721
+ doms.push(
2722
+ h4("div", {
2723
+ class: "compo-top-title " + c,
2724
+ innerHTML: obj.title.name + " " + obj.title.description
2725
+ })
2726
+ );
2727
+ } else {
2728
+ doms.push(
2729
+ h4(
2730
+ type[0],
2731
+ {
2732
+ class: "compo-top-title " + c
2733
+ },
2734
+ [
2735
+ h4("span", {}, [
2736
+ getValue(
2737
+ obj.title.name + " " + obj.title.description
2738
+ )
2739
+ ])
2740
+ ]
2741
+ )
2742
+ );
2743
+ }
2730
2744
  }
2731
2745
  if (is) {
2732
2746
  if (list.length > 0) {
@@ -2743,24 +2757,46 @@ function getTopDom(props2, h4, isZy) {
2743
2757
  )
2744
2758
  );
2745
2759
  }
2746
- if (obj.text) {
2747
- let type = obj.text.type || "div";
2760
+ if (obj.html) {
2761
+ let type = (obj.html.type || "div").split(".");
2762
+ let c = type[1] || "";
2748
2763
  list.push(
2749
- h4(
2750
- type,
2751
- {
2752
- class: "compo-top-text"
2753
- },
2754
- [
2755
- h4("span", {}, [
2756
- getValue(
2757
- obj.text.name + " " + obj.text.description
2758
- )
2759
- ])
2760
- ]
2761
- )
2764
+ h4(type[0], {
2765
+ class: "compo-top-html " + c,
2766
+ innerHTML: obj.html.name + " " + obj.html.description
2767
+ })
2762
2768
  );
2763
2769
  }
2770
+ ["text"].forEach((v) => {
2771
+ if (obj[v]) {
2772
+ let type = (obj[v].type || "div").split(".");
2773
+ let c = type[1] || "";
2774
+ if (type[0] == "html") {
2775
+ list.push(
2776
+ h4("div", {
2777
+ class: "compo-top-" + v + " " + c,
2778
+ innerHTML: obj[v].name + " " + obj[v].description
2779
+ })
2780
+ );
2781
+ } else {
2782
+ list.push(
2783
+ h4(
2784
+ type[0],
2785
+ {
2786
+ class: "compo-top-" + v + " " + c
2787
+ },
2788
+ [
2789
+ h4("span", {}, [
2790
+ getValue(
2791
+ obj[v].name + " " + obj[v].description
2792
+ )
2793
+ ])
2794
+ ]
2795
+ )
2796
+ );
2797
+ }
2798
+ }
2799
+ });
2764
2800
  });
2765
2801
  setTitle3();
2766
2802
  setDivision();
@@ -2872,22 +2908,32 @@ function getTestTopDom(props2, h4, isZy) {
2872
2908
  if (is) {
2873
2909
  setDivision();
2874
2910
  }
2875
- let type = obj.title.type || "div";
2876
- doms.push(
2877
- h4(
2878
- type,
2879
- {
2880
- class: "test-top-title"
2881
- },
2882
- [
2883
- h4("span", {}, [
2884
- getValue(
2885
- obj.title.name + " " + obj.title.description
2886
- )
2887
- ])
2888
- ]
2889
- )
2890
- );
2911
+ let type = (obj.title.type || "div").split(".");
2912
+ let c = type[1] || "";
2913
+ if (type[0] == "html") {
2914
+ doms.push(
2915
+ h4("div", {
2916
+ class: "test-top-title " + c,
2917
+ innerHTML: obj.title.name + " " + obj.title.description
2918
+ })
2919
+ );
2920
+ } else {
2921
+ doms.push(
2922
+ h4(
2923
+ type[0],
2924
+ {
2925
+ class: "test-top-title " + c
2926
+ },
2927
+ [
2928
+ h4("span", {}, [
2929
+ getValue(
2930
+ obj.title.name + " " + obj.title.description
2931
+ )
2932
+ ])
2933
+ ]
2934
+ )
2935
+ );
2936
+ }
2891
2937
  }
2892
2938
  if (is) {
2893
2939
  if (list.length > 0) {
@@ -2904,60 +2950,46 @@ function getTestTopDom(props2, h4, isZy) {
2904
2950
  )
2905
2951
  );
2906
2952
  }
2907
- if (obj.text) {
2908
- let type = obj.text.type || "div";
2953
+ if (obj.html) {
2954
+ let type = (obj.html.type || "div").split(".");
2955
+ let c = type[1] || "";
2909
2956
  list.push(
2910
- h4(
2911
- type,
2912
- {
2913
- class: "test-top-text"
2914
- },
2915
- [
2916
- h4("span", {}, [
2917
- getValue(
2918
- obj.text.name + " " + obj.text.description
2919
- )
2920
- ])
2921
- ]
2922
- )
2923
- );
2924
- }
2925
- if (obj.proposal) {
2926
- let type = obj.proposal.type || "div";
2927
- list.push(
2928
- h4(
2929
- type,
2930
- {
2931
- class: "test-top-proposal"
2932
- },
2933
- [
2934
- h4("span", {}, [
2935
- getValue(
2936
- obj.proposal.name + " " + obj.proposal.description
2937
- )
2938
- ])
2939
- ]
2940
- )
2941
- );
2942
- }
2943
- if (obj.error) {
2944
- let type = obj.error.type || "div";
2945
- list.push(
2946
- h4(
2947
- type,
2948
- {
2949
- class: "test-top-error"
2950
- },
2951
- [
2952
- h4("span", {}, [
2953
- getValue(
2954
- obj.error.name + " " + obj.error.description
2955
- )
2956
- ])
2957
- ]
2958
- )
2957
+ h4(type[0], {
2958
+ class: "test-top-html " + c,
2959
+ innerHTML: obj.html.name + " " + obj.html.description
2960
+ })
2959
2961
  );
2960
2962
  }
2963
+ ["text", "proposal", "error"].forEach((v) => {
2964
+ if (obj[v]) {
2965
+ let type = (obj[v].type || "div").split(".");
2966
+ let c = type[1] || "";
2967
+ if (type[0] == "html") {
2968
+ list.push(
2969
+ h4("div", {
2970
+ class: "test-top-" + v + " " + c,
2971
+ innerHTML: obj[v].name + " " + obj[v].description
2972
+ })
2973
+ );
2974
+ } else {
2975
+ list.push(
2976
+ h4(
2977
+ type[0],
2978
+ {
2979
+ class: "test-top-" + v + " " + c
2980
+ },
2981
+ [
2982
+ h4("span", {}, [
2983
+ getValue(
2984
+ obj[v].name + " " + obj[v].description
2985
+ )
2986
+ ])
2987
+ ]
2988
+ )
2989
+ );
2990
+ }
2991
+ }
2992
+ });
2961
2993
  });
2962
2994
  setTitle3();
2963
2995
  setDivision();
@@ -2982,7 +3014,7 @@ var top_default2 = defineComponent2({
2982
3014
  }
2983
3015
  });
2984
3016
 
2985
- // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-7O4MJOHM.js
3017
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-7O4MJOHM.js
2986
3018
  var FUNCTION_REGEX = /^\s*(?:(async)\s+)?(?:function\s*(\*?)\s*(\w*)\s*\(([\s\S]*?)\)|(\*?\s*)\b(\w+)\s*\(([\s\S]*?)\)|\(([\s\S]*?)\)|([^=>,\(\)]+?))\s*(?:=>)?\s*(?:\{([\s\S]*?)\}|([\s\S]*))$/;
2987
3019
  function getFunctionFormat(v) {
2988
3020
  if (!v) return;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),c={class:"box-url-span"},r={class:"box-url-box-div"},v={class:"box-div-li"},u={class:"box-div-li-span"},m={class:"box-div-li-span"},x={key:0,class:"box-div-li"},p={class:"box-div-li-span"},b={class:"box-div-li"},E={class:"box-div-li-span"},N=e.defineComponent({__name:"index",props:{value:Object},setup(l){const a=e.ref(),n=e.ref(""),i=e.ref("");return e.onMounted(()=>{a.value.onmouseenter=t=>{var t=t||window.event;let o,s;t.x||t.y?(o=t.x,s=t.y):(t.pageX||t.pageY)&&(o=t.pageX-1,s=t.pageY-1),n.value=o+"px",i.value=s+"px"}}),(d,t)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"boxurl",ref:a,class:"box-url"},[e.createElementVNode("span",c,[e.renderSlot(d.$slots,"default")]),e.createElementVNode("div",{class:"box-url-box",style:e.normalizeStyle({top:i.value,left:n.value})},[e.createElementVNode("div",r,[e.createElementVNode("div",v,[e.createElementVNode("div",u,e.toDisplayString(l.value?.name),1),e.createElementVNode("div",m,e.toDisplayString(l.value?.value),1)]),l.value?.aliasNames&&l.value?.aliasNames.length?(e.openBlock(),e.createElementBlock("div",x,[t[0]||(t[0]=e.createElementVNode("div",{class:"box-div-li-span"},"别名",-1)),e.createElementVNode("div",p,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value?.aliasNames,o=>(e.openBlock(),e.createElementBlock("span",null,e.toDisplayString(o),1))),256))])])):e.createCommentVNode("",!0),e.createElementVNode("div",b,[t[1]||(t[1]=e.createElementVNode("div",{class:"box-div-li-span"}," 文件路径 ",-1)),e.createElementVNode("div",E,e.toDisplayString(l.value?.key),1)])])],4)],512))}});module.exports=N;
1
+ "use strict";const e=require("vue"),u=require("../../utils/util.cjs"),m=require("../../config.cjs"),x=require("@fangzhongya/utils/urls/getReplaceUrls"),p={class:"box-url-span"},b={class:"box-url-box-div"},y={class:"box-div-li"},E={class:"box-div-li-span"},N={class:"box-div-li-span"},g={key:0,class:"box-div-li"},f={class:"box-div-li-span"},k={class:"box-div-li"},V={class:"box-div-li-span"},B=e.defineComponent({__name:"index",props:{value:Object},setup(l){const a=l,i=e.ref(),c=e.ref(""),r=e.ref(""),d=m.getConfig("directory"),v=()=>{const s=a.value?.key,t=x.getReplaceUrls(s,a.value?.cwd||d);u.openInEditor(t)};return e.onMounted(()=>{i.value.onmouseenter=t=>{var t=t||window.event;let o,n;t.x||t.y?(o=t.x,n=t.y):(t.pageX||t.pageY)&&(o=t.pageX-1,n=t.pageY-1),c.value=o+"px",r.value=n+"px"}}),(s,t)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"boxurl",ref:i,class:"box-url"},[e.createElementVNode("span",p,[e.renderSlot(s.$slots,"default")]),e.createElementVNode("div",{class:"box-url-box",style:e.normalizeStyle({top:r.value,left:c.value})},[e.createElementVNode("div",b,[e.createElementVNode("div",y,[e.createElementVNode("div",E,e.toDisplayString(l.value?.name),1),e.createElementVNode("div",N,e.toDisplayString(l.value?.value),1)]),l.value?.aliasNames&&l.value?.aliasNames.length?(e.openBlock(),e.createElementBlock("div",g,[t[0]||(t[0]=e.createElementVNode("div",{class:"box-div-li-span"},"别名",-1)),e.createElementVNode("div",f,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value?.aliasNames,o=>(e.openBlock(),e.createElementBlock("span",null,e.toDisplayString(o),1))),256))])])):e.createCommentVNode("",!0),e.createElementVNode("div",k,[t[1]||(t[1]=e.createElementVNode("div",{class:"box-div-li-span"},"文件路径",-1)),e.createElementVNode("div",V,e.toDisplayString(l.value?.key),1)]),e.createElementVNode("div",{class:"box-div-but",onClick:v},"打开vscode")])],4)],512))}});module.exports=B;
@@ -1,52 +1,62 @@
1
- import { defineComponent as x, ref as d, onMounted as b, createElementBlock as a, openBlock as o, createElementVNode as s, renderSlot as m, normalizeStyle as p, createCommentVNode as f, toDisplayString as i, Fragment as y, renderList as _ } from "vue";
2
- const g = { class: "box-url-span" }, h = { class: "box-url-box-div" }, k = { class: "box-div-li" }, N = { class: "box-div-li-span" }, S = { class: "box-div-li-span" }, w = {
1
+ import { defineComponent as p, ref as v, onMounted as f, createElementBlock as l, openBlock as i, createElementVNode as s, renderSlot as y, normalizeStyle as g, createCommentVNode as k, toDisplayString as a, Fragment as _, renderList as h } from "vue";
2
+ import { openInEditor as N } from "../../utils/util.js";
3
+ import { getConfig as C } from "../../config.js";
4
+ import { getReplaceUrls as w } from "@fangzhongya/utils/urls/getReplaceUrls";
5
+ const E = { class: "box-url-span" }, S = { class: "box-url-box-div" }, B = { class: "box-div-li" }, V = { class: "box-div-li-span" }, X = { class: "box-div-li-span" }, Y = {
3
6
  key: 0,
4
7
  class: "box-div-li"
5
- }, B = { class: "box-div-li-span" }, C = { class: "box-div-li" }, E = { class: "box-div-li-span" }, X = /* @__PURE__ */ x({
8
+ }, j = { class: "box-div-li-span" }, z = { class: "box-div-li" }, D = { class: "box-div-li-span" }, O = /* @__PURE__ */ p({
6
9
  __name: "index",
7
10
  props: {
8
11
  value: Object
9
12
  },
10
- setup(l) {
11
- const v = d(), u = d(""), r = d("");
12
- return b(() => {
13
- v.value.onmouseenter = (e) => {
13
+ setup(o) {
14
+ const r = o, c = v(), u = v(""), x = v(""), m = C("directory"), b = () => {
15
+ const n = r.value?.key, e = w(n, r.value?.cwd || m);
16
+ N(e);
17
+ };
18
+ return f(() => {
19
+ c.value.onmouseenter = (e) => {
14
20
  var e = e || window.event;
15
- let t, n;
16
- e.x || e.y ? (t = e.x, n = e.y) : (e.pageX || e.pageY) && (t = e.pageX - 1, n = e.pageY - 1), u.value = t + "px", r.value = n + "px";
21
+ let t, d;
22
+ e.x || e.y ? (t = e.x, d = e.y) : (e.pageX || e.pageY) && (t = e.pageX - 1, d = e.pageY - 1), u.value = t + "px", x.value = d + "px";
17
23
  };
18
- }), (c, e) => (o(), a("div", {
24
+ }), (n, e) => (i(), l("div", {
19
25
  ref_key: "boxurl",
20
- ref: v,
26
+ ref: c,
21
27
  class: "box-url"
22
28
  }, [
23
- s("span", g, [
24
- m(c.$slots, "default")
29
+ s("span", E, [
30
+ y(n.$slots, "default")
25
31
  ]),
26
32
  s("div", {
27
33
  class: "box-url-box",
28
- style: p({ top: r.value, left: u.value })
34
+ style: g({ top: x.value, left: u.value })
29
35
  }, [
30
- s("div", h, [
31
- s("div", k, [
32
- s("div", N, i(l.value?.name), 1),
33
- s("div", S, i(l.value?.value), 1)
36
+ s("div", S, [
37
+ s("div", B, [
38
+ s("div", V, a(o.value?.name), 1),
39
+ s("div", X, a(o.value?.value), 1)
34
40
  ]),
35
- l.value?.aliasNames && l.value?.aliasNames.length ? (o(), a("div", w, [
41
+ o.value?.aliasNames && o.value?.aliasNames.length ? (i(), l("div", Y, [
36
42
  e[0] || (e[0] = s("div", { class: "box-div-li-span" }, "别名", -1)),
37
- s("div", B, [
38
- (o(!0), a(y, null, _(l.value?.aliasNames, (t) => (o(), a("span", null, i(t), 1))), 256))
43
+ s("div", j, [
44
+ (i(!0), l(_, null, h(o.value?.aliasNames, (t) => (i(), l("span", null, a(t), 1))), 256))
39
45
  ])
40
- ])) : f("", !0),
41
- s("div", C, [
42
- e[1] || (e[1] = s("div", { class: "box-div-li-span" }, " 文件路径 ", -1)),
43
- s("div", E, i(l.value?.key), 1)
44
- ])
46
+ ])) : k("", !0),
47
+ s("div", z, [
48
+ e[1] || (e[1] = s("div", { class: "box-div-li-span" }, "文件路径", -1)),
49
+ s("div", D, a(o.value?.key), 1)
50
+ ]),
51
+ s("div", {
52
+ class: "box-div-but",
53
+ onClick: b
54
+ }, "打开vscode")
45
55
  ])
46
56
  ], 4)
47
57
  ], 512));
48
58
  }
49
59
  });
50
60
  export {
51
- X as default
61
+ O as default
52
62
  };
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),u=require("../boxurl/index.vue.cjs"),g=require("../../router/index.cjs"),m=require("./highlight.vue.cjs"),v=require("../../utils/index.cjs"),d=require("../../utils/glob.cjs"),C=require("vue-router"),x={class:"code"},w={class:"code-top"},E={class:"code-top-but"},N={class:"top-but-files"},V=["onClick"],y={class:"code-highlightjs"},b=e.defineComponent({__name:"index",props:{text:String,value:Object},setup(p){const _=C.useRouter(),t=p;e.watch(()=>t.text,()=>{r()});const a=e.ref([]),o=e.ref(),n=e.ref(!1);function h(){o.value?.raw?v.copyCode(o.value.raw):v.copyCode(t.text)}function f(){n.value=!n.value}function k(){g.toSingle(_,t.value)}function s(i){n.value=!0,o.value=i}function r(){o.value=void 0,n.value=!1,t.text&&d.getTestImportUrl(t.value?.key,t.text,"vue",t.value?.dir,t.value?.url,t.value?.comprops).then(i=>{d.getLocalTextArr(i).then(c=>{a.value=c.filter(l=>l.raw)})})}return r(),(i,c)=>(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("div",w,[e.createElementVNode("div",E,[e.createElementVNode("div",{class:"but-div",onClick:k},"go"),e.createElementVNode("div",{class:"but-div",onClick:h},"复制"),e.createElementVNode("div",{class:"but-div",onClick:f},e.toDisplayString(n.value?"隐藏":"显示"),1),e.createElementVNode("div",N,[e.createVNode(u,{value:t.value},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["but-div",{on:!(o.value&&o.value.value)}]),onClick:c[0]||(c[0]=e.withModifiers(l=>s(),["stop"]))}," index.vue ",2)]),_:1},8,["value"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(l,q)=>(e.openBlock(),e.createBlock(u,{value:l},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["but-div",{on:l.key==o.value?.key}]),onClick:e.withModifiers(B=>s(l),["stop"])},e.toDisplayString(l.value),11,V)]),_:2},1032,["value"]))),256))])])]),e.withDirectives(e.createElementVNode("div",y,[e.createVNode(m,{language:"html",code:o.value?.raw||t.text},null,8,["code"])],512),[[e.vShow,n.value]])]))}});module.exports=b;
1
+ "use strict";const e=require("vue"),u=require("../boxurl/index.vue.cjs"),x=require("../../router/index.cjs"),w=require("./highlight.vue.cjs"),v=require("../../utils/index.cjs"),d=require("../../utils/glob.cjs"),f=require("../../utils/util.cjs"),_=require("@fangzhongya/utils/urls/getUrlCatalogueObj"),b=require("vue-router"),y={class:"code"},E={class:"code-top"},N={class:"code-top-but"},V={class:"top-but-files"},q=["onClick"],S={class:"code-highlightjs"},B=e.defineComponent({__name:"index",props:{text:String,value:Object},setup(p){const g=b.useRouter(),t=p;e.watch(()=>t.text,()=>{s()});const c=e.ref([]),o=e.ref(),a=e.ref(!1);function k(){o.value?.raw?v.copyCode(o.value.raw):v.copyCode(t.text)}function h(){if(o.value?.raw){const l=_.getUrlCatalogueObj(o.value?.key),n=t.value?.name+"_"+l.name+"."+l.suffix;f.exportStringToFile(o.value.raw,n)}else{const l=_.getUrlCatalogueObj(t.value?.key),n=t.value?.name+"_"+l.name+"."+l.suffix;f.exportStringToFile(t.text,n)}}function m(){a.value=!a.value}function C(){x.toSingle(g,t.value)}function r(l){a.value=!0,o.value=l}function s(){o.value=void 0,a.value=!1,t.text&&d.getTestImportUrl(t.value,t.text,"vue").then(l=>{d.getLocalTextArr(l).then(n=>{c.value=n.filter(i=>i.raw)})})}return s(),(l,n)=>(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("div",E,[e.createElementVNode("div",N,[e.createElementVNode("div",{class:"but-div",onClick:C},"go"),e.createElementVNode("div",{class:"but-div",onClick:k},"复制"),e.createElementVNode("div",{class:"but-div",onClick:h},"下载"),e.createElementVNode("div",{class:"but-div",onClick:m},e.toDisplayString(a.value?"隐藏":"显示"),1),e.createElementVNode("div",V,[e.createVNode(u,{value:t.value},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["but-div",{on:!(o.value&&o.value.value)}]),onClick:n[0]||(n[0]=e.withModifiers(i=>r(),["stop"]))}," index.vue ",2)]),_:1},8,["value"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(i,j)=>(e.openBlock(),e.createBlock(u,{value:i},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["but-div",{on:i.key==o.value?.key}]),onClick:e.withModifiers(D=>r(i),["stop"])},e.toDisplayString(i.value),11,q)]),_:2},1032,["value"]))),256))])])]),e.withDirectives(e.createElementVNode("div",S,[e.createVNode(w,{language:"html",code:o.value?.raw||t.text},null,8,["code"])],512),[[e.vShow,a.value]])]))}});module.exports=B;