@remotion/studio 4.0.485 → 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 (238) 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/CopyButton.js +3 -2
  22. package/dist/components/CurrentAsset.d.ts +3 -1
  23. package/dist/components/CurrentAsset.js +15 -2
  24. package/dist/components/EffectPickerModal.js +1 -1
  25. package/dist/components/FilePreview.js +2 -1
  26. package/dist/components/FpsCounter.js +3 -2
  27. package/dist/components/FullscreenToggle.js +2 -1
  28. package/dist/components/GlobalKeybindings.js +0 -12
  29. package/dist/components/InlineAction.js +2 -2
  30. package/dist/components/InlineEditableTitle.d.ts +1 -0
  31. package/dist/components/InlineEditableTitle.js +12 -7
  32. package/dist/components/InspectorInfoHeader.js +2 -2
  33. package/dist/components/InspectorPanel/DefaultInspector.d.ts +1 -0
  34. package/dist/components/InspectorPanel/DefaultInspector.js +2 -2
  35. package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +1 -1
  36. package/dist/components/InspectorPanel/common.js +2 -2
  37. package/dist/components/InspectorPanel/styles.js +3 -3
  38. package/dist/components/InspectorPanel.d.ts +1 -0
  39. package/dist/components/InspectorPanel.js +2 -2
  40. package/dist/components/InspectorSequenceSection.js +1 -1
  41. package/dist/components/InstallablePackage.js +1 -1
  42. package/dist/components/KeyboardShortcutsExplainer.js +5 -5
  43. package/dist/components/LoopToggle.js +1 -1
  44. package/dist/components/Menu/MenuDivider.js +1 -1
  45. package/dist/components/Menu/MenuItem.js +1 -1
  46. package/dist/components/Menu/MenuSubItem.js +1 -1
  47. package/dist/components/Menu/styles.js +3 -3
  48. package/dist/components/MenuToolbar.js +2 -2
  49. package/dist/components/ModalButton.js +1 -1
  50. package/dist/components/ModalContainer.js +3 -3
  51. package/dist/components/ModalFooter.js +2 -1
  52. package/dist/components/ModalHeader.js +3 -2
  53. package/dist/components/Modals.js +2 -1
  54. package/dist/components/NewComposition/CancelButton.js +4 -3
  55. package/dist/components/NewComposition/ComboBox.js +3 -3
  56. package/dist/components/NewComposition/InputDragger.js +11 -3
  57. package/dist/components/NewComposition/MenuContent.js +1 -1
  58. package/dist/components/NewComposition/NewComposition.js +4 -1
  59. package/dist/components/NewComposition/NewFolder.d.ts +5 -0
  60. package/dist/components/NewComposition/NewFolder.js +86 -0
  61. package/dist/components/NewComposition/RemInput.js +3 -3
  62. package/dist/components/NewComposition/RemTextarea.js +1 -1
  63. package/dist/components/NewComposition/RenameStaticFile.js +20 -59
  64. package/dist/components/NewComposition/ValidationMessage.js +1 -1
  65. package/dist/components/NewComposition/use-rename-static-file.d.ts +18 -0
  66. package/dist/components/NewComposition/use-rename-static-file.js +90 -0
  67. package/dist/components/NoRegisterRoot.js +3 -2
  68. package/dist/components/Notifications/ColorDot.js +3 -2
  69. package/dist/components/Notifications/Notification.js +4 -4
  70. package/dist/components/Notifications/NotificationCenter.js +2 -1
  71. package/dist/components/Notifications/ServerDisconnected.js +5 -4
  72. package/dist/components/OptionsPanel.js +1 -1
  73. package/dist/components/OutlineToggle.js +1 -1
  74. package/dist/components/PlayPause.js +4 -3
  75. package/dist/components/PreviewToolbar.js +1 -1
  76. package/dist/components/QuickSwitcher/AlgoliaCredit.js +2 -1
  77. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
  78. package/dist/components/QuickSwitcher/QuickSwitcherResult.js +2 -2
  79. package/dist/components/RefreshCompositionOverlay.js +2 -1
  80. package/dist/components/RenderButton.js +9 -9
  81. package/dist/components/RenderModal/CliCopyButton.js +1 -1
  82. package/dist/components/RenderModal/ClientRenderProgress.js +1 -1
  83. package/dist/components/RenderModal/DataEditor.js +1 -1
  84. package/dist/components/RenderModal/GuiRenderStatus.js +1 -1
  85. package/dist/components/RenderModal/InfoBubble.js +2 -2
  86. package/dist/components/RenderModal/InfoTooltip.js +3 -3
  87. package/dist/components/RenderModal/InlineEyeIcon.js +2 -1
  88. package/dist/components/RenderModal/InlineRemoveButton.js +2 -1
  89. package/dist/components/RenderModal/MultiRangeSlider.js +1 -1
  90. package/dist/components/RenderModal/OptionExplainer.js +2 -2
  91. package/dist/components/RenderModal/RenderModalHr.js +2 -1
  92. package/dist/components/RenderModal/RenderStatusModal.js +2 -1
  93. package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +1 -5
  94. package/dist/components/RenderModal/SchemaEditor/SchemaResetButton.js +2 -1
  95. package/dist/components/RenderModal/SchemaEditor/SchemaSeparationLine.js +1 -1
  96. package/dist/components/RenderModal/SchemaEditor/SchemaVerticalGuide.js +2 -1
  97. package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
  98. package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.js +1 -1
  99. package/dist/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +1 -1
  100. package/dist/components/RenderModal/SchemaEditor/create-zod-values.js +2 -1
  101. package/dist/components/RenderModal/ServerRenderModal.js +1 -1
  102. package/dist/components/RenderModal/WarningIndicatorButton.js +4 -6
  103. package/dist/components/RenderModal/WebRenderModalAudio.js +4 -3
  104. package/dist/components/RenderModal/WebRenderModalLicense.js +2 -2
  105. package/dist/components/RenderModal/WebRenderModalPicture.js +2 -1
  106. package/dist/components/RenderModal/render-modals.js +3 -3
  107. package/dist/components/RenderPreview.js +1 -1
  108. package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +2 -1
  109. package/dist/components/RenderQueue/RenderQueueDownloadItem.js +2 -1
  110. package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +2 -1
  111. package/dist/components/RenderQueue/RenderQueueItemStatus.js +1 -1
  112. package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +2 -1
  113. package/dist/components/RenderQueue/RenderQueueRemoveItem.js +2 -1
  114. package/dist/components/RenderQueue/RenderQueueRepeat.js +2 -1
  115. package/dist/components/RenderQueue/index.js +1 -1
  116. package/dist/components/RendersTab.js +2 -2
  117. package/dist/components/SegmentedControl.js +3 -3
  118. package/dist/components/SelectedOutlineElement.d.ts +5 -0
  119. package/dist/components/SelectedOutlineElement.js +7 -7
  120. package/dist/components/SelectedOutlineOverlay.js +1 -1
  121. package/dist/components/SelectedOutlineUvControls.js +5 -5
  122. package/dist/components/SidebarCollapserControls.js +5 -4
  123. package/dist/components/Splitter/SplitterElement.js +2 -1
  124. package/dist/components/StaticFilePreview.js +1 -1
  125. package/dist/components/Tabs/index.js +3 -3
  126. package/dist/components/Tabs/vertical.js +3 -3
  127. package/dist/components/TextViewer.js +2 -1
  128. package/dist/components/TimeValue.js +1 -1
  129. package/dist/components/Timeline/EasingEditorModal.js +8 -8
  130. package/dist/components/Timeline/KeyframeSettingsModal.js +1 -1
  131. package/dist/components/Timeline/LoopedIndicator.js +2 -2
  132. package/dist/components/Timeline/MaxTimelineTracks.js +3 -2
  133. package/dist/components/Timeline/TimelineArrayField.js +6 -5
  134. package/dist/components/Timeline/TimelineColorField.js +2 -1
  135. package/dist/components/Timeline/TimelineEffectItem.js +3 -2
  136. package/dist/components/Timeline/TimelineEffectPropItem.js +2 -2
  137. package/dist/components/Timeline/TimelineExpandArrowButton.js +3 -2
  138. package/dist/components/Timeline/TimelineExpandedRow.js +2 -1
  139. package/dist/components/Timeline/TimelineExpandedSection.js +1 -1
  140. package/dist/components/Timeline/TimelineFieldLabel.js +2 -1
  141. package/dist/components/Timeline/TimelineFontFamilyField.d.ts +11 -0
  142. package/dist/components/Timeline/TimelineFontFamilyField.js +545 -0
  143. package/dist/components/Timeline/TimelineImageInfo.js +2 -1
  144. package/dist/components/Timeline/TimelineInOutPointer.js +2 -1
  145. package/dist/components/Timeline/TimelineInOutPointerHandle.js +2 -4
  146. package/dist/components/Timeline/TimelineKeyframeControls.js +2 -2
  147. package/dist/components/Timeline/TimelineKeyframeDiamondIcon.js +1 -1
  148. package/dist/components/Timeline/TimelineKeyframeEasingLine.js +1 -1
  149. package/dist/components/Timeline/TimelineLayerEye.js +3 -3
  150. package/dist/components/Timeline/TimelineMediaInfo.js +2 -2
  151. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +4 -0
  152. package/dist/components/Timeline/TimelineRotationField.js +4 -3
  153. package/dist/components/Timeline/TimelineScaleField.js +1 -1
  154. package/dist/components/Timeline/TimelineSchemaField.d.ts +2 -0
  155. package/dist/components/Timeline/TimelineSchemaField.js +47 -7
  156. package/dist/components/Timeline/TimelineScrollable.js +3 -2
  157. package/dist/components/Timeline/TimelineSelection.js +6 -6
  158. package/dist/components/Timeline/TimelineSequence.js +17 -20
  159. package/dist/components/Timeline/TimelineSequenceFrame.js +3 -2
  160. package/dist/components/Timeline/TimelineSequenceItem.js +8 -7
  161. package/dist/components/Timeline/TimelineSequenceName.js +3 -2
  162. package/dist/components/Timeline/TimelineSequencePropItem.js +2 -1
  163. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +20 -1
  164. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +128 -11
  165. package/dist/components/Timeline/TimelineSlider.js +2 -1
  166. package/dist/components/Timeline/TimelineSliderHandle.js +2 -1
  167. package/dist/components/Timeline/TimelineTimeIndicators.js +1 -1
  168. package/dist/components/Timeline/TimelineVideoInfo.js +2 -1
  169. package/dist/components/Timeline/TimelineZoomControls.js +4 -3
  170. package/dist/components/Timeline/call-move-keyframe.d.ts +5 -0
  171. package/dist/components/Timeline/call-move-keyframe.js +14 -3
  172. package/dist/components/Timeline/google-fonts-list.d.ts +6 -0
  173. package/dist/components/Timeline/google-fonts-list.js +1512 -0
  174. package/dist/components/Timeline/save-sequence-prop.d.ts +8 -1
  175. package/dist/components/Timeline/save-sequence-prop.js +63 -19
  176. package/dist/components/Timeline/timeline-rotation-field-utils.d.ts +5 -0
  177. package/dist/components/Timeline/timeline-rotation-field-utils.js +16 -0
  178. package/dist/components/Timeline/timeline-scroll-logic.js +5 -2
  179. package/dist/components/TimelineInOutToggle.js +1 -1
  180. package/dist/components/UpdateCheck.js +2 -2
  181. package/dist/components/UpdateModal/OpenIssueButton.js +1 -1
  182. package/dist/components/VisualControls/ClickableFileName.js +2 -2
  183. package/dist/components/effect-drag-and-drop.js +1 -0
  184. package/dist/components/import-assets.d.ts +7 -1
  185. package/dist/components/import-assets.js +55 -1
  186. package/dist/components/selected-outline-measurement.js +2 -1
  187. package/dist/error-overlay/remotion-overlay/CalculateMetadataErrorExplainer.js +2 -2
  188. package/dist/error-overlay/remotion-overlay/CodeFrame.js +7 -5
  189. package/dist/error-overlay/remotion-overlay/CompositionIdListItem.js +2 -2
  190. package/dist/error-overlay/remotion-overlay/DismissButton.js +3 -2
  191. package/dist/error-overlay/remotion-overlay/ErrorLoader.js +3 -2
  192. package/dist/error-overlay/remotion-overlay/ErrorMessage.js +4 -4
  193. package/dist/error-overlay/remotion-overlay/HelpLink.js +1 -1
  194. package/dist/error-overlay/remotion-overlay/MediaPlaybackErrorExplainer.js +4 -4
  195. package/dist/error-overlay/remotion-overlay/Overlay.js +3 -2
  196. package/dist/error-overlay/remotion-overlay/StackFrame.js +4 -3
  197. package/dist/error-overlay/remotion-overlay/Symbolicating.js +2 -1
  198. package/dist/error-overlay/remotion-overlay/carets.js +3 -2
  199. package/dist/esm/{chunk-103pp4n7.js → chunk-975rp13y.js} +9143 -6061
  200. package/dist/esm/chunk-jefhcs5z.js +164 -0
  201. package/dist/esm/internals.mjs +9144 -6028
  202. package/dist/esm/previewEntry.mjs +8335 -5215
  203. package/dist/esm/renderEntry.mjs +8 -5
  204. package/dist/helpers/checkerboard-background.js +4 -12
  205. package/dist/helpers/colors.d.ts +99 -7
  206. package/dist/helpers/colors.js +118 -10
  207. package/dist/helpers/inject-css.js +85 -83
  208. package/dist/helpers/timeline-layout.d.ts +4 -2
  209. package/dist/helpers/use-menu-structure.js +31 -3
  210. package/dist/helpers/validate-folder-rename.js +2 -10
  211. package/dist/helpers/validate-new-folder-name.d.ts +5 -0
  212. package/dist/helpers/validate-new-folder-name.js +16 -0
  213. package/dist/hot-middleware-client/client.js +3 -2
  214. package/dist/icons/Checkmark.js +2 -1
  215. package/dist/icons/audio.js +2 -1
  216. package/dist/icons/caret.js +2 -2
  217. package/dist/icons/certificate.js +2 -1
  218. package/dist/icons/data.js +2 -1
  219. package/dist/icons/eyedropper.js +2 -1
  220. package/dist/icons/file.js +2 -1
  221. package/dist/icons/frame.js +2 -1
  222. package/dist/icons/gear.js +2 -1
  223. package/dist/icons/gif.js +2 -1
  224. package/dist/icons/jump-to-start.js +2 -1
  225. package/dist/icons/keys.js +4 -3
  226. package/dist/icons/media-volume.js +1 -1
  227. package/dist/icons/minus.js +2 -1
  228. package/dist/icons/pause.js +2 -1
  229. package/dist/icons/play.js +2 -1
  230. package/dist/icons/redo.js +2 -1
  231. package/dist/icons/step-back.js +2 -1
  232. package/dist/icons/step-forward.js +2 -1
  233. package/dist/icons/undo.js +2 -1
  234. package/dist/previewEntry.js +2 -1
  235. package/dist/renderEntry.js +4 -3
  236. package/dist/state/modals.d.ts +4 -0
  237. package/package.json +11 -11
  238. package/dist/esm/chunk-6jf1natv.js +0 -25
@@ -3,20 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RenameStaticFileModal = 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");
7
- const rename_static_file_1 = require("../../api/rename-static-file");
8
- const url_state_1 = require("../../helpers/url-state");
9
6
  const modals_1 = require("../../state/modals");
10
7
  const Button_1 = require("../Button");
11
8
  const layout_1 = require("../layout");
12
9
  const ModalFooter_1 = require("../ModalFooter");
13
10
  const ModalHeader_1 = require("../ModalHeader");
14
- const NotificationCenter_1 = require("../Notifications/NotificationCenter");
15
11
  const layout_2 = require("../RenderModal/layout");
16
12
  const use_static_files_1 = require("../use-static-files");
17
13
  const DismissableModal_1 = require("./DismissableModal");
18
14
  const InputAndValidationContainer_1 = require("./InputAndValidationContainer");
19
15
  const RemInput_1 = require("./RemInput");
16
+ const use_rename_static_file_1 = require("./use-rename-static-file");
20
17
  const ValidationMessage_1 = require("./ValidationMessage");
21
18
  const content = {
22
19
  padding: 12,
@@ -25,54 +22,32 @@ const content = {
25
22
  fontSize: 13,
26
23
  minWidth: 500,
27
24
  };
28
- const getParent = (relativePath) => {
29
- const slashIndex = relativePath.lastIndexOf('/');
30
- return slashIndex === -1 ? '' : relativePath.slice(0, slashIndex);
31
- };
32
- const getBaseName = (relativePath) => {
33
- const slashIndex = relativePath.lastIndexOf('/');
34
- return slashIndex === -1 ? relativePath : relativePath.slice(slashIndex + 1);
35
- };
36
25
  const RenameStaticFileModal = ({ relativePath }) => {
37
26
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
38
- const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
39
- const { setCanvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionSetters);
40
27
  const staticFiles = (0, use_static_files_1.useStaticFiles)();
41
- const [newName, setNewName] = (0, react_1.useState)(() => getBaseName(relativePath));
28
+ const [newName, setNewName] = (0, react_1.useState)(() => (0, use_rename_static_file_1.getStaticFileBaseName)(relativePath));
42
29
  const [submitting, setSubmitting] = (0, react_1.useState)(false);
43
30
  const inputRef = (0, react_1.useRef)(null);
31
+ const renameFile = (0, use_rename_static_file_1.useRenameStaticFile)({ relativePath, staticFiles });
44
32
  (0, react_1.useEffect)(() => {
45
33
  const input = inputRef.current;
46
34
  if (!input)
47
35
  return;
48
- const dotIndex = newName.lastIndexOf('.');
49
- const stemEnd = dotIndex === -1 ? newName.length : dotIndex;
50
- input.setSelectionRange(0, stemEnd);
36
+ const [start, end] = (0, use_rename_static_file_1.getStaticFileRenameSelection)(newName);
37
+ input.setSelectionRange(start, end);
51
38
  // eslint-disable-next-line react-hooks/exhaustive-deps
52
39
  }, []);
53
- const parent = (0, react_1.useMemo)(() => getParent(relativePath), [relativePath]);
54
40
  const newRelativePath = (0, react_1.useMemo)(() => {
55
- return [parent, newName].filter(Boolean).join('/');
56
- }, [newName, parent]);
41
+ return (0, use_rename_static_file_1.getRenamedStaticFilePath)({ newName, relativePath });
42
+ }, [newName, relativePath]);
57
43
  const changed = newRelativePath !== relativePath;
58
44
  const validationMessage = (0, react_1.useMemo)(() => {
59
- const trimmedName = newName.trim();
60
- if (trimmedName.length === 0) {
61
- return 'Name cannot be empty';
62
- }
63
- if (trimmedName !== newName) {
64
- return 'Name cannot start or end with whitespace';
65
- }
66
- if (newName.includes('/') || newName.includes('\\')) {
67
- return 'Name cannot include slashes';
68
- }
69
- const existingFile = staticFiles.find((file) => {
70
- return file.name === newRelativePath && file.name !== relativePath;
45
+ return (0, use_rename_static_file_1.validateStaticFileRename)({
46
+ newName,
47
+ newRelativePath,
48
+ relativePath,
49
+ staticFiles,
71
50
  });
72
- if (existingFile) {
73
- return 'An asset with this name already exists';
74
- }
75
- return null;
76
51
  }, [newName, newRelativePath, relativePath, staticFiles]);
77
52
  const valid = changed && validationMessage === null;
78
53
  const onNameChange = (0, react_1.useCallback)((e) => {
@@ -83,32 +58,18 @@ const RenameStaticFileModal = ({ relativePath }) => {
83
58
  return;
84
59
  }
85
60
  setSubmitting(true);
86
- const notification = (0, NotificationCenter_1.showNotification)(`Renaming ${relativePath}...`, null);
87
- (0, rename_static_file_1.renameStaticFile)({
88
- oldRelativePath: relativePath,
89
- newRelativePath,
90
- })
91
- .then(() => {
92
- setSelectedModal(null);
93
- if ((canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'asset' &&
94
- canvasContent.asset === relativePath) {
95
- setCanvasContent({ type: 'asset', asset: newRelativePath });
96
- (0, url_state_1.pushUrl)(`/assets/${newRelativePath}`);
61
+ renameFile(newName)
62
+ .then((renamed) => {
63
+ if (!renamed) {
64
+ setSubmitting(false);
65
+ return;
97
66
  }
98
- notification.replaceContent(`Renamed to ${newRelativePath}`, 2000);
67
+ setSelectedModal(null);
99
68
  })
100
- .catch((err) => {
69
+ .catch(() => {
101
70
  setSubmitting(false);
102
- notification.replaceContent(`Could not rename ${relativePath}: ${err.message}`, 3000);
103
71
  });
104
- }, [
105
- canvasContent,
106
- newRelativePath,
107
- relativePath,
108
- setCanvasContent,
109
- setSelectedModal,
110
- valid,
111
- ]);
72
+ }, [newName, renameFile, setSelectedModal, valid]);
112
73
  const onSubmit = (0, react_1.useCallback)((e) => {
113
74
  e.preventDefault();
114
75
  onRename();
@@ -29,7 +29,7 @@ const row = {
29
29
  };
30
30
  const label = {
31
31
  fontSize: 13,
32
- color: 'white',
32
+ color: colors_1.WHITE,
33
33
  fontFamily: 'sans-serif',
34
34
  minWidth: 0,
35
35
  whiteSpace: 'normal',
@@ -0,0 +1,18 @@
1
+ import { type StaticFile } from 'remotion';
2
+ export declare const getStaticFileParent: (relativePath: string) => string;
3
+ export declare const getStaticFileBaseName: (relativePath: string) => string;
4
+ export declare const getStaticFileRenameSelection: (fileName: string) => [number, number];
5
+ export declare const getRenamedStaticFilePath: ({ newName, relativePath, }: {
6
+ readonly newName: string;
7
+ readonly relativePath: string;
8
+ }) => string;
9
+ export declare const validateStaticFileRename: ({ newName, newRelativePath, relativePath, staticFiles, }: {
10
+ readonly newName: string;
11
+ readonly newRelativePath: string;
12
+ readonly relativePath: string;
13
+ readonly staticFiles: StaticFile[];
14
+ }) => "An asset with this name already exists" | "Name cannot be empty" | "Name cannot include slashes" | "Name cannot start or end with whitespace" | null;
15
+ export declare const useRenameStaticFile: ({ relativePath, staticFiles, }: {
16
+ readonly relativePath: string;
17
+ readonly staticFiles: StaticFile[];
18
+ }) => (newName: string) => Promise<boolean>;
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useRenameStaticFile = exports.validateStaticFileRename = exports.getRenamedStaticFilePath = exports.getStaticFileRenameSelection = exports.getStaticFileBaseName = exports.getStaticFileParent = void 0;
4
+ const react_1 = require("react");
5
+ const remotion_1 = require("remotion");
6
+ const rename_static_file_1 = require("../../api/rename-static-file");
7
+ const url_state_1 = require("../../helpers/url-state");
8
+ const NotificationCenter_1 = require("../Notifications/NotificationCenter");
9
+ const getStaticFileParent = (relativePath) => {
10
+ const slashIndex = relativePath.lastIndexOf('/');
11
+ return slashIndex === -1 ? '' : relativePath.slice(0, slashIndex);
12
+ };
13
+ exports.getStaticFileParent = getStaticFileParent;
14
+ const getStaticFileBaseName = (relativePath) => {
15
+ const slashIndex = relativePath.lastIndexOf('/');
16
+ return slashIndex === -1 ? relativePath : relativePath.slice(slashIndex + 1);
17
+ };
18
+ exports.getStaticFileBaseName = getStaticFileBaseName;
19
+ const getStaticFileRenameSelection = (fileName) => {
20
+ const dotIndex = fileName.lastIndexOf('.');
21
+ return [0, dotIndex > 0 ? dotIndex : fileName.length];
22
+ };
23
+ exports.getStaticFileRenameSelection = getStaticFileRenameSelection;
24
+ const getRenamedStaticFilePath = ({ newName, relativePath, }) => {
25
+ const parent = (0, exports.getStaticFileParent)(relativePath);
26
+ return [parent, newName].filter(Boolean).join('/');
27
+ };
28
+ exports.getRenamedStaticFilePath = getRenamedStaticFilePath;
29
+ const validateStaticFileRename = ({ newName, newRelativePath, relativePath, staticFiles, }) => {
30
+ const trimmedName = newName.trim();
31
+ if (trimmedName.length === 0) {
32
+ return 'Name cannot be empty';
33
+ }
34
+ if (trimmedName !== newName) {
35
+ return 'Name cannot start or end with whitespace';
36
+ }
37
+ if (newName.includes('/') || newName.includes('\\')) {
38
+ return 'Name cannot include slashes';
39
+ }
40
+ const existingFile = staticFiles.find((file) => {
41
+ return file.name === newRelativePath && file.name !== relativePath;
42
+ });
43
+ if (existingFile) {
44
+ return 'An asset with this name already exists';
45
+ }
46
+ return null;
47
+ };
48
+ exports.validateStaticFileRename = validateStaticFileRename;
49
+ const useRenameStaticFile = ({ relativePath, staticFiles, }) => {
50
+ const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
51
+ const { setCanvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionSetters);
52
+ return (0, react_1.useCallback)(async (newName) => {
53
+ const newRelativePath = (0, exports.getRenamedStaticFilePath)({
54
+ newName,
55
+ relativePath,
56
+ });
57
+ if (newRelativePath === relativePath) {
58
+ return true;
59
+ }
60
+ const validationMessage = (0, exports.validateStaticFileRename)({
61
+ newName,
62
+ newRelativePath,
63
+ relativePath,
64
+ staticFiles,
65
+ });
66
+ if (validationMessage) {
67
+ (0, NotificationCenter_1.showNotification)(validationMessage, 2000);
68
+ return false;
69
+ }
70
+ const notification = (0, NotificationCenter_1.showNotification)(`Renaming ${relativePath}...`, null);
71
+ try {
72
+ await (0, rename_static_file_1.renameStaticFile)({
73
+ oldRelativePath: relativePath,
74
+ newRelativePath,
75
+ });
76
+ if ((canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'asset' &&
77
+ canvasContent.asset === relativePath) {
78
+ setCanvasContent({ type: 'asset', asset: newRelativePath });
79
+ (0, url_state_1.pushUrl)(`/assets/${newRelativePath}`);
80
+ }
81
+ notification.replaceContent(`Renamed to ${newRelativePath}`, 2000);
82
+ return true;
83
+ }
84
+ catch (err) {
85
+ notification.replaceContent(`Could not rename ${relativePath}: ${err.message}`, 3000);
86
+ return false;
87
+ }
88
+ }, [canvasContent, relativePath, setCanvasContent, staticFiles]);
89
+ };
90
+ exports.useRenameStaticFile = useRenameStaticFile;
@@ -4,9 +4,10 @@ exports.NoRegisterRoot = 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
9
  fontSize: 13,
9
- color: 'white',
10
+ color: colors_1.WHITE,
10
11
  fontFamily: 'Arial, Helvetica, sans-serif',
11
12
  };
12
13
  const container = {
@@ -17,7 +18,7 @@ const container = {
17
18
  lineHeight: 1.5,
18
19
  };
19
20
  const link = {
20
- color: 'white',
21
+ color: colors_1.WHITE,
21
22
  textDecoration: 'none',
22
23
  borderBottom: '1px solid',
23
24
  };
@@ -3,11 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ColorDot = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
+ const colors_1 = require("../../helpers/colors");
6
7
  const container = {
7
8
  height: 16,
8
9
  width: 16,
9
- backgroundColor: 'red',
10
- border: '1px solid rgba(255, 255, 255, 0.2)',
10
+ backgroundColor: colors_1.RED,
11
+ border: colors_1.BORDER_WHITE_ALPHA_20,
11
12
  borderRadius: 8,
12
13
  };
13
14
  const ColorDot = ({ color }) => {
@@ -5,15 +5,15 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const colors_1 = require("../../helpers/colors");
7
7
  const notification = {
8
- backgroundColor: '#111111',
9
- color: colors_1.TEXT_COLOR,
8
+ backgroundColor: colors_1.NOTIFICATION_BACKGROUND,
9
+ color: colors_1.WHITE_HEX,
10
10
  fontFamily: 'Arial, Helvetica, sans-serif',
11
11
  display: 'inline-flex',
12
12
  padding: '6px 14px',
13
13
  borderRadius: 6,
14
14
  fontSize: 13,
15
- border: '0.25px solid rgba(255, 255, 255, 0.1)',
16
- boxShadow: '0 2px 3px rgba(0, 0, 0, 1)',
15
+ border: colors_1.NOTIFICATION_BORDER,
16
+ boxShadow: colors_1.NOTIFICATION_SHADOW,
17
17
  marginTop: 3,
18
18
  marginBottom: 3,
19
19
  alignItems: 'center',
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NotificationCenter = exports.showNotification = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
+ const colors_1 = require("../../helpers/colors");
6
7
  const Notification_1 = require("./Notification");
7
8
  const container = {
8
9
  position: 'absolute',
@@ -13,7 +14,7 @@ const container = {
13
14
  flexDirection: 'column',
14
15
  paddingTop: 40,
15
16
  pointerEvents: 'none',
16
- backgroundColor: 'transparent',
17
+ backgroundColor: colors_1.TRANSPARENT,
17
18
  };
18
19
  const notificationCenter = (0, react_1.createRef)();
19
20
  const showNotification = (content, durationInMs) => {
@@ -4,6 +4,7 @@ exports.ServerDisconnected = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const client_id_1 = require("../../helpers/client-id");
7
+ const colors_1 = require("../../helpers/colors");
7
8
  const container = {
8
9
  position: 'fixed',
9
10
  justifyContent: 'flex-end',
@@ -14,18 +15,18 @@ const container = {
14
15
  flexDirection: 'column',
15
16
  padding: 30,
16
17
  pointerEvents: 'none',
17
- backgroundColor: 'transparent',
18
+ backgroundColor: colors_1.TRANSPARENT,
18
19
  fontFamily: 'SF Pro, Arial, Helvetica, sans-serif',
19
20
  };
20
21
  const message = {
21
- backgroundColor: '#e74c3c',
22
- color: 'white',
22
+ backgroundColor: colors_1.SERVER_DISCONNECTED_BACKGROUND,
23
+ color: colors_1.WHITE,
23
24
  paddingLeft: 20,
24
25
  paddingRight: 20,
25
26
  paddingTop: 12,
26
27
  paddingBottom: 12,
27
28
  borderRadius: 4,
28
- boxShadow: '0 2px 4px rgba(0, 0, 0, 0.4)',
29
+ boxShadow: colors_1.SERVER_DISCONNECTED_SHADOW,
29
30
  lineHeight: 1.5,
30
31
  };
31
32
  const inlineCode = {
@@ -181,6 +181,6 @@ const OptionsPanel = ({ readOnlyStudio }) => {
181
181
  }, []);
182
182
  return (jsx_runtime_1.jsxs("div", { style: container, className: "css-reset", onPointerDown: onPointerDown, children: [
183
183
  jsx_runtime_1.jsx("div", { style: tabsContainer, children: jsx_runtime_1.jsxs(Tabs_1.Tabs, { children: [
184
- jsx_runtime_1.jsxs(Tabs_1.Tab, { selected: panel === 'inspector', onClick: onInspectorSelected, style: { justifyContent: 'space-between' }, children: ["Inspector", hasLocalModifications ? (jsx_runtime_1.jsx(SchemaResetButton_1.SchemaResetButton, { onClick: resetToOriginal })) : null] }), renderingAvailable ? (jsx_runtime_1.jsx(RendersTab_1.RendersTab, { onClick: onRendersSelected, selected: panel === 'renders' })) : null] }) }), panel === 'inspector' ? (jsx_runtime_1.jsx(InspectorPanel_1.InspectorPanel, { composition: composition, currentDefaultProps: currentDefaultProps, setDefaultProps: setDefaultProps })) : !renderingAvailable ? null : (jsx_runtime_1.jsx(RenderQueue_1.RenderQueue, {}))] }));
184
+ jsx_runtime_1.jsxs(Tabs_1.Tab, { selected: panel === 'inspector', onClick: onInspectorSelected, style: { justifyContent: 'space-between' }, children: ["Inspector", hasLocalModifications ? (jsx_runtime_1.jsx(SchemaResetButton_1.SchemaResetButton, { onClick: resetToOriginal })) : null] }), renderingAvailable ? (jsx_runtime_1.jsx(RendersTab_1.RendersTab, { onClick: onRendersSelected, selected: panel === 'renders' })) : null] }) }), panel === 'inspector' ? (jsx_runtime_1.jsx(InspectorPanel_1.InspectorPanel, { composition: composition, currentDefaultProps: currentDefaultProps, readOnlyStudio: readOnlyStudio, setDefaultProps: setDefaultProps })) : !renderingAvailable ? null : (jsx_runtime_1.jsx(RenderQueue_1.RenderQueue, {}))] }));
185
185
  };
186
186
  exports.OptionsPanel = OptionsPanel;
@@ -11,7 +11,7 @@ const OutlineToggle = () => {
11
11
  const onClick = (0, react_1.useCallback)(() => {
12
12
  setEditorShowOutlines((current) => !current);
13
13
  }, [setEditorShowOutlines]);
14
- const color = editorShowOutlines ? colors_1.BLUE : 'white';
14
+ const color = editorShowOutlines ? colors_1.BLUE : colors_1.WHITE;
15
15
  const accessibilityLabel = editorShowOutlines
16
16
  ? 'Hide outlines'
17
17
  : 'Show outlines';
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const player_1 = require("@remotion/player");
6
6
  const react_1 = require("react");
7
7
  const remotion_1 = require("remotion");
8
+ const colors_1 = require("../helpers/colors");
8
9
  const is_current_selected_still_1 = require("../helpers/is-current-selected-still");
9
10
  const use_keybinding_1 = require("../helpers/use-keybinding");
10
11
  const jump_to_start_1 = require("../icons/jump-to-start");
@@ -18,16 +19,16 @@ const imperative_state_1 = require("./Timeline/imperative-state");
18
19
  const timeline_scroll_logic_1 = require("./Timeline/timeline-scroll-logic");
19
20
  const backStyle = {
20
21
  height: 18,
21
- color: 'white',
22
+ color: colors_1.WHITE,
22
23
  };
23
24
  const forwardBackStyle = {
24
25
  height: 16,
25
- color: 'white',
26
+ color: colors_1.WHITE,
26
27
  };
27
28
  const iconButton = {
28
29
  height: 14,
29
30
  width: 14,
30
- color: 'white',
31
+ color: colors_1.WHITE,
31
32
  };
32
33
  const PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds, muted }) => {
33
34
  const { inFrame, outFrame } = (0, in_out_1.useTimelineInOutFramePosition)();
@@ -29,7 +29,7 @@ const TOOLBAR_HEIGHT = 50;
29
29
  const container = {
30
30
  display: 'flex',
31
31
  justifyContent: 'center',
32
- borderTop: '1px solid rgba(0, 0, 0, 0.5)',
32
+ borderTop: colors_1.BORDER_BLACK_ALPHA_50,
33
33
  alignItems: 'center',
34
34
  flexDirection: 'row',
35
35
  background: colors_1.BACKGROUND,
@@ -2,10 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AlgoliaCredit = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const colors_1 = require("../../helpers/colors");
5
6
  const link = {
6
7
  display: 'inline-flex',
7
8
  };
8
9
  const AlgoliaCredit = () => {
9
- return (jsx_runtime_1.jsx("a", { style: link, href: "https://www.algolia.com/ref/docsearch/?utm_source=www.remotion.dev&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch", target: "_blank", rel: "noopener noreferrer", children: jsx_runtime_1.jsx("svg", { width: "77", height: "19", "aria-label": "Algolia", role: "img", children: jsx_runtime_1.jsx("path", { d: "M2.5067 0h14.0245c1.384.001 2.5058 1.1205 2.5068 2.5017V16.5c-.0014 1.3808-1.1232 2.4995-2.5068 2.5H2.5067C1.1232 18.9995.0014 17.8808 0 16.5V2.4958A2.495 2.495 0 01.735.7294 2.505 2.505 0 012.5068 0zM37.95 15.0695c-3.7068.0168-3.7068-2.986-3.7068-3.4634L34.2372.3576 36.498 0v11.1794c0 .2715 0 1.9889 1.452 1.994v1.8961zm-9.1666-1.8388c.694 0 1.2086-.0397 1.5678-.1088v-2.2934a5.3639 5.3639 0 00-1.3303-.1679 4.8283 4.8283 0 00-.758.0582 2.2845 2.2845 0 00-.688.2024c-.2029.0979-.371.2362-.4919.4142-.1268.1788-.185.2826-.185.5533 0 .5297.185.8359.5205 1.0375.3355.2016.7928.3053 1.365.3053v-.0008zm-.1969-8.1817c.7463 0 1.3768.092 1.8856.2767.5088.1838.9195.4428 1.2204.7717.3068.334.5147.7777.6423 1.251.1327.4723.196.991.196 1.5603v5.798c-.5235.1036-1.05.192-1.5787.2649-.7048.1037-1.4976.156-2.3774.156-.5832 0-1.1215-.0582-1.6016-.167a3.385 3.385 0 01-1.2432-.5364 2.6034 2.6034 0 01-.8037-.9565c-.191-.3922-.29-.9447-.29-1.5208 0-.5533.11-.905.3246-1.2863a2.7351 2.7351 0 01.8849-.9329c.376-.242.8029-.415 1.2948-.5187a7.4517 7.4517 0 011.5381-.156 7.1162 7.1162 0 011.6667.2024V8.886c0-.259-.0296-.5061-.093-.7372a1.5847 1.5847 0 00-.3245-.6158 1.5079 1.5079 0 00-.6119-.4158 2.6788 2.6788 0 00-.966-.173c-.5206 0-.9948.0634-1.4283.1384a6.5481 6.5481 0 00-1.065.259l-.2712-1.849c.2831-.0986.7048-.1964 1.2491-.2943a9.2979 9.2979 0 011.752-.1501v.0008zm44.6597 8.1193c.6947 0 1.2086-.0405 1.567-.1097v-2.2942a5.3743 5.3743 0 00-1.3303-.1679c-.2485 0-.503.0177-.7573.0582a2.2853 2.2853 0 00-.688.2024 1.2333 1.2333 0 00-.4918.4142c-.1268.1788-.1843.2826-.1843.5533 0 .5297.1843.8359.5198 1.0375.3414.2066.7927.3053 1.365.3053v.0009zm-.191-8.1767c.7463 0 1.3768.0912 1.8856.2759.5087.1847.9195.4436 1.2204.7717.3.329.5147.7786.6414 1.251a5.7248 5.7248 0 01.197 1.562v5.7972c-.3466.0742-.874.1602-1.5788.2648-.7049.1038-1.4976.1552-2.3774.1552-.5832 0-1.1215-.0573-1.6016-.167a3.385 3.385 0 01-1.2432-.5356 2.6034 2.6034 0 01-.8038-.9565c-.191-.3922-.2898-.9447-.2898-1.5216 0-.5533.1098-.905.3245-1.2854a2.7373 2.7373 0 01.8849-.9338c.376-.2412.8029-.4141 1.2947-.5178a7.4545 7.4545 0 012.325-.1097c.2781.0287.5672.081.879.156v-.3686a2.7781 2.7781 0 00-.092-.738 1.5788 1.5788 0 00-.3246-.6166 1.5079 1.5079 0 00-.612-.415 2.6797 2.6797 0 00-.966-.1729c-.5205 0-.9947.0633-1.4282.1384a6.5608 6.5608 0 00-1.065.259l-.2712-1.8498c.283-.0979.7048-.1957 1.2491-.2935a9.8597 9.8597 0 011.752-.1494zm-6.79-1.072c-.7576.001-1.373-.6103-1.3759-1.3664 0-.755.6128-1.3664 1.376-1.3664.764 0 1.3775.6115 1.3775 1.3664s-.6195 1.3664-1.3776 1.3664zm1.1393 11.1507h-2.2726V5.3409l2.2734-.3568v10.0845l-.0008.0017zm-3.984 0c-3.707.0168-3.707-2.986-3.707-3.4642L59.7069.3576 61.9685 0v11.1794c0 .2715 0 1.9889 1.452 1.994V15.0703zm-7.3512-4.979c0-.975-.2138-1.7873-.6305-2.3516-.4167-.571-.9998-.852-1.747-.852-.7454 0-1.3302.281-1.7452.852-.4166.5702-.6195 1.3765-.6195 2.3516 0 .9851.208 1.6473.6254 2.2183.4158.576.9998.8587 1.7461.8587.7454 0 1.3303-.2885 1.747-.8595.4158-.5761.6237-1.2315.6237-2.2184v.0009zm2.3132-.006c0 .7609-.1099 1.3361-.3356 1.9654a4.654 4.654 0 01-.9533 1.6076A4.214 4.214 0 0155.613 14.69c-.579.2412-1.4697.3795-1.9143.3795-.4462-.005-1.3303-.1324-1.9033-.3795a4.307 4.307 0 01-1.474-1.0316c-.4115-.4445-.7293-.9801-.9609-1.6076a5.3423 5.3423 0 01-.3465-1.9653c0-.7608.104-1.493.3356-2.1155a4.683 4.683 0 01.9719-1.5958 4.3383 4.3383 0 011.479-1.0257c.5739-.242 1.2043-.3567 1.8864-.3567.6829 0 1.3125.1197 1.8906.3567a4.1245 4.1245 0 011.4816 1.0257 4.7587 4.7587 0 01.9592 1.5958c.2426.6225.3643 1.3547.3643 2.1155zm-17.0198 0c0 .9448.208 1.9932.6238 2.431.4166.4386.955.6579 1.6142.6579.3584 0 .6998-.0523 1.0176-.1502.3186-.0978.5721-.2134.775-.3517V7.0784a8.8706 8.8706 0 00-1.4926-.1906c-.8206-.0236-1.4452.312-1.8847.8468-.4335.5365-.6533 1.476-.6533 2.3516v-.0008zm6.2863 4.4485c0 1.5385-.3938 2.662-1.1866 3.3773-.791.7136-2.0005 1.0712-3.6308 1.0712-.5958 0-1.834-.1156-2.8228-.334l.3643-1.7865c.8282.173 1.9202.2193 2.4932.2193.9077 0 1.555-.1847 1.943-.5533.388-.3686.578-.916.578-1.643v-.3687a6.8289 6.8289 0 01-.8848.3349c-.3634.1096-.786.167-1.261.167-.6246 0-1.1917-.0979-1.7055-.2944a3.5554 3.5554 0 01-1.3244-.8645c-.3642-.3796-.6541-.8579-.8561-1.4289-.2028-.571-.3068-1.59-.3068-2.339 0-.7034.1099-1.5856.3245-2.1735.2198-.5871.5316-1.0949.9542-1.515.4167-.42.9255-.743 1.5213-.98a5.5923 5.5923 0 012.052-.3855c.7353 0 1.4114.092 2.0707.2024.6592.1088 1.2204.2236 1.6776.35v8.945-.0008zM11.5026 4.2418v-.6511c-.0005-.4553-.3704-.8241-.8266-.8241H8.749c-.4561 0-.826.3688-.8265.824v.669c0 .0742.0693.1264.1445.1096a6.0346 6.0346 0 011.6768-.2362 6.125 6.125 0 011.6202.2185.1116.1116 0 00.1386-.1097zm-5.2806.852l-.3296-.3282a.8266.8266 0 00-1.168 0l-.393.3922a.8199.8199 0 000 1.164l.3237.323c.0524.0515.1268.0397.1733-.0117.191-.259.3989-.507.6305-.7372.2374-.2362.48-.4437.7462-.6335.0575-.0354.0634-.1155.017-.1687zm3.5159 2.069v2.818c0 .081.0879.1392.1622.0987l2.5102-1.2964c.0574-.0287.0752-.0987.0464-.1552a3.1237 3.1237 0 00-2.603-1.574c-.0575 0-.115.0456-.115.1097l-.0008-.0009zm.0008 6.789c-2.0933.0005-3.7915-1.6912-3.7947-3.7804C5.9468 8.0821 7.6452 6.39 9.7387 6.391c2.0932-.0005 3.7911 1.6914 3.794 3.7804a3.7783 3.7783 0 01-1.1124 2.675 3.7936 3.7936 0 01-2.6824 1.1054h.0008zM9.738 4.8002c-1.9218 0-3.6975 1.0232-4.6584 2.6841a5.359 5.359 0 000 5.3683c.9609 1.661 2.7366 2.6841 4.6584 2.6841a5.3891 5.3891 0 003.8073-1.5725 5.3675 5.3675 0 001.578-3.7987 5.3574 5.3574 0 00-1.5771-3.797A5.379 5.379 0 009.7387 4.801l-.0008-.0008z", fill: "currentColor", fillRule: "evenodd" }) }) }));
10
+ return (jsx_runtime_1.jsx("a", { style: link, href: "https://www.algolia.com/ref/docsearch/?utm_source=www.remotion.dev&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch", target: "_blank", rel: "noopener noreferrer", children: jsx_runtime_1.jsx("svg", { width: "77", height: "19", "aria-label": "Algolia", role: "img", children: jsx_runtime_1.jsx("path", { d: "M2.5067 0h14.0245c1.384.001 2.5058 1.1205 2.5068 2.5017V16.5c-.0014 1.3808-1.1232 2.4995-2.5068 2.5H2.5067C1.1232 18.9995.0014 17.8808 0 16.5V2.4958A2.495 2.495 0 01.735.7294 2.505 2.505 0 012.5068 0zM37.95 15.0695c-3.7068.0168-3.7068-2.986-3.7068-3.4634L34.2372.3576 36.498 0v11.1794c0 .2715 0 1.9889 1.452 1.994v1.8961zm-9.1666-1.8388c.694 0 1.2086-.0397 1.5678-.1088v-2.2934a5.3639 5.3639 0 00-1.3303-.1679 4.8283 4.8283 0 00-.758.0582 2.2845 2.2845 0 00-.688.2024c-.2029.0979-.371.2362-.4919.4142-.1268.1788-.185.2826-.185.5533 0 .5297.185.8359.5205 1.0375.3355.2016.7928.3053 1.365.3053v-.0008zm-.1969-8.1817c.7463 0 1.3768.092 1.8856.2767.5088.1838.9195.4428 1.2204.7717.3068.334.5147.7777.6423 1.251.1327.4723.196.991.196 1.5603v5.798c-.5235.1036-1.05.192-1.5787.2649-.7048.1037-1.4976.156-2.3774.156-.5832 0-1.1215-.0582-1.6016-.167a3.385 3.385 0 01-1.2432-.5364 2.6034 2.6034 0 01-.8037-.9565c-.191-.3922-.29-.9447-.29-1.5208 0-.5533.11-.905.3246-1.2863a2.7351 2.7351 0 01.8849-.9329c.376-.242.8029-.415 1.2948-.5187a7.4517 7.4517 0 011.5381-.156 7.1162 7.1162 0 011.6667.2024V8.886c0-.259-.0296-.5061-.093-.7372a1.5847 1.5847 0 00-.3245-.6158 1.5079 1.5079 0 00-.6119-.4158 2.6788 2.6788 0 00-.966-.173c-.5206 0-.9948.0634-1.4283.1384a6.5481 6.5481 0 00-1.065.259l-.2712-1.849c.2831-.0986.7048-.1964 1.2491-.2943a9.2979 9.2979 0 011.752-.1501v.0008zm44.6597 8.1193c.6947 0 1.2086-.0405 1.567-.1097v-2.2942a5.3743 5.3743 0 00-1.3303-.1679c-.2485 0-.503.0177-.7573.0582a2.2853 2.2853 0 00-.688.2024 1.2333 1.2333 0 00-.4918.4142c-.1268.1788-.1843.2826-.1843.5533 0 .5297.1843.8359.5198 1.0375.3414.2066.7927.3053 1.365.3053v.0009zm-.191-8.1767c.7463 0 1.3768.0912 1.8856.2759.5087.1847.9195.4436 1.2204.7717.3.329.5147.7786.6414 1.251a5.7248 5.7248 0 01.197 1.562v5.7972c-.3466.0742-.874.1602-1.5788.2648-.7049.1038-1.4976.1552-2.3774.1552-.5832 0-1.1215-.0573-1.6016-.167a3.385 3.385 0 01-1.2432-.5356 2.6034 2.6034 0 01-.8038-.9565c-.191-.3922-.2898-.9447-.2898-1.5216 0-.5533.1098-.905.3245-1.2854a2.7373 2.7373 0 01.8849-.9338c.376-.2412.8029-.4141 1.2947-.5178a7.4545 7.4545 0 012.325-.1097c.2781.0287.5672.081.879.156v-.3686a2.7781 2.7781 0 00-.092-.738 1.5788 1.5788 0 00-.3246-.6166 1.5079 1.5079 0 00-.612-.415 2.6797 2.6797 0 00-.966-.1729c-.5205 0-.9947.0633-1.4282.1384a6.5608 6.5608 0 00-1.065.259l-.2712-1.8498c.283-.0979.7048-.1957 1.2491-.2935a9.8597 9.8597 0 011.752-.1494zm-6.79-1.072c-.7576.001-1.373-.6103-1.3759-1.3664 0-.755.6128-1.3664 1.376-1.3664.764 0 1.3775.6115 1.3775 1.3664s-.6195 1.3664-1.3776 1.3664zm1.1393 11.1507h-2.2726V5.3409l2.2734-.3568v10.0845l-.0008.0017zm-3.984 0c-3.707.0168-3.707-2.986-3.707-3.4642L59.7069.3576 61.9685 0v11.1794c0 .2715 0 1.9889 1.452 1.994V15.0703zm-7.3512-4.979c0-.975-.2138-1.7873-.6305-2.3516-.4167-.571-.9998-.852-1.747-.852-.7454 0-1.3302.281-1.7452.852-.4166.5702-.6195 1.3765-.6195 2.3516 0 .9851.208 1.6473.6254 2.2183.4158.576.9998.8587 1.7461.8587.7454 0 1.3303-.2885 1.747-.8595.4158-.5761.6237-1.2315.6237-2.2184v.0009zm2.3132-.006c0 .7609-.1099 1.3361-.3356 1.9654a4.654 4.654 0 01-.9533 1.6076A4.214 4.214 0 0155.613 14.69c-.579.2412-1.4697.3795-1.9143.3795-.4462-.005-1.3303-.1324-1.9033-.3795a4.307 4.307 0 01-1.474-1.0316c-.4115-.4445-.7293-.9801-.9609-1.6076a5.3423 5.3423 0 01-.3465-1.9653c0-.7608.104-1.493.3356-2.1155a4.683 4.683 0 01.9719-1.5958 4.3383 4.3383 0 011.479-1.0257c.5739-.242 1.2043-.3567 1.8864-.3567.6829 0 1.3125.1197 1.8906.3567a4.1245 4.1245 0 011.4816 1.0257 4.7587 4.7587 0 01.9592 1.5958c.2426.6225.3643 1.3547.3643 2.1155zm-17.0198 0c0 .9448.208 1.9932.6238 2.431.4166.4386.955.6579 1.6142.6579.3584 0 .6998-.0523 1.0176-.1502.3186-.0978.5721-.2134.775-.3517V7.0784a8.8706 8.8706 0 00-1.4926-.1906c-.8206-.0236-1.4452.312-1.8847.8468-.4335.5365-.6533 1.476-.6533 2.3516v-.0008zm6.2863 4.4485c0 1.5385-.3938 2.662-1.1866 3.3773-.791.7136-2.0005 1.0712-3.6308 1.0712-.5958 0-1.834-.1156-2.8228-.334l.3643-1.7865c.8282.173 1.9202.2193 2.4932.2193.9077 0 1.555-.1847 1.943-.5533.388-.3686.578-.916.578-1.643v-.3687a6.8289 6.8289 0 01-.8848.3349c-.3634.1096-.786.167-1.261.167-.6246 0-1.1917-.0979-1.7055-.2944a3.5554 3.5554 0 01-1.3244-.8645c-.3642-.3796-.6541-.8579-.8561-1.4289-.2028-.571-.3068-1.59-.3068-2.339 0-.7034.1099-1.5856.3245-2.1735.2198-.5871.5316-1.0949.9542-1.515.4167-.42.9255-.743 1.5213-.98a5.5923 5.5923 0 012.052-.3855c.7353 0 1.4114.092 2.0707.2024.6592.1088 1.2204.2236 1.6776.35v8.945-.0008zM11.5026 4.2418v-.6511c-.0005-.4553-.3704-.8241-.8266-.8241H8.749c-.4561 0-.826.3688-.8265.824v.669c0 .0742.0693.1264.1445.1096a6.0346 6.0346 0 011.6768-.2362 6.125 6.125 0 011.6202.2185.1116.1116 0 00.1386-.1097zm-5.2806.852l-.3296-.3282a.8266.8266 0 00-1.168 0l-.393.3922a.8199.8199 0 000 1.164l.3237.323c.0524.0515.1268.0397.1733-.0117.191-.259.3989-.507.6305-.7372.2374-.2362.48-.4437.7462-.6335.0575-.0354.0634-.1155.017-.1687zm3.5159 2.069v2.818c0 .081.0879.1392.1622.0987l2.5102-1.2964c.0574-.0287.0752-.0987.0464-.1552a3.1237 3.1237 0 00-2.603-1.574c-.0575 0-.115.0456-.115.1097l-.0008-.0009zm.0008 6.789c-2.0933.0005-3.7915-1.6912-3.7947-3.7804C5.9468 8.0821 7.6452 6.39 9.7387 6.391c2.0932-.0005 3.7911 1.6914 3.794 3.7804a3.7783 3.7783 0 01-1.1124 2.675 3.7936 3.7936 0 01-2.6824 1.1054h.0008zM9.738 4.8002c-1.9218 0-3.6975 1.0232-4.6584 2.6841a5.359 5.359 0 000 5.3683c.9609 1.661 2.7366 2.6841 4.6584 2.6841a5.3891 5.3891 0 003.8073-1.5725 5.3675 5.3675 0 001.578-3.7987 5.3574 5.3574 0 00-1.5771-3.797A5.379 5.379 0 009.7387 4.801l-.0008-.0008z", fill: colors_1.CURRENT_COLOR, fillRule: "evenodd" }) }) }));
10
11
  };
11
12
  exports.AlgoliaCredit = AlgoliaCredit;
@@ -45,7 +45,7 @@ const modeInactive = {
45
45
  };
46
46
  const modeActive = {
47
47
  ...modeItem,
48
- color: 'white',
48
+ color: colors_1.WHITE,
49
49
  fontWeight: 'bold',
50
50
  };
51
51
  const content = {
@@ -87,12 +87,12 @@ const QuickSwitcherResult = ({ result, selected }) => {
87
87
  color: result.type === 'search-result'
88
88
  ? colors_1.LIGHT_TEXT
89
89
  : selected || hovered
90
- ? 'white'
90
+ ? colors_1.WHITE
91
91
  : colors_1.LIGHT_TEXT,
92
92
  fontSize: shared_1.QUICK_SWITCHER_RESULT_LABEL_FONT_SIZE,
93
93
  };
94
94
  }, [hovered, result.type, selected]);
95
- return (jsx_runtime_1.jsxs("div", { ref: ref, style: style, onClick: result.onSelected, children: [result.type === 'composition' ? (result.compositionType === 'still' ? (jsx_runtime_1.jsx(still_1.StillIcon, { color: selected ? 'white' : colors_1.LIGHT_TEXT, style: iconStyle })) : (jsx_runtime_1.jsx(video_1.FilmIcon, { color: selected ? 'white' : colors_1.LIGHT_TEXT, style: iconStyle }))) : null, jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelContainer, children: result.type === 'search-result' ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
95
+ return (jsx_runtime_1.jsxs("div", { ref: ref, style: style, onClick: result.onSelected, children: [result.type === 'composition' ? (result.compositionType === 'still' ? (jsx_runtime_1.jsx(still_1.StillIcon, { color: selected ? colors_1.WHITE : colors_1.LIGHT_TEXT, style: iconStyle })) : (jsx_runtime_1.jsx(video_1.FilmIcon, { color: selected ? colors_1.WHITE : colors_1.LIGHT_TEXT, style: iconStyle }))) : null, jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelContainer, children: result.type === 'search-result' ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
96
96
  jsx_runtime_1.jsx("div", {
97
97
  // eslint-disable-next-line react/no-danger
98
98
  dangerouslySetInnerHTML: {
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RefreshCompositionOverlay = exports.container = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const remotion_1 = require("remotion");
6
+ const colors_1 = require("../helpers/colors");
6
7
  const RunningCalculateMetadata_1 = require("./RunningCalculateMetadata");
7
8
  exports.container = {
8
9
  justifyContent: 'flex-end',
@@ -11,7 +12,7 @@ exports.container = {
11
12
  pointerEvents: 'none',
12
13
  };
13
14
  const shadow = {
14
- boxShadow: '0 0 4px black',
15
+ boxShadow: colors_1.SHADOW_BLACK,
15
16
  };
16
17
  const RefreshCompositionOverlay = () => {
17
18
  return (jsx_runtime_1.jsx(remotion_1.AbsoluteFill, { style: exports.container, children: jsx_runtime_1.jsx("div", { style: shadow, children: jsx_runtime_1.jsx(RunningCalculateMetadata_1.RunningCalculateMetadata, {}) }) }));
@@ -28,7 +28,7 @@ const splitButtonContainer = {
28
28
  flexDirection: 'row',
29
29
  alignItems: 'stretch',
30
30
  borderRadius: 4,
31
- border: `1px solid ${colors_1.INPUT_BORDER_COLOR_UNHOVERED}`,
31
+ border: `1px solid ${colors_1.BLACK_ALPHA_60}`,
32
32
  backgroundColor: colors_1.INPUT_BACKGROUND,
33
33
  overflow: 'hidden',
34
34
  };
@@ -37,9 +37,9 @@ const mainButtonStyle = {
37
37
  paddingRight: 7,
38
38
  paddingTop: 7,
39
39
  paddingBottom: 7,
40
- background: 'transparent',
40
+ background: colors_1.TRANSPARENT,
41
41
  border: 'none',
42
- color: 'white',
42
+ color: colors_1.WHITE,
43
43
  cursor: 'pointer',
44
44
  display: 'flex',
45
45
  alignItems: 'center',
@@ -48,7 +48,7 @@ const mainButtonStyle = {
48
48
  };
49
49
  const dividerStyle = {
50
50
  width: 1,
51
- backgroundColor: colors_1.INPUT_BORDER_COLOR_UNHOVERED,
51
+ backgroundColor: colors_1.BLACK_ALPHA_60,
52
52
  alignSelf: 'stretch',
53
53
  };
54
54
  const dropdownTriggerStyle = {
@@ -56,9 +56,9 @@ const dropdownTriggerStyle = {
56
56
  paddingRight: 6,
57
57
  paddingTop: 7,
58
58
  paddingBottom: 7,
59
- background: 'transparent',
59
+ background: colors_1.TRANSPARENT,
60
60
  border: 'none',
61
- color: 'white',
61
+ color: colors_1.WHITE,
62
62
  cursor: 'pointer',
63
63
  display: 'flex',
64
64
  alignItems: 'center',
@@ -167,7 +167,7 @@ const RenderButton = ({ readOnlyStudio, }) => {
167
167
  return {
168
168
  style: {
169
169
  height: 16,
170
- color: 'currentColor',
170
+ color: colors_1.CURRENT_COLOR,
171
171
  },
172
172
  };
173
173
  }, []);
@@ -397,7 +397,7 @@ const RenderButton = ({ readOnlyStudio, }) => {
397
397
  const containerStyle = (0, react_1.useMemo)(() => {
398
398
  return {
399
399
  ...splitButtonContainer,
400
- borderColor: colors_1.INPUT_BORDER_COLOR_UNHOVERED,
400
+ borderColor: colors_1.BLACK_ALPHA_60,
401
401
  opacity: canRender ? 1 : 0.7,
402
402
  cursor: canRender ? 'pointer' : 'inherit',
403
403
  };
@@ -422,7 +422,7 @@ const RenderButton = ({ readOnlyStudio, }) => {
422
422
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
423
423
  jsx_runtime_1.jsx("button", { style: { display: 'none' }, id: "render-modal-button-server", disabled: !canServerRender, onClick: () => openServerRenderModal(false), type: "button" }), ' ', jsx_runtime_1.jsx("button", { style: { display: 'none' }, id: "render-modal-button-client", onClick: openClientRenderModal, type: "button" }), jsx_runtime_1.jsxs("div", { ref: containerRef, style: containerStyle, title: tooltip, children: [
424
424
  jsx_runtime_1.jsx("button", { type: "button", style: mainButtonStyle, onClick: onClick, id: "render-modal-button", disabled: !canRender, children: jsx_runtime_1.jsxs(layout_1.Row, { align: "center", style: mainButtonContent, children: [
425
- jsx_runtime_1.jsx(render_1.ThinRenderIcon, { fill: "currentcolor", svgProps: iconStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("span", { style: label, children: renderLabel })
425
+ jsx_runtime_1.jsx(render_1.ThinRenderIcon, { fill: colors_1.CURRENT_COLOR_LOWERCASE, svgProps: iconStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("span", { style: label, children: renderLabel })
426
426
  ] }) }), shouldShowDropdown ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
427
427
  jsx_runtime_1.jsx("div", { style: dividerStyle }), jsx_runtime_1.jsx("button", { ref: dropdownRef, type: "button", style: dropdownTriggerStyle, disabled: !readOnlyStudio && connectionStatus !== 'connected', className: is_menu_item_1.MENU_INITIATOR_CLASSNAME, onPointerDown: onPointerDown, onClick: onClickDropdown, children: jsx_runtime_1.jsx(caret_1.CaretDown, {}) })
428
428
  ] })) : null] }), portalStyle
@@ -31,7 +31,7 @@ const CliCopyButton = ({ valueToCopy, }) => {
31
31
  const [copied, setCopied] = (0, react_1.useState)(false);
32
32
  const [hovered, setHovered] = (0, react_1.useState)(false);
33
33
  const fillColor = (0, react_1.useMemo)(() => {
34
- return hovered ? 'white' : colors_1.LIGHT_TEXT;
34
+ return hovered ? colors_1.WHITE : colors_1.LIGHT_TEXT;
35
35
  }, [hovered]);
36
36
  const clipboardIcon = jsx_runtime_1.jsx(clipboard_1.ClipboardIcon, { color: fillColor, style: svgStyle });
37
37
  const checkSvg = (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", style: svgStyle, children: jsx_runtime_1.jsx("path", { fill: fillColor, d: "M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z" }) }));
@@ -17,7 +17,7 @@ const progressItem = {
17
17
  const label = {
18
18
  fontSize: 14,
19
19
  width: 400,
20
- color: 'white',
20
+ color: colors_1.WHITE,
21
21
  };
22
22
  const right = {
23
23
  fontSize: 14,
@@ -82,7 +82,7 @@ const controlContainer = {
82
82
  flexDirection: 'column',
83
83
  display: 'flex',
84
84
  padding: 12,
85
- borderBottom: `1px solid ${colors_1.BORDER_COLOR}`,
85
+ borderBottom: `1px solid ${colors_1.BLACK_HEX}`,
86
86
  };
87
87
  const inspectorControlContainer = {
88
88
  ...controlContainer,
@@ -18,7 +18,7 @@ const progressItem = {
18
18
  const label = {
19
19
  fontSize: 14,
20
20
  width: 400,
21
- color: 'white',
21
+ color: colors_1.WHITE,
22
22
  };
23
23
  const right = {
24
24
  fontSize: 14,
@@ -103,7 +103,7 @@ const InfoBubble = ({ title, children }) => {
103
103
  ...container,
104
104
  userSelect: 'none',
105
105
  WebkitUserSelect: 'none',
106
- color: 'white',
106
+ color: colors_1.WHITE,
107
107
  display: 'inline-flex',
108
108
  flexDirection: 'row',
109
109
  alignItems: 'center',
@@ -111,7 +111,7 @@ const InfoBubble = ({ title, children }) => {
111
111
  };
112
112
  }, []);
113
113
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
114
- jsx_runtime_1.jsx("button", { ref: ref, tabIndex: tabIndex, style: style, title: title, type: "button", children: jsx_runtime_1.jsx("svg", { style: icon, viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: hovered ? 'white' : colors_1.LIGHT_TEXT, d: "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336c-13.3 0-24 10.7-24 24s10.7 24 24 24h80c13.3 0 24-10.7 24-24s-10.7-24-24-24h-8V248c0-13.3-10.7-24-24-24H216c-13.3 0-24 10.7-24 24s10.7 24 24 24h24v64H216zm40-144a32 32 0 1 0 0-64 32 32 0 1 0 0 64z" }) }) }), portalStyle
114
+ jsx_runtime_1.jsx("button", { ref: ref, tabIndex: tabIndex, style: style, title: title, type: "button", children: jsx_runtime_1.jsx("svg", { style: icon, viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: hovered ? colors_1.WHITE : colors_1.LIGHT_TEXT, d: "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336c-13.3 0-24 10.7-24 24s10.7 24 24 24h80c13.3 0 24-10.7 24-24s-10.7-24-24-24h-8V248c0-13.3-10.7-24-24-24H216c-13.3 0-24 10.7-24 24s10.7 24 24 24h24v64H216zm40-144a32 32 0 1 0 0-64 32 32 0 1 0 0 64z" }) }) }), portalStyle
115
115
  ? react_dom_1.default.createPortal(jsx_runtime_1.jsx("div", { style: styles_1.outerPortal, className: "css-reset", children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onOutsideClick: onHide, onEscape: onHide, children: jsx_runtime_1.jsx("div", { style: portalStyle, children: jsx_runtime_1.jsx(InfoTooltip_1.InfoTooltip, { backgroundColor: colors_1.INPUT_BACKGROUND, arrowDirection: layout, children: children }) }) }) }), (0, portals_1.getPortal)(currentZIndex))
116
116
  : null] }));
117
117
  };