@react-three/fiber 8.8.7 → 8.8.9

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
+ ## 8.8.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 4254400e: fix(createPortal): use correct JSX type
8
+
9
+ ## 8.8.8
10
+
11
+ ### Patch Changes
12
+
13
+ - fcb183e3: fix: call onUpdate for attached children prop update
14
+
3
15
  ## 8.8.7
4
16
 
5
17
  ### Patch Changes
@@ -51,7 +51,7 @@ export declare type InjectState = Partial<Omit<RootState, PrivateKeys> & {
51
51
  };
52
52
  size?: Size;
53
53
  }>;
54
- declare function createPortal(children: React.ReactNode, container: THREE.Object3D, state?: InjectState): React.ReactNode;
54
+ declare function createPortal(children: React.ReactNode, container: THREE.Object3D, state?: InjectState): JSX.Element;
55
55
  declare const act: any;
56
56
  export * from './hooks';
57
57
  export { context, render, createRoot, unmountComponentAtNode, createPortal, reconciler, applyProps, dispose, invalidate, advance, extend, addEffect, addAfterEffect, addTail, getRootState, act, roots as _roots, };
@@ -296,7 +296,7 @@ function diffProps(instance, {
296
296
  } // This function applies a set of changes to the instance
297
297
 
298
298
  function applyProps$1(instance, data) {
299
- var _instance$__r3f3, _root$getState;
299
+ var _instance$__r3f3, _root$getState, _instance$__r3f4;
300
300
 
301
301
  // Filter equals, events and reserved props
302
302
  const localState = (_instance$__r3f3 = instance.__r3f) != null ? _instance$__r3f3 : {};
@@ -398,13 +398,13 @@ function applyProps$1(instance, data) {
398
398
  } // Call the update lifecycle when it is being updated, but only when it is part of the scene
399
399
 
400
400
 
401
- if (changes.length && instance.parent) updateInstance(instance);
401
+ if (changes.length && (_instance$__r3f4 = instance.__r3f) != null && _instance$__r3f4.parent) updateInstance(instance);
402
402
  return instance;
403
403
  }
404
404
  function invalidateInstance(instance) {
405
- var _instance$__r3f4, _instance$__r3f4$root;
405
+ var _instance$__r3f5, _instance$__r3f5$root;
406
406
 
407
- const state = (_instance$__r3f4 = instance.__r3f) == null ? void 0 : (_instance$__r3f4$root = _instance$__r3f4.root) == null ? void 0 : _instance$__r3f4$root.getState == null ? void 0 : _instance$__r3f4$root.getState();
407
+ const state = (_instance$__r3f5 = instance.__r3f) == null ? void 0 : (_instance$__r3f5$root = _instance$__r3f5.root) == null ? void 0 : _instance$__r3f5$root.getState == null ? void 0 : _instance$__r3f5$root.getState();
408
408
  if (state && state.internal.frames === 0) state.invalidate();
409
409
  }
410
410
  function updateInstance(instance) {
@@ -269,7 +269,7 @@ function diffProps(instance, {
269
269
  } // This function applies a set of changes to the instance
270
270
 
271
271
  function applyProps$1(instance, data) {
272
- var _instance$__r3f3, _root$getState;
272
+ var _instance$__r3f3, _root$getState, _instance$__r3f4;
273
273
 
274
274
  // Filter equals, events and reserved props
275
275
  const localState = (_instance$__r3f3 = instance.__r3f) != null ? _instance$__r3f3 : {};
@@ -371,13 +371,13 @@ function applyProps$1(instance, data) {
371
371
  } // Call the update lifecycle when it is being updated, but only when it is part of the scene
372
372
 
373
373
 
374
- if (changes.length && instance.parent) updateInstance(instance);
374
+ if (changes.length && (_instance$__r3f4 = instance.__r3f) != null && _instance$__r3f4.parent) updateInstance(instance);
375
375
  return instance;
376
376
  }
377
377
  function invalidateInstance(instance) {
378
- var _instance$__r3f4, _instance$__r3f4$root;
378
+ var _instance$__r3f5, _instance$__r3f5$root;
379
379
 
380
- const state = (_instance$__r3f4 = instance.__r3f) == null ? void 0 : (_instance$__r3f4$root = _instance$__r3f4.root) == null ? void 0 : _instance$__r3f4$root.getState == null ? void 0 : _instance$__r3f4$root.getState();
380
+ const state = (_instance$__r3f5 = instance.__r3f) == null ? void 0 : (_instance$__r3f5$root = _instance$__r3f5.root) == null ? void 0 : _instance$__r3f5$root.getState == null ? void 0 : _instance$__r3f5$root.getState();
381
381
  if (state && state.internal.frames === 0) state.invalidate();
382
382
  }
383
383
  function updateInstance(instance) {
@@ -296,7 +296,7 @@ function diffProps(instance, {
296
296
  } // This function applies a set of changes to the instance
297
297
 
298
298
  function applyProps$1(instance, data) {
299
- var _instance$__r3f3, _root$getState;
299
+ var _instance$__r3f3, _root$getState, _instance$__r3f4;
300
300
 
301
301
  // Filter equals, events and reserved props
302
302
  const localState = (_instance$__r3f3 = instance.__r3f) != null ? _instance$__r3f3 : {};
@@ -398,13 +398,13 @@ function applyProps$1(instance, data) {
398
398
  } // Call the update lifecycle when it is being updated, but only when it is part of the scene
399
399
 
400
400
 
401
- if (changes.length && instance.parent) updateInstance(instance);
401
+ if (changes.length && (_instance$__r3f4 = instance.__r3f) != null && _instance$__r3f4.parent) updateInstance(instance);
402
402
  return instance;
403
403
  }
404
404
  function invalidateInstance(instance) {
405
- var _instance$__r3f4, _instance$__r3f4$root;
405
+ var _instance$__r3f5, _instance$__r3f5$root;
406
406
 
407
- const state = (_instance$__r3f4 = instance.__r3f) == null ? void 0 : (_instance$__r3f4$root = _instance$__r3f4.root) == null ? void 0 : _instance$__r3f4$root.getState == null ? void 0 : _instance$__r3f4$root.getState();
407
+ const state = (_instance$__r3f5 = instance.__r3f) == null ? void 0 : (_instance$__r3f5$root = _instance$__r3f5.root) == null ? void 0 : _instance$__r3f5$root.getState == null ? void 0 : _instance$__r3f5$root.getState();
408
408
  if (state && state.internal.frames === 0) state.invalidate();
409
409
  }
410
410
  function updateInstance(instance) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('./index-4a687fc8.cjs.dev.js');
5
+ var index = require('./index-cd40f4c7.cjs.dev.js');
6
6
  var _extends = require('@babel/runtime/helpers/extends');
7
7
  var React = require('react');
8
8
  var THREE = require('three');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('./index-d8fba45f.cjs.prod.js');
5
+ var index = require('./index-409682b7.cjs.prod.js');
6
6
  var _extends = require('@babel/runtime/helpers/extends');
7
7
  var React = require('react');
8
8
  var THREE = require('three');
@@ -1,5 +1,5 @@
1
- import { c as createEvents, e as extend, u as useMutableCallback, a as createRoot, i as isRef, E as ErrorBoundary, B as Block, b as useIsomorphicLayoutEffect, d as unmountComponentAtNode } from './index-7209a19b.esm.js';
2
- export { t as ReactThreeFiber, v as _roots, s as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, f as context, c as createEvents, g as createPortal, a as createRoot, k as dispose, e as extend, q as getRootState, l as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, z as useFrame, A as useGraph, w as useInstanceHandle, C as useLoader, x as useStore, y as useThree } from './index-7209a19b.esm.js';
1
+ import { c as createEvents, e as extend, u as useMutableCallback, a as createRoot, i as isRef, E as ErrorBoundary, B as Block, b as useIsomorphicLayoutEffect, d as unmountComponentAtNode } from './index-8c780a08.esm.js';
2
+ export { t as ReactThreeFiber, v as _roots, s as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, f as context, c as createEvents, g as createPortal, a as createRoot, k as dispose, e as extend, q as getRootState, l as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, z as useFrame, A as useGraph, w as useInstanceHandle, C as useLoader, x as useStore, y as useThree } from './index-8c780a08.esm.js';
3
3
  import _extends from '@babel/runtime/helpers/esm/extends';
4
4
  import * as React from 'react';
5
5
  import * as THREE from 'three';
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('../../dist/index-4a687fc8.cjs.dev.js');
5
+ var index = require('../../dist/index-cd40f4c7.cjs.dev.js');
6
6
  var _extends = require('@babel/runtime/helpers/extends');
7
7
  var React = require('react');
8
8
  var THREE = require('three');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('../../dist/index-d8fba45f.cjs.prod.js');
5
+ var index = require('../../dist/index-409682b7.cjs.prod.js');
6
6
  var _extends = require('@babel/runtime/helpers/extends');
7
7
  var React = require('react');
8
8
  var THREE = require('three');
@@ -1,5 +1,5 @@
1
- import { c as createEvents, e as extend, u as useMutableCallback, a as createRoot, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from '../../dist/index-7209a19b.esm.js';
2
- export { t as ReactThreeFiber, v as _roots, s as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, f as context, g as createPortal, a as createRoot, k as dispose, e as extend, q as getRootState, l as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, z as useFrame, A as useGraph, w as useInstanceHandle, C as useLoader, x as useStore, y as useThree } from '../../dist/index-7209a19b.esm.js';
1
+ import { c as createEvents, e as extend, u as useMutableCallback, a as createRoot, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from '../../dist/index-8c780a08.esm.js';
2
+ export { t as ReactThreeFiber, v as _roots, s as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, f as context, g as createPortal, a as createRoot, k as dispose, e as extend, q as getRootState, l as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, z as useFrame, A as useGraph, w as useInstanceHandle, C as useLoader, x as useStore, y as useThree } from '../../dist/index-8c780a08.esm.js';
3
3
  import _extends from '@babel/runtime/helpers/esm/extends';
4
4
  import * as React from 'react';
5
5
  import * as THREE from 'three';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-three/fiber",
3
- "version": "8.8.7",
3
+ "version": "8.8.9",
4
4
  "description": "A React renderer for Threejs",
5
5
  "keywords": [
6
6
  "react",