@fangzhongya/vue-archive 0.0.67 → 0.0.68

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.
@@ -1244,26 +1244,26 @@ function getComponentsArr(urls, v, comRaw, com) {
1244
1244
  let zv = v.dir.substring(0, v.dir.indexOf(dk)) + key.substring(z);
1245
1245
  const reg = new RegExp("^" + v.dir);
1246
1246
  let k = zv.replace(reg, "");
1247
- if (v.comprops && isComprops("/" + k, v.comprops) || v.curprops && isCurprops("/" + k, v.curprops)) {
1248
- let value = {};
1249
- value.url = zv;
1250
- value.comprops = v.comprops;
1251
- value.curprops = v.curprops;
1252
- value.value = k;
1253
- value.dir = v.dir;
1254
- value.cwd = v.cwd;
1255
- value.suffix = getSuffix2(key);
1256
- value.tdir = tdir;
1257
- value.key = key;
1258
- value.raw = "";
1259
- value.getRaw = getRawValue(comRaw, key);
1260
- props2.push(value);
1247
+ let value = getUrlName(k, v, urls, key, tdir);
1248
+ if (value) {
1249
+ value.component = com[value.key];
1250
+ value.getRaw = getRawValue(comRaw, value.key);
1251
+ arr.push(value);
1261
1252
  } else {
1262
- let value = getUrlName(k, v, urls, key, tdir);
1263
- if (value) {
1264
- value.component = com[value.key];
1265
- value.getRaw = getRawValue(comRaw, value.key);
1266
- arr.push(value);
1253
+ if (v.comprops && isComprops("/" + k, v.comprops) || v.curprops && isCurprops("/" + k, v.curprops)) {
1254
+ let value2 = {};
1255
+ value2.url = zv;
1256
+ value2.comprops = v.comprops;
1257
+ value2.curprops = v.curprops;
1258
+ value2.value = k;
1259
+ value2.dir = v.dir;
1260
+ value2.cwd = v.cwd;
1261
+ value2.suffix = getSuffix2(key);
1262
+ value2.tdir = tdir;
1263
+ value2.key = key;
1264
+ value2.raw = "";
1265
+ value2.getRaw = getRawValue(comRaw, key);
1266
+ props2.push(value2);
1267
1267
  }
1268
1268
  }
1269
1269
  });
@@ -1229,26 +1229,26 @@ function getComponentsArr(urls, v, comRaw, com) {
1229
1229
  let zv = v.dir.substring(0, v.dir.indexOf(dk)) + key.substring(z);
1230
1230
  const reg = new RegExp("^" + v.dir);
1231
1231
  let k = zv.replace(reg, "");
1232
- if (v.comprops && isComprops("/" + k, v.comprops) || v.curprops && isCurprops("/" + k, v.curprops)) {
1233
- let value = {};
1234
- value.url = zv;
1235
- value.comprops = v.comprops;
1236
- value.curprops = v.curprops;
1237
- value.value = k;
1238
- value.dir = v.dir;
1239
- value.cwd = v.cwd;
1240
- value.suffix = getSuffix2(key);
1241
- value.tdir = tdir;
1242
- value.key = key;
1243
- value.raw = "";
1244
- value.getRaw = getRawValue(comRaw, key);
1245
- props2.push(value);
1232
+ let value = getUrlName(k, v, urls, key, tdir);
1233
+ if (value) {
1234
+ value.component = com[value.key];
1235
+ value.getRaw = getRawValue(comRaw, value.key);
1236
+ arr.push(value);
1246
1237
  } else {
1247
- let value = getUrlName(k, v, urls, key, tdir);
1248
- if (value) {
1249
- value.component = com[value.key];
1250
- value.getRaw = getRawValue(comRaw, value.key);
1251
- arr.push(value);
1238
+ if (v.comprops && isComprops("/" + k, v.comprops) || v.curprops && isCurprops("/" + k, v.curprops)) {
1239
+ let value2 = {};
1240
+ value2.url = zv;
1241
+ value2.comprops = v.comprops;
1242
+ value2.curprops = v.curprops;
1243
+ value2.value = k;
1244
+ value2.dir = v.dir;
1245
+ value2.cwd = v.cwd;
1246
+ value2.suffix = getSuffix2(key);
1247
+ value2.tdir = tdir;
1248
+ value2.key = key;
1249
+ value2.raw = "";
1250
+ value2.getRaw = getRawValue(comRaw, key);
1251
+ props2.push(value2);
1252
1252
  }
1253
1253
  }
1254
1254
  });
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("./storage.cjs");require("@fangzhongya/utils/basic/object/mergeObject");require("@fangzhongya/utils/basic/array/toggleArray");const C=require("@fangzhongya/utils/name/humpToLine"),N=require("@fangzhongya/utils/name/lineToLargeHump");require("@fangzhongya/utils/basic/string/appearNum");require("@fangzhongya/utils/basic/string/firstLower");require("@fangzhongya/utils/basic/array/duplicateRemoval");require("@fangzhongya/utils/basic/array/asyncMergeArray");require("@fangzhongya/utils/basic/string/firstUpper");const S=require("@fangzhongya/utils/urls/getSuffix");require("@fangzhongya/utils/basic/array/replaceAfter");const x=require("@fangzhongya/utils/judge/matchsStart"),g=require("@fangzhongya/utils/judge/matchsEnd"),R=["vue","js","ts"];function $(t){let e=C.humpToLine(t.name),r=[];return t.alias&&r.push(t.alias+"-"+e),r}function O(t,e,r){const s=x.matchsStart(t,e);return s&&r&&r.length>0?!x.matchsStart(t,r):s}function T(t,e,r){const s=g.matchsEnd(t,e);return s&&r&&r.length>0?!g.matchsEnd(t,r):s}function U(t,e,r){e.lastIndex=0;const s=e.exec(t);if(!s)return!1;const i=s.index;return t.substring(0,i).endsWith(r)}function v(t,e){e.lastIndex=0;const r=e.exec(t);if(!r)return"";const s=r.index;return t.substring(0,s)}function z(t){const e=r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`${e(t)}$`)}function d(t,e){if(e&&e.length>0)for(const r of e)if(typeof r=="string"){if(t.endsWith(r)){const s=t.replace(z(r),"");if(s){const i=new RegExp("^.*/([^/]+)$");let n=s.match(i);if(n)return n[1]}}}else{const s=v(t,r);if(s){const i=new RegExp("^.*/([^/]+)$");let n=s.match(i);if(n)return n[1]}}return""}function p(t,e,r){const s=e.dir.replace(/^\.\/|((\.\.\/)+)/,"/");let i=t.indexOf(s),n=e.dir.substring(0,e.dir.indexOf(s))+t.substring(i),c="";if(e.getNameValue)c=e.getNameValue(t,e);else{const a=e.matchextss;a?c=d(t,[a]):c=d(t,e.matchexts)}if(c){let a={suffix:S.getSuffix(t),name:N.lineToLargeHump(c),value:c,adir:"",alias:e.alias,aliasNames:[],raw:"",getRaw:null,mds:[],tests:void 0,url:n,comprops:e.comprops,curprops:e.curprops,dir:e.dir,cwd:e.cwd,tdir:r,key:t};return a.aliasNames=$(a),a}}function I(t,e,r){for(const s of e){const i="/"+s;if(r&&r.length>0){for(const n of r)if(typeof n=="string"){if(t.endsWith(i+n))return!0}else if(U(t,n,i))return!0}else if(t.includes(s))return!0}return!1}function q(t,e,r,s){const i=[],n=s.matchextss;return n&&i.push(n),t.filter(c=>I(c,[e],i))[0]||""}function w(t,e,r,s,i){if(O(t,e.matchs,e.nomatchs)){let n=!1;if(e.isMatch?n=e.isMatch(t,"",[],e):n=T(t,e.matchexts,e.nomatchexts),n){const c=e.getMatchs,a=d(s,e.matchexts);if(c){const o=c(r,a,"component",e);return p(o,e,i)}else if(e.matchextss){const l=q([s],a,"component",e)||q(r,a,"component",e);if(l)return p(l,e,i)}else return p(s,e,i)}}}function K(t){M.setSession("aside.key",t)}function L(){return M.getSession("aside.key")}function V(t){let e=t.match(/\/([^\/]+)\/$/);return e&&e.length>1?e[1]:""}function E(t,e){if(e)for(let r=0;r<e.length;r++){const s=e[r];if(typeof s=="string"){if(t.includes(s))return!0}else if(s.test(t))return!0}return!1}function b(t,e){if(e)for(let r=0;r<e.length;r++){const s=e[r];if(typeof s=="string"){if(t.endsWith(s))return!0}else if(s.test(t))return!0}return!1}function W(t,e,r,s){const i=[],n=[],c=V(e.dir);return t.forEach(a=>{const o=e.dir.replace(/^\.\/|((\.\.\/)+)/,"/");let l=a.indexOf(o),h=e.dir.substring(0,e.dir.indexOf(o))+a.substring(l);const A=new RegExp("^"+e.dir);let f=h.replace(A,"");if(e.comprops&&E("/"+f,e.comprops)||e.curprops&&b("/"+f,e.curprops)){let u={};u.url=h,u.comprops=e.comprops,u.curprops=e.curprops,u.value=f,u.dir=e.dir,u.cwd=e.cwd,u.suffix=S.getSuffix(a),u.tdir=c,u.key=a,u.raw="",u.getRaw=m(r,a),i.push(u)}else{let u=w(f,e,t,a,c);u&&(u.component=s[u.key],u.getRaw=m(r,u.key),n.push(u))}}),{props:i,components:n}}function m(t,e){return typeof t=="function"?t:t?t[e]:null}exports.defaultExtensions=R;exports.getAsideKey=L;exports.getComponentsArr=W;exports.getRawValue=m;exports.getUrlName=w;exports.isComprops=E;exports.isCurprops=b;exports.setAsideKey=K;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("./storage.cjs");require("@fangzhongya/utils/basic/object/mergeObject");require("@fangzhongya/utils/basic/array/toggleArray");const N=require("@fangzhongya/utils/name/humpToLine"),R=require("@fangzhongya/utils/name/lineToLargeHump");require("@fangzhongya/utils/basic/string/appearNum");require("@fangzhongya/utils/basic/string/firstLower");require("@fangzhongya/utils/basic/array/duplicateRemoval");require("@fangzhongya/utils/basic/array/asyncMergeArray");require("@fangzhongya/utils/basic/string/firstUpper");const w=require("@fangzhongya/utils/urls/getSuffix");require("@fangzhongya/utils/basic/array/replaceAfter");const g=require("@fangzhongya/utils/judge/matchsStart"),q=require("@fangzhongya/utils/judge/matchsEnd"),$=["vue","js","ts"];function O(t){let e=N.humpToLine(t.name),r=[];return t.alias&&r.push(t.alias+"-"+e),r}function T(t,e,r){const s=g.matchsStart(t,e);return s&&r&&r.length>0?!g.matchsStart(t,r):s}function U(t,e,r){const s=q.matchsEnd(t,e);return s&&r&&r.length>0?!q.matchsEnd(t,r):s}function v(t,e,r){e.lastIndex=0;const s=e.exec(t);if(!s)return!1;const i=s.index;return t.substring(0,i).endsWith(r)}function z(t,e){e.lastIndex=0;const r=e.exec(t);if(!r)return"";const s=r.index;return t.substring(0,s)}function I(t){const e=r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`${e(t)}$`)}function m(t,e){if(e&&e.length>0)for(const r of e)if(typeof r=="string"){if(t.endsWith(r)){const s=t.replace(I(r),"");if(s){const i=new RegExp("^.*/([^/]+)$");let n=s.match(i);if(n)return n[1]}}}else{const s=z(t,r);if(s){const i=new RegExp("^.*/([^/]+)$");let n=s.match(i);if(n)return n[1]}}return""}function d(t,e,r){const s=e.dir.replace(/^\.\/|((\.\.\/)+)/,"/");let i=t.indexOf(s),n=e.dir.substring(0,e.dir.indexOf(s))+t.substring(i),a="";if(e.getNameValue)a=e.getNameValue(t,e);else{const u=e.matchextss;u?a=m(t,[u]):a=m(t,e.matchexts)}if(a){let u={suffix:w.getSuffix(t),name:R.lineToLargeHump(a),value:a,adir:"",alias:e.alias,aliasNames:[],raw:"",getRaw:null,mds:[],tests:void 0,url:n,comprops:e.comprops,curprops:e.curprops,dir:e.dir,cwd:e.cwd,tdir:r,key:t};return u.aliasNames=O(u),u}}function K(t,e,r){for(const s of e){const i="/"+s;if(r&&r.length>0){for(const n of r)if(typeof n=="string"){if(t.endsWith(i+n))return!0}else if(v(t,n,i))return!0}else if(t.includes(s))return!0}return!1}function M(t,e,r,s){const i=[],n=s.matchextss;return n&&i.push(n),t.filter(a=>K(a,[e],i))[0]||""}function E(t,e,r,s,i){if(T(t,e.matchs,e.nomatchs)){let n=!1;if(e.isMatch?n=e.isMatch(t,"",[],e):n=U(t,e.matchexts,e.nomatchexts),n){const a=e.getMatchs,u=m(s,e.matchexts);if(a){const l=a(r,u,"component",e);return d(l,e,i)}else if(e.matchextss){const f=M([s],u,"component",e)||M(r,u,"component",e);if(f)return d(f,e,i)}else return d(s,e,i)}}}function L(t){S.setSession("aside.key",t)}function V(){return S.getSession("aside.key")}function W(t){let e=t.match(/\/([^\/]+)\/$/);return e&&e.length>1?e[1]:""}function b(t,e){if(e)for(let r=0;r<e.length;r++){const s=e[r];if(typeof s=="string"){if(t.includes(s))return!0}else if(s.test(t))return!0}return!1}function A(t,e){if(e)for(let r=0;r<e.length;r++){const s=e[r];if(typeof s=="string"){if(t.endsWith(s))return!0}else if(s.test(t))return!0}return!1}function D(t,e,r,s){const i=[],n=[],a=W(e.dir);return t.forEach(u=>{const l=e.dir.replace(/^\.\/|((\.\.\/)+)/,"/");let f=u.indexOf(l),x=e.dir.substring(0,e.dir.indexOf(l))+u.substring(f);const C=new RegExp("^"+e.dir);let p=x.replace(C,""),o=E(p,e,t,u,a);if(o)o.component=s[o.key],o.getRaw=h(r,o.key),n.push(o);else if(e.comprops&&b("/"+p,e.comprops)||e.curprops&&A("/"+p,e.curprops)){let c={};c.url=x,c.comprops=e.comprops,c.curprops=e.curprops,c.value=p,c.dir=e.dir,c.cwd=e.cwd,c.suffix=w.getSuffix(u),c.tdir=a,c.key=u,c.raw="",c.getRaw=h(r,u),i.push(c)}}),{props:i,components:n}}function h(t,e){return typeof t=="function"?t:t?t[e]:null}exports.defaultExtensions=$;exports.getAsideKey=V;exports.getComponentsArr=D;exports.getRawValue=h;exports.getUrlName=E;exports.isComprops=b;exports.isCurprops=A;exports.setAsideKey=L;
@@ -1,54 +1,54 @@
1
- import { getSession as E, setSession as S } from "./storage.js";
1
+ import { getSession as S, setSession as $ } from "./storage.js";
2
2
  import "@fangzhongya/utils/basic/object/mergeObject";
3
3
  import "@fangzhongya/utils/basic/array/toggleArray";
4
- import { humpToLine as $ } from "@fangzhongya/utils/name/humpToLine";
5
- import { lineToLargeHump as N } from "@fangzhongya/utils/name/lineToLargeHump";
4
+ import { humpToLine as N } from "@fangzhongya/utils/name/humpToLine";
5
+ import { lineToLargeHump as R } from "@fangzhongya/utils/name/lineToLargeHump";
6
6
  import "@fangzhongya/utils/basic/string/appearNum";
7
7
  import "@fangzhongya/utils/basic/string/firstLower";
8
8
  import "@fangzhongya/utils/basic/array/duplicateRemoval";
9
9
  import "@fangzhongya/utils/basic/array/asyncMergeArray";
10
10
  import "@fangzhongya/utils/basic/string/firstUpper";
11
- import { getSuffix as w } from "@fangzhongya/utils/urls/getSuffix";
11
+ import { getSuffix as b } from "@fangzhongya/utils/urls/getSuffix";
12
12
  import "@fangzhongya/utils/basic/array/replaceAfter";
13
- import { matchsStart as h } from "@fangzhongya/utils/judge/matchsStart";
14
- import { matchsEnd as x } from "@fangzhongya/utils/judge/matchsEnd";
15
- const Y = ["vue", "js", "ts"];
16
- function R(t) {
17
- let e = $(t.name), r = [];
13
+ import { matchsStart as x } from "@fangzhongya/utils/judge/matchsStart";
14
+ import { matchsEnd as g } from "@fangzhongya/utils/judge/matchsEnd";
15
+ const Z = ["vue", "js", "ts"];
16
+ function O(t) {
17
+ let e = N(t.name), r = [];
18
18
  return t.alias && r.push(t.alias + "-" + e), r;
19
19
  }
20
- function O(t, e, r) {
21
- const s = h(t, e);
22
- return s && r && r.length > 0 ? !h(t, r) : s;
23
- }
24
20
  function U(t, e, r) {
25
21
  const s = x(t, e);
26
22
  return s && r && r.length > 0 ? !x(t, r) : s;
27
23
  }
28
24
  function v(t, e, r) {
25
+ const s = g(t, e);
26
+ return s && r && r.length > 0 ? !g(t, r) : s;
27
+ }
28
+ function z(t, e, r) {
29
29
  e.lastIndex = 0;
30
30
  const s = e.exec(t);
31
31
  if (!s) return !1;
32
32
  const i = s.index;
33
33
  return t.substring(0, i).endsWith(r);
34
34
  }
35
- function z(t, e) {
35
+ function A(t, e) {
36
36
  e.lastIndex = 0;
37
37
  const r = e.exec(t);
38
38
  if (!r) return "";
39
39
  const s = r.index;
40
40
  return t.substring(0, s);
41
41
  }
42
- function A(t) {
42
+ function C(t) {
43
43
  const e = (r) => r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
44
44
  return new RegExp(`${e(t)}$`);
45
45
  }
46
- function m(t, e) {
46
+ function d(t, e) {
47
47
  if (e && e.length > 0)
48
48
  for (const r of e)
49
49
  if (typeof r == "string") {
50
50
  if (t.endsWith(r)) {
51
- const s = t.replace(A(r), "");
51
+ const s = t.replace(C(r), "");
52
52
  if (s) {
53
53
  const i = new RegExp("^.*/([^/]+)$");
54
54
  let n = s.match(i);
@@ -57,7 +57,7 @@ function m(t, e) {
57
57
  }
58
58
  }
59
59
  } else {
60
- const s = z(t, r);
60
+ const s = A(t, r);
61
61
  if (s) {
62
62
  const i = new RegExp("^.*/([^/]+)$");
63
63
  let n = s.match(i);
@@ -67,20 +67,20 @@ function m(t, e) {
67
67
  }
68
68
  return "";
69
69
  }
70
- function p(t, e, r) {
70
+ function m(t, e, r) {
71
71
  const s = e.dir.replace(/^\.\/|((\.\.\/)+)/, "/");
72
- let i = t.indexOf(s), n = e.dir.substring(0, e.dir.indexOf(s)) + t.substring(i), a = "";
72
+ let i = t.indexOf(s), n = e.dir.substring(0, e.dir.indexOf(s)) + t.substring(i), o = "";
73
73
  if (e.getNameValue)
74
- a = e.getNameValue(t, e);
74
+ o = e.getNameValue(t, e);
75
75
  else {
76
- const o = e.matchextss;
77
- o ? a = m(t, [o]) : a = m(t, e.matchexts);
76
+ const u = e.matchextss;
77
+ u ? o = d(t, [u]) : o = d(t, e.matchexts);
78
78
  }
79
- if (a) {
80
- let o = {
81
- suffix: w(t),
82
- name: N(a),
83
- value: a,
79
+ if (o) {
80
+ let u = {
81
+ suffix: b(t),
82
+ name: R(o),
83
+ value: o,
84
84
  adir: "",
85
85
  alias: e.alias,
86
86
  aliasNames: [],
@@ -96,10 +96,10 @@ function p(t, e, r) {
96
96
  tdir: r,
97
97
  key: t
98
98
  };
99
- return o.aliasNames = R(o), o;
99
+ return u.aliasNames = O(u), u;
100
100
  }
101
101
  }
102
- function C(t, e, r) {
102
+ function I(t, e, r) {
103
103
  for (const s of e) {
104
104
  const i = "/" + s;
105
105
  if (r && r.length > 0) {
@@ -107,45 +107,45 @@ function C(t, e, r) {
107
107
  if (typeof n == "string") {
108
108
  if (t.endsWith(i + n))
109
109
  return !0;
110
- } else if (v(t, n, i))
110
+ } else if (z(t, n, i))
111
111
  return !0;
112
112
  } else if (t.includes(s))
113
113
  return !0;
114
114
  }
115
115
  return !1;
116
116
  }
117
- function g(t, e, r, s) {
117
+ function M(t, e, r, s) {
118
118
  const i = [], n = s.matchextss;
119
- return n && i.push(n), t.filter((a) => C(a, [e], i))[0] || "";
119
+ return n && i.push(n), t.filter((o) => I(o, [e], i))[0] || "";
120
120
  }
121
- function I(t, e, r, s, i) {
122
- if (O(t, e.matchs, e.nomatchs)) {
121
+ function W(t, e, r, s, i) {
122
+ if (U(t, e.matchs, e.nomatchs)) {
123
123
  let n = !1;
124
- if (e.isMatch ? n = e.isMatch(t, "", [], e) : n = U(t, e.matchexts, e.nomatchexts), n) {
125
- const a = e.getMatchs, o = m(s, e.matchexts);
126
- if (a) {
127
- const l = a(r, o, "component", e);
128
- return p(l, e, i);
124
+ if (e.isMatch ? n = e.isMatch(t, "", [], e) : n = v(t, e.matchexts, e.nomatchexts), n) {
125
+ const o = e.getMatchs, u = d(s, e.matchexts);
126
+ if (o) {
127
+ const f = o(r, u, "component", e);
128
+ return m(f, e, i);
129
129
  } else if (e.matchextss) {
130
- const f = g([s], o, "component", e) || g(r, o, "component", e);
131
- if (f)
132
- return p(f, e, i);
130
+ const c = M([s], u, "component", e) || M(r, u, "component", e);
131
+ if (c)
132
+ return m(c, e, i);
133
133
  } else
134
- return p(s, e, i);
134
+ return m(s, e, i);
135
135
  }
136
136
  }
137
137
  }
138
- function Z(t) {
139
- S("aside.key", t);
138
+ function y(t) {
139
+ $("aside.key", t);
140
140
  }
141
- function y() {
142
- return E("aside.key");
141
+ function k() {
142
+ return S("aside.key");
143
143
  }
144
- function W(t) {
144
+ function D(t) {
145
145
  let e = t.match(/\/([^\/]+)\/$/);
146
146
  return e && e.length > 1 ? e[1] : "";
147
147
  }
148
- function D(t, e) {
148
+ function T(t, e) {
149
149
  if (e)
150
150
  for (let r = 0; r < e.length; r++) {
151
151
  const s = e[r];
@@ -157,7 +157,7 @@ function D(t, e) {
157
157
  }
158
158
  return !1;
159
159
  }
160
- function T(t, e) {
160
+ function V(t, e) {
161
161
  if (e)
162
162
  for (let r = 0; r < e.length; r++) {
163
163
  const s = e[r];
@@ -169,35 +169,34 @@ function T(t, e) {
169
169
  }
170
170
  return !1;
171
171
  }
172
- function k(t, e, r, s) {
173
- const i = [], n = [], a = W(e.dir);
174
- return t.forEach((o) => {
175
- const l = e.dir.replace(/^\.\/|((\.\.\/)+)/, "/");
176
- let f = o.indexOf(l), d = e.dir.substring(0, e.dir.indexOf(l)) + o.substring(f);
177
- const b = new RegExp("^" + e.dir);
178
- let c = d.replace(b, "");
179
- if (e.comprops && D("/" + c, e.comprops) || e.curprops && T("/" + c, e.curprops)) {
180
- let u = {};
181
- u.url = d, u.comprops = e.comprops, u.curprops = e.curprops, u.value = c, u.dir = e.dir, u.cwd = e.cwd, u.suffix = w(o), u.tdir = a, u.key = o, u.raw = "", u.getRaw = M(r, o), i.push(u);
182
- } else {
183
- let u = I(c, e, t, o, a);
184
- u && (u.component = s[u.key], u.getRaw = M(r, u.key), n.push(u));
172
+ function ee(t, e, r, s) {
173
+ const i = [], n = [], o = D(e.dir);
174
+ return t.forEach((u) => {
175
+ const f = e.dir.replace(/^\.\/|((\.\.\/)+)/, "/");
176
+ let c = u.indexOf(f), h = e.dir.substring(0, e.dir.indexOf(f)) + u.substring(c);
177
+ const E = new RegExp("^" + e.dir);
178
+ let p = h.replace(E, ""), l = W(p, e, t, u, o);
179
+ if (l)
180
+ l.component = s[l.key], l.getRaw = w(r, l.key), n.push(l);
181
+ else if (e.comprops && T("/" + p, e.comprops) || e.curprops && V("/" + p, e.curprops)) {
182
+ let a = {};
183
+ a.url = h, a.comprops = e.comprops, a.curprops = e.curprops, a.value = p, a.dir = e.dir, a.cwd = e.cwd, a.suffix = b(u), a.tdir = o, a.key = u, a.raw = "", a.getRaw = w(r, u), i.push(a);
185
184
  }
186
185
  }), {
187
186
  props: i,
188
187
  components: n
189
188
  };
190
189
  }
191
- function M(t, e) {
190
+ function w(t, e) {
192
191
  return typeof t == "function" ? t : t ? t[e] : null;
193
192
  }
194
193
  export {
195
- Y as defaultExtensions,
196
- y as getAsideKey,
197
- k as getComponentsArr,
198
- M as getRawValue,
199
- I as getUrlName,
200
- D as isComprops,
201
- T as isCurprops,
202
- Z as setAsideKey
194
+ Z as defaultExtensions,
195
+ k as getAsideKey,
196
+ ee as getComponentsArr,
197
+ w as getRawValue,
198
+ W as getUrlName,
199
+ T as isComprops,
200
+ V as isCurprops,
201
+ y as setAsideKey
203
202
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fangzhongya/vue-archive",
3
3
  "private": false,
4
- "version": "0.0.67",
4
+ "version": "0.0.68",
5
5
  "type": "module",
6
6
  "description ": "vue 组件注释生成文档",
7
7
  "author": "fangzhongya ",