@react-three/fiber 9.1.3 → 9.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @react-three/fiber
2
2
 
3
+ ## 9.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - d491e46087508dff50c48768a99f87bd486b6910: Accept readonly arrays for vector props
8
+
3
9
  ## 9.1.3
4
10
 
5
11
  ### Patch Changes
@@ -1,6 +1,7 @@
1
1
  import type * as THREE from 'three';
2
2
  import type { Args, EventHandlers, InstanceProps, ConstructorRepresentation } from "./core/index.js";
3
3
  import type { Overwrite, Mutable } from "./core/utils.js";
4
+ type MutableOrReadonlyParameters<T extends (...args: any) => any> = Parameters<T> | Readonly<Parameters<T>>;
4
5
  export interface MathRepresentation {
5
6
  set(...args: number[]): any;
6
7
  }
@@ -8,7 +9,7 @@ export interface VectorRepresentation extends MathRepresentation {
8
9
  setScalar(value: number): any;
9
10
  }
10
11
  export type MathTypes = MathRepresentation | THREE.Euler | THREE.Color;
11
- export type MathType<T extends MathTypes> = T extends THREE.Color ? Args<typeof THREE.Color> | THREE.ColorRepresentation : T extends VectorRepresentation | THREE.Layers | THREE.Euler ? T | Parameters<T['set']> | number : T | Parameters<T['set']>;
12
+ export type MathType<T extends MathTypes> = T extends THREE.Color ? Args<typeof THREE.Color> | THREE.ColorRepresentation : T extends VectorRepresentation | THREE.Layers | THREE.Euler ? T | MutableOrReadonlyParameters<T['set']> | number : T | MutableOrReadonlyParameters<T['set']>;
12
13
  export type MathProps<P> = {
13
14
  [K in keyof P as P[K] extends MathTypes ? K : never]: P[K] extends MathTypes ? MathType<P[K]> : never;
14
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-three/fiber",
3
- "version": "9.1.3",
3
+ "version": "9.1.4",
4
4
  "description": "A React renderer for Threejs",
5
5
  "keywords": [
6
6
  "react",