@studiometa/js-toolkit 2.0.0-beta.12 → 2.0.0-beta.13
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.
- package/Base/index.cjs +33 -26
- package/Base/managers/ChildrenManager.cjs +5 -3
- package/Base/managers/EventsManager.cjs +6 -4
- package/Base/managers/OptionsManager.cjs +22 -14
- package/Base/managers/RefsManager.cjs +4 -2
- package/Base/managers/ServicesManager.cjs +13 -11
- package/Base/utils.cjs +2 -0
- package/decorators/index.cjs +10 -8
- package/decorators/withBreakpointManager.cjs +4 -2
- package/decorators/withBreakpointObserver.cjs +3 -1
- package/decorators/withDrag.cjs +3 -1
- package/decorators/withExtraConfig.cjs +2 -0
- package/decorators/withIntersectionObserver.cjs +2 -0
- package/decorators/withMountWhenInView.cjs +2 -0
- package/decorators/withScrolledInView.cjs +4 -2
- package/decorators/withVue2.cjs +2 -0
- package/helpers/createApp.cjs +2 -0
- package/helpers/importOnInteraction.cjs +3 -1
- package/helpers/importWhenIdle.cjs +2 -0
- package/helpers/importWhenVisible.cjs +3 -1
- package/helpers/index.cjs +6 -4
- package/helpers/utils.cjs +3 -1
- package/index.cjs +6 -4
- package/package.json +1 -1
- package/services/Service.cjs +4 -2
- package/services/drag.cjs +11 -9
- package/services/index.cjs +9 -7
- package/services/key.cjs +8 -6
- package/services/load.cjs +7 -5
- package/services/pointer.cjs +7 -5
- package/services/raf.cjs +8 -6
- package/services/resize.cjs +8 -6
- package/services/scroll.cjs +8 -6
- package/utils/collide/boundingRectToCircle.cjs +2 -0
- package/utils/collide/collideCircleCircle.cjs +2 -0
- package/utils/collide/collideCircleRect.cjs +2 -0
- package/utils/collide/collidePointCircle.cjs +2 -0
- package/utils/collide/collidePointRect.cjs +2 -0
- package/utils/collide/collideRectRect.cjs +2 -0
- package/utils/collide/index.cjs +8 -6
- package/utils/css/classes.cjs +2 -0
- package/utils/css/index.cjs +6 -4
- package/utils/css/matrix.cjs +2 -0
- package/utils/css/styles.cjs +3 -1
- package/utils/css/transition.cjs +8 -6
- package/utils/debounce.cjs +2 -0
- package/utils/focusTrap.cjs +5 -3
- package/utils/history.cjs +3 -1
- package/utils/index.cjs +14 -12
- package/utils/keyCodes.cjs +2 -0
- package/utils/math/clamp.cjs +2 -0
- package/utils/math/clamp01.cjs +3 -1
- package/utils/math/damp.cjs +2 -0
- package/utils/math/ease.cjs +16 -14
- package/utils/math/index.cjs +10 -8
- package/utils/math/inertiaFinalValue.cjs +2 -0
- package/utils/math/lerp.cjs +2 -0
- package/utils/math/map.cjs +2 -0
- package/utils/math/round.cjs +2 -0
- package/utils/memoize.cjs +2 -0
- package/utils/nextFrame.cjs +2 -0
- package/utils/object/autoBind.cjs +3 -1
- package/utils/object/getAllProperties.cjs +2 -0
- package/utils/object/index.cjs +5 -3
- package/utils/object/isObject.cjs +2 -0
- package/utils/scrollTo.cjs +3 -1
- package/utils/string/index.cjs +12 -10
- package/utils/string/withLeadingCharacters.cjs +3 -1
- package/utils/string/withLeadingSlash.cjs +3 -1
- package/utils/string/withTrailingCharacters.cjs +3 -1
- package/utils/string/withTrailingSlash.cjs +3 -1
- package/utils/string/withoutLeadingCharacters.cjs +2 -0
- package/utils/string/withoutLeadingCharactersRecursive.cjs +3 -1
- package/utils/string/withoutLeadingSlash.cjs +3 -1
- package/utils/string/withoutTrailingCharacters.cjs +2 -0
- package/utils/string/withoutTrailingCharactersRecursive.cjs +3 -1
- package/utils/string/withoutTrailingSlash.cjs +3 -1
- package/utils/throttle.cjs +2 -0
package/utils/math/ease.cjs
CHANGED
|
@@ -20,6 +20,8 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
20
20
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
21
21
|
};
|
|
22
22
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
23
|
+
|
|
24
|
+
// packages/js-toolkit/utils/math/ease.js
|
|
23
25
|
var ease_exports = {};
|
|
24
26
|
__export(ease_exports, {
|
|
25
27
|
createEaseInOut: () => createEaseInOut,
|
|
@@ -55,36 +57,36 @@ function createEaseInOut(easeIn) {
|
|
|
55
57
|
function easeInQuad(progress) {
|
|
56
58
|
return progress ** 2;
|
|
57
59
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
var easeOutQuad = createEaseOut(easeInQuad);
|
|
61
|
+
var easeInOutQuad = createEaseInOut(easeInQuad);
|
|
60
62
|
function easeInCubic(progress) {
|
|
61
63
|
return progress ** 3;
|
|
62
64
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
var easeOutCubic = createEaseOut(easeInCubic);
|
|
66
|
+
var easeInOutCubic = createEaseInOut(easeInCubic);
|
|
65
67
|
function easeInQuart(progress) {
|
|
66
68
|
return progress ** 4;
|
|
67
69
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
var easeOutQuart = createEaseOut(easeInQuart);
|
|
71
|
+
var easeInOutQuart = createEaseInOut(easeInQuart);
|
|
70
72
|
function easeInQuint(progress) {
|
|
71
73
|
return progress ** 5;
|
|
72
74
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
var easeOutQuint = createEaseOut(easeInQuint);
|
|
76
|
+
var easeInOutQuint = createEaseInOut(easeInQuint);
|
|
75
77
|
function easeInSine(progress) {
|
|
76
78
|
return progress === 1 ? 1 : -Math.cos(progress * Math.PI / 2) + 1;
|
|
77
79
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
+
var easeOutSine = createEaseOut(easeInSine);
|
|
81
|
+
var easeInOutSine = createEaseInOut(easeInSine);
|
|
80
82
|
function easeInCirc(progress) {
|
|
81
83
|
return -(Math.sqrt(1 - progress * progress) - 1);
|
|
82
84
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
+
var easeOutCirc = createEaseOut(easeInCirc);
|
|
86
|
+
var easeInOutCirc = createEaseInOut(easeInCirc);
|
|
85
87
|
function easeInExpo(progress) {
|
|
86
88
|
return 2 ** (10 * (progress - 1));
|
|
87
89
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
var easeOutExpo = createEaseOut(easeInExpo);
|
|
91
|
+
var easeInOutExpo = createEaseInOut(easeInExpo);
|
|
90
92
|
module.exports = __toCommonJS(ease_exports);
|
package/utils/math/index.cjs
CHANGED
|
@@ -25,6 +25,8 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
25
25
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
26
|
};
|
|
27
27
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
|
|
29
|
+
// packages/js-toolkit/utils/math/index.js
|
|
28
30
|
var math_exports = {};
|
|
29
31
|
__export(math_exports, {
|
|
30
32
|
clamp: () => import_clamp.default,
|
|
@@ -35,12 +37,12 @@ __export(math_exports, {
|
|
|
35
37
|
map: () => import_map.default,
|
|
36
38
|
round: () => import_round.default
|
|
37
39
|
});
|
|
38
|
-
var import_clamp = __toESM(require("./clamp.
|
|
39
|
-
var import_clamp01 = __toESM(require("./clamp01.
|
|
40
|
-
var import_damp = __toESM(require("./damp.
|
|
41
|
-
var import_inertiaFinalValue = __toESM(require("./inertiaFinalValue.
|
|
42
|
-
var import_lerp = __toESM(require("./lerp.
|
|
43
|
-
var import_map = __toESM(require("./map.
|
|
44
|
-
var import_round = __toESM(require("./round.
|
|
45
|
-
__reExport(math_exports, require("./ease.
|
|
40
|
+
var import_clamp = __toESM(require("./clamp.cjs"), 1);
|
|
41
|
+
var import_clamp01 = __toESM(require("./clamp01.cjs"), 1);
|
|
42
|
+
var import_damp = __toESM(require("./damp.cjs"), 1);
|
|
43
|
+
var import_inertiaFinalValue = __toESM(require("./inertiaFinalValue.cjs"), 1);
|
|
44
|
+
var import_lerp = __toESM(require("./lerp.cjs"), 1);
|
|
45
|
+
var import_map = __toESM(require("./map.cjs"), 1);
|
|
46
|
+
var import_round = __toESM(require("./round.cjs"), 1);
|
|
47
|
+
__reExport(math_exports, require("./ease.cjs"));
|
|
46
48
|
module.exports = __toCommonJS(math_exports);
|
|
@@ -20,6 +20,8 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
20
20
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
21
21
|
};
|
|
22
22
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
23
|
+
|
|
24
|
+
// packages/js-toolkit/utils/math/inertiaFinalValue.js
|
|
23
25
|
var inertiaFinalValue_exports = {};
|
|
24
26
|
__export(inertiaFinalValue_exports, {
|
|
25
27
|
default: () => inertiaFinalValue
|
package/utils/math/lerp.cjs
CHANGED
|
@@ -20,6 +20,8 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
20
20
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
21
21
|
};
|
|
22
22
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
23
|
+
|
|
24
|
+
// packages/js-toolkit/utils/math/lerp.js
|
|
23
25
|
var lerp_exports = {};
|
|
24
26
|
__export(lerp_exports, {
|
|
25
27
|
default: () => lerp
|
package/utils/math/map.cjs
CHANGED
|
@@ -20,6 +20,8 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
20
20
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
21
21
|
};
|
|
22
22
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
23
|
+
|
|
24
|
+
// packages/js-toolkit/utils/math/map.js
|
|
23
25
|
var map_exports = {};
|
|
24
26
|
__export(map_exports, {
|
|
25
27
|
default: () => map
|
package/utils/math/round.cjs
CHANGED
|
@@ -20,6 +20,8 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
20
20
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
21
21
|
};
|
|
22
22
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
23
|
+
|
|
24
|
+
// packages/js-toolkit/utils/math/round.js
|
|
23
25
|
var round_exports = {};
|
|
24
26
|
__export(round_exports, {
|
|
25
27
|
default: () => round
|
package/utils/memoize.cjs
CHANGED
|
@@ -20,6 +20,8 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
20
20
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
21
21
|
};
|
|
22
22
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
23
|
+
|
|
24
|
+
// packages/js-toolkit/utils/memoize.js
|
|
23
25
|
var memoize_exports = {};
|
|
24
26
|
__export(memoize_exports, {
|
|
25
27
|
default: () => memoize
|
package/utils/nextFrame.cjs
CHANGED
|
@@ -20,6 +20,8 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
20
20
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
21
21
|
};
|
|
22
22
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
23
|
+
|
|
24
|
+
// packages/js-toolkit/utils/nextFrame.js
|
|
23
25
|
var nextFrame_exports = {};
|
|
24
26
|
__export(nextFrame_exports, {
|
|
25
27
|
default: () => nextFrame,
|
|
@@ -25,11 +25,13 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
25
25
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
26
|
};
|
|
27
27
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
|
|
29
|
+
// packages/js-toolkit/utils/object/autoBind.js
|
|
28
30
|
var autoBind_exports = {};
|
|
29
31
|
__export(autoBind_exports, {
|
|
30
32
|
default: () => autoBind
|
|
31
33
|
});
|
|
32
|
-
var import_getAllProperties = __toESM(require("./getAllProperties.
|
|
34
|
+
var import_getAllProperties = __toESM(require("./getAllProperties.cjs"), 1);
|
|
33
35
|
function autoBind(instance, options) {
|
|
34
36
|
const { exclude, include } = options || {};
|
|
35
37
|
const filter = (key) => {
|
|
@@ -20,6 +20,8 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
20
20
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
21
21
|
};
|
|
22
22
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
23
|
+
|
|
24
|
+
// packages/js-toolkit/utils/object/getAllProperties.js
|
|
23
25
|
var getAllProperties_exports = {};
|
|
24
26
|
__export(getAllProperties_exports, {
|
|
25
27
|
default: () => getAllProperties
|
package/utils/object/index.cjs
CHANGED
|
@@ -25,13 +25,15 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
25
25
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
26
|
};
|
|
27
27
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
|
|
29
|
+
// packages/js-toolkit/utils/object/index.js
|
|
28
30
|
var object_exports = {};
|
|
29
31
|
__export(object_exports, {
|
|
30
32
|
autoBind: () => import_autoBind.default,
|
|
31
33
|
getAllProperties: () => import_getAllProperties.default,
|
|
32
34
|
isObject: () => import_isObject.default
|
|
33
35
|
});
|
|
34
|
-
var import_autoBind = __toESM(require("./autoBind.
|
|
35
|
-
var import_getAllProperties = __toESM(require("./getAllProperties.
|
|
36
|
-
var import_isObject = __toESM(require("./isObject.
|
|
36
|
+
var import_autoBind = __toESM(require("./autoBind.cjs"), 1);
|
|
37
|
+
var import_getAllProperties = __toESM(require("./getAllProperties.cjs"), 1);
|
|
38
|
+
var import_isObject = __toESM(require("./isObject.cjs"), 1);
|
|
37
39
|
module.exports = __toCommonJS(object_exports);
|
|
@@ -20,6 +20,8 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
20
20
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
21
21
|
};
|
|
22
22
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
23
|
+
|
|
24
|
+
// packages/js-toolkit/utils/object/isObject.js
|
|
23
25
|
var isObject_exports = {};
|
|
24
26
|
__export(isObject_exports, {
|
|
25
27
|
default: () => isObject
|
package/utils/scrollTo.cjs
CHANGED
|
@@ -25,11 +25,13 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
25
25
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
26
|
};
|
|
27
27
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
|
|
29
|
+
// packages/js-toolkit/utils/scrollTo.js
|
|
28
30
|
var scrollTo_exports = {};
|
|
29
31
|
__export(scrollTo_exports, {
|
|
30
32
|
default: () => scrollTo
|
|
31
33
|
});
|
|
32
|
-
var import_damp = __toESM(require("./math/damp.
|
|
34
|
+
var import_damp = __toESM(require("./math/damp.cjs"), 1);
|
|
33
35
|
function scrollTo(selectorElement, { offset = 0, dampFactor = 0.2 } = {}) {
|
|
34
36
|
let targetElement = null;
|
|
35
37
|
if (selectorElement instanceof HTMLElement) {
|
package/utils/string/index.cjs
CHANGED
|
@@ -25,6 +25,8 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
25
25
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
26
|
};
|
|
27
27
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
|
|
29
|
+
// packages/js-toolkit/utils/string/index.js
|
|
28
30
|
var string_exports = {};
|
|
29
31
|
__export(string_exports, {
|
|
30
32
|
withLeadingCharacters: () => import_withLeadingCharacters.default,
|
|
@@ -38,14 +40,14 @@ __export(string_exports, {
|
|
|
38
40
|
withoutTrailingCharactersRecursive: () => import_withoutTrailingCharactersRecursive.default,
|
|
39
41
|
withoutTrailingSlash: () => import_withoutTrailingSlash.default
|
|
40
42
|
});
|
|
41
|
-
var import_withLeadingCharacters = __toESM(require("./withLeadingCharacters.
|
|
42
|
-
var import_withLeadingSlash = __toESM(require("./withLeadingSlash.
|
|
43
|
-
var import_withoutLeadingCharacters = __toESM(require("./withoutLeadingCharacters.
|
|
44
|
-
var import_withoutLeadingCharactersRecursive = __toESM(require("./withoutLeadingCharactersRecursive.
|
|
45
|
-
var import_withoutLeadingSlash = __toESM(require("./withoutLeadingSlash.
|
|
46
|
-
var import_withoutTrailingCharacters = __toESM(require("./withoutTrailingCharacters.
|
|
47
|
-
var import_withoutTrailingCharactersRecursive = __toESM(require("./withoutTrailingCharactersRecursive.
|
|
48
|
-
var import_withoutTrailingSlash = __toESM(require("./withoutTrailingSlash.
|
|
49
|
-
var import_withTrailingCharacters = __toESM(require("./withTrailingCharacters.
|
|
50
|
-
var import_withTrailingSlash = __toESM(require("./withTrailingSlash.
|
|
43
|
+
var import_withLeadingCharacters = __toESM(require("./withLeadingCharacters.cjs"), 1);
|
|
44
|
+
var import_withLeadingSlash = __toESM(require("./withLeadingSlash.cjs"), 1);
|
|
45
|
+
var import_withoutLeadingCharacters = __toESM(require("./withoutLeadingCharacters.cjs"), 1);
|
|
46
|
+
var import_withoutLeadingCharactersRecursive = __toESM(require("./withoutLeadingCharactersRecursive.cjs"), 1);
|
|
47
|
+
var import_withoutLeadingSlash = __toESM(require("./withoutLeadingSlash.cjs"), 1);
|
|
48
|
+
var import_withoutTrailingCharacters = __toESM(require("./withoutTrailingCharacters.cjs"), 1);
|
|
49
|
+
var import_withoutTrailingCharactersRecursive = __toESM(require("./withoutTrailingCharactersRecursive.cjs"), 1);
|
|
50
|
+
var import_withoutTrailingSlash = __toESM(require("./withoutTrailingSlash.cjs"), 1);
|
|
51
|
+
var import_withTrailingCharacters = __toESM(require("./withTrailingCharacters.cjs"), 1);
|
|
52
|
+
var import_withTrailingSlash = __toESM(require("./withTrailingSlash.cjs"), 1);
|
|
51
53
|
module.exports = __toCommonJS(string_exports);
|
|
@@ -25,11 +25,13 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
25
25
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
26
|
};
|
|
27
27
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
|
|
29
|
+
// packages/js-toolkit/utils/string/withLeadingCharacters.js
|
|
28
30
|
var withLeadingCharacters_exports = {};
|
|
29
31
|
__export(withLeadingCharacters_exports, {
|
|
30
32
|
default: () => withLeadingCharacters
|
|
31
33
|
});
|
|
32
|
-
var import_withoutLeadingCharacters = __toESM(require("./withoutLeadingCharacters.
|
|
34
|
+
var import_withoutLeadingCharacters = __toESM(require("./withoutLeadingCharacters.cjs"), 1);
|
|
33
35
|
function withLeadingCharacters(string, characters) {
|
|
34
36
|
return `${characters}${(0, import_withoutLeadingCharacters.default)(string, characters)}`;
|
|
35
37
|
}
|
|
@@ -25,11 +25,13 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
25
25
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
26
|
};
|
|
27
27
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
|
|
29
|
+
// packages/js-toolkit/utils/string/withLeadingSlash.js
|
|
28
30
|
var withLeadingSlash_exports = {};
|
|
29
31
|
__export(withLeadingSlash_exports, {
|
|
30
32
|
default: () => withLeadingSlash
|
|
31
33
|
});
|
|
32
|
-
var import_withLeadingCharacters = __toESM(require("./withLeadingCharacters.
|
|
34
|
+
var import_withLeadingCharacters = __toESM(require("./withLeadingCharacters.cjs"), 1);
|
|
33
35
|
function withLeadingSlash(string) {
|
|
34
36
|
return (0, import_withLeadingCharacters.default)(string, "/");
|
|
35
37
|
}
|
|
@@ -25,11 +25,13 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
25
25
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
26
|
};
|
|
27
27
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
|
|
29
|
+
// packages/js-toolkit/utils/string/withTrailingCharacters.js
|
|
28
30
|
var withTrailingCharacters_exports = {};
|
|
29
31
|
__export(withTrailingCharacters_exports, {
|
|
30
32
|
default: () => withTrailingCharacters
|
|
31
33
|
});
|
|
32
|
-
var import_withoutTrailingCharacters = __toESM(require("./withoutTrailingCharacters.
|
|
34
|
+
var import_withoutTrailingCharacters = __toESM(require("./withoutTrailingCharacters.cjs"), 1);
|
|
33
35
|
function withTrailingCharacters(string, characters) {
|
|
34
36
|
return `${(0, import_withoutTrailingCharacters.default)(string, characters)}${characters}`;
|
|
35
37
|
}
|
|
@@ -25,11 +25,13 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
25
25
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
26
|
};
|
|
27
27
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
|
|
29
|
+
// packages/js-toolkit/utils/string/withTrailingSlash.js
|
|
28
30
|
var withTrailingSlash_exports = {};
|
|
29
31
|
__export(withTrailingSlash_exports, {
|
|
30
32
|
default: () => withTrailingSlash
|
|
31
33
|
});
|
|
32
|
-
var import_withTrailingCharacters = __toESM(require("./withTrailingCharacters.
|
|
34
|
+
var import_withTrailingCharacters = __toESM(require("./withTrailingCharacters.cjs"), 1);
|
|
33
35
|
function withTrailingSlash(string) {
|
|
34
36
|
return (0, import_withTrailingCharacters.default)(string, "/");
|
|
35
37
|
}
|
|
@@ -20,6 +20,8 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
20
20
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
21
21
|
};
|
|
22
22
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
23
|
+
|
|
24
|
+
// packages/js-toolkit/utils/string/withoutLeadingCharacters.js
|
|
23
25
|
var withoutLeadingCharacters_exports = {};
|
|
24
26
|
__export(withoutLeadingCharacters_exports, {
|
|
25
27
|
default: () => withoutLeadingCharacters
|
|
@@ -25,11 +25,13 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
25
25
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
26
|
};
|
|
27
27
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
|
|
29
|
+
// packages/js-toolkit/utils/string/withoutLeadingCharactersRecursive.js
|
|
28
30
|
var withoutLeadingCharactersRecursive_exports = {};
|
|
29
31
|
__export(withoutLeadingCharactersRecursive_exports, {
|
|
30
32
|
default: () => withoutLeadingCharactersRecursive
|
|
31
33
|
});
|
|
32
|
-
var import_withoutLeadingCharacters = __toESM(require("./withoutLeadingCharacters.
|
|
34
|
+
var import_withoutLeadingCharacters = __toESM(require("./withoutLeadingCharacters.cjs"), 1);
|
|
33
35
|
function withoutLeadingCharactersRecursive(string, characters) {
|
|
34
36
|
let str = (0, import_withoutLeadingCharacters.default)(string, characters);
|
|
35
37
|
const regex = new RegExp(`^${characters}`);
|
|
@@ -25,11 +25,13 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
25
25
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
26
|
};
|
|
27
27
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
|
|
29
|
+
// packages/js-toolkit/utils/string/withoutLeadingSlash.js
|
|
28
30
|
var withoutLeadingSlash_exports = {};
|
|
29
31
|
__export(withoutLeadingSlash_exports, {
|
|
30
32
|
default: () => withoutLeadingSlash
|
|
31
33
|
});
|
|
32
|
-
var import_withoutLeadingCharacters = __toESM(require("./withoutLeadingCharacters.
|
|
34
|
+
var import_withoutLeadingCharacters = __toESM(require("./withoutLeadingCharacters.cjs"), 1);
|
|
33
35
|
function withoutLeadingSlash(string) {
|
|
34
36
|
return (0, import_withoutLeadingCharacters.default)(string, "/");
|
|
35
37
|
}
|
|
@@ -20,6 +20,8 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
20
20
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
21
21
|
};
|
|
22
22
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
23
|
+
|
|
24
|
+
// packages/js-toolkit/utils/string/withoutTrailingCharacters.js
|
|
23
25
|
var withoutTrailingCharacters_exports = {};
|
|
24
26
|
__export(withoutTrailingCharacters_exports, {
|
|
25
27
|
default: () => withoutTrailingCharacters
|
|
@@ -25,11 +25,13 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
25
25
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
26
|
};
|
|
27
27
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
|
|
29
|
+
// packages/js-toolkit/utils/string/withoutTrailingCharactersRecursive.js
|
|
28
30
|
var withoutTrailingCharactersRecursive_exports = {};
|
|
29
31
|
__export(withoutTrailingCharactersRecursive_exports, {
|
|
30
32
|
default: () => withoutTrailingCharactersRecursive
|
|
31
33
|
});
|
|
32
|
-
var import_withoutTrailingCharacters = __toESM(require("./withoutTrailingCharacters.
|
|
34
|
+
var import_withoutTrailingCharacters = __toESM(require("./withoutTrailingCharacters.cjs"), 1);
|
|
33
35
|
function withoutTrailingCharactersRecursive(string, characters) {
|
|
34
36
|
let str = (0, import_withoutTrailingCharacters.default)(string, characters);
|
|
35
37
|
const regex = new RegExp(`${characters}$`);
|
|
@@ -25,11 +25,13 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
25
25
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
26
|
};
|
|
27
27
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
|
|
29
|
+
// packages/js-toolkit/utils/string/withoutTrailingSlash.js
|
|
28
30
|
var withoutTrailingSlash_exports = {};
|
|
29
31
|
__export(withoutTrailingSlash_exports, {
|
|
30
32
|
default: () => withoutTrailingSlash
|
|
31
33
|
});
|
|
32
|
-
var import_withoutTrailingCharacters = __toESM(require("./withoutTrailingCharacters.
|
|
34
|
+
var import_withoutTrailingCharacters = __toESM(require("./withoutTrailingCharacters.cjs"), 1);
|
|
33
35
|
function withoutTrailingSlash(string) {
|
|
34
36
|
return (0, import_withoutTrailingCharacters.default)(string, "/");
|
|
35
37
|
}
|
package/utils/throttle.cjs
CHANGED
|
@@ -20,6 +20,8 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
20
20
|
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
21
21
|
};
|
|
22
22
|
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
23
|
+
|
|
24
|
+
// packages/js-toolkit/utils/throttle.js
|
|
23
25
|
var throttle_exports = {};
|
|
24
26
|
__export(throttle_exports, {
|
|
25
27
|
default: () => throttle
|