@fangzhongya/utils 0.0.8-1 → 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 (179) 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 +7 -3
  6. package/dist/basic/array/index.d.ts +1 -0
  7. package/dist/basic/array/index.js +6 -2
  8. package/dist/basic/array/isArray.d.ts +5 -5
  9. package/dist/basic/array/replaceAfter.cjs +7 -0
  10. package/dist/basic/array/replaceAfter.d.ts +10 -0
  11. package/dist/basic/array/replaceAfter.js +7 -0
  12. package/dist/basic/array/toggleArray.d.ts +7 -7
  13. package/dist/basic/index.cjs +10 -7
  14. package/dist/basic/index.d.ts +9 -6
  15. package/dist/basic/index.js +9 -6
  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/index.cjs +8 -4
  20. package/dist/basic/object/index.d.ts +2 -1
  21. package/dist/basic/object/index.js +8 -4
  22. package/dist/basic/object/isObject.d.ts +5 -5
  23. package/dist/basic/object/isObjectArray.d.ts +5 -5
  24. package/dist/basic/object/mergeObject.d.ts +8 -8
  25. package/dist/basic/object/unmergeObject.d.ts +8 -8
  26. package/dist/basic/string/appearNum.d.ts +6 -6
  27. package/dist/basic/string/appearNumSeat.d.ts +7 -7
  28. package/dist/basic/string/firstLower.d.ts +5 -5
  29. package/dist/basic/string/firstUpper.d.ts +5 -5
  30. package/dist/basic/string/getStartSame.d.ts +6 -6
  31. package/dist/basic/string/getStartSames.d.ts +6 -6
  32. package/dist/basic/string/index.cjs +6 -2
  33. package/dist/basic/string/index.d.ts +3 -2
  34. package/dist/basic/string/index.js +6 -2
  35. package/dist/basic/string/splitUpper.cjs +7 -0
  36. package/dist/basic/string/splitUpper.d.ts +8 -0
  37. package/dist/basic/string/splitUpper.js +7 -0
  38. package/dist/{chunk-46Y4IUS6.js → chunk-2EXA7XLK.js} +3 -3
  39. package/dist/chunk-2SOGI5PH.js +40 -0
  40. package/dist/{chunk-LHSOIOCS.cjs → chunk-36NQW7GX.cjs} +9 -1
  41. package/dist/chunk-43VE3KXL.cjs +27 -0
  42. package/dist/{chunk-YC2ZW3TX.cjs → chunk-4O7YOSS7.cjs} +6 -2
  43. package/dist/chunk-5RZYHE3X.js +16 -0
  44. package/dist/{chunk-HQFPDOWY.js → chunk-5TD6ITIX.js} +7 -3
  45. package/dist/chunk-6WSP6FLZ.cjs +8 -0
  46. package/dist/{chunk-P3YVE7JK.cjs → chunk-77SI5VSS.cjs} +5 -2
  47. package/dist/chunk-7IXRH3MU.js +8 -0
  48. package/dist/{chunk-7LMEBJPQ.js → chunk-7KXJO4NI.js} +9 -1
  49. package/dist/{chunk-H2LFD53G.js → chunk-7OV6BXIR.js} +5 -1
  50. package/dist/{chunk-4LZUU2JU.cjs → chunk-AXAVKIR3.cjs} +4 -0
  51. package/dist/chunk-B6L3ELZW.cjs +24 -0
  52. package/dist/{chunk-DILKJQYV.cjs → chunk-CP2ZSRMU.cjs} +1 -1
  53. package/dist/chunk-D3SX7OUV.cjs +11 -0
  54. package/dist/{chunk-3BGPFW3U.cjs → chunk-DREUOE7L.cjs} +15 -7
  55. package/dist/{chunk-2W7EPKCY.js → chunk-DVA5F2QX.js} +5 -5
  56. package/dist/{chunk-HZLFOTLG.js → chunk-E75NHLNL.js} +5 -1
  57. package/dist/chunk-EWXBN4VG.cjs +21 -0
  58. package/dist/{chunk-QODMZOIX.js → chunk-F5D4AJXI.js} +15 -7
  59. package/dist/chunk-FGQXKLTH.cjs +67 -0
  60. package/dist/{chunk-ASN2EUM7.cjs → chunk-GH6ZVMB4.cjs} +5 -1
  61. package/dist/chunk-GOH6G74S.js +17 -0
  62. package/dist/chunk-HCEAYQHS.cjs +40 -0
  63. package/dist/{chunk-ZLCUSADU.cjs → chunk-L6DY4GCH.cjs} +5 -5
  64. package/dist/chunk-L7FSHU27.cjs +23 -0
  65. package/dist/chunk-LG7MY5KL.cjs +17 -0
  66. package/dist/chunk-NCSN3MC5.js +21 -0
  67. package/dist/{chunk-V3AYCU2W.js → chunk-NSG7ZMXT.js} +4 -4
  68. package/dist/chunk-Q6FMBSK4.js +27 -0
  69. package/dist/chunk-QJVB3JIZ.js +67 -0
  70. package/dist/chunk-QZVMLHFW.cjs +16 -0
  71. package/dist/chunk-RFUD3TOQ.cjs +30 -0
  72. package/dist/chunk-S42NGJ5W.js +11 -0
  73. package/dist/{chunk-JLEIVV37.cjs → chunk-SQSYFDCI.cjs} +6 -6
  74. package/dist/{chunk-VNVG4BJ4.cjs → chunk-TCMJPIRM.cjs} +16 -12
  75. package/dist/{chunk-AS3WKQP7.js → chunk-TP5BP64T.js} +5 -2
  76. package/dist/chunk-UGS2F6DK.cjs +16 -0
  77. package/dist/chunk-VKE5JARB.js +23 -0
  78. package/dist/chunk-VYMN4FOM.cjs +16 -0
  79. package/dist/{chunk-PB6FN2XC.cjs → chunk-W2JQDWIV.cjs} +6 -2
  80. package/dist/chunk-XAQM2IVP.js +16 -0
  81. package/dist/{chunk-UH5FBLCV.js → chunk-XCTPS2CO.js} +4 -0
  82. package/dist/chunk-Y5WYKSYG.js +16 -0
  83. package/dist/{chunk-ZEXHP7HI.js → chunk-YWL2IWBT.js} +1 -1
  84. package/dist/chunk-YYWENXJO.js +27 -0
  85. package/dist/chunk-ZJHRAMCL.js +30 -0
  86. package/dist/css/fetchUnitValue.d.ts +7 -7
  87. package/dist/css/getCss.cjs +7 -0
  88. package/dist/css/getCss.d.ts +3 -0
  89. package/dist/css/getCss.js +7 -0
  90. package/dist/css/index.cjs +10 -2
  91. package/dist/css/index.d.ts +2 -0
  92. package/dist/css/index.js +10 -2
  93. package/dist/css/setCss.cjs +7 -0
  94. package/dist/css/setCss.d.ts +3 -0
  95. package/dist/css/setCss.js +7 -0
  96. package/dist/html/htmlEscape.cjs +7 -0
  97. package/dist/html/htmlEscape.d.ts +8 -0
  98. package/dist/html/htmlEscape.js +7 -0
  99. package/dist/html/index.cjs +8 -0
  100. package/dist/html/index.d.ts +1 -0
  101. package/dist/html/index.js +8 -0
  102. package/dist/index-130ae781.d.ts +10 -0
  103. package/dist/{index-08b507f8.d.ts → index-1d6e286f.d.ts} +5 -2
  104. package/dist/{index-c07fa6d2.d.ts → index-4d538928.d.ts} +4 -1
  105. package/dist/{index-8b70f9ee.d.ts → index-82b62caf.d.ts} +6 -0
  106. package/dist/{index-136bb93b.d.ts → index-84b0c6c3.d.ts} +3 -0
  107. package/dist/index-a2f44e85.d.ts +13 -0
  108. package/dist/{index-b61bcc84.d.ts → index-b16b81dc.d.ts} +3 -0
  109. package/dist/index-da501f98.d.ts +10 -0
  110. package/dist/{index-a7638ef2.d.ts → index-de2a87cb.d.ts} +9 -3
  111. package/dist/index.cjs +48 -30
  112. package/dist/index.d.ts +30 -18
  113. package/dist/index.js +50 -32
  114. package/dist/judge/index.cjs +6 -6
  115. package/dist/judge/index.d.ts +1 -1
  116. package/dist/judge/index.js +5 -5
  117. package/dist/judge/matchs.cjs +3 -3
  118. package/dist/judge/matchs.d.ts +7 -7
  119. package/dist/judge/matchs.js +2 -2
  120. package/dist/judge/matchsEnd.d.ts +6 -6
  121. package/dist/judge/matchsStart.d.ts +6 -6
  122. package/dist/judge/matchsWhole.d.ts +6 -6
  123. package/dist/load/getSynch.cjs +7 -0
  124. package/dist/load/getSynch.d.ts +8 -0
  125. package/dist/load/getSynch.js +7 -0
  126. package/dist/load/index.cjs +6 -2
  127. package/dist/load/index.d.ts +1 -0
  128. package/dist/load/index.js +5 -1
  129. package/dist/log/styleLog.d.ts +65 -65
  130. package/dist/name/getComponentNames.cjs +3 -3
  131. package/dist/name/getComponentNames.d.ts +5 -5
  132. package/dist/name/getComponentNames.js +2 -2
  133. package/dist/name/getNames.cjs +3 -3
  134. package/dist/name/getNames.d.ts +5 -5
  135. package/dist/name/getNames.js +2 -2
  136. package/dist/name/humpToLine.d.ts +5 -5
  137. package/dist/name/index.cjs +6 -6
  138. package/dist/name/index.d.ts +1 -1
  139. package/dist/name/index.js +6 -6
  140. package/dist/name/lineToLargeHump.d.ts +5 -5
  141. package/dist/name/lineToSmallHump.d.ts +5 -5
  142. package/dist/node/getPort.cjs +7 -0
  143. package/dist/node/getPort.d.ts +13 -0
  144. package/dist/node/getPort.js +7 -0
  145. package/dist/node/index.cjs +8 -0
  146. package/dist/node/index.d.ts +1 -0
  147. package/dist/node/index.js +8 -0
  148. package/dist/urls/getImportUrl.d.ts +6 -6
  149. package/dist/urls/getImportUrlSuffix.d.ts +6 -6
  150. package/dist/urls/getNewFileName.cjs +8 -0
  151. package/dist/urls/getNewFileName.d.ts +8 -0
  152. package/dist/urls/getNewFileName.js +8 -0
  153. package/dist/urls/getReplaceImportUrl.cjs +8 -0
  154. package/dist/urls/getReplaceImportUrl.d.ts +9 -0
  155. package/dist/urls/getReplaceImportUrl.js +8 -0
  156. package/dist/urls/getReplaceUrl.d.ts +6 -6
  157. package/dist/urls/getSuffix.d.ts +5 -5
  158. package/dist/urls/getUrlCatalogue.cjs +2 -2
  159. package/dist/urls/getUrlCatalogue.d.ts +5 -5
  160. package/dist/urls/getUrlCatalogue.js +1 -1
  161. package/dist/urls/getUrlCatalogueLast.d.ts +5 -5
  162. package/dist/urls/getUrlCatalogueObj.cjs +2 -2
  163. package/dist/urls/getUrlCatalogueObj.d.ts +14 -13
  164. package/dist/urls/getUrlCatalogueObj.js +1 -1
  165. package/dist/urls/index.cjs +15 -7
  166. package/dist/urls/index.d.ts +5 -3
  167. package/dist/urls/index.js +16 -8
  168. package/package.json +115 -55
  169. package/dist/chunk-E344BLWD.cjs +0 -24
  170. package/dist/chunk-XQB2HUHZ.js +0 -23
  171. package/dist/index-6a62d537.d.ts +0 -13
  172. package/dist/{chunk-FRGDQOX4.js → chunk-33X65PQS.js} +3 -3
  173. package/dist/{chunk-NGQKVTCR.cjs → chunk-3YUI42XN.cjs} +3 -3
  174. package/dist/{chunk-MXLYIZIX.js → chunk-4NHMMZ3Y.js} +3 -3
  175. package/dist/{chunk-PAJDTMC5.cjs → chunk-JQGFWHHR.cjs} +2 -2
  176. package/dist/{chunk-BWNLZJJG.js → chunk-U3BGLZ6U.js} +3 -3
  177. package/dist/{chunk-5UV36ZIW.cjs → chunk-WMJORVL2.cjs} +2 -2
  178. package/dist/{index-110fd300.d.ts → index-445fe401.d.ts} +1 -1
  179. package/dist/{index-48710eab.d.ts → index-a65f6120.d.ts} +1 -1
@@ -0,0 +1,17 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/array/replaceAfter.ts
2
+ function replaceAfter(arr, obj, id) {
3
+ const varr = [];
4
+ for (let index = 0; index < arr.length; index++) {
5
+ const element = arr[index];
6
+ const vs = obj;
7
+ if (element[id] !== vs[id]) {
8
+ varr.push(arr[index]);
9
+ }
10
+ }
11
+ varr.push(obj);
12
+ return varr;
13
+ }
14
+
15
+
16
+
17
+ exports.replaceAfter = replaceAfter;
@@ -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,15 +1,15 @@
1
1
  import {
2
2
  matchs
3
- } from "./chunk-FRGDQOX4.js";
4
- import {
5
- matchsStart
6
- } from "./chunk-S6JRKYPY.js";
3
+ } from "./chunk-33X65PQS.js";
7
4
  import {
8
5
  matchsWhole
9
6
  } from "./chunk-IRGCP7KH.js";
10
7
  import {
11
8
  matchsEnd
12
9
  } 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,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,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,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,15 +1,15 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkPAJDTMC5cjs = require('./chunk-PAJDTMC5.cjs');
3
+ var _chunkJQGFWHHRcjs = require('./chunk-JQGFWHHR.cjs');
4
4
 
5
5
 
6
- var _chunk5UV36ZIWcjs = require('./chunk-5UV36ZIW.cjs');
6
+ var _chunkWMJORVL2cjs = require('./chunk-WMJORVL2.cjs');
7
7
 
8
8
 
9
- var _chunkLTVXRDTDcjs = require('./chunk-LTVXRDTD.cjs');
9
+ var _chunkXHR36FJKcjs = require('./chunk-XHR36FJK.cjs');
10
10
 
11
11
 
12
- var _chunkXHR36FJKcjs = require('./chunk-XHR36FJK.cjs');
12
+ var _chunkLTVXRDTDcjs = require('./chunk-LTVXRDTD.cjs');
13
13
 
14
14
 
15
15
  var _chunkWI55O3IVcjs = require('./chunk-WI55O3IV.cjs');
@@ -20,8 +20,8 @@ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
20
20
  // packages/name/index.ts
21
21
  var name_exports = {};
22
22
  _chunk5AZGAKWRcjs.__export.call(void 0, name_exports, {
23
- getComponentNames: () => _chunkPAJDTMC5cjs.getComponentNames,
24
- getNames: () => _chunk5UV36ZIWcjs.getNames,
23
+ getComponentNames: () => _chunkJQGFWHHRcjs.getComponentNames,
24
+ getNames: () => _chunkWMJORVL2cjs.getNames,
25
25
  humpToLine: () => _chunkLTVXRDTDcjs.humpToLine,
26
26
  lineToLargeHump: () => _chunkWI55O3IVcjs.lineToLargeHump,
27
27
  lineToSmallHump: () => _chunkXHR36FJKcjs.lineToSmallHump
@@ -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
 
@@ -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
 
@@ -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,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,9 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkNRJPCN4Jcjs = require('./chunk-NRJPCN4J.cjs');
3
+ var _chunk3VYRYSWKcjs = require('./chunk-3VYRYSWK.cjs');
4
4
 
5
5
 
6
- var _chunk3VYRYSWKcjs = require('./chunk-3VYRYSWK.cjs');
6
+ var _chunkD3SX7OUVcjs = require('./chunk-D3SX7OUV.cjs');
7
+
8
+
9
+ var _chunkNRJPCN4Jcjs = require('./chunk-NRJPCN4J.cjs');
7
10
 
8
11
 
9
12
  var _chunkA5LHXE5Xcjs = require('./chunk-A5LHXE5X.cjs');
@@ -17,6 +20,7 @@ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
17
20
  // packages/basic/object/index.ts
18
21
  var object_exports = {};
19
22
  _chunk5AZGAKWRcjs.__export.call(void 0, object_exports, {
23
+ filterObject: () => _chunkD3SX7OUVcjs.filterObject,
20
24
  isObject: () => _chunkMIC3W2VYcjs.isObject,
21
25
  isObjectArray: () => _chunkA5LHXE5Xcjs.isObjectArray,
22
26
  mergeObject: () => _chunkNRJPCN4Jcjs.mergeObject,
@@ -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,3 +1,6 @@
1
+ import {
2
+ getSynch
3
+ } from "./chunk-2SOGI5PH.js";
1
4
  import {
2
5
  loadScript
3
6
  } from "./chunk-RU4PMJQS.js";
@@ -8,6 +11,7 @@ import {
8
11
  // packages/load/index.ts
9
12
  var load_exports = {};
10
13
  __export(load_exports, {
14
+ getSynch: () => getSynch,
11
15
  loadScript: () => loadScript
12
16
  });
13
17
 
@@ -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
+ };
@@ -0,0 +1,30 @@
1
+ import {
2
+ getStartSames
3
+ } from "./chunk-A276ZDLP.js";
4
+
5
+ // packages/urls/getReplaceImportUrl.ts
6
+ function getReplaceImportUrl(url, imp) {
7
+ const arr = getStartSames(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
+ export {
29
+ getReplaceImportUrl
30
+ };
@@ -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 };
@@ -0,0 +1,7 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkUGS2F6DKcjs = require('../chunk-UGS2F6DK.cjs');
4
+ require('../chunk-5AZGAKWR.cjs');
5
+
6
+
7
+ exports.getCss = _chunkUGS2F6DKcjs.getCss;
@@ -0,0 +1,3 @@
1
+ declare function getCss(elem: HTMLDivElement, style: string): any;
2
+
3
+ export { getCss };
@@ -0,0 +1,7 @@
1
+ import {
2
+ getCss
3
+ } from "../chunk-5RZYHE3X.js";
4
+ import "../chunk-UICA3PK6.js";
5
+ export {
6
+ getCss
7
+ };
@@ -1,8 +1,16 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-LHSOIOCS.cjs');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-36NQW7GX.cjs');
2
2
 
3
3
 
4
4
  var _chunkO2RP4UZQcjs = require('../chunk-O2RP4UZQ.cjs');
5
+
6
+
7
+ var _chunkUGS2F6DKcjs = require('../chunk-UGS2F6DK.cjs');
8
+
9
+
10
+ var _chunk6WSP6FLZcjs = require('../chunk-6WSP6FLZ.cjs');
5
11
  require('../chunk-5AZGAKWR.cjs');
6
12
 
7
13
 
8
- exports.fetchUnitValue = _chunkO2RP4UZQcjs.fetchUnitValue;
14
+
15
+
16
+ exports.fetchUnitValue = _chunkO2RP4UZQcjs.fetchUnitValue; exports.getCss = _chunkUGS2F6DKcjs.getCss; exports.setCss = _chunk6WSP6FLZcjs.setCss;
@@ -1 +1,3 @@
1
1
  export { fetchUnitValue } from './fetchUnitValue.js';
2
+ export { getCss } from './getCss.js';
3
+ export { setCss } from './setCss.js';
package/dist/css/index.js CHANGED
@@ -1,8 +1,16 @@
1
- import "../chunk-7LMEBJPQ.js";
1
+ import "../chunk-7KXJO4NI.js";
2
2
  import {
3
3
  fetchUnitValue
4
4
  } from "../chunk-QKLVFB74.js";
5
+ import {
6
+ getCss
7
+ } from "../chunk-5RZYHE3X.js";
8
+ import {
9
+ setCss
10
+ } from "../chunk-7IXRH3MU.js";
5
11
  import "../chunk-UICA3PK6.js";
6
12
  export {
7
- fetchUnitValue
13
+ fetchUnitValue,
14
+ getCss,
15
+ setCss
8
16
  };
@@ -0,0 +1,7 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunk6WSP6FLZcjs = require('../chunk-6WSP6FLZ.cjs');
4
+ require('../chunk-5AZGAKWR.cjs');
5
+
6
+
7
+ exports.setCss = _chunk6WSP6FLZcjs.setCss;
@@ -0,0 +1,3 @@
1
+ declare function setCss(elem: HTMLDivElement, style: string, value: string): void;
2
+
3
+ export { setCss };
@@ -0,0 +1,7 @@
1
+ import {
2
+ setCss
3
+ } from "../chunk-7IXRH3MU.js";
4
+ import "../chunk-UICA3PK6.js";
5
+ export {
6
+ setCss
7
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkEWXBN4VGcjs = require('../chunk-EWXBN4VG.cjs');
4
+ require('../chunk-5AZGAKWR.cjs');
5
+
6
+
7
+ exports.htmlEscape = _chunkEWXBN4VGcjs.htmlEscape;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 格式html字符串
3
+ * @param str
4
+ * @returns
5
+ */
6
+ declare function htmlEscape(str: string): string;
7
+
8
+ export { htmlEscape };
@@ -0,0 +1,7 @@
1
+ import {
2
+ htmlEscape
3
+ } from "../chunk-NCSN3MC5.js";
4
+ import "../chunk-UICA3PK6.js";
5
+ export {
6
+ htmlEscape
7
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-VYMN4FOM.cjs');
2
+
3
+
4
+ var _chunkEWXBN4VGcjs = require('../chunk-EWXBN4VG.cjs');
5
+ require('../chunk-5AZGAKWR.cjs');
6
+
7
+
8
+ exports.htmlEscape = _chunkEWXBN4VGcjs.htmlEscape;
@@ -0,0 +1 @@
1
+ export { htmlEscape } from './htmlEscape.js';
@@ -0,0 +1,8 @@
1
+ import "../chunk-XAQM2IVP.js";
2
+ import {
3
+ htmlEscape
4
+ } from "../chunk-NCSN3MC5.js";
5
+ import "../chunk-UICA3PK6.js";
6
+ export {
7
+ htmlEscape
8
+ };