@coinbase/cds-mcp-server 8.17.2 → 8.17.4

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 (284) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/mcp-docs/mobile/components/Accordion.txt +188 -0
  3. package/mcp-docs/mobile/components/AccordionItem.txt +29 -0
  4. package/mcp-docs/mobile/components/Alert.txt +155 -0
  5. package/mcp-docs/mobile/components/AreaChart.txt +265 -0
  6. package/mcp-docs/mobile/components/Avatar.txt +195 -0
  7. package/mcp-docs/mobile/components/AvatarButton.txt +225 -0
  8. package/mcp-docs/mobile/components/Banner.txt +221 -0
  9. package/mcp-docs/mobile/components/BarChart.txt +815 -0
  10. package/mcp-docs/mobile/components/Box.txt +173 -0
  11. package/mcp-docs/mobile/components/BrowserBar.txt +146 -0
  12. package/mcp-docs/mobile/components/Button.txt +198 -0
  13. package/mcp-docs/mobile/components/ButtonGroup.txt +79 -0
  14. package/mcp-docs/mobile/components/Carousel.txt +1083 -0
  15. package/mcp-docs/mobile/components/CartesianChart.txt +825 -0
  16. package/mcp-docs/mobile/components/CellMedia.txt +70 -0
  17. package/mcp-docs/mobile/components/Checkbox.txt +245 -0
  18. package/mcp-docs/mobile/components/CheckboxCell.txt +201 -0
  19. package/mcp-docs/mobile/components/CheckboxGroup.txt +284 -0
  20. package/mcp-docs/mobile/components/Chip.txt +194 -0
  21. package/mcp-docs/mobile/components/Coachmark.txt +157 -0
  22. package/mcp-docs/mobile/components/Collapsible.txt +104 -0
  23. package/mcp-docs/mobile/components/ContainedAssetCard.txt +134 -0
  24. package/mcp-docs/mobile/components/ContentCard.txt +365 -0
  25. package/mcp-docs/mobile/components/ContentCardBody.txt +135 -0
  26. package/mcp-docs/mobile/components/ContentCardFooter.txt +127 -0
  27. package/mcp-docs/mobile/components/ContentCardHeader.txt +145 -0
  28. package/mcp-docs/mobile/components/ContentCell.txt +226 -0
  29. package/mcp-docs/mobile/components/ControlGroup.txt +443 -0
  30. package/mcp-docs/mobile/components/DatePicker.txt +496 -0
  31. package/mcp-docs/mobile/components/Divider.txt +138 -0
  32. package/mcp-docs/mobile/components/DotCount.txt +145 -0
  33. package/mcp-docs/mobile/components/DotStatusColor.txt +58 -0
  34. package/mcp-docs/mobile/components/DotSymbol.txt +134 -0
  35. package/mcp-docs/mobile/components/Fallback.txt +157 -0
  36. package/mcp-docs/mobile/components/FloatingAssetCard.txt +155 -0
  37. package/mcp-docs/mobile/components/HStack.txt +234 -0
  38. package/mcp-docs/mobile/components/HeroSquare.txt +47 -0
  39. package/mcp-docs/mobile/components/Icon.txt +51 -0
  40. package/mcp-docs/mobile/components/IconButton.txt +268 -0
  41. package/mcp-docs/mobile/components/InputChip.txt +187 -0
  42. package/mcp-docs/mobile/components/Interactable.txt +186 -0
  43. package/mcp-docs/mobile/components/LineChart.txt +1324 -0
  44. package/mcp-docs/mobile/components/Link.txt +291 -0
  45. package/mcp-docs/mobile/components/ListCell.txt +412 -0
  46. package/mcp-docs/mobile/components/LogoMark.txt +84 -0
  47. package/mcp-docs/mobile/components/LogoWordMark.txt +93 -0
  48. package/mcp-docs/mobile/components/Lottie.txt +138 -0
  49. package/mcp-docs/mobile/components/LottieStatusAnimation.txt +46 -0
  50. package/mcp-docs/mobile/components/Modal.txt +83 -0
  51. package/mcp-docs/mobile/components/ModalBody.txt +33 -0
  52. package/mcp-docs/mobile/components/ModalFooter.txt +24 -0
  53. package/mcp-docs/mobile/components/ModalHeader.txt +27 -0
  54. package/mcp-docs/mobile/components/MultiContentModule.txt +379 -0
  55. package/mcp-docs/mobile/components/NavigationTitle.txt +131 -0
  56. package/mcp-docs/mobile/components/NavigationTitleSelect.txt +141 -0
  57. package/mcp-docs/mobile/components/NudgeCard.txt +89 -0
  58. package/mcp-docs/mobile/components/Numpad.txt +340 -0
  59. package/mcp-docs/mobile/components/Overlay.txt +151 -0
  60. package/mcp-docs/mobile/components/PageFooter.txt +160 -0
  61. package/mcp-docs/mobile/components/PageHeader.txt +185 -0
  62. package/mcp-docs/mobile/components/PeriodSelector.txt +407 -0
  63. package/mcp-docs/mobile/components/Pictogram.txt +47 -0
  64. package/mcp-docs/mobile/components/Point.txt +204 -0
  65. package/mcp-docs/mobile/components/PortalProvider.txt +78 -0
  66. package/mcp-docs/mobile/components/Pressable.txt +210 -0
  67. package/mcp-docs/mobile/components/ProgressBar.txt +129 -0
  68. package/mcp-docs/mobile/components/ProgressBarWithFixedLabels.txt +160 -0
  69. package/mcp-docs/mobile/components/ProgressBarWithFloatLabel.txt +137 -0
  70. package/mcp-docs/mobile/components/ProgressCircle.txt +236 -0
  71. package/mcp-docs/mobile/components/Radio.txt +241 -0
  72. package/mcp-docs/mobile/components/RadioCell.txt +201 -0
  73. package/mcp-docs/mobile/components/RadioGroup.txt +281 -0
  74. package/mcp-docs/mobile/components/ReferenceLine.txt +152 -0
  75. package/mcp-docs/mobile/components/RemoteImage.txt +105 -0
  76. package/mcp-docs/mobile/components/RemoteImageGroup.txt +60 -0
  77. package/mcp-docs/mobile/components/RollingNumber.txt +788 -0
  78. package/mcp-docs/mobile/components/Scrubber.txt +203 -0
  79. package/mcp-docs/mobile/components/SearchInput.txt +191 -0
  80. package/mcp-docs/mobile/components/SectionHeader.txt +204 -0
  81. package/mcp-docs/mobile/components/SegmentedTabs.txt +315 -0
  82. package/mcp-docs/mobile/components/Select.txt +211 -0
  83. package/mcp-docs/mobile/components/SelectChip.txt +323 -0
  84. package/mcp-docs/mobile/components/SelectOption.txt +84 -0
  85. package/mcp-docs/mobile/components/SlideButton.txt +330 -0
  86. package/mcp-docs/mobile/components/Spacer.txt +83 -0
  87. package/mcp-docs/mobile/components/Sparkline.txt +122 -0
  88. package/mcp-docs/mobile/components/SparklineGradient.txt +106 -0
  89. package/mcp-docs/mobile/components/SparklineInteractive.txt +156 -0
  90. package/mcp-docs/mobile/components/SparklineInteractiveHeader.txt +72 -0
  91. package/mcp-docs/mobile/components/Spinner.txt +48 -0
  92. package/mcp-docs/mobile/components/SpotIcon.txt +47 -0
  93. package/mcp-docs/mobile/components/SpotRectangle.txt +47 -0
  94. package/mcp-docs/mobile/components/SpotSquare.txt +47 -0
  95. package/mcp-docs/mobile/components/Stepper.txt +527 -0
  96. package/mcp-docs/mobile/components/SubBrandLogoMark.txt +125 -0
  97. package/mcp-docs/mobile/components/SubBrandLogoWordMark.txt +125 -0
  98. package/mcp-docs/mobile/components/Switch.txt +97 -0
  99. package/mcp-docs/mobile/components/TabIndicator.txt +48 -0
  100. package/mcp-docs/mobile/components/TabLabel.txt +153 -0
  101. package/mcp-docs/mobile/components/TabNavigation.txt +146 -0
  102. package/mcp-docs/mobile/components/TabbedChips.txt +142 -0
  103. package/mcp-docs/mobile/components/Tabs.txt +190 -0
  104. package/mcp-docs/mobile/components/Tag.txt +300 -0
  105. package/mcp-docs/mobile/components/Text.txt +211 -0
  106. package/mcp-docs/mobile/components/TextInput.txt +717 -0
  107. package/mcp-docs/mobile/components/ThemeProvider.txt +132 -0
  108. package/mcp-docs/mobile/components/Toast.txt +196 -0
  109. package/mcp-docs/mobile/components/Tooltip.txt +59 -0
  110. package/mcp-docs/mobile/components/TopNavBar.txt +161 -0
  111. package/mcp-docs/mobile/components/Tour.txt +158 -0
  112. package/mcp-docs/mobile/components/Tray.txt +252 -0
  113. package/mcp-docs/mobile/components/UpsellCard.txt +321 -0
  114. package/mcp-docs/mobile/components/VStack.txt +222 -0
  115. package/mcp-docs/mobile/components/XAxis.txt +621 -0
  116. package/mcp-docs/mobile/components/YAxis.txt +567 -0
  117. package/mcp-docs/mobile/getting-started/ai-overview.txt +108 -0
  118. package/mcp-docs/mobile/getting-started/installation.txt +57 -0
  119. package/mcp-docs/mobile/getting-started/introduction.txt +102 -0
  120. package/mcp-docs/mobile/getting-started/playground.txt +28 -0
  121. package/mcp-docs/mobile/getting-started/styling.txt +84 -0
  122. package/mcp-docs/mobile/getting-started/theming.txt +286 -0
  123. package/mcp-docs/mobile/hooks/useDimensions.txt +72 -0
  124. package/mcp-docs/mobile/hooks/useEventHandler.txt +120 -0
  125. package/mcp-docs/mobile/hooks/useMergeRefs.txt +116 -0
  126. package/mcp-docs/mobile/hooks/useOverlayContentContext.txt +280 -0
  127. package/mcp-docs/mobile/hooks/usePreviousValue.txt +74 -0
  128. package/mcp-docs/mobile/hooks/useRefMap.txt +178 -0
  129. package/mcp-docs/mobile/hooks/useTheme.txt +321 -0
  130. package/mcp-docs/mobile/routes.txt +139 -0
  131. package/mcp-docs/web/components/Accordion.txt +189 -0
  132. package/mcp-docs/web/components/AccordionItem.txt +31 -0
  133. package/mcp-docs/web/components/Alert.txt +164 -0
  134. package/mcp-docs/web/components/AreaChart.txt +510 -0
  135. package/mcp-docs/web/components/Avatar.txt +211 -0
  136. package/mcp-docs/web/components/AvatarButton.txt +240 -0
  137. package/mcp-docs/web/components/Banner.txt +226 -0
  138. package/mcp-docs/web/components/BarChart.txt +1267 -0
  139. package/mcp-docs/web/components/Box.txt +175 -0
  140. package/mcp-docs/web/components/Button.txt +212 -0
  141. package/mcp-docs/web/components/ButtonGroup.txt +79 -0
  142. package/mcp-docs/web/components/Calendar.txt +181 -0
  143. package/mcp-docs/web/components/Carousel.txt +1575 -0
  144. package/mcp-docs/web/components/CartesianChart.txt +1044 -0
  145. package/mcp-docs/web/components/CellMedia.txt +56 -0
  146. package/mcp-docs/web/components/Checkbox.txt +188 -0
  147. package/mcp-docs/web/components/CheckboxCell.txt +202 -0
  148. package/mcp-docs/web/components/CheckboxGroup.txt +219 -0
  149. package/mcp-docs/web/components/Chip.txt +196 -0
  150. package/mcp-docs/web/components/Coachmark.txt +188 -0
  151. package/mcp-docs/web/components/Collapsible.txt +119 -0
  152. package/mcp-docs/web/components/ContainedAssetCard.txt +232 -0
  153. package/mcp-docs/web/components/ContentCard.txt +367 -0
  154. package/mcp-docs/web/components/ContentCardBody.txt +137 -0
  155. package/mcp-docs/web/components/ContentCardFooter.txt +129 -0
  156. package/mcp-docs/web/components/ContentCardHeader.txt +147 -0
  157. package/mcp-docs/web/components/ContentCell.txt +219 -0
  158. package/mcp-docs/web/components/ControlGroup.txt +436 -0
  159. package/mcp-docs/web/components/DatePicker.txt +505 -0
  160. package/mcp-docs/web/components/Divider.txt +143 -0
  161. package/mcp-docs/web/components/DotCount.txt +149 -0
  162. package/mcp-docs/web/components/DotStatusColor.txt +58 -0
  163. package/mcp-docs/web/components/DotSymbol.txt +137 -0
  164. package/mcp-docs/web/components/Dropdown.txt +119 -0
  165. package/mcp-docs/web/components/Fallback.txt +163 -0
  166. package/mcp-docs/web/components/FloatingAssetCard.txt +250 -0
  167. package/mcp-docs/web/components/FullscreenAlert.txt +69 -0
  168. package/mcp-docs/web/components/FullscreenModal.txt +145 -0
  169. package/mcp-docs/web/components/FullscreenModalLayout.txt +187 -0
  170. package/mcp-docs/web/components/Grid.txt +236 -0
  171. package/mcp-docs/web/components/GridColumn.txt +209 -0
  172. package/mcp-docs/web/components/HStack.txt +236 -0
  173. package/mcp-docs/web/components/HeroSquare.txt +48 -0
  174. package/mcp-docs/web/components/Icon.txt +145 -0
  175. package/mcp-docs/web/components/IconButton.txt +390 -0
  176. package/mcp-docs/web/components/InputChip.txt +187 -0
  177. package/mcp-docs/web/components/Interactable.txt +193 -0
  178. package/mcp-docs/web/components/LineChart.txt +1576 -0
  179. package/mcp-docs/web/components/Link.txt +243 -0
  180. package/mcp-docs/web/components/ListCell.txt +418 -0
  181. package/mcp-docs/web/components/LogoMark.txt +84 -0
  182. package/mcp-docs/web/components/LogoWordMark.txt +93 -0
  183. package/mcp-docs/web/components/Lottie.txt +157 -0
  184. package/mcp-docs/web/components/LottieStatusAnimation.txt +57 -0
  185. package/mcp-docs/web/components/MediaQueryProvider.txt +108 -0
  186. package/mcp-docs/web/components/Modal.txt +196 -0
  187. package/mcp-docs/web/components/ModalBody.txt +117 -0
  188. package/mcp-docs/web/components/ModalFooter.txt +119 -0
  189. package/mcp-docs/web/components/ModalHeader.txt +123 -0
  190. package/mcp-docs/web/components/MultiContentModule.txt +381 -0
  191. package/mcp-docs/web/components/NavigationBar.txt +102 -0
  192. package/mcp-docs/web/components/NavigationTitle.txt +25 -0
  193. package/mcp-docs/web/components/NavigationTitleSelect.txt +45 -0
  194. package/mcp-docs/web/components/NudgeCard.txt +181 -0
  195. package/mcp-docs/web/components/Overlay.txt +171 -0
  196. package/mcp-docs/web/components/PageFooter.txt +184 -0
  197. package/mcp-docs/web/components/PageHeader.txt +243 -0
  198. package/mcp-docs/web/components/Pagination.txt +499 -0
  199. package/mcp-docs/web/components/PeriodSelector.txt +703 -0
  200. package/mcp-docs/web/components/Pictogram.txt +48 -0
  201. package/mcp-docs/web/components/Point.txt +460 -0
  202. package/mcp-docs/web/components/PortalProvider.txt +76 -0
  203. package/mcp-docs/web/components/Pressable.txt +193 -0
  204. package/mcp-docs/web/components/ProgressBar.txt +163 -0
  205. package/mcp-docs/web/components/ProgressBarWithFixedLabels.txt +212 -0
  206. package/mcp-docs/web/components/ProgressBarWithFloatLabel.txt +181 -0
  207. package/mcp-docs/web/components/ProgressCircle.txt +443 -0
  208. package/mcp-docs/web/components/Radio.txt +219 -0
  209. package/mcp-docs/web/components/RadioCell.txt +215 -0
  210. package/mcp-docs/web/components/RadioGroup.txt +288 -0
  211. package/mcp-docs/web/components/ReferenceLine.txt +451 -0
  212. package/mcp-docs/web/components/RemoteImage.txt +165 -0
  213. package/mcp-docs/web/components/RemoteImageGroup.txt +86 -0
  214. package/mcp-docs/web/components/RollingNumber.txt +1021 -0
  215. package/mcp-docs/web/components/Scrubber.txt +231 -0
  216. package/mcp-docs/web/components/SearchInput.txt +117 -0
  217. package/mcp-docs/web/components/SectionHeader.txt +217 -0
  218. package/mcp-docs/web/components/SegmentedTabs.txt +324 -0
  219. package/mcp-docs/web/components/Select.txt +224 -0
  220. package/mcp-docs/web/components/SelectChip.txt +314 -0
  221. package/mcp-docs/web/components/SelectOption.txt +165 -0
  222. package/mcp-docs/web/components/Sidebar.txt +349 -0
  223. package/mcp-docs/web/components/SidebarItem.txt +131 -0
  224. package/mcp-docs/web/components/SidebarMoreMenu.txt +30 -0
  225. package/mcp-docs/web/components/Spacer.txt +173 -0
  226. package/mcp-docs/web/components/Sparkline.txt +122 -0
  227. package/mcp-docs/web/components/SparklineGradient.txt +106 -0
  228. package/mcp-docs/web/components/SparklineInteractive.txt +153 -0
  229. package/mcp-docs/web/components/SparklineInteractiveHeader.txt +76 -0
  230. package/mcp-docs/web/components/Spinner.txt +128 -0
  231. package/mcp-docs/web/components/SpotIcon.txt +48 -0
  232. package/mcp-docs/web/components/SpotRectangle.txt +48 -0
  233. package/mcp-docs/web/components/SpotSquare.txt +48 -0
  234. package/mcp-docs/web/components/Stepper.txt +682 -0
  235. package/mcp-docs/web/components/SubBrandLogoMark.txt +125 -0
  236. package/mcp-docs/web/components/SubBrandLogoWordMark.txt +125 -0
  237. package/mcp-docs/web/components/Switch.txt +85 -0
  238. package/mcp-docs/web/components/TabIndicator.txt +48 -0
  239. package/mcp-docs/web/components/TabLabel.txt +158 -0
  240. package/mcp-docs/web/components/TabNavigation.txt +159 -0
  241. package/mcp-docs/web/components/TabbedChips.txt +155 -0
  242. package/mcp-docs/web/components/Table.txt +367 -0
  243. package/mcp-docs/web/components/TableBody.txt +83 -0
  244. package/mcp-docs/web/components/TableCaption.txt +102 -0
  245. package/mcp-docs/web/components/TableCell.txt +165 -0
  246. package/mcp-docs/web/components/TableCellFallback.txt +97 -0
  247. package/mcp-docs/web/components/TableFooter.txt +83 -0
  248. package/mcp-docs/web/components/TableHeader.txt +100 -0
  249. package/mcp-docs/web/components/TableRow.txt +140 -0
  250. package/mcp-docs/web/components/Tabs.txt +212 -0
  251. package/mcp-docs/web/components/Tag.txt +304 -0
  252. package/mcp-docs/web/components/Text.txt +232 -0
  253. package/mcp-docs/web/components/TextInput.txt +652 -0
  254. package/mcp-docs/web/components/ThemeProvider.txt +199 -0
  255. package/mcp-docs/web/components/TileButton.txt +158 -0
  256. package/mcp-docs/web/components/Toast.txt +203 -0
  257. package/mcp-docs/web/components/Tooltip.txt +89 -0
  258. package/mcp-docs/web/components/Tour.txt +179 -0
  259. package/mcp-docs/web/components/Tray.txt +288 -0
  260. package/mcp-docs/web/components/UpsellCard.txt +319 -0
  261. package/mcp-docs/web/components/VStack.txt +224 -0
  262. package/mcp-docs/web/components/XAxis.txt +619 -0
  263. package/mcp-docs/web/components/YAxis.txt +548 -0
  264. package/mcp-docs/web/getting-started/ai-overview.txt +108 -0
  265. package/mcp-docs/web/getting-started/installation.txt +103 -0
  266. package/mcp-docs/web/getting-started/introduction.txt +102 -0
  267. package/mcp-docs/web/getting-started/playground.txt +28 -0
  268. package/mcp-docs/web/getting-started/styling.txt +161 -0
  269. package/mcp-docs/web/getting-started/templates.txt +121 -0
  270. package/mcp-docs/web/getting-started/theming.txt +426 -0
  271. package/mcp-docs/web/hooks/useBreakpoints.txt +61 -0
  272. package/mcp-docs/web/hooks/useDimensions.txt +114 -0
  273. package/mcp-docs/web/hooks/useEventHandler.txt +120 -0
  274. package/mcp-docs/web/hooks/useHasMounted.txt +75 -0
  275. package/mcp-docs/web/hooks/useIsoEffect.txt +58 -0
  276. package/mcp-docs/web/hooks/useMediaQuery.txt +114 -0
  277. package/mcp-docs/web/hooks/useMergeRefs.txt +116 -0
  278. package/mcp-docs/web/hooks/useOverlayContentContext.txt +279 -0
  279. package/mcp-docs/web/hooks/usePreviousValue.txt +74 -0
  280. package/mcp-docs/web/hooks/useRefMap.txt +178 -0
  281. package/mcp-docs/web/hooks/useScrollBlocker.txt +82 -0
  282. package/mcp-docs/web/hooks/useTheme.txt +364 -0
  283. package/mcp-docs/web/routes.txt +163 -0
  284. package/package.json +1 -1
@@ -0,0 +1,567 @@
1
+ # YAxis
2
+
3
+ A vertical axis component for CartesianChart. Displays tick marks, labels, gridlines, and supports custom formatting, positioning, and data domains.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import { YAxis } from '@coinbase/cds-mobile-visualization'
9
+ ```
10
+
11
+ ## Examples
12
+
13
+ ### Basic Example
14
+
15
+ The YAxis component provides a vertical axis for charts with automatic tick generation and labeling.
16
+
17
+ ```jsx
18
+ <CartesianChart
19
+ enableScrubbing
20
+ height={250}
21
+ series={[
22
+ {
23
+ id: 'prices',
24
+ data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
25
+ },
26
+ ]}
27
+ >
28
+ <YAxis showGrid />
29
+ <Line seriesId="prices" curve="monotone" showArea />
30
+ <Scrubber />
31
+ </CartesianChart>
32
+ ```
33
+
34
+ ### Axis Config
35
+
36
+ Properties related to the scale of an axis are set on the Chart component. This includes `scaleType`, `domain`, `domainLimit`, `range`, `data`, and `categoryPadding`.
37
+
38
+ #### Scale Type
39
+
40
+ YAxis supports `linear` (default) and `log` scale types. Both `linear` and `log` are numeric scales.
41
+
42
+ ```jsx
43
+ function ScaleTypeExample() {
44
+ const theme = useTheme();
45
+ return (
46
+ <CartesianChart
47
+ height={400}
48
+ series={[
49
+ {
50
+ id: 'growthExponential',
51
+ data: [
52
+ 1, 2, 4, 8, 15, 30, 65, 140, 280, 580, 1200, 2400, 4800, 9500, 19000, 38000, 75000,
53
+ 150000,
54
+ ],
55
+ color: theme.color.fgPositive,
56
+ },
57
+ ]}
58
+ yAxis={{
59
+ scaleType: 'log',
60
+ }}
61
+ >
62
+ <Line seriesId="growthExponential" />
63
+ <YAxis
64
+ showGrid
65
+ showLine
66
+ showTickMarks
67
+ requestedTickCount={6}
68
+ width={70}
69
+ tickLabelFormatter={(value) => value.toLocaleString()}
70
+ />
71
+ </CartesianChart>
72
+ );
73
+ }
74
+ ```
75
+
76
+ #### Domain
77
+
78
+ An axis's domain is the range of values that the axis will display.
79
+ You can pass in either an object (AxisBounds) with `min` and `max` properties (both optional), or a function that receives initial `AxisBounds` and returns an adjusted `AxisBounds`.
80
+
81
+ ```jsx
82
+ <CartesianChart
83
+ height={250}
84
+ series={[
85
+ {
86
+ id: 'prices',
87
+ data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
88
+ },
89
+ ]}
90
+ yAxis={{
91
+ domain: ({ min, max }) => ({ min: min - 50, max: max + 50 }),
92
+ }}
93
+ >
94
+ <YAxis showGrid />
95
+ <Line seriesId="prices" curve="monotone" showArea />
96
+ </CartesianChart>
97
+ ```
98
+
99
+ ##### Domain Limit
100
+
101
+ You can set the domain limit to `nice` (default for YAxis) or `strict`. `nice` will round the domain to human-friendly values, while `strict` will use the exact min/max values from the data. See [d3-scale](https://d3js.org/d3-scale/linear#linear_nice) for more details.
102
+
103
+ #### Range
104
+
105
+ An axis's range is the range of values that the axis will display in pixels. This is most useful for adjusting the sizing of the data inside of the chart's drawing area.
106
+
107
+ You can pass in either an object (AxisBounds) with `min` and `max` properties (both optional), or a function that receives initial `AxisBounds` and returns an adjusted `AxisBounds`.
108
+
109
+ ```jsx
110
+ <CartesianChart
111
+ height={250}
112
+ series={[
113
+ {
114
+ id: 'prices',
115
+ data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
116
+ },
117
+ ]}
118
+ yAxis={{
119
+ range: ({ min, max }) => ({ min: min + 96, max: max - 96 }),
120
+ }}
121
+ >
122
+ <Line seriesId="prices" curve="monotone" showArea />
123
+ </CartesianChart>
124
+ ```
125
+
126
+ ### Axis Props
127
+
128
+ Properties related to the visual appearance of the YAxis are set on the component itself. This includes `position`, `showGrid`, `showLine`, `showTickMarks`, `size`, `tickInterval`, `ticks`, `tickLabelFormatter`, and `tickMarkSize`.
129
+
130
+ #### Position
131
+
132
+ You can set the position of an axis to `left` or `right` (default).
133
+
134
+ ```jsx
135
+ <CartesianChart
136
+ enableScrubbing
137
+ height={512}
138
+ series={[
139
+ {
140
+ id: 'linear',
141
+ yAxisId: 'linearAxis',
142
+ data: [1, 10, 30, 50, 70, 90, 100],
143
+ label: 'linear',
144
+ },
145
+ { id: 'log', yAxisId: 'logAxis', data: [1, 10, 30, 50, 70, 90, 100], label: 'log' },
146
+ ]}
147
+ xAxis={[{ data: [1, 10, 30, 50, 70, 90, 100] }]}
148
+ yAxis={[
149
+ { id: 'linearAxis', scaleType: 'linear' },
150
+ { id: 'logAxis', scaleType: 'log' },
151
+ ]}
152
+ >
153
+ <YAxis showLine showTickMarks axisId="logAxis" position="left" />
154
+ <YAxis showLine showTickMarks axisId="linearAxis" />
155
+ <Line curve="natural" seriesId="linear" />
156
+ <Line curve="natural" seriesId="log" />
157
+ <Scrubber />
158
+ </CartesianChart>
159
+ ```
160
+
161
+ #### Grid
162
+
163
+ You can show grid lines at each tick position using the `showGrid` prop.
164
+
165
+ ```jsx
166
+ function YAxisGridExample() {
167
+ const [showGrid, setShowGrid] = useState(true);
168
+ return (
169
+ <VStack gap={2}>
170
+ <HStack gap={2} style={{ flexWrap: 'wrap' }}>
171
+ <Switch checked={showGrid} onChange={() => setShowGrid(!showGrid)}>
172
+ Show Grid
173
+ </Switch>
174
+ </HStack>
175
+ <CartesianChart
176
+ enableScrubbing
177
+ height={250}
178
+ series={[
179
+ {
180
+ id: 'prices',
181
+ data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
182
+ },
183
+ ]}
184
+ >
185
+ <YAxis showGrid={showGrid} />
186
+ <Line seriesId="prices" curve="monotone" showArea />
187
+ <Scrubber />
188
+ </CartesianChart>
189
+ </VStack>
190
+ );
191
+ }
192
+ ```
193
+
194
+ You can also customize the grid lines using the `GridLineComponent` prop.
195
+
196
+ ```jsx
197
+ function CustomGridLineExample() {
198
+ const theme = useTheme();
199
+ const ThinSolidLine = memo((props: SolidLineProps) => <SolidLine {...props} strokeWidth={1} />);
200
+
201
+ const categories = Array.from({ length: 31 }, (_, i) => `3/${i + 1}`);
202
+ const gains = [
203
+ 5, 0, 6, 18, 0, 5, 12, 0, 12, 22, 28, 18, 0, 12, 6, 0, 0, 24, 0, 0, 4, 0, 18, 0, 0, 14, 10, 16,
204
+ 0, 0, 0,
205
+ ];
206
+ const losses = [
207
+ -4, 0, -8, -12, -6, 0, 0, 0, -18, 0, -12, 0, -9, -6, 0, 0, 0, 0, -22, -8, 0, 0, -10, -14, 0, 0,
208
+ 0, 0, 0, -12, -10,
209
+ ];
210
+ const series = [
211
+ { id: 'gains', data: gains, color: theme.color.fgPositive, stackId: 'bars' },
212
+ { id: 'losses', data: losses, color: theme.color.fgNegative, stackId: 'bars' },
213
+ ];
214
+
215
+ return (
216
+ <CartesianChart
217
+ height={420}
218
+ padding={4}
219
+ series={series}
220
+ xAxis={{ data: categories, scaleType: 'band' }}
221
+ >
222
+ <XAxis />
223
+ <YAxis
224
+ showGrid
225
+ GridLineComponent={ThinSolidLine}
226
+ tickLabelFormatter={(value) => `$${value}M`}
227
+ />
228
+ <BarPlot />
229
+ <ReferenceLine LineComponent={SolidLine} dataY={0} />
230
+ </CartesianChart>
231
+ );
232
+ };
233
+ ```
234
+
235
+ #### Line
236
+
237
+ You can show the axis line using the `showLine` prop.
238
+
239
+ ```jsx
240
+ function YAxisLineExample() {
241
+ const [showLine, setShowLine] = useState(true);
242
+ return (
243
+ <VStack gap={2}>
244
+ <HStack gap={2} style={{ flexWrap: 'wrap' }}>
245
+ <Switch checked={showLine} onChange={() => setShowLine(!showLine)}>
246
+ Show Line
247
+ </Switch>
248
+ </HStack>
249
+ <CartesianChart
250
+ enableScrubbing
251
+ height={250}
252
+ series={[
253
+ {
254
+ id: 'prices',
255
+ data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
256
+ },
257
+ ]}
258
+ >
259
+ <YAxis showLine={showLine} />
260
+ <Line seriesId="prices" curve="monotone" showArea />
261
+ <Scrubber />
262
+ </CartesianChart>
263
+ </VStack>
264
+ );
265
+ }
266
+ ```
267
+
268
+ You can also customize the axis line using the `classNames` and `styles` props.
269
+
270
+ ```jsx
271
+ function YAxisLineStylesExample() {
272
+ const theme = useTheme();
273
+ const [showLine, setShowLine] = useState(true);
274
+ return (
275
+ <VStack gap={2}>
276
+ <HStack gap={2} style={{ flexWrap: 'wrap' }}>
277
+ <Switch checked={showLine} onChange={() => setShowLine(!showLine)}>
278
+ Show Line
279
+ </Switch>
280
+ </HStack>
281
+ <CartesianChart
282
+ enableScrubbing
283
+ height={250}
284
+ series={[
285
+ {
286
+ id: 'prices',
287
+ data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
288
+ },
289
+ ]}
290
+ >
291
+ <YAxis
292
+ showLine={showLine}
293
+ showGrid
294
+ styles={{ line: { stroke: theme.color.accentBoldGreen, strokeWidth: 4 } }}
295
+ />
296
+ <Line seriesId="prices" curve="monotone" showArea />
297
+ <Scrubber />
298
+ </CartesianChart>
299
+ </VStack>
300
+ );
301
+ }
302
+ ```
303
+
304
+ #### Size
305
+
306
+ The `size` prop sets the size of the axis in pixels. The default is 44 for YAxis, but can be adjusted to fit the size of your data.
307
+
308
+ ```jsx
309
+ function YAxisSizeExample() {
310
+ const theme = useTheme();
311
+ return (
312
+ <CartesianChart
313
+ height={400}
314
+ series={[
315
+ {
316
+ id: 'growthExponential',
317
+ data: [
318
+ 1, 2, 4, 8, 15, 30, 65, 140, 280, 580, 1200, 2400, 4800, 9500, 19000, 38000, 75000,
319
+ 150000,
320
+ ],
321
+ color: theme.color.fgPositive,
322
+ },
323
+ ]}
324
+ >
325
+ <Line curve="natural" showArea seriesId="growthExponential" />
326
+ <YAxis
327
+ showGrid
328
+ showLine
329
+ showTickMarks
330
+ requestedTickCount={6}
331
+ width={70}
332
+ tickLabelFormatter={(value) => value.toLocaleString()}
333
+ />
334
+ </CartesianChart>
335
+ );
336
+ }
337
+ ```
338
+
339
+ #### Ticks
340
+
341
+ You can use the `ticks`, `requestedTickCount` (default for YAxis), and `tickInterval` props to control the number and placement of ticks on the YAxis.
342
+
343
+ `ticks` accepts an array of numbers, which corresponds to the values of that axis that you would like to display ticks for.
344
+
345
+ ```jsx
346
+ <CartesianChart
347
+ enableScrubbing
348
+ height={250}
349
+ series={[
350
+ {
351
+ id: 'prices',
352
+ data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
353
+ },
354
+ ]}
355
+ >
356
+ <YAxis showLine showTickMarks showGrid ticks={[34, 56, 80]} />
357
+ <Line seriesId="prices" curve="monotone" showArea />
358
+ <Scrubber />
359
+ </CartesianChart>
360
+ ```
361
+
362
+ Using `requestedTickCount` will use [D3's ticks function](https://d3js.org/d3-array/ticks#ticks) to determine the number and placement of ticks. Note that this count is not guaranteed to be respected.
363
+
364
+ This is the default behavior for YAxis, and defaults to `5`.
365
+
366
+ ```jsx
367
+ <CartesianChart
368
+ enableScrubbing
369
+ height={250}
370
+ series={[
371
+ {
372
+ id: 'prices',
373
+ data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
374
+ },
375
+ ]}
376
+ >
377
+ <YAxis showLine showTickMarks showGrid requestedTickCount={5} />
378
+ <Line seriesId="prices" curve="monotone" showArea />
379
+ <Scrubber />
380
+ </CartesianChart>
381
+ ```
382
+
383
+ `tickInterval`, which accepts a number for the gap between ticks in pixels, will measure the available space and try to create evenly spaced ticks. It will always include the first and last values of the domain.
384
+
385
+ ```jsx
386
+ <CartesianChart
387
+ enableScrubbing
388
+ height={250}
389
+ series={[
390
+ {
391
+ id: 'prices',
392
+ data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
393
+ },
394
+ ]}
395
+ >
396
+ <YAxis showLine showTickMarks showGrid tickInterval={8} />
397
+ <Line seriesId="prices" curve="monotone" showArea />
398
+ <Scrubber />
399
+ </CartesianChart>
400
+ ```
401
+
402
+ #### Tick Marks
403
+
404
+ You can show tick marks on the axis using the `showTickMarks` prop.
405
+ You can also customize the tick mark size using the `tickMarkSize` prop.
406
+
407
+ ```jsx
408
+ function YAxisTickMarksExample() {
409
+ const [showTickMarks, setShowTickMarks] = useState(true);
410
+ return (
411
+ <VStack gap={2}>
412
+ <HStack gap={2} style={{ flexWrap: 'wrap' }}>
413
+ <Switch checked={showTickMarks} onChange={() => setShowTickMarks(!showTickMarks)}>
414
+ Show Tick Marks
415
+ </Switch>
416
+ </HStack>
417
+ <CartesianChart
418
+ enableScrubbing
419
+ height={250}
420
+ series={[
421
+ {
422
+ id: 'prices',
423
+ data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
424
+ },
425
+ ]}
426
+ >
427
+ <YAxis showLine showTickMarks={showTickMarks} tickMarkSize={16} showGrid />
428
+ <Line seriesId="prices" curve="monotone" showArea />
429
+ <Scrubber />
430
+ </CartesianChart>
431
+ </VStack>
432
+ );
433
+ }
434
+ ```
435
+
436
+ #### Tick Labels
437
+
438
+ You can customize the tick labels using the `tickLabelFormatter` prop.
439
+
440
+ ```jsx
441
+ <CartesianChart
442
+ enableScrubbing
443
+ height={250}
444
+ series={[
445
+ {
446
+ id: 'prices',
447
+ data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
448
+ },
449
+ ]}
450
+ >
451
+ <YAxis showGrid tickLabelFormatter={(value) => `$${value}`} />
452
+ <Line seriesId="prices" curve="monotone" showArea />
453
+ <Scrubber />
454
+ </CartesianChart>
455
+ ```
456
+
457
+ ### Customization
458
+
459
+ #### Multiple Y Axes
460
+
461
+ ```jsx
462
+ function MultipleYAxesExample() {
463
+ const theme = useTheme();
464
+ return (
465
+ <VStack gap={2}>
466
+ <CartesianChart
467
+ height={400}
468
+ series={[
469
+ {
470
+ id: 'revenue',
471
+ data: [455, 520, 380, 455, 285, 235],
472
+ yAxisId: 'revenue',
473
+ color: theme.color.accentBoldYellow,
474
+ },
475
+ {
476
+ id: 'profitMargin',
477
+ data: [23, 20, 16, 38, 12, 9],
478
+ yAxisId: 'profitMargin',
479
+ color: theme.color.fgPositive,
480
+ },
481
+ ]}
482
+ xAxis={{
483
+ data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
484
+ scaleType: 'band',
485
+ }}
486
+ yAxis={[
487
+ {
488
+ id: 'revenue',
489
+ domain: { min: 0 },
490
+ },
491
+ {
492
+ id: 'profitMargin',
493
+ domain: { min: 0, max: 100 },
494
+ },
495
+ ]}
496
+ >
497
+ <XAxis showLine showTickMarks />
498
+ <YAxis
499
+ showGrid
500
+ showLine
501
+ showTickMarks
502
+ axisId="revenue"
503
+ position="left"
504
+ requestedTickCount={5}
505
+ width={60}
506
+ tickLabelFormatter={(value) => `$${value}k`}
507
+ />
508
+ <YAxis
509
+ showLine
510
+ showTickMarks
511
+ axisId="profitMargin"
512
+ requestedTickCount={5}
513
+ tickLabelFormatter={(value) => `${value}%`}
514
+ />
515
+ <BarPlot />
516
+ </CartesianChart>
517
+ <HStack justifyContent="center" gap={2}>
518
+ <Box alignItems="center" gap={0.5}>
519
+ <Box
520
+ borderRadius={1000}
521
+ width={10}
522
+ height={10}
523
+ style={{ background: theme.color.accentBoldYellow }}
524
+ />
525
+ <Text font="label2">Revenue ($)</Text>
526
+ </Box>
527
+ <Box alignItems="center" gap={0.5}>
528
+ <Box
529
+ borderRadius={1000}
530
+ width={10}
531
+ height={10}
532
+ style={{ background: theme.color.fgPositive }}
533
+ />
534
+ <Text font="label2">Profit Margin (%)</Text>
535
+ </Box>
536
+ </HStack>
537
+ </VStack>
538
+ );
539
+ }
540
+ ```
541
+
542
+ ## Props
543
+
544
+ | Prop | Type | Required | Default | Description |
545
+ | --- | --- | --- | --- | --- |
546
+ | `GridLineComponent` | `LineComponent` | No | `DottedLine` | Component to render the grid lines. |
547
+ | `axisId` | `string` | No | `-` | The ID of the axis to render. Defaults to defaultAxisId if not specified. |
548
+ | `className` | `string` | No | `-` | Custom className for the axis. |
549
+ | `classNames` | `{ root?: string; tickLabel?: string \| undefined; gridLine?: string \| undefined; line?: string \| undefined; tickMark?: string \| undefined; } \| undefined` | No | `-` | Custom classNames for the axis. |
550
+ | `minTickLabelGap` | `number` | No | `4` | Minimum gap between tick labels. Labels will be hidden if they are closer than this gap. |
551
+ | `position` | `left \| right` | No | `'right'` | The position of the axis relative to the charts drawing area. |
552
+ | `requestedTickCount` | `number` | No | `5 (for y-axis)` | Requested number of ticks to display. This value is passed into d3 and may not be respected. |
553
+ | `showGrid` | `boolean` | No | `-` | Whether to show grid lines at each tick position. |
554
+ | `showLine` | `boolean` | No | `-` | Whether to show the axis line. |
555
+ | `showTickMarks` | `boolean` | No | `-` | Whether to show tick marks on the axis. |
556
+ | `style` | `CSSProperties` | No | `-` | Custom style for the axis. |
557
+ | `styles` | `{ root?: CSSProperties; tickLabel?: CSSProperties \| undefined; gridLine?: CSSProperties \| undefined; line?: CSSProperties \| undefined; tickMark?: CSSProperties \| undefined; } \| undefined` | No | `-` | Custom styles for the axis. |
558
+ | `tickInterval` | `number` | No | `32 (for x-axis)` | Interval at which to show ticks. When provided, calculates tick count based on available space. |
559
+ | `tickLabelFormatter` | `((value: any) => ChartTextChildren)` | No | `-` | Formatter function for axis tick values. Tick values will be wrapped in ChartText component. |
560
+ | `tickMarkLabelGap` | `number` | No | `2 for x-axis, 8 for y-axis` | Space between the axis tick mark and labels. If tick marks are not shown, this is the gap between the axis and the chart. |
561
+ | `tickMarkSize` | `number` | No | `4` | Size of the tick marks. |
562
+ | `tickMaxStep` | `number` | No | `-` | Maximum step size for tick generation. Prevents the step from being larger than this value. |
563
+ | `tickMinStep` | `number` | No | `1` | Minimum step size for tick generation. Prevents the step from being smaller than this value. |
564
+ | `ticks` | `number[] \| ((value: number) => boolean)` | No | `-` | Custom tick configuration for the axis. When provided, this overrides the requestedTickCount property. - **Array**: Uses these exact values for tick positioning and labels. - **Function**: Filters based on the predicate function. - For **x-axis**: Checks every data index (0, 1, 2, ..., dataLength-1) - For **y-axis**: Filters d3-generated tick values |
565
+ | `width` | `number` | No | `44` | Width of the axis. This value is inclusive of the padding. |
566
+
567
+
@@ -0,0 +1,108 @@
1
+ ---
2
+ id: ai-overview
3
+ title: AI Overview
4
+ hide_title: true
5
+ ---
6
+
7
+ import { VStack } from '@coinbase/cds-web/layout';
8
+ import { MDXSection } from '@site/src/components/page/MDXSection';
9
+ import { MDXArticle } from '@site/src/components/page/MDXArticle';
10
+ import { ContentHeader } from '@site/src/components/page/ContentHeader';
11
+
12
+ <VStack gap={5}>
13
+ <ContentHeader
14
+ title="AI Overview"
15
+ description="Use AI as your CDS development partner to build consistent, accessible user interfaces across web and mobile platforms."
16
+ />
17
+
18
+ <MDXSection>
19
+ <MDXArticle>
20
+
21
+ ## MCP Server
22
+
23
+ The CDS MCP Server provides direct CDS context to LLMs, allowing AI models to understand and work with CDS APIs and components.
24
+
25
+ From [modelcontextprotocol.io](https://modelcontextprotocol.io/docs/getting-started/intro):
26
+
27
+ > _MCP is an open protocol that standardizes how applications provide context to large language models (LLMs). MCP provides a standardized way to connect AI models to different data sources and tools._
28
+
29
+ ### First time setup
30
+
31
+ Run the setup command to install the CDS MCP Server for Cursor or Claude Code, then enable the MCP server in your agent.
32
+
33
+ ```bash
34
+ npx --package=@coinbase/cds-mcp-server cds-mcp-setup
35
+ ```
36
+
37
+ :::tip
38
+ Make sure to enable the MCP server after installation.<br />
39
+ See the [Cursor docs here](https://cursor.com/docs/context/mcp#using-mcp-in-chat) and the [Claude Code docs here](https://docs.claude.com/en/docs/claude-code/mcp#managing-your-servers) for more information.
40
+ :::
41
+
42
+ ### Using the MCP server
43
+
44
+ Once the CDS MCP Server is enabled in your agent, the agent will automatically be able to use the CDS MCP tools to interact with the CDS APIs and components.
45
+
46
+ Try asking a question like "How can I add an icon to a CDS Button?" or "How can I customize the CDS Stepper component behavior?"
47
+
48
+ ### Advanced installation
49
+
50
+ To install the MCP server separately as a standalone package and add it as a dependency to your project:
51
+
52
+ ```bash
53
+ npm install @coinbase/cds-mcp-server
54
+ ```
55
+
56
+ Or with Yarn:
57
+
58
+ ```bash
59
+ yarn add @coinbase/cds-mcp-server
60
+ ```
61
+
62
+ :::tip
63
+ Avoid installing mismatched versions of the CDS libraries and the CDS MCP Server. The MCP server is automatically included as a dependency of the CDS libraries.
64
+ :::
65
+
66
+ </MDXArticle>
67
+ </MDXSection>
68
+
69
+ <MDXSection>
70
+ <MDXArticle>
71
+
72
+ ## Documentation
73
+
74
+ Documentation pages include "View as markdown" and "Copy page" buttons in a markdown like format.
75
+ This is useful when pasting documentation into ChatGPT, Claude, or Perplexity for help with implementation.
76
+
77
+ ### Documentation indexes
78
+
79
+ CDS also provides a comprehensive index of documentation in markdown format per platform:
80
+
81
+ **Web:**
82
+
83
+ ```
84
+ https://cds.coinbase.com/llms/web/routes.txt
85
+ ```
86
+
87
+ **Mobile:**
88
+
89
+ ```
90
+ https://cds.coinbase.com/llms/mobile/routes.txt
91
+ ```
92
+
93
+ Each routes file contains links to all component documentation, React hooks, getting started guides, and brief descriptions for each item.
94
+
95
+ #### Adding indexes to Cursor
96
+
97
+ You can add these indexes to Cursor for searchable access to the entire CDS documentation library:
98
+
99
+ 1. Open Cursor Settings
100
+ 2. Navigate to "Indexing & Docs"
101
+ 3. Add the docs URL for your platform (web or mobile) using the routes links above
102
+ 4. AI will automatically fetch relevant docs when you reference components
103
+
104
+ Other AI IDEs and assistants can be given these indexes as needed or added to their rule files.
105
+
106
+ </MDXArticle>
107
+ </MDXSection>
108
+ </VStack>