Skip to content

Commit

Permalink
fix(r18): ts in and out modify
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaellis committed May 2, 2022
1 parent 4d29a65 commit 4c9aa82
Show file tree
Hide file tree
Showing 171 changed files with 880 additions and 735 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/ob1-npm-0.66.2-e102a55adf-18f4ddecd7.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/sane-npm-4.1.0-8ab7d6a963-97716502d4.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/uuid-npm-3.4.0-4fd8ef88ad-58de2feed6.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"lodash.clamp": "^4.0.3",
"lodash.shuffle": "^4.2.0",
"lorem-ipsum": "^2.0.4",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-feather": "^2.0.9",
"react-use-gesture": "^9.1.3",
"react-use-measure": "^2.1.1",
Expand Down
2 changes: 1 addition & 1 deletion demo/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ReactDOM from 'react-dom/client'
import './index.css'
import App from './App'

ReactDOM.createRoot(document.getElementById('root')).render(
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<App />
</React.StrictMode>
Expand Down
4 changes: 2 additions & 2 deletions demo/src/sandboxes/animating-auto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/card/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/cards-stack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/chain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/css-keyframes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/css-variables/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
],
"bic": false,
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/draggable-list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
],
"devDependencies": {
"@types/lodash-es": "^4.17.4",
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/exit-before-enter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/flip-card/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/goo-blobs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/image-fade/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/list-reordering/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
],
"devDependencies": {
"@types/lodash.shuffle": "4.2.6",
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/masonry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
],
"devDependencies": {
"@types/lodash.shuffle": "4.2.6",
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/multistage-transition/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/notification-hub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/parallax-sticky/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/parallax-vert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/parallax/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/rocket-decay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"vec-la": "1.5.0"
},
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions demo/src/sandboxes/simple-transition/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/slide/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/svg-filter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/trail/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions demo/src/sandboxes/tree/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"@types/styled-components": "^5.1.9",
"typescript": "^4.2.3"
}
Expand Down
4 changes: 2 additions & 2 deletions demo/src/sandboxes/viewpager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
],
"devDependencies": {
"@types/lodash-es": "^4.17.4",
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"next-seo": "^5.1.0",
"next-transpile-modules": "^9.0.0",
"prism-react-renderer": "^1.3.1",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-feather": "^2.0.9",
"react-lazyload": "^3.2.0",
"react-live": "^2.4.1",
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@
"@types/lodash.clamp": "^4.0.6",
"@types/lodash.shuffle": "^4.2.6",
"@types/mdx-js__react": "^1.5.5",
"@types/react": "^17.0.39",
"@types/react-dom": "^17.0.11",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"@types/react-lazyload": "^3.1.1",
"@types/react-native": "^0.66.15",
"@types/react-native": "^0.67.6",
"@types/styled-components": "^5.1.22",
"@types/three": "^0.137.0",
"@vitejs/plugin-react-refresh": "^1.3.6",
Expand All @@ -99,10 +99,10 @@
"postinstall-postinstall": "^2.1.0",
"prettier": "^2.5.1",
"pretty-quick": "^3.1.3",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-konva": "^17.0.2-5",
"react-native": "^0.66.4",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-konva": "^18.0.0-0",
"react-native": "^0.68.1",
"react-zdog": "^1.0.11",
"spec.ts": "^1.1.3",
"start-server-and-test": "^1.14.0",
Expand Down
11 changes: 7 additions & 4 deletions packages/core/src/Interpolation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,26 @@ import {
* `Interpolation` as the `to` prop of a `useSpring` call will trigger an
* animation toward the memoized value.
*/
export class Interpolation<In = any, Out = any> extends FrameValue<Out> {
export class Interpolation<
Input = any,
Output = any
> extends FrameValue<Output> {
/** Useful for debugging. */
key?: string

/** Equals false when in the frameloop */
idle = true

/** The function that maps inputs values to output */
readonly calc: InterpolatorFn<In, Out>
readonly calc: InterpolatorFn<Input, Output>

/** The inputs which are currently animating */
protected _active = new Set<FluidValue>()

constructor(
/** The source of input values */
readonly source: unknown,
args: InterpolatorArgs<In, Out>
args: InterpolatorArgs<Input, Output>
) {
super()
this.calc = createInterpolator(...args)
Expand All @@ -74,7 +77,7 @@ export class Interpolation<In = any, Out = any> extends FrameValue<Out> {
}

protected _get() {
const inputs: Arrify<In> = is.arr(this.source)
const inputs: Arrify<Input> = is.arr(this.source)
? this.source.map(getFluidValue)
: (toArray(getFluidValue(this.source)) as any)

Expand Down
16 changes: 8 additions & 8 deletions packages/core/src/interpolate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ export type Interpolated<T extends ReadonlyArray<any>> = {
*/
export interface Interpolator {
// Tuple of parent values
<In extends ReadonlyArray<any>, Out>(
parents: In,
interpolator: (...args: Interpolated<In>) => Out
): Interpolation<Out>
<Input extends ReadonlyArray<any>, Output>(
parents: Input,
interpolator: (...args: Interpolated<Input>) => Output
): Interpolation<Output>

// Single parent value
<In, Out>(
parent: FluidValue<In> | In,
interpolator: InterpolatorFn<In, Out>
): Interpolation<Out>
<Input, Output>(
parent: FluidValue<Input> | Input,
interpolator: InterpolatorFn<Input, Output>
): Interpolation<Output>

// Interpolation config
<Out>(
Expand Down
Loading

0 comments on commit 4c9aa82

Please sign in to comment.