@remotion/studio 4.0.490 → 4.0.491

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 (76) hide show
  1. package/dist/components/Canvas.js +1 -0
  2. package/dist/components/CurrentComposition.js +4 -1
  3. package/dist/components/EditorContent.js +1 -1
  4. package/dist/components/GlobalKeybindings.d.ts +1 -3
  5. package/dist/components/GlobalKeybindings.js +2 -9
  6. package/dist/components/InspectorLocationCopy.d.ts +7 -0
  7. package/dist/components/InspectorLocationCopy.js +65 -0
  8. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +4 -3
  9. package/dist/components/KeyboardShortcutsExplainer.js +4 -0
  10. package/dist/components/OptionsPanel.js +4 -8
  11. package/dist/components/OutlineToggle.d.ts +3 -1
  12. package/dist/components/OutlineToggle.js +2 -2
  13. package/dist/components/PreviewToolbar.js +1 -1
  14. package/dist/components/RenderButton.js +9 -33
  15. package/dist/components/RenderModal/WebRenderModal.js +3 -8
  16. package/dist/components/RenderModal/WebRenderModalAdvanced.d.ts +0 -2
  17. package/dist/components/RenderModal/WebRenderModalAdvanced.js +2 -9
  18. package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +0 -2
  19. package/dist/components/RenderQueue/client-side-render-types.d.ts +0 -1
  20. package/dist/components/RenderQueue/index.js +0 -9
  21. package/dist/components/SelectedOutlineElement.js +40 -38
  22. package/dist/components/SelectedOutlineOverlay.d.ts +1 -1
  23. package/dist/components/SelectedOutlineOverlay.js +2 -13
  24. package/dist/components/SnappingToggle.d.ts +3 -1
  25. package/dist/components/SnappingToggle.js +2 -2
  26. package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +20 -1
  27. package/dist/components/Timeline/TimelineClipboardKeybindings.js +301 -155
  28. package/dist/components/Timeline/TimelineEffectPropItem.js +7 -11
  29. package/dist/components/Timeline/TimelineFieldLabel.d.ts +1 -0
  30. package/dist/components/Timeline/TimelineFieldLabel.js +4 -2
  31. package/dist/components/Timeline/TimelineFieldRowContent.d.ts +8 -0
  32. package/dist/components/Timeline/TimelineFieldRowContent.js +16 -0
  33. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
  34. package/dist/components/Timeline/TimelineRowChrome.js +2 -0
  35. package/dist/components/Timeline/TimelineSequence.js +2 -4
  36. package/dist/components/Timeline/TimelineSequencePropItem.js +8 -10
  37. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +2 -0
  38. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +18 -6
  39. package/dist/components/Timeline/TimelineTextContentField.js +12 -5
  40. package/dist/components/Timeline/TimelineVideoInfo.d.ts +3 -1
  41. package/dist/components/Timeline/TimelineVideoInfo.js +11 -4
  42. package/dist/components/Timeline/delete-selected-timeline-item.js +4 -5
  43. package/dist/components/Timeline/effects-clipboard.d.ts +14 -0
  44. package/dist/components/Timeline/effects-clipboard.js +68 -0
  45. package/dist/components/Timeline/get-sequence-context-menu-items.js +37 -0
  46. package/dist/components/Timeline/get-timeline-media-start-frame.d.ts +6 -0
  47. package/dist/components/Timeline/get-timeline-media-start-frame.js +15 -0
  48. package/dist/components/Timeline/sequence-props-subscription-store.d.ts +3 -2
  49. package/dist/components/Timeline/sequence-props-subscription-store.js +4 -2
  50. package/dist/components/Timeline/timeline-field-row-layout.d.ts +1 -0
  51. package/dist/components/Timeline/timeline-field-row-layout.js +8 -1
  52. package/dist/components/Timeline/timeline-row-layout.d.ts +1 -1
  53. package/dist/components/Timeline/timeline-row-layout.js +1 -1
  54. package/dist/components/Timeline/use-sequence-props-subscription.js +10 -1
  55. package/dist/components/import-assets.d.ts +4 -0
  56. package/dist/components/import-assets.js +9 -2
  57. package/dist/components/selected-outline-measurement.d.ts +4 -0
  58. package/dist/components/selected-outline-measurement.js +3 -1
  59. package/dist/components/selected-outline-types.d.ts +1 -6
  60. package/dist/esm/{chunk-16nwrbrm.js → chunk-9wh9k3jj.js} +7288 -7038
  61. package/dist/esm/index.mjs +0 -1
  62. package/dist/esm/internals.mjs +7288 -7038
  63. package/dist/esm/previewEntry.mjs +5948 -5698
  64. package/dist/esm/renderEntry.mjs +1 -1
  65. package/dist/helpers/format-file-location.d.ts +5 -0
  66. package/dist/helpers/format-file-location.js +9 -1
  67. package/dist/helpers/retry-payload.js +0 -1
  68. package/dist/helpers/studio-runtime-config.d.ts +0 -1
  69. package/dist/helpers/studio-runtime-config.js +1 -6
  70. package/dist/helpers/use-menu-structure.js +15 -18
  71. package/dist/state/modals.d.ts +0 -1
  72. package/package.json +11 -11
  73. package/dist/components/RenderModal/WebRendererExperimentalBadge.d.ts +0 -1
  74. package/dist/components/RenderModal/WebRendererExperimentalBadge.js +0 -35
  75. package/dist/helpers/show-browser-rendering.d.ts +0 -1
  76. package/dist/helpers/show-browser-rendering.js +0 -5
@@ -636,6 +636,7 @@ const Canvas = ({ canvasContent, size }) => {
636
636
  canInstall: canInstallElements,
637
637
  lastFocusedAt: lastFocusedAtRef.current,
638
638
  readOnly: window.remotion_isReadOnlyStudio,
639
+ studioUrl: window.location.href,
639
640
  }).catch(() => undefined);
640
641
  }, [
641
642
  canInstallElements,
@@ -12,6 +12,7 @@ const video_1 = require("../icons/video");
12
12
  const render_frame_1 = require("../state/render-frame");
13
13
  const InlineCompositionName_1 = require("./InlineCompositionName");
14
14
  const InspectorInfoHeader_1 = require("./InspectorInfoHeader");
15
+ const InspectorLocationCopy_1 = require("./InspectorLocationCopy");
15
16
  const InspectorSourceLocation_1 = require("./InspectorSourceLocation");
16
17
  const NotificationCenter_1 = require("./Notifications/NotificationCenter");
17
18
  const use_resolved_stack_1 = require("./Timeline/use-resolved-stack");
@@ -86,6 +87,8 @@ const CurrentComposition = () => {
86
87
  return (0, is_composition_still_1.isCompositionStill)(video) ? (jsx_runtime_1.jsx(still_1.StillIcon, { color: color, style: sourceLocationIconStyle })) : (jsx_runtime_1.jsx(video_1.FilmIcon, { color: color, style: sourceLocationIconStyle }));
87
88
  }, [video]);
88
89
  return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { children: video ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
89
- jsx_runtime_1.jsx(InlineCompositionName_1.InlineCompositionName, { compositionId: video.id, stack: (_e = currentComposition === null || currentComposition === void 0 ? void 0 : currentComposition.stack) !== null && _e !== void 0 ? _e : null, compositions: compositions }, video.id), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: validatedLocation, canOpen: validatedLocation !== null, onOpen: openFileLocation, renderIcon: renderCompositionIcon }), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: componentLocation, canOpen: componentLocation !== null, onOpen: openComponentLocation, renderIcon: renderReactIcon }), jsx_runtime_1.jsxs(InspectorInfoHeader_1.InspectorInfoSubtitle, { children: [video.width, "x", video.height, (0, is_composition_still_1.isCompositionStill)(video) ? null : `, ${video.fps} FPS`] }), (0, is_composition_still_1.isCompositionStill)(video) ? (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoSubtitle, { children: "Still" })) : (jsx_runtime_1.jsxs(InspectorInfoHeader_1.InspectorInfoSubtitle, { children: ["Duration ", (0, render_frame_1.renderFrame)(video.durationInFrames, video.fps)] }))] })) : null }));
90
+ jsx_runtime_1.jsxs(InspectorLocationCopy_1.InspectorLocationCopy, { location: validatedLocation, name: video.id, children: [
91
+ jsx_runtime_1.jsx(InlineCompositionName_1.InlineCompositionName, { compositionId: video.id, stack: (_e = currentComposition === null || currentComposition === void 0 ? void 0 : currentComposition.stack) !== null && _e !== void 0 ? _e : null, compositions: compositions }, video.id), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: validatedLocation, canOpen: validatedLocation !== null, onOpen: openFileLocation, renderIcon: renderCompositionIcon }), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: componentLocation, canOpen: componentLocation !== null, onOpen: openComponentLocation, renderIcon: renderReactIcon })
92
+ ] }), jsx_runtime_1.jsxs(InspectorInfoHeader_1.InspectorInfoSubtitle, { children: [video.width, "x", video.height, (0, is_composition_still_1.isCompositionStill)(video) ? null : `, ${video.fps} FPS`] }), (0, is_composition_still_1.isCompositionStill)(video) ? (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoSubtitle, { children: "Still" })) : (jsx_runtime_1.jsxs(InspectorInfoHeader_1.InspectorInfoSubtitle, { children: ["Duration ", (0, render_frame_1.renderFrame)(video.durationInFrames, video.fps)] }))] })) : null }));
90
93
  };
91
94
  exports.CurrentComposition = CurrentComposition;
@@ -39,7 +39,7 @@ const EditorContent = ({ readOnlyStudio, children }) => {
39
39
  jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: children }), jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "none", onCollapse: noop }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: showTimeline ? jsx_runtime_1.jsx(Timeline_1.Timeline, {}) : jsx_runtime_1.jsx(TimelineEmptyState_1.TimelineEmptyState, {}) })
40
40
  ] }));
41
41
  return (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionProvider, { children: jsx_runtime_1.jsxs(StudioClearSelectionArea, { children: [
42
- jsx_runtime_1.jsx(InitialCompositionLoader_1.InitialCompositionLoader, {}), jsx_runtime_1.jsx(MenuToolbar_1.MenuToolbar, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(GlobalKeybindings_1.GlobalKeybindings, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(TimelineKeyframeDragState_1.TimelineKeyframeDragStateProvider, { children: content })
42
+ jsx_runtime_1.jsx(InitialCompositionLoader_1.InitialCompositionLoader, {}), jsx_runtime_1.jsx(MenuToolbar_1.MenuToolbar, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(GlobalKeybindings_1.GlobalKeybindings, {}), jsx_runtime_1.jsx(TimelineKeyframeDragState_1.TimelineKeyframeDragStateProvider, { children: content })
43
43
  ] }) }));
44
44
  };
45
45
  exports.EditorContent = EditorContent;
@@ -1,4 +1,2 @@
1
1
  import type React from 'react';
2
- export declare const GlobalKeybindings: React.FC<{
3
- readonly readOnlyStudio: boolean;
4
- }>;
2
+ export declare const GlobalKeybindings: React.FC;
@@ -4,8 +4,6 @@ exports.GlobalKeybindings = void 0;
4
4
  const react_1 = require("react");
5
5
  const remotion_1 = require("remotion");
6
6
  const calculate_timeline_1 = require("../helpers/calculate-timeline");
7
- const client_id_1 = require("../helpers/client-id");
8
- const show_browser_rendering_1 = require("../helpers/show-browser-rendering");
9
7
  const studio_runtime_config_1 = require("../helpers/studio-runtime-config");
10
8
  const timeline_node_path_key_1 = require("../helpers/timeline-node-path-key");
11
9
  const use_keybinding_1 = require("../helpers/use-keybinding");
@@ -23,7 +21,7 @@ const sequencePropShortcuts = {
23
21
  t: 'style.opacity',
24
22
  };
25
23
  const hasOwnProperty = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key);
26
- const GlobalKeybindings = ({ readOnlyStudio }) => {
24
+ const GlobalKeybindings = () => {
27
25
  const keybindings = (0, use_keybinding_1.useKeybinding)();
28
26
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
29
27
  const { setCheckerboard } = (0, react_1.useContext)(checkerboard_1.CheckerboardContext);
@@ -32,7 +30,6 @@ const GlobalKeybindings = ({ readOnlyStudio }) => {
32
30
  const { sequences } = (0, react_1.useContext)(remotion_1.Internals.SequenceManager);
33
31
  const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
34
32
  const { overrideIdToNodePathMappings } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsGettersContext);
35
- const { type } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx).previewServerState;
36
33
  const { navigateToNextComposition, navigateToPreviousComposition } = (0, CompositionSelector_1.useCompositionNavigation)();
37
34
  const video = remotion_1.Internals.useVideo();
38
35
  const timeline = (0, react_1.useMemo)(() => {
@@ -81,13 +78,9 @@ const GlobalKeybindings = ({ readOnlyStudio }) => {
81
78
  if (!video) {
82
79
  return;
83
80
  }
84
- if (type !== 'connected' && !show_browser_rendering_1.SHOW_BROWSER_RENDERING && !readOnlyStudio) {
85
- (0, NotificationCenter_1.showNotification)('Studio server is offline', 2000);
86
- return;
87
- }
88
81
  const renderButton = document.getElementById('render-modal-button');
89
82
  renderButton.click();
90
- }, [readOnlyStudio, type, video]);
83
+ }, [video]);
91
84
  (0, react_1.useEffect)(() => {
92
85
  const onSequencePropKey = (event) => {
93
86
  const key = event.key.toLowerCase();
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { OriginalPosition } from '../error-overlay/react-overlay/utils/get-source-map';
3
+ export declare const InspectorLocationCopy: React.FC<{
4
+ readonly children: React.ReactNode;
5
+ readonly location: OriginalPosition | null;
6
+ readonly name: string | null;
7
+ }>;
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InspectorLocationCopy = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const format_file_location_1 = require("../helpers/format-file-location");
7
+ const clipboard_1 = require("../icons/clipboard");
8
+ const InlineAction_1 = require("./InlineAction");
9
+ const NotificationCenter_1 = require("./Notifications/NotificationCenter");
10
+ const row = {
11
+ alignItems: 'center',
12
+ display: 'flex',
13
+ flexDirection: 'row',
14
+ minWidth: 0,
15
+ width: '100%',
16
+ };
17
+ const content = {
18
+ display: 'flex',
19
+ flex: 1,
20
+ flexDirection: 'column',
21
+ minWidth: 0,
22
+ overflow: 'hidden',
23
+ };
24
+ const action = {
25
+ flexShrink: 0,
26
+ height: 24,
27
+ marginLeft: 4,
28
+ marginRight: -4,
29
+ };
30
+ const icon = {
31
+ flexShrink: 0,
32
+ height: 12,
33
+ width: 12,
34
+ };
35
+ const InspectorLocationCopy = ({ children, location, name }) => {
36
+ const [hovered, setHovered] = (0, react_1.useState)(false);
37
+ const [focusedWithin, setFocusedWithin] = (0, react_1.useState)(false);
38
+ const textToCopy = (0, react_1.useMemo)(() => {
39
+ return (0, format_file_location_1.formatLocationForAgents)({
40
+ location,
41
+ name,
42
+ root: window.remotion_cwd,
43
+ });
44
+ }, [location, name]);
45
+ const renderCopyAction = (0, react_1.useCallback)((color) => {
46
+ return jsx_runtime_1.jsx(clipboard_1.ClipboardIcon, { style: icon, color: color });
47
+ }, []);
48
+ const onCopy = (0, react_1.useCallback)((event) => {
49
+ event.stopPropagation();
50
+ if (!textToCopy) {
51
+ return;
52
+ }
53
+ navigator.clipboard.writeText(textToCopy).catch((err) => {
54
+ (0, NotificationCenter_1.showNotification)(`Could not copy to clipboard: ${err.message}`, 2000);
55
+ });
56
+ }, [textToCopy]);
57
+ const showAction = hovered || focusedWithin;
58
+ return (jsx_runtime_1.jsxs("div", { style: row, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), onFocus: () => setFocusedWithin(true), onBlur: () => setFocusedWithin(false), children: [
59
+ jsx_runtime_1.jsx("div", { style: content, children: children }), textToCopy ? (jsx_runtime_1.jsx("div", { style: {
60
+ ...action,
61
+ opacity: showAction ? 1 : 0,
62
+ pointerEvents: showAction ? 'auto' : 'none',
63
+ }, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: onCopy, renderAction: renderCopyAction, title: "Copy location for agents" }) })) : null] }));
64
+ };
65
+ exports.InspectorLocationCopy = InspectorLocationCopy;
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const client_id_1 = require("../../helpers/client-id");
7
7
  const InlineEditableTitle_1 = require("../InlineEditableTitle");
8
+ const InspectorLocationCopy_1 = require("../InspectorLocationCopy");
8
9
  const InspectorSourceLocation_1 = require("../InspectorSourceLocation");
9
10
  const use_open_sequence_in_editor_1 = require("../Timeline/use-open-sequence-in-editor");
10
11
  const use_rename_sequence_1 = require("../Timeline/use-rename-sequence");
@@ -66,9 +67,9 @@ const SequenceInspectorHeader = ({ sourceLocation, track }) => {
66
67
  const onRename = (0, react_1.useCallback)((newName) => {
67
68
  saveName(newName).catch(() => undefined);
68
69
  }, [saveName]);
69
- return (jsx_runtime_1.jsxs("div", { style: styles_1.sequenceHeader, children: [
70
- jsx_runtime_1.jsx("div", { style: styles_1.sequenceHeaderTitle, children: jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: sequenceDisplayName, canRename: canRename, onCommit: onRename }) }), documentationLink ? (jsx_runtime_1.jsx("button", { type: "button", style: subtitleStyle, title: "Open component docs", onClick: openDocumentationLink, children: componentName })) : (jsx_runtime_1.jsx("div", { style: subtitleStyle, children: componentName })), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: sourceLocation.validatedLocation, canOpen: sourceLocation.canOpenInEditor, onOpen: sourceLocation.openFileLocation })
71
- ] }));
70
+ return (jsx_runtime_1.jsx("div", { style: styles_1.sequenceHeader, children: jsx_runtime_1.jsxs(InspectorLocationCopy_1.InspectorLocationCopy, { location: sourceLocation.validatedLocation, name: componentName !== null && componentName !== void 0 ? componentName : null, children: [
71
+ jsx_runtime_1.jsx("div", { style: styles_1.sequenceHeaderTitle, children: jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: sequenceDisplayName, canRename: canRename, onCommit: onRename }) }), documentationLink ? (jsx_runtime_1.jsx("button", { type: "button", style: subtitleStyle, title: "Open component docs", onClick: openDocumentationLink, children: componentName })) : (jsx_runtime_1.jsx("div", { style: subtitleStyle, children: componentName })), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: sourceLocation.validatedLocation, canOpen: sourceLocation.canOpenInEditor, onOpen: sourceLocation.openFileLocation })
72
+ ] }) }));
72
73
  };
73
74
  exports.SequenceInspectorHeader = SequenceInspectorHeader;
74
75
  const SequenceInspectorHeaderWithDivider = ({ track }) => {
@@ -167,6 +167,10 @@ const KeyboardShortcutsExplainer = () => {
167
167
  jsx_runtime_1.jsxs("div", { style: left, children: [
168
168
  jsx_runtime_1.jsx("kbd", { style: key, children: ShortcutHint_1.cmdOrCtrlCharacter }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.3 }), jsx_runtime_1.jsx("kbd", { style: key, children: "C" })
169
169
  ] }), jsx_runtime_1.jsx("div", { style: right, children: "Copy effects / values" })
170
+ ] }), jsx_runtime_1.jsxs(layout_1.Row, { align: "center", children: [
171
+ jsx_runtime_1.jsxs("div", { style: left, children: [
172
+ jsx_runtime_1.jsx("kbd", { style: key, children: ShortcutHint_1.cmdOrCtrlCharacter }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.3 }), jsx_runtime_1.jsx("kbd", { style: key, children: "X" })
173
+ ] }), jsx_runtime_1.jsx("div", { style: right, children: "Cut effects" })
170
174
  ] }), jsx_runtime_1.jsxs(layout_1.Row, { align: "center", children: [
171
175
  jsx_runtime_1.jsxs("div", { style: left, children: [
172
176
  jsx_runtime_1.jsx("kbd", { style: key, children: ShortcutHint_1.cmdOrCtrlCharacter }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.3 }), jsx_runtime_1.jsx("kbd", { style: key, children: "V" })
@@ -6,7 +6,6 @@ const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
7
  const colors_1 = require("../helpers/colors");
8
8
  const mobile_layout_1 = require("../helpers/mobile-layout");
9
- const show_browser_rendering_1 = require("../helpers/show-browser-rendering");
10
9
  const get_zod_if_possible_1 = require("./get-zod-if-possible");
11
10
  const InspectorPanel_1 = require("./InspectorPanel");
12
11
  const NotificationCenter_1 = require("./Notifications/NotificationCenter");
@@ -19,10 +18,7 @@ const actions_1 = require("./RenderQueue/actions");
19
18
  const RendersTab_1 = require("./RendersTab");
20
19
  const Tabs_1 = require("./Tabs");
21
20
  const localStorageKey = 'remotion.sidebarPanel';
22
- const getSelectedPanel = (renderingAvailable) => {
23
- if (!renderingAvailable) {
24
- return 'inspector';
25
- }
21
+ const getSelectedPanel = () => {
26
22
  const panel = localStorage.getItem(localStorageKey);
27
23
  if (panel === 'renders') {
28
24
  return 'renders';
@@ -38,7 +34,6 @@ const persistSelectedOptionsSidebarPanel = (panel) => {
38
34
  exports.persistSelectedOptionsSidebarPanel = persistSelectedOptionsSidebarPanel;
39
35
  const OptionsPanel = ({ readOnlyStudio }) => {
40
36
  const { props, updateProps } = (0, react_1.useContext)(remotion_1.Internals.EditorPropsContext);
41
- const renderingAvailable = !readOnlyStudio || show_browser_rendering_1.SHOW_BROWSER_RENDERING;
42
37
  const isMobileLayout = (0, mobile_layout_1.useMobileLayout)();
43
38
  const container = (0, react_1.useMemo)(() => ({
44
39
  height: '100%',
@@ -48,7 +43,7 @@ const OptionsPanel = ({ readOnlyStudio }) => {
48
43
  flexDirection: 'column',
49
44
  flex: 1,
50
45
  }), [isMobileLayout]);
51
- const [panel, setPanel] = (0, react_1.useState)(() => getSelectedPanel(renderingAvailable));
46
+ const [panel, setPanel] = (0, react_1.useState)(getSelectedPanel);
52
47
  const onInspectorSelected = (0, react_1.useCallback)(() => {
53
48
  setPanel('inspector');
54
49
  (0, exports.persistSelectedOptionsSidebarPanel)('inspector');
@@ -181,6 +176,7 @@ const OptionsPanel = ({ readOnlyStudio }) => {
181
176
  }, []);
182
177
  return (jsx_runtime_1.jsxs("div", { style: container, className: "css-reset", onPointerDown: onPointerDown, children: [
183
178
  jsx_runtime_1.jsx("div", { style: tabsContainer, children: jsx_runtime_1.jsxs(Tabs_1.Tabs, { children: [
184
- jsx_runtime_1.jsxs(Tabs_1.Tab, { selected: panel === 'inspector', onClick: onInspectorSelected, style: { justifyContent: 'space-between' }, children: ["Inspector", hasLocalModifications ? (jsx_runtime_1.jsx(SchemaResetButton_1.SchemaResetButton, { onClick: resetToOriginal })) : null] }), renderingAvailable ? (jsx_runtime_1.jsx(RendersTab_1.RendersTab, { onClick: onRendersSelected, selected: panel === 'renders' })) : null] }) }), panel === 'inspector' ? (jsx_runtime_1.jsx(InspectorPanel_1.InspectorPanel, { composition: composition, currentDefaultProps: currentDefaultProps, readOnlyStudio: readOnlyStudio, setDefaultProps: setDefaultProps })) : !renderingAvailable ? null : (jsx_runtime_1.jsx(RenderQueue_1.RenderQueue, {}))] }));
179
+ jsx_runtime_1.jsxs(Tabs_1.Tab, { selected: panel === 'inspector', onClick: onInspectorSelected, style: { justifyContent: 'space-between' }, children: ["Inspector", hasLocalModifications ? (jsx_runtime_1.jsx(SchemaResetButton_1.SchemaResetButton, { onClick: resetToOriginal })) : null] }), jsx_runtime_1.jsx(RendersTab_1.RendersTab, { onClick: onRendersSelected, selected: panel === 'renders' })
180
+ ] }) }), panel === 'inspector' ? (jsx_runtime_1.jsx(InspectorPanel_1.InspectorPanel, { composition: composition, currentDefaultProps: currentDefaultProps, readOnlyStudio: readOnlyStudio, setDefaultProps: setDefaultProps })) : (jsx_runtime_1.jsx(RenderQueue_1.RenderQueue, {}))] }));
185
181
  };
186
182
  exports.OptionsPanel = OptionsPanel;
@@ -1,2 +1,4 @@
1
1
  import React from 'react';
2
- export declare const OutlineToggle: React.FC;
2
+ export declare const OutlineToggle: React.FC<{
3
+ readonly disabled: boolean;
4
+ }>;
@@ -6,7 +6,7 @@ const react_1 = require("react");
6
6
  const colors_1 = require("../helpers/colors");
7
7
  const editor_outlines_1 = require("../state/editor-outlines");
8
8
  const ControlButton_1 = require("./ControlButton");
9
- const OutlineToggle = () => {
9
+ const OutlineToggle = ({ disabled }) => {
10
10
  const { editorShowOutlines, setEditorShowOutlines } = (0, react_1.useContext)(editor_outlines_1.EditorShowOutlinesContext);
11
11
  const onClick = (0, react_1.useCallback)(() => {
12
12
  setEditorShowOutlines((current) => !current);
@@ -15,6 +15,6 @@ const OutlineToggle = () => {
15
15
  const accessibilityLabel = editorShowOutlines
16
16
  ? 'Hide outlines'
17
17
  : 'Show outlines';
18
- return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: jsx_runtime_1.jsx("svg", { style: { width: 18, height: 18 }, viewBox: "0 0 512 512", fill: color, "aria-hidden": "true", focusable: "false", children: jsx_runtime_1.jsx("path", { d: "M32 119.4C12.9 108.4 0 87.7 0 64 0 28.7 28.7 0 64 0 87.7 0 108.4 12.9 119.4 32l273.1 0c11.1-19.1 31.7-32 55.4-32 35.3 0 64 28.7 64 64 0 23.7-12.9 44.4-32 55.4l0 273.1c19.1 11.1 32 31.7 32 55.4 0 35.3-28.7 64-64 64-23.7 0-44.4-12.9-55.4-32l-273.1 0c-11.1 19.1-31.7 32-55.4 32-35.3 0-64-28.7-64-64 0-23.7 12.9-44.4 32-55.4l0-273.1zm64 0l0 273.1c9.7 5.6 17.8 13.7 23.4 23.4l273.1 0c5.6-9.7 13.7-17.8 23.4-23.4l0-273.1c-9.7-5.6-17.8-13.7-23.4-23.4L119.4 96c-5.6 9.7-13.7 17.8-23.4 23.4z" }) }) }));
18
+ return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, disabled: disabled, onClick: onClick, children: jsx_runtime_1.jsx("svg", { style: { width: 18, height: 18 }, viewBox: "0 0 512 512", fill: color, "aria-hidden": "true", focusable: "false", children: jsx_runtime_1.jsx("path", { d: "M32 119.4C12.9 108.4 0 87.7 0 64 0 28.7 28.7 0 64 0 87.7 0 108.4 12.9 119.4 32l273.1 0c11.1-19.1 31.7-32 55.4-32 35.3 0 64 28.7 64 64 0 23.7-12.9 44.4-32 55.4l0 273.1c19.1 11.1 32 31.7 32 55.4 0 35.3-28.7 64-64 64-23.7 0-44.4-12.9-55.4-32l-273.1 0c-11.1 19.1-31.7 32-55.4 32-35.3 0-64-28.7-64-64 0-23.7 12.9-44.4 32-55.4l0-273.1zm64 0l0 273.1c9.7 5.6 17.8 13.7 23.4 23.4l273.1 0c5.6-9.7 13.7-17.8 23.4-23.4l0-273.1c-9.7-5.6-17.8-13.7-23.4-23.4L119.4 96c-5.6 9.7-13.7 17.8-23.4 23.4z" }) }) }));
19
19
  };
20
20
  exports.OutlineToggle = OutlineToggle;
@@ -166,7 +166,7 @@ const PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
166
166
  ] }), jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(SizeSelector_1.SizeSelector, {}) }), isStill || isVideoComposition ? (jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(PlaybackRateSelector_1.PlaybackRateSelector, { setPlaybackRate: setPlaybackRate, playbackRate: playbackRate }) })) : null] })), isVideoComposition ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
167
167
  jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(PlayPause_1.PlayPause, { bufferStateDelayInMilliseconds: bufferStateDelayInMilliseconds, loop: loop, playbackRate: playbackRate, muted: playerMuted }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(LoopToggle_1.LoopToggle, { loop: loop, setLoop: setLoop }) }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(MuteToggle_1.MuteToggle, { muted: playerMuted, setMuted: setPlayerMuted }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(TimelineInOutToggle_1.TimelineInOutPointToggle, {}) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 })
168
168
  ] })) : null, (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition' ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
169
- jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(CheckboardToggle_1.CheckboardToggle, {}) }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(OutlineToggle_1.OutlineToggle, {}) }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(SnappingToggle_1.SnappingToggle, {}) })
169
+ jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(CheckboardToggle_1.CheckboardToggle, {}) }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(OutlineToggle_1.OutlineToggle, { disabled: readOnlyStudio }) }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(SnappingToggle_1.SnappingToggle, { disabled: readOnlyStudio }) })
170
170
  ] })) : null, jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), canvasContent && isFullscreenSupported ? (jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(FullscreenToggle_1.FullScreenToggle, {}) })) : null, jsx_runtime_1.jsx(layout_1.Flex, {}), isMobileLayout && (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
171
171
  jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(SizeSelector_1.SizeSelector, {}) }), isStill || isVideoComposition ? (jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(PlaybackRateSelector_1.PlaybackRateSelector, { setPlaybackRate: setPlaybackRate, playbackRate: playbackRate }) })) : null] })), jsx_runtime_1.jsxs("div", { style: sideContainer, children: [
172
172
  jsx_runtime_1.jsx(layout_1.Flex, {}), !isMobileLayout && jsx_runtime_1.jsx(FpsCounter_1.FpsCounter, { playbackSpeed: playbackRate }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(RenderButton_1.RenderButton, { readOnlyStudio: readOnlyStudio }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1.5 })
@@ -11,7 +11,6 @@ const react_dom_1 = __importDefault(require("react-dom"));
11
11
  const remotion_1 = require("remotion");
12
12
  const client_id_1 = require("../helpers/client-id");
13
13
  const colors_1 = require("../helpers/colors");
14
- const show_browser_rendering_1 = require("../helpers/show-browser-rendering");
15
14
  const use_keybinding_1 = require("../helpers/use-keybinding");
16
15
  const caret_1 = require("../icons/caret");
17
16
  const render_1 = require("../icons/render");
@@ -72,9 +71,6 @@ const label = {
72
71
  };
73
72
  const RENDER_TYPE_STORAGE_KEY = 'remotion.renderType';
74
73
  const getInitialRenderType = (readOnlyStudio) => {
75
- if (!show_browser_rendering_1.SHOW_BROWSER_RENDERING) {
76
- return readOnlyStudio ? 'render-command' : 'server-render';
77
- }
78
74
  if (readOnlyStudio) {
79
75
  return 'client-render';
80
76
  }
@@ -139,30 +135,21 @@ const RenderButton = ({ readOnlyStudio, }) => {
139
135
  const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
140
136
  .previewServerState.type;
141
137
  const canServerRender = connectionStatus === 'connected';
142
- const canRender = canServerRender || show_browser_rendering_1.SHOW_BROWSER_RENDERING || readOnlyStudio;
143
138
  const renderType = (0, react_1.useMemo)(() => {
144
139
  if (readOnlyStudio) {
145
- if (!show_browser_rendering_1.SHOW_BROWSER_RENDERING) {
146
- return 'render-command';
147
- }
148
140
  return preferredRenderType === 'render-command'
149
141
  ? 'render-command'
150
142
  : 'client-render';
151
143
  }
152
- if (connectionStatus === 'disconnected' && show_browser_rendering_1.SHOW_BROWSER_RENDERING) {
144
+ if (connectionStatus === 'disconnected') {
153
145
  return 'client-render';
154
146
  }
155
- if (!show_browser_rendering_1.SHOW_BROWSER_RENDERING) {
156
- return 'server-render';
157
- }
158
147
  return preferredRenderType;
159
148
  }, [connectionStatus, preferredRenderType, readOnlyStudio]);
160
149
  const shortcut = (0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? '' : '(R)';
161
150
  const tooltip = renderType === 'render-command'
162
151
  ? 'Copy a CLI command to render this composition ' + shortcut
163
- : canRender
164
- ? 'Export the current composition ' + shortcut
165
- : 'Connect to the Studio server to render';
152
+ : 'Export the current composition ' + shortcut;
166
153
  const iconStyle = (0, react_1.useMemo)(() => {
167
154
  return {
168
155
  style: {
@@ -270,7 +257,6 @@ const RenderButton = ({ readOnlyStudio, }) => {
270
257
  initialTransparent: null,
271
258
  initialMuted: null,
272
259
  initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes,
273
- initialAllowHtmlInCanvas: defaults.allowHtmlInCanvas,
274
260
  initialPageResponsiveness: 'medium',
275
261
  });
276
262
  }, [video, setSelectedModal, getCurrentFrame, props, inFrame, outFrame]);
@@ -279,7 +265,7 @@ const RenderButton = ({ readOnlyStudio, }) => {
279
265
  openServerRenderModal(true);
280
266
  return;
281
267
  }
282
- if (!show_browser_rendering_1.SHOW_BROWSER_RENDERING || renderType === 'server-render') {
268
+ if (renderType === 'server-render') {
283
269
  openServerRenderModal(false);
284
270
  }
285
271
  else {
@@ -399,34 +385,24 @@ const RenderButton = ({ readOnlyStudio, }) => {
399
385
  return {
400
386
  ...splitButtonContainer,
401
387
  borderColor: colors_1.BLACK_ALPHA_60,
402
- opacity: canRender ? 1 : 0.7,
403
- cursor: canRender ? 'pointer' : 'inherit',
388
+ opacity: 1,
389
+ cursor: 'pointer',
404
390
  };
405
- }, [canRender]);
391
+ }, []);
406
392
  const renderLabel = renderType === 'server-render'
407
393
  ? 'Render'
408
394
  : renderType === 'render-command'
409
395
  ? 'Render via CLI'
410
396
  : 'Render on web';
411
- const shouldShowDropdown = (0, react_1.useMemo)(() => {
412
- if (readOnlyStudio) {
413
- return show_browser_rendering_1.SHOW_BROWSER_RENDERING;
414
- }
415
- if (!show_browser_rendering_1.SHOW_BROWSER_RENDERING) {
416
- return false;
417
- }
418
- return true;
419
- }, [readOnlyStudio]);
420
397
  if (!video) {
421
398
  return null;
422
399
  }
423
400
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
424
401
  jsx_runtime_1.jsx("button", { style: { display: 'none' }, id: "render-modal-button-server", disabled: !canServerRender, onClick: () => openServerRenderModal(false), type: "button" }), ' ', jsx_runtime_1.jsx("button", { style: { display: 'none' }, id: "render-modal-button-client", onClick: openClientRenderModal, type: "button" }), jsx_runtime_1.jsxs("div", { ref: containerRef, style: containerStyle, title: tooltip, children: [
425
- jsx_runtime_1.jsx("button", { type: "button", style: mainButtonStyle, onClick: onClick, id: "render-modal-button", disabled: !canRender, children: jsx_runtime_1.jsxs(layout_1.Row, { align: "center", style: mainButtonContent, children: [
402
+ jsx_runtime_1.jsx("button", { type: "button", style: mainButtonStyle, onClick: onClick, id: "render-modal-button", children: jsx_runtime_1.jsxs(layout_1.Row, { align: "center", style: mainButtonContent, children: [
426
403
  jsx_runtime_1.jsx(render_1.ThinRenderIcon, { fill: colors_1.CURRENT_COLOR_LOWERCASE, svgProps: iconStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("span", { style: label, children: renderLabel })
427
- ] }) }), shouldShowDropdown ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
428
- jsx_runtime_1.jsx("div", { style: dividerStyle }), jsx_runtime_1.jsx("button", { ref: dropdownRef, type: "button", style: dropdownTriggerStyle, disabled: !readOnlyStudio && connectionStatus !== 'connected', className: is_menu_item_1.MENU_INITIATOR_CLASSNAME, onPointerDown: onPointerDown, onClick: onClickDropdown, children: jsx_runtime_1.jsx(caret_1.CaretDown, {}) })
429
- ] })) : null] }), portalStyle
404
+ ] }) }), jsx_runtime_1.jsx("div", { style: dividerStyle }), jsx_runtime_1.jsx("button", { ref: dropdownRef, type: "button", style: dropdownTriggerStyle, className: is_menu_item_1.MENU_INITIATOR_CLASSNAME, onPointerDown: onPointerDown, onClick: onClickDropdown, children: jsx_runtime_1.jsx(caret_1.CaretDown, {}) })
405
+ ] }), portalStyle
430
406
  ? react_dom_1.default.createPortal(jsx_runtime_1.jsx("div", { style: styles_1.fullScreenOverlay, children: jsx_runtime_1.jsx("div", { style: styles_1.outerPortal, className: "css-reset", children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onOutsideClick: onHideDropdown, onEscape: onHideDropdown, children: jsx_runtime_1.jsx("div", { style: portalStyle, onPointerDown: onMenuPointerDown, children: jsx_runtime_1.jsx(MenuContent_1.MenuContent, { onNextMenu: () => { }, onPreviousMenu: () => { }, values: dropdownValues, onHide: onHideDropdown, leaveLeftSpace: false, preselectIndex: dropdownValues.findIndex((v) => v.id === renderType), topItemCanBeUnselected: false, fixedHeight: derivedMaxHeight }) }) }) }) }), (0, portals_1.getPortal)(currentZIndex))
431
407
  : null] }));
432
408
  };
@@ -29,7 +29,6 @@ const render_modals_1 = require("./render-modals");
29
29
  const ResolveCompositionBeforeModal_1 = require("./ResolveCompositionBeforeModal");
30
30
  const use_encodable_audio_codecs_1 = require("./use-encodable-audio-codecs");
31
31
  const use_encodable_video_codecs_1 = require("./use-encodable-video-codecs");
32
- const WebRendererExperimentalBadge_1 = require("./WebRendererExperimentalBadge");
33
32
  const WebRenderModalAdvanced_1 = require("./WebRenderModalAdvanced");
34
33
  const WebRenderModalAudio_1 = require("./WebRenderModalAudio");
35
34
  const WebRenderModalBasic_1 = require("./WebRenderModalBasic");
@@ -81,7 +80,7 @@ const validateOutnameForStill = ({ outName, stillImageFormat, }) => {
81
80
  // TODO: Shortcut: Shift + R
82
81
  // TODO: Apply defaultCodec
83
82
  // TODO: Apply defaultOutName
84
- const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark, initialLogLevel, initialLicenseKey, initialStillImageFormat, initialDefaultOutName, initialScale, initialDelayRenderTimeout, initialMediaCacheSizeInBytes, initialContainer, initialVideoCodec, initialAudioCodec, initialAudioBitrate, initialVideoBitrate, initialHardwareAcceleration, initialKeyframeIntervalInSeconds, initialTransparent, initialMuted, initialAllowHtmlInCanvas, initialPageResponsiveness, }) => {
83
+ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark, initialLogLevel, initialLicenseKey, initialStillImageFormat, initialDefaultOutName, initialScale, initialDelayRenderTimeout, initialMediaCacheSizeInBytes, initialContainer, initialVideoCodec, initialAudioCodec, initialAudioBitrate, initialVideoBitrate, initialHardwareAcceleration, initialKeyframeIntervalInSeconds, initialTransparent, initialMuted, initialPageResponsiveness, }) => {
85
84
  var _a;
86
85
  const context = (0, react_1.useContext)(ResolveCompositionBeforeModal_1.ResolvedCompositionContext);
87
86
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
@@ -125,7 +124,6 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
125
124
  const [muted, setMuted] = (0, react_1.useState)(initialMuted !== null && initialMuted !== void 0 ? initialMuted : false);
126
125
  const [scale, setScale] = (0, react_1.useState)(initialScale !== null && initialScale !== void 0 ? initialScale : 1);
127
126
  const [licenseKey, setLicenseKey] = (0, react_1.useState)(initialLicenseKey);
128
- const [allowHtmlInCanvas, setAllowHtmlInCanvas] = (0, react_1.useState)(initialAllowHtmlInCanvas !== null && initialAllowHtmlInCanvas !== void 0 ? initialAllowHtmlInCanvas : false);
129
127
  const [pageResponsiveness, setPageResponsiveness] = (0, react_1.useState)(initialPageResponsiveness !== null && initialPageResponsiveness !== void 0 ? initialPageResponsiveness : 'medium');
130
128
  const encodableAudioCodecs = (0, use_encodable_audio_codecs_1.useEncodableAudioCodecs)(container);
131
129
  const encodableVideoCodecs = (0, use_encodable_video_codecs_1.useEncodableVideoCodecs)(container);
@@ -339,7 +337,6 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
339
337
  logLevel,
340
338
  licenseKey,
341
339
  scale,
342
- allowHtmlInCanvas,
343
340
  }, compositionRef);
344
341
  }
345
342
  else {
@@ -366,7 +363,6 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
366
363
  logLevel,
367
364
  licenseKey,
368
365
  scale,
369
- allowHtmlInCanvas,
370
366
  pageResponsiveness,
371
367
  }, compositionRef);
372
368
  }
@@ -408,14 +404,13 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
408
404
  addClientStillJob,
409
405
  addClientVideoJob,
410
406
  scale,
411
- allowHtmlInCanvas,
412
407
  pageResponsiveness,
413
408
  ]);
414
409
  return (jsx_runtime_1.jsxs("div", { style: render_modals_1.outerModalStyle, children: [
415
410
  jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: `Render ${resolvedComposition.id}` }), jsx_runtime_1.jsxs("div", { style: render_modals_1.container, children: [
416
411
  jsx_runtime_1.jsx(SegmentedControl_1.SegmentedControl, { items: renderTabOptions, needsWrapping: false }), jsx_runtime_1.jsx("div", { style: render_modals_1.flexer }), jsx_runtime_1.jsxs(Button_1.Button, { autoFocus: true, onClick: onAddToQueue, style: render_modals_1.buttonStyle, disabled: !outnameValidation.valid, children: ["Render ", renderMode, jsx_runtime_1.jsx(ShortcutHint_1.ShortcutHint, { keyToPress: "\u21B5", cmdOrCtrl: true })
417
412
  ] })
418
- ] }), jsx_runtime_1.jsx("div", { style: render_modals_1.container, children: jsx_runtime_1.jsx(WebRendererExperimentalBadge_1.WebRendererExperimentalBadge, {}) }), jsx_runtime_1.jsxs("div", { style: render_modals_1.horizontalLayout, children: [
413
+ ] }), jsx_runtime_1.jsxs("div", { style: render_modals_1.horizontalLayout, children: [
419
414
  jsx_runtime_1.jsxs("div", { style: render_modals_1.leftSidebar, children: [
420
415
  jsx_runtime_1.jsxs(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'general', onClick: () => setTab('general'), children: [
421
416
  jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(file_1.FileIcon, { style: render_modals_1.icon }) }),
@@ -434,7 +429,7 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
434
429
  canUpdate: false,
435
430
  reason: 'render dialogue',
436
431
  determined: false,
437
- } })) : tab === 'picture' ? (jsx_runtime_1.jsx(WebRenderModalPicture_1.WebRenderModalPicture, { renderMode: renderMode, videoBitrate: videoBitrate, setVideoBitrate: setVideoBitrate, keyframeIntervalInSeconds: keyframeIntervalInSeconds, setKeyframeIntervalInSeconds: setKeyframeIntervalInSeconds, transparent: transparent, setTransparent: setTransparent, scale: scale, setScale: setScale, compositionWidth: resolvedComposition.width, compositionHeight: resolvedComposition.height })) : tab === 'audio' ? (jsx_runtime_1.jsx(WebRenderModalAudio_1.WebRenderModalAudio, { renderMode: renderMode, muted: muted, setMuted: setMuted, audioCodec: audioCodec, setAudioCodec: setAudioCodec, audioBitrate: audioBitrate, setAudioBitrate: setAudioBitrate, container: container, encodableCodecs: encodableAudioCodecs, effectiveAudioCodec: effectiveAudioCodec })) : tab === 'advanced' ? (jsx_runtime_1.jsx(WebRenderModalAdvanced_1.WebRenderModalAdvanced, { renderMode: renderMode, delayRenderTimeout: delayRenderTimeout, setDelayRenderTimeout: setDelayRenderTimeout, mediaCacheSizeInBytes: mediaCacheSizeInBytes, setMediaCacheSizeInBytes: setMediaCacheSizeInBytes, hardwareAcceleration: hardwareAcceleration, setHardwareAcceleration: setHardwareAcceleration, allowHtmlInCanvas: allowHtmlInCanvas, setAllowHtmlInCanvas: setAllowHtmlInCanvas, pageResponsiveness: pageResponsiveness, setPageResponsiveness: setPageResponsiveness })) : (jsx_runtime_1.jsx(WebRenderModalLicense_1.WebRenderModalLicense, { licenseKey: licenseKey, setLicenseKey: setLicenseKey, initialPublicLicenseKey: initialLicenseKey })) })
432
+ } })) : tab === 'picture' ? (jsx_runtime_1.jsx(WebRenderModalPicture_1.WebRenderModalPicture, { renderMode: renderMode, videoBitrate: videoBitrate, setVideoBitrate: setVideoBitrate, keyframeIntervalInSeconds: keyframeIntervalInSeconds, setKeyframeIntervalInSeconds: setKeyframeIntervalInSeconds, transparent: transparent, setTransparent: setTransparent, scale: scale, setScale: setScale, compositionWidth: resolvedComposition.width, compositionHeight: resolvedComposition.height })) : tab === 'audio' ? (jsx_runtime_1.jsx(WebRenderModalAudio_1.WebRenderModalAudio, { renderMode: renderMode, muted: muted, setMuted: setMuted, audioCodec: audioCodec, setAudioCodec: setAudioCodec, audioBitrate: audioBitrate, setAudioBitrate: setAudioBitrate, container: container, encodableCodecs: encodableAudioCodecs, effectiveAudioCodec: effectiveAudioCodec })) : tab === 'advanced' ? (jsx_runtime_1.jsx(WebRenderModalAdvanced_1.WebRenderModalAdvanced, { renderMode: renderMode, delayRenderTimeout: delayRenderTimeout, setDelayRenderTimeout: setDelayRenderTimeout, mediaCacheSizeInBytes: mediaCacheSizeInBytes, setMediaCacheSizeInBytes: setMediaCacheSizeInBytes, hardwareAcceleration: hardwareAcceleration, setHardwareAcceleration: setHardwareAcceleration, pageResponsiveness: pageResponsiveness, setPageResponsiveness: setPageResponsiveness })) : (jsx_runtime_1.jsx(WebRenderModalLicense_1.WebRenderModalLicense, { licenseKey: licenseKey, setLicenseKey: setLicenseKey, initialPublicLicenseKey: initialLicenseKey })) })
438
433
  ] })
439
434
  ] }));
440
435
  };
@@ -9,8 +9,6 @@ type WebRenderModalAdvancedProps = {
9
9
  readonly setMediaCacheSizeInBytes: React.Dispatch<React.SetStateAction<number | null>>;
10
10
  readonly hardwareAcceleration: 'no-preference' | 'prefer-hardware' | 'prefer-software';
11
11
  readonly setHardwareAcceleration: (value: 'no-preference' | 'prefer-hardware' | 'prefer-software') => void;
12
- readonly allowHtmlInCanvas: boolean;
13
- readonly setAllowHtmlInCanvas: React.Dispatch<React.SetStateAction<boolean>>;
14
12
  readonly pageResponsiveness: WebRendererPageResponsiveness;
15
13
  readonly setPageResponsiveness: React.Dispatch<React.SetStateAction<WebRendererPageResponsiveness>>;
16
14
  };
@@ -30,7 +30,7 @@ const PageResponsivenessDescription = () => {
30
30
  " to give the browser more chances to update."] })
31
31
  ] }));
32
32
  };
33
- const WebRenderModalAdvanced = ({ renderMode, delayRenderTimeout, setDelayRenderTimeout, mediaCacheSizeInBytes, setMediaCacheSizeInBytes, hardwareAcceleration, setHardwareAcceleration, allowHtmlInCanvas, setAllowHtmlInCanvas, pageResponsiveness, setPageResponsiveness, }) => {
33
+ const WebRenderModalAdvanced = ({ renderMode, delayRenderTimeout, setDelayRenderTimeout, mediaCacheSizeInBytes, setMediaCacheSizeInBytes, hardwareAcceleration, setHardwareAcceleration, pageResponsiveness, setPageResponsiveness, }) => {
34
34
  const toggleCustomMediaCacheSizeInBytes = (0, react_1.useCallback)(() => {
35
35
  setMediaCacheSizeInBytes((previous) => {
36
36
  if (previous === null) {
@@ -39,9 +39,6 @@ const WebRenderModalAdvanced = ({ renderMode, delayRenderTimeout, setDelayRender
39
39
  return null;
40
40
  });
41
41
  }, [setMediaCacheSizeInBytes]);
42
- const toggleAllowHtmlInCanvas = (0, react_1.useCallback)(() => {
43
- setAllowHtmlInCanvas((prev) => !prev);
44
- }, [setAllowHtmlInCanvas]);
45
42
  const changeMediaCacheSizeInBytes = (0, react_1.useCallback)((cb) => {
46
43
  setMediaCacheSizeInBytes((prev) => {
47
44
  if (prev === null) {
@@ -163,11 +160,7 @@ const WebRenderModalAdvanced = ({ renderMode, delayRenderTimeout, setDelayRender
163
160
  ] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: mediaCacheSizeInBytes !== null, onChange: toggleCustomMediaCacheSizeInBytes, name: "media-cache-size" }) })
164
161
  ] }), mediaCacheSizeInBytes === null ? null : (jsx_runtime_1.jsx(NumberSetting_1.NumberSetting, { name: "@remotion/media cache size", formatter: (w) => `${w} bytes`, min: 0, max: 10000000000, step: 10 * 1024 * 1024, value: mediaCacheSizeInBytes, onValueChanged: changeMediaCacheSizeInBytes })), renderMode === 'video' ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
165
162
  jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Hardware Acceleration" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: hardwareAccelerationOptions, selectedId: hardwareAcceleration, title: "Hardware Acceleration" }) })
166
- ] })) : null, jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
167
- jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Allow HTML-in-canvas ",
168
- jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.WebRendererOptionExplainerBubble, { apiName: "allowHtmlInCanvas", id: "allowHtmlInCanvasOption" })
169
- ] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: allowHtmlInCanvas, onChange: toggleAllowHtmlInCanvas, name: "allow-html-in-canvas" }) })
170
- ] }), renderMode === 'still' ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
163
+ ] })) : null, renderMode === 'still' ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
171
164
  jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
172
165
  jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Page Responsiveness ",
173
166
  jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.WebRendererCustomOptionExplainerBubble, { apiName: "pageResponsiveness", description: jsx_runtime_1.jsx(PageResponsivenessDescription, {}), docLink: "https://www.remotion.dev/docs/client-side-rendering/page-responsiveness", name: "Page responsiveness" })
@@ -44,7 +44,6 @@ const ClientRenderQueueProcessor = () => {
44
44
  licenseKey: (_b = job.licenseKey) !== null && _b !== void 0 ? _b : undefined,
45
45
  scale: job.scale,
46
46
  signal,
47
- allowHtmlInCanvas: job.allowHtmlInCanvas,
48
47
  })).blob({ format: job.imageFormat });
49
48
  return {
50
49
  getBlob: () => Promise.resolve(blob),
@@ -97,7 +96,6 @@ const ClientRenderQueueProcessor = () => {
97
96
  },
98
97
  outputTarget: 'web-fs',
99
98
  licenseKey: (_c = job.licenseKey) !== null && _c !== void 0 ? _c : undefined,
100
- allowHtmlInCanvas: job.allowHtmlInCanvas,
101
99
  pageResponsiveness: job.pageResponsiveness,
102
100
  });
103
101
  return {
@@ -40,7 +40,6 @@ type ClientRenderJobBase = {
40
40
  logLevel: LogLevel;
41
41
  licenseKey: string | null;
42
42
  scale: number;
43
- allowHtmlInCanvas: boolean;
44
43
  };
45
44
  export type ClientStillRenderJob = ClientRenderJobBase & {
46
45
  type: 'client-still';
@@ -37,9 +37,7 @@ exports.RenderQueue = void 0;
37
37
  const jsx_runtime_1 = require("react/jsx-runtime");
38
38
  const react_1 = __importStar(require("react"));
39
39
  const remotion_1 = require("remotion");
40
- const client_id_1 = require("../../helpers/client-id");
41
40
  const colors_1 = require("../../helpers/colors");
42
- const show_browser_rendering_1 = require("../../helpers/show-browser-rendering");
43
41
  const layout_1 = require("../layout");
44
42
  const is_menu_item_1 = require("../Menu/is-menu-item");
45
43
  const context_1 = require("./context");
@@ -69,8 +67,6 @@ const renderQueue = {
69
67
  overflowY: 'auto',
70
68
  };
71
69
  const RenderQueue = () => {
72
- const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
73
- .previewServerState.type;
74
70
  const { jobs } = (0, react_1.useContext)(context_1.RenderQueueContext);
75
71
  const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
76
72
  const previousJobCount = react_1.default.useRef(jobs.length);
@@ -103,11 +99,6 @@ const RenderQueue = () => {
103
99
  }
104
100
  return -1;
105
101
  }, [canvasContent, jobs]);
106
- if (connectionStatus === 'disconnected' && !show_browser_rendering_1.SHOW_BROWSER_RENDERING) {
107
- return (jsx_runtime_1.jsxs("div", { style: explainer, children: [
108
- jsx_runtime_1.jsx(layout_1.Spacing, { y: 5 }), jsx_runtime_1.jsx("div", { style: errorExplanation, children: "The studio server has disconnected." }), jsx_runtime_1.jsx(layout_1.Spacing, { y: 2, block: true })
109
- ] }));
110
- }
111
102
  if (jobCount === 0) {
112
103
  return (jsx_runtime_1.jsxs("div", { style: explainer, children: [
113
104
  jsx_runtime_1.jsx(layout_1.Spacing, { y: 5 }), jsx_runtime_1.jsx("div", { style: errorExplanation, children: "No renders in the queue." }), jsx_runtime_1.jsx(layout_1.Spacing, { y: 2, block: true })