@remotion/player 4.0.226 → 4.0.227

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.
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  export declare const bufferingIndicatorStrokeWidth = 3;
3
3
  export declare const BufferingIndicator: React.FC<{
4
- type: 'player' | 'studio';
4
+ readonly type: 'player' | 'studio';
5
5
  }>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  export declare const PlayerEmitterProvider: React.FC<{
3
- children: React.ReactNode;
4
- currentPlaybackRate: number | null;
3
+ readonly children: React.ReactNode;
4
+ readonly currentPlaybackRate: number | null;
5
5
  }>;
@@ -3,6 +3,6 @@ import type { Size } from './utils/use-element-size.js';
3
3
  export declare const Checkmark: () => import("react/jsx-runtime.js").JSX.Element;
4
4
  export declare const playerButtonStyle: React.CSSProperties;
5
5
  export declare const PlaybackrateControl: React.FC<{
6
- playbackRates: number[];
7
- canvasSize: Size;
6
+ readonly playbackRates: number[];
7
+ readonly canvasSize: Size;
8
8
  }>;
@@ -2,11 +2,11 @@ import React from 'react';
2
2
  import type { ThumbnailMethods } from './player-methods.js';
3
3
  import type { ErrorFallback, RenderLoading } from './PlayerUI.js';
4
4
  declare const _default: React.ForwardRefExoticComponent<{
5
- inputProps: Record<string, unknown>;
6
- style?: React.CSSProperties;
7
- errorFallback: ErrorFallback;
8
- renderLoading: RenderLoading | undefined;
9
- className: string | undefined;
10
- overflowVisible: boolean;
5
+ readonly inputProps: Record<string, unknown>;
6
+ readonly style?: React.CSSProperties;
7
+ readonly errorFallback: ErrorFallback;
8
+ readonly renderLoading: RenderLoading | undefined;
9
+ readonly className: string | undefined;
10
+ readonly overflowVisible: boolean;
11
11
  } & React.RefAttributes<ThumbnailMethods>>;
12
12
  export default _default;
@@ -15,5 +15,5 @@ export declare class ErrorBoundary extends React.Component<{
15
15
  hasError: Error;
16
16
  };
17
17
  componentDidCatch(error: Error): void;
18
- render(): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | null | undefined;
18
+ render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
19
19
  }
@@ -4,7 +4,7 @@ export declare const fullscreenIconSize = 16;
4
4
  export declare const PlayIcon: React.FC;
5
5
  export declare const PauseIcon: React.FC;
6
6
  export declare const FullscreenIcon: React.FC<{
7
- isFullscreen: boolean;
7
+ readonly isFullscreen: boolean;
8
8
  }>;
9
9
  export declare const VolumeOffIcon: React.FC;
10
10
  export declare const VolumeOnIcon: React.FC;
@@ -60,10 +60,10 @@ export declare const PlayerInternals: {
60
60
  useHoverState: (ref: React.RefObject<HTMLDivElement>, hideControlsWhenPointerDoesntMove: boolean | number) => boolean;
61
61
  updateAllElementsSizes: () => void;
62
62
  PlayerEmitterProvider: import("react").FC<{
63
- children: import("react").ReactNode;
64
- currentPlaybackRate: number | null;
63
+ readonly children: import("react").ReactNode;
64
+ readonly currentPlaybackRate: number | null;
65
65
  }>;
66
66
  BufferingIndicator: import("react").FC<{
67
- type: "player" | "studio";
67
+ readonly type: "player" | "studio";
68
68
  }>;
69
69
  };
@@ -23,7 +23,6 @@ const HelloWorld = () => {
23
23
  exports.HelloWorld = HelloWorld;
24
24
  const AllTheProviders = ({ children }) => {
25
25
  // overwriting console.error console does not gets poluted with all the errors
26
- // eslint-disable-next-line @typescript-eslint/no-empty-function
27
26
  window.console.error = () => { };
28
27
  return (0, jsx_runtime_1.jsx)("div", { children: children });
29
28
  };
@@ -25,7 +25,7 @@ const getPreferredVolume = () => {
25
25
  const val = window.localStorage.getItem(VOLUME_PERSISTANCE_KEY);
26
26
  return val ? Number(val) : 1;
27
27
  }
28
- catch (e) {
28
+ catch (_a) {
29
29
  // User can disallow localStorage access
30
30
  // https://github.com/remotion-dev/remotion/issues/3540
31
31
  return 1;
@@ -2713,7 +2713,7 @@ var getPreferredVolume = () => {
2713
2713
  try {
2714
2714
  const val = window.localStorage.getItem(VOLUME_PERSISTANCE_KEY);
2715
2715
  return val ? Number(val) : 1;
2716
- } catch (e) {
2716
+ } catch {
2717
2717
  return 1;
2718
2718
  }
2719
2719
  };
@@ -0,0 +1,23 @@
1
+ import {remotionFlatConfig} from '@remotion/eslint-config-internal';
2
+
3
+ const config = remotionFlatConfig({react: true});
4
+
5
+ export default {
6
+ ...config,
7
+ rules: {
8
+ ...config.rules,
9
+ 'no-console': 'error',
10
+ '@typescript-eslint/no-restricted-imports': [
11
+ 'error',
12
+ {
13
+ paths: [
14
+ {
15
+ name: 'zod',
16
+ message: 'Can only import zod as a type',
17
+ allowTypeImports: true,
18
+ },
19
+ ],
20
+ },
21
+ ],
22
+ },
23
+ };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/player"
4
4
  },
5
5
  "name": "@remotion/player",
6
- "version": "4.0.226",
6
+ "version": "4.0.227",
7
7
  "description": "React component for embedding a Remotion preview into your app",
8
8
  "main": "dist/cjs/index.js",
9
9
  "types": "dist/cjs/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  ],
29
29
  "license": "SEE LICENSE IN LICENSE.md",
30
30
  "dependencies": {
31
- "remotion": "4.0.226"
31
+ "remotion": "4.0.227"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "react": ">=16.8.0",
@@ -41,7 +41,9 @@
41
41
  "react": "18.3.1",
42
42
  "react-dom": "18.3.1",
43
43
  "webpack": "5.94.0",
44
- "zod": "3.22.3"
44
+ "zod": "3.22.3",
45
+ "eslint": "9.14.0",
46
+ "@remotion/eslint-config-internal": "4.0.227"
45
47
  },
46
48
  "keywords": [
47
49
  "remotion",
@@ -56,8 +58,8 @@
56
58
  "homepage": "https://www.remotion.dev/docs/player",
57
59
  "scripts": {
58
60
  "formatting": "prettier src --check",
59
- "lint": "eslint src --ext ts,tsx",
60
- "make": "bun ensure-correct-version.ts && bun --env-file=../.env.bundle bundle.ts",
61
+ "lint": "eslint src",
62
+ "make": "tsc -d && bun ensure-correct-version.ts && bun --env-file=../.env.bundle bundle.ts",
61
63
  "test": "bun test src",
62
64
  "prerelease": "cp ../../README.md ."
63
65
  }