@zmzai/theme 0.1.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 (129) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +76 -0
  3. package/package.json +91 -0
  4. package/src/brand/index.ts +3 -0
  5. package/src/brand/logo/Logo.tsx +46 -0
  6. package/src/brand/logo/favicon.png +0 -0
  7. package/src/brand/logo/index.ts +2 -0
  8. package/src/brand/logo/zmzai-logo.png +0 -0
  9. package/src/brand/wordmark/Wordmark.tsx +48 -0
  10. package/src/brand/wordmark/index.ts +2 -0
  11. package/src/components/aceternity-sidebar/AceternitySidebar.tsx +133 -0
  12. package/src/components/aceternity-sidebar/index.ts +2 -0
  13. package/src/components/animated-tabs/AnimatedTabs.tsx +60 -0
  14. package/src/components/animated-tabs/index.ts +2 -0
  15. package/src/components/animated-tooltip/AnimatedTooltip.tsx +93 -0
  16. package/src/components/animated-tooltip/index.ts +2 -0
  17. package/src/components/avatar/Avatar.tsx +59 -0
  18. package/src/components/avatar/index.ts +2 -0
  19. package/src/components/badge/Badge.tsx +45 -0
  20. package/src/components/badge/index.ts +2 -0
  21. package/src/components/bento-grid/BentoGrid.tsx +85 -0
  22. package/src/components/bento-grid/index.ts +2 -0
  23. package/src/components/button/Button.tsx +66 -0
  24. package/src/components/button/button.styles.ts +41 -0
  25. package/src/components/button/index.ts +4 -0
  26. package/src/components/card/Card.tsx +87 -0
  27. package/src/components/card/card.styles.ts +35 -0
  28. package/src/components/card/index.ts +4 -0
  29. package/src/components/card-3d/Card3D.tsx +84 -0
  30. package/src/components/card-3d/index.ts +2 -0
  31. package/src/components/card-hover-effect/CardHoverEffect.tsx +83 -0
  32. package/src/components/card-hover-effect/index.ts +2 -0
  33. package/src/components/card-spotlight/CardSpotlight.tsx +63 -0
  34. package/src/components/card-spotlight/index.ts +2 -0
  35. package/src/components/carousel/Carousel.tsx +79 -0
  36. package/src/components/carousel/index.ts +2 -0
  37. package/src/components/code-block/CodeBlock.tsx +153 -0
  38. package/src/components/code-block/index.ts +2 -0
  39. package/src/components/comet-card/CometCard.tsx +106 -0
  40. package/src/components/comet-card/index.ts +2 -0
  41. package/src/components/compare/Compare.tsx +128 -0
  42. package/src/components/compare/index.ts +2 -0
  43. package/src/components/dialog/Dialog.tsx +79 -0
  44. package/src/components/dialog/index.ts +10 -0
  45. package/src/components/dropdown-menu/DropdownMenu.tsx +76 -0
  46. package/src/components/dropdown-menu/index.ts +8 -0
  47. package/src/components/empty-state/EmptyState.tsx +78 -0
  48. package/src/components/empty-state/index.ts +2 -0
  49. package/src/components/encrypt-text/EncryptText.tsx +102 -0
  50. package/src/components/encrypt-text/index.ts +2 -0
  51. package/src/components/evervault-card/EvervaultCard.tsx +114 -0
  52. package/src/components/evervault-card/index.ts +2 -0
  53. package/src/components/expandable-card/ExpandableCard.tsx +91 -0
  54. package/src/components/expandable-card/index.ts +2 -0
  55. package/src/components/file-upload/FileUpload.tsx +171 -0
  56. package/src/components/file-upload/index.ts +2 -0
  57. package/src/components/flip-words/FlipWords.tsx +70 -0
  58. package/src/components/flip-words/index.ts +2 -0
  59. package/src/components/floating-navbar/FloatingNavbar.tsx +82 -0
  60. package/src/components/floating-navbar/index.ts +2 -0
  61. package/src/components/focus-cards/FocusCards.tsx +93 -0
  62. package/src/components/focus-cards/index.ts +2 -0
  63. package/src/components/glare-card/GlareCard.tsx +66 -0
  64. package/src/components/glare-card/index.ts +2 -0
  65. package/src/components/glowing-effect/GlowingEffect.tsx +68 -0
  66. package/src/components/glowing-effect/index.ts +2 -0
  67. package/src/components/hover-border-gradient/HoverBorderGradient.tsx +80 -0
  68. package/src/components/hover-border-gradient/index.ts +2 -0
  69. package/src/components/index.ts +71 -0
  70. package/src/components/infinite-moving-cards/InfiniteMovingCards.tsx +84 -0
  71. package/src/components/infinite-moving-cards/index.ts +2 -0
  72. package/src/components/input/Input.tsx +35 -0
  73. package/src/components/input/index.ts +4 -0
  74. package/src/components/input/input.styles.ts +34 -0
  75. package/src/components/keyboard/Keyboard.tsx +38 -0
  76. package/src/components/keyboard/index.ts +2 -0
  77. package/src/components/layout-grid/LayoutGrid.tsx +121 -0
  78. package/src/components/layout-grid/index.ts +2 -0
  79. package/src/components/link-preview/LinkPreview.tsx +121 -0
  80. package/src/components/link-preview/index.ts +2 -0
  81. package/src/components/loader/Loader.tsx +130 -0
  82. package/src/components/loader/index.ts +2 -0
  83. package/src/components/magnetic-button/MagneticButton.tsx +79 -0
  84. package/src/components/magnetic-button/index.ts +2 -0
  85. package/src/components/moving-border/MovingBorder.tsx +72 -0
  86. package/src/components/moving-border/index.ts +2 -0
  87. package/src/components/multi-step-loader/MultiStepLoader.tsx +95 -0
  88. package/src/components/multi-step-loader/index.ts +2 -0
  89. package/src/components/notch/Notch.tsx +47 -0
  90. package/src/components/notch/index.ts +2 -0
  91. package/src/components/select/Select.tsx +100 -0
  92. package/src/components/select/index.ts +10 -0
  93. package/src/components/skeleton/Skeleton.tsx +34 -0
  94. package/src/components/skeleton/index.ts +2 -0
  95. package/src/components/stateful-button/StatefulButton.tsx +115 -0
  96. package/src/components/stateful-button/index.ts +2 -0
  97. package/src/components/sticky-banner/StickyBanner.tsx +74 -0
  98. package/src/components/sticky-banner/index.ts +2 -0
  99. package/src/components/sticky-scroll-reveal/StickyScrollReveal.tsx +141 -0
  100. package/src/components/sticky-scroll-reveal/index.ts +2 -0
  101. package/src/components/terminal/Terminal.tsx +55 -0
  102. package/src/components/terminal/index.ts +2 -0
  103. package/src/components/text-generate/TextGenerate.tsx +59 -0
  104. package/src/components/text-generate/index.ts +2 -0
  105. package/src/components/text-hover-effect/TextHoverEffect.tsx +90 -0
  106. package/src/components/text-hover-effect/index.ts +2 -0
  107. package/src/components/textarea/Textarea.tsx +39 -0
  108. package/src/components/textarea/index.ts +2 -0
  109. package/src/components/timeline/Timeline.tsx +106 -0
  110. package/src/components/timeline/index.ts +3 -0
  111. package/src/components/tooltip/Tooltip.tsx +51 -0
  112. package/src/components/tooltip/index.ts +2 -0
  113. package/src/components/tooltip-card/TooltipCard.tsx +130 -0
  114. package/src/components/tooltip-card/index.ts +2 -0
  115. package/src/components/tracing-beam/TracingBeam.tsx +110 -0
  116. package/src/components/tracing-beam/index.ts +2 -0
  117. package/src/components/typewriter/Typewriter.tsx +69 -0
  118. package/src/components/typewriter/index.ts +2 -0
  119. package/src/components/vanish-input/VanishInput.tsx +170 -0
  120. package/src/components/vanish-input/index.ts +2 -0
  121. package/src/components/wobble-card/WobbleCard.tsx +77 -0
  122. package/src/components/wobble-card/index.ts +2 -0
  123. package/src/index.ts +21 -0
  124. package/src/tokens/fonts.css +42 -0
  125. package/src/tokens/theme.css +120 -0
  126. package/src/utils/cn.ts +13 -0
  127. package/src/utils/index.ts +2 -0
  128. package/src/utils/motion.ts +47 -0
  129. package/src/vite-env.d.ts +6 -0
@@ -0,0 +1,120 @@
1
+ /*
2
+ * @zmzai/theme — Design Tokens
3
+ *
4
+ * Tailwind v4 @theme block. Import in your app's globals.css:
5
+ * @import "tailwindcss";
6
+ * @import "@zmzai/theme/tokens";
7
+ * @import "@zmzai/theme/fonts";
8
+ *
9
+ * Override --color-accent per-site for Variants:
10
+ * :root { --color-accent: #7C3AED; }
11
+ */
12
+
13
+ @theme {
14
+ /* ===== Color =====
15
+ 纯白底 + 纯黑字。灰阶用 neutral(不暖不冷)。
16
+ 蓝色 accent 只用于动态状态(进行中/running/聚焦/审批)。 */
17
+ --color-bg: #FFFFFF;
18
+ --color-surface: #FAFAFA;
19
+ --color-surface-2: #F5F5F5;
20
+ --color-ink: #000000;
21
+ --color-ink-2: #525252;
22
+ --color-ink-3: #A3A3A3;
23
+ --color-line: #E5E5E5;
24
+ --color-line-strong: #171717;
25
+ --color-accent: #2563EB;
26
+ --color-accent-ink: #FFFFFF;
27
+ --color-success: #16A34A;
28
+ --color-danger: #DC2626;
29
+ --color-warning: #CA8A04;
30
+
31
+ /* Dark surface — 仅用于代码块/preview,不是全局 dark mode */
32
+ --color-dark-bg: #0A0A0A;
33
+ --color-dark-surface: #171717;
34
+ --color-dark-ink: #FAFAFA;
35
+ --color-dark-line: #27272A;
36
+
37
+ /* ===== Fonts =====
38
+ 英文 SF Pro(系统自带零加载),中文 MiSans(开源加载)。
39
+ 字体栈顺序让浏览器逐字符匹配:英文命中 SF Pro,中文跳到 MiSans。 */
40
+ --font-sans: "MiSans", -apple-system, "SF Pro Display", "SF Pro Text",
41
+ "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
42
+ --font-mono: "MiSans", "SF Mono", "JetBrains Mono", ui-monospace,
43
+ "SFMono-Regular", monospace;
44
+
45
+ /* ===== Radius ===== */
46
+ --radius-sm: 8px;
47
+ --radius: 12px;
48
+ --radius-lg: 16px;
49
+ --radius-xl: 20px;
50
+ --radius-pill: 9999px;
51
+
52
+ /* ===== Motion ===== */
53
+ --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
54
+ --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
55
+
56
+ /* ===== Backward-compat aliases =====
57
+ Maps old v1 token names → new v2 values.
58
+ Lets zmzai-agent's 267 existing CSS classes work without modification. */
59
+ --color-paper: var(--color-bg);
60
+ --color-muted: var(--color-ink-2);
61
+ --color-rule: var(--color-ink);
62
+ --color-surface-strong: var(--color-surface-2);
63
+ --color-accent-strong: var(--color-ink);
64
+ --font-serif: var(--font-sans);
65
+ --animate-dur-fast: 150ms;
66
+ --animate-dur-base: 250ms;
67
+ --animate-dur-slow: 500ms;
68
+ --radius-card: var(--radius);
69
+ --radius-input: var(--radius-sm);
70
+ }
71
+
72
+ :root {
73
+ color-scheme: light;
74
+ }
75
+
76
+ @layer base {
77
+ * {
78
+ box-sizing: border-box;
79
+ }
80
+
81
+ html {
82
+ scroll-behavior: smooth;
83
+ }
84
+
85
+ body {
86
+ margin: 0;
87
+ background: var(--color-bg);
88
+ color: var(--color-ink);
89
+ font-family: var(--font-sans);
90
+ font-size: 1rem;
91
+ line-height: 1.65;
92
+ text-rendering: optimizeLegibility;
93
+ -webkit-font-smoothing: antialiased;
94
+ }
95
+
96
+ a {
97
+ color: inherit;
98
+ text-decoration: none;
99
+ }
100
+
101
+ ::selection {
102
+ background: var(--color-ink);
103
+ color: #fff;
104
+ }
105
+
106
+ :focus-visible {
107
+ outline: 2px solid var(--color-accent);
108
+ outline-offset: 2px;
109
+ }
110
+ }
111
+
112
+ @media (prefers-reduced-motion: reduce) {
113
+ *,
114
+ *::before,
115
+ *::after {
116
+ animation-duration: 0.01ms !important;
117
+ transition-duration: 0.01ms !important;
118
+ scroll-behavior: auto !important;
119
+ }
120
+ }
@@ -0,0 +1,13 @@
1
+ import { clsx, type ClassValue } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+
4
+ /**
5
+ * Merge Tailwind classes with conditional logic.
6
+ * Uses clsx for conditionals + tailwind-merge for dedup.
7
+ *
8
+ * @example
9
+ * cn("px-4 py-2", isActive && "bg-ink text-white", className)
10
+ */
11
+ export function cn(...inputs: ClassValue[]): string {
12
+ return twMerge(clsx(inputs));
13
+ }
@@ -0,0 +1,2 @@
1
+ export { cn } from "./cn";
2
+ export * as motion from "./motion";
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Shared framer-motion transition presets.
3
+ */
4
+
5
+ import type { Variants, Transition } from "framer-motion";
6
+
7
+ export const easeOut: number[] = [0.16, 1, 0.3, 1];
8
+ export const easeSpring: number[] = [0.34, 1.56, 0.64, 1];
9
+
10
+ /** Hover: scale up slightly */
11
+ export const hoverScale = {
12
+ scale: 1.03,
13
+ transition: { duration: 0.15, ease: easeOut },
14
+ };
15
+
16
+ /** Hover: lift up slightly */
17
+ export const hoverLift = {
18
+ y: -2,
19
+ transition: { duration: 0.2, ease: easeOut },
20
+ };
21
+
22
+ /** Entrance: fade in + slide up */
23
+ export const fadeInUp: Variants = {
24
+ hidden: { opacity: 0, y: 10 },
25
+ visible: {
26
+ opacity: 1,
27
+ y: 0,
28
+ transition: { duration: 0.4, ease: easeOut },
29
+ },
30
+ };
31
+
32
+ /** Entrance: fade in + scale from 0.95 */
33
+ export const fadeInScale: Variants = {
34
+ hidden: { opacity: 0, scale: 0.95 },
35
+ visible: {
36
+ opacity: 1,
37
+ scale: 1,
38
+ transition: { duration: 0.3, ease: easeSpring },
39
+ },
40
+ };
41
+
42
+ /** Spring transition for dialogs / popovers */
43
+ export const springTransition: Transition = {
44
+ type: "spring",
45
+ stiffness: 400,
46
+ damping: 30,
47
+ };
@@ -0,0 +1,6 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ declare module "*.png" {
4
+ const src: string;
5
+ export default src;
6
+ }