@remotion/skia 3.3.93 → 3.3.94

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.
@@ -11,18 +11,20 @@ const remotion_1 = require("remotion");
11
11
  */
12
12
  const SkiaCanvas = ({ children, height, width, style, ...otherProps }) => {
13
13
  const contexts = remotion_1.Internals.useRemotionContexts();
14
+ const mergedStyles = (0, react_1.useMemo)(() => {
15
+ var _a;
16
+ return {
17
+ width,
18
+ height,
19
+ ...((_a = style) !== null && _a !== void 0 ? _a : {}),
20
+ };
21
+ }, [height, style, width]);
14
22
  const props = (0, react_1.useMemo)(() => {
15
23
  return {
16
- style: [
17
- {
18
- width,
19
- height,
20
- },
21
- style,
22
- ],
24
+ style: mergedStyles,
23
25
  ...otherProps,
24
26
  };
25
- }, [height, otherProps, style, width]);
27
+ }, [mergedStyles, otherProps]);
26
28
  return ((0, jsx_runtime_1.jsx)(react_native_skia_1.Canvas, { ...props, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.RemotionContextProvider, { contexts: contexts, children: children }) }));
27
29
  };
28
30
  exports.SkiaCanvas = SkiaCanvas;
@@ -9,18 +9,20 @@ import { Internals } from 'remotion';
9
9
  */
10
10
  const SkiaCanvas = ({ children, height, width, style, ...otherProps }) => {
11
11
  const contexts = Internals.useRemotionContexts();
12
+ const mergedStyles = useMemo(() => {
13
+ var _a;
14
+ return {
15
+ width,
16
+ height,
17
+ ...((_a = style) !== null && _a !== void 0 ? _a : {}),
18
+ };
19
+ }, [height, style, width]);
12
20
  const props = useMemo(() => {
13
21
  return {
14
- style: [
15
- {
16
- width,
17
- height,
18
- },
19
- style,
20
- ],
22
+ style: mergedStyles,
21
23
  ...otherProps,
22
24
  };
23
- }, [height, otherProps, style, width]);
25
+ }, [mergedStyles, otherProps]);
24
26
  return (jsx(Canvas, { ...props, children: jsx(Internals.RemotionContextProvider, { contexts: contexts, children: children }) }));
25
27
  };
26
28
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/skia",
3
- "version": "3.3.93",
3
+ "version": "3.3.94",
4
4
  "description": "Utilities for using react-native-skia in Remotion",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",
@@ -17,17 +17,17 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "copy-webpack-plugin": "11",
20
- "remotion": "3.3.93"
20
+ "remotion": "3.3.94"
21
21
  },
22
22
  "peerDependencies": {
23
- "@remotion/bundler": "3.3.93",
23
+ "@remotion/bundler": "3.3.94",
24
24
  "@shopify/react-native-skia": "^0.1.190",
25
25
  "react": ">=16.8.0",
26
26
  "react-dom": ">=16.8.0"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@jonny/eslint-config": "3.0.266",
30
- "@remotion/bundler": "3.3.93",
30
+ "@remotion/bundler": "3.3.94",
31
31
  "@rollup/plugin-typescript": "^8.2.0",
32
32
  "@shopify/react-native-skia": "^0.1.190",
33
33
  "@types/react": "18.0.26",
@@ -37,7 +37,7 @@
37
37
  "prettier-plugin-organize-imports": "^2.3.4",
38
38
  "react": "18.0.0",
39
39
  "react-dom": "18.0.0",
40
- "remotion": "3.3.93",
40
+ "remotion": "3.3.94",
41
41
  "rollup": "^2.70.1",
42
42
  "typescript": "^4.7.0"
43
43
  },