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
package/dist/cjs/path.cjs 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
  '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;
package/dist/cjs/qs.cjs 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
  '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
  var object = require('./object.cjs');
12
12
  var type = require('./type.cjs');
@@ -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,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
  '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
  var string = require('./string.cjs');
12
12
  var type = require('./type.cjs');
@@ -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.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
  '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,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
  '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
  var dom = require('./dom.cjs');
12
12
  var type = require('./type.cjs');
@@ -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;
package/dist/cjs/tree.cjs 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
  '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
  var object = require('./object.cjs');
12
12
  var type = require('./type.cjs');
@@ -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;
package/dist/cjs/type.cjs 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
  */
@@ -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.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
  '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,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
  '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
  var number = require('./number.cjs');
12
12
  var random = require('./random.cjs');
@@ -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;
package/dist/cjs/url.cjs 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
  '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
  var type = require('./type.cjs');
12
12
  var path = require('./path.cjs');
@@ -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.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
  '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,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
  '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
  var type = require('./type.cjs');
12
12
 
@@ -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,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
  '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
  var type = require('./type.cjs');
12
12
 
@@ -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.3
2
+ * sculp-js v1.19.1
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.3
2
+ * sculp-js v1.19.1
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,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
  */
@@ -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,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
  */
@@ -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.3
2
+ * sculp-js v1.19.1
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 };
@@ -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
  */
@@ -52,5 +52,10 @@ function cookieSet(name, value, maxAge) {
52
52
  * @param name cookie 名称
53
53
  */
54
54
  const cookieDel = name => cookieSet(name, '', -1);
55
+ var cookie = {
56
+ cookieSet,
57
+ cookieGet,
58
+ cookieDel
59
+ };
55
60
 
56
- export { cookieDel, cookieGet, cookieSet };
61
+ export { cookieDel, cookieGet, cookieSet, cookie as default };
package/dist/esm/date.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
  */
@@ -208,5 +208,23 @@ function calculateDateTime(originDateTime, n, dateSep = '-', timeSep = ':') {
208
208
  String(targetDateTime.getSeconds()).padStart(2, '0')
209
209
  );
210
210
  }
211
+ var date = {
212
+ isValidDate,
213
+ dateParse,
214
+ dateToStart,
215
+ dateToEnd,
216
+ formatDate,
217
+ calculateDate,
218
+ calculateDateTime
219
+ };
211
220
 
212
- export { calculateDate, calculateDateTime, dateParse, dateToEnd, dateToStart, formatDate, isValidDate };
221
+ export {
222
+ calculateDate,
223
+ calculateDateTime,
224
+ dateParse,
225
+ dateToEnd,
226
+ dateToStart,
227
+ date as default,
228
+ formatDate,
229
+ isValidDate
230
+ };
package/dist/esm/dom.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
  */
@@ -146,5 +146,25 @@ function select(element) {
146
146
  }
147
147
  return selectedText;
148
148
  }
149
+ var dom = {
150
+ hasClass,
151
+ addClass,
152
+ removeClass,
153
+ setStyle,
154
+ getStyle,
155
+ getComputedCssVal,
156
+ getStrWidthPx,
157
+ select
158
+ };
149
159
 
150
- export { addClass, getComputedCssVal, getStrWidthPx, getStyle, hasClass, removeClass, select, setStyle };
160
+ export {
161
+ addClass,
162
+ dom as default,
163
+ getComputedCssVal,
164
+ getStrWidthPx,
165
+ getStyle,
166
+ hasClass,
167
+ removeClass,
168
+ select,
169
+ setStyle
170
+ };
@@ -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
  */
@@ -127,5 +127,12 @@ function downloadData(data, fileType, filename, headers) {
127
127
  downloadHref(href, filename);
128
128
  }
129
129
  }
130
+ var download = {
131
+ downloadURL,
132
+ downloadHref,
133
+ downloadBlob,
134
+ crossOriginDownload,
135
+ downloadData
136
+ };
130
137
 
131
- export { crossOriginDownload, downloadBlob, downloadData, downloadHref, downloadURL };
138
+ export { crossOriginDownload, download as default, downloadBlob, downloadData, downloadHref, downloadURL };
package/dist/esm/file.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
  */
@@ -204,5 +204,10 @@ function compressImg(file, options = { mime: 'image/jpeg', minFileSizeKB: 50 })
204
204
  }
205
205
  return Promise.resolve(null);
206
206
  }
207
+ var file = {
208
+ supportCanvas,
209
+ chooseLocalFile,
210
+ compressImg
211
+ };
207
212
 
208
- export { chooseLocalFile, compressImg, supportCanvas };
213
+ export { chooseLocalFile, compressImg, file as default, supportCanvas };
package/dist/esm/func.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
  */
@@ -109,5 +109,12 @@ function getGlobal(key) {
109
109
  else if (typeof global !== 'undefined') return global[key];
110
110
  else if (typeof self !== 'undefined') return self[key];
111
111
  }
112
+ var func = {
113
+ debounce,
114
+ throttle,
115
+ once,
116
+ getGlobal,
117
+ setGlobal
118
+ };
112
119
 
113
- export { debounce, getGlobal, once, setGlobal, throttle };
120
+ export { debounce, func as default, getGlobal, once, setGlobal, throttle };