sculp-js 1.18.2 → 1.19.0

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 (91) hide show
  1. package/README.md +83 -6
  2. package/dist/cjs/{array.js → array.cjs} +10 -2
  3. package/dist/cjs/{async.js → async.cjs} +8 -2
  4. package/dist/cjs/{base64.js → base64.cjs} +11 -4
  5. package/dist/cjs/{clipboard.js → clipboard.cjs} +9 -4
  6. package/dist/cjs/{cloneDeep.js → cloneDeep.cjs} +6 -2
  7. package/dist/cjs/{cookie.js → cookie.cjs} +9 -3
  8. package/dist/cjs/{date.js → date.cjs} +13 -3
  9. package/dist/cjs/{dom.js → dom.cjs} +16 -5
  10. package/dist/cjs/{download.js → download.cjs} +12 -4
  11. package/dist/cjs/{file.js → file.cjs} +9 -3
  12. package/dist/cjs/{func.js → func.cjs} +10 -2
  13. package/dist/cjs/{index.js → index.cjs} +63 -31
  14. package/dist/cjs/{isEqual.js → isEqual.cjs} +6 -2
  15. package/dist/cjs/{math.js → math.cjs} +10 -2
  16. package/dist/cjs/{number.js → number.cjs} +16 -7
  17. package/dist/cjs/{object.js → object.cjs} +19 -5
  18. package/dist/cjs/{path.js → path.cjs} +7 -2
  19. package/dist/cjs/{qs.js → qs.cjs} +9 -4
  20. package/dist/cjs/{random.js → random.cjs} +11 -4
  21. package/dist/cjs/{string.js → string.cjs} +15 -2
  22. package/dist/cjs/{tooltip.js → tooltip.cjs} +8 -4
  23. package/dist/cjs/{tree.js → tree.cjs} +15 -4
  24. package/dist/cjs/{type.js → type.cjs} +27 -2
  25. package/dist/cjs/{unicodeToolkit.js → unicodeToolkit.cjs} +6 -2
  26. package/dist/cjs/{unique.js → unique.cjs} +11 -5
  27. package/dist/cjs/{url.js → url.cjs} +12 -5
  28. package/dist/cjs/{validator.js → validator.cjs} +21 -2
  29. package/dist/cjs/{variable.js → variable.cjs} +11 -3
  30. package/dist/cjs/{watermark.js → watermark.cjs} +7 -3
  31. package/dist/esm/{array.js → array.mjs} +9 -2
  32. package/dist/esm/{async.js → async.mjs} +7 -2
  33. package/dist/esm/{base64.js → base64.mjs} +10 -4
  34. package/dist/esm/{clipboard.js → clipboard.mjs} +8 -4
  35. package/dist/esm/{cloneDeep.js → cloneDeep.mjs} +5 -2
  36. package/dist/esm/{cookie.js → cookie.mjs} +8 -3
  37. package/dist/esm/{date.js → date.mjs} +21 -3
  38. package/dist/esm/{dom.js → dom.mjs} +25 -5
  39. package/dist/esm/{download.js → download.mjs} +11 -4
  40. package/dist/esm/{file.js → file.mjs} +8 -3
  41. package/dist/esm/{func.js → func.mjs} +9 -2
  42. package/dist/esm/index.mjs +191 -0
  43. package/dist/esm/{isEqual.js → isEqual.mjs} +5 -2
  44. package/dist/esm/{math.js → math.mjs} +9 -2
  45. package/dist/esm/{number.js → number.mjs} +23 -7
  46. package/dist/esm/{object.js → object.mjs} +16 -2
  47. package/dist/esm/{path.js → path.mjs} +6 -2
  48. package/dist/esm/{qs.js → qs.mjs} +8 -4
  49. package/dist/esm/{random.js → random.mjs} +10 -4
  50. package/dist/esm/{string.js → string.mjs} +14 -1
  51. package/dist/esm/{tooltip.js → tooltip.mjs} +7 -4
  52. package/dist/esm/{tree.js → tree.mjs} +24 -4
  53. package/dist/esm/{type.js → type.mjs} +27 -2
  54. package/dist/esm/{unicodeToolkit.js → unicodeToolkit.mjs} +5 -2
  55. package/dist/esm/{unique.js → unique.mjs} +10 -5
  56. package/dist/esm/{url.js → url.mjs} +11 -5
  57. package/dist/esm/{validator.js → validator.mjs} +20 -1
  58. package/dist/esm/{variable.js → variable.mjs} +10 -3
  59. package/dist/esm/{watermark.js → watermark.mjs} +6 -3
  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/isEqual.d.ts +4 -0
  72. package/dist/types/math.d.ts +8 -1
  73. package/dist/types/number.d.ts +11 -2
  74. package/dist/types/object.d.ts +13 -0
  75. package/dist/types/path.d.ts +5 -0
  76. package/dist/types/qs.d.ts +5 -0
  77. package/dist/types/random.d.ts +7 -0
  78. package/dist/types/string.d.ts +13 -0
  79. package/dist/types/tooltip.d.ts +7 -0
  80. package/dist/types/tree.d.ts +11 -0
  81. package/dist/types/type.d.ts +29 -4
  82. package/dist/types/unicodeToolkit.d.ts +4 -0
  83. package/dist/types/unique.d.ts +6 -0
  84. package/dist/types/url.d.ts +7 -0
  85. package/dist/types/validator.d.ts +19 -0
  86. package/dist/types/variable.d.ts +8 -0
  87. package/dist/types/watermark.d.ts +4 -0
  88. package/dist/umd/index.min.js +2 -2
  89. package/package.json +92 -120
  90. package/dist/esm/index.js +0 -130
  91. package/dist/types/index.d.ts +0 -28
@@ -1,16 +1,16 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
- var func = require('./func.js');
12
- var string = require('./string.js');
13
- var type = require('./type.js');
11
+ var func = require('./func.cjs');
12
+ var string = require('./string.cjs');
13
+ var type = require('./type.cjs');
14
14
 
15
15
  const HEX_POOL = `${string.STRING_ARABIC_NUMERALS}${string.STRING_UPPERCASE_ALPHA}${string.STRING_LOWERCASE_ALPHA}`;
16
16
  const supportBigInt = typeof BigInt !== 'undefined';
@@ -72,9 +72,9 @@ const numberAbbr = (num, units, options = { ratio: 1000, decimals: 0, separator:
72
72
  * reference: https://zh.wikipedia.org/wiki/%E5%8D%83%E5%AD%97%E8%8A%82
73
73
  * @param {number | string} num bytes Number in Bytes
74
74
  * @param {IHumanFileSizeOptions} options default: { decimals = 0, si = false, separator = ' ' }
75
- * si: True to use metric (SI) units, aka powers of 1000, the units is
75
+ * si: True to use metric (SI) units, aka powers of 1000, units is
76
76
  * ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'].
77
- * False to use binary (IEC), aka powers of 1024, the units is
77
+ * False to use binary (IEC), aka powers of 1024, units is
78
78
  * ['Byte', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']
79
79
  * @returns
80
80
  */
@@ -113,8 +113,17 @@ function formatNumber(num, decimals) {
113
113
  }
114
114
  return Number(Number(num).toFixed(prec)).toLocaleString('en-US');
115
115
  }
116
+ var number = {
117
+ HEX_POOL,
118
+ numberToHex,
119
+ numberAbbr,
120
+ humanFileSize,
121
+ formatNumber,
122
+ formatMoney: formatNumber
123
+ };
116
124
 
117
125
  exports.HEX_POOL = HEX_POOL;
126
+ exports.default = number;
118
127
  exports.formatMoney = formatNumber;
119
128
  exports.formatNumber = formatNumber;
120
129
  exports.humanFileSize = humanFileSize;
@@ -1,15 +1,16 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
- var type = require('./type.js');
11
+ var type = require('./type.cjs');
12
12
 
13
+ const typeIs = type.typeIs;
13
14
  /**
14
15
  * 判断对象是否为纯对象
15
16
  * @param {object} obj
@@ -101,8 +102,8 @@ function objectOmit(obj, keys) {
101
102
  }
102
103
  const merge = (map, source, target) => {
103
104
  if (type.isUndefined(target)) return source;
104
- const sourceType = type.default(source);
105
- const targetType = type.default(target);
105
+ const sourceType = typeIs(source);
106
+ const targetType = typeIs(target);
106
107
  if (sourceType !== targetType) {
107
108
  if (type.isArray(target)) return merge(map, [], target);
108
109
  if (type.isObject(target)) return merge(map, {}, target);
@@ -195,7 +196,20 @@ function objectGet(obj, path, strict = false) {
195
196
  v: tempObj ? tempObj[keyArr[i]] : undefined
196
197
  };
197
198
  }
199
+ var object = {
200
+ isPlainObject,
201
+ objectEach,
202
+ objectEachAsync,
203
+ objectMap,
204
+ objectPick,
205
+ objectOmit,
206
+ objectAssign,
207
+ objectMerge: objectAssign,
208
+ objectFill,
209
+ objectGet
210
+ };
198
211
 
212
+ exports.default = object;
199
213
  exports.isPlainObject = isPlainObject;
200
214
  exports.objectAssign = objectAssign;
201
215
  exports.objectEach = objectEach;
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
11
  /**
12
12
  * 标准化路径
@@ -59,6 +59,11 @@ const pathNormalize = path => {
59
59
  * @returns {string}
60
60
  */
61
61
  const pathJoin = (from, ...to) => pathNormalize([from, ...to].join('/'));
62
+ var path = {
63
+ pathJoin,
64
+ pathNormalize
65
+ };
62
66
 
67
+ exports.default = path;
63
68
  exports.pathJoin = pathJoin;
64
69
  exports.pathNormalize = pathNormalize;
@@ -1,15 +1,15 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
- var object = require('./object.js');
12
- var type = require('./type.js');
11
+ var object = require('./object.cjs');
12
+ var type = require('./type.cjs');
13
13
 
14
14
  /**
15
15
  * 解析查询参数,内部使用的是浏览器内置的 URLSearchParams 进行处理
@@ -61,6 +61,11 @@ function qsStringify(query, replacer = defaultReplacer) {
61
61
  });
62
62
  return params.toString();
63
63
  }
64
+ var qs = {
65
+ qsParse,
66
+ qsStringify
67
+ };
64
68
 
69
+ exports.default = qs;
65
70
  exports.qsParse = qsParse;
66
71
  exports.qsStringify = qsStringify;
@@ -1,15 +1,15 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
- var string = require('./string.js');
12
- var type = require('./type.js');
11
+ var string = require('./string.cjs');
12
+ var type = require('./type.cjs');
13
13
 
14
14
  /**
15
15
  * 随机整数
@@ -64,8 +64,15 @@ function randomUuid() {
64
64
  }
65
65
  return /[^/]+$/.exec(URL.createObjectURL(new Blob()).slice())[0];
66
66
  }
67
+ var random = {
68
+ STRING_POOL,
69
+ randomNumber,
70
+ randomString,
71
+ randomUuid
72
+ };
67
73
 
68
74
  exports.STRING_POOL = STRING_POOL;
75
+ exports.default = random;
69
76
  exports.randomNumber = randomNumber;
70
77
  exports.randomString = randomString;
71
78
  exports.randomUuid = randomUuid;
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
11
  /**
12
12
  * 将字符串转换为驼峰格式
@@ -143,10 +143,23 @@ function parseQueryParams(searchStr = location.search) {
143
143
  });
144
144
  return queryObj;
145
145
  }
146
+ var string = {
147
+ stringCamelCase,
148
+ stringKebabCase,
149
+ STRING_ARABIC_NUMERALS,
150
+ STRING_LOWERCASE_ALPHA,
151
+ STRING_UPPERCASE_ALPHA,
152
+ stringFormat,
153
+ stringAssign,
154
+ stringEscapeHtml,
155
+ stringFill,
156
+ parseQueryParams
157
+ };
146
158
 
147
159
  exports.STRING_ARABIC_NUMERALS = STRING_ARABIC_NUMERALS;
148
160
  exports.STRING_LOWERCASE_ALPHA = STRING_LOWERCASE_ALPHA;
149
161
  exports.STRING_UPPERCASE_ALPHA = STRING_UPPERCASE_ALPHA;
162
+ exports.default = string;
150
163
  exports.parseQueryParams = parseQueryParams;
151
164
  exports.stringAssign = stringAssign;
152
165
  exports.stringCamelCase = stringCamelCase;
@@ -1,15 +1,15 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
- var dom = require('./dom.js');
12
- var type = require('./type.js');
11
+ var dom = require('./dom.cjs');
12
+ var type = require('./type.cjs');
13
13
 
14
14
  /**
15
15
  * 自定义的 tooltip, 支持鼠标移动动悬浮提示
@@ -123,5 +123,9 @@ function handleMouseLeave(rootContainer = '#root') {
123
123
  }
124
124
  }
125
125
  const tooltipEvent = { handleMouseEnter, handleMouseLeave };
126
+ var tooltip = {
127
+ tooltipEvent
128
+ };
126
129
 
130
+ exports.default = tooltip;
127
131
  exports.tooltipEvent = tooltipEvent;
@@ -1,15 +1,15 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
- var object = require('./object.js');
12
- var type = require('./type.js');
11
+ var object = require('./object.cjs');
12
+ var type = require('./type.cjs');
13
13
 
14
14
  const defaultFieldOptions = { keyField: 'key', childField: 'children', pidField: 'pid' };
15
15
  const defaultSearchTreeOptions = {
@@ -431,7 +431,18 @@ function fuzzySearchTree(nodes, filterCondition, options = defaultSearchTreeOpti
431
431
  }
432
432
  return result;
433
433
  }
434
+ var tree = {
435
+ forEachDeep,
436
+ findDeep,
437
+ filterDeep,
438
+ mapDeep,
439
+ searchTreeById,
440
+ formatTree,
441
+ flatTree,
442
+ fuzzySearchTree
443
+ };
434
444
 
445
+ exports.default = tree;
435
446
  exports.filterDeep = filterDeep;
436
447
  exports.findDeep = findDeep;
437
448
  exports.flatTree = flatTree;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -130,9 +130,34 @@ function isEmpty(value) {
130
130
  function isNodeList(value) {
131
131
  return isUndefined(NodeList) ? false : NodeList.prototype.isPrototypeOf(value);
132
132
  }
133
+ var type = {
134
+ typeIs,
135
+ objectHas,
136
+ arrayLike,
137
+ isString,
138
+ isBoolean,
139
+ isSymbol,
140
+ isBigInt,
141
+ isNumber,
142
+ isUndefined,
143
+ isNull,
144
+ isPrimitive,
145
+ isNullOrUnDef,
146
+ isNullish: isNullOrUnDef,
147
+ isObject,
148
+ isArray,
149
+ isFunction,
150
+ isNaN,
151
+ isDate,
152
+ isError,
153
+ isRegExp,
154
+ isJsonString,
155
+ isEmpty,
156
+ isNodeList
157
+ };
133
158
 
134
159
  exports.arrayLike = arrayLike;
135
- exports.default = typeIs;
160
+ exports.default = type;
136
161
  exports.isArray = isArray;
137
162
  exports.isBigInt = isBigInt;
138
163
  exports.isBoolean = isBoolean;
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
11
  /**
12
12
  * 增强型 Unicode/HTML/UTF-8 编码解码工具
@@ -117,5 +117,9 @@ class UnicodeToolkit {
117
117
  return decoded;
118
118
  }
119
119
  }
120
+ var unicodeToolkit = {
121
+ UnicodeToolkit
122
+ };
120
123
 
121
124
  exports.UnicodeToolkit = UnicodeToolkit;
125
+ exports.default = unicodeToolkit;
@@ -1,16 +1,16 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
- var number = require('./number.js');
12
- var random = require('./random.js');
13
- var type = require('./type.js');
11
+ var number = require('./number.cjs');
12
+ var random = require('./random.cjs');
13
+ var type = require('./type.cjs');
14
14
 
15
15
  const padStartWithZero = (str, maxLength = 2) => String(str).padStart(maxLength, '0');
16
16
  let safeNo = 0;
@@ -76,7 +76,13 @@ const uniqueString = (length, pool) => {
76
76
  }
77
77
  return uniqueString;
78
78
  };
79
+ var unique = {
80
+ UNIQUE_NUMBER_SAFE_LENGTH,
81
+ uniqueNumber,
82
+ uniqueString
83
+ };
79
84
 
80
85
  exports.UNIQUE_NUMBER_SAFE_LENGTH = UNIQUE_NUMBER_SAFE_LENGTH;
86
+ exports.default = unique;
81
87
  exports.uniqueNumber = uniqueNumber;
82
88
  exports.uniqueString = uniqueString;
@@ -1,16 +1,16 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
- var type = require('./type.js');
12
- var path = require('./path.js');
13
- var qs = require('./qs.js');
11
+ var type = require('./type.cjs');
12
+ var path = require('./path.cjs');
13
+ var qs = require('./qs.cjs');
14
14
 
15
15
  /**
16
16
  * url 解析
@@ -88,7 +88,14 @@ const urlDelParams = (url, removeKeys) => {
88
88
  removeKeys.forEach(key => delete p.searchParams[key]);
89
89
  return urlStringify(p);
90
90
  };
91
+ var url = {
92
+ urlParse,
93
+ urlStringify,
94
+ urlSetParams,
95
+ urlDelParams
96
+ };
91
97
 
98
+ exports.default = url;
92
99
  exports.urlDelParams = urlDelParams;
93
100
  exports.urlParse = urlParse;
94
101
  exports.urlSetParams = urlSetParams;
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
11
  // 邮箱
12
12
  const EMAIL_REGEX = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
@@ -130,6 +130,24 @@ const DIGIT_RE = /^\d+$/;
130
130
  * @returns {boolean}
131
131
  */
132
132
  const isDigit = value => DIGIT_RE.test(value);
133
+ var validator = {
134
+ EMAIL_REGEX,
135
+ HTTP_URL_REGEX,
136
+ IPV4_REGEX,
137
+ IPV6_REGEX,
138
+ PHONE_REGEX,
139
+ URL_REGEX,
140
+ isDigit,
141
+ isEmail,
142
+ isFloat,
143
+ isIdNo,
144
+ isInteger,
145
+ isIpV4,
146
+ isIpV6,
147
+ isNumerical,
148
+ isPhone,
149
+ isUrl
150
+ };
133
151
 
134
152
  exports.EMAIL_REGEX = EMAIL_REGEX;
135
153
  exports.HTTP_URL_REGEX = HTTP_URL_REGEX;
@@ -137,6 +155,7 @@ exports.IPV4_REGEX = IPV4_REGEX;
137
155
  exports.IPV6_REGEX = IPV6_REGEX;
138
156
  exports.PHONE_REGEX = PHONE_REGEX;
139
157
  exports.URL_REGEX = URL_REGEX;
158
+ exports.default = validator;
140
159
  exports.isDigit = isDigit;
141
160
  exports.isEmail = isEmail;
142
161
  exports.isFloat = isFloat;
@@ -1,14 +1,14 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
- var type = require('./type.js');
11
+ var type = require('./type.cjs');
12
12
 
13
13
  /**
14
14
  * 去除字符串中重复字符
@@ -119,7 +119,15 @@ function executeInScope(code, scope = {}) {
119
119
  throw new Error(`代码执行失败: ${error.message}`);
120
120
  }
121
121
  }
122
+ var variable = {
123
+ escapeRegExp,
124
+ executeInScope,
125
+ parseVarFromString,
126
+ replaceVarFromString,
127
+ uniqueSymbol
128
+ };
122
129
 
130
+ exports.default = variable;
123
131
  exports.escapeRegExp = escapeRegExp;
124
132
  exports.executeInScope = executeInScope;
125
133
  exports.parseVarFromString = parseVarFromString;
@@ -1,14 +1,14 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
- var type = require('./type.js');
11
+ var type = require('./type.cjs');
12
12
 
13
13
  /*
14
14
  * @created: Saturday, 2020-04-18 14:38:23
@@ -102,5 +102,9 @@ function genCanvasWM(content = '请勿外传', canvasWM) {
102
102
  mo.observe(container, { attributes: true, subtree: true, childList: true });
103
103
  }
104
104
  }
105
+ var watermark = {
106
+ genCanvasWM
107
+ };
105
108
 
109
+ exports.default = watermark;
106
110
  exports.genCanvasWM = genCanvasWM;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -162,5 +162,12 @@ function diffArray(source, target, getKey) {
162
162
  }
163
163
  return { added, removed: del };
164
164
  }
165
+ var array = {
166
+ arrayEach,
167
+ arrayEachAsync,
168
+ arrayInsertBefore,
169
+ arrayRemove,
170
+ diffArray
171
+ };
165
172
 
166
- export { arrayEach, arrayEachAsync, arrayInsertBefore, arrayRemove, diffArray };
173
+ export { arrayEach, arrayEachAsync, arrayInsertBefore, arrayRemove, array as default, diffArray };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -84,5 +84,10 @@ function safeAwait(promise, errorExt) {
84
84
  return [err, undefined];
85
85
  });
86
86
  }
87
+ var async = {
88
+ wait,
89
+ asyncMap,
90
+ safeAwait
91
+ };
87
92
 
88
- export { asyncMap, safeAwait, wait };
93
+ export { asyncMap, async as default, safeAwait, wait };
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
- import { getGlobal } from './func.js';
8
- import { isNullOrUnDef } from './type.js';
7
+ import { getGlobal } from './func.mjs';
8
+ import { isNullOrUnDef } from './type.mjs';
9
9
 
10
10
  const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
11
11
  // eslint-disable-next-line
@@ -118,5 +118,11 @@ function b64encode(rawStr) {
118
118
  // 将二进制字符串转换为base64编码的字符串
119
119
  return !isNullOrUnDef(getGlobal('btoa')) ? getGlobal('btoa')(binaryString) : weBtoa(binaryString);
120
120
  }
121
+ var base64 = {
122
+ weBtoa,
123
+ weAtob,
124
+ b64decode,
125
+ b64encode
126
+ };
121
127
 
122
- export { b64decode, b64encode, weAtob, weBtoa };
128
+ export { b64decode, b64encode, base64 as default, weAtob, weBtoa };
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
- import { select } from './dom.js';
8
- import { isNullOrUnDef, isFunction } from './type.js';
7
+ import { select } from './dom.mjs';
8
+ import { isNullOrUnDef, isFunction } from './type.mjs';
9
9
 
10
10
  /**
11
11
  * 复制文本,优先使用navigator.clipboard,仅在安全上下文(HTTPS/localhost)下生效,若不支持则回退使用execCommand方式
@@ -86,5 +86,9 @@ function createFakeElement(value) {
86
86
  fakeElement.value = value;
87
87
  return fakeElement;
88
88
  }
89
+ var clipboard = {
90
+ copyText,
91
+ fallbackCopyText
92
+ };
89
93
 
90
- export { copyText, fallbackCopyText };
94
+ export { copyText, clipboard as default, fallbackCopyText };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -110,5 +110,8 @@ function cloneDeep(source, map = new WeakMap()) {
110
110
  }
111
111
  return copy;
112
112
  }
113
+ var cloneDeep_default = {
114
+ cloneDeep
115
+ };
113
116
 
114
- export { cloneDeep };
117
+ export { cloneDeep, cloneDeep_default as default };