@react-three/fiber 8.17.13 → 8.18.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,17 @@
1
1
  # @react-three/fiber
2
2
 
3
+ ## 8.18.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 54a3330f: feat: make children optional in Canvas
8
+
9
+ ## 8.17.14
10
+
11
+ ### Patch Changes
12
+
13
+ - eeeed16b: fix: update use-measure
14
+
3
15
  ## 8.17.13
4
16
 
5
17
  ### Patch Changes
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { View, type ViewProps, type ViewStyle } from 'react-native';
3
3
  import { RenderProps } from '../core';
4
4
  export interface CanvasProps extends Omit<RenderProps<HTMLCanvasElement>, 'size' | 'dpr'>, ViewProps {
5
- children: React.ReactNode;
5
+ children?: React.ReactNode;
6
6
  style?: ViewStyle;
7
7
  }
8
8
  export interface Props extends CanvasProps {
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { Options as ResizeOptions } from 'react-use-measure';
3
3
  import { RenderProps } from '../core';
4
4
  export interface CanvasProps extends Omit<RenderProps<HTMLCanvasElement>, 'size'>, React.HTMLAttributes<HTMLDivElement> {
5
- children: React.ReactNode;
5
+ children?: React.ReactNode;
6
6
  /** Canvas fallback content, similar to img's alt prop */
7
7
  fallback?: React.ReactNode;
8
8
  /**
@@ -133,7 +133,7 @@ const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(function Canvas({
133
133
  fallback: /*#__PURE__*/jsxRuntime.jsx(events.Block, {
134
134
  set: setBlock
135
135
  }),
136
- children: children
136
+ children: children != null ? children : null
137
137
  })
138
138
  })
139
139
  }));
@@ -133,7 +133,7 @@ const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(function Canvas({
133
133
  fallback: /*#__PURE__*/jsxRuntime.jsx(events.Block, {
134
134
  set: setBlock
135
135
  }),
136
- children: children
136
+ children: children != null ? children : null
137
137
  })
138
138
  })
139
139
  }));
@@ -106,7 +106,7 @@ const CanvasImpl = /*#__PURE__*/React.forwardRef(function Canvas({
106
106
  fallback: /*#__PURE__*/jsx(Block, {
107
107
  set: setBlock
108
108
  }),
109
- children: children
109
+ children: children != null ? children : null
110
110
  })
111
111
  })
112
112
  }));
@@ -238,7 +238,7 @@ const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(({
238
238
  fallback: /*#__PURE__*/jsxRuntime.jsx(events.Block, {
239
239
  set: setBlock
240
240
  }),
241
- children: children
241
+ children: children != null ? children : null
242
242
  })
243
243
  })
244
244
  }));
@@ -238,7 +238,7 @@ const CanvasImpl = /*#__PURE__*/React__namespace.forwardRef(({
238
238
  fallback: /*#__PURE__*/jsxRuntime.jsx(events.Block, {
239
239
  set: setBlock
240
240
  }),
241
- children: children
241
+ children: children != null ? children : null
242
242
  })
243
243
  })
244
244
  }));
@@ -213,7 +213,7 @@ const CanvasImpl = /*#__PURE__*/React.forwardRef(({
213
213
  fallback: /*#__PURE__*/jsx(Block, {
214
214
  set: setBlock
215
215
  }),
216
- children: children
216
+ children: children != null ? children : null
217
217
  })
218
218
  })
219
219
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-three/fiber",
3
- "version": "8.17.13",
3
+ "version": "8.18.0",
4
4
  "description": "A React renderer for Threejs",
5
5
  "keywords": [
6
6
  "react",
@@ -49,7 +49,7 @@
49
49
  "buffer": "^6.0.3",
50
50
  "its-fine": "^1.0.6",
51
51
  "react-reconciler": "^0.27.0",
52
- "react-use-measure": "^2.1.6",
52
+ "react-use-measure": "^2.1.7",
53
53
  "scheduler": "^0.21.0",
54
54
  "suspend-react": "^0.1.3",
55
55
  "zustand": "^3.7.1"