@fangzhongya/utils 0.0.8-5 → 0.0.8-50

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 (197) 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 +16 -10
  11. package/dist/basic/index.d.ts +9 -3
  12. package/dist/basic/index.js +15 -9
  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/deepCopy.cjs +7 -0
  17. package/dist/basic/object/deepCopy.d.ts +8 -0
  18. package/dist/basic/object/deepCopy.js +7 -0
  19. package/dist/basic/object/filterObject.cjs +7 -0
  20. package/dist/basic/object/filterObject.d.ts +14 -0
  21. package/dist/basic/object/filterObject.js +7 -0
  22. package/dist/basic/object/getSort.cjs +7 -0
  23. package/dist/basic/object/getSort.d.ts +10 -0
  24. package/dist/basic/object/getSort.js +7 -0
  25. package/dist/basic/object/hasOwn.cjs +7 -0
  26. package/dist/basic/object/hasOwn.d.ts +9 -0
  27. package/dist/basic/object/hasOwn.js +7 -0
  28. package/dist/basic/object/index.cjs +26 -2
  29. package/dist/basic/object/index.d.ts +6 -0
  30. package/dist/basic/object/index.js +25 -1
  31. package/dist/basic/object/isObject.d.ts +5 -5
  32. package/dist/basic/object/isObjectArray.d.ts +5 -5
  33. package/dist/basic/object/mergeObject.d.ts +8 -8
  34. package/dist/basic/object/setSort.cjs +7 -0
  35. package/dist/basic/object/setSort.d.ts +7 -0
  36. package/dist/basic/object/setSort.js +7 -0
  37. package/dist/basic/object/unmergeObject.d.ts +8 -8
  38. package/dist/basic/string/appearNum.d.ts +6 -6
  39. package/dist/basic/string/appearNumSeat.d.ts +7 -7
  40. package/dist/basic/string/firstLower.d.ts +5 -5
  41. package/dist/basic/string/firstUpper.d.ts +5 -5
  42. package/dist/basic/string/getStartSame.d.ts +6 -6
  43. package/dist/basic/string/getStartSames.d.ts +6 -6
  44. package/dist/basic/string/index.d.ts +1 -1
  45. package/dist/basic/string/splitUpper.d.ts +5 -5
  46. package/dist/chunk-2OR4FUOA.cjs +47 -0
  47. package/dist/chunk-2TWAHAYB.js +20 -0
  48. package/dist/chunk-3CNQO7VA.js +73 -0
  49. package/dist/chunk-3IR2ABRO.js +8 -0
  50. package/dist/chunk-3LWFUVER.js +60 -0
  51. package/dist/{chunk-P3HC3D2H.cjs → chunk-4O7YOSS7.cjs} +5 -5
  52. package/dist/chunk-4X7AFGTV.cjs +21 -0
  53. package/dist/chunk-6O6YWEOS.cjs +20 -0
  54. package/dist/chunk-7AIT4XSD.cjs +13 -0
  55. package/dist/chunk-7KMW3ZX4.cjs +36 -0
  56. package/dist/{chunk-7KXJO4NI.js → chunk-APSYRNFU.js} +15 -3
  57. package/dist/chunk-B4CE4K4W.js +26 -0
  58. package/dist/chunk-BPJMBYDX.cjs +73 -0
  59. package/dist/{chunk-PB6FN2XC.cjs → chunk-BYKL65GO.cjs} +24 -0
  60. package/dist/chunk-D3SX7OUV.cjs +11 -0
  61. package/dist/chunk-E5FTKWGB.js +112 -0
  62. package/dist/{chunk-3NFJ3TZL.js → chunk-E75NHLNL.js} +6 -6
  63. package/dist/chunk-EWXBN4VG.cjs +21 -0
  64. package/dist/chunk-FGQXKLTH.cjs +67 -0
  65. package/dist/chunk-GFAUQTB2.cjs +33 -0
  66. package/dist/chunk-GIAO77MY.js +49 -0
  67. package/dist/chunk-GOUC2DFA.cjs +8 -0
  68. package/dist/chunk-IIKQHLKT.cjs +60 -0
  69. package/dist/chunk-J2GSJKCY.cjs +20 -0
  70. package/dist/chunk-KQR7FXBF.js +20 -0
  71. package/dist/chunk-LEPZYF2N.cjs +49 -0
  72. package/dist/chunk-MGX7U2CG.cjs +20 -0
  73. package/dist/{chunk-XK2G74PE.cjs → chunk-MMGEI3PX.cjs} +5 -5
  74. package/dist/chunk-MQHLAQQA.js +21 -0
  75. package/dist/chunk-N3FZ4WUI.js +16 -0
  76. package/dist/chunk-NCSN3MC5.js +21 -0
  77. package/dist/{chunk-PP6UWBUG.js → chunk-NVNNBCS7.js} +4 -4
  78. package/dist/chunk-Q63V2U5G.js +47 -0
  79. package/dist/chunk-Q6FMBSK4.js +27 -0
  80. package/dist/chunk-QJVB3JIZ.js +67 -0
  81. package/dist/chunk-QZVMLHFW.cjs +16 -0
  82. package/dist/chunk-RQRBSTSX.cjs +112 -0
  83. package/dist/chunk-S42NGJ5W.js +11 -0
  84. package/dist/chunk-SRMXMAFO.cjs +26 -0
  85. package/dist/chunk-T4BAVDTH.js +31 -0
  86. package/dist/{chunk-VNVG4BJ4.cjs → chunk-TCMJPIRM.cjs} +16 -12
  87. package/dist/chunk-TE3XNGF4.cjs +16 -0
  88. package/dist/{chunk-HQFPDOWY.js → chunk-TYRSVKNE.js} +24 -0
  89. package/dist/chunk-UFYLVZNU.cjs +31 -0
  90. package/dist/{chunk-O2RP4UZQ.cjs → chunk-UGFSIZ5P.cjs} +2 -23
  91. package/dist/chunk-VY5VQ7WE.cjs +21 -0
  92. package/dist/chunk-WIYZQNGO.js +33 -0
  93. package/dist/chunk-WPW3M5AP.js +20 -0
  94. package/dist/{chunk-QKLVFB74.js → chunk-WX3JYE47.js} +2 -23
  95. package/dist/chunk-XUL6LPTN.js +21 -0
  96. package/dist/chunk-Y5WYKSYG.js +16 -0
  97. package/dist/chunk-ZEAT23CI.js +13 -0
  98. package/dist/css/fetchUnitValue.cjs +2 -2
  99. package/dist/css/fetchUnitValue.d.ts +7 -7
  100. package/dist/css/fetchUnitValue.js +1 -1
  101. package/dist/css/getAttrObj.cjs +7 -0
  102. package/dist/css/getAttrObj.d.ts +11 -0
  103. package/dist/css/getAttrObj.js +7 -0
  104. package/dist/css/getCss.d.ts +7 -1
  105. package/dist/css/getPositionRelative.cjs +8 -0
  106. package/dist/css/getPositionRelative.d.ts +7 -0
  107. package/dist/css/getPositionRelative.js +8 -0
  108. package/dist/css/getSVG.cjs +8 -0
  109. package/dist/css/getSVG.d.ts +14 -0
  110. package/dist/css/getSVG.js +8 -0
  111. package/dist/css/index.cjs +17 -4
  112. package/dist/css/index.d.ts +3 -0
  113. package/dist/css/index.js +17 -4
  114. package/dist/css/setCss.cjs +3 -2
  115. package/dist/css/setCss.d.ts +9 -1
  116. package/dist/css/setCss.js +2 -1
  117. package/dist/dom/getLocus.cjs +7 -0
  118. package/dist/dom/getLocus.d.ts +14 -0
  119. package/dist/dom/getLocus.js +7 -0
  120. package/dist/dom/getShiftEvent.cjs +13 -0
  121. package/dist/dom/getShiftEvent.d.ts +25 -0
  122. package/dist/dom/getShiftEvent.js +13 -0
  123. package/dist/dom/index.cjs +18 -0
  124. package/dist/dom/index.d.ts +2 -0
  125. package/dist/dom/index.js +18 -0
  126. package/dist/html/analysisHtml.cjs +8 -0
  127. package/dist/html/analysisHtml.d.ts +13 -0
  128. package/dist/html/analysisHtml.js +8 -0
  129. package/dist/html/htmlEscape.cjs +7 -0
  130. package/dist/html/htmlEscape.d.ts +8 -0
  131. package/dist/html/htmlEscape.js +7 -0
  132. package/dist/html/index.cjs +13 -0
  133. package/dist/html/index.d.ts +2 -0
  134. package/dist/html/index.js +13 -0
  135. package/dist/{index-0bdc2c4f.d.ts → index-071af5d4.d.ts} +2 -2
  136. package/dist/index-130ae781.d.ts +10 -0
  137. package/dist/index-5aea66bb.d.ts +21 -0
  138. package/dist/index-ae0241ec.d.ts +13 -0
  139. package/dist/{index-82b62caf.d.ts → index-b5d07d0c.d.ts} +9 -0
  140. package/dist/index-bc08cd32.d.ts +14 -0
  141. package/dist/index-ed8c0e9f.d.ts +37 -0
  142. package/dist/index.cjs +61 -30
  143. package/dist/index.d.ts +31 -12
  144. package/dist/index.js +62 -31
  145. package/dist/judge/index.d.ts +1 -1
  146. package/dist/judge/matchs.d.ts +7 -7
  147. package/dist/judge/matchsEnd.d.ts +6 -6
  148. package/dist/judge/matchsStart.d.ts +6 -6
  149. package/dist/judge/matchsWhole.d.ts +6 -6
  150. package/dist/load/getSynch.d.ts +5 -5
  151. package/dist/log/styleLog.d.ts +65 -65
  152. package/dist/name/getComponentNames.cjs +1 -1
  153. package/dist/name/getComponentNames.d.ts +5 -5
  154. package/dist/name/getComponentNames.js +1 -1
  155. package/dist/name/getNames.cjs +1 -1
  156. package/dist/name/getNames.d.ts +5 -5
  157. package/dist/name/getNames.js +1 -1
  158. package/dist/name/humpToLine.d.ts +5 -5
  159. package/dist/name/index.cjs +2 -2
  160. package/dist/name/index.d.ts +1 -1
  161. package/dist/name/index.js +2 -2
  162. package/dist/name/lineToLargeHump.d.ts +5 -5
  163. package/dist/name/lineToSmallHump.d.ts +5 -5
  164. package/dist/node/getPort.cjs +7 -0
  165. package/dist/node/getPort.d.ts +13 -0
  166. package/dist/node/getPort.js +7 -0
  167. package/dist/node/index.cjs +8 -0
  168. package/dist/node/index.d.ts +1 -0
  169. package/dist/node/index.js +8 -0
  170. package/dist/tree/getTreeObj.cjs +11 -0
  171. package/dist/tree/getTreeObj.d.ts +26 -0
  172. package/dist/tree/getTreeObj.js +11 -0
  173. package/dist/tree/index.cjs +12 -0
  174. package/dist/tree/index.d.ts +1 -0
  175. package/dist/tree/index.js +12 -0
  176. package/dist/urls/getImportUrl.d.ts +6 -6
  177. package/dist/urls/getImportUrlSuffix.d.ts +6 -6
  178. package/dist/urls/getNewFileName.d.ts +5 -5
  179. package/dist/urls/getReplaceImportUrl.d.ts +6 -6
  180. package/dist/urls/getReplaceUrl.d.ts +6 -6
  181. package/dist/urls/getSuffix.d.ts +5 -5
  182. package/dist/urls/getUrlCatalogue.d.ts +5 -5
  183. package/dist/urls/getUrlCatalogueLast.d.ts +5 -5
  184. package/dist/urls/getUrlCatalogueObj.d.ts +14 -14
  185. package/dist/urls/index.cjs +7 -7
  186. package/dist/urls/index.js +7 -7
  187. package/package.json +170 -76
  188. package/dist/chunk-36NQW7GX.cjs +0 -24
  189. package/dist/chunk-6WSP6FLZ.cjs +0 -8
  190. package/dist/chunk-7IXRH3MU.js +0 -8
  191. package/dist/chunk-XQB2HUHZ.js +0 -23
  192. package/dist/index-fab49d44.d.ts +0 -19
  193. package/dist/{chunk-Y6WJLQX4.js → chunk-3FHREK6X.js} +6 -6
  194. package/dist/{chunk-RAPGCAN7.cjs → chunk-EDTINHGX.cjs} +6 -6
  195. package/dist/{index-110fd300.d.ts → index-445fe401.d.ts} +1 -1
  196. package/dist/{index-f9cc2ca2.d.ts → index-a65f6120.d.ts} +1 -1
  197. package/dist/{index-1d6e286f.d.ts → index-eef2a16c.d.ts} +1 -1
@@ -1,8 +1,8 @@
1
- /**
2
- * 首字母小写
3
- * @param {string} str 处理字符串
4
- * @returns {string}
5
- */
1
+ /**
2
+ * 首字母小写
3
+ * @param {string} str 处理字符串
4
+ * @returns {string}
5
+ */
6
6
  declare function firstLower(str: string): string;
7
7
 
8
8
  export { firstLower };
@@ -1,8 +1,8 @@
1
- /**
2
- * 首字母大写
3
- * @param {string} str 处理字符串
4
- * @returns {string}
5
- */
1
+ /**
2
+ * 首字母大写
3
+ * @param {string} str 处理字符串
4
+ * @returns {string}
5
+ */
6
6
  declare function firstUpper(str: string): string;
7
7
 
8
8
  export { firstUpper };
@@ -1,9 +1,9 @@
1
- /**
2
- * 比较两个字符串,获取前面一样的值
3
- * @param {string} str 比较字符串1
4
- * @param {string} val 比较字符串2
5
- * @returns {string} 前面一样的值
6
- */
1
+ /**
2
+ * 比较两个字符串,获取前面一样的值
3
+ * @param {string} str 比较字符串1
4
+ * @param {string} val 比较字符串2
5
+ * @returns {string} 前面一样的值
6
+ */
7
7
  declare function getStartSame(str: string, val: string): string;
8
8
 
9
9
  export { getStartSame };
@@ -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,6 +1,6 @@
1
1
  export { appearNum } from './appearNum.js';
2
- export { firstLower } from './firstLower.js';
3
2
  export { appearNumSeat } from './appearNumSeat.js';
3
+ export { firstLower } from './firstLower.js';
4
4
  export { firstUpper } from './firstUpper.js';
5
5
  export { getStartSame } from './getStartSame.js';
6
6
  export { getStartSames } from './getStartSames.js';
@@ -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 };
@@ -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,20 @@
1
+ import {
2
+ arrayToTree,
3
+ getTreeObj,
4
+ treeToArray
5
+ } from "./chunk-3CNQO7VA.js";
6
+ import {
7
+ __export
8
+ } from "./chunk-UICA3PK6.js";
9
+
10
+ // packages/tree/index.ts
11
+ var tree_exports = {};
12
+ __export(tree_exports, {
13
+ arrayToTree: () => arrayToTree,
14
+ getTreeObj: () => getTreeObj,
15
+ treeToArray: () => treeToArray
16
+ });
17
+
18
+ export {
19
+ tree_exports
20
+ };
@@ -0,0 +1,73 @@
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
+ objs[fid] = objs[fid] || {};
52
+ objs[fid][param.children] = objs[fid][param.children] || [];
53
+ objs[fid][param.children].push(obj);
54
+ } else {
55
+ djs.push(obj);
56
+ }
57
+ if (objs[id]) {
58
+ obj[param.children] = objs[id][param.children];
59
+ }
60
+ objs[id] = obj;
61
+ });
62
+ return {
63
+ tree: djs,
64
+ array: arr,
65
+ obj: objs
66
+ };
67
+ }
68
+
69
+ export {
70
+ getTreeObj,
71
+ treeToArray,
72
+ arrayToTree
73
+ };
@@ -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
+ };
@@ -0,0 +1,60 @@
1
+ // packages/basic/object/setSort.ts
2
+ function sortAttr(obj, sort, key) {
3
+ const vexports = obj[key] || {};
4
+ const ks = Object.keys(vexports).sort(sort);
5
+ const exports = {};
6
+ ks.forEach((k) => {
7
+ exports[k] = vexports[k];
8
+ });
9
+ obj[key] = exports;
10
+ }
11
+ function sortAttrs(obj, sort, key) {
12
+ if (key instanceof Array) {
13
+ key.forEach((k) => {
14
+ sortAttr(obj, sort, k);
15
+ });
16
+ } else {
17
+ sortAttr(obj, sort, key);
18
+ }
19
+ }
20
+ function getSubAttrs(arr, key) {
21
+ const objarr = [];
22
+ arr.forEach((obj) => {
23
+ Object.keys(obj).forEach((v) => {
24
+ const z = obj[v];
25
+ if (key) {
26
+ if (key instanceof Array && key.includes(v)) {
27
+ objarr.push(z);
28
+ } else if (key === v) {
29
+ objarr.push(z);
30
+ }
31
+ } else {
32
+ objarr.push(z);
33
+ }
34
+ });
35
+ });
36
+ return objarr;
37
+ }
38
+ function sortSubAttr(arr, sort, key) {
39
+ arr.forEach((v) => {
40
+ sortAttrs(v, sort, key);
41
+ });
42
+ }
43
+ function setSort(obj, sort, ...arr) {
44
+ let objarr = [obj];
45
+ const leg = arr.length;
46
+ for (let index = 0; index < leg; index++) {
47
+ const element = arr[index];
48
+ if (index == leg - 1) {
49
+ if (element) {
50
+ sortSubAttr(objarr, sort, element);
51
+ }
52
+ } else {
53
+ objarr = getSubAttrs(objarr, element);
54
+ }
55
+ }
56
+ }
57
+
58
+ export {
59
+ setSort
60
+ };
@@ -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;
@@ -0,0 +1,20 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+ var _chunkBPJMBYDXcjs = require('./chunk-BPJMBYDX.cjs');
6
+
7
+
8
+ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
9
+
10
+ // packages/tree/index.ts
11
+ var tree_exports = {};
12
+ _chunk5AZGAKWRcjs.__export.call(void 0, tree_exports, {
13
+ arrayToTree: () => _chunkBPJMBYDXcjs.arrayToTree,
14
+ getTreeObj: () => _chunkBPJMBYDXcjs.getTreeObj,
15
+ treeToArray: () => _chunkBPJMBYDXcjs.treeToArray
16
+ });
17
+
18
+
19
+
20
+ exports.tree_exports = tree_exports;
@@ -0,0 +1,13 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/object/getSort.ts
2
+ function getSort(obj, sort) {
3
+ const robj = {};
4
+ const ks = Object.keys(obj).sort(sort);
5
+ ks.forEach((k) => {
6
+ robj[k] = obj[k];
7
+ });
8
+ return robj;
9
+ }
10
+
11
+
12
+
13
+ exports.getSort = getSort;
@@ -0,0 +1,36 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunk4X7AFGTVcjs = require('./chunk-4X7AFGTV.cjs');
4
+
5
+
6
+ var _chunkUGFSIZ5Pcjs = require('./chunk-UGFSIZ5P.cjs');
7
+
8
+
9
+ var _chunkVY5VQ7WEcjs = require('./chunk-VY5VQ7WE.cjs');
10
+
11
+
12
+ var _chunkUGS2F6DKcjs = require('./chunk-UGS2F6DK.cjs');
13
+
14
+
15
+ var _chunkGFAUQTB2cjs = require('./chunk-GFAUQTB2.cjs');
16
+
17
+
18
+ var _chunkTE3XNGF4cjs = require('./chunk-TE3XNGF4.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: () => _chunkTE3XNGF4cjs.getAttrObj,
28
+ getCss: () => _chunkUGS2F6DKcjs.getCss,
29
+ getPositionRelative: () => _chunkVY5VQ7WEcjs.getPositionRelative,
30
+ getSVG: () => _chunkGFAUQTB2cjs.getSVG,
31
+ setCss: () => _chunk4X7AFGTVcjs.setCss
32
+ });
33
+
34
+
35
+
36
+ exports.css_exports = css_exports;
@@ -1,12 +1,21 @@
1
+ import {
2
+ setCss
3
+ } from "./chunk-XUL6LPTN.js";
1
4
  import {
2
5
  fetchUnitValue
3
- } from "./chunk-QKLVFB74.js";
6
+ } from "./chunk-WX3JYE47.js";
7
+ import {
8
+ getPositionRelative
9
+ } from "./chunk-MQHLAQQA.js";
4
10
  import {
5
11
  getCss
6
12
  } from "./chunk-5RZYHE3X.js";
7
13
  import {
8
- setCss
9
- } from "./chunk-7IXRH3MU.js";
14
+ getSVG
15
+ } from "./chunk-WIYZQNGO.js";
16
+ import {
17
+ getAttrObj
18
+ } from "./chunk-N3FZ4WUI.js";
10
19
  import {
11
20
  __export
12
21
  } from "./chunk-UICA3PK6.js";
@@ -15,7 +24,10 @@ import {
15
24
  var css_exports = {};
16
25
  __export(css_exports, {
17
26
  fetchUnitValue: () => fetchUnitValue,
27
+ getAttrObj: () => getAttrObj,
18
28
  getCss: () => getCss,
29
+ getPositionRelative: () => getPositionRelative,
30
+ getSVG: () => getSVG,
19
31
  setCss: () => setCss
20
32
  });
21
33
 
@@ -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,73 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// 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
+ objs[fid] = objs[fid] || {};
52
+ objs[fid][param.children] = objs[fid][param.children] || [];
53
+ objs[fid][param.children].push(obj);
54
+ } else {
55
+ djs.push(obj);
56
+ }
57
+ if (objs[id]) {
58
+ obj[param.children] = objs[id][param.children];
59
+ }
60
+ objs[id] = obj;
61
+ });
62
+ return {
63
+ tree: djs,
64
+ array: arr,
65
+ obj: objs
66
+ };
67
+ }
68
+
69
+
70
+
71
+
72
+
73
+ exports.getTreeObj = getTreeObj; exports.treeToArray = treeToArray; exports.arrayToTree = arrayToTree;
@@ -1,11 +1,29 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
+ var _chunkGOUC2DFAcjs = require('./chunk-GOUC2DFA.cjs');
4
+
5
+
3
6
  var _chunkNRJPCN4Jcjs = require('./chunk-NRJPCN4J.cjs');
4
7
 
5
8
 
9
+ var _chunkIIKQHLKTcjs = require('./chunk-IIKQHLKT.cjs');
10
+
11
+
6
12
  var _chunk3VYRYSWKcjs = require('./chunk-3VYRYSWK.cjs');
7
13
 
8
14
 
15
+ var _chunkUFYLVZNUcjs = require('./chunk-UFYLVZNU.cjs');
16
+
17
+
18
+ var _chunkJ2GSJKCYcjs = require('./chunk-J2GSJKCY.cjs');
19
+
20
+
21
+ var _chunkD3SX7OUVcjs = require('./chunk-D3SX7OUV.cjs');
22
+
23
+
24
+ var _chunk7AIT4XSDcjs = require('./chunk-7AIT4XSD.cjs');
25
+
26
+
9
27
  var _chunkA5LHXE5Xcjs = require('./chunk-A5LHXE5X.cjs');
10
28
 
11
29
 
@@ -17,9 +35,15 @@ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
17
35
  // packages/basic/object/index.ts
18
36
  var object_exports = {};
19
37
  _chunk5AZGAKWRcjs.__export.call(void 0, object_exports, {
38
+ attrValueSort: () => _chunkUFYLVZNUcjs.attrValueSort,
39
+ deepCopy: () => _chunkJ2GSJKCYcjs.deepCopy,
40
+ filterObject: () => _chunkD3SX7OUVcjs.filterObject,
41
+ getSort: () => _chunk7AIT4XSDcjs.getSort,
42
+ hasOwn: () => _chunkGOUC2DFAcjs.hasOwn,
20
43
  isObject: () => _chunkMIC3W2VYcjs.isObject,
21
44
  isObjectArray: () => _chunkA5LHXE5Xcjs.isObjectArray,
22
45
  mergeObject: () => _chunkNRJPCN4Jcjs.mergeObject,
46
+ setSort: () => _chunkIIKQHLKTcjs.setSort,
23
47
  unmergeObject: () => _chunk3VYRYSWKcjs.unmergeObject
24
48
  });
25
49
 
@@ -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;