@coinbase/cds-mcp-server 8.47.2 → 8.47.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/mcp-docs/mobile/components/BarChart.txt +8 -8
- package/mcp-docs/mobile/components/CartesianChart.txt +85 -30
- package/mcp-docs/mobile/components/LineChart.txt +16 -16
- package/mcp-docs/mobile/components/Numpad.txt +2 -2
- package/mcp-docs/mobile/components/Point.txt +2 -2
- package/mcp-docs/mobile/components/ReferenceLine.txt +151 -65
- package/mcp-docs/mobile/components/Scrubber.txt +12 -19
- package/mcp-docs/mobile/components/Select.txt +1 -1
- package/mcp-docs/mobile/components/SelectAlpha.txt +1 -1
- package/mcp-docs/mobile/components/SelectOption.txt +1 -1
- package/mcp-docs/mobile/components/SlideButton.txt +1 -1
- package/mcp-docs/mobile/components/SparklineInteractive.txt +239 -46
- package/mcp-docs/mobile/components/SparklineInteractiveHeader.txt +55 -13
- package/mcp-docs/mobile/components/XAxis.txt +4 -5
- package/mcp-docs/mobile/components/YAxis.txt +2 -2
- package/mcp-docs/mobile/getting-started/theming.txt +1 -1
- package/mcp-docs/web/components/BarChart.txt +40 -48
- package/mcp-docs/web/components/Carousel.txt +2 -2
- package/mcp-docs/web/components/CartesianChart.txt +82 -45
- package/mcp-docs/web/components/Combobox.txt +61 -61
- package/mcp-docs/web/components/LineChart.txt +87 -110
- package/mcp-docs/web/components/MediaQueryProvider.txt +10 -2
- package/mcp-docs/web/components/PeriodSelector.txt +57 -39
- package/mcp-docs/web/components/Point.txt +3 -3
- package/mcp-docs/web/components/ReferenceLine.txt +341 -279
- package/mcp-docs/web/components/Scrubber.txt +48 -52
- package/mcp-docs/web/components/SelectChipAlpha.txt +1 -1
- package/mcp-docs/web/components/SparklineInteractive.txt +399 -54
- package/mcp-docs/web/components/SparklineInteractiveHeader.txt +368 -28
- package/mcp-docs/web/components/TabbedChipsAlpha.txt +1 -1
- package/mcp-docs/web/components/XAxis.txt +5 -6
- package/mcp-docs/web/components/YAxis.txt +2 -2
- package/mcp-docs/web/getting-started/theming.txt +1 -1
- package/mcp-docs/web/hooks/useBreakpoints.txt +5 -4
- package/mcp-docs/web/hooks/useMediaQuery.txt +10 -2
- package/package.json +1 -1
|
@@ -101,7 +101,7 @@ setting `label` on Scrubber displays a label above the scrubber line.
|
|
|
101
101
|
]}
|
|
102
102
|
showArea
|
|
103
103
|
>
|
|
104
|
-
<Scrubber label={(dataIndex
|
|
104
|
+
<Scrubber label={(dataIndex) => `Day ${dataIndex + 1}`} />
|
|
105
105
|
</LineChart>
|
|
106
106
|
```
|
|
107
107
|
|
|
@@ -295,11 +295,14 @@ You can use `BeaconLabelComponent` to customize the labels for each scrubber bea
|
|
|
295
295
|
```jsx live
|
|
296
296
|
function CustomBeaconLabel() {
|
|
297
297
|
// This custom component label shows the percentage value of the data at the scrubber position.
|
|
298
|
-
const MyScrubberBeaconLabel = memo(({ seriesId, color, label, ...props}
|
|
298
|
+
const MyScrubberBeaconLabel = memo(({ seriesId, color, label, ...props }) => {
|
|
299
299
|
const { getSeriesData, dataLength } = useCartesianChartContext();
|
|
300
300
|
const { scrubberPosition } = useScrubberContext();
|
|
301
301
|
|
|
302
|
-
const seriesData = useMemo(
|
|
302
|
+
const seriesData = useMemo(
|
|
303
|
+
() => getLineData(getSeriesData(seriesId)),
|
|
304
|
+
[getSeriesData, seriesId],
|
|
305
|
+
);
|
|
303
306
|
|
|
304
307
|
const dataIndex = useMemo(() => {
|
|
305
308
|
return scrubberPosition ?? Math.max(0, dataLength - 1);
|
|
@@ -311,7 +314,7 @@ function CustomBeaconLabel() {
|
|
|
311
314
|
return `${label} · ${dataAtPosition}%`;
|
|
312
315
|
}
|
|
313
316
|
return label;
|
|
314
|
-
}, [label, seriesData, dataIndex])
|
|
317
|
+
}, [label, seriesData, dataIndex]);
|
|
315
318
|
|
|
316
319
|
return (
|
|
317
320
|
<DefaultScrubberBeaconLabel
|
|
@@ -391,11 +394,7 @@ You can use `hideBeaconLabels` to hide beacon labels, while still being able to
|
|
|
391
394
|
showArea
|
|
392
395
|
inset={{ top: 60 }}
|
|
393
396
|
>
|
|
394
|
-
<Scrubber
|
|
395
|
-
hideBeaconLabels
|
|
396
|
-
label={(dataIndex: number) => `Day ${dataIndex + 1}`}
|
|
397
|
-
labelElevated
|
|
398
|
-
/>
|
|
397
|
+
<Scrubber hideBeaconLabels label={(dataIndex) => `Day ${dataIndex + 1}`} labelElevated />
|
|
399
398
|
</LineChart>
|
|
400
399
|
```
|
|
401
400
|
|
|
@@ -414,7 +413,7 @@ Using `labelElevated` will elevate the Scrubber's reference line label with a sh
|
|
|
414
413
|
showArea
|
|
415
414
|
inset={{ top: 60 }}
|
|
416
415
|
>
|
|
417
|
-
<Scrubber label={(dataIndex
|
|
416
|
+
<Scrubber label={(dataIndex) => `Day ${dataIndex + 1}`} labelElevated />
|
|
418
417
|
</LineChart>
|
|
419
418
|
```
|
|
420
419
|
|
|
@@ -422,7 +421,7 @@ You can use `LabelComponent` to customize this label even further.
|
|
|
422
421
|
|
|
423
422
|
```jsx live
|
|
424
423
|
function CustomLabelComponent() {
|
|
425
|
-
const CustomLabelComponent = memo((props
|
|
424
|
+
const CustomLabelComponent = memo((props) => {
|
|
426
425
|
const { drawingArea } = useCartesianChartContext();
|
|
427
426
|
|
|
428
427
|
if (!drawingArea) return;
|
|
@@ -454,7 +453,7 @@ function CustomLabelComponent() {
|
|
|
454
453
|
>
|
|
455
454
|
<Scrubber
|
|
456
455
|
LabelComponent={CustomLabelComponent}
|
|
457
|
-
label={(dataIndex
|
|
456
|
+
label={(dataIndex) => `Day ${dataIndex + 1}`}
|
|
458
457
|
/>
|
|
459
458
|
</LineChart>
|
|
460
459
|
);
|
|
@@ -490,7 +489,7 @@ You can use `labelFont` to customize the font of the scrubber line label and `be
|
|
|
490
489
|
}}
|
|
491
490
|
>
|
|
492
491
|
<Scrubber
|
|
493
|
-
label={(dataIndex
|
|
492
|
+
label={(dataIndex) => `Day ${dataIndex + 1}`}
|
|
494
493
|
labelFont="legal"
|
|
495
494
|
beaconLabelFont="legal"
|
|
496
495
|
/>
|
|
@@ -569,7 +568,7 @@ You can use `BeaconComponent` and `BeaconLabelComponent` with the `opacity` prop
|
|
|
569
568
|
```jsx live
|
|
570
569
|
function HiddenScrubberWhenIdle() {
|
|
571
570
|
const MyScrubberBeacon = memo(
|
|
572
|
-
forwardRef((props
|
|
571
|
+
forwardRef((props, ref) => {
|
|
573
572
|
const { scrubberPosition } = useScrubberContext();
|
|
574
573
|
const isScrubbing = scrubberPosition !== undefined;
|
|
575
574
|
|
|
@@ -577,7 +576,7 @@ function HiddenScrubberWhenIdle() {
|
|
|
577
576
|
}),
|
|
578
577
|
);
|
|
579
578
|
|
|
580
|
-
const MyScrubberBeaconLabel = memo((props
|
|
579
|
+
const MyScrubberBeaconLabel = memo((props) => {
|
|
581
580
|
const { scrubberPosition } = useScrubberContext();
|
|
582
581
|
const isScrubbing = scrubberPosition !== undefined;
|
|
583
582
|
|
|
@@ -631,44 +630,41 @@ You can use `BeaconLabelComponent` to display a label with the percentage value
|
|
|
631
630
|
|
|
632
631
|
```jsx live
|
|
633
632
|
function PercentageBeaconLabels() {
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
const { scrubberPosition } = useScrubberContext();
|
|
633
|
+
const PercentageScrubberBeaconLabel = memo(({ seriesId, color, label, ...props }) => {
|
|
634
|
+
const { getSeriesData, dataLength } = useCartesianChartContext();
|
|
635
|
+
const { scrubberPosition } = useScrubberContext();
|
|
638
636
|
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
},
|
|
671
|
-
);
|
|
637
|
+
const seriesData = useMemo(
|
|
638
|
+
() => getLineData(getSeriesData(seriesId)),
|
|
639
|
+
[getSeriesData, seriesId],
|
|
640
|
+
);
|
|
641
|
+
|
|
642
|
+
const dataIndex = useMemo(() => {
|
|
643
|
+
return scrubberPosition ?? Math.max(0, dataLength - 1);
|
|
644
|
+
}, [scrubberPosition, dataLength]);
|
|
645
|
+
|
|
646
|
+
const percentageLabel = useMemo(() => {
|
|
647
|
+
if (seriesData !== undefined) {
|
|
648
|
+
const dataAtPosition = seriesData[dataIndex];
|
|
649
|
+
return (
|
|
650
|
+
<>
|
|
651
|
+
{dataAtPosition}%<tspan fontWeight="400"> {label}</tspan>
|
|
652
|
+
</>
|
|
653
|
+
);
|
|
654
|
+
}
|
|
655
|
+
return label;
|
|
656
|
+
}, [label, seriesData, dataIndex]);
|
|
657
|
+
|
|
658
|
+
return (
|
|
659
|
+
<DefaultScrubberBeaconLabel
|
|
660
|
+
{...props}
|
|
661
|
+
background={color}
|
|
662
|
+
color="rgb(var(--gray0))"
|
|
663
|
+
label={percentageLabel}
|
|
664
|
+
seriesId={seriesId}
|
|
665
|
+
/>
|
|
666
|
+
);
|
|
667
|
+
});
|
|
672
668
|
|
|
673
669
|
const PercentageBeaconLabelChart = ({ background, scrubberLineStroke, ...props }) => {
|
|
674
670
|
return (
|
|
@@ -189,7 +189,7 @@ function ExampleMultiGroups() {
|
|
|
189
189
|
|
|
190
190
|
```jsx live
|
|
191
191
|
function ExampleMultiAssets() {
|
|
192
|
-
const assetImageMap
|
|
192
|
+
const assetImageMap = {
|
|
193
193
|
btc: assets.btc.imageUrl,
|
|
194
194
|
eth: assets.eth.imageUrl,
|
|
195
195
|
dai: assets.dai.imageUrl,
|