@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,121 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/dom/getShiftEvent.ts
2
+ var eventTypes = {
3
+ press: {
4
+ touch: "touchstart",
5
+ mouse: "mousedown"
6
+ },
7
+ shift: {
8
+ touch: "touchmove",
9
+ mouse: "mousemove"
10
+ },
11
+ release: {
12
+ touch: "touchend",
13
+ mouse: "mouseup"
14
+ }
15
+ };
16
+ function pressEvent(dom, press, shift, release, dom1 = document) {
17
+ foundEvent(
18
+ "press",
19
+ (e, t, te) => {
20
+ let scoll;
21
+ let is = false;
22
+ const tz = setTimeout(() => {
23
+ is = press(e, t, te);
24
+ if (is) {
25
+ if (shift) {
26
+ scoll = foundEventCallback("shift", shift, dom1, t);
27
+ }
28
+ }
29
+ }, 200);
30
+ const rcoll = foundEventCallback(
31
+ "release",
32
+ (e1, t1, te1) => {
33
+ clearTimeout(tz);
34
+ if (is && release) {
35
+ release(e1, t1, te1);
36
+ if (scoll) {
37
+ dom1.removeEventListener(
38
+ eventTypes.shift[t1],
39
+ scoll
40
+ );
41
+ }
42
+ }
43
+ dom1.removeEventListener(eventTypes.release[t1], rcoll);
44
+ },
45
+ dom1,
46
+ t
47
+ );
48
+ },
49
+ dom
50
+ );
51
+ }
52
+ function shiftEvent(t, dom1, shift, release, is = true) {
53
+ let scoll;
54
+ if (shift) {
55
+ scoll = foundEventCallback("shift", shift, dom1, t);
56
+ }
57
+ if (release) {
58
+ const rcoll = foundEventCallback(
59
+ "release",
60
+ (e1, t1, te) => {
61
+ release(e1, t1, te);
62
+ if (is) {
63
+ if (scoll) {
64
+ dom1.removeEventListener(eventTypes.shift[t1], scoll);
65
+ }
66
+ dom1.removeEventListener(eventTypes.release[t1], rcoll);
67
+ }
68
+ },
69
+ dom1,
70
+ t
71
+ );
72
+ }
73
+ }
74
+ function foundEvent(eventType, c, dom = document, type) {
75
+ if (type != "mouse") {
76
+ dom.addEventListener(eventTypes[eventType].touch, (event) => {
77
+ event.stopPropagation();
78
+ event.preventDefault();
79
+ const e = event;
80
+ const changedTouches = e.changedTouches[0];
81
+ c(changedTouches, "touch", e);
82
+ });
83
+ }
84
+ if (type != "touch") {
85
+ dom.addEventListener(eventTypes[eventType].mouse, (event) => {
86
+ event.stopPropagation();
87
+ event.preventDefault();
88
+ const e = event;
89
+ c(e, "mouse");
90
+ });
91
+ }
92
+ }
93
+ function foundEventCallback(eventType, c, dom = document, type) {
94
+ if (type == "touch") {
95
+ const eventCallback = (event) => {
96
+ event.stopPropagation();
97
+ event.preventDefault();
98
+ const e = event;
99
+ const changedTouches = e.changedTouches[0];
100
+ c(changedTouches, "touch", e);
101
+ };
102
+ dom.addEventListener(eventTypes[eventType].touch, eventCallback);
103
+ return eventCallback;
104
+ } else {
105
+ const eventCallback = (event) => {
106
+ event.stopPropagation();
107
+ event.preventDefault();
108
+ const e = event;
109
+ c(e, "mouse");
110
+ };
111
+ dom.addEventListener(eventTypes[eventType].mouse, eventCallback);
112
+ return eventCallback;
113
+ }
114
+ }
115
+
116
+
117
+
118
+
119
+
120
+
121
+ exports.pressEvent = pressEvent; exports.shiftEvent = shiftEvent; exports.foundEvent = foundEvent; exports.foundEventCallback = foundEventCallback;
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  matchs
3
- } from "./chunk-33X65PQS.js";
3
+ } from "./chunk-FRGDQOX4.js";
4
+ import {
5
+ matchsStart
6
+ } from "./chunk-S6JRKYPY.js";
4
7
  import {
5
8
  matchsWhole
6
9
  } from "./chunk-IRGCP7KH.js";
7
10
  import {
8
11
  matchsEnd
9
12
  } from "./chunk-YNOFNHEK.js";
10
- import {
11
- matchsStart
12
- } from "./chunk-S6JRKYPY.js";
13
13
  import {
14
14
  __export
15
15
  } from "./chunk-UICA3PK6.js";
@@ -0,0 +1,121 @@
1
+ // packages/dom/getShiftEvent.ts
2
+ var eventTypes = {
3
+ press: {
4
+ touch: "touchstart",
5
+ mouse: "mousedown"
6
+ },
7
+ shift: {
8
+ touch: "touchmove",
9
+ mouse: "mousemove"
10
+ },
11
+ release: {
12
+ touch: "touchend",
13
+ mouse: "mouseup"
14
+ }
15
+ };
16
+ function pressEvent(dom, press, shift, release, dom1 = document) {
17
+ foundEvent(
18
+ "press",
19
+ (e, t, te) => {
20
+ let scoll;
21
+ let is = false;
22
+ const tz = setTimeout(() => {
23
+ is = press(e, t, te);
24
+ if (is) {
25
+ if (shift) {
26
+ scoll = foundEventCallback("shift", shift, dom1, t);
27
+ }
28
+ }
29
+ }, 200);
30
+ const rcoll = foundEventCallback(
31
+ "release",
32
+ (e1, t1, te1) => {
33
+ clearTimeout(tz);
34
+ if (is && release) {
35
+ release(e1, t1, te1);
36
+ if (scoll) {
37
+ dom1.removeEventListener(
38
+ eventTypes.shift[t1],
39
+ scoll
40
+ );
41
+ }
42
+ }
43
+ dom1.removeEventListener(eventTypes.release[t1], rcoll);
44
+ },
45
+ dom1,
46
+ t
47
+ );
48
+ },
49
+ dom
50
+ );
51
+ }
52
+ function shiftEvent(t, dom1, shift, release, is = true) {
53
+ let scoll;
54
+ if (shift) {
55
+ scoll = foundEventCallback("shift", shift, dom1, t);
56
+ }
57
+ if (release) {
58
+ const rcoll = foundEventCallback(
59
+ "release",
60
+ (e1, t1, te) => {
61
+ release(e1, t1, te);
62
+ if (is) {
63
+ if (scoll) {
64
+ dom1.removeEventListener(eventTypes.shift[t1], scoll);
65
+ }
66
+ dom1.removeEventListener(eventTypes.release[t1], rcoll);
67
+ }
68
+ },
69
+ dom1,
70
+ t
71
+ );
72
+ }
73
+ }
74
+ function foundEvent(eventType, c, dom = document, type) {
75
+ if (type != "mouse") {
76
+ dom.addEventListener(eventTypes[eventType].touch, (event) => {
77
+ event.stopPropagation();
78
+ event.preventDefault();
79
+ const e = event;
80
+ const changedTouches = e.changedTouches[0];
81
+ c(changedTouches, "touch", e);
82
+ });
83
+ }
84
+ if (type != "touch") {
85
+ dom.addEventListener(eventTypes[eventType].mouse, (event) => {
86
+ event.stopPropagation();
87
+ event.preventDefault();
88
+ const e = event;
89
+ c(e, "mouse");
90
+ });
91
+ }
92
+ }
93
+ function foundEventCallback(eventType, c, dom = document, type) {
94
+ if (type == "touch") {
95
+ const eventCallback = (event) => {
96
+ event.stopPropagation();
97
+ event.preventDefault();
98
+ const e = event;
99
+ const changedTouches = e.changedTouches[0];
100
+ c(changedTouches, "touch", e);
101
+ };
102
+ dom.addEventListener(eventTypes[eventType].touch, eventCallback);
103
+ return eventCallback;
104
+ } else {
105
+ const eventCallback = (event) => {
106
+ event.stopPropagation();
107
+ event.preventDefault();
108
+ const e = event;
109
+ c(e, "mouse");
110
+ };
111
+ dom.addEventListener(eventTypes[eventType].mouse, eventCallback);
112
+ return eventCallback;
113
+ }
114
+ }
115
+
116
+ export {
117
+ pressEvent,
118
+ shiftEvent,
119
+ foundEvent,
120
+ foundEventCallback
121
+ };
@@ -0,0 +1,26 @@
1
+ import {
2
+ getLocus
3
+ } from "./chunk-Q63V2U5G.js";
4
+ import {
5
+ foundEvent,
6
+ foundEventCallback,
7
+ pressEvent,
8
+ shiftEvent
9
+ } from "./chunk-VBS6YE6H.js";
10
+ import {
11
+ __export
12
+ } from "./chunk-UICA3PK6.js";
13
+
14
+ // packages/dom/index.ts
15
+ var dom_exports = {};
16
+ __export(dom_exports, {
17
+ foundEvent: () => foundEvent,
18
+ foundEventCallback: () => foundEventCallback,
19
+ getLocus: () => getLocus,
20
+ pressEvent: () => pressEvent,
21
+ shiftEvent: () => shiftEvent
22
+ });
23
+
24
+ export {
25
+ dom_exports
26
+ };
@@ -0,0 +1,21 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkUGS2F6DKcjs = require('./chunk-UGS2F6DK.cjs');
4
+
5
+ // packages/css/getPositionRelative.ts
6
+ function getPositionRelative(el, str = "relative") {
7
+ if (el && el.parentElement) {
8
+ const fel = el.parentElement;
9
+ if (_chunkUGS2F6DKcjs.getCss.call(void 0, fel, "position") == str) {
10
+ return fel;
11
+ } else {
12
+ return getPositionRelative(fel);
13
+ }
14
+ } else {
15
+ return el;
16
+ }
17
+ }
18
+
19
+
20
+
21
+ exports.getPositionRelative = getPositionRelative;
@@ -0,0 +1,33 @@
1
+ import {
2
+ getAttrObj
3
+ } from "./chunk-N3FZ4WUI.js";
4
+
5
+ // packages/css/getSVG.ts
6
+ function getSVG(str) {
7
+ const reg = /<svg([^>]*)>((.|\n|\r|\t)*)<\/svg>/g;
8
+ const rs = reg.exec(str);
9
+ if (rs && rs.length > 0) {
10
+ const css = rs[1];
11
+ const body = rs[2];
12
+ const attr = getAttrObj(css);
13
+ const b = attr["viewBox"] || "";
14
+ const bs = b.split(" ") || [];
15
+ const l = Number(bs[0]) || 0;
16
+ const t = Number(bs[1]) || 0;
17
+ const w = Number(bs[2] || attr["width"]) || 24;
18
+ const h = Number(bs[3] || attr["height"]) || 24;
19
+ return {
20
+ body,
21
+ viewBox: b,
22
+ left: l,
23
+ top: t,
24
+ width: w,
25
+ height: h
26
+ };
27
+ }
28
+ return;
29
+ }
30
+
31
+ export {
32
+ getSVG
33
+ };
@@ -0,0 +1,15 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkPTLVJ5OLcjs = require('./chunk-PTLVJ5OL.cjs');
4
+
5
+ // packages/css/getPrentClass.ts
6
+ function getPrentClass(el, cs) {
7
+ return _chunkPTLVJ5OLcjs.getPrentCorres.call(void 0, el, (ve) => {
8
+ const vs = (ve.className || "").split(" ");
9
+ return vs.includes(cs);
10
+ });
11
+ }
12
+
13
+
14
+
15
+ exports.getPrentClass = getPrentClass;
@@ -0,0 +1,20 @@
1
+ // packages/basic/object/deepCopy.ts
2
+ function deepCopy(obj) {
3
+ const objClone = Array.isArray(obj) ? [] : {};
4
+ if (obj && typeof obj === "object") {
5
+ for (let key in obj) {
6
+ if (obj.hasOwnProperty(key)) {
7
+ if (obj[key] && typeof obj[key] === "object") {
8
+ objClone[key] = deepCopy(obj[key]);
9
+ } else {
10
+ objClone[key] = obj[key];
11
+ }
12
+ }
13
+ }
14
+ }
15
+ return objClone;
16
+ }
17
+
18
+ export {
19
+ deepCopy
20
+ };
@@ -1,15 +1,18 @@
1
- import {
2
- toggleArray
3
- } from "./chunk-GOJN3OQ4.js";
4
1
  import {
5
2
  asyncMergeArray
6
- } from "./chunk-XQB2HUHZ.js";
3
+ } from "./chunk-Q6FMBSK4.js";
4
+ import {
5
+ deleteArray
6
+ } from "./chunk-D2WYYC5Y.js";
7
7
  import {
8
8
  duplicateRemoval
9
9
  } from "./chunk-ZVBCHJA5.js";
10
10
  import {
11
11
  replaceAfter
12
12
  } from "./chunk-GOH6G74S.js";
13
+ import {
14
+ toggleArray
15
+ } from "./chunk-GOJN3OQ4.js";
13
16
  import {
14
17
  isArray
15
18
  } from "./chunk-5PX3AFSC.js";
@@ -21,6 +24,7 @@ import {
21
24
  var array_exports = {};
22
25
  __export(array_exports, {
23
26
  asyncMergeArray: () => asyncMergeArray,
27
+ deleteArray: () => deleteArray,
24
28
  duplicateRemoval: () => duplicateRemoval,
25
29
  isArray: () => isArray,
26
30
  replaceAfter: () => replaceAfter,
@@ -1,27 +1,6 @@
1
1
  // 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,21 @@
1
+ import {
2
+ humpToLine
3
+ } from "./chunk-J7CICTHH.js";
4
+
5
+ // packages/css/setCss.ts
6
+ function setCss(elem, style, value) {
7
+ if (typeof style == "string") {
8
+ set(elem, style, value || "");
9
+ } else {
10
+ Object.keys(style).forEach((key) => {
11
+ set(elem, key, style[key]);
12
+ });
13
+ }
14
+ }
15
+ function set(elem, style, value) {
16
+ elem.style.setProperty(humpToLine(style), value);
17
+ }
18
+
19
+ export {
20
+ setCss
21
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getPort
3
- } from "./chunk-IQHASAHU.js";
3
+ } from "./chunk-QJVB3JIZ.js";
4
4
  import {
5
5
  __export
6
6
  } from "./chunk-UICA3PK6.js";
@@ -0,0 +1,13 @@
1
+ // packages/basic/object/getSort.ts
2
+ function getSort(obj, sort) {
3
+ const robj = {};
4
+ const ks = Object.keys(obj).sort(sort);
5
+ ks.forEach((k) => {
6
+ robj[k] = obj[k];
7
+ });
8
+ return robj;
9
+ }
10
+
11
+ export {
12
+ getSort
13
+ };
@@ -0,0 +1,35 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/string/toFunction.ts
2
+ function toFunction(str) {
3
+ const obj = getFunctionFormat(str);
4
+ if (obj && obj.body) {
5
+ const param = (obj.param || "").split(",").map((o) => o.trim()).filter((v) => v);
6
+ return new Function(...param, obj.body);
7
+ } else {
8
+ return;
9
+ }
10
+ }
11
+ function getFunctionFormat(v) {
12
+ if (v) {
13
+ let st = v.toString();
14
+ st = st.trim();
15
+ let name = "([a-z|A-Z|_|$][a-z|A-Z|_|$|0-9]*)?";
16
+ let fun = "((function)?\\s*" + name + "\\s*)?";
17
+ let param = "(\\(([^\\(|\\)]*)\\)\\s*)?";
18
+ let body = "[\\s|\\n|\\r]*\\{((.|\n|\r)+?)\\}[\\s|\\n|\\r]*";
19
+ let reg = new RegExp("^" + fun + param + body + "$");
20
+ let vts = reg.exec(st);
21
+ if (vts && vts.length > 0) {
22
+ return {
23
+ name: vts[3],
24
+ param: vts[5],
25
+ body: vts[6]
26
+ };
27
+ }
28
+ }
29
+ return;
30
+ }
31
+
32
+
33
+
34
+
35
+ exports.toFunction = toFunction; exports.getFunctionFormat = getFunctionFormat;
@@ -1,15 +1,15 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk3YUI42XNcjs = require('./chunk-3YUI42XN.cjs');
3
+ var _chunkNGQKVTCRcjs = require('./chunk-NGQKVTCR.cjs');
4
4
 
5
5
 
6
- var _chunk2BY5RQHUcjs = require('./chunk-2BY5RQHU.cjs');
6
+ var _chunkZZEFL2TEcjs = require('./chunk-ZZEFL2TE.cjs');
7
7
 
8
8
 
9
- var _chunkYGJOBIEOcjs = require('./chunk-YGJOBIEO.cjs');
9
+ var _chunk2BY5RQHUcjs = require('./chunk-2BY5RQHU.cjs');
10
10
 
11
11
 
12
- var _chunkZZEFL2TEcjs = require('./chunk-ZZEFL2TE.cjs');
12
+ var _chunkYGJOBIEOcjs = require('./chunk-YGJOBIEO.cjs');
13
13
 
14
14
 
15
15
  var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
@@ -17,7 +17,7 @@ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
17
17
  // packages/judge/index.ts
18
18
  var judge_exports = {};
19
19
  _chunk5AZGAKWRcjs.__export.call(void 0, judge_exports, {
20
- matchs: () => _chunk3YUI42XNcjs.matchs,
20
+ matchs: () => _chunkNGQKVTCRcjs.matchs,
21
21
  matchsEnd: () => _chunkYGJOBIEOcjs.matchsEnd,
22
22
  matchsStart: () => _chunkZZEFL2TEcjs.matchsStart,
23
23
  matchsWhole: () => _chunk2BY5RQHUcjs.matchsWhole
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkO2RP4UZQcjs = require('../chunk-O2RP4UZQ.cjs');
3
+ var _chunkUGFSIZ5Pcjs = require('../chunk-UGFSIZ5P.cjs');
4
4
  require('../chunk-5AZGAKWR.cjs');
5
5
 
6
6
 
7
- exports.fetchUnitValue = _chunkO2RP4UZQcjs.fetchUnitValue;
7
+ exports.fetchUnitValue = _chunkUGFSIZ5Pcjs.fetchUnitValue;
@@ -1,10 +1,10 @@
1
- /**
2
- * 提取单位值
3
- * @param text
4
- * @param str
5
- * @param callback
6
- * @returns
7
- */
1
+ /**
2
+ * 提取单位值
3
+ * @param text
4
+ * @param str
5
+ * @param callback
6
+ * @returns
7
+ */
8
8
  declare function fetchUnitValue(text: string, str: string, callback?: (n: number, dw: string, yss: string, i: number) => string): string;
9
9
 
10
10
  export { fetchUnitValue };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  fetchUnitValue
3
- } from "../chunk-QKLVFB74.js";
3
+ } from "../chunk-WX3JYE47.js";
4
4
  import "../chunk-UICA3PK6.js";
5
5
  export {
6
6
  fetchUnitValue
@@ -0,0 +1,7 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkTE3XNGF4cjs = require('../chunk-TE3XNGF4.cjs');
4
+ require('../chunk-5AZGAKWR.cjs');
5
+
6
+
7
+ exports.getAttrObj = _chunkTE3XNGF4cjs.getAttrObj;
@@ -0,0 +1,11 @@
1
+ type ObjStr = {
2
+ [key: string]: string;
3
+ };
4
+ /**
5
+ * 获取属性对象
6
+ * @param str
7
+ * @returns
8
+ */
9
+ declare function getAttrObj(str: string): ObjStr;
10
+
11
+ export { getAttrObj };
@@ -0,0 +1,7 @@
1
+ import {
2
+ getAttrObj
3
+ } from "../chunk-N3FZ4WUI.js";
4
+ import "../chunk-UICA3PK6.js";
5
+ export {
6
+ getAttrObj
7
+ };
@@ -1,3 +1,9 @@
1
- declare function getCss(elem: HTMLDivElement, style: string): any;
1
+ /**
2
+ * 获取对应的属性值
3
+ * @param elem
4
+ * @param style
5
+ * @returns
6
+ */
7
+ declare function getCss(elem: Element, style: string): any;
2
8
 
3
9
  export { getCss };
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkVY5VQ7WEcjs = require('../chunk-VY5VQ7WE.cjs');
4
+ require('../chunk-UGS2F6DK.cjs');
5
+ require('../chunk-5AZGAKWR.cjs');
6
+
7
+
8
+ exports.getPositionRelative = _chunkVY5VQ7WEcjs.getPositionRelative;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 获取当前元素上父元素的relative的位置
3
+ * @param el
4
+ */
5
+ declare function getPositionRelative(el: HTMLElement, str?: string): HTMLElement;
6
+
7
+ export { getPositionRelative };
@@ -0,0 +1,8 @@
1
+ import {
2
+ getPositionRelative
3
+ } from "../chunk-MQHLAQQA.js";
4
+ import "../chunk-5RZYHE3X.js";
5
+ import "../chunk-UICA3PK6.js";
6
+ export {
7
+ getPositionRelative
8
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkWLBKU7NMcjs = require('../chunk-WLBKU7NM.cjs');
4
+ require('../chunk-PTLVJ5OL.cjs');
5
+ require('../chunk-5AZGAKWR.cjs');
6
+
7
+
8
+ exports.getPrentClass = _chunkWLBKU7NMcjs.getPrentClass;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 获取当前元素或者匹配父类元素的对应样式
3
+ * @param el
4
+ */
5
+ declare function getPrentClass(el: HTMLElement, cs: string): HTMLElement | undefined;
6
+
7
+ export { getPrentClass };