@pelatform/ui 1.5.2 → 1.5.3

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.
@@ -8,7 +8,7 @@
8
8
  }
9
9
 
10
10
  .pf-image-input-remove {
11
- @apply bg-background border-border end-0.25 top-0.25 absolute z-1 flex size-5 cursor-pointer items-center justify-center rounded-full border shadow-sm;
11
+ @apply bg-background border-border end-px top-px absolute z-1 flex size-5 cursor-pointer items-center justify-center rounded-full border shadow-sm;
12
12
 
13
13
  i {
14
14
  @apply text-muted-foreground text-[11px];
@@ -3,10 +3,13 @@
3
3
 
4
4
 
5
5
 
6
+ var _chunkZBO5IAMAcjs = require('./chunk-ZBO5IAMA.cjs');
7
+
8
+
6
9
  var _chunkCJXIPSTGcjs = require('./chunk-CJXIPSTG.cjs');
7
10
 
8
11
  // src/ui/animation/avatar-group.tsx
9
- var _react = require('react'); var React = _interopRequireWildcard(_react); var React3 = _interopRequireWildcard(_react); var React4 = _interopRequireWildcard(_react); var React6 = _interopRequireWildcard(_react); var React7 = _interopRequireWildcard(_react);
12
+ var _react = require('react'); var React = _interopRequireWildcard(_react); var React3 = _interopRequireWildcard(_react); var React5 = _interopRequireWildcard(_react); var React6 = _interopRequireWildcard(_react);
10
13
 
11
14
 
12
15
 
@@ -665,193 +668,6 @@ function GridBackground({
665
668
  );
666
669
  }
667
670
 
668
- // src/ui/animation/hover-background.tsx
669
-
670
-
671
-
672
- function HoverBackground({
673
- className,
674
- objectCount = 12,
675
- children,
676
- colors = {},
677
- ...props
678
- }) {
679
- const {
680
- background = "bg-gradient-to-br from-slate-900 via-purple-900 to-slate-900",
681
- objects = [
682
- "bg-cyan-400/20",
683
- "bg-purple-400/20",
684
- "bg-fuchsia-400/20",
685
- "bg-violet-400/20",
686
- "bg-blue-400/20",
687
- "bg-indigo-400/20"
688
- ],
689
- glow = "shadow-cyan-400/50"
690
- } = colors;
691
- const [isHovered, setIsHovered] = React4.useState(false);
692
- const mouseX = _react2.useMotionValue.call(void 0, 0);
693
- const mouseY = _react2.useMotionValue.call(void 0, 0);
694
- const springX = _react2.useSpring.call(void 0, mouseX, {
695
- stiffness: 300,
696
- damping: 30,
697
- // Slower return to center when hover ends
698
- restSpeed: 0.1,
699
- restDelta: 0.1
700
- });
701
- const springY = _react2.useSpring.call(void 0, mouseY, {
702
- stiffness: 300,
703
- damping: 30,
704
- restSpeed: 0.1,
705
- restDelta: 0.1
706
- });
707
- const animatedObjects = React4.useMemo(
708
- () => Array.from({ length: objectCount }, (_, i) => {
709
- const shape = Math.random() > 0.5 ? "circle" : "square";
710
- return {
711
- id: i,
712
- x: Math.random() * 90 + 5,
713
- // 5-95% to avoid edges
714
- y: Math.random() * 90 + 5,
715
- size: Math.random() * 60 + 20,
716
- // 20-80px
717
- color: objects[i % objects.length],
718
- delay: Math.random() * 2,
719
- shape,
720
- floatDirection: Math.random() > 0.5 ? 1 : -1,
721
- breathDuration: Math.random() * 3 + 3,
722
- // 3-6 seconds
723
- parallaxStrength: Math.random() * 0.5 + 0.3,
724
- // 0.3-0.8 for more varied parallax depth
725
- baseRotation: Math.random() * 360
726
- // Random starting rotation offset
727
- };
728
- }),
729
- [objectCount, objects]
730
- );
731
- const handleMouseMove = (event) => {
732
- if (!isHovered) return;
733
- const rect = event.currentTarget.getBoundingClientRect();
734
- const centerX = rect.width / 2;
735
- const centerY = rect.height / 2;
736
- const x = (event.clientX - rect.left - centerX) / centerX;
737
- const y = (event.clientY - rect.top - centerY) / centerY;
738
- mouseX.set(x * 15);
739
- mouseY.set(y * 15);
740
- };
741
- const handleHoverStart = () => {
742
- setIsHovered(true);
743
- };
744
- const handleHoverEnd = () => {
745
- setIsHovered(false);
746
- mouseX.set(0);
747
- mouseY.set(0);
748
- };
749
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
750
- _react2.motion.div,
751
- {
752
- "data-slot": "hover-background",
753
- className: _chunkCJXIPSTGcjs.cn.call(void 0, "relative size-full overflow-hidden", background, className),
754
- onHoverStart: handleHoverStart,
755
- onHoverEnd: handleHoverEnd,
756
- onMouseMove: handleMouseMove,
757
- whileHover: { scale: 1.02 },
758
- transition: { duration: 0.3, ease: "easeOut" },
759
- animate: {
760
- backgroundPosition: ["0% 50%", "100% 50%", "0% 50%"]
761
- },
762
- style: {
763
- backgroundSize: "200% 200%"
764
- },
765
- ...props,
766
- children: [
767
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
768
- _react2.motion.div,
769
- {
770
- className: "absolute inset-0 bg-gradient-radial from-white/5 via-transparent to-transparent",
771
- animate: {
772
- opacity: [0.3, 0.6, 0.3],
773
- scale: [1, 1.1, 1]
774
- },
775
- transition: {
776
- duration: 4,
777
- repeat: Infinity,
778
- ease: "easeInOut"
779
- }
780
- }
781
- ),
782
- animatedObjects.map((obj) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
783
- _react2.motion.div,
784
- {
785
- className: _chunkCJXIPSTGcjs.cn.call(void 0,
786
- "absolute border border-white/10 backdrop-blur-sm",
787
- obj.color,
788
- obj.shape === "circle" ? "rounded-full" : "rotate-45 rounded-lg"
789
- ),
790
- style: {
791
- left: `${obj.x}%`,
792
- top: `${obj.y}%`,
793
- width: obj.size,
794
- height: obj.size,
795
- // Apply parallax with individual object strength
796
- x: springX.get() * obj.parallaxStrength,
797
- y: springY.get() * obj.parallaxStrength
798
- },
799
- initial: {
800
- scale: 0.6,
801
- opacity: 0.4,
802
- rotate: obj.baseRotation
803
- },
804
- animate: {
805
- // Default state animations - breathing with base rotation offset
806
- scale: [0.6, 0.8, 0.6],
807
- opacity: [0.4, 0.6, 0.4],
808
- rotate: obj.shape === "circle" ? [obj.baseRotation, obj.baseRotation + 10, obj.baseRotation] : [obj.baseRotation, obj.baseRotation + 5, obj.baseRotation],
809
- y: [0, obj.floatDirection * 15, 0],
810
- x: [0, obj.floatDirection * 8, 0]
811
- },
812
- transition: {
813
- duration: obj.breathDuration,
814
- delay: obj.delay,
815
- ease: "easeInOut",
816
- repeat: Infinity,
817
- repeatType: "reverse"
818
- },
819
- whileHover: {
820
- scale: 1.5,
821
- boxShadow: `0 0 30px ${glow.replace("shadow-", "").replace("/50", "")}`
822
- }
823
- },
824
- obj.id
825
- )),
826
- isHovered && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "pointer-events-none absolute inset-0", children: Array.from({ length: 20 }).map((_, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
827
- _react2.motion.div,
828
- {
829
- className: "absolute h-1 w-1 rounded-full bg-white/60",
830
- style: {
831
- left: `${Math.random() * 100}%`,
832
- top: `${Math.random() * 100}%`
833
- },
834
- initial: { opacity: 0, scale: 0 },
835
- animate: {
836
- opacity: [0, 1, 0],
837
- scale: [0, 1, 0],
838
- y: [0, -50, -100]
839
- },
840
- transition: {
841
- duration: 3,
842
- delay: Math.random() * 2,
843
- repeat: Infinity,
844
- ease: "easeOut"
845
- }
846
- },
847
- `particle-${i}`
848
- )) }),
849
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "relative z-10 size-full", children })
850
- ]
851
- }
852
- );
853
- }
854
-
855
671
  // src/ui/animation/marquee.tsx
856
672
 
857
673
 
@@ -1104,8 +920,8 @@ function SvgText({
1104
920
  }) {
1105
921
  const textRef = _react.useRef.call(void 0, null);
1106
922
  const [textDimensions, setTextDimensions] = _react.useState.call(void 0, { width: 0, height: 0 });
1107
- const content = React6.Children.toArray(children).join("");
1108
- const maskId = React6.useId();
923
+ const content = React5.Children.toArray(children).join("");
924
+ const maskId = React5.useId();
1109
925
  _react.useEffect.call(void 0, () => {
1110
926
  if (!textRef.current) return;
1111
927
  const updateDimensions = () => {
@@ -1681,7 +1497,7 @@ function VideoText({
1681
1497
  };
1682
1498
  }, [fontSize, fontWeight]);
1683
1499
  const sources = Array.isArray(src) ? src : [src];
1684
- const content = React7.Children.toArray(children).join("");
1500
+ const content = React6.Children.toArray(children).join("");
1685
1501
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1686
1502
  Component,
1687
1503
  {
@@ -1933,4 +1749,4 @@ function WordRotate({
1933
1749
 
1934
1750
 
1935
1751
 
1936
- exports.AvatarGroup = AvatarGroup; exports.AvatarGroupItem = AvatarGroupItem; exports.AvatarGroupTooltip = AvatarGroupTooltip; exports.CountingNumber = CountingNumber; exports.GithubButton = GithubButton; exports.GradientBackground = GradientBackground; exports.GridBackground = GridBackground; exports.HoverBackground = HoverBackground; exports.Marquee = Marquee; exports.ShimmeringText = ShimmeringText; exports.SlidingNumber = SlidingNumber; exports.SvgText = SvgText; exports.TextReveal = TextReveal; exports.TypingText = TypingText; exports.VideoText = VideoText; exports.WordRotate = WordRotate; exports.githubButtonVariants = githubButtonVariants;
1752
+ exports.AvatarGroup = AvatarGroup; exports.AvatarGroupItem = AvatarGroupItem; exports.AvatarGroupTooltip = AvatarGroupTooltip; exports.CountingNumber = CountingNumber; exports.GithubButton = GithubButton; exports.GradientBackground = GradientBackground; exports.GridBackground = GridBackground; exports.HoverBackground = _chunkZBO5IAMAcjs.HoverBackground; exports.Marquee = Marquee; exports.ShimmeringText = ShimmeringText; exports.SlidingNumber = SlidingNumber; exports.SvgText = SvgText; exports.TextReveal = TextReveal; exports.TypingText = TypingText; exports.VideoText = VideoText; exports.WordRotate = WordRotate; exports.githubButtonVariants = githubButtonVariants;