pelatform-ui 1.4.3 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -33,7 +33,7 @@ bun add react react-dom
33
33
 
34
34
  ```typescript
35
35
  // React hooks
36
- import { useHydrated, useMobile, useMediaQuery } from "pelatform-ui/hooks";
36
+ import { useHydrated, useIsMobile, useMediaQuery } from "pelatform-ui/hooks";
37
37
 
38
38
  // Animation components
39
39
  import {
@@ -1,4 +1,3 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import * as React from 'react';
3
2
  import React__default, { ComponentPropsWithoutRef, ReactNode, ElementType } from 'react';
4
3
  import { UseInViewOptions, SpringOptions, HTMLMotionProps, Transition, MotionProps } from 'motion/react';
@@ -22,9 +21,9 @@ interface AvatarGroupTooltipProps {
22
21
  children: React.ReactNode;
23
22
  className?: string;
24
23
  }
25
- declare function AvatarGroup({ children, className, tooltipClassName, animation, }: AvatarGroupProps): react_jsx_runtime.JSX.Element;
26
- declare function AvatarGroupItem({ children, className, tooltipClassName, animation: itemAnimation, }: AvatarGroupItemProps): react_jsx_runtime.JSX.Element;
27
- declare function AvatarGroupTooltip({ children, className }: AvatarGroupTooltipProps): react_jsx_runtime.JSX.Element;
24
+ declare function AvatarGroup({ children, className, tooltipClassName, animation, }: AvatarGroupProps): React.JSX.Element;
25
+ declare function AvatarGroupItem({ children, className, tooltipClassName, animation: itemAnimation, }: AvatarGroupItemProps): React.JSX.Element;
26
+ declare function AvatarGroupTooltip({ children, className }: AvatarGroupTooltipProps): React.JSX.Element;
28
27
 
29
28
  interface CountingNumberProps {
30
29
  from?: number;
@@ -38,7 +37,7 @@ interface CountingNumberProps {
38
37
  onComplete?: () => void;
39
38
  format?: (value: number) => string;
40
39
  }
41
- declare function CountingNumber({ from, to, duration, delay, className, startOnView, once, inViewMargin, onComplete, format, ...props }: CountingNumberProps): react_jsx_runtime.JSX.Element;
40
+ declare function CountingNumber({ from, to, duration, delay, className, startOnView, once, inViewMargin, onComplete, format, ...props }: CountingNumberProps): React.JSX.Element;
42
41
 
43
42
  declare const githubButtonVariants: (props?: ({
44
43
  variant?: "default" | "outline" | null | undefined;
@@ -82,12 +81,12 @@ interface GithubButtonProps extends React__default.ComponentProps<"button">, Var
82
81
  /** Spring transition options */
83
82
  transition?: SpringOptions;
84
83
  }
85
- declare function GithubButton({ initialStars, targetStars, starsClass, fixedWidth, animationDuration, animationDelay, autoAnimate, className, variant, size, showGithubIcon, showStarIcon, roundStars, separator, filled, repoUrl, onClick, label, useInViewTrigger, inViewOptions, transition, ...props }: GithubButtonProps): react_jsx_runtime.JSX.Element;
84
+ declare function GithubButton({ initialStars, targetStars, starsClass, fixedWidth, animationDuration, animationDelay, autoAnimate, className, variant, size, showGithubIcon, showStarIcon, roundStars, separator, filled, repoUrl, onClick, label, useInViewTrigger, inViewOptions, transition, ...props }: GithubButtonProps): React__default.JSX.Element;
86
85
 
87
86
  type GradientBackgroundProps = HTMLMotionProps<"div"> & {
88
87
  transition?: Transition;
89
88
  };
90
- declare function GradientBackground({ className, transition, ...props }: GradientBackgroundProps): react_jsx_runtime.JSX.Element;
89
+ declare function GradientBackground({ className, transition, ...props }: GradientBackgroundProps): React.JSX.Element;
91
90
 
92
91
  type GridSize = "4:4" | "5:5" | "6:6" | "6:8" | "8:8" | "8:12" | "10:10" | "12:12" | "12:16" | "16:16";
93
92
  type GridBackgroundProps = HTMLMotionProps<"div"> & {
@@ -107,7 +106,7 @@ type GridBackgroundProps = HTMLMotionProps<"div"> & {
107
106
  speed?: number;
108
107
  };
109
108
  };
110
- declare function GridBackground({ className, children, gridSize, colors, beams, ...props }: GridBackgroundProps): react_jsx_runtime.JSX.Element;
109
+ declare function GridBackground({ className, children, gridSize, colors, beams, ...props }: GridBackgroundProps): React.JSX.Element;
111
110
 
112
111
  type HoverBackgroundProps = HTMLMotionProps<"div"> & {
113
112
  objectCount?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
@@ -118,7 +117,7 @@ type HoverBackgroundProps = HTMLMotionProps<"div"> & {
118
117
  glow?: string;
119
118
  };
120
119
  };
121
- declare function HoverBackground({ className, objectCount, children, colors, ...props }: HoverBackgroundProps): react_jsx_runtime.JSX.Element;
120
+ declare function HoverBackground({ className, objectCount, children, colors, ...props }: HoverBackgroundProps): React.JSX.Element;
122
121
 
123
122
  interface MarqueeProps extends ComponentPropsWithoutRef<"div"> {
124
123
  /**
@@ -166,7 +165,7 @@ interface MarqueeProps extends ComponentPropsWithoutRef<"div"> {
166
165
  */
167
166
  ariaRole?: string;
168
167
  }
169
- declare function Marquee({ className, reverse, pauseOnHover, children, vertical, repeat, ariaLabel, ariaLive, ariaRole, ...props }: MarqueeProps): react_jsx_runtime.JSX.Element;
168
+ declare function Marquee({ className, reverse, pauseOnHover, children, vertical, repeat, ariaLabel, ariaLive, ariaRole, ...props }: MarqueeProps): React__default.JSX.Element;
170
169
 
171
170
  interface ShimmeringTextProps {
172
171
  /** Text to display with shimmer effect */
@@ -194,7 +193,7 @@ interface ShimmeringTextProps {
194
193
  /** Shimmer gradient color */
195
194
  shimmerColor?: string;
196
195
  }
197
- declare function ShimmeringText({ text, duration, delay, repeat, repeatDelay, className, startOnView, once, inViewMargin, spread, color, shimmerColor, }: ShimmeringTextProps): react_jsx_runtime.JSX.Element;
196
+ declare function ShimmeringText({ text, duration, delay, repeat, repeatDelay, className, startOnView, once, inViewMargin, spread, color, shimmerColor, }: ShimmeringTextProps): React__default.JSX.Element;
198
197
 
199
198
  interface SlidingNumberProps {
200
199
  from: number;
@@ -207,7 +206,7 @@ interface SlidingNumberProps {
207
206
  onComplete?: () => void;
208
207
  digitHeight?: number;
209
208
  }
210
- declare function SlidingNumber({ from, to, duration, delay, startOnView, once, className, onComplete, digitHeight, }: SlidingNumberProps): react_jsx_runtime.JSX.Element;
209
+ declare function SlidingNumber({ from, to, duration, delay, startOnView, once, className, onComplete, digitHeight, }: SlidingNumberProps): React.JSX.Element;
211
210
 
212
211
  interface SvgTextProps {
213
212
  /**
@@ -242,7 +241,7 @@ interface SvgTextProps {
242
241
  * SvgText displays content with an SVG background fill effect.
243
242
  * The SVG is masked by the content, creating a dynamic text look.
244
243
  */
245
- declare function SvgText({ svg, children, className, fontSize, fontWeight, as: Component, }: SvgTextProps): react_jsx_runtime.JSX.Element;
244
+ declare function SvgText({ svg, children, className, fontSize, fontWeight, as: Component, }: SvgTextProps): React.JSX.Element;
246
245
 
247
246
  type RevealVariant = "fade" | "slideUp" | "slideDown" | "slideLeft" | "slideRight" | "scale" | "blur" | "typewriter" | "wave" | "stagger" | "rotate" | "elastic";
248
247
  interface TextRevealProps {
@@ -258,7 +257,7 @@ interface TextRevealProps {
258
257
  wordLevel?: boolean;
259
258
  onComplete?: () => void;
260
259
  }
261
- declare function TextReveal({ children, variant, className, style, delay, duration, staggerDelay, once, startOnView, wordLevel, }: TextRevealProps): react_jsx_runtime.JSX.Element;
260
+ declare function TextReveal({ children, variant, className, style, delay, duration, staggerDelay, once, startOnView, wordLevel, }: TextRevealProps): React__default.JSX.Element;
262
261
 
263
262
  type AnimationVariant = "fadeIn" | "blurIn" | "blurInUp" | "blurInDown" | "slideUp" | "slideDown" | "slideLeft" | "slideRight" | "scaleUp" | "scaleDown";
264
263
  interface TypingTextProps extends Omit<MotionProps, "children"> {
@@ -293,7 +292,7 @@ interface TypingTextProps extends Omit<MotionProps, "children"> {
293
292
  /** Margin for in-view detection (rootMargin) */
294
293
  inViewMargin?: UseInViewOptions["margin"];
295
294
  }
296
- declare function TypingText({ text, texts, speed, delay, showCursor, cursorClassName, cursor, loop, pauseDuration, className, onComplete, startOnView, once, inViewMargin, ...props }: TypingTextProps): react_jsx_runtime.JSX.Element;
295
+ declare function TypingText({ text, texts, speed, delay, showCursor, cursorClassName, cursor, loop, pauseDuration, className, onComplete, startOnView, once, inViewMargin, ...props }: TypingTextProps): React.JSX.Element;
297
296
 
298
297
  interface VideoTextProps {
299
298
  /**
@@ -360,7 +359,7 @@ interface VideoTextProps {
360
359
  * VideoText displays content with a background video fill effect.
361
360
  * The video is masked by the content, creating a dynamic animated text look.
362
361
  */
363
- declare function VideoText({ src, children, className, autoPlay, muted, loop, preload, fontSize, fontWeight, as: Component, onPlay, onPause, onEnded, }: VideoTextProps): react_jsx_runtime.JSX.Element;
362
+ declare function VideoText({ src, children, className, autoPlay, muted, loop, preload, fontSize, fontWeight, as: Component, onPlay, onPause, onEnded, }: VideoTextProps): React.JSX.Element;
364
363
 
365
364
  interface WordRotateProps extends Omit<MotionProps, "children"> {
366
365
  words: string[];
@@ -374,6 +373,6 @@ interface WordRotateProps extends Omit<MotionProps, "children"> {
374
373
  once?: boolean;
375
374
  inViewMargin?: UseInViewOptions["margin"];
376
375
  }
377
- declare function WordRotate({ words, duration, animationStyle, loop, className, containerClassName, pauseDuration, startOnView, once, inViewMargin, ...props }: WordRotateProps): react_jsx_runtime.JSX.Element;
376
+ declare function WordRotate({ words, duration, animationStyle, loop, className, containerClassName, pauseDuration, startOnView, once, inViewMargin, ...props }: WordRotateProps): React.JSX.Element;
378
377
 
379
378
  export { AvatarGroup, AvatarGroupItem, AvatarGroupTooltip, CountingNumber, GithubButton, type GithubButtonProps, GradientBackground, type GradientBackgroundProps, GridBackground, type GridBackgroundProps, HoverBackground, type HoverBackgroundProps, Marquee, ShimmeringText, SlidingNumber, SvgText, type SvgTextProps, TextReveal, TypingText, VideoText, type VideoTextProps, WordRotate, githubButtonVariants };
package/dist/animation.js CHANGED
@@ -388,10 +388,11 @@ function GithubButton({
388
388
  document.body.appendChild(link);
389
389
  link.click();
390
390
  document.body.removeChild(link);
391
- } catch {
391
+ } catch (_error) {
392
392
  try {
393
393
  window.open(repoUrl, "_blank", "noopener,noreferrer");
394
- } catch {
394
+ } catch (windowError) {
395
+ console.error("Failed to navigate to repo URL via all methods:", windowError);
395
396
  window.location.href = repoUrl;
396
397
  }
397
398
  }
@@ -1,4 +1,3 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import * as class_variance_authority_types from 'class-variance-authority/types';
3
2
  import * as React from 'react';
4
3
  import { VariantProps } from 'class-variance-authority';
@@ -11,6 +10,6 @@ declare const badgeVariants: (props?: ({
11
10
  interface BadgeProps extends React.ComponentProps<"span">, VariantProps<typeof badgeVariants> {
12
11
  asChild?: boolean;
13
12
  }
14
- declare function Badge({ className, variant, size, radius, asChild, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
13
+ declare function Badge({ className, variant, size, radius, asChild, ...props }: BadgeProps): React.JSX.Element;
15
14
 
16
15
  export { Badge as B, type BadgeProps as a, badgeVariants as b };