@nethesis/phone-island 1.1.3 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CallView/DeviceIcon.js +1 -1
- package/dist/components/CallView/DeviceIcon.js.map +1 -1
- package/dist/components/CallView/NumberPopover.js +1 -1
- package/dist/components/CallView/NumberPopover.js.map +1 -1
- package/dist/components/SideView/hooks/useSideViewLogic.js +1 -1
- package/dist/components/SideView/hooks/useSideViewLogic.js.map +1 -1
- package/dist/components/Socket.js +1 -1
- package/dist/components/Socket.js.map +1 -1
- package/dist/components/VideoView/index.js +1 -1
- package/dist/components/VideoView/index.js.map +1 -1
- package/dist/components/WebRTC.js +1 -1
- package/dist/components/WebRTC.js.map +1 -1
- package/dist/lib/phone/counterpartDevice.js +1 -1
- package/dist/lib/phone/counterpartDevice.js.map +1 -1
- package/dist/lib/phone/screenShare.js +2 -0
- package/dist/lib/phone/screenShare.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/context/LazyContext.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/notify-inspector.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/notify-inspector.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-start-time.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-start-time.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/TransformAnimation.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/TransformAnimation.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/groups.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/groups.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/events/add-pointer-event.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/events/add-pointer-event.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/events/event-info.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/events/event-info.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame-data.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame-data.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/VisualElementDragControls.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/utils/constraints.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/utils/constraints.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/pan/PanSession.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/pan/PanSession.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/node/root.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/root.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/default-scale-correctors.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/default-scale-correctors.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/resize/index.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/resize/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/scope/active.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/scope/active.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/distance.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/mix/index.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/mix/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/utils/as-number.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/value/utils/as-number.mjs.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/circ.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs.js +1 -1
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/errors.mjs.js +1 -1
- package/dist/node_modules/motion-utils/dist/es/errors.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/subscription-manager.mjs.js +1 -1
- package/dist/node_modules/motion-utils/dist/es/subscription-manager.mjs.js.map +1 -1
- package/dist/package.json.js +1 -1
- package/package.json +3 -3
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/events/event-info.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/events/event-info.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/utils/distance.mjs.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.mjs.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.mjs.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.mjs.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.mjs.js.map +0 -1
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/utils/distance.mjs.js +0 -0
package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visual-element-variant.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs"],"sourcesContent":["import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { calcChildStagger } from '../utils/calc-child-stagger.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\n\nfunction animateVariant(visualElement, variant, options = {}) {\n const resolved = resolveVariant(visualElement, variant, options.type
|
|
1
|
+
{"version":3,"file":"visual-element-variant.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs"],"sourcesContent":["import { resolveVariant, getTypeCustom } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { calcChildStagger } from '../utils/calc-child-stagger.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\n\nfunction animateVariant(visualElement, variant, options = {}) {\n const resolved = resolveVariant(visualElement, variant, getTypeCustom(visualElement, options.type));\n const transition = options.transitionOverride ||\n (resolved?.transition ?? (visualElement.getDefaultTransition() || {}));\n const getAnimation = () => Promise.all(resolved ? animateTarget(visualElement, resolved, options) : []);\n const getChildAnimations = (delay = 0) => {\n const { variantChildren } = visualElement;\n const { delayChildren = 0, staggerChildren, staggerDirection, } = transition;\n const animations = [];\n variantChildren?.forEach((child) => {\n child.notify(\"AnimationStart\", variant);\n animations.push(animateVariant(child, variant, {\n ...options,\n delay: delay +\n (typeof delayChildren === \"function\"\n ? 0\n : delayChildren) +\n calcChildStagger(variantChildren, child, delayChildren, staggerChildren, staggerDirection),\n }).then(() => child.notify(\"AnimationComplete\", variant)));\n });\n return Promise.all(animations);\n };\n /**\n * when: \"beforeChildren\" | \"afterChildren\" runs this element's animation\n * and its children's in sequence.\n */\n const { when } = transition;\n return when\n ? when === \"beforeChildren\"\n ? getAnimation().then(() => getChildAnimations())\n : getChildAnimations().then(getAnimation)\n : Promise.all([getAnimation(), getChildAnimations(options.delay)]);\n}\n\nexport { animateVariant };\n//# sourceMappingURL=visual-element-variant.mjs.map\n"],"names":["animateVariant","visualElement","variant","options","resolved","resolveVariant","getTypeCustom","type","transition","transitionOverride","getDefaultTransition","getAnimation","Promise","all","animateTarget","getChildAnimations","delay","variantChildren","delayChildren","staggerChildren","staggerDirection","animations","forEach","child","notify","push","calcChildStagger","then","when"],"mappings":"2PASM,SAAUA,EACZC,EACAC,EACAC,EAAyC,CAAA,GAEzC,MAAMC,EAAWC,iBACbJ,EACAC,EACAI,EAAaA,cAACL,EAAeE,EAAQI,OAGnCC,EACFL,EAAQM,qBACPL,GAAUI,aAAeP,EAAcS,wBAA0B,CAAE,IAElEC,EAAeA,IACjBC,QAAQC,IACJT,EAAWU,gBAAcb,EAAeG,EAAUD,GAAW,IAG/DY,EAAqBA,CAACC,EAAQ,KAChC,MAAMC,gBAAEA,GAAoBhB,GACtBiB,cACFA,EAAgB,EAACC,gBACjBA,EAAeC,iBACfA,GACAZ,EACEa,EAA6B,GAuBnC,OArBAJ,GAAiBK,QAASC,IACtBA,EAAMC,OAAO,iBAAkBtB,GAC/BmB,EAAWI,KACPzB,EAAeuB,EAAOrB,EAAS,IACxBC,EACHa,MACIA,GAC0B,mBAAlBE,EACF,EACAA,GACNQ,EAAAA,iBACIT,EACAM,EACAL,EACAC,EACAC,KAETO,KAAK,IAAMJ,EAAMC,OAAO,oBAAqBtB,OAIjDU,QAAQC,IAAIQ,KAOjBO,KAAEA,GAASpB,EAEjB,OAAOoB,EACQ,mBAATA,EACIjB,IAAegB,KAAK,IAAMZ,KAC1BA,IAAqBY,KAAKhB,GAC9BC,QAAQC,IAAI,CAACF,IAAgBI,EAAmBZ,EAAQa,QAClE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../render/utils/resolve-dynamic-variants.mjs.js"),t=require("./visual-element-target.mjs.js"),a=require("./visual-element-variant.mjs.js");exports.animateVisualElement=function(i,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../render/utils/resolve-dynamic-variants.mjs.js"),t=require("./visual-element-target.mjs.js"),a=require("./visual-element-variant.mjs.js");exports.animateVisualElement=function(r,i,n={}){return r.notify("AnimationStart",i),(Array.isArray(i)?Promise.all(i.map(e=>a.animateVariant(r,e,n))):"string"==typeof i?a.animateVariant(r,i,n):Promise.all(t.animateTarget(r,e.resolveVariant(r,i,n.custom),n))).then(()=>{r.notify("AnimationComplete",i)})};
|
|
2
2
|
//# sourceMappingURL=visual-element.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visual-element.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs"],"sourcesContent":["import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\nimport { animateVariant } from './visual-element-variant.mjs';\n\nfunction animateVisualElement(visualElement, definition, options = {}) {\n visualElement.notify(\"AnimationStart\", definition);\n
|
|
1
|
+
{"version":3,"file":"visual-element.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs"],"sourcesContent":["import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\nimport { animateVariant } from './visual-element-variant.mjs';\n\nfunction animateVisualElement(visualElement, definition, options = {}) {\n visualElement.notify(\"AnimationStart\", definition);\n const animation = Array.isArray(definition)\n ? Promise.all(definition.map((variant) => animateVariant(visualElement, variant, options)))\n : typeof definition === \"string\"\n ? animateVariant(visualElement, definition, options)\n : Promise.all(animateTarget(visualElement, resolveVariant(visualElement, definition, options.custom), options));\n return animation.then(() => {\n visualElement.notify(\"AnimationComplete\", definition);\n });\n}\n\nexport { animateVisualElement };\n//# sourceMappingURL=visual-element.mjs.map\n"],"names":["visualElement","definition","options","notify","Array","isArray","Promise","all","map","variant","animateVariant","animateTarget","resolveVariant","custom","then"],"mappings":"8PAOM,SACFA,EACAC,EACAC,EAAyC,CAAA,GAoBzC,OAlBAF,EAAcG,OAAO,iBAAkBF,IAErBG,MAAMC,QAAQJ,GAC1BK,QAAQC,IACJN,EAAWO,IAAKC,GACZC,EAAAA,eAAeV,EAAeS,EAASP,KAGzB,iBAAfD,EACPS,EAAAA,eAAeV,EAAeC,EAAYC,GAC1CI,QAAQC,IACJI,EAAaA,cACTX,EACAY,EAAcA,eAACZ,EAAeC,EAAYC,EAAQW,QAClDX,KAIGY,KAAK,KAClBd,EAAcG,OAAO,oBAAqBF,IAElD"}
|
package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../render/utils/keys-position.mjs.js"),s=require("../../value/types/dimensions.mjs.js"),r=require("../utils/css-variables-conversion.mjs.js"),t=require("../utils/is-css-variable.mjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../render/utils/keys-position.mjs.js"),s=require("../../value/types/dimensions.mjs.js"),r=require("../utils/css-variables-conversion.mjs.js"),t=require("../utils/is-css-variable.mjs.js"),n=require("./KeyframesResolver.mjs.js"),i=require("./utils/is-none.mjs.js"),a=require("./utils/make-none-animatable.mjs.js"),o=require("./utils/unit-conversion.mjs.js");class l extends n.KeyframeResolver{constructor(e,s,r,t,n){super(e,s,r,t,n,!0)}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){const{unresolvedKeyframes:e,element:s,motionValue:r}=this,n=e[0]??r?.get();if(!s?.current||void 0===n)return!1;for(let s=0;s<e.length;s++)if(t.containsCSSVariable(s?e[s]:n))return!1;return!0}readKeyframes(){const{unresolvedKeyframes:n,element:i,name:a}=this;if(!i||!i.current)return;super.readKeyframes();for(let e=0;e<n.length;e++){let s=n[e];if("string"==typeof s&&(s=s.trim(),t.isCSSVariableToken(s))){const t=r.getVariableValue(s,i.current);void 0!==t&&(n[e]=t),e===n.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!e.positionalKeys.has(a)||2!==n.length)return;const[l,u]=n;if("number"==typeof l&&"number"==typeof u)return;const m=s.findDimensionValueType(l),f=s.findDimensionValueType(u);if(t.containsCSSVariable(l)!==t.containsCSSVariable(u)&&o.positionalValues[a])this.needsMeasurement=!0;else if(m!==f)if(o.isNumOrPxType(m)&&o.isNumOrPxType(f))for(let e=0;e<n.length;e++){const s=n[e];"string"==typeof s&&(n[e]=parseFloat(s))}else o.positionalValues[a]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:s}=this,r=[];for(let s=0;s<e.length;s++)(null===e[s]||i.isNone(e[s]))&&r.push(s);r.length&&a.makeNoneKeyframesAnimatable(e,r,s)}measure(){const{element:e,name:s}=this;return o.positionalValues[s](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){const{element:e,unresolvedKeyframes:s,name:r}=this;if(!e||!e.current)return;"height"===r&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),s[0]=this.measuredOrigin;const t=s[s.length-1];void 0!==t&&this.motionValue?.jump(t,!1)}measureEndState(){const{element:e,unresolvedKeyframes:s}=this;if(!e||!e.current)return;this.motionValue?.jump(this.measuredOrigin,!1);const r=s.length-1,t=s[r];s[r]=this.measure(),null!==t&&void 0===this.finalKeyframe&&(this.finalKeyframe=t),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,r])=>{e.getValue(s).set(r)}),this.resolveNoneKeyframes()}}exports.DOMKeyframesResolver=l;
|
|
2
2
|
//# sourceMappingURL=DOMKeyframesResolver.mjs.js.map
|
package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DOMKeyframesResolver.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs"],"sourcesContent":["import { positionalKeys } from '../../render/utils/keys-position.mjs';\nimport { findDimensionValueType } from '../../value/types/dimensions.mjs';\nimport { getVariableValue } from '../utils/css-variables-conversion.mjs';\nimport { isCSSVariableToken, containsCSSVariable } from '../utils/is-css-variable.mjs';\nimport { KeyframeResolver } from './KeyframesResolver.mjs';\nimport { isNone } from './utils/is-none.mjs';\nimport { makeNoneKeyframesAnimatable } from './utils/make-none-animatable.mjs';\nimport { positionalValues, isNumOrPxType } from './utils/unit-conversion.mjs';\n\nclass DOMKeyframesResolver extends KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element) {\n super(unresolvedKeyframes, onComplete, name, motionValue, element, true);\n }\n readKeyframes() {\n const { unresolvedKeyframes, element, name } = this;\n if (!element || !element.current)\n return;\n super.readKeyframes();\n /**\n * If any keyframe is a CSS variable, we need to find its value by sampling the element\n */\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n let keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\") {\n keyframe = keyframe.trim();\n if (isCSSVariableToken(keyframe)) {\n const resolved = getVariableValue(keyframe, element.current);\n if (resolved !== undefined) {\n unresolvedKeyframes[i] = resolved;\n }\n if (i === unresolvedKeyframes.length - 1) {\n this.finalKeyframe = keyframe;\n }\n }\n }\n }\n /**\n * Resolve \"none\" values. We do this potentially twice - once before and once after measuring keyframes.\n * This could be seen as inefficient but it's a trade-off to avoid measurements in more situations, which\n * have a far bigger performance impact.\n */\n this.resolveNoneKeyframes();\n /**\n * Check to see if unit type has changed. If so schedule jobs that will\n * temporarily set styles to the destination keyframes.\n * Skip if we have more than two keyframes or this isn't a positional value.\n * TODO: We can throw if there are multiple keyframes and the value type changes.\n */\n if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) {\n return;\n }\n const [origin, target] = unresolvedKeyframes;\n const originType = findDimensionValueType(origin);\n const targetType = findDimensionValueType(target);\n /**\n * If one keyframe contains embedded CSS variables (e.g. in calc()) and the other\n * doesn't, we need to measure to convert to pixels. This handles GitHub issue #3410.\n */\n const originHasVar = containsCSSVariable(origin);\n const targetHasVar = containsCSSVariable(target);\n if (originHasVar !== targetHasVar && positionalValues[name]) {\n this.needsMeasurement = true;\n return;\n }\n /**\n * Either we don't recognise these value types or we can animate between them.\n */\n if (originType === targetType)\n return;\n /**\n * If both values are numbers or pixels, we can animate between them by\n * converting them to numbers.\n */\n if (isNumOrPxType(originType) && isNumOrPxType(targetType)) {\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n const value = unresolvedKeyframes[i];\n if (typeof value === \"string\") {\n unresolvedKeyframes[i] = parseFloat(value);\n }\n }\n }\n else if (positionalValues[name]) {\n /**\n * Else, the only way to resolve this is by measuring the element.\n */\n this.needsMeasurement = true;\n }\n }\n resolveNoneKeyframes() {\n const { unresolvedKeyframes, name } = this;\n const noneKeyframeIndexes = [];\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n if (unresolvedKeyframes[i] === null ||\n isNone(unresolvedKeyframes[i])) {\n noneKeyframeIndexes.push(i);\n }\n }\n if (noneKeyframeIndexes.length) {\n makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name);\n }\n }\n measureInitialState() {\n const { element, unresolvedKeyframes, name } = this;\n if (!element || !element.current)\n return;\n if (name === \"height\") {\n this.suspendedScrollY = window.pageYOffset;\n }\n this.measuredOrigin = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\n unresolvedKeyframes[0] = this.measuredOrigin;\n // Set final key frame to measure after next render\n const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (measureKeyframe !== undefined) {\n element.getValue(name, measureKeyframe).jump(measureKeyframe, false);\n }\n }\n measureEndState() {\n const { element, name, unresolvedKeyframes } = this;\n if (!element || !element.current)\n return;\n const value = element.getValue(name);\n value && value.jump(this.measuredOrigin, false);\n const finalKeyframeIndex = unresolvedKeyframes.length - 1;\n const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex];\n unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\n if (finalKeyframe !== null && this.finalKeyframe === undefined) {\n this.finalKeyframe = finalKeyframe;\n }\n // If we removed transform values, reapply them before the next render\n if (this.removedTransforms?.length) {\n this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => {\n element\n .getValue(unsetTransformName)\n .set(unsetTransformValue);\n });\n }\n this.resolveNoneKeyframes();\n }\n}\n\nexport { DOMKeyframesResolver };\n//# sourceMappingURL=DOMKeyframesResolver.mjs.map\n"],"names":["DOMKeyframesResolver","KeyframeResolver","constructor","unresolvedKeyframes","onComplete","name","motionValue","element","super","readKeyframes","this","current","i","length","keyframe","trim","isCSSVariableToken","resolved","getVariableValue","undefined","finalKeyframe","resolveNoneKeyframes","positionalKeys","has","origin","target","originType","findDimensionValueType","targetType","containsCSSVariable","positionalValues","needsMeasurement","isNumOrPxType","value","parseFloat","noneKeyframeIndexes","isNone","push","makeNoneKeyframesAnimatable","measureInitialState","suspendedScrollY","window","pageYOffset","measuredOrigin","measureViewportBox","getComputedStyle","measureKeyframe","getValue","jump","measureEndState","finalKeyframeIndex","removedTransforms","forEach","unsetTransformName","unsetTransformValue","set"],"mappings":"0bAmBM,MAAOA,UAEHC,EAAAA,iBAONC,WAAAA,CACIC,EACAC,EACAC,EACAC,EACAC,GAEAC,MAAML,EAAqBC,EAAYC,EAAMC,EAAaC,GAAS,EACvE,CAEAE,aAAAA,GACI,MAAMN,oBAAEA,EAAmBI,QAAEA,EAAOF,KAAEA,GAASK,KAE/C,IAAKH,IAAYA,EAAQI,QAAS,OAElCH,MAAMC,gBAKN,IAAK,IAAIG,EAAI,EAAGA,EAAIT,EAAoBU,OAAQD,IAAK,CACjD,IAAIE,EAAWX,EAAoBS,GAEnC,GAAwB,iBAAbE,IACPA,EAAWA,EAASC,OAEhBC,EAAAA,mBAAmBF,IAAW,CAC9B,MAAMG,EAAWC,EAAgBA,iBAACJ,EAAUP,EAAQI,cAEnCQ,IAAbF,IACAd,EAAoBS,GAAKK,GAGzBL,IAAMT,EAAoBU,OAAS,IACnCH,KAAKU,cAAgBN,EAE7B,CAER,CAeA,GARAJ,KAAKW,wBAQAC,EAAcA,eAACC,IAAIlB,IAAwC,IAA/BF,EAAoBU,OACjD,OAGJ,MAAO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1B,EAAQwC,SAAS1C,GAC/B4B,GAASA,EAAMe,KAAKtC,KAAKiC,gBAAgB,GAEzC,MAAMO,EAAqB/C,EAAoBU,OAAS,EAClDO,EAAgBjB,EAAoB+C,GAE1C/C,EAAoB+C,GAAsBpB,mBAAiBzB,GACvDE,EAAQqC,qBACRH,OAAOI,iBAAiBtC,EAAQI,UAGd,OAAlBS,QAAiDD,IAAvBT,KAAKU,gBAC/BV,KAAKU,cAAgBA,GAIrBV,KAAKyC,mBAAmBtC,QACxBH,KAAKyC,kBAAkBC,QACnB,EAAEC,EAAoBC,MAClB/C,EACKwC,SAASM,GACTE,IAAID,KAKrB5C,KAAKW,sBACT"}
|
|
1
|
+
{"version":3,"file":"DOMKeyframesResolver.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs"],"sourcesContent":["import { positionalKeys } from '../../render/utils/keys-position.mjs';\nimport { findDimensionValueType } from '../../value/types/dimensions.mjs';\nimport { getVariableValue } from '../utils/css-variables-conversion.mjs';\nimport { containsCSSVariable, isCSSVariableToken } from '../utils/is-css-variable.mjs';\nimport { KeyframeResolver } from './KeyframesResolver.mjs';\nimport { isNone } from './utils/is-none.mjs';\nimport { makeNoneKeyframesAnimatable } from './utils/make-none-animatable.mjs';\nimport { positionalValues, isNumOrPxType } from './utils/unit-conversion.mjs';\n\nclass DOMKeyframesResolver extends KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element) {\n super(unresolvedKeyframes, onComplete, name, motionValue, element, true);\n }\n /**\n * Keyframes that don't need reading from the DOM, or measuring,\n * resolve straight away rather than in the frame loop's batched read.\n */\n scheduleResolve() {\n if (this.canReadNow()) {\n this.readKeyframes();\n if (!this.needsMeasurement)\n return this.complete();\n }\n super.scheduleResolve();\n }\n canReadNow() {\n const { unresolvedKeyframes, element, motionValue } = this;\n const origin = unresolvedKeyframes[0] ?? motionValue?.get();\n if (!element?.current || origin === undefined)\n return false;\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n if (containsCSSVariable(i ? unresolvedKeyframes[i] : origin)) {\n return false;\n }\n }\n return true;\n }\n readKeyframes() {\n const { unresolvedKeyframes, element, name } = this;\n if (!element || !element.current)\n return;\n super.readKeyframes();\n /**\n * If any keyframe is a CSS variable, we need to find its value by sampling the element\n */\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n let keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\") {\n keyframe = keyframe.trim();\n if (isCSSVariableToken(keyframe)) {\n const resolved = getVariableValue(keyframe, element.current);\n if (resolved !== undefined) {\n unresolvedKeyframes[i] = resolved;\n }\n if (i === unresolvedKeyframes.length - 1) {\n this.finalKeyframe = keyframe;\n }\n }\n }\n }\n /**\n * Resolve \"none\" values. We do this potentially twice - once before and once after measuring keyframes.\n * This could be seen as inefficient but it's a trade-off to avoid measurements in more situations, which\n * have a far bigger performance impact.\n */\n this.resolveNoneKeyframes();\n /**\n * Check to see if unit type has changed. If so schedule jobs that will\n * temporarily set styles to the destination keyframes.\n * Skip if we have more than two keyframes or this isn't a positional value.\n * TODO: We can throw if there are multiple keyframes and the value type changes.\n */\n if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) {\n return;\n }\n const [origin, target] = unresolvedKeyframes;\n // Two numbers share a unit, so skip the value type search.\n if (typeof origin === \"number\" && typeof target === \"number\")\n return;\n const originType = findDimensionValueType(origin);\n const targetType = findDimensionValueType(target);\n /**\n * If one keyframe contains embedded CSS variables (e.g. in calc()) and the other\n * doesn't, we need to measure to convert to pixels. This handles GitHub issue #3410.\n */\n const originHasVar = containsCSSVariable(origin);\n const targetHasVar = containsCSSVariable(target);\n if (originHasVar !== targetHasVar && positionalValues[name]) {\n this.needsMeasurement = true;\n return;\n }\n /**\n * Either we don't recognise these value types or we can animate between them.\n */\n if (originType === targetType)\n return;\n /**\n * If both values are numbers or pixels, we can animate between them by\n * converting them to numbers.\n */\n if (isNumOrPxType(originType) && isNumOrPxType(targetType)) {\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n const value = unresolvedKeyframes[i];\n if (typeof value === \"string\") {\n unresolvedKeyframes[i] = parseFloat(value);\n }\n }\n }\n else if (positionalValues[name]) {\n /**\n * Else, the only way to resolve this is by measuring the element.\n */\n this.needsMeasurement = true;\n }\n }\n resolveNoneKeyframes() {\n const { unresolvedKeyframes, name } = this;\n const noneKeyframeIndexes = [];\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n if (unresolvedKeyframes[i] === null ||\n isNone(unresolvedKeyframes[i])) {\n noneKeyframeIndexes.push(i);\n }\n }\n if (noneKeyframeIndexes.length) {\n makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name);\n }\n }\n measure() {\n const { element, name } = this;\n return positionalValues[name](window.getComputedStyle(element.current), () => element.measureViewportBox());\n }\n measureInitialState() {\n const { element, unresolvedKeyframes, name } = this;\n if (!element || !element.current)\n return;\n if (name === \"height\") {\n this.suspendedScrollY = window.pageYOffset;\n }\n this.measuredOrigin = this.measure();\n unresolvedKeyframes[0] = this.measuredOrigin;\n // Set final key frame to measure after next render\n const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (measureKeyframe !== undefined) {\n this.motionValue?.jump(measureKeyframe, false);\n }\n }\n measureEndState() {\n const { element, unresolvedKeyframes } = this;\n if (!element || !element.current)\n return;\n this.motionValue?.jump(this.measuredOrigin, false);\n const finalKeyframeIndex = unresolvedKeyframes.length - 1;\n const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex];\n unresolvedKeyframes[finalKeyframeIndex] = this.measure();\n if (finalKeyframe !== null && this.finalKeyframe === undefined) {\n this.finalKeyframe = finalKeyframe;\n }\n // If we removed transform values, reapply them before the next render\n if (this.removedTransforms?.length) {\n this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => {\n element\n .getValue(unsetTransformName)\n .set(unsetTransformValue);\n });\n }\n this.resolveNoneKeyframes();\n }\n}\n\nexport { DOMKeyframesResolver };\n//# sourceMappingURL=DOMKeyframesResolver.mjs.map\n"],"names":["DOMKeyframesResolver","KeyframeResolver","constructor","unresolvedKeyframes","onComplete","name","motionValue","element","super","scheduleResolve","this","canReadNow","readKeyframes","needsMeasurement","complete","origin","get","current","undefined","i","length","containsCSSVariable","keyframe","trim","isCSSVariableToken","resolved","getVariableValue","finalKeyframe","resolveNoneKeyframes","positionalKeys","has","target","originType","findDimensionValueType","targetType","positionalValues","isNumOrPxType","value","parseFloat","noneKeyframeIndexes","isNone","push","makeNoneKeyframesAnimatable","measure","window","getComputedStyle","measureViewportBox","measureInitialState","suspendedScrollY","pageYOffset","measuredOrigin","measureKeyframe","jump","measureEndState","finalKeyframeIndex","removedTransforms","forEach","unsetTransformName","unsetTransformValue","getValue","set"],"mappings":"0bAmBM,MAAOA,UAEHC,EAAAA,iBAONC,WAAAA,CACIC,EACAC,EACAC,EACAC,EACAC,GAEAC,MAAML,EAAqBC,EAAYC,EAAMC,EAAaC,GAAS,EACvE,CAMAE,eAAAA,GACI,GAAIC,KAAKC,eACLD,KAAKE,iBACAF,KAAKG,kBAAkB,OAAOH,KAAKI,WAG5CN,MAAMC,iBACV,CAEQE,UAAAA,GACJ,MAAMR,oBAAEA,EAAmBI,QAAEA,EAAOD,YAAEA,GAAgBI,KAChDK,EAASZ,EAAoB,IAAMG,GAAaU,MAEtD,IAAKT,GAASU,cAAsBC,IAAXH,EAAsB,OAAO,EAEtD,IAAK,IAAII,EAAI,EAAGA,EAAIhB,EAAoBiB,OAAQD,IAC5C,GAAIE,EAAAA,oBAAoBF,EAAIhB,EAAoBgB,GAAKJ,GACjD,OAAO,EAIf,OAAO,CACX,CAEAH,aAAAA,GACI,MAAMT,oBAAEA,EAAmBI,QAAEA,EAAOF,KAAEA,GAASK,KAE/C,IAAKH,IAAYA,EAAQU,QAAS,OAElCT,MAAMI,gBAKN,IAAK,IAAIO,EAAI,EAAGA,EAAIhB,EAAoBiB,OAAQD,IAAK,CACjD,IAAIG,EAA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EAASU,SACjC,IAAMV,EAASuC,qBAEvB,CAEAC,mBAAAA,GACI,MAAMxC,QAAEA,EAAOJ,oBAAEA,EAAmBE,KAAEA,GAASK,KAE/C,IAAKH,IAAYA,EAAQU,QAAS,OAErB,WAATZ,IACAK,KAAKsC,iBAAmBJ,OAAOK,aAGnCvC,KAAKwC,eAAiBxC,KAAKiC,UAE3BxC,EAAoB,GAAKO,KAAKwC,eAG9B,MAAMC,EACFhD,EAAoBA,EAAoBiB,OAAS,QAE7BF,IAApBiC,GACAzC,KAAKJ,aAAa8C,KAAKD,GAAsB,EAErD,CAEAE,eAAAA,GACI,MAAM9C,QAAEA,EAAOJ,oBAAEA,GAAwBO,KAEzC,IAAKH,IAAYA,EAAQU,QAAS,OAElCP,KAAKJ,aAAa8C,KAAK1C,KAAKwC,gBAAqB,GAEjD,MAAMI,EAAqBnD,EAAoBiB,OAAS,EAClDO,EAAgBxB,EAAoBmD,GAE1CnD,EAAoBmD,GAAsB5C,KAAKiC,UAEzB,OAAlBhB,QAAiDT,IAAvBR,KAAKiB,gBAC/BjB,KAAKiB,cAAgBA,GAIrBjB,KAAK6C,mBAAmBnC,QACxBV,KAAK6C,kBAAkBC,QACnB,EAAEC,EAAoBC,MAClBnD,EACKoD,SAASF,GACTG,IAAIF,KAKrBhD,KAAKkB,sBACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./utils/fill-wildcards.mjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../value/types/complex/index.mjs.js"),s=require("../../value/types/utils/animatable-none.mjs.js"),t=require("./utils/fill-wildcards.mjs.js"),r=require("./utils/unit-conversion.mjs.js"),i=require("../../frameloop/frame.mjs.js"),n=require("../../../../../motion-utils/dist/es/is-numerical-string.mjs.js"),a=require("../../../../../motion-utils/dist/es/is-zero-value-string.mjs.js");const o=new Set;let l=!1,m=!1,d=!1;function u(){if(m){const e=[],s=new Set,t=new Set;o.forEach(i=>{i.needsMeasurement&&(e.push(i),s.add(i.element),r.boxDependentValues.has(i.name)&&t.add(i.element))});const i=new Map;t.forEach(e=>{const s=r.removeNonTranslationalTransform(e);s.length&&(i.set(e,s),e.render())}),e.forEach(e=>e.measureInitialState()),s.forEach(e=>{e.render();const s=i.get(e);s&&s.forEach(([s,t])=>{e.getValue(s)?.set(t)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}m=!1,l=!1,o.forEach(e=>e.complete(d)),o.clear()}function c(){o.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(m=!0)})}exports.KeyframeResolver=class{constructor(e,s,t,r,i,n=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=s,this.name=t,this.motionValue=r,this.element=i,this.isAsync=n}scheduleResolve(){this.state="scheduled",this.isAsync?(o.add(this),l||(l=!0,i.frame.read(c),i.frame.resolveKeyframes(u))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:r,name:i,element:o,motionValue:l}=this;if(null===r[0]){const t=l?.get(),m=r[r.length-1];if(void 0!==t)r[0]=t;else if(o&&i){const t=function(t,r,i){if("string"==typeof t){if(n.isNumericalString(t)||a.isZeroValueString(t))return parseFloat(t);if(!e.complex.test(t)&&e.complex.test(i))return s.getAnimatableNone(r,i)}return t??void 0}(o.readValue(i,m),i,m);void 0!==t&&(r[0]=t)}void 0===r[0]&&(r[0]=m),l&&void 0===t&&l.set(r[0])}t.fillWildcards(r)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),o.delete(this)}cancel(){"scheduled"===this.state&&(o.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}},exports.flushKeyframeResolvers=function(){d=!0,c(),u(),d=!1};
|
|
2
2
|
//# sourceMappingURL=KeyframesResolver.mjs.js.map
|
package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyframesResolver.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs"],"sourcesContent":["import { fillWildcards } from './utils/fill-wildcards.mjs';\nimport { removeNonTranslationalTransform } from './utils/unit-conversion.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst toResolve = new Set();\nlet isScheduled = false;\nlet anyNeedsMeasurement = false;\nlet isForced = false;\nfunction measureAllKeyframes() {\n if (anyNeedsMeasurement) {\n const resolversToMeasure = Array.from(toResolve).filter((resolver) => resolver.needsMeasurement);\n const elementsToMeasure = new Set(resolversToMeasure.map((resolver) => resolver.element));\n const transformsToRestore = new Map();\n /**\n * Write pass\n * If we're measuring elements we want to remove bounding box-changing transforms.\n */\n elementsToMeasure.forEach((element) => {\n const removedTransforms = removeNonTranslationalTransform(element);\n if (!removedTransforms.length)\n return;\n transformsToRestore.set(element, removedTransforms);\n element.render();\n });\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureInitialState());\n // Write\n elementsToMeasure.forEach((element) => {\n element.render();\n const restore = transformsToRestore.get(element);\n if (restore) {\n restore.forEach(([key, value]) => {\n element.getValue(key)?.set(value);\n });\n }\n });\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureEndState());\n // Write\n resolversToMeasure.forEach((resolver) => {\n if (resolver.suspendedScrollY !== undefined) {\n window.scrollTo(0, resolver.suspendedScrollY);\n }\n });\n }\n anyNeedsMeasurement = false;\n isScheduled = false;\n toResolve.forEach((resolver) => resolver.complete(isForced));\n toResolve.clear();\n}\nfunction readAllKeyframes() {\n toResolve.forEach((resolver) => {\n resolver.readKeyframes();\n if (resolver.needsMeasurement) {\n anyNeedsMeasurement = true;\n }\n });\n}\nfunction flushKeyframeResolvers() {\n isForced = true;\n readAllKeyframes();\n measureAllKeyframes();\n isForced = false;\n}\nclass KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element, isAsync = false) {\n this.state = \"pending\";\n /**\n * Track whether this resolver is async. If it is, it'll be added to the\n * resolver queue and flushed in the next frame. Resolvers that aren't going\n * to trigger read/write thrashing don't need to be async.\n */\n this.isAsync = false;\n /**\n * Track whether this resolver needs to perform a measurement\n * to resolve its keyframes.\n */\n this.needsMeasurement = false;\n this.unresolvedKeyframes = [...unresolvedKeyframes];\n this.onComplete = onComplete;\n this.name = name;\n this.motionValue = motionValue;\n this.element = element;\n this.isAsync = isAsync;\n }\n scheduleResolve() {\n this.state = \"scheduled\";\n if (this.isAsync) {\n toResolve.add(this);\n if (!isScheduled) {\n isScheduled = true;\n frame.read(readAllKeyframes);\n frame.resolveKeyframes(measureAllKeyframes);\n }\n }\n else {\n this.readKeyframes();\n this.complete();\n }\n }\n readKeyframes() {\n const { unresolvedKeyframes, name, element, motionValue } = this;\n // If initial keyframe is null we need to read it from the DOM\n if (unresolvedKeyframes[0] === null) {\n const currentValue = motionValue?.get();\n // TODO: This doesn't work if the final keyframe is a wildcard\n const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (currentValue !== undefined) {\n unresolvedKeyframes[0] = currentValue;\n }\n else if (element && name) {\n const valueAsRead = element.readValue(name, finalKeyframe);\n if (valueAsRead !== undefined && valueAsRead !== null) {\n unresolvedKeyframes[0] = valueAsRead;\n }\n }\n if (unresolvedKeyframes[0] === undefined) {\n unresolvedKeyframes[0] = finalKeyframe;\n }\n if (motionValue && currentValue === undefined) {\n motionValue.set(unresolvedKeyframes[0]);\n }\n }\n fillWildcards(unresolvedKeyframes);\n }\n setFinalKeyframe() { }\n measureInitialState() { }\n renderEndStyles() { }\n measureEndState() { }\n complete(isForcedComplete = false) {\n this.state = \"complete\";\n this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, isForcedComplete);\n toResolve.delete(this);\n }\n cancel() {\n if (this.state === \"scheduled\") {\n toResolve.delete(this);\n this.state = \"pending\";\n }\n }\n resume() {\n if (this.state === \"pending\")\n this.scheduleResolve();\n }\n}\n\nexport { KeyframeResolver, flushKeyframeResolvers };\n//# sourceMappingURL=KeyframesResolver.mjs.map\n"],"names":["toResolve","Set","isScheduled","anyNeedsMeasurement","isForced","measureAllKeyframes","resolversToMeasure","Array","from","filter","resolver","needsMeasurement","elementsToMeasure","map","element","transformsToRestore","Map","forEach","removedTransforms","removeNonTranslationalTransform","length","set","render","measureInitialState","restore","get","key","value","getValue","measureEndState","undefined","suspendedScrollY","window","scrollTo","complete","clear","readAllKeyframes","readKeyframes","constructor","unresolvedKeyframes","onComplete","name","motionValue","isAsync","this","state","scheduleResolve","add","frame","read","resolveKeyframes","currentValue","finalKeyframe","valueAsRead","readValue","fillWildcards","setFinalKeyframe","renderEndStyles","isForcedComplete","delete","cancel","resume","flushKeyframeResolvers"],"mappings":"yMAWA,MAAMA,EAAY,IAAIC,IACtB,IAAIC,GAAc,EACdC,GAAsB,EACtBC,GAAW,EAEf,SAASC,IACL,GAAIF,EAAqB,CACrB,MAAMG,EAAqBC,MAAMC,KAAKR,GAAWS,OAC5CC,GAA+BA,EAASC,kBAEvCC,EAAoB,IAAIX,IAC1BK,EAAmBO,IAAKH,GAAaA,EAASI,UAE5CC,EAAsB,IAAIC,IAShCJ,EAAkBK,QAASH,IACvB,MAAMI,EAAoBC,kCACtBL,GAGCI,EAAkBE,SAEvBL,EAAoBM,IAAIP,EAASI,GAEjCJ,EAAQQ,YAIZhB,EAAmBW,QAASP,GAAaA,EAASa,uBAGlDX,EAAkBK,QAASH,IACvBA,EAAQQ,SAER,MAAME,EAAUT,EAAoBU,IAAIX,GACpCU,GACAA,EAAQP,QAAQ,EAAES,EAAKC,MACnBb,EAAQc,SAASF,IAAML,IAAIM,OAMvCrB,EAAmBW,QAASP,GAAaA,EAASmB,mBAGlDvB,EAAmBW,QAASP,SACUoB,IAA9BpB,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,GAAmB,CACnB5B,eAAAA,GAAmB,CAEnBK,QAAAA,CAASwB,GAAmB,GACxBd,KAAKC,MAAQ,WAEbD,KAAKJ,WACDI,KAAKL,oBACLK,KAAKQ,cACLM,GAGJ1D,EAAU2D,OAAOf,KACrB,CAEAgB,MAAAA,GACuB,cAAfhB,KAAKC,QACL7C,EAAU2D,OAAOf,MACjBA,KAAKC,MAAQ,UAErB,CAEAgB,MAAAA,GACuB,YAAfjB,KAAKC,OAAqBD,KAAKE,iBACvC,kCAnIYgB,WACZ1D,GAAW,EACXgC,IACA/B,IACAD,GAAW,CACf"}
|
|
1
|
+
{"version":3,"file":"KeyframesResolver.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs"],"sourcesContent":["import { isNumericalString, isZeroValueString } from 'motion-utils';\nimport { complex } from '../../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../../value/types/utils/animatable-none.mjs';\nimport { fillWildcards } from './utils/fill-wildcards.mjs';\nimport { boxDependentValues, removeNonTranslationalTransform } from './utils/unit-conversion.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst toResolve = new Set();\nlet isScheduled = false;\nlet anyNeedsMeasurement = false;\nlet isForced = false;\nfunction measureAllKeyframes() {\n if (anyNeedsMeasurement) {\n const resolversToMeasure = [];\n const elementsToMeasure = new Set();\n const elementsToUntransform = new Set();\n toResolve.forEach((resolver) => {\n if (!resolver.needsMeasurement)\n return;\n resolversToMeasure.push(resolver);\n elementsToMeasure.add(resolver.element);\n if (boxDependentValues.has(resolver.name)) {\n elementsToUntransform.add(resolver.element);\n }\n });\n const transformsToRestore = new Map();\n /**\n * Write pass\n * Values measured from the bounding box need bounding box-changing\n * transforms removed first. Values read from computed style don't.\n */\n elementsToUntransform.forEach((element) => {\n const removedTransforms = removeNonTranslationalTransform(element);\n if (!removedTransforms.length)\n return;\n transformsToRestore.set(element, removedTransforms);\n element.render();\n });\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureInitialState());\n // Write\n elementsToMeasure.forEach((element) => {\n element.render();\n const restore = transformsToRestore.get(element);\n if (restore) {\n restore.forEach(([key, value]) => {\n element.getValue(key)?.set(value);\n });\n }\n });\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureEndState());\n // Write\n resolversToMeasure.forEach((resolver) => {\n if (resolver.suspendedScrollY !== undefined) {\n window.scrollTo(0, resolver.suspendedScrollY);\n }\n });\n }\n anyNeedsMeasurement = false;\n isScheduled = false;\n toResolve.forEach((resolver) => resolver.complete(isForced));\n toResolve.clear();\n}\nfunction readAllKeyframes() {\n toResolve.forEach((resolver) => {\n resolver.readKeyframes();\n if (resolver.needsMeasurement) {\n anyNeedsMeasurement = true;\n }\n });\n}\nfunction flushKeyframeResolvers() {\n isForced = true;\n readAllKeyframes();\n measureAllKeyframes();\n isForced = false;\n}\n/**\n * Normalise a value read from the subject into an animation origin: a\n * number read as a string (\"0\", \"200\") becomes a number, and a value\n * that isn't animatable (e.g. \"none\") but whose target is becomes an\n * animatable zero in the shape of the target.\n */\nfunction readOrigin(value, name, target) {\n if (typeof value === \"string\") {\n if (isNumericalString(value) || isZeroValueString(value)) {\n return parseFloat(value);\n }\n else if (!complex.test(value) && complex.test(target)) {\n return getAnimatableNone(name, target);\n }\n }\n return value ?? undefined;\n}\nclass KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element, isAsync = false) {\n this.state = \"pending\";\n /**\n * Track whether this resolver is async. If it is, it'll be added to the\n * resolver queue and flushed in the next frame. Resolvers that aren't going\n * to trigger read/write thrashing don't need to be async.\n */\n this.isAsync = false;\n /**\n * Track whether this resolver needs to perform a measurement\n * to resolve its keyframes.\n */\n this.needsMeasurement = false;\n this.unresolvedKeyframes = [...unresolvedKeyframes];\n this.onComplete = onComplete;\n this.name = name;\n this.motionValue = motionValue;\n this.element = element;\n this.isAsync = isAsync;\n }\n scheduleResolve() {\n this.state = \"scheduled\";\n if (this.isAsync) {\n toResolve.add(this);\n if (!isScheduled) {\n isScheduled = true;\n frame.read(readAllKeyframes);\n frame.resolveKeyframes(measureAllKeyframes);\n }\n }\n else {\n this.readKeyframes();\n this.complete();\n }\n }\n readKeyframes() {\n const { unresolvedKeyframes, name, element, motionValue } = this;\n // If initial keyframe is null we need to read it from the DOM\n if (unresolvedKeyframes[0] === null) {\n const currentValue = motionValue?.get();\n // TODO: This doesn't work if the final keyframe is a wildcard\n const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (currentValue !== undefined) {\n unresolvedKeyframes[0] = currentValue;\n }\n else if (element && name) {\n const valueAsRead = readOrigin(element.readValue(name, finalKeyframe), name, finalKeyframe);\n if (valueAsRead !== undefined) {\n unresolvedKeyframes[0] = valueAsRead;\n }\n }\n if (unresolvedKeyframes[0] === undefined) {\n unresolvedKeyframes[0] = finalKeyframe;\n }\n if (motionValue && currentValue === undefined) {\n motionValue.set(unresolvedKeyframes[0]);\n }\n }\n fillWildcards(unresolvedKeyframes);\n }\n setFinalKeyframe() { }\n measureInitialState() { }\n renderEndStyles() { }\n measureEndState() { }\n complete(isForcedComplete = false) {\n this.state = \"complete\";\n this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, isForcedComplete);\n toResolve.delete(this);\n }\n cancel() {\n if (this.state === \"scheduled\") {\n toResolve.delete(this);\n this.state = \"pending\";\n }\n }\n resume() {\n if (this.state === \"pending\")\n this.scheduleResolve();\n }\n}\n\nexport { KeyframeResolver, flushKeyframeResolvers };\n//# sourceMappingURL=KeyframesResolver.mjs.map\n"],"names":["toResolve","Set","isScheduled","anyNeedsMeasurement","isForced","measureAllKeyframes","resolversToMeasure","elementsToMeasure","elementsToUntransform","forEach","resolver","needsMeasurement","push","add","element","boxDependentValues","has","name","transformsToRestore","Map","removedTransforms","removeNonTranslationalTransform","length","set","render","measureInitialState","restore","get","key","value","getValue","measureEndState","undefined","suspendedScrollY","window","scrollTo","complete","clear","readAllKeyframes","readKeyframes","constructor","unresolvedKeyframes","onComplete","motionValue","isAsync","this","state","scheduleResolve","frame","read","resolveKeyframes","currentValue","finalKeyframe","valueAsRead","target","isNumericalString","isZeroValueString","parseFloat","complex","test","getAnimatableNone","readOrigin","readValue","fillWildcards","setFinalKeyframe","renderEndStyles","isForcedComplete","delete","cancel","resume","flushKeyframeResolvers"],"mappings":"kdAiBA,MAAMA,EAAY,IAAIC,IACtB,IAAIC,GAAc,EACdC,GAAsB,EACtBC,GAAW,EAEf,SAASC,IACL,GAAIF,EAAqB,CACrB,MAAMG,EAAyC,GACzCC,EAAoB,IAAIN,IACxBO,EAAwB,IAAIP,IAElCD,EAAUS,QAASC,IACVA,EAASC,mBAEdL,EAAmBM,KAAKF,GACxBH,EAAkBM,IAAIH,EAASI,SAE3BC,qBAAmBC,IAAIN,EAASO,OAChCT,EAAsBK,IAAIH,EAASI,YAI3C,MAAMI,EAAsB,IAAIC,IAUhCX,EAAsBC,QAASK,IAC3B,MAAMM,EAAoBC,kCACtBP,GAGCM,EAAkBE,SAEvBJ,EAAoBK,IAAIT,EAASM,GAEjCN,EAAQU,YAIZlB,EAAmBG,QAASC,GAAaA,EAASe,uBAGlDlB,EAAkBE,QAASK,IACvBA,EAAQU,SAER,MAAME,EAAUR,EAAoBS,IAAIb,GACpCY,GACAA,EAAQjB,QAAQ,EAAEmB,EAAKC,MACnBf,EAAQgB,SAASF,IAAML,IAAIM,OAMvCvB,EAAmBG,QAASC,GAAaA,EAASqB,mBAGlDzB,EAAmBG,QAASC,SACUsB,IAA9BtB,EAASuB,kBACTC,OAAOC,SAAS,EAAGzB,EAASuB,mBAGxC,CAEA9B,GAAsB,EACtBD,GAAc,EAEdF,EAAUS,QAASC,GAAaA,EAAS0B,SAAShC,IAClDJ,EAAUqC,OACd,CAEA,SAASC,IACLtC,EAAUS,QAASC,IACfA,EAAS6B,gBAEL7B,EAASC,mBACTR,GAAsB,IAGlC,gCA+DIqC,WAAAA,CACIC,EACAC,EACAzB,EACA0B,EACA7B,EACA8B,GAAU,GArBdC,K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AuB,CACvBwC,eAAAA,GAAmB,CACnBlC,eAAAA,GAAmB,CAEnBK,QAAAA,CAAS8B,GAAmB,GACxBrB,KAAKC,MAAQ,WAEbD,KAAKH,WACDG,KAAKJ,oBACLI,KAAKO,cACLc,GAGJlE,EAAUmE,OAAOtB,KACrB,CAEAuB,MAAAA,GACuB,cAAfvB,KAAKC,QACL9C,EAAUmE,OAAOtB,MACjBA,KAAKC,MAAQ,UAErB,CAEAuB,MAAAA,GACuB,YAAfxB,KAAKC,OAAqBD,KAAKE,iBACvC,kCA7JYuB,WACZlE,GAAW,EACXkC,IACAjC,IACAD,GAAW,CACf"}
|
package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../value/types/complex/index.mjs.js"),t=require("../../../value/types/utils/animatable-none.mjs.js");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../value/types/complex/index.mjs.js"),t=require("../../../value/types/utils/animatable-none.mjs.js");const s=new Set(["auto","none","0"]);exports.makeNoneKeyframesAnimatable=function(n,o,a){let r,l=0;for(;l<n.length&&!r;){const t=n[l];"string"==typeof t&&!s.has(t)&&e.hasComplexValues(t)&&(r=n[l]),l++}if(r&&a)for(const e of o)n[e]!==r&&(n[e]=t.getAnimatableNone(a,r))};
|
|
2
2
|
//# sourceMappingURL=make-none-animatable.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"make-none-animatable.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"make-none-animatable.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs"],"sourcesContent":["import { hasComplexValues } from '../../../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../../../value/types/utils/animatable-none.mjs';\n\n/**\n * If we encounter keyframes like \"none\" or \"0\" and we also have keyframes like\n * \"#fff\" or \"200px 200px\" we want to find a keyframe to serve as a template for\n * the \"none\" keyframes. In this case \"#fff\" or \"200px 200px\" - then these get turned into\n * zero equivalents, i.e. \"#fff0\" or \"0px 0px\".\n */\nconst invalidTemplates = new Set([\"auto\", \"none\", \"0\"]);\nfunction makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) {\n let i = 0;\n let animatableTemplate = undefined;\n while (i < unresolvedKeyframes.length && !animatableTemplate) {\n const keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\" &&\n !invalidTemplates.has(keyframe) &&\n hasComplexValues(keyframe)) {\n animatableTemplate = unresolvedKeyframes[i];\n }\n i++;\n }\n if (animatableTemplate && name) {\n for (const noneIndex of noneKeyframeIndexes) {\n /**\n * A zero-valued template like \"0%\" is already its own\n * animatable none, so there's nothing to derive.\n */\n if (unresolvedKeyframes[noneIndex] === animatableTemplate)\n continue;\n unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate);\n }\n }\n}\n\nexport { makeNoneKeyframesAnimatable };\n//# sourceMappingURL=make-none-animatable.mjs.map\n"],"names":["invalidTemplates","Set","makeNoneKeyframesAnimatable","unresolvedKeyframes","noneKeyframeIndexes","name","animatableTemplate","i","length","keyframe","has","hasComplexValues","noneIndex","getAnimatableNone"],"mappings":"8LAWA,MAAMA,EAAmB,IAAIC,IAAI,CAAC,OAAQ,OAAQ,0CAElCC,SACZC,EACAC,EACAC,GAEA,IACIC,EADAC,EAAI,EAER,KAAOA,EAAIJ,EAAoBK,SAAWF,GAAoB,CAC1D,MAAMG,EAAWN,EAAoBI,GAEb,iBAAbE,IACNT,EAAiBU,IAAID,IACtBE,mBAAiBF,KAEjBH,EAAqBH,EAAoBI,IAE7CA,GACJ,CAEA,GAAID,GAAsBD,EACtB,IAAK,MAAMO,KAAaR,EAKhBD,EAAoBS,KAAeN,IAEvCH,EAAoBS,GAAaC,EAAiBA,kBAC9CR,EACAC,GAIhB"}
|
package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../render/dom/parse-transform.mjs.js"),r=require("../../../render/utils/keys-transform.mjs.js"),t=require("../../../value/types/numbers/index.mjs.js"),s=require("../../../value/types/numbers/units.mjs.js");const o=new Set(["x","y","z"]),n=r.transformPropOrder.filter(e=>!o.has(e));const a=new Set(["bottom","right"]);function i(e,r,t,s,o,n){const a=parseFloat(e);if(!isNaN(a))return a;const{min:i,max:p}=r()[t],m=p-i;return"border-box"===n?m:m-parseFloat(s)-parseFloat(o)}const p=({transform:r})=>e.parseValueFromTransform(r,"x"),m=({transform:r})=>e.parseValueFromTransform(r,"y"),u={width:({width:e,paddingLeft:r="0",paddingRight:t="0",boxSizing:s},o)=>i(e,o,"x",r,t,s),height:({height:e,paddingTop:r="0",paddingBottom:t="0",boxSizing:s},o)=>i(e,o,"y",r,t,s),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},r)=>{const{y:t}=r();return parseFloat(e)+(t.max-t.min)},right:({left:e},r)=>{const{x:t}=r();return parseFloat(e)+(t.max-t.min)},x:p,y:m,translateX:p,translateY:m};exports.boxDependentValues=a,exports.isNumOrPxType=e=>e===t.number||e===s.px,exports.positionalValues=u,exports.removeNonTranslationalTransform=function(e){const r=[];return n.forEach(t=>{const s=e.getValue(t);if(void 0!==s){const e=s.get(),o=t.startsWith("scale")?1:0;if(e===o)return;r.push([t,e]),s.set(o)}}),r};
|
|
2
2
|
//# sourceMappingURL=unit-conversion.mjs.js.map
|
package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unit-conversion.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs"],"sourcesContent":["import { parseValueFromTransform } from '../../../render/dom/parse-transform.mjs';\nimport { transformPropOrder } from '../../../render/utils/keys-transform.mjs';\nimport { number } from '../../../value/types/numbers/index.mjs';\nimport { px } from '../../../value/types/numbers/units.mjs';\n\nconst isNumOrPxType = (v) => v === number || v === px;\nconst transformKeys = new Set([\"x\", \"y\", \"z\"]);\nconst nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key));\nfunction removeNonTranslationalTransform(visualElement) {\n const removedTransforms = [];\n nonTranslationalTransformKeys.forEach((key) => {\n const value = visualElement.getValue(key);\n if (value !== undefined) {\n
|
|
1
|
+
{"version":3,"file":"unit-conversion.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs"],"sourcesContent":["import { parseValueFromTransform } from '../../../render/dom/parse-transform.mjs';\nimport { transformPropOrder } from '../../../render/utils/keys-transform.mjs';\nimport { number } from '../../../value/types/numbers/index.mjs';\nimport { px } from '../../../value/types/numbers/units.mjs';\n\nconst isNumOrPxType = (v) => v === number || v === px;\nconst transformKeys = new Set([\"x\", \"y\", \"z\"]);\nconst nonTranslationalTransformKeys = /* @__PURE__ */ transformPropOrder.filter((key) => !transformKeys.has(key));\n/**\n * Reset any bounding box-changing transforms so the element can be\n * measured. Returns the values to restore. Values already at their\n * default don't change the box, so they're left alone: an element with\n * only `rotate: 0` doesn't need to be re-rendered before measuring.\n */\nfunction removeNonTranslationalTransform(visualElement) {\n const removedTransforms = [];\n nonTranslationalTransformKeys.forEach((key) => {\n const value = visualElement.getValue(key);\n if (value !== undefined) {\n const current = value.get();\n const reset = key.startsWith(\"scale\") ? 1 : 0;\n if (current === reset)\n return;\n removedTransforms.push([key, current]);\n value.set(reset);\n }\n });\n return removedTransforms;\n}\n/**\n * Values that can only be measured from the bounding box. Elements with\n * these values need bounding box-changing transforms removed first.\n */\nconst boxDependentValues = new Set([\"bottom\", \"right\"]);\n/**\n * Computed width/height is already in pixels and unaffected by\n * transforms. It's \"auto\" for elements without a layout box (e.g. inline),\n * in which case we fall back to measuring the bounding box.\n */\nfunction measureDimension(computed, measureBox, axis, paddingStart, paddingEnd, boxSizing) {\n const px = parseFloat(computed);\n if (!isNaN(px))\n return px;\n const { min, max } = measureBox()[axis];\n const size = max - min;\n return boxSizing === \"border-box\"\n ? size\n : size - parseFloat(paddingStart) - parseFloat(paddingEnd);\n}\nconst transformX = ({ transform }) => parseValueFromTransform(transform, \"x\");\nconst transformY = ({ transform }) => parseValueFromTransform(transform, \"y\");\nconst positionalValues = {\n // Dimensions\n width: ({ width, paddingLeft = \"0\", paddingRight = \"0\", boxSizing }, measureBox) => measureDimension(width, measureBox, \"x\", paddingLeft, paddingRight, boxSizing),\n height: ({ height, paddingTop = \"0\", paddingBottom = \"0\", boxSizing }, measureBox) => measureDimension(height, measureBox, \"y\", paddingTop, paddingBottom, boxSizing),\n top: ({ top }) => parseFloat(top),\n left: ({ left }) => parseFloat(left),\n bottom: ({ top }, measureBox) => {\n const { y } = measureBox();\n return parseFloat(top) + (y.max - y.min);\n },\n right: ({ left }, measureBox) => {\n const { x } = measureBox();\n return parseFloat(left) + (x.max - x.min);\n },\n // Transform, including translate longform names\n x: transformX,\n y: transformY,\n translateX: transformX,\n translateY: transformY,\n};\n\nexport { boxDependentValues, isNumOrPxType, positionalValues, removeNonTranslationalTransform };\n//# sourceMappingURL=unit-conversion.mjs.map\n"],"names":["isNumOrPxType","transformKeys","Set","nonTranslationalTransformKeys","transformPropOrder","filter","key","has","boxDependentValues","measureDimension","computed","measureBox","axis","paddingStart","paddingEnd","boxSizing","px","parseFloat","isNaN","min","max","size","transformX","transform","parseValueFromTransform","transformY","positionalValues","width","paddingLeft","paddingRight","height","paddingTop","paddingBottom","top","left","bottom","y","right","x","translateX","translateY","v","number","visualElement","removedTransforms","forEach","value","getValue","undefined","current","get","reset","startsWith","push","set"],"mappings":"uSAUaA,MAaPC,EAAgB,IAAIC,IAAI,CAAC,IAAK,IAAK,MACnCC,EAAgDC,EAAAA,mBAAmBC,OACpEC,IAASL,EAAcM,IAAID,IAmCnBE,MAAAA,EAAqB,IAAIN,IAAI,CAAC,SAAU,UAOrD,SAASO,EACLC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAKC,WAAWP,GACtB,IAAKQ,MAAMF,GAAK,OAAOA,EAEvB,MAAMG,IAAEA,EAAGC,IAAEA,GAAQT,IAAaC,GAC5BS,EAAOD,EAAMD,EACnB,MAAqB,eAAdJ,EACDM,EACAA,EAAOJ,WAAWJ,GAAgBI,WAAWH,EACvD,CAEA,MAAMQ,EAA2CA,EAAGC,eAChDC,EAAuBA,wBAACD,EAAW,KACjCE,EAA2CA,EAAGF,eAChDC,EAAuBA,wBAACD,EAAW,KAE1BG,EACT,CAEIC,MAAOA,EACDA,QAAOC,cAAc,IAAKC,eAAe,IAAKd,aAChDJ,IAEAF,EACIkB,EACAhB,EACA,IACAiB,EACAC,EACAd,GAERe,OAAQA,EACFA,SAAQC,aAAa,IAAKC,gBAAgB,IAAKjB,aACjDJ,IAEAF,EACIqB,EACAnB,EACA,IACAoB,EACAC,EACAjB,GAGRkB,IAAKA,EAAGA,SAAUhB,WAAWgB,GAC7BC,KAAMA,EAAGA,UAAWjB,WAAWiB,GAC/BC,OAAQA,EAAGF,OAAOtB,KACd,MAAMyB,EAAEA,GAAMzB,IACd,OAAOM,WAAWgB,IAAkBG,EAAEhB,IAAMgB,EAAEjB,MAElDkB,MAAOA,EAAGH,QAAQvB,KACd,MAAM2B,EAAEA,GAAM3B,IACd,OAAOM,WAAWiB,IAAmBI,EAAElB,IAAMkB,EAAEnB,MAInDmB,EAAGhB,EACHc,EAAGX,EACHc,WAAYjB,EACZkB,WAAYf,sDA3HUgB,GAC1BA,IAAMC,EAAMA,QAAID,IAAMzB,EAAAA,sEAyBpB,SAA0C2B,GAC5C,MAAMC,EAAuC,GAgB7C,OAdAzC,EAA8B0C,QAASvC,IACnC,MAAMwC,EACFH,EAAcI,SAASzC,GAC3B,QAAc0C,IAAVF,EAAqB,CACrB,MAAMG,EAAUH,EAAMI,MAChBC,EAAQ7C,EAAI8C,WAAW,SAAW,EAAI,EAE5C,GAAIH,IAAYE,EAAO,OAEvBP,EAAkBS,KAAK,CAAC/C,EAAK2C,IAC7BH,EAAMQ,IAAIH,EACd,IAGGP,CACX"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.optimizedAppearDataAttribute="data-framer-appear-id";
|
|
2
2
|
//# sourceMappingURL=data-id.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-id.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"data-id.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs"],"sourcesContent":["const optimizedAppearDataId = \"framerAppearId\";\nconst optimizedAppearDataAttribute = \"data-framer-appear-id\";\n\nexport { optimizedAppearDataAttribute, optimizedAppearDataId };\n//# sourceMappingURL=data-id.mjs.map\n"],"names":[],"mappings":"yGAE4C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.WithPromise=class{constructor(){this.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.WithPromise=class{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,s){return this.finished.then(e,s)}};
|
|
2
2
|
//# sourceMappingURL=WithPromise.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithPromise.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs"],"sourcesContent":["class WithPromise {\n constructor() {\n this.
|
|
1
|
+
{"version":3,"file":"WithPromise.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs"],"sourcesContent":["class WithPromise {\n constructor() {\n this.isResolved = false;\n }\n get finished() {\n if (!this._finished) {\n this._finished = this.isResolved\n ? Promise.resolve()\n : new Promise((resolve) => {\n this._resolve = resolve;\n });\n }\n return this._finished;\n }\n updateFinished() {\n this._finished = this._resolve = undefined;\n this.isResolved = false;\n }\n notifyFinished() {\n this.isResolved = true;\n this._resolve?.();\n }\n /**\n * Allows the animation to be awaited.\n *\n * @deprecated Use `finished` instead.\n */\n then(onResolve, onReject) {\n return this.finished.then(onResolve, onReject);\n }\n}\n\nexport { WithPromise };\n//# sourceMappingURL=WithPromise.mjs.map\n"],"names":["constructor","this","isResolved","finished","_finished","Promise","resolve","_resolve","updateFinished","undefined","notifyFinished","then","onResolve","onReject"],"mappings":"8FAAAA,WAAAA,GAUYC,KAAAC,YAAa,CAgCzB,CA9BI,YAAIC,GASA,OARKF,KAAKG,YACNH,KAAKG,UAAYH,KAAKC,WAChBG,QAAQC,UACR,IAAID,QAAeC,IACfL,KAAKM,SAAWD,KAIvBL,KAAKG,SAChB,CAEUI,cAAAA,GACNP,KAAKG,UAAYH,KAAKM,cAAWE,EACjCR,KAAKC,YAAa,CACtB,CAEUQ,cAAAA,GACNT,KAAKC,YAAa,EAClBD,KAAKM,YACT,CAOAI,IAAAA,CAAKC,EAAyBC,GAC1B,OAAOZ,KAAKE,SAASQ,KAAKC,EAAWC,EACzC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../generators/utils/is-generator.mjs.js"),t=require("./is-animatable.mjs.js"),r=require("../../../../../motion-utils/dist/es/errors.mjs.js");exports.canAnimate=function(i,n,s,a){const o=i[0];if(null===o)return!1;if("display"===n||"visibility"===n)return!0;const l=i[i.length-1],u=t.isAnimatable(o,n),m=t.isAnimatable(l,n);return
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../generators/utils/is-generator.mjs.js"),t=require("./is-animatable.mjs.js"),r=require("../../../../../motion-utils/dist/es/errors.mjs.js");exports.canAnimate=function(i,n,s,a){const o=i[0];if(null===o)return!1;if("display"===n||"visibility"===n)return!0;const l=i[i.length-1],u=t.isAnimatable(o,n),m=t.isAnimatable(l,n);return u&&m?function(e){const t=e[0];if(1===e.length)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}(i)||("spring"===s||e.isGenerator(s))&&a:(u!==m&&r.warning(!1,`You are trying to animate ${n} from "${o}" to "${l}". "${u?l:o}" is not an animatable value.`,"value-not-animatable"),!1)};
|
|
2
2
|
//# sourceMappingURL=can-animate.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"can-animate.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs"],"sourcesContent":["import { warning } from 'motion-utils';\nimport { isGenerator } from '../generators/utils/is-generator.mjs';\nimport { isAnimatable } from './is-animatable.mjs';\n\nfunction hasKeyframesChanged(keyframes) {\n const current = keyframes[0];\n if (keyframes.length === 1)\n return true;\n for (let i = 0; i < keyframes.length; i++) {\n if (keyframes[i] !== current)\n return true;\n }\n}\nfunction canAnimate(keyframes, name, type, velocity) {\n /**\n * Check if we're able to animate between the start and end keyframes,\n * and throw a warning if we're attempting to animate between one that's\n * animatable and another that isn't.\n */\n const originKeyframe = keyframes[0];\n if (originKeyframe === null) {\n return false;\n }\n /**\n * These aren't traditionally animatable but we do support them.\n * In future we could look into making this more generic or replacing\n * this function with mix() === mixImmediate\n */\n if (name === \"display\" || name === \"visibility\")\n return true;\n const targetKeyframe = keyframes[keyframes.length - 1];\n const isOriginAnimatable = isAnimatable(originKeyframe, name);\n const isTargetAnimatable = isAnimatable(targetKeyframe, name);\n
|
|
1
|
+
{"version":3,"file":"can-animate.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs"],"sourcesContent":["import { warning } from 'motion-utils';\nimport { isGenerator } from '../generators/utils/is-generator.mjs';\nimport { isAnimatable } from './is-animatable.mjs';\n\nfunction hasKeyframesChanged(keyframes) {\n const current = keyframes[0];\n if (keyframes.length === 1)\n return true;\n for (let i = 0; i < keyframes.length; i++) {\n if (keyframes[i] !== current)\n return true;\n }\n}\nfunction canAnimate(keyframes, name, type, velocity) {\n /**\n * Check if we're able to animate between the start and end keyframes,\n * and throw a warning if we're attempting to animate between one that's\n * animatable and another that isn't.\n */\n const originKeyframe = keyframes[0];\n if (originKeyframe === null) {\n return false;\n }\n /**\n * These aren't traditionally animatable but we do support them.\n * In future we could look into making this more generic or replacing\n * this function with mix() === mixImmediate\n */\n if (name === \"display\" || name === \"visibility\")\n return true;\n const targetKeyframe = keyframes[keyframes.length - 1];\n const isOriginAnimatable = isAnimatable(originKeyframe, name);\n const isTargetAnimatable = isAnimatable(targetKeyframe, name);\n // Always skip if any of these are true\n if (!isOriginAnimatable || !isTargetAnimatable) {\n // Only build the message when we're going to warn\n isOriginAnimatable !== isTargetAnimatable &&\n warning(false, `You are trying to animate ${name} from \"${originKeyframe}\" to \"${targetKeyframe}\". \"${isOriginAnimatable ? targetKeyframe : originKeyframe}\" is not an animatable value.`, \"value-not-animatable\");\n return false;\n }\n return (hasKeyframesChanged(keyframes) ||\n ((type === \"spring\" || isGenerator(type)) && velocity));\n}\n\nexport { canAnimate };\n//# sourceMappingURL=can-animate.mjs.map\n"],"names":["keyframes","name","type","velocity","originKeyframe","targetKeyframe","length","isOriginAnimatable","isAnimatable","isTargetAnimatable","current","i","hasKeyframesChanged","isGenerator","warning"],"mappings":"mPAcM,SACFA,EACAC,EACAC,EACAC,GAOA,MAAMC,EAAiBJ,EAAU,GACjC,GAAuB,OAAnBI,EACA,OAAO,EAQX,GAAa,YAATH,GAA+B,eAATA,EAAuB,OAAO,EAExD,MAAMI,EAAiBL,EAAUA,EAAUM,OAAS,GAC9CC,EAAqBC,EAAAA,aAAaJ,EAAgBH,GAClDQ,EAAqBD,EAAAA,aAAaH,EAAgBJ,GAGxD,OAAKM,GAAuBE,EApChC,SAA6BT,GACzB,MAAMU,EAAUV,EAAU,GAC1B,GAAyB,IAArBA,EAAUM,OAAc,OAAO,EACnC,IAAK,IAAIK,EAAI,EAAGA,EAAIX,EAAUM,OAAQK,IAClC,GAAIX,EAAUW,KAAOD,EAAS,OAAO,CAE7C,CA6CQE,CAAoBZ,KACT,WAATE,GAAqBW,EAAWA,YAACX,KAAUC,GAd7CI,IAAuBE,GACnBK,WACI,EACA,6BAA6Bb,WAAcG,UAAuBC,QAC9DE,EAAqBF,EAAiBD,iCAE1C,yBAGD,EAOf"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../frameloop/frame-data.mjs.js"),a=require("../../frameloop/sync-time.mjs.js");function i(i,e){return{kind:i,animation:e,timestamp:a.time.now(),frameTimestamp:t.frameData.timestamp,frameIsProcessing:t.frameData.isProcessing}}exports.notifyAnimationStart=function(t,a,e){const o=globalThis.__MOTION_INSPECT__;if(o)try{o({...i("animation-start",t),options:e?{...a,...e}:a})}catch{}},exports.notifyLayoutAnimationStart=function(t,a){const e=globalThis.__MOTION_INSPECT__;if(e)try{e({...i("layout-animation-start",t),node:a})}catch{}};
|
|
2
|
+
//# sourceMappingURL=notify-inspector.mjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notify-inspector.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/utils/notify-inspector.mjs"],"sourcesContent":["import { frameData } from '../../frameloop/frame-data.mjs';\nimport { time } from '../../frameloop/sync-time.mjs';\n\nfunction baseRecord(kind, animation) {\n return {\n kind,\n animation,\n timestamp: time.now(),\n frameTimestamp: frameData.timestamp,\n frameIsProcessing: frameData.isProcessing,\n };\n}\n/**\n * Notify an optional inspector without adding a public Motion API.\n *\n * The record is a raw firehose: the live animation handle, the concrete\n * animation's internal options object untouched (timing fields in\n * internal milliseconds, name/keyframes/element/motionValue still\n * attached), a timestamp and the raw frameloop state at notify time.\n * All interpretation belongs to the consumer behind\n * globalThis.__MOTION_INSPECT__.\n */\nfunction notifyAnimationStart(animation, options, transition) {\n const notify = globalThis.__MOTION_INSPECT__;\n if (!notify)\n return;\n try {\n notify({\n ...baseRecord(\"animation-start\", animation),\n options: transition ? { ...options, ...transition } : options,\n });\n }\n catch { }\n}\n/**\n * Layout animations drive a projection node's progress rather than a\n * property, so the record forwards the live node itself: it carries the\n * DOM instance, the layout options (layoutId) and the progress handle.\n * Fired inside the frame.update that starts the animation, so nodes\n * animating in the same layout commit share frameTimestamp.\n */\nfunction notifyLayoutAnimationStart(animation, node) {\n const notify = globalThis.__MOTION_INSPECT__;\n if (!notify)\n return;\n try {\n notify({\n ...baseRecord(\"layout-animation-start\", animation),\n node,\n });\n }\n catch { }\n}\n\nexport { notifyAnimationStart, notifyLayoutAnimationStart };\n//# sourceMappingURL=notify-inspector.mjs.map\n"],"names":["baseRecord","kind","animation","timestamp","time","now","frameTimestamp","frameData","frameIsProcessing","isProcessing","notifyAnimationStart","options","transition","notify","globalThis","__MOTION_INSPECT__","node"],"mappings":"qKA8BA,SAASA,EACLC,EACAC,GAEA,MAAO,CACHD,OACAC,YACAC,UAAWC,EAAIA,KAACC,MAChBC,eAAgBC,EAASA,UAACJ,UAC1BK,kBAAmBD,EAASA,UAACE,aAErC,8BAYgBC,SACZR,EACAS,EACAC,GAEA,MAAMC,EAAUC,WAA6BC,mBAC7C,GAAKF,EAEL,IACIA,EAAO,IACAb,EAAW,kBAAmBE,GACjCS,QAASC,EAAa,IAAKD,KAAYC,GAAeD,GAE9D,CAAE,MAAO,CACb,qCASM,SACFT,EACAc,GAEA,MAAMH,EAAUC,WAA6BC,mBAC7C,GAAKF,EAEL,IACIA,EAAO,IACAb,EAAW,yBAA0BE,GACxCc,QAER,CAAE,MAAO,CACb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-start-time.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/utils/resolve-start-time.mjs"],"sourcesContent":["import { MotionGlobalConfig } from 'motion-utils';\n\n/**\n * If an animation's keyframes resolve, or its first frame renders, more than\n * this long after its start time, it starts from then instead. While we prefer\n * to \"start\" an animation as soon as it's triggered, this avoids a visual jump\n * into it after main thread work.\n *\n * Manual timing steps frames by however long it likes, so never lags.\n */\nconst MAX_START_DELAY = 40;\nconst resolveStartTime = (startTime, now) => now - startTime > MAX_START_DELAY && !MotionGlobalConfig.useManualTiming\n ? now\n : startTime;\n\nexport { resolveStartTime };\n//# sourceMappingURL=resolve-start-time.mjs.map\n"],"names":["resolveStartTime","startTime","now","MotionGlobalConfig","useManualTiming"],"mappings":"uKAYgCA,CAACC,EAAmBC,IAChDA,EAAMD,EAHc,KAGkBE,EAAAA,mBAAmBC,gBACnDF,EACAD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../utils/accelerated-values.mjs.js"),r=require("../utils/is-browser-color.mjs.js"),o=require("../../../../../../motion-utils/dist/es/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../utils/accelerated-values.mjs.js"),r=require("../utils/is-browser-color.mjs.js"),o=require("../../../../../../motion-utils/dist/es/global-config.mjs.js");const t=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),s=()=>!o.MotionGlobalConfig.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,"animate");exports.supportsBrowserAnimation=function(o){const{motionValue:a,name:n,repeatDelay:l,repeatType:i,damping:u,type:c,keyframes:p}=o;if(!n||!e.acceleratedValues.has(n)&&!t.has(n))return!1;const m=a?.owner?.current;if(!(m instanceof HTMLElement||m instanceof SVGElement))return!1;const{onUpdate:d,transformTemplate:f}=a.owner.getProps();return s()&&(e.acceleratedValues.has(n)||t.has(n)&&r.hasBrowserOnlyColors(p))&&("transform"!==n||!f)&&!d&&!l&&"mirror"!==i&&0!==u&&"inertia"!==c},exports.supportsWaapi=s;
|
|
2
2
|
//# sourceMappingURL=waapi.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waapi.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"waapi.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs"],"sourcesContent":["import { MotionGlobalConfig } from 'motion-utils';\nimport { acceleratedValues } from '../utils/accelerated-values.mjs';\nimport { hasBrowserOnlyColors } from '../utils/is-browser-color.mjs';\n\nconst colorProperties = new Set([\n \"color\",\n \"backgroundColor\",\n \"outlineColor\",\n \"fill\",\n \"stroke\",\n \"borderColor\",\n \"borderTopColor\",\n \"borderRightColor\",\n \"borderBottomColor\",\n \"borderLeftColor\",\n]);\n/**\n * WAAPI runs on the browser's clock, so on a manual clock every animation\n * runs in JS where processFrame can drive it. Set the flag before starting\n * animations: running WAAPI animations stay on the browser's clock.\n */\nconst supportsWaapi = () => !MotionGlobalConfig.useManualTiming &&\n Object.hasOwnProperty.call(Element.prototype, \"animate\");\nfunction supportsBrowserAnimation(options) {\n const { motionValue, name, repeatDelay, repeatType, damping, type, keyframes, } = options;\n /**\n * Most values can't be accelerated at all, so check the name before\n * looking at the element or its props.\n */\n if (!name ||\n !(acceleratedValues.has(name) || colorProperties.has(name))) {\n return false;\n }\n const subject = motionValue?.owner?.current;\n /**\n * We use instanceof checks instead of isHTMLElement()/isSVGElement()\n * because we explicitly **don't** want elements in different timing\n * contexts (i.e. popups) to be accelerated, as it's not possible to sync\n * these animations properly with those driven from the main window\n * frameloop.\n */\n if (!(subject instanceof HTMLElement) &&\n !(subject instanceof SVGElement)) {\n return false;\n }\n const { onUpdate, transformTemplate } = motionValue.owner.getProps();\n return (supportsWaapi() &&\n /**\n * Force WAAPI for color properties with browser-only color formats\n * (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse.\n */\n (acceleratedValues.has(name) ||\n (colorProperties.has(name) &&\n hasBrowserOnlyColors(keyframes))) &&\n (name !== \"transform\" || !transformTemplate) &&\n /**\n * If we're outputting values to onUpdate then we can't use WAAPI as there's\n * no way to read the value from WAAPI every frame.\n */\n !onUpdate &&\n !repeatDelay &&\n repeatType !== \"mirror\" &&\n damping !== 0 &&\n type !== \"inertia\");\n}\n\nexport { supportsBrowserAnimation, supportsWaapi };\n//# sourceMappingURL=waapi.mjs.map\n"],"names":["colorProperties","Set","supportsWaapi","MotionGlobalConfig","useManualTiming","Object","hasOwnProperty","call","Element","prototype","options","motionValue","name","repeatDelay","repeatType","damping","type","keyframes","acceleratedValues","has","subject","owner","current","HTMLElement","SVGElement","onUpdate","transformTemplate","getProps","hasBrowserOnlyColors"],"mappings":"+OAQA,MAAMA,EAAkB,IAAIC,IAAI,CAC5B,QACA,kBACA,eACA,OACA,SACA,cACA,iBACA,mBACA,oBACA,oBAQSC,EAAgBA,KACxBC,EAAkBA,mBAACC,iBACpBC,OAAOC,eAAeC,KAAKC,QAAQC,UAAW,4CAE5C,SACFC,GAEA,MAAMC,YACFA,EAAWC,KACXA,EAAIC,YACJA,EAAWC,WACXA,EAAUC,QACVA,EAAOC,KACPA,EAAIC,UACJA,GACAP,EAMJ,IACKE,IACCM,EAAAA,kBAAkBC,IAAIP,KAASZ,EAAgBmB,IAAIP,GAErD,OAAO,EAGX,MAAMQ,EAAUT,GAAaU,OAAOC,QASpC,KACMF,aAAmBG,aACnBH,aAAmBI,YAErB,OAAO,EAGX,MAAMC,SAAEA,EAAQC,kBAAEA,GAAsBf,EAAaU,MAAOM,WAE5D,OACIzB,MAKCgB,EAAAA,kBAAkBC,IAAIP,IAClBZ,EAAgBmB,IAAIP,IACjBgB,EAAoBA,qBAACX,MACnB,cAATL,IAAyBc,KAKzBD,IACAZ,GACc,WAAfC,GACY,IAAZC,GACS,YAATC,CAER"}
|
package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/TransformAnimation.mjs.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../frameloop/frame.mjs.js"),t=require("../../../frameloop/frame-data.mjs.js"),s=require("../../../frameloop/sync-time.mjs.js"),r=require("../../../render/html/utils/build-transform.mjs.js"),i=require("../../../render/utils/keys-transform.mjs.js"),n=require("../../../utils/mix/number.mjs.js"),o=require("../../../value/types/maps/number.mjs.js"),a=require("../../../value/types/utils/get-as-type.mjs.js"),u=require("../../drivers/frame.mjs.js"),c=require("../../generators/keyframes.mjs.js"),l=require("../../keyframes/offsets/default.mjs.js"),m=require("../../JSAnimation.mjs.js"),f=require("../../NativeAnimationExtended.mjs.js"),p=require("../easing/cubic-bezier.mjs.js"),h=require("../easing/supported.mjs.js"),d=require("../supports/waapi.mjs.js"),j=require("../../../utils/supports/linear-easing.mjs.js"),g=require("./groups.mjs.js"),y=require("../../../../../../motion-utils/dist/es/easing/utils/is-bezier-definition.mjs.js"),b=require("../../../../../../motion-utils/dist/es/time-conversion.mjs.js"),A=require("../../../../../../motion-utils/dist/es/clamp.mjs.js"),M=require("../../../../../../motion-utils/dist/es/progress.mjs.js");const v=.001,q=(e,t)=>e-t,T=(e,t,s)=>{const r=[];for(let i=0;i<=s;i++)r.push(n.mixNumber(e,t,i/s));return r},w=e=>e.motionValue.owner,S=e=>g.transformGroups.get(e),k=(e,t)=>e.latestValues?e.latestValues[t]:e.getValue(t)?.get();class D extends m.JSAnimation{constructor(e){const t=w(e).current,{driver:s=u.frameloopDriver}=e;let r;const i=function(e){const t=w(e),{onUpdate:s,transformTemplate:r}=t.getProps();return!(e.isHandoff||s||e.hasOnUpdate||r||"inertia"===e.type||"none"!==(k(t,"transform")||"none")||k(t,"pathRotation")||t.projection?.isProjecting())}(e);e.driver=e=>{const i=s(e);return{js:i,now:i.now,start:(e=!0)=>{const s=S(t);!s||s.isJS?i.start(e):s.schedule(!1,!e)},stop:()=>{i.stop();const e=S(t);e&&!e.isFinishing&&e.release(r)}}},super(e),r=this,this.canAccelerate=i;const{stop:n}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),n()}}get group(){return S(w(this.options).current)}get js(){return this.driver?.js}get name(){return this.options.name}timing(){const{startTime:e,speed:t,totalDuration:s}=this,{delay:r=0,repeatType:i}=this.options;return null!==this.holdTime?[1/0,0]:s===1/0?[e+r/t,this.resolvedDuration*("loop"===i?1:2)/t||1]:[e+(r+s)/t,0]}isAccelerated(){const{group:e,state:t}=this;return e?.tracks.has(this)&&!e.isJS&&this.canAccelerate&&("running"===t||"paused"===t)}liveValue(){return this.isAccelerated()?this.sampleAt(s.time.now()):void 0}tween(){const{keyframes:e,type:t,ease:s,times:r,repeat:i,delay:n=0}=this.options,o=y.isBezierDefinition(s)?p.cubicBezierAsString(s):(e=>/^(linear|ease(In|Out|InOut))$/.test(e))(s)&&h.supportedWaapiEasing[s];if(o&&!i&&!r&&2===e.length&&t===c.keyframes&&null===this.holdTime){const e=this.startTime+n/this.speed;return[e,e+this.resolvedDuration/this.speed,o]}}boundaries(e,t){const{startTime:s,speed:r,resolvedDuration:i,options:n}=this,{delay:o=0,repeat:a=0,repeatDelay:u=0,repeatType:m,times:f,keyframes:p,type:h}=n,d=(h||c.keyframes)===c.keyframes?f||l.defaultOffset(p):[0,1],j=s+o/r,g=[];if(null!==this.holdTime||!(i>0))return g;for(let s=Math.max(0,Math.floor((e-j)*r/i));s<=a;s++){const n=j+s*i/r;if(n>t)break;for(const o of d){const a=n+(s%2&&m&&"loop"!==m?1-o:o)*(i-u)/r;a>e&&a<t&&g.push(a)}}return g}numberAt(e){return parseFloat(this.sampleAt(e,!0))}sync(){const e=s.time.now();this.options.motionValue.setWithVelocity(this.sampleAt(e-f.sampleDelta,!0),this.sampleAt(e,!0),f.sampleDelta)}play(){this.isStopped||((this.group||function(n){const u=n.current,c=new Set,l=new Map;let p={},h=[],d=new Map,j=[],y=!1,b=!1,A=!1,w=!1,D=-1/0;const E=e=>{for(const t of c)if(t.name===e)return!0},J=(e,t)=>{const s={};for(const r of void 0===e?i.transformPropOrder:h){const i=l.get(r),o=void 0===e?k(n,r):i?i.sampleAt(t>e&&!i.timing()[1]?t:e):p[r];void 0!==o&&(s[r]=o)}return s},x=(e,t)=>{let s="";const i=J(e,t);for(const e in i)s+=(r.translateAlias[e]||e)+"("+a.getValueAsType(i[e],o.numberValueTypes[e])+") ";return s||"none"},V=(e=J())=>{u.style.transform=r.buildTransform(e,{})},O=(e=!0)=>{e&&V(),j.forEach(({animation:e})=>e.cancel()),j=[]},P=(e,t,r=1/0)=>{const i={animation:e,offset:t,end:r};e.startTime=s.time.now()+t,r<1/0&&(e.onfinish=()=>{i.isDone=!0,j.some(e=>e.end===1/0)&&(e.cancel(),j=j.filter(e=>e!==i)),R.schedule(!1)}),e.oncancel=()=>j.includes(i)&&R.demote(),j.push(i)},F=(e,t,s)=>{const r=(t,s)=>Math.abs(e(s)-e(t)),i=r(t,s);for(;s-t>.01;){const e=(t+s)/2;r(t,e)>r(e,s)?s=e:t=e}return r(t,s)>i/2?[t,s]:[]},z=(e,t,s,r)=>{const i=Math.min(200,Math.max(2,Math.ceil((s-t)/f.sampleDelta)));if(4*r.length>i)return;const n=T(t,s,i).concat(r).sort(q),o=e=>M.progress(t,s,e);let a,u;for(const t of e){const e=n.map(e=>t.numberAt(e)),[s]=e,r=e.map(e=>e-s),i=r[r.length-1],o=r.some(e=>Math.abs(e)*v>Math.abs(i))?0:i,c=r.map(e=>o?e/o:e);if(o)if(a){if(c.some((e,t)=>!(Math.abs(e-a[t])<=v)))return}else a=c,u=e=>(t.numberAt(e)-s)/o;else if(c.some(e=>!(Math.abs(e)<=v)))return}if(!a||a.every((e,t)=>Math.abs(e-o(n[t]))<=v))return"linear";const c=[],l=(e,t=u(e))=>c.push(m.round(t)+" "+m.round(100*o(e))+"%");return a.forEach((e,t)=>{t&&Math.abs(e-a[t-1])>.2&&F(u,n[t-1],n[t]).forEach(e=>l(e)),l(n[t],e)}),"linear("+c+")"},W=(e,t,s,r)=>{const i=[t],n=(t,s)=>e.every(e=>!(Math.abs(e.numberAt((t+s)/2)-(e.numberAt(t)+e.numberAt(s))/2)>(e.name.startsWith("scale")?.001:.1))),o=(t,s,r)=>{if(s-t<1||n(t,s))i.push(s);else if(r<4)o(t,(t+s)/2,r+1),o((t+s)/2,s,r+1);else{for(const r of e)i.push(...F(e=>r.numberAt(e),t,s));i.push(s)}},a=T(t,s,Math.ceil((s-t)/100));for(const e of r)a.push(e,Math.min(e+.01,s));let u=t;for(const e of a.sort(q))e>u&&o(u,e,0),u=e;return i.sort(q)},G=e=>{let t;for(const s of e){const e=s.tween();if(!e||t?.some((t,s)=>s<2?Math.abs(e[s]-t)>1:e[s]!==t))return;t=e}return t},B=(e,t,s,r={fill:"both"},i,n)=>{const o=e.flatMap(e=>e.boundaries(t,s)),a=n||z(e,t,s,o),c=a?[t,s]:W(e,t,s,o),l=c.map(e=>x(e,i));let m={transform:l};return a||(m.offset=c.map(e=>M.progress(t,s,e))),l.every(e=>e===l[0])&&(V(J(t,i)),m=null),u.animate(m,{...r,duration:s-t,easing:a||"linear"})},H=e=>{let t=e,s=0,r=0;const o=[],a=[],m=new Set;l.clear(),d=new Map;for(const i of c){l.set(i.name,i);const[n,u]=i.timing(),c=n===1/0;if(d.set(i,[i.at(e),i.speed,c]),c)i.sync();else{if(i.speed<0)return;if(u){if(s){const e=(n-r)/u;if(Math.abs(u-s)>1||Math.abs(e-Math.round(e))*s>1)return}else s=u,r=n;a.push(i)}else m.add(n);o.push(i),t=Math.max(t,n)}}p={},h=i.transformPropOrder.filter(e=>{if(l.has(e))return!0;const t=p[e]=k(n,e);return void 0!==t&&parseFloat(t)!==(e.startsWith("scale")?1:0)}),O(!1);const f=!s&&G(o);try{if(f&&f[1]>e){const[t,s,r]=f;P(B(o,t,s,void 0,void 0,r),t-e,s-t)}else t>e&&(P(B(o,e,t),0,t-e),m.forEach(s=>s<t-1&&P(u.animate(null,{duration:s-e}),0,s-e)));if(s){const i=r+Math.floor((t-r)/s)*s;P(B(a,i,i+s,{iterations:1/0,iterationStart:(t-i)/s,fill:"forwards"},t),t-e)}}catch{return}return j.length||O(),!0},I=e=>{let t,s=0;for(const r of c){const i=d.get(r);if(!i)return!1;const[n,o,a]=i,u=r.at(e),c=r.timing()[0]===1/0;if(a){if(c&&u===n)continue;return!1}const l=(u-n)/o,m=c?0:r.speed/o;if(void 0===t)t=l,s=m;else if(Math.abs(l-t)>1||m!==s)return!1}if(void 0===t)return!0;if(!j.length)return!1;for(const{offset:e,end:s,isDone:r}of j){const i=t-e;if(s<1/0&&(r?i<s-1:i<0||i>=s))return!1}for(const{animation:r,offset:i,isDone:n}of j){if(n)continue;const o=t-i;s?(r.playbackRate=s,r.startTime=e-o/s):(r.pause(),r.currentTime=o)}return!0},L=()=>!c.size&&(A=!0,S(u)===R&&g.transformGroups.delete(u),R.isJS||O(),!0),N=()=>{const e=s.time.now();if(R.isJS||(R.isFinishing=!0,c.forEach(t=>{const[s,r]=t.timing();"running"===t.state&&t.speed>0&&!r&&s<=e+1&&(t.complete(),p[t.name]=k(n,t.name),d.has(t)||(y=!0))}),R.isFinishing=!1),b=!1,A)return;if(c.forEach(({state:e},t)=>{"idle"!==e&&"finished"!==e||c.delete(t)}),L())return;for(const e of c)if(!e.canAccelerate)return R.demote(!0);R.isJS&&(R.isJS=!1,y=!0,c.forEach(e=>e.js?.stop()));const t=y,r=w;if(y=w=!1,t||!I(e)){if(r){if(e-D<100)return R.demote();D=e}if(!H(e))return R.demote()}},R={tracks:c,isJS:!1,isFinishing:!1,schedule(s,r){A||(y||(y=s),w||(w=!!r),b||(b=!0,t.frameData.isProcessing?e.frame.render(N,!1,!0):queueMicrotask(N)))},release(e){const{state:t}=e;"idle"!==t&&"finished"!==t||c.delete(e),L()||R.schedule(!0)},check(){if(!R.isJS)for(const e in p)if(k(n,e)!==p[e]&&!E(e))return R.schedule(!0,!0)},demote(e){R.isJS||A||(c.forEach(t=>{t.isAccelerated()&&t.sync(),e||(t.canAccelerate=!1)}),R.isJS=!0,d=new Map,O(),c.forEach(e=>"running"===e.state&&e.js?.start()))}};return g.transformGroups.set(u,R),R}(w(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&(this.sync(),this.group.schedule(!1))}complete(){super.complete();const{group:e}=this;e&&!e.isJS&&this.canAccelerate&&this.tick(s.time.now())}get time(){return this.isAccelerated()?b.millisecondsToSeconds(A.clamp(0,this.totalDuration,this.at(s.time.now())-(this.options.delay||0))):super.time}set time(e){super.time=e,this.isAccelerated()&&this.sync()}attachTimeline(e){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(e)}}exports.TransformAnimation=D,exports.canGroupTransform=({name:e,motionValue:t})=>e&&i.transformPropOrder.includes(e)&&t?.owner?.current instanceof HTMLElement&&d.supportsWaapi()&&j.supportsLinearEasing();
|
|
2
|
+
//# sourceMappingURL=TransformAnimation.mjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransformAnimation.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/waapi/transforms/TransformAnimation.mjs"],"sourcesContent":["import { isBezierDefinition, millisecondsToSeconds, clamp, progress } from 'motion-utils';\nimport { frame } from '../../../frameloop/frame.mjs';\nimport { frameData } from '../../../frameloop/frame-data.mjs';\nimport { time } from '../../../frameloop/sync-time.mjs';\nimport { buildTransform, translateAlias } from '../../../render/html/utils/build-transform.mjs';\nimport { transformPropOrder } from '../../../render/utils/keys-transform.mjs';\nimport { mixNumber } from '../../../utils/mix/number.mjs';\nimport { numberValueTypes } from '../../../value/types/maps/number.mjs';\nimport { getValueAsType } from '../../../value/types/utils/get-as-type.mjs';\nimport { frameloopDriver } from '../../drivers/frame.mjs';\nimport { keyframes } from '../../generators/keyframes.mjs';\nimport { defaultOffset } from '../../keyframes/offsets/default.mjs';\nimport { JSAnimation, round } from '../../JSAnimation.mjs';\nimport { sampleDelta } from '../../NativeAnimationExtended.mjs';\nimport { cubicBezierAsString } from '../easing/cubic-bezier.mjs';\nimport { supportedWaapiEasing } from '../easing/supported.mjs';\nimport { supportsWaapi } from '../supports/waapi.mjs';\nimport { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { transformGroups } from './groups.mjs';\n\n/**\n * Sample at the interruption sampling rate, up to a cap for long\n * animations.\n */\nconst maxSamples = 200;\n/**\n * How far values may stray from the WAAPI animation: as a fraction of\n * each value's change when they share an easing, otherwise in px or deg,\n * or for scale.\n */\nconst easingTolerance = 0.001;\nconst sampleTolerance = 0.1;\nconst scaleTolerance = 0.001;\n/**\n * If an outside write, or a seek the WAAPI animation can't follow,\n * happens again within this window, the group is being driven every\n * frame (scrubbing, drag), which is cheaper on the main thread than\n * rebuilding the WAAPI animation every frame.\n */\nconst churnWindow = 100;\n/**\n * Named easings that are the same cubic-bezier in JS and CSS.\n */\nconst isNativeEasing = (ease) => /^(linear|ease(In|Out|InOut))$/.test(ease);\nconst byTime = (a, b) => a - b;\n/**\n * n + 1 evenly spaced timestamps, from one timestamp to another.\n */\nconst spread = (from, to, n) => {\n const result = [];\n for (let i = 0; i <= n; i++)\n result.push(mixNumber(from, to, i / n));\n return result;\n};\nconst getOwner = (options) => options.motionValue.owner;\nconst getGroup = (element) => transformGroups.get(element);\nconst read = (owner, key) => owner.latestValues ? owner.latestValues[key] : owner.getValue(key)?.get();\n/**\n * Whether this animation should join its element's transform group.\n * Animations that can't be accelerated still join, so the group knows\n * to stay on the main thread while they run. Browsers without linear()\n * easing stay on the main thread.\n */\nconst canGroupTransform = ({ name, motionValue, }) => name &&\n transformPropOrder.includes(name) &&\n motionValue?.owner?.current instanceof HTMLElement &&\n supportsWaapi() &&\n supportsLinearEasing();\nfunction canAccelerateTransform(options) {\n const owner = getOwner(options);\n const { onUpdate, transformTemplate } = owner.getProps();\n return (\n /**\n * A handoff from an optimised appear animation is already running\n * on its own WAAPI animation. onUpdate needs every value, every\n * frame.\n */\n !options.isHandoff &&\n !onUpdate &&\n !options.hasOnUpdate &&\n /**\n * transformTemplate could output anything.\n */\n !transformTemplate &&\n options.type !== \"inertia\" &&\n /**\n * A literal transform, or pathRotation, replaces or adds to the\n * transform we'd build. styleEffect builds its own as \"none\".\n */\n (read(owner, \"transform\") || \"none\") === \"none\" &&\n !read(owner, \"pathRotation\") &&\n /**\n * Layout animations write transform every frame.\n */\n !owner.projection?.isProjecting());\n}\nclass TransformAnimation extends JSAnimation {\n constructor(options) {\n const element = getOwner(options).current;\n const { driver = frameloopDriver } = options;\n let animation;\n /**\n * Before JSAnimation replaces the type with its generator.\n */\n const canAccelerate = canAccelerateTransform(options);\n /**\n * The driver ticks on the main thread only once the group has\n * moved there. Until then, starting or stopping tells the group to\n * update its WAAPI animation.\n */\n options.driver = (update) => {\n const js = driver(update);\n return {\n js,\n now: js.now,\n start: (keepAlive = true) => {\n const group = getGroup(element);\n const isJS = !group || group.isJS;\n /**\n * keepAlive is false when seeking. Seeking the WAAPI\n * animation is free, but if a seek needs a rebuild and\n * keeps happening, the group moves to the main thread.\n */\n isJS\n ? js.start(keepAlive)\n : group.schedule(false, !keepAlive);\n },\n stop: () => {\n js.stop();\n const group = getGroup(element);\n group && !group.isFinishing && group.release(animation);\n },\n };\n };\n super(options);\n animation = this;\n this.canAccelerate = canAccelerate;\n /**\n * stop is bound in JSAnimation, so wrap it rather than override.\n * Before stopping, set the motion value to where the WAAPI\n * animation is now, with velocity, for the next animation to\n * start from.\n */\n const { stop } = this;\n this.stop = () => {\n this.isAccelerated() && this.sync();\n stop();\n };\n }\n get group() {\n return getGroup(getOwner(this.options).current);\n }\n get js() {\n return this.driver?.js;\n }\n get name() {\n return this.options.name;\n }\n /**\n * When this stops moving, or, if it repeats forever, when it starts\n * repeating, and how long each repeat takes. Held (paused, or at\n * speed 0) animations never stop moving.\n */\n timing() {\n const { startTime, speed, totalDuration } = this;\n const { delay = 0, repeatType } = this.options;\n return this.holdTime !== null\n ? [Infinity, 0]\n : totalDuration === Infinity\n ? [\n startTime + delay / speed,\n (this.resolvedDuration * (repeatType === \"loop\" ? 1 : 2)) /\n speed || 1,\n ]\n : [startTime + (delay + totalDuration) / speed, 0];\n }\n /**\n * Whether this is running, or paused, on the compositor.\n */\n isAccelerated() {\n const { group, state } = this;\n return (group?.tracks.has(this) &&\n !group.isJS &&\n this.canAccelerate &&\n (state === \"running\" || state === \"paused\"));\n }\n /**\n * The value now, while this runs on the compositor and so doesn't\n * set its motion value every frame.\n */\n liveValue() {\n return this.isAccelerated() ? this.sampleAt(time.now()) : undefined;\n }\n /**\n * If this is a two-keyframe tween whose easing WAAPI runs exactly,\n * when it starts and stops moving, and that easing.\n */\n tween() {\n const { keyframes: keyframes$1, type, ease, times, repeat, delay = 0 } = this.options;\n const easing = isBezierDefinition(ease)\n ? cubicBezierAsString(ease)\n : isNativeEasing(ease) && supportedWaapiEasing[ease];\n if (easing &&\n !repeat &&\n !times &&\n keyframes$1.length === 2 &&\n type === keyframes &&\n this.holdTime === null) {\n const start = this.startTime + delay / this.speed;\n return [start, start + this.resolvedDuration / this.speed, easing];\n }\n }\n /**\n * The timestamps between two timestamps where this reaches a\n * keyframe or starts a repeat, where it can turn or jump.\n */\n boundaries(from, to) {\n const { startTime, speed, resolvedDuration, options } = this;\n const { delay = 0, repeat = 0, repeatDelay = 0, repeatType, times, keyframes: keyframes$1, type, } = options;\n const offsets = (type || keyframes) === keyframes\n ? times || defaultOffset(keyframes$1)\n : [0, 1];\n const start = startTime + delay / speed;\n const result = [];\n if (this.holdTime !== null || !(resolvedDuration > 0))\n return result;\n for (let i = Math.max(0, Math.floor(((from - start) * speed) / resolvedDuration)); i <= repeat; i++) {\n const iterationStart = start + (i * resolvedDuration) / speed;\n if (iterationStart > to)\n break;\n for (const offset of offsets) {\n const t = iterationStart +\n ((i % 2 && repeatType && repeatType !== \"loop\"\n ? 1 - offset\n : offset) *\n (resolvedDuration - repeatDelay)) /\n speed;\n t > from && t < to && result.push(t);\n }\n }\n return result;\n }\n /**\n * The value at a timestamp, as a number.\n */\n numberAt(timestamp) {\n return parseFloat(this.sampleAt(timestamp, true));\n }\n /**\n * Write the current value, and velocity, to the motion value.\n */\n sync() {\n const now = time.now();\n this.options.motionValue.setWithVelocity(this.sampleAt(now - sampleDelta, true), this.sampleAt(now, true), sampleDelta);\n }\n play() {\n /**\n * A stopped animation (one that was interrupted) can't play again,\n * so it mustn't join the group.\n */\n if (this.isStopped)\n return;\n (this.group || createGroup(getOwner(this.options))).tracks.add(this);\n super.play();\n }\n pause() {\n super.pause();\n if (this.isAccelerated()) {\n this.sync();\n this.group.schedule(false);\n }\n }\n /**\n * JSAnimation finishes on its next tick, which only happens on the\n * main thread, so finish now.\n */\n complete() {\n super.complete();\n const { group } = this;\n group && !group.isJS && this.canAccelerate && this.tick(time.now());\n }\n /**\n * Without a tick to rebase it, a held time still includes the delay,\n * so take it off here, as a JS animation does on its next tick.\n */\n get time() {\n if (this.isAccelerated()) {\n return millisecondsToSeconds(clamp(0, this.totalDuration, this.at(time.now()) - (this.options.delay || 0)));\n }\n return super.time;\n }\n /**\n * A JS animation sets its motion value from a seek on its next tick.\n * This doesn't tick, so set it now, rather than leave it to be set\n * when this next stops.\n */\n set time(newTime) {\n super.time = newTime;\n this.isAccelerated() && this.sync();\n }\n /**\n * Scroll timelines set time every frame, so run these on the main\n * thread.\n */\n attachTimeline(timeline) {\n this.canAccelerate = false;\n this.group?.demote(true);\n return super.attachTimeline(timeline);\n }\n}\nfunction createGroup(owner) {\n const element = owner.current;\n const tracks = new Set();\n const byKey = new Map();\n /**\n * Transforms that aren't animating, as built into the WAAPI animation.\n */\n let statics = {};\n /**\n * The transforms in the WAAPI animation, in order.\n */\n let keys = [];\n let built = new Map();\n let segments = [];\n let needsBuild = false;\n let isScheduled = false;\n let isEnded = false;\n let hasChurned = false;\n let lastChurn = -Infinity;\n const has = (key) => {\n for (const track of tracks)\n if (track.name === key)\n return true;\n };\n /**\n * The transform values at a timestamp or, without one, from the\n * motion values. Animations that don't repeat forever are sampled no\n * earlier than settled, so a loop that starts from an earlier cycle\n * boundary holds them at their end.\n */\n const valuesAt = (timestamp, settled) => {\n const values = {};\n for (const key of timestamp === undefined ? transformPropOrder : keys) {\n const track = byKey.get(key);\n const value = timestamp === undefined\n ? read(owner, key)\n : track\n ? track.sampleAt(settled > timestamp && !track.timing()[1]\n ? settled\n : timestamp)\n : statics[key];\n if (value !== undefined)\n values[key] = value;\n }\n return values;\n };\n /**\n * Build the transform at a timestamp. Unlike buildTransform, every key\n * is written, even at its default, so each keyframe has the same list\n * of functions and the browser interpolates them one by one.\n */\n const compose = (timestamp, settled) => {\n let transform = \"\";\n const values = valuesAt(timestamp, settled);\n for (const key in values) {\n transform +=\n (translateAlias[key] || key) +\n \"(\" +\n getValueAsType(values[key], numberValueTypes[key]) +\n \") \";\n }\n return transform || \"none\";\n };\n /**\n * Write the transform as an inline style, as the renderer would.\n */\n const commit = (values = valuesAt()) => {\n element.style.transform = buildTransform(values, {});\n };\n /**\n * Cancel the WAAPI animations, by default first committing the\n * transform. The renderer writes its own version on its next render.\n */\n const stop = (shouldCommit = true) => {\n shouldCommit && commit();\n segments.forEach(({ animation }) => animation.cancel());\n segments = [];\n };\n const add = (animation, offset, end = Infinity) => {\n const segment = { animation, offset, end };\n animation.startTime = time.now() + offset;\n /**\n * Animations finish when the WAAPI animation reaches their end.\n * Once a loop has taken over, the finished animation isn't needed.\n */\n if (end < Infinity) {\n animation.onfinish = () => {\n segment.isDone = true;\n if (segments.some((s) => s.end === Infinity)) {\n animation.cancel();\n segments = segments.filter((s) => s !== segment);\n }\n group.schedule(false);\n };\n }\n /**\n * Something else cancelled it, so carry on on the main thread.\n */\n animation.oncancel = () => segments.includes(segment) && group.demote();\n segments.push(segment);\n };\n /**\n * Where a value jumps between two timestamps, as when a repeat starts\n * again: the timestamps either side of the jump, or none if it moves\n * there continuously.\n */\n const jumpAt = (value, a, b) => {\n const change = (x, y) => Math.abs(value(y) - value(x));\n const size = change(a, b);\n while (b - a > 0.01) {\n const mid = (a + b) / 2;\n change(a, mid) > change(mid, b) ? (b = mid) : (a = mid);\n }\n return change(a, b) > size / 2 ? [a, b] : [];\n };\n /**\n * If every moving animation follows the same eased progress between\n * two timestamps, the easing that describes it.\n */\n const getEasing = (moving, from, to, bounds) => {\n const samples = Math.min(maxSamples, Math.max(2, Math.ceil((to - from) / sampleDelta)));\n /**\n * Too many keyframes or repeats to follow with this many samples.\n */\n if (bounds.length * 4 > samples)\n return;\n const at = spread(from, to, samples).concat(bounds).sort(byTime);\n const position = (t) => progress(from, to, t);\n let shared;\n let progressAt;\n for (const track of moving) {\n const values = at.map((t) => track.numberAt(t));\n const [first] = values;\n const changes = values.map((value) => value - first);\n const end = changes[changes.length - 1];\n /**\n * A value that ends only a tiny way from where it started, as\n * a round trip does if it's built just after it starts, or\n * from a float residue, ends where it started. Dividing by\n * that tiny range would stretch the easing to values the\n * compositor can't render.\n */\n const range = changes.some((change) => Math.abs(change) * easingTolerance > Math.abs(end))\n ? 0\n : end;\n const progress = changes.map((change) => range ? change / range : change);\n /**\n * A value that doesn't change, like one still in its delay,\n * fits any easing. One that changes but ends where it started\n * fits none.\n */\n if (!range) {\n if (progress.some((p) => !(Math.abs(p) <= easingTolerance))) {\n return;\n }\n }\n else if (!shared) {\n shared = progress;\n progressAt = (t) => (track.numberAt(t) - first) / range;\n }\n else if (progress.some((p, i) => !(Math.abs(p - shared[i]) <= easingTolerance))) {\n return;\n }\n }\n if (!shared ||\n shared.every((p, i) => Math.abs(p - position(at[i])) <= easingTolerance)) {\n return \"linear\";\n }\n /**\n * A repeat that starts again jumps back, which takes two points at\n * the same position.\n */\n const points = [];\n const point = (t, p = progressAt(t)) => points.push(round(p) + \" \" + round(position(t) * 100) + \"%\");\n shared.forEach((p, i) => {\n i &&\n Math.abs(p - shared[i - 1]) > 0.2 &&\n jumpAt(progressAt, at[i - 1], at[i]).forEach((t) => point(t));\n point(at[i], p);\n });\n return \"linear(\" + points + \")\";\n };\n /**\n * Sample timestamps between two timestamps, closer together where the\n * moving animations curve.\n */\n const sample = (moving, from, to, bounds) => {\n const times = [from];\n /**\n * Values that aren't numbers, like calc(), are left to the\n * browser to interpolate.\n */\n const isStraight = (a, b) => moving.every((track) => !(Math.abs(track.numberAt((a + b) / 2) -\n (track.numberAt(a) + track.numberAt(b)) / 2) >\n (track.name.startsWith(\"scale\")\n ? scaleTolerance\n : sampleTolerance)));\n const split = (a, b, depth) => {\n if (b - a < 1 || isStraight(a, b)) {\n times.push(b);\n }\n else if (depth < 4) {\n split(a, (a + b) / 2, depth + 1);\n split((a + b) / 2, b, depth + 1);\n }\n else {\n /**\n * Keyframes either side of a jump, like a repeat starting\n * again, so it doesn't play as a quick sweep.\n */\n for (const track of moving) {\n times.push(...jumpAt((t) => track.numberAt(t), a, b));\n }\n times.push(b);\n }\n };\n /**\n * Split at least every 100ms, and at every keyframe and repeat,\n * either side of where a value can jump.\n */\n const ends = spread(from, to, Math.ceil((to - from) / 100));\n for (const t of bounds)\n ends.push(t, Math.min(t + 0.01, to));\n let start = from;\n for (const end of ends.sort(byTime)) {\n end > start && split(start, end, 0);\n start = end;\n }\n return times.sort(byTime);\n };\n /**\n * If every moving animation is the same tween, started together, as\n * happens for the values of one animate() call or transition, when\n * they move and their native easing.\n */\n const getTween = (moving) => {\n let shared;\n for (const track of moving) {\n const tween = track.tween();\n if (!tween ||\n shared?.some((v, i) => i < 2\n ? Math.abs(tween[i] - v) > 1\n : tween[i] !== v)) {\n return;\n }\n shared = tween;\n }\n return shared;\n };\n /**\n * A WAAPI animation of the composed transform between two timestamps.\n */\n const run = (moving, from, to, options = { fill: \"both\" }, settled, nativeEasing) => {\n const bounds = moving.flatMap((track) => track.boundaries(from, to));\n const easing = nativeEasing || getEasing(moving, from, to, bounds);\n const times = easing ? [from, to] : sample(moving, from, to, bounds);\n const transform = times.map((t) => compose(t, settled));\n let keyframes = { transform };\n if (!easing) {\n keyframes.offset = times.map((t) => progress(from, to, t));\n }\n /**\n * If nothing moves, don't hold a transform, which, even at its\n * default, would make the element a containing block. The empty\n * animation still finishes the animations.\n */\n if (transform.every((t) => t === transform[0])) {\n commit(valuesAt(from, settled));\n keyframes = null;\n }\n return element.animate(keyframes, {\n ...options,\n duration: to - from,\n easing: easing || \"linear\",\n });\n };\n /**\n * Replace the WAAPI animations with ones built from now. Returns\n * undefined if the animations can't be composed.\n */\n const animate = (now) => {\n /**\n * The finite part runs until the last finite animation (or the\n * last delay) ends. Infinitely repeating animations then continue\n * as one looping WAAPI animation, which needs them to share a\n * cycle.\n */\n let end = now;\n let cycle = 0;\n let cycleStart = 0;\n const moving = [];\n const looping = [];\n const ends = new Set();\n byKey.clear();\n built = new Map();\n for (const track of tracks) {\n byKey.set(track.name, track);\n const [trackEnd, trackCycle] = track.timing();\n const isHeld = trackEnd === Infinity;\n built.set(track, [track.at(now), track.speed, isHeld]);\n /**\n * Held animations don't move, so keep their motion values up\n * to date, as a JSAnimation would on a seek.\n */\n if (isHeld) {\n track.sync();\n continue;\n }\n if (track.speed < 0)\n return;\n if (trackCycle) {\n if (cycle) {\n const phase = (trackEnd - cycleStart) / trackCycle;\n if (Math.abs(trackCycle - cycle) > 1 ||\n Math.abs(phase - Math.round(phase)) * cycle > 1) {\n return;\n }\n }\n else {\n cycle = trackCycle;\n cycleStart = trackEnd;\n }\n looping.push(track);\n }\n else {\n ends.add(trackEnd);\n }\n moving.push(track);\n end = Math.max(end, trackEnd);\n }\n statics = {};\n /**\n * Transforms that aren't animating are left out at their default.\n */\n keys = transformPropOrder.filter((key) => {\n if (byKey.has(key))\n return true;\n const value = (statics[key] = read(owner, key));\n return (value !== undefined &&\n parseFloat(value) !==\n (key.startsWith(\"scale\") ? 1 : 0));\n });\n stop(false);\n /**\n * Values that share one tween are one WAAPI animation of it, with\n * two keyframes and its own easing, from when they started.\n */\n const tween = !cycle && getTween(moving);\n try {\n if (tween && tween[1] > now) {\n const [from, to, easing] = tween;\n add(run(moving, from, to, undefined, undefined, easing), from - now, to - from);\n }\n else if (end > now) {\n add(run(moving, now, end), 0, end - now);\n /**\n * Animations that end sooner finish on the events of\n * empty animations that end with them.\n */\n ends.forEach((trackEnd) => trackEnd < end - 1 &&\n add(element.animate(null, {\n duration: trackEnd - now,\n }), 0, trackEnd - now));\n }\n if (cycle) {\n /**\n * Build one cycle from a cycle boundary, so it repeats\n * seamlessly, and start it part way through.\n */\n const from = cycleStart + Math.floor((end - cycleStart) / cycle) * cycle;\n add(run(looping, from, from + cycle, {\n iterations: Infinity,\n iterationStart: (end - from) / cycle,\n /**\n * It must not fill backwards over the finite part\n * that runs before it.\n */\n fill: \"forwards\",\n }, end), end - now);\n }\n }\n catch {\n return;\n }\n /**\n * Everything is held, so hold it with an inline style instead.\n */\n segments.length || stop();\n return true;\n };\n /**\n * If every animation has been paused, played, seeked or sped up\n * together since the WAAPI animation was built, do the same to it.\n * Returns false if it needs rebuilding instead.\n */\n const retime = (now) => {\n let elapsed;\n let rate = 0;\n for (const track of tracks) {\n const state = built.get(track);\n if (!state)\n return false;\n const [builtTime, builtSpeed, wasHeld] = state;\n const trackTime = track.at(now);\n const isHeld = track.timing()[0] === Infinity;\n if (wasHeld) {\n if (isHeld && trackTime === builtTime)\n continue;\n return false;\n }\n const trackElapsed = (trackTime - builtTime) / builtSpeed;\n const trackRate = isHeld ? 0 : track.speed / builtSpeed;\n if (elapsed === undefined) {\n elapsed = trackElapsed;\n rate = trackRate;\n }\n else if (Math.abs(trackElapsed - elapsed) > 1 ||\n trackRate !== rate) {\n return false;\n }\n }\n if (elapsed === undefined)\n return true;\n if (!segments.length)\n return false;\n for (const { offset, end, isDone } of segments) {\n const local = elapsed - offset;\n if (end < Infinity &&\n (isDone ? local < end - 1 : local < 0 || local >= end)) {\n return false;\n }\n }\n for (const { animation, offset, isDone } of segments) {\n if (isDone)\n continue;\n const local = elapsed - offset;\n if (rate) {\n animation.playbackRate = rate;\n animation.startTime = now - local / rate;\n }\n else {\n animation.pause();\n animation.currentTime = local;\n }\n }\n return true;\n };\n /**\n * If no animations are left, write where they got to and cancel the\n * WAAPI animations. Returns whether the group ended.\n */\n const end = () => {\n if (tracks.size)\n return false;\n isEnded = true;\n /**\n * The element may have a newer group if this one was detached\n * (see handOffElementState).\n */\n getGroup(element) === group && transformGroups.delete(element);\n group.isJS || stop();\n return true;\n };\n const build = () => {\n const now = time.now();\n /**\n * Finish the animations that have reached their end, which the\n * WAAPI animation has already rendered.\n */\n if (!group.isJS) {\n group.isFinishing = true;\n tracks.forEach((track) => {\n const [trackEnd, trackCycle] = track.timing();\n if (track.state === \"running\" &&\n track.speed > 0 &&\n !trackCycle &&\n trackEnd <= now + 1) {\n track.complete();\n /**\n * From now it's checked for outside writes like any\n * other static transform. If the WAAPI animation never\n * rendered it (it was instant), rebuild with its value.\n */\n statics[track.name] = read(owner, track.name);\n built.has(track) || (needsBuild = true);\n }\n });\n group.isFinishing = false;\n }\n isScheduled = false;\n if (isEnded)\n return;\n tracks.forEach(({ state }, track) => {\n if (state === \"idle\" || state === \"finished\")\n tracks.delete(track);\n });\n if (end())\n return;\n for (const track of tracks) {\n if (!track.canAccelerate)\n return group.demote(true);\n }\n /**\n * Everything that kept the group on the main thread has finished,\n * so move the remaining animations back to the compositor.\n */\n if (group.isJS) {\n group.isJS = false;\n needsBuild = true;\n tracks.forEach((track) => track.js?.stop());\n }\n const shouldBuild = needsBuild;\n const churned = hasChurned;\n needsBuild = hasChurned = false;\n if (shouldBuild || !retime(now)) {\n if (churned) {\n if (now - lastChurn < churnWindow)\n return group.demote();\n lastChurn = now;\n }\n if (!animate(now))\n return group.demote();\n }\n };\n const group = {\n tracks,\n isJS: false,\n isFinishing: false,\n schedule(build_, isChurn) {\n if (isEnded)\n return;\n needsBuild || (needsBuild = build_);\n hasChurned || (hasChurned = !!isChurn);\n /**\n * Build in this frame's render step, so it's in place before\n * anything reads the DOM in postRender, or straight after the\n * current task outside of a frame.\n */\n if (!isScheduled) {\n isScheduled = true;\n frameData.isProcessing\n ? frame.render(build, false, true)\n : queueMicrotask(build);\n }\n },\n /**\n * End the group now, rather than when it next builds, so the\n * element's transform is the caller's again as soon as its last\n * animation is stopped.\n */\n release(track) {\n /**\n * Only drop the stopped animation. Others can be idle because\n * they're part way through play(), and are about to run.\n */\n const { state } = track;\n if (state === \"idle\" || state === \"finished\")\n tracks.delete(track);\n end() || group.schedule(true);\n },\n /**\n * An outside write. Rebuild once, but if it keeps happening, move\n * to the main thread.\n */\n check() {\n if (group.isJS)\n return;\n for (const key in statics) {\n if (read(owner, key) !== statics[key] && !has(key)) {\n return group.schedule(true, true);\n }\n }\n },\n demote(canReturn) {\n if (group.isJS || isEnded)\n return;\n /**\n * Unless only another animation is holding the group on the\n * main thread, these animations stay there until they end.\n */\n tracks.forEach((track) => {\n track.isAccelerated() && track.sync();\n canReturn || (track.canAccelerate = false);\n });\n group.isJS = true;\n built = new Map();\n stop();\n tracks.forEach((track) => track.state === \"running\" && track.js?.start());\n },\n };\n transformGroups.set(element, group);\n return group;\n}\n\nexport { TransformAnimation, canGroupTransform };\n//# sourceMappingURL=TransformAnimation.mjs.map\n"],"names":["easingTolerance","byTime","a","b","spread","from","to","n","result","i","push","mixNumber","getOwner","options","motionValue","owner","getGroup","element","transformGroups","get","read","key","latestValues","getValue","TransformAnimation","JSAnimation","constructor","current","driver","frameloopDriver","animation","canAccelerate","onUpdate","transformTemplate","getProps","isHandoff","hasOnUpdate","type","projection","isProjecting","canAccelerateTransform","update","js","now","start","keepAlive","group","isJS","schedule","stop","isFinishing","release","super","this","isAccelerated","sync","name","timing","startTime","speed","totalDuration","delay","repeatType","holdTime","Infinity","resolvedDuration","state","tracks","has","liveValue","sampleAt","time","undefined","tween","keyframes","keyframes$1","ease","times","repeat","easing","isBezierDefinition","cubicBezierAsString","test","isNativeEasing","supportedWaapiEasing","length","keyframesGenerator","boundaries","repeatDelay","offsets","defaultOffset","Math","max","floor","iterationStart","offset","t","numberAt","timestamp","parseFloat","setWithVelocity","sampleDelta","play","isStopped","Set","byKey","Map","statics","keys","built","segments","needsBuild","isScheduled","isEnded","hasChurned","lastChurn","track","valuesAt","settled","values","transformPropOrder","value","compose","transform","translateAlias","getValueAsType","numberValueTypes","commit","style","buildTransform","shouldCommit","forEach","cancel","add","end","segment","onfinish","isDone","some","s","filter","oncancel","includes","demote","jumpAt","change","x","y","abs","size","mid","getEasing","moving","bounds","samples","min","ceil","at","concat","sort","position","progress","shared","progressAt","map","first","changes","range","p","every","points","point","round","sample","isStraight","startsWith","split","depth","ends","getTween","v","run","fill","nativeEasing","flatMap","animate","duration","cycle","cycleStart","looping","clear","set","trackEnd","trackCycle","isHeld","phase","iterations","retime","elapsed","rate","builtTime","builtSpeed","wasHeld","trackTime","trackElapsed","trackRate","local","playbackRate","pause","currentTime","delete","build","complete","shouldBuild","churned","build_","isChurn","frameData","isProcessing","frame","render","queueMicrotask","check","canReturn","createGroup","tick","millisecondsToSeconds","clamp","newTime","attachTimeline","timeline","canGroupTransform","HTMLElement","supportsWaapi","supportsLinearEasing"],"mappings":"8sCAqHA,MAOMA,EAAkB,KAkBlBC,EAASA,CAACC,EAAWC,IAAcD,EAAIC,EAKvCC,EAASA,CAACC,EAAcC,EAAYC,KACtC,MAAMC,EAAmB,GACzB,IAAK,IAAIC,EAAI,EAAGA,GAAKF,EAAGE,IAAKD,EAAOE,KAAKC,EAAAA,UAAUN,EAAMC,EAAIG,EAAIF,IACjE,OAAOC,GAGLI,EAAYC,GACdA,EAAQC,YAAaC,MAE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AAWsD,OAAOkE,IAAIhF,MAEhED,MAAMkD,OACV,CAEA0G,KAAAA,GACI5J,MAAM4J,QAEF3J,KAAKC,kBACLD,KAAKE,OACLF,KAAKP,MAAOE,UAAS,GAE7B,CAMAoK,QAAAA,GACIhK,MAAMgK,WACN,MAAMtK,MAAEA,GAAUO,KAClBP,IAAUA,EAAMC,MAAQM,KAAKtB,eAAiBsB,KAAK4K,KAAK1J,EAAAA,KAAK5B,MACjE,CAMA,QAAI4B,GACA,OAAIlB,KAAKC,gBACE4K,EAAAA,sBACHC,EAAAA,MACI,EACA9K,KAAKO,cACLP,KAAKwG,GAAGtF,EAAIA,KAAC5B,QAAUU,KAAKxC,QAAQgD,OAAS,KAKlDT,MAAMmB,IACjB,CAOA,QAAIA,CAAK6J,GACLhL,MAAMmB,KAAO6J,EACb/K,KAAKC,iBAAmBD,KAAKE,MACjC,CAMA8K,cAAAA,CAAeC,GAGX,OAFAjL,KAAKtB,eAAgB,EACrBsB,KAAKP,OAAOiG,QAAO,GACZ3F,MAAMiL,eAAeC,EAChC,yDA7T6BC,EAC7B/K,OACA1C,iBAEA0C,GACAgE,EAAAA,mBAAmBsB,SAAStF,IAC5B1C,GAAaC,OAAOY,mBAAmB6M,aACvCC,EAAaA,iBACbC,EAAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groups.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/waapi/transforms/groups.mjs"],"sourcesContent":["const transformGroups = new WeakMap();\n\nexport { transformGroups };\n//# sourceMappingURL=groups.mjs.map\n"],"names":["transformGroups","WeakMap"],"mappings":"oEAqBaA,MAAAA,EAAkB,IAAIC"}
|