jean-react-utils 0.2.2 → 0.2.3
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +51 -41
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -13
package/dist/index.d.mts
CHANGED
|
@@ -236,7 +236,7 @@ interface SmoothScrollProviderProps {
|
|
|
236
236
|
}
|
|
237
237
|
declare function SmoothScrollProvider({ children }: SmoothScrollProviderProps): react_jsx_runtime.JSX.Element;
|
|
238
238
|
|
|
239
|
-
declare function ThemeToggle(): react_jsx_runtime.JSX.Element;
|
|
239
|
+
declare function ThemeToggle(): react_jsx_runtime.JSX.Element | null;
|
|
240
240
|
|
|
241
241
|
declare function ThemeProvider({ children, ...props }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
242
242
|
|
package/dist/index.d.ts
CHANGED
|
@@ -236,7 +236,7 @@ interface SmoothScrollProviderProps {
|
|
|
236
236
|
}
|
|
237
237
|
declare function SmoothScrollProvider({ children }: SmoothScrollProviderProps): react_jsx_runtime.JSX.Element;
|
|
238
238
|
|
|
239
|
-
declare function ThemeToggle(): react_jsx_runtime.JSX.Element;
|
|
239
|
+
declare function ThemeToggle(): react_jsx_runtime.JSX.Element | null;
|
|
240
240
|
|
|
241
241
|
declare function ThemeProvider({ children, ...props }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
242
242
|
|
package/dist/index.js
CHANGED
|
@@ -41,12 +41,12 @@ var require_use_sync_external_store_shim_production = __commonJS({
|
|
|
41
41
|
return x2 === y3 && (0 !== x2 || 1 / x2 === 1 / y3) || x2 !== x2 && y3 !== y3;
|
|
42
42
|
}
|
|
43
43
|
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
|
44
|
-
var
|
|
45
|
-
var
|
|
44
|
+
var useState5 = React3.useState;
|
|
45
|
+
var useEffect3 = React3.useEffect;
|
|
46
46
|
var useLayoutEffect = React3.useLayoutEffect;
|
|
47
47
|
var useDebugValue2 = React3.useDebugValue;
|
|
48
48
|
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
49
|
-
var value = getSnapshot(), _useState =
|
|
49
|
+
var value = getSnapshot(), _useState = useState5({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
50
50
|
useLayoutEffect(
|
|
51
51
|
function() {
|
|
52
52
|
inst.value = value;
|
|
@@ -55,7 +55,7 @@ var require_use_sync_external_store_shim_production = __commonJS({
|
|
|
55
55
|
},
|
|
56
56
|
[subscribe, value, getSnapshot]
|
|
57
57
|
);
|
|
58
|
-
|
|
58
|
+
useEffect3(
|
|
59
59
|
function() {
|
|
60
60
|
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
61
61
|
return subscribe(function() {
|
|
@@ -104,7 +104,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
104
104
|
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
105
105
|
), didWarnUncachedGetSnapshot = true);
|
|
106
106
|
}
|
|
107
|
-
cachedValue =
|
|
107
|
+
cachedValue = useState5({
|
|
108
108
|
inst: { value, getSnapshot }
|
|
109
109
|
});
|
|
110
110
|
var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
|
|
@@ -116,7 +116,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
116
116
|
},
|
|
117
117
|
[subscribe, value, getSnapshot]
|
|
118
118
|
);
|
|
119
|
-
|
|
119
|
+
useEffect3(
|
|
120
120
|
function() {
|
|
121
121
|
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
122
122
|
return subscribe(function() {
|
|
@@ -142,7 +142,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
142
142
|
return getSnapshot();
|
|
143
143
|
}
|
|
144
144
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
145
|
-
var React3 = require("react"), objectIs = "function" === typeof Object.is ? Object.is : is,
|
|
145
|
+
var React3 = require("react"), objectIs = "function" === typeof Object.is ? Object.is : is, useState5 = React3.useState, useEffect3 = React3.useEffect, useLayoutEffect = React3.useLayoutEffect, useDebugValue2 = React3.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
146
146
|
exports2.useSyncExternalStore = void 0 !== React3.useSyncExternalStore ? React3.useSyncExternalStore : shim;
|
|
147
147
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
148
148
|
}();
|
|
@@ -173,7 +173,7 @@ var require_with_selector_production = __commonJS({
|
|
|
173
173
|
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
|
174
174
|
var useSyncExternalStore = shim.useSyncExternalStore;
|
|
175
175
|
var useRef = React3.useRef;
|
|
176
|
-
var
|
|
176
|
+
var useEffect3 = React3.useEffect;
|
|
177
177
|
var useMemo2 = React3.useMemo;
|
|
178
178
|
var useDebugValue2 = React3.useDebugValue;
|
|
179
179
|
exports2.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
@@ -217,7 +217,7 @@ var require_with_selector_production = __commonJS({
|
|
|
217
217
|
[getSnapshot, getServerSnapshot, selector, isEqual]
|
|
218
218
|
);
|
|
219
219
|
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
|
|
220
|
-
|
|
220
|
+
useEffect3(
|
|
221
221
|
function() {
|
|
222
222
|
inst.hasValue = true;
|
|
223
223
|
inst.value = value;
|
|
@@ -239,7 +239,7 @@ var require_with_selector_development = __commonJS({
|
|
|
239
239
|
return x2 === y3 && (0 !== x2 || 1 / x2 === 1 / y3) || x2 !== x2 && y3 !== y3;
|
|
240
240
|
}
|
|
241
241
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
242
|
-
var React3 = require("react"), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef = React3.useRef,
|
|
242
|
+
var React3 = require("react"), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef = React3.useRef, useEffect3 = React3.useEffect, useMemo2 = React3.useMemo, useDebugValue2 = React3.useDebugValue;
|
|
243
243
|
exports2.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
244
244
|
var instRef = useRef(null);
|
|
245
245
|
if (null === instRef.current) {
|
|
@@ -282,7 +282,7 @@ var require_with_selector_development = __commonJS({
|
|
|
282
282
|
[getSnapshot, getServerSnapshot, selector, isEqual]
|
|
283
283
|
);
|
|
284
284
|
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
|
|
285
|
-
|
|
285
|
+
useEffect3(
|
|
286
286
|
function() {
|
|
287
287
|
inst.hasValue = true;
|
|
288
288
|
inst.value = value;
|
|
@@ -2950,7 +2950,7 @@ function SubTitle({ children, title, className = "" }) {
|
|
|
2950
2950
|
}
|
|
2951
2951
|
|
|
2952
2952
|
// src/layout/Header/index.tsx
|
|
2953
|
-
var
|
|
2953
|
+
var import_react2 = require("react");
|
|
2954
2954
|
var import_link = __toESM(require("next/link"));
|
|
2955
2955
|
var import_framer_motion2 = require("framer-motion");
|
|
2956
2956
|
|
|
@@ -2970,6 +2970,9 @@ function BreadIcon({ isMenuOpen }) {
|
|
|
2970
2970
|
// src/layout/Header/index.tsx
|
|
2971
2971
|
var import_navigation = require("next/navigation");
|
|
2972
2972
|
|
|
2973
|
+
// src/theme/providers/theme-toggle.tsx
|
|
2974
|
+
var import_react = require("react");
|
|
2975
|
+
|
|
2973
2976
|
// ../node_modules/next-themes/dist/index.mjs
|
|
2974
2977
|
var t = __toESM(require("react"), 1);
|
|
2975
2978
|
var M = (e3, i2, s2, u2, m2, a3, l2, h) => {
|
|
@@ -3070,17 +3073,24 @@ var E = (e3) => (e3 || (e3 = window.matchMedia(I)), e3.matches ? "dark" : "light
|
|
|
3070
3073
|
var import_lucide_react = require("lucide-react");
|
|
3071
3074
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
3072
3075
|
function ThemeToggle() {
|
|
3076
|
+
const [mounted, setMounted] = (0, import_react.useState)(false);
|
|
3073
3077
|
const { theme, setTheme } = z();
|
|
3078
|
+
(0, import_react.useEffect)(() => {
|
|
3079
|
+
setMounted(true);
|
|
3080
|
+
}, []);
|
|
3081
|
+
if (!mounted) {
|
|
3082
|
+
return null;
|
|
3083
|
+
}
|
|
3084
|
+
const isDark = theme === "dark";
|
|
3074
3085
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
3075
3086
|
Button,
|
|
3076
3087
|
{
|
|
3077
3088
|
variant: "borderNone",
|
|
3078
3089
|
size: "icon",
|
|
3079
|
-
onClick: () => setTheme(
|
|
3090
|
+
onClick: () => setTheme(isDark ? "light" : "dark"),
|
|
3080
3091
|
children: [
|
|
3081
3092
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react.Sun, { className: "h-5 w-5 rotate-0 scale-100 transition-all dark:rotate-90 dark:scale-0" }),
|
|
3082
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react.Moon, { className: "absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" })
|
|
3083
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "sr-only", children: "Toggle theme" })
|
|
3093
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react.Moon, { className: "absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" })
|
|
3084
3094
|
]
|
|
3085
3095
|
}
|
|
3086
3096
|
);
|
|
@@ -3102,7 +3112,7 @@ var Header = ({
|
|
|
3102
3112
|
enableAnimation = true,
|
|
3103
3113
|
theme = {}
|
|
3104
3114
|
}) => {
|
|
3105
|
-
const [isMenuOpen, setIsMenuOpen] = (0,
|
|
3115
|
+
const [isMenuOpen, setIsMenuOpen] = (0, import_react2.useState)(false);
|
|
3106
3116
|
const selectedKey = (0, import_navigation.usePathname)().split("/")[2] || "home";
|
|
3107
3117
|
const baseNavClassName = `fixed top-0 left-0 right-0 z-50 backdrop-blur-lg ${className}`;
|
|
3108
3118
|
const navVariants = {
|
|
@@ -3339,10 +3349,10 @@ function BasicLayout({ children }) {
|
|
|
3339
3349
|
}
|
|
3340
3350
|
|
|
3341
3351
|
// src/hooks/useForceRerender.ts
|
|
3342
|
-
var
|
|
3352
|
+
var import_react3 = require("react");
|
|
3343
3353
|
var useForceRerender = () => {
|
|
3344
|
-
const [key, setKey] = (0,
|
|
3345
|
-
const forceRerender = (0,
|
|
3354
|
+
const [key, setKey] = (0, import_react3.useState)(0);
|
|
3355
|
+
const forceRerender = (0, import_react3.useCallback)(() => {
|
|
3346
3356
|
setKey((prevKey) => prevKey + 1);
|
|
3347
3357
|
}, []);
|
|
3348
3358
|
return [key, forceRerender];
|
|
@@ -3350,7 +3360,7 @@ var useForceRerender = () => {
|
|
|
3350
3360
|
var useForceRerender_default = useForceRerender;
|
|
3351
3361
|
|
|
3352
3362
|
// ../node_modules/@studio-freight/hamo/dist/hamo.modern.mjs
|
|
3353
|
-
var
|
|
3363
|
+
var import_react4 = require("react");
|
|
3354
3364
|
|
|
3355
3365
|
// ../node_modules/@studio-freight/tempus/dist/tempus.modern.mjs
|
|
3356
3366
|
var a = "undefined" != typeof window && new class {
|
|
@@ -3437,7 +3447,7 @@ var createNanoEvents = () => ({
|
|
|
3437
3447
|
|
|
3438
3448
|
// ../node_modules/@studio-freight/hamo/dist/hamo.modern.mjs
|
|
3439
3449
|
function f(e3, n3 = 0) {
|
|
3440
|
-
(0,
|
|
3450
|
+
(0, import_react4.useEffect)(() => {
|
|
3441
3451
|
if (e3) return a.add(e3, n3), () => a.remove(e3);
|
|
3442
3452
|
}, [e3, n3]);
|
|
3443
3453
|
}
|
|
@@ -3475,11 +3485,11 @@ function E2(e3, t4 = 0) {
|
|
|
3475
3485
|
}
|
|
3476
3486
|
var L = createNanoEvents();
|
|
3477
3487
|
function k({ ignoreTransform: r3 = false, ignoreSticky: c2 = true, debounce: u2 = 500, lazy: s2 = false, callback: a3 } = {}) {
|
|
3478
|
-
const [d2, l2] = (0,
|
|
3488
|
+
const [d2, l2] = (0, import_react4.useState)(), f3 = (0, import_react4.useRef)({}), [h, m2] = (0, import_react4.useState)({}), v = (0, import_react4.useCallback)(({ top: e3, left: t4, width: n3, height: r4, element: o3 }) => {
|
|
3479
3489
|
var c3, i2, u3, d3, l3;
|
|
3480
3490
|
e3 = null != (c3 = e3) ? c3 : f3.current.top, t4 = null != (i2 = t4) ? i2 : f3.current.left, n3 = null != (u3 = n3) ? u3 : f3.current.width, r4 = null != (d3 = r4) ? d3 : f3.current.height, o3 = null != (l3 = o3) ? l3 : f3.current.element, e3 === f3.current.top && t4 === f3.current.left && n3 === f3.current.width && r4 === f3.current.height && o3 === f3.current.element || (f3.current.top = e3, f3.current.y = e3, f3.current.width = n3, f3.current.height = r4, f3.current.left = t4, f3.current.x = t4, f3.current.bottom = e3 + r4, f3.current.right = t4 + n3, f3.current.element = o3, null == a3 || a3(f3.current), s2 || m2(g({}, f3.current)));
|
|
3481
3491
|
}, [s2]);
|
|
3482
|
-
(0,
|
|
3492
|
+
(0, import_react4.useEffect)(() => {
|
|
3483
3493
|
if (!d2) return;
|
|
3484
3494
|
const e3 = d2.getBoundingClientRect();
|
|
3485
3495
|
v({ width: e3.width, height: e3.height });
|
|
@@ -3490,7 +3500,7 @@ function k({ ignoreTransform: r3 = false, ignoreSticky: c2 = true, debounce: u2
|
|
|
3490
3500
|
n3.disconnect(), t4.cancel();
|
|
3491
3501
|
};
|
|
3492
3502
|
}, [d2, u2, v]);
|
|
3493
|
-
const [w, k2] = (0,
|
|
3503
|
+
const [w, k2] = (0, import_react4.useState)(), x2 = (0, import_react4.useCallback)(() => {
|
|
3494
3504
|
if (!d2) return;
|
|
3495
3505
|
let e3, t4;
|
|
3496
3506
|
if (c2 && p(d2), r3) e3 = y(d2), t4 = z2(d2);
|
|
@@ -3500,18 +3510,18 @@ function k({ ignoreTransform: r3 = false, ignoreSticky: c2 = true, debounce: u2
|
|
|
3500
3510
|
}
|
|
3501
3511
|
c2 && b2(d2), v({ top: e3, left: t4, element: d2 });
|
|
3502
3512
|
}, [r3, c2, d2, v]);
|
|
3503
|
-
(0,
|
|
3513
|
+
(0, import_react4.useEffect)(() => {
|
|
3504
3514
|
x2();
|
|
3505
3515
|
const e3 = functionDebounce(x2, u2), t4 = new ResizeObserver(e3);
|
|
3506
3516
|
return t4.observe(null != w ? w : document.body), () => {
|
|
3507
3517
|
t4.disconnect(), e3.cancel();
|
|
3508
3518
|
};
|
|
3509
|
-
}, [w, u2, x2]), (0,
|
|
3519
|
+
}, [w, u2, x2]), (0, import_react4.useEffect)(() => L.on("resize", function() {
|
|
3510
3520
|
if (!d2) return;
|
|
3511
3521
|
const e3 = d2.getBoundingClientRect();
|
|
3512
3522
|
v({ width: e3.width, height: e3.height }), x2();
|
|
3513
3523
|
}), [d2, x2, v]);
|
|
3514
|
-
const O2 = (0,
|
|
3524
|
+
const O2 = (0, import_react4.useCallback)(() => f3.current, []);
|
|
3515
3525
|
return [l2, s2 ? O2 : h, k2];
|
|
3516
3526
|
}
|
|
3517
3527
|
k.resize = () => {
|
|
@@ -3766,7 +3776,7 @@ var Lenis = class {
|
|
|
3766
3776
|
};
|
|
3767
3777
|
|
|
3768
3778
|
// ../node_modules/@studio-freight/react-lenis/dist/react-lenis.mjs
|
|
3769
|
-
var
|
|
3779
|
+
var import_react6 = __toESM(require("react"), 1);
|
|
3770
3780
|
|
|
3771
3781
|
// ../node_modules/zustand/esm/vanilla.mjs
|
|
3772
3782
|
var import_meta = {};
|
|
@@ -3802,10 +3812,10 @@ var createStoreImpl = (createState) => {
|
|
|
3802
3812
|
var createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
|
|
3803
3813
|
|
|
3804
3814
|
// ../node_modules/zustand/esm/index.mjs
|
|
3805
|
-
var
|
|
3815
|
+
var import_react5 = __toESM(require("react"), 1);
|
|
3806
3816
|
var import_with_selector = __toESM(require_with_selector(), 1);
|
|
3807
3817
|
var import_meta2 = {};
|
|
3808
|
-
var { useDebugValue } =
|
|
3818
|
+
var { useDebugValue } = import_react5.default;
|
|
3809
3819
|
var { useSyncExternalStoreWithSelector } = import_with_selector.default;
|
|
3810
3820
|
var didWarnAboutEqualityFn = false;
|
|
3811
3821
|
var identity = (arg) => arg;
|
|
@@ -3841,9 +3851,9 @@ var create = (createState) => createState ? createImpl(createState) : createImpl
|
|
|
3841
3851
|
|
|
3842
3852
|
// ../node_modules/@studio-freight/react-lenis/dist/react-lenis.mjs
|
|
3843
3853
|
"undefined" != typeof window && (window.reactLenisVersion = "0.0.47");
|
|
3844
|
-
var d = (0,
|
|
3854
|
+
var d = (0, import_react6.createContext)(null);
|
|
3845
3855
|
var m = create(() => ({}));
|
|
3846
|
-
var y2 = (0,
|
|
3856
|
+
var y2 = (0, import_react6.forwardRef)((o3, a3) => {
|
|
3847
3857
|
var { children: f3, root: p2 = false, options: b3 = {}, autoRaf: y3 = true, rafPriority: v = 0, className: O2 } = o3, g2 = function(r3, e3) {
|
|
3848
3858
|
var t4 = {};
|
|
3849
3859
|
for (var n3 in r3) Object.prototype.hasOwnProperty.call(r3, n3) && e3.indexOf(n3) < 0 && (t4[n3] = r3[n3]);
|
|
@@ -3853,33 +3863,33 @@ var y2 = (0, import_react5.forwardRef)((o3, a3) => {
|
|
|
3853
3863
|
}
|
|
3854
3864
|
return t4;
|
|
3855
3865
|
}(o3, ["children", "root", "options", "autoRaf", "rafPriority", "className"]);
|
|
3856
|
-
const h = (0,
|
|
3866
|
+
const h = (0, import_react6.useRef)(null), w = (0, import_react6.useRef)(null), [k2, N2] = (0, import_react6.useState)(void 0), j = (0, import_react6.useRef)([]), C = (0, import_react6.useCallback)((r3, e3) => {
|
|
3857
3867
|
j.current.push({ callback: r3, priority: e3 }), j.current.sort((r4, e4) => r4.priority - e4.priority);
|
|
3858
|
-
}, []), E3 = (0,
|
|
3868
|
+
}, []), E3 = (0, import_react6.useCallback)((r3) => {
|
|
3859
3869
|
j.current = j.current.filter((e3) => e3.callback !== r3);
|
|
3860
3870
|
}, []);
|
|
3861
|
-
(0,
|
|
3871
|
+
(0, import_react6.useImperativeHandle)(a3, () => ({ wrapper: h.current, content: w.current, lenis: k2 }), [k2]), (0, import_react6.useEffect)(() => {
|
|
3862
3872
|
const r3 = new Lenis(Object.assign(Object.assign({}, b3), !p2 && { wrapper: h.current, content: w.current }));
|
|
3863
3873
|
return N2(r3), () => {
|
|
3864
3874
|
r3.destroy(), N2(void 0);
|
|
3865
3875
|
};
|
|
3866
3876
|
}, [p2, JSON.stringify(b3)]), f((r3) => {
|
|
3867
3877
|
y3 && (null == k2 || k2.raf(r3));
|
|
3868
|
-
}, v), (0,
|
|
3878
|
+
}, v), (0, import_react6.useEffect)(() => {
|
|
3869
3879
|
p2 && k2 && m.setState({ lenis: k2, addCallback: C, removeCallback: E3 });
|
|
3870
3880
|
}, [p2, k2, C, E3]);
|
|
3871
|
-
const P2 = (0,
|
|
3881
|
+
const P2 = (0, import_react6.useCallback)((r3) => {
|
|
3872
3882
|
for (let e3 = 0; e3 < j.current.length; e3++) j.current[e3].callback(r3);
|
|
3873
3883
|
}, []);
|
|
3874
|
-
(0,
|
|
3884
|
+
(0, import_react6.useEffect)(() => (null == k2 || k2.on("scroll", P2), () => {
|
|
3875
3885
|
null == k2 || k2.off("scroll", P2);
|
|
3876
3886
|
}), [k2, P2]);
|
|
3877
|
-
const S = (0,
|
|
3887
|
+
const S = (0, import_react6.useCallback)(() => {
|
|
3878
3888
|
h.current && (h.current.className = clsx_default(null == k2 ? void 0 : k2.className, O2));
|
|
3879
3889
|
}, [k2, O2]);
|
|
3880
|
-
return (0,
|
|
3890
|
+
return (0, import_react6.useEffect)(() => (S(), null == k2 || k2.on("className change", S), () => {
|
|
3881
3891
|
null == k2 || k2.off("className change", S);
|
|
3882
|
-
}), [k2, S]),
|
|
3892
|
+
}), [k2, S]), import_react6.default.createElement(d.Provider, { value: { lenis: k2, addCallback: C, removeCallback: E3 } }, p2 ? f3 : import_react6.default.createElement("div", Object.assign({ ref: h, className: clsx_default(null == k2 ? void 0 : k2.className, O2) }, g2), import_react6.default.createElement("div", { ref: w }, f3)));
|
|
3883
3893
|
});
|
|
3884
3894
|
|
|
3885
3895
|
// src/providers/smooth-scroll-provider.tsx
|