@remotion/player 3.3.27 → 3.3.31

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.
@@ -0,0 +1,7 @@
1
+ import type { VideoConfig } from 'remotion';
2
+ import type { Size } from './utils/use-element-size';
3
+ export declare const calculateOuterStyle: ({ config, style, canvasSize, }: {
4
+ config: VideoConfig | null;
5
+ style: React.CSSProperties | undefined;
6
+ canvasSize: Size | null;
7
+ }) => React.CSSProperties;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.calculateOuterStyle = void 0;
4
+ const calculate_player_size_1 = require("./utils/calculate-player-size");
5
+ const calculateOuterStyle = ({ config, style, canvasSize, }) => {
6
+ if (!config) {
7
+ return {};
8
+ }
9
+ return {
10
+ position: 'relative',
11
+ overflow: 'hidden',
12
+ ...(0, calculate_player_size_1.calculatePlayerSize)({
13
+ compositionHeight: config.height,
14
+ compositionWidth: config.width,
15
+ currentSize: canvasSize,
16
+ height: style === null || style === void 0 ? void 0 : style.height,
17
+ width: style === null || style === void 0 ? void 0 : style.width,
18
+ }),
19
+ ...style,
20
+ };
21
+ };
22
+ exports.calculateOuterStyle = calculateOuterStyle;
@@ -0,0 +1,19 @@
1
+ import type React from 'react';
2
+ import type { VideoConfig } from 'remotion';
3
+ import type { Size } from './utils/use-element-size';
4
+ export declare const calculateOuterStyle: ({ config, style, canvasSize, }: {
5
+ config: VideoConfig | null;
6
+ style: React.CSSProperties | undefined;
7
+ canvasSize: Size | null;
8
+ }) => React.CSSProperties;
9
+ export declare const calculateContainerStyle: ({ config, canvasSize, layout, scale, }: {
10
+ config: VideoConfig | null;
11
+ canvasSize: Size | null;
12
+ layout: unknown;
13
+ scale: number;
14
+ }) => React.CSSProperties;
15
+ export declare const calculateOuter: ({ layout, scale, config, }: {
16
+ layout: unknown;
17
+ scale: number;
18
+ config: VideoConfig | null;
19
+ }) => React.CSSProperties;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.calculateOuter = exports.calculateContainerStyle = exports.calculateOuterStyle = void 0;
4
+ const calculate_player_size_1 = require("./utils/calculate-player-size");
5
+ const calculateOuterStyle = ({ config, style, canvasSize, }) => {
6
+ if (!config) {
7
+ return {};
8
+ }
9
+ return {
10
+ position: 'relative',
11
+ overflow: 'hidden',
12
+ ...(0, calculate_player_size_1.calculatePlayerSize)({
13
+ compositionHeight: config.height,
14
+ compositionWidth: config.width,
15
+ currentSize: canvasSize,
16
+ height: style === null || style === void 0 ? void 0 : style.height,
17
+ width: style === null || style === void 0 ? void 0 : style.width,
18
+ }),
19
+ ...style,
20
+ };
21
+ };
22
+ exports.calculateOuterStyle = calculateOuterStyle;
23
+ const calculateContainerStyle = ({ config, canvasSize, layout, scale, }) => {
24
+ if (!config || !canvasSize || !layout) {
25
+ return {};
26
+ }
27
+ return {
28
+ position: 'absolute',
29
+ width: config.width,
30
+ height: config.height,
31
+ display: 'flex',
32
+ transform: `scale(${scale})`,
33
+ marginLeft: layout.xCorrection,
34
+ marginTop: layout.yCorrection,
35
+ overflow: 'hidden',
36
+ };
37
+ };
38
+ exports.calculateContainerStyle = calculateContainerStyle;
39
+ const calculateOuter = ({ layout, scale, config, }) => {
40
+ if (!layout || !config) {
41
+ return {};
42
+ }
43
+ const { centerX, centerY } = layout;
44
+ return {
45
+ width: config.width * scale,
46
+ height: config.height * scale,
47
+ display: 'flex',
48
+ flexDirection: 'column',
49
+ position: 'absolute',
50
+ left: centerX,
51
+ top: centerY,
52
+ overflow: 'hidden',
53
+ };
54
+ };
55
+ exports.calculateOuter = calculateOuter;
@@ -0,0 +1,7 @@
1
+ import type { VideoConfig } from 'remotion';
2
+ import type { Size } from './utils/use-element-size';
3
+ export declare const calculateOuterStyle: ({ config, style, canvasSize, }: {
4
+ config: VideoConfig | null;
5
+ style: React.CSSProperties | undefined;
6
+ canvasSize: Size | null;
7
+ }) => React.CSSProperties;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.calculateOuterStyle = void 0;
4
+ const calculate_player_size_1 = require("./utils/calculate-player-size");
5
+ const calculateOuterStyle = ({ config, style, canvasSize, }) => {
6
+ if (!config) {
7
+ return {};
8
+ }
9
+ return {
10
+ position: 'relative',
11
+ overflow: 'hidden',
12
+ ...(0, calculate_player_size_1.calculatePlayerSize)({
13
+ compositionHeight: config.height,
14
+ compositionWidth: config.width,
15
+ currentSize: canvasSize,
16
+ height: style === null || style === void 0 ? void 0 : style.height,
17
+ width: style === null || style === void 0 ? void 0 : style.width,
18
+ }),
19
+ ...style,
20
+ };
21
+ };
22
+ exports.calculateOuterStyle = calculateOuterStyle;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/player",
3
- "version": "3.3.27",
3
+ "version": "3.3.31",
4
4
  "description": "Remotion Player",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -27,7 +27,7 @@
27
27
  ],
28
28
  "license": "SEE LICENSE IN LICENSE.md",
29
29
  "dependencies": {
30
- "remotion": "3.3.27"
30
+ "remotion": "3.3.31"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "react": ">=16.8.0",
@@ -61,5 +61,5 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "5dfc0dfa0df9592a358127a9aea9219244e6807a"
64
+ "gitHead": "4b89462c98236d59641272bd0649d880514e685f"
65
65
  }