@dotss/tictoccroc 0.0.32 → 0.0.34
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/shared/components/ChatKit/InputBar/InputBar.mjs +1 -0
- package/dist/shared/components/Image/Image.mjs +97 -98
- package/dist/shared/components/Masonry/Masonry.mjs +192 -185
- package/dist/shared/components/Masonry/Masonry.utils.mjs +53 -48
- package/dist/shared/components/Masonry/MasonryBlock/MasonryBlock.d.ts +7 -2
- package/dist/shared/components/Masonry/MasonryBlock/MasonryBlock.mjs +96 -93
- package/dist/shared/components/MediaDialog/MediaDialog.mjs +96 -95
- package/dist/shared/hooks/useInView/useInView.mjs +35 -17
- package/dist/shared/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,30 +1,48 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { useState as a, useRef as l, useEffect as u } from "react";
|
|
2
|
+
const v = 100;
|
|
3
|
+
function h(t, r) {
|
|
4
|
+
const [w, o] = a(!1), s = l(!1);
|
|
5
|
+
return u(() => {
|
|
6
|
+
var c;
|
|
5
7
|
let e;
|
|
6
|
-
|
|
7
|
-
(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
try {
|
|
9
|
+
t.current && (e = new IntersectionObserver(
|
|
10
|
+
([n]) => {
|
|
11
|
+
o(n.isIntersecting && !s.current);
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
threshold: 0.7,
|
|
15
|
+
...r
|
|
16
|
+
}
|
|
17
|
+
), e.observe(t.current));
|
|
18
|
+
} catch {
|
|
19
|
+
const n = () => {
|
|
20
|
+
var d;
|
|
21
|
+
if (!t.current) return;
|
|
22
|
+
const i = (d = t.current) == null ? void 0 : d.getBoundingClientRect();
|
|
23
|
+
o(
|
|
24
|
+
i.bottom >= 0 && i.top <= (window.innerHeight || document.documentElement.clientHeight) + v
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
return (c = window.appScreenContent) == null || c.addEventListener("scroll", n), window.addEventListener("resize", n), window.addEventListener("orientationchange", n), () => {
|
|
28
|
+
var i;
|
|
29
|
+
(i = window.appScreenContent) == null || i.removeEventListener("scroll", n), window.removeEventListener("resize", n), window.removeEventListener("orientationchange", n);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return () => {
|
|
15
33
|
e == null || e.disconnect();
|
|
16
34
|
};
|
|
17
|
-
}, [
|
|
35
|
+
}, [t, r]), u(() => {
|
|
18
36
|
const e = () => {
|
|
19
|
-
|
|
37
|
+
s.current = document.hidden;
|
|
20
38
|
};
|
|
21
39
|
return document.addEventListener("visibilitychange", e), () => {
|
|
22
40
|
document.removeEventListener("visibilitychange", e);
|
|
23
41
|
};
|
|
24
42
|
}, []), {
|
|
25
|
-
isInView:
|
|
43
|
+
isInView: w
|
|
26
44
|
};
|
|
27
45
|
}
|
|
28
46
|
export {
|
|
29
|
-
|
|
47
|
+
h as default
|
|
30
48
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const useIsomorphicLayoutEffect: typeof
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
declare const useIsomorphicLayoutEffect: typeof useEffect;
|
|
3
3
|
export default useIsomorphicLayoutEffect;
|
package/package.json
CHANGED