@fangzhongya/utils 0.0.8-3 → 0.0.8-34

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 (199) 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/duplicateRemoval.d.ts +6 -6
  5. package/dist/basic/array/index.cjs +6 -6
  6. package/dist/basic/array/index.js +7 -7
  7. package/dist/basic/array/isArray.d.ts +5 -5
  8. package/dist/basic/array/replaceAfter.d.ts +7 -7
  9. package/dist/basic/array/toggleArray.d.ts +7 -7
  10. package/dist/basic/index.cjs +18 -15
  11. package/dist/basic/index.d.ts +11 -8
  12. package/dist/basic/index.js +17 -14
  13. package/dist/basic/object/attrValueSort.cjs +7 -0
  14. package/dist/basic/object/attrValueSort.d.ts +12 -0
  15. package/dist/basic/object/attrValueSort.js +7 -0
  16. package/dist/basic/object/filterObject.cjs +7 -0
  17. package/dist/basic/object/filterObject.d.ts +14 -0
  18. package/dist/basic/object/filterObject.js +7 -0
  19. package/dist/basic/object/hasOwn.cjs +7 -0
  20. package/dist/basic/object/hasOwn.d.ts +9 -0
  21. package/dist/basic/object/hasOwn.js +7 -0
  22. package/dist/basic/object/index.cjs +16 -4
  23. package/dist/basic/object/index.d.ts +3 -0
  24. package/dist/basic/object/index.js +15 -3
  25. package/dist/basic/object/isObject.d.ts +5 -5
  26. package/dist/basic/object/isObjectArray.cjs +3 -3
  27. package/dist/basic/object/isObjectArray.d.ts +5 -5
  28. package/dist/basic/object/isObjectArray.js +2 -2
  29. package/dist/basic/object/mergeObject.d.ts +8 -8
  30. package/dist/basic/object/unmergeObject.d.ts +8 -8
  31. package/dist/basic/string/appearNum.d.ts +6 -6
  32. package/dist/basic/string/appearNumSeat.d.ts +7 -7
  33. package/dist/basic/string/firstLower.d.ts +5 -5
  34. package/dist/basic/string/firstUpper.d.ts +5 -5
  35. package/dist/basic/string/getStartSame.d.ts +6 -6
  36. package/dist/basic/string/getStartSames.d.ts +6 -6
  37. package/dist/basic/string/index.cjs +6 -6
  38. package/dist/basic/string/index.d.ts +2 -2
  39. package/dist/basic/string/index.js +5 -5
  40. package/dist/basic/string/splitUpper.cjs +2 -2
  41. package/dist/basic/string/splitUpper.d.ts +5 -5
  42. package/dist/basic/string/splitUpper.js +1 -1
  43. package/dist/{chunk-QIK5MQUL.js → chunk-2MCEAUE7.js} +4 -4
  44. package/dist/chunk-2OR4FUOA.cjs +47 -0
  45. package/dist/chunk-3IR2ABRO.js +8 -0
  46. package/dist/{chunk-P3HC3D2H.cjs → chunk-4O7YOSS7.cjs} +5 -5
  47. package/dist/chunk-4X7AFGTV.cjs +21 -0
  48. package/dist/{chunk-6MGCPTRE.js → chunk-7OV6BXIR.js} +4 -4
  49. package/dist/chunk-7RDB5KMY.js +79 -0
  50. package/dist/chunk-B4CE4K4W.js +26 -0
  51. package/dist/chunk-CCML3KTG.cjs +36 -0
  52. package/dist/chunk-D3SX7OUV.cjs +11 -0
  53. package/dist/chunk-E5FTKWGB.js +112 -0
  54. package/dist/{chunk-3NFJ3TZL.js → chunk-E75NHLNL.js} +6 -6
  55. package/dist/chunk-EWXBN4VG.cjs +21 -0
  56. package/dist/chunk-FGQXKLTH.cjs +67 -0
  57. package/dist/{chunk-ZMG2MHGS.cjs → chunk-GH6ZVMB4.cjs} +5 -5
  58. package/dist/chunk-GOUC2DFA.cjs +8 -0
  59. package/dist/chunk-JSWHKRQC.js +20 -0
  60. package/dist/{chunk-JLEIVV37.cjs → chunk-KHGCW3A7.cjs} +7 -7
  61. package/dist/chunk-L6EZ5APF.cjs +20 -0
  62. package/dist/{chunk-UCZBNN4I.cjs → chunk-L7FSHU27.cjs} +7 -3
  63. package/dist/{chunk-4TVFBKXC.js → chunk-LD5F4VMJ.js} +5 -5
  64. package/dist/{chunk-5U2ZV4MK.cjs → chunk-M7CD62S3.cjs} +4 -4
  65. package/dist/chunk-MH4BDAI6.cjs +79 -0
  66. package/dist/chunk-MQHLAQQA.js +21 -0
  67. package/dist/chunk-NCSN3MC5.js +21 -0
  68. package/dist/chunk-PB6QGABR.cjs +24 -0
  69. package/dist/chunk-PVPUF7SG.cjs +16 -0
  70. package/dist/{chunk-2W7EPKCY.js → chunk-PVYBDMBK.js} +5 -5
  71. package/dist/chunk-Q63V2U5G.js +47 -0
  72. package/dist/chunk-Q6FMBSK4.js +27 -0
  73. package/dist/chunk-QJVB3JIZ.js +67 -0
  74. package/dist/chunk-QZVMLHFW.cjs +16 -0
  75. package/dist/chunk-RQRBSTSX.cjs +112 -0
  76. package/dist/chunk-S42NGJ5W.js +11 -0
  77. package/dist/chunk-SRMXMAFO.cjs +26 -0
  78. package/dist/chunk-T4BAVDTH.js +31 -0
  79. package/dist/{chunk-VNVG4BJ4.cjs → chunk-TCMJPIRM.cjs} +16 -12
  80. package/dist/chunk-TGOVIGOG.js +29 -0
  81. package/dist/chunk-TPU4VJMB.js +16 -0
  82. package/dist/chunk-UFYLVZNU.cjs +31 -0
  83. package/dist/{chunk-O2RP4UZQ.cjs → chunk-UGFSIZ5P.cjs} +2 -23
  84. package/dist/{chunk-Z6NS6N32.js → chunk-VKE5JARB.js} +7 -3
  85. package/dist/chunk-VY5VQ7WE.cjs +21 -0
  86. package/dist/chunk-VYMN4FOM.cjs +16 -0
  87. package/dist/{chunk-5JCMM6YG.cjs → chunk-WTRGKGXS.cjs} +14 -2
  88. package/dist/{chunk-QKLVFB74.js → chunk-WX3JYE47.js} +2 -23
  89. package/dist/chunk-XAQM2IVP.js +16 -0
  90. package/dist/{chunk-C5A37VUQ.js → chunk-XKSLVCMQ.js} +13 -1
  91. package/dist/chunk-XUL6LPTN.js +21 -0
  92. package/dist/chunk-Y5WYKSYG.js +16 -0
  93. package/dist/chunk-YTYDFD4Z.cjs +29 -0
  94. package/dist/chunk-ZUKB4C56.js +36 -0
  95. package/dist/css/fetchUnitValue.cjs +2 -2
  96. package/dist/css/fetchUnitValue.d.ts +7 -7
  97. package/dist/css/fetchUnitValue.js +1 -1
  98. package/dist/css/getAttrObj.cjs +7 -0
  99. package/dist/css/getAttrObj.d.ts +11 -0
  100. package/dist/css/getAttrObj.js +7 -0
  101. package/dist/css/getCss.d.ts +7 -1
  102. package/dist/css/getPositionRelative.cjs +8 -0
  103. package/dist/css/getPositionRelative.d.ts +7 -0
  104. package/dist/css/getPositionRelative.js +8 -0
  105. package/dist/css/getSVG.cjs +8 -0
  106. package/dist/css/getSVG.d.ts +12 -0
  107. package/dist/css/getSVG.js +8 -0
  108. package/dist/css/index.cjs +20 -3
  109. package/dist/css/index.d.ts +4 -0
  110. package/dist/css/index.js +20 -3
  111. package/dist/css/setCss.cjs +8 -0
  112. package/dist/css/setCss.d.ts +11 -0
  113. package/dist/css/setCss.js +8 -0
  114. package/dist/dom/getLocus.cjs +7 -0
  115. package/dist/dom/getLocus.d.ts +14 -0
  116. package/dist/dom/getLocus.js +7 -0
  117. package/dist/dom/getShiftEvent.cjs +13 -0
  118. package/dist/dom/getShiftEvent.d.ts +25 -0
  119. package/dist/dom/getShiftEvent.js +13 -0
  120. package/dist/dom/index.cjs +18 -0
  121. package/dist/dom/index.d.ts +2 -0
  122. package/dist/dom/index.js +18 -0
  123. package/dist/html/htmlEscape.cjs +7 -0
  124. package/dist/html/htmlEscape.d.ts +8 -0
  125. package/dist/html/htmlEscape.js +7 -0
  126. package/dist/html/index.cjs +8 -0
  127. package/dist/html/index.d.ts +1 -0
  128. package/dist/html/index.js +8 -0
  129. package/dist/index-130ae781.d.ts +10 -0
  130. package/dist/index-5aea66bb.d.ts +21 -0
  131. package/dist/{index-fab49d44.d.ts → index-75c9fc9e.d.ts} +9 -0
  132. package/dist/{index-c661bc0a.d.ts → index-8bc9c83e.d.ts} +2 -2
  133. package/dist/index-bc08cd32.d.ts +14 -0
  134. package/dist/index-cef24876.d.ts +25 -0
  135. package/dist/index-da501f98.d.ts +10 -0
  136. package/dist/index.cjs +57 -29
  137. package/dist/index.d.ts +30 -14
  138. package/dist/index.js +56 -28
  139. package/dist/iss/index.cjs +5 -5
  140. package/dist/iss/index.js +5 -5
  141. package/dist/judge/matchs.d.ts +7 -7
  142. package/dist/judge/matchsEnd.d.ts +6 -6
  143. package/dist/judge/matchsStart.d.ts +6 -6
  144. package/dist/judge/matchsWhole.d.ts +6 -6
  145. package/dist/load/getSynch.d.ts +5 -5
  146. package/dist/log/styleLog.d.ts +65 -65
  147. package/dist/name/getComponentNames.cjs +3 -3
  148. package/dist/name/getComponentNames.d.ts +5 -5
  149. package/dist/name/getComponentNames.js +2 -2
  150. package/dist/name/getNames.cjs +3 -3
  151. package/dist/name/getNames.d.ts +5 -5
  152. package/dist/name/getNames.js +2 -2
  153. package/dist/name/humpToLine.d.ts +5 -5
  154. package/dist/name/index.cjs +7 -7
  155. package/dist/name/index.d.ts +1 -1
  156. package/dist/name/index.js +6 -6
  157. package/dist/name/lineToLargeHump.d.ts +5 -5
  158. package/dist/name/lineToSmallHump.d.ts +5 -5
  159. package/dist/node/getPort.cjs +7 -0
  160. package/dist/node/getPort.d.ts +13 -0
  161. package/dist/node/getPort.js +7 -0
  162. package/dist/node/index.cjs +8 -0
  163. package/dist/node/index.d.ts +1 -0
  164. package/dist/node/index.js +8 -0
  165. package/dist/tree/getTreeObj.cjs +11 -0
  166. package/dist/tree/getTreeObj.d.ts +26 -0
  167. package/dist/tree/getTreeObj.js +11 -0
  168. package/dist/tree/index.cjs +12 -0
  169. package/dist/tree/index.d.ts +1 -0
  170. package/dist/tree/index.js +12 -0
  171. package/dist/urls/getImportUrl.d.ts +6 -6
  172. package/dist/urls/getImportUrlSuffix.d.ts +6 -6
  173. package/dist/urls/getNewFileName.d.ts +5 -5
  174. package/dist/urls/getReplaceImportUrl.d.ts +6 -6
  175. package/dist/urls/getReplaceUrl.d.ts +6 -6
  176. package/dist/urls/getSuffix.d.ts +5 -5
  177. package/dist/urls/getUrlCatalogue.d.ts +5 -5
  178. package/dist/urls/getUrlCatalogueLast.d.ts +5 -5
  179. package/dist/urls/getUrlCatalogueObj.d.ts +14 -14
  180. package/dist/urls/index.cjs +9 -9
  181. package/dist/urls/index.d.ts +1 -1
  182. package/dist/urls/index.js +13 -13
  183. package/package.json +183 -112
  184. package/dist/chunk-7B2HWFLC.cjs +0 -20
  185. package/dist/chunk-ISSZY3JI.cjs +0 -24
  186. package/dist/chunk-RWKZ6ZKW.js +0 -20
  187. package/dist/chunk-XQB2HUHZ.js +0 -23
  188. package/dist/index-2c4dacd2.d.ts +0 -13
  189. package/dist/{chunk-QLBOPNV4.cjs → chunk-A5LHXE5X.cjs} +2 -2
  190. package/dist/{chunk-LPDYEUMB.cjs → chunk-DREUOE7L.cjs} +8 -8
  191. package/dist/{chunk-BWNLZJJG.js → chunk-EJWFLQF3.js} +3 -3
  192. package/dist/{chunk-MYS6DR74.js → chunk-F5D4AJXI.js} +12 -12
  193. package/dist/{chunk-SRR2GWC7.js → chunk-GYE23WAN.js} +3 -3
  194. package/dist/{chunk-PAJDTMC5.cjs → chunk-KRBTSMT2.cjs} +3 -3
  195. package/dist/{chunk-5UV36ZIW.cjs → chunk-O6P3QI3B.cjs} +3 -3
  196. package/dist/{chunk-MXLYIZIX.js → chunk-VRRDYCUH.js} +3 -3
  197. package/dist/{index-f6ea5a6a.d.ts → index-a65f6120.d.ts} +1 -1
  198. package/dist/{index-39c0a1ca.d.ts → index-d49ef6e3.d.ts} +2 -2
  199. package/dist/{index-42672b09.d.ts → index-f35b85db.d.ts} +1 -1
@@ -1,9 +1,9 @@
1
- /**
2
- * 比较两个字符串,获取前面一样的值
3
- * @param {string} str 比较字符串1
4
- * @param {string} val 比较字符串2
5
- * @returns {Array<string>} [前面一样的值, 字符串1不一样的值, 字符串2不一样的值]
6
- */
1
+ /**
2
+ * 比较两个字符串,获取前面一样的值
3
+ * @param {string} str 比较字符串1
4
+ * @param {string} val 比较字符串2
5
+ * @returns {Array<string>} [前面一样的值, 字符串1不一样的值, 字符串2不一样的值]
6
+ */
7
7
  declare function getStartSames(str: string, val: string): Array<string>;
8
8
 
9
9
  export { getStartSames };
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-ZMG2MHGS.cjs');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-GH6ZVMB4.cjs');
2
2
 
3
3
 
4
- var _chunkUCZBNN4Icjs = require('../../chunk-UCZBNN4I.cjs');
4
+ var _chunkL7FSHU27cjs = require('../../chunk-L7FSHU27.cjs');
5
5
 
6
6
 
7
7
  var _chunkJ7S3KBHLcjs = require('../../chunk-J7S3KBHL.cjs');
@@ -13,13 +13,13 @@ var _chunk3HXQ7TGVcjs = require('../../chunk-3HXQ7TGV.cjs');
13
13
  var _chunkJR6ZN6QDcjs = require('../../chunk-JR6ZN6QD.cjs');
14
14
 
15
15
 
16
- var _chunkUEVMS6QDcjs = require('../../chunk-UEVMS6QD.cjs');
16
+ var _chunkPW7RP73Jcjs = require('../../chunk-PW7RP73J.cjs');
17
17
 
18
18
 
19
- var _chunkOQL4GIEJcjs = require('../../chunk-OQL4GIEJ.cjs');
19
+ var _chunkUEVMS6QDcjs = require('../../chunk-UEVMS6QD.cjs');
20
20
 
21
21
 
22
- var _chunkPW7RP73Jcjs = require('../../chunk-PW7RP73J.cjs');
22
+ var _chunkOQL4GIEJcjs = require('../../chunk-OQL4GIEJ.cjs');
23
23
  require('../../chunk-5AZGAKWR.cjs');
24
24
 
25
25
 
@@ -29,4 +29,4 @@ require('../../chunk-5AZGAKWR.cjs');
29
29
 
30
30
 
31
31
 
32
- exports.appearNum = _chunk3HXQ7TGVcjs.appearNum; exports.appearNumSeat = _chunkJR6ZN6QDcjs.appearNumSeat; exports.firstLower = _chunkUEVMS6QDcjs.firstLower; exports.firstUpper = _chunkOQL4GIEJcjs.firstUpper; exports.getStartSame = _chunkJ7S3KBHLcjs.getStartSame; exports.getStartSames = _chunkPW7RP73Jcjs.getStartSames; exports.splitUpper = _chunkUCZBNN4Icjs.splitUpper;
32
+ exports.appearNum = _chunk3HXQ7TGVcjs.appearNum; exports.appearNumSeat = _chunkJR6ZN6QDcjs.appearNumSeat; exports.firstLower = _chunkUEVMS6QDcjs.firstLower; exports.firstUpper = _chunkOQL4GIEJcjs.firstUpper; exports.getStartSame = _chunkJ7S3KBHLcjs.getStartSame; exports.getStartSames = _chunkPW7RP73Jcjs.getStartSames; exports.splitUpper = _chunkL7FSHU27cjs.splitUpper;
@@ -1,7 +1,7 @@
1
1
  export { appearNum } from './appearNum.js';
2
- export { firstUpper } from './firstUpper.js';
3
2
  export { firstLower } from './firstLower.js';
4
3
  export { appearNumSeat } from './appearNumSeat.js';
5
- export { getStartSame } from './getStartSame.js';
4
+ export { firstUpper } from './firstUpper.js';
6
5
  export { getStartSames } from './getStartSames.js';
7
6
  export { splitUpper } from './splitUpper.js';
7
+ export { getStartSame } from './getStartSame.js';
@@ -1,7 +1,7 @@
1
- import "../../chunk-6MGCPTRE.js";
1
+ import "../../chunk-7OV6BXIR.js";
2
2
  import {
3
3
  splitUpper
4
- } from "../../chunk-Z6NS6N32.js";
4
+ } from "../../chunk-VKE5JARB.js";
5
5
  import {
6
6
  getStartSame
7
7
  } from "../../chunk-7DTHADVK.js";
@@ -11,15 +11,15 @@ import {
11
11
  import {
12
12
  appearNumSeat
13
13
  } from "../../chunk-DMZP4RPN.js";
14
+ import {
15
+ getStartSames
16
+ } from "../../chunk-A276ZDLP.js";
14
17
  import {
15
18
  firstLower
16
19
  } from "../../chunk-4OBNLDTJ.js";
17
20
  import {
18
21
  firstUpper
19
22
  } from "../../chunk-EWJJKQIO.js";
20
- import {
21
- getStartSames
22
- } from "../../chunk-A276ZDLP.js";
23
23
  import "../../chunk-UICA3PK6.js";
24
24
  export {
25
25
  appearNum,
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkUCZBNN4Icjs = require('../../chunk-UCZBNN4I.cjs');
3
+ var _chunkL7FSHU27cjs = require('../../chunk-L7FSHU27.cjs');
4
4
  require('../../chunk-5AZGAKWR.cjs');
5
5
 
6
6
 
7
- exports.splitUpper = _chunkUCZBNN4Icjs.splitUpper;
7
+ exports.splitUpper = _chunkL7FSHU27cjs.splitUpper;
@@ -1,8 +1,8 @@
1
- /**
2
- * 按照大写字母分割
3
- * @param {string} name
4
- * @returns { Array }
5
- */
1
+ /**
2
+ * 按照大写字母分割
3
+ * @param {string} name
4
+ * @returns { Array }
5
+ */
6
6
  declare function splitUpper(name: string): string[];
7
7
 
8
8
  export { splitUpper };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  splitUpper
3
- } from "../../chunk-Z6NS6N32.js";
3
+ } from "../../chunk-VKE5JARB.js";
4
4
  import "../../chunk-UICA3PK6.js";
5
5
  export {
6
6
  splitUpper
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  isObjectArray
3
- } from "./chunk-SRR2GWC7.js";
4
- import {
5
- isArray
6
- } from "./chunk-5PX3AFSC.js";
3
+ } from "./chunk-GYE23WAN.js";
7
4
  import {
8
5
  isObject
9
6
  } from "./chunk-MXY4W3K5.js";
7
+ import {
8
+ isArray
9
+ } from "./chunk-5PX3AFSC.js";
10
10
  import {
11
11
  __export
12
12
  } from "./chunk-UICA3PK6.js";
@@ -0,0 +1,47 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// 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
+
46
+
47
+ exports.getLocus = getLocus;
@@ -0,0 +1,8 @@
1
+ // packages/basic/object/hasOwn.ts
2
+ function hasOwn(obj, propName) {
3
+ return Object.prototype.hasOwnProperty.call(obj, propName);
4
+ }
5
+
6
+ export {
7
+ hasOwn
8
+ };
@@ -1,15 +1,15 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkVNVG4BJ4cjs = require('./chunk-VNVG4BJ4.cjs');
3
+ var _chunkLG7MY5KLcjs = require('./chunk-LG7MY5KL.cjs');
4
4
 
5
5
 
6
- var _chunkGD3OA7GUcjs = require('./chunk-GD3OA7GU.cjs');
6
+ var _chunkAXMOZZCMcjs = require('./chunk-AXMOZZCM.cjs');
7
7
 
8
8
 
9
- var _chunkLG7MY5KLcjs = require('./chunk-LG7MY5KL.cjs');
9
+ var _chunkTCMJPIRMcjs = require('./chunk-TCMJPIRM.cjs');
10
10
 
11
11
 
12
- var _chunkAXMOZZCMcjs = require('./chunk-AXMOZZCM.cjs');
12
+ var _chunkGD3OA7GUcjs = require('./chunk-GD3OA7GU.cjs');
13
13
 
14
14
 
15
15
  var _chunkISHLY7WMcjs = require('./chunk-ISHLY7WM.cjs');
@@ -20,7 +20,7 @@ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
20
20
  // packages/basic/array/index.ts
21
21
  var array_exports = {};
22
22
  _chunk5AZGAKWRcjs.__export.call(void 0, array_exports, {
23
- asyncMergeArray: () => _chunkVNVG4BJ4cjs.asyncMergeArray,
23
+ asyncMergeArray: () => _chunkTCMJPIRMcjs.asyncMergeArray,
24
24
  duplicateRemoval: () => _chunkGD3OA7GUcjs.duplicateRemoval,
25
25
  isArray: () => _chunkISHLY7WMcjs.isArray,
26
26
  replaceAfter: () => _chunkLG7MY5KLcjs.replaceAfter,
@@ -0,0 +1,21 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkLTVXRDTDcjs = require('./chunk-LTVXRDTD.cjs');
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(_chunkLTVXRDTDcjs.humpToLine.call(void 0, style), value);
17
+ }
18
+
19
+
20
+
21
+ exports.setCss = setCss;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  splitUpper
3
- } from "./chunk-Z6NS6N32.js";
3
+ } from "./chunk-VKE5JARB.js";
4
4
  import {
5
5
  getStartSame
6
6
  } from "./chunk-7DTHADVK.js";
@@ -10,15 +10,15 @@ import {
10
10
  import {
11
11
  appearNumSeat
12
12
  } from "./chunk-DMZP4RPN.js";
13
+ import {
14
+ getStartSames
15
+ } from "./chunk-A276ZDLP.js";
13
16
  import {
14
17
  firstLower
15
18
  } from "./chunk-4OBNLDTJ.js";
16
19
  import {
17
20
  firstUpper
18
21
  } from "./chunk-EWJJKQIO.js";
19
- import {
20
- getStartSames
21
- } from "./chunk-A276ZDLP.js";
22
22
  import {
23
23
  __export
24
24
  } from "./chunk-UICA3PK6.js";
@@ -0,0 +1,79 @@
1
+ // packages/tree/getTreeObj.ts
2
+ function getTreeObj(type, arr, param) {
3
+ if (type == 1) {
4
+ return treeToArray(arr, param);
5
+ } else {
6
+ return arrayToTree(arr, param);
7
+ }
8
+ }
9
+ function getTreeChildren(arr, param, fid, objs) {
10
+ arr.forEach((v) => {
11
+ const obj = Object.assign({}, v);
12
+ obj[param.fid] = fid;
13
+ const id = obj[param.id];
14
+ objs[id] = obj;
15
+ const arr2 = obj[param.children];
16
+ if (arr2 && arr2.length > 0) {
17
+ getTreeChildren(arr2, param, id, objs);
18
+ }
19
+ });
20
+ }
21
+ function treeToArray(arr, param) {
22
+ const objs = {};
23
+ arr.forEach((v) => {
24
+ const obj = Object.assign({}, v);
25
+ const id = obj[param.id];
26
+ const arr2 = obj[param.children];
27
+ if (arr2 && arr2.length > 0) {
28
+ getTreeChildren(arr2, param, id, objs);
29
+ }
30
+ objs[id] = obj;
31
+ });
32
+ const array = Object.values(objs).map((o) => {
33
+ const v = Object.assign({}, o);
34
+ delete v[param.children];
35
+ return v;
36
+ });
37
+ return {
38
+ tree: arr,
39
+ array,
40
+ obj: objs
41
+ };
42
+ }
43
+ function arrayToTree(arr, param) {
44
+ const djs = [];
45
+ const objs = {};
46
+ arr.forEach((v) => {
47
+ const obj = Object.assign({}, v);
48
+ const id = obj[param.id];
49
+ const fid = obj[param.fid];
50
+ if (fid) {
51
+ if (objs[fid]) {
52
+ objs[fid][param.children] = objs[fid][param.children] || [];
53
+ objs[fid][param.children].push(obj);
54
+ } else {
55
+ objs[fid] = {
56
+ [param.children]: [obj]
57
+ };
58
+ }
59
+ } else {
60
+ djs.push(obj);
61
+ }
62
+ if (objs[id]) {
63
+ objs[id] = Object.assign({}, obj, objs[id]);
64
+ } else {
65
+ objs[id] = obj;
66
+ }
67
+ });
68
+ return {
69
+ tree: djs,
70
+ array: arr,
71
+ obj: objs
72
+ };
73
+ }
74
+
75
+ export {
76
+ getTreeObj,
77
+ treeToArray,
78
+ arrayToTree
79
+ };
@@ -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-E5FTKWGB.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,36 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkYTYDFD4Zcjs = require('./chunk-YTYDFD4Z.cjs');
4
+
5
+
6
+ var _chunk4X7AFGTVcjs = require('./chunk-4X7AFGTV.cjs');
7
+
8
+
9
+ var _chunkUGFSIZ5Pcjs = require('./chunk-UGFSIZ5P.cjs');
10
+
11
+
12
+ var _chunkPVPUF7SGcjs = require('./chunk-PVPUF7SG.cjs');
13
+
14
+
15
+ var _chunkVY5VQ7WEcjs = require('./chunk-VY5VQ7WE.cjs');
16
+
17
+
18
+ var _chunkUGS2F6DKcjs = require('./chunk-UGS2F6DK.cjs');
19
+
20
+
21
+ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
22
+
23
+ // packages/css/index.ts
24
+ var css_exports = {};
25
+ _chunk5AZGAKWRcjs.__export.call(void 0, css_exports, {
26
+ fetchUnitValue: () => _chunkUGFSIZ5Pcjs.fetchUnitValue,
27
+ getAttrObj: () => _chunkPVPUF7SGcjs.getAttrObj,
28
+ getCss: () => _chunkUGS2F6DKcjs.getCss,
29
+ getPositionRelative: () => _chunkVY5VQ7WEcjs.getPositionRelative,
30
+ getSVG: () => _chunkYTYDFD4Zcjs.getSVG,
31
+ setCss: () => _chunk4X7AFGTVcjs.setCss
32
+ });
33
+
34
+
35
+
36
+ exports.css_exports = css_exports;
@@ -0,0 +1,11 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// 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
+
10
+
11
+ exports.filterObject = filterObject;
@@ -0,0 +1,112 @@
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) => {
20
+ const is = press(e);
21
+ if (is) {
22
+ let scoll;
23
+ if (shift) {
24
+ scoll = foundEventCallback("shift", shift, dom1, t);
25
+ }
26
+ if (release) {
27
+ const rcoll = foundEventCallback(
28
+ "release",
29
+ (e1, t1) => {
30
+ release(e1, t1);
31
+ if (scoll) {
32
+ dom1.removeEventListener(
33
+ eventTypes.shift[t1],
34
+ scoll
35
+ );
36
+ }
37
+ dom1.removeEventListener(
38
+ eventTypes.release[t1],
39
+ rcoll
40
+ );
41
+ },
42
+ dom1,
43
+ t
44
+ );
45
+ }
46
+ }
47
+ },
48
+ dom
49
+ );
50
+ }
51
+ function shiftEvent(t, dom1, shift, release, is = true) {
52
+ let scoll;
53
+ if (shift) {
54
+ scoll = foundEventCallback("shift", shift, dom1, t);
55
+ }
56
+ if (release) {
57
+ const rcoll = foundEventCallback(
58
+ "release",
59
+ (e1, t1) => {
60
+ release(e1, t1);
61
+ if (is) {
62
+ if (scoll) {
63
+ dom1.removeEventListener(eventTypes.shift[t1], scoll);
64
+ }
65
+ dom1.removeEventListener(eventTypes.release[t1], rcoll);
66
+ }
67
+ },
68
+ dom1,
69
+ t
70
+ );
71
+ }
72
+ }
73
+ function foundEvent(eventType, c, dom = document, type) {
74
+ if (type != "mouse") {
75
+ dom.addEventListener(eventTypes[eventType].touch, (event) => {
76
+ const e = event;
77
+ const changedTouches = e.changedTouches[0];
78
+ c(changedTouches, "touch");
79
+ });
80
+ }
81
+ if (type != "touch") {
82
+ dom.addEventListener(eventTypes[eventType].mouse, (event) => {
83
+ const e = event;
84
+ c(e, "mouse");
85
+ });
86
+ }
87
+ }
88
+ function foundEventCallback(eventType, c, dom = document, type) {
89
+ if (type == "touch") {
90
+ const eventCallback = (event) => {
91
+ const e = event;
92
+ const changedTouches = e.changedTouches[0];
93
+ c(changedTouches, "touch");
94
+ };
95
+ dom.addEventListener(eventTypes[eventType].touch, eventCallback);
96
+ return eventCallback;
97
+ } else {
98
+ const eventCallback = (event) => {
99
+ const e = event;
100
+ c(e, "mouse");
101
+ };
102
+ dom.addEventListener(eventTypes[eventType].mouse, eventCallback);
103
+ return eventCallback;
104
+ }
105
+ }
106
+
107
+ export {
108
+ pressEvent,
109
+ shiftEvent,
110
+ foundEvent,
111
+ foundEventCallback
112
+ };
@@ -1,15 +1,15 @@
1
- import {
2
- asyncMergeArray
3
- } from "./chunk-XQB2HUHZ.js";
4
- import {
5
- duplicateRemoval
6
- } from "./chunk-ZVBCHJA5.js";
7
1
  import {
8
2
  replaceAfter
9
3
  } from "./chunk-GOH6G74S.js";
10
4
  import {
11
5
  toggleArray
12
6
  } from "./chunk-GOJN3OQ4.js";
7
+ import {
8
+ asyncMergeArray
9
+ } from "./chunk-Q6FMBSK4.js";
10
+ import {
11
+ duplicateRemoval
12
+ } from "./chunk-ZVBCHJA5.js";
13
13
  import {
14
14
  isArray
15
15
  } from "./chunk-5PX3AFSC.js";
@@ -0,0 +1,21 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// 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
+
20
+
21
+ exports.htmlEscape = htmlEscape;
@@ -0,0 +1,67 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/node/getPort.ts
2
+ var _net = require('net');
3
+ function getPort(host, port = 5173, isLocal = true) {
4
+ return new Promise((resolve, reject) => {
5
+ isPortOccupied(port, host, isLocal).then((v) => {
6
+ resolve({ port: v, host });
7
+ }).catch((e) => {
8
+ if (e.code === "EADDRINUSE") {
9
+ getPortNotOccupied(++port, host, isLocal).then((v) => {
10
+ resolve({
11
+ port: v,
12
+ host
13
+ });
14
+ }).catch(() => {
15
+ reject({
16
+ port,
17
+ host
18
+ });
19
+ });
20
+ } else {
21
+ reject({
22
+ port,
23
+ host
24
+ });
25
+ }
26
+ });
27
+ });
28
+ }
29
+ function getPortNotOccupied(port, host, isLocal) {
30
+ return new Promise((resolve, reject) => {
31
+ isPortOccupied(port, host, isLocal).then(() => {
32
+ resolve(port);
33
+ }).catch(async (e) => {
34
+ if (e.code === "EADDRINUSE") {
35
+ resolve(await getPortNotOccupied(++port, host, isLocal));
36
+ } else {
37
+ reject(e);
38
+ }
39
+ });
40
+ });
41
+ }
42
+ var hosts = ["0.0.0.0"];
43
+ function isPortOccupied(port, host, isLocal) {
44
+ return new Promise((resolve, reject) => {
45
+ if (isLocal) {
46
+ if (!host || hosts.includes(host)) {
47
+ host = "localhost";
48
+ }
49
+ }
50
+ const server = _net.createServer.call(void 0, ).listen({
51
+ host,
52
+ port,
53
+ exclusive: true
54
+ });
55
+ server.on("listening", () => {
56
+ server.close();
57
+ resolve(port);
58
+ });
59
+ server.on("error", (e) => {
60
+ reject(e);
61
+ });
62
+ });
63
+ }
64
+
65
+
66
+
67
+ exports.getPort = getPort;