@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
@@ -0,0 +1,31 @@
1
+ // packages/basic/object/attrValueSort.ts
2
+ function attrValueSort(obj, arr, sort) {
3
+ let arrsort;
4
+ if (arr && arr.length > 0) {
5
+ arrsort = arr.map((k) => {
6
+ return {
7
+ key: k,
8
+ value: obj[k]
9
+ };
10
+ });
11
+ } else {
12
+ arrsort = Object.keys(obj).map((k) => {
13
+ return {
14
+ key: k,
15
+ value: obj[k]
16
+ };
17
+ });
18
+ }
19
+ arrsort.sort((a, b) => {
20
+ if (sort) {
21
+ return sort(a.value, b.value);
22
+ } else {
23
+ return a.value - b.value;
24
+ }
25
+ });
26
+ return arrsort.map((o) => o.key);
27
+ }
28
+
29
+ export {
30
+ attrValueSort
31
+ };
@@ -3,18 +3,22 @@ function asyncMergeArray(arr, callback) {
3
3
  return new Promise((resolve, reject) => {
4
4
  let index = 0;
5
5
  const k = arr.length;
6
- arr.forEach((...a) => {
7
- callback(
8
- (...arr2) => {
9
- index++;
10
- if (k == index) {
11
- resolve(arr2);
12
- }
13
- },
14
- reject,
15
- ...a
16
- );
17
- });
6
+ if (k > 0) {
7
+ arr.forEach((...a) => {
8
+ callback(
9
+ (...arr2) => {
10
+ index++;
11
+ if (k == index) {
12
+ resolve(arr2);
13
+ }
14
+ },
15
+ reject,
16
+ ...a
17
+ );
18
+ });
19
+ } else {
20
+ resolve(arr);
21
+ }
18
22
  });
19
23
  }
20
24
 
@@ -0,0 +1,29 @@
1
+ import {
2
+ getAttrObj
3
+ } from "./chunk-TPU4VJMB.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 w = Number(attr["width"] || bs[2]) || 24;
16
+ const h = Number(attr["height"] || bs[3]) || 24;
17
+ return {
18
+ body,
19
+ viewBox: b,
20
+ width: w,
21
+ height: h
22
+ };
23
+ }
24
+ return;
25
+ }
26
+
27
+ export {
28
+ getSVG
29
+ };
@@ -0,0 +1,16 @@
1
+ // packages/css/getAttrObj.ts
2
+ function getAttrObj(str) {
3
+ const reg = /([^\s|=|"|']+)(=('([^']*)'|"([^"]*)"|([^\s]*)))?/g;
4
+ let result;
5
+ const obj = {};
6
+ while ((result = reg.exec(str)) !== null) {
7
+ const key = result[1];
8
+ const value = result[5] || result[3];
9
+ obj[key] = value;
10
+ }
11
+ return obj;
12
+ }
13
+
14
+ export {
15
+ getAttrObj
16
+ };
@@ -0,0 +1,31 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/object/attrValueSort.ts
2
+ function attrValueSort(obj, arr, sort) {
3
+ let arrsort;
4
+ if (arr && arr.length > 0) {
5
+ arrsort = arr.map((k) => {
6
+ return {
7
+ key: k,
8
+ value: obj[k]
9
+ };
10
+ });
11
+ } else {
12
+ arrsort = Object.keys(obj).map((k) => {
13
+ return {
14
+ key: k,
15
+ value: obj[k]
16
+ };
17
+ });
18
+ }
19
+ arrsort.sort((a, b) => {
20
+ if (sort) {
21
+ return sort(a.value, b.value);
22
+ } else {
23
+ return a.value - b.value;
24
+ }
25
+ });
26
+ return arrsort.map((o) => o.key);
27
+ }
28
+
29
+
30
+
31
+ exports.attrValueSort = attrValueSort;
@@ -1,27 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/css/fetchUnitValue.ts
2
- var tops = [
3
- "\n",
4
- "\r",
5
- " ",
6
- "+",
7
- "-",
8
- "*",
9
- "/",
10
- ":",
11
- "("
12
- ];
13
- var ends = [
14
- "\n",
15
- "\r",
16
- " ",
17
- "+",
18
- "-",
19
- "*",
20
- "/",
21
- ";",
22
- ")",
23
- "}"
24
- ];
2
+ var tops = ["\n", "\r", " ", "+", "-", "*", "/", ":", "("];
3
+ var ends = ["\n", "\r", " ", "+", "-", "*", "/", ";", ")", "}"];
25
4
  function fetchUnitValue(text, str, callback) {
26
5
  const reg = new RegExp(`([-]?[0-9\\.]+)(${str})`, "g");
27
6
  return text.replace(reg, function(a, b, c, d) {
@@ -1,8 +1,8 @@
1
1
  // packages/basic/string/splitUpper.ts
2
2
  function splitUpper(name) {
3
- let reg = /(([A-Z])([^A-Z]*))/g;
3
+ const reg = /(([A-Z])([^A-Z]*))/g;
4
4
  let result;
5
- let arr = [];
5
+ const arr = [];
6
6
  let i = 0;
7
7
  while ((result = reg.exec(name)) !== null) {
8
8
  if (i == 0 && result.index != 0) {
@@ -11,7 +11,11 @@ function splitUpper(name) {
11
11
  i++;
12
12
  arr.push(result[1].toLowerCase());
13
13
  }
14
- return arr;
14
+ if (arr.length > 0) {
15
+ return arr;
16
+ } else {
17
+ return [name];
18
+ }
15
19
  }
16
20
 
17
21
  export {
@@ -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,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;
@@ -6,7 +6,16 @@ var _chunkNRJPCN4Jcjs = require('./chunk-NRJPCN4J.cjs');
6
6
  var _chunk3VYRYSWKcjs = require('./chunk-3VYRYSWK.cjs');
7
7
 
8
8
 
9
- var _chunkQLBOPNV4cjs = require('./chunk-QLBOPNV4.cjs');
9
+ var _chunkUFYLVZNUcjs = require('./chunk-UFYLVZNU.cjs');
10
+
11
+
12
+ var _chunkD3SX7OUVcjs = require('./chunk-D3SX7OUV.cjs');
13
+
14
+
15
+ var _chunkGOUC2DFAcjs = require('./chunk-GOUC2DFA.cjs');
16
+
17
+
18
+ var _chunkA5LHXE5Xcjs = require('./chunk-A5LHXE5X.cjs');
10
19
 
11
20
 
12
21
  var _chunkMIC3W2VYcjs = require('./chunk-MIC3W2VY.cjs');
@@ -17,8 +26,11 @@ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
17
26
  // packages/basic/object/index.ts
18
27
  var object_exports = {};
19
28
  _chunk5AZGAKWRcjs.__export.call(void 0, object_exports, {
29
+ attrValueSort: () => _chunkUFYLVZNUcjs.attrValueSort,
30
+ filterObject: () => _chunkD3SX7OUVcjs.filterObject,
31
+ hasOwn: () => _chunkGOUC2DFAcjs.hasOwn,
20
32
  isObject: () => _chunkMIC3W2VYcjs.isObject,
21
- isObjectArray: () => _chunkQLBOPNV4cjs.isObjectArray,
33
+ isObjectArray: () => _chunkA5LHXE5Xcjs.isObjectArray,
22
34
  mergeObject: () => _chunkNRJPCN4Jcjs.mergeObject,
23
35
  unmergeObject: () => _chunk3VYRYSWKcjs.unmergeObject
24
36
  });
@@ -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,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
+ };
@@ -4,9 +4,18 @@ import {
4
4
  import {
5
5
  unmergeObject
6
6
  } from "./chunk-A6J46LQK.js";
7
+ import {
8
+ attrValueSort
9
+ } from "./chunk-T4BAVDTH.js";
10
+ import {
11
+ filterObject
12
+ } from "./chunk-S42NGJ5W.js";
13
+ import {
14
+ hasOwn
15
+ } from "./chunk-3IR2ABRO.js";
7
16
  import {
8
17
  isObjectArray
9
- } from "./chunk-SRR2GWC7.js";
18
+ } from "./chunk-GYE23WAN.js";
10
19
  import {
11
20
  isObject
12
21
  } from "./chunk-MXY4W3K5.js";
@@ -17,6 +26,9 @@ import {
17
26
  // packages/basic/object/index.ts
18
27
  var object_exports = {};
19
28
  __export(object_exports, {
29
+ attrValueSort: () => attrValueSort,
30
+ filterObject: () => filterObject,
31
+ hasOwn: () => hasOwn,
20
32
  isObject: () => isObject,
21
33
  isObjectArray: () => isObjectArray,
22
34
  mergeObject: () => mergeObject,
@@ -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
+ };
@@ -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
+ };
@@ -0,0 +1,29 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkPVPUF7SGcjs = require('./chunk-PVPUF7SG.cjs');
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 = _chunkPVPUF7SGcjs.getAttrObj.call(void 0, css);
13
+ const b = attr["viewBox"] || "";
14
+ const bs = b.split(" ") || [];
15
+ const w = Number(attr["width"] || bs[2]) || 24;
16
+ const h = Number(attr["height"] || bs[3]) || 24;
17
+ return {
18
+ body,
19
+ viewBox: b,
20
+ width: w,
21
+ height: h
22
+ };
23
+ }
24
+ return;
25
+ }
26
+
27
+
28
+
29
+ exports.getSVG = getSVG;
@@ -0,0 +1,36 @@
1
+ import {
2
+ getSVG
3
+ } from "./chunk-TGOVIGOG.js";
4
+ import {
5
+ setCss
6
+ } from "./chunk-XUL6LPTN.js";
7
+ import {
8
+ fetchUnitValue
9
+ } from "./chunk-WX3JYE47.js";
10
+ import {
11
+ getAttrObj
12
+ } from "./chunk-TPU4VJMB.js";
13
+ import {
14
+ getPositionRelative
15
+ } from "./chunk-MQHLAQQA.js";
16
+ import {
17
+ getCss
18
+ } from "./chunk-5RZYHE3X.js";
19
+ import {
20
+ __export
21
+ } from "./chunk-UICA3PK6.js";
22
+
23
+ // packages/css/index.ts
24
+ var css_exports = {};
25
+ __export(css_exports, {
26
+ fetchUnitValue: () => fetchUnitValue,
27
+ getAttrObj: () => getAttrObj,
28
+ getCss: () => getCss,
29
+ getPositionRelative: () => getPositionRelative,
30
+ getSVG: () => getSVG,
31
+ setCss: () => setCss
32
+ });
33
+
34
+ export {
35
+ css_exports
36
+ };
@@ -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 _chunkPVPUF7SGcjs = require('../chunk-PVPUF7SG.cjs');
4
+ require('../chunk-5AZGAKWR.cjs');
5
+
6
+
7
+ exports.getAttrObj = _chunkPVPUF7SGcjs.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-TPU4VJMB.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 _chunkYTYDFD4Zcjs = require('../chunk-YTYDFD4Z.cjs');
4
+ require('../chunk-PVPUF7SG.cjs');
5
+ require('../chunk-5AZGAKWR.cjs');
6
+
7
+
8
+ exports.getSVG = _chunkYTYDFD4Zcjs.getSVG;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * 通过svg 字符串获取对应数据
3
+ * @param{string} str
4
+ */
5
+ declare function getSVG(str: string): {
6
+ body: string;
7
+ viewBox: string;
8
+ width: number;
9
+ height: number;
10
+ } | undefined;
11
+
12
+ export { getSVG };
@@ -0,0 +1,8 @@
1
+ import {
2
+ getSVG
3
+ } from "../chunk-TGOVIGOG.js";
4
+ import "../chunk-TPU4VJMB.js";
5
+ import "../chunk-UICA3PK6.js";
6
+ export {
7
+ getSVG
8
+ };
@@ -1,7 +1,20 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-7B2HWFLC.cjs');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-CCML3KTG.cjs');
2
2
 
3
3
 
4
- var _chunkO2RP4UZQcjs = require('../chunk-O2RP4UZQ.cjs');
4
+ var _chunkYTYDFD4Zcjs = require('../chunk-YTYDFD4Z.cjs');
5
+
6
+
7
+ var _chunk4X7AFGTVcjs = require('../chunk-4X7AFGTV.cjs');
8
+ require('../chunk-LTVXRDTD.cjs');
9
+
10
+
11
+ var _chunkUGFSIZ5Pcjs = require('../chunk-UGFSIZ5P.cjs');
12
+
13
+
14
+ var _chunkPVPUF7SGcjs = require('../chunk-PVPUF7SG.cjs');
15
+
16
+
17
+ var _chunkVY5VQ7WEcjs = require('../chunk-VY5VQ7WE.cjs');
5
18
 
6
19
 
7
20
  var _chunkUGS2F6DKcjs = require('../chunk-UGS2F6DK.cjs');
@@ -9,4 +22,8 @@ require('../chunk-5AZGAKWR.cjs');
9
22
 
10
23
 
11
24
 
12
- exports.fetchUnitValue = _chunkO2RP4UZQcjs.fetchUnitValue; exports.getCss = _chunkUGS2F6DKcjs.getCss;
25
+
26
+
27
+
28
+
29
+ exports.fetchUnitValue = _chunkUGFSIZ5Pcjs.fetchUnitValue; exports.getAttrObj = _chunkPVPUF7SGcjs.getAttrObj; exports.getCss = _chunkUGS2F6DKcjs.getCss; exports.getPositionRelative = _chunkVY5VQ7WEcjs.getPositionRelative; exports.getSVG = _chunkYTYDFD4Zcjs.getSVG; exports.setCss = _chunk4X7AFGTVcjs.setCss;
@@ -1,2 +1,6 @@
1
1
  export { fetchUnitValue } from './fetchUnitValue.js';
2
2
  export { getCss } from './getCss.js';
3
+ export { getAttrObj } from './getAttrObj.js';
4
+ export { getPositionRelative } from './getPositionRelative.js';
5
+ export { getSVG } from './getSVG.js';
6
+ export { setCss } from './setCss.js';
package/dist/css/index.js CHANGED
@@ -1,12 +1,29 @@
1
- import "../chunk-RWKZ6ZKW.js";
1
+ import "../chunk-ZUKB4C56.js";
2
+ import {
3
+ getSVG
4
+ } from "../chunk-TGOVIGOG.js";
5
+ import {
6
+ setCss
7
+ } from "../chunk-XUL6LPTN.js";
8
+ import "../chunk-J7CICTHH.js";
2
9
  import {
3
10
  fetchUnitValue
4
- } from "../chunk-QKLVFB74.js";
11
+ } from "../chunk-WX3JYE47.js";
12
+ import {
13
+ getAttrObj
14
+ } from "../chunk-TPU4VJMB.js";
15
+ import {
16
+ getPositionRelative
17
+ } from "../chunk-MQHLAQQA.js";
5
18
  import {
6
19
  getCss
7
20
  } from "../chunk-5RZYHE3X.js";
8
21
  import "../chunk-UICA3PK6.js";
9
22
  export {
10
23
  fetchUnitValue,
11
- getCss
24
+ getAttrObj,
25
+ getCss,
26
+ getPositionRelative,
27
+ getSVG,
28
+ setCss
12
29
  };