@fangzhongya/vue-archive 0.1.9 → 0.1.11

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.
@@ -87,12 +87,12 @@ __export(index_exports, {
87
87
  });
88
88
  module.exports = __toCommonJS(index_exports);
89
89
 
90
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js
90
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js
91
91
  function isArray(obj2) {
92
92
  return Object.prototype.toString.call(obj2) == "[object Array]";
93
93
  }
94
94
 
95
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-A276ZDLP.js
95
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-A276ZDLP.js
96
96
  function getStartSames(str, val) {
97
97
  let s = "";
98
98
  const vs = [...val];
@@ -108,7 +108,7 @@ function getStartSames(str, val) {
108
108
  return [s, str.substring(index), val.substring(index)];
109
109
  }
110
110
 
111
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-KDOS4NFR.js
111
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-KDOS4NFR.js
112
112
  function getImportUrl(url, imp) {
113
113
  const arr = getStartSames(url, imp);
114
114
  const ts2 = arr[0];
@@ -132,12 +132,12 @@ function getImportUrl(url, imp) {
132
132
  return ds.join("") + arr[2].replace(/\\/g, "/");
133
133
  }
134
134
 
135
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js
135
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js
136
136
  function firstUpper(str) {
137
137
  return str.slice(0, 1).toUpperCase() + str.slice(1);
138
138
  }
139
139
 
140
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js
140
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js
141
141
  function lineToLargeHump(name) {
142
142
  let arr = name.split("-");
143
143
  arr = arr.map((vs) => {
@@ -846,7 +846,7 @@ function runDev(config2, configCallback) {
846
846
  return new FangMd(config2, configCallback);
847
847
  }
848
848
 
849
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-NCSN3MC5.js
849
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-NCSN3MC5.js
850
850
  var zObj = {
851
851
  "<": "&lt;",
852
852
  ">": "&gt;",
@@ -867,7 +867,7 @@ function htmlEscape(str) {
867
867
  // packages/node/index.ts
868
868
  var import_node_path = require("path");
869
869
 
870
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js
870
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js
871
871
  function mergeObject(a, b, j = 0, i) {
872
872
  if (a instanceof Array) {
873
873
  if (j > 0 && i) {
@@ -921,7 +921,7 @@ function getConfig(key) {
921
921
  return config[key];
922
922
  }
923
923
 
924
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-7PJ2D3KR.js
924
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-7PJ2D3KR.js
925
925
  function getVueText(content) {
926
926
  const result = {
927
927
  template: "",
@@ -968,7 +968,7 @@ function getVueTexts(content) {
968
968
  };
969
969
  }
970
970
 
971
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js
971
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js
972
972
  function humpToLine(name) {
973
973
  const reg = /(([A-Z])([^A-Z]*))/g;
974
974
  let result;
@@ -990,12 +990,12 @@ function humpToLine(name) {
990
990
  }
991
991
  }
992
992
 
993
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js
993
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js
994
994
  function firstLower(str) {
995
995
  return str.slice(0, 1).toLowerCase() + str.slice(1);
996
996
  }
997
997
 
998
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js
998
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js
999
999
  function asyncMergeArray(arr, callback) {
1000
1000
  return new Promise((resolve2, reject) => {
1001
1001
  let index = 0;
@@ -1019,7 +1019,7 @@ function asyncMergeArray(arr, callback) {
1019
1019
  });
1020
1020
  }
1021
1021
 
1022
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-Z7NTQAAJ.js
1022
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-Z7NTQAAJ.js
1023
1023
  function getSuffix2(url) {
1024
1024
  const reg = /\.([a-z|A-Z][a-z|A-Z|0-9]*)$/;
1025
1025
  const regs = reg.exec(url);
@@ -1029,7 +1029,7 @@ function getSuffix2(url) {
1029
1029
  return "";
1030
1030
  }
1031
1031
 
1032
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-S6JRKYPY.js
1032
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-S6JRKYPY.js
1033
1033
  function matchsStart2(key, matchs) {
1034
1034
  if (matchs && matchs.length > 0) {
1035
1035
  for (const value of matchs) {
@@ -1049,7 +1049,7 @@ function matchsStart2(key, matchs) {
1049
1049
  }
1050
1050
  }
1051
1051
 
1052
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-YNOFNHEK.js
1052
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-YNOFNHEK.js
1053
1053
  function matchsEnd2(key, matchs) {
1054
1054
  if (matchs && matchs.length > 0) {
1055
1055
  for (const value of matchs) {
@@ -1341,7 +1341,7 @@ function getRawValue(comRaw, key) {
1341
1341
  }
1342
1342
  }
1343
1343
 
1344
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-FS4JPT23.js
1344
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-FS4JPT23.js
1345
1345
  function deComment(code) {
1346
1346
  let output = "";
1347
1347
  let state = "code";
@@ -1433,7 +1433,7 @@ function deComment(code) {
1433
1433
  return output;
1434
1434
  }
1435
1435
 
1436
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-N5Y3XGHX.js
1436
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-N5Y3XGHX.js
1437
1437
  function getImports(code, includeType = false) {
1438
1438
  code = deComment(code);
1439
1439
  const imports = /* @__PURE__ */ new Set();
@@ -2337,16 +2337,16 @@ function getSlotValue(arr) {
2337
2337
  });
2338
2338
  }
2339
2339
 
2340
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/primitives.js
2340
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/primitives.js
2341
2341
  var Markers;
2342
2342
  (function(Markers2) {
2343
2343
  Markers2["start"] = "/**";
2344
2344
  Markers2["nostart"] = "/***";
2345
2345
  Markers2["delim"] = "*";
2346
2346
  Markers2["end"] = "*/";
2347
- })(Markers = Markers || (Markers = {}));
2347
+ })(Markers || (Markers = {}));
2348
2348
 
2349
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/util.js
2349
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/util.js
2350
2350
  function isSpace(source) {
2351
2351
  return /^\s+$/.test(source);
2352
2352
  }
@@ -2368,8 +2368,8 @@ function seedTokens(tokens = {}) {
2368
2368
  return Object.assign({ start: "", delimiter: "", postDelimiter: "", tag: "", postTag: "", name: "", postName: "", type: "", postType: "", description: "", end: "", lineEnd: "" }, tokens);
2369
2369
  }
2370
2370
 
2371
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/parser/block-parser.js
2372
- var reTag = /^@\S+/;
2371
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/parser/block-parser.js
2372
+ var reTag = /^@[^\s/]+(?=\s|$)/;
2373
2373
  function getParser({ fence = "```" } = {}) {
2374
2374
  const fencer = getFencer(fence);
2375
2375
  const toggleFence = (source, isFenced) => fencer(source) ? !isFenced : isFenced;
@@ -2393,7 +2393,7 @@ function getFencer(fence) {
2393
2393
  return fence;
2394
2394
  }
2395
2395
 
2396
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/parser/source-parser.js
2396
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/parser/source-parser.js
2397
2397
  function getParser2({ startLine = 0, markers = Markers } = {}) {
2398
2398
  let block = null;
2399
2399
  let num = startLine;
@@ -2435,7 +2435,7 @@ function getParser2({ startLine = 0, markers = Markers } = {}) {
2435
2435
  };
2436
2436
  }
2437
2437
 
2438
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/parser/spec-parser.js
2438
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/parser/spec-parser.js
2439
2439
  function getParser3({ tokenizers }) {
2440
2440
  return function parseSpec(source) {
2441
2441
  var _a;
@@ -2449,7 +2449,7 @@ function getParser3({ tokenizers }) {
2449
2449
  };
2450
2450
  }
2451
2451
 
2452
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/parser/tokenizers/tag.js
2452
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/parser/tokenizers/tag.js
2453
2453
  function tagTokenizer() {
2454
2454
  return (spec) => {
2455
2455
  const { tokens } = spec.source[0];
@@ -2463,6 +2463,9 @@ function tagTokenizer() {
2463
2463
  });
2464
2464
  return spec;
2465
2465
  }
2466
+ if (match[1].includes("/")) {
2467
+ return spec;
2468
+ }
2466
2469
  tokens.tag = match[1];
2467
2470
  tokens.postTag = match[3];
2468
2471
  tokens.description = tokens.description.slice(match[0].length);
@@ -2471,16 +2474,24 @@ function tagTokenizer() {
2471
2474
  };
2472
2475
  }
2473
2476
 
2474
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/parser/tokenizers/type.js
2477
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/parser/tokenizers/type.js
2475
2478
  function typeTokenizer(spacing = "compact") {
2476
2479
  const join5 = getJoiner(spacing);
2477
2480
  return (spec) => {
2478
2481
  let curlies = 0;
2479
2482
  let lines = [];
2480
- for (const [i, { tokens }] of spec.source.entries()) {
2483
+ let descriptionBegun = false;
2484
+ let firstTypeIteration = true;
2485
+ for (const { tokens } of spec.source.values()) {
2481
2486
  let type = "";
2482
- if (i === 0 && tokens.description[0] !== "{")
2487
+ if (!descriptionBegun && tokens.description.trim()) {
2488
+ descriptionBegun = true;
2489
+ } else if (!descriptionBegun) {
2490
+ continue;
2491
+ }
2492
+ if (firstTypeIteration && tokens.description[0] !== "{")
2483
2493
  return spec;
2494
+ firstTypeIteration = false;
2484
2495
  for (const ch of tokens.description) {
2485
2496
  if (ch === "{")
2486
2497
  curlies++;
@@ -2494,6 +2505,9 @@ function typeTokenizer(spacing = "compact") {
2494
2505
  if (curlies === 0)
2495
2506
  break;
2496
2507
  }
2508
+ if (!descriptionBegun) {
2509
+ return spec;
2510
+ }
2497
2511
  if (curlies !== 0) {
2498
2512
  spec.problems.push({
2499
2513
  code: "spec:type:unpaired-curlies",
@@ -2530,13 +2544,21 @@ function getJoiner(spacing) {
2530
2544
  return spacing;
2531
2545
  }
2532
2546
 
2533
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/parser/tokenizers/name.js
2547
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/parser/tokenizers/name.js
2534
2548
  var isQuoted = (s) => s && s.startsWith('"') && s.endsWith('"');
2535
2549
  function nameTokenizer() {
2536
2550
  const typeEnd = (num, { tokens }, i) => tokens.type === "" ? num : i;
2537
2551
  return (spec) => {
2538
- const { tokens } = spec.source[spec.source.reduce(typeEnd, 0)];
2539
- const source = tokens.description.trimLeft();
2552
+ let finalTypeLine = spec.source.reduce(typeEnd, 0);
2553
+ let tokens;
2554
+ do {
2555
+ ({ tokens } = spec.source[finalTypeLine]);
2556
+ if (tokens.description.trim()) {
2557
+ break;
2558
+ }
2559
+ finalTypeLine++;
2560
+ } while (spec.source[finalTypeLine]);
2561
+ const source = tokens.description.trimStart();
2540
2562
  const quotedGroups = source.split('"');
2541
2563
  if (quotedGroups.length > 1 && quotedGroups[0] === "" && quotedGroups.length % 2 === 1) {
2542
2564
  spec.name = quotedGroups[1];
@@ -2612,7 +2634,7 @@ function nameTokenizer() {
2612
2634
  };
2613
2635
  }
2614
2636
 
2615
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/parser/tokenizers/description.js
2637
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/parser/tokenizers/description.js
2616
2638
  function descriptionTokenizer(spacing = "compact", markers = Markers) {
2617
2639
  const join5 = getJoiner2(spacing);
2618
2640
  return (spec) => {
@@ -2644,7 +2666,7 @@ function preserveJoiner(lines, markers = Markers) {
2644
2666
  return lines.map(getDescription).join("\n");
2645
2667
  }
2646
2668
 
2647
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/parser/index.js
2669
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/parser/index.js
2648
2670
  function getParser4({ startLine = 0, fence = "```", spacing = "compact", markers = Markers, tokenizers = [
2649
2671
  tagTokenizer(),
2650
2672
  typeTokenizer(spacing),
@@ -2676,7 +2698,7 @@ function getParser4({ startLine = 0, fence = "```", spacing = "compact", markers
2676
2698
  };
2677
2699
  }
2678
2700
 
2679
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/stringifier/index.js
2701
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/stringifier/index.js
2680
2702
  function join3(tokens) {
2681
2703
  return tokens.start + tokens.delimiter + tokens.postDelimiter + tokens.tag + tokens.postTag + tokens.type + tokens.postType + tokens.name + tokens.postName + tokens.description + tokens.end + tokens.lineEnd;
2682
2704
  }
@@ -2684,7 +2706,7 @@ function getStringifier() {
2684
2706
  return (block) => block.source.map(({ tokens }) => join3(tokens)).join("\n");
2685
2707
  }
2686
2708
 
2687
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/stringifier/inspect.js
2709
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/stringifier/inspect.js
2688
2710
  var zeroWidth = {
2689
2711
  line: 0,
2690
2712
  start: 0,
@@ -2702,7 +2724,7 @@ var zeroWidth = {
2702
2724
  };
2703
2725
  var fields = Object.keys(zeroWidth);
2704
2726
 
2705
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/index.js
2727
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/index.js
2706
2728
  function parse(source, options = {}) {
2707
2729
  return getParser4(options)(source);
2708
2730
  }
@@ -2791,16 +2813,22 @@ function getObj(v) {
2791
2813
  } else if (tag == "selectable") {
2792
2814
  name = name.trim();
2793
2815
  } else {
2794
- if (name.includes("=")) {
2795
- const ms = name.split("=");
2796
- name = ms[0];
2797
- const ss = ms[1] + " " + description;
2816
+ const i = v.name.indexOf("=");
2817
+ if (i != -1) {
2818
+ const ms1 = name.substring(0, i);
2819
+ const ms2 = name.substring(i + 1);
2820
+ name = ms1;
2821
+ const ss = ms2 + " " + description;
2798
2822
  const dvz = getDefault(ss, true);
2799
2823
  if (dvz) {
2800
- defaults = dvz;
2801
2824
  description = ss.replace(dvz, "");
2825
+ if (dvz.startsWith("(")) {
2826
+ defaults = dvz.substring(1, dvz.length - 1);
2827
+ } else {
2828
+ defaults = dvz;
2829
+ }
2802
2830
  } else {
2803
- defaults = v.default || ms[1] || "";
2831
+ defaults = v.default || ms2 || "";
2804
2832
  }
2805
2833
  }
2806
2834
  const regExp = /\s*\((.*)\)\s*/gi;
@@ -2830,6 +2858,7 @@ function setTitle(obj2) {
2830
2858
  let arr = [
2831
2859
  "title",
2832
2860
  // 'name',
2861
+ "state",
2833
2862
  "text",
2834
2863
  "author",
2835
2864
  "date"
@@ -3732,7 +3761,7 @@ var top_default2 = (0, import_vue2.defineComponent)({
3732
3761
  }
3733
3762
  });
3734
3763
 
3735
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-Q6BNW3MO.js
3764
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-Q6BNW3MO.js
3736
3765
  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]*))$/;
3737
3766
  function getFunctionFormat(v) {
3738
3767
  if (!v) return;
@@ -58,12 +58,12 @@ var init_prettier = __esm({
58
58
  }
59
59
  });
60
60
 
61
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js
61
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-5PX3AFSC.js
62
62
  function isArray(obj2) {
63
63
  return Object.prototype.toString.call(obj2) == "[object Array]";
64
64
  }
65
65
 
66
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-A276ZDLP.js
66
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-A276ZDLP.js
67
67
  function getStartSames(str, val) {
68
68
  let s = "";
69
69
  const vs = [...val];
@@ -79,7 +79,7 @@ function getStartSames(str, val) {
79
79
  return [s, str.substring(index), val.substring(index)];
80
80
  }
81
81
 
82
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-KDOS4NFR.js
82
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-KDOS4NFR.js
83
83
  function getImportUrl(url, imp) {
84
84
  const arr = getStartSames(url, imp);
85
85
  const ts2 = arr[0];
@@ -103,12 +103,12 @@ function getImportUrl(url, imp) {
103
103
  return ds.join("") + arr[2].replace(/\\/g, "/");
104
104
  }
105
105
 
106
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js
106
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js
107
107
  function firstUpper(str) {
108
108
  return str.slice(0, 1).toUpperCase() + str.slice(1);
109
109
  }
110
110
 
111
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js
111
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js
112
112
  function lineToLargeHump(name) {
113
113
  let arr = name.split("-");
114
114
  arr = arr.map((vs) => {
@@ -828,7 +828,7 @@ function runDev(config2, configCallback) {
828
828
  return new FangMd(config2, configCallback);
829
829
  }
830
830
 
831
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-NCSN3MC5.js
831
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-NCSN3MC5.js
832
832
  var zObj = {
833
833
  "<": "&lt;",
834
834
  ">": "&gt;",
@@ -849,7 +849,7 @@ function htmlEscape(str) {
849
849
  // packages/node/index.ts
850
850
  import { join as join4 } from "path";
851
851
 
852
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js
852
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js
853
853
  function mergeObject(a, b, j = 0, i) {
854
854
  if (a instanceof Array) {
855
855
  if (j > 0 && i) {
@@ -903,7 +903,7 @@ function getConfig(key) {
903
903
  return config[key];
904
904
  }
905
905
 
906
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-7PJ2D3KR.js
906
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-7PJ2D3KR.js
907
907
  function getVueText(content) {
908
908
  const result = {
909
909
  template: "",
@@ -950,7 +950,7 @@ function getVueTexts(content) {
950
950
  };
951
951
  }
952
952
 
953
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js
953
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js
954
954
  function humpToLine(name) {
955
955
  const reg = /(([A-Z])([^A-Z]*))/g;
956
956
  let result;
@@ -972,12 +972,12 @@ function humpToLine(name) {
972
972
  }
973
973
  }
974
974
 
975
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js
975
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js
976
976
  function firstLower(str) {
977
977
  return str.slice(0, 1).toLowerCase() + str.slice(1);
978
978
  }
979
979
 
980
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js
980
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js
981
981
  function asyncMergeArray(arr, callback) {
982
982
  return new Promise((resolve2, reject) => {
983
983
  let index = 0;
@@ -1001,7 +1001,7 @@ function asyncMergeArray(arr, callback) {
1001
1001
  });
1002
1002
  }
1003
1003
 
1004
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-Z7NTQAAJ.js
1004
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-Z7NTQAAJ.js
1005
1005
  function getSuffix2(url) {
1006
1006
  const reg = /\.([a-z|A-Z][a-z|A-Z|0-9]*)$/;
1007
1007
  const regs = reg.exec(url);
@@ -1011,7 +1011,7 @@ function getSuffix2(url) {
1011
1011
  return "";
1012
1012
  }
1013
1013
 
1014
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-S6JRKYPY.js
1014
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-S6JRKYPY.js
1015
1015
  function matchsStart2(key, matchs) {
1016
1016
  if (matchs && matchs.length > 0) {
1017
1017
  for (const value of matchs) {
@@ -1031,7 +1031,7 @@ function matchsStart2(key, matchs) {
1031
1031
  }
1032
1032
  }
1033
1033
 
1034
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-YNOFNHEK.js
1034
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-YNOFNHEK.js
1035
1035
  function matchsEnd2(key, matchs) {
1036
1036
  if (matchs && matchs.length > 0) {
1037
1037
  for (const value of matchs) {
@@ -1323,7 +1323,7 @@ function getRawValue(comRaw, key) {
1323
1323
  }
1324
1324
  }
1325
1325
 
1326
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-FS4JPT23.js
1326
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-FS4JPT23.js
1327
1327
  function deComment(code) {
1328
1328
  let output = "";
1329
1329
  let state = "code";
@@ -1415,7 +1415,7 @@ function deComment(code) {
1415
1415
  return output;
1416
1416
  }
1417
1417
 
1418
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-N5Y3XGHX.js
1418
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-N5Y3XGHX.js
1419
1419
  function getImports(code, includeType = false) {
1420
1420
  code = deComment(code);
1421
1421
  const imports = /* @__PURE__ */ new Set();
@@ -2319,16 +2319,16 @@ function getSlotValue(arr) {
2319
2319
  });
2320
2320
  }
2321
2321
 
2322
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/primitives.js
2322
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/primitives.js
2323
2323
  var Markers;
2324
2324
  (function(Markers2) {
2325
2325
  Markers2["start"] = "/**";
2326
2326
  Markers2["nostart"] = "/***";
2327
2327
  Markers2["delim"] = "*";
2328
2328
  Markers2["end"] = "*/";
2329
- })(Markers = Markers || (Markers = {}));
2329
+ })(Markers || (Markers = {}));
2330
2330
 
2331
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/util.js
2331
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/util.js
2332
2332
  function isSpace(source) {
2333
2333
  return /^\s+$/.test(source);
2334
2334
  }
@@ -2350,8 +2350,8 @@ function seedTokens(tokens = {}) {
2350
2350
  return Object.assign({ start: "", delimiter: "", postDelimiter: "", tag: "", postTag: "", name: "", postName: "", type: "", postType: "", description: "", end: "", lineEnd: "" }, tokens);
2351
2351
  }
2352
2352
 
2353
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/parser/block-parser.js
2354
- var reTag = /^@\S+/;
2353
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/parser/block-parser.js
2354
+ var reTag = /^@[^\s/]+(?=\s|$)/;
2355
2355
  function getParser({ fence = "```" } = {}) {
2356
2356
  const fencer = getFencer(fence);
2357
2357
  const toggleFence = (source, isFenced) => fencer(source) ? !isFenced : isFenced;
@@ -2375,7 +2375,7 @@ function getFencer(fence) {
2375
2375
  return fence;
2376
2376
  }
2377
2377
 
2378
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/parser/source-parser.js
2378
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/parser/source-parser.js
2379
2379
  function getParser2({ startLine = 0, markers = Markers } = {}) {
2380
2380
  let block = null;
2381
2381
  let num = startLine;
@@ -2417,7 +2417,7 @@ function getParser2({ startLine = 0, markers = Markers } = {}) {
2417
2417
  };
2418
2418
  }
2419
2419
 
2420
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/parser/spec-parser.js
2420
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/parser/spec-parser.js
2421
2421
  function getParser3({ tokenizers }) {
2422
2422
  return function parseSpec(source) {
2423
2423
  var _a;
@@ -2431,7 +2431,7 @@ function getParser3({ tokenizers }) {
2431
2431
  };
2432
2432
  }
2433
2433
 
2434
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/parser/tokenizers/tag.js
2434
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/parser/tokenizers/tag.js
2435
2435
  function tagTokenizer() {
2436
2436
  return (spec) => {
2437
2437
  const { tokens } = spec.source[0];
@@ -2445,6 +2445,9 @@ function tagTokenizer() {
2445
2445
  });
2446
2446
  return spec;
2447
2447
  }
2448
+ if (match[1].includes("/")) {
2449
+ return spec;
2450
+ }
2448
2451
  tokens.tag = match[1];
2449
2452
  tokens.postTag = match[3];
2450
2453
  tokens.description = tokens.description.slice(match[0].length);
@@ -2453,16 +2456,24 @@ function tagTokenizer() {
2453
2456
  };
2454
2457
  }
2455
2458
 
2456
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/parser/tokenizers/type.js
2459
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/parser/tokenizers/type.js
2457
2460
  function typeTokenizer(spacing = "compact") {
2458
2461
  const join5 = getJoiner(spacing);
2459
2462
  return (spec) => {
2460
2463
  let curlies = 0;
2461
2464
  let lines = [];
2462
- for (const [i, { tokens }] of spec.source.entries()) {
2465
+ let descriptionBegun = false;
2466
+ let firstTypeIteration = true;
2467
+ for (const { tokens } of spec.source.values()) {
2463
2468
  let type = "";
2464
- if (i === 0 && tokens.description[0] !== "{")
2469
+ if (!descriptionBegun && tokens.description.trim()) {
2470
+ descriptionBegun = true;
2471
+ } else if (!descriptionBegun) {
2472
+ continue;
2473
+ }
2474
+ if (firstTypeIteration && tokens.description[0] !== "{")
2465
2475
  return spec;
2476
+ firstTypeIteration = false;
2466
2477
  for (const ch of tokens.description) {
2467
2478
  if (ch === "{")
2468
2479
  curlies++;
@@ -2476,6 +2487,9 @@ function typeTokenizer(spacing = "compact") {
2476
2487
  if (curlies === 0)
2477
2488
  break;
2478
2489
  }
2490
+ if (!descriptionBegun) {
2491
+ return spec;
2492
+ }
2479
2493
  if (curlies !== 0) {
2480
2494
  spec.problems.push({
2481
2495
  code: "spec:type:unpaired-curlies",
@@ -2512,13 +2526,21 @@ function getJoiner(spacing) {
2512
2526
  return spacing;
2513
2527
  }
2514
2528
 
2515
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/parser/tokenizers/name.js
2529
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/parser/tokenizers/name.js
2516
2530
  var isQuoted = (s) => s && s.startsWith('"') && s.endsWith('"');
2517
2531
  function nameTokenizer() {
2518
2532
  const typeEnd = (num, { tokens }, i) => tokens.type === "" ? num : i;
2519
2533
  return (spec) => {
2520
- const { tokens } = spec.source[spec.source.reduce(typeEnd, 0)];
2521
- const source = tokens.description.trimLeft();
2534
+ let finalTypeLine = spec.source.reduce(typeEnd, 0);
2535
+ let tokens;
2536
+ do {
2537
+ ({ tokens } = spec.source[finalTypeLine]);
2538
+ if (tokens.description.trim()) {
2539
+ break;
2540
+ }
2541
+ finalTypeLine++;
2542
+ } while (spec.source[finalTypeLine]);
2543
+ const source = tokens.description.trimStart();
2522
2544
  const quotedGroups = source.split('"');
2523
2545
  if (quotedGroups.length > 1 && quotedGroups[0] === "" && quotedGroups.length % 2 === 1) {
2524
2546
  spec.name = quotedGroups[1];
@@ -2594,7 +2616,7 @@ function nameTokenizer() {
2594
2616
  };
2595
2617
  }
2596
2618
 
2597
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/parser/tokenizers/description.js
2619
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/parser/tokenizers/description.js
2598
2620
  function descriptionTokenizer(spacing = "compact", markers = Markers) {
2599
2621
  const join5 = getJoiner2(spacing);
2600
2622
  return (spec) => {
@@ -2626,7 +2648,7 @@ function preserveJoiner(lines, markers = Markers) {
2626
2648
  return lines.map(getDescription).join("\n");
2627
2649
  }
2628
2650
 
2629
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/parser/index.js
2651
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/parser/index.js
2630
2652
  function getParser4({ startLine = 0, fence = "```", spacing = "compact", markers = Markers, tokenizers = [
2631
2653
  tagTokenizer(),
2632
2654
  typeTokenizer(spacing),
@@ -2658,7 +2680,7 @@ function getParser4({ startLine = 0, fence = "```", spacing = "compact", markers
2658
2680
  };
2659
2681
  }
2660
2682
 
2661
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/stringifier/index.js
2683
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/stringifier/index.js
2662
2684
  function join3(tokens) {
2663
2685
  return tokens.start + tokens.delimiter + tokens.postDelimiter + tokens.tag + tokens.postTag + tokens.type + tokens.postType + tokens.name + tokens.postName + tokens.description + tokens.end + tokens.lineEnd;
2664
2686
  }
@@ -2666,7 +2688,7 @@ function getStringifier() {
2666
2688
  return (block) => block.source.map(({ tokens }) => join3(tokens)).join("\n");
2667
2689
  }
2668
2690
 
2669
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/stringifier/inspect.js
2691
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/stringifier/inspect.js
2670
2692
  var zeroWidth = {
2671
2693
  line: 0,
2672
2694
  start: 0,
@@ -2684,7 +2706,7 @@ var zeroWidth = {
2684
2706
  };
2685
2707
  var fields = Object.keys(zeroWidth);
2686
2708
 
2687
- // node_modules/.pnpm/comment-parser@1.4.1/node_modules/comment-parser/es6/index.js
2709
+ // node_modules/.pnpm/comment-parser@1.4.4/node_modules/comment-parser/es6/index.js
2688
2710
  function parse(source, options = {}) {
2689
2711
  return getParser4(options)(source);
2690
2712
  }
@@ -2773,16 +2795,22 @@ function getObj(v) {
2773
2795
  } else if (tag == "selectable") {
2774
2796
  name = name.trim();
2775
2797
  } else {
2776
- if (name.includes("=")) {
2777
- const ms = name.split("=");
2778
- name = ms[0];
2779
- const ss = ms[1] + " " + description;
2798
+ const i = v.name.indexOf("=");
2799
+ if (i != -1) {
2800
+ const ms1 = name.substring(0, i);
2801
+ const ms2 = name.substring(i + 1);
2802
+ name = ms1;
2803
+ const ss = ms2 + " " + description;
2780
2804
  const dvz = getDefault(ss, true);
2781
2805
  if (dvz) {
2782
- defaults = dvz;
2783
2806
  description = ss.replace(dvz, "");
2807
+ if (dvz.startsWith("(")) {
2808
+ defaults = dvz.substring(1, dvz.length - 1);
2809
+ } else {
2810
+ defaults = dvz;
2811
+ }
2784
2812
  } else {
2785
- defaults = v.default || ms[1] || "";
2813
+ defaults = v.default || ms2 || "";
2786
2814
  }
2787
2815
  }
2788
2816
  const regExp = /\s*\((.*)\)\s*/gi;
@@ -2812,6 +2840,7 @@ function setTitle(obj2) {
2812
2840
  let arr = [
2813
2841
  "title",
2814
2842
  // 'name',
2843
+ "state",
2815
2844
  "text",
2816
2845
  "author",
2817
2846
  "date"
@@ -3714,7 +3743,7 @@ var top_default2 = defineComponent2({
3714
3743
  }
3715
3744
  });
3716
3745
 
3717
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-Q6BNW3MO.js
3746
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-Q6BNW3MO.js
3718
3747
  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]*))$/;
3719
3748
  function getFunctionFormat(v) {
3720
3749
  if (!v) return;
@@ -1 +1 @@
1
- "use strict";;/* empty css */require("../../../_virtual/common.cjs");const e=require("../../../node_modules/.pnpm/@highlightjs_vue-plugin@2.1_088738b011f896e680b57492efece010/node_modules/@highlightjs/vue-plugin/dist/highlightjs-vue.esm.min.cjs"),n=require("vue"),t=n.defineComponent({props:{language:{type:String},code:{type:String}},components:{highlightjs:e.component}});module.exports=t;
1
+ "use strict";;/* empty css */require("../../../_virtual/common.cjs");const e=require("../../../node_modules/.pnpm/@highlightjs_vue-plugin@2.1_09b7e5d2c19325dc414e3a91415b2e91/node_modules/@highlightjs/vue-plugin/dist/highlightjs-vue.esm.min.cjs"),n=require("vue"),t=n.defineComponent({props:{language:{type:String},code:{type:String}},components:{highlightjs:e.component}});module.exports=t;
@@ -1,6 +1,6 @@
1
1
  /* empty css */
2
2
  import "../../../_virtual/common.js";
3
- import o from "../../../node_modules/.pnpm/@highlightjs_vue-plugin@2.1_088738b011f896e680b57492efece010/node_modules/@highlightjs/vue-plugin/dist/highlightjs-vue.esm.min.js";
3
+ import o from "../../../node_modules/.pnpm/@highlightjs_vue-plugin@2.1_09b7e5d2c19325dc414e3a91415b2e91/node_modules/@highlightjs/vue-plugin/dist/highlightjs-vue.esm.min.js";
4
4
  import { defineComponent as t } from "vue";
5
5
  const m = t({
6
6
  props: {
@@ -1,18 +1,25 @@
1
- import { ObjStr, ObjUnk } from '../../config';
2
- import { SpecObjs, Spec } from '../../utils/index';
3
- import { DataType } from './util';
4
- export declare function getHmtl(propsname: string, param: {
5
- [key: string]: SpecObjs[];
6
- }, value: ObjUnk, slotValue?: ObjStr, propsText?: ObjStr, exposeText?: ObjUnk): Promise<string>;
7
- export declare function setValStringify(v: unknown, key: string, propsText?: ObjStr): string | Promise<string>;
8
- type SelectsObj = {
9
- label: string;
10
- prop: unknown;
11
- };
12
- export declare function getSpecType(val: Spec): {
13
- arr: SelectsObj[];
14
- type: string;
15
- dataType: DataType[];
16
- };
17
- export declare function getDefaultValue(obj: Spec, is?: boolean): any;
18
- export {};
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from '../../../vue/dist/vue.esm-bundler.js';
2
+ declare const _default: DefineComponent<ExtractPropTypes<{
3
+ name: {
4
+ type: StringConstructor;
5
+ };
6
+ html: {
7
+ type: StringConstructor;
8
+ default(): string;
9
+ };
10
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
11
+ refresh: (...args: any[]) => void;
12
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
13
+ name: {
14
+ type: StringConstructor;
15
+ };
16
+ html: {
17
+ type: StringConstructor;
18
+ default(): string;
19
+ };
20
+ }>> & Readonly<{
21
+ onRefresh?: ((...args: any[]) => any) | undefined;
22
+ }>, {
23
+ html: string;
24
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
25
+ export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("comment-parser"),q=require("@fangzhongya/utils/basic/string/firstLower"),f={titles:[],propss:[],slots:[],emitss:[],exposes:[]};function w(){Object.keys(f).forEach(e=>{f[e]=[]})}function k(e,r){let t=e.charAt(0),n=[['"','"'],["'","'"],["`","`"],["(",")"],["{","}"],["[","]"]];const s=n.map(i=>i[0]);let l=s.indexOf(t);if(l!=-1){let i=[t];for(let u=1;u<e.length;u++){if(t=e[u],l=s.indexOf(t),l!=-1)l>2?i.push(t):i[i.length-1]===t?i.pop():i.push(t);else{let o=!1;for(let a of n)if(t===a[1]&&i[i.length-1]===a[0]){o=!0;break}o&&i.pop()}if(i.length===0)return r&&e[u+1]===" ",e.substring(0,u+1)}}else return r?e.substring(0,e.indexOf(" ")):e}function A(e){delete e.problems,delete e.source;let r=e.tag,t=e.name,n=e.description,s=e.default,l="",i="";if(r=="default")t=t.trim(),t=k(t)||t;else if(r=="selectable")t=t.trim();else{if(t.includes("=")){const a=t.split("=");t=a[0];const d=a[1]+" "+n,g=k(d,!0);g?(s=g,n=d.replace(g,"")):s=e.default||a[1]||""}const o=/\s*\((.*)\)\s*/gi.exec(n);o&&o.length>0&&(l=o[1],n=n.replace(o[0],""))}return t.endsWith("*")&&(i="*",t=t.substring(0,t.length-1)),e.name=t,e.required=i,e.default=s||"",e.description=n,e.selectable=l,e}function v(e){let r=["title","text","author","date"],t=m(e),n={};r.forEach(s=>{n[s]=t.obj[s]}),T(n),t.arr.forEach(s=>{b(s.key,s.value)})}function T(e){f.titles.push(e)}function P(e){let r=["props","name","type","default","required","selectable","description","descriptions","model","return"],t=m(e),n={};r.forEach(s=>{n[s]=t.obj[s]}),p(n,"props"),t.arr.forEach(s=>{b(s.key,s.value)})}function F(e){let r=["slot","name","selectable","description","descriptions"],t=m(e),n={};r.forEach(s=>{n[s]=t.obj[s]}),p(n,"slot"),t.arr.forEach(s=>{b(s.key,s.value)})}function B(e){let r=["emits","name","selectable","description","descriptions"],t=m(e),n={};r.forEach(s=>{n[s]=t.obj[s]}),p(n,"emits"),t.arr.forEach(s=>{b(s.key,s.value)})}function I(e){let r=["expose","name","type","return","selectable","description","descriptions"],t=m(e),n={};r.forEach(s=>{n[s]=t.obj[s]}),p(n,"expose"),t.arr.forEach(s=>{b(s.key,s.value)})}function p(e,r){const t=f[r+"name"]||[],n=e.name??e[r]?.name,s=t.indexOf(n);s>=0&&(f[r+"s"].splice(s,1),t.splice(s,1)),f[r+"s"].push(e),t.push(n),f[r+"name"]=t}function m(e,r){const t={descriptions:e?.description||""},n=[];return e?.tags&&e.tags?.forEach(s=>{let l=s.tag,i=A(s);if(!t.hasOwnProperty(l))t[l]=i;else{const u={};u[l]=i,n.push({key:l,value:u})}}),{arr:n,obj:t}}function b(e,r){switch(e){case"title":return T(r),!0;case"text":return T(r),!0;case"props":return p(r,"props"),!0;case"slot":return p(r,"slot"),!0;case"emits":return p(r,"emits"),!0;case"expose":return p(r,"expose"),!0;default:return!1}}function J(e,r){switch(e){case"title":return v(r),!0;case"props":return P(r),!0;case"slot":return F(r),!0;case"emits":return B(r),!0;case"expose":return I(r),!0;default:return!1}}function L(e){return w(),e?.forEach(r=>{let t=r?.tags||[],n=t?.length||0;if(n>0)for(let s=0;s<n;s++){const l=t[s]||{};if(J(l.tag,r))break}}),JSON.parse(JSON.stringify(f))}function S(e){if(e)return j.parse(e)}function M(e){let r=S(e);return L(r)}const z=["Boolean","Any","String","Number","Array","Object","Function"];function _(e){return z.includes(e)?q.firstLower(e):e}const C=e=>{let r=[],t=!1,n=!1,s=0;for(let l=0;l<e.length;l++){const i=e[l];if(i==="["||i==="<"||i==="("?(n=!0,r.push(i),i=="["&&(t=!0),s==0&&(s=l)):(i==="]"&&r[r.length-1]==="["||i===">"&&r[r.length-1]==="<"||i===")"&&r[r.length-1]==="(")&&r.pop(),n&&r.length===0)return t&&s+1==l?{top:"Array",type:e.substring(0,s)}:{top:e.substring(0,s),type:e.substring(s+1,l)}}return{top:e,type:""}},y=(e,r)=>{let t=[],n=[],s="";for(let l=0;l<e.length;l++){const i=e[l];i==="["||i==="<"||i==="("?(t.push(i),s+=i):i==="]"&&t.length>0&&t[t.length-1]==="["||i===">"&&t.length>0&&t[t.length-1]==="<"||i===")"&&t.length>0&&t[t.length-1]==="("?(t.pop(),s+=i):i===r&&t.length===0?(n.push(s.trim()),s=""):s+=i}return s.trim()!==""&&n.push(s.trim()),n};function G(e){let r="";return typeof e=="string"?r=e:r=e.value,_(r||"any")}function N(e){const r=e[0]||"any";return G(r)}const x=e=>{if(e)if(e.startsWith("[")&&e.endsWith("]")||e.startsWith("(")&&e.endsWith(")")){const r=e.slice(1,-1).trim();return r?y(r,","):["any"]}else{if(e.startsWith("{")&&e.endsWith("}"))return["Object"];if(e.startsWith("<")&&e.endsWith(">")){const r=e.slice(1,-1).trim();return r?y(r,"|"):["any"]}else return y(e,",")}else return["any"]};function E(e){const r=[];return e.forEach(t=>{const n=C(t);if(n.type){const s=x(n.type),l=E(s);r.push({label:t,value:n.top,children:l})}else r.push(n.top)}),r}function H(e){return y(e,",").map(t=>{const n=t.trim(),s=t.match(/^([^:?]+)(\??):/);if(!s)return null;const l=s[1].trim(),i=!s[2],u=s[0].length,o=t.substring(u).trim();let a=[],d="",g="";for(let h=0;h<o.length;h++){const c=o[h];if(c==="["||c==="<"||c==="("||c==="{"?a.push(c):(c==="]"&&a[a.length-1]==="["||c===">"&&a[a.length-1]==="<"||c==="}"&&a[a.length-1]==="{"||c===")"&&a[a.length-1]==="(")&&a.pop(),a.length===0&&h>0){h==1&&c!=="]"&&c!==">"&&c!=="}"&&c!==")"?(d="",g=o.substring(0)):(d=o.substring(0,h+1).trim(),g=o.substring(h+1));break}}const W=x(d),O=E(W);return{name:l,prop:l,type:N(O),dataType:O,must:i,label:n,description:g}}).filter(Boolean)}exports.getDataType=E;exports.getDataTypeType=N;exports.getNotesText=M;exports.getTextNotes=S;exports.parseParamString=H;exports.parseTypeDefinition=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("comment-parser"),q=require("@fangzhongya/utils/basic/string/firstLower"),p={titles:[],propss:[],slots:[],emitss:[],exposes:[]};function w(){Object.keys(p).forEach(e=>{p[e]=[]})}function S(e,r){let t=e.charAt(0),n=[['"','"'],["'","'"],["`","`"],["(",")"],["{","}"],["[","]"]];const s=n.map(i=>i[0]);let l=s.indexOf(t);if(l!=-1){let i=[t];for(let o=1;o<e.length;o++){if(t=e[o],l=s.indexOf(t),l!=-1)l>2?i.push(t):i[i.length-1]===t?i.pop():i.push(t);else{let u=!1;for(let a of n)if(t===a[1]&&i[i.length-1]===a[0]){u=!0;break}u&&i.pop()}if(i.length===0)return r&&e[o+1]===" ",e.substring(0,o+1)}}else return r?e.substring(0,e.indexOf(" ")):e}function A(e){delete e.problems,delete e.source;let r=e.tag,t=e.name,n=e.description,s=e.default,l="",i="";if(r=="default")t=t.trim(),t=S(t)||t;else if(r=="selectable")t=t.trim();else{const o=e.name.indexOf("=");if(o!=-1){const m=t.substring(0,o),d=t.substring(o+1);t=m;const T=d+" "+n,f=S(T,!0);f?(n=T.replace(f,""),f.startsWith("(")?s=f.substring(1,f.length-1):s=f):s=e.default||d||""}const a=/\s*\((.*)\)\s*/gi.exec(n);a&&a.length>0&&(l=a[1],n=n.replace(a[0],""))}return t.endsWith("*")&&(i="*",t=t.substring(0,t.length-1)),e.name=t,e.required=i,e.default=s||"",e.description=n,e.selectable=l,e}function P(e){let r=["title","state","text","author","date"],t=b(e),n={};r.forEach(s=>{n[s]=t.obj[s]}),E(n),t.arr.forEach(s=>{y(s.key,s.value)})}function E(e){p.titles.push(e)}function v(e){let r=["props","name","type","default","required","selectable","description","descriptions","model","return"],t=b(e),n={};r.forEach(s=>{n[s]=t.obj[s]}),g(n,"props"),t.arr.forEach(s=>{y(s.key,s.value)})}function F(e){let r=["slot","name","selectable","description","descriptions"],t=b(e),n={};r.forEach(s=>{n[s]=t.obj[s]}),g(n,"slot"),t.arr.forEach(s=>{y(s.key,s.value)})}function B(e){let r=["emits","name","selectable","description","descriptions"],t=b(e),n={};r.forEach(s=>{n[s]=t.obj[s]}),g(n,"emits"),t.arr.forEach(s=>{y(s.key,s.value)})}function I(e){let r=["expose","name","type","return","selectable","description","descriptions"],t=b(e),n={};r.forEach(s=>{n[s]=t.obj[s]}),g(n,"expose"),t.arr.forEach(s=>{y(s.key,s.value)})}function g(e,r){const t=p[r+"name"]||[],n=e.name??e[r]?.name,s=t.indexOf(n);s>=0&&(p[r+"s"].splice(s,1),t.splice(s,1)),p[r+"s"].push(e),t.push(n),p[r+"name"]=t}function b(e,r){const t={descriptions:e?.description||""},n=[];return e?.tags&&e.tags?.forEach(s=>{let l=s.tag,i=A(s);if(!t.hasOwnProperty(l))t[l]=i;else{const o={};o[l]=i,n.push({key:l,value:o})}}),{arr:n,obj:t}}function y(e,r){switch(e){case"title":return E(r),!0;case"text":return E(r),!0;case"props":return g(r,"props"),!0;case"slot":return g(r,"slot"),!0;case"emits":return g(r,"emits"),!0;case"expose":return g(r,"expose"),!0;default:return!1}}function J(e,r){switch(e){case"title":return P(r),!0;case"props":return v(r),!0;case"slot":return F(r),!0;case"emits":return B(r),!0;case"expose":return I(r),!0;default:return!1}}function L(e){return w(),e?.forEach(r=>{let t=r?.tags||[],n=t?.length||0;if(n>0)for(let s=0;s<n;s++){const l=t[s]||{};if(J(l.tag,r))break}}),JSON.parse(JSON.stringify(p))}function W(e){if(e)return j.parse(e)}function M(e){let r=W(e);return L(r)}const z=["Boolean","Any","String","Number","Array","Object","Function"];function _(e){return z.includes(e)?q.firstLower(e):e}const C=e=>{let r=[],t=!1,n=!1,s=0;for(let l=0;l<e.length;l++){const i=e[l];if(i==="["||i==="<"||i==="("?(n=!0,r.push(i),i=="["&&(t=!0),s==0&&(s=l)):(i==="]"&&r[r.length-1]==="["||i===">"&&r[r.length-1]==="<"||i===")"&&r[r.length-1]==="(")&&r.pop(),n&&r.length===0)return t&&s+1==l?{top:"Array",type:e.substring(0,s)}:{top:e.substring(0,s),type:e.substring(s+1,l)}}return{top:e,type:""}},x=(e,r)=>{let t=[],n=[],s="";for(let l=0;l<e.length;l++){const i=e[l];i==="["||i==="<"||i==="("?(t.push(i),s+=i):i==="]"&&t.length>0&&t[t.length-1]==="["||i===">"&&t.length>0&&t[t.length-1]==="<"||i===")"&&t.length>0&&t[t.length-1]==="("?(t.pop(),s+=i):i===r&&t.length===0?(n.push(s.trim()),s=""):s+=i}return s.trim()!==""&&n.push(s.trim()),n};function G(e){let r="";return typeof e=="string"?r=e:r=e.value,_(r||"any")}function N(e){const r=e[0]||"any";return G(r)}const O=e=>{if(e)if(e.startsWith("[")&&e.endsWith("]")||e.startsWith("(")&&e.endsWith(")")){const r=e.slice(1,-1).trim();return r?x(r,","):["any"]}else{if(e.startsWith("{")&&e.endsWith("}"))return["Object"];if(e.startsWith("<")&&e.endsWith(">")){const r=e.slice(1,-1).trim();return r?x(r,"|"):["any"]}else return x(e,",")}else return["any"]};function k(e){const r=[];return e.forEach(t=>{const n=C(t);if(n.type){const s=O(n.type),l=k(s);r.push({label:t,value:n.top,children:l})}else r.push(n.top)}),r}function H(e){return x(e,",").map(t=>{const n=t.trim(),s=t.match(/^([^:?]+)(\??):/);if(!s)return null;const l=s[1].trim(),i=!s[2],o=s[0].length,u=t.substring(o).trim();let a=[],m="",d="";for(let h=0;h<u.length;h++){const c=u[h];if(c==="["||c==="<"||c==="("||c==="{"?a.push(c):(c==="]"&&a[a.length-1]==="["||c===">"&&a[a.length-1]==="<"||c==="}"&&a[a.length-1]==="{"||c===")"&&a[a.length-1]==="(")&&a.pop(),a.length===0&&h>0){h==1&&c!=="]"&&c!==">"&&c!=="}"&&c!==")"?(m="",d=u.substring(0)):(m=u.substring(0,h+1).trim(),d=u.substring(h+1));break}}const T=O(m),f=k(T);return{name:l,prop:l,type:N(f),dataType:f,must:i,label:n,description:d}}).filter(Boolean)}exports.getDataType=k;exports.getDataTypeType=N;exports.getNotesText=M;exports.getTextNotes=W;exports.parseParamString=H;exports.parseTypeDefinition=O;
@@ -1,6 +1,6 @@
1
1
  import { parse as W } from "comment-parser";
2
2
  import { firstLower as j } from "@fangzhongya/utils/basic/string/firstLower";
3
- const f = {
3
+ const p = {
4
4
  titles: [],
5
5
  propss: [],
6
6
  slots: [],
@@ -8,12 +8,12 @@ const f = {
8
8
  exposes: []
9
9
  };
10
10
  function N() {
11
- Object.keys(f).forEach((e) => {
12
- f[e] = [];
11
+ Object.keys(p).forEach((e) => {
12
+ p[e] = [];
13
13
  });
14
14
  }
15
- function T(e, r) {
16
- let t = e.charAt(0), s = [
15
+ function O(e, r) {
16
+ let t = e.charAt(0), n = [
17
17
  ['"', '"'],
18
18
  ["'", "'"],
19
19
  ["`", "`"],
@@ -21,65 +21,67 @@ function T(e, r) {
21
21
  ["{", "}"],
22
22
  ["[", "]"]
23
23
  ];
24
- const n = s.map((i) => i[0]);
25
- let l = n.indexOf(t);
24
+ const s = n.map((i) => i[0]);
25
+ let l = s.indexOf(t);
26
26
  if (l != -1) {
27
27
  let i = [t];
28
- for (let u = 1; u < e.length; u++) {
29
- if (t = e[u], l = n.indexOf(t), l != -1)
28
+ for (let o = 1; o < e.length; o++) {
29
+ if (t = e[o], l = s.indexOf(t), l != -1)
30
30
  l > 2 ? i.push(t) : i[i.length - 1] === t ? i.pop() : i.push(t);
31
31
  else {
32
- let o = !1;
33
- for (let a of s)
32
+ let u = !1;
33
+ for (let a of n)
34
34
  if (t === a[1] && i[i.length - 1] === a[0]) {
35
- o = !0;
35
+ u = !0;
36
36
  break;
37
37
  }
38
- o && i.pop();
38
+ u && i.pop();
39
39
  }
40
40
  if (i.length === 0)
41
- return r && e[u + 1] === " ", e.substring(0, u + 1);
41
+ return r && e[o + 1] === " ", e.substring(0, o + 1);
42
42
  }
43
43
  } else
44
44
  return r ? e.substring(0, e.indexOf(" ")) : e;
45
45
  }
46
46
  function A(e) {
47
47
  delete e.problems, delete e.source;
48
- let r = e.tag, t = e.name, s = e.description, n = e.default, l = "", i = "";
48
+ let r = e.tag, t = e.name, n = e.description, s = e.default, l = "", i = "";
49
49
  if (r == "default")
50
- t = t.trim(), t = T(t) || t;
50
+ t = t.trim(), t = O(t) || t;
51
51
  else if (r == "selectable")
52
52
  t = t.trim();
53
53
  else {
54
- if (t.includes("=")) {
55
- const a = t.split("=");
56
- t = a[0];
57
- const d = a[1] + " " + s, h = T(d, !0);
58
- h ? (n = h, s = d.replace(h, "")) : n = e.default || a[1] || "";
54
+ const o = e.name.indexOf("=");
55
+ if (o != -1) {
56
+ const m = t.substring(0, o), d = t.substring(o + 1);
57
+ t = m;
58
+ const x = d + " " + n, f = O(x, !0);
59
+ f ? (n = x.replace(f, ""), f.startsWith("(") ? s = f.substring(1, f.length - 1) : s = f) : s = e.default || d || "";
59
60
  }
60
- const o = /\s*\((.*)\)\s*/gi.exec(s);
61
- o && o.length > 0 && (l = o[1], s = s.replace(o[0], ""));
61
+ const a = /\s*\((.*)\)\s*/gi.exec(n);
62
+ a && a.length > 0 && (l = a[1], n = n.replace(a[0], ""));
62
63
  }
63
- return t.endsWith("*") && (i = "*", t = t.substring(0, t.length - 1)), e.name = t, e.required = i, e.default = n || "", e.description = s, e.selectable = l, e;
64
+ return t.endsWith("*") && (i = "*", t = t.substring(0, t.length - 1)), e.name = t, e.required = i, e.default = s || "", e.description = n, e.selectable = l, e;
64
65
  }
65
66
  function w(e) {
66
67
  let r = [
67
68
  "title",
68
69
  // 'name',
70
+ "state",
69
71
  "text",
70
72
  "author",
71
73
  "date"
72
74
  // 'description',
73
75
  // 'descriptions',
74
- ], t = m(e), s = {};
75
- r.forEach((n) => {
76
- s[n] = t.obj[n];
77
- }), x(s), t.arr.forEach((n) => {
78
- b(n.key, n.value);
76
+ ], t = b(e), n = {};
77
+ r.forEach((s) => {
78
+ n[s] = t.obj[s];
79
+ }), T(n), t.arr.forEach((s) => {
80
+ y(s.key, s.value);
79
81
  });
80
82
  }
81
- function x(e) {
82
- f.titles.push(e);
83
+ function T(e) {
84
+ p.titles.push(e);
83
85
  }
84
86
  function q(e) {
85
87
  let r = [
@@ -93,27 +95,27 @@ function q(e) {
93
95
  "descriptions",
94
96
  "model",
95
97
  "return"
96
- ], t = m(e), s = {};
97
- r.forEach((n) => {
98
- s[n] = t.obj[n];
99
- }), p(s, "props"), t.arr.forEach((n) => {
100
- b(n.key, n.value);
98
+ ], t = b(e), n = {};
99
+ r.forEach((s) => {
100
+ n[s] = t.obj[s];
101
+ }), h(n, "props"), t.arr.forEach((s) => {
102
+ y(s.key, s.value);
101
103
  });
102
104
  }
103
- function v(e) {
104
- let r = ["slot", "name", "selectable", "description", "descriptions"], t = m(e), s = {};
105
- r.forEach((n) => {
106
- s[n] = t.obj[n];
107
- }), p(s, "slot"), t.arr.forEach((n) => {
108
- b(n.key, n.value);
105
+ function F(e) {
106
+ let r = ["slot", "name", "selectable", "description", "descriptions"], t = b(e), n = {};
107
+ r.forEach((s) => {
108
+ n[s] = t.obj[s];
109
+ }), h(n, "slot"), t.arr.forEach((s) => {
110
+ y(s.key, s.value);
109
111
  });
110
112
  }
111
- function F(e) {
112
- let r = ["emits", "name", "selectable", "description", "descriptions"], t = m(e), s = {};
113
- r.forEach((n) => {
114
- s[n] = t.obj[n];
115
- }), p(s, "emits"), t.arr.forEach((n) => {
116
- b(n.key, n.value);
113
+ function v(e) {
114
+ let r = ["emits", "name", "selectable", "description", "descriptions"], t = b(e), n = {};
115
+ r.forEach((s) => {
116
+ n[s] = t.obj[s];
117
+ }), h(n, "emits"), t.arr.forEach((s) => {
118
+ y(s.key, s.value);
117
119
  });
118
120
  }
119
121
  function B(e) {
@@ -125,51 +127,51 @@ function B(e) {
125
127
  "selectable",
126
128
  "description",
127
129
  "descriptions"
128
- ], t = m(e), s = {};
129
- r.forEach((n) => {
130
- s[n] = t.obj[n];
131
- }), p(s, "expose"), t.arr.forEach((n) => {
132
- b(n.key, n.value);
130
+ ], t = b(e), n = {};
131
+ r.forEach((s) => {
132
+ n[s] = t.obj[s];
133
+ }), h(n, "expose"), t.arr.forEach((s) => {
134
+ y(s.key, s.value);
133
135
  });
134
136
  }
135
- function p(e, r) {
136
- const t = f[r + "name"] || [], s = e.name ?? e[r]?.name, n = t.indexOf(s);
137
- n >= 0 && (f[r + "s"].splice(n, 1), t.splice(n, 1)), f[r + "s"].push(e), t.push(s), f[r + "name"] = t;
137
+ function h(e, r) {
138
+ const t = p[r + "name"] || [], n = e.name ?? e[r]?.name, s = t.indexOf(n);
139
+ s >= 0 && (p[r + "s"].splice(s, 1), t.splice(s, 1)), p[r + "s"].push(e), t.push(n), p[r + "name"] = t;
138
140
  }
139
- function m(e, r) {
141
+ function b(e, r) {
140
142
  const t = {
141
143
  descriptions: e?.description || ""
142
- }, s = [];
143
- return e?.tags && e.tags?.forEach((n) => {
144
- let l = n.tag, i = A(n);
144
+ }, n = [];
145
+ return e?.tags && e.tags?.forEach((s) => {
146
+ let l = s.tag, i = A(s);
145
147
  if (!t.hasOwnProperty(l))
146
148
  t[l] = i;
147
149
  else {
148
- const u = {};
149
- u[l] = i, s.push({
150
+ const o = {};
151
+ o[l] = i, n.push({
150
152
  key: l,
151
- value: u
153
+ value: o
152
154
  });
153
155
  }
154
156
  }), {
155
- arr: s,
157
+ arr: n,
156
158
  obj: t
157
159
  };
158
160
  }
159
- function b(e, r) {
161
+ function y(e, r) {
160
162
  switch (e) {
161
163
  case "title":
162
- return x(r), !0;
164
+ return T(r), !0;
163
165
  case "text":
164
- return x(r), !0;
166
+ return T(r), !0;
165
167
  case "props":
166
- return p(r, "props"), !0;
168
+ return h(r, "props"), !0;
167
169
  case "slot":
168
- return p(r, "slot"), !0;
170
+ return h(r, "slot"), !0;
169
171
  case "emits":
170
- return p(r, "emits"), !0;
172
+ return h(r, "emits"), !0;
171
173
  case "expose":
172
- return p(r, "expose"), !0;
174
+ return h(r, "expose"), !0;
173
175
  default:
174
176
  return !1;
175
177
  }
@@ -181,9 +183,9 @@ function I(e, r) {
181
183
  case "props":
182
184
  return q(r), !0;
183
185
  case "slot":
184
- return v(r), !0;
185
- case "emits":
186
186
  return F(r), !0;
187
+ case "emits":
188
+ return v(r), !0;
187
189
  case "expose":
188
190
  return B(r), !0;
189
191
  default:
@@ -192,14 +194,14 @@ function I(e, r) {
192
194
  }
193
195
  function J(e) {
194
196
  return N(), e?.forEach((r) => {
195
- let t = r?.tags || [], s = t?.length || 0;
196
- if (s > 0)
197
- for (let n = 0; n < s; n++) {
198
- const l = t[n] || {};
197
+ let t = r?.tags || [], n = t?.length || 0;
198
+ if (n > 0)
199
+ for (let s = 0; s < n; s++) {
200
+ const l = t[s] || {};
199
201
  if (I(l.tag, r))
200
202
  break;
201
203
  }
202
- }), JSON.parse(JSON.stringify(f));
204
+ }), JSON.parse(JSON.stringify(p));
203
205
  }
204
206
  function z(e) {
205
207
  if (e)
@@ -222,29 +224,29 @@ function M(e) {
222
224
  return L.includes(e) ? j(e) : e;
223
225
  }
224
226
  const P = (e) => {
225
- let r = [], t = !1, s = !1, n = 0;
227
+ let r = [], t = !1, n = !1, s = 0;
226
228
  for (let l = 0; l < e.length; l++) {
227
229
  const i = e[l];
228
- if (i === "[" || i === "<" || i === "(" ? (s = !0, r.push(i), i == "[" && (t = !0), n == 0 && (n = l)) : (i === "]" && r[r.length - 1] === "[" || i === ">" && r[r.length - 1] === "<" || i === ")" && r[r.length - 1] === "(") && r.pop(), s && r.length === 0)
229
- return t && n + 1 == l ? {
230
+ if (i === "[" || i === "<" || i === "(" ? (n = !0, r.push(i), i == "[" && (t = !0), s == 0 && (s = l)) : (i === "]" && r[r.length - 1] === "[" || i === ">" && r[r.length - 1] === "<" || i === ")" && r[r.length - 1] === "(") && r.pop(), n && r.length === 0)
231
+ return t && s + 1 == l ? {
230
232
  top: "Array",
231
- type: e.substring(0, n)
233
+ type: e.substring(0, s)
232
234
  } : {
233
- top: e.substring(0, n),
234
- type: e.substring(n + 1, l)
235
+ top: e.substring(0, s),
236
+ type: e.substring(s + 1, l)
235
237
  };
236
238
  }
237
239
  return {
238
240
  top: e,
239
241
  type: ""
240
242
  };
241
- }, y = (e, r) => {
242
- let t = [], s = [], n = "";
243
+ }, E = (e, r) => {
244
+ let t = [], n = [], s = "";
243
245
  for (let l = 0; l < e.length; l++) {
244
246
  const i = e[l];
245
- i === "[" || i === "<" || i === "(" ? (t.push(i), n += i) : i === "]" && t.length > 0 && t[t.length - 1] === "[" || i === ">" && t.length > 0 && t[t.length - 1] === "<" || i === ")" && t.length > 0 && t[t.length - 1] === "(" ? (t.pop(), n += i) : i === r && t.length === 0 ? (s.push(n.trim()), n = "") : n += i;
247
+ i === "[" || i === "<" || i === "(" ? (t.push(i), s += i) : i === "]" && t.length > 0 && t[t.length - 1] === "[" || i === ">" && t.length > 0 && t[t.length - 1] === "<" || i === ")" && t.length > 0 && t[t.length - 1] === "(" ? (t.pop(), s += i) : i === r && t.length === 0 ? (n.push(s.trim()), s = "") : s += i;
246
248
  }
247
- return n.trim() !== "" && s.push(n.trim()), s;
249
+ return s.trim() !== "" && n.push(s.trim()), n;
248
250
  };
249
251
  function _(e) {
250
252
  let r = "";
@@ -258,60 +260,60 @@ const k = (e) => {
258
260
  if (e)
259
261
  if (e.startsWith("[") && e.endsWith("]") || e.startsWith("(") && e.endsWith(")")) {
260
262
  const r = e.slice(1, -1).trim();
261
- return r ? y(r, ",") : ["any"];
263
+ return r ? E(r, ",") : ["any"];
262
264
  } else {
263
265
  if (e.startsWith("{") && e.endsWith("}"))
264
266
  return ["Object"];
265
267
  if (e.startsWith("<") && e.endsWith(">")) {
266
268
  const r = e.slice(1, -1).trim();
267
- return r ? y(r, "|") : ["any"];
269
+ return r ? E(r, "|") : ["any"];
268
270
  } else
269
- return y(e, ",");
271
+ return E(e, ",");
270
272
  }
271
273
  else return ["any"];
272
274
  };
273
- function O(e) {
275
+ function S(e) {
274
276
  const r = [];
275
277
  return e.forEach((t) => {
276
- const s = P(t);
277
- if (s.type) {
278
- const n = k(s.type), l = O(n);
278
+ const n = P(t);
279
+ if (n.type) {
280
+ const s = k(n.type), l = S(s);
279
281
  r.push({
280
282
  label: t,
281
- value: s.top,
283
+ value: n.top,
282
284
  children: l
283
285
  });
284
286
  } else
285
- r.push(s.top);
287
+ r.push(n.top);
286
288
  }), r;
287
289
  }
288
290
  function Q(e) {
289
- return y(e, ",").map((t) => {
290
- const s = t.trim(), n = t.match(/^([^:?]+)(\??):/);
291
- if (!n) return null;
292
- const l = n[1].trim(), i = !n[2], u = n[0].length, o = t.substring(u).trim();
293
- let a = [], d = "", h = "";
294
- for (let g = 0; g < o.length; g++) {
295
- const c = o[g];
291
+ return E(e, ",").map((t) => {
292
+ const n = t.trim(), s = t.match(/^([^:?]+)(\??):/);
293
+ if (!s) return null;
294
+ const l = s[1].trim(), i = !s[2], o = s[0].length, u = t.substring(o).trim();
295
+ let a = [], m = "", d = "";
296
+ for (let g = 0; g < u.length; g++) {
297
+ const c = u[g];
296
298
  if (c === "[" || c === "<" || c === "(" || c === "{" ? a.push(c) : (c === "]" && a[a.length - 1] === "[" || c === ">" && a[a.length - 1] === "<" || c === "}" && a[a.length - 1] === "{" || c === ")" && a[a.length - 1] === "(") && a.pop(), a.length === 0 && g > 0) {
297
- g == 1 && c !== "]" && c !== ">" && c !== "}" && c !== ")" ? (d = "", h = o.substring(0)) : (d = o.substring(0, g + 1).trim(), h = o.substring(g + 1));
299
+ g == 1 && c !== "]" && c !== ">" && c !== "}" && c !== ")" ? (m = "", d = u.substring(0)) : (m = u.substring(0, g + 1).trim(), d = u.substring(g + 1));
298
300
  break;
299
301
  }
300
302
  }
301
- const S = k(d), E = O(S);
303
+ const x = k(m), f = S(x);
302
304
  return {
303
305
  name: l,
304
306
  prop: l,
305
- type: C(E),
306
- dataType: E,
307
+ type: C(f),
308
+ dataType: f,
307
309
  must: i,
308
- label: s,
309
- description: h
310
+ label: n,
311
+ description: d
310
312
  };
311
313
  }).filter(Boolean);
312
314
  }
313
315
  export {
314
- O as getDataType,
316
+ S as getDataType,
315
317
  C as getDataTypeType,
316
318
  K as getNotesText,
317
319
  z as getTextNotes,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fangzhongya/vue-archive",
3
3
  "private": false,
4
- "version": "0.1.9",
4
+ "version": "0.1.11",
5
5
  "type": "module",
6
6
  "description ": "vue 组件注释生成文档",
7
7
  "author": "fangzhongya ",
@@ -23,37 +23,37 @@
23
23
  "@codemirror/lang-html": "^6.4.11",
24
24
  "@codemirror/lang-javascript": "^6.2.4",
25
25
  "@codemirror/lang-json": "^6.0.2",
26
- "@codemirror/state": "^6.5.3",
27
- "@codemirror/view": "^6.39.9",
26
+ "@codemirror/state": "^6.5.4",
27
+ "@codemirror/view": "^6.39.11",
28
28
  "@fangzhongya/create": "0.2.50",
29
- "@fangzhongya/utils": "0.0.73",
30
- "@fangzhongya/vue-components": "0.1.20",
29
+ "@fangzhongya/utils": "0.0.75",
30
+ "@fangzhongya/vue-components": "0.1.29",
31
31
  "@highlightjs/vue-plugin": "^2.1.0",
32
- "@types/node": "^25.0.3",
32
+ "@types/node": "^25.0.9",
33
33
  "@vitejs/plugin-vue": "^6.0.3",
34
- "@vue/compiler-dom": "3.5.26",
35
- "@vue/compiler-sfc": "3.5.26",
36
- "@vue/runtime-dom": "3.5.26",
37
- "@vue/server-renderer": "3.5.26",
34
+ "@vue/compiler-dom": "3.5.27",
35
+ "@vue/compiler-sfc": "3.5.27",
36
+ "@vue/runtime-dom": "3.5.27",
37
+ "@vue/server-renderer": "3.5.27",
38
38
  "codemirror": "^6.0.2",
39
39
  "fast-glob": "^3.3.3",
40
40
  "sass": "^1.97.2",
41
41
  "ts-node": "^10.9.2",
42
42
  "tsup": "^8.5.1",
43
43
  "typescript": "^5.9.3",
44
- "unplugin-vue-components": "^30.0.0",
44
+ "unplugin-vue-components": "^31.0.0",
45
45
  "vite": "^7.3.1",
46
46
  "vite-plugin-dts": "4.5.4",
47
- "vitest": "^4.0.16",
47
+ "vitest": "^4.0.17",
48
48
  "vue-tsc": "^3.2.2"
49
49
  },
50
50
  "dependencies": {
51
- "comment-parser": "^1.4.1",
51
+ "comment-parser": "^1.4.4",
52
52
  "highlight.js": "^11.11.1",
53
53
  "markdown-it": "^14.1.0",
54
54
  "monaco-editor": "^0.55.1",
55
- "prettier": "^3.7.4",
56
- "vue": "^3.5.26",
55
+ "prettier": "^3.8.0",
56
+ "vue": "^3.5.27",
57
57
  "vue-router": "^4.6.4"
58
58
  },
59
59
  "types": "./dist/packages/index.d.ts",