@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.
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 +26 -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
@@ -1,220 +0,0 @@
1
- import { jsxs as i, jsx as e, Fragment as b } from "react/jsx-runtime";
2
- import { useState as y } from "react";
3
- import a from "react-markdown";
4
- import o from "clsx";
5
- import './Message.css';/* empty css */
6
- const E = ({
7
- id: j,
8
- content: d,
9
- sender: n,
10
- timestamp: c,
11
- isThinking: g = !1,
12
- isLoading: V = !1,
13
- className: B = "",
14
- style: H = {},
15
- showTimestamp: m = !0,
16
- avatarUser: h,
17
- avatarAssistant: p,
18
- thinkingText: M = "思考中...",
19
- customThinkingComponent: _,
20
- customUserMessageComponent: u,
21
- customAssistantMessageComponent: x,
22
- parseContent: W = !1,
23
- parsedContent: k,
24
- thinkContent: t,
25
- knowledgeSources: l
26
- }) => {
27
- const [r, v] = y(!0), [I, N] = y("idle");
28
- console.log(j, "id");
29
- const w = (s) => s.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }), S = async () => {
30
- try {
31
- await navigator.clipboard.writeText(d), N("copied"), setTimeout(() => N("idle"), 2e3);
32
- } catch (s) {
33
- console.error("复制失败:", s);
34
- }
35
- }, f = () => _ || /* @__PURE__ */ i("div", { className: "xiping-message__thinking", children: [
36
- /* @__PURE__ */ i("div", { className: "xiping-message__thinking-dots", children: [
37
- /* @__PURE__ */ e("span", {}),
38
- /* @__PURE__ */ e("span", {}),
39
- /* @__PURE__ */ e("span", {})
40
- ] }),
41
- /* @__PURE__ */ e("span", { className: "xiping-message__thinking-text", children: M })
42
- ] }), F = () => /* @__PURE__ */ e("div", { className: "xiping-message__loading", children: /* @__PURE__ */ e("div", { className: "xiping-message__loading-spinner" }) }), C = () => !l || l.length === 0 ? null : /* @__PURE__ */ i("div", { className: "xiping-message__knowledge-sources", children: [
43
- /* @__PURE__ */ e("div", { className: "xiping-message__knowledge-sources-header", children: "知识来源:" }),
44
- /* @__PURE__ */ e("ul", { className: "xiping-message__knowledge-sources-list", children: l.map((s, K) => /* @__PURE__ */ i("li", { className: "xiping-message__knowledge-source-item", children: [
45
- s.url ? /* @__PURE__ */ e("a", { href: s.url, target: "_blank", rel: "noopener noreferrer", children: s.title }) : /* @__PURE__ */ e("span", { children: s.title }),
46
- s.description && /* @__PURE__ */ e("div", { className: "xiping-message__knowledge-source-description", children: s.description })
47
- ] }, K)) })
48
- ] }), L = () => n === "user" ? null : /* @__PURE__ */ i(
49
- "button",
50
- {
51
- className: "xiping-message__copy-button",
52
- onClick: S,
53
- "aria-label": "Copy message",
54
- title: "Copy message",
55
- children: [
56
- /* @__PURE__ */ i(
57
- "svg",
58
- {
59
- width: "14",
60
- height: "14",
61
- viewBox: "0 0 16 16",
62
- fill: "none",
63
- xmlns: "http://www.w3.org/2000/svg",
64
- children: [
65
- /* @__PURE__ */ e(
66
- "path",
67
- {
68
- 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",
69
- stroke: "currentColor",
70
- strokeWidth: "1.5",
71
- strokeLinecap: "round",
72
- strokeLinejoin: "round"
73
- }
74
- ),
75
- /* @__PURE__ */ e(
76
- "path",
77
- {
78
- 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",
79
- stroke: "currentColor",
80
- strokeWidth: "1.5",
81
- strokeLinecap: "round",
82
- strokeLinejoin: "round"
83
- }
84
- )
85
- ]
86
- }
87
- ),
88
- I === "copied" && /* @__PURE__ */ e("span", { className: "xiping-message__copy-tooltip", children: "Copied" })
89
- ]
90
- }
91
- );
92
- return n === "user" && u ? u : n === "assistant" && x ? x : /* @__PURE__ */ i(
93
- "div",
94
- {
95
- className: o(
96
- "xiping-message",
97
- n === "user" ? "user" : "assistant",
98
- B
99
- ),
100
- style: H,
101
- children: [
102
- n === "user" && h || n === "assistant" && p ? /* @__PURE__ */ e("div", { className: "xiping-message__avatar", children: n === "user" ? h : p }) : null,
103
- /* @__PURE__ */ e("div", { className: "xiping-message__content", children: V ? F() : W && n === "assistant" ? /* @__PURE__ */ i(b, { children: [
104
- t && /* @__PURE__ */ i("div", { className: "xiping-message__think", children: [
105
- /* @__PURE__ */ i("div", { className: "xiping-message__think-header", children: [
106
- "思考过程:",
107
- /* @__PURE__ */ e(
108
- "button",
109
- {
110
- className: "xiping-message__think-toggle",
111
- onClick: () => v(!r),
112
- "aria-label": r ? "隐藏思考过程" : "显示思考过程",
113
- children: /* @__PURE__ */ e(
114
- "svg",
115
- {
116
- width: "12",
117
- height: "12",
118
- viewBox: "0 0 12 12",
119
- fill: "none",
120
- xmlns: "http://www.w3.org/2000/svg",
121
- style: {
122
- transform: r ? "rotate(180deg)" : "rotate(0deg)",
123
- transition: "transform 0.3s ease"
124
- },
125
- children: /* @__PURE__ */ e(
126
- "path",
127
- {
128
- d: "M2 4L6 8L10 4",
129
- stroke: "currentColor",
130
- strokeWidth: "1.5",
131
- strokeLinecap: "round",
132
- strokeLinejoin: "round"
133
- }
134
- )
135
- }
136
- )
137
- }
138
- )
139
- ] }),
140
- /* @__PURE__ */ e(
141
- "div",
142
- {
143
- className: o(
144
- "xiping-message__think-content",
145
- r ? "visible" : "hidden"
146
- ),
147
- children: /* @__PURE__ */ e(a, { children: t })
148
- }
149
- )
150
- ] }),
151
- g && f(),
152
- k && /* @__PURE__ */ i("div", { className: "xiping-message__text-container", children: [
153
- /* @__PURE__ */ e("div", { className: "xiping-message__text", children: /* @__PURE__ */ e(a, { children: k }) }),
154
- L()
155
- ] }),
156
- C(),
157
- m && /* @__PURE__ */ e("div", { className: "xiping-message__timestamp", children: w(c) })
158
- ] }) : /* @__PURE__ */ i(b, { children: [
159
- t && /* @__PURE__ */ i("div", { className: "xiping-message__think", children: [
160
- /* @__PURE__ */ i("div", { className: "xiping-message__think-header", children: [
161
- "思考过程:",
162
- /* @__PURE__ */ e(
163
- "button",
164
- {
165
- className: "xiping-message__think-toggle",
166
- onClick: () => v(!r),
167
- "aria-label": r ? "隐藏思考过程" : "显示思考过程",
168
- children: /* @__PURE__ */ e(
169
- "svg",
170
- {
171
- width: "12",
172
- height: "12",
173
- viewBox: "0 0 12 12",
174
- fill: "none",
175
- xmlns: "http://www.w3.org/2000/svg",
176
- style: {
177
- transform: r ? "rotate(180deg)" : "rotate(0deg)",
178
- transition: "transform 0.3s ease"
179
- },
180
- children: /* @__PURE__ */ e(
181
- "path",
182
- {
183
- d: "M2 4L6 8L10 4",
184
- stroke: "currentColor",
185
- strokeWidth: "1.5",
186
- strokeLinecap: "round",
187
- strokeLinejoin: "round"
188
- }
189
- )
190
- }
191
- )
192
- }
193
- )
194
- ] }),
195
- /* @__PURE__ */ e(
196
- "div",
197
- {
198
- className: o(
199
- "xiping-message__think-content",
200
- r ? "visible" : "hidden"
201
- ),
202
- children: /* @__PURE__ */ e(a, { children: t })
203
- }
204
- )
205
- ] }),
206
- /* @__PURE__ */ i("div", { className: "xiping-message__text-container", children: [
207
- /* @__PURE__ */ e("div", { className: "xiping-message__text", children: /* @__PURE__ */ e(a, { children: d }) }),
208
- L()
209
- ] }),
210
- g && f(),
211
- C(),
212
- m && /* @__PURE__ */ e("div", { className: "xiping-message__timestamp", children: w(c) })
213
- ] }) })
214
- ]
215
- }
216
- );
217
- };
218
- export {
219
- E as Message
220
- };
@@ -1,75 +0,0 @@
1
- "use client";
2
- import { jsxs as h, Fragment as x, jsx as t } from "react/jsx-runtime";
3
- import { useMotionValue as m, AnimatePresence as E, motion as L } from "motion/react";
4
- import { useState as w, useRef as y, useEffect as g } from "react";
5
- import M from "clsx";
6
- import './Pointer.css';/* empty css */
7
- function P({
8
- className: u,
9
- style: v,
10
- children: d,
11
- ...p
12
- }) {
13
- const n = m(0), o = m(0), [f, s] = w(!1), r = y(null);
14
- return g(() => {
15
- if (typeof window < "u" && r.current) {
16
- const e = r.current.parentElement;
17
- if (e) {
18
- e.style.cursor = "none";
19
- const i = (l) => {
20
- n.set(l.clientX), o.set(l.clientY);
21
- }, c = () => {
22
- s(!0);
23
- }, a = () => {
24
- s(!1);
25
- };
26
- return e.addEventListener("mousemove", i), e.addEventListener("mouseenter", c), e.addEventListener("mouseleave", a), () => {
27
- e.style.cursor = "", e.removeEventListener("mousemove", i), e.removeEventListener("mouseenter", c), e.removeEventListener("mouseleave", a);
28
- };
29
- }
30
- }
31
- }, [n, o]), /* @__PURE__ */ h(x, { children: [
32
- /* @__PURE__ */ t("div", { ref: r }),
33
- /* @__PURE__ */ t(E, { children: f && /* @__PURE__ */ t(
34
- L.div,
35
- {
36
- className: M("xiping-pointer", u),
37
- style: {
38
- top: o,
39
- left: n,
40
- ...v
41
- },
42
- initial: {
43
- scale: 0,
44
- opacity: 0
45
- },
46
- animate: {
47
- scale: 1,
48
- opacity: 1
49
- },
50
- exit: {
51
- scale: 0,
52
- opacity: 0
53
- },
54
- ...p,
55
- children: d || /* @__PURE__ */ t(
56
- "svg",
57
- {
58
- stroke: "currentColor",
59
- fill: "currentColor",
60
- strokeWidth: "1",
61
- viewBox: "0 0 16 16",
62
- height: "24",
63
- width: "24",
64
- xmlns: "http://www.w3.org/2000/svg",
65
- className: "xiping-pointer-icon",
66
- children: /* @__PURE__ */ t("path", { d: "M14.082 2.182a.5.5 0 0 1 .103.557L8.528 15.467a.5.5 0 0 1-.917-.007L5.57 10.694.803 8.652a.5.5 0 0 1-.006-.916l12.728-5.657a.5.5 0 0 1 .556.103z" })
67
- }
68
- )
69
- }
70
- ) })
71
- ] });
72
- }
73
- export {
74
- P as Pointer
75
- };
@@ -1,97 +0,0 @@
1
- "use client";
2
- import { jsxs as P, jsx as R } from "react/jsx-runtime";
3
- import { useAnimation as z, motion as A } from "motion/react";
4
- import { useRef as b, useState as I, useEffect as x } from "react";
5
- import j from "clsx";
6
- import './ScratchToReveal.css';/* empty css */
7
- const T = ({
8
- width: m,
9
- height: l,
10
- minScratchPercentage: E = 50,
11
- onComplete: h,
12
- children: L,
13
- className: M,
14
- gradientColors: a = ["#A97CF8", "#F38CB8", "#FDCC92"]
15
- }) => {
16
- const i = b(null), [d, r] = I(!1), [S, C] = I(!1), v = z();
17
- x(() => {
18
- const t = i.current, e = t?.getContext("2d");
19
- if (t && e) {
20
- e.fillStyle = "#ccc", e.fillRect(0, 0, t.width, t.height);
21
- const o = e.createLinearGradient(
22
- 0,
23
- 0,
24
- t.width,
25
- t.height
26
- );
27
- o.addColorStop(0, a[0]), o.addColorStop(0.5, a[1]), o.addColorStop(1, a[2]), e.fillStyle = o, e.fillRect(0, 0, t.width, t.height);
28
- }
29
- }, [a]), x(() => {
30
- const t = (c) => {
31
- d && f(c.clientX, c.clientY);
32
- }, e = (c) => {
33
- if (!d) return;
34
- const s = c.touches[0];
35
- f(s.clientX, s.clientY);
36
- }, o = () => {
37
- r(!1), g();
38
- }, n = () => {
39
- r(!1), g();
40
- };
41
- return document.addEventListener("mousedown", t), document.addEventListener("mousemove", t), document.addEventListener("touchstart", e), document.addEventListener("touchmove", e), document.addEventListener("mouseup", o), document.addEventListener("touchend", n), document.addEventListener("touchcancel", n), () => {
42
- document.removeEventListener("mousedown", t), document.removeEventListener("mousemove", t), document.removeEventListener("touchstart", e), document.removeEventListener("touchmove", e), document.removeEventListener("mouseup", o), document.removeEventListener("touchend", n), document.removeEventListener("touchcancel", n);
43
- };
44
- }, [d]);
45
- const D = () => r(!0), w = () => r(!0), f = (t, e) => {
46
- const o = i.current, n = o?.getContext("2d");
47
- if (o && n) {
48
- const c = o.getBoundingClientRect(), s = t - c.left + 16, p = e - c.top + 16;
49
- n.globalCompositeOperation = "destination-out", n.beginPath(), n.arc(s, p, 30, 0, Math.PI * 2), n.fill();
50
- }
51
- }, y = async () => {
52
- await v.start({
53
- scale: [1, 1.5, 1],
54
- rotate: [0, 10, -10, 10, -10, 0],
55
- transition: { duration: 0.5 }
56
- }), h && h();
57
- }, g = () => {
58
- if (S) return;
59
- const t = i.current, e = t?.getContext("2d");
60
- if (t && e) {
61
- const n = e.getImageData(0, 0, t.width, t.height).data, c = n.length / 4;
62
- let s = 0;
63
- for (let u = 3; u < n.length; u += 4)
64
- n[u] === 0 && s++;
65
- s / c * 100 >= E && (C(!0), e.clearRect(0, 0, t.width, t.height), y());
66
- }
67
- };
68
- return /* @__PURE__ */ P(
69
- A.div,
70
- {
71
- className: j("xiping-scratch-to-reveal", M),
72
- style: {
73
- width: m,
74
- height: l,
75
- cursor: "url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIj4KICA8Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSIxNSIgc3R5bGU9ImZpbGw6I2ZmZjtzdHJva2U6IzAwMDtzdHJva2Utd2lkdGg6MXB4OyIgLz4KPC9zdmc+'), auto"
76
- },
77
- animate: v,
78
- children: [
79
- /* @__PURE__ */ R(
80
- "canvas",
81
- {
82
- ref: i,
83
- width: m,
84
- height: l,
85
- className: "xiping-scratch-canvas",
86
- onMouseDown: D,
87
- onTouchStart: w
88
- }
89
- ),
90
- L
91
- ]
92
- }
93
- );
94
- };
95
- export {
96
- T as ScratchToReveal
97
- };
@@ -1,42 +0,0 @@
1
- import { jsxs as c, jsx as i } from "react/jsx-runtime";
2
- import d from "react";
3
- import h from "clsx";
4
- import './ShimmerButton.css';/* empty css */
5
- const l = d.forwardRef(
6
- ({
7
- shimmerColor: r = "#ffffff",
8
- shimmerSize: s = "0.05em",
9
- shimmerDuration: e = "3s",
10
- borderRadius: m = "100px",
11
- background: t = "rgba(0, 0, 0, 1)",
12
- className: a,
13
- children: o,
14
- ...n
15
- }, p) => /* @__PURE__ */ c(
16
- "button",
17
- {
18
- style: {
19
- "--spread": "90deg",
20
- "--shimmer-color": r,
21
- "--radius": m,
22
- "--speed": e,
23
- "--cut": s,
24
- "--bg": t
25
- },
26
- className: h("xiping-shimmer-button", a),
27
- ref: p,
28
- ...n,
29
- children: [
30
- /* @__PURE__ */ i("div", { className: "xiping-shimmer-button-spark-container", children: /* @__PURE__ */ i("div", { className: "xiping-shimmer-button-spark", children: /* @__PURE__ */ i("div", { className: "xiping-shimmer-button-spark-before" }) }) }),
31
- o,
32
- /* @__PURE__ */ i("div", { className: "xiping-shimmer-button-highlight" }),
33
- /* @__PURE__ */ i("div", { className: "xiping-shimmer-button-backdrop" })
34
- ]
35
- }
36
- )
37
- );
38
- l.displayName = "ShimmerButton";
39
- export {
40
- l as ShimmerButton,
41
- l as default
42
- };
@@ -1,61 +0,0 @@
1
- "use client";
2
- import { jsxs as t, jsx as a } from "react/jsx-runtime";
3
- import { motion as s } from "motion/react";
4
- import o from "react";
5
- import l from "clsx";
6
- import './ShinyButton.css';/* empty css */
7
- const p = {
8
- initial: { "--x": "100%", scale: 0.8 },
9
- animate: { "--x": "-100%", scale: 1 },
10
- whileTap: { scale: 0.95 },
11
- transition: {
12
- repeat: 1 / 0,
13
- repeatType: "loop",
14
- repeatDelay: 1,
15
- type: "spring",
16
- stiffness: 20,
17
- damping: 15,
18
- mass: 2,
19
- scale: {
20
- type: "spring",
21
- stiffness: 200,
22
- damping: 5,
23
- mass: 0.5
24
- }
25
- }
26
- }, c = o.forwardRef(({ children: r, className: e, ...i }, n) => /* @__PURE__ */ t(
27
- s.button,
28
- {
29
- ref: n,
30
- className: l("xiping-shiny-button", e),
31
- ...p,
32
- ...i,
33
- children: [
34
- /* @__PURE__ */ a(
35
- "span",
36
- {
37
- className: "xiping-shiny-button-text",
38
- style: {
39
- maskImage: "linear-gradient(-75deg,var(--primary) calc(var(--x) + 20%),transparent calc(var(--x) + 30%),var(--primary) calc(var(--x) + 100%))"
40
- },
41
- children: r
42
- }
43
- ),
44
- /* @__PURE__ */ a(
45
- "span",
46
- {
47
- style: {
48
- mask: "linear-gradient(rgb(0,0,0), rgb(0,0,0)) content-box exclude,linear-gradient(rgb(0,0,0), rgb(0,0,0))",
49
- WebkitMask: "linear-gradient(rgb(0,0,0), rgb(0,0,0)) content-box exclude,linear-gradient(rgb(0,0,0), rgb(0,0,0))",
50
- backgroundImage: "linear-gradient(-75deg,var(--primary)/10% calc(var(--x)+20%),var(--primary)/50% calc(var(--x)+25%),var(--primary)/10% calc(var(--x)+100%))"
51
- },
52
- className: "xiping-shiny-button-border"
53
- }
54
- )
55
- ]
56
- }
57
- ));
58
- c.displayName = "ShinyButton";
59
- export {
60
- c as ShinyButton
61
- };
@@ -1,76 +0,0 @@
1
- import { jsx as L } from "react/jsx-runtime";
2
- import { useState as W, useRef as d, useEffect as j, useCallback as y } from "react";
3
- import { useMotionValue as v, useAnimationFrame as z, useTransform as A, motion as B } from "motion/react";
4
- import './ShinyText.css';/* empty css */
5
- const G = ({
6
- text: T,
7
- disabled: k = !1,
8
- speed: $ = 2,
9
- className: x = "",
10
- color: u = "#b5b5b5",
11
- shineColor: h = "#ffffff",
12
- spread: C = 120,
13
- yoyo: M = !1,
14
- pauseOnHover: l = !1,
15
- direction: f = "left",
16
- delay: D = 0
17
- }) => {
18
- const [R, p] = W(!1), e = v(0), a = d(0), c = d(null), r = d(f === "left" ? 1 : -1), t = $ * 1e3, b = D * 1e3;
19
- z((o) => {
20
- if (k || R) {
21
- c.current = null;
22
- return;
23
- }
24
- if (c.current === null) {
25
- c.current = o;
26
- return;
27
- }
28
- const I = o - c.current;
29
- if (c.current = o, a.current += I, M) {
30
- const s = t + b, i = s * 2, n = a.current % i;
31
- if (n < t) {
32
- const m = n / t * 100;
33
- e.set(r.current === 1 ? m : 100 - m);
34
- } else if (n < s)
35
- e.set(r.current === 1 ? 100 : 0);
36
- else if (n < s + t) {
37
- const g = 100 - (n - s) / t * 100;
38
- e.set(r.current === 1 ? g : 100 - g);
39
- } else
40
- e.set(r.current === 1 ? 0 : 100);
41
- } else {
42
- const s = t + b, i = a.current % s;
43
- if (i < t) {
44
- const n = i / t * 100;
45
- e.set(r.current === 1 ? n : 100 - n);
46
- } else
47
- e.set(r.current === 1 ? 100 : 0);
48
- }
49
- }), j(() => {
50
- r.current = f === "left" ? 1 : -1, a.current = 0, e.set(0);
51
- }, [f]);
52
- const S = A(e, (o) => `${150 - o * 2}% center`), E = y(() => {
53
- l && p(!0);
54
- }, [l]), P = y(() => {
55
- l && p(!1);
56
- }, [l]), F = {
57
- backgroundImage: `linear-gradient(${C}deg, ${u} 0%, ${u} 35%, ${h} 50%, ${u} 65%, ${u} 100%)`,
58
- backgroundSize: "200% auto",
59
- WebkitBackgroundClip: "text",
60
- backgroundClip: "text",
61
- WebkitTextFillColor: "transparent"
62
- };
63
- return /* @__PURE__ */ L(
64
- B.span,
65
- {
66
- className: `shiny-text ${x}`,
67
- style: { ...F, backgroundPosition: S },
68
- onMouseEnter: E,
69
- onMouseLeave: P,
70
- children: T
71
- }
72
- );
73
- };
74
- export {
75
- G as default
76
- };
@@ -1,71 +0,0 @@
1
- "use client";
2
- import { jsx as r, jsxs as g } from "react/jsx-runtime";
3
- import { motion as k } from "motion/react";
4
- import { useState as L, useEffect as S } from "react";
5
- import y from "clsx";
6
- import './SparklesText.css';/* empty css */
7
- const M = ({ id: i, x: t, y: o, color: s, delay: l, scale: c }) => /* @__PURE__ */ r(
8
- k.svg,
9
- {
10
- className: "xiping-sparkle",
11
- initial: { opacity: 0, left: t, top: o },
12
- animate: {
13
- opacity: [0, 1, 0],
14
- scale: [0, c, 0],
15
- rotate: [75, 120, 150]
16
- },
17
- transition: { duration: 0.8, repeat: 1 / 0, delay: l },
18
- width: "21",
19
- height: "21",
20
- viewBox: "0 0 21 21",
21
- children: /* @__PURE__ */ r(
22
- "path",
23
- {
24
- d: "M9.82531 0.843845C10.0553 0.215178 10.9446 0.215178 11.1746 0.843845L11.8618 2.72026C12.4006 4.19229 12.3916 6.39157 13.5 7.5C14.6084 8.60843 16.8077 8.59935 18.2797 9.13822L20.1561 9.82534C20.7858 10.0553 20.7858 10.9447 20.1561 11.1747L18.2797 11.8618C16.8077 12.4007 14.6084 12.3916 13.5 13.5C12.3916 14.6084 12.4006 16.8077 11.8618 18.2798L11.1746 20.1562C10.9446 20.7858 10.0553 20.7858 9.82531 20.1562L9.13819 18.2798C8.59932 16.8077 8.60843 14.6084 7.5 13.5C6.39157 12.3916 4.19225 12.4007 2.72023 11.8618L0.843814 11.1747C0.215148 10.9447 0.215148 10.0553 0.843814 9.82534L2.72023 9.13822C4.19225 8.59935 6.39157 8.60843 7.5 7.5C8.60843 6.39157 8.59932 4.19229 9.13819 2.72026L9.82531 0.843845Z",
25
- fill: s
26
- }
27
- )
28
- },
29
- i
30
- ), I = ({
31
- children: i,
32
- colors: t = { first: "#9E7AFF", second: "#FE8BBB" },
33
- className: o,
34
- sparklesCount: s = 10,
35
- ...l
36
- }) => {
37
- const [c, p] = L([]);
38
- return S(() => {
39
- const n = () => {
40
- const e = `${Math.random() * 100}%`, a = `${Math.random() * 100}%`, h = Math.random() > 0.5 ? t.first : t.second, x = Math.random() * 2, C = Math.random() * 1 + 0.3, u = Math.random() * 10 + 5;
41
- return { id: `${e}-${a}-${Date.now()}`, x: e, y: a, color: h, delay: x, scale: C, lifespan: u };
42
- }, d = () => {
43
- const e = Array.from({ length: s }, n);
44
- p(e);
45
- }, m = () => {
46
- p(
47
- (e) => e.map((a) => a.lifespan <= 0 ? n() : { ...a, lifespan: a.lifespan - 0.1 })
48
- );
49
- };
50
- d();
51
- const f = setInterval(m, 100);
52
- return () => clearInterval(f);
53
- }, [t.first, t.second, s]), /* @__PURE__ */ r(
54
- "div",
55
- {
56
- className: y("xiping-sparkles-text", o),
57
- ...l,
58
- style: {
59
- "--sparkles-first-color": `${t.first}`,
60
- "--sparkles-second-color": `${t.second}`
61
- },
62
- children: /* @__PURE__ */ g("span", { className: "xiping-sparkles-text-wrapper", children: [
63
- c.map((n) => /* @__PURE__ */ r(M, { ...n }, n.id)),
64
- /* @__PURE__ */ r("strong", { children: i })
65
- ] })
66
- }
67
- );
68
- };
69
- export {
70
- I as SparklesText
71
- };