sparkdesign 0.4.5 → 0.4.6
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.
- package/README.md +74 -22
- package/cli/dist/commands/add.js +22 -12
- package/cli/dist/commands/diff.js +8 -4
- package/cli/dist/commands/init.js +84 -9
- package/cli/dist/commands/list.js +8 -4
- package/cli/dist/index.js +9 -6
- package/cli/dist/utils/config.js +16 -8
- package/cli/dist/utils/package-manager.js +75 -0
- package/cli/dist/utils/registry.js +8 -4
- package/cli/dist/utils/tokens.js +33 -25
- package/cli/dist/utils/transform.js +9 -5
- package/cli/dist/utils/tsconfig.js +182 -0
- package/cli/registry/AGENTS.md +18 -0
- package/cli/registry/__tests__/chat/thinking-indicator.test.tsx +2 -2
- package/cli/registry/chat/chat-input/chat-input-folder-selector.tsx +1 -1
- package/cli/registry/chat/chat-input/folder-permission-dialog.tsx +2 -2
- package/cli/registry/chat/image-generating.tsx +1 -1
- package/cli/registry/chat/response/context.tsx +1 -1
- package/cli/registry/chat/thinking-indicator.tsx +1 -1
- package/cli/registry/tokens/index.css +8 -5
- package/cli/registry/tokens/theme-base.css +235 -0
- package/{dist/tokens/themes/dark-qoder.css → cli/registry/tokens/themes/dark-mint.css} +1 -1
- package/cli/registry/tokens/themes/dark-parchment.css +104 -103
- package/{dist/tokens/themes/light-qoder.css → cli/registry/tokens/themes/light-mint.css} +1 -1
- package/cli/registry/tokens/themes/light-parchment.css +103 -102
- package/dist/registry/basic/alert-dialog.d.ts +7 -5
- package/dist/registry/basic/avatar.d.ts +7 -5
- package/dist/registry/basic/collapse.d.ts +7 -5
- package/dist/registry/basic/collapsible-card.d.ts +7 -6
- package/dist/registry/basic/collapsible.d.ts +7 -5
- package/dist/registry/basic/dropdown-menu.d.ts +7 -5
- package/dist/registry/basic/icons-inline.d.ts +7 -5
- package/dist/registry/basic/kbd.d.ts +7 -5
- package/dist/registry/basic/pagination.d.ts +7 -5
- package/dist/registry/basic/progress.d.ts +7 -5
- package/dist/registry/basic/radio-group.d.ts +7 -5
- package/dist/registry/basic/resizable.d.ts +7 -5
- package/dist/registry/basic/select.d.ts +7 -5
- package/dist/registry/basic/slider.d.ts +7 -5
- package/dist/registry/basic/sonner.d.ts +7 -5
- package/dist/registry/basic/switch.d.ts +7 -5
- package/dist/registry/basic/tabs.d.ts +7 -5
- package/dist/registry/basic/tag.d.ts +7 -5
- package/dist/registry/basic/theme-from-document.d.ts +7 -5
- package/dist/registry/basic/tooltip.d.ts +7 -5
- package/dist/registry/basic/typography.d.ts +7 -5
- package/dist/registry/chat/ask-user-part.d.ts +9 -3
- package/dist/registry/chat/browser-action-part.d.ts +9 -3
- package/dist/registry/chat/chat-input/compound.d.ts +7 -5
- package/dist/registry/chat/chat-input/context.d.ts +7 -5
- package/dist/registry/chat/chat-input/index.d.ts +7 -5
- package/dist/registry/chat/chat-input/types.d.ts +9 -3
- package/dist/registry/chat/chat-input/useAutoResizeTextarea.d.ts +9 -3
- package/dist/registry/chat/code-block-part.d.ts +9 -3
- package/dist/registry/chat/file-attachment.d.ts +7 -5
- package/dist/registry/chat/file-review-part.d.ts +9 -4
- package/dist/registry/chat/generated-images-grid.d.ts +9 -3
- package/dist/registry/chat/generation-status-bar.d.ts +8 -4
- package/dist/registry/chat/hint-banner.d.ts +9 -3
- package/dist/registry/chat/mermaid-part.d.ts +9 -3
- package/dist/registry/chat/plan-part.d.ts +9 -3
- package/dist/registry/chat/reasoning-step/index.d.ts +8 -6
- package/dist/registry/chat/reasoning-step/types.d.ts +9 -3
- package/dist/registry/chat/related-prompts.d.ts +9 -3
- package/dist/registry/chat/response/index.d.ts +8 -6
- package/dist/registry/chat/response/types.d.ts +9 -3
- package/dist/registry/chat/task-part.d.ts +9 -3
- package/dist/registry/chat/terminal-code-block-part.d.ts +9 -3
- package/dist/registry/chat/user-question/UserQuestionCard.d.ts +9 -3
- package/dist/registry/chat/user-question/UserQuestionFooter.d.ts +9 -3
- package/dist/registry/chat/user-question/UserQuestionHeader.d.ts +9 -3
- package/dist/registry/chat/user-question/types.d.ts +8 -5
- package/dist/registry/lib/file-icon-maps.d.ts +7 -7
- package/dist/registry/lib/utils.d.ts +8 -6
- package/dist/spark-design.cjs.js +6 -6
- package/dist/spark-design.es.js +10 -10
- package/dist/sparkdesign.css +2 -0
- package/dist/src/components/basic/AlertDialog/index.d.ts +7 -5
- package/dist/src/components/basic/Avatar/index.d.ts +9 -3
- package/dist/src/components/basic/Button/index.d.ts +9 -3
- package/dist/src/components/basic/Collapse/index.d.ts +7 -4
- package/dist/src/components/basic/Collapsible/index.d.ts +9 -4
- package/dist/src/components/basic/CollapsibleCard/index.d.ts +9 -3
- package/dist/src/components/basic/CollapsibleSection/index.d.ts +7 -7
- package/dist/src/components/basic/DropdownMenu/index.d.ts +7 -5
- package/dist/src/components/basic/EllipsisText/index.d.ts +7 -15
- package/dist/src/components/basic/IconButton/index.d.ts +9 -3
- package/dist/src/components/basic/Kbd/index.d.ts +9 -3
- package/dist/src/components/basic/OptionList/index.d.ts +9 -3
- package/dist/src/components/basic/Pagination/index.d.ts +9 -3
- package/dist/src/components/basic/Progress/index.d.ts +9 -3
- package/dist/src/components/basic/RadioGroup/index.d.ts +9 -3
- package/dist/src/components/basic/Resizable/index.d.ts +9 -3
- package/dist/src/components/basic/Scrollbar/index.d.ts +9 -3
- package/dist/src/components/basic/Select/index.d.ts +7 -4
- package/dist/src/components/basic/ShimmeringText/index.d.ts +9 -3
- package/dist/src/components/basic/Skeleton/index.d.ts +9 -3
- package/dist/src/components/basic/Slider/index.d.ts +9 -3
- package/dist/src/components/basic/Spinner/index.d.ts +9 -3
- package/dist/src/components/basic/Switch/index.d.ts +8 -5
- package/dist/src/components/basic/Table/index.d.ts +9 -3
- package/dist/src/components/basic/Tabs/index.d.ts +9 -3
- package/dist/src/components/basic/Tag/index.d.ts +7 -4
- package/dist/src/components/basic/Toggle/index.d.ts +9 -3
- package/dist/src/components/basic/Tooltip/index.d.ts +7 -4
- package/dist/src/components/basic/Typography/index.d.ts +9 -3
- package/dist/src/components/chat/GeneratedImagesGrid/index.d.ts +9 -3
- package/dist/src/components/chat/GenerationStatusBar/index.d.ts +9 -3
- package/dist/src/components/chat/Markdown/demo-content.d.ts +1 -1
- package/dist/src/components/chat/Markdown/index.d.ts +9 -3
- package/dist/src/components/chat/Response/StreamingMarkdownBlock.d.ts +9 -3
- package/dist/src/components/chat/Response/index.d.ts +8 -6
- package/dist/src/components/chat/UserMessage/index.d.ts +9 -3
- package/dist/src/components/index.d.ts +7 -9
- package/dist/src/icons/context.d.ts +7 -6
- package/dist/src/icons/types.d.ts +7 -5
- package/dist/src/lib/ThemeStyleContext.d.ts +9 -9
- package/dist/src/lib/file-icon.d.ts +7 -6
- package/dist/src/lib/i18n.d.ts +7 -6
- package/dist/src/lib/index.d.ts +9 -3
- package/dist/src/lib/utils.d.ts +7 -5
- package/dist/theme-base.css +7 -8
- package/dist/theme.css +2 -2
- package/dist/themes/{dark-qoder.css → dark-mint.css} +1 -1
- package/dist/themes/{light-qoder.css → light-mint.css} +1 -1
- package/dist/tokens/AGENTS.md +47 -0
- package/dist/tokens/index.css +10 -19
- package/dist/tokens/theme-base.css +7 -8
- package/dist/tokens/theme.css +2 -2
- package/dist/tokens/themes/dark-mint.css +133 -0
- package/dist/tokens/themes/light-mint.css +132 -0
- package/package.json +11 -5
- package/cli/registry/tokens/themes/dark-qoder.css +0 -132
- package/cli/registry/tokens/themes/light-qoder.css +0 -131
- package/dist/qoder-design.css +0 -2
- package/dist/tokens/CLAUDE.md +0 -305
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/basic/Resizable/index.tsx — Spark Design source; keep aligned with the main library.
|
|
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.
|
|
5
11
|
*/
|
|
6
12
|
export { ResizablePanelGroup, ResizablePanel, ResizableHandle, } from '../../../../registry/basic/resizable';
|
|
7
13
|
export type { ResizablePanelGroupProps, ResizablePanelProps, ResizableHandleProps, } from '../../../../registry/basic/resizable';
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/basic/Scrollbar/index.tsx — Spark Design source; keep aligned with the main library.
|
|
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.
|
|
5
11
|
*/
|
|
6
12
|
export { Scrollbar } from '../../../../registry/basic/scrollbar';
|
|
7
13
|
export type { ScrollbarProps, ScrollbarVisibility } from '../../../../registry/basic/scrollbar';
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/basic/Select/index.tsx — Spark Design source; keep aligned with the main library.
|
|
5
6
|
*
|
|
6
7
|
* [PROTOCOL]:
|
|
7
|
-
* 1.
|
|
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.
|
|
8
11
|
*/
|
|
9
12
|
import * as React from 'react';
|
|
10
13
|
import { Select, SelectGroup, SelectValue, SelectTrigger, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton } from '../../../../registry/basic/select';
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/basic/ShimmeringText/index.tsx — Spark Design source; keep aligned with the main library.
|
|
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.
|
|
5
11
|
*/
|
|
6
12
|
export { ShimmeringText } from '../../../../registry/basic/shimmering-text';
|
|
7
13
|
export type { ShimmeringTextProps } from '../../../../registry/basic/shimmering-text';
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/basic/Skeleton/index.tsx — Spark Design source; keep aligned with the main library.
|
|
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.
|
|
5
11
|
*/
|
|
6
12
|
export { Skeleton, skeletonVariants } from '../../../../registry/basic/skeleton';
|
|
7
13
|
export type { SkeletonProps } from '../../../../registry/basic/skeleton';
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/basic/Slider/index.tsx — Spark Design source; keep aligned with the main library.
|
|
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.
|
|
5
11
|
*/
|
|
6
12
|
export { Slider } from '../../../../registry/basic/slider';
|
|
7
13
|
export type { SliderProps } from '../../../../registry/basic/slider';
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/basic/Spinner/index.tsx — Spark Design source; keep aligned with the main library.
|
|
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.
|
|
5
11
|
*/
|
|
6
12
|
export { Spinner } from '../../../../registry/basic/spinner';
|
|
7
13
|
export type { SpinnerProps } from '../../../../registry/basic/spinner';
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/basic/Switch/index.tsx — Spark Design source; keep aligned with the main library.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
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.
|
|
8
11
|
*/
|
|
9
12
|
import * as React from 'react';
|
|
10
13
|
import type { SwitchProps as RegistrySwitchProps } from '../../../../registry/basic/switch';
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/basic/Table/index.tsx — Spark Design source; keep aligned with the main library.
|
|
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.
|
|
5
11
|
*/
|
|
6
12
|
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, } from '../../../../registry/basic/table';
|
|
7
13
|
export type { TableProps, TableHeaderProps, TableBodyProps, TableFooterProps, TableRowProps, TableHeadProps, TableCellProps, TableCaptionProps, } from '../../../../registry/basic/table';
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/basic/Tabs/index.tsx — Spark Design source; keep aligned with the main library.
|
|
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.
|
|
5
11
|
*/
|
|
6
12
|
export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants, tabsTriggerVariants, } from '../../../../registry/basic/tabs';
|
|
7
13
|
export type { TabsProps, TabsListProps, TabsTriggerProps, TabsContentProps, } from '../../../../registry/basic/tabs';
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/basic/Tag/index.tsx — Spark Design source; keep aligned with the main library.
|
|
5
6
|
*
|
|
6
7
|
* [PROTOCOL]:
|
|
7
|
-
* 1.
|
|
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.
|
|
8
11
|
*/
|
|
9
12
|
export { Tag, tagVariants } from '../../../../registry/basic/tag';
|
|
10
13
|
export type { TagProps } from '../../../../registry/basic/tag';
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/basic/Toggle/index.tsx — Spark Design source; keep aligned with the main library.
|
|
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.
|
|
5
11
|
*/
|
|
6
12
|
export { Toggle, ToggleGroup, ToggleGroupItem, toggleVariants, } from '../../../../registry/basic/toggle';
|
|
7
13
|
export type { ToggleProps, ToggleGroupProps, ToggleGroupItemProps, } from '../../../../registry/basic/toggle';
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/basic/Tooltip/index.tsx — Spark Design source; keep aligned with the main library.
|
|
5
6
|
*
|
|
6
7
|
* [PROTOCOL]:
|
|
7
|
-
* 1.
|
|
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.
|
|
8
11
|
*/
|
|
9
12
|
import { TooltipProvider, TooltipRoot, TooltipTrigger, TooltipContent } from '../../../../registry/basic/tooltip';
|
|
10
13
|
import type { TooltipProps as RegistryTooltipProps } from '../../../../registry/basic/tooltip';
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/basic/Typography/index.tsx — Spark Design source; keep aligned with the main library.
|
|
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.
|
|
5
11
|
*/
|
|
6
12
|
export { TypographyH1, TypographyH2, TypographyH3, TypographyH4, TypographyP, TypographyBlockquote, TypographyTable, TypographyList, TypographyInlineCode, TypographyLead, TypographyLarge, TypographySmall, TypographyMuted, } from '../../../../registry/basic/typography';
|
|
7
13
|
export type { TypographyH1Props, TypographyH2Props, TypographyH3Props, TypographyH4Props, TypographyPProps, TypographyBlockquoteProps, TypographyTableProps, TypographyListProps, TypographyInlineCodeProps, TypographyLeadProps, TypographyLargeProps, TypographySmallProps, TypographyMutedProps, } from '../../../../registry/basic/typography';
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/chat/GeneratedImagesGrid/index.tsx — Spark Design source; keep aligned with the main library.
|
|
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.
|
|
5
11
|
*/
|
|
6
12
|
export { GeneratedImagesGrid } from '../../../../registry/chat/generated-images-grid';
|
|
7
13
|
export type { GeneratedImagesGridProps } from '../../../../registry/chat/generated-images-grid';
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/chat/GenerationStatusBar/index.tsx — Spark Design source; keep aligned with the main library.
|
|
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.
|
|
5
11
|
*/
|
|
6
12
|
export { GenerationStatusBar } from '../../../../registry/chat/generation-status-bar';
|
|
7
13
|
export type { GenerationStatusBarProps } from '../../../../registry/chat/generation-status-bar';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const MARKDOWN_DEMO_CONTENT = "# What is
|
|
1
|
+
export declare const MARKDOWN_DEMO_CONTENT = "# What is Spark Design\n\n**Spark Design** is a React design system for AI-native interfaces. It provides production-ready primitives, chat patterns, and theme tokens that fit into the same workspace as your app.\n\n## Core capabilities\n\n- **Context-aware**: Understands your needs from open files and the current project\n- **Multimodal**: Handles text, code, diagrams, and structured output\n- **Executable**: Runs code and tools in a controlled environment, from $0 \\rightarrow 1$\n\n---\n\n## Why \u201CCowork\u201D\n\n> Traditional conversational AI is more like \u201Cadvice over the shoulder\u201D\u2014you describe the problem, it suggests steps. \n> Cowork aims to **sit at the same table**: edit docs together, write code together, move tasks forward together.\n\nUsing a blockquote like this separates \u201Cthinking / context\u201D from \u201Cfinal answer\u201D and keeps long replies easy to scan.\n\n### How it differs from regular Claude\n\n| Dimension | Regular Claude | Spark Design |\n|-----------|----------------------|--------------------------------|\n| Mode | Turn-by-turn Q&A | Ongoing edit in one workspace |\n| Context | Mostly the thread | Docs, code, and project |\n| Output | Text and code blocks | Direct edits in your files |\n\nThe table above is **responsive**: on narrow screens it scrolls horizontally via `overflow-x: auto` (inline code here) so the layout doesn\u2019t break.\n\n### Typical use cases (ordered list)\n\n1. **Clarify requirements**: Turn PRDs or notes into concrete, executable steps\n2. **Code together**: Complete, refactor, or fix bugs in real projects instead of \u201Cpaste an example\u201D\n3. **Docs and knowledge**: Draft specs, API docs, meeting notes\n4. **Task flow**: From idea to deliverable, $\\frac{idea}{time} \\rightarrow deliverable$\n\n---\n\n## What happens in a session (H4 subheadings)\n\n#### Execution-log style (H4 / H5)\n\nUse smaller weight and muted color so \u201Cprocess\u201D doesn\u2019t compete with the main answer.\n\n##### View steps (H5)\n\n- [x] Permission and context checks\n- [x] Resolve workspace path and open files\n- [ ] Generate or edit according to your instructions\n\nAbove is a **task list**: checked = done, unchecked = in progress\u2014good for steps and checklists.\n\n---\n\n## Code and math examples\n\nInline code like `cowork.plan()` and `cowork.edit(file, diff)` sits in the sentence; fenced code keeps monospace and line height for readability:\n\n```python\n# Spark Design concept (pseudo-code)\ndef cowork_session(context: WorkspaceContext, user_goal: str):\n plan = cowork.plan(goal=user_goal, context=context)\n for step in plan.steps:\n if step.kind == \"edit_file\":\n cowork.edit(step.target, step.diff)\n elif step.kind == \"run_command\":\n cowork.run(step.command, cwd=context.root)\n return cowork.summary()\n```\n\nInline math: from idea to delivery can be written as $\\mathbb{E}[delivery] = f(idea, context, time)$. \nDisplay math (when KaTeX is enabled) can be centered and on its own line for longer derivations.\n\n---\n\n## Summary\n\n- Use **H1** only for the main title; **H2 / H3** for sections; **H4\u2013H6** for steps or log-style subheadings.\n- **Blockquotes** for \u201Cthinking / premise\u201D; body text for the actual answer.\n- **Task lists** for progress and checklists; **tables** for structured comparison; **code** and **math** for clarity and rigor.\n\n*Spark Design is designed so AI-native UI moves from \u201Ca generic chat demo\u201D into \u201Cthis file and this product you are editing\u201D with production-ready tokens and components.*\n";
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/chat/Markdown/index.tsx — Spark Design source; keep aligned with the main library.
|
|
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.
|
|
5
11
|
*/
|
|
6
12
|
export { MarkdownBody } from '../../../../registry/chat/markdown';
|
|
7
13
|
export type { MarkdownBodyProps } from '../../../../registry/chat/markdown';
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/chat/Response/StreamingMarkdownBlock.tsx — Spark Design source; keep aligned with the main library.
|
|
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.
|
|
5
11
|
*/
|
|
6
12
|
export { StreamingMarkdownBlock, type StreamingMarkdownBlockProps, } from '../../../../registry/chat/streaming-markdown-block';
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/chat/Response/index.tsx — Spark Design source; keep aligned with the main library.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
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.
|
|
9
11
|
*/
|
|
10
12
|
import type { HTMLAttributes } from 'react';
|
|
11
13
|
import { useResponseContext as useRegistryResponseContext, DEMO_ROUNDS, DEMO_FINAL_MD } from '../../../../registry/chat/response/context';
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/chat/UserMessage/index.tsx — Spark Design source; keep aligned with the main library.
|
|
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.
|
|
5
11
|
*/
|
|
6
12
|
export { UserMessage } from '../../../../registry/chat/user-message';
|
|
7
13
|
export type { UserMessageProps } from '../../../../registry/chat/user-message';
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/components/index.ts — Spark Design source; keep aligned with the main library.
|
|
5
6
|
*
|
|
6
7
|
* [PROTOCOL]:
|
|
7
|
-
* 1.
|
|
8
|
-
* 2.
|
|
9
|
-
* 3.
|
|
10
|
-
* 4. 类型导出检查:每个组件是否同时导出 Props 类型
|
|
11
|
-
*
|
|
12
|
-
* 注意:样式通过 Vite 构建配置自动处理,无需在此引入
|
|
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.
|
|
13
11
|
*/
|
|
14
12
|
export { Button } from './basic/Button';
|
|
15
13
|
export type { ButtonProps } from './basic/Button';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/icons/context.tsx — Spark Design source; keep aligned with the main library.
|
|
5
6
|
*
|
|
6
7
|
* [PROTOCOL]:
|
|
7
|
-
* 1.
|
|
8
|
-
* 2.
|
|
9
|
-
* 3.
|
|
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.
|
|
10
11
|
*/
|
|
11
12
|
import { type ReactNode } from 'react';
|
|
12
13
|
import type { IconKey, IconComponent } from './types';
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/icons/types.ts — Spark Design source; keep aligned with the main library.
|
|
5
6
|
*
|
|
6
7
|
* [PROTOCOL]:
|
|
7
|
-
* 1.
|
|
8
|
-
* 2.
|
|
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.
|
|
9
11
|
*/
|
|
10
12
|
import type { ComponentType } from 'react';
|
|
11
13
|
/** 图标组件通用 props(支持 className 与无障碍) */
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/lib/ThemeStyleContext.tsx — Spark Design source; keep aligned with the main library.
|
|
5
6
|
*
|
|
6
7
|
* [PROTOCOL]:
|
|
7
|
-
* 1.
|
|
8
|
-
* 2.
|
|
9
|
-
* 3.
|
|
10
|
-
* 4. 支持预设字符串或自定义对象
|
|
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
11
|
*/
|
|
12
12
|
import { type ReactNode } from 'react';
|
|
13
13
|
/** 亮暗色 */
|
|
14
14
|
export type Appearance = 'light' | 'dark';
|
|
15
15
|
/** 颜色主题预设 */
|
|
16
|
-
export type ThemePreset = '
|
|
16
|
+
export type ThemePreset = 'mint' | 'parchment';
|
|
17
17
|
/** 自定义颜色主题 */
|
|
18
18
|
export interface CustomTheme {
|
|
19
19
|
name: string;
|
|
@@ -120,7 +120,7 @@ export interface ThemeStyleProviderProps {
|
|
|
120
120
|
children: ReactNode;
|
|
121
121
|
/** 亮暗色,默认 'light' */
|
|
122
122
|
appearance?: Appearance;
|
|
123
|
-
/** 颜色主题,默认 '
|
|
123
|
+
/** 颜色主题,默认 'mint' */
|
|
124
124
|
theme?: Theme;
|
|
125
125
|
/** 布局尺度,默认 'neutral' */
|
|
126
126
|
style?: Style;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/lib/file-icon.tsx — Spark Design source; keep aligned with the main library.
|
|
5
6
|
*
|
|
6
7
|
* [PROTOCOL]:
|
|
7
|
-
* 1.
|
|
8
|
-
* 2.
|
|
9
|
-
* 3.
|
|
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.
|
|
10
11
|
*/
|
|
11
12
|
import type { ReactNode } from 'react';
|
|
12
13
|
/**
|
package/dist/src/lib/i18n.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/lib/i18n.ts — Spark Design source; keep aligned with the main library.
|
|
5
6
|
*
|
|
6
7
|
* [PROTOCOL]:
|
|
7
|
-
* 1.
|
|
8
|
-
* 2.
|
|
9
|
-
* 3.
|
|
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.
|
|
10
11
|
*/
|
|
11
12
|
import i18n from 'i18next';
|
|
12
13
|
export default i18n;
|
package/dist/src/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/lib/index.ts — Spark Design source; keep aligned with the main library.
|
|
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.
|
|
5
11
|
*/
|
|
6
12
|
export { getFileIconByFilename } from './file-icon';
|
|
7
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';
|
package/dist/src/lib/utils.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* [
|
|
3
|
-
* [
|
|
4
|
-
* [
|
|
2
|
+
* [WHO]: Public exports from this file (see implementation below).
|
|
3
|
+
* [FROM]: See the import block immediately after this header.
|
|
4
|
+
* [TO]: sparkdesign package consumers; output of CLI `add` when applicable.
|
|
5
|
+
* [HERE]: src/lib/utils.ts — Spark Design source; keep aligned with the main library.
|
|
5
6
|
*
|
|
6
7
|
* [PROTOCOL]:
|
|
7
|
-
* 1.
|
|
8
|
-
* 2.
|
|
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.
|
|
9
11
|
*/
|
|
10
12
|
export { cn } from '../../registry/lib/utils';
|
|
11
13
|
export type { ClassValue } from 'clsx';
|