@wow-two-beta/ui 0.0.22 → 0.0.24

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.
Files changed (86) hide show
  1. package/dist/{chunk-XAJKBU6P.js → chunk-6RFXTWLM.js} +18 -4
  2. package/dist/chunk-6RFXTWLM.js.map +1 -0
  3. package/dist/{chunk-5KVTU5TX.js → chunk-I4WUBNR6.js} +1616 -6
  4. package/dist/chunk-I4WUBNR6.js.map +1 -0
  5. package/dist/{chunk-6UJX6YAP.js → chunk-TK3SXTTF.js} +514 -17
  6. package/dist/chunk-TK3SXTTF.js.map +1 -0
  7. package/dist/display/animatedNumber/AnimatedNumber.d.ts +14 -0
  8. package/dist/display/animatedNumber/AnimatedNumber.d.ts.map +1 -0
  9. package/dist/display/animatedNumber/index.d.ts +2 -0
  10. package/dist/display/animatedNumber/index.d.ts.map +1 -0
  11. package/dist/display/confetti/Confetti.d.ts +31 -0
  12. package/dist/display/confetti/Confetti.d.ts.map +1 -0
  13. package/dist/display/confetti/index.d.ts +2 -0
  14. package/dist/display/confetti/index.d.ts.map +1 -0
  15. package/dist/display/countUp/CountUp.d.ts +17 -0
  16. package/dist/display/countUp/CountUp.d.ts.map +1 -0
  17. package/dist/display/countUp/index.d.ts +2 -0
  18. package/dist/display/countUp/index.d.ts.map +1 -0
  19. package/dist/display/gradientText/GradientText.d.ts +18 -0
  20. package/dist/display/gradientText/GradientText.d.ts.map +1 -0
  21. package/dist/display/gradientText/index.d.ts +2 -0
  22. package/dist/display/gradientText/index.d.ts.map +1 -0
  23. package/dist/display/index.d.ts +8 -0
  24. package/dist/display/index.d.ts.map +1 -1
  25. package/dist/display/index.js +2 -2
  26. package/dist/display/marquee/Marquee.d.ts +16 -0
  27. package/dist/display/marquee/Marquee.d.ts.map +1 -0
  28. package/dist/display/marquee/index.d.ts +2 -0
  29. package/dist/display/marquee/index.d.ts.map +1 -0
  30. package/dist/display/scrollReveal/ScrollReveal.d.ts +18 -0
  31. package/dist/display/scrollReveal/ScrollReveal.d.ts.map +1 -0
  32. package/dist/display/scrollReveal/index.d.ts +2 -0
  33. package/dist/display/scrollReveal/index.d.ts.map +1 -0
  34. package/dist/display/tilt/Tilt.d.ts +15 -0
  35. package/dist/display/tilt/Tilt.d.ts.map +1 -0
  36. package/dist/display/tilt/index.d.ts +2 -0
  37. package/dist/display/tilt/index.d.ts.map +1 -0
  38. package/dist/display/typewriter/Typewriter.d.ts +18 -0
  39. package/dist/display/typewriter/Typewriter.d.ts.map +1 -0
  40. package/dist/display/typewriter/index.d.ts +2 -0
  41. package/dist/display/typewriter/index.d.ts.map +1 -0
  42. package/dist/forms/addressForm/AddressForm.d.ts +38 -0
  43. package/dist/forms/addressForm/AddressForm.d.ts.map +1 -0
  44. package/dist/forms/addressForm/index.d.ts +2 -0
  45. package/dist/forms/addressForm/index.d.ts.map +1 -0
  46. package/dist/forms/cronInput/CronInput.d.ts +16 -0
  47. package/dist/forms/cronInput/CronInput.d.ts.map +1 -0
  48. package/dist/forms/cronInput/index.d.ts +2 -0
  49. package/dist/forms/cronInput/index.d.ts.map +1 -0
  50. package/dist/forms/emojiPicker/EmojiPicker.d.ts +27 -0
  51. package/dist/forms/emojiPicker/EmojiPicker.d.ts.map +1 -0
  52. package/dist/forms/emojiPicker/index.d.ts +2 -0
  53. package/dist/forms/emojiPicker/index.d.ts.map +1 -0
  54. package/dist/forms/fontPicker/FontPicker.d.ts +23 -0
  55. package/dist/forms/fontPicker/FontPicker.d.ts.map +1 -0
  56. package/dist/forms/fontPicker/index.d.ts +2 -0
  57. package/dist/forms/fontPicker/index.d.ts.map +1 -0
  58. package/dist/forms/gradientPicker/GradientPicker.d.ts +25 -0
  59. package/dist/forms/gradientPicker/GradientPicker.d.ts.map +1 -0
  60. package/dist/forms/gradientPicker/index.d.ts +2 -0
  61. package/dist/forms/gradientPicker/index.d.ts.map +1 -0
  62. package/dist/forms/iconPicker/IconPicker.d.ts +21 -0
  63. package/dist/forms/iconPicker/IconPicker.d.ts.map +1 -0
  64. package/dist/forms/iconPicker/index.d.ts +2 -0
  65. package/dist/forms/iconPicker/index.d.ts.map +1 -0
  66. package/dist/forms/index.d.ts +9 -0
  67. package/dist/forms/index.d.ts.map +1 -1
  68. package/dist/forms/index.js +2 -2
  69. package/dist/forms/keyboardShortcutPicker/KeyboardShortcutPicker.d.ts +17 -0
  70. package/dist/forms/keyboardShortcutPicker/KeyboardShortcutPicker.d.ts.map +1 -0
  71. package/dist/forms/keyboardShortcutPicker/index.d.ts +2 -0
  72. package/dist/forms/keyboardShortcutPicker/index.d.ts.map +1 -0
  73. package/dist/forms/knob/Knob.d.ts +25 -0
  74. package/dist/forms/knob/Knob.d.ts.map +1 -0
  75. package/dist/forms/knob/index.d.ts +2 -0
  76. package/dist/forms/knob/index.d.ts.map +1 -0
  77. package/dist/forms/phoneInput/PhoneInput.d.ts +26 -0
  78. package/dist/forms/phoneInput/PhoneInput.d.ts.map +1 -0
  79. package/dist/forms/phoneInput/index.d.ts +2 -0
  80. package/dist/forms/phoneInput/index.d.ts.map +1 -0
  81. package/dist/index.css +24 -0
  82. package/dist/index.js +3 -3
  83. package/package.json +1 -1
  84. package/dist/chunk-5KVTU5TX.js.map +0 -1
  85. package/dist/chunk-6UJX6YAP.js.map +0 -1
  86. package/dist/chunk-XAJKBU6P.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { addDays, MONTHS_LONG, startOfDay, buildMonthGrid, WEEKDAYS_SHORT, isToday, addMonths, isSameDay } from './chunk-XAJKBU6P.js';
1
+ import { Kbd, addDays, MONTHS_LONG, startOfDay, buildMonthGrid, WEEKDAYS_SHORT, isToday, addMonths, isSameDay } from './chunk-6RFXTWLM.js';
2
2
  import { tv, dataAttr } from './chunk-BMBIZLO4.js';
3
3
  import { useClipboard, useControlled } from './chunk-4P2TFUVW.js';
4
4
  import { Icon } from './chunk-TDX22OWF.js';
@@ -126,19 +126,6 @@ var Code = forwardRef(
126
126
  ({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx("code", { ref, className: cn(codeVariants({ variant }), className), ...props })
127
127
  );
128
128
  Code.displayName = "Code";
129
- var Kbd = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
130
- "kbd",
131
- {
132
- ref,
133
- className: cn(
134
- "inline-flex h-5 min-w-5 items-center justify-center rounded-sm border border-border",
135
- "bg-muted px-1.5 font-mono text-xs text-muted-foreground shadow-[inset_0_-1px_0_0_rgb(0_0_0/0.05)]",
136
- className
137
- ),
138
- ...props
139
- }
140
- ));
141
- Kbd.displayName = "Kbd";
142
129
  var Image = forwardRef(
143
130
  ({ fallback, onError, alt = "", className, ...props }, ref) => {
144
131
  const [errored, setErrored] = useState(false);
@@ -4398,7 +4385,517 @@ function AgendaView({ date, events, onEventClick }) {
4398
4385
  ] }, key);
4399
4386
  }) });
4400
4387
  }
4388
+ var DIR_TO_DEG = {
4389
+ r: 90,
4390
+ l: 270,
4391
+ t: 0,
4392
+ b: 180,
4393
+ tr: 45,
4394
+ br: 135,
4395
+ bl: 225,
4396
+ tl: 315
4397
+ };
4398
+ var GradientText = forwardRef(
4399
+ function GradientText2({
4400
+ from = "var(--color-primary)",
4401
+ via,
4402
+ to = "var(--color-accent, var(--color-primary))",
4403
+ direction = "r",
4404
+ animated,
4405
+ as = "span",
4406
+ className,
4407
+ style,
4408
+ children,
4409
+ ...rest
4410
+ }, ref) {
4411
+ const stops = via ? `${from}, ${via}, ${to}` : `${from}, ${to}`;
4412
+ const Tag = as;
4413
+ return /* @__PURE__ */ jsx(
4414
+ Tag,
4415
+ {
4416
+ ref,
4417
+ className: cn(
4418
+ "inline-block bg-clip-text text-transparent",
4419
+ animated && "motion-safe:animate-[gradient-shift_4s_ease-in-out_infinite]",
4420
+ className
4421
+ ),
4422
+ style: {
4423
+ backgroundImage: `linear-gradient(${DIR_TO_DEG[direction]}deg, ${stops})`,
4424
+ backgroundSize: animated ? "200% 100%" : void 0,
4425
+ ...style
4426
+ },
4427
+ ...rest,
4428
+ children
4429
+ }
4430
+ );
4431
+ }
4432
+ );
4433
+ var easeOutCubic = (t) => 1 - Math.pow(1 - t, 3);
4434
+ var defaultFormat = (v) => v.toFixed(0);
4435
+ function prefersReducedMotion() {
4436
+ if (typeof window === "undefined") return false;
4437
+ return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false;
4438
+ }
4439
+ var CountUp = forwardRef(function CountUp2({
4440
+ to,
4441
+ from = 0,
4442
+ duration = 1500,
4443
+ easing = easeOutCubic,
4444
+ format = defaultFormat,
4445
+ triggerOnView = false,
4446
+ as = "span",
4447
+ className,
4448
+ ...rest
4449
+ }, ref) {
4450
+ const [value, setValue] = useState(triggerOnView ? from : to);
4451
+ const elRef = useRef(null);
4452
+ const startedRef = useRef(false);
4453
+ useEffect(() => {
4454
+ if (prefersReducedMotion()) {
4455
+ setValue(to);
4456
+ return;
4457
+ }
4458
+ if (triggerOnView && typeof IntersectionObserver !== "undefined" && elRef.current) {
4459
+ const obs = new IntersectionObserver(
4460
+ (entries) => {
4461
+ for (const entry of entries) {
4462
+ if (entry.isIntersecting && !startedRef.current) {
4463
+ startedRef.current = true;
4464
+ animate();
4465
+ }
4466
+ }
4467
+ },
4468
+ { threshold: 0.2 }
4469
+ );
4470
+ obs.observe(elRef.current);
4471
+ return () => obs.disconnect();
4472
+ }
4473
+ animate();
4474
+ function animate() {
4475
+ const start = performance.now();
4476
+ let raf = 0;
4477
+ const tick = (now) => {
4478
+ const t = Math.min(1, (now - start) / duration);
4479
+ const eased = easing(t);
4480
+ setValue(from + (to - from) * eased);
4481
+ if (t < 1) raf = requestAnimationFrame(tick);
4482
+ };
4483
+ raf = requestAnimationFrame(tick);
4484
+ return () => cancelAnimationFrame(raf);
4485
+ }
4486
+ }, [to, from, duration, easing, triggerOnView]);
4487
+ const Tag = as;
4488
+ return /* @__PURE__ */ jsx(
4489
+ Tag,
4490
+ {
4491
+ ref: (el) => {
4492
+ elRef.current = el;
4493
+ if (typeof ref === "function") ref(el);
4494
+ else if (ref) ref.current = el;
4495
+ },
4496
+ className: cn("tabular-nums", className),
4497
+ ...rest,
4498
+ children: format(value)
4499
+ }
4500
+ );
4501
+ });
4502
+ var easeOutCubic2 = (t) => 1 - Math.pow(1 - t, 3);
4503
+ var defaultFormat2 = (v) => v.toFixed(0);
4504
+ function prefersReducedMotion2() {
4505
+ if (typeof window === "undefined") return false;
4506
+ return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false;
4507
+ }
4508
+ var AnimatedNumber = forwardRef(
4509
+ function AnimatedNumber2({
4510
+ value,
4511
+ duration = 500,
4512
+ easing = easeOutCubic2,
4513
+ format = defaultFormat2,
4514
+ as = "span",
4515
+ className,
4516
+ ...rest
4517
+ }, ref) {
4518
+ const [display, setDisplay] = useState(value);
4519
+ const fromRef = useRef(value);
4520
+ useEffect(() => {
4521
+ if (prefersReducedMotion2()) {
4522
+ setDisplay(value);
4523
+ fromRef.current = value;
4524
+ return;
4525
+ }
4526
+ const from = fromRef.current;
4527
+ const to = value;
4528
+ if (from === to) return;
4529
+ const start = performance.now();
4530
+ let raf = 0;
4531
+ const tick = (now) => {
4532
+ const t = Math.min(1, (now - start) / duration);
4533
+ const eased = easing(t);
4534
+ const next = from + (to - from) * eased;
4535
+ setDisplay(next);
4536
+ if (t < 1) raf = requestAnimationFrame(tick);
4537
+ else fromRef.current = to;
4538
+ };
4539
+ raf = requestAnimationFrame(tick);
4540
+ return () => cancelAnimationFrame(raf);
4541
+ }, [value, duration, easing]);
4542
+ const Tag = as;
4543
+ return /* @__PURE__ */ jsx(
4544
+ Tag,
4545
+ {
4546
+ ref,
4547
+ className: cn("tabular-nums", className),
4548
+ ...rest,
4549
+ children: format(display)
4550
+ }
4551
+ );
4552
+ }
4553
+ );
4554
+ var HIDDEN_TRANSFORMS = {
4555
+ fade: "",
4556
+ "slide-up": "translateY(20px)",
4557
+ "slide-down": "translateY(-20px)",
4558
+ "slide-left": "translateX(20px)",
4559
+ "slide-right": "translateX(-20px)",
4560
+ zoom: "scale(0.95)"
4561
+ };
4562
+ var ScrollReveal = forwardRef(
4563
+ function ScrollReveal2({
4564
+ effect = "fade",
4565
+ duration = 600,
4566
+ delay = 0,
4567
+ threshold = 0.1,
4568
+ once = true,
4569
+ as = "div",
4570
+ className,
4571
+ style,
4572
+ children,
4573
+ ...rest
4574
+ }, ref) {
4575
+ const [revealed, setRevealed] = useState(false);
4576
+ const elRef = useRef(null);
4577
+ const reduced = typeof window !== "undefined" && (window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false);
4578
+ useEffect(() => {
4579
+ if (reduced) {
4580
+ setRevealed(true);
4581
+ return;
4582
+ }
4583
+ const el = elRef.current;
4584
+ if (!el || typeof IntersectionObserver === "undefined") {
4585
+ setRevealed(true);
4586
+ return;
4587
+ }
4588
+ const obs = new IntersectionObserver(
4589
+ (entries) => {
4590
+ for (const entry of entries) {
4591
+ if (entry.isIntersecting) {
4592
+ setRevealed(true);
4593
+ if (once) obs.disconnect();
4594
+ } else if (!once) {
4595
+ setRevealed(false);
4596
+ }
4597
+ }
4598
+ },
4599
+ { threshold }
4600
+ );
4601
+ obs.observe(el);
4602
+ return () => obs.disconnect();
4603
+ }, [reduced, threshold, once]);
4604
+ const Tag = as;
4605
+ return /* @__PURE__ */ jsx(
4606
+ Tag,
4607
+ {
4608
+ ref: (el) => {
4609
+ elRef.current = el;
4610
+ if (typeof ref === "function") ref(el);
4611
+ else if (ref) ref.current = el;
4612
+ },
4613
+ "data-revealed": revealed || void 0,
4614
+ className: cn(className),
4615
+ style: {
4616
+ opacity: revealed || reduced ? 1 : 0,
4617
+ transform: revealed || reduced ? "none" : HIDDEN_TRANSFORMS[effect],
4618
+ transition: reduced ? void 0 : `opacity ${duration}ms ease-out ${delay}ms, transform ${duration}ms ease-out ${delay}ms`,
4619
+ ...style
4620
+ },
4621
+ ...rest,
4622
+ children
4623
+ }
4624
+ );
4625
+ }
4626
+ );
4627
+ var Tilt = forwardRef(function Tilt2({
4628
+ maxAngle = 12,
4629
+ perspective = 800,
4630
+ glare,
4631
+ scale = 1,
4632
+ as = "div",
4633
+ className,
4634
+ style,
4635
+ children,
4636
+ onPointerMove,
4637
+ onPointerLeave,
4638
+ ...rest
4639
+ }, ref) {
4640
+ const elRef = useRef(null);
4641
+ const [tilt, setTilt] = useState({
4642
+ rotateX: 0,
4643
+ rotateY: 0,
4644
+ glareX: 50,
4645
+ glareY: 50,
4646
+ active: false
4647
+ });
4648
+ const reduced = typeof window !== "undefined" && (window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false);
4649
+ const handleMove = (e) => {
4650
+ onPointerMove?.(e);
4651
+ if (reduced) return;
4652
+ const el = elRef.current;
4653
+ if (!el) return;
4654
+ const rect = el.getBoundingClientRect();
4655
+ const x = (e.clientX - rect.left) / rect.width;
4656
+ const y = (e.clientY - rect.top) / rect.height;
4657
+ const rotateY = (x - 0.5) * 2 * maxAngle;
4658
+ const rotateX = (0.5 - y) * 2 * maxAngle;
4659
+ setTilt({ rotateX, rotateY, glareX: x * 100, glareY: y * 100, active: true });
4660
+ };
4661
+ const handleLeave = (e) => {
4662
+ onPointerLeave?.(e);
4663
+ setTilt({ rotateX: 0, rotateY: 0, glareX: 50, glareY: 50, active: false });
4664
+ };
4665
+ const Tag = as;
4666
+ return /* @__PURE__ */ jsxs(
4667
+ Tag,
4668
+ {
4669
+ ref: (el) => {
4670
+ elRef.current = el;
4671
+ if (typeof ref === "function") ref(el);
4672
+ else if (ref) ref.current = el;
4673
+ },
4674
+ onPointerMove: handleMove,
4675
+ onPointerLeave: handleLeave,
4676
+ className: cn("relative", className),
4677
+ style: {
4678
+ perspective,
4679
+ transform: tilt.active && !reduced ? `rotateX(${tilt.rotateX}deg) rotateY(${tilt.rotateY}deg) scale(${scale})` : "rotateX(0) rotateY(0) scale(1)",
4680
+ transition: tilt.active ? "transform 80ms ease-out" : "transform 220ms ease-out",
4681
+ transformStyle: "preserve-3d",
4682
+ ...style
4683
+ },
4684
+ ...rest,
4685
+ children: [
4686
+ children,
4687
+ glare && !reduced && tilt.active && /* @__PURE__ */ jsx(
4688
+ "span",
4689
+ {
4690
+ "aria-hidden": "true",
4691
+ className: "pointer-events-none absolute inset-0 rounded-[inherit] mix-blend-overlay",
4692
+ style: {
4693
+ background: `radial-gradient(circle at ${tilt.glareX}% ${tilt.glareY}%, rgba(255,255,255,0.35) 0%, transparent 50%)`
4694
+ }
4695
+ }
4696
+ )
4697
+ ]
4698
+ }
4699
+ );
4700
+ });
4701
+ var Marquee = forwardRef(function Marquee2({ direction = "left", speed = 30, pauseOnHover = true, gap = 48, className, children, ...rest }, ref) {
4702
+ const horizontal = direction === "left" || direction === "right";
4703
+ const reverse = direction === "right" || direction === "down";
4704
+ const animationName = horizontal ? "marquee-x" : "marquee-y";
4705
+ return /* @__PURE__ */ jsx(
4706
+ "div",
4707
+ {
4708
+ ref,
4709
+ role: "marquee",
4710
+ "data-direction": direction,
4711
+ className: cn(
4712
+ "group/marquee relative overflow-hidden",
4713
+ horizontal ? "flex" : "flex flex-col",
4714
+ className
4715
+ ),
4716
+ style: { "--marquee-gap": `${gap}px` },
4717
+ ...rest,
4718
+ children: [0, 1].map((i) => /* @__PURE__ */ jsx(
4719
+ "div",
4720
+ {
4721
+ "aria-hidden": i === 1,
4722
+ className: cn(
4723
+ "shrink-0 motion-safe:animate-(--marquee-anim) motion-reduce:animation-none",
4724
+ horizontal ? "flex shrink-0 items-center" : "flex flex-col items-center",
4725
+ pauseOnHover && "group-hover/marquee:[animation-play-state:paused]"
4726
+ ),
4727
+ style: {
4728
+ gap,
4729
+ paddingInline: horizontal ? gap / 2 : 0,
4730
+ paddingBlock: horizontal ? 0 : gap / 2,
4731
+ animation: `${animationName} ${speed}s linear infinite ${reverse ? "reverse" : "normal"}`
4732
+ },
4733
+ children
4734
+ },
4735
+ i
4736
+ ))
4737
+ }
4738
+ );
4739
+ });
4740
+ var Typewriter = forwardRef(function Typewriter2({
4741
+ text,
4742
+ typeSpeed = 60,
4743
+ deleteSpeed = 40,
4744
+ pauseBetween = 1500,
4745
+ loop,
4746
+ cursor = true,
4747
+ cursorChar = "\u2502",
4748
+ as = "span",
4749
+ className,
4750
+ ...rest
4751
+ }, ref) {
4752
+ const phrases = useMemo(() => Array.isArray(text) ? text : [text], [text]);
4753
+ const shouldLoop = loop ?? phrases.length > 1;
4754
+ const reduced = typeof window !== "undefined" && (window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false);
4755
+ const [phraseIndex, setPhraseIndex] = useState(0);
4756
+ const [charIndex, setCharIndex] = useState(0);
4757
+ const [deleting, setDeleting] = useState(false);
4758
+ useEffect(() => {
4759
+ if (reduced) return;
4760
+ const current = phrases[phraseIndex] ?? "";
4761
+ let timeout;
4762
+ if (!deleting) {
4763
+ if (charIndex < current.length) {
4764
+ timeout = window.setTimeout(() => setCharIndex(charIndex + 1), typeSpeed);
4765
+ } else {
4766
+ if (phrases.length === 1 && !shouldLoop) return;
4767
+ timeout = window.setTimeout(() => setDeleting(true), pauseBetween);
4768
+ }
4769
+ } else {
4770
+ if (charIndex > 0) {
4771
+ timeout = window.setTimeout(() => setCharIndex(charIndex - 1), deleteSpeed);
4772
+ } else {
4773
+ const nextIdx = (phraseIndex + 1) % phrases.length;
4774
+ if (!shouldLoop && nextIdx === 0) return;
4775
+ setDeleting(false);
4776
+ setPhraseIndex(nextIdx);
4777
+ }
4778
+ }
4779
+ return () => window.clearTimeout(timeout);
4780
+ }, [charIndex, deleting, phraseIndex, phrases, typeSpeed, deleteSpeed, pauseBetween, shouldLoop, reduced]);
4781
+ const fullText = reduced ? Array.isArray(text) ? text[0] ?? "" : text : (phrases[phraseIndex] ?? "").slice(0, charIndex);
4782
+ const Tag = as;
4783
+ return /* @__PURE__ */ jsxs(Tag, { ref, className: cn("inline-block", className), ...rest, children: [
4784
+ fullText,
4785
+ cursor && !reduced && /* @__PURE__ */ jsx(
4786
+ "span",
4787
+ {
4788
+ "aria-hidden": "true",
4789
+ className: "ml-0.5 inline-block motion-safe:animate-[blink-caret_1s_step-end_infinite]",
4790
+ children: cursorChar
4791
+ }
4792
+ )
4793
+ ] });
4794
+ });
4795
+ var DEFAULT_COLORS = ["#ef4444", "#f59e0b", "#10b981", "#3b82f6", "#a855f7", "#ec4899"];
4796
+ var nextParticleId = 0;
4797
+ var Confetti = forwardRef(function Confetti2({
4798
+ particleCount = 60,
4799
+ colors = DEFAULT_COLORS,
4800
+ gravity = 1200,
4801
+ spread = 60,
4802
+ velocity = 500,
4803
+ lifetime = 3e3,
4804
+ origin,
4805
+ autoFire
4806
+ }, forwardedRef) {
4807
+ const [particles, setParticles] = useState([]);
4808
+ const rafRef = useRef(null);
4809
+ const lastTimeRef = useRef(0);
4810
+ const reducedRef = useRef(
4811
+ typeof window !== "undefined" && (window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false)
4812
+ );
4813
+ const spawn = useCallback(
4814
+ (opts) => {
4815
+ if (reducedRef.current) return;
4816
+ const count = opts?.particleCount ?? particleCount;
4817
+ const palette = opts?.colors ?? colors;
4818
+ const sp = opts?.spread ?? spread;
4819
+ const vel = opts?.velocity ?? velocity;
4820
+ const o = opts?.origin ?? origin;
4821
+ const x = o?.x ?? (typeof window !== "undefined" ? window.innerWidth / 2 : 200);
4822
+ const y = o?.y ?? (typeof window !== "undefined" ? window.innerHeight / 2 : 200);
4823
+ const burst = [];
4824
+ const now = performance.now();
4825
+ for (let i = 0; i < count; i++) {
4826
+ const angle = -Math.PI / 2 + (Math.random() - 0.5) * (sp * Math.PI) / 180;
4827
+ const speed = vel * (0.7 + Math.random() * 0.6);
4828
+ burst.push({
4829
+ id: ++nextParticleId,
4830
+ x,
4831
+ y,
4832
+ vx: Math.cos(angle) * speed + (Math.random() - 0.5) * 60,
4833
+ vy: Math.sin(angle) * speed,
4834
+ rotation: Math.random() * 360,
4835
+ rotationSpeed: (Math.random() - 0.5) * 720,
4836
+ size: 6 + Math.random() * 6,
4837
+ color: palette[Math.floor(Math.random() * palette.length)] ?? "#000",
4838
+ shape: Math.random() > 0.5 ? "rect" : "circle",
4839
+ bornAt: now
4840
+ });
4841
+ }
4842
+ setParticles((prev) => [...prev, ...burst]);
4843
+ },
4844
+ [particleCount, colors, spread, velocity, origin]
4845
+ );
4846
+ useImperativeHandle(forwardedRef, () => ({ fire: spawn }), [spawn]);
4847
+ useEffect(() => {
4848
+ if (autoFire) spawn();
4849
+ }, [autoFire, spawn]);
4850
+ useEffect(() => {
4851
+ if (particles.length === 0) return;
4852
+ const tick = (now) => {
4853
+ const last = lastTimeRef.current || now;
4854
+ const dt = (now - last) / 1e3;
4855
+ lastTimeRef.current = now;
4856
+ const viewportH = typeof window !== "undefined" ? window.innerHeight : 800;
4857
+ setParticles(
4858
+ (prev) => prev.map((p) => ({
4859
+ ...p,
4860
+ x: p.x + p.vx * dt,
4861
+ y: p.y + p.vy * dt,
4862
+ vy: p.vy + gravity * dt,
4863
+ rotation: p.rotation + p.rotationSpeed * dt
4864
+ })).filter((p) => p.y < viewportH + 80 && now - p.bornAt < lifetime)
4865
+ );
4866
+ rafRef.current = requestAnimationFrame(tick);
4867
+ };
4868
+ rafRef.current = requestAnimationFrame(tick);
4869
+ return () => {
4870
+ if (rafRef.current != null) cancelAnimationFrame(rafRef.current);
4871
+ lastTimeRef.current = 0;
4872
+ };
4873
+ }, [particles.length, gravity, lifetime]);
4874
+ if (particles.length === 0) return null;
4875
+ return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(
4876
+ "svg",
4877
+ {
4878
+ "aria-hidden": "true",
4879
+ className: "pointer-events-none fixed inset-0 z-50",
4880
+ style: { width: "100vw", height: "100vh" },
4881
+ children: particles.map(
4882
+ (p) => p.shape === "rect" ? /* @__PURE__ */ jsx(
4883
+ "rect",
4884
+ {
4885
+ x: p.x - p.size / 2,
4886
+ y: p.y - p.size / 2,
4887
+ width: p.size,
4888
+ height: p.size * 0.5,
4889
+ fill: p.color,
4890
+ transform: `rotate(${p.rotation} ${p.x} ${p.y})`
4891
+ },
4892
+ p.id
4893
+ ) : /* @__PURE__ */ jsx("circle", { cx: p.x, cy: p.y, r: p.size / 2, fill: p.color }, p.id)
4894
+ )
4895
+ }
4896
+ ) });
4897
+ });
4401
4898
 
4402
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AudioPlayer, AudioWaveform, Avatar, AvatarGroup, Badge, BadgeOverlay, Card, Carousel, CarouselDot, CarouselDots, CarouselNext, CarouselPrev, CarouselSlide, CarouselSlides, CarouselViewport, Code, Collapsible, CollapsibleContent, CollapsibleTrigger, CountBadge, DataGrid, DataTable, DescriptionList, DiffViewer, EmptyState, EventCalendar, Gantt, Heading, HeatmapCalendar, Highlight, Image, InfoRow, Kbd, KeyboardShortcut, List, ListItem, Mark, NodeEditor, NotificationDot, PDFViewer, Quote, ScheduleView, SectionHeader, Separator, Snippet, Sparkline, Stat, Status, SwipeActions, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeaderCell, TableRow, Tabs, TabsList, TabsPanel, TabsTab, Text, Timeline, TimelineDescription, TimelineItem, TimelineTitle, Tooltip, Tree, TreeGroup, TreeItem, VideoPlayer, avatarVariants, badgeVariants, codeVariants, headingVariants, textVariants };
4403
- //# sourceMappingURL=chunk-6UJX6YAP.js.map
4404
- //# sourceMappingURL=chunk-6UJX6YAP.js.map
4899
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AnimatedNumber, AudioPlayer, AudioWaveform, Avatar, AvatarGroup, Badge, BadgeOverlay, Card, Carousel, CarouselDot, CarouselDots, CarouselNext, CarouselPrev, CarouselSlide, CarouselSlides, CarouselViewport, Code, Collapsible, CollapsibleContent, CollapsibleTrigger, Confetti, CountBadge, CountUp, DataGrid, DataTable, DescriptionList, DiffViewer, EmptyState, EventCalendar, Gantt, GradientText, Heading, HeatmapCalendar, Highlight, Image, InfoRow, KeyboardShortcut, List, ListItem, Mark, Marquee, NodeEditor, NotificationDot, PDFViewer, Quote, ScheduleView, ScrollReveal, SectionHeader, Separator, Snippet, Sparkline, Stat, Status, SwipeActions, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeaderCell, TableRow, Tabs, TabsList, TabsPanel, TabsTab, Text, Tilt, Timeline, TimelineDescription, TimelineItem, TimelineTitle, Tooltip, Tree, TreeGroup, TreeItem, Typewriter, VideoPlayer, avatarVariants, badgeVariants, codeVariants, headingVariants, textVariants };
4900
+ //# sourceMappingURL=chunk-TK3SXTTF.js.map
4901
+ //# sourceMappingURL=chunk-TK3SXTTF.js.map