@remotion/studio 4.0.513 → 4.0.514

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 (174) hide show
  1. package/dist/Studio.js +2 -1
  2. package/dist/components/AskAiModal.js +1 -1
  3. package/dist/components/AssetSelector.js +2 -0
  4. package/dist/components/AssetSelectorItem.js +1 -2
  5. package/dist/components/AudioWaveform.d.ts +3 -0
  6. package/dist/components/AudioWaveform.js +55 -67
  7. package/dist/components/Canvas.js +40 -5
  8. package/dist/components/CanvasOrLoading.js +5 -0
  9. package/dist/components/CompositionSelector.js +2 -0
  10. package/dist/components/ConfigureDefaultEditorModal.js +17 -11
  11. package/dist/components/Editor.js +16 -1
  12. package/dist/components/ElementInstallConfirmation.d.ts +1 -0
  13. package/dist/components/ElementInstallConfirmation.js +4 -2
  14. package/dist/components/FixComputedValueModal.d.ts +9 -0
  15. package/dist/components/FixComputedValueModal.js +217 -0
  16. package/dist/components/InitialCompositionLoader.js +19 -0
  17. package/dist/components/InlineDropdown.js +4 -4
  18. package/dist/components/InspectorInfoHeader.js +3 -3
  19. package/dist/components/InspectorOpenInEditor.js +3 -1
  20. package/dist/components/InspectorPanel/CompositionInspector.js +11 -1
  21. package/dist/components/InspectorPanel/CompositionInspectorHeader.js +2 -2
  22. package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +1 -1
  23. package/dist/components/InspectorPanel/EasingInspector.js +1 -1
  24. package/dist/components/InspectorPanel/KeyframeInspector.js +2 -2
  25. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +1 -1
  26. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +35 -6
  27. package/dist/components/InspectorPanel/common.d.ts +5 -5
  28. package/dist/components/InspectorPanel/common.js +8 -8
  29. package/dist/components/InspectorPanel/styles.d.ts +1 -1
  30. package/dist/components/InspectorPanel/styles.js +4 -2
  31. package/dist/components/InspectorSourceLocation.d.ts +1 -1
  32. package/dist/components/InspectorSourceLocation.js +2 -2
  33. package/dist/components/LicenseKeyValidation.js +2 -2
  34. package/dist/components/Modals.js +2 -1
  35. package/dist/components/NewComposition/CodemodFooter.d.ts +1 -0
  36. package/dist/components/NewComposition/CodemodFooter.js +10 -8
  37. package/dist/components/NewComposition/DeleteComposition.js +1 -1
  38. package/dist/components/NewComposition/DeleteFolder.js +1 -1
  39. package/dist/components/NewComposition/DuplicateComposition.js +7 -2
  40. package/dist/components/NewComposition/NewComposition.js +1 -1
  41. package/dist/components/NewComposition/NewFolder.js +1 -1
  42. package/dist/components/NewComposition/RenameComposition.js +1 -1
  43. package/dist/components/NewComposition/RenameFolder.js +1 -1
  44. package/dist/components/NewComposition/duplicate-composition-api.d.ts +16 -0
  45. package/dist/components/NewComposition/duplicate-composition-api.js +16 -0
  46. package/dist/components/NoRegisterRoot.js +1 -1
  47. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +4 -3
  48. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -0
  49. package/dist/components/QuickSwitcher/fuzzy-search.js +1 -1
  50. package/dist/components/RefreshCompositionOverlay.js +1 -1
  51. package/dist/components/RenderButton.js +6 -3
  52. package/dist/components/RenderModal/WebRenderModal.js +6 -2
  53. package/dist/components/RenderModal/WebRenderModalAdvanced.d.ts +2 -0
  54. package/dist/components/RenderModal/WebRenderModalAdvanced.js +9 -2
  55. package/dist/components/RenderModal/render-modals.js +5 -1
  56. package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +5 -1
  57. package/dist/components/RenderQueue/actions.js +12 -2
  58. package/dist/components/RenderQueue/client-side-render-types.d.ts +1 -0
  59. package/dist/components/RenderingSettings.d.ts +2 -0
  60. package/dist/components/RenderingSettings.js +355 -0
  61. package/dist/components/SelectedOutlineElement.js +3 -3
  62. package/dist/components/SelectedOutlinePolygon.d.ts +1 -0
  63. package/dist/components/SelectedOutlinePolygon.js +53 -9
  64. package/dist/components/SettingsContext.d.ts +4 -1
  65. package/dist/components/SettingsContext.js +9 -2
  66. package/dist/components/SettingsModal.d.ts +1 -1
  67. package/dist/components/SettingsModal.js +10 -1
  68. package/dist/components/SettingsModalFooter.js +1 -1
  69. package/dist/components/StudioSettings.d.ts +2 -0
  70. package/dist/components/StudioSettings.js +185 -0
  71. package/dist/components/Timeline/LoopedIndicator.js +1 -1
  72. package/dist/components/Timeline/LoopedTimelineIndicators.d.ts +3 -0
  73. package/dist/components/Timeline/LoopedTimelineIndicators.js +22 -14
  74. package/dist/components/Timeline/Timeline.js +11 -9
  75. package/dist/components/Timeline/TimelineAssetField.d.ts +2 -2
  76. package/dist/components/Timeline/TimelineAssetField.js +1 -1
  77. package/dist/components/Timeline/TimelineDragHandler.js +62 -76
  78. package/dist/components/Timeline/TimelineEffectItem.js +1 -1
  79. package/dist/components/Timeline/TimelineEffectPropItem.d.ts +4 -2
  80. package/dist/components/Timeline/TimelineEffectPropItem.js +16 -11
  81. package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -1
  82. package/dist/components/Timeline/TimelineExpandedRow.js +4 -4
  83. package/dist/components/Timeline/TimelineExpandedSection.js +1 -1
  84. package/dist/components/Timeline/TimelineHeightContainer.d.ts +0 -4
  85. package/dist/components/Timeline/TimelineHeightContainer.js +4 -4
  86. package/dist/components/Timeline/TimelineImageInfo.d.ts +1 -0
  87. package/dist/components/Timeline/TimelineImageInfo.js +3 -2
  88. package/dist/components/Timeline/TimelineKeyframeControls.js +6 -1
  89. package/dist/components/Timeline/TimelineList.d.ts +1 -5
  90. package/dist/components/Timeline/TimelineList.js +14 -9
  91. package/dist/components/Timeline/TimelinePinchZoom.js +5 -5
  92. package/dist/components/Timeline/TimelineRowChrome.d.ts +0 -2
  93. package/dist/components/Timeline/TimelineRowChrome.js +12 -5
  94. package/dist/components/Timeline/TimelineSchemaField.d.ts +7 -3
  95. package/dist/components/Timeline/TimelineSchemaField.js +71 -13
  96. package/dist/components/Timeline/TimelineScrollable.js +3 -1
  97. package/dist/components/Timeline/TimelineSelection.d.ts +5 -2
  98. package/dist/components/Timeline/TimelineSelection.js +90 -103
  99. package/dist/components/Timeline/TimelineSequence.js +59 -25
  100. package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -1
  101. package/dist/components/Timeline/TimelineSequenceItem.js +15 -9
  102. package/dist/components/Timeline/TimelineSequencePropItem.d.ts +2 -1
  103. package/dist/components/Timeline/TimelineSequencePropItem.js +3 -3
  104. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +33 -10
  105. package/dist/components/Timeline/TimelineSlider.js +42 -33
  106. package/dist/components/Timeline/TimelineTimeIndicators.js +90 -98
  107. package/dist/components/Timeline/TimelineTracks.d.ts +0 -2
  108. package/dist/components/Timeline/TimelineTracks.js +11 -4
  109. package/dist/components/Timeline/TimelineTransformOriginField.js +1 -1
  110. package/dist/components/Timeline/TimelineVideoInfo.d.ts +4 -4
  111. package/dist/components/Timeline/TimelineVideoInfo.js +151 -61
  112. package/dist/components/Timeline/TimelineViewport.d.ts +12 -0
  113. package/dist/components/Timeline/TimelineViewport.js +62 -0
  114. package/dist/components/Timeline/TimelineVirtualization.d.ts +22 -0
  115. package/dist/components/Timeline/TimelineVirtualization.js +144 -0
  116. package/dist/components/Timeline/TimelineZoomControls.js +16 -8
  117. package/dist/components/Timeline/call-add-keyframe.js +31 -3
  118. package/dist/components/Timeline/call-delete-keyframe.js +13 -3
  119. package/dist/components/Timeline/call-move-keyframe.js +11 -1
  120. package/dist/components/Timeline/call-update-keyframe-settings.js +31 -3
  121. package/dist/components/Timeline/delete-selected-timeline-item.js +2 -1
  122. package/dist/components/Timeline/get-timeline-keyframes.d.ts +1 -2
  123. package/dist/components/Timeline/get-timeline-keyframes.js +1 -8
  124. package/dist/components/Timeline/get-timeline-sequence-visible-layout.d.ts +30 -0
  125. package/dist/components/Timeline/get-timeline-sequence-visible-layout.js +61 -0
  126. package/dist/components/Timeline/split-selected-timeline-item.js +2 -2
  127. package/dist/components/Timeline/timeline-scroll-logic.d.ts +24 -0
  128. package/dist/components/Timeline/timeline-scroll-logic.js +127 -4
  129. package/dist/components/Timeline/use-timeline-height.d.ts +3 -5
  130. package/dist/components/Timeline/use-timeline-height.js +16 -18
  131. package/dist/components/UpdateCheck.d.ts +2 -10
  132. package/dist/components/UpdateCheck.js +8 -2
  133. package/dist/components/VisualControls/VisualControlHandle.js +8 -0
  134. package/dist/components/delete-jsx-node-api.d.ts +2 -0
  135. package/dist/components/delete-jsx-node-api.js +12 -0
  136. package/dist/components/element-install-api.d.ts +3 -0
  137. package/dist/components/element-install-api.js +19 -0
  138. package/dist/components/import-assets.js +20 -9
  139. package/dist/components/reorder-sequence-api.d.ts +2 -0
  140. package/dist/components/reorder-sequence-api.js +12 -0
  141. package/dist/components/split-jsx-sequence-api.d.ts +2 -0
  142. package/dist/components/split-jsx-sequence-api.js +12 -0
  143. package/dist/components/split-video-from-audio-api.d.ts +2 -0
  144. package/dist/components/split-video-from-audio-api.js +12 -0
  145. package/dist/error-overlay/remotion-overlay/Overlay.js +1 -1
  146. package/dist/esm/{chunk-tv7r0jy3.js → chunk-xn2q7eem.js} +11073 -7495
  147. package/dist/esm/index.mjs +7 -5
  148. package/dist/esm/internals.mjs +11073 -7495
  149. package/dist/esm/previewEntry.mjs +10905 -7327
  150. package/dist/esm/renderEntry.mjs +2 -3
  151. package/dist/helpers/browser-studio-operations.d.ts +2 -0
  152. package/dist/helpers/browser-studio-operations.js +10 -1
  153. package/dist/helpers/get-timeline-max-zoom.d.ts +26 -0
  154. package/dist/helpers/get-timeline-max-zoom.js +45 -0
  155. package/dist/helpers/inject-css.js +2 -2
  156. package/dist/helpers/render-codec-label.d.ts +1 -1
  157. package/dist/helpers/retry-payload.js +1 -0
  158. package/dist/helpers/studio-runtime-config.d.ts +1 -1
  159. package/dist/helpers/studio-runtime-config.js +2 -3
  160. package/dist/helpers/timeline-layout.d.ts +3 -1
  161. package/dist/helpers/timeline-layout.js +6 -1
  162. package/dist/helpers/url-state.js +3 -2
  163. package/dist/helpers/use-menu-structure.js +1 -5
  164. package/dist/helpers/use-runtime-values.d.ts +2 -1
  165. package/dist/helpers/use-runtime-values.js +7 -3
  166. package/dist/icons/remotion-triangle.d.ts +2 -0
  167. package/dist/icons/remotion-triangle.js +7 -0
  168. package/dist/renderEntry.js +1 -1
  169. package/dist/state/composition-list.d.ts +13 -0
  170. package/dist/state/composition-list.js +21 -0
  171. package/dist/state/modals.d.ts +7 -1
  172. package/dist/state/timeline-zoom.d.ts +1 -2
  173. package/dist/state/timeline-zoom.js +9 -5
  174. package/package.json +14 -13
@@ -20,7 +20,7 @@ export declare const selectedContainer: React.CSSProperties;
20
20
  export declare const centeredMessage: React.CSSProperties;
21
21
  export declare const detailsContainer: React.CSSProperties;
22
22
  export declare const detailsWithInlineAction: React.CSSProperties;
23
- export declare const inspectorActionSection: React.CSSProperties;
23
+ export declare const inspectorQuickActionsSection: React.CSSProperties;
24
24
  export declare const detailsBeforeInlineAction: React.CSSProperties;
25
25
  export declare const guideDetailsContainer: React.CSSProperties;
26
26
  export declare const detailRow: React.CSSProperties;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.keyframeEditorValue = exports.keyframeEditorRow = exports.detailValue = exports.detailLabel = exports.detailRow = exports.guideDetailsContainer = exports.detailsBeforeInlineAction = exports.inspectorActionSection = exports.detailsWithInlineAction = exports.detailsContainer = exports.centeredMessage = exports.selectedContainer = exports.resolveLinkStyle = exports.defaultPropsWarningMessages = exports.defaultPropsWarningContainer = exports.sectionHeaderEnd = exports.sectionHeaderStart = exports.sectionHeaderTitle = exports.sectionHeaderRow = exports.sequenceHeaderSubtitle = exports.inspectorSectionBody = exports.sectionHeader = exports.sequenceHeaderDivider = exports.inspectorSectionDivider = exports.inspectorOverviewSection = exports.compositionVisualControlsSection = exports.compositionDefaultPropsSection = exports.scrollableContainer = exports.container = void 0;
3
+ exports.keyframeEditorValue = exports.keyframeEditorRow = exports.detailValue = exports.detailLabel = exports.detailRow = exports.guideDetailsContainer = exports.detailsBeforeInlineAction = exports.inspectorQuickActionsSection = exports.detailsWithInlineAction = exports.detailsContainer = exports.centeredMessage = exports.selectedContainer = exports.resolveLinkStyle = exports.defaultPropsWarningMessages = exports.defaultPropsWarningContainer = exports.sectionHeaderEnd = exports.sectionHeaderStart = exports.sectionHeaderTitle = exports.sectionHeaderRow = exports.sequenceHeaderSubtitle = exports.inspectorSectionBody = exports.sectionHeader = exports.sequenceHeaderDivider = exports.inspectorSectionDivider = exports.inspectorOverviewSection = exports.compositionVisualControlsSection = exports.compositionDefaultPropsSection = exports.scrollableContainer = exports.container = void 0;
4
4
  const colors_1 = require("../../helpers/colors");
5
5
  const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
6
6
  exports.container = {
@@ -14,6 +14,7 @@ exports.container = {
14
14
  };
15
15
  exports.scrollableContainer = {
16
16
  ...exports.container,
17
+ overflowX: 'hidden',
17
18
  overflowY: 'auto',
18
19
  };
19
20
  exports.compositionDefaultPropsSection = {
@@ -127,6 +128,7 @@ exports.selectedContainer = {
127
128
  backgroundColor: colors_1.BACKGROUND,
128
129
  flex: 1,
129
130
  minHeight: 0,
131
+ overflowX: 'hidden',
130
132
  overflowY: 'auto',
131
133
  };
132
134
  exports.centeredMessage = {
@@ -145,7 +147,7 @@ exports.detailsContainer = {
145
147
  exports.detailsWithInlineAction = {
146
148
  paddingBottom: InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING,
147
149
  };
148
- exports.inspectorActionSection = {
150
+ exports.inspectorQuickActionsSection = {
149
151
  padding: '4px 0',
150
152
  };
151
153
  exports.detailsBeforeInlineAction = {
@@ -5,5 +5,5 @@ export declare const InspectorSourceLocation: React.FC<{
5
5
  readonly canOpen: boolean;
6
6
  readonly onOpen: () => void;
7
7
  readonly renderIcon?: (color: string) => React.ReactNode;
8
- readonly size?: 'default' | 'inline-action';
8
+ readonly size?: 'default' | 'quick-action';
9
9
  }>;
@@ -81,8 +81,8 @@ const InspectorSourceLocation = ({ location, canOpen, onOpen, renderIcon, size =
81
81
  if (!label) {
82
82
  return null;
83
83
  }
84
- if (size === 'inline-action') {
85
- return (jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: !canOpen, onClick: onClick, renderIcon: (iconColor) => renderIcon === null || renderIcon === void 0 ? void 0 : renderIcon(iconColor), size: "compact", title: fileLocation !== null && fileLocation !== void 0 ? fileLocation : undefined, children: label }));
84
+ if (size === 'quick-action') {
85
+ return (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canOpen, onClick: onClick, renderIcon: (iconColor) => renderIcon === null || renderIcon === void 0 ? void 0 : renderIcon(iconColor), size: "compact", title: fileLocation !== null && fileLocation !== void 0 ? fileLocation : undefined, children: label }));
86
86
  }
87
87
  return (jsx_runtime_1.jsxs("button", { type: "button", style: style, title: fileLocation !== null && fileLocation !== void 0 ? fileLocation : undefined, onClick: onClick, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), children: [renderIcon ? renderIcon(color) : null, jsx_runtime_1.jsx("span", { style: sourceLocationLabelStyle, children: label })
88
88
  ] }));
@@ -102,9 +102,9 @@ const LicenseKeyDetailsDisplay = ({ details }) => {
102
102
  const projectUrl = `${PRO_HOST}/projects/${details.projectSlug}`;
103
103
  const usageUrl = `${projectUrl}/usage#client-renders-usage`;
104
104
  const hasActiveLicense = (0, exports.hasActiveCompanyLicense)(details);
105
- return (jsx_runtime_1.jsxs("div", { children: [jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: false, onClick: () => window.open(usageUrl, '_blank', 'noopener,noreferrer'), renderIcon: (color) => (jsx_runtime_1.jsx(check_circle_filled_1.CheckCircleFilled, { style: { ...iconStyle, fill: color } })), style: actionStyle, title: "View license usage", children: jsx_runtime_1.jsxs("span", { style: actionContent, children: [
105
+ return (jsx_runtime_1.jsxs("div", { children: [jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: false, onClick: () => window.open(usageUrl, '_blank', 'noopener,noreferrer'), renderIcon: (color) => (jsx_runtime_1.jsx(check_circle_filled_1.CheckCircleFilled, { style: { ...iconStyle, fill: color } })), style: actionStyle, title: "View license usage", children: jsx_runtime_1.jsxs("span", { style: actionContent, children: [
106
106
  jsx_runtime_1.jsxs("span", { style: actionText, children: ["Belongs to ", details.projectName] }), jsx_runtime_1.jsx("span", { style: actionLabel, children: "View usage" })
107
- ] }) }), jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: false, onClick: () => window.open(projectUrl, '_blank', 'noopener,noreferrer'), renderIcon: (color) => hasActiveLicense ? (jsx_runtime_1.jsx(check_circle_filled_1.CheckCircleFilled, { style: { ...iconStyle, fill: color } })) : (jsx_runtime_1.jsx(ErrorIcon, {})), style: actionStyle, title: "Manage Company License", children: jsx_runtime_1.jsxs("span", { style: actionContent, children: [
107
+ ] }) }), jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: false, onClick: () => window.open(projectUrl, '_blank', 'noopener,noreferrer'), renderIcon: (color) => hasActiveLicense ? (jsx_runtime_1.jsx(check_circle_filled_1.CheckCircleFilled, { style: { ...iconStyle, fill: color } })) : (jsx_runtime_1.jsx(ErrorIcon, {})), style: actionStyle, title: "Manage Company License", children: jsx_runtime_1.jsxs("span", { style: actionContent, children: [
108
108
  jsx_runtime_1.jsx("span", { style: hasActiveLicense ? actionText : inactiveLicenseText, children: hasActiveLicense
109
109
  ? 'Active Company License'
110
110
  : 'No active Company License' }), jsx_runtime_1.jsx("span", { style: actionLabel, children: "Manage" })
@@ -12,6 +12,7 @@ const modals_1 = require("../state/modals");
12
12
  const AskAiModal_1 = require("./AskAiModal");
13
13
  const ConfirmationDialog_1 = require("./ConfirmationDialog");
14
14
  const EffectPickerModal_1 = require("./EffectPickerModal");
15
+ const FixComputedValueModal_1 = require("./FixComputedValueModal");
15
16
  const InstallPackage_1 = require("./InstallPackage");
16
17
  const DeleteComposition_1 = require("./NewComposition/DeleteComposition");
17
18
  const DeleteFolder_1 = require("./NewComposition/DeleteFolder");
@@ -49,6 +50,6 @@ const Modals = ({ readOnlyStudio }) => {
49
50
  }, [setSelectedModal, subscribeToEvent]);
50
51
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'new-comp' && (jsx_runtime_1.jsx(NewComposition_1.NewComposition, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack, canvasCapture: modalContextType.canvasCapture })), modalContextType && modalContextType.type === 'new-folder' && (jsx_runtime_1.jsx(NewFolder_1.NewFolder, { parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'duplicate-comp' && (jsx_runtime_1.jsx(DuplicateComposition_1.DuplicateComposition, { compositionType: modalContextType.compositionType, compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-comp' && (jsx_runtime_1.jsx(DeleteComposition_1.DeleteComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'rename-comp' && (jsx_runtime_1.jsx(RenameComposition_1.RenameComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-folder' && (jsx_runtime_1.jsx(DeleteFolder_1.DeleteFolder, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'rename-folder' && (jsx_runtime_1.jsx(RenameFolder_1.RenameFolder, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'rename-static-file' && (jsx_runtime_1.jsx(RenameStaticFile_1.RenameStaticFileModal, { relativePath: modalContextType.relativePath })), modalContextType && modalContextType.type === 'input-props-override' && (jsx_runtime_1.jsx(OverrideInputProps_1.OverrideInputPropsModal, {})), modalContextType && modalContextType.type === 'settings' && (jsx_runtime_1.jsx(SettingsModal_1.SettingsModal, { initialTab: modalContextType.initialTab, initialPublicLicenseKey: modalContextType.initialPublicLicenseKey }, `${modalContextType.initialTab}-${modalContextType.initialPublicLicenseKey}`)), modalContextType && modalContextType.type === 'web-render' && (jsx_runtime_1.jsx(WebRenderModal_1.WebRenderModalWithLoader, { ...modalContextType })), modalContextType &&
51
52
  modalContextType.type === 'server-render' &&
52
- (canRender || modalContextType.readOnlyStudio) ? (jsx_runtime_1.jsx(ServerRenderModal_1.RenderModalWithLoader, { readOnlyStudio: (_a = modalContextType.readOnlyStudio) !== null && _a !== void 0 ? _a : false, initialFrame: modalContextType.initialFrame, initialDarkMode: modalContextType.initialDarkMode, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialScale: modalContextType.initialScale, initialLogLevel: modalContextType.initialLogLevel, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialOffthreadVideoThreads: modalContextType.initialOffthreadVideoThreads, initialMediaCacheSizeInBytes: modalContextType.initialMediaCacheSizeInBytes, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialGopSize: modalContextType.initialGopSize, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, initialEncodingBufferSize: modalContextType.initialEncodingBufferSize, initialEncodingMaxRate: modalContextType.initialEncodingMaxRate, initialUserAgent: modalContextType.initialUserAgent, initialColorSpace: modalContextType.initialColorSpace, initialMultiProcessOnLinux: modalContextType.initialMultiProcessOnLinux, initialRepro: modalContextType.initialRepro, initialBeep: modalContextType.initialBeep, initialForSeamlessAacConcatenation: modalContextType.initialForSeamlessAacConcatenation, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, defaultConfigurationAudioCodec: modalContextType.defaultConfigurationAudioCodec, defaultConfigurationVideoCodec: modalContextType.defaultConfigurationVideoCodec, renderTypeOfLastRender: modalContextType.renderTypeOfLastRender, defaultMetadata: modalContextType.defaulMetadata, initialHardwareAcceleration: modalContextType.initialHardwareAcceleration, initialSampleRate: modalContextType.initialSampleRate, initialChromeMode: modalContextType.initialChromeMode, renderDefaults: modalContextType.renderDefaults })) : null, modalContextType && modalContextType.type === 'render-progress' && (jsx_runtime_1.jsx(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'update' && (jsx_runtime_1.jsx(UpdateModal_1.UpdateModal, { info: modalContextType.info, knownBugs: modalContextType.knownBugs })), modalContextType && modalContextType.type === 'install-packages' && (jsx_runtime_1.jsx(InstallPackage_1.InstallPackageModal, { packageManager: modalContextType.packageManager })), modalContextType && modalContextType.type === 'quick-switcher' && (jsx_runtime_1.jsx(QuickSwitcher_1.default, { readOnlyStudio: readOnlyStudio, invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode, assetSelection: modalContextType.assetSelection, compositionSelection: modalContextType.compositionSelection })), modalContextType && modalContextType.type === 'add-effect' && (jsx_runtime_1.jsx(EffectPickerModal_1.EffectPickerModal, { state: modalContextType })), modalContextType && modalContextType.type === 'confirmation-dialog' && (jsx_runtime_1.jsx(ConfirmationDialog_1.ConfirmationDialog, { state: modalContextType })), modalContextType && modalContextType.type === 'svg-import-dialog' && (jsx_runtime_1.jsx(SvgImportDialog_1.SvgImportDialog, { state: modalContextType })), (0, studio_runtime_config_1.getStudioAskAIEnabled)() && jsx_runtime_1.jsx(AskAiModal_1.AskAiModal, {})] }));
53
+ (canRender || modalContextType.readOnlyStudio) ? (jsx_runtime_1.jsx(ServerRenderModal_1.RenderModalWithLoader, { readOnlyStudio: (_a = modalContextType.readOnlyStudio) !== null && _a !== void 0 ? _a : false, initialFrame: modalContextType.initialFrame, initialDarkMode: modalContextType.initialDarkMode, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialScale: modalContextType.initialScale, initialLogLevel: modalContextType.initialLogLevel, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialOffthreadVideoThreads: modalContextType.initialOffthreadVideoThreads, initialMediaCacheSizeInBytes: modalContextType.initialMediaCacheSizeInBytes, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialGopSize: modalContextType.initialGopSize, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, initialEncodingBufferSize: modalContextType.initialEncodingBufferSize, initialEncodingMaxRate: modalContextType.initialEncodingMaxRate, initialUserAgent: modalContextType.initialUserAgent, initialColorSpace: modalContextType.initialColorSpace, initialMultiProcessOnLinux: modalContextType.initialMultiProcessOnLinux, initialRepro: modalContextType.initialRepro, initialBeep: modalContextType.initialBeep, initialForSeamlessAacConcatenation: modalContextType.initialForSeamlessAacConcatenation, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, defaultConfigurationAudioCodec: modalContextType.defaultConfigurationAudioCodec, defaultConfigurationVideoCodec: modalContextType.defaultConfigurationVideoCodec, renderTypeOfLastRender: modalContextType.renderTypeOfLastRender, defaultMetadata: modalContextType.defaulMetadata, initialHardwareAcceleration: modalContextType.initialHardwareAcceleration, initialSampleRate: modalContextType.initialSampleRate, initialChromeMode: modalContextType.initialChromeMode, renderDefaults: modalContextType.renderDefaults })) : null, modalContextType && modalContextType.type === 'render-progress' && (jsx_runtime_1.jsx(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'update' && (jsx_runtime_1.jsx(UpdateModal_1.UpdateModal, { info: modalContextType.info, knownBugs: modalContextType.knownBugs })), modalContextType && modalContextType.type === 'fix-computed-value' && (jsx_runtime_1.jsx(FixComputedValueModal_1.FixComputedValueModal, { state: modalContextType })), modalContextType && modalContextType.type === 'install-packages' && (jsx_runtime_1.jsx(InstallPackage_1.InstallPackageModal, { packageManager: modalContextType.packageManager })), modalContextType && modalContextType.type === 'quick-switcher' && (jsx_runtime_1.jsx(QuickSwitcher_1.default, { readOnlyStudio: readOnlyStudio, invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode, assetSelection: modalContextType.assetSelection, compositionSelection: modalContextType.compositionSelection })), modalContextType && modalContextType.type === 'add-effect' && (jsx_runtime_1.jsx(EffectPickerModal_1.EffectPickerModal, { state: modalContextType })), modalContextType && modalContextType.type === 'confirmation-dialog' && (jsx_runtime_1.jsx(ConfirmationDialog_1.ConfirmationDialog, { state: modalContextType })), modalContextType && modalContextType.type === 'svg-import-dialog' && (jsx_runtime_1.jsx(SvgImportDialog_1.SvgImportDialog, { state: modalContextType })), (0, studio_runtime_config_1.getStudioAskAIEnabled)() && jsx_runtime_1.jsx(AskAiModal_1.AskAiModal, {})] }));
53
54
  };
54
55
  exports.Modals = Modals;
@@ -18,5 +18,6 @@ export declare const CodemodFooter: React.FC<{
18
18
  readonly onSuccess: (() => void) | null;
19
19
  readonly fallbackToRootFile?: boolean;
20
20
  readonly applyCodemod: ApplyCodemodAction;
21
+ readonly applyCodemodForPreview: ApplyCodemodAction | null;
21
22
  }>;
22
23
  export {};
@@ -21,7 +21,7 @@ const CodemodFooterPresentation = ({ codemodStatus, disabled, genericSubmitLabel
21
21
  ] })
22
22
  ] }));
23
23
  };
24
- const CodemodFooter = ({ codemod, stack, valid, loadingNotification, successNotification, errorNotification, genericSubmitLabel, submitLabel, onSuccess, fallbackToRootFile = false, applyCodemod, }) => {
24
+ const CodemodFooter = ({ codemod, stack, valid, loadingNotification, successNotification, errorNotification, genericSubmitLabel, submitLabel, onSuccess, fallbackToRootFile = false, applyCodemod, applyCodemodForPreview, }) => {
25
25
  var _a;
26
26
  const [submitting, setSubmitting] = (0, react_1.useState)(false);
27
27
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
@@ -79,12 +79,14 @@ const CodemodFooter = ({ codemod, stack, valid, loadingNotification, successNoti
79
79
  symbolicatedStack,
80
80
  ]);
81
81
  const getCanApplyCodemod = (0, react_1.useCallback)(async (signal) => {
82
- const res = await (0, actions_1.applyCodemod)({
83
- codemod,
84
- dryRun: true,
85
- symbolicatedStack,
86
- signal,
87
- });
82
+ const res = applyCodemodForPreview
83
+ ? await applyCodemodForPreview({ signal, symbolicatedStack })
84
+ : await (0, actions_1.applyCodemod)({
85
+ codemod,
86
+ dryRun: true,
87
+ symbolicatedStack,
88
+ signal,
89
+ });
88
90
  if (res.success) {
89
91
  setCanApplyCodemod({ type: 'success', diff: res.diff });
90
92
  }
@@ -94,7 +96,7 @@ const CodemodFooter = ({ codemod, stack, valid, loadingNotification, successNoti
94
96
  error: res.reason,
95
97
  });
96
98
  }
97
- }, [codemod, symbolicatedStack]);
99
+ }, [applyCodemodForPreview, codemod, symbolicatedStack]);
98
100
  (0, react_1.useEffect)(() => {
99
101
  if (!stack) {
100
102
  if (fallbackToRootFile) {
@@ -44,7 +44,7 @@ const DeleteCompositionLoaded = ({ compositionId }) => {
44
44
  dryRun: false,
45
45
  signal,
46
46
  symbolicatedStack,
47
- }) }) })
47
+ }), applyCodemodForPreview: null }) })
48
48
  ] })
49
49
  ] }));
50
50
  };
@@ -38,7 +38,7 @@ const DeleteFolder = ({ folderName, parentName, stack }) => {
38
38
  dryRun: false,
39
39
  signal,
40
40
  symbolicatedStack,
41
- }) }) })
41
+ }), applyCodemodForPreview: null }) })
42
42
  ] })
43
43
  ] }));
44
44
  };
@@ -11,10 +11,10 @@ const ModalFooter_1 = require("../ModalFooter");
11
11
  const ModalHeader_1 = require("../ModalHeader");
12
12
  const layout_2 = require("../RenderModal/layout");
13
13
  const ResolveCompositionBeforeModal_1 = require("../RenderModal/ResolveCompositionBeforeModal");
14
- const actions_1 = require("../RenderQueue/actions");
15
14
  const CodemodFooter_1 = require("./CodemodFooter");
16
15
  const ComboBox_1 = require("./ComboBox");
17
16
  const DismissableModal_1 = require("./DismissableModal");
17
+ const duplicate_composition_api_1 = require("./duplicate-composition-api");
18
18
  const InputAndValidationContainer_1 = require("./InputAndValidationContainer");
19
19
  const InputDragger_1 = require("./InputDragger");
20
20
  const NewCompDuration_1 = require("./NewCompDuration");
@@ -203,11 +203,16 @@ const DuplicateCompositionLoaded = ({ initialType }) => {
203
203
  ] })
204
204
  ] })) : null, type === 'composition' && hadDurationDefined ? (jsx_runtime_1.jsx(NewCompDuration_1.NewCompDuration, { durationInFrames: durationInFrames, setDurationInFrames: setDurationInFrames })) : null, type === 'composition' && hadFpsDefined ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
205
205
  jsx_runtime_1.jsx("div", { style: layout_2.label, children: "FPS" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: selectedFrameRate, onTextChange: onTextFpsChange, placeholder: "Frame rate (fps)", name: "fps", min: 1, required: true, status: "ok", max: 240, step: 0.01, onValueChange: onFpsChange, rightAlign: false }) })
206
- ] })) : null] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Duplicating...', errorNotification: 'Could not duplicate composition', successNotification: `Duplicated ${unresolved.id} as ${newId}`, genericSubmitLabel: 'Duplicate', submitLabel: ({ relativeRootPath }) => `Add to ${relativeRootPath}`, codemod: codemod, stack: compositionStack, valid: valid, onSuccess: onDuplicateSuccess, applyCodemod: ({ signal, symbolicatedStack }) => (0, actions_1.applyCodemod)({
206
+ ] })) : null] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Duplicating...', errorNotification: 'Could not duplicate composition', successNotification: `Duplicated ${unresolved.id} as ${newId}`, genericSubmitLabel: 'Duplicate', submitLabel: ({ relativeRootPath }) => `Add to ${relativeRootPath}`, codemod: codemod, stack: compositionStack, valid: valid, onSuccess: onDuplicateSuccess, applyCodemod: ({ signal, symbolicatedStack }) => (0, duplicate_composition_api_1.duplicateComposition)({
207
207
  codemod,
208
208
  dryRun: false,
209
209
  signal,
210
210
  symbolicatedStack,
211
+ }), applyCodemodForPreview: ({ signal, symbolicatedStack }) => (0, duplicate_composition_api_1.duplicateComposition)({
212
+ codemod,
213
+ dryRun: true,
214
+ signal,
215
+ symbolicatedStack,
211
216
  }) }) })
212
217
  ] })
213
218
  ] }));
@@ -160,7 +160,7 @@ const NewCompositionLoaded = ({ canvasCapture, folderName, parentName, stack })
160
160
  ] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: null, errorNotification: "Could not create composition", successNotification: `Created ${newId}`, genericSubmitLabel: "Add to root file", submitLabel: ({ relativeRootPath }) => `Add to ${relativeRootPath}`, codemod: codemod, stack: stack, valid: valid, onSuccess: null, applyCodemod: ({ signal, symbolicatedStack }) => createCanvasCaptureComposition({
161
161
  signal,
162
162
  symbolicatedStack,
163
- }), fallbackToRootFile: true }) })
163
+ }), applyCodemodForPreview: null, fallbackToRootFile: true }) })
164
164
  ] })
165
165
  ] }));
166
166
  };
@@ -79,7 +79,7 @@ const NewFolder = ({ parentName, stack }) => {
79
79
  dryRun: false,
80
80
  signal,
81
81
  symbolicatedStack,
82
- }) }) })
82
+ }), applyCodemodForPreview: null }) })
83
83
  ] })
84
84
  ] }));
85
85
  };
@@ -63,7 +63,7 @@ const RenameCompositionLoaded = () => {
63
63
  newCompositionId: newId,
64
64
  signal,
65
65
  symbolicatedStack,
66
- }) }) })
66
+ }), applyCodemodForPreview: null }) })
67
67
  ] })
68
68
  ] }));
69
69
  };
@@ -67,7 +67,7 @@ const RenameFolder = ({ folderName, parentName, stack }) => {
67
67
  dryRun: false,
68
68
  signal,
69
69
  symbolicatedStack,
70
- }) }) })
70
+ }), applyCodemodForPreview: null }) })
71
71
  ] })
72
72
  ] }));
73
73
  };
@@ -0,0 +1,16 @@
1
+ import type { DuplicateCompositionResponse, SymbolicatedStackFrame } from '@remotion/studio-shared';
2
+ export declare const duplicateComposition: ({ codemod, dryRun, signal, symbolicatedStack, }: {
3
+ codemod: {
4
+ type: "duplicate-composition";
5
+ idToDuplicate: string;
6
+ newId: string;
7
+ newHeight: number | null;
8
+ newWidth: number | null;
9
+ newFps: number | null;
10
+ newDurationInFrames: number | null;
11
+ tag: "Composition" | "Still";
12
+ };
13
+ dryRun: boolean;
14
+ signal: AbortSignal;
15
+ symbolicatedStack: SymbolicatedStackFrame | null;
16
+ }) => Promise<DuplicateCompositionResponse>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.duplicateComposition = void 0;
4
+ const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
5
+ const actions_1 = require("../RenderQueue/actions");
6
+ const duplicateComposition = ({ codemod, dryRun, signal, symbolicatedStack, }) => {
7
+ const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
8
+ if (browserStudioOperations === null) {
9
+ return (0, actions_1.applyCodemod)({ codemod, dryRun, signal, symbolicatedStack }).then((result) => (result.success ? result : { ...result, stack: '' }));
10
+ }
11
+ return browserStudioOperations.duplicateComposition({
12
+ codemod,
13
+ dryRun,
14
+ });
15
+ };
16
+ exports.duplicateComposition = duplicateComposition;
@@ -36,7 +36,7 @@ const NoRegisterRoot = () => {
36
36
  if (!show) {
37
37
  return null;
38
38
  }
39
- return (jsx_runtime_1.jsxs(remotion_1.AbsoluteFill, { style: container, children: [
39
+ return (jsx_runtime_1.jsxs(remotion_1.Internals.AbsoluteFillElement, { style: container, children: [
40
40
  jsx_runtime_1.jsx("div", { style: label, children: "Waiting for registerRoot() to get called." }), jsx_runtime_1.jsxs("div", { style: label, children: ["Learn more:", ' ', jsx_runtime_1.jsx("a", { target: '_blank', style: link, href: "https://www.remotion.dev/docs/register-root", children: "remotion.dev/docs/register-root" })
41
41
  ] })
42
42
  ] }));
@@ -8,12 +8,13 @@ const colors_1 = require("../../helpers/colors");
8
8
  const use_keybinding_1 = require("../../helpers/use-keybinding");
9
9
  const modals_1 = require("../../state/modals");
10
10
  const quickSwitcherArea = {
11
- padding: '4px 12px',
11
+ padding: '4px 0 4px 4px',
12
12
  borderBottom: `1px solid ${colors_1.BLACK_HEX}`,
13
+ overflowY: 'auto',
13
14
  };
14
15
  const quickSwitcherTrigger = {
15
16
  backgroundColor: colors_1.WHITE_ALPHA_06,
16
- borderRadius: 5,
17
+ borderRadius: 4,
17
18
  padding: '4px 10px',
18
19
  color: colors_1.LIGHT_TEXT,
19
20
  fontSize: 12,
@@ -40,6 +41,6 @@ const ExplorerQuickSwitcherTrigger = ({ mode, showShortcut, tabIndex }) => {
40
41
  compositionSelection: null,
41
42
  });
42
43
  }, [mode, setSelectedModal]);
43
- return (jsx_runtime_1.jsx("div", { style: quickSwitcherArea, children: jsx_runtime_1.jsxs("button", { type: "button", style: quickSwitcherTrigger, onClick: openQuickSwitcher, tabIndex: tabIndex, children: ["Search...", showShortcut && !(0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? (jsx_runtime_1.jsxs("span", { style: shortcutLabel, children: [ShortcutHint_1.cmdOrCtrlCharacter, "+K"] })) : null] }) }));
44
+ return (jsx_runtime_1.jsx("div", { style: quickSwitcherArea, className: "__remotion-vertical-scrollbar", children: jsx_runtime_1.jsxs("button", { type: "button", style: quickSwitcherTrigger, onClick: openQuickSwitcher, tabIndex: tabIndex, children: ["Search...", showShortcut && !(0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? (jsx_runtime_1.jsxs("span", { style: shortcutLabel, children: [ShortcutHint_1.cmdOrCtrlCharacter, "+K"] })) : null] }) }));
44
45
  };
45
46
  exports.ExplorerQuickSwitcherTrigger = ExplorerQuickSwitcherTrigger;
@@ -353,6 +353,7 @@ const QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio
353
353
  const container = (0, react_1.useMemo)(() => {
354
354
  return {
355
355
  width: showKeyboardShortcuts ? 800 : 400,
356
+ maxWidth: 'calc(100vw - 40px)',
356
357
  };
357
358
  }, [showKeyboardShortcuts]);
358
359
  const results = (0, react_1.useMemo)(() => {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fuzzySearch = fuzzySearch;
4
4
  function fuzzySearch(query, dataset) {
5
- const q = query ? query.trim().toLowerCase() : '';
5
+ const q = query.trim().toLowerCase().replace(/[\s-]/g, '');
6
6
  const matchingIndices = [];
7
7
  if (q.length === 0) {
8
8
  for (let i = 0; i < dataset.length; i++) {
@@ -15,6 +15,6 @@ const shadow = {
15
15
  boxShadow: colors_1.SHADOW_BLACK,
16
16
  };
17
17
  const RefreshCompositionOverlay = () => {
18
- return (jsx_runtime_1.jsx(remotion_1.AbsoluteFill, { style: exports.container, children: jsx_runtime_1.jsx("div", { style: shadow, children: jsx_runtime_1.jsx(RunningCalculateMetadata_1.RunningCalculateMetadata, {}) }) }));
18
+ return (jsx_runtime_1.jsx(remotion_1.Internals.AbsoluteFillElement, { style: exports.container, children: jsx_runtime_1.jsx("div", { style: shadow, children: jsx_runtime_1.jsx(RunningCalculateMetadata_1.RunningCalculateMetadata, {}) }) }));
19
19
  };
20
20
  exports.RefreshCompositionOverlay = RefreshCompositionOverlay;
@@ -42,6 +42,7 @@ const player_1 = require("@remotion/player");
42
42
  const react_1 = __importStar(require("react"));
43
43
  const react_dom_1 = __importDefault(require("react-dom"));
44
44
  const remotion_1 = require("remotion");
45
+ const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
45
46
  const client_id_1 = require("../helpers/client-id");
46
47
  const colors_1 = require("../helpers/colors");
47
48
  const use_keybinding_1 = require("../helpers/use-keybinding");
@@ -200,18 +201,19 @@ const RenderButtonInner = ({ readOnlyStudio, size: controlSize = 'default', narr
200
201
  }, [refresh]);
201
202
  const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
202
203
  .previewServerState.type;
203
- const canServerRender = connectionStatus === 'connected';
204
+ const isBrowserStudio = (0, browser_studio_operations_1.getBrowserStudioOperations)() !== null;
205
+ const canServerRender = connectionStatus === 'connected' && !isBrowserStudio;
204
206
  const renderType = (0, react_1.useMemo)(() => {
205
207
  if (readOnlyStudio) {
206
208
  return preferredRenderType === 'render-command'
207
209
  ? 'render-command'
208
210
  : 'client-render';
209
211
  }
210
- if (connectionStatus === 'disconnected') {
212
+ if (connectionStatus === 'disconnected' || isBrowserStudio) {
211
213
  return 'client-render';
212
214
  }
213
215
  return preferredRenderType;
214
- }, [connectionStatus, preferredRenderType, readOnlyStudio]);
216
+ }, [connectionStatus, isBrowserStudio, preferredRenderType, readOnlyStudio]);
215
217
  const shortcut = (0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? '' : '(R)';
216
218
  const tooltip = renderType === 'render-command'
217
219
  ? 'Copy a CLI command to render this composition ' + shortcut
@@ -325,6 +327,7 @@ const RenderButtonInner = ({ readOnlyStudio, size: controlSize = 'default', narr
325
327
  initialTransparent: null,
326
328
  initialMuted: null,
327
329
  initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes,
330
+ initialAllowHtmlInCanvas: defaults.allowHtmlInCanvas,
328
331
  initialPageResponsiveness: 'medium',
329
332
  });
330
333
  }, [video, setSelectedModal, props, inFrame, outFrame, getCurrentFrame]);
@@ -79,7 +79,7 @@ const validateOutnameForStill = ({ outName, stillImageFormat, }) => {
79
79
  // TODO: Shortcut: Shift + R
80
80
  // TODO: Apply defaultCodec
81
81
  // TODO: Apply defaultOutName
82
- const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark, initialLogLevel, initialStillImageFormat, initialDefaultOutName, initialScale, initialDelayRenderTimeout, initialMediaCacheSizeInBytes, initialContainer, initialVideoCodec, initialAudioCodec, initialAudioBitrate, initialVideoBitrate, initialHardwareAcceleration, initialKeyframeIntervalInSeconds, initialTransparent, initialMuted, initialPageResponsiveness, }) => {
82
+ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark, initialLogLevel, initialStillImageFormat, initialDefaultOutName, initialScale, initialDelayRenderTimeout, initialMediaCacheSizeInBytes, initialContainer, initialVideoCodec, initialAudioCodec, initialAudioBitrate, initialVideoBitrate, initialHardwareAcceleration, initialKeyframeIntervalInSeconds, initialTransparent, initialMuted, initialAllowHtmlInCanvas, initialPageResponsiveness, }) => {
83
83
  var _a;
84
84
  const context = (0, react_1.useContext)(ResolveCompositionBeforeModal_1.ResolvedCompositionContext);
85
85
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
@@ -127,6 +127,7 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
127
127
  const [transparent, setTransparent] = (0, react_1.useState)(initialTransparent !== null && initialTransparent !== void 0 ? initialTransparent : false);
128
128
  const [muted, setMuted] = (0, react_1.useState)(initialMuted !== null && initialMuted !== void 0 ? initialMuted : false);
129
129
  const [scale, setScale] = (0, react_1.useState)(initialScale !== null && initialScale !== void 0 ? initialScale : 1);
130
+ const [allowHtmlInCanvas, setAllowHtmlInCanvas] = (0, react_1.useState)(initialAllowHtmlInCanvas !== null && initialAllowHtmlInCanvas !== void 0 ? initialAllowHtmlInCanvas : false);
130
131
  const [pageResponsiveness, setPageResponsiveness] = (0, react_1.useState)(initialPageResponsiveness !== null && initialPageResponsiveness !== void 0 ? initialPageResponsiveness : 'medium');
131
132
  const encodableAudioCodecs = (0, use_encodable_audio_codecs_1.useEncodableAudioCodecs)(container);
132
133
  const encodableVideoCodecs = (0, use_encodable_video_codecs_1.useEncodableVideoCodecs)(container);
@@ -340,6 +341,7 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
340
341
  logLevel,
341
342
  licenseKey: publicLicenseKey,
342
343
  scale,
344
+ allowHtmlInCanvas,
343
345
  }, compositionRef);
344
346
  }
345
347
  else {
@@ -366,6 +368,7 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
366
368
  logLevel,
367
369
  licenseKey: publicLicenseKey,
368
370
  scale,
371
+ allowHtmlInCanvas,
369
372
  pageResponsiveness,
370
373
  }, compositionRef);
371
374
  }
@@ -407,6 +410,7 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
407
410
  addClientStillJob,
408
411
  addClientVideoJob,
409
412
  scale,
413
+ allowHtmlInCanvas,
410
414
  pageResponsiveness,
411
415
  ]);
412
416
  return (jsx_runtime_1.jsxs("div", { style: render_modals_1.outerModalStyle, children: [
@@ -422,7 +426,7 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
422
426
  canUpdate: false,
423
427
  reason: 'render dialogue',
424
428
  determined: false,
425
- } })) : 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 })) : null })
429
+ } })) : 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 })) : null })
426
430
  ] })
427
431
  ] }));
428
432
  };
@@ -9,6 +9,8 @@ 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>>;
12
14
  readonly pageResponsiveness: WebRendererPageResponsiveness;
13
15
  readonly setPageResponsiveness: React.Dispatch<React.SetStateAction<WebRendererPageResponsiveness>>;
14
16
  };
@@ -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, pageResponsiveness, setPageResponsiveness, }) => {
33
+ const WebRenderModalAdvanced = ({ renderMode, delayRenderTimeout, setDelayRenderTimeout, mediaCacheSizeInBytes, setMediaCacheSizeInBytes, hardwareAcceleration, setHardwareAcceleration, allowHtmlInCanvas, setAllowHtmlInCanvas, pageResponsiveness, setPageResponsiveness, }) => {
34
34
  const toggleCustomMediaCacheSizeInBytes = (0, react_1.useCallback)(() => {
35
35
  setMediaCacheSizeInBytes((previous) => {
36
36
  if (previous === null) {
@@ -39,6 +39,9 @@ const WebRenderModalAdvanced = ({ renderMode, delayRenderTimeout, setDelayRender
39
39
  return null;
40
40
  });
41
41
  }, [setMediaCacheSizeInBytes]);
42
+ const toggleAllowHtmlInCanvas = (0, react_1.useCallback)(() => {
43
+ setAllowHtmlInCanvas((previous) => !previous);
44
+ }, [setAllowHtmlInCanvas]);
42
45
  const changeMediaCacheSizeInBytes = (0, react_1.useCallback)((cb) => {
43
46
  setMediaCacheSizeInBytes((prev) => {
44
47
  if (prev === null) {
@@ -160,7 +163,11 @@ const WebRenderModalAdvanced = ({ renderMode, delayRenderTimeout, setDelayRender
160
163
  ] }), 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" }) })
161
164
  ] }), 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: [
162
165
  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" }) })
163
- ] })) : null, renderMode === 'still' ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
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: [
164
171
  jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
165
172
  jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Page Responsiveness ",
166
173
  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" })
@@ -20,15 +20,19 @@ exports.container = {
20
20
  exports.optionsPanel = {
21
21
  display: 'flex',
22
22
  flex: 1,
23
+ minHeight: 0,
23
24
  minWidth: 0,
25
+ overflowY: 'auto',
24
26
  };
25
27
  exports.horizontalLayout = {
26
28
  display: 'flex',
27
29
  flexDirection: 'row',
28
- overflowY: 'auto',
29
30
  flex: 1,
31
+ minHeight: 0,
32
+ overflow: 'hidden',
30
33
  };
31
34
  exports.leftSidebar = {
35
+ flexShrink: 0,
32
36
  padding: 6,
33
37
  };
34
38
  exports.horizontalTab = {
@@ -4,6 +4,7 @@ exports.ClientRenderQueueProcessor = void 0;
4
4
  const web_renderer_1 = require("@remotion/web-renderer");
5
5
  const react_1 = require("react");
6
6
  const save_render_output_1 = require("../../api/save-render-output");
7
+ const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
7
8
  const download_blob_1 = require("../../helpers/download-blob");
8
9
  const context_1 = require("./context");
9
10
  const ClientRenderQueueProcessor = () => {
@@ -33,6 +34,7 @@ const ClientRenderQueueProcessor = () => {
33
34
  licenseKey: (_b = job.licenseKey) !== null && _b !== void 0 ? _b : undefined,
34
35
  scale: job.scale,
35
36
  signal,
37
+ allowHtmlInCanvas: job.allowHtmlInCanvas,
36
38
  })).blob({ format: job.imageFormat });
37
39
  return {
38
40
  getBlob: () => Promise.resolve(blob),
@@ -86,6 +88,7 @@ const ClientRenderQueueProcessor = () => {
86
88
  outputTarget: 'web-fs',
87
89
  licenseKey: (_c = job.licenseKey) !== null && _c !== void 0 ? _c : undefined,
88
90
  pageResponsiveness: job.pageResponsiveness,
91
+ allowHtmlInCanvas: job.allowHtmlInCanvas,
89
92
  });
90
93
  return {
91
94
  getBlob,
@@ -118,7 +121,8 @@ const ClientRenderQueueProcessor = () => {
118
121
  (0, download_blob_1.downloadBlob)(blob, job.outName);
119
122
  markClientJobDone(job.id, metadata, getBlob);
120
123
  };
121
- if (window.remotion_isReadOnlyStudio) {
124
+ if (window.remotion_isReadOnlyStudio ||
125
+ (0, browser_studio_operations_1.getBrowserStudioOperations)() !== null) {
122
126
  downloadAndFinish();
123
127
  }
124
128
  else {
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.applyVisualControlChange = exports.callUpdateDefaultPropsApi = exports.getProjectInfo = exports.updateAvailable = exports.cancelRenderJob = exports.removeRenderJob = exports.applyCodemod = exports.openInFileExplorer = exports.subscribeToFileExistenceWatcher = exports.unsubscribeFromFileExistenceWatcher = exports.addVideoRenderJob = exports.addSequenceRenderJob = exports.addStillRenderJob = void 0;
4
4
  const no_react_1 = require("remotion/no-react");
5
+ const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
5
6
  const call_api_1 = require("../call-api");
6
7
  const addStillRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, logLevel, chromiumOptions, delayRenderTimeout, envVariables, inputProps, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, multiProcessOnLinux, beepOnFinish, metadata, chromeMode, mediaCacheSizeInBytes, licenseKey, }) => {
7
8
  return (0, call_api_1.callApi)('/api/render', {
@@ -142,6 +143,10 @@ const applyCodemod = ({ codemod, dryRun, symbolicatedStack, signal, }) => {
142
143
  dryRun,
143
144
  symbolicatedStack,
144
145
  };
146
+ const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
147
+ if (browserStudioOperations !== null) {
148
+ return browserStudioOperations.applyCodemod(body);
149
+ }
145
150
  return (0, call_api_1.callApi)('/api/apply-codemod', body, signal);
146
151
  };
147
152
  exports.applyCodemod = applyCodemod;
@@ -166,7 +171,7 @@ const getProjectInfo = (signal) => {
166
171
  };
167
172
  exports.getProjectInfo = getProjectInfo;
168
173
  const callUpdateDefaultPropsApi = (compositionId, defaultProps, enumPaths) => {
169
- return (0, call_api_1.callApi)('/api/update-default-props', {
174
+ const body = {
170
175
  compositionId,
171
176
  defaultProps: no_react_1.NoReactInternals.serializeJSONWithSpecialTypes({
172
177
  data: defaultProps,
@@ -174,7 +179,12 @@ const callUpdateDefaultPropsApi = (compositionId, defaultProps, enumPaths) => {
174
179
  staticBase: window.remotion_staticBase,
175
180
  }).serializedString,
176
181
  enumPaths,
177
- });
182
+ };
183
+ const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
184
+ if (browserStudioOperations !== null) {
185
+ return browserStudioOperations.updateDefaultProps(body);
186
+ }
187
+ return (0, call_api_1.callApi)('/api/update-default-props', body);
178
188
  };
179
189
  exports.callUpdateDefaultPropsApi = callUpdateDefaultPropsApi;
180
190
  const applyVisualControlChange = ({ fileName, changes, }) => {
@@ -40,6 +40,7 @@ type ClientRenderJobBase = {
40
40
  logLevel: LogLevel;
41
41
  licenseKey: string | null;
42
42
  scale: number;
43
+ allowHtmlInCanvas: boolean;
43
44
  };
44
45
  export type ClientStillRenderJob = ClientRenderJobBase & {
45
46
  type: 'client-still';
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const RenderingSettings: React.FC;