@vkzstudio/muza-ui 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Button/Button.js +19 -19
- package/dist/components/Button/ButtonLoader.d.ts +7 -0
- package/dist/components/Button/ButtonLoader.d.ts.map +1 -0
- package/dist/components/Button/ButtonLoader.js +40 -0
- package/dist/components/Chip/Chip.d.ts +43 -0
- package/dist/components/Chip/Chip.d.ts.map +1 -0
- package/dist/components/Chip/Chip.js +98 -0
- package/dist/components/Chip/Chip.stories.d.ts +9 -0
- package/dist/components/Chip/Chip.stories.d.ts.map +1 -0
- package/dist/components/Chip/index.d.ts +2 -0
- package/dist/components/Chip/index.d.ts.map +1 -0
- package/dist/components/DataTable/DataTable.d.ts +10 -4
- package/dist/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.js +77 -49
- package/dist/components/DataTable/DataTable.stories.d.ts +4 -0
- package/dist/components/DataTable/DataTable.stories.d.ts.map +1 -1
- package/dist/components/DataTable/index.d.ts +1 -1
- package/dist/components/DataTable/index.d.ts.map +1 -1
- package/dist/components/Icons/CustomIcons.js +1 -1
- package/dist/components/Reorderable/Reorderable.d.ts +100 -0
- package/dist/components/Reorderable/Reorderable.d.ts.map +1 -0
- package/dist/components/Reorderable/Reorderable.js +197 -0
- package/dist/components/Reorderable/Reorderable.stories.d.ts +14 -0
- package/dist/components/Reorderable/Reorderable.stories.d.ts.map +1 -0
- package/dist/components/Reorderable/index.d.ts +2 -0
- package/dist/components/Reorderable/index.d.ts.map +1 -0
- package/dist/components/ReorderableTable/ReorderableTable.d.ts +40 -0
- package/dist/components/ReorderableTable/ReorderableTable.d.ts.map +1 -0
- package/dist/components/ReorderableTable/ReorderableTable.js +175 -0
- package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts +18 -0
- package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts.map +1 -0
- package/dist/components/ReorderableTable/index.d.ts +2 -0
- package/dist/components/ReorderableTable/index.d.ts.map +1 -0
- package/dist/components/SwipeButton/SwipeButton.js +7 -7
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.js +196 -183
- package/dist/muza-ui.css +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.js +4 -4
- package/dist/node_modules/framer-motion/dist/es/animation/animate/subject.js +24 -24
- package/dist/node_modules/framer-motion/dist/es/animation/sequence/create.js +61 -56
- package/dist/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.js +8 -8
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +32 -30
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +22 -22
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +34 -32
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/Group.js +46 -0
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/Item.js +34 -0
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/auto-scroll.js +64 -0
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/check-reorder.js +17 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +2 -2
- package/dist/node_modules/framer-motion/dist/es/context/ReorderContext.js +5 -0
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +3 -3
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +100 -89
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +11 -7
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +4 -4
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +2 -2
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +106 -59
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +6 -6
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +5 -5
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +18 -6
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +27 -42
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +4 -4
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +10 -7
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +4 -4
- package/dist/node_modules/framer-motion/dist/es/motion/index.js +49 -49
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +18 -13
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +41 -40
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +13 -13
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +6 -6
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +12 -12
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +3 -3
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +7 -7
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +5 -5
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/value/use-transform.js +26 -18
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +33 -30
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +17 -17
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +20 -19
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +10 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/motion-value.js +13 -13
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element-target.js +11 -11
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +24 -20
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/default-transitions.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +7 -3
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +1 -1
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/animation/mix-values.js +2 -2
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-apply.js +4 -4
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-calc.js +1 -1
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-remove.js +6 -6
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/DocumentProjectionNode.js +7 -4
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/create-projection-node.js +149 -149
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +60 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/scale-border-radius.js +1 -1
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/scale-box-shadow.js +2 -2
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +21 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/VisualElement.js +58 -50
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/dom/DOMVisualElement.js +7 -6
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +38 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +29 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +37 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +40 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +15 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/animation-state.js +31 -31
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/is-controlling-variants.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +9 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/motion-values.js +6 -6
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +15 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/setters.js +4 -4
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/utils/delay.js +2 -2
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +8 -6
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +62 -42
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/array.js +15 -6
- package/dist/node_modules/motion-utils/dist/es/errors.js +10 -9
- package/dist/translations/locales/cs.d.ts.map +1 -1
- package/dist/translations/locales/cs.js +4 -0
- package/dist/translations/locales/en.d.ts.map +1 -1
- package/dist/translations/locales/en.js +4 -0
- package/dist/translations/locales/sk.d.ts.map +1 -1
- package/dist/translations/locales/sk.js +4 -0
- package/dist/translations/types.d.ts +8 -0
- package/dist/translations/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/node_modules/framer-motion/dist/es/animation/animate/single-value.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/projection/shared/stack.js +0 -58
- package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-correction.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.js +0 -38
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-styles.js +0 -29
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-transform.js +0 -31
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.js +0 -12
- package/dist/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.js +0 -40
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.js +0 -23
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/path.js +0 -18
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.js +0 -15
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/index.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/value/use-will-change/is.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.js +0 -7
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element-variant.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/data-id.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/get-appear-id.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/calc-child-stagger.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/animation/animators/waapi → motion-dom/dist/es/animation}/utils/get-final-keyframe.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/is-transition-defined.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/events/add-dom-event.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/conversion.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/copy.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/models.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/utils.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/HTMLProjectionNode.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/state.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/transform.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/compare-by-depth.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/each-axis.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/flat-tree.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/has-transform.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/measure.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/motion/features → motion-dom/dist/es/render}/Feature.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/html/utils/render.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/object/ObjectVisualElement.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/store.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/camel-case-attrs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/is-svg-tag.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/render.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/get-variant-context.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-animation-controls.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-keyframes-target.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/is-variant-label.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/reduced-motion/state.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-dynamic-variants.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-variants.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/shallow-compare.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/variant-props.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/value/use-will-change → motion-dom/dist/es/value/will-change}/add-will-change.js +0 -0
|
@@ -1,45 +1,46 @@
|
|
|
1
|
-
import { useContext as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { MotionContext as L } from "../../context/MotionContext/index.js";
|
|
1
|
+
import { useContext as u, useRef as p, useInsertionEffect as A, useEffect as I } from "react";
|
|
2
|
+
import { LazyContext as S } from "../../context/LazyContext.js";
|
|
3
|
+
import { MotionConfigContext as L } from "../../context/MotionConfigContext.js";
|
|
4
|
+
import { MotionContext as O } from "../../context/MotionContext/index.js";
|
|
6
5
|
import { PresenceContext as R } from "../../context/PresenceContext.js";
|
|
7
6
|
import { SwitchLayoutGroupContext as b } from "../../context/SwitchLayoutGroupContext.js";
|
|
8
7
|
import { isRefObject as k } from "../../utils/is-ref-object.js";
|
|
9
8
|
import { useIsomorphicLayoutEffect as H } from "../../utils/use-isomorphic-effect.js";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
9
|
+
import { optimizedAppearDataAttribute as z } from "../../../../../motion-dom/dist/es/animation/optimized-appear/data-id.js";
|
|
10
|
+
function Q(o, f, e, r, s, a) {
|
|
11
|
+
var w, g;
|
|
12
|
+
const { visualElement: l } = u(O), c = u(S), i = u(R), C = u(L).reducedMotion, n = p(null), y = p(!1);
|
|
13
|
+
r = r || c.renderer, !n.current && r && (n.current = r(o, {
|
|
14
|
+
visualState: f,
|
|
15
|
+
parent: l,
|
|
16
|
+
props: e,
|
|
17
|
+
presenceContext: i,
|
|
18
|
+
blockInitialAnimation: i ? i.initial === !1 : !1,
|
|
19
|
+
reducedMotionConfig: C,
|
|
20
|
+
isSVG: a
|
|
21
|
+
}), y.current && n.current && (n.current.manuallyAnimateOnMount = !0));
|
|
22
|
+
const t = n.current, j = u(b);
|
|
23
|
+
t && !t.projection && s && (t.type === "html" || t.type === "svg") && P(n.current, e, s, j);
|
|
24
|
+
const M = p(!1);
|
|
25
|
+
A(() => {
|
|
26
|
+
t && M.current && t.update(e, i);
|
|
26
27
|
});
|
|
27
|
-
const
|
|
28
|
+
const d = e[z], m = p(!!d && !((w = window.MotionHandoffIsComplete) != null && w.call(window, d)) && ((g = window.MotionHasOptimisedAnimation) == null ? void 0 : g.call(window, d)));
|
|
28
29
|
return H(() => {
|
|
29
|
-
t && (
|
|
30
|
-
}),
|
|
31
|
-
t && (!
|
|
32
|
-
var
|
|
33
|
-
(
|
|
34
|
-
}),
|
|
30
|
+
y.current = !0, t && (M.current = !0, window.MotionIsMounted = !0, t.updateFeatures(), t.scheduleRenderMicrotask(), m.current && t.animationState && t.animationState.animateChanges());
|
|
31
|
+
}), I(() => {
|
|
32
|
+
t && (!m.current && t.animationState && t.animationState.animateChanges(), m.current && (queueMicrotask(() => {
|
|
33
|
+
var h;
|
|
34
|
+
(h = window.MotionHandoffMarkAsComplete) == null || h.call(window, d);
|
|
35
|
+
}), m.current = !1), t.enteringChildren = void 0);
|
|
35
36
|
}), t;
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
-
const { layoutId:
|
|
39
|
-
o.projection = new
|
|
40
|
-
layoutId:
|
|
38
|
+
function P(o, f, e, r) {
|
|
39
|
+
const { layoutId: s, layout: a, drag: l, dragConstraints: c, layoutScroll: i, layoutRoot: C, layoutCrossfade: n } = f;
|
|
40
|
+
o.projection = new e(o.latestValues, f["data-framer-portal-id"] ? void 0 : x(o.parent)), o.projection.setOptions({
|
|
41
|
+
layoutId: s,
|
|
41
42
|
layout: a,
|
|
42
|
-
alwaysMeasureLayout: !!
|
|
43
|
+
alwaysMeasureLayout: !!l || c && k(c),
|
|
43
44
|
visualElement: o,
|
|
44
45
|
/**
|
|
45
46
|
* TODO: Update options in an effect. This could be tricky as it'll be too late
|
|
@@ -49,16 +50,16 @@ function z(o, s, n, i) {
|
|
|
49
50
|
*
|
|
50
51
|
*/
|
|
51
52
|
animationType: typeof a == "string" ? a : "both",
|
|
52
|
-
initialPromotionConfig:
|
|
53
|
-
crossfade:
|
|
54
|
-
layoutScroll:
|
|
55
|
-
layoutRoot:
|
|
53
|
+
initialPromotionConfig: r,
|
|
54
|
+
crossfade: n,
|
|
55
|
+
layoutScroll: i,
|
|
56
|
+
layoutRoot: C
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
|
-
function
|
|
59
|
+
function x(o) {
|
|
59
60
|
if (o)
|
|
60
|
-
return o.options.allowProjection !== !1 ? o.projection :
|
|
61
|
+
return o.options.allowProjection !== !1 ? o.projection : x(o.parent);
|
|
61
62
|
}
|
|
62
63
|
export {
|
|
63
|
-
|
|
64
|
+
Q as useVisualElement
|
|
64
65
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useContext as C } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { MotionContext as x } from "../../context/MotionContext/index.js";
|
|
3
|
+
import { PresenceContext as S } from "../../context/PresenceContext.js";
|
|
4
|
+
import { useConstant as h } from "../../utils/use-constant.js";
|
|
5
|
+
import { resolveMotionValue as M } from "../../../../../motion-dom/dist/es/value/utils/resolve-motion-value.js";
|
|
6
|
+
import { isControllingVariants as N, isVariantNode as P } from "../../../../../motion-dom/dist/es/render/utils/is-controlling-variants.js";
|
|
7
|
+
import { isAnimationControls as T } from "../../../../../motion-dom/dist/es/render/utils/is-animation-controls.js";
|
|
8
|
+
import { resolveVariantFromProps as $ } from "../../../../../motion-dom/dist/es/render/utils/resolve-variants.js";
|
|
9
9
|
function b({ scrapeMotionValuesFromProps: t, createRenderState: i }, e, s, n) {
|
|
10
10
|
return {
|
|
11
11
|
latestValues: p(e, s, n, t),
|
|
@@ -15,17 +15,17 @@ function b({ scrapeMotionValuesFromProps: t, createRenderState: i }, e, s, n) {
|
|
|
15
15
|
function p(t, i, e, s) {
|
|
16
16
|
const n = {}, o = s(t, {});
|
|
17
17
|
for (const l in o)
|
|
18
|
-
n[l] =
|
|
18
|
+
n[l] = M(o[l]);
|
|
19
19
|
let { initial: m, animate: u } = t;
|
|
20
|
-
const g =
|
|
20
|
+
const g = N(t), v = P(t);
|
|
21
21
|
i && v && !g && t.inherit !== !1 && (m === void 0 && (m = i.initial), u === void 0 && (u = i.animate));
|
|
22
22
|
let c = e ? e.initial === !1 : !1;
|
|
23
23
|
c = c || m === !1;
|
|
24
24
|
const a = c ? u : m;
|
|
25
|
-
if (a && typeof a != "boolean" && !
|
|
25
|
+
if (a && typeof a != "boolean" && !T(a)) {
|
|
26
26
|
const l = Array.isArray(a) ? a : [a];
|
|
27
27
|
for (let d = 0; d < l.length; d++) {
|
|
28
|
-
const V =
|
|
28
|
+
const V = $(t, l[d]);
|
|
29
29
|
if (V) {
|
|
30
30
|
const { transitionEnd: k, transition: B, ...y } = V;
|
|
31
31
|
for (const f in y) {
|
|
@@ -44,8 +44,8 @@ function p(t, i, e, s) {
|
|
|
44
44
|
return n;
|
|
45
45
|
}
|
|
46
46
|
const z = (t) => (i, e) => {
|
|
47
|
-
const s = C(
|
|
48
|
-
return e ? o() :
|
|
47
|
+
const s = C(x), n = C(S), o = () => b(t, i, s, n);
|
|
48
|
+
return e ? o() : h(o);
|
|
49
49
|
};
|
|
50
50
|
export {
|
|
51
51
|
z as makeUseVisualState
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Fragment as m } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { SVGVisualElement as
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
6
|
-
allowProjection:
|
|
2
|
+
import { isSVGComponent as t } from "./utils/is-svg-component.js";
|
|
3
|
+
import { SVGVisualElement as o } from "../../../../../motion-dom/dist/es/render/svg/SVGVisualElement.js";
|
|
4
|
+
import { HTMLVisualElement as i } from "../../../../../motion-dom/dist/es/render/html/HTMLVisualElement.js";
|
|
5
|
+
const G = (r, e) => e.isSVG ?? t(r) ? new o(e) : new i(e, {
|
|
6
|
+
allowProjection: r !== m
|
|
7
7
|
});
|
|
8
8
|
export {
|
|
9
|
-
|
|
9
|
+
G as createDomVisualElement
|
|
10
10
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Fragment as
|
|
2
|
-
import { useHTMLProps as
|
|
3
|
-
import { useSVGProps as
|
|
4
|
-
import { filterProps as
|
|
5
|
-
import { isSVGComponent as
|
|
6
|
-
import { isMotionValue as
|
|
7
|
-
function
|
|
8
|
-
const
|
|
9
|
-
return
|
|
10
|
-
...
|
|
11
|
-
children:
|
|
1
|
+
import { Fragment as p, useMemo as P, createElement as a } from "react";
|
|
2
|
+
import { useHTMLProps as d } from "../html/use-props.js";
|
|
3
|
+
import { useSVGProps as V } from "../svg/use-props.js";
|
|
4
|
+
import { filterProps as g } from "./utils/filter-props.js";
|
|
5
|
+
import { isSVGComponent as h } from "./utils/is-svg-component.js";
|
|
6
|
+
import { isMotionValue as M } from "../../../../../motion-dom/dist/es/value/utils/is-motion-value.js";
|
|
7
|
+
function H(r, s, o, { latestValues: t }, i, m = !1, n) {
|
|
8
|
+
const l = (n ?? h(r) ? V : d)(s, t, i, r), u = g(s, typeof r == "string", m), f = r !== p ? { ...u, ...l, ref: o } : {}, { children: e } = s, c = P(() => M(e) ? e.get() : e, [e]);
|
|
9
|
+
return a(r, {
|
|
10
|
+
...f,
|
|
11
|
+
children: c
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
H as useRender
|
|
16
16
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { makeUseVisualState as e } from "../../motion/utils/use-visual-state.js";
|
|
2
2
|
import { createHtmlRenderState as t } from "./utils/create-render-state.js";
|
|
3
|
-
import { scrapeMotionValuesFromProps as r } from "
|
|
4
|
-
const
|
|
3
|
+
import { scrapeMotionValuesFromProps as r } from "../../../../../motion-dom/dist/es/render/html/utils/scrape-motion-values.js";
|
|
4
|
+
const m = /* @__PURE__ */ e({
|
|
5
5
|
scrapeMotionValuesFromProps: r,
|
|
6
6
|
createRenderState: t
|
|
7
7
|
});
|
|
8
8
|
export {
|
|
9
|
-
|
|
9
|
+
m as useHTMLVisualState
|
|
10
10
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { useMemo as i } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { createHtmlRenderState as a } from "./utils/create-render-state.js";
|
|
3
|
+
import { isMotionValue as r } from "../../../../../motion-dom/dist/es/value/utils/is-motion-value.js";
|
|
4
|
+
import { isForcedMotionValue as l } from "../../../../../motion-dom/dist/es/render/utils/is-forced-motion-value.js";
|
|
5
|
+
import { buildHTMLStyles as s } from "../../../../../motion-dom/dist/es/render/html/utils/build-styles.js";
|
|
6
6
|
function u(t, o, n) {
|
|
7
7
|
for (const e in o)
|
|
8
|
-
!
|
|
8
|
+
!r(o[e]) && !l(e, n) && (t[e] = o[e]);
|
|
9
9
|
}
|
|
10
10
|
function c({ transformTemplate: t }, o) {
|
|
11
11
|
return i(() => {
|
|
12
|
-
const n =
|
|
13
|
-
return
|
|
12
|
+
const n = a();
|
|
13
|
+
return s(n, o, t), Object.assign({}, n.vars, n.style);
|
|
14
14
|
}, [o]);
|
|
15
15
|
}
|
|
16
16
|
function f(t, o) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useMemo as m } from "react";
|
|
2
2
|
import { copyRawValuesOnly as l } from "../html/use-props.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { isSVGTag as n } from "
|
|
3
|
+
import { createSvgRenderState as i } from "./utils/create-render-state.js";
|
|
4
|
+
import { buildSVGAttrs as a } from "../../../../../motion-dom/dist/es/render/svg/utils/build-attrs.js";
|
|
5
|
+
import { isSVGTag as n } from "../../../../../motion-dom/dist/es/render/svg/utils/is-svg-tag.js";
|
|
6
6
|
function G(e, s, y, o) {
|
|
7
7
|
const r = m(() => {
|
|
8
|
-
const t =
|
|
9
|
-
return
|
|
8
|
+
const t = i();
|
|
9
|
+
return a(t, s, n(o), e.transformTemplate, e.style), {
|
|
10
10
|
...t.attrs,
|
|
11
11
|
style: { ...t.style }
|
|
12
12
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { makeUseVisualState as e } from "../../motion/utils/use-visual-state.js";
|
|
2
2
|
import { createSvgRenderState as r } from "./utils/create-render-state.js";
|
|
3
|
-
import { scrapeMotionValuesFromProps as t } from "
|
|
3
|
+
import { scrapeMotionValuesFromProps as t } from "../../../../../motion-dom/dist/es/render/svg/utils/scrape-motion-values.js";
|
|
4
4
|
const m = /* @__PURE__ */ e({
|
|
5
5
|
scrapeMotionValuesFromProps: t,
|
|
6
6
|
createRenderState: r
|
|
@@ -1,23 +1,31 @@
|
|
|
1
|
-
import { useConstant as
|
|
2
|
-
import { useCombineMotionValues as
|
|
3
|
-
import { useComputed as
|
|
4
|
-
import { transform as
|
|
5
|
-
function
|
|
6
|
-
if (typeof
|
|
7
|
-
return
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { useConstant as c } from "../utils/use-constant.js";
|
|
2
|
+
import { useCombineMotionValues as i } from "./use-combine-values.js";
|
|
3
|
+
import { useComputed as y } from "./use-computed.js";
|
|
4
|
+
import { transform as l } from "../../../../motion-dom/dist/es/utils/transform.js";
|
|
5
|
+
function A(t, r, o, e) {
|
|
6
|
+
if (typeof t == "function")
|
|
7
|
+
return y(t);
|
|
8
|
+
if (o !== void 0 && !Array.isArray(o) && typeof r != "function")
|
|
9
|
+
return d(t, r, o, e);
|
|
10
|
+
const n = typeof r == "function" ? r : l(r, o, e);
|
|
11
|
+
return Array.isArray(t) ? u(t, n) : u([t], ([m]) => n(m));
|
|
10
12
|
}
|
|
11
|
-
function
|
|
12
|
-
const
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
for (let
|
|
17
|
-
|
|
18
|
-
return r(
|
|
13
|
+
function u(t, r) {
|
|
14
|
+
const o = c(() => []);
|
|
15
|
+
return i(t, () => {
|
|
16
|
+
o.length = 0;
|
|
17
|
+
const e = t.length;
|
|
18
|
+
for (let s = 0; s < e; s++)
|
|
19
|
+
o[s] = t[s].get();
|
|
20
|
+
return r(o);
|
|
19
21
|
});
|
|
20
22
|
}
|
|
23
|
+
function d(t, r, o, e) {
|
|
24
|
+
const s = c(() => Object.keys(o)), f = c(() => ({}));
|
|
25
|
+
for (const n of s)
|
|
26
|
+
f[n] = A(t, r, o[n], e);
|
|
27
|
+
return f;
|
|
28
|
+
}
|
|
21
29
|
export {
|
|
22
|
-
|
|
30
|
+
A as useTransform
|
|
23
31
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { time as
|
|
1
|
+
import { time as A } from "../frameloop/sync-time.js";
|
|
2
2
|
import { JSAnimation as y } from "./JSAnimation.js";
|
|
3
3
|
import { getFinalKeyframe as g } from "./keyframes/get-final.js";
|
|
4
4
|
import { KeyframeResolver as R, flushKeyframeResolvers as T } from "./keyframes/KeyframesResolver.js";
|
|
@@ -11,45 +11,48 @@ import { MotionGlobalConfig as k } from "../../../../motion-utils/dist/es/global
|
|
|
11
11
|
import { noop as x } from "../../../../motion-utils/dist/es/noop.js";
|
|
12
12
|
const M = 40;
|
|
13
13
|
class I extends D {
|
|
14
|
-
constructor({ autoplay: i = !0, delay:
|
|
15
|
-
var
|
|
14
|
+
constructor({ autoplay: i = !0, delay: a = 0, type: n = "keyframes", repeat: f = 0, repeatDelay: d = 0, repeatType: c = "loop", keyframes: p, name: r, motionValue: m, element: t, ...v }) {
|
|
15
|
+
var h;
|
|
16
16
|
super(), this.stop = () => {
|
|
17
|
-
var
|
|
18
|
-
this._animation && (this._animation.stop(), (
|
|
19
|
-
}, this.createdAt =
|
|
20
|
-
const
|
|
17
|
+
var e, s;
|
|
18
|
+
this._animation && (this._animation.stop(), (e = this.stopTimeline) == null || e.call(this)), (s = this.keyframeResolver) == null || s.cancel();
|
|
19
|
+
}, this.createdAt = A.now();
|
|
20
|
+
const o = {
|
|
21
21
|
autoplay: i,
|
|
22
|
-
delay:
|
|
23
|
-
type:
|
|
24
|
-
repeat:
|
|
25
|
-
repeatDelay:
|
|
26
|
-
repeatType:
|
|
27
|
-
name:
|
|
28
|
-
motionValue:
|
|
22
|
+
delay: a,
|
|
23
|
+
type: n,
|
|
24
|
+
repeat: f,
|
|
25
|
+
repeatDelay: d,
|
|
26
|
+
repeatType: c,
|
|
27
|
+
name: r,
|
|
28
|
+
motionValue: m,
|
|
29
29
|
element: t,
|
|
30
|
-
...
|
|
31
|
-
},
|
|
32
|
-
this.keyframeResolver = new
|
|
30
|
+
...v
|
|
31
|
+
}, u = (t == null ? void 0 : t.KeyframeResolver) || R;
|
|
32
|
+
this.keyframeResolver = new u(p, (e, s, l) => this.onKeyframesResolved(e, s, o, !l), r, m, t), (h = this.keyframeResolver) == null || h.scheduleResolve();
|
|
33
33
|
}
|
|
34
|
-
onKeyframesResolved(i,
|
|
34
|
+
onKeyframesResolved(i, a, n, f) {
|
|
35
|
+
var s, l;
|
|
35
36
|
this.keyframeResolver = void 0;
|
|
36
|
-
const { name:
|
|
37
|
-
this.resolvedAt =
|
|
38
|
-
const
|
|
39
|
-
startTime:
|
|
40
|
-
finalKeyframe:
|
|
41
|
-
...e,
|
|
42
|
-
keyframes: i
|
|
43
|
-
}, o = !r && E(n) ? new _({
|
|
37
|
+
const { name: d, type: c, velocity: p, delay: r, isHandoff: m, onUpdate: t } = n;
|
|
38
|
+
this.resolvedAt = A.now(), w(i, d, c, p) || ((k.instantAnimations || !r) && (t == null || t(g(i, n, a))), i[0] = i[i.length - 1], K(n), n.repeat = 0);
|
|
39
|
+
const o = {
|
|
40
|
+
startTime: f ? this.resolvedAt ? this.resolvedAt - this.createdAt > M ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
41
|
+
finalKeyframe: a,
|
|
44
42
|
...n,
|
|
45
|
-
|
|
46
|
-
}) : new
|
|
47
|
-
|
|
43
|
+
keyframes: i
|
|
44
|
+
}, u = !m && E(o), h = (l = (s = o.motionValue) == null ? void 0 : s.owner) == null ? void 0 : l.current, e = u ? new _({
|
|
45
|
+
...o,
|
|
46
|
+
element: h
|
|
47
|
+
}) : new y(o);
|
|
48
|
+
e.finished.then(() => {
|
|
49
|
+
this.notifyFinished();
|
|
50
|
+
}).catch(x), this.pendingTimeline && (this.stopTimeline = e.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = e;
|
|
48
51
|
}
|
|
49
52
|
get finished() {
|
|
50
53
|
return this._animation ? this.animation.finished : this._finished;
|
|
51
54
|
}
|
|
52
|
-
then(i,
|
|
55
|
+
then(i, a) {
|
|
53
56
|
return this.finished.finally(i).then(() => {
|
|
54
57
|
});
|
|
55
58
|
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { setStyle as
|
|
2
|
-
import { supportsScrollTimeline as
|
|
1
|
+
import { setStyle as u } from "../render/dom/style-set.js";
|
|
2
|
+
import { supportsScrollTimeline as p } from "../utils/supports/scroll-timeline.js";
|
|
3
3
|
import { getFinalKeyframe as f } from "./keyframes/get-final.js";
|
|
4
4
|
import { WithPromise as d } from "./utils/WithPromise.js";
|
|
5
5
|
import { startWaapiAnimation as c } from "./waapi/start-waapi-animation.js";
|
|
6
|
-
import { applyGeneratorOptions as
|
|
7
|
-
import { invariant as
|
|
8
|
-
import { millisecondsToSeconds as a, secondsToMilliseconds as
|
|
9
|
-
import { noop as
|
|
6
|
+
import { applyGeneratorOptions as T } from "./waapi/utils/apply-generator.js";
|
|
7
|
+
import { invariant as y } from "../../../../motion-utils/dist/es/errors.js";
|
|
8
|
+
import { millisecondsToSeconds as a, secondsToMilliseconds as S } from "../../../../motion-utils/dist/es/time-conversion.js";
|
|
9
|
+
import { noop as g } from "../../../../motion-utils/dist/es/noop.js";
|
|
10
10
|
class x extends d {
|
|
11
11
|
constructor(i) {
|
|
12
|
-
if (super(), this.finishedTime = null, this.isStopped = !1, !i)
|
|
12
|
+
if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !i)
|
|
13
13
|
return;
|
|
14
|
-
const { element: t, name: e, keyframes: o, pseudoElement: n, allowFlatten:
|
|
15
|
-
this.isPseudoElement = !!n, this.allowFlatten =
|
|
16
|
-
const m =
|
|
14
|
+
const { element: t, name: e, keyframes: o, pseudoElement: n, allowFlatten: l = !1, finalKeyframe: h, onComplete: s } = i;
|
|
15
|
+
this.isPseudoElement = !!n, this.allowFlatten = l, this.options = i, y(typeof i.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
|
|
16
|
+
const m = T(i);
|
|
17
17
|
this.animation = c(t, e, o, m, n), m.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
18
18
|
if (this.finishedTime = this.time, !n) {
|
|
19
|
-
const r = f(o, this.options,
|
|
20
|
-
this.updateMotionValue ? this.updateMotionValue(r) :
|
|
19
|
+
const r = f(o, this.options, h, this.speed);
|
|
20
|
+
this.updateMotionValue ? this.updateMotionValue(r) : u(t, e, r), this.animation.cancel();
|
|
21
21
|
}
|
|
22
22
|
s == null || s(), this.notifyFinished();
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
play() {
|
|
26
|
-
this.isStopped || (this.animation.play(), this.state === "finished" && this.updateFinished());
|
|
26
|
+
this.isStopped || (this.manualStartTime = null, this.animation.play(), this.state === "finished" && this.updateFinished());
|
|
27
27
|
}
|
|
28
28
|
pause() {
|
|
29
29
|
this.animation.pause();
|
|
@@ -74,7 +74,7 @@ class x extends d {
|
|
|
74
74
|
return a(Number(this.animation.currentTime) || 0);
|
|
75
75
|
}
|
|
76
76
|
set time(i) {
|
|
77
|
-
this.finishedTime = null, this.animation.currentTime =
|
|
77
|
+
this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = S(i);
|
|
78
78
|
}
|
|
79
79
|
/**
|
|
80
80
|
* The playback speed of the animation.
|
|
@@ -90,17 +90,17 @@ class x extends d {
|
|
|
90
90
|
return this.finishedTime !== null ? "finished" : this.animation.playState;
|
|
91
91
|
}
|
|
92
92
|
get startTime() {
|
|
93
|
-
return Number(this.animation.startTime);
|
|
93
|
+
return this.manualStartTime ?? Number(this.animation.startTime);
|
|
94
94
|
}
|
|
95
95
|
set startTime(i) {
|
|
96
|
-
this.animation.startTime = i;
|
|
96
|
+
this.manualStartTime = this.animation.startTime = i;
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
99
|
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
|
|
100
100
|
*/
|
|
101
101
|
attachTimeline({ timeline: i, observe: t }) {
|
|
102
102
|
var e;
|
|
103
|
-
return this.allowFlatten && ((e = this.animation.effect) == null || e.updateTiming({ easing: "linear" })), this.animation.onfinish = null, i &&
|
|
103
|
+
return this.allowFlatten && ((e = this.animation.effect) == null || e.updateTiming({ easing: "linear" })), this.animation.onfinish = null, i && p() ? (this.animation.timeline = i, g) : t(this);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
export {
|
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { time as r } from "../frameloop/sync-time.js";
|
|
2
|
+
import { JSAnimation as s } from "./JSAnimation.js";
|
|
3
|
+
import { NativeAnimation as p } from "./NativeAnimation.js";
|
|
4
|
+
import { replaceTransitionType as l } from "./utils/replace-transition-type.js";
|
|
5
|
+
import { replaceStringEasing as c } from "./waapi/utils/unsupported-easing.js";
|
|
6
|
+
import { clamp as f } from "../../../../motion-utils/dist/es/clamp.js";
|
|
7
|
+
const m = 10;
|
|
8
|
+
class g extends p {
|
|
9
|
+
constructor(t) {
|
|
10
|
+
c(t), l(t), super(t), t.startTime !== void 0 && (this.startTime = t.startTime), this.options = t;
|
|
10
11
|
}
|
|
11
12
|
/**
|
|
12
13
|
* WAAPI doesn't natively have any interruption capabilities.
|
|
13
14
|
*
|
|
14
|
-
* Rather than read
|
|
15
|
+
* Rather than read committed styles back out of the DOM, we can
|
|
15
16
|
* create a renderless JS animation and sample it twice to calculate
|
|
16
17
|
* its current value, "previous" value, and therefore allow
|
|
17
18
|
* Motion to calculate velocity for any subsequent animation.
|
|
18
19
|
*/
|
|
19
|
-
updateMotionValue(
|
|
20
|
-
const { motionValue:
|
|
21
|
-
if (!
|
|
20
|
+
updateMotionValue(t) {
|
|
21
|
+
const { motionValue: e, onUpdate: d, onComplete: h, element: T, ...n } = this.options;
|
|
22
|
+
if (!e)
|
|
22
23
|
return;
|
|
23
|
-
if (
|
|
24
|
-
|
|
24
|
+
if (t !== void 0) {
|
|
25
|
+
e.set(t);
|
|
25
26
|
return;
|
|
26
27
|
}
|
|
27
|
-
const i = new
|
|
28
|
+
const i = new s({
|
|
28
29
|
...n,
|
|
29
30
|
autoplay: !1
|
|
30
|
-
}),
|
|
31
|
-
|
|
31
|
+
}), a = Math.max(m, r.now() - this.startTime), o = f(0, m, a - m);
|
|
32
|
+
e.setWithVelocity(i.sample(Math.max(0, a - o)).value, i.sample(a).value, o), i.stop();
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
export {
|
|
35
|
-
|
|
36
|
+
g as NativeAnimationExtended
|
|
36
37
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { animateMotionValue as m } from "../interfaces/motion-value.js";
|
|
2
|
+
import { motionValue as a } from "../../value/index.js";
|
|
3
|
+
import { isMotionValue as r } from "../../value/utils/is-motion-value.js";
|
|
4
|
+
function f(o, i, n) {
|
|
5
|
+
const t = r(o) ? o : a(o);
|
|
6
|
+
return t.start(m("", t, i, n)), t.animation;
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
f as animateSingleValue
|
|
10
|
+
};
|
package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/motion-value.js
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { AsyncMotionValueAnimation as A } from "../AsyncMotionValueAnimation.js";
|
|
2
|
+
import { JSAnimation as k } from "../JSAnimation.js";
|
|
3
|
+
import { getValueTransition as D } from "../utils/get-value-transition.js";
|
|
4
|
+
import { makeAnimationInstant as p } from "../utils/make-animation-instant.js";
|
|
5
|
+
import { getDefaultTransition as g } from "../utils/default-transitions.js";
|
|
6
|
+
import { getFinalKeyframe as C } from "../utils/get-final-keyframe.js";
|
|
7
|
+
import { isTransitionDefined as T } from "../utils/is-transition-defined.js";
|
|
8
|
+
import { frame as V } from "../../frameloop/frame.js";
|
|
5
9
|
import { secondsToMilliseconds as f } from "../../../../../motion-utils/dist/es/time-conversion.js";
|
|
6
|
-
import { makeAnimationInstant as p } from "../../../../../motion-dom/dist/es/animation/utils/make-animation-instant.js";
|
|
7
10
|
import { MotionGlobalConfig as d } from "../../../../../motion-utils/dist/es/global-config.js";
|
|
8
|
-
import { frame as C } from "../../../../../motion-dom/dist/es/frameloop/frame.js";
|
|
9
|
-
import { JSAnimation as T } from "../../../../../motion-dom/dist/es/animation/JSAnimation.js";
|
|
10
|
-
import { AsyncMotionValueAnimation as V } from "../../../../../motion-dom/dist/es/animation/AsyncMotionValueAnimation.js";
|
|
11
11
|
const x = (i, n, a, r = {}, y, s) => (u) => {
|
|
12
|
-
const o =
|
|
12
|
+
const o = D(r, i) || {}, c = o.delay || r.delay || 0;
|
|
13
13
|
let { elapsed: m = 0 } = r;
|
|
14
14
|
m = m - f(c);
|
|
15
15
|
const e = {
|
|
@@ -28,18 +28,18 @@ const x = (i, n, a, r = {}, y, s) => (u) => {
|
|
|
28
28
|
motionValue: n,
|
|
29
29
|
element: s ? void 0 : y
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
T(o) || Object.assign(e, g(i, e)), e.duration && (e.duration = f(e.duration)), e.repeatDelay && (e.repeatDelay = f(e.repeatDelay)), e.from !== void 0 && (e.keyframes[0] = e.from);
|
|
32
32
|
let l = !1;
|
|
33
33
|
if ((e.type === !1 || e.duration === 0 && !e.repeatDelay) && (p(e), e.delay === 0 && (l = !0)), (d.instantAnimations || d.skipAnimations) && (l = !0, p(e), e.delay = 0), e.allowFlatten = !o.type && !o.ease, l && !s && n.get() !== void 0) {
|
|
34
|
-
const t =
|
|
34
|
+
const t = C(e.keyframes, o);
|
|
35
35
|
if (t !== void 0) {
|
|
36
|
-
|
|
36
|
+
V.update(() => {
|
|
37
37
|
e.onUpdate(t), e.onComplete();
|
|
38
38
|
});
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
return o.isSync ? new
|
|
42
|
+
return o.isSync ? new k(e) : new A(e);
|
|
43
43
|
};
|
|
44
44
|
export {
|
|
45
45
|
x as animateMotionValue
|