pagewave 1.0.3 → 1.0.5

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/README.md ADDED
@@ -0,0 +1,351 @@
1
+
2
+ # PageWave
3
+
4
+ An NPM Package for implementing page transitions in both SSR and CSR apps
5
+
6
+
7
+ ## Installation
8
+
9
+ Install pagewave with npm
10
+
11
+ ```bash
12
+ npm install pagewave
13
+ ```
14
+
15
+
16
+ ## Features
17
+
18
+ - Built-in animations
19
+ - Hooks
20
+ - Doesn't touch history or use push state, allowing for you to use it with routers like sveltekit
21
+ - Manual page transition animations can be run to avoid conflicts with any frameworks
22
+ - Customizable ids for divs to avoid conflict with elements in your body
23
+ - Allows for custom animations based on class name of link
24
+ - Preset transition classes to get up and running quickly
25
+ - Highly customizable transition options
26
+ - Extendable class system to create custom transition styles
27
+
28
+
29
+ ## High Level Explanation
30
+
31
+ This package involves allows a user to set up certain routes with names and have those routes triggered either by clicking on a link, loading onto a page, or manually.
32
+
33
+ Utilize transtion classes premade or custom built to handle it.
34
+
35
+ ## Getting started
36
+
37
+ At its core,
38
+
39
+ ```typescript
40
+ import { PageWave, KeyFramePreset, StyleTransition, type KeyFrameType } from 'pagewave';
41
+ import "pagewave/KeyFramePreset.css";
42
+
43
+ let keyFrameType: KeyFrameType = "fadetoright";
44
+
45
+ let fadeToRightTransition = new KeyFrameCustom(
46
+ keyFrameType, 250, "ease-in-out"
47
+ );
48
+
49
+ let defaultTransition = new StyleTransition(
50
+ "opacity", 250, "1", "0"
51
+ );
52
+
53
+ const pw: PageWave = new PageWave(
54
+ {
55
+ "fade": fadeToRightTransition
56
+ },
57
+ );
58
+
59
+ // The following code should be contained within a client function like Sveltekit onMount or React useLayoutEffect if being done in SSR
60
+
61
+ // Setups the transition to occur when loading onto page, with a default transition provided
62
+ pw.EndPoint(defaultTransition);
63
+
64
+ // Setups the transition to occur when a link is clicked, with a default transition provided
65
+ pw.SendPoint(defaultTransition);
66
+
67
+ // Called to start the endpoint
68
+ pw.CallEndPoint();
69
+ ```
70
+
71
+ In this code, there are a few points to note:
72
+ - The arguments in PageWave represent routes that are used by EndPoint and SendPoint
73
+ - For SendPoint, if a link has the class "fade", it will run the fade animation when clicked, and then go to the link. It will also save in sessionStorage the name "fade" under animationType
74
+ - This session storage is used in EndPoint as it looks for a route matching the saved value under animationType. In this code, it would look for fade and play that transition.
75
+ - Just because two pages may have "fade" defined doesn't mean that they have to play the same animation
76
+ - CallEndPoint is utilized in cases where the base event "DOMContentLoaded" isn't called on every page (like in SSR where the layout stays constant)
77
+
78
+ ### Setting up an animation
79
+
80
+ Tag the element that encapsulates the content with an id of 'main-content'
81
+
82
+ If you can't do that, change the parameter name.
83
+
84
+ ```html
85
+ <script>
86
+ import { PageWave, KeyFramePreset, StyleTransition, type KeyFrameType } from 'pagewave'
87
+ import "pagewave/OverlayPreset.css";
88
+ let keyFrameType: OverlayType = "bubble";
89
+
90
+ let bubbleTransition = new OverlayPreset(
91
+ overlayType.bubble, 500, "#293241"
92
+ );
93
+
94
+ let defaultTransition = new StyleTransition(
95
+ "opacity", 250, "1", "0"
96
+ );
97
+
98
+ const pw: PageWave = new PageWave(
99
+ {
100
+ "pagewave-bubble": bubbleTransition
101
+ },
102
+ {
103
+ // These are options. This option is unnecessary as it defaults to "main-content", but showcasing you can change it
104
+ mainContentIdName: "main-content"
105
+ }
106
+ );
107
+
108
+ // The following code should be contained within a client function like Sveltekit onMount or React useLayoutEffect if being done in SSR
109
+
110
+ // Combines Endpoint and Sendpoint if you need individual control
111
+ pw.ListenForChange(defaultTransition);
112
+ pw.CallEndPoint();
113
+
114
+ </script>
115
+
116
+ <!--The area that you want to transition must be marked with id="main-content"-->
117
+ <div id="main-content">
118
+ <h1>This is my page</h1>
119
+ <!-- This link transitions with the pagewave-bubble transition-->
120
+ <a href="..." class="pagewave-bubble">Click me to transition!</a>
121
+ </div>
122
+
123
+ ```
124
+
125
+ ## Working with SSR
126
+
127
+ Because of the nature of SSR, a few changes have to be made:
128
+ - The Send and End Points function must be run in load functions as they make reference to the window for changing the link and dispatching events
129
+ - You need to change the goto Function for SendPoint. Do this by `SendPoint(defaultTransition, () => {/* Function */})`
130
+ - Links may need to prevent default. The SendPoint function does this automatically, but it may need to be done manually
131
+
132
+ ## Other Cool Features
133
+
134
+ ### Custom Keyframe Transitions
135
+
136
+ This will create an animation style, that when called:
137
+
138
+ Moves h1 and p elements to the left
139
+
140
+ Moves h2 and elements with 'moving' class to the right
141
+
142
+ This is over 1000ms, at a 'linear' pace, and fades everything
143
+
144
+ Essentially you can specify specific transitions for certain classes and a global transition for everything
145
+
146
+
147
+ ```javascript
148
+ ...
149
+
150
+ let multiElementAnimation =l new MultiElementAnimation(
151
+ {
152
+ "h1": "move",
153
+ "p": "move",
154
+ "h2": "inverseMove",
155
+ ".moving": "inverseMove",
156
+ }, 1000, "linear", "fadeAll"
157
+ );
158
+
159
+ pw.ListenForChange(multiElementAnimation);
160
+
161
+ ...
162
+
163
+ <style>
164
+
165
+ @keyframes move {
166
+ from{
167
+ transform: translate(0px, 0px);
168
+ color: black;
169
+ opacity: 1;
170
+ }
171
+ to{
172
+ transform: translate(-200px, 0px);
173
+ opacity: 0;
174
+ color: white;
175
+ }
176
+
177
+ }
178
+ @keyframes inverseMove {
179
+ from{
180
+ transform: translate(0, 0px);
181
+ opacity: 1;
182
+ }
183
+ to{
184
+ transform: translate(200px, 0px);
185
+ opacity: 0;
186
+ }
187
+
188
+ }
189
+ @keyframes fadeAll {
190
+ from{
191
+ opacity: 1;
192
+ }
193
+ to{
194
+ opacity: 0;
195
+ }
196
+ }
197
+ </style>
198
+
199
+ ...
200
+
201
+ ```
202
+
203
+ ### Custom Overlay Transitions
204
+
205
+ There are a few kinds of Custom Overlays
206
+
207
+ OverlayCustom allows you to define which many different overlays and customize them. They will take the key as the class name (if you want to find it) and the value as the animation.
208
+
209
+ After the object of divs, there is
210
+ - duration
211
+ - color of divs
212
+ - timing
213
+ - animation to play while Overlay Animation plays
214
+
215
+ OverlayStyled is similar, except for two parts:
216
+ - The object is now multi level, where the key is still the class name, but the value is object consisting of the animation name and the styles to be applied to the specific div.
217
+ - After all the parameters, there is a new parameter that allows you to change the style of the blocker element. This is useful in cases like the example where since the div is a gradient, the blocker should look like that to be seamless
218
+
219
+ ```javascript
220
+ let customOverlay = new OverlayCustom(
221
+ {
222
+ "first": "rise",
223
+ "second": "fall",
224
+ "third": "slide",
225
+ "fourth": "inverseSlide",
226
+ }, 3000, "#293241", "ease-in-out", null
227
+ );
228
+
229
+ let styledOverlay = new OverlayStyled(
230
+ {
231
+ "first": {
232
+ animationName: "rise",
233
+ cssDesign: {
234
+ "background": "linear-gradient(90deg,rgba(42, 123, 155, 1) 0%, rgba(87, 199, 133, 1) 50%, rgba(237, 221, 83, 1) 100%)"
235
+ }
236
+ },
237
+ }, 3000, "#293241", "ease-in-out", null, {
238
+ "background": "linear-gradient(90deg,rgba(42, 123, 155, 1) 0%, rgba(87, 199, 133, 1) 50%, rgba(237, 221, 83, 1) 100%)"
239
+ }
240
+ )
241
+
242
+ ```
243
+
244
+ #### Manual Transitions
245
+
246
+ You can do transitions manually through the ```AnimatePageTransition(style)``` method which takes a Transitionstyle as a parameter
247
+
248
+
249
+ ### Custom Link function
250
+
251
+ By default, this package uses a default function of ```window.location = link;``` for changing links. However, this can be customized in either ```SendPoint() or ListenForChange()```
252
+
253
+ ```
254
+ let defaultAnimation = ...
255
+ let linkFunction = (link) => {
256
+ console.log(link);
257
+ window.location = link;
258
+ }
259
+ SendPoint(defaultAnimation, linkFunction);
260
+ ```
261
+
262
+ This is useful in SSR when the link change function is different from the default one.
263
+
264
+ ### Events
265
+
266
+ There are many events that can be listened to to call certain code.
267
+
268
+ - animateSF - animation start, forward direction
269
+ - animateSR - animation start, reverse direction
270
+ - animateEF - animation end, forward direction
271
+ - animateER - animation end, reverse direction
272
+ - animateSSP - start of Send Point listening (when a link is clicked)
273
+ - animateESP - end of Send Point listen (when the animation is handled)
274
+ - animateSEP - start of end point listen (when the load event is dispatched)
275
+ - animateEEP - end of end point (when the page is revealed after an animation)
276
+ - animateEPNA - end point no animation played (when the page is revealed but no animation was played)
277
+
278
+ Listen by using window.addEventListener("...", (e) => {
279
+
280
+ })
281
+
282
+ ### This program has optional parameters:
283
+
284
+ #### Optional Parameter Name : Default Value
285
+
286
+ ```javascript
287
+ //This is the class for the content that the transition will affect/cover
288
+ mainContentIdName: "main-content"
289
+
290
+ //This is the delay between the page loading and the page beginning the animation
291
+ pageAnimationDelay: 100,
292
+
293
+ //Whether the transition should run when the page is reloaded
294
+ //Sometimes needs to be enabled in SSR because of how they treat going from one page to another as reloading
295
+ runAnimationOnPageReload: false,
296
+
297
+ //Whether the transition should run when a link goes to a different page
298
+ runAnimationOnCrossSite: false,
299
+
300
+ //The delay between the animation playing and the page revealing
301
+ pageRevealDelay: 0,
302
+
303
+ //Whether the page should be left after animation
304
+ leavePageOnLink: true,
305
+
306
+ //What the ID of the element that blocks the page is
307
+ pageBlockerId: "pageBlocker",
308
+
309
+ //What class should be added to links to not transition
310
+ classToIgnoreLink: "ignore-click",
311
+
312
+ //Whether ignored links should animate
313
+ animateIgnoredLinks: false,
314
+
315
+ //Whether links to the same page should animate
316
+ animateSelfLink: true,
317
+
318
+ //The event that is checked to see that the page is loaded and what CallEndPoint dispatches
319
+ loadEvent: "DOMContentLoaded",
320
+
321
+ // When true, it will ignore transitioning on a link if no animation is found in the class list
322
+ // Otherwise, it will transition every time unless explicitly told to ignore
323
+ preferIgnore: false
324
+ ```
325
+
326
+ ## Extending with Custom Transition classes
327
+ PageWave provides many custom classes to create beautiful transitions:
328
+ - **KeyFrameCustom** for a custom transition animation on main-content
329
+ - **KeyFramePreset** to utilize premade animations for getting started quickly
330
+ - **MultiElementAnimation** to animate multiple elements and have more fine grained control
331
+ - **OverlayCustom** for a custom overlay animation
332
+ - **OverlayPreset** to utilize premade overlay animations for getting started quickly
333
+ - **OverlayStyled** to have complete control over how an overlay animation looks
334
+ - **StyleTransition** to utilize the transition css property to animate a single property
335
+
336
+ However, if you need to do something not listed here, the class system can be easily extended.
337
+
338
+ To do so, you must implement the TransitionStyleInterface which requires a few parts to be defined:
339
+ - duration: number (how long the animation lasts)
340
+ - timing: TimingType (how the animation moves)
341
+ - handle(direction: DirectionType, mainElement: HTMLElement) : void (runs the actual transition animation)
342
+ - hidePage(options: OptionsType) : void (hides the page either before or after animation)
343
+ - revealPage(options: OptionsType): void (reveals the page once animation needs to be shown)
344
+
345
+ PageWave does the rest of the work on using these functions to create seamless transitions.
346
+
347
+ If you want to use a preexisting implementation, you can use KeyFrameBase or OverlayBase which power many of their respective child classes.
348
+
349
+ ## Supporting
350
+
351
+ If you find this project helpful, considering starring ⭐ it. I would greatly appreciate it! :)
@@ -0,0 +1,55 @@
1
+ @keyframes fade {
2
+ from{
3
+ opacity: 1;
4
+ }
5
+ to{
6
+ opacity: 0;
7
+ }
8
+ }
9
+ @keyframes fadeaway {
10
+ from{
11
+ position: relative;
12
+ opacity: 1;
13
+ left: 0
14
+ }
15
+ to{
16
+ position: relative;
17
+ opacity: 0;
18
+ left: -200px
19
+ }
20
+ }
21
+ @keyframes fadetoleft {
22
+ from{
23
+ position: relative;
24
+ left: 0;
25
+ opacity: 1;
26
+ }
27
+ to{
28
+ position: relative;
29
+ left: -100px;
30
+ opacity: 0;
31
+ }
32
+ }
33
+ @keyframes fadetoright {
34
+ from{
35
+ position: relative;
36
+ left: 0;
37
+ opacity: 1;
38
+ }
39
+ to{
40
+ position: relative;
41
+ left: 100px;
42
+ opacity: 0;
43
+ }
44
+ }
45
+ @keyframes rotatefade {
46
+ 0% {
47
+ transform: rotateZ(0deg);
48
+ opacity: 1;
49
+ }
50
+ 100% {
51
+ transform: rotateY(-180deg);
52
+ opacity: 0;
53
+ }
54
+ }
55
+
@@ -6,7 +6,7 @@
6
6
  width: 100%;
7
7
  height: 100%;
8
8
  position: absolute;
9
- background-color: var(--div-color);
9
+
10
10
  clip-path: circle(0%);
11
11
  top: 0;
12
12
  }
@@ -14,7 +14,7 @@
14
14
  width: 100%;
15
15
  height: 100%;
16
16
  position: absolute;
17
- background-color: var(--div-color);
17
+
18
18
  clip-path: circle(100%);
19
19
  top: 0;
20
20
  }
@@ -25,14 +25,14 @@
25
25
  width: 100%;
26
26
  position: absolute;
27
27
  top: 0;
28
- background-color: var(--div-color);
28
+
29
29
  }
30
30
  to{
31
31
  height: 100%;
32
32
  width: 100%;
33
33
  position: absolute;
34
34
  top: 0;
35
- background-color: var(--div-color);
35
+
36
36
  }
37
37
  }
38
38
  @keyframes rise {
@@ -41,14 +41,14 @@
41
41
  width: 100%;
42
42
  position: absolute;
43
43
  bottom: 0;
44
- background-color: var(--div-color);
44
+
45
45
  }
46
46
  to{
47
47
  height: 100%;
48
48
  width: 100%;
49
49
  position: absolute;
50
50
  bottom: 0;
51
- background-color: var(--div-color);
51
+
52
52
  }
53
53
  }
54
54
  @keyframes leftcurtain{
@@ -57,14 +57,14 @@
57
57
  width: 0%;
58
58
  position: absolute;
59
59
  top: 0;
60
- background-color: var(--div-color);
60
+
61
61
  }
62
62
  to{
63
63
  height: 100%;
64
64
  width: 50%;
65
65
  position: absolute;
66
66
  top: 0;
67
- background-color: var(--div-color);
67
+
68
68
  }
69
69
  }
70
70
  @keyframes rightcurtain{
@@ -74,7 +74,7 @@
74
74
  position: absolute;
75
75
  right: 0;
76
76
  top: 0;
77
- background-color: var(--div-color);
77
+
78
78
  }
79
79
  to{
80
80
  height: 100%;
@@ -82,7 +82,7 @@
82
82
  position: absolute;
83
83
  right: 0;
84
84
  top: 0;
85
- background-color: var(--div-color);
85
+
86
86
  }
87
87
  }
88
88
  @keyframes inverseSlide{
@@ -92,7 +92,7 @@
92
92
  position: absolute;
93
93
  right: 0;
94
94
  top: 0;
95
- background-color: var(--div-color);
95
+
96
96
  }
97
97
  to{
98
98
  height: 100%;
@@ -100,7 +100,6 @@
100
100
  position: absolute;
101
101
  right: 0;
102
102
  top: 0;
103
- background-color: var(--div-color);
104
103
  }
105
104
  }
106
105
  @keyframes slide {
@@ -109,13 +108,49 @@
109
108
  width: 0%;
110
109
  position: absolute;
111
110
  top: 0;
112
- background-color: var(--div-color);
111
+
113
112
  }
114
113
  to{
115
114
  height: 100%;
116
115
  width: 100%;
117
116
  position: absolute;
118
117
  top: 0;
119
- background-color: var(--div-color);
118
+
120
119
  }
121
120
  }
121
+
122
+ @keyframes wipe {
123
+ /* Initial: left middle, thin vertical bar */
124
+ 0% {
125
+ position: absolute;
126
+ top: 50%;
127
+ left: 0;
128
+ width: 1%;
129
+ height: 2%;
130
+ transform: translateY(-50%) scaleX(0) scaleY(1);
131
+ transform-origin: left center;
132
+ z-index: 9999;
133
+ }
134
+
135
+ /* Grow to the right */
136
+ 50% {
137
+ position: absolute;
138
+ top: 50%;
139
+ left: 0;
140
+ width: 100%;
141
+ height: 2%;
142
+ transform: translateY(-50%);
143
+ }
144
+
145
+ /* Expand up & down */
146
+ 100% {
147
+ position: absolute;
148
+ top: 50%;
149
+ left: 0;
150
+ width: 100%;
151
+ height: 100%;
152
+ transform: translateY(-50%);
153
+ transform-origin: left center;
154
+ z-index: 9999;
155
+ }
156
+ }
@@ -0,0 +1,126 @@
1
+ type DirectionType = "normal" | "reverse";
2
+
3
+ type OptionsType = {
4
+ mainContentIdName: string;
5
+ pageAnimationDelay: number;
6
+ runAnimationOnPageReload: boolean;
7
+ runAnimationOnCrossSite: boolean;
8
+ pageRevealDelay: number;
9
+ leavePageOnLink: boolean;
10
+ pageBlockerId: string;
11
+ classToIgnoreLink: string;
12
+ animateIgnoredLinks: boolean;
13
+ animateSelfLink: boolean;
14
+ loadEvent: "DOMContentLoaded" | "load";
15
+ preferIgnore: boolean;
16
+ };
17
+
18
+ type TimingType = "linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out" | "step-start" | "step-end";
19
+
20
+ interface TransitionStyle {
21
+ duration: number;
22
+ timing?: string;
23
+ handle(direction: DirectionType, mainElement: HTMLElement): void;
24
+ hidePage(options: OptionsType): void;
25
+ revealPage(options: OptionsType): void;
26
+ }
27
+
28
+ declare class KeyFrameBase implements TransitionStyle {
29
+ duration: number;
30
+ timing: TimingType;
31
+ constructor(duration: number, timing?: TimingType);
32
+ handle(direction: DirectionType, mainElement: HTMLElement): void;
33
+ hidePage(options: OptionsType): void;
34
+ revealPage(options: OptionsType): void;
35
+ protected waitForElementLoad(selector: string, functionToExecute: (element: HTMLElement) => void): void;
36
+ protected ApplyAnimation(element: HTMLElement, animationName: string, duration: number, timing: TimingType, direction: DirectionType): void;
37
+ }
38
+
39
+ declare class KeyFrameCustom extends KeyFrameBase {
40
+ animationName: string;
41
+ constructor(animationName: string, duration: number, timing?: TimingType);
42
+ handle(direction: DirectionType, mainElement: HTMLElement): void;
43
+ }
44
+
45
+ type KeyFrameType = "fade" | "fadeaway" | "fadetoleft" | "fadetoright";
46
+
47
+ declare class KeyFramePreset extends KeyFrameCustom {
48
+ constructor(kfType: KeyFrameType, duration: number, timing?: TimingType);
49
+ handle(direction: DirectionType, mainElement: HTMLElement): void;
50
+ }
51
+
52
+ declare class MultiElementAnimation extends KeyFrameBase {
53
+ animateableObjects: {
54
+ [selector: string]: string;
55
+ };
56
+ mainElementAnimation: string;
57
+ constructor(animateableObjects: {
58
+ [selector: string]: string;
59
+ }, duration: number, timing?: TimingType, mainElementAnimation?: string);
60
+ handle(direction: DirectionType, mainElement: HTMLElement): void;
61
+ }
62
+
63
+ declare class OverlayBase implements TransitionStyle {
64
+ duration: number;
65
+ timing: TimingType;
66
+ color: string;
67
+ constructor(duration: number, color: string, timing?: TimingType);
68
+ handle(direction: DirectionType, mainElement: HTMLElement): void;
69
+ hidePage(options: OptionsType): void;
70
+ revealPage(options: OptionsType): void;
71
+ private waitForElementLoad;
72
+ }
73
+
74
+ declare class OverlayCustom extends OverlayBase {
75
+ divAnimationObject: Record<string, string>;
76
+ mainElementAnimation: KeyFrameBase | null;
77
+ constructor(divAnimationObject: Record<string, string>, duration: number, color: string, timing?: TimingType, mainElementAnimation?: KeyFrameBase | null);
78
+ handle(direction: DirectionType, mainElement: HTMLElement): void;
79
+ }
80
+
81
+ type OverlayType = "slide" | "inverseSlide" | "curtain" | "rise" | "fall" | "bubble" | "wipe";
82
+
83
+ declare class OverlayPreset extends OverlayCustom {
84
+ constructor(oType: OverlayType, duration: number, color: string, timing?: TimingType);
85
+ handle(direction: DirectionType, mainElement: HTMLElement): void;
86
+ }
87
+
88
+ type OverlayStyledDiv = {
89
+ animationName: string;
90
+ cssDesign: Partial<Record<keyof CSSStyleDeclaration, string>>;
91
+ };
92
+ declare class OverlayStyled extends OverlayBase {
93
+ divAnimationObject: Record<string, OverlayStyledDiv>;
94
+ mainElementAnimation: KeyFrameBase | null;
95
+ blockerDesign: Partial<Record<keyof CSSStyleDeclaration, string>>;
96
+ constructor(divAnimationObject: Record<string, OverlayStyledDiv>, duration: number, color: string, timing?: TimingType, mainElementAnimation?: KeyFrameBase | null, blockerDesign?: Partial<Record<keyof CSSStyleDeclaration, string>>);
97
+ hidePage(options: OptionsType): void;
98
+ handle(direction: DirectionType, mainElement: HTMLElement): void;
99
+ }
100
+
101
+ declare class PageWave {
102
+ defaultOptions: OptionsType;
103
+ finalOptions: OptionsType;
104
+ routeTransitions: Record<string, TransitionStyle>;
105
+ constructor(transitions: Record<string, TransitionStyle>, options?: {});
106
+ private CallHook;
107
+ private isNavigationFromSameSite;
108
+ private isInternalLink;
109
+ private HandleClickAnimation;
110
+ ListenForChange(defaultTransitionStyle: TransitionStyle, leaveFunction?: (link: string) => void): void;
111
+ SendPoint(defaultTransitionStyle: TransitionStyle, leaveFunction?: (link: string) => void, externalLeaveFunction?: (link: string) => void): void;
112
+ getStorageRouteTransition(defaultTransitionStyle: TransitionStyle): TransitionStyle;
113
+ EndPoint(defaultTransitionStyle: TransitionStyle): void;
114
+ CallEndPoint(): void;
115
+ AnimatePageTransition(aStyle: TransitionStyle, direction?: DirectionType): void;
116
+ }
117
+
118
+ declare class StyleTransition extends KeyFrameBase {
119
+ styleString: keyof CSSStyleDeclaration;
120
+ startValue: string;
121
+ endValue: string;
122
+ constructor(styleString: keyof CSSStyleDeclaration, duration: number, startValue: string, endValue: string, timing?: TimingType);
123
+ handle(direction: DirectionType, mainElement: HTMLElement): void;
124
+ }
125
+
126
+ export { type DirectionType, KeyFrameBase, KeyFrameCustom, KeyFramePreset, type KeyFrameType, MultiElementAnimation, type OptionsType, OverlayBase, OverlayCustom, OverlayPreset, OverlayStyled, type OverlayStyledDiv, type OverlayType, PageWave, StyleTransition, type TimingType, type TransitionStyle };