@remotion/studio 4.0.484 → 4.0.486

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 (288) hide show
  1. package/dist/ResolveCompositionConfigInStudio.js +42 -0
  2. package/dist/components/AssetSelector.js +1 -1
  3. package/dist/components/AssetSelectorItem.js +9 -9
  4. package/dist/components/AudioWaveform.js +3 -3
  5. package/dist/components/Button.js +2 -2
  6. package/dist/components/Canvas.js +28 -0
  7. package/dist/components/CanvasOrLoading.js +1 -1
  8. package/dist/components/CheckboardToggle.js +1 -1
  9. package/dist/components/Checkbox.js +3 -3
  10. package/dist/components/ColorPicker/AlphaSlider.js +4 -3
  11. package/dist/components/ColorPicker/ColorPicker.js +4 -4
  12. package/dist/components/ColorPicker/ColorPickerPopup.js +10 -10
  13. package/dist/components/ColorPicker/HueSlider.js +4 -3
  14. package/dist/components/ColorPicker/SaturationValueArea.js +5 -4
  15. package/dist/components/ColorPicker/checker.d.ts +1 -1
  16. package/dist/components/ColorPicker/checker.js +3 -3
  17. package/dist/components/CompactExplanation.js +3 -3
  18. package/dist/components/CompositionSelector.js +141 -5
  19. package/dist/components/CompositionSelectorItem.d.ts +1 -0
  20. package/dist/components/CompositionSelectorItem.js +103 -11
  21. package/dist/components/ContextMenu.js +75 -1
  22. package/dist/components/CopyButton.js +3 -2
  23. package/dist/components/CurrentAsset.d.ts +3 -1
  24. package/dist/components/CurrentAsset.js +15 -2
  25. package/dist/components/CurrentComposition.js +3 -2
  26. package/dist/components/EffectPickerModal.js +1 -1
  27. package/dist/components/FilePreview.js +2 -1
  28. package/dist/components/FpsCounter.js +3 -2
  29. package/dist/components/FullscreenToggle.js +2 -1
  30. package/dist/components/GlobalKeybindings.js +0 -12
  31. package/dist/components/InlineAction.js +2 -2
  32. package/dist/components/InlineCompositionName.d.ts +7 -0
  33. package/dist/components/InlineCompositionName.js +58 -0
  34. package/dist/components/InlineEditableTitle.d.ts +8 -0
  35. package/dist/components/InlineEditableTitle.js +134 -0
  36. package/dist/components/InspectorInfoHeader.js +2 -2
  37. package/dist/components/InspectorPanel/DefaultInspector.d.ts +1 -0
  38. package/dist/components/InspectorPanel/DefaultInspector.js +2 -2
  39. package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +1 -1
  40. package/dist/components/InspectorPanel/KeyframeInspector.js +1 -0
  41. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +17 -30
  42. package/dist/components/InspectorPanel/common.js +2 -2
  43. package/dist/components/InspectorPanel/styles.js +5 -5
  44. package/dist/components/InspectorPanel.d.ts +1 -0
  45. package/dist/components/InspectorPanel.js +2 -2
  46. package/dist/components/InspectorSequenceSection.js +35 -2
  47. package/dist/components/InstallablePackage.js +1 -1
  48. package/dist/components/KeyboardShortcutsExplainer.js +5 -5
  49. package/dist/components/LoopToggle.js +1 -1
  50. package/dist/components/Menu/MenuDivider.js +1 -1
  51. package/dist/components/Menu/MenuItem.js +1 -1
  52. package/dist/components/Menu/MenuSubItem.js +1 -1
  53. package/dist/components/Menu/styles.js +3 -3
  54. package/dist/components/MenuToolbar.js +2 -2
  55. package/dist/components/ModalButton.js +1 -1
  56. package/dist/components/ModalContainer.js +3 -3
  57. package/dist/components/ModalFooter.js +2 -1
  58. package/dist/components/ModalHeader.js +3 -2
  59. package/dist/components/Modals.js +2 -1
  60. package/dist/components/NewComposition/CancelButton.js +4 -3
  61. package/dist/components/NewComposition/CodemodFooter.d.ts +7 -1
  62. package/dist/components/NewComposition/CodemodFooter.js +17 -12
  63. package/dist/components/NewComposition/ComboBox.js +3 -3
  64. package/dist/components/NewComposition/DeleteComposition.js +7 -1
  65. package/dist/components/NewComposition/DeleteFolder.js +7 -1
  66. package/dist/components/NewComposition/DuplicateComposition.js +17 -10
  67. package/dist/components/NewComposition/InputAndValidationContainer.d.ts +3 -0
  68. package/dist/components/NewComposition/InputAndValidationContainer.js +15 -0
  69. package/dist/components/NewComposition/InputDragger.js +11 -3
  70. package/dist/components/NewComposition/MenuContent.js +1 -1
  71. package/dist/components/NewComposition/NewCompDuration.js +7 -6
  72. package/dist/components/NewComposition/NewComposition.d.ts +5 -1
  73. package/dist/components/NewComposition/NewComposition.js +31 -85
  74. package/dist/components/NewComposition/NewFolder.d.ts +5 -0
  75. package/dist/components/NewComposition/NewFolder.js +86 -0
  76. package/dist/components/NewComposition/RemInput.js +3 -3
  77. package/dist/components/NewComposition/RemTextarea.js +1 -1
  78. package/dist/components/NewComposition/RenameComposition.js +13 -14
  79. package/dist/components/NewComposition/RenameFolder.js +9 -2
  80. package/dist/components/NewComposition/RenameStaticFile.js +22 -60
  81. package/dist/components/NewComposition/ValidationMessage.js +10 -2
  82. package/dist/components/NewComposition/use-rename-static-file.d.ts +18 -0
  83. package/dist/components/NewComposition/use-rename-static-file.js +90 -0
  84. package/dist/components/NoRegisterRoot.js +3 -2
  85. package/dist/components/Notifications/ColorDot.js +3 -2
  86. package/dist/components/Notifications/Notification.js +4 -4
  87. package/dist/components/Notifications/NotificationCenter.js +2 -1
  88. package/dist/components/Notifications/ServerDisconnected.js +5 -4
  89. package/dist/components/OptionsPanel.d.ts +0 -3
  90. package/dist/components/OptionsPanel.js +8 -4
  91. package/dist/components/OutlineToggle.js +1 -1
  92. package/dist/components/PlayPause.js +4 -3
  93. package/dist/components/PreviewToolbar.js +1 -1
  94. package/dist/components/QuickSwitcher/AlgoliaCredit.js +2 -1
  95. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
  96. package/dist/components/QuickSwitcher/QuickSwitcherResult.js +2 -2
  97. package/dist/components/RefreshCompositionOverlay.js +2 -1
  98. package/dist/components/RenderButton.js +9 -9
  99. package/dist/components/RenderModal/CliCopyButton.js +1 -1
  100. package/dist/components/RenderModal/ClientRenderProgress.js +1 -1
  101. package/dist/components/RenderModal/DataEditor.js +1 -1
  102. package/dist/components/RenderModal/GuiRenderStatus.js +1 -1
  103. package/dist/components/RenderModal/InfoBubble.js +2 -2
  104. package/dist/components/RenderModal/InfoTooltip.js +3 -3
  105. package/dist/components/RenderModal/InlineEyeIcon.js +2 -1
  106. package/dist/components/RenderModal/InlineRemoveButton.js +2 -1
  107. package/dist/components/RenderModal/MultiRangeSlider.js +1 -1
  108. package/dist/components/RenderModal/OptionExplainer.js +2 -2
  109. package/dist/components/RenderModal/RenderModalHr.js +2 -1
  110. package/dist/components/RenderModal/RenderStatusModal.js +2 -1
  111. package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +1 -5
  112. package/dist/components/RenderModal/SchemaEditor/SchemaResetButton.js +2 -1
  113. package/dist/components/RenderModal/SchemaEditor/SchemaSeparationLine.js +1 -1
  114. package/dist/components/RenderModal/SchemaEditor/SchemaVerticalGuide.js +2 -1
  115. package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
  116. package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.js +1 -1
  117. package/dist/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +1 -1
  118. package/dist/components/RenderModal/SchemaEditor/create-zod-values.js +2 -1
  119. package/dist/components/RenderModal/ServerRenderModal.js +5 -4
  120. package/dist/components/RenderModal/WarningIndicatorButton.js +4 -6
  121. package/dist/components/RenderModal/WebRenderModal.js +2 -1
  122. package/dist/components/RenderModal/WebRenderModalAudio.js +4 -3
  123. package/dist/components/RenderModal/WebRenderModalLicense.js +2 -2
  124. package/dist/components/RenderModal/WebRenderModalPicture.js +2 -1
  125. package/dist/components/RenderModal/render-modals.js +3 -3
  126. package/dist/components/RenderPreview.js +1 -1
  127. package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +2 -1
  128. package/dist/components/RenderQueue/RenderQueueDownloadItem.js +2 -1
  129. package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +2 -1
  130. package/dist/components/RenderQueue/RenderQueueItemStatus.js +1 -1
  131. package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +2 -1
  132. package/dist/components/RenderQueue/RenderQueueRemoveItem.js +2 -1
  133. package/dist/components/RenderQueue/RenderQueueRepeat.js +2 -1
  134. package/dist/components/RenderQueue/index.js +1 -1
  135. package/dist/components/RendersTab.js +2 -2
  136. package/dist/components/SegmentedControl.js +3 -3
  137. package/dist/components/SelectedOutlineElement.d.ts +5 -0
  138. package/dist/components/SelectedOutlineElement.js +52 -10
  139. package/dist/components/SelectedOutlineOverlay.d.ts +1 -1
  140. package/dist/components/SelectedOutlineOverlay.js +16 -4
  141. package/dist/components/SelectedOutlineUvControls.js +5 -5
  142. package/dist/components/SidebarCollapserControls.js +5 -4
  143. package/dist/components/Splitter/SplitterElement.js +2 -1
  144. package/dist/components/StaticFilePreview.js +1 -1
  145. package/dist/components/Tabs/index.js +3 -3
  146. package/dist/components/Tabs/vertical.js +3 -3
  147. package/dist/components/TextViewer.js +2 -1
  148. package/dist/components/TimeValue.js +1 -1
  149. package/dist/components/Timeline/EasingEditorModal.js +8 -8
  150. package/dist/components/Timeline/KeyframeSettingsModal.js +1 -1
  151. package/dist/components/Timeline/LoopedIndicator.js +2 -2
  152. package/dist/components/Timeline/MaxTimelineTracks.js +3 -2
  153. package/dist/components/Timeline/TimelineArrayField.js +6 -5
  154. package/dist/components/Timeline/TimelineColorField.js +2 -1
  155. package/dist/components/Timeline/TimelineDeleteKeybindings.js +34 -1
  156. package/dist/components/Timeline/TimelineEffectItem.js +3 -2
  157. package/dist/components/Timeline/TimelineEffectPropItem.js +2 -2
  158. package/dist/components/Timeline/TimelineExpandArrowButton.js +3 -2
  159. package/dist/components/Timeline/TimelineExpandedRow.js +2 -1
  160. package/dist/components/Timeline/TimelineExpandedSection.js +2 -1
  161. package/dist/components/Timeline/TimelineFieldLabel.js +2 -1
  162. package/dist/components/Timeline/TimelineFontFamilyField.d.ts +11 -0
  163. package/dist/components/Timeline/TimelineFontFamilyField.js +545 -0
  164. package/dist/components/Timeline/TimelineImageInfo.js +2 -1
  165. package/dist/components/Timeline/TimelineInOutPointer.js +2 -1
  166. package/dist/components/Timeline/TimelineInOutPointerHandle.js +4 -5
  167. package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -1
  168. package/dist/components/Timeline/TimelineKeyframeControls.js +3 -2
  169. package/dist/components/Timeline/TimelineKeyframeDiamondIcon.js +1 -1
  170. package/dist/components/Timeline/TimelineKeyframeEasingLine.js +1 -1
  171. package/dist/components/Timeline/TimelineLayerEye.js +3 -3
  172. package/dist/components/Timeline/TimelineMediaInfo.js +2 -2
  173. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +8 -0
  174. package/dist/components/Timeline/TimelineRotationField.js +4 -3
  175. package/dist/components/Timeline/TimelineScaleField.js +1 -1
  176. package/dist/components/Timeline/TimelineSchemaField.d.ts +2 -0
  177. package/dist/components/Timeline/TimelineSchemaField.js +47 -7
  178. package/dist/components/Timeline/TimelineScrollable.js +3 -2
  179. package/dist/components/Timeline/TimelineSelection.js +7 -6
  180. package/dist/components/Timeline/TimelineSequence.js +17 -20
  181. package/dist/components/Timeline/TimelineSequenceFrame.js +3 -2
  182. package/dist/components/Timeline/TimelineSequenceItem.js +27 -108
  183. package/dist/components/Timeline/TimelineSequenceName.js +3 -2
  184. package/dist/components/Timeline/TimelineSequencePropItem.js +8 -4
  185. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +20 -1
  186. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +128 -11
  187. package/dist/components/Timeline/TimelineSlider.js +2 -1
  188. package/dist/components/Timeline/TimelineSliderHandle.js +2 -1
  189. package/dist/components/Timeline/TimelineTextContentField.d.ts +12 -0
  190. package/dist/components/Timeline/TimelineTextContentField.js +100 -0
  191. package/dist/components/Timeline/TimelineTimeIndicators.js +1 -1
  192. package/dist/components/Timeline/TimelineVideoInfo.js +2 -1
  193. package/dist/components/Timeline/TimelineWidthProvider.js +18 -3
  194. package/dist/components/Timeline/TimelineZoomControls.js +4 -3
  195. package/dist/components/Timeline/call-move-keyframe.d.ts +5 -0
  196. package/dist/components/Timeline/call-move-keyframe.js +14 -3
  197. package/dist/components/Timeline/focus-inspector-field.d.ts +16 -0
  198. package/dist/components/Timeline/focus-inspector-field.js +49 -0
  199. package/dist/components/Timeline/google-fonts-list.d.ts +6 -0
  200. package/dist/components/Timeline/google-fonts-list.js +1512 -0
  201. package/dist/components/Timeline/save-sequence-prop.d.ts +8 -1
  202. package/dist/components/Timeline/save-sequence-prop.js +63 -19
  203. package/dist/components/Timeline/split-selected-timeline-item.d.ts +38 -0
  204. package/dist/components/Timeline/split-selected-timeline-item.js +156 -0
  205. package/dist/components/Timeline/timeline-field-display-utils.js +2 -0
  206. package/dist/components/Timeline/timeline-rotation-field-utils.d.ts +5 -0
  207. package/dist/components/Timeline/timeline-rotation-field-utils.js +16 -0
  208. package/dist/components/Timeline/timeline-scroll-logic.js +5 -2
  209. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +1 -0
  210. package/dist/components/Timeline/use-rename-sequence.d.ts +30 -0
  211. package/dist/components/Timeline/use-rename-sequence.js +115 -0
  212. package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +2 -1
  213. package/dist/components/Timeline/use-timeline-expanded-tree.js +3 -1
  214. package/dist/components/Timeline/use-timeline-height.js +1 -0
  215. package/dist/components/TimelineInOutToggle.js +1 -1
  216. package/dist/components/UpdateCheck.js +2 -2
  217. package/dist/components/UpdateModal/OpenIssueButton.js +1 -1
  218. package/dist/components/VisualControls/ClickableFileName.js +2 -2
  219. package/dist/components/composition-menu-items.js +3 -0
  220. package/dist/components/effect-drag-and-drop.js +1 -0
  221. package/dist/components/folder-menu-items.js +20 -0
  222. package/dist/components/import-assets.d.ts +7 -1
  223. package/dist/components/import-assets.js +55 -1
  224. package/dist/components/options-sidebar-tabs.d.ts +4 -0
  225. package/dist/components/options-sidebar-tabs.js +5 -0
  226. package/dist/components/selected-outline-measurement.js +2 -1
  227. package/dist/components/selected-outline-types.d.ts +6 -1
  228. package/dist/error-overlay/remotion-overlay/CalculateMetadataErrorExplainer.js +2 -2
  229. package/dist/error-overlay/remotion-overlay/CodeFrame.js +7 -5
  230. package/dist/error-overlay/remotion-overlay/CompositionIdListItem.js +2 -2
  231. package/dist/error-overlay/remotion-overlay/DismissButton.js +3 -2
  232. package/dist/error-overlay/remotion-overlay/ErrorLoader.js +3 -2
  233. package/dist/error-overlay/remotion-overlay/ErrorMessage.js +4 -4
  234. package/dist/error-overlay/remotion-overlay/HelpLink.js +1 -1
  235. package/dist/error-overlay/remotion-overlay/MediaPlaybackErrorExplainer.js +4 -4
  236. package/dist/error-overlay/remotion-overlay/Overlay.js +3 -2
  237. package/dist/error-overlay/remotion-overlay/StackFrame.js +4 -3
  238. package/dist/error-overlay/remotion-overlay/Symbolicating.js +2 -1
  239. package/dist/error-overlay/remotion-overlay/carets.js +3 -2
  240. package/dist/esm/{chunk-9erwh79m.js → chunk-975rp13y.js} +11165 -7032
  241. package/dist/esm/chunk-jefhcs5z.js +164 -0
  242. package/dist/esm/internals.mjs +11166 -6999
  243. package/dist/esm/previewEntry.mjs +10697 -6526
  244. package/dist/esm/renderEntry.mjs +8 -5
  245. package/dist/helpers/checkerboard-background.js +4 -12
  246. package/dist/helpers/colors.d.ts +99 -7
  247. package/dist/helpers/colors.js +118 -10
  248. package/dist/helpers/inject-css.js +85 -83
  249. package/dist/helpers/render-codec-label.d.ts +1 -1
  250. package/dist/helpers/timeline-layout.d.ts +7 -4
  251. package/dist/helpers/timeline-layout.js +3 -1
  252. package/dist/helpers/use-create-composition.d.ts +35 -0
  253. package/dist/helpers/use-create-composition.js +111 -0
  254. package/dist/helpers/use-menu-structure.js +31 -3
  255. package/dist/helpers/use-rename-composition.d.ts +16 -0
  256. package/dist/helpers/use-rename-composition.js +49 -0
  257. package/dist/helpers/validate-folder-rename.js +2 -10
  258. package/dist/helpers/validate-new-folder-name.d.ts +5 -0
  259. package/dist/helpers/validate-new-folder-name.js +16 -0
  260. package/dist/hot-middleware-client/client.js +3 -2
  261. package/dist/icons/Checkmark.js +2 -1
  262. package/dist/icons/audio.js +2 -1
  263. package/dist/icons/caret.js +2 -2
  264. package/dist/icons/certificate.js +2 -1
  265. package/dist/icons/data.js +2 -1
  266. package/dist/icons/eyedropper.js +2 -1
  267. package/dist/icons/file.js +2 -1
  268. package/dist/icons/frame.js +2 -1
  269. package/dist/icons/gear.js +2 -1
  270. package/dist/icons/gif.js +2 -1
  271. package/dist/icons/jump-to-start.js +2 -1
  272. package/dist/icons/keys.js +4 -3
  273. package/dist/icons/media-volume.js +1 -1
  274. package/dist/icons/minus.js +2 -1
  275. package/dist/icons/pause.js +2 -1
  276. package/dist/icons/play.js +2 -1
  277. package/dist/icons/redo.js +2 -1
  278. package/dist/icons/step-back.js +2 -1
  279. package/dist/icons/step-forward.js +2 -1
  280. package/dist/icons/undo.js +2 -1
  281. package/dist/previewEntry.js +2 -1
  282. package/dist/renderEntry.js +4 -3
  283. package/dist/state/modals.d.ts +7 -0
  284. package/dist/state/timeline-zoom.js +17 -14
  285. package/dist/state/z-index.d.ts +1 -0
  286. package/dist/state/z-index.js +11 -2
  287. package/package.json +12 -12
  288. package/dist/esm/chunk-6jf1natv.js +0 -25
@@ -4,8 +4,9 @@ exports.FpsCounter = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
+ const colors_1 = require("../helpers/colors");
7
8
  const label = {
8
- color: 'white',
9
+ color: colors_1.WHITE,
9
10
  fontSize: 15,
10
11
  fontFamily: 'Arial, Helvetica, sans-serif',
11
12
  whiteSpace: 'nowrap',
@@ -58,7 +59,7 @@ const FpsCounter = ({ playbackSpeed }) => {
58
59
  const expectedFps = Math.abs(playbackSpeed) * videoConfig.fps;
59
60
  return {
60
61
  ...label,
61
- color: fps < expectedFps * 0.9 ? 'red' : 'white',
62
+ color: fps < expectedFps * 0.9 ? colors_1.RED : colors_1.WHITE,
62
63
  };
63
64
  }, [fps, playbackSpeed, videoConfig]);
64
65
  if (fps === 0) {
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
7
  const no_react_1 = require("remotion/no-react");
8
+ const colors_1 = require("../helpers/colors");
8
9
  const use_keybinding_1 = require("../helpers/use-keybinding");
9
10
  const canvas_ref_1 = require("../state/canvas-ref");
10
11
  const ControlButton_1 = require("./ControlButton");
@@ -43,6 +44,6 @@ const FullScreenToggle = () => {
43
44
  f.unregister();
44
45
  };
45
46
  }, [keybindings, onClick]);
46
- 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 448 512", fill: "#fff", children: jsx_runtime_1.jsx("path", { d: "M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z" }) }) }));
47
+ 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 448 512", fill: colors_1.WHITE_HEX, children: jsx_runtime_1.jsx("path", { d: "M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z" }) }) }));
47
48
  };
48
49
  exports.FullScreenToggle = FullScreenToggle;
@@ -106,17 +106,6 @@ const GlobalKeybindings = ({ readOnlyStudio }) => {
106
106
  event.preventDefault();
107
107
  }
108
108
  };
109
- const nKey = keybindings.registerKeybinding({
110
- event: 'keypress',
111
- key: 'n',
112
- callback: () => {
113
- (0, NotificationCenter_1.showNotification)(`To make a new composition, right-click an existing one and select "Duplicate"`, 5000);
114
- },
115
- commandCtrlKey: false,
116
- preventDefault: true,
117
- triggerIfInputFieldFocused: false,
118
- keepRegisteredWhenNotHighestContext: false,
119
- });
120
109
  const cmdKKey = keybindings.registerKeybinding({
121
110
  event: 'keydown',
122
111
  key: 'k',
@@ -200,7 +189,6 @@ const GlobalKeybindings = ({ readOnlyStudio }) => {
200
189
  keepRegisteredWhenNotHighestContext: false,
201
190
  });
202
191
  return () => {
203
- nKey.unregister();
204
192
  for (const sequencePropKey of sequencePropKeys) {
205
193
  sequencePropKey.unregister();
206
194
  }
@@ -18,7 +18,7 @@ const InlineAction = ({ renderAction, onClick, disabled, title, }) => {
18
18
  return {
19
19
  border: 'none',
20
20
  background: disabled
21
- ? 'transparent'
21
+ ? colors_1.TRANSPARENT
22
22
  : (0, colors_1.getBackgroundFromHoverState)({ hovered, selected: false }),
23
23
  height: 24,
24
24
  width: 24,
@@ -30,6 +30,6 @@ const InlineAction = ({ renderAction, onClick, disabled, title, }) => {
30
30
  pointerEvents: disabled ? 'none' : 'auto',
31
31
  };
32
32
  }, [disabled, hovered]);
33
- return (jsx_runtime_1.jsx("button", { type: "button", onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, onClick: onClick, style: style, tabIndex: tabIndex, title: title, children: renderAction(hovered ? 'white' : colors_1.LIGHT_TEXT) }));
33
+ return (jsx_runtime_1.jsx("button", { type: "button", onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, onClick: onClick, style: style, tabIndex: tabIndex, title: title, children: renderAction(hovered ? colors_1.WHITE : colors_1.LIGHT_TEXT) }));
34
34
  };
35
35
  exports.InlineAction = InlineAction;
@@ -0,0 +1,7 @@
1
+ import type * as React from 'react';
2
+ import type { _InternalTypes } from 'remotion';
3
+ export declare const InlineCompositionName: React.FC<{
4
+ readonly compositionId: string;
5
+ readonly stack: string | null;
6
+ readonly compositions: _InternalTypes['AnyComposition'][];
7
+ }>;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InlineCompositionName = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const resolved_stack_to_symbolicated_1 = require("../helpers/resolved-stack-to-symbolicated");
7
+ const use_rename_composition_1 = require("../helpers/use-rename-composition");
8
+ const InlineEditableTitle_1 = require("./InlineEditableTitle");
9
+ const NotificationCenter_1 = require("./Notifications/NotificationCenter");
10
+ const use_resolved_stack_1 = require("./Timeline/use-resolved-stack");
11
+ const InlineCompositionName = ({ compositionId, stack, compositions }) => {
12
+ const canRename = !window.remotion_isReadOnlyStudio;
13
+ const resolvedLocation = (0, use_resolved_stack_1.useResolvedStack)(stack);
14
+ const symbolicatedStack = (0, react_1.useMemo)(() => (0, resolved_stack_to_symbolicated_1.resolvedStackToSymbolicated)(resolvedLocation), [resolvedLocation]);
15
+ const { getValidationMessage, renameComposition } = (0, use_rename_composition_1.useRenameComposition)({
16
+ compositions,
17
+ currentId: compositionId,
18
+ newId: compositionId,
19
+ });
20
+ const commit = (0, react_1.useCallback)((newId) => {
21
+ if (newId === compositionId) {
22
+ return;
23
+ }
24
+ const compNameErrMessage = getValidationMessage(newId);
25
+ if (compNameErrMessage) {
26
+ (0, NotificationCenter_1.showNotification)(compNameErrMessage, 2000);
27
+ return;
28
+ }
29
+ if (!stack || !symbolicatedStack) {
30
+ (0, NotificationCenter_1.showNotification)('Could not determine where this composition is defined', 2000);
31
+ return;
32
+ }
33
+ const notification = (0, NotificationCenter_1.showNotification)('Renaming...', null);
34
+ renameComposition({
35
+ newCompositionId: newId,
36
+ signal: new AbortController().signal,
37
+ symbolicatedStack,
38
+ })
39
+ .then((result) => {
40
+ if (!result.success) {
41
+ notification.replaceContent(`Could not rename composition: ${result.reason}`, 2000);
42
+ return;
43
+ }
44
+ notification.replaceContent(`Renamed to ${newId}`, 2000);
45
+ })
46
+ .catch((err) => {
47
+ notification.replaceContent(`Could not rename composition: ${err.message}`, 2000);
48
+ });
49
+ }, [
50
+ compositionId,
51
+ getValidationMessage,
52
+ renameComposition,
53
+ stack,
54
+ symbolicatedStack,
55
+ ]);
56
+ return (jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: compositionId, canRename: canRename, onCommit: commit }));
57
+ };
58
+ exports.InlineCompositionName = InlineCompositionName;
@@ -0,0 +1,8 @@
1
+ import type * as React from 'react';
2
+ export declare const InlineEditableTitle: React.FC<{
3
+ readonly value: string;
4
+ readonly canRename: boolean;
5
+ readonly getInitialSelection?: (value: string) => [number, number];
6
+ readonly onCommit: (newValue: string) => void;
7
+ readonly title?: string;
8
+ }>;
@@ -0,0 +1,134 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InlineEditableTitle = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const colors_1 = require("../helpers/colors");
7
+ const titleWrapper = {
8
+ boxSizing: 'border-box',
9
+ color: colors_1.WHITE,
10
+ fontSize: 12,
11
+ height: 18,
12
+ lineHeight: '18px',
13
+ marginLeft: -4,
14
+ overflow: 'hidden',
15
+ textOverflow: 'ellipsis',
16
+ whiteSpace: 'nowrap',
17
+ width: 'calc(100% + 4px)',
18
+ };
19
+ const titleInner = {
20
+ borderRadius: 4,
21
+ boxSizing: 'border-box',
22
+ display: 'inline-grid',
23
+ fontSize: 12,
24
+ lineHeight: '18px',
25
+ maxWidth: '100%',
26
+ paddingLeft: 4,
27
+ paddingRight: 4,
28
+ verticalAlign: 'top',
29
+ };
30
+ const titleGridItem = {
31
+ fontSize: 12,
32
+ gridArea: '1 / 1',
33
+ minWidth: 0,
34
+ overflow: 'hidden',
35
+ textOverflow: 'ellipsis',
36
+ whiteSpace: 'nowrap',
37
+ };
38
+ const titleInput = {
39
+ appearance: 'none',
40
+ backgroundColor: colors_1.TRANSPARENT,
41
+ border: 'none',
42
+ boxShadow: 'none',
43
+ color: colors_1.WHITE,
44
+ fontFamily: 'inherit',
45
+ fontSize: 12,
46
+ height: 18,
47
+ lineHeight: '18px',
48
+ margin: 0,
49
+ minWidth: 0,
50
+ outline: 'none',
51
+ overflow: 'hidden',
52
+ padding: 0,
53
+ WebkitAppearance: 'none',
54
+ width: '100%',
55
+ };
56
+ const InlineEditableTitle = ({ value, canRename, getInitialSelection, onCommit, title }) => {
57
+ const [isEditing, setIsEditing] = (0, react_1.useState)(false);
58
+ const [isHovered, setIsHovered] = (0, react_1.useState)(false);
59
+ const [draftValue, setDraftValue] = (0, react_1.useState)(value);
60
+ const inputRef = (0, react_1.useRef)(null);
61
+ const cancelledRef = (0, react_1.useRef)(false);
62
+ (0, react_1.useEffect)(() => {
63
+ if (!isEditing) {
64
+ setDraftValue(value);
65
+ }
66
+ }, [isEditing, value]);
67
+ const focusInput = (0, react_1.useCallback)((input) => {
68
+ inputRef.current = input;
69
+ if (!input) {
70
+ return;
71
+ }
72
+ input.focus();
73
+ if (getInitialSelection) {
74
+ const [start, end] = getInitialSelection(value);
75
+ input.setSelectionRange(start, end);
76
+ return;
77
+ }
78
+ input.select();
79
+ }, [getInitialSelection, value]);
80
+ const commit = (0, react_1.useCallback)((newValue) => {
81
+ if (cancelledRef.current) {
82
+ return;
83
+ }
84
+ setIsEditing(false);
85
+ onCommit(newValue);
86
+ }, [onCommit]);
87
+ const startEditing = (0, react_1.useCallback)(() => {
88
+ if (!canRename) {
89
+ return;
90
+ }
91
+ cancelledRef.current = false;
92
+ setDraftValue(value);
93
+ setIsEditing(true);
94
+ }, [canRename, value]);
95
+ const onChange = (0, react_1.useCallback)((e) => {
96
+ setDraftValue(e.target.value);
97
+ }, []);
98
+ const onBlur = (0, react_1.useCallback)((e) => {
99
+ commit(e.currentTarget.value);
100
+ }, [commit]);
101
+ const onKeyDown = (0, react_1.useCallback)((e) => {
102
+ var _a;
103
+ if (e.key === 'Enter') {
104
+ e.preventDefault();
105
+ (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.blur();
106
+ }
107
+ if (e.key === 'Escape') {
108
+ e.preventDefault();
109
+ cancelledRef.current = true;
110
+ setDraftValue(value);
111
+ setIsEditing(false);
112
+ }
113
+ }, [value]);
114
+ const backgroundColor = isEditing
115
+ ? colors_1.INPUT_BACKGROUND
116
+ : isHovered && canRename
117
+ ? colors_1.WHITE_ALPHA_06
118
+ : colors_1.TRANSPARENT;
119
+ const innerStyle = (0, react_1.useMemo)(() => {
120
+ return {
121
+ ...titleInner,
122
+ backgroundColor,
123
+ cursor: isEditing ? 'text' : canRename ? 'pointer' : 'default',
124
+ userSelect: isEditing ? 'text' : 'none',
125
+ width: isEditing ? '100%' : undefined,
126
+ };
127
+ }, [backgroundColor, canRename, isEditing]);
128
+ return (jsx_runtime_1.jsx("div", { style: titleWrapper, title: title !== null && title !== void 0 ? title : value, children: jsx_runtime_1.jsxs("span", { style: innerStyle, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), onClick: isEditing || !canRename ? undefined : startEditing, children: [
129
+ jsx_runtime_1.jsx("span", { "aria-hidden": isEditing, style: {
130
+ ...titleGridItem,
131
+ visibility: isEditing ? 'hidden' : 'visible',
132
+ }, children: value }), isEditing ? (jsx_runtime_1.jsx("input", { ref: focusInput, style: { ...titleGridItem, ...titleInput }, value: draftValue, onChange: onChange, onBlur: onBlur, onKeyDown: onKeyDown })) : null] }) }));
133
+ };
134
+ exports.InlineEditableTitle = InlineEditableTitle;
@@ -7,7 +7,7 @@ const InspectorPanelLayout_1 = require("./InspectorPanelLayout");
7
7
  exports.INSPECTOR_INFO_HEADER_MIN_HEIGHT = 84;
8
8
  const container = {
9
9
  backgroundColor: colors_1.BACKGROUND,
10
- color: 'white',
10
+ color: colors_1.WHITE,
11
11
  display: 'block',
12
12
  minHeight: exports.INSPECTOR_INFO_HEADER_MIN_HEIGHT,
13
13
  padding: `6px ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
@@ -25,7 +25,7 @@ const content = {
25
25
  };
26
26
  const title = {
27
27
  backgroundColor: colors_1.BACKGROUND,
28
- color: 'white',
28
+ color: colors_1.WHITE,
29
29
  fontSize: 12,
30
30
  lineHeight: '18px',
31
31
  overflow: 'hidden',
@@ -4,5 +4,6 @@ import type { UpdaterFunction } from '../RenderModal/SchemaEditor/ZodSwitch';
4
4
  export declare const DefaultInspector: React.FC<{
5
5
  readonly composition: _InternalTypes['AnyComposition'] | null;
6
6
  readonly currentDefaultProps: Record<string, unknown>;
7
+ readonly readOnlyStudio: boolean;
7
8
  readonly setDefaultProps: UpdaterFunction<Record<string, unknown>>;
8
9
  }>;
@@ -18,7 +18,7 @@ const SegmentedControl_1 = require("../SegmentedControl");
18
18
  const VisualControlsContent_1 = require("../VisualControls/VisualControlsContent");
19
19
  const common_1 = require("./common");
20
20
  const styles_1 = require("./styles");
21
- const DefaultInspector = ({ composition, currentDefaultProps, setDefaultProps }) => {
21
+ const DefaultInspector = ({ composition, currentDefaultProps, readOnlyStudio, setDefaultProps }) => {
22
22
  var _a, _b;
23
23
  const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
24
24
  const hasSelectedAsset = (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'asset';
@@ -70,7 +70,7 @@ const DefaultInspector = ({ composition, currentDefaultProps, setDefaultProps })
70
70
  showCannotSaveDefaultPropsWarning: canShowDefaultPropsSection,
71
71
  });
72
72
  if (hasSelectedAsset) {
73
- return (jsx_runtime_1.jsx("div", { style: styles_1.scrollableContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx("div", { style: styles_1.compositionSection, children: jsx_runtime_1.jsx(CurrentAsset_1.CurrentAsset, {}) }) }));
73
+ return (jsx_runtime_1.jsx("div", { style: styles_1.scrollableContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx("div", { style: styles_1.compositionSection, children: jsx_runtime_1.jsx(CurrentAsset_1.CurrentAsset, { readOnlyStudio: readOnlyStudio }) }) }));
74
74
  }
75
75
  if (composition === null) {
76
76
  return jsx_runtime_1.jsx("div", { style: styles_1.container });
@@ -64,7 +64,7 @@ const chevronIcon = {
64
64
  height: 12,
65
65
  width: 8,
66
66
  };
67
- const disabledChevronColor = 'rgba(255, 255, 255, 0.25)';
67
+ const disabledChevronColor = colors_1.WHITE_ALPHA_25;
68
68
  const NavigationChevron = ({ color, direction }) => {
69
69
  const path = direction === 'left' ? 'M6 1L2 6L6 11' : 'M2 1L6 6L2 11';
70
70
  return (jsx_runtime_1.jsx("svg", { viewBox: "0 0 8 12", style: chevronIcon, children: jsx_runtime_1.jsx("path", { d: path, fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) }));
@@ -85,6 +85,7 @@ const KeyframeInspector = ({ selection }) => {
85
85
  getDragOverrides,
86
86
  propStatuses,
87
87
  nodePath,
88
+ includeTextContent: false,
88
89
  });
89
90
  const sequenceField = (_b = sequenceFields === null || sequenceFields === void 0 ? void 0 : sequenceFields.find((candidate) => candidate.key === keyframeField.fieldKey)) !== null && _b !== void 0 ? _b : null;
90
91
  const sequencePropStatus = (_c = (_a = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath)) === null || _a === void 0 ? void 0 : _a[keyframeField.fieldKey]) !== null && _c !== void 0 ? _c : null;
@@ -3,9 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SequenceInspectorHeaderWithDivider = exports.SequenceInspectorHeader = exports.useSequenceInspectorSourceLocation = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
- const remotion_1 = require("remotion");
6
+ const client_id_1 = require("../../helpers/client-id");
7
+ const InlineEditableTitle_1 = require("../InlineEditableTitle");
7
8
  const InspectorSourceLocation_1 = require("../InspectorSourceLocation");
8
9
  const use_open_sequence_in_editor_1 = require("../Timeline/use-open-sequence-in-editor");
10
+ const use_rename_sequence_1 = require("../Timeline/use-rename-sequence");
9
11
  const styles_1 = require("./styles");
10
12
  const useSequenceInspectorSourceLocation = (sequence) => {
11
13
  const { canOpenInEditor, openInEditor, originalLocation } = (0, use_open_sequence_in_editor_1.useOpenSequenceInEditor)(sequence);
@@ -35,36 +37,18 @@ const useSequenceInspectorSourceLocation = (sequence) => {
35
37
  };
36
38
  };
37
39
  exports.useSequenceInspectorSourceLocation = useSequenceInspectorSourceLocation;
38
- const useSequenceDisplayName = (track) => {
39
- var _a, _b;
40
- var _c;
41
- const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
42
- const nodePath = (_c = (_a = track.nodePathInfo) === null || _a === void 0 ? void 0 : _a.sequenceSubscriptionKey) !== null && _c !== void 0 ? _c : null;
43
- return (0, react_1.useMemo)(() => {
44
- var _a;
45
- const propStatusesForOverride = nodePath
46
- ? remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath)
47
- : undefined;
48
- const codeNameStatus = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride.name;
49
- const fallbackDisplayName = ((_a = track.sequence.controls) === null || _a === void 0 ? void 0 : _a.componentName) || '<Sequence>';
50
- if ((codeNameStatus === null || codeNameStatus === void 0 ? void 0 : codeNameStatus.status) === 'static' &&
51
- typeof codeNameStatus.codeValue === 'string') {
52
- return codeNameStatus.codeValue;
53
- }
54
- if ((codeNameStatus === null || codeNameStatus === void 0 ? void 0 : codeNameStatus.status) === 'static') {
55
- return fallbackDisplayName;
56
- }
57
- return track.sequence.displayName || fallbackDisplayName;
58
- }, [
59
- nodePath,
60
- propStatuses,
61
- (_b = track.sequence.controls) === null || _b === void 0 ? void 0 : _b.componentName,
62
- track.sequence.displayName,
63
- ]);
64
- };
65
40
  const SequenceInspectorHeader = ({ sourceLocation, track }) => {
66
41
  var _a;
67
- const sequenceDisplayName = useSequenceDisplayName(track);
42
+ const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
43
+ const { canRename, displayName, fallbackDisplayName, saveName } = (0, use_rename_sequence_1.useRenameSequence)({
44
+ clientId: previewServerState.type === 'connected'
45
+ ? previewServerState.clientId
46
+ : null,
47
+ nodePathInfo: track.nodePathInfo,
48
+ sequence: track.sequence,
49
+ validatedLocation: sourceLocation.validatedLocation,
50
+ });
51
+ const sequenceDisplayName = displayName || fallbackDisplayName;
68
52
  const { documentationLink } = track.sequence;
69
53
  const openDocumentationLink = (0, react_1.useCallback)(() => {
70
54
  if (!documentationLink) {
@@ -79,8 +63,11 @@ const SequenceInspectorHeader = ({ sourceLocation, track }) => {
79
63
  };
80
64
  }, [documentationLink]);
81
65
  const componentName = (_a = track.sequence.controls) === null || _a === void 0 ? void 0 : _a.componentName;
66
+ const onRename = (0, react_1.useCallback)((newName) => {
67
+ saveName(newName).catch(() => undefined);
68
+ }, [saveName]);
82
69
  return (jsx_runtime_1.jsxs("div", { style: styles_1.sequenceHeader, children: [
83
- jsx_runtime_1.jsx("div", { style: styles_1.sequenceHeaderTitle, children: sequenceDisplayName }), documentationLink ? (jsx_runtime_1.jsx("button", { type: "button", style: subtitleStyle, title: "Open component docs", onClick: openDocumentationLink, children: componentName })) : (jsx_runtime_1.jsx("div", { style: subtitleStyle, children: componentName })), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: sourceLocation.validatedLocation, canOpen: sourceLocation.canOpenInEditor, onOpen: sourceLocation.openFileLocation })
70
+ jsx_runtime_1.jsx("div", { style: styles_1.sequenceHeaderTitle, children: jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: sequenceDisplayName, canRename: canRename, onCommit: onRename }) }), documentationLink ? (jsx_runtime_1.jsx("button", { type: "button", style: subtitleStyle, title: "Open component docs", onClick: openDocumentationLink, children: componentName })) : (jsx_runtime_1.jsx("div", { style: subtitleStyle, children: componentName })), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: sourceLocation.validatedLocation, canOpen: sourceLocation.canOpenInEditor, onOpen: sourceLocation.openFileLocation })
84
71
  ] }));
85
72
  };
86
73
  exports.SequenceInspectorHeader = SequenceInspectorHeader;
@@ -37,7 +37,7 @@ exports.InspectorDetailRow = InspectorDetailRow;
37
37
  const inlineLabelButton = {
38
38
  alignItems: 'center',
39
39
  appearance: 'none',
40
- backgroundColor: 'transparent',
40
+ backgroundColor: colors_1.TRANSPARENT,
41
41
  border: 'none',
42
42
  color: colors_1.LIGHT_TEXT,
43
43
  cursor: 'default',
@@ -69,7 +69,7 @@ const inlineLabelIcon = {
69
69
  };
70
70
  const InspectorInlineAction = ({ children, disabled, onClick, renderIcon }) => {
71
71
  const [hovered, setHovered] = react_1.default.useState(false);
72
- const color = hovered && !disabled ? 'white' : colors_1.LIGHT_TEXT;
72
+ const color = hovered && !disabled ? colors_1.WHITE : colors_1.LIGHT_TEXT;
73
73
  const buttonStyle = react_1.default.useMemo(() => ({
74
74
  ...(disabled ? inlineLabelButtonDisabled : inlineLabelButton),
75
75
  color,
@@ -5,7 +5,7 @@ const colors_1 = require("../../helpers/colors");
5
5
  const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
6
6
  exports.container = {
7
7
  backgroundColor: colors_1.BACKGROUND,
8
- color: 'white',
8
+ color: colors_1.WHITE,
9
9
  display: 'flex',
10
10
  flex: 1,
11
11
  flexDirection: 'column',
@@ -52,11 +52,11 @@ exports.sequenceHeader = {
52
52
  padding: `6px ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px 4px`,
53
53
  };
54
54
  exports.sequenceHeaderTitle = {
55
- alignSelf: 'flex-start',
55
+ alignSelf: 'stretch',
56
56
  backgroundColor: colors_1.BACKGROUND,
57
57
  border: 'none',
58
- color: 'white',
59
- display: 'inline-flex',
58
+ color: colors_1.WHITE,
59
+ display: 'flex',
60
60
  fontFamily: 'sans-serif',
61
61
  fontSize: 12,
62
62
  lineHeight: '18px',
@@ -170,7 +170,7 @@ exports.detailLabel = {
170
170
  fontSize: 13,
171
171
  };
172
172
  exports.detailValue = {
173
- color: 'white',
173
+ color: colors_1.WHITE,
174
174
  fontSize: 13,
175
175
  fontVariantNumeric: 'tabular-nums',
176
176
  minWidth: 0,
@@ -4,5 +4,6 @@ import type { UpdaterFunction } from './RenderModal/SchemaEditor/ZodSwitch';
4
4
  export declare const InspectorPanel: React.FC<{
5
5
  readonly composition: _InternalTypes['AnyComposition'] | null;
6
6
  readonly currentDefaultProps: Record<string, unknown>;
7
+ readonly readOnlyStudio: boolean;
7
8
  readonly setDefaultProps: UpdaterFunction<Record<string, unknown>>;
8
9
  }>;
@@ -9,11 +9,11 @@ const inspector_selection_1 = require("./InspectorPanel/inspector-selection");
9
9
  const SelectedInspector_1 = require("./InspectorPanel/SelectedInspector");
10
10
  const styles_1 = require("./InspectorPanel/styles");
11
11
  const TimelineSelection_1 = require("./Timeline/TimelineSelection");
12
- const InspectorPanel = ({ composition, currentDefaultProps, setDefaultProps }) => {
12
+ const InspectorPanel = ({ composition, currentDefaultProps, readOnlyStudio, setDefaultProps }) => {
13
13
  const { selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
14
14
  const sameSequenceInspectorSelection = (0, react_1.useMemo)(() => (0, inspector_selection_1.getSameSequenceInspectorSelection)(selectedItems), [selectedItems]);
15
15
  if (selectedItems.length === 0) {
16
- return (jsx_runtime_1.jsx(DefaultInspector_1.DefaultInspector, { composition: composition, currentDefaultProps: currentDefaultProps, setDefaultProps: setDefaultProps }));
16
+ return (jsx_runtime_1.jsx(DefaultInspector_1.DefaultInspector, { composition: composition, currentDefaultProps: currentDefaultProps, readOnlyStudio: readOnlyStudio, setDefaultProps: setDefaultProps }));
17
17
  }
18
18
  if (selectedItems.length > 1) {
19
19
  if (sameSequenceInspectorSelection) {
@@ -47,7 +47,7 @@ const TimelineExpandedRow_1 = require("./Timeline/TimelineExpandedRow");
47
47
  const TimelineSelection_1 = require("./Timeline/TimelineSelection");
48
48
  const use_timeline_expanded_tree_1 = require("./Timeline/use-timeline-expanded-tree");
49
49
  const container = {
50
- color: 'white',
50
+ color: colors_1.WHITE,
51
51
  display: 'flex',
52
52
  flexDirection: 'column',
53
53
  fontFamily: 'Arial, Helvetica, sans-serif',
@@ -79,9 +79,40 @@ const isEffectsRoot = (node) => {
79
79
  const { auxiliaryKeys } = node.nodePathInfo;
80
80
  return auxiliaryKeys[auxiliaryKeys.length - 1] === 'effects';
81
81
  };
82
+ const INSPECTOR_COLLAPSED_ROWS_SESSION_STORAGE_KEY = 'remotion.editor.inspectorCollapsedRows';
82
83
  const getInspectorExpansionKey = (nodePathInfo) => {
83
84
  return JSON.stringify(nodePathInfo);
84
85
  };
86
+ const loadInspectorCollapsedKeys = () => {
87
+ if (typeof window === 'undefined') {
88
+ return new Set();
89
+ }
90
+ try {
91
+ const raw = window.sessionStorage.getItem(INSPECTOR_COLLAPSED_ROWS_SESSION_STORAGE_KEY);
92
+ if (raw === null) {
93
+ return new Set();
94
+ }
95
+ const parsed = JSON.parse(raw);
96
+ if (!Array.isArray(parsed)) {
97
+ return new Set();
98
+ }
99
+ return new Set(parsed.filter((key) => typeof key === 'string'));
100
+ }
101
+ catch (_a) {
102
+ return new Set();
103
+ }
104
+ };
105
+ const persistInspectorCollapsedKeys = (keys) => {
106
+ if (typeof window === 'undefined') {
107
+ return;
108
+ }
109
+ try {
110
+ window.sessionStorage.setItem(INSPECTOR_COLLAPSED_ROWS_SESSION_STORAGE_KEY, JSON.stringify([...keys]));
111
+ }
112
+ catch (_a) {
113
+ // Ignore quota errors or disabled storage.
114
+ }
115
+ };
85
116
  const getInspectorControlGroups = (rows) => {
86
117
  return timeline_layout_1.SCHEMA_FIELD_GROUPS.map((group) => ({
87
118
  ...group,
@@ -106,8 +137,9 @@ const InspectorSequenceSection = ({ sequence, validatedLocation, nodePathInfo, k
106
137
  const { tree } = (0, use_timeline_expanded_tree_1.useTimelineExpandedTree)({
107
138
  sequence,
108
139
  nodePathInfo,
140
+ includeTextContent: true,
109
141
  });
110
- const [collapsedKeys, setCollapsedKeys] = (0, react_1.useState)(() => new Set());
142
+ const [collapsedKeys, setCollapsedKeys] = (0, react_1.useState)(loadInspectorCollapsedKeys);
111
143
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
112
144
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
113
145
  const getIsExpanded = (0, react_1.useCallback)((candidate) => {
@@ -123,6 +155,7 @@ const InspectorSequenceSection = ({ sequence, validatedLocation, nodePathInfo, k
123
155
  else {
124
156
  next.add(key);
125
157
  }
158
+ persistInspectorCollapsedKeys(next);
126
159
  return next;
127
160
  });
128
161
  }, []);
@@ -13,7 +13,7 @@ const InstallablePackageComp = ({ isInstalled, pkg, link, description }) => {
13
13
  }, children: [
14
14
  jsx_runtime_1.jsx("a", { href: link, style: {
15
15
  fontSize: FONT_SIZE,
16
- color: colors_1.TEXT_COLOR,
16
+ color: colors_1.WHITE_HEX,
17
17
  textDecoration: 'none',
18
18
  }, target: "_blank", children: pkg }), ' ', isInstalled ? (jsx_runtime_1.jsx("span", { style: { opacity: 0.3, fontSize: 'inherit' }, children: "(installed)" })) : null, jsx_runtime_1.jsx("br", {}), jsx_runtime_1.jsx("span", { style: { color: colors_1.LIGHT_TEXT, fontSize: FONT_SIZE }, children: description })
19
19
  ] }));
@@ -15,16 +15,16 @@ const left = {
15
15
  const key = {
16
16
  background: colors_1.INPUT_BACKGROUND,
17
17
  padding: '3px 6px',
18
- color: 'white',
18
+ color: colors_1.WHITE,
19
19
  borderRadius: 3,
20
- border: '1px solid ' + colors_1.INPUT_BORDER_COLOR_UNHOVERED,
20
+ border: '1px solid ' + colors_1.BLACK_ALPHA_60,
21
21
  borderBottomWidth: 3,
22
22
  fontSize: 14,
23
23
  fontFamily: 'monospace',
24
24
  };
25
25
  const right = {
26
26
  fontSize: 14,
27
- color: '#eee',
27
+ color: colors_1.KEYBOARD_SHORTCUT_KEY_COLOR,
28
28
  };
29
29
  const container = {
30
30
  paddingLeft: 20,
@@ -34,7 +34,7 @@ const container = {
34
34
  };
35
35
  const title = {
36
36
  fontWeight: 'bold',
37
- color: 'white',
37
+ color: colors_1.WHITE,
38
38
  fontSize: 14,
39
39
  marginBottom: 10,
40
40
  };
@@ -42,7 +42,7 @@ const keyboardShortcutsDisabled = {
42
42
  padding: 12,
43
43
  width: '100%',
44
44
  fontSize: 14,
45
- backgroundColor: 'rgba(255, 255, 255, 0.1)',
45
+ backgroundColor: colors_1.WHITE_ALPHA_10,
46
46
  };
47
47
  const ul = {
48
48
  marginTop: 0,
@@ -14,6 +14,6 @@ const LoopToggle = ({ loop, setLoop }) => {
14
14
  return !c;
15
15
  });
16
16
  }, [setLoop]);
17
- 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 : '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" }) }) }));
17
+ 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" }) }) }));
18
18
  };
19
19
  exports.LoopToggle = LoopToggle;
@@ -7,7 +7,7 @@ const menuDivider = {
7
7
  marginTop: 4,
8
8
  marginBottom: 4,
9
9
  height: 1,
10
- backgroundColor: colors_1.INPUT_BORDER_COLOR_HOVERED,
10
+ backgroundColor: colors_1.WHITE_ALPHA_05,
11
11
  };
12
12
  const MenuDivider = () => {
13
13
  return jsx_runtime_1.jsx("div", { style: menuDivider });