@remotion/studio 4.0.502 → 4.0.504

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/dist/api/install-package.d.ts +2 -1
  2. package/dist/api/install-package.js +6 -2
  3. package/dist/components/AssetSelectorItem.js +4 -16
  4. package/dist/components/Canvas.js +41 -54
  5. package/dist/components/CheckboardToggle.js +3 -1
  6. package/dist/components/ColorPicker/AlphaSlider.js +14 -10
  7. package/dist/components/ColorPicker/HueSlider.js +14 -10
  8. package/dist/components/ColorPicker/SaturationValueArea.js +14 -12
  9. package/dist/components/CompositionContextButton.js +1 -1
  10. package/dist/components/CompositionSelectorItem.js +2 -3
  11. package/dist/components/ConfigureDefaultEditorModal.d.ts +2 -0
  12. package/dist/components/ConfigureDefaultEditorModal.js +151 -0
  13. package/dist/components/ConfirmationDialog.js +6 -3
  14. package/dist/components/ContextMenu.js +0 -2
  15. package/dist/components/ControlButton.d.ts +4 -2
  16. package/dist/components/ControlButton.js +6 -20
  17. package/dist/components/Editor.js +1 -4
  18. package/dist/components/EditorContent.js +1 -1
  19. package/dist/components/EditorGuides/Guide.js +48 -74
  20. package/dist/components/EditorRuler/Ruler.d.ts +1 -0
  21. package/dist/components/EditorRuler/Ruler.js +3 -1
  22. package/dist/components/EditorRuler/index.js +26 -23
  23. package/dist/components/EffectPickerModal.js +68 -7
  24. package/dist/components/ElementInstallConfirmation.d.ts +12 -0
  25. package/dist/components/ElementInstallConfirmation.js +205 -0
  26. package/dist/components/ForceSpecificCursor.js +14 -0
  27. package/dist/components/FullscreenToggle.js +1 -2
  28. package/dist/components/InitialCompositionLoader.js +1 -14
  29. package/dist/components/InlineAction.d.ts +4 -4
  30. package/dist/components/InlineAction.js +6 -4
  31. package/dist/components/InspectorLocationCopy.d.ts +1 -0
  32. package/dist/components/InspectorLocationCopy.js +7 -3
  33. package/dist/components/InspectorOpenInEditor.d.ts +5 -0
  34. package/dist/components/InspectorOpenInEditor.js +135 -0
  35. package/dist/components/InspectorPanel/AlignmentControls.js +1 -1
  36. package/dist/components/InspectorPanel/CompositionInspectorHeader.js +3 -3
  37. package/dist/components/InspectorPanel/CompositionMetadata.js +8 -7
  38. package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +2 -2
  39. package/dist/components/InspectorPanel/KeyframeInspector.js +2 -3
  40. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +2 -2
  41. package/dist/components/InspectorPanel/styles.js +4 -0
  42. package/dist/components/InspectorSequenceSection.js +2 -2
  43. package/dist/components/LoopToggle.js +1 -1
  44. package/dist/components/Menu/MenuItem.js +13 -6
  45. package/dist/components/Menu/MenuSubItem.js +3 -1
  46. package/dist/components/MenuBuildIndicator.d.ts +3 -1
  47. package/dist/components/MenuBuildIndicator.js +6 -4
  48. package/dist/components/MenuCompositionName.js +1 -1
  49. package/dist/components/MenuToolbar.js +1 -1
  50. package/dist/components/MobilePanel.d.ts +1 -2
  51. package/dist/components/MobilePanel.js +6 -6
  52. package/dist/components/ModalContainer.js +1 -1
  53. package/dist/components/ModalFooter.d.ts +1 -0
  54. package/dist/components/ModalFooter.js +2 -2
  55. package/dist/components/Modals.js +11 -2
  56. package/dist/components/MuteToggle.js +2 -1
  57. package/dist/components/NewComposition/ComboBox.d.ts +1 -0
  58. package/dist/components/NewComposition/ComboBox.js +2 -2
  59. package/dist/components/NewComposition/InputDragger.d.ts +4 -0
  60. package/dist/components/NewComposition/InputDragger.js +26 -32
  61. package/dist/components/Notifications/NotificationCenter.js +12 -2
  62. package/dist/components/OutlineToggle.js +10 -2
  63. package/dist/components/PlayPause.js +1 -5
  64. package/dist/components/PlaybackRateSelector.js +2 -1
  65. package/dist/components/PreviewToolbar.js +8 -7
  66. package/dist/components/PreviewToolbarOverflowButton.d.ts +0 -1
  67. package/dist/components/PreviewToolbarOverflowButton.js +2 -75
  68. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -2
  69. package/dist/components/RenderButton.d.ts +0 -1
  70. package/dist/components/RenderButton.js +10 -9
  71. package/dist/components/RenderModal/FrameRangeSetting.js +6 -1
  72. package/dist/components/RenderModal/InlineEyeIcon.js +1 -1
  73. package/dist/components/RenderModal/InlineRemoveButton.js +1 -1
  74. package/dist/components/RenderModal/MultiRangeSlider.js +8 -8
  75. package/dist/components/RenderModal/RenderModalEnvironmentVariables.js +1 -9
  76. package/dist/components/RenderModal/RenderModalOutputName.js +12 -3
  77. package/dist/components/RenderModal/SchemaEditor/SchemaResetButton.js +1 -1
  78. package/dist/components/RenderModal/ServerRenderModal.js +2 -17
  79. package/dist/components/RenderModal/WebRenderModal.js +3 -17
  80. package/dist/components/RenderModal/layout.js +7 -5
  81. package/dist/components/RenderModal/render-modals.js +18 -15
  82. package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +1 -1
  83. package/dist/components/RenderQueue/RenderQueueDownloadItem.js +1 -1
  84. package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +1 -1
  85. package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +1 -1
  86. package/dist/components/RenderQueue/RenderQueueRemoveItem.js +1 -1
  87. package/dist/components/RenderQueue/RenderQueueRepeat.js +2 -15
  88. package/dist/components/SelectedOutlineCropControls.js +7 -6
  89. package/dist/components/SelectedOutlineElement.js +32 -38
  90. package/dist/components/SelectedOutlineUvControls.js +25 -24
  91. package/dist/components/ShowGuidesProvider.js +2 -0
  92. package/dist/components/SidebarCollapserControls.js +2 -2
  93. package/dist/components/SidebarRenderButton.js +2 -16
  94. package/dist/components/SizeSelector.js +2 -1
  95. package/dist/components/SnappingToggle.js +1 -2
  96. package/dist/components/Spinner.d.ts +1 -0
  97. package/dist/components/Spinner.js +2 -2
  98. package/dist/components/Splitter/SplitterContainer.d.ts +1 -0
  99. package/dist/components/Splitter/SplitterContainer.js +4 -1
  100. package/dist/components/Splitter/SplitterContext.d.ts +4 -3
  101. package/dist/components/Splitter/SplitterContext.js +3 -2
  102. package/dist/components/Splitter/SplitterElement.js +6 -1
  103. package/dist/components/Splitter/SplitterHandle.js +18 -68
  104. package/dist/components/Tabs/vertical.d.ts +1 -0
  105. package/dist/components/Tabs/vertical.js +8 -10
  106. package/dist/components/TimeValue.js +26 -8
  107. package/dist/components/Timeline/EasingEditorModal.js +27 -19
  108. package/dist/components/Timeline/Timeline.js +1 -1
  109. package/dist/components/Timeline/TimelineAssetField.js +1 -1
  110. package/dist/components/Timeline/TimelineClipboardKeybindings.js +3 -6
  111. package/dist/components/Timeline/TimelineDeleteKeybindings.js +5 -7
  112. package/dist/components/Timeline/TimelineDragHandler.js +38 -7
  113. package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +2 -1
  114. package/dist/components/Timeline/TimelineInOutDragHandler.js +26 -11
  115. package/dist/components/Timeline/TimelineKeyframeEasingLine.d.ts +1 -1
  116. package/dist/components/Timeline/TimelineKeyframeEasingLine.js +2 -2
  117. package/dist/components/Timeline/TimelineLayerEye.js +36 -4
  118. package/dist/components/Timeline/TimelineSelection.js +16 -24
  119. package/dist/components/Timeline/TimelineSequence.js +7 -3
  120. package/dist/components/Timeline/TimelineSequenceItem.js +24 -18
  121. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +1 -1
  122. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +76 -43
  123. package/dist/components/Timeline/TimelineStack/get-stack.js +7 -2
  124. package/dist/components/Timeline/TimelineZoomControls.d.ts +3 -1
  125. package/dist/components/Timeline/TimelineZoomControls.js +24 -12
  126. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +4 -2
  127. package/dist/components/Timeline/get-sequence-context-menu-items.js +38 -2
  128. package/dist/components/Timeline/should-subscribe-to-source-file.d.ts +1 -0
  129. package/dist/components/Timeline/should-subscribe-to-source-file.js +11 -0
  130. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +2 -3
  131. package/dist/components/Timeline/use-open-sequence-in-editor.d.ts +3 -1
  132. package/dist/components/Timeline/use-open-sequence-in-editor.js +5 -2
  133. package/dist/components/Timeline/use-sequence-props-subscription.js +2 -0
  134. package/dist/components/Timeline/use-timeline-asset-drop.js +3 -7
  135. package/dist/components/Timeline/use-timeline-keyframe-drag.js +31 -16
  136. package/dist/components/TimelineInOutToggle.js +3 -3
  137. package/dist/components/TopPanel.js +3 -2
  138. package/dist/components/UndoRedoButtons.js +6 -5
  139. package/dist/components/UpdateCheck.d.ts +2 -0
  140. package/dist/components/UpdateCheck.js +29 -11
  141. package/dist/components/UpdateModal/UpdateModal.js +58 -19
  142. package/dist/components/VisualControls/ClickableFileName.js +5 -2
  143. package/dist/components/composition-menu-items.d.ts +2 -4
  144. package/dist/components/composition-menu-items.js +32 -55
  145. package/dist/components/element-install-request.d.ts +3 -0
  146. package/dist/components/element-install-request.js +17 -0
  147. package/dist/components/folder-menu-items.js +1 -1
  148. package/dist/components/handle-drop.d.ts +2 -3
  149. package/dist/components/handle-drop.js +11 -4
  150. package/dist/components/import-assets.d.ts +7 -6
  151. package/dist/components/import-assets.js +5 -16
  152. package/dist/components/use-default-editor-info.d.ts +4 -0
  153. package/dist/components/use-default-editor-info.js +47 -0
  154. package/dist/error-overlay/remotion-overlay/OpenInEditor.js +1 -1
  155. package/dist/error-overlay/remotion-overlay/StackFrame.js +1 -1
  156. package/dist/esm/{chunk-fjv75ty4.js → chunk-43m68z1k.js} +8689 -7374
  157. package/dist/esm/internals.mjs +8689 -7374
  158. package/dist/esm/previewEntry.mjs +8668 -7353
  159. package/dist/esm/renderEntry.mjs +1 -1
  160. package/dist/helpers/inject-css.js +58 -67
  161. package/dist/helpers/install-required-package.d.ts +3 -2
  162. package/dist/helpers/install-required-package.js +20 -15
  163. package/dist/helpers/open-in-editor.d.ts +3 -3
  164. package/dist/helpers/open-in-editor.js +10 -6
  165. package/dist/helpers/pointer-session.d.ts +9 -0
  166. package/dist/helpers/pointer-session.js +94 -0
  167. package/dist/helpers/use-menu-structure.js +109 -51
  168. package/dist/icons/audio.d.ts +1 -1
  169. package/dist/icons/audio.js +1 -1
  170. package/dist/icons/caret.js +1 -1
  171. package/dist/icons/certificate.d.ts +1 -1
  172. package/dist/icons/certificate.js +1 -1
  173. package/dist/icons/custom-editor.d.ts +4 -0
  174. package/dist/icons/custom-editor.js +11 -0
  175. package/dist/icons/data.d.ts +1 -1
  176. package/dist/icons/data.js +2 -2
  177. package/dist/icons/editor.d.ts +6 -0
  178. package/dist/icons/editor.js +52 -0
  179. package/dist/icons/effects.d.ts +5 -0
  180. package/dist/icons/effects.js +8 -0
  181. package/dist/icons/ellipsis.js +1 -1
  182. package/dist/icons/external-link.d.ts +5 -0
  183. package/dist/icons/external-link.js +10 -0
  184. package/dist/icons/fullscreen.js +1 -1
  185. package/dist/icons/gear.d.ts +1 -1
  186. package/dist/icons/gear.js +1 -1
  187. package/dist/icons/gif.d.ts +1 -1
  188. package/dist/icons/gif.js +1 -1
  189. package/dist/icons/input-props.d.ts +2 -0
  190. package/dist/icons/input-props.js +9 -0
  191. package/dist/icons/jump-to-start.js +2 -2
  192. package/dist/icons/magnet.d.ts +3 -1
  193. package/dist/icons/magnet.js +2 -2
  194. package/dist/icons/media-volume.d.ts +6 -2
  195. package/dist/icons/media-volume.js +8 -6
  196. package/dist/icons/minus.d.ts +3 -1
  197. package/dist/icons/minus.js +2 -2
  198. package/dist/icons/pause.js +1 -1
  199. package/dist/icons/play.js +1 -1
  200. package/dist/icons/plus.js +1 -1
  201. package/dist/icons/redo.js +2 -2
  202. package/dist/icons/step-back.js +2 -2
  203. package/dist/icons/step-forward.js +2 -2
  204. package/dist/icons/timelineInOutPointer.js +2 -2
  205. package/dist/icons/undo.js +2 -2
  206. package/dist/state/editor-guides.d.ts +1 -0
  207. package/dist/state/editor-guides.js +1 -0
  208. package/dist/state/modals.d.ts +2 -0
  209. package/dist/state/z-index.d.ts +1 -0
  210. package/dist/state/z-index.js +34 -18
  211. package/package.json +12 -13
  212. package/dist/components/StudioCanvasCapture.d.ts +0 -5
  213. package/dist/components/StudioCanvasCapture.js +0 -40
  214. package/dist/components/canvas-capture-enabled.d.ts +0 -1
  215. package/dist/components/canvas-capture-enabled.js +0 -4
  216. package/dist/components/use-element-overwrite-confirmation.d.ts +0 -2
  217. package/dist/components/use-element-overwrite-confirmation.js +0 -73
@@ -1,27 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ControlButton = exports.CONTROL_BUTTON_SIZE = exports.CONTROL_BUTTON_PADDING = void 0;
3
+ exports.ControlButton = exports.CONTROL_BUTTON_PADDING = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const z_index_1 = require("../state/z-index");
5
+ const colors_1 = require("../helpers/colors");
6
+ const InlineAction_1 = require("./InlineAction");
7
7
  exports.CONTROL_BUTTON_PADDING = 6;
8
- exports.CONTROL_BUTTON_SIZE = 30;
9
8
  const ControlButton = (props) => {
10
- const style = (0, react_1.useMemo)(() => {
11
- return {
12
- opacity: props.disabled ? 0.5 : 1,
13
- display: 'inline-flex',
14
- alignItems: 'center',
15
- justifyContent: 'center',
16
- width: exports.CONTROL_BUTTON_SIZE,
17
- height: exports.CONTROL_BUTTON_SIZE,
18
- flexShrink: 0,
19
- background: 'none',
20
- border: 'none',
21
- padding: 0,
22
- };
23
- }, [props.disabled]);
24
- const { tabIndex } = (0, z_index_1.useZIndex)();
25
- return (jsx_runtime_1.jsx("button", { type: 'button', tabIndex: tabIndex, ...props, style: style }));
9
+ const { children, onClick, title, ...buttonProps } = props;
10
+ const renderAction = typeof children === 'function' ? children : () => children;
11
+ return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { ...buttonProps, title: title, onClick: onClick, renderAction: renderAction, variant: null, unhoveredColor: colors_1.WHITE_ALPHA_80 }));
26
12
  };
27
13
  exports.ControlButton = ControlButton;
@@ -46,14 +46,12 @@ const canvas_ref_1 = require("../state/canvas-ref");
46
46
  const scale_lock_1 = require("../state/scale-lock");
47
47
  const timeline_zoom_1 = require("../state/timeline-zoom");
48
48
  const z_index_1 = require("../state/z-index");
49
- const canvas_capture_enabled_1 = require("./canvas-capture-enabled");
50
49
  const EditorContent_1 = require("./EditorContent");
51
50
  const ForceSpecificCursor_1 = require("./ForceSpecificCursor");
52
51
  const Modals_1 = require("./Modals");
53
52
  const NotificationCenter_1 = require("./Notifications/NotificationCenter");
54
53
  const RenderErrorContext_1 = require("./RenderErrorContext");
55
54
  const SequencePropsSubscriptionProvider_1 = require("./SequencePropsSubscriptionProvider");
56
- const StudioCanvasCapture_1 = require("./StudioCanvasCapture");
57
55
  const TopPanel_1 = require("./TopPanel");
58
56
  const background = {
59
57
  backgroundColor: colors_1.BACKGROUND,
@@ -94,13 +92,12 @@ const Editor = ({ Root, readOnlyStudio }) => {
94
92
  }, []);
95
93
  const compositionRenderErrorContextValue = (0, react_1.useMemo)(() => ({ setError: setRenderError, clearError }), [clearError]);
96
94
  const renderErrorContextValue = (0, react_1.useMemo)(() => ({ error: renderError }), [renderError]);
97
- const editor = (jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onEscape: noop_1.noop, onOutsideClick: noop_1.noop, children: jsx_runtime_1.jsx(timeline_zoom_1.TimelineZoomContext, { children: jsx_runtime_1.jsxs(SequencePropsSubscriptionProvider_1.SequencePropsSubscriptionProvider, { children: [
95
+ return (jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onEscape: noop_1.noop, onOutsideClick: noop_1.noop, children: jsx_runtime_1.jsx(timeline_zoom_1.TimelineZoomContext, { children: jsx_runtime_1.jsxs(SequencePropsSubscriptionProvider_1.SequencePropsSubscriptionProvider, { children: [
98
96
  jsx_runtime_1.jsxs(remotion_1.Internals.CurrentScaleContext.Provider, { value: value, children: [
99
97
  jsx_runtime_1.jsx(ForceSpecificCursor_1.ForceSpecificCursor, {}), jsx_runtime_1.jsx(scale_lock_1.ScaleLockProvider, { children: jsx_runtime_1.jsxs("div", { style: background, children: [
100
98
  jsx_runtime_1.jsx(remotion_1.Internals.CompositionRenderErrorContext.Provider, { value: compositionRenderErrorContextValue, children: canvasMounted ? jsx_runtime_1.jsx(MemoRoot, {}) : null }), jsx_runtime_1.jsx(remotion_1.Internals.CanUseRemotionHooksProvider, { children: jsx_runtime_1.jsx(RenderErrorContext_1.RenderErrorContext.Provider, { value: renderErrorContextValue, children: jsx_runtime_1.jsx(EditorContent_1.EditorContent, { readOnlyStudio: readOnlyStudio, children: jsx_runtime_1.jsx(TopPanel_1.TopPanel, { drawRef: setDrawRef, bufferStateDelayInMilliseconds: (0, studio_runtime_config_1.getStudioBufferStateDelayInMilliseconds)(), onMounted: onMounted, readOnlyStudio: readOnlyStudio }) }) }) })
101
99
  ] }) })
102
100
  ] }), jsx_runtime_1.jsx(Modals_1.Modals, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(NotificationCenter_1.NotificationCenter, {})
103
101
  ] }) }) }));
104
- return canvas_capture_enabled_1.CANVAS_CAPTURE_ENABLED ? (jsx_runtime_1.jsx(StudioCanvasCapture_1.StudioCanvasCapture, { density: 1.5, children: editor })) : (editor);
105
102
  };
106
103
  exports.Editor = Editor;
@@ -35,7 +35,7 @@ const StudioClearSelectionArea = ({ children }) => {
35
35
  const EditorContent = ({ readOnlyStudio, children }) => {
36
36
  const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
37
37
  const showTimeline = canvasContent !== null && canvasContent.type === 'composition';
38
- const content = (jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { orientation: "horizontal", id: "top-to-bottom", maxFlex: 0.9, minFlex: 0.2, defaultFlex: 0.75, maxFlexerSize: null, minFlexerSize: null, maxAntiFlexerSize: null, children: [
38
+ const content = (jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { orientation: "horizontal", id: "top-to-bottom", maxFlex: 0.9, minFlex: 0.2, defaultFlex: 0.75, maxFlexerSize: null, minFlexerSize: null, maxAntiFlexerSize: null, minAntiFlexerSize: null, children: [
39
39
  jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: children }), jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "none", onCollapse: noop }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: showTimeline ? jsx_runtime_1.jsx(Timeline_1.Timeline, {}) : jsx_runtime_1.jsx(TimelineEmptyState_1.TimelineEmptyState, {}) })
40
40
  ] }));
41
41
  return (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionProvider, { children: jsx_runtime_1.jsxs(StudioClearSelectionArea, { children: [
@@ -4,6 +4,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
4
4
  const react_1 = require("react");
5
5
  const no_react_1 = require("remotion/no-react");
6
6
  const editor_guide_selection_1 = require("../../helpers/editor-guide-selection");
7
+ const pointer_session_1 = require("../../helpers/pointer-session");
7
8
  const editor_guides_1 = require("../../state/editor-guides");
8
9
  const editor_rulers_1 = require("../../state/editor-rulers");
9
10
  const ContextMenu_1 = require("../ContextMenu");
@@ -12,7 +13,7 @@ const should_clear_selection_on_pointer_down_1 = require("../Timeline/should-cle
12
13
  const TimelineSelection_1 = require("../Timeline/TimelineSelection");
13
14
  const PADDING_FOR_EASY_DRAG = 4;
14
15
  const GuideComp = ({ guide, canvasDimensions, scale }) => {
15
- const { shouldCreateGuideRef, shouldDeleteGuideRef, setGuidesList, setDraggingGuideId, setHoveredGuideId, hoveredGuideId, draggingGuideId, } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
16
+ const { shouldCreateGuideRef, shouldDeleteGuideRef, setGuidesList, setDraggingGuideId, setHoveredGuideId, hoveredGuideId, draggingGuideId, moveGuidePointerRef, } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
16
17
  const { clearSelection, onSelect, selected } = (0, TimelineSelection_1.useTimelineGuideSelection)(guide.id);
17
18
  const pointerDownPositionRef = (0, react_1.useRef)(null);
18
19
  const hasMovedGuideRef = (0, react_1.useRef)(false);
@@ -61,36 +62,6 @@ const GuideComp = ({ guide, canvasDimensions, scale }) => {
61
62
  selected,
62
63
  draggingGuideId,
63
64
  ]);
64
- const onPointerDown = (0, react_1.useCallback)((e) => {
65
- if (e.button !== 0) {
66
- return;
67
- }
68
- e.stopPropagation();
69
- e.currentTarget.setPointerCapture(e.pointerId);
70
- hasMovedGuideRef.current = false;
71
- pointerDownPositionRef.current = {
72
- guideId: guide.id,
73
- clientX: e.clientX,
74
- clientY: e.clientY,
75
- };
76
- shouldCreateGuideRef.current = false;
77
- setDraggingGuideId(() => guide.id);
78
- }, [guide.id, setDraggingGuideId, shouldCreateGuideRef]);
79
- const onMouseDown = (0, react_1.useCallback)((e) => {
80
- if (e.button !== 0) {
81
- return;
82
- }
83
- e.preventDefault();
84
- e.stopPropagation();
85
- hasMovedGuideRef.current = false;
86
- pointerDownPositionRef.current = {
87
- guideId: guide.id,
88
- clientX: e.clientX,
89
- clientY: e.clientY,
90
- };
91
- shouldCreateGuideRef.current = false;
92
- setDraggingGuideId(() => guide.id);
93
- }, [guide.id, setDraggingGuideId, shouldCreateGuideRef]);
94
65
  const updateHasMovedGuide = (0, react_1.useCallback)((clientX, clientY) => {
95
66
  const pointerDownPosition = pointerDownPositionRef.current;
96
67
  if (pointerDownPosition === null) {
@@ -105,12 +76,6 @@ const GuideComp = ({ guide, canvasDimensions, scale }) => {
105
76
  hasMovedGuideRef.current = true;
106
77
  }
107
78
  }, [guide.id]);
108
- const onPointerMove = (0, react_1.useCallback)((e) => {
109
- updateHasMovedGuide(e.clientX, e.clientY);
110
- }, [updateHasMovedGuide]);
111
- const onMouseMove = (0, react_1.useCallback)((e) => {
112
- updateHasMovedGuide(e.clientX, e.clientY);
113
- }, [updateHasMovedGuide]);
114
79
  const finishGuideInteraction = (0, react_1.useCallback)(() => {
115
80
  const shouldDeleteGuide = shouldDeleteGuideRef.current;
116
81
  setGuidesList((prevState) => {
@@ -136,43 +101,56 @@ const GuideComp = ({ guide, canvasDimensions, scale }) => {
136
101
  shouldCreateGuideRef,
137
102
  shouldDeleteGuideRef,
138
103
  ]);
139
- const onPointerUp = (0, react_1.useCallback)((e) => {
140
- if (e.currentTarget.hasPointerCapture(e.pointerId)) {
141
- e.currentTarget.releasePointerCapture(e.pointerId);
142
- }
143
- const pointerDownPosition = pointerDownPositionRef.current;
144
- pointerDownPositionRef.current = null;
145
- const shouldDeleteGuide = shouldDeleteGuideRef.current;
146
- finishGuideInteraction();
147
- if (shouldDeleteGuide) {
148
- return;
149
- }
150
- if ((0, editor_guide_selection_1.isGuidePointerUpAClick)({
151
- pointerDownPosition,
152
- guideId: guide.id,
153
- clientX: e.clientX,
154
- clientY: e.clientY,
155
- })) {
156
- onSelect();
157
- }
158
- }, [finishGuideInteraction, guide.id, onSelect, shouldDeleteGuideRef]);
159
- const onMouseUp = (0, react_1.useCallback)((e) => {
160
- const pointerDownPosition = pointerDownPositionRef.current;
161
- pointerDownPositionRef.current = null;
162
- const shouldDeleteGuide = shouldDeleteGuideRef.current;
163
- finishGuideInteraction();
164
- if (shouldDeleteGuide) {
104
+ const onPointerDown = (0, react_1.useCallback)((e) => {
105
+ if (e.button !== 0) {
165
106
  return;
166
107
  }
167
- if ((0, editor_guide_selection_1.isGuidePointerUpAClick)({
168
- pointerDownPosition,
108
+ e.preventDefault();
109
+ e.stopPropagation();
110
+ hasMovedGuideRef.current = false;
111
+ pointerDownPositionRef.current = {
169
112
  guideId: guide.id,
170
113
  clientX: e.clientX,
171
114
  clientY: e.clientY,
172
- })) {
173
- onSelect();
174
- }
175
- }, [finishGuideInteraction, guide.id, onSelect, shouldDeleteGuideRef]);
115
+ };
116
+ shouldCreateGuideRef.current = false;
117
+ setDraggingGuideId(() => guide.id);
118
+ (0, pointer_session_1.startPointerSession)({
119
+ event: e.nativeEvent,
120
+ target: e.currentTarget,
121
+ onMove: (moveEvent) => {
122
+ var _a;
123
+ updateHasMovedGuide(moveEvent.clientX, moveEvent.clientY);
124
+ (_a = moveGuidePointerRef.current) === null || _a === void 0 ? void 0 : _a.call(moveGuidePointerRef, moveEvent);
125
+ },
126
+ onEnd: (reason, endEvent) => {
127
+ const pointerDownPosition = pointerDownPositionRef.current;
128
+ pointerDownPositionRef.current = null;
129
+ const shouldDeleteGuide = shouldDeleteGuideRef.current;
130
+ finishGuideInteraction();
131
+ if (shouldDeleteGuide || reason !== 'pointerup' || !endEvent) {
132
+ return;
133
+ }
134
+ if ((0, editor_guide_selection_1.isGuidePointerUpAClick)({
135
+ pointerDownPosition,
136
+ guideId: guide.id,
137
+ clientX: endEvent.clientX,
138
+ clientY: endEvent.clientY,
139
+ })) {
140
+ onSelect();
141
+ }
142
+ },
143
+ });
144
+ }, [
145
+ finishGuideInteraction,
146
+ guide.id,
147
+ moveGuidePointerRef,
148
+ onSelect,
149
+ setDraggingGuideId,
150
+ shouldCreateGuideRef,
151
+ shouldDeleteGuideRef,
152
+ updateHasMovedGuide,
153
+ ]);
176
154
  const onClick = (0, react_1.useCallback)((e) => {
177
155
  if (e.button !== 0) {
178
156
  return;
@@ -180,10 +158,6 @@ const GuideComp = ({ guide, canvasDimensions, scale }) => {
180
158
  e.preventDefault();
181
159
  e.stopPropagation();
182
160
  }, []);
183
- const onPointerCancel = (0, react_1.useCallback)(() => {
184
- pointerDownPositionRef.current = null;
185
- finishGuideInteraction();
186
- }, [finishGuideInteraction]);
187
161
  const isActive = selected || hoveredGuideId === guide.id;
188
162
  const activeClassName = isActive ? '__remotion_editor_guide_selected' : null;
189
163
  const guideClassName = (0, react_1.useMemo)(() => {
@@ -217,6 +191,6 @@ const GuideComp = ({ guide, canvasDimensions, scale }) => {
217
191
  },
218
192
  ];
219
193
  }, [clearSelection, guide.id, selected, setGuidesList]);
220
- return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: values, onOpen: null, children: jsx_runtime_1.jsx("div", { style: guideStyle, onPointerDown: onPointerDown, onPointerMove: onPointerMove, onPointerUp: onPointerUp, onPointerCancel: onPointerCancel, onMouseDown: onMouseDown, onMouseMove: onMouseMove, onMouseUp: onMouseUp, onClick: onClick, className: "__remotion_editor_guide", [should_clear_selection_on_pointer_down_1.PREVENT_CLEAR_SELECTION_ON_POINTER_DOWN_ATTR]: 'true', onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, children: jsx_runtime_1.jsx("div", { style: guideContentStyle, className: guideClassName }) }) }));
194
+ return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: values, onOpen: null, children: jsx_runtime_1.jsx("div", { style: guideStyle, onPointerDown: onPointerDown, onClick: onClick, className: "__remotion_editor_guide", [should_clear_selection_on_pointer_down_1.PREVENT_CLEAR_SELECTION_ON_POINTER_DOWN_ATTR]: 'true', onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, children: jsx_runtime_1.jsx("div", { style: guideContentStyle, className: guideClassName }) }) }));
221
195
  };
222
196
  exports.default = (0, react_1.memo)(GuideComp);
@@ -12,6 +12,7 @@ interface RulerProps {
12
12
  readonly markingGaps: number;
13
13
  readonly orientation: 'horizontal' | 'vertical';
14
14
  readonly size: Size;
15
+ readonly onPointerSessionStart: (event: React.PointerEvent<HTMLCanvasElement>, guideId: string) => void;
15
16
  }
16
17
  declare const Ruler: React.FC<RulerProps>;
17
18
  export default Ruler;
@@ -14,7 +14,7 @@ const TimelineSelection_1 = require("../Timeline/TimelineSelection");
14
14
  const makeGuideId = () => {
15
15
  return Math.random().toString(36).substring(7);
16
16
  };
17
- const Ruler = ({ scale, points, originOffset, startMarking, size, markingGaps, orientation, }) => {
17
+ const Ruler = ({ scale, points, originOffset, startMarking, size, markingGaps, orientation, onPointerSessionStart, }) => {
18
18
  const rulerCanvasRef = (0, react_1.useRef)(null);
19
19
  const isVerticalRuler = orientation === 'vertical';
20
20
  const { shouldCreateGuideRef, setGuidesList, draggingGuideId, hoveredGuideId, setDraggingGuideId, guidesList, setEditorShowGuides, } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
@@ -94,6 +94,7 @@ const Ruler = ({ scale, points, originOffset, startMarking, size, markingGaps, o
94
94
  },
95
95
  ];
96
96
  });
97
+ onPointerSessionStart(e, guideId);
97
98
  }, [
98
99
  shouldCreateGuideRef,
99
100
  setEditorShowGuides,
@@ -103,6 +104,7 @@ const Ruler = ({ scale, points, originOffset, startMarking, size, markingGaps, o
103
104
  originOffset,
104
105
  unsafeVideoConfig.id,
105
106
  cursor,
107
+ onPointerSessionStart,
106
108
  ]);
107
109
  return (jsx_runtime_1.jsx("canvas", { ref: rulerCanvasRef, width: rulerWidth * window.devicePixelRatio, height: rulerHeight * window.devicePixelRatio, style: rulerStyle, [should_clear_selection_on_pointer_down_1.PREVENT_CLEAR_SELECTION_ON_POINTER_DOWN_ATTR]: 'true', onPointerDown: onPointerDown }));
108
110
  };
@@ -8,6 +8,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const react_1 = require("react");
9
9
  const colors_1 = require("../../helpers/colors");
10
10
  const editor_ruler_1 = require("../../helpers/editor-ruler");
11
+ const pointer_session_1 = require("../../helpers/pointer-session");
11
12
  const use_studio_canvas_dimensions_1 = require("../../helpers/use-studio-canvas-dimensions");
12
13
  const editor_guides_1 = require("../../state/editor-guides");
13
14
  const editor_rulers_1 = require("../../state/editor-rulers");
@@ -30,7 +31,7 @@ const EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerR
30
31
  contentDimensions,
31
32
  assetMetadata,
32
33
  });
33
- const { shouldCreateGuideRef, shouldDeleteGuideRef, setGuidesList, draggingGuideId, setDraggingGuideId, } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
34
+ const { shouldCreateGuideRef, shouldDeleteGuideRef, setGuidesList, draggingGuideId, moveGuidePointerRef, setDraggingGuideId, } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
34
35
  const { clearSelection, selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
35
36
  const rulerMarkingGaps = (0, react_1.useMemo)(() => {
36
37
  const minimumGap = editor_rulers_1.MINIMUM_RULER_MARKING_GAP_PX;
@@ -58,7 +59,7 @@ const EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerR
58
59
  scale,
59
60
  }), [verticalRulerScaleRange, rulerMarkingGaps, scale]);
60
61
  const requestAnimationFrameRef = (0, react_1.useRef)(null);
61
- const onMouseMove = (0, react_1.useCallback)((e) => {
62
+ const onMouseMove = (0, react_1.useCallback)((e, guideId) => {
62
63
  if (requestAnimationFrameRef.current) {
63
64
  cancelAnimationFrame(requestAnimationFrameRef.current);
64
65
  }
@@ -75,7 +76,7 @@ const EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerR
75
76
  }
76
77
  setGuidesList((prevState) => {
77
78
  const newGuides = prevState.map((guide) => {
78
- if (guide.id !== draggingGuideId) {
79
+ if (guide.id !== guideId) {
79
80
  return guide;
80
81
  }
81
82
  const desiredCursor = guide.orientation === 'vertical' ? 'ew-resize' : 'ns-resize';
@@ -96,7 +97,7 @@ const EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerR
96
97
  setGuidesList((prevState) => {
97
98
  // Intentionally no persist, only persist on mouse up
98
99
  return prevState.map((guide) => {
99
- if (guide.id !== draggingGuideId) {
100
+ if (guide.id !== guideId) {
100
101
  return guide;
101
102
  }
102
103
  const position = guide.orientation === 'vertical'
@@ -119,24 +120,27 @@ const EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerR
119
120
  containerRef,
120
121
  shouldDeleteGuideRef,
121
122
  setGuidesList,
122
- draggingGuideId,
123
123
  scale,
124
124
  canvasPosition.left,
125
125
  canvasPosition.top,
126
126
  ]);
127
- const onMouseUp = (0, react_1.useCallback)(() => {
127
+ const finishGuideInteraction = (0, react_1.useCallback)((guideId) => {
128
+ if (requestAnimationFrameRef.current) {
129
+ cancelAnimationFrame(requestAnimationFrameRef.current);
130
+ requestAnimationFrameRef.current = null;
131
+ }
128
132
  const shouldDeleteGuide = shouldDeleteGuideRef.current;
129
133
  setGuidesList((prevState) => {
130
134
  const newGuides = prevState.filter((selected) => {
131
135
  if (!shouldDeleteGuide) {
132
136
  return true;
133
137
  }
134
- return selected.id !== draggingGuideId;
138
+ return selected.id !== guideId;
135
139
  });
136
140
  (0, editor_guides_1.persistGuidesList)(newGuides);
137
141
  return newGuides;
138
142
  });
139
- const deletedGuideWasSelected = selectedItems.some((item) => item.type === 'guide' && item.guideId === draggingGuideId);
143
+ const deletedGuideWasSelected = selectedItems.some((item) => item.type === 'guide' && item.guideId === guideId);
140
144
  if (shouldDeleteGuide && deletedGuideWasSelected) {
141
145
  clearSelection();
142
146
  }
@@ -144,36 +148,35 @@ const EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerR
144
148
  (0, ForceSpecificCursor_1.stopForcingSpecificCursor)();
145
149
  shouldCreateGuideRef.current = false;
146
150
  setDraggingGuideId(() => null);
147
- document.removeEventListener('pointerup', onMouseUp);
148
- document.removeEventListener('pointercancel', onMouseUp);
149
- document.removeEventListener('pointermove', onMouseMove);
150
151
  }, [
151
152
  clearSelection,
152
- draggingGuideId,
153
153
  shouldCreateGuideRef,
154
154
  shouldDeleteGuideRef,
155
155
  setDraggingGuideId,
156
156
  setGuidesList,
157
- onMouseMove,
158
157
  selectedItems,
159
158
  ]);
160
159
  (0, react_1.useLayoutEffect)(() => {
161
- if (draggingGuideId !== null) {
162
- document.addEventListener('pointermove', onMouseMove);
163
- document.addEventListener('pointerup', onMouseUp);
164
- document.addEventListener('pointercancel', onMouseUp);
165
- }
160
+ moveGuidePointerRef.current = (event) => {
161
+ onMouseMove(event, draggingGuideId);
162
+ };
166
163
  return () => {
167
- document.removeEventListener('pointermove', onMouseMove);
168
- document.removeEventListener('pointerup', onMouseUp);
169
- document.removeEventListener('pointercancel', onMouseUp);
164
+ moveGuidePointerRef.current = null;
170
165
  if (requestAnimationFrameRef.current) {
171
166
  cancelAnimationFrame(requestAnimationFrameRef.current);
172
167
  }
173
168
  };
174
- }, [draggingGuideId, onMouseMove, onMouseUp]);
169
+ }, [draggingGuideId, moveGuidePointerRef, onMouseMove]);
170
+ const onPointerSessionStart = (0, react_1.useCallback)((event, guideId) => {
171
+ (0, pointer_session_1.startPointerSession)({
172
+ event: event.nativeEvent,
173
+ target: event.currentTarget,
174
+ onMove: (moveEvent) => onMouseMove(moveEvent, guideId),
175
+ onEnd: () => finishGuideInteraction(guideId),
176
+ });
177
+ }, [finishGuideInteraction, onMouseMove]);
175
178
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
176
- jsx_runtime_1.jsx("div", { style: originBlockStyles }), jsx_runtime_1.jsx(Ruler_1.default, { orientation: "horizontal", scale: scale, points: horizontalRulerPoints, startMarking: horizontalRulerStartMarking, markingGaps: rulerMarkingGaps, originOffset: canvasPosition.left, size: canvasSize }), jsx_runtime_1.jsx(Ruler_1.default, { orientation: "vertical", scale: scale, points: verticalRulerPoints, startMarking: verticalRulerStartMarking, markingGaps: rulerMarkingGaps, originOffset: canvasPosition.top, size: canvasSize })
179
+ jsx_runtime_1.jsx("div", { style: originBlockStyles }), jsx_runtime_1.jsx(Ruler_1.default, { orientation: "horizontal", scale: scale, points: horizontalRulerPoints, startMarking: horizontalRulerStartMarking, markingGaps: rulerMarkingGaps, originOffset: canvasPosition.left, size: canvasSize, onPointerSessionStart: onPointerSessionStart }), jsx_runtime_1.jsx(Ruler_1.default, { orientation: "vertical", scale: scale, points: verticalRulerPoints, startMarking: verticalRulerStartMarking, markingGaps: rulerMarkingGaps, originOffset: canvasPosition.top, size: canvasSize, onPointerSessionStart: onPointerSessionStart })
177
180
  ] }));
178
181
  };
179
182
  exports.EditorRulers = EditorRulers;
@@ -6,6 +6,8 @@ const studio_shared_1 = require("@remotion/studio-shared");
6
6
  const react_1 = require("react");
7
7
  const colors_1 = require("../helpers/colors");
8
8
  const use_keybinding_1 = require("../helpers/use-keybinding");
9
+ const effects_1 = require("../icons/effects");
10
+ const external_link_1 = require("../icons/external-link");
9
11
  const modals_1 = require("../state/modals");
10
12
  const ContextMenu_1 = require("./ContextMenu");
11
13
  const effect_drag_and_drop_1 = require("./effect-drag-and-drop");
@@ -16,13 +18,54 @@ const DismissableModal_1 = require("./NewComposition/DismissableModal");
16
18
  const RemInput_1 = require("./NewComposition/RemInput");
17
19
  const shared_1 = require("./QuickSwitcher/shared");
18
20
  const container = {
19
- width: 500,
21
+ width: 400,
22
+ };
23
+ const panelStyle = {
24
+ borderRadius: 6,
25
+ overflow: 'hidden',
20
26
  };
21
27
  const content = {
22
28
  padding: '12px 16px 10px',
23
29
  };
24
30
  const inputStyle = {
25
31
  width: '100%',
32
+ borderRadius: 4,
33
+ };
34
+ const aboutEffectsRow = {
35
+ display: 'flex',
36
+ justifyContent: 'flex-end',
37
+ marginBottom: 8,
38
+ };
39
+ const aboutEffectsLink = {
40
+ alignItems: 'center',
41
+ color: colors_1.LIGHT_TEXT,
42
+ cursor: 'default',
43
+ display: 'inline-flex',
44
+ fontFamily: 'sans-serif',
45
+ fontSize: 12,
46
+ gap: 4,
47
+ lineHeight: '14px',
48
+ minWidth: 0,
49
+ textDecoration: 'none',
50
+ };
51
+ const aboutEffectsLinkHovered = {
52
+ ...aboutEffectsLink,
53
+ color: colors_1.WHITE,
54
+ };
55
+ const aboutEffectsLabel = {
56
+ color: 'inherit',
57
+ fontFamily: 'sans-serif',
58
+ fontSize: 12,
59
+ lineHeight: '14px',
60
+ minWidth: 0,
61
+ overflow: 'hidden',
62
+ textOverflow: 'ellipsis',
63
+ whiteSpace: 'nowrap',
64
+ };
65
+ const aboutEffectsIcon = {
66
+ flexShrink: 0,
67
+ height: 12,
68
+ width: 12,
26
69
  };
27
70
  const resultList = {
28
71
  height: 320,
@@ -35,15 +78,28 @@ const noResults = {
35
78
  padding: '12px 16px',
36
79
  };
37
80
  const resultContainer = {
38
- cursor: 'pointer',
81
+ cursor: 'default',
39
82
  display: 'flex',
40
83
  flexDirection: 'row',
41
84
  alignItems: 'center',
42
- padding: '7px 16px',
85
+ paddingLeft: 16,
86
+ paddingRight: 16,
87
+ marginBottom: 1,
88
+ marginLeft: 4,
89
+ marginRight: 4,
90
+ borderRadius: 4,
91
+ };
92
+ const iconStyle = {
93
+ width: 18,
94
+ height: 18,
95
+ flexShrink: 0,
43
96
  };
44
97
  const labelContainer = {
45
98
  flex: 1,
46
99
  minWidth: 0,
100
+ overflow: 'hidden',
101
+ paddingTop: 5,
102
+ paddingBottom: 5,
47
103
  };
48
104
  const label = {
49
105
  fontSize: shared_1.QUICK_SWITCHER_RESULT_LABEL_FONT_SIZE,
@@ -63,7 +119,7 @@ const EffectPickerResult = ({ item, selected, onSelected }) => {
63
119
  const style = (0, react_1.useMemo)(() => {
64
120
  return {
65
121
  ...resultContainer,
66
- backgroundColor: (0, colors_1.getBackgroundFromHoverState)({ hovered, selected }),
122
+ backgroundColor: hovered || selected ? colors_1.WHITE_ALPHA_06 : colors_1.TRANSPARENT,
67
123
  };
68
124
  }, [hovered, selected]);
69
125
  const labelStyle = (0, react_1.useMemo)(() => {
@@ -95,11 +151,12 @@ const EffectPickerResult = ({ item, selected, onSelected }) => {
95
151
  ];
96
152
  }, [item]);
97
153
  return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, onOpen: null, children: jsx_runtime_1.jsxs("div", { ref: ref, style: style, onClick: onClick, onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), children: [
98
- jsx_runtime_1.jsx("div", { style: labelContainer, children: jsx_runtime_1.jsx("div", { style: labelStyle, children: item.label }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: category, children: item.category })
154
+ jsx_runtime_1.jsx(effects_1.EffectsIcon, { color: selected || hovered ? colors_1.WHITE : colors_1.LIGHT_TEXT, style: iconStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelContainer, children: jsx_runtime_1.jsx("div", { style: labelStyle, children: item.label }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: category, children: item.category })
99
155
  ] }) }));
100
156
  };
101
157
  const EffectPickerContent = ({ state }) => {
102
158
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
159
+ const [aboutEffectsHovered, setAboutEffectsHovered] = (0, react_1.useState)(false);
103
160
  const [query, setQuery] = (0, react_1.useState)('');
104
161
  const [selectedIndex, setSelectedIndex] = (0, react_1.useState)(0);
105
162
  const inputRef = (0, react_1.useRef)(null);
@@ -168,12 +225,16 @@ const EffectPickerContent = ({ state }) => {
168
225
  setSelectedIndex(0);
169
226
  }, []);
170
227
  return (jsx_runtime_1.jsxs("div", { style: container, children: [
171
- jsx_runtime_1.jsx("div", { style: content, children: jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: inputRef, type: "text", style: inputStyle, autoFocus: true, status: "ok", value: query, onChange: onTextChange, placeholder: "Search effects...", rightAlign: false }) }), jsx_runtime_1.jsx("div", { style: resultList, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: results.length === 0 ? (jsx_runtime_1.jsx("div", { style: noResults, children: "No effects found" })) : (results.map((item, i) => {
228
+ jsx_runtime_1.jsxs("div", { style: content, children: [
229
+ jsx_runtime_1.jsx("div", { style: aboutEffectsRow, children: jsx_runtime_1.jsxs("a", { href: "https://remotion.dev/effects", target: "_blank", rel: "noopener noreferrer", style: aboutEffectsHovered ? aboutEffectsLinkHovered : aboutEffectsLink, onMouseEnter: () => setAboutEffectsHovered(true), onMouseLeave: () => setAboutEffectsHovered(false), children: [
230
+ jsx_runtime_1.jsx("span", { style: aboutEffectsLabel, children: "About effects" }), jsx_runtime_1.jsx(external_link_1.ExternalLinkIcon, { "aria-hidden": "true", color: aboutEffectsHovered ? colors_1.WHITE : colors_1.LIGHT_TEXT, style: aboutEffectsIcon })
231
+ ] }) }), jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: inputRef, type: "text", style: inputStyle, autoFocus: true, status: "ok", value: query, onChange: onTextChange, placeholder: "Search effects...", rightAlign: false })
232
+ ] }), jsx_runtime_1.jsx("div", { style: resultList, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: results.length === 0 ? (jsx_runtime_1.jsx("div", { style: noResults, children: "No effects found" })) : (results.map((item, i) => {
172
233
  return (jsx_runtime_1.jsx(EffectPickerResult, { item: item, selected: selectedIndexRounded === i, onSelected: selectItem }, item.id));
173
234
  })) })
174
235
  ] }));
175
236
  };
176
237
  const EffectPickerModal = ({ state }) => {
177
- return (jsx_runtime_1.jsx(DismissableModal_1.DismissableModal, { children: jsx_runtime_1.jsx(EffectPickerContent, { state: state }) }));
238
+ return (jsx_runtime_1.jsx(DismissableModal_1.DismissableModal, { panelStyle: panelStyle, children: jsx_runtime_1.jsx(EffectPickerContent, { state: state }) }));
178
239
  };
179
240
  exports.EffectPickerModal = EffectPickerModal;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export declare const ElementInstallConfirmation: React.FC<{
3
+ readonly displayName: string;
4
+ readonly sourceLabel: string;
5
+ readonly sourceIsUnverified: boolean;
6
+ readonly compositionId: string;
7
+ readonly filePath: string;
8
+ readonly overwritesExistingFile: boolean;
9
+ readonly dependenciesToReview: string[];
10
+ readonly missingPackages: string[];
11
+ readonly sourceCode: string;
12
+ }>;