@remotion/studio 4.0.486 → 4.0.487

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 (57) hide show
  1. package/dist/components/ContextMenu.js +2 -1
  2. package/dist/components/CurrentComposition.js +43 -2
  3. package/dist/components/EditorContexts.js +2 -1
  4. package/dist/components/GlobalKeybindings.js +19 -0
  5. package/dist/components/InspectorSourceLocation.d.ts +1 -0
  6. package/dist/components/InspectorSourceLocation.js +18 -3
  7. package/dist/components/KeyboardShortcutsExplainer.js +4 -0
  8. package/dist/components/Preview.js +1 -1
  9. package/dist/components/PreviewToolbar.js +2 -1
  10. package/dist/components/RenderButton.js +1 -0
  11. package/dist/components/RenderModal/OptionExplainer.d.ts +11 -1
  12. package/dist/components/RenderModal/OptionExplainer.js +31 -11
  13. package/dist/components/RenderModal/OptionExplainerBubble.d.ts +15 -1
  14. package/dist/components/RenderModal/OptionExplainerBubble.js +17 -3
  15. package/dist/components/RenderModal/SchemaEditor/Fieldset.d.ts +1 -0
  16. package/dist/components/RenderModal/SchemaEditor/Fieldset.js +6 -1
  17. package/dist/components/RenderModal/SchemaEditor/SchemaEditor.js +1 -2
  18. package/dist/components/RenderModal/WebRenderModal.js +5 -2
  19. package/dist/components/RenderModal/WebRenderModalAdvanced.d.ts +3 -0
  20. package/dist/components/RenderModal/WebRenderModalAdvanced.js +92 -5
  21. package/dist/components/RenderModal/WebRenderModalBasic.js +2 -2
  22. package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +1 -0
  23. package/dist/components/RenderQueue/client-side-render-types.d.ts +2 -1
  24. package/dist/components/SelectedOutlineElement.d.ts +4 -0
  25. package/dist/components/SelectedOutlineElement.js +56 -11
  26. package/dist/components/SelectedOutlineOverlay.d.ts +2 -0
  27. package/dist/components/SelectedOutlineOverlay.js +53 -2
  28. package/dist/components/SelectedOutlineUvControls.js +13 -6
  29. package/dist/components/SnappingProvider.d.ts +4 -0
  30. package/dist/components/SnappingProvider.js +24 -0
  31. package/dist/components/SnappingToggle.d.ts +2 -0
  32. package/dist/components/SnappingToggle.js +26 -0
  33. package/dist/components/Splitter/SplitterContext.d.ts +1 -1
  34. package/dist/components/Timeline/TimelineSelection.js +5 -0
  35. package/dist/components/VisualControls/ClickableFileName.js +2 -2
  36. package/dist/components/VisualControls/VisualControlsContent.js +9 -1
  37. package/dist/components/effect-drag-and-drop.js +30 -9
  38. package/dist/components/import-assets.d.ts +1 -1
  39. package/dist/components/options-sidebar-tabs.d.ts +1 -0
  40. package/dist/components/options-sidebar-tabs.js +6 -1
  41. package/dist/components/selected-outline-snap.d.ts +36 -0
  42. package/dist/components/selected-outline-snap.js +158 -0
  43. package/dist/esm/{chunk-975rp13y.js → chunk-y2t24cx0.js} +4776 -3933
  44. package/dist/esm/internals.mjs +4776 -3933
  45. package/dist/esm/previewEntry.mjs +5095 -4252
  46. package/dist/esm/renderEntry.mjs +1 -1
  47. package/dist/helpers/retry-payload.js +1 -0
  48. package/dist/helpers/use-menu-structure.js +43 -2
  49. package/dist/icons/magnet.d.ts +3 -0
  50. package/dist/icons/magnet.js +8 -0
  51. package/dist/icons/react.d.ts +5 -0
  52. package/dist/icons/react.js +8 -0
  53. package/dist/state/editor-guides.d.ts +2 -2
  54. package/dist/state/editor-snapping.d.ts +8 -0
  55. package/dist/state/editor-snapping.js +18 -0
  56. package/dist/state/modals.d.ts +2 -1
  57. package/package.json +12 -12
@@ -212,7 +212,7 @@ var renderContent = (Root) => {
212
212
  renderToDOM(/* @__PURE__ */ jsx("div", {
213
213
  children: /* @__PURE__ */ jsx(DelayedSpinner, {})
214
214
  }));
215
- import("./chunk-975rp13y.js").then(({ StudioInternals }) => {
215
+ import("./chunk-y2t24cx0.js").then(({ StudioInternals }) => {
216
216
  window.remotion_isStudio = true;
217
217
  window.remotion_isReadOnlyStudio = true;
218
218
  window.remotion_inputProps = "{}";
@@ -203,6 +203,7 @@ const makeClientRetryPayload = (job) => {
203
203
  initialMuted: job.type === 'client-video' ? job.muted : null,
204
204
  initialTransparent: job.type === 'client-video' ? job.transparent : null,
205
205
  initialAllowHtmlInCanvas: job.allowHtmlInCanvas,
206
+ initialPageResponsiveness: job.type === 'client-video' ? job.pageResponsiveness : 'disabled',
206
207
  };
207
208
  };
208
209
  exports.makeClientRetryPayload = makeClientRetryPayload;
@@ -10,6 +10,7 @@ const AskAiModal_1 = require("../components/AskAiModal");
10
10
  const composition_menu_items_1 = require("../components/composition-menu-items");
11
11
  const layout_1 = require("../components/layout");
12
12
  const NotificationCenter_1 = require("../components/Notifications/NotificationCenter");
13
+ const actions_1 = require("../components/RenderQueue/actions");
13
14
  const SizeSelector_1 = require("../components/SizeSelector");
14
15
  const use_resolved_stack_1 = require("../components/Timeline/use-resolved-stack");
15
16
  const TimelineInOutToggle_1 = require("../components/TimelineInOutToggle");
@@ -19,6 +20,7 @@ const canvas_ref_1 = require("../state/canvas-ref");
19
20
  const checkerboard_1 = require("../state/checkerboard");
20
21
  const editor_guides_1 = require("../state/editor-guides");
21
22
  const editor_rulers_1 = require("../state/editor-rulers");
23
+ const editor_snapping_1 = require("../state/editor-snapping");
22
24
  const editor_zoom_gestures_1 = require("../state/editor-zoom-gestures");
23
25
  const modals_1 = require("../state/modals");
24
26
  const sidebar_1 = require("../state/sidebar");
@@ -123,10 +125,10 @@ const getFileMenu = ({ readOnlyStudio, closeMenu, previewServerState, setSelecte
123
125
  quickSwitcherLabel: 'Render on web...',
124
126
  }
125
127
  : null,
126
- window.remotion_editorName && !readOnlyStudio
128
+ !readOnlyStudio
127
129
  ? {
128
130
  type: 'divider',
129
- id: 'open-in-editor-divider',
131
+ id: 'open-project-divider',
130
132
  }
131
133
  : null,
132
134
  window.remotion_editorName && !readOnlyStudio
@@ -158,6 +160,26 @@ const getFileMenu = ({ readOnlyStudio, closeMenu, previewServerState, setSelecte
158
160
  leftItem: null,
159
161
  subMenu: null,
160
162
  quickSwitcherLabel: 'Open in editor...',
163
+ disabled: previewServerState !== 'connected',
164
+ }
165
+ : null,
166
+ !readOnlyStudio
167
+ ? {
168
+ id: 'open-project-in-explorer',
169
+ value: 'open-project-in-explorer',
170
+ label: 'Open in Explorer',
171
+ onClick: () => {
172
+ closeMenu();
173
+ (0, actions_1.openInFileExplorer)({ directory: window.remotion_cwd }).catch((err) => {
174
+ (0, NotificationCenter_1.showNotification)(`Could not open project: ${err.message}`, 2000);
175
+ });
176
+ },
177
+ type: 'item',
178
+ keyHint: null,
179
+ leftItem: null,
180
+ subMenu: null,
181
+ quickSwitcherLabel: 'Open project in Explorer',
182
+ disabled: previewServerState !== 'connected',
161
183
  }
162
184
  : null,
163
185
  (0, get_git_menu_item_1.getGitMenuItem)(),
@@ -180,6 +202,7 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
180
202
  const { editorZoomGestures, setEditorZoomGestures } = (0, react_1.useContext)(editor_zoom_gestures_1.EditorZoomGesturesContext);
181
203
  const { editorShowRulers, setEditorShowRulers } = (0, react_1.useContext)(editor_rulers_1.EditorShowRulersContext);
182
204
  const { editorShowGuides, setEditorShowGuides } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
205
+ const { editorSnapping, setEditorSnapping } = (0, react_1.useContext)(editor_snapping_1.EditorSnappingContext);
183
206
  const { size, setSize } = (0, react_1.useContext)(remotion_1.Internals.PreviewSizeContext);
184
207
  const { canvasContent, compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
185
208
  const { type } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx).previewServerState;
@@ -380,6 +403,22 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
380
403
  ? 'Hide Guides'
381
404
  : 'Show Guides',
382
405
  },
406
+ {
407
+ id: 'enable-snapping',
408
+ keyHint: (0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? null : 'Shift+M',
409
+ label: 'Enable Snapping',
410
+ onClick: () => {
411
+ closeMenu();
412
+ setEditorSnapping((c) => !c);
413
+ },
414
+ type: 'item',
415
+ value: 'enable-snapping',
416
+ leftItem: editorSnapping ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
417
+ subMenu: null,
418
+ quickSwitcherLabel: editorSnapping
419
+ ? 'Disable Snapping'
420
+ : 'Enable Snapping',
421
+ },
383
422
  {
384
423
  id: 'timeline-divider-1',
385
424
  type: 'divider',
@@ -882,6 +921,7 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
882
921
  editorZoomGestures,
883
922
  editorShowRulers,
884
923
  editorShowGuides,
924
+ editorSnapping,
885
925
  sidebarCollapsedStateLeft,
886
926
  sidebarCollapsedStateRight,
887
927
  checkerboard,
@@ -893,6 +933,7 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
893
933
  setEditorZoomGestures,
894
934
  setEditorShowRulers,
895
935
  setEditorShowGuides,
936
+ setEditorSnapping,
896
937
  setSidebarCollapsedState,
897
938
  setCheckerboard,
898
939
  setSelectedModal,
@@ -0,0 +1,3 @@
1
+ import type { SVGProps } from 'react';
2
+ import React from 'react';
3
+ export declare const MagnetIcon: React.FC<SVGProps<SVGSVGElement>>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MagnetIcon = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const MagnetIcon = (props) => {
6
+ return (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", ...props, children: jsx_runtime_1.jsx("path", { transform: "rotate(180 256 256)", d: "M32 176v112c0 123.7 100.3 224 224 224s224-100.3 224-224V176H352v112c0 53-43 96-96 96s-96-43-96-96V176H32zm0-48h128V64c0-17.7-14.3-32-32-32H64C46.3 32 32 46.3 32 64v64zm320 0h128V64c0-17.7-14.3-32-32-32h-64c-17.7 0-32 14.3-32 32v64z" }) }));
7
+ };
8
+ exports.MagnetIcon = MagnetIcon;
@@ -0,0 +1,5 @@
1
+ import type { SVGProps } from 'react';
2
+ import React from 'react';
3
+ export declare const ReactIcon: React.FC<SVGProps<SVGSVGElement> & {
4
+ readonly color: string;
5
+ }>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReactIcon = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const ReactIcon = ({ color, ...props }) => {
6
+ return (jsx_runtime_1.jsx("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 640 640", children: jsx_runtime_1.jsx("path", { fill: color, d: "M392.8 65.2C375.8 60.3 358.1 70.2 353.2 87.2L225.2 535.2C220.3 552.2 230.2 569.9 247.2 574.8C264.2 579.7 281.9 569.8 286.8 552.8L414.8 104.8C419.7 87.8 409.8 70.1 392.8 65.2zM457.4 201.3C444.9 213.8 444.9 234.1 457.4 246.6L530.8 320L457.4 393.4C444.9 405.9 444.9 426.2 457.4 438.7C469.9 451.2 490.2 451.2 502.7 438.7L598.7 342.7C611.2 330.2 611.2 309.9 598.7 297.4L502.7 201.4C490.2 188.9 469.9 188.9 457.4 201.4zM182.7 201.3C170.2 188.8 149.9 188.8 137.4 201.3L41.4 297.3C28.9 309.8 28.9 330.1 41.4 342.6L137.4 438.6C149.9 451.1 170.2 451.1 182.7 438.6C195.2 426.1 195.2 405.8 182.7 393.3L109.3 320L182.6 246.6C195.1 234.1 195.1 213.8 182.6 201.3z" }) }));
7
+ };
8
+ exports.ReactIcon = ReactIcon;
@@ -14,8 +14,8 @@ export type GuideState = {
14
14
  setDraggingGuideId: (cb: (prevState: string | null) => string | null) => void;
15
15
  setHoveredGuideId: (cb: (prevState: string | null) => string | null) => void;
16
16
  hoveredGuideId: string | null;
17
- shouldCreateGuideRef: React.MutableRefObject<boolean>;
18
- shouldDeleteGuideRef: React.MutableRefObject<boolean>;
17
+ shouldCreateGuideRef: React.RefObject<boolean>;
18
+ shouldDeleteGuideRef: React.RefObject<boolean>;
19
19
  };
20
20
  export declare const persistEditorShowGuidesOption: (option: boolean) => void;
21
21
  export declare const loadEditorShowGuidesOption: () => boolean;
@@ -0,0 +1,8 @@
1
+ type State = {
2
+ editorSnapping: boolean;
3
+ setEditorSnapping: (cb: (prevState: boolean) => boolean) => void;
4
+ };
5
+ export declare const persistEditorSnappingOption: (option: boolean) => void;
6
+ export declare const loadEditorSnappingOption: () => boolean;
7
+ export declare const EditorSnappingContext: import("react").Context<State>;
8
+ export {};
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EditorSnappingContext = exports.loadEditorSnappingOption = exports.persistEditorSnappingOption = void 0;
4
+ const react_1 = require("react");
5
+ const key = 'remotion.editorSnapping';
6
+ const persistEditorSnappingOption = (option) => {
7
+ localStorage.setItem(key, String(option));
8
+ };
9
+ exports.persistEditorSnappingOption = persistEditorSnappingOption;
10
+ const loadEditorSnappingOption = () => {
11
+ const item = localStorage.getItem(key);
12
+ return item !== 'false';
13
+ };
14
+ exports.loadEditorSnappingOption = loadEditorSnappingOption;
15
+ exports.EditorSnappingContext = (0, react_1.createContext)({
16
+ editorSnapping: true,
17
+ setEditorSnapping: () => undefined,
18
+ });
@@ -1,7 +1,7 @@
1
1
  import type { AudioCodec, ChromeMode, Codec, ColorSpace, LogLevel, OpenGlRenderer, PixelFormat, StillImageFormat, VideoImageFormat, X264Preset } from '@remotion/renderer';
2
2
  import type { HardwareAccelerationOption } from '@remotion/renderer/client';
3
3
  import type { PackageManager, RenderDefaults } from '@remotion/studio-shared';
4
- import type { RenderStillOnWebImageFormat, WebRendererAudioCodec, WebRendererContainer, WebRendererHardwareAcceleration, WebRendererQuality, WebRendererVideoCodec } from '@remotion/web-renderer';
4
+ import type { RenderStillOnWebImageFormat, WebRendererAudioCodec, WebRendererContainer, WebRendererHardwareAcceleration, WebRendererPageResponsiveness, WebRendererQuality, WebRendererVideoCodec } from '@remotion/web-renderer';
5
5
  import type React from 'react';
6
6
  import type { SequencePropsSubscriptionKey, _InternalTypes } from 'remotion';
7
7
  import type { CompType } from '../components/NewComposition/DuplicateComposition';
@@ -33,6 +33,7 @@ export type WebRenderModalState = {
33
33
  initialLicenseKey: string | null;
34
34
  initialMediaCacheSizeInBytes: number | null;
35
35
  initialAllowHtmlInCanvas: boolean;
36
+ initialPageResponsiveness: WebRendererPageResponsiveness;
36
37
  };
37
38
  export type RenderModalState = {
38
39
  type: 'server-render';
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.486",
6
+ "version": "4.0.487",
7
7
  "description": "APIs for interacting with the Remotion Studio",
8
8
  "main": "dist",
9
9
  "scripts": {
@@ -25,17 +25,17 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "semver": "7.5.3",
28
- "remotion": "4.0.486",
29
- "@remotion/canvas-capture": "4.0.486",
30
- "@remotion/player": "4.0.486",
31
- "@remotion/media-utils": "4.0.486",
32
- "@remotion/renderer": "4.0.486",
33
- "@remotion/web-renderer": "4.0.486",
34
- "@remotion/studio-shared": "4.0.486",
35
- "@remotion/timeline-utils": "4.0.486",
36
- "@remotion/zod-types": "4.0.486",
28
+ "remotion": "4.0.487",
29
+ "@remotion/canvas-capture": "4.0.487",
30
+ "@remotion/player": "4.0.487",
31
+ "@remotion/media-utils": "4.0.487",
32
+ "@remotion/renderer": "4.0.487",
33
+ "@remotion/web-renderer": "4.0.487",
34
+ "@remotion/studio-shared": "4.0.487",
35
+ "@remotion/timeline-utils": "4.0.487",
36
+ "@remotion/zod-types": "4.0.487",
37
37
  "@jridgewell/trace-mapping": "0.3.31",
38
- "mediabunny": "1.50.3",
38
+ "mediabunny": "1.50.7",
39
39
  "memfs": "3.4.3",
40
40
  "open": "8.4.2",
41
41
  "zod": "4.3.6"
@@ -44,7 +44,7 @@
44
44
  "react": "19.2.3",
45
45
  "react-dom": "19.2.3",
46
46
  "@types/semver": "7.5.3",
47
- "@remotion/eslint-config-internal": "4.0.486",
47
+ "@remotion/eslint-config-internal": "4.0.487",
48
48
  "eslint": "9.19.0",
49
49
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
50
50
  },