@remotion/studio 4.0.177 → 4.0.179

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,4 +1,4 @@
1
1
 
2
- > @remotion/studio@4.0.176 build /Users/jonathanburger/remotion/packages/studio
2
+ > @remotion/studio@4.0.178 build /Users/jonathanburger/remotion/packages/studio
3
3
  > bun --env-file=../.env.bundle bundle.ts
4
4
 
package/README.md CHANGED
@@ -1,3 +1,18 @@
1
- # `@remotion/studio`
2
-
3
- Right now the APIs in here are not meant for public consumption.
1
+ # @remotion/studio
2
+
3
+ APIs for interacting with the Remotion Studio
4
+
5
+ [![NPM Downloads](https://img.shields.io/npm/dm/@remotion/studio.svg?style=flat&color=black&label=Downloads)](https://npmcharts.com/compare/@remotion/studio?minimal=true)
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @remotion/studio --save-exact
11
+ ```
12
+
13
+ When installing a Remotion package, make sure to align the version of all `remotion` and `@remotion/*` packages to the same version.
14
+ Remove the `^` character from the version number to use the exact version.
15
+
16
+ ## Usage
17
+
18
+ This is an internal package and has no documentation.
@@ -9,6 +9,7 @@ const colors_1 = require("../helpers/colors");
9
9
  const timeline_zoom_1 = require("../state/timeline-zoom");
10
10
  const Canvas_1 = require("./Canvas");
11
11
  const FramePersistor_1 = require("./FramePersistor");
12
+ const is_menu_item_1 = require("./Menu/is-menu-item");
12
13
  const RefreshCompositionOverlay_1 = require("./RefreshCompositionOverlay");
13
14
  const RunningCalculateMetadata_1 = require("./RunningCalculateMetadata");
14
15
  const imperative_state_1 = require("./Timeline/imperative-state");
@@ -70,5 +71,5 @@ const loaderContainer = {
70
71
  overflowY: 'auto',
71
72
  };
72
73
  const ErrorLoading = ({ error }) => {
73
- return ((0, jsx_runtime_1.jsx)("div", { style: loaderContainer, children: (0, jsx_runtime_1.jsx)(ErrorLoader_1.ErrorLoader, { canHaveDismissButton: false, keyboardShortcuts: false, error: error, onRetry: () => { var _a; return (_a = remotion_1.Internals.resolveCompositionsRef.current) === null || _a === void 0 ? void 0 : _a.reloadCurrentlySelectedComposition(); }, calculateMetadata: true }, error.stack) }));
74
+ return ((0, jsx_runtime_1.jsx)("div", { style: loaderContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: (0, jsx_runtime_1.jsx)(ErrorLoader_1.ErrorLoader, { canHaveDismissButton: false, keyboardShortcuts: false, error: error, onRetry: () => { var _a; return (_a = remotion_1.Internals.resolveCompositionsRef.current) === null || _a === void 0 ? void 0 : _a.reloadCurrentlySelectedComposition(); }, calculateMetadata: true }, error.stack) }));
74
75
  };
@@ -12,6 +12,6 @@ export declare const getInputBorderColor: ({ status, isFocused, isHovered, }: {
12
12
  status: 'error' | 'warning' | 'ok';
13
13
  isFocused: boolean;
14
14
  isHovered: boolean;
15
- }) => "hsla(0, 0%, 100%, 0.15)" | "rgba(0, 0, 0, 0.6)" | "rgba(255, 255, 255, 0.05)" | "#ff3232" | "#f1c40f";
15
+ }) => "#ff3232" | "hsla(0, 0%, 100%, 0.15)" | "#f1c40f" | "rgba(255, 255, 255, 0.05)" | "rgba(0, 0, 0, 0.6)";
16
16
  export declare const RemotionInput: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLInputElement>>;
17
17
  export {};
@@ -0,0 +1 @@
1
+ export declare const handleUploadFile: (file: File, assetPath: string) => Promise<void>;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handleUploadFile = void 0;
4
+ const NotificationCenter_1 = require("./Notifications/NotificationCenter");
5
+ const handleUploadFile = async (file, assetPath) => {
6
+ if (!file) {
7
+ (0, NotificationCenter_1.showNotification)('Please select a file first!', 3000);
8
+ return;
9
+ }
10
+ try {
11
+ const url = new URL('/api/add-asset', window.location.origin);
12
+ url.search = new URLSearchParams({
13
+ folder: assetPath,
14
+ file: file.name,
15
+ }).toString();
16
+ const response = await fetch(url, {
17
+ method: 'POST',
18
+ body: file,
19
+ });
20
+ if (response.ok) {
21
+ (0, NotificationCenter_1.showNotification)(`Added ${file.name} to ${assetPath}`, 3000);
22
+ }
23
+ else {
24
+ const jsonResponse = await response.json();
25
+ (0, NotificationCenter_1.showNotification)(`Upload failed: ${jsonResponse.error}`, 3000);
26
+ }
27
+ }
28
+ catch (error) {
29
+ (0, NotificationCenter_1.showNotification)(`Error during upload: ${error}`, 3000);
30
+ }
31
+ };
32
+ exports.handleUploadFile = handleUploadFile;
@@ -9934,6 +9934,7 @@ var loaderContainer = {
9934
9934
  var ErrorLoading = ({ error }) => {
9935
9935
  return jsx86("div", {
9936
9936
  style: loaderContainer,
9937
+ className: VERTICAL_SCROLLBAR_CLASSNAME,
9937
9938
  children: jsx86(ErrorLoader, {
9938
9939
  canHaveDismissButton: false,
9939
9940
  keyboardShortcuts: false,
@@ -1,4 +1,4 @@
1
1
  export declare const getCheckerboardBackgroundSize: (size: number) => string;
2
2
  export declare const getCheckerboardBackgroundPos: (size: number) => string;
3
- export declare const checkerboardBackgroundColor: (checkerboard: boolean) => "black" | "white";
3
+ export declare const checkerboardBackgroundColor: (checkerboard: boolean) => "white" | "black";
4
4
  export declare const checkerboardBackgroundImage: (checkerboard: boolean) => "\n linear-gradient(\n 45deg,\n rgba(0, 0, 0, 0.1) 25%,\n transparent 25%\n ),\n linear-gradient(135deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.1) 75%),\n linear-gradient(135deg, transparent 75%, rgba(0, 0, 0, 0.1) 75%)\n " | undefined;
@@ -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
- }) => "transparent" | "hsla(0, 0%, 100%, 0.15)" | "hsla(0, 0%, 100%, 0.25)" | "rgba(255, 255, 255, 0.06)";
26
+ }) => "transparent" | "hsla(0, 0%, 100%, 0.25)" | "hsla(0, 0%, 100%, 0.15)" | "rgba(255, 255, 255, 0.06)";
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
+ "repository": {
3
+ "url": "https://github.com/remotion-dev/remotion/tree/main/packages/studio"
4
+ },
2
5
  "name": "@remotion/studio",
3
- "version": "4.0.177",
4
- "description": "Remotion Editor",
6
+ "version": "4.0.179",
7
+ "description": "APIs for interacting with the Remotion Studio",
5
8
  "main": "dist",
6
9
  "sideEffects": false,
7
10
  "author": "Jonny Burger <jonny@remotion.dev>",
8
11
  "contributors": [],
9
12
  "license": "MIT",
10
- "repository": {
11
- "url": "https://github.com/remotion-dev/remotion"
12
- },
13
13
  "bugs": {
14
14
  "url": "https://github.com/remotion-dev/remotion/issues"
15
15
  },
@@ -18,28 +18,18 @@
18
18
  "memfs": "3.4.3",
19
19
  "source-map": "0.7.3",
20
20
  "open": "^8.4.2",
21
- "remotion": "4.0.177",
22
- "@remotion/player": "4.0.177",
23
- "@remotion/media-utils": "4.0.177",
24
- "@remotion/renderer": "4.0.177",
25
- "@remotion/studio-shared": "4.0.177"
21
+ "remotion": "4.0.179",
22
+ "@remotion/renderer": "4.0.179",
23
+ "@remotion/player": "4.0.179",
24
+ "@remotion/media-utils": "4.0.179",
25
+ "@remotion/studio-shared": "4.0.179"
26
26
  },
27
27
  "devDependencies": {
28
28
  "react": "18.3.1",
29
29
  "react-dom": "18.3.1",
30
- "@jonny/eslint-config": "3.0.281",
31
- "@types/node": "18.14.6",
32
- "@types/react": "18.3.1",
33
- "@types/react-dom": "18.3.0",
34
- "eslint": "8.56.0",
35
- "eslint-plugin-10x": "1.5.2",
36
- "eslint-plugin-react": "7.32.2",
37
- "eslint-plugin-react-hooks": "4.4.0",
38
- "prettier": "3.2.5",
39
30
  "@types/semver": "^7.3.4",
40
- "prettier-plugin-organize-imports": "3.2.4",
41
31
  "zod": "3.22.3",
42
- "@remotion/zod-types": "4.0.177"
32
+ "@remotion/zod-types": "4.0.179"
43
33
  },
44
34
  "publishConfig": {
45
35
  "access": "public"