sparkdesign 0.4.4 → 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.
Files changed (136) hide show
  1. package/README.md +74 -22
  2. package/cli/dist/commands/add.js +22 -12
  3. package/cli/dist/commands/diff.js +8 -4
  4. package/cli/dist/commands/init.js +84 -9
  5. package/cli/dist/commands/list.js +8 -4
  6. package/cli/dist/index.js +9 -6
  7. package/cli/dist/utils/config.js +16 -8
  8. package/cli/dist/utils/package-manager.js +75 -0
  9. package/cli/dist/utils/registry.js +8 -4
  10. package/cli/dist/utils/tokens.js +33 -25
  11. package/cli/dist/utils/transform.js +9 -5
  12. package/cli/dist/utils/tsconfig.js +182 -0
  13. package/cli/registry/AGENTS.md +18 -0
  14. package/cli/registry/__tests__/chat/thinking-indicator.test.tsx +2 -2
  15. package/cli/registry/chat/chat-input/chat-input-folder-selector.tsx +1 -1
  16. package/cli/registry/chat/chat-input/folder-permission-dialog.tsx +2 -2
  17. package/cli/registry/chat/image-generating.tsx +1 -1
  18. package/cli/registry/chat/response/context.tsx +1 -1
  19. package/cli/registry/chat/thinking-indicator.tsx +1 -1
  20. package/cli/registry/tokens/index.css +8 -5
  21. package/cli/registry/tokens/theme-base.css +235 -0
  22. package/{dist/tokens/themes/dark-qoder.css → cli/registry/tokens/themes/dark-mint.css} +1 -1
  23. package/cli/registry/tokens/themes/dark-parchment.css +104 -103
  24. package/{dist/tokens/themes/light-qoder.css → cli/registry/tokens/themes/light-mint.css} +1 -1
  25. package/cli/registry/tokens/themes/light-parchment.css +103 -102
  26. package/dist/registry/basic/alert-dialog.d.ts +7 -5
  27. package/dist/registry/basic/avatar.d.ts +7 -5
  28. package/dist/registry/basic/collapse.d.ts +7 -5
  29. package/dist/registry/basic/collapsible-card.d.ts +7 -6
  30. package/dist/registry/basic/collapsible.d.ts +7 -5
  31. package/dist/registry/basic/dropdown-menu.d.ts +7 -5
  32. package/dist/registry/basic/icons-inline.d.ts +7 -5
  33. package/dist/registry/basic/kbd.d.ts +7 -5
  34. package/dist/registry/basic/pagination.d.ts +7 -5
  35. package/dist/registry/basic/progress.d.ts +7 -5
  36. package/dist/registry/basic/radio-group.d.ts +7 -5
  37. package/dist/registry/basic/resizable.d.ts +7 -5
  38. package/dist/registry/basic/select.d.ts +7 -5
  39. package/dist/registry/basic/slider.d.ts +7 -5
  40. package/dist/registry/basic/sonner.d.ts +7 -5
  41. package/dist/registry/basic/switch.d.ts +7 -5
  42. package/dist/registry/basic/tabs.d.ts +7 -5
  43. package/dist/registry/basic/tag.d.ts +7 -5
  44. package/dist/registry/basic/theme-from-document.d.ts +7 -5
  45. package/dist/registry/basic/tooltip.d.ts +7 -5
  46. package/dist/registry/basic/typography.d.ts +7 -5
  47. package/dist/registry/chat/ask-user-part.d.ts +9 -3
  48. package/dist/registry/chat/browser-action-part.d.ts +9 -3
  49. package/dist/registry/chat/chat-input/compound.d.ts +7 -5
  50. package/dist/registry/chat/chat-input/context.d.ts +7 -5
  51. package/dist/registry/chat/chat-input/index.d.ts +7 -5
  52. package/dist/registry/chat/chat-input/types.d.ts +9 -3
  53. package/dist/registry/chat/chat-input/useAutoResizeTextarea.d.ts +9 -3
  54. package/dist/registry/chat/code-block-part.d.ts +9 -3
  55. package/dist/registry/chat/file-attachment.d.ts +7 -5
  56. package/dist/registry/chat/file-review-part.d.ts +9 -4
  57. package/dist/registry/chat/generated-images-grid.d.ts +9 -3
  58. package/dist/registry/chat/generation-status-bar.d.ts +8 -4
  59. package/dist/registry/chat/hint-banner.d.ts +9 -3
  60. package/dist/registry/chat/mermaid-part.d.ts +9 -3
  61. package/dist/registry/chat/plan-part.d.ts +9 -3
  62. package/dist/registry/chat/reasoning-step/index.d.ts +8 -6
  63. package/dist/registry/chat/reasoning-step/types.d.ts +9 -3
  64. package/dist/registry/chat/related-prompts.d.ts +9 -3
  65. package/dist/registry/chat/response/index.d.ts +8 -6
  66. package/dist/registry/chat/response/types.d.ts +9 -3
  67. package/dist/registry/chat/task-part.d.ts +9 -3
  68. package/dist/registry/chat/terminal-code-block-part.d.ts +9 -3
  69. package/dist/registry/chat/user-question/UserQuestionCard.d.ts +9 -3
  70. package/dist/registry/chat/user-question/UserQuestionFooter.d.ts +9 -3
  71. package/dist/registry/chat/user-question/UserQuestionHeader.d.ts +9 -3
  72. package/dist/registry/chat/user-question/types.d.ts +8 -5
  73. package/dist/registry/lib/file-icon-maps.d.ts +7 -7
  74. package/dist/registry/lib/utils.d.ts +8 -6
  75. package/dist/spark-design.cjs.js +6 -6
  76. package/dist/spark-design.es.js +10 -10
  77. package/dist/sparkdesign.css +2 -0
  78. package/dist/src/components/basic/AlertDialog/index.d.ts +7 -5
  79. package/dist/src/components/basic/Avatar/index.d.ts +9 -3
  80. package/dist/src/components/basic/Button/index.d.ts +9 -3
  81. package/dist/src/components/basic/Collapse/index.d.ts +7 -4
  82. package/dist/src/components/basic/Collapsible/index.d.ts +9 -4
  83. package/dist/src/components/basic/CollapsibleCard/index.d.ts +9 -3
  84. package/dist/src/components/basic/CollapsibleSection/index.d.ts +7 -7
  85. package/dist/src/components/basic/DropdownMenu/index.d.ts +7 -5
  86. package/dist/src/components/basic/EllipsisText/index.d.ts +7 -15
  87. package/dist/src/components/basic/IconButton/index.d.ts +9 -3
  88. package/dist/src/components/basic/Kbd/index.d.ts +9 -3
  89. package/dist/src/components/basic/OptionList/index.d.ts +9 -3
  90. package/dist/src/components/basic/Pagination/index.d.ts +9 -3
  91. package/dist/src/components/basic/Progress/index.d.ts +9 -3
  92. package/dist/src/components/basic/RadioGroup/index.d.ts +9 -3
  93. package/dist/src/components/basic/Resizable/index.d.ts +9 -3
  94. package/dist/src/components/basic/Scrollbar/index.d.ts +9 -3
  95. package/dist/src/components/basic/Select/index.d.ts +7 -4
  96. package/dist/src/components/basic/ShimmeringText/index.d.ts +9 -3
  97. package/dist/src/components/basic/Skeleton/index.d.ts +9 -3
  98. package/dist/src/components/basic/Slider/index.d.ts +9 -3
  99. package/dist/src/components/basic/Spinner/index.d.ts +9 -3
  100. package/dist/src/components/basic/Switch/index.d.ts +8 -5
  101. package/dist/src/components/basic/Table/index.d.ts +9 -3
  102. package/dist/src/components/basic/Tabs/index.d.ts +9 -3
  103. package/dist/src/components/basic/Tag/index.d.ts +7 -4
  104. package/dist/src/components/basic/Toggle/index.d.ts +9 -3
  105. package/dist/src/components/basic/Tooltip/index.d.ts +7 -4
  106. package/dist/src/components/basic/Typography/index.d.ts +9 -3
  107. package/dist/src/components/chat/GeneratedImagesGrid/index.d.ts +9 -3
  108. package/dist/src/components/chat/GenerationStatusBar/index.d.ts +9 -3
  109. package/dist/src/components/chat/Markdown/demo-content.d.ts +1 -1
  110. package/dist/src/components/chat/Markdown/index.d.ts +9 -3
  111. package/dist/src/components/chat/Response/StreamingMarkdownBlock.d.ts +9 -3
  112. package/dist/src/components/chat/Response/index.d.ts +8 -6
  113. package/dist/src/components/chat/UserMessage/index.d.ts +9 -3
  114. package/dist/src/components/index.d.ts +7 -9
  115. package/dist/src/icons/context.d.ts +7 -6
  116. package/dist/src/icons/types.d.ts +7 -5
  117. package/dist/src/lib/ThemeStyleContext.d.ts +9 -9
  118. package/dist/src/lib/file-icon.d.ts +7 -6
  119. package/dist/src/lib/i18n.d.ts +7 -6
  120. package/dist/src/lib/index.d.ts +9 -3
  121. package/dist/src/lib/utils.d.ts +7 -5
  122. package/dist/theme-base.css +7 -8
  123. package/dist/theme.css +2 -2
  124. package/dist/themes/{dark-qoder.css → dark-mint.css} +1 -1
  125. package/dist/themes/{light-qoder.css → light-mint.css} +1 -1
  126. package/dist/tokens/AGENTS.md +47 -0
  127. package/dist/tokens/index.css +10 -19
  128. package/dist/tokens/theme-base.css +7 -8
  129. package/dist/tokens/theme.css +2 -2
  130. package/dist/tokens/themes/dark-mint.css +133 -0
  131. package/dist/tokens/themes/light-mint.css +132 -0
  132. package/package.json +11 -5
  133. package/cli/registry/tokens/themes/dark-qoder.css +0 -132
  134. package/cli/registry/tokens/themes/light-qoder.css +0 -131
  135. package/dist/qoder-design.css +0 -2
  136. package/dist/tokens/CLAUDE.md +0 -305
@@ -1,7 +1,13 @@
1
1
  /**
2
- * [INPUT]: (ResizablePanelGroupProps | ResizablePanelProps | ResizableHandleProps)
3
- * [OUTPUT]: (JSX.Element) - 可调整面板,基于 Registry 单一来源
4
- * [POS]: components/foundation/Resizable - registry 再导出
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
- * [INPUT]: (ScrollbarProps)
3
- * [OUTPUT]: (JSX.Element) - 带美化滚动条的容器,基于 Registry 单一来源
4
- * [POS]: components/foundation/Scrollbar - registry 再导出
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
- * [INPUT]: (SelectProps, SelectTriggerProps )
3
- * [OUTPUT]: (JSX.Element) - 下拉选择器,基于 Registry 单一来源
4
- * [POS]: components/foundation/Select - registry 再导出,Content 注入 useThemeStyle 使 Portal 随 ThemeStyleProvider
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. 实现来自根目录 registry/basic/select.tsx;主库 SelectContent 注入 useThemeStyle
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
- * [INPUT]: (ShimmeringTextProps)
3
- * [OUTPUT]: (JSX.Element) - 带渐变闪烁效果的动画文本组件,基于 Registry 单一来源
4
- * [POS]: components/basic/ShimmeringText - registry 再导出
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
- * [INPUT]: (SkeletonProps)
3
- * [OUTPUT]: (JSX.Element) - 骨架屏,基于 Registry 单一来源
4
- * [POS]: components/foundation/Skeleton - registry 再导出
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
- * [INPUT]: (SliderProps)
3
- * [OUTPUT]: (JSX.Element) - 滑块,基于 Registry 单一来源
4
- * [POS]: components/foundation/Slider - registry 再导出
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
- * [INPUT]: (SpinnerProps)
3
- * [OUTPUT]: (JSX.Element) - 加载指示器,基于 Registry 单一来源
4
- * [POS]: components/foundation/Spinner - registry 再导出
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
- * [INPUT]: (SwitchProps) - toggle registry;segment 主库保留(含 FunctionSwitch)
3
- * [OUTPUT]: (JSX.Element) - 布尔开关或分段切换
4
- * [POS]: components/foundation/Switch
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
- * variant=toggle:从 registry 再导出并包一层 data-style/data-theme。
7
- * variant=segment:主库实现,默认图标用 registry icons-inline。
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
- * [INPUT]: (TableProps, TableHeaderProps )
3
- * [OUTPUT]: (JSX.Element) - 表格,基于 Registry 单一来源
4
- * [POS]: components/foundation/Table - registry 再导出
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
- * [INPUT]: (TabsProps, TabsListProps, TabsTriggerProps, TabsContentProps)
3
- * [OUTPUT]: (JSX.Element) - 标签页,基于 Registry 单一来源
4
- * [POS]: components/foundation/Tabs - registry 再导出
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
- * [INPUT]: (TagProps)
3
- * [OUTPUT]: (JSX.Element) - 标签,基于 Registry 单一来源
4
- * [POS]: components/foundation/Tag - registry 再导出
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. 实现来自根目录 registry/basic/tag.tsx,主库仅 re-export
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
- * [INPUT]: (ToggleProps, ToggleGroupProps, ToggleGroupItemProps)
3
- * [OUTPUT]: (JSX.Element) - Toggle / ToggleGroup,基于 Registry 单一来源
4
- * [POS]: components/foundation/Toggle - registry 再导出
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
- * [INPUT]: (TooltipProps,兼容 placement 与 side)
3
- * [OUTPUT]: (JSX.Element) - 工具提示,基于 Registry 单一来源
4
- * [POS]: components/foundation/Tooltip - registry 再导出并兼容 placement
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. 实现来自根目录 registry/basic/tooltip.tsx;主库注入 useThemeStyle 使 Portal ThemeStyleProvider
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
- * [INPUT]: (Typography*Props)
3
- * [OUTPUT]: (JSX.Element) - 排版组件,基于 Registry 单一来源
4
- * [POS]: components/foundation/Typography - registry 再导出
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
- * [INPUT]: (GeneratedImagesGridProps)
3
- * [OUTPUT]: (JSX.Element) - 多图网格
4
- * [POS]: components/chat/GeneratedImagesGrid - registry 再导出
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
- * [INPUT]: (GenerationStatusBarProps)
3
- * [OUTPUT]: (JSX.Element) - 生成状态条
4
- * [POS]: components/chat/GenerationStatusBar - registry 再导出
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 Qoder Work\n\n**Qoder Work** is Anthropic\u2019s AI assistant that works alongside you in the same workspace. It\u2019s not just chat\u2014it actually participates in docs, code, and workflows as a real **coworker**.\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 | Qoder Work |\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# Qoder Work 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*Qoder Work is designed so the AI moves from \u201Cthe other end of the chat\u201D into \u201Cthis file and this project you\u2019re editing\u201D\u2014as a real Coworker.*\n";
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
- * [INPUT]: (MarkdownBodyProps)
3
- * [OUTPUT]: (JSX.Element) - Markdown 渲染
4
- * [POS]: components/chat/Markdown - registry 再导出
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
- * [INPUT]: (StreamingMarkdownBlockProps)
3
- * [OUTPUT]: (JSX.Element)
4
- * [POS]: components/chat/Response - registry 再导出
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
- * [INPUT]: (ResponseProps)
3
- * [OUTPUT]: (JSX.Element)
4
- * [POS]: components/chat/Response - registry 再导出,注入带 Lottie ThinkingIndicator
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
- * 设计模式:shadcn 风格复合组件
7
- * - Response = 便捷导出(Root + DefaultLayout)
8
- * - Response.Root/Thinking/Steps/Step/Content/ImageGenerating = 复合子组件
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
- * [INPUT]: (UserMessageProps)
3
- * [OUTPUT]: (JSX.Element) - 用户消息气泡容器
4
- * [POS]: components/chat/UserMessage - registry 再导出
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
- * [INPUT]: (N/A) - 此为导出入口文件,不接收输入
3
- * [OUTPUT]: (Component & Type Exports) - 统一导出所有组件及其类型定义
4
- * [POS]: components/index.ts - 组件库统一导出入口
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. 文件逻辑变更时必须同步更新此 Header
8
- * 2. 更新后必须上浮检查 L2、L1 文档
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
- * [INPUT]: (IconsProviderProps) - 图标映射与可选 getFileIcon
3
- * [OUTPUT]: (JSX.Element) - Provider 包裹子节点;useIcon 无配置时返回 undefined,便于 ?? 走内置 fallback
4
- * [POS]: icons/context - 图标注入层,组件通过 useIcons() 取图标,用户可替换为 Lucide/Remix
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. 新增 IconKey 时同步 types.ts
8
- * 2. 不依赖 @ali/qoder-icon,主库零图标依赖
9
- * 3. useIcon 无图标时返回 undefined,主库直接渲染处需 ?? 内置 SVG(如 CollapsibleSection、Toast)
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
- * [INPUT]: N/A - 类型定义
3
- * [OUTPUT]: IconKey, IconComponent 等类型
4
- * [POS]: icons/types - 图标抽象层类型,供 IconsContext 与组件使用
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. 新增组件使用图标时在此补充语义化 key
8
- * 2. IconsContext 的默认实现(若有)保持同步
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
- * [INPUT]: (N/A) - Context 由上层 Provider 注入
3
- * [OUTPUT]: (React Context) - Portal 浮层继承 data-style / data-theme
4
- * [POS]: lib/ThemeStyleContext
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. 用于 DropdownMenu、Tooltip 等挂到 body 的浮层,使其与当前页面的 data-style/data-theme 一致
8
- * 2. 应用层在根节点用 ThemeStyleProvider 包裹并传入 appearance/theme/style
9
- * 3. 三维度独立设计:appearance(亮暗) × theme(颜色) × style(尺度)
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 = 'qoder' | 'parchment';
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
- /** 颜色主题,默认 'qoder' */
123
+ /** 颜色主题,默认 'mint' */
124
124
  theme?: Theme;
125
125
  /** 布局尺度,默认 'neutral' */
126
126
  style?: Style;
@@ -1,12 +1,13 @@
1
1
  /**
2
- * [INPUT]: (filename: string, className?: string) - 文件名、图标样式类
3
- * [OUTPUT]: (ReactNode) - 对应文件类型的图标(默认通用占位;可通过 IconsProvider.getFileIcon 注入自定义)
4
- * [POS]: lib/file-icon - 文件图标工具,用于 FileCard
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. 文件逻辑变更时必须同步更新此 Header
8
- * 2. 使用方通过 IconsProvider getFileIcon 注入时可实现按扩展名映射(如 Lucide/Remix)
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
  /**
@@ -1,12 +1,13 @@
1
1
  /**
2
- * [INPUT]: () - 无输入
3
- * [OUTPUT]: (void) - 初始化 i18next 实例,供 react-i18next 使用
4
- * [POS]: lib/i18n.ts - 在应用入口最早导入,确保 useTranslation 可用
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. 文件逻辑变更时必须同步更新此 Header
8
- * 2. 新增语言或翻译时在此扩展 resources
9
- * 3. 当前仅英文:lng/fallbackLng en;业务侧可通过 props 传入 t() 做多语言
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;
@@ -1,7 +1,13 @@
1
1
  /**
2
- * [INPUT]: (N/A) - Lib 工具函数导出入口
3
- * [OUTPUT]: (Utility Exports) - 统一导出所有工具函数
4
- * [POS]: lib/index.ts
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';
@@ -1,11 +1,13 @@
1
1
  /**
2
- * [INPUT]: (ClassValue[])
3
- * [OUTPUT]: (string) - 合并后的 class
4
- * [POS]: lib/utils.ts - registry 重导出,避免重复
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. 唯一来源为 registry/lib/utils.ts
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';