mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
fc41c24aa6
The React API is just that we now accept this protocol as an alternative
to a native `AnimationTimeline` to be passed to
`startGestureTransition`. This is specifically the DOM version.
```js
interface CustomTimeline {
currentTime: number;
animate(animation: Animation): void | (() => void);
}
```
Instead, of passing this to the `Animation` that we start to control the
View Transition keyframes, we instead inverse the control and pass the
`Animation` to this one. It lets any custom implementation drive the
updates. It can do so by updating the time every frame or letting it run
a time based animation (such as momentum scroll).
In this case I added a basic polyfill for `ScrollTimeline` in the
example but we'll need a better one.
50 lines
1.6 KiB
JSON
50 lines
1.6 KiB
JSON
{
|
|
"name": "react-fixtures-view-transition",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"devDependencies": {
|
|
"concurrently": "3.1.0",
|
|
"http-proxy-middleware": "3.0.3",
|
|
"react-scripts": "5.0.1",
|
|
"@babel/plugin-proposal-private-property-in-object": "7.21.11"
|
|
},
|
|
"dependencies": {
|
|
"@babel/register": "^7.25.9",
|
|
"express": "^4.14.0",
|
|
"ignore-styles": "^5.0.1",
|
|
"react": "^19.0.0",
|
|
"react-dom": "^19.0.0",
|
|
"animation-timelines": "^0.0.4"
|
|
},
|
|
"eslintConfig": {
|
|
"extends": [
|
|
"react-app",
|
|
"react-app/jest"
|
|
]
|
|
},
|
|
"scripts": {
|
|
"predev": "cp -r ../../build/oss-experimental/* ./node_modules/ && rm -rf node_modules/.cache;",
|
|
"prestart": "cp -r ../../build/oss-experimental/* ./node_modules/ && rm -rf node_modules/.cache;",
|
|
"prebuild": "cp -r ../../build/oss-experimental/* ./node_modules/ && rm -rf node_modules/.cache;",
|
|
"dev": "concurrently \"npm run dev:server\" \"npm run dev:client\"",
|
|
"dev:client": "BROWSER=none PORT=3001 react-scripts start",
|
|
"dev:server": "NODE_ENV=development node --experimental-loader ./loader/server.js server",
|
|
"start": "react-scripts build && NODE_ENV=production node --experimental-loader ./loader/server.js server",
|
|
"build": "react-scripts build",
|
|
"test": "react-scripts test --env=jsdom",
|
|
"eject": "react-scripts eject"
|
|
},
|
|
"browserslist": {
|
|
"production": [
|
|
">0.2%",
|
|
"not dead",
|
|
"not op_mini all"
|
|
],
|
|
"development": [
|
|
"last 1 chrome version",
|
|
"last 1 firefox version",
|
|
"last 1 safari version"
|
|
]
|
|
}
|
|
}
|