@oscarpalmer/toretto 0.30.1 → 0.32.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/dist/attribute/index.js +5 -5
- package/dist/event/delegation.js +21 -28
- package/dist/event/index.js +1 -1
- package/dist/find/index.js +3 -3
- package/dist/find/relative.js +22 -22
- package/dist/html/index.js +11 -8
- package/dist/html/sanitize.js +29 -14
- package/dist/index.js +2 -2
- package/dist/internal/attribute.js +5 -5
- package/dist/is.js +3 -3
- package/dist/style.js +2 -2
- package/dist/toretto.full.js +125 -264
- package/package.json +6 -6
- package/src/attribute/get.ts +4 -12
- package/src/attribute/index.ts +5 -5
- package/src/attribute/set.ts +13 -13
- package/src/data.ts +7 -16
- package/src/event/delegation.ts +24 -52
- package/src/event/index.ts +1 -7
- package/src/find/index.ts +2 -2
- package/src/find/relative.ts +43 -49
- package/src/html/index.ts +13 -12
- package/src/html/sanitize.ts +58 -31
- package/src/internal/attribute.ts +9 -9
- package/src/internal/element-value.ts +3 -4
- package/src/internal/get-value.ts +5 -8
- package/src/internal/is.ts +1 -3
- package/src/is.ts +4 -4
- package/src/models.ts +0 -5
- package/src/style.ts +12 -15
- package/types/attribute/get.d.ts +3 -3
- package/types/attribute/set.d.ts +9 -9
- package/types/data.d.ts +4 -5
- package/types/event/delegation.d.ts +1 -1
- package/types/find/index.d.ts +1 -1
- package/types/find/relative.d.ts +8 -2
- package/types/internal/attribute.d.ts +7 -7
- package/types/internal/element-value.d.ts +2 -3
- package/types/internal/get-value.d.ts +2 -3
- package/types/internal/is.d.ts +1 -2
- package/types/models.d.ts +0 -4
- package/types/style.d.ts +7 -7
package/types/style.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TextDirection } from './models';
|
|
2
2
|
export type StyleToggler = {
|
|
3
3
|
/**
|
|
4
4
|
* Set the provided styles on the element
|
|
@@ -16,7 +16,7 @@ export type StyleToggler = {
|
|
|
16
16
|
* @param computed Get the computed style? _(defaults to `false`)_
|
|
17
17
|
* @returns Style value
|
|
18
18
|
*/
|
|
19
|
-
export declare function getStyle(element:
|
|
19
|
+
export declare function getStyle(element: Element, property: keyof CSSStyleDeclaration, computed?: boolean): string | undefined;
|
|
20
20
|
/**
|
|
21
21
|
* Get styles from an element
|
|
22
22
|
* @param element Element to get the styles from
|
|
@@ -24,31 +24,31 @@ export declare function getStyle(element: HTMLOrSVGElement, property: keyof CSSS
|
|
|
24
24
|
* @param computed Get the computed styles? _(defaults to `false`)_
|
|
25
25
|
* @returns Style values
|
|
26
26
|
*/
|
|
27
|
-
export declare function getStyles<Property extends keyof CSSStyleDeclaration>(element:
|
|
27
|
+
export declare function getStyles<Property extends keyof CSSStyleDeclaration>(element: Element, properties: Property[], computed?: boolean): Record<Property, string | undefined>;
|
|
28
28
|
/**
|
|
29
29
|
* Get the text direction of an element
|
|
30
30
|
* @param element Element to get the text direction from
|
|
31
31
|
* @param computed Get the computed text direction? _(defaults to `false`)_
|
|
32
32
|
* @returns Text direction
|
|
33
33
|
*/
|
|
34
|
-
export declare function getTextDirection(element:
|
|
34
|
+
export declare function getTextDirection(element: Element, computed?: boolean): TextDirection;
|
|
35
35
|
/**
|
|
36
36
|
* Set a style on an element
|
|
37
37
|
* @param element Element to set the style on
|
|
38
38
|
* @param property Style name
|
|
39
39
|
* @param value Style value
|
|
40
40
|
*/
|
|
41
|
-
export declare function setStyle(element:
|
|
41
|
+
export declare function setStyle(element: Element, property: keyof CSSStyleDeclaration, value?: string): void;
|
|
42
42
|
/**
|
|
43
43
|
* Set styles on an element
|
|
44
44
|
* @param element Element to set the styles on
|
|
45
45
|
* @param styles Styles to set
|
|
46
46
|
*/
|
|
47
|
-
export declare function setStyles(element:
|
|
47
|
+
export declare function setStyles(element: Element, styles: Partial<CSSStyleDeclaration>): void;
|
|
48
48
|
/**
|
|
49
49
|
* Toggle styles for an element
|
|
50
50
|
* @param element Element to style
|
|
51
51
|
* @param styles Styles to be set or removed
|
|
52
52
|
* @returns Style toggler
|
|
53
53
|
*/
|
|
54
|
-
export declare function toggleStyles(element:
|
|
54
|
+
export declare function toggleStyles(element: Element, styles: Partial<CSSStyleDeclaration>): StyleToggler;
|