sparkdesign 0.4.6 → 0.4.7

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 (252) hide show
  1. package/AI_README.md +60 -0
  2. package/README.md +1 -1
  3. package/cli/dist/commands/add.js +1 -1
  4. package/cli/dist/commands/init.js +1 -1
  5. package/cli/registry/AGENTS.md +9 -2
  6. package/cli/registry/agent-manifest.json +794 -0
  7. package/cli/registry/basic/alert.tsx +76 -0
  8. package/cli/registry/basic/aspect-ratio.tsx +8 -0
  9. package/cli/registry/basic/breadcrumb.tsx +117 -0
  10. package/cli/registry/basic/button-group.tsx +79 -0
  11. package/cli/registry/basic/button.tsx +1 -1
  12. package/cli/registry/basic/calendar.tsx +221 -0
  13. package/cli/registry/basic/card.tsx +103 -0
  14. package/cli/registry/basic/carousel.tsx +241 -0
  15. package/cli/registry/basic/chart.tsx +372 -0
  16. package/cli/registry/basic/checkbox.tsx +42 -0
  17. package/cli/registry/basic/collapsible-card.tsx +2 -2
  18. package/cli/registry/basic/combobox.tsx +75 -0
  19. package/cli/registry/basic/command.tsx +184 -0
  20. package/cli/registry/basic/context-menu.tsx +239 -0
  21. package/cli/registry/basic/data-table.tsx +73 -0
  22. package/cli/registry/basic/date-picker.tsx +13 -0
  23. package/cli/registry/basic/dialog.tsx +169 -0
  24. package/cli/registry/basic/direction.tsx +25 -0
  25. package/cli/registry/basic/drawer.tsx +164 -0
  26. package/cli/registry/basic/dropdown-menu.tsx +0 -4
  27. package/cli/registry/basic/empty.tsx +104 -0
  28. package/cli/registry/basic/field.tsx +248 -0
  29. package/cli/registry/basic/hover-card.tsx +58 -0
  30. package/cli/registry/basic/input-group.tsx +168 -0
  31. package/cli/registry/basic/input-otp.tsx +75 -0
  32. package/cli/registry/basic/input.tsx +27 -0
  33. package/cli/registry/basic/item.tsx +204 -0
  34. package/cli/registry/basic/label.tsx +24 -0
  35. package/cli/registry/basic/menubar.tsx +274 -0
  36. package/cli/registry/basic/native-select.tsx +62 -0
  37. package/cli/registry/basic/navigation-menu.tsx +168 -0
  38. package/cli/registry/basic/popover.tsx +59 -0
  39. package/cli/registry/basic/scroll-area.tsx +58 -0
  40. package/cli/registry/basic/select.tsx +2 -1
  41. package/cli/registry/basic/separator.tsx +26 -0
  42. package/cli/registry/basic/sheet.tsx +18 -0
  43. package/cli/registry/basic/textarea.tsx +25 -0
  44. package/cli/registry/basic/toggle.tsx +1 -1
  45. package/cli/registry/basic/typography.tsx +1 -1
  46. package/cli/registry/chat/chat-input/chat-input-textarea.tsx +1 -1
  47. package/cli/registry/chat/chat-input/compound.tsx +4 -3
  48. package/cli/registry/chat/chat-input/context.tsx +4 -1
  49. package/cli/registry/chat/code-block-part.tsx +1 -1
  50. package/cli/registry/chat/conversation-anchor-nav.tsx +349 -0
  51. package/cli/registry/chat/file-attachment.tsx +2 -1
  52. package/cli/registry/chat/file-review-part.tsx +21 -21
  53. package/cli/registry/chat/markdown.tsx +2 -2
  54. package/cli/registry/chat/queue-indicator.tsx +1 -0
  55. package/cli/registry/chat/streaming-markdown-block.tsx +12 -8
  56. package/cli/registry/chat/tool-invocation-card.tsx +4 -1
  57. package/cli/registry/lib/file-icon-maps.ts +22 -22
  58. package/cli/registry/meta.json +518 -0
  59. package/cli/registry/tokens/ontology.json +404 -0
  60. package/cli/registry/tokens/scale/presets/compact.css +16 -5
  61. package/cli/registry/tokens/scale/presets/dense.css +13 -2
  62. package/cli/registry/tokens/scale/presets/sharp.css +18 -6
  63. package/cli/registry/tokens/scale/presets/soft.css +23 -1
  64. package/dist/registry/basic/alert.d.ts +24 -0
  65. package/dist/registry/basic/aspect-ratio.d.ts +16 -0
  66. package/dist/registry/basic/breadcrumb.d.ts +24 -0
  67. package/dist/registry/basic/button-group.d.ts +26 -0
  68. package/dist/registry/basic/button.d.ts +1 -1
  69. package/dist/registry/basic/calendar.d.ts +22 -0
  70. package/dist/registry/basic/card.d.ts +27 -0
  71. package/dist/registry/basic/carousel.d.ts +19 -0
  72. package/dist/registry/basic/chart.d.ts +55 -0
  73. package/dist/registry/basic/checkbox.d.ts +21 -0
  74. package/dist/registry/basic/combobox.d.ts +26 -0
  75. package/dist/registry/basic/command.d.ts +18 -0
  76. package/dist/registry/basic/context-menu.d.ts +44 -0
  77. package/dist/registry/basic/data-table.d.ts +26 -0
  78. package/dist/registry/basic/date-picker.d.ts +18 -0
  79. package/dist/registry/basic/dialog.d.ts +39 -0
  80. package/dist/registry/basic/direction.d.ts +19 -0
  81. package/dist/registry/basic/drawer.d.ts +37 -0
  82. package/dist/registry/basic/empty.d.ts +22 -0
  83. package/dist/registry/basic/field.d.ts +24 -0
  84. package/dist/registry/basic/hover-card.d.ts +22 -0
  85. package/dist/registry/basic/input-group.d.ts +27 -0
  86. package/dist/registry/basic/input-otp.d.ts +22 -0
  87. package/dist/registry/basic/input.d.ts +15 -0
  88. package/dist/registry/basic/item.d.ts +34 -0
  89. package/dist/registry/basic/label.d.ts +16 -0
  90. package/dist/registry/basic/menubar.d.ts +37 -0
  91. package/dist/registry/basic/native-select.d.ts +18 -0
  92. package/dist/registry/basic/navigation-menu.d.ts +25 -0
  93. package/dist/registry/basic/popover.d.ts +23 -0
  94. package/dist/registry/basic/scroll-area.d.ts +5 -0
  95. package/dist/registry/basic/separator.d.ts +16 -0
  96. package/dist/registry/basic/sheet.d.ts +13 -0
  97. package/dist/registry/basic/textarea.d.ts +15 -0
  98. package/dist/registry/basic/toggle.d.ts +1 -1
  99. package/dist/registry/chat/chat-input/context.d.ts +3 -1
  100. package/dist/registry/chat/conversation-anchor-nav.d.ts +72 -0
  101. package/dist/registry/chat/tool-invocation-card.d.ts +2 -0
  102. package/dist/scale/presets/compact.css +16 -5
  103. package/dist/scale/presets/dense.css +13 -2
  104. package/dist/scale/presets/sharp.css +18 -6
  105. package/dist/scale/presets/soft.css +23 -1
  106. package/dist/spark-design.cjs.js +40 -36
  107. package/dist/spark-design.es.js +8647 -8657
  108. package/dist/sparkdesign.css +1 -1
  109. package/dist/src/components/basic/Alert/index.d.ts +13 -0
  110. package/dist/src/components/basic/AspectRatio/index.d.ts +13 -0
  111. package/dist/src/components/basic/Breadcrumb/index.d.ts +12 -0
  112. package/dist/src/components/basic/ButtonGroup/index.d.ts +13 -0
  113. package/dist/src/components/basic/Calendar/index.d.ts +13 -0
  114. package/dist/src/components/basic/Card/index.d.ts +13 -0
  115. package/dist/src/components/basic/Carousel/index.d.ts +12 -0
  116. package/dist/src/components/basic/Chart/index.d.ts +13 -0
  117. package/dist/src/components/basic/Checkbox/index.d.ts +13 -0
  118. package/dist/src/components/basic/Combobox/index.d.ts +13 -0
  119. package/dist/src/components/basic/Command/index.d.ts +12 -0
  120. package/dist/src/components/basic/ContextMenu/index.d.ts +19 -0
  121. package/dist/src/components/basic/DataTable/index.d.ts +13 -0
  122. package/dist/src/components/basic/DatePicker/index.d.ts +13 -0
  123. package/dist/src/components/basic/Dialog/index.d.ts +16 -0
  124. package/dist/src/components/basic/Direction/index.d.ts +13 -0
  125. package/dist/src/components/basic/Drawer/index.d.ts +16 -0
  126. package/dist/src/components/basic/Empty/index.d.ts +12 -0
  127. package/dist/src/components/basic/Field/index.d.ts +12 -0
  128. package/dist/src/components/basic/HoverCard/index.d.ts +16 -0
  129. package/dist/src/components/basic/Input/index.d.ts +13 -0
  130. package/dist/src/components/basic/InputGroup/index.d.ts +12 -0
  131. package/dist/src/components/basic/InputOTP/index.d.ts +12 -0
  132. package/dist/src/components/basic/Item/index.d.ts +12 -0
  133. package/dist/src/components/basic/Label/index.d.ts +13 -0
  134. package/dist/src/components/basic/Menubar/index.d.ts +12 -0
  135. package/dist/src/components/basic/NativeSelect/index.d.ts +12 -0
  136. package/dist/src/components/basic/NavigationMenu/index.d.ts +12 -0
  137. package/dist/src/components/basic/Popover/index.d.ts +16 -0
  138. package/dist/src/components/basic/ScrollArea/index.d.ts +12 -0
  139. package/dist/src/components/basic/Separator/index.d.ts +13 -0
  140. package/dist/src/components/basic/Sheet/index.d.ts +13 -0
  141. package/dist/src/components/basic/Textarea/index.d.ts +13 -0
  142. package/dist/src/components/chat/ConversationAnchorNav/index.d.ts +13 -0
  143. package/dist/src/components/chat/StreamingMarkdownBlock/index.d.ts +13 -0
  144. package/dist/src/components/index.d.ts +57 -0
  145. package/dist/tokens/AGENTS.md +1 -0
  146. package/dist/tokens/scale/presets/compact.css +16 -5
  147. package/dist/tokens/scale/presets/dense.css +13 -2
  148. package/dist/tokens/scale/presets/sharp.css +18 -6
  149. package/dist/tokens/scale/presets/soft.css +23 -1
  150. package/docs/agent/component-selection.md +60 -0
  151. package/docs/agent/token-ontology.md +37 -0
  152. package/package.json +31 -5
  153. package/registry/agent-manifest.json +794 -0
  154. package/registry/tokens/ontology.json +404 -0
  155. package/dist/_basePickBy-DnQN8w3y.js +0 -151
  156. package/dist/_basePickBy-a-kPMlkg.cjs +0 -1
  157. package/dist/_baseUniq-B-N2NQ50.js +0 -614
  158. package/dist/_baseUniq-Cc_zbSif.cjs +0 -1
  159. package/dist/arc-BQBhijZ6.js +0 -83
  160. package/dist/arc-mWQt0Yph.cjs +0 -1
  161. package/dist/architectureDiagram-VXUJARFQ-BMZEucno.cjs +0 -36
  162. package/dist/architectureDiagram-VXUJARFQ-DTdjD3Bp.js +0 -4661
  163. package/dist/blockDiagram-VD42YOAC-CzHn0yob.js +0 -2256
  164. package/dist/blockDiagram-VD42YOAC-DDxdHAlz.cjs +0 -122
  165. package/dist/c4Diagram-YG6GDRKO-4Gz0I4gj.cjs +0 -10
  166. package/dist/c4Diagram-YG6GDRKO-BIy--yVN.js +0 -1580
  167. package/dist/channel-BQn0o8bs.js +0 -5
  168. package/dist/channel-DaN7XniJ.cjs +0 -1
  169. package/dist/chunk-4BX2VUAB-BlQFTQqz.cjs +0 -1
  170. package/dist/chunk-4BX2VUAB-Czitj3Kc.js +0 -8
  171. package/dist/chunk-55IACEB6-DXacNZbO.js +0 -8
  172. package/dist/chunk-55IACEB6-DnDxpye9.cjs +0 -1
  173. package/dist/chunk-B4BG7PRW-CBdN0q_V.js +0 -1375
  174. package/dist/chunk-B4BG7PRW-DbGvUkGO.cjs +0 -165
  175. package/dist/chunk-DI55MBZ5-D1YJMs6x.cjs +0 -220
  176. package/dist/chunk-DI55MBZ5-NCQTvayw.js +0 -1370
  177. package/dist/chunk-FMBD7UC4-CsGMbrtr.js +0 -19
  178. package/dist/chunk-FMBD7UC4-Di7cUUh5.cjs +0 -15
  179. package/dist/chunk-QN33PNHL-0j5LC8Lm.cjs +0 -1
  180. package/dist/chunk-QN33PNHL-3GERZBRm.js +0 -19
  181. package/dist/chunk-QZHKN3VN-AVEY9ImQ.js +0 -15
  182. package/dist/chunk-QZHKN3VN-s8Z0a8mc.cjs +0 -1
  183. package/dist/chunk-TZMSLE5B-CAf87HPt.cjs +0 -1
  184. package/dist/chunk-TZMSLE5B-sbiflal0.js +0 -64
  185. package/dist/classDiagram-2ON5EDUG-Ct9JLIN2.cjs +0 -1
  186. package/dist/classDiagram-2ON5EDUG-Dzfrft3a.js +0 -16
  187. package/dist/classDiagram-v2-WZHVMYZB-Ct9JLIN2.cjs +0 -1
  188. package/dist/classDiagram-v2-WZHVMYZB-Dzfrft3a.js +0 -16
  189. package/dist/clone-Cde_NQ8V.js +0 -8
  190. package/dist/clone-DCNjWuM2.cjs +0 -1
  191. package/dist/cose-bilkent-S5V4N54A-0uLijMro.cjs +0 -1
  192. package/dist/cose-bilkent-S5V4N54A-Bb08N431.js +0 -2608
  193. package/dist/cytoscape.esm-CNUX3VTg.cjs +0 -321
  194. package/dist/cytoscape.esm-Cvf3sx9F.js +0 -18704
  195. package/dist/dagre-6UL2VRFP-CY_Wz5Zd.js +0 -444
  196. package/dist/dagre-6UL2VRFP-Dxe7_qZc.cjs +0 -4
  197. package/dist/defaultLocale-BgPVtth8.js +0 -171
  198. package/dist/defaultLocale-C4wbwF1n.cjs +0 -1
  199. package/dist/diagram-PSM6KHXK-D2bdb7MT.js +0 -531
  200. package/dist/diagram-PSM6KHXK-YF69SUjY.cjs +0 -24
  201. package/dist/diagram-QEK2KX5R-BpUSoh0-.js +0 -217
  202. package/dist/diagram-QEK2KX5R-DZPGteon.cjs +0 -43
  203. package/dist/diagram-S2PKOQOG-ht-zdvFG.cjs +0 -24
  204. package/dist/diagram-S2PKOQOG-zFeLJ50Z.js +0 -142
  205. package/dist/erDiagram-Q2GNP2WA-B38iJ6ts.js +0 -841
  206. package/dist/erDiagram-Q2GNP2WA-RgS80DDU.cjs +0 -60
  207. package/dist/flowDiagram-NV44I4VS-BHilOs2p.cjs +0 -162
  208. package/dist/flowDiagram-NV44I4VS-BrBJcoce.js +0 -1620
  209. package/dist/ganttDiagram-JELNMOA3-pZiJeFio.cjs +0 -267
  210. package/dist/ganttDiagram-JELNMOA3-tw6FhkWJ.js +0 -2670
  211. package/dist/gitGraphDiagram-V2S2FVAM-BWn5uIK5.js +0 -699
  212. package/dist/gitGraphDiagram-V2S2FVAM-DKKeG-9R.cjs +0 -65
  213. package/dist/graph-DIbblrZP.cjs +0 -1
  214. package/dist/graph-DPcK91G3.js +0 -247
  215. package/dist/infoDiagram-HS3SLOUP-B8gwwhct.cjs +0 -2
  216. package/dist/infoDiagram-HS3SLOUP-D47PNcP_.js +0 -24
  217. package/dist/init-CHZsXQcr.cjs +0 -1
  218. package/dist/init-DjUOC4st.js +0 -16
  219. package/dist/journeyDiagram-XKPGCS4Q-BG3cfhyU.js +0 -834
  220. package/dist/journeyDiagram-XKPGCS4Q-D8DVLJof.cjs +0 -139
  221. package/dist/kanban-definition-3W4ZIXB7-4OCnEouP.cjs +0 -89
  222. package/dist/kanban-definition-3W4ZIXB7-CWi_ssF9.js +0 -719
  223. package/dist/layout-Byuh8f-J.cjs +0 -1
  224. package/dist/layout-CdLdvj1j.js +0 -1335
  225. package/dist/linear-C2Q_PI9B.js +0 -259
  226. package/dist/linear-C69aPBW1.cjs +0 -1
  227. package/dist/mermaid.core-DBwAx_jp.cjs +0 -249
  228. package/dist/mermaid.core-gFR0XUlD.js +0 -15300
  229. package/dist/mindmap-definition-VGOIOE7T-8P7obVV4.cjs +0 -68
  230. package/dist/mindmap-definition-VGOIOE7T-DnOa7WJ9.js +0 -784
  231. package/dist/ordinal-B6-f3MAq.js +0 -61
  232. package/dist/ordinal-CagbB1m8.cjs +0 -1
  233. package/dist/pieDiagram-ADFJNKIX-5NAlvhMo.js +0 -161
  234. package/dist/pieDiagram-ADFJNKIX-CQBG4yR9.cjs +0 -30
  235. package/dist/quadrantDiagram-AYHSOK5B-Oe4y7RZ0.cjs +0 -7
  236. package/dist/quadrantDiagram-AYHSOK5B-rh2DPEP1.js +0 -1022
  237. package/dist/requirementDiagram-UZGBJVZJ-DcWaCuXr.js +0 -850
  238. package/dist/requirementDiagram-UZGBJVZJ-gfdlrFiq.cjs +0 -64
  239. package/dist/sankeyDiagram-TZEHDZUN-CQIKFwD0.js +0 -810
  240. package/dist/sankeyDiagram-TZEHDZUN-DvPtzQvC.cjs +0 -10
  241. package/dist/sequenceDiagram-WL72ISMW-BNrsMagL.cjs +0 -145
  242. package/dist/sequenceDiagram-WL72ISMW-iCX3ckKx.js +0 -2511
  243. package/dist/stateDiagram-FKZM4ZOC-DBvJ_eeL.cjs +0 -1
  244. package/dist/stateDiagram-FKZM4ZOC-ZVsJlaHJ.js +0 -263
  245. package/dist/stateDiagram-v2-4FDKWEC3-CB_nTHcE.js +0 -16
  246. package/dist/stateDiagram-v2-4FDKWEC3-Xkx17v6T.cjs +0 -1
  247. package/dist/timeline-definition-IT6M3QCI-BmGkYQiz.cjs +0 -61
  248. package/dist/timeline-definition-IT6M3QCI-Ck8zTt6w.js +0 -795
  249. package/dist/treemap-GDKQZRPO-B9sfERx8.js +0 -17922
  250. package/dist/treemap-GDKQZRPO-BVfJRs0Z.cjs +0 -160
  251. package/dist/xychartDiagram-PRI3JC2R-By_S8NzN.js +0 -1340
  252. package/dist/xychartDiagram-PRI3JC2R-CNfDrGxM.cjs +0 -7
@@ -0,0 +1,18 @@
1
+ /**
2
+ * [WHO]: NativeSelect primitives for browser-native select controls.
3
+ * [FROM]: React, registry/lib/utils.
4
+ * [TO]: sparkdesign package consumers; Showcase; CLI registry copies.
5
+ * [HERE]: registry/basic/native-select.tsx — tokenized shadcn-derived native select primitive.
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
+ import * as React from "react";
13
+ declare function NativeSelect({ className, size, ...props }: Omit<React.ComponentProps<"select">, "size"> & {
14
+ size?: "sm" | "default";
15
+ }): import("react/jsx-runtime").JSX.Element;
16
+ declare function NativeSelectOption({ className, ...props }: React.ComponentProps<"option">): import("react/jsx-runtime").JSX.Element;
17
+ declare function NativeSelectOptGroup({ className, ...props }: React.ComponentProps<"optgroup">): import("react/jsx-runtime").JSX.Element;
18
+ export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * [WHO]: NavigationMenu primitives for hierarchical navigation surfaces.
3
+ * [FROM]: React, @radix-ui/react-navigation-menu, registry/lib/utils.
4
+ * [TO]: sparkdesign package consumers; Showcase; CLI registry copies.
5
+ * [HERE]: registry/basic/navigation-menu.tsx — tokenized shadcn-derived navigation menu primitive.
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
+ import * as React from "react";
13
+ import { NavigationMenu as NavigationMenuPrimitive } from "radix-ui";
14
+ declare function NavigationMenu({ className, children, viewport, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
15
+ viewport?: boolean;
16
+ }): import("react/jsx-runtime").JSX.Element;
17
+ declare function NavigationMenuList({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.List>): import("react/jsx-runtime").JSX.Element;
18
+ declare function NavigationMenuItem({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
19
+ declare const navigationMenuTriggerStyle: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
20
+ declare function NavigationMenuTrigger({ className, children, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
21
+ declare function NavigationMenuContent({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
22
+ declare function NavigationMenuViewport({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>): import("react/jsx-runtime").JSX.Element;
23
+ declare function NavigationMenuLink({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Link>): import("react/jsx-runtime").JSX.Element;
24
+ declare function NavigationMenuIndicator({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>): import("react/jsx-runtime").JSX.Element;
25
+ export { NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, navigationMenuTriggerStyle, };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * [WHO]: Popover — floating content built on @radix-ui/react-popover.
3
+ * [FROM]: React + @radix-ui/react-popover + framer-motion + getThemeFromDocument.
4
+ * [TO]: sparkdesign package consumers; output of CLI `add popover` when registered.
5
+ * [HERE]: registry/basic/popover.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.
11
+ */
12
+ import * as React from 'react';
13
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
14
+ declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
15
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
16
+ declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
17
+ export interface PopoverContentProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> {
18
+ /** When provided (e.g. from ThemeStyleProvider), used for portal wrapper */
19
+ dataStyle?: string;
20
+ dataTheme?: string;
21
+ }
22
+ declare const PopoverContent: React.ForwardRefExoticComponent<PopoverContentProps & React.RefAttributes<HTMLDivElement>>;
23
+ export { Popover, PopoverTrigger, PopoverAnchor, PopoverContent };
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
3
+ declare function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): import("react/jsx-runtime").JSX.Element;
5
+ export { ScrollArea, ScrollBar };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * [WHO]: Separator — visual/semantic divider built on @radix-ui/react-separator.
3
+ * [FROM]: React + @radix-ui/react-separator + `@/lib/utils` cn.
4
+ * [TO]: sparkdesign package consumers; output of CLI `add separator` when registered.
5
+ * [HERE]: registry/basic/separator.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.
11
+ */
12
+ import * as React from 'react';
13
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
14
+ export type SeparatorProps = React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>;
15
+ declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
16
+ export { Separator };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * [WHO]: Sheet — compatibility alias for Drawer using shadcn-style naming.
3
+ * [FROM]: registry/basic/drawer.
4
+ * [TO]: sparkdesign package consumers; output of CLI `add sheet` when registered.
5
+ * [HERE]: registry/basic/sheet.tsx — Spark Design source; keep aligned with Drawer semantics.
6
+ *
7
+ * [PROTOCOL]:
8
+ * 1. Keep Sheet as a thin compatibility layer; Drawer remains the canonical semantic component.
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 { Drawer as Sheet, DrawerTrigger as SheetTrigger, DrawerClose as SheetClose, DrawerPortal as SheetPortal, DrawerOverlay as SheetOverlay, DrawerContent as SheetContent, DrawerHeader as SheetHeader, DrawerFooter as SheetFooter, DrawerTitle as SheetTitle, DrawerDescription as SheetDescription, drawerVariants as sheetVariants, } from './drawer';
13
+ export type { DrawerContentProps as SheetContentProps, DrawerHeaderProps as SheetHeaderProps, DrawerFooterProps as SheetFooterProps, } from './drawer';
@@ -0,0 +1,15 @@
1
+ /**
2
+ * [WHO]: Textarea — multi-line text input with token-driven styling.
3
+ * [FROM]: React + `@/lib/utils` cn.
4
+ * [TO]: sparkdesign package consumers; output of CLI `add textarea` when registered.
5
+ * [HERE]: registry/basic/textarea.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.
11
+ */
12
+ import * as React from 'react';
13
+ export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
14
+ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
15
+ export { Textarea };
@@ -3,7 +3,7 @@ import * as TogglePrimitive from '@radix-ui/react-toggle';
3
3
  import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
4
4
  import { type VariantProps } from 'class-variance-authority';
5
5
  declare const toggleVariants: (props?: ({
6
- variant?: "default" | "outline" | null | undefined;
6
+ variant?: "outline" | "default" | null | undefined;
7
7
  size?: "sm" | "md" | "lg" | null | undefined;
8
8
  rounded?: "square" | "pill" | null | undefined;
9
9
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -19,6 +19,8 @@ export interface ChatInputContextValue {
19
19
  onChange: (value: string) => void;
20
20
  onSend?: (value: string) => void;
21
21
  disabled: boolean;
22
+ placeholder: string;
23
+ maxRows: number;
22
24
  form?: string;
23
25
  textareaRef: React.RefObject<HTMLTextAreaElement | null>;
24
26
  setTextareaRef: (node: HTMLTextAreaElement | null) => void;
@@ -59,7 +61,7 @@ export declare function useChatInputContext(): ChatInputContextValue;
59
61
  export type ChatInputRootProps = ChatInputProps & {
60
62
  children?: ReactNode;
61
63
  };
62
- export declare function ChatInputRootProvider({ value: controlledValue, onChange, onSend, placeholder, disabled, maxRows, form, sendButtonStatus, showFooter, showFolderButton, folderButtonLabel, onFolderButtonClick, onFolderClear, folderPermission, showMoreButton, onMoreButtonClick, footerLeftConfig, showGenerationStatus, generationStatus, attachments, addLargeIcon, folderIcon, folderOpenIcon, historyIcon, arrowDownIcon, subMenuArrowIcon, folderFillIcon, closeIcon, dataStyle, dataTheme, className, children, ...rest }: ChatInputRootProps): import("react/jsx-runtime").JSX.Element;
64
+ export declare function ChatInputRootProvider({ value: controlledValue, onChange, onSend, placeholder, disabled, maxRows, form, sendButtonStatus, showFooter, showFolderButton, folderButtonLabel, onFolderButtonClick, onFolderClear, folderPermission, showMoreButton, onMoreButtonClick, footerLeftConfig, showGenerationStatus, generationStatus, attachments, addLargeIcon, folderIcon, folderOpenIcon, historyIcon, arrowDownIcon, subMenuArrowIcon, folderFillIcon, closeIcon, dataStyle, dataTheme, children, ...rest }: ChatInputRootProps): import("react/jsx-runtime").JSX.Element;
63
65
  export declare namespace ChatInputRootProvider {
64
66
  var displayName: string;
65
67
  }
@@ -0,0 +1,72 @@
1
+ import type { RefObject, ReactNode } from 'react';
2
+ /** 单个锚点项 */
3
+ export interface ConversationAnchorItem {
4
+ /** 稳定 id,用于定位 DOM 节点与 React key */
5
+ id: string;
6
+ /** 在 Tooltip 中展示的摘要文案(纯文本)。为空时回落到 labels.scrollTo。 */
7
+ summary?: string;
8
+ }
9
+ /** i18n 文案 */
10
+ export interface ConversationAnchorLabels {
11
+ /** nav 的 aria-label */
12
+ ariaLabel?: string;
13
+ /** Tooltip 兜底文案(无摘要时) */
14
+ scrollTo?: string;
15
+ }
16
+ /** 样式变体 */
17
+ export type ConversationAnchorVariant = 'bar' | 'punch';
18
+ export interface ConversationAnchorNavProps {
19
+ /** 滚动容器 ref,用于检测当前可视锚点;受控场景可传 { current: null } */
20
+ scrollContainerRef: RefObject<HTMLElement | null>;
21
+ /** 锚点列表,顺序即视觉顺序 */
22
+ items: ConversationAnchorItem[];
23
+ /** 点击锚点时回调,参数为在 items 中的索引与对应 item */
24
+ onSelect: (index: number, item: ConversationAnchorItem) => void;
25
+ /**
26
+ * 当前高亮索引(受控)。
27
+ * 省略时组件内部会订阅 scrollContainerRef 的滚动并通过 IntersectionObserver 自动推导。
28
+ */
29
+ activeIndex?: number;
30
+ /**
31
+ * 锚点视觉样式:
32
+ * - 'bar' (默认):短横杠,hover 时加长
33
+ * - 'punch':圆形"打孔"点,适合羊皮纸 / 拟物风主题
34
+ */
35
+ variant?: ConversationAnchorVariant;
36
+ /** 少于该数量时隐藏整个 nav,默认 3 */
37
+ minItems?: number;
38
+ /** 外部强制隐藏(例如 compact 布局),默认 false */
39
+ hidden?: boolean;
40
+ /** 自定义 Tooltip / aria 文案 */
41
+ labels?: ConversationAnchorLabels;
42
+ /** 额外 className(会与默认定位 className 合并) */
43
+ className?: string;
44
+ /**
45
+ * 自定义锚点元素解析。默认通过
46
+ * `scrollContainerRef.current.querySelector('[data-spark-anchor="<id>"]')`
47
+ * 查找;需要业务在消息容器上添加该属性。
48
+ */
49
+ getAnchorElement?: (item: ConversationAnchorItem, index: number, container: HTMLElement) => HTMLElement | null;
50
+ /** 渲染 slot:自定义每个锚点的视觉表达,返回 null 时回落到内置样式 */
51
+ renderAnchor?: (ctx: {
52
+ item: ConversationAnchorItem;
53
+ index: number;
54
+ isActive: boolean;
55
+ variant: ConversationAnchorVariant;
56
+ }) => ReactNode;
57
+ }
58
+ export declare const ConversationAnchorNav: import("react").NamedExoticComponent<ConversationAnchorNavProps>;
59
+ export interface UseVisibleAnchorIndexOptions {
60
+ scrollContainerRef: RefObject<HTMLElement | null>;
61
+ items: ConversationAnchorItem[];
62
+ /** 与 ConversationAnchorNav 同名 prop,默认按 `[data-spark-anchor="<id>"]` 查找 */
63
+ getAnchorElement?: ConversationAnchorNavProps['getAnchorElement'];
64
+ /** 为 false 时不订阅滚动,返回 0;用于受控场景 */
65
+ enabled?: boolean;
66
+ }
67
+ /**
68
+ * 订阅 scroll 容器内每个锚点元素的可见性,返回"最靠近顶部且仍可见"的锚点索引。
69
+ * - 容器必须可滚动(通常 overflow-y: auto),且锚点元素是其后代
70
+ * - 每个锚点需要能通过 `getAnchorElement` 解析到 HTMLElement
71
+ */
72
+ export declare function useVisibleAnchorIndex({ scrollContainerRef, items, getAnchorElement, enabled, }: UseVisibleAnchorIndexOptions): number;
@@ -12,6 +12,8 @@ export interface ToolInvocationCardProps {
12
12
  checkboxCircleIcon?: ReactNode;
13
13
  closeCircleIcon?: ReactNode;
14
14
  arrowDownIcon?: ReactNode;
15
+ /** @deprecated Use arrowDownIcon. */
16
+ arrowRightIcon?: ReactNode;
15
17
  runningText?: string;
16
18
  ranText?: string;
17
19
  failedText?: string;
@@ -1,6 +1,6 @@
1
1
  /* ============================================
2
2
  * Preset: Compact - 紧凑风格
3
- * 优化效率,适合信息密集场景
3
+ * 小幅压缩控件节奏,适合效率型工作台
4
4
  * ============================================ */
5
5
 
6
6
  [data-style="compact"] {
@@ -15,14 +15,25 @@
15
15
  --radius-2xl: 12px;
16
16
  --radius-3xl: 16px;
17
17
 
18
- /* Font Size (略小) */
19
- --font-size-sm: 12px;
20
- --font-size-lg: 14px;
21
- --font-size-xl: 16px;
18
+ /* Font Size (略小但保持阅读舒适) */
19
+ --font-size-xs: 12px;
20
+ --font-size-xs--line-height: 16px;
21
+ --font-size-sm: 13px;
22
+ --font-size-sm--line-height: 18px;
23
+ --font-size-base: 14px;
24
+ --font-size-base--line-height: 20px;
25
+ --font-size-lg: 15px;
26
+ --font-size-lg--line-height: 22px;
27
+ --font-size-xl: 17px;
28
+ --font-size-xl--line-height: 24px;
22
29
  --font-size-2xl: 18px;
30
+ --font-size-2xl--line-height: 24px;
23
31
  --font-size-3xl: 22px;
32
+ --font-size-3xl--line-height: 28px;
24
33
  --font-size-4xl: 28px;
34
+ --font-size-4xl--line-height: 32px;
25
35
  --font-size-5xl: 34px;
36
+ --font-size-5xl--line-height: 36px;
26
37
  --font-size-6xl: 44px;
27
38
  --font-size-7xl: 56px;
28
39
  --font-size-8xl: 64px;
@@ -49,14 +49,25 @@
49
49
  /* ChatInput 特殊配置 */
50
50
  --chat-status-overlap: 4px;
51
51
 
52
- /* Font Size (更小) */
53
- --font-size-base: 12px;
52
+ /* Font Size (信息密集:主力 text-sm 也压缩) */
53
+ --font-size-xs: 11px;
54
+ --font-size-xs--line-height: 14px;
55
+ --font-size-sm: 12px;
56
+ --font-size-sm--line-height: 16px;
57
+ --font-size-base: 13px;
58
+ --font-size-base--line-height: 18px;
54
59
  --font-size-lg: 14px;
60
+ --font-size-lg--line-height: 20px;
55
61
  --font-size-xl: 14px;
62
+ --font-size-xl--line-height: 20px;
56
63
  --font-size-2xl: 16px;
64
+ --font-size-2xl--line-height: 22px;
57
65
  --font-size-3xl: 18px;
66
+ --font-size-3xl--line-height: 24px;
58
67
  --font-size-4xl: 22px;
68
+ --font-size-4xl--line-height: 28px;
59
69
  --font-size-5xl: 28px;
70
+ --font-size-5xl--line-height: 32px;
60
71
  --font-size-6xl: 36px;
61
72
  --font-size-7xl: 44px;
62
73
  --font-size-8xl: 56px;
@@ -1,12 +1,14 @@
1
1
  /* ============================================
2
2
  * Preset: Sharp - 锐利风格
3
- * 几何精度,无圆角 + 等宽字体
3
+ * 几何精度,无圆角 + 等宽字体 + 硬朗节奏
4
4
  * ============================================ */
5
5
 
6
6
  [data-style="sharp"] {
7
- /* Spacing (与 compact 相同) */
7
+ /* Spacing (方正、克制,少量压缩) */
8
8
  --spacing-3: 10px;
9
9
  --spacing-4: 14px;
10
+ --spacing-5: 18px;
11
+ --spacing-6: 22px;
10
12
  --spacing-9: 32px;
11
13
  --spacing-11: 40px;
12
14
 
@@ -25,13 +27,23 @@
25
27
  --font-sans: var(--config-font-mono);
26
28
  font-family: var(--font-sans);
27
29
 
28
- /* Font Size (与 compact 相同) */
29
- --font-size-sm: 12px;
30
- --font-size-lg: 14px;
31
- --font-size-xl: 16px;
30
+ /* Font Size (工程感:略紧、等宽、层级清楚) */
31
+ --font-size-xs: 12px;
32
+ --font-size-xs--line-height: 16px;
33
+ --font-size-sm: 13px;
34
+ --font-size-sm--line-height: 18px;
35
+ --font-size-base: 14px;
36
+ --font-size-base--line-height: 20px;
37
+ --font-size-lg: 15px;
38
+ --font-size-lg--line-height: 22px;
39
+ --font-size-xl: 17px;
40
+ --font-size-xl--line-height: 24px;
32
41
  --font-size-2xl: 18px;
42
+ --font-size-2xl--line-height: 24px;
33
43
  --font-size-3xl: 22px;
44
+ --font-size-3xl--line-height: 28px;
34
45
  --font-size-4xl: 28px;
46
+ --font-size-4xl--line-height: 32px;
35
47
  --font-size-5xl: 34px;
36
48
  --font-size-6xl: 44px;
37
49
  --font-size-7xl: 56px;
@@ -4,7 +4,17 @@
4
4
  * ============================================ */
5
5
 
6
6
  [data-style="soft"] {
7
- /* 只覆盖 Radius (大圆角) */
7
+ /* Spacing (舒展留白) */
8
+ --spacing-3: 14px;
9
+ --spacing-4: 18px;
10
+ --spacing-5: 24px;
11
+ --spacing-6: 28px;
12
+ --spacing-8: 36px;
13
+ --spacing-9: 40px;
14
+ --spacing-11: 48px;
15
+ --spacing-12: 56px;
16
+
17
+ /* Radius (大圆角) */
8
18
  --radius-sm: 8px;
9
19
  --radius-DEFAULT: 12px;
10
20
  --radius-md: 12px;
@@ -13,4 +23,16 @@
13
23
  --radius-2xl: 24px;
14
24
  --radius-3xl: 28px;
15
25
  --radius: var(--radius-DEFAULT);
26
+
27
+ /* Font Size (阅读舒适,行高更松) */
28
+ --font-size-sm: 14px;
29
+ --font-size-sm--line-height: 22px;
30
+ --font-size-base: 15px;
31
+ --font-size-base--line-height: 24px;
32
+ --font-size-lg: 17px;
33
+ --font-size-lg--line-height: 26px;
34
+ --font-size-xl: 20px;
35
+ --font-size-xl--line-height: 28px;
36
+ --font-size-2xl: 22px;
37
+ --font-size-2xl--line-height: 30px;
16
38
  }