Skip to content

Commit cca7380

Browse files
committed
Merge branch 'beta'
2 parents 7d1b24f + 191a1a1 commit cca7380

File tree

18 files changed

+99
-54
lines changed

18 files changed

+99
-54
lines changed

.changeset/forty-islands-cross.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@react-spring/core': patch
3+
'@react-spring/animated': patch
4+
'@react-spring/parallax': patch
5+
'@react-spring/rafz': patch
6+
'react-spring': patch
7+
'@react-spring/shared': patch
8+
'@react-spring/types': patch
9+
'@react-spring/konva': patch
10+
'@react-spring/native': patch
11+
'@react-spring/three': patch
12+
'@react-spring/web': patch
13+
'@react-spring/zdog': patch
14+
---
15+
16+
fix: promise all array of results from ref.start

.changeset/pre.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"mode": "pre",
3+
"tag": "beta",
4+
"initialVersions": {
5+
"@react-spring/demo": "1.0.0",
6+
"@react-spring/docs": "1.0.1",
7+
"@react-spring/animated": "9.2.5",
8+
"@react-spring/core": "9.2.5",
9+
"@react-spring/parallax": "9.2.5",
10+
"@react-spring/rafz": "9.2.5",
11+
"react-spring": "9.2.5",
12+
"@react-spring/shared": "9.2.5",
13+
"@react-spring/types": "9.2.5",
14+
"@react-spring/konva": "9.2.5",
15+
"@react-spring/native": "9.2.5",
16+
"@react-spring/three": "9.2.5",
17+
"@react-spring/web": "9.2.5",
18+
"@react-spring/zdog": "9.2.5"
19+
},
20+
"changesets": ["forty-islands-cross"]
21+
}

demo/src/sandboxes/svg-filter/src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ const AnimFeDisplacementMap = animated('feDisplacementMap')
88

99
export default function App() {
1010
const [open, toggle] = useState(false)
11-
const { freq, factor, scale, opacity } = useSpring({
11+
const [{ freq, factor, scale, opacity }] = useSpring(() => ({
1212
reverse: open,
1313
from: { factor: 10, opacity: 0, scale: 0.9, freq: '0.0175, 0.0' },
1414
to: { factor: 150, opacity: 1, scale: 1, freq: '0.0, 0.0' },
1515
config: { duration: 3000 },
16-
})
16+
}))
1717

1818
return (
1919
<div className={styles.container} onClick={() => toggle(!open)}>

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-spring/docs",
3-
"version": "1.0.1",
3+
"version": "1.0.2-beta.0",
44
"private": true,
55
"author": "Poimandres",
66
"license": "MIT",

packages/animated/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-spring/animated",
3-
"version": "9.2.5",
3+
"version": "9.2.6-beta.0",
44
"description": "Animated component props for React",
55
"main": "dist/react-spring-animated.cjs.js",
66
"module": "dist/react-spring-animated.esm.js",
@@ -28,8 +28,8 @@
2828
"Josh Ellis (https://github.com/joshuaellis)"
2929
],
3030
"dependencies": {
31-
"@react-spring/shared": "~9.2.5-beta.0",
32-
"@react-spring/types": "~9.2.5-beta.0"
31+
"@react-spring/shared": "~9.2.6-beta.0",
32+
"@react-spring/types": "~9.2.6-beta.0"
3333
},
3434
"peerDependencies": {
3535
"react": "^16.8.0 || ^17.0.0"

packages/core/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-spring/core",
3-
"version": "9.2.5",
3+
"version": "9.2.6-beta.0",
44
"main": "dist/react-spring-core.cjs.js",
55
"module": "dist/react-spring-core.esm.js",
66
"files": [
@@ -30,14 +30,14 @@
3030
"postinstall": "node -e \"console.log('\\u001b[35m\\u001b[1mEnjoy react-spring? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/react-spring/donate\\u001b[0m')\""
3131
},
3232
"dependencies": {
33-
"@react-spring/animated": "~9.2.5-beta.0",
34-
"@react-spring/shared": "~9.2.5-beta.0",
35-
"@react-spring/types": "~9.2.5-beta.0"
33+
"@react-spring/animated": "~9.2.6-beta.0",
34+
"@react-spring/shared": "~9.2.6-beta.0",
35+
"@react-spring/types": "~9.2.6-beta.0"
3636
},
3737
"peerDependencies": {
3838
"react": "^16.8.0 || ^17.0.0"
3939
},
4040
"devDependencies": {
41-
"@react-spring/rafz": "~9.2.5-beta.0"
41+
"@react-spring/rafz": "~9.2.6-beta.0"
4242
}
4343
}

packages/core/src/hooks/useChain.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function useChain(
4646
each(controllers, (ctrl, i) =>
4747
each(queues[i] || [], update => ctrl.queue.push(update))
4848
)
49-
return ref.start()
49+
return Promise.all(ref.start())
5050
})
5151
}
5252
})

packages/core/src/types/props.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,13 +352,21 @@ export type PickAnimated<Props extends object, Fwd = true> = unknown &
352352
: [object] extends [Props]
353353
? Lookup
354354
: ObjectFromUnion<
355-
Props extends { from: infer From extends object ? object : () => any } // extract prop from the `from` prop if it exists
356-
? ObjectType<From>
355+
Props extends { from: infer From } // extract prop from the `from` prop if it exists
356+
? From extends () => any
357+
? ReturnType<From>
358+
: ObjectType<From>
357359
: TransitionKey & keyof Props extends never
358360
? ToValues<Props, Fwd>
359361
: TransitionValues<Props>
360362
>)
361363

364+
export type NonUndefined<A> = A extends undefined ? never : A
365+
366+
export type FunctionKeys<T extends object> = {
367+
[K in keyof T]-?: NonUndefined<T[K]> extends Function ? K : never
368+
}[keyof T]
369+
362370
/**
363371
* Pick the values of the `to` prop. Forward props are *not* included.
364372
*/

packages/parallax/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-spring/parallax",
3-
"version": "9.2.5",
3+
"version": "9.2.6-beta.0",
44
"main": "dist/react-spring-parallax.cjs.js",
55
"module": "dist/react-spring-parallax.esm.js",
66
"files": [
@@ -30,8 +30,8 @@
3030
"dev": "cd ./test && yarn dev"
3131
},
3232
"dependencies": {
33-
"@react-spring/shared": "~9.2.5-beta.0",
34-
"@react-spring/web": "~9.2.5-beta.0"
33+
"@react-spring/shared": "~9.2.6-beta.0",
34+
"@react-spring/web": "~9.2.6-beta.0"
3535
},
3636
"peerDependencies": {
3737
"react": "^16.8.0 || ^17.0.0"

packages/rafz/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-spring/rafz",
3-
"version": "9.2.5",
3+
"version": "9.2.6-beta.0",
44
"description": "react-spring's fork of rafz one frameloop to rule them all",
55
"main": "dist/react-spring-rafz.cjs.js",
66
"module": "dist/react-spring-rafz.esm.js",

0 commit comments

Comments
 (0)