Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
330 changes: 165 additions & 165 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions src/components/Autocomplete/parts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,6 @@ export const GroupLabel = React.forwardRef<HTMLDivElement, GroupLabelProps>(
}
);

export interface CollectionProps {
children: (item: any, index: number) => React.ReactNode;
}

/**
* Autocomplete.Collection - Renders items within a group.
*
Expand Down
1 change: 0 additions & 1 deletion src/components/Chart/LineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ export const Line = React.forwardRef<HTMLDivElement, LineChartProps>(

if (process.env.NODE_ENV !== 'production') {
if (color && seriesProp) {
// eslint-disable-next-line no-console
console.warn(
'Chart.Line: `color` is ignored when `series` is provided. ' +
'Set color on each series entry instead.',
Expand Down
1 change: 0 additions & 1 deletion src/components/Chart/LiveChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ export const Live = React.forwardRef<HTMLDivElement, LiveChartProps>(

if (process.env.NODE_ENV !== 'production') {
if (data.some((p) => p.time > 1e12)) {
// eslint-disable-next-line no-console
console.warn(
'Chart.Live: `time` values appear to be in milliseconds. Expected unix seconds.',
);
Expand Down
18 changes: 9 additions & 9 deletions src/components/Chart/LiveValue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ export const LiveValue = React.forwardRef<HTMLSpanElement, LiveValueProps>(
speedRef.current = lerpSpeed;
});

// Restart loop when target changes
React.useEffect(() => {
targetRef.current = value;
if (!rafRef.current) {
lastFrameRef.current = 0;
rafRef.current = requestAnimationFrame(tick);
}
}, [value]);

const tick = React.useCallback(() => {
const now = performance.now();
const dt = lastFrameRef.current ? Math.min(now - lastFrameRef.current, MAX_DELTA_MS) : 16.67;
Expand All @@ -69,6 +60,15 @@ export const LiveValue = React.forwardRef<HTMLSpanElement, LiveValueProps>(
rafRef.current = requestAnimationFrame(tick);
}, []);

// Restart loop when target changes
React.useEffect(() => {
targetRef.current = value;
if (!rafRef.current) {
lastFrameRef.current = 0;
rafRef.current = requestAnimationFrame(tick);
}
}, [value, tick]);

React.useEffect(() => {
rafRef.current = requestAnimationFrame(tick);
const onVisibility = () => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Chart/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export function useChartScrub(opts: ChartScrubOptions) {
const index = Math.max(0, Math.min(dataLength - 1, Math.round(rawX / step)));
setActiveIndex((prev) => (prev === index ? prev : index));
},
[dataLength, plotWidth, padLeft, tooltipMode],
[dataLength, plotWidth, padLeft, tooltipMode, interpolatorsRef],
);

const hideHover = React.useCallback(() => {
Expand Down Expand Up @@ -226,7 +226,7 @@ export function useChartScrub(opts: ChartScrubOptions) {
}
}
},
[dataLength, plotWidth, padLeft, tooltipMode],
[dataLength, plotWidth, padLeft, tooltipMode, interpolatorsRef],
);

const handleKeyDown = React.useCallback(
Expand Down
1 change: 1 addition & 0 deletions src/components/Combobox/parts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ export interface ValueProps
* Render function that receives selected value(s) and returns React nodes.
* For multi-select, receives an array of values.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- render prop accepts any value type the consumer configures on Root
children?: React.ReactNode | ((selectedValue: any) => React.ReactNode);
}

Expand Down