sparkdesign 0.4.0 → 0.4.2

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 (46) hide show
  1. package/cli/registry/{basic → __tests__/basic}/button.test.tsx +1 -1
  2. package/cli/registry/{chat → __tests__/chat}/markdown.test.tsx +1 -1
  3. package/cli/registry/{chat → __tests__/chat}/thinking-indicator.test.tsx +1 -1
  4. package/cli/registry/{chat → __tests__/chat}/tool-invocation-card.test.tsx +1 -1
  5. package/cli/registry/basic/shimmering-text.tsx +115 -0
  6. package/cli/registry/{chat → basic}/sidebar-menu.tsx +2 -2
  7. package/cli/registry/meta.json +1 -1
  8. package/dist/registry/basic/shimmering-text.d.ts +27 -0
  9. package/dist/scale/computed.css +103 -0
  10. package/dist/scale/config.css +110 -0
  11. package/dist/scale/index.css +30 -0
  12. package/dist/scale/presets/compact.css +30 -0
  13. package/dist/scale/presets/dense.css +64 -0
  14. package/dist/scale/presets/sharp.css +40 -0
  15. package/dist/scale/presets/soft.css +16 -0
  16. package/dist/spark-design.cjs.js +17 -17
  17. package/dist/spark-design.es.js +2198 -2146
  18. package/dist/src/components/{chat → basic}/CollapsibleCard/index.d.ts +1 -1
  19. package/dist/src/components/basic/ShimmeringText/index.d.ts +7 -0
  20. package/dist/src/components/{chat → basic}/SidebarMenu/index.d.ts +1 -1
  21. package/dist/src/components/index.d.ts +8 -6
  22. package/dist/src/lib/utils.d.ts +5 -5
  23. package/dist/theme-base.css +270 -0
  24. package/dist/themes/dark-parchment.css +133 -0
  25. package/dist/themes/dark-qoder.css +133 -0
  26. package/dist/themes/light-parchment.css +124 -0
  27. package/dist/themes/light-qoder.css +132 -0
  28. package/dist/tokens/CLAUDE.md +305 -0
  29. package/dist/tokens/index.css +35 -0
  30. package/dist/tokens/scale/computed.css +103 -0
  31. package/dist/tokens/scale/config.css +110 -0
  32. package/dist/tokens/scale/index.css +30 -0
  33. package/dist/tokens/scale/presets/compact.css +30 -0
  34. package/dist/tokens/scale/presets/dense.css +64 -0
  35. package/dist/tokens/scale/presets/sharp.css +40 -0
  36. package/dist/tokens/scale/presets/soft.css +16 -0
  37. package/dist/tokens/scale.css +13 -0
  38. package/dist/tokens/scrollbar-utility.css +35 -0
  39. package/dist/tokens/theme-base.css +270 -0
  40. package/dist/tokens/theme.css +17 -0
  41. package/dist/tokens/themes/dark-parchment.css +133 -0
  42. package/dist/tokens/themes/dark-qoder.css +133 -0
  43. package/dist/tokens/themes/light-parchment.css +124 -0
  44. package/dist/tokens/themes/light-qoder.css +132 -0
  45. package/package.json +6 -2
  46. /package/dist/registry/{chat → basic}/sidebar-menu.d.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * [INPUT]: (CollapsibleCardProps)
3
3
  * [OUTPUT]: (JSX.Element)
4
- * [POS]: components/chat/CollapsibleCard - 对话组件,从 registry/basic 再导出
4
+ * [POS]: components/basic/CollapsibleCard - 通用折叠卡片,从 registry/basic 再导出
5
5
  */
6
6
  export { CollapsibleCard, } from '../../../../registry/basic/collapsible-card';
7
7
  export type { CollapsibleCardProps } from '../../../../registry/basic/collapsible-card';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * [INPUT]: (ShimmeringTextProps)
3
+ * [OUTPUT]: (JSX.Element) - 带渐变闪烁效果的动画文本组件,基于 Registry 单一来源
4
+ * [POS]: components/basic/ShimmeringText - 从 registry 再导出
5
+ */
6
+ export { ShimmeringText } from '../../../../registry/basic/shimmering-text';
7
+ export type { ShimmeringTextProps } from '../../../../registry/basic/shimmering-text';
@@ -1,4 +1,4 @@
1
- import type { SidebarMenuProps as RegistrySidebarMenuProps, SidebarMenuItem, SidebarMenuItemAction } from '../../../../registry/chat/sidebar-menu';
1
+ import type { SidebarMenuProps as RegistrySidebarMenuProps, SidebarMenuItem, SidebarMenuItemAction } from '../../../../registry/basic/sidebar-menu';
2
2
  export type { SidebarMenuItem, SidebarMenuItemAction };
3
3
  export type SidebarMenuProps = Omit<RegistrySidebarMenuProps, 'moreIcon'>;
4
4
  export declare const SidebarMenu: import("react").ForwardRefExoticComponent<SidebarMenuProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -42,6 +42,8 @@ export { Scrollbar } from './basic/Scrollbar';
42
42
  export type { ScrollbarProps } from './basic/Scrollbar';
43
43
  export { Skeleton } from './basic/Skeleton';
44
44
  export type { SkeletonProps } from './basic/Skeleton';
45
+ export { ShimmeringText } from './basic/ShimmeringText';
46
+ export type { ShimmeringTextProps } from './basic/ShimmeringText';
45
47
  export { Spinner } from './basic/Spinner';
46
48
  export type { SpinnerProps } from './basic/Spinner';
47
49
  export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, } from './basic/Table';
@@ -64,8 +66,12 @@ export { Pagination, PaginationContent, PaginationItem, PaginationLink, Paginati
64
66
  export type { PaginationLinkProps, PaginationPreviousProps, PaginationNextProps, } from './basic/Pagination';
65
67
  export { Tag, tagVariants } from './basic/Tag';
66
68
  export type { TagProps } from './basic/Tag';
67
- export { CollapsibleCard } from './chat/CollapsibleCard';
68
- export type { CollapsibleCardProps } from './chat/CollapsibleCard';
69
+ export { Progress } from './basic/Progress';
70
+ export type { ProgressProps } from './basic/Progress';
71
+ export { CollapsibleCard } from './basic/CollapsibleCard';
72
+ export type { CollapsibleCardProps } from './basic/CollapsibleCard';
73
+ export { SidebarMenu } from './basic/SidebarMenu';
74
+ export type { SidebarMenuProps, SidebarMenuItem, SidebarMenuItemAction } from './basic/SidebarMenu';
69
75
  export { FolderButton } from './chat/FolderButton';
70
76
  export type { FolderButtonProps } from './chat/FolderButton';
71
77
  export { ChatInput, ChatInputRoot, ChatInputAbove, ChatInputBox, ChatInputAttachments, ChatInputInput, ChatInputActions, ChatInputActionsLeft, ChatInputActionsRight, ChatInputExpandButton, ChatInputFolderButton, ChatInputMoreButton, ChatInputSendButton, ChatInputFooterLeft, } from './chat/ChatInput';
@@ -100,8 +106,6 @@ export { ThinkingIndicator } from './chat/ThinkingIndicator';
100
106
  export type { ThinkingIndicatorProps } from './chat/ThinkingIndicator';
101
107
  export { ImageGenerating } from './chat/ImageGenerating';
102
108
  export type { ImageGeneratingProps } from './chat/ImageGenerating';
103
- export { SidebarMenu } from './chat/SidebarMenu';
104
- export type { SidebarMenuProps, SidebarMenuItem, SidebarMenuItemAction } from './chat/SidebarMenu';
105
109
  export { GeneratedImagesGrid } from './chat/GeneratedImagesGrid';
106
110
  export type { GeneratedImagesGridProps } from './chat/GeneratedImagesGrid';
107
111
  export { UserQuestion } from './chat/UserQuestion';
@@ -126,8 +130,6 @@ export { BrowserActionPart } from './chat/BrowserActionPart';
126
130
  export type { BrowserActionPartProps, BrowserActionStatus } from './chat/BrowserActionPart';
127
131
  export { AskUserPart } from './chat/AskUserPart';
128
132
  export type { AskUserPartProps } from './chat/AskUserPart';
129
- export { Progress } from './basic/Progress';
130
- export type { ProgressProps } from './basic/Progress';
131
133
  export { IconsProvider, useIcons, useIcon } from '../icons/context';
132
134
  export type { IconKey, IconComponent, IconProps } from '../icons/types';
133
135
  export type { IconsContextValue } from '../icons/context';
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * [INPUT]: (ClassValue[])
3
3
  * [OUTPUT]: (string) - 合并后的 class 名
4
- * [POS]: lib/utils.ts - 供主库与 registry 引用(@/lib/utils)
4
+ * [POS]: lib/utils.ts - registry 重导出,避免重复
5
5
  *
6
6
  * [PROTOCOL]:
7
- * 1. registry/lib/utils 保持一致,供从 registry 引入的组件解析
8
- * 2. 使用 clsx + tailwind-merge 合并类名
7
+ * 1. 唯一来源为 registry/lib/utils.ts
8
+ * 2. 此文件仅做重导出
9
9
  */
10
- import { type ClassValue } from 'clsx';
11
- export declare function cn(...inputs: ClassValue[]): string;
10
+ export { cn } from '../../registry/lib/utils';
11
+ export type { ClassValue } from 'clsx';
@@ -0,0 +1,270 @@
1
+ /* ============================================
2
+ * [POS]: src/tokens/theme-base.css - Tailwind v4 @theme 映射 + 动画 + 公共样式
3
+ * [OUTPUT]: CSS 变量映射到 Tailwind 工具类
4
+ *
5
+ * 此文件定义了 Token → Tailwind 的映射契约,不包含具体颜色值。
6
+ * 颜色值由 themes/*.css 中的 [data-theme="xxx"] 块定义。
7
+ *
8
+ * 用户自定义主题时只需:
9
+ * 1. 引入此文件(定义映射)
10
+ * 2. 引入自己的主题 CSS(覆盖 --token-color-* 变量)
11
+ * ============================================ */
12
+
13
+ /* ============================================
14
+ Tailwind v4 @theme 映射
15
+ ============================================ */
16
+ @custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *, [data-theme="dark-parchment"], [data-theme="dark-parchment"] *));
17
+
18
+ /* font-size / radius / spacing 随 data-style 变化,需用 @theme inline 让工具类直接引用运行时变量 */
19
+ @theme inline {
20
+ --text-xs: var(--font-size-xs);
21
+ --text-xs--line-height: var(--font-size-xs--line-height);
22
+ --text-sm: var(--font-size-sm);
23
+ --text-sm--line-height: var(--font-size-sm--line-height);
24
+ --text-base: var(--font-size-base);
25
+ --text-base--line-height: var(--font-size-base--line-height);
26
+ --text-lg: var(--font-size-lg);
27
+ --text-lg--line-height: var(--font-size-lg--line-height);
28
+ --text-xl: var(--font-size-xl);
29
+ --text-xl--line-height: var(--font-size-xl--line-height);
30
+ --text-2xl: var(--font-size-2xl);
31
+ --text-2xl--line-height: var(--font-size-2xl--line-height);
32
+ --text-3xl: var(--font-size-3xl);
33
+ --text-3xl--line-height: var(--font-size-3xl--line-height);
34
+ --text-4xl: var(--font-size-4xl);
35
+ --text-4xl--line-height: var(--font-size-4xl--line-height);
36
+ --text-5xl: var(--font-size-5xl);
37
+ --text-5xl--line-height: var(--font-size-5xl--line-height);
38
+ --text-6xl: var(--font-size-6xl);
39
+ --text-6xl--line-height: var(--font-size-6xl--line-height);
40
+ --radius: var(--radius-DEFAULT);
41
+ --radius-none: var(--radius-none);
42
+ --radius-sm: var(--radius-sm);
43
+ --radius-md: var(--radius-md);
44
+ --radius-lg: var(--radius-lg);
45
+ --radius-xl: var(--radius-xl);
46
+ --radius-2xl: var(--radius-2xl);
47
+ --radius-3xl: var(--radius-3xl);
48
+ --radius-full: var(--radius-full);
49
+ --spacing-0: var(--spacing-0);
50
+ --spacing-px: var(--spacing-px);
51
+ --spacing-0\.5: var(--spacing-0\.5);
52
+ --spacing-1: var(--spacing-1);
53
+ --spacing-1\.5: var(--spacing-1\.5);
54
+ --spacing-2: var(--spacing-2);
55
+ --spacing-2\.5: var(--spacing-2\.5);
56
+ --spacing-3: var(--spacing-3);
57
+ --spacing-3\.5: var(--spacing-3\.5);
58
+ --spacing-4: var(--spacing-4);
59
+ --spacing-5: var(--spacing-5);
60
+ --spacing-6: var(--spacing-6);
61
+ --spacing-7: var(--spacing-7);
62
+ --spacing-8: var(--spacing-8);
63
+ --spacing-9: var(--spacing-9);
64
+ --spacing-10: var(--spacing-10);
65
+ --spacing-11: var(--spacing-11);
66
+ --spacing-12: var(--spacing-12);
67
+ --spacing-14: var(--spacing-14);
68
+ --spacing-16: var(--spacing-16);
69
+ --spacing-20: var(--spacing-20);
70
+ --spacing-24: var(--spacing-24);
71
+ --spacing-28: var(--spacing-28);
72
+ --spacing-32: var(--spacing-32);
73
+ --spacing-36: var(--spacing-36);
74
+ --spacing-40: var(--spacing-40);
75
+ --spacing-44: var(--spacing-44);
76
+ --spacing-48: var(--spacing-48);
77
+ --spacing-52: var(--spacing-52);
78
+ --spacing-56: var(--spacing-56);
79
+ --spacing-60: var(--spacing-60);
80
+ --spacing-64: var(--spacing-64);
81
+ --spacing-72: var(--spacing-72);
82
+ --spacing-80: var(--spacing-80);
83
+ --spacing-96: var(--spacing-96);
84
+ }
85
+
86
+ @theme {
87
+ /* Font */
88
+ --font-display: 'Inter var', system-ui, sans-serif;
89
+ /* Primary */
90
+ --color-primary: var(--token-color-primary);
91
+ --color-primary-hover: var(--token-color-primary-hover);
92
+ --color-primary-active: var(--token-color-primary-active);
93
+ --color-primary-bg: var(--token-color-primary-bg);
94
+ --color-primary-bg-hover: var(--token-color-primary-bg-hover);
95
+ --color-primary-border: var(--token-color-primary-border);
96
+ --color-primary-border-hover: var(--token-color-primary-border-hover);
97
+ --color-primary-text: var(--token-color-primary-text);
98
+ --color-primary-text-hover: var(--token-color-primary-text-hover);
99
+ --color-primary-text-active: var(--token-color-primary-text-active);
100
+ --color-text-on-primary: var(--token-color-text-on-primary);
101
+
102
+ /* Text */
103
+ --color-text: var(--token-color-text);
104
+ --color-text-secondary: var(--token-color-text-secondary);
105
+ --color-text-tertiary: var(--token-color-text-tertiary);
106
+ --color-text-quaternary: var(--token-color-text-quaternary);
107
+ --color-text-base: var(--token-color-text-base);
108
+
109
+ /* Border */
110
+ --color-border: var(--token-color-border);
111
+ /* Select 等 - 映射到现有 token */
112
+ --color-input: var(--token-color-border-tertiary);
113
+ --color-ring: var(--token-color-primary-border);
114
+ --color-popover: var(--token-color-bg-container);
115
+ --color-popover-foreground: var(--token-color-text);
116
+ --color-accent: var(--token-color-fill-secondary);
117
+ --color-accent-foreground: var(--token-color-text);
118
+ --color-muted: var(--token-color-fill-tertiary);
119
+ --color-muted-foreground: var(--token-color-text-secondary);
120
+ --color-background: var(--token-color-bg-base);
121
+ --color-border-secondary: var(--token-color-border-secondary);
122
+ --color-border-tertiary: var(--token-color-border-tertiary);
123
+
124
+ /* Fill */
125
+ --color-fill: var(--token-color-fill);
126
+ --color-fill-secondary: var(--token-color-fill-secondary);
127
+ --color-fill-tertiary: var(--token-color-fill-tertiary);
128
+ --color-fill-quaternary: var(--token-color-fill-quaternary);
129
+ --color-fill-disable: var(--token-color-fill-disable);
130
+
131
+ /* Background */
132
+ --color-bg-container: var(--token-color-bg-container);
133
+ --color-bg-elevated: var(--token-color-bg-elevated);
134
+ --color-bg-layout: var(--token-color-bg-layout);
135
+ --color-bg-spotlight: var(--token-color-bg-spotlight);
136
+ --color-bg-mask: var(--token-color-bg-mask);
137
+ --color-mask-shimmer-weak: var(--token-color-mask-shimmer-weak);
138
+ --color-mask-shimmer-strong: var(--token-color-mask-shimmer-strong);
139
+ --color-mask-shimmer-full: var(--token-color-mask-shimmer-full);
140
+ --color-bg-base: var(--token-color-bg-base);
141
+ --color-bg-highlight: var(--token-color-bg-highlight);
142
+ --color-bg-highlight-hover: var(--token-color-bg-highlight-hover);
143
+
144
+ /* Shadow(1~4 级,与 primary/secondary/tertiary/quaternary 一致) */
145
+ --color-shadow-primary: var(--token-color-shadow-primary);
146
+ --color-shadow-secondary: var(--token-color-shadow-secondary);
147
+ --color-shadow-tertiary: var(--token-color-shadow-tertiary);
148
+ --color-shadow-quaternary: var(--token-color-shadow-quaternary);
149
+
150
+ /* Semantic */
151
+ --color-link: var(--token-color-link);
152
+ --color-error: var(--token-color-error);
153
+ --color-error-hover: var(--token-color-error-hover);
154
+ --color-error-bg: var(--token-color-error-bg);
155
+ --color-error-bg-hover: var(--token-color-error-bg-hover);
156
+ --color-error-border: var(--token-color-error-border);
157
+ --color-info: var(--token-color-info);
158
+ --color-info-hover: var(--token-color-info-hover);
159
+ --color-info-bg: var(--token-color-info-bg);
160
+ --color-info-bg-hover: var(--token-color-info-bg-hover);
161
+ --color-info-border: var(--token-color-info-border);
162
+ --color-success: var(--token-color-success);
163
+ --color-success-hover: var(--token-color-success-hover);
164
+ --color-success-bg: var(--token-color-success-bg);
165
+ --color-success-bg-hover: var(--token-color-success-bg-hover);
166
+ --color-success-border: var(--token-color-success-border);
167
+ --color-warning: var(--token-color-warning);
168
+ --color-warning-hover: var(--token-color-warning-hover);
169
+ --color-warning-bg: var(--token-color-warning-bg);
170
+ --color-warning-bg-hover: var(--token-color-warning-bg-hover);
171
+ --color-warning-border: var(--token-color-warning-border);
172
+
173
+ /* Accent */
174
+ --color-pink: var(--token-color-pink);
175
+ --color-pink-bg: var(--token-color-pink-bg);
176
+ --color-pink-bg-hover: var(--token-color-pink-bg-hover);
177
+ --color-purple: var(--token-color-purple);
178
+ --color-purple-bg: var(--token-color-purple-bg);
179
+ --color-purple-bg-hover: var(--token-color-purple-bg-hover);
180
+ --color-yellow: var(--token-color-yellow);
181
+ --color-yellow-bg: var(--token-color-yellow-bg);
182
+ --color-yellow-bg-hover: var(--token-color-yellow-bg-hover);
183
+ --color-orange: var(--token-color-orange);
184
+ --color-orange-bg: var(--token-color-orange-bg);
185
+ --color-orange-bg-hover: var(--token-color-orange-bg-hover);
186
+ --color-teal: var(--token-color-teal);
187
+ --color-teal-bg: var(--token-color-teal-bg);
188
+ --color-teal-bg-hover: var(--token-color-teal-bg-hover);
189
+ --color-blue: var(--token-color-blue);
190
+ --color-blue-bg: var(--token-color-blue-bg);
191
+ --color-blue-bg-hover: var(--token-color-blue-bg-hover);
192
+ --color-mauve: var(--token-color-mauve);
193
+ --color-mauve-bg: var(--token-color-mauve-bg);
194
+ --color-mauve-bg-hover: var(--token-color-mauve-bg-hover);
195
+ --color-slate: var(--token-color-slate);
196
+ --color-slate-bg: var(--token-color-slate-bg);
197
+ --color-slate-bg-hover: var(--token-color-slate-bg-hover);
198
+ --color-lavender: var(--token-color-lavender);
199
+ --color-lavender-bg: var(--token-color-lavender-bg);
200
+ --color-lavender-bg-hover: var(--token-color-lavender-bg-hover);
201
+ --color-sage: var(--token-color-sage);
202
+ --color-sage-bg: var(--token-color-sage-bg);
203
+ --color-sage-bg-hover: var(--token-color-sage-bg-hover);
204
+
205
+ /* Diff */
206
+ --color-diff-insert: var(--token-color-diff-insert);
207
+ --color-diff-insert-bg: var(--token-color-diff-insert-bg);
208
+ --color-diff-remove: var(--token-color-diff-remove);
209
+ --color-diff-remove-bg: var(--token-color-diff-remove-bg);
210
+
211
+ /* Accordion 展开/收起动画(Radix 提供 --radix-accordion-content-height) */
212
+ --animate-accordion-down: accordion-down 0.2s ease-out;
213
+ --animate-accordion-up: accordion-up 0.2s ease-out;
214
+ --animate-accordion-right: accordion-right 0.2s ease-out;
215
+ --animate-accordion-left: accordion-left 0.2s ease-out;
216
+ }
217
+
218
+ /* 行高随 data-style 变化,与 text-xs/text-sm/text-base 等配套使用,避免固定 leading-6 等 */
219
+ .leading-xs { line-height: var(--font-size-xs--line-height); }
220
+ .leading-sm { line-height: var(--font-size-sm--line-height); }
221
+ .leading-base { line-height: var(--font-size-base--line-height); }
222
+ .leading-lg { line-height: var(--font-size-lg--line-height); }
223
+ .leading-xl { line-height: var(--font-size-xl--line-height); }
224
+
225
+ @keyframes accordion-down {
226
+ from {
227
+ height: 0;
228
+ }
229
+ to {
230
+ height: var(--radix-accordion-content-height);
231
+ }
232
+ }
233
+ @keyframes accordion-up {
234
+ from {
235
+ height: var(--radix-accordion-content-height);
236
+ }
237
+ to {
238
+ height: 0;
239
+ }
240
+ }
241
+ @keyframes accordion-right {
242
+ from {
243
+ width: 0;
244
+ }
245
+ to {
246
+ width: var(--radix-accordion-content-width);
247
+ }
248
+ }
249
+ @keyframes accordion-left {
250
+ from {
251
+ width: var(--radix-accordion-content-width);
252
+ }
253
+ to {
254
+ width: 0;
255
+ }
256
+ }
257
+
258
+ /* ============================================
259
+ Seti 文件图标字体(与 QodeChatPanel 一致;需将 qoder-seti.woff 置于 public/ 或根路径)
260
+ ============================================ */
261
+ @font-face {
262
+ font-family: 'Seti';
263
+ src: url('/qoder-seti.woff') format('woff');
264
+ font-weight: normal;
265
+ font-style: normal;
266
+ font-display: swap;
267
+ }
268
+ .font-seti {
269
+ font-family: 'Seti', sans-serif;
270
+ }
@@ -0,0 +1,133 @@
1
+ /* ============================================
2
+ * Theme: Dark Parchment (羊皮纸暗色)
3
+ * 用户可复制此文件作为自定义主题模板
4
+ * ============================================ */
5
+
6
+ [data-theme="dark-parchment"] {
7
+ color-scheme: dark;
8
+ /* --- Primary --- */
9
+ --token-color-primary: #C4B8A8;
10
+ --token-color-primary-hover: #D4C9BC;
11
+ --token-color-primary-active: #A89888;
12
+ --token-color-primary-bg: #2D2A22;
13
+ --token-color-primary-bg-hover: #363228;
14
+ --token-color-primary-border: #4A463C;
15
+ --token-color-primary-border-hover: #5B564C;
16
+ --token-color-primary-text: #FAF9F6;
17
+ --token-color-primary-text-hover: #D4C9BC;
18
+ --token-color-primary-text-active: #C4B8A8;
19
+ --token-color-text-on-primary: #1A1814;
20
+
21
+ /* --- Text --- */
22
+ --token-color-text: #FAF9F6;
23
+ --token-color-text-secondary: #C9C4B8;
24
+ --token-color-text-tertiary: #A8A296;
25
+ --token-color-text-quaternary: #8A857A;
26
+ --token-color-text-base: #F0EDE7;
27
+
28
+ /* --- Border --- */
29
+ --token-color-border: #4A463C;
30
+ --token-color-border-secondary: #3D3930;
31
+ --token-color-border-tertiary: #2D2A22;
32
+
33
+ /* --- Fill --- */
34
+ --token-color-fill: #3D3930;
35
+ --token-color-fill-secondary: #363228;
36
+ --token-color-fill-tertiary: #252220;
37
+ --token-color-fill-quaternary: #1E1C18;
38
+ --token-color-fill-disable: #4A463C;
39
+
40
+ /* --- Background --- */
41
+ --token-color-bg-container: #1E1C18;
42
+ --token-color-bg-elevated: #252220;
43
+ --token-color-bg-layout: #1A1814;
44
+ --token-color-bg-spotlight: #252220;
45
+ --token-color-bg-mask: rgba(0, 0, 0, 0.6);
46
+ /* PlanPart 点阵高亮遮罩渐变(随主题) */
47
+ --token-color-mask-shimmer-weak: rgba(0, 0, 0, 0.3);
48
+ --token-color-mask-shimmer-strong: rgba(0, 0, 0, 0.8);
49
+ --token-color-mask-shimmer-full: rgba(0, 0, 0, 1);
50
+ --token-color-bg-base: #1A1814;
51
+ --token-color-bg-highlight: #C9C4B8;
52
+ --token-color-bg-highlight-hover: #D4C9BC;
53
+
54
+ /* --- Semantic Colors --- */
55
+ --token-color-link: #C4B8A8;
56
+ --token-color-error: #FF6B6B;
57
+ --token-color-error-hover: #FF8787;
58
+ --token-color-error-bg: #4A2A2A;
59
+ --token-color-error-bg-hover: #5C3535;
60
+ --token-color-error-border: #663338;
61
+ --token-color-info: #5EBCFF;
62
+ --token-color-info-hover: #7EC9FF;
63
+ --token-color-info-bg: #1A2838;
64
+ --token-color-info-bg-hover: #223244;
65
+ --token-color-info-border: #2A4050;
66
+ --token-color-success: #6B8F71;
67
+ --token-color-success-hover: #7FA385;
68
+ --token-color-success-bg: #1C2A1E;
69
+ --token-color-success-bg-hover: #243224;
70
+ --token-color-success-border: #3D4A3C;
71
+ --token-color-warning: #E5A814;
72
+ --token-color-warning-hover: #F5C024;
73
+ --token-color-warning-bg: #4A4019;
74
+ --token-color-warning-bg-hover: #5C4E1F;
75
+ --token-color-warning-border: #664D19;
76
+
77
+ /* --- Accent Colors --- */
78
+ --token-color-pink: #EC4899;
79
+ --token-color-pink-bg: #4A2A38;
80
+ --token-color-pink-bg-hover: #5C3540;
81
+ --token-color-purple: #8B7BED;
82
+ --token-color-purple-bg: #2A2238;
83
+ --token-color-purple-bg-hover: #362E44;
84
+ --token-color-yellow: #E5C04A;
85
+ --token-color-yellow-bg: #4A4030;
86
+ --token-color-yellow-bg-hover: #5C5040;
87
+ --token-color-orange: #E07830;
88
+ --token-color-orange-bg: #4A3020;
89
+ --token-color-orange-bg-hover: #5C3A28;
90
+ --token-color-teal: #14B8A6;
91
+ --token-color-teal-bg: #1A3230;
92
+ --token-color-teal-bg-hover: #243A38;
93
+ --token-color-blue: #0090FF;
94
+ --token-color-blue-bg: #1A2838;
95
+ --token-color-blue-bg-hover: #223244;
96
+ --token-color-mauve: #9C9AA8;
97
+ --token-color-mauve-bg: #2A2830;
98
+ --token-color-mauve-bg-hover: #363438;
99
+ --token-color-slate: #5C5A52;
100
+ --token-color-slate-bg: #2D2A22;
101
+ --token-color-slate-bg-hover: #363228;
102
+ --token-color-lavender: #B99DFF;
103
+ --token-color-lavender-bg: #2A2238;
104
+ --token-color-lavender-bg-hover: #362E44;
105
+ --token-color-sage: #6BB394;
106
+ --token-color-sage-bg: #1C2A24;
107
+ --token-color-sage-bg-hover: #243228;
108
+
109
+ /* --- Select 等组件 (input/ring/popover 等) --- */
110
+ --token-color-input: var(--token-color-border-tertiary);
111
+ --token-color-ring: var(--token-color-primary-border);
112
+ --token-color-popover: var(--token-color-bg-container);
113
+ --token-color-popover-foreground: var(--token-color-text);
114
+ --token-color-accent: var(--token-color-fill-secondary);
115
+ --token-color-accent-foreground: var(--token-color-text);
116
+ --token-color-muted: var(--token-color-fill-tertiary);
117
+ --token-color-muted-foreground: var(--token-color-text-secondary);
118
+ --token-color-background: var(--token-color-bg-base);
119
+
120
+ /* --- Diff --- */
121
+ --token-color-diff-insert: #6B8F71;
122
+ --token-color-diff-insert-bg: #1C2A1E;
123
+ --token-color-diff-remove: #FC6B83;
124
+ --token-color-diff-remove-bg: #2A1C1E;
125
+ }
126
+
127
+ /* SendButton: dark-parchment 模式下 normal 状态使用 success 色 */
128
+ [data-theme="dark-parchment"] .SendButton-send {
129
+ background-color: var(--token-color-success);
130
+ }
131
+ [data-theme="dark-parchment"] .SendButton-send:hover:not(:disabled) {
132
+ background-color: var(--token-color-success-hover);
133
+ }
@@ -0,0 +1,133 @@
1
+ /* ============================================
2
+ * Theme: Dark (暗色模式)
3
+ * 用户可复制此文件作为自定义主题模板
4
+ * ============================================ */
5
+
6
+ [data-theme="dark"] {
7
+ color-scheme: dark;
8
+ /* --- Primary --- */
9
+ --token-color-primary: #8EE5A1;
10
+ --token-color-primary-hover: #9BE6B3;
11
+ --token-color-primary-active: #73CD94;
12
+ --token-color-primary-bg: #14261C;
13
+ --token-color-primary-bg-hover: #1A2E21;
14
+ --token-color-primary-border: #335942;
15
+ --token-color-primary-border-hover: #407354;
16
+ --token-color-primary-text: #8EE5A1;
17
+ --token-color-primary-text-hover: #9BE6B3;
18
+ --token-color-primary-text-active: #73CD94;
19
+ --token-color-text-on-primary: #0D0D0D;
20
+
21
+ /* --- Text --- */
22
+ --token-color-text: #FAF9F5;
23
+ --token-color-text-secondary: #9C9D9E;
24
+ --token-color-text-tertiary: #7C7D7F;
25
+ --token-color-text-quaternary: #717374;
26
+ --token-color-text-base: #F0F2F3;
27
+
28
+ /* --- Border --- */
29
+ --token-color-border: #404040;
30
+ --token-color-border-secondary: #2A2A2A;
31
+ --token-color-border-tertiary: #262626;
32
+
33
+ /* --- Fill --- */
34
+ --token-color-fill: #454545;
35
+ --token-color-fill-secondary: #363636;
36
+ --token-color-fill-tertiary: #1A1A1A;
37
+ --token-color-fill-quaternary: #1A1A1A;
38
+ --token-color-fill-disable: #525252;
39
+
40
+ /* --- Background --- */
41
+ --token-color-bg-container: #0D0D0D;
42
+ --token-color-bg-elevated: #080808;
43
+ --token-color-bg-layout: #050505;
44
+ --token-color-bg-spotlight: #080808;
45
+ --token-color-bg-mask: rgba(0, 0, 0, 0.7);
46
+ /* PlanPart 点阵高亮遮罩渐变(随主题) */
47
+ --token-color-mask-shimmer-weak: rgba(0, 0, 0, 0.3);
48
+ --token-color-mask-shimmer-strong: rgba(0, 0, 0, 0.8);
49
+ --token-color-mask-shimmer-full: rgba(0, 0, 0, 1);
50
+ --token-color-bg-base: #000000;
51
+ --token-color-bg-highlight: #d0d0d0;
52
+ --token-color-bg-highlight-hover: #e0e0e0;
53
+
54
+ /* --- Semantic Colors --- */
55
+ --token-color-link: #8EE5A1;
56
+ --token-color-error: #FF4D4F;
57
+ --token-color-error-hover: #FF7875;
58
+ --token-color-error-bg: #4A1A1B;
59
+ --token-color-error-bg-hover: #5C2224;
60
+ --token-color-error-border: #663338;
61
+ --token-color-info: #0B83F1;
62
+ --token-color-info-hover: #5EBCFF;
63
+ --token-color-info-bg: #19080E;
64
+ --token-color-info-bg-hover: #220A12;
65
+ --token-color-info-border: #4F1C0E;
66
+ --token-color-success: #73CD94;
67
+ --token-color-success-hover: #8EE5A1;
68
+ --token-color-success-bg: #14261C;
69
+ --token-color-success-bg-hover: #1A2E21;
70
+ --token-color-success-border: #335942;
71
+ --token-color-warning: #FAAD14;
72
+ --token-color-warning-hover: #FFD666;
73
+ --token-color-warning-bg: #4A4019;
74
+ --token-color-warning-bg-hover: #5C4E1F;
75
+ --token-color-warning-border: #664D19;
76
+
77
+ /* --- Accent Colors --- */
78
+ --token-color-pink: #EC4899;
79
+ --token-color-pink-bg: #4A1C31;
80
+ --token-color-pink-bg-hover: #5C2440;
81
+ --token-color-purple: #615CED;
82
+ --token-color-purple-bg: #14160E;
83
+ --token-color-purple-bg-hover: #1C1E14;
84
+ --token-color-yellow: #FAC414;
85
+ --token-color-yellow-bg: #4A4030;
86
+ --token-color-yellow-bg-hover: #5C5040;
87
+ --token-color-orange: #FA8125;
88
+ --token-color-orange-bg: #4A1021;
89
+ --token-color-orange-bg-hover: #5C1429;
90
+ --token-color-teal: #14B8A6;
91
+ --token-color-teal-bg: #21080E;
92
+ --token-color-teal-bg-hover: #2E0E14;
93
+ --token-color-blue: #0090FF;
94
+ --token-color-blue-bg: #21120E;
95
+ --token-color-blue-bg-hover: #2E1A14;
96
+ --token-color-mauve: #8E8C99;
97
+ --token-color-mauve-bg: #0E0D0C;
98
+ --token-color-mauve-bg-hover: #1A1818;
99
+ --token-color-slate: #363636;
100
+ --token-color-slate-bg: #1a1a1a;
101
+ --token-color-slate-bg-hover: #262626;
102
+ --token-color-lavender: #B99DFF;
103
+ --token-color-lavender-bg: #131B0E;
104
+ --token-color-lavender-bg-hover: #1C2614;
105
+ --token-color-sage: #6BB394;
106
+ --token-color-sage-bg: #100C0D;
107
+ --token-color-sage-bg-hover: #1A1418;
108
+
109
+ /* --- Select 等组件 (input/ring/popover 等) --- */
110
+ --token-color-input: var(--token-color-border-tertiary);
111
+ --token-color-ring: var(--token-color-primary-border);
112
+ --token-color-popover: var(--token-color-bg-container);
113
+ --token-color-popover-foreground: var(--token-color-text);
114
+ --token-color-accent: var(--token-color-fill-secondary);
115
+ --token-color-accent-foreground: var(--token-color-text);
116
+ --token-color-muted: var(--token-color-fill-tertiary);
117
+ --token-color-muted-foreground: var(--token-color-text-secondary);
118
+ --token-color-background: var(--token-color-bg-base);
119
+
120
+ /* --- Diff --- */
121
+ --token-color-diff-insert: #73CD94;
122
+ --token-color-diff-insert-bg: #14261C;
123
+ --token-color-diff-remove: #FC6B83;
124
+ --token-color-diff-remove-bg: #1C2E2A;
125
+ }
126
+
127
+ /* SendButton: dark 模式下 normal 状态使用 success 色(与 light 下 bg-bg-highlight 区分) */
128
+ [data-theme="dark"] .SendButton-send {
129
+ background-color: var(--token-color-success);
130
+ }
131
+ [data-theme="dark"] .SendButton-send:hover:not(:disabled) {
132
+ background-color: var(--token-color-success-hover);
133
+ }