@reelkit/core
Advanced tools
+1
-1
@@ -30,2 +30,2 @@ /** | ||
| export { fullscreenSignal, requestFullscreen, exitFullscreen, } from './lib/utils'; | ||
| export { createBodyLock, type BodyLock } from './lib/utils'; | ||
| export { createBodyLock, sharedBodyLock, type BodyLock } from './lib/utils'; |
+104
-103
@@ -1,2 +0,2 @@ | ||
| const z = (e) => e[0], k = (e) => e[e.length - 1], Oe = (e, n) => Array.from({ length: e }, (t, o) => n(o)), L = (e) => Math.abs(e), ae = (e) => e < 0, K = (e, n, t) => Math.min(t, Math.max(n, e)), le = (e, n, t) => n * (1 - e) + t * e, ie = (e, n, t, o, r) => { | ||
| const L = (e) => e[0], S = (e) => e[e.length - 1], Ve = (e, n) => Array.from({ length: e }, (t, o) => n(o)), z = (e) => Math.abs(e), ae = (e) => e < 0, K = (e, n, t) => Math.min(t, Math.max(n, e)), le = (e, n, t) => n * (1 - e) + t * e, ie = (e, n, t, o, r) => { | ||
| if (t ??= n, o ??= 1, r ??= !1, e <= 0 || t >= e) return []; | ||
@@ -58,3 +58,3 @@ if (r && e === 1) return [0]; | ||
| }; | ||
| }, Ve = (e, n) => { | ||
| }, $e = (e, n) => { | ||
| const t = e().map((o) => o.observe(n)); | ||
@@ -84,3 +84,3 @@ return () => t.forEach((o) => o()); | ||
| }, Y = () => { | ||
| }, $e = (e, n) => { | ||
| }, Ke = (e, n) => { | ||
| const t = q(); | ||
@@ -95,3 +95,3 @@ return t.push( | ||
| ), t.dispose; | ||
| }, Ke = (e = !0) => { | ||
| }, Ne = (e = !0) => { | ||
| const n = R(e), t = R(!1); | ||
@@ -105,5 +105,5 @@ return { | ||
| }; | ||
| }, Ne = (e, n) => (n.muted = e.muted.value, e.muted.observe(() => { | ||
| }, He = (e, n) => (n.muted = e.muted.value, e.muted.observe(() => { | ||
| n.muted = e.muted.value; | ||
| })), He = (e = !0, n = 0) => { | ||
| })), Ue = (e = !0, n = 0) => { | ||
| const t = R(e), o = R(!1); | ||
@@ -145,3 +145,3 @@ let r = n; | ||
| }; | ||
| }, Ue = (e = {}) => { | ||
| }, Xe = (e = {}) => { | ||
| const { maxCacheSize: n = 200, maxErrorCacheSize: t = 100 } = e, o = /* @__PURE__ */ new Set(), r = B(n), a = B(t), l = /* @__PURE__ */ new Map(), i = (c) => { | ||
@@ -188,3 +188,3 @@ o.delete(c), r.set(c, !0); | ||
| }; | ||
| }, ue = 200, de = 50, Xe = (e) => { | ||
| }, ue = 200, de = 50, Ye = (e) => { | ||
| try { | ||
@@ -198,3 +198,3 @@ const n = document.createElement("canvas"); | ||
| } | ||
| }, Ye = (e) => { | ||
| }, Be = (e) => { | ||
| let n = null; | ||
@@ -230,3 +230,3 @@ return { | ||
| ), n.dispose; | ||
| }, Be = (() => { | ||
| }, qe = (() => { | ||
| const e = R(te()); | ||
@@ -256,11 +256,11 @@ let n = 0, t = null; | ||
| }; | ||
| })(), qe = (e) => { | ||
| })(), Ge = (e) => { | ||
| if (se) return Promise.resolve(); | ||
| const n = e, t = n.requestFullscreen ?? n.webkitRequestFullscreen ?? n.webkitRequestFullScreen ?? n.webkitEnterFullscreen ?? n.webkitEnterFullScreen ?? n.mozRequestFullScreen ?? n.msRequestFullscreen; | ||
| return t ? t.call(n) : Promise.resolve(); | ||
| }, Ge = () => { | ||
| }, je = () => { | ||
| if (se || !te()) return Promise.resolve(); | ||
| const e = document, n = e.exitFullscreen ?? e.webkitExitFullscreen ?? e.mozCancelFullScreen ?? e.msExitFullscreen; | ||
| return n ? n.call(e) : Promise.resolve(); | ||
| }, je = () => { | ||
| }, he = () => { | ||
| let e = 0, n = "", t = "", o = "", r = "", a = "", l = "", i = 0; | ||
@@ -285,14 +285,14 @@ const d = () => { | ||
| }; | ||
| }, he = 800, pe = 200, ge = (e) => { | ||
| const [n, t] = [L(z(e)), L(k(e))]; | ||
| }, Je = he(), pe = 800, ge = 200, ve = (e) => { | ||
| const [n, t] = [z(L(e)), z(S(e))]; | ||
| return n > 0 && n > t ? "horizontal" : t > 0 && t > n ? "vertical" : null; | ||
| }, j = (e, n) => n === "horizontal" ? z(e) : k(e), J = (e) => e !== null && typeof e == "object" && "changedTouches" in e, ve = (e = {}, n = {}) => { | ||
| }, j = (e, n) => n === "horizontal" ? L(e) : S(e), J = (e) => e !== null && typeof e == "object" && "changedTouches" in e, me = (e = {}, n = {}) => { | ||
| const { | ||
| useTouchEventsOnly: t = !1, | ||
| longPressDurationMs: o = he, | ||
| doubleTapWindowMs: r = pe | ||
| longPressDurationMs: o = pe, | ||
| doubleTapWindowMs: r = ge | ||
| } = e, a = q(); | ||
| let l = null, i = { ...n }, d = !1, p = null, v = null, c = null, h = [], s = null, g = !1, b = !1, E = 0, D = null; | ||
| const F = (y) => typeof HTMLElement > "u" || !(y instanceof HTMLElement) ? !1 : y.closest('button, a, input, select, textarea, [role="button"]') !== null, A = oe((y) => { | ||
| v && z(v) === z(y.globalPosition) && k(v) === k(y.globalPosition) && (g = !0, i.onLongPress?.(y)); | ||
| v && L(v) === L(y.globalPosition) && S(v) === S(y.globalPosition) && (g = !0, i.onLongPress?.(y)); | ||
| }, o), V = () => { | ||
@@ -303,4 +303,4 @@ p !== null && !d && (d = !0); | ||
| localPosition: [ | ||
| z(v) - z(c), | ||
| k(v) - k(c) | ||
| L(v) - L(c), | ||
| S(v) - S(c) | ||
| ], | ||
@@ -321,3 +321,3 @@ sourceTimestamp: Date.now() | ||
| i.onLongPress && A(m), i.onTapDown?.(m); | ||
| }, S = (y) => { | ||
| }, k = (y) => { | ||
| if (p === null) return; | ||
@@ -336,9 +336,9 @@ if (d) { | ||
| const m = p.globalPosition, w = [ | ||
| z(f) - z(m), | ||
| k(f) - k(m) | ||
| L(f) - L(m), | ||
| S(f) - S(m) | ||
| ], x = [ | ||
| z(f) - z(v), | ||
| k(f) - k(v) | ||
| L(f) - L(v), | ||
| S(f) - S(v) | ||
| ], O = $(); | ||
| if (s === null && (s = ge(x)), s !== null) { | ||
| if (s === null && (s = ve(x)), s !== null) { | ||
| const T = s === "horizontal" ? i.onHorizontalDragStart : i.onVerticalDragStart, _ = s === "horizontal" ? i.onHorizontalDragUpdate : i.onVerticalDragUpdate; | ||
@@ -359,3 +359,3 @@ h.length === 0 && T?.({ ...O, kind: u }); | ||
| A.cancel(); | ||
| const u = J(y) ? "touch" : "mouse", f = p, m = k(h) ?? null; | ||
| const u = J(y) ? "touch" : "mouse", f = p, m = S(h) ?? null; | ||
| h = [], p = null; | ||
@@ -373,4 +373,4 @@ const w = $(); | ||
| const T = (w.sourceTimestamp - f.sourceTimestamp) / 1e3, _ = [ | ||
| L(z(m.distance)) / T, | ||
| L(k(m.distance)) / T | ||
| z(L(m.distance)) / T, | ||
| z(S(m.distance)) / T | ||
| ], I = { | ||
@@ -401,7 +401,7 @@ ...w, | ||
| P(l, "touchstart", C, { passive: !0 }), | ||
| P(l, "touchmove", S, { passive: !0 }), | ||
| P(l, "touchmove", k, { passive: !0 }), | ||
| P(l, "touchend", M, { passive: !0 }) | ||
| ), t || a.push( | ||
| P(l, "mousedown", C), | ||
| P(l, "mousemove", S), | ||
| P(l, "mousemove", k), | ||
| P(l, "mouseup", M) | ||
@@ -415,3 +415,3 @@ )); | ||
| }; | ||
| }, me = { | ||
| }, be = { | ||
| ArrowUp: "up", | ||
@@ -421,7 +421,7 @@ ArrowRight: "right", | ||
| ArrowLeft: "left" | ||
| }, be = (e = {}, n) => { | ||
| }, ye = (e = {}, n) => { | ||
| const { filter: t = [], throttleMs: o = 0 } = e; | ||
| let r = null, a = 0; | ||
| const l = (i) => { | ||
| const d = me[i.key] ?? null; | ||
| const d = be[i.key] ?? null; | ||
| if (d !== null) { | ||
@@ -445,6 +445,6 @@ if (o > 0) { | ||
| }; | ||
| }, ye = 200, De = 10, we = (e = {}, n) => { | ||
| }, De = 200, we = 10, Ee = (e = {}, n) => { | ||
| const { | ||
| debounceMs: t = ye, | ||
| deltaThreshold: o = De | ||
| debounceMs: t = De, | ||
| deltaThreshold: o = we | ||
| } = e, r = q(); | ||
@@ -456,3 +456,3 @@ let a = null, l = null; | ||
| let v = null; | ||
| L(p.deltaY) >= o ? v = p.deltaY > 0 ? "down" : "up" : L(p.deltaX) >= o && (v = p.deltaX > 0 ? "right" : "left"), v !== null && (p.preventDefault(), a = v, l = p, i.cancel(), i()); | ||
| z(p.deltaY) >= o ? v = p.deltaY > 0 ? "down" : "up" : z(p.deltaX) >= o && (v = p.deltaX > 0 ? "right" : "left"), v !== null && (p.preventDefault(), a = v, l = p, i.cancel(), i()); | ||
| }; | ||
@@ -471,3 +471,3 @@ return { | ||
| }; | ||
| }, re = 300, Ee = 0.12, Q = 3, xe = re + 100, Te = 200, Pe = (e, n, t) => ie(n, e, e, 1, t), Je = (e, n = {}) => { | ||
| }, re = 300, xe = 0.12, Q = 3, Te = re + 100, Pe = 200, ke = (e, n, t) => ie(n, e, e, 1, t), Qe = (e, n = {}) => { | ||
| let t = { | ||
@@ -479,6 +479,6 @@ count: e.count, | ||
| transitionDuration: e.transitionDuration ?? re, | ||
| swipeDistanceFactor: e.swipeDistanceFactor ?? Ee, | ||
| rangeExtractor: e.rangeExtractor ?? Pe, | ||
| swipeDistanceFactor: e.swipeDistanceFactor ?? xe, | ||
| rangeExtractor: e.rangeExtractor ?? ke, | ||
| enableWheel: e.enableWheel ?? !1, | ||
| wheelDebounceMs: e.wheelDebounceMs ?? Te, | ||
| wheelDebounceMs: e.wheelDebounceMs ?? Pe, | ||
| enableGestures: e.enableGestures ?? !0, | ||
@@ -514,3 +514,3 @@ enableNavKeys: e.enableNavKeys ?? !0 | ||
| }, E = (u, f) => u.length === 1 ? !0 : u.length === 2 && (s() === 0 && f === -1 || s() === 1 && f === 1), D = async (u) => { | ||
| i = !0, S.unobserve(); | ||
| i = !0, k.unobserve(); | ||
| const f = c.value, m = K( | ||
@@ -537,3 +537,3 @@ s() + u, | ||
| }; | ||
| }), S.observe(), i = !1; | ||
| }), k.observe(), i = !1; | ||
| } | ||
@@ -552,4 +552,4 @@ }, F = (u) => { | ||
| A = !1; | ||
| const m = t.direction === "horizontal" ? 0 : 1, w = r * t.swipeDistanceFactor, x = m === 0 ? z(u.distance) : k(u.distance), O = m === 0 ? z(u.velocity) : k(u.velocity), T = ae(x) ? 1 : -1; | ||
| !E(c.value, T) && (L(x) > w || O > 1400 && L(x) > w / 2) && (D(T).then(() => { | ||
| const m = t.direction === "horizontal" ? 0 : 1, w = r * t.swipeDistanceFactor, x = m === 0 ? L(u.distance) : S(u.distance), O = m === 0 ? L(u.velocity) : S(u.velocity), T = ae(x) ? 1 : -1; | ||
| !E(c.value, T) && (z(x) > w || O > 1400 && z(x) > w / 2) && (D(T).then(() => { | ||
| l && g(); | ||
@@ -563,3 +563,3 @@ }), a = !1), o.onDragEnd?.(d.value), a && (await b(() => { | ||
| }), l && g(), o.onDragCanceled?.(d.value)), a = !0; | ||
| }, C = () => t.direction === "horizontal", S = ve( | ||
| }, C = () => t.direction === "horizontal", k = me( | ||
| { useTouchEventsOnly: !0 }, | ||
@@ -577,4 +577,4 @@ { | ||
| } | ||
| ), M = be( | ||
| { throttleMs: xe }, | ||
| ), M = ye( | ||
| { throttleMs: Te }, | ||
| { | ||
@@ -586,3 +586,3 @@ onKeyPress: (u) => { | ||
| } | ||
| ), W = we( | ||
| ), W = Ee( | ||
| { debounceMs: t.wheelDebounceMs }, | ||
@@ -613,4 +613,4 @@ { | ||
| if (m === d.value) return; | ||
| if (S.unobserve(), !f) { | ||
| o.onBeforeChange?.(d.value, m, s()), d.value = m, g(0), o.onAfterChange?.(d.value, s()), S.observe(); | ||
| if (k.unobserve(), !f) { | ||
| o.onBeforeChange?.(d.value, m, s()), d.value = m, g(0), o.onAfterChange?.(d.value, s()), k.observe(); | ||
| return; | ||
@@ -639,3 +639,3 @@ } | ||
| v.value = null, d.value = m, g(0); | ||
| }), o.onAfterChange?.(d.value, s()), S.observe(), i = !1; | ||
| }), o.onAfterChange?.(d.value, s()), k.observe(), i = !1; | ||
| } | ||
@@ -653,3 +653,3 @@ }, | ||
| const w = t.direction === "horizontal"; | ||
| S.updateEvents({ | ||
| k.updateEvents({ | ||
| onHorizontalDragStart: w ? V : void 0, | ||
@@ -667,18 +667,18 @@ onHorizontalDragUpdate: w ? F : void 0, | ||
| observe() { | ||
| t.enableGestures && S.observe(), t.enableNavKeys && M.attach(), t.enableWheel && W.attach(); | ||
| t.enableGestures && k.observe(), t.enableNavKeys && M.attach(), t.enableWheel && W.attach(); | ||
| }, | ||
| unobserve() { | ||
| S.unobserve(), M.detach(), W.detach(); | ||
| k.unobserve(), M.detach(), W.detach(); | ||
| }, | ||
| attach(u) { | ||
| t.enableGestures && S.attach(u); | ||
| t.enableGestures && k.attach(u); | ||
| }, | ||
| detach() { | ||
| S.detach(), M.detach(), W.detach(); | ||
| k.detach(), M.detach(), W.detach(); | ||
| }, | ||
| dispose() { | ||
| S.detach(), M.detach(), W.detach(), y?.(); | ||
| k.detach(), M.detach(), W.detach(), y?.(); | ||
| } | ||
| }; | ||
| }, Se = 4, ke = 1e-3, Fe = 1e-7, ze = 10, X = 11, H = 1 / (X - 1), Le = (e, n, t, o) => { | ||
| }, Se = 4, Fe = 1e-3, Le = 1e-7, ze = 10, X = 11, H = 1 / (X - 1), Me = (e, n, t, o) => { | ||
| const r = (s, g) => 1 - 3 * g + 3 * s, a = (s, g) => 3 * g - 6 * s, l = (s) => 3 * s, i = (s, g, b) => ((r(g, b) * s + a(g, b)) * s + l(g)) * s, d = (s, g, b) => 3 * r(g, b) * s * s + 2 * a(g, b) * s + l(g), p = (s, g, b) => { | ||
@@ -688,3 +688,3 @@ let E, D, F = 0; | ||
| D = g + (b - g) / 2, E = i(D, e, t) - s, E > 0 ? b = D : g = D; | ||
| while (L(E) > Fe && ++F < ze); | ||
| while (z(E) > Le && ++F < ze); | ||
| return D; | ||
@@ -709,3 +709,3 @@ }, v = (s, g) => { | ||
| const D = (s - c[b]) / (c[b + 1] - c[b]), F = g + D * H, A = d(F, e, t); | ||
| return A >= ke ? v(s, F) : A === 0 ? F : p(s, g, g + H); | ||
| return A >= Fe ? v(s, F) : A === 0 ? F : p(s, g, g + H); | ||
| }; | ||
@@ -715,3 +715,3 @@ return (s) => s === 0 || s === 1 ? s : i(h(s), n, o); | ||
| let Z = null; | ||
| const Me = () => (Z === null && (Z = Le(0.4, 0, 0.2, 1)), Z), Qe = (e) => { | ||
| const Ae = () => (Z === null && (Z = Me(0.4, 0, 0.2, 1)), Z), Ze = (e) => { | ||
| const { from: n, to: t, duration: o, onUpdate: r, onComplete: a } = e; | ||
@@ -724,3 +724,3 @@ if (o <= 0) | ||
| i ??= v; | ||
| const c = v - i, h = Me()(K(c / o, 0, 1)), s = le(h, n, t); | ||
| const c = v - i, h = Ae()(K(c / o, 0, 1)), s = le(h, n, t); | ||
| r(s), c < o ? l = requestAnimationFrame(p) : a?.(); | ||
@@ -734,3 +734,3 @@ }; | ||
| return n - t + a; | ||
| }, Ze = (e, n, t, o, r) => { | ||
| }, et = (e, n, t, o, r) => { | ||
| if (o === 0) return {}; | ||
@@ -746,3 +746,3 @@ const a = N( | ||
| }; | ||
| }, Ae = 20, Ce = 1e3, _e = 0.02, et = (e, n, t, o, r) => { | ||
| }, Ce = 20, _e = 1e3, Ie = 0.02, tt = (e, n, t, o, r) => { | ||
| if (o === 0) return {}; | ||
@@ -757,5 +757,5 @@ const a = N( | ||
| return { opacity: 0, zIndex: 0 }; | ||
| const l = r === "horizontal", i = l ? "X" : "Y", d = l ? "Y" : "X", p = a * o, v = Math.sin(Math.abs(a) * Math.PI), c = a >= 0 ? -1 : 1, h = l ? 1 : -1, s = v * Ae * c * h, g = 1 - v * _e, b = l ? a >= 0 ? "center right" : "center left" : a >= 0 ? "center bottom" : "center top"; | ||
| const l = r === "horizontal", i = l ? "X" : "Y", d = l ? "Y" : "X", p = a * o, v = Math.sin(Math.abs(a) * Math.PI), c = a >= 0 ? -1 : 1, h = l ? 1 : -1, s = v * Ce * c * h, g = 1 - v * Ie, b = l ? a >= 0 ? "center right" : "center left" : a >= 0 ? "center bottom" : "center top"; | ||
| return { | ||
| transform: `translate${i}(${p}px) scale(${g}) perspective(${Ce}px) rotate${d}(${s}deg)`, | ||
| transform: `translate${i}(${p}px) scale(${g}) perspective(${_e}px) rotate${d}(${s}deg)`, | ||
| transformOrigin: b, | ||
@@ -765,3 +765,3 @@ opacity: 1, | ||
| }; | ||
| }, Ie = 60, Re = 500, tt = (e, n, t, o, r) => { | ||
| }, Re = 60, We = 500, nt = (e, n, t, o, r) => { | ||
| if (o === 0) return {}; | ||
@@ -776,5 +776,5 @@ const a = N( | ||
| return { opacity: 0, zIndex: 0 }; | ||
| const l = r === "horizontal", i = l ? "X" : "Y", d = l ? "Y" : "X", p = a * o, v = l ? 1 : -1, c = a * Ie * v, h = l ? a < 0 ? "right center" : "left center" : a < 0 ? "center bottom" : "center top"; | ||
| const l = r === "horizontal", i = l ? "X" : "Y", d = l ? "Y" : "X", p = a * o, v = l ? 1 : -1, c = a * Re * v, h = l ? a < 0 ? "right center" : "left center" : a < 0 ? "center bottom" : "center top"; | ||
| return { | ||
| transform: `translate${i}(${p}px) perspective(${Re}px) rotate${d}(${c}deg)`, | ||
| transform: `translate${i}(${p}px) perspective(${We}px) rotate${d}(${c}deg)`, | ||
| transformOrigin: h, | ||
@@ -784,3 +784,3 @@ opacity: 1, | ||
| }; | ||
| }, nt = (e, n, t, o, r) => { | ||
| }, ot = (e, n, t, o, r) => { | ||
| if (o === 0) return { opacity: 0 }; | ||
@@ -792,3 +792,3 @@ const a = N( | ||
| o | ||
| ), l = L(a); | ||
| ), l = z(a); | ||
| return { | ||
@@ -798,3 +798,3 @@ opacity: K(1 - l, 0, 1), | ||
| }; | ||
| }, ot = (e, n, t, o, r) => { | ||
| }, st = (e, n, t, o, r) => { | ||
| if (o === 0) return { opacity: 0 }; | ||
@@ -806,3 +806,3 @@ const a = N( | ||
| o | ||
| ), l = L(a); | ||
| ), l = z(a); | ||
| if (l >= 1) return { opacity: 0, zIndex: 0 }; | ||
@@ -817,43 +817,44 @@ const i = 1 - l * 0.2, d = 1 - l; | ||
| export { | ||
| L as abs, | ||
| Qe as animate, | ||
| z as abs, | ||
| Ze as animate, | ||
| ne as batch, | ||
| Xe as captureFrame, | ||
| Ye as captureFrame, | ||
| K as clamp, | ||
| je as createBodyLock, | ||
| he as createBodyLock, | ||
| ce as createComputed, | ||
| He as createContentLoadingController, | ||
| Ue as createContentPreloader, | ||
| Ue as createContentLoadingController, | ||
| Xe as createContentPreloader, | ||
| G as createDeferred, | ||
| q as createDisposableList, | ||
| ve as createGestureController, | ||
| be as createKeyboardController, | ||
| me as createGestureController, | ||
| ye as createKeyboardController, | ||
| B as createLruCache, | ||
| Ye as createSharedVideo, | ||
| Be as createSharedVideo, | ||
| R as createSignal, | ||
| Je as createSliderController, | ||
| Ke as createSoundController, | ||
| we as createWheelController, | ||
| tt as cubeTransition, | ||
| Pe as defaultRangeExtractor, | ||
| Ge as exitFullscreen, | ||
| Qe as createSliderController, | ||
| Ne as createSoundController, | ||
| Ee as createWheelController, | ||
| nt as cubeTransition, | ||
| ke as defaultRangeExtractor, | ||
| je as exitFullscreen, | ||
| ie as extractRange, | ||
| nt as fadeTransition, | ||
| z as first, | ||
| et as flipTransition, | ||
| Be as fullscreenSignal, | ||
| Oe as generate, | ||
| ot as fadeTransition, | ||
| L as first, | ||
| tt as flipTransition, | ||
| qe as fullscreenSignal, | ||
| Ve as generate, | ||
| N as getSlideProgress, | ||
| ae as isNegative, | ||
| k as last, | ||
| S as last, | ||
| le as lerp, | ||
| Y as noop, | ||
| P as observeDomEvent, | ||
| $e as observeMediaLoading, | ||
| Ve as reaction, | ||
| qe as requestFullscreen, | ||
| Ze as slideTransition, | ||
| Ne as syncMutedToVideo, | ||
| Ke as observeMediaLoading, | ||
| $e as reaction, | ||
| Ge as requestFullscreen, | ||
| Je as sharedBodyLock, | ||
| et as slideTransition, | ||
| He as syncMutedToVideo, | ||
| oe as timeout, | ||
| ot as zoomTransition | ||
| st as zoomTransition | ||
| }; |
@@ -31,1 +31,12 @@ import { Disposer } from './disposable'; | ||
| export declare const createBodyLock: () => BodyLock; | ||
| /** | ||
| * Module-level shared body lock. Framework bindings (`@reelkit/react`, | ||
| * `@reelkit/vue`, etc.) use this so multiple concurrent callers across | ||
| * unrelated components share a single reference counter — nested modals | ||
| * and overlays interleave correctly without stepping on each other's | ||
| * saved body styles. | ||
| * | ||
| * If you need an isolated lock (e.g. for testing, or for an embedded | ||
| * iframe scenario), call `createBodyLock()` directly. | ||
| */ | ||
| export declare const sharedBodyLock: BodyLock; |
@@ -16,2 +16,2 @@ export { first, last, generate } from './array'; | ||
| export { fullscreenSignal, requestFullscreen, exitFullscreen, } from './fullscreen'; | ||
| export { createBodyLock, type BodyLock } from './bodyLock'; | ||
| export { createBodyLock, sharedBodyLock, type BodyLock } from './bodyLock'; |
+1
-1
| { | ||
| "name": "@reelkit/core", | ||
| "version": "0.3.0", | ||
| "version": "0.4.0", | ||
| "type": "module", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
79961
0.71%2003
0.6%