motion-dom 12.29.2 → 12.30.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/dist/index.d.ts CHANGED
@@ -1070,6 +1070,13 @@ interface MotionConfigContextProps {
1070
1070
  * @public
1071
1071
  */
1072
1072
  nonce?: string;
1073
+ /**
1074
+ * If true, all animations will be skipped and values will be set instantly.
1075
+ * Useful for E2E tests and visual regression testing.
1076
+ *
1077
+ * @public
1078
+ */
1079
+ skipAnimations?: boolean;
1073
1080
  }
1074
1081
  interface VisualState<_Instance, RenderState> {
1075
1082
  latestValues: ResolvedValues$1;
@@ -1083,6 +1090,11 @@ interface VisualElementOptions<Instance, RenderState = any> {
1083
1090
  props: MotionNodeOptions;
1084
1091
  blockInitialAnimation?: boolean;
1085
1092
  reducedMotionConfig?: ReducedMotionConfig;
1093
+ /**
1094
+ * If true, all animations will be skipped and values will be set instantly.
1095
+ * Useful for E2E tests and visual regression testing.
1096
+ */
1097
+ skipAnimations?: boolean;
1086
1098
  /**
1087
1099
  * Explicit override for SVG detection. When true, uses SVG rendering;
1088
1100
  * when false, uses HTML rendering. If undefined, auto-detects.
@@ -2588,6 +2600,11 @@ declare abstract class VisualElement<Instance = unknown, RenderState = unknown,
2588
2600
  * like it could be set globally.
2589
2601
  */
2590
2602
  shouldReduceMotion: boolean | null;
2603
+ /**
2604
+ * Decides whether animations should be skipped for this VisualElement.
2605
+ * Useful for E2E tests and visual regression testing.
2606
+ */
2607
+ shouldSkipAnimations: boolean;
2591
2608
  /**
2592
2609
  * Normally, if a component is controlled by a parent's variants, it can
2593
2610
  * rely on that ancestor to trigger animations further down the tree.
@@ -2642,6 +2659,10 @@ declare abstract class VisualElement<Instance = unknown, RenderState = unknown,
2642
2659
  * A reference to the ReducedMotionConfig passed to the VisualElement's host React component.
2643
2660
  */
2644
2661
  private reducedMotionConfig;
2662
+ /**
2663
+ * A reference to the skipAnimations config passed to the VisualElement's host React component.
2664
+ */
2665
+ private skipAnimationsConfig;
2645
2666
  /**
2646
2667
  * On mount, this will be hydrated with a callback to disconnect
2647
2668
  * this visual element from its parent on unmount.
@@ -2672,7 +2693,7 @@ declare abstract class VisualElement<Instance = unknown, RenderState = unknown,
2672
2693
  * VisualElement.on(), but only one of those can be defined via the onUpdate prop.
2673
2694
  */
2674
2695
  private propEventSubscriptions;
2675
- constructor({ parent, props, presenceContext, reducedMotionConfig, blockInitialAnimation, visualState, }: VisualElementOptions<Instance, RenderState>, options?: Options);
2696
+ constructor({ parent, props, presenceContext, reducedMotionConfig, skipAnimations, blockInitialAnimation, visualState, }: VisualElementOptions<Instance, RenderState>, options?: Options);
2676
2697
  mount(instance: Instance): void;
2677
2698
  unmount(): void;
2678
2699
  addChild(child: VisualElement): void;
@@ -3084,14 +3105,22 @@ interface PointerEventOptions extends EventOptions {
3084
3105
  declare function press(targetOrSelector: ElementOrSelector, onPressStart: OnPressStartEvent, options?: PointerEventOptions): VoidFunction;
3085
3106
 
3086
3107
  /**
3087
- * Checks if an element is an interactive form element that should prevent
3088
- * drag gestures from starting when clicked.
3089
- *
3090
- * This specifically targets form controls, buttons, and links - not just any
3091
- * element with tabIndex, since motion elements with tap handlers automatically
3092
- * get tabIndex=0 for keyboard accessibility.
3108
+ * Checks if an element is natively keyboard accessible (focusable).
3109
+ * Used by the press gesture to determine if we need to add tabIndex.
3093
3110
  */
3094
3111
  declare function isElementKeyboardAccessible(element: Element): boolean;
3112
+ /**
3113
+ * Checks if an element has text selection or direct interaction behavior
3114
+ * that should block drag gestures from starting.
3115
+ *
3116
+ * This specifically targets form controls where the user might want to select
3117
+ * text or interact with the control (e.g., sliders, dropdowns).
3118
+ *
3119
+ * Buttons and links are NOT included because they don't have click-and-move
3120
+ * actions of their own - they only respond to click events, so dragging
3121
+ * should still work when initiated from these elements.
3122
+ */
3123
+ declare function isElementTextInput(element: Element): boolean;
3095
3124
 
3096
3125
  /**
3097
3126
  * Recursively traverse up the tree to check whether the provided child node
@@ -4979,4 +5008,4 @@ declare const sync: Batcher;
4979
5008
  */
4980
5009
  declare const cancelSync: Record<string, (process: Process) => void>;
4981
5010
 
4982
- export { type AcceptedAnimations, type ActiveStatsBuffer, type AnimationDefinition, type AnimationGeneratorName, type AnimationGeneratorType, type AnimationList, type AnimationOptions, type AnimationOrchestrationOptions, type AnimationPlaybackControls, type AnimationPlaybackControlsWithThen, type AnimationPlaybackLifecycles, type AnimationPlaybackOptions, type AnimationScope, type AnimationState, type AnimationType, type AnimationTypeState, type AnyResolvedKeyframe, 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 ElementOrSelector, type EventInfo, type EventOptions, Feature, type FeatureClass, FlatTree, type FollowValueOptions, type FrameData, type FrameStats, 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 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 MotionStyle, MotionValue, type MotionValueEventCallbacks, type MotionValueOptions, 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 Phase, type PointerEventOptions, type PresenceContextProps, type PressGestureInfo, type Process, type ProgressTimeline, type ProjectionEventName, type ProjectionNodeConfig, type ProjectionNodeOptions, 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 Stats, type StatsBuffer, type StatsRecording, type StatsSummary, type Step, type StepId, type Steps, type StyleKeyframesDefinition, type StyleTransitions, type Subscriber, type Summary, 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, activeAnimations, addAttrValue, addDomEvent, addScaleCorrector, addStyleValue, addValueToWillChange, alpha, analyseComplexValue, animateMotionValue, animateSingleValue, animateTarget, animateValue, animateVariant, animateView, animateVisualElement, animationMapKey, applyAxisDelta, applyBoxDelta, applyGeneratorOptions, applyPointDelta, applyPxDefaults, applyTreeDeltas, 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, createGeneratorEasing, createProjectionNode, createRenderBatcher, cubicBezierAsString, defaultEasing, defaultOffset, defaultTransformValue, defaultValueTypes, degrees, delay, delayInSeconds, dimensionValueTypes, eachAxis, fillOffset, fillWildcards, findDimensionValueType, findValueType, flushKeyframeResolvers, followValue, frame, frameData, frameSteps, generateLinearEasing, getAnimatableNone, getAnimationMap, getComputedStyle, getDefaultTransition, getDefaultValueType, getFeatureDefinitions, getFinalKeyframe, getMixer, getOptimisedAppearId, getOriginIndex, getValueAsType, getValueTransition, getVariableValue, getVariantContext, getViewAnimationLayerInfo, getViewAnimations, globalProjectionState, has2DTranslate, hasReducedMotionListener, hasScale, hasTransform, hex, hover, hsla, hslaToRgba, inertia, initPrefersReducedMotion, interpolate, invisibleValues, isAnimationControls, isCSSVariableName, isCSSVariableToken, isControllingVariants, isDeltaZero, isDragActive, isDragging, isElementKeyboardAccessible, 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, observeTimeline, optimizedAppearDataAttribute, optimizedAppearDataId, parseAnimateLayoutArgs, parseCSSVariable, parseValueFromTransform, percent, pixelsToPercent, positionalKeys, prefersReducedMotion, press, progressPercentage, propEffect, propagateDirtyNodes, px, readTransformValue, recordStats, removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta, renderHTML, renderSVG, resize, resolveElements, resolveMotionValue, 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, supportedWaapiEasing, supportsBrowserAnimation, supportsFlags, supportsLinearEasing, supportsPartialKeyframes, supportsScrollTimeline, svgEffect, sync, testValueType, time, transform, transformAxis, transformBox, transformBoxPoints, transformPropOrder, transformProps, transformValue, transformValueTypes, translateAxis, updateMotionValuesFromProps, variantPriorityOrder, variantProps, vh, visualElementStore, vw };
5011
+ export { type AcceptedAnimations, type ActiveStatsBuffer, type AnimationDefinition, type AnimationGeneratorName, type AnimationGeneratorType, type AnimationList, type AnimationOptions, type AnimationOrchestrationOptions, type AnimationPlaybackControls, type AnimationPlaybackControlsWithThen, type AnimationPlaybackLifecycles, type AnimationPlaybackOptions, type AnimationScope, type AnimationState, type AnimationType, type AnimationTypeState, type AnyResolvedKeyframe, 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 ElementOrSelector, type EventInfo, type EventOptions, Feature, type FeatureClass, FlatTree, type FollowValueOptions, type FrameData, type FrameStats, 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 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 MotionStyle, MotionValue, type MotionValueEventCallbacks, type MotionValueOptions, 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 Phase, type PointerEventOptions, type PresenceContextProps, type PressGestureInfo, type Process, type ProgressTimeline, type ProjectionEventName, type ProjectionNodeConfig, type ProjectionNodeOptions, 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 Stats, type StatsBuffer, type StatsRecording, type StatsSummary, type Step, type StepId, type Steps, type StyleKeyframesDefinition, type StyleTransitions, type Subscriber, type Summary, 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, activeAnimations, addAttrValue, addDomEvent, addScaleCorrector, addStyleValue, addValueToWillChange, alpha, analyseComplexValue, animateMotionValue, animateSingleValue, animateTarget, animateValue, animateVariant, animateView, animateVisualElement, animationMapKey, applyAxisDelta, applyBoxDelta, applyGeneratorOptions, applyPointDelta, applyPxDefaults, applyTreeDeltas, 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, createGeneratorEasing, createProjectionNode, createRenderBatcher, cubicBezierAsString, defaultEasing, defaultOffset, defaultTransformValue, defaultValueTypes, degrees, delay, delayInSeconds, dimensionValueTypes, eachAxis, fillOffset, fillWildcards, findDimensionValueType, findValueType, flushKeyframeResolvers, followValue, frame, frameData, frameSteps, generateLinearEasing, getAnimatableNone, getAnimationMap, getComputedStyle, getDefaultTransition, getDefaultValueType, getFeatureDefinitions, getFinalKeyframe, getMixer, getOptimisedAppearId, getOriginIndex, getValueAsType, getValueTransition, getVariableValue, getVariantContext, getViewAnimationLayerInfo, getViewAnimations, globalProjectionState, has2DTranslate, 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, observeTimeline, optimizedAppearDataAttribute, optimizedAppearDataId, parseAnimateLayoutArgs, parseCSSVariable, parseValueFromTransform, percent, pixelsToPercent, positionalKeys, prefersReducedMotion, press, progressPercentage, propEffect, propagateDirtyNodes, px, readTransformValue, recordStats, removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta, renderHTML, renderSVG, resize, resolveElements, resolveMotionValue, 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, supportedWaapiEasing, supportsBrowserAnimation, supportsFlags, supportsLinearEasing, supportsPartialKeyframes, supportsScrollTimeline, svgEffect, sync, testValueType, time, transform, transformAxis, transformBox, transformBoxPoints, transformPropOrder, transformProps, transformValue, transformValueTypes, translateAxis, updateMotionValuesFromProps, variantPriorityOrder, variantProps, vh, visualElementStore, vw };
@@ -2133,7 +2133,8 @@
2133
2133
  * while deferring the commit until the next animation frame.
2134
2134
  */
2135
2135
  commitStyles() {
2136
- if (!this.isPseudoElement) {
2136
+ const element = this.options?.element;
2137
+ if (!this.isPseudoElement && element?.isConnected) {
2137
2138
  this.animation.commitStyles?.();
2138
2139
  }
2139
2140
  }
@@ -2834,7 +2835,8 @@
2834
2835
  }
2835
2836
  }
2836
2837
  if (motionUtils.MotionGlobalConfig.instantAnimations ||
2837
- motionUtils.MotionGlobalConfig.skipAnimations) {
2838
+ motionUtils.MotionGlobalConfig.skipAnimations ||
2839
+ element?.shouldSkipAnimations) {
2838
2840
  shouldSkip = true;
2839
2841
  makeAnimationInstant(options);
2840
2842
  options.delay = 0;
@@ -4279,7 +4281,7 @@
4279
4281
  }
4280
4282
  };
4281
4283
 
4282
- const interactiveElements = new Set([
4284
+ const keyboardAccessibleElements = new Set([
4283
4285
  "BUTTON",
4284
4286
  "INPUT",
4285
4287
  "SELECT",
@@ -4287,15 +4289,27 @@
4287
4289
  "A",
4288
4290
  ]);
4289
4291
  /**
4290
- * Checks if an element is an interactive form element that should prevent
4291
- * drag gestures from starting when clicked.
4292
- *
4293
- * This specifically targets form controls, buttons, and links - not just any
4294
- * element with tabIndex, since motion elements with tap handlers automatically
4295
- * get tabIndex=0 for keyboard accessibility.
4292
+ * Checks if an element is natively keyboard accessible (focusable).
4293
+ * Used by the press gesture to determine if we need to add tabIndex.
4296
4294
  */
4297
4295
  function isElementKeyboardAccessible(element) {
4298
- return (interactiveElements.has(element.tagName) ||
4296
+ return (keyboardAccessibleElements.has(element.tagName) ||
4297
+ element.isContentEditable === true);
4298
+ }
4299
+ const textInputElements = new Set(["INPUT", "SELECT", "TEXTAREA"]);
4300
+ /**
4301
+ * Checks if an element has text selection or direct interaction behavior
4302
+ * that should block drag gestures from starting.
4303
+ *
4304
+ * This specifically targets form controls where the user might want to select
4305
+ * text or interact with the control (e.g., sliders, dropdowns).
4306
+ *
4307
+ * Buttons and links are NOT included because they don't have click-and-move
4308
+ * actions of their own - they only respond to click events, so dragging
4309
+ * should still work when initiated from these elements.
4310
+ */
4311
+ function isElementTextInput(element) {
4312
+ return (textInputElements.has(element.tagName) ||
4299
4313
  element.isContentEditable === true);
4300
4314
  }
4301
4315
 
@@ -5378,7 +5392,7 @@
5378
5392
  scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) {
5379
5393
  return {};
5380
5394
  }
5381
- constructor({ parent, props, presenceContext, reducedMotionConfig, blockInitialAnimation, visualState, }, options = {}) {
5395
+ constructor({ parent, props, presenceContext, reducedMotionConfig, skipAnimations, blockInitialAnimation, visualState, }, options = {}) {
5382
5396
  /**
5383
5397
  * A reference to the current underlying Instance, e.g. a HTMLElement
5384
5398
  * or Three.Mesh etc.
@@ -5401,6 +5415,11 @@
5401
5415
  * like it could be set globally.
5402
5416
  */
5403
5417
  this.shouldReduceMotion = null;
5418
+ /**
5419
+ * Decides whether animations should be skipped for this VisualElement.
5420
+ * Useful for E2E tests and visual regression testing.
5421
+ */
5422
+ this.shouldSkipAnimations = false;
5404
5423
  /**
5405
5424
  * A map of all motion values attached to this visual element. Motion
5406
5425
  * values are source of truth for any given animated value. A motion
@@ -5458,6 +5477,7 @@
5458
5477
  this.presenceContext = presenceContext;
5459
5478
  this.depth = parent ? parent.depth + 1 : 0;
5460
5479
  this.reducedMotionConfig = reducedMotionConfig;
5480
+ this.skipAnimationsConfig = skipAnimations;
5461
5481
  this.options = options;
5462
5482
  this.blockInitialAnimation = Boolean(blockInitialAnimation);
5463
5483
  this.isControllingVariants = isControllingVariants(props);
@@ -5514,6 +5534,10 @@
5514
5534
  {
5515
5535
  motionUtils.warnOnce(this.shouldReduceMotion !== true, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled");
5516
5536
  }
5537
+ /**
5538
+ * Set whether animations should be skipped based on the config.
5539
+ */
5540
+ this.shouldSkipAnimations = this.skipAnimationsConfig ?? false;
5517
5541
  this.parent?.addChild(this);
5518
5542
  this.update(this.props, this.presenceContext);
5519
5543
  }
@@ -9286,6 +9310,11 @@
9286
9310
  if (!visualElement.current) {
9287
9311
  visualElement.mount(element);
9288
9312
  }
9313
+ else if (!visualElement.projection.instance) {
9314
+ // Mount projection if VisualElement is already mounted but projection isn't
9315
+ // This happens when animate() was called before animateLayout()
9316
+ visualElement.projection.mount(element);
9317
+ }
9289
9318
  if (!existing) {
9290
9319
  visualElementStore.set(element, visualElement);
9291
9320
  }
@@ -9490,6 +9519,7 @@
9490
9519
  exports.isDragActive = isDragActive;
9491
9520
  exports.isDragging = isDragging;
9492
9521
  exports.isElementKeyboardAccessible = isElementKeyboardAccessible;
9522
+ exports.isElementTextInput = isElementTextInput;
9493
9523
  exports.isForcedMotionValue = isForcedMotionValue;
9494
9524
  exports.isGenerator = isGenerator;
9495
9525
  exports.isHTMLElement = isHTMLElement;