@fangzhongya/utils 0.0.7 → 0.0.8-10

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 (242) hide show
  1. package/LICENSE +25 -25
  2. package/README.md +5 -3
  3. package/dist/basic/array/asyncMergeArray.cjs +7 -0
  4. package/dist/basic/array/asyncMergeArray.d.ts +9 -0
  5. package/dist/basic/array/asyncMergeArray.js +7 -0
  6. package/dist/basic/array/duplicateRemoval.cjs +7 -0
  7. package/dist/basic/array/duplicateRemoval.d.ts +9 -0
  8. package/dist/basic/array/duplicateRemoval.js +7 -0
  9. package/dist/basic/array/index.cjs +15 -3
  10. package/dist/basic/array/index.d.ts +3 -0
  11. package/dist/basic/array/index.js +14 -2
  12. package/dist/basic/array/isArray.d.ts +5 -5
  13. package/dist/basic/array/replaceAfter.cjs +7 -0
  14. package/dist/basic/array/replaceAfter.d.ts +10 -0
  15. package/dist/basic/array/replaceAfter.js +7 -0
  16. package/dist/basic/array/toggleArray.cjs +2 -2
  17. package/dist/basic/array/toggleArray.d.ts +8 -11
  18. package/dist/basic/array/toggleArray.js +1 -1
  19. package/dist/basic/index.cjs +17 -11
  20. package/dist/basic/index.d.ts +11 -5
  21. package/dist/basic/index.js +16 -10
  22. package/dist/basic/object/filterObject.cjs +7 -0
  23. package/dist/basic/object/filterObject.d.ts +14 -0
  24. package/dist/basic/object/filterObject.js +7 -0
  25. package/dist/basic/object/index.cjs +12 -4
  26. package/dist/basic/object/index.d.ts +3 -1
  27. package/dist/basic/object/index.js +12 -4
  28. package/dist/basic/object/isObject.cjs +2 -3
  29. package/dist/basic/object/isObject.d.ts +5 -5
  30. package/dist/basic/object/isObject.js +1 -2
  31. package/dist/basic/object/isObjectArray.cjs +9 -0
  32. package/dist/basic/object/isObjectArray.d.ts +8 -0
  33. package/dist/basic/object/isObjectArray.js +9 -0
  34. package/dist/basic/object/mergeObject.d.ts +8 -8
  35. package/dist/basic/object/unmergeObject.d.ts +8 -8
  36. package/dist/basic/string/appearNum.d.ts +6 -6
  37. package/dist/basic/string/appearNumSeat.d.ts +7 -7
  38. package/dist/basic/string/firstLower.d.ts +5 -5
  39. package/dist/basic/string/firstUpper.d.ts +5 -5
  40. package/dist/basic/string/getStartSame.d.ts +6 -6
  41. package/dist/basic/string/getStartSames.d.ts +6 -6
  42. package/dist/basic/string/index.cjs +8 -4
  43. package/dist/basic/string/index.d.ts +2 -1
  44. package/dist/basic/string/index.js +9 -5
  45. package/dist/basic/string/splitUpper.cjs +7 -0
  46. package/dist/basic/string/splitUpper.d.ts +8 -0
  47. package/dist/basic/string/splitUpper.js +7 -0
  48. package/dist/{chunk-O6GUK5PL.cjs → chunk-27WA7EI2.cjs} +2 -2
  49. package/dist/{chunk-XZDG4EDX.js → chunk-2EXA7XLK.js} +3 -3
  50. package/dist/{chunk-HRECTLZO.js → chunk-2MCEAUE7.js} +6 -2
  51. package/dist/chunk-2SOGI5PH.js +40 -0
  52. package/dist/chunk-36NQW7GX.cjs +24 -0
  53. package/dist/chunk-3ERQHPTD.cjs +13 -0
  54. package/dist/chunk-43VE3KXL.cjs +27 -0
  55. package/dist/{chunk-FESWCW7T.js → chunk-4NHMMZ3Y.js} +4 -4
  56. package/dist/chunk-4O7YOSS7.cjs +32 -0
  57. package/dist/chunk-5RZYHE3X.js +16 -0
  58. package/dist/{chunk-MAIGGOA4.js → chunk-5TD6ITIX.js} +11 -3
  59. package/dist/chunk-6A6EAFGL.cjs +13 -0
  60. package/dist/chunk-6WSP6FLZ.cjs +8 -0
  61. package/dist/{chunk-P3YVE7JK.cjs → chunk-77SI5VSS.cjs} +5 -2
  62. package/dist/chunk-7IXRH3MU.js +8 -0
  63. package/dist/chunk-7KXJO4NI.js +24 -0
  64. package/dist/{chunk-MWVRSPS5.js → chunk-7OV6BXIR.js} +8 -4
  65. package/dist/chunk-A5LHXE5X.cjs +15 -0
  66. package/dist/chunk-AM67P3W7.js +15 -0
  67. package/dist/{chunk-LFC6RYSS.js → chunk-AWC672JW.js} +13 -0
  68. package/dist/chunk-AXAVKIR3.cjs +20 -0
  69. package/dist/{chunk-3BKSZA3U.cjs → chunk-AXMOZZCM.cjs} +4 -3
  70. package/dist/chunk-B6L3ELZW.cjs +24 -0
  71. package/dist/chunk-BDJORZRC.js +13 -0
  72. package/dist/{chunk-DILKJQYV.cjs → chunk-CP2ZSRMU.cjs} +1 -1
  73. package/dist/chunk-D3SX7OUV.cjs +11 -0
  74. package/dist/chunk-DREUOE7L.cjs +48 -0
  75. package/dist/{chunk-G3AKL6ST.js → chunk-DVA5F2QX.js} +6 -6
  76. package/dist/chunk-E75NHLNL.js +32 -0
  77. package/dist/chunk-EWXBN4VG.cjs +21 -0
  78. package/dist/{chunk-L45SIOB3.js → chunk-F5D4AJXI.js} +24 -8
  79. package/dist/chunk-FGQXKLTH.cjs +67 -0
  80. package/dist/chunk-FP5ETUFZ.cjs +21 -0
  81. package/dist/chunk-GD3OA7GU.cjs +18 -0
  82. package/dist/{chunk-62JF75OY.cjs → chunk-GH6ZVMB4.cjs} +7 -3
  83. package/dist/chunk-GOH6G74S.js +17 -0
  84. package/dist/{chunk-HULCI3SJ.js → chunk-GOJN3OQ4.js} +4 -3
  85. package/dist/chunk-GYE23WAN.js +15 -0
  86. package/dist/chunk-HCEAYQHS.cjs +40 -0
  87. package/dist/{chunk-YK7WI6H7.cjs → chunk-IRKWYW5B.cjs} +13 -0
  88. package/dist/{chunk-JSU6KHXP.cjs → chunk-JQGFWHHR.cjs} +7 -7
  89. package/dist/{chunk-SYXWQKOO.cjs → chunk-L6DY4GCH.cjs} +5 -5
  90. package/dist/chunk-L7FSHU27.cjs +23 -0
  91. package/dist/chunk-LG7MY5KL.cjs +17 -0
  92. package/dist/{chunk-N6OX2U6W.cjs → chunk-M7CD62S3.cjs} +6 -2
  93. package/dist/chunk-MIC3W2VY.cjs +8 -0
  94. package/dist/chunk-MXY4W3K5.js +8 -0
  95. package/dist/chunk-NCSN3MC5.js +21 -0
  96. package/dist/{chunk-ZQX2TYQB.js → chunk-NSG7ZMXT.js} +4 -4
  97. package/dist/chunk-O2RP4UZQ.cjs +45 -0
  98. package/dist/chunk-Q6FMBSK4.js +27 -0
  99. package/dist/chunk-QJVB3JIZ.js +67 -0
  100. package/dist/chunk-QKLVFB74.js +45 -0
  101. package/dist/chunk-QZVMLHFW.cjs +16 -0
  102. package/dist/chunk-RFUD3TOQ.cjs +30 -0
  103. package/dist/chunk-RU4PMJQS.js +21 -0
  104. package/dist/chunk-S42NGJ5W.js +11 -0
  105. package/dist/chunk-SQSYFDCI.cjs +32 -0
  106. package/dist/chunk-TCMJPIRM.cjs +27 -0
  107. package/dist/{chunk-AS3WKQP7.js → chunk-TP5BP64T.js} +5 -2
  108. package/dist/{chunk-VHMUSGCJ.js → chunk-U3BGLZ6U.js} +4 -4
  109. package/dist/chunk-UGS2F6DK.cjs +16 -0
  110. package/dist/chunk-UOADEBDH.js +13 -0
  111. package/dist/chunk-VKE5JARB.js +23 -0
  112. package/dist/chunk-VYMN4FOM.cjs +16 -0
  113. package/dist/{chunk-R7G5MSGO.cjs → chunk-W2JQDWIV.cjs} +11 -3
  114. package/dist/{chunk-3OME5O5G.cjs → chunk-WI55O3IV.cjs} +2 -2
  115. package/dist/{chunk-IMCJXCTH.cjs → chunk-WMJORVL2.cjs} +5 -5
  116. package/dist/chunk-XAQM2IVP.js +16 -0
  117. package/dist/{chunk-G6FL4SSB.js → chunk-XBZX5YZW.js} +1 -1
  118. package/dist/{chunk-2PY55D6T.js → chunk-XCDKXZFR.js} +3 -3
  119. package/dist/chunk-XCTPS2CO.js +20 -0
  120. package/dist/{chunk-2B742V22.cjs → chunk-XHR36FJK.cjs} +2 -6
  121. package/dist/chunk-Y5WYKSYG.js +16 -0
  122. package/dist/{chunk-ZEXHP7HI.js → chunk-YWL2IWBT.js} +1 -1
  123. package/dist/chunk-YYWENXJO.js +27 -0
  124. package/dist/chunk-ZJHRAMCL.js +30 -0
  125. package/dist/chunk-ZVBCHJA5.js +18 -0
  126. package/dist/css/fetchUnitValue.cjs +7 -0
  127. package/dist/css/fetchUnitValue.d.ts +10 -0
  128. package/dist/css/fetchUnitValue.js +7 -0
  129. package/dist/css/getCss.cjs +7 -0
  130. package/dist/css/getCss.d.ts +3 -0
  131. package/dist/css/getCss.js +7 -0
  132. package/dist/css/index.cjs +16 -0
  133. package/dist/css/index.d.ts +3 -0
  134. package/dist/css/index.js +16 -0
  135. package/dist/css/setCss.cjs +7 -0
  136. package/dist/css/setCss.d.ts +3 -0
  137. package/dist/css/setCss.js +7 -0
  138. package/dist/html/htmlEscape.cjs +7 -0
  139. package/dist/html/htmlEscape.d.ts +8 -0
  140. package/dist/html/htmlEscape.js +7 -0
  141. package/dist/html/index.cjs +8 -0
  142. package/dist/html/index.d.ts +1 -0
  143. package/dist/html/index.js +8 -0
  144. package/dist/{index-24872dab.d.ts → index-09cd203a.d.ts} +3 -0
  145. package/dist/index-130ae781.d.ts +10 -0
  146. package/dist/{index-f8e894a2.d.ts → index-1d6e286f.d.ts} +4 -1
  147. package/dist/{index-8473d4b5.d.ts → index-4d538928.d.ts} +7 -1
  148. package/dist/index-82b62caf.d.ts +16 -0
  149. package/dist/index-84b0c6c3.d.ts +13 -0
  150. package/dist/index-a2f44e85.d.ts +13 -0
  151. package/dist/index-b16b81dc.d.ts +22 -0
  152. package/dist/index-da501f98.d.ts +10 -0
  153. package/dist/index-de2a87cb.d.ts +36 -0
  154. package/dist/index.cjs +59 -26
  155. package/dist/index.d.ts +33 -12
  156. package/dist/index.js +60 -27
  157. package/dist/iss/index.cjs +7 -3
  158. package/dist/iss/index.d.ts +1 -0
  159. package/dist/iss/index.js +7 -3
  160. package/dist/judge/index.cjs +6 -6
  161. package/dist/judge/index.js +5 -5
  162. package/dist/judge/matchs.cjs +3 -3
  163. package/dist/judge/matchs.d.ts +7 -7
  164. package/dist/judge/matchs.js +2 -2
  165. package/dist/judge/matchsEnd.d.ts +6 -6
  166. package/dist/judge/matchsStart.d.ts +6 -6
  167. package/dist/judge/matchsWhole.d.ts +6 -6
  168. package/dist/load/getSynch.cjs +7 -0
  169. package/dist/load/getSynch.d.ts +8 -0
  170. package/dist/load/getSynch.js +7 -0
  171. package/dist/load/index.cjs +12 -0
  172. package/dist/load/index.d.ts +2 -0
  173. package/dist/load/index.js +12 -0
  174. package/dist/load/loadScript.cjs +7 -0
  175. package/dist/load/loadScript.d.ts +3 -0
  176. package/dist/load/loadScript.js +7 -0
  177. package/dist/log/styleLog.d.ts +65 -65
  178. package/dist/name/getComponentNames.cjs +5 -5
  179. package/dist/name/getComponentNames.d.ts +5 -5
  180. package/dist/name/getComponentNames.js +4 -4
  181. package/dist/name/getNames.cjs +5 -5
  182. package/dist/name/getNames.d.ts +5 -5
  183. package/dist/name/getNames.js +4 -4
  184. package/dist/name/humpToLine.d.ts +5 -5
  185. package/dist/name/index.cjs +8 -8
  186. package/dist/name/index.d.ts +1 -1
  187. package/dist/name/index.js +8 -8
  188. package/dist/name/lineToLargeHump.cjs +3 -3
  189. package/dist/name/lineToLargeHump.d.ts +5 -5
  190. package/dist/name/lineToLargeHump.js +2 -2
  191. package/dist/name/lineToSmallHump.cjs +4 -3
  192. package/dist/name/lineToSmallHump.d.ts +5 -5
  193. package/dist/name/lineToSmallHump.js +3 -2
  194. package/dist/node/getPort.cjs +7 -0
  195. package/dist/node/getPort.d.ts +13 -0
  196. package/dist/node/getPort.js +7 -0
  197. package/dist/node/index.cjs +8 -0
  198. package/dist/node/index.d.ts +1 -0
  199. package/dist/node/index.js +8 -0
  200. package/dist/urls/getImportUrl.cjs +2 -2
  201. package/dist/urls/getImportUrl.d.ts +6 -6
  202. package/dist/urls/getImportUrl.js +1 -1
  203. package/dist/urls/getImportUrlSuffix.cjs +3 -3
  204. package/dist/urls/getImportUrlSuffix.d.ts +6 -6
  205. package/dist/urls/getImportUrlSuffix.js +2 -2
  206. package/dist/urls/getNewFileName.cjs +8 -0
  207. package/dist/urls/getNewFileName.d.ts +8 -0
  208. package/dist/urls/getNewFileName.js +8 -0
  209. package/dist/urls/getReplaceImportUrl.cjs +8 -0
  210. package/dist/urls/getReplaceImportUrl.d.ts +9 -0
  211. package/dist/urls/getReplaceImportUrl.js +8 -0
  212. package/dist/urls/getReplaceUrl.d.ts +6 -6
  213. package/dist/urls/getSuffix.cjs +7 -0
  214. package/dist/urls/getSuffix.d.ts +8 -0
  215. package/dist/urls/getSuffix.js +7 -0
  216. package/dist/urls/getUrlCatalogue.cjs +2 -2
  217. package/dist/urls/getUrlCatalogue.d.ts +5 -5
  218. package/dist/urls/getUrlCatalogue.js +1 -1
  219. package/dist/urls/getUrlCatalogueLast.cjs +7 -0
  220. package/dist/urls/getUrlCatalogueLast.d.ts +8 -0
  221. package/dist/urls/getUrlCatalogueLast.js +7 -0
  222. package/dist/urls/getUrlCatalogueObj.cjs +2 -2
  223. package/dist/urls/getUrlCatalogueObj.d.ts +15 -14
  224. package/dist/urls/getUrlCatalogueObj.js +1 -1
  225. package/dist/urls/index.cjs +23 -7
  226. package/dist/urls/index.d.ts +6 -2
  227. package/dist/urls/index.js +25 -9
  228. package/package.json +338 -233
  229. package/dist/chunk-3VG3A2GM.cjs +0 -24
  230. package/dist/chunk-6ADW34CB.cjs +0 -32
  231. package/dist/chunk-ETPPNXJN.cjs +0 -20
  232. package/dist/chunk-O3RJ5M35.js +0 -19
  233. package/dist/chunk-UL24YTNH.cjs +0 -32
  234. package/dist/chunk-WO6JQRTD.js +0 -16
  235. package/dist/chunk-XRGLFTH2.cjs +0 -16
  236. package/dist/chunk-YMC5G5SU.js +0 -20
  237. package/dist/index-cee90650.d.ts +0 -22
  238. package/dist/index-dfd59fc4.d.ts +0 -13
  239. package/dist/index-ee246de3.d.ts +0 -13
  240. package/dist/{chunk-T2QKEABG.js → chunk-33X65PQS.js} +3 -3
  241. package/dist/{chunk-T22I7TJQ.cjs → chunk-3YUI42XN.cjs} +3 -3
  242. package/dist/{index-dddef964.d.ts → index-a65f6120.d.ts} +1 -1
@@ -0,0 +1,45 @@
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
+ ];
25
+ function fetchUnitValue(text, str, callback) {
26
+ const reg = new RegExp(`([-]?[0-9\\.]+)(${str})`, "g");
27
+ return text.replace(reg, function(a, b, c, d) {
28
+ let is = false;
29
+ const q = text.charAt(d - 1);
30
+ const h = text.charAt(d + a.length);
31
+ const s = Number(b);
32
+ if (!isNaN(s) && tops.includes(q) && ends.includes(h)) {
33
+ is = true;
34
+ }
35
+ let thv = a;
36
+ if (callback && is) {
37
+ thv = callback(s, c, a, d);
38
+ }
39
+ return thv;
40
+ });
41
+ }
42
+
43
+
44
+
45
+ exports.fetchUnitValue = fetchUnitValue;
@@ -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
+ };
@@ -0,0 +1,67 @@
1
+ // packages/node/getPort.ts
2
+ import { createServer } from "node: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 = createServer().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
+ export {
66
+ getPort
67
+ };
@@ -0,0 +1,45 @@
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
+ ];
25
+ function fetchUnitValue(text, str, callback) {
26
+ const reg = new RegExp(`([-]?[0-9\\.]+)(${str})`, "g");
27
+ return text.replace(reg, function(a, b, c, d) {
28
+ let is = false;
29
+ const q = text.charAt(d - 1);
30
+ const h = text.charAt(d + a.length);
31
+ const s = Number(b);
32
+ if (!isNaN(s) && tops.includes(q) && ends.includes(h)) {
33
+ is = true;
34
+ }
35
+ let thv = a;
36
+ if (callback && is) {
37
+ thv = callback(s, c, a, d);
38
+ }
39
+ return thv;
40
+ });
41
+ }
42
+
43
+ export {
44
+ fetchUnitValue
45
+ };
@@ -0,0 +1,16 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkFGQXKLTHcjs = require('./chunk-FGQXKLTH.cjs');
4
+
5
+
6
+ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
7
+
8
+ // packages/node/index.ts
9
+ var node_exports = {};
10
+ _chunk5AZGAKWRcjs.__export.call(void 0, node_exports, {
11
+ getPort: () => _chunkFGQXKLTHcjs.getPort
12
+ });
13
+
14
+
15
+
16
+ exports.node_exports = node_exports;
@@ -0,0 +1,30 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkPW7RP73Jcjs = require('./chunk-PW7RP73J.cjs');
4
+
5
+ // packages/urls/getReplaceImportUrl.ts
6
+ function getReplaceImportUrl(url, imp) {
7
+ const arr = _chunkPW7RP73Jcjs.getStartSames.call(void 0, url, imp);
8
+ const ts = arr[0];
9
+ if (!/[\\|\/]$/.test(ts)) {
10
+ const regs = ts.match(/[\\|\/]([^\\|\/]*)$/);
11
+ if (regs && regs.length > 0) {
12
+ const a = regs[1];
13
+ arr[0] = ts.substring(0, (regs.index || 0) + 1);
14
+ arr[1] = a + arr[1];
15
+ }
16
+ }
17
+ const l = arr[1].split(/\\|\//).length - 1;
18
+ let ds = ["./"];
19
+ if (l > 0) {
20
+ ds = [];
21
+ for (let index = 0; index < l; index++) {
22
+ ds.push("../");
23
+ }
24
+ }
25
+ return ds.join("");
26
+ }
27
+
28
+
29
+
30
+ exports.getReplaceImportUrl = getReplaceImportUrl;
@@ -0,0 +1,21 @@
1
+ // packages/load/loadScript.ts
2
+ function loadScript(src, div) {
3
+ return new Promise((resolve) => {
4
+ const dom = document.createElement("script");
5
+ dom.src = src;
6
+ dom.type = "text/javascript";
7
+ dom.async = true;
8
+ dom.onload = () => {
9
+ resolve(void 0);
10
+ };
11
+ if (div) {
12
+ div.appendChild(dom);
13
+ } else {
14
+ document.body.appendChild(dom);
15
+ }
16
+ });
17
+ }
18
+
19
+ export {
20
+ loadScript
21
+ };
@@ -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
+ };
@@ -0,0 +1,32 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkJQGFWHHRcjs = require('./chunk-JQGFWHHR.cjs');
4
+
5
+
6
+ var _chunkWMJORVL2cjs = require('./chunk-WMJORVL2.cjs');
7
+
8
+
9
+ var _chunkXHR36FJKcjs = require('./chunk-XHR36FJK.cjs');
10
+
11
+
12
+ var _chunkLTVXRDTDcjs = require('./chunk-LTVXRDTD.cjs');
13
+
14
+
15
+ var _chunkWI55O3IVcjs = require('./chunk-WI55O3IV.cjs');
16
+
17
+
18
+ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
19
+
20
+ // packages/name/index.ts
21
+ var name_exports = {};
22
+ _chunk5AZGAKWRcjs.__export.call(void 0, name_exports, {
23
+ getComponentNames: () => _chunkJQGFWHHRcjs.getComponentNames,
24
+ getNames: () => _chunkWMJORVL2cjs.getNames,
25
+ humpToLine: () => _chunkLTVXRDTDcjs.humpToLine,
26
+ lineToLargeHump: () => _chunkWI55O3IVcjs.lineToLargeHump,
27
+ lineToSmallHump: () => _chunkXHR36FJKcjs.lineToSmallHump
28
+ });
29
+
30
+
31
+
32
+ exports.name_exports = name_exports;
@@ -0,0 +1,27 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// 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
+
26
+
27
+ exports.asyncMergeArray = asyncMergeArray;
@@ -1,18 +1,21 @@
1
1
  // packages/urls/getUrlCatalogueObj.ts
2
2
  function getUrlCatalogueObj(str) {
3
- const reg = /(\\|\/)([^\\|\/]+)(\.[a-z|A-Z]+)$/g;
3
+ const reg = /(\\|\/)([^\\|\/]+)\.([a-z|A-Z]+)$/g;
4
4
  const ml = str.replace(reg, "");
5
5
  let name = "";
6
6
  let suffix = "";
7
+ let apart = "";
7
8
  const arr = reg.exec(str);
8
9
  if (arr) {
10
+ apart = arr[1];
9
11
  name = arr[2];
10
12
  suffix = arr[3];
11
13
  }
12
14
  return {
13
15
  catalogue: ml,
14
16
  name,
15
- suffix
17
+ suffix,
18
+ apart
16
19
  };
17
20
  }
18
21
 
@@ -1,12 +1,12 @@
1
+ import {
2
+ lineToSmallHump
3
+ } from "./chunk-AM67P3W7.js";
1
4
  import {
2
5
  humpToLine
3
6
  } from "./chunk-J7CICTHH.js";
4
7
  import {
5
8
  lineToLargeHump
6
- } from "./chunk-2PY55D6T.js";
7
- import {
8
- lineToSmallHump
9
- } from "./chunk-O3RJ5M35.js";
9
+ } from "./chunk-XCDKXZFR.js";
10
10
 
11
11
  // packages/name/getNames.ts
12
12
  function getNames(name) {
@@ -0,0 +1,16 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/css/getCss.ts
2
+ function getStyles(elem) {
3
+ var view = elem.ownerDocument.defaultView;
4
+ if (!view || !view.opener) {
5
+ view = window;
6
+ }
7
+ return view.getComputedStyle(elem);
8
+ }
9
+ function getCss(elem, style) {
10
+ const styles = getStyles(elem);
11
+ return styles.getPropertyValue(style) || styles[style];
12
+ }
13
+
14
+
15
+
16
+ exports.getCss = getCss;
@@ -0,0 +1,13 @@
1
+ // packages/urls/getSuffix.ts
2
+ function getSuffix(url) {
3
+ const reg = /\.([a-z|A-Z]+)$/;
4
+ const regs = reg.exec(url);
5
+ if (regs && regs.length > 0) {
6
+ return regs[1];
7
+ }
8
+ return "";
9
+ }
10
+
11
+ export {
12
+ getSuffix
13
+ };
@@ -0,0 +1,23 @@
1
+ // packages/basic/string/splitUpper.ts
2
+ function splitUpper(name) {
3
+ const reg = /(([A-Z])([^A-Z]*))/g;
4
+ let result;
5
+ const arr = [];
6
+ let i = 0;
7
+ while ((result = reg.exec(name)) !== null) {
8
+ if (i == 0 && result.index != 0) {
9
+ arr.push(name.substring(0, result.index));
10
+ }
11
+ i++;
12
+ arr.push(result[1].toLowerCase());
13
+ }
14
+ if (arr.length > 0) {
15
+ return arr;
16
+ } else {
17
+ return [name];
18
+ }
19
+ }
20
+
21
+ export {
22
+ splitUpper
23
+ };
@@ -0,0 +1,16 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkEWXBN4VGcjs = require('./chunk-EWXBN4VG.cjs');
4
+
5
+
6
+ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
7
+
8
+ // packages/html/index.ts
9
+ var html_exports = {};
10
+ _chunk5AZGAKWRcjs.__export.call(void 0, html_exports, {
11
+ htmlEscape: () => _chunkEWXBN4VGcjs.htmlEscape
12
+ });
13
+
14
+
15
+
16
+ exports.html_exports = html_exports;
@@ -1,12 +1,18 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
+ var _chunk3VYRYSWKcjs = require('./chunk-3VYRYSWK.cjs');
4
+
5
+
6
+ var _chunkD3SX7OUVcjs = require('./chunk-D3SX7OUV.cjs');
7
+
8
+
3
9
  var _chunkNRJPCN4Jcjs = require('./chunk-NRJPCN4J.cjs');
4
10
 
5
11
 
6
- var _chunk3VYRYSWKcjs = require('./chunk-3VYRYSWK.cjs');
12
+ var _chunkA5LHXE5Xcjs = require('./chunk-A5LHXE5X.cjs');
7
13
 
8
14
 
9
- var _chunkXRGLFTH2cjs = require('./chunk-XRGLFTH2.cjs');
15
+ var _chunkMIC3W2VYcjs = require('./chunk-MIC3W2VY.cjs');
10
16
 
11
17
 
12
18
  var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
@@ -14,7 +20,9 @@ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
14
20
  // packages/basic/object/index.ts
15
21
  var object_exports = {};
16
22
  _chunk5AZGAKWRcjs.__export.call(void 0, object_exports, {
17
- isObject: () => _chunkXRGLFTH2cjs.isObject,
23
+ filterObject: () => _chunkD3SX7OUVcjs.filterObject,
24
+ isObject: () => _chunkMIC3W2VYcjs.isObject,
25
+ isObjectArray: () => _chunkA5LHXE5Xcjs.isObjectArray,
18
26
  mergeObject: () => _chunkNRJPCN4Jcjs.mergeObject,
19
27
  unmergeObject: () => _chunk3VYRYSWKcjs.unmergeObject
20
28
  });
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkUEVMS6QDcjs = require('./chunk-UEVMS6QD.cjs');
3
+ var _chunkOQL4GIEJcjs = require('./chunk-OQL4GIEJ.cjs');
4
4
 
5
5
  // packages/name/lineToLargeHump.ts
6
6
  function lineToLargeHump(name) {
7
7
  let arr = name.split("-");
8
8
  arr = arr.map((vs) => {
9
- return _chunkUEVMS6QDcjs.firstLower.call(void 0, vs);
9
+ return _chunkOQL4GIEJcjs.firstUpper.call(void 0, vs);
10
10
  });
11
11
  return arr.join("");
12
12
  }
@@ -1,18 +1,18 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkLTVXRDTDcjs = require('./chunk-LTVXRDTD.cjs');
3
+ var _chunkXHR36FJKcjs = require('./chunk-XHR36FJK.cjs');
4
4
 
5
5
 
6
- var _chunk3OME5O5Gcjs = require('./chunk-3OME5O5G.cjs');
6
+ var _chunkLTVXRDTDcjs = require('./chunk-LTVXRDTD.cjs');
7
7
 
8
8
 
9
- var _chunk2B742V22cjs = require('./chunk-2B742V22.cjs');
9
+ var _chunkWI55O3IVcjs = require('./chunk-WI55O3IV.cjs');
10
10
 
11
11
  // packages/name/getNames.ts
12
12
  function getNames(name) {
13
13
  const line = _chunkLTVXRDTDcjs.humpToLine.call(void 0, name);
14
- const upper = _chunk3OME5O5Gcjs.lineToLargeHump.call(void 0, line);
15
- const lower = _chunk2B742V22cjs.lineToSmallHump.call(void 0, upper);
14
+ const upper = _chunkWI55O3IVcjs.lineToLargeHump.call(void 0, line);
15
+ const lower = _chunkXHR36FJKcjs.lineToSmallHump.call(void 0, upper);
16
16
  return [line, upper, lower];
17
17
  }
18
18
 
@@ -0,0 +1,16 @@
1
+ import {
2
+ htmlEscape
3
+ } from "./chunk-NCSN3MC5.js";
4
+ import {
5
+ __export
6
+ } from "./chunk-UICA3PK6.js";
7
+
8
+ // packages/html/index.ts
9
+ var html_exports = {};
10
+ __export(html_exports, {
11
+ htmlEscape: () => htmlEscape
12
+ });
13
+
14
+ export {
15
+ html_exports
16
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getImportUrl
3
- } from "./chunk-LFC6RYSS.js";
3
+ } from "./chunk-AWC672JW.js";
4
4
 
5
5
  // packages/urls/getImportUrlSuffix.ts
6
6
  function getImportUrlSuffix(url, imp) {
@@ -1,12 +1,12 @@
1
1
  import {
2
- firstLower
3
- } from "./chunk-4OBNLDTJ.js";
2
+ firstUpper
3
+ } from "./chunk-EWJJKQIO.js";
4
4
 
5
5
  // packages/name/lineToLargeHump.ts
6
6
  function lineToLargeHump(name) {
7
7
  let arr = name.split("-");
8
8
  arr = arr.map((vs) => {
9
- return firstLower(vs);
9
+ return firstUpper(vs);
10
10
  });
11
11
  return arr.join("");
12
12
  }
@@ -0,0 +1,20 @@
1
+ import {
2
+ getSynch
3
+ } from "./chunk-2SOGI5PH.js";
4
+ import {
5
+ loadScript
6
+ } from "./chunk-RU4PMJQS.js";
7
+ import {
8
+ __export
9
+ } from "./chunk-UICA3PK6.js";
10
+
11
+ // packages/load/index.ts
12
+ var load_exports = {};
13
+ __export(load_exports, {
14
+ getSynch: () => getSynch,
15
+ loadScript: () => loadScript
16
+ });
17
+
18
+ export {
19
+ load_exports
20
+ };
@@ -1,17 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkOQL4GIEJcjs = require('./chunk-OQL4GIEJ.cjs');
3
+ var _chunkWI55O3IVcjs = require('./chunk-WI55O3IV.cjs');
4
4
 
5
5
 
6
6
  var _chunkUEVMS6QDcjs = require('./chunk-UEVMS6QD.cjs');
7
7
 
8
8
  // packages/name/lineToSmallHump.ts
9
9
  function lineToSmallHump(name) {
10
- let arr = name.split("-");
11
- arr = arr.map((vs) => {
12
- return _chunkUEVMS6QDcjs.firstLower.call(void 0, vs);
13
- });
14
- return _chunkOQL4GIEJcjs.firstUpper.call(void 0, arr.join(""));
10
+ return _chunkUEVMS6QDcjs.firstLower.call(void 0, _chunkWI55O3IVcjs.lineToLargeHump.call(void 0, name));
15
11
  }
16
12
 
17
13
 
@@ -0,0 +1,16 @@
1
+ import {
2
+ getPort
3
+ } from "./chunk-QJVB3JIZ.js";
4
+ import {
5
+ __export
6
+ } from "./chunk-UICA3PK6.js";
7
+
8
+ // packages/node/index.ts
9
+ var node_exports = {};
10
+ __export(node_exports, {
11
+ getPort: () => getPort
12
+ });
13
+
14
+ export {
15
+ node_exports
16
+ };
@@ -1,6 +1,6 @@
1
1
  // packages/urls/getUrlCatalogue.ts
2
2
  function getUrlCatalogue(str) {
3
- const reg = /((\\|\/)([^\\|\/]+)(\.[a-z|A-Z]+))$/g;
3
+ const reg = /((\\|\/)([^\\|\/]+)(\.[a-z|A-Z]+))?$/g;
4
4
  return str.replace(reg, "");
5
5
  }
6
6
 
@@ -0,0 +1,27 @@
1
+ import {
2
+ getUrlCatalogueObj
3
+ } from "./chunk-TP5BP64T.js";
4
+
5
+ // packages/urls/getNewFileName.ts
6
+ function getNewFileName(url) {
7
+ const obj = getUrlCatalogueObj(url);
8
+ let wb = obj.name;
9
+ if (wb) {
10
+ const reg = /([0-9]+)$/g;
11
+ const regs = reg.exec(wb);
12
+ if (regs && regs.length > 0) {
13
+ const sl = Number(regs[1]) + 1;
14
+ const reg1 = new RegExp(regs[1] + "$");
15
+ wb = wb.replace(reg1, (sl + "").padStart(regs[1].length, "0"));
16
+ } else {
17
+ wb = wb + "1";
18
+ }
19
+ return obj.catalogue + obj.apart + wb + "." + obj.suffix;
20
+ } else {
21
+ return "";
22
+ }
23
+ }
24
+
25
+ export {
26
+ getNewFileName
27
+ };