sparkdesign 0.4.7 → 0.4.9

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 (96) hide show
  1. package/cli/registry/AGENTS.md +1 -1
  2. package/cli/registry/agent-manifest.json +3996 -67
  3. package/cli/registry/basic/accordion.tsx +79 -0
  4. package/cli/registry/basic/alert-dialog.tsx +3 -6
  5. package/cli/registry/basic/badge.tsx +49 -0
  6. package/cli/registry/basic/button.tsx +32 -14
  7. package/cli/registry/basic/card.tsx +20 -8
  8. package/cli/registry/basic/collapsible-card.tsx +12 -5
  9. package/cli/registry/basic/combobox.tsx +104 -46
  10. package/cli/registry/basic/context-menu.tsx +2 -3
  11. package/cli/registry/basic/date-picker.tsx +78 -7
  12. package/cli/registry/basic/dialog.tsx +3 -8
  13. package/cli/registry/basic/drawer.tsx +3 -5
  14. package/cli/registry/basic/dropdown-menu.tsx +2 -3
  15. package/cli/registry/basic/ellipsis-text.tsx +151 -0
  16. package/cli/registry/basic/form.tsx +186 -0
  17. package/cli/registry/basic/hover-card.tsx +2 -3
  18. package/cli/registry/basic/icon-button.tsx +29 -14
  19. package/cli/registry/basic/input-group.tsx +4 -4
  20. package/cli/registry/basic/input.tsx +29 -13
  21. package/cli/registry/basic/popover.tsx +2 -3
  22. package/cli/registry/basic/select.tsx +24 -4
  23. package/cli/registry/basic/sidebar.tsx +665 -0
  24. package/cli/registry/basic/sonner.tsx +10 -10
  25. package/cli/registry/basic/spinner.tsx +20 -5
  26. package/cli/registry/basic/textarea.tsx +30 -12
  27. package/cli/registry/basic/tooltip.tsx +2 -1
  28. package/cli/registry/chat/chat-input/compound.tsx +1 -0
  29. package/cli/registry/chat/user-question/compound.tsx +2 -0
  30. package/cli/registry/meta.json +250 -30
  31. package/dist/registry/basic/accordion.d.ts +15 -0
  32. package/dist/registry/basic/alert-dialog.d.ts +1 -1
  33. package/dist/registry/basic/avatar.d.ts +1 -1
  34. package/dist/registry/basic/badge.d.ts +23 -0
  35. package/dist/registry/basic/button.d.ts +3 -1
  36. package/dist/registry/basic/card.d.ts +9 -4
  37. package/dist/registry/basic/combobox.d.ts +20 -9
  38. package/dist/registry/basic/date-picker.d.ts +18 -9
  39. package/dist/registry/basic/dialog.d.ts +1 -1
  40. package/dist/registry/basic/ellipsis-text.d.ts +45 -0
  41. package/dist/registry/basic/form.d.ts +23 -0
  42. package/dist/registry/basic/icon-button.d.ts +17 -3
  43. package/dist/registry/basic/input-group.d.ts +5 -3
  44. package/dist/registry/basic/input.d.ts +8 -3
  45. package/dist/registry/basic/item.d.ts +3 -3
  46. package/dist/registry/basic/resizable.d.ts +48 -48
  47. package/dist/registry/basic/select.d.ts +7 -2
  48. package/dist/registry/basic/sidebar.d.ts +72 -0
  49. package/dist/registry/basic/spinner.d.ts +6 -2
  50. package/dist/registry/basic/tag.d.ts +1 -1
  51. package/dist/registry/basic/textarea.d.ts +9 -3
  52. package/dist/registry/basic/toggle.d.ts +1 -1
  53. package/dist/scale/computed.css +11 -0
  54. package/dist/scale/config.css +11 -0
  55. package/dist/scale/presets/compact.css +7 -0
  56. package/dist/scale/presets/dense.css +7 -0
  57. package/dist/scale/presets/sharp.css +7 -0
  58. package/dist/scale/presets/soft.css +7 -0
  59. package/dist/spark-design.cjs.js +34 -37
  60. package/dist/spark-design.es.js +7200 -4933
  61. package/dist/sparkdesign.css +1 -1
  62. package/dist/src/components/basic/Accordion/index.d.ts +13 -0
  63. package/dist/src/components/basic/Badge/index.d.ts +13 -0
  64. package/dist/src/components/basic/EllipsisText/index.d.ts +4 -36
  65. package/dist/src/components/basic/Form/index.d.ts +12 -0
  66. package/dist/src/components/basic/Sidebar/index.d.ts +13 -0
  67. package/dist/src/components/index.d.ts +7 -3
  68. package/dist/src/lib/index.d.ts +1 -1
  69. package/dist/src/lib/motion.d.ts +79 -0
  70. package/dist/theme-base.css +22 -0
  71. package/dist/themes/dark-mint.css +6 -0
  72. package/dist/themes/dark-parchment.css +6 -0
  73. package/dist/themes/light-parchment.css +6 -0
  74. package/dist/tokens/scale/computed.css +11 -0
  75. package/dist/tokens/scale/config.css +11 -0
  76. package/dist/tokens/scale/presets/compact.css +7 -0
  77. package/dist/tokens/scale/presets/dense.css +7 -0
  78. package/dist/tokens/scale/presets/sharp.css +7 -0
  79. package/dist/tokens/scale/presets/soft.css +7 -0
  80. package/dist/tokens/theme-base.css +22 -0
  81. package/dist/tokens/themes/dark-mint.css +6 -0
  82. package/dist/tokens/themes/dark-parchment.css +6 -0
  83. package/dist/tokens/themes/light-parchment.css +6 -0
  84. package/docs/agent/component-selection.md +106 -4
  85. package/package.json +8 -3
  86. package/registry/agent-manifest.json +3996 -67
  87. package/cli/registry/chat/user-question/UserQuestionCard.tsx +0 -198
  88. package/cli/registry/chat/user-question/UserQuestionFooter.tsx +0 -66
  89. package/cli/registry/chat/user-question/UserQuestionHeader.tsx +0 -64
  90. package/cli/registry/chat/user-question/useUserQuestionState.ts +0 -165
  91. package/dist/registry/chat/user-question/UserQuestionCard.d.ts +0 -36
  92. package/dist/registry/chat/user-question/UserQuestionFooter.d.ts +0 -24
  93. package/dist/registry/chat/user-question/UserQuestionHeader.d.ts +0 -26
  94. package/dist/registry/chat/user-question/useUserQuestionState.d.ts +0 -26
  95. package/dist/src/components/basic/CollapsibleSection/index.d.ts +0 -43
  96. package/dist/src/components/chat/Response/StreamingMarkdownBlock.d.ts +0 -12
@@ -0,0 +1,13 @@
1
+ /**
2
+ * [WHO]: Accordion and sub-parts re-export from registry.
3
+ * [FROM]: registry/basic/accordion.
4
+ * [TO]: sparkdesign package consumers; src/components barrel.
5
+ * [HERE]: src/components/basic/Accordion/index.tsx — published Accordion wrapper.
6
+ *
7
+ * [PROTOCOL]:
8
+ * 1. Keep this P3 header in sync when the public contract changes.
9
+ * 2. Update module AGENTS.md (P2) and root AGENTS.md (P1) when boundaries change.
10
+ * 3. Follow design tokens and explicit type exports.
11
+ */
12
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent, } from '../../../../registry/basic/accordion';
13
+ export type { AccordionProps, AccordionItemProps, AccordionTriggerProps, AccordionContentProps, } from '../../../../registry/basic/accordion';
@@ -0,0 +1,13 @@
1
+ /**
2
+ * [WHO]: Badge re-export from registry.
3
+ * [FROM]: registry/basic/badge.
4
+ * [TO]: sparkdesign package consumers; src/components barrel.
5
+ * [HERE]: src/components/basic/Badge/index.tsx — published Badge wrapper.
6
+ *
7
+ * [PROTOCOL]:
8
+ * 1. Keep this P3 header in sync when the public contract changes.
9
+ * 2. Update module AGENTS.md (P2) and root AGENTS.md (P1) when boundaries change.
10
+ * 3. Follow design tokens and explicit type exports.
11
+ */
12
+ export { Badge, badgeVariants } from '../../../../registry/basic/badge';
13
+ export type { BadgeProps } from '../../../../registry/basic/badge';
@@ -1,45 +1,13 @@
1
1
  /**
2
2
  * [WHO]: Public exports from this file (see implementation below).
3
- * [FROM]: See the import block immediately after this header.
3
+ * [FROM]: registry/basic/ellipsis-text.
4
4
  * [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
5
- * [HERE]: src/components/basic/EllipsisText/index.tsx — Spark Design source; keep aligned with the main library.
5
+ * [HERE]: src/components/basic/EllipsisText/index.tsx — packaged wrapper for EllipsisText.
6
6
  *
7
7
  * [PROTOCOL]:
8
8
  * 1. Keep this P3 header in sync when the public contract changes.
9
9
  * 2. Update module AGENTS.md (P2) and root AGENTS.md (P1) when boundaries change.
10
10
  * 3. Follow design tokens and explicit type exports.
11
11
  */
12
- import { type ReactNode, type CSSProperties } from 'react';
13
- export interface EllipsisTextProps {
14
- /** 要显示的文本内容 */
15
- children: ReactNode;
16
- /**
17
- * 最大显示行数,超出会显示省略号
18
- * @default 1
19
- */
20
- lines?: number;
21
- /** 容器额外类名 */
22
- className?: string;
23
- /**
24
- * Tooltip 弹出方向
25
- * @default 'top'
26
- */
27
- placement?: 'top' | 'bottom' | 'left' | 'right';
28
- /** Tooltip 内容额外类名 */
29
- tooltipClassName?: string;
30
- /** 自定义 tooltip 内容,默认使用 children */
31
- tooltipContent?: ReactNode;
32
- /**
33
- * 是否禁用 tooltip
34
- * @default false
35
- */
36
- disabled?: boolean;
37
- /** 容器行内样式 */
38
- style?: CSSProperties;
39
- /**
40
- * 文本元素的标签类型
41
- * @default 'span'
42
- */
43
- as?: 'span' | 'div' | 'p';
44
- }
45
- export declare const EllipsisText: import("react").ForwardRefExoticComponent<EllipsisTextProps & import("react").RefAttributes<HTMLElement>>;
12
+ export { EllipsisText } from '../../../../registry/basic/ellipsis-text';
13
+ export type { EllipsisTextProps } from '../../../../registry/basic/ellipsis-text';
@@ -0,0 +1,12 @@
1
+ /**
2
+ * [WHO]: Form helpers re-export from registry.
3
+ * [FROM]: registry/basic/form.
4
+ * [TO]: sparkdesign package consumers; src/components barrel.
5
+ * [HERE]: src/components/basic/Form/index.tsx — published React Hook Form helper wrapper.
6
+ *
7
+ * [PROTOCOL]:
8
+ * 1. Keep this P3 header in sync when the public contract changes.
9
+ * 2. Update module AGENTS.md (P2) and root AGENTS.md (P1) when boundaries change.
10
+ * 3. Follow design tokens and explicit type exports.
11
+ */
12
+ export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, } from '../../../../registry/basic/form';
@@ -0,0 +1,13 @@
1
+ /**
2
+ * [WHO]: Sidebar primitives re-export from registry.
3
+ * [FROM]: registry/basic/sidebar.
4
+ * [TO]: sparkdesign package consumers; src/components barrel.
5
+ * [HERE]: src/components/basic/Sidebar/index.tsx — published Sidebar wrapper.
6
+ *
7
+ * [PROTOCOL]:
8
+ * 1. Keep this P3 header in sync when the public contract changes.
9
+ * 2. Update module AGENTS.md (P2) and root AGENTS.md (P1) when boundaries change.
10
+ * 3. Follow design tokens and explicit type exports.
11
+ */
12
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, sidebarMenuButtonVariants, useSidebar, } from '../../../../registry/basic/sidebar';
13
+ export { SidebarMenu as SidebarNavMenu, SidebarMenuItem as SidebarNavMenuItem, } from '../../../../registry/basic/sidebar';
@@ -13,6 +13,8 @@ export { Button } from './basic/Button';
13
13
  export type { ButtonProps } from './basic/Button';
14
14
  export { ButtonGroup, ButtonGroupText, ButtonGroupSeparator, buttonGroupVariants, } from './basic/ButtonGroup';
15
15
  export type { ButtonGroupProps, ButtonGroupTextProps, ButtonGroupSeparatorProps, } from './basic/ButtonGroup';
16
+ export { Badge, badgeVariants } from './basic/Badge';
17
+ export type { BadgeProps } from './basic/Badge';
16
18
  export { IconButton } from './basic/IconButton';
17
19
  export type { IconButtonProps } from './basic/IconButton';
18
20
  export { Tooltip } from './basic/Tooltip';
@@ -33,8 +35,6 @@ export { Toggle, ToggleGroup, ToggleGroupItem } from './basic/Toggle';
33
35
  export type { ToggleProps, ToggleGroupProps, ToggleGroupItemProps } from './basic/Toggle';
34
36
  export { RadioGroup, RadioGroupItem } from './basic/RadioGroup';
35
37
  export type { RadioGroupProps, RadioGroupItemProps } from './basic/RadioGroup';
36
- export { CollapsibleSection } from './basic/CollapsibleSection';
37
- export type { CollapsibleSectionProps } from './basic/CollapsibleSection';
38
38
  export { Collapsible, CollapsibleTrigger, CollapsibleContent } from './basic/Collapsible';
39
39
  export { ResizablePanelGroup, ResizablePanel, ResizableHandle, } from './basic/Resizable';
40
40
  export type { ResizablePanelGroupProps, ResizablePanelProps, ResizableHandleProps, } from './basic/Resizable';
@@ -56,6 +56,8 @@ export { Select, SelectTrigger, SelectValue, SelectContent, SelectLabel, SelectS
56
56
  export type { SelectProps, SelectTriggerProps, SelectValueProps, SelectContentProps, SelectLabelProps, SelectSeparatorProps, SelectGroupProps, SelectItemProps, } from './basic/Select';
57
57
  export { Tabs, TabsList, TabsTrigger, TabsContent, } from './basic/Tabs';
58
58
  export type { TabsProps, TabsListProps, TabsTriggerProps, TabsContentProps, } from './basic/Tabs';
59
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent, } from './basic/Accordion';
60
+ export type { AccordionProps, AccordionItemProps, AccordionTriggerProps, AccordionContentProps, } from './basic/Accordion';
59
61
  export { Collapse, CollapseItem, CollapseTrigger, CollapseContent, } from './basic/Collapse';
60
62
  export type { CollapseProps, CollapseItemProps, CollapseTriggerProps, CollapseContentProps, } from './basic/Collapse';
61
63
  export { TypographyH1, TypographyH2, TypographyH3, TypographyH4, TypographyP, TypographyBlockquote, TypographyTable, TypographyList, TypographyInlineCode, TypographyLead, TypographyLarge, TypographySmall, TypographyMuted, } from './basic/Typography';
@@ -72,6 +74,7 @@ export { CollapsibleCard } from './basic/CollapsibleCard';
72
74
  export type { CollapsibleCardProps } from './basic/CollapsibleCard';
73
75
  export { SidebarMenu } from './basic/SidebarMenu';
74
76
  export type { SidebarMenuProps, SidebarMenuItem, SidebarMenuItemAction } from './basic/SidebarMenu';
77
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SidebarNavMenu, SidebarNavMenuItem, sidebarMenuButtonVariants, useSidebar, } from './basic/Sidebar';
75
78
  export { Input } from './basic/Input';
76
79
  export type { InputProps } from './basic/Input';
77
80
  export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupTextarea, InputGroupText, } from './basic/InputGroup';
@@ -79,6 +82,7 @@ export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator, } from './bas
79
82
  export { Textarea } from './basic/Textarea';
80
83
  export type { TextareaProps } from './basic/Textarea';
81
84
  export { Field, FieldLabel, FieldDescription, FieldError, FieldContent, FieldTitle, FieldSeparator, FieldSet, FieldLegend, FieldGroup, } from './basic/Field';
85
+ export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, } from './basic/Form';
82
86
  export { Label } from './basic/Label';
83
87
  export type { LabelProps } from './basic/Label';
84
88
  export { Checkbox, checkboxVariants } from './basic/Checkbox';
@@ -189,5 +193,5 @@ export { IconsProvider, useIcons, useIcon } from '../icons/context';
189
193
  export type { IconKey, IconComponent, IconProps } from '../icons/types';
190
194
  export type { IconsContextValue } from '../icons/context';
191
195
  export { ThemeStyleProvider, useThemeStyle, type Appearance, type ThemePreset, type CustomTheme, type Theme, type StylePreset, type CustomStyle, type Style, type ThemeStyleContextValue, type ThemeStyleProviderProps, type ThemeStyleValue, } from '../lib/ThemeStyleContext';
192
- export { MOTION_DURATION, MOTION_EASE, MOTION_SPRING } from '../lib/motion';
196
+ export { MOTION_DURATION, MOTION_EASE, MOTION_SPRING, MOTION_FADE, MOTION_SLIDE_UP, MOTION_SCALE_IN, MOTION_EXPAND, getReducedMotion, getMotionMultiplier, } from '../lib/motion';
193
197
  export { FILE_TYPE_MAP, SETI_CHAR_MAP, SETI_COLOR_MAP, TYPE_TO_TOKEN_CLASS, getSetiIconType, getSetiIcon, getSetiIconColor, getFileIconColorClass, } from '../lib';
@@ -13,4 +13,4 @@ export { getFileIconByFilename } from './file-icon';
13
13
  export { FILE_TYPE_MAP, SETI_CHAR_MAP, SETI_COLOR_MAP, TYPE_TO_TOKEN_CLASS, getSetiIconType, getSetiIcon, getSetiIconColor, getFileIconColorClass, } from '../../registry/lib/file-icon-maps';
14
14
  export { default as i18n } from './i18n';
15
15
  export { ThemeStyleProvider, useThemeStyle, type Appearance, type ThemePreset, type CustomTheme, type Theme, type StylePreset, type CustomStyle, type Style, type ThemeStyleContextValue, type ThemeStyleProviderProps, type ThemeStyleValue, } from './ThemeStyleContext';
16
- export { MOTION_DURATION, MOTION_EASE, MOTION_SPRING } from './motion';
16
+ export { MOTION_DURATION, MOTION_EASE, MOTION_SPRING, MOTION_FADE, MOTION_SLIDE_UP, MOTION_SCALE_IN, MOTION_EXPAND, getReducedMotion, getMotionMultiplier, } from './motion';
@@ -20,3 +20,82 @@ export declare const MOTION_SPRING: {
20
20
  readonly mass: 0.7;
21
21
  };
22
22
  };
23
+ /** Overlay fade (dialog masks, backdrops) */
24
+ export declare const MOTION_FADE: {
25
+ readonly initial: {
26
+ readonly opacity: 0;
27
+ };
28
+ readonly animate: {
29
+ readonly opacity: 1;
30
+ };
31
+ readonly exit: {
32
+ readonly opacity: 0;
33
+ };
34
+ readonly transition: {
35
+ readonly duration: 0.15;
36
+ };
37
+ };
38
+ /** Content slide-up (dialogs, alert-dialogs) */
39
+ export declare const MOTION_SLIDE_UP: {
40
+ readonly initial: {
41
+ readonly opacity: 0;
42
+ readonly y: 8;
43
+ };
44
+ readonly animate: {
45
+ readonly opacity: 1;
46
+ readonly y: 0;
47
+ };
48
+ readonly exit: {
49
+ readonly opacity: 0;
50
+ readonly y: 8;
51
+ };
52
+ readonly transition: {
53
+ readonly duration: 0.2;
54
+ readonly ease: readonly [0.16, 1, 0.3, 1];
55
+ };
56
+ };
57
+ /** Scale-in (tooltips, popovers, dropdowns, context menus, hover cards) */
58
+ export declare const MOTION_SCALE_IN: {
59
+ readonly initial: {
60
+ readonly opacity: 0;
61
+ readonly scale: 0.96;
62
+ };
63
+ readonly animate: {
64
+ readonly opacity: 1;
65
+ readonly scale: 1;
66
+ };
67
+ readonly exit: {
68
+ readonly opacity: 0;
69
+ readonly scale: 0.96;
70
+ };
71
+ readonly transition: {
72
+ readonly duration: 0.15;
73
+ readonly ease: readonly [0.16, 1, 0.3, 1];
74
+ };
75
+ };
76
+ /** Expand (collapsible sections, accordion-like reveals) */
77
+ export declare const MOTION_EXPAND: {
78
+ readonly initial: {
79
+ readonly opacity: 0;
80
+ readonly height: 0;
81
+ };
82
+ readonly animate: {
83
+ readonly opacity: 1;
84
+ readonly height: "auto";
85
+ };
86
+ readonly exit: {
87
+ readonly opacity: 0;
88
+ readonly height: 0;
89
+ };
90
+ readonly transition: {
91
+ readonly duration: 0.2;
92
+ readonly ease: readonly [0.2, 0.8, 0.2, 1];
93
+ };
94
+ };
95
+ /** Check if user prefers reduced motion (SSR-safe) */
96
+ export declare function getReducedMotion(): boolean;
97
+ /**
98
+ * Read the --motion-multiplier CSS variable from the DOM (SSR-safe).
99
+ * Presets override this value to make motion faster or slower.
100
+ */
101
+ export declare function getMotionMultiplier(): number;
@@ -146,6 +146,14 @@
146
146
  --color-shadow-tertiary: var(--token-color-shadow-tertiary);
147
147
  --color-shadow-quaternary: var(--token-color-shadow-quaternary);
148
148
 
149
+ /* Elevation — 完整 box-shadow value token,Tailwind shadow-* 类自动消费 */
150
+ --shadow-xs: 0 1px 2px var(--color-shadow-primary);
151
+ --shadow-sm: 0 1px 3px var(--color-shadow-secondary), 0 1px 2px var(--color-shadow-primary);
152
+ --shadow-md: 0 4px 6px var(--color-shadow-secondary), 0 2px 4px var(--color-shadow-primary);
153
+ --shadow-lg: 0 10px 15px var(--color-shadow-tertiary), 0 4px 6px var(--color-shadow-secondary);
154
+ --shadow-xl: 0 20px 25px var(--color-shadow-tertiary), 0 8px 10px var(--color-shadow-secondary);
155
+ --shadow-2xl: 0 25px 50px var(--color-shadow-quaternary);
156
+
149
157
  /* Semantic */
150
158
  --color-link: var(--token-color-link);
151
159
  --color-error: var(--token-color-error);
@@ -254,6 +262,20 @@
254
262
  }
255
263
  }
256
264
 
265
+ /* ============================================
266
+ Reduced motion — 全局无障碍
267
+ ============================================ */
268
+ @media (prefers-reduced-motion: reduce) {
269
+ *,
270
+ *::before,
271
+ *::after {
272
+ animation-duration: 0.01ms !important;
273
+ animation-iteration-count: 1 !important;
274
+ transition-duration: 0.01ms !important;
275
+ scroll-behavior: auto !important;
276
+ }
277
+ }
278
+
257
279
  /* ============================================
258
280
  Seti 文件图标字体(与 QodeChatPanel 一致;需将 qoder-seti.woff 置于 public/ 或根路径)
259
281
  ============================================ */
@@ -51,6 +51,12 @@
51
51
  --token-color-bg-highlight: #d0d0d0;
52
52
  --token-color-bg-highlight-hover: #e0e0e0;
53
53
 
54
+ /* --- Shadow (暗色需要更强的阴影以在深色背景上可见) --- */
55
+ --token-color-shadow-primary: rgba(0, 0, 0, 0.08);
56
+ --token-color-shadow-secondary: rgba(0, 0, 0, 0.14);
57
+ --token-color-shadow-tertiary: rgba(0, 0, 0, 0.22);
58
+ --token-color-shadow-quaternary: rgba(0, 0, 0, 0.30);
59
+
54
60
  /* --- Semantic Colors --- */
55
61
  --token-color-link: #8EE5A1;
56
62
  --token-color-error: #FF4D4F;
@@ -51,6 +51,12 @@
51
51
  --token-color-bg-highlight: #C9C4B8;
52
52
  --token-color-bg-highlight-hover: #D4C9BC;
53
53
 
54
+ /* --- Shadow (暗色羊皮纸,需要更强的阴影) --- */
55
+ --token-color-shadow-primary: rgba(0, 0, 0, 0.08);
56
+ --token-color-shadow-secondary: rgba(0, 0, 0, 0.14);
57
+ --token-color-shadow-tertiary: rgba(0, 0, 0, 0.22);
58
+ --token-color-shadow-quaternary: rgba(0, 0, 0, 0.30);
59
+
54
60
  /* --- Semantic Colors --- */
55
61
  --token-color-link: #C4B8A8;
56
62
  --token-color-error: #FF6B6B;
@@ -50,6 +50,12 @@
50
50
  --token-color-bg-highlight: #202116;
51
51
  --token-color-bg-highlight-hover: #2D2A22;
52
52
 
53
+ /* --- Shadow (暖色基底,匹配羊皮纸调性) --- */
54
+ --token-color-shadow-primary: rgba(30, 25, 15, 0.025);
55
+ --token-color-shadow-secondary: rgba(30, 25, 15, 0.045);
56
+ --token-color-shadow-tertiary: rgba(30, 25, 15, 0.07);
57
+ --token-color-shadow-quaternary: rgba(30, 25, 15, 0.09);
58
+
53
59
  /* --- Semantic Colors --- */
54
60
  --token-color-link: #5B4A3A;
55
61
  --token-color-error: #FF4D4F;
@@ -100,4 +100,15 @@
100
100
  --motion-ease-standard: var(--config-motion-ease-standard);
101
101
  --motion-ease-emphasized: var(--config-motion-ease-emphasized);
102
102
  --motion-ease-out: var(--config-motion-ease-out);
103
+
104
+ /* ============================================
105
+ Motion Multiplier (从配置映射)
106
+ ============================================ */
107
+ --motion-multiplier: var(--config-motion-multiplier);
108
+
109
+ /* ============================================
110
+ Border Width (从配置映射)
111
+ ============================================ */
112
+ --border-width: var(--config-border-width);
113
+ --border-width-thick: var(--config-border-width-thick);
103
114
  }
@@ -102,6 +102,17 @@
102
102
  --config-motion-ease-emphasized: cubic-bezier(0.2, 0.8, 0.2, 1);
103
103
  --config-motion-ease-out: cubic-bezier(0, 0, 0.2, 1);
104
104
 
105
+ /* ============================================
106
+ Motion Multiplier (preset 可覆盖,<1 更快,>1 更慢)
107
+ ============================================ */
108
+ --config-motion-multiplier: 1;
109
+
110
+ /* ============================================
111
+ Border Width 配置
112
+ ============================================ */
113
+ --config-border-width: 1px;
114
+ --config-border-width-thick: 2px;
115
+
105
116
  /* ============================================
106
117
  Font Family 配置
107
118
  ============================================ */
@@ -38,4 +38,11 @@
38
38
  --font-size-7xl: 56px;
39
39
  --font-size-8xl: 64px;
40
40
  --font-size-9xl: 88px;
41
+
42
+ /* Motion (略快) */
43
+ --motion-multiplier: 0.9;
44
+
45
+ /* Border */
46
+ --border-width: 1px;
47
+ --border-width-thick: 1px;
41
48
  }
@@ -72,4 +72,11 @@
72
72
  --font-size-7xl: 44px;
73
73
  --font-size-8xl: 56px;
74
74
  --font-size-9xl: 72px;
75
+
76
+ /* Motion (快速) */
77
+ --motion-multiplier: 0.8;
78
+
79
+ /* Border (极细) */
80
+ --border-width: 1px;
81
+ --border-width-thick: 1px;
75
82
  }
@@ -49,4 +49,11 @@
49
49
  --font-size-7xl: 56px;
50
50
  --font-size-8xl: 64px;
51
51
  --font-size-9xl: 88px;
52
+
53
+ /* Motion (机械精准,最快) */
54
+ --motion-multiplier: 0.75;
55
+
56
+ /* Border (几何硬边) */
57
+ --border-width: 1px;
58
+ --border-width-thick: 2px;
52
59
  }
@@ -35,4 +35,11 @@
35
35
  --font-size-xl--line-height: 28px;
36
36
  --font-size-2xl: 22px;
37
37
  --font-size-2xl--line-height: 30px;
38
+
39
+ /* Motion (更舒缓) */
40
+ --motion-multiplier: 1.3;
41
+
42
+ /* Border (无边框面,靠阴影区分层级) */
43
+ --border-width: 0px;
44
+ --border-width-thick: 1px;
38
45
  }
@@ -146,6 +146,14 @@
146
146
  --color-shadow-tertiary: var(--token-color-shadow-tertiary);
147
147
  --color-shadow-quaternary: var(--token-color-shadow-quaternary);
148
148
 
149
+ /* Elevation — 完整 box-shadow value token,Tailwind shadow-* 类自动消费 */
150
+ --shadow-xs: 0 1px 2px var(--color-shadow-primary);
151
+ --shadow-sm: 0 1px 3px var(--color-shadow-secondary), 0 1px 2px var(--color-shadow-primary);
152
+ --shadow-md: 0 4px 6px var(--color-shadow-secondary), 0 2px 4px var(--color-shadow-primary);
153
+ --shadow-lg: 0 10px 15px var(--color-shadow-tertiary), 0 4px 6px var(--color-shadow-secondary);
154
+ --shadow-xl: 0 20px 25px var(--color-shadow-tertiary), 0 8px 10px var(--color-shadow-secondary);
155
+ --shadow-2xl: 0 25px 50px var(--color-shadow-quaternary);
156
+
149
157
  /* Semantic */
150
158
  --color-link: var(--token-color-link);
151
159
  --color-error: var(--token-color-error);
@@ -254,6 +262,20 @@
254
262
  }
255
263
  }
256
264
 
265
+ /* ============================================
266
+ Reduced motion — 全局无障碍
267
+ ============================================ */
268
+ @media (prefers-reduced-motion: reduce) {
269
+ *,
270
+ *::before,
271
+ *::after {
272
+ animation-duration: 0.01ms !important;
273
+ animation-iteration-count: 1 !important;
274
+ transition-duration: 0.01ms !important;
275
+ scroll-behavior: auto !important;
276
+ }
277
+ }
278
+
257
279
  /* ============================================
258
280
  Seti 文件图标字体(与 QodeChatPanel 一致;需将 qoder-seti.woff 置于 public/ 或根路径)
259
281
  ============================================ */
@@ -51,6 +51,12 @@
51
51
  --token-color-bg-highlight: #d0d0d0;
52
52
  --token-color-bg-highlight-hover: #e0e0e0;
53
53
 
54
+ /* --- Shadow (暗色需要更强的阴影以在深色背景上可见) --- */
55
+ --token-color-shadow-primary: rgba(0, 0, 0, 0.08);
56
+ --token-color-shadow-secondary: rgba(0, 0, 0, 0.14);
57
+ --token-color-shadow-tertiary: rgba(0, 0, 0, 0.22);
58
+ --token-color-shadow-quaternary: rgba(0, 0, 0, 0.30);
59
+
54
60
  /* --- Semantic Colors --- */
55
61
  --token-color-link: #8EE5A1;
56
62
  --token-color-error: #FF4D4F;
@@ -51,6 +51,12 @@
51
51
  --token-color-bg-highlight: #C9C4B8;
52
52
  --token-color-bg-highlight-hover: #D4C9BC;
53
53
 
54
+ /* --- Shadow (暗色羊皮纸,需要更强的阴影) --- */
55
+ --token-color-shadow-primary: rgba(0, 0, 0, 0.08);
56
+ --token-color-shadow-secondary: rgba(0, 0, 0, 0.14);
57
+ --token-color-shadow-tertiary: rgba(0, 0, 0, 0.22);
58
+ --token-color-shadow-quaternary: rgba(0, 0, 0, 0.30);
59
+
54
60
  /* --- Semantic Colors --- */
55
61
  --token-color-link: #C4B8A8;
56
62
  --token-color-error: #FF6B6B;
@@ -50,6 +50,12 @@
50
50
  --token-color-bg-highlight: #202116;
51
51
  --token-color-bg-highlight-hover: #2D2A22;
52
52
 
53
+ /* --- Shadow (暖色基底,匹配羊皮纸调性) --- */
54
+ --token-color-shadow-primary: rgba(30, 25, 15, 0.025);
55
+ --token-color-shadow-secondary: rgba(30, 25, 15, 0.045);
56
+ --token-color-shadow-tertiary: rgba(30, 25, 15, 0.07);
57
+ --token-color-shadow-quaternary: rgba(30, 25, 15, 0.09);
58
+
53
59
  /* --- Semantic Colors --- */
54
60
  --token-color-link: #5B4A3A;
55
61
  --token-color-error: #FF4D4F;
@@ -9,6 +9,8 @@ details are needed.
9
9
  - `sparkdesign/agent-manifest.json` — package export for agent-facing component semantics.
10
10
  - `registry/agent-manifest.json` — source of truth in this repository.
11
11
  - `npm run check:agent-manifest` — validates required semantic fields and recipe references.
12
+ - `npm run report:agent-coverage` — reports manifest coverage against `registry/meta.json`.
13
+ - `npm run check:agent-coverage` — fails if manifest coverage drops below 100%.
12
14
 
13
15
  ## Decision Order
14
16
 
@@ -18,28 +20,126 @@ details are needed.
18
20
  4. Use `cliAdd` when the target app should own copied component source.
19
21
  5. Use `packageImport` only when the app already consumes `sparkdesign` as a package.
20
22
 
23
+ ## Common Name Boundaries
24
+
25
+ - `sidebar` is the full app-shell primitive set: provider state, trigger, responsive collapse, mobile sheet, and inset content. Package imports expose its menu list as `SidebarNavMenu` / `SidebarNavMenuItem`.
26
+ - `sidebar-menu` is the lightweight data-driven list component exported as `SidebarMenu`; use it when a full app shell would be overkill.
27
+ - `form` is for React Hook Form validation wiring; `field` is for layout-only form rows.
28
+ - `toast` and `sonner` share the same runtime toaster API. Prefer `toast` for Spark semantic naming and `sonner` only when matching that install target.
29
+
21
30
  ## Current High-Confidence Coverage
22
31
 
23
- The first manifest version covers the components most likely to be selected by
24
- design/coding agents:
32
+ The manifest covers the components most likely to be selected by design/coding
33
+ agents. Use `npm run report:agent-coverage` for the current full coverage
34
+ snapshot.
25
35
 
26
36
  - `button`
27
37
  - `alert`
38
+ - `alert-dialog`
39
+ - `accordion`
40
+ - `aspect-ratio`
41
+ - `avatar`
42
+ - `badge`
43
+ - `breadcrumb`
44
+ - `button-group`
45
+ - `calendar`
28
46
  - `card`
47
+ - `carousel`
48
+ - `chart`
49
+ - `checkbox`
50
+ - `collapse`
51
+ - `collapsible`
52
+ - `collapsible-card`
53
+ - `combobox`
54
+ - `command`
55
+ - `context-menu`
56
+ - `data-table`
57
+ - `date-picker`
29
58
  - `dialog`
59
+ - `direction`
60
+ - `dropdown-menu`
30
61
  - `drawer`
31
- - `file-review-part`
62
+ - `ellipsis-text`
63
+ - `empty`
64
+ - `field`
65
+ - `form`
66
+ - `hover-card`
67
+ - `icon-button`
68
+ - `input`
69
+ - `input-group`
70
+ - `input-otp`
71
+ - `item`
72
+ - `kbd`
73
+ - `label`
74
+ - `menubar`
75
+ - `native-select`
76
+ - `navigation-menu`
77
+ - `option-list`
78
+ - `pagination`
79
+ - `popover`
80
+ - `progress`
81
+ - `radio-group`
82
+ - `resizable`
83
+ - `scroll-area`
84
+ - `scrollbar`
85
+ - `select`
86
+ - `separator`
87
+ - `sheet`
88
+ - `sidebar`
89
+ - `sidebar-menu`
90
+ - `shimmering-text`
91
+ - `slider`
92
+ - `skeleton`
93
+ - `spinner`
94
+ - `sonner`
95
+ - `switch`
96
+ - `table`
97
+ - `tag`
98
+ - `tabs`
99
+ - `textarea`
100
+ - `toast`
101
+ - `tooltip`
102
+ - `toggle`
103
+ - `toggle-group`
104
+ - `typography`
105
+ - `ask-user-part`
106
+ - `browser-action-part`
32
107
  - `chat-input`
33
- - `response`
108
+ - `code-block-part`
109
+ - `conversation-anchor-nav`
110
+ - `file-attachment`
111
+ - `file-card`
112
+ - `file-review-part`
113
+ - `folder-button`
114
+ - `generation-status-bar`
115
+ - `generated-images-grid`
116
+ - `hint-banner`
117
+ - `image-attachment`
118
+ - `image-generating`
34
119
  - `markdown`
120
+ - `mermaid-part`
35
121
  - `permission-card`
122
+ - `plan-part`
123
+ - `queue-indicator`
124
+ - `reasoning-step`
125
+ - `related-prompts`
126
+ - `response`
127
+ - `send-button`
128
+ - `streaming-markdown-block`
129
+ - `task-part`
130
+ - `terminal-code-block-part`
131
+ - `thinking-indicator`
36
132
  - `tool-invocation-card`
133
+ - `user-message`
134
+ - `user-question-answer`
135
+ - `user-question-part`
37
136
 
38
137
  ## Recipe Usage
39
138
 
40
139
  Recipes are intended to prevent agents from flattening rich AI interfaces into
41
140
  generic cards and Markdown.
42
141
 
142
+ - `structured-form` — deterministic forms/settings with labels, controls, validation, and actions.
43
143
  - `assistant-composer` — prompt entry, attachments, send, and permissions.
44
144
  - `assistant-response-stream` — generated answer, tools, Markdown, and errors.
45
145
  - `focused-task-modal` — compact blocking task or confirmation flow.
@@ -58,3 +158,5 @@ When adding a component to the manifest:
58
158
  4. Ensure `cliAdd` installs the same component id as the manifest key.
59
159
  5. Add or update recipes if the component changes how agents should compose screens.
60
160
  6. Run `npm run check:agent-manifest`.
161
+ 7. Run `npm run check:agent-coverage` so new registry components cannot ship without agent semantics.
162
+ 8. Run `npm run report:agent-coverage` when planning broader semantic coverage or reviewing drift.