@remotion/studio 4.0.502 → 4.0.503

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 (121) hide show
  1. package/dist/components/AssetSelectorItem.js +2 -2
  2. package/dist/components/Canvas.js +34 -54
  3. package/dist/components/ColorPicker/AlphaSlider.js +14 -10
  4. package/dist/components/ColorPicker/HueSlider.js +14 -10
  5. package/dist/components/ColorPicker/SaturationValueArea.js +14 -12
  6. package/dist/components/CompositionContextButton.js +1 -1
  7. package/dist/components/ConfigureDefaultEditorModal.d.ts +2 -0
  8. package/dist/components/ConfigureDefaultEditorModal.js +151 -0
  9. package/dist/components/ConfirmationDialog.js +6 -3
  10. package/dist/components/ContextMenu.js +0 -2
  11. package/dist/components/Editor.js +1 -4
  12. package/dist/components/EditorGuides/Guide.js +48 -74
  13. package/dist/components/EditorRuler/Ruler.d.ts +1 -0
  14. package/dist/components/EditorRuler/Ruler.js +3 -1
  15. package/dist/components/EditorRuler/index.js +26 -23
  16. package/dist/components/ElementInstallConfirmation.d.ts +12 -0
  17. package/dist/components/ElementInstallConfirmation.js +205 -0
  18. package/dist/components/ForceSpecificCursor.js +14 -0
  19. package/dist/components/InlineAction.d.ts +2 -1
  20. package/dist/components/InlineAction.js +3 -3
  21. package/dist/components/InspectorLocationCopy.d.ts +1 -0
  22. package/dist/components/InspectorLocationCopy.js +7 -3
  23. package/dist/components/InspectorOpenInEditor.d.ts +5 -0
  24. package/dist/components/InspectorOpenInEditor.js +135 -0
  25. package/dist/components/InspectorPanel/AlignmentControls.js +1 -1
  26. package/dist/components/InspectorPanel/CompositionInspectorHeader.js +3 -3
  27. package/dist/components/InspectorPanel/CompositionMetadata.js +1 -1
  28. package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +2 -2
  29. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +2 -2
  30. package/dist/components/InspectorSequenceSection.js +2 -2
  31. package/dist/components/Menu/MenuItem.js +13 -6
  32. package/dist/components/Menu/MenuSubItem.js +3 -1
  33. package/dist/components/MenuBuildIndicator.js +1 -1
  34. package/dist/components/MenuCompositionName.js +1 -1
  35. package/dist/components/MobilePanel.js +5 -1
  36. package/dist/components/ModalContainer.js +1 -1
  37. package/dist/components/ModalFooter.d.ts +1 -0
  38. package/dist/components/ModalFooter.js +2 -2
  39. package/dist/components/Modals.js +11 -2
  40. package/dist/components/NewComposition/InputDragger.js +19 -29
  41. package/dist/components/PreviewToolbarOverflowButton.js +1 -1
  42. package/dist/components/RenderModal/InlineEyeIcon.js +1 -1
  43. package/dist/components/RenderModal/InlineRemoveButton.js +1 -1
  44. package/dist/components/RenderModal/RenderModalOutputName.js +1 -1
  45. package/dist/components/RenderModal/SchemaEditor/SchemaResetButton.js +1 -1
  46. package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +1 -1
  47. package/dist/components/RenderQueue/RenderQueueDownloadItem.js +1 -1
  48. package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +1 -1
  49. package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +1 -1
  50. package/dist/components/RenderQueue/RenderQueueRemoveItem.js +1 -1
  51. package/dist/components/RenderQueue/RenderQueueRepeat.js +1 -1
  52. package/dist/components/SelectedOutlineCropControls.js +7 -6
  53. package/dist/components/SelectedOutlineElement.js +28 -26
  54. package/dist/components/SelectedOutlineUvControls.js +25 -24
  55. package/dist/components/ShowGuidesProvider.js +2 -0
  56. package/dist/components/SidebarCollapserControls.js +2 -2
  57. package/dist/components/SidebarRenderButton.js +1 -1
  58. package/dist/components/Splitter/SplitterHandle.js +17 -68
  59. package/dist/components/Timeline/EasingEditorModal.js +27 -19
  60. package/dist/components/Timeline/TimelineAssetField.js +1 -1
  61. package/dist/components/Timeline/TimelineDragHandler.js +38 -7
  62. package/dist/components/Timeline/TimelineInOutDragHandler.js +26 -11
  63. package/dist/components/Timeline/TimelineLayerEye.js +36 -4
  64. package/dist/components/Timeline/TimelineSelection.js +14 -21
  65. package/dist/components/Timeline/TimelineSequence.js +7 -3
  66. package/dist/components/Timeline/TimelineSequenceItem.js +24 -18
  67. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +1 -1
  68. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +76 -43
  69. package/dist/components/Timeline/TimelineStack/get-stack.js +7 -2
  70. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +4 -2
  71. package/dist/components/Timeline/get-sequence-context-menu-items.js +38 -2
  72. package/dist/components/Timeline/should-subscribe-to-source-file.d.ts +1 -0
  73. package/dist/components/Timeline/should-subscribe-to-source-file.js +11 -0
  74. package/dist/components/Timeline/use-open-sequence-in-editor.d.ts +3 -1
  75. package/dist/components/Timeline/use-open-sequence-in-editor.js +5 -2
  76. package/dist/components/Timeline/use-sequence-props-subscription.js +2 -0
  77. package/dist/components/Timeline/use-timeline-asset-drop.js +0 -4
  78. package/dist/components/Timeline/use-timeline-keyframe-drag.js +31 -16
  79. package/dist/components/UndoRedoButtons.js +1 -1
  80. package/dist/components/UpdateCheck.d.ts +2 -0
  81. package/dist/components/UpdateCheck.js +12 -7
  82. package/dist/components/UpdateModal/UpdateModal.js +26 -10
  83. package/dist/components/VisualControls/ClickableFileName.js +5 -2
  84. package/dist/components/composition-menu-items.js +1 -1
  85. package/dist/components/element-install-request.d.ts +3 -0
  86. package/dist/components/element-install-request.js +17 -0
  87. package/dist/components/folder-menu-items.js +1 -1
  88. package/dist/components/handle-drop.d.ts +2 -3
  89. package/dist/components/handle-drop.js +11 -4
  90. package/dist/components/import-assets.d.ts +5 -5
  91. package/dist/components/import-assets.js +4 -15
  92. package/dist/components/use-default-editor-info.d.ts +4 -0
  93. package/dist/components/use-default-editor-info.js +47 -0
  94. package/dist/error-overlay/remotion-overlay/OpenInEditor.js +1 -1
  95. package/dist/error-overlay/remotion-overlay/StackFrame.js +1 -1
  96. package/dist/esm/{chunk-fjv75ty4.js → chunk-bj1r1hh5.js} +7068 -6120
  97. package/dist/esm/internals.mjs +7068 -6120
  98. package/dist/esm/previewEntry.mjs +7077 -6129
  99. package/dist/esm/renderEntry.mjs +1 -1
  100. package/dist/helpers/inject-css.js +18 -44
  101. package/dist/helpers/open-in-editor.d.ts +3 -3
  102. package/dist/helpers/open-in-editor.js +10 -6
  103. package/dist/helpers/pointer-session.d.ts +9 -0
  104. package/dist/helpers/pointer-session.js +94 -0
  105. package/dist/helpers/use-menu-structure.js +24 -2
  106. package/dist/icons/custom-editor.d.ts +4 -0
  107. package/dist/icons/custom-editor.js +11 -0
  108. package/dist/icons/editor.d.ts +6 -0
  109. package/dist/icons/editor.js +52 -0
  110. package/dist/state/editor-guides.d.ts +1 -0
  111. package/dist/state/editor-guides.js +1 -0
  112. package/dist/state/modals.d.ts +2 -0
  113. package/dist/state/z-index.d.ts +1 -0
  114. package/dist/state/z-index.js +34 -18
  115. package/package.json +12 -13
  116. package/dist/components/StudioCanvasCapture.d.ts +0 -5
  117. package/dist/components/StudioCanvasCapture.js +0 -40
  118. package/dist/components/canvas-capture-enabled.d.ts +0 -1
  119. package/dist/components/canvas-capture-enabled.js +0 -4
  120. package/dist/components/use-element-overwrite-confirmation.d.ts +0 -2
  121. package/dist/components/use-element-overwrite-confirmation.js +0 -73
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { OriginalPosition } from '../error-overlay/react-overlay/utils/get-source-map';
3
+ export declare const InspectorOpenInEditor: React.FC<{
4
+ readonly location: OriginalPosition | null;
5
+ }>;
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InspectorOpenInEditor = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const client_id_1 = require("../helpers/client-id");
7
+ const colors_1 = require("../helpers/colors");
8
+ const open_in_editor_1 = require("../helpers/open-in-editor");
9
+ const caret_1 = require("../icons/caret");
10
+ const editor_1 = require("../icons/editor");
11
+ const modals_1 = require("../state/modals");
12
+ const z_index_1 = require("../state/z-index");
13
+ const InlineDropdown_1 = require("./InlineDropdown");
14
+ const NotificationCenter_1 = require("./Notifications/NotificationCenter");
15
+ const use_default_editor_info_1 = require("./use-default-editor-info");
16
+ const splitButton = {
17
+ alignItems: 'center',
18
+ display: 'inline-flex',
19
+ flexDirection: 'row',
20
+ flexShrink: 0,
21
+ height: 24,
22
+ };
23
+ const mainButtonBase = {
24
+ alignItems: 'center',
25
+ background: colors_1.TRANSPARENT,
26
+ border: 'none',
27
+ borderRadius: 3,
28
+ color: colors_1.LIGHT_TEXT,
29
+ display: 'inline-flex',
30
+ fontFamily: 'sans-serif',
31
+ fontSize: 11,
32
+ height: 24,
33
+ lineHeight: '14px',
34
+ padding: '0 6px',
35
+ whiteSpace: 'nowrap',
36
+ };
37
+ const menuLabel = {
38
+ color: 'inherit',
39
+ fontFamily: 'sans-serif',
40
+ fontSize: 13,
41
+ lineHeight: '16px',
42
+ };
43
+ const editorButtonIconSize = 18;
44
+ const editorMenuIconSize = 18;
45
+ const InspectorOpenInEditor = ({ location }) => {
46
+ var _a;
47
+ const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
48
+ const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
49
+ const { tabIndex } = (0, z_index_1.useZIndex)();
50
+ const [hovered, setHovered] = (0, react_1.useState)(false);
51
+ const editorPickerAvailable = (0, use_default_editor_info_1.canUseEditorPicker)(previewServerState.type === 'connected');
52
+ const editorInfo = (0, use_default_editor_info_1.useDefaultEditorInfo)(editorPickerAvailable);
53
+ const openWithEditor = (0, react_1.useCallback)(async (editorId) => {
54
+ if (!location) {
55
+ return;
56
+ }
57
+ try {
58
+ await (0, open_in_editor_1.openOriginalPositionInEditor)(location, editorId);
59
+ }
60
+ catch (err) {
61
+ (0, NotificationCenter_1.showNotification)(err.message, 2000);
62
+ }
63
+ }, [location]);
64
+ const preferredEditorId = (0, use_default_editor_info_1.getPreferredEditorId)(editorInfo);
65
+ const editorName = (_a = window.remotion_editorName) !== null && _a !== void 0 ? _a : 'default editor';
66
+ const canOpenDefault = location !== null && window.remotion_editorName !== null;
67
+ const onOpenDefault = (0, react_1.useCallback)((event) => {
68
+ event.stopPropagation();
69
+ openWithEditor(null).catch(() => undefined);
70
+ }, [openWithEditor]);
71
+ const mainButtonStyle = (0, react_1.useMemo)(() => {
72
+ return {
73
+ ...mainButtonBase,
74
+ background: (0, colors_1.getBackgroundFromHoverState)({
75
+ hovered,
76
+ selected: false,
77
+ }),
78
+ color: hovered ? colors_1.WHITE : colors_1.LIGHT_TEXT,
79
+ opacity: canOpenDefault ? 1 : 0.5,
80
+ pointerEvents: canOpenDefault ? 'auto' : 'none',
81
+ };
82
+ }, [canOpenDefault, hovered]);
83
+ const renderDropdownAction = (0, react_1.useCallback)((color) => {
84
+ return jsx_runtime_1.jsx(caret_1.CaretDown, { color: color, small: true });
85
+ }, []);
86
+ const menuItems = (0, react_1.useMemo)(() => {
87
+ var _a;
88
+ const alternateEditors = ((_a = editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors) !== null && _a !== void 0 ? _a : [])
89
+ .filter((editor) => editor.id !== preferredEditorId)
90
+ .map((editor) => ({
91
+ id: `open-in-${editor.id}`,
92
+ keyHint: null,
93
+ label: jsx_runtime_1.jsx("span", { style: menuLabel, children: editor.name }),
94
+ leftItem: jsx_runtime_1.jsx(editor_1.EditorIcon, { editorId: editor.id, size: editorMenuIconSize }),
95
+ onClick: () => {
96
+ openWithEditor(editor.id).catch(() => undefined);
97
+ },
98
+ quickSwitcherLabel: null,
99
+ subMenu: null,
100
+ type: 'item',
101
+ value: editor.id,
102
+ }));
103
+ const settingsItems = [
104
+ ...(alternateEditors.length > 0
105
+ ? [{ type: 'divider', id: 'editor-settings-divider' }]
106
+ : []),
107
+ {
108
+ id: 'set-default-editor',
109
+ keyHint: null,
110
+ label: jsx_runtime_1.jsx("span", { style: menuLabel, children: "Set default editor..." }),
111
+ leftItem: null,
112
+ onClick: () => {
113
+ setSelectedModal({ type: 'configure-default-editor' });
114
+ },
115
+ quickSwitcherLabel: null,
116
+ subMenu: null,
117
+ type: 'item',
118
+ value: 'set-default-editor',
119
+ },
120
+ ];
121
+ return [...alternateEditors, ...settingsItems];
122
+ }, [
123
+ editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors,
124
+ openWithEditor,
125
+ preferredEditorId,
126
+ setSelectedModal,
127
+ ]);
128
+ if (!editorPickerAvailable) {
129
+ return null;
130
+ }
131
+ return (jsx_runtime_1.jsxs("div", { style: splitButton, children: [
132
+ jsx_runtime_1.jsx("button", { "aria-label": `Open in ${editorName}`, disabled: !canOpenDefault, onClick: onOpenDefault, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), style: mainButtonStyle, tabIndex: tabIndex, title: `Open in ${editorName}`, type: "button", children: jsx_runtime_1.jsx(editor_1.EditorIcon, { editorId: preferredEditorId, size: editorButtonIconSize }) }), jsx_runtime_1.jsx(InlineDropdown_1.InlineDropdown, { renderAction: renderDropdownAction, title: "Open in another editor", values: menuItems, variant: "compact" })
133
+ ] }));
134
+ };
135
+ exports.InspectorOpenInEditor = InspectorOpenInEditor;
@@ -44,7 +44,7 @@ const verticalDivider = {
44
44
  margin: '0 8px',
45
45
  };
46
46
  const AlignmentButton = ({ onClick, title, Icon, disabled }) => {
47
- return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { title: title, onClick: onClick, renderAction: (color) => jsx_runtime_1.jsx(Icon, { style: iconStyle, color: color }), disabled: disabled }));
47
+ return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, title: title, onClick: onClick, renderAction: (color) => jsx_runtime_1.jsx(Icon, { style: iconStyle, color: color }), disabled: disabled }));
48
48
  };
49
49
  const AlignmentControls = ({ track }) => {
50
50
  var _a;
@@ -72,7 +72,7 @@ const CompositionInspectorHeader = () => {
72
72
  if (!validatedLocation) {
73
73
  return;
74
74
  }
75
- (0, open_in_editor_1.openOriginalPositionInEditor)(validatedLocation).catch((err) => {
75
+ (0, open_in_editor_1.openOriginalPositionInEditor)(validatedLocation, null).catch((err) => {
76
76
  (0, NotificationCenter_1.showNotification)(err.message, 2000);
77
77
  });
78
78
  }, [validatedLocation]);
@@ -80,7 +80,7 @@ const CompositionInspectorHeader = () => {
80
80
  if (!componentLocation) {
81
81
  return;
82
82
  }
83
- (0, open_in_editor_1.openOriginalPositionInEditor)(componentLocation).catch((err) => {
83
+ (0, open_in_editor_1.openOriginalPositionInEditor)(componentLocation, null).catch((err) => {
84
84
  (0, NotificationCenter_1.showNotification)(err.message, 2000);
85
85
  });
86
86
  }, [componentLocation]);
@@ -90,7 +90,7 @@ const CompositionInspectorHeader = () => {
90
90
  }
91
91
  return (0, is_composition_still_1.isCompositionStill)(video) ? (jsx_runtime_1.jsx(still_1.StillIcon, { color: color, style: sourceLocationIconStyle })) : (jsx_runtime_1.jsx(video_1.FilmIcon, { color: color, style: sourceLocationIconStyle }));
92
92
  }, [video]);
93
- return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { minHeight: COMPOSITION_INSPECTOR_HEADER_HEIGHT, padding: "4px 0", children: video ? (jsx_runtime_1.jsxs(InspectorLocationCopy_1.InspectorLocationCopy, { location: validatedLocation, name: video.id, children: [
93
+ return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { minHeight: COMPOSITION_INSPECTOR_HEADER_HEIGHT, padding: "4px 0", children: video ? (jsx_runtime_1.jsxs(InspectorLocationCopy_1.InspectorLocationCopy, { location: validatedLocation, name: video.id, openInEditorLocation: componentLocation, children: [
94
94
  jsx_runtime_1.jsx(InlineCompositionName_1.InlineCompositionName, { compositionId: video.id, stack: (_e = currentComposition === null || currentComposition === void 0 ? void 0 : currentComposition.stack) !== null && _e !== void 0 ? _e : null, compositions: compositions }, video.id), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: validatedLocation, canOpen: validatedLocation !== null, onOpen: openFileLocation, renderIcon: renderCompositionIcon, size: "inline-action" }), compositionComponentInfo === null &&
95
95
  compositionFile !== null &&
96
96
  compositionId !== null ? (jsx_runtime_1.jsx("div", { "aria-hidden": true, style: componentLocationPlaceholder })) : (jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: componentLocation, canOpen: componentLocation !== null, onOpen: openComponentLocation, renderIcon: renderReactIcon, size: "inline-action" }))] })) : null }));
@@ -97,7 +97,7 @@ const PresetDropdown = ({ disabled, title, values, visible }) => {
97
97
  return (jsx_runtime_1.jsx("div", { style: {
98
98
  ...presetDropdownContainer,
99
99
  visibility: visible ? 'visible' : 'hidden',
100
- }, children: jsx_runtime_1.jsx(InlineDropdown_1.InlineDropdown, { disabled: disabled, renderAction: renderAction, title: title, values: values }) }));
100
+ }, children: jsx_runtime_1.jsx(InlineDropdown_1.InlineDropdown, { disabled: disabled, renderAction: renderAction, title: title, values: values, variant: "compact" }) }));
101
101
  };
102
102
  const CompositionMetadataValue = ({ computed, disabled, field, onSave, pendingValue, value }) => {
103
103
  var _a;
@@ -139,8 +139,8 @@ const KeyframeEasingNavigator = ({ currentSelection, includeEasings, keyframes,
139
139
  if (currentItem === null) {
140
140
  return null;
141
141
  }
142
- return (jsx_runtime_1.jsxs("div", { style: navigatorContainer, children: [jsx_runtime_1.jsx(InlineAction_1.InlineAction, { disabled: previousItem === null, onClick: selectPrevious, title: "Previous animation item", renderAction: (color) => (jsx_runtime_1.jsx(NavigationChevron, { color: previousItem === null ? disabledChevronColor : color, direction: "left" })) }), jsx_runtime_1.jsxs("div", { style: itemStrip, children: [
142
+ return (jsx_runtime_1.jsxs("div", { style: navigatorContainer, children: [jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, disabled: previousItem === null, onClick: selectPrevious, title: "Previous animation item", renderAction: (color) => (jsx_runtime_1.jsx(NavigationChevron, { color: previousItem === null ? disabledChevronColor : color, direction: "left" })) }), jsx_runtime_1.jsxs("div", { style: itemStrip, children: [
143
143
  jsx_runtime_1.jsx(TimelineNavigatorItem, { extendLineLeft: false, extendLineRight: currentItem.type === 'keyframe', item: previousItem, onSelect: selectItem, selected: previousItem === null ? false : isSelected(previousItem.selection) }), jsx_runtime_1.jsx(TimelineNavigatorItem, { extendLineLeft: (previousItem === null || previousItem === void 0 ? void 0 : previousItem.type) === 'keyframe', extendLineRight: (nextItem === null || nextItem === void 0 ? void 0 : nextItem.type) === 'keyframe', item: currentItem, onSelect: selectItem, selected: isSelected(currentItem.selection) }), jsx_runtime_1.jsx(TimelineNavigatorItem, { extendLineLeft: currentItem.type === 'keyframe', extendLineRight: false, item: nextItem, onSelect: selectItem, selected: nextItem === null ? false : isSelected(nextItem.selection) })
144
- ] }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { disabled: nextItem === null, onClick: selectNext, title: "Next animation item", renderAction: (color) => (jsx_runtime_1.jsx(NavigationChevron, { color: nextItem === null ? disabledChevronColor : color, direction: "right" })) })] }));
144
+ ] }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, disabled: nextItem === null, onClick: selectNext, title: "Next animation item", renderAction: (color) => (jsx_runtime_1.jsx(NavigationChevron, { color: nextItem === null ? disabledChevronColor : color, direction: "right" })) })] }));
145
145
  };
146
146
  exports.KeyframeEasingNavigator = KeyframeEasingNavigator;
@@ -56,7 +56,7 @@ const useSequenceInspectorSourceLocation = (sequence) => {
56
56
  if (!canOpenInEditor) {
57
57
  return;
58
58
  }
59
- openInEditor();
59
+ openInEditor(null);
60
60
  }, [canOpenInEditor, openInEditor]);
61
61
  return {
62
62
  canOpenInEditor,
@@ -94,7 +94,7 @@ const SequenceInspectorHeader = ({ sourceLocation, track }) => {
94
94
  const onRename = (0, react_1.useCallback)((newName) => {
95
95
  saveName(newName).catch(() => undefined);
96
96
  }, [saveName]);
97
- return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: true, padding: "4px 0", children: jsx_runtime_1.jsxs(InspectorLocationCopy_1.InspectorLocationCopy, { location: sourceLocation.validatedLocation, name: componentName !== null && componentName !== void 0 ? componentName : null, children: [
97
+ return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: true, padding: "4px 0", children: jsx_runtime_1.jsxs(InspectorLocationCopy_1.InspectorLocationCopy, { location: sourceLocation.validatedLocation, name: componentName !== null && componentName !== void 0 ? componentName : null, openInEditorLocation: sourceLocation.validatedLocation, children: [
98
98
  jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: sequenceDisplayName, canRename: canRename, onCommit: onRename, size: "inspector" }), documentationLink ? (jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: false, style: defaultCursor, size: "compact", title: "Open component docs", onClick: openDocumentationLink, children: componentName })) : (jsx_runtime_1.jsx("div", { style: subtitleStyle, children: componentName })), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: sourceLocation.validatedLocation, canOpen: sourceLocation.canOpenInEditor, onOpen: sourceLocation.openFileLocation, renderIcon: renderReactIcon, size: "inline-action" })
99
99
  ] }) }));
100
100
  };
@@ -468,7 +468,7 @@ const InspectorSequenceSection = ({ sequence, readOnlyStudio, validatedLocation,
468
468
  setPropStatuses,
469
469
  validatedLocation.source,
470
470
  ]);
471
- const borderRadiusAction = borderRadiusGroup ? (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { disabled: borderRadiusConversion === null ||
471
+ const borderRadiusAction = borderRadiusGroup ? (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, disabled: borderRadiusConversion === null ||
472
472
  previewServerState.type !== 'connected', onClick: onConvertBorderRadius, title: borderRadiusConversion === null
473
473
  ? borderRadiusUsesShorthand
474
474
  ? 'A static border radius is required to use individual corners'
@@ -477,7 +477,7 @@ const InspectorSequenceSection = ({ sequence, readOnlyStudio, validatedLocation,
477
477
  ? 'Use individual corner radii'
478
478
  : 'Use one border radius value', renderAction: (color) => borderRadiusUsesShorthand ? (jsx_runtime_1.jsx(fullscreen_1.FullscreenIcon, { color: color, style: borderRadiusToggleIcon })) : (jsx_runtime_1.jsx(border_radius_1.BorderRadiusIcon, { color: color, style: borderRadiusToggleIcon })) })) : null;
479
479
  const effectsHeader = (jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderRow, children: [
480
- jsx_runtime_1.jsx("div", { style: effectsHeaderTitle, children: "Effects" }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { disabled: !canAddEffect, onClick: onAddEffect, title: canAddEffect ? 'Add effect' : undefined, renderAction: (color) => jsx_runtime_1.jsx(plus_1.Plus, { color: color, style: plusIcon }) })] }));
480
+ jsx_runtime_1.jsx("div", { style: effectsHeaderTitle, children: "Effects" }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, disabled: !canAddEffect, onClick: onAddEffect, title: canAddEffect ? 'Add effect' : undefined, renderAction: (color) => jsx_runtime_1.jsx(plus_1.Plus, { color: color, style: plusIcon }) })] }));
481
481
  const renderRow = ({ node, depth }) => {
482
482
  return (jsx_runtime_1.jsx(TimelineRowLayoutContext_1.TimelineRowLayoutContext.Provider, { value: TimelineRowLayoutContext_1.INSPECTOR_TIMELINE_ROW_LAYOUT, children: jsx_runtime_1.jsx(TimelineExpandedRow_1.TimelineExpandedRow, { node: node, depth: depth, nestedDepth: 0, rowDepthBase: 0, getIsExpanded: getIsExpanded, toggleTrack: toggleTrack, validatedLocation: validatedLocation, nodePath: nodePathInfo.sequenceSubscriptionKey, schema: schema, keyframeDisplayOffset: keyframeDisplayOffset, keyframeControlsMode: "inspector" }) }, JSON.stringify(node.nodePathInfo)));
483
483
  };
@@ -9,6 +9,7 @@ const player_1 = require("@remotion/player");
9
9
  const react_1 = require("react");
10
10
  const react_dom_1 = __importDefault(require("react-dom"));
11
11
  const colors_1 = require("../../helpers/colors");
12
+ const pointer_session_1 = require("../../helpers/pointer-session");
12
13
  const z_index_1 = require("../../state/z-index");
13
14
  const MenuContent_1 = require("../NewComposition/MenuContent");
14
15
  const is_menu_item_1 = require("./is-menu-item");
@@ -68,12 +69,18 @@ const MenuItem = ({ label: itemName, selected, id, onItemSelected, onItemHovered
68
69
  return;
69
70
  }
70
71
  onItemSelected(id);
71
- window.addEventListener('pointerup', (evt) => {
72
- if (!(0, is_menu_item_1.isMenuItem)(evt.target)) {
73
- onItemQuit();
74
- }
75
- }, {
76
- once: true,
72
+ (0, pointer_session_1.startPointerSession)({
73
+ event: e.nativeEvent,
74
+ target: e.currentTarget,
75
+ onEnd: (reason, evt) => {
76
+ if ((reason === 'pointerup' || reason === 'buttons-released') &&
77
+ evt) {
78
+ const target = document.elementFromPoint(evt.clientX, evt.clientY);
79
+ if (!target || !(0, is_menu_item_1.isMenuItem)(target)) {
80
+ onItemQuit();
81
+ }
82
+ }
83
+ },
77
84
  });
78
85
  }, [id, onItemQuit, onItemSelected]);
79
86
  const onMenuPointerDown = (0, react_1.useCallback)((e) => {
@@ -93,7 +93,9 @@ const MenuSubItem = ({ label, leaveLeftSpace, leftItem, onActionChosen, id, sele
93
93
  const minSpaceRequired = mobileLayout
94
94
  ? styles_1.MAX_MOBILE_MENU_WIDTH
95
95
  : styles_1.MAX_MENU_WIDTH;
96
- const canOpenOnRight = size.windowSize.width - size.left - size.width >= minSpaceRequired;
96
+ const spaceToLeft = size.left;
97
+ const spaceToRight = size.windowSize.width - size.left - size.width;
98
+ const canOpenOnRight = spaceToRight >= minSpaceRequired || spaceToRight >= spaceToLeft;
97
99
  return {
98
100
  ...styles_1.menuContainerTowardsBottom,
99
101
  ...(canOpenOnRight
@@ -55,7 +55,7 @@ const MenuBuildIndicator = () => {
55
55
  originalColumnNumber: 1,
56
56
  originalFunctionName: null,
57
57
  originalScriptCode: null,
58
- })
58
+ }, null)
59
59
  .then(({ success }) => {
60
60
  if (!success) {
61
61
  (0, NotificationCenter_1.showNotification)(`Could not open ${window.remotion_editorName}`, 2000);
@@ -72,7 +72,7 @@ const MenuCompositionName = () => {
72
72
  });
73
73
  }
74
74
  else if (resolvedLocation) {
75
- await (0, open_in_editor_1.openOriginalPositionInEditor)(resolvedLocation);
75
+ await (0, open_in_editor_1.openOriginalPositionInEditor)(resolvedLocation, null);
76
76
  }
77
77
  }
78
78
  catch (err) {
@@ -21,12 +21,15 @@ const overlay = {
21
21
  const panel = {
22
22
  position: 'fixed',
23
23
  top: menu_toolbar_height_1.MENU_TOOLBAR_HEIGHT,
24
- width: 'min(350px, calc(100% - 50px))',
25
24
  height: `calc(100% - ${menu_toolbar_height_1.MENU_TOOLBAR_HEIGHT}px)`,
26
25
  overflow: 'hidden',
27
26
  background: colors_1.BACKGROUND,
28
27
  boxShadow: colors_1.SHADOW_BLACK,
29
28
  };
29
+ const sidebarWidth = {
30
+ left: 'min(210px, calc(100% - 50px))',
31
+ right: 'min(245px, calc(100% - 50px))',
32
+ };
30
33
  function MobilePanel({ children, onClose, side, }) {
31
34
  const { currentZIndex } = (0, z_index_1.useZIndex)();
32
35
  const onOutsideClick = react_1.default.useCallback((target) => {
@@ -41,6 +44,7 @@ function MobilePanel({ children, onClose, side, }) {
41
44
  }, [onClose, side]);
42
45
  return react_dom_1.default.createPortal(jsx_runtime_1.jsx("div", { style: overlay, children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onEscape: onClose, onOutsideClick: onOutsideClick, children: jsx_runtime_1.jsx("div", { style: {
43
46
  ...panel,
47
+ width: sidebarWidth[side],
44
48
  left: side === 'left' ? 0 : undefined,
45
49
  right: side === 'right' ? 0 : undefined,
46
50
  }, children: children }) }) }), (0, portals_1.getPortal)(currentZIndex));
@@ -34,6 +34,6 @@ const ModalContainer = ({ children, onEscape, onOutsideClick, noZIndex, panelSty
34
34
  // Prevent deselection of currently selected items
35
35
  e.stopPropagation();
36
36
  }, []);
37
- return (jsx_runtime_1.jsx("div", { className: "css-reset", style: backgroundOverlay, role: "dialog", "aria-modal": "true", onPointerDown: onPointerDown, children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { disabled: noZIndex, onOutsideClick: onOutsideClick, onEscape: onEscape, children: jsx_runtime_1.jsx("div", { style: { ...panel, ...panelStyle }, children: children }) }) }));
37
+ return (jsx_runtime_1.jsx("div", { className: "css-reset", style: backgroundOverlay, role: "dialog", "aria-modal": "true", onPointerDown: onPointerDown, children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { disabled: noZIndex, onOutsideClick: onOutsideClick, onEscape: onEscape, stackOnHighest: true, children: jsx_runtime_1.jsx("div", { style: { ...panel, ...panelStyle }, children: children }) }) }));
38
38
  };
39
39
  exports.ModalContainer = ModalContainer;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
2
  export declare const ModalFooterContainer: React.FC<{
3
3
  readonly children: React.ReactNode;
4
+ readonly style?: React.CSSProperties;
4
5
  }>;
@@ -10,7 +10,7 @@ const content = {
10
10
  fontSize: 13,
11
11
  minWidth: 500,
12
12
  };
13
- const ModalFooterContainer = ({ children }) => {
14
- return jsx_runtime_1.jsx("div", { style: { ...content, borderTop: colors_1.BORDER_BLACK }, children: children });
13
+ const ModalFooterContainer = ({ children, style }) => {
14
+ return (jsx_runtime_1.jsx("div", { style: { ...content, ...style, borderTop: colors_1.BORDER_BLACK }, children: children }));
15
15
  };
16
16
  exports.ModalFooterContainer = ModalFooterContainer;
@@ -6,14 +6,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Modals = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const react_1 = require("react");
9
+ const react_dom_1 = __importDefault(require("react-dom"));
9
10
  const client_id_1 = require("../helpers/client-id");
10
11
  const studio_runtime_config_1 = require("../helpers/studio-runtime-config");
11
12
  const modals_1 = require("../state/modals");
13
+ const z_index_1 = require("../state/z-index");
12
14
  const AskAiModal_1 = require("./AskAiModal");
15
+ const ConfigureDefaultEditorModal_1 = require("./ConfigureDefaultEditorModal");
13
16
  const ConfigureLicenseModal_1 = require("./ConfigureLicenseModal");
14
17
  const ConfirmationDialog_1 = require("./ConfirmationDialog");
15
18
  const EffectPickerModal_1 = require("./EffectPickerModal");
16
19
  const InstallPackage_1 = require("./InstallPackage");
20
+ const portals_1 = require("./Menu/portals");
17
21
  const DeleteComposition_1 = require("./NewComposition/DeleteComposition");
18
22
  const DeleteFolder_1 = require("./NewComposition/DeleteFolder");
19
23
  const DuplicateComposition_1 = require("./NewComposition/DuplicateComposition");
@@ -32,10 +36,15 @@ const UpdateModal_1 = require("./UpdateModal/UpdateModal");
32
36
  const Modals = ({ readOnlyStudio }) => {
33
37
  var _a;
34
38
  const { selectedModal: modalContextType } = (0, react_1.useContext)(modals_1.ModalsContext);
39
+ const { currentZIndex } = (0, z_index_1.useZIndex)();
35
40
  const canRender = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx).previewServerState.type ===
36
41
  'connected';
37
- return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'new-comp' && (jsx_runtime_1.jsx(NewComposition_1.NewComposition, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'new-folder' && (jsx_runtime_1.jsx(NewFolder_1.NewFolder, { parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'duplicate-comp' && (jsx_runtime_1.jsx(DuplicateComposition_1.DuplicateComposition, { compositionType: modalContextType.compositionType, compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-comp' && (jsx_runtime_1.jsx(DeleteComposition_1.DeleteComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'rename-comp' && (jsx_runtime_1.jsx(RenameComposition_1.RenameComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-folder' && (jsx_runtime_1.jsx(DeleteFolder_1.DeleteFolder, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'rename-folder' && (jsx_runtime_1.jsx(RenameFolder_1.RenameFolder, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'rename-static-file' && (jsx_runtime_1.jsx(RenameStaticFile_1.RenameStaticFileModal, { relativePath: modalContextType.relativePath })), modalContextType && modalContextType.type === 'input-props-override' && (jsx_runtime_1.jsx(OverrideInputProps_1.OverrideInputPropsModal, {})), modalContextType && modalContextType.type === 'configure-license' && (jsx_runtime_1.jsx(ConfigureLicenseModal_1.ConfigureLicenseModal, { initialPublicLicenseKey: modalContextType.initialPublicLicenseKey })), modalContextType && modalContextType.type === 'web-render' && (jsx_runtime_1.jsx(WebRenderModal_1.WebRenderModalWithLoader, { ...modalContextType })), modalContextType &&
42
+ return react_dom_1.default.createPortal(jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'new-comp' && (jsx_runtime_1.jsx(NewComposition_1.NewComposition, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'new-folder' && (jsx_runtime_1.jsx(NewFolder_1.NewFolder, { parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'duplicate-comp' && (jsx_runtime_1.jsx(DuplicateComposition_1.DuplicateComposition, { compositionType: modalContextType.compositionType, compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-comp' && (jsx_runtime_1.jsx(DeleteComposition_1.DeleteComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'rename-comp' && (jsx_runtime_1.jsx(RenameComposition_1.RenameComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-folder' && (jsx_runtime_1.jsx(DeleteFolder_1.DeleteFolder, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'rename-folder' && (jsx_runtime_1.jsx(RenameFolder_1.RenameFolder, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'rename-static-file' && (jsx_runtime_1.jsx(RenameStaticFile_1.RenameStaticFileModal, { relativePath: modalContextType.relativePath })), modalContextType && modalContextType.type === 'input-props-override' && (jsx_runtime_1.jsx(OverrideInputProps_1.OverrideInputPropsModal, {})), modalContextType && modalContextType.type === 'configure-license' && (jsx_runtime_1.jsx(ConfigureLicenseModal_1.ConfigureLicenseModal, { initialPublicLicenseKey: modalContextType.initialPublicLicenseKey })), modalContextType &&
43
+ modalContextType.type === 'configure-default-editor' && (jsx_runtime_1.jsx(ConfigureDefaultEditorModal_1.ConfigureDefaultEditorModal, {})), modalContextType && modalContextType.type === 'web-render' && (jsx_runtime_1.jsx(WebRenderModal_1.WebRenderModalWithLoader, { ...modalContextType })), modalContextType &&
38
44
  modalContextType.type === 'server-render' &&
39
- (canRender || modalContextType.readOnlyStudio) ? (jsx_runtime_1.jsx(ServerRenderModal_1.RenderModalWithLoader, { readOnlyStudio: (_a = modalContextType.readOnlyStudio) !== null && _a !== void 0 ? _a : false, initialFrame: modalContextType.initialFrame, initialDarkMode: modalContextType.initialDarkMode, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialScale: modalContextType.initialScale, initialLogLevel: modalContextType.initialLogLevel, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialOffthreadVideoThreads: modalContextType.initialOffthreadVideoThreads, initialMediaCacheSizeInBytes: modalContextType.initialMediaCacheSizeInBytes, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialGopSize: modalContextType.initialGopSize, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, initialEncodingBufferSize: modalContextType.initialEncodingBufferSize, initialEncodingMaxRate: modalContextType.initialEncodingMaxRate, initialUserAgent: modalContextType.initialUserAgent, initialColorSpace: modalContextType.initialColorSpace, initialMultiProcessOnLinux: modalContextType.initialMultiProcessOnLinux, initialRepro: modalContextType.initialRepro, initialBeep: modalContextType.initialBeep, initialForSeamlessAacConcatenation: modalContextType.initialForSeamlessAacConcatenation, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, defaultConfigurationAudioCodec: modalContextType.defaultConfigurationAudioCodec, defaultConfigurationVideoCodec: modalContextType.defaultConfigurationVideoCodec, renderTypeOfLastRender: modalContextType.renderTypeOfLastRender, defaultMetadata: modalContextType.defaulMetadata, initialHardwareAcceleration: modalContextType.initialHardwareAcceleration, initialSampleRate: modalContextType.initialSampleRate, initialChromeMode: modalContextType.initialChromeMode, renderDefaults: modalContextType.renderDefaults })) : null, modalContextType && modalContextType.type === 'render-progress' && (jsx_runtime_1.jsx(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'update' && (jsx_runtime_1.jsx(UpdateModal_1.UpdateModal, { info: modalContextType.info, knownBugs: modalContextType.knownBugs })), modalContextType && modalContextType.type === 'install-packages' && (jsx_runtime_1.jsx(InstallPackage_1.InstallPackageModal, { packageManager: modalContextType.packageManager })), modalContextType && modalContextType.type === 'quick-switcher' && (jsx_runtime_1.jsx(QuickSwitcher_1.default, { readOnlyStudio: readOnlyStudio, invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode, assetSelection: modalContextType.assetSelection, compositionSelection: modalContextType.compositionSelection })), modalContextType && modalContextType.type === 'add-effect' && (jsx_runtime_1.jsx(EffectPickerModal_1.EffectPickerModal, { state: modalContextType })), modalContextType && modalContextType.type === 'confirmation-dialog' && (jsx_runtime_1.jsx(ConfirmationDialog_1.ConfirmationDialog, { state: modalContextType })), modalContextType && modalContextType.type === 'svg-import-dialog' && (jsx_runtime_1.jsx(SvgImportDialog_1.SvgImportDialog, { state: modalContextType })), (0, studio_runtime_config_1.getStudioAskAIEnabled)() && jsx_runtime_1.jsx(AskAiModal_1.AskAiModal, {})] }));
45
+ (canRender || modalContextType.readOnlyStudio) ? (jsx_runtime_1.jsx(ServerRenderModal_1.RenderModalWithLoader, { readOnlyStudio: (_a = modalContextType.readOnlyStudio) !== null && _a !== void 0 ? _a : false, initialFrame: modalContextType.initialFrame, initialDarkMode: modalContextType.initialDarkMode, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialScale: modalContextType.initialScale, initialLogLevel: modalContextType.initialLogLevel, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialOffthreadVideoThreads: modalContextType.initialOffthreadVideoThreads, initialMediaCacheSizeInBytes: modalContextType.initialMediaCacheSizeInBytes, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialGopSize: modalContextType.initialGopSize, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, initialEncodingBufferSize: modalContextType.initialEncodingBufferSize, initialEncodingMaxRate: modalContextType.initialEncodingMaxRate, initialUserAgent: modalContextType.initialUserAgent, initialColorSpace: modalContextType.initialColorSpace, initialMultiProcessOnLinux: modalContextType.initialMultiProcessOnLinux, initialRepro: modalContextType.initialRepro, initialBeep: modalContextType.initialBeep, initialForSeamlessAacConcatenation: modalContextType.initialForSeamlessAacConcatenation, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, defaultConfigurationAudioCodec: modalContextType.defaultConfigurationAudioCodec, defaultConfigurationVideoCodec: modalContextType.defaultConfigurationVideoCodec, renderTypeOfLastRender: modalContextType.renderTypeOfLastRender, defaultMetadata: modalContextType.defaulMetadata, initialHardwareAcceleration: modalContextType.initialHardwareAcceleration, initialSampleRate: modalContextType.initialSampleRate, initialChromeMode: modalContextType.initialChromeMode, renderDefaults: modalContextType.renderDefaults })) : null, modalContextType && modalContextType.type === 'render-progress' && (jsx_runtime_1.jsx(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'update' && (jsx_runtime_1.jsx(UpdateModal_1.UpdateModal, { info: modalContextType.info, knownBugs: modalContextType.knownBugs })), modalContextType && modalContextType.type === 'install-packages' && (jsx_runtime_1.jsx(InstallPackage_1.InstallPackageModal, { packageManager: modalContextType.packageManager })), modalContextType && modalContextType.type === 'quick-switcher' && (jsx_runtime_1.jsx(QuickSwitcher_1.default, { readOnlyStudio: readOnlyStudio, invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode, assetSelection: modalContextType.assetSelection, compositionSelection: modalContextType.compositionSelection })), modalContextType && modalContextType.type === 'add-effect' && (jsx_runtime_1.jsx(EffectPickerModal_1.EffectPickerModal, { state: modalContextType })), modalContextType && modalContextType.type === 'confirmation-dialog' && (jsx_runtime_1.jsx(ConfirmationDialog_1.ConfirmationDialog, { state: modalContextType })), modalContextType && modalContextType.type === 'svg-import-dialog' && (jsx_runtime_1.jsx(SvgImportDialog_1.SvgImportDialog, { state: modalContextType })), (0, studio_runtime_config_1.getStudioAskAIEnabled)() && jsx_runtime_1.jsx(AskAiModal_1.AskAiModal, {})] }),
46
+ // Modals must be above overlays opened from the editor, such as the
47
+ // floating sidebars used in the mobile layout.
48
+ (0, portals_1.getPortal)(currentZIndex + 1));
40
49
  };
41
50
  exports.Modals = Modals;
@@ -39,6 +39,7 @@ const react_1 = __importStar(require("react"));
39
39
  const remotion_1 = require("remotion");
40
40
  const colors_1 = require("../../helpers/colors");
41
41
  const noop_1 = require("../../helpers/noop");
42
+ const pointer_session_1 = require("../../helpers/pointer-session");
42
43
  const input_dragger_click_lock_1 = require("../../state/input-dragger-click-lock");
43
44
  const z_index_1 = require("../../state/z-index");
44
45
  const ForceSpecificCursor_1 = require("../ForceSpecificCursor");
@@ -409,12 +410,12 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
409
410
  };
410
411
  const onPointerDown = (0, react_1.useCallback)((e) => {
411
412
  e.stopPropagation();
412
- pointerDownRef.current = true;
413
413
  const target = e.currentTarget;
414
414
  const { pageX, pageY, button } = e;
415
415
  if (button !== 0) {
416
416
  return;
417
417
  }
418
+ pointerDownRef.current = true;
418
419
  let lastDragValue = null;
419
420
  const moveListener = (ev) => {
420
421
  const xDistance = ev.pageX - pageX;
@@ -446,34 +447,23 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
446
447
  lastDragValue = nextValue;
447
448
  onValueChange(nextValue);
448
449
  };
449
- window.addEventListener('mousemove', moveListener);
450
- const endDrag = (commit) => {
451
- window.removeEventListener('mousemove', moveListener);
452
- window.removeEventListener('pointerup', onPointerUp);
453
- window.removeEventListener('pointercancel', onPointerCancel);
454
- window.removeEventListener('blur', onWindowBlur);
455
- pointerDownRef.current = false;
456
- setDragging(false);
457
- (0, ForceSpecificCursor_1.stopForcingSpecificCursor)();
458
- if (commit && lastDragValue !== null && onValueChangeEnd) {
459
- onValueChangeEnd(lastDragValue);
460
- }
461
- setTimeout(() => {
462
- (0, input_dragger_click_lock_1.setClickLock)(false);
463
- }, 2);
464
- };
465
- const onPointerUp = () => {
466
- endDrag(true);
467
- };
468
- const onPointerCancel = () => {
469
- endDrag(false);
470
- };
471
- const onWindowBlur = () => {
472
- endDrag(false);
473
- };
474
- window.addEventListener('pointerup', onPointerUp);
475
- window.addEventListener('pointercancel', onPointerCancel);
476
- window.addEventListener('blur', onWindowBlur);
450
+ (0, pointer_session_1.startPointerSession)({
451
+ event: e.nativeEvent,
452
+ target,
453
+ onMove: moveListener,
454
+ onEnd: (reason) => {
455
+ pointerDownRef.current = false;
456
+ setDragging(false);
457
+ (0, ForceSpecificCursor_1.stopForcingSpecificCursor)();
458
+ const commit = reason === 'pointerup' || reason === 'buttons-released';
459
+ if (commit && lastDragValue !== null && onValueChangeEnd) {
460
+ onValueChangeEnd(lastDragValue);
461
+ }
462
+ setTimeout(() => {
463
+ (0, input_dragger_click_lock_1.setClickLock)(false);
464
+ }, 2);
465
+ },
466
+ });
477
467
  }, [
478
468
  _step,
479
469
  _min,
@@ -212,6 +212,6 @@ const PreviewToolbarOverflowButton = ({ readOnlyStudio, showFullscreen, showPlay
212
212
  if (values.length === 0) {
213
213
  return null;
214
214
  }
215
- return (jsx_runtime_1.jsx(InlineDropdown_1.InlineDropdown, { renderAction: renderAction, values: values, title: "More actions", unhoveredColor: colors_1.WHITE }));
215
+ return (jsx_runtime_1.jsx(InlineDropdown_1.InlineDropdown, { variant: null, renderAction: renderAction, values: values, title: "More actions", unhoveredColor: colors_1.WHITE }));
216
216
  };
217
217
  exports.PreviewToolbarOverflowButton = PreviewToolbarOverflowButton;
@@ -13,6 +13,6 @@ const InlineEyeButton = ({ onClick, enabled }) => {
13
13
  const renderAction = (0, react_1.useCallback)((color) => {
14
14
  return enabled ? (jsx_runtime_1.jsx("svg", { style: clearIcon, viewBox: "0 0 640 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M25.9 3.4C19-2 8.9-.8 3.4 6.1S-.8 23.1 6.1 28.6l608 480c6.9 5.5 17 4.3 22.5-2.6s4.3-17-2.6-22.5L25.9 3.4zM605.5 268.3c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-51.2 0-96 14.8-133.9 36.8l27.3 21.5C244.6 74.2 280.2 64 320 64c70.4 0 127.7 32 170.8 72c43.1 40 71.9 88 85.2 120c-9.2 22.1-25.9 52-49.5 81.5l25.1 19.8c25.6-32 43.7-64.4 53.9-89zM88.4 154.7c-25.6 32-43.7 64.4-53.9 89c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c51.2 0 96-14.8 133.9-36.8l-27.3-21.5C395.4 437.8 359.8 448 320 448c-70.4 0-127.7-32-170.8-72C106.1 336 77.3 288 64 256c9.2-22.1 25.9-52 49.5-81.5L88.4 154.7zM320 384c16.7 0 32.7-3.2 47.4-9.1l-30.9-24.4c-5.4 .9-10.9 1.4-16.5 1.4c-51 0-92.8-39.8-95.8-90.1l-30.9-24.4c-.9 6-1.3 12.2-1.3 18.5c0 70.7 57.3 128 128 128zM448 256c0-70.7-57.3-128-128-128c-16.7 0-32.7 3.2-47.4 9.1l30.9 24.4c5.4-.9 10.9-1.4 16.5-1.4c51 0 92.8 39.8 95.8 90.1l30.9 24.4c.9-6 1.3-12.2 1.3-18.5z" }) })) : (jsx_runtime_1.jsx("svg", { style: clearIcon, viewBox: "0 0 576 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M117.2 136C160.3 96 217.6 64 288 64s127.7 32 170.8 72c43.1 40 71.9 88 85.2 120c-13.3 32-42.1 80-85.2 120c-43.1 40-100.4 72-170.8 72s-127.7-32-170.8-72C74.1 336 45.3 288 32 256c13.3-32 42.1-80 85.2-120zM288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM192 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zm224 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z" }) }));
15
15
  }, [enabled]);
16
- return jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick });
16
+ return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick, variant: null }));
17
17
  };
18
18
  exports.InlineEyeButton = InlineEyeButton;
@@ -13,6 +13,6 @@ const InlineRemoveButton = ({ onClick }) => {
13
13
  const renderAction = (0, react_1.useCallback)((color) => {
14
14
  return (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", style: clearIcon, children: jsx_runtime_1.jsx("path", { d: "M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z", fill: color }) }));
15
15
  }, []);
16
- return jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick });
16
+ return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick, variant: null }));
17
17
  };
18
18
  exports.InlineRemoveButton = InlineRemoveButton;
@@ -44,7 +44,7 @@ const RenderModalOutputName = ({ existence, inputStyle, outName, onValueChange,
44
44
  jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: validationMessage, type: 'error' })
45
45
  ] })) : existence ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
46
46
  jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: jsx_runtime_1.jsxs("span", { style: existsMessageStyle, children: [
47
- jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: openExistingOutput, renderAction: renderOpenIcon, title: `Open in ${fileManagerName}` }),
47
+ jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: openExistingOutput, renderAction: renderOpenIcon, title: `Open in ${fileManagerName}` }),
48
48
  "Exists, will be overwritten"] }), type: 'warning' })
49
49
  ] })) : null] }) })
50
50
  ] }));
@@ -13,6 +13,6 @@ const SchemaResetButton = ({ onClick }) => {
13
13
  const renderAction = (0, react_1.useCallback)((color) => {
14
14
  return (jsx_runtime_1.jsx("svg", { style: icon, viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M48.5 224H40c-13.3 0-24-10.7-24-24V72c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2L98.6 96.6c87.6-86.5 228.7-86.2 315.8 1c87.5 87.5 87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3c-62.2-62.2-162.7-62.5-225.3-1L185 183c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8H48.5z" }) }));
15
15
  }, []);
16
- return jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick });
16
+ return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick, variant: null }));
17
17
  };
18
18
  exports.SchemaResetButton = SchemaResetButton;
@@ -53,6 +53,6 @@ const RenderQueueCopyToClipboard = ({ job }) => {
53
53
  (0, NotificationCenter_1.showNotification)(`Could not copy to clipboard: ${err.message}`, 2000);
54
54
  }
55
55
  }, [job.outName]);
56
- return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { title: "Copy to clipboard", renderAction: renderCopyAction, onClick: onClick }));
56
+ return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, title: "Copy to clipboard", renderAction: renderCopyAction, onClick: onClick }));
57
57
  };
58
58
  exports.RenderQueueCopyToClipboard = RenderQueueCopyToClipboard;
@@ -31,6 +31,6 @@ const RenderQueueDownloadItem = ({ job }) => {
31
31
  const renderAction = (0, react_1.useCallback)((color) => {
32
32
  return (jsx_runtime_1.jsx("svg", { style: icon, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 242.7-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7 288 32zM64 352c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-101.5 0-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352 64 352zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z" }) }));
33
33
  }, [icon]);
34
- return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick, title: "Download" }));
34
+ return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, renderAction: renderAction, onClick: onClick, title: "Download" }));
35
35
  };
36
36
  exports.RenderQueueDownloadItem = RenderQueueDownloadItem;
@@ -30,6 +30,6 @@ const RenderQueueCancelButton = ({ job }) => {
30
30
  const renderAction = (0, react_1.useCallback)((color) => {
31
31
  return (jsx_runtime_1.jsx("svg", { style: icon, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM512 256c0 141.4-114.6 256-256 256S0 397.4 0 256S114.6 0 256 0S512 114.6 512 256z" }) }));
32
32
  }, [icon]);
33
- return jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick });
33
+ return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick, variant: null }));
34
34
  };
35
35
  exports.RenderQueueCancelButton = RenderQueueCancelButton;
@@ -24,6 +24,6 @@ const RenderQueueOpenInFinderItem = ({ job }) => {
24
24
  const renderAction = (0, react_1.useCallback)((color) => {
25
25
  return jsx_runtime_1.jsx(folder_1.ExpandedFolderIconSolid, { style: icon, color: color });
26
26
  }, [icon]);
27
- return jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick });
27
+ return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick, variant: null }));
28
28
  };
29
29
  exports.RenderQueueOpenInFinderItem = RenderQueueOpenInFinderItem;
@@ -46,6 +46,6 @@ const RenderQueueRemoveItem = ({ job }) => {
46
46
  const renderAction = (0, react_1.useCallback)((color) => {
47
47
  return (jsx_runtime_1.jsx("svg", { style: icon, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z" }) }));
48
48
  }, [icon]);
49
- return jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick });
49
+ return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick, variant: null }));
50
50
  };
51
51
  exports.RenderQueueRemoveItem = RenderQueueRemoveItem;