@fangzhongya/vue-archive 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/README.md +3 -2
  2. package/dist/node/index.cjs +135 -71
  3. package/dist/node/index.d.cts +8 -0
  4. package/dist/node/index.d.ts +8 -0
  5. package/dist/node/index.js +118 -54
  6. package/dist/node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-LPMR5W6M.cjs +1 -0
  7. package/dist/node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-LPMR5W6M.js +9 -0
  8. package/dist/packages/components/aside/index.vue.cjs +1 -1
  9. package/dist/packages/components/aside/index.vue.js +43 -45
  10. package/dist/packages/components/boxurl/index.vue.cjs +1 -1
  11. package/dist/packages/components/boxurl/index.vue.js +34 -37
  12. package/dist/packages/components/choice/choice.vue.cjs +1 -1
  13. package/dist/packages/components/choice/choice.vue.js +29 -32
  14. package/dist/packages/components/choice/index.vue.cjs +1 -1
  15. package/dist/packages/components/choice/index.vue.js +39 -42
  16. package/dist/packages/components/code/highlight.vue2.cjs +1 -1
  17. package/dist/packages/components/code/highlight.vue2.js +1 -1
  18. package/dist/packages/components/code/index.vue.cjs +1 -1
  19. package/dist/packages/components/code/index.vue.js +79 -87
  20. package/dist/packages/components/compo/ftable.vue.cjs +1 -1
  21. package/dist/packages/components/compo/ftable.vue.js +15 -15
  22. package/dist/packages/components/compo/index.cjs +1 -1
  23. package/dist/packages/components/compo/index.js +86 -97
  24. package/dist/packages/components/compo/index.vue.cjs +1 -1
  25. package/dist/packages/components/compo/index.vue.js +33 -34
  26. package/dist/packages/components/compo/info.vue.cjs +1 -1
  27. package/dist/packages/components/compo/info.vue.js +22 -25
  28. package/dist/packages/components/compo/top.cjs +1 -1
  29. package/dist/packages/components/compo/top.js +21 -21
  30. package/dist/packages/components/main/index.vue.cjs +1 -1
  31. package/dist/packages/components/main/index.vue.js +16 -17
  32. package/dist/packages/components/md/index.vue.cjs +1 -1
  33. package/dist/packages/components/md/index.vue.js +28 -32
  34. package/dist/packages/components/test/index.cjs +1 -1
  35. package/dist/packages/components/test/index.js +39 -42
  36. package/dist/packages/components/test/index.vue.cjs +1 -1
  37. package/dist/packages/components/test/index.vue.js +44 -49
  38. package/dist/packages/components/use/code.cjs +1 -1
  39. package/dist/packages/components/use/code.js +3 -3
  40. package/dist/packages/components/use/index.cjs +1 -1
  41. package/dist/packages/components/use/index.js +1 -1
  42. package/dist/packages/components/use/retrie/choice/index.vue.cjs +1 -1
  43. package/dist/packages/components/use/retrie/choice/index.vue.js +32 -34
  44. package/dist/packages/components/use/retrie/expose/index.vue.cjs +1 -1
  45. package/dist/packages/components/use/retrie/expose/index.vue.js +18 -19
  46. package/dist/packages/components/use/retrie/form/index.vue.cjs +1 -1
  47. package/dist/packages/components/use/retrie/form/index.vue.js +110 -114
  48. package/dist/packages/components/use/retrie/function/index.vue.cjs +2 -2
  49. package/dist/packages/components/use/retrie/function/index.vue.js +1 -4
  50. package/dist/packages/components/use/retrie/input/index.vue.cjs +1 -1
  51. package/dist/packages/components/use/retrie/input/index.vue.js +20 -21
  52. package/dist/packages/components/use/retrie/number/index.vue.cjs +1 -1
  53. package/dist/packages/components/use/retrie/number/index.vue.js +12 -13
  54. package/dist/packages/components/use/retrie/select/index.vue.cjs +1 -1
  55. package/dist/packages/components/use/retrie/select/index.vue.js +21 -23
  56. package/dist/packages/components/use/retrie/slot/index.vue.cjs +1 -1
  57. package/dist/packages/components/use/retrie/slot/index.vue.js +15 -16
  58. package/dist/packages/components/use/retrie/string/index.vue.cjs +1 -1
  59. package/dist/packages/components/use/retrie/string/index.vue.js +14 -15
  60. package/dist/packages/components/use/set-emit.vue.cjs +1 -1
  61. package/dist/packages/components/use/set-emit.vue.js +20 -24
  62. package/dist/packages/components/use/set-expose.vue.cjs +1 -1
  63. package/dist/packages/components/use/set-expose.vue.js +15 -18
  64. package/dist/packages/components/use/set-props.vue.cjs +1 -1
  65. package/dist/packages/components/use/set-props.vue.js +48 -49
  66. package/dist/packages/config.cjs +1 -1
  67. package/dist/packages/config.d.ts +8 -1
  68. package/dist/packages/config.js +1 -1
  69. package/dist/packages/directives/adjust/index copy.d.ts +6 -0
  70. package/dist/packages/directives/adjust/index.cjs +1 -1
  71. package/dist/packages/directives/adjust/index.js +96 -97
  72. package/dist/packages/page/comprops/index.vue2.cjs +1 -1
  73. package/dist/packages/page/comprops/index.vue2.js +65 -71
  74. package/dist/packages/page/index/index.vue2.cjs +1 -1
  75. package/dist/packages/page/index/index.vue2.js +19 -23
  76. package/dist/packages/page/single/index.vue2.cjs +1 -1
  77. package/dist/packages/page/single/index.vue2.js +46 -49
  78. package/dist/packages/router/index.cjs +1 -1
  79. package/dist/packages/router/index.js +44 -46
  80. package/dist/packages/utils/common.cjs +1 -1
  81. package/dist/packages/utils/common.d.ts +4 -0
  82. package/dist/packages/utils/common.js +57 -54
  83. package/dist/packages/utils/glob.cjs +3 -3
  84. package/dist/packages/utils/glob.d.ts +1 -1
  85. package/dist/packages/utils/glob.js +269 -227
  86. package/dist/packages/utils/props.cjs +1 -1
  87. package/dist/packages/utils/props.js +34 -28
  88. package/dist/src/components/common/cs3.d.ts +4 -0
  89. package/dist/src/components/common/index.d.ts +4 -0
  90. package/dist/src/components/cs/expose/index.d.ts +4 -1
  91. package/dist/src/components/cs/expose/src/index.vue.d.ts +4 -1
  92. package/dist/vue-archive.css +1 -1
  93. package/package.json +19 -20
  94. package/dist/node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.cjs +0 -1
  95. package/dist/node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js +0 -9
  96. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.cjs +0 -0
  97. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js +0 -0
  98. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-5RZYHE3X.cjs +0 -0
  99. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-5RZYHE3X.js +0 -0
  100. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-AM67P3W7.cjs +0 -0
  101. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-AM67P3W7.js +0 -0
  102. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-APKFW4LU.cjs +0 -0
  103. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-APKFW4LU.js +0 -0
  104. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.cjs +0 -0
  105. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js +0 -0
  106. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs +0 -0
  107. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js +0 -0
  108. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.cjs +0 -0
  109. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js +0 -0
  110. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.cjs +0 -0
  111. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js +0 -0
  112. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.cjs +0 -0
  113. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js +0 -0
  114. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-VBS6YE6H.cjs +0 -0
  115. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-VBS6YE6H.js +0 -0
  116. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-VKE5JARB.cjs +0 -0
  117. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-VKE5JARB.js +0 -0
  118. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.cjs +0 -0
  119. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js +0 -0
  120. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-XUL6LPTN.cjs +0 -0
  121. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-XUL6LPTN.js +0 -0
  122. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.cjs +0 -0
  123. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js +0 -0
  124. /package/dist/node_modules/.pnpm/{@highlightjs_vue-plugin@2.1_0b670f4f8863792fd47bf820772b9cbf → @highlightjs_vue-plugin@2.1_b586068ec461434c266304f56a34d01a}/node_modules/@highlightjs/vue-plugin/dist/highlightjs-vue.esm.min.cjs +0 -0
  125. /package/dist/node_modules/.pnpm/{@highlightjs_vue-plugin@2.1_0b670f4f8863792fd47bf820772b9cbf → @highlightjs_vue-plugin@2.1_b586068ec461434c266304f56a34d01a}/node_modules/@highlightjs/vue-plugin/dist/highlightjs-vue.esm.min.js +0 -0
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),g=require("../../components/compo/info.vue.cjs"),m=require("../../components/choice/index.vue.cjs"),N=require("../../components/test/index.vue.cjs"),y=require("../../components/compo/index.vue.cjs"),V=require("../../utils/glob.cjs"),f=require("vue-router"),h=require("../../router/index.cjs"),E={class:"__document-single"},q={class:"single-top-li"},k={class:"single-top-li-span"},x={class:"single-top-li-span"},S={class:"single-top-li"},w={class:"single-top-li-span"},C={class:"single-test"},D={class:"single-compo"},b=e.defineComponent({__name:"index",setup(B){const a=f.useRoute(),r=h.getPageParams(a),n=e.ref({}),s=e.ref(),o=e.ref(!1);function _(t){return t.comkey}function d(t){return(t.id||"").split("/")[0]||""}function v(){o.value=!o.value}function p(t){n.value=t,s.value=V.getTestNameObj(a.query.id+"",r.key,t.key)[0]}return(t,l)=>(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(m,{"get-name":d,"get-key":_,onChange:p},{default:e.withCtx(()=>{var i,u,c;return[e.createVNode(g,{value:n.value},null,8,["value"]),e.createElementVNode("div",{class:"single-top",onClick:v},[e.createElementVNode("div",q,[e.createElementVNode("div",k,e.toDisplayString((i=s.value)==null?void 0:i.name),1),e.createElementVNode("div",x,e.toDisplayString((u=s.value)==null?void 0:u.value),1)]),e.createElementVNode("div",S,[l[0]||(l[0]=e.createElementVNode("div",{class:"single-top-li-span"}," 文件路径 ",-1)),e.createElementVNode("div",w,e.toDisplayString((c=s.value)==null?void 0:c.key),1)])]),e.createElementVNode("div",C,[e.createVNode(N,{value:s.value},null,8,["value"])]),e.withDirectives(e.createElementVNode("div",D,[e.createVNode(y,{value:n.value},null,8,["value"])],512),[[e.vShow,o.value]])]}),_:1})]))}});module.exports=b;
1
+ "use strict";const e=require("vue"),d=require("../../components/compo/info.vue.cjs"),v=require("../../components/choice/index.vue.cjs"),p=require("../../components/test/index.vue.cjs"),g=require("../../components/compo/index.vue.cjs"),m=require("../../utils/glob.cjs"),N=require("vue-router"),y=require("../../router/index.cjs"),V={class:"__document-single"},f={class:"single-top-li"},h={class:"single-top-li-span"},E={class:"single-top-li-span"},q={class:"single-top-li"},k={class:"single-top-li-span"},x={class:"single-test"},S={class:"single-compo"},w=e.defineComponent({__name:"index",setup(C){const i=N.useRoute(),a=y.getPageParams(i),n=e.ref({}),s=e.ref(),o=e.ref(!1);function u(t){return t.comkey}function c(t){return(t.id||"").split("/")[0]||""}function r(){o.value=!o.value}function _(t){n.value=t,s.value=m.getTestNameObj(i.query.id+"",a.key,t.key)[0]}return(t,l)=>(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(v,{"get-name":c,"get-key":u,onChange:_},{default:e.withCtx(()=>[e.createVNode(d,{value:n.value},null,8,["value"]),e.createElementVNode("div",{class:"single-top",onClick:r},[e.createElementVNode("div",f,[e.createElementVNode("div",h,e.toDisplayString(s.value?.name),1),e.createElementVNode("div",E,e.toDisplayString(s.value?.value),1)]),e.createElementVNode("div",q,[l[0]||(l[0]=e.createElementVNode("div",{class:"single-top-li-span"}," 文件路径 ",-1)),e.createElementVNode("div",k,e.toDisplayString(s.value?.key),1)])]),e.createElementVNode("div",x,[e.createVNode(p,{value:s.value},null,8,["value"])]),e.withDirectives(e.createElementVNode("div",S,[e.createVNode(g,{value:n.value},null,8,["value"])],512),[[e.vShow,o.value]])]),_:1})]))}});module.exports=w;
@@ -1,69 +1,66 @@
1
- import { defineComponent as h, ref as c, createElementBlock as k, openBlock as y, createVNode as o, withCtx as w, createElementVNode as e, withDirectives as x, toDisplayString as r, vShow as C } from "vue";
2
- import N from "../../components/compo/info.vue.js";
3
- import $ from "../../components/choice/index.vue.js";
4
- import S from "../../components/test/index.vue.js";
5
- import B from "../../components/compo/index.vue.js";
6
- import { getTestNameObj as D } from "../../utils/glob.js";
7
- import { useRoute as E } from "vue-router";
8
- import { getPageParams as P } from "../../router/index.js";
9
- const V = { class: "__document-single" }, b = { class: "single-top-li" }, j = { class: "single-top-li-span" }, q = { class: "single-top-li-span" }, K = { class: "single-top-li" }, O = { class: "single-top-li-span" }, R = { class: "single-test" }, T = { class: "single-compo" }, Q = /* @__PURE__ */ h({
1
+ import { defineComponent as d, ref as a, createElementBlock as f, openBlock as g, createVNode as o, withCtx as h, createElementVNode as e, withDirectives as k, toDisplayString as c, vShow as y } from "vue";
2
+ import w from "../../components/compo/info.vue.js";
3
+ import x from "../../components/choice/index.vue.js";
4
+ import C from "../../components/test/index.vue.js";
5
+ import N from "../../components/compo/index.vue.js";
6
+ import { getTestNameObj as $ } from "../../utils/glob.js";
7
+ import { useRoute as S } from "vue-router";
8
+ import { getPageParams as B } from "../../router/index.js";
9
+ const D = { class: "__document-single" }, E = { class: "single-top-li" }, P = { class: "single-top-li-span" }, V = { class: "single-top-li-span" }, b = { class: "single-top-li" }, j = { class: "single-top-li-span" }, q = { class: "single-test" }, K = { class: "single-compo" }, L = /* @__PURE__ */ d({
10
10
  __name: "index",
11
- setup(z) {
12
- const u = E(), v = P(u), n = c({}), s = c(), i = c(!1);
13
- function p(t) {
11
+ setup(O) {
12
+ const r = S(), u = B(r), n = a({}), s = a(), i = a(!1);
13
+ function m(t) {
14
14
  return t.comkey;
15
15
  }
16
- function d(t) {
16
+ function _(t) {
17
17
  return (t.id || "").split("/")[0] || "";
18
18
  }
19
- function f() {
19
+ function v() {
20
20
  i.value = !i.value;
21
21
  }
22
- function g(t) {
23
- n.value = t, s.value = D(
24
- u.query.id + "",
25
- v.key,
22
+ function p(t) {
23
+ n.value = t, s.value = $(
24
+ r.query.id + "",
25
+ u.key,
26
26
  t.key
27
27
  )[0];
28
28
  }
29
- return (t, l) => (y(), k("div", V, [
30
- o($, {
31
- "get-name": d,
32
- "get-key": p,
33
- onChange: g
29
+ return (t, l) => (g(), f("div", D, [
30
+ o(x, {
31
+ "get-name": _,
32
+ "get-key": m,
33
+ onChange: p
34
34
  }, {
35
- default: w(() => {
36
- var a, m, _;
37
- return [
38
- o(N, { value: n.value }, null, 8, ["value"]),
39
- e("div", {
40
- class: "single-top",
41
- onClick: f
42
- }, [
43
- e("div", b, [
44
- e("div", j, r((a = s.value) == null ? void 0 : a.name), 1),
45
- e("div", q, r((m = s.value) == null ? void 0 : m.value), 1)
46
- ]),
47
- e("div", K, [
48
- l[0] || (l[0] = e("div", { class: "single-top-li-span" }, " 文件路径 ", -1)),
49
- e("div", O, r((_ = s.value) == null ? void 0 : _.key), 1)
50
- ])
51
- ]),
52
- e("div", R, [
53
- o(S, { value: s.value }, null, 8, ["value"])
35
+ default: h(() => [
36
+ o(w, { value: n.value }, null, 8, ["value"]),
37
+ e("div", {
38
+ class: "single-top",
39
+ onClick: v
40
+ }, [
41
+ e("div", E, [
42
+ e("div", P, c(s.value?.name), 1),
43
+ e("div", V, c(s.value?.value), 1)
54
44
  ]),
55
- x(e("div", T, [
56
- o(B, { value: n.value }, null, 8, ["value"])
57
- ], 512), [
58
- [C, i.value]
45
+ e("div", b, [
46
+ l[0] || (l[0] = e("div", { class: "single-top-li-span" }, " 文件路径 ", -1)),
47
+ e("div", j, c(s.value?.key), 1)
59
48
  ])
60
- ];
61
- }),
49
+ ]),
50
+ e("div", q, [
51
+ o(C, { value: s.value }, null, 8, ["value"])
52
+ ]),
53
+ k(e("div", K, [
54
+ o(N, { value: n.value }, null, 8, ["value"])
55
+ ], 512), [
56
+ [y, i.value]
57
+ ])
58
+ ]),
62
59
  _: 1
63
60
  })
64
61
  ]));
65
62
  }
66
63
  });
67
64
  export {
68
- Q as default
65
+ L as default
69
66
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../config.cjs"),l=require("../utils/storage.cjs"),g=require("./file.cjs"),y=e=>Object.freeze(Object.defineProperty({__proto__:null,default:e},Symbol.toStringTag,{value:"Module"})),s=[{path:"/__document",name:"__document",component:()=>Promise.resolve().then(()=>y(require("../index/index.vue.cjs"))),redirect:{name:"__documentIndex"},meta:{title:"文档"},children:[]}];let m=0;document.addEventListener("keydown",h);function h(e){e=e||window.event,(e.ctrlKey&&e.location==82||e.location==116)&&l.setSession("-keydown-F5",2)}let a="__document";function k(e){var o;a=u.getConfig("router")||"__document";let t="/"+a;s[0].path=t,s[0].redirect={name:a+"Index"},(o=s[0].children)==null||o.unshift({path:t+"/:chapters+",redirect:{name:a+"Index"}}),g.getFileName().forEach(n=>{var r;(r=s[0].children)==null||r.push({path:n.value,name:a+n.name,component:n.component})});const i=u.getConfig("redirect");if(s.forEach(n=>{e.addRoute(n),e.beforeEach((r,p)=>{if(p.fullPath=="/"){let f=l.getSession("-keydown-F5");document.referrer||f==2?(console.log("刷新"),m=2):(console.log("地址栏输入 或者 刷新"),m=3)}else console.log("跳转"),m=1;l.setSession("-keydown-F5",0)})}),i){const n=e.getRoutes().filter(r=>r.path=="/")[0]||{path:"/"};n.redirect=t,n.name?e.addRoute(n.name,n):e.addRoute(n)}}const d={};function _(e){let t=e.path,i=e.params;if(i&&Object.keys(i).length)return i;{let o=d[t];return o&&Object.keys(o).length?o:m==3?{}:l.getSession("router.toPage."+t)}}function c(e,t,i="push"){let o=t.path||"";const n=t.name,r=t.params||{};e[i](t),n&&(o=e.resolve({name:n}).path),d[o]=r,l.setSession("router.toPage."+o,r)}function v(e,t){c(e,{name:a+"Single",query:{id:t.name+"/"+t.value},params:{key:t.key,comkey:t.comkey}})}function P(e,t){c(e,{name:a+"Develop",query:{id:t.value},params:{key:t.key}})}function S(e,t){c(e,{name:a+"Tests",query:{id:t.value},params:{key:t.key}})}function q(e,t){c(e,{name:a+"Compon",query:{id:t.value},params:{key:t.key}})}exports.getPageParams=_;exports.init=k;exports.toCompon=q;exports.toDevelop=P;exports.toPage=c;exports.toSingle=v;exports.toTests=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../config.cjs"),s=require("../utils/storage.cjs"),f=require("./file.cjs"),g=e=>Object.freeze(Object.defineProperty({__proto__:null,default:e},Symbol.toStringTag,{value:"Module"})),i=[{path:"/__document",name:"__document",component:()=>Promise.resolve().then(()=>g(require("../index/index.vue.cjs"))),redirect:{name:"__documentIndex"},meta:{title:"文档"},children:[]}];let m=0;document.addEventListener("keydown",y);function y(e){e=e||window.event,(e.ctrlKey&&e.location==82||e.location==116)&&s.setSession("-keydown-F5",2)}let o="__document";function h(e){o=u.getConfig("router")||"__document";let t="/"+o;i[0].path=t,i[0].redirect={name:o+"Index"},i[0].children?.unshift({path:t+"/:chapters+",redirect:{name:o+"Index"}}),f.getFileName().forEach(n=>{i[0].children?.push({path:n.value,name:o+n.name,component:n.component})});const a=u.getConfig("redirect");if(i.forEach(n=>{e.addRoute(n),e.beforeEach((r,c)=>{if(c.fullPath=="/"){let p=s.getSession("-keydown-F5");document.referrer||p==2?(console.log("刷新"),m=2):(console.log("地址栏输入 或者 刷新"),m=3)}else console.log("跳转"),m=1;s.setSession("-keydown-F5",0)})}),a){const n=e.getRoutes().filter(r=>r.path=="/")[0]||{path:"/"};n.redirect=t,n.name?e.addRoute(n.name,n):e.addRoute(n)}}const d={};function k(e){let t=e.path,a=e.params;if(a&&Object.keys(a).length)return a;{let n=d[t];return n&&Object.keys(n).length?n:m==3?{}:s.getSession("router.toPage."+t)}}function l(e,t,a="push"){let n=t.path||"";const r=t.name,c=t.params||{};e[a](t),r&&(n=e.resolve({name:r}).path),d[n]=c,s.setSession("router.toPage."+n,c)}function _(e,t){l(e,{name:o+"Single",query:{id:t.name+"/"+t.value},params:{key:t.key,comkey:t.comkey}})}function v(e,t){l(e,{name:o+"Develop",query:{id:t.value},params:{key:t.key}})}function P(e,t){l(e,{name:o+"Tests",query:{id:t.value},params:{key:t.key}})}function S(e,t){l(e,{name:o+"Compon",query:{id:t.value},params:{key:t.key}})}exports.getPageParams=k;exports.init=h;exports.toCompon=S;exports.toDevelop=v;exports.toPage=l;exports.toSingle=_;exports.toTests=P;
@@ -1,7 +1,7 @@
1
1
  import { getConfig as d } from "../config.js";
2
2
  import { setSession as s, getSession as p } from "../utils/storage.js";
3
- import { getFileName as y } from "./file.js";
4
- const m = [
3
+ import { getFileName as h } from "./file.js";
4
+ const i = [
5
5
  {
6
6
  path: "/__document",
7
7
  name: "__document",
@@ -12,38 +12,36 @@ const m = [
12
12
  }
13
13
  ];
14
14
  let c = 0;
15
- document.addEventListener("keydown", g);
16
- function g(e) {
15
+ document.addEventListener("keydown", y);
16
+ function y(e) {
17
17
  e = e || window.event, (e.ctrlKey && e.location == 82 || //ctrl+R
18
18
  e.location == 116) && s("-keydown-F5", 2);
19
19
  }
20
- let a = "__document";
21
- function P(e) {
22
- var o;
23
- a = d("router") || "__document";
24
- let t = "/" + a;
25
- m[0].path = t, m[0].redirect = { name: a + "Index" }, (o = m[0].children) == null || o.unshift({
20
+ let o = "__document";
21
+ function _(e) {
22
+ o = d("router") || "__document";
23
+ let t = "/" + o;
24
+ i[0].path = t, i[0].redirect = { name: o + "Index" }, i[0].children?.unshift({
26
25
  path: t + "/:chapters+",
27
- redirect: { name: a + "Index" }
28
- }), y().forEach((n) => {
29
- var r;
30
- (r = m[0].children) == null || r.push({
26
+ redirect: { name: o + "Index" }
27
+ }), h().forEach((n) => {
28
+ i[0].children?.push({
31
29
  path: n.value,
32
- name: a + n.name,
30
+ name: o + n.name,
33
31
  component: n.component
34
32
  });
35
33
  });
36
- const i = d("redirect");
37
- if (m.forEach((n) => {
38
- e.addRoute(n), e.beforeEach((r, f) => {
39
- if (f.fullPath == "/") {
40
- let h = p("-keydown-F5");
41
- document.referrer || h == 2 ? (console.log("刷新"), c = 2) : (console.log("地址栏输入 或者 刷新"), c = 3);
34
+ const a = d("redirect");
35
+ if (i.forEach((n) => {
36
+ e.addRoute(n), e.beforeEach((r, m) => {
37
+ if (m.fullPath == "/") {
38
+ let f = p("-keydown-F5");
39
+ document.referrer || f == 2 ? (console.log("刷新"), c = 2) : (console.log("地址栏输入 或者 刷新"), c = 3);
42
40
  } else
43
41
  console.log("跳转"), c = 1;
44
42
  s("-keydown-F5", 0);
45
43
  });
46
- }), i) {
44
+ }), a) {
47
45
  const n = e.getRoutes().filter((r) => r.path == "/")[0] || {
48
46
  path: "/"
49
47
  };
@@ -51,50 +49,50 @@ function P(e) {
51
49
  }
52
50
  }
53
51
  const u = {};
54
- function w(e) {
55
- let t = e.path, i = e.params;
56
- if (i && Object.keys(i).length)
57
- return i;
52
+ function P(e) {
53
+ let t = e.path, a = e.params;
54
+ if (a && Object.keys(a).length)
55
+ return a;
58
56
  {
59
- let o = u[t];
60
- return o && Object.keys(o).length ? o : c == 3 ? {} : p("router.toPage." + t);
57
+ let n = u[t];
58
+ return n && Object.keys(n).length ? n : c == 3 ? {} : p("router.toPage." + t);
61
59
  }
62
60
  }
63
- function l(e, t, i = "push") {
64
- let o = t.path || "";
65
- const n = t.name, r = t.params || {};
66
- e[i](t), n && (o = e.resolve({ name: n }).path), u[o] = r, s("router.toPage." + o, r);
61
+ function l(e, t, a = "push") {
62
+ let n = t.path || "";
63
+ const r = t.name, m = t.params || {};
64
+ e[a](t), r && (n = e.resolve({ name: r }).path), u[n] = m, s("router.toPage." + n, m);
67
65
  }
68
- function x(e, t) {
66
+ function w(e, t) {
69
67
  l(e, {
70
- name: a + "Single",
68
+ name: o + "Single",
71
69
  query: {
72
70
  id: t.name + "/" + t.value
73
71
  },
74
72
  params: { key: t.key, comkey: t.comkey }
75
73
  });
76
74
  }
77
- function q(e, t) {
75
+ function x(e, t) {
78
76
  l(e, {
79
- name: a + "Develop",
77
+ name: o + "Develop",
80
78
  query: {
81
79
  id: t.value
82
80
  },
83
81
  params: { key: t.key }
84
82
  });
85
83
  }
86
- function E(e, t) {
84
+ function q(e, t) {
87
85
  l(e, {
88
- name: a + "Tests",
86
+ name: o + "Tests",
89
87
  query: {
90
88
  id: t.value
91
89
  },
92
90
  params: { key: t.key }
93
91
  });
94
92
  }
95
- function F(e, t) {
93
+ function E(e, t) {
96
94
  l(e, {
97
- name: a + "Compon",
95
+ name: o + "Compon",
98
96
  query: {
99
97
  id: t.value
100
98
  },
@@ -102,11 +100,11 @@ function F(e, t) {
102
100
  });
103
101
  }
104
102
  export {
105
- w as getPageParams,
106
- P as init,
107
- F as toCompon,
108
- q as toDevelop,
103
+ P as getPageParams,
104
+ _ as init,
105
+ E as toCompon,
106
+ x as toDevelop,
109
107
  l as toPage,
110
- x as toSingle,
111
- E as toTests
108
+ w as toSingle,
109
+ q as toTests
112
110
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./storage.cjs"),R=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs"),q=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.cjs"),m=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.cjs"),E=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.cjs"),A=["vue","js"];function K(t,e){let n=R.humpToLine(t.name),i=[];return t.alias&&i.push(t.alias+"-"+n),e&&e.length>0&&e.forEach(s=>{t.alias&&i.push(t.alias+"-"+s+"-"+n),i.push(s+"-"+n)}),i}function T(t){return t.sort((e,n)=>{let i=m.appearNum(e,"/"),s=m.appearNum(n,"/");return i==s?n.length-e.length:s-i}),t}function C(t=[],e=[],n=[]){let i=e;(!i||i.length==0)&&(i=A);let s=[];return t&&t.length>0&&(s=t),n&&n.length>0&&n.forEach(l=>{i==null||i.forEach(a=>{s.push(l+"."+a)})}),s=[...new Set(s)],T(s)}function N(t,e,n={},i=""){for(let s=0;s<e.length;s++){const l=e[s],a=new RegExp("^.*/([^/]+)"+l+"$");let c=t.match(a);if(c){const p=[],u={};let f="";Object.keys(n).forEach(g=>{let h=n[g];t.startsWith(h+"/")&&(f=h,u[g]=h,p.push(g))});let o=c[1],r={dir:"",suffix:E.getSuffix(t),name:q.lineToLargeHump(o),value:o,key:"",tdir:"",adir:f,alias:i,aliass:u,aliasNames:[],raw:"",getRaw:null,mds:[],tests:void 0};return r.aliasNames=K(r,p),r}}}function y(t){x.setSession("aside.key",t)}function D(){return x.getSession("aside.key")}function H(t){let e=t.match(/\/([^\/]+)\/$/);return e&&e.length>1?e[1]:""}function w(t,e){return e?new RegExp(e+".+(\\.(js|ts))?$").test(t):!1}function S(t,e){return e?new RegExp("/"+e+"(\\.(js|ts))?$").test(t):!1}function M(t,e,n,i,s){const l=[],a=[],c=C(e.matchexts,e.extensions,e.matchs),p=H(e.dir);return t.forEach(u=>{const f=new RegExp("^"+e.dir);let o=u.replace(f,"");if(s.comprops&&w(o,s.comprops)||s.curprops&&S(o,s.curprops)){let r={};r.comprops=s.comprops||"",r.curprops=s.curprops||"",r.value=o,r.dir=e.dir,r.suffix=E.getSuffix(u),r.tdir=p,r.key=u,r.raw="",r.getRaw=d(n,u),l.push(r)}else{let r=N(o,c,e.aliass,e.alias);r&&(r.comprops=s.comprops,r.curprops=s.curprops,r.dir=e.dir,r.tdir=p,r.key=u,r.component=i[u],r.getRaw=d(n,u),a.push(r))}}),{props:l,components:a}}function d(t,e){return typeof t=="function"?t:t?t[e]:null}exports.defaultExtensions=A;exports.getAsideKey=D;exports.getComponentsArr=M;exports.getMatchs=C;exports.getRawValue=d;exports.getUrlName=N;exports.isComprops=w;exports.isCurprops=S;exports.setAsideKey=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("./storage.cjs"),M=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs"),q=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.cjs"),x=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-LPMR5W6M.cjs"),C=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.cjs"),w=["vue","js"];function K(t,e){let n=M.humpToLine(t.name),i=[];return t.alias&&i.push(t.alias+"-"+n),e&&e.length>0&&e.forEach(s=>{t.alias&&i.push(t.alias+"-"+s+"-"+n),i.push(s+"-"+n)}),i}function T(t){return t.sort((e,n)=>{let i=x.appearNum(e,"/"),s=x.appearNum(n,"/");return i==s?n.length-e.length:s-i}),t}function A(t=[],e=[],n=[]){let i=e;(!i||i.length==0)&&(i=w);let s=[];return t&&t.length>0&&(s=t),n&&n.length>0&&n.forEach(a=>{i?.forEach(p=>{s.push(a+"."+p)})}),s=[...new Set(s)],T(s)}function N(t,e,n={},i=""){for(let s=0;s<e.length;s++){const a=e[s],p=new RegExp("^.*/([^/]+)"+a+"$");let g=t.match(p);if(g){const c=[],u={};let d="";Object.keys(n).forEach(f=>{let l=n[f];t.startsWith(l+"/")&&(d=l,u[f]=l,c.push(f))});let h=g[1],o={url:"",dir:"",suffix:C.getSuffix(t),name:q.lineToLargeHump(h),value:h,key:"",tdir:"",adir:d,alias:i,aliass:u,aliasNames:[],raw:"",getRaw:null,mds:[],tests:void 0};return o.aliasNames=K(o,c),o}}}function D(t){E.setSession("aside.key",t)}function H(){return E.getSession("aside.key")}function O(t){let e=t.match(/\/([^\/]+)\/$/);return e&&e.length>1?e[1]:""}function R(t,e){return e?new RegExp(e).test(t):!1}function S(t,e){return e?new RegExp("/"+e+"(\\.(js|ts))?$").test(t):!1}function v(t,e,n,i,s){const a=[],p=[],g=A(e.matchexts,e.extensions,e.matchs),c=O(e.dir);return t.forEach(u=>{const d=e.dir.replace(/^\./,"");let h=u.indexOf(d),o="."+u.substring(h);const f=new RegExp("^"+e.dir);let l=o.replace(f,"");if(s.comprops&&R("/"+l,s.comprops)||s.curprops&&S("/"+l,s.curprops)){let r={};r.url=o,r.comprops=s.comprops||"",r.curprops=s.curprops||"",r.value=l,r.dir=e.dir,r.suffix=C.getSuffix(u),r.tdir=c,r.key=u,r.raw="",r.getRaw=m(n,u),a.push(r)}else{let r=N(l,g,e.aliass,e.alias);r&&(r.url=o,r.comprops=s.comprops,r.curprops=s.curprops,r.dir=e.dir,r.tdir=c,r.key=u,r.component=i[u],r.getRaw=m(n,u),p.push(r))}}),{props:a,components:p}}function m(t,e){return typeof t=="function"?t:t?t[e]:null}exports.defaultExtensions=w;exports.getAsideKey=H;exports.getComponentsArr=v;exports.getMatchs=A;exports.getRawValue=m;exports.getUrlName=N;exports.isComprops=R;exports.isCurprops=S;exports.setAsideKey=D;
@@ -14,14 +14,17 @@ export interface TextObj {
14
14
  getRaw: GetRaw | null;
15
15
  }
16
16
  export interface PropObj {
17
+ url: string;
17
18
  comprops: string;
18
19
  name: string;
19
20
  value: string;
20
21
  suffix: string;
21
22
  head: string;
22
23
  key: string;
24
+ dir: string;
23
25
  }
24
26
  export interface PropsObj extends TextObj {
27
+ url: string;
25
28
  comprops: string;
26
29
  curprops: string;
27
30
  dir: string;
@@ -44,6 +47,7 @@ export interface TestsObj extends TextObj {
44
47
  component: AsyncComponentLoader;
45
48
  }
46
49
  export interface ComponentsObj extends Component, TextObj {
50
+ url: string;
47
51
  name: string;
48
52
  tdir: string;
49
53
  adir: string;
@@ -1,106 +1,109 @@
1
- import { getSession as E, setSession as w } from "./storage.js";
2
- import { humpToLine as N } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js";
3
- import { lineToLargeHump as A } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js";
4
- import { appearNum as h } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js";
5
- import { getSuffix as x } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js";
6
- const R = ["vue", "js"];
7
- function S(t, e) {
8
- let n = N(t.name), i = [];
1
+ import { getSession as w, setSession as N } from "./storage.js";
2
+ import { humpToLine as A } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js";
3
+ import { lineToLargeHump as R } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js";
4
+ import { appearNum as h } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-LPMR5W6M.js";
5
+ import { getSuffix as E } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js";
6
+ const S = ["vue", "js"];
7
+ function z(t, e) {
8
+ let n = A(t.name), i = [];
9
9
  return t.alias && i.push(t.alias + "-" + n), e && e.length > 0 && e.forEach((r) => {
10
10
  t.alias && i.push(t.alias + "-" + r + "-" + n), i.push(r + "-" + n);
11
11
  }), i;
12
12
  }
13
- function $(t) {
13
+ function C(t) {
14
14
  return t.sort((e, n) => {
15
15
  let i = h(e, "/"), r = h(n, "/");
16
16
  return i == r ? n.length - e.length : r - i;
17
17
  }), t;
18
18
  }
19
- function C(t = [], e = [], n = []) {
19
+ function T(t = [], e = [], n = []) {
20
20
  let i = e;
21
- (!i || i.length == 0) && (i = R);
21
+ (!i || i.length == 0) && (i = S);
22
22
  let r = [];
23
- return t && t.length > 0 && (r = t), n && n.length > 0 && n.forEach((u) => {
24
- i == null || i.forEach((p) => {
25
- r.push(u + "." + p);
23
+ return t && t.length > 0 && (r = t), n && n.length > 0 && n.forEach((p) => {
24
+ i?.forEach((a) => {
25
+ r.push(p + "." + a);
26
26
  });
27
- }), r = [...new Set(r)], $(r);
27
+ }), r = [...new Set(r)], C(r);
28
28
  }
29
- function T(t, e, n = {}, i = "") {
29
+ function $(t, e, n = {}, i = "") {
30
30
  for (let r = 0; r < e.length; r++) {
31
- const u = e[r], p = new RegExp("^.*/([^/]+)" + u + "$");
32
- let f = t.match(p);
33
- if (f) {
34
- const a = [], o = {};
35
- let c = "";
36
- Object.keys(n).forEach((m) => {
37
- let g = n[m];
38
- t.startsWith(g + "/") && (c = g, o[m] = g, a.push(m));
31
+ const p = e[r], a = new RegExp("^.*/([^/]+)" + p + "$");
32
+ let g = t.match(a);
33
+ if (g) {
34
+ const f = [], l = {};
35
+ let m = "";
36
+ Object.keys(n).forEach((c) => {
37
+ let o = n[c];
38
+ t.startsWith(o + "/") && (m = o, l[c] = o, f.push(c));
39
39
  });
40
- let l = f[1], s = {
40
+ let d = g[1], u = {
41
+ url: "",
41
42
  dir: "",
42
- suffix: x(t),
43
- name: A(l),
44
- value: l,
43
+ suffix: E(t),
44
+ name: R(d),
45
+ value: d,
45
46
  key: "",
46
47
  tdir: "",
47
- adir: c,
48
+ adir: m,
48
49
  alias: i,
49
- aliass: o,
50
+ aliass: l,
50
51
  aliasNames: [],
51
52
  raw: "",
52
53
  getRaw: null,
53
54
  mds: [],
54
55
  tests: void 0
55
56
  };
56
- return s.aliasNames = S(s, a), s;
57
+ return u.aliasNames = z(u, f), u;
57
58
  }
58
59
  }
59
60
  }
60
- function O(t) {
61
- w("aside.key", t);
61
+ function V(t) {
62
+ N("aside.key", t);
62
63
  }
63
- function U() {
64
- return E("aside.key");
64
+ function W() {
65
+ return w("aside.key");
65
66
  }
66
67
  function v(t) {
67
68
  let e = t.match(/\/([^\/]+)\/$/);
68
69
  return e && e.length > 1 ? e[1] : "";
69
70
  }
70
71
  function K(t, e) {
71
- return e ? new RegExp(e + ".+(\\.(js|ts))?$").test(t) : !1;
72
+ return e ? new RegExp(e).test(t) : !1;
72
73
  }
73
74
  function L(t, e) {
74
75
  return e ? new RegExp("/" + e + "(\\.(js|ts))?$").test(t) : !1;
75
76
  }
76
- function V(t, e, n, i, r) {
77
- const u = [], p = [], f = C(e.matchexts, e.extensions, e.matchs), a = v(e.dir);
78
- return t.forEach((o) => {
77
+ function j(t, e, n, i, r) {
78
+ const p = [], a = [], g = T(e.matchexts, e.extensions, e.matchs), f = v(e.dir);
79
+ return t.forEach((l) => {
80
+ const m = e.dir.replace(/^\./, "");
81
+ let d = l.indexOf(m), u = "." + l.substring(d);
79
82
  const c = new RegExp("^" + e.dir);
80
- let l = o.replace(c, "");
81
- if (r.comprops && K(l, r.comprops) || r.curprops && L(l, r.curprops)) {
83
+ let o = u.replace(c, "");
84
+ if (r.comprops && K("/" + o, r.comprops) || r.curprops && L("/" + o, r.curprops)) {
82
85
  let s = {};
83
- s.comprops = r.comprops || "", s.curprops = r.curprops || "", s.value = l, s.dir = e.dir, s.suffix = x(o), s.tdir = a, s.key = o, s.raw = "", s.getRaw = d(n, o), u.push(s);
86
+ s.url = u, s.comprops = r.comprops || "", s.curprops = r.curprops || "", s.value = o, s.dir = e.dir, s.suffix = E(l), s.tdir = f, s.key = l, s.raw = "", s.getRaw = x(n, l), p.push(s);
84
87
  } else {
85
- let s = T(l, f, e.aliass, e.alias);
86
- s && (s.comprops = r.comprops, s.curprops = r.curprops, s.dir = e.dir, s.tdir = a, s.key = o, s.component = i[o], s.getRaw = d(n, o), p.push(s));
88
+ let s = $(o, g, e.aliass, e.alias);
89
+ s && (s.url = u, s.comprops = r.comprops, s.curprops = r.curprops, s.dir = e.dir, s.tdir = f, s.key = l, s.component = i[l], s.getRaw = x(n, l), a.push(s));
87
90
  }
88
91
  }), {
89
- props: u,
90
- components: p
92
+ props: p,
93
+ components: a
91
94
  };
92
95
  }
93
- function d(t, e) {
96
+ function x(t, e) {
94
97
  return typeof t == "function" ? t : t ? t[e] : null;
95
98
  }
96
99
  export {
97
- R as defaultExtensions,
98
- U as getAsideKey,
99
- V as getComponentsArr,
100
- C as getMatchs,
101
- d as getRawValue,
102
- T as getUrlName,
100
+ S as defaultExtensions,
101
+ W as getAsideKey,
102
+ j as getComponentsArr,
103
+ T as getMatchs,
104
+ x as getRawValue,
105
+ $ as getUrlName,
103
106
  K as isComprops,
104
107
  L as isCurprops,
105
- O as setAsideKey
108
+ V as setAsideKey
106
109
  };
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../config.cjs"),m=require("./common.cjs"),h=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs"),L=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.cjs"),N=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.cjs"),V=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.cjs"),j=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.cjs"),d=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.cjs"),H=require("./index.cjs"),u={},w={},q=[],S={},b={},O={};function I(){return y.getConfig("example")}function U(e,t,n){const s=Object.assign({exampless:[],examplessRaw:[]},t,n),r=[],a=s.examples;a&&Object.keys(a).forEach(l=>{r.push(l),b[l]=a[l]});const i=s.examplesRaw,o=[];s.urls&&s.urls.length>0?(s.exampless=s.urls,s.urls.forEach(l=>{o.push(l),i&&(O[l]=P(i,l))})):(s.exampless=r,i&&Object.keys(i).forEach(l=>{o.push(l),i&&(O[l]=P(i,l))})),s.examples=void 0,s.examplessRaw=o,s.examplesRaw=void 0,S[e]=s}function P(e,t){return typeof e=="function"?e:e&&(e[t]||e)}async function B(e,t){let n="";if(t=="vue"){let r=new RegExp(/(<script([^>]*)>)((.|\n|\r)*)(<\/script>)/g).exec(e);if(r){n=r[3];const a=/((.|\n|\r)*)<\/script>/g.exec(n),i=/(<script([^>]*)>)((.|\n|\r)*)/g.exec(n);let o=n;a&&(o=a[1]),i&&(o=o+`
2
- `+i[3]),n=o}}else(t=="js"||t=="ts"||t=="")&&(n=e);if(n){const s=await H.getTextImport(n);let r=s==null?void 0:s.map(i=>i.n);const a=[];return r&&r.length>0&&r.forEach(i=>{i&&(i.startsWith("./")||i.startsWith("../"))&&a.push(i)}),a}}function W(e){return new Promise(t=>{e?e.raw?t(e.raw):e.getRaw?e.getRaw(e).then(n=>{const s=R(n);e.raw=s,e.getRaw=null,t(s)}):t(""):t("")})}function A(e,t){e=(e||"")+"";let n="";switch(e){case"1":n=t.tdir+"/";break;case"2":n=t.adir+"/";break;case"3":n=t.tdir+"/"+t.adir+"/";break}return n}function k(e,t,n){var o,l;e=(e||"")+"",n=(n||"")+"";let s=h.humpToLine(t.name),r=[];const a=Object.values(t.aliass||{});if(e==="1")t.alias&&r.push(t.alias+"-"+s);else if(e==="2")a&&a.length>0&&a.forEach(c=>{r.push(c+"-"+s)});else if(e==="3"){let c="";t.alias&&(c=t.alias+"-"),a==null||a.forEach(f=>{r.push(c+f+"-"+s)})}else e==="4"?(o=t.aliasNames)==null||o.forEach(c=>{r.push(h.humpToLine(c))}):e=="9"&&(r.push(s),(l=t.aliasNames)==null||l.forEach(c=>{r.push(h.humpToLine(c))}));r.length==0&&r.push(s);let i=[];return n==="1"?r.forEach(c=>{let f=L.lineToLargeHump(c);i.push(f,N.firstLower(f))}):n==="2"?r.forEach(c=>{let f=L.lineToLargeHump(c);i.push(c,f,N.firstLower(f))}):i=[...r],i=[...new Set(i)],i}function D(e,t,n,s){const r=[];return n.examplessRaw.forEach(a=>{for(let i=0;i<t.length;i++){const o=t[i];if(a==e+o+"/"+n.md+".md"){r.push({topurl:e,comkey:s.key,suffix:d.getSuffix(a),name:s.name,value:o,key:a,raw:"",getRaw:m.getRawValue(O,a)});break}}}),r}function C(e){p();const t=u[e];if(t.tests)return t.tests;{const n=S[t.dir],s=n.dir+A(n.level||0,t),r=k(n.aliaslevel||0,t,n.componentName||0);t.mds=D(s,r,n,t);const a={};return n.exampless.forEach(i=>{for(let o=0;o<r.length;o++){const l=r[o];if(i.startsWith(s+l+"/")){const c=new RegExp("^\\"+s+l+"/(.*)/index\\."+m.defaultExtensions.join("|")+"$");let f="",g=i.match(c);g&&g.length>1&&(f=g[1]),a[i]={topurl:s,name:l,value:f,suffix:d.getSuffix(i),comname:t.name,comkey:t.key,key:i,component:b[i],raw:"",getRaw:m.getRawValue(O,i)};break}}}),t.tests=a,a}}function F(e){if(e){const t=C(e);return Object.values(t)}else return[]}function J(e,t,n){p();const s=C(n),r=[];if(t){let a=s[t];if(a)return r.push(a),r}return Object.values(s).forEach(a=>{a.name+"/"+a.value==e&&r.push(a)}),r}function G(e){return C(e),u[e].mds}async function E(e,t,n,s){let r=await B(t,n)||[],a=e.split("/");return r.map(i=>{if(i.startsWith("./")){let o=a.slice(0,a.length-1).join("/"),l=i.substring(2);return{name:i,comprops:s||"",value:l,suffix:d.getSuffix(i),head:o,key:o+"/"+l}}else{let o=i.split("/"),l=0;for(let T=0;T<o.length;T++)if(o[T]!=".."){l=T;break}let c=o.slice(l,o.length),f=a.slice(0,a.length-l-1).join("/"),g=c.join("/");return{name:i,comprops:s||"",value:g,suffix:d.getSuffix(i),head:f,key:f+"/"+g}}})}function X(e){return new Promise(t=>{if(e&&e.length>0){let n=e.map(s=>({raw:"",name:s.name,value:s.value,suffix:d.getSuffix(s.key),key:s.key,getRaw:m.getRawValue(O,s.key)}));j.asyncMergeArray(n,(s,r,a,i)=>{a.raw?s():a.getRaw?a.getRaw(a).then(o=>{const l=R(o);a.raw=l,a.getRaw=null,s()}):s()}).then(()=>{t(n)})}else t([])})}function Z(){const e=I(),t=y.getConfig("components");t==null||t.forEach(n=>{Y(n);let s=n.dir||"";U(s,e,n.example)})}const x="default";function Q(e){let t=h.humpToLine(e.name),n=[...e.aliasNames];n.push(t),n.forEach(s=>{q.push({name:s,value:e.key})})}function $(e,t){const n={};t==null||t.forEach(s=>{u[s.key]=s,Q(s);const r=Object.values(s.aliass||{});r&&r.length?r.forEach(a=>{n[a]=n[a]||[],n[a].push(s.key)}):(n[x]=n[x]||[],n[x].push(s.key))})}function Y(e){let t,n;const s=e.resolver;s&&Object.keys(s).forEach(a=>{typeof e[a]>"u"&&(e[a]=s[a])}),t=e.alias||x;let r=(e==null?void 0:e.urls)||Object.keys(e.componentsRaw);n=m.getComponentsArr(r,e,e.componentsRaw,e.components,e),n&&(n!=null&&n.props)&&n.props.forEach(a=>{w[a.key]=a}),$(t,n.components)}function _(e){return p(),u[e]}function p(){return Object.keys(u).length==0&&Z(),Object.values(u)}function z(){return p(),w}function v(e,t,n){p();const s=[];if(n){let a=u[n];if(a&&a.key)return[a]}let r=h.humpToLine(e);return q.forEach(a=>{t?a.name.includes(r)&&s.push(u[a.value]):a.name==r&&s.push(u[a.value])}),V.duplicateRemoval(s,"key")}async function ee(e,t){let n=e;if(e){let s=(await E(t.key,e,t.suffix,t.comprops)).filter(r=>r.key.startsWith(t.head)||m.isComprops(r.name,t.comprops||""));n=await M(s)+n}return n}function K(e){return new Promise(t=>{if(e&&e.length>0){let n=e.map(s=>w[s.key]||w[s.key+".js"]||w[s.key+".ts"]).filter(s=>!!s);j.asyncMergeArray(n,(s,r,a,i)=>{a.raw?s():a.getRaw?a.getRaw(a).then(async o=>{const l=R(o);let c=await ee(l,e[i]);a.raw=c,a.getRaw=null,s()}):s()}).then(()=>{t(n)})}else t([])})}async function M(e){const t=await K(e);return((t==null?void 0:t.map(s=>s.raw))||[]).join(`
3
- `)}async function te(e,t){let n=e;if(e&&(t.comprops||t.curprops)){let s=(await E(t.key,e,t.suffix,t.comprops||"")).filter(a=>m.isComprops(a.name,t.comprops||"")||m.isCurprops(a.name,t.curprops||""));n=await M(s)+n}return n}function R(e){return e&&typeof e=="object"?e.default||"":(e||"")+""}function se(e){return new Promise(t=>{if(e){p();const n=u[e];n?n.raw?t(n.raw):n.getRaw?n.getRaw(n).then(s=>{const r=R(s);te(r,n).then(a=>{n.raw=a,n.getRaw=null,t(a)})}):t(""):t("")}else t("")})}exports.defaultName=x;exports.getCompoName=v;exports.getCompoNameKey=_;exports.getCompoNameObj=p;exports.getComponentPropsObjs=z;exports.getGetRawValue=R;exports.getKeyMds=G;exports.getLevelUrl=A;exports.getLocalTextArr=X;exports.getLocalTextComponents=se;exports.getLocalTextTests=W;exports.getPropsRaws=K;exports.getTestImportUrl=E;exports.getTestName=F;exports.getTestNameObj=J;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("../config.cjs"),m=require("./common.cjs"),x=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs"),b=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.cjs"),j=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.cjs"),H=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.cjs"),q=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.cjs"),w=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.cjs"),I=require("./index.cjs"),f={},p={},A=[],K={},V={},O={};function B(){return L.getConfig("example")}function v(e,t,s){const n=Object.assign({exampless:[],examplessRaw:[]},t,s),a=[],r=n.examples;r&&Object.keys(r).forEach(o=>{a.push(o),V[o]=r[o]});const l=n.examplesRaw,i=[];n.urls&&n.urls.length>0?(n.exampless=n.urls,n.urls.forEach(o=>{i.push(o),l&&(O[o]=S(l,o))})):(n.exampless=a,l&&Object.keys(l).forEach(o=>{i.push(o),l&&(O[o]=S(l,o))})),n.examples=void 0,n.examplessRaw=i,n.examplesRaw=void 0,K[e]=n}function S(e,t){return typeof e=="function"?e:e&&(e[t]||e)}const E={};function D(e){const t=L.getConfig("resolve");if(E[e])return E[e];for(let s of t)if(e.startsWith(s.find+"/")){const a=s.replacement.replaceAll("\\","/")+e.replace(s.find+"/","/");return E[e]=a,a}}async function F(e,t){let s="";if(t=="vue"){let a=new RegExp(/(<script([^>]*)>)((.|\n|\r)*)(<\/script>)/g).exec(e);if(a){s=a[3];const r=/((.|\n|\r)*)<\/script>/g.exec(s),l=/(<script([^>]*)>)((.|\n|\r)*)/g.exec(s);let i=s;r&&(i=r[1]),l&&(i=i+`
2
+ `+l[3]),s=i}}else(t=="js"||t=="ts"||t=="")&&(s=e);if(s){let a=(await I.getTextImport(s))?.map(l=>l.n);const r=[];return a&&a.length>0&&a.forEach(l=>{if(l)if(l.startsWith("./")||l.startsWith("../"))r.push(l);else{const i=D(l);i&&r.push(i)}}),r}}function J(e){return new Promise(t=>{e?e.raw?t(e.raw):e.getRaw?e.getRaw(e).then(s=>{const n=R(s);e.raw=n,e.getRaw=null,t(n)}):t(""):t("")})}function M(e,t){e=(e||"")+"";let s="";switch(e){case"1":s=t.tdir+"/";break;case"2":s=t.adir+"/";break;case"3":s=t.tdir+"/"+t.adir+"/";break}return s}function G(e,t,s){e=(e||"")+"",s=(s||"")+"";let n=x.humpToLine(t.name),a=[];const r=Object.values(t.aliass||{});if(e==="1")t.alias&&a.push(t.alias+"-"+n);else if(e==="2")r&&r.length>0&&r.forEach(i=>{a.push(i+"-"+n)});else if(e==="3"){let i="";t.alias&&(i=t.alias+"-"),r?.forEach(o=>{a.push(i+o+"-"+n)})}else e==="4"?t.aliasNames?.forEach(i=>{a.push(x.humpToLine(i))}):e=="9"&&(a.push(n),t.aliasNames?.forEach(i=>{a.push(x.humpToLine(i))}));a.length==0&&a.push(n);let l=[];return s==="1"?a.forEach(i=>{let o=b.lineToLargeHump(i);l.push(o,j.firstLower(o))}):s==="2"?a.forEach(i=>{let o=b.lineToLargeHump(i);l.push(i,o,j.firstLower(o))}):l=[...a],l=[...new Set(l)],l}function X(e,t,s,n){const a=[];return s.examplessRaw.forEach(r=>{for(let l=0;l<t.length;l++){const i=t[l];if(r==e+i+"/"+s.md+".md"){a.push({topurl:e,comkey:n.key,suffix:w.getSuffix(r),name:n.name,value:i,key:r,raw:"",getRaw:m.getRawValue(O,r)});break}}}),a}function N(e){h();const t=f[e];if(t.tests)return t.tests;{const s=K[t.dir],n=s.dir+M(s.level||0,t),a=G(s.aliaslevel||0,t,s.componentName||0);t.mds=X(n,a,s,t);const r={};return s.exampless.forEach(l=>{for(let i=0;i<a.length;i++){const o=a[i];if(l.startsWith(n+o+"/")){const c=new RegExp("^\\"+n+o+"/(.*)/index\\."+m.defaultExtensions.join("|")+"$");let g="",u=l.match(c);u&&u.length>1&&(g=u[1]),r[l]={topurl:n,name:o,value:g,suffix:w.getSuffix(l),comname:t.name,comkey:t.key,key:l,component:V[l],raw:"",getRaw:m.getRawValue(O,l)};break}}}),t.tests=r,r}}function Z(e){if(e){const t=N(e);return Object.values(t)}else return[]}function Q(e,t,s){h();const n=N(s),a=[];if(t){let r=n[t];if(r)return a.push(r),a}return Object.values(n).forEach(r=>{r.name+"/"+r.value==e&&a.push(r)}),a}function $(e){return N(e),f[e].mds}async function P(e,t,s,n,a){let r=await F(t,s)||[],l=e.split("/");return r.map(i=>{if(i.startsWith("./")){let o=l.slice(0,l.length-1).join("/"),c=i.substring(2);return{url:o+"/"+c,name:i,comprops:a||"",value:c,suffix:w.getSuffix(i),head:o,dir:n,key:i}}else if(i.startsWith("../")){let o=i.split("/"),c=0;for(let T=0;T<o.length;T++)if(o[T]!=".."){c=T;break}let g=o.slice(c,o.length),u=l.slice(0,l.length-c-1).join("/"),C=g.join("/");return{url:u+"/"+C,name:i,comprops:a||"",value:C,suffix:w.getSuffix(i),head:u,dir:n,key:i}}else{const o=n.replace(/^\./,"");let c=i.indexOf(o)+o.length,g=i.substring(c),u=n.substring(0,n.length-1);return{url:u+"/"+g,name:i,comprops:a||"",value:g,suffix:w.getSuffix(i),head:u,dir:n,key:i}}})}function z(e){return new Promise(t=>{if(e&&e.length>0){let s=e.map(n=>({raw:"",name:n.name,value:n.value,suffix:w.getSuffix(n.key),key:n.key,getRaw:m.getRawValue(O,n.key)}));q.asyncMergeArray(s,(n,a,r,l)=>{r.raw?n():r.getRaw?r.getRaw(r).then(i=>{const o=R(i);r.raw=o,r.getRaw=null,n()}):n()}).then(()=>{t(s)})}else t([])})}function Y(){const e=B();L.getConfig("components")?.forEach(s=>{k(s);let n=s.dir||"";v(n,e,s.example)})}const d="default";function _(e){let t=x.humpToLine(e.name),s=[...e.aliasNames];s.push(t),s.forEach(n=>{A.push({name:n,value:e.key})})}function y(e,t){const s={};t?.forEach(n=>{f[n.key]=n,_(n);const a=Object.values(n.aliass||{});a&&a.length?a.forEach(r=>{s[r]=s[r]||[],s[r].push(n.key)}):(s[d]=s[d]||[],s[d].push(n.key))})}function k(e){let t,s;const n=e.resolver;n&&Object.keys(n).forEach(r=>{typeof e[r]>"u"&&(e[r]=n[r])}),t=e.alias||d;let a=e?.urls||Object.keys(e.componentsRaw);s=m.getComponentsArr(a,e,e.componentsRaw,e.components,e),s&&s?.props&&s.props.forEach(r=>{p[r.url]=r}),y(t,s.components)}function ee(e){return h(),f[e]}function h(){return Object.keys(f).length==0&&Y(),Object.values(f)}function te(){return h(),p}function se(e,t,s){h();const n=[];if(s){let r=f[s];if(r&&r.key)return[r]}let a=x.humpToLine(e);return A.forEach(r=>{t?r.name.includes(a)&&n.push(f[r.value]):r.name==a&&n.push(f[r.value])}),H.duplicateRemoval(n,"key")}async function ne(e,t){let s=e;if(e){let n=(await P(t.key,e,t.suffix,t.dir,t.comprops)).filter(a=>a.key.startsWith(t.head)||m.isComprops(a.name,t.comprops||""));s=await W(n)+s}return s}function re(e){const t=e.url,s=e.key;return p[t]||p[t+".js"]||p[t+".ts"]||p[s]||p[s+".js"]||p[s+".ts"]}function U(e){return new Promise(t=>{if(e&&e.length>0){let s=e.map(n=>re(n)).filter(n=>!!n);q.asyncMergeArray(s,(n,a,r,l)=>{r.raw?n():r.getRaw?r.getRaw(r).then(async i=>{const o=R(i);let c=await ne(o,e[l]);r.raw=c,r.getRaw=null,n()}):n()}).then(()=>{t(s)})}else t([])})}async function W(e){return((await U(e))?.map(n=>n.raw)||[]).join(`
3
+ `)}async function ae(e,t){let s=e;if(e&&(t.comprops||t.curprops)){let n=(await P(t.key,e,t.suffix,t.dir,t.comprops||"")).filter(r=>m.isComprops(r.name,t.comprops||"")||m.isCurprops(r.name,t.curprops||""));s=await W(n)+s}return s}function R(e){return e&&typeof e=="object"?e.default||"":(e||"")+""}function ie(e){return new Promise(t=>{if(e){h();const s=f[e];s?s.raw?t(s.raw):s.getRaw?s.getRaw(s).then(n=>{const a=R(n);ae(a,s).then(r=>{s.raw=r,s.getRaw=null,t(r)})}):t(""):t("")}else t("")})}exports.defaultName=d;exports.getCompoName=se;exports.getCompoNameKey=ee;exports.getCompoNameObj=h;exports.getComponentPropsObjs=te;exports.getGetRawValue=R;exports.getKeyMds=$;exports.getLevelUrl=M;exports.getLocalTextArr=z;exports.getLocalTextComponents=ie;exports.getLocalTextTests=J;exports.getPropsRaws=U;exports.getTestImportUrl=P;exports.getTestName=Z;exports.getTestNameObj=Q;
@@ -21,7 +21,7 @@ export declare function getKeyMds(key: string): MdObj[] | undefined;
21
21
  * @param {*} arr
22
22
  * @returns
23
23
  */
24
- export declare function getTestImportUrl(url: string, text: string, type: string, comprops?: string): Promise<Array<PropObj>>;
24
+ export declare function getTestImportUrl(url: string, text: string, type: string, dir: string, comprops?: string): Promise<Array<PropObj>>;
25
25
  export declare function getLocalTextArr(arr: Array<PropObj>): Promise<TextObj[]>;
26
26
  export declare const defaultName = "default";
27
27
  export declare function getCompoNameKey(key: string): ComponentsObj;