@remotion/studio 4.0.208 → 4.0.209

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.
Files changed (37) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/README.md +1 -1
  3. package/dist/api/install-package.d.ts +2 -0
  4. package/dist/api/install-package.js +8 -0
  5. package/dist/components/Button.d.ts +11 -10
  6. package/dist/components/InstallPackage.d.ts +5 -0
  7. package/dist/components/InstallPackage.js +141 -0
  8. package/dist/components/InstallablePackage.d.ts +7 -0
  9. package/dist/components/InstallablePackage.js +19 -0
  10. package/dist/components/Menu/MenuItem.d.ts +1 -1
  11. package/dist/components/ModalButton.d.ts +3 -0
  12. package/dist/components/ModalButton.js +21 -0
  13. package/dist/components/ModalFooter.d.ts +4 -0
  14. package/dist/components/ModalFooter.js +15 -0
  15. package/dist/components/ModalHeader.d.ts +2 -2
  16. package/dist/components/ModalHeader.js +3 -3
  17. package/dist/components/Modals.js +2 -1
  18. package/dist/components/NewComposition/CodemodFooter.d.ts +7 -7
  19. package/dist/components/NewComposition/CodemodFooter.js +2 -10
  20. package/dist/components/NewComposition/DeleteComposition.js +2 -1
  21. package/dist/components/NewComposition/DuplicateComposition.js +3 -2
  22. package/dist/components/NewComposition/RenameComposition.js +2 -1
  23. package/dist/components/RenderModal/RenderModal.js +1 -1
  24. package/dist/components/RenderModal/RenderStatusModal.js +1 -1
  25. package/dist/components/TopPanel.js +14 -1
  26. package/dist/components/UpdateModal/UpdateModal.d.ts +2 -2
  27. package/dist/components/UpdateModal/UpdateModal.js +1 -1
  28. package/dist/error-overlay/remotion-overlay/ShortcutHint.d.ts +2 -2
  29. package/dist/error-overlay/remotion-overlay/ShortcutHint.js +2 -0
  30. package/dist/esm/index.mjs +2783 -2847
  31. package/dist/esm/internals.mjs +2620 -2293
  32. package/dist/helpers/colors.d.ts +1 -0
  33. package/dist/helpers/colors.js +2 -1
  34. package/dist/helpers/use-menu-structure.js +64 -17
  35. package/dist/state/modals.d.ts +4 -0
  36. package/package.json +8 -7
  37. package/tsconfig.tsbuildinfo +1 -1
@@ -12,6 +12,7 @@ export declare const INPUT_BORDER_COLOR_UNHOVERED = "rgba(0, 0, 0, 0.6)";
12
12
  export declare const INPUT_BORDER_COLOR_HOVERED = "rgba(255, 255, 255, 0.05)";
13
13
  export declare const TIMELINE_BACKGROUND = "#111";
14
14
  export declare const FAIL_COLOR = "#ff3232";
15
+ export declare const TEXT_COLOR = "#fff";
15
16
  export declare const WARNING_COLOR = "#f1c40f";
16
17
  export declare const BLUE = "#0b84f3";
17
18
  export declare const BLUE_DISABLED = "#284f73";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getBackgroundFromHoverState = exports.TIMELINE_TRACK_SEPARATOR = exports.LINE_COLOR = exports.SELECTED_GUIDE = exports.UNSELECTED_GUIDE = exports.LIGHT_TRANSPARENT = exports.BLUE_DISABLED = exports.BLUE = exports.WARNING_COLOR = exports.FAIL_COLOR = exports.TIMELINE_BACKGROUND = exports.INPUT_BORDER_COLOR_HOVERED = exports.INPUT_BORDER_COLOR_UNHOVERED = exports.CLEAR_HOVER = exports.VERY_LIGHT_TEXT = exports.RULER_COLOR = exports.LIGHT_TEXT = exports.SELECTED_BACKGROUND = exports.LIGHT_COLOR = exports.BORDER_COLOR = exports.INPUT_BACKGROUND = exports.BACKGROUND__TRANSPARENT = exports.BACKGROUND = void 0;
3
+ exports.getBackgroundFromHoverState = exports.TIMELINE_TRACK_SEPARATOR = exports.LINE_COLOR = exports.SELECTED_GUIDE = exports.UNSELECTED_GUIDE = exports.LIGHT_TRANSPARENT = exports.BLUE_DISABLED = exports.BLUE = exports.WARNING_COLOR = exports.TEXT_COLOR = exports.FAIL_COLOR = exports.TIMELINE_BACKGROUND = exports.INPUT_BORDER_COLOR_HOVERED = exports.INPUT_BORDER_COLOR_UNHOVERED = exports.CLEAR_HOVER = exports.VERY_LIGHT_TEXT = exports.RULER_COLOR = exports.LIGHT_TEXT = exports.SELECTED_BACKGROUND = exports.LIGHT_COLOR = exports.BORDER_COLOR = exports.INPUT_BACKGROUND = exports.BACKGROUND__TRANSPARENT = exports.BACKGROUND = void 0;
4
4
  exports.BACKGROUND = 'rgb(31,36,40)';
5
5
  exports.BACKGROUND__TRANSPARENT = 'rgba(31,36,40, 0)';
6
6
  exports.INPUT_BACKGROUND = '#2f363d';
@@ -16,6 +16,7 @@ exports.INPUT_BORDER_COLOR_UNHOVERED = 'rgba(0, 0, 0, 0.6)';
16
16
  exports.INPUT_BORDER_COLOR_HOVERED = 'rgba(255, 255, 255, 0.05)';
17
17
  exports.TIMELINE_BACKGROUND = '#111';
18
18
  exports.FAIL_COLOR = '#ff3232';
19
+ exports.TEXT_COLOR = '#fff';
19
20
  exports.WARNING_COLOR = '#f1c40f';
20
21
  exports.BLUE = '#0b84f3';
21
22
  exports.BLUE_DISABLED = '#284f73';
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
7
  const no_react_1 = require("remotion/no-react");
8
+ const restart_studio_1 = require("../api/restart-studio");
8
9
  const NotificationCenter_1 = require("../components/Notifications/NotificationCenter");
9
10
  const SizeSelector_1 = require("../components/SizeSelector");
10
11
  const TimeValue_1 = require("../components/TimeValue");
@@ -118,6 +119,7 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
118
119
  const { setSidebarCollapsedState, sidebarCollapsedStateLeft, sidebarCollapsedStateRight, } = (0, react_1.useContext)(sidebar_1.SidebarContext);
119
120
  const sizes = (0, SizeSelector_1.getUniqueSizes)(size);
120
121
  const isFullscreenSupported = (0, check_fullscreen_support_1.checkFullscreenSupport)();
122
+ const { remotion_packageManager } = window;
121
123
  const mobileLayout = (0, mobile_layout_1.useMobileLayout)();
122
124
  const structure = (0, react_1.useMemo)(() => {
123
125
  let struct = [
@@ -182,6 +184,24 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
182
184
  subMenu: null,
183
185
  quickSwitcherLabel: 'Help: Acknowledgements',
184
186
  },
187
+ {
188
+ type: 'divider',
189
+ id: 'timeline-divider-1',
190
+ },
191
+ {
192
+ id: 'restart-studio',
193
+ value: 'restart-studio',
194
+ label: 'Restart Studio Server',
195
+ onClick: () => {
196
+ closeMenu();
197
+ (0, restart_studio_1.restartStudio)();
198
+ },
199
+ type: 'item',
200
+ keyHint: null,
201
+ leftItem: null,
202
+ subMenu: null,
203
+ quickSwitcherLabel: 'Restart Studio Server',
204
+ },
185
205
  ],
186
206
  quickSwitcherLabel: null,
187
207
  },
@@ -516,13 +536,13 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
516
536
  : null,
517
537
  ].filter(remotion_1.Internals.truthy),
518
538
  },
519
- 'EyeDropper' in window
520
- ? {
521
- id: 'tools',
522
- label: 'Tools',
523
- leaveLeftPadding: false,
524
- items: [
525
- {
539
+ {
540
+ id: 'tools',
541
+ label: 'Tools',
542
+ leaveLeftPadding: false,
543
+ items: [
544
+ 'EyeDropper' in window
545
+ ? {
526
546
  id: 'color-picker',
527
547
  value: 'color-picker',
528
548
  label: 'Color Picker',
@@ -535,25 +555,51 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
535
555
  subMenu: null,
536
556
  type: 'item',
537
557
  quickSwitcherLabel: 'Show Color Picker',
558
+ }
559
+ : null,
560
+ {
561
+ id: 'spring-editor',
562
+ value: 'spring-editor',
563
+ label: 'spring() Editor',
564
+ onClick: () => {
565
+ closeMenu();
566
+ window.open('https://springs.remotion.dev', '_blank');
538
567
  },
568
+ leftItem: null,
569
+ keyHint: null,
570
+ subMenu: null,
571
+ type: 'item',
572
+ quickSwitcherLabel: 'Open spring() Editor',
573
+ },
574
+ ].filter(remotion_1.Internals.truthy),
575
+ quickSwitcherLabel: null,
576
+ },
577
+ readOnlyStudio || remotion_packageManager === 'unknown'
578
+ ? null
579
+ : {
580
+ id: 'install',
581
+ label: 'Packages',
582
+ leaveLeftPadding: false,
583
+ items: [
539
584
  {
540
- id: 'spring-editor',
541
- value: 'spring-editor',
542
- label: 'spring() Editor',
585
+ id: 'install-packages',
586
+ value: 'install-packages',
587
+ label: 'Install...',
543
588
  onClick: () => {
544
589
  closeMenu();
545
- window.open('https://springs.remotion.dev', '_blank');
590
+ setSelectedModal({
591
+ type: 'install-packages',
592
+ packageManager: remotion_packageManager,
593
+ });
546
594
  },
547
- leftItem: null,
595
+ type: 'item',
548
596
  keyHint: null,
597
+ leftItem: null,
549
598
  subMenu: null,
550
- type: 'item',
551
- quickSwitcherLabel: 'Open spring() Editor',
599
+ quickSwitcherLabel: `Install packages`,
552
600
  },
553
601
  ],
554
- quickSwitcherLabel: null,
555
- }
556
- : null,
602
+ },
557
603
  {
558
604
  id: 'help',
559
605
  label: 'Help',
@@ -728,6 +774,7 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
728
774
  }
729
775
  return struct;
730
776
  }, [
777
+ remotion_packageManager,
731
778
  readOnlyStudio,
732
779
  mobileLayout,
733
780
  sizes,
@@ -1,4 +1,5 @@
1
1
  import type { AudioCodec, Codec, ColorSpace, LogLevel, OpenGlRenderer, PixelFormat, ProResProfile, StillImageFormat, VideoImageFormat, X264Preset } from '@remotion/renderer';
2
+ import type { PackageManager } from '@remotion/studio-shared';
2
3
  import type React from 'react';
3
4
  import type { CompType } from '../components/NewComposition/DuplicateComposition';
4
5
  import type { QuickSwitcherMode } from '../components/QuickSwitcher/NoResults';
@@ -64,6 +65,9 @@ export type ModalState = {
64
65
  type: 'update';
65
66
  info: UpdateInfo;
66
67
  knownBugs: Bug[];
68
+ } | {
69
+ type: 'install-packages';
70
+ packageManager: PackageManager;
67
71
  } | {
68
72
  type: 'quick-switcher';
69
73
  mode: QuickSwitcherMode;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/studio"
4
4
  },
5
5
  "name": "@remotion/studio",
6
- "version": "4.0.208",
6
+ "version": "4.0.209",
7
7
  "description": "APIs for interacting with the Remotion Studio",
8
8
  "main": "dist",
9
9
  "sideEffects": false,
@@ -18,18 +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.208",
22
- "@remotion/media-utils": "4.0.208",
23
- "@remotion/studio-shared": "4.0.208",
24
- "@remotion/renderer": "4.0.208",
25
- "@remotion/player": "4.0.208"
21
+ "remotion": "4.0.209",
22
+ "@remotion/player": "4.0.209",
23
+ "@remotion/media-utils": "4.0.209",
24
+ "@remotion/renderer": "4.0.209",
25
+ "@remotion/studio-shared": "4.0.209"
26
26
  },
27
27
  "devDependencies": {
28
28
  "react": "18.3.1",
29
29
  "react-dom": "18.3.1",
30
30
  "@types/semver": "^7.3.4",
31
31
  "zod": "3.22.3",
32
- "@remotion/zod-types": "4.0.208"
32
+ "@remotion/zod-types": "4.0.209"
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public"
@@ -50,6 +50,7 @@
50
50
  "require": "./dist/internals.js"
51
51
  }
52
52
  },
53
+ "homepage": "https://www.remotion.dev/docs/studio/api",
53
54
  "scripts": {
54
55
  "lint": "eslint src --ext ts,tsx",
55
56
  "build": "bun --env-file=../.env.bundle bundle.ts",