@remotion/skia 3.1.6 → 3.1.10

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.
@@ -5,5 +5,5 @@ declare type RemotionCanvasProps = CanvasProps & {
5
5
  width: number;
6
6
  height: number;
7
7
  };
8
- export declare const SkiaCanvas: ({ children, height, width, ...otherProps }: RemotionCanvasProps) => JSX.Element;
8
+ export declare const SkiaCanvas: ({ children, height, width, style, ...otherProps }: RemotionCanvasProps) => JSX.Element;
9
9
  export {};
@@ -5,14 +5,21 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_native_skia_1 = require("@shopify/react-native-skia");
6
6
  const react_1 = require("react");
7
7
  const remotion_1 = require("remotion");
8
- const SkiaCanvas = ({ children, height, width, ...otherProps }) => {
8
+ const SkiaCanvas = ({ children, height, width, style, ...otherProps }) => {
9
9
  const contexts = remotion_1.Internals.useRemotionContexts();
10
- const style = (0, react_1.useMemo)(() => {
10
+ const props = (0, react_1.useMemo)(() => {
11
11
  return {
12
- width,
13
- height,
12
+ style: [
13
+ {
14
+ width,
15
+ height,
16
+ },
17
+ style,
18
+ ],
19
+ mode: 'continuous',
20
+ ...otherProps,
14
21
  };
15
- }, [height, width]);
16
- return ((0, jsx_runtime_1.jsx)(react_native_skia_1.Canvas, { ...otherProps, style: style, mode: "continuous", children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.RemotionContextProvider, { contexts: contexts, children: children }) }));
22
+ }, [height, otherProps, style, width]);
23
+ 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 }) }));
17
24
  };
18
25
  exports.SkiaCanvas = SkiaCanvas;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/skia",
3
- "version": "3.1.6",
3
+ "version": "3.1.10",
4
4
  "description": "Utilities for using react-native-skia in Remotion",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -48,5 +48,5 @@
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "gitHead": "188460243a533e1511b3f83fa8c77cd4c445553d"
51
+ "gitHead": "bcf9e6a75b738fa36db53abc9cc92a6b9d9eefd2"
52
52
  }