cistack 6.0.0 → 6.2.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 (61) hide show
  1. package/.github/dependabot.yml +42 -0
  2. package/.github/workflows/ci.yml +2 -1
  3. package/.github/workflows/pipeline.yml +250 -0
  4. package/README.md +4 -0
  5. package/package.json +7 -2
  6. package/product-site/.github/dependabot.yml +27 -0
  7. package/product-site/.github/workflows/pipeline.yml +215 -0
  8. package/product-site/.lighthouserc.json +22 -0
  9. package/product-site/README.md +1 -0
  10. package/product-site/app/[lang]/layout.tsx +95 -0
  11. package/product-site/app/[lang]/page.tsx +19 -0
  12. package/product-site/app/favicon.ico +0 -0
  13. package/product-site/app/globals.css +228 -0
  14. package/product-site/app/manifest.ts +20 -0
  15. package/product-site/app/robots.ts +12 -0
  16. package/product-site/app/sitemap.ts +12 -0
  17. package/product-site/components/CanvasText.tsx +219 -0
  18. package/product-site/components/CopyButton.tsx +101 -0
  19. package/product-site/components/HomeClient.tsx +664 -0
  20. package/product-site/components/InstallToggle.tsx +123 -0
  21. package/product-site/components/MotionRevealClient.tsx +53 -0
  22. package/product-site/components/TerminalCard.tsx +65 -0
  23. package/product-site/components/TerminalCardMotion.tsx +324 -0
  24. package/product-site/components/site-motion.tsx +229 -0
  25. package/product-site/components/ui/accordion.tsx +74 -0
  26. package/product-site/components/ui/badge.tsx +52 -0
  27. package/product-site/components/ui/button.tsx +60 -0
  28. package/product-site/components/ui/card.tsx +103 -0
  29. package/product-site/components/ui/checkbox.tsx +29 -0
  30. package/product-site/components/ui/separator.tsx +25 -0
  31. package/product-site/components/ui/table.tsx +116 -0
  32. package/product-site/components/ui/tabs.tsx +82 -0
  33. package/product-site/components.json +25 -0
  34. package/product-site/dictionaries/br.json +276 -0
  35. package/product-site/dictionaries/cn.json +276 -0
  36. package/product-site/dictionaries/de.json +276 -0
  37. package/product-site/dictionaries/en.json +274 -0
  38. package/product-site/dictionaries/es.json +276 -0
  39. package/product-site/dictionaries/fr.json +276 -0
  40. package/product-site/dictionaries/pt.json +276 -0
  41. package/product-site/eslint.config.mjs +18 -0
  42. package/product-site/lib/dictionaries.ts +18 -0
  43. package/product-site/lib/dictionary-types.ts +3 -0
  44. package/product-site/lib/utils.ts +6 -0
  45. package/product-site/middleware.ts +39 -0
  46. package/product-site/next.config.mjs +14 -0
  47. package/product-site/package-lock.json +14201 -0
  48. package/product-site/package.json +42 -0
  49. package/product-site/postcss.config.mjs +7 -0
  50. package/product-site/public/file.svg +1 -0
  51. package/product-site/public/globe.svg +1 -0
  52. package/product-site/public/next.svg +1 -0
  53. package/product-site/public/og-image.png +0 -0
  54. package/product-site/public/vercel.svg +1 -0
  55. package/product-site/public/window.svg +1 -0
  56. package/product-site/scripts/sync-i18n.mjs +58 -0
  57. package/product-site/scripts/validate-i18n.mjs +45 -0
  58. package/product-site/tsconfig.json +34 -0
  59. package/product-site/types/negotiator.d.ts +14 -0
  60. package/product-site/vercel.json +5 -0
  61. package/src/index.js +12 -13
@@ -0,0 +1,101 @@
1
+ "use client";
2
+
3
+ import { AnimatePresence, m, useReducedMotion } from "framer-motion";
4
+ import { Check, Copy } from "lucide-react";
5
+ import { useEffect, useRef, useState } from "react";
6
+
7
+ const iconClass = "h-4 w-4 shrink-0";
8
+
9
+ interface CopyButtonProps {
10
+ text: string;
11
+ className?: string;
12
+ idleLabel?: string;
13
+ successLabel?: string;
14
+ }
15
+
16
+ export default function CopyButton({
17
+ text,
18
+ className = "",
19
+ idleLabel = "Copy",
20
+ successLabel = "Copied",
21
+ }: CopyButtonProps) {
22
+ const [copied, setCopied] = useState(false);
23
+ const timeoutRef = useRef<number | null>(null);
24
+ const reduce = useReducedMotion();
25
+
26
+ useEffect(() => {
27
+ return () => {
28
+ if (timeoutRef.current !== null) {
29
+ window.clearTimeout(timeoutRef.current);
30
+ }
31
+ };
32
+ }, []);
33
+
34
+ const handleCopy = async () => {
35
+ try {
36
+ await navigator.clipboard.writeText(text);
37
+ setCopied(true);
38
+ if (timeoutRef.current !== null) {
39
+ window.clearTimeout(timeoutRef.current);
40
+ }
41
+ timeoutRef.current = window.setTimeout(() => {
42
+ setCopied(false);
43
+ }, 2000);
44
+ } catch (error) {
45
+ console.error("Unable to copy text", error);
46
+ }
47
+ };
48
+
49
+ const label = copied ? successLabel : idleLabel;
50
+ const tap = reduce ? {} : { scale: 0.92 };
51
+ const hover = reduce ? {} : { scale: 1.06 };
52
+
53
+ return (
54
+ <m.button
55
+ type="button"
56
+ onClick={handleCopy}
57
+ whileTap={tap}
58
+ whileHover={hover}
59
+ transition={{ type: "spring", stiffness: 520, damping: 28 }}
60
+ className={`flex h-9 w-9 shrink-0 items-center justify-center text-zinc-500 transition-colors hover:text-zinc-900 ${className}`}
61
+ aria-label={label}
62
+ title={label}
63
+ >
64
+ <span className="relative flex h-4 w-4 items-center justify-center">
65
+ {reduce ? (
66
+ copied ? (
67
+ <Check className={`${iconClass} text-emerald-600`} aria-hidden strokeWidth={2.25} />
68
+ ) : (
69
+ <Copy className={iconClass} aria-hidden strokeWidth={2} />
70
+ )
71
+ ) : (
72
+ <AnimatePresence mode="wait" initial={false}>
73
+ {copied ? (
74
+ <m.span
75
+ key="check"
76
+ initial={{ opacity: 0, scale: 0.35, rotate: -50 }}
77
+ animate={{ opacity: 1, scale: 1, rotate: 0 }}
78
+ exit={{ opacity: 0, scale: 0.75 }}
79
+ transition={{ type: "spring", stiffness: 420, damping: 22 }}
80
+ className="absolute inset-0 flex items-center justify-center text-emerald-600"
81
+ >
82
+ <Check className={iconClass} aria-hidden strokeWidth={2.25} />
83
+ </m.span>
84
+ ) : (
85
+ <m.span
86
+ key="copy"
87
+ initial={{ opacity: 0, scale: 0.75 }}
88
+ animate={{ opacity: 1, scale: 1 }}
89
+ exit={{ opacity: 0, scale: 0.8 }}
90
+ transition={{ duration: 0.15, ease: [0.22, 1, 0.36, 1] }}
91
+ className="absolute inset-0 flex items-center justify-center"
92
+ >
93
+ <Copy className={iconClass} aria-hidden strokeWidth={2} />
94
+ </m.span>
95
+ )}
96
+ </AnimatePresence>
97
+ )}
98
+ </span>
99
+ </m.button>
100
+ );
101
+ }