@mkbabb/keyframes.js 6.1.0 → 6.2.1
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 +2 -2
- package/dist/engine/index.d.ts +14 -5
- package/dist/engine/index.js +820 -782
- package/dist/keyframes.d.ts +16 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ The `KeyframesAnimation` object drives `CSSKeyframesAnimation` and `AnimationGro
|
|
|
66
66
|
### `AnimationOptions`
|
|
67
67
|
|
|
68
68
|
- `duration`: time in milliseconds (default: 1000)
|
|
69
|
-
- `delay`: time in milliseconds before the animation begins (default: 0)
|
|
69
|
+
- `delay`: time in milliseconds before the animation begins (default: 0) — a phase on the driving clock, taken once per play. Until it elapses the animation is in its before-phase and `fillMode` decides what it paints (`backwards`/`both`: the 0% frame; otherwise nothing); `animationstart` fires when it ends. In an `AnimationGroup` each child's delay offsets it on the group's one clock, so `stagger` delays fed to the children stagger them
|
|
70
70
|
- `iterationCount`: number of repetitions (default: 1)
|
|
71
71
|
- `direction`: `normal`, `reverse`, `alternate`, `alternate-reverse`
|
|
72
72
|
- `fillMode`: `none`, `forwards`, `backwards`, `both`
|
|
@@ -312,7 +312,7 @@ anim.setTargets(element);
|
|
|
312
312
|
anim.play();
|
|
313
313
|
```
|
|
314
314
|
|
|
315
|
-
**Fade**: `fadeIn`, `fadeOut` · **Attention**: `pulse`, `heartbeat`, `glow`, `shake`, `bounce` · **Entrance/Exit**: `flip`, `rotateIn`, `slideIn`, `slideInLeft/Right`, `slideOutLeft/Right`, `blurIn/Out/InOut`, `jumpUp/Down`, `warpLeft/Right` · **Effects**: `hover`, `typewriter`, `typingCursor`, `rainbowText`, `progressBar`, `skeletonLoading`, `spinner`, `parallaxScroll`, `gradientBackground`, `rotateScale`, `accordionExpand`, `notificationBounce`, `textFocusBlur`
|
|
315
|
+
**Fade**: `fadeIn`, `fadeOut` · **Attention**: `pulse`, `heartbeat`, `glow`, `shake`, `bounce` · **Entrance/Exit**: `flip`, `rotateIn`, `slideIn`, `slideInLeft/Right`, `slideOutLeft/Right`, `blurIn/Out/InOut`, `jumpUp/Down`, `warpLeft/Right` · **Effects**: `hover`, `garlandSway`, `unfurl`, `typewriter`, `typingCursor`, `rainbowText`, `progressBar`, `skeletonLoading`, `spinner`, `parallaxScroll`, `gradientBackground`, `rotateScale`, `accordionExpand`, `notificationBounce`, `textFocusBlur`
|
|
316
316
|
|
|
317
317
|
## The round-trip — ingest, drive, compile
|
|
318
318
|
|
package/dist/engine/index.d.ts
CHANGED
|
@@ -249,9 +249,9 @@ export declare class AnimationGroup<V extends Vars> {
|
|
|
249
249
|
/** The master elapsed time a child's current position sits at (its delay +
|
|
250
250
|
* its completed iterations + its `t`) — the read `seek` inverts. */
|
|
251
251
|
elapsedOf(nameOrAnim: string | KeyframesAnimation<V>): number;
|
|
252
|
-
/** Advance all child animations to absolute clock `t`. SYNC
|
|
253
|
-
*
|
|
254
|
-
*
|
|
252
|
+
/** Advance all child animations to absolute clock `t`. SYNC (J.W6 S1; 6.2.1:
|
|
253
|
+
* a child's delay is a phase on `t`, never a sleep): a thenable only on the
|
|
254
|
+
* over-`YIELD_BATCH` yield path. */
|
|
255
255
|
advanceTo(t: number): this | Promise<this>;
|
|
256
256
|
/** The completion front-door (G.W13) — `await group.finished` resolves once
|
|
257
257
|
* the in-flight composite play settles. Exposes the ONE held `_playingPromise`
|
|
@@ -1045,6 +1045,8 @@ export declare function fromMotionPath<V extends Vars = Vars>(target: HTMLElemen
|
|
|
1045
1045
|
*/
|
|
1046
1046
|
export declare const fromStyleSheets: <V extends Vars = Vars>(source?: Document | ShadowRoot | CSSStyleSheet[] | CSSStyleSheet, options?: IngestOptions) => IngestResult<V>;
|
|
1047
1047
|
|
|
1048
|
+
declare const garlandSway: PresetFactory;
|
|
1049
|
+
|
|
1048
1050
|
/**
|
|
1049
1051
|
* Resolve a stable name for an animation reference: the explicit `name` when
|
|
1050
1052
|
* set, else the numeric `id` stringified. A bare string passes through (the ONE
|
|
@@ -1313,9 +1315,9 @@ export declare class KeyframesAnimation<V extends Vars = Vars> {
|
|
|
1313
1315
|
* allocation-free.
|
|
1314
1316
|
*/
|
|
1315
1317
|
interpFrames(t: number, transformFrames?: boolean, out?: FlatAuthoredValues): FlatAuthoredValues;
|
|
1316
|
-
onStart():
|
|
1318
|
+
onStart(): void;
|
|
1317
1319
|
onEnd(): void;
|
|
1318
|
-
advanceTo(t: number): number
|
|
1320
|
+
advanceTo(t: number): number;
|
|
1319
1321
|
/** One frame of the standalone rAF play path (driven by `RAFPlayback.loop`). */
|
|
1320
1322
|
private _frame;
|
|
1321
1323
|
/** The completion front-door (G.W13) — `await anim.finished` resolves once
|
|
@@ -1610,6 +1612,9 @@ declare class PlaybackState {
|
|
|
1610
1612
|
* next rAF tick re-anchors the play to the first presented frame
|
|
1611
1613
|
* (`presentAnchor`). Any external `startTime` write clears it. */
|
|
1612
1614
|
anchorTick: number | undefined;
|
|
1615
|
+
/** True from a delayed play's anchor until its clock reaches it: the CSS
|
|
1616
|
+
* before-phase, whose end opens the active phase (`animationstart`). */
|
|
1617
|
+
startOwed: boolean;
|
|
1613
1618
|
pausedTime: number;
|
|
1614
1619
|
t: number;
|
|
1615
1620
|
iteration: number;
|
|
@@ -1656,6 +1661,8 @@ export declare namespace presets {
|
|
|
1656
1661
|
slideInRight,
|
|
1657
1662
|
slideOutRight,
|
|
1658
1663
|
hover,
|
|
1664
|
+
garlandSway,
|
|
1665
|
+
unfurl,
|
|
1659
1666
|
jumpUp,
|
|
1660
1667
|
jumpDown,
|
|
1661
1668
|
springScaleIn,
|
|
@@ -2899,6 +2906,8 @@ declare const typewriter: PresetFactory;
|
|
|
2899
2906
|
|
|
2900
2907
|
declare const typingCursor: PresetFactory;
|
|
2901
2908
|
|
|
2909
|
+
declare const unfurl: PresetFactory;
|
|
2910
|
+
|
|
2902
2911
|
/**
|
|
2903
2912
|
* `validate(css, opts?)` — the READ-ONLY projection over the three typed channels
|
|
2904
2913
|
* onto one {@link ValidateResult} envelope. Async because `compileToCSS` retains
|