@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.
Files changed (207) hide show
  1. package/dist/cjs/_virtual/_rolldown/runtime.js +1 -0
  2. package/dist/cjs/components/blur-fade/BlurFade.js +1 -1
  3. package/dist/cjs/components/blur-text/BlurText.js +1 -1
  4. package/dist/cjs/components/button/Button.css +1 -1
  5. package/dist/cjs/components/button/Button2.js +1 -0
  6. package/dist/cjs/components/comic-text/ComicText2.js +4 -0
  7. package/dist/cjs/components/confetti-button/index.js +1 -1
  8. package/dist/cjs/components/dock/Duck.css +1 -1
  9. package/dist/cjs/components/dock/Duck2.js +1 -0
  10. package/dist/cjs/components/flip-text/FlipText.css +1 -1
  11. package/dist/cjs/components/flip-text/FlipText2.js +1 -0
  12. package/dist/cjs/components/gradient-text/index.css +1 -1
  13. package/dist/cjs/components/gradient-text/index2.js +1 -0
  14. package/dist/cjs/components/hyper-text/HyperText.css +1 -1
  15. package/dist/cjs/components/hyper-text/index.js +1 -1
  16. package/dist/cjs/components/image-compare/ImageCompare.css +1 -1
  17. package/dist/cjs/components/image-compare/ImageCompare2.js +1 -0
  18. package/dist/cjs/components/image-viewer/ImageThumbnails.css +1 -1
  19. package/dist/cjs/components/image-viewer/ImageThumbnails2.js +1 -0
  20. package/dist/cjs/components/image-viewer/ImageViewer.css +1 -1
  21. package/dist/cjs/components/image-viewer/ImageViewer.d.ts +1 -1
  22. package/dist/cjs/components/image-viewer/ImageViewer2.js +1 -0
  23. package/dist/cjs/components/message/Message.css +1 -1
  24. package/dist/cjs/components/message/Message2.js +1 -0
  25. package/dist/cjs/components/pinch-content/PinchContent.js +1 -1
  26. package/dist/cjs/components/pinch-content/index.js +1 -1
  27. package/dist/cjs/components/pointer/Pointer.css +1 -1
  28. package/dist/cjs/components/pointer/Pointer2.js +1 -0
  29. package/dist/cjs/components/scratch-to-reveal/ScratchToReveal.css +1 -1
  30. package/dist/cjs/components/scratch-to-reveal/ScratchToReveal2.js +1 -0
  31. package/dist/cjs/components/shimmer-button/ShimmerButton.css +1 -1
  32. package/dist/cjs/components/shimmer-button/ShimmerButton2.js +1 -0
  33. package/dist/cjs/components/shiny-button/ShinyButton.css +1 -1
  34. package/dist/cjs/components/shiny-button/ShinyButton2.js +1 -0
  35. package/dist/cjs/components/shiny-text/ShinyText2.js +1 -0
  36. package/dist/cjs/components/sparkles-text/SparklesText.css +1 -1
  37. package/dist/cjs/components/sparkles-text/SparklesText2.js +1 -0
  38. package/dist/cjs/components/split-text/SplitText.css +1 -1
  39. package/dist/cjs/components/split-text/SplitText2.js +1 -0
  40. package/dist/cjs/components/subtitle-player/CurrentMode.css +1 -1
  41. package/dist/cjs/components/subtitle-player/CurrentMode2.js +2 -0
  42. package/dist/cjs/components/subtitle-player/LyricsMode.css +1 -1
  43. package/dist/cjs/components/subtitle-player/LyricsMode2.js +2 -0
  44. package/dist/cjs/components/subtitle-player/SubtitlePlayer.css +1 -1
  45. package/dist/cjs/components/subtitle-player/SubtitlePlayer2.js +1 -0
  46. package/dist/cjs/components/subtitle-player/utils.js +1 -1
  47. package/dist/cjs/components/text-animate/TextAnimate.css +1 -1
  48. package/dist/cjs/components/text-animate/TextAnimate2.js +2 -0
  49. package/dist/cjs/components/text-type/TextType.css +1 -1
  50. package/dist/cjs/components/text-type/TextType2.js +1 -0
  51. package/dist/cjs/components/txt-editor/TxtEditor.js +4 -4
  52. package/dist/cjs/components/txt-reader/TxtReader.js +1 -1
  53. package/dist/cjs/components/txt-reader/index.module.css +1 -1
  54. package/dist/cjs/components/txt-reader/index.module.js +1 -0
  55. package/dist/cjs/components/typing-animation/index.css +1 -1
  56. package/dist/cjs/components/typing-animation/index2.js +1 -0
  57. package/dist/cjs/components/variable-proximity/index.css +1 -1
  58. package/dist/cjs/components/variable-proximity/index2.js +1 -0
  59. package/dist/cjs/components/video-dialog/VideoDialog.css +1 -1
  60. package/dist/cjs/components/video-dialog/VideoDialog2.js +1 -0
  61. package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.css +1 -1
  62. package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.mobile.css +1 -1
  63. package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.pc.css +1 -1
  64. package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer2.js +1 -0
  65. package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayerMobile.js +1 -1
  66. package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayerPC.js +1 -1
  67. package/dist/cjs/components/video-subtitle-player/layouts/VideoSubtitlePlayerLayoutMobile.js +1 -1
  68. package/dist/cjs/components/video-subtitle-player/layouts/VideoSubtitlePlayerLayoutPC.js +1 -1
  69. package/dist/cjs/components/video-subtitle-player/useVideoSubtitleStore.js +1 -1
  70. package/dist/cjs/components/video-subtitle-player/useXGPlayer.js +1 -1
  71. package/dist/cjs/hooks/useStayTimeReport.js +1 -1
  72. package/dist/cjs/index.js +1 -1
  73. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.24_core-js@3.47.0/node_modules/xgplayer/dist/index.min.css +1 -1
  74. package/dist/cjs/packages/subtitle/lib/index.js +1 -0
  75. package/dist/cjs/packages/subtitle/lib/src/json-converter.js +1 -1
  76. package/dist/cjs/packages/subtitle/lib/src/parser.js +5 -5
  77. package/dist/cjs/react-components.css +27 -27
  78. package/dist/es/components/blur-fade/BlurFade.js +37 -49
  79. package/dist/es/components/blur-text/BlurText.js +67 -76
  80. package/dist/es/components/button/Button.css +1 -1
  81. package/dist/es/components/button/Button2.js +48 -0
  82. package/dist/es/components/comic-text/ComicText2.js +55 -0
  83. package/dist/es/components/confetti-button/index.js +63 -75
  84. package/dist/es/components/dock/Duck.css +1 -1
  85. package/dist/es/components/dock/Duck2.js +60 -0
  86. package/dist/es/components/flip-text/FlipText.css +1 -1
  87. package/dist/es/components/flip-text/FlipText2.js +41 -0
  88. package/dist/es/components/gradient-text/index.css +1 -1
  89. package/dist/es/components/gradient-text/index2.js +29 -0
  90. package/dist/es/components/hyper-text/HyperText.css +1 -1
  91. package/dist/es/components/hyper-text/index.js +51 -79
  92. package/dist/es/components/image-compare/ImageCompare.css +1 -1
  93. package/dist/es/components/image-compare/ImageCompare2.js +96 -0
  94. package/dist/es/components/image-viewer/ImageThumbnails.css +1 -1
  95. package/dist/es/components/image-viewer/ImageThumbnails2.js +40 -0
  96. package/dist/es/components/image-viewer/ImageViewer.css +1 -1
  97. package/dist/es/components/image-viewer/ImageViewer.d.ts +1 -1
  98. package/dist/es/components/image-viewer/ImageViewer2.js +151 -0
  99. package/dist/es/components/message/Message.css +1 -1
  100. package/dist/es/components/message/Message2.js +189 -0
  101. package/dist/es/components/pinch-content/PinchContent.js +120 -127
  102. package/dist/es/components/pinch-content/index.js +5 -5
  103. package/dist/es/components/pointer/Pointer.css +1 -1
  104. package/dist/es/components/pointer/Pointer2.js +61 -0
  105. package/dist/es/components/react-force-graph-3d/index.js +2 -0
  106. package/dist/es/components/scratch-to-reveal/ScratchToReveal.css +1 -1
  107. package/dist/es/components/scratch-to-reveal/ScratchToReveal2.js +88 -0
  108. package/dist/es/components/shimmer-button/ShimmerButton.css +1 -1
  109. package/dist/es/components/shimmer-button/ShimmerButton2.js +33 -0
  110. package/dist/es/components/shiny-button/ShinyButton.css +1 -1
  111. package/dist/es/components/shiny-button/ShinyButton2.js +53 -0
  112. package/dist/es/components/shiny-text/ShinyText2.js +61 -0
  113. package/dist/es/components/sparkles-text/SparklesText.css +1 -1
  114. package/dist/es/components/sparkles-text/SparklesText2.js +90 -0
  115. package/dist/es/components/split-text/SplitText.css +1 -1
  116. package/dist/es/components/split-text/SplitText2.js +109 -0
  117. package/dist/es/components/subtitle-player/CurrentMode.css +1 -1
  118. package/dist/es/components/subtitle-player/CurrentMode2.js +44 -0
  119. package/dist/es/components/subtitle-player/LyricsMode.css +1 -1
  120. package/dist/es/components/subtitle-player/LyricsMode2.js +114 -0
  121. package/dist/es/components/subtitle-player/SubtitlePlayer.css +1 -1
  122. package/dist/es/components/subtitle-player/SubtitlePlayer2.js +169 -0
  123. package/dist/es/components/subtitle-player/utils.js +63 -69
  124. package/dist/es/components/text-animate/TextAnimate.css +1 -1
  125. package/dist/es/components/text-animate/TextAnimate2.js +312 -0
  126. package/dist/es/components/text-type/TextType.css +1 -1
  127. package/dist/es/components/text-type/TextType2.js +80 -0
  128. package/dist/es/components/txt-editor/TxtEditor.js +60 -95
  129. package/dist/es/components/txt-reader/TxtReader.js +45 -74
  130. package/dist/es/components/txt-reader/index.module.css +1 -1
  131. package/dist/es/components/txt-reader/index.module.js +10 -0
  132. package/dist/es/components/typing-animation/index.css +1 -1
  133. package/dist/es/components/typing-animation/index2.js +43 -0
  134. package/dist/es/components/variable-proximity/index.css +1 -1
  135. package/dist/es/components/variable-proximity/index2.js +179 -0
  136. package/dist/es/components/video-dialog/VideoDialog.css +1 -1
  137. package/dist/es/components/video-dialog/VideoDialog2.js +168 -0
  138. package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.css +1 -1
  139. package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.mobile.css +1 -1
  140. package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.pc.css +1 -1
  141. package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer2.js +43 -0
  142. package/dist/es/components/video-subtitle-player/VideoSubtitlePlayerMobile.js +29 -46
  143. package/dist/es/components/video-subtitle-player/VideoSubtitlePlayerPC.js +94 -74
  144. package/dist/es/components/video-subtitle-player/layouts/VideoSubtitlePlayerLayoutMobile.js +24 -21
  145. package/dist/es/components/video-subtitle-player/layouts/VideoSubtitlePlayerLayoutPC.js +58 -50
  146. package/dist/es/components/video-subtitle-player/useVideoSubtitleStore.js +61 -56
  147. package/dist/es/components/video-subtitle-player/useXGPlayer.js +38 -35
  148. package/dist/es/hooks/useStayTimeReport.js +29 -29
  149. package/dist/es/index.js +33 -70
  150. package/dist/es/node_modules/.pnpm/xgplayer@3.0.24_core-js@3.47.0/node_modules/xgplayer/dist/index.min.css +1 -1
  151. package/dist/es/packages/subtitle/lib/index.js +2 -0
  152. package/dist/es/packages/subtitle/lib/src/json-converter.js +22 -23
  153. package/dist/es/packages/subtitle/lib/src/parser.js +41 -54
  154. package/dist/es/react-components.css +27 -27
  155. package/package.json +25 -27
  156. package/dist/cjs/components/button/Button.js +0 -1
  157. package/dist/cjs/components/comic-text/ComicText.js +0 -4
  158. package/dist/cjs/components/dock/Duck.js +0 -1
  159. package/dist/cjs/components/flip-text/FlipText.js +0 -1
  160. package/dist/cjs/components/gradient-text/index.js +0 -1
  161. package/dist/cjs/components/image-compare/ImageCompare.js +0 -1
  162. package/dist/cjs/components/image-viewer/ImageThumbnails.js +0 -1
  163. package/dist/cjs/components/image-viewer/ImageViewer.js +0 -1
  164. package/dist/cjs/components/message/Message.js +0 -1
  165. package/dist/cjs/components/pointer/Pointer.js +0 -1
  166. package/dist/cjs/components/scratch-to-reveal/ScratchToReveal.js +0 -1
  167. package/dist/cjs/components/shimmer-button/ShimmerButton.js +0 -1
  168. package/dist/cjs/components/shiny-button/ShinyButton.js +0 -1
  169. package/dist/cjs/components/shiny-text/ShinyText.js +0 -1
  170. package/dist/cjs/components/sparkles-text/SparklesText.js +0 -1
  171. package/dist/cjs/components/split-text/SplitText.js +0 -1
  172. package/dist/cjs/components/subtitle-player/CurrentMode.js +0 -2
  173. package/dist/cjs/components/subtitle-player/LyricsMode.js +0 -2
  174. package/dist/cjs/components/subtitle-player/SubtitlePlayer.js +0 -1
  175. package/dist/cjs/components/text-animate/TextAnimate.js +0 -2
  176. package/dist/cjs/components/text-type/TextType.js +0 -1
  177. package/dist/cjs/components/txt-reader/index.module.css.js +0 -1
  178. package/dist/cjs/components/typing-animation/index.js +0 -1
  179. package/dist/cjs/components/variable-proximity/index.js +0 -1
  180. package/dist/cjs/components/video-dialog/VideoDialog.js +0 -1
  181. package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.js +0 -1
  182. package/dist/es/components/button/Button.js +0 -72
  183. package/dist/es/components/comic-text/ComicText.js +0 -52
  184. package/dist/es/components/dock/Duck.js +0 -80
  185. package/dist/es/components/flip-text/FlipText.js +0 -38
  186. package/dist/es/components/gradient-text/index.js +0 -22
  187. package/dist/es/components/image-compare/ImageCompare.js +0 -127
  188. package/dist/es/components/image-viewer/ImageThumbnails.js +0 -73
  189. package/dist/es/components/image-viewer/ImageViewer.js +0 -141
  190. package/dist/es/components/message/Message.js +0 -220
  191. package/dist/es/components/pointer/Pointer.js +0 -75
  192. package/dist/es/components/scratch-to-reveal/ScratchToReveal.js +0 -97
  193. package/dist/es/components/shimmer-button/ShimmerButton.js +0 -42
  194. package/dist/es/components/shiny-button/ShinyButton.js +0 -61
  195. package/dist/es/components/shiny-text/ShinyText.js +0 -76
  196. package/dist/es/components/sparkles-text/SparklesText.js +0 -71
  197. package/dist/es/components/split-text/SplitText.js +0 -116
  198. package/dist/es/components/subtitle-player/CurrentMode.js +0 -78
  199. package/dist/es/components/subtitle-player/LyricsMode.js +0 -152
  200. package/dist/es/components/subtitle-player/SubtitlePlayer.js +0 -234
  201. package/dist/es/components/text-animate/TextAnimate.js +0 -310
  202. package/dist/es/components/text-type/TextType.js +0 -121
  203. package/dist/es/components/txt-reader/index.module.css.js +0 -10
  204. package/dist/es/components/typing-animation/index.js +0 -56
  205. package/dist/es/components/variable-proximity/index.js +0 -211
  206. package/dist/es/components/video-dialog/VideoDialog.js +0 -113
  207. 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{display:flex;align-items:flex-start;max-width:80%;margin-bottom:16px}.xiping-message.user{align-self:flex-end;flex-direction:row-reverse;margin-left:auto}.xiping-message.assistant{align-self:flex-start;margin-right:auto}.xiping-message__avatar{width:36px;height:36px;border-radius:50%;overflow:hidden;margin:0 8px;background-color:#e0e0e0;display:flex;align-items:center;justify-content:center;flex-shrink:0}.xiping-message__content{background-color:#fff;padding:12px 16px;border-radius:12px;box-shadow:0 1px 2px #0000001a;position:relative;max-width:100%}.xiping-message:not(:has(.xiping-message__avatar)) .xiping-message__content{margin:0}.xiping-message.user .xiping-message__content{background-color:#007bff;color:#fff}.xiping-message__text{word-break:break-word;line-height:1.5}.xiping-message__timestamp{font-size:.75rem;color:#888;margin-top:4px;text-align:right}.xiping-message.user .xiping-message__timestamp{color:#fffc}.xiping-message__thinking{display:flex;align-items:center;margin-top:8px}.xiping-message__thinking-dots{display:flex;align-items:center;margin-right:8px}.xiping-message__thinking-dots span{width:8px;height:8px;margin:0 2px;background-color:#888;border-radius:50%;display:inline-block;animation:xiping-thinking 1.4s infinite ease-in-out both}.xiping-message__thinking-dots span:nth-child(1){animation-delay:-.32s}.xiping-message__thinking-dots span:nth-child(2){animation-delay:-.16s}.xiping-message__thinking-text{font-size:.9rem;color:#888}.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{display:flex;align-items:center;justify-content:center;padding:8px}.xiping-message__loading-spinner{width:24px;height:24px;border:3px solid rgba(0,123,255,.3);border-radius:50%;border-top-color:#007bff;animation:xiping-spin 1s ease-in-out infinite}@keyframes xiping-spin{to{transform:rotate(360deg)}}.xiping-message__think{margin-top:12px;padding:8px 12px;background-color:#0000000d;border-radius:8px;font-size:.9rem}.xiping-message.user .xiping-message__think{background-color:#ffffff1a}.xiping-message__think-header{display:flex;align-items:center;gap:8px;margin-bottom:8px;font-weight:500}.xiping-message__think-toggle{background:none;border:none;padding:4px;cursor:pointer;color:#666;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background-color .2s ease}.xiping-message__think-toggle:hover{background-color:#0000000d}.xiping-message__think-content{max-height:1000px;opacity:1;overflow:hidden;transition:all .3s ease-in-out}.xiping-message__think-content.hidden{max-height:0;opacity:0;margin:0;padding:0}.xiping-message__knowledge-sources{margin-top:8px;padding:8px;background-color:#00000008;border-radius:4px;font-size:.9em}.xiping-message__knowledge-sources-header{font-weight:500;margin-bottom:4px;color:#666}.xiping-message__knowledge-sources-list{list-style:none;padding:0;margin:0}.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{font-size:.9em;color:#666;margin-top:2px;margin-left:8px}.xiping-message__text-container{position:relative;display:flex;flex-direction:column;gap:4px}.xiping-message__copy-button{align-self:flex-end;padding:4px;background:none;border:none;cursor:pointer;color:#666;opacity:0;transition:all .2s ease;border-radius:4px;display:flex;align-items:center;justify-content:center}.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{position:absolute;top:-24px;right:0;background-color:#333;color:#fff;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;animation:xiping-fadeInOut 2s ease-in-out}@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)}}
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 U } from "react/jsx-runtime";
2
- import { useSpring as W, animated as j } from "@react-spring/web";
3
- import { createUseGesture as F, dragAction as H, pinchAction as O, wheelAction as k } from "@use-gesture/react";
4
- import { forwardRef as q, useRef as J, useEffect as K, useImperativeHandle as Q } from "react";
5
- import { useMount as T, useUnmount as V } from "ahooks";
6
- import X from "clsx";
7
- const Y = F([H, O, k]), i = (u) => u.preventDefault(), _ = q(
8
- (u, x) => {
9
- const {
10
- className: p,
11
- children: S,
12
- pinchWithoutMove: v = !1,
13
- canPinch: h = !0,
14
- canDrag: y = !0,
15
- canRotate: M = !0,
16
- scaleBounds: r = { min: 0.3, max: 10 },
17
- wheelZoomFactor: E = 1e-3,
18
- rubberband: w = !0,
19
- scale: m,
20
- onScaleChange: d
21
- } = u, a = J(null);
22
- T(() => {
23
- a.current?.addEventListener("gesturestart", i), a.current?.addEventListener("gesturechange", i), a.current?.addEventListener("gestureend", i);
24
- }), V(() => {
25
- a.current?.removeEventListener("gesturestart", i), a.current?.removeEventListener("gesturechange", i), a.current?.removeEventListener("gestureend", i);
26
- });
27
- const L = m ?? 1, [t, c] = W(() => ({
28
- x: 0,
29
- y: 0,
30
- scale: L,
31
- rotateZ: 0
32
- }));
33
- K(() => {
34
- if (m !== void 0) {
35
- const e = Math.min(
36
- Math.max(m, r.min),
37
- r.max
38
- );
39
- c.start({ scale: e });
40
- }
41
- }, [m, r.min, r.max, c]);
42
- const g = (e) => {
43
- const n = Math.min(
44
- Math.max(e, r.min),
45
- r.max
46
- );
47
- c.start({ scale: n }), d?.(n);
48
- };
49
- return Q(x, () => ({
50
- zoomIn: (e = 1.2) => {
51
- const n = t.scale.get();
52
- g(n * e);
53
- },
54
- zoomOut: (e = 1.2) => {
55
- const n = t.scale.get();
56
- g(n / e);
57
- },
58
- setScale: (e) => {
59
- g(e);
60
- },
61
- reset: () => {
62
- c.start({ x: 0, y: 0, scale: 1, rotateZ: 0 }), d?.(1);
63
- },
64
- getScale: () => t.scale.get()
65
- })), Y(
66
- {
67
- onWheel: ({ delta: [, e] }) => {
68
- if (!h) return;
69
- const l = t.scale.get() * (1 - e * E), s = Math.min(
70
- Math.max(l, r.min),
71
- r.max
72
- );
73
- c.start({ scale: s }), d?.(s);
74
- },
75
- onDrag: ({ pinching: e, cancel: n, offset: [l, s] }) => {
76
- if (!y || e) return n();
77
- c.start({ x: l, y: s });
78
- },
79
- onPinch: ({
80
- origin: [e, n],
81
- first: l,
82
- movement: [s],
83
- offset: [R, Z],
84
- memo: o,
85
- cancel: b
86
- }) => {
87
- if (!h) return b();
88
- if (l) {
89
- const { width: D, height: N, x: z, y: B } = a.current.getBoundingClientRect(), G = e - (z + D / 2), I = n - (B + N / 2);
90
- o = [t.x.get(), t.y.get(), G, I];
91
- }
92
- const f = Math.min(
93
- Math.max(R, r.min),
94
- r.max
95
- ), C = o[0] - (s - 1) * o[2], P = o[1] - (s - 1) * o[3], A = {
96
- scale: f,
97
- rotateZ: M ? Z : t.rotateZ.get(),
98
- ...v ? { x: t.x.get(), y: t.y.get() } : { x: C, y: P }
99
- };
100
- return c.start(A), d?.(f), o;
101
- }
102
- },
103
- {
104
- target: a,
105
- drag: { from: () => [t.x.get(), t.y.get()] },
106
- pinch: { scaleBounds: r, rubberband: w },
107
- wheel: { enabled: !0 }
108
- }
109
- ), /* @__PURE__ */ U(
110
- j.div,
111
- {
112
- className: X(p),
113
- ref: a,
114
- style: {
115
- userSelect: "none",
116
- ...u.style,
117
- ...t
118
- },
119
- children: S
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 o from "./PinchContent.js";
2
- export {
3
- o as PinchContent,
4
- o as default
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{position:fixed;z-index:50;pointer-events:none;transform:translate(-50%,-50%)}.xiping-pointer-icon{transform:rotate(-70deg);stroke:#fff;color:#000}
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)}