motion-dom 13.4.5 → 13.5.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/cjs/index.js +413 -346
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/animation/FollowAnimation.mjs +1 -4
- package/dist/es/animation/FollowAnimation.mjs.map +1 -1
- package/dist/es/animation/NativeAnimation.mjs +2 -5
- package/dist/es/animation/NativeAnimation.mjs.map +1 -1
- package/dist/es/animation/drivers/frame.mjs +2 -1
- package/dist/es/animation/drivers/frame.mjs.map +1 -1
- package/dist/es/animation/generators/spring.mjs +64 -35
- package/dist/es/animation/generators/spring.mjs.map +1 -1
- package/dist/es/animation/utils/notify-inspector.mjs +1 -1
- package/dist/es/animation/utils/notify-inspector.mjs.map +1 -1
- package/dist/es/frameloop/batcher.mjs +5 -6
- package/dist/es/frameloop/batcher.mjs.map +1 -1
- package/dist/es/frameloop/frame-data.mjs +12 -0
- package/dist/es/frameloop/frame-data.mjs.map +1 -0
- package/dist/es/frameloop/frame.mjs +3 -2
- package/dist/es/frameloop/frame.mjs.map +1 -1
- package/dist/es/frameloop/sync-time.mjs +1 -1
- package/dist/es/frameloop/sync-time.mjs.map +1 -1
- package/dist/es/index.mjs +2 -2
- package/dist/es/layout/LayoutAnimationBuilder.mjs +2 -1
- package/dist/es/layout/LayoutAnimationBuilder.mjs.map +1 -1
- package/dist/es/projection/animation/mix-values.mjs +1 -1
- package/dist/es/projection/animation/mix-values.mjs.map +1 -1
- package/dist/es/projection/node/create-projection-node.mjs +11 -1
- package/dist/es/projection/node/create-projection-node.mjs.map +1 -1
- package/dist/es/projection/styles/default-scale-correctors.mjs +18 -0
- package/dist/es/projection/styles/default-scale-correctors.mjs.map +1 -0
- package/dist/es/projection/styles/scale-correction.mjs +1 -14
- package/dist/es/projection/styles/scale-correction.mjs.map +1 -1
- package/dist/es/projection/utils/each-axis.mjs.map +1 -1
- package/dist/es/render/VisualElement.mjs +12 -2
- package/dist/es/render/VisualElement.mjs.map +1 -1
- package/dist/es/render/svg/SVGVisualElement.mjs +19 -1
- package/dist/es/render/svg/SVGVisualElement.mjs.map +1 -1
- package/dist/es/value/follow-value.mjs +8 -85
- package/dist/es/value/follow-value.mjs.map +1 -1
- package/dist/es/value/spring-value.mjs +8 -3
- package/dist/es/value/spring-value.mjs.map +1 -1
- package/dist/es/value/utils/as-number.mjs +4 -0
- package/dist/es/value/utils/as-number.mjs.map +1 -0
- package/dist/es/value/utils/follow.mjs +94 -0
- package/dist/es/value/utils/follow.mjs.map +1 -0
- package/dist/index.d.ts +30 -14
- package/dist/motion-dom.dev.js +413 -346
- package/dist/motion-dom.js +1 -1
- package/dist/size-rollup-motion-value.js +1 -1
- package/dist/size-rollup-motion-value.js.map +1 -1
- package/dist/size-rollup-style-effect.js +1 -1
- package/dist/size-rollup-style-effect.js.map +1 -1
- package/package.json +6 -5
- package/dist/es/scroll/observe.mjs +0 -19
- package/dist/es/scroll/observe.mjs.map +0 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { FollowAnimation } from '../../animation/FollowAnimation.mjs';
|
|
2
|
+
import { asNumber } from './as-number.mjs';
|
|
3
|
+
import { isMotionValue } from './is-motion-value.mjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Animate `value` to its latest value with the generator in
|
|
7
|
+
* `options.type`, tracking `source` if it's a `MotionValue`. Takes a
|
|
8
|
+
* generator rather than a type name, so spring-only callers don't
|
|
9
|
+
* bundle every generator.
|
|
10
|
+
*/
|
|
11
|
+
function follow(value, source, options) {
|
|
12
|
+
const initialValue = value.get();
|
|
13
|
+
let activeAnimation = null;
|
|
14
|
+
let set;
|
|
15
|
+
const unit = typeof initialValue === "string"
|
|
16
|
+
? initialValue.replace(/[\d.-]/g, "")
|
|
17
|
+
: undefined;
|
|
18
|
+
const onUpdate = (v) => set((unit ? v + unit : v));
|
|
19
|
+
const onPlay = () => value["events"].animationStart?.notify();
|
|
20
|
+
const stopAnimation = () => {
|
|
21
|
+
if (activeAnimation) {
|
|
22
|
+
activeAnimation.stop();
|
|
23
|
+
activeAnimation = null;
|
|
24
|
+
}
|
|
25
|
+
value.animation = undefined;
|
|
26
|
+
};
|
|
27
|
+
value.attach((v, safeSet) => {
|
|
28
|
+
set = safeSet;
|
|
29
|
+
const target = asNumber(v);
|
|
30
|
+
if (activeAnimation?.state === "running") {
|
|
31
|
+
/**
|
|
32
|
+
* Steer the running animation rather than replacing it. This
|
|
33
|
+
* keeps its completion promise and uses its analytical velocity
|
|
34
|
+
* for accuracy, preventing systematic velocity loss at high
|
|
35
|
+
* frame rates (240hz+).
|
|
36
|
+
*/
|
|
37
|
+
activeAnimation.setTarget(target, options.velocity);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const current = asNumber(value.get());
|
|
41
|
+
const velocity = activeAnimation
|
|
42
|
+
? activeAnimation.getGeneratorVelocity()
|
|
43
|
+
: value.getVelocity();
|
|
44
|
+
stopAnimation();
|
|
45
|
+
// Don't animate if we're already at the target
|
|
46
|
+
if (current === target)
|
|
47
|
+
return;
|
|
48
|
+
const animationOptions = {
|
|
49
|
+
keyframes: [current, target],
|
|
50
|
+
velocity,
|
|
51
|
+
restDelta: 0.001,
|
|
52
|
+
restSpeed: 0.01,
|
|
53
|
+
...options,
|
|
54
|
+
onUpdate,
|
|
55
|
+
};
|
|
56
|
+
const animation = (activeAnimation = new FollowAnimation({
|
|
57
|
+
...animationOptions,
|
|
58
|
+
onPlay,
|
|
59
|
+
}));
|
|
60
|
+
value.animation = animation;
|
|
61
|
+
animation.then(() => {
|
|
62
|
+
// Ignore if this animation has since been replaced
|
|
63
|
+
if (activeAnimation !== animation)
|
|
64
|
+
return;
|
|
65
|
+
activeAnimation = null;
|
|
66
|
+
value.animation = undefined;
|
|
67
|
+
value["events"].animationComplete?.notify();
|
|
68
|
+
});
|
|
69
|
+
}, stopAnimation);
|
|
70
|
+
if (isMotionValue(source)) {
|
|
71
|
+
let skipNextAnimation = options.skipInitialAnimation === true;
|
|
72
|
+
const removeSourceOnChange = source.on("change", (v) => {
|
|
73
|
+
if (skipNextAnimation) {
|
|
74
|
+
skipNextAnimation = false;
|
|
75
|
+
value.jump(parseValue(v, unit), false);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
value.set(parseValue(v, unit));
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
const removeValueOnDestroy = value.on("destroy", removeSourceOnChange);
|
|
82
|
+
return () => {
|
|
83
|
+
removeSourceOnChange();
|
|
84
|
+
removeValueOnDestroy();
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
return stopAnimation;
|
|
88
|
+
}
|
|
89
|
+
function parseValue(v, unit) {
|
|
90
|
+
return unit ? v + unit : v;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export { follow };
|
|
94
|
+
//# sourceMappingURL=follow.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"follow.mjs","sources":["../../../../src/value/utils/follow.ts"],"sourcesContent":["import type { MotionValue } from \"..\"\nimport { FollowAnimation } from \"../../animation/FollowAnimation\"\nimport type {\n AnyResolvedKeyframe,\n GeneratorFactory,\n ValueAnimationOptions,\n} from \"../../animation/types\"\nimport type { FollowValueOptions } from \"../follow-value\"\nimport { asNumber } from \"./as-number\"\nimport { isMotionValue } from \"./is-motion-value\"\n\nexport type FollowOptions = FollowValueOptions & { type: GeneratorFactory }\n\n/**\n * Animate `value` to its latest value with the generator in\n * `options.type`, tracking `source` if it's a `MotionValue`. Takes a\n * generator rather than a type name, so spring-only callers don't\n * bundle every generator.\n */\nexport function follow<T extends AnyResolvedKeyframe>(\n value: MotionValue<T>,\n source: T | MotionValue<T>,\n options: FollowOptions\n): VoidFunction {\n const initialValue = value.get()\n\n let activeAnimation: FollowAnimation | null = null\n let set: (v: T) => void\n\n const unit =\n typeof initialValue === \"string\"\n ? initialValue.replace(/[\\d.-]/g, \"\")\n : undefined\n\n const onUpdate = (v: number) => set((unit ? v + unit : v) as T)\n\n const onPlay = () => value[\"events\"].animationStart?.notify()\n\n const stopAnimation = () => {\n if (activeAnimation) {\n activeAnimation.stop()\n activeAnimation = null\n }\n value.animation = undefined\n }\n\n value.attach((v, safeSet) => {\n set = safeSet\n const target = asNumber(v)\n\n if (activeAnimation?.state === \"running\") {\n /**\n * Steer the running animation rather than replacing it. This\n * keeps its completion promise and uses its analytical velocity\n * for accuracy, preventing systematic velocity loss at high\n * frame rates (240hz+).\n */\n activeAnimation.setTarget(target, options.velocity)\n return\n }\n\n const current = asNumber(value.get())\n const velocity = activeAnimation\n ? activeAnimation.getGeneratorVelocity()\n : value.getVelocity()\n\n stopAnimation()\n\n // Don't animate if we're already at the target\n if (current === target) return\n\n const animationOptions: ValueAnimationOptions<number> = {\n keyframes: [current, target],\n velocity,\n restDelta: 0.001,\n restSpeed: 0.01,\n ...options,\n onUpdate,\n }\n\n const animation = (activeAnimation = new FollowAnimation({\n ...animationOptions,\n onPlay,\n }))\n\n value.animation = animation\n\n animation.then(() => {\n // Ignore if this animation has since been replaced\n if (activeAnimation !== animation) return\n activeAnimation = null\n value.animation = undefined\n value[\"events\"].animationComplete?.notify()\n })\n }, stopAnimation)\n\n if (isMotionValue(source)) {\n let skipNextAnimation = options.skipInitialAnimation === true\n\n const removeSourceOnChange = source.on(\"change\", (v) => {\n if (skipNextAnimation) {\n skipNextAnimation = false\n value.jump(parseValue(v, unit) as T, false)\n } else {\n value.set(parseValue(v, unit) as T)\n }\n })\n\n const removeValueOnDestroy = value.on(\"destroy\", removeSourceOnChange)\n\n return () => {\n removeSourceOnChange()\n removeValueOnDestroy()\n }\n }\n\n return stopAnimation\n}\n\nfunction parseValue(v: AnyResolvedKeyframe, unit?: string) {\n return unit ? v + unit : v\n}\n"],"names":[],"mappings":";;;;AAaA;;;;;AAKG;SACa,MAAM,CAClB,KAAqB,EACrB,MAA0B,EAC1B,OAAsB,EAAA;AAEtB,IAAA,MAAM,YAAY,GAA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AI,GAAG,CAAC;AAC9B;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1562,6 +1562,12 @@ declare abstract class VisualElement<Instance = unknown, RenderState = unknown,
|
|
|
1562
1562
|
* It's currently used to measure SVG elements when a new transform property is bound.
|
|
1563
1563
|
*/
|
|
1564
1564
|
onBindTransform?(): void;
|
|
1565
|
+
/**
|
|
1566
|
+
* The value getValue starts a new motion value from when it isn't given
|
|
1567
|
+
* a default. Without it, values start unread and the keyframe resolver
|
|
1568
|
+
* reads their origin.
|
|
1569
|
+
*/
|
|
1570
|
+
getDefaultValue?(key: string): AnyResolvedKeyframe | undefined;
|
|
1565
1571
|
/**
|
|
1566
1572
|
* If the component child is provided as a motion value, handle subscriptions
|
|
1567
1573
|
* with the renderer-specific VisualElement.
|
|
@@ -1809,7 +1815,7 @@ declare abstract class VisualElement<Instance = unknown, RenderState = unknown,
|
|
|
1809
1815
|
/**
|
|
1810
1816
|
* An update function. It accepts a timestamp used to advance the animation.
|
|
1811
1817
|
*/
|
|
1812
|
-
type Update
|
|
1818
|
+
type Update = (timestamp: number) => void;
|
|
1813
1819
|
/**
|
|
1814
1820
|
* Drivers accept a update function and call it at an interval. This interval
|
|
1815
1821
|
* could be a synchronous loop, a setInterval, or tied to the device's framerate.
|
|
@@ -1819,7 +1825,7 @@ interface DriverControls {
|
|
|
1819
1825
|
stop: () => void;
|
|
1820
1826
|
now: () => number;
|
|
1821
1827
|
}
|
|
1822
|
-
type Driver = (update: Update
|
|
1828
|
+
type Driver = (update: Update) => DriverControls;
|
|
1823
1829
|
|
|
1824
1830
|
/**
|
|
1825
1831
|
* What the DOM keyframe resolver needs from the thing rendering a value:
|
|
@@ -1866,8 +1872,10 @@ interface ValueAnimationOptionsWithRenderContext<V extends AnyResolvedKeyframe =
|
|
|
1866
1872
|
}
|
|
1867
1873
|
interface TimelineWithFallback {
|
|
1868
1874
|
timeline?: ProgressTimeline;
|
|
1869
|
-
|
|
1870
|
-
|
|
1875
|
+
/**
|
|
1876
|
+
* Called with the WAAPI animation once it's attached to `timeline`.
|
|
1877
|
+
*/
|
|
1878
|
+
onAttach?: (animation: Animation) => void;
|
|
1871
1879
|
observe: (animation: AnimationPlaybackControls) => VoidFunction;
|
|
1872
1880
|
}
|
|
1873
1881
|
/**
|
|
@@ -2051,7 +2059,9 @@ interface DurationSpringOptions {
|
|
|
2051
2059
|
/**
|
|
2052
2060
|
* `bounce` determines the "bounciness" of a spring animation.
|
|
2053
2061
|
*
|
|
2054
|
-
* `0` is no bounce, and `1` is extremely bouncy.
|
|
2062
|
+
* `0` is no bounce, and `1` is extremely bouncy. Negative values, down to
|
|
2063
|
+
* `-1`, make an overdamped spring that starts quicker and eases more
|
|
2064
|
+
* gently into its target.
|
|
2055
2065
|
*
|
|
2056
2066
|
* If `duration` is set, this defaults to `0.25`.
|
|
2057
2067
|
*
|
|
@@ -2924,7 +2934,7 @@ declare class NativeAnimation<T extends AnyResolvedKeyframe> extends WithPromise
|
|
|
2924
2934
|
/**
|
|
2925
2935
|
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
|
|
2926
2936
|
*/
|
|
2927
|
-
attachTimeline({ timeline,
|
|
2937
|
+
attachTimeline({ timeline, onAttach, observe, }: TimelineWithFallback): VoidFunction;
|
|
2928
2938
|
}
|
|
2929
2939
|
|
|
2930
2940
|
type NativeAnimationOptionsExtended<T extends AnyResolvedKeyframe> = NativeAnimationOptions & ValueAnimationOptions<T> & NativeAnimationOptions;
|
|
@@ -3420,10 +3430,15 @@ declare const svgEffect: SelectorAnimateEffect<SVGElement>;
|
|
|
3420
3430
|
|
|
3421
3431
|
declare const frame: Batcher;
|
|
3422
3432
|
declare const cancelFrame: (process: Process) => void;
|
|
3423
|
-
declare const frameData: FrameData;
|
|
3424
3433
|
declare const frameSteps: Steps;
|
|
3425
3434
|
|
|
3426
|
-
|
|
3435
|
+
/**
|
|
3436
|
+
* The frameloop's state, kept apart from the frameloop itself so that
|
|
3437
|
+
* reading it doesn't bundle the scheduler.
|
|
3438
|
+
*/
|
|
3439
|
+
declare const frameData: FrameData;
|
|
3440
|
+
|
|
3441
|
+
declare function createRenderBatcher(scheduleNextBatch: (callback: Function) => void, allowKeepAlive: boolean, state?: FrameData): {
|
|
3427
3442
|
schedule: Batcher;
|
|
3428
3443
|
cancel: (process: Process) => void;
|
|
3429
3444
|
state: FrameData;
|
|
@@ -3597,9 +3612,6 @@ type WindowResizeHandler = (info: ResizeInfo) => void;
|
|
|
3597
3612
|
declare function resize(onResize: WindowResizeHandler): VoidFunction;
|
|
3598
3613
|
declare function resize(target: ElementOrSelector, onResize: ResizeHandler<Element>): VoidFunction;
|
|
3599
3614
|
|
|
3600
|
-
type Update = (progress: number) => void;
|
|
3601
|
-
declare function observeTimeline(update: Update, timeline: ProgressTimeline): () => void;
|
|
3602
|
-
|
|
3603
3615
|
declare function recordStats(): void;
|
|
3604
3616
|
|
|
3605
3617
|
interface LayoutProjectionMetrics {
|
|
@@ -4413,6 +4425,11 @@ declare class SVGVisualElement extends DOMVisualElement<SVGElement, SVGRenderSta
|
|
|
4413
4425
|
type: string;
|
|
4414
4426
|
isSVGTag: boolean;
|
|
4415
4427
|
getBaseTargetFromProps(props: MotionNodeOptions, key: string): AnyResolvedKeyframe | MotionValue<any> | undefined;
|
|
4428
|
+
/**
|
|
4429
|
+
* An independent transform's origin is never read from the DOM, so it
|
|
4430
|
+
* starts from its latest or default value and renders on mount.
|
|
4431
|
+
*/
|
|
4432
|
+
getDefaultValue(key: string): AnyResolvedKeyframe | undefined;
|
|
4416
4433
|
readValueFromInstance(instance: SVGElement, key: string): any;
|
|
4417
4434
|
measureInstanceViewportBox: () => motion_utils.Box;
|
|
4418
4435
|
scrapeMotionValuesFromProps(props: MotionNodeOptions, prevProps: MotionNodeOptions, visualElement: VisualElement): {
|
|
@@ -4613,8 +4630,7 @@ declare function boxEqualsRounded(a: Box, b: Box): boolean;
|
|
|
4613
4630
|
declare function aspectRatio(box: Box): number;
|
|
4614
4631
|
declare function axisDeltaEquals(a: AxisDelta, b: AxisDelta): boolean;
|
|
4615
4632
|
|
|
4616
|
-
|
|
4617
|
-
declare function eachAxis(callback: Callback): void[];
|
|
4633
|
+
declare function eachAxis<T>(callback: (axis: "x" | "y") => T): T[];
|
|
4618
4634
|
|
|
4619
4635
|
declare function hasScale({ scale, scaleX, scaleY }: ResolvedValues$1): boolean;
|
|
4620
4636
|
declare function hasTransform(values: ResolvedValues$1): true | AnyResolvedKeyframe;
|
|
@@ -5544,4 +5560,4 @@ declare const sync: Batcher;
|
|
|
5544
5560
|
*/
|
|
5545
5561
|
declare const cancelSync: Record<string, (process: Process) => void>;
|
|
5546
5562
|
|
|
5547
|
-
export { type AccelerateConfig, type AcceptedAnimations, type ActiveStatsBuffer, type AddEffectValue, type AnimateEffect, type AnimationDefinition, type AnimationGeneratorName, type AnimationGeneratorType, type AnimationList, type AnimationOptions, type AnimationOrchestrationOptions, type AnimationPlaybackControls, type AnimationPlaybackControlsWithThen, type AnimationPlaybackLifecycles, type AnimationPlaybackOptions, type AnimationScope, type AnimationState$1 as AnimationState, type AnimationType, type AnimationTypeState, type AnyResolvedKeyframe, type ArcOptions, AsyncMotionValueAnimation, type Batcher, type CSSStyleDeclarationWithTransform, type CSSVariableName, type CSSVariableToken, type CancelProcess, type Color, type ComplexValueInfo, type ComplexValues, type DOMKeyframesDefinition, DOMKeyframesResolver, type DOMValueAnimationOptions, DOMVisualElement, type DOMVisualElementOptions, type DecayOptions, type DelayedFunction, DocumentProjectionNode, type DragElastic, type DragHandler, type DraggableProps, type DurationSpringOptions, type DynamicOption, type Effect, type EffectKeyframes, type EffectOptions, type EffectRead, type EffectTest, type EffectTransition, type ElementOrSelector, type EventInfo, type EventOptions, Feature, type FeatureClass, FlatTree, type FollowValueOptions, type FrameData, type GeneratorFactory, type GeneratorFactoryFunction, GroupAnimation, GroupAnimationWithThen, type GroupedAnimations, type HSLA, HTMLProjectionNode, type HTMLRenderState, HTMLVisualElement, type HandoffFunction, type IProjectionNode, type InactiveStatsBuffer, type InertiaOptions, type InitialPromotionConfig, type InterpolateOptions, JSAnimation, type KeyframeGenerator, type KeyframeOptions, KeyframeResolver, LayoutAnimationBuilder, type LayoutEvents, type LayoutLifecycles, type LayoutProjectionMetrics, type LayoutProjectionStats, type LayoutUpdateData, type LayoutUpdateHandler, type LegacyAnimationControls, type MapInputRange, type Measurements, type Mixer, type MixerFactory, type MotionConfigContextProps, type MotionNodeAdvancedOptions, type MotionNodeAnimationOptions, type MotionNodeDragHandlers, type MotionNodeDraggableOptions, type MotionNodeEventOptions, type MotionNodeFocusHandlers, type MotionNodeHoverHandlers, type MotionNodeLayoutOptions, type MotionNodeOptions, type MotionNodePanHandlers, type MotionNodeTapHandlers, type MotionNodeViewportOptions, type MotionPath, type MotionStyle, MotionValue, type MotionValueAnimation, type MotionValueEventCallbacks, type MotionValueOptions, MotionValueState, type MultiTransformer, NativeAnimation, NativeAnimationExtended, type NativeAnimationOptions, type NativeAnimationOptionsExtended, NativeAnimationWrapper, type NodeGroup, NodeStack, type NumberMap, ObjectVisualElement, type OnHoverEndEvent, type OnHoverStartEvent, type OnKeyframesResolved, type OnPressEndEvent, type OnPressStartEvent, type Owner, type PanHandler, type PanInfo, type PassiveEffect, type PathInterpolator, type PathState, type Phase, type Point2D, type PointerEventOptions, type PresenceContextProps, type PressGestureInfo, type Process, type ProgressTimeline, type ProjectionEventName, type ProjectionNodeConfig, type ProjectionNodeOptions, type PropagateOptions, type RGBA, type ReducedMotionConfig, type RepeatType, type ResolvedConstraints, type ResolvedElastic, type ResolvedKeyframes, type ResolvedValueKeyframe, type ResolvedValues$1 as ResolvedValues, type SVGAttributes, type SVGForcedAttrKeyframesDefinition, type SVGForcedAttrProperties, type SVGForcedAttrTransitions, type SVGKeyframesDefinition, type SVGPathKeyframesDefinition, type SVGPathProperties, type SVGPathTransitions, type SVGRenderState, type SVGTransitions, SVGVisualElement, type ScaleCorrectionNode, type ScaleCorrector, type ScaleCorrectorDefinition, type ScaleCorrectorMap, type Schedule, type ScrapeMotionValuesFromProps, type ScrollMeasurements, type SelectorCache, type SingleTransformer, type Spring, type SpringOptions, type StaggerOptions, type StaggerOrigin, type StartAnimation, type StatsRecording, type Step, type StepId, type Steps, type StyleKeyframesDefinition, type StyleSubject, type StyleTransitions, type Subscriber, type TapHandlers, type TapInfo, type Target, type TargetAndTransition, type TargetResolver, type TimelineWithFallback, type TransformInputRange, type TransformOptions, type TransformOrigin, type TransformProperties, type TransformTemplate, type Transformer, type Transition, type TransitionWithValueOverrides, type Tween, type UnresolvedKeyframes, type UnresolvedValueKeyframe, type UseRenderState, type ValueAnimationOptions, type ValueAnimationOptionsWithRenderContext, type ValueAnimationTransition, type ValueAnimationWithDynamicDelay, type ValueIndexes, type ValueKeyframe, type ValueKeyframesDefinition, type ValueTransformer, type ValueTransition, type ValueType, type ValueTypeMap, type VariableKeyframesDefinition, type VariableTransitions, type Variant, type VariantLabels, type Variants, type VelocityOptions, type ViewTransitionAnimationDefinition, ViewTransitionBuilder, type ViewTransitionOptions, type ViewTransitionTarget, type ViewTransitionTargetDefinition, type ViewportEventHandler, type ViewportOptions, VisualElement, type VisualElementAnimationOptions, type VisualElementEventCallbacks, type VisualElementOptions, type VisualState, type WillChange, type WithAppearProps, type WithDepth, type WithQuerySelectorAll, acceleratedValues, addAttrValue, addDomEvent, addEffect, addSVGValue, addScaleCorrector, addStyleValue, addValueToWillChange, alpha, analyseComplexValue, animateEffectSubject, animateElement, animateMotionValue, animateSingleValue, animateTarget, animateValue, animateValues, animateVariant, animateView, animateVisualElement, animationMapKey, applyAxisDelta, applyBoxDelta, applyGeneratorOptions, applyPointDelta, applyPxDefaults, applyTreeDeltas, arc, aspectRatio, attachFollow, attachSpring, attrEffect, axisDeltaEquals, axisEquals, axisEqualsRounded, boxEquals, boxEqualsRounded, buildHTMLStyles, buildProjectionTransform, buildSVGAttrs, buildSVGPath, buildTransform, calcAxisDelta, calcBoxDelta, calcChildStagger, calcGeneratorDuration, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, camelCaseAttributes, camelToDash, cancelFrame, cancelMicrotask, cancelSync, checkVariantsDidChange, cleanDirtyNodes, collectMotionValues, color, compareByDepth, complex, containsCSSVariable, convertBoundingBoxToBox, convertBoxToBoundingBox, convertOffsetToTimes, copyAxisDeltaInto, copyAxisInto, copyBoxInto, correctBorderRadius, correctBoxShadow, createAnimationState, createAxis, createAxisDelta, createBox, createDelta, createEffect, createGeneratorEasing, createProjectionNode, createRenderBatcher, cubicBezierAsString, defaultEasing, defaultOffset, defaultTransformValue, defaultValueTypes, degrees, delay, delayInSeconds, dimensionValueTypes, eachAxis, fillOffset, fillWildcards, findDimensionValueType, findEffect, findValueType, flushKeyframeResolvers, followValue, frame, frameData, frameSteps, generateLinearEasing, getAnimatableNone, getAnimationMap, getComputedStyle, getDefaultTransition, getDefaultValueType, getFeatureDefinitions, getFinalKeyframe, getMixer, getOptimisedAppearId, getOriginIndex, getValueAsType, getValueTransition, getVariableValue, getVariantContext, getViewAnimationLayerInfo, getViewAnimations, globalProjectionState, handOffElementState, has2DTranslate, hasComplexValues, hasReducedMotionListener, hasScale, hasTransform, hex, hover, hsla, hslaToRgba, inertia, initPrefersReducedMotion, interpolate, invisibleValues, isAnimationControls, isCSSVariableName, isCSSVariableToken, isControllingVariants, isDeltaZero, isDragActive, isDragging, isElementKeyboardAccessible, isElementTextInput, isForcedMotionValue, isGenerator, isHTMLElement, isKeyframesTarget, isMotionValue, isNear, isNodeOrChild, isPrimaryPointer, isSVGElement, isSVGSVGElement, isSVGTag, isTransitionDefined, isVariantLabel, isVariantNode, isWaapiSupportedEasing, isWillChangeMotionValue, keyframes, makeAnimationInstant, mapEasingToNativeEasing, mapValue, maxGeneratorDuration, measurePageBox, measureViewportBox, microtask, mix, mixArray, mixColor, mixComplex, mixImmediate, mixLinearColor, mixNumber, mixObject, mixValues, mixVisibility, motionValue, nodeGroup, number, numberValueTypes,
|
|
5563
|
+
export { type AccelerateConfig, type AcceptedAnimations, type ActiveStatsBuffer, type AddEffectValue, type AnimateEffect, type AnimationDefinition, type AnimationGeneratorName, type AnimationGeneratorType, type AnimationList, type AnimationOptions, type AnimationOrchestrationOptions, type AnimationPlaybackControls, type AnimationPlaybackControlsWithThen, type AnimationPlaybackLifecycles, type AnimationPlaybackOptions, type AnimationScope, type AnimationState$1 as AnimationState, type AnimationType, type AnimationTypeState, type AnyResolvedKeyframe, type ArcOptions, AsyncMotionValueAnimation, type Batcher, type CSSStyleDeclarationWithTransform, type CSSVariableName, type CSSVariableToken, type CancelProcess, type Color, type ComplexValueInfo, type ComplexValues, type DOMKeyframesDefinition, DOMKeyframesResolver, type DOMValueAnimationOptions, DOMVisualElement, type DOMVisualElementOptions, type DecayOptions, type DelayedFunction, DocumentProjectionNode, type DragElastic, type DragHandler, type DraggableProps, type DurationSpringOptions, type DynamicOption, type Effect, type EffectKeyframes, type EffectOptions, type EffectRead, type EffectTest, type EffectTransition, type ElementOrSelector, type EventInfo, type EventOptions, Feature, type FeatureClass, FlatTree, type FollowValueOptions, type FrameData, type GeneratorFactory, type GeneratorFactoryFunction, GroupAnimation, GroupAnimationWithThen, type GroupedAnimations, type HSLA, HTMLProjectionNode, type HTMLRenderState, HTMLVisualElement, type HandoffFunction, type IProjectionNode, type InactiveStatsBuffer, type InertiaOptions, type InitialPromotionConfig, type InterpolateOptions, JSAnimation, type KeyframeGenerator, type KeyframeOptions, KeyframeResolver, LayoutAnimationBuilder, type LayoutEvents, type LayoutLifecycles, type LayoutProjectionMetrics, type LayoutProjectionStats, type LayoutUpdateData, type LayoutUpdateHandler, type LegacyAnimationControls, type MapInputRange, type Measurements, type Mixer, type MixerFactory, type MotionConfigContextProps, type MotionNodeAdvancedOptions, type MotionNodeAnimationOptions, type MotionNodeDragHandlers, type MotionNodeDraggableOptions, type MotionNodeEventOptions, type MotionNodeFocusHandlers, type MotionNodeHoverHandlers, type MotionNodeLayoutOptions, type MotionNodeOptions, type MotionNodePanHandlers, type MotionNodeTapHandlers, type MotionNodeViewportOptions, type MotionPath, type MotionStyle, MotionValue, type MotionValueAnimation, type MotionValueEventCallbacks, type MotionValueOptions, MotionValueState, type MultiTransformer, NativeAnimation, NativeAnimationExtended, type NativeAnimationOptions, type NativeAnimationOptionsExtended, NativeAnimationWrapper, type NodeGroup, NodeStack, type NumberMap, ObjectVisualElement, type OnHoverEndEvent, type OnHoverStartEvent, type OnKeyframesResolved, type OnPressEndEvent, type OnPressStartEvent, type Owner, type PanHandler, type PanInfo, type PassiveEffect, type PathInterpolator, type PathState, type Phase, type Point2D, type PointerEventOptions, type PresenceContextProps, type PressGestureInfo, type Process, type ProgressTimeline, type ProjectionEventName, type ProjectionNodeConfig, type ProjectionNodeOptions, type PropagateOptions, type RGBA, type ReducedMotionConfig, type RepeatType, type ResolvedConstraints, type ResolvedElastic, type ResolvedKeyframes, type ResolvedValueKeyframe, type ResolvedValues$1 as ResolvedValues, type SVGAttributes, type SVGForcedAttrKeyframesDefinition, type SVGForcedAttrProperties, type SVGForcedAttrTransitions, type SVGKeyframesDefinition, type SVGPathKeyframesDefinition, type SVGPathProperties, type SVGPathTransitions, type SVGRenderState, type SVGTransitions, SVGVisualElement, type ScaleCorrectionNode, type ScaleCorrector, type ScaleCorrectorDefinition, type ScaleCorrectorMap, type Schedule, type ScrapeMotionValuesFromProps, type ScrollMeasurements, type SelectorCache, type SingleTransformer, type Spring, type SpringOptions, type StaggerOptions, type StaggerOrigin, type StartAnimation, type StatsRecording, type Step, type StepId, type Steps, type StyleKeyframesDefinition, type StyleSubject, type StyleTransitions, type Subscriber, type TapHandlers, type TapInfo, type Target, type TargetAndTransition, type TargetResolver, type TimelineWithFallback, type TransformInputRange, type TransformOptions, type TransformOrigin, type TransformProperties, type TransformTemplate, type Transformer, type Transition, type TransitionWithValueOverrides, type Tween, type UnresolvedKeyframes, type UnresolvedValueKeyframe, type UseRenderState, type ValueAnimationOptions, type ValueAnimationOptionsWithRenderContext, type ValueAnimationTransition, type ValueAnimationWithDynamicDelay, type ValueIndexes, type ValueKeyframe, type ValueKeyframesDefinition, type ValueTransformer, type ValueTransition, type ValueType, type ValueTypeMap, type VariableKeyframesDefinition, type VariableTransitions, type Variant, type VariantLabels, type Variants, type VelocityOptions, type ViewTransitionAnimationDefinition, ViewTransitionBuilder, type ViewTransitionOptions, type ViewTransitionTarget, type ViewTransitionTargetDefinition, type ViewportEventHandler, type ViewportOptions, VisualElement, type VisualElementAnimationOptions, type VisualElementEventCallbacks, type VisualElementOptions, type VisualState, type WillChange, type WithAppearProps, type WithDepth, type WithQuerySelectorAll, acceleratedValues, addAttrValue, addDomEvent, addEffect, addSVGValue, addScaleCorrector, addStyleValue, addValueToWillChange, alpha, analyseComplexValue, animateEffectSubject, animateElement, animateMotionValue, animateSingleValue, animateTarget, animateValue, animateValues, animateVariant, animateView, animateVisualElement, animationMapKey, applyAxisDelta, applyBoxDelta, applyGeneratorOptions, applyPointDelta, applyPxDefaults, applyTreeDeltas, arc, aspectRatio, attachFollow, attachSpring, attrEffect, axisDeltaEquals, axisEquals, axisEqualsRounded, boxEquals, boxEqualsRounded, buildHTMLStyles, buildProjectionTransform, buildSVGAttrs, buildSVGPath, buildTransform, calcAxisDelta, calcBoxDelta, calcChildStagger, calcGeneratorDuration, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, camelCaseAttributes, camelToDash, cancelFrame, cancelMicrotask, cancelSync, checkVariantsDidChange, cleanDirtyNodes, collectMotionValues, color, compareByDepth, complex, containsCSSVariable, convertBoundingBoxToBox, convertBoxToBoundingBox, convertOffsetToTimes, copyAxisDeltaInto, copyAxisInto, copyBoxInto, correctBorderRadius, correctBoxShadow, createAnimationState, createAxis, createAxisDelta, createBox, createDelta, createEffect, createGeneratorEasing, createProjectionNode, createRenderBatcher, cubicBezierAsString, defaultEasing, defaultOffset, defaultTransformValue, defaultValueTypes, degrees, delay, delayInSeconds, dimensionValueTypes, eachAxis, fillOffset, fillWildcards, findDimensionValueType, findEffect, findValueType, flushKeyframeResolvers, followValue, frame, frameData, frameSteps, generateLinearEasing, getAnimatableNone, getAnimationMap, getComputedStyle, getDefaultTransition, getDefaultValueType, getFeatureDefinitions, getFinalKeyframe, getMixer, getOptimisedAppearId, getOriginIndex, getValueAsType, getValueTransition, getVariableValue, getVariantContext, getViewAnimationLayerInfo, getViewAnimations, globalProjectionState, handOffElementState, has2DTranslate, hasComplexValues, hasReducedMotionListener, hasScale, hasTransform, hex, hover, hsla, hslaToRgba, inertia, initPrefersReducedMotion, interpolate, invisibleValues, isAnimationControls, isCSSVariableName, isCSSVariableToken, isControllingVariants, isDeltaZero, isDragActive, isDragging, isElementKeyboardAccessible, isElementTextInput, isForcedMotionValue, isGenerator, isHTMLElement, isKeyframesTarget, isMotionValue, isNear, isNodeOrChild, isPrimaryPointer, isSVGElement, isSVGSVGElement, isSVGTag, isTransitionDefined, isVariantLabel, isVariantNode, isWaapiSupportedEasing, isWillChangeMotionValue, keyframes, makeAnimationInstant, mapEasingToNativeEasing, mapValue, maxGeneratorDuration, measurePageBox, measureViewportBox, microtask, mix, mixArray, mixColor, mixComplex, mixImmediate, mixLinearColor, mixNumber, mixObject, mixValues, mixVisibility, motionValue, nodeGroup, number, numberValueTypes, optimizedAppearDataAttribute, optimizedAppearDataId, parseAnimateLayoutArgs, parseCSSVariable, parseValueFromTransform, percent, pixelsToPercent, positionalKeys, prefersReducedMotion, press, progressPercentage, propEffect, propagateDirtyNodes, px, readSVGValue, readStyleValue, readTransformValue, recordStats, removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removeEffect, removePointDelta, renderHTML, renderSVG, resize, resolveElements, resolveMotionValue, resolveTransition, resolveVariant, resolveVariantFromProps, rgbUnit, rgba, rootProjectionNode, scale, scaleCorrectors, scalePoint, scrapeMotionValuesFromProps$1 as scrapeHTMLMotionValuesFromProps, scrapeMotionValuesFromProps as scrapeSVGMotionValuesFromProps, setDragLock, setFeatureDefinitions, setStyle, setTarget, spring, springValue, stagger, startWaapiAnimation, statsBuffer, styleEffect, styleSubjectEffect, supportedWaapiEasing, supportsBrowserAnimation, supportsFlags, supportsLinearEasing, supportsPartialKeyframes, supportsScrollTimeline, supportsViewTimeline, svgEffect, svgSubjectEffect, sync, testValueType, time, transform, transformAxis, transformBox, transformBoxPoints, transformPropOrder, transformProps, transformValue, transformValueTypes, translateAxis, updateMotionValuesFromProps, variantPriorityOrder, variantProps, vh, visualElementStore, vw };
|