@react-three/fiber 9.0.2 → 9.0.3
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
|
@@ -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>
|
|
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
40
|
export interface ThreeElements extends ThreeElementsImpl {
|
|
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 {
|