@photoroom/ui 0.1.836 → 0.1.837
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const useLazyLoadVideo: (target: React.RefObject<HTMLVideoElement | null
|
|
1
|
+
export declare const useLazyLoadVideo: (target: React.RefObject<HTMLVideoElement | null>, enabled?: boolean) => void;
|
|
2
2
|
//# sourceMappingURL=useLazyLoadVideo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLazyLoadVideo.d.ts","sourceRoot":"","sources":["../../src/hooks/useLazyLoadVideo.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"useLazyLoadVideo.d.ts","sourceRoot":"","sources":["../../src/hooks/useLazyLoadVideo.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,WACnB,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,4BAqBjD,CAAC"}
|
package/index.mjs
CHANGED
|
@@ -32964,9 +32964,9 @@ function RH(e) {
|
|
|
32964
32964
|
}
|
|
32965
32965
|
//#endregion
|
|
32966
32966
|
//#region src/hooks/useIsClient.ts
|
|
32967
|
-
var zH = () => void 0, BH = (e) => zH, VH = () => tee(BH, () => !0, () => !1), HH = (e) => {
|
|
32967
|
+
var zH = () => void 0, BH = (e) => zH, VH = () => tee(BH, () => !0, () => !1), HH = (e, t = !0) => {
|
|
32968
32968
|
De(() => {
|
|
32969
|
-
if ("IntersectionObserver" in window && e.current) {
|
|
32969
|
+
if (t && "IntersectionObserver" in window && e.current) {
|
|
32970
32970
|
let t = new IntersectionObserver((e, t) => {
|
|
32971
32971
|
e.forEach((e) => {
|
|
32972
32972
|
let n = e.target;
|
|
@@ -32977,7 +32977,7 @@ var zH = () => void 0, BH = (e) => zH, VH = () => tee(BH, () => !0, () => !1), H
|
|
|
32977
32977
|
});
|
|
32978
32978
|
return t.observe(e.current), () => t.disconnect();
|
|
32979
32979
|
}
|
|
32980
|
-
}, [e]);
|
|
32980
|
+
}, [e, t]);
|
|
32981
32981
|
}, UH = (e) => {
|
|
32982
32982
|
De(() => {
|
|
32983
32983
|
let t = (t) => {
|
|
@@ -36824,7 +36824,7 @@ var Cq = G("rounded-400 interaction-transition focus-visible:ring-misc-focus-ind
|
|
|
36824
36824
|
})
|
|
36825
36825
|
}), Dq = ({ playLabel: e, unstyled: t = !1, className: n, videoAssetUrl: r = "", posterAssetUrl: i = "", autoPlay: a = !1, loop: o = !1, controls: s = !0, lazyLoad: c = !1 }) => {
|
|
36826
36826
|
let [l, u] = Pe(!!s), d = H(void 0), f = H(null);
|
|
36827
|
-
HH(f);
|
|
36827
|
+
HH(f, c);
|
|
36828
36828
|
let p = () => {
|
|
36829
36829
|
f.current?.play().catch(() => void 0);
|
|
36830
36830
|
};
|