@squeed/flow-sdk 2.0.13 → 2.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6072,13 +6072,19 @@ function wx({
|
|
|
6072
6072
|
const o = ue(null), [i, s] = re({ left: !1, right: !1 });
|
|
6073
6073
|
Pr(() => {
|
|
6074
6074
|
const c = o.current, u = () => {
|
|
6075
|
-
const
|
|
6075
|
+
const f = c.scrollLeft > 1, h = c.scrollWidth - c.clientWidth - c.scrollLeft > 1;
|
|
6076
6076
|
s(
|
|
6077
|
-
(
|
|
6077
|
+
(g) => g.left === f && g.right === h ? g : { left: f, right: h }
|
|
6078
6078
|
);
|
|
6079
|
-
}, l =
|
|
6080
|
-
|
|
6081
|
-
|
|
6079
|
+
}, l = (f) => {
|
|
6080
|
+
if (f.defaultPrevented || f.ctrlKey || f.deltaX !== 0 || !f.deltaY || c.scrollWidth <= c.clientWidth)
|
|
6081
|
+
return;
|
|
6082
|
+
f.preventDefault();
|
|
6083
|
+
const h = f.deltaMode === WheelEvent.DOM_DELTA_LINE ? 16 : f.deltaMode === WheelEvent.DOM_DELTA_PAGE ? c.clientWidth : 1;
|
|
6084
|
+
c.scrollLeft += f.deltaY * h;
|
|
6085
|
+
}, d = new ResizeObserver(u);
|
|
6086
|
+
return d.observe(c), c.firstElementChild && d.observe(c.firstElementChild), c.addEventListener("scroll", u, { passive: !0 }), c.addEventListener("wheel", l, { passive: !1 }), u(), () => {
|
|
6087
|
+
d.disconnect(), c.removeEventListener("scroll", u), c.removeEventListener("wheel", l);
|
|
6082
6088
|
};
|
|
6083
6089
|
}, []);
|
|
6084
6090
|
const a = `var(--chakra-colors-${t.replace(".", "-")})`;
|