motion-v 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +381 -310
- package/dist/es/animation/hooks/animation-controls.mjs +1 -1
- package/dist/es/animation/hooks/use-animate.mjs +1 -1
- package/dist/es/components/animate-presence/use-pop-layout.mjs +1 -1
- package/dist/es/components/motion/use-motion-state.mjs +1 -1
- package/dist/es/components/reorder/utils.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/animate/index.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/animate/sequence.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/animate/single-value.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/animate/subject.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +7 -7
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/interfaces/motion-value.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/sequence/create.mjs +5 -5
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/sequence/utils/edit.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/utils/create-visual-element.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/utils/default-transitions.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/projection/animation/mix-values.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/projection/geometry/delta-apply.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/projection/geometry/delta-calc.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/projection/geometry/delta-remove.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/projection/node/create-projection-node.mjs +15 -14
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/projection/styles/scale-border-radius.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/projection/styles/scale-correction.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/VisualElement.mjs +9 -9
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/dom/scroll/attach-animation.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/dom/scroll/attach-function.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/dom/scroll/track.mjs +7 -13
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/dom/scroll/utils/get-timeline.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/dom/viewport/index.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/html/utils/build-styles.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/html/utils/build-transform.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/svg/utils/path.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/utils/motion-values.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/utils/setters.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/utils/delay.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/value/use-will-change/is.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +1 -1
- package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/JSAnimation.mjs +4 -4
- package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/effects/MotionValueState.mjs +7 -2
- package/dist/es/external/.pnpm/motion-dom@12.16.0/external/motion-dom/dist/es/effects/attr/index.mjs +31 -0
- package/dist/es/external/.pnpm/motion-dom@12.16.0/external/motion-dom/dist/es/effects/prop/index.mjs +9 -0
- package/dist/es/external/.pnpm/motion-dom@12.16.0/external/motion-dom/dist/es/effects/style/index.mjs +49 -0
- package/dist/es/external/.pnpm/motion-dom@12.16.0/external/motion-dom/dist/es/effects/svg/index.mjs +40 -0
- package/dist/es/external/.pnpm/motion-dom@12.16.0/external/motion-dom/dist/es/effects/utils/create-dom-effect.mjs +18 -0
- package/dist/es/external/.pnpm/motion-dom@12.16.0/external/motion-dom/dist/es/effects/utils/create-effect.mjs +21 -0
- package/dist/es/external/.pnpm/motion-dom@12.16.0/external/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs +6 -0
- package/dist/es/external/.pnpm/{framer-motion@12.12.1/external/framer-motion/dist/es/render/dom → motion-dom@12.16.0/external/motion-dom/dist/es}/resize/handle-element.mjs +17 -18
- package/dist/es/external/.pnpm/{framer-motion@12.12.1/external/framer-motion/dist/es/render/dom → motion-dom@12.16.0/external/motion-dom/dist/es}/resize/handle-window.mjs +8 -8
- package/dist/es/features/animation/animation.mjs +2 -2
- package/dist/es/features/gestures/drag/VisualElementDragControls.mjs +4 -4
- package/dist/es/features/gestures/drag/utils/constraints.mjs +3 -3
- package/dist/es/features/gestures/hover/index.mjs +2 -2
- package/dist/es/features/gestures/in-view/index.mjs +2 -2
- package/dist/es/features/gestures/pan/PanSession.mjs +2 -2
- package/dist/es/features/gestures/pan/index.mjs +1 -1
- package/dist/es/features/gestures/press/index.mjs +2 -2
- package/dist/es/features/layout/config.mjs +2 -2
- package/dist/es/features/layout/layout.mjs +2 -2
- package/dist/es/features/layout/projection.mjs +2 -2
- package/dist/es/index.mjs +110 -100
- package/dist/es/state/create-visual-element.mjs +2 -2
- package/dist/es/state/motion-state.mjs +1 -1
- package/dist/es/state/style.mjs +2 -2
- package/dist/es/utils/index.d.ts +0 -1
- package/dist/es/utils/use-animation-frame.mjs +1 -1
- package/dist/es/utils/use-in-view.mjs +1 -1
- package/dist/es/value/use-combine-values.mjs +2 -2
- package/dist/es/value/use-computed.mjs +1 -1
- package/dist/es/value/use-motion-template.mjs +1 -1
- package/dist/es/value/use-scroll.mjs +2 -2
- package/dist/es/value/use-spring.mjs +4 -4
- package/dist/es/value/use-time.mjs +1 -1
- package/dist/es/value/use-transform.mjs +1 -1
- package/dist/es/value/use-velocity.mjs +2 -2
- package/dist/es/value/use-will-change/is.mjs +1 -1
- package/package.json +2 -2
- package/dist/es/external/.pnpm/motion-dom@12.12.1/external/motion-dom/dist/es/effects/style/index.mjs +0 -49
- package/dist/es/utils/clamp.d.ts +0 -1
- package/dist/es/utils/clamp.mjs +0 -10
- package/dist/es/utils/mix/number.d.ts +0 -1
- package/dist/es/utils/mix/number.mjs +0 -6
- package/dist/es/utils/motion-value.d.ts +0 -1
- package/dist/es/utils/progress.d.ts +0 -1
- package/dist/es/utils/progress.mjs +0 -7
- package/dist/es/utils/time-conversion.d.ts +0 -8
- package/dist/es/value/types/numbers/units.d.ts +0 -30
- package/dist/es/value/types/numbers/units.mjs +0 -13
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/optimized-appear/data-id.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/sequence/utils/sort.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/utils/is-animation-controls.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/utils/is-transition-defined.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/animation/utils/stagger.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/events/add-dom-event.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/motion/features/definitions.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/projection/geometry/conversion.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/projection/geometry/copy.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/projection/geometry/models.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/projection/geometry/utils.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/projection/node/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/projection/shared/stack.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/projection/styles/transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/projection/utils/each-axis.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/projection/utils/has-transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/projection/utils/measure.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/dom/scroll/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/dom/scroll/info.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/html/utils/render.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/object/ObjectVisualElement.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/store.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/svg/utils/render.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/utils/compare-by-depth.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/utils/flat-tree.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/utils/is-controlling-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/utils/is-variant-label.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/utils/resolve-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/render/utils/variant-props.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/utils/distance.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/utils/is-browser.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/utils/reduced-motion/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/utils/reduced-motion/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1 → framer-motion@12.16.0}/external/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/GroupAnimation.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/GroupAnimationWithThen.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/NativeAnimation.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/NativeAnimationExtended.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/NativeAnimationWrapper.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/drivers/frame.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/generators/inertia.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/generators/keyframes.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/generators/spring/defaults.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/generators/spring/find.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/generators/spring/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/generators/utils/velocity.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/keyframes/get-final.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/keyframes/offsets/default.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/keyframes/offsets/time.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/keyframes/utils/apply-px-defaults.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/utils/WithPromise.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/utils/active-animations.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/utils/can-animate.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/utils/get-value-transition.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/utils/is-animatable.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/utils/is-css-variable.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/utils/replace-transition-type.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/waapi/easing/is-supported.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/waapi/easing/supported.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/waapi/supports/partial-keyframes.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/waapi/supports/waapi.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/waapi/utils/linear.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/waapi/utils/px-values.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/effects/style/transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/frameloop/batcher.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/frameloop/frame.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/frameloop/index-legacy.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/frameloop/microtask.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/frameloop/order.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/frameloop/render-step.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/frameloop/sync-time.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/gestures/drag/state/is-active.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/gestures/drag/state/set-active.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/gestures/hover.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/gestures/press/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/gestures/press/utils/keyboard.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/gestures/press/utils/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/gestures/utils/setup.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/render/dom/is-css-var.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/render/dom/parse-transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/render/dom/style-computed.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/render/dom/style-set.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/render/utils/keys-position.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/render/utils/keys-transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.12.1/external/framer-motion/dist/es/render/dom → motion-dom@12.16.0/external/motion-dom/dist/es}/resize/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/scroll/observe.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/stats/animation-count.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/stats/buffer.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/stats/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/utils/interpolate.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/utils/is-html-element.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/utils/is-svg-element.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/utils/is-svg-svg-element.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/utils/mix/color.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/utils/mix/complex.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/utils/mix/immediate.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/utils/mix/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/utils/mix/number.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/utils/mix/visibility.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/utils/resolve-elements.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/utils/supports/flags.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/utils/supports/linear-easing.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/utils/supports/memo.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/utils/supports/scroll-timeline.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/utils/transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/map-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/spring-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/subscribe-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/transform-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/auto.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/color/hex.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/color/hsla.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/color/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/color/rgba.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/color/utils.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/complex/filter.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/complex/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/dimensions.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/int.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/maps/defaults.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/maps/number.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/maps/transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/numbers/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/numbers/units.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/test.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/utils/animatable-none.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/utils/color-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/utils/find.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/utils/float-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/utils/get-as-type.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/utils/is-nullish.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/utils/sanitize.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/types/utils/single-color-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/value/utils/is-motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/view/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/view/queue.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/view/start.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/view/utils/choose-layer-type.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/view/utils/css.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/view/utils/get-layer-name.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/view/utils/get-view-animations.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.12.1 → motion-dom@12.16.0}/external/motion-dom/dist/es/view/utils/has-target.mjs +0 -0
package/dist/cjs/index.js
CHANGED
|
@@ -21,7 +21,7 @@ function moveItem$1([...arr], fromIndex, toIndex) {
|
|
|
21
21
|
}
|
|
22
22
|
return arr;
|
|
23
23
|
}
|
|
24
|
-
const clamp
|
|
24
|
+
const clamp = (min, max, v) => {
|
|
25
25
|
if (v > max)
|
|
26
26
|
return max;
|
|
27
27
|
if (v < min)
|
|
@@ -62,7 +62,7 @@ function memo(callback) {
|
|
|
62
62
|
const noop = /* @__NO_SIDE_EFFECTS__ */ (any) => any;
|
|
63
63
|
const combineFunctions = (a, b) => (v) => b(a(v));
|
|
64
64
|
const pipe = (...transformers) => transformers.reduce(combineFunctions);
|
|
65
|
-
const progress
|
|
65
|
+
const progress = /* @__NO_SIDE_EFFECTS__ */ (from, to, value) => {
|
|
66
66
|
const toFromDifference = to - from;
|
|
67
67
|
return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;
|
|
68
68
|
};
|
|
@@ -156,7 +156,7 @@ function steps(numSteps, direction = "end") {
|
|
|
156
156
|
progress2 = direction === "end" ? Math.min(progress2, 0.999) : Math.max(progress2, 1e-3);
|
|
157
157
|
const expanded = progress2 * numSteps;
|
|
158
158
|
const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded);
|
|
159
|
-
return clamp
|
|
159
|
+
return clamp(0, 1, rounded / numSteps);
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
162
|
const isEasingArray = (ease2) => {
|
|
@@ -380,7 +380,7 @@ const number = {
|
|
|
380
380
|
};
|
|
381
381
|
const alpha = {
|
|
382
382
|
...number,
|
|
383
|
-
transform: (v) => clamp
|
|
383
|
+
transform: (v) => clamp(0, 1, v)
|
|
384
384
|
};
|
|
385
385
|
const scale = {
|
|
386
386
|
...number,
|
|
@@ -406,7 +406,7 @@ const splitColor = (aName, bName, cName) => (v) => {
|
|
|
406
406
|
alpha: alpha2 !== void 0 ? parseFloat(alpha2) : 1
|
|
407
407
|
};
|
|
408
408
|
};
|
|
409
|
-
const clampRgbUnit = (v) => clamp
|
|
409
|
+
const clampRgbUnit = (v) => clamp(0, 255, v);
|
|
410
410
|
const rgbUnit = {
|
|
411
411
|
...number,
|
|
412
412
|
transform: (v) => Math.round(clampRgbUnit(v))
|
|
@@ -448,26 +448,26 @@ const hex = {
|
|
|
448
448
|
parse: parseHex,
|
|
449
449
|
transform: rgba.transform
|
|
450
450
|
};
|
|
451
|
-
const createUnitType
|
|
451
|
+
const createUnitType = /* @__NO_SIDE_EFFECTS__ */ (unit) => ({
|
|
452
452
|
test: (v) => typeof v === "string" && v.endsWith(unit) && v.split(" ").length === 1,
|
|
453
453
|
parse: parseFloat,
|
|
454
454
|
transform: (v) => `${v}${unit}`
|
|
455
455
|
});
|
|
456
|
-
const degrees = /* @__PURE__ */ createUnitType
|
|
457
|
-
const percent
|
|
458
|
-
const px
|
|
459
|
-
const vh = /* @__PURE__ */ createUnitType
|
|
460
|
-
const vw = /* @__PURE__ */ createUnitType
|
|
456
|
+
const degrees = /* @__PURE__ */ createUnitType("deg");
|
|
457
|
+
const percent = /* @__PURE__ */ createUnitType("%");
|
|
458
|
+
const px = /* @__PURE__ */ createUnitType("px");
|
|
459
|
+
const vh = /* @__PURE__ */ createUnitType("vh");
|
|
460
|
+
const vw = /* @__PURE__ */ createUnitType("vw");
|
|
461
461
|
const progressPercentage = /* @__PURE__ */ (() => ({
|
|
462
|
-
...percent
|
|
463
|
-
parse: (v) => percent
|
|
464
|
-
transform: (v) => percent
|
|
462
|
+
...percent,
|
|
463
|
+
parse: (v) => percent.parse(v) / 100,
|
|
464
|
+
transform: (v) => percent.transform(v * 100)
|
|
465
465
|
}))();
|
|
466
466
|
const hsla = {
|
|
467
467
|
test: /* @__PURE__ */ isColorString("hsl", "hue"),
|
|
468
468
|
parse: /* @__PURE__ */ splitColor("hue", "saturation", "lightness"),
|
|
469
469
|
transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {
|
|
470
|
-
return "hsla(" + Math.round(hue) + ", " + percent
|
|
470
|
+
return "hsla(" + Math.round(hue) + ", " + percent.transform(sanitize(saturation)) + ", " + percent.transform(sanitize(lightness)) + ", " + sanitize(alpha.transform(alpha$1)) + ")";
|
|
471
471
|
}
|
|
472
472
|
};
|
|
473
473
|
const color = {
|
|
@@ -601,7 +601,7 @@ function hslaToRgba({ hue, saturation, lightness, alpha: alpha2 }) {
|
|
|
601
601
|
function mixImmediate(a, b) {
|
|
602
602
|
return (p) => p > 0 ? b : a;
|
|
603
603
|
}
|
|
604
|
-
const mixNumber$
|
|
604
|
+
const mixNumber$1 = (from, to, progress2) => {
|
|
605
605
|
return from + (to - from) * progress2;
|
|
606
606
|
};
|
|
607
607
|
const mixLinearColor = (from, to, v) => {
|
|
@@ -633,7 +633,7 @@ const mixColor = (from, to) => {
|
|
|
633
633
|
blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);
|
|
634
634
|
blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);
|
|
635
635
|
blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);
|
|
636
|
-
blended.alpha = mixNumber$
|
|
636
|
+
blended.alpha = mixNumber$1(fromRGBA.alpha, toRGBA.alpha, v);
|
|
637
637
|
return rgba.transform(blended);
|
|
638
638
|
};
|
|
639
639
|
};
|
|
@@ -645,12 +645,12 @@ function mixVisibility(origin, target) {
|
|
|
645
645
|
return (p) => p >= 1 ? target : origin;
|
|
646
646
|
}
|
|
647
647
|
}
|
|
648
|
-
function mixNumber
|
|
649
|
-
return (p) => mixNumber$
|
|
648
|
+
function mixNumber(a, b) {
|
|
649
|
+
return (p) => mixNumber$1(a, b, p);
|
|
650
650
|
}
|
|
651
651
|
function getMixer(a) {
|
|
652
652
|
if (typeof a === "number") {
|
|
653
|
-
return mixNumber
|
|
653
|
+
return mixNumber;
|
|
654
654
|
} else if (typeof a === "string") {
|
|
655
655
|
return isCSSVariableToken(a) ? mixImmediate : color.test(a) ? mixColor : mixComplex;
|
|
656
656
|
} else if (Array.isArray(a)) {
|
|
@@ -715,7 +715,7 @@ const mixComplex = (origin, target) => {
|
|
|
715
715
|
};
|
|
716
716
|
function mix(from, to, p) {
|
|
717
717
|
if (typeof from === "number" && typeof to === "number" && typeof p === "number") {
|
|
718
|
-
return mixNumber$
|
|
718
|
+
return mixNumber$1(from, to, p);
|
|
719
719
|
}
|
|
720
720
|
const mixer = getMixer(from);
|
|
721
721
|
return mixer(from, to);
|
|
@@ -802,8 +802,8 @@ function findSpring({ duration = springDefaults.duration, bounce = springDefault
|
|
|
802
802
|
let derivative;
|
|
803
803
|
exports.warning(duration <= /* @__PURE__ */ secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less");
|
|
804
804
|
let dampingRatio = 1 - bounce;
|
|
805
|
-
dampingRatio = clamp
|
|
806
|
-
duration = clamp
|
|
805
|
+
dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);
|
|
806
|
+
duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, /* @__PURE__ */ millisecondsToSeconds(duration));
|
|
807
807
|
if (dampingRatio < 1) {
|
|
808
808
|
envelope = (undampedFreq2) => {
|
|
809
809
|
const exponentialDecay = undampedFreq2 * dampingRatio;
|
|
@@ -883,7 +883,7 @@ function getSpringOptions(options) {
|
|
|
883
883
|
const visualDuration = options.visualDuration;
|
|
884
884
|
const root = 2 * Math.PI / (visualDuration * 1.2);
|
|
885
885
|
const stiffness = root * root;
|
|
886
|
-
const damping = 2 * clamp
|
|
886
|
+
const damping = 2 * clamp(0.05, 1, 1 - (options.bounce || 0)) * Math.sqrt(stiffness);
|
|
887
887
|
springOptions = {
|
|
888
888
|
...springOptions,
|
|
889
889
|
mass: springDefaults.mass,
|
|
@@ -1075,16 +1075,16 @@ function interpolate(input, output, { clamp: isClamp = true, ease: ease2, mixer
|
|
|
1075
1075
|
break;
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
|
-
const progressInRange = /* @__PURE__ */ progress
|
|
1078
|
+
const progressInRange = /* @__PURE__ */ progress(input[i], input[i + 1], v);
|
|
1079
1079
|
return mixers[i](progressInRange);
|
|
1080
1080
|
};
|
|
1081
|
-
return isClamp ? (v) => interpolator(clamp
|
|
1081
|
+
return isClamp ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v)) : interpolator;
|
|
1082
1082
|
}
|
|
1083
1083
|
function fillOffset(offset, remaining) {
|
|
1084
1084
|
const min = offset[offset.length - 1];
|
|
1085
1085
|
for (let i = 1; i <= remaining; i++) {
|
|
1086
|
-
const offsetProgress = /* @__PURE__ */ progress
|
|
1087
|
-
offset.push(mixNumber$
|
|
1086
|
+
const offsetProgress = /* @__PURE__ */ progress(0, remaining, i);
|
|
1087
|
+
offset.push(mixNumber$1(min, 1, offsetProgress));
|
|
1088
1088
|
}
|
|
1089
1089
|
}
|
|
1090
1090
|
function defaultOffset$1(arr) {
|
|
@@ -1175,13 +1175,11 @@ class JSAnimation extends WithPromise {
|
|
|
1175
1175
|
this.currentTime = 0;
|
|
1176
1176
|
this.holdTime = null;
|
|
1177
1177
|
this.playbackSpeed = 1;
|
|
1178
|
-
this.stop = (
|
|
1178
|
+
this.stop = () => {
|
|
1179
1179
|
var _a, _b;
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
this.tick(time.now());
|
|
1184
|
-
}
|
|
1180
|
+
const { motionValue: motionValue2 } = this.options;
|
|
1181
|
+
if (motionValue2 && motionValue2.updatedAt !== time.now()) {
|
|
1182
|
+
this.tick(time.now());
|
|
1185
1183
|
}
|
|
1186
1184
|
this.isStopped = true;
|
|
1187
1185
|
if (this.state === "idle")
|
|
@@ -1277,7 +1275,7 @@ class JSAnimation extends WithPromise {
|
|
|
1277
1275
|
frameGenerator = mirroredGenerator;
|
|
1278
1276
|
}
|
|
1279
1277
|
}
|
|
1280
|
-
elapsed = clamp
|
|
1278
|
+
elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;
|
|
1281
1279
|
}
|
|
1282
1280
|
const state = isInDelayPhase ? { done: false, value: keyframes2[0] } : frameGenerator.next(elapsed);
|
|
1283
1281
|
if (mixKeyframes) {
|
|
@@ -1520,7 +1518,7 @@ const transformPropOrder = [
|
|
|
1520
1518
|
"skewY"
|
|
1521
1519
|
];
|
|
1522
1520
|
const transformProps = /* @__PURE__ */ (() => new Set(transformPropOrder))();
|
|
1523
|
-
const isNumOrPxType = (v) => v === number || v === px
|
|
1521
|
+
const isNumOrPxType = (v) => v === number || v === px;
|
|
1524
1522
|
const transformKeys = /* @__PURE__ */ new Set(["x", "y", "z"]);
|
|
1525
1523
|
const nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key));
|
|
1526
1524
|
function removeNonTranslationalTransform(visualElement) {
|
|
@@ -2263,7 +2261,7 @@ const auto = {
|
|
|
2263
2261
|
parse: (v) => v
|
|
2264
2262
|
};
|
|
2265
2263
|
const testValueType = (v) => (type) => type.test(v);
|
|
2266
|
-
const dimensionValueTypes = [number, px
|
|
2264
|
+
const dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];
|
|
2267
2265
|
const findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v));
|
|
2268
2266
|
function isNone(value) {
|
|
2269
2267
|
if (typeof value === "number") {
|
|
@@ -2312,56 +2310,56 @@ const transformValueTypes = {
|
|
|
2312
2310
|
skew: degrees,
|
|
2313
2311
|
skewX: degrees,
|
|
2314
2312
|
skewY: degrees,
|
|
2315
|
-
distance: px
|
|
2316
|
-
translateX: px
|
|
2317
|
-
translateY: px
|
|
2318
|
-
translateZ: px
|
|
2319
|
-
x: px
|
|
2320
|
-
y: px
|
|
2321
|
-
z: px
|
|
2322
|
-
perspective: px
|
|
2323
|
-
transformPerspective: px
|
|
2313
|
+
distance: px,
|
|
2314
|
+
translateX: px,
|
|
2315
|
+
translateY: px,
|
|
2316
|
+
translateZ: px,
|
|
2317
|
+
x: px,
|
|
2318
|
+
y: px,
|
|
2319
|
+
z: px,
|
|
2320
|
+
perspective: px,
|
|
2321
|
+
transformPerspective: px,
|
|
2324
2322
|
opacity: alpha,
|
|
2325
2323
|
originX: progressPercentage,
|
|
2326
2324
|
originY: progressPercentage,
|
|
2327
|
-
originZ: px
|
|
2325
|
+
originZ: px
|
|
2328
2326
|
};
|
|
2329
2327
|
const numberValueTypes = {
|
|
2330
2328
|
// Border props
|
|
2331
|
-
borderWidth: px
|
|
2332
|
-
borderTopWidth: px
|
|
2333
|
-
borderRightWidth: px
|
|
2334
|
-
borderBottomWidth: px
|
|
2335
|
-
borderLeftWidth: px
|
|
2336
|
-
borderRadius: px
|
|
2337
|
-
radius: px
|
|
2338
|
-
borderTopLeftRadius: px
|
|
2339
|
-
borderTopRightRadius: px
|
|
2340
|
-
borderBottomRightRadius: px
|
|
2341
|
-
borderBottomLeftRadius: px
|
|
2329
|
+
borderWidth: px,
|
|
2330
|
+
borderTopWidth: px,
|
|
2331
|
+
borderRightWidth: px,
|
|
2332
|
+
borderBottomWidth: px,
|
|
2333
|
+
borderLeftWidth: px,
|
|
2334
|
+
borderRadius: px,
|
|
2335
|
+
radius: px,
|
|
2336
|
+
borderTopLeftRadius: px,
|
|
2337
|
+
borderTopRightRadius: px,
|
|
2338
|
+
borderBottomRightRadius: px,
|
|
2339
|
+
borderBottomLeftRadius: px,
|
|
2342
2340
|
// Positioning props
|
|
2343
|
-
width: px
|
|
2344
|
-
maxWidth: px
|
|
2345
|
-
height: px
|
|
2346
|
-
maxHeight: px
|
|
2347
|
-
top: px
|
|
2348
|
-
right: px
|
|
2349
|
-
bottom: px
|
|
2350
|
-
left: px
|
|
2341
|
+
width: px,
|
|
2342
|
+
maxWidth: px,
|
|
2343
|
+
height: px,
|
|
2344
|
+
maxHeight: px,
|
|
2345
|
+
top: px,
|
|
2346
|
+
right: px,
|
|
2347
|
+
bottom: px,
|
|
2348
|
+
left: px,
|
|
2351
2349
|
// Spacing props
|
|
2352
|
-
padding: px
|
|
2353
|
-
paddingTop: px
|
|
2354
|
-
paddingRight: px
|
|
2355
|
-
paddingBottom: px
|
|
2356
|
-
paddingLeft: px
|
|
2357
|
-
margin: px
|
|
2358
|
-
marginTop: px
|
|
2359
|
-
marginRight: px
|
|
2360
|
-
marginBottom: px
|
|
2361
|
-
marginLeft: px
|
|
2350
|
+
padding: px,
|
|
2351
|
+
paddingTop: px,
|
|
2352
|
+
paddingRight: px,
|
|
2353
|
+
paddingBottom: px,
|
|
2354
|
+
paddingLeft: px,
|
|
2355
|
+
margin: px,
|
|
2356
|
+
marginTop: px,
|
|
2357
|
+
marginRight: px,
|
|
2358
|
+
marginBottom: px,
|
|
2359
|
+
marginLeft: px,
|
|
2362
2360
|
// Misc
|
|
2363
|
-
backgroundPositionX: px
|
|
2364
|
-
backgroundPositionY: px
|
|
2361
|
+
backgroundPositionX: px,
|
|
2362
|
+
backgroundPositionY: px,
|
|
2365
2363
|
...transformValueTypes,
|
|
2366
2364
|
zIndex: int,
|
|
2367
2365
|
// SVG
|
|
@@ -2565,6 +2563,9 @@ const acceleratedValues = /* @__PURE__ */ new Set([
|
|
|
2565
2563
|
// or until we implement support for linear() easing.
|
|
2566
2564
|
// "background-color"
|
|
2567
2565
|
]);
|
|
2566
|
+
function camelToDash$1(str) {
|
|
2567
|
+
return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);
|
|
2568
|
+
}
|
|
2568
2569
|
function resolveElements(elementOrSelector, scope, selectorCache) {
|
|
2569
2570
|
if (elementOrSelector instanceof EventTarget) {
|
|
2570
2571
|
return [elementOrSelector];
|
|
@@ -2578,6 +2579,110 @@ function resolveElements(elementOrSelector, scope, selectorCache) {
|
|
|
2578
2579
|
}
|
|
2579
2580
|
return Array.from(elementOrSelector);
|
|
2580
2581
|
}
|
|
2582
|
+
function createSelectorEffect(subjectEffect) {
|
|
2583
|
+
return (subject, values) => {
|
|
2584
|
+
const elements = resolveElements(subject);
|
|
2585
|
+
const subscriptions = [];
|
|
2586
|
+
for (const element of elements) {
|
|
2587
|
+
const remove = subjectEffect(element, values);
|
|
2588
|
+
subscriptions.push(remove);
|
|
2589
|
+
}
|
|
2590
|
+
return () => {
|
|
2591
|
+
for (const remove of subscriptions)
|
|
2592
|
+
remove();
|
|
2593
|
+
};
|
|
2594
|
+
};
|
|
2595
|
+
}
|
|
2596
|
+
const getValueAsType = (value, type) => {
|
|
2597
|
+
return type && typeof value === "number" ? type.transform(value) : value;
|
|
2598
|
+
};
|
|
2599
|
+
class MotionValueState {
|
|
2600
|
+
constructor() {
|
|
2601
|
+
this.latest = {};
|
|
2602
|
+
this.values = /* @__PURE__ */ new Map();
|
|
2603
|
+
}
|
|
2604
|
+
set(name, value, render, computed, useDefaultValueType = true) {
|
|
2605
|
+
const existingValue = this.values.get(name);
|
|
2606
|
+
if (existingValue) {
|
|
2607
|
+
existingValue.onRemove();
|
|
2608
|
+
}
|
|
2609
|
+
const onChange = () => {
|
|
2610
|
+
const v = value.get();
|
|
2611
|
+
if (useDefaultValueType) {
|
|
2612
|
+
this.latest[name] = getValueAsType(v, numberValueTypes[name]);
|
|
2613
|
+
} else {
|
|
2614
|
+
this.latest[name] = v;
|
|
2615
|
+
}
|
|
2616
|
+
render && frame.render(render);
|
|
2617
|
+
};
|
|
2618
|
+
onChange();
|
|
2619
|
+
const cancelOnChange = value.on("change", onChange);
|
|
2620
|
+
computed && value.addDependent(computed);
|
|
2621
|
+
const remove = () => {
|
|
2622
|
+
cancelOnChange();
|
|
2623
|
+
render && cancelFrame(render);
|
|
2624
|
+
this.values.delete(name);
|
|
2625
|
+
computed && value.removeDependent(computed);
|
|
2626
|
+
};
|
|
2627
|
+
this.values.set(name, { value, onRemove: remove });
|
|
2628
|
+
return remove;
|
|
2629
|
+
}
|
|
2630
|
+
get(name) {
|
|
2631
|
+
var _a;
|
|
2632
|
+
return (_a = this.values.get(name)) == null ? void 0 : _a.value;
|
|
2633
|
+
}
|
|
2634
|
+
destroy() {
|
|
2635
|
+
for (const value of this.values.values()) {
|
|
2636
|
+
value.onRemove();
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2639
|
+
}
|
|
2640
|
+
function createEffect(addValue) {
|
|
2641
|
+
const stateCache = /* @__PURE__ */ new WeakMap();
|
|
2642
|
+
const subscriptions = [];
|
|
2643
|
+
return (subject, values) => {
|
|
2644
|
+
const state = stateCache.get(subject) ?? new MotionValueState();
|
|
2645
|
+
stateCache.set(subject, state);
|
|
2646
|
+
for (const key in values) {
|
|
2647
|
+
const value = values[key];
|
|
2648
|
+
const remove = addValue(subject, state, key, value);
|
|
2649
|
+
subscriptions.push(remove);
|
|
2650
|
+
}
|
|
2651
|
+
return () => {
|
|
2652
|
+
for (const cancel of subscriptions)
|
|
2653
|
+
cancel();
|
|
2654
|
+
};
|
|
2655
|
+
};
|
|
2656
|
+
}
|
|
2657
|
+
function canSetAsProperty(element, name) {
|
|
2658
|
+
if (!(name in element))
|
|
2659
|
+
return false;
|
|
2660
|
+
const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(element), name) || Object.getOwnPropertyDescriptor(element, name);
|
|
2661
|
+
return descriptor && typeof descriptor.set === "function";
|
|
2662
|
+
}
|
|
2663
|
+
const addAttrValue = (element, state, key, value) => {
|
|
2664
|
+
const isProp = canSetAsProperty(element, key);
|
|
2665
|
+
const name = isProp ? key : key.startsWith("data") || key.startsWith("aria") ? camelToDash$1(key) : key;
|
|
2666
|
+
const render = isProp ? () => {
|
|
2667
|
+
element[name] = state.latest[key];
|
|
2668
|
+
} : () => {
|
|
2669
|
+
const v = state.latest[key];
|
|
2670
|
+
if (v === null || v === void 0) {
|
|
2671
|
+
element.removeAttribute(name);
|
|
2672
|
+
} else {
|
|
2673
|
+
element.setAttribute(name, String(v));
|
|
2674
|
+
}
|
|
2675
|
+
};
|
|
2676
|
+
return state.set(key, value, render);
|
|
2677
|
+
};
|
|
2678
|
+
const attrEffect = /* @__PURE__ */ createSelectorEffect(
|
|
2679
|
+
/* @__PURE__ */ createEffect(addAttrValue)
|
|
2680
|
+
);
|
|
2681
|
+
const propEffect = /* @__PURE__ */ createEffect((subject, state, key, value) => {
|
|
2682
|
+
return state.set(key, value, () => {
|
|
2683
|
+
subject[key] = state.latest[key];
|
|
2684
|
+
}, void 0, false);
|
|
2685
|
+
});
|
|
2581
2686
|
const MAX_VELOCITY_DELTA = 30;
|
|
2582
2687
|
const isFloat = (value) => {
|
|
2583
2688
|
return !isNaN(parseFloat(value));
|
|
@@ -2867,45 +2972,6 @@ class MotionValue {
|
|
|
2867
2972
|
function motionValue(init, options) {
|
|
2868
2973
|
return new MotionValue(init, options);
|
|
2869
2974
|
}
|
|
2870
|
-
const getValueAsType = (value, type) => {
|
|
2871
|
-
return type && typeof value === "number" ? type.transform(value) : value;
|
|
2872
|
-
};
|
|
2873
|
-
class MotionValueState {
|
|
2874
|
-
constructor() {
|
|
2875
|
-
this.latest = {};
|
|
2876
|
-
this.values = /* @__PURE__ */ new Map();
|
|
2877
|
-
}
|
|
2878
|
-
set(name, value, render, computed) {
|
|
2879
|
-
const existingValue = this.values.get(name);
|
|
2880
|
-
if (existingValue) {
|
|
2881
|
-
existingValue.onRemove();
|
|
2882
|
-
}
|
|
2883
|
-
const onChange = () => {
|
|
2884
|
-
this.latest[name] = getValueAsType(value.get(), numberValueTypes[name]);
|
|
2885
|
-
render && frame.render(render);
|
|
2886
|
-
};
|
|
2887
|
-
onChange();
|
|
2888
|
-
const cancelOnChange = value.on("change", onChange);
|
|
2889
|
-
computed && value.addDependent(computed);
|
|
2890
|
-
const remove = () => {
|
|
2891
|
-
cancelOnChange();
|
|
2892
|
-
render && cancelFrame(render);
|
|
2893
|
-
this.values.delete(name);
|
|
2894
|
-
computed && value.removeDependent(computed);
|
|
2895
|
-
};
|
|
2896
|
-
this.values.set(name, { value, onRemove: remove });
|
|
2897
|
-
return remove;
|
|
2898
|
-
}
|
|
2899
|
-
get(name) {
|
|
2900
|
-
var _a;
|
|
2901
|
-
return (_a = this.values.get(name)) == null ? void 0 : _a.value;
|
|
2902
|
-
}
|
|
2903
|
-
destroy() {
|
|
2904
|
-
for (const value of this.values.values()) {
|
|
2905
|
-
value.onRemove();
|
|
2906
|
-
}
|
|
2907
|
-
}
|
|
2908
|
-
}
|
|
2909
2975
|
const translateAlias$1 = {
|
|
2910
2976
|
x: "translateX",
|
|
2911
2977
|
y: "translateY",
|
|
@@ -2935,35 +3001,30 @@ function buildTransform$1(state) {
|
|
|
2935
3001
|
}
|
|
2936
3002
|
return transformIsDefault ? "none" : transform2.trim();
|
|
2937
3003
|
}
|
|
2938
|
-
const
|
|
2939
|
-
|
|
2940
|
-
const elements = resolveElements(subject);
|
|
2941
|
-
const subscriptions = [];
|
|
2942
|
-
for (let i = 0; i < elements.length; i++) {
|
|
2943
|
-
const element = elements[i];
|
|
2944
|
-
const state = stateMap.get(element) ?? new MotionValueState();
|
|
2945
|
-
stateMap.set(element, state);
|
|
2946
|
-
for (const key in values) {
|
|
2947
|
-
const value = values[key];
|
|
2948
|
-
const remove = addValue(element, state, key, value);
|
|
2949
|
-
subscriptions.push(remove);
|
|
2950
|
-
}
|
|
2951
|
-
}
|
|
2952
|
-
return () => {
|
|
2953
|
-
for (const cancel of subscriptions)
|
|
2954
|
-
cancel();
|
|
2955
|
-
};
|
|
2956
|
-
}
|
|
2957
|
-
function addValue(element, state, key, value) {
|
|
3004
|
+
const originProps = /* @__PURE__ */ new Set(["originX", "originY", "originZ"]);
|
|
3005
|
+
const addStyleValue = (element, state, key, value) => {
|
|
2958
3006
|
let render = void 0;
|
|
2959
3007
|
let computed = void 0;
|
|
2960
3008
|
if (transformProps.has(key)) {
|
|
2961
3009
|
if (!state.get("transform")) {
|
|
3010
|
+
if (!isHTMLElement$1(element) && !state.get("transformBox")) {
|
|
3011
|
+
addStyleValue(element, state, "transformBox", new MotionValue("fill-box"));
|
|
3012
|
+
}
|
|
2962
3013
|
state.set("transform", new MotionValue("none"), () => {
|
|
2963
3014
|
element.style.transform = buildTransform$1(state);
|
|
2964
3015
|
});
|
|
2965
3016
|
}
|
|
2966
3017
|
computed = state.get("transform");
|
|
3018
|
+
} else if (originProps.has(key)) {
|
|
3019
|
+
if (!state.get("transformOrigin")) {
|
|
3020
|
+
state.set("transformOrigin", new MotionValue(""), () => {
|
|
3021
|
+
const originX = state.latest.originX ?? "50%";
|
|
3022
|
+
const originY = state.latest.originY ?? "50%";
|
|
3023
|
+
const originZ = state.latest.originZ ?? 0;
|
|
3024
|
+
element.style.transformOrigin = `${originX} ${originY} ${originZ}`;
|
|
3025
|
+
});
|
|
3026
|
+
}
|
|
3027
|
+
computed = state.get("transformOrigin");
|
|
2967
3028
|
} else if (isCSSVar(key)) {
|
|
2968
3029
|
render = () => {
|
|
2969
3030
|
element.style.setProperty(key, state.latest[key]);
|
|
@@ -2974,6 +3035,39 @@ function addValue(element, state, key, value) {
|
|
|
2974
3035
|
};
|
|
2975
3036
|
}
|
|
2976
3037
|
return state.set(key, value, render, computed);
|
|
3038
|
+
};
|
|
3039
|
+
const styleEffect = /* @__PURE__ */ createSelectorEffect(
|
|
3040
|
+
/* @__PURE__ */ createEffect(addStyleValue)
|
|
3041
|
+
);
|
|
3042
|
+
const toPx = px.transform;
|
|
3043
|
+
function addSVGPathValue(element, state, key, value) {
|
|
3044
|
+
frame.render(() => element.setAttribute("pathLength", "1"));
|
|
3045
|
+
if (key === "pathOffset") {
|
|
3046
|
+
return state.set(key, value, () => element.setAttribute("stroke-dashoffset", toPx(-state.latest[key])));
|
|
3047
|
+
} else {
|
|
3048
|
+
if (!state.get("stroke-dasharray")) {
|
|
3049
|
+
state.set("stroke-dasharray", new MotionValue("1 1"), () => {
|
|
3050
|
+
const { pathLength = 1, pathSpacing } = state.latest;
|
|
3051
|
+
element.setAttribute("stroke-dasharray", `${toPx(pathLength)} ${toPx(pathSpacing ?? 1 - Number(pathLength))}`);
|
|
3052
|
+
});
|
|
3053
|
+
}
|
|
3054
|
+
return state.set(key, value, void 0, state.get("stroke-dasharray"));
|
|
3055
|
+
}
|
|
3056
|
+
}
|
|
3057
|
+
const addSVGValue = (element, state, key, value) => {
|
|
3058
|
+
if (key.startsWith("path")) {
|
|
3059
|
+
return addSVGPathValue(element, state, key, value);
|
|
3060
|
+
} else if (key.startsWith("attr")) {
|
|
3061
|
+
return addAttrValue(element, state, convertAttrKey(key), value);
|
|
3062
|
+
}
|
|
3063
|
+
const handler = key in element.style ? addStyleValue : addAttrValue;
|
|
3064
|
+
return handler(element, state, key, value);
|
|
3065
|
+
};
|
|
3066
|
+
const svgEffect = /* @__PURE__ */ createSelectorEffect(
|
|
3067
|
+
/* @__PURE__ */ createEffect(addSVGValue)
|
|
3068
|
+
);
|
|
3069
|
+
function convertAttrKey(key) {
|
|
3070
|
+
return key.replace(/^attr([A-Z])/, (_, firstChar) => firstChar.toLowerCase());
|
|
2977
3071
|
}
|
|
2978
3072
|
const { schedule: microtask, cancel: cancelMicrotask } = /* @__PURE__ */ createRenderBatcher(queueMicrotask, false);
|
|
2979
3073
|
const isDragging = {
|
|
@@ -3144,6 +3238,97 @@ function getComputedStyle$2(element, name) {
|
|
|
3144
3238
|
const computedStyle = window.getComputedStyle(element);
|
|
3145
3239
|
return isCSSVar(name) ? computedStyle.getPropertyValue(name) : computedStyle[name];
|
|
3146
3240
|
}
|
|
3241
|
+
function isSVGElement$1(element) {
|
|
3242
|
+
return isObject(element) && "ownerSVGElement" in element;
|
|
3243
|
+
}
|
|
3244
|
+
const resizeHandlers = /* @__PURE__ */ new WeakMap();
|
|
3245
|
+
let observer;
|
|
3246
|
+
const getSize = (borderBoxAxis, svgAxis, htmlAxis) => (target, borderBoxSize) => {
|
|
3247
|
+
if (borderBoxSize && borderBoxSize[0]) {
|
|
3248
|
+
return borderBoxSize[0][borderBoxAxis + "Size"];
|
|
3249
|
+
} else if (isSVGElement$1(target) && "getBBox" in target) {
|
|
3250
|
+
return target.getBBox()[svgAxis];
|
|
3251
|
+
} else {
|
|
3252
|
+
return target[htmlAxis];
|
|
3253
|
+
}
|
|
3254
|
+
};
|
|
3255
|
+
const getWidth = /* @__PURE__ */ getSize("inline", "width", "offsetWidth");
|
|
3256
|
+
const getHeight = /* @__PURE__ */ getSize("block", "height", "offsetHeight");
|
|
3257
|
+
function notifyTarget({ target, borderBoxSize }) {
|
|
3258
|
+
var _a;
|
|
3259
|
+
(_a = resizeHandlers.get(target)) == null ? void 0 : _a.forEach((handler) => {
|
|
3260
|
+
handler(target, {
|
|
3261
|
+
get width() {
|
|
3262
|
+
return getWidth(target, borderBoxSize);
|
|
3263
|
+
},
|
|
3264
|
+
get height() {
|
|
3265
|
+
return getHeight(target, borderBoxSize);
|
|
3266
|
+
}
|
|
3267
|
+
});
|
|
3268
|
+
});
|
|
3269
|
+
}
|
|
3270
|
+
function notifyAll(entries) {
|
|
3271
|
+
entries.forEach(notifyTarget);
|
|
3272
|
+
}
|
|
3273
|
+
function createResizeObserver() {
|
|
3274
|
+
if (typeof ResizeObserver === "undefined")
|
|
3275
|
+
return;
|
|
3276
|
+
observer = new ResizeObserver(notifyAll);
|
|
3277
|
+
}
|
|
3278
|
+
function resizeElement(target, handler) {
|
|
3279
|
+
if (!observer)
|
|
3280
|
+
createResizeObserver();
|
|
3281
|
+
const elements = resolveElements(target);
|
|
3282
|
+
elements.forEach((element) => {
|
|
3283
|
+
let elementHandlers = resizeHandlers.get(element);
|
|
3284
|
+
if (!elementHandlers) {
|
|
3285
|
+
elementHandlers = /* @__PURE__ */ new Set();
|
|
3286
|
+
resizeHandlers.set(element, elementHandlers);
|
|
3287
|
+
}
|
|
3288
|
+
elementHandlers.add(handler);
|
|
3289
|
+
observer == null ? void 0 : observer.observe(element);
|
|
3290
|
+
});
|
|
3291
|
+
return () => {
|
|
3292
|
+
elements.forEach((element) => {
|
|
3293
|
+
const elementHandlers = resizeHandlers.get(element);
|
|
3294
|
+
elementHandlers == null ? void 0 : elementHandlers.delete(handler);
|
|
3295
|
+
if (!(elementHandlers == null ? void 0 : elementHandlers.size)) {
|
|
3296
|
+
observer == null ? void 0 : observer.unobserve(element);
|
|
3297
|
+
}
|
|
3298
|
+
});
|
|
3299
|
+
};
|
|
3300
|
+
}
|
|
3301
|
+
const windowCallbacks = /* @__PURE__ */ new Set();
|
|
3302
|
+
let windowResizeHandler;
|
|
3303
|
+
function createWindowResizeHandler() {
|
|
3304
|
+
windowResizeHandler = () => {
|
|
3305
|
+
const info = {
|
|
3306
|
+
get width() {
|
|
3307
|
+
return window.innerWidth;
|
|
3308
|
+
},
|
|
3309
|
+
get height() {
|
|
3310
|
+
return window.innerHeight;
|
|
3311
|
+
}
|
|
3312
|
+
};
|
|
3313
|
+
windowCallbacks.forEach((callback) => callback(info));
|
|
3314
|
+
};
|
|
3315
|
+
window.addEventListener("resize", windowResizeHandler);
|
|
3316
|
+
}
|
|
3317
|
+
function resizeWindow(callback) {
|
|
3318
|
+
windowCallbacks.add(callback);
|
|
3319
|
+
if (!windowResizeHandler)
|
|
3320
|
+
createWindowResizeHandler();
|
|
3321
|
+
return () => {
|
|
3322
|
+
windowCallbacks.delete(callback);
|
|
3323
|
+
if (!windowCallbacks.size && typeof windowResizeHandler === "function") {
|
|
3324
|
+
window.removeEventListener("resize", windowResizeHandler);
|
|
3325
|
+
windowResizeHandler = void 0;
|
|
3326
|
+
}
|
|
3327
|
+
};
|
|
3328
|
+
}
|
|
3329
|
+
function resize(a, b) {
|
|
3330
|
+
return typeof a === "function" ? resizeWindow(a) : resizeElement(a, b);
|
|
3331
|
+
}
|
|
3147
3332
|
function observeTimeline(update, timeline) {
|
|
3148
3333
|
let prevProgress;
|
|
3149
3334
|
const onFrame = () => {
|
|
@@ -3266,9 +3451,6 @@ function recordStats() {
|
|
|
3266
3451
|
frame.postRender(record, true);
|
|
3267
3452
|
return reportStats;
|
|
3268
3453
|
}
|
|
3269
|
-
function isSVGElement$1(element) {
|
|
3270
|
-
return isObject(element) && "ownerSVGElement" in element;
|
|
3271
|
-
}
|
|
3272
3454
|
function isSVGSVGElement(element) {
|
|
3273
3455
|
return isSVGElement$1(element) && element.tagName === "svg";
|
|
3274
3456
|
}
|
|
@@ -3661,7 +3843,7 @@ function addKeyframes(sequence, keyframes2, easing, offset, startTime, endTime)
|
|
|
3661
3843
|
for (let i = 0; i < keyframes2.length; i++) {
|
|
3662
3844
|
sequence.push({
|
|
3663
3845
|
value: keyframes2[i],
|
|
3664
|
-
at: mixNumber$
|
|
3846
|
+
at: mixNumber$1(startTime, endTime, offset[i]),
|
|
3665
3847
|
easing: getEasingForSegment(easing, i)
|
|
3666
3848
|
});
|
|
3667
3849
|
}
|
|
@@ -3786,7 +3968,7 @@ function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...seq
|
|
|
3786
3968
|
for (let i = 0; i < valueSequence.length; i++) {
|
|
3787
3969
|
const { at, value, easing } = valueSequence[i];
|
|
3788
3970
|
keyframes2.push(value);
|
|
3789
|
-
valueOffset.push(/* @__PURE__ */ progress
|
|
3971
|
+
valueOffset.push(/* @__PURE__ */ progress(0, totalDuration, at));
|
|
3790
3972
|
valueEasing.push(easing || "easeOut");
|
|
3791
3973
|
}
|
|
3792
3974
|
if (valueOffset[0] !== 0) {
|
|
@@ -4146,7 +4328,7 @@ function translateAxis$1(axis, distance2) {
|
|
|
4146
4328
|
axis.max = axis.max + distance2;
|
|
4147
4329
|
}
|
|
4148
4330
|
function transformAxis(axis, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) {
|
|
4149
|
-
const originPoint = mixNumber$
|
|
4331
|
+
const originPoint = mixNumber$1(axis.min, axis.max, axisOrigin);
|
|
4150
4332
|
applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale);
|
|
4151
4333
|
}
|
|
4152
4334
|
function transformBox(box, transform2) {
|
|
@@ -4822,9 +5004,9 @@ const camelKeys = {
|
|
|
4822
5004
|
function buildSVGPath$1(attrs, length, spacing = 1, offset = 0, useDashCase = true) {
|
|
4823
5005
|
attrs.pathLength = 1;
|
|
4824
5006
|
const keys2 = useDashCase ? dashKeys : camelKeys;
|
|
4825
|
-
attrs[keys2.offset] = px
|
|
4826
|
-
const pathLength = px
|
|
4827
|
-
const pathSpacing = px
|
|
5007
|
+
attrs[keys2.offset] = px.transform(-offset);
|
|
5008
|
+
const pathLength = px.transform(length);
|
|
5009
|
+
const pathSpacing = px.transform(spacing);
|
|
4828
5010
|
attrs[keys2.array] = `${pathLength} ${pathSpacing}`;
|
|
4829
5011
|
}
|
|
4830
5012
|
function buildSVGAttrs(state, {
|
|
@@ -5105,95 +5287,6 @@ const createScopedWaapiAnimate = (scope) => {
|
|
|
5105
5287
|
return scopedAnimate;
|
|
5106
5288
|
};
|
|
5107
5289
|
const animateMini = /* @__PURE__ */ createScopedWaapiAnimate();
|
|
5108
|
-
const resizeHandlers = /* @__PURE__ */ new WeakMap();
|
|
5109
|
-
let observer;
|
|
5110
|
-
function getElementSize(target, borderBoxSize) {
|
|
5111
|
-
if (borderBoxSize) {
|
|
5112
|
-
const { inlineSize, blockSize } = borderBoxSize[0];
|
|
5113
|
-
return { width: inlineSize, height: blockSize };
|
|
5114
|
-
} else if (isSVGElement$1(target) && "getBBox" in target) {
|
|
5115
|
-
return target.getBBox();
|
|
5116
|
-
} else {
|
|
5117
|
-
return {
|
|
5118
|
-
width: target.offsetWidth,
|
|
5119
|
-
height: target.offsetHeight
|
|
5120
|
-
};
|
|
5121
|
-
}
|
|
5122
|
-
}
|
|
5123
|
-
function notifyTarget({ target, contentRect, borderBoxSize }) {
|
|
5124
|
-
var _a;
|
|
5125
|
-
(_a = resizeHandlers.get(target)) == null ? void 0 : _a.forEach((handler) => {
|
|
5126
|
-
handler({
|
|
5127
|
-
target,
|
|
5128
|
-
contentSize: contentRect,
|
|
5129
|
-
get size() {
|
|
5130
|
-
return getElementSize(target, borderBoxSize);
|
|
5131
|
-
}
|
|
5132
|
-
});
|
|
5133
|
-
});
|
|
5134
|
-
}
|
|
5135
|
-
function notifyAll(entries) {
|
|
5136
|
-
entries.forEach(notifyTarget);
|
|
5137
|
-
}
|
|
5138
|
-
function createResizeObserver() {
|
|
5139
|
-
if (typeof ResizeObserver === "undefined")
|
|
5140
|
-
return;
|
|
5141
|
-
observer = new ResizeObserver(notifyAll);
|
|
5142
|
-
}
|
|
5143
|
-
function resizeElement(target, handler) {
|
|
5144
|
-
if (!observer)
|
|
5145
|
-
createResizeObserver();
|
|
5146
|
-
const elements = resolveElements(target);
|
|
5147
|
-
elements.forEach((element) => {
|
|
5148
|
-
let elementHandlers = resizeHandlers.get(element);
|
|
5149
|
-
if (!elementHandlers) {
|
|
5150
|
-
elementHandlers = /* @__PURE__ */ new Set();
|
|
5151
|
-
resizeHandlers.set(element, elementHandlers);
|
|
5152
|
-
}
|
|
5153
|
-
elementHandlers.add(handler);
|
|
5154
|
-
observer == null ? void 0 : observer.observe(element);
|
|
5155
|
-
});
|
|
5156
|
-
return () => {
|
|
5157
|
-
elements.forEach((element) => {
|
|
5158
|
-
const elementHandlers = resizeHandlers.get(element);
|
|
5159
|
-
elementHandlers == null ? void 0 : elementHandlers.delete(handler);
|
|
5160
|
-
if (!(elementHandlers == null ? void 0 : elementHandlers.size)) {
|
|
5161
|
-
observer == null ? void 0 : observer.unobserve(element);
|
|
5162
|
-
}
|
|
5163
|
-
});
|
|
5164
|
-
};
|
|
5165
|
-
}
|
|
5166
|
-
const windowCallbacks = /* @__PURE__ */ new Set();
|
|
5167
|
-
let windowResizeHandler;
|
|
5168
|
-
function createWindowResizeHandler() {
|
|
5169
|
-
windowResizeHandler = () => {
|
|
5170
|
-
const size = {
|
|
5171
|
-
width: window.innerWidth,
|
|
5172
|
-
height: window.innerHeight
|
|
5173
|
-
};
|
|
5174
|
-
const info = {
|
|
5175
|
-
target: window,
|
|
5176
|
-
size,
|
|
5177
|
-
contentSize: size
|
|
5178
|
-
};
|
|
5179
|
-
windowCallbacks.forEach((callback) => callback(info));
|
|
5180
|
-
};
|
|
5181
|
-
window.addEventListener("resize", windowResizeHandler);
|
|
5182
|
-
}
|
|
5183
|
-
function resizeWindow(callback) {
|
|
5184
|
-
windowCallbacks.add(callback);
|
|
5185
|
-
if (!windowResizeHandler)
|
|
5186
|
-
createWindowResizeHandler();
|
|
5187
|
-
return () => {
|
|
5188
|
-
windowCallbacks.delete(callback);
|
|
5189
|
-
if (!windowCallbacks.size && windowResizeHandler) {
|
|
5190
|
-
windowResizeHandler = void 0;
|
|
5191
|
-
}
|
|
5192
|
-
};
|
|
5193
|
-
}
|
|
5194
|
-
function resize(a, b) {
|
|
5195
|
-
return typeof a === "function" ? resizeWindow(a) : resizeElement(a, b);
|
|
5196
|
-
}
|
|
5197
5290
|
const maxElapsed = 50;
|
|
5198
5291
|
const createAxisInfo = () => ({
|
|
5199
5292
|
current: 0,
|
|
@@ -5230,7 +5323,7 @@ function updateAxisInfo(element, axisName, info, time2) {
|
|
|
5230
5323
|
axis.offset.length = 0;
|
|
5231
5324
|
axis.offset[0] = 0;
|
|
5232
5325
|
axis.offset[1] = axis.scrollLength;
|
|
5233
|
-
axis.progress = /* @__PURE__ */ progress
|
|
5326
|
+
axis.progress = /* @__PURE__ */ progress(0, axis.scrollLength, axis.current);
|
|
5234
5327
|
const elapsed = time2 - prevTime;
|
|
5235
5328
|
axis.velocity = elapsed > maxElapsed ? 0 : velocityPerSecond(axis.current - prev, elapsed);
|
|
5236
5329
|
}
|
|
@@ -5366,7 +5459,7 @@ function resolveOffsets(container, info, options) {
|
|
|
5366
5459
|
info[axis].interpolate = interpolate(info[axis].offset, defaultOffset$1(offsetDefinition), { clamp: false });
|
|
5367
5460
|
info[axis].interpolatorOffsets = [...info[axis].offset];
|
|
5368
5461
|
}
|
|
5369
|
-
info[axis].progress = clamp
|
|
5462
|
+
info[axis].progress = clamp(0, 1, info[axis].interpolate(info[axis].current));
|
|
5370
5463
|
}
|
|
5371
5464
|
function measure(container, target = container, info) {
|
|
5372
5465
|
info.x.targetOffset = 0;
|
|
@@ -5391,8 +5484,8 @@ function measure(container, target = container, info) {
|
|
|
5391
5484
|
}
|
|
5392
5485
|
function createOnScrollHandler(element, onScroll, info, options = {}) {
|
|
5393
5486
|
return {
|
|
5394
|
-
measure: () =>
|
|
5395
|
-
|
|
5487
|
+
measure: (time2) => {
|
|
5488
|
+
measure(element, options.target, info);
|
|
5396
5489
|
updateScrollInfo(element, info, time2);
|
|
5397
5490
|
if (options.offset || options.target) {
|
|
5398
5491
|
resolveOffsets(element, info, options);
|
|
@@ -5418,23 +5511,17 @@ function scrollInfo(onScroll, { container = document.scrollingElement, ...option
|
|
|
5418
5511
|
containerHandlers.add(containerHandler);
|
|
5419
5512
|
if (!scrollListeners.has(container)) {
|
|
5420
5513
|
const measureAll = () => {
|
|
5421
|
-
for (const handler of containerHandlers)
|
|
5422
|
-
handler.measure();
|
|
5423
|
-
};
|
|
5424
|
-
const updateAll = () => {
|
|
5425
5514
|
for (const handler of containerHandlers) {
|
|
5426
|
-
handler.
|
|
5515
|
+
handler.measure(frameData.timestamp);
|
|
5427
5516
|
}
|
|
5517
|
+
frame.preUpdate(notifyAll2);
|
|
5428
5518
|
};
|
|
5429
5519
|
const notifyAll2 = () => {
|
|
5430
|
-
for (const handler of containerHandlers)
|
|
5520
|
+
for (const handler of containerHandlers) {
|
|
5431
5521
|
handler.notify();
|
|
5522
|
+
}
|
|
5432
5523
|
};
|
|
5433
|
-
const listener2 = () =>
|
|
5434
|
-
frame.read(measureAll);
|
|
5435
|
-
frame.read(updateAll);
|
|
5436
|
-
frame.preUpdate(notifyAll2);
|
|
5437
|
-
};
|
|
5524
|
+
const listener2 = () => frame.read(measureAll);
|
|
5438
5525
|
scrollListeners.set(container, listener2);
|
|
5439
5526
|
const target = getEventTarget(container);
|
|
5440
5527
|
window.addEventListener("resize", listener2, { passive: true });
|
|
@@ -6078,25 +6165,11 @@ function getGlobalLock(drag) {
|
|
|
6078
6165
|
function calcLength$1(axis) {
|
|
6079
6166
|
return axis.max - axis.min;
|
|
6080
6167
|
}
|
|
6081
|
-
function clamp(min, max, v) {
|
|
6082
|
-
if (v > max)
|
|
6083
|
-
return max;
|
|
6084
|
-
if (v < min)
|
|
6085
|
-
return min;
|
|
6086
|
-
return v;
|
|
6087
|
-
}
|
|
6088
|
-
function mixNumber(from, to, progress2) {
|
|
6089
|
-
return from + (to - from) * progress2;
|
|
6090
|
-
}
|
|
6091
|
-
function progress(from, to, value) {
|
|
6092
|
-
const toFromDifference = to - from;
|
|
6093
|
-
return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;
|
|
6094
|
-
}
|
|
6095
6168
|
function applyConstraints(point2, { min, max }, elastic) {
|
|
6096
6169
|
if (min !== void 0 && point2 < min) {
|
|
6097
|
-
point2 = elastic ? mixNumber(min, point2, elastic.min) : Math.max(point2, min);
|
|
6170
|
+
point2 = elastic ? mixNumber$1(min, point2, elastic.min) : Math.max(point2, min);
|
|
6098
6171
|
} else if (max !== void 0 && point2 > max) {
|
|
6099
|
-
point2 = elastic ? mixNumber(max, point2, elastic.max) : Math.min(point2, max);
|
|
6172
|
+
point2 = elastic ? mixNumber$1(max, point2, elastic.max) : Math.min(point2, max);
|
|
6100
6173
|
}
|
|
6101
6174
|
return point2;
|
|
6102
6175
|
}
|
|
@@ -6162,9 +6235,9 @@ function calcOrigin(source, target) {
|
|
|
6162
6235
|
const sourceLength = calcLength$1(source);
|
|
6163
6236
|
const targetLength = calcLength$1(target);
|
|
6164
6237
|
if (targetLength > sourceLength) {
|
|
6165
|
-
origin = progress(target.min, target.max - sourceLength, source.min);
|
|
6238
|
+
origin = /* @__PURE__ */ progress(target.min, target.max - sourceLength, source.min);
|
|
6166
6239
|
} else if (sourceLength > targetLength) {
|
|
6167
|
-
origin = progress(source.min, source.max - targetLength, target.min);
|
|
6240
|
+
origin = /* @__PURE__ */ progress(source.min, source.max - targetLength, target.min);
|
|
6168
6241
|
}
|
|
6169
6242
|
return clamp(0, 1, origin);
|
|
6170
6243
|
}
|
|
@@ -6321,15 +6394,6 @@ function createBox() {
|
|
|
6321
6394
|
function eachAxis$1(callback) {
|
|
6322
6395
|
return [callback("x"), callback("y")];
|
|
6323
6396
|
}
|
|
6324
|
-
function createUnitType(unit) {
|
|
6325
|
-
return {
|
|
6326
|
-
test: (v) => typeof v === "string" && v.endsWith(unit) && v.split(" ").length === 1,
|
|
6327
|
-
parse: parseFloat,
|
|
6328
|
-
transform: (v) => `${v}${unit}`
|
|
6329
|
-
};
|
|
6330
|
-
}
|
|
6331
|
-
const percent = /* @__PURE__ */ createUnitType("%");
|
|
6332
|
-
const px = /* @__PURE__ */ createUnitType("px");
|
|
6333
6397
|
function isWillChangeMotionValue(value) {
|
|
6334
6398
|
return Boolean(isMotionValue(value) && value.add);
|
|
6335
6399
|
}
|
|
@@ -6684,7 +6748,7 @@ class VisualElementDragControls {
|
|
|
6684
6748
|
const axisValue = this.getAxisMotionValue(axis);
|
|
6685
6749
|
if (projection && projection.layout) {
|
|
6686
6750
|
const { min, max } = projection.layout.layoutBox[axis];
|
|
6687
|
-
axisValue.set(point2[axis] - mixNumber(min, max, 0.5));
|
|
6751
|
+
axisValue.set(point2[axis] - mixNumber$1(min, max, 0.5));
|
|
6688
6752
|
}
|
|
6689
6753
|
});
|
|
6690
6754
|
}
|
|
@@ -6722,7 +6786,7 @@ class VisualElementDragControls {
|
|
|
6722
6786
|
return;
|
|
6723
6787
|
const axisValue = this.getAxisMotionValue(axis);
|
|
6724
6788
|
const { min, max } = this.constraints[axis];
|
|
6725
|
-
axisValue.set(mixNumber(min, max, boxProgress[axis]));
|
|
6789
|
+
axisValue.set(mixNumber$1(min, max, boxProgress[axis]));
|
|
6726
6790
|
});
|
|
6727
6791
|
}
|
|
6728
6792
|
addListeners() {
|
|
@@ -6841,7 +6905,7 @@ const correctBorderRadius = {
|
|
|
6841
6905
|
if (!node.target)
|
|
6842
6906
|
return latest;
|
|
6843
6907
|
if (typeof latest === "string") {
|
|
6844
|
-
if (px
|
|
6908
|
+
if (px.test(latest)) {
|
|
6845
6909
|
latest = parseFloat(latest);
|
|
6846
6910
|
} else {
|
|
6847
6911
|
return latest;
|
|
@@ -6864,7 +6928,7 @@ const correctBoxShadow = {
|
|
|
6864
6928
|
const yScale = projectionDelta.y.scale * treeScale.y;
|
|
6865
6929
|
shadow[0 + offset] /= xScale;
|
|
6866
6930
|
shadow[1 + offset] /= yScale;
|
|
6867
|
-
const averageScale = mixNumber$
|
|
6931
|
+
const averageScale = mixNumber$1(xScale, yScale, 0.5);
|
|
6868
6932
|
if (typeof shadow[2 + offset] === "number")
|
|
6869
6933
|
shadow[2 + offset] /= averageScale;
|
|
6870
6934
|
if (typeof shadow[3 + offset] === "number")
|
|
@@ -7502,13 +7566,13 @@ function resolveMotionValue(value) {
|
|
|
7502
7566
|
const borders = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"];
|
|
7503
7567
|
const numBorders = borders.length;
|
|
7504
7568
|
const asNumber = (value) => typeof value === "string" ? parseFloat(value) : value;
|
|
7505
|
-
const isPx = (value) => typeof value === "number" || px
|
|
7569
|
+
const isPx = (value) => typeof value === "number" || px.test(value);
|
|
7506
7570
|
function mixValues(target, follow, lead, progress2, shouldCrossfadeOpacity, isOnlyMember) {
|
|
7507
7571
|
if (shouldCrossfadeOpacity) {
|
|
7508
|
-
target.opacity = mixNumber$
|
|
7509
|
-
target.opacityExit = mixNumber$
|
|
7572
|
+
target.opacity = mixNumber$1(0, lead.opacity ?? 1, easeCrossfadeIn(progress2));
|
|
7573
|
+
target.opacityExit = mixNumber$1(follow.opacity ?? 1, 0, easeCrossfadeOut(progress2));
|
|
7510
7574
|
} else if (isOnlyMember) {
|
|
7511
|
-
target.opacity = mixNumber$
|
|
7575
|
+
target.opacity = mixNumber$1(follow.opacity ?? 1, lead.opacity ?? 1, progress2);
|
|
7512
7576
|
}
|
|
7513
7577
|
for (let i = 0; i < numBorders; i++) {
|
|
7514
7578
|
const borderLabel = `border${borders[i]}Radius`;
|
|
@@ -7520,8 +7584,8 @@ function mixValues(target, follow, lead, progress2, shouldCrossfadeOpacity, isOn
|
|
|
7520
7584
|
leadRadius || (leadRadius = 0);
|
|
7521
7585
|
const canMix = followRadius === 0 || leadRadius === 0 || isPx(followRadius) === isPx(leadRadius);
|
|
7522
7586
|
if (canMix) {
|
|
7523
|
-
target[borderLabel] = Math.max(mixNumber$
|
|
7524
|
-
if (percent
|
|
7587
|
+
target[borderLabel] = Math.max(mixNumber$1(asNumber(followRadius), asNumber(leadRadius), progress2), 0);
|
|
7588
|
+
if (percent.test(leadRadius) || percent.test(followRadius)) {
|
|
7525
7589
|
target[borderLabel] += "%";
|
|
7526
7590
|
}
|
|
7527
7591
|
} else {
|
|
@@ -7529,7 +7593,7 @@ function mixValues(target, follow, lead, progress2, shouldCrossfadeOpacity, isOn
|
|
|
7529
7593
|
}
|
|
7530
7594
|
}
|
|
7531
7595
|
if (follow.rotate || lead.rotate) {
|
|
7532
|
-
target.rotate = mixNumber$
|
|
7596
|
+
target.rotate = mixNumber$1(follow.rotate || 0, lead.rotate || 0, progress2);
|
|
7533
7597
|
}
|
|
7534
7598
|
}
|
|
7535
7599
|
function getRadius(values, radiusName) {
|
|
@@ -7543,7 +7607,7 @@ function compress(min, max, easing) {
|
|
|
7543
7607
|
return 0;
|
|
7544
7608
|
if (p > max)
|
|
7545
7609
|
return 1;
|
|
7546
|
-
return easing(/* @__PURE__ */ progress
|
|
7610
|
+
return easing(/* @__PURE__ */ progress(min, max, p));
|
|
7547
7611
|
};
|
|
7548
7612
|
}
|
|
7549
7613
|
function copyAxisInto(axis, originAxis) {
|
|
@@ -7574,9 +7638,9 @@ function isNear(value, target, maxDistance) {
|
|
|
7574
7638
|
}
|
|
7575
7639
|
function calcAxisDelta(delta, source, target, origin = 0.5) {
|
|
7576
7640
|
delta.origin = origin;
|
|
7577
|
-
delta.originPoint = mixNumber$
|
|
7641
|
+
delta.originPoint = mixNumber$1(source.min, source.max, delta.origin);
|
|
7578
7642
|
delta.scale = calcLength(target) / calcLength(source);
|
|
7579
|
-
delta.translate = mixNumber$
|
|
7643
|
+
delta.translate = mixNumber$1(target.min, target.max, delta.origin) - delta.originPoint;
|
|
7580
7644
|
if (delta.scale >= SCALE_MIN && delta.scale <= SCALE_MAX || isNaN(delta.scale)) {
|
|
7581
7645
|
delta.scale = 1;
|
|
7582
7646
|
}
|
|
@@ -7613,14 +7677,14 @@ function removePointDelta(point2, translate, scale2, originPoint, boxScale) {
|
|
|
7613
7677
|
return point2;
|
|
7614
7678
|
}
|
|
7615
7679
|
function removeAxisDelta(axis, translate = 0, scale2 = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) {
|
|
7616
|
-
if (percent
|
|
7680
|
+
if (percent.test(translate)) {
|
|
7617
7681
|
translate = parseFloat(translate);
|
|
7618
|
-
const relativeProgress = mixNumber$
|
|
7682
|
+
const relativeProgress = mixNumber$1(sourceAxis.min, sourceAxis.max, translate / 100);
|
|
7619
7683
|
translate = relativeProgress - sourceAxis.min;
|
|
7620
7684
|
}
|
|
7621
7685
|
if (typeof translate !== "number")
|
|
7622
7686
|
return;
|
|
7623
|
-
let originPoint = mixNumber$
|
|
7687
|
+
let originPoint = mixNumber$1(originAxis.min, originAxis.max, origin);
|
|
7624
7688
|
if (axis === originAxis)
|
|
7625
7689
|
originPoint -= translate;
|
|
7626
7690
|
axis.min = removePointDelta(axis.min, translate, scale2, originPoint, boxScale);
|
|
@@ -7944,7 +8008,6 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7944
8008
|
this.resumingFrom = this.resumeFrom;
|
|
7945
8009
|
this.resumingFrom.resumingFrom = void 0;
|
|
7946
8010
|
}
|
|
7947
|
-
this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
|
|
7948
8011
|
const animationOptions = {
|
|
7949
8012
|
...getValueTransition$1(layoutTransition, "layout"),
|
|
7950
8013
|
onPlay: onLayoutAnimationStart,
|
|
@@ -7955,6 +8018,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7955
8018
|
animationOptions.type = false;
|
|
7956
8019
|
}
|
|
7957
8020
|
this.startAnimation(animationOptions);
|
|
8021
|
+
this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
|
|
7958
8022
|
} else {
|
|
7959
8023
|
if (!hasLayoutChanged) {
|
|
7960
8024
|
finishAnimation(this);
|
|
@@ -8049,7 +8113,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
8049
8113
|
this.nodes.forEach(notifyLayoutUpdate);
|
|
8050
8114
|
this.clearAllSnapshots();
|
|
8051
8115
|
const now2 = time.now();
|
|
8052
|
-
frameData.delta = clamp
|
|
8116
|
+
frameData.delta = clamp(0, 1e3 / 60, now2 - frameData.timestamp);
|
|
8053
8117
|
frameData.timestamp = now2;
|
|
8054
8118
|
frameData.isProcessing = true;
|
|
8055
8119
|
frameSteps.update.process(frameData);
|
|
@@ -8464,8 +8528,8 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
8464
8528
|
startAnimation(options) {
|
|
8465
8529
|
var _a, _b, _c;
|
|
8466
8530
|
this.notifyListeners("animationStart");
|
|
8467
|
-
(_a = this.currentAnimation) == null ? void 0 : _a.stop(
|
|
8468
|
-
(_c = (_b = this.resumingFrom) == null ? void 0 : _b.currentAnimation) == null ? void 0 : _c.stop(
|
|
8531
|
+
(_a = this.currentAnimation) == null ? void 0 : _a.stop();
|
|
8532
|
+
(_c = (_b = this.resumingFrom) == null ? void 0 : _b.currentAnimation) == null ? void 0 : _c.stop();
|
|
8469
8533
|
if (this.pendingAnimation) {
|
|
8470
8534
|
cancelFrame(this.pendingAnimation);
|
|
8471
8535
|
this.pendingAnimation = void 0;
|
|
@@ -8476,6 +8540,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
8476
8540
|
this.motionValue || (this.motionValue = motionValue(0));
|
|
8477
8541
|
this.currentAnimation = animateSingleValue(this.motionValue, [0, 1e3], {
|
|
8478
8542
|
...options,
|
|
8543
|
+
velocity: 0,
|
|
8479
8544
|
isSync: true,
|
|
8480
8545
|
onUpdate: (latest) => {
|
|
8481
8546
|
this.mixTargetDelta(latest);
|
|
@@ -8509,7 +8574,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
8509
8574
|
finishAnimation() {
|
|
8510
8575
|
if (this.currentAnimation) {
|
|
8511
8576
|
this.mixTargetDelta && this.mixTargetDelta(animationTarget);
|
|
8512
|
-
this.currentAnimation.stop(
|
|
8577
|
+
this.currentAnimation.stop();
|
|
8513
8578
|
}
|
|
8514
8579
|
this.completeAnimation();
|
|
8515
8580
|
}
|
|
@@ -8682,7 +8747,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
8682
8747
|
resetTree() {
|
|
8683
8748
|
this.root.nodes.forEach((node) => {
|
|
8684
8749
|
var _a;
|
|
8685
|
-
return (_a = node.currentAnimation) == null ? void 0 : _a.stop(
|
|
8750
|
+
return (_a = node.currentAnimation) == null ? void 0 : _a.stop();
|
|
8686
8751
|
});
|
|
8687
8752
|
this.root.nodes.forEach(clearMeasurements);
|
|
8688
8753
|
this.root.sharedNodes.clear();
|
|
@@ -8810,14 +8875,14 @@ function removeLeadSnapshots(stack) {
|
|
|
8810
8875
|
stack.removeLeadSnapshot();
|
|
8811
8876
|
}
|
|
8812
8877
|
function mixAxisDelta(output, delta, p) {
|
|
8813
|
-
output.translate = mixNumber$
|
|
8814
|
-
output.scale = mixNumber$
|
|
8878
|
+
output.translate = mixNumber$1(delta.translate, 0, p);
|
|
8879
|
+
output.scale = mixNumber$1(delta.scale, 1, p);
|
|
8815
8880
|
output.origin = delta.origin;
|
|
8816
8881
|
output.originPoint = delta.originPoint;
|
|
8817
8882
|
}
|
|
8818
8883
|
function mixAxis(output, from, to, p) {
|
|
8819
|
-
output.min = mixNumber$
|
|
8820
|
-
output.max = mixNumber$
|
|
8884
|
+
output.min = mixNumber$1(from.min, to.min, p);
|
|
8885
|
+
output.max = mixNumber$1(from.max, to.max, p);
|
|
8821
8886
|
}
|
|
8822
8887
|
function mixBox(output, from, to, p) {
|
|
8823
8888
|
mixAxis(output.x, from.x, to.x, p);
|
|
@@ -9652,7 +9717,7 @@ function checkReorder(order2, value, offset, velocity) {
|
|
|
9652
9717
|
return order2;
|
|
9653
9718
|
const item = order2[index];
|
|
9654
9719
|
const nextLayout = nextItem.layout;
|
|
9655
|
-
const nextItemCenter = mixNumber(nextLayout.min, nextLayout.max, 0.5);
|
|
9720
|
+
const nextItemCenter = mixNumber$1(nextLayout.min, nextLayout.max, 0.5);
|
|
9656
9721
|
if (nextOffset === 1 && item.layout.max + offset > nextItemCenter || nextOffset === -1 && item.layout.min + offset < nextItemCenter) {
|
|
9657
9722
|
return moveItem(order2, index, index + nextOffset);
|
|
9658
9723
|
}
|
|
@@ -10495,7 +10560,9 @@ exports.SubscriptionManager = SubscriptionManager;
|
|
|
10495
10560
|
exports.ViewTransitionBuilder = ViewTransitionBuilder;
|
|
10496
10561
|
exports.acceleratedValues = acceleratedValues;
|
|
10497
10562
|
exports.activeAnimations = activeAnimations;
|
|
10563
|
+
exports.addAttrValue = addAttrValue;
|
|
10498
10564
|
exports.addScaleCorrector = addScaleCorrector;
|
|
10565
|
+
exports.addStyleValue = addStyleValue;
|
|
10499
10566
|
exports.addUniqueItem = addUniqueItem;
|
|
10500
10567
|
exports.alpha = alpha;
|
|
10501
10568
|
exports.analyseComplexValue = analyseComplexValue;
|
|
@@ -10507,6 +10574,7 @@ exports.animationMapKey = animationMapKey;
|
|
|
10507
10574
|
exports.anticipate = anticipate;
|
|
10508
10575
|
exports.applyPxDefaults = applyPxDefaults;
|
|
10509
10576
|
exports.attachSpring = attachSpring;
|
|
10577
|
+
exports.attrEffect = attrEffect;
|
|
10510
10578
|
exports.backIn = backIn;
|
|
10511
10579
|
exports.backInOut = backInOut;
|
|
10512
10580
|
exports.backOut = backOut;
|
|
@@ -10517,7 +10585,7 @@ exports.cancelSync = cancelSync;
|
|
|
10517
10585
|
exports.circIn = circIn;
|
|
10518
10586
|
exports.circInOut = circInOut;
|
|
10519
10587
|
exports.circOut = circOut;
|
|
10520
|
-
exports.clamp = clamp
|
|
10588
|
+
exports.clamp = clamp;
|
|
10521
10589
|
exports.collectMotionValues = collectMotionValues;
|
|
10522
10590
|
exports.color = color;
|
|
10523
10591
|
exports.complex = complex;
|
|
@@ -10605,7 +10673,7 @@ exports.mixColor = mixColor;
|
|
|
10605
10673
|
exports.mixComplex = mixComplex;
|
|
10606
10674
|
exports.mixImmediate = mixImmediate;
|
|
10607
10675
|
exports.mixLinearColor = mixLinearColor;
|
|
10608
|
-
exports.mixNumber = mixNumber$
|
|
10676
|
+
exports.mixNumber = mixNumber$1;
|
|
10609
10677
|
exports.mixObject = mixObject;
|
|
10610
10678
|
exports.mixVisibility = mixVisibility;
|
|
10611
10679
|
exports.motion = motion;
|
|
@@ -10618,19 +10686,21 @@ exports.numberValueTypes = numberValueTypes;
|
|
|
10618
10686
|
exports.observeTimeline = observeTimeline;
|
|
10619
10687
|
exports.parseCSSVariable = parseCSSVariable;
|
|
10620
10688
|
exports.parseValueFromTransform = parseValueFromTransform;
|
|
10621
|
-
exports.percent = percent
|
|
10689
|
+
exports.percent = percent;
|
|
10622
10690
|
exports.pipe = pipe;
|
|
10623
10691
|
exports.positionalKeys = positionalKeys;
|
|
10624
10692
|
exports.press = press;
|
|
10625
|
-
exports.progress = progress
|
|
10693
|
+
exports.progress = progress;
|
|
10626
10694
|
exports.progressPercentage = progressPercentage;
|
|
10695
|
+
exports.propEffect = propEffect;
|
|
10627
10696
|
exports.provideLayoutGroup = provideLayoutGroup;
|
|
10628
10697
|
exports.provideMotion = provideMotion;
|
|
10629
10698
|
exports.provideMotionConfig = provideMotionConfig;
|
|
10630
|
-
exports.px = px
|
|
10699
|
+
exports.px = px;
|
|
10631
10700
|
exports.readTransformValue = readTransformValue;
|
|
10632
10701
|
exports.recordStats = recordStats;
|
|
10633
10702
|
exports.removeItem = removeItem;
|
|
10703
|
+
exports.resize = resize;
|
|
10634
10704
|
exports.resolveElements = resolveElements;
|
|
10635
10705
|
exports.reverseEasing = reverseEasing;
|
|
10636
10706
|
exports.rgbUnit = rgbUnit;
|
|
@@ -10654,6 +10724,7 @@ exports.supportsFlags = supportsFlags;
|
|
|
10654
10724
|
exports.supportsLinearEasing = supportsLinearEasing;
|
|
10655
10725
|
exports.supportsPartialKeyframes = supportsPartialKeyframes;
|
|
10656
10726
|
exports.supportsScrollTimeline = supportsScrollTimeline;
|
|
10727
|
+
exports.svgEffect = svgEffect;
|
|
10657
10728
|
exports.sync = sync;
|
|
10658
10729
|
exports.testValueType = testValueType;
|
|
10659
10730
|
exports.time = time;
|