apex-ui-kit 2.2.0 → 2.3.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.
Files changed (50) hide show
  1. package/dist/ApexUI-Kit/templates/AiChat/AiChat.jsx +171 -0
  2. package/dist/ApexUI-Kit/templates/AiModelPrompt/AiModelPrompt.jsx +221 -0
  3. package/dist/ApexUI-Kit/templates/AiModelPrompt/index.js +2 -0
  4. package/dist/ApexUI-Kit/templates/AiModelPrompt/models.js +15 -0
  5. package/dist/ApexUI-Kit/templates/AiPromptBox/AiPromptBox.jsx +173 -0
  6. package/dist/ApexUI-Kit/templates/AiResponse/AiResponse.jsx +172 -0
  7. package/dist/ApexUI-Kit/templates/AiThinking/AiThinking.jsx +106 -0
  8. package/dist/ApexUI-Kit/templates/AiVoiceBars/AiVoiceBars.jsx +78 -0
  9. package/dist/ApexUI-Kit/templates/AiVoiceBlob/AiVoiceBlob.jsx +105 -0
  10. package/dist/ApexUI-Kit/templates/AiVoiceOrb/AiVoiceOrb.jsx +74 -0
  11. package/dist/ApexUI-Kit/templates/AiVoiceRing/AiVoiceRing.jsx +120 -0
  12. package/dist/ApexUI-Kit/templates/AiVoiceWave/AiVoiceWave.jsx +107 -0
  13. package/dist/ApexUI-Kit/templates/AnimatedSwitch/AnimatedSwitch.jsx +80 -0
  14. package/dist/ApexUI-Kit/templates/AnimatedTabs/AnimatedTabs.jsx +10 -2
  15. package/dist/ApexUI-Kit/templates/AuroraBackground/AuroraBackground.jsx +48 -0
  16. package/dist/ApexUI-Kit/templates/BounceCards/BounceCards.jsx +53 -0
  17. package/dist/ApexUI-Kit/templates/CardSwap3D/CardSwap3D.jsx +80 -0
  18. package/dist/ApexUI-Kit/templates/CircularText/CircularText.jsx +49 -0
  19. package/dist/ApexUI-Kit/templates/ClickSpark/ClickSpark.jsx +72 -0
  20. package/dist/ApexUI-Kit/templates/Coverflow3D/Coverflow3D.jsx +108 -0
  21. package/dist/ApexUI-Kit/templates/CubeGallery/CubeGallery.jsx +166 -0
  22. package/dist/ApexUI-Kit/templates/CursorTrail/CursorTrail.jsx +200 -0
  23. package/dist/ApexUI-Kit/templates/ElasticSlider/ElasticSlider.jsx +152 -0
  24. package/dist/ApexUI-Kit/templates/ExtrudedText/ExtrudedText.jsx +78 -0
  25. package/dist/ApexUI-Kit/templates/FlipBook/FlipBook.jsx +191 -0
  26. package/dist/ApexUI-Kit/templates/FloatingNavbar/FloatingNavbar.jsx +162 -0
  27. package/dist/ApexUI-Kit/templates/Folder/Folder.jsx +101 -0
  28. package/dist/ApexUI-Kit/templates/GlitchText/GlitchText.jsx +56 -0
  29. package/dist/ApexUI-Kit/templates/GooeyNav/GooeyNav.jsx +310 -0
  30. package/dist/ApexUI-Kit/templates/HoldToConfirm/HoldToConfirm.jsx +169 -0
  31. package/dist/ApexUI-Kit/templates/HoldToConfirm/UndoNotice.jsx +58 -0
  32. package/dist/ApexUI-Kit/templates/HoloCard/HoloCard.jsx +92 -0
  33. package/dist/ApexUI-Kit/templates/ImageCompare/ImageCompare.jsx +94 -0
  34. package/dist/ApexUI-Kit/templates/IsoStack/IsoStack.jsx +86 -0
  35. package/dist/ApexUI-Kit/templates/LoadingScreen/LoadingScreen.jsx +545 -101
  36. package/dist/ApexUI-Kit/templates/MagnetLines/MagnetLines.jsx +67 -0
  37. package/dist/ApexUI-Kit/templates/MagneticCursor/MagneticCursor.jsx +2 -160
  38. package/dist/ApexUI-Kit/templates/PixelTransition/PixelTransition.jsx +75 -0
  39. package/dist/ApexUI-Kit/templates/PricingCards/PricingCards.jsx +115 -0
  40. package/dist/ApexUI-Kit/templates/ProximityText/ProximityText.jsx +66 -0
  41. package/dist/ApexUI-Kit/templates/RotatingText/RotatingText.jsx +50 -0
  42. package/dist/ApexUI-Kit/templates/ShinyText/ShinyText.jsx +30 -0
  43. package/dist/ApexUI-Kit/templates/StarBorder/StarBorder.jsx +33 -0
  44. package/dist/ApexUI-Kit/templates/Stepper/Stepper.jsx +129 -0
  45. package/dist/ApexUI-Kit/templates/SwipeCards/SwipeCards.jsx +123 -0
  46. package/dist/ApexUI-Kit/templates/TextRing3D/TextRing3D.jsx +73 -0
  47. package/dist/ApexUI-Kit/templates/TrueFocus/TrueFocus.jsx +64 -0
  48. package/dist/ApexUI-Kit/templates/TypewriterText/TypewriterText.jsx +70 -0
  49. package/dist/cli/index.js +43 -0
  50. package/package.json +1 -1
@@ -0,0 +1,94 @@
1
+ import React, { useRef, useState } from "react";
2
+ import { ChevronsLeftRight } from "lucide-react";
3
+
4
+ /*
5
+ * Image Compare: a before / after slider. Drag the handle (or click anywhere,
6
+ * or use the arrow keys) to wipe between the two images. Give one `image` and
7
+ * the "before" side is drawn with a CSS filter, or pass both `before` and `after`.
8
+ */
9
+
10
+ const ImageCompare = ({
11
+ before,
12
+ after,
13
+ image = "https://ik.imagekit.io/ny6yinyut/apexui/assets/thanos.png?tr=f-auto,q-80,w-1200",
14
+ beforeFilter = "grayscale(1) contrast(1.05) brightness(0.9)",
15
+ beforeLabel = "Before",
16
+ afterLabel = "After",
17
+ defaultPosition = 50,
18
+ vertical = false,
19
+ accentColor = "#a3e635",
20
+ aspectRatio = "16 / 10",
21
+ className = "",
22
+ }) => {
23
+ const ref = useRef(null);
24
+ const [pos, setPos] = useState(defaultPosition);
25
+ const [held, setHeld] = useState(false);
26
+ const beforeSrc = before ?? image;
27
+ const afterSrc = after ?? image;
28
+
29
+ const fromPointer = (e) => {
30
+ const r = ref.current.getBoundingClientRect();
31
+ const p = vertical ? (e.clientY - r.top) / r.height : (e.clientX - r.left) / r.width;
32
+ setPos(Math.min(100, Math.max(0, p * 100)));
33
+ };
34
+ const onKeyDown = (e) => {
35
+ const step = e.shiftKey ? 10 : 2;
36
+ const delta = { ArrowLeft: -step, ArrowDown: vertical ? step : -step, ArrowRight: step, ArrowUp: vertical ? -step : step }[e.key];
37
+ if (delta === undefined) return;
38
+ e.preventDefault();
39
+ setPos((p) => Math.min(100, Math.max(0, p + delta)));
40
+ };
41
+
42
+ const clip = vertical ? `inset(0 0 ${100 - pos}% 0)` : `inset(0 ${100 - pos}% 0 0)`;
43
+
44
+ return (
45
+ <div
46
+ ref={ref}
47
+ onPointerDown={(e) => {
48
+ e.currentTarget.setPointerCapture(e.pointerId);
49
+ setHeld(true);
50
+ fromPointer(e);
51
+ }}
52
+ onPointerMove={(e) => held && fromPointer(e)}
53
+ onPointerUp={() => setHeld(false)}
54
+ onPointerCancel={() => setHeld(false)}
55
+ className={`group relative w-full select-none overflow-hidden rounded-2xl bg-neutral-900 ${vertical ? "cursor-row-resize touch-none" : "cursor-col-resize touch-pan-y"} ${className}`}
56
+ style={{ aspectRatio }}
57
+ >
58
+ <img src={afterSrc} alt={afterLabel} draggable="false" className="absolute inset-0 h-full w-full object-cover" />
59
+ <img
60
+ src={beforeSrc}
61
+ alt={beforeLabel}
62
+ draggable="false"
63
+ className="absolute inset-0 h-full w-full object-cover"
64
+ style={{ clipPath: clip, filter: before ? undefined : beforeFilter, transition: held ? "none" : "clip-path 200ms ease-out" }}
65
+ />
66
+
67
+ <span className="pointer-events-none absolute left-3 top-3 rounded-full bg-black/55 px-2.5 py-1 text-[0.7rem] font-semibold uppercase tracking-wider text-white backdrop-blur">{beforeLabel}</span>
68
+ <span className={`pointer-events-none absolute rounded-full bg-black/55 px-2.5 py-1 text-[0.7rem] font-semibold uppercase tracking-wider text-white backdrop-blur ${vertical ? "bottom-3 left-3" : "right-3 top-3"}`}>{afterLabel}</span>
69
+
70
+ {/* Divider and handle */}
71
+ <div
72
+ className="pointer-events-none absolute"
73
+ style={vertical ? { left: 0, right: 0, top: `${pos}%`, height: 2, marginTop: -1, background: accentColor, transition: held ? "none" : "top 200ms ease-out" } : { top: 0, bottom: 0, left: `${pos}%`, width: 2, marginLeft: -1, background: accentColor, transition: held ? "none" : "left 200ms ease-out" }}
74
+ >
75
+ <button
76
+ type="button"
77
+ role="slider"
78
+ aria-label="Comparison position"
79
+ aria-valuemin={0}
80
+ aria-valuemax={100}
81
+ aria-valuenow={Math.round(pos)}
82
+ aria-orientation={vertical ? "vertical" : "horizontal"}
83
+ onKeyDown={onKeyDown}
84
+ className={`pointer-events-auto absolute left-1/2 top-1/2 grid h-10 w-10 -translate-x-1/2 -translate-y-1/2 place-items-center rounded-full text-black shadow-[0_6px_20px_-4px_rgba(0,0,0,0.6)] outline-none transition-transform duration-200 focus-visible:ring-4 focus-visible:ring-white/50 ${held ? "scale-110" : "group-hover:scale-105"}`}
85
+ style={{ background: accentColor }}
86
+ >
87
+ <ChevronsLeftRight className={`h-5 w-5 ${vertical ? "rotate-90" : ""}`} />
88
+ </button>
89
+ </div>
90
+ </div>
91
+ );
92
+ };
93
+
94
+ export default ImageCompare;
@@ -0,0 +1,86 @@
1
+ import React, { useState } from "react";
2
+ import { motion } from "framer-motion";
3
+ import { Cloud, Database, Layout, Server, Shield } from "lucide-react";
4
+
5
+ /*
6
+ * Iso Stack: layers drawn in isometric 3D, stacked like a sandwich. Hover
7
+ * (or tap) and the stack fans open so each layer's label shows; hover one
8
+ * layer to lift it out. Great for architecture or feature diagrams.
9
+ */
10
+
11
+ const DEFAULT_LAYERS = [
12
+ { label: "Interface", note: "React + Tailwind", icon: Layout, color: "#a3e635" },
13
+ { label: "Edge", note: "CDN & caching", icon: Cloud, color: "#38bdf8" },
14
+ { label: "Security", note: "Auth & rate limits", icon: Shield, color: "#a78bfa" },
15
+ { label: "API", note: "Node services", icon: Server, color: "#f59e0b" },
16
+ { label: "Data", note: "Postgres + Redis", icon: Database, color: "#f43f5e" },
17
+ ];
18
+
19
+ const IsoStack = ({ layers = DEFAULT_LAYERS, size = 13, gap = 1.6, theme = "dark", className = "" }) => {
20
+ const [open, setOpen] = useState(false);
21
+ const [hover, setHover] = useState(-1);
22
+ const dark = theme !== "light";
23
+ const n = layers.length;
24
+
25
+ return (
26
+ <div
27
+ className={`relative flex items-center justify-center ${className}`}
28
+ style={{ height: `${size * 0.6 + n * gap * 1.6 + 6}rem`, width: "100%" }}
29
+ onPointerEnter={(e) => e.pointerType === "mouse" && setOpen(true)}
30
+ onPointerLeave={() => {
31
+ setOpen(false);
32
+ setHover(-1);
33
+ }}
34
+ onClick={() => setOpen((o) => !o)}
35
+ >
36
+ {/* Shifted down so the fully opened stack stays inside the frame. */}
37
+ <div className="relative" style={{ width: `${size}rem`, height: `${size}rem`, marginTop: `${n * gap * 0.9}rem`, transform: "rotateX(58deg) rotateZ(-45deg)", transformStyle: "preserve-3d" }}>
38
+ {layers.map((layer, i) => {
39
+ const Icon = layer.icon;
40
+ const fromTop = i;
41
+ const lift = (n - 1 - fromTop) * (open ? gap * 2.1 : gap * 0.55) + (hover === i ? 1.2 : 0);
42
+ return (
43
+ <motion.div
44
+ key={layer.label}
45
+ className="absolute inset-0 rounded-2xl border"
46
+ style={{
47
+ zIndex: n - fromTop,
48
+ background: dark ? `linear-gradient(135deg, color-mix(in srgb, ${layer.color} 22%, #0a0a0a), #0a0a0a)` : `linear-gradient(135deg, color-mix(in srgb, ${layer.color} 30%, #fff), #fff)`,
49
+ borderColor: `color-mix(in srgb, ${layer.color} 60%, transparent)`,
50
+ boxShadow: `0 0 0 1px ${layer.color}22, -18px 18px 30px -12px rgba(0,0,0,${dark ? 0.6 : 0.25})`,
51
+ }}
52
+ animate={{ z: `${lift}rem` }}
53
+ transition={{ type: "spring", stiffness: 200, damping: 22, delay: open ? (n - fromTop) * 0.03 : 0 }}
54
+ onPointerEnter={() => setHover(i)}
55
+ onPointerLeave={() => setHover(-1)}
56
+ >
57
+ <div className="absolute inset-3 rounded-xl border border-dashed" style={{ borderColor: `color-mix(in srgb, ${layer.color} 35%, transparent)` }} />
58
+ <span className="absolute left-4 top-4 grid h-9 w-9 place-items-center rounded-lg" style={{ background: layer.color, color: "#0a0a0a" }}>
59
+ {Icon && <Icon className="h-5 w-5" />}
60
+ </span>
61
+ </motion.div>
62
+ );
63
+ })}
64
+ </div>
65
+
66
+ {/* Labels sit outside the 3D plane so they stay readable. */}
67
+ <div className="pointer-events-none absolute right-2 top-1/2 flex -translate-y-1/2 flex-col gap-2 sm:right-6">
68
+ {layers.map((layer, i) => (
69
+ <motion.div
70
+ key={layer.label}
71
+ className={`rounded-lg border px-2.5 py-1.5 text-right backdrop-blur ${dark ? "border-white/10 bg-black/50 text-white" : "border-black/10 bg-white/80 text-neutral-900"}`}
72
+ animate={{ opacity: open ? 1 : 0, x: open ? 0 : 12, scale: hover === i ? 1.05 : 1 }}
73
+ transition={{ delay: open ? i * 0.05 : 0 }}
74
+ >
75
+ <p className="text-[0.78rem] font-semibold" style={{ color: hover === i ? layer.color : undefined }}>
76
+ {layer.label}
77
+ </p>
78
+ <p className="text-[0.65rem] opacity-60">{layer.note}</p>
79
+ </motion.div>
80
+ ))}
81
+ </div>
82
+ </div>
83
+ );
84
+ };
85
+
86
+ export default IsoStack;