@fangzhongya/vue-archive 0.0.39 → 0.0.41

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.
@@ -24,12 +24,12 @@ __export(index_exports, {
24
24
  });
25
25
  module.exports = __toCommonJS(index_exports);
26
26
 
27
- // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js
27
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js
28
28
  function isArray(obj) {
29
29
  return Object.prototype.toString.call(obj) == "[object Array]";
30
30
  }
31
31
 
32
- // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-A276ZDLP.js
32
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-A276ZDLP.js
33
33
  function getStartSames(str, val) {
34
34
  let s = "";
35
35
  const vs = [...val];
@@ -45,7 +45,7 @@ function getStartSames(str, val) {
45
45
  return [s, str.substring(index), val.substring(index)];
46
46
  }
47
47
 
48
- // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-AWC672JW.js
48
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-AWC672JW.js
49
49
  function getImportUrl(url, imp) {
50
50
  const arr = getStartSames(url, imp);
51
51
  const ts = arr[0];
@@ -72,12 +72,12 @@ function getImportUrl(url, imp) {
72
72
  return ds.join("") + arr[2].replace(/\\/g, "/");
73
73
  }
74
74
 
75
- // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js
75
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js
76
76
  function firstUpper(str) {
77
77
  return str.slice(0, 1).toUpperCase() + str.slice(1);
78
78
  }
79
79
 
80
- // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js
80
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js
81
81
  function lineToLargeHump(name) {
82
82
  let arr = name.split("-");
83
83
  arr = arr.map((vs) => {
@@ -786,7 +786,7 @@ function runDev(config2, configCallback) {
786
786
  return new FangMd(config2, configCallback);
787
787
  }
788
788
 
789
- // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-NCSN3MC5.js
789
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-NCSN3MC5.js
790
790
  var zObj = {
791
791
  "<": "&lt;",
792
792
  ">": "&gt;",
@@ -807,7 +807,7 @@ function htmlEscape(str) {
807
807
  // packages/node/index.ts
808
808
  var import_node_path = require("path");
809
809
 
810
- // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js
810
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js
811
811
  function mergeObject(a, b, j = 0, i) {
812
812
  if (a instanceof Array) {
813
813
  if (j > 0 && i) {
@@ -850,7 +850,7 @@ function mergeObject(a, b, j = 0, i) {
850
850
  return a;
851
851
  }
852
852
 
853
- // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js
853
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js
854
854
  function humpToLine(name) {
855
855
  const reg = /(([A-Z])([^A-Z]*))/g;
856
856
  let result;
@@ -872,7 +872,7 @@ function humpToLine(name) {
872
872
  }
873
873
  }
874
874
 
875
- // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-LPMR5W6M.js
875
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-LPMR5W6M.js
876
876
  function appearNum(str, t) {
877
877
  let reg = t;
878
878
  if (typeof t == "string") {
@@ -883,12 +883,12 @@ function appearNum(str, t) {
883
883
  return c;
884
884
  }
885
885
 
886
- // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js
886
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js
887
887
  function firstLower(str) {
888
888
  return str.slice(0, 1).toLowerCase() + str.slice(1);
889
889
  }
890
890
 
891
- // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js
891
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js
892
892
  function asyncMergeArray(arr, callback) {
893
893
  return new Promise((resolve2, reject) => {
894
894
  let index = 0;
@@ -912,7 +912,7 @@ function asyncMergeArray(arr, callback) {
912
912
  });
913
913
  }
914
914
 
915
- // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js
915
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js
916
916
  function getSuffix2(url) {
917
917
  const reg = /\.([a-z|A-Z]+)$/;
918
918
  const regs = reg.exec(url);
@@ -933,7 +933,7 @@ function getConfig(key) {
933
933
  return config[key];
934
934
  }
935
935
 
936
- // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-7PJ2D3KR.js
936
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-7PJ2D3KR.js
937
937
  function getVueText(content) {
938
938
  const result = {
939
939
  template: "",
@@ -1519,7 +1519,7 @@ function parse(source, options = {}) {
1519
1519
  }
1520
1520
  var stringify = getStringifier();
1521
1521
 
1522
- // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-FS4JPT23.js
1522
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-FS4JPT23.js
1523
1523
  function deComment(code) {
1524
1524
  let output = "";
1525
1525
  let state = "code";
@@ -1611,14 +1611,18 @@ function deComment(code) {
1611
1611
  return output;
1612
1612
  }
1613
1613
 
1614
- // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-I4VBDCIM.js
1615
- function getImports(code) {
1614
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-DILPRD5C.js
1615
+ function getImports(code, includeType = false) {
1616
1616
  code = deComment(code);
1617
1617
  const imports = /* @__PURE__ */ new Set();
1618
- const regex = /(?<staticImport>import\s*(?:type)?\s*(?:[\w*\s{},]+?\s+from\s*)?["']([^"']+)["'])|(?<sideEffectImport>import\s*["']([^"']+)["'])|(?<dynamicImport>import\s*\(\s*["']([^"']+)["']\s*\))|(?<export>export\s*(?:type)?\s*(?:\*\s*as\s*\w+|\*|[\w\s{},]+)?\s+from\s*["']([^"']+)["'])/g;
1618
+ const regex = /(?<staticImport>import\s*(?<typeKeyword>type\s+)?(?:[\w*\s{},]+?\s+from\s*)?["']([^"']+)["'])|(?<sideEffectImport>import\s*["']([^"']+)["'])|(?<dynamicImport>import\s*\(\s*["']([^"']+)["']\s*\))|(?<export>export\s*(?<exportType>type\s+)?(?:\*\s*as\s*\w+|\*|[\w\s{},]+)?\s+from\s*["']([^"']+)["'])/g;
1619
1619
  let match;
1620
1620
  while ((match = regex.exec(code)) !== null) {
1621
- const path = match[8] || match[6] || match[2];
1621
+ const groups = match.groups || {};
1622
+ const path = match[3] || match[4] || match[5] || match[8];
1623
+ if (!includeType && (groups.typeKeyword || groups.exportType)) {
1624
+ continue;
1625
+ }
1622
1626
  if (path) {
1623
1627
  imports.add(path);
1624
1628
  }
@@ -2993,7 +2997,7 @@ var top_default2 = (0, import_vue2.defineComponent)({
2993
2997
  }
2994
2998
  });
2995
2999
 
2996
- // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-7O4MJOHM.js
3000
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-7O4MJOHM.js
2997
3001
  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]*))$/;
2998
3002
  function getFunctionFormat(v) {
2999
3003
  if (!v) return;
@@ -3587,7 +3591,7 @@ function getDefault(ss, iss) {
3587
3591
  let ci = cs.indexOf(c);
3588
3592
  if (ci != -1) {
3589
3593
  let reg = new RegExp(
3590
- "^" + css[ci][0] + "(([^" + css[ci][1] + "])*)" + css[ci][1] + (iss ? "\\s" : ""),
3594
+ "^\\" + css[ci][0] + "(([^\\" + css[ci][1] + "])*)\\" + css[ci][1] + (iss ? "\\s" : ""),
3591
3595
  "gi"
3592
3596
  );
3593
3597
  let rs = reg.exec(ss);
@@ -1,9 +1,9 @@
1
- // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js
1
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/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.25/node_modules/@fangzhongya/utils/dist/chunk-A276ZDLP.js
6
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/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.25/node_modules/@fangzhongya/utils/dist/chunk-AWC672JW.js
22
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/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.25/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js
49
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/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.25/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js
54
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/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.25/node_modules/@fangzhongya/utils/dist/chunk-NCSN3MC5.js
774
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/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.25/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js
795
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/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.25/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js
838
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/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.25/node_modules/@fangzhongya/utils/dist/chunk-LPMR5W6M.js
860
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/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.25/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js
871
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/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.25/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js
876
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/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.25/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js
900
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/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.25/node_modules/@fangzhongya/utils/dist/chunk-7PJ2D3KR.js
921
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-7PJ2D3KR.js
922
922
  function getVueText(content) {
923
923
  const result = {
924
924
  template: "",
@@ -1504,7 +1504,7 @@ function parse(source, options = {}) {
1504
1504
  }
1505
1505
  var stringify = getStringifier();
1506
1506
 
1507
- // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-FS4JPT23.js
1507
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-FS4JPT23.js
1508
1508
  function deComment(code) {
1509
1509
  let output = "";
1510
1510
  let state = "code";
@@ -1596,14 +1596,18 @@ function deComment(code) {
1596
1596
  return output;
1597
1597
  }
1598
1598
 
1599
- // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-I4VBDCIM.js
1600
- function getImports(code) {
1599
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-DILPRD5C.js
1600
+ function getImports(code, includeType = false) {
1601
1601
  code = deComment(code);
1602
1602
  const imports = /* @__PURE__ */ new Set();
1603
- const regex = /(?<staticImport>import\s*(?:type)?\s*(?:[\w*\s{},]+?\s+from\s*)?["']([^"']+)["'])|(?<sideEffectImport>import\s*["']([^"']+)["'])|(?<dynamicImport>import\s*\(\s*["']([^"']+)["']\s*\))|(?<export>export\s*(?:type)?\s*(?:\*\s*as\s*\w+|\*|[\w\s{},]+)?\s+from\s*["']([^"']+)["'])/g;
1603
+ const regex = /(?<staticImport>import\s*(?<typeKeyword>type\s+)?(?:[\w*\s{},]+?\s+from\s*)?["']([^"']+)["'])|(?<sideEffectImport>import\s*["']([^"']+)["'])|(?<dynamicImport>import\s*\(\s*["']([^"']+)["']\s*\))|(?<export>export\s*(?<exportType>type\s+)?(?:\*\s*as\s*\w+|\*|[\w\s{},]+)?\s+from\s*["']([^"']+)["'])/g;
1604
1604
  let match;
1605
1605
  while ((match = regex.exec(code)) !== null) {
1606
- const path = match[8] || match[6] || match[2];
1606
+ const groups = match.groups || {};
1607
+ const path = match[3] || match[4] || match[5] || match[8];
1608
+ if (!includeType && (groups.typeKeyword || groups.exportType)) {
1609
+ continue;
1610
+ }
1607
1611
  if (path) {
1608
1612
  imports.add(path);
1609
1613
  }
@@ -2978,7 +2982,7 @@ var top_default2 = defineComponent2({
2978
2982
  }
2979
2983
  });
2980
2984
 
2981
- // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-7O4MJOHM.js
2985
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.26/node_modules/@fangzhongya/utils/dist/chunk-7O4MJOHM.js
2982
2986
  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]*))$/;
2983
2987
  function getFunctionFormat(v) {
2984
2988
  if (!v) return;
@@ -3572,7 +3576,7 @@ function getDefault(ss, iss) {
3572
3576
  let ci = cs.indexOf(c);
3573
3577
  if (ci != -1) {
3574
3578
  let reg = new RegExp(
3575
- "^" + css[ci][0] + "(([^" + css[ci][1] + "])*)" + css[ci][1] + (iss ? "\\s" : ""),
3579
+ "^\\" + css[ci][0] + "(([^\\" + css[ci][1] + "])*)\\" + css[ci][1] + (iss ? "\\s" : ""),
3576
3580
  "gi"
3577
3581
  );
3578
3582
  let rs = reg.exec(ss);
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),a=require("../../../../../../../_virtual/core.cjs");var g=e.defineComponent({props:{code:{type:String,required:!0},language:{type:String,default:""},autodetect:{type:Boolean,default:!0},ignoreIllegals:{type:Boolean,default:!0}},setup:function(u){var t=e.ref(u.language);e.watch(function(){return u.language},function(n){t.value=n});var l=e.computed(function(){return u.autodetect||!t.value}),o=e.computed(function(){return!l.value&&!a.getLanguage(t.value)});return{className:e.computed(function(){return o.value?"":"hljs "+t.value}),highlightedCode:e.computed(function(){var n;if(o.value)return console.warn('The language "'+t.value+'" you specified could not be found.'),u.code.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;");if(l.value){var r=a.highlightAuto(u.code);return t.value=(n=r.language)!==null&&n!==void 0?n:"",r.value}return(r=a.highlight(u.code,{language:t.value,ignoreIllegals:u.ignoreIllegals})).value})}},render:function(){return e.h("pre",{},[e.h("code",{class:this.className,innerHTML:this.highlightedCode})])}}),c={component:g};module.exports=c;
1
+ "use strict";const e=require("vue"),a=require("../../../../../../../_virtual/core.cjs");var g=e.defineComponent({props:{code:{type:String,required:!0},language:{type:String,default:""},autodetect:{type:Boolean,default:!0},ignoreIllegals:{type:Boolean,default:!0}},setup:function(u){var t=e.ref(u.language);e.watch((function(){return u.language}),(function(n){t.value=n}));var l=e.computed((function(){return u.autodetect||!t.value})),o=e.computed((function(){return!l.value&&!a.getLanguage(t.value)}));return{className:e.computed((function(){return o.value?"":"hljs "+t.value})),highlightedCode:e.computed((function(){var n;if(o.value)return console.warn('The language "'+t.value+'" you specified could not be found.'),u.code.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;");if(l.value){var r=a.highlightAuto(u.code);return t.value=(n=r.language)!==null&&n!==void 0?n:"",r.value}return(r=a.highlight(u.code,{language:t.value,ignoreIllegals:u.ignoreIllegals})).value}))}},render:function(){return e.h("pre",{},[e.h("code",{class:this.className,innerHTML:this.highlightedCode})])}}),c={component:g};module.exports=c;
@@ -2,19 +2,19 @@ import { defineComponent as i, h as g, ref as c, watch as d, computed as u } fro
2
2
  import n from "../../../../../../../_virtual/core.js";
3
3
  var p = i({ props: { code: { type: String, required: !0 }, language: { type: String, default: "" }, autodetect: { type: Boolean, default: !0 }, ignoreIllegals: { type: Boolean, default: !0 } }, setup: function(e) {
4
4
  var t = c(e.language);
5
- d(function() {
5
+ d((function() {
6
6
  return e.language;
7
- }, function(a) {
7
+ }), (function(a) {
8
8
  t.value = a;
9
- });
10
- var r = u(function() {
9
+ }));
10
+ var r = u((function() {
11
11
  return e.autodetect || !t.value;
12
- }), o = u(function() {
12
+ })), o = u((function() {
13
13
  return !r.value && !n.getLanguage(t.value);
14
- });
15
- return { className: u(function() {
14
+ }));
15
+ return { className: u((function() {
16
16
  return o.value ? "" : "hljs " + t.value;
17
- }), highlightedCode: u(function() {
17
+ })), highlightedCode: u((function() {
18
18
  var a;
19
19
  if (o.value) return console.warn('The language "' + t.value + '" you specified could not be found.'), e.code.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
20
20
  if (r.value) {
@@ -22,7 +22,7 @@ var p = i({ props: { code: { type: String, required: !0 }, language: { type: Str
22
22
  return t.value = (a = l.language) !== null && a !== void 0 ? a : "", l.value;
23
23
  }
24
24
  return (l = n.highlight(e.code, { language: t.value, ignoreIllegals: e.ignoreIllegals })).value;
25
- }) };
25
+ })) };
26
26
  }, render: function() {
27
27
  return g("pre", {}, [g("code", { class: this.className, innerHTML: this.highlightedCode })]);
28
28
  } }), v = { component: p };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../../utils/index.cjs");require("@fangzhongya/utils/basic/object/mergeObject");require("@fangzhongya/utils/basic/array/toggleArray");require("@fangzhongya/utils/name/humpToLine");require("@fangzhongya/utils/name/lineToLargeHump");require("@fangzhongya/utils/basic/string/appearNum");require("@fangzhongya/utils/basic/string/firstLower");require("@fangzhongya/utils/basic/array/duplicateRemoval");require("@fangzhongya/utils/basic/array/asyncMergeArray");require("@fangzhongya/utils/basic/string/firstUpper");require("@fangzhongya/utils/urls/getSuffix");require("@fangzhongya/utils/basic/array/replaceAfter");require("@fangzhongya/utils/html/getVueText");const o=require("../../utils/props.cjs"),i={titles:[],propss:[],slots:[],emitss:[],exposes:[]};function x(e,s){let r=e.charAt(0),l=[['"','"'],["'","'"],["`","`"],["(",")"],["{","}"],["[","]"]],a=l.map(p=>p[0]).indexOf(r);if(a!=-1){let n=new RegExp("^"+l[a][0]+"(([^"+l[a][1]+"])*)"+l[a][1]+(s?"\\s":""),"gi").exec(e);if(n)return n[0]}}function E(e){delete e.problems,delete e.source;let s=e.tag,r=e.name,l=e.description,t=e.default,a="";if(s=="default")r=r.trim(),r=x(r)||r;else if(s=="selectable")r=r.trim();else{if(r.includes("=")){const m=r.split("=");r=m[0];const g=m[1]+" "+l,d=x(g,!0);d?(t=d,l=g.replace(d,"")):t=e.default||m[1]||""}const n=/\s*\((.*)\)\s/gi.exec(l);n&&n.length>0&&(a=n[1],l=l.replace(n[0],""))}return e.name=r,e.default=t||"",e.description=l,e.selectable=a,e}function q(e){let s=["title","text","author","date"],r=u(e),l={};s.forEach(t=>{l[t]=r.obj[t]}),b(l),r.arr.forEach(t=>{f(t.key,t.value)})}function b(e){i.titles.push(e)}function O(e){let s=["props","name","type","default","selectable","description","descriptions","return"],r=u(e),l={};s.forEach(t=>{l[t]=r.obj[t]}),c(l,"props"),r.arr.forEach(t=>{f(t.key,t.value)})}function T(e){let s=["slot","name","selectable","description","descriptions"],r=u(e),l={};s.forEach(t=>{l[t]=r.obj[t]}),c(l,"slot"),r.arr.forEach(t=>{f(t.key,t.value)})}function y(e){let s=["emits","name","selectable","description","descriptions"],r=u(e),l={};s.forEach(t=>{l[t]=r.obj[t]}),c(l,"emits"),r.arr.forEach(t=>{f(t.key,t.value)})}function j(e){let s=["expose","name","type","return","selectable","description","descriptions"],r=u(e),l={};s.forEach(t=>{l[t]=r.obj[t]}),c(l,"expose"),r.arr.forEach(t=>{f(t.key,t.value)})}function c(e,s){const r=i[s+"name"]||[],l=e.name??e[s]?.name,t=r.indexOf(l);t>=0&&(i[s+"s"].splice(t,1),r.splice(t,1)),i[s+"s"].push(e),r.push(l),i[s+"name"]=r}function w(){Object.keys(i).forEach(e=>{i[e]=[]})}function u(e,s){const r={descriptions:e?.description||""},l=[];return e?.tags&&e.tags?.forEach(t=>{let a=t.tag,p=E(t);if(!r.hasOwnProperty(a))r[a]=p;else{const n={};n[a]=p,l.push({key:a,value:n})}}),{arr:l,obj:r}}function f(e,s){switch(e){case"title":return b(s),!0;case"text":return b(s),!0;case"props":return c(s,"props"),!0;case"slot":return c(s,"slot"),!0;case"emits":return c(s,"emits"),!0;case"expose":return c(s,"expose"),!0;default:return!1}}function k(e,s){switch(e){case"title":return q(s),!0;case"props":return O(s),!0;case"slot":return T(s),!0;case"emits":return y(s),!0;case"expose":return j(s),!0;default:return!1}}function N(e){return w(),e?.forEach(s=>{let r=s?.tags||[],l=r?.length||0;if(l>0)for(let t=0;t<l;t++){const a=r[t]||{};if(k(a.tag,s))break}}),i}function P(e){let s=h.getTextNotes(e);return N(s)}const S=[{label:"属性名",prop:"name",formatter:o.props.name},{label:"说明",prop:"description",formatter:o.props.description},{label:"类型",prop:"type",formatter:o.props.type},{label:"可选值",prop:"selectable",formatter:o.props.selectable},{label:"默认值",prop:"default",formatter:o.props.default}],F=[{label:"事件名",prop:"name",formatter:o.emits.name},{label:"说明",prop:"description",formatter:o.emits.description},{label:"回调参数",prop:"selectable",formatter:o.emits.selectable}],v=[{label:"方法名",prop:"name",formatter:o.expose.name},{label:"说明",prop:"description",formatter:o.expose.description},{label:"参数",prop:"selectable",formatter:o.expose.selectable},{label:"返回值",prop:"type",formatter(e){return o.expose.return(e)??o.expose.type(e)}}],z=[{label:"插槽名",prop:"name",formatter:o.slot.name},{label:"说明",prop:"description",formatter:o.slot.description},{label:"作用域参数",prop:"selectable",formatter:o.slot.selectable}];exports.getNotesText=P;exports.temits=F;exports.texpose=v;exports.tprops=S;exports.tslot=z;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../../utils/index.cjs");require("@fangzhongya/utils/basic/object/mergeObject");require("@fangzhongya/utils/basic/array/toggleArray");require("@fangzhongya/utils/name/humpToLine");require("@fangzhongya/utils/name/lineToLargeHump");require("@fangzhongya/utils/basic/string/appearNum");require("@fangzhongya/utils/basic/string/firstLower");require("@fangzhongya/utils/basic/array/duplicateRemoval");require("@fangzhongya/utils/basic/array/asyncMergeArray");require("@fangzhongya/utils/basic/string/firstUpper");require("@fangzhongya/utils/urls/getSuffix");require("@fangzhongya/utils/basic/array/replaceAfter");require("@fangzhongya/utils/html/getVueText");const o=require("../../utils/props.cjs"),i={titles:[],propss:[],slots:[],emitss:[],exposes:[]};function x(e,s){let r=e.charAt(0),l=[['"','"'],["'","'"],["`","`"],["(",")"],["{","}"],["[","]"]],a=l.map(p=>p[0]).indexOf(r);if(a!=-1){let n=new RegExp("^\\"+l[a][0]+"(([^\\"+l[a][1]+"])*)\\"+l[a][1]+(s?"\\s":""),"gi").exec(e);if(n)return n[0]}}function E(e){delete e.problems,delete e.source;let s=e.tag,r=e.name,l=e.description,t=e.default,a="";if(s=="default")r=r.trim(),r=x(r)||r;else if(s=="selectable")r=r.trim();else{if(r.includes("=")){const m=r.split("=");r=m[0];const g=m[1]+" "+l,d=x(g,!0);d?(t=d,l=g.replace(d,"")):t=e.default||m[1]||""}const n=/\s*\((.*)\)\s/gi.exec(l);n&&n.length>0&&(a=n[1],l=l.replace(n[0],""))}return e.name=r,e.default=t||"",e.description=l,e.selectable=a,e}function q(e){let s=["title","text","author","date"],r=u(e),l={};s.forEach(t=>{l[t]=r.obj[t]}),b(l),r.arr.forEach(t=>{f(t.key,t.value)})}function b(e){i.titles.push(e)}function O(e){let s=["props","name","type","default","selectable","description","descriptions","return"],r=u(e),l={};s.forEach(t=>{l[t]=r.obj[t]}),c(l,"props"),r.arr.forEach(t=>{f(t.key,t.value)})}function T(e){let s=["slot","name","selectable","description","descriptions"],r=u(e),l={};s.forEach(t=>{l[t]=r.obj[t]}),c(l,"slot"),r.arr.forEach(t=>{f(t.key,t.value)})}function y(e){let s=["emits","name","selectable","description","descriptions"],r=u(e),l={};s.forEach(t=>{l[t]=r.obj[t]}),c(l,"emits"),r.arr.forEach(t=>{f(t.key,t.value)})}function j(e){let s=["expose","name","type","return","selectable","description","descriptions"],r=u(e),l={};s.forEach(t=>{l[t]=r.obj[t]}),c(l,"expose"),r.arr.forEach(t=>{f(t.key,t.value)})}function c(e,s){const r=i[s+"name"]||[],l=e.name??e[s]?.name,t=r.indexOf(l);t>=0&&(i[s+"s"].splice(t,1),r.splice(t,1)),i[s+"s"].push(e),r.push(l),i[s+"name"]=r}function w(){Object.keys(i).forEach(e=>{i[e]=[]})}function u(e,s){const r={descriptions:e?.description||""},l=[];return e?.tags&&e.tags?.forEach(t=>{let a=t.tag,p=E(t);if(!r.hasOwnProperty(a))r[a]=p;else{const n={};n[a]=p,l.push({key:a,value:n})}}),{arr:l,obj:r}}function f(e,s){switch(e){case"title":return b(s),!0;case"text":return b(s),!0;case"props":return c(s,"props"),!0;case"slot":return c(s,"slot"),!0;case"emits":return c(s,"emits"),!0;case"expose":return c(s,"expose"),!0;default:return!1}}function k(e,s){switch(e){case"title":return q(s),!0;case"props":return O(s),!0;case"slot":return T(s),!0;case"emits":return y(s),!0;case"expose":return j(s),!0;default:return!1}}function N(e){return w(),e?.forEach(s=>{let r=s?.tags||[],l=r?.length||0;if(l>0)for(let t=0;t<l;t++){const a=r[t]||{};if(k(a.tag,s))break}}),i}function P(e){let s=h.getTextNotes(e);return N(s)}const S=[{label:"属性名",prop:"name",formatter:o.props.name},{label:"说明",prop:"description",formatter:o.props.description},{label:"类型",prop:"type",formatter:o.props.type},{label:"可选值",prop:"selectable",formatter:o.props.selectable},{label:"默认值",prop:"default",formatter:o.props.default}],F=[{label:"事件名",prop:"name",formatter:o.emits.name},{label:"说明",prop:"description",formatter:o.emits.description},{label:"回调参数",prop:"selectable",formatter:o.emits.selectable}],v=[{label:"方法名",prop:"name",formatter:o.expose.name},{label:"说明",prop:"description",formatter:o.expose.description},{label:"参数",prop:"selectable",formatter:o.expose.selectable},{label:"返回值",prop:"type",formatter(e){return o.expose.return(e)??o.expose.type(e)}}],z=[{label:"插槽名",prop:"name",formatter:o.slot.name},{label:"说明",prop:"description",formatter:o.slot.description},{label:"作用域参数",prop:"selectable",formatter:o.slot.selectable}];exports.getNotesText=P;exports.temits=F;exports.texpose=v;exports.tprops=S;exports.tslot=z;
@@ -30,7 +30,7 @@ function O(e, s) {
30
30
  ], o = l.map((c) => c[0]).indexOf(r);
31
31
  if (o != -1) {
32
32
  let a = new RegExp(
33
- "^" + l[o][0] + "(([^" + l[o][1] + "])*)" + l[o][1] + (s ? "\\s" : ""),
33
+ "^\\" + l[o][0] + "(([^\\" + l[o][1] + "])*)\\" + l[o][1] + (s ? "\\s" : ""),
34
34
  "gi"
35
35
  ).exec(e);
36
36
  if (a)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fangzhongya/vue-archive",
3
3
  "private": false,
4
- "version": "0.0.39",
4
+ "version": "0.0.41",
5
5
  "type": "module",
6
6
  "description ": "vue 组件注释生成文档",
7
7
  "author": "fangzhongya ",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "devDependencies": {
21
21
  "@fangzhongya/create": "0.2.34",
22
- "@fangzhongya/utils": "0.0.25",
22
+ "@fangzhongya/utils": "0.0.26",
23
23
  "@fangzhongya/vue-components": "0.1.9",
24
24
  "@highlightjs/vue-plugin": "^2.1.0",
25
25
  "@types/node": "^24.2.1",