@xiping/react-components 1.0.26 → 1.0.27
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/components/comic-text/ComicText.d.ts +9 -0
- package/dist/cjs/components/comic-text/ComicText.js +4 -0
- package/dist/cjs/components/comic-text/index.d.ts +1 -0
- package/dist/cjs/components/flip-text/FlipText.d.ts +20 -0
- package/dist/cjs/components/flip-text/FlipText.js +1 -0
- package/dist/cjs/components/flip-text/index.d.ts +1 -0
- package/dist/cjs/components/video-dialog/VideoDialog.d.ts +10 -0
- package/dist/cjs/components/video-dialog/VideoDialog.js +1 -0
- package/dist/cjs/components/video-dialog/index.d.ts +1 -0
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/Icon.js +6 -0
- package/dist/cjs/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/createLucideIcon.js +6 -0
- package/dist/cjs/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/defaultAttributes.js +6 -0
- package/dist/cjs/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/play.js +6 -0
- package/dist/cjs/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/x.js +6 -0
- package/dist/cjs/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/shared/src/utils.js +6 -0
- package/dist/cjs/react-components.css +1 -1
- package/dist/es/components/comic-text/ComicText.d.ts +9 -0
- package/dist/es/components/comic-text/ComicText.js +51 -0
- package/dist/es/components/comic-text/index.d.ts +1 -0
- package/dist/es/components/flip-text/FlipText.d.ts +20 -0
- package/dist/es/components/flip-text/FlipText.js +37 -0
- package/dist/es/components/flip-text/index.d.ts +1 -0
- package/dist/es/components/video-dialog/VideoDialog.d.ts +10 -0
- package/dist/es/components/video-dialog/VideoDialog.js +127 -0
- package/dist/es/components/video-dialog/index.d.ts +1 -0
- package/dist/es/index.d.ts +3 -0
- package/dist/es/index.js +26 -20
- package/dist/es/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/Icon.js +41 -0
- package/dist/es/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/createLucideIcon.js +27 -0
- package/dist/es/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/defaultAttributes.js +20 -0
- package/dist/es/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/play.js +12 -0
- package/dist/es/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/x.js +15 -0
- package/dist/es/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/shared/src/utils.js +24 -0
- package/dist/es/react-components.css +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
type ComicTextProps = {
|
|
3
|
+
children: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: CSSProperties;
|
|
6
|
+
fontSize?: number;
|
|
7
|
+
};
|
|
8
|
+
export declare function ComicText({ children, className, style, fontSize, }: ComicTextProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),i=require("../../utils/utils.js"),s=require("motion/react");function c({children:t,className:o,style:n,fontSize:e=5}){if(typeof t!="string")throw new Error("children must be a string");const r="#EF4444";return a.jsx(s.motion.div,{className:i.cn("select-none text-center",o),style:{fontSize:`${e}rem`,fontFamily:"'Bangers', 'Comic Sans MS', 'Impact', sans-serif",fontWeight:"900",WebkitTextStroke:`${e*.35}px #000000`,transform:"skewX(-10deg)",textTransform:"uppercase",filter:`
|
|
2
|
+
drop-shadow(5px 5px 0px #000000)
|
|
3
|
+
drop-shadow(3px 3px 0px ${r})
|
|
4
|
+
`,backgroundColor:"#FACC15",backgroundImage:`radial-gradient(circle at 1px 1px, ${r} 1px, transparent 0)`,backgroundSize:"8px 8px",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",...n},initial:{opacity:0,scale:.8,rotate:-2},animate:{opacity:1,scale:1,rotate:0},transition:{duration:.6,ease:[.175,.885,.32,1.275],type:"spring"},children:t})}exports.ComicText=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ComicText';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Variants, MotionProps } from 'motion/react';
|
|
2
|
+
import { ElementType, default as React } from 'react';
|
|
3
|
+
interface FlipTextProps extends MotionProps {
|
|
4
|
+
/** The duration of the animation */
|
|
5
|
+
duration?: number;
|
|
6
|
+
/** The delay between each character */
|
|
7
|
+
delayMultiple?: number;
|
|
8
|
+
/** The variants of the animation */
|
|
9
|
+
framerProps?: Variants;
|
|
10
|
+
/** The class name of the component */
|
|
11
|
+
className?: string;
|
|
12
|
+
/** The element type of the component */
|
|
13
|
+
as?: ElementType;
|
|
14
|
+
/** The children of the component */
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
/** The variants of the animation */
|
|
17
|
+
variants?: Variants;
|
|
18
|
+
}
|
|
19
|
+
export declare function FlipText({ children, duration, delayMultiple, className, as: Component, variants, ...props }: FlipTextProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("motion/react"),p=require("../../utils/utils.js"),h=require("react"),x={hidden:{rotateX:-90,opacity:0},visible:{rotateX:0,opacity:1}};function j({children:n,duration:r=.5,delayMultiple:a=.08,className:s,as:o="span",variants:c,...l}){const d=i.motion.create(o),u=h.Children.toArray(n).join("").split("");return e.jsx("div",{className:"flex justify-center space-x-2",children:e.jsx(i.AnimatePresence,{mode:"wait",children:u.map((m,t)=>e.jsx(d,{initial:"hidden",animate:"visible",exit:"hidden",variants:c||x,transition:{duration:r,delay:t*a},className:p.cn("origin-center drop-shadow-sm",s),...l,children:m},t))})})}exports.FlipText=j;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FlipText';
|
|
@@ -0,0 +1,10 @@
|
|
|
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 {
|
|
3
|
+
animationStyle?: AnimationStyle;
|
|
4
|
+
videoSrc: string;
|
|
5
|
+
thumbnailSrc: string;
|
|
6
|
+
thumbnailAlt?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function HeroVideoDialog({ animationStyle, videoSrc, thumbnailSrc, thumbnailAlt, className, }: HeroVideoProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './VideoDialog';
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -17,3 +17,6 @@ export * from './hooks/useStayTimeReport';
|
|
|
17
17
|
export * from './components/pointer';
|
|
18
18
|
export * from './components/sparkles-text';
|
|
19
19
|
export * from './components/blur-fade';
|
|
20
|
+
export * from './components/video-dialog';
|
|
21
|
+
export * from './components/comic-text';
|
|
22
|
+
export * from './components/flip-text';
|
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"),
|
|
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;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react"),f=require("./defaultAttributes.js"),s=require("./shared/src/utils.js");/**
|
|
2
|
+
* @license lucide-react v0.525.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const b=r.forwardRef(({color:o="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:c="",children:e,iconNode:i,...u},d)=>r.createElement("svg",{ref:d,...f.default,width:t,height:t,stroke:o,strokeWidth:l?Number(a)*24/Number(t):a,className:s.mergeClasses("lucide",c),...!e&&!s.hasA11yProp(u)&&{"aria-hidden":"true"},...u},[...i.map(([m,n])=>r.createElement(m,n)),...Array.isArray(e)?e:[e]]));exports.default=b;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react"),e=require("./shared/src/utils.js"),u=require("./Icon.js");/**
|
|
2
|
+
* @license lucide-react v0.525.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const n=(t,r)=>{const s=a.forwardRef(({className:c,...l},o)=>a.createElement(u.default,{ref:o,iconNode:r,className:e.mergeClasses(`lucide-${e.toKebabCase(e.toPascalCase(t))}`,`lucide-${t}`,c),...l}));return s.displayName=e.toPascalCase(t),s};exports.default=n;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});/**
|
|
2
|
+
* @license lucide-react v0.525.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/var e={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};exports.default=e;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../createLucideIcon.js");/**
|
|
2
|
+
* @license lucide-react v0.525.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const e=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],t=o.default("play",e);exports.__iconNode=e;exports.default=t;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../createLucideIcon.js");/**
|
|
2
|
+
* @license lucide-react v0.525.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const e=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],o=t.default("x",e);exports.__iconNode=e;exports.default=o;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/**
|
|
2
|
+
* @license lucide-react v0.525.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const s=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),r=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,o,a)=>a?a.toUpperCase():o.toLowerCase()),n=t=>{const e=r(t);return e.charAt(0).toUpperCase()+e.slice(1)},c=(...t)=>t.filter((e,o,a)=>!!e&&e.trim()!==""&&a.indexOf(e)===o).join(" ").trim(),l=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};exports.hasA11yProp=l;exports.mergeClasses=c;exports.toCamelCase=r;exports.toKebabCase=s;exports.toPascalCase=n;
|