Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): upgrade react-spring to v9.1.2 #1480

Merged
merged 4 commits into from
Apr 23, 2021
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
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ website: ##@2 website start website in dev mode

website-build: ##@2 website build website
@echo "${YELLOW}Building website${RESET}"
@node scripts/patch-react-spring.js
@cd website && yarn build

website-serve: ##@2 website build & serve website
Expand Down
2 changes: 1 addition & 1 deletion packages/annotations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"dependencies": {
"@nivo/colors": "0.67.0",
"lodash": "^4.17.11",
"react-spring": "9.0.0-rc.3"
"react-spring": "9.1.2"
},
"devDependencies": {
"@nivo/core": "0.67.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/arcs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"dependencies": {
"@nivo/colors": "0.67.0",
"d3-shape": "^1.3.5",
"react-spring": "9.0.0-rc.3"
"react-spring": "9.1.2"
},
"devDependencies": {
"@nivo/core": "0.67.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export const useArcLinkLabelsTransition = <Datum extends DatumWithArcAndColor>({
})

const transition = useTransition<Datum, AnimatedProps>(filteredData, {
key: datum => datum.id,
keys: datum => datum.id,
initial: transitionPhases.update,
from: transitionPhases.enter,
enter: transitionPhases.update,
Expand Down
2 changes: 1 addition & 1 deletion packages/arcs/src/centers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const useArcCentersTransition = <Datum extends DatumWithArc, ExtraProps =
outerRadius: number
} & ExtraProps
>(data, {
key: datum => datum.id,
keys: datum => datum.id,
initial: phases.update,
from: phases.enter,
enter: phases.update,
Expand Down
2 changes: 1 addition & 1 deletion packages/arcs/src/useArcsTransition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const useArcsTransition = <Datum extends DatumWithArc, ExtraProps = unkno
outerRadius: number
} & ExtraProps
>(data, {
key: datum => datum.id,
keys: datum => datum.id,
initial: phases.update,
from: phases.enter,
enter: phases.update,
Expand Down
2 changes: 1 addition & 1 deletion packages/axes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"d3-format": "^1.4.4",
"d3-time": "^1.0.11",
"d3-time-format": "^2.1.3",
"react-spring": "9.0.0-rc.3"
"react-spring": "9.1.2"
},
"devDependencies": {
"@nivo/core": "0.67.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/bullet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@nivo/legends": "0.67.0",
"@nivo/tooltip": "0.67.0",
"d3-scale": "^3.0.0",
"react-spring": "9.0.0-rc.3"
"react-spring": "9.1.2"
},
"devDependencies": {
"@nivo/core": "0.67.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/bullet/src/BulletMarkers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const BulletMarkers = ({
const transition = useTransition<MarkerWithPosition, PositionWithColor>(
markers.map(marker => ({ ...marker, position: getPosition(marker) })),
{
key: marker => `${marker.index}`,
keys: marker => `${marker.index}`,
enter: ({ color, position }: MarkerWithPosition) => ({
color,
transform: `rotate(${position.rotation}, ${position.x}, ${position.y})`,
Expand Down
2 changes: 1 addition & 1 deletion packages/bullet/src/BulletRects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const BulletRects = ({

const { animate, config: springConfig } = useMotionConfig()
const transition = useTransition<BulletRectComputedRect, BulletRectAnimatedProps>(rects, {
key: rect => `${rect.data.index}`,
keys: rect => `${rect.data.index}`,
enter: rect => ({
x: rect.x,
y: rect.y,
Expand Down
2 changes: 1 addition & 1 deletion packages/bump/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@nivo/legends": "0.67.0",
"@nivo/tooltip": "0.67.0",
"d3-shape": "^1.3.5",
"react-spring": "9.0.0-rc.3"
"react-spring": "9.1.2"
},
"devDependencies": {
"@nivo/core": "0.67.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"d3-shape": "^1.3.5",
"d3-time-format": "^2.1.3",
"lodash": "^4.17.11",
"react-spring": "9.0.0-rc.3",
"react-spring": "9.1.2",
"recompose": "^0.30.0",
"resize-observer-polyfill": "^1.5.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/funnel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"dependencies": {
"d3-scale": "^3.0.0",
"d3-shape": "^1.3.5",
"react-spring": "9.0.0-rc.3"
"react-spring": "9.1.2"
},
"devDependencies": {
"@nivo/core": "0.67.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/heatmap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@nivo/colors": "0.67.0",
"@nivo/tooltip": "0.67.0",
"d3-scale": "^3.0.0",
"react-spring": "9.0.0-rc.3"
"react-spring": "9.1.2"
},
"devDependencies": {
"@nivo/core": "0.67.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/line/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@nivo/tooltip": "0.67.0",
"@nivo/voronoi": "0.67.0",
"d3-shape": "^1.3.5",
"react-spring": "9.0.0-rc.3"
"react-spring": "9.1.2"
},
"devDependencies": {
"@nivo/core": "0.67.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/marimekko/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"d3-scale": "^3.0.0",
"d3-shape": "^1.3.5",
"lodash": "^4.17.11",
"react-spring": "9.0.0-rc.3"
"react-spring": "9.1.2"
},
"devDependencies": {
"@nivo/core": "0.67.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/marimekko/src/Bars.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const Bars = <RawDatum,>({
borderColor: string
}
>(bars, {
key: bar => bar.key,
keys: bar => bar.key,
initial: bar => ({
x: bar.x,
y: bar.y,
Expand Down
2 changes: 1 addition & 1 deletion packages/parallel-coordinates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@nivo/tooltip": "0.67.0",
"d3-scale": "^3.0.0",
"d3-shape": "^1.3.5",
"react-spring": "9.0.0-rc.3"
"react-spring": "9.1.2"
},
"devDependencies": {
"@nivo/core": "0.67.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/pie/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@nivo/tooltip": "0.67.0",
"d3-shape": "^1.3.5",
"lodash": "^4.17.11",
"react-spring": "9.0.0-rc.3"
"react-spring": "9.1.2"
},
"devDependencies": {
"@nivo/core": "0.67.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/radar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@nivo/tooltip": "0.67.0",
"d3-scale": "^3.0.0",
"d3-shape": "^1.3.5",
"react-spring": "9.0.0-rc.3"
"react-spring": "9.1.2"
},
"devDependencies": {
"@nivo/core": "0.67.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/sankey/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"d3-sankey": "^0.12.1",
"d3-shape": "^1.3.5",
"lodash": "^4.17.11",
"react-spring": "9.0.0-rc.3"
"react-spring": "9.1.2"
},
"devDependencies": {
"@nivo/core": "0.67.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/stream/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@nivo/tooltip": "0.67.0",
"d3-scale": "^3.0.0",
"d3-shape": "^1.3.5",
"react-spring": "9.0.0-rc.3"
"react-spring": "9.1.2"
},
"devDependencies": {
"@nivo/core": "0.67.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/sunburst/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"d3-hierarchy": "^1.1.8",
"d3-shape": "^1.3.5",
"lodash": "^4.17.11",
"react-spring": "9.0.0-rc.3"
"react-spring": "9.1.2"
},
"devDependencies": {
"@nivo/core": "0.67.0",
Expand Down
51 changes: 27 additions & 24 deletions packages/sunburst/src/SunburstLabels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,30 +51,33 @@ export const SunburstLabels = <RawDatum,>({
.filter(node => node.angleDeg > skipAngle)
}, [nodes, skipAngle])

const transition = useTransition(labelNodes, {
key: node => node.data.id,
initial: node => ({
opacity: 1,
transform: `translate(${node.position.x},${node.position.y})`,
}),
from: node => ({
opacity: 0,
transform: `translate(${node.position.x},${node.position.y})`,
}),
enter: node => ({
opacity: 1,
transform: `translate(${node.position.x},${node.position.y})`,
}),
update: node => ({
opacity: 1,
transform: `translate(${node.position.x},${node.position.y})`,
}),
leave: {
opacity: 0,
},
config: springConfig,
immediate: !animate,
})
const transition = useTransition<typeof labelNodes[0], { opacity: number; transform: string }>(
labelNodes,
{
keys: node => node.data.id,
initial: node => ({
opacity: 1,
transform: `translate(${node.position.x},${node.position.y})`,
}),
from: node => ({
opacity: 0,
transform: `translate(${node.position.x},${node.position.y})`,
}),
enter: node => ({
opacity: 1,
transform: `translate(${node.position.x},${node.position.y})`,
}),
update: node => ({
opacity: 1,
transform: `translate(${node.position.x},${node.position.y})`,
}),
leave: {
opacity: 0,
},
config: springConfig,
immediate: !animate,
}
)

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion packages/tooltip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"!dist/tsconfig.tsbuildinfo"
],
"dependencies": {
"react-spring": "9.0.0-rc.3"
"react-spring": "9.1.2"
},
"devDependencies": {
"@nivo/core": "0.67.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/treemap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@nivo/tooltip": "0.67.0",
"d3-hierarchy": "^1.1.8",
"lodash": "^4.17.11",
"react-spring": "9.0.0-rc.3"
"react-spring": "9.1.2"
},
"devDependencies": {
"@nivo/core": "0.67.0"
Expand Down
32 changes: 0 additions & 32 deletions scripts/patch-react-spring.js

This file was deleted.

Loading