sculp-js 1.13.2 → 1.13.3-beta.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 (70) hide show
  1. package/dist/cjs/_virtual/_commonjsHelpers.js +1 -1
  2. package/dist/cjs/array.js +1 -1
  3. package/dist/cjs/async.js +1 -1
  4. package/dist/cjs/base64.js +1 -1
  5. package/dist/cjs/clipboard.js +4 -2
  6. package/dist/cjs/cloneDeep.js +1 -1
  7. package/dist/cjs/cookie.js +1 -1
  8. package/dist/cjs/date.js +1 -1
  9. package/dist/cjs/dom.js +1 -1
  10. package/dist/cjs/download.js +4 -2
  11. package/dist/cjs/easing.js +1 -1
  12. package/dist/cjs/file.js +7 -3
  13. package/dist/cjs/func.js +1 -1
  14. package/dist/cjs/index.js +2 -1
  15. package/dist/cjs/math.js +1 -1
  16. package/dist/cjs/node_modules/bezier-easing/src/index.js +1 -1
  17. package/dist/cjs/number.js +1 -1
  18. package/dist/cjs/object.js +1 -1
  19. package/dist/cjs/path.js +1 -1
  20. package/dist/cjs/qs.js +1 -1
  21. package/dist/cjs/random.js +1 -1
  22. package/dist/cjs/string.js +1 -1
  23. package/dist/cjs/tooltip.js +5 -2
  24. package/dist/cjs/tree.js +9 -8
  25. package/dist/cjs/type.js +8 -1
  26. package/dist/cjs/unique.js +1 -1
  27. package/dist/cjs/url.js +1 -1
  28. package/dist/cjs/validator.js +1 -1
  29. package/dist/cjs/variable.js +1 -1
  30. package/dist/cjs/watermark.js +4 -2
  31. package/dist/esm/array.js +1 -1
  32. package/dist/esm/async.js +1 -1
  33. package/dist/esm/base64.js +1 -1
  34. package/dist/esm/clipboard.js +4 -2
  35. package/dist/esm/cloneDeep.js +1 -1
  36. package/dist/esm/cookie.js +1 -1
  37. package/dist/esm/date.js +1 -1
  38. package/dist/esm/dom.js +1 -1
  39. package/dist/esm/download.js +4 -2
  40. package/dist/esm/easing.js +1 -1
  41. package/dist/esm/file.js +7 -3
  42. package/dist/esm/func.js +1 -1
  43. package/dist/esm/index.js +2 -2
  44. package/dist/esm/math.js +1 -1
  45. package/dist/esm/number.js +1 -1
  46. package/dist/esm/object.js +1 -1
  47. package/dist/esm/path.js +1 -1
  48. package/dist/esm/qs.js +1 -1
  49. package/dist/esm/random.js +1 -1
  50. package/dist/esm/string.js +1 -1
  51. package/dist/esm/tooltip.js +5 -2
  52. package/dist/esm/tree.js +10 -9
  53. package/dist/esm/type.js +8 -2
  54. package/dist/esm/unique.js +1 -1
  55. package/dist/esm/url.js +1 -1
  56. package/dist/esm/validator.js +1 -1
  57. package/dist/esm/variable.js +1 -1
  58. package/dist/esm/watermark.js +4 -2
  59. package/dist/types/clipboard.d.ts.map +1 -1
  60. package/dist/types/download.d.ts.map +1 -1
  61. package/dist/types/file.d.ts.map +1 -1
  62. package/dist/types/index.js +34 -14
  63. package/dist/types/tooltip.d.ts.map +1 -1
  64. package/dist/types/tree.d.ts +2 -1
  65. package/dist/types/tree.d.ts.map +1 -1
  66. package/dist/types/type.d.ts +4 -0
  67. package/dist/types/type.d.ts.map +1 -1
  68. package/dist/types/watermark.d.ts.map +1 -1
  69. package/dist/umd/index.min.js +2 -2
  70. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/dist/cjs/array.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/dist/cjs/async.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -42,7 +42,7 @@ function copyText(text, options) {
42
42
  */
43
43
  function fallbackCopyText(text, options) {
44
44
  const { successCallback = void 0, failCallback = void 0, container = document.body } = type.isNullOrUnDef(options) ? {} : options;
45
- const textEl = createFakeElement(text);
45
+ let textEl = createFakeElement(text);
46
46
  container.appendChild(textEl);
47
47
  dom.select(textEl);
48
48
  try {
@@ -58,6 +58,8 @@ function fallbackCopyText(text, options) {
58
58
  }
59
59
  finally {
60
60
  container.removeChild(textEl);
61
+ // @ts-ignore
62
+ textEl = null;
61
63
  window.getSelection()?.removeAllRanges(); // 清除选区
62
64
  }
63
65
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/dist/cjs/date.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/dist/cjs/dom.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -24,7 +24,7 @@ function downloadURL(url$1, params) {
24
24
  * @param {Function} callback
25
25
  */
26
26
  function downloadHref(href, filename, callback) {
27
- const eleLink = document.createElement('a');
27
+ let eleLink = document.createElement('a');
28
28
  eleLink.download = filename;
29
29
  eleLink.style.display = 'none';
30
30
  eleLink.href = href;
@@ -32,6 +32,8 @@ function downloadHref(href, filename, callback) {
32
32
  eleLink.click();
33
33
  setTimeout(() => {
34
34
  document.body.removeChild(eleLink);
35
+ // @ts-ignore
36
+ eleLink = null;
35
37
  if (type.isFunction(callback)) {
36
38
  callback();
37
39
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/dist/cjs/file.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -22,7 +22,7 @@ function supportCanvas() {
22
22
  * @returns {HTMLInputElement}
23
23
  */
24
24
  function chooseLocalFile(accept, changeCb) {
25
- const inputObj = document.createElement('input');
25
+ let inputObj = document.createElement('input');
26
26
  inputObj.setAttribute('id', String(Date.now()));
27
27
  inputObj.setAttribute('type', 'file');
28
28
  inputObj.setAttribute('style', 'visibility:hidden');
@@ -32,7 +32,11 @@ function chooseLocalFile(accept, changeCb) {
32
32
  // @ts-ignore
33
33
  inputObj.onchange = (e) => {
34
34
  changeCb(e.target.files);
35
- setTimeout(() => document.body.removeChild(inputObj));
35
+ setTimeout(() => {
36
+ document.body.removeChild(inputObj);
37
+ // @ts-ignore
38
+ inputObj = null;
39
+ });
36
40
  };
37
41
  }
38
42
  /**
package/dist/cjs/func.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/dist/cjs/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -100,6 +100,7 @@ exports.isError = type.isError;
100
100
  exports.isFunction = type.isFunction;
101
101
  exports.isJsonString = type.isJsonString;
102
102
  exports.isNaN = type.isNaN;
103
+ exports.isNodeList = type.isNodeList;
103
104
  exports.isNull = type.isNull;
104
105
  exports.isNullOrUnDef = type.isNullOrUnDef;
105
106
  exports.isNullish = type.isNullOrUnDef;
package/dist/cjs/math.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/dist/cjs/path.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/dist/cjs/qs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -115,9 +115,12 @@ function mouseenter($customTitle, title, e) {
115
115
  * @returns {*}
116
116
  */
117
117
  function handleMouseLeave(rootContainer = '#root') {
118
- const rootEl = type.isString(rootContainer) ? document.querySelector(rootContainer) : rootContainer, titleEl = document.querySelector('#customTitle1494304949567');
118
+ const rootEl = type.isString(rootContainer) ? document.querySelector(rootContainer) : rootContainer;
119
+ let titleEl = document.querySelector('#customTitle1494304949567');
119
120
  if (rootEl && titleEl) {
120
121
  rootEl.removeChild(titleEl);
122
+ // @ts-ignore
123
+ titleEl = null;
121
124
  }
122
125
  }
123
126
  const tooltipEvent = { handleMouseEnter, handleMouseLeave };
package/dist/cjs/tree.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -17,7 +17,7 @@ const defaultSearchTreeOptions = {
17
17
  ignoreCase: true
18
18
  };
19
19
  /**
20
- * 树遍历函数(支持continue和break操作), 可用于insert tree item remove tree item
20
+ * 树遍历函数(支持continue和break操作), 可用于遍历ArrayNodeList类型的数据
21
21
  * @param {ArrayLike<V>} tree 树形数据
22
22
  * @param {Function} iterator 迭代函数, 返回值为true时continue, 返回值为false时break
23
23
  * @param {options} options 支持定制子元素名称、反向遍历、广度优先遍历,默认{
@@ -30,9 +30,10 @@ const defaultSearchTreeOptions = {
30
30
  function forEachDeep(tree, iterator, options = {
31
31
  childField: 'children',
32
32
  reverse: false,
33
- breadthFirst: false
33
+ breadthFirst: false,
34
+ isDomNode: false
34
35
  }) {
35
- const { childField = 'children', reverse = false, breadthFirst = false } = type.isObject(options) ? options : {};
36
+ const { childField = 'children', reverse = false, breadthFirst = false, isDomNode = false } = type.isObject(options) ? options : {};
36
37
  let isBreak = false;
37
38
  const queue = [];
38
39
  const walk = (arr, parent, level = 0) => {
@@ -55,7 +56,7 @@ function forEachDeep(tree, iterator, options = {
55
56
  else if (re === true) {
56
57
  continue;
57
58
  }
58
- if (item && Array.isArray(item[childField])) {
59
+ if (item && (isDomNode ? type.isNodeList(item[childField]) : Array.isArray(item[childField]))) {
59
60
  walk(item[childField], item, level + 1);
60
61
  }
61
62
  }
@@ -73,7 +74,7 @@ function forEachDeep(tree, iterator, options = {
73
74
  else if (re === true) {
74
75
  continue;
75
76
  }
76
- if (item && Array.isArray(item[childField])) {
77
+ if (item && (isDomNode ? type.isNodeList(item[childField]) : Array.isArray(item[childField]))) {
77
78
  walk(item[childField], item, level + 1);
78
79
  }
79
80
  }
@@ -99,7 +100,7 @@ function forEachDeep(tree, iterator, options = {
99
100
  else if (re === true) {
100
101
  continue;
101
102
  }
102
- if (item && Array.isArray(item[childField])) {
103
+ if (item && (isDomNode ? type.isNodeList(item[childField]) : Array.isArray(item[childField]))) {
103
104
  walk(item[childField], item, level + 1);
104
105
  }
105
106
  }
@@ -118,7 +119,7 @@ function forEachDeep(tree, iterator, options = {
118
119
  else if (re === true) {
119
120
  continue;
120
121
  }
121
- if (item && Array.isArray(item[childField])) {
122
+ if (item && (isDomNode ? type.isNodeList(item[childField]) : Array.isArray(item[childField]))) {
122
123
  walk(item[childField], item, level + 1);
123
124
  }
124
125
  }
package/dist/cjs/type.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -128,6 +128,12 @@ function isEmpty(value) {
128
128
  }
129
129
  return !Object.keys(value).length;
130
130
  }
131
+ /**
132
+ * Checks if `value` is an NodeList object
133
+ */
134
+ function isNodeList(value) {
135
+ return isUndefined(NodeList) ? false : NodeList.prototype.isPrototypeOf(value);
136
+ }
131
137
 
132
138
  exports.arrayLike = arrayLike;
133
139
  exports.default = typeIs;
@@ -140,6 +146,7 @@ exports.isError = isError;
140
146
  exports.isFunction = isFunction;
141
147
  exports.isJsonString = isJsonString;
142
148
  exports.isNaN = isNaN;
149
+ exports.isNodeList = isNodeList;
143
150
  exports.isNull = isNull;
144
151
  exports.isNullOrUnDef = isNullOrUnDef;
145
152
  exports.isNullish = isNullOrUnDef;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/dist/cjs/url.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -62,7 +62,7 @@ function genCanvasWM(content = '请勿外传', canvasWM) {
62
62
  const MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
63
63
  if (MutationObserver) {
64
64
  let mo = new MutationObserver(function () {
65
- const __wm = document.querySelector(`#${watermarkId}`); // 只在__wm元素变动才重新调用 __canvasWM
65
+ let __wm = document.querySelector(`#${watermarkId}`); // 只在__wm元素变动才重新调用 __canvasWM
66
66
  if (!__wm) {
67
67
  // 避免一直触发
68
68
  // console.log('regenerate watermark by delete::')
@@ -80,6 +80,8 @@ function genCanvasWM(content = '请勿外传', canvasWM) {
80
80
  mo.disconnect();
81
81
  mo = null;
82
82
  container.removeChild(__wm);
83
+ // @ts-ignore
84
+ __wm = null;
83
85
  genCanvasWM(content, canvasWM);
84
86
  }
85
87
  }
package/dist/esm/array.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/dist/esm/async.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -40,7 +40,7 @@ function copyText(text, options) {
40
40
  */
41
41
  function fallbackCopyText(text, options) {
42
42
  const { successCallback = void 0, failCallback = void 0, container = document.body } = isNullOrUnDef(options) ? {} : options;
43
- const textEl = createFakeElement(text);
43
+ let textEl = createFakeElement(text);
44
44
  container.appendChild(textEl);
45
45
  select(textEl);
46
46
  try {
@@ -56,6 +56,8 @@ function fallbackCopyText(text, options) {
56
56
  }
57
57
  finally {
58
58
  container.removeChild(textEl);
59
+ // @ts-ignore
60
+ textEl = null;
59
61
  window.getSelection()?.removeAllRanges(); // 清除选区
60
62
  }
61
63
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/dist/esm/date.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/dist/esm/dom.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -22,7 +22,7 @@ function downloadURL(url, params) {
22
22
  * @param {Function} callback
23
23
  */
24
24
  function downloadHref(href, filename, callback) {
25
- const eleLink = document.createElement('a');
25
+ let eleLink = document.createElement('a');
26
26
  eleLink.download = filename;
27
27
  eleLink.style.display = 'none';
28
28
  eleLink.href = href;
@@ -30,6 +30,8 @@ function downloadHref(href, filename, callback) {
30
30
  eleLink.click();
31
31
  setTimeout(() => {
32
32
  document.body.removeChild(eleLink);
33
+ // @ts-ignore
34
+ eleLink = null;
33
35
  if (isFunction(callback)) {
34
36
  callback();
35
37
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/dist/esm/file.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -20,7 +20,7 @@ function supportCanvas() {
20
20
  * @returns {HTMLInputElement}
21
21
  */
22
22
  function chooseLocalFile(accept, changeCb) {
23
- const inputObj = document.createElement('input');
23
+ let inputObj = document.createElement('input');
24
24
  inputObj.setAttribute('id', String(Date.now()));
25
25
  inputObj.setAttribute('type', 'file');
26
26
  inputObj.setAttribute('style', 'visibility:hidden');
@@ -30,7 +30,11 @@ function chooseLocalFile(accept, changeCb) {
30
30
  // @ts-ignore
31
31
  inputObj.onchange = (e) => {
32
32
  changeCb(e.target.files);
33
- setTimeout(() => document.body.removeChild(inputObj));
33
+ setTimeout(() => {
34
+ document.body.removeChild(inputObj);
35
+ // @ts-ignore
36
+ inputObj = null;
37
+ });
34
38
  };
35
39
  }
36
40
  /**
package/dist/esm/func.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/dist/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -14,7 +14,7 @@ export { isPlainObject, objectAssign, objectEach, objectEachAsync, objectFill, o
14
14
  export { pathJoin, pathNormalize } from './path.js';
15
15
  export { qsParse, qsStringify } from './qs.js';
16
16
  export { STRING_ARABIC_NUMERALS, STRING_LOWERCASE_ALPHA, STRING_UPPERCASE_ALPHA, parseQueryParams, stringAssign, stringCamelCase, stringEscapeHtml, stringFill, stringFormat, stringKebabCase } from './string.js';
17
- export { arrayLike, isArray, isBigInt, isBoolean, isDate, isEmpty, isError, isFunction, isJsonString, isNaN, isNull, isNullOrUnDef, isNullOrUnDef as isNullish, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isUndefined, objectHas, typeIs } from './type.js';
17
+ export { arrayLike, isArray, isBigInt, isBoolean, isDate, isEmpty, isError, isFunction, isJsonString, isNaN, isNodeList, isNull, isNullOrUnDef, isNullOrUnDef as isNullish, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isUndefined, objectHas, typeIs } from './type.js';
18
18
  export { urlDelParams, urlParse, urlSetParams, urlStringify } from './url.js';
19
19
  export { asyncMap, safeAwait, wait } from './async.js';
20
20
  export { chooseLocalFile, compressImg, supportCanvas } from './file.js';
package/dist/esm/math.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/dist/esm/path.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
package/dist/esm/qs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * sculp-js v1.13.2
2
+ * sculp-js v1.13.3-beta.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */