@oscarpalmer/toretto 0.45.0 → 0.47.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/aria.d.mts +68 -0
- package/dist/aria.mjs +49 -0
- package/dist/attribute/get.attribute.d.mts +3 -0
- package/dist/attribute/get.attribute.mjs +3 -3
- package/dist/attribute/index.d.mts +7 -1
- package/dist/attribute/set.attribute.d.mts +5 -0
- package/dist/attribute/set.attribute.mjs +1 -1
- package/dist/create.d.mts +4 -2
- package/dist/create.mjs +1 -1
- package/dist/data.d.mts +4 -0
- package/dist/data.mjs +1 -2
- package/dist/event/delegation.mjs +3 -4
- package/dist/event/index.d.mts +9 -1
- package/dist/event/index.mjs +3 -2
- 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 +8 -4
- package/dist/html/index.mjs +4 -3
- package/dist/index.d.mts +185 -22
- package/dist/index.mjs +295 -144
- package/dist/internal/attribute.mjs +2 -2
- package/dist/internal/element-value.mjs +2 -4
- package/dist/internal/is.d.mts +15 -3
- package/dist/internal/is.mjs +15 -3
- package/dist/is.d.mts +5 -2
- package/dist/is.mjs +4 -3
- package/dist/models.d.mts +21 -8
- package/dist/property/get.property.d.mts +2 -0
- package/dist/property/get.property.mjs +4 -3
- package/dist/property/set.property.d.mts +3 -0
- package/dist/property/set.property.mjs +3 -4
- package/dist/style.d.mts +7 -0
- package/dist/style.mjs +8 -4
- package/dist/touch.d.mts +4 -0
- package/package.json +10 -6
- package/src/aria.ts +166 -0
- package/src/attribute/get.attribute.ts +5 -3
- package/src/attribute/index.ts +6 -0
- package/src/attribute/set.attribute.ts +5 -0
- package/src/create.ts +5 -3
- package/src/data.ts +11 -6
- package/src/event/delegation.ts +5 -6
- package/src/event/index.ts +11 -8
- 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 +11 -9
- package/src/index.ts +1 -0
- package/src/internal/attribute.ts +4 -2
- package/src/internal/element-value.ts +2 -3
- package/src/internal/is.ts +22 -2
- package/src/is.ts +4 -1
- package/src/models.ts +122 -8
- package/src/property/get.property.ts +6 -5
- package/src/property/set.property.ts +5 -3
- package/src/style.ts +12 -6
- package/src/touch.ts +4 -0
package/dist/focusable.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
//#region src/focusable.ts
|
|
2
2
|
/**
|
|
3
3
|
* Get a list of focusable elements within a parent element
|
|
4
|
+
*
|
|
4
5
|
* @param parent Parent element
|
|
5
6
|
* @returns Focusable elements
|
|
6
7
|
*/
|
|
@@ -15,6 +16,7 @@ function getItem(element, tabbable) {
|
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
18
|
* Get a list of tabbable elements within a parent element
|
|
19
|
+
*
|
|
18
20
|
* @param parent Parent element
|
|
19
21
|
* @returns Tabbable elements
|
|
20
22
|
*/
|
|
@@ -74,6 +76,7 @@ function isEditable(element) {
|
|
|
74
76
|
}
|
|
75
77
|
/**
|
|
76
78
|
* Is the element focusable?
|
|
79
|
+
*
|
|
77
80
|
* @param element Element to check
|
|
78
81
|
* @returns `true` if focusable, otherwise `false`
|
|
79
82
|
*/
|
|
@@ -109,6 +112,7 @@ function isSummarised(item) {
|
|
|
109
112
|
}
|
|
110
113
|
/**
|
|
111
114
|
* Is the element tabbable?
|
|
115
|
+
*
|
|
112
116
|
* @param element Element to check
|
|
113
117
|
* @returns `true` if tabbable, otherwise `false`
|
|
114
118
|
*/
|
package/dist/html/index.d.mts
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
//#region src/html/index.d.ts
|
|
2
2
|
type HtmlOptions = {
|
|
3
3
|
/**
|
|
4
|
-
* Cache template element for the
|
|
4
|
+
* Cache template element for the _HTML_ string? _(defaults to `true`)_
|
|
5
5
|
*/
|
|
6
6
|
cache?: boolean;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Create nodes from a template string
|
|
10
|
+
*
|
|
10
11
|
* @returns Created nodes
|
|
11
12
|
*/
|
|
12
13
|
declare function html(strings: TemplateStringsArray, ...values: unknown[]): Node[];
|
|
13
14
|
/**
|
|
14
|
-
* Create nodes from an
|
|
15
|
-
*
|
|
15
|
+
* Create nodes from an _HTML_ string or a template element
|
|
16
|
+
*
|
|
17
|
+
* @param value _HTML_ string or ID for a template element
|
|
16
18
|
* @param options Options for creating nodes
|
|
17
19
|
* @returns Created nodes
|
|
18
20
|
*/
|
|
19
21
|
declare function html(value: string, options?: HtmlOptions): Node[];
|
|
20
22
|
/**
|
|
21
23
|
* Create nodes from a template element
|
|
24
|
+
*
|
|
22
25
|
* @param template Template element
|
|
23
26
|
* @param options Options for creating nodes
|
|
24
27
|
* @returns Created nodes
|
|
@@ -30,10 +33,11 @@ declare namespace html {
|
|
|
30
33
|
}
|
|
31
34
|
/**
|
|
32
35
|
* Sanitize one or more nodes, recursively
|
|
36
|
+
*
|
|
33
37
|
* @param value Node or nodes to sanitize
|
|
34
38
|
* @param options Sanitization options
|
|
35
39
|
* @returns Sanitized nodes
|
|
36
40
|
*/
|
|
37
41
|
declare function sanitize(value: Node | Node[]): Node[];
|
|
38
42
|
//#endregion
|
|
39
|
-
export { html, sanitize };
|
|
43
|
+
export { HtmlOptions, html, sanitize };
|
package/dist/html/index.mjs
CHANGED
|
@@ -96,8 +96,9 @@ html.clear = () => {
|
|
|
96
96
|
templates.clear();
|
|
97
97
|
};
|
|
98
98
|
/**
|
|
99
|
-
* Remove cached template element for an
|
|
100
|
-
*
|
|
99
|
+
* Remove cached template element for an _HTML_ string or _ID_
|
|
100
|
+
*
|
|
101
|
+
* @param template _HTML_ string or ID for a template element
|
|
101
102
|
*/
|
|
102
103
|
html.remove = (template) => {
|
|
103
104
|
templates.delete(template);
|
|
@@ -120,6 +121,7 @@ function replaceComments(origin, replacements) {
|
|
|
120
121
|
}
|
|
121
122
|
/**
|
|
122
123
|
* Sanitize one or more nodes, recursively
|
|
124
|
+
*
|
|
123
125
|
* @param value Node or nodes to sanitize
|
|
124
126
|
* @param options Sanitization options
|
|
125
127
|
* @returns Sanitized nodes
|
|
@@ -136,6 +138,5 @@ const TEMPLATE_TAG = "template";
|
|
|
136
138
|
const TEMPORARY_ELEMENT = "<toretto-temporary></toretto-temporary>";
|
|
137
139
|
const templates = new SizedMap(128);
|
|
138
140
|
let parser;
|
|
139
|
-
window.templates = templates;
|
|
140
141
|
//#endregion
|
|
141
142
|
export { html, sanitize };
|