@xiping/react-components 1.0.69 → 1.0.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/_virtual/_rolldown/runtime.js +1 -0
- package/dist/cjs/components/blur-fade/BlurFade.js +1 -1
- package/dist/cjs/components/blur-text/BlurText.js +1 -1
- package/dist/cjs/components/button/Button.css +1 -1
- package/dist/cjs/components/button/Button2.js +1 -0
- package/dist/cjs/components/comic-text/ComicText2.js +4 -0
- package/dist/cjs/components/confetti-button/index.js +1 -1
- package/dist/cjs/components/dock/Duck.css +1 -1
- package/dist/cjs/components/dock/Duck2.js +1 -0
- package/dist/cjs/components/flip-text/FlipText.css +1 -1
- package/dist/cjs/components/flip-text/FlipText2.js +1 -0
- package/dist/cjs/components/gradient-text/index.css +1 -1
- package/dist/cjs/components/gradient-text/index2.js +1 -0
- package/dist/cjs/components/hyper-text/HyperText.css +1 -1
- package/dist/cjs/components/hyper-text/index.js +1 -1
- package/dist/cjs/components/image-compare/ImageCompare.css +1 -1
- package/dist/cjs/components/image-compare/ImageCompare2.js +1 -0
- package/dist/cjs/components/image-viewer/ImageThumbnails.css +1 -1
- package/dist/cjs/components/image-viewer/ImageThumbnails2.js +1 -0
- package/dist/cjs/components/image-viewer/ImageViewer.css +1 -1
- package/dist/cjs/components/image-viewer/ImageViewer.d.ts +1 -1
- package/dist/cjs/components/image-viewer/ImageViewer2.js +1 -0
- package/dist/cjs/components/message/Message.css +1 -1
- package/dist/cjs/components/message/Message2.js +1 -0
- package/dist/cjs/components/pinch-content/PinchContent.js +1 -1
- package/dist/cjs/components/pinch-content/index.js +1 -1
- package/dist/cjs/components/pointer/Pointer.css +1 -1
- package/dist/cjs/components/pointer/Pointer2.js +1 -0
- package/dist/cjs/components/scratch-to-reveal/ScratchToReveal.css +1 -1
- package/dist/cjs/components/scratch-to-reveal/ScratchToReveal2.js +1 -0
- package/dist/cjs/components/shimmer-button/ShimmerButton.css +1 -1
- package/dist/cjs/components/shimmer-button/ShimmerButton2.js +1 -0
- package/dist/cjs/components/shiny-button/ShinyButton.css +1 -1
- package/dist/cjs/components/shiny-button/ShinyButton2.js +1 -0
- package/dist/cjs/components/shiny-text/ShinyText2.js +1 -0
- package/dist/cjs/components/sparkles-text/SparklesText.css +1 -1
- package/dist/cjs/components/sparkles-text/SparklesText2.js +1 -0
- package/dist/cjs/components/split-text/SplitText.css +1 -1
- package/dist/cjs/components/split-text/SplitText2.js +1 -0
- package/dist/cjs/components/subtitle-player/CurrentMode.css +1 -1
- package/dist/cjs/components/subtitle-player/CurrentMode2.js +2 -0
- package/dist/cjs/components/subtitle-player/LyricsMode.css +1 -1
- package/dist/cjs/components/subtitle-player/LyricsMode2.js +2 -0
- package/dist/cjs/components/subtitle-player/SubtitlePlayer.css +1 -1
- package/dist/cjs/components/subtitle-player/SubtitlePlayer2.js +1 -0
- package/dist/cjs/components/subtitle-player/utils.js +1 -1
- package/dist/cjs/components/text-animate/TextAnimate.css +1 -1
- package/dist/cjs/components/text-animate/TextAnimate2.js +2 -0
- package/dist/cjs/components/text-type/TextType.css +1 -1
- package/dist/cjs/components/text-type/TextType2.js +1 -0
- package/dist/cjs/components/txt-editor/TxtEditor.js +4 -4
- package/dist/cjs/components/txt-reader/TxtReader.js +1 -1
- package/dist/cjs/components/txt-reader/index.module.css +1 -1
- package/dist/cjs/components/txt-reader/index.module.js +1 -0
- package/dist/cjs/components/typing-animation/index.css +1 -1
- package/dist/cjs/components/typing-animation/index2.js +1 -0
- package/dist/cjs/components/variable-proximity/index.css +1 -1
- package/dist/cjs/components/variable-proximity/index2.js +1 -0
- package/dist/cjs/components/video-dialog/VideoDialog.css +1 -1
- package/dist/cjs/components/video-dialog/VideoDialog2.js +1 -0
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.css +1 -1
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.mobile.css +1 -1
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.pc.css +1 -1
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer2.js +1 -0
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayerMobile.js +1 -1
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayerPC.js +1 -1
- package/dist/cjs/components/video-subtitle-player/layouts/VideoSubtitlePlayerLayoutMobile.js +1 -1
- package/dist/cjs/components/video-subtitle-player/layouts/VideoSubtitlePlayerLayoutPC.js +1 -1
- package/dist/cjs/components/video-subtitle-player/useVideoSubtitleStore.js +1 -1
- package/dist/cjs/components/video-subtitle-player/useXGPlayer.js +1 -1
- package/dist/cjs/hooks/useStayTimeReport.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.24_core-js@3.47.0/node_modules/xgplayer/dist/index.min.css +1 -0
- package/dist/cjs/packages/subtitle/lib/index.js +1 -0
- package/dist/cjs/packages/subtitle/lib/src/json-converter.js +1 -1
- package/dist/cjs/packages/subtitle/lib/src/parser.js +5 -5
- package/dist/cjs/react-components.css +27 -27
- package/dist/es/components/blur-fade/BlurFade.js +37 -49
- package/dist/es/components/blur-text/BlurText.js +67 -76
- package/dist/es/components/button/Button.css +1 -1
- package/dist/es/components/button/Button2.js +48 -0
- package/dist/es/components/comic-text/ComicText2.js +55 -0
- package/dist/es/components/confetti-button/index.js +63 -75
- package/dist/es/components/dock/Duck.css +1 -1
- package/dist/es/components/dock/Duck2.js +60 -0
- package/dist/es/components/flip-text/FlipText.css +1 -1
- package/dist/es/components/flip-text/FlipText2.js +41 -0
- package/dist/es/components/gradient-text/index.css +1 -1
- package/dist/es/components/gradient-text/index2.js +29 -0
- package/dist/es/components/hyper-text/HyperText.css +1 -1
- package/dist/es/components/hyper-text/index.js +51 -79
- package/dist/es/components/image-compare/ImageCompare.css +1 -1
- package/dist/es/components/image-compare/ImageCompare2.js +96 -0
- package/dist/es/components/image-viewer/ImageThumbnails.css +1 -1
- package/dist/es/components/image-viewer/ImageThumbnails2.js +40 -0
- package/dist/es/components/image-viewer/ImageViewer.css +1 -1
- package/dist/es/components/image-viewer/ImageViewer.d.ts +1 -1
- package/dist/es/components/image-viewer/ImageViewer2.js +151 -0
- package/dist/es/components/message/Message.css +1 -1
- package/dist/es/components/message/Message2.js +189 -0
- package/dist/es/components/pinch-content/PinchContent.js +120 -127
- package/dist/es/components/pinch-content/index.js +5 -5
- package/dist/es/components/pointer/Pointer.css +1 -1
- package/dist/es/components/pointer/Pointer2.js +61 -0
- package/dist/es/components/react-force-graph-3d/index.js +2 -0
- package/dist/es/components/scratch-to-reveal/ScratchToReveal.css +1 -1
- package/dist/es/components/scratch-to-reveal/ScratchToReveal2.js +88 -0
- package/dist/es/components/shimmer-button/ShimmerButton.css +1 -1
- package/dist/es/components/shimmer-button/ShimmerButton2.js +33 -0
- package/dist/es/components/shiny-button/ShinyButton.css +1 -1
- package/dist/es/components/shiny-button/ShinyButton2.js +53 -0
- package/dist/es/components/shiny-text/ShinyText2.js +61 -0
- package/dist/es/components/sparkles-text/SparklesText.css +1 -1
- package/dist/es/components/sparkles-text/SparklesText2.js +90 -0
- package/dist/es/components/split-text/SplitText.css +1 -1
- package/dist/es/components/split-text/SplitText2.js +109 -0
- package/dist/es/components/subtitle-player/CurrentMode.css +1 -1
- package/dist/es/components/subtitle-player/CurrentMode2.js +44 -0
- package/dist/es/components/subtitle-player/LyricsMode.css +1 -1
- package/dist/es/components/subtitle-player/LyricsMode2.js +114 -0
- package/dist/es/components/subtitle-player/SubtitlePlayer.css +1 -1
- package/dist/es/components/subtitle-player/SubtitlePlayer2.js +169 -0
- package/dist/es/components/subtitle-player/utils.js +63 -69
- package/dist/es/components/text-animate/TextAnimate.css +1 -1
- package/dist/es/components/text-animate/TextAnimate2.js +312 -0
- package/dist/es/components/text-type/TextType.css +1 -1
- package/dist/es/components/text-type/TextType2.js +80 -0
- package/dist/es/components/txt-editor/TxtEditor.js +60 -95
- package/dist/es/components/txt-reader/TxtReader.js +45 -74
- package/dist/es/components/txt-reader/index.module.css +1 -1
- package/dist/es/components/txt-reader/index.module.js +10 -0
- package/dist/es/components/typing-animation/index.css +1 -1
- package/dist/es/components/typing-animation/index2.js +43 -0
- package/dist/es/components/variable-proximity/index.css +1 -1
- package/dist/es/components/variable-proximity/index2.js +179 -0
- package/dist/es/components/video-dialog/VideoDialog.css +1 -1
- package/dist/es/components/video-dialog/VideoDialog2.js +168 -0
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.css +1 -1
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.mobile.css +1 -1
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.pc.css +1 -1
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer2.js +43 -0
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayerMobile.js +29 -46
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayerPC.js +94 -74
- package/dist/es/components/video-subtitle-player/layouts/VideoSubtitlePlayerLayoutMobile.js +24 -21
- package/dist/es/components/video-subtitle-player/layouts/VideoSubtitlePlayerLayoutPC.js +58 -50
- package/dist/es/components/video-subtitle-player/useVideoSubtitleStore.js +61 -56
- package/dist/es/components/video-subtitle-player/useXGPlayer.js +38 -35
- package/dist/es/hooks/useStayTimeReport.js +29 -29
- package/dist/es/index.js +33 -70
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.24_core-js@3.47.0/node_modules/xgplayer/dist/index.min.css +1 -0
- package/dist/es/packages/subtitle/lib/index.js +2 -0
- package/dist/es/packages/subtitle/lib/src/json-converter.js +22 -23
- package/dist/es/packages/subtitle/lib/src/parser.js +41 -54
- package/dist/es/react-components.css +27 -27
- package/package.json +28 -29
- package/dist/cjs/components/button/Button.js +0 -1
- package/dist/cjs/components/comic-text/ComicText.js +0 -4
- package/dist/cjs/components/dock/Duck.js +0 -1
- package/dist/cjs/components/flip-text/FlipText.js +0 -1
- package/dist/cjs/components/gradient-text/index.js +0 -1
- package/dist/cjs/components/image-compare/ImageCompare.js +0 -1
- package/dist/cjs/components/image-viewer/ImageThumbnails.js +0 -1
- package/dist/cjs/components/image-viewer/ImageViewer.js +0 -1
- package/dist/cjs/components/message/Message.js +0 -1
- package/dist/cjs/components/pointer/Pointer.js +0 -1
- package/dist/cjs/components/scratch-to-reveal/ScratchToReveal.js +0 -1
- package/dist/cjs/components/shimmer-button/ShimmerButton.js +0 -1
- package/dist/cjs/components/shiny-button/ShinyButton.js +0 -1
- package/dist/cjs/components/shiny-text/ShinyText.js +0 -1
- package/dist/cjs/components/sparkles-text/SparklesText.js +0 -1
- package/dist/cjs/components/split-text/SplitText.js +0 -1
- package/dist/cjs/components/subtitle-player/CurrentMode.js +0 -2
- package/dist/cjs/components/subtitle-player/LyricsMode.js +0 -2
- package/dist/cjs/components/subtitle-player/SubtitlePlayer.js +0 -1
- package/dist/cjs/components/text-animate/TextAnimate.js +0 -2
- package/dist/cjs/components/text-type/TextType.js +0 -1
- package/dist/cjs/components/txt-reader/index.module.css.js +0 -1
- package/dist/cjs/components/typing-animation/index.js +0 -1
- package/dist/cjs/components/variable-proximity/index.js +0 -1
- package/dist/cjs/components/video-dialog/VideoDialog.js +0 -1
- package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.js +0 -1
- package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/dist/index.min.css +0 -1
- package/dist/es/components/button/Button.js +0 -72
- package/dist/es/components/comic-text/ComicText.js +0 -52
- package/dist/es/components/dock/Duck.js +0 -80
- package/dist/es/components/flip-text/FlipText.js +0 -38
- package/dist/es/components/gradient-text/index.js +0 -22
- package/dist/es/components/image-compare/ImageCompare.js +0 -127
- package/dist/es/components/image-viewer/ImageThumbnails.js +0 -73
- package/dist/es/components/image-viewer/ImageViewer.js +0 -141
- package/dist/es/components/message/Message.js +0 -220
- package/dist/es/components/pointer/Pointer.js +0 -75
- package/dist/es/components/scratch-to-reveal/ScratchToReveal.js +0 -97
- package/dist/es/components/shimmer-button/ShimmerButton.js +0 -42
- package/dist/es/components/shiny-button/ShinyButton.js +0 -61
- package/dist/es/components/shiny-text/ShinyText.js +0 -76
- package/dist/es/components/sparkles-text/SparklesText.js +0 -71
- package/dist/es/components/split-text/SplitText.js +0 -116
- package/dist/es/components/subtitle-player/CurrentMode.js +0 -78
- package/dist/es/components/subtitle-player/LyricsMode.js +0 -152
- package/dist/es/components/subtitle-player/SubtitlePlayer.js +0 -234
- package/dist/es/components/text-animate/TextAnimate.js +0 -310
- package/dist/es/components/text-type/TextType.js +0 -121
- package/dist/es/components/txt-reader/index.module.css.js +0 -10
- package/dist/es/components/typing-animation/index.js +0 -56
- package/dist/es/components/variable-proximity/index.js +0 -211
- package/dist/es/components/video-dialog/VideoDialog.js +0 -113
- package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.js +0 -74
- package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/dist/index.min.css +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const w=require("react/jsx-runtime"),f=require("react"),D=require("motion/react"),O=require("clsx");;/* empty css */const c={robotoFlex:!1,notoSansSC:!1,loading:!1};function q(n){if(typeof document>"u")return!1;try{return document.fonts.check(`1em "${n}"`)}catch{return!0}}function U(){if(c.loading||c.robotoFlex&&c.notoSansSC)return;c.loading=!0;const n=q("Roboto Flex"),r=q("Noto Sans SC");if(n&&(c.robotoFlex=!0),r&&(c.notoSansSC=!0),n&&r){c.loading=!1;return}const i=(t,s)=>{if(document.querySelector(`link[href="${t}"]`)){s?.();return}const l=document.createElement("link");l.rel="stylesheet",l.href=t,l.onload=()=>s?.(),document.head.appendChild(l)},d=[{roboto:"https://fonts.loli.net/css2?family=Roboto+Flex:opsz,wght@8..144,100..1000&display=swap",noto:"https://fonts.loli.net/css2?family=Noto+Sans+SC:wght@100..900&display=swap"},{roboto:"https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,100..1000&display=swap",noto:"https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@100..900&display=swap"}],m=t=>{if(t>=d.length){c.loading=!1;return}const s=d[t];let p=0;const l=()=>{p++,p===2&&(c.loading=!1)};n?l():i(s.roboto,()=>{c.robotoFlex=!0,l()}),r?l():i(s.noto,()=>{c.notoSansSC=!0,l()}),setTimeout(()=>{(!c.robotoFlex||!c.notoSansSC)&&m(t+1)},3e3)};m(0)}function G(n=!0){f.useEffect(()=>{n&&typeof document<"u"&&U()},[n])}function H(n){f.useEffect(()=>{let r;const i=()=>{n(),r=requestAnimationFrame(i)};return r=requestAnimationFrame(i),()=>cancelAnimationFrame(r)},[n])}function J(n){const r=f.useRef({x:0,y:0});return f.useEffect(()=>{const i=(t,s)=>{if(n?.current){const p=n.current.getBoundingClientRect();r.current={x:t-p.left,y:s-p.top}}else r.current={x:t,y:s}},d=t=>i(t.clientX,t.clientY),m=t=>{const s=t.touches[0];i(s.clientX,s.clientY)};return window.addEventListener("mousemove",d),window.addEventListener("touchmove",m),()=>{window.removeEventListener("mousemove",d),window.removeEventListener("touchmove",m)}},[n]),r}const E=f.forwardRef((n,r)=>{const{label:i,fromFontVariationSettings:d,toFontVariationSettings:m,containerRef:t,radius:s=50,falloff:p="linear",className:l="",onClick:P,style:b,fontFamily:y,autoLoadFonts:V=!0,...k}=n;G(V&&!y);const C=f.useRef([]),R=f.useRef([]),S=J(t),x=f.useRef({x:null,y:null}),N=f.useMemo(()=>{const e=o=>new Map(o.split(",").map(g=>g.trim()).map(g=>{const[h,F]=g.split(" ");return[h.replace(/['"]/g,""),parseFloat(F)]})),a=e(d),u=e(m);return Array.from(a.entries()).map(([o,g])=>({axis:o,fromValue:g,toValue:u.get(o)??g}))},[d,m]),j=(e,a,u,o)=>Math.sqrt((u-e)**2+(o-a)**2),A=e=>{const a=Math.min(Math.max(1-e/s,0),1);switch(p){case"exponential":return a**2;case"gaussian":return Math.exp(-((e/(s/2))**2)/2);default:return a}};H(()=>{if(!t?.current)return;const{x:e,y:a}=S.current;if(x.current.x===e&&x.current.y===a)return;x.current={x:e,y:a};const u=t.current.getBoundingClientRect();C.current.forEach((o,g)=>{if(!o)return;const h=o.getBoundingClientRect(),F=h.left+h.width/2-u.left,T=h.top+h.height/2-u.top,v=j(S.current.x,S.current.y,F,T);if(v>=s){o.style.fontVariationSettings=d;return}const X=A(v),L=N.map(({axis:Y,fromValue:M,toValue:z})=>{const _=M+(z-M)*X;return`'${Y}' ${_}`}).join(", ");R.current[g]=L,o.style.fontVariationSettings=L})});const I=/[\u4e00-\u9fa5]/.test(i)?i.split(""):i.split(" ").flatMap((e,a,u)=>{const o=e.split("");return a<u.length-1?[...o," "]:o});let $=0;const B=f.useMemo(()=>{const e={display:"inline",...b};return y&&(e.fontFamily=y),e},[y,b]);return w.jsxs("span",{ref:r,className:O("xiping-variable-proximity",l),onClick:P,style:B,...k,children:[I.map((e,a)=>{const u=$++;return w.jsx(D.motion.span,{ref:o=>{C.current[u]=o},style:{display:e===" "?"inline":"inline-block",fontVariationSettings:R.current[u]},"aria-hidden":"true",children:e},a)}),w.jsx("span",{className:"xiping-variable-proximity__sr-only",children:i})]})});E.displayName="VariableProximity";exports.VariableProximity=E;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./VideoDialog.css');const i=require("react/jsx-runtime"),p=require("react"),e=require("motion/react"),t=require("lucide-react"),m=require("clsx");;/* empty css */const x={"from-bottom":{initial:{y:"100%",opacity:0},animate:{y:0,opacity:1},exit:{y:"100%",opacity:0}},"from-center":{initial:{scale:.5,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.5,opacity:0}},"from-top":{initial:{y:"-100%",opacity:0},animate:{y:0,opacity:1},exit:{y:"-100%",opacity:0}},"from-left":{initial:{x:"-100%",opacity:0},animate:{x:0,opacity:1},exit:{x:"-100%",opacity:0}},"from-right":{initial:{x:"100%",opacity:0},animate:{x:0,opacity:1},exit:{x:"100%",opacity:0}},fade:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},"top-in-bottom-out":{initial:{y:"-100%",opacity:0},animate:{y:0,opacity:1},exit:{y:"100%",opacity:0}},"left-in-right-out":{initial:{x:"-100%",opacity:0},animate:{x:0,opacity:1},exit:{x:"100%",opacity:0}}};function y({animationStyle:o="from-center",videoSrc:n,thumbnailSrc:c,thumbnailAlt:l="Video thumbnail",className:s}){const[r,a]=p.useState(!1),d=x[o];return i.jsxs("div",{className:m("xiping-video-dialog",s),children:[i.jsxs("div",{className:"xiping-video-dialog-container",onClick:()=>a(!0),children:[i.jsx("img",{src:c,alt:l,width:1920,height:1080,className:"xiping-video-dialog-thumbnail"}),i.jsx("div",{className:"xiping-video-dialog-overlay",children:i.jsx("div",{className:"xiping-video-dialog-play-outer",children:i.jsx("div",{className:"xiping-video-dialog-play-inner",children:i.jsx(t.Play,{className:"xiping-video-dialog-play-icon"})})})})]}),i.jsx(e.AnimatePresence,{children:r&&i.jsx(e.motion.div,{initial:{opacity:0},animate:{opacity:1},onClick:()=>a(!1),exit:{opacity:0},className:"xiping-video-dialog-modal",children:i.jsxs(e.motion.div,{...d,transition:{type:"spring",damping:30,stiffness:300},className:"xiping-video-dialog-modal-content",children:[i.jsx(e.motion.button,{className:"xiping-video-dialog-close-button",children:i.jsx(t.XIcon,{className:"xiping-video-dialog-close-icon"})}),i.jsx("div",{className:"xiping-video-dialog-video-wrapper",children:i.jsx("iframe",{src:n,className:"xiping-video-dialog-iframe",allowFullScreen:!0,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"})})]})})})]})}exports.VideoDialog=y;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./VideoSubtitlePlayer.css');const b=require("react/jsx-runtime"),o=require("react"),y=require("react-device-detect"),M=require("./useVideoSubtitleStore.js"),W=require("./useXGPlayer.js"),j=require("./VideoSubtitlePlayerPC.js"),k=require("./VideoSubtitlePlayerMobile.js");;/* empty css */const m=({videoUrl:S,subtitles:r,poster:P,className:s="",style:a,onFetchDetail:e,forceLayout:n})=>{const l=o.useRef(null),C=n!==void 0?n==="mobile":y.isMobile||y.isTablet,{currentTime:u,setCurrentTime:f,setIsPlaying:q,setSubtitles:c,currentDetail:V,isLoadingDetail:v,fetchDetail:t}=M.useVideoSubtitleStore();o.useEffect(()=>{c(r)},[r,c]),W.useXGPlayer(l,S,P,{setCurrentTime:f,setIsPlaying:q},u);const d=o.useCallback(async i=>{e?await e(i):await t(i)},[e,t]),g=o.useCallback(async i=>{e?await e(i):await t(i)},[e,t]);return C?b.jsx(k.VideoSubtitlePlayerMobile,{playerRef:l,subtitles:r,currentTime:u,onWordHoverChange:d,onWordClick:g,className:s,style:a}):b.jsx(j.VideoSubtitlePlayerPC,{playerRef:l,subtitles:r,currentTime:u,currentDetail:V,isLoadingDetail:v,onWordHoverChange:d,className:s,style:a})};exports.VideoSubtitlePlayer=m;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@charset "UTF-8";.xgplayer-fullscreen-parent{position:fixed;left:0;top:0;width:100%;height:100%;z-index:9999}.xgplayer-fullscreen-parent .xgplayer.xgplayer-is-cssfullscreen,.xgplayer-fullscreen-parent .xgplayer.xgplayer-is-fullscreen{z-index:10;position:absolute}.xgplayer-rotate-parent{position:fixed;inset:0 0 0 100%;width:100vh;height:100vw;z-index:9999;transform-origin:top left;transform:rotate(90deg)}.xgplayer-rotate-parent .xgplayer.xgplayer-rotate-fullscreen{position:absolute;top:0;left:0;z-index:10;margin:0;padding:0;width:100%;height:100%;transform:rotate(0)}.xgplayer-rotate-parent .xgplayer-mobile video{z-index:-1}.xgplayer{position:relative;width:100%;height:100%;overflow:hidden;font-family:PingFang SC,Helvetica Neue,Helvetica,STHeiTi,Microsoft YaHei,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400;background:#000;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.xgplayer *{margin:0;padding:0;border:0;vertical-align:baseline;white-space:normal;word-wrap:normal;overflow-wrap:normal}.xgplayer ul,.xgplayer li{list-style:none}.xgplayer .xgplayer-none{display:none}.xgplayer.xgplayer-is-fullscreen{position:fixed;top:0;left:0;width:100%;height:100%;margin:0;padding:0;z-index:9999}.xgplayer.xgplayer-is-cssfullscreen{position:fixed;left:0;top:0;width:100%;height:100%;z-index:9999}.xgplayer.xgplayer-rotate-fullscreen{position:fixed;inset:0 0 0 100%;width:100vh;height:100vw;transform-origin:top left;transform:rotate(90deg);z-index:9999}.xgplayer.xgplayer-rotate-fullscreen.xgplayer-mobile video{z-index:-1}.xgplayer xg-video-container.xg-video-container{position:absolute;top:0;bottom:48px;display:block;width:100%}.xgplayer video{position:absolute;top:0;left:0;width:100%;height:100%;outline:none}.xgplayer[data-xgfill=contain] video{-o-object-fit:contain;object-fit:contain}.xgplayer[data-xgfill=cover] video{-o-object-fit:cover;object-fit:cover}.xgplayer[data-xgfill=fill] video{-o-object-fit:fill;object-fit:fill}.xgplayer .xg-pos{left:10px;right:10px}.xgplayer .xg-margin{margin-left:16px;margin-right:16px}.xgplayer .xg-bottom{bottom:0}.xgplayer .btn-text{position:relative;top:50%;height:24px;font-size:13px;text-align:center}.xgplayer .btn-text span{display:inline-block;min-width:52px;height:24px;line-height:24px;background:#00000061;border-radius:12px}.xgplayer xg-icon{position:relative;box-sizing:border-box;height:40px;margin-left:16px;margin-right:16px;cursor:pointer;color:#fffc;fill:#fff}.xgplayer xg-icon.xg-icon-disable{cursor:not-allowed}.xgplayer xg-icon .xg-tips{top:-30px;left:50%;transform:translate(-50%)}.xgplayer xg-icon:active .xg-tips,.xgplayer xg-icon:hover .xg-tips{display:block}.xgplayer xg-icon:active .xg-tips.hide,.xgplayer xg-icon:hover .xg-tips.hide{display:none}.xgplayer xg-icon .xgplayer-icon{position:relative;top:50%;transform:translateY(-50%);cursor:pointer}.xgplayer xg-icon .xg-icon-disable{cursor:not-allowed}.xgplayer xg-icon .xg-img{width:100%}.xgplayer xg-icon svg,.xgplayer xg-icon img{height:100%;display:block}.xgplayer xg-bar{display:block}.xgplayer.xgplayer-inactive xg-bar,.xgplayer.xgplayer-mini xg-bar{display:none}.xgplayer.xgplayer-inactive .xg-top-bar{display:flex}.xgplayer.xgplayer-inactive .xg-top-bar.top-bar-autohide{display:none}.xgplayer .xg-top-bar{position:absolute;z-index:10;top:0;padding:0 16px;display:flex;height:50px}.xgplayer .xg-top-bar xg-icon{position:relative;top:10px;left:0;width:34px;margin-top:0}.xgplayer .xg-top-bar xg-icon:first-child{margin-left:0}.xgplayer .xg-left-bar,.xgplayer .xg-right-bar{position:absolute;z-index:9;top:50px;bottom:50px;width:50px}.xgplayer .xg-left-bar{left:0}.xgplayer .xg-right-bar{right:0}.xgplayer .xg-tips{display:none;position:absolute;padding:4px 6px;background:#0000008a;border-radius:4px;font-size:12px;color:#fff;text-align:center;white-space:nowrap;opacity:.85}.xgplayer .xg-margin{left:0;right:0}.xgplayer-mobile{-webkit-tap-highlight-color:rgba(0,0,0,0)}.xgplayer-mobile *{text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.xgplayer-mobile.xgplayer-rotate-fullscreen .xg-top-bar,.xgplayer-mobile.xgplayer-rotate-fullscreen .xg-pos{left:6%;right:6%}.xgplayer-mobile xg-icon:hover .xg-tips{display:none}.xg-list-slide-scroll::-webkit-scrollbar-track{background-color:transparent;display:none}.xg-list-slide-scroll:hover::-webkit-scrollbar-track{display:block}.xg-list-slide-scroll::-webkit-scrollbar{-webkit-appearance:none;appearance:none;background:#0000;height:4px;width:4px}.xg-list-slide-scroll::-webkit-scrollbar-corner{background:transparent;display:none}.xg-list-slide-scroll::-webkit-scrollbar-thumb{background:#ffffff80;border-radius:3px;display:none;width:4px}.xg-list-slide-scroll:hover::-webkit-scrollbar-thumb{display:block}@media only screen and (max-width:480px){.xgplayer-mobile xg-icon{margin-right:10px;margin-left:10px}.xgplayer-mobile .xg-top-bar{left:10px;right:10px}}@media screen and (orientation:portrait){.xgplayer-mobile.xgplayer-is-fullscreen .xgplayer-controls,.xgplayer-mobile.xgplayer-is-cssfullscreen .xgplayer-controls{bottom:34px;bottom:constant(safe-area-inset-bottom);bottom:env(safe-area-inset-bottom)}.xgplayer-mobile.xgplayer-is-fullscreen .xg-top-bar,.xgplayer-mobile.xgplayer-is-cssfullscreen .xg-top-bar{top:34px;top:constant(safe-area-inset-top);top:env(safe-area-inset-top)}}@media only screen and (orientation:landscape){.xgplayer-mobile.xgplayer-is-fullscreen .xg-top-bar,.xgplayer-mobile.xgplayer-is-fullscreen .xg-pos{left:6%;right:6%}.xgplayer-mobile.xgplayer-rotate-fullscreen{left:0;width:100vw;height:100vh;transform:rotate(0)}}.xgplayer .xgplayer-screen-container{display:block;width:100%}.xgplayer .xg-options-icon{display:none;cursor:pointer}.xgplayer .xg-options-icon.show{display:block}@keyframes xg_right_options_active{0%{transform:translate(50%)}to{transform:translate(-50%)}}@keyframes xg_right_options_hide{0%{transform:translate(-50%)}to{transform:translate(50%)}}@keyframes xg_left_options_active{0%{transform:translate(-50%)}to{transform:translate(50%)}}@keyframes xg_left_options_hide{0%{transform:translate(50%)}to{transform:translate(-50%)}}.xgplayer .xg-options-list{display:none;position:absolute;z-index:5;width:78px;right:50%;bottom:100%;background:#0000008a;border-radius:1px;transform:translate(50%);cursor:pointer;overflow:auto;height:0;opacity:.85;font-size:14px;color:#fffc}.xgplayer .xg-options-list li{height:20px;line-height:20px;position:relative;padding:4px 0;text-align:center;color:#fffc}.xgplayer .xg-options-list li:hover,.xgplayer .xg-options-list li.selected{color:red;opacity:1}.xgplayer .xg-options-list li:nth-child(1){position:relative;margin-top:12px}.xgplayer .xg-options-list li:last-child{position:relative;margin-bottom:12px}.xgplayer .xg-options-list:hover{opacity:1}.xgplayer .xg-options-list.active{display:block;height:auto}.xgplayer .xg-options-list.xg-side-list{width:20%;height:100%;bottom:0;background:#000000e6;display:flex;flex-direction:column;box-sizing:border-box}.xgplayer .xg-options-list.xg-side-list li{flex:1;width:100%;padding:0;position:relative}.xgplayer .xg-options-list.xg-side-list li span{display:block;position:relative;top:50%;transform:translateY(-50%);pointer-events:none}.xgplayer .xg-options-list.xg-side-list li:nth-child(1){margin-top:20px}.xgplayer .xg-options-list.xg-side-list li:last-child{margin-bottom:20px}.xgplayer .xg-options-list.xg-right-side{right:-10.5%}.xgplayer .xg-options-list.xg-right-side.active{height:100%;animation:xg_right_options_active .2s ease-out forwards}.xgplayer .xg-options-list.xg-right-side.hide{height:100%;animation:xg_right_options_hide .2s ease-in forwards}.xgplayer .xg-options-list.xg-left-side{left:-10.5%;transform:translate(-50%)}.xgplayer .xg-options-list.xg-left-side.active{height:100%;animation:xg_left_options_active .2s ease-out forwards}.xgplayer .xg-options-list.xg-left-side.hide{height:100%;animation:xg_left_options_hide .2s ease-in forwards}@media only screen and (max-width:480px){.xgplayer-mobile .xg-options-icon.portrait{display:none}.xgplayer-mobile .xg-options-list li:hover{color:#fffc}.xgplayer-mobile .xg-options-list li.selected{color:red}}.xgplayer.not-allow-autoplay .xgplayer-controls,.xgplayer.xgplayer-nostart .xgplayer-controls,.xgplayer.xgplayer-inactive .controls-autohide{pointer-events:none;visibility:hidden;cursor:default;opacity:0}.xgplayer.not-allow-autoplay .xgplayer-controls-initshow,.xgplayer.xgplayer-nostart .xgplayer-controls-initshow{pointer-events:auto;visibility:visible;opacity:1}.xgplayer .xgplayer-controls{display:block;position:absolute;visibility:visible;height:48px;left:0;right:0;bottom:0;opacity:1;z-index:10;background-image:linear-gradient(180deg,transparent,rgba(0,0,0,.37),rgba(0,0,0,.75),rgba(0,0,0,.75));transition:opacity .5s ease,visibility .5s ease}.xgplayer .xgplayer-controls.show{display:block;opacity:1;visibility:visible;pointer-events:auto}.xgplayer .xg-inner-controls{position:absolute;height:40px;bottom:0;justify-content:space-between;display:flex}.xgplayer .xg-left-grid,.xgplayer .xg-right-grid{position:relative;display:flex;flex-wrap:wrap;flex-shrink:1;height:100%;z-index:1}.xgplayer .xg-right-grid{flex-direction:row-reverse}.xgplayer .xg-right-grid>:first-child{margin-right:0}.xgplayer .xg-right-grid xg-icon{margin-left:0}.xgplayer .xg-left-grid>:first-child{margin-left:0}.xgplayer .xg-left-grid xg-icon{margin-right:0}.xgplayer .xg-center-grid{display:block;position:absolute;left:0;right:0;outline:none;top:-20px;padding:5px 0;text-align:center}.xgplayer .flex-controls .xg-inner-controls{justify-content:space-around;display:flex;bottom:8px}.xgplayer .flex-controls .xg-center-grid{display:flex;flex:1;position:relative;top:0;height:100%;justify-content:space-between;align-items:center;left:0;right:0;padding:0 16px}.xgplayer.xgplayer-mobile .xg-center-grid{z-index:2}.xgplayer.xgplayer-mobile .flex-controls .xg-center-grid{padding:0 8px}.xgplayer .bottom-controls .xg-center-grid{top:20px;padding:0}.xgplayer .bottom-controls .xg-left-grid,.xgplayer .bottom-controls .xg-right-grid{bottom:10px}.xgplayer .mini-controls{background-image:none}.xgplayer .mini-controls .xg-inner-controls{bottom:0;left:0;right:0}.xgplayer .mini-controls .xg-center-grid{bottom:-28px;top:auto;padding:0}.xgplayer .mini-controls .xg-left-grid,.xgplayer .mini-controls .xg-right-grid{display:none}.xgplayer .controls-follow{bottom:70px;transition:bottom .3s ease}.xgplayer.flex-controls .controls-follow{bottom:45px}.xgplayer.xgplayer-inactive .controls-follow,.xgplayer.no-controls .controls-follow,.xgplayer.mini-controls .controls-follow{bottom:10px}.xgplayer .xgplayer-cssfullscreen .xg-get-cssfull{display:block}.xgplayer .xgplayer-cssfullscreen .xg-exit-cssfull,.xgplayer .xgplayer-cssfullscreen[data-state=full] .xg-get-cssfull{display:none}.xgplayer .xgplayer-cssfullscreen[data-state=full] .xg-exit-cssfull{display:block}.xgplayer .xgplayer-fullscreen .xg-exit-fullscreen{display:none}.xgplayer .xgplayer-fullscreen .xg-get-fullscreen,.xgplayer .xgplayer-fullscreen[data-state=full] .xg-exit-fullscreen{display:block}.xgplayer .xgplayer-fullscreen[data-state=full] .xg-get-fullscreen{display:none}.xgplayer .xg-top-bar .xgplayer-back{position:relative;left:0;top:16px;width:34px;height:40px;display:none}.xgplayer .xg-top-bar .xgplayer-back.show{display:block}.xgplayer .xgplayer-play .xg-icon-play{display:none}.xgplayer .xgplayer-play .xg-icon-pause,.xgplayer .xgplayer-play[data-state=pause] .xg-icon-play{display:block}.xgplayer .xgplayer-play[data-state=pause] .xg-icon-pause{display:none}.xgplayer .xgplayer-progress{display:flex;align-items:center;position:relative;min-width:10px;height:20px;left:0;right:0;top:0;outline:none;flex:1;cursor:pointer}.xgplayer .xgplayer-progress-outer{position:relative;width:100%;height:2px;border-radius:3px;cursor:pointer}.xgplayer .progress-list{display:flex;height:100%;width:100%;border-radius:inherit}.xgplayer .xgplayer-progress-inner{position:relative;flex:1;height:100%;background:#ffffff4d;transition:height .2s ease-in,opacity .2s ease-out;border-radius:inherit;margin-right:2px;pointer-events:none}.xgplayer .xgplayer-progress-inner:last-child,.xgplayer .xgplayer-progress-inner:only-child{margin-right:0}.xgplayer .inner-focus-point{background:#fff;position:relative}.xgplayer .inner-focus-point:before,.xgplayer .inner-focus-point:after{position:absolute;content:" ";display:block;width:2px;height:300%;top:50%;z-index:1;transform:translateY(-50%);border-radius:3px;background:#fff}.xgplayer .inner-focus-point:before{left:0}.xgplayer .inner-focus-point:after{right:0}.xgplayer .xgplayer-progress-cache,.xgplayer .xgplayer-progress-played{display:block;height:100%;width:0;position:absolute;top:0;left:0;border-radius:inherit}.xgplayer .xgplayer-progress-played{background:linear-gradient(-90deg,#fa1f41,#e31106)}.xgplayer .xgplayer-progress-cache{background:#ffffff80}.xgplayer .xgplayer-progress-btn{display:block;background:#ff5e5e4e;border:.5px solid rgba(255,94,94,.056545);box-shadow:0 0 1px #ff000062;width:20px;height:20px;border-radius:30px;left:0;top:50%;position:absolute;z-index:1;transform:translate(-50%,-50%);box-sizing:border-box;pointer-events:none}.xgplayer .xgplayer-progress-btn:before{content:" ";display:block;position:relative;width:12px;height:12px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:30px;background:#fff}.xgplayer .xgplayer-progress-btn.active{border:4px solid rgba(255,94,94,.064057)}.xgplayer .xgplayer-progress-btn.active:before{box-shadow:0 0 3px #f85959b0}.xgplayer .xgplayer-progress-dot{display:inline-block;position:absolute;height:100%;width:5px;top:0;background:#fff;border-radius:6px;z-index:16}.xgplayer .xgplayer-progress-dot .xgplayer-progress-tip{position:absolute;left:25%;top:-40px;height:auto;line-height:30px;width:auto;transform:scale(.8) translate(-50%);background:#0000004d;border-radius:6px;border:1px solid rgba(0,0,0,.8);cursor:default;white-space:nowrap;display:none}.xgplayer .xgplayer-progress-dot:hover .xgplayer-progress-tip{display:block}.xgplayer .flex-controls .xgplayer-progress{transform:translateY(0)}.xgplayer.xgplayer-pc .xgplayer-progress-btn{transform:translate(-50%,-50%) scale(0)}.xgplayer.xgplayer-pc .xgplayer-progress-outer{height:3px}.xgplayer.xgplayer-pc .xgplayer-progress-inner{margin-right:4px}.xgplayer.xgplayer-pc .xgplayer-progress-inner:last-child,.xgplayer.xgplayer-pc .xgplayer-progress-inner:only-child{margin-right:0}.xgplayer.xgplayer-pc .inner-focus-point:before,.xgplayer.xgplayer-pc .inner-focus-point:after{width:3px}.xgplayer.xgplayer-pc .inner-focus-highlight{background:#fffc}.xgplayer.xgplayer-pc .xgplayer-progress.active .xgplayer-progress-outer{height:6px;margin-bottom:3px;transition:height .3s ease,margin-bottom .3s ease}.xgplayer.xgplayer-pc .xgplayer-progress.active .xgplayer-progress-btn{transform:translate(-50%,-50%) scale(1)}.xgplayer.xgplayer-pc .xgplayer-progress.active .inner-focus-point:before,.xgplayer.xgplayer-pc .xgplayer-progress.active .inner-focus-point:after{width:6px}.xgplayer .xgplayer-progress-bottom .xgplayer-progress-outer{top:9px}.xgplayer .xgplayer-progress-bottom .xgplayer-progress-btn:before{height:6px;width:6px}.xgplayer.xgplayer-mobile .xgplayer-progress-bottom .xgplayer-progress-outer{height:4px}@media(prefers-color-scheme:dark){.xgplayer .xgplayer-progress .xgplayer-progress-inner{background-color:#ffffff4d}.xgplayer .xgplayer-progress .inner-focus-highlight{background:#fffc}.xgplayer .xgplayer-progress .xgplayer-progress-btn{background:#ff5e5e4e;border:.5px solid rgba(255,94,94,.056545);box-shadow:0 0 1px #ff000062}.xgplayer .xgplayer-progress .xgplayer-progress-btn:before{background-color:#fff}.xgplayer .xgplayer-progress .xgplayer-progress-played{background-color:linear-gradient(-90deg,#FA1F41 0%,#E31106 100%)}.xgplayer .xgplayer-progress .xgplayer-progress-cache{background-color:#ffffff80}}.xg-mini-progress{display:none;position:absolute;height:2px;left:0;right:0;bottom:0;pointer-events:none}.xg-mini-progress xg-mini-progress-played,.xg-mini-progress xg-mini-progress-cache{height:100%;width:0;position:absolute;top:0;left:0;border-radius:inherit}.xg-mini-progress xg-mini-progress-played{background:linear-gradient(-90deg,#fa1f41,#e31106)}.xg-mini-progress xg-mini-progress-cache{background:#ffffff80}.xg-mini-progress-show,.xgplayer-inactive .xg-mini-progress,.xgplayer-mini .xg-mini-progress{display:block}.xgplayer .xgplayer-time{pointer-events:none;min-width:40px;font-size:14px;font-family:PingFangSC-Semibold;color:#fff;text-align:center;display:inline-block;line-height:40px}.xgplayer .xgplayer-time span{display:inline-block;line-height:40px;height:40px}.xgplayer .xgplayer-time span .time-min-width{text-align:center;min-width:2ch}.xgplayer .xgplayer-time span .time-min-width:first-child{text-align:right}.xgplayer .xgplayer-time span .time-min-width:last-child{text-align:left}.xgplayer .xgplayer-time .time-duration{color:#ffffff80}.xgplayer .xgplayer-time .time-live-tag{display:none}.xgplayer .xgplayer-time.xg-time-left{margin-left:0}.xgplayer .xgplayer-time.xg-time-right{margin-right:0}.xgplayer.xgplayer-mobile .xgplayer-time{min-width:30px;font-size:12px}.xgplayer.xgplayer-mobile .xgplayer-time.xg-time-left{margin-right:8px}.xgplayer.xgplayer-mobile .xgplayer-time.xg-time-right{margin-left:8px}.xgplayer .xgplayer-volume.slide-show .xgplayer-slider{display:block}.xgplayer .xgplayer-slider{display:none;position:absolute;width:28px;height:92px;background:#0000008a;border-radius:1px;bottom:40px;outline:none}.xgplayer .xgplayer-slider:after{content:" ";display:block;height:15px;width:28px;position:absolute;bottom:-15px;left:0;z-index:20;cursor:initial}.xgplayer .xgplayer-value-label{position:absolute;left:0;right:0;bottom:100%;padding:5px 0 0;font-size:12px;background-color:#0000008a;color:#fff;text-align:center}.xgplayer .xgplayer-bar,.xgplayer .xgplayer-drag{display:block;position:absolute;bottom:6px;left:12px;background:#ffffff4d;border-radius:100px;width:4px;height:76px;outline:none;cursor:pointer}.xgplayer .xgplayer-drag{bottom:0;left:0;background:#fa1f41;max-height:76px}.xgplayer .xgplayer-drag:after{content:" ";display:inline-block;width:8px;height:8px;background:#fff;box-shadow:0 0 5px #00000042;position:absolute;border-radius:50%;left:-2px;top:-4px}.xgplayer .xgplayer-volume[data-state=normal] .xg-volume{display:block}.xgplayer .xgplayer-volume[data-state=normal] .xg-volume-small,.xgplayer .xgplayer-volume[data-state=normal] .xg-volume-mute,.xgplayer .xgplayer-volume[data-state=small] .xg-volume{display:none}.xgplayer .xgplayer-volume[data-state=small] .xg-volume-small{display:block}.xgplayer .xgplayer-volume[data-state=small] .xg-volume-mute,.xgplayer .xgplayer-volume[data-state=mute] .xg-volume,.xgplayer .xgplayer-volume[data-state=mute] .xg-volume-small{display:none}.xgplayer .xgplayer-volume[data-state=mute] .xg-volume-mute{display:block}.xgplayer.xgplayer-mobile .xgplayer-volume .xgplayer-slider,.xgplayer-replay{display:none}.xgplayer .xgplayer-replay{display:none;position:absolute;left:50%;top:50%;width:100px;height:100px;justify-content:center;align-items:center;flex-direction:column;z-index:5;transform:translate(-50%,-50%);cursor:pointer}.xgplayer .xgplayer-replay .xgplayer-replay-txt{display:inline-block;font-size:14px;color:#fff;line-height:34px;text-align:center}.xgplayer.xgplayer-mobile .xgplayer-replay-svg{width:50px;height:50px}.xgplayer.xgplayer-mobile .xgplayer-replay-txt{line-height:24px;font-size:12px}.xgplayer .xgplayer-poster{display:block;opacity:1;visibility:visible;position:absolute;left:0;top:0;width:100%;height:100%;background-position:center center;background-size:100% auto;background-repeat:no-repeat;transition:opacity .3s ease,visibility .3s ease;pointer-events:none}.xgplayer .xgplayer-poster.hide,.xgplayer.xgplayer-playing .xgplayer-poster{opacity:0;visibility:hidden}.xgplayer.xgplayer-playing .xg-not-hidden,.xgplayer.xgplayer-is-enter .xgplayer-poster.xg-showplay,.xgplayer.xgplayer-playing .xgplayer-poster.xg-showplay,.xgplayer.xgplayer-nostart .xgplayer-poster,.xgplayer.xgplayer-ended .xgplayer-poster,.xgplayer.not-allow-autoplay .xgplayer-poster{opacity:1;visibility:visible}.xgplayer.xgplayer-nostart .xgplayer-poster.hide,.xgplayer.xgplayer-ended .xgplayer-poster.hide,.xgplayer.not-allow-autoplay .xgplayer-poster.hide{opacity:0;visibility:hidden}@keyframes playPause{0%{transform:scale(1);opacity:1}99%{transform:scale(1.3);opacity:0}to{transform:scale(1);opacity:0}}.xgplayer xg-start-inner{display:block;width:100%;height:100%;overflow:hidden;border-radius:50%;background:#00000061}.xgplayer .xgplayer-start{width:70px;height:70px;position:absolute;left:50%;top:50%;z-index:5;transform:translate(-50%,-50%);cursor:pointer}.xgplayer .xgplayer-start svg{width:100%;height:100%}.xgplayer .xgplayer-start.hide,.xgplayer .xgplayer-start.focus-hide{display:none;pointer-events:none}.xgplayer .xgplayer-start:hover{opacity:.85}.xgplayer .xgplayer-start .xg-icon-play{display:block}.xgplayer .xgplayer-start .xg-icon-pause,.xgplayer .xgplayer-start[data-state=pause] .xg-icon-play{display:none}.xgplayer .xgplayer-start[data-state=pause] .xg-icon-pause,.xgplayer .xgplayer-start.interact{display:block}.xgplayer .xgplayer-start.interact xg-start-inner{animation:playPause .4s .1s ease-out forwards}.xgplayer .xgplayer-start.show{display:block}.xgplayer.xgplayer-mobile xg-start-inner{background:initial;border-radius:0}.xgplayer.xgplayer-mobile .xgplayer-start{height:50px;width:50px}.xgplayer.xgplayer-mobile .xgplayer-start:hover{opacity:1}.xgplayer.xgplayer-inactive .xgplayer-start.auto-hide,.xgplayer.xgplayer-is-enter .xgplayer-start.auto-hide,.xgplayer.xgplayer-isloading.xgplayer-playing .xgplayer-start,.xgplayer.xgplayer-is-enter .xgplayer-start,.xgplayer.xgplayer-is-error .xgplayer-start,.xgplayer.xgplayer-is-enter .xgplayer-start.show,.xgplayer.xgplayer-is-error .xgplayer-start.show{display:none}.xgplayer-enter{display:none;position:absolute;left:0;top:0;width:100%;height:100%;background:#000c;z-index:5;pointer-events:none}.xgplayer-enter .show{display:block}.xgplayer-enter .xgplayer-enter-spinner{display:block;position:absolute;z-index:1;left:50%;top:50%;height:100px;width:100px;transform:translate(-50%,-50%)}.xgplayer-enter .xgplayer-enter-spinner div{width:6%;height:13%;background-color:#ffffffb3;position:absolute;left:45%;top:45%;opacity:0;border-radius:30px;animation:fade 1s linear infinite}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar1{transform:rotate(0) translateY(-140%);animation-delay:-0s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar2{transform:rotate(30deg) translateY(-140%);animation-delay:-.9163s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar3{transform:rotate(60deg) translateY(-140%);animation-delay:-.833s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar4{transform:rotate(90deg) translateY(-140%);animation-delay:-.7497s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar5{transform:rotate(120deg) translateY(-140%);animation-delay:-.6664s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar6{transform:rotate(150deg) translateY(-140%);animation-delay:-.5831s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar7{transform:rotate(180deg) translateY(-140%);animation-delay:-.4998s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar8{transform:rotate(210deg) translateY(-140%);animation-delay:-.4165s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar9{transform:rotate(240deg) translateY(-140%);animation-delay:-.3332s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar10{transform:rotate(270deg) translateY(-140%);animation-delay:-.2499s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar11{transform:rotate(300deg) translateY(-140%);animation-delay:-.1666s}.xgplayer-enter .xgplayer-enter-spinner div.xgplayer-enter-bar12{transform:rotate(330deg) translateY(-142%);animation-delay:-.0833s}@keyframes fade{0%{opacity:1}to{opacity:.25}}.xgplayer.xgplayer-is-enter .xgplayer-enter{display:block;opacity:1;transition:opacity .3s}.xgplayer.xgplayer-nostart .xgplayer-enter{display:none}.xgplayer.xgplayer-mobile .xgplayer-enter .xgplayer-enter-spinner{width:70px;height:70px}.xg-mini-layer{display:none;position:absolute;top:0;left:0;width:100%;height:100%;z-index:11;background:linear-gradient(180deg,#393939e6,#39393900 50.27%)}.xg-mini-layer .mask{pointer-events:none;position:absolute;top:0;left:0;height:100%;width:100%;background-color:#0006}.xg-mini-layer xg-mini-header{display:flex;top:0;left:0;right:40px;box-sizing:border-box;padding:10px 3px 0 8px;justify-content:space-between;color:#fff;font-size:14px;position:absolute;z-index:22}.xg-mini-layer xg-mini-header .xgplayer-pip-disableBtn{pointer-events:all}.xg-mini-layer xg-mini-header #disabledMini{display:none;position:relative}.xg-mini-layer xg-mini-header #disabledMini+label{cursor:pointer;position:relative;display:flex;align-items:center}.xg-mini-layer xg-mini-header #disabledMini+label:before{content:"";color:#ff142b;background-color:transparent;border-radius:2px;border:solid 1px #cdcdcd;width:16px;height:16px;display:inline-block;text-align:center;vertical-align:middle;line-height:16px;margin-right:7px}.xg-mini-layer xg-mini-header #disabledMini:checked+label{color:#ff142b}.xg-mini-layer xg-mini-header #disabledMini:checked+label:before{border-color:#ff142b}.xg-mini-layer xg-mini-header #disabledMini:checked+label:after{content:"";position:absolute;width:4px;height:8px;border-color:#ff142b;border-style:solid;border-width:0px 2px 2px 0px;transform:rotate(45deg);left:6px;top:5px}.xg-mini-layer xg-mini-header .xgplayer-mini-disableBtn xg-tips{position:absolute;padding:4px 6px;white-space:nowrap;bottom:-30px;right:15px;border-radius:4px;background-color:#0000008a;display:none}.xg-mini-layer xg-mini-header .xgplayer-mini-disableBtn:hover #disabledMini+label:before{border-color:#ff142b}.xg-mini-layer xg-mini-header .xgplayer-mini-disableBtn:hover #disabledMini+label{color:#ff142b}.xg-mini-layer xg-mini-header .xgplayer-mini-disableBtn:hover xg-tips{display:block}.xg-mini-layer .mini-cancel-btn{cursor:pointer;display:block;color:#fff;width:40px;height:38px;position:absolute;right:0;top:0;text-align:center;line-height:38px}.xg-mini-layer .play-icon{cursor:pointer;height:48px;width:48px;position:absolute;background:#0000008a;border-radius:24px;top:50%;left:50%;margin:-24px 0 0 -24px}.xg-mini-layer .play-icon svg,.xg-mini-layer .play-icon img{width:50px;height:50px;fill:#faf7f7}.xg-mini-layer .xg-icon-play{display:none}.xg-mini-layer .xg-icon-pause,.xg-mini-layer[data-state=pause] .xg-icon-play{display:block}.xg-mini-layer[data-state=pause] .xg-icon-pause{display:none}.xgplayer-miniicon{position:relative;outline:none;display:block}.xgplayer-miniicon .name{text-align:center;font-size:13px;line-height:20px;height:20px;color:#fffc;line-height:40px}.xgplayer-miniicon .name span{font-size:13px;width:60px;height:20px;line-height:20px;background:#00000061;border-radius:10px;display:inline-block;vertical-align:middle}.xgplayer-mini{position:fixed;width:320px;height:180px;z-index:91;box-shadow:0 4px 7px 2px #0003}.xgplayer-mini:hover{cursor:move}.xgplayer-mini:hover .xg-mini-layer{display:block}.xgplayer-mini.xgplayer-ended .xg-mini-layer{display:none}.xgplayer-mobile .xg-mini-layer .play-icon{background:none;border-radius:initial}.xgplayer.xgplayer-inactive{cursor:none}.xgplayer xg-thumbnail{display:block}.xgplayer xg-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:absolute;top:0;left:0;height:100%;width:100%}.xgplayer xg-trigger .time-preview{display:none;position:absolute;width:200px;margin:0 auto;padding:0 20px 30px;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;text-shadow:0 0 1px rgba(0,0,0,.54);font-size:18px;text-align:center;pointer-events:none}.xgplayer xg-trigger .time-preview span{line-height:24px}.xgplayer xg-trigger .time-preview .xg-cur{color:red}.xgplayer xg-trigger .time-preview .xg-separator{font-size:14px}.xgplayer xg-trigger .time-preview .xg-seek-show{transform:translate(-10px)}.xgplayer xg-trigger .time-preview .xg-seek-show.xg-back .xg-seek-pre{transform:rotate(180deg) translate(-5px)}.xgplayer xg-trigger .time-preview .xg-seek-show.hide-seek-icon .xg-seek-icon{display:none}.xgplayer xg-trigger .time-preview .xg-bar{width:96px;height:2px;margin:8px auto 0;border-radius:10px;box-sizing:content-box;background:#ffffff4d}.xgplayer xg-trigger .time-preview .xg-bar .xg-curbar{width:0;height:100%;background-color:red}.xgplayer xg-trigger .time-preview .xg-bar.hide{display:none}.xgplayer xg-trigger .mobile-thumbnail{position:relative;left:50%;transform:translate(-50%)}.xgplayer xg-trigger .xg-top-note{position:absolute;height:32px;width:135px;top:26px;left:50%;margin-left:-78px;background:#0000004d;border-radius:100px;color:#fff}.xgplayer xg-trigger .xg-top-note span{display:block;line-height:32px;height:32px;font-size:13px;text-align:center}.xgplayer xg-trigger .xg-top-note i{color:red;margin:0 5px}.xgplayer xg-trigger .xg-playbackrate{display:none}.xgplayer xg-trigger[data-xg-action=seeking] .time-preview{display:block}.xgplayer xg-trigger[data-xg-action=playbackrate] .xg-playbackrate{display:block}.xgplayer .gradient{display:none;position:absolute;top:0;left:0;height:100%;width:100%;pointer-events:none;background-image:linear-gradient(#0009,#0000005c 20%,#0000 36% 70%,#0000003d 77%,#0000005c 83%,#0009)}.xgplayer .gradient.top{background-image:linear-gradient(#0009,#0000005c 20%,#0000 36% 70%)}.xgplayer .gradient.bottom{background-image:linear-gradient(#0000 70%,#0000003d 77%,#0000005c 83%,#0009)}.xgplayer .gradient.none,.xgplayer-mobile .xgplayer-controls{background-image:initial}.xgplayer-mobile.xgplayer-playing .gradient{display:block}.xgplayer-mobile.xgplayer-inactive .gradient{background-image:initial}.xgplayer-mobile .xgmask{position:absolute;height:100%;z-index:10;top:0;left:0;width:100%;pointer-events:none;background-color:#0000}@media(prefers-color-scheme:dark){.xgplayer-mobile xg-trigger .time-preview{color:#fff}.xgplayer-mobile xg-trigger .time-preview span.xg-cur{color:red}.xgplayer-mobile xg-trigger .time-preview .xg-bar{background-color:#ffffff4d}.xgplayer-mobile xg-trigger .time-preview .xg-bar.xg-curbar{background-color:red}}@keyframes loadingRotate{0%{transform:rotate(0)}25%{transform:rotate(90deg)}50%{transform:rotate(180deg)}75%{transform:rotate(270deg)}to{transform:rotate(360deg)}}@keyframes loadingDashOffset{0%{stroke-dashoffset:236}to{stroke-dashoffset:0}}xg-loading-inner{display:block;height:100%;width:100%;transform-origin:center;animation:loadingRotate 1s .1s linear infinite}.xgplayer-loading{display:none;width:70px;height:70px;overflow:hidden;position:absolute;z-index:10;left:50%;top:50%;transform:translate(-50%,-50%);pointer-events:none}.xgplayer-loading svg,.xgplayer-loading img{width:100%;height:100%}.xgplayer-mobile .xgplayer-loading{width:50px;height:50px}.xgplayer-isloading .xgplayer-loading{display:block}.xgplayer-nostart .xgplayer-loading,.xgplayer-pause .xgplayer-loading,.xgplayer-is-enter .xgplayer-loading,.xgplayer-is-ended .xgplayer-loading,.xgplayer-is-error .xgplayer-loading,.xgplayer .xgplayer-pip .xg-exit-pip{display:none}.xgplayer .xgplayer-pip .xg-get-pip,.xgplayer .xgplayer-pip[data-state=pip] .xg-exit-pip{display:block}.xgplayer .xgplayer-pip[data-state=pip] .xg-get-pip{display:none}.xgplayer .xgplayer-playnext{position:relative;display:none;cursor:pointer}.xgplayer .xgplayer-playnext .xgplayer-tips .xgplayer-tip-playnext{display:block}.xgplayer .xgplayer-playnext:hover{opacity:.85}.xgplayer .xgplayer-playnext:hover .xgplayer-tips{display:block}.lang-is-en .xgplayer-playnext .xgplayer-tips{margin-left:-25px}.lang-is-jp .xgplayer-playnext .xgplayer-tips{margin-left:-38px}.xgplayer .xgplayer-download{position:relative;display:block;cursor:pointer}.lang-is-en .xgplayer-download .xgplayer-tips{margin-left:-32px}.lang-is-jp .xgplayer-download .xgplayer-tips{margin-left:-40px}.xgplayer .xgplayer-shot{display:none}.xgplayer-definition{display:none;cursor:pointer}.xgplayer .xgplayer-playbackrate{display:none;cursor:default}.xgplayer-error{background:#000;display:none;position:absolute;left:0;top:0;width:100%;height:100%;z-index:6;color:#fff;text-align:center;line-height:100%;justify-content:center;align-items:center}.xgplayer-error .xgplayer-error-refresh{color:#fa1f41;padding:0 3px;cursor:pointer}.xgplayer-error .xgplayer-error-text{line-height:18px;margin:auto 6px 20px;display:block}.xgplayer-is-error .xgplayer-error{display:flex}.xgplayer .xgplayer-prompt{display:block;pointer-events:none;position:absolute;z-index:1;padding:6px 12px 5px;opacity:0;left:10px;background:#00000080;border-radius:50px;font-size:12px;line-height:17px;text-align:center;color:#fff}.xgplayer .xgplayer-prompt.show{display:block;opacity:1;z-index:10;pointer-events:initial}.xgplayer .xgplayer-prompt.arrow{transform:translate(-50%)}.xgplayer .xgplayer-prompt.arrow:after{content:"";display:block;position:absolute;left:50%;bottom:0;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:8px solid rgba(0,0,0,.5);transform:translate(-50%,100%)}.xgplayer .xgplayer-prompt .highlight{display:inline-block;margin-left:6px;color:red;cursor:pointer}.xgplayer.xgplayer-is-error .xgplayer-prompt.show{display:none;opacity:1}.xgplayer .xgplayer-spot{position:absolute;top:0;left:0;height:100%;background:#fff;border-radius:12px}.xgplayer .xgplayer-spot.mini{min-width:6px;transform:translate(-50%)}.xgplayer .xgplayer-spot.active .xgplayer-spot-pop{display:block;opacity:1;pointer-events:initial}.xgplayer .xgplayer-spot-pop{display:block;opacity:0;pointer-events:none;position:absolute;left:50%;bottom:5px;padding-bottom:5px;transform:translate(-50%)}.xgplayer-mobile .xgplayer-spot{height:3px;min-width:3px;top:50%;opacity:1;transform:translateY(-50%)}.xgplayer-mobile .xgplayer-spot.mini{min-width:3px;transform:translate(-50%,-50%)}.xgplayer .xgplayer-progress.active .xgplayer-spot{opacity:1;transition:opacity .3s;visibility:visible}.xgplayer .xg-spot-info{position:absolute;left:0;bottom:100%;display:none}.xgplayer .xg-spot-info.short-line .xg-spot-line{height:6px}.xgplayer .xg-spot-info.short-line .xg-spot-content{bottom:-4px}.xgplayer .xg-spot-info.no-thumbnail .xg-spot-thumbnail{display:none}.xgplayer .xg-spot-info.no-thumbnail .xgplayer-progress-point{display:block}.xgplayer .xg-spot-info.no-timepoint .xgplayer-progress-point,.xgplayer .xg-spot-info.hide{display:none}.xgplayer .xgplayer-progress.active .xg-spot-info{display:block}.xgplayer .xgplayer-progress.active .xg-spot-info.hide{display:none}.xgplayer .xg-spot-line{position:relative;bottom:-7px;margin-left:50%;display:block;width:1px;height:41px;background-color:#fff;pointer-events:none}.xgplayer .xgplayer-progress-point{display:none;position:relative;bottom:-4px;left:50%;transform:translate(-50%);background:#0000008a;font-size:11px;color:#fff;padding:4px 6px;border-radius:4px;text-align:center;opacity:.85;white-space:nowrap}.xgplayer .xg-spot-content{position:relative;bottom:-7px;color:#fff;border-radius:2px 2px 0 0}.xgplayer .xg-spot-ext-text{position:relative;bottom:-7px}.xgplayer .xg-spot-thumbnail{position:relative;background-color:#111010;pointer-events:none;border-radius:2px 2px 0 0}.xgplayer .xg-spot-time{position:absolute;bottom:2px;font-size:12px;line-height:16.8px;left:50%;transform:translate(-50%);pointer-events:none}.xgplayer .progress-thumbnail{margin:0 auto;display:block}.xgplayer .xg-spot-text{display:none;padding:5px 8px;background:#000c;border-radius:0 0 2px 2px;pointer-events:none;box-sizing:border-box}.xgplayer .spot-inner-text{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:20px;font-size:12px;max-height:40px}.xgplayer .xg-spot-content.show-text .xg-spot-text{display:block}.xgplayer .product .xg-spot-text{background:#3370ff}.xgplayer .product .xg-spot-line{border-left:10px solid transparent;border-right:10px solid transparent;border-top:7px solid #3370FF;width:0;height:15px;left:-10px;background:none}.xgplayer .xgvideo-preview{position:absolute;width:100%;height:100%;top:0;left:0;opacity:0;visibility:hidden;transition:visibility .3s,opacity .3s;background-color:#000}.xgplayer .xgvideo-preview .xgvideo-thumbnail{position:relative;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:0}.xgplayer .xgvideo-preview.show{opacity:1;visibility:visible}.xgplayer-dynamic-bg,.xgplayer-dynamic-bg canvas,.xgplayer-dynamic-bg xgmask,.xgplayer-dynamic-bg xgfilter{display:block;position:absolute;top:0;left:0;height:100%;width:100%;pointer-events:none}.xgplayer-dynamic-bg canvas{transform:translateZ(0)}.xgplayer-dynamic-bg xgmask{background:#000000b3}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { jsxs as o, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import './Button.css';/* empty css */
|
|
3
|
-
const h = ({
|
|
4
|
-
variant: s = "primary",
|
|
5
|
-
size: r = "medium",
|
|
6
|
-
className: p,
|
|
7
|
-
children: c,
|
|
8
|
-
leftIcon: i,
|
|
9
|
-
rightIcon: e,
|
|
10
|
-
isLoading: t = !1,
|
|
11
|
-
isDisabled: l = !1,
|
|
12
|
-
fullWidth: a = !1,
|
|
13
|
-
type: u = "button",
|
|
14
|
-
...x
|
|
15
|
-
}) => {
|
|
16
|
-
const b = [
|
|
17
|
-
"xiping-button",
|
|
18
|
-
`xiping-button--${s}`,
|
|
19
|
-
`xiping-button--${r}`,
|
|
20
|
-
l && "xiping-button--disabled",
|
|
21
|
-
a && "xiping-button--full-width",
|
|
22
|
-
t && "xiping-button--loading",
|
|
23
|
-
p
|
|
24
|
-
].filter(Boolean).join(" ");
|
|
25
|
-
return /* @__PURE__ */ o(
|
|
26
|
-
"button",
|
|
27
|
-
{
|
|
28
|
-
type: u,
|
|
29
|
-
className: b,
|
|
30
|
-
disabled: l || t,
|
|
31
|
-
...x,
|
|
32
|
-
children: [
|
|
33
|
-
t && /* @__PURE__ */ o(
|
|
34
|
-
"svg",
|
|
35
|
-
{
|
|
36
|
-
className: "xiping-button__spinner",
|
|
37
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
38
|
-
fill: "none",
|
|
39
|
-
viewBox: "0 0 24 24",
|
|
40
|
-
children: [
|
|
41
|
-
/* @__PURE__ */ n(
|
|
42
|
-
"circle",
|
|
43
|
-
{
|
|
44
|
-
className: "xiping-button__spinner-circle",
|
|
45
|
-
cx: "12",
|
|
46
|
-
cy: "12",
|
|
47
|
-
r: "10",
|
|
48
|
-
stroke: "currentColor",
|
|
49
|
-
strokeWidth: "4"
|
|
50
|
-
}
|
|
51
|
-
),
|
|
52
|
-
/* @__PURE__ */ n(
|
|
53
|
-
"path",
|
|
54
|
-
{
|
|
55
|
-
className: "xiping-button__spinner-path",
|
|
56
|
-
fill: "currentColor",
|
|
57
|
-
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
58
|
-
}
|
|
59
|
-
)
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
),
|
|
63
|
-
!t && i && /* @__PURE__ */ n("span", { className: "xiping-button__icon-left", children: i }),
|
|
64
|
-
c,
|
|
65
|
-
!t && e && /* @__PURE__ */ n("span", { className: "xiping-button__icon-right", children: e })
|
|
66
|
-
]
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
};
|
|
70
|
-
export {
|
|
71
|
-
h as Button
|
|
72
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
-
import { motion as n } from "motion/react";
|
|
4
|
-
import p from "clsx";
|
|
5
|
-
import './ComicText.css';/* empty css */
|
|
6
|
-
function d({
|
|
7
|
-
children: t,
|
|
8
|
-
className: e,
|
|
9
|
-
style: a,
|
|
10
|
-
fontSize: r = 5
|
|
11
|
-
}) {
|
|
12
|
-
if (typeof t != "string")
|
|
13
|
-
throw new Error("children must be a string");
|
|
14
|
-
const o = "#EF4444";
|
|
15
|
-
return /* @__PURE__ */ i(
|
|
16
|
-
n.div,
|
|
17
|
-
{
|
|
18
|
-
className: p("xiping-comic-text", e),
|
|
19
|
-
style: {
|
|
20
|
-
fontSize: `${r}rem`,
|
|
21
|
-
fontFamily: "'Bangers', 'Comic Sans MS', 'Impact', sans-serif",
|
|
22
|
-
fontWeight: "900",
|
|
23
|
-
WebkitTextStroke: `${r * 0.35}px #000000`,
|
|
24
|
-
// Thick black outline
|
|
25
|
-
transform: "skewX(-10deg)",
|
|
26
|
-
textTransform: "uppercase",
|
|
27
|
-
filter: `
|
|
28
|
-
drop-shadow(5px 5px 0px #000000)
|
|
29
|
-
drop-shadow(3px 3px 0px ${o})
|
|
30
|
-
`,
|
|
31
|
-
backgroundColor: "#FACC15",
|
|
32
|
-
backgroundImage: `radial-gradient(circle at 1px 1px, ${o} 1px, transparent 0)`,
|
|
33
|
-
backgroundSize: "8px 8px",
|
|
34
|
-
backgroundClip: "text",
|
|
35
|
-
WebkitBackgroundClip: "text",
|
|
36
|
-
WebkitTextFillColor: "transparent",
|
|
37
|
-
...a
|
|
38
|
-
},
|
|
39
|
-
initial: { opacity: 0, scale: 0.8, rotate: -2 },
|
|
40
|
-
animate: { opacity: 1, scale: 1, rotate: 0 },
|
|
41
|
-
transition: {
|
|
42
|
-
duration: 0.6,
|
|
43
|
-
ease: [0.175, 0.885, 0.32, 1.275],
|
|
44
|
-
type: "spring"
|
|
45
|
-
},
|
|
46
|
-
children: t
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
export {
|
|
51
|
-
d as ComicText
|
|
52
|
-
};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as g } from "react/jsx-runtime";
|
|
3
|
-
import { useMotionValue as x, motion as I, useTransform as f, useSpring as A } from "motion/react";
|
|
4
|
-
import r, { useRef as C } from "react";
|
|
5
|
-
import k from "clsx";
|
|
6
|
-
import './Duck.css';/* empty css */
|
|
7
|
-
const D = 40, y = 60, E = 140, h = r.forwardRef(
|
|
8
|
-
({
|
|
9
|
-
className: o,
|
|
10
|
-
children: c,
|
|
11
|
-
iconSize: s = D,
|
|
12
|
-
iconMagnification: m = y,
|
|
13
|
-
iconDistance: a = E,
|
|
14
|
-
direction: t = "middle",
|
|
15
|
-
...d
|
|
16
|
-
}, i) => {
|
|
17
|
-
const e = x(1 / 0), p = () => r.Children.map(c, (n) => r.isValidElement(n) && n.type === M ? r.cloneElement(n, {
|
|
18
|
-
...n.props,
|
|
19
|
-
mouseX: e,
|
|
20
|
-
size: s,
|
|
21
|
-
magnification: m,
|
|
22
|
-
distance: a
|
|
23
|
-
}) : n);
|
|
24
|
-
return /* @__PURE__ */ g(
|
|
25
|
-
I.div,
|
|
26
|
-
{
|
|
27
|
-
ref: i,
|
|
28
|
-
onMouseMove: (n) => e.set(n.pageX),
|
|
29
|
-
onMouseLeave: () => e.set(1 / 0),
|
|
30
|
-
...d,
|
|
31
|
-
className: k(
|
|
32
|
-
"xiping-dock",
|
|
33
|
-
t === "top" && "xiping-dock--top",
|
|
34
|
-
t === "bottom" && "xiping-dock--bottom",
|
|
35
|
-
t === "middle" && "xiping-dock--middle",
|
|
36
|
-
o
|
|
37
|
-
),
|
|
38
|
-
children: p()
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
h.displayName = "Dock";
|
|
44
|
-
const M = ({
|
|
45
|
-
size: o = D,
|
|
46
|
-
magnification: c = y,
|
|
47
|
-
distance: s = E,
|
|
48
|
-
mouseX: m,
|
|
49
|
-
className: a,
|
|
50
|
-
children: t,
|
|
51
|
-
...d
|
|
52
|
-
}) => {
|
|
53
|
-
const i = C(null), e = Math.max(6, o * 0.2), p = x(1 / 0), n = f(m ?? p, (T) => {
|
|
54
|
-
const l = i.current?.getBoundingClientRect() ?? { x: 0, width: 0 };
|
|
55
|
-
return T - l.x - l.width / 2;
|
|
56
|
-
}), N = f(
|
|
57
|
-
n,
|
|
58
|
-
[-s, 0, s],
|
|
59
|
-
[o, c, o]
|
|
60
|
-
), u = A(N, {
|
|
61
|
-
mass: 0.1,
|
|
62
|
-
stiffness: 150,
|
|
63
|
-
damping: 12
|
|
64
|
-
});
|
|
65
|
-
return /* @__PURE__ */ g(
|
|
66
|
-
I.div,
|
|
67
|
-
{
|
|
68
|
-
ref: i,
|
|
69
|
-
style: { width: u, height: u, padding: e },
|
|
70
|
-
className: k("xiping-dock-icon", a),
|
|
71
|
-
...d,
|
|
72
|
-
children: t
|
|
73
|
-
}
|
|
74
|
-
);
|
|
75
|
-
};
|
|
76
|
-
M.displayName = "DockIcon";
|
|
77
|
-
export {
|
|
78
|
-
h as Dock,
|
|
79
|
-
M as DockIcon
|
|
80
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
-
import { motion as d, AnimatePresence as h } from "motion/react";
|
|
4
|
-
import f from "react";
|
|
5
|
-
import x from "clsx";
|
|
6
|
-
import './FlipText.css';/* empty css */
|
|
7
|
-
const u = {
|
|
8
|
-
hidden: { rotateX: -90, opacity: 0 },
|
|
9
|
-
visible: { rotateX: 0, opacity: 1 }
|
|
10
|
-
};
|
|
11
|
-
function A({
|
|
12
|
-
children: e,
|
|
13
|
-
duration: n = 0.5,
|
|
14
|
-
delayMultiple: a = 0.08,
|
|
15
|
-
className: o,
|
|
16
|
-
as: r = "span",
|
|
17
|
-
variants: c,
|
|
18
|
-
...s
|
|
19
|
-
}) {
|
|
20
|
-
const l = d.create(r), m = f.Children.toArray(e).join("").split("");
|
|
21
|
-
return /* @__PURE__ */ i("div", { className: "xiping-flip-container", children: /* @__PURE__ */ i(h, { mode: "wait", children: m.map((p, t) => /* @__PURE__ */ i(
|
|
22
|
-
l,
|
|
23
|
-
{
|
|
24
|
-
initial: "hidden",
|
|
25
|
-
animate: "visible",
|
|
26
|
-
exit: "hidden",
|
|
27
|
-
variants: c || u,
|
|
28
|
-
transition: { duration: n, delay: t * a },
|
|
29
|
-
className: x("xiping-flip-char", o),
|
|
30
|
-
...s,
|
|
31
|
-
children: p
|
|
32
|
-
},
|
|
33
|
-
t
|
|
34
|
-
)) }) });
|
|
35
|
-
}
|
|
36
|
-
export {
|
|
37
|
-
A as FlipText
|
|
38
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsxs as s, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import f from "clsx";
|
|
3
|
-
import './index.css';/* empty css */
|
|
4
|
-
function x({
|
|
5
|
-
children: i,
|
|
6
|
-
className: e = "",
|
|
7
|
-
colors: n = ["#40ffaa", "#4079ff", "#40ffaa", "#4079ff", "#40ffaa"],
|
|
8
|
-
animationSpeed: r = 8,
|
|
9
|
-
showBorder: o = !1
|
|
10
|
-
}) {
|
|
11
|
-
const t = {
|
|
12
|
-
backgroundImage: `linear-gradient(to right, ${n.join(", ")})`,
|
|
13
|
-
animationDuration: `${r}s`
|
|
14
|
-
};
|
|
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
|
-
/* @__PURE__ */ a("div", { className: "xiping-gradient-text__content", style: t, children: i })
|
|
18
|
-
] });
|
|
19
|
-
}
|
|
20
|
-
export {
|
|
21
|
-
x as GradientText
|
|
22
|
-
};
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { jsxs as X, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import w from "clsx";
|
|
3
|
-
import { useState as N, useRef as r, useCallback as a, useEffect as S, useMemo as b } from "react";
|
|
4
|
-
import './ImageCompare.css';/* empty css */
|
|
5
|
-
const O = (I) => {
|
|
6
|
-
const {
|
|
7
|
-
originalImage: c,
|
|
8
|
-
modifiedImage: x,
|
|
9
|
-
className: $,
|
|
10
|
-
dividerWidth: l = 1,
|
|
11
|
-
originalLabel: P = "Original",
|
|
12
|
-
modifiedLabel: A = "Modified",
|
|
13
|
-
theme: M = "light"
|
|
14
|
-
} = I, [s, C] = N(50), [k, D] = N(16 / 9), h = r(null), d = r(!1), o = r(null), u = r(null), n = r(null), R = a((e) => {
|
|
15
|
-
if (!h.current) return;
|
|
16
|
-
(!u.current || !d.current) && (u.current = h.current.getBoundingClientRect());
|
|
17
|
-
const i = u.current, g = (e - i.left) / i.width * 100, p = Math.min(100, Math.max(0, g));
|
|
18
|
-
C(p);
|
|
19
|
-
}, []), m = a((e) => {
|
|
20
|
-
d.current && (o.current !== null && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
|
|
21
|
-
R(e);
|
|
22
|
-
}));
|
|
23
|
-
}, [R]), L = a((e) => {
|
|
24
|
-
m(e.clientX);
|
|
25
|
-
}, [m]), E = a((e) => {
|
|
26
|
-
e.touches.length > 0 && m(e.touches[0].clientX);
|
|
27
|
-
}, [m]), y = a(() => {
|
|
28
|
-
d.current = !0, u.current = null;
|
|
29
|
-
const e = (f) => L(f), i = (f) => E(f), v = () => {
|
|
30
|
-
d.current = !1, o.current !== null && (cancelAnimationFrame(o.current), o.current = null), n.current && (n.current(), n.current = null);
|
|
31
|
-
}, g = () => v(), p = () => v();
|
|
32
|
-
window.addEventListener("mousemove", e), window.addEventListener("touchmove", i, { passive: !1 }), window.addEventListener("mouseup", g), window.addEventListener("touchend", p);
|
|
33
|
-
const F = () => {
|
|
34
|
-
window.removeEventListener("mousemove", e), window.removeEventListener("touchmove", i), window.removeEventListener("mouseup", g), window.removeEventListener("touchend", p);
|
|
35
|
-
};
|
|
36
|
-
n.current = F;
|
|
37
|
-
}, [L, E]);
|
|
38
|
-
S(() => () => {
|
|
39
|
-
n.current && (n.current(), n.current = null);
|
|
40
|
-
}, []), S(() => {
|
|
41
|
-
const e = new Image();
|
|
42
|
-
e.onload = () => {
|
|
43
|
-
D(e.width / e.height);
|
|
44
|
-
}, e.src = c;
|
|
45
|
-
}, [c]);
|
|
46
|
-
const G = b(
|
|
47
|
-
() => ({
|
|
48
|
-
backgroundRepeat: "no-repeat",
|
|
49
|
-
backgroundPosition: "top left",
|
|
50
|
-
backgroundImage: `url(${c})`,
|
|
51
|
-
backgroundSize: "contain",
|
|
52
|
-
aspectRatio: k
|
|
53
|
-
}),
|
|
54
|
-
[c, k]
|
|
55
|
-
), T = b(
|
|
56
|
-
() => ({
|
|
57
|
-
width: `${s}%`,
|
|
58
|
-
backgroundImage: `url(${x})`,
|
|
59
|
-
backgroundRepeat: "no-repeat",
|
|
60
|
-
backgroundPosition: "top left",
|
|
61
|
-
backgroundSize: "auto 100%"
|
|
62
|
-
}),
|
|
63
|
-
[s, x]
|
|
64
|
-
), j = b(
|
|
65
|
-
() => ({
|
|
66
|
-
left: `${s}%`,
|
|
67
|
-
transform: "translateX(-50%)",
|
|
68
|
-
width: typeof l == "number" ? `${l}px` : l
|
|
69
|
-
}),
|
|
70
|
-
[s, l]
|
|
71
|
-
);
|
|
72
|
-
return /* @__PURE__ */ X(
|
|
73
|
-
"div",
|
|
74
|
-
{
|
|
75
|
-
ref: h,
|
|
76
|
-
className: w("xiping-image-compare-container", $),
|
|
77
|
-
style: G,
|
|
78
|
-
children: [
|
|
79
|
-
/* @__PURE__ */ t("div", { className: "xiping-image-compare-label xiping-image-compare-label-original", children: P }),
|
|
80
|
-
/* @__PURE__ */ t(
|
|
81
|
-
"div",
|
|
82
|
-
{
|
|
83
|
-
className: "xiping-image-compare-overlay",
|
|
84
|
-
style: T,
|
|
85
|
-
children: /* @__PURE__ */ t("div", { className: "xiping-image-compare-label xiping-image-compare-label-modified", children: A })
|
|
86
|
-
}
|
|
87
|
-
),
|
|
88
|
-
/* @__PURE__ */ t(
|
|
89
|
-
"div",
|
|
90
|
-
{
|
|
91
|
-
className: w(
|
|
92
|
-
"xiping-image-compare-divider",
|
|
93
|
-
`xiping-image-compare-divider-theme-${M}`
|
|
94
|
-
),
|
|
95
|
-
style: j,
|
|
96
|
-
onMouseDown: y,
|
|
97
|
-
onTouchStart: y,
|
|
98
|
-
children: /* @__PURE__ */ t("div", { className: w(
|
|
99
|
-
"xiping-image-compare-divider-button",
|
|
100
|
-
`xiping-image-compare-divider-button-theme-${M}`
|
|
101
|
-
), children: /* @__PURE__ */ t(
|
|
102
|
-
"svg",
|
|
103
|
-
{
|
|
104
|
-
className: "xiping-image-compare-divider-icon",
|
|
105
|
-
fill: "none",
|
|
106
|
-
stroke: "currentColor",
|
|
107
|
-
viewBox: "0 0 24 24",
|
|
108
|
-
children: /* @__PURE__ */ t(
|
|
109
|
-
"path",
|
|
110
|
-
{
|
|
111
|
-
strokeLinecap: "round",
|
|
112
|
-
strokeLinejoin: "round",
|
|
113
|
-
strokeWidth: 2,
|
|
114
|
-
d: "M8 9l4-4 4 4m0 6l-4 4-4-4"
|
|
115
|
-
}
|
|
116
|
-
)
|
|
117
|
-
}
|
|
118
|
-
) })
|
|
119
|
-
}
|
|
120
|
-
)
|
|
121
|
-
]
|
|
122
|
-
}
|
|
123
|
-
);
|
|
124
|
-
};
|
|
125
|
-
export {
|
|
126
|
-
O as default
|
|
127
|
-
};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useScroll as f, motion as h, useMotionValue as b, useMotionValueEvent as x, animate as r } from "motion/react";
|
|
3
|
-
import { size as v } from "lodash-es";
|
|
4
|
-
import { useRef as I } from "react";
|
|
5
|
-
import g from "clsx";
|
|
6
|
-
import './ImageThumbnails.css';/* empty css */
|
|
7
|
-
const $ = "0%", N = "100%", u = "20%", l = "80%", a = "#0000", e = "#000";
|
|
8
|
-
function k(i) {
|
|
9
|
-
const n = b(
|
|
10
|
-
`linear-gradient(90deg, ${e}, ${e} ${$}, ${e} ${l}, ${a})`
|
|
11
|
-
);
|
|
12
|
-
return x(i, "change", (s) => {
|
|
13
|
-
s === 0 ? r(
|
|
14
|
-
n,
|
|
15
|
-
`linear-gradient(90deg, ${e}, ${e} ${$}, ${e} ${l}, ${a})`
|
|
16
|
-
) : s === 1 ? r(
|
|
17
|
-
n,
|
|
18
|
-
`linear-gradient(90deg, ${a}, ${e} ${u}, ${e} ${N}, ${e})`
|
|
19
|
-
) : (i.getPrevious() === 0 || i.getPrevious() === 1) && r(
|
|
20
|
-
n,
|
|
21
|
-
`linear-gradient(90deg, ${a}, ${e} ${u}, ${e} ${l}, ${a})`
|
|
22
|
-
);
|
|
23
|
-
}), n;
|
|
24
|
-
}
|
|
25
|
-
const q = ({
|
|
26
|
-
images: i,
|
|
27
|
-
currentIndex: n,
|
|
28
|
-
onImageSelect: s
|
|
29
|
-
}) => {
|
|
30
|
-
const o = I(null), { scrollXProgress: p } = f({ container: o }), d = k(p);
|
|
31
|
-
return /* @__PURE__ */ t(
|
|
32
|
-
"div",
|
|
33
|
-
{
|
|
34
|
-
className: g(
|
|
35
|
-
"xiping-thumbnails-wrapper",
|
|
36
|
-
v(i) <= 1 && "xiping-thumbnails-wrapper--hidden"
|
|
37
|
-
),
|
|
38
|
-
children: /* @__PURE__ */ t(
|
|
39
|
-
h.div,
|
|
40
|
-
{
|
|
41
|
-
ref: o,
|
|
42
|
-
style: {
|
|
43
|
-
maskImage: d
|
|
44
|
-
},
|
|
45
|
-
className: "xiping-thumbnails-scroll",
|
|
46
|
-
children: /* @__PURE__ */ t("div", { className: "xiping-thumbnails-container", children: i.map((m, c) => /* @__PURE__ */ t(
|
|
47
|
-
"div",
|
|
48
|
-
{
|
|
49
|
-
className: g(
|
|
50
|
-
"xiping-thumbnail-item",
|
|
51
|
-
c === n && "xiping-thumbnail-item--active"
|
|
52
|
-
),
|
|
53
|
-
onClick: () => s(c),
|
|
54
|
-
children: /* @__PURE__ */ t(
|
|
55
|
-
"img",
|
|
56
|
-
{
|
|
57
|
-
src: m,
|
|
58
|
-
alt: "",
|
|
59
|
-
className: "xiping-thumbnail-image",
|
|
60
|
-
draggable: "false"
|
|
61
|
-
}
|
|
62
|
-
)
|
|
63
|
-
},
|
|
64
|
-
m
|
|
65
|
-
)) })
|
|
66
|
-
}
|
|
67
|
-
)
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
};
|
|
71
|
-
export {
|
|
72
|
-
q as default
|
|
73
|
-
};
|