@xiping/react-components 1.0.27 → 1.0.28

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.
@@ -1,10 +1,10 @@
1
1
  type AnimationStyle = "from-bottom" | "from-center" | "from-top" | "from-left" | "from-right" | "fade" | "top-in-bottom-out" | "left-in-right-out";
2
- interface HeroVideoProps {
2
+ interface VideoProps {
3
3
  animationStyle?: AnimationStyle;
4
4
  videoSrc: string;
5
5
  thumbnailSrc: string;
6
6
  thumbnailAlt?: string;
7
7
  className?: string;
8
8
  }
9
- export declare function HeroVideoDialog({ animationStyle, videoSrc, thumbnailSrc, thumbnailAlt, className, }: HeroVideoProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function VideoDialog({ animationStyle, videoSrc, thumbnailSrc, thumbnailAlt, className, }: VideoProps): import("react/jsx-runtime").JSX.Element;
10
10
  export {};
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("react"),i=require("motion/react"),u=require("../../utils/utils.js"),p=require("../../node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/play.js"),m=require("../../node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/x.js"),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:a="from-center",videoSrc:o,thumbnailSrc:r,thumbnailAlt:s="Video thumbnail",className:l}){const[n,t]=d.useState(!1),c=x[a];return e.jsxs("div",{className:u.cn("relative",l),children:[e.jsxs("div",{className:"group relative cursor-pointer",onClick:()=>t(!0),children:[e.jsx("img",{src:r,alt:s,width:1920,height:1080,className:"w-full rounded-md border shadow-lg transition-all duration-200 ease-out group-hover:brightness-[0.8]"}),e.jsx("div",{className:"absolute inset-0 flex scale-[0.9] items-center justify-center rounded-2xl transition-all duration-200 ease-out group-hover:scale-100",children:e.jsx("div",{className:"flex size-28 items-center justify-center rounded-full bg-primary/10 backdrop-blur-md",children:e.jsx("div",{className:"relative flex size-20 scale-100 items-center justify-center rounded-full bg-gradient-to-b from-primary/30 to-primary shadow-md transition-all duration-200 ease-out group-hover:scale-[1.2]",children:e.jsx(p.default,{className:"size-8 scale-100 fill-white text-white transition-transform duration-200 ease-out group-hover:scale-105",style:{filter:"drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06))"}})})})})]}),e.jsx(i.AnimatePresence,{children:n&&e.jsx(i.motion.div,{initial:{opacity:0},animate:{opacity:1},onClick:()=>t(!1),exit:{opacity:0},className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-md",children:e.jsxs(i.motion.div,{...c,transition:{type:"spring",damping:30,stiffness:300},className:"relative mx-4 aspect-video w-full max-w-4xl md:mx-0",children:[e.jsx(i.motion.button,{className:"absolute -top-16 right-0 rounded-full bg-neutral-900/50 p-2 text-xl text-white ring-1 backdrop-blur-md dark:bg-neutral-100/50 dark:text-black",children:e.jsx(m.default,{className:"size-5"})}),e.jsx("div",{className:"relative isolate z-[1] size-full overflow-hidden rounded-2xl border-2 border-white",children:e.jsx("iframe",{src:o,className:"size-full rounded-2xl",allowFullScreen:!0,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"})})]})})})]})}exports.HeroVideoDialog=y;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("react"),i=require("motion/react"),u=require("../../utils/utils.js"),p=require("../../node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/play.js"),m=require("../../node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/x.js"),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:a="from-center",videoSrc:o,thumbnailSrc:r,thumbnailAlt:s="Video thumbnail",className:l}){const[n,t]=d.useState(!1),c=x[a];return e.jsxs("div",{className:u.cn("relative",l),children:[e.jsxs("div",{className:"group relative cursor-pointer",onClick:()=>t(!0),children:[e.jsx("img",{src:r,alt:s,width:1920,height:1080,className:"w-full rounded-md border shadow-lg transition-all duration-200 ease-out group-hover:brightness-[0.8]"}),e.jsx("div",{className:"absolute inset-0 flex scale-[0.9] items-center justify-center rounded-2xl transition-all duration-200 ease-out group-hover:scale-100",children:e.jsx("div",{className:"flex size-28 items-center justify-center rounded-full bg-primary/10 backdrop-blur-md",children:e.jsx("div",{className:"relative flex size-20 scale-100 items-center justify-center rounded-full bg-gradient-to-b from-primary/30 to-primary shadow-md transition-all duration-200 ease-out group-hover:scale-[1.2]",children:e.jsx(p.default,{className:"size-8 scale-100 fill-white text-white transition-transform duration-200 ease-out group-hover:scale-105",style:{filter:"drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06))"}})})})})]}),e.jsx(i.AnimatePresence,{children:n&&e.jsx(i.motion.div,{initial:{opacity:0},animate:{opacity:1},onClick:()=>t(!1),exit:{opacity:0},className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-md",children:e.jsxs(i.motion.div,{...c,transition:{type:"spring",damping:30,stiffness:300},className:"relative mx-4 aspect-video w-full max-w-4xl md:mx-0",children:[e.jsx(i.motion.button,{className:"absolute -top-16 right-0 rounded-full bg-neutral-900/50 p-2 text-xl text-white ring-1 backdrop-blur-md dark:bg-neutral-100/50 dark:text-black",children:e.jsx(m.default,{className:"size-5"})}),e.jsx("div",{className:"relative isolate z-[1] size-full overflow-hidden rounded-2xl border-2 border-white",children:e.jsx("iframe",{src:o,className:"size-full rounded-2xl",allowFullScreen:!0,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"})})]})})})]})}exports.VideoDialog=y;
package/dist/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */const r=require("./components/button/Button.js"),o=require("./components/txt-reader/TxtReader.js"),i=require("./components/hyper-text/index.js"),n=require("./components/typing-animation/index.js"),u=require("./components/qr-code/index.js"),t=require("./components/confetti-button/index.js"),c=require("./hooks/useStayTimeReport.js"),a=require("./components/pinch-content/PinchContent.js"),s=require("./components/image-viewer/ImageViewer.js"),d=require("./components/shimmer-button/ShimmerButton.js"),T=require("./components/image-compare/ImageCompare.js"),m=require("./components/text-animate/TextAnimate.js"),e=require("./components/dock/Duck.js"),q=require("./components/txt-editor/TxtEditor.js"),x=require("./components/message/Message.js"),l=require("./node_modules/.pnpm/react-force-graph-3d@1.28.0_react@19.1.0/node_modules/react-force-graph-3d/dist/react-force-graph-3d.js"),p=require("./node_modules/.pnpm/canvas-confetti@1.9.3/node_modules/canvas-confetti/dist/confetti.module.js"),g=require("./components/pointer/Pointer.js"),C=require("./components/sparkles-text/SparklesText.js"),f=require("./components/blur-fade/BlurFade.js"),B=require("./components/video-dialog/VideoDialog.js"),S=require("./components/comic-text/ComicText.js"),k=require("./components/flip-text/FlipText.js");exports.Button=r.Button;exports.TxtReader=o.TxtReader;exports.HyperText=i.HyperText;exports.TypingAnimation=n.TypingAnimation;exports.QRCode=u.QRCode;exports.Confetti=t.Confetti;exports.ConfettiButton=t.ConfettiButton;exports.useStayTimeReport=c.useStayTimeReport;exports.PinchContent=a.default;exports.ImageViewer=s.default;exports.ShimmerButton=d.ShimmerButton;exports.ImageCompare=T.default;exports.TextAnimate=m.TextAnimate;exports.Dock=e.Dock;exports.DockIcon=e.DockIcon;exports.dockVariants=e.dockVariants;exports.TxtEditor=q.TxtEditor;exports.Message=x.Message;exports.ForceGraph3D=l.default;exports.confetti=p.default;exports.Pointer=g.Pointer;exports.SparklesText=C.SparklesText;exports.BlurFade=f.BlurFade;exports.HeroVideoDialog=B.HeroVideoDialog;exports.ComicText=S.ComicText;exports.FlipText=k.FlipText;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */const r=require("./components/button/Button.js"),o=require("./components/txt-reader/TxtReader.js"),i=require("./components/hyper-text/index.js"),n=require("./components/typing-animation/index.js"),u=require("./components/qr-code/index.js"),t=require("./components/confetti-button/index.js"),c=require("./hooks/useStayTimeReport.js"),a=require("./components/pinch-content/PinchContent.js"),s=require("./components/image-viewer/ImageViewer.js"),d=require("./components/shimmer-button/ShimmerButton.js"),T=require("./components/image-compare/ImageCompare.js"),m=require("./components/text-animate/TextAnimate.js"),e=require("./components/dock/Duck.js"),q=require("./components/txt-editor/TxtEditor.js"),x=require("./components/message/Message.js"),l=require("./node_modules/.pnpm/react-force-graph-3d@1.28.0_react@19.1.0/node_modules/react-force-graph-3d/dist/react-force-graph-3d.js"),p=require("./node_modules/.pnpm/canvas-confetti@1.9.3/node_modules/canvas-confetti/dist/confetti.module.js"),g=require("./components/pointer/Pointer.js"),C=require("./components/sparkles-text/SparklesText.js"),f=require("./components/blur-fade/BlurFade.js"),B=require("./components/video-dialog/VideoDialog.js"),S=require("./components/comic-text/ComicText.js"),k=require("./components/flip-text/FlipText.js");exports.Button=r.Button;exports.TxtReader=o.TxtReader;exports.HyperText=i.HyperText;exports.TypingAnimation=n.TypingAnimation;exports.QRCode=u.QRCode;exports.Confetti=t.Confetti;exports.ConfettiButton=t.ConfettiButton;exports.useStayTimeReport=c.useStayTimeReport;exports.PinchContent=a.default;exports.ImageViewer=s.default;exports.ShimmerButton=d.ShimmerButton;exports.ImageCompare=T.default;exports.TextAnimate=m.TextAnimate;exports.Dock=e.Dock;exports.DockIcon=e.DockIcon;exports.dockVariants=e.dockVariants;exports.TxtEditor=q.TxtEditor;exports.Message=x.Message;exports.ForceGraph3D=l.default;exports.confetti=p.default;exports.Pointer=g.Pointer;exports.SparklesText=C.SparklesText;exports.BlurFade=f.BlurFade;exports.VideoDialog=B.VideoDialog;exports.ComicText=S.ComicText;exports.FlipText=k.FlipText;
@@ -1,10 +1,10 @@
1
1
  type AnimationStyle = "from-bottom" | "from-center" | "from-top" | "from-left" | "from-right" | "fade" | "top-in-bottom-out" | "left-in-right-out";
2
- interface HeroVideoProps {
2
+ interface VideoProps {
3
3
  animationStyle?: AnimationStyle;
4
4
  videoSrc: string;
5
5
  thumbnailSrc: string;
6
6
  thumbnailAlt?: string;
7
7
  className?: string;
8
8
  }
9
- export declare function HeroVideoDialog({ animationStyle, videoSrc, thumbnailSrc, thumbnailAlt, className, }: HeroVideoProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function VideoDialog({ animationStyle, videoSrc, thumbnailSrc, thumbnailAlt, className, }: VideoProps): import("react/jsx-runtime").JSX.Element;
10
10
  export {};
@@ -123,5 +123,5 @@ function k({
123
123
  ] });
124
124
  }
125
125
  export {
126
- k as HeroVideoDialog
126
+ k as VideoDialog
127
127
  };
package/dist/es/index.js CHANGED
@@ -11,15 +11,15 @@ import { default as B } from "./components/image-viewer/ImageViewer.js";
11
11
  import { ShimmerButton as h } from "./components/shimmer-button/ShimmerButton.js";
12
12
  import { default as F } from "./components/image-compare/ImageCompare.js";
13
13
  import { TextAnimate as R } from "./components/text-animate/TextAnimate.js";
14
- import { Dock as V, DockIcon as A, dockVariants as H } from "./components/dock/Duck.js";
15
- import { TxtEditor as w } from "./components/txt-editor/TxtEditor.js";
16
- import { Message as G } from "./components/message/Message.js";
14
+ import { Dock as V, DockIcon as A, dockVariants as P } from "./components/dock/Duck.js";
15
+ import { TxtEditor as E } from "./components/txt-editor/TxtEditor.js";
16
+ import { Message as H } from "./components/message/Message.js";
17
17
  import { default as Q } from "./node_modules/.pnpm/react-force-graph-3d@1.28.0_react@19.1.0/node_modules/react-force-graph-3d/dist/react-force-graph-3d.js";
18
18
  import { default as j } from "./node_modules/.pnpm/canvas-confetti@1.9.3/node_modules/canvas-confetti/dist/confetti.module.js";
19
19
  import { Pointer as v } from "./components/pointer/Pointer.js";
20
20
  import { SparklesText as J } from "./components/sparkles-text/SparklesText.js";
21
21
  import { BlurFade as L } from "./components/blur-fade/BlurFade.js";
22
- import { HeroVideoDialog as O } from "./components/video-dialog/VideoDialog.js";
22
+ import { VideoDialog as O } from "./components/video-dialog/VideoDialog.js";
23
23
  import { ComicText as W } from "./components/comic-text/ComicText.js";
24
24
  import { FlipText as Y } from "./components/flip-text/FlipText.js";
25
25
  export {
@@ -32,21 +32,21 @@ export {
32
32
  A as DockIcon,
33
33
  Y as FlipText,
34
34
  Q as ForceGraph3D,
35
- O as HeroVideoDialog,
36
35
  x as HyperText,
37
36
  F as ImageCompare,
38
37
  B as ImageViewer,
39
- G as Message,
38
+ H as Message,
40
39
  g as PinchContent,
41
40
  v as Pointer,
42
41
  d as QRCode,
43
42
  h as ShimmerButton,
44
43
  J as SparklesText,
45
44
  R as TextAnimate,
46
- w as TxtEditor,
45
+ E as TxtEditor,
47
46
  f as TxtReader,
48
47
  i as TypingAnimation,
48
+ O as VideoDialog,
49
49
  j as confetti,
50
- H as dockVariants,
50
+ P as dockVariants,
51
51
  c as useStayTimeReport
52
52
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xiping/react-components",
3
3
  "private": false,
4
- "version": "1.0.27",
4
+ "version": "1.0.28",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/index.js",
7
7
  "module": "./dist/es/index.js",
@@ -108,5 +108,5 @@
108
108
  "engines": {
109
109
  "node": ">=20"
110
110
  },
111
- "gitHead": "312812f7bc7c0d6458d5dd3b3b1e4ec320f0e020"
111
+ "gitHead": "bca2446e5830d310b32de5338559912450925ee2"
112
112
  }