@react-three/fiber 9.0.2 → 9.0.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,17 @@
1
1
  # @react-three/fiber
2
2
 
3
+ ## 9.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 28ebfbf3e7f9e69dc62f5481965b7fd6a3e3a038: fix(types): exclude type conflicts in React runtime types
8
+
9
+ ## 9.0.3
10
+
11
+ ### Patch Changes
12
+
13
+ - 01f0f1c8855325aae1c337d5443c846cc46007b0: fix(types): remove recursive references in JSX types
14
+
3
15
  ## 9.0.2
4
16
 
5
17
  ### Patch Changes
@@ -32,19 +32,19 @@ export interface ReactProps<P> {
32
32
  }
33
33
  export type ElementProps<T extends ConstructorRepresentation, P = InstanceType<T>> = Partial<Overwrite<P, MathProps<P> & ReactProps<P> & EventProps<P>>>;
34
34
  export type ThreeElement<T extends ConstructorRepresentation> = Mutable<Overwrite<ElementProps<T>, Omit<InstanceProps<InstanceType<T>, T>, 'object'>>>;
35
- type ThreeExports = typeof THREE;
36
- type DuplicateKeys<T, U> = Extract<keyof T, keyof U>;
37
- type Conflicts = DuplicateKeys<JSX.IntrinsicElements, {
38
- [K in keyof ThreeExports as Uncapitalize<K>]: any;
39
- }>;
40
35
  export type ThreeToJSXElements<T extends Record<string, any>> = {
41
- [K in keyof T & string as Uncapitalize<K> extends Conflicts ? `three${Capitalize<K>}` : Uncapitalize<K>]: T[K] extends ConstructorRepresentation ? ThreeElement<T[K]> : never;
36
+ [K in keyof T & string as Uncapitalize<K>]: T[K] extends ConstructorRepresentation ? ThreeElement<T[K]> : never;
42
37
  };
38
+ type ThreeExports = typeof THREE;
43
39
  type ThreeElementsImpl = ThreeToJSXElements<ThreeExports>;
44
- export interface ThreeElements extends ThreeElementsImpl {
40
+ export interface ThreeElements extends Omit<ThreeElementsImpl, 'audio' | 'source' | 'line' | 'path'> {
45
41
  primitive: Omit<ThreeElement<any>, 'args'> & {
46
42
  object: object;
47
43
  };
44
+ threeAudio: ThreeElementsImpl['audio'];
45
+ threeSource: ThreeElementsImpl['source'];
46
+ threeLine: ThreeElementsImpl['line'];
47
+ threePath: ThreeElementsImpl['path'];
48
48
  }
49
49
  declare module 'react' {
50
50
  namespace JSX {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-three/fiber",
3
- "version": "9.0.2",
3
+ "version": "9.0.4",
4
4
  "description": "A React renderer for Threejs",
5
5
  "keywords": [
6
6
  "react",