From 3cf486f56ca2918db784447148184301edf98358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikolai=20R=C3=B8ed=20Kristiansen?= Date: Sat, 22 May 2021 03:11:36 +0200 Subject: [PATCH] chore(deps): Use @react-spring/web (#1517) Replace use of multi target react-spring to avoid peer dependency warnings. Update package.json files, JS imports and lock deps Close #1505 --- packages/annotations/package.json | 4 +- packages/annotations/src/AnnotationLink.js | 2 +- packages/annotations/src/AnnotationNote.js | 2 +- .../src/CircleAnnotationOutline.js | 2 +- .../annotations/src/DotAnnotationOutline.js | 2 +- .../annotations/src/RectAnnotationOutline.js | 2 +- packages/arcs/package.json | 4 +- packages/arcs/src/ArcShape.tsx | 2 +- packages/arcs/src/arc_labels/ArcLabel.tsx | 2 +- .../arcs/src/arc_link_labels/ArcLinkLabel.tsx | 2 +- .../useArcLinkLabelsTransition.ts | 2 +- packages/arcs/src/centers.ts | 2 +- packages/arcs/src/interpolateArc.ts | 2 +- packages/arcs/src/useAnimatedArc.ts | 2 +- packages/arcs/src/useArcsTransition.ts | 2 +- packages/axes/package.json | 4 +- packages/axes/src/components/Axis.tsx | 2 +- packages/axes/src/components/AxisTick.tsx | 2 +- packages/axes/src/components/GridLine.tsx | 2 +- packages/axes/src/components/GridLines.tsx | 2 +- packages/axes/src/types.ts | 2 +- packages/bullet/package.json | 4 +- packages/bullet/src/BulletItem.tsx | 2 +- packages/bullet/src/BulletMarkers.tsx | 2 +- packages/bullet/src/BulletMarkersItem.tsx | 2 +- packages/bullet/src/BulletRects.tsx | 2 +- packages/bullet/src/BulletRectsItem.tsx | 2 +- packages/bullet/src/types.ts | 2 +- packages/bump/package.json | 4 +- packages/bump/src/area-bump/Area.js | 2 +- packages/bump/src/area-bump/AreasLabels.js | 2 +- packages/bump/src/bump/Line.js | 2 +- packages/bump/src/bump/LinesLabels.js | 2 +- packages/bump/src/bump/Point.js | 2 +- packages/circle-packing/package.json | 4 +- packages/circle-packing/src/CircleHtml.tsx | 2 +- packages/circle-packing/src/CircleSvg.tsx | 2 +- packages/circle-packing/src/Circles.tsx | 2 +- packages/circle-packing/src/LabelHtml.tsx | 2 +- packages/circle-packing/src/LabelSvg.tsx | 2 +- packages/circle-packing/src/Labels.tsx | 2 +- packages/circle-packing/src/types.ts | 2 +- packages/core/index.d.ts | 2 +- packages/core/package.json | 4 +- packages/core/src/components/dots/DotsItem.js | 2 +- packages/core/src/hooks/useAnimatedPath.js | 2 +- packages/core/src/motion/context.js | 2 +- packages/funnel/package.json | 4 +- packages/funnel/src/Part.js | 2 +- packages/funnel/src/PartLabel.js | 2 +- packages/funnel/src/Separator.js | 2 +- packages/heatmap/package.json | 4 +- packages/heatmap/src/HeatMapCellCircle.js | 2 +- packages/heatmap/src/HeatMapCellRect.js | 2 +- packages/line/package.json | 4 +- packages/line/src/Areas.js | 2 +- packages/line/src/LinesItem.js | 2 +- packages/marimekko/package.json | 4 +- packages/marimekko/src/Bar.tsx | 2 +- packages/marimekko/src/Bars.tsx | 2 +- packages/parallel-coordinates/package.json | 4 +- .../ParallelCoordinatesAxisDensityCircles.js | 2 +- .../src/ParallelCoordinatesAxisDensityPoly.js | 2 +- .../src/ParallelCoordinatesLine.js | 2 +- packages/pie/stories/pie.stories.tsx | 2 +- packages/pie/tests/Pie.test.tsx | 2 +- packages/radar/package.json | 4 +- packages/radar/src/RadarGridLabels.js | 2 +- packages/radar/src/RadarGridLevels.js | 2 +- packages/radar/src/RadarShapes.js | 2 +- packages/sankey/package.json | 4 +- packages/sankey/src/SankeyLabels.js | 2 +- packages/sankey/src/SankeyLinksItem.js | 2 +- packages/sankey/src/SankeyNodesItem.js | 2 +- packages/stream/package.json | 4 +- packages/stream/src/StreamDotsItem.js | 2 +- packages/stream/src/StreamLayer.js | 2 +- packages/tooltip/package.json | 4 +- packages/tooltip/src/CrosshairLine.tsx | 2 +- packages/tooltip/src/TooltipWrapper.tsx | 2 +- packages/treemap/package.json | 4 +- packages/treemap/src/TreeMapHtmlNode.js | 2 +- packages/treemap/src/TreeMapNode.js | 2 +- packages/treemap/src/TreeMapNodes.js | 2 +- .../controls/MotionConfigControl.js | 2 +- yarn.lock | 54 +------------------ 86 files changed, 103 insertions(+), 155 deletions(-) diff --git a/packages/annotations/package.json b/packages/annotations/package.json index 4257f1828c..4b4495bbad 100644 --- a/packages/annotations/package.json +++ b/packages/annotations/package.json @@ -29,7 +29,7 @@ "dependencies": { "@nivo/colors": "0.69.0", "lodash": "^4.17.11", - "react-spring": "9.1.2" + "@react-spring/web": "9.1.2" }, "devDependencies": { "@nivo/core": "0.69.0" @@ -42,4 +42,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/packages/annotations/src/AnnotationLink.js b/packages/annotations/src/AnnotationLink.js index f85bebc4e3..adf3611cec 100644 --- a/packages/annotations/src/AnnotationLink.js +++ b/packages/annotations/src/AnnotationLink.js @@ -8,7 +8,7 @@ */ import React, { memo } from 'react' import PropTypes from 'prop-types' -import { animated } from 'react-spring' +import { animated } from '@react-spring/web' import { useAnimatedPath, useTheme } from '@nivo/core' const AnnotationLink = memo(({ isOutline, ...props }) => { diff --git a/packages/annotations/src/AnnotationNote.js b/packages/annotations/src/AnnotationNote.js index 7339818c5f..f1647c2ac9 100644 --- a/packages/annotations/src/AnnotationNote.js +++ b/packages/annotations/src/AnnotationNote.js @@ -9,7 +9,7 @@ import React, { memo } from 'react' import omit from 'lodash/omit' import PropTypes from 'prop-types' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { useTheme, useMotionConfig } from '@nivo/core' const AnnotationNote = memo(({ datum, x, y, note }) => { diff --git a/packages/annotations/src/CircleAnnotationOutline.js b/packages/annotations/src/CircleAnnotationOutline.js index 0acffa2fc7..e69f2bdc08 100644 --- a/packages/annotations/src/CircleAnnotationOutline.js +++ b/packages/annotations/src/CircleAnnotationOutline.js @@ -8,7 +8,7 @@ */ import React, { memo } from 'react' import PropTypes from 'prop-types' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { useMotionConfig, useTheme } from '@nivo/core' const CircleAnnotationOutline = memo(({ x, y, size }) => { diff --git a/packages/annotations/src/DotAnnotationOutline.js b/packages/annotations/src/DotAnnotationOutline.js index 7ac5858b04..e367616b26 100644 --- a/packages/annotations/src/DotAnnotationOutline.js +++ b/packages/annotations/src/DotAnnotationOutline.js @@ -8,7 +8,7 @@ */ import React, { memo } from 'react' import PropTypes from 'prop-types' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { useMotionConfig, useTheme } from '@nivo/core' const DotAnnotationOutline = memo(({ x, y, size }) => { diff --git a/packages/annotations/src/RectAnnotationOutline.js b/packages/annotations/src/RectAnnotationOutline.js index f3cf98224d..ba4166adeb 100644 --- a/packages/annotations/src/RectAnnotationOutline.js +++ b/packages/annotations/src/RectAnnotationOutline.js @@ -8,7 +8,7 @@ */ import React, { memo } from 'react' import PropTypes from 'prop-types' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { useMotionConfig, useTheme } from '@nivo/core' const RectAnnotationOutline = memo(({ x, y, width, height }) => { diff --git a/packages/arcs/package.json b/packages/arcs/package.json index 62d0734901..4550d75297 100644 --- a/packages/arcs/package.json +++ b/packages/arcs/package.json @@ -30,7 +30,7 @@ "dependencies": { "@nivo/colors": "0.69.0", "d3-shape": "^1.3.5", - "react-spring": "9.1.2" + "@react-spring/web": "9.1.2" }, "devDependencies": { "@nivo/core": "0.69.0", @@ -43,4 +43,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/packages/arcs/src/ArcShape.tsx b/packages/arcs/src/ArcShape.tsx index c7e70e3ba0..650d4d6026 100644 --- a/packages/arcs/src/ArcShape.tsx +++ b/packages/arcs/src/ArcShape.tsx @@ -1,5 +1,5 @@ import React, { useCallback } from 'react' -import { SpringValue, Interpolation, animated } from 'react-spring' +import { SpringValue, Interpolation, animated } from '@react-spring/web' import { DatumWithArcAndColor } from './types' export type ArcMouseHandler = ( diff --git a/packages/arcs/src/arc_labels/ArcLabel.tsx b/packages/arcs/src/arc_labels/ArcLabel.tsx index 382fe44fa1..57ca4b573f 100644 --- a/packages/arcs/src/arc_labels/ArcLabel.tsx +++ b/packages/arcs/src/arc_labels/ArcLabel.tsx @@ -1,5 +1,5 @@ import React, { CSSProperties } from 'react' -import { SpringValue, Interpolation, animated } from 'react-spring' +import { SpringValue, Interpolation, animated } from '@react-spring/web' import { useTheme } from '@nivo/core' import { DatumWithArcAndColor } from '../types' diff --git a/packages/arcs/src/arc_link_labels/ArcLinkLabel.tsx b/packages/arcs/src/arc_link_labels/ArcLinkLabel.tsx index 032b961890..e43cbe419a 100644 --- a/packages/arcs/src/arc_link_labels/ArcLinkLabel.tsx +++ b/packages/arcs/src/arc_link_labels/ArcLinkLabel.tsx @@ -1,6 +1,6 @@ import React from 'react' import { useTheme } from '@nivo/core' -import { SpringValue, Interpolation, animated } from 'react-spring' +import { SpringValue, Interpolation, animated } from '@react-spring/web' import { DatumWithArcAndColor } from '../types' export interface ArcLinkLabelProps { diff --git a/packages/arcs/src/arc_link_labels/useArcLinkLabelsTransition.ts b/packages/arcs/src/arc_link_labels/useArcLinkLabelsTransition.ts index 71d42d990c..b652e20747 100644 --- a/packages/arcs/src/arc_link_labels/useArcLinkLabelsTransition.ts +++ b/packages/arcs/src/arc_link_labels/useArcLinkLabelsTransition.ts @@ -1,5 +1,5 @@ import { useMemo } from 'react' -import { SpringValue, useTransition, to } from 'react-spring' +import { SpringValue, useTransition, to } from '@react-spring/web' import { line } from 'd3-shape' import { useMotionConfig, useTheme } from '@nivo/core' import { InheritedColorConfig, useInheritedColor } from '@nivo/colors' diff --git a/packages/arcs/src/centers.ts b/packages/arcs/src/centers.ts index b18ed735ef..8432cbfd26 100644 --- a/packages/arcs/src/centers.ts +++ b/packages/arcs/src/centers.ts @@ -1,5 +1,5 @@ import { useMemo } from 'react' -import { useTransition, to, SpringValue } from 'react-spring' +import { useTransition, to, SpringValue } from '@react-spring/web' import { // @ts-ignore midAngle, diff --git a/packages/arcs/src/interpolateArc.ts b/packages/arcs/src/interpolateArc.ts index c589ffb610..4b918e117d 100644 --- a/packages/arcs/src/interpolateArc.ts +++ b/packages/arcs/src/interpolateArc.ts @@ -1,4 +1,4 @@ -import { to, SpringValue } from 'react-spring' +import { to, SpringValue } from '@react-spring/web' import { ArcGenerator } from './types' /** diff --git a/packages/arcs/src/useAnimatedArc.ts b/packages/arcs/src/useAnimatedArc.ts index d321e3a3ee..8fafc84d49 100644 --- a/packages/arcs/src/useAnimatedArc.ts +++ b/packages/arcs/src/useAnimatedArc.ts @@ -1,4 +1,4 @@ -import { useSpring } from 'react-spring' +import { useSpring } from '@react-spring/web' import { useMotionConfig } from '@nivo/core' import { Arc, ArcGenerator } from './types' import { interpolateArc } from './interpolateArc' diff --git a/packages/arcs/src/useArcsTransition.ts b/packages/arcs/src/useArcsTransition.ts index c1cfeae4ab..b393633595 100644 --- a/packages/arcs/src/useArcsTransition.ts +++ b/packages/arcs/src/useArcsTransition.ts @@ -1,4 +1,4 @@ -import { useTransition } from 'react-spring' +import { useTransition } from '@react-spring/web' import { useMotionConfig } from '@nivo/core' import { DatumWithArc } from './types' import { ArcTransitionMode, useArcTransitionMode, TransitionExtra } from './arcTransitionMode' diff --git a/packages/axes/package.json b/packages/axes/package.json index 845a055055..66db5ecea6 100644 --- a/packages/axes/package.json +++ b/packages/axes/package.json @@ -31,7 +31,7 @@ "d3-format": "^1.4.4", "d3-time": "^1.0.11", "d3-time-format": "^2.1.3", - "react-spring": "9.1.2" + "@react-spring/web": "9.1.2" }, "devDependencies": { "@nivo/core": "0.69.0", @@ -47,4 +47,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/packages/axes/src/components/Axis.tsx b/packages/axes/src/components/Axis.tsx index 8bd1703594..d05c6c7793 100644 --- a/packages/axes/src/components/Axis.tsx +++ b/packages/axes/src/components/Axis.tsx @@ -1,5 +1,5 @@ import React, { useMemo } from 'react' -import { useSpring, useTransition, animated } from 'react-spring' +import { useSpring, useTransition, animated } from '@react-spring/web' import { useTheme, useMotionConfig } from '@nivo/core' import { computeCartesianTicks, getFormatter } from '../compute' import { AxisTick } from './AxisTick' diff --git a/packages/axes/src/components/AxisTick.tsx b/packages/axes/src/components/AxisTick.tsx index d399808d59..edb2f3a089 100644 --- a/packages/axes/src/components/AxisTick.tsx +++ b/packages/axes/src/components/AxisTick.tsx @@ -1,5 +1,5 @@ import React, { useMemo } from 'react' -import { animated } from 'react-spring' +import { animated } from '@react-spring/web' import { useTheme } from '@nivo/core' import { AxisTickProps, AxisValue } from '../types' diff --git a/packages/axes/src/components/GridLine.tsx b/packages/axes/src/components/GridLine.tsx index 460de6f6d8..5ba01b6d72 100644 --- a/packages/axes/src/components/GridLine.tsx +++ b/packages/axes/src/components/GridLine.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { SpringValues, animated } from 'react-spring' +import { SpringValues, animated } from '@react-spring/web' import { useTheme } from '@nivo/core' export const GridLine = ({ diff --git a/packages/axes/src/components/GridLines.tsx b/packages/axes/src/components/GridLines.tsx index 88b3dc655a..c3907a03ae 100644 --- a/packages/axes/src/components/GridLines.tsx +++ b/packages/axes/src/components/GridLines.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { useTransition } from 'react-spring' +import { useTransition } from '@react-spring/web' import { useMotionConfig } from '@nivo/core' import { GridLine } from './GridLine' import { Line } from '../types' diff --git a/packages/axes/src/types.ts b/packages/axes/src/types.ts index 1ccca9061a..7f73745fe8 100644 --- a/packages/axes/src/types.ts +++ b/packages/axes/src/types.ts @@ -1,4 +1,4 @@ -import { SpringValues } from 'react-spring' +import { SpringValues } from '@react-spring/web' import { ScaleBand, ScaleLinear, diff --git a/packages/bullet/package.json b/packages/bullet/package.json index 6a6f04ba16..9efd11c1a0 100644 --- a/packages/bullet/package.json +++ b/packages/bullet/package.json @@ -34,7 +34,7 @@ "@nivo/legends": "0.69.0", "@nivo/tooltip": "0.69.0", "d3-scale": "^3.2.3", - "react-spring": "9.1.2" + "@react-spring/web": "9.1.2" }, "devDependencies": { "@nivo/core": "0.69.0", @@ -47,4 +47,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/packages/bullet/src/BulletItem.tsx b/packages/bullet/src/BulletItem.tsx index 8499d88d96..29cd5d533a 100644 --- a/packages/bullet/src/BulletItem.tsx +++ b/packages/bullet/src/BulletItem.tsx @@ -1,5 +1,5 @@ import React, { useMemo } from 'react' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { Axis } from '@nivo/axes' // @ts-ignore import { getColorScale, useMotionConfig, useTheme } from '@nivo/core' diff --git a/packages/bullet/src/BulletMarkers.tsx b/packages/bullet/src/BulletMarkers.tsx index 93e12c21a6..c13d5ff6eb 100644 --- a/packages/bullet/src/BulletMarkers.tsx +++ b/packages/bullet/src/BulletMarkers.tsx @@ -1,5 +1,5 @@ import React, { useMemo } from 'react' -import { useTransition } from 'react-spring' +import { useTransition } from '@react-spring/web' // @ts-ignore import { useMotionConfig } from '@nivo/core' import { diff --git a/packages/bullet/src/BulletMarkersItem.tsx b/packages/bullet/src/BulletMarkersItem.tsx index 0304de8973..7cbb4ef0b4 100644 --- a/packages/bullet/src/BulletMarkersItem.tsx +++ b/packages/bullet/src/BulletMarkersItem.tsx @@ -1,6 +1,6 @@ import React from 'react' import { BulletMarkersItemProps } from './types' -import { animated } from 'react-spring' +import { animated } from '@react-spring/web' export const BulletMarkersItem = ({ animatedProps: { color, transform, x, y1, y2 }, diff --git a/packages/bullet/src/BulletRects.tsx b/packages/bullet/src/BulletRects.tsx index f3e29afb89..6c660acab9 100644 --- a/packages/bullet/src/BulletRects.tsx +++ b/packages/bullet/src/BulletRects.tsx @@ -1,5 +1,5 @@ import React, { useMemo } from 'react' -import { useTransition, animated, to } from 'react-spring' +import { useTransition, animated, to } from '@react-spring/web' // @ts-ignore import { useMotionConfig } from '@nivo/core' import { computeRects } from './compute' diff --git a/packages/bullet/src/BulletRectsItem.tsx b/packages/bullet/src/BulletRectsItem.tsx index 3684fe1c94..3ca7675fc0 100644 --- a/packages/bullet/src/BulletRectsItem.tsx +++ b/packages/bullet/src/BulletRectsItem.tsx @@ -1,6 +1,6 @@ import React from 'react' import { BulletRectsItemProps } from './types' -import { animated, to } from 'react-spring' +import { animated, to } from '@react-spring/web' export const BulletRectsItem = ({ animatedProps: { x, y, width, height, color }, diff --git a/packages/bullet/src/types.ts b/packages/bullet/src/types.ts index d9f33c7f41..935a346604 100644 --- a/packages/bullet/src/types.ts +++ b/packages/bullet/src/types.ts @@ -1,7 +1,7 @@ import * as React from 'react' import { Box, Dimensions, Theme, Colors, ModernMotionProps } from '@nivo/core' import { ScaleLinear } from 'd3-scale' -import { SpringValues } from 'react-spring' +import { SpringValues } from '@react-spring/web' export type DatumId = string | number export type DatumValue = number diff --git a/packages/bump/package.json b/packages/bump/package.json index 02fe33847c..ac9deff5f6 100644 --- a/packages/bump/package.json +++ b/packages/bump/package.json @@ -35,7 +35,7 @@ "@nivo/legends": "0.69.0", "@nivo/tooltip": "0.69.0", "d3-shape": "^1.3.5", - "react-spring": "9.1.2" + "@react-spring/web": "9.1.2" }, "devDependencies": { "@nivo/core": "0.69.0" @@ -48,4 +48,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/packages/bump/src/area-bump/Area.js b/packages/bump/src/area-bump/Area.js index 8029930444..66a1d4a751 100644 --- a/packages/bump/src/area-bump/Area.js +++ b/packages/bump/src/area-bump/Area.js @@ -8,7 +8,7 @@ */ import React, { memo } from 'react' import PropTypes from 'prop-types' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { useAnimatedPath, useMotionConfig, blendModePropType } from '@nivo/core' import { useSerieHandlers } from './hooks' diff --git a/packages/bump/src/area-bump/AreasLabels.js b/packages/bump/src/area-bump/AreasLabels.js index b06bc71b1c..aebbd7c4ef 100644 --- a/packages/bump/src/area-bump/AreasLabels.js +++ b/packages/bump/src/area-bump/AreasLabels.js @@ -8,7 +8,7 @@ */ import React, { memo } from 'react' import PropTypes from 'prop-types' -import { useSprings, animated } from 'react-spring' +import { useSprings, animated } from '@react-spring/web' import { useTheme, useMotionConfig } from '@nivo/core' import { inheritedColorPropType } from '@nivo/colors' import { useSeriesLabels } from './hooks' diff --git a/packages/bump/src/bump/Line.js b/packages/bump/src/bump/Line.js index 685352b697..606cde1af3 100644 --- a/packages/bump/src/bump/Line.js +++ b/packages/bump/src/bump/Line.js @@ -8,7 +8,7 @@ */ import React, { memo } from 'react' import PropTypes from 'prop-types' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { useAnimatedPath, useMotionConfig } from '@nivo/core' import { useSerieHandlers } from './hooks' diff --git a/packages/bump/src/bump/LinesLabels.js b/packages/bump/src/bump/LinesLabels.js index 41ad81cee0..be04222dab 100644 --- a/packages/bump/src/bump/LinesLabels.js +++ b/packages/bump/src/bump/LinesLabels.js @@ -8,7 +8,7 @@ */ import React, { memo } from 'react' import PropTypes from 'prop-types' -import { useSprings, animated } from 'react-spring' +import { useSprings, animated } from '@react-spring/web' import { useTheme, useMotionConfig } from '@nivo/core' import { inheritedColorPropType } from '@nivo/colors' import { useSeriesLabels } from './hooks' diff --git a/packages/bump/src/bump/Point.js b/packages/bump/src/bump/Point.js index 83b8883000..2ed79589ff 100644 --- a/packages/bump/src/bump/Point.js +++ b/packages/bump/src/bump/Point.js @@ -8,7 +8,7 @@ */ import React, { memo } from 'react' import PropTypes from 'prop-types' -import { useSpring, animated, to } from 'react-spring' +import { useSpring, animated, to } from '@react-spring/web' import { useMotionConfig } from '@nivo/core' const pointStyle = { pointerEvents: 'none' } diff --git a/packages/circle-packing/package.json b/packages/circle-packing/package.json index 54909e2737..f7600336a2 100644 --- a/packages/circle-packing/package.json +++ b/packages/circle-packing/package.json @@ -33,7 +33,7 @@ "@nivo/tooltip": "0.69.0", "d3-hierarchy": "^1.1.8", "lodash": "^4.17.11", - "react-spring": "9.1.2" + "@react-spring/web": "9.1.2" }, "devDependencies": { "@nivo/core": "0.69.0", @@ -47,4 +47,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/packages/circle-packing/src/CircleHtml.tsx b/packages/circle-packing/src/CircleHtml.tsx index 15c118f717..03ab4bd412 100644 --- a/packages/circle-packing/src/CircleHtml.tsx +++ b/packages/circle-packing/src/CircleHtml.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { animated, to, SpringValue, Interpolation } from 'react-spring' +import { animated, to, SpringValue, Interpolation } from '@react-spring/web' import { CircleProps } from './types' import { useNodeMouseHandlers } from './hooks' diff --git a/packages/circle-packing/src/CircleSvg.tsx b/packages/circle-packing/src/CircleSvg.tsx index c07522b72c..17ef07d01e 100644 --- a/packages/circle-packing/src/CircleSvg.tsx +++ b/packages/circle-packing/src/CircleSvg.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { animated } from 'react-spring' +import { animated } from '@react-spring/web' import { CircleProps } from './types' import { useNodeMouseHandlers } from './hooks' diff --git a/packages/circle-packing/src/Circles.tsx b/packages/circle-packing/src/Circles.tsx index 437f8aeedd..dc81734cec 100644 --- a/packages/circle-packing/src/Circles.tsx +++ b/packages/circle-packing/src/Circles.tsx @@ -1,5 +1,5 @@ import React, { createElement, useMemo, MouseEvent } from 'react' -import { useTransition, to, SpringValue } from 'react-spring' +import { useTransition, to, SpringValue } from '@react-spring/web' import { useMotionConfig, useTheme } from '@nivo/core' import { useInheritedColor } from '@nivo/colors' import { useTooltip } from '@nivo/tooltip' diff --git a/packages/circle-packing/src/LabelHtml.tsx b/packages/circle-packing/src/LabelHtml.tsx index 91858a5482..0423897cdf 100644 --- a/packages/circle-packing/src/LabelHtml.tsx +++ b/packages/circle-packing/src/LabelHtml.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { animated } from 'react-spring' +import { animated } from '@react-spring/web' import { useTheme } from '@nivo/core' import { LabelProps } from './types' import { interpolatePosition, interpolateSize } from './CircleHtml' diff --git a/packages/circle-packing/src/LabelSvg.tsx b/packages/circle-packing/src/LabelSvg.tsx index eafbe82726..9eff753185 100644 --- a/packages/circle-packing/src/LabelSvg.tsx +++ b/packages/circle-packing/src/LabelSvg.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { animated } from 'react-spring' +import { animated } from '@react-spring/web' import { useTheme } from '@nivo/core' import { LabelProps } from './types' diff --git a/packages/circle-packing/src/Labels.tsx b/packages/circle-packing/src/Labels.tsx index ff780c1e3c..07adaf14ba 100644 --- a/packages/circle-packing/src/Labels.tsx +++ b/packages/circle-packing/src/Labels.tsx @@ -1,5 +1,5 @@ import React, { useMemo } from 'react' -import { useTransition } from 'react-spring' +import { useTransition } from '@react-spring/web' import { useMotionConfig } from '@nivo/core' import { CirclePackingCommonProps, ComputedDatum, LabelComponent, ComputedLabel } from './types' import { useCirclePackingLabels } from './hooks' diff --git a/packages/circle-packing/src/types.ts b/packages/circle-packing/src/types.ts index 92e4808a24..e6892cd8f0 100644 --- a/packages/circle-packing/src/types.ts +++ b/packages/circle-packing/src/types.ts @@ -1,5 +1,5 @@ import * as React from 'react' -import { Interpolation, SpringValue } from 'react-spring' +import { Interpolation, SpringValue } from '@react-spring/web' import { Box, ModernMotionProps, diff --git a/packages/core/index.d.ts b/packages/core/index.d.ts index 9951a8f554..5aaf3733a3 100644 --- a/packages/core/index.d.ts +++ b/packages/core/index.d.ts @@ -1,5 +1,5 @@ import * as React from 'react' -import { Interpolation, SpringConfig } from 'react-spring' +import { Interpolation, SpringConfig } from '@react-spring/web' declare module '@nivo/core' { export type DatumValue = string | number | Date diff --git a/packages/core/package.json b/packages/core/package.json index 0b1cbffcd1..3b184d051a 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -30,7 +30,7 @@ "d3-shape": "^1.3.5", "d3-time-format": "^2.1.3", "lodash": "^4.17.11", - "react-spring": "9.1.2", + "@react-spring/web": "9.1.2", "resize-observer-polyfill": "^1.5.1" }, "devDependencies": { @@ -44,4 +44,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/packages/core/src/components/dots/DotsItem.js b/packages/core/src/components/dots/DotsItem.js index 38dd428de4..07a33ddabd 100644 --- a/packages/core/src/components/dots/DotsItem.js +++ b/packages/core/src/components/dots/DotsItem.js @@ -8,7 +8,7 @@ */ import React, { memo } from 'react' import PropTypes from 'prop-types' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { dotsThemePropType } from '../../theming' import { useMotionConfig } from '../../motion' import DotsItemSymbol from './DotsItemSymbol' diff --git a/packages/core/src/hooks/useAnimatedPath.js b/packages/core/src/hooks/useAnimatedPath.js index a7c85187f6..322de49c08 100644 --- a/packages/core/src/hooks/useAnimatedPath.js +++ b/packages/core/src/hooks/useAnimatedPath.js @@ -1,6 +1,6 @@ import { interpolateString } from 'd3-interpolate' import { useEffect, useMemo, useRef } from 'react' -import { useSpring, to } from 'react-spring' +import { useSpring, to } from '@react-spring/web' import { useMotionConfig } from '../motion' const usePrevious = value => { diff --git a/packages/core/src/motion/context.js b/packages/core/src/motion/context.js index 26e36ff018..c08233bba1 100644 --- a/packages/core/src/motion/context.js +++ b/packages/core/src/motion/context.js @@ -9,7 +9,7 @@ import React, { createContext, useMemo } from 'react' import { isString } from 'lodash' import PropTypes from 'prop-types' -import { config as presets } from 'react-spring' +import { config as presets } from '@react-spring/web' export const motionConfigContext = createContext() diff --git a/packages/funnel/package.json b/packages/funnel/package.json index 4488981228..cf736ac038 100644 --- a/packages/funnel/package.json +++ b/packages/funnel/package.json @@ -33,7 +33,7 @@ "@nivo/tooltip": "0.69.0", "d3-scale": "^3.2.3", "d3-shape": "^1.3.5", - "react-spring": "9.1.2" + "@react-spring/web": "9.1.2" }, "devDependencies": { "@nivo/core": "0.69.0" @@ -46,4 +46,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/packages/funnel/src/Part.js b/packages/funnel/src/Part.js index 81de4b3a9f..7e7ef0f869 100644 --- a/packages/funnel/src/Part.js +++ b/packages/funnel/src/Part.js @@ -8,7 +8,7 @@ */ import React from 'react' import PropTypes from 'prop-types' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { useAnimatedPath, useMotionConfig } from '@nivo/core' export const Part = ({ part, areaGenerator, borderGenerator }) => { diff --git a/packages/funnel/src/PartLabel.js b/packages/funnel/src/PartLabel.js index 1f55d1f0a2..7f46b0efba 100644 --- a/packages/funnel/src/PartLabel.js +++ b/packages/funnel/src/PartLabel.js @@ -8,7 +8,7 @@ */ import React from 'react' import PropTypes from 'prop-types' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { useTheme, useMotionConfig } from '@nivo/core' export const PartLabel = ({ part }) => { diff --git a/packages/funnel/src/Separator.js b/packages/funnel/src/Separator.js index 4306b6e28e..c07de543b3 100644 --- a/packages/funnel/src/Separator.js +++ b/packages/funnel/src/Separator.js @@ -8,7 +8,7 @@ */ import React from 'react' import PropTypes from 'prop-types' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { useTheme, useMotionConfig } from '@nivo/core' export const Separator = ({ separator }) => { diff --git a/packages/heatmap/package.json b/packages/heatmap/package.json index 77e4d7fb7b..be4e7f9431 100644 --- a/packages/heatmap/package.json +++ b/packages/heatmap/package.json @@ -32,7 +32,7 @@ "@nivo/colors": "0.69.0", "@nivo/tooltip": "0.69.0", "d3-scale": "^3.2.3", - "react-spring": "9.1.2" + "@react-spring/web": "9.1.2" }, "devDependencies": { "@nivo/core": "0.69.0" @@ -45,4 +45,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/packages/heatmap/src/HeatMapCellCircle.js b/packages/heatmap/src/HeatMapCellCircle.js index 179cc3855b..f62399ff07 100644 --- a/packages/heatmap/src/HeatMapCellCircle.js +++ b/packages/heatmap/src/HeatMapCellCircle.js @@ -8,7 +8,7 @@ */ import React, { memo } from 'react' import PropTypes from 'prop-types' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { useTheme, useMotionConfig } from '@nivo/core' const HeatMapCellCircle = ({ diff --git a/packages/heatmap/src/HeatMapCellRect.js b/packages/heatmap/src/HeatMapCellRect.js index c93915d741..e89f84ddc9 100644 --- a/packages/heatmap/src/HeatMapCellRect.js +++ b/packages/heatmap/src/HeatMapCellRect.js @@ -8,7 +8,7 @@ */ import React, { memo } from 'react' import PropTypes from 'prop-types' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { useMotionConfig, useTheme } from '@nivo/core' const HeatMapCellRect = ({ diff --git a/packages/line/package.json b/packages/line/package.json index d88f7415c2..66a9350ef2 100644 --- a/packages/line/package.json +++ b/packages/line/package.json @@ -36,7 +36,7 @@ "@nivo/tooltip": "0.69.0", "@nivo/voronoi": "0.69.0", "d3-shape": "^1.3.5", - "react-spring": "9.1.2" + "@react-spring/web": "9.1.2" }, "devDependencies": { "@nivo/core": "0.69.0" @@ -49,4 +49,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/packages/line/src/Areas.js b/packages/line/src/Areas.js index 24810330b3..938fa0534e 100644 --- a/packages/line/src/Areas.js +++ b/packages/line/src/Areas.js @@ -8,7 +8,7 @@ */ import React, { memo } from 'react' import PropTypes from 'prop-types' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { useAnimatedPath, useMotionConfig, blendModePropType } from '@nivo/core' const AreaPath = ({ areaBlendMode, areaOpacity, color, fill, path }) => { diff --git a/packages/line/src/LinesItem.js b/packages/line/src/LinesItem.js index 450e09c2c5..ba75316a39 100644 --- a/packages/line/src/LinesItem.js +++ b/packages/line/src/LinesItem.js @@ -8,7 +8,7 @@ */ import React, { memo, useMemo } from 'react' import PropTypes from 'prop-types' -import { animated } from 'react-spring' +import { animated } from '@react-spring/web' import { useAnimatedPath } from '@nivo/core' const LinesItem = ({ lineGenerator, points, color, thickness }) => { diff --git a/packages/marimekko/package.json b/packages/marimekko/package.json index 4929cde240..aa82e672da 100644 --- a/packages/marimekko/package.json +++ b/packages/marimekko/package.json @@ -27,7 +27,7 @@ "d3-scale": "^3.2.3", "d3-shape": "^1.3.5", "lodash": "^4.17.11", - "react-spring": "9.1.2" + "@react-spring/web": "9.1.2" }, "devDependencies": { "@nivo/core": "0.69.0", @@ -41,4 +41,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/packages/marimekko/src/Bar.tsx b/packages/marimekko/src/Bar.tsx index 5764901e62..b7842f4733 100644 --- a/packages/marimekko/src/Bar.tsx +++ b/packages/marimekko/src/Bar.tsx @@ -1,5 +1,5 @@ import React, { createElement, MouseEvent, useCallback } from 'react' -import { animated, SpringValues, to } from 'react-spring' +import { animated, SpringValues, to } from '@react-spring/web' import { useTooltip } from '@nivo/tooltip' import { BarDatum, CommonProps, MouseEventHandlers } from './types' diff --git a/packages/marimekko/src/Bars.tsx b/packages/marimekko/src/Bars.tsx index 17019c36d3..61db5436f3 100644 --- a/packages/marimekko/src/Bars.tsx +++ b/packages/marimekko/src/Bars.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { useTransition } from 'react-spring' +import { useTransition } from '@react-spring/web' import { useMotionConfig } from '@nivo/core' import { BarDatum, CommonProps, MouseEventHandlers } from './types' import { Bar } from './Bar' diff --git a/packages/parallel-coordinates/package.json b/packages/parallel-coordinates/package.json index f51f86dbe3..14212a7af3 100644 --- a/packages/parallel-coordinates/package.json +++ b/packages/parallel-coordinates/package.json @@ -33,7 +33,7 @@ "@nivo/tooltip": "0.69.0", "d3-scale": "^3.2.3", "d3-shape": "^1.3.5", - "react-spring": "9.1.2" + "@react-spring/web": "9.1.2" }, "devDependencies": { "@nivo/core": "0.69.0" @@ -46,4 +46,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/packages/parallel-coordinates/src/ParallelCoordinatesAxisDensityCircles.js b/packages/parallel-coordinates/src/ParallelCoordinatesAxisDensityCircles.js index d31145e267..776faf5564 100644 --- a/packages/parallel-coordinates/src/ParallelCoordinatesAxisDensityCircles.js +++ b/packages/parallel-coordinates/src/ParallelCoordinatesAxisDensityCircles.js @@ -8,7 +8,7 @@ */ import React, { memo } from 'react' import PropTypes from 'prop-types' -import { useTransition, animated } from 'react-spring' +import { useTransition, animated } from '@react-spring/web' import { useMotionConfig } from '@nivo/core' const ParallelCoordinatesAxisDensityCircles = ({ axis, variable, variablesScale }) => { diff --git a/packages/parallel-coordinates/src/ParallelCoordinatesAxisDensityPoly.js b/packages/parallel-coordinates/src/ParallelCoordinatesAxisDensityPoly.js index eba4db0a54..c52f44a902 100644 --- a/packages/parallel-coordinates/src/ParallelCoordinatesAxisDensityPoly.js +++ b/packages/parallel-coordinates/src/ParallelCoordinatesAxisDensityPoly.js @@ -9,7 +9,7 @@ import React, { memo } from 'react' import PropTypes from 'prop-types' import { line } from 'd3-shape' -import { animated } from 'react-spring' +import { animated } from '@react-spring/web' import { curveFromProp, useAnimatedPath } from '@nivo/core' const lineGenerator = line() diff --git a/packages/parallel-coordinates/src/ParallelCoordinatesLine.js b/packages/parallel-coordinates/src/ParallelCoordinatesLine.js index e0ba54fb3b..083f0ea37a 100644 --- a/packages/parallel-coordinates/src/ParallelCoordinatesLine.js +++ b/packages/parallel-coordinates/src/ParallelCoordinatesLine.js @@ -8,7 +8,7 @@ */ import React, { memo, useCallback } from 'react' import PropTypes from 'prop-types' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { useAnimatedPath, useMotionConfig } from '@nivo/core' import { useTooltip } from '@nivo/tooltip' import ParallelCoordinatesLineTooltip from './ParallelCoordinatesLineTooltip' diff --git a/packages/pie/stories/pie.stories.tsx b/packages/pie/stories/pie.stories.tsx index cf05cba4e3..e8e2d478dc 100644 --- a/packages/pie/stories/pie.stories.tsx +++ b/packages/pie/stories/pie.stories.tsx @@ -1,7 +1,7 @@ import React from 'react' import { storiesOf } from '@storybook/react' import { withKnobs, boolean } from '@storybook/addon-knobs' -import { animated } from 'react-spring' +import { animated } from '@react-spring/web' import { generateProgrammingLanguageStats } from '@nivo/generators' import { Pie } from '../src' diff --git a/packages/pie/tests/Pie.test.tsx b/packages/pie/tests/Pie.test.tsx index 692b5902f5..e8eb8a6e95 100644 --- a/packages/pie/tests/Pie.test.tsx +++ b/packages/pie/tests/Pie.test.tsx @@ -1,6 +1,6 @@ import React from 'react' import { mount } from 'enzyme' -import { animated } from 'react-spring' +import { animated } from '@react-spring/web' import { radiansToDegrees } from '@nivo/core' import { Pie } from '../src/index' diff --git a/packages/radar/package.json b/packages/radar/package.json index 861e4252ca..a8884f7006 100644 --- a/packages/radar/package.json +++ b/packages/radar/package.json @@ -33,7 +33,7 @@ "@nivo/tooltip": "0.69.0", "d3-scale": "^3.2.3", "d3-shape": "^1.3.5", - "react-spring": "9.1.2" + "@react-spring/web": "9.1.2" }, "devDependencies": { "@nivo/core": "0.69.0" @@ -46,4 +46,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/packages/radar/src/RadarGridLabels.js b/packages/radar/src/RadarGridLabels.js index aa0cb37e69..d8482d4862 100644 --- a/packages/radar/src/RadarGridLabels.js +++ b/packages/radar/src/RadarGridLabels.js @@ -8,7 +8,7 @@ */ import React, { memo } from 'react' import PropTypes from 'prop-types' -import { useSprings, animated } from 'react-spring' +import { useSprings, animated } from '@react-spring/web' import { useTheme, useMotionConfig, positionFromAngle, radiansToDegrees } from '@nivo/core' const textAnchorFromAngle = _angle => { diff --git a/packages/radar/src/RadarGridLevels.js b/packages/radar/src/RadarGridLevels.js index 1ed349278a..838f311ad8 100644 --- a/packages/radar/src/RadarGridLevels.js +++ b/packages/radar/src/RadarGridLevels.js @@ -9,7 +9,7 @@ import React, { memo, useMemo } from 'react' import PropTypes from 'prop-types' import { lineRadial, curveLinearClosed } from 'd3-shape' -import { animated, useSpring, to } from 'react-spring' +import { animated, useSpring, to } from '@react-spring/web' import { useTheme, useAnimatedPath, useMotionConfig } from '@nivo/core' const RadarGridLevelCircular = memo(({ radius }) => { diff --git a/packages/radar/src/RadarShapes.js b/packages/radar/src/RadarShapes.js index 9edf65604e..d23cf4cacf 100644 --- a/packages/radar/src/RadarShapes.js +++ b/packages/radar/src/RadarShapes.js @@ -8,7 +8,7 @@ */ import React, { memo, useMemo } from 'react' import PropTypes from 'prop-types' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { lineRadial } from 'd3-shape' import { useMotionConfig, useTheme, useAnimatedPath, blendModePropType } from '@nivo/core' import { useInheritedColor, inheritedColorPropType } from '@nivo/colors' diff --git a/packages/sankey/package.json b/packages/sankey/package.json index 685a67f0df..9f5b671fe5 100644 --- a/packages/sankey/package.json +++ b/packages/sankey/package.json @@ -34,7 +34,7 @@ "d3-sankey": "^0.12.1", "d3-shape": "^1.3.5", "lodash": "^4.17.11", - "react-spring": "9.1.2" + "@react-spring/web": "9.1.2" }, "devDependencies": { "@nivo/core": "0.69.0" @@ -47,4 +47,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/packages/sankey/src/SankeyLabels.js b/packages/sankey/src/SankeyLabels.js index 446bb85b1b..b828fdbde3 100644 --- a/packages/sankey/src/SankeyLabels.js +++ b/packages/sankey/src/SankeyLabels.js @@ -8,7 +8,7 @@ */ import React, { memo } from 'react' import PropTypes from 'prop-types' -import { useSprings, animated } from 'react-spring' +import { useSprings, animated } from '@react-spring/web' import { useTheme, useMotionConfig } from '@nivo/core' const SankeyLabels = ({ diff --git a/packages/sankey/src/SankeyLinksItem.js b/packages/sankey/src/SankeyLinksItem.js index c6fc3ad0fe..492215eb6f 100644 --- a/packages/sankey/src/SankeyLinksItem.js +++ b/packages/sankey/src/SankeyLinksItem.js @@ -8,7 +8,7 @@ */ import React, { memo, useCallback, useMemo } from 'react' import PropTypes from 'prop-types' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { blendModePropType, useAnimatedPath, useMotionConfig } from '@nivo/core' import { BasicTooltip, Chip, useTooltip } from '@nivo/tooltip' import SankeyLinkGradient from './SankeyLinkGradient' diff --git a/packages/sankey/src/SankeyNodesItem.js b/packages/sankey/src/SankeyNodesItem.js index b0ad6d3c32..5977177be9 100644 --- a/packages/sankey/src/SankeyNodesItem.js +++ b/packages/sankey/src/SankeyNodesItem.js @@ -8,7 +8,7 @@ */ import React, { memo, useCallback, useMemo } from 'react' import PropTypes from 'prop-types' -import { useSpring, animated, to } from 'react-spring' +import { useSpring, animated, to } from '@react-spring/web' import { useMotionConfig } from '@nivo/core' import { BasicTooltip, useTooltip } from '@nivo/tooltip' diff --git a/packages/stream/package.json b/packages/stream/package.json index aea6801ad8..ce894dc67f 100644 --- a/packages/stream/package.json +++ b/packages/stream/package.json @@ -35,7 +35,7 @@ "@nivo/tooltip": "0.69.0", "d3-scale": "^3.2.3", "d3-shape": "^1.3.5", - "react-spring": "9.1.2" + "@react-spring/web": "9.1.2" }, "devDependencies": { "@nivo/core": "0.69.0" @@ -48,4 +48,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/packages/stream/src/StreamDotsItem.js b/packages/stream/src/StreamDotsItem.js index eda4bcd164..75535c6c06 100644 --- a/packages/stream/src/StreamDotsItem.js +++ b/packages/stream/src/StreamDotsItem.js @@ -8,7 +8,7 @@ */ import React, { memo } from 'react' import PropTypes from 'prop-types' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { useMotionConfig } from '@nivo/core' const StreamDotsItem = ({ x, y, size, color, borderWidth, borderColor }) => { diff --git a/packages/stream/src/StreamLayer.js b/packages/stream/src/StreamLayer.js index 11d0b7b5bc..ba1658759a 100644 --- a/packages/stream/src/StreamLayer.js +++ b/packages/stream/src/StreamLayer.js @@ -8,7 +8,7 @@ */ import React, { memo, useCallback } from 'react' import PropTypes from 'prop-types' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { useAnimatedPath, useMotionConfig } from '@nivo/core' import { BasicTooltip, useTooltip } from '@nivo/tooltip' diff --git a/packages/tooltip/package.json b/packages/tooltip/package.json index e133ab829b..3f4209d9f4 100644 --- a/packages/tooltip/package.json +++ b/packages/tooltip/package.json @@ -21,7 +21,7 @@ "!dist/tsconfig.tsbuildinfo" ], "dependencies": { - "react-spring": "9.1.2" + "@react-spring/web": "9.1.2" }, "devDependencies": { "@nivo/core": "0.69.0" @@ -32,4 +32,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/packages/tooltip/src/CrosshairLine.tsx b/packages/tooltip/src/CrosshairLine.tsx index 3ebad07e08..4b3a90bb8d 100644 --- a/packages/tooltip/src/CrosshairLine.tsx +++ b/packages/tooltip/src/CrosshairLine.tsx @@ -1,5 +1,5 @@ import React, { CSSProperties, memo, useMemo } from 'react' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { useTheme, useMotionConfig } from '@nivo/core' interface CrosshairLineProps { diff --git a/packages/tooltip/src/TooltipWrapper.tsx b/packages/tooltip/src/TooltipWrapper.tsx index c36facffb5..81552f0879 100644 --- a/packages/tooltip/src/TooltipWrapper.tsx +++ b/packages/tooltip/src/TooltipWrapper.tsx @@ -1,5 +1,5 @@ import React, { memo, useRef, PropsWithChildren, CSSProperties } from 'react' -import { useSpring, animated } from 'react-spring' +import { useSpring, animated } from '@react-spring/web' import { useTheme, useMotionConfig, diff --git a/packages/treemap/package.json b/packages/treemap/package.json index c56f080109..616531fd10 100644 --- a/packages/treemap/package.json +++ b/packages/treemap/package.json @@ -32,7 +32,7 @@ "@nivo/tooltip": "0.69.0", "d3-hierarchy": "^1.1.8", "lodash": "^4.17.11", - "react-spring": "9.1.2" + "@react-spring/web": "9.1.2" }, "devDependencies": { "@nivo/core": "0.69.0" @@ -45,4 +45,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/packages/treemap/src/TreeMapHtmlNode.js b/packages/treemap/src/TreeMapHtmlNode.js index fe73b47e64..fc884ea88e 100644 --- a/packages/treemap/src/TreeMapHtmlNode.js +++ b/packages/treemap/src/TreeMapHtmlNode.js @@ -8,7 +8,7 @@ */ import React, { memo } from 'react' import PropTypes from 'prop-types' -import { animated } from 'react-spring' +import { animated } from '@react-spring/web' import { useTheme } from '@nivo/core' const TreeMapHtmlNode = ({ diff --git a/packages/treemap/src/TreeMapNode.js b/packages/treemap/src/TreeMapNode.js index 2ecf4684ec..0933917ac1 100644 --- a/packages/treemap/src/TreeMapNode.js +++ b/packages/treemap/src/TreeMapNode.js @@ -8,7 +8,7 @@ */ import React, { memo } from 'react' import PropTypes from 'prop-types' -import { animated, to } from 'react-spring' +import { animated, to } from '@react-spring/web' import { useTheme } from '@nivo/core' const TreeMapNode = ({ diff --git a/packages/treemap/src/TreeMapNodes.js b/packages/treemap/src/TreeMapNodes.js index 719c1420b3..4a0acb8293 100644 --- a/packages/treemap/src/TreeMapNodes.js +++ b/packages/treemap/src/TreeMapNodes.js @@ -8,7 +8,7 @@ */ import React, { memo } from 'react' import PropTypes from 'prop-types' -import { useTransition } from 'react-spring' +import { useTransition } from '@react-spring/web' import { useMotionConfig } from '@nivo/core' import { useInteractiveTreeMapNodes } from './hooks' diff --git a/website/src/components/controls/MotionConfigControl.js b/website/src/components/controls/MotionConfigControl.js index a2ffd7b19f..b0cbeb0307 100644 --- a/website/src/components/controls/MotionConfigControl.js +++ b/website/src/components/controls/MotionConfigControl.js @@ -7,7 +7,7 @@ * file that was distributed with this source code. */ import React, { memo, useCallback, useState } from 'react' -import { config as springConfig } from 'react-spring' +import { config as springConfig } from '@react-spring/web' import { isString } from 'lodash' import styled from 'styled-components' import Control from './Control' diff --git a/yarn.lock b/yarn.lock index ce29c932f2..a293e771c7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5068,26 +5068,6 @@ "@react-spring/shared" "~9.1.2" "@react-spring/types" "~9.1.2" -"@react-spring/konva@~9.1.2": - version "9.1.2" - resolved "https://registry.yarnpkg.com/@react-spring/konva/-/konva-9.1.2.tgz#20567063efd8d441a268826e326bd5d7574bbc50" - integrity sha512-P60mhUHRYgPPhoTBQWzuzD3hfeCFWC0BQ7N0iHzpMTzDIrAvutyg+iAX59jSXo3yatrcx60NmlCsiG8tRxbw6w== - dependencies: - "@react-spring/animated" "~9.1.2" - "@react-spring/core" "~9.1.2" - "@react-spring/shared" "~9.1.2" - "@react-spring/types" "~9.1.2" - -"@react-spring/native@~9.1.2": - version "9.1.2" - resolved "https://registry.yarnpkg.com/@react-spring/native/-/native-9.1.2.tgz#d21a64c20ca08d2c5839cedcf9cc4842770f8ffc" - integrity sha512-d7+tCoKAnDPSoVtpyFFm4BWQhn1h833ocdP0d2POZzKTcR1iQ8YI7EQ22iKGLvwH+0vjymde039CgYy31INqWQ== - dependencies: - "@react-spring/animated" "~9.1.2" - "@react-spring/core" "~9.1.2" - "@react-spring/shared" "~9.1.2" - "@react-spring/types" "~9.1.2" - "@react-spring/shared@~9.1.2": version "9.1.2" resolved "https://registry.yarnpkg.com/@react-spring/shared/-/shared-9.1.2.tgz#c36d077d7eb31fd2cbcf8956d9d35037b2998613" @@ -5096,22 +5076,12 @@ "@react-spring/types" "~9.1.2" rafz "^0.1.14" -"@react-spring/three@~9.1.2": - version "9.1.2" - resolved "https://registry.yarnpkg.com/@react-spring/three/-/three-9.1.2.tgz#49d1d4c0b9d059bd470712c78c9dd73af130677d" - integrity sha512-d/v94ykmfJGLTJxJ+jxlTAJSfFdD+SSf+yvXReS81hc7+9VYeEwIHVIEKOzckYnPy/MEOSVhIVKF/9wdFIIo6g== - dependencies: - "@react-spring/animated" "~9.1.2" - "@react-spring/core" "~9.1.2" - "@react-spring/shared" "~9.1.2" - "@react-spring/types" "~9.1.2" - "@react-spring/types@~9.1.2": version "9.1.2" resolved "https://registry.yarnpkg.com/@react-spring/types/-/types-9.1.2.tgz#3273a182f825b38f44ead2a2f3984344abad1e2b" integrity sha512-NZNImL0ymRFbss1cGKX2qSEeFdFoOgnIJZEW4Uczt+wm04J7g0Zuf23Hf8hM35JtxDr8QO5okp8BBtCM5FzzMg== -"@react-spring/web@~9.1.2": +"@react-spring/web@9.1.2": version "9.1.2" resolved "https://registry.yarnpkg.com/@react-spring/web/-/web-9.1.2.tgz#6ec409e8559676834b67aa33f0a2d57643c3c555" integrity sha512-E5W9Hmi2bO6CPorCNV/2iv12ux9LxHJAbpXmrBPKWFRqZixysiHoNQKKPG0DmSvUU1uKkvCvMC4VoB6pj/2kxw== @@ -5121,16 +5091,6 @@ "@react-spring/shared" "~9.1.2" "@react-spring/types" "~9.1.2" -"@react-spring/zdog@~9.1.2": - version "9.1.2" - resolved "https://registry.yarnpkg.com/@react-spring/zdog/-/zdog-9.1.2.tgz#edf270e93d5db8a94f65d4e94e4438352fbb454f" - integrity sha512-t5RobDp12HGVh6XJ1BZ+dFdxRQ/goEapYvjH5eqQa1vC97bSqJGLiG+SM/E360DtDlh8GXAyGSesd2pXzBkpPg== - dependencies: - "@react-spring/animated" "~9.1.2" - "@react-spring/core" "~9.1.2" - "@react-spring/shared" "~9.1.2" - "@react-spring/types" "~9.1.2" - "@rollup/plugin-babel@^5.0.3": version "5.0.3" resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.0.3.tgz#8d416865b0da79faf14e07c8d233abe0eac0753d" @@ -21202,18 +21162,6 @@ react-sizeme@^2.6.7: shallowequal "^1.1.0" throttle-debounce "^2.1.0" -react-spring@9.1.2: - version "9.1.2" - resolved "https://registry.yarnpkg.com/react-spring/-/react-spring-9.1.2.tgz#a2392f5468bfd960976747d59361236536e1f303" - integrity sha512-xLmkierisElCQShCqAH3PpepjHhCyOK1wGSTdpvG7GGD+SbfG4Sac7wj6wrKTT5A5NUFM5OnVQUXZLe5HScIfA== - dependencies: - "@react-spring/core" "~9.1.2" - "@react-spring/konva" "~9.1.2" - "@react-spring/native" "~9.1.2" - "@react-spring/three" "~9.1.2" - "@react-spring/web" "~9.1.2" - "@react-spring/zdog" "~9.1.2" - react-syntax-highlighter@^11.0.2: version "11.0.2" resolved "https://registry.yarnpkg.com/react-syntax-highlighter/-/react-syntax-highlighter-11.0.2.tgz#4e3f376e752b20d2f54e4c55652fd663149e4029"