@xiping/react-components 1.0.58 → 1.0.59
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/README.md +92 -6
- package/dist/cjs/components/comic-text/ComicText.css +1 -1
- package/dist/cjs/components/dock/Duck.css +1 -1
- package/dist/cjs/components/gradient-text/index.css +1 -1
- package/dist/cjs/components/gradient-text/index.js +1 -1
- package/dist/cjs/components/image-compare/ImageCompare.css +1 -1
- package/dist/cjs/components/image-viewer/ImageThumbnails.css +1 -1
- package/dist/cjs/components/image-viewer/ImageViewer.css +1 -1
- package/dist/cjs/components/message/Message.js +1 -1
- package/dist/cjs/components/scratch-to-reveal/ScratchToReveal.css +1 -1
- package/dist/cjs/components/subtitle-player/LyricsMode.css +1 -1
- package/dist/cjs/components/subtitle-player/SubtitlePlayer.js +1 -1
- package/dist/cjs/components/txt-reader/TxtReader.js +1 -1
- package/dist/cjs/components/typing-animation/index.js +1 -1
- package/dist/cjs/components/variable-proximity/index.css +1 -1
- package/dist/cjs/components/variable-proximity/index.js +1 -1
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.css +1 -1
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.js +1 -1
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.mobile.css +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/dist/index.min.css +1 -1
- package/dist/cjs/react-components.css +11 -11
- package/dist/cjs/utils/utils.d.ts +1 -0
- package/dist/es/components/comic-text/ComicText.css +1 -1
- package/dist/es/components/confetti-button/index.js +1 -1
- package/dist/es/components/dock/Duck.css +1 -1
- package/dist/es/components/gradient-text/index.css +1 -1
- package/dist/es/components/gradient-text/index.js +6 -7
- package/dist/es/components/image-compare/ImageCompare.css +1 -1
- package/dist/es/components/image-viewer/ImageThumbnails.css +1 -1
- package/dist/es/components/image-viewer/ImageViewer.css +1 -1
- package/dist/es/components/message/Message.js +15 -16
- package/dist/es/components/scratch-to-reveal/ScratchToReveal.css +1 -1
- package/dist/es/components/subtitle-player/LyricsMode.css +1 -1
- package/dist/es/components/subtitle-player/SubtitlePlayer.js +9 -10
- package/dist/es/components/txt-reader/TxtReader.js +9 -10
- package/dist/es/components/typing-animation/index.js +17 -18
- package/dist/es/components/variable-proximity/index.css +1 -1
- package/dist/es/components/variable-proximity/index.js +28 -29
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.css +1 -1
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.js +1 -2
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.mobile.css +1 -1
- package/dist/es/index.js +51 -51
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/dist/index.min.css +1 -1
- package/dist/es/react-components.css +11 -11
- package/dist/es/utils/utils.d.ts +1 -0
- package/package.json +23 -27
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
/* components/comic-text/ComicText.css */
|
|
6
|
-
.xiping-comic-text{-webkit-user-select:none
|
|
6
|
+
.xiping-comic-text{-webkit-user-select:none;user-select:none;text-align:center}
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
/* components/dock/Duck.css */
|
|
10
|
-
.xiping-dock{margin-left:auto;margin-right:auto;margin-top:2rem;display:flex;height:58px;width
|
|
10
|
+
.xiping-dock{margin-left:auto;margin-right:auto;margin-top:2rem;display:flex;height:58px;width:max-content;align-items:center;justify-content:center;gap:.5rem;border-radius:1rem;border:1px solid;padding:.5rem;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}@supports (backdrop-filter: blur(12px)){.xiping-dock{background-color:#ffffff1a}.dark .xiping-dock{background-color:#0000001a}}.xiping-dock--top{align-items:flex-start}.xiping-dock--middle{align-items:center}.xiping-dock--bottom{align-items:flex-end}.xiping-dock-icon{display:flex;aspect-ratio:1 / 1;cursor:pointer;align-items:center;justify-content:center;border-radius:9999px}
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
/* components/flip-text/FlipText.css */
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
/* components/gradient-text/index.css */
|
|
18
|
-
.xiping-gradient-text{position:relative;margin:0 auto;display:flex;max-width
|
|
18
|
+
.xiping-gradient-text{position:relative;margin:0 auto;display:flex;max-width:fit-content;flex-direction:row;align-items:center;justify-content:center;border-radius:1.25rem;font-weight:500;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transition:box-shadow .5s ease-out;overflow:hidden;cursor:pointer}.xiping-gradient-text__overlay{position:absolute;inset:0;background-size:300% 100%;animation:xiping-gradient linear infinite;border-radius:inherit;z-index:0;pointer-events:none}.xiping-gradient-text__overlay:before{content:"";position:absolute;border-radius:inherit;width:calc(100% - 2px);height:calc(100% - 2px);left:50%;top:50%;transform:translate(-50%,-50%);background-color:#060010;z-index:-1}@keyframes xiping-gradient{0%{background-position:0% 50%}50%{background-position:100% 50%}to{background-position:0% 50%}}.xiping-gradient-text__content{display:inline-block;position:relative;z-index:2;background-size:300% 100%;background-clip:text;-webkit-background-clip:text;color:transparent;animation:xiping-gradient linear infinite}
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
/* components/hyper-text/HyperText.css */
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
/* components/image-compare/ImageCompare.css */
|
|
26
|
-
.xiping-image-compare-container{position:relative;-webkit-user-select:none
|
|
26
|
+
.xiping-image-compare-container{position:relative;-webkit-user-select:none;user-select:none;overflow:hidden;width:100%}.xiping-image-compare-label{position:absolute;top:1rem;padding:.25rem .5rem;background-color:#0009;color:#fff;font-size:.75rem;font-weight:500;border-radius:.25rem;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:10}.xiping-image-compare-label-original{right:1rem}.xiping-image-compare-label-modified{left:1rem}.xiping-image-compare-overlay{position:absolute;inset:0;height:100%;overflow:hidden}.xiping-image-compare-divider{position:absolute;top:0;bottom:0;background-color:#ffffffe6;cursor:ew-resize;box-shadow:0 0 0 1px #0000004d,0 0 0 1px #ffffff80 inset,0 0 8px #0003}.xiping-image-compare-divider-button{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:2rem;height:2rem;border-radius:50%;background-color:#fffffff2;border:2px solid rgba(0,0,0,.2);box-shadow:0 0 0 1px #fffc,0 4px 12px #0000004d,0 2px 4px #0003;display:flex;align-items:center;justify-content:center;transition:box-shadow .2s ease,transform .2s ease}.xiping-image-compare-divider-button:hover{box-shadow:0 0 0 1px #ffffffe6,0 6px 16px #0006,0 3px 6px #0000004d;transform:translate(-50%,-50%) scale(1.05)}.xiping-image-compare-divider-button:active{transform:translate(-50%,-50%) scale(.95)}.xiping-image-compare-divider-icon{width:1.5rem;height:1.5rem;color:#1f2937}.xiping-image-compare-divider-theme-dark{background-color:#000000e6;box-shadow:0 0 0 1px #ffffff4d,0 0 0 1px #00000080 inset,0 0 8px #fff3}.xiping-image-compare-divider-button-theme-dark{background-color:#000000f2;border:2px solid rgba(255,255,255,.2);box-shadow:0 0 0 1px #000c,0 4px 12px #ffffff4d,0 2px 4px #fff3}.xiping-image-compare-divider-button-theme-dark:hover{box-shadow:0 0 0 1px #000000e6,0 6px 16px #fff6,0 3px 6px #ffffff4d}.xiping-image-compare-divider-theme-dark .xiping-image-compare-divider-icon{color:#f3f4f6}
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
/* components/image-viewer/ImageThumbnails.css */
|
|
30
|
-
.xiping-thumbnails-wrapper{height:6rem;background-color:#00000080;flex-shrink:0;z-index:10;padding-bottom:env(safe-area-inset-bottom);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}.xiping-thumbnails-wrapper--hidden{display:none}.xiping-thumbnails-scroll{height:6rem;width:100vw;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}.xiping-thumbnails-scroll::-webkit-scrollbar{display:none}.xiping-thumbnails-container{display:flex;gap:.5rem;padding:.5rem;height:6rem;min-width
|
|
30
|
+
.xiping-thumbnails-wrapper{height:6rem;background-color:#00000080;flex-shrink:0;z-index:10;padding-bottom:env(safe-area-inset-bottom);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}.xiping-thumbnails-wrapper--hidden{display:none}.xiping-thumbnails-scroll{height:6rem;width:100vw;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}.xiping-thumbnails-scroll::-webkit-scrollbar{display:none}.xiping-thumbnails-container{display:flex;gap:.5rem;padding:.5rem;height:6rem;min-width:max-content}.xiping-thumbnail-item{height:100%;aspect-ratio:1 / 1;flex-shrink:0;cursor:pointer;border:2px solid transparent;transition:all .2s}.xiping-thumbnail-item--active{border-color:#fff}.xiping-thumbnail-image{width:100%;height:100%;object-fit:contain}
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
/* components/image-viewer/ImageViewer.css */
|
|
34
|
-
.xiping-wrapper{width:100vw;height:100vh;position:relative;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top,0)}.xiping-tool-wrapper{position:absolute;top:16px;right:16px;display:flex;gap:16px;z-index:10}.xiping-close-icon,.xiping-download-icon{color:#fff;cursor:pointer}.xiping-main-content{flex:1;min-height:0;position:relative;display:flex;align-items:center;justify-content:center}.xiping-pinch-content{width:100%;height:100%}.xiping-image{width:100vw;height:100
|
|
34
|
+
.xiping-wrapper{width:100vw;height:100vh;position:relative;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top,0)}.xiping-tool-wrapper{position:absolute;top:16px;right:16px;display:flex;gap:16px;z-index:10}.xiping-close-icon,.xiping-download-icon{color:#fff;cursor:pointer}.xiping-main-content{flex:1;min-height:0;position:relative;display:flex;align-items:center;justify-content:center}.xiping-pinch-content{width:100%;height:100%}.xiping-image{width:100vw;height:100%;object-fit:contain;pointer-events:none}.xiping-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background-color:#00000080}.xiping-modal-content{overflow:hidden}.xiping-modal-overlay{background-color:#000000b3}.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}.scrollbar-hide::-webkit-scrollbar{display:none}
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
/* components/message/Message.css */
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
/* components/scratch-to-reveal/ScratchToReveal.css */
|
|
46
|
-
.xiping-scratch-to-reveal{position:relative;-webkit-user-select:none
|
|
46
|
+
.xiping-scratch-to-reveal{position:relative;-webkit-user-select:none;user-select:none}.xiping-scratch-canvas{position:absolute;left:0;top:0}
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
/* components/shimmer-button/ShimmerButton.css */
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
/* components/subtitle-player/LyricsMode.css */
|
|
74
|
-
.xiping-subtitle-player__lyrics-time{font-size:.7rem;font-weight:500;color:#ffffff80;font-family:Monaco,Menlo,Ubuntu Mono,monospace;margin-bottom:.25rem;-webkit-user-select:none
|
|
74
|
+
.xiping-subtitle-player__lyrics-time{font-size:.7rem;font-weight:500;color:#ffffff80;font-family:Monaco,Menlo,Ubuntu Mono,monospace;margin-bottom:.25rem;-webkit-user-select:none;user-select:none}.xiping-subtitle-player__lyrics-item{display:flex;flex-direction:column;gap:.25rem;transition:all .2s ease}.xiping-subtitle-player__lyrics-item--active{color:#fbbf24;font-weight:600;transition:all .3s ease;position:relative}.xiping-subtitle-player__lyrics-item--active:before{content:"";position:absolute;left:-1rem;top:50%;transform:translateY(-50%);width:4px;height:92%;background:#fbbf24;border-radius:2px}.xiping-subtitle-player__lyrics-item--past{opacity:.5;color:#fff9}.xiping-subtitle-player__lyrics-label{font-size:.75rem;font-weight:600;color:#ffffffb3;text-transform:uppercase;letter-spacing:.05em;margin-bottom:.25rem}.xiping-subtitle-player__lyrics-text{font-size:1rem;font-weight:500;text-shadow:0 2px 4px rgba(0,0,0,.5)}.xiping-subtitle-player__lyrics-line{margin:.25rem 0}.xiping-subtitle-player__lyrics-line:first-child{margin-top:0}.xiping-subtitle-player__lyrics-line:last-child{margin-bottom:0}.xiping-subtitle-player__lyrics-hover-layer{position:absolute;inset:0;pointer-events:none}.xiping-subtitle-player--lyrics{max-height:600px;overflow-y:auto;gap:.5rem;scroll-behavior:smooth}.xiping-subtitle-player--lyrics::-webkit-scrollbar{width:8px}.xiping-subtitle-player--lyrics::-webkit-scrollbar-track{background:#ffffff1a;border-radius:4px}.xiping-subtitle-player--lyrics::-webkit-scrollbar-thumb{background:#ffffff4d;border-radius:4px}.xiping-subtitle-player--lyrics::-webkit-scrollbar-thumb:hover{background:#ffffff80}.xiping-subtitle-player__group{display:flex;flex-direction:column;gap:.5rem;width:100%;border-radius:.5rem;padding:.5rem;margin:-.5rem;transition:all .2s ease}.xiping-subtitle-player__group:hover{background-color:#ffffff1a}.xiping-subtitle-player__group:hover .xiping-subtitle-player__lyrics-item{transform:translate(4px)}.xiping-subtitle-player__group:hover .xiping-subtitle-player__lyrics-item--active{background-color:#fbbf2426}.xiping-subtitle-player__lyrics-item--active .xiping-subtitle-word{color:#fbbf24;font-weight:600}@media(max-width:768px){.xiping-subtitle-player__lyrics-text{font-size:.9rem}}
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
/* components/subtitle-player/SubtitlePlayer.css */
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
/* components/variable-proximity/index.css */
|
|
98
|
-
.xiping-variable-proximity{font-family:Roboto Flex,Noto Sans SC,PingFang SC,Microsoft YaHei,SimHei,sans-serif}.
|
|
98
|
+
.xiping-variable-proximity{font-family:Roboto Flex,Noto Sans SC,PingFang SC,Microsoft YaHei,SimHei,sans-serif}.xiping-variable-proximity__sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
/* components/video-dialog/VideoDialog.css */
|
|
@@ -103,11 +103,11 @@
|
|
|
103
103
|
|
|
104
104
|
|
|
105
105
|
/* components/video-subtitle-player/VideoSubtitlePlayer.css */
|
|
106
|
-
.xiping-video-subtitle-player{width:100%;height:100%;background:#1a1a1a;border-radius:8px;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.xiping-video-subtitle-player__video-wrapper{width:100%;height:100%;background:#000;overflow:hidden}.xiping-video-subtitle-player__video-container{position:relative;width:100%;height:100%;background:#000;overflow:hidden}.xiping-video-subtitle-player__video{position:absolute;top:0;left:0;width:100%;height:100%;padding:0}.xiping-video-subtitle-player__video-container .xgplayer{width:100%!important;height:100%!important}.xiping-video-subtitle-player__video-container .xgplayer video{
|
|
106
|
+
.xiping-video-subtitle-player{width:100%;height:100%;background:#1a1a1a;border-radius:8px;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.xiping-video-subtitle-player__video-wrapper{width:100%;height:100%;background:#000;overflow:hidden}.xiping-video-subtitle-player__video-container{position:relative;width:100%;height:100%;background:#000;overflow:hidden}.xiping-video-subtitle-player__video{position:absolute;top:0;left:0;width:100%;height:100%;padding:0}.xiping-video-subtitle-player__video-container .xgplayer{width:100%!important;height:100%!important}.xiping-video-subtitle-player__video-container .xgplayer video{object-fit:fill!important}.xiping-video-subtitle-player__subtitle-container{width:100%;height:100%;padding:20px;overflow-y:auto;background:#0000004d}.xiping-video-subtitle-player__right{width:100%;height:100%;background:#00000080;display:flex;flex-direction:column}.xiping-video-subtitle-player__detail{flex:1;padding:24px;overflow-y:auto;color:#fff}.xiping-video-subtitle-player__detail-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;gap:16px;color:#ffffffb3}.xiping-video-subtitle-player__detail-loading-spinner{width:40px;height:40px;border:3px solid rgba(255,255,255,.1);border-top-color:#fbbf24;border-radius:50%;animation:xiping-vsp-spin 1s linear infinite}@keyframes xiping-vsp-spin{to{transform:rotate(360deg)}}.xiping-video-subtitle-player__detail-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;gap:16px;color:#ffffff80;text-align:center}.xiping-video-subtitle-player__detail-empty-icon{font-size:48px;opacity:.5}.xiping-video-subtitle-player__detail-empty-text{font-size:14px;line-height:1.6}.xiping-video-subtitle-player__detail-content{display:flex;flex-direction:column;gap:20px}.xiping-video-subtitle-player__detail-word{font-size:32px;font-weight:700;color:#fbbf24;line-height:1.2;margin-bottom:8px}.xiping-video-subtitle-player__detail-pronunciation{font-size:18px;color:#ffffffb3;font-style:italic;margin-bottom:4px}.xiping-video-subtitle-player__detail-pos{display:inline-block;padding:4px 12px;background:#fbbf2433;color:#fbbf24;border-radius:4px;font-size:12px;font-weight:600;text-transform:uppercase;width:fit-content;margin-bottom:8px}.xiping-video-subtitle-player__detail-label{font-size:12px;font-weight:600;color:#ffffff80;text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px}.xiping-video-subtitle-player__detail-text{font-size:16px;line-height:1.6;color:#ffffffe6}.xiping-video-subtitle-player__detail-translation,.xiping-video-subtitle-player__detail-definition{padding-bottom:16px;border-bottom:1px solid rgba(255,255,255,.1)}.xiping-video-subtitle-player__detail-definition{border-bottom:none}.xiping-video-subtitle-player__detail-examples{display:flex;flex-direction:column;gap:16px}.xiping-video-subtitle-player__detail-example{padding:16px;background:#ffffff0d;border-radius:8px;border-left:3px solid #fbbf24}.xiping-video-subtitle-player__detail-example-en{font-size:15px;line-height:1.6;color:#fffffff2;margin-bottom:8px}.xiping-video-subtitle-player__detail-example-zh{font-size:14px;line-height:1.6;color:#ffffffb3;padding-left:12px;border-left:2px solid rgba(255,255,255,.2)}.xiping-video-subtitle-player__subtitle-container::-webkit-scrollbar,.xiping-video-subtitle-player__detail::-webkit-scrollbar{width:8px}.xiping-video-subtitle-player__subtitle-container::-webkit-scrollbar-track,.xiping-video-subtitle-player__detail::-webkit-scrollbar-track{background:#ffffff0d;border-radius:4px}.xiping-video-subtitle-player__subtitle-container::-webkit-scrollbar-thumb,.xiping-video-subtitle-player__detail::-webkit-scrollbar-thumb{background:#fff3;border-radius:4px}.xiping-video-subtitle-player__subtitle-container::-webkit-scrollbar-thumb:hover,.xiping-video-subtitle-player__detail::-webkit-scrollbar-thumb:hover{background:#ffffff4d}
|
|
107
107
|
|
|
108
108
|
|
|
109
109
|
/* components/video-subtitle-player/VideoSubtitlePlayer.mobile.css */
|
|
110
|
-
.xiping-video-subtitle-player--mobile{display:flex;flex-direction:column;min-height:0;height:100%}.xiping-video-subtitle-player__mobile-video{flex:0 0 auto;width:100%;aspect-ratio:16 / 9;background:#000}.xiping-video-subtitle-player__mobile-video-wrapper{width:100%;height:100%;background:#000;overflow:hidden}.xiping-video-subtitle-player__mobile-video-container{position:relative;width:100%;height:100%;background-color:#a62c2c;overflow:hidden}.xiping-video-subtitle-player__mobile-video-container .xgplayer{width:100%!important;height:100%!important}.xiping-video-subtitle-player__mobile-video-container .xgplayer video{
|
|
110
|
+
.xiping-video-subtitle-player--mobile{display:flex;flex-direction:column;min-height:0;height:100%}.xiping-video-subtitle-player__mobile-video{flex:0 0 auto;width:100%;aspect-ratio:16 / 9;background:#000}.xiping-video-subtitle-player__mobile-video-wrapper{width:100%;height:100%;background:#000;overflow:hidden}.xiping-video-subtitle-player__mobile-video-container{position:relative;width:100%;height:100%;background-color:#a62c2c;overflow:hidden}.xiping-video-subtitle-player__mobile-video-container .xgplayer{width:100%!important;height:100%!important}.xiping-video-subtitle-player__mobile-video-container .xgplayer video{object-fit:fill!important}.xiping-video-subtitle-player__mobile-subtitle{flex:1;min-height:0;padding:12px 16px;overflow-y:auto;background:#0000004d;-webkit-overflow-scrolling:touch}
|
|
111
111
|
|
|
112
112
|
|
|
113
113
|
/* components/video-subtitle-player/VideoSubtitlePlayer.pc.css */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.xiping-comic-text{-webkit-user-select:none
|
|
1
|
+
.xiping-comic-text{-webkit-user-select:none;user-select:none;text-align:center}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsxs as w, jsx as C } from "react/jsx-runtime";
|
|
3
3
|
import d from "canvas-confetti";
|
|
4
4
|
import { default as M } from "canvas-confetti";
|
|
5
5
|
import { forwardRef as x, useRef as g, useCallback as u, useMemo as v, useImperativeHandle as k, useEffect as R, createContext as B } from "react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.xiping-dock{margin-left:auto;margin-right:auto;margin-top:2rem;display:flex;height:58px;width
|
|
1
|
+
.xiping-dock{margin-left:auto;margin-right:auto;margin-top:2rem;display:flex;height:58px;width:max-content;align-items:center;justify-content:center;gap:.5rem;border-radius:1rem;border:1px solid;padding:.5rem;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}@supports (backdrop-filter: blur(12px)){.xiping-dock{background-color:#ffffff1a}.dark .xiping-dock{background-color:#0000001a}}.xiping-dock--top{align-items:flex-start}.xiping-dock--middle{align-items:center}.xiping-dock--bottom{align-items:flex-end}.xiping-dock-icon{display:flex;aspect-ratio:1 / 1;cursor:pointer;align-items:center;justify-content:center;border-radius:9999px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.xiping-gradient-text{position:relative;margin:0 auto;display:flex;max-width
|
|
1
|
+
.xiping-gradient-text{position:relative;margin:0 auto;display:flex;max-width:fit-content;flex-direction:row;align-items:center;justify-content:center;border-radius:1.25rem;font-weight:500;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transition:box-shadow .5s ease-out;overflow:hidden;cursor:pointer}.xiping-gradient-text__overlay{position:absolute;inset:0;background-size:300% 100%;animation:xiping-gradient linear infinite;border-radius:inherit;z-index:0;pointer-events:none}.xiping-gradient-text__overlay:before{content:"";position:absolute;border-radius:inherit;width:calc(100% - 2px);height:calc(100% - 2px);left:50%;top:50%;transform:translate(-50%,-50%);background-color:#060010;z-index:-1}@keyframes xiping-gradient{0%{background-position:0% 50%}50%{background-position:100% 50%}to{background-position:0% 50%}}.xiping-gradient-text__content{display:inline-block;position:relative;z-index:2;background-size:300% 100%;background-clip:text;-webkit-background-clip:text;color:transparent;animation:xiping-gradient linear infinite}
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as s, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import f from "clsx";
|
|
3
3
|
import './index.css';/* empty css */
|
|
4
4
|
function x({
|
|
5
5
|
children: i,
|
|
6
6
|
className: e = "",
|
|
7
7
|
colors: n = ["#40ffaa", "#4079ff", "#40ffaa", "#4079ff", "#40ffaa"],
|
|
8
8
|
animationSpeed: r = 8,
|
|
9
|
-
showBorder:
|
|
9
|
+
showBorder: o = !1
|
|
10
10
|
}) {
|
|
11
11
|
const t = {
|
|
12
12
|
backgroundImage: `linear-gradient(to right, ${n.join(", ")})`,
|
|
13
13
|
animationDuration: `${r}s`
|
|
14
14
|
};
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
|
|
15
|
+
return /* @__PURE__ */ s("div", { className: f("xiping-gradient-text", e), children: [
|
|
16
|
+
o && /* @__PURE__ */ a("div", { className: "xiping-gradient-text__overlay", style: t }),
|
|
17
17
|
/* @__PURE__ */ a("div", { className: "xiping-gradient-text__content", style: t, children: i })
|
|
18
18
|
] });
|
|
19
19
|
}
|
|
20
20
|
export {
|
|
21
|
-
x as GradientText
|
|
22
|
-
x as default
|
|
21
|
+
x as GradientText
|
|
23
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.xiping-image-compare-container{position:relative;-webkit-user-select:none
|
|
1
|
+
.xiping-image-compare-container{position:relative;-webkit-user-select:none;user-select:none;overflow:hidden;width:100%}.xiping-image-compare-label{position:absolute;top:1rem;padding:.25rem .5rem;background-color:#0009;color:#fff;font-size:.75rem;font-weight:500;border-radius:.25rem;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:10}.xiping-image-compare-label-original{right:1rem}.xiping-image-compare-label-modified{left:1rem}.xiping-image-compare-overlay{position:absolute;inset:0;height:100%;overflow:hidden}.xiping-image-compare-divider{position:absolute;top:0;bottom:0;background-color:#ffffffe6;cursor:ew-resize;box-shadow:0 0 0 1px #0000004d,0 0 0 1px #ffffff80 inset,0 0 8px #0003}.xiping-image-compare-divider-button{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:2rem;height:2rem;border-radius:50%;background-color:#fffffff2;border:2px solid rgba(0,0,0,.2);box-shadow:0 0 0 1px #fffc,0 4px 12px #0000004d,0 2px 4px #0003;display:flex;align-items:center;justify-content:center;transition:box-shadow .2s ease,transform .2s ease}.xiping-image-compare-divider-button:hover{box-shadow:0 0 0 1px #ffffffe6,0 6px 16px #0006,0 3px 6px #0000004d;transform:translate(-50%,-50%) scale(1.05)}.xiping-image-compare-divider-button:active{transform:translate(-50%,-50%) scale(.95)}.xiping-image-compare-divider-icon{width:1.5rem;height:1.5rem;color:#1f2937}.xiping-image-compare-divider-theme-dark{background-color:#000000e6;box-shadow:0 0 0 1px #ffffff4d,0 0 0 1px #00000080 inset,0 0 8px #fff3}.xiping-image-compare-divider-button-theme-dark{background-color:#000000f2;border:2px solid rgba(255,255,255,.2);box-shadow:0 0 0 1px #000c,0 4px 12px #ffffff4d,0 2px 4px #fff3}.xiping-image-compare-divider-button-theme-dark:hover{box-shadow:0 0 0 1px #000000e6,0 6px 16px #fff6,0 3px 6px #ffffff4d}.xiping-image-compare-divider-theme-dark .xiping-image-compare-divider-icon{color:#f3f4f6}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.xiping-thumbnails-wrapper{height:6rem;background-color:#00000080;flex-shrink:0;z-index:10;padding-bottom:env(safe-area-inset-bottom);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}.xiping-thumbnails-wrapper--hidden{display:none}.xiping-thumbnails-scroll{height:6rem;width:100vw;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}.xiping-thumbnails-scroll::-webkit-scrollbar{display:none}.xiping-thumbnails-container{display:flex;gap:.5rem;padding:.5rem;height:6rem;min-width
|
|
1
|
+
.xiping-thumbnails-wrapper{height:6rem;background-color:#00000080;flex-shrink:0;z-index:10;padding-bottom:env(safe-area-inset-bottom);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}.xiping-thumbnails-wrapper--hidden{display:none}.xiping-thumbnails-scroll{height:6rem;width:100vw;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}.xiping-thumbnails-scroll::-webkit-scrollbar{display:none}.xiping-thumbnails-container{display:flex;gap:.5rem;padding:.5rem;height:6rem;min-width:max-content}.xiping-thumbnail-item{height:100%;aspect-ratio:1 / 1;flex-shrink:0;cursor:pointer;border:2px solid transparent;transition:all .2s}.xiping-thumbnail-item--active{border-color:#fff}.xiping-thumbnail-image{width:100%;height:100%;object-fit:contain}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.xiping-wrapper{width:100vw;height:100vh;position:relative;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top,0)}.xiping-tool-wrapper{position:absolute;top:16px;right:16px;display:flex;gap:16px;z-index:10}.xiping-close-icon,.xiping-download-icon{color:#fff;cursor:pointer}.xiping-main-content{flex:1;min-height:0;position:relative;display:flex;align-items:center;justify-content:center}.xiping-pinch-content{width:100%;height:100%}.xiping-image{width:100vw;height:100
|
|
1
|
+
.xiping-wrapper{width:100vw;height:100vh;position:relative;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top,0)}.xiping-tool-wrapper{position:absolute;top:16px;right:16px;display:flex;gap:16px;z-index:10}.xiping-close-icon,.xiping-download-icon{color:#fff;cursor:pointer}.xiping-main-content{flex:1;min-height:0;position:relative;display:flex;align-items:center;justify-content:center}.xiping-pinch-content{width:100%;height:100%}.xiping-image{width:100vw;height:100%;object-fit:contain;pointer-events:none}.xiping-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background-color:#00000080}.xiping-modal-content{overflow:hidden}.xiping-modal-overlay{background-color:#000000b3}.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}.scrollbar-hide::-webkit-scrollbar{display:none}
|
|
@@ -21,10 +21,10 @@ const E = ({
|
|
|
21
21
|
customAssistantMessageComponent: x,
|
|
22
22
|
parseContent: W = !1,
|
|
23
23
|
parsedContent: k,
|
|
24
|
-
thinkContent:
|
|
24
|
+
thinkContent: t,
|
|
25
25
|
knowledgeSources: l
|
|
26
26
|
}) => {
|
|
27
|
-
const [
|
|
27
|
+
const [r, v] = y(!0), [I, N] = y("idle");
|
|
28
28
|
console.log(j, "id");
|
|
29
29
|
const w = (s) => s.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }), S = async () => {
|
|
30
30
|
try {
|
|
@@ -101,15 +101,15 @@ const E = ({
|
|
|
101
101
|
children: [
|
|
102
102
|
n === "user" && h || n === "assistant" && p ? /* @__PURE__ */ e("div", { className: "xiping-message__avatar", children: n === "user" ? h : p }) : null,
|
|
103
103
|
/* @__PURE__ */ e("div", { className: "xiping-message__content", children: V ? F() : W && n === "assistant" ? /* @__PURE__ */ i(b, { children: [
|
|
104
|
-
|
|
104
|
+
t && /* @__PURE__ */ i("div", { className: "xiping-message__think", children: [
|
|
105
105
|
/* @__PURE__ */ i("div", { className: "xiping-message__think-header", children: [
|
|
106
106
|
"思考过程:",
|
|
107
107
|
/* @__PURE__ */ e(
|
|
108
108
|
"button",
|
|
109
109
|
{
|
|
110
110
|
className: "xiping-message__think-toggle",
|
|
111
|
-
onClick: () => v(!
|
|
112
|
-
"aria-label":
|
|
111
|
+
onClick: () => v(!r),
|
|
112
|
+
"aria-label": r ? "隐藏思考过程" : "显示思考过程",
|
|
113
113
|
children: /* @__PURE__ */ e(
|
|
114
114
|
"svg",
|
|
115
115
|
{
|
|
@@ -119,7 +119,7 @@ const E = ({
|
|
|
119
119
|
fill: "none",
|
|
120
120
|
xmlns: "http://www.w3.org/2000/svg",
|
|
121
121
|
style: {
|
|
122
|
-
transform:
|
|
122
|
+
transform: r ? "rotate(180deg)" : "rotate(0deg)",
|
|
123
123
|
transition: "transform 0.3s ease"
|
|
124
124
|
},
|
|
125
125
|
children: /* @__PURE__ */ e(
|
|
@@ -142,9 +142,9 @@ const E = ({
|
|
|
142
142
|
{
|
|
143
143
|
className: o(
|
|
144
144
|
"xiping-message__think-content",
|
|
145
|
-
|
|
145
|
+
r ? "visible" : "hidden"
|
|
146
146
|
),
|
|
147
|
-
children: /* @__PURE__ */ e(a, { children:
|
|
147
|
+
children: /* @__PURE__ */ e(a, { children: t })
|
|
148
148
|
}
|
|
149
149
|
)
|
|
150
150
|
] }),
|
|
@@ -156,15 +156,15 @@ const E = ({
|
|
|
156
156
|
C(),
|
|
157
157
|
m && /* @__PURE__ */ e("div", { className: "xiping-message__timestamp", children: w(c) })
|
|
158
158
|
] }) : /* @__PURE__ */ i(b, { children: [
|
|
159
|
-
|
|
159
|
+
t && /* @__PURE__ */ i("div", { className: "xiping-message__think", children: [
|
|
160
160
|
/* @__PURE__ */ i("div", { className: "xiping-message__think-header", children: [
|
|
161
161
|
"思考过程:",
|
|
162
162
|
/* @__PURE__ */ e(
|
|
163
163
|
"button",
|
|
164
164
|
{
|
|
165
165
|
className: "xiping-message__think-toggle",
|
|
166
|
-
onClick: () => v(!
|
|
167
|
-
"aria-label":
|
|
166
|
+
onClick: () => v(!r),
|
|
167
|
+
"aria-label": r ? "隐藏思考过程" : "显示思考过程",
|
|
168
168
|
children: /* @__PURE__ */ e(
|
|
169
169
|
"svg",
|
|
170
170
|
{
|
|
@@ -174,7 +174,7 @@ const E = ({
|
|
|
174
174
|
fill: "none",
|
|
175
175
|
xmlns: "http://www.w3.org/2000/svg",
|
|
176
176
|
style: {
|
|
177
|
-
transform:
|
|
177
|
+
transform: r ? "rotate(180deg)" : "rotate(0deg)",
|
|
178
178
|
transition: "transform 0.3s ease"
|
|
179
179
|
},
|
|
180
180
|
children: /* @__PURE__ */ e(
|
|
@@ -197,9 +197,9 @@ const E = ({
|
|
|
197
197
|
{
|
|
198
198
|
className: o(
|
|
199
199
|
"xiping-message__think-content",
|
|
200
|
-
|
|
200
|
+
r ? "visible" : "hidden"
|
|
201
201
|
),
|
|
202
|
-
children: /* @__PURE__ */ e(a, { children:
|
|
202
|
+
children: /* @__PURE__ */ e(a, { children: t })
|
|
203
203
|
}
|
|
204
204
|
)
|
|
205
205
|
] }),
|
|
@@ -216,6 +216,5 @@ const E = ({
|
|
|
216
216
|
);
|
|
217
217
|
};
|
|
218
218
|
export {
|
|
219
|
-
E as Message
|
|
220
|
-
E as default
|
|
219
|
+
E as Message
|
|
221
220
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.xiping-scratch-to-reveal{position:relative;-webkit-user-select:none
|
|
1
|
+
.xiping-scratch-to-reveal{position:relative;-webkit-user-select:none;user-select:none}.xiping-scratch-canvas{position:absolute;left:0;top:0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.xiping-subtitle-player__lyrics-time{font-size:.7rem;font-weight:500;color:#ffffff80;font-family:Monaco,Menlo,Ubuntu Mono,monospace;margin-bottom:.25rem;-webkit-user-select:none
|
|
1
|
+
.xiping-subtitle-player__lyrics-time{font-size:.7rem;font-weight:500;color:#ffffff80;font-family:Monaco,Menlo,Ubuntu Mono,monospace;margin-bottom:.25rem;-webkit-user-select:none;user-select:none}.xiping-subtitle-player__lyrics-item{display:flex;flex-direction:column;gap:.25rem;transition:all .2s ease}.xiping-subtitle-player__lyrics-item--active{color:#fbbf24;font-weight:600;transition:all .3s ease;position:relative}.xiping-subtitle-player__lyrics-item--active:before{content:"";position:absolute;left:-1rem;top:50%;transform:translateY(-50%);width:4px;height:92%;background:#fbbf24;border-radius:2px}.xiping-subtitle-player__lyrics-item--past{opacity:.5;color:#fff9}.xiping-subtitle-player__lyrics-label{font-size:.75rem;font-weight:600;color:#ffffffb3;text-transform:uppercase;letter-spacing:.05em;margin-bottom:.25rem}.xiping-subtitle-player__lyrics-text{font-size:1rem;font-weight:500;text-shadow:0 2px 4px rgba(0,0,0,.5)}.xiping-subtitle-player__lyrics-line{margin:.25rem 0}.xiping-subtitle-player__lyrics-line:first-child{margin-top:0}.xiping-subtitle-player__lyrics-line:last-child{margin-bottom:0}.xiping-subtitle-player__lyrics-hover-layer{position:absolute;inset:0;pointer-events:none}.xiping-subtitle-player--lyrics{max-height:600px;overflow-y:auto;gap:.5rem;scroll-behavior:smooth}.xiping-subtitle-player--lyrics::-webkit-scrollbar{width:8px}.xiping-subtitle-player--lyrics::-webkit-scrollbar-track{background:#ffffff1a;border-radius:4px}.xiping-subtitle-player--lyrics::-webkit-scrollbar-thumb{background:#ffffff4d;border-radius:4px}.xiping-subtitle-player--lyrics::-webkit-scrollbar-thumb:hover{background:#ffffff80}.xiping-subtitle-player__group{display:flex;flex-direction:column;gap:.5rem;width:100%;border-radius:.5rem;padding:.5rem;margin:-.5rem;transition:all .2s ease}.xiping-subtitle-player__group:hover{background-color:#ffffff1a}.xiping-subtitle-player__group:hover .xiping-subtitle-player__lyrics-item{transform:translate(4px)}.xiping-subtitle-player__group:hover .xiping-subtitle-player__lyrics-item--active{background-color:#fbbf2426}.xiping-subtitle-player__lyrics-item--active .xiping-subtitle-word{color:#fbbf24;font-weight:600}@media(max-width:768px){.xiping-subtitle-player__lyrics-text{font-size:.9rem}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as S, jsxs as F } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as
|
|
2
|
+
import { useMemo as h, useRef as G, useState as D, useEffect as V, useCallback as u } from "react";
|
|
3
3
|
import { parseSRT as w, parseVTT as v } from "../../packages/subtitle/lib/src/parser.js";
|
|
4
4
|
import { srtToJson as q, vttToJson as K } from "../../packages/subtitle/lib/src/json-converter.js";
|
|
5
5
|
import Q from "clsx";
|
|
@@ -9,7 +9,7 @@ import { getCurrentSubtitleEntry as Y, timeStringToSeconds as J } from "./utils.
|
|
|
9
9
|
import './SubtitlePlayer.css';/* empty css */
|
|
10
10
|
const ct = ({
|
|
11
11
|
subtitles: p,
|
|
12
|
-
currentTime:
|
|
12
|
+
currentTime: f,
|
|
13
13
|
mode: m = "current",
|
|
14
14
|
textAlign: E = "left",
|
|
15
15
|
className: L = "",
|
|
@@ -19,7 +19,7 @@ const ct = ({
|
|
|
19
19
|
onWordClick: y,
|
|
20
20
|
onSubtitleClick: T
|
|
21
21
|
}) => {
|
|
22
|
-
const i =
|
|
22
|
+
const i = h(
|
|
23
23
|
() => Array.isArray(p) ? p : [p],
|
|
24
24
|
[p]
|
|
25
25
|
), l = G(null), [s, M] = D(null), [R, b] = D([]);
|
|
@@ -67,7 +67,7 @@ const ct = ({
|
|
|
67
67
|
r = !1;
|
|
68
68
|
};
|
|
69
69
|
}, [i]);
|
|
70
|
-
const g =
|
|
70
|
+
const g = h(() => R.length > 0 ? R : i.map((r) => {
|
|
71
71
|
try {
|
|
72
72
|
return {
|
|
73
73
|
entries: r.type === "srt" ? w(r.content) : v(r.content),
|
|
@@ -79,12 +79,12 @@ const ct = ({
|
|
|
79
79
|
label: r.label
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
-
}), [R, i]), W =
|
|
83
|
-
entry: Y(r,
|
|
82
|
+
}), [R, i]), W = h(() => g.map(({ entries: r, label: c }) => ({
|
|
83
|
+
entry: Y(r, f),
|
|
84
84
|
label: c,
|
|
85
85
|
entries: r
|
|
86
86
|
// 保留所有条目用于歌词模式
|
|
87
|
-
})), [g,
|
|
87
|
+
})), [g, f]), _ = h(() => {
|
|
88
88
|
const r = [];
|
|
89
89
|
g.forEach(({ entries: t, label: n }) => {
|
|
90
90
|
t.forEach((o) => {
|
|
@@ -216,7 +216,7 @@ const ct = ({
|
|
|
216
216
|
X,
|
|
217
217
|
{
|
|
218
218
|
groupedEntriesByTime: _,
|
|
219
|
-
currentTime:
|
|
219
|
+
currentTime: f,
|
|
220
220
|
wordHoverFactory: O,
|
|
221
221
|
enableWordHover: j,
|
|
222
222
|
overlayNode: P,
|
|
@@ -230,6 +230,5 @@ const ct = ({
|
|
|
230
230
|
);
|
|
231
231
|
};
|
|
232
232
|
export {
|
|
233
|
-
ct as SubtitlePlayer
|
|
234
|
-
ct as default
|
|
233
|
+
ct as SubtitlePlayer
|
|
235
234
|
};
|
|
@@ -7,10 +7,10 @@ const R = 16, S = 1.5, A = "normal", O = ({
|
|
|
7
7
|
content: a,
|
|
8
8
|
lineHeight: m = S,
|
|
9
9
|
fontSize: p = R,
|
|
10
|
-
fontWeight:
|
|
11
|
-
className:
|
|
12
|
-
style:
|
|
13
|
-
onProgressChange:
|
|
10
|
+
fontWeight: g = A,
|
|
11
|
+
className: d = "",
|
|
12
|
+
style: x = {},
|
|
13
|
+
onProgressChange: f,
|
|
14
14
|
initialScrollPosition: D,
|
|
15
15
|
cacheKey: H,
|
|
16
16
|
showTopProgress: u = !0,
|
|
@@ -23,7 +23,7 @@ const R = 16, S = 1.5, A = "normal", O = ({
|
|
|
23
23
|
target: n
|
|
24
24
|
}), i = I(() => (s.get() * 100).toFixed(2).replace(/\.0*$/, "")), F = L`${i}%`;
|
|
25
25
|
return i.on("change", (_) => {
|
|
26
|
-
|
|
26
|
+
f?.(Number(_));
|
|
27
27
|
}), /* @__PURE__ */ h(v, { children: [
|
|
28
28
|
u && /* @__PURE__ */ t(
|
|
29
29
|
l.div,
|
|
@@ -45,12 +45,12 @@ const R = 16, S = 1.5, A = "normal", O = ({
|
|
|
45
45
|
"div",
|
|
46
46
|
{
|
|
47
47
|
ref: n,
|
|
48
|
-
className: r(e["xiping-content"],
|
|
48
|
+
className: r(e["xiping-content"], d),
|
|
49
49
|
style: {
|
|
50
50
|
fontSize: `${p}px`,
|
|
51
51
|
lineHeight: m,
|
|
52
|
-
fontWeight:
|
|
53
|
-
...
|
|
52
|
+
fontWeight: g,
|
|
53
|
+
...x
|
|
54
54
|
},
|
|
55
55
|
children: a
|
|
56
56
|
}
|
|
@@ -71,6 +71,5 @@ const R = 16, S = 1.5, A = "normal", O = ({
|
|
|
71
71
|
] });
|
|
72
72
|
};
|
|
73
73
|
export {
|
|
74
|
-
O as TxtReader
|
|
75
|
-
O as default
|
|
74
|
+
O as TxtReader
|
|
76
75
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
3
3
|
import { motion as x } from "motion/react";
|
|
4
|
-
import { useState as u, useRef as I, useEffect as
|
|
4
|
+
import { useState as u, useRef as I, useEffect as m } from "react";
|
|
5
5
|
import b from "clsx";
|
|
6
6
|
import './index.css';/* empty css */
|
|
7
7
|
function S({
|
|
8
8
|
children: r,
|
|
9
|
-
className:
|
|
10
|
-
duration:
|
|
9
|
+
className: a,
|
|
10
|
+
duration: s = 100,
|
|
11
11
|
delay: n = 0,
|
|
12
12
|
as: l = "div",
|
|
13
13
|
startOnView: i = !1,
|
|
14
14
|
...p
|
|
15
15
|
}) {
|
|
16
|
-
const
|
|
16
|
+
const g = x.create(l, {
|
|
17
17
|
forwardMotionProps: !0
|
|
18
|
-
}), [
|
|
19
|
-
return
|
|
18
|
+
}), [v, T] = u(""), [c, f] = u(!1), o = I(null);
|
|
19
|
+
return m(() => {
|
|
20
20
|
if (!i) {
|
|
21
21
|
const t = setTimeout(() => {
|
|
22
22
|
f(!0);
|
|
@@ -31,27 +31,26 @@ function S({
|
|
|
31
31
|
},
|
|
32
32
|
{ threshold: 0.1 }
|
|
33
33
|
);
|
|
34
|
-
return
|
|
35
|
-
}, [n, i]),
|
|
34
|
+
return o.current && e.observe(o.current), () => e.disconnect();
|
|
35
|
+
}, [n, i]), m(() => {
|
|
36
36
|
if (!c) return;
|
|
37
37
|
let e = 0;
|
|
38
38
|
const t = setInterval(() => {
|
|
39
|
-
e < r.length ? (
|
|
40
|
-
},
|
|
39
|
+
e < r.length ? (T(r.substring(0, e + 1)), e++) : clearInterval(t);
|
|
40
|
+
}, s);
|
|
41
41
|
return () => {
|
|
42
42
|
clearInterval(t);
|
|
43
43
|
};
|
|
44
|
-
}, [r,
|
|
45
|
-
|
|
44
|
+
}, [r, s, c]), /* @__PURE__ */ d(
|
|
45
|
+
g,
|
|
46
46
|
{
|
|
47
|
-
ref:
|
|
48
|
-
className: b("xiping-typing-animation",
|
|
47
|
+
ref: o,
|
|
48
|
+
className: b("xiping-typing-animation", a),
|
|
49
49
|
...p,
|
|
50
|
-
children:
|
|
50
|
+
children: v
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
54
|
export {
|
|
55
|
-
S as TypingAnimation
|
|
56
|
-
S as default
|
|
55
|
+
S as TypingAnimation
|
|
57
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.xiping-variable-proximity{font-family:Roboto Flex,Noto Sans SC,PingFang SC,Microsoft YaHei,SimHei,sans-serif}.
|
|
1
|
+
.xiping-variable-proximity{font-family:Roboto Flex,Noto Sans SC,PingFang SC,Microsoft YaHei,SimHei,sans-serif}.xiping-variable-proximity__sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
|