welcome-ui 10.5.0 → 10.5.1
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/Swiper.js +1 -1
- package/dist/use-viewport-DuW6YjHT.js +20 -0
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/dist/use-viewport-GQu4vkby.js +0 -20
package/dist/Swiper.js
CHANGED
|
@@ -3,7 +3,7 @@ import './Swiper.css';
|
|
|
3
3
|
import { jsx as $ } from "react/jsx-runtime";
|
|
4
4
|
import { a as z, g as pe, c as K, u as fe } from "./index-B6iGEm-i.js";
|
|
5
5
|
import { useRef as Z, useEffect as W, Children as se, cloneElement as ge, createContext as me, useContext as be, useState as H, useMemo as ee, useCallback as A } from "react";
|
|
6
|
-
import { u as we } from "./use-viewport-
|
|
6
|
+
import { u as we } from "./use-viewport-DuW6YjHT.js";
|
|
7
7
|
import { Button as oe } from "./Button.js";
|
|
8
8
|
import { Icon as le } from "./Icon.js";
|
|
9
9
|
var Y, ae;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect as s, useLayoutEffect as u, useState as a, useRef as f } from "react";
|
|
3
|
+
const m = typeof window > "u" ? s : u;
|
|
4
|
+
function h() {
|
|
5
|
+
const [n, i] = a({ height: void 0, width: void 0 }), e = f();
|
|
6
|
+
return m(() => {
|
|
7
|
+
const t = new ResizeObserver(([o]) => {
|
|
8
|
+
const { blockSize: r, inlineSize: c } = o.contentBoxSize[0];
|
|
9
|
+
cancelAnimationFrame(e.current), e.current = requestAnimationFrame(() => {
|
|
10
|
+
i({ height: r, width: c });
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
return t.observe(document.documentElement), () => {
|
|
14
|
+
cancelAnimationFrame(e.current), t.disconnect();
|
|
15
|
+
};
|
|
16
|
+
}, []), n;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
h as u
|
|
20
|
+
};
|
package/dist/utils.js
CHANGED
|
@@ -3,7 +3,7 @@ import './utils.css';
|
|
|
3
3
|
import { u, b as f } from "./index-B6iGEm-i.js";
|
|
4
4
|
import { c as b } from "./index-B6iGEm-i.js";
|
|
5
5
|
import { f as S } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
6
|
-
import { u as p } from "./use-viewport-
|
|
6
|
+
import { u as p } from "./use-viewport-DuW6YjHT.js";
|
|
7
7
|
import { useState as a, useCallback as d } from "react";
|
|
8
8
|
function y(e = "includeThreshold") {
|
|
9
9
|
const { width: o } = p(), t = u(), i = o ?? (typeof window < "u" ? window.innerWidth : 0), c = (r) => e === "includeThreshold" ? i >= r : i > r, s = Object.keys(t).filter((r) => r !== "xxl").sort((r, n) => t[r] - t[n]);
|
package/package.json
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useEffect as s, useLayoutEffect as u, useState as f, useRef as d } from "react";
|
|
3
|
-
const m = typeof window > "u" ? s : u, S = 300;
|
|
4
|
-
function z() {
|
|
5
|
-
const [o, i] = f({ height: void 0, width: void 0 }), e = d();
|
|
6
|
-
return m(() => {
|
|
7
|
-
const t = new ResizeObserver(([n]) => {
|
|
8
|
-
const { blockSize: c, inlineSize: r } = n.contentBoxSize[0];
|
|
9
|
-
clearTimeout(e.current), e.current = setTimeout(() => {
|
|
10
|
-
i({ height: c, width: r });
|
|
11
|
-
}, S);
|
|
12
|
-
});
|
|
13
|
-
return t.observe(document.documentElement), () => {
|
|
14
|
-
clearTimeout(e.current), t.disconnect();
|
|
15
|
-
};
|
|
16
|
-
}, []), o;
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
z as u
|
|
20
|
-
};
|