@remotion/three 4.0.24 → 4.0.25

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.
@@ -6,6 +6,7 @@ const fiber_1 = require("@react-three/fiber");
6
6
  const react_1 = require("react");
7
7
  const remotion_1 = require("remotion");
8
8
  const SuspenseLoader_1 = require("./SuspenseLoader");
9
+ const validate_1 = require("./validate");
9
10
  const Scale = ({ width, height }) => {
10
11
  const { set, setSize: threeSetSize } = (0, fiber_1.useThree)();
11
12
  const [setSize] = (0, react_1.useState)(() => threeSetSize);
@@ -23,8 +24,8 @@ const Scale = ({ width, height }) => {
23
24
  const ThreeCanvas = (props) => {
24
25
  const { children, width, height, style, onCreated, ...rest } = props;
25
26
  const [waitForCreated] = (0, react_1.useState)(() => (0, remotion_1.delayRender)('Waiting for <ThreeCanvas/> to be created'));
26
- remotion_1.Internals.validateDimension(width, 'width', 'of the <ThreeCanvas /> component');
27
- remotion_1.Internals.validateDimension(height, 'height', 'of the <ThreeCanvas /> component');
27
+ (0, validate_1.validateDimension)(width, 'width', 'of the <ThreeCanvas /> component');
28
+ (0, validate_1.validateDimension)(height, 'height', 'of the <ThreeCanvas /> component');
28
29
  const contexts = remotion_1.Internals.useRemotionContexts();
29
30
  const actualStyle = {
30
31
  width: props.width,
@@ -0,0 +1,2 @@
1
+ import { Internals } from 'remotion';
2
+ export declare const validateDimension: typeof Internals.validateDimension;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateDimension = void 0;
4
+ /* eslint-disable prefer-destructuring */
5
+ const remotion_1 = require("remotion");
6
+ exports.validateDimension = remotion_1.Internals.validateDimension;
@@ -19,6 +19,9 @@ const SuspenseLoader = ({ children }) => {
19
19
  return jsx(Suspense, { fallback: jsx(Unblocker, {}), children: children });
20
20
  };
21
21
 
22
+ /* eslint-disable prefer-destructuring */
23
+ const validateDimension = Internals.validateDimension;
24
+
22
25
  const Scale = ({ width, height }) => {
23
26
  const { set, setSize: threeSetSize } = useThree();
24
27
  const [setSize] = useState(() => threeSetSize);
@@ -36,8 +39,8 @@ const Scale = ({ width, height }) => {
36
39
  const ThreeCanvas = (props) => {
37
40
  const { children, width, height, style, onCreated, ...rest } = props;
38
41
  const [waitForCreated] = useState(() => delayRender('Waiting for <ThreeCanvas/> to be created'));
39
- Internals.validateDimension(width, 'width', 'of the <ThreeCanvas /> component');
40
- Internals.validateDimension(height, 'height', 'of the <ThreeCanvas /> component');
42
+ validateDimension(width, 'width', 'of the <ThreeCanvas /> component');
43
+ validateDimension(height, 'height', 'of the <ThreeCanvas /> component');
41
44
  const contexts = Internals.useRemotionContexts();
42
45
  const actualStyle = {
43
46
  width: props.width,
@@ -0,0 +1,2 @@
1
+ import { Internals } from 'remotion';
2
+ export declare const validateDimension: typeof Internals.validateDimension;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/three",
3
- "version": "4.0.24",
3
+ "version": "4.0.25",
4
4
  "description": "Utility functions for using react-three-fiber with remotion",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",
@@ -16,7 +16,7 @@
16
16
  "url": "https://github.com/remotion-dev/remotion/issues"
17
17
  },
18
18
  "dependencies": {
19
- "remotion": "4.0.24"
19
+ "remotion": "4.0.25"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "@react-three/fiber": ">=8.0.0",