@fangzhongya/vue-archive 0.0.48 → 0.0.50

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.27/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js
27
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-A276ZDLP.js
32
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-AWC672JW.js
48
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js
75
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js
80
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-NCSN3MC5.js
789
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js
810
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js
853
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-LPMR5W6M.js
875
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js
886
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js
891
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js
915
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-7PJ2D3KR.js
936
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/node_modules/@fangzhongya/utils/dist/chunk-7PJ2D3KR.js
937
937
  function getVueText(content) {
938
938
  const result = {
939
939
  template: "",
@@ -1522,7 +1522,7 @@ function parse(source, options = {}) {
1522
1522
  }
1523
1523
  var stringify = getStringifier();
1524
1524
 
1525
- // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-FS4JPT23.js
1525
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/node_modules/@fangzhongya/utils/dist/chunk-FS4JPT23.js
1526
1526
  function deComment(code) {
1527
1527
  let output = "";
1528
1528
  let state = "code";
@@ -1614,7 +1614,7 @@ function deComment(code) {
1614
1614
  return output;
1615
1615
  }
1616
1616
 
1617
- // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-DILPRD5C.js
1617
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/node_modules/@fangzhongya/utils/dist/chunk-DILPRD5C.js
1618
1618
  function getImports(code, includeType = false) {
1619
1619
  code = deComment(code);
1620
1620
  const imports = /* @__PURE__ */ new Set();
@@ -3029,7 +3029,7 @@ var top_default2 = (0, import_vue2.defineComponent)({
3029
3029
  }
3030
3030
  });
3031
3031
 
3032
- // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-7O4MJOHM.js
3032
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/node_modules/@fangzhongya/utils/dist/chunk-7O4MJOHM.js
3033
3033
  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]*))$/;
3034
3034
  function getFunctionFormat(v) {
3035
3035
  if (!v) return;
@@ -3253,9 +3253,10 @@ var parseTypeDefinition = (typeDef) => {
3253
3253
  dataType: types
3254
3254
  };
3255
3255
  } else {
3256
+ const types = splitIgnoringNesting(typeDef, ",");
3256
3257
  return {
3257
- type: typeDef,
3258
- dataType: [typeDef]
3258
+ type: types[0] || "any",
3259
+ dataType: types
3259
3260
  };
3260
3261
  }
3261
3262
  };
@@ -3542,22 +3543,24 @@ function setValStringify(v, key, propsText) {
3542
3543
  }
3543
3544
  }
3544
3545
  }
3545
- function getSpecType(val) {
3546
- let tarr = getType(val?.type);
3547
- let type = "any";
3546
+ function getSpecType(val, v) {
3547
+ let ds = parseTypeDefinition(val?.type);
3548
+ let tarr = ds.dataType;
3549
+ let type = v || ds.type;
3548
3550
  if (tarr.length == 1) {
3549
3551
  type = tarr[0].split("<")[0];
3552
+ } else if (tarr.length > 0) {
3553
+ type = "any";
3550
3554
  }
3551
- const zdtype = type;
3552
3555
  let selectable = (val?.selectable || "").trim();
3553
3556
  let arr = [];
3554
3557
  if (selectable && type != "boolean") {
3555
3558
  if (selectable.includes("|")) {
3556
- selectable.split("|").forEach((v) => {
3557
- if (v) {
3558
- let z = v.split(":");
3559
+ selectable.split("|").forEach((v2) => {
3560
+ if (v2) {
3561
+ let z = v2.split(":");
3559
3562
  arr.push({
3560
- label: v,
3563
+ label: v2,
3561
3564
  prop: getObjValue(z[0].trim())
3562
3565
  });
3563
3566
  }
@@ -3577,22 +3580,10 @@ function getSpecType(val) {
3577
3580
  }
3578
3581
  return {
3579
3582
  arr,
3580
- zdtype,
3581
- type,
3583
+ type: type.toLowerCase(),
3582
3584
  dataType: tarr
3583
3585
  };
3584
3586
  }
3585
- function getType(value) {
3586
- let arr = [];
3587
- let str = (value || "").trim().toLowerCase();
3588
- str.split(",").forEach((v) => {
3589
- v = v.trim();
3590
- if (v) {
3591
- arr.push(v);
3592
- }
3593
- });
3594
- return [...new Set(arr)].sort();
3595
- }
3596
3587
  function getObjValue(d, type) {
3597
3588
  try {
3598
3589
  if (type?.toLowerCase() == "function") {
@@ -1,9 +1,9 @@
1
- // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js
1
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-A276ZDLP.js
6
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-AWC672JW.js
22
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js
49
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js
54
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-NCSN3MC5.js
774
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js
795
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js
838
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-LPMR5W6M.js
860
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js
871
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js
876
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js
900
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/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.27/node_modules/@fangzhongya/utils/dist/chunk-7PJ2D3KR.js
921
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/node_modules/@fangzhongya/utils/dist/chunk-7PJ2D3KR.js
922
922
  function getVueText(content) {
923
923
  const result = {
924
924
  template: "",
@@ -1507,7 +1507,7 @@ function parse(source, options = {}) {
1507
1507
  }
1508
1508
  var stringify = getStringifier();
1509
1509
 
1510
- // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-FS4JPT23.js
1510
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/node_modules/@fangzhongya/utils/dist/chunk-FS4JPT23.js
1511
1511
  function deComment(code) {
1512
1512
  let output = "";
1513
1513
  let state = "code";
@@ -1599,7 +1599,7 @@ function deComment(code) {
1599
1599
  return output;
1600
1600
  }
1601
1601
 
1602
- // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-DILPRD5C.js
1602
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/node_modules/@fangzhongya/utils/dist/chunk-DILPRD5C.js
1603
1603
  function getImports(code, includeType = false) {
1604
1604
  code = deComment(code);
1605
1605
  const imports = /* @__PURE__ */ new Set();
@@ -3014,7 +3014,7 @@ var top_default2 = defineComponent2({
3014
3014
  }
3015
3015
  });
3016
3016
 
3017
- // node_modules/.pnpm/@fangzhongya+utils@0.0.27/node_modules/@fangzhongya/utils/dist/chunk-7O4MJOHM.js
3017
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.28/node_modules/@fangzhongya/utils/dist/chunk-7O4MJOHM.js
3018
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]*))$/;
3019
3019
  function getFunctionFormat(v) {
3020
3020
  if (!v) return;
@@ -3238,9 +3238,10 @@ var parseTypeDefinition = (typeDef) => {
3238
3238
  dataType: types
3239
3239
  };
3240
3240
  } else {
3241
+ const types = splitIgnoringNesting(typeDef, ",");
3241
3242
  return {
3242
- type: typeDef,
3243
- dataType: [typeDef]
3243
+ type: types[0] || "any",
3244
+ dataType: types
3244
3245
  };
3245
3246
  }
3246
3247
  };
@@ -3527,22 +3528,24 @@ function setValStringify(v, key, propsText) {
3527
3528
  }
3528
3529
  }
3529
3530
  }
3530
- function getSpecType(val) {
3531
- let tarr = getType(val?.type);
3532
- let type = "any";
3531
+ function getSpecType(val, v) {
3532
+ let ds = parseTypeDefinition(val?.type);
3533
+ let tarr = ds.dataType;
3534
+ let type = v || ds.type;
3533
3535
  if (tarr.length == 1) {
3534
3536
  type = tarr[0].split("<")[0];
3537
+ } else if (tarr.length > 0) {
3538
+ type = "any";
3535
3539
  }
3536
- const zdtype = type;
3537
3540
  let selectable = (val?.selectable || "").trim();
3538
3541
  let arr = [];
3539
3542
  if (selectable && type != "boolean") {
3540
3543
  if (selectable.includes("|")) {
3541
- selectable.split("|").forEach((v) => {
3542
- if (v) {
3543
- let z = v.split(":");
3544
+ selectable.split("|").forEach((v2) => {
3545
+ if (v2) {
3546
+ let z = v2.split(":");
3544
3547
  arr.push({
3545
- label: v,
3548
+ label: v2,
3546
3549
  prop: getObjValue(z[0].trim())
3547
3550
  });
3548
3551
  }
@@ -3562,22 +3565,10 @@ function getSpecType(val) {
3562
3565
  }
3563
3566
  return {
3564
3567
  arr,
3565
- zdtype,
3566
- type,
3568
+ type: type.toLowerCase(),
3567
3569
  dataType: tarr
3568
3570
  };
3569
3571
  }
3570
- function getType(value) {
3571
- let arr = [];
3572
- let str = (value || "").trim().toLowerCase();
3573
- str.split(",").forEach((v) => {
3574
- v = v.trim();
3575
- if (v) {
3576
- arr.push(v);
3577
- }
3578
- });
3579
- return [...new Set(arr)].sort();
3580
- }
3581
3572
  function getObjValue(d, type) {
3582
3573
  try {
3583
3574
  if (type?.toLowerCase() == "function") {
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),h=require("../boxurl/index.vue.cjs"),c=require("../../utils/glob.cjs"),_=require("../../utils/common.cjs"),N={class:"aside-search"},C={class:"aside-list"},E=["onClick"],B={class:"aside-li-name"},V={class:"aside-li-name-name"},x={class:"aside-li-name-aliass"},T=e.defineComponent({__name:"index",props:{value:Object},emits:["change"],setup(k,{emit:f}){const r=k,i=e.ref(),o=e.ref([]);o.value=c.getCompoNameObj();const l=e.ref(r.value);if(!l.value||!l.value.key){let t=_.getAsideKey();t?l.value=c.getCompoNameKey(t):l.value=o.value[0]}const n=e.ref("");e.watch(()=>r.value,()=>{l.value=r.value,u()}),e.watch(()=>n.value,()=>{g()});const d=f;function v(t){return t?t.replace(/[\.|\/|\s]/g,"-"):"a"}function y(t){l.value=t,u(),d("change",t)}let m;function g(){clearTimeout(m),m=setTimeout(()=>{let t=n.value;t?o.value=c.getCompoName(t,!0):o.value=c.getCompoNameObj()},400)}function u(){let t=l.value?.key||"";_.setAsideKey(t)}return u(),d("change",l.value),e.onMounted(()=>{e.nextTick(()=>{const t=i.value.querySelector(".aside-li."+v(l.value?.key));if(t){const s=t.offsetTop,a=i.value.parentNode;a.scrollTop=s}})}),(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"aside",ref_key:"refAside",ref:i},[e.createElementVNode("div",N,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=a=>n.value=a)},null,512),[[e.vModelText,n.value]])]),e.createElementVNode("div",C,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(a,q)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["aside-li",v(a.key)+" "+(a.key==l.value.key?"on":"")]),onClick:p=>y(a)},[e.createVNode(h,{value:a},{default:e.withCtx(()=>[e.createElementVNode("div",B,[e.createElementVNode("div",V,e.toDisplayString(a.name),1),e.createElementVNode("span",x,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.aliasNames,p=>(e.openBlock(),e.createElementBlock("span",null,e.toDisplayString(p),1))),256))])])]),_:2},1032,["value"])],10,E))),256))])],512))}});module.exports=T;
1
+ "use strict";const e=require("vue"),h=require("../boxurl/index.vue.cjs"),c=require("../../utils/glob.cjs"),_=require("../../utils/common.cjs"),N={class:"aside-search"},C={class:"aside-list"},E=["onClick"],B={class:"aside-li-name"},V={class:"aside-li-name-name"},x={class:"aside-li-name-aliass"},T=e.defineComponent({__name:"index",props:{value:Object},emits:["change"],setup(k,{emit:f}){const r=k,i=e.ref(),o=e.ref([]);o.value=c.getCompoNameObj();const l=e.ref(r.value);if(!l.value||!l.value.key){let t=_.getAsideKey();t?l.value=c.getCompoNameKey(t):l.value=o.value[0]}const n=e.ref("");e.watch(()=>r.value,()=>{l.value=r.value,u()}),e.watch(()=>n.value,()=>{g()});const d=f;function v(t){return t?t.replace(/[\.|\/|\s]/g,"-"):"a"}function y(t){l.value=t,u(),d("change",t)}let m;function g(){clearTimeout(m),m=setTimeout(()=>{let t=n.value;t?o.value=c.getCompoName(t,!0):o.value=c.getCompoNameObj()},400)}function u(){let t=l.value?.key||"";_.setAsideKey(t)}return u(),d("change",l.value),e.onMounted(()=>{e.nextTick(()=>{const t=i.value.querySelector(".aside-li."+v(l.value?.key));if(t){const s=t.offsetTop,a=i.value.parentNode;a.scrollTop=s}})}),(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"aside",ref_key:"refAside",ref:i},[e.createElementVNode("div",N,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=a=>n.value=a)},null,512),[[e.vModelText,n.value]])]),e.createElementVNode("div",C,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(a,q)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["aside-li",v(a.key)+" "+(a.key==l.value?.key?"on":"")]),onClick:p=>y(a)},[e.createVNode(h,{value:a},{default:e.withCtx(()=>[e.createElementVNode("div",B,[e.createElementVNode("div",V,e.toDisplayString(a.name),1),e.createElementVNode("span",x,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.aliasNames,p=>(e.openBlock(),e.createElementBlock("span",null,e.toDisplayString(p),1))),256))])])]),_:2},1032,["value"])],10,E))),256))])],512))}});module.exports=T;
@@ -72,7 +72,7 @@ const q = { class: "aside-search" }, F = { class: "aside-list" }, L = ["onClick"
72
72
  (n(!0), o(y, null, h(l.value, (a, I) => (n(), o("div", {
73
73
  class: j([
74
74
  "aside-li",
75
- f(a.key) + " " + (a.key == t.value.key ? "on" : "")
75
+ f(a.key) + " " + (a.key == t.value?.key ? "on" : "")
76
76
  ]),
77
77
  onClick: (_) => T(a)
78
78
  }, [
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@fangzhongya/utils/basic/object/mergeObject");require("@fangzhongya/utils/basic/array/toggleArray");const H=require("@fangzhongya/utils/name/humpToLine");require("@fangzhongya/utils/name/lineToLargeHump");require("@fangzhongya/utils/basic/string/appearNum");const J=require("@fangzhongya/utils/basic/string/firstLower");require("@fangzhongya/utils/basic/array/duplicateRemoval");require("@fangzhongya/utils/basic/array/asyncMergeArray");const D=require("@fangzhongya/utils/basic/string/firstUpper");require("@fangzhongya/utils/urls/getSuffix");require("@fangzhongya/utils/basic/array/replaceAfter");const l=require("./util.cjs"),T=require("../../utils/props.cjs"),N=require("@fangzhongya/utils/basic/string/toFunction"),A=["class"];function q(e,n){return e.filter(t=>t.name==n)[0]}function L(e){return e.map(n=>(n.prop||"...arr")+":"+l.setDataType(n.dataType)).join(",")}function M(e,n,t,s,o,h){const p=[],r=[];let b=!0;const x=T.getPropsValue(n.propss||[]),z=T.getEmitsValue(n.emitss||[]),B=T.getExposeValue(n.exposes||[]),C=T.getSlotValue(n.slots||[]);Object.keys(t).forEach(i=>{let m=t[i];if(/^on[A-Z]/.test(i)&&typeof m=="function"){let u=i.substring(2);const c=i.split(":");let g;if(c.length>1?(g=c[0]+c.slice(1).map(f=>D.firstUpper(f)).join(""),u=J.firstLower(u)):(g=c[0],u=H.humpToLine(u)),c.includes("-")){let f=g.split("-");f=f.map(($,F)=>F!=0?D.firstUpper($):$),g=f.join("")}p.push(" @"+u+'="'+g+'"');const a=q(z,u)||{},d=a.selectable||"",S=l.parseParamString(d),y=L(S);r.push(`// ${a.description} ${a.name}: (${a.selectable})`),r.push("function "+g+"("+y+") {"),S.forEach(f=>{const $=f.name||"arr";r.push(" console.log('"+f.label+"', "+$+")")}),r.push("}")}else{let u=i;A.includes(i)&&(u=i+"1"),p.push(" :"+i+'="'+u+'"');const c=q(x,i)||{},g=w(c);if(r.push(`// ${c.description} ${c.name}: {${c.type}} (${c.selectable})`),typeof m=="function")r.push("const "+i+" = "+P(m,i,o));else if(b&&(b=!1,r.unshift("import { ref } from 'vue';")),typeof m>"u")if(g.type=="function"){const a=v(c);r.push("const "+u+" = "+a+";")}else{const a=l.getTypeValue(g.dataType);r.push("const "+u+" = ref("+(a==="undefined"?"":a)+");")}else{let a=E(m,i,o);r.push("const "+u+" = ref("+a+");")}}});const O=Object.values(h||{});O.length>0&&(b&&(b=!1,r.unshift("import { ref } from 'vue';")),p.unshift(' ref="refDom"'),r.push("const refDom = ref()"),O.forEach(i=>{const m=q(B,i.name)||{};r.push(`// ${m.description} ${m.name}:(${m.selectable}) ${m.type}`);const u=i.name+"Value",c=l.parseParamString(m?.selectable||""),g=[],a=i.params||[];c.forEach((d,S)=>{const y=d.name;if(y){const f=y+i.name,$=a[S];if(r.push(`// ${d.label}`),typeof $=="function")r.push("const "+f+" = "+P($,y,i.text));else if(typeof $>"u")r.push("const "+f+" = "+l.getTypeValue(d.dataType)+";");else{let F=E($,y,i.text);r.push("const "+f+" = "+F+";")}g.push(f)}}),i.type==="function"?r.push(`const ${u} = refDom.value?.${i.name}(${g.join(", ")})`):r.push(`const ${u} = refDom.value?.${i.name}`),r.push(`console.log('"${m.type}"', ${u})`)})),p.length>0&&p.unshift("");const U=Z(s,C);return`<!--${e}-->
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@fangzhongya/utils/basic/object/mergeObject");require("@fangzhongya/utils/basic/array/toggleArray");const z=require("@fangzhongya/utils/name/humpToLine");require("@fangzhongya/utils/name/lineToLargeHump");require("@fangzhongya/utils/basic/string/appearNum");const H=require("@fangzhongya/utils/basic/string/firstLower");require("@fangzhongya/utils/basic/array/duplicateRemoval");require("@fangzhongya/utils/basic/array/asyncMergeArray");const w=require("@fangzhongya/utils/basic/string/firstUpper");require("@fangzhongya/utils/urls/getSuffix");require("@fangzhongya/utils/basic/array/replaceAfter");const c=require("./util.cjs"),T=require("../../utils/props.cjs"),J=require("@fangzhongya/utils/basic/string/toFunction"),N=["class"];function q(e,t){return e.filter(n=>n.name==t)[0]}function L(e){return e.map(t=>(t.prop||"...arr")+":"+c.setDataType(t.dataType)).join(",")}function A(e,t,n,s,i,h){const a=[],r=[];let $=!0;const v=T.getPropsValue(t.propss||[]),x=T.getEmitsValue(t.emitss||[]),B=T.getExposeValue(t.exposes||[]),C=T.getSlotValue(t.slots||[]);Object.keys(n).forEach(o=>{let g=n[o];if(/^on[A-Z]/.test(o)&&typeof g=="function"){let u=o.substring(2);const l=o.split(":");let m;if(l.length>1?(m=l[0]+l.slice(1).map(p=>w.firstUpper(p)).join(""),u=H.firstLower(u)):(m=l[0],u=z.humpToLine(u)),l.includes("-")){let p=m.split("-");p=p.map((y,F)=>F!=0?w.firstUpper(y):y),m=p.join("")}a.push(" @"+u+'="'+m+'"');const f=q(x,u)||{},b=f.selectable||"",S=c.parseParamString(b),d=L(S);r.push(`// ${f.description} ${f.name}: (${f.selectable})`),r.push("function "+m+"("+d+") {"),S.forEach(p=>{const y=p.name||"arr";r.push(" console.log('"+p.label+"', "+y+")")}),r.push("}")}else{let u=o;N.includes(o)&&(u=o+"1"),a.push(" :"+o+'="'+u+'"');const l=q(v,o)||{},m=E(l);if(r.push(`// ${l.description} ${l.name}: {${l.type}} (${l.selectable})`),typeof g=="function")r.push("const "+o+" = "+P(g,o,i));else if($&&($=!1,r.unshift("import { ref } from 'vue';")),typeof g>"u")if(m.type=="function"){const f=Z(l);r.push("const "+u+" = "+f+";")}else{const f=c.getTypeValue(m.dataType);r.push("const "+u+" = ref("+(f==="undefined"?"":f)+");")}else{let f=D(g,o,i);r.push("const "+u+" = ref("+f+");")}}});const O=Object.values(h||{});O.length>0&&($&&($=!1,r.unshift("import { ref } from 'vue';")),a.unshift(' ref="refDom"'),r.push("const refDom = ref()"),O.forEach(o=>{const g=q(B,o.name)||{};r.push(`// ${g.description} ${g.name}:(${g.selectable}) ${g.type}`);const u=o.name+"Value",l=c.parseParamString(g?.selectable||""),m=[],f=o.params||[];l.forEach((b,S)=>{const d=b.name;if(d){const p=d+o.name,y=f[S];if(r.push(`// ${b.label}`),typeof y=="function")r.push("const "+p+" = "+P(y,d,o.text));else if(typeof y>"u")r.push("const "+p+" = "+c.getTypeValue(b.dataType)+";");else{let F=D(y,d,o.text);r.push("const "+p+" = "+F+";")}m.push(p)}}),o.type==="function"?r.push(`const ${u} = refDom.value?.${o.name}(${m.join(", ")})`):r.push(`const ${u} = refDom.value?.${o.name}`),r.push(`console.log('"${g.type}"', ${u})`)})),a.length>0&&a.unshift("");const U=M(s,C);return`<!--${e}-->
2
2
  <template>
3
3
  <div>
4
- <${e}${p.join(`
4
+ <${e}${a.join(`
5
5
  `)}>${U.join(`
6
6
  `)}
7
7
  </${e}>
@@ -11,11 +11,11 @@
11
11
  ${r.join(`
12
12
  `)}
13
13
  <\/script>
14
- `}function Z(e={},n){const t=[];return Object.keys(e).forEach(s=>{const o=q(n,s)||{},h=e[s];if(h){const p=` <!-- ${o.description} ${o.name}:(${o.selectable}) -->
14
+ `}function M(e={},t){const n=[];return Object.keys(e).forEach(s=>{const i=q(t,s)||{},h=e[s];if(h){const a=` <!-- ${i.description} ${i.name}:(${i.selectable}) -->
15
15
  <template #${s}="scope">
16
- ${l.vueFormat(h," ")}
17
- </template>`;t.push(p)}}),t&&t.length>0&&t.unshift(""),t}function P(e,n,t){const s=t?t[n]:"";return s&&(s.includes("=>")||s.includes("function"))?s:j(e.toString())}function j(e){const n=N.getFunctionFormat(l.prettierFormat(e));if(n){let t=`{
18
- ${l.vueFormat(l.getFunBody(n.body)," ")}
19
- }`;return`function (${n.param}) ${t}`}else return"undefined"}function v(e){const n=l.parseParamString(e.selectable),t=L(n);let s="";e.return&&(s="return ");let o=`{
20
- ${l.vueFormat(l.getFunBody(s)," ")}
21
- }`;return`function (${t}) ${o}`}function G(e){const n=e.trim();return/^\(/.test(n)?j(n):JSON.stringify(e)}function E(e,n,t){const s=t?t[n]:"";return s?typeof s=="string"?V(s):s:typeof e=="string"?G(e+""):JSON.stringify(e)}function w(e){let n=I(e?.type),t="any";n.length==1&&(t=n[0].split("<")[0]);const s=t;let o=(e?.selectable||"").trim(),h=[];return o&&t!="boolean"&&(o.includes("|")?o.split("|").forEach(p=>{if(p){let r=p.split(":");h.push({label:p,prop:V(r[0].trim())})}}):h=l.parseParamString(o),t=="function"?t="function":t=="array"?t="choice":h.length>1&&(t="select")),{arr:h,zdtype:s,type:t,dataType:n}}function I(e){let n=[];return(e||"").trim().toLowerCase().split(",").forEach(s=>{s=s.trim(),s&&n.push(s)}),[...new Set(n)].sort()}function V(e,n){try{if(n?.toLowerCase()=="function")if(typeof e=="string"){if(/^\((.|\n|\r)*\)$/.test(e))return e=e.substring(1,e.length-1),new Function(`{ return ${e} }`)()}else return e;else return new Function(`{ return ${e} }`)()}catch{return""+e}}function K(e,n=!0){const t=w(e),s=l.getTypeValue(t.dataType);if(n){const o=(e.default||"").trim();return V(o||s,t.dataType[0])}else{const o=(e.default||"").trim();return V(o,t.dataType[0])}}exports.getDefaultValue=K;exports.getHmtl=M;exports.getSpecType=w;exports.setValStringify=E;
16
+ ${c.vueFormat(h," ")}
17
+ </template>`;n.push(a)}}),n&&n.length>0&&n.unshift(""),n}function P(e,t,n){const s=n?n[t]:"";return s&&(s.includes("=>")||s.includes("function"))?s:j(e.toString())}function j(e){const t=J.getFunctionFormat(c.prettierFormat(e));if(t){let n=`{
18
+ ${c.vueFormat(c.getFunBody(t.body)," ")}
19
+ }`;return`function (${t.param}) ${n}`}else return"undefined"}function Z(e){const t=c.parseParamString(e.selectable),n=L(t);let s="";e.return&&(s="return ");let i=`{
20
+ ${c.vueFormat(c.getFunBody(s)," ")}
21
+ }`;return`function (${n}) ${i}`}function G(e){const t=e.trim();return/^\(/.test(t)?j(t):JSON.stringify(e)}function D(e,t,n){const s=n?n[t]:"";return s?typeof s=="string"?V(s):s:typeof e=="string"?G(e+""):JSON.stringify(e)}function E(e,t){let n=c.parseTypeDefinition(e?.type),s=n.dataType,i=t||n.type;s.length==1?i=s[0].split("<")[0]:s.length>0&&(i="any");let h=(e?.selectable||"").trim(),a=[];return h&&i!="boolean"&&(h.includes("|")?h.split("|").forEach(r=>{if(r){let $=r.split(":");a.push({label:r,prop:V($[0].trim())})}}):a=c.parseParamString(h),i=="function"?i="function":i=="array"?i="choice":a.length>1&&(i="select")),{arr:a,type:i.toLowerCase(),dataType:s}}function V(e,t){try{if(t?.toLowerCase()=="function")if(typeof e=="string"){if(/^\((.|\n|\r)*\)$/.test(e))return e=e.substring(1,e.length-1),new Function(`{ return ${e} }`)()}else return e;else return new Function(`{ return ${e} }`)()}catch{return""+e}}function I(e,t=!0){const n=E(e),s=c.getTypeValue(n.dataType);if(t){const i=(e.default||"").trim();return V(i||s,n.dataType[0])}else{const i=(e.default||"").trim();return V(i,n.dataType[0])}}exports.getDefaultValue=I;exports.getHmtl=A;exports.getSpecType=E;exports.setValStringify=D;
@@ -8,9 +8,8 @@ type SelectsObj = {
8
8
  label: string;
9
9
  prop: unknown;
10
10
  };
11
- export declare function getSpecType(val: Spec): {
11
+ export declare function getSpecType(val: Spec, v?: string): {
12
12
  arr: SelectsObj[];
13
- zdtype: string;
14
13
  type: string;
15
14
  dataType: string[];
16
15
  };