@oscarpalmer/toretto 0.45.0 → 0.46.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/get.attribute.d.mts +2 -0
- package/dist/attribute/get.attribute.mjs +1 -0
- package/dist/attribute/index.d.mts +6 -0
- package/dist/attribute/set.attribute.d.mts +5 -0
- package/dist/create.d.mts +2 -0
- package/dist/data.d.mts +4 -0
- package/dist/event/index.d.mts +9 -1
- package/dist/event/index.mjs +2 -0
- package/dist/find/index.d.mts +14 -1
- package/dist/find/index.mjs +36 -1
- package/dist/find/relative.d.mts +5 -0
- package/dist/find/relative.mjs +1 -0
- package/dist/focusable.d.mts +4 -0
- package/dist/focusable.mjs +4 -0
- package/dist/html/index.d.mts +3 -0
- package/dist/html/index.mjs +1 -0
- package/dist/index.d.mts +90 -8
- package/dist/index.mjs +116 -10
- package/dist/internal/is.d.mts +13 -1
- package/dist/internal/is.mjs +13 -1
- package/dist/is.d.mts +5 -2
- package/dist/is.mjs +3 -2
- package/dist/models.d.mts +1 -8
- package/dist/property/get.property.d.mts +2 -0
- package/dist/property/get.property.mjs +2 -0
- package/dist/property/set.property.d.mts +3 -0
- package/dist/property/set.property.mjs +1 -0
- package/dist/style.d.mts +7 -0
- package/dist/style.mjs +5 -0
- package/dist/touch.d.mts +4 -0
- package/package.json +6 -6
- package/src/attribute/get.attribute.ts +2 -0
- package/src/attribute/index.ts +6 -0
- package/src/attribute/set.attribute.ts +5 -0
- package/src/create.ts +2 -0
- package/src/data.ts +4 -0
- package/src/event/index.ts +10 -1
- package/src/find/index.ts +64 -1
- package/src/find/relative.ts +5 -0
- package/src/focusable.ts +4 -0
- package/src/html/index.ts +4 -0
- package/src/internal/is.ts +20 -0
- package/src/is.ts +4 -1
- package/src/models.ts +0 -8
- package/src/property/get.property.ts +2 -0
- package/src/property/set.property.ts +3 -0
- package/src/style.ts +7 -0
- package/src/touch.ts +4 -0
|
@@ -27,6 +27,7 @@ type SetProperties<Target extends Element> = {
|
|
|
27
27
|
* Set the values of one or more properties on an element
|
|
28
28
|
*
|
|
29
29
|
* Also updates attributes for boolean/dispatchable properties, and if `dispatch` is `true`, will dispatch events for dispatchable properties
|
|
30
|
+
*
|
|
30
31
|
* @param target Target element
|
|
31
32
|
* @param properties Properties to set
|
|
32
33
|
* @param dispatch Dispatch events for properties? _(defaults to `true`)_
|
|
@@ -52,6 +53,7 @@ export function setProperties<Target extends Element>(
|
|
|
52
53
|
|
|
53
54
|
/**
|
|
54
55
|
* Set the value for a dispatchable property on an element
|
|
56
|
+
*
|
|
55
57
|
* @param target Target element
|
|
56
58
|
* @param property Property to set
|
|
57
59
|
* @param value Value to set
|
|
@@ -66,6 +68,7 @@ export function setProperty<Target extends Element, Property extends DispatchedA
|
|
|
66
68
|
|
|
67
69
|
/**
|
|
68
70
|
* Set the value for a property on an element
|
|
71
|
+
*
|
|
69
72
|
* @param target Target element
|
|
70
73
|
* @param property Property to set
|
|
71
74
|
* @param value Value to set
|
package/src/style.ts
CHANGED
|
@@ -33,6 +33,7 @@ type Variables<
|
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
* Get a style from an element
|
|
36
|
+
*
|
|
36
37
|
* @param element Element to get the style from
|
|
37
38
|
* @param property Style name
|
|
38
39
|
* @param computed Get the computed style? _(defaults to `false`)_
|
|
@@ -50,6 +51,7 @@ export function getStyle(
|
|
|
50
51
|
|
|
51
52
|
/**
|
|
52
53
|
* Get styles from an element
|
|
54
|
+
*
|
|
53
55
|
* @param element Element to get the styles from
|
|
54
56
|
* @param properties Styles to get
|
|
55
57
|
* @param computed Get the computed styles? _(defaults to `false`)_
|
|
@@ -81,6 +83,7 @@ export function getStyles<Property extends keyof CSSStyleValues>(
|
|
|
81
83
|
|
|
82
84
|
/**
|
|
83
85
|
* Get the text direction of a node or element _(or document, if element is invalid)_
|
|
86
|
+
*
|
|
84
87
|
* @param node Node or element to get the text direction from
|
|
85
88
|
* @returns Text direction
|
|
86
89
|
*/
|
|
@@ -88,6 +91,7 @@ export function getTextDirection(node: Element | Node): TextDirection;
|
|
|
88
91
|
|
|
89
92
|
/**
|
|
90
93
|
* Get the text direction of the document
|
|
94
|
+
*
|
|
91
95
|
* @returns Text direction
|
|
92
96
|
*/
|
|
93
97
|
export function getTextDirection(): TextDirection;
|
|
@@ -115,6 +119,7 @@ export function getTextDirection(node?: Element | Node): TextDirection {
|
|
|
115
119
|
|
|
116
120
|
/**
|
|
117
121
|
* Set a style on an element
|
|
122
|
+
*
|
|
118
123
|
* @param element Element to set the style on
|
|
119
124
|
* @param property Style name
|
|
120
125
|
* @param value Style value
|
|
@@ -125,6 +130,7 @@ export function setStyle(element: Element, property: keyof CSSStyleValues, value
|
|
|
125
130
|
|
|
126
131
|
/**
|
|
127
132
|
* Set styles on an element
|
|
133
|
+
*
|
|
128
134
|
* @param element Element to set the styles on
|
|
129
135
|
* @param styles Styles to set
|
|
130
136
|
*/
|
|
@@ -134,6 +140,7 @@ export function setStyles(element: Element, styles: Styles): void {
|
|
|
134
140
|
|
|
135
141
|
/**
|
|
136
142
|
* Toggle styles for an element
|
|
143
|
+
*
|
|
137
144
|
* @param element Element to style
|
|
138
145
|
* @param styles Styles to be set or removed
|
|
139
146
|
* @returns Style toggler
|
package/src/touch.ts
CHANGED
|
@@ -11,10 +11,14 @@ type SupporsTouch = {
|
|
|
11
11
|
readonly value: boolean;
|
|
12
12
|
/**
|
|
13
13
|
* Are touch events supported?
|
|
14
|
+
*
|
|
15
|
+
* @returns `true` if touch events are supported, otherwise `false`
|
|
14
16
|
*/
|
|
15
17
|
get(): boolean;
|
|
16
18
|
/**
|
|
17
19
|
* Re-evaluate if touch events are supported
|
|
20
|
+
*
|
|
21
|
+
* @returns `true` if touch events are supported, otherwise `false`
|
|
18
22
|
*/
|
|
19
23
|
update(): boolean;
|
|
20
24
|
};
|