@react-three/fiber 9.1.0 → 9.1.2

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,17 @@
1
1
  # @react-three/fiber
2
2
 
3
+ ## 9.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 053757f45d2411f2929975add76a4c979713e616: fix: reference dev-only act with computed key for Webpack
8
+
9
+ ## 9.1.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 0deae3fb12b6d62ff083891e388ab09de51330d0: Fix failing builds for production when React.act is unavailable. This fixes issues found in React@19.1.0 and up.
14
+
3
15
  ## 9.1.0
4
16
 
5
17
  ### Minor Changes
@@ -20,6 +20,7 @@ export declare function findInitialRoot<T>(instance: Instance<T>): RootStore;
20
20
  export type Act = <T = any>(cb: () => Promise<T>) => Promise<T>;
21
21
  /**
22
22
  * Safely flush async effects when testing, simulating a legacy root.
23
+ * @deprecated Import from React instead. import { act } from 'react'
23
24
  */
24
25
  export declare const act: Act;
25
26
  export type Camera = (THREE.OrthographicCamera | THREE.PerspectiveCamera) & {
@@ -48,8 +48,11 @@ function findInitialRoot(instance) {
48
48
  }
49
49
  /**
50
50
  * Safely flush async effects when testing, simulating a legacy root.
51
+ * @deprecated Import from React instead. import { act } from 'react'
51
52
  */
52
- const act = React__namespace.act;
53
+ // Reference with computed key to break Webpack static analysis
54
+ // https://github.com/webpack/webpack/issues/14814
55
+ const act = React__namespace['act' + ''];
53
56
  const isOrthographicCamera = def => def && def.isOrthographicCamera;
54
57
  const isRef = obj => obj && obj.hasOwnProperty('current');
55
58
  const isColorRepresentation = value => value != null && (typeof value === 'string' || typeof value === 'number' || value.isColor);
@@ -22,8 +22,11 @@ function findInitialRoot(instance) {
22
22
  }
23
23
  /**
24
24
  * Safely flush async effects when testing, simulating a legacy root.
25
+ * @deprecated Import from React instead. import { act } from 'react'
25
26
  */
26
- const act = React.act;
27
+ // Reference with computed key to break Webpack static analysis
28
+ // https://github.com/webpack/webpack/issues/14814
29
+ const act = React['act' + ''];
27
30
  const isOrthographicCamera = def => def && def.isOrthographicCamera;
28
31
  const isRef = obj => obj && obj.hasOwnProperty('current');
29
32
  const isColorRepresentation = value => value != null && (typeof value === 'string' || typeof value === 'number' || value.isColor);
@@ -48,8 +48,11 @@ function findInitialRoot(instance) {
48
48
  }
49
49
  /**
50
50
  * Safely flush async effects when testing, simulating a legacy root.
51
+ * @deprecated Import from React instead. import { act } from 'react'
51
52
  */
52
- const act = React__namespace.act;
53
+ // Reference with computed key to break Webpack static analysis
54
+ // https://github.com/webpack/webpack/issues/14814
55
+ const act = React__namespace['act' + ''];
53
56
  const isOrthographicCamera = def => def && def.isOrthographicCamera;
54
57
  const isRef = obj => obj && obj.hasOwnProperty('current');
55
58
  const isColorRepresentation = value => value != null && (typeof value === 'string' || typeof value === 'number' || value.isColor);
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var events = require('./events-d47554c5.cjs.dev.js');
5
+ var events = require('./events-485b18b5.cjs.dev.js');
6
6
  var React = require('react');
7
7
  var THREE = require('three');
8
8
  var useMeasure = require('react-use-measure');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var events = require('./events-9e217aef.cjs.prod.js');
5
+ var events = require('./events-ff8a8ea8.cjs.prod.js');
6
6
  var React = require('react');
7
7
  var THREE = require('three');
8
8
  var useMeasure = require('react-use-measure');
@@ -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-f80b1519.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-f80b1519.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-dc44c1b8.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-dc44c1b8.esm.js';
3
3
  import * as React from 'react';
4
4
  import * as THREE from 'three';
5
5
  import useMeasure from 'react-use-measure';
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var events = require('../../dist/events-d47554c5.cjs.dev.js');
5
+ var events = require('../../dist/events-485b18b5.cjs.dev.js');
6
6
  var React = require('react');
7
7
  var THREE = require('three');
8
8
  var reactNative = require('react-native');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var events = require('../../dist/events-9e217aef.cjs.prod.js');
5
+ var events = require('../../dist/events-ff8a8ea8.cjs.prod.js');
6
6
  var React = require('react');
7
7
  var THREE = require('three');
8
8
  var reactNative = require('react-native');
@@ -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-f80b1519.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-f80b1519.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-dc44c1b8.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-dc44c1b8.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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-three/fiber",
3
- "version": "9.1.0",
3
+ "version": "9.1.2",
4
4
  "description": "A React renderer for Threejs",
5
5
  "keywords": [
6
6
  "react",
@@ -13,7 +13,8 @@
13
13
  "license": "MIT",
14
14
  "maintainers": [
15
15
  "Josh Ellis (https://github.com/joshuaellis)",
16
- "Cody Bennett (https://github.com/codyjasonbennett)"
16
+ "Cody Bennett (https://github.com/codyjasonbennett)",
17
+ "Kris Baumgarnter (https://github.com/krispya)"
17
18
  ],
18
19
  "bugs": {
19
20
  "url": "https://github.com/pmndrs/react-three-fiber/issues"