@mkbabb/keyframes.js 5.2.0 → 5.3.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/README.md +15 -5
- package/dist/easing-registry-BAgudUsG.js +2 -0
- package/dist/{easing-registry-DHV2-5gA.js → easing-registry-BlbS88NR.js} +2 -2
- package/dist/engine/index.d.ts +155 -174
- package/dist/engine/index.js +3710 -16
- package/dist/keyframes.d.ts +370 -305
- package/dist/keyframes.js +91 -142
- package/dist/{sequence-s0bL7Uul.js → sequence-CES7o7hs.js} +218 -170
- package/package.json +16 -42
- package/dist/backward-color-BtbRcnna.js +0 -108
- package/dist/compile-BHCTPerD.js +0 -30
- package/dist/delegation-BQYCrP2p.js +0 -259
- package/dist/draw-svg-CK9Qrly8.js +0 -33
- package/dist/easing-registry-y1p9McFy.js +0 -2
- package/dist/easing-serialize-D4LZCB6i.js +0 -21
- package/dist/engine-CPK_udUQ.js +0 -1172
- package/dist/engine-DlpimZtM.js +0 -3
- package/dist/entry-D82NKUhP.js +0 -148
- package/dist/format-BdIvdLzG.js +0 -114
- package/dist/group-HM7N4uOE.js +0 -390
- package/dist/handle-D4xrf_ya.js +0 -21
- package/dist/ingest-_g6tfk2e.js +0 -166
- package/dist/morph-svg-KUrH9KnK.js +0 -79
- package/dist/motion-path-wM5tPfrY.js +0 -26
- package/dist/parse-flatten-DRMHFytp.js +0 -2
- package/dist/parse-flatten-ZZUSEQEL.js +0 -63
- package/dist/presets-DeDJYL4G.js +0 -275
- package/dist/scheduler-CfGIC3GX.js +0 -14
- package/dist/scroll-BEyCx0b_.js +0 -287
- package/dist/validate-xFZ_Ld1k.js +0 -39
- package/dist/view-transition-BPJQxUTC.js +0 -305
package/dist/engine/index.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { AnimationRangeValue } from '@mkbabb/value.js';
|
|
2
|
-
import { AnimationTimelineValue } from '@mkbabb/value.js';
|
|
3
|
-
import type { AnimationTriggerValue } from '@mkbabb/value.js';
|
|
4
|
-
import type { ColorSpace } from '@mkbabb/value.js';
|
|
5
|
-
import { CSSTimelineOptions } from '@mkbabb/value.js';
|
|
6
|
-
import { CustomFunctionDescriptor } from '@mkbabb/value.js';
|
|
7
|
-
import { extractAnimationOptions } from '@mkbabb/value.js';
|
|
8
|
-
import type { HueInterpolationMethod } from '@mkbabb/value.js';
|
|
9
|
-
import type { InterpolatedVar } from '@mkbabb/value.js';
|
|
10
|
-
import { ParseDiagnostic } from '@mkbabb/value.js';
|
|
11
|
-
import { PropertyDescriptor as PropertyDescriptor_2 } from '@mkbabb/value.js';
|
|
12
|
-
import { RangeBoundary } from '@mkbabb/value.js';
|
|
13
|
-
import { RangePhase } from '@mkbabb/value.js';
|
|
14
|
-
import { Stylesheet } from '@mkbabb/value.js';
|
|
15
|
-
import type { timingFunctions } from '@mkbabb/value.js';
|
|
16
|
-
import type { TriggerType } from '@mkbabb/value.js';
|
|
17
|
-
import { ValueArray } from '@mkbabb/value.js';
|
|
18
|
-
import { ValueUnit } from '@mkbabb/value.js';
|
|
19
|
-
|
|
20
|
-
declare const accordionExpand:
|
|
1
|
+
import { AnimationRangeValue } from '@mkbabb/value.js/parsing';
|
|
2
|
+
import { AnimationTimelineValue } from '@mkbabb/value.js/parsing';
|
|
3
|
+
import type { AnimationTriggerValue } from '@mkbabb/value.js/parsing';
|
|
4
|
+
import type { ColorSpace } from '@mkbabb/value.js/color';
|
|
5
|
+
import { CSSTimelineOptions } from '@mkbabb/value.js/parsing';
|
|
6
|
+
import { CustomFunctionDescriptor } from '@mkbabb/value.js/parsing';
|
|
7
|
+
import { extractAnimationOptions } from '@mkbabb/value.js/parsing';
|
|
8
|
+
import type { HueInterpolationMethod } from '@mkbabb/value.js/color';
|
|
9
|
+
import type { InterpolatedVar } from '@mkbabb/value.js/units';
|
|
10
|
+
import { ParseDiagnostic } from '@mkbabb/value.js/parsing';
|
|
11
|
+
import { PropertyDescriptor as PropertyDescriptor_2 } from '@mkbabb/value.js/parsing';
|
|
12
|
+
import { RangeBoundary } from '@mkbabb/value.js/parsing';
|
|
13
|
+
import { RangePhase } from '@mkbabb/value.js/parsing';
|
|
14
|
+
import { Stylesheet } from '@mkbabb/value.js/parsing';
|
|
15
|
+
import type { timingFunctions } from '@mkbabb/value.js/easing';
|
|
16
|
+
import type { TriggerType } from '@mkbabb/value.js/parsing';
|
|
17
|
+
import { ValueArray } from '@mkbabb/value.js/units';
|
|
18
|
+
import { ValueUnit } from '@mkbabb/value.js/units';
|
|
19
|
+
|
|
20
|
+
declare const accordionExpand: PresetFactory;
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* The outcome of an {@link adoptRunning} takeover. `animation` is the kf object
|
|
@@ -175,6 +175,14 @@ export declare class AnimationGroup<V extends Vars> {
|
|
|
175
175
|
lastTickTime: number;
|
|
176
176
|
/** THE rAF owner for the group's draw loop. */
|
|
177
177
|
readonly playback: RAFPlayback;
|
|
178
|
+
/** Native effects installed by the additive group-WAAPI fast lane.
|
|
179
|
+
* INTERNAL: lifecycle owns pause/resume/cancel; an empty array means the
|
|
180
|
+
* group is on its ordinary rAF compositor path. */
|
|
181
|
+
readonly _waAnimations: globalThis.Animation[];
|
|
182
|
+
/** True while the current play is delegated to native effects. The group
|
|
183
|
+
* still runs its shadow transport loop so events and completion retain the
|
|
184
|
+
* rAF contract, but it does not overwrite native compositor output. */
|
|
185
|
+
_waapiDelegated: boolean;
|
|
178
186
|
resolvePromise: ((value: void | PromiseLike<void>) => void) | null;
|
|
179
187
|
/** The ONE held play promise the `finished` front-door exposes. INTERNAL
|
|
180
188
|
* (S.B5) — read/written by the transport free functions in `./lifecycle`. */
|
|
@@ -187,6 +195,7 @@ export declare class AnimationGroup<V extends Vars> {
|
|
|
187
195
|
private _entriesDirty;
|
|
188
196
|
/** Long-lived composite buffer, cleared in place each frame (zero-alloc).
|
|
189
197
|
* INTERNAL (R.W2) — read/written by `./compositor`. */
|
|
198
|
+
readonly _compositeState: CompositeState;
|
|
190
199
|
_grouped: Record<string, unknown>;
|
|
191
200
|
/** The compile-stable union of every child's contributed keys — what `_grouped`
|
|
192
201
|
* is null-filled to each frame so the composite clears WITHOUT `delete` (F.W4
|
|
@@ -263,7 +272,7 @@ export declare class AnimationGroup<V extends Vars> {
|
|
|
263
272
|
* draw loop owns the ticking). Body in `./lifecycle` (S.B5). */
|
|
264
273
|
resume(): this;
|
|
265
274
|
/** The explicit flip: pauses if playing, resumes if paused. */
|
|
266
|
-
toggle():
|
|
275
|
+
toggle(): void;
|
|
267
276
|
/** Pure state teardown — never paints. Releases every child (`managed = false`,
|
|
268
277
|
* `child.settle()`) and clears the group flags. Body in `./lifecycle` (S.B5). */
|
|
269
278
|
settle(): this;
|
|
@@ -362,6 +371,8 @@ declare interface AnimationLayerConfig {
|
|
|
362
371
|
* blends by replacement, the least-surprising composite.
|
|
363
372
|
*/
|
|
364
373
|
blendMode: BlendMode;
|
|
374
|
+
/** Canonical composition operation. Omission preserves `blendMode` callers. */
|
|
375
|
+
op?: CompositeOperator;
|
|
365
376
|
/** Layer toggle. Default: true */
|
|
366
377
|
enabled: boolean;
|
|
367
378
|
/** Optional property whitelist — only these properties will be output from this layer */
|
|
@@ -412,26 +423,22 @@ export { AnimationRangeValue }
|
|
|
412
423
|
|
|
413
424
|
export { AnimationTimelineValue }
|
|
414
425
|
|
|
415
|
-
|
|
416
|
-
declare const attentionPresets: {
|
|
417
|
-
readonly pulse: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
418
|
-
readonly shake: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
419
|
-
readonly bounce: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
420
|
-
readonly flip: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
421
|
-
readonly notificationBounce: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
422
|
-
readonly springPop: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
423
|
-
readonly springWobble: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
424
|
-
};
|
|
426
|
+
declare const attentionPresets: Readonly<Record<string, PresetFactory>>;
|
|
425
427
|
|
|
426
|
-
|
|
428
|
+
/**
|
|
429
|
+
* Public layer vocabulary. `weighted` is retained as a compatibility alias;
|
|
430
|
+
* the canonical operation axis is {@link CompositeOperator}. `accumulate` is
|
|
431
|
+
* additive and maps to the same un-clamped fold as `add` at group scope.
|
|
432
|
+
*/
|
|
433
|
+
declare type BlendMode = CompositeOperator | "weighted";
|
|
427
434
|
|
|
428
|
-
declare const blurIn:
|
|
435
|
+
declare const blurIn: PresetFactory;
|
|
429
436
|
|
|
430
|
-
declare const blurInOut:
|
|
437
|
+
declare const blurInOut: PresetFactory;
|
|
431
438
|
|
|
432
|
-
declare const blurOut:
|
|
439
|
+
declare const blurOut: PresetFactory;
|
|
433
440
|
|
|
434
|
-
declare const bounce:
|
|
441
|
+
declare const bounce: PresetFactory;
|
|
435
442
|
|
|
436
443
|
/** The compile result — the artifact + the CC-3 ineligibility report. */
|
|
437
444
|
declare interface CompiledCSS {
|
|
@@ -474,6 +481,12 @@ declare type CompileInput<V extends Vars = Vars> = AnimationGroup<V> | Sequence<
|
|
|
474
481
|
animation: KeyframesAnimation<V>;
|
|
475
482
|
}>;
|
|
476
483
|
|
|
484
|
+
/**
|
|
485
|
+
* The reason a child could not compile faithfully. Generalizes
|
|
486
|
+
* `waapiIneligibleReason` to the CSS-compile domain — the trust surface. Each
|
|
487
|
+
* names the kf axis that exceeds pure CSS (the refusal is marketing for the
|
|
488
|
+
* moat). A refused child's JS playback is the only faithful path.
|
|
489
|
+
*/
|
|
477
490
|
/** Options for {@link compileToCSS}. */
|
|
478
491
|
declare interface CompileOptions {
|
|
479
492
|
/**
|
|
@@ -503,21 +516,12 @@ declare interface CompileOptions {
|
|
|
503
516
|
printWidth?: number;
|
|
504
517
|
}
|
|
505
518
|
|
|
506
|
-
/** A single refusal — the child name + a typed reason + a human message. */
|
|
507
519
|
declare interface CompileRefusal {
|
|
508
|
-
/** The compiled child's class/animation name. */
|
|
509
520
|
name: string;
|
|
510
521
|
reason: CompileRefusalReason;
|
|
511
|
-
/** The verbatim message the demo's ineligibility UI shows (CC-4). */
|
|
512
522
|
message: string;
|
|
513
523
|
}
|
|
514
524
|
|
|
515
|
-
/**
|
|
516
|
-
* The reason a child could not compile faithfully. Generalizes
|
|
517
|
-
* `waapiIneligibleReason` to the CSS-compile domain — the trust surface. Each
|
|
518
|
-
* names the kf axis that exceeds pure CSS (the refusal is marketing for the
|
|
519
|
-
* moat). A refused child's JS playback is the only faithful path.
|
|
520
|
-
*/
|
|
521
525
|
declare type CompileRefusalReason = "weighted-blend" | "custom-renderer" | "perceptual-oklab" | "computed-unit-drift";
|
|
522
526
|
|
|
523
527
|
/**
|
|
@@ -573,6 +577,18 @@ export declare function compileToViewTransition<V extends Vars>(spec: Record<str
|
|
|
573
577
|
*/
|
|
574
578
|
declare type CompositeOperator = "replace" | "add" | "accumulate";
|
|
575
579
|
|
|
580
|
+
/** Stable, compositor-owned leaves. Foreign frame arrays are copied, never retained. */
|
|
581
|
+
declare class CompositeState {
|
|
582
|
+
readonly values: Record<string, unknown>;
|
|
583
|
+
private keys;
|
|
584
|
+
private readonly epochs;
|
|
585
|
+
private epoch;
|
|
586
|
+
configure(keys: string[]): void;
|
|
587
|
+
clear(): void;
|
|
588
|
+
copy(key: string, incoming: unknown): unknown;
|
|
589
|
+
pruneInactive(): void;
|
|
590
|
+
}
|
|
591
|
+
|
|
576
592
|
/**
|
|
577
593
|
* Construct a `ScrollScene` from a parsed `CSSTimelineOptions` (the SO-1 parse
|
|
578
594
|
* output) OR a direct `ScrollSceneOptions` spec. The CSS-fed construction is the
|
|
@@ -684,14 +700,13 @@ export declare const defaultOptions: AnimationOptions;
|
|
|
684
700
|
|
|
685
701
|
/**
|
|
686
702
|
* A structured parse/honoring diagnostic (K.W7 S4). Extends the value.js
|
|
687
|
-
*
|
|
703
|
+
* parser diagnostic shape (the consumed shape — `message`/`offset`/`line`/
|
|
688
704
|
* `column`/`expected`/`input`) with a stable kf-side {@link DiagnosticCode} and
|
|
689
705
|
* an optional `property` (the leaf a `COMPOSITION_FALLBACK` names). The
|
|
690
706
|
* value.js half (`message`/`offset`/…) is `Partial` because the engine-internal
|
|
691
707
|
* rows (EMPTY_PARSE, COMPOSITION_FALLBACK) are NOT byte-offset parse failures —
|
|
692
|
-
* they carry a `message` + `code` only
|
|
693
|
-
*
|
|
694
|
-
* re-author of the producer: it CONSUMES `ParseDiagnostic`'s field shape and
|
|
708
|
+
* they carry a `message` + `code` only. Positional fields are retained for
|
|
709
|
+
* ingest callers that attach source locations.
|
|
695
710
|
* widens it with the stable code (inv-16 published-only consumption holds).
|
|
696
711
|
*/
|
|
697
712
|
declare interface Diagnostic extends Partial<ParseDiagnostic> {
|
|
@@ -710,8 +725,7 @@ declare interface Diagnostic extends Partial<ParseDiagnostic> {
|
|
|
710
725
|
* lifted onto the structured field). The engine-internal rows
|
|
711
726
|
* (`EMPTY_PARSE`/`UNKNOWN_TIMING_FN`) were J.W1-landed as typed throws; W7 lifts
|
|
712
727
|
* them onto this field. `COMPOSITION_FALLBACK` is the K.W7 honesty row (the
|
|
713
|
-
* non-numeric composite leaf's refusal).
|
|
714
|
-
* `OnParseError` producer's structured diagnostic verbatim. The CORS-skip /
|
|
728
|
+
* non-numeric composite leaf's refusal). The CORS-skip /
|
|
715
729
|
* WAAPI-reason rows are AUTHORED here but POPULATED by K.W8 (which owns the
|
|
716
730
|
* CSSOM walk that produces them).
|
|
717
731
|
*/
|
|
@@ -765,6 +779,14 @@ export declare interface DrawSVGOptions extends Partial<InputAnimationOptions> {
|
|
|
765
779
|
autoPlay?: boolean;
|
|
766
780
|
}
|
|
767
781
|
|
|
782
|
+
/**
|
|
783
|
+
* Compose the parsed scroll CSS into its range scene, optional trigger scene,
|
|
784
|
+
* and conservative native/JS backend decision. No declaration is reparsed:
|
|
785
|
+
* the exact `CSSTimelineOptions` returned by `parseScrollCSS` is fanned out to
|
|
786
|
+
* every lane, preserving parse→drive symmetry.
|
|
787
|
+
*/
|
|
788
|
+
export declare function driveScrollCSS<V extends Vars = Vars>(options: CSSTimelineOptions, target?: ScrollDriveTarget<V>, driverOptions?: ScrollDriveOptions<V>): ScrollCSSDrive<V>;
|
|
789
|
+
|
|
768
790
|
/**
|
|
769
791
|
* The typed easing value — a callable curve plus, when one exists, the CSS
|
|
770
792
|
* easing string that reproduces it (e.g. a spring's `linear()` stops).
|
|
@@ -782,18 +804,7 @@ declare interface Easing {
|
|
|
782
804
|
css?: string;
|
|
783
805
|
}
|
|
784
806
|
|
|
785
|
-
|
|
786
|
-
declare const enterPresets: {
|
|
787
|
-
readonly fadeIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
788
|
-
readonly slideIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
789
|
-
readonly slideInLeft: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
790
|
-
readonly slideInRight: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
791
|
-
readonly rotateIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
792
|
-
readonly blurIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
793
|
-
readonly springScaleIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
794
|
-
readonly springSlideIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
795
|
-
readonly jumpUp: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
796
|
-
};
|
|
807
|
+
declare const enterPresets: Readonly<Record<string, PresetFactory>>;
|
|
797
808
|
|
|
798
809
|
/** Options for {@link compileToEntry}. */
|
|
799
810
|
export declare interface EntryCompileOptions {
|
|
@@ -830,16 +841,7 @@ export declare interface EntryRoleSpec<V extends Vars = Vars> {
|
|
|
830
841
|
exit?: KeyframesAnimation<V>;
|
|
831
842
|
}
|
|
832
843
|
|
|
833
|
-
|
|
834
|
-
declare const exitPresets: {
|
|
835
|
-
readonly fadeOut: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
836
|
-
readonly slideOutLeft: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
837
|
-
readonly slideOutRight: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
838
|
-
readonly blurOut: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
839
|
-
readonly warpLeft: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
840
|
-
readonly warpRight: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
841
|
-
readonly jumpDown: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
842
|
-
};
|
|
844
|
+
declare const exitPresets: Readonly<Record<string, PresetFactory>>;
|
|
843
845
|
|
|
844
846
|
/**
|
|
845
847
|
* `explain(css, opts?)` — the human/LLM-readable companion. Calls
|
|
@@ -863,13 +865,13 @@ declare const exitPresets: {
|
|
|
863
865
|
*/
|
|
864
866
|
export declare function explain(css: string, opts?: ValidateOptions): Promise<string>;
|
|
865
867
|
|
|
866
|
-
declare const fadeIn:
|
|
868
|
+
declare const fadeIn: PresetFactory;
|
|
867
869
|
|
|
868
|
-
declare const fadeOut:
|
|
870
|
+
declare const fadeOut: PresetFactory;
|
|
869
871
|
|
|
870
872
|
export declare const FILL_MODES: readonly ["none", "forwards", "backwards", "both"];
|
|
871
873
|
|
|
872
|
-
declare const flipPreset:
|
|
874
|
+
declare const flipPreset: PresetFactory;
|
|
873
875
|
|
|
874
876
|
export declare function formatCSSKeyframeString(keyframe: string): string;
|
|
875
877
|
|
|
@@ -1096,13 +1098,13 @@ export declare const getAnimationId: (animation: AnimationIdentity | string) =>
|
|
|
1096
1098
|
*/
|
|
1097
1099
|
export declare const getTimingFunction: (timingFunction: TimingFunction | TimingFunctionNames | string | undefined) => TimingFunction | undefined;
|
|
1098
1100
|
|
|
1099
|
-
declare const glow:
|
|
1101
|
+
declare const glow: PresetFactory;
|
|
1100
1102
|
|
|
1101
|
-
declare const gradientBackground:
|
|
1103
|
+
declare const gradientBackground: PresetFactory;
|
|
1102
1104
|
|
|
1103
|
-
declare const heartbeat:
|
|
1105
|
+
declare const heartbeat: PresetFactory;
|
|
1104
1106
|
|
|
1105
|
-
declare const hover:
|
|
1107
|
+
declare const hover: PresetFactory;
|
|
1106
1108
|
|
|
1107
1109
|
/**
|
|
1108
1110
|
* One ingested animation + the diagnostics its reconstruction produced. The
|
|
@@ -1174,9 +1176,9 @@ declare type InputAnimationOptions = Partial<{
|
|
|
1174
1176
|
composite?: CompositeOperator;
|
|
1175
1177
|
}>;
|
|
1176
1178
|
|
|
1177
|
-
declare const jumpDown:
|
|
1179
|
+
declare const jumpDown: PresetFactory;
|
|
1178
1180
|
|
|
1179
|
-
declare const jumpUp:
|
|
1181
|
+
declare const jumpUp: PresetFactory;
|
|
1180
1182
|
|
|
1181
1183
|
/**
|
|
1182
1184
|
* The core animation engine — keyframes, timing, interpolation, playback.
|
|
@@ -1235,6 +1237,8 @@ export declare class KeyframesAnimation<V extends Vars = Vars> {
|
|
|
1235
1237
|
* per-element numeric base `add`/`accumulate` accumulates ONTO; empty for a
|
|
1236
1238
|
* pure-`replace` animation. INTERNAL — read by `./interpolate` (R.W2). */
|
|
1237
1239
|
_compositionBase: Map<string, number[]>;
|
|
1240
|
+
/** Parsed underlying CSS pose, cached once per property for a capture run. */
|
|
1241
|
+
_compositionPose: Map<string, number[]>;
|
|
1238
1242
|
/** Properties whose non-numeric composite already emitted its
|
|
1239
1243
|
* `COMPOSITION_FALLBACK` row (once per property, not per frame). INTERNAL —
|
|
1240
1244
|
* read by `./interpolate` (R.W2). */
|
|
@@ -1348,7 +1352,7 @@ export declare class KeyframesAnimation<V extends Vars = Vars> {
|
|
|
1348
1352
|
pause(): this;
|
|
1349
1353
|
resume(): this;
|
|
1350
1354
|
/** The explicit flip: pauses if playing, resumes if paused. */
|
|
1351
|
-
toggle():
|
|
1355
|
+
toggle(): void;
|
|
1352
1356
|
stop(): void;
|
|
1353
1357
|
playing(): boolean;
|
|
1354
1358
|
get effectiveT(): number;
|
|
@@ -1366,18 +1370,7 @@ export declare class KeyframesAnimation<V extends Vars = Vars> {
|
|
|
1366
1370
|
*/
|
|
1367
1371
|
declare type LayerTransitionSpring = Partial<Omit<SpringProgressOptions, "initial" | "initialVelocity">>;
|
|
1368
1372
|
|
|
1369
|
-
|
|
1370
|
-
declare const loopPresets: {
|
|
1371
|
-
readonly heartbeat: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1372
|
-
readonly glow: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1373
|
-
readonly spinner: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1374
|
-
readonly rainbowText: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1375
|
-
readonly skeletonLoading: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1376
|
-
readonly gradientBackground: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1377
|
-
readonly parallaxScroll: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1378
|
-
readonly hover: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1379
|
-
readonly typingCursor: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1380
|
-
};
|
|
1373
|
+
declare const loopPresets: Readonly<Record<string, PresetFactory>>;
|
|
1381
1374
|
|
|
1382
1375
|
/** A sampled point on a path polyline. */
|
|
1383
1376
|
export declare interface MorphPoint {
|
|
@@ -1528,7 +1521,7 @@ declare type NativeTimelineSpec = {
|
|
|
1528
1521
|
inset?: string;
|
|
1529
1522
|
};
|
|
1530
1523
|
|
|
1531
|
-
declare const notificationBounce:
|
|
1524
|
+
declare const notificationBounce: PresetFactory;
|
|
1532
1525
|
|
|
1533
1526
|
/**
|
|
1534
1527
|
* Q.WB3 S2 — the precomputed SoA fold layout for ONE compiled frame's NUMERIC
|
|
@@ -1563,7 +1556,7 @@ declare interface NumericFoldPlan<V extends Vars> {
|
|
|
1563
1556
|
*/
|
|
1564
1557
|
export declare type OffsetPath = string;
|
|
1565
1558
|
|
|
1566
|
-
declare const parallaxScroll:
|
|
1559
|
+
declare const parallaxScroll: PresetFactory;
|
|
1567
1560
|
|
|
1568
1561
|
declare type ParsedVarMap = Record<string, ValueArray>;
|
|
1569
1562
|
|
|
@@ -1691,6 +1684,8 @@ declare class PlaybackState {
|
|
|
1691
1684
|
constructor(frameCb: (t: number) => boolean | Promise<boolean>);
|
|
1692
1685
|
}
|
|
1693
1686
|
|
|
1687
|
+
declare type PresetFactory = (options?: InputAnimationOptions) => CSSKeyframesAnimation<any>;
|
|
1688
|
+
|
|
1694
1689
|
export declare namespace presets {
|
|
1695
1690
|
export {
|
|
1696
1691
|
fadeIn,
|
|
@@ -1739,57 +1734,16 @@ export declare namespace presets {
|
|
|
1739
1734
|
}
|
|
1740
1735
|
}
|
|
1741
1736
|
|
|
1742
|
-
/**
|
|
1743
|
-
* The full preset taxonomy, grouped by intent. Each leaf is one of the
|
|
1744
|
-
* existing exported factory functions — the taxonomy is a discovery index over
|
|
1745
|
-
* the library, not a second copy of it.
|
|
1746
|
-
*/
|
|
1747
1737
|
declare const presetTaxonomy: {
|
|
1748
|
-
readonly enter:
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
readonly slideInRight: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1753
|
-
readonly rotateIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1754
|
-
readonly blurIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1755
|
-
readonly springScaleIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1756
|
-
readonly springSlideIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1757
|
-
readonly jumpUp: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1758
|
-
};
|
|
1759
|
-
readonly exit: {
|
|
1760
|
-
readonly fadeOut: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1761
|
-
readonly slideOutLeft: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1762
|
-
readonly slideOutRight: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1763
|
-
readonly blurOut: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1764
|
-
readonly warpLeft: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1765
|
-
readonly warpRight: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1766
|
-
readonly jumpDown: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1767
|
-
};
|
|
1768
|
-
readonly attention: {
|
|
1769
|
-
readonly pulse: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1770
|
-
readonly shake: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1771
|
-
readonly bounce: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1772
|
-
readonly flip: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1773
|
-
readonly notificationBounce: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1774
|
-
readonly springPop: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1775
|
-
readonly springWobble: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1776
|
-
};
|
|
1777
|
-
readonly loop: {
|
|
1778
|
-
readonly heartbeat: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1779
|
-
readonly glow: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1780
|
-
readonly spinner: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1781
|
-
readonly rainbowText: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1782
|
-
readonly skeletonLoading: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1783
|
-
readonly gradientBackground: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1784
|
-
readonly parallaxScroll: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1785
|
-
readonly hover: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1786
|
-
readonly typingCursor: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
1787
|
-
};
|
|
1738
|
+
readonly enter: Readonly<Record<string, PresetFactory>>;
|
|
1739
|
+
readonly exit: Readonly<Record<string, PresetFactory>>;
|
|
1740
|
+
readonly attention: Readonly<Record<string, PresetFactory>>;
|
|
1741
|
+
readonly loop: Readonly<Record<string, PresetFactory>>;
|
|
1788
1742
|
};
|
|
1789
1743
|
|
|
1790
|
-
declare const progressBar:
|
|
1744
|
+
declare const progressBar: PresetFactory;
|
|
1791
1745
|
|
|
1792
|
-
declare const pulse:
|
|
1746
|
+
declare const pulse: PresetFactory;
|
|
1793
1747
|
|
|
1794
1748
|
/**
|
|
1795
1749
|
* THE managed rAF driver. Owns the rAF handle, start timestamp, dt clock,
|
|
@@ -1909,7 +1863,7 @@ declare interface RAFPlaybackOptions {
|
|
|
1909
1863
|
respectReducedMotion?: boolean | undefined;
|
|
1910
1864
|
}
|
|
1911
1865
|
|
|
1912
|
-
declare const rainbowText:
|
|
1866
|
+
declare const rainbowText: PresetFactory;
|
|
1913
1867
|
|
|
1914
1868
|
export { RangeBoundary }
|
|
1915
1869
|
|
|
@@ -2074,9 +2028,9 @@ export declare const resolveLiveKeyframes: <V extends Vars = Vars>(source?: Docu
|
|
|
2074
2028
|
*/
|
|
2075
2029
|
export declare function resolveRange(range: AnimationRangeValue | undefined): ResolvedRange;
|
|
2076
2030
|
|
|
2077
|
-
declare const rotateIn:
|
|
2031
|
+
declare const rotateIn: PresetFactory;
|
|
2078
2032
|
|
|
2079
|
-
declare const rotateScale:
|
|
2033
|
+
declare const rotateScale: PresetFactory;
|
|
2080
2034
|
|
|
2081
2035
|
/**
|
|
2082
2036
|
* The full SO-1 round-trip in one call: `parse → serialize`. Returns the typed
|
|
@@ -2089,9 +2043,17 @@ export declare function roundTripScrollCSS(input: string | Stylesheet): {
|
|
|
2089
2043
|
declarations: ReturnType<typeof serializeScrollOptions>;
|
|
2090
2044
|
};
|
|
2091
2045
|
|
|
2092
|
-
/**
|
|
2046
|
+
/** The backend selected for a scroll-driven animation. */
|
|
2093
2047
|
export declare type ScrollBackend = "native" | "js";
|
|
2094
2048
|
|
|
2049
|
+
/** The single handle returned by `driveScrollCSS`. */
|
|
2050
|
+
export declare interface ScrollCSSDrive<V extends Vars = Vars> {
|
|
2051
|
+
readonly scene: ScrollScene;
|
|
2052
|
+
readonly trigger?: TriggerScene;
|
|
2053
|
+
readonly backend: ScrollBackend;
|
|
2054
|
+
readonly reason?: string;
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2095
2057
|
/** The dispatch verdict — which backend, and (for JS) the human-readable reason. */
|
|
2096
2058
|
export declare type ScrollDispatch = {
|
|
2097
2059
|
backend: "native";
|
|
@@ -2119,6 +2081,27 @@ export declare interface ScrollDispatchRequest<V extends Vars> {
|
|
|
2119
2081
|
velocity?: boolean | undefined;
|
|
2120
2082
|
}
|
|
2121
2083
|
|
|
2084
|
+
/** Options for the composed `driveScrollCSS` entry. */
|
|
2085
|
+
export declare interface ScrollDriveOptions<V extends Vars = Vars> extends Omit<ScrollSceneOptions, "range"> {
|
|
2086
|
+
/** Explicit native timeline mapping; otherwise it is derived from CSS. */
|
|
2087
|
+
nativeSpec?: NativeTimelineSpec;
|
|
2088
|
+
/** Animation to offer to the native eligibility/attachment lane. */
|
|
2089
|
+
animation?: KeyframesAnimation<V>;
|
|
2090
|
+
/** Force the JS backend for a velocity/non-DOM driver. */
|
|
2091
|
+
velocity?: boolean;
|
|
2092
|
+
/** Native scroll source when the parsed timeline is `scroll()`. */
|
|
2093
|
+
source?: Element | null;
|
|
2094
|
+
/** Native view subject when the parsed timeline is `view()`. */
|
|
2095
|
+
subject?: Element;
|
|
2096
|
+
/** Native timeline axis override (CSS's parsed axis remains the default). */
|
|
2097
|
+
axis?: ScrollTimelineAxis;
|
|
2098
|
+
/** Native view inset override. */
|
|
2099
|
+
inset?: string;
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
/** A positional target may be an animation (for WAAPI) or a view subject. */
|
|
2103
|
+
export declare type ScrollDriveTarget<V extends Vars = Vars> = KeyframesAnimation<V> | Element | null | undefined;
|
|
2104
|
+
|
|
2122
2105
|
/**
|
|
2123
2106
|
* The kf `ScrollScene` JS DRIVER (SO-2). Drives an engine's progress from a raw
|
|
2124
2107
|
* scroll position through the parsed `animation-range`, composing the SHIPPED
|
|
@@ -2278,6 +2261,7 @@ declare class Sequence<V extends Vars = Vars> implements SequencePlayContext<V>
|
|
|
2278
2261
|
_resolvePlay: (() => void) | null;
|
|
2279
2262
|
_playOrigin: number | undefined;
|
|
2280
2263
|
/* Excluded from this release type: _playingPromise */
|
|
2264
|
+
private _duration;
|
|
2281
2265
|
/**
|
|
2282
2266
|
* The scalar playback rate — the single field that drives `timeScale`
|
|
2283
2267
|
* and `reverse`. `_rate = 1` is real-time forward (the existing
|
|
@@ -2566,19 +2550,19 @@ export declare function serializeScrollOptions(opts: CSSTimelineOptions): {
|
|
|
2566
2550
|
"animation-trigger"?: string;
|
|
2567
2551
|
};
|
|
2568
2552
|
|
|
2569
|
-
declare const shake:
|
|
2553
|
+
declare const shake: PresetFactory;
|
|
2570
2554
|
|
|
2571
|
-
declare const skeletonLoading:
|
|
2555
|
+
declare const skeletonLoading: PresetFactory;
|
|
2572
2556
|
|
|
2573
|
-
declare const slideIn:
|
|
2557
|
+
declare const slideIn: PresetFactory;
|
|
2574
2558
|
|
|
2575
|
-
declare const slideInLeft:
|
|
2559
|
+
declare const slideInLeft: PresetFactory;
|
|
2576
2560
|
|
|
2577
|
-
declare const slideInRight:
|
|
2561
|
+
declare const slideInRight: PresetFactory;
|
|
2578
2562
|
|
|
2579
|
-
declare const slideOutLeft:
|
|
2563
|
+
declare const slideOutLeft: PresetFactory;
|
|
2580
2564
|
|
|
2581
|
-
declare const slideOutRight:
|
|
2565
|
+
declare const slideOutRight: PresetFactory;
|
|
2582
2566
|
|
|
2583
2567
|
declare interface SmoothProgressOptions {
|
|
2584
2568
|
/** Damping factor (0, 1]. Higher = faster convergence. Default 0.1 */
|
|
@@ -2637,7 +2621,11 @@ declare interface SoALayerPlan {
|
|
|
2637
2621
|
/** The pure-numeric carrier units the fold seeds the composite buffer from + writes back to. */
|
|
2638
2622
|
carriers: ValueUnit<number>[];
|
|
2639
2623
|
/** The incoming numeric units folded against each carrier (parallel to `carriers`). */
|
|
2640
|
-
|
|
2624
|
+
incomingSlots: Array<{
|
|
2625
|
+
values: Record<string, unknown>;
|
|
2626
|
+
key: string;
|
|
2627
|
+
index: number;
|
|
2628
|
+
}>;
|
|
2641
2629
|
/**
|
|
2642
2630
|
* The keys this layer touches that the SoA fold does NOT cover — a non-array
|
|
2643
2631
|
* carrier (first-touch of a key, or a scalar that a lower layer left
|
|
@@ -2658,10 +2646,9 @@ declare interface SoALayerPlan {
|
|
|
2658
2646
|
boxedKeys: Set<string>;
|
|
2659
2647
|
}
|
|
2660
2648
|
|
|
2661
|
-
declare const spinner:
|
|
2649
|
+
declare const spinner: PresetFactory;
|
|
2662
2650
|
|
|
2663
|
-
|
|
2664
|
-
declare const springPop: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
2651
|
+
declare const springPop: PresetFactory;
|
|
2665
2652
|
|
|
2666
2653
|
/**
|
|
2667
2654
|
* iOS-style spring physics options. The pair `(response, dampingFraction)`
|
|
@@ -2720,17 +2707,11 @@ declare interface SpringProgressOptions {
|
|
|
2720
2707
|
respectReducedMotion: ReducedMotionPolicy;
|
|
2721
2708
|
}
|
|
2722
2709
|
|
|
2723
|
-
|
|
2724
|
-
* Spring-eased scale-in entrance — the canonical iOS "pop" with overshoot.
|
|
2725
|
-
* Uses the bouncy spring (ζ 0.5) so the element settles past 1 before resting.
|
|
2726
|
-
*/
|
|
2727
|
-
declare const springScaleIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
2710
|
+
declare const springScaleIn: PresetFactory;
|
|
2728
2711
|
|
|
2729
|
-
|
|
2730
|
-
declare const springSlideIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
2712
|
+
declare const springSlideIn: PresetFactory;
|
|
2731
2713
|
|
|
2732
|
-
|
|
2733
|
-
declare const springWobble: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
|
|
2714
|
+
declare const springWobble: PresetFactory;
|
|
2734
2715
|
|
|
2735
2716
|
/**
|
|
2736
2717
|
* Feature-detect native `animation-trigger` — Chrome 145+ ships it; nothing else
|
|
@@ -2787,7 +2768,7 @@ declare interface TemplateAnimationFrame<V extends Vars> {
|
|
|
2787
2768
|
composition?: CompositeOperator;
|
|
2788
2769
|
}
|
|
2789
2770
|
|
|
2790
|
-
declare const textFocusBlur:
|
|
2771
|
+
declare const textFocusBlur: PresetFactory;
|
|
2791
2772
|
|
|
2792
2773
|
/**
|
|
2793
2774
|
* A dt-driven stepper the {@link RAFPlayback.drive} loop can own:
|
|
@@ -2964,9 +2945,9 @@ export declare class TriggerScene {
|
|
|
2964
2945
|
*/
|
|
2965
2946
|
export declare type TriggerState = "idle" | "active" | "done";
|
|
2966
2947
|
|
|
2967
|
-
declare const typewriter:
|
|
2948
|
+
declare const typewriter: PresetFactory;
|
|
2968
2949
|
|
|
2969
|
-
declare const typingCursor:
|
|
2950
|
+
declare const typingCursor: PresetFactory;
|
|
2970
2951
|
|
|
2971
2952
|
/**
|
|
2972
2953
|
* `validate(css, opts?)` — the READ-ONLY projection over the three typed channels
|
|
@@ -3008,7 +2989,7 @@ export declare interface ValidateOptions {
|
|
|
3008
2989
|
*/
|
|
3009
2990
|
export declare interface ValidateResult {
|
|
3010
2991
|
/**
|
|
3011
|
-
* True iff
|
|
2992
|
+
* True iff the adapter produced no `EMPTY_PARSE` diagnostic — the
|
|
3012
2993
|
* block surfaced at least one recognized stylesheet item (a `@keyframes` /
|
|
3013
2994
|
* `@property` / style rule). A spec-invalid keyframe `!important` declaration
|
|
3014
2995
|
* is SILENTLY dropped at the AST by value.js (the L.W1 S1 reality) — that drop
|
|
@@ -3100,9 +3081,9 @@ declare type WAAPIEligibility = {
|
|
|
3100
3081
|
reason: string;
|
|
3101
3082
|
};
|
|
3102
3083
|
|
|
3103
|
-
declare const warpLeft:
|
|
3084
|
+
declare const warpLeft: PresetFactory;
|
|
3104
3085
|
|
|
3105
|
-
declare const warpRight:
|
|
3086
|
+
declare const warpRight: PresetFactory;
|
|
3106
3087
|
|
|
3107
3088
|
/**
|
|
3108
3089
|
* The minimal stepper surface a spring-driven blend weight reads (K.W11
|