@remotion/studio 4.0.502 → 4.0.504

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 (217) hide show
  1. package/dist/api/install-package.d.ts +2 -1
  2. package/dist/api/install-package.js +6 -2
  3. package/dist/components/AssetSelectorItem.js +4 -16
  4. package/dist/components/Canvas.js +41 -54
  5. package/dist/components/CheckboardToggle.js +3 -1
  6. package/dist/components/ColorPicker/AlphaSlider.js +14 -10
  7. package/dist/components/ColorPicker/HueSlider.js +14 -10
  8. package/dist/components/ColorPicker/SaturationValueArea.js +14 -12
  9. package/dist/components/CompositionContextButton.js +1 -1
  10. package/dist/components/CompositionSelectorItem.js +2 -3
  11. package/dist/components/ConfigureDefaultEditorModal.d.ts +2 -0
  12. package/dist/components/ConfigureDefaultEditorModal.js +151 -0
  13. package/dist/components/ConfirmationDialog.js +6 -3
  14. package/dist/components/ContextMenu.js +0 -2
  15. package/dist/components/ControlButton.d.ts +4 -2
  16. package/dist/components/ControlButton.js +6 -20
  17. package/dist/components/Editor.js +1 -4
  18. package/dist/components/EditorContent.js +1 -1
  19. package/dist/components/EditorGuides/Guide.js +48 -74
  20. package/dist/components/EditorRuler/Ruler.d.ts +1 -0
  21. package/dist/components/EditorRuler/Ruler.js +3 -1
  22. package/dist/components/EditorRuler/index.js +26 -23
  23. package/dist/components/EffectPickerModal.js +68 -7
  24. package/dist/components/ElementInstallConfirmation.d.ts +12 -0
  25. package/dist/components/ElementInstallConfirmation.js +205 -0
  26. package/dist/components/ForceSpecificCursor.js +14 -0
  27. package/dist/components/FullscreenToggle.js +1 -2
  28. package/dist/components/InitialCompositionLoader.js +1 -14
  29. package/dist/components/InlineAction.d.ts +4 -4
  30. package/dist/components/InlineAction.js +6 -4
  31. package/dist/components/InspectorLocationCopy.d.ts +1 -0
  32. package/dist/components/InspectorLocationCopy.js +7 -3
  33. package/dist/components/InspectorOpenInEditor.d.ts +5 -0
  34. package/dist/components/InspectorOpenInEditor.js +135 -0
  35. package/dist/components/InspectorPanel/AlignmentControls.js +1 -1
  36. package/dist/components/InspectorPanel/CompositionInspectorHeader.js +3 -3
  37. package/dist/components/InspectorPanel/CompositionMetadata.js +8 -7
  38. package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +2 -2
  39. package/dist/components/InspectorPanel/KeyframeInspector.js +2 -3
  40. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +2 -2
  41. package/dist/components/InspectorPanel/styles.js +4 -0
  42. package/dist/components/InspectorSequenceSection.js +2 -2
  43. package/dist/components/LoopToggle.js +1 -1
  44. package/dist/components/Menu/MenuItem.js +13 -6
  45. package/dist/components/Menu/MenuSubItem.js +3 -1
  46. package/dist/components/MenuBuildIndicator.d.ts +3 -1
  47. package/dist/components/MenuBuildIndicator.js +6 -4
  48. package/dist/components/MenuCompositionName.js +1 -1
  49. package/dist/components/MenuToolbar.js +1 -1
  50. package/dist/components/MobilePanel.d.ts +1 -2
  51. package/dist/components/MobilePanel.js +6 -6
  52. package/dist/components/ModalContainer.js +1 -1
  53. package/dist/components/ModalFooter.d.ts +1 -0
  54. package/dist/components/ModalFooter.js +2 -2
  55. package/dist/components/Modals.js +11 -2
  56. package/dist/components/MuteToggle.js +2 -1
  57. package/dist/components/NewComposition/ComboBox.d.ts +1 -0
  58. package/dist/components/NewComposition/ComboBox.js +2 -2
  59. package/dist/components/NewComposition/InputDragger.d.ts +4 -0
  60. package/dist/components/NewComposition/InputDragger.js +26 -32
  61. package/dist/components/Notifications/NotificationCenter.js +12 -2
  62. package/dist/components/OutlineToggle.js +10 -2
  63. package/dist/components/PlayPause.js +1 -5
  64. package/dist/components/PlaybackRateSelector.js +2 -1
  65. package/dist/components/PreviewToolbar.js +8 -7
  66. package/dist/components/PreviewToolbarOverflowButton.d.ts +0 -1
  67. package/dist/components/PreviewToolbarOverflowButton.js +2 -75
  68. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -2
  69. package/dist/components/RenderButton.d.ts +0 -1
  70. package/dist/components/RenderButton.js +10 -9
  71. package/dist/components/RenderModal/FrameRangeSetting.js +6 -1
  72. package/dist/components/RenderModal/InlineEyeIcon.js +1 -1
  73. package/dist/components/RenderModal/InlineRemoveButton.js +1 -1
  74. package/dist/components/RenderModal/MultiRangeSlider.js +8 -8
  75. package/dist/components/RenderModal/RenderModalEnvironmentVariables.js +1 -9
  76. package/dist/components/RenderModal/RenderModalOutputName.js +12 -3
  77. package/dist/components/RenderModal/SchemaEditor/SchemaResetButton.js +1 -1
  78. package/dist/components/RenderModal/ServerRenderModal.js +2 -17
  79. package/dist/components/RenderModal/WebRenderModal.js +3 -17
  80. package/dist/components/RenderModal/layout.js +7 -5
  81. package/dist/components/RenderModal/render-modals.js +18 -15
  82. package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +1 -1
  83. package/dist/components/RenderQueue/RenderQueueDownloadItem.js +1 -1
  84. package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +1 -1
  85. package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +1 -1
  86. package/dist/components/RenderQueue/RenderQueueRemoveItem.js +1 -1
  87. package/dist/components/RenderQueue/RenderQueueRepeat.js +2 -15
  88. package/dist/components/SelectedOutlineCropControls.js +7 -6
  89. package/dist/components/SelectedOutlineElement.js +32 -38
  90. package/dist/components/SelectedOutlineUvControls.js +25 -24
  91. package/dist/components/ShowGuidesProvider.js +2 -0
  92. package/dist/components/SidebarCollapserControls.js +2 -2
  93. package/dist/components/SidebarRenderButton.js +2 -16
  94. package/dist/components/SizeSelector.js +2 -1
  95. package/dist/components/SnappingToggle.js +1 -2
  96. package/dist/components/Spinner.d.ts +1 -0
  97. package/dist/components/Spinner.js +2 -2
  98. package/dist/components/Splitter/SplitterContainer.d.ts +1 -0
  99. package/dist/components/Splitter/SplitterContainer.js +4 -1
  100. package/dist/components/Splitter/SplitterContext.d.ts +4 -3
  101. package/dist/components/Splitter/SplitterContext.js +3 -2
  102. package/dist/components/Splitter/SplitterElement.js +6 -1
  103. package/dist/components/Splitter/SplitterHandle.js +18 -68
  104. package/dist/components/Tabs/vertical.d.ts +1 -0
  105. package/dist/components/Tabs/vertical.js +8 -10
  106. package/dist/components/TimeValue.js +26 -8
  107. package/dist/components/Timeline/EasingEditorModal.js +27 -19
  108. package/dist/components/Timeline/Timeline.js +1 -1
  109. package/dist/components/Timeline/TimelineAssetField.js +1 -1
  110. package/dist/components/Timeline/TimelineClipboardKeybindings.js +3 -6
  111. package/dist/components/Timeline/TimelineDeleteKeybindings.js +5 -7
  112. package/dist/components/Timeline/TimelineDragHandler.js +38 -7
  113. package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +2 -1
  114. package/dist/components/Timeline/TimelineInOutDragHandler.js +26 -11
  115. package/dist/components/Timeline/TimelineKeyframeEasingLine.d.ts +1 -1
  116. package/dist/components/Timeline/TimelineKeyframeEasingLine.js +2 -2
  117. package/dist/components/Timeline/TimelineLayerEye.js +36 -4
  118. package/dist/components/Timeline/TimelineSelection.js +16 -24
  119. package/dist/components/Timeline/TimelineSequence.js +7 -3
  120. package/dist/components/Timeline/TimelineSequenceItem.js +24 -18
  121. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +1 -1
  122. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +76 -43
  123. package/dist/components/Timeline/TimelineStack/get-stack.js +7 -2
  124. package/dist/components/Timeline/TimelineZoomControls.d.ts +3 -1
  125. package/dist/components/Timeline/TimelineZoomControls.js +24 -12
  126. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +4 -2
  127. package/dist/components/Timeline/get-sequence-context-menu-items.js +38 -2
  128. package/dist/components/Timeline/should-subscribe-to-source-file.d.ts +1 -0
  129. package/dist/components/Timeline/should-subscribe-to-source-file.js +11 -0
  130. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +2 -3
  131. package/dist/components/Timeline/use-open-sequence-in-editor.d.ts +3 -1
  132. package/dist/components/Timeline/use-open-sequence-in-editor.js +5 -2
  133. package/dist/components/Timeline/use-sequence-props-subscription.js +2 -0
  134. package/dist/components/Timeline/use-timeline-asset-drop.js +3 -7
  135. package/dist/components/Timeline/use-timeline-keyframe-drag.js +31 -16
  136. package/dist/components/TimelineInOutToggle.js +3 -3
  137. package/dist/components/TopPanel.js +3 -2
  138. package/dist/components/UndoRedoButtons.js +6 -5
  139. package/dist/components/UpdateCheck.d.ts +2 -0
  140. package/dist/components/UpdateCheck.js +29 -11
  141. package/dist/components/UpdateModal/UpdateModal.js +58 -19
  142. package/dist/components/VisualControls/ClickableFileName.js +5 -2
  143. package/dist/components/composition-menu-items.d.ts +2 -4
  144. package/dist/components/composition-menu-items.js +32 -55
  145. package/dist/components/element-install-request.d.ts +3 -0
  146. package/dist/components/element-install-request.js +17 -0
  147. package/dist/components/folder-menu-items.js +1 -1
  148. package/dist/components/handle-drop.d.ts +2 -3
  149. package/dist/components/handle-drop.js +11 -4
  150. package/dist/components/import-assets.d.ts +7 -6
  151. package/dist/components/import-assets.js +5 -16
  152. package/dist/components/use-default-editor-info.d.ts +4 -0
  153. package/dist/components/use-default-editor-info.js +47 -0
  154. package/dist/error-overlay/remotion-overlay/OpenInEditor.js +1 -1
  155. package/dist/error-overlay/remotion-overlay/StackFrame.js +1 -1
  156. package/dist/esm/{chunk-fjv75ty4.js → chunk-43m68z1k.js} +8689 -7374
  157. package/dist/esm/internals.mjs +8689 -7374
  158. package/dist/esm/previewEntry.mjs +8668 -7353
  159. package/dist/esm/renderEntry.mjs +1 -1
  160. package/dist/helpers/inject-css.js +58 -67
  161. package/dist/helpers/install-required-package.d.ts +3 -2
  162. package/dist/helpers/install-required-package.js +20 -15
  163. package/dist/helpers/open-in-editor.d.ts +3 -3
  164. package/dist/helpers/open-in-editor.js +10 -6
  165. package/dist/helpers/pointer-session.d.ts +9 -0
  166. package/dist/helpers/pointer-session.js +94 -0
  167. package/dist/helpers/use-menu-structure.js +109 -51
  168. package/dist/icons/audio.d.ts +1 -1
  169. package/dist/icons/audio.js +1 -1
  170. package/dist/icons/caret.js +1 -1
  171. package/dist/icons/certificate.d.ts +1 -1
  172. package/dist/icons/certificate.js +1 -1
  173. package/dist/icons/custom-editor.d.ts +4 -0
  174. package/dist/icons/custom-editor.js +11 -0
  175. package/dist/icons/data.d.ts +1 -1
  176. package/dist/icons/data.js +2 -2
  177. package/dist/icons/editor.d.ts +6 -0
  178. package/dist/icons/editor.js +52 -0
  179. package/dist/icons/effects.d.ts +5 -0
  180. package/dist/icons/effects.js +8 -0
  181. package/dist/icons/ellipsis.js +1 -1
  182. package/dist/icons/external-link.d.ts +5 -0
  183. package/dist/icons/external-link.js +10 -0
  184. package/dist/icons/fullscreen.js +1 -1
  185. package/dist/icons/gear.d.ts +1 -1
  186. package/dist/icons/gear.js +1 -1
  187. package/dist/icons/gif.d.ts +1 -1
  188. package/dist/icons/gif.js +1 -1
  189. package/dist/icons/input-props.d.ts +2 -0
  190. package/dist/icons/input-props.js +9 -0
  191. package/dist/icons/jump-to-start.js +2 -2
  192. package/dist/icons/magnet.d.ts +3 -1
  193. package/dist/icons/magnet.js +2 -2
  194. package/dist/icons/media-volume.d.ts +6 -2
  195. package/dist/icons/media-volume.js +8 -6
  196. package/dist/icons/minus.d.ts +3 -1
  197. package/dist/icons/minus.js +2 -2
  198. package/dist/icons/pause.js +1 -1
  199. package/dist/icons/play.js +1 -1
  200. package/dist/icons/plus.js +1 -1
  201. package/dist/icons/redo.js +2 -2
  202. package/dist/icons/step-back.js +2 -2
  203. package/dist/icons/step-forward.js +2 -2
  204. package/dist/icons/timelineInOutPointer.js +2 -2
  205. package/dist/icons/undo.js +2 -2
  206. package/dist/state/editor-guides.d.ts +1 -0
  207. package/dist/state/editor-guides.js +1 -0
  208. package/dist/state/modals.d.ts +2 -0
  209. package/dist/state/z-index.d.ts +1 -0
  210. package/dist/state/z-index.js +34 -18
  211. package/package.json +12 -13
  212. package/dist/components/StudioCanvasCapture.d.ts +0 -5
  213. package/dist/components/StudioCanvasCapture.js +0 -40
  214. package/dist/components/canvas-capture-enabled.d.ts +0 -1
  215. package/dist/components/canvas-capture-enabled.js +0 -4
  216. package/dist/components/use-element-overwrite-confirmation.d.ts +0 -2
  217. package/dist/components/use-element-overwrite-confirmation.js +0 -73
@@ -12,6 +12,7 @@ const InputDragger_1 = require("../NewComposition/InputDragger");
12
12
  const call_delete_keyframe_1 = require("../Timeline/call-delete-keyframe");
13
13
  const call_move_keyframe_1 = require("../Timeline/call-move-keyframe");
14
14
  const get_easing_selection_after_keyframe_delete_1 = require("../Timeline/get-easing-selection-after-keyframe-delete");
15
+ const imperative_state_1 = require("../Timeline/imperative-state");
15
16
  const parse_keyframe_field_from_node_path_1 = require("../Timeline/parse-keyframe-field-from-node-path");
16
17
  const TimelineEffectPropItem_1 = require("../Timeline/TimelineEffectPropItem");
17
18
  const TimelineSelection_1 = require("../Timeline/TimelineSelection");
@@ -54,7 +55,6 @@ const TrashIcon = ({ color }) => {
54
55
  const KeyframeInspector = ({ selection }) => {
55
56
  const track = (0, use_track_for_selection_1.useTrackForSelection)(selection);
56
57
  const videoConfig = (0, remotion_1.useVideoConfig)();
57
- const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
58
58
  const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
59
59
  const { clearDragOverrides, clearEffectDragOverrides, setDragOverrides, setEffectDragOverrides, setPropStatuses, } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
60
60
  const { getDragOverrides, getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
@@ -277,7 +277,7 @@ const KeyframeInspector = ({ selection }) => {
277
277
  keyframeDisplayOffset: details.keyframeDisplayOffset,
278
278
  nodePathInfo: selection.nodePathInfo,
279
279
  propStatus: details.propStatus,
280
- timelinePosition,
280
+ timelinePosition: (0, imperative_state_1.getCurrentFrame)(),
281
281
  })
282
282
  : null;
283
283
  if (easingSelection !== null) {
@@ -315,7 +315,6 @@ const KeyframeInspector = ({ selection }) => {
315
315
  selectItems,
316
316
  selection.nodePathInfo,
317
317
  setPropStatuses,
318
- timelinePosition,
319
318
  ]);
320
319
  if (details === null || track === null) {
321
320
  return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Keyframe unavailable" });
@@ -56,7 +56,7 @@ const useSequenceInspectorSourceLocation = (sequence) => {
56
56
  if (!canOpenInEditor) {
57
57
  return;
58
58
  }
59
- openInEditor();
59
+ openInEditor(null);
60
60
  }, [canOpenInEditor, openInEditor]);
61
61
  return {
62
62
  canOpenInEditor,
@@ -94,7 +94,7 @@ const SequenceInspectorHeader = ({ sourceLocation, track }) => {
94
94
  const onRename = (0, react_1.useCallback)((newName) => {
95
95
  saveName(newName).catch(() => undefined);
96
96
  }, [saveName]);
97
- return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: true, padding: "4px 0", children: jsx_runtime_1.jsxs(InspectorLocationCopy_1.InspectorLocationCopy, { location: sourceLocation.validatedLocation, name: componentName !== null && componentName !== void 0 ? componentName : null, children: [
97
+ return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: true, padding: "4px 0", children: jsx_runtime_1.jsxs(InspectorLocationCopy_1.InspectorLocationCopy, { location: sourceLocation.validatedLocation, name: componentName !== null && componentName !== void 0 ? componentName : null, openInEditorLocation: sourceLocation.validatedLocation, children: [
98
98
  jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: sequenceDisplayName, canRename: canRename, onCommit: onRename, size: "inspector" }), documentationLink ? (jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: false, style: defaultCursor, size: "compact", 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, renderIcon: renderReactIcon, size: "inline-action" })
99
99
  ] }) }));
100
100
  };
@@ -162,7 +162,9 @@ exports.detailRow = {
162
162
  };
163
163
  exports.detailLabel = {
164
164
  color: colors_1.LIGHT_TEXT,
165
+ fontFamily: 'sans-serif',
165
166
  fontSize: 13,
167
+ lineHeight: '20px',
166
168
  minWidth: 0,
167
169
  overflow: 'hidden',
168
170
  textOverflow: 'ellipsis',
@@ -170,8 +172,10 @@ exports.detailLabel = {
170
172
  };
171
173
  exports.detailValue = {
172
174
  color: colors_1.WHITE,
175
+ fontFamily: 'sans-serif',
173
176
  fontSize: 13,
174
177
  fontVariantNumeric: 'tabular-nums',
178
+ lineHeight: '20px',
175
179
  minWidth: 0,
176
180
  textAlign: 'right',
177
181
  wordBreak: 'break-word',
@@ -468,7 +468,7 @@ const InspectorSequenceSection = ({ sequence, readOnlyStudio, validatedLocation,
468
468
  setPropStatuses,
469
469
  validatedLocation.source,
470
470
  ]);
471
- const borderRadiusAction = borderRadiusGroup ? (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { disabled: borderRadiusConversion === null ||
471
+ const borderRadiusAction = borderRadiusGroup ? (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, disabled: borderRadiusConversion === null ||
472
472
  previewServerState.type !== 'connected', onClick: onConvertBorderRadius, title: borderRadiusConversion === null
473
473
  ? borderRadiusUsesShorthand
474
474
  ? 'A static border radius is required to use individual corners'
@@ -477,7 +477,7 @@ const InspectorSequenceSection = ({ sequence, readOnlyStudio, validatedLocation,
477
477
  ? 'Use individual corner radii'
478
478
  : 'Use one border radius value', renderAction: (color) => borderRadiusUsesShorthand ? (jsx_runtime_1.jsx(fullscreen_1.FullscreenIcon, { color: color, style: borderRadiusToggleIcon })) : (jsx_runtime_1.jsx(border_radius_1.BorderRadiusIcon, { color: color, style: borderRadiusToggleIcon })) })) : null;
479
479
  const effectsHeader = (jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderRow, children: [
480
- jsx_runtime_1.jsx("div", { style: effectsHeaderTitle, children: "Effects" }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { disabled: !canAddEffect, onClick: onAddEffect, title: canAddEffect ? 'Add effect' : undefined, renderAction: (color) => jsx_runtime_1.jsx(plus_1.Plus, { color: color, style: plusIcon }) })] }));
480
+ jsx_runtime_1.jsx("div", { style: effectsHeaderTitle, children: "Effects" }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, disabled: !canAddEffect, onClick: onAddEffect, title: canAddEffect ? 'Add effect' : undefined, renderAction: (color) => jsx_runtime_1.jsx(plus_1.Plus, { color: color, style: plusIcon }) })] }));
481
481
  const renderRow = ({ node, depth }) => {
482
482
  return (jsx_runtime_1.jsx(TimelineRowLayoutContext_1.TimelineRowLayoutContext.Provider, { value: TimelineRowLayoutContext_1.INSPECTOR_TIMELINE_ROW_LAYOUT, children: jsx_runtime_1.jsx(TimelineExpandedRow_1.TimelineExpandedRow, { node: node, depth: depth, nestedDepth: 0, rowDepthBase: 0, getIsExpanded: getIsExpanded, toggleTrack: toggleTrack, validatedLocation: validatedLocation, nodePath: nodePathInfo.sequenceSubscriptionKey, schema: schema, keyframeDisplayOffset: keyframeDisplayOffset, keyframeControlsMode: "inspector" }) }, JSON.stringify(node.nodePathInfo)));
483
483
  };
@@ -18,6 +18,6 @@ const LoopToggle = ({ loop, setLoop }) => {
18
18
  const onClick = (0, react_1.useCallback)(() => {
19
19
  (0, exports.toggleLoop)(setLoop);
20
20
  }, [setLoop]);
21
- return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: jsx_runtime_1.jsx("svg", { viewBox: "0 0 512 512", style: { width: 18, height: 18 }, children: jsx_runtime_1.jsx("path", { fill: loop ? colors_1.BLUE : colors_1.WHITE, d: "M493.544 181.463c11.956 22.605 18.655 48.4 18.452 75.75C511.339 345.365 438.56 416 350.404 416H192v47.495c0 22.475-26.177 32.268-40.971 17.475l-80-80c-9.372-9.373-9.372-24.569 0-33.941l80-80C166.138 271.92 192 282.686 192 304v48h158.875c52.812 0 96.575-42.182 97.12-94.992.155-15.045-3.17-29.312-9.218-42.046-4.362-9.185-2.421-20.124 4.8-27.284 4.745-4.706 8.641-8.555 11.876-11.786 11.368-11.352 30.579-8.631 38.091 5.571zM64.005 254.992c.545-52.81 44.308-94.992 97.12-94.992H320v47.505c0 22.374 26.121 32.312 40.971 17.465l80-80c9.372-9.373 9.372-24.569 0-33.941l-80-80C346.014 16.077 320 26.256 320 48.545V96H161.596C73.44 96 .661 166.635.005 254.788c-.204 27.35 6.495 53.145 18.452 75.75 7.512 14.202 26.723 16.923 38.091 5.57 3.235-3.231 7.13-7.08 11.876-11.786 7.22-7.16 9.162-18.098 4.8-27.284-6.049-12.735-9.374-27.001-9.219-42.046z" }) }) }));
21
+ return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: (color) => (jsx_runtime_1.jsx("svg", { viewBox: "0 0 512 512", style: { width: 18, height: 18 }, children: jsx_runtime_1.jsx("path", { fill: loop ? colors_1.BLUE : color, d: "M384 150.3V41.6l64 53.3v2l-64 53.3zM352 23.5V80H192C86 80 0 166 0 272c0 8.8 7.2 16 16 16s16-7.2 16-16c0-88.4 71.6-160 160-160h160v56.5c0 13 10.5 23.5 23.5 23.5 5.5 0 10.8-1.9 15-5.4l78-65c7.3-6.1 11.5-15.1 11.5-24.6v-2c0-9.5-4.2-18.5-11.5-24.6l-78-65c-4.2-3.5-9.5-5.4-15-5.4-13 0-23.5 10.5-23.5 23.5zM128 415.9v54.5l-64-53.3v-2l64-53.3v54.1zM160 400v-56.5c0-13-10.5-23.5-23.5-23.5-5.5 0-10.8 1.9-15 5.4l-78 65C36.2 396.5 32 405.5 32 415v2c0 9.5 4.2 18.5 11.5 24.6l78 65c4.2 3.5 9.5 5.4 15 5.4 13 0 23.5-10.5 23.5-23.5V432h160c106 0 192-86 192-192 0-8.8-7.2-16-16-16s-16 7.2-16 16c0 88.4-71.6 160-160 160H160z" }) })) }));
22
22
  };
23
23
  exports.LoopToggle = LoopToggle;
@@ -9,6 +9,7 @@ const player_1 = require("@remotion/player");
9
9
  const react_1 = require("react");
10
10
  const react_dom_1 = __importDefault(require("react-dom"));
11
11
  const colors_1 = require("../../helpers/colors");
12
+ const pointer_session_1 = require("../../helpers/pointer-session");
12
13
  const z_index_1 = require("../../state/z-index");
13
14
  const MenuContent_1 = require("../NewComposition/MenuContent");
14
15
  const is_menu_item_1 = require("./is-menu-item");
@@ -68,12 +69,18 @@ const MenuItem = ({ label: itemName, selected, id, onItemSelected, onItemHovered
68
69
  return;
69
70
  }
70
71
  onItemSelected(id);
71
- window.addEventListener('pointerup', (evt) => {
72
- if (!(0, is_menu_item_1.isMenuItem)(evt.target)) {
73
- onItemQuit();
74
- }
75
- }, {
76
- once: true,
72
+ (0, pointer_session_1.startPointerSession)({
73
+ event: e.nativeEvent,
74
+ target: e.currentTarget,
75
+ onEnd: (reason, evt) => {
76
+ if ((reason === 'pointerup' || reason === 'buttons-released') &&
77
+ evt) {
78
+ const target = document.elementFromPoint(evt.clientX, evt.clientY);
79
+ if (!target || !(0, is_menu_item_1.isMenuItem)(target)) {
80
+ onItemQuit();
81
+ }
82
+ }
83
+ },
77
84
  });
78
85
  }, [id, onItemQuit, onItemSelected]);
79
86
  const onMenuPointerDown = (0, react_1.useCallback)((e) => {
@@ -93,7 +93,9 @@ const MenuSubItem = ({ label, leaveLeftSpace, leftItem, onActionChosen, id, sele
93
93
  const minSpaceRequired = mobileLayout
94
94
  ? styles_1.MAX_MOBILE_MENU_WIDTH
95
95
  : styles_1.MAX_MENU_WIDTH;
96
- const canOpenOnRight = size.windowSize.width - size.left - size.width >= minSpaceRequired;
96
+ const spaceToLeft = size.left;
97
+ const spaceToRight = size.windowSize.width - size.left - size.width;
98
+ const canOpenOnRight = spaceToRight >= minSpaceRequired || spaceToRight >= spaceToLeft;
97
99
  return {
98
100
  ...styles_1.menuContainerTowardsBottom,
99
101
  ...(canOpenOnRight
@@ -1,2 +1,4 @@
1
1
  import React from 'react';
2
- export declare const MenuBuildIndicator: React.FC;
2
+ export declare const MenuBuildIndicator: React.FC<{
3
+ readonly mobileLayout: boolean;
4
+ }>;
@@ -4,6 +4,7 @@ exports.MenuBuildIndicator = void 0;
4
4
  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
+ const colors_1 = require("../helpers/colors");
7
8
  const get_git_menu_item_1 = require("../helpers/get-git-menu-item");
8
9
  const open_in_editor_1 = require("../helpers/open-in-editor");
9
10
  const layout_1 = require("./layout");
@@ -41,7 +42,7 @@ const projectNameLinkHovered = {
41
42
  ...projectNameLinkBase,
42
43
  textDecoration: 'underline',
43
44
  };
44
- const MenuBuildIndicator = () => {
45
+ const MenuBuildIndicator = ({ mobileLayout }) => {
45
46
  const [isBuilding, setIsBuilding] = (0, react_1.useState)(false);
46
47
  const [projectNameHovered, setProjectNameHovered] = (0, react_1.useState)(false);
47
48
  const ctx = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx).previewServerState;
@@ -55,7 +56,7 @@ const MenuBuildIndicator = () => {
55
56
  originalColumnNumber: 1,
56
57
  originalFunctionName: null,
57
58
  originalScriptCode: null,
58
- })
59
+ }, null)
59
60
  .then(({ success }) => {
60
61
  if (!success) {
61
62
  (0, NotificationCenter_1.showNotification)(`Could not open ${window.remotion_editorName}`, 2000);
@@ -93,7 +94,8 @@ const MenuBuildIndicator = () => {
93
94
  window.remotion_finishedBuilding = undefined;
94
95
  };
95
96
  }, []);
96
- return (jsx_runtime_1.jsxs("div", { style: cwd, title: window.remotion_cwd, children: [isClickable ? jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }) : null, isBuilding ? (jsx_runtime_1.jsx("div", { style: spinner, children: jsx_runtime_1.jsx(Spinner_1.Spinner, { duration: 0.5, size: spinnerSize }) })) : (jsx_runtime_1.jsx("div", { style: noSpinner })), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), isClickable ? (jsx_runtime_1.jsx("a", { style: projectNameHovered ? projectNameLinkHovered : projectNameLink, title: projectNameTitle, onClick: handleProjectNameClick, onPointerEnter: () => setProjectNameHovered(true), onPointerLeave: () => setProjectNameHovered(false), children: window.remotion_projectName })) : (window.remotion_projectName), jsx_runtime_1.jsx(MenuCompositionName_1.MenuCompositionName, {})
97
- ] }));
97
+ return (jsx_runtime_1.jsxs("div", { style: cwd, title: window.remotion_cwd, children: [isClickable ? jsx_runtime_1.jsx(layout_1.Spacing, { x: mobileLayout ? 0.5 : 2 }) : null, mobileLayout ? null : isBuilding ? (jsx_runtime_1.jsx("div", { style: spinner, children: jsx_runtime_1.jsx(Spinner_1.Spinner, { duration: 0.5, size: spinnerSize, color: colors_1.WHITE_ALPHA_80 }) })) : (jsx_runtime_1.jsx("div", { style: noSpinner })), mobileLayout ? null : jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), isClickable ? (jsx_runtime_1.jsx("a", { style: projectNameHovered ? projectNameLinkHovered : projectNameLink, title: projectNameTitle, onClick: handleProjectNameClick, onPointerEnter: () => setProjectNameHovered(true), onPointerLeave: () => setProjectNameHovered(false), children: window.remotion_projectName })) : (window.remotion_projectName), jsx_runtime_1.jsx(MenuCompositionName_1.MenuCompositionName, {}), mobileLayout && isBuilding ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
98
+ jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx("div", { style: spinner, children: jsx_runtime_1.jsx(Spinner_1.Spinner, { duration: 0.5, size: spinnerSize, color: colors_1.WHITE_ALPHA_80 }) })
99
+ ] })) : null] }));
98
100
  };
99
101
  exports.MenuBuildIndicator = MenuBuildIndicator;
@@ -72,7 +72,7 @@ const MenuCompositionName = () => {
72
72
  });
73
73
  }
74
74
  else if (resolvedLocation) {
75
- await (0, open_in_editor_1.openOriginalPositionInEditor)(resolvedLocation);
75
+ await (0, open_in_editor_1.openOriginalPositionInEditor)(resolvedLocation, null);
76
76
  }
77
77
  }
78
78
  catch (err) {
@@ -108,7 +108,7 @@ const MenuToolbar = ({ readOnlyStudio }) => {
108
108
  jsx_runtime_1.jsxs("div", { style: fixedWidthLeft, children: [
109
109
  jsx_runtime_1.jsx(SidebarCollapserControls_1.SidebarCollapserControl, { side: "left" }), structure.map((s) => {
110
110
  return (jsx_runtime_1.jsx(MenuItem_1.MenuItem, { selected: selected === s.id, onItemSelected: itemClicked, onItemHovered: itemHovered, id: s.id, label: s.label, onItemQuit: onItemQuit, menu: s, onPreviousMenu: onPreviousMenu, onNextMenu: onNextMenu, leaveLeftPadding: s.leaveLeftPadding }, s.id));
111
- }), readOnlyStudio ? null : jsx_runtime_1.jsx(UpdateCheck_1.UpdateCheck, {})] }), jsx_runtime_1.jsx("div", { style: flex }), jsx_runtime_1.jsx(MenuBuildIndicator_1.MenuBuildIndicator, {}), jsx_runtime_1.jsx("div", { style: flex }), jsx_runtime_1.jsxs("div", { style: fixedWidthRight, children: [canUndoAndRedo ? jsx_runtime_1.jsx(UndoRedoButtons_1.UndoRedoButtons, {}) : null, jsx_runtime_1.jsx(SidebarCollapserControls_1.SidebarCollapserControl, { side: "right" })
111
+ }), readOnlyStudio || browserStudioOperations ? null : jsx_runtime_1.jsx(UpdateCheck_1.UpdateCheck, {})] }), mobileLayout ? null : jsx_runtime_1.jsx("div", { style: flex }), jsx_runtime_1.jsx(MenuBuildIndicator_1.MenuBuildIndicator, { mobileLayout: mobileLayout }), jsx_runtime_1.jsx("div", { style: flex }), jsx_runtime_1.jsxs("div", { style: fixedWidthRight, children: [canUndoAndRedo ? jsx_runtime_1.jsx(UndoRedoButtons_1.UndoRedoButtons, {}) : null, jsx_runtime_1.jsx(SidebarCollapserControls_1.SidebarCollapserControl, { side: "right" })
112
112
  ] })
113
113
  ] }));
114
114
  };
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- export default function MobilePanel({ children, onClose, side }: {
2
+ export default function MobilePanel({ children, onClose }: {
3
3
  children: React.ReactNode;
4
4
  onClose: () => void;
5
- side: 'left' | 'right';
6
5
  }): React.ReactPortal;
@@ -21,27 +21,27 @@ const overlay = {
21
21
  const panel = {
22
22
  position: 'fixed',
23
23
  top: menu_toolbar_height_1.MENU_TOOLBAR_HEIGHT,
24
- width: 'min(350px, calc(100% - 50px))',
25
24
  height: `calc(100% - ${menu_toolbar_height_1.MENU_TOOLBAR_HEIGHT}px)`,
26
25
  overflow: 'hidden',
27
26
  background: colors_1.BACKGROUND,
28
27
  boxShadow: colors_1.SHADOW_BLACK,
29
28
  };
30
- function MobilePanel({ children, onClose, side, }) {
29
+ const sidebarWidth = 'min(290px, calc(100% - 50px))';
30
+ function MobilePanel({ children, onClose, }) {
31
31
  const { currentZIndex } = (0, z_index_1.useZIndex)();
32
32
  const onOutsideClick = react_1.default.useCallback((target) => {
33
33
  var _a;
34
34
  const element = target instanceof Element ? target : null;
35
- const toggleSelector = `[data-sidebar-toggle="${side}"]`;
35
+ const toggleSelector = '[data-sidebar-toggle="left"]';
36
36
  if ((element === null || element === void 0 ? void 0 : element.closest(toggleSelector)) ||
37
37
  ((_a = element === null || element === void 0 ? void 0 : element.closest('button')) === null || _a === void 0 ? void 0 : _a.querySelector(toggleSelector))) {
38
38
  return;
39
39
  }
40
40
  onClose();
41
- }, [onClose, side]);
41
+ }, [onClose]);
42
42
  return react_dom_1.default.createPortal(jsx_runtime_1.jsx("div", { style: overlay, children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onEscape: onClose, onOutsideClick: onOutsideClick, children: jsx_runtime_1.jsx("div", { style: {
43
43
  ...panel,
44
- left: side === 'left' ? 0 : undefined,
45
- right: side === 'right' ? 0 : undefined,
44
+ width: sidebarWidth,
45
+ left: 0,
46
46
  }, children: children }) }) }), (0, portals_1.getPortal)(currentZIndex));
47
47
  }
@@ -34,6 +34,6 @@ const ModalContainer = ({ children, onEscape, onOutsideClick, noZIndex, panelSty
34
34
  // Prevent deselection of currently selected items
35
35
  e.stopPropagation();
36
36
  }, []);
37
- return (jsx_runtime_1.jsx("div", { className: "css-reset", style: backgroundOverlay, role: "dialog", "aria-modal": "true", onPointerDown: onPointerDown, children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { disabled: noZIndex, onOutsideClick: onOutsideClick, onEscape: onEscape, children: jsx_runtime_1.jsx("div", { style: { ...panel, ...panelStyle }, children: children }) }) }));
37
+ return (jsx_runtime_1.jsx("div", { className: "css-reset", style: backgroundOverlay, role: "dialog", "aria-modal": "true", onPointerDown: onPointerDown, children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { disabled: noZIndex, onOutsideClick: onOutsideClick, onEscape: onEscape, stackOnHighest: true, children: jsx_runtime_1.jsx("div", { style: { ...panel, ...panelStyle }, children: children }) }) }));
38
38
  };
39
39
  exports.ModalContainer = ModalContainer;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
2
  export declare const ModalFooterContainer: React.FC<{
3
3
  readonly children: React.ReactNode;
4
+ readonly style?: React.CSSProperties;
4
5
  }>;
@@ -10,7 +10,7 @@ const content = {
10
10
  fontSize: 13,
11
11
  minWidth: 500,
12
12
  };
13
- const ModalFooterContainer = ({ children }) => {
14
- return jsx_runtime_1.jsx("div", { style: { ...content, borderTop: colors_1.BORDER_BLACK }, children: children });
13
+ const ModalFooterContainer = ({ children, style }) => {
14
+ return (jsx_runtime_1.jsx("div", { style: { ...content, ...style, borderTop: colors_1.BORDER_BLACK }, children: children }));
15
15
  };
16
16
  exports.ModalFooterContainer = ModalFooterContainer;
@@ -6,14 +6,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Modals = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const react_1 = require("react");
9
+ const react_dom_1 = __importDefault(require("react-dom"));
9
10
  const client_id_1 = require("../helpers/client-id");
10
11
  const studio_runtime_config_1 = require("../helpers/studio-runtime-config");
11
12
  const modals_1 = require("../state/modals");
13
+ const z_index_1 = require("../state/z-index");
12
14
  const AskAiModal_1 = require("./AskAiModal");
15
+ const ConfigureDefaultEditorModal_1 = require("./ConfigureDefaultEditorModal");
13
16
  const ConfigureLicenseModal_1 = require("./ConfigureLicenseModal");
14
17
  const ConfirmationDialog_1 = require("./ConfirmationDialog");
15
18
  const EffectPickerModal_1 = require("./EffectPickerModal");
16
19
  const InstallPackage_1 = require("./InstallPackage");
20
+ const portals_1 = require("./Menu/portals");
17
21
  const DeleteComposition_1 = require("./NewComposition/DeleteComposition");
18
22
  const DeleteFolder_1 = require("./NewComposition/DeleteFolder");
19
23
  const DuplicateComposition_1 = require("./NewComposition/DuplicateComposition");
@@ -32,10 +36,15 @@ const UpdateModal_1 = require("./UpdateModal/UpdateModal");
32
36
  const Modals = ({ readOnlyStudio }) => {
33
37
  var _a;
34
38
  const { selectedModal: modalContextType } = (0, react_1.useContext)(modals_1.ModalsContext);
39
+ const { currentZIndex } = (0, z_index_1.useZIndex)();
35
40
  const canRender = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx).previewServerState.type ===
36
41
  'connected';
37
- 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 })), 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 === 'configure-license' && (jsx_runtime_1.jsx(ConfigureLicenseModal_1.ConfigureLicenseModal, { initialPublicLicenseKey: modalContextType.initialPublicLicenseKey })), modalContextType && modalContextType.type === 'web-render' && (jsx_runtime_1.jsx(WebRenderModal_1.WebRenderModalWithLoader, { ...modalContextType })), modalContextType &&
42
+ return react_dom_1.default.createPortal(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 })), 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 === 'configure-license' && (jsx_runtime_1.jsx(ConfigureLicenseModal_1.ConfigureLicenseModal, { initialPublicLicenseKey: modalContextType.initialPublicLicenseKey })), modalContextType &&
43
+ modalContextType.type === 'configure-default-editor' && (jsx_runtime_1.jsx(ConfigureDefaultEditorModal_1.ConfigureDefaultEditorModal, {})), modalContextType && modalContextType.type === 'web-render' && (jsx_runtime_1.jsx(WebRenderModal_1.WebRenderModalWithLoader, { ...modalContextType })), modalContextType &&
38
44
  modalContextType.type === 'server-render' &&
39
- (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, {})] }));
45
+ (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, {})] }),
46
+ // Modals must be above overlays opened from the editor, such as the
47
+ // floating sidebars used in the mobile layout.
48
+ (0, portals_1.getPortal)(currentZIndex + 1));
40
49
  };
41
50
  exports.Modals = Modals;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MuteToggle = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
+ const colors_1 = require("../helpers/colors");
6
7
  const media_volume_1 = require("../icons/media-volume");
7
8
  const mute_1 = require("../state/mute");
8
9
  const ControlButton_1 = require("./ControlButton");
@@ -14,6 +15,6 @@ const MuteToggle = ({ muted, setMuted }) => {
14
15
  });
15
16
  }, [setMuted]);
16
17
  const accessibilityLabel = muted ? 'Unmute video' : 'Mute video';
17
- return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: muted ? jsx_runtime_1.jsx(media_volume_1.VolumeOffIcon, {}) : jsx_runtime_1.jsx(media_volume_1.VolumeOnIcon, {}) }));
18
+ return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: (color) => muted ? jsx_runtime_1.jsx(media_volume_1.VolumeOffIcon, { color: colors_1.BLUE }) : jsx_runtime_1.jsx(media_volume_1.VolumeOnIcon, { color: color }) }));
18
19
  };
19
20
  exports.MuteToggle = MuteToggle;
@@ -28,5 +28,6 @@ export declare const Combobox: React.FC<{
28
28
  readonly style?: React.CSSProperties;
29
29
  readonly title: string;
30
30
  readonly size?: ComboboxSize;
31
+ readonly unhoveredIconColor?: string;
31
32
  }>;
32
33
  export {};
@@ -61,7 +61,7 @@ const smallLabel = {
61
61
  fontSize: 11,
62
62
  lineHeight: '12px',
63
63
  };
64
- const Combobox = ({ values, selectedId, style: customStyle, title, size: controlSize = 'default', }) => {
64
+ const Combobox = ({ values, selectedId, style: customStyle, title, size: controlSize = 'default', unhoveredIconColor = colors_1.LIGHT_TEXT, }) => {
65
65
  const [hovered, setIsHovered] = (0, react_1.useState)(false);
66
66
  const [opened, setOpened] = (0, react_1.useState)(false);
67
67
  const ref = (0, react_1.useRef)(null);
@@ -206,7 +206,7 @@ const Combobox = ({ values, selectedId, style: customStyle, title, size: control
206
206
  ? compactLabel
207
207
  : label;
208
208
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
209
- jsx_runtime_1.jsxs("button", { ref: ref, title: title, tabIndex: tabIndex, type: "button", style: style, className: is_menu_item_1.MENU_INITIATOR_CLASSNAME, children: [selected ? (jsx_runtime_1.jsx("div", { title: typeof selected.label === 'string' ? selected.label : undefined, style: selectedLabelStyle, children: selected === null || selected === void 0 ? void 0 : selected.label })) : null, jsx_runtime_1.jsx(layout_1.Spacing, { x: controlSize === 'default' ? 1 : 0.5 }), ' ', jsx_runtime_1.jsx(caret_1.CaretDown, { small: controlSize === 'small' })
209
+ jsx_runtime_1.jsxs("button", { ref: ref, title: title, tabIndex: tabIndex, type: "button", style: style, className: is_menu_item_1.MENU_INITIATOR_CLASSNAME, children: [selected ? (jsx_runtime_1.jsx("div", { title: typeof selected.label === 'string' ? selected.label : undefined, style: selectedLabelStyle, children: selected === null || selected === void 0 ? void 0 : selected.label })) : null, jsx_runtime_1.jsx(layout_1.Spacing, { x: controlSize === 'default' ? 1 : 0.5 }), ' ', jsx_runtime_1.jsx(caret_1.CaretDown, { color: hovered || opened ? colors_1.WHITE : unhoveredIconColor, small: controlSize === 'small' })
210
210
  ] }), portalStyle
211
211
  ? react_dom_1.default.createPortal(jsx_runtime_1.jsx("div", { style: styles_1.fullScreenOverlay, onPointerDown: onOverlayPointerDown, children: jsx_runtime_1.jsx("div", { style: styles_1.outerPortal, className: "css-reset", children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onOutsideClick: onHide, onEscape: onHide, children: jsx_runtime_1.jsx("div", { style: portalStyle, children: jsx_runtime_1.jsx(MenuContent_1.MenuContent, { onNextMenu: noop_1.noop, onPreviousMenu: noop_1.noop, values: values, onHide: onHide, leaveLeftSpace: true, preselectIndex: values.findIndex((v) => selected && v.id === selected.id), topItemCanBeUnselected: false, fixedHeight: derivedMaxHeight }) }) }) }) }), (0, portals_1.getPortal)(currentZIndex))
212
212
  : null] }));
@@ -60,6 +60,10 @@ export declare const InputDragger: React.ForwardRefExoticComponent<InputHTMLAttr
60
60
  readonly onTextChange: (newVal: string) => void;
61
61
  readonly status: RemInputStatus;
62
62
  readonly formatter?: ((str: string | number) => string) | undefined;
63
+ readonly formatterStyle?: React.CSSProperties | undefined;
64
+ readonly formatterSubtitle?: ((str: string | number) => string) | undefined;
65
+ readonly formatterSubtitleStyle?: React.CSSProperties | undefined;
66
+ readonly buttonStyle?: React.CSSProperties | undefined;
63
67
  readonly rightAlign: boolean;
64
68
  readonly small?: boolean | undefined;
65
69
  readonly snapToStep?: boolean | undefined;
@@ -39,6 +39,7 @@ const react_1 = __importStar(require("react"));
39
39
  const remotion_1 = require("remotion");
40
40
  const colors_1 = require("../../helpers/colors");
41
41
  const noop_1 = require("../../helpers/noop");
42
+ const pointer_session_1 = require("../../helpers/pointer-session");
42
43
  const input_dragger_click_lock_1 = require("../../state/input-dragger-click-lock");
43
44
  const z_index_1 = require("../../state/z-index");
44
45
  const ForceSpecificCursor_1 = require("../ForceSpecificCursor");
@@ -294,7 +295,7 @@ const deriveInputDraggerValueDiff = ({ dragSensitivity, step, xDistance, }) => {
294
295
  return (0, remotion_1.interpolate)(xDistance, [-5, -4, 0, 4, 5], [-step * dragSensitivity, 0, 0, 0, step * dragSensitivity]);
295
296
  };
296
297
  exports.deriveInputDraggerValueDiff = deriveInputDraggerValueDiff;
297
- const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min, max: _max, step: _step, value, onTextChange, formatter = (q) => String(q), status, rightAlign, small, snapToStep = true, dragDecimalPlaces, dragSensitivity = 1, type: _type, ...props }, ref) => {
298
+ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min, max: _max, step: _step, value, onTextChange, formatter = (q) => String(q), formatterStyle, formatterSubtitle, formatterSubtitleStyle, buttonStyle, status, rightAlign, small, snapToStep = true, dragDecimalPlaces, dragSensitivity = 1, type: _type, ...props }, ref) => {
298
299
  const [inputFallback, setInputFallback] = (0, react_1.useState)(false);
299
300
  const [dragging, setDragging] = (0, react_1.useState)(false);
300
301
  const fallbackRef = (0, react_1.useRef)(null);
@@ -313,7 +314,8 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
313
314
  WebkitUserSelect: 'none',
314
315
  fontSize: small ? 12 : 14,
315
316
  fontVariantNumeric: 'tabular-nums',
316
- }), [dragging, small]);
317
+ ...formatterStyle,
318
+ }), [dragging, formatterStyle, small]);
317
319
  const onFocus = (0, react_1.useCallback)(() => {
318
320
  if (!small || pointerDownRef.current) {
319
321
  return;
@@ -409,12 +411,12 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
409
411
  };
410
412
  const onPointerDown = (0, react_1.useCallback)((e) => {
411
413
  e.stopPropagation();
412
- pointerDownRef.current = true;
413
414
  const target = e.currentTarget;
414
415
  const { pageX, pageY, button } = e;
415
416
  if (button !== 0) {
416
417
  return;
417
418
  }
419
+ pointerDownRef.current = true;
418
420
  let lastDragValue = null;
419
421
  const moveListener = (ev) => {
420
422
  const xDistance = ev.pageX - pageX;
@@ -446,34 +448,23 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
446
448
  lastDragValue = nextValue;
447
449
  onValueChange(nextValue);
448
450
  };
449
- window.addEventListener('mousemove', moveListener);
450
- const endDrag = (commit) => {
451
- window.removeEventListener('mousemove', moveListener);
452
- window.removeEventListener('pointerup', onPointerUp);
453
- window.removeEventListener('pointercancel', onPointerCancel);
454
- window.removeEventListener('blur', onWindowBlur);
455
- pointerDownRef.current = false;
456
- setDragging(false);
457
- (0, ForceSpecificCursor_1.stopForcingSpecificCursor)();
458
- if (commit && lastDragValue !== null && onValueChangeEnd) {
459
- onValueChangeEnd(lastDragValue);
460
- }
461
- setTimeout(() => {
462
- (0, input_dragger_click_lock_1.setClickLock)(false);
463
- }, 2);
464
- };
465
- const onPointerUp = () => {
466
- endDrag(true);
467
- };
468
- const onPointerCancel = () => {
469
- endDrag(false);
470
- };
471
- const onWindowBlur = () => {
472
- endDrag(false);
473
- };
474
- window.addEventListener('pointerup', onPointerUp);
475
- window.addEventListener('pointercancel', onPointerCancel);
476
- window.addEventListener('blur', onWindowBlur);
451
+ (0, pointer_session_1.startPointerSession)({
452
+ event: e.nativeEvent,
453
+ target,
454
+ onMove: moveListener,
455
+ onEnd: (reason) => {
456
+ pointerDownRef.current = false;
457
+ setDragging(false);
458
+ (0, ForceSpecificCursor_1.stopForcingSpecificCursor)();
459
+ const commit = reason === 'pointerup' || reason === 'buttons-released';
460
+ if (commit && lastDragValue !== null && onValueChangeEnd) {
461
+ onValueChangeEnd(lastDragValue);
462
+ }
463
+ setTimeout(() => {
464
+ (0, input_dragger_click_lock_1.setClickLock)(false);
465
+ }, 2);
466
+ },
467
+ });
477
468
  }, [
478
469
  _step,
479
470
  _min,
@@ -494,6 +485,9 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
494
485
  if (inputFallback) {
495
486
  return (jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onEscape: onEscape, onOutsideClick: noop_1.noop, children: jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: fallbackRef, autoFocus: true, onKeyDown: onInputKeyDown, onBlur: onBlur, onChange: onInputChange, min: _min, max: _max, step: deriveStep, defaultValue: value, status: status, rightAlign: rightAlign, small: small, ...props, type: "text" }) }));
496
487
  }
497
- return (jsx_runtime_1.jsx("button", { ref: ref, type: "button", className: '__remotion_input_dragger', style: exports.inputDraggerContainerStyle, onClick: onClick, onFocus: onFocus, onKeyDown: onKeyDown, onPointerDown: onPointerDown, children: jsx_runtime_1.jsx("span", { style: span, children: formatter(value) }) }));
488
+ return (jsx_runtime_1.jsxs("button", { ref: ref, type: "button", "aria-label": props['aria-label'], className: '__remotion_input_dragger', style: buttonStyle
489
+ ? { ...exports.inputDraggerContainerStyle, ...buttonStyle }
490
+ : exports.inputDraggerContainerStyle, onClick: onClick, onFocus: onFocus, onKeyDown: onKeyDown, onPointerDown: onPointerDown, children: [
491
+ jsx_runtime_1.jsx("span", { style: span, children: formatter(value) }), formatterSubtitle ? (jsx_runtime_1.jsx("span", { style: formatterSubtitleStyle, children: formatterSubtitle(value) })) : null] }));
498
492
  };
499
493
  exports.InputDragger = react_1.default.forwardRef(InputDraggerForwardRefFn);
@@ -1,9 +1,15 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.NotificationCenter = exports.showNotification = void 0;
4
7
  const jsx_runtime_1 = require("react/jsx-runtime");
5
8
  const react_1 = require("react");
9
+ const react_dom_1 = __importDefault(require("react-dom"));
6
10
  const colors_1 = require("../../helpers/colors");
11
+ const z_index_1 = require("../../state/z-index");
12
+ const portals_1 = require("../Menu/portals");
7
13
  const Notification_1 = require("./Notification");
8
14
  const container = {
9
15
  position: 'absolute',
@@ -28,6 +34,7 @@ const showNotification = (content, durationInMs) => {
28
34
  exports.showNotification = showNotification;
29
35
  const NotificationCenter = () => {
30
36
  const [notifications, setNotifications] = (0, react_1.useState)([]);
37
+ const { currentZIndex } = (0, z_index_1.useZIndex)();
31
38
  const onRemove = (0, react_1.useCallback)((id) => {
32
39
  setNotifications((not) => {
33
40
  return not.filter((n) => n.id !== id);
@@ -60,8 +67,11 @@ const NotificationCenter = () => {
60
67
  addNotification,
61
68
  };
62
69
  }, [addNotification]);
63
- return (jsx_runtime_1.jsx("div", { style: container, children: notifications.map((n) => {
70
+ return react_dom_1.default.createPortal(jsx_runtime_1.jsx("div", { style: container, children: notifications.map((n) => {
64
71
  return (jsx_runtime_1.jsx(Notification_1.Notification, { created: n.created, duration: n.duration, id: n.id, onRemove: onRemove, children: n.content }, n.id));
65
- }) }));
72
+ }) }),
73
+ // Notifications must be above overlays opened from the editor, such as the
74
+ // floating sidebars used in the mobile layout.
75
+ (0, portals_1.getPortal)(currentZIndex + 1));
66
76
  };
67
77
  exports.NotificationCenter = NotificationCenter;
@@ -11,10 +11,18 @@ const OutlineToggle = () => {
11
11
  const onClick = (0, react_1.useCallback)(() => {
12
12
  setEditorShowOutlines((current) => !current);
13
13
  }, [setEditorShowOutlines]);
14
- const color = editorShowOutlines ? colors_1.BLUE : colors_1.WHITE;
15
14
  const accessibilityLabel = editorShowOutlines
16
15
  ? 'Hide outlines'
17
16
  : '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" }) }) }));
17
+ return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: (color) => {
18
+ const iconColor = editorShowOutlines ? colors_1.BLUE : color;
19
+ return (jsx_runtime_1.jsxs("svg", { style: { width: 17, height: 17 }, viewBox: "0 0 512 512", fill: "none", "aria-hidden": "true", focusable: "false", children: [
20
+ jsx_runtime_1.jsx("path", { d: "M64 64H448V448H64V64Z", stroke: iconColor, strokeWidth: "36" }), [
21
+ [16, 16],
22
+ [400, 16],
23
+ [16, 400],
24
+ [400, 400],
25
+ ].map(([x, y]) => (jsx_runtime_1.jsx("rect", { x: x, y: y, width: "96", height: "96", rx: "24", fill: colors_1.BACKGROUND_HEX, stroke: iconColor, strokeWidth: "32" }, `${x}-${y}`)))] }));
26
+ } }));
19
27
  };
20
28
  exports.OutlineToggle = OutlineToggle;