sculp-js 1.18.3 → 1.19.1

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 (90) hide show
  1. package/README.md +83 -6
  2. package/dist/cjs/array.cjs +10 -2
  3. package/dist/cjs/async.cjs +8 -2
  4. package/dist/cjs/base64.cjs +9 -2
  5. package/dist/cjs/clipboard.cjs +7 -2
  6. package/dist/cjs/cloneDeep.cjs +6 -2
  7. package/dist/cjs/cookie.cjs +8 -2
  8. package/dist/cjs/date.cjs +12 -2
  9. package/dist/cjs/dom.cjs +13 -2
  10. package/dist/cjs/download.cjs +10 -2
  11. package/dist/cjs/file.cjs +8 -2
  12. package/dist/cjs/func.cjs +10 -2
  13. package/dist/cjs/index.cjs +36 -3
  14. package/dist/cjs/isEqual.cjs +6 -2
  15. package/dist/cjs/math.cjs +10 -2
  16. package/dist/cjs/number.cjs +13 -4
  17. package/dist/cjs/object.cjs +18 -4
  18. package/dist/cjs/path.cjs +7 -2
  19. package/dist/cjs/qs.cjs +7 -2
  20. package/dist/cjs/random.cjs +9 -2
  21. package/dist/cjs/string.cjs +15 -2
  22. package/dist/cjs/tooltip.cjs +6 -2
  23. package/dist/cjs/tree.cjs +13 -2
  24. package/dist/cjs/type.cjs +27 -2
  25. package/dist/cjs/unicodeToolkit.cjs +6 -2
  26. package/dist/cjs/unique.cjs +8 -2
  27. package/dist/cjs/url.cjs +9 -2
  28. package/dist/cjs/validator.cjs +21 -2
  29. package/dist/cjs/variable.cjs +10 -2
  30. package/dist/cjs/watermark.cjs +6 -2
  31. package/dist/esm/array.mjs +9 -2
  32. package/dist/esm/async.mjs +7 -2
  33. package/dist/esm/base64.mjs +8 -2
  34. package/dist/esm/clipboard.mjs +6 -2
  35. package/dist/esm/cloneDeep.mjs +5 -2
  36. package/dist/esm/cookie.mjs +7 -2
  37. package/dist/esm/date.mjs +20 -2
  38. package/dist/esm/dom.mjs +22 -2
  39. package/dist/esm/download.mjs +9 -2
  40. package/dist/esm/file.mjs +7 -2
  41. package/dist/esm/func.mjs +9 -2
  42. package/dist/esm/index.mjs +64 -2
  43. package/dist/esm/isEqual.mjs +5 -2
  44. package/dist/esm/math.mjs +9 -2
  45. package/dist/esm/number.mjs +20 -4
  46. package/dist/esm/object.mjs +16 -2
  47. package/dist/esm/path.mjs +6 -2
  48. package/dist/esm/qs.mjs +7 -3
  49. package/dist/esm/random.mjs +8 -2
  50. package/dist/esm/string.mjs +14 -1
  51. package/dist/esm/tooltip.mjs +5 -2
  52. package/dist/esm/tree.mjs +23 -3
  53. package/dist/esm/type.mjs +27 -2
  54. package/dist/esm/unicodeToolkit.mjs +5 -2
  55. package/dist/esm/unique.mjs +7 -2
  56. package/dist/esm/url.mjs +9 -3
  57. package/dist/esm/validator.mjs +20 -1
  58. package/dist/esm/variable.mjs +10 -3
  59. package/dist/esm/watermark.mjs +5 -2
  60. package/dist/types/array.d.ts +8 -0
  61. package/dist/types/async.d.ts +6 -0
  62. package/dist/types/base64.d.ts +7 -0
  63. package/dist/types/clipboard.d.ts +5 -1
  64. package/dist/types/cloneDeep.d.ts +4 -0
  65. package/dist/types/cookie.d.ts +6 -0
  66. package/dist/types/date.d.ts +10 -0
  67. package/dist/types/dom.d.ts +11 -0
  68. package/dist/types/download.d.ts +8 -1
  69. package/dist/types/file.d.ts +6 -1
  70. package/dist/types/func.d.ts +8 -0
  71. package/dist/types/index.d.ts +30 -0
  72. package/dist/types/isEqual.d.ts +4 -0
  73. package/dist/types/math.d.ts +8 -1
  74. package/dist/types/number.d.ts +11 -2
  75. package/dist/types/object.d.ts +13 -0
  76. package/dist/types/path.d.ts +5 -0
  77. package/dist/types/qs.d.ts +5 -0
  78. package/dist/types/random.d.ts +7 -0
  79. package/dist/types/string.d.ts +13 -0
  80. package/dist/types/tooltip.d.ts +7 -0
  81. package/dist/types/tree.d.ts +11 -0
  82. package/dist/types/type.d.ts +29 -4
  83. package/dist/types/unicodeToolkit.d.ts +4 -0
  84. package/dist/types/unique.d.ts +6 -0
  85. package/dist/types/url.d.ts +7 -0
  86. package/dist/types/validator.d.ts +19 -0
  87. package/dist/types/variable.d.ts +8 -0
  88. package/dist/types/watermark.d.ts +4 -0
  89. package/dist/umd/index.min.js +2 -2
  90. package/package.json +1 -1
@@ -1,12 +1,16 @@
1
1
  /*!
2
- * sculp-js v1.18.3
2
+ * sculp-js v1.19.1
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
+ import * as array from './array.mjs';
7
8
  export { arrayEach, arrayEachAsync, arrayInsertBefore, arrayRemove, diffArray } from './array.mjs';
9
+ import * as clipboard from './clipboard.mjs';
8
10
  export { copyText, fallbackCopyText } from './clipboard.mjs';
11
+ import * as cookie from './cookie.mjs';
9
12
  export { cookieDel, cookieGet, cookieSet } from './cookie.mjs';
13
+ import * as date from './date.mjs';
10
14
  export {
11
15
  calculateDate,
12
16
  calculateDateTime,
@@ -16,6 +20,7 @@ export {
16
20
  formatDate,
17
21
  isValidDate
18
22
  } from './date.mjs';
23
+ import * as dom from './dom.mjs';
19
24
  export {
20
25
  addClass,
21
26
  getComputedCssVal,
@@ -26,7 +31,9 @@ export {
26
31
  select,
27
32
  setStyle
28
33
  } from './dom.mjs';
34
+ import * as download from './download.mjs';
29
35
  export { crossOriginDownload, downloadBlob, downloadData, downloadHref, downloadURL } from './download.mjs';
36
+ import * as object from './object.mjs';
30
37
  export {
31
38
  isPlainObject,
32
39
  objectAssign,
@@ -39,8 +46,11 @@ export {
39
46
  objectOmit,
40
47
  objectPick
41
48
  } from './object.mjs';
49
+ import * as path from './path.mjs';
42
50
  export { pathJoin, pathNormalize } from './path.mjs';
51
+ import * as qs from './qs.mjs';
43
52
  export { qsParse, qsStringify } from './qs.mjs';
53
+ import * as string from './string.mjs';
44
54
  export {
45
55
  STRING_ARABIC_NUMERALS,
46
56
  STRING_LOWERCASE_ALPHA,
@@ -53,6 +63,7 @@ export {
53
63
  stringFormat,
54
64
  stringKebabCase
55
65
  } from './string.mjs';
66
+ import * as type from './type.mjs';
56
67
  export {
57
68
  arrayLike,
58
69
  isArray,
@@ -76,14 +87,21 @@ export {
76
87
  isSymbol,
77
88
  isUndefined,
78
89
  objectHas,
79
- default as typeIs
90
+ typeIs
80
91
  } from './type.mjs';
92
+ import * as url from './url.mjs';
81
93
  export { urlDelParams, urlParse, urlSetParams, urlStringify } from './url.mjs';
94
+ import * as async from './async.mjs';
82
95
  export { asyncMap, safeAwait, wait } from './async.mjs';
96
+ import * as file from './file.mjs';
83
97
  export { chooseLocalFile, compressImg, supportCanvas } from './file.mjs';
98
+ import * as watermark from './watermark.mjs';
84
99
  export { genCanvasWM } from './watermark.mjs';
100
+ import * as func from './func.mjs';
85
101
  export { debounce, getGlobal, once, setGlobal, throttle } from './func.mjs';
102
+ import * as random from './random.mjs';
86
103
  export { STRING_POOL, randomNumber, randomString, randomUuid } from './random.mjs';
104
+ import * as number from './number.mjs';
87
105
  export {
88
106
  HEX_POOL,
89
107
  formatMoney,
@@ -92,8 +110,11 @@ export {
92
110
  numberAbbr,
93
111
  numberToHex
94
112
  } from './number.mjs';
113
+ import * as unique from './unique.mjs';
95
114
  export { UNIQUE_NUMBER_SAFE_LENGTH, uniqueNumber, uniqueString } from './unique.mjs';
115
+ import * as tooltip from './tooltip.mjs';
96
116
  export { tooltipEvent } from './tooltip.mjs';
117
+ import * as tree from './tree.mjs';
97
118
  export {
98
119
  filterDeep,
99
120
  findDeep,
@@ -104,8 +125,11 @@ export {
104
125
  mapDeep,
105
126
  searchTreeById
106
127
  } from './tree.mjs';
128
+ import * as math from './math.mjs';
107
129
  export { add, divide, multiply, strip, subtract } from './math.mjs';
130
+ import * as base64 from './base64.mjs';
108
131
  export { b64decode, b64encode, weAtob, weBtoa } from './base64.mjs';
132
+ import * as validator from './validator.mjs';
109
133
  export {
110
134
  EMAIL_REGEX,
111
135
  HTTP_URL_REGEX,
@@ -124,7 +148,45 @@ export {
124
148
  isPhone,
125
149
  isUrl
126
150
  } from './validator.mjs';
151
+ import * as variable from './variable.mjs';
127
152
  export { escapeRegExp, executeInScope, parseVarFromString, replaceVarFromString, uniqueSymbol } from './variable.mjs';
153
+ import * as cloneDeep from './cloneDeep.mjs';
128
154
  export { cloneDeep } from './cloneDeep.mjs';
155
+ import * as isEqual from './isEqual.mjs';
129
156
  export { isEqual } from './isEqual.mjs';
157
+ import * as unicodeToolkit from './unicodeToolkit.mjs';
130
158
  export { UnicodeToolkit } from './unicodeToolkit.mjs';
159
+
160
+ // 导出默认对象(使用类型断言避免私有类型问题)
161
+ var index = {
162
+ ...array,
163
+ ...clipboard,
164
+ ...cookie,
165
+ ...date,
166
+ ...dom,
167
+ ...download,
168
+ ...object,
169
+ ...path,
170
+ ...qs,
171
+ ...string,
172
+ ...type,
173
+ ...url,
174
+ ...async,
175
+ ...file,
176
+ ...watermark,
177
+ ...func,
178
+ ...random,
179
+ ...number,
180
+ ...unique,
181
+ ...tooltip,
182
+ ...tree,
183
+ ...math,
184
+ ...base64,
185
+ ...validator,
186
+ ...variable,
187
+ ...cloneDeep,
188
+ ...isEqual,
189
+ ...unicodeToolkit
190
+ };
191
+
192
+ export { index as default };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.18.3
2
+ * sculp-js v1.19.1
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -204,5 +204,8 @@ function deepCompareObject(a, b, stack) {
204
204
  }
205
205
  return true;
206
206
  }
207
+ var isEqual_default = {
208
+ isEqual
209
+ };
207
210
 
208
- export { isEqual };
211
+ export { isEqual_default as default, isEqual };
package/dist/esm/math.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.18.3
2
+ * sculp-js v1.19.1
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -72,5 +72,12 @@ const divide = (arg1, arg2) => {
72
72
  function strip(num, precision = 15) {
73
73
  return +parseFloat(Number(num).toPrecision(precision));
74
74
  }
75
+ var math = {
76
+ add,
77
+ subtract,
78
+ multiply,
79
+ divide,
80
+ strip
81
+ };
75
82
 
76
- export { add, divide, multiply, strip, subtract };
83
+ export { add, math as default, divide, multiply, strip, subtract };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.18.3
2
+ * sculp-js v1.19.1
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -68,9 +68,9 @@ const numberAbbr = (num, units, options = { ratio: 1000, decimals: 0, separator:
68
68
  * reference: https://zh.wikipedia.org/wiki/%E5%8D%83%E5%AD%97%E8%8A%82
69
69
  * @param {number | string} num bytes Number in Bytes
70
70
  * @param {IHumanFileSizeOptions} options default: { decimals = 0, si = false, separator = ' ' }
71
- * si: True to use metric (SI) units, aka powers of 1000, the units is
71
+ * si: True to use metric (SI) units, aka powers of 1000, units is
72
72
  * ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'].
73
- * False to use binary (IEC), aka powers of 1024, the units is
73
+ * False to use binary (IEC), aka powers of 1024, units is
74
74
  * ['Byte', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']
75
75
  * @returns
76
76
  */
@@ -109,5 +109,21 @@ function formatNumber(num, decimals) {
109
109
  }
110
110
  return Number(Number(num).toFixed(prec)).toLocaleString('en-US');
111
111
  }
112
+ var number = {
113
+ HEX_POOL,
114
+ numberToHex,
115
+ numberAbbr,
116
+ humanFileSize,
117
+ formatNumber,
118
+ formatMoney: formatNumber
119
+ };
112
120
 
113
- export { HEX_POOL, formatNumber as formatMoney, formatNumber, humanFileSize, numberAbbr, numberToHex };
121
+ export {
122
+ HEX_POOL,
123
+ number as default,
124
+ formatNumber as formatMoney,
125
+ formatNumber,
126
+ humanFileSize,
127
+ numberAbbr,
128
+ numberToHex
129
+ };
@@ -1,11 +1,12 @@
1
1
  /*!
2
- * sculp-js v1.18.3
2
+ * sculp-js v1.19.1
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
- import typeIs, { isObject, objectHas, isNumber, isUndefined, isArray } from './type.mjs';
7
+ import { isNumber, isObject, objectHas, isUndefined, isArray, typeIs as typeIs$1 } from './type.mjs';
8
8
 
9
+ const typeIs = typeIs$1;
9
10
  /**
10
11
  * 判断对象是否为纯对象
11
12
  * @param {object} obj
@@ -191,8 +192,21 @@ function objectGet(obj, path, strict = false) {
191
192
  v: tempObj ? tempObj[keyArr[i]] : undefined
192
193
  };
193
194
  }
195
+ var object = {
196
+ isPlainObject,
197
+ objectEach,
198
+ objectEachAsync,
199
+ objectMap,
200
+ objectPick,
201
+ objectOmit,
202
+ objectAssign,
203
+ objectMerge: objectAssign,
204
+ objectFill,
205
+ objectGet
206
+ };
194
207
 
195
208
  export {
209
+ object as default,
196
210
  isPlainObject,
197
211
  objectAssign,
198
212
  objectEach,
package/dist/esm/path.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.18.3
2
+ * sculp-js v1.19.1
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -55,5 +55,9 @@ const pathNormalize = path => {
55
55
  * @returns {string}
56
56
  */
57
57
  const pathJoin = (from, ...to) => pathNormalize([from, ...to].join('/'));
58
+ var path = {
59
+ pathJoin,
60
+ pathNormalize
61
+ };
58
62
 
59
- export { pathJoin, pathNormalize };
63
+ export { path as default, pathJoin, pathNormalize };
package/dist/esm/qs.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * sculp-js v1.18.3
2
+ * sculp-js v1.19.1
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  import { objectEach } from './object.mjs';
8
- import { isUndefined, isArray, isString, isNumber, isBoolean, isDate } from './type.mjs';
8
+ import { isString, isNumber, isBoolean, isDate, isUndefined, isArray } from './type.mjs';
9
9
 
10
10
  /**
11
11
  * 解析查询参数,内部使用的是浏览器内置的 URLSearchParams 进行处理
@@ -57,5 +57,9 @@ function qsStringify(query, replacer = defaultReplacer) {
57
57
  });
58
58
  return params.toString();
59
59
  }
60
+ var qs = {
61
+ qsParse,
62
+ qsStringify
63
+ };
60
64
 
61
- export { qsParse, qsStringify };
65
+ export { qs as default, qsParse, qsStringify };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.18.3
2
+ * sculp-js v1.19.1
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -60,5 +60,11 @@ function randomUuid() {
60
60
  }
61
61
  return /[^/]+$/.exec(URL.createObjectURL(new Blob()).slice())[0];
62
62
  }
63
+ var random = {
64
+ STRING_POOL,
65
+ randomNumber,
66
+ randomString,
67
+ randomUuid
68
+ };
63
69
 
64
- export { STRING_POOL, randomNumber, randomString, randomUuid };
70
+ export { STRING_POOL, random as default, randomNumber, randomString, randomUuid };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.18.3
2
+ * sculp-js v1.19.1
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -139,11 +139,24 @@ function parseQueryParams(searchStr = location.search) {
139
139
  });
140
140
  return queryObj;
141
141
  }
142
+ var string = {
143
+ stringCamelCase,
144
+ stringKebabCase,
145
+ STRING_ARABIC_NUMERALS,
146
+ STRING_LOWERCASE_ALPHA,
147
+ STRING_UPPERCASE_ALPHA,
148
+ stringFormat,
149
+ stringAssign,
150
+ stringEscapeHtml,
151
+ stringFill,
152
+ parseQueryParams
153
+ };
142
154
 
143
155
  export {
144
156
  STRING_ARABIC_NUMERALS,
145
157
  STRING_LOWERCASE_ALPHA,
146
158
  STRING_UPPERCASE_ALPHA,
159
+ string as default,
147
160
  parseQueryParams,
148
161
  stringAssign,
149
162
  stringCamelCase,
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.18.3
2
+ * sculp-js v1.19.1
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -119,5 +119,8 @@ function handleMouseLeave(rootContainer = '#root') {
119
119
  }
120
120
  }
121
121
  const tooltipEvent = { handleMouseEnter, handleMouseLeave };
122
+ var tooltip = {
123
+ tooltipEvent
124
+ };
122
125
 
123
- export { tooltipEvent };
126
+ export { tooltip as default, tooltipEvent };
package/dist/esm/tree.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * sculp-js v1.18.3
2
+ * sculp-js v1.19.1
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  import { objectOmit } from './object.mjs';
8
- import { isObject, objectHas, isNodeList } from './type.mjs';
8
+ import { objectHas, isObject, isNodeList } from './type.mjs';
9
9
 
10
10
  const defaultFieldOptions = { keyField: 'key', childField: 'children', pidField: 'pid' };
11
11
  const defaultSearchTreeOptions = {
@@ -427,5 +427,25 @@ function fuzzySearchTree(nodes, filterCondition, options = defaultSearchTreeOpti
427
427
  }
428
428
  return result;
429
429
  }
430
+ var tree = {
431
+ forEachDeep,
432
+ findDeep,
433
+ filterDeep,
434
+ mapDeep,
435
+ searchTreeById,
436
+ formatTree,
437
+ flatTree,
438
+ fuzzySearchTree
439
+ };
430
440
 
431
- export { filterDeep, findDeep, flatTree, forEachDeep, formatTree, fuzzySearchTree, mapDeep, searchTreeById };
441
+ export {
442
+ tree as default,
443
+ filterDeep,
444
+ findDeep,
445
+ flatTree,
446
+ forEachDeep,
447
+ formatTree,
448
+ fuzzySearchTree,
449
+ mapDeep,
450
+ searchTreeById
451
+ };
package/dist/esm/type.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.18.3
2
+ * sculp-js v1.19.1
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -126,10 +126,35 @@ function isEmpty(value) {
126
126
  function isNodeList(value) {
127
127
  return isUndefined(NodeList) ? false : NodeList.prototype.isPrototypeOf(value);
128
128
  }
129
+ var type = {
130
+ typeIs,
131
+ objectHas,
132
+ arrayLike,
133
+ isString,
134
+ isBoolean,
135
+ isSymbol,
136
+ isBigInt,
137
+ isNumber,
138
+ isUndefined,
139
+ isNull,
140
+ isPrimitive,
141
+ isNullOrUnDef,
142
+ isNullish: isNullOrUnDef,
143
+ isObject,
144
+ isArray,
145
+ isFunction,
146
+ isNaN,
147
+ isDate,
148
+ isError,
149
+ isRegExp,
150
+ isJsonString,
151
+ isEmpty,
152
+ isNodeList
153
+ };
129
154
 
130
155
  export {
131
156
  arrayLike,
132
- typeIs as default,
157
+ type as default,
133
158
  isArray,
134
159
  isBigInt,
135
160
  isBoolean,
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.18.3
2
+ * sculp-js v1.19.1
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -113,5 +113,8 @@ class UnicodeToolkit {
113
113
  return decoded;
114
114
  }
115
115
  }
116
+ var unicodeToolkit = {
117
+ UnicodeToolkit
118
+ };
116
119
 
117
- export { UnicodeToolkit };
120
+ export { UnicodeToolkit, unicodeToolkit as default };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.18.3
2
+ * sculp-js v1.19.1
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -72,5 +72,10 @@ const uniqueString = (length, pool) => {
72
72
  }
73
73
  return uniqueString;
74
74
  };
75
+ var unique = {
76
+ UNIQUE_NUMBER_SAFE_LENGTH,
77
+ uniqueNumber,
78
+ uniqueString
79
+ };
75
80
 
76
- export { UNIQUE_NUMBER_SAFE_LENGTH, uniqueNumber, uniqueString };
81
+ export { UNIQUE_NUMBER_SAFE_LENGTH, unique as default, uniqueNumber, uniqueString };
package/dist/esm/url.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * sculp-js v1.18.3
2
+ * sculp-js v1.19.1
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  import { isFunction } from './type.mjs';
8
8
  import { pathJoin } from './path.mjs';
9
- import { qsParse, qsStringify } from './qs.mjs';
9
+ import { qsStringify, qsParse } from './qs.mjs';
10
10
 
11
11
  /**
12
12
  * url 解析
@@ -84,5 +84,11 @@ const urlDelParams = (url, removeKeys) => {
84
84
  removeKeys.forEach(key => delete p.searchParams[key]);
85
85
  return urlStringify(p);
86
86
  };
87
+ var url = {
88
+ urlParse,
89
+ urlStringify,
90
+ urlSetParams,
91
+ urlDelParams
92
+ };
87
93
 
88
- export { urlDelParams, urlParse, urlSetParams, urlStringify };
94
+ export { url as default, urlDelParams, urlParse, urlSetParams, urlStringify };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.18.3
2
+ * sculp-js v1.19.1
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -126,6 +126,24 @@ const DIGIT_RE = /^\d+$/;
126
126
  * @returns {boolean}
127
127
  */
128
128
  const isDigit = value => DIGIT_RE.test(value);
129
+ var validator = {
130
+ EMAIL_REGEX,
131
+ HTTP_URL_REGEX,
132
+ IPV4_REGEX,
133
+ IPV6_REGEX,
134
+ PHONE_REGEX,
135
+ URL_REGEX,
136
+ isDigit,
137
+ isEmail,
138
+ isFloat,
139
+ isIdNo,
140
+ isInteger,
141
+ isIpV4,
142
+ isIpV6,
143
+ isNumerical,
144
+ isPhone,
145
+ isUrl
146
+ };
129
147
 
130
148
  export {
131
149
  EMAIL_REGEX,
@@ -134,6 +152,7 @@ export {
134
152
  IPV6_REGEX,
135
153
  PHONE_REGEX,
136
154
  URL_REGEX,
155
+ validator as default,
137
156
  isDigit,
138
157
  isEmail,
139
158
  isFloat,
@@ -1,10 +1,10 @@
1
1
  /*!
2
- * sculp-js v1.18.3
2
+ * sculp-js v1.19.1
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
- import { isNullOrUnDef, objectHas } from './type.mjs';
7
+ import { objectHas, isNullOrUnDef } from './type.mjs';
8
8
 
9
9
  /**
10
10
  * 去除字符串中重复字符
@@ -115,5 +115,12 @@ function executeInScope(code, scope = {}) {
115
115
  throw new Error(`代码执行失败: ${error.message}`);
116
116
  }
117
117
  }
118
+ var variable = {
119
+ escapeRegExp,
120
+ executeInScope,
121
+ parseVarFromString,
122
+ replaceVarFromString,
123
+ uniqueSymbol
124
+ };
118
125
 
119
- export { escapeRegExp, executeInScope, parseVarFromString, replaceVarFromString, uniqueSymbol };
126
+ export { variable as default, escapeRegExp, executeInScope, parseVarFromString, replaceVarFromString, uniqueSymbol };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.18.3
2
+ * sculp-js v1.19.1
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -98,5 +98,8 @@ function genCanvasWM(content = '请勿外传', canvasWM) {
98
98
  mo.observe(container, { attributes: true, subtree: true, childList: true });
99
99
  }
100
100
  }
101
+ var watermark = {
102
+ genCanvasWM
103
+ };
101
104
 
102
- export { genCanvasWM };
105
+ export { watermark as default, genCanvasWM };
@@ -98,3 +98,11 @@ export type GetKey<T> = (item: T) => string | number | symbol;
98
98
  * ```
99
99
  */
100
100
  export declare function diffArray<T>(source: readonly T[], target: readonly T[], getKey?: GetKey<T>): DiffResult<T>;
101
+ declare const _default: {
102
+ arrayEach: typeof arrayEach;
103
+ arrayEachAsync: typeof arrayEachAsync;
104
+ arrayInsertBefore: typeof arrayInsertBefore;
105
+ arrayRemove: typeof arrayRemove;
106
+ diffArray: typeof diffArray;
107
+ };
108
+ export default _default;
@@ -34,3 +34,9 @@ export declare function asyncMap<T, R>(list: Array<T>, mapper: (val: T, idx: num
34
34
  }
35
35
  */
36
36
  export declare function safeAwait<T, U = Error>(promise: Promise<T>, errorExt?: object): Promise<[U, undefined] | [null, T]>;
37
+ declare const _default: {
38
+ wait: typeof wait;
39
+ asyncMap: typeof asyncMap;
40
+ safeAwait: typeof safeAwait;
41
+ };
42
+ export default _default;
@@ -22,3 +22,10 @@ export declare function b64decode(base64: string): string;
22
22
  * @returns base64编码的字符串
23
23
  */
24
24
  export declare function b64encode(rawStr: string): string;
25
+ declare const _default: {
26
+ weBtoa: typeof weBtoa;
27
+ weAtob: typeof weAtob;
28
+ b64decode: typeof b64decode;
29
+ b64encode: typeof b64encode;
30
+ };
31
+ export default _default;
@@ -16,4 +16,8 @@ export declare function copyText(text: string, options?: CopyTextOptions): void;
16
16
  * @param options
17
17
  */
18
18
  export declare function fallbackCopyText(text: string, options?: CopyTextOptions): void;
19
- export {};
19
+ declare const _default: {
20
+ copyText: typeof copyText;
21
+ fallbackCopyText: typeof fallbackCopyText;
22
+ };
23
+ export default _default;
@@ -9,3 +9,7 @@
9
9
  * @returns {T}
10
10
  */
11
11
  export declare function cloneDeep<T>(source: T, map?: WeakMap<any, any>): T;
12
+ declare const _default: {
13
+ cloneDeep: typeof cloneDeep;
14
+ };
15
+ export default _default;
@@ -16,3 +16,9 @@ export declare function cookieSet(name: string, value: string, maxAge?: number |
16
16
  * @param name cookie 名称
17
17
  */
18
18
  export declare const cookieDel: (name: string) => void;
19
+ declare const _default: {
20
+ cookieSet: typeof cookieSet;
21
+ cookieGet: typeof cookieGet;
22
+ cookieDel: (name: string) => void;
23
+ };
24
+ export default _default;