@react-three/fiber 9.4.2 → 9.5.0
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 +6 -0
- package/dist/declarations/react-reconciler/index.d.ts +1044 -0
- package/dist/declarations/src/core/reconciler.d.ts +1 -1
- package/dist/declarations/src/core/utils.d.ts +78 -7
- package/dist/events-238e0986.cjs.prod.js +8048 -0
- package/dist/events-358c3764.cjs.dev.js +16245 -0
- package/dist/events-5a94e5eb.esm.js +16187 -0
- package/dist/react-three-fiber.cjs.dev.js +1 -3
- package/dist/react-three-fiber.cjs.prod.js +1 -3
- package/dist/react-three-fiber.esm.js +2 -4
- package/native/dist/react-three-fiber-native.cjs.dev.js +1 -3
- package/native/dist/react-three-fiber-native.cjs.prod.js +1 -3
- package/native/dist/react-three-fiber-native.esm.js +2 -4
- package/package.json +8 -6
- package/react-reconciler/constants.d.ts +7 -0
- package/react-reconciler/constants.js +9 -0
- package/react-reconciler/index.d.ts +1044 -0
- package/react-reconciler/index.js +224 -0
- package/dist/events-1eccaf1c.esm.js +0 -2510
- package/dist/events-5c8d1731.cjs.prod.js +0 -2569
- package/dist/events-c80effae.cjs.dev.js +0 -2569
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import Reconciler from 'react-reconciler';
|
|
3
|
+
import Reconciler from '../../react-reconciler/index.js';
|
|
4
4
|
import { IsAllOptional } from "./utils.js";
|
|
5
5
|
import type { RootStore } from "./store.js";
|
|
6
6
|
import { type EventHandlers } from "./events.js";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { Instance } from "./reconciler.js";
|
|
4
|
-
import type { Fiber } from 'react-reconciler';
|
|
5
4
|
import type { Dpr, RootStore, Size } from "./store.js";
|
|
6
5
|
export type NonFunctionKeys<P> = {
|
|
7
6
|
[K in keyof P]-?: P[K] extends Function ? never : K;
|
|
@@ -89,7 +88,7 @@ export declare const ErrorBoundary: {
|
|
|
89
88
|
children: React.ReactNode;
|
|
90
89
|
}>, nextState: Readonly<{
|
|
91
90
|
error: boolean;
|
|
92
|
-
}
|
|
91
|
+
}>, nextContext: any): boolean;
|
|
93
92
|
componentWillUnmount?(): void;
|
|
94
93
|
getSnapshotBeforeUpdate?(prevProps: Readonly<{
|
|
95
94
|
set: React.Dispatch<Error | undefined>;
|
|
@@ -108,23 +107,95 @@ export declare const ErrorBoundary: {
|
|
|
108
107
|
componentWillReceiveProps?(nextProps: Readonly<{
|
|
109
108
|
set: React.Dispatch<Error | undefined>;
|
|
110
109
|
children: React.ReactNode;
|
|
111
|
-
}
|
|
110
|
+
}>, nextContext: any): void;
|
|
112
111
|
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{
|
|
113
112
|
set: React.Dispatch<Error | undefined>;
|
|
114
113
|
children: React.ReactNode;
|
|
115
|
-
}
|
|
114
|
+
}>, nextContext: any): void;
|
|
116
115
|
componentWillUpdate?(nextProps: Readonly<{
|
|
117
116
|
set: React.Dispatch<Error | undefined>;
|
|
118
117
|
children: React.ReactNode;
|
|
119
118
|
}>, nextState: Readonly<{
|
|
120
119
|
error: boolean;
|
|
121
|
-
}
|
|
120
|
+
}>, nextContext: any): void;
|
|
122
121
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<{
|
|
123
122
|
set: React.Dispatch<Error | undefined>;
|
|
124
123
|
children: React.ReactNode;
|
|
125
124
|
}>, nextState: Readonly<{
|
|
126
125
|
error: boolean;
|
|
127
|
-
}
|
|
126
|
+
}>, nextContext: any): void;
|
|
127
|
+
};
|
|
128
|
+
new (props: {
|
|
129
|
+
set: React.Dispatch<Error | undefined>;
|
|
130
|
+
children: React.ReactNode;
|
|
131
|
+
}, context: any): {
|
|
132
|
+
state: {
|
|
133
|
+
error: boolean;
|
|
134
|
+
};
|
|
135
|
+
componentDidCatch(err: Error): void;
|
|
136
|
+
render(): React.ReactNode;
|
|
137
|
+
context: unknown;
|
|
138
|
+
setState<K extends "error">(state: {
|
|
139
|
+
error: boolean;
|
|
140
|
+
} | ((prevState: Readonly<{
|
|
141
|
+
error: boolean;
|
|
142
|
+
}>, props: Readonly<{
|
|
143
|
+
set: React.Dispatch<Error | undefined>;
|
|
144
|
+
children: React.ReactNode;
|
|
145
|
+
}>) => {
|
|
146
|
+
error: boolean;
|
|
147
|
+
} | Pick<{
|
|
148
|
+
error: boolean;
|
|
149
|
+
}, K> | null) | Pick<{
|
|
150
|
+
error: boolean;
|
|
151
|
+
}, K> | null, callback?: (() => void) | undefined): void;
|
|
152
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
153
|
+
readonly props: Readonly<{
|
|
154
|
+
set: React.Dispatch<Error | undefined>;
|
|
155
|
+
children: React.ReactNode;
|
|
156
|
+
}>;
|
|
157
|
+
componentDidMount?(): void;
|
|
158
|
+
shouldComponentUpdate?(nextProps: Readonly<{
|
|
159
|
+
set: React.Dispatch<Error | undefined>;
|
|
160
|
+
children: React.ReactNode;
|
|
161
|
+
}>, nextState: Readonly<{
|
|
162
|
+
error: boolean;
|
|
163
|
+
}>, nextContext: any): boolean;
|
|
164
|
+
componentWillUnmount?(): void;
|
|
165
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<{
|
|
166
|
+
set: React.Dispatch<Error | undefined>;
|
|
167
|
+
children: React.ReactNode;
|
|
168
|
+
}>, prevState: Readonly<{
|
|
169
|
+
error: boolean;
|
|
170
|
+
}>): any;
|
|
171
|
+
componentDidUpdate?(prevProps: Readonly<{
|
|
172
|
+
set: React.Dispatch<Error | undefined>;
|
|
173
|
+
children: React.ReactNode;
|
|
174
|
+
}>, prevState: Readonly<{
|
|
175
|
+
error: boolean;
|
|
176
|
+
}>, snapshot?: any): void;
|
|
177
|
+
componentWillMount?(): void;
|
|
178
|
+
UNSAFE_componentWillMount?(): void;
|
|
179
|
+
componentWillReceiveProps?(nextProps: Readonly<{
|
|
180
|
+
set: React.Dispatch<Error | undefined>;
|
|
181
|
+
children: React.ReactNode;
|
|
182
|
+
}>, nextContext: any): void;
|
|
183
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{
|
|
184
|
+
set: React.Dispatch<Error | undefined>;
|
|
185
|
+
children: React.ReactNode;
|
|
186
|
+
}>, nextContext: any): void;
|
|
187
|
+
componentWillUpdate?(nextProps: Readonly<{
|
|
188
|
+
set: React.Dispatch<Error | undefined>;
|
|
189
|
+
children: React.ReactNode;
|
|
190
|
+
}>, nextState: Readonly<{
|
|
191
|
+
error: boolean;
|
|
192
|
+
}>, nextContext: any): void;
|
|
193
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<{
|
|
194
|
+
set: React.Dispatch<Error | undefined>;
|
|
195
|
+
children: React.ReactNode;
|
|
196
|
+
}>, nextState: Readonly<{
|
|
197
|
+
error: boolean;
|
|
198
|
+
}>, nextContext: any): void;
|
|
128
199
|
};
|
|
129
200
|
getDerivedStateFromError: () => {
|
|
130
201
|
error: boolean;
|
|
@@ -174,7 +245,7 @@ export interface Disposable {
|
|
|
174
245
|
}
|
|
175
246
|
export declare function dispose<T extends Disposable>(obj: T): void;
|
|
176
247
|
export declare const REACT_INTERNAL_PROPS: string[];
|
|
177
|
-
export declare function getInstanceProps<T = any>(
|
|
248
|
+
export declare function getInstanceProps<T = any>(pendingProps: Record<string, unknown>): Instance<T>['props'];
|
|
178
249
|
export declare function prepare<T = any>(target: T, root: RootStore, type: string, props: Instance<T>['props']): Instance<T>;
|
|
179
250
|
export declare function resolve(root: any, key: string): {
|
|
180
251
|
root: any;
|