@studiometa/js-toolkit 2.0.0-beta.9 → 2.0.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.
- package/Base/index.cjs +284 -0
- package/Base/index.d.ts +36 -28
- package/Base/index.js +113 -197
- package/Base/managers/ChildrenManager.cjs +146 -0
- package/Base/managers/ChildrenManager.d.ts +11 -3
- package/Base/managers/ChildrenManager.js +60 -59
- package/Base/managers/EventsManager.cjs +183 -0
- package/Base/managers/EventsManager.d.ts +13 -20
- package/Base/managers/EventsManager.js +72 -112
- package/Base/managers/OptionsManager.cjs +173 -0
- package/Base/managers/OptionsManager.d.ts +20 -13
- package/Base/managers/OptionsManager.js +60 -91
- package/Base/managers/RefsManager.cjs +99 -0
- package/Base/managers/RefsManager.d.ts +4 -4
- package/Base/managers/RefsManager.js +28 -38
- package/Base/managers/ServicesManager.cjs +134 -0
- package/Base/managers/ServicesManager.d.ts +14 -8
- package/Base/managers/ServicesManager.js +42 -67
- package/Base/utils.cjs +41 -0
- package/Base/utils.d.ts +4 -4
- package/Base/utils.js +12 -11
- package/decorators/index.cjs +45 -0
- package/decorators/index.d.ts +1 -0
- package/decorators/index.js +20 -8
- package/decorators/withBreakpointManager.cjs +84 -0
- package/decorators/withBreakpointManager.d.ts +2 -2
- package/decorators/withBreakpointManager.js +18 -40
- package/decorators/withBreakpointObserver.cjs +114 -0
- package/decorators/withBreakpointObserver.d.ts +1 -1
- package/decorators/withBreakpointObserver.js +45 -88
- package/decorators/withDrag.cjs +53 -0
- package/decorators/withDrag.d.ts +1 -1
- package/decorators/withDrag.js +24 -26
- package/decorators/withExtraConfig.cjs +43 -0
- package/decorators/withExtraConfig.d.ts +1 -1
- package/decorators/withExtraConfig.js +17 -12
- package/decorators/withFreezedOptions.cjs +37 -0
- package/decorators/withFreezedOptions.d.ts +14 -0
- package/decorators/withFreezedOptions.js +15 -0
- package/decorators/withIntersectionObserver.cjs +61 -0
- package/decorators/withIntersectionObserver.d.ts +1 -1
- package/decorators/withIntersectionObserver.js +29 -33
- package/decorators/withMountWhenInView.cjs +68 -0
- package/decorators/withMountWhenInView.d.ts +1 -1
- package/decorators/withMountWhenInView.js +31 -53
- package/decorators/withScrolledInView.cjs +114 -0
- package/decorators/withScrolledInView.d.ts +1 -1
- package/decorators/withScrolledInView.js +35 -39
- package/decorators/withVue2.cjs +61 -0
- package/decorators/withVue2.js +27 -32
- package/helpers/createApp.cjs +52 -0
- package/helpers/createApp.d.ts +3 -26
- package/helpers/createApp.js +12 -12
- package/helpers/getInstanceFromElement.cjs +32 -0
- package/helpers/getInstanceFromElement.d.ts +14 -0
- package/helpers/getInstanceFromElement.js +10 -0
- package/helpers/importOnInteraction.cjs +52 -0
- package/helpers/importOnInteraction.d.ts +3 -5
- package/helpers/importOnInteraction.js +17 -18
- package/helpers/importWhenIdle.cjs +49 -0
- package/helpers/importWhenIdle.d.ts +3 -5
- package/helpers/importWhenIdle.js +14 -17
- package/helpers/importWhenVisible.cjs +50 -0
- package/helpers/importWhenVisible.d.ts +4 -6
- package/helpers/importWhenVisible.js +16 -18
- package/helpers/index.cjs +37 -0
- package/helpers/index.d.ts +1 -0
- package/helpers/index.js +12 -4
- package/helpers/utils.cjs +35 -0
- package/helpers/utils.d.ts +3 -4
- package/helpers/utils.js +7 -6
- package/index.cjs +33 -0
- package/index.js +7 -4
- package/package.json +14 -4
- package/services/Service.cjs +76 -0
- package/services/Service.d.ts +9 -9
- package/services/Service.js +19 -32
- package/services/drag.cjs +212 -0
- package/services/drag.d.ts +3 -2
- package/services/drag.js +64 -69
- package/services/index.cjs +41 -0
- package/services/index.js +16 -7
- package/services/key.cjs +104 -0
- package/services/key.d.ts +1 -1
- package/services/key.js +28 -36
- package/services/load.cjs +72 -0
- package/services/load.d.ts +1 -1
- package/services/load.js +17 -19
- package/services/pointer.cjs +162 -0
- package/services/pointer.d.ts +1 -1
- package/services/pointer.js +43 -60
- package/services/raf.cjs +83 -0
- package/services/raf.d.ts +1 -1
- package/services/raf.js +20 -28
- package/services/resize.cjs +108 -0
- package/services/resize.d.ts +1 -1
- package/services/resize.js +33 -42
- package/services/scroll.cjs +131 -0
- package/services/scroll.d.ts +1 -1
- package/services/scroll.js +26 -35
- package/utils/collide/boundingRectToCircle.cjs +34 -0
- package/utils/collide/boundingRectToCircle.d.ts +6 -6
- package/utils/collide/boundingRectToCircle.js +7 -10
- package/utils/collide/collideCircleCircle.cjs +34 -0
- package/utils/collide/collideCircleCircle.d.ts +4 -4
- package/utils/collide/collideCircleCircle.js +8 -7
- package/utils/collide/collideCircleRect.cjs +46 -0
- package/utils/collide/collideCircleRect.d.ts +8 -8
- package/utils/collide/collideCircleRect.js +10 -12
- package/utils/collide/collidePointCircle.cjs +31 -0
- package/utils/collide/collidePointCircle.d.ts +6 -6
- package/utils/collide/collidePointCircle.js +8 -5
- package/utils/collide/collidePointRect.cjs +28 -0
- package/utils/collide/collidePointRect.d.ts +7 -7
- package/utils/collide/collidePointRect.js +5 -2
- package/utils/collide/collideRectRect.cjs +28 -0
- package/utils/collide/collideRectRect.d.ts +5 -5
- package/utils/collide/collideRectRect.js +5 -2
- package/utils/collide/index.cjs +39 -0
- package/utils/collide/index.js +14 -6
- package/utils/css/classes.cjs +47 -0
- package/utils/css/classes.d.ts +13 -12
- package/utils/css/classes.js +19 -15
- package/utils/css/index.cjs +38 -0
- package/utils/css/index.d.ts +2 -2
- package/utils/css/index.js +13 -6
- package/utils/css/matrix.cjs +30 -0
- package/utils/css/matrix.d.ts +14 -15
- package/utils/css/matrix.js +7 -5
- package/utils/css/styles.cjs +44 -0
- package/utils/css/styles.d.ts +8 -20
- package/utils/css/styles.js +12 -12
- package/utils/css/transition.cjs +120 -0
- package/utils/css/transition.d.ts +15 -9
- package/utils/css/transition.js +70 -119
- package/utils/debounce.cjs +34 -0
- package/utils/debounce.d.ts +4 -4
- package/utils/debounce.js +7 -9
- package/utils/focusTrap.cjs +82 -0
- package/utils/focusTrap.d.ts +1 -0
- package/utils/focusTrap.js +31 -22
- package/utils/history.cjs +89 -0
- package/utils/history.d.ts +13 -11
- package/utils/history.js +28 -57
- package/utils/index.cjs +54 -0
- package/utils/index.d.ts +4 -1
- package/utils/index.js +32 -11
- package/utils/keyCodes.cjs +35 -0
- package/utils/keyCodes.js +5 -2
- package/utils/math/clamp.cjs +28 -0
- package/utils/math/clamp.d.ts +1 -1
- package/utils/math/clamp.js +5 -2
- package/utils/math/clamp01.cjs +32 -0
- package/utils/math/clamp01.d.ts +1 -1
- package/utils/math/clamp01.js +6 -3
- package/utils/math/damp.cjs +28 -0
- package/utils/math/damp.d.ts +6 -6
- package/utils/math/damp.js +5 -4
- package/utils/math/ease.cjs +88 -0
- package/utils/math/ease.d.ts +7 -7
- package/utils/math/ease.js +50 -25
- package/utils/math/index.cjs +43 -0
- package/utils/math/index.js +17 -8
- package/utils/math/inertiaFinalValue.cjs +37 -0
- package/utils/math/inertiaFinalValue.d.ts +5 -5
- package/utils/math/inertiaFinalValue.js +8 -10
- package/utils/math/lerp.cjs +28 -0
- package/utils/math/lerp.d.ts +4 -4
- package/utils/math/lerp.js +5 -2
- package/utils/math/map.cjs +28 -0
- package/utils/math/map.d.ts +6 -6
- package/utils/math/map.js +5 -2
- package/utils/math/round.cjs +28 -0
- package/utils/math/round.d.ts +4 -4
- package/utils/math/round.js +5 -3
- package/utils/memoize.cjs +43 -0
- package/utils/memoize.d.ts +1 -1
- package/utils/memoize.js +10 -19
- package/utils/nextFrame.cjs +38 -0
- package/utils/nextFrame.d.ts +6 -6
- package/utils/nextFrame.js +13 -10
- package/utils/nextMicrotask.cjs +28 -0
- package/utils/nextMicrotask.d.ts +8 -0
- package/utils/nextMicrotask.js +6 -0
- package/utils/nextTick.cjs +30 -0
- package/utils/nextTick.d.ts +8 -0
- package/utils/nextTick.js +8 -0
- package/utils/object/autoBind.cjs +49 -0
- package/utils/object/autoBind.d.ts +3 -3
- package/utils/object/autoBind.js +12 -22
- package/utils/object/getAllProperties.cjs +37 -0
- package/utils/object/getAllProperties.d.ts +3 -3
- package/utils/object/getAllProperties.js +10 -13
- package/utils/object/index.cjs +33 -0
- package/utils/object/index.js +8 -3
- package/utils/object/isObject.cjs +28 -0
- package/utils/object/isObject.d.ts +1 -1
- package/utils/object/isObject.js +6 -3
- package/utils/scrollTo.cjs +80 -0
- package/utils/scrollTo.d.ts +1 -1
- package/utils/scrollTo.js +20 -40
- package/utils/string/index.cjs +47 -0
- package/utils/string/index.js +22 -10
- package/utils/string/withLeadingCharacters.cjs +32 -0
- package/utils/string/withLeadingCharacters.d.ts +3 -2
- package/utils/string/withLeadingCharacters.js +7 -4
- package/utils/string/withLeadingSlash.cjs +32 -0
- package/utils/string/withLeadingSlash.d.ts +1 -1
- package/utils/string/withLeadingSlash.js +7 -4
- package/utils/string/withTrailingCharacters.cjs +32 -0
- package/utils/string/withTrailingCharacters.d.ts +3 -2
- package/utils/string/withTrailingCharacters.js +7 -4
- package/utils/string/withTrailingSlash.cjs +32 -0
- package/utils/string/withTrailingSlash.d.ts +1 -1
- package/utils/string/withTrailingSlash.js +7 -4
- package/utils/string/withoutLeadingCharacters.cjs +28 -0
- package/utils/string/withoutLeadingCharacters.d.ts +3 -2
- package/utils/string/withoutLeadingCharacters.js +6 -3
- package/utils/string/withoutLeadingCharactersRecursive.cjs +37 -0
- package/utils/string/withoutLeadingCharactersRecursive.d.ts +3 -2
- package/utils/string/withoutLeadingCharactersRecursive.js +8 -7
- package/utils/string/withoutLeadingSlash.cjs +32 -0
- package/utils/string/withoutLeadingSlash.d.ts +1 -1
- package/utils/string/withoutLeadingSlash.js +7 -4
- package/utils/string/withoutTrailingCharacters.cjs +28 -0
- package/utils/string/withoutTrailingCharacters.d.ts +3 -2
- package/utils/string/withoutTrailingCharacters.js +6 -3
- package/utils/string/withoutTrailingCharactersRecursive.cjs +37 -0
- package/utils/string/withoutTrailingCharactersRecursive.d.ts +3 -2
- package/utils/string/withoutTrailingCharactersRecursive.js +8 -7
- package/utils/string/withoutTrailingSlash.cjs +32 -0
- package/utils/string/withoutTrailingSlash.d.ts +1 -1
- package/utils/string/withoutTrailingSlash.js +7 -4
- package/utils/throttle.cjs +36 -0
- package/utils/throttle.d.ts +3 -3
- package/utils/throttle.js +9 -9
- package/index.modern.js +0 -1
- package/index.umd.js +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// packages/js-toolkit/utils/collide/collidePointCircle.js
|
|
20
|
+
var collidePointCircle_exports = {};
|
|
21
|
+
__export(collidePointCircle_exports, {
|
|
22
|
+
default: () => collidePointCircle
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(collidePointCircle_exports);
|
|
25
|
+
function collidePointCircle(point, circle) {
|
|
26
|
+
const distX = point.x - circle.x;
|
|
27
|
+
const distY = point.y - circle.y;
|
|
28
|
+
const distance = Math.sqrt(distX * distX + distY * distY);
|
|
29
|
+
return distance <= circle.radius;
|
|
30
|
+
}
|
|
31
|
+
if (module.exports.default) module.exports = module.exports.default;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @typedef {Object} Point
|
|
3
|
-
* @property {
|
|
4
|
-
* @property {
|
|
3
|
+
* @property {number} x Point's x position
|
|
4
|
+
* @property {number} y Point's y position
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
7
|
* @typedef {Object} Circle
|
|
8
|
-
* @property {
|
|
9
|
-
* @property {
|
|
10
|
-
* @property {
|
|
8
|
+
* @property {number} x Circle's x position
|
|
9
|
+
* @property {number} y Circle's y position
|
|
10
|
+
* @property {number} radius Circle's radius
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
13
|
* Test if a point is inside a circle.
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*
|
|
16
16
|
* @param {Point} point Point
|
|
17
17
|
* @param {Circle} circle Circle
|
|
18
|
-
* @
|
|
18
|
+
* @returns {boolean} Is the point inside the circle's bounds ?
|
|
19
19
|
*/
|
|
20
20
|
export default function collidePointCircle(point: Point, circle: Circle): boolean;
|
|
21
21
|
export type Point = {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
function collidePointCircle(point, circle) {
|
|
2
|
+
const distX = point.x - circle.x;
|
|
3
|
+
const distY = point.y - circle.y;
|
|
4
|
+
const distance = Math.sqrt(distX * distX + distY * distY);
|
|
5
5
|
return distance <= circle.radius;
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
collidePointCircle as default
|
|
9
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// packages/js-toolkit/utils/collide/collidePointRect.js
|
|
20
|
+
var collidePointRect_exports = {};
|
|
21
|
+
__export(collidePointRect_exports, {
|
|
22
|
+
default: () => collidePointRect
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(collidePointRect_exports);
|
|
25
|
+
function collidePointRect(point, rect) {
|
|
26
|
+
return point.x >= rect.x && point.x <= rect.x + rect.width && point.y >= rect.y && point.y <= rect.y + rect.height;
|
|
27
|
+
}
|
|
28
|
+
if (module.exports.default) module.exports = module.exports.default;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @typedef {Object} Point
|
|
3
|
-
* @property {
|
|
4
|
-
* @property {
|
|
3
|
+
* @property {number} x Point's x position
|
|
4
|
+
* @property {number} y Point's y position
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
7
|
* @typedef {Object} Rect
|
|
8
|
-
* @property {
|
|
9
|
-
* @property {
|
|
10
|
-
* @property {
|
|
11
|
-
* @property {
|
|
8
|
+
* @property {number} x Rectangle's x position
|
|
9
|
+
* @property {number} y Rectangle's y position
|
|
10
|
+
* @property {number} width Rectangle's width
|
|
11
|
+
* @property {number} height Rectangle's height
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
14
|
* Test if a point collides with a rectangle.
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*
|
|
17
17
|
* @param {Point} point Point
|
|
18
18
|
* @param {Rect} rect Rectangle
|
|
19
|
-
* @
|
|
19
|
+
* @returns {boolean} Is the point inside the rectangle's bounds ?
|
|
20
20
|
*/
|
|
21
21
|
export default function collidePointRect(point: Point, rect: Rect): boolean;
|
|
22
22
|
export type Point = {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
function collidePointRect(point, rect) {
|
|
2
2
|
return point.x >= rect.x && point.x <= rect.x + rect.width && point.y >= rect.y && point.y <= rect.y + rect.height;
|
|
3
|
-
}
|
|
3
|
+
}
|
|
4
|
+
export {
|
|
5
|
+
collidePointRect as default
|
|
6
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// packages/js-toolkit/utils/collide/collideRectRect.js
|
|
20
|
+
var collideRectRect_exports = {};
|
|
21
|
+
__export(collideRectRect_exports, {
|
|
22
|
+
default: () => collideRectRect
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(collideRectRect_exports);
|
|
25
|
+
function collideRectRect(rect1, rect2) {
|
|
26
|
+
return rect1.x + rect1.width >= rect2.x && rect1.x <= rect2.x + rect2.width && rect1.y + rect1.height >= rect2.y && rect1.y <= rect2.y + rect2.height;
|
|
27
|
+
}
|
|
28
|
+
if (module.exports.default) module.exports = module.exports.default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @typedef {Object} Rect
|
|
3
|
-
* @property {
|
|
4
|
-
* @property {
|
|
5
|
-
* @property {
|
|
6
|
-
* @property {
|
|
3
|
+
* @property {number} x Rectangle's x position
|
|
4
|
+
* @property {number} y Rectangle's y position
|
|
5
|
+
* @property {number} width Rectangle's width
|
|
6
|
+
* @property {number} height Rectangle's height
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* Test if a rectangle collides with another rectangle.
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* @param {Rect} rect1 Rectangle 1
|
|
13
13
|
* @param {Rect} rect2 Rectangle 2
|
|
14
|
-
* @
|
|
14
|
+
* @returns {boolean} Are the sides of one rectangle touching the other ?
|
|
15
15
|
*/
|
|
16
16
|
export default function collideRectRect(rect1: Rect, rect2: Rect): boolean;
|
|
17
17
|
export type Rect = {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
function collideRectRect(rect1, rect2) {
|
|
2
2
|
return rect1.x + rect1.width >= rect2.x && rect1.x <= rect2.x + rect2.width && rect1.y + rect1.height >= rect2.y && rect1.y <= rect2.y + rect2.height;
|
|
3
|
-
}
|
|
3
|
+
}
|
|
4
|
+
export {
|
|
5
|
+
collideRectRect as default
|
|
6
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
|
|
22
|
+
// packages/js-toolkit/utils/collide/index.js
|
|
23
|
+
var collide_exports = {};
|
|
24
|
+
__export(collide_exports, {
|
|
25
|
+
boundingRectToCircle: () => import_boundingRectToCircle.default,
|
|
26
|
+
collideCircleCircle: () => import_collideCircleCircle.default,
|
|
27
|
+
collideCircleRect: () => import_collideCircleRect.default,
|
|
28
|
+
collidePointCircle: () => import_collidePointCircle.default,
|
|
29
|
+
collidePointRect: () => import_collidePointRect.default,
|
|
30
|
+
collideRectRect: () => import_collideRectRect.default
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(collide_exports);
|
|
33
|
+
var import_boundingRectToCircle = __toESM(require("./boundingRectToCircle.cjs"), 1);
|
|
34
|
+
var import_collideCircleCircle = __toESM(require("./collideCircleCircle.cjs"), 1);
|
|
35
|
+
var import_collideCircleRect = __toESM(require("./collideCircleRect.cjs"), 1);
|
|
36
|
+
var import_collidePointCircle = __toESM(require("./collidePointCircle.cjs"), 1);
|
|
37
|
+
var import_collidePointRect = __toESM(require("./collidePointRect.cjs"), 1);
|
|
38
|
+
var import_collideRectRect = __toESM(require("./collideRectRect.cjs"), 1);
|
|
39
|
+
if (module.exports.default) module.exports = module.exports.default;
|
package/utils/collide/index.js
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { default as default2 } from "./boundingRectToCircle.js";
|
|
2
|
+
import { default as default3 } from "./collideCircleCircle.js";
|
|
3
|
+
import { default as default4 } from "./collideCircleRect.js";
|
|
4
|
+
import { default as default5 } from "./collidePointCircle.js";
|
|
5
|
+
import { default as default6 } from "./collidePointRect.js";
|
|
6
|
+
import { default as default7 } from "./collideRectRect.js";
|
|
7
|
+
export {
|
|
8
|
+
default2 as boundingRectToCircle,
|
|
9
|
+
default3 as collideCircleCircle,
|
|
10
|
+
default4 as collideCircleRect,
|
|
11
|
+
default5 as collidePointCircle,
|
|
12
|
+
default6 as collidePointRect,
|
|
13
|
+
default7 as collideRectRect
|
|
14
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// packages/js-toolkit/utils/css/classes.js
|
|
20
|
+
var classes_exports = {};
|
|
21
|
+
__export(classes_exports, {
|
|
22
|
+
add: () => add,
|
|
23
|
+
remove: () => remove,
|
|
24
|
+
toggle: () => toggle
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(classes_exports);
|
|
27
|
+
function setClasses(element, classNames, method, forceToggle) {
|
|
28
|
+
if (!element || !classNames) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const normalizedClassNames = Array.isArray(classNames) ? classNames : classNames.split(" ");
|
|
32
|
+
if (method !== "toggle") {
|
|
33
|
+
element.classList[method](...normalizedClassNames);
|
|
34
|
+
} else {
|
|
35
|
+
normalizedClassNames.forEach((className) => element.classList[method](className, forceToggle));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function add(element, classNames) {
|
|
39
|
+
setClasses(element, classNames, "add");
|
|
40
|
+
}
|
|
41
|
+
function remove(element, classNames) {
|
|
42
|
+
setClasses(element, classNames, "remove");
|
|
43
|
+
}
|
|
44
|
+
function toggle(element, classNames, force) {
|
|
45
|
+
setClasses(element, classNames, "toggle", force);
|
|
46
|
+
}
|
|
47
|
+
if (module.exports.default) module.exports = module.exports.default;
|
package/utils/css/classes.d.ts
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Add class names to an element.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
5
|
-
* @param
|
|
6
|
-
* @
|
|
4
|
+
* @param {HTMLElement} element The element to update.
|
|
5
|
+
* @param {string|string[]} classNames A string of class names.
|
|
6
|
+
* @returns {void}
|
|
7
7
|
*/
|
|
8
|
-
export function add(element: HTMLElement, classNames: string): void;
|
|
8
|
+
export function add(element: HTMLElement, classNames: string | string[]): void;
|
|
9
9
|
/**
|
|
10
10
|
* Remove class names from an element.
|
|
11
11
|
*
|
|
12
|
-
* @param
|
|
13
|
-
* @param
|
|
14
|
-
* @
|
|
12
|
+
* @param {HTMLElement} element The element to update.
|
|
13
|
+
* @param {string|string[]} classNames A string of class names.
|
|
14
|
+
* @returns {void}
|
|
15
15
|
*/
|
|
16
|
-
export function remove(element: HTMLElement, classNames: string): void;
|
|
16
|
+
export function remove(element: HTMLElement, classNames: string | string[]): void;
|
|
17
17
|
/**
|
|
18
18
|
* Toggle class names from an element.
|
|
19
19
|
*
|
|
20
|
-
* @param
|
|
21
|
-
* @param
|
|
22
|
-
* @
|
|
20
|
+
* @param {HTMLElement} element The element to update.
|
|
21
|
+
* @param {string|string[]} classNames A string of class names.
|
|
22
|
+
* @param {boolean} [force] Force toggle?
|
|
23
|
+
* @returns {void}
|
|
23
24
|
*/
|
|
24
|
-
export function toggle(element: HTMLElement, classNames: string): void;
|
|
25
|
+
export function toggle(element: HTMLElement, classNames: string | string[], force?: boolean): void;
|
package/utils/css/classes.js
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
function setClasses(element, classNames) {
|
|
2
|
-
var method = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'add';
|
|
3
|
-
|
|
1
|
+
function setClasses(element, classNames, method, forceToggle) {
|
|
4
2
|
if (!element || !classNames) {
|
|
5
3
|
return;
|
|
6
4
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
element.classList[method](
|
|
10
|
-
}
|
|
5
|
+
const normalizedClassNames = Array.isArray(classNames) ? classNames : classNames.split(" ");
|
|
6
|
+
if (method !== "toggle") {
|
|
7
|
+
element.classList[method](...normalizedClassNames);
|
|
8
|
+
} else {
|
|
9
|
+
normalizedClassNames.forEach((className) => element.classList[method](className, forceToggle));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function add(element, classNames) {
|
|
13
|
+
setClasses(element, classNames, "add");
|
|
11
14
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
setClasses(element, classNames);
|
|
15
|
+
function remove(element, classNames) {
|
|
16
|
+
setClasses(element, classNames, "remove");
|
|
15
17
|
}
|
|
16
|
-
|
|
17
|
-
setClasses(element, classNames,
|
|
18
|
+
function toggle(element, classNames, force) {
|
|
19
|
+
setClasses(element, classNames, "toggle", force);
|
|
18
20
|
}
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
export {
|
|
22
|
+
add,
|
|
23
|
+
remove,
|
|
24
|
+
toggle
|
|
25
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
|
|
22
|
+
// packages/js-toolkit/utils/css/index.js
|
|
23
|
+
var css_exports = {};
|
|
24
|
+
__export(css_exports, {
|
|
25
|
+
addClass: () => import_classes.add,
|
|
26
|
+
addStyle: () => import_styles.add,
|
|
27
|
+
matrix: () => import_matrix.default,
|
|
28
|
+
removeClass: () => import_classes.remove,
|
|
29
|
+
removeStyle: () => import_styles.remove,
|
|
30
|
+
toggleClass: () => import_classes.toggle,
|
|
31
|
+
transition: () => import_transition.default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(css_exports);
|
|
34
|
+
var import_classes = require("./classes.cjs");
|
|
35
|
+
var import_styles = require("./styles.cjs");
|
|
36
|
+
var import_matrix = __toESM(require("./matrix.cjs"), 1);
|
|
37
|
+
var import_transition = __toESM(require("./transition.cjs"), 1);
|
|
38
|
+
if (module.exports.default) module.exports = module.exports.default;
|
package/utils/css/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * as classes from "./classes.js";
|
|
2
|
-
export * as styles from "./styles.js";
|
|
3
1
|
export { default as matrix } from "./matrix.js";
|
|
4
2
|
export { default as transition } from "./transition.js";
|
|
3
|
+
export { add as addClass, remove as removeClass, toggle as toggleClass } from "./classes.js";
|
|
4
|
+
export { add as addStyle, remove as removeStyle } from "./styles.js";
|
package/utils/css/index.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
|
|
1
|
+
import { add, remove, toggle } from "./classes.js";
|
|
2
|
+
import { add as add2, remove as remove2 } from "./styles.js";
|
|
3
|
+
import { default as default2 } from "./matrix.js";
|
|
4
|
+
import { default as default3 } from "./transition.js";
|
|
5
|
+
export {
|
|
6
|
+
add as addClass,
|
|
7
|
+
add2 as addStyle,
|
|
8
|
+
default2 as matrix,
|
|
9
|
+
remove as removeClass,
|
|
10
|
+
remove2 as removeStyle,
|
|
11
|
+
toggle as toggleClass,
|
|
12
|
+
default3 as transition
|
|
13
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// packages/js-toolkit/utils/css/matrix.js
|
|
20
|
+
var matrix_exports = {};
|
|
21
|
+
__export(matrix_exports, {
|
|
22
|
+
default: () => matrix
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(matrix_exports);
|
|
25
|
+
function matrix(transform) {
|
|
26
|
+
var _a, _b, _c, _d, _e, _f;
|
|
27
|
+
transform = transform || {};
|
|
28
|
+
return `matrix(${(_a = transform.scaleX) != null ? _a : 1}, ${(_b = transform.skewY) != null ? _b : 0}, ${(_c = transform.skewX) != null ? _c : 0}, ${(_d = transform.scaleY) != null ? _d : 1}, ${(_e = transform.translateX) != null ? _e : 0}, ${(_f = transform.translateY) != null ? _f : 0})`;
|
|
29
|
+
}
|
|
30
|
+
if (module.exports.default) module.exports = module.exports.default;
|
package/utils/css/matrix.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Format a CSS transform matrix with the given values.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
5
|
-
* @param
|
|
6
|
-
* @param
|
|
7
|
-
* @param
|
|
8
|
-
* @param
|
|
9
|
-
* @param
|
|
10
|
-
* @param
|
|
11
|
-
* @
|
|
12
|
-
*
|
|
4
|
+
* @param {Object} transform
|
|
5
|
+
* @param {number} [transform.scaleX=1] The scale on the x axis.
|
|
6
|
+
* @param {number} [transform.scaleY=1] The scale on the y axis.
|
|
7
|
+
* @param {number} [transform.skewX=0] The skew on the x axis.
|
|
8
|
+
* @param {number} [transform.skewY=0] The skew on the y axis.
|
|
9
|
+
* @param {number} [transform.translateX=0] The translate on the x axis.
|
|
10
|
+
* @param {number} [transform.translateY=0] The translate on the y axis.
|
|
11
|
+
* @returns {string} A formatted CSS matrix transform.
|
|
13
12
|
* @example
|
|
14
13
|
* ```js
|
|
15
14
|
* matrix({ scaleX: 0.5, scaleY: 0.5 });
|
|
@@ -17,10 +16,10 @@
|
|
|
17
16
|
* ```
|
|
18
17
|
*/
|
|
19
18
|
export default function matrix(transform: {
|
|
20
|
-
scaleX?: number
|
|
21
|
-
scaleY?: number
|
|
22
|
-
skewX?: number
|
|
23
|
-
skewY?: number
|
|
24
|
-
translateX?: number
|
|
25
|
-
translateY?: number
|
|
19
|
+
scaleX?: number;
|
|
20
|
+
scaleY?: number;
|
|
21
|
+
skewX?: number;
|
|
22
|
+
skewY?: number;
|
|
23
|
+
translateX?: number;
|
|
24
|
+
translateY?: number;
|
|
26
25
|
}): string;
|
package/utils/css/matrix.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
var
|
|
3
|
-
|
|
1
|
+
function matrix(transform) {
|
|
2
|
+
var _a, _b, _c, _d, _e, _f;
|
|
4
3
|
transform = transform || {};
|
|
5
|
-
return
|
|
6
|
-
}
|
|
4
|
+
return `matrix(${(_a = transform.scaleX) != null ? _a : 1}, ${(_b = transform.skewY) != null ? _b : 0}, ${(_c = transform.skewX) != null ? _c : 0}, ${(_d = transform.scaleY) != null ? _d : 1}, ${(_e = transform.translateX) != null ? _e : 0}, ${(_f = transform.translateY) != null ? _f : 0})`;
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
matrix as default
|
|
8
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
|
|
22
|
+
// packages/js-toolkit/utils/css/styles.js
|
|
23
|
+
var styles_exports = {};
|
|
24
|
+
__export(styles_exports, {
|
|
25
|
+
add: () => add,
|
|
26
|
+
remove: () => remove
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(styles_exports);
|
|
29
|
+
var import_isObject = __toESM(require("../object/isObject.cjs"), 1);
|
|
30
|
+
function setStyles(element, styles, method = "add") {
|
|
31
|
+
if (!element || !styles || !(0, import_isObject.default)(styles)) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
Object.entries(styles).forEach(([prop, value]) => {
|
|
35
|
+
element.style[prop] = method === "add" ? value : "";
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function add(element, styles) {
|
|
39
|
+
setStyles(element, styles);
|
|
40
|
+
}
|
|
41
|
+
function remove(element, styles) {
|
|
42
|
+
setStyles(element, styles, "remove");
|
|
43
|
+
}
|
|
44
|
+
if (module.exports.default) module.exports = module.exports.default;
|
package/utils/css/styles.d.ts
CHANGED
|
@@ -1,28 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {Record<string, string | null> & Partial<CSSStyleDeclaration>} CssStyleObject
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Manage a list of style properties on an element.
|
|
6
|
-
*
|
|
7
|
-
* @param {HTMLElement} element The element to update.
|
|
8
|
-
* @param {CssStyleObject} styles An object of styles properties and values.
|
|
9
|
-
* @param {String} method The method to use: add or remove.
|
|
10
|
-
*/
|
|
11
|
-
export default function setStyles(element: HTMLElement, styles: CssStyleObject, method?: string): void;
|
|
12
1
|
/**
|
|
13
2
|
* Add styles to an element.
|
|
14
3
|
*
|
|
15
|
-
* @param {HTMLElement}
|
|
16
|
-
* @param {
|
|
17
|
-
* @
|
|
4
|
+
* @param {HTMLElement} element The element to update.
|
|
5
|
+
* @param {Partial<CSSStyleDeclaration>} styles A string of class names.
|
|
6
|
+
* @returns {void}
|
|
18
7
|
*/
|
|
19
|
-
export function add(element: HTMLElement, styles:
|
|
8
|
+
export function add(element: HTMLElement, styles: Partial<CSSStyleDeclaration>): void;
|
|
20
9
|
/**
|
|
21
10
|
* Remove class names from an element.
|
|
22
11
|
*
|
|
23
|
-
* @param {HTMLElement}
|
|
24
|
-
* @param {
|
|
25
|
-
* @
|
|
12
|
+
* @param {HTMLElement} element The element to update.
|
|
13
|
+
* @param {Partial<CSSStyleDeclaration>} styles A string of class names.
|
|
14
|
+
* @returns {void}
|
|
26
15
|
*/
|
|
27
|
-
export function remove(element: HTMLElement, styles:
|
|
28
|
-
export type CssStyleObject = Record<string, string | null> & Partial<CSSStyleDeclaration>;
|
|
16
|
+
export function remove(element: HTMLElement, styles: Partial<CSSStyleDeclaration>): void;
|