@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
@@ -0,0 +1,545 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.TimelineFontFamilyField = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const player_1 = require("@remotion/player");
9
+ const react_1 = require("react");
10
+ const react_dom_1 = __importDefault(require("react-dom"));
11
+ const colors_1 = require("../../helpers/colors");
12
+ const install_required_package_1 = require("../../helpers/install-required-package");
13
+ const caret_1 = require("../../icons/caret");
14
+ const Checkmark_1 = require("../../icons/Checkmark");
15
+ const z_index_1 = require("../../state/z-index");
16
+ const layout_1 = require("../layout");
17
+ const is_menu_item_1 = require("../Menu/is-menu-item");
18
+ const portals_1 = require("../Menu/portals");
19
+ const styles_1 = require("../Menu/styles");
20
+ const google_fonts_list_1 = require("./google-fonts-list");
21
+ const ROW_HEIGHT = 30;
22
+ const LIST_HEIGHT = 280;
23
+ const OVERSCAN = 10;
24
+ const POPOVER_WIDTH = 280;
25
+ const CLEAR_HOVER = 'rgba(255, 255, 255, 0.06)';
26
+ const INPUT_BORDER_COLOR_UNHOVERED = 'rgba(0, 0, 0, 0.6)';
27
+ const INPUT_BORDER_COLOR_HOVERED = 'rgba(255, 255, 255, 0.05)';
28
+ const googleFonts = google_fonts_list_1.GOOGLE_FONTS_LIST.map((font) => ({
29
+ id: `google-${font.importName}`,
30
+ fontFamily: font.fontFamily,
31
+ label: font.fontFamily,
32
+ source: 'Google Fonts',
33
+ value: font.fontFamily,
34
+ googleFontImportName: font.importName,
35
+ googleFontCssFamily: font.previewUrl,
36
+ googleFontWeights: font.weights,
37
+ }));
38
+ const loadedGoogleFontsForPreview = new Set();
39
+ const loadingGoogleFontsForPreview = new Set();
40
+ const loadedGoogleFontsForPickerPreview = new Set();
41
+ const loadingGoogleFontsForPickerPreview = new Set();
42
+ const systemFonts = [
43
+ 'Arial',
44
+ 'Helvetica',
45
+ 'Inter',
46
+ 'Georgia',
47
+ 'Times New Roman',
48
+ 'Courier New',
49
+ 'Verdana',
50
+ 'Tahoma',
51
+ 'Trebuchet MS',
52
+ 'sans-serif',
53
+ 'serif',
54
+ 'monospace',
55
+ ].map((fontFamily) => ({
56
+ id: `system-${fontFamily}`,
57
+ fontFamily,
58
+ label: fontFamily,
59
+ source: 'System',
60
+ value: fontFamily,
61
+ }));
62
+ const triggerStyle = {
63
+ marginLeft: 8,
64
+ padding: '3px 4px',
65
+ display: 'inline-flex',
66
+ alignItems: 'center',
67
+ backgroundColor: colors_1.INPUT_BACKGROUND,
68
+ borderWidth: 1,
69
+ borderStyle: 'solid',
70
+ maxWidth: 140,
71
+ color: 'white',
72
+ userSelect: 'none',
73
+ WebkitUserSelect: 'none',
74
+ };
75
+ const triggerLabel = {
76
+ fontSize: 11,
77
+ lineHeight: 1,
78
+ textAlign: 'left',
79
+ overflow: 'hidden',
80
+ textOverflow: 'ellipsis',
81
+ whiteSpace: 'nowrap',
82
+ };
83
+ const popover = {
84
+ position: 'fixed',
85
+ width: POPOVER_WIDTH,
86
+ backgroundColor: colors_1.BACKGROUND,
87
+ color: 'white',
88
+ userSelect: 'none',
89
+ WebkitUserSelect: 'none',
90
+ border: '1px solid rgba(255, 255, 255, 0.08)',
91
+ };
92
+ const searchInput = {
93
+ boxSizing: 'border-box',
94
+ width: '100%',
95
+ backgroundColor: colors_1.INPUT_BACKGROUND,
96
+ border: '1px solid rgba(255, 255, 255, 0.12)',
97
+ color: 'white',
98
+ fontSize: 12,
99
+ outline: 'none',
100
+ padding: '6px 8px',
101
+ };
102
+ const listStyle = {
103
+ height: LIST_HEIGHT,
104
+ overflowY: 'auto',
105
+ overflowX: 'hidden',
106
+ position: 'relative',
107
+ };
108
+ const noResults = {
109
+ fontSize: 12,
110
+ color: colors_1.LIGHT_TEXT,
111
+ padding: 12,
112
+ };
113
+ const optionButton = {
114
+ height: ROW_HEIGHT,
115
+ width: '100%',
116
+ border: 'none',
117
+ background: 'transparent',
118
+ color: 'white',
119
+ display: 'flex',
120
+ alignItems: 'center',
121
+ padding: '0 8px',
122
+ fontSize: 12,
123
+ textAlign: 'left',
124
+ cursor: 'default',
125
+ };
126
+ const optionLabel = {
127
+ flex: 1,
128
+ overflow: 'hidden',
129
+ textOverflow: 'ellipsis',
130
+ whiteSpace: 'nowrap',
131
+ fontSize: 12,
132
+ };
133
+ const optionSource = {
134
+ color: colors_1.LIGHT_TEXT,
135
+ fontSize: 10,
136
+ marginLeft: 8,
137
+ };
138
+ const errorText = {
139
+ padding: '6px 8px',
140
+ color: '#ff8a8a',
141
+ fontSize: 10,
142
+ };
143
+ const portalStyle = ({ size, }) => {
144
+ const margin = 10;
145
+ const spaceToBottom = size.windowSize.height - (size.top + size.height) - margin;
146
+ const spaceToTop = size.top - margin;
147
+ const openDown = spaceToBottom >= LIST_HEIGHT || spaceToBottom >= spaceToTop;
148
+ const left = Math.min(Math.max(0, size.left), Math.max(0, size.windowSize.width - POPOVER_WIDTH));
149
+ return {
150
+ ...popover,
151
+ boxShadow: openDown ? styles_1.SHADOW_TOWARDS_BOTTOM : styles_1.SHADOW_TOWARDS_TOP,
152
+ left,
153
+ ...(openDown
154
+ ? { top: size.top + size.height }
155
+ : { bottom: size.windowSize.height - size.top }),
156
+ };
157
+ };
158
+ const getCurrentValue = ({ effectiveValue, fallback, }) => {
159
+ return typeof effectiveValue === 'string' ? effectiveValue : fallback;
160
+ };
161
+ const scrollIndexIntoView = ({ index, list, }) => {
162
+ const top = index * ROW_HEIGHT;
163
+ const bottom = top + ROW_HEIGHT;
164
+ if (top < list.scrollTop) {
165
+ list.scrollTop = top;
166
+ return;
167
+ }
168
+ if (bottom > list.scrollTop + LIST_HEIGHT) {
169
+ list.scrollTop = bottom - LIST_HEIGHT;
170
+ }
171
+ };
172
+ const getGoogleFontSourceEdit = ({ fontFamily, importName, weights, }) => {
173
+ return {
174
+ fontFamily,
175
+ importName,
176
+ style: 'normal',
177
+ weights,
178
+ subsets: ['latin'],
179
+ };
180
+ };
181
+ const makeFontPreviewName = (fontFamily) => {
182
+ return `${fontFamily}Preview`;
183
+ };
184
+ const loadGoogleFontForPickerPreview = async ({ fontFamily, cssFamily, document, }) => {
185
+ if (loadedGoogleFontsForPickerPreview.has(fontFamily) ||
186
+ loadingGoogleFontsForPickerPreview.has(fontFamily)) {
187
+ return;
188
+ }
189
+ loadingGoogleFontsForPickerPreview.add(fontFamily);
190
+ try {
191
+ const response = await fetch(`https://fonts.googleapis.com/css?family=${cssFamily}:400&text=${encodeURIComponent(fontFamily)}`);
192
+ if (!response.ok) {
193
+ return;
194
+ }
195
+ const cssText = await response.text();
196
+ const match = cssText.match(/url\(([^)]+)\)/);
197
+ const url = match === null || match === void 0 ? void 0 : match[1];
198
+ if (!url) {
199
+ return;
200
+ }
201
+ const fontFace = new FontFace(makeFontPreviewName(fontFamily), `url(${url})`, { weight: '400' });
202
+ await fontFace.load();
203
+ document.fonts.add(fontFace);
204
+ loadedGoogleFontsForPickerPreview.add(fontFamily);
205
+ }
206
+ finally {
207
+ loadingGoogleFontsForPickerPreview.delete(fontFamily);
208
+ }
209
+ };
210
+ const getGoogleFontUrlsFromCss = (cssText) => {
211
+ return [...cssText.matchAll(/url\(([^)]+)\)/g)].map((match) => match[1]);
212
+ };
213
+ const loadGoogleFontWeight = async ({ cssFamily, fontFaceFamily, weight, document, text, }) => {
214
+ const response = await fetch(`https://fonts.googleapis.com/css?family=${cssFamily}:${weight}${text === null ? '' : `&text=${encodeURIComponent(text)}`}`);
215
+ if (!response.ok) {
216
+ return false;
217
+ }
218
+ const cssText = await response.text();
219
+ const urls = getGoogleFontUrlsFromCss(cssText);
220
+ if (urls.length === 0) {
221
+ return false;
222
+ }
223
+ await Promise.all(urls.map(async (url) => {
224
+ const fontFace = new FontFace(fontFaceFamily, `url(${url})`, { weight });
225
+ await fontFace.load();
226
+ document.fonts.add(fontFace);
227
+ }));
228
+ return true;
229
+ };
230
+ const commonPreviewFontWeights = ['400', '700', '800'];
231
+ const getGoogleFontPreviewWeights = (weights) => {
232
+ const commonWeights = weights.filter((weight) => commonPreviewFontWeights.includes(weight));
233
+ return commonWeights.length ? commonWeights : weights.slice(0, 1);
234
+ };
235
+ const loadGoogleFontForPreview = async ({ fontFamily, cssFamily, weights, document, }) => {
236
+ if (loadedGoogleFontsForPreview.has(fontFamily) ||
237
+ loadingGoogleFontsForPreview.has(fontFamily)) {
238
+ return;
239
+ }
240
+ if (!google_fonts_list_1.GOOGLE_FONTS_LIST.some((font) => font.fontFamily === fontFamily)) {
241
+ return;
242
+ }
243
+ loadingGoogleFontsForPreview.add(fontFamily);
244
+ try {
245
+ const loadedWeights = await Promise.all(getGoogleFontPreviewWeights(weights).map((weight) => loadGoogleFontWeight({
246
+ cssFamily,
247
+ fontFaceFamily: fontFamily,
248
+ weight,
249
+ document,
250
+ text: null,
251
+ })));
252
+ if (loadedWeights.some(Boolean)) {
253
+ loadedGoogleFontsForPreview.add(fontFamily);
254
+ }
255
+ }
256
+ finally {
257
+ loadingGoogleFontsForPreview.delete(fontFamily);
258
+ }
259
+ };
260
+ const TimelineFontFamilyField = ({ field, propStatus, effectiveValue, onSave, onDragValueChange, onDragEnd, }) => {
261
+ const { fieldSchema } = field;
262
+ if (fieldSchema.type !== 'font-family') {
263
+ throw new Error('TimelineFontFamilyField rendered for non-font-family field');
264
+ }
265
+ const fallback = fieldSchema.default;
266
+ const current = getCurrentValue({ effectiveValue, fallback });
267
+ const defaultOption = (0, react_1.useMemo)(() => {
268
+ return {
269
+ id: 'default',
270
+ fontFamily: fallback !== null && fallback !== void 0 ? fallback : null,
271
+ label: fallback ? `Default (${fallback})` : 'Default',
272
+ source: 'Default',
273
+ value: fallback,
274
+ };
275
+ }, [fallback]);
276
+ const [opened, setOpened] = (0, react_1.useState)(false);
277
+ const [hovered, setHovered] = (0, react_1.useState)(false);
278
+ const [query, setQuery] = (0, react_1.useState)('');
279
+ const [highlightedIndex, setHighlightedIndex] = (0, react_1.useState)(0);
280
+ const [scrollTop, setScrollTop] = (0, react_1.useState)(0);
281
+ const [loadedPickerPreviewFonts, setLoadedPickerPreviewFonts] = (0, react_1.useState)(() => new Set(loadedGoogleFontsForPickerPreview));
282
+ const [saveError, setSaveError] = (0, react_1.useState)(null);
283
+ const buttonRef = (0, react_1.useRef)(null);
284
+ const inputRef = (0, react_1.useRef)(null);
285
+ const listRef = (0, react_1.useRef)(null);
286
+ const { tabIndex, currentZIndex } = (0, z_index_1.useZIndex)();
287
+ const size = player_1.PlayerInternals.useElementSize(buttonRef, {
288
+ triggerOnWindowResize: true,
289
+ shouldApplyCssTransforms: true,
290
+ });
291
+ const options = (0, react_1.useMemo)(() => {
292
+ const base = [defaultOption, ...systemFonts, ...googleFonts];
293
+ if (!current || base.some((option) => option.value === current)) {
294
+ return base;
295
+ }
296
+ return [
297
+ defaultOption,
298
+ {
299
+ id: `current-${current}`,
300
+ fontFamily: current,
301
+ label: current,
302
+ source: 'Current',
303
+ value: current,
304
+ },
305
+ ...systemFonts,
306
+ ...googleFonts,
307
+ ];
308
+ }, [current, defaultOption]);
309
+ const filteredOptions = (0, react_1.useMemo)(() => {
310
+ const needle = query.trim().toLowerCase();
311
+ if (!needle) {
312
+ return options;
313
+ }
314
+ return options.filter((option) => {
315
+ return option.label.toLowerCase().includes(needle);
316
+ });
317
+ }, [options, query]);
318
+ const selected = (0, react_1.useMemo)(() => {
319
+ var _a;
320
+ return (_a = options.find((option) => option.value === current)) !== null && _a !== void 0 ? _a : defaultOption;
321
+ }, [current, defaultOption, options]);
322
+ const visibleRange = (0, react_1.useMemo)(() => {
323
+ const visibleCount = Math.ceil(LIST_HEIGHT / ROW_HEIGHT);
324
+ const start = Math.max(0, Math.floor(scrollTop / ROW_HEIGHT) - OVERSCAN);
325
+ const end = Math.min(filteredOptions.length, start + visibleCount + OVERSCAN * 2);
326
+ return { start, end };
327
+ }, [filteredOptions.length, scrollTop]);
328
+ const hide = (0, react_1.useCallback)(() => {
329
+ setOpened(false);
330
+ setQuery('');
331
+ }, []);
332
+ const selectOption = (0, react_1.useCallback)((option) => {
333
+ setSaveError(null);
334
+ if (option.value === propStatus.codeValue) {
335
+ hide();
336
+ return;
337
+ }
338
+ onDragValueChange(option.value);
339
+ hide();
340
+ const save = async () => {
341
+ var _a, _b;
342
+ if (option.source !== 'Google Fonts' || !option.googleFontImportName) {
343
+ await onSave(option.value);
344
+ return;
345
+ }
346
+ await (0, install_required_package_1.installRequiredPackages)(['@remotion/google-fonts']);
347
+ const googleFont = getGoogleFontSourceEdit({
348
+ fontFamily: (_a = option.value) !== null && _a !== void 0 ? _a : option.label,
349
+ importName: option.googleFontImportName,
350
+ weights: (_b = option.googleFontWeights) !== null && _b !== void 0 ? _b : ['400'],
351
+ });
352
+ await onSave(option.value, {
353
+ sourceEdit: { type: 'google-font', font: googleFont },
354
+ });
355
+ };
356
+ save()
357
+ .catch((err) => {
358
+ onDragValueChange(propStatus.codeValue);
359
+ setSaveError(err instanceof Error ? err.message : String(err));
360
+ })
361
+ .finally(() => {
362
+ onDragEnd();
363
+ });
364
+ }, [propStatus.codeValue, onDragValueChange, hide, onSave, onDragEnd]);
365
+ const toggleOpened = (0, react_1.useCallback)(() => {
366
+ var _a;
367
+ if (opened) {
368
+ setOpened(false);
369
+ return;
370
+ }
371
+ (_a = size === null || size === void 0 ? void 0 : size.refresh) === null || _a === void 0 ? void 0 : _a.call(size);
372
+ setOpened(true);
373
+ }, [opened, size]);
374
+ (0, react_1.useEffect)(() => {
375
+ if (!opened) {
376
+ return;
377
+ }
378
+ const selectedIndex = filteredOptions.findIndex((option) => option.value === current);
379
+ const nextIndex = Math.max(0, selectedIndex);
380
+ setHighlightedIndex(nextIndex);
381
+ requestAnimationFrame(() => {
382
+ var _a;
383
+ (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
384
+ const list = listRef.current;
385
+ if (!list) {
386
+ return;
387
+ }
388
+ list.scrollTop = Math.max(0, nextIndex * ROW_HEIGHT - LIST_HEIGHT / 2 + ROW_HEIGHT / 2);
389
+ });
390
+ }, [current, filteredOptions, opened]);
391
+ (0, react_1.useEffect)(() => {
392
+ setHighlightedIndex(0);
393
+ if (listRef.current) {
394
+ listRef.current.scrollTop = 0;
395
+ }
396
+ }, [query]);
397
+ (0, react_1.useEffect)(() => {
398
+ if (!current) {
399
+ return;
400
+ }
401
+ const googleFont = google_fonts_list_1.GOOGLE_FONTS_LIST.find((font) => font.fontFamily === current);
402
+ if (!googleFont) {
403
+ return;
404
+ }
405
+ loadGoogleFontForPreview({
406
+ fontFamily: current,
407
+ cssFamily: googleFont.previewUrl,
408
+ weights: googleFont.weights,
409
+ document,
410
+ }).catch(() => undefined);
411
+ loadGoogleFontForPickerPreview({
412
+ fontFamily: current,
413
+ cssFamily: googleFont.previewUrl,
414
+ document,
415
+ })
416
+ .then(() => {
417
+ setLoadedPickerPreviewFonts(new Set(loadedGoogleFontsForPickerPreview));
418
+ })
419
+ .catch(() => undefined);
420
+ }, [current]);
421
+ (0, react_1.useEffect)(() => {
422
+ if (!opened) {
423
+ return;
424
+ }
425
+ const visibleGoogleFonts = filteredOptions
426
+ .slice(visibleRange.start, visibleRange.end)
427
+ .filter((option) => option.source === 'Google Fonts' &&
428
+ option.fontFamily &&
429
+ option.googleFontCssFamily);
430
+ if (visibleGoogleFonts.length === 0) {
431
+ return;
432
+ }
433
+ Promise.all(visibleGoogleFonts.map((font) => loadGoogleFontForPickerPreview({
434
+ fontFamily: font.fontFamily,
435
+ cssFamily: font.googleFontCssFamily,
436
+ document,
437
+ })))
438
+ .then(() => {
439
+ setLoadedPickerPreviewFonts(new Set(loadedGoogleFontsForPickerPreview));
440
+ })
441
+ .catch(() => undefined);
442
+ }, [filteredOptions, opened, visibleRange.end, visibleRange.start]);
443
+ const onKeyDown = (0, react_1.useCallback)((event) => {
444
+ if (event.key === 'ArrowDown') {
445
+ event.preventDefault();
446
+ setHighlightedIndex((prev) => {
447
+ const next = Math.max(0, Math.min(filteredOptions.length - 1, prev + 1));
448
+ if (listRef.current) {
449
+ scrollIndexIntoView({ index: next, list: listRef.current });
450
+ }
451
+ return next;
452
+ });
453
+ }
454
+ if (event.key === 'ArrowUp') {
455
+ event.preventDefault();
456
+ setHighlightedIndex((prev) => {
457
+ const next = Math.max(0, prev - 1);
458
+ if (listRef.current) {
459
+ scrollIndexIntoView({ index: next, list: listRef.current });
460
+ }
461
+ return next;
462
+ });
463
+ }
464
+ if (event.key === 'Enter') {
465
+ event.preventDefault();
466
+ const option = filteredOptions[highlightedIndex];
467
+ if (option) {
468
+ selectOption(option);
469
+ }
470
+ }
471
+ if (event.key === 'Escape') {
472
+ event.preventDefault();
473
+ hide();
474
+ }
475
+ }, [filteredOptions, hide, highlightedIndex, selectOption]);
476
+ const renderedOptions = filteredOptions.slice(visibleRange.start, visibleRange.end);
477
+ const getOptionPreviewStyle = (0, react_1.useCallback)((option) => {
478
+ if (option.source !== 'Google Fonts' ||
479
+ !option.fontFamily ||
480
+ !loadedPickerPreviewFonts.has(option.fontFamily)) {
481
+ return {};
482
+ }
483
+ return { fontFamily: makeFontPreviewName(option.fontFamily) };
484
+ }, [loadedPickerPreviewFonts]);
485
+ const style = (0, react_1.useMemo)(() => {
486
+ return {
487
+ ...triggerStyle,
488
+ borderColor: opened
489
+ ? colors_1.SELECTED_BACKGROUND
490
+ : hovered
491
+ ? INPUT_BORDER_COLOR_HOVERED
492
+ : INPUT_BORDER_COLOR_UNHOVERED,
493
+ };
494
+ }, [hovered, opened]);
495
+ const selectedPreviewStyle = getOptionPreviewStyle(selected);
496
+ return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
497
+ jsx_runtime_1.jsxs("button", { ref: buttonRef, title: field.key, tabIndex: tabIndex, type: "button", style: style, className: is_menu_item_1.MENU_INITIATOR_CLASSNAME, onPointerDown: (event) => {
498
+ event.stopPropagation();
499
+ toggleOpened();
500
+ }, onClick: (event) => {
501
+ event.stopPropagation();
502
+ if (event.detail === 0) {
503
+ toggleOpened();
504
+ }
505
+ }, onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), children: [
506
+ jsx_runtime_1.jsx("div", { title: selected.label, style: { ...triggerLabel, ...selectedPreviewStyle }, children: selected.label }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(caret_1.CaretDown, { small: true })
507
+ ] }), saveError === null ? null : jsx_runtime_1.jsx("div", { style: errorText, children: saveError }), opened && size
508
+ ? react_dom_1.default.createPortal(jsx_runtime_1.jsx("div", { style: styles_1.fullScreenOverlay, onPointerDown: (event) => event.stopPropagation(), children: jsx_runtime_1.jsx("div", { style: styles_1.outerPortal, className: "css-reset", children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onOutsideClick: hide, onEscape: hide, children: jsx_runtime_1.jsxs("div", { style: portalStyle({ size }), children: [
509
+ jsx_runtime_1.jsx("div", { style: { padding: 6 }, children: jsx_runtime_1.jsx("input", { ref: inputRef, value: query, onChange: (event) => setQuery(event.target.value), onKeyDown: onKeyDown, placeholder: "Search fonts", style: searchInput }) }), filteredOptions.length === 0 ? (jsx_runtime_1.jsx("div", { style: noResults, children: "No fonts found" })) : (jsx_runtime_1.jsxs("div", { ref: listRef, style: listStyle, onScroll: (event) => {
510
+ setScrollTop(event.currentTarget.scrollTop);
511
+ }, children: [
512
+ jsx_runtime_1.jsx("div", { style: { height: visibleRange.start * ROW_HEIGHT } }), renderedOptions.map((option, index) => {
513
+ const actualIndex = visibleRange.start + index;
514
+ const isSelected = option.value === current;
515
+ const isHighlighted = actualIndex === highlightedIndex;
516
+ return (jsx_runtime_1.jsxs("button", { type: "button", style: {
517
+ ...optionButton,
518
+ backgroundColor: isHighlighted
519
+ ? CLEAR_HOVER
520
+ : isSelected
521
+ ? colors_1.SELECTED_BACKGROUND
522
+ : 'transparent',
523
+ }, onPointerEnter: () => setHighlightedIndex(actualIndex), onPointerDown: (event) => {
524
+ event.preventDefault();
525
+ event.stopPropagation();
526
+ selectOption(option);
527
+ }, children: [
528
+ jsx_runtime_1.jsx("span", { style: { width: 18 }, children: isSelected ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, { size: 11 }) : null }), jsx_runtime_1.jsx("span", { style: {
529
+ ...optionLabel,
530
+ ...getOptionPreviewStyle(option),
531
+ }, children: option.label }), jsx_runtime_1.jsx("span", { style: optionSource, children: option.source })
532
+ ] }, option.id));
533
+ }), jsx_runtime_1.jsx("div", { style: {
534
+ height: (filteredOptions.length - visibleRange.end) *
535
+ ROW_HEIGHT,
536
+ } })
537
+ ] })), jsx_runtime_1.jsx("div", { style: {
538
+ padding: '6px 8px',
539
+ color: colors_1.LIGHT_TEXT,
540
+ fontSize: 10,
541
+ }, children: "Google Fonts are loaded for Studio preview and saved to your composition when selected." })
542
+ ] }) }) }) }), (0, portals_1.getPortal)(currentZIndex))
543
+ : null] }));
544
+ };
545
+ exports.TimelineFontFamilyField = TimelineFontFamilyField;
@@ -4,12 +4,13 @@ exports.TimelineImageInfo = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const timeline_utils_1 = require("@remotion/timeline-utils");
6
6
  const react_1 = require("react");
7
+ const colors_1 = require("../../helpers/colors");
7
8
  const timeline_layout_1 = require("../../helpers/timeline-layout");
8
9
  const HEIGHT = (0, timeline_layout_1.getTimelineLayerHeight)('image') - 2;
9
10
  const containerStyle = {
10
11
  height: HEIGHT,
11
12
  width: '100%',
12
- backgroundColor: 'rgba(0, 0, 0, 0.3)',
13
+ backgroundColor: colors_1.BLACK_ALPHA_30,
13
14
  display: 'flex',
14
15
  borderTopLeftRadius: 2,
15
16
  borderBottomLeftRadius: 2,
@@ -4,12 +4,13 @@ exports.TimelineInOutPointer = exports.outMarkerAreaRef = exports.inMarkerAreaRe
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 get_left_of_timeline_slider_1 = require("../../helpers/get-left-of-timeline-slider");
8
9
  const in_out_1 = require("../../state/in-out");
9
10
  const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
10
11
  const areaHighlight = {
11
12
  position: 'absolute',
12
- backgroundColor: 'rgba(0, 0, 0, 0.5)',
13
+ backgroundColor: colors_1.BLACK_ALPHA_50,
13
14
  height: '100%',
14
15
  bottom: 0,
15
16
  top: 0,
@@ -6,12 +6,13 @@ const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
7
  const colors_1 = require("../../helpers/colors");
8
8
  const get_left_of_timeline_slider_1 = require("../../helpers/get-left-of-timeline-slider");
9
+ const TimelineSelection_1 = require("./TimelineSelection");
9
10
  const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
10
11
  const line = {
11
12
  height: '100%',
12
13
  width: 1,
13
14
  position: 'absolute',
14
- backgroundColor: 'rgba(255, 255, 255, 0.1)',
15
+ backgroundColor: colors_1.WHITE_ALPHA_10,
15
16
  cursor: 'ew-resize',
16
17
  paddingLeft: 1,
17
18
  paddingRight: 1,
@@ -23,14 +24,12 @@ const InnerTimelineInOutPointerHandle = ({ atFrame, dragging, onPointerDown, tim
23
24
  const style = (0, react_1.useMemo)(() => {
24
25
  return {
25
26
  ...line,
26
- backgroundColor: dragging
27
- ? colors_1.LIGHT_TRANSPARENT
28
- : 'rgba(255, 255, 255, 0.1)',
27
+ backgroundColor: dragging ? colors_1.WHITE_ALPHA_70 : colors_1.WHITE_ALPHA_10,
29
28
  transform: `translateX(${(0, get_left_of_timeline_slider_1.getXPositionOfItemInTimelineImperatively)(atFrame, videoConfig.durationInFrames, timelineWidth)}px)`,
30
29
  top: 0,
31
30
  };
32
31
  }, [atFrame, dragging, timelineWidth, videoConfig.durationInFrames]);
33
- return (jsx_runtime_1.jsx("div", { ref: type === 'in' ? exports.inPointerHandle : exports.outPointerHandle, style: style, onPointerDown: onPointerDown }));
32
+ return (jsx_runtime_1.jsx("div", { ref: type === 'in' ? exports.inPointerHandle : exports.outPointerHandle, style: style, onPointerDown: onPointerDown, [TimelineSelection_1.TIMELINE_SCRUBBER_ATTR]: true }));
34
33
  };
35
34
  const TimelineInOutPointerHandle = ({ dragging, onPointerDown, type, atFrame, }) => {
36
35
  const timelineWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { CanUpdateSequencePropStatus, DragOverrideValue, SequencePropsSubscriptionKey, InteractivitySchema } from 'remotion';
2
+ import type { CanUpdateSequencePropStatus, DragOverrideValue, InteractivitySchema, SequencePropsSubscriptionKey } from 'remotion';
3
3
  import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
4
4
  import { type TimelineSelection } from './TimelineSelection';
5
5
  export declare const getSelectedKeyframeControlNodePathInfos: ({ clickedNodePathInfo, selectedItems, }: {
@@ -29,7 +29,7 @@ const navButtonStyle = {
29
29
  alignItems: 'center',
30
30
  background: 'none',
31
31
  border: 'none',
32
- color: 'white',
32
+ color: colors_1.WHITE,
33
33
  cursor: 'pointer',
34
34
  display: 'flex',
35
35
  flexShrink: 0,
@@ -113,6 +113,7 @@ const resolveKeyframeControlTarget = ({ nodePathInfo, tracks, propStatuses, getD
113
113
  getDragOverrides,
114
114
  getEffectDragOverrides,
115
115
  propStatuses,
116
+ includeTextContent: false,
116
117
  });
117
118
  const fieldNode = findFieldNode(tree, (0, timeline_node_path_key_1.timelineNodePathInfoToKey)(nodePathInfo));
118
119
  if (fieldNode === null || fieldNode.field === null) {
@@ -468,7 +469,7 @@ const TimelineKeyframeControls = ({ fieldKey, propStatus, nodePath, fileName, ke
468
469
  }), [canToggleKeyframe, clientId]);
469
470
  const diamondColor = hasKeyframeAtCurrentFrame ? colors_1.BLUE : colors_1.LIGHT_TEXT;
470
471
  return (jsx_runtime_1.jsxs("div", { style: controlsContainerStyle, children: [
471
- jsx_runtime_1.jsx("button", { type: "button", style: previousStyle, disabled: previousDisabled, onPointerDown: previousDisabled ? undefined : onPrevious, "aria-label": "Go to previous keyframe", title: "Previous keyframe", children: jsx_runtime_1.jsx("svg", { width: "14", height: "14", viewBox: "0 0 10 10", style: svgStyle, children: jsx_runtime_1.jsx("path", { d: "M7 1.5L3 5L7 8.5Z", fill: "#ccc" }) }) }), jsx_runtime_1.jsx("button", { type: "button", style: diamondStyle, disabled: !canToggleKeyframe || !clientId, onPointerDown: canToggleKeyframe && clientId ? onToggleKeyframe : undefined, "aria-label": hasKeyframeAtCurrentFrame ? 'Remove keyframe' : 'Add keyframe', title: hasKeyframeAtCurrentFrame ? 'Remove keyframe' : 'Add keyframe', children: jsx_runtime_1.jsx(TimelineKeyframeDiamondIcon_1.TimelineKeyframeDiamondIcon, { color: diamondColor, size: 12 }) }), jsx_runtime_1.jsx("button", { type: "button", style: nextStyle, disabled: nextDisabled, onPointerDown: nextDisabled ? undefined : onNext, "aria-label": "Go to next keyframe", title: "Next keyframe", children: jsx_runtime_1.jsx("svg", { width: "14", height: "14", viewBox: "0 0 10 10", style: svgStyle, children: jsx_runtime_1.jsx("path", { d: "M3 1.5L7 5L3 8.5Z", fill: "#ccc" }) }) })
472
+ jsx_runtime_1.jsx("button", { type: "button", style: previousStyle, disabled: previousDisabled, onPointerDown: previousDisabled ? undefined : onPrevious, "aria-label": "Go to previous keyframe", title: "Previous keyframe", children: jsx_runtime_1.jsx("svg", { width: "14", height: "14", viewBox: "0 0 10 10", style: svgStyle, children: jsx_runtime_1.jsx("path", { d: "M7 1.5L3 5L7 8.5Z", fill: colors_1.LIGHT_GRAY }) }) }), jsx_runtime_1.jsx("button", { type: "button", style: diamondStyle, disabled: !canToggleKeyframe || !clientId, onPointerDown: canToggleKeyframe && clientId ? onToggleKeyframe : undefined, "aria-label": hasKeyframeAtCurrentFrame ? 'Remove keyframe' : 'Add keyframe', title: hasKeyframeAtCurrentFrame ? 'Remove keyframe' : 'Add keyframe', children: jsx_runtime_1.jsx(TimelineKeyframeDiamondIcon_1.TimelineKeyframeDiamondIcon, { color: diamondColor, size: 12 }) }), jsx_runtime_1.jsx("button", { type: "button", style: nextStyle, disabled: nextDisabled, onPointerDown: nextDisabled ? undefined : onNext, "aria-label": "Go to next keyframe", title: "Next keyframe", children: jsx_runtime_1.jsx("svg", { width: "14", height: "14", viewBox: "0 0 10 10", style: svgStyle, children: jsx_runtime_1.jsx("path", { d: "M3 1.5L7 5L3 8.5Z", fill: colors_1.LIGHT_GRAY }) }) })
472
473
  ] }));
473
474
  };
474
475
  exports.TimelineKeyframeControls = TimelineKeyframeControls;
@@ -8,7 +8,7 @@ const svgStyle = {
8
8
  overflow: 'visible',
9
9
  };
10
10
  const TimelineKeyframeDiamondIcon = ({ color, selected = false, size }) => {
11
- return (jsx_runtime_1.jsxs("svg", { width: size, height: size, viewBox: "0 0 12 12", style: svgStyle, "aria-hidden": "true", focusable: "false", children: [selected ? (jsx_runtime_1.jsx("polygon", { points: "6 0.75 11.25 6 6 11.25 0.75 6", fill: "none", stroke: colors_1.BLUE, strokeWidth: "1.5", strokeLinejoin: "round" })) : null, jsx_runtime_1.jsx("polygon", { points: "6 1.5 10.5 6 6 10.5 1.5 6", fill: color, stroke: "rgba(0, 0, 0, 0.4)", strokeWidth: "1", strokeLinejoin: "round" })
11
+ return (jsx_runtime_1.jsxs("svg", { width: size, height: size, viewBox: "0 0 12 12", style: svgStyle, "aria-hidden": "true", focusable: "false", children: [selected ? (jsx_runtime_1.jsx("polygon", { points: "6 0.75 11.25 6 6 11.25 0.75 6", fill: "none", stroke: colors_1.BLUE, strokeWidth: "1.5", strokeLinejoin: "round" })) : null, jsx_runtime_1.jsx("polygon", { points: "6 1.5 10.5 6 6 10.5 1.5 6", fill: color, stroke: colors_1.BLACK_ALPHA_40, strokeWidth: "1", strokeLinejoin: "round" })
12
12
  ] }));
13
13
  };
14
14
  exports.TimelineKeyframeDiamondIcon = TimelineKeyframeDiamondIcon;
@@ -58,7 +58,7 @@ const easingLineButton = {
58
58
  transform: 'translateY(-50%)',
59
59
  };
60
60
  const easingLine = {
61
- backgroundColor: 'rgba(255, 255, 255, 0.1)',
61
+ backgroundColor: colors_1.WHITE_ALPHA_10,
62
62
  borderRadius: lineHeight / 2,
63
63
  height: lineHeight,
64
64
  left: 0,