@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.
Files changed (185) hide show
  1. package/dist/components/Button/Button.js +19 -19
  2. package/dist/components/Button/ButtonLoader.d.ts +7 -0
  3. package/dist/components/Button/ButtonLoader.d.ts.map +1 -0
  4. package/dist/components/Button/ButtonLoader.js +40 -0
  5. package/dist/components/Chip/Chip.d.ts +43 -0
  6. package/dist/components/Chip/Chip.d.ts.map +1 -0
  7. package/dist/components/Chip/Chip.js +98 -0
  8. package/dist/components/Chip/Chip.stories.d.ts +9 -0
  9. package/dist/components/Chip/Chip.stories.d.ts.map +1 -0
  10. package/dist/components/Chip/index.d.ts +2 -0
  11. package/dist/components/Chip/index.d.ts.map +1 -0
  12. package/dist/components/DataTable/DataTable.d.ts +10 -4
  13. package/dist/components/DataTable/DataTable.d.ts.map +1 -1
  14. package/dist/components/DataTable/DataTable.js +77 -49
  15. package/dist/components/DataTable/DataTable.stories.d.ts +4 -0
  16. package/dist/components/DataTable/DataTable.stories.d.ts.map +1 -1
  17. package/dist/components/DataTable/index.d.ts +1 -1
  18. package/dist/components/DataTable/index.d.ts.map +1 -1
  19. package/dist/components/Icons/CustomIcons.js +1 -1
  20. package/dist/components/Reorderable/Reorderable.d.ts +100 -0
  21. package/dist/components/Reorderable/Reorderable.d.ts.map +1 -0
  22. package/dist/components/Reorderable/Reorderable.js +197 -0
  23. package/dist/components/Reorderable/Reorderable.stories.d.ts +14 -0
  24. package/dist/components/Reorderable/Reorderable.stories.d.ts.map +1 -0
  25. package/dist/components/Reorderable/index.d.ts +2 -0
  26. package/dist/components/Reorderable/index.d.ts.map +1 -0
  27. package/dist/components/ReorderableTable/ReorderableTable.d.ts +40 -0
  28. package/dist/components/ReorderableTable/ReorderableTable.d.ts.map +1 -0
  29. package/dist/components/ReorderableTable/ReorderableTable.js +175 -0
  30. package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts +18 -0
  31. package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts.map +1 -0
  32. package/dist/components/ReorderableTable/index.d.ts +2 -0
  33. package/dist/components/ReorderableTable/index.d.ts.map +1 -0
  34. package/dist/components/SwipeButton/SwipeButton.js +7 -7
  35. package/dist/components/index.d.ts +3 -0
  36. package/dist/components/index.d.ts.map +1 -1
  37. package/dist/index.js +196 -183
  38. package/dist/muza-ui.css +1 -1
  39. package/dist/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.js +4 -4
  40. package/dist/node_modules/framer-motion/dist/es/animation/animate/subject.js +24 -24
  41. package/dist/node_modules/framer-motion/dist/es/animation/sequence/create.js +61 -56
  42. package/dist/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.js +8 -8
  43. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +32 -30
  44. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +22 -22
  45. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +34 -32
  46. package/dist/node_modules/framer-motion/dist/es/components/Reorder/Group.js +46 -0
  47. package/dist/node_modules/framer-motion/dist/es/components/Reorder/Item.js +34 -0
  48. package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/auto-scroll.js +64 -0
  49. package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/check-reorder.js +17 -0
  50. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +2 -2
  51. package/dist/node_modules/framer-motion/dist/es/context/ReorderContext.js +5 -0
  52. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +3 -3
  53. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +100 -89
  54. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +11 -7
  55. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +4 -4
  56. package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +2 -2
  57. package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +1 -1
  58. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +106 -59
  59. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +6 -6
  60. package/dist/node_modules/framer-motion/dist/es/gestures/press.js +1 -1
  61. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +1 -1
  62. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +5 -5
  63. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +18 -6
  64. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +1 -1
  65. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +27 -42
  66. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +4 -4
  67. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +10 -7
  68. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +4 -4
  69. package/dist/node_modules/framer-motion/dist/es/motion/index.js +49 -49
  70. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +18 -13
  71. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +41 -40
  72. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +13 -13
  73. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +6 -6
  74. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +12 -12
  75. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +3 -3
  76. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +7 -7
  77. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +5 -5
  78. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +1 -1
  79. package/dist/node_modules/framer-motion/dist/es/value/use-transform.js +26 -18
  80. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +33 -30
  81. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +17 -17
  82. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +20 -19
  83. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +10 -0
  84. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/motion-value.js +13 -13
  85. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element-target.js +11 -11
  86. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +24 -20
  87. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/default-transitions.js +1 -1
  88. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +7 -3
  89. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +1 -1
  90. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/animation/mix-values.js +2 -2
  91. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-apply.js +4 -4
  92. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-calc.js +1 -1
  93. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-remove.js +6 -6
  94. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/DocumentProjectionNode.js +7 -4
  95. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/create-projection-node.js +149 -149
  96. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +60 -0
  97. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/scale-border-radius.js +1 -1
  98. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/scale-box-shadow.js +2 -2
  99. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +21 -0
  100. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/VisualElement.js +58 -50
  101. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/dom/DOMVisualElement.js +7 -6
  102. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +6 -0
  103. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +38 -0
  104. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +29 -0
  105. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +37 -0
  106. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +14 -0
  107. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +40 -0
  108. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +32 -0
  109. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +15 -0
  110. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +15 -0
  111. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/animation-state.js +31 -31
  112. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/is-controlling-variants.js +1 -1
  113. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +9 -0
  114. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/motion-values.js +6 -6
  115. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +15 -0
  116. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/setters.js +4 -4
  117. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/utils/delay.js +2 -2
  118. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +8 -6
  119. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +62 -42
  120. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +7 -0
  121. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +7 -0
  122. package/dist/node_modules/motion-utils/dist/es/array.js +15 -6
  123. package/dist/node_modules/motion-utils/dist/es/errors.js +10 -9
  124. package/dist/translations/locales/cs.d.ts.map +1 -1
  125. package/dist/translations/locales/cs.js +4 -0
  126. package/dist/translations/locales/en.d.ts.map +1 -1
  127. package/dist/translations/locales/en.js +4 -0
  128. package/dist/translations/locales/sk.d.ts.map +1 -1
  129. package/dist/translations/locales/sk.js +4 -0
  130. package/dist/translations/types.d.ts +8 -0
  131. package/dist/translations/types.d.ts.map +1 -1
  132. package/package.json +2 -2
  133. package/dist/node_modules/framer-motion/dist/es/animation/animate/single-value.js +0 -10
  134. package/dist/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.js +0 -8
  135. package/dist/node_modules/framer-motion/dist/es/projection/shared/stack.js +0 -58
  136. package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-correction.js +0 -10
  137. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.js +0 -4
  138. package/dist/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.js +0 -38
  139. package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-styles.js +0 -29
  140. package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-transform.js +0 -31
  141. package/dist/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.js +0 -12
  142. package/dist/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.js +0 -40
  143. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.js +0 -23
  144. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/path.js +0 -18
  145. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.js +0 -15
  146. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/index.js +0 -13
  147. package/dist/node_modules/framer-motion/dist/es/value/use-will-change/is.js +0 -7
  148. package/dist/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.js +0 -7
  149. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element-variant.js +0 -0
  150. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element.js +0 -0
  151. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/data-id.js +0 -0
  152. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/get-appear-id.js +0 -0
  153. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/calc-child-stagger.js +0 -0
  154. /package/dist/node_modules/{framer-motion/dist/es/animation/animators/waapi → motion-dom/dist/es/animation}/utils/get-final-keyframe.js +0 -0
  155. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/is-transition-defined.js +0 -0
  156. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/events/add-dom-event.js +0 -0
  157. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/conversion.js +0 -0
  158. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/copy.js +0 -0
  159. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/models.js +0 -0
  160. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/utils.js +0 -0
  161. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/HTMLProjectionNode.js +0 -0
  162. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/state.js +0 -0
  163. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/transform.js +0 -0
  164. /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/compare-by-depth.js +0 -0
  165. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/each-axis.js +0 -0
  166. /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/flat-tree.js +0 -0
  167. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/has-transform.js +0 -0
  168. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/measure.js +0 -0
  169. /package/dist/node_modules/{framer-motion/dist/es/motion/features → motion-dom/dist/es/render}/Feature.js +0 -0
  170. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/html/utils/render.js +0 -0
  171. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/object/ObjectVisualElement.js +0 -0
  172. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/store.js +0 -0
  173. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/camel-case-attrs.js +0 -0
  174. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/is-svg-tag.js +0 -0
  175. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/render.js +0 -0
  176. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/get-variant-context.js +0 -0
  177. /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-animation-controls.js +0 -0
  178. /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-keyframes-target.js +0 -0
  179. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/is-variant-label.js +0 -0
  180. /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/reduced-motion/state.js +0 -0
  181. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-dynamic-variants.js +0 -0
  182. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-variants.js +0 -0
  183. /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/shallow-compare.js +0 -0
  184. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/variant-props.js +0 -0
  185. /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 f, useRef as l, useInsertionEffect as h, useEffect as j } from "react";
2
- import { optimizedAppearDataAttribute as I } from "../../animation/optimized-appear/data-id.js";
3
- import { LazyContext as A } from "../../context/LazyContext.js";
4
- import { MotionConfigContext as S } from "../../context/MotionConfigContext.js";
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
- function J(o, s, n, i, u) {
11
- var y, M;
12
- const { visualElement: a } = f(L), p = f(A), e = f(R), m = f(S).reducedMotion, r = l(null);
13
- i = i || p.renderer, !r.current && i && (r.current = i(o, {
14
- visualState: s,
15
- parent: a,
16
- props: n,
17
- presenceContext: e,
18
- blockInitialAnimation: e ? e.initial === !1 : !1,
19
- reducedMotionConfig: m
20
- }));
21
- const t = r.current, x = f(b);
22
- t && !t.projection && u && (t.type === "html" || t.type === "svg") && z(r.current, n, u, x);
23
- const C = l(!1);
24
- h(() => {
25
- t && C.current && t.update(n, e);
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 c = n[I], d = l(!!c && !((y = window.MotionHandoffIsComplete) != null && y.call(window, c)) && ((M = window.MotionHasOptimisedAnimation) == null ? void 0 : M.call(window, c)));
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 && (C.current = !0, window.MotionIsMounted = !0, t.updateFeatures(), t.scheduleRenderMicrotask(), d.current && t.animationState && t.animationState.animateChanges());
30
- }), j(() => {
31
- t && (!d.current && t.animationState && t.animationState.animateChanges(), d.current && (queueMicrotask(() => {
32
- var w;
33
- (w = window.MotionHandoffMarkAsComplete) == null || w.call(window, c);
34
- }), d.current = !1), t.enteringChildren = void 0);
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 z(o, s, n, i) {
38
- const { layoutId: u, layout: a, drag: p, dragConstraints: e, layoutScroll: m, layoutRoot: r, layoutCrossfade: t } = s;
39
- o.projection = new n(o.latestValues, s["data-framer-portal-id"] ? void 0 : g(o.parent)), o.projection.setOptions({
40
- layoutId: u,
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: !!p || e && k(e),
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: i,
53
- crossfade: t,
54
- layoutScroll: m,
55
- layoutRoot: r
53
+ initialPromotionConfig: r,
54
+ crossfade: n,
55
+ layoutScroll: i,
56
+ layoutRoot: C
56
57
  });
57
58
  }
58
- function g(o) {
59
+ function x(o) {
59
60
  if (o)
60
- return o.options.allowProjection !== !1 ? o.projection : g(o.parent);
61
+ return o.options.allowProjection !== !1 ? o.projection : x(o.parent);
61
62
  }
62
63
  export {
63
- J as useVisualElement
64
+ Q as useVisualElement
64
65
  };
@@ -1,11 +1,11 @@
1
1
  import { useContext as C } from "react";
2
- import { isAnimationControls as x } from "../../animation/utils/is-animation-controls.js";
3
- import { MotionContext as S } from "../../context/MotionContext/index.js";
4
- import { PresenceContext as h } from "../../context/PresenceContext.js";
5
- import { isControllingVariants as M, isVariantNode as N } from "../../render/utils/is-controlling-variants.js";
6
- import { resolveVariantFromProps as P } from "../../render/utils/resolve-variants.js";
7
- import { useConstant as T } from "../../utils/use-constant.js";
8
- import { resolveMotionValue as $ } from "../../value/utils/resolve-motion-value.js";
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] = $(o[l]);
18
+ n[l] = M(o[l]);
19
19
  let { initial: m, animate: u } = t;
20
- const g = M(t), v = N(t);
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" && !x(a)) {
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 = P(t, l[d]);
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(S), n = C(h), o = () => b(t, i, s, n);
48
- return e ? o() : T(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 { HTMLVisualElement as o } from "../html/HTMLVisualElement.js";
3
- import { SVGVisualElement as t } from "../svg/SVGVisualElement.js";
4
- import { isSVGComponent as i } from "./utils/is-svg-component.js";
5
- const f = (e, r) => i(e) ? new t(r) : new o(r, {
6
- allowProjection: e !== m
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
- f as createDomVisualElement
9
+ G as createDomVisualElement
10
10
  };
@@ -1,16 +1,16 @@
1
- import { Fragment as c, useMemo as p, createElement as P } from "react";
2
- import { useHTMLProps as a } from "../html/use-props.js";
3
- import { useSVGProps as d } from "../svg/use-props.js";
4
- import { filterProps as V } from "./utils/filter-props.js";
5
- import { isSVGComponent as g } from "./utils/is-svg-component.js";
6
- import { isMotionValue as h } from "../../../../../motion-dom/dist/es/value/utils/is-motion-value.js";
7
- function F(r, s, o, { latestValues: t }, i, m = !1) {
8
- const n = (g(r) ? d : a)(s, t, i, r), l = V(s, typeof r == "string", m), u = r !== c ? { ...l, ...n, ref: o } : {}, { children: e } = s, f = p(() => h(e) ? e.get() : e, [e]);
9
- return P(r, {
10
- ...u,
11
- children: f
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
- F as useRender
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 "./utils/scrape-motion-values.js";
4
- const s = /* @__PURE__ */ e({
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
- s as useHTMLVisualState
9
+ m as useHTMLVisualState
10
10
  };
@@ -1,16 +1,16 @@
1
1
  import { useMemo as i } from "react";
2
- import { isForcedMotionValue as a } from "../../motion/utils/is-forced-motion-value.js";
3
- import { buildHTMLStyles as r } from "./utils/build-styles.js";
4
- import { createHtmlRenderState as l } from "./utils/create-render-state.js";
5
- import { isMotionValue as s } from "../../../../../motion-dom/dist/es/value/utils/is-motion-value.js";
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
- !s(o[e]) && !a(e, n) && (t[e] = o[e]);
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 = l();
13
- return r(n, o, t), Object.assign({}, n.vars, n.style);
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 { buildSVGAttrs as i } from "./utils/build-attrs.js";
4
- import { createSvgRenderState as a } from "./utils/create-render-state.js";
5
- import { isSVGTag as n } from "./utils/is-svg-tag.js";
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 = a();
9
- return i(t, s, n(o), e.transformTemplate, e.style), {
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 "./utils/scrape-motion-values.js";
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 m } from "../utils/use-constant.js";
2
- import { useCombineMotionValues as u } from "./use-combine-values.js";
3
- import { useComputed as i } from "./use-computed.js";
4
- import { transform as c } from "../../../../motion-dom/dist/es/utils/transform.js";
5
- function h(o, r, e, n) {
6
- if (typeof o == "function")
7
- return i(o);
8
- const t = typeof r == "function" ? r : c(r, e, n);
9
- return Array.isArray(o) ? f(o, t) : f([o], ([s]) => t(s));
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 f(o, r) {
12
- const e = m(() => []);
13
- return u(o, () => {
14
- e.length = 0;
15
- const n = o.length;
16
- for (let t = 0; t < n; t++)
17
- e[t] = o[t].get();
18
- return r(e);
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
- h as useTransform
30
+ A as useTransform
23
31
  };
@@ -1,4 +1,4 @@
1
- import { time as v } from "../frameloop/sync-time.js";
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: s = 0, type: e = "keyframes", repeat: l = 0, repeatDelay: f = 0, repeatType: d = "loop", keyframes: p, name: a, motionValue: r, element: t, ...c }) {
15
- var u;
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 m, h;
18
- this._animation && (this._animation.stop(), (m = this.stopTimeline) == null || m.call(this)), (h = this.keyframeResolver) == null || h.cancel();
19
- }, this.createdAt = v.now();
20
- const n = {
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: s,
23
- type: e,
24
- repeat: l,
25
- repeatDelay: f,
26
- repeatType: d,
27
- name: a,
28
- motionValue: r,
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
- ...c
31
- }, o = (t == null ? void 0 : t.KeyframeResolver) || R;
32
- this.keyframeResolver = new o(p, (m, h, A) => this.onKeyframesResolved(m, h, n, !A), a, r, t), (u = this.keyframeResolver) == null || u.scheduleResolve();
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, s, e, l) {
34
+ onKeyframesResolved(i, a, n, f) {
35
+ var s, l;
35
36
  this.keyframeResolver = void 0;
36
- const { name: f, type: d, velocity: p, delay: a, isHandoff: r, onUpdate: t } = e;
37
- this.resolvedAt = v.now(), w(i, f, d, p) || ((k.instantAnimations || !a) && (t == null || t(g(i, e, s))), i[0] = i[i.length - 1], K(e), e.repeat = 0);
38
- const n = {
39
- startTime: l ? this.resolvedAt ? this.resolvedAt - this.createdAt > M ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
40
- finalKeyframe: s,
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
- element: n.motionValue.owner.current
46
- }) : new y(n);
47
- o.finished.then(() => this.notifyFinished()).catch(x), this.pendingTimeline && (this.stopTimeline = o.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = o;
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, s) {
55
+ then(i, a) {
53
56
  return this.finished.finally(i).then(() => {
54
57
  });
55
58
  }
@@ -1,29 +1,29 @@
1
- import { setStyle as p } from "../render/dom/style-set.js";
2
- import { supportsScrollTimeline as u } from "../utils/supports/scroll-timeline.js";
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 y } from "./waapi/utils/apply-generator.js";
7
- import { invariant as T } from "../../../../motion-utils/dist/es/errors.js";
8
- import { millisecondsToSeconds as a, secondsToMilliseconds as g } from "../../../../motion-utils/dist/es/time-conversion.js";
9
- import { noop as S } from "../../../../motion-utils/dist/es/noop.js";
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: h = !1, finalKeyframe: l, onComplete: s } = i;
15
- this.isPseudoElement = !!n, this.allowFlatten = h, this.options = i, T(typeof i.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
16
- const m = y(i);
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, l, this.speed);
20
- this.updateMotionValue ? this.updateMotionValue(r) : p(t, e, r), this.animation.cancel();
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 = g(i);
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 && u() ? (this.animation.timeline = i, S) : t(this);
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 { JSAnimation as a } from "./JSAnimation.js";
2
- import { NativeAnimation as m } from "./NativeAnimation.js";
3
- import { replaceTransitionType as r } from "./utils/replace-transition-type.js";
4
- import { replaceStringEasing as l } from "./waapi/utils/unsupported-easing.js";
5
- import { secondsToMilliseconds as p } from "../../../../motion-utils/dist/es/time-conversion.js";
6
- const s = 10;
7
- class y extends m {
8
- constructor(e) {
9
- l(e), r(e), super(e), e.startTime && (this.startTime = e.startTime), this.options = e;
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 commited styles back out of the DOM, we can
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(e) {
20
- const { motionValue: t, onUpdate: f, onComplete: d, element: u, ...n } = this.options;
21
- if (!t)
20
+ updateMotionValue(t) {
21
+ const { motionValue: e, onUpdate: d, onComplete: h, element: T, ...n } = this.options;
22
+ if (!e)
22
23
  return;
23
- if (e !== void 0) {
24
- t.set(e);
24
+ if (t !== void 0) {
25
+ e.set(t);
25
26
  return;
26
27
  }
27
- const i = new a({
28
+ const i = new s({
28
29
  ...n,
29
30
  autoplay: !1
30
- }), o = p(this.finishedTime ?? this.time);
31
- t.setWithVelocity(i.sample(o - s).value, i.sample(o).value, s), i.stop();
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
- y as NativeAnimationExtended
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
+ };
@@ -1,15 +1,15 @@
1
- import { getFinalKeyframe as A } from "../animators/waapi/utils/get-final-keyframe.js";
2
- import { getDefaultTransition as k } from "../utils/default-transitions.js";
3
- import { isTransitionDefined as D } from "../utils/is-transition-defined.js";
4
- import { getValueTransition as g } from "../../../../../motion-dom/dist/es/animation/utils/get-value-transition.js";
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 = g(r, i) || {}, c = o.delay || r.delay || 0;
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
- D(o) || Object.assign(e, k(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);
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 = A(e.keyframes, o);
34
+ const t = C(e.keyframes, o);
35
35
  if (t !== void 0) {
36
- C.update(() => {
36
+ V.update(() => {
37
37
  e.onUpdate(t), e.onComplete();
38
38
  });
39
39
  return;
40
40
  }
41
41
  }
42
- return o.isSync ? new T(e) : new V(e);
42
+ return o.isSync ? new k(e) : new A(e);
43
43
  };
44
44
  export {
45
45
  x as animateMotionValue