@xiping/react-components 1.0.70 → 1.0.77
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/cjs/_virtual/_rolldown/runtime.js +1 -0
- package/dist/cjs/components/blur-fade/BlurFade.js +1 -1
- package/dist/cjs/components/blur-text/BlurText.js +1 -1
- package/dist/cjs/components/button/Button.css +1 -1
- package/dist/cjs/components/button/Button2.js +1 -0
- package/dist/cjs/components/comic-text/ComicText2.js +4 -0
- package/dist/cjs/components/confetti-button/index.js +1 -1
- package/dist/cjs/components/dock/Duck.css +1 -1
- package/dist/cjs/components/dock/Duck2.js +1 -0
- package/dist/cjs/components/flip-text/FlipText.css +1 -1
- package/dist/cjs/components/flip-text/FlipText2.js +1 -0
- package/dist/cjs/components/gradient-text/index.css +1 -1
- package/dist/cjs/components/gradient-text/index2.js +1 -0
- package/dist/cjs/components/hyper-text/HyperText.css +1 -1
- package/dist/cjs/components/hyper-text/index.js +1 -1
- package/dist/cjs/components/image-compare/ImageCompare.css +1 -1
- package/dist/cjs/components/image-compare/ImageCompare2.js +1 -0
- package/dist/cjs/components/image-viewer/ImageThumbnails.css +1 -1
- package/dist/cjs/components/image-viewer/ImageThumbnails2.js +1 -0
- package/dist/cjs/components/image-viewer/ImageViewer.css +1 -1
- package/dist/cjs/components/image-viewer/ImageViewer.d.ts +1 -1
- package/dist/cjs/components/image-viewer/ImageViewer2.js +1 -0
- package/dist/cjs/components/message/Message.css +1 -1
- package/dist/cjs/components/message/Message2.js +1 -0
- package/dist/cjs/components/pinch-content/PinchContent.js +1 -1
- package/dist/cjs/components/pinch-content/index.js +1 -1
- package/dist/cjs/components/pointer/Pointer.css +1 -1
- package/dist/cjs/components/pointer/Pointer2.js +1 -0
- package/dist/cjs/components/scratch-to-reveal/ScratchToReveal.css +1 -1
- package/dist/cjs/components/scratch-to-reveal/ScratchToReveal2.js +1 -0
- package/dist/cjs/components/shimmer-button/ShimmerButton.css +1 -1
- package/dist/cjs/components/shimmer-button/ShimmerButton2.js +1 -0
- package/dist/cjs/components/shiny-button/ShinyButton.css +1 -1
- package/dist/cjs/components/shiny-button/ShinyButton2.js +1 -0
- package/dist/cjs/components/shiny-text/ShinyText2.js +1 -0
- package/dist/cjs/components/sparkles-text/SparklesText.css +1 -1
- package/dist/cjs/components/sparkles-text/SparklesText2.js +1 -0
- package/dist/cjs/components/split-text/SplitText.css +1 -1
- package/dist/cjs/components/split-text/SplitText2.js +1 -0
- package/dist/cjs/components/subtitle-player/CurrentMode.css +1 -1
- package/dist/cjs/components/subtitle-player/CurrentMode2.js +2 -0
- package/dist/cjs/components/subtitle-player/LyricsMode.css +1 -1
- package/dist/cjs/components/subtitle-player/LyricsMode2.js +2 -0
- package/dist/cjs/components/subtitle-player/SubtitlePlayer.css +1 -1
- package/dist/cjs/components/subtitle-player/SubtitlePlayer2.js +1 -0
- package/dist/cjs/components/subtitle-player/utils.js +1 -1
- package/dist/cjs/components/text-animate/TextAnimate.css +1 -1
- package/dist/cjs/components/text-animate/TextAnimate2.js +2 -0
- package/dist/cjs/components/text-type/TextType.css +1 -1
- package/dist/cjs/components/text-type/TextType2.js +1 -0
- package/dist/cjs/components/txt-editor/TxtEditor.js +4 -4
- package/dist/cjs/components/txt-reader/TxtReader.js +1 -1
- package/dist/cjs/components/txt-reader/index.module.css +1 -1
- package/dist/cjs/components/txt-reader/index.module.js +1 -0
- package/dist/cjs/components/typing-animation/index.css +1 -1
- package/dist/cjs/components/typing-animation/index2.js +1 -0
- package/dist/cjs/components/variable-proximity/index.css +1 -1
- package/dist/cjs/components/variable-proximity/index2.js +1 -0
- package/dist/cjs/components/video-dialog/VideoDialog.css +1 -1
- package/dist/cjs/components/video-dialog/VideoDialog2.js +1 -0
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.css +1 -1
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.mobile.css +1 -1
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.pc.css +1 -1
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer2.js +1 -0
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayerMobile.js +1 -1
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayerPC.js +1 -1
- package/dist/cjs/components/video-subtitle-player/layouts/VideoSubtitlePlayerLayoutMobile.js +1 -1
- package/dist/cjs/components/video-subtitle-player/layouts/VideoSubtitlePlayerLayoutPC.js +1 -1
- package/dist/cjs/components/video-subtitle-player/useVideoSubtitleStore.js +1 -1
- package/dist/cjs/components/video-subtitle-player/useXGPlayer.js +1 -1
- package/dist/cjs/hooks/useStayTimeReport.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.24_core-js@3.47.0/node_modules/xgplayer/dist/index.min.css +1 -1
- package/dist/cjs/packages/subtitle/lib/index.js +1 -0
- package/dist/cjs/packages/subtitle/lib/src/json-converter.js +1 -1
- package/dist/cjs/packages/subtitle/lib/src/parser.js +5 -5
- package/dist/cjs/react-components.css +27 -27
- package/dist/es/components/blur-fade/BlurFade.js +37 -49
- package/dist/es/components/blur-text/BlurText.js +67 -76
- package/dist/es/components/button/Button.css +1 -1
- package/dist/es/components/button/Button2.js +48 -0
- package/dist/es/components/comic-text/ComicText2.js +55 -0
- package/dist/es/components/confetti-button/index.js +63 -75
- package/dist/es/components/dock/Duck.css +1 -1
- package/dist/es/components/dock/Duck2.js +60 -0
- package/dist/es/components/flip-text/FlipText.css +1 -1
- package/dist/es/components/flip-text/FlipText2.js +41 -0
- package/dist/es/components/gradient-text/index.css +1 -1
- package/dist/es/components/gradient-text/index2.js +29 -0
- package/dist/es/components/hyper-text/HyperText.css +1 -1
- package/dist/es/components/hyper-text/index.js +51 -79
- package/dist/es/components/image-compare/ImageCompare.css +1 -1
- package/dist/es/components/image-compare/ImageCompare2.js +96 -0
- package/dist/es/components/image-viewer/ImageThumbnails.css +1 -1
- package/dist/es/components/image-viewer/ImageThumbnails2.js +40 -0
- package/dist/es/components/image-viewer/ImageViewer.css +1 -1
- package/dist/es/components/image-viewer/ImageViewer.d.ts +1 -1
- package/dist/es/components/image-viewer/ImageViewer2.js +151 -0
- package/dist/es/components/message/Message.css +1 -1
- package/dist/es/components/message/Message2.js +189 -0
- package/dist/es/components/pinch-content/PinchContent.js +120 -127
- package/dist/es/components/pinch-content/index.js +5 -5
- package/dist/es/components/pointer/Pointer.css +1 -1
- package/dist/es/components/pointer/Pointer2.js +61 -0
- package/dist/es/components/react-force-graph-3d/index.js +2 -0
- package/dist/es/components/scratch-to-reveal/ScratchToReveal.css +1 -1
- package/dist/es/components/scratch-to-reveal/ScratchToReveal2.js +88 -0
- package/dist/es/components/shimmer-button/ShimmerButton.css +1 -1
- package/dist/es/components/shimmer-button/ShimmerButton2.js +33 -0
- package/dist/es/components/shiny-button/ShinyButton.css +1 -1
- package/dist/es/components/shiny-button/ShinyButton2.js +53 -0
- package/dist/es/components/shiny-text/ShinyText2.js +61 -0
- package/dist/es/components/sparkles-text/SparklesText.css +1 -1
- package/dist/es/components/sparkles-text/SparklesText2.js +90 -0
- package/dist/es/components/split-text/SplitText.css +1 -1
- package/dist/es/components/split-text/SplitText2.js +109 -0
- package/dist/es/components/subtitle-player/CurrentMode.css +1 -1
- package/dist/es/components/subtitle-player/CurrentMode2.js +44 -0
- package/dist/es/components/subtitle-player/LyricsMode.css +1 -1
- package/dist/es/components/subtitle-player/LyricsMode2.js +114 -0
- package/dist/es/components/subtitle-player/SubtitlePlayer.css +1 -1
- package/dist/es/components/subtitle-player/SubtitlePlayer2.js +169 -0
- package/dist/es/components/subtitle-player/utils.js +63 -69
- package/dist/es/components/text-animate/TextAnimate.css +1 -1
- package/dist/es/components/text-animate/TextAnimate2.js +312 -0
- package/dist/es/components/text-type/TextType.css +1 -1
- package/dist/es/components/text-type/TextType2.js +80 -0
- package/dist/es/components/txt-editor/TxtEditor.js +60 -95
- package/dist/es/components/txt-reader/TxtReader.js +45 -74
- package/dist/es/components/txt-reader/index.module.css +1 -1
- package/dist/es/components/txt-reader/index.module.js +10 -0
- package/dist/es/components/typing-animation/index.css +1 -1
- package/dist/es/components/typing-animation/index2.js +43 -0
- package/dist/es/components/variable-proximity/index.css +1 -1
- package/dist/es/components/variable-proximity/index2.js +179 -0
- package/dist/es/components/video-dialog/VideoDialog.css +1 -1
- package/dist/es/components/video-dialog/VideoDialog2.js +168 -0
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.css +1 -1
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.mobile.css +1 -1
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.pc.css +1 -1
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer2.js +43 -0
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayerMobile.js +29 -46
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayerPC.js +94 -74
- package/dist/es/components/video-subtitle-player/layouts/VideoSubtitlePlayerLayoutMobile.js +24 -21
- package/dist/es/components/video-subtitle-player/layouts/VideoSubtitlePlayerLayoutPC.js +58 -50
- package/dist/es/components/video-subtitle-player/useVideoSubtitleStore.js +61 -56
- package/dist/es/components/video-subtitle-player/useXGPlayer.js +38 -35
- package/dist/es/hooks/useStayTimeReport.js +29 -29
- package/dist/es/index.js +33 -70
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.24_core-js@3.47.0/node_modules/xgplayer/dist/index.min.css +1 -1
- package/dist/es/packages/subtitle/lib/index.js +2 -0
- package/dist/es/packages/subtitle/lib/src/json-converter.js +22 -23
- package/dist/es/packages/subtitle/lib/src/parser.js +41 -54
- package/dist/es/react-components.css +27 -27
- package/package.json +26 -27
- package/dist/cjs/components/button/Button.js +0 -1
- package/dist/cjs/components/comic-text/ComicText.js +0 -4
- package/dist/cjs/components/dock/Duck.js +0 -1
- package/dist/cjs/components/flip-text/FlipText.js +0 -1
- package/dist/cjs/components/gradient-text/index.js +0 -1
- package/dist/cjs/components/image-compare/ImageCompare.js +0 -1
- package/dist/cjs/components/image-viewer/ImageThumbnails.js +0 -1
- package/dist/cjs/components/image-viewer/ImageViewer.js +0 -1
- package/dist/cjs/components/message/Message.js +0 -1
- package/dist/cjs/components/pointer/Pointer.js +0 -1
- package/dist/cjs/components/scratch-to-reveal/ScratchToReveal.js +0 -1
- package/dist/cjs/components/shimmer-button/ShimmerButton.js +0 -1
- package/dist/cjs/components/shiny-button/ShinyButton.js +0 -1
- package/dist/cjs/components/shiny-text/ShinyText.js +0 -1
- package/dist/cjs/components/sparkles-text/SparklesText.js +0 -1
- package/dist/cjs/components/split-text/SplitText.js +0 -1
- package/dist/cjs/components/subtitle-player/CurrentMode.js +0 -2
- package/dist/cjs/components/subtitle-player/LyricsMode.js +0 -2
- package/dist/cjs/components/subtitle-player/SubtitlePlayer.js +0 -1
- package/dist/cjs/components/text-animate/TextAnimate.js +0 -2
- package/dist/cjs/components/text-type/TextType.js +0 -1
- package/dist/cjs/components/txt-reader/index.module.css.js +0 -1
- package/dist/cjs/components/typing-animation/index.js +0 -1
- package/dist/cjs/components/variable-proximity/index.js +0 -1
- package/dist/cjs/components/video-dialog/VideoDialog.js +0 -1
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.js +0 -1
- package/dist/es/components/button/Button.js +0 -72
- package/dist/es/components/comic-text/ComicText.js +0 -52
- package/dist/es/components/dock/Duck.js +0 -80
- package/dist/es/components/flip-text/FlipText.js +0 -38
- package/dist/es/components/gradient-text/index.js +0 -22
- package/dist/es/components/image-compare/ImageCompare.js +0 -127
- package/dist/es/components/image-viewer/ImageThumbnails.js +0 -73
- package/dist/es/components/image-viewer/ImageViewer.js +0 -141
- package/dist/es/components/message/Message.js +0 -220
- package/dist/es/components/pointer/Pointer.js +0 -75
- package/dist/es/components/scratch-to-reveal/ScratchToReveal.js +0 -97
- package/dist/es/components/shimmer-button/ShimmerButton.js +0 -42
- package/dist/es/components/shiny-button/ShinyButton.js +0 -61
- package/dist/es/components/shiny-text/ShinyText.js +0 -76
- package/dist/es/components/sparkles-text/SparklesText.js +0 -71
- package/dist/es/components/split-text/SplitText.js +0 -116
- package/dist/es/components/subtitle-player/CurrentMode.js +0 -78
- package/dist/es/components/subtitle-player/LyricsMode.js +0 -152
- package/dist/es/components/subtitle-player/SubtitlePlayer.js +0 -234
- package/dist/es/components/text-animate/TextAnimate.js +0 -310
- package/dist/es/components/text-type/TextType.js +0 -121
- package/dist/es/components/txt-reader/index.module.css.js +0 -10
- package/dist/es/components/typing-animation/index.js +0 -56
- package/dist/es/components/variable-proximity/index.js +0 -211
- package/dist/es/components/video-dialog/VideoDialog.js +0 -113
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.js +0 -74
|
@@ -1,78 +1,66 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
2
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as n, forwardRef as r, useCallback as i, useEffect as a, useImperativeHandle as o, useMemo as s, useRef as c } from "react";
|
|
4
|
+
import l from "canvas-confetti";
|
|
5
|
+
//#region src/components/confetti-button/index.tsx
|
|
6
|
+
var u = n({}), d = r((n, r) => {
|
|
7
|
+
let { options: d, globalOptions: f = {
|
|
8
|
+
resize: !0,
|
|
9
|
+
useWorker: !0
|
|
10
|
+
}, manualstart: p = !1, children: m, ...h } = n, g = c(null), _ = i((e) => {
|
|
11
|
+
if (e !== null) {
|
|
12
|
+
if (g.current) return;
|
|
13
|
+
g.current = l.create(e, {
|
|
14
|
+
...f,
|
|
15
|
+
resize: !0
|
|
16
|
+
});
|
|
17
|
+
} else g.current &&= (g.current.reset(), null);
|
|
18
|
+
}, [f]), v = i(async (e = {}) => {
|
|
19
|
+
try {
|
|
20
|
+
await g.current?.({
|
|
21
|
+
...d,
|
|
22
|
+
...e
|
|
23
|
+
});
|
|
24
|
+
} catch (e) {
|
|
25
|
+
console.error("Confetti error:", e);
|
|
26
|
+
}
|
|
27
|
+
}, [d]), y = s(() => ({ fire: v }), [v]);
|
|
28
|
+
return o(r, () => y, [y]), a(() => {
|
|
29
|
+
p || (async () => {
|
|
30
|
+
try {
|
|
31
|
+
await v();
|
|
32
|
+
} catch (e) {
|
|
33
|
+
console.error("Confetti effect error:", e);
|
|
34
|
+
}
|
|
35
|
+
})();
|
|
36
|
+
}, [p, v]), /* @__PURE__ */ t(u.Provider, {
|
|
37
|
+
value: y,
|
|
38
|
+
children: [/* @__PURE__ */ e("canvas", {
|
|
39
|
+
ref: _,
|
|
40
|
+
...h
|
|
41
|
+
}), m]
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
d.displayName = "Confetti";
|
|
45
|
+
var f = d, p = ({ options: t, children: n, ...r }) => /* @__PURE__ */ e("div", {
|
|
46
|
+
onClick: async (e) => {
|
|
47
|
+
try {
|
|
48
|
+
let n = e.currentTarget.getBoundingClientRect(), r = n.left + n.width / 2, i = n.top + n.height / 2;
|
|
49
|
+
await l({
|
|
50
|
+
...t,
|
|
51
|
+
origin: {
|
|
52
|
+
x: r / window.innerWidth,
|
|
53
|
+
y: i / window.innerHeight
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
} catch (e) {
|
|
57
|
+
console.error("Confetti button error:", e);
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
...r,
|
|
61
|
+
children: n
|
|
52
62
|
});
|
|
53
|
-
m.displayName = "Confetti";
|
|
54
|
-
const N = m, p = ({
|
|
55
|
-
options: c,
|
|
56
|
-
children: s,
|
|
57
|
-
...n
|
|
58
|
-
}) => /* @__PURE__ */ C("div", { onClick: async (o) => {
|
|
59
|
-
try {
|
|
60
|
-
const t = o.currentTarget.getBoundingClientRect(), f = t.left + t.width / 2, e = t.top + t.height / 2;
|
|
61
|
-
await d({
|
|
62
|
-
...c,
|
|
63
|
-
origin: {
|
|
64
|
-
x: f / window.innerWidth,
|
|
65
|
-
y: e / window.innerHeight
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
} catch (t) {
|
|
69
|
-
console.error("Confetti button error:", t);
|
|
70
|
-
}
|
|
71
|
-
}, ...n, children: s });
|
|
72
63
|
p.displayName = "ConfettiButton";
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
W as ConfettiButton,
|
|
77
|
-
M as confetti
|
|
78
|
-
};
|
|
64
|
+
var m = p;
|
|
65
|
+
//#endregion
|
|
66
|
+
export { f as Confetti, m as ConfettiButton, l as confetti };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.xiping-dock{
|
|
1
|
+
.xiping-dock{-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid;border-radius:1rem;justify-content:center;align-items:center;gap:.5rem;width:max-content;height:58px;margin-top:2rem;margin-left:auto;margin-right:auto;padding:.5rem;display:flex}@supports ((-webkit-backdrop-filter:blur(12px)) or (backdrop-filter:blur(12px))){.xiping-dock{background-color:#ffffff1a}.dark .xiping-dock{background-color:#0000001a}}.xiping-dock--top{align-items:flex-start}.xiping-dock--middle{align-items:center}.xiping-dock--bottom{align-items:flex-end}.xiping-dock-icon{aspect-ratio:1;cursor:pointer;border-radius:9999px;justify-content:center;align-items:center;display:flex}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import './Duck.css';/* empty css */
|
|
3
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
4
|
+
import t, { useRef as n } from "react";
|
|
5
|
+
import r from "clsx";
|
|
6
|
+
import { motion as i, useMotionValue as a, useSpring as o, useTransform as s } from "motion/react";
|
|
7
|
+
//#region src/components/dock/Duck.tsx
|
|
8
|
+
var c = 40, l = 60, u = 140, d = t.forwardRef(({ className: n, children: o, iconSize: s = c, iconMagnification: d = l, iconDistance: p = u, direction: m = "middle", ...h }, g) => {
|
|
9
|
+
let _ = a(Infinity), v = () => t.Children.map(o, (e) => t.isValidElement(e) && e.type === f ? t.cloneElement(e, {
|
|
10
|
+
...e.props,
|
|
11
|
+
mouseX: _,
|
|
12
|
+
size: s,
|
|
13
|
+
magnification: d,
|
|
14
|
+
distance: p
|
|
15
|
+
}) : e);
|
|
16
|
+
return /* @__PURE__ */ e(i.div, {
|
|
17
|
+
ref: g,
|
|
18
|
+
onMouseMove: (e) => _.set(e.pageX),
|
|
19
|
+
onMouseLeave: () => _.set(Infinity),
|
|
20
|
+
...h,
|
|
21
|
+
className: r("xiping-dock", m === "top" && "xiping-dock--top", m === "bottom" && "xiping-dock--bottom", m === "middle" && "xiping-dock--middle", n),
|
|
22
|
+
children: v()
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
d.displayName = "Dock";
|
|
26
|
+
var f = ({ size: t = c, magnification: d = l, distance: f = u, mouseX: p, className: m, children: h, ...g }) => {
|
|
27
|
+
let _ = n(null), v = Math.max(6, t * .2), y = a(Infinity), b = o(s(s(p ?? y, (e) => {
|
|
28
|
+
let t = _.current?.getBoundingClientRect() ?? {
|
|
29
|
+
x: 0,
|
|
30
|
+
width: 0
|
|
31
|
+
};
|
|
32
|
+
return e - t.x - t.width / 2;
|
|
33
|
+
}), [
|
|
34
|
+
-f,
|
|
35
|
+
0,
|
|
36
|
+
f
|
|
37
|
+
], [
|
|
38
|
+
t,
|
|
39
|
+
d,
|
|
40
|
+
t
|
|
41
|
+
]), {
|
|
42
|
+
mass: .1,
|
|
43
|
+
stiffness: 150,
|
|
44
|
+
damping: 12
|
|
45
|
+
});
|
|
46
|
+
return /* @__PURE__ */ e(i.div, {
|
|
47
|
+
ref: _,
|
|
48
|
+
style: {
|
|
49
|
+
width: b,
|
|
50
|
+
height: b,
|
|
51
|
+
padding: v
|
|
52
|
+
},
|
|
53
|
+
className: r("xiping-dock-icon", m),
|
|
54
|
+
...g,
|
|
55
|
+
children: h
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
f.displayName = "DockIcon";
|
|
59
|
+
//#endregion
|
|
60
|
+
export { d as Dock, f as DockIcon };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.xiping-flip-container{
|
|
1
|
+
.xiping-flip-container{justify-content:center;gap:.5rem;display:flex}.xiping-flip-char{transform-origin:50%;filter:drop-shadow(0 1px 1px #0000000d)}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import './FlipText.css';/* empty css */
|
|
3
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
4
|
+
import t from "react";
|
|
5
|
+
import n from "clsx";
|
|
6
|
+
import { AnimatePresence as r, motion as i } from "motion/react";
|
|
7
|
+
//#region src/components/flip-text/FlipText.tsx
|
|
8
|
+
var a = {
|
|
9
|
+
hidden: {
|
|
10
|
+
rotateX: -90,
|
|
11
|
+
opacity: 0
|
|
12
|
+
},
|
|
13
|
+
visible: {
|
|
14
|
+
rotateX: 0,
|
|
15
|
+
opacity: 1
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
function o({ children: o, duration: s = .5, delayMultiple: c = .08, className: l, as: u = "span", variants: d, ...f }) {
|
|
19
|
+
let p = i.create(u);
|
|
20
|
+
return /* @__PURE__ */ e("div", {
|
|
21
|
+
className: "xiping-flip-container",
|
|
22
|
+
children: /* @__PURE__ */ e(r, {
|
|
23
|
+
mode: "wait",
|
|
24
|
+
children: t.Children.toArray(o).join("").split("").map((t, r) => /* @__PURE__ */ e(p, {
|
|
25
|
+
initial: "hidden",
|
|
26
|
+
animate: "visible",
|
|
27
|
+
exit: "hidden",
|
|
28
|
+
variants: d || a,
|
|
29
|
+
transition: {
|
|
30
|
+
duration: s,
|
|
31
|
+
delay: r * c
|
|
32
|
+
},
|
|
33
|
+
className: n("xiping-flip-char", l),
|
|
34
|
+
...f,
|
|
35
|
+
children: t
|
|
36
|
+
}, r))
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { o as FlipText };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.xiping-gradient-text{
|
|
1
|
+
.xiping-gradient-text{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);cursor:pointer;border-radius:1.25rem;flex-direction:row;justify-content:center;align-items:center;max-width:fit-content;margin:0 auto;font-weight:500;transition:box-shadow .5s ease-out;display:flex;position:relative;overflow:hidden}.xiping-gradient-text__overlay{border-radius:inherit;z-index:0;pointer-events:none;background-size:300% 100%;animation:linear infinite xiping-gradient;position:absolute;inset:0}.xiping-gradient-text__overlay:before{content:"";border-radius:inherit;z-index:-1;background-color:#060010;width:calc(100% - 2px);height:calc(100% - 2px);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@keyframes xiping-gradient{0%{background-position:0%}50%{background-position:100%}to{background-position:0%}}.xiping-gradient-text__content{z-index:2;color:#0000;background-size:300% 100%;-webkit-background-clip:text;background-clip:text;animation:linear infinite xiping-gradient;display:inline-block;position:relative}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import './index.css';/* empty css */
|
|
2
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
3
|
+
import n from "clsx";
|
|
4
|
+
//#region src/components/gradient-text/index.tsx
|
|
5
|
+
function r({ children: r, className: i = "", colors: a = [
|
|
6
|
+
"#40ffaa",
|
|
7
|
+
"#4079ff",
|
|
8
|
+
"#40ffaa",
|
|
9
|
+
"#4079ff",
|
|
10
|
+
"#40ffaa"
|
|
11
|
+
], animationSpeed: o = 8, showBorder: s = !1 }) {
|
|
12
|
+
let c = {
|
|
13
|
+
backgroundImage: `linear-gradient(to right, ${a.join(", ")})`,
|
|
14
|
+
animationDuration: `${o}s`
|
|
15
|
+
};
|
|
16
|
+
return /* @__PURE__ */ t("div", {
|
|
17
|
+
className: n("xiping-gradient-text", i),
|
|
18
|
+
children: [s && /* @__PURE__ */ e("div", {
|
|
19
|
+
className: "xiping-gradient-text__overlay",
|
|
20
|
+
style: c
|
|
21
|
+
}), /* @__PURE__ */ e("div", {
|
|
22
|
+
className: "xiping-gradient-text__content",
|
|
23
|
+
style: c,
|
|
24
|
+
children: r
|
|
25
|
+
})]
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { r as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.xiping-hyper-container{
|
|
1
|
+
.xiping-hyper-container{padding-top:.5rem;padding-bottom:.5rem;font-size:2.25rem;font-weight:700;line-height:2.5rem;overflow:hidden}.xiping-hyper-char{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.xiping-hyper-space{width:.75rem}
|
|
@@ -1,81 +1,53 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
(P) => P.map(
|
|
52
|
-
(T, x) => T === " " ? T : x <= a.current ? n[x] : s[q(s.length)]
|
|
53
|
-
)
|
|
54
|
-
), g < 1 ? c = requestAnimationFrame(l) : r(!1);
|
|
55
|
-
};
|
|
56
|
-
return c = requestAnimationFrame(l), () => cancelAnimationFrame(c);
|
|
57
|
-
}, [n, u, i, s]), // eslint-disable-next-line react-hooks/static-components
|
|
58
|
-
/* @__PURE__ */ p(
|
|
59
|
-
b,
|
|
60
|
-
{
|
|
61
|
-
ref: m,
|
|
62
|
-
className: I("xiping-hyper-container", C),
|
|
63
|
-
onMouseEnter: D,
|
|
64
|
-
...R,
|
|
65
|
-
children: /* @__PURE__ */ p(U, { children: v.map((e, t) => /* @__PURE__ */ p(
|
|
66
|
-
A.span,
|
|
67
|
-
{
|
|
68
|
-
className: I(
|
|
69
|
-
"xiping-hyper-char",
|
|
70
|
-
e === " " && "xiping-hyper-space"
|
|
71
|
-
),
|
|
72
|
-
children: e.toUpperCase()
|
|
73
|
-
},
|
|
74
|
-
t
|
|
75
|
-
)) })
|
|
76
|
-
}
|
|
77
|
-
);
|
|
2
|
+
import './HyperText.css';/* empty css */
|
|
3
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
4
|
+
import { useEffect as t, useRef as n, useState as r } from "react";
|
|
5
|
+
import i from "clsx";
|
|
6
|
+
import { AnimatePresence as a, motion as o } from "motion/react";
|
|
7
|
+
//#region src/components/hyper-text/index.tsx
|
|
8
|
+
var s = Object.freeze("ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("")), c = (e) => Math.floor(Math.random() * e);
|
|
9
|
+
function l({ children: l, className: u, duration: d = 800, delay: f = 0, as: p = "div", startOnView: m = !1, animateOnHover: h = !0, characterSet: g = s, ..._ }) {
|
|
10
|
+
let v = o.create(p, { forwardMotionProps: !0 }), [y, b] = r(() => l.split("")), [x, S] = r(!1), C = n(0), w = n(null);
|
|
11
|
+
return t(() => {
|
|
12
|
+
if (!m) {
|
|
13
|
+
let e = setTimeout(() => {
|
|
14
|
+
S(!0);
|
|
15
|
+
}, f);
|
|
16
|
+
return () => clearTimeout(e);
|
|
17
|
+
}
|
|
18
|
+
let e = new IntersectionObserver(([t]) => {
|
|
19
|
+
t.isIntersecting && (setTimeout(() => {
|
|
20
|
+
S(!0);
|
|
21
|
+
}, f), e.disconnect());
|
|
22
|
+
}, {
|
|
23
|
+
threshold: .1,
|
|
24
|
+
rootMargin: "-30% 0px -30% 0px"
|
|
25
|
+
});
|
|
26
|
+
return w.current && e.observe(w.current), () => e.disconnect();
|
|
27
|
+
}, [f, m]), t(() => {
|
|
28
|
+
if (!x) return;
|
|
29
|
+
let e = l.length, t = performance.now(), n, r = (i) => {
|
|
30
|
+
let a = i - t, o = Math.min(a / d, 1);
|
|
31
|
+
C.current = o * e, b((e) => e.map((e, t) => e === " " ? e : t <= C.current ? l[t] : g[c(g.length)])), o < 1 ? n = requestAnimationFrame(r) : S(!1);
|
|
32
|
+
};
|
|
33
|
+
return n = requestAnimationFrame(r), () => cancelAnimationFrame(n);
|
|
34
|
+
}, [
|
|
35
|
+
l,
|
|
36
|
+
d,
|
|
37
|
+
x,
|
|
38
|
+
g
|
|
39
|
+
]), /* @__PURE__ */ e(v, {
|
|
40
|
+
ref: w,
|
|
41
|
+
className: i("xiping-hyper-container", u),
|
|
42
|
+
onMouseEnter: () => {
|
|
43
|
+
h && !x && (C.current = 0, S(!0));
|
|
44
|
+
},
|
|
45
|
+
..._,
|
|
46
|
+
children: /* @__PURE__ */ e(a, { children: y.map((t, n) => /* @__PURE__ */ e(o.span, {
|
|
47
|
+
className: i("xiping-hyper-char", t === " " && "xiping-hyper-space"),
|
|
48
|
+
children: t.toUpperCase()
|
|
49
|
+
}, n)) })
|
|
50
|
+
});
|
|
78
51
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
};
|
|
52
|
+
//#endregion
|
|
53
|
+
export { l as HyperText };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.xiping-image-compare-container{
|
|
1
|
+
.xiping-image-compare-container{-webkit-user-select:none;user-select:none;width:100%;position:relative;overflow:hidden}.xiping-image-compare-label{color:#fff;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:10;background-color:#0009;border-radius:.25rem;padding:.25rem .5rem;font-size:.75rem;font-weight:500;position:absolute;top:1rem}.xiping-image-compare-label-original{right:1rem}.xiping-image-compare-label-modified{left:1rem}.xiping-image-compare-overlay{height:100%;position:absolute;inset:0;overflow:hidden}.xiping-image-compare-divider{cursor:ew-resize;background-color:#ffffffe6;position:absolute;top:0;bottom:0;box-shadow:0 0 0 1px #0000004d,inset 0 0 0 1px #ffffff80,0 0 8px #0003}.xiping-image-compare-divider-button{background-color:#fffffff2;border:2px solid #0003;border-radius:50%;justify-content:center;align-items:center;width:2rem;height:2rem;transition:box-shadow .2s,transform .2s;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);box-shadow:0 0 0 1px #fffc,0 4px 12px #0000004d,0 2px 4px #0003}.xiping-image-compare-divider-button:hover{transform:translate(-50%,-50%)scale(1.05);box-shadow:0 0 0 1px #ffffffe6,0 6px 16px #0006,0 3px 6px #0000004d}.xiping-image-compare-divider-button:active{transform:translate(-50%,-50%)scale(.95)}.xiping-image-compare-divider-icon{color:#1f2937;width:1.5rem;height:1.5rem}.xiping-image-compare-divider-theme-dark{background-color:#000000e6;box-shadow:0 0 0 1px #ffffff4d,inset 0 0 0 1px #00000080,0 0 8px #fff3}.xiping-image-compare-divider-button-theme-dark{background-color:#000000f2;border:2px solid #fff3;box-shadow:0 0 0 1px #000c,0 4px 12px #ffffff4d,0 2px 4px #fff3}.xiping-image-compare-divider-button-theme-dark:hover{box-shadow:0 0 0 1px #000000e6,0 6px 16px #fff6,0 3px 6px #ffffff4d}.xiping-image-compare-divider-theme-dark .xiping-image-compare-divider-icon{color:#f3f4f6}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import './ImageCompare.css';/* empty css */
|
|
2
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback as n, useEffect as r, useMemo as i, useRef as a, useState as o } from "react";
|
|
4
|
+
import s from "clsx";
|
|
5
|
+
//#region src/components/image-compare/ImageCompare.tsx
|
|
6
|
+
var c = (c) => {
|
|
7
|
+
let { originalImage: l, modifiedImage: u, className: d, dividerWidth: f = 1, originalLabel: p = "Original", modifiedLabel: m = "Modified", theme: h = "light" } = c, [g, _] = o(50), [v, y] = o(16 / 9), b = a(null), x = a(!1), S = a(null), C = a(null), w = a(null), T = n((e) => {
|
|
8
|
+
if (!b.current) return;
|
|
9
|
+
(!C.current || !x.current) && (C.current = b.current.getBoundingClientRect());
|
|
10
|
+
let t = C.current, n = (e - t.left) / t.width * 100;
|
|
11
|
+
_(Math.min(100, Math.max(0, n)));
|
|
12
|
+
}, []), E = n((e) => {
|
|
13
|
+
x.current && (S.current !== null && cancelAnimationFrame(S.current), S.current = requestAnimationFrame(() => {
|
|
14
|
+
T(e);
|
|
15
|
+
}));
|
|
16
|
+
}, [T]), D = n((e) => {
|
|
17
|
+
E(e.clientX);
|
|
18
|
+
}, [E]), O = n((e) => {
|
|
19
|
+
e.touches.length > 0 && E(e.touches[0].clientX);
|
|
20
|
+
}, [E]), k = n(() => {
|
|
21
|
+
x.current = !0, C.current = null;
|
|
22
|
+
let e = (e) => D(e), t = (e) => O(e), n = () => {
|
|
23
|
+
x.current = !1, S.current !== null && (cancelAnimationFrame(S.current), S.current = null), w.current &&= (w.current(), null);
|
|
24
|
+
}, r = () => n(), i = () => n();
|
|
25
|
+
window.addEventListener("mousemove", e), window.addEventListener("touchmove", t, { passive: !1 }), window.addEventListener("mouseup", r), window.addEventListener("touchend", i), w.current = () => {
|
|
26
|
+
window.removeEventListener("mousemove", e), window.removeEventListener("touchmove", t), window.removeEventListener("mouseup", r), window.removeEventListener("touchend", i);
|
|
27
|
+
};
|
|
28
|
+
}, [D, O]);
|
|
29
|
+
r(() => () => {
|
|
30
|
+
w.current &&= (w.current(), null);
|
|
31
|
+
}, []), r(() => {
|
|
32
|
+
let e = new Image();
|
|
33
|
+
e.onload = () => {
|
|
34
|
+
y(e.width / e.height);
|
|
35
|
+
}, e.src = l;
|
|
36
|
+
}, [l]);
|
|
37
|
+
let A = i(() => ({
|
|
38
|
+
backgroundRepeat: "no-repeat",
|
|
39
|
+
backgroundPosition: "top left",
|
|
40
|
+
backgroundImage: `url(${l})`,
|
|
41
|
+
backgroundSize: "contain",
|
|
42
|
+
aspectRatio: v
|
|
43
|
+
}), [l, v]), j = i(() => ({
|
|
44
|
+
width: `${g}%`,
|
|
45
|
+
backgroundImage: `url(${u})`,
|
|
46
|
+
backgroundRepeat: "no-repeat",
|
|
47
|
+
backgroundPosition: "top left",
|
|
48
|
+
backgroundSize: "auto 100%"
|
|
49
|
+
}), [g, u]), M = i(() => ({
|
|
50
|
+
left: `${g}%`,
|
|
51
|
+
transform: "translateX(-50%)",
|
|
52
|
+
width: typeof f == "number" ? `${f}px` : f
|
|
53
|
+
}), [g, f]);
|
|
54
|
+
return /* @__PURE__ */ t("div", {
|
|
55
|
+
ref: b,
|
|
56
|
+
className: s("xiping-image-compare-container", d),
|
|
57
|
+
style: A,
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ e("div", {
|
|
60
|
+
className: "xiping-image-compare-label xiping-image-compare-label-original",
|
|
61
|
+
children: p
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ e("div", {
|
|
64
|
+
className: "xiping-image-compare-overlay",
|
|
65
|
+
style: j,
|
|
66
|
+
children: /* @__PURE__ */ e("div", {
|
|
67
|
+
className: "xiping-image-compare-label xiping-image-compare-label-modified",
|
|
68
|
+
children: m
|
|
69
|
+
})
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ e("div", {
|
|
72
|
+
className: s("xiping-image-compare-divider", `xiping-image-compare-divider-theme-${h}`),
|
|
73
|
+
style: M,
|
|
74
|
+
onMouseDown: k,
|
|
75
|
+
onTouchStart: k,
|
|
76
|
+
children: /* @__PURE__ */ e("div", {
|
|
77
|
+
className: s("xiping-image-compare-divider-button", `xiping-image-compare-divider-button-theme-${h}`),
|
|
78
|
+
children: /* @__PURE__ */ e("svg", {
|
|
79
|
+
className: "xiping-image-compare-divider-icon",
|
|
80
|
+
fill: "none",
|
|
81
|
+
stroke: "currentColor",
|
|
82
|
+
viewBox: "0 0 24 24",
|
|
83
|
+
children: /* @__PURE__ */ e("path", {
|
|
84
|
+
strokeLinecap: "round",
|
|
85
|
+
strokeLinejoin: "round",
|
|
86
|
+
strokeWidth: 2,
|
|
87
|
+
d: "M8 9l4-4 4 4m0 6l-4 4-4-4"
|
|
88
|
+
})
|
|
89
|
+
})
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
]
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
//#endregion
|
|
96
|
+
export { c as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.xiping-thumbnails-wrapper{
|
|
1
|
+
.xiping-thumbnails-wrapper{z-index:10;height:6rem;padding-bottom:env(safe-area-inset-bottom);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);background-color:#00000080;flex-shrink:0}.xiping-thumbnails-wrapper--hidden{display:none}.xiping-thumbnails-scroll{-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none;width:100vw;height:6rem;overflow:auto hidden}.xiping-thumbnails-scroll::-webkit-scrollbar{display:none}.xiping-thumbnails-container{gap:.5rem;min-width:max-content;height:6rem;padding:.5rem;display:flex}.xiping-thumbnail-item{aspect-ratio:1;cursor:pointer;border:2px solid #0000;flex-shrink:0;height:100%;transition:all .2s}.xiping-thumbnail-item--active{border-color:#fff}.xiping-thumbnail-image{object-fit:contain;width:100%;height:100%}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import './ImageThumbnails.css';/* empty css */
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as t } from "react";
|
|
4
|
+
import n from "clsx";
|
|
5
|
+
import { animate as r, motion as i, useMotionValue as a, useMotionValueEvent as o, useScroll as s } from "motion/react";
|
|
6
|
+
import { size as c } from "lodash-es";
|
|
7
|
+
//#region src/components/image-viewer/ImageThumbnails.tsx
|
|
8
|
+
var l = "0%", u = "100%", d = "20%", f = "80%", p = "#0000", m = "#000";
|
|
9
|
+
function h(e) {
|
|
10
|
+
let t = a(`linear-gradient(90deg, ${m}, ${m} ${l}, ${m} ${f}, ${p})`);
|
|
11
|
+
return o(e, "change", (n) => {
|
|
12
|
+
n === 0 ? r(t, `linear-gradient(90deg, ${m}, ${m} ${l}, ${m} ${f}, ${p})`) : n === 1 ? r(t, `linear-gradient(90deg, ${p}, ${m} ${d}, ${m} ${u}, ${m})`) : (e.getPrevious() === 0 || e.getPrevious() === 1) && r(t, `linear-gradient(90deg, ${p}, ${m} ${d}, ${m} ${f}, ${p})`);
|
|
13
|
+
}), t;
|
|
14
|
+
}
|
|
15
|
+
var g = ({ images: r, currentIndex: a, onImageSelect: o }) => {
|
|
16
|
+
let l = t(null), { scrollXProgress: u } = s({ container: l }), d = h(u);
|
|
17
|
+
return /* @__PURE__ */ e("div", {
|
|
18
|
+
className: n("xiping-thumbnails-wrapper", c(r) <= 1 && "xiping-thumbnails-wrapper--hidden"),
|
|
19
|
+
children: /* @__PURE__ */ e(i.div, {
|
|
20
|
+
ref: l,
|
|
21
|
+
style: { maskImage: d },
|
|
22
|
+
className: "xiping-thumbnails-scroll",
|
|
23
|
+
children: /* @__PURE__ */ e("div", {
|
|
24
|
+
className: "xiping-thumbnails-container",
|
|
25
|
+
children: r.map((t, r) => /* @__PURE__ */ e("div", {
|
|
26
|
+
className: n("xiping-thumbnail-item", r === a && "xiping-thumbnail-item--active"),
|
|
27
|
+
onClick: () => o(r),
|
|
28
|
+
children: /* @__PURE__ */ e("img", {
|
|
29
|
+
src: t,
|
|
30
|
+
alt: "",
|
|
31
|
+
className: "xiping-thumbnail-image",
|
|
32
|
+
draggable: "false"
|
|
33
|
+
})
|
|
34
|
+
}, t))
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { g as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.xiping-
|
|
1
|
+
.xiping-modal-root{z-index:2147483647;position:fixed;inset:0}.xiping-modal-backdrop{z-index:0;position:absolute;inset:0}.xiping-modal-content{z-index:1;flex-direction:column;display:flex;position:absolute;inset:0;overflow:hidden}@keyframes xiping-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.xiping-spinner-icon{color:#fff;width:48px;height:48px;animation:1s linear infinite xiping-spin}.xiping-wrapper{width:100vw;height:100vh;padding-top:env(safe-area-inset-top,0);flex-direction:column;display:flex;position:relative}.xiping-tool-wrapper{z-index:10;gap:16px;display:flex;position:absolute;top:16px;right:16px}.xiping-close-icon,.xiping-download-icon{color:#fff;cursor:pointer}.xiping-main-content{flex:1;justify-content:center;align-items:center;min-height:0;display:flex;position:relative}.xiping-pinch-content{width:100%;height:100%}.xiping-image{object-fit:contain;pointer-events:none;width:100vw;height:100%}.xiping-loading{background-color:#00000080;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.xiping-modal-content{overflow:hidden}.xiping-modal-overlay{background-color:#000000b3}.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}.scrollbar-hide::-webkit-scrollbar{display:none}
|
|
@@ -11,5 +11,5 @@ interface ImageViewerProps {
|
|
|
11
11
|
/** 初始选中的图片下标,默认为 0。当只有一张图片时此参数无意义 */
|
|
12
12
|
initialIndex?: number;
|
|
13
13
|
}
|
|
14
|
-
declare const ImageViewer: (props: ImageViewerProps) => import(
|
|
14
|
+
declare const ImageViewer: (props: ImageViewerProps) => import('react').ReactPortal;
|
|
15
15
|
export default ImageViewer;
|