@fangzhongya/utils 0.0.8-6 → 0.0.8-60

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 (244) hide show
  1. package/dist/basic/array/asyncMergeArray.cjs +2 -2
  2. package/dist/basic/array/asyncMergeArray.d.ts +6 -6
  3. package/dist/basic/array/asyncMergeArray.js +1 -1
  4. package/dist/basic/array/deleteArray.cjs +7 -0
  5. package/dist/basic/array/deleteArray.d.ts +6 -0
  6. package/dist/basic/array/deleteArray.js +7 -0
  7. package/dist/basic/array/duplicateRemoval.d.ts +6 -6
  8. package/dist/basic/array/index.cjs +8 -4
  9. package/dist/basic/array/index.d.ts +1 -0
  10. package/dist/basic/array/index.js +9 -5
  11. package/dist/basic/array/isArray.d.ts +5 -5
  12. package/dist/basic/array/replaceAfter.d.ts +7 -7
  13. package/dist/basic/array/toggleArray.d.ts +7 -7
  14. package/dist/basic/index.cjs +18 -9
  15. package/dist/basic/index.d.ts +16 -7
  16. package/dist/basic/index.js +17 -8
  17. package/dist/basic/object/attrValueSort.cjs +7 -0
  18. package/dist/basic/object/attrValueSort.d.ts +12 -0
  19. package/dist/basic/object/attrValueSort.js +7 -0
  20. package/dist/basic/object/deepCopy.cjs +7 -0
  21. package/dist/basic/object/deepCopy.d.ts +8 -0
  22. package/dist/basic/object/deepCopy.js +7 -0
  23. package/dist/basic/object/filterObject.cjs +7 -0
  24. package/dist/basic/object/filterObject.d.ts +14 -0
  25. package/dist/basic/object/filterObject.js +7 -0
  26. package/dist/basic/object/getSort.cjs +7 -0
  27. package/dist/basic/object/getSort.d.ts +10 -0
  28. package/dist/basic/object/getSort.js +7 -0
  29. package/dist/basic/object/hasOwn.cjs +7 -0
  30. package/dist/basic/object/hasOwn.d.ts +9 -0
  31. package/dist/basic/object/hasOwn.js +7 -0
  32. package/dist/basic/object/index.cjs +27 -3
  33. package/dist/basic/object/index.d.ts +6 -0
  34. package/dist/basic/object/index.js +27 -3
  35. package/dist/basic/object/isObject.d.ts +5 -5
  36. package/dist/basic/object/isObjectArray.d.ts +5 -5
  37. package/dist/basic/object/mergeObject.d.ts +8 -8
  38. package/dist/basic/object/setSort.cjs +7 -0
  39. package/dist/basic/object/setSort.d.ts +7 -0
  40. package/dist/basic/object/setSort.js +7 -0
  41. package/dist/basic/object/unmergeObject.d.ts +8 -8
  42. package/dist/basic/string/appearNum.d.ts +6 -6
  43. package/dist/basic/string/appearNumSeat.d.ts +7 -7
  44. package/dist/basic/string/firstLower.d.ts +5 -5
  45. package/dist/basic/string/firstUpper.d.ts +5 -5
  46. package/dist/basic/string/getStartSame.d.ts +6 -6
  47. package/dist/basic/string/getStartSames.d.ts +6 -6
  48. package/dist/basic/string/index.cjs +16 -4
  49. package/dist/basic/string/index.d.ts +2 -0
  50. package/dist/basic/string/index.js +17 -5
  51. package/dist/basic/string/splitUpper.d.ts +5 -5
  52. package/dist/basic/string/toFunction.cjs +9 -0
  53. package/dist/basic/string/toFunction.d.ts +11 -0
  54. package/dist/basic/string/toFunction.js +9 -0
  55. package/dist/basic/string/toJson.cjs +10 -0
  56. package/dist/basic/string/toJson.d.ts +7 -0
  57. package/dist/basic/string/toJson.js +10 -0
  58. package/dist/chunk-22KQAIES.cjs +44 -0
  59. package/dist/chunk-2OR4FUOA.cjs +47 -0
  60. package/dist/chunk-2QGQBPEX.js +15 -0
  61. package/dist/chunk-2TWAHAYB.js +20 -0
  62. package/dist/chunk-3CNQO7VA.js +73 -0
  63. package/dist/chunk-3IR2ABRO.js +8 -0
  64. package/dist/chunk-3LWFUVER.js +60 -0
  65. package/dist/chunk-4X7AFGTV.cjs +21 -0
  66. package/dist/{chunk-PB6FN2XC.cjs → chunk-5BJORXPX.cjs} +25 -1
  67. package/dist/chunk-6O6YWEOS.cjs +20 -0
  68. package/dist/chunk-6YI3CDEW.js +35 -0
  69. package/dist/chunk-7AIT4XSD.cjs +13 -0
  70. package/dist/chunk-7HIO5Z2A.js +44 -0
  71. package/dist/chunk-AFKJQ4QP.js +35 -0
  72. package/dist/chunk-BMUGXWAO.cjs +26 -0
  73. package/dist/chunk-BPJMBYDX.cjs +73 -0
  74. package/dist/{chunk-HQFPDOWY.js → chunk-CO347JUB.js} +26 -2
  75. package/dist/chunk-D2WYYC5Y.js +35 -0
  76. package/dist/chunk-D3SX7OUV.cjs +11 -0
  77. package/dist/chunk-EWXBN4VG.cjs +21 -0
  78. package/dist/{chunk-QTMFFVOO.cjs → chunk-FGQXKLTH.cjs} +8 -3
  79. package/dist/chunk-GFAUQTB2.cjs +33 -0
  80. package/dist/chunk-GIAO77MY.js +49 -0
  81. package/dist/chunk-GOUC2DFA.cjs +8 -0
  82. package/dist/{chunk-JE4B4G3M.js → chunk-HWOO7GVI.js} +3 -3
  83. package/dist/chunk-IIKQHLKT.cjs +60 -0
  84. package/dist/chunk-J2GSJKCY.cjs +20 -0
  85. package/dist/chunk-JYPJ5QJ5.cjs +35 -0
  86. package/dist/{chunk-JLEIVV37.cjs → chunk-KHGCW3A7.cjs} +7 -7
  87. package/dist/chunk-KQR7FXBF.js +20 -0
  88. package/dist/chunk-LEPZYF2N.cjs +49 -0
  89. package/dist/chunk-MGX7U2CG.cjs +20 -0
  90. package/dist/chunk-MQHLAQQA.js +21 -0
  91. package/dist/chunk-N3FZ4WUI.js +16 -0
  92. package/dist/chunk-NCSN3MC5.js +21 -0
  93. package/dist/{chunk-NKIDWRRS.cjs → chunk-NMA3RPU4.cjs} +7 -3
  94. package/dist/chunk-OJFV3426.js +17 -0
  95. package/dist/{chunk-V3FWFWP2.cjs → chunk-PCS4RBZZ.cjs} +15 -3
  96. package/dist/chunk-PTLVJ5OL.cjs +17 -0
  97. package/dist/{chunk-2W7EPKCY.js → chunk-PVYBDMBK.js} +5 -5
  98. package/dist/chunk-Q63V2U5G.js +47 -0
  99. package/dist/chunk-Q6FMBSK4.js +27 -0
  100. package/dist/{chunk-IQHASAHU.js → chunk-QJVB3JIZ.js} +8 -3
  101. package/dist/{chunk-AVO4AWYH.cjs → chunk-QZVMLHFW.cjs} +2 -2
  102. package/dist/chunk-S42NGJ5W.js +11 -0
  103. package/dist/{chunk-P2CYIUCC.js → chunk-SRPYR2RT.js} +16 -4
  104. package/dist/chunk-T3FAFGFD.cjs +35 -0
  105. package/dist/chunk-T4BAVDTH.js +31 -0
  106. package/dist/{chunk-VNVG4BJ4.cjs → chunk-TCMJPIRM.cjs} +16 -12
  107. package/dist/chunk-TE3XNGF4.cjs +16 -0
  108. package/dist/chunk-UFYLVZNU.cjs +31 -0
  109. package/dist/{chunk-O2RP4UZQ.cjs → chunk-UGFSIZ5P.cjs} +2 -23
  110. package/dist/chunk-UJS77V4S.cjs +24 -0
  111. package/dist/chunk-UPPSZFBE.cjs +121 -0
  112. package/dist/{chunk-NSG7ZMXT.js → chunk-V3AYCU2W.js} +4 -4
  113. package/dist/chunk-VBS6YE6H.js +121 -0
  114. package/dist/chunk-VOMPPHW6.js +26 -0
  115. package/dist/chunk-VY5VQ7WE.cjs +21 -0
  116. package/dist/chunk-WIYZQNGO.js +33 -0
  117. package/dist/chunk-WLBKU7NM.cjs +15 -0
  118. package/dist/chunk-WPW3M5AP.js +20 -0
  119. package/dist/{chunk-76ZUEOEJ.js → chunk-WW6SKIVB.js} +8 -4
  120. package/dist/{chunk-QKLVFB74.js → chunk-WX3JYE47.js} +2 -23
  121. package/dist/chunk-XUL6LPTN.js +21 -0
  122. package/dist/{chunk-HVDU25XB.js → chunk-Y5WYKSYG.js} +1 -1
  123. package/dist/chunk-ZEAT23CI.js +13 -0
  124. package/dist/chunk-ZJIRJ4YJ.cjs +35 -0
  125. package/dist/{chunk-L6DY4GCH.cjs → chunk-ZLCUSADU.cjs} +5 -5
  126. package/dist/css/fetchUnitValue.cjs +2 -2
  127. package/dist/css/fetchUnitValue.d.ts +7 -7
  128. package/dist/css/fetchUnitValue.js +1 -1
  129. package/dist/css/getAttrObj.cjs +7 -0
  130. package/dist/css/getAttrObj.d.ts +11 -0
  131. package/dist/css/getAttrObj.js +7 -0
  132. package/dist/css/getCss.d.ts +7 -1
  133. package/dist/css/getPositionRelative.cjs +8 -0
  134. package/dist/css/getPositionRelative.d.ts +7 -0
  135. package/dist/css/getPositionRelative.js +8 -0
  136. package/dist/css/getPrentClass.cjs +8 -0
  137. package/dist/css/getPrentClass.d.ts +7 -0
  138. package/dist/css/getPrentClass.js +8 -0
  139. package/dist/css/getPrentCorres.cjs +7 -0
  140. package/dist/css/getPrentCorres.d.ts +7 -0
  141. package/dist/css/getPrentCorres.js +7 -0
  142. package/dist/css/getSVG.cjs +8 -0
  143. package/dist/css/getSVG.d.ts +14 -0
  144. package/dist/css/getSVG.js +8 -0
  145. package/dist/css/index.cjs +25 -4
  146. package/dist/css/index.d.ts +5 -0
  147. package/dist/css/index.js +25 -4
  148. package/dist/css/setCss.cjs +3 -2
  149. package/dist/css/setCss.d.ts +9 -1
  150. package/dist/css/setCss.js +2 -1
  151. package/dist/dom/getLocus.cjs +7 -0
  152. package/dist/dom/getLocus.d.ts +14 -0
  153. package/dist/dom/getLocus.js +7 -0
  154. package/dist/dom/getShiftEvent.cjs +13 -0
  155. package/dist/dom/getShiftEvent.d.ts +25 -0
  156. package/dist/dom/getShiftEvent.js +13 -0
  157. package/dist/dom/index.cjs +18 -0
  158. package/dist/dom/index.d.ts +2 -0
  159. package/dist/dom/index.js +18 -0
  160. package/dist/html/analysisHtml.cjs +8 -0
  161. package/dist/html/analysisHtml.d.ts +13 -0
  162. package/dist/html/analysisHtml.js +8 -0
  163. package/dist/html/htmlEscape.cjs +7 -0
  164. package/dist/html/htmlEscape.d.ts +8 -0
  165. package/dist/html/htmlEscape.js +7 -0
  166. package/dist/html/index.cjs +13 -0
  167. package/dist/html/index.d.ts +2 -0
  168. package/dist/html/index.js +13 -0
  169. package/dist/{index-b16b81dc.d.ts → index-123cda08.d.ts} +3 -0
  170. package/dist/index-22ee0e10.d.ts +13 -0
  171. package/dist/{index-eef2a16c.d.ts → index-4d550d78.d.ts} +10 -0
  172. package/dist/index-5aea66bb.d.ts +21 -0
  173. package/dist/index-614c8bf9.d.ts +31 -0
  174. package/dist/index-ae0241ec.d.ts +13 -0
  175. package/dist/index-bc08cd32.d.ts +14 -0
  176. package/dist/index-ed8c0e9f.d.ts +37 -0
  177. package/dist/index.cjs +70 -39
  178. package/dist/index.d.ts +31 -9
  179. package/dist/index.js +70 -39
  180. package/dist/judge/index.cjs +6 -6
  181. package/dist/judge/index.js +5 -5
  182. package/dist/judge/matchs.cjs +3 -3
  183. package/dist/judge/matchs.d.ts +7 -7
  184. package/dist/judge/matchs.js +2 -2
  185. package/dist/judge/matchsEnd.d.ts +6 -6
  186. package/dist/judge/matchsStart.d.ts +6 -6
  187. package/dist/judge/matchsWhole.d.ts +6 -6
  188. package/dist/load/getSynch.d.ts +5 -5
  189. package/dist/load/index.cjs +3 -3
  190. package/dist/load/index.js +4 -4
  191. package/dist/log/styleLog.d.ts +65 -65
  192. package/dist/name/getComponentNames.cjs +3 -3
  193. package/dist/name/getComponentNames.d.ts +5 -5
  194. package/dist/name/getComponentNames.js +2 -2
  195. package/dist/name/getNames.cjs +3 -3
  196. package/dist/name/getNames.d.ts +5 -5
  197. package/dist/name/getNames.js +2 -2
  198. package/dist/name/humpToLine.d.ts +5 -5
  199. package/dist/name/index.cjs +7 -7
  200. package/dist/name/index.js +6 -6
  201. package/dist/name/lineToLargeHump.d.ts +5 -5
  202. package/dist/name/lineToSmallHump.d.ts +5 -5
  203. package/dist/node/getPort.cjs +2 -2
  204. package/dist/node/getPort.d.ts +10 -7
  205. package/dist/node/getPort.js +1 -1
  206. package/dist/node/index.cjs +3 -3
  207. package/dist/node/index.js +2 -2
  208. package/dist/tree/getTreeObj.cjs +11 -0
  209. package/dist/tree/getTreeObj.d.ts +26 -0
  210. package/dist/tree/getTreeObj.js +11 -0
  211. package/dist/tree/index.cjs +12 -0
  212. package/dist/tree/index.d.ts +1 -0
  213. package/dist/tree/index.js +12 -0
  214. package/dist/urls/getImportUrl.d.ts +6 -6
  215. package/dist/urls/getImportUrlSuffix.d.ts +6 -6
  216. package/dist/urls/getNewFileName.d.ts +5 -5
  217. package/dist/urls/getReplaceImportUrl.d.ts +6 -6
  218. package/dist/urls/getReplaceUrl.d.ts +6 -6
  219. package/dist/urls/getSuffix.d.ts +5 -5
  220. package/dist/urls/getUrlCatalogue.d.ts +5 -5
  221. package/dist/urls/getUrlCatalogueLast.d.ts +5 -5
  222. package/dist/urls/getUrlCatalogueObj.d.ts +14 -14
  223. package/dist/urls/index.cjs +10 -10
  224. package/dist/urls/index.js +13 -13
  225. package/package.json +186 -72
  226. package/dist/chunk-36NQW7GX.cjs +0 -24
  227. package/dist/chunk-6WSP6FLZ.cjs +0 -8
  228. package/dist/chunk-7IXRH3MU.js +0 -8
  229. package/dist/chunk-7KXJO4NI.js +0 -24
  230. package/dist/chunk-DGOE2UXJ.cjs +0 -24
  231. package/dist/chunk-XQB2HUHZ.js +0 -23
  232. package/dist/index-82b62caf.d.ts +0 -16
  233. package/dist/index-b93e2bc6.d.ts +0 -13
  234. package/dist/index-fab49d44.d.ts +0 -19
  235. package/dist/{chunk-AW3EGUGB.cjs → chunk-AXAVKIR3.cjs} +2 -2
  236. package/dist/{chunk-BWNLZJJG.js → chunk-EJWFLQF3.js} +3 -3
  237. package/dist/{chunk-33X65PQS.js → chunk-FRGDQOX4.js} +3 -3
  238. package/dist/{chunk-PAJDTMC5.cjs → chunk-KRBTSMT2.cjs} +3 -3
  239. package/dist/{chunk-VIVEXAEC.cjs → chunk-LPDYEUMB.cjs} +9 -9
  240. package/dist/{chunk-X6SR256S.js → chunk-MYS6DR74.js} +12 -12
  241. package/dist/{chunk-3YUI42XN.cjs → chunk-NGQKVTCR.cjs} +3 -3
  242. package/dist/{chunk-5UV36ZIW.cjs → chunk-O6P3QI3B.cjs} +3 -3
  243. package/dist/{chunk-MXLYIZIX.js → chunk-VRRDYCUH.js} +3 -3
  244. package/dist/{chunk-PN4OFZGM.js → chunk-XCTPS2CO.js} +3 -3
@@ -0,0 +1,49 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkTE3XNGF4cjs = require('./chunk-TE3XNGF4.cjs');
4
+
5
+ // packages/html/analysisHtml.ts
6
+ function analysisHtml(str) {
7
+ const arr = [];
8
+ getHtml(arr, str);
9
+ return arr;
10
+ }
11
+ function getHtml(arr, str) {
12
+ const reg = /(<\/([a-z|A-Z][^\s|>]*)>)|(<([a-z|A-Z][^\s>/]*)((\s*([^\s="'/|>]+)(=('([^']*)'|"([^"]*)"|([^\s/>]*)))?\s*)*)(>|\/>))/g;
13
+ const rs = reg.exec(str);
14
+ if (rs && rs.length > 0) {
15
+ if (rs.index != 0) {
16
+ arr.push(str.substring(0, rs.index));
17
+ }
18
+ str = str.substring(rs.index + rs[0].length);
19
+ const js = rs[2];
20
+ if (js) {
21
+ return str;
22
+ }
23
+ const obj = {
24
+ div: rs[4],
25
+ attr: rs[5] ? _chunkTE3XNGF4cjs.getAttrObj.call(void 0, rs[5]) : void 0,
26
+ value: []
27
+ };
28
+ if (rs[13] == "/>") {
29
+ arr.push(obj);
30
+ } else {
31
+ arr.push(obj);
32
+ if (str) {
33
+ str = getHtml(obj.value, str);
34
+ }
35
+ }
36
+ if (str) {
37
+ return getHtml(arr, str);
38
+ } else {
39
+ return "";
40
+ }
41
+ } else {
42
+ arr.push(str);
43
+ return "";
44
+ }
45
+ }
46
+
47
+
48
+
49
+ exports.analysisHtml = analysisHtml;
@@ -0,0 +1,20 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkLEPZYF2Ncjs = require('./chunk-LEPZYF2N.cjs');
4
+
5
+
6
+ var _chunkEWXBN4VGcjs = require('./chunk-EWXBN4VG.cjs');
7
+
8
+
9
+ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
10
+
11
+ // packages/html/index.ts
12
+ var html_exports = {};
13
+ _chunk5AZGAKWRcjs.__export.call(void 0, html_exports, {
14
+ analysisHtml: () => _chunkLEPZYF2Ncjs.analysisHtml,
15
+ htmlEscape: () => _chunkEWXBN4VGcjs.htmlEscape
16
+ });
17
+
18
+
19
+
20
+ exports.html_exports = html_exports;
@@ -0,0 +1,21 @@
1
+ import {
2
+ getCss
3
+ } from "./chunk-5RZYHE3X.js";
4
+
5
+ // packages/css/getPositionRelative.ts
6
+ function getPositionRelative(el, str = "relative") {
7
+ if (el && el.parentElement) {
8
+ const fel = el.parentElement;
9
+ if (getCss(fel, "position") == str) {
10
+ return fel;
11
+ } else {
12
+ return getPositionRelative(fel);
13
+ }
14
+ } else {
15
+ return el;
16
+ }
17
+ }
18
+
19
+ export {
20
+ getPositionRelative
21
+ };
@@ -0,0 +1,16 @@
1
+ // packages/css/getAttrObj.ts
2
+ function getAttrObj(str) {
3
+ const reg = /\s*([^\s="'/>]+)(=('([^']*)'|"([^"]*)"|([^\s/>]*)))?\s*/g;
4
+ let result;
5
+ const obj = {};
6
+ while ((result = reg.exec(str)) !== null) {
7
+ const key = result[1];
8
+ const value = result[5] || result[3];
9
+ obj[key] = value;
10
+ }
11
+ return obj;
12
+ }
13
+
14
+ export {
15
+ getAttrObj
16
+ };
@@ -0,0 +1,21 @@
1
+ // packages/html/htmlEscape.ts
2
+ var zObj = {
3
+ "<": "&lt;",
4
+ ">": "&gt;",
5
+ '"': "&quot;",
6
+ "'": "&#039;",
7
+ " ": "&nbsp;"
8
+ };
9
+ function htmlEscape(str) {
10
+ str = str.replace(/&(?!\w+;)/g, "&amp;");
11
+ return str.replace(/[<>&" ']/g, (c) => {
12
+ if (c) {
13
+ return zObj[c] || c;
14
+ }
15
+ return c;
16
+ });
17
+ }
18
+
19
+ export {
20
+ htmlEscape
21
+ };
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkAXMOZZCMcjs = require('./chunk-AXMOZZCM.cjs');
3
+ var _chunkTCMJPIRMcjs = require('./chunk-TCMJPIRM.cjs');
4
4
 
5
5
 
6
- var _chunkVNVG4BJ4cjs = require('./chunk-VNVG4BJ4.cjs');
6
+ var _chunkT3FAFGFDcjs = require('./chunk-T3FAFGFD.cjs');
7
7
 
8
8
 
9
9
  var _chunkGD3OA7GUcjs = require('./chunk-GD3OA7GU.cjs');
@@ -12,6 +12,9 @@ var _chunkGD3OA7GUcjs = require('./chunk-GD3OA7GU.cjs');
12
12
  var _chunkLG7MY5KLcjs = require('./chunk-LG7MY5KL.cjs');
13
13
 
14
14
 
15
+ var _chunkAXMOZZCMcjs = require('./chunk-AXMOZZCM.cjs');
16
+
17
+
15
18
  var _chunkISHLY7WMcjs = require('./chunk-ISHLY7WM.cjs');
16
19
 
17
20
 
@@ -20,7 +23,8 @@ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
20
23
  // packages/basic/array/index.ts
21
24
  var array_exports = {};
22
25
  _chunk5AZGAKWRcjs.__export.call(void 0, array_exports, {
23
- asyncMergeArray: () => _chunkVNVG4BJ4cjs.asyncMergeArray,
26
+ asyncMergeArray: () => _chunkTCMJPIRMcjs.asyncMergeArray,
27
+ deleteArray: () => _chunkT3FAFGFDcjs.deleteArray,
24
28
  duplicateRemoval: () => _chunkGD3OA7GUcjs.duplicateRemoval,
25
29
  isArray: () => _chunkISHLY7WMcjs.isArray,
26
30
  replaceAfter: () => _chunkLG7MY5KLcjs.replaceAfter,
@@ -0,0 +1,17 @@
1
+ // packages/css/getPrentCorres.ts
2
+ function getPrentCorres(el, is) {
3
+ if (is(el)) {
4
+ return el;
5
+ } else {
6
+ const fel = el.parentElement;
7
+ if (fel) {
8
+ return getPrentCorres(fel, is);
9
+ } else {
10
+ return;
11
+ }
12
+ }
13
+ }
14
+
15
+ export {
16
+ getPrentCorres
17
+ };
@@ -1,9 +1,17 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkJ7S3KBHLcjs = require('./chunk-J7S3KBHL.cjs');
3
+ var _chunkL7FSHU27cjs = require('./chunk-L7FSHU27.cjs');
4
4
 
5
5
 
6
- var _chunkL7FSHU27cjs = require('./chunk-L7FSHU27.cjs');
6
+
7
+ var _chunkJYPJ5QJ5cjs = require('./chunk-JYPJ5QJ5.cjs');
8
+
9
+
10
+
11
+ var _chunkZJIRJ4YJcjs = require('./chunk-ZJIRJ4YJ.cjs');
12
+
13
+
14
+ var _chunkJ7S3KBHLcjs = require('./chunk-J7S3KBHL.cjs');
7
15
 
8
16
 
9
17
  var _chunk3HXQ7TGVcjs = require('./chunk-3HXQ7TGV.cjs');
@@ -30,9 +38,13 @@ _chunk5AZGAKWRcjs.__export.call(void 0, string_exports, {
30
38
  appearNumSeat: () => _chunkJR6ZN6QDcjs.appearNumSeat,
31
39
  firstLower: () => _chunkUEVMS6QDcjs.firstLower,
32
40
  firstUpper: () => _chunkOQL4GIEJcjs.firstUpper,
41
+ getFunctionFormat: () => _chunkZJIRJ4YJcjs.getFunctionFormat,
33
42
  getStartSame: () => _chunkJ7S3KBHLcjs.getStartSame,
34
43
  getStartSames: () => _chunkPW7RP73Jcjs.getStartSames,
35
- splitUpper: () => _chunkL7FSHU27cjs.splitUpper
44
+ splitUpper: () => _chunkL7FSHU27cjs.splitUpper,
45
+ toFunction: () => _chunkZJIRJ4YJcjs.toFunction,
46
+ toJSONParse: () => _chunkJYPJ5QJ5cjs.toJSONParse,
47
+ toJSONStringify: () => _chunkJYPJ5QJ5cjs.toJSONStringify
36
48
  });
37
49
 
38
50
 
@@ -0,0 +1,17 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/css/getPrentCorres.ts
2
+ function getPrentCorres(el, is) {
3
+ if (is(el)) {
4
+ return el;
5
+ } else {
6
+ const fel = el.parentElement;
7
+ if (fel) {
8
+ return getPrentCorres(fel, is);
9
+ } else {
10
+ return;
11
+ }
12
+ }
13
+ }
14
+
15
+
16
+
17
+ exports.getPrentCorres = getPrentCorres;
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  getComponentNames
3
- } from "./chunk-MXLYIZIX.js";
3
+ } from "./chunk-VRRDYCUH.js";
4
4
  import {
5
5
  getNames
6
- } from "./chunk-BWNLZJJG.js";
7
- import {
8
- humpToLine
9
- } from "./chunk-J7CICTHH.js";
6
+ } from "./chunk-EJWFLQF3.js";
10
7
  import {
11
8
  lineToSmallHump
12
9
  } from "./chunk-AM67P3W7.js";
13
10
  import {
14
11
  lineToLargeHump
15
12
  } from "./chunk-XCDKXZFR.js";
13
+ import {
14
+ humpToLine
15
+ } from "./chunk-J7CICTHH.js";
16
16
  import {
17
17
  __export
18
18
  } from "./chunk-UICA3PK6.js";
@@ -0,0 +1,47 @@
1
+ // packages/dom/getLocus.ts
2
+ function getLocus(ks, js) {
3
+ const x = js.clientX - ks.clientX;
4
+ const y = js.clientY - ks.clientY;
5
+ return {
6
+ x,
7
+ y,
8
+ t: locus(x, y)
9
+ };
10
+ }
11
+ function locus(x, y, mim = 10) {
12
+ const isX = x > 0 + mim || x < 0 - mim;
13
+ const isY = y > 0 + mim || y < 0 - mim;
14
+ if (isX && isY) {
15
+ if (x > 0) {
16
+ if (y > 0) {
17
+ return 5;
18
+ } else {
19
+ return 6;
20
+ }
21
+ } else {
22
+ if (y > 0) {
23
+ return 7;
24
+ } else {
25
+ return 8;
26
+ }
27
+ }
28
+ } else if (isX) {
29
+ if (x > 0) {
30
+ return 1;
31
+ } else {
32
+ return 2;
33
+ }
34
+ } else if (isY) {
35
+ if (y > 0) {
36
+ return 3;
37
+ } else {
38
+ return 4;
39
+ }
40
+ } else {
41
+ return 0;
42
+ }
43
+ }
44
+
45
+ export {
46
+ getLocus
47
+ };
@@ -0,0 +1,27 @@
1
+ // packages/basic/array/asyncMergeArray.ts
2
+ function asyncMergeArray(arr, callback) {
3
+ return new Promise((resolve, reject) => {
4
+ let index = 0;
5
+ const k = arr.length;
6
+ if (k > 0) {
7
+ arr.forEach((...a) => {
8
+ callback(
9
+ (...arr2) => {
10
+ index++;
11
+ if (k == index) {
12
+ resolve(arr2);
13
+ }
14
+ },
15
+ reject,
16
+ ...a
17
+ );
18
+ });
19
+ } else {
20
+ resolve(arr);
21
+ }
22
+ });
23
+ }
24
+
25
+ export {
26
+ asyncMergeArray
27
+ };
@@ -1,7 +1,6 @@
1
1
  // packages/node/getPort.ts
2
2
  import { createServer } from "node:net";
3
- function getPort(obj) {
4
- let { port, host, isLocal } = obj;
3
+ function getPort(host, port = 5173, isLocal = true) {
5
4
  return new Promise((resolve, reject) => {
6
5
  isPortOccupied(port, host, isLocal).then((v) => {
7
6
  resolve({ port: v, host });
@@ -40,10 +39,16 @@ function getPortNotOccupied(port, host, isLocal) {
40
39
  });
41
40
  });
42
41
  }
42
+ var hosts = ["0.0.0.0"];
43
43
  function isPortOccupied(port, host, isLocal) {
44
44
  return new Promise((resolve, reject) => {
45
+ if (isLocal) {
46
+ if (!host || hosts.includes(host)) {
47
+ host = "localhost";
48
+ }
49
+ }
45
50
  const server = createServer().listen({
46
- host: isLocal ? "localhost" : host,
51
+ host,
47
52
  port,
48
53
  exclusive: true
49
54
  });
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkQTMFFVOOcjs = require('./chunk-QTMFFVOO.cjs');
3
+ var _chunkFGQXKLTHcjs = require('./chunk-FGQXKLTH.cjs');
4
4
 
5
5
 
6
6
  var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
@@ -8,7 +8,7 @@ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
8
8
  // packages/node/index.ts
9
9
  var node_exports = {};
10
10
  _chunk5AZGAKWRcjs.__export.call(void 0, node_exports, {
11
- getPort: () => _chunkQTMFFVOOcjs.getPort
11
+ getPort: () => _chunkFGQXKLTHcjs.getPort
12
12
  });
13
13
 
14
14
 
@@ -0,0 +1,11 @@
1
+ // packages/basic/object/filterObject.ts
2
+ function filterObject(obj, arr) {
3
+ arr.forEach((key) => {
4
+ delete obj[key];
5
+ });
6
+ return obj;
7
+ }
8
+
9
+ export {
10
+ filterObject
11
+ };
@@ -1,9 +1,17 @@
1
- import {
2
- getStartSame
3
- } from "./chunk-7DTHADVK.js";
4
1
  import {
5
2
  splitUpper
6
3
  } from "./chunk-VKE5JARB.js";
4
+ import {
5
+ toJSONParse,
6
+ toJSONStringify
7
+ } from "./chunk-AFKJQ4QP.js";
8
+ import {
9
+ getFunctionFormat,
10
+ toFunction
11
+ } from "./chunk-6YI3CDEW.js";
12
+ import {
13
+ getStartSame
14
+ } from "./chunk-7DTHADVK.js";
7
15
  import {
8
16
  appearNum
9
17
  } from "./chunk-SNABGVNO.js";
@@ -30,9 +38,13 @@ __export(string_exports, {
30
38
  appearNumSeat: () => appearNumSeat,
31
39
  firstLower: () => firstLower,
32
40
  firstUpper: () => firstUpper,
41
+ getFunctionFormat: () => getFunctionFormat,
33
42
  getStartSame: () => getStartSame,
34
43
  getStartSames: () => getStartSames,
35
- splitUpper: () => splitUpper
44
+ splitUpper: () => splitUpper,
45
+ toFunction: () => toFunction,
46
+ toJSONParse: () => toJSONParse,
47
+ toJSONStringify: () => toJSONStringify
36
48
  });
37
49
 
38
50
  export {
@@ -0,0 +1,35 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/array/deleteArray.ts
2
+ function deleteArray(arr, obj, key) {
3
+ let wz = -1;
4
+ for (let index = 0; index < arr.length; index++) {
5
+ const element = arr[index];
6
+ if (obj && typeof obj === "object") {
7
+ if (key) {
8
+ if (element[key] === obj[key]) {
9
+ wz = index;
10
+ break;
11
+ }
12
+ } else {
13
+ if (element === obj) {
14
+ wz = index;
15
+ break;
16
+ }
17
+ }
18
+ } else {
19
+ if (element === obj) {
20
+ wz = index;
21
+ break;
22
+ }
23
+ }
24
+ }
25
+ if (wz != -1) {
26
+ arr.splice(wz, 1);
27
+ return true;
28
+ } else {
29
+ return false;
30
+ }
31
+ }
32
+
33
+
34
+
35
+ exports.deleteArray = deleteArray;
@@ -0,0 +1,31 @@
1
+ // packages/basic/object/attrValueSort.ts
2
+ function attrValueSort(obj, arr, sort) {
3
+ let arrsort;
4
+ if (arr && arr.length > 0) {
5
+ arrsort = arr.map((k) => {
6
+ return {
7
+ key: k,
8
+ value: obj[k]
9
+ };
10
+ });
11
+ } else {
12
+ arrsort = Object.keys(obj).map((k) => {
13
+ return {
14
+ key: k,
15
+ value: obj[k]
16
+ };
17
+ });
18
+ }
19
+ arrsort.sort((a, b) => {
20
+ if (sort) {
21
+ return sort(a.value, b.value);
22
+ } else {
23
+ return a.value - b.value;
24
+ }
25
+ });
26
+ return arrsort.map((o) => o.key);
27
+ }
28
+
29
+ export {
30
+ attrValueSort
31
+ };
@@ -3,18 +3,22 @@ function asyncMergeArray(arr, callback) {
3
3
  return new Promise((resolve, reject) => {
4
4
  let index = 0;
5
5
  const k = arr.length;
6
- arr.forEach((...a) => {
7
- callback(
8
- (...arr2) => {
9
- index++;
10
- if (k == index) {
11
- resolve(arr2);
12
- }
13
- },
14
- reject,
15
- ...a
16
- );
17
- });
6
+ if (k > 0) {
7
+ arr.forEach((...a) => {
8
+ callback(
9
+ (...arr2) => {
10
+ index++;
11
+ if (k == index) {
12
+ resolve(arr2);
13
+ }
14
+ },
15
+ reject,
16
+ ...a
17
+ );
18
+ });
19
+ } else {
20
+ resolve(arr);
21
+ }
18
22
  });
19
23
  }
20
24
 
@@ -0,0 +1,16 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/css/getAttrObj.ts
2
+ function getAttrObj(str) {
3
+ const reg = /\s*([^\s="'/>]+)(=('([^']*)'|"([^"]*)"|([^\s/>]*)))?\s*/g;
4
+ let result;
5
+ const obj = {};
6
+ while ((result = reg.exec(str)) !== null) {
7
+ const key = result[1];
8
+ const value = result[5] || result[3];
9
+ obj[key] = value;
10
+ }
11
+ return obj;
12
+ }
13
+
14
+
15
+
16
+ exports.getAttrObj = getAttrObj;
@@ -0,0 +1,31 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/object/attrValueSort.ts
2
+ function attrValueSort(obj, arr, sort) {
3
+ let arrsort;
4
+ if (arr && arr.length > 0) {
5
+ arrsort = arr.map((k) => {
6
+ return {
7
+ key: k,
8
+ value: obj[k]
9
+ };
10
+ });
11
+ } else {
12
+ arrsort = Object.keys(obj).map((k) => {
13
+ return {
14
+ key: k,
15
+ value: obj[k]
16
+ };
17
+ });
18
+ }
19
+ arrsort.sort((a, b) => {
20
+ if (sort) {
21
+ return sort(a.value, b.value);
22
+ } else {
23
+ return a.value - b.value;
24
+ }
25
+ });
26
+ return arrsort.map((o) => o.key);
27
+ }
28
+
29
+
30
+
31
+ exports.attrValueSort = attrValueSort;
@@ -1,27 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/css/fetchUnitValue.ts
2
- var tops = [
3
- "\n",
4
- "\r",
5
- " ",
6
- "+",
7
- "-",
8
- "*",
9
- "/",
10
- ":",
11
- "("
12
- ];
13
- var ends = [
14
- "\n",
15
- "\r",
16
- " ",
17
- "+",
18
- "-",
19
- "*",
20
- "/",
21
- ";",
22
- ")",
23
- "}"
24
- ];
2
+ var tops = ["\n", "\r", " ", "+", "-", "*", "/", ":", "("];
3
+ var ends = ["\n", "\r", " ", "+", "-", "*", "/", ";", ")", "}"];
25
4
  function fetchUnitValue(text, str, callback) {
26
5
  const reg = new RegExp(`([-]?[0-9\\.]+)(${str})`, "g");
27
6
  return text.replace(reg, function(a, b, c, d) {
@@ -0,0 +1,24 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkPCS4RBZZcjs = require('./chunk-PCS4RBZZ.cjs');
4
+
5
+
6
+ var _chunk5BJORXPXcjs = require('./chunk-5BJORXPX.cjs');
7
+
8
+
9
+ var _chunkNMA3RPU4cjs = require('./chunk-NMA3RPU4.cjs');
10
+
11
+
12
+ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
13
+
14
+ // packages/basic/index.ts
15
+ var basic_exports = {};
16
+ _chunk5AZGAKWRcjs.__export.call(void 0, basic_exports, {
17
+ array: () => _chunkNMA3RPU4cjs.array_exports,
18
+ object: () => _chunk5BJORXPXcjs.object_exports,
19
+ string: () => _chunkPCS4RBZZcjs.string_exports
20
+ });
21
+
22
+
23
+
24
+ exports.basic_exports = basic_exports;