@bbl-digital/snorre 4.2.94 → 4.2.96

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 (112) hide show
  1. package/dist/snorre.es1019.js +14 -17
  2. package/dist/snorre.es1020.js +10 -254
  3. package/dist/snorre.es1021.js +41 -2
  4. package/dist/snorre.es1022.js +16 -79
  5. package/dist/snorre.es1023.js +11 -13
  6. package/dist/snorre.es1024.js +24 -18
  7. package/dist/snorre.es1025.js +26 -13
  8. package/dist/snorre.es1026.js +61 -15
  9. package/dist/snorre.es1027.js +6 -10
  10. package/dist/snorre.es1028.js +10 -41
  11. package/dist/snorre.es1029.js +23 -10
  12. package/dist/snorre.es1030.js +26 -25
  13. package/dist/snorre.es1031.js +2 -27
  14. package/dist/snorre.es1032.js +11 -60
  15. package/dist/snorre.es1033.js +8 -5
  16. package/dist/snorre.es1034.js +12 -9
  17. package/dist/snorre.es1035.js +28 -24
  18. package/dist/snorre.es1036.js +254 -26
  19. package/dist/snorre.es1037.js +2 -2
  20. package/dist/snorre.es1038.js +80 -11
  21. package/dist/snorre.es1039.js +13 -9
  22. package/dist/snorre.es1040.js +18 -12
  23. package/dist/snorre.es1041.js +14 -28
  24. package/dist/snorre.es1042.js +5 -4
  25. package/dist/snorre.es1043.js +4 -5
  26. package/dist/snorre.es1124.js +24 -8
  27. package/dist/snorre.es1125.js +19 -22
  28. package/dist/snorre.es1126.js +7 -65
  29. package/dist/snorre.es1127.js +6 -25
  30. package/dist/snorre.es1128.js +22 -19
  31. package/dist/snorre.es1129.js +6 -7
  32. package/dist/snorre.es1130.js +16 -6
  33. package/dist/snorre.es1131.js +8 -5
  34. package/dist/snorre.es1132.js +8 -15
  35. package/dist/snorre.es1133.js +63 -7
  36. package/dist/snorre.es1155.js +1 -1
  37. package/dist/snorre.es1157.js +1 -1
  38. package/dist/snorre.es1334.js +5 -5
  39. package/dist/snorre.es1335.js +1 -1
  40. package/dist/snorre.es1343.js +3 -3
  41. package/dist/snorre.es1344.js +4 -4
  42. package/dist/snorre.es1345.js +4 -10
  43. package/dist/snorre.es1346.js +10 -6
  44. package/dist/snorre.es1347.js +6 -6
  45. package/dist/snorre.es1348.js +6 -4
  46. package/dist/snorre.es333.js +3 -3
  47. package/dist/snorre.es334.js +1 -1
  48. package/dist/snorre.es335.js +2 -2
  49. package/dist/snorre.es466.js +1 -1
  50. package/dist/snorre.es487.js +1 -1
  51. package/dist/snorre.es488.js +1 -1
  52. package/dist/snorre.es489.js +1 -1
  53. package/dist/snorre.es500.js +54 -2
  54. package/dist/snorre.es501.js +64 -24
  55. package/dist/snorre.es502.js +2 -602
  56. package/dist/snorre.es503.js +26 -5
  57. package/dist/snorre.es504.js +602 -54
  58. package/dist/snorre.es505.js +5 -66
  59. package/dist/snorre.es550.js +1 -1
  60. package/dist/snorre.es551.js +1 -1
  61. package/dist/snorre.es573.js +22 -2
  62. package/dist/snorre.es574.js +40 -2
  63. package/dist/snorre.es575.js +2 -22
  64. package/dist/snorre.es576.js +2 -40
  65. package/dist/snorre.es612.js +1 -1
  66. package/dist/snorre.es613.js +1 -1
  67. package/dist/snorre.es617.js +5 -5
  68. package/dist/snorre.es618.js +1 -1
  69. package/dist/snorre.es623.js +1 -1
  70. package/dist/snorre.es626.js +1 -1
  71. package/dist/snorre.es636.js +2 -2
  72. package/dist/snorre.es709.js +1 -1
  73. package/dist/snorre.es730.js +1 -1
  74. package/dist/snorre.es731.js +1 -1
  75. package/dist/snorre.es732.js +2 -2
  76. package/dist/snorre.es734.js +1 -1
  77. package/dist/snorre.es836.js +3 -3
  78. package/dist/snorre.es841.js +1 -1
  79. package/dist/snorre.es842.js +6 -6
  80. package/dist/snorre.es843.js +7 -7
  81. package/dist/snorre.es844.js +1 -1
  82. package/dist/snorre.es845.js +1 -1
  83. package/dist/snorre.es846.js +2 -2
  84. package/dist/snorre.es847.js +3 -3
  85. package/dist/snorre.es850.js +28 -15
  86. package/dist/snorre.es851.js +21 -2
  87. package/dist/snorre.es852.js +2 -10
  88. package/dist/snorre.es853.js +9 -4
  89. package/dist/snorre.es854.js +5 -11
  90. package/dist/snorre.es855.js +11 -14
  91. package/dist/snorre.es856.js +12 -27
  92. package/dist/snorre.es857.js +28 -28
  93. package/dist/snorre.es859.js +5 -20
  94. package/dist/snorre.es860.js +15 -5
  95. package/dist/snorre.es868.js +1 -1
  96. package/dist/snorre.es883.js +1 -1
  97. package/dist/snorre.es931.js +3 -3
  98. package/dist/snorre.es938.js +1 -1
  99. package/dist/snorre.es941.js +2 -2
  100. package/dist/snorre.es943.js +5 -13
  101. package/dist/snorre.es944.js +21 -4
  102. package/dist/snorre.es945.js +9 -5
  103. package/dist/snorre.es946.js +7 -29
  104. package/dist/snorre.es947.js +12 -11
  105. package/dist/snorre.es948.js +4 -24
  106. package/dist/snorre.es949.js +5 -5
  107. package/dist/snorre.es950.js +29 -5
  108. package/dist/snorre.es951.js +11 -21
  109. package/dist/snorre.es952.js +25 -9
  110. package/dist/snorre.es953.js +5 -7
  111. package/package.json +25 -1
  112. package/vite.config.js +1 -2
@@ -1,4 +1,4 @@
1
- const s = (o) => typeof o == "string" && o.toLowerCase() === "svg";
1
+ const t = ({ current: e }) => e ? e.ownerDocument.defaultView : null;
2
2
  export {
3
- s as isSVGTag
3
+ t as getContextWindow
4
4
  };
@@ -1,15 +1,84 @@
1
- function e(i, o) {
2
- try {
3
- o.dimensions = typeof i.getBBox == "function" ? i.getBBox() : i.getBoundingClientRect();
4
- } catch {
5
- o.dimensions = {
6
- x: 0,
7
- y: 0,
8
- width: 0,
9
- height: 0
10
- };
1
+ import { secondsToMilliseconds as w, millisecondsToSeconds as S } from "./snorre.es609.js";
2
+ import { isPrimaryPointer as D } from "./snorre.es701.js";
3
+ import { addPointerEvent as d } from "./snorre.es727.js";
4
+ import { extractEventInfo as T } from "./snorre.es729.js";
5
+ import { distance2D as W } from "./snorre.es719.js";
6
+ import { pipe as L } from "./snorre.es629.js";
7
+ import { frameData as x, frame as U, cancelFrame as O } from "./snorre.es674.js";
8
+ class B {
9
+ constructor(n, o, { transformPagePoint: e, contextWindow: r, dragSnapToOrigin: h = !1 } = {}) {
10
+ if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.updatePoint = () => {
11
+ if (!(this.lastMoveEvent && this.lastMoveEventInfo))
12
+ return;
13
+ const i = p(this.lastMoveEventInfo, this.history), a = this.startEvent !== null, c = W(i.offset, { x: 0, y: 0 }) >= 3;
14
+ if (!a && !c)
15
+ return;
16
+ const { point: f } = i, { timestamp: m } = x;
17
+ this.history.push({ ...f, timestamp: m });
18
+ const { onStart: l, onMove: E } = this.handlers;
19
+ a || (l && l(this.lastMoveEvent, i), this.startEvent = this.lastMoveEvent), E && E(this.lastMoveEvent, i);
20
+ }, this.handlePointerMove = (i, a) => {
21
+ this.lastMoveEvent = i, this.lastMoveEventInfo = v(a, this.transformPagePoint), U.update(this.updatePoint, !0);
22
+ }, this.handlePointerUp = (i, a) => {
23
+ this.end();
24
+ const { onEnd: c, onSessionEnd: f, resumeAnimation: m } = this.handlers;
25
+ if (this.dragSnapToOrigin && m && m(), !(this.lastMoveEvent && this.lastMoveEventInfo))
26
+ return;
27
+ const l = p(i.type === "pointercancel" ? this.lastMoveEventInfo : v(a, this.transformPagePoint), this.history);
28
+ this.startEvent && c && c(i, l), f && f(i, l);
29
+ }, !D(n))
30
+ return;
31
+ this.dragSnapToOrigin = h, this.handlers = o, this.transformPagePoint = e, this.contextWindow = r || window;
32
+ const s = T(n), u = v(s, this.transformPagePoint), { point: g } = u, { timestamp: I } = x;
33
+ this.history = [{ ...g, timestamp: I }];
34
+ const { onSessionStart: P } = o;
35
+ P && P(n, p(u, this.history)), this.removeListeners = L(d(this.contextWindow, "pointermove", this.handlePointerMove), d(this.contextWindow, "pointerup", this.handlePointerUp), d(this.contextWindow, "pointercancel", this.handlePointerUp));
11
36
  }
37
+ updateHandlers(n) {
38
+ this.handlers = n;
39
+ }
40
+ end() {
41
+ this.removeListeners && this.removeListeners(), O(this.updatePoint);
42
+ }
43
+ }
44
+ function v(t, n) {
45
+ return n ? { point: n(t.point) } : t;
46
+ }
47
+ function y(t, n) {
48
+ return { x: t.x - n.x, y: t.y - n.y };
49
+ }
50
+ function p({ point: t }, n) {
51
+ return {
52
+ point: t,
53
+ delta: y(t, M(n)),
54
+ offset: y(t, V(n)),
55
+ velocity: b(n, 0.1)
56
+ };
57
+ }
58
+ function V(t) {
59
+ return t[0];
60
+ }
61
+ function M(t) {
62
+ return t[t.length - 1];
63
+ }
64
+ function b(t, n) {
65
+ if (t.length < 2)
66
+ return { x: 0, y: 0 };
67
+ let o = t.length - 1, e = null;
68
+ const r = M(t);
69
+ for (; o >= 0 && (e = t[o], !(r.timestamp - e.timestamp > w(n))); )
70
+ o--;
71
+ if (!e)
72
+ return { x: 0, y: 0 };
73
+ const h = S(r.timestamp - e.timestamp);
74
+ if (h === 0)
75
+ return { x: 0, y: 0 };
76
+ const s = {
77
+ x: (r.x - e.x) / h,
78
+ y: (r.y - e.y) / h
79
+ };
80
+ return s.x === 1 / 0 && (s.x = 0), s.y === 1 / 0 && (s.y = 0), s;
12
81
  }
13
82
  export {
14
- e as updateSVGDimensions
83
+ B as PanSession
15
84
  };
@@ -1,11 +1,15 @@
1
- import { camelToDash as i } from "./snorre.es689.js";
2
- import { renderHTML as m } from "./snorre.es1033.js";
3
- import { camelCaseAttributes as e } from "./snorre.es1036.js";
4
- function c(o, t, f, s) {
5
- m(o, t, void 0, s);
6
- for (const r in t.attrs)
7
- o.setAttribute(e.has(r) ? r : i(r), t.attrs[r]);
8
- }
1
+ const e = {
2
+ /**
3
+ * Global flag as to whether the tree has animated since the last time
4
+ * we resized the window
5
+ */
6
+ hasAnimatedSinceResize: !0,
7
+ /**
8
+ * We set this to true once, on the first update. Any nodes added to the tree beyond that
9
+ * update will be given a `data-projection-id` attribute.
10
+ */
11
+ hasEverUpdated: !1
12
+ };
9
13
  export {
10
- c as renderSVG
14
+ e as globalProjectionState
11
15
  };
@@ -1,15 +1,21 @@
1
- import { isMotionValue as n } from "./snorre.es606.js";
2
- import { transformPropOrder as i } from "./snorre.es656.js";
3
- import { scrapeMotionValuesFromProps as m } from "./snorre.es1034.js";
4
- function l(r, t, s) {
5
- const e = m(r, t, s);
6
- for (const o in r)
7
- if (n(r[o]) || n(t[o])) {
8
- const a = i.indexOf(o) !== -1 ? "attr" + o.charAt(0).toUpperCase() + o.substring(1) : o;
9
- e[a] = r[o];
10
- }
11
- return e;
1
+ import { px as c } from "./snorre.es683.js";
2
+ function e(r, n) {
3
+ return n.max === n.min ? 0 : r / (n.max - n.min) * 100;
12
4
  }
5
+ const f = {
6
+ correct: (r, n) => {
7
+ if (!n.target)
8
+ return r;
9
+ if (typeof r == "string")
10
+ if (c.test(r))
11
+ r = parseFloat(r);
12
+ else
13
+ return r;
14
+ const o = e(r, n.target.x), t = e(r, n.target.y);
15
+ return `${o}% ${t}%`;
16
+ }
17
+ };
13
18
  export {
14
- l as scrapeMotionValuesFromProps
19
+ f as correctBorderRadius,
20
+ e as pixelsToPercent
15
21
  };
@@ -1,30 +1,16 @@
1
- const e = [
2
- "animate",
3
- "circle",
4
- "defs",
5
- "desc",
6
- "ellipse",
7
- "g",
8
- "image",
9
- "line",
10
- "filter",
11
- "marker",
12
- "mask",
13
- "metadata",
14
- "path",
15
- "pattern",
16
- "polygon",
17
- "polyline",
18
- "rect",
19
- "stop",
20
- "switch",
21
- "symbol",
22
- "svg",
23
- "text",
24
- "tspan",
25
- "use",
26
- "view"
27
- ];
1
+ import { mixNumber as i } from "./snorre.es714.js";
2
+ import { complex as f } from "./snorre.es668.js";
3
+ const y = {
4
+ correct: (e, { treeScale: c, projectionDelta: t }) => {
5
+ const a = e, o = f.parse(e);
6
+ if (o.length > 5)
7
+ return a;
8
+ const p = f.createTransformer(e), r = typeof o[0] != "number" ? 1 : 0, n = t.x.scale * c.x, m = t.y.scale * c.y;
9
+ o[0 + r] /= n, o[1 + r] /= m;
10
+ const s = i(n, m, 0.5);
11
+ return typeof o[2 + r] == "number" && (o[2 + r] /= s), typeof o[3 + r] == "number" && (o[3 + r] /= s), p(o);
12
+ }
13
+ };
28
14
  export {
29
- e as lowercaseSVGElements
15
+ y as correctBoxShadow
30
16
  };
@@ -1,6 +1,7 @@
1
- const n = {
2
- linearEasing: void 0
3
- };
1
+ import { complex as e } from "./snorre.es668.js";
2
+ const n = (r, t) => t === "zIndex" ? !1 : !!(typeof r == "number" || Array.isArray(r) || typeof r == "string" && // It's animatable if we have a string
3
+ (e.test(r) || r === "0") && // And it contains numbers and/or colors
4
+ !r.startsWith("url("));
4
5
  export {
5
- n as supportsFlags
6
+ n as isAnimatable
6
7
  };
@@ -1,7 +1,6 @@
1
- import { complex as e } from "./snorre.es668.js";
2
- const n = (r, t) => t === "zIndex" ? !1 : !!(typeof r == "number" || Array.isArray(r) || typeof r == "string" && // It's animatable if we have a string
3
- (e.test(r) || r === "0") && // And it contains numbers and/or colors
4
- !r.startsWith("url("));
1
+ const n = {
2
+ linearEasing: void 0
3
+ };
5
4
  export {
6
- n as isAnimatable
5
+ n as supportsFlags
7
6
  };
@@ -1,11 +1,27 @@
1
- import { isDragging as e } from "./snorre.es696.js";
2
- function l(r) {
3
- return r === "x" || r === "y" ? e[r] ? null : (e[r] = !0, () => {
4
- e[r] = !1;
5
- }) : e.x || e.y ? null : (e.x = e.y = !0, () => {
6
- e.x = e.y = !1;
7
- });
1
+ import { useMemo as i } from "react";
2
+ import { isForcedMotionValue as a } from "./snorre.es1129.js";
3
+ import { isMotionValue as r } from "./snorre.es606.js";
4
+ import { buildHTMLStyles as l } from "./snorre.es1025.js";
5
+ import { createHtmlRenderState as s } from "./snorre.es1126.js";
6
+ function u(t, o, n) {
7
+ for (const e in o)
8
+ !r(o[e]) && !a(e, n) && (t[e] = o[e]);
9
+ }
10
+ function c({ transformTemplate: t }, o) {
11
+ return i(() => {
12
+ const n = s();
13
+ return l(n, o, t), Object.assign({}, n.vars, n.style);
14
+ }, [o]);
15
+ }
16
+ function f(t, o) {
17
+ const n = t.style || {}, e = {};
18
+ return u(e, n, t), Object.assign(e, c(t, o)), e;
19
+ }
20
+ function M(t, o) {
21
+ const n = {}, e = f(t, o);
22
+ return t.drag && t.dragListener !== !1 && (n.draggable = !1, e.userSelect = e.WebkitUserSelect = e.WebkitTouchCallout = "none", e.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (n.tabIndex = 0), n.style = e, n;
8
23
  }
9
24
  export {
10
- l as setDragLock
25
+ u as copyRawValuesOnly,
26
+ M as useHTMLProps
11
27
  };
@@ -1,25 +1,22 @@
1
- function r({ top: t, left: o, right: n, bottom: x }) {
2
- return {
3
- x: { min: o, max: n },
4
- y: { min: t, max: x }
5
- };
6
- }
7
- function e({ x: t, y: o }) {
8
- return { top: o.min, right: t.max, bottom: o.max, left: t.min };
9
- }
10
- function m(t, o) {
11
- if (!o)
12
- return t;
13
- const n = o({ x: t.left, y: t.top }), x = o({ x: t.right, y: t.bottom });
14
- return {
15
- top: n.y,
16
- left: n.x,
17
- bottom: x.y,
18
- right: x.x
19
- };
1
+ import { useMemo as m } from "react";
2
+ import { copyRawValuesOnly as i } from "./snorre.es1124.js";
3
+ import { buildSVGAttrs as l } from "./snorre.es1029.js";
4
+ import { createSvgRenderState as a } from "./snorre.es1127.js";
5
+ import { isSVGTag as n } from "./snorre.es1031.js";
6
+ function V(e, s, y, o) {
7
+ const r = m(() => {
8
+ const t = a();
9
+ return l(t, s, n(o), e.transformTemplate), {
10
+ ...t.attrs,
11
+ style: { ...t.style }
12
+ };
13
+ }, [s]);
14
+ if (e.style) {
15
+ const t = {};
16
+ i(t, e.style, e), r.style = { ...t, ...r.style };
17
+ }
18
+ return r;
20
19
  }
21
20
  export {
22
- r as convertBoundingBoxToBox,
23
- e as convertBoxToBoundingBox,
24
- m as transformBoxPoints
21
+ V as useSVGProps
25
22
  };
@@ -1,67 +1,9 @@
1
- import { progress as r } from "./snorre.es705.js";
2
- import { calcLength as t } from "./snorre.es723.js";
3
- import { clamp as C } from "./snorre.es627.js";
4
- import { mixNumber as u } from "./snorre.es714.js";
5
- function a(n, { min: e, max: m }, i) {
6
- return e !== void 0 && n < e ? n = i ? u(e, n, i.min) : Math.max(n, e) : m !== void 0 && n > m && (n = i ? u(m, n, i.max) : Math.min(n, m)), n;
7
- }
8
- function o(n, e, m) {
9
- return {
10
- min: e !== void 0 ? n.min + e : void 0,
11
- max: m !== void 0 ? n.max + m - (n.max - n.min) : void 0
12
- };
13
- }
14
- function L(n, { top: e, left: m, bottom: i, right: f }) {
15
- return {
16
- x: o(n.x, m, f),
17
- y: o(n.y, e, i)
18
- };
19
- }
20
- function x(n, e) {
21
- let m = e.min - n.min, i = e.max - n.max;
22
- return e.max - e.min < n.max - n.min && ([m, i] = [i, m]), { min: m, max: i };
23
- }
24
- function w(n, e) {
25
- return {
26
- x: x(n.x, e.x),
27
- y: x(n.y, e.y)
28
- };
29
- }
30
- function y(n, e) {
31
- let m = 0.5;
32
- const i = t(n), f = t(e);
33
- return f > i ? m = r(e.min, e.max - i, n.min) : i > f && (m = r(n.min, n.max - f, e.min)), C(0, 1, m);
34
- }
35
- function M(n, e) {
36
- const m = {};
37
- return e.min !== void 0 && (m.min = e.min - n.min), e.max !== void 0 && (m.max = e.max - n.min), m;
38
- }
39
- const c = 0.35;
40
- function R(n = c) {
41
- return n === !1 ? n = 0 : n === !0 && (n = c), {
42
- x: l(n, "left", "right"),
43
- y: l(n, "top", "bottom")
44
- };
45
- }
46
- function l(n, e, m) {
47
- return {
48
- min: d(n, e),
49
- max: d(n, m)
50
- };
51
- }
52
- function d(n, e) {
53
- return typeof n == "number" ? n : n[e] || 0;
54
- }
1
+ const r = () => ({
2
+ style: {},
3
+ transform: {},
4
+ transformOrigin: {},
5
+ vars: {}
6
+ });
55
7
  export {
56
- a as applyConstraints,
57
- y as calcOrigin,
58
- o as calcRelativeAxisConstraints,
59
- L as calcRelativeConstraints,
60
- x as calcViewportAxisConstraints,
61
- w as calcViewportConstraints,
62
- c as defaultElastic,
63
- M as rebaseAxisConstraints,
64
- l as resolveAxisElastic,
65
- R as resolveDragElastic,
66
- d as resolvePointElastic
8
+ r as createHtmlRenderState
67
9
  };
@@ -1,27 +1,8 @@
1
- import { useMemo as i } from "react";
2
- import { isForcedMotionValue as a } from "./snorre.es1131.js";
3
- import { isMotionValue as r } from "./snorre.es606.js";
4
- import { buildHTMLStyles as l } from "./snorre.es1031.js";
5
- import { createHtmlRenderState as s } from "./snorre.es1129.js";
6
- function u(t, o, n) {
7
- for (const e in o)
8
- !r(o[e]) && !a(e, n) && (t[e] = o[e]);
9
- }
10
- function c({ transformTemplate: t }, o) {
11
- return i(() => {
12
- const n = s();
13
- return l(n, o, t), Object.assign({}, n.vars, n.style);
14
- }, [o]);
15
- }
16
- function f(t, o) {
17
- const n = t.style || {}, e = {};
18
- return u(e, n, t), Object.assign(e, c(t, o)), e;
19
- }
20
- function M(t, o) {
21
- const n = {}, e = f(t, o);
22
- return t.drag && t.dragListener !== !1 && (n.draggable = !1, e.userSelect = e.WebkitUserSelect = e.WebkitTouchCallout = "none", e.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (n.tabIndex = 0), n.style = e, n;
23
- }
1
+ import { createHtmlRenderState as t } from "./snorre.es1126.js";
2
+ const r = () => ({
3
+ ...t(),
4
+ attrs: {}
5
+ });
24
6
  export {
25
- u as copyRawValuesOnly,
26
- M as useHTMLProps
7
+ r as createSvgRenderState
27
8
  };
@@ -1,22 +1,25 @@
1
- import { useMemo as m } from "react";
2
- import { copyRawValuesOnly as i } from "./snorre.es1127.js";
3
- import { buildSVGAttrs as l } from "./snorre.es1035.js";
4
- import { createSvgRenderState as a } from "./snorre.es1130.js";
5
- import { isSVGTag as n } from "./snorre.es1037.js";
6
- function V(e, s, y, o) {
7
- const r = m(() => {
8
- const t = a();
9
- return l(t, s, n(o), e.transformTemplate), {
10
- ...t.attrs,
11
- style: { ...t.style }
12
- };
13
- }, [s]);
14
- if (e.style) {
15
- const t = {};
16
- i(t, e.style, e), r.style = { ...t, ...r.style };
17
- }
18
- return r;
1
+ function r({ top: t, left: o, right: n, bottom: x }) {
2
+ return {
3
+ x: { min: o, max: n },
4
+ y: { min: t, max: x }
5
+ };
6
+ }
7
+ function e({ x: t, y: o }) {
8
+ return { top: o.min, right: t.max, bottom: o.max, left: t.min };
9
+ }
10
+ function m(t, o) {
11
+ if (!o)
12
+ return t;
13
+ const n = o({ x: t.left, y: t.top }), x = o({ x: t.right, y: t.bottom });
14
+ return {
15
+ top: n.y,
16
+ left: n.x,
17
+ bottom: x.y,
18
+ right: x.x
19
+ };
19
20
  }
20
21
  export {
21
- V as useSVGProps
22
+ r as convertBoundingBoxToBox,
23
+ e as convertBoxToBoundingBox,
24
+ m as transformBoxPoints
22
25
  };
@@ -1,9 +1,8 @@
1
- const r = () => ({
2
- style: {},
3
- transform: {},
4
- transformOrigin: {},
5
- vars: {}
6
- });
1
+ import { scaleCorrectors as i } from "./snorre.es651.js";
2
+ import { transformProps as n } from "./snorre.es656.js";
3
+ function c(r, { layout: o, layoutId: t }) {
4
+ return n.has(r) || r.startsWith("origin") || (o || t !== void 0) && (!!i[r] || r === "opacity");
5
+ }
7
6
  export {
8
- r as createHtmlRenderState
7
+ c as isForcedMotionValue
9
8
  };
@@ -1,8 +1,18 @@
1
- import { createHtmlRenderState as t } from "./snorre.es1129.js";
2
- const r = () => ({
3
- ...t(),
4
- attrs: {}
5
- });
1
+ import { px as t } from "./snorre.es683.js";
2
+ const c = {
3
+ offset: "stroke-dashoffset",
4
+ array: "stroke-dasharray"
5
+ }, y = {
6
+ offset: "strokeDashoffset",
7
+ array: "strokeDasharray"
8
+ };
9
+ function m(s, r, o = 1, e = 0, f = !0) {
10
+ s.pathLength = 1;
11
+ const a = f ? c : y;
12
+ s[a.offset] = t.transform(-e);
13
+ const n = t.transform(r), h = t.transform(o);
14
+ s[a.array] = `${n} ${h}`;
15
+ }
6
16
  export {
7
- r as createSvgRenderState
17
+ m as buildSVGPath
8
18
  };
@@ -1,8 +1,11 @@
1
- import { scaleCorrectors as i } from "./snorre.es651.js";
2
- import { transformProps as n } from "./snorre.es656.js";
3
- function c(r, { layout: o, layoutId: t }) {
4
- return n.has(r) || r.startsWith("origin") || (o || t !== void 0) && (!!i[r] || r === "opacity");
1
+ import { px as o } from "./snorre.es683.js";
2
+ function n(r, t, c) {
3
+ return typeof r == "string" ? r : o.transform(t + c * r);
4
+ }
5
+ function a(r, t, c) {
6
+ const f = n(t, r.x, r.width), p = n(c, r.y, r.height);
7
+ return `${f} ${p}`;
5
8
  }
6
9
  export {
7
- c as isForcedMotionValue
10
+ a as calcSVGTransformOrigin
8
11
  };
@@ -1,18 +1,11 @@
1
- import { px as t } from "./snorre.es683.js";
2
- const c = {
3
- offset: "stroke-dashoffset",
4
- array: "stroke-dasharray"
5
- }, y = {
6
- offset: "strokeDashoffset",
7
- array: "strokeDasharray"
8
- };
9
- function m(s, r, o = 1, e = 0, f = !0) {
10
- s.pathLength = 1;
11
- const a = f ? c : y;
12
- s[a.offset] = t.transform(-e);
13
- const n = t.transform(r), h = t.transform(o);
14
- s[a.array] = `${n} ${h}`;
1
+ import { isDragging as e } from "./snorre.es696.js";
2
+ function l(r) {
3
+ return r === "x" || r === "y" ? e[r] ? null : (e[r] = !0, () => {
4
+ e[r] = !1;
5
+ }) : e.x || e.y ? null : (e.x = e.y = !0, () => {
6
+ e.x = e.y = !1;
7
+ });
15
8
  }
16
9
  export {
17
- m as buildSVGPath
10
+ l as setDragLock
18
11
  };
@@ -1,11 +1,67 @@
1
- import { px as o } from "./snorre.es683.js";
2
- function n(r, t, c) {
3
- return typeof r == "string" ? r : o.transform(t + c * r);
1
+ import { progress as r } from "./snorre.es705.js";
2
+ import { calcLength as t } from "./snorre.es723.js";
3
+ import { clamp as C } from "./snorre.es627.js";
4
+ import { mixNumber as u } from "./snorre.es714.js";
5
+ function a(n, { min: e, max: m }, i) {
6
+ return e !== void 0 && n < e ? n = i ? u(e, n, i.min) : Math.max(n, e) : m !== void 0 && n > m && (n = i ? u(m, n, i.max) : Math.min(n, m)), n;
4
7
  }
5
- function a(r, t, c) {
6
- const f = n(t, r.x, r.width), p = n(c, r.y, r.height);
7
- return `${f} ${p}`;
8
+ function o(n, e, m) {
9
+ return {
10
+ min: e !== void 0 ? n.min + e : void 0,
11
+ max: m !== void 0 ? n.max + m - (n.max - n.min) : void 0
12
+ };
13
+ }
14
+ function L(n, { top: e, left: m, bottom: i, right: f }) {
15
+ return {
16
+ x: o(n.x, m, f),
17
+ y: o(n.y, e, i)
18
+ };
19
+ }
20
+ function x(n, e) {
21
+ let m = e.min - n.min, i = e.max - n.max;
22
+ return e.max - e.min < n.max - n.min && ([m, i] = [i, m]), { min: m, max: i };
23
+ }
24
+ function w(n, e) {
25
+ return {
26
+ x: x(n.x, e.x),
27
+ y: x(n.y, e.y)
28
+ };
29
+ }
30
+ function y(n, e) {
31
+ let m = 0.5;
32
+ const i = t(n), f = t(e);
33
+ return f > i ? m = r(e.min, e.max - i, n.min) : i > f && (m = r(n.min, n.max - f, e.min)), C(0, 1, m);
34
+ }
35
+ function M(n, e) {
36
+ const m = {};
37
+ return e.min !== void 0 && (m.min = e.min - n.min), e.max !== void 0 && (m.max = e.max - n.min), m;
38
+ }
39
+ const c = 0.35;
40
+ function R(n = c) {
41
+ return n === !1 ? n = 0 : n === !0 && (n = c), {
42
+ x: l(n, "left", "right"),
43
+ y: l(n, "top", "bottom")
44
+ };
45
+ }
46
+ function l(n, e, m) {
47
+ return {
48
+ min: d(n, e),
49
+ max: d(n, m)
50
+ };
51
+ }
52
+ function d(n, e) {
53
+ return typeof n == "number" ? n : n[e] || 0;
8
54
  }
9
55
  export {
10
- a as calcSVGTransformOrigin
56
+ a as applyConstraints,
57
+ y as calcOrigin,
58
+ o as calcRelativeAxisConstraints,
59
+ L as calcRelativeConstraints,
60
+ x as calcViewportAxisConstraints,
61
+ w as calcViewportConstraints,
62
+ c as defaultElastic,
63
+ M as rebaseAxisConstraints,
64
+ l as resolveAxisElastic,
65
+ R as resolveDragElastic,
66
+ d as resolvePointElastic
11
67
  };
@@ -1,4 +1,4 @@
1
- import { getBatch as v } from "./snorre.es952.js";
1
+ import { getBatch as v } from "./snorre.es945.js";
2
2
  function d() {
3
3
  var s = v(), i = null, n = null;
4
4
  return {
@@ -1,6 +1,6 @@
1
1
  import A from "./snorre.es523.js";
2
2
  import oe from "./snorre.es1158.js";
3
- import ne from "./snorre.es505.js";
3
+ import ne from "./snorre.es501.js";
4
4
  import y, { useMemo as c, useContext as ve, useReducer as he, useRef as $ } from "react";
5
5
  import { r as ae } from "./snorre.es738.js";
6
6
  import { createSubscription as Re } from "./snorre.es1155.js";