@remotion/skia 4.0.167 → 4.0.169

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/skia",
3
- "version": "4.0.167",
3
+ "version": "4.0.169",
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",
@@ -16,7 +16,7 @@
16
16
  "url": "https://github.com/remotion-dev/remotion/issues"
17
17
  },
18
18
  "dependencies": {
19
- "remotion": "4.0.167"
19
+ "remotion": "4.0.169"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "@shopify/react-native-skia": ">=0.1.191",
@@ -33,8 +33,8 @@
33
33
  "prettier-plugin-organize-imports": "3.2.4",
34
34
  "react": "18.3.1",
35
35
  "react-dom": "18.3.1",
36
- "remotion": "4.0.167",
37
- "@remotion/bundler": "4.0.167"
36
+ "@remotion/bundler": "4.0.169",
37
+ "remotion": "4.0.169"
38
38
  },
39
39
  "keywords": [
40
40
  "remotion",
@@ -1,55 +0,0 @@
1
- import {createRequire} from "node:module";
2
- var __require = createRequire(import.meta.url);
3
-
4
- // src/enable.ts
5
- import {webpack} from "@remotion/bundler";
6
- import fs from "fs";
7
- var enableSkia = (currentConfiguration) => {
8
- return {
9
- ...currentConfiguration,
10
- plugins: [
11
- ...currentConfiguration.plugins ?? [],
12
- new class CopySkiaPlugin {
13
- apply(compiler) {
14
- compiler.hooks.thisCompilation.tap("AddSkiaPlugin", (compilation) => {
15
- compilation.hooks.processAssets.tapPromise({
16
- name: "copy-skia",
17
- stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL
18
- }, async () => {
19
- const src = __require.resolve("canvaskit-wasm/bin/full/canvaskit.wasm");
20
- if (compilation.getAsset(src)) {
21
- return;
22
- }
23
- compilation.emitAsset("/canvaskit.wasm", new webpack.sources.RawSource(await fs.promises.readFile(src)));
24
- });
25
- });
26
- }
27
- }
28
- ],
29
- resolve: {
30
- ...currentConfiguration.resolve,
31
- fallback: {
32
- fs: false,
33
- path: false
34
- },
35
- extensions: [
36
- ".web.js",
37
- ".web.ts",
38
- ".web.tsx",
39
- ".js",
40
- ".ts",
41
- ".tsx",
42
- "..."
43
- ],
44
- alias: {
45
- ...currentConfiguration.resolve?.alias,
46
- "react-native-reanimated": "require('react-native-reanimated')",
47
- "react-native-reanimated/lib/reanimated2/core": "require('react-native-reanimated/lib/reanimated2/core')",
48
- "react-native/Libraries/Image/AssetRegistry": false
49
- }
50
- }
51
- };
52
- };
53
- export {
54
- enableSkia
55
- };
@@ -1,39 +0,0 @@
1
- // src/SkiaCanvas.tsx
2
- import {Canvas} from "@shopify/react-native-skia";
3
- import {useMemo} from "react";
4
- import {Internals} from "remotion";
5
- import {
6
- jsx
7
- } from "react/jsx-runtime";
8
- var SkiaCanvas = ({
9
- children,
10
- height,
11
- width,
12
- style,
13
- ...otherProps
14
- }) => {
15
- const contexts = Internals.useRemotionContexts();
16
- const mergedStyles = useMemo(() => {
17
- return {
18
- width,
19
- height,
20
- ...style ?? {}
21
- };
22
- }, [height, style, width]);
23
- const props = useMemo(() => {
24
- return {
25
- style: mergedStyles,
26
- ...otherProps
27
- };
28
- }, [mergedStyles, otherProps]);
29
- return jsx(Canvas, {
30
- ...props,
31
- children: jsx(Internals.RemotionContextProvider, {
32
- contexts,
33
- children
34
- })
35
- });
36
- };
37
- export {
38
- SkiaCanvas
39
- };