@vkzstudio/muza-ui 1.0.8 → 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 (143) 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/Icons/CustomIcons.js +1 -1
  6. package/dist/components/ReorderableTable/ReorderableTable.js +1 -1
  7. package/dist/components/SwipeButton/SwipeButton.js +1 -1
  8. package/dist/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.js +4 -4
  9. package/dist/node_modules/framer-motion/dist/es/animation/animate/subject.js +24 -24
  10. package/dist/node_modules/framer-motion/dist/es/animation/sequence/create.js +61 -56
  11. package/dist/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.js +8 -8
  12. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +32 -30
  13. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +22 -22
  14. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +34 -32
  15. package/dist/node_modules/framer-motion/dist/es/components/Reorder/Group.js +34 -26
  16. package/dist/node_modules/framer-motion/dist/es/components/Reorder/Item.js +30 -25
  17. package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/auto-scroll.js +64 -0
  18. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +2 -2
  19. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +3 -3
  20. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +100 -89
  21. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +11 -7
  22. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +4 -4
  23. package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +2 -2
  24. package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +1 -1
  25. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +106 -59
  26. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +6 -6
  27. package/dist/node_modules/framer-motion/dist/es/gestures/press.js +1 -1
  28. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +1 -1
  29. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +5 -5
  30. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +18 -6
  31. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +1 -1
  32. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +27 -42
  33. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +4 -4
  34. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +10 -7
  35. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +4 -4
  36. package/dist/node_modules/framer-motion/dist/es/motion/index.js +49 -49
  37. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +18 -13
  38. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +41 -40
  39. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +13 -13
  40. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +6 -6
  41. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +12 -12
  42. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +3 -3
  43. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +7 -7
  44. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +5 -5
  45. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +1 -1
  46. package/dist/node_modules/framer-motion/dist/es/value/use-transform.js +26 -18
  47. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +33 -30
  48. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +17 -17
  49. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +20 -19
  50. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +10 -0
  51. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/motion-value.js +13 -13
  52. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element-target.js +11 -11
  53. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +24 -20
  54. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/default-transitions.js +1 -1
  55. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +7 -3
  56. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +1 -1
  57. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/animation/mix-values.js +2 -2
  58. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-apply.js +4 -4
  59. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-calc.js +1 -1
  60. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-remove.js +6 -6
  61. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/DocumentProjectionNode.js +7 -4
  62. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/create-projection-node.js +149 -149
  63. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +60 -0
  64. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/scale-border-radius.js +1 -1
  65. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/scale-box-shadow.js +2 -2
  66. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +21 -0
  67. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/VisualElement.js +58 -50
  68. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/dom/DOMVisualElement.js +7 -6
  69. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +6 -0
  70. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +38 -0
  71. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +29 -0
  72. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +37 -0
  73. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +14 -0
  74. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +40 -0
  75. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +32 -0
  76. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +15 -0
  77. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +15 -0
  78. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/animation-state.js +31 -31
  79. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/is-controlling-variants.js +1 -1
  80. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +9 -0
  81. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/motion-values.js +6 -6
  82. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +15 -0
  83. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/setters.js +4 -4
  84. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/utils/delay.js +2 -2
  85. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +8 -6
  86. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +62 -42
  87. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +7 -0
  88. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +7 -0
  89. package/dist/node_modules/motion-utils/dist/es/errors.js +10 -9
  90. package/package.json +1 -1
  91. package/dist/node_modules/framer-motion/dist/es/animation/animate/single-value.js +0 -10
  92. package/dist/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.js +0 -8
  93. package/dist/node_modules/framer-motion/dist/es/projection/shared/stack.js +0 -58
  94. package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-correction.js +0 -10
  95. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.js +0 -4
  96. package/dist/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.js +0 -38
  97. package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-styles.js +0 -29
  98. package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-transform.js +0 -31
  99. package/dist/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.js +0 -12
  100. package/dist/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.js +0 -40
  101. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.js +0 -23
  102. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/path.js +0 -18
  103. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.js +0 -15
  104. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/index.js +0 -13
  105. package/dist/node_modules/framer-motion/dist/es/value/use-will-change/is.js +0 -7
  106. package/dist/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.js +0 -7
  107. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element-variant.js +0 -0
  108. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element.js +0 -0
  109. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/data-id.js +0 -0
  110. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/get-appear-id.js +0 -0
  111. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/calc-child-stagger.js +0 -0
  112. /package/dist/node_modules/{framer-motion/dist/es/animation/animators/waapi → motion-dom/dist/es/animation}/utils/get-final-keyframe.js +0 -0
  113. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/is-transition-defined.js +0 -0
  114. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/events/add-dom-event.js +0 -0
  115. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/conversion.js +0 -0
  116. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/copy.js +0 -0
  117. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/models.js +0 -0
  118. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/utils.js +0 -0
  119. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/HTMLProjectionNode.js +0 -0
  120. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/state.js +0 -0
  121. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/transform.js +0 -0
  122. /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/compare-by-depth.js +0 -0
  123. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/each-axis.js +0 -0
  124. /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/flat-tree.js +0 -0
  125. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/has-transform.js +0 -0
  126. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/measure.js +0 -0
  127. /package/dist/node_modules/{framer-motion/dist/es/motion/features → motion-dom/dist/es/render}/Feature.js +0 -0
  128. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/html/utils/render.js +0 -0
  129. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/object/ObjectVisualElement.js +0 -0
  130. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/store.js +0 -0
  131. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/camel-case-attrs.js +0 -0
  132. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/is-svg-tag.js +0 -0
  133. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/render.js +0 -0
  134. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/get-variant-context.js +0 -0
  135. /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-animation-controls.js +0 -0
  136. /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-keyframes-target.js +0 -0
  137. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/is-variant-label.js +0 -0
  138. /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/reduced-motion/state.js +0 -0
  139. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-dynamic-variants.js +0 -0
  140. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-variants.js +0 -0
  141. /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/shallow-compare.js +0 -0
  142. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/variant-props.js +0 -0
  143. /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,33 +1,33 @@
1
- import { jsxs as d, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as d, jsx as s } from "react/jsx-runtime";
2
2
  import * as x from "react";
3
3
  import "class-variance-authority";
4
- import { buttonVariants as b } from "./buttonVariants.js";
5
- import { Loader as N } from "../Loader/Loader.js";
6
- import { Typography as h } from "../Typography/Typography.js";
4
+ import { ButtonLoader as b } from "./ButtonLoader.js";
5
+ import { buttonVariants as N } from "./buttonVariants.js";
6
+ import { Typography as B } from "../Typography/Typography.js";
7
7
  import { cn as n } from "../../utils/cn.js";
8
- const j = x.forwardRef(
8
+ const h = x.forwardRef(
9
9
  ({
10
10
  className: f,
11
11
  variant: i,
12
12
  size: t,
13
13
  fullWidth: c,
14
- asChild: l = !1,
14
+ asChild: u = !1,
15
15
  icon: r,
16
16
  iconPosition: m = "start",
17
17
  ghost: e = !1,
18
18
  danger: p = !1,
19
19
  loading: a = !1,
20
- children: s,
21
- ...u
20
+ children: o,
21
+ ...l
22
22
  }, y) => /* @__PURE__ */ d(
23
- l ? "span" : "button",
23
+ u ? "span" : "button",
24
24
  {
25
25
  className: n(
26
- b({
26
+ N({
27
27
  variant: i,
28
28
  size: t,
29
29
  fullWidth: c,
30
- iconOnly: !s,
30
+ iconOnly: !o,
31
31
  ghost: e,
32
32
  danger: p,
33
33
  loading: a,
@@ -37,12 +37,12 @@ const j = x.forwardRef(
37
37
  ref: y,
38
38
  "data-ghost": e,
39
39
  "data-danger": p,
40
- ...u,
40
+ ...l,
41
41
  children: [
42
- a && /* @__PURE__ */ o("span", { className: "absolute", children: /* @__PURE__ */ o(N, {}) }),
42
+ a && /* @__PURE__ */ s("span", { className: "absolute", children: /* @__PURE__ */ s(b, {}) }),
43
43
  m === "start" && r,
44
- s && /* @__PURE__ */ o(
45
- h,
44
+ o && /* @__PURE__ */ s(
45
+ B,
46
46
  {
47
47
  variant: "cta",
48
48
  size: t == "sm" || t == "xs" ? "sm" : "base",
@@ -52,7 +52,7 @@ const j = x.forwardRef(
52
52
  className: n("transition-opacity", {
53
53
  "opacity-0": a
54
54
  }),
55
- children: s
55
+ children: o
56
56
  }
57
57
  ),
58
58
  m === "end" && r
@@ -60,8 +60,8 @@ const j = x.forwardRef(
60
60
  }
61
61
  )
62
62
  );
63
- j.displayName = "Button";
63
+ h.displayName = "Button";
64
64
  export {
65
- j as Button,
66
- b as buttonVariants
65
+ h as Button,
66
+ N as buttonVariants
67
67
  };
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ export interface ButtonLoaderProps {
3
+ className?: string;
4
+ }
5
+ declare const ButtonLoader: React.ForwardRefExoticComponent<ButtonLoaderProps & React.RefAttributes<SVGSVGElement>>;
6
+ export { ButtonLoader };
7
+ //# sourceMappingURL=ButtonLoader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonLoader.d.ts","sourceRoot":"","sources":["../../../src/components/Button/ButtonLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,YAAY,yFA2BjB,CAAA;AAGD,OAAO,EAAE,YAAY,EAAE,CAAA"}
@@ -0,0 +1,40 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import * as o from "react";
3
+ import { cn as a } from "../../utils/cn.js";
4
+ const i = o.forwardRef(
5
+ ({ className: r }, e) => /* @__PURE__ */ t(
6
+ "svg",
7
+ {
8
+ ref: e,
9
+ xmlns: "http://www.w3.org/2000/svg",
10
+ width: "24",
11
+ height: "24",
12
+ viewBox: "0 0 24 24",
13
+ fill: "none",
14
+ className: a(r),
15
+ children: /* @__PURE__ */ t(
16
+ "path",
17
+ {
18
+ d: "M2 12C2 6.47715 6.47715 2 12 2C12.5523 2 13 2.44772 13 3C13 3.55228 12.5523 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 11.4477 20.4477 11 21 11C21.5523 11 22 11.4477 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12Z",
19
+ fill: "currentColor",
20
+ children: /* @__PURE__ */ t(
21
+ "animateTransform",
22
+ {
23
+ attributeType: "xml",
24
+ attributeName: "transform",
25
+ type: "rotate",
26
+ from: "-10 12 12",
27
+ to: "360 12 12",
28
+ dur: "0.75s",
29
+ repeatCount: "indefinite"
30
+ }
31
+ )
32
+ }
33
+ )
34
+ }
35
+ )
36
+ );
37
+ i.displayName = "ButtonLoader";
38
+ export {
39
+ i as ButtonLoader
40
+ };
@@ -423,7 +423,7 @@ const _ = r(
423
423
  (L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
424
424
  "path",
425
425
  {
426
- d: "M21 12C21.5523 12 22.0052 12.4488 21.95 12.9984C21.7738 14.7549 21.1348 16.44 20.0902 17.8779C18.8489 19.5863 17.0986 20.858 15.0902 21.5106C13.0817 22.1631 10.9183 22.1631 8.90983 21.5106C6.9014 20.858 5.15111 19.5863 3.90983 17.8779C2.66855 16.1694 2 14.1118 2 12C2 9.88821 2.66855 7.83062 3.90983 6.12215C5.15111 4.41367 6.9014 3.14201 8.90983 2.48943C10.6001 1.94023 12.4002 1.85323 14.1252 2.22843C14.6649 2.34581 14.9518 2.91524 14.7812 3.44049C14.6105 3.96575 14.0467 4.24653 13.5042 4.14268C12.1843 3.88999 10.8162 3.97294 9.52786 4.39155C7.92112 4.91361 6.52089 5.93094 5.52786 7.29772C4.53484 8.6645 4 10.3106 4 12C4 13.6894 4.53484 15.3355 5.52786 16.7023C6.52089 18.0691 7.92112 19.0864 9.52786 19.6085C11.1346 20.1305 12.8654 20.1305 14.4721 19.6085C16.0789 19.0864 17.4791 18.0691 18.4721 16.7023C19.2684 15.6064 19.77 14.3309 19.9376 12.9974C20.0064 12.4495 20.4477 12 21 12Z",
426
+ d: "M2 12C2 6.47715 6.47715 2 12 2C12.5523 2 13 2.44772 13 3C13 3.55228 12.5523 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 11.4477 20.4477 11 21 11C21.5523 11 22 11.4477 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12Z",
427
427
  fill: "currentColor"
428
428
  }
429
429
  ) })
@@ -1,10 +1,10 @@
1
1
  import { jsx as e, jsxs as m } from "react/jsx-runtime";
2
2
  import { forwardRef as I } from "react";
3
3
  import { typographyVariants as T, Typography as w } from "../Typography/Typography.js";
4
+ import { motion as n } from "../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
4
5
  import { ReorderableGroup as A, ReorderableItem as C, ReorderableHandle as H } from "../Reorderable/Reorderable.js";
5
6
  import { Reorder as O } from "../Icons/CustomIcons.js";
6
7
  import { cn as s } from "../../utils/cn.js";
7
- import { motion as n } from "../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
8
8
  const p = 72, u = 20, k = 24, E = 4, D = ({
9
9
  data: b,
10
10
  onReorder: N,
@@ -9,11 +9,11 @@ import { useMotionValue as J } from "../../node_modules/framer-motion/dist/es/va
9
9
  import { useTransform as T } from "../../node_modules/framer-motion/dist/es/value/use-transform.js";
10
10
  import { useMotionValueEvent as Q } from "../../node_modules/framer-motion/dist/es/utils/use-motion-value-event.js";
11
11
  import { animate as u } from "../../node_modules/framer-motion/dist/es/animation/animate/index.js";
12
+ import { motion as E } from "../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
12
13
  import { Typography as V } from "../Typography/Typography.js";
13
14
  import { DoubleArrowRight as X } from "../Icons/CustomIcons.js";
14
15
  import { useDragControls as Z } from "../../node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.js";
15
16
  import { cn as y } from "../../utils/cn.js";
16
- import { motion as E } from "../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
17
17
  import { UnreadOutline as ee } from "@solar-icons/react-perf";
18
18
  const ve = ({
19
19
  text: z,
@@ -1,7 +1,7 @@
1
- import { isDOMKeyframes as f } from "../utils/is-dom-keyframes.js";
2
- import { resolveElements as n } from "../../../../../motion-dom/dist/es/utils/resolve-elements.js";
3
- function s(r, e, o, i) {
4
- return typeof r == "string" && f(e) ? n(r, o, i) : r instanceof NodeList ? Array.from(r) : Array.isArray(r) ? r : [r];
1
+ import { isDOMKeyframes as o } from "../utils/is-dom-keyframes.js";
2
+ import { resolveElements as l } from "../../../../../motion-dom/dist/es/utils/resolve-elements.js";
3
+ function s(r, e, i, n) {
4
+ return r == null ? [] : typeof r == "string" && o(e) ? l(r, i, n) : r instanceof NodeList ? Array.from(r) : Array.isArray(r) ? r.filter((f) => f != null) : [r];
5
5
  }
6
6
  export {
7
7
  s as resolveSubjects
@@ -1,31 +1,31 @@
1
- import { visualElementStore as u } from "../../render/store.js";
2
- import { animateTarget as g } from "../interfaces/visual-element-target.js";
3
- import { createDOMVisualElement as h, createObjectVisualElement as v } from "../utils/create-visual-element.js";
4
- import { isDOMKeyframes as c } from "../utils/is-dom-keyframes.js";
5
- import { resolveSubjects as E } from "./resolve-subjects.js";
6
- import { animateSingleValue as S } from "./single-value.js";
7
- import { isMotionValue as y } from "../../../../../motion-dom/dist/es/value/utils/is-motion-value.js";
8
- import { invariant as s } from "../../../../../motion-utils/dist/es/errors.js";
9
- function V(t, e) {
10
- return y(t) || typeof t == "number" || typeof t == "string" && !c(e);
1
+ import { createDOMVisualElement as d, createObjectVisualElement as v } from "../utils/create-visual-element.js";
2
+ import { isDOMKeyframes as f } from "../utils/is-dom-keyframes.js";
3
+ import { resolveSubjects as S } from "./resolve-subjects.js";
4
+ import { animateSingleValue as g } from "../../../../../motion-dom/dist/es/animation/animate/single-value.js";
5
+ import { visualElementStore as u } from "../../../../../motion-dom/dist/es/render/store.js";
6
+ import { animateTarget as E } from "../../../../../motion-dom/dist/es/animation/interfaces/visual-element-target.js";
7
+ import { isMotionValue as V } from "../../../../../motion-dom/dist/es/value/utils/is-motion-value.js";
8
+ import { invariant as h } from "../../../../../motion-utils/dist/es/errors.js";
9
+ function M(e, t) {
10
+ return V(e) || typeof e == "number" || typeof e == "string" && !f(t);
11
11
  }
12
- function N(t, e, n, f) {
13
- const l = [];
14
- if (V(t, e))
15
- l.push(S(t, c(e) && e.default || e, n && (n.default || n)));
12
+ function N(e, t, n, s) {
13
+ const o = [];
14
+ if (M(e, t))
15
+ o.push(g(e, f(t) && t.default || t, n && (n.default || n)));
16
16
  else {
17
- const m = E(t, e, f), a = m.length;
18
- s(!!a, "No valid elements provided.", "no-valid-elements");
19
- for (let r = 0; r < a; r++) {
20
- const i = m[r];
21
- s(i !== null, "You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.", "animate-null");
22
- const d = i instanceof Element ? h : v;
23
- u.has(i) || d(i);
24
- const p = u.get(i), o = { ...n };
25
- "delay" in o && typeof o.delay == "function" && (o.delay = o.delay(r, a)), l.push(...g(p, { ...e, transition: o }, {}));
17
+ if (e == null)
18
+ return o;
19
+ const m = S(e, t, s), a = m.length;
20
+ h(!!a, "No valid elements provided.", "no-valid-elements");
21
+ for (let l = 0; l < a; l++) {
22
+ const r = m[l], c = r instanceof Element ? d : v;
23
+ u.has(r) || c(r);
24
+ const p = u.get(r), i = { ...n };
25
+ "delay" in i && typeof i.delay == "function" && (i.delay = i.delay(l, a)), o.push(...E(p, { ...t, transition: i }, {}));
26
26
  }
27
27
  }
28
- return l;
28
+ return o;
29
29
  }
30
30
  export {
31
31
  N as animateSubject
@@ -13,111 +13,116 @@ import { isGenerator as oe } from "../../../../../motion-dom/dist/es/animation/g
13
13
  import { secondsToMilliseconds as re } from "../../../../../motion-utils/dist/es/time-conversion.js";
14
14
  import { invariant as se } from "../../../../../motion-utils/dist/es/errors.js";
15
15
  import { progress as ie } from "../../../../../motion-utils/dist/es/progress.js";
16
- const ae = "easeInOut", fe = 20;
17
- function Ke(e, { defaultTransition: n = {}, ...C } = {}, P, k) {
18
- const X = n.duration || 0.3, M = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map(), _ = {}, v = /* @__PURE__ */ new Map();
19
- let K = 0, p = 0, x = 0;
16
+ const ae = "easeInOut", ce = 20;
17
+ function Ke(e, { defaultTransition: n = {}, ...B } = {}, C, O) {
18
+ const P = n.duration || 0.3, M = /* @__PURE__ */ new Map(), K = /* @__PURE__ */ new Map(), X = {}, v = /* @__PURE__ */ new Map();
19
+ let I = 0, l = 0, x = 0;
20
20
  for (let g = 0; g < e.length; g++) {
21
21
  const s = e[g];
22
22
  if (typeof s == "string") {
23
- v.set(s, p);
23
+ v.set(s, l);
24
24
  continue;
25
25
  } else if (!Array.isArray(s)) {
26
- v.set(s.name, F(p, s.at, K, v));
26
+ v.set(s.name, F(l, s.at, I, v));
27
27
  continue;
28
28
  }
29
- let [h, i, o = {}] = s;
30
- o.at !== void 0 && (p = F(p, o.at, K, v));
29
+ let [p, i, o = {}] = s;
30
+ o.at !== void 0 && (l = F(l, o.at, I, v));
31
31
  let r = 0;
32
- const y = (a, f, m, d = 0, b = 0) => {
33
- const t = ce(a), { delay: I = 0, times: c = $(t), type: V = "keyframes", repeat: A, repeatType: pe, repeatDelay: he = 0, ...H } = f;
34
- let { ease: l = n.ease || "easeOut", duration: u } = f;
35
- const w = typeof I == "function" ? I(d, b) : I, G = t.length, L = oe(V) ? V : k == null ? void 0 : k[V || "keyframes"];
32
+ const y = (a, d, m, h = 0, b = 0) => {
33
+ const t = fe(a), { delay: A = 0, times: c = $(t), type: V = n.type || "keyframes", repeat: S, repeatType: pe, repeatDelay: he = 0, ...H } = d;
34
+ let { ease: u = n.ease || "easeOut", duration: f } = d;
35
+ const w = typeof A == "function" ? A(h, b) : A, G = t.length, L = oe(V) ? V : O == null ? void 0 : O[V || "keyframes"];
36
36
  if (G <= 2 && L) {
37
- let S = 100;
37
+ let T = 100;
38
38
  if (G === 2 && le(t)) {
39
- const T = t[1] - t[0];
40
- S = Math.abs(T);
39
+ const D = t[1] - t[0];
40
+ T = Math.abs(D);
41
41
  }
42
- const D = { ...H };
43
- u !== void 0 && (D.duration = re(u));
44
- const j = ee(D, S, L);
45
- l = j.ease, u = j.duration;
42
+ const j = {
43
+ ...n,
44
+ ...H
45
+ };
46
+ f !== void 0 && (j.duration = re(f));
47
+ const k = ee(j, T, L);
48
+ u = k.ease, f = k.duration;
46
49
  }
47
- u ?? (u = X);
48
- const N = p + w;
50
+ f ?? (f = P);
51
+ const N = l + w;
49
52
  c.length === 1 && c[0] === 0 && (c[1] = 1);
50
53
  const R = c.length - t.length;
51
- if (R > 0 && te(c, R), t.length === 1 && t.unshift(null), A) {
52
- se(A < fe, "Repeat count too high, must be less than 20", "repeat-count-high"), u = Q(u, A);
53
- const S = [...t], D = [...c];
54
- l = Array.isArray(l) ? [...l] : [l];
55
- const j = [...l];
56
- for (let T = 0; T < A; T++) {
57
- t.push(...S);
58
- for (let E = 0; E < S.length; E++)
59
- c.push(D[E] + (T + 1)), l.push(E === 0 ? "linear" : ne(j, E - 1));
54
+ if (R > 0 && te(c, R), t.length === 1 && t.unshift(null), S) {
55
+ se(S < ce, "Repeat count too high, must be less than 20", "repeat-count-high"), f = Q(f, S);
56
+ const T = [...t], j = [...c];
57
+ u = Array.isArray(u) ? [...u] : [u];
58
+ const k = [...u];
59
+ for (let D = 0; D < S; D++) {
60
+ t.push(...T);
61
+ for (let E = 0; E < T.length; E++)
62
+ c.push(j[E] + (D + 1)), u.push(E === 0 ? "linear" : ne(k, E - 1));
60
63
  }
61
- W(c, A);
64
+ W(c, S);
62
65
  }
63
- const q = N + u;
64
- U(m, t, l, c, N, q), r = Math.max(w + u, r), x = Math.max(q, x);
66
+ const q = N + f;
67
+ U(m, t, u, c, N, q), r = Math.max(w + f, r), x = Math.max(q, x);
65
68
  };
66
- if (Z(h)) {
67
- const a = z(h, O);
68
- y(i, o, B("default", a));
69
+ if (Z(p)) {
70
+ const a = _(p, K);
71
+ y(i, o, z("default", a));
69
72
  } else {
70
- const a = J(h, i, P, _), f = a.length;
71
- for (let m = 0; m < f; m++) {
73
+ const a = J(p, i, C, X), d = a.length;
74
+ for (let m = 0; m < d; m++) {
72
75
  i = i, o = o;
73
- const d = a[m], b = z(d, O);
76
+ const h = a[m], b = _(h, K);
74
77
  for (const t in i)
75
- y(i[t], ue(o, t), B(t, b), m, f);
78
+ y(i[t], me(o, t), z(t, b), m, d);
76
79
  }
77
80
  }
78
- K = p, p += r;
81
+ I = l, l += r;
79
82
  }
80
- return O.forEach((g, s) => {
81
- for (const h in g) {
82
- const i = g[h];
83
+ return K.forEach((g, s) => {
84
+ for (const p in g) {
85
+ const i = g[p];
83
86
  i.sort(Y);
84
87
  const o = [], r = [], y = [];
85
- for (let f = 0; f < i.length; f++) {
86
- const { at: m, value: d, easing: b } = i[f];
87
- o.push(d), r.push(ie(0, x, m)), y.push(b || "easeOut");
88
+ for (let h = 0; h < i.length; h++) {
89
+ const { at: b, value: t, easing: A } = i[h];
90
+ o.push(t), r.push(ie(0, x, b)), y.push(A || "easeOut");
88
91
  }
89
92
  r[0] !== 0 && (r.unshift(0), o.unshift(o[0]), y.unshift(ae)), r[r.length - 1] !== 1 && (r.push(1), o.push(null)), M.has(s) || M.set(s, {
90
93
  keyframes: {},
91
94
  transition: {}
92
95
  });
93
96
  const a = M.get(s);
94
- a.keyframes[h] = o, a.transition[h] = {
95
- ...n,
97
+ a.keyframes[p] = o;
98
+ const { type: d, ...m } = n;
99
+ a.transition[p] = {
100
+ ...m,
96
101
  duration: x,
97
102
  ease: y,
98
103
  times: r,
99
- ...C
104
+ ...B
100
105
  };
101
106
  }
102
107
  }), M;
103
108
  }
104
- function z(e, n) {
109
+ function _(e, n) {
105
110
  return !n.has(e) && n.set(e, {}), n.get(e);
106
111
  }
107
- function B(e, n) {
112
+ function z(e, n) {
108
113
  return n[e] || (n[e] = []), n[e];
109
114
  }
110
- function ce(e) {
115
+ function fe(e) {
111
116
  return Array.isArray(e) ? e : [e];
112
117
  }
113
- function ue(e, n) {
118
+ function me(e, n) {
114
119
  return e && e[n] ? {
115
120
  ...e,
116
121
  ...e[n]
117
122
  } : { ...e };
118
123
  }
119
- const me = (e) => typeof e == "number", le = (e) => e.every(me);
124
+ const ue = (e) => typeof e == "number", le = (e) => e.every(ue);
120
125
  export {
121
126
  Ke as createAnimationsFromSequence,
122
- ue as getValueTransition
127
+ me as getValueTransition
123
128
  };
@@ -1,9 +1,9 @@
1
- import { HTMLVisualElement as r } from "../../render/html/HTMLVisualElement.js";
2
- import { ObjectVisualElement as s } from "../../render/object/ObjectVisualElement.js";
3
- import { visualElementStore as n } from "../../render/store.js";
4
- import { SVGVisualElement as a } from "../../render/svg/SVGVisualElement.js";
5
- import { isSVGElement as i } from "../../../../../motion-dom/dist/es/utils/is-svg-element.js";
6
- import { isSVGSVGElement as l } from "../../../../../motion-dom/dist/es/utils/is-svg-svg-element.js";
1
+ import { isSVGElement as r } from "../../../../../motion-dom/dist/es/utils/is-svg-element.js";
2
+ import { isSVGSVGElement as s } from "../../../../../motion-dom/dist/es/utils/is-svg-svg-element.js";
3
+ import { SVGVisualElement as a } from "../../../../../motion-dom/dist/es/render/svg/SVGVisualElement.js";
4
+ import { HTMLVisualElement as i } from "../../../../../motion-dom/dist/es/render/html/HTMLVisualElement.js";
5
+ import { visualElementStore as n } from "../../../../../motion-dom/dist/es/render/store.js";
6
+ import { ObjectVisualElement as l } from "../../../../../motion-dom/dist/es/render/object/ObjectVisualElement.js";
7
7
  function S(t) {
8
8
  const o = {
9
9
  presenceContext: null,
@@ -18,7 +18,7 @@ function S(t) {
18
18
  },
19
19
  latestValues: {}
20
20
  }
21
- }, e = i(t) && !l(t) ? new a(o) : new r(o);
21
+ }, e = r(t) && !s(t) ? new a(o) : new i(o);
22
22
  e.mount(t), n.set(t, e);
23
23
  }
24
24
  function E(t) {
@@ -31,7 +31,7 @@ function E(t) {
31
31
  },
32
32
  latestValues: {}
33
33
  }
34
- }, e = new s(o);
34
+ }, e = new l(o);
35
35
  e.mount(t), n.set(t, e);
36
36
  }
37
37
  export {
@@ -1,15 +1,15 @@
1
- import { jsx as R } from "react/jsx-runtime";
2
- import * as a from "react";
3
- import { useId as $, useRef as d, useContext as w, useInsertionEffect as P } from "react";
4
- import { MotionConfigContext as z } from "../../context/MotionConfigContext.js";
5
- import { useComposedRefs as E } from "../../utils/use-composed-ref.js";
6
- import { isHTMLElement as I } from "../../../../../motion-dom/dist/es/utils/is-html-element.js";
7
- class M extends a.Component {
1
+ import { jsx as E } from "react/jsx-runtime";
2
+ import * as g from "react";
3
+ import { useId as H, useRef as l, useContext as y, useInsertionEffect as I } from "react";
4
+ import { MotionConfigContext as M } from "../../context/MotionConfigContext.js";
5
+ import { useComposedRefs as W } from "../../utils/use-composed-ref.js";
6
+ import { isHTMLElement as u } from "../../../../../motion-dom/dist/es/utils/is-html-element.js";
7
+ class L extends g.Component {
8
8
  getSnapshotBeforeUpdate(i) {
9
9
  const e = this.props.childRef.current;
10
10
  if (e && i.isPresent && !this.props.isPresent) {
11
- const r = e.offsetParent, s = I(r) && r.offsetWidth || 0, t = this.props.sizeRef.current;
12
- t.height = e.offsetHeight || 0, t.width = e.offsetWidth || 0, t.top = e.offsetTop, t.left = e.offsetLeft, t.right = s - t.width - t.left;
11
+ const n = e.offsetParent, p = u(n) && n.offsetWidth || 0, r = u(n) && n.offsetHeight || 0, t = this.props.sizeRef.current;
12
+ t.height = e.offsetHeight || 0, t.width = e.offsetWidth || 0, t.top = e.offsetTop, t.left = e.offsetLeft, t.right = p - t.width - t.left, t.bottom = r - t.height - t.top;
13
13
  }
14
14
  return null;
15
15
  }
@@ -22,36 +22,38 @@ class M extends a.Component {
22
22
  return this.props.children;
23
23
  }
24
24
  }
25
- function U({ children: n, isPresent: i, anchorX: e, root: r }) {
26
- const s = $(), t = d(null), f = d({
25
+ function D({ children: o, isPresent: i, anchorX: e, anchorY: n, root: p }) {
26
+ var c;
27
+ const r = H(), t = l(null), h = l({
27
28
  width: 0,
28
29
  height: 0,
29
30
  top: 0,
30
31
  left: 0,
31
- right: 0
32
- }), { nonce: h } = w(z), l = E(t, n == null ? void 0 : n.ref);
33
- return P(() => {
34
- const { width: c, height: m, top: u, left: g, right: x } = f.current;
35
- if (i || !t.current || !c || !m)
32
+ right: 0,
33
+ bottom: 0
34
+ }), { nonce: m } = y(M), x = ((c = o.props) == null ? void 0 : c.ref) ?? (o == null ? void 0 : o.ref), R = W(t, x);
35
+ return I(() => {
36
+ const { width: d, height: a, top: C, left: $, right: b, bottom: w } = h.current;
37
+ if (i || !t.current || !d || !a)
36
38
  return;
37
- const C = e === "left" ? `left: ${g}` : `right: ${x}`;
38
- t.current.dataset.motionPopId = s;
39
- const o = document.createElement("style");
40
- h && (o.nonce = h);
41
- const p = r ?? document.head;
42
- return p.appendChild(o), o.sheet && o.sheet.insertRule(`
43
- [data-motion-pop-id="${s}"] {
39
+ const P = e === "left" ? `left: ${$}` : `right: ${b}`, z = n === "bottom" ? `bottom: ${w}` : `top: ${C}`;
40
+ t.current.dataset.motionPopId = r;
41
+ const s = document.createElement("style");
42
+ m && (s.nonce = m);
43
+ const f = p ?? document.head;
44
+ return f.appendChild(s), s.sheet && s.sheet.insertRule(`
45
+ [data-motion-pop-id="${r}"] {
44
46
  position: absolute !important;
45
- width: ${c}px !important;
46
- height: ${m}px !important;
47
- ${C}px !important;
48
- top: ${u}px !important;
47
+ width: ${d}px !important;
48
+ height: ${a}px !important;
49
+ ${P}px !important;
50
+ ${z}px !important;
49
51
  }
50
52
  `), () => {
51
- p.contains(o) && p.removeChild(o);
53
+ f.contains(s) && f.removeChild(s);
52
54
  };
53
- }, [i]), R(M, { isPresent: i, childRef: t, sizeRef: f, children: a.cloneElement(n, { ref: l }) });
55
+ }, [i]), E(L, { isPresent: i, childRef: t, sizeRef: h, children: g.cloneElement(o, { ref: R }) });
54
56
  }
55
57
  export {
56
- U as PopChild
58
+ D as PopChild
57
59
  };
@@ -1,32 +1,32 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import * as v from "react";
3
- import { useId as M, useMemo as c } from "react";
4
- import { PresenceContext as w } from "../../context/PresenceContext.js";
5
- import { useConstant as x } from "../../utils/use-constant.js";
6
- import { PopChild as R } from "./PopChild.js";
7
- const _ = ({ children: f, initial: i, isPresent: r, onExitComplete: t, custom: m, presenceAffectsLayout: p, mode: l, anchorX: d, root: h }) => {
8
- const e = x(g), C = M();
9
- let u = !0, s = c(() => (u = !1, {
10
- id: C,
2
+ import * as M from "react";
3
+ import { useId as w, useMemo as c } from "react";
4
+ import { PresenceContext as x } from "../../context/PresenceContext.js";
5
+ import { useConstant as R } from "../../utils/use-constant.js";
6
+ import { PopChild as g } from "./PopChild.js";
7
+ const _ = ({ children: f, initial: i, isPresent: r, onExitComplete: o, custom: m, presenceAffectsLayout: p, mode: l, anchorX: d, anchorY: h, root: C }) => {
8
+ const e = R(j), v = w();
9
+ let u = !0, n = c(() => (u = !1, {
10
+ id: v,
11
11
  initial: i,
12
12
  isPresent: r,
13
13
  custom: m,
14
- onExitComplete: (o) => {
15
- e.set(o, !0);
16
- for (const n of e.values())
17
- if (!n)
14
+ onExitComplete: (t) => {
15
+ e.set(t, !0);
16
+ for (const s of e.values())
17
+ if (!s)
18
18
  return;
19
- t && t();
19
+ o && o();
20
20
  },
21
- register: (o) => (e.set(o, !1), () => e.delete(o))
22
- }), [r, e, t]);
23
- return p && u && (s = { ...s }), c(() => {
24
- e.forEach((o, n) => e.set(n, !1));
25
- }, [r]), v.useEffect(() => {
26
- !r && !e.size && t && t();
27
- }, [r]), l === "popLayout" && (f = a(R, { isPresent: r, anchorX: d, root: h, children: f })), a(w.Provider, { value: s, children: f });
21
+ register: (t) => (e.set(t, !1), () => e.delete(t))
22
+ }), [r, e, o]);
23
+ return p && u && (n = { ...n }), c(() => {
24
+ e.forEach((t, s) => e.set(s, !1));
25
+ }, [r]), M.useEffect(() => {
26
+ !r && !e.size && o && o();
27
+ }, [r]), l === "popLayout" && (f = a(g, { isPresent: r, anchorX: d, anchorY: h, root: C, children: f })), a(x.Provider, { value: n, children: f });
28
28
  };
29
- function g() {
29
+ function j() {
30
30
  return /* @__PURE__ */ new Map();
31
31
  }
32
32
  export {