@react-three/fiber 9.1.4 → 9.3.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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @react-three/fiber
2
2
 
3
+ ## 9.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 7579c2d79ed60e5c93a259637b65c01971f39d82: feat: add flushSync example
8
+ - 26e5d6e8b8b00b817ebb5242432000abe38bfc2c: fix: update flushSync for new reconciler
9
+ - 0281b6bc4fcf041ed801e64f1876f70c214aa117: fix(native): update react-native deep imports for 0.79 compatibility
10
+
11
+ ## 9.2.0
12
+
13
+ ### Minor Changes
14
+
15
+ - 94ece53e17a586465b10ec627cf4799cefa72b3a: Export flushSync
16
+
3
17
  ## 9.1.4
4
18
 
5
19
  ### Patch Changes
@@ -6,7 +6,7 @@ export { flushGlobalEffects, addEffect, addAfterEffect, addTail, invalidate, adv
6
6
  export type { AttachFnType, AttachType, ConstructorRepresentation, Catalogue, Args, InstanceProps, Instance, } from "./reconciler.js";
7
7
  export { extend, reconciler } from "./reconciler.js";
8
8
  export type { ReconcilerRoot, GLProps, CameraProps, RenderProps, InjectState } from "./renderer.js";
9
- export { _roots, createRoot, unmountComponentAtNode, createPortal } from "./renderer.js";
9
+ export { _roots, createRoot, unmountComponentAtNode, createPortal, flushSync } from "./renderer.js";
10
10
  export type { Subscription, Dpr, Size, Viewport, RenderCallback, Frameloop, Performance, Renderer, XRManager, RootState, RootStore, } from "./store.js";
11
11
  export { context } from "./store.js";
12
12
  export type { ObjectMap, Camera, Disposable, Act } from "./utils.js";
@@ -46,5 +46,5 @@ export interface Instance<O = any> {
46
46
  }
47
47
  export declare function extend<T extends ConstructorRepresentation>(objects: T): React.ExoticComponent<ThreeElement<T>>;
48
48
  export declare function extend<T extends Catalogue>(objects: T): void;
49
- export declare const reconciler: Reconciler.Reconciler<RootStore, Instance<any>, void, Instance<any>, any>;
49
+ export declare const reconciler: Reconciler.Reconciler<RootStore, Instance<any>, void, Instance<any>, never, any>;
50
50
  export {};
@@ -1,9 +1,9 @@
1
- import * as THREE from 'three';
2
1
  import * as React from 'react';
2
+ import * as THREE from 'three';
3
3
  import type { ThreeElement } from "../three-types.js";
4
- import { Renderer, RootState, Size, Dpr, Performance, Frameloop, RootStore } from "./store.js";
4
+ import { ComputeFunction, EventManager } from "./events.js";
5
5
  import { Root } from "./reconciler.js";
6
- import { EventManager, ComputeFunction } from "./events.js";
6
+ import { Dpr, Frameloop, Performance, Renderer, RootState, RootStore, Size } from "./store.js";
7
7
  import { type Properties, Camera } from "./utils.js";
8
8
  interface OffscreenCanvas extends EventTarget {
9
9
  }
@@ -83,7 +83,7 @@ export declare function createPortal(children: React.ReactNode, container: THREE
83
83
  * Force React to flush any updates inside the provided callback synchronously and immediately.
84
84
  * All the same caveats documented for react-dom's `flushSync` apply here (see https://react.dev/reference/react-dom/flushSync).
85
85
  * Nevertheless, sometimes one needs to render synchronously, for example to keep DOM and 3D changes in lock-step without
86
- * having to revert to a non-React solution.
86
+ * having to revert to a non-React solution. Note: this will only flush updates within the `Canvas` root.
87
87
  */
88
88
  export declare function flushSync<R>(fn: () => R): R;
89
89
  export {};
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var THREE = require('three');
4
3
  var React = require('react');
5
4
  var constants = require('react-reconciler/constants');
5
+ var THREE = require('three');
6
6
  var traditional = require('zustand/traditional');
7
+ var suspendReact = require('suspend-react');
7
8
  var Reconciler = require('react-reconciler');
8
9
  var scheduler = require('scheduler');
9
- var suspendReact = require('suspend-react');
10
10
  var jsxRuntime = require('react/jsx-runtime');
11
11
  var itsFine = require('its-fine');
12
12
 
@@ -30,8 +30,8 @@ function _interopNamespace(e) {
30
30
  return Object.freeze(n);
31
31
  }
32
32
 
33
- var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
34
33
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
34
+ var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
35
35
  var Reconciler__default = /*#__PURE__*/_interopDefault(Reconciler);
36
36
 
37
37
  var threeTypes = /*#__PURE__*/Object.freeze({
@@ -1256,9 +1256,6 @@ useLoader.clear = function (loader, input) {
1256
1256
  return suspendReact.clear([loader, ...keys]);
1257
1257
  };
1258
1258
 
1259
- // TODO: upstream to DefinitelyTyped for React 19
1260
- // https://github.com/facebook/react/issues/28956
1261
-
1262
1259
  function createReconciler(config) {
1263
1260
  const reconciler = Reconciler__default["default"](config);
1264
1261
  reconciler.injectIntoDevTools({
@@ -1656,6 +1653,8 @@ const reconciler = /* @__PURE__ */createReconciler({
1656
1653
  suspendInstance() {},
1657
1654
  waitForCommitToBeReady: () => null,
1658
1655
  NotPendingTransition: null,
1656
+ // The reconciler types use the internal ReactContext with all the hidden properties
1657
+ // so we have to cast from the public React.Context type
1659
1658
  HostTransitionContext: /* @__PURE__ */React__namespace.createContext(null),
1660
1659
  setCurrentUpdatePriority(newPriority) {
1661
1660
  currentUpdatePriority = newPriority;
@@ -2167,6 +2166,17 @@ function Portal({
2167
2166
  );
2168
2167
  }
2169
2168
 
2169
+ /**
2170
+ * Force React to flush any updates inside the provided callback synchronously and immediately.
2171
+ * All the same caveats documented for react-dom's `flushSync` apply here (see https://react.dev/reference/react-dom/flushSync).
2172
+ * Nevertheless, sometimes one needs to render synchronously, for example to keep DOM and 3D changes in lock-step without
2173
+ * having to revert to a non-React solution. Note: this will only flush updates within the `Canvas` root.
2174
+ */
2175
+ function flushSync(fn) {
2176
+ // @ts-ignore - reconciler types are not maintained
2177
+ return reconciler.flushSyncFromReconciler(fn);
2178
+ }
2179
+
2170
2180
  function createSubs(callback, subs) {
2171
2181
  const sub = {
2172
2182
  callback
@@ -2423,6 +2433,7 @@ exports.createRoot = createRoot;
2423
2433
  exports.dispose = dispose;
2424
2434
  exports.extend = extend;
2425
2435
  exports.flushGlobalEffects = flushGlobalEffects;
2436
+ exports.flushSync = flushSync;
2426
2437
  exports.getRootState = getRootState;
2427
2438
  exports.invalidate = invalidate;
2428
2439
  exports.isRef = isRef;
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var THREE = require('three');
4
3
  var React = require('react');
5
4
  var constants = require('react-reconciler/constants');
5
+ var THREE = require('three');
6
6
  var traditional = require('zustand/traditional');
7
+ var suspendReact = require('suspend-react');
7
8
  var Reconciler = require('react-reconciler');
8
9
  var scheduler = require('scheduler');
9
- var suspendReact = require('suspend-react');
10
10
  var jsxRuntime = require('react/jsx-runtime');
11
11
  var itsFine = require('its-fine');
12
12
 
@@ -30,8 +30,8 @@ function _interopNamespace(e) {
30
30
  return Object.freeze(n);
31
31
  }
32
32
 
33
- var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
34
33
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
34
+ var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
35
35
  var Reconciler__default = /*#__PURE__*/_interopDefault(Reconciler);
36
36
 
37
37
  var threeTypes = /*#__PURE__*/Object.freeze({
@@ -1256,9 +1256,6 @@ useLoader.clear = function (loader, input) {
1256
1256
  return suspendReact.clear([loader, ...keys]);
1257
1257
  };
1258
1258
 
1259
- // TODO: upstream to DefinitelyTyped for React 19
1260
- // https://github.com/facebook/react/issues/28956
1261
-
1262
1259
  function createReconciler(config) {
1263
1260
  const reconciler = Reconciler__default["default"](config);
1264
1261
  reconciler.injectIntoDevTools({
@@ -1656,6 +1653,8 @@ const reconciler = /* @__PURE__ */createReconciler({
1656
1653
  suspendInstance() {},
1657
1654
  waitForCommitToBeReady: () => null,
1658
1655
  NotPendingTransition: null,
1656
+ // The reconciler types use the internal ReactContext with all the hidden properties
1657
+ // so we have to cast from the public React.Context type
1659
1658
  HostTransitionContext: /* @__PURE__ */React__namespace.createContext(null),
1660
1659
  setCurrentUpdatePriority(newPriority) {
1661
1660
  currentUpdatePriority = newPriority;
@@ -2167,6 +2166,17 @@ function Portal({
2167
2166
  );
2168
2167
  }
2169
2168
 
2169
+ /**
2170
+ * Force React to flush any updates inside the provided callback synchronously and immediately.
2171
+ * All the same caveats documented for react-dom's `flushSync` apply here (see https://react.dev/reference/react-dom/flushSync).
2172
+ * Nevertheless, sometimes one needs to render synchronously, for example to keep DOM and 3D changes in lock-step without
2173
+ * having to revert to a non-React solution. Note: this will only flush updates within the `Canvas` root.
2174
+ */
2175
+ function flushSync(fn) {
2176
+ // @ts-ignore - reconciler types are not maintained
2177
+ return reconciler.flushSyncFromReconciler(fn);
2178
+ }
2179
+
2170
2180
  function createSubs(callback, subs) {
2171
2181
  const sub = {
2172
2182
  callback
@@ -2423,6 +2433,7 @@ exports.createRoot = createRoot;
2423
2433
  exports.dispose = dispose;
2424
2434
  exports.extend = extend;
2425
2435
  exports.flushGlobalEffects = flushGlobalEffects;
2436
+ exports.flushSync = flushSync;
2426
2437
  exports.getRootState = getRootState;
2427
2438
  exports.invalidate = invalidate;
2428
2439
  exports.isRef = isRef;
@@ -1,10 +1,10 @@
1
- import * as THREE from 'three';
2
1
  import * as React from 'react';
3
2
  import { DefaultEventPriority, ContinuousEventPriority, DiscreteEventPriority, ConcurrentRoot } from 'react-reconciler/constants';
3
+ import * as THREE from 'three';
4
4
  import { createWithEqualityFn } from 'zustand/traditional';
5
+ import { suspend, preload, clear } from 'suspend-react';
5
6
  import Reconciler from 'react-reconciler';
6
7
  import { unstable_scheduleCallback, unstable_IdlePriority } from 'scheduler';
7
- import { suspend, preload, clear } from 'suspend-react';
8
8
  import { jsx, Fragment } from 'react/jsx-runtime';
9
9
  import { useFiber, useContextBridge, traverseFiber } from 'its-fine';
10
10
 
@@ -1230,9 +1230,6 @@ useLoader.clear = function (loader, input) {
1230
1230
  return clear([loader, ...keys]);
1231
1231
  };
1232
1232
 
1233
- // TODO: upstream to DefinitelyTyped for React 19
1234
- // https://github.com/facebook/react/issues/28956
1235
-
1236
1233
  function createReconciler(config) {
1237
1234
  const reconciler = Reconciler(config);
1238
1235
  reconciler.injectIntoDevTools({
@@ -1630,6 +1627,8 @@ const reconciler = /* @__PURE__ */createReconciler({
1630
1627
  suspendInstance() {},
1631
1628
  waitForCommitToBeReady: () => null,
1632
1629
  NotPendingTransition: null,
1630
+ // The reconciler types use the internal ReactContext with all the hidden properties
1631
+ // so we have to cast from the public React.Context type
1633
1632
  HostTransitionContext: /* @__PURE__ */React.createContext(null),
1634
1633
  setCurrentUpdatePriority(newPriority) {
1635
1634
  currentUpdatePriority = newPriority;
@@ -2141,6 +2140,17 @@ function Portal({
2141
2140
  );
2142
2141
  }
2143
2142
 
2143
+ /**
2144
+ * Force React to flush any updates inside the provided callback synchronously and immediately.
2145
+ * All the same caveats documented for react-dom's `flushSync` apply here (see https://react.dev/reference/react-dom/flushSync).
2146
+ * Nevertheless, sometimes one needs to render synchronously, for example to keep DOM and 3D changes in lock-step without
2147
+ * having to revert to a non-React solution. Note: this will only flush updates within the `Canvas` root.
2148
+ */
2149
+ function flushSync(fn) {
2150
+ // @ts-ignore - reconciler types are not maintained
2151
+ return reconciler.flushSyncFromReconciler(fn);
2152
+ }
2153
+
2144
2154
  function createSubs(callback, subs) {
2145
2155
  const sub = {
2146
2156
  callback
@@ -2379,4 +2389,4 @@ function createPointerEvents(store) {
2379
2389
  };
2380
2390
  }
2381
2391
 
2382
- export { useThree as A, Block as B, useFrame as C, useGraph as D, ErrorBoundary as E, useLoader as F, _roots as _, useMutableCallback as a, useIsomorphicLayoutEffect as b, createRoot as c, unmountComponentAtNode as d, extend as e, createPointerEvents as f, createEvents as g, flushGlobalEffects as h, isRef as i, addEffect as j, addAfterEffect as k, addTail as l, invalidate as m, advance as n, createPortal as o, context as p, applyProps as q, reconciler as r, getRootState as s, threeTypes as t, useBridge as u, dispose as v, act as w, buildGraph as x, useInstanceHandle as y, useStore as z };
2392
+ export { useStore as A, Block as B, useThree as C, useFrame as D, ErrorBoundary as E, useGraph as F, useLoader as G, _roots as _, useMutableCallback as a, useIsomorphicLayoutEffect as b, createRoot as c, unmountComponentAtNode as d, extend as e, createPointerEvents as f, createEvents as g, flushGlobalEffects as h, isRef as i, addEffect as j, addAfterEffect as k, addTail as l, invalidate as m, advance as n, createPortal as o, flushSync as p, context as q, reconciler as r, applyProps as s, threeTypes as t, useBridge as u, getRootState as v, dispose as w, act as x, buildGraph as y, useInstanceHandle as z };
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var events = require('./events-66111f5e.cjs.dev.js');
5
+ var events = require('./events-d0449b76.cjs.dev.js');
6
6
  var React = require('react');
7
7
  var THREE = require('three');
8
8
  var useMeasure = require('react-use-measure');
@@ -10,9 +10,9 @@ var itsFine = require('its-fine');
10
10
  var jsxRuntime = require('react/jsx-runtime');
11
11
  require('react-reconciler/constants');
12
12
  require('zustand/traditional');
13
+ require('suspend-react');
13
14
  require('react-reconciler');
14
15
  require('scheduler');
15
- require('suspend-react');
16
16
 
17
17
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
18
18
 
@@ -208,6 +208,7 @@ exports.dispose = events.dispose;
208
208
  exports.events = events.createPointerEvents;
209
209
  exports.extend = events.extend;
210
210
  exports.flushGlobalEffects = events.flushGlobalEffects;
211
+ exports.flushSync = events.flushSync;
211
212
  exports.getRootState = events.getRootState;
212
213
  exports.invalidate = events.invalidate;
213
214
  exports.reconciler = events.reconciler;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var events = require('./events-a96a0963.cjs.prod.js');
5
+ var events = require('./events-d0a20a9c.cjs.prod.js');
6
6
  var React = require('react');
7
7
  var THREE = require('three');
8
8
  var useMeasure = require('react-use-measure');
@@ -10,9 +10,9 @@ var itsFine = require('its-fine');
10
10
  var jsxRuntime = require('react/jsx-runtime');
11
11
  require('react-reconciler/constants');
12
12
  require('zustand/traditional');
13
+ require('suspend-react');
13
14
  require('react-reconciler');
14
15
  require('scheduler');
15
- require('suspend-react');
16
16
 
17
17
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
18
18
 
@@ -208,6 +208,7 @@ exports.dispose = events.dispose;
208
208
  exports.events = events.createPointerEvents;
209
209
  exports.extend = events.extend;
210
210
  exports.flushGlobalEffects = events.flushGlobalEffects;
211
+ exports.flushSync = events.flushSync;
211
212
  exports.getRootState = events.getRootState;
212
213
  exports.invalidate = events.invalidate;
213
214
  exports.reconciler = events.reconciler;
@@ -1,5 +1,5 @@
1
- import { e as extend, u as useBridge, a as useMutableCallback, b as useIsomorphicLayoutEffect, c as createRoot, i as isRef, E as ErrorBoundary, B as Block, d as unmountComponentAtNode, f as createPointerEvents } from './events-f681e724.esm.js';
2
- export { t as ReactThreeFiber, _ as _roots, w as act, k as addAfterEffect, j as addEffect, l as addTail, n as advance, q as applyProps, x as buildGraph, p as context, g as createEvents, o as createPortal, c as createRoot, v as dispose, f as events, e as extend, h as flushGlobalEffects, s as getRootState, m as invalidate, r as reconciler, d as unmountComponentAtNode, C as useFrame, D as useGraph, y as useInstanceHandle, F as useLoader, z as useStore, A as useThree } from './events-f681e724.esm.js';
1
+ import { e as extend, u as useBridge, a as useMutableCallback, b as useIsomorphicLayoutEffect, c as createRoot, i as isRef, E as ErrorBoundary, B as Block, d as unmountComponentAtNode, f as createPointerEvents } from './events-e3cb66e2.esm.js';
2
+ export { t as ReactThreeFiber, _ as _roots, x as act, k as addAfterEffect, j as addEffect, l as addTail, n as advance, s as applyProps, y as buildGraph, q as context, g as createEvents, o as createPortal, c as createRoot, w as dispose, f as events, e as extend, h as flushGlobalEffects, p as flushSync, v as getRootState, m as invalidate, r as reconciler, d as unmountComponentAtNode, D as useFrame, F as useGraph, z as useInstanceHandle, G as useLoader, A as useStore, C as useThree } from './events-e3cb66e2.esm.js';
3
3
  import * as React from 'react';
4
4
  import * as THREE from 'three';
5
5
  import useMeasure from 'react-use-measure';
@@ -7,9 +7,9 @@ import { FiberProvider } from 'its-fine';
7
7
  import { jsx } from 'react/jsx-runtime';
8
8
  import 'react-reconciler/constants';
9
9
  import 'zustand/traditional';
10
+ import 'suspend-react';
10
11
  import 'react-reconciler';
11
12
  import 'scheduler';
12
- import 'suspend-react';
13
13
 
14
14
  function CanvasImpl({
15
15
  ref,
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var events = require('../../dist/events-66111f5e.cjs.dev.js');
5
+ var events = require('../../dist/events-d0449b76.cjs.dev.js');
6
6
  var React = require('react');
7
7
  var THREE = require('three');
8
8
  var reactNative = require('react-native');
@@ -15,9 +15,9 @@ var base64Js = require('base64-js');
15
15
  var buffer = require('buffer');
16
16
  require('react-reconciler/constants');
17
17
  require('zustand/traditional');
18
+ require('suspend-react');
18
19
  require('react-reconciler');
19
20
  require('scheduler');
20
- require('suspend-react');
21
21
 
22
22
  function _interopNamespace(e) {
23
23
  if (e && e.__esModule) return e;
@@ -438,7 +438,9 @@ function polyfills() {
438
438
  const url = URL.createObjectURL(blob);
439
439
  URL.revokeObjectURL(url);
440
440
  } catch (_) {
441
- const BlobManager = require('react-native/Libraries/Blob/BlobManager.js');
441
+ var _BlobManagerModule$de;
442
+ const BlobManagerModule = require('react-native/Libraries/Blob/BlobManager.js');
443
+ const BlobManager = (_BlobManagerModule$de = BlobManagerModule.default) != null ? _BlobManagerModule$de : BlobManagerModule;
442
444
  const createObjectURL = URL.createObjectURL;
443
445
  URL.createObjectURL = function (blob) {
444
446
  if (blob.data._base64) {
@@ -544,6 +546,7 @@ exports.createRoot = events.createRoot;
544
546
  exports.dispose = events.dispose;
545
547
  exports.extend = events.extend;
546
548
  exports.flushGlobalEffects = events.flushGlobalEffects;
549
+ exports.flushSync = events.flushSync;
547
550
  exports.getRootState = events.getRootState;
548
551
  exports.invalidate = events.invalidate;
549
552
  exports.reconciler = events.reconciler;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var events = require('../../dist/events-a96a0963.cjs.prod.js');
5
+ var events = require('../../dist/events-d0a20a9c.cjs.prod.js');
6
6
  var React = require('react');
7
7
  var THREE = require('three');
8
8
  var reactNative = require('react-native');
@@ -15,9 +15,9 @@ var base64Js = require('base64-js');
15
15
  var buffer = require('buffer');
16
16
  require('react-reconciler/constants');
17
17
  require('zustand/traditional');
18
+ require('suspend-react');
18
19
  require('react-reconciler');
19
20
  require('scheduler');
20
- require('suspend-react');
21
21
 
22
22
  function _interopNamespace(e) {
23
23
  if (e && e.__esModule) return e;
@@ -438,7 +438,9 @@ function polyfills() {
438
438
  const url = URL.createObjectURL(blob);
439
439
  URL.revokeObjectURL(url);
440
440
  } catch (_) {
441
- const BlobManager = require('react-native/Libraries/Blob/BlobManager.js');
441
+ var _BlobManagerModule$de;
442
+ const BlobManagerModule = require('react-native/Libraries/Blob/BlobManager.js');
443
+ const BlobManager = (_BlobManagerModule$de = BlobManagerModule.default) != null ? _BlobManagerModule$de : BlobManagerModule;
442
444
  const createObjectURL = URL.createObjectURL;
443
445
  URL.createObjectURL = function (blob) {
444
446
  if (blob.data._base64) {
@@ -544,6 +546,7 @@ exports.createRoot = events.createRoot;
544
546
  exports.dispose = events.dispose;
545
547
  exports.extend = events.extend;
546
548
  exports.flushGlobalEffects = events.flushGlobalEffects;
549
+ exports.flushSync = events.flushSync;
547
550
  exports.getRootState = events.getRootState;
548
551
  exports.invalidate = events.invalidate;
549
552
  exports.reconciler = events.reconciler;
@@ -1,5 +1,5 @@
1
- import { e as extend, u as useBridge, a as useMutableCallback, c as createRoot, b as useIsomorphicLayoutEffect, E as ErrorBoundary, B as Block, d as unmountComponentAtNode, f as createPointerEvents, g as createEvents } from '../../dist/events-f681e724.esm.js';
2
- export { t as ReactThreeFiber, _ as _roots, w as act, k as addAfterEffect, j as addEffect, l as addTail, n as advance, q as applyProps, x as buildGraph, p as context, g as createEvents, o as createPortal, c as createRoot, v as dispose, e as extend, h as flushGlobalEffects, s as getRootState, m as invalidate, r as reconciler, d as unmountComponentAtNode, C as useFrame, D as useGraph, y as useInstanceHandle, F as useLoader, z as useStore, A as useThree } from '../../dist/events-f681e724.esm.js';
1
+ import { e as extend, u as useBridge, a as useMutableCallback, c as createRoot, b as useIsomorphicLayoutEffect, E as ErrorBoundary, B as Block, d as unmountComponentAtNode, f as createPointerEvents, g as createEvents } from '../../dist/events-e3cb66e2.esm.js';
2
+ export { t as ReactThreeFiber, _ as _roots, x as act, k as addAfterEffect, j as addEffect, l as addTail, n as advance, s as applyProps, y as buildGraph, q as context, g as createEvents, o as createPortal, c as createRoot, w as dispose, e as extend, h as flushGlobalEffects, p as flushSync, v as getRootState, m as invalidate, r as reconciler, d as unmountComponentAtNode, D as useFrame, F as useGraph, z as useInstanceHandle, G as useLoader, A as useStore, C as useThree } from '../../dist/events-e3cb66e2.esm.js';
3
3
  import * as React from 'react';
4
4
  import * as THREE from 'three';
5
5
  import { PanResponder, PixelRatio, StyleSheet, View, Platform, Image, NativeModules } from 'react-native';
@@ -12,9 +12,9 @@ import { fromByteArray } from 'base64-js';
12
12
  import { Buffer } from 'buffer';
13
13
  import 'react-reconciler/constants';
14
14
  import 'zustand/traditional';
15
+ import 'suspend-react';
15
16
  import 'react-reconciler';
16
17
  import 'scheduler';
17
- import 'suspend-react';
18
18
 
19
19
  // TODO: React 19 needs support from react-native
20
20
  const _View = View;
@@ -413,7 +413,9 @@ function polyfills() {
413
413
  const url = URL.createObjectURL(blob);
414
414
  URL.revokeObjectURL(url);
415
415
  } catch (_) {
416
- const BlobManager = require('react-native/Libraries/Blob/BlobManager.js');
416
+ var _BlobManagerModule$de;
417
+ const BlobManagerModule = require('react-native/Libraries/Blob/BlobManager.js');
418
+ const BlobManager = (_BlobManagerModule$de = BlobManagerModule.default) != null ? _BlobManagerModule$de : BlobManagerModule;
417
419
  const createObjectURL = URL.createObjectURL;
418
420
  URL.createObjectURL = function (blob) {
419
421
  if (blob.data._base64) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-three/fiber",
3
- "version": "9.1.4",
3
+ "version": "9.3.0",
4
4
  "description": "A React renderer for Threejs",
5
5
  "keywords": [
6
6
  "react",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@babel/runtime": "^7.17.8",
47
- "@types/react-reconciler": "^0.28.9",
47
+ "@types/react-reconciler": "^0.32.0",
48
48
  "@types/webxr": "*",
49
49
  "base64-js": "^1.5.1",
50
50
  "buffer": "^6.0.3",