@fangzhongya/utils 0.0.8-42 → 0.0.8-44

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 (102) hide show
  1. package/dist/basic/array/asyncMergeArray.d.ts +9 -0
  2. package/dist/basic/array/duplicateRemoval.d.ts +9 -0
  3. package/dist/basic/array/index.d.ts +5 -0
  4. package/dist/basic/array/isArray.d.ts +8 -0
  5. package/dist/basic/array/replaceAfter.d.ts +10 -0
  6. package/dist/basic/array/toggleArray.d.ts +10 -0
  7. package/dist/basic/index.cjs +4 -4
  8. package/dist/basic/index.d.ts +24 -0
  9. package/dist/basic/index.js +3 -3
  10. package/dist/basic/object/attrValueSort.d.ts +12 -0
  11. package/dist/basic/object/filterObject.d.ts +14 -0
  12. package/dist/basic/object/getSort.cjs +7 -1
  13. package/dist/basic/object/getSort.d.ts +10 -0
  14. package/dist/basic/object/getSort.js +7 -1
  15. package/dist/basic/object/hasOwn.d.ts +9 -0
  16. package/dist/basic/object/index.cjs +6 -3
  17. package/dist/basic/object/index.d.ts +9 -0
  18. package/dist/basic/object/index.js +5 -2
  19. package/dist/basic/object/isObject.d.ts +8 -0
  20. package/dist/basic/object/isObjectArray.d.ts +8 -0
  21. package/dist/basic/object/mergeObject.d.ts +11 -0
  22. package/dist/basic/object/setSort.d.ts +7 -0
  23. package/dist/basic/object/unmergeObject.d.ts +11 -0
  24. package/dist/basic/string/appearNum.d.ts +9 -0
  25. package/dist/basic/string/appearNumSeat.d.ts +10 -0
  26. package/dist/basic/string/firstLower.d.ts +8 -0
  27. package/dist/basic/string/firstUpper.d.ts +8 -0
  28. package/dist/basic/string/getStartSame.d.ts +9 -0
  29. package/dist/basic/string/getStartSames.d.ts +9 -0
  30. package/dist/basic/string/index.d.ts +7 -0
  31. package/dist/basic/string/splitUpper.d.ts +8 -0
  32. package/dist/{chunk-XAFUCA6P.js → chunk-2FN3EJW2.js} +4 -0
  33. package/dist/chunk-7AIT4XSD.cjs +13 -0
  34. package/dist/{chunk-52BMK4JD.cjs → chunk-E5U7NDJF.cjs} +4 -0
  35. package/dist/{chunk-6Q44LIV2.cjs → chunk-GB3PNLS6.cjs} +2 -2
  36. package/dist/{chunk-SO4HSZFH.js → chunk-JZ52UPZP.js} +1 -1
  37. package/dist/chunk-ZEAT23CI.js +13 -0
  38. package/dist/css/fetchUnitValue.d.ts +10 -0
  39. package/dist/css/getAttrObj.d.ts +11 -0
  40. package/dist/css/getCss.d.ts +9 -0
  41. package/dist/css/getPositionRelative.d.ts +7 -0
  42. package/dist/css/getSVG.d.ts +14 -0
  43. package/dist/css/index.d.ts +6 -0
  44. package/dist/css/setCss.d.ts +11 -0
  45. package/dist/dom/getLocus.d.ts +14 -0
  46. package/dist/dom/getShiftEvent.d.ts +25 -0
  47. package/dist/dom/index.d.ts +2 -0
  48. package/dist/html/analysisHtml.d.ts +13 -0
  49. package/dist/html/htmlEscape.d.ts +8 -0
  50. package/dist/html/index.d.ts +2 -0
  51. package/dist/index-09cd203a.d.ts +16 -0
  52. package/dist/index-130ae781.d.ts +10 -0
  53. package/dist/index-42672b09.d.ts +36 -0
  54. package/dist/index-445fe401.d.ts +19 -0
  55. package/dist/index-52c0879d.d.ts +13 -0
  56. package/dist/index-5aea66bb.d.ts +21 -0
  57. package/dist/index-7b53d3ec.d.ts +34 -0
  58. package/dist/index-84b0c6c3.d.ts +13 -0
  59. package/dist/index-a65f6120.d.ts +22 -0
  60. package/dist/index-ae0241ec.d.ts +13 -0
  61. package/dist/index-b16b81dc.d.ts +22 -0
  62. package/dist/index-b5d07d0c.d.ts +25 -0
  63. package/dist/index-bc08cd32.d.ts +14 -0
  64. package/dist/index-eef2a16c.d.ts +28 -0
  65. package/dist/index-ef15848a.d.ts +10 -0
  66. package/dist/index.cjs +4 -4
  67. package/dist/index.d.ts +69 -0
  68. package/dist/index.js +3 -3
  69. package/dist/iss/index.d.ts +3 -0
  70. package/dist/judge/index.d.ts +4 -0
  71. package/dist/judge/matchs.d.ts +10 -0
  72. package/dist/judge/matchsEnd.d.ts +9 -0
  73. package/dist/judge/matchsStart.d.ts +9 -0
  74. package/dist/judge/matchsWhole.d.ts +9 -0
  75. package/dist/load/getSynch.d.ts +8 -0
  76. package/dist/load/index.d.ts +2 -0
  77. package/dist/load/loadScript.d.ts +3 -0
  78. package/dist/log/index.d.ts +1 -0
  79. package/dist/log/styleLog.d.ts +68 -0
  80. package/dist/name/getComponentNames.d.ts +8 -0
  81. package/dist/name/getNames.d.ts +8 -0
  82. package/dist/name/humpToLine.d.ts +8 -0
  83. package/dist/name/index.d.ts +5 -0
  84. package/dist/name/lineToLargeHump.d.ts +8 -0
  85. package/dist/name/lineToSmallHump.d.ts +8 -0
  86. package/dist/node/getPort.d.ts +13 -0
  87. package/dist/node/index.d.ts +1 -0
  88. package/dist/tree/getTreeObj.d.ts +26 -0
  89. package/dist/tree/index.d.ts +1 -0
  90. package/dist/urls/getImportUrl.d.ts +9 -0
  91. package/dist/urls/getImportUrlSuffix.d.ts +9 -0
  92. package/dist/urls/getNewFileName.d.ts +8 -0
  93. package/dist/urls/getReplaceImportUrl.d.ts +9 -0
  94. package/dist/urls/getReplaceUrl.d.ts +9 -0
  95. package/dist/urls/getSuffix.d.ts +8 -0
  96. package/dist/urls/getUrlCatalogue.d.ts +8 -0
  97. package/dist/urls/getUrlCatalogueLast.d.ts +8 -0
  98. package/dist/urls/getUrlCatalogueObj.d.ts +17 -0
  99. package/dist/urls/index.d.ts +9 -0
  100. package/package.json +2 -1
  101. package/dist/chunk-DVOI46TA.cjs +0 -1
  102. package/dist/chunk-FUI4W2Y5.js +0 -0
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 处理数组遍历问题
3
+ * @param <Array> arr 遍历数组
4
+ * @param callback 处理方法
5
+ * @returns
6
+ */
7
+ declare function asyncMergeArray<T>(arr: Array<T>, callback: (resolve: () => void, reject: (reason?: any) => void, value: T, index: number, array: T[]) => void): Promise<unknown>;
8
+
9
+ export { asyncMergeArray };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 数组对象去重
3
+ * @param {Array} arr 要去重数组
4
+ * @param {string} key 对象中的唯一key
5
+ * @returns {Array }
6
+ */
7
+ declare function duplicateRemoval<T>(arr: Array<T>, key: string): Array<T>;
8
+
9
+ export { duplicateRemoval };
@@ -0,0 +1,5 @@
1
+ export { asyncMergeArray } from './asyncMergeArray.js';
2
+ export { duplicateRemoval } from './duplicateRemoval.js';
3
+ export { isArray } from './isArray.js';
4
+ export { replaceAfter } from './replaceAfter.js';
5
+ export { toggleArray } from './toggleArray.js';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 是否是数组
3
+ * @param {any} obj 判断值
4
+ * @returns {boolean}
5
+ */
6
+ declare function isArray(obj: any): boolean;
7
+
8
+ export { isArray };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 删除已经存在数组值,把新值添加最后
3
+ * @param {Array<T>} arr 当前数组
4
+ * @param {Object} obj 要处理的对象
5
+ * @param {string} id 比对的对应属性名称
6
+ * @returns {Array<T>} 判断后的数组值
7
+ */
8
+ declare function replaceAfter<T>(arr: Array<T>, obj: T, id: string): Array<T>;
9
+
10
+ export { replaceAfter };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 判断数组值,如果存在就删除,如果没有就添加
3
+ * @param {Array<T>} arr 当前数组
4
+ * @param {Object} obj 要处理的对象
5
+ * @param {string} id 比对的对应属性名称
6
+ * @returns {Array<T>} 判断后的数组值
7
+ */
8
+ declare function toggleArray<T>(arr: Array<T>, obj: T, id: string): Array<T>;
9
+
10
+ export { toggleArray };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-6Q44LIV2.cjs');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-GB3PNLS6.cjs');
2
2
 
3
3
 
4
4
  var _chunkV3FWFWP2cjs = require('../chunk-V3FWFWP2.cjs');
@@ -6,7 +6,7 @@ require('../chunk-J7S3KBHL.cjs');
6
6
  require('../chunk-L7FSHU27.cjs');
7
7
 
8
8
 
9
- var _chunk52BMK4JDcjs = require('../chunk-52BMK4JD.cjs');
9
+ var _chunkE5U7NDJFcjs = require('../chunk-E5U7NDJF.cjs');
10
10
  require('../chunk-NRJPCN4J.cjs');
11
11
  require('../chunk-IIKQHLKT.cjs');
12
12
  require('../chunk-3VYRYSWK.cjs');
@@ -17,7 +17,7 @@ require('../chunk-LG7MY5KL.cjs');
17
17
  require('../chunk-AXMOZZCM.cjs');
18
18
  require('../chunk-UFYLVZNU.cjs');
19
19
  require('../chunk-D3SX7OUV.cjs');
20
- require('../chunk-DVOI46TA.cjs');
20
+ require('../chunk-7AIT4XSD.cjs');
21
21
  require('../chunk-GOUC2DFA.cjs');
22
22
  require('../chunk-3HXQ7TGV.cjs');
23
23
  require('../chunk-JR6ZN6QD.cjs');
@@ -34,4 +34,4 @@ require('../chunk-5AZGAKWR.cjs');
34
34
 
35
35
 
36
36
 
37
- exports.array = _chunk4O7YOSS7cjs.array_exports; exports.object = _chunk52BMK4JDcjs.object_exports; exports.string = _chunkV3FWFWP2cjs.string_exports;
37
+ exports.array = _chunk4O7YOSS7cjs.array_exports; exports.object = _chunkE5U7NDJFcjs.object_exports; exports.string = _chunkV3FWFWP2cjs.string_exports;
@@ -0,0 +1,24 @@
1
+ export { i as array } from '../index-b16b81dc.js';
2
+ export { i as object } from '../index-7b53d3ec.js';
3
+ export { i as string } from '../index-eef2a16c.js';
4
+ import './array/asyncMergeArray.js';
5
+ import './array/duplicateRemoval.js';
6
+ import './array/isArray.js';
7
+ import './array/replaceAfter.js';
8
+ import './array/toggleArray.js';
9
+ import './object/attrValueSort.js';
10
+ import './object/filterObject.js';
11
+ import './object/getSort.js';
12
+ import './object/hasOwn.js';
13
+ import './object/isObject.js';
14
+ import './object/isObjectArray.js';
15
+ import './object/mergeObject.js';
16
+ import './object/setSort.js';
17
+ import './object/unmergeObject.js';
18
+ import './string/appearNum.js';
19
+ import './string/appearNumSeat.js';
20
+ import './string/firstLower.js';
21
+ import './string/firstUpper.js';
22
+ import './string/getStartSame.js';
23
+ import './string/getStartSames.js';
24
+ import './string/splitUpper.js';
@@ -1,4 +1,4 @@
1
- import "../chunk-SO4HSZFH.js";
1
+ import "../chunk-JZ52UPZP.js";
2
2
  import {
3
3
  string_exports
4
4
  } from "../chunk-P2CYIUCC.js";
@@ -6,7 +6,7 @@ import "../chunk-7DTHADVK.js";
6
6
  import "../chunk-VKE5JARB.js";
7
7
  import {
8
8
  object_exports
9
- } from "../chunk-XAFUCA6P.js";
9
+ } from "../chunk-2FN3EJW2.js";
10
10
  import "../chunk-RD4EP3M5.js";
11
11
  import "../chunk-3LWFUVER.js";
12
12
  import "../chunk-A6J46LQK.js";
@@ -17,7 +17,7 @@ import "../chunk-GOH6G74S.js";
17
17
  import "../chunk-GOJN3OQ4.js";
18
18
  import "../chunk-T4BAVDTH.js";
19
19
  import "../chunk-S42NGJ5W.js";
20
- import "../chunk-FUI4W2Y5.js";
20
+ import "../chunk-ZEAT23CI.js";
21
21
  import "../chunk-3IR2ABRO.js";
22
22
  import "../chunk-SNABGVNO.js";
23
23
  import "../chunk-DMZP4RPN.js";
@@ -0,0 +1,12 @@
1
+ /**
2
+ * 按照属性值排序
3
+ * @param obj 排序对象
4
+ * @param arr 要排序的属性
5
+ * @param sort 排序方法
6
+ * @returns
7
+ */
8
+ declare function attrValueSort(obj: {
9
+ [key: string]: any;
10
+ }, arr?: string[], sort?: Function): string[];
11
+
12
+ export { attrValueSort };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * 去掉不要的属性
3
+ * @param obj
4
+ * @param arr
5
+ */
6
+ declare function filterObject(obj: {
7
+ [key: string | number | symbol]: any;
8
+ }, arr: Array<string | number | symbol>): {
9
+ [key: string]: any;
10
+ [key: number]: any;
11
+ [key: symbol]: any;
12
+ };
13
+
14
+ export { filterObject };
@@ -1 +1,7 @@
1
- "use strict";require('../../chunk-DVOI46TA.cjs');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunk7AIT4XSDcjs = require('../../chunk-7AIT4XSD.cjs');
4
+ require('../../chunk-5AZGAKWR.cjs');
5
+
6
+
7
+ exports.getSort = _chunk7AIT4XSDcjs.getSort;
@@ -0,0 +1,10 @@
1
+ type ObjUnkn = {
2
+ [key: string]: unknown;
3
+ };
4
+ type SortFun = <T>(a: T, b: T) => number;
5
+ /**
6
+ * 对对象数据进行排序
7
+ */
8
+ declare function getSort(obj: ObjUnkn, sort?: SortFun): ObjUnkn;
9
+
10
+ export { getSort };
@@ -1 +1,7 @@
1
- import "../../chunk-FUI4W2Y5.js";
1
+ import {
2
+ getSort
3
+ } from "../../chunk-ZEAT23CI.js";
4
+ import "../../chunk-UICA3PK6.js";
5
+ export {
6
+ getSort
7
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 检查对象的属性是否存在
3
+ * @param obj
4
+ * @param propName
5
+ * @returns
6
+ */
7
+ declare function hasOwn(obj: object, propName: string | number | symbol): boolean;
8
+
9
+ export { hasOwn };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-52BMK4JD.cjs');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-E5U7NDJF.cjs');
2
2
 
3
3
 
4
4
  var _chunkNRJPCN4Jcjs = require('../../chunk-NRJPCN4J.cjs');
@@ -14,7 +14,9 @@ var _chunkUFYLVZNUcjs = require('../../chunk-UFYLVZNU.cjs');
14
14
 
15
15
 
16
16
  var _chunkD3SX7OUVcjs = require('../../chunk-D3SX7OUV.cjs');
17
- require('../../chunk-DVOI46TA.cjs');
17
+
18
+
19
+ var _chunk7AIT4XSDcjs = require('../../chunk-7AIT4XSD.cjs');
18
20
 
19
21
 
20
22
  var _chunkGOUC2DFAcjs = require('../../chunk-GOUC2DFA.cjs');
@@ -35,4 +37,5 @@ require('../../chunk-5AZGAKWR.cjs');
35
37
 
36
38
 
37
39
 
38
- exports.attrValueSort = _chunkUFYLVZNUcjs.attrValueSort; exports.filterObject = _chunkD3SX7OUVcjs.filterObject; exports.hasOwn = _chunkGOUC2DFAcjs.hasOwn; exports.isObject = _chunkMIC3W2VYcjs.isObject; exports.isObjectArray = _chunkA5LHXE5Xcjs.isObjectArray; exports.mergeObject = _chunkNRJPCN4Jcjs.mergeObject; exports.setSort = _chunkIIKQHLKTcjs.setSort; exports.unmergeObject = _chunk3VYRYSWKcjs.unmergeObject;
40
+
41
+ exports.attrValueSort = _chunkUFYLVZNUcjs.attrValueSort; exports.filterObject = _chunkD3SX7OUVcjs.filterObject; exports.getSort = _chunk7AIT4XSDcjs.getSort; exports.hasOwn = _chunkGOUC2DFAcjs.hasOwn; exports.isObject = _chunkMIC3W2VYcjs.isObject; exports.isObjectArray = _chunkA5LHXE5Xcjs.isObjectArray; exports.mergeObject = _chunkNRJPCN4Jcjs.mergeObject; exports.setSort = _chunkIIKQHLKTcjs.setSort; exports.unmergeObject = _chunk3VYRYSWKcjs.unmergeObject;
@@ -0,0 +1,9 @@
1
+ export { attrValueSort } from './attrValueSort.js';
2
+ export { filterObject } from './filterObject.js';
3
+ export { getSort } from './getSort.js';
4
+ export { hasOwn } from './hasOwn.js';
5
+ export { isObject } from './isObject.js';
6
+ export { isObjectArray } from './isObjectArray.js';
7
+ export { mergeObject } from './mergeObject.js';
8
+ export { setSort } from './setSort.js';
9
+ export { unmergeObject } from './unmergeObject.js';
@@ -1,4 +1,4 @@
1
- import "../../chunk-XAFUCA6P.js";
1
+ import "../../chunk-2FN3EJW2.js";
2
2
  import {
3
3
  mergeObject
4
4
  } from "../../chunk-RD4EP3M5.js";
@@ -14,7 +14,9 @@ import {
14
14
  import {
15
15
  filterObject
16
16
  } from "../../chunk-S42NGJ5W.js";
17
- import "../../chunk-FUI4W2Y5.js";
17
+ import {
18
+ getSort
19
+ } from "../../chunk-ZEAT23CI.js";
18
20
  import {
19
21
  hasOwn
20
22
  } from "../../chunk-3IR2ABRO.js";
@@ -29,6 +31,7 @@ import "../../chunk-UICA3PK6.js";
29
31
  export {
30
32
  attrValueSort,
31
33
  filterObject,
34
+ getSort,
32
35
  hasOwn,
33
36
  isObject,
34
37
  isObjectArray,
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 是否是对象
3
+ * @param {any} obj 判断值
4
+ * @returns {boolean}
5
+ */
6
+ declare function isObject(obj: any): boolean;
7
+
8
+ export { isObject };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 是否 是对象并且不是数组
3
+ * @param {any} obj 判断值
4
+ * @returns {boolean}
5
+ */
6
+ declare function isObjectArray(obj: any): boolean;
7
+
8
+ export { isObjectArray };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 合并两个对象的值
3
+ * @param {T} a 合并到的对象
4
+ * @param {T} b 合并对象
5
+ * @param {number} j 合并级别
6
+ * @param {boolean} i 是否合并数组
7
+ * @returns {T} 合并的对象
8
+ */
9
+ declare function mergeObject<T>(a: T, b: T, j?: number, i?: boolean): T;
10
+
11
+ export { mergeObject };
@@ -0,0 +1,7 @@
1
+ type ObjUnkn = {
2
+ [key: string]: unknown;
3
+ };
4
+ type SortFun = <T>(a: T, b: T) => number;
5
+ declare function setSort(obj: ObjUnkn, sort: SortFun | undefined, ...arr: Array<undefined | string | string[]>): void;
6
+
7
+ export { setSort };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 合并两个对象不改原对象的值
3
+ * @param {T} a 合并对象
4
+ * @param {T} b 合并对象
5
+ * @param {number} j 合并级别
6
+ * @param {boolean} i 是否合并数组
7
+ * @returns {T} 合并的对象
8
+ */
9
+ declare function unmergeObject<T>(a: T, b: T, j?: number, i?: boolean): T;
10
+
11
+ export { unmergeObject };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 查询字符串出现次数
3
+ * @param {string} str 被查询的字符串
4
+ * @param {string | RegExp} t 查询的字符串 或者 正则表达式
5
+ * @returns {number} 出现的次数
6
+ */
7
+ declare function appearNum(str: string, t: string | RegExp): number;
8
+
9
+ export { appearNum };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 查询字符串出现第n次数的位置
3
+ * @param {string} str 被查询的字符串
4
+ * @param {string | RegExp} t 查询的字符串 或者 正则表达式
5
+ * @param {number} n 第几次出现
6
+ * @returns {number} 第n次出现时在字符串的位置 -1 表示没有查询到
7
+ */
8
+ declare function appearNumSeat(str: string, t: string | RegExp, n: number): number;
9
+
10
+ export { appearNumSeat };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 首字母小写
3
+ * @param {string} str 处理字符串
4
+ * @returns {string}
5
+ */
6
+ declare function firstLower(str: string): string;
7
+
8
+ export { firstLower };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 首字母大写
3
+ * @param {string} str 处理字符串
4
+ * @returns {string}
5
+ */
6
+ declare function firstUpper(str: string): string;
7
+
8
+ export { firstUpper };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 比较两个字符串,获取前面一样的值
3
+ * @param {string} str 比较字符串1
4
+ * @param {string} val 比较字符串2
5
+ * @returns {string} 前面一样的值
6
+ */
7
+ declare function getStartSame(str: string, val: string): string;
8
+
9
+ export { getStartSame };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 比较两个字符串,获取前面一样的值
3
+ * @param {string} str 比较字符串1
4
+ * @param {string} val 比较字符串2
5
+ * @returns {Array<string>} [前面一样的值, 字符串1不一样的值, 字符串2不一样的值]
6
+ */
7
+ declare function getStartSames(str: string, val: string): Array<string>;
8
+
9
+ export { getStartSames };
@@ -0,0 +1,7 @@
1
+ export { appearNum } from './appearNum.js';
2
+ export { appearNumSeat } from './appearNumSeat.js';
3
+ export { firstLower } from './firstLower.js';
4
+ export { firstUpper } from './firstUpper.js';
5
+ export { getStartSame } from './getStartSame.js';
6
+ export { getStartSames } from './getStartSames.js';
7
+ export { splitUpper } from './splitUpper.js';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 按照大写字母分割
3
+ * @param {string} name
4
+ * @returns { Array }
5
+ */
6
+ declare function splitUpper(name: string): string[];
7
+
8
+ export { splitUpper };
@@ -13,6 +13,9 @@ import {
13
13
  import {
14
14
  filterObject
15
15
  } from "./chunk-S42NGJ5W.js";
16
+ import {
17
+ getSort
18
+ } from "./chunk-ZEAT23CI.js";
16
19
  import {
17
20
  hasOwn
18
21
  } from "./chunk-3IR2ABRO.js";
@@ -31,6 +34,7 @@ var object_exports = {};
31
34
  __export(object_exports, {
32
35
  attrValueSort: () => attrValueSort,
33
36
  filterObject: () => filterObject,
37
+ getSort: () => getSort,
34
38
  hasOwn: () => hasOwn,
35
39
  isObject: () => isObject,
36
40
  isObjectArray: () => isObjectArray,
@@ -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;
@@ -15,6 +15,9 @@ var _chunkUFYLVZNUcjs = require('./chunk-UFYLVZNU.cjs');
15
15
  var _chunkD3SX7OUVcjs = require('./chunk-D3SX7OUV.cjs');
16
16
 
17
17
 
18
+ var _chunk7AIT4XSDcjs = require('./chunk-7AIT4XSD.cjs');
19
+
20
+
18
21
  var _chunkGOUC2DFAcjs = require('./chunk-GOUC2DFA.cjs');
19
22
 
20
23
 
@@ -31,6 +34,7 @@ var object_exports = {};
31
34
  _chunk5AZGAKWRcjs.__export.call(void 0, object_exports, {
32
35
  attrValueSort: () => _chunkUFYLVZNUcjs.attrValueSort,
33
36
  filterObject: () => _chunkD3SX7OUVcjs.filterObject,
37
+ getSort: () => _chunk7AIT4XSDcjs.getSort,
34
38
  hasOwn: () => _chunkGOUC2DFAcjs.hasOwn,
35
39
  isObject: () => _chunkMIC3W2VYcjs.isObject,
36
40
  isObjectArray: () => _chunkA5LHXE5Xcjs.isObjectArray,
@@ -3,7 +3,7 @@
3
3
  var _chunkV3FWFWP2cjs = require('./chunk-V3FWFWP2.cjs');
4
4
 
5
5
 
6
- var _chunk52BMK4JDcjs = require('./chunk-52BMK4JD.cjs');
6
+ var _chunkE5U7NDJFcjs = require('./chunk-E5U7NDJF.cjs');
7
7
 
8
8
 
9
9
  var _chunk4O7YOSS7cjs = require('./chunk-4O7YOSS7.cjs');
@@ -15,7 +15,7 @@ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
15
15
  var basic_exports = {};
16
16
  _chunk5AZGAKWRcjs.__export.call(void 0, basic_exports, {
17
17
  array: () => _chunk4O7YOSS7cjs.array_exports,
18
- object: () => _chunk52BMK4JDcjs.object_exports,
18
+ object: () => _chunkE5U7NDJFcjs.object_exports,
19
19
  string: () => _chunkV3FWFWP2cjs.string_exports
20
20
  });
21
21
 
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-P2CYIUCC.js";
4
4
  import {
5
5
  object_exports
6
- } from "./chunk-XAFUCA6P.js";
6
+ } from "./chunk-2FN3EJW2.js";
7
7
  import {
8
8
  array_exports
9
9
  } from "./chunk-E75NHLNL.js";
@@ -0,0 +1,13 @@
1
+ // 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
+ export {
12
+ getSort
13
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 提取单位值
3
+ * @param text
4
+ * @param str
5
+ * @param callback
6
+ * @returns
7
+ */
8
+ declare function fetchUnitValue(text: string, str: string, callback?: (n: number, dw: string, yss: string, i: number) => string): string;
9
+
10
+ export { fetchUnitValue };
@@ -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,9 @@
1
+ /**
2
+ * 获取对应的属性值
3
+ * @param elem
4
+ * @param style
5
+ * @returns
6
+ */
7
+ declare function getCss(elem: Element, style: string): any;
8
+
9
+ export { getCss };
@@ -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,14 @@
1
+ /**
2
+ * 通过svg 字符串获取对应数据
3
+ * @param{string} str
4
+ */
5
+ declare function getSVG(str: string): {
6
+ body: string;
7
+ viewBox: string;
8
+ left: number;
9
+ top: number;
10
+ width: number;
11
+ height: number;
12
+ } | undefined;
13
+
14
+ export { getSVG };
@@ -0,0 +1,6 @@
1
+ export { fetchUnitValue } from './fetchUnitValue.js';
2
+ export { getAttrObj } from './getAttrObj.js';
3
+ export { getCss } from './getCss.js';
4
+ export { getPositionRelative } from './getPositionRelative.js';
5
+ export { getSVG } from './getSVG.js';
6
+ export { setCss } from './setCss.js';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 设置样式
3
+ * @param elem
4
+ * @param style
5
+ * @param value
6
+ */
7
+ declare function setCss(elem: HTMLElement, style: string | {
8
+ [key: string]: string;
9
+ }, value?: string): void;
10
+
11
+ export { setCss };
@@ -0,0 +1,14 @@
1
+ type SeatEvent = MouseEvent | Touch;
2
+ /**
3
+ * 计算方向
4
+ * @param ks
5
+ * @param js
6
+ * @returns
7
+ */
8
+ declare function getLocus(ks: SeatEvent, js: SeatEvent): {
9
+ x: number;
10
+ y: number;
11
+ t: number;
12
+ };
13
+
14
+ export { getLocus };
@@ -0,0 +1,25 @@
1
+ type SeatEvent = MouseEvent | Touch;
2
+ type Type = 'touch' | 'mouse';
3
+ type Callback = (e: SeatEvent, t: Type) => void;
4
+ type Dom = HTMLElement | Document;
5
+ declare const eventTypes: {
6
+ press: {
7
+ touch: string;
8
+ mouse: string;
9
+ };
10
+ shift: {
11
+ touch: string;
12
+ mouse: string;
13
+ };
14
+ release: {
15
+ touch: string;
16
+ mouse: string;
17
+ };
18
+ };
19
+ type EventTypeKey = keyof typeof eventTypes;
20
+ declare function pressEvent(dom: HTMLElement, press: (e: SeatEvent) => any, shift?: Callback, release?: Callback, dom1?: Dom): void;
21
+ declare function shiftEvent(t: Type, dom1: Dom, shift?: Callback, release?: Callback, is?: boolean): void;
22
+ declare function foundEvent(eventType: EventTypeKey, c: Callback, dom?: Dom, type?: Type): void;
23
+ declare function foundEventCallback(eventType: EventTypeKey, c: Callback, dom?: Dom, type?: Type): (event: Event) => void;
24
+
25
+ export { SeatEvent, foundEvent, foundEventCallback, pressEvent, shiftEvent };
@@ -0,0 +1,2 @@
1
+ export { getLocus } from './getLocus.js';
2
+ export { SeatEvent, foundEvent, foundEventCallback, pressEvent, shiftEvent } from './getShiftEvent.js';
@@ -0,0 +1,13 @@
1
+ type HtmlObj = {
2
+ div: string;
3
+ attr: {
4
+ [key: string]: string | number | undefined;
5
+ } | undefined;
6
+ value: Array<HtmlObj | string>;
7
+ };
8
+ /**
9
+ * 解析html字符串
10
+ */
11
+ declare function analysisHtml(str: string): (string | HtmlObj)[];
12
+
13
+ export { analysisHtml };