@remotion/studio 4.0.515 → 4.0.517

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 (277) hide show
  1. package/dist/api/restart-studio.js +4 -0
  2. package/dist/components/AssetSelector.js +4 -10
  3. package/dist/components/AssetSelectorItem.d.ts +2 -1
  4. package/dist/components/AssetSelectorItem.js +24 -29
  5. package/dist/components/Canvas.js +21 -15
  6. package/dist/components/CanvasCaptureDropHandler.d.ts +4 -0
  7. package/dist/components/CanvasCaptureDropHandler.js +42 -0
  8. package/dist/components/CanvasOrLoading.js +4 -3
  9. package/dist/components/CaptionInspector.d.ts +2 -0
  10. package/dist/components/CaptionInspector.js +3 -5
  11. package/dist/components/CheckboardToggle.js +1 -1
  12. package/dist/components/Checkbox.d.ts +0 -1
  13. package/dist/components/Checkbox.js +2 -19
  14. package/dist/components/CompositionSelector.js +6 -3
  15. package/dist/components/CompositionSelectorItem.js +9 -10
  16. package/dist/components/ConfigSelect.d.ts +17 -0
  17. package/dist/components/ConfigSelect.js +50 -0
  18. package/dist/components/ConfigureLicenseModal.js +79 -46
  19. package/dist/components/CurrentAsset.d.ts +10 -2
  20. package/dist/components/CurrentAsset.js +143 -45
  21. package/dist/components/Editor.js +2 -1
  22. package/dist/components/EditorContent.js +5 -2
  23. package/dist/components/EditorContexts.js +2 -1
  24. package/dist/components/EditorRuler/Ruler.d.ts +1 -0
  25. package/dist/components/EditorRuler/Ruler.js +9 -8
  26. package/dist/components/EditorRuler/index.d.ts +1 -0
  27. package/dist/components/EditorRuler/index.js +3 -4
  28. package/dist/components/EditorRuler/use-is-ruler-visible.d.ts +1 -1
  29. package/dist/components/EditorRuler/use-is-ruler-visible.js +8 -2
  30. package/dist/components/ElementLibraryModal.d.ts +5 -0
  31. package/dist/components/ElementLibraryModal.js +38 -0
  32. package/dist/components/FilePreview.js +71 -0
  33. package/dist/components/FixComputedValueModal.js +54 -51
  34. package/dist/components/GlobalKeybindings.js +5 -5
  35. package/dist/components/InlineAction.d.ts +1 -1
  36. package/dist/components/InlineAction.js +12 -2
  37. package/dist/components/InlineCaptionInspector.d.ts +2 -0
  38. package/dist/components/InlineCaptionInspector.js +2 -2
  39. package/dist/components/InlineCompositionName.js +1 -1
  40. package/dist/components/InlineEditableTitle.js +5 -4
  41. package/dist/components/InspectorInfoHeader.js +1 -1
  42. package/dist/components/InspectorOpenInEditor.js +48 -72
  43. package/dist/components/InspectorPanel/AlignmentControls.js +2 -3
  44. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.d.ts +7 -0
  45. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +39 -0
  46. package/dist/components/InspectorPanel/CompositionInspector.js +25 -45
  47. package/dist/components/InspectorPanel/CompositionInspectorHeader.js +2 -2
  48. package/dist/components/InspectorPanel/CompositionMetadata.js +11 -4
  49. package/dist/components/InspectorPanel/EasingInspector.js +2 -2
  50. package/dist/components/InspectorPanel/ElementLibraryButton.d.ts +2 -0
  51. package/dist/components/InspectorPanel/ElementLibraryButton.js +139 -0
  52. package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +10 -4
  53. package/dist/components/InspectorPanel/KeyframeInspector.js +1 -1
  54. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +14 -6
  55. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +2 -7
  56. package/dist/components/InspectorPanel/common.d.ts +0 -13
  57. package/dist/components/InspectorPanel/common.js +6 -59
  58. package/dist/components/InspectorPanel/inspector-selection.d.ts +2 -2
  59. package/dist/components/InspectorPanel/styles.d.ts +0 -1
  60. package/dist/components/InspectorPanel/styles.js +3 -4
  61. package/dist/components/InspectorPanel/use-composition-actions.js +0 -1
  62. package/dist/components/InspectorPanel/use-track-for-selection.d.ts +1 -2
  63. package/dist/components/InspectorPanelLayout.d.ts +1 -1
  64. package/dist/components/InspectorPanelLayout.js +1 -1
  65. package/dist/components/InspectorSequenceSection.d.ts +1 -2
  66. package/dist/components/InspectorSequenceSection.js +40 -54
  67. package/dist/components/InspectorSourceLocation.js +1 -1
  68. package/dist/components/InstallPackage.d.ts +2 -1
  69. package/dist/components/InstallPackage.js +60 -30
  70. package/dist/components/InstallablePackage.js +37 -11
  71. package/dist/components/KeyboardShortcutsSettings.d.ts +2 -0
  72. package/dist/components/KeyboardShortcutsSettings.js +177 -0
  73. package/dist/components/Menu/MenuItem.js +15 -6
  74. package/dist/components/MenuBuildIndicator.js +1 -1
  75. package/dist/components/MenuToolbar.js +7 -3
  76. package/dist/components/Modals.js +7 -5
  77. package/dist/components/NewComposition/CodemodFooter.d.ts +0 -1
  78. package/dist/components/NewComposition/CodemodFooter.js +2 -8
  79. package/dist/components/NewComposition/DeleteComposition.js +1 -1
  80. package/dist/components/NewComposition/DeleteFolder.js +1 -1
  81. package/dist/components/NewComposition/DuplicateComposition.js +1 -1
  82. package/dist/components/NewComposition/InputDragger.js +27 -4
  83. package/dist/components/NewComposition/NewComposition.js +1 -1
  84. package/dist/components/NewComposition/NewFolder.js +1 -3
  85. package/dist/components/NewComposition/RenameComposition.js +1 -1
  86. package/dist/components/NewComposition/RenameFolder.js +1 -1
  87. package/dist/components/NewComposition/use-rename-static-file.js +1 -1
  88. package/dist/components/Notifications/NotificationCenter.d.ts +1 -0
  89. package/dist/components/Notifications/NotificationCenter.js +5 -0
  90. package/dist/components/OptionsPanel.js +9 -12
  91. package/dist/components/PlaybackRateSelector.js +1 -1
  92. package/dist/components/Preview.js +83 -5
  93. package/dist/components/PreviewToolbar.js +12 -3
  94. package/dist/components/PreviewToolbarOverflowButton.d.ts +1 -0
  95. package/dist/components/PreviewToolbarOverflowButton.js +39 -2
  96. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +2 -2
  97. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +14 -30
  98. package/dist/components/RadioButton.d.ts +6 -0
  99. package/dist/components/RadioButton.js +62 -0
  100. package/dist/components/RenderButton.js +68 -184
  101. package/dist/components/RenderModal/DataEditor.js +15 -12
  102. package/dist/components/RenderModal/RenderStatusModal.js +0 -1
  103. package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +3 -1
  104. package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.d.ts +15 -0
  105. package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.js +95 -0
  106. package/dist/components/RenderQueue/RenderQueueRemoveItem.js +1 -6
  107. package/dist/components/RenderingSettings.js +7 -4
  108. package/dist/components/RulersAndGuidesToggle.d.ts +4 -0
  109. package/dist/components/RulersAndGuidesToggle.js +34 -0
  110. package/dist/components/SegmentedButton.d.ts +29 -0
  111. package/dist/components/SegmentedButton.js +226 -0
  112. package/dist/components/SelectedOutlineEditingHandles.d.ts +16 -0
  113. package/dist/components/SelectedOutlineEditingHandles.js +66 -0
  114. package/dist/components/SelectedOutlineElement.d.ts +2 -4
  115. package/dist/components/SelectedOutlineElement.js +15 -54
  116. package/dist/components/SelectedOutlineOverlay.js +32 -6
  117. package/dist/components/SelectedOutlinePolygon.d.ts +4 -6
  118. package/dist/components/SelectedOutlinePolygon.js +18 -16
  119. package/dist/components/SelectedOutlineRenderer.d.ts +1 -2
  120. package/dist/components/SelectedOutlineRenderer.js +66 -14
  121. package/dist/components/SelectedOutlineUvControls.d.ts +1 -1
  122. package/dist/components/SettingsModal.d.ts +1 -1
  123. package/dist/components/SettingsModal.js +30 -7
  124. package/dist/components/SettingsModalFooter.d.ts +3 -1
  125. package/dist/components/SettingsModalFooter.js +20 -4
  126. package/dist/components/ShowPixelGridProvider.d.ts +4 -0
  127. package/dist/components/ShowPixelGridProvider.js +24 -0
  128. package/dist/components/SidebarCollapserControls.js +2 -2
  129. package/dist/components/SkillsSettings.d.ts +2 -0
  130. package/dist/components/SkillsSettings.js +129 -0
  131. package/dist/components/StaticFilePreview.js +7 -1
  132. package/dist/components/StudioSettings.js +7 -48
  133. package/dist/components/Tabs/index.js +1 -1
  134. package/dist/components/Timeline/Timeline.js +41 -1
  135. package/dist/components/Timeline/TimelineAssetField.d.ts +1 -1
  136. package/dist/components/Timeline/TimelineAssetField.js +15 -9
  137. package/dist/components/Timeline/TimelineBooleanField.js +1 -4
  138. package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +6 -7
  139. package/dist/components/Timeline/TimelineClipboardKeybindings.js +7 -10
  140. package/dist/components/Timeline/TimelineDragHandler.js +11 -4
  141. package/dist/components/Timeline/TimelineEffectItem.d.ts +1 -0
  142. package/dist/components/Timeline/TimelineEffectItem.js +23 -10
  143. package/dist/components/Timeline/TimelineEffectPropItem.js +15 -2
  144. package/dist/components/Timeline/TimelineExpandedRow.js +5 -4
  145. package/dist/components/Timeline/TimelineFieldLabel.js +4 -2
  146. package/dist/components/Timeline/TimelineFieldRowContent.d.ts +1 -2
  147. package/dist/components/Timeline/TimelineFieldRowContent.js +8 -21
  148. package/dist/components/Timeline/TimelineImageInfo.d.ts +0 -1
  149. package/dist/components/Timeline/TimelineImageInfo.js +13 -32
  150. package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -2
  151. package/dist/components/Timeline/TimelineKeyframeControls.js +10 -4
  152. package/dist/components/Timeline/TimelinePlayCursorSyncer.js +4 -2
  153. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
  154. package/dist/components/Timeline/TimelineRotationField.js +0 -2
  155. package/dist/components/Timeline/TimelineRowChrome.d.ts +0 -1
  156. package/dist/components/Timeline/TimelineRowChrome.js +3 -4
  157. package/dist/components/Timeline/TimelineRowLayoutContext.d.ts +0 -1
  158. package/dist/components/Timeline/TimelineRowLayoutContext.js +1 -4
  159. package/dist/components/Timeline/TimelineScaleField.js +2 -6
  160. package/dist/components/Timeline/TimelineSchemaField.js +9 -3
  161. package/dist/components/Timeline/TimelineSelection.d.ts +29 -66
  162. package/dist/components/Timeline/TimelineSelection.js +31 -171
  163. package/dist/components/Timeline/TimelineSequence.d.ts +2 -0
  164. package/dist/components/Timeline/TimelineSequence.js +110 -19
  165. package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
  166. package/dist/components/Timeline/TimelineSequenceItem.js +13 -11
  167. package/dist/components/Timeline/TimelineSequencePropItem.js +15 -2
  168. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +7 -6
  169. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +85 -91
  170. package/dist/components/Timeline/TimelineTrack.js +1 -1
  171. package/dist/components/Timeline/TimelineTransformOriginField.js +0 -4
  172. package/dist/components/Timeline/TimelineTranslateField.js +0 -4
  173. package/dist/components/Timeline/TimelineVirtualization.js +3 -1
  174. package/dist/components/Timeline/delete-selected-timeline-item.d.ts +3 -4
  175. package/dist/components/Timeline/duplicate-selected-timeline-item.d.ts +3 -4
  176. package/dist/components/Timeline/duplicate-selected-timeline-item.js +3 -12
  177. package/dist/components/Timeline/find-track-for-node-path-info.d.ts +1 -1
  178. package/dist/components/Timeline/get-copy-context-for-agents-menu-item.d.ts +4 -0
  179. package/dist/components/Timeline/get-copy-context-for-agents-menu-item.js +26 -0
  180. package/dist/components/Timeline/get-sequence-context-menu-items.js +2 -19
  181. package/dist/components/Timeline/get-timeline-sequence-visible-layout.d.ts +6 -1
  182. package/dist/components/Timeline/get-timeline-sequence-visible-layout.js +11 -4
  183. package/dist/components/Timeline/keyframe-clipboard.d.ts +2 -3
  184. package/dist/components/Timeline/reset-selected-timeline-props.d.ts +2 -3
  185. package/dist/components/Timeline/sequence-prop-clipboard.d.ts +2 -3
  186. package/dist/components/Timeline/split-selected-timeline-item.d.ts +2 -3
  187. package/dist/components/Timeline/split-selected-timeline-item.js +0 -1
  188. package/dist/components/Timeline/timeline-expanded-filter.d.ts +1 -2
  189. package/dist/components/Timeline/timeline-field-row-layout.d.ts +1 -1
  190. package/dist/components/Timeline/timeline-field-row-layout.js +4 -7
  191. package/dist/components/Timeline/timeline-field-utils.js +0 -2
  192. package/dist/components/Timeline/timeline-scroll-logic.d.ts +7 -5
  193. package/dist/components/Timeline/timeline-scroll-logic.js +12 -7
  194. package/dist/components/Timeline/update-selected-easing.d.ts +7 -7
  195. package/dist/components/Timeline/use-timeline-asset-drop.js +24 -0
  196. package/dist/components/Timeline/use-timeline-keyframe-drag.d.ts +6 -7
  197. package/dist/components/TimelineCombobox.js +25 -160
  198. package/dist/components/TimelineInOutToggle.js +4 -1
  199. package/dist/components/canvas-capture-drop.d.ts +4 -0
  200. package/dist/components/canvas-capture-drop.js +22 -0
  201. package/dist/components/duplicate-jsx-node-api.d.ts +2 -0
  202. package/dist/components/duplicate-jsx-node-api.js +12 -0
  203. package/dist/components/effect-drag-and-drop.js +1 -4
  204. package/dist/components/handle-drop.d.ts +2 -1
  205. package/dist/components/handle-drop.js +3 -3
  206. package/dist/components/import-assets.js +9 -65
  207. package/dist/components/keyboard-shortcuts.d.ts +10 -0
  208. package/dist/components/keyboard-shortcuts.js +135 -0
  209. package/dist/components/selected-outline-control-layout.js +2 -6
  210. package/dist/components/selected-outline-measurement.d.ts +8 -9
  211. package/dist/components/selected-outline-measurement.js +16 -3
  212. package/dist/components/use-delete-asset.d.ts +1 -0
  213. package/dist/components/use-delete-asset.js +40 -0
  214. package/dist/components/use-selected-outline-control-target.d.ts +11 -0
  215. package/dist/components/use-selected-outline-control-target.js +79 -0
  216. package/dist/esm/{chunk-s6k99gh2.js → chunk-4bxz1d3g.js} +3 -2
  217. package/dist/esm/{chunk-v5a8vpv4.js → chunk-gzqm3g2m.js} +47432 -40444
  218. package/dist/esm/index.mjs +3 -0
  219. package/dist/esm/internals.mjs +47431 -40443
  220. package/dist/esm/previewEntry.mjs +47169 -40181
  221. package/dist/esm/renderEntry.mjs +2 -2
  222. package/dist/helpers/add-asset-cache-bust.d.ts +4 -0
  223. package/dist/helpers/add-asset-cache-bust.js +10 -0
  224. package/dist/helpers/calculate-timeline.d.ts +1 -7
  225. package/dist/helpers/calculate-timeline.js +2 -145
  226. package/dist/helpers/colors.d.ts +2 -0
  227. package/dist/helpers/colors.js +6 -2
  228. package/dist/helpers/drag-aware-double-click.d.ts +6 -0
  229. package/dist/helpers/drag-aware-double-click.js +20 -0
  230. package/dist/helpers/editor-ruler.js +6 -5
  231. package/dist/helpers/get-asset-metadata.d.ts +19 -0
  232. package/dist/helpers/get-asset-metadata.js +75 -21
  233. package/dist/helpers/get-connected-compositions.d.ts +1 -6
  234. package/dist/helpers/get-connected-compositions.js +2 -8
  235. package/dist/helpers/get-sequence-double-click-action.d.ts +2 -1
  236. package/dist/helpers/get-sequence-double-click-action.js +7 -1
  237. package/dist/helpers/get-sequence-visible-range.d.ts +1 -5
  238. package/dist/helpers/get-sequence-visible-range.js +6 -51
  239. package/dist/helpers/get-timeline-nestedness.d.ts +1 -2
  240. package/dist/helpers/get-timeline-nestedness.js +2 -12
  241. package/dist/helpers/get-timeline-sequence-layout.d.ts +4 -1
  242. package/dist/helpers/get-timeline-sequence-layout.js +15 -6
  243. package/dist/helpers/get-timeline-sequence-sort-key.d.ts +2 -21
  244. package/dist/helpers/get-timeline-sequence-sort-key.js +2 -16
  245. package/dist/helpers/hoverable.d.ts +1 -0
  246. package/dist/helpers/hoverable.js +2 -1
  247. package/dist/helpers/inject-css.js +3 -1
  248. package/dist/helpers/is-current-selected-still.js +4 -2
  249. package/dist/helpers/open-in-remotion-convert.d.ts +7 -0
  250. package/dist/helpers/open-in-remotion-convert.js +18 -0
  251. package/dist/helpers/sort-by-nonce-history.d.ts +1 -5
  252. package/dist/helpers/sort-by-nonce-history.js +3 -148
  253. package/dist/helpers/timeline-node-path-key.d.ts +1 -2
  254. package/dist/helpers/timeline-node-path-key.js +2 -2
  255. package/dist/helpers/use-media-metadata.d.ts +2 -1
  256. package/dist/helpers/use-media-metadata.js +12 -5
  257. package/dist/helpers/use-menu-structure.js +52 -32
  258. package/dist/icons/align-center-horizontal.js +1 -1
  259. package/dist/icons/align-left.js +1 -1
  260. package/dist/icons/align-right.js +1 -1
  261. package/dist/icons/keyboard.d.ts +4 -0
  262. package/dist/icons/keyboard.js +10 -0
  263. package/dist/icons/license.d.ts +4 -0
  264. package/dist/icons/license.js +8 -0
  265. package/dist/icons/package.d.ts +4 -0
  266. package/dist/icons/package.js +8 -0
  267. package/dist/icons/react.js +1 -1
  268. package/dist/icons/remotion-convert.d.ts +4 -0
  269. package/dist/icons/remotion-convert.js +10 -0
  270. package/dist/icons/skills.d.ts +4 -0
  271. package/dist/icons/skills.js +10 -0
  272. package/dist/state/editor-pixel-grid.d.ts +8 -0
  273. package/dist/state/editor-pixel-grid.js +18 -0
  274. package/dist/state/modals.d.ts +6 -5
  275. package/package.json +14 -12
  276. package/dist/components/KeyboardShortcutsExplainer.d.ts +0 -2
  277. package/dist/components/KeyboardShortcutsExplainer.js +0 -194
@@ -1,8 +1,9 @@
1
1
  import type { VideoConfig } from 'remotion';
2
2
  export declare const SEQUENCE_BORDER_WIDTH = 1;
3
- export declare const getTimelineSequenceLayout: ({ durationInFrames, startFrom, maxMediaDuration, startFromMedia, video, windowWidth, premountDisplay, postmountDisplay, }: {
3
+ export declare const getTimelineSequenceLayout: ({ durationInFrames, startFrom, cascadedStart, maxMediaDuration, startFromMedia, video, windowWidth, premountDisplay, postmountDisplay, }: {
4
4
  durationInFrames: number;
5
5
  startFrom: number;
6
+ cascadedStart: number;
6
7
  startFromMedia: number;
7
8
  maxMediaDuration: number | null;
8
9
  video: VideoConfig;
@@ -13,6 +14,8 @@ export declare const getTimelineSequenceLayout: ({ durationInFrames, startFrom,
13
14
  marginLeft: number;
14
15
  width: number;
15
16
  naturalWidth: number;
17
+ negativeStartWidth: number;
18
+ negativeStartClipped: boolean;
16
19
  premountWidth: number | null;
17
20
  postmountWidth: number | null;
18
21
  };
@@ -10,16 +10,23 @@ const getWidthOfTrack = ({ durationInFrames, timelineDuration, windowWidth, spat
10
10
  : (spatialDuration / timelineDuration) * fullWidth;
11
11
  return Math.max(0, base - exports.SEQUENCE_BORDER_WIDTH + nonNegativeMarginLeft);
12
12
  };
13
- const getTimelineSequenceLayout = ({ durationInFrames, startFrom, maxMediaDuration, startFromMedia, video, windowWidth, premountDisplay, postmountDisplay, }) => {
13
+ const getTimelineSequenceLayout = ({ durationInFrames, startFrom, cascadedStart, maxMediaDuration, startFromMedia, video, windowWidth, premountDisplay, postmountDisplay, }) => {
14
14
  var _a;
15
15
  const maxMediaSequenceDuration = (maxMediaDuration !== null && maxMediaDuration !== void 0 ? maxMediaDuration : Infinity) - startFromMedia;
16
16
  const timelineDuration = (_a = video.durationInFrames) !== null && _a !== void 0 ? _a : 1;
17
+ const fullWidth = windowWidth - timeline_layout_1.TIMELINE_PADDING * 2;
17
18
  const spatialDuration = Math.max(0, Math.min(maxMediaSequenceDuration, durationInFrames, timelineDuration - startFrom));
18
19
  // Unclipped spatial duration: without the timeline-end constraint
19
20
  const naturalSpatialDuration = Math.max(0, Math.min(maxMediaSequenceDuration, durationInFrames));
20
- const marginLeft = timelineDuration <= 0
21
- ? 0
22
- : (startFrom / timelineDuration) * (windowWidth - timeline_layout_1.TIMELINE_PADDING * 2);
21
+ const marginLeft = timelineDuration <= 0 ? 0 : (startFrom / timelineDuration) * fullWidth;
22
+ const naturalNegativeStartWidth = timelineDuration > 0 &&
23
+ startFrom === 0 &&
24
+ cascadedStart < 0 &&
25
+ durationInFrames > 0
26
+ ? Math.max(0, (-cascadedStart / timelineDuration) * fullWidth)
27
+ : 0;
28
+ const negativeStartWidth = Math.min(timeline_layout_1.TIMELINE_PADDING, naturalNegativeStartWidth);
29
+ const negativeStartClipped = naturalNegativeStartWidth > timeline_layout_1.TIMELINE_PADDING;
23
30
  const nonNegativeMarginLeft = Math.min(marginLeft, 0);
24
31
  const width = getWidthOfTrack({
25
32
  durationInFrames,
@@ -54,9 +61,11 @@ const getTimelineSequenceLayout = ({ durationInFrames, startFrom, maxMediaDurati
54
61
  })
55
62
  : null;
56
63
  return {
57
- marginLeft: Math.max(marginLeft, 0) - (premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0),
58
- width: width + (premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0) + (postmountWidth !== null && postmountWidth !== void 0 ? postmountWidth : 0),
64
+ marginLeft: Math.max(marginLeft, 0) - negativeStartWidth - (premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0),
65
+ width: width + negativeStartWidth + (premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0) + (postmountWidth !== null && postmountWidth !== void 0 ? postmountWidth : 0),
59
66
  naturalWidth: naturalWidth + (premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0) + (postmountWidth !== null && postmountWidth !== void 0 ? postmountWidth : 0),
67
+ negativeStartWidth,
68
+ negativeStartClipped,
60
69
  premountWidth,
61
70
  postmountWidth,
62
71
  };
@@ -1,21 +1,2 @@
1
- import type { _InternalTypes, SequencePropsSubscriptionKey, TSequence } from 'remotion';
2
- export type SequenceNodePathInfo = {
3
- sequenceSubscriptionKey: SequencePropsSubscriptionKey;
4
- auxiliaryKeys: string[];
5
- index: number;
6
- numberOfSequencesWithThisNodePath: number;
7
- supportsEffects: boolean;
8
- };
9
- export type TimelineTrackData = {
10
- sequence: TSequence;
11
- connectedCompositions?: readonly _InternalTypes['AnyComposition'][];
12
- depth: number;
13
- nodePathInfo: SequenceNodePathInfo | null;
14
- keyframeDisplayOffset: number;
15
- sequenceFrameOffset: number;
16
- };
17
- export type TimelineTrackWithOriginalTimings = TimelineTrackData & {
18
- cascadedStart: number;
19
- cascadedDuration: number;
20
- };
21
- export declare const getTimelineSequenceSortKey: (track: TimelineTrackData, tracks: TimelineTrackData[], nonceRanks: Map<string, number>) => string;
1
+ export { getTimelineSequenceSortKey } from '@remotion/canvas';
2
+ export type { SequenceNodePathInfo, TimelineTrackData, TimelineTrackWithOriginalTimings, } from '@remotion/canvas';
@@ -1,19 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getTimelineSequenceSortKey = void 0;
4
- const getTimelineSequenceSortKey = (track, tracks, nonceRanks) => {
5
- var _a;
6
- const rank = (_a = nonceRanks.get(track.sequence.id)) !== null && _a !== void 0 ? _a : 0;
7
- const id = String(rank).padStart(6, '0');
8
- if (!track.sequence.parent) {
9
- return id;
10
- }
11
- const parent = tracks.find((t) => t.sequence.id === track.sequence.parent);
12
- if (!parent) {
13
- // Due to effects and conditional `showInTimeline`, a parent
14
- // may not exist in the `allTracks` array.
15
- return id;
16
- }
17
- return `${(0, exports.getTimelineSequenceSortKey)(parent, tracks, nonceRanks)}-${id}`;
18
- };
19
- exports.getTimelineSequenceSortKey = getTimelineSequenceSortKey;
4
+ const canvas_1 = require("@remotion/canvas");
5
+ Object.defineProperty(exports, "getTimelineSequenceSortKey", { enumerable: true, get: function () { return canvas_1.getTimelineSequenceSortKey; } });
@@ -2,6 +2,7 @@ import type React from 'react';
2
2
  export declare const HOVERABLE_CLASS_NAME = "__remotion-hoverable";
3
3
  export declare const HOVER_GROUP_CLASS_NAME = "__remotion-hover-group";
4
4
  export declare const HOVER_GROUP_REVEAL_CLASS_NAME = "__remotion-hover-group-reveal";
5
+ export declare const FOCUS_VISIBLE_ONLY_CLASS_NAME = "__remotion-focus-visible-only";
5
6
  export declare const hoverableStyle: ({ idleBackground, hoverBackground, idleColor, hoverColor, }: {
6
7
  idleBackground: string;
7
8
  hoverBackground: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeHoverableCSS = exports.hoverableStyle = exports.HOVER_GROUP_REVEAL_CLASS_NAME = exports.HOVER_GROUP_CLASS_NAME = exports.HOVERABLE_CLASS_NAME = void 0;
3
+ exports.makeHoverableCSS = exports.hoverableStyle = exports.FOCUS_VISIBLE_ONLY_CLASS_NAME = exports.HOVER_GROUP_REVEAL_CLASS_NAME = exports.HOVER_GROUP_CLASS_NAME = exports.HOVERABLE_CLASS_NAME = void 0;
4
4
  const colors_1 = require("./colors");
5
5
  // Purely visual hover styling must be driven by CSS `:hover` rather than
6
6
  // React state: When the Studio runs in an <iframe> (like in Browser Studio),
@@ -11,6 +11,7 @@ const colors_1 = require("./colors");
11
11
  exports.HOVERABLE_CLASS_NAME = '__remotion-hoverable';
12
12
  exports.HOVER_GROUP_CLASS_NAME = '__remotion-hover-group';
13
13
  exports.HOVER_GROUP_REVEAL_CLASS_NAME = '__remotion-hover-group-reveal';
14
+ exports.FOCUS_VISIBLE_ONLY_CLASS_NAME = '__remotion-focus-visible-only';
14
15
  const BG_VARIABLE = '--remotion-hoverable-bg';
15
16
  const HOVER_BG_VARIABLE = '--remotion-hoverable-hover-bg';
16
17
  const COLOR_VARIABLE = '--remotion-hoverable-color';
@@ -58,7 +58,7 @@ const makeDefaultGlobalCSS = () => {
58
58
 
59
59
  input:focus,
60
60
  textarea:focus,
61
- button:focus:not(.__remotion_input_dragger):not(.__remotion_color_swatch):not(.__remotion-inspector-section-title):not(.__remotion-timeline-expand-arrow-button),
61
+ button:focus:not(.__remotion_input_dragger):not(.__remotion_color_swatch):not(.__remotion-inspector-section-title):not(.${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}):not(.__remotion-timeline-expand-arrow-button),
62
62
  a:focus {
63
63
  outline: none;
64
64
  box-shadow: ${colors_1.FOCUS_BOX_SHADOW};
@@ -67,6 +67,7 @@ const makeDefaultGlobalCSS = () => {
67
67
  .__remotion-composition-selector-item:focus,
68
68
  .__remotion-inspector-quick-action:focus,
69
69
  .__remotion-inspector-section-title:focus,
70
+ .${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}:focus,
70
71
  .__remotion-timeline-expand-arrow-button:focus {
71
72
  outline: none;
72
73
  box-shadow: none;
@@ -75,6 +76,7 @@ const makeDefaultGlobalCSS = () => {
75
76
  .__remotion-composition-selector-item:focus-visible,
76
77
  .__remotion-inspector-quick-action:focus-visible,
77
78
  .__remotion-inspector-section-title:focus-visible,
79
+ .${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}:focus-visible,
78
80
  .__remotion-timeline-expand-arrow-button:focus-visible {
79
81
  box-shadow: ${colors_1.FOCUS_BOX_SHADOW};
80
82
  }
@@ -14,13 +14,15 @@ const useIsStill = () => {
14
14
  exports.useIsStill = useIsStill;
15
15
  const useIsVideoComposition = () => {
16
16
  const isStill = (0, exports.useIsStill)();
17
- const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
17
+ const { canvasContent, currentAssetMetadata } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
18
18
  if (canvasContent === null) {
19
19
  return false;
20
20
  }
21
21
  if (isStill) {
22
22
  return false;
23
23
  }
24
- return canvasContent.type === 'composition';
24
+ return (canvasContent.type === 'composition' ||
25
+ (canvasContent.type === 'asset' &&
26
+ (currentAssetMetadata === null || currentAssetMetadata === void 0 ? void 0 : currentAssetMetadata.asset) === canvasContent.asset));
25
27
  };
26
28
  exports.useIsVideoComposition = useIsVideoComposition;
@@ -0,0 +1,7 @@
1
+ export declare const getRemotionConvertUrl: ({ relativePath, studioOrigin, }: {
2
+ relativePath: string;
3
+ studioOrigin: string;
4
+ }) => string;
5
+ export declare const openInRemotionConvert: ({ relativePath, }: {
6
+ relativePath: string;
7
+ }) => void;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.openInRemotionConvert = exports.getRemotionConvertUrl = void 0;
4
+ const remotion_1 = require("remotion");
5
+ const getRemotionConvertUrl = ({ relativePath, studioOrigin, }) => {
6
+ const convertUrl = new URL('https://www.remotion.dev/convert');
7
+ const assetUrl = new URL((0, remotion_1.staticFile)(relativePath), studioOrigin);
8
+ convertUrl.searchParams.set('url', assetUrl.toString());
9
+ return convertUrl.toString();
10
+ };
11
+ exports.getRemotionConvertUrl = getRemotionConvertUrl;
12
+ const openInRemotionConvert = ({ relativePath, }) => {
13
+ window.open((0, exports.getRemotionConvertUrl)({
14
+ relativePath,
15
+ studioOrigin: window.location.origin,
16
+ }), '_blank', 'noopener,noreferrer');
17
+ };
18
+ exports.openInRemotionConvert = openInRemotionConvert;
@@ -1,5 +1 @@
1
- import type { NonceHistory } from 'remotion';
2
- export declare const compareNonceHistories: (a: NonceHistory, b: NonceHistory) => number;
3
- export declare const sortItemsByNonceHistory: <T extends {
4
- nonce: NonceHistory;
5
- }>(items: T[]) => T[];
1
+ export { compareNonceHistories, sortItemsByNonceHistory } from '@remotion/canvas';
@@ -1,151 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sortItemsByNonceHistory = exports.compareNonceHistories = void 0;
4
- const getSharedEpochOrder = (a, b) => {
5
- const aMap = new Map(a);
6
- const bMap = new Map(b);
7
- const allEpochs = [...new Set([...aMap.keys(), ...bMap.keys()])].sort((x, y) => y - x);
8
- for (const epoch of allEpochs) {
9
- const aNonce = aMap.get(epoch);
10
- const bNonce = bMap.get(epoch);
11
- if (aNonce !== undefined && bNonce !== undefined) {
12
- return aNonce - bNonce;
13
- }
14
- }
15
- return null;
16
- };
17
- const compareNonceHistories = (a, b) => {
18
- const shared = getSharedEpochOrder(a, b);
19
- if (shared !== null) {
20
- return shared;
21
- }
22
- // No shared epoch — items from a lower latest epoch come first
23
- const aLatestEpoch = a[a.length - 1][0];
24
- const bLatestEpoch = b[b.length - 1][0];
25
- return aLatestEpoch - bLatestEpoch;
26
- };
27
- exports.compareNonceHistories = compareNonceHistories;
28
- // Compare two histories, each pre-collapsed to parallel arrays of epochs and
29
- // nonces sorted by descending epoch, without rebuilding a Map per comparison.
30
- // Equivalent to getSharedEpochOrder: both find the newest shared epoch and
31
- // compare its nonces.
32
- const sharedEpochOrderFromSorted = (aEpochs, aNonces, bEpochs, bNonces) => {
33
- let i = 0;
34
- let j = 0;
35
- while (i < aEpochs.length && j < bEpochs.length) {
36
- const ae = aEpochs[i];
37
- const be = bEpochs[j];
38
- if (ae === be) {
39
- return aNonces[i] - bNonces[j];
40
- }
41
- if (ae > be) {
42
- i++;
43
- }
44
- else {
45
- j++;
46
- }
47
- }
48
- return null;
49
- };
50
- const sortItemsByNonceHistory = (items) => {
51
- const n = items.length;
52
- if (n <= 1) {
53
- return items.slice();
54
- }
55
- // Collapse each history once into epoch/nonce arrays sorted by descending
56
- // epoch. `new Map(nonce)` keeps the last value per duplicated epoch, matching
57
- // getSharedEpochOrder. This removes the per-pair Map/Set construction the
58
- // pairwise loop below would otherwise repeat O(n^2) times.
59
- const epochsOf = new Array(n);
60
- const noncesOf = new Array(n);
61
- for (let i = 0; i < n; i++) {
62
- const map = new Map(items[i].nonce);
63
- const epochs = [...map.keys()].sort((x, y) => y - x);
64
- epochsOf[i] = epochs;
65
- noncesOf[i] = epochs.map((e) => map.get(e));
66
- }
67
- // Pairwise "strictly before" relation, stored as bitsets: `before[i]` has
68
- // bit j set when i must come before j, `known[i]` has bit j set when the
69
- // pair (i, j) is directly determined by a shared epoch. Bitsets let the
70
- // transitive closure below combine 32 relationships per word.
71
- const words = (n + 31) >> 5;
72
- const before = new Uint32Array(n * words);
73
- const known = new Uint32Array(n * words);
74
- // Direct comparison sign per ordered pair; only read where `known` is set.
75
- const sign = new Int8Array(n * n);
76
- for (let i = 0; i < n; i++) {
77
- for (let j = i + 1; j < n; j++) {
78
- const cmp = sharedEpochOrderFromSorted(epochsOf[i], noncesOf[i], epochsOf[j], noncesOf[j]);
79
- if (cmp === null) {
80
- continue;
81
- }
82
- known[i * words + (j >> 5)] |= 1 << (j & 31);
83
- known[j * words + (i >> 5)] |= 1 << (i & 31);
84
- sign[i * n + j] = cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
85
- sign[j * n + i] = cmp < 0 ? 1 : cmp > 0 ? -1 : 0;
86
- if (cmp < 0) {
87
- before[i * words + (j >> 5)] |= 1 << (j & 31);
88
- }
89
- else if (cmp > 0) {
90
- before[j * words + (i >> 5)] |= 1 << (i & 31);
91
- }
92
- }
93
- }
94
- // Transitive closure: if i < k and k < j, then i < j. This is the same
95
- // Floyd-Warshall relation as before, but the inner sweep is bitwise
96
- // (`before[k] & ~known[i]` finds all reachable j at once). A newly derived
97
- // edge is marked known immediately so the first path decides an otherwise
98
- // undetermined pair — preserving behavior on the inputs where the pairwise
99
- // comparison is intentionally non-transitive.
100
- for (let k = 0; k < n; k++) {
101
- const kBase = k * words;
102
- const kWord = k >> 5;
103
- const kBit = 1 << (k & 31);
104
- for (let i = 0; i < n; i++) {
105
- if (i === k) {
106
- continue;
107
- }
108
- const iBase = i * words;
109
- if ((before[iBase + kWord] & kBit) === 0) {
110
- continue; // i is not before k, so k adds nothing for i
111
- }
112
- for (let w = 0; w < words; w++) {
113
- const add = before[kBase + w] & ~known[iBase + w];
114
- if (add === 0) {
115
- continue;
116
- }
117
- before[iBase + w] |= add;
118
- known[iBase + w] |= add;
119
- // Set the mirror relationship (j after i) for each newly known pair.
120
- let bits = add;
121
- while (bits !== 0) {
122
- const lowest = bits & -bits;
123
- const j = (w << 5) + (31 - Math.clz32(lowest));
124
- sign[i * n + j] = -1;
125
- known[j * words + (i >> 5)] |= 1 << (i & 31);
126
- sign[j * n + i] = 1;
127
- bits ^= lowest;
128
- }
129
- }
130
- }
131
- }
132
- const indexMap = new Map(items.map((item, i) => [item, i]));
133
- const result = items.slice();
134
- result.sort((a, b) => {
135
- const ai = indexMap.get(a);
136
- const bi = indexMap.get(b);
137
- if ((known[ai * words + (bi >> 5)] >> (bi & 31)) & 1) {
138
- return sign[ai * n + bi];
139
- }
140
- if ((before[ai * words + (bi >> 5)] >> (bi & 31)) & 1) {
141
- return -1;
142
- }
143
- if ((before[bi * words + (ai >> 5)] >> (ai & 31)) & 1) {
144
- return 1;
145
- }
146
- // No transitive relationship — lower latest epoch first
147
- return a.nonce[a.nonce.length - 1][0] - b.nonce[b.nonce.length - 1][0];
148
- });
149
- return result;
150
- };
151
- exports.sortItemsByNonceHistory = sortItemsByNonceHistory;
4
+ const canvas_1 = require("@remotion/canvas");
5
+ Object.defineProperty(exports, "compareNonceHistories", { enumerable: true, get: function () { return canvas_1.compareNonceHistories; } });
6
+ Object.defineProperty(exports, "sortItemsByNonceHistory", { enumerable: true, get: function () { return canvas_1.sortItemsByNonceHistory; } });
@@ -1,4 +1,3 @@
1
- import type { SequencePropsSubscriptionKey } from 'remotion';
2
1
  import type { SequenceNodePathInfo } from './get-timeline-sequence-sort-key';
3
- export declare const timelineSequenceNodePathToKey: (key: SequencePropsSubscriptionKey) => string;
2
+ export { timelineSequenceNodePathToKey } from '@remotion/canvas';
4
3
  export declare const timelineNodePathInfoToKey: (info: SequenceNodePathInfo) => string;
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.timelineNodePathInfoToKey = exports.timelineSequenceNodePathToKey = void 0;
4
4
  const studio_shared_1 = require("@remotion/studio-shared");
5
- const timelineSequenceNodePathToKey = (key) => `${key.absolutePath}:${JSON.stringify(key.nodePath)}`;
6
- exports.timelineSequenceNodePathToKey = timelineSequenceNodePathToKey;
5
+ const canvas_1 = require("@remotion/canvas");
6
+ Object.defineProperty(exports, "timelineSequenceNodePathToKey", { enumerable: true, get: function () { return canvas_1.timelineSequenceNodePathToKey; } });
7
7
  const timelineNodePathInfoToKey = (info) => [
8
8
  (0, studio_shared_1.stringifySequenceExpandedRowKey)(info.sequenceSubscriptionKey),
9
9
  info.auxiliaryKeys.join('.'),
@@ -1,4 +1,4 @@
1
- import type { InputAudioTrack, InputVideoTrack } from 'mediabunny';
1
+ import type { FrameRateMetrics, InputAudioTrack, InputVideoTrack } from 'mediabunny';
2
2
  export type MediaMetadata = {
3
3
  duration: number;
4
4
  format: string | null;
@@ -12,6 +12,7 @@ export type MediaMetadata = {
12
12
  hasVideoTrack: boolean | null;
13
13
  hasAudioTrack: boolean | null;
14
14
  };
15
+ export declare const getFrameRateFromMetrics: (metrics: Pick<FrameRateMetrics, "bestGuessFrameRate" | "probedPacketCount"> | null) => number | null;
15
16
  export declare const getCachedMediaMetadata: (src: string) => MediaMetadata | null;
16
17
  export declare const getMediaMetadata: (src: string) => Promise<MediaMetadata | null>;
17
18
  export declare const useMediaMetadata: (src: string | null) => MediaMetadata | null;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useMediaMetadata = exports.getMediaMetadata = exports.getCachedMediaMetadata = void 0;
3
+ exports.useMediaMetadata = exports.getMediaMetadata = exports.getCachedMediaMetadata = exports.getFrameRateFromMetrics = void 0;
4
4
  const media_utils_1 = require("@remotion/media-utils");
5
5
  const mediabunny_1 = require("mediabunny");
6
6
  const react_1 = require("react");
@@ -8,6 +8,13 @@ const remotion_1 = require("remotion");
8
8
  const get_duration_or_compute_1 = require("./get-duration-or-compute");
9
9
  const cache = new Map();
10
10
  const pendingRequests = new Map();
11
+ const getFrameRateFromMetrics = (metrics) => {
12
+ if (metrics === null || metrics.probedPacketCount < 2) {
13
+ return null;
14
+ }
15
+ return metrics.bestGuessFrameRate;
16
+ };
17
+ exports.getFrameRateFromMetrics = getFrameRateFromMetrics;
11
18
  const getCachedMediaMetadata = (src) => {
12
19
  var _a;
13
20
  return (_a = cache.get(src)) !== null && _a !== void 0 ? _a : null;
@@ -22,7 +29,7 @@ const safeCall = async (fn) => {
22
29
  }
23
30
  };
24
31
  const getMediabunnyMetadata = async (src) => {
25
- var _a, _b;
32
+ var _a;
26
33
  const lease = (() => {
27
34
  try {
28
35
  return remotion_1.Internals.globalMediaResourceManager.acquire({
@@ -62,11 +69,11 @@ const getMediabunnyMetadata = async (src) => {
62
69
  if (duration === null) {
63
70
  return null;
64
71
  }
65
- const [width, height, videoCodec, packetStats, isHdr, audioCodec, sampleRate,] = await Promise.all([
72
+ const [width, height, videoCodec, frameRateMetrics, isHdr, audioCodec, sampleRate,] = await Promise.all([
66
73
  videoTrack ? safeCall(() => videoTrack.getDisplayWidth()) : null,
67
74
  videoTrack ? safeCall(() => videoTrack.getDisplayHeight()) : null,
68
75
  videoTrack ? safeCall(() => videoTrack.getCodec()) : null,
69
- videoTrack ? safeCall(() => videoTrack.computePacketStats(50)) : null,
76
+ videoTrack ? safeCall(() => videoTrack.computeFrameRateMetrics()) : null,
70
77
  videoTrack ? safeCall(() => videoTrack.hasHighDynamicRange()) : null,
71
78
  audioTrack ? safeCall(() => audioTrack.getCodec()) : null,
72
79
  audioTrack ? safeCall(() => audioTrack.getSampleRate()) : null,
@@ -78,7 +85,7 @@ const getMediabunnyMetadata = async (src) => {
78
85
  height,
79
86
  videoCodec,
80
87
  audioCodec,
81
- fps: (_b = packetStats === null || packetStats === void 0 ? void 0 : packetStats.averagePacketRate) !== null && _b !== void 0 ? _b : null,
88
+ fps: (0, exports.getFrameRateFromMetrics)(frameRateMetrics),
82
89
  isHdr,
83
90
  sampleRate,
84
91
  hasVideoTrack: Boolean(videoTrack),
@@ -20,6 +20,7 @@ const Checkmark_1 = require("../icons/Checkmark");
20
20
  const canvas_ref_1 = require("../state/canvas-ref");
21
21
  const checkerboard_1 = require("../state/checkerboard");
22
22
  const editor_guides_1 = require("../state/editor-guides");
23
+ const editor_pixel_grid_1 = require("../state/editor-pixel-grid");
23
24
  const editor_rulers_1 = require("../state/editor-rulers");
24
25
  const editor_snapping_1 = require("../state/editor-snapping");
25
26
  const editor_zoom_gestures_1 = require("../state/editor-zoom-gestures");
@@ -234,6 +235,7 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
234
235
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
235
236
  const { checkerboard, setCheckerboard } = (0, react_1.useContext)(checkerboard_1.CheckerboardContext);
236
237
  const { editorZoomGestures, setEditorZoomGestures } = (0, react_1.useContext)(editor_zoom_gestures_1.EditorZoomGesturesContext);
238
+ const { editorShowPixelGrid, setEditorShowPixelGrid } = (0, react_1.useContext)(editor_pixel_grid_1.EditorShowPixelGridContext);
237
239
  const { editorShowRulers, setEditorShowRulers } = (0, react_1.useContext)(editor_rulers_1.EditorShowRulersContext);
238
240
  const { editorShowGuides, setEditorShowGuides } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
239
241
  const { editorSnapping, setEditorSnapping } = (0, react_1.useContext)(editor_snapping_1.EditorSnappingContext);
@@ -304,29 +306,28 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
304
306
  subMenu: null,
305
307
  quickSwitcherLabel: 'Help: Changelog',
306
308
  },
307
- browserStudioOperations === null
308
- ? {
309
- id: 'settings',
310
- value: 'settings',
311
- label: 'Settings...',
312
- onClick: () => {
313
- var _a;
314
- var _b;
315
- closeMenu();
316
- setSelectedModal({
317
- type: 'settings',
318
- initialTab: 'rendering',
319
- initialPublicLicenseKey: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
320
- });
321
- },
322
- type: 'item',
323
- keyHint: null,
324
- leftItem: null,
325
- subMenu: null,
326
- quickSwitcherLabel: 'Settings...',
327
- disabled: readOnlyStudio || type !== 'connected',
328
- }
329
- : null,
309
+ {
310
+ id: 'settings',
311
+ value: 'settings',
312
+ label: 'Settings...',
313
+ onClick: () => {
314
+ var _a;
315
+ var _b;
316
+ closeMenu();
317
+ setSelectedModal({
318
+ type: 'settings',
319
+ initialTab: browserStudioOperations === null ? 'rendering' : 'shortcuts',
320
+ initialPublicLicenseKey: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
321
+ });
322
+ },
323
+ type: 'item',
324
+ keyHint: null,
325
+ leftItem: null,
326
+ subMenu: null,
327
+ quickSwitcherLabel: 'Settings...',
328
+ disabled: (browserStudioOperations === null && readOnlyStudio) ||
329
+ type !== 'connected',
330
+ },
330
331
  {
331
332
  id: 'acknowledgements',
332
333
  value: 'acknowledgements',
@@ -424,6 +425,22 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
424
425
  ? 'Disable Zoom and Pan Gestures'
425
426
  : 'Enable Zoom and Pan Gestures',
426
427
  },
428
+ {
429
+ id: 'pixel-grid',
430
+ keyHint: null,
431
+ label: 'Pixel Grid',
432
+ onClick: () => {
433
+ closeMenu();
434
+ setEditorShowPixelGrid((c) => !c);
435
+ },
436
+ type: 'item',
437
+ value: 'pixel-grid',
438
+ leftItem: editorShowPixelGrid ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
439
+ subMenu: null,
440
+ quickSwitcherLabel: editorShowPixelGrid
441
+ ? 'Hide Pixel Grid'
442
+ : 'Show Pixel Grid',
443
+ },
427
444
  {
428
445
  id: 'show-rulers',
429
446
  keyHint: null,
@@ -789,12 +806,13 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
789
806
  value: 'install-packages',
790
807
  label: 'Install package...',
791
808
  onClick: () => {
809
+ var _a;
810
+ var _b;
792
811
  closeMenu();
793
812
  setSelectedModal({
794
- type: 'install-packages',
795
- packageManager: remotion_packageManager === 'unknown'
796
- ? null
797
- : remotion_packageManager,
813
+ type: 'settings',
814
+ initialTab: 'packages',
815
+ initialPublicLicenseKey: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
798
816
  });
799
817
  },
800
818
  type: 'item',
@@ -818,13 +836,13 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
818
836
  ? 'Shortcuts (disabled)'
819
837
  : 'Shortcuts',
820
838
  onClick: () => {
839
+ var _a;
840
+ var _b;
821
841
  closeMenu();
822
842
  setSelectedModal({
823
- type: 'quick-switcher',
824
- mode: 'docs',
825
- invocationTimestamp: Date.now(),
826
- assetSelection: null,
827
- compositionSelection: null,
843
+ type: 'settings',
844
+ initialTab: 'shortcuts',
845
+ initialPublicLicenseKey: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
828
846
  });
829
847
  },
830
848
  keyHint: '?',
@@ -990,6 +1008,7 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
990
1008
  currentComposition,
991
1009
  resolvedCompositionLocation,
992
1010
  editorZoomGestures,
1011
+ editorShowPixelGrid,
993
1012
  editorShowRulers,
994
1013
  editorShowGuides,
995
1014
  editorSnapping,
@@ -1007,6 +1026,7 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
1007
1026
  size.size,
1008
1027
  setSize,
1009
1028
  setEditorZoomGestures,
1029
+ setEditorShowPixelGrid,
1010
1030
  setEditorShowRulers,
1011
1031
  setEditorShowGuides,
1012
1032
  setEditorSnapping,
@@ -6,7 +6,7 @@ const AlignCenterHorizontalIcon = (props) => {
6
6
  var _a;
7
7
  const color = (_a = props.color) !== null && _a !== void 0 ? _a : 'currentColor';
8
8
  return (jsx_runtime_1.jsxs("svg", { ...props, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
9
- jsx_runtime_1.jsx("path", { d: "M8 2V14", stroke: color, strokeOpacity: "0.5", strokeLinecap: "square" }), jsx_runtime_1.jsx("line", { x1: "3", y1: "6", x2: "12", y2: "6", stroke: color, strokeWidth: "2" }), jsx_runtime_1.jsx("line", { x1: "4", y1: "10", x2: "11", y2: "10", stroke: color, strokeWidth: "2" })
9
+ jsx_runtime_1.jsx("path", { d: "M8 2V14", stroke: color, strokeLinecap: "square" }), jsx_runtime_1.jsx("line", { x1: "3", y1: "6", x2: "12", y2: "6", stroke: color, strokeWidth: "2" }), jsx_runtime_1.jsx("line", { x1: "4", y1: "10", x2: "11", y2: "10", stroke: color, strokeWidth: "2" })
10
10
  ] }));
11
11
  };
12
12
  exports.AlignCenterHorizontalIcon = AlignCenterHorizontalIcon;
@@ -6,7 +6,7 @@ const AlignLeftIcon = (props) => {
6
6
  var _a;
7
7
  const color = (_a = props.color) !== null && _a !== void 0 ? _a : 'currentColor';
8
8
  return (jsx_runtime_1.jsxs("svg", { ...props, viewBox: "0 0 16 16", fill: "none", children: [
9
- jsx_runtime_1.jsx("path", { d: "M2 2L2 14", stroke: color, strokeOpacity: "0.5", strokeLinecap: "square" }), jsx_runtime_1.jsx("line", { x1: "4", y1: "6", x2: "13", y2: "6", stroke: color, strokeWidth: "2" }), jsx_runtime_1.jsx("line", { x1: "4", y1: "10", x2: "11", y2: "10", stroke: color, strokeWidth: "2" })
9
+ jsx_runtime_1.jsx("path", { d: "M2 2L2 14", stroke: color, strokeLinecap: "square" }), jsx_runtime_1.jsx("line", { x1: "4", y1: "6", x2: "13", y2: "6", stroke: color, strokeWidth: "2" }), jsx_runtime_1.jsx("line", { x1: "4", y1: "10", x2: "11", y2: "10", stroke: color, strokeWidth: "2" })
10
10
  ] }));
11
11
  };
12
12
  exports.AlignLeftIcon = AlignLeftIcon;
@@ -6,7 +6,7 @@ const AlignRightIcon = (props) => {
6
6
  var _a;
7
7
  const color = (_a = props.color) !== null && _a !== void 0 ? _a : 'currentColor';
8
8
  return (jsx_runtime_1.jsxs("svg", { ...props, viewBox: "0 0 16 16", fill: "none", children: [
9
- jsx_runtime_1.jsx("path", { d: "M14 2V14", stroke: color, strokeOpacity: "0.5", strokeLinecap: "square" }), jsx_runtime_1.jsx("line", { x1: "3", y1: "6", x2: "12", y2: "6", stroke: color, strokeWidth: "2" }), jsx_runtime_1.jsx("line", { x1: "5", y1: "10", x2: "12", y2: "10", stroke: color, strokeWidth: "2" })
9
+ jsx_runtime_1.jsx("path", { d: "M14 2V14", stroke: color, strokeLinecap: "square" }), jsx_runtime_1.jsx("line", { x1: "3", y1: "6", x2: "12", y2: "6", stroke: color, strokeWidth: "2" }), jsx_runtime_1.jsx("line", { x1: "5", y1: "10", x2: "12", y2: "10", stroke: color, strokeWidth: "2" })
10
10
  ] }));
11
11
  };
12
12
  exports.AlignRightIcon = AlignRightIcon;
@@ -0,0 +1,4 @@
1
+ import type { SVGProps } from 'react';
2
+ export declare const KeyboardIcon: React.FC<SVGProps<SVGSVGElement> & {
3
+ readonly color: string;
4
+ }>;