@xiping/react-components 1.0.70 → 1.0.78
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 +25 -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
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import e from "../pinch-content/index.js";
|
|
3
|
+
import t from "./ImageThumbnails2.js";
|
|
4
|
+
import './ImageViewer.css';/* empty css */
|
|
5
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
6
|
+
import { useCallback as i, useEffect as a, useState as o } from "react";
|
|
7
|
+
import s from "clsx";
|
|
8
|
+
import { AnimatePresence as c, motion as l } from "motion/react";
|
|
9
|
+
import { createPortal as u } from "react-dom";
|
|
10
|
+
import { Download as d, Loader2 as f, X as p } from "lucide-react";
|
|
11
|
+
//#region src/components/image-viewer/ImageViewer.tsx
|
|
12
|
+
var m = (e) => {
|
|
13
|
+
e.target.closest(".xiping-main-content") && e.preventDefault();
|
|
14
|
+
}, h = (h) => {
|
|
15
|
+
let { isOpen: g, onClose: _, imgSrc: v, thumbnailImages: y, canDownload: b = !1, wrapperClassName: x, closeClassName: S, downloadClassName: C, toolWrapperClassName: w, initialIndex: T = 0 } = h, E = Array.isArray(v) ? v : [v], D = y || E, [O, k] = o(Math.max(0, Math.min(T, E.length - 1))), [A, j] = o(!0), M = i(() => {
|
|
16
|
+
j(!0), _();
|
|
17
|
+
}, [_]), N = async () => {
|
|
18
|
+
let e = E[O];
|
|
19
|
+
try {
|
|
20
|
+
let t = await (await fetch(e)).blob(), n = window.URL.createObjectURL(t), r = document.createElement("a");
|
|
21
|
+
r.href = n, r.download = e.split("/").pop() || "image", document.body.appendChild(r), r.click(), window.URL.revokeObjectURL(n), document.body.removeChild(r);
|
|
22
|
+
} catch (e) {
|
|
23
|
+
console.error("Error downloading image:", e);
|
|
24
|
+
}
|
|
25
|
+
}, P = () => {
|
|
26
|
+
j(!1);
|
|
27
|
+
}, F = () => {
|
|
28
|
+
j(!1);
|
|
29
|
+
};
|
|
30
|
+
a(() => {
|
|
31
|
+
if (g) return document.addEventListener("touchmove", m, { passive: !1 }), () => {
|
|
32
|
+
document.removeEventListener("touchmove", m);
|
|
33
|
+
};
|
|
34
|
+
}, [g]), a(() => {
|
|
35
|
+
if (!g) return;
|
|
36
|
+
let e = document.body.style.overflow;
|
|
37
|
+
return document.body.style.overflow = "hidden", () => {
|
|
38
|
+
document.body.style.overflow = e;
|
|
39
|
+
};
|
|
40
|
+
}, [g]);
|
|
41
|
+
let I = i(() => {
|
|
42
|
+
"vibrate" in navigator && navigator.vibrate([
|
|
43
|
+
50,
|
|
44
|
+
50,
|
|
45
|
+
50
|
|
46
|
+
]);
|
|
47
|
+
}, []);
|
|
48
|
+
a(() => {
|
|
49
|
+
if (!g) return;
|
|
50
|
+
let e = (e) => {
|
|
51
|
+
let t = e.target;
|
|
52
|
+
if (!(t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable)) switch (e.key) {
|
|
53
|
+
case "ArrowLeft":
|
|
54
|
+
e.preventDefault(), k((e) => e > 0 ? e - 1 : (I(), e));
|
|
55
|
+
break;
|
|
56
|
+
case "ArrowRight":
|
|
57
|
+
e.preventDefault(), k((e) => e < E.length - 1 ? e + 1 : (I(), e));
|
|
58
|
+
break;
|
|
59
|
+
case "Escape":
|
|
60
|
+
e.preventDefault(), M();
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
return document.addEventListener("keydown", e), () => {
|
|
65
|
+
document.removeEventListener("keydown", e);
|
|
66
|
+
};
|
|
67
|
+
}, [
|
|
68
|
+
g,
|
|
69
|
+
E.length,
|
|
70
|
+
M,
|
|
71
|
+
I
|
|
72
|
+
]);
|
|
73
|
+
let L = /* @__PURE__ */ r("div", {
|
|
74
|
+
className: s("xiping-modal-root", x),
|
|
75
|
+
children: [/* @__PURE__ */ n("div", {
|
|
76
|
+
className: "xiping-modal-backdrop xiping-modal-overlay",
|
|
77
|
+
onClick: M,
|
|
78
|
+
"aria-hidden": !0
|
|
79
|
+
}), /* @__PURE__ */ n("div", {
|
|
80
|
+
className: "xiping-modal-content",
|
|
81
|
+
role: "dialog",
|
|
82
|
+
"aria-modal": "true",
|
|
83
|
+
"aria-label": "图片预览",
|
|
84
|
+
children: /* @__PURE__ */ r("div", {
|
|
85
|
+
className: "xiping-wrapper",
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ r("div", {
|
|
88
|
+
className: s("xiping-tool-wrapper", w),
|
|
89
|
+
children: [b && /* @__PURE__ */ n(d, {
|
|
90
|
+
size: 24,
|
|
91
|
+
className: s("xiping-download-icon", C),
|
|
92
|
+
onClick: N
|
|
93
|
+
}), /* @__PURE__ */ n(p, {
|
|
94
|
+
size: 24,
|
|
95
|
+
className: s("xiping-close-icon", S),
|
|
96
|
+
onClick: M
|
|
97
|
+
})]
|
|
98
|
+
}),
|
|
99
|
+
/* @__PURE__ */ r("div", {
|
|
100
|
+
className: "xiping-main-content",
|
|
101
|
+
children: [/* @__PURE__ */ n(e, {
|
|
102
|
+
canRotate: !1,
|
|
103
|
+
className: "xiping-pinch-content",
|
|
104
|
+
children: /* @__PURE__ */ n(c, {
|
|
105
|
+
mode: "wait",
|
|
106
|
+
children: /* @__PURE__ */ n(l.img, {
|
|
107
|
+
draggable: "false",
|
|
108
|
+
src: E[O],
|
|
109
|
+
alt: "",
|
|
110
|
+
className: "xiping-image",
|
|
111
|
+
onLoad: P,
|
|
112
|
+
onError: F,
|
|
113
|
+
initial: {
|
|
114
|
+
opacity: 0,
|
|
115
|
+
scale: .95
|
|
116
|
+
},
|
|
117
|
+
animate: {
|
|
118
|
+
opacity: 1,
|
|
119
|
+
scale: 1
|
|
120
|
+
},
|
|
121
|
+
exit: {
|
|
122
|
+
opacity: 0,
|
|
123
|
+
scale: 1.05
|
|
124
|
+
},
|
|
125
|
+
transition: {
|
|
126
|
+
duration: .3,
|
|
127
|
+
ease: "easeInOut"
|
|
128
|
+
}
|
|
129
|
+
}, O)
|
|
130
|
+
})
|
|
131
|
+
}), A && /* @__PURE__ */ n("div", {
|
|
132
|
+
className: "xiping-loading",
|
|
133
|
+
children: /* @__PURE__ */ n(f, {
|
|
134
|
+
className: "xiping-spinner-icon",
|
|
135
|
+
"aria-hidden": !0
|
|
136
|
+
})
|
|
137
|
+
})]
|
|
138
|
+
}),
|
|
139
|
+
/* @__PURE__ */ n(t, {
|
|
140
|
+
images: D,
|
|
141
|
+
currentIndex: O,
|
|
142
|
+
onImageSelect: k
|
|
143
|
+
})
|
|
144
|
+
]
|
|
145
|
+
})
|
|
146
|
+
})]
|
|
147
|
+
});
|
|
148
|
+
return g ? u(L, document.body) : null;
|
|
149
|
+
};
|
|
150
|
+
//#endregion
|
|
151
|
+
export { h as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.xiping-message{
|
|
1
|
+
.xiping-message{align-items:flex-start;max-width:80%;margin-bottom:16px;display:flex}.xiping-message.user{flex-direction:row-reverse;align-self:flex-end;margin-left:auto}.xiping-message.assistant{align-self:flex-start;margin-right:auto}.xiping-message__avatar{background-color:#e0e0e0;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:36px;height:36px;margin:0 8px;display:flex;overflow:hidden}.xiping-message__content{background-color:#fff;border-radius:12px;max-width:100%;padding:12px 16px;position:relative;box-shadow:0 1px 2px #0000001a}.xiping-message:not(:has(.xiping-message__avatar)) .xiping-message__content{margin:0}.xiping-message.user .xiping-message__content{color:#fff;background-color:#007bff}.xiping-message__text{word-break:break-word;line-height:1.5}.xiping-message__timestamp{color:#888;text-align:right;margin-top:4px;font-size:.75rem}.xiping-message.user .xiping-message__timestamp{color:#fffc}.xiping-message__thinking{align-items:center;margin-top:8px;display:flex}.xiping-message__thinking-dots{align-items:center;margin-right:8px;display:flex}.xiping-message__thinking-dots span{background-color:#888;border-radius:50%;width:8px;height:8px;margin:0 2px;animation:1.4s ease-in-out infinite both xiping-thinking;display:inline-block}.xiping-message__thinking-dots span:first-child{animation-delay:-.32s}.xiping-message__thinking-dots span:nth-child(2){animation-delay:-.16s}.xiping-message__thinking-text{color:#888;font-size:.9rem}.xiping-message.user .xiping-message__thinking-text{color:#fffc}@keyframes xiping-thinking{0%,80%,to{transform:scale(.6)}40%{transform:scale(1)}}.xiping-message__loading{justify-content:center;align-items:center;padding:8px;display:flex}.xiping-message__loading-spinner{border:3px solid #007bff4d;border-top-color:#007bff;border-radius:50%;width:24px;height:24px;animation:1s ease-in-out infinite xiping-spin}@keyframes xiping-spin{to{transform:rotate(360deg)}}.xiping-message__think{background-color:#0000000d;border-radius:8px;margin-top:12px;padding:8px 12px;font-size:.9rem}.xiping-message.user .xiping-message__think{background-color:#ffffff1a}.xiping-message__think-header{align-items:center;gap:8px;margin-bottom:8px;font-weight:500;display:flex}.xiping-message__think-toggle{cursor:pointer;color:#666;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;padding:4px;transition:background-color .2s;display:flex}.xiping-message__think-toggle:hover{background-color:#0000000d}.xiping-message__think-content{opacity:1;max-height:1000px;transition:all .3s ease-in-out;overflow:hidden}.xiping-message__think-content.hidden{opacity:0;max-height:0;margin:0;padding:0}.xiping-message__knowledge-sources{background-color:#00000008;border-radius:4px;margin-top:8px;padding:8px;font-size:.9em}.xiping-message__knowledge-sources-header{color:#666;margin-bottom:4px;font-weight:500}.xiping-message__knowledge-sources-list{margin:0;padding:0;list-style:none}.xiping-message__knowledge-source-item{margin-bottom:4px}.xiping-message__knowledge-source-item:last-child{margin-bottom:0}.xiping-message__knowledge-source-item a{color:#06c;text-decoration:none}.xiping-message__knowledge-source-item a:hover{text-decoration:underline}.xiping-message__knowledge-source-description{color:#666;margin-top:2px;margin-left:8px;font-size:.9em}.xiping-message__text-container{flex-direction:column;gap:4px;display:flex;position:relative}.xiping-message__copy-button{cursor:pointer;color:#666;opacity:0;background:0 0;border:none;border-radius:4px;justify-content:center;align-self:flex-end;align-items:center;padding:4px;transition:all .2s;display:flex}.xiping-message__text-container:hover .xiping-message__copy-button{opacity:1}.xiping-message__copy-button:hover{color:#333;background-color:#0000000d}.xiping-message__copy-tooltip{color:#fff;white-space:nowrap;background-color:#333;border-radius:4px;padding:4px 8px;font-size:12px;animation:2s ease-in-out xiping-fadeInOut;position:absolute;top:-24px;right:0}@keyframes xiping-fadeInOut{0%{opacity:0;transform:translateY(4px)}10%{opacity:1;transform:translateY(0)}90%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import './Message.css';/* empty css */
|
|
2
|
+
import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import { useState as r } from "react";
|
|
4
|
+
import i from "clsx";
|
|
5
|
+
import a from "react-markdown";
|
|
6
|
+
//#region src/components/message/Message.tsx
|
|
7
|
+
var o = ({ id: o, content: s, sender: c, timestamp: l, isThinking: u = !1, isLoading: d = !1, className: f = "", style: p = {}, showTimestamp: m = !0, avatarUser: h, avatarAssistant: g, thinkingText: _ = "思考中...", customThinkingComponent: v, customUserMessageComponent: y, customAssistantMessageComponent: b, parseContent: x = !1, parsedContent: S, thinkContent: C, knowledgeSources: w }) => {
|
|
8
|
+
let [T, E] = r(!0), [D, O] = r("idle");
|
|
9
|
+
console.log(o, "id");
|
|
10
|
+
let k = (e) => e.toLocaleTimeString([], {
|
|
11
|
+
hour: "2-digit",
|
|
12
|
+
minute: "2-digit"
|
|
13
|
+
}), A = async () => {
|
|
14
|
+
try {
|
|
15
|
+
await navigator.clipboard.writeText(s), O("copied"), setTimeout(() => O("idle"), 2e3);
|
|
16
|
+
} catch (e) {
|
|
17
|
+
console.error("复制失败:", e);
|
|
18
|
+
}
|
|
19
|
+
}, j = () => v || /* @__PURE__ */ n("div", {
|
|
20
|
+
className: "xiping-message__thinking",
|
|
21
|
+
children: [/* @__PURE__ */ n("div", {
|
|
22
|
+
className: "xiping-message__thinking-dots",
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ t("span", {}),
|
|
25
|
+
/* @__PURE__ */ t("span", {}),
|
|
26
|
+
/* @__PURE__ */ t("span", {})
|
|
27
|
+
]
|
|
28
|
+
}), /* @__PURE__ */ t("span", {
|
|
29
|
+
className: "xiping-message__thinking-text",
|
|
30
|
+
children: _
|
|
31
|
+
})]
|
|
32
|
+
}), M = () => /* @__PURE__ */ t("div", {
|
|
33
|
+
className: "xiping-message__loading",
|
|
34
|
+
children: /* @__PURE__ */ t("div", { className: "xiping-message__loading-spinner" })
|
|
35
|
+
}), N = () => !w || w.length === 0 ? null : /* @__PURE__ */ n("div", {
|
|
36
|
+
className: "xiping-message__knowledge-sources",
|
|
37
|
+
children: [/* @__PURE__ */ t("div", {
|
|
38
|
+
className: "xiping-message__knowledge-sources-header",
|
|
39
|
+
children: "知识来源:"
|
|
40
|
+
}), /* @__PURE__ */ t("ul", {
|
|
41
|
+
className: "xiping-message__knowledge-sources-list",
|
|
42
|
+
children: w.map((e, r) => /* @__PURE__ */ n("li", {
|
|
43
|
+
className: "xiping-message__knowledge-source-item",
|
|
44
|
+
children: [e.url ? /* @__PURE__ */ t("a", {
|
|
45
|
+
href: e.url,
|
|
46
|
+
target: "_blank",
|
|
47
|
+
rel: "noopener noreferrer",
|
|
48
|
+
children: e.title
|
|
49
|
+
}) : /* @__PURE__ */ t("span", { children: e.title }), e.description && /* @__PURE__ */ t("div", {
|
|
50
|
+
className: "xiping-message__knowledge-source-description",
|
|
51
|
+
children: e.description
|
|
52
|
+
})]
|
|
53
|
+
}, r))
|
|
54
|
+
})]
|
|
55
|
+
}), P = () => c === "user" ? null : /* @__PURE__ */ n("button", {
|
|
56
|
+
className: "xiping-message__copy-button",
|
|
57
|
+
onClick: A,
|
|
58
|
+
"aria-label": "Copy message",
|
|
59
|
+
title: "Copy message",
|
|
60
|
+
children: [/* @__PURE__ */ n("svg", {
|
|
61
|
+
width: "14",
|
|
62
|
+
height: "14",
|
|
63
|
+
viewBox: "0 0 16 16",
|
|
64
|
+
fill: "none",
|
|
65
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
66
|
+
children: [/* @__PURE__ */ t("path", {
|
|
67
|
+
d: "M13.3333 6H7.33333C6.59695 6 6 6.59695 6 7.33333V13.3333C6 14.0697 6.59695 14.6667 7.33333 14.6667H13.3333C14.0697 14.6667 14.6667 14.0697 14.6667 13.3333V7.33333C14.6667 6.59695 14.0697 6 13.3333 6Z",
|
|
68
|
+
stroke: "currentColor",
|
|
69
|
+
strokeWidth: "1.5",
|
|
70
|
+
strokeLinecap: "round",
|
|
71
|
+
strokeLinejoin: "round"
|
|
72
|
+
}), /* @__PURE__ */ t("path", {
|
|
73
|
+
d: "M3.33333 10H2.66667C2.31305 10 1.97391 9.85953 1.72386 9.60948C1.47381 9.35943 1.33334 9.02029 1.33334 8.66667V2.66667C1.33334 2.31305 1.47381 1.97391 1.72386 1.72386C1.97391 1.47381 2.31305 1.33334 2.66667 1.33334H8.66667C9.02029 1.33334 9.35943 1.47381 9.60948 1.72386C9.85953 1.97391 10 2.31305 10 2.66667V3.33334",
|
|
74
|
+
stroke: "currentColor",
|
|
75
|
+
strokeWidth: "1.5",
|
|
76
|
+
strokeLinecap: "round",
|
|
77
|
+
strokeLinejoin: "round"
|
|
78
|
+
})]
|
|
79
|
+
}), D === "copied" && /* @__PURE__ */ t("span", {
|
|
80
|
+
className: "xiping-message__copy-tooltip",
|
|
81
|
+
children: "Copied"
|
|
82
|
+
})]
|
|
83
|
+
});
|
|
84
|
+
return c === "user" && y ? y : c === "assistant" && b ? b : /* @__PURE__ */ n("div", {
|
|
85
|
+
className: i("xiping-message", c === "user" ? "user" : "assistant", f),
|
|
86
|
+
style: p,
|
|
87
|
+
children: [c === "user" && h || c === "assistant" && g ? /* @__PURE__ */ t("div", {
|
|
88
|
+
className: "xiping-message__avatar",
|
|
89
|
+
children: c === "user" ? h : g
|
|
90
|
+
}) : null, /* @__PURE__ */ t("div", {
|
|
91
|
+
className: "xiping-message__content",
|
|
92
|
+
children: d ? M() : x && c === "assistant" ? /* @__PURE__ */ n(e, { children: [
|
|
93
|
+
C && /* @__PURE__ */ n("div", {
|
|
94
|
+
className: "xiping-message__think",
|
|
95
|
+
children: [/* @__PURE__ */ n("div", {
|
|
96
|
+
className: "xiping-message__think-header",
|
|
97
|
+
children: ["思考过程:", /* @__PURE__ */ t("button", {
|
|
98
|
+
className: "xiping-message__think-toggle",
|
|
99
|
+
onClick: () => E(!T),
|
|
100
|
+
"aria-label": T ? "隐藏思考过程" : "显示思考过程",
|
|
101
|
+
children: /* @__PURE__ */ t("svg", {
|
|
102
|
+
width: "12",
|
|
103
|
+
height: "12",
|
|
104
|
+
viewBox: "0 0 12 12",
|
|
105
|
+
fill: "none",
|
|
106
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
107
|
+
style: {
|
|
108
|
+
transform: T ? "rotate(180deg)" : "rotate(0deg)",
|
|
109
|
+
transition: "transform 0.3s ease"
|
|
110
|
+
},
|
|
111
|
+
children: /* @__PURE__ */ t("path", {
|
|
112
|
+
d: "M2 4L6 8L10 4",
|
|
113
|
+
stroke: "currentColor",
|
|
114
|
+
strokeWidth: "1.5",
|
|
115
|
+
strokeLinecap: "round",
|
|
116
|
+
strokeLinejoin: "round"
|
|
117
|
+
})
|
|
118
|
+
})
|
|
119
|
+
})]
|
|
120
|
+
}), /* @__PURE__ */ t("div", {
|
|
121
|
+
className: i("xiping-message__think-content", T ? "visible" : "hidden"),
|
|
122
|
+
children: /* @__PURE__ */ t(a, { children: C })
|
|
123
|
+
})]
|
|
124
|
+
}),
|
|
125
|
+
u && j(),
|
|
126
|
+
S && /* @__PURE__ */ n("div", {
|
|
127
|
+
className: "xiping-message__text-container",
|
|
128
|
+
children: [/* @__PURE__ */ t("div", {
|
|
129
|
+
className: "xiping-message__text",
|
|
130
|
+
children: /* @__PURE__ */ t(a, { children: S })
|
|
131
|
+
}), P()]
|
|
132
|
+
}),
|
|
133
|
+
N(),
|
|
134
|
+
m && /* @__PURE__ */ t("div", {
|
|
135
|
+
className: "xiping-message__timestamp",
|
|
136
|
+
children: k(l)
|
|
137
|
+
})
|
|
138
|
+
] }) : /* @__PURE__ */ n(e, { children: [
|
|
139
|
+
C && /* @__PURE__ */ n("div", {
|
|
140
|
+
className: "xiping-message__think",
|
|
141
|
+
children: [/* @__PURE__ */ n("div", {
|
|
142
|
+
className: "xiping-message__think-header",
|
|
143
|
+
children: ["思考过程:", /* @__PURE__ */ t("button", {
|
|
144
|
+
className: "xiping-message__think-toggle",
|
|
145
|
+
onClick: () => E(!T),
|
|
146
|
+
"aria-label": T ? "隐藏思考过程" : "显示思考过程",
|
|
147
|
+
children: /* @__PURE__ */ t("svg", {
|
|
148
|
+
width: "12",
|
|
149
|
+
height: "12",
|
|
150
|
+
viewBox: "0 0 12 12",
|
|
151
|
+
fill: "none",
|
|
152
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
153
|
+
style: {
|
|
154
|
+
transform: T ? "rotate(180deg)" : "rotate(0deg)",
|
|
155
|
+
transition: "transform 0.3s ease"
|
|
156
|
+
},
|
|
157
|
+
children: /* @__PURE__ */ t("path", {
|
|
158
|
+
d: "M2 4L6 8L10 4",
|
|
159
|
+
stroke: "currentColor",
|
|
160
|
+
strokeWidth: "1.5",
|
|
161
|
+
strokeLinecap: "round",
|
|
162
|
+
strokeLinejoin: "round"
|
|
163
|
+
})
|
|
164
|
+
})
|
|
165
|
+
})]
|
|
166
|
+
}), /* @__PURE__ */ t("div", {
|
|
167
|
+
className: i("xiping-message__think-content", T ? "visible" : "hidden"),
|
|
168
|
+
children: /* @__PURE__ */ t(a, { children: C })
|
|
169
|
+
})]
|
|
170
|
+
}),
|
|
171
|
+
/* @__PURE__ */ n("div", {
|
|
172
|
+
className: "xiping-message__text-container",
|
|
173
|
+
children: [/* @__PURE__ */ t("div", {
|
|
174
|
+
className: "xiping-message__text",
|
|
175
|
+
children: /* @__PURE__ */ t(a, { children: s })
|
|
176
|
+
}), P()]
|
|
177
|
+
}),
|
|
178
|
+
u && j(),
|
|
179
|
+
N(),
|
|
180
|
+
m && /* @__PURE__ */ t("div", {
|
|
181
|
+
className: "xiping-message__timestamp",
|
|
182
|
+
children: k(l)
|
|
183
|
+
})
|
|
184
|
+
] })
|
|
185
|
+
})]
|
|
186
|
+
});
|
|
187
|
+
};
|
|
188
|
+
//#endregion
|
|
189
|
+
export { o as default };
|
|
@@ -1,127 +1,120 @@
|
|
|
1
|
-
import { jsx as
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
|
-
);
|
|
124
|
-
_.displayName = "PinchContent";
|
|
125
|
-
export {
|
|
126
|
-
_ as default
|
|
127
|
-
};
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as t, useEffect as n, useImperativeHandle as r, useRef as i } from "react";
|
|
3
|
+
import a from "clsx";
|
|
4
|
+
import { animated as o, useSpring as s } from "@react-spring/web";
|
|
5
|
+
import { createUseGesture as c, dragAction as l, pinchAction as u, wheelAction as d } from "@use-gesture/react";
|
|
6
|
+
import { useMount as f, useUnmount as p } from "ahooks";
|
|
7
|
+
//#region src/components/pinch-content/PinchContent.tsx
|
|
8
|
+
var m = c([
|
|
9
|
+
l,
|
|
10
|
+
u,
|
|
11
|
+
d
|
|
12
|
+
]), h = (e) => e.preventDefault(), g = t((t, c) => {
|
|
13
|
+
let { className: l, children: u, pinchWithoutMove: d = !1, canPinch: g = !0, canDrag: _ = !0, canRotate: v = !0, scaleBounds: y = {
|
|
14
|
+
min: .3,
|
|
15
|
+
max: 10
|
|
16
|
+
}, wheelZoomFactor: b = .001, rubberband: x = !0, scale: S, onScaleChange: C } = t, w = i(null);
|
|
17
|
+
f(() => {
|
|
18
|
+
w.current?.addEventListener("gesturestart", h), w.current?.addEventListener("gesturechange", h), w.current?.addEventListener("gestureend", h);
|
|
19
|
+
}), p(() => {
|
|
20
|
+
w.current?.removeEventListener("gesturestart", h), w.current?.removeEventListener("gesturechange", h), w.current?.removeEventListener("gestureend", h);
|
|
21
|
+
});
|
|
22
|
+
let T = S ?? 1, [E, D] = s(() => ({
|
|
23
|
+
x: 0,
|
|
24
|
+
y: 0,
|
|
25
|
+
scale: T,
|
|
26
|
+
rotateZ: 0
|
|
27
|
+
}));
|
|
28
|
+
n(() => {
|
|
29
|
+
if (S !== void 0) {
|
|
30
|
+
let e = Math.min(Math.max(S, y.min), y.max);
|
|
31
|
+
D.start({ scale: e });
|
|
32
|
+
}
|
|
33
|
+
}, [
|
|
34
|
+
S,
|
|
35
|
+
y.min,
|
|
36
|
+
y.max,
|
|
37
|
+
D
|
|
38
|
+
]);
|
|
39
|
+
let O = (e) => {
|
|
40
|
+
let t = Math.min(Math.max(e, y.min), y.max);
|
|
41
|
+
D.start({ scale: t }), C?.(t);
|
|
42
|
+
};
|
|
43
|
+
return r(c, () => ({
|
|
44
|
+
zoomIn: (e = 1.2) => {
|
|
45
|
+
O(E.scale.get() * e);
|
|
46
|
+
},
|
|
47
|
+
zoomOut: (e = 1.2) => {
|
|
48
|
+
O(E.scale.get() / e);
|
|
49
|
+
},
|
|
50
|
+
setScale: (e) => {
|
|
51
|
+
O(e);
|
|
52
|
+
},
|
|
53
|
+
reset: () => {
|
|
54
|
+
D.start({
|
|
55
|
+
x: 0,
|
|
56
|
+
y: 0,
|
|
57
|
+
scale: 1,
|
|
58
|
+
rotateZ: 0
|
|
59
|
+
}), C?.(1);
|
|
60
|
+
},
|
|
61
|
+
getScale: () => E.scale.get()
|
|
62
|
+
})), m({
|
|
63
|
+
onWheel: ({ delta: [, e] }) => {
|
|
64
|
+
if (!g) return;
|
|
65
|
+
let t = E.scale.get() * (1 - e * b), n = Math.min(Math.max(t, y.min), y.max);
|
|
66
|
+
D.start({ scale: n }), C?.(n);
|
|
67
|
+
},
|
|
68
|
+
onDrag: ({ pinching: e, cancel: t, offset: [n, r] }) => {
|
|
69
|
+
if (!_ || e) return t();
|
|
70
|
+
D.start({
|
|
71
|
+
x: n,
|
|
72
|
+
y: r
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
onPinch: ({ origin: [e, t], first: n, movement: [r], offset: [i, a], memo: o, cancel: s }) => {
|
|
76
|
+
if (!g) return s();
|
|
77
|
+
if (n) {
|
|
78
|
+
let { width: n, height: r, x: i, y: a } = w.current.getBoundingClientRect(), s = e - (i + n / 2), c = t - (a + r / 2);
|
|
79
|
+
o = [
|
|
80
|
+
E.x.get(),
|
|
81
|
+
E.y.get(),
|
|
82
|
+
s,
|
|
83
|
+
c
|
|
84
|
+
];
|
|
85
|
+
}
|
|
86
|
+
let c = Math.min(Math.max(i, y.min), y.max), l = o[0] - (r - 1) * o[2], u = o[1] - (r - 1) * o[3], f = {
|
|
87
|
+
scale: c,
|
|
88
|
+
rotateZ: v ? a : E.rotateZ.get(),
|
|
89
|
+
...d ? {
|
|
90
|
+
x: E.x.get(),
|
|
91
|
+
y: E.y.get()
|
|
92
|
+
} : {
|
|
93
|
+
x: l,
|
|
94
|
+
y: u
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
return D.start(f), C?.(c), o;
|
|
98
|
+
}
|
|
99
|
+
}, {
|
|
100
|
+
target: w,
|
|
101
|
+
drag: { from: () => [E.x.get(), E.y.get()] },
|
|
102
|
+
pinch: {
|
|
103
|
+
scaleBounds: y,
|
|
104
|
+
rubberband: x
|
|
105
|
+
},
|
|
106
|
+
wheel: { enabled: !0 }
|
|
107
|
+
}), /* @__PURE__ */ e(o.div, {
|
|
108
|
+
className: a(l),
|
|
109
|
+
ref: w,
|
|
110
|
+
style: {
|
|
111
|
+
userSelect: "none",
|
|
112
|
+
...t.style,
|
|
113
|
+
...E
|
|
114
|
+
},
|
|
115
|
+
children: u
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
g.displayName = "PinchContent";
|
|
119
|
+
//#endregion
|
|
120
|
+
export { g as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
1
|
+
import e from "./PinchContent.js";
|
|
2
|
+
//#region src/components/pinch-content/index.tsx
|
|
3
|
+
var t = e;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { t as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.xiping-pointer{
|
|
1
|
+
.xiping-pointer{z-index:50;pointer-events:none;position:fixed;transform:translate(-50%,-50%)}.xiping-pointer-icon{stroke:#fff;color:#000;transform:rotate(-70deg)}
|