@react-three/test-renderer 10.0.0-alpha.1 → 10.0.0-alpha.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/package.json CHANGED
@@ -1,29 +1,30 @@
1
1
  {
2
2
  "name": "@react-three/test-renderer",
3
- "version": "10.0.0-alpha.1",
3
+ "version": "10.0.0-alpha.3",
4
4
  "description": "Test Renderer for react-three-fiber",
5
5
  "author": "Josh Ellis",
6
6
  "license": "MIT",
7
- "main": "dist/react-three-test-renderer.cjs.js",
8
- "module": "dist/react-three-test-renderer.esm.js",
9
- "types": "dist/react-three-test-renderer.cjs.d.ts",
7
+ "main": "./dist/index.cjs",
8
+ "module": "./dist/index.mjs",
9
+ "types": "./dist/index.d.ts",
10
10
  "sideEffects": false,
11
11
  "exports": {
12
12
  ".": {
13
- "types": "./src/index.tsx",
14
- "import": "./dist/react-three-test-renderer.esm.js",
15
- "require": "./dist/react-three-test-renderer.cjs.js"
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.mjs",
15
+ "require": "./dist/index.cjs"
16
16
  },
17
17
  "./legacy": {
18
- "types": "./src/legacy.tsx",
19
- "import": "./dist/legacy.esm.js",
20
- "require": "./dist/legacy.cjs.js"
18
+ "types": "./dist/legacy.d.ts",
19
+ "import": "./dist/legacy.mjs",
20
+ "require": "./dist/legacy.cjs"
21
21
  },
22
22
  "./webgpu": {
23
- "types": "./src/webgpu/index.tsx",
24
- "import": "./dist/webgpu.esm.js",
25
- "require": "./dist/webgpu.cjs.js"
26
- }
23
+ "types": "./dist/webgpu/index.d.ts",
24
+ "import": "./dist/webgpu/index.mjs",
25
+ "require": "./dist/webgpu/index.cjs"
26
+ },
27
+ "./package.json": "./package.json"
27
28
  },
28
29
  "bugs": {
29
30
  "url": "https://github.com/pmndrs/react-three-fiber/issues"
@@ -33,17 +34,10 @@
33
34
  "type": "git",
34
35
  "url": "git+https://github.com/pmndrs/react-three-fiber.git"
35
36
  },
36
- "preconstruct": {
37
- "entrypoints": [
38
- "index.tsx",
39
- "legacy.tsx",
40
- "webgpu/index.tsx"
41
- ]
42
- },
43
37
  "peerDependencies": {
44
38
  "@react-three/fiber": ">=10.0.0-alpha.0",
45
- "react": "^19.0.0",
46
- "three": ">=0.181"
39
+ "react": ">=19.0 <19.3",
40
+ "three": ">=0.185.0"
47
41
  },
48
42
  "peerDependenciesMeta": {
49
43
  "three": {
@@ -51,7 +45,16 @@
51
45
  }
52
46
  },
53
47
  "devDependencies": {
54
- "@react-three/fiber": "workspace:*",
55
- "three": ">=0.181"
48
+ "@webgpu/types": "^0.1.64",
49
+ "three": ">=0.185.0",
50
+ "@react-three/fiber": "10.0.0-alpha.3"
51
+ },
52
+ "files": [
53
+ "dist",
54
+ "README.md"
55
+ ],
56
+ "scripts": {
57
+ "build": "unbuild",
58
+ "stub": "unbuild --stub"
56
59
  }
57
- }
60
+ }
package/CHANGELOG.md DELETED
@@ -1,521 +0,0 @@
1
- # @react-three/test-renderer
2
-
3
- ## 10.0.0-alpha.1
4
-
5
- ### Patch Changes
6
-
7
- - Aggregate changes merged since the last release.
8
-
9
- ## 10.0.0-alpha.0
10
-
11
- ### Major Changes
12
-
13
- - ## R3F v10 - WebGPU Support & React 19
14
-
15
- ### Breaking Changes
16
-
17
- - **React 19 required** - Minimum React version is now 19.0
18
- - **Three.js 0.181+ required** - Minimum Three.js version is now 0.181.2
19
- - **New entry points** - Bundle structure reorganized with dedicated WebGPU support
20
-
21
- ### New Features
22
-
23
- - **WebGPU Renderer Support** - New `@react-three/fiber/webgpu` entry point with full WebGPU and TSL (Three.js Shading Language) support
24
- - **Legacy Entry Point** - `@react-three/fiber/legacy` for WebGL-only environments
25
- - **Improved Frame Loop** - Enhanced `useFrame` with better priority scheduling and `runOnce` support
26
- - **Build System Migration** - Moved from Preconstruct to Unbuild for better per-entry-point optimization
27
-
28
- ### Entry Points
29
-
30
- ```js
31
- // Default - WebGL + WebGPU support
32
- import { Canvas } from '@react-three/fiber'
33
-
34
- // WebGPU only - smaller bundle, TSL support
35
- import { Canvas } from '@react-three/fiber/webgpu'
36
-
37
- // Legacy WebGL only - maximum compatibility
38
- import { Canvas } from '@react-three/fiber/legacy'
39
- ```
40
-
41
- See the full migration guide in the documentation.
42
-
43
- ### Patch Changes
44
-
45
- - Updated dependencies
46
- - @react-three/fiber@10.0.0-alpha.0
47
-
48
- ## 9.1.0
49
-
50
- ### Minor Changes
51
-
52
- - 31781e5a1fdc464cb67617cc3d7bc5d8690cd4cd: feat(RTTR): handle primitives in test-renderer and fix queries in TestInstances
53
-
54
- ## 9.0.1
55
-
56
- ### Patch Changes
57
-
58
- - 754861f16ac7ee93844d52057d2b8515b145fdb2: Republish as latest
59
-
60
- ## 9.0.0
61
-
62
- ### Major Changes
63
-
64
- - 226d2ec: feat: React 19 support
65
-
66
- ## 8.2.4
67
-
68
- ### Patch Changes
69
-
70
- - dec2cb28: fix(test-renderer): include types in output
71
-
72
- ## 8.2.3
73
-
74
- ### Patch Changes
75
-
76
- - 2007c19b: fix: republish with types
77
-
78
- ## 8.2.2
79
-
80
- ### Patch Changes
81
-
82
- - ff1a16f1: fix: narrow React peer dep range
83
-
84
- ## 8.2.1
85
-
86
- ### Patch Changes
87
-
88
- - 020bb194: fix(RTTR): set initial size for NaN in viewport
89
-
90
- ## 8.2.0
91
-
92
- ### Minor Changes
93
-
94
- - a5ffb08e: feat(RTTR): waitFor util
95
-
96
- ## 8.1.5
97
-
98
- ### Patch Changes
99
-
100
- - 673927f7: fix(RTTR): implement HTMLCanvasElement.getContext
101
-
102
- ## 8.1.4
103
-
104
- ### Patch Changes
105
-
106
- - 53ba22d3: fix(RTTR): fallback to canvas shim
107
-
108
- ## 8.1.3
109
-
110
- ### Patch Changes
111
-
112
- - 2b0be267: fix: support WebGL2
113
-
114
- ## 8.1.2
115
-
116
- ### Patch Changes
117
-
118
- - d9e6316d: fix: transpile class properties
119
-
120
- ## 8.1.1
121
-
122
- ### Patch Changes
123
-
124
- - 9a776b71: fix(RTTR): backport traverse, update fixes
125
-
126
- ## 8.1.0
127
-
128
- ### Minor Changes
129
-
130
- - 24c4dba4: shortcut for shadow type
131
-
132
- ## 8.0.17
133
-
134
- ### Patch Changes
135
-
136
- - 786ccb46: fix: restore RTTR version
137
-
138
- ## 8.0.16
139
-
140
- ### Patch Changes
141
-
142
- - 7b6df9df: fix: infinite loop updating cam viewport
143
- - Updated dependencies [7b6df9df]
144
- - @react-three/fiber@8.0.26
145
-
146
- ## 8.0.15
147
-
148
- ### Patch Changes
149
-
150
- - b7cd0f42: update viewport on camera changes
151
- - Updated dependencies [b7cd0f42]
152
- - @react-three/fiber@8.0.25
153
-
154
- ## 8.0.14
155
-
156
- ### Patch Changes
157
-
158
- - 29d03c64: revert multi attach
159
- - Updated dependencies [29d03c64]
160
- - @react-three/fiber@8.0.23
161
-
162
- ## 8.0.13
163
-
164
- ### Patch Changes
165
-
166
- - 4c87bce: fix: attach, devtools, and perf fixes
167
- - Updated dependencies [4c87bce]
168
- - @react-three/fiber@8.0.20
169
-
170
- ## 8.0.12
171
-
172
- ### Patch Changes
173
-
174
- - c4715d5f: allow invalidate to preempt more than 1 frame
175
- - Updated dependencies [c4715d5f]
176
- - @react-three/fiber@8.0.15
177
-
178
- ## 8.0.11
179
-
180
- ### Patch Changes
181
-
182
- - 5559a119: Add support for recoverable errors
183
- - Updated dependencies [5559a119]
184
- - @react-three/fiber@8.0.14
185
-
186
- ## 8.0.10
187
-
188
- ### Patch Changes
189
-
190
- - 9d77d8e2: fix: detach attribute removal
191
- - Updated dependencies [9d77d8e2]
192
- - @react-three/fiber@8.0.13
193
-
194
- ## 8.0.9
195
-
196
- ### Patch Changes
197
-
198
- - 3d10413f: fix portal layers
199
- - Updated dependencies [3d10413f]
200
- - @react-three/fiber@8.0.12
201
-
202
- ## 8.0.8
203
-
204
- ### Patch Changes
205
-
206
- - 5167b1e4: memoized.args can be undefined
207
- - Updated dependencies [5167b1e4]
208
- - @react-three/fiber@8.0.11
209
-
210
- ## 8.0.7
211
-
212
- ### Patch Changes
213
-
214
- - eb321afd: fix: remount bug, allow portals to inject custom size
215
- - Updated dependencies [eb321afd]
216
- - @react-three/fiber@8.0.10
217
-
218
- ## 8.0.6
219
-
220
- ### Patch Changes
221
-
222
- - 624df949: fix: canvas unmount race condition"
223
- - Updated dependencies [624df949]
224
- - @react-three/fiber@8.0.9
225
-
226
- ## 8.0.5
227
-
228
- ### Patch Changes
229
-
230
- - d4bafb9: fix re-parenting, useframe not working properly in portals, attach crash
231
- - Updated dependencies [d4bafb9]
232
- - @react-three/fiber@8.0.6
233
-
234
- ## 8.0.4
235
-
236
- ### Patch Changes
237
-
238
- - 227c328: fix pointer for root and portals
239
- - Updated dependencies [227c328]
240
- - @react-three/fiber@8.0.5
241
-
242
- ## 8.0.3
243
-
244
- ### Patch Changes
245
-
246
- - 3252aed: setevents needs to spread and be mirrored in portals
247
- - Updated dependencies [3252aed]
248
- - @react-three/fiber@8.0.3
249
-
250
- ## 8.0.2
251
-
252
- ### Patch Changes
253
-
254
- - 8035d1f: fix: legacy mode
255
- - Updated dependencies [8035d1f]
256
- - @react-three/fiber@8.0.2
257
-
258
- ## 8.0.1
259
-
260
- ### Patch Changes
261
-
262
- - 26db195: add legacy flag to turn of three.colormanagement
263
- - Updated dependencies [26db195]
264
- - @react-three/fiber@8.0.1
265
-
266
- ## 8.0.0
267
-
268
- ### Major Changes
269
-
270
- - 385ba9c: v8 major, react-18 compat
271
- - 04c07b8: v8 major, react-18 compat
272
-
273
- ### Patch Changes
274
-
275
- - 347ea79: new beta for library testing
276
- - Updated dependencies [385ba9c]
277
- - Updated dependencies [04c07b8]
278
- - Updated dependencies [347ea79]
279
- - @react-three/fiber@8.0.0
280
-
281
- ## 8.0.0-beta.0
282
-
283
- ### Major Changes
284
-
285
- - 385ba9c: v8 major, react-18 compat
286
-
287
- ### Patch Changes
288
-
289
- - Updated dependencies [385ba9c]
290
- - @react-three/fiber@8.0.0-beta.0
291
-
292
- ## 7.0.25-beta.0
293
-
294
- ### Patch Changes
295
-
296
- - cf6316c: new beta for library testing
297
- - Updated dependencies [cf6316c]
298
- - @react-three/fiber@8.0.0-beta.0
299
-
300
- ## 7.0.24
301
-
302
- ### Patch Changes
303
-
304
- - 8698734: Release latest patches
305
- - Updated dependencies [8698734]
306
- - @react-three/fiber@7.0.25
307
-
308
- ## 7.0.23
309
-
310
- ### Patch Changes
311
-
312
- - 7f46ddf: cleanup captured pointers when released (#1914)
313
- - Updated dependencies [7f46ddf]
314
- - @react-three/fiber@7.0.24
315
-
316
- ## 7.0.22
317
-
318
- ### Patch Changes
319
-
320
- - 30d38b1: remove logs
321
- - Updated dependencies [30d38b1]
322
- - @react-three/fiber@7.0.23
323
-
324
- ## 7.0.21
325
-
326
- ### Patch Changes
327
-
328
- - 259e1fa: add camera:manual
329
- - Updated dependencies [259e1fa]
330
- - @react-three/fiber@7.0.22
331
-
332
- ## 7.0.20
333
-
334
- ### Patch Changes
335
-
336
- - 65e4147: up usemeasure, add last event to internals"
337
- - Updated dependencies [65e4147]
338
- - @react-three/fiber@7.0.21
339
-
340
- ## 7.0.19
341
-
342
- ### Patch Changes
343
-
344
- - 54cb0fd: update react-use-measure, allow it to use the offsetSize
345
- - Updated dependencies [54cb0fd]
346
- - @react-three/fiber@7.0.20
347
-
348
- ## 7.0.18
349
-
350
- ### Patch Changes
351
-
352
- - 7aa2eab: fix: remove zustand subscribe selector
353
- - Updated dependencies [7aa2eab]
354
- - @react-three/fiber@7.0.19
355
-
356
- ## 7.0.17
357
-
358
- ### Patch Changes
359
-
360
- - 6780f58: fix unmount pointer capture
361
- - Updated dependencies [6780f58]
362
- - @react-three/fiber@7.0.18
363
-
364
- ## 7.0.16
365
-
366
- ### Patch Changes
367
-
368
- - 894c550: fix: event count
369
- - Updated dependencies [894c550]
370
- - @react-three/fiber@7.0.17
371
-
372
- ## 7.0.15
373
-
374
- ### Patch Changes
375
-
376
- - c7a4220: patch: applyprops returns the same instance
377
- - Updated dependencies [c7a4220]
378
- - @react-three/fiber@7.0.16
379
-
380
- ## 7.0.14
381
-
382
- ### Patch Changes
383
-
384
- - c5645e8: fix primitive leftovers on switch
385
- - Updated dependencies [c5645e8]
386
- - @react-three/fiber@7.0.15
387
-
388
- ## 7.0.13
389
-
390
- ### Patch Changes
391
-
392
- - 05af996: fix: revert the is function
393
- - Updated dependencies [05af996]
394
- - @react-three/fiber@7.0.14
395
-
396
- ## 7.0.12
397
-
398
- ### Patch Changes
399
-
400
- - 0df6073: fix: missed events
401
- - Updated dependencies [0df6073]
402
- - @react-three/fiber@7.0.12
403
-
404
- ## 7.0.11
405
-
406
- ### Patch Changes
407
-
408
- - 62b0a3a: fix: event order of missed pointers
409
- - Updated dependencies [62b0a3a]
410
- - @react-three/fiber@7.0.11
411
-
412
- ## 7.0.10
413
-
414
- ### Patch Changes
415
-
416
- - e019dd4: fixes
417
- - Updated dependencies [e019dd4]
418
- - @react-three/fiber@7.0.10
419
-
420
- ## 7.0.8
421
-
422
- ### Patch Changes
423
-
424
- - cd266e4: Fix diffProps dashed keys
425
- - Updated dependencies [cd266e4]
426
- - @react-three/fiber@7.0.9
427
-
428
- ## 7.0.7
429
-
430
- ### Patch Changes
431
-
432
- - 0375896: Simplify useframe, support instanced event cancelation, silence disposal
433
- - Updated dependencies [0375896]
434
- - @react-three/fiber@7.0.7
435
-
436
- ## 7.0.6
437
-
438
- ### Patch Changes
439
-
440
- - fb052ad: Fix babel-env browserslist transpiling into old code"
441
- - Updated dependencies [fb052ad]
442
- - @react-three/fiber@7.0.6
443
-
444
- ## 7.0.5
445
-
446
- ### Patch Changes
447
-
448
- - c97794a: Add useLoader.clear(Loader, input)
449
- - Updated dependencies [c97794a]
450
- - @react-three/fiber@7.0.5
451
-
452
- ## 7.0.4
453
-
454
- ### Patch Changes
455
-
456
- - 974ecfb: Allow elements to define attachFns for specific mount/unmount
457
- - Updated dependencies [974ecfb]
458
- - @react-three/fiber@7.0.4
459
-
460
- ## 7.0.1
461
-
462
- ### Patch Changes
463
-
464
- - a97aca3: Add controls state field
465
- - Updated dependencies [a97aca3]
466
- - 4c703d6: fix rttr didn't work with r130
467
- - Updated dependencies [4c703d6]
468
- - @react-three/fiber@7.0.2
469
-
470
- ## 7.0.0
471
-
472
- ### Major Changes
473
-
474
- - 96ae1ad: fix javascript interpreting renderpriority as positive
475
-
476
- ### Patch Changes
477
-
478
- - Updated dependencies [96ae1ad]
479
- - @react-three/fiber@7.0.0
480
-
481
- ## 6.2.3
482
-
483
- ### Patch Changes
484
-
485
- - 26bc7eb: typescript changes
486
- - Updated dependencies [26bc7eb]
487
- - @react-three/fiber@6.2.3
488
-
489
- ## 6.2.2
490
-
491
- ### Patch Changes
492
-
493
- - 4f44a2c: use more helpful name with event handling in rttr
494
- - Updated dependencies [4f44a2c]
495
- - @react-three/fiber@6.2.2
496
-
497
- ## 6.1.5
498
-
499
- ### Patch Changes
500
-
501
- - fix(rttr): if children is undefined return an array to map with
502
- - Updated dependencies [undefined]
503
- - @react-three/fiber@6.1.5
504
-
505
- ## 6.1.3
506
-
507
- ### Patch Changes
508
-
509
- - 6faa090: Add shape to types, exclude event functions from event data
510
- - Updated dependencies [6faa090]
511
- - @react-three/fiber@6.1.4
512
-
513
- ## 6.1.2
514
-
515
- ### Patch Changes
516
-
517
- - 71e72c0: Fix constructor args with attached children (#1348)
518
- - Updated dependencies [71e72c0]
519
- - @react-three/fiber@6.1.3
520
-
521
- ## 6.1.1
@@ -1,22 +0,0 @@
1
- import type * as THREE from 'three';
2
- import type { Instance } from '@react-three/fiber';
3
- import type { Obj } from "./types/internal.js";
4
- export declare class ReactThreeTestInstance<TObject extends THREE.Object3D = THREE.Object3D> {
5
- _fiber: Instance<TObject>;
6
- constructor(fiber: Instance<TObject>);
7
- get fiber(): Instance<TObject>;
8
- get instance(): TObject;
9
- get type(): string;
10
- get props(): Obj;
11
- get parent(): ReactThreeTestInstance | null;
12
- get children(): ReactThreeTestInstance[];
13
- get allChildren(): ReactThreeTestInstance[];
14
- private getChildren;
15
- findAll: (decider: (node: ReactThreeTestInstance) => boolean) => ReactThreeTestInstance[];
16
- find: (decider: (node: ReactThreeTestInstance) => boolean) => ReactThreeTestInstance;
17
- findByType: (type: string) => ReactThreeTestInstance;
18
- findAllByType: (type: string) => ReactThreeTestInstance[];
19
- findByProps: (props: Obj) => ReactThreeTestInstance;
20
- findAllByProps: (props: Obj) => ReactThreeTestInstance[];
21
- }
22
- export declare const wrapFiber: (fiber: Instance) => ReactThreeTestInstance;
@@ -1,5 +0,0 @@
1
- export interface WaitOptions {
2
- interval?: number;
3
- timeout?: number;
4
- }
5
- export declare function waitFor(callback: () => boolean | void, { interval, timeout }?: WaitOptions): Promise<void>;
@@ -1,14 +0,0 @@
1
- import * as React from 'react';
2
- import { act } from '@react-three/fiber';
3
- import type { CreateOptions, Renderer } from "./types/public.js";
4
- import { waitFor, WaitOptions } from "./helpers/waitFor.js";
5
- declare const create: (element: React.ReactNode, options?: Partial<CreateOptions>) => Promise<Renderer>;
6
- export { create, act, waitFor };
7
- export type { WaitOptions };
8
- export * as ReactThreeTest from "./types/index.js";
9
- declare const _default: {
10
- create: (element: React.ReactNode, options?: Partial<CreateOptions> | undefined) => Promise<Renderer>;
11
- act: import("@react-three/fiber").Act;
12
- waitFor: typeof waitFor;
13
- };
14
- export default _default;
@@ -1 +0,0 @@
1
- export * from "./public.js";
@@ -1,20 +0,0 @@
1
- export type CreateCanvasParameters = {
2
- beforeReturn?: (canvas: HTMLCanvasElement) => void;
3
- width?: number;
4
- height?: number;
5
- };
6
- export interface Obj {
7
- [key: string]: any;
8
- }
9
- /**
10
- * this is an empty object of any,
11
- * the data is passed to a new event
12
- * and subsequently passed to the
13
- * event handler you're calling
14
- */
15
- export type MockEventData = {
16
- [key: string]: any;
17
- };
18
- export interface TestInstanceChildOpts {
19
- exhaustive: boolean;
20
- }
@@ -1,38 +0,0 @@
1
- import type { Camera, RenderProps } from '@react-three/fiber';
2
- import { ReactThreeTestInstance } from "../createTestInstance.js";
3
- import type { MockEventData, CreateCanvasParameters } from "./internal.js";
4
- export { ReactThreeTestInstance };
5
- export type MockSyntheticEvent = {
6
- camera: Camera;
7
- stopPropagation: () => void;
8
- target: ReactThreeTestInstance;
9
- currentTarget: ReactThreeTestInstance;
10
- sourceEvent: MockEventData;
11
- [key: string]: any;
12
- };
13
- export type CreateOptions = CreateCanvasParameters & RenderProps<HTMLCanvasElement>;
14
- export type Renderer = {
15
- scene: ReactThreeTestInstance;
16
- unmount: () => Promise<void>;
17
- getInstance: () => null | unknown;
18
- update: (el: React.ReactNode) => Promise<void>;
19
- toTree: () => Tree | undefined;
20
- toGraph: () => SceneGraph | undefined;
21
- fireEvent: (element: ReactThreeTestInstance, handler: string, data?: MockEventData) => Promise<any>;
22
- advanceFrames: (frames: number, delta: number | number[]) => Promise<void>;
23
- };
24
- export interface SceneGraphItem {
25
- type: string;
26
- name: string;
27
- children: SceneGraphItem[] | null;
28
- }
29
- export type SceneGraph = SceneGraphItem[];
30
- export interface TreeNode {
31
- type: string;
32
- props: {
33
- [key: string]: any;
34
- };
35
- children: TreeNode[];
36
- }
37
- export type Tree = TreeNode[];
38
- export type { Act } from '@react-three/fiber';
@@ -1,3 +0,0 @@
1
- export * from "./declarations/src/index";
2
- export { default } from "./declarations/src/index";
3
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVhY3QtdGhyZWUtdGVzdC1yZW5kZXJlci5janMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4vZGVjbGFyYXRpb25zL3NyYy9pbmRleC5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIn0=