keyframekit 1.0.7 → 1.0.9
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/LICENSE +21 -21
- package/README.md +129 -126
- package/dist/KeyframeKit.d.ts +138 -138
- package/dist/KeyframeKit.js +293 -293
- package/docs/.vitepress/components/Playground/Playground.js +242 -242
- package/docs/.vitepress/components/Playground/Playground.vue +206 -206
- package/docs/.vitepress/components/Playground/defaultExample.js +175 -175
- package/docs/.vitepress/components/Playground/interFont.js +14 -14
- package/docs/.vitepress/components/Playground/themes/githubDark.js +401 -401
- package/docs/.vitepress/components/Playground/themes/githubLight.js +398 -398
- package/docs/.vitepress/components/Playground/themes.js +24 -24
- package/docs/.vitepress/config.ts +84 -69
- package/docs/.vitepress/referenceNavigation.ts +37 -37
- package/docs/.vitepress/theme/base-styles.css +100 -91
- package/docs/.vitepress/theme/env.d.ts +5 -5
- package/docs/.vitepress/theme/index.ts +39 -39
- package/docs/docs/index.md +142 -141
- package/docs/docs/public/playground/KeyframeKit/dist/KeyframeKit.d.ts +138 -138
- package/docs/docs/public/playground/KeyframeKit/dist/KeyframeKit.js +293 -293
- package/docs/docs/reference/_media/LICENSE +21 -21
- package/docs/docs/reference/classes/KeyframeEffectParameters.md +95 -95
- package/docs/docs/reference/classes/ParsedKeyframes.md +49 -49
- package/docs/docs/reference/index.md +20 -20
- package/docs/docs/reference/interfaces/KeyframesFactory.md +151 -151
- package/docs/docs/reference/navigation.json +63 -63
- package/docs/docs/reference/type-aliases/KeyframeArgument.md +9 -9
- package/docs/docs/reference/type-aliases/KeyframesFactorySource.md +9 -9
- package/docs/docs/reference/type-aliases/ParsedKeyframesRules.md +15 -15
- package/docs/docs/reference/variables/default.md +7 -7
- package/docs/package.json +25 -25
- package/docs/typedoc/plugin-param-names.js +51 -51
- package/docs/typedoc.json +62 -62
- package/package.json +37 -37
- package/src/KeyframeKit.ts +508 -508
- package/tsconfig.json +47 -47
- package/vercel.json +12 -12
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
[KeyframeKit](../index.md) / KeyframeEffectParameters
|
|
2
|
-
|
|
3
|
-
# Class: KeyframeEffectParameters
|
|
4
|
-
|
|
5
|
-
https://drafts.csswg.org/web-animations-1/#the-keyframeeffect-interface
|
|
6
|
-
|
|
7
|
-
## Constructors
|
|
8
|
-
|
|
9
|
-
### Constructor
|
|
10
|
-
|
|
11
|
-
```ts
|
|
12
|
-
new KeyframeEffectParameters(obj: {
|
|
13
|
-
keyframes: KeyframeArgument;
|
|
14
|
-
options?: number | KeyframeEffectOptions;
|
|
15
|
-
}): KeyframeEffectParameters;
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
#### Parameters
|
|
19
|
-
|
|
20
|
-
##### obj
|
|
21
|
-
|
|
22
|
-
###### keyframes
|
|
23
|
-
|
|
24
|
-
[`KeyframeArgument`](../type-aliases/KeyframeArgument.md)
|
|
25
|
-
|
|
26
|
-
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API/Keyframe_Formats)
|
|
27
|
-
|
|
28
|
-
###### options?
|
|
29
|
-
|
|
30
|
-
`number` \| `KeyframeEffectOptions` = `{}`
|
|
31
|
-
|
|
32
|
-
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect#options)
|
|
33
|
-
|
|
34
|
-
#### Returns
|
|
35
|
-
|
|
36
|
-
`KeyframeEffectParameters`
|
|
37
|
-
|
|
38
|
-
## Properties
|
|
39
|
-
|
|
40
|
-
### keyframes
|
|
41
|
-
|
|
42
|
-
```ts
|
|
43
|
-
keyframes: KeyframeArgument;
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
***
|
|
47
|
-
|
|
48
|
-
### options
|
|
49
|
-
|
|
50
|
-
```ts
|
|
51
|
-
options: KeyframeEffectOptions;
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## Methods
|
|
55
|
-
|
|
56
|
-
### toAnimation()
|
|
57
|
-
|
|
58
|
-
```ts
|
|
59
|
-
toAnimation(obj: {
|
|
60
|
-
options?: number | KeyframeEffectOptions;
|
|
61
|
-
target: Element | null;
|
|
62
|
-
timeline?: AnimationTimeline;
|
|
63
|
-
}): Animation;
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
#### Parameters
|
|
67
|
-
|
|
68
|
-
##### obj
|
|
69
|
-
|
|
70
|
-
###### options?
|
|
71
|
-
|
|
72
|
-
`number` \| `KeyframeEffectOptions` = `{}`
|
|
73
|
-
|
|
74
|
-
Additional keyframe effect options. Can override existing keys.
|
|
75
|
-
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect#options)
|
|
76
|
-
|
|
77
|
-
###### target
|
|
78
|
-
|
|
79
|
-
[`Element`](https://developer.mozilla.org/docs/Web/API/Element) \| `null`
|
|
80
|
-
|
|
81
|
-
An element to attach the animation to.
|
|
82
|
-
|
|
83
|
-
###### timeline?
|
|
84
|
-
|
|
85
|
-
[`AnimationTimeline`](https://developer.mozilla.org/docs/Web/API/AnimationTimeline) = `document.timeline`
|
|
86
|
-
|
|
87
|
-
#### Returns
|
|
88
|
-
|
|
89
|
-
[`Animation`](https://developer.mozilla.org/docs/Web/API/Animation)
|
|
90
|
-
|
|
91
|
-
#### See
|
|
92
|
-
|
|
93
|
-
Specifications:
|
|
94
|
-
- https://drafts.csswg.org/web-animations-1/#the-keyframeeffect-interface
|
|
95
|
-
- https://drafts.csswg.org/web-animations-1/#the-animation-interface
|
|
1
|
+
[KeyframeKit](../index.md) / KeyframeEffectParameters
|
|
2
|
+
|
|
3
|
+
# Class: KeyframeEffectParameters
|
|
4
|
+
|
|
5
|
+
https://drafts.csswg.org/web-animations-1/#the-keyframeeffect-interface
|
|
6
|
+
|
|
7
|
+
## Constructors
|
|
8
|
+
|
|
9
|
+
### Constructor
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
new KeyframeEffectParameters(obj: {
|
|
13
|
+
keyframes: KeyframeArgument;
|
|
14
|
+
options?: number | KeyframeEffectOptions;
|
|
15
|
+
}): KeyframeEffectParameters;
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
#### Parameters
|
|
19
|
+
|
|
20
|
+
##### obj
|
|
21
|
+
|
|
22
|
+
###### keyframes
|
|
23
|
+
|
|
24
|
+
[`KeyframeArgument`](../type-aliases/KeyframeArgument.md)
|
|
25
|
+
|
|
26
|
+
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API/Keyframe_Formats)
|
|
27
|
+
|
|
28
|
+
###### options?
|
|
29
|
+
|
|
30
|
+
`number` \| `KeyframeEffectOptions` = `{}`
|
|
31
|
+
|
|
32
|
+
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect#options)
|
|
33
|
+
|
|
34
|
+
#### Returns
|
|
35
|
+
|
|
36
|
+
`KeyframeEffectParameters`
|
|
37
|
+
|
|
38
|
+
## Properties
|
|
39
|
+
|
|
40
|
+
### keyframes
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
keyframes: KeyframeArgument;
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
***
|
|
47
|
+
|
|
48
|
+
### options
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
options: KeyframeEffectOptions;
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Methods
|
|
55
|
+
|
|
56
|
+
### toAnimation()
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
toAnimation(obj: {
|
|
60
|
+
options?: number | KeyframeEffectOptions;
|
|
61
|
+
target: Element | null;
|
|
62
|
+
timeline?: AnimationTimeline;
|
|
63
|
+
}): Animation;
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
#### Parameters
|
|
67
|
+
|
|
68
|
+
##### obj
|
|
69
|
+
|
|
70
|
+
###### options?
|
|
71
|
+
|
|
72
|
+
`number` \| `KeyframeEffectOptions` = `{}`
|
|
73
|
+
|
|
74
|
+
Additional keyframe effect options. Can override existing keys.
|
|
75
|
+
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect#options)
|
|
76
|
+
|
|
77
|
+
###### target
|
|
78
|
+
|
|
79
|
+
[`Element`](https://developer.mozilla.org/docs/Web/API/Element) \| `null`
|
|
80
|
+
|
|
81
|
+
An element to attach the animation to.
|
|
82
|
+
|
|
83
|
+
###### timeline?
|
|
84
|
+
|
|
85
|
+
[`AnimationTimeline`](https://developer.mozilla.org/docs/Web/API/AnimationTimeline) = `document.timeline`
|
|
86
|
+
|
|
87
|
+
#### Returns
|
|
88
|
+
|
|
89
|
+
[`Animation`](https://developer.mozilla.org/docs/Web/API/Animation)
|
|
90
|
+
|
|
91
|
+
#### See
|
|
92
|
+
|
|
93
|
+
Specifications:
|
|
94
|
+
- https://drafts.csswg.org/web-animations-1/#the-keyframeeffect-interface
|
|
95
|
+
- https://drafts.csswg.org/web-animations-1/#the-animation-interface
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
[KeyframeKit](../index.md) / ParsedKeyframes
|
|
2
|
-
|
|
3
|
-
# Class: ParsedKeyframes
|
|
4
|
-
|
|
5
|
-
## Constructors
|
|
6
|
-
|
|
7
|
-
### Constructor
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
new ParsedKeyframes(keyframes: Keyframe[]): ParsedKeyframes;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
#### Parameters
|
|
14
|
-
|
|
15
|
-
##### keyframes
|
|
16
|
-
|
|
17
|
-
`Keyframe`[]
|
|
18
|
-
|
|
19
|
-
#### Returns
|
|
20
|
-
|
|
21
|
-
`ParsedKeyframes`
|
|
22
|
-
|
|
23
|
-
## Properties
|
|
24
|
-
|
|
25
|
-
### keyframes
|
|
26
|
-
|
|
27
|
-
```ts
|
|
28
|
-
keyframes: Keyframe[];
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Methods
|
|
32
|
-
|
|
33
|
-
### toKeyframeEffect()
|
|
34
|
-
|
|
35
|
-
```ts
|
|
36
|
-
toKeyframeEffect(options: number | KeyframeEffectOptions | null): KeyframeEffectParameters;
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
#### Parameters
|
|
40
|
-
|
|
41
|
-
##### options
|
|
42
|
-
|
|
43
|
-
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect#options)
|
|
44
|
-
|
|
45
|
-
`number` | `KeyframeEffectOptions` | `null`
|
|
46
|
-
|
|
47
|
-
#### Returns
|
|
48
|
-
|
|
49
|
-
[`KeyframeEffectParameters`](KeyframeEffectParameters.md)
|
|
1
|
+
[KeyframeKit](../index.md) / ParsedKeyframes
|
|
2
|
+
|
|
3
|
+
# Class: ParsedKeyframes
|
|
4
|
+
|
|
5
|
+
## Constructors
|
|
6
|
+
|
|
7
|
+
### Constructor
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
new ParsedKeyframes(keyframes: Keyframe[]): ParsedKeyframes;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
#### Parameters
|
|
14
|
+
|
|
15
|
+
##### keyframes
|
|
16
|
+
|
|
17
|
+
`Keyframe`[]
|
|
18
|
+
|
|
19
|
+
#### Returns
|
|
20
|
+
|
|
21
|
+
`ParsedKeyframes`
|
|
22
|
+
|
|
23
|
+
## Properties
|
|
24
|
+
|
|
25
|
+
### keyframes
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
keyframes: Keyframe[];
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Methods
|
|
32
|
+
|
|
33
|
+
### toKeyframeEffect()
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
toKeyframeEffect(options: number | KeyframeEffectOptions | null): KeyframeEffectParameters;
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
#### Parameters
|
|
40
|
+
|
|
41
|
+
##### options
|
|
42
|
+
|
|
43
|
+
[MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/KeyframeEffect#options)
|
|
44
|
+
|
|
45
|
+
`number` | `KeyframeEffectOptions` | `null`
|
|
46
|
+
|
|
47
|
+
#### Returns
|
|
48
|
+
|
|
49
|
+
[`KeyframeEffectParameters`](KeyframeEffectParameters.md)
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
# KeyframeKit
|
|
2
|
-
|
|
3
|
-
## Classes
|
|
4
|
-
|
|
5
|
-
- [KeyframeEffectParameters](classes/KeyframeEffectParameters.md)
|
|
6
|
-
- [ParsedKeyframes](classes/ParsedKeyframes.md)
|
|
7
|
-
|
|
8
|
-
## Interfaces
|
|
9
|
-
|
|
10
|
-
- [KeyframesFactory](interfaces/KeyframesFactory.md)
|
|
11
|
-
|
|
12
|
-
## Type Aliases
|
|
13
|
-
|
|
14
|
-
- [KeyframeArgument](type-aliases/KeyframeArgument.md)
|
|
15
|
-
- [KeyframesFactorySource](type-aliases/KeyframesFactorySource.md)
|
|
16
|
-
- [ParsedKeyframesRules](type-aliases/ParsedKeyframesRules.md)
|
|
17
|
-
|
|
18
|
-
## Variables
|
|
19
|
-
|
|
20
|
-
- [default](variables/default.md)
|
|
1
|
+
# KeyframeKit
|
|
2
|
+
|
|
3
|
+
## Classes
|
|
4
|
+
|
|
5
|
+
- [KeyframeEffectParameters](classes/KeyframeEffectParameters.md)
|
|
6
|
+
- [ParsedKeyframes](classes/ParsedKeyframes.md)
|
|
7
|
+
|
|
8
|
+
## Interfaces
|
|
9
|
+
|
|
10
|
+
- [KeyframesFactory](interfaces/KeyframesFactory.md)
|
|
11
|
+
|
|
12
|
+
## Type Aliases
|
|
13
|
+
|
|
14
|
+
- [KeyframeArgument](type-aliases/KeyframeArgument.md)
|
|
15
|
+
- [KeyframesFactorySource](type-aliases/KeyframesFactorySource.md)
|
|
16
|
+
- [ParsedKeyframesRules](type-aliases/ParsedKeyframesRules.md)
|
|
17
|
+
|
|
18
|
+
## Variables
|
|
19
|
+
|
|
20
|
+
- [default](variables/default.md)
|
|
@@ -1,151 +1,151 @@
|
|
|
1
|
-
[KeyframeKit](../index.md) / KeyframesFactory
|
|
2
|
-
|
|
3
|
-
# Interface: KeyframesFactory
|
|
4
|
-
|
|
5
|
-
## Properties
|
|
6
|
-
|
|
7
|
-
### Error
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
readonly Error: {
|
|
11
|
-
KeyframesRuleNameTypeError: typeof KeyframesRuleNameTypeError;
|
|
12
|
-
SourceTypeError: typeof SourceTypeError;
|
|
13
|
-
StyleSheetImportError: typeof StyleSheetImportError;
|
|
14
|
-
};
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
#### KeyframesRuleNameTypeError
|
|
18
|
-
|
|
19
|
-
```ts
|
|
20
|
-
readonly KeyframesRuleNameTypeError: typeof KeyframesRuleNameTypeError;
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
#### SourceTypeError
|
|
24
|
-
|
|
25
|
-
```ts
|
|
26
|
-
readonly SourceTypeError: typeof SourceTypeError;
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
#### StyleSheetImportError
|
|
30
|
-
|
|
31
|
-
```ts
|
|
32
|
-
readonly StyleSheetImportError: typeof StyleSheetImportError;
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Methods
|
|
36
|
-
|
|
37
|
-
### getAllStyleSheetKeyframesRules()
|
|
38
|
-
|
|
39
|
-
```ts
|
|
40
|
-
getAllStyleSheetKeyframesRules(obj: {
|
|
41
|
-
in: KeyframesFactorySource;
|
|
42
|
-
}): ParsedKeyframesRules;
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
#### Parameters
|
|
46
|
-
|
|
47
|
-
##### obj
|
|
48
|
-
|
|
49
|
-
###### in
|
|
50
|
-
|
|
51
|
-
[`KeyframesFactorySource`](../type-aliases/KeyframesFactorySource.md)
|
|
52
|
-
|
|
53
|
-
#### Returns
|
|
54
|
-
|
|
55
|
-
[`ParsedKeyframesRules`](../type-aliases/ParsedKeyframesRules.md)
|
|
56
|
-
|
|
57
|
-
***
|
|
58
|
-
|
|
59
|
-
### getDocumentStyleSheetsOnLoad()
|
|
60
|
-
|
|
61
|
-
```ts
|
|
62
|
-
getDocumentStyleSheetsOnLoad(obj?: {
|
|
63
|
-
document?: Document;
|
|
64
|
-
}): Promise<StyleSheetList>;
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
#### Parameters
|
|
68
|
-
|
|
69
|
-
##### obj?
|
|
70
|
-
|
|
71
|
-
###### document?
|
|
72
|
-
|
|
73
|
-
[`Document`](https://developer.mozilla.org/docs/Web/API/Document) = `window.document`
|
|
74
|
-
|
|
75
|
-
#### Returns
|
|
76
|
-
|
|
77
|
-
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`StyleSheetList`](https://developer.mozilla.org/docs/Web/API/StyleSheetList)\>
|
|
78
|
-
|
|
79
|
-
***
|
|
80
|
-
|
|
81
|
-
### getStyleSheetKeyframes()
|
|
82
|
-
|
|
83
|
-
```ts
|
|
84
|
-
getStyleSheetKeyframes(obj: {
|
|
85
|
-
in: KeyframesFactorySource;
|
|
86
|
-
of: string;
|
|
87
|
-
}): ParsedKeyframes | undefined;
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
#### Parameters
|
|
91
|
-
|
|
92
|
-
##### obj
|
|
93
|
-
|
|
94
|
-
###### in
|
|
95
|
-
|
|
96
|
-
[`KeyframesFactorySource`](../type-aliases/KeyframesFactorySource.md)
|
|
97
|
-
|
|
98
|
-
###### of
|
|
99
|
-
|
|
100
|
-
`string`
|
|
101
|
-
|
|
102
|
-
The name of the `@keyframes` rule to get keyframes from.
|
|
103
|
-
|
|
104
|
-
#### Returns
|
|
105
|
-
|
|
106
|
-
[`ParsedKeyframes`](../classes/ParsedKeyframes.md) \| `undefined`
|
|
107
|
-
|
|
108
|
-
***
|
|
109
|
-
|
|
110
|
-
### importStyleSheet()
|
|
111
|
-
|
|
112
|
-
```ts
|
|
113
|
-
importStyleSheet(url: string): Promise<CSSStyleSheet>;
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
#### Parameters
|
|
117
|
-
|
|
118
|
-
##### url
|
|
119
|
-
|
|
120
|
-
`string`
|
|
121
|
-
|
|
122
|
-
#### Returns
|
|
123
|
-
|
|
124
|
-
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CSSStyleSheet`](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet)\>
|
|
125
|
-
|
|
126
|
-
#### Remarks
|
|
127
|
-
|
|
128
|
-
Note: `@import` rules won't be resolved in imported stylesheets.
|
|
129
|
-
See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418.
|
|
130
|
-
|
|
131
|
-
***
|
|
132
|
-
|
|
133
|
-
### parseKeyframesRule()
|
|
134
|
-
|
|
135
|
-
```ts
|
|
136
|
-
parseKeyframesRule(obj: {
|
|
137
|
-
rule: CSSKeyframesRule;
|
|
138
|
-
}): ParsedKeyframes;
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
#### Parameters
|
|
142
|
-
|
|
143
|
-
##### obj
|
|
144
|
-
|
|
145
|
-
###### rule
|
|
146
|
-
|
|
147
|
-
[`CSSKeyframesRule`](https://developer.mozilla.org/docs/Web/API/CSSKeyframesRule)
|
|
148
|
-
|
|
149
|
-
#### Returns
|
|
150
|
-
|
|
151
|
-
[`ParsedKeyframes`](../classes/ParsedKeyframes.md)
|
|
1
|
+
[KeyframeKit](../index.md) / KeyframesFactory
|
|
2
|
+
|
|
3
|
+
# Interface: KeyframesFactory
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### Error
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
readonly Error: {
|
|
11
|
+
KeyframesRuleNameTypeError: typeof KeyframesRuleNameTypeError;
|
|
12
|
+
SourceTypeError: typeof SourceTypeError;
|
|
13
|
+
StyleSheetImportError: typeof StyleSheetImportError;
|
|
14
|
+
};
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
#### KeyframesRuleNameTypeError
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
readonly KeyframesRuleNameTypeError: typeof KeyframesRuleNameTypeError;
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
#### SourceTypeError
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
readonly SourceTypeError: typeof SourceTypeError;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
#### StyleSheetImportError
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
readonly StyleSheetImportError: typeof StyleSheetImportError;
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Methods
|
|
36
|
+
|
|
37
|
+
### getAllStyleSheetKeyframesRules()
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
getAllStyleSheetKeyframesRules(obj: {
|
|
41
|
+
in: KeyframesFactorySource;
|
|
42
|
+
}): ParsedKeyframesRules;
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### Parameters
|
|
46
|
+
|
|
47
|
+
##### obj
|
|
48
|
+
|
|
49
|
+
###### in
|
|
50
|
+
|
|
51
|
+
[`KeyframesFactorySource`](../type-aliases/KeyframesFactorySource.md)
|
|
52
|
+
|
|
53
|
+
#### Returns
|
|
54
|
+
|
|
55
|
+
[`ParsedKeyframesRules`](../type-aliases/ParsedKeyframesRules.md)
|
|
56
|
+
|
|
57
|
+
***
|
|
58
|
+
|
|
59
|
+
### getDocumentStyleSheetsOnLoad()
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
getDocumentStyleSheetsOnLoad(obj?: {
|
|
63
|
+
document?: Document;
|
|
64
|
+
}): Promise<StyleSheetList>;
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
#### Parameters
|
|
68
|
+
|
|
69
|
+
##### obj?
|
|
70
|
+
|
|
71
|
+
###### document?
|
|
72
|
+
|
|
73
|
+
[`Document`](https://developer.mozilla.org/docs/Web/API/Document) = `window.document`
|
|
74
|
+
|
|
75
|
+
#### Returns
|
|
76
|
+
|
|
77
|
+
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`StyleSheetList`](https://developer.mozilla.org/docs/Web/API/StyleSheetList)\>
|
|
78
|
+
|
|
79
|
+
***
|
|
80
|
+
|
|
81
|
+
### getStyleSheetKeyframes()
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
getStyleSheetKeyframes(obj: {
|
|
85
|
+
in: KeyframesFactorySource;
|
|
86
|
+
of: string;
|
|
87
|
+
}): ParsedKeyframes | undefined;
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
#### Parameters
|
|
91
|
+
|
|
92
|
+
##### obj
|
|
93
|
+
|
|
94
|
+
###### in
|
|
95
|
+
|
|
96
|
+
[`KeyframesFactorySource`](../type-aliases/KeyframesFactorySource.md)
|
|
97
|
+
|
|
98
|
+
###### of
|
|
99
|
+
|
|
100
|
+
`string`
|
|
101
|
+
|
|
102
|
+
The name of the `@keyframes` rule to get keyframes from.
|
|
103
|
+
|
|
104
|
+
#### Returns
|
|
105
|
+
|
|
106
|
+
[`ParsedKeyframes`](../classes/ParsedKeyframes.md) \| `undefined`
|
|
107
|
+
|
|
108
|
+
***
|
|
109
|
+
|
|
110
|
+
### importStyleSheet()
|
|
111
|
+
|
|
112
|
+
```ts
|
|
113
|
+
importStyleSheet(url: string): Promise<CSSStyleSheet>;
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
#### Parameters
|
|
117
|
+
|
|
118
|
+
##### url
|
|
119
|
+
|
|
120
|
+
`string`
|
|
121
|
+
|
|
122
|
+
#### Returns
|
|
123
|
+
|
|
124
|
+
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CSSStyleSheet`](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet)\>
|
|
125
|
+
|
|
126
|
+
#### Remarks
|
|
127
|
+
|
|
128
|
+
Note: `@import` rules won't be resolved in imported stylesheets.
|
|
129
|
+
See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418.
|
|
130
|
+
|
|
131
|
+
***
|
|
132
|
+
|
|
133
|
+
### parseKeyframesRule()
|
|
134
|
+
|
|
135
|
+
```ts
|
|
136
|
+
parseKeyframesRule(obj: {
|
|
137
|
+
rule: CSSKeyframesRule;
|
|
138
|
+
}): ParsedKeyframes;
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
#### Parameters
|
|
142
|
+
|
|
143
|
+
##### obj
|
|
144
|
+
|
|
145
|
+
###### rule
|
|
146
|
+
|
|
147
|
+
[`CSSKeyframesRule`](https://developer.mozilla.org/docs/Web/API/CSSKeyframesRule)
|
|
148
|
+
|
|
149
|
+
#### Returns
|
|
150
|
+
|
|
151
|
+
[`ParsedKeyframes`](../classes/ParsedKeyframes.md)
|