@remotion/studio 4.0.143 → 4.0.145

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.
@@ -23,4 +23,4 @@ export declare const TIMELINE_TRACK_SEPARATOR = "rgba(0, 0, 0, 0.3)";
23
23
  export declare const getBackgroundFromHoverState: ({ selected, hovered, }: {
24
24
  selected: boolean;
25
25
  hovered: boolean;
26
- }) => "hsla(0, 0%, 100%, 0.15)" | "hsla(0, 0%, 100%, 0.25)" | "rgba(255, 255, 255, 0.06)" | "transparent";
26
+ }) => "transparent" | "hsla(0, 0%, 100%, 0.15)" | "hsla(0, 0%, 100%, 0.25)" | "rgba(255, 255, 255, 0.06)";
@@ -1,8 +1,2 @@
1
- export declare const envVariablesObjectToArray: (envVariables: Record<string, string>) => [
2
- string,
3
- string
4
- ][];
5
- export declare const envVariablesArrayToObject: (envVariables: [
6
- string,
7
- string
8
- ][]) => Record<string, string>;
1
+ export declare const envVariablesObjectToArray: (envVariables: Record<string, string>) => [string, string][];
2
+ export declare const envVariablesArrayToObject: (envVariables: [string, string][]) => Record<string, string>;
@@ -0,0 +1 @@
1
+ export declare const injectCSS: () => void;
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.injectCSS = void 0;
4
+ const remotion_1 = require("remotion");
5
+ const makeDefaultGlobalCSS = () => {
6
+ return `
7
+ html {
8
+ --remotion-cli-internals-blue: #0b84f3;
9
+ }
10
+
11
+ body {
12
+ overscroll-behavior-y: none;
13
+ overscroll-behavior-x: none;
14
+ /* Override Chakra UI position: relative on body */
15
+ position: static !important;
16
+ }
17
+
18
+ .remotion-splitter {
19
+ user-select: none;
20
+ }
21
+
22
+ .remotion-splitter-horizontal {
23
+ transform: scaleY(2);
24
+ background: linear-gradient(
25
+ to bottom,
26
+ transparent 25%,
27
+ black 25%,
28
+ black 75%,
29
+ transparent
30
+ );
31
+ }
32
+
33
+ .remotion-splitter-horizontal:hover,
34
+ .remotion-splitter-horizontal.remotion-splitter-active {
35
+ background: linear-gradient(
36
+ to bottom,
37
+ var(--remotion-cli-internals-blue),
38
+ var(--remotion-cli-internals-blue)
39
+ );
40
+ }
41
+
42
+ .remotion-splitter-vertical {
43
+ transform: scaleX(2);
44
+ background: linear-gradient(
45
+ to right,
46
+ transparent 25%,
47
+ black 25%,
48
+ black 75%,
49
+ transparent
50
+ );
51
+ }
52
+
53
+ .remotion-splitter-vertical:hover,
54
+ .remotion-splitter-vertical.remotion-splitter-active {
55
+ background: linear-gradient(
56
+ to right,
57
+ var(--remotion-cli-internals-blue),
58
+ var(--remotion-cli-internals-blue)
59
+ );
60
+ }
61
+
62
+ input::-webkit-outer-spin-button,
63
+ input::-webkit-inner-spin-button {
64
+ -webkit-appearance: none;
65
+ margin: 0;
66
+ }
67
+
68
+ input:focus,
69
+ textarea:focus,
70
+ button:focus,
71
+ a:focus {
72
+ outline: none;
73
+ box-shadow:
74
+ inset 1px 1px #555,
75
+ inset -1px -1px #555,
76
+ inset 1px -1px #555,
77
+ inset -1px 1px #555;
78
+ border-radius: 0 !important;
79
+ }
80
+
81
+ input[type='color'].__remotion_color_picker::-webkit-color-swatch-wrapper {
82
+ padding: 0;
83
+ }
84
+ input[type='color'].__remotion_color_picker::-webkit-color-swatch {
85
+ border: none;
86
+ }
87
+
88
+ .__remotion_thumb,
89
+ .__remotion_thumb::-webkit-slider-thumb {
90
+ -webkit-appearance: none;
91
+ -webkit-tap-highlight-color: transparent;
92
+ }
93
+
94
+ .__remotion_thumb {
95
+ pointer-events: none;
96
+ position: absolute;
97
+ height: 0;
98
+ outline: none;
99
+ top: 15.5px;
100
+ width: 221px;
101
+ margin-left: -2px;
102
+ z-index: 2;
103
+ }
104
+
105
+ /* For Firefox browsers */
106
+ .__remotion_thumb::-moz-range-thumb {
107
+ border: 1px solid black;
108
+ border-radius: 2px;
109
+ cursor: pointer;
110
+ height: 37px;
111
+ width: 10px;
112
+ pointer-events: all;
113
+ border-color: black;
114
+ background-color: white;
115
+ position: relative;
116
+ }
117
+
118
+ /* For Chrome browsers */
119
+ .__remotion_thumb::-webkit-slider-thumb {
120
+ border: 1px solid black;
121
+ border-radius: 2px;
122
+ cursor: pointer;
123
+ height: 39px;
124
+ width: 10px;
125
+ pointer-events: all;
126
+ border-color: black;
127
+ background-color: white;
128
+ position: relative;
129
+ }
130
+ `.trim();
131
+ };
132
+ let injected = false;
133
+ const injectCSS = () => {
134
+ if (injected) {
135
+ return;
136
+ }
137
+ remotion_1.Internals.CSSUtils.injectCSS(makeDefaultGlobalCSS());
138
+ injected = true;
139
+ };
140
+ exports.injectCSS = injectCSS;
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export type { GitSource, RenderDefaults } from '@remotion/studio-shared';
2
- export { Studio } from './Studio';
1
+ export { StaticFile, getStaticFiles } from './api/get-static-files';
2
+ export { watchStaticFile } from './api/watch-static-file';
package/dist/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Studio = void 0;
4
- var Studio_1 = require("./Studio");
5
- Object.defineProperty(exports, "Studio", { enumerable: true, get: function () { return Studio_1.Studio; } });
3
+ exports.watchStaticFile = exports.getStaticFiles = void 0;
4
+ var get_static_files_1 = require("./api/get-static-files");
5
+ Object.defineProperty(exports, "getStaticFiles", { enumerable: true, get: function () { return get_static_files_1.getStaticFiles; } });
6
+ var watch_static_file_1 = require("./api/watch-static-file");
7
+ Object.defineProperty(exports, "watchStaticFile", { enumerable: true, get: function () { return watch_static_file_1.watchStaticFile; } });
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare const StudioInternals: {
3
+ Studio: import("react").FC<{
4
+ readonly rootComponent: import("react").FC<{}>;
5
+ readonly readOnly: boolean;
6
+ }>;
7
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StudioInternals = void 0;
4
+ const Studio_1 = require("./Studio");
5
+ exports.StudioInternals = {
6
+ Studio: Studio_1.Studio,
7
+ };
@@ -6,11 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const jsx_runtime_1 = require("react/jsx-runtime");
7
7
  const client_1 = __importDefault(require("react-dom/client"));
8
8
  const remotion_1 = require("remotion");
9
+ const no_react_1 = require("remotion/no-react");
9
10
  const Studio_1 = require("./Studio");
10
11
  const NoRegisterRoot_1 = require("./components/NoRegisterRoot");
11
12
  const entry_basic_1 = require("./error-overlay/entry-basic");
12
13
  const client_2 = require("./hot-middleware-client/client");
13
- remotion_1.Internals.CSSUtils.injectCSS(remotion_1.Internals.CSSUtils.makeDefaultCSS(null, '#1f2428'));
14
+ remotion_1.Internals.CSSUtils.injectCSS(remotion_1.Internals.CSSUtils.makeDefaultPreviewCSS(null, '#1f2428'));
14
15
  let root = null;
15
16
  const getRootForElement = () => {
16
17
  if (root) {
@@ -20,13 +21,14 @@ const getRootForElement = () => {
20
21
  return root;
21
22
  };
22
23
  const renderToDOM = (content) => {
23
- // @ts-expect-error
24
- if (client_1.default.createRoot) {
25
- getRootForElement().render(content);
26
- }
27
- else {
24
+ if (!client_1.default.createRoot) {
25
+ if (no_react_1.NoReactInternals.ENABLE_V5_BREAKING_CHANGES) {
26
+ throw new Error('Remotion 5.0 does only support React 18+. However, ReactDOM.createRoot() is undefined.');
27
+ }
28
28
  client_1.default.render(content, remotion_1.Internals.getPreviewDomElement());
29
+ return;
29
30
  }
31
+ getRootForElement().render(content);
30
32
  };
31
33
  renderToDOM((0, jsx_runtime_1.jsx)(NoRegisterRoot_1.NoRegisterRoot, {}));
32
34
  remotion_1.Internals.waitForRoot((NewRoot) => {
package/internals.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './dist/internals';
package/internals.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/internals');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/studio",
3
- "version": "4.0.143",
3
+ "version": "4.0.145",
4
4
  "description": "Remotion Editor",
5
5
  "main": "dist",
6
6
  "sideEffects": false,
@@ -18,11 +18,11 @@
18
18
  "memfs": "3.4.3",
19
19
  "source-map": "0.7.3",
20
20
  "open": "^8.4.2",
21
- "remotion": "4.0.143",
22
- "@remotion/media-utils": "4.0.143",
23
- "@remotion/studio-shared": "4.0.143",
24
- "@remotion/renderer": "4.0.143",
25
- "@remotion/player": "4.0.143"
21
+ "remotion": "4.0.145",
22
+ "@remotion/player": "4.0.145",
23
+ "@remotion/renderer": "4.0.145",
24
+ "@remotion/media-utils": "4.0.145",
25
+ "@remotion/studio-shared": "4.0.145"
26
26
  },
27
27
  "devDependencies": {
28
28
  "react": "18.2.0",
@@ -39,24 +39,31 @@
39
39
  "@types/semver": "^7.3.4",
40
40
  "prettier-plugin-organize-imports": "3.2.4",
41
41
  "zod": "^3.22.3",
42
- "@remotion/zod-types": "4.0.143"
42
+ "@remotion/zod-types": "4.0.145"
43
43
  },
44
44
  "publishConfig": {
45
45
  "access": "public"
46
46
  },
47
47
  "exports": {
48
+ "./package.json": "./package.json",
48
49
  ".": {
49
- "import": "./dist/index.js",
50
- "require": "./dist/index.js",
51
- "types": "./dist/index.d.js"
50
+ "types": "./dist/index.d.ts",
51
+ "module": "./dist/esm/index.mjs",
52
+ "import": "./dist/esm/index.mjs",
53
+ "require": "./dist/index.js"
52
54
  },
53
- "./package.json": "./package.json",
54
- "./entry": "./dist/previewEntry.js"
55
+ "./entry": "./dist/previewEntry.js",
56
+ "./internals": {
57
+ "types": "./dist/internals.d.ts",
58
+ "module": "./dist/esm/internals.mjs",
59
+ "import": "./dist/esm/internals.mjs",
60
+ "require": "./dist/internals.js"
61
+ }
55
62
  },
56
63
  "scripts": {
57
64
  "lint": "eslint src --ext ts,tsx",
58
65
  "watch": "tsc -w",
59
- "build": "tsc -d",
66
+ "build": "tsc -d && bun bundle.ts",
60
67
  "test": "bun test src",
61
68
  "formatting": "prettier src --check"
62
69
  }