@fangzhongya/vue-archive 0.0.17 → 0.0.19

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 (130) hide show
  1. package/dist/index.css +2 -2
  2. package/dist/node/index.cjs +226 -27
  3. package/dist/node/index.js +226 -27
  4. package/dist/packages/components/code/highlight.d.ts +1 -1
  5. package/dist/packages/components/compo/top.d.ts +1 -1
  6. package/dist/packages/components/test/top.d.ts +1 -1
  7. package/dist/packages/components/use/code.cjs +10 -10
  8. package/dist/packages/components/use/code.d.ts +4 -2
  9. package/dist/packages/components/use/code.js +109 -73
  10. package/dist/packages/components/use/codemirror.cjs +2 -2
  11. package/dist/packages/components/use/codemirror.js +11 -20
  12. package/dist/packages/components/use/index.cjs +1 -1
  13. package/dist/packages/components/use/index.d.ts +2 -1
  14. package/dist/packages/components/use/index.js +50 -41
  15. package/dist/packages/components/use/retrie/any/index.d.ts +1 -1
  16. package/dist/packages/components/use/retrie/any/index.vue.cjs +1 -1
  17. package/dist/packages/components/use/retrie/any/index.vue.js +8 -8
  18. package/dist/packages/components/use/retrie/array/index.d.ts +1 -1
  19. package/dist/packages/components/use/retrie/array/index.vue.cjs +2 -2
  20. package/dist/packages/components/use/retrie/array/index.vue.js +5 -4
  21. package/dist/packages/components/use/retrie/boolean/index.d.ts +1 -1
  22. package/dist/packages/components/use/retrie/boolean/index.vue.cjs +1 -1
  23. package/dist/packages/components/use/retrie/boolean/index.vue.js +17 -19
  24. package/dist/packages/components/use/retrie/boolean/index.vue3.cjs +1 -0
  25. package/dist/packages/components/use/retrie/boolean/index.vue3.js +5 -0
  26. package/dist/packages/components/use/retrie/choice/index.d.ts +1 -1
  27. package/dist/packages/components/use/retrie/expose/index.d.ts +7 -3
  28. package/dist/packages/components/use/retrie/expose/index.vue.cjs +1 -1
  29. package/dist/packages/components/use/retrie/expose/index.vue.js +38 -43
  30. package/dist/packages/components/use/retrie/expose/index.vue3.cjs +1 -0
  31. package/dist/packages/components/use/retrie/expose/index.vue3.js +5 -0
  32. package/dist/packages/components/use/retrie/form/index.d.ts +1 -1
  33. package/dist/packages/components/use/retrie/form/index.vue.cjs +1 -1
  34. package/dist/packages/components/use/retrie/form/index.vue.js +7 -4
  35. package/dist/packages/components/use/retrie/function/index.d.ts +1 -1
  36. package/dist/packages/components/use/retrie/function/index.vue.cjs +2 -2
  37. package/dist/packages/components/use/retrie/function/index.vue.js +25 -31
  38. package/dist/packages/components/use/retrie/index.d.ts +1 -1
  39. package/dist/packages/components/use/retrie/index.vue.cjs +1 -1
  40. package/dist/packages/components/use/retrie/index.vue.js +13 -10
  41. package/dist/packages/components/use/retrie/index.vue3.cjs +1 -0
  42. package/dist/packages/components/use/retrie/index.vue3.js +5 -0
  43. package/dist/packages/components/use/retrie/input/codemirror.d.ts +27 -0
  44. package/dist/packages/components/use/retrie/input/codemirror.vue.cjs +1 -0
  45. package/dist/packages/components/use/retrie/input/codemirror.vue.js +43 -0
  46. package/dist/packages/components/use/retrie/input/codemirror.vue2.cjs +1 -0
  47. package/dist/packages/components/use/retrie/input/codemirror.vue2.js +4 -0
  48. package/dist/packages/components/use/retrie/input/index.d.ts +11 -4
  49. package/dist/packages/components/use/retrie/input/index.vue.cjs +1 -1
  50. package/dist/packages/components/use/retrie/input/index.vue.js +33 -37
  51. package/dist/packages/components/use/retrie/input/index.vue3.cjs +1 -0
  52. package/dist/packages/components/use/retrie/input/index.vue3.js +5 -0
  53. package/dist/packages/components/use/retrie/input/text.d.ts +25 -0
  54. package/dist/packages/components/use/retrie/input/text.vue.cjs +1 -0
  55. package/dist/packages/components/use/retrie/input/text.vue.js +33 -0
  56. package/dist/packages/components/use/retrie/input/text.vue3.cjs +1 -0
  57. package/dist/packages/components/use/retrie/input/text.vue3.js +5 -0
  58. package/dist/packages/components/use/retrie/number/index.d.ts +1 -1
  59. package/dist/packages/components/use/retrie/number/index.vue.cjs +1 -1
  60. package/dist/packages/components/use/retrie/number/index.vue.js +10 -9
  61. package/dist/packages/components/use/retrie/number/index.vue3.cjs +1 -0
  62. package/dist/packages/components/use/retrie/number/index.vue3.js +5 -0
  63. package/dist/packages/components/use/retrie/object/index.d.ts +1 -1
  64. package/dist/packages/components/use/retrie/object/index.vue.cjs +2 -2
  65. package/dist/packages/components/use/retrie/object/index.vue.js +6 -5
  66. package/dist/packages/components/use/retrie/other/index.d.ts +1 -1
  67. package/dist/packages/components/use/retrie/other/index.vue.cjs +1 -1
  68. package/dist/packages/components/use/retrie/other/index.vue.js +3 -2
  69. package/dist/packages/components/use/retrie/select/index.d.ts +1 -1
  70. package/dist/packages/components/use/retrie/select/index.vue.cjs +1 -1
  71. package/dist/packages/components/use/retrie/select/index.vue.js +2 -1
  72. package/dist/packages/components/use/retrie/slot/index.d.ts +2 -4
  73. package/dist/packages/components/use/retrie/slot/index.vue.cjs +1 -1
  74. package/dist/packages/components/use/retrie/slot/index.vue.js +23 -37
  75. package/dist/packages/components/use/retrie/string/index.d.ts +1 -1
  76. package/dist/packages/components/use/retrie/string/index.vue.cjs +1 -1
  77. package/dist/packages/components/use/retrie/string/index.vue.js +15 -14
  78. package/dist/packages/components/use/retrie/string/index.vue3.cjs +1 -0
  79. package/dist/packages/components/use/retrie/string/index.vue3.js +5 -0
  80. package/dist/packages/components/use/set-code.d.ts +18 -1
  81. package/dist/packages/components/use/set-code.vue.cjs +1 -1
  82. package/dist/packages/components/use/set-code.vue.js +78 -28
  83. package/dist/packages/components/use/set-emit.d.ts +1 -1
  84. package/dist/packages/components/use/set-emit.vue.cjs +1 -1
  85. package/dist/packages/components/use/set-emit.vue.js +24 -20
  86. package/dist/packages/components/use/set-emit.vue3.cjs +1 -0
  87. package/dist/packages/components/use/set-emit.vue3.js +5 -0
  88. package/dist/packages/components/use/set-expose.d.ts +7 -3
  89. package/dist/packages/components/use/set-expose.vue.cjs +1 -1
  90. package/dist/packages/components/use/set-expose.vue.js +49 -24
  91. package/dist/packages/components/use/set-expose.vue3.cjs +1 -0
  92. package/dist/packages/components/use/set-expose.vue3.js +5 -0
  93. package/dist/packages/components/use/set-props.d.ts +1 -1
  94. package/dist/packages/components/use/set-props.vue.cjs +1 -1
  95. package/dist/packages/components/use/set-props.vue.js +10 -9
  96. package/dist/packages/components/use/set-slot.d.ts +1 -1
  97. package/dist/packages/components/use/set-slot.vue.cjs +1 -1
  98. package/dist/packages/components/use/set-slot.vue.js +1 -1
  99. package/dist/packages/components/use/util.cjs +2 -3
  100. package/dist/packages/components/use/util.d.ts +9 -5
  101. package/dist/packages/components/use/util.js +73 -46
  102. package/dist/packages/config.d.ts +1 -1
  103. package/dist/packages/directives/adjust/index copy.d.ts +1 -1
  104. package/dist/packages/directives/adjust/index.d.ts +1 -1
  105. package/dist/packages/index/index.d.ts +1 -1
  106. package/dist/packages/index.cjs +1 -1
  107. package/dist/packages/index.d.ts +1 -1
  108. package/dist/packages/index.js +8 -8
  109. package/dist/packages/page/index/index.vue2.cjs +1 -1
  110. package/dist/packages/page/index/index.vue2.js +30 -27
  111. package/dist/packages/utils/common.d.ts +1 -1
  112. package/dist/packages/utils/glob.cjs +2 -2
  113. package/dist/packages/utils/glob.js +90 -80
  114. package/package.json +1 -1
  115. package/dist/packages/components/use/retrie/boolean/index.vue2.cjs +0 -1
  116. package/dist/packages/components/use/retrie/boolean/index.vue2.js +0 -4
  117. package/dist/packages/components/use/retrie/expose/index.vue2.cjs +0 -1
  118. package/dist/packages/components/use/retrie/expose/index.vue2.js +0 -4
  119. package/dist/packages/components/use/retrie/index.vue2.cjs +0 -1
  120. package/dist/packages/components/use/retrie/index.vue2.js +0 -4
  121. package/dist/packages/components/use/retrie/input/index.vue2.cjs +0 -1
  122. package/dist/packages/components/use/retrie/input/index.vue2.js +0 -4
  123. package/dist/packages/components/use/retrie/number/index.vue2.cjs +0 -1
  124. package/dist/packages/components/use/retrie/number/index.vue2.js +0 -4
  125. package/dist/packages/components/use/retrie/string/index.vue2.cjs +0 -1
  126. package/dist/packages/components/use/retrie/string/index.vue2.js +0 -4
  127. package/dist/packages/components/use/set-emit.vue2.cjs +0 -1
  128. package/dist/packages/components/use/set-emit.vue2.js +0 -4
  129. package/dist/packages/components/use/set-expose.vue2.cjs +0 -1
  130. package/dist/packages/components/use/set-expose.vue2.js +0 -4
package/dist/index.css CHANGED
@@ -1,4 +1,4 @@
1
- .form-select .form-select-box{position:absolute;z-index:100;background-color:#fff;text-align:center}.form-select{position:relative}.form-select .form-select-box{position:absolute;background-color:#fff;text-align:center}.form-select .form-select-box .form-select-list-div{border:1px solid #fff}.form-select .form-select-box .form-select-list-div .form-select-list-li{padding:10px;border-bottom:1px solid #eee}.form-select .form-select-box .form-select-list-div .form-select-list-li:last-child{border:0}.form-select .form-select-box .form-select-list-div .form-select-list-li.active{color:#0051ff}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
1
+ .form-input-text{padding:10px;width:100%;box-sizing:border-box}.form-input{font-size:16px}.form-select{position:relative;font-size:16px}.form-select .form-select-input{padding:10px;width:100%;font-size:16px;box-sizing:border-box}.form-select .form-select-box{position:absolute;width:100%;z-index:100;background-color:#000;text-align:center}.form-select .form-select-box .form-select-list-div{border:1px solid #000000}.form-select .form-select-box .form-select-list-div .form-select-list-li{background-color:#e9e9e9;padding:10px;cursor:pointer;border-bottom:1px solid #000000}.form-select{position:relative}.form-select .form-select-box{position:absolute;background-color:#fff;text-align:center}.form-select .form-select-box .form-select-list-div{border:1px solid #fff}.form-select .form-select-box .form-select-list-div .form-select-list-li{padding:10px;border-bottom:1px solid #eee}.form-select .form-select-box .form-select-list-div .form-select-list-li:last-child{border:0}.form-select .form-select-box .form-select-list-div .form-select-list-li.active{color:#0051ff}.form-boolean{display:flex;font-size:16px;padding:10px}.form-boolean .form-boolean-div{margin-right:10px}.form-string{font-size:16px}.form-string .form-string-text{padding:10px;width:100%;box-sizing:border-box}.form-number{font-size:16px}.form-number .form-number-input{padding:10px;width:100%;box-sizing:border-box}.set-emit .set-emit-li{padding:10px}.set-emit .set-emit-name{font-size:18px;padding:5px 0}.set-emit .set-emit-value{font-size:16px;background-color:azure}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
2
2
  Theme: StackOverflow Light
3
3
  Description: Light theme as used on stackoverflow.com
4
4
  Author: stackoverflow.com
@@ -10,4 +10,4 @@
10
10
  Updated for @stackoverflow/stacks v0.64.0
11
11
  Code Blocks: /blob/v0.64.0/lib/css/components/_stacks-code-blocks.less
12
12
  Colors: /blob/v0.64.0/lib/css/exports/_stacks-constants-colors.less
13
- */.hljs{color:#2f3337;background:#f6f6f6}.hljs-subst{color:#2f3337}.hljs-comment{color:#656e77}.hljs-keyword,.hljs-selector-tag,.hljs-meta .hljs-keyword,.hljs-doctag,.hljs-section,.hljs-attr{color:#015692}.hljs-attribute{color:#803378}.hljs-name,.hljs-type,.hljs-number,.hljs-selector-id,.hljs-quote,.hljs-template-tag{color:#b75501}.hljs-selector-class{color:#015692}.hljs-string,.hljs-regexp,.hljs-symbol,.hljs-variable,.hljs-template-variable,.hljs-link,.hljs-selector-attr{color:#54790d}.hljs-meta,.hljs-selector-pseudo{color:#015692}.hljs-built_in,.hljs-title,.hljs-literal{color:#b75501}.hljs-bullet,.hljs-code{color:#535a60}.hljs-meta .hljs-string{color:#54790d}.hljs-deletion{color:#c02d2e}.hljs-addition{color:#2f6f44}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}:root{--bor-cor: rgb(239, 248, 255);--but-cor: rgb(27, 155, 253);--but-hover-cor: rgb(0, 145, 255);--bg-but-hover-cor: rgb(128, 199, 253);--bg-aside-cor: rgb(228, 251, 197);--bg-aside-on-cor: rgb(78, 250, 87);--bg-index-cor: rgb(248, 248, 248);--bg-table-th-cor: rgb(207, 246, 251);--bg-table-td-cor: rgb(221, 243, 246);--bg-test-cor: rgb(236 255 236);--bg-test-err-cor: rgb(255, 210, 210);--bg-test-pro-cor: rgb(203, 246, 255);--bg-test-err-pro-cor: rgb(251, 203, 255);--te-test-err-cor: rgb(247, 56, 56);--te-test-pro-cor: rgb(106, 131, 255);--bg-test-body: rgb(255, 255, 255);--bg-code-highlig: rgb(255, 251, 223);--bg-code: rgb(255, 255, 255);--bg-box-cor: rgb(198, 198, 198);--bg-md-cor: rgb(255, 233, 243);--bg-use-cor: rgb(193, 219, 255);--bg-use-component-cor: rgb(246, 246, 246);--text-cor: rgb(0, 0, 0);--fs-1: 12px;--fs-2: 14px;--fs-3: 16px;--fs-4: 18px;--fs-5: 20px}.__document{position:fixed;top:0;left:0;width:100vw;height:100vh;overflow:auto;text-align:left;width:100%;height:100%;padding:0;margin:0}.__document .but-div{cursor:pointer;color:var(--but-cor);padding:5px 10px}.__document .but-div:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside{padding:20px 20px 20px 10px}.__document .aside .aside-li{padding:5px 10px;height:60px;font-size:20px;font-weight:600;border-bottom:1px solid var(--bor-cor);cursor:pointer;display:flex;flex-direction:row;align-items:center}.__document .aside .aside-li:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside .aside-li.on{background-color:var(--bg-aside-on-cor)}.__document .aside .aside-li .aside-li-name{width:100%}.__document .aside .aside-li .aside-li-name .aside-li-name-alias{font-size:var(--fs-2)}.__document .aside .aside-li .aside-li-name .aside-li-name-aliass{font-size:var(--fs-1)}.__document .md{position:relative}.__document .use .use-component{padding:10px;display:flex;justify-content:center;align-items:center;height:300px;background-color:var(--bg-use-component-cor)}.__document .use .codemirror-div{background-color:var(--bg-code)}.__document .set-code .set-code-buts{display:flex;align-items:center}.__document .form-item.error{background-color:var(--te-test-err-cor)}.__document .compo .compo-top .compo-top-name{padding:10px;font-size:var(--fs-4)}.__document .compo .compo-top .compo-top-name .compo-top-name-li{font-size:var(--fs-2)}.__document .compo .compo-top .compo-top-info{padding:10px;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-info .compo-top-athor,.__document .compo .compo-top .compo-top-info .compo-top-date{flex:1;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-descriptions{padding:0 10px;font-size:var(--fs-2)}.__document .compo .compo-li h4{margin:10px 0 0;padding:10px}.__document .compo .compo-li .compo-talbe{width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body{border:1px solid var(--bor-cor);width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body td,.__document .compo .compo-li .compo-talbe .compo-talbe-body th{padding:5px 10px;border-bottom:1px solid var(--bor-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body th{background-color:var(--bg-table-th-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body td{background-color:var(--bg-table-td-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body tr:last-child td{border-bottom:0}.__document .compo .compo-li .compo-talbe .compo-talbe-body .compo-talbe-zw{width:100%;text-align:center;padding:10px}.__document .compo .compo-md{padding:10px;background-color:var(--bg-md-cor)}.__document .compo .compo-use{padding:10px;background-color:var(--bg-use-cor)}.__document .main .main-but{text-align:right;display:flex;flex-direction:row;align-items:center}.__document .test.error .test-top{background-color:var(--bg-test-err-cor)}.__document .test.proposal .test-top{background-color:var(--bg-test-pro-cor)}.__document .test.error-proposal .test-top{background-color:var(--bg-test-err-pro-cor)}.__document .test .test-top{padding:5px;background-color:var(--bg-test-cor)}.__document .test .test-top .test-top-error{color:var(--te-test-err-cor)}.__document .test .test-top .test-top-proposal{color:var(--te-test-pro-cor)}.__document .test .test-div .test-body{padding:5px;background-color:var(--bg-test-body)}.__document .code{padding:0}.__document .code .code-top .code-top-but,.__document .code .code-top .code-top-but .top-but-files{display:flex;flex-direction:row;align-items:center}.__document .code .code-highlightjs{padding:0}.__document .code .code-highlightjs .hljs{background-color:var(--bg-code-highlig)}.__document .box-url{position:relative}.__document .box-url:hover .box-url-box{display:block}.__document .box-url .box-url-box{position:fixed;top:25px;display:none;background-color:var(--bg-box-cor);font-size:var(--fs-1);color:var(--text-cor);z-index:100000}.__document .box-url .box-url-box .box-div-li{height:20px;line-height:20px;display:flex;flex-direction:row;align-items:center}.__document .box-url .box-url-box .box-div-li .box-div-li-span{white-space:nowrap;padding:5px 10px}.__document .__document-index{width:100%;height:100%;padding:0;margin:0;display:flex;flex-direction:row}.__document .__document-index .index-aside{width:250px;position:relative;z-index:100}.__document .__document-index .index-aside .index-aside-div{height:100%;overflow-y:auto;background-color:var(--bg-aside-cor)}.__document .__document-index .index-body{flex:1;position:relative;background-color:var(--bg-index-cor)}.__document .__document-index .index-body .index-div{padding:20px;position:absolute;inset:0;overflow-y:auto}.__document .__document-tests{padding:10px;height:100%;position:relative}.__document .__document-tests .tests-top .but-div.on{background-color:var(--bg-aside-on-cor)}.__document .__document-develop,.__document .__document-single{padding:10px;height:100%;position:relative}.__document .__document-single .single-top .single-top-li{display:flex;flex-direction:row;align-items:center}.__document .__document-single .single-top .single-top-li .single-top-li-span{padding:5px 10px}.__document .__document-compon{padding:10px;height:100%;position:relative}.__document .__document-compon .__document-compon-body.choice{padding-left:30px}.__document .__document-compon .__document-compon-choice{position:absolute;top:0;bottom:0;left:0;z-index:100;display:flex;overflow-y:auto;background-color:var(--bg-aside-cor)}.__document .__document-compon .__document-compon-choice .__document-compon-choice-but{cursor:pointer}.__document .__document-compon .__document-compon-choice .__document-compon-choice-but:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}
13
+ */.hljs{color:#2f3337;background:#f6f6f6}.hljs-subst{color:#2f3337}.hljs-comment{color:#656e77}.hljs-keyword,.hljs-selector-tag,.hljs-meta .hljs-keyword,.hljs-doctag,.hljs-section,.hljs-attr{color:#015692}.hljs-attribute{color:#803378}.hljs-name,.hljs-type,.hljs-number,.hljs-selector-id,.hljs-quote,.hljs-template-tag{color:#b75501}.hljs-selector-class{color:#015692}.hljs-string,.hljs-regexp,.hljs-symbol,.hljs-variable,.hljs-template-variable,.hljs-link,.hljs-selector-attr{color:#54790d}.hljs-meta,.hljs-selector-pseudo{color:#015692}.hljs-built_in,.hljs-title,.hljs-literal{color:#b75501}.hljs-bullet,.hljs-code{color:#535a60}.hljs-meta .hljs-string{color:#54790d}.hljs-deletion{color:#c02d2e}.hljs-addition{color:#2f6f44}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.expose .expose-label{padding:10px 0;font-size:18px}.expose .expose-return{padding:5px;background-color:azure}.set-expose .set-expose-li{position:relative}.set-expose .set-expose-li .set-expose-delete{color:red;position:absolute;right:20px;top:10px}:root{--bor-cor: rgb(239, 248, 255);--but-cor: rgb(27, 155, 253);--but-hover-cor: rgb(0, 145, 255);--bg-but-hover-cor: rgb(128, 199, 253);--bg-aside-cor: rgb(228, 251, 197);--bg-aside-on-cor: rgb(78, 250, 87);--bg-index-cor: rgb(248, 248, 248);--bg-table-th-cor: rgb(207, 246, 251);--bg-table-td-cor: rgb(221, 243, 246);--bg-test-cor: rgb(236 255 236);--bg-test-err-cor: rgb(255, 210, 210);--bg-test-pro-cor: rgb(203, 246, 255);--bg-test-err-pro-cor: rgb(251, 203, 255);--te-test-err-cor: rgb(247, 56, 56);--te-test-pro-cor: rgb(106, 131, 255);--bg-test-body: rgb(255, 255, 255);--bg-code-highlig: rgb(255, 251, 223);--bg-code: rgb(255, 255, 255);--bg-box-cor: rgb(198, 198, 198);--bg-md-cor: rgb(255, 233, 243);--bg-use-cor: rgb(193, 219, 255);--bg-use-component-cor: rgb(246, 246, 246);--text-cor: rgb(0, 0, 0);--fs-1: 12px;--fs-2: 14px;--fs-3: 16px;--fs-4: 18px;--fs-5: 20px}.__document{position:fixed;top:0;left:0;width:100vw;height:100vh;overflow:auto;text-align:left;width:100%;height:100%;padding:0;margin:0}.__document .but-div{cursor:pointer;color:var(--but-cor);padding:5px 10px}.__document .but-div:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside{padding:20px 20px 20px 10px}.__document .aside .aside-li{padding:5px 10px;height:60px;font-size:20px;font-weight:600;border-bottom:1px solid var(--bor-cor);cursor:pointer;display:flex;flex-direction:row;align-items:center}.__document .aside .aside-li:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside .aside-li.on{background-color:var(--bg-aside-on-cor)}.__document .aside .aside-li .aside-li-name{width:100%}.__document .aside .aside-li .aside-li-name .aside-li-name-alias{font-size:var(--fs-2)}.__document .aside .aside-li .aside-li-name .aside-li-name-aliass{font-size:var(--fs-1)}.__document .md{position:relative}.__document .use .use-component{padding:10px;display:flex;justify-content:center;align-items:center;height:300px;background-color:var(--bg-use-component-cor)}.__document .use .codemirror-div{background-color:var(--bg-code)}.__document .set-code .set-code-buts{display:flex;align-items:center}.__document .form-item.error{background-color:var(--te-test-err-cor)}.__document .compo .compo-top .compo-top-name{padding:10px;font-size:var(--fs-4)}.__document .compo .compo-top .compo-top-name .compo-top-name-li{font-size:var(--fs-2)}.__document .compo .compo-top .compo-top-info{padding:10px;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-info .compo-top-athor,.__document .compo .compo-top .compo-top-info .compo-top-date{flex:1;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-descriptions{padding:0 10px;font-size:var(--fs-2)}.__document .compo .compo-li h4{margin:10px 0 0;padding:10px}.__document .compo .compo-li .compo-talbe{width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body{border:1px solid var(--bor-cor);width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body td,.__document .compo .compo-li .compo-talbe .compo-talbe-body th{padding:5px 10px;border-bottom:1px solid var(--bor-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body th{background-color:var(--bg-table-th-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body td{background-color:var(--bg-table-td-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body tr:last-child td{border-bottom:0}.__document .compo .compo-li .compo-talbe .compo-talbe-body .compo-talbe-zw{width:100%;text-align:center;padding:10px}.__document .compo .compo-md{padding:10px;background-color:var(--bg-md-cor)}.__document .compo .compo-use{padding:10px;background-color:var(--bg-use-cor)}.__document .main .main-but{text-align:right;display:flex;flex-direction:row;align-items:center}.__document .test.error .test-top{background-color:var(--bg-test-err-cor)}.__document .test.proposal .test-top{background-color:var(--bg-test-pro-cor)}.__document .test.error-proposal .test-top{background-color:var(--bg-test-err-pro-cor)}.__document .test .test-top{padding:5px;background-color:var(--bg-test-cor)}.__document .test .test-top .test-top-error{color:var(--te-test-err-cor)}.__document .test .test-top .test-top-proposal{color:var(--te-test-pro-cor)}.__document .test .test-div .test-body{padding:5px;background-color:var(--bg-test-body)}.__document .code{padding:0}.__document .code .code-top .code-top-but,.__document .code .code-top .code-top-but .top-but-files{display:flex;flex-direction:row;align-items:center}.__document .code .code-highlightjs{padding:0}.__document .code .code-highlightjs .hljs{background-color:var(--bg-code-highlig)}.__document .box-url{position:relative}.__document .box-url:hover .box-url-box{display:block}.__document .box-url .box-url-box{position:fixed;top:25px;display:none;background-color:var(--bg-box-cor);font-size:var(--fs-1);color:var(--text-cor);z-index:100000}.__document .box-url .box-url-box .box-div-li{height:20px;line-height:20px;display:flex;flex-direction:row;align-items:center}.__document .box-url .box-url-box .box-div-li .box-div-li-span{white-space:nowrap;padding:5px 10px}.__document .__document-index{width:100%;height:100%;padding:0;margin:0;display:flex;flex-direction:row}.__document .__document-index .index-aside{width:250px;position:relative;z-index:100}.__document .__document-index .index-aside .index-aside-div{height:100%;overflow-y:auto;background-color:var(--bg-aside-cor)}.__document .__document-index .index-body{flex:1;position:relative;background-color:var(--bg-index-cor)}.__document .__document-index .index-body .index-div{padding:20px;position:absolute;inset:0;overflow-y:auto}.__document .__document-tests{padding:10px;height:100%;position:relative}.__document .__document-tests .tests-top .but-div.on{background-color:var(--bg-aside-on-cor)}.__document .__document-develop,.__document .__document-single{padding:10px;height:100%;position:relative}.__document .__document-single .single-top .single-top-li{display:flex;flex-direction:row;align-items:center}.__document .__document-single .single-top .single-top-li .single-top-li-span{padding:5px 10px}.__document .__document-compon{padding:10px;height:100%;position:relative}.__document .__document-compon .__document-compon-body.choice{padding-left:30px}.__document .__document-compon .__document-compon-choice{position:absolute;top:0;bottom:0;left:0;z-index:100;display:flex;overflow-y:auto;background-color:var(--bg-aside-cor)}.__document .__document-compon .__document-compon-choice .__document-compon-choice-but{cursor:pointer}.__document .__document-compon .__document-compon-choice .__document-compon-choice-but:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}
@@ -2466,6 +2466,15 @@ function getEmitsValue(arr) {
2466
2466
  return v;
2467
2467
  });
2468
2468
  }
2469
+ function getExposeValue(arr) {
2470
+ return arr.map((obj) => {
2471
+ const v = {};
2472
+ Object.keys(expose).forEach((key) => {
2473
+ v[key] = expose[key](obj);
2474
+ });
2475
+ return v;
2476
+ });
2477
+ }
2469
2478
 
2470
2479
  // packages/components/test/index.ts
2471
2480
  function getObj(v) {
@@ -2957,6 +2966,74 @@ var top_default2 = (0, import_vue2.defineComponent)({
2957
2966
  }
2958
2967
  });
2959
2968
 
2969
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-7O4MJOHM.js
2970
+ 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]*))$/;
2971
+ function getFunctionFormat(v) {
2972
+ if (!v) return;
2973
+ const str = typeof v === "function" ? v.toString() : v;
2974
+ const trimmed = str.trim();
2975
+ const match = trimmed.match(FUNCTION_REGEX);
2976
+ if (!match) {
2977
+ console.warn("Unsupported function format:", trimmed.slice(0, 100));
2978
+ return;
2979
+ }
2980
+ const [
2981
+ _,
2982
+ // 完整匹配
2983
+ asyncFlag,
2984
+ // 异步标志
2985
+ funcGenerator,
2986
+ // 函数生成器标志
2987
+ funcName,
2988
+ // 函数名称
2989
+ funcParams,
2990
+ // 函数参数
2991
+ methodGenerator,
2992
+ // 方法生成器标志
2993
+ methodName,
2994
+ // 方法名称
2995
+ methodParams,
2996
+ // 方法参数
2997
+ arrowParenParams,
2998
+ // 箭头函数括号参数
2999
+ arrowSingleParam,
3000
+ // 箭头函数单参数
3001
+ blockBody,
3002
+ // 块级函数体
3003
+ exprBody
3004
+ // 表达式函数体
3005
+ ] = match;
3006
+ let isAsync = !!asyncFlag;
3007
+ let isGenerator = false;
3008
+ let name = "";
3009
+ let param = "";
3010
+ let body = "";
3011
+ if (funcParams !== void 0) {
3012
+ isGenerator = funcGenerator === "*";
3013
+ name = funcName || "";
3014
+ param = funcParams;
3015
+ body = blockBody || exprBody || "";
3016
+ } else if (methodParams !== void 0) {
3017
+ isGenerator = methodGenerator?.includes("*") || false;
3018
+ name = methodName || "";
3019
+ param = methodParams;
3020
+ body = blockBody || exprBody || "";
3021
+ } else if (arrowParenParams !== void 0 || arrowSingleParam !== void 0) {
3022
+ param = arrowParenParams || arrowSingleParam || "";
3023
+ body = blockBody || exprBody || "";
3024
+ if (!blockBody && !/^\s*return\b/.test(body)) {
3025
+ body = `return ${body}`;
3026
+ }
3027
+ }
3028
+ return {
3029
+ isAsync,
3030
+ isGenerator,
3031
+ ...name && { name },
3032
+ param: param.trim(),
3033
+ body: body.trim()
3034
+ };
3035
+ }
3036
+
2960
3037
  // packages/components/use/util.ts
2961
3038
  function prettierFormat(st) {
2962
3039
  return st.replace(/\;(\s|\n\r)*$/, "");
@@ -2982,37 +3059,111 @@ function getFunBody(sr = "") {
2982
3059
  return sr;
2983
3060
  }
2984
3061
  }
2985
- function getFunctionFormat(v) {
2986
- if (v) {
2987
- let st = v.toString();
2988
- st = st.trim();
2989
- let name = "([a-z|A-Z|_|$][a-z|A-Z|_|$|0-9]*)?";
2990
- let fun = "(function\\s*" + name + "\\s*)?";
2991
- let param = "(\\([^\\(|\\)]*\\)\\s*)?";
2992
- let body = "[\\s|\\n|\\r]*\\{((.|\n|\r)+?)\\}[\\s|\\n|\\r]*";
2993
- let reg = new RegExp("^" + fun + param + body + "$");
2994
- let vts = reg.exec(st);
2995
- let obj = {
2996
- body: st,
2997
- name: "",
2998
- param: ""
3062
+ var jctypes = [
3063
+ "Boolean",
3064
+ "Any",
3065
+ "String",
3066
+ "Number",
3067
+ "Array",
3068
+ "Object",
3069
+ "Function"
3070
+ ];
3071
+ function conversionType(type) {
3072
+ if (jctypes.includes(type)) {
3073
+ return firstLower(type);
3074
+ } else {
3075
+ return type;
3076
+ }
3077
+ }
3078
+ function sonType(type) {
3079
+ let reg = new RegExp("^([a-z|A-Z]+)\\<(.+)\\>$");
3080
+ let vts = reg.exec(type);
3081
+ if (vts && vts.length > 0) {
3082
+ return {
3083
+ own: conversionType(vts[1]),
3084
+ son: vts[2]
2999
3085
  };
3000
- if (vts && vts.length > 0) {
3001
- obj.name = vts[2];
3002
- obj.param = vts[3];
3003
- obj.body = `{${vts[4]}}`;
3086
+ }
3087
+ }
3088
+ function sonTypes(type, arr) {
3089
+ let obj = sonType(type);
3090
+ if (obj) {
3091
+ arr.push(obj.own);
3092
+ if (obj.son) {
3093
+ sonTypes(obj.son, arr);
3004
3094
  }
3005
- obj.body = prettierFormat(obj.body);
3006
- return obj;
3095
+ } else {
3096
+ arr.push(type);
3097
+ }
3098
+ }
3099
+ function getSonType(type) {
3100
+ if (type instanceof Array) {
3101
+ type = type[0];
3007
3102
  }
3103
+ const arr = [];
3104
+ if (type) {
3105
+ sonTypes(type, arr);
3106
+ }
3107
+ return arr;
3108
+ }
3109
+ function getType(str) {
3110
+ let arr = [];
3111
+ if (str) {
3112
+ str = (str + "").trim();
3113
+ if (str.startsWith("[")) {
3114
+ str = str.substring(1, str.lastIndexOf("]"));
3115
+ arr = str.split(",");
3116
+ } else {
3117
+ const reg = /^\<([a-z|\<|\>|\|]+)\>/;
3118
+ let rts = reg.exec(str);
3119
+ if (rts && rts.length > 0) {
3120
+ let ass = rts[1];
3121
+ arr = ass.split("|");
3122
+ } else {
3123
+ arr = ["any"];
3124
+ }
3125
+ }
3126
+ } else {
3127
+ arr = ["any"];
3128
+ }
3129
+ return arr.map((o) => conversionType(o));
3130
+ }
3131
+ function setDataType(arr) {
3132
+ return arr.join("|");
3133
+ }
3134
+ function getParametersObj(cs) {
3135
+ let arrs = cs.split(",");
3136
+ return arrs.map((key) => {
3137
+ let vs = key.split(":");
3138
+ let name = vs[0];
3139
+ let t = vs[1] || "";
3140
+ let tarr = getSonType(getType(t));
3141
+ return {
3142
+ label: key,
3143
+ prop: name,
3144
+ type: tarr[0],
3145
+ dataType: tarr,
3146
+ description: t.substring(t.lastIndexOf("]") + 1)
3147
+ };
3148
+ });
3008
3149
  }
3009
3150
 
3010
3151
  // packages/components/use/code.ts
3011
3152
  var keywords = ["class"];
3012
- function getHmtl(propsname, value, slotValue, propsText) {
3153
+ function getSpecObjs(specs, name) {
3154
+ return specs.filter((o) => o.name == name)[0];
3155
+ }
3156
+ function getParameStr(css) {
3157
+ return css.map((o) => {
3158
+ return o.prop + ":" + setDataType(o.dataType);
3159
+ }).join(",");
3160
+ }
3161
+ function getHmtl(propsname, param, value, slotValue, propsText, exposeText) {
3013
3162
  const tarr = [];
3014
3163
  const sarr = [];
3015
3164
  let is = true;
3165
+ const es = getEmitsValue(param.emits);
3166
+ const res = getExposeValue(param.expose);
3016
3167
  Object.keys(value).forEach((key) => {
3017
3168
  let val = value[key];
3018
3169
  if (/^on[A-Z]/.test(key) && typeof val == "function") {
@@ -3038,8 +3189,15 @@ function getHmtl(propsname, value, slotValue, propsText) {
3038
3189
  strs = arr.join("");
3039
3190
  }
3040
3191
  tarr.push(" @" + name + '="' + strs + '"');
3041
- sarr.push("function " + strs + "(...arr) {");
3042
- sarr.push(" console.log('" + strs + "', arr)");
3192
+ const s = getSpecObjs(es, name).selectable;
3193
+ const css = getParametersObj(s);
3194
+ const cs = getParameStr(css);
3195
+ sarr.push("function " + strs + "(" + cs + ") {");
3196
+ css.forEach((o) => {
3197
+ sarr.push(
3198
+ " console.log('" + o.description + o.prop + "', " + o.prop + ")"
3199
+ );
3200
+ });
3043
3201
  sarr.push("}");
3044
3202
  } else {
3045
3203
  let z = key;
@@ -3065,6 +3223,47 @@ function getHmtl(propsname, value, slotValue, propsText) {
3065
3223
  }
3066
3224
  }
3067
3225
  });
3226
+ const ev = Object.values(exposeText || {});
3227
+ if (ev.length > 0) {
3228
+ if (is) {
3229
+ is = false;
3230
+ sarr.unshift("import { ref } from 'vue';");
3231
+ }
3232
+ tarr.unshift(' ref="refDom"');
3233
+ sarr.push("const refDom = ref()");
3234
+ ev.forEach((v) => {
3235
+ sarr.push(`-------${v.name}--------`);
3236
+ const s = getSpecObjs(res, v.name);
3237
+ const m = v.name + "Value";
3238
+ const css = getParametersObj(s.selectable);
3239
+ const cs = [];
3240
+ v.params?.forEach((val, index) => {
3241
+ const prop = css[index].prop;
3242
+ const key = prop + v.name;
3243
+ if (typeof val == "function") {
3244
+ sarr.push(
3245
+ "const " + key + " = " + getFunctionBody(val, prop, v.text)
3246
+ );
3247
+ } else {
3248
+ if (typeof val == "undefined") {
3249
+ sarr.push("const " + key + " = undefined;");
3250
+ } else {
3251
+ let st2 = setValStringify(val, prop, v.text);
3252
+ sarr.push("const " + key + " = " + st2 + ";");
3253
+ }
3254
+ }
3255
+ cs.push(key);
3256
+ });
3257
+ if (v.type === "function") {
3258
+ sarr.push(
3259
+ `const ${m} = refDom.value?.${v.name}(${cs.join(", ")})`
3260
+ );
3261
+ } else {
3262
+ sarr.push(`const ${m} = refDom.value?.${v.name}`);
3263
+ }
3264
+ sarr.push(`console.log('"${s.description}"', ${m})`);
3265
+ });
3266
+ }
3068
3267
  if (tarr.length > 0) {
3069
3268
  tarr.unshift("");
3070
3269
  }
@@ -3101,7 +3300,7 @@ ${vueFormat(v, " ")}
3101
3300
  function getFunctionBody(v, key, propsText) {
3102
3301
  const text = propsText ? propsText[key] : "";
3103
3302
  if (text) {
3104
- return "function " + text;
3303
+ return text;
3105
3304
  } else {
3106
3305
  return funstr(v.toString());
3107
3306
  }
@@ -3138,7 +3337,7 @@ function setValStringify(v, key, propsText) {
3138
3337
  }
3139
3338
  }
3140
3339
  function getSpecType(val) {
3141
- let tarr = getType(val.type);
3340
+ let tarr = getType2(val.type);
3142
3341
  let type = "any";
3143
3342
  if (tarr.length == 1) {
3144
3343
  type = tarr[0].split("<")[0];
@@ -3171,7 +3370,7 @@ function getSpecType(val) {
3171
3370
  dataType: tarr
3172
3371
  };
3173
3372
  }
3174
- function getType(value) {
3373
+ function getType2(value) {
3175
3374
  let arr = [];
3176
3375
  let str = (value || "").trim().toLowerCase();
3177
3376
  str.split(",").forEach((v) => {
@@ -3709,7 +3908,7 @@ function setVue(propsname, param, url) {
3709
3908
  propsObj[name] = () => {
3710
3909
  };
3711
3910
  });
3712
- const html = getHmtl(propsname, propsObj);
3911
+ const html = getHmtl(propsname, param, propsObj);
3713
3912
  Fang.fileOpen(url, html);
3714
3913
  }
3715
3914
  function getMdurl(obj) {
@@ -2451,6 +2451,15 @@ function getEmitsValue(arr) {
2451
2451
  return v;
2452
2452
  });
2453
2453
  }
2454
+ function getExposeValue(arr) {
2455
+ return arr.map((obj) => {
2456
+ const v = {};
2457
+ Object.keys(expose).forEach((key) => {
2458
+ v[key] = expose[key](obj);
2459
+ });
2460
+ return v;
2461
+ });
2462
+ }
2454
2463
 
2455
2464
  // packages/components/test/index.ts
2456
2465
  function getObj(v) {
@@ -2942,6 +2951,74 @@ var top_default2 = defineComponent2({
2942
2951
  }
2943
2952
  });
2944
2953
 
2954
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.25/node_modules/@fangzhongya/utils/dist/chunk-7O4MJOHM.js
2955
+ 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]*))$/;
2956
+ function getFunctionFormat(v) {
2957
+ if (!v) return;
2958
+ const str = typeof v === "function" ? v.toString() : v;
2959
+ const trimmed = str.trim();
2960
+ const match = trimmed.match(FUNCTION_REGEX);
2961
+ if (!match) {
2962
+ console.warn("Unsupported function format:", trimmed.slice(0, 100));
2963
+ return;
2964
+ }
2965
+ const [
2966
+ _,
2967
+ // 完整匹配
2968
+ asyncFlag,
2969
+ // 异步标志
2970
+ funcGenerator,
2971
+ // 函数生成器标志
2972
+ funcName,
2973
+ // 函数名称
2974
+ funcParams,
2975
+ // 函数参数
2976
+ methodGenerator,
2977
+ // 方法生成器标志
2978
+ methodName,
2979
+ // 方法名称
2980
+ methodParams,
2981
+ // 方法参数
2982
+ arrowParenParams,
2983
+ // 箭头函数括号参数
2984
+ arrowSingleParam,
2985
+ // 箭头函数单参数
2986
+ blockBody,
2987
+ // 块级函数体
2988
+ exprBody
2989
+ // 表达式函数体
2990
+ ] = match;
2991
+ let isAsync = !!asyncFlag;
2992
+ let isGenerator = false;
2993
+ let name = "";
2994
+ let param = "";
2995
+ let body = "";
2996
+ if (funcParams !== void 0) {
2997
+ isGenerator = funcGenerator === "*";
2998
+ name = funcName || "";
2999
+ param = funcParams;
3000
+ body = blockBody || exprBody || "";
3001
+ } else if (methodParams !== void 0) {
3002
+ isGenerator = methodGenerator?.includes("*") || false;
3003
+ name = methodName || "";
3004
+ param = methodParams;
3005
+ body = blockBody || exprBody || "";
3006
+ } else if (arrowParenParams !== void 0 || arrowSingleParam !== void 0) {
3007
+ param = arrowParenParams || arrowSingleParam || "";
3008
+ body = blockBody || exprBody || "";
3009
+ if (!blockBody && !/^\s*return\b/.test(body)) {
3010
+ body = `return ${body}`;
3011
+ }
3012
+ }
3013
+ return {
3014
+ isAsync,
3015
+ isGenerator,
3016
+ ...name && { name },
3017
+ param: param.trim(),
3018
+ body: body.trim()
3019
+ };
3020
+ }
3021
+
2945
3022
  // packages/components/use/util.ts
2946
3023
  function prettierFormat(st) {
2947
3024
  return st.replace(/\;(\s|\n\r)*$/, "");
@@ -2967,37 +3044,111 @@ function getFunBody(sr = "") {
2967
3044
  return sr;
2968
3045
  }
2969
3046
  }
2970
- function getFunctionFormat(v) {
2971
- if (v) {
2972
- let st = v.toString();
2973
- st = st.trim();
2974
- let name = "([a-z|A-Z|_|$][a-z|A-Z|_|$|0-9]*)?";
2975
- let fun = "(function\\s*" + name + "\\s*)?";
2976
- let param = "(\\([^\\(|\\)]*\\)\\s*)?";
2977
- let body = "[\\s|\\n|\\r]*\\{((.|\n|\r)+?)\\}[\\s|\\n|\\r]*";
2978
- let reg = new RegExp("^" + fun + param + body + "$");
2979
- let vts = reg.exec(st);
2980
- let obj = {
2981
- body: st,
2982
- name: "",
2983
- param: ""
3047
+ var jctypes = [
3048
+ "Boolean",
3049
+ "Any",
3050
+ "String",
3051
+ "Number",
3052
+ "Array",
3053
+ "Object",
3054
+ "Function"
3055
+ ];
3056
+ function conversionType(type) {
3057
+ if (jctypes.includes(type)) {
3058
+ return firstLower(type);
3059
+ } else {
3060
+ return type;
3061
+ }
3062
+ }
3063
+ function sonType(type) {
3064
+ let reg = new RegExp("^([a-z|A-Z]+)\\<(.+)\\>$");
3065
+ let vts = reg.exec(type);
3066
+ if (vts && vts.length > 0) {
3067
+ return {
3068
+ own: conversionType(vts[1]),
3069
+ son: vts[2]
2984
3070
  };
2985
- if (vts && vts.length > 0) {
2986
- obj.name = vts[2];
2987
- obj.param = vts[3];
2988
- obj.body = `{${vts[4]}}`;
3071
+ }
3072
+ }
3073
+ function sonTypes(type, arr) {
3074
+ let obj = sonType(type);
3075
+ if (obj) {
3076
+ arr.push(obj.own);
3077
+ if (obj.son) {
3078
+ sonTypes(obj.son, arr);
2989
3079
  }
2990
- obj.body = prettierFormat(obj.body);
2991
- return obj;
3080
+ } else {
3081
+ arr.push(type);
3082
+ }
3083
+ }
3084
+ function getSonType(type) {
3085
+ if (type instanceof Array) {
3086
+ type = type[0];
2992
3087
  }
3088
+ const arr = [];
3089
+ if (type) {
3090
+ sonTypes(type, arr);
3091
+ }
3092
+ return arr;
3093
+ }
3094
+ function getType(str) {
3095
+ let arr = [];
3096
+ if (str) {
3097
+ str = (str + "").trim();
3098
+ if (str.startsWith("[")) {
3099
+ str = str.substring(1, str.lastIndexOf("]"));
3100
+ arr = str.split(",");
3101
+ } else {
3102
+ const reg = /^\<([a-z|\<|\>|\|]+)\>/;
3103
+ let rts = reg.exec(str);
3104
+ if (rts && rts.length > 0) {
3105
+ let ass = rts[1];
3106
+ arr = ass.split("|");
3107
+ } else {
3108
+ arr = ["any"];
3109
+ }
3110
+ }
3111
+ } else {
3112
+ arr = ["any"];
3113
+ }
3114
+ return arr.map((o) => conversionType(o));
3115
+ }
3116
+ function setDataType(arr) {
3117
+ return arr.join("|");
3118
+ }
3119
+ function getParametersObj(cs) {
3120
+ let arrs = cs.split(",");
3121
+ return arrs.map((key) => {
3122
+ let vs = key.split(":");
3123
+ let name = vs[0];
3124
+ let t = vs[1] || "";
3125
+ let tarr = getSonType(getType(t));
3126
+ return {
3127
+ label: key,
3128
+ prop: name,
3129
+ type: tarr[0],
3130
+ dataType: tarr,
3131
+ description: t.substring(t.lastIndexOf("]") + 1)
3132
+ };
3133
+ });
2993
3134
  }
2994
3135
 
2995
3136
  // packages/components/use/code.ts
2996
3137
  var keywords = ["class"];
2997
- function getHmtl(propsname, value, slotValue, propsText) {
3138
+ function getSpecObjs(specs, name) {
3139
+ return specs.filter((o) => o.name == name)[0];
3140
+ }
3141
+ function getParameStr(css) {
3142
+ return css.map((o) => {
3143
+ return o.prop + ":" + setDataType(o.dataType);
3144
+ }).join(",");
3145
+ }
3146
+ function getHmtl(propsname, param, value, slotValue, propsText, exposeText) {
2998
3147
  const tarr = [];
2999
3148
  const sarr = [];
3000
3149
  let is = true;
3150
+ const es = getEmitsValue(param.emits);
3151
+ const res = getExposeValue(param.expose);
3001
3152
  Object.keys(value).forEach((key) => {
3002
3153
  let val = value[key];
3003
3154
  if (/^on[A-Z]/.test(key) && typeof val == "function") {
@@ -3023,8 +3174,15 @@ function getHmtl(propsname, value, slotValue, propsText) {
3023
3174
  strs = arr.join("");
3024
3175
  }
3025
3176
  tarr.push(" @" + name + '="' + strs + '"');
3026
- sarr.push("function " + strs + "(...arr) {");
3027
- sarr.push(" console.log('" + strs + "', arr)");
3177
+ const s = getSpecObjs(es, name).selectable;
3178
+ const css = getParametersObj(s);
3179
+ const cs = getParameStr(css);
3180
+ sarr.push("function " + strs + "(" + cs + ") {");
3181
+ css.forEach((o) => {
3182
+ sarr.push(
3183
+ " console.log('" + o.description + o.prop + "', " + o.prop + ")"
3184
+ );
3185
+ });
3028
3186
  sarr.push("}");
3029
3187
  } else {
3030
3188
  let z = key;
@@ -3050,6 +3208,47 @@ function getHmtl(propsname, value, slotValue, propsText) {
3050
3208
  }
3051
3209
  }
3052
3210
  });
3211
+ const ev = Object.values(exposeText || {});
3212
+ if (ev.length > 0) {
3213
+ if (is) {
3214
+ is = false;
3215
+ sarr.unshift("import { ref } from 'vue';");
3216
+ }
3217
+ tarr.unshift(' ref="refDom"');
3218
+ sarr.push("const refDom = ref()");
3219
+ ev.forEach((v) => {
3220
+ sarr.push(`-------${v.name}--------`);
3221
+ const s = getSpecObjs(res, v.name);
3222
+ const m = v.name + "Value";
3223
+ const css = getParametersObj(s.selectable);
3224
+ const cs = [];
3225
+ v.params?.forEach((val, index) => {
3226
+ const prop = css[index].prop;
3227
+ const key = prop + v.name;
3228
+ if (typeof val == "function") {
3229
+ sarr.push(
3230
+ "const " + key + " = " + getFunctionBody(val, prop, v.text)
3231
+ );
3232
+ } else {
3233
+ if (typeof val == "undefined") {
3234
+ sarr.push("const " + key + " = undefined;");
3235
+ } else {
3236
+ let st2 = setValStringify(val, prop, v.text);
3237
+ sarr.push("const " + key + " = " + st2 + ";");
3238
+ }
3239
+ }
3240
+ cs.push(key);
3241
+ });
3242
+ if (v.type === "function") {
3243
+ sarr.push(
3244
+ `const ${m} = refDom.value?.${v.name}(${cs.join(", ")})`
3245
+ );
3246
+ } else {
3247
+ sarr.push(`const ${m} = refDom.value?.${v.name}`);
3248
+ }
3249
+ sarr.push(`console.log('"${s.description}"', ${m})`);
3250
+ });
3251
+ }
3053
3252
  if (tarr.length > 0) {
3054
3253
  tarr.unshift("");
3055
3254
  }
@@ -3086,7 +3285,7 @@ ${vueFormat(v, " ")}
3086
3285
  function getFunctionBody(v, key, propsText) {
3087
3286
  const text = propsText ? propsText[key] : "";
3088
3287
  if (text) {
3089
- return "function " + text;
3288
+ return text;
3090
3289
  } else {
3091
3290
  return funstr(v.toString());
3092
3291
  }
@@ -3123,7 +3322,7 @@ function setValStringify(v, key, propsText) {
3123
3322
  }
3124
3323
  }
3125
3324
  function getSpecType(val) {
3126
- let tarr = getType(val.type);
3325
+ let tarr = getType2(val.type);
3127
3326
  let type = "any";
3128
3327
  if (tarr.length == 1) {
3129
3328
  type = tarr[0].split("<")[0];
@@ -3156,7 +3355,7 @@ function getSpecType(val) {
3156
3355
  dataType: tarr
3157
3356
  };
3158
3357
  }
3159
- function getType(value) {
3358
+ function getType2(value) {
3160
3359
  let arr = [];
3161
3360
  let str = (value || "").trim().toLowerCase();
3162
3361
  str.split(",").forEach((v) => {
@@ -3694,7 +3893,7 @@ function setVue(propsname, param, url) {
3694
3893
  propsObj[name] = () => {
3695
3894
  };
3696
3895
  });
3697
- const html = getHmtl(propsname, propsObj);
3896
+ const html = getHmtl(propsname, param, propsObj);
3698
3897
  Fang.fileOpen(url, html);
3699
3898
  }
3700
3899
  function getMdurl(obj) {