@react-three/fiber 8.9.0 → 8.9.1

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
+ ## 8.9.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 0cf11797: fix(events): type spread event props
8
+
3
9
  ## 8.9.0
4
10
 
5
11
  ### Minor Changes
@@ -1,6 +1,7 @@
1
1
  import * as THREE from 'three';
2
2
  import type { UseBoundStore } from 'zustand';
3
3
  import type { RootState } from './store';
4
+ import type { Properties } from '../three-types';
4
5
  export interface Intersection extends THREE.Intersection {
5
6
  eventObject: THREE.Object3D;
6
7
  }
@@ -17,7 +18,7 @@ export interface IntersectionEvent<TSourceEvent> extends Intersection {
17
18
  stopped: boolean;
18
19
  }
19
20
  export declare type Camera = THREE.OrthographicCamera | THREE.PerspectiveCamera;
20
- export declare type ThreeEvent<TEvent> = IntersectionEvent<TEvent>;
21
+ export declare type ThreeEvent<TEvent> = IntersectionEvent<TEvent> & Properties<TEvent>;
21
22
  export declare type DomEvent = PointerEvent | MouseEvent | WheelEvent;
22
23
  export declare type Events = {
23
24
  onClick: EventListener;
@@ -8,12 +8,10 @@ import { extend, Root } from './renderer';
8
8
  import { addEffect, addAfterEffect, addTail, flushGlobalEffects } from './loop';
9
9
  import { EventManager, ComputeFunction } from './events';
10
10
  import { dispose, getRootState, Camera } from './utils';
11
+ import type { Properties } from '../three-types';
11
12
  declare const roots: Map<Element, Root>;
12
13
  declare const invalidate: (state?: RootState | undefined, frames?: number) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState | undefined, frame?: THREE.XRFrame | undefined) => void;
13
14
  declare const reconciler: import("react-reconciler").Reconciler<UseBoundStore<RootState, import("zustand").StoreApi<RootState>>, import("./renderer").Instance, void, import("./renderer").Instance, import("./renderer").Instance>, applyProps: typeof import("./utils").applyProps;
14
- declare type Properties<T> = Pick<T, {
15
- [K in keyof T]: T[K] extends (_: any) => any ? never : K;
16
- }[keyof T]>;
17
15
  declare type GLProps = Renderer | ((canvas: HTMLCanvasElement) => Renderer) | Partial<Properties<THREE.WebGLRenderer> | THREE.WebGLRendererParameters> | undefined;
18
16
  export declare type RenderProps<TCanvas extends Element> = {
19
17
  gl?: GLProps;
@@ -2,6 +2,9 @@
2
2
  import * as THREE from 'three';
3
3
  import { EventHandlers } from './core/events';
4
4
  import { AttachType } from './core/renderer';
5
+ export declare type Properties<T> = Pick<T, {
6
+ [K in keyof T]: T[K] extends (_: any) => any ? never : K;
7
+ }[keyof T]>;
5
8
  export declare type NonFunctionKeys<T> = {
6
9
  [K in keyof T]-?: T[K] extends Function ? never : K;
7
10
  }[keyof T];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-three/fiber",
3
- "version": "8.9.0",
3
+ "version": "8.9.1",
4
4
  "description": "A React renderer for Threejs",
5
5
  "keywords": [
6
6
  "react",