@remotion/studio 4.0.501 → 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.
- package/dist/components/AssetSelectorItem.js +4 -4
- package/dist/components/Canvas.js +37 -57
- package/dist/components/ColorPicker/AlphaSlider.js +14 -10
- package/dist/components/ColorPicker/HueSlider.js +14 -10
- package/dist/components/ColorPicker/SaturationValueArea.js +14 -12
- package/dist/components/CompositionContextButton.js +1 -1
- package/dist/components/CompositionSelector.js +4 -4
- package/dist/components/CompositionSelectorItem.js +5 -5
- package/dist/components/ConfigureDefaultEditorModal.d.ts +2 -0
- package/dist/components/ConfigureDefaultEditorModal.js +151 -0
- package/dist/components/ConfirmationDialog.js +6 -3
- package/dist/components/ContextMenu.js +0 -2
- package/dist/components/Editor.js +1 -4
- package/dist/components/EditorContent.js +1 -1
- package/dist/components/EditorGuides/Guide.js +48 -74
- package/dist/components/EditorRuler/Ruler.d.ts +1 -0
- package/dist/components/EditorRuler/Ruler.js +3 -1
- package/dist/components/EditorRuler/index.js +26 -23
- package/dist/components/ElementInstallConfirmation.d.ts +12 -0
- package/dist/components/ElementInstallConfirmation.js +205 -0
- package/dist/components/ForceSpecificCursor.js +14 -0
- package/dist/components/FullscreenToggle.d.ts +3 -1
- package/dist/components/FullscreenToggle.js +2 -2
- package/dist/components/InlineAction.d.ts +2 -1
- package/dist/components/InlineAction.js +4 -4
- package/dist/components/InspectorLocationCopy.d.ts +1 -0
- package/dist/components/InspectorLocationCopy.js +7 -3
- package/dist/components/InspectorOpenInEditor.d.ts +5 -0
- package/dist/components/InspectorOpenInEditor.js +135 -0
- package/dist/components/InspectorPanel/AlignmentControls.js +1 -1
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +3 -3
- package/dist/components/InspectorPanel/CompositionMetadata.js +1 -1
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +2 -2
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +2 -2
- package/dist/components/InspectorPanel/use-composition-actions.d.ts +1 -1
- package/dist/components/InspectorPanel/use-composition-actions.js +46 -3
- package/dist/components/InspectorSequenceSection.js +2 -2
- package/dist/components/LoopToggle.d.ts +1 -0
- package/dist/components/LoopToggle.js +9 -5
- package/dist/components/Menu/MenuItem.js +13 -6
- package/dist/components/Menu/MenuSubItem.js +11 -1
- package/dist/components/MenuBuildIndicator.js +1 -1
- package/dist/components/MenuCompositionName.js +1 -1
- package/dist/components/MobilePanel.js +5 -1
- package/dist/components/ModalContainer.js +1 -1
- package/dist/components/ModalFooter.d.ts +1 -0
- package/dist/components/ModalFooter.js +2 -2
- package/dist/components/Modals.js +11 -2
- package/dist/components/NewComposition/InputDragger.js +19 -29
- package/dist/components/ObserveDefaultPropsContext.js +7 -4
- package/dist/components/PlayPause.d.ts +1 -0
- package/dist/components/PlayPause.js +2 -4
- package/dist/components/PlaybackRateSelector.d.ts +9 -2
- package/dist/components/PlaybackRateSelector.js +21 -10
- package/dist/components/PreviewToolbar.js +19 -109
- package/dist/components/PreviewToolbarOverflowButton.d.ts +12 -0
- package/dist/components/PreviewToolbarOverflowButton.js +217 -0
- package/dist/components/QuickSwitcher/QuickSwitcher.d.ts +1 -0
- package/dist/components/QuickSwitcher/QuickSwitcherContent.d.ts +1 -0
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +16 -1
- package/dist/components/QuickSwitcher/QuickSwitcherResult.d.ts +2 -0
- package/dist/components/QuickSwitcher/QuickSwitcherResult.js +7 -1
- package/dist/components/RenderButton.d.ts +1 -0
- package/dist/components/RenderButton.js +6 -4
- package/dist/components/RenderModal/InlineEyeIcon.js +1 -1
- package/dist/components/RenderModal/InlineRemoveButton.js +1 -1
- package/dist/components/RenderModal/RenderModalOutputName.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/SchemaResetButton.js +1 -1
- package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +1 -1
- package/dist/components/RenderQueue/RenderQueueDownloadItem.js +1 -1
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +1 -1
- package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +1 -1
- package/dist/components/RenderQueue/RenderQueueRemoveItem.js +1 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.js +1 -1
- package/dist/components/SelectedOutlineCropControls.js +7 -6
- package/dist/components/SelectedOutlineElement.js +28 -26
- package/dist/components/SelectedOutlineUvControls.js +25 -24
- package/dist/components/ShowGuidesProvider.js +2 -0
- package/dist/components/SidebarCollapserControls.js +2 -2
- package/dist/components/SidebarRenderButton.js +1 -1
- package/dist/components/SizeSelector.d.ts +6 -0
- package/dist/components/SizeSelector.js +17 -8
- package/dist/components/Splitter/SplitterContainer.d.ts +1 -0
- package/dist/components/Splitter/SplitterContainer.js +23 -3
- package/dist/components/Splitter/SplitterContext.d.ts +14 -0
- package/dist/components/Splitter/SplitterContext.js +16 -1
- package/dist/components/Splitter/SplitterHandle.js +25 -74
- package/dist/components/Timeline/EasingEditorModal.js +27 -19
- package/dist/components/Timeline/Timeline.js +2 -1
- package/dist/components/Timeline/TimelineAssetField.d.ts +1 -1
- package/dist/components/Timeline/TimelineAssetField.js +37 -2
- package/dist/components/Timeline/TimelineDragHandler.js +39 -8
- package/dist/components/Timeline/TimelineInOutDragHandler.js +26 -11
- package/dist/components/Timeline/TimelineLayerEye.js +36 -4
- package/dist/components/Timeline/TimelineSelection.js +14 -21
- package/dist/components/Timeline/TimelineSequence.js +7 -3
- package/dist/components/Timeline/TimelineSequenceItem.js +24 -18
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +1 -1
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +76 -43
- package/dist/components/Timeline/TimelineStack/get-stack.js +13 -0
- package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +4 -2
- package/dist/components/Timeline/get-sequence-context-menu-items.js +38 -2
- package/dist/components/Timeline/save-sequence-prop.js +4 -4
- package/dist/components/Timeline/sequence-props-subscription-store.d.ts +2 -2
- package/dist/components/Timeline/sequence-props-subscription-store.js +3 -3
- package/dist/components/Timeline/should-subscribe-to-source-file.d.ts +1 -0
- package/dist/components/Timeline/should-subscribe-to-source-file.js +11 -0
- package/dist/components/Timeline/use-open-sequence-in-editor.d.ts +3 -1
- package/dist/components/Timeline/use-open-sequence-in-editor.js +5 -2
- package/dist/components/Timeline/use-sequence-props-subscription.js +2 -0
- package/dist/components/Timeline/use-timeline-asset-drop.js +0 -4
- package/dist/components/Timeline/use-timeline-keyframe-drag.js +31 -16
- package/dist/components/TopPanel.js +1 -1
- package/dist/components/UndoRedoButtons.js +1 -1
- package/dist/components/UpdateCheck.d.ts +2 -0
- package/dist/components/UpdateCheck.js +20 -8
- package/dist/components/UpdateModal/UpdateModal.js +26 -10
- package/dist/components/VisualControls/ClickableFileName.js +5 -2
- package/dist/components/composition-menu-items.js +1 -1
- package/dist/components/default-props-api.d.ts +3 -0
- package/dist/components/default-props-api.js +19 -0
- package/dist/components/drop-handler-data.d.ts +1 -1
- package/dist/components/drop-handler-data.js +6 -6
- package/dist/components/effect-drag-and-drop.d.ts +1 -1
- package/dist/components/effect-drag-and-drop.js +3 -3
- package/dist/components/element-drag-and-drop.d.ts +1 -1
- package/dist/components/element-drag-and-drop.js +3 -3
- package/dist/components/element-install-request.d.ts +3 -0
- package/dist/components/element-install-request.js +17 -0
- package/dist/components/folder-menu-items.js +1 -1
- package/dist/components/handle-drop.d.ts +2 -3
- package/dist/components/handle-drop.js +11 -4
- package/dist/components/import-assets.d.ts +9 -9
- package/dist/components/import-assets.js +4 -15
- package/dist/components/sequence-props-api.d.ts +4 -0
- package/dist/components/sequence-props-api.js +26 -0
- package/dist/components/use-default-editor-info.d.ts +4 -0
- package/dist/components/use-default-editor-info.js +47 -0
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.d.ts +1 -0
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +29 -5
- package/dist/error-overlay/remotion-overlay/ErrorLoader.js +4 -20
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +1 -1
- package/dist/error-overlay/remotion-overlay/StackFrame.js +1 -1
- package/dist/esm/{chunk-n1kj09yv.js → chunk-bj1r1hh5.js} +8153 -6662
- package/dist/esm/internals.mjs +8153 -6662
- package/dist/esm/previewEntry.mjs +8210 -6719
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/inject-css.js +18 -44
- package/dist/helpers/open-in-editor.d.ts +3 -3
- package/dist/helpers/open-in-editor.js +10 -6
- package/dist/helpers/pointer-session.d.ts +9 -0
- package/dist/helpers/pointer-session.js +94 -0
- package/dist/helpers/use-menu-structure.js +24 -2
- package/dist/icons/custom-editor.d.ts +4 -0
- package/dist/icons/custom-editor.js +11 -0
- package/dist/icons/editor.d.ts +6 -0
- package/dist/icons/editor.js +52 -0
- package/dist/icons/upload.d.ts +4 -0
- package/dist/icons/upload.js +8 -0
- package/dist/state/editor-guides.d.ts +1 -0
- package/dist/state/editor-guides.js +1 -0
- package/dist/state/modals.d.ts +3 -0
- package/dist/state/z-index.d.ts +1 -0
- package/dist/state/z-index.js +34 -18
- package/package.json +12 -13
- package/dist/components/StudioCanvasCapture.d.ts +0 -5
- package/dist/components/StudioCanvasCapture.js +0 -40
- package/dist/components/canvas-capture-enabled.d.ts +0 -1
- package/dist/components/canvas-capture-enabled.js +0 -4
- package/dist/components/use-element-overwrite-confirmation.d.ts +0 -2
- package/dist/components/use-element-overwrite-confirmation.js +0 -73
|
@@ -39,6 +39,7 @@ const player_1 = require("@remotion/player");
|
|
|
39
39
|
const react_1 = __importStar(require("react"));
|
|
40
40
|
const remotion_1 = require("remotion");
|
|
41
41
|
const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
|
|
42
|
+
const pointer_session_1 = require("../../helpers/pointer-session");
|
|
42
43
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
43
44
|
const timeline_zoom_1 = require("../../state/timeline-zoom");
|
|
44
45
|
const z_index_1 = require("../../state/z-index");
|
|
@@ -89,7 +90,7 @@ const TimelineDragHandler = () => {
|
|
|
89
90
|
if (!canvasContent || canvasContent.type !== 'composition') {
|
|
90
91
|
return null;
|
|
91
92
|
}
|
|
92
|
-
return (jsx_runtime_1.jsx("div", { ref: timeline_refs_1.sliderAreaRef, style: containerStyle, [TimelineSelection_1.TIMELINE_SCRUBBER_ATTR]: true, children: video && (0, interactivity_enabled_1.
|
|
93
|
+
return (jsx_runtime_1.jsx("div", { ref: timeline_refs_1.sliderAreaRef, style: containerStyle, [TimelineSelection_1.TIMELINE_SCRUBBER_ATTR]: true, children: video && (0, interactivity_enabled_1.isStudioSelectionEnabled)() ? (jsx_runtime_1.jsx(TimelineDragHandlerInnerMemo, {})) : null }));
|
|
93
94
|
};
|
|
94
95
|
exports.TimelineDragHandler = TimelineDragHandler;
|
|
95
96
|
const TimelineDragHandlerInner = () => {
|
|
@@ -116,6 +117,7 @@ const TimelineDragHandlerInner = () => {
|
|
|
116
117
|
}
|
|
117
118
|
};
|
|
118
119
|
const onPointerDown = (0, react_1.useCallback)((e) => {
|
|
120
|
+
var _a, _b;
|
|
119
121
|
if (e.button !== 0) {
|
|
120
122
|
return;
|
|
121
123
|
}
|
|
@@ -139,7 +141,11 @@ const TimelineDragHandlerInner = () => {
|
|
|
139
141
|
setDragging({
|
|
140
142
|
dragging: true,
|
|
141
143
|
wasPlaying: playing,
|
|
144
|
+
button: e.button,
|
|
145
|
+
pointerId: e.pointerId,
|
|
146
|
+
target: e.currentTarget,
|
|
142
147
|
});
|
|
148
|
+
(_b = (_a = e.currentTarget).setPointerCapture) === null || _b === void 0 ? void 0 : _b.call(_a, e.pointerId);
|
|
143
149
|
pause();
|
|
144
150
|
}, [isHighestContext, videoConfig, left, width, seek, playing, pause]);
|
|
145
151
|
const onPointerMoveScrubbing = (0, react_1.useCallback)((e) => {
|
|
@@ -249,17 +255,42 @@ const TimelineDragHandlerInner = () => {
|
|
|
249
255
|
play();
|
|
250
256
|
}
|
|
251
257
|
}, [dragging, left, play, videoConfig, setFrame, width]);
|
|
258
|
+
const onPointerCancelScrubbing = (0, react_1.useCallback)(() => {
|
|
259
|
+
stopInterval();
|
|
260
|
+
document.body.style.userSelect = '';
|
|
261
|
+
document.body.style.webkitUserSelect = '';
|
|
262
|
+
if (!dragging.dragging) {
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
setDragging({ dragging: false });
|
|
266
|
+
if (dragging.wasPlaying) {
|
|
267
|
+
play();
|
|
268
|
+
}
|
|
269
|
+
}, [dragging, play]);
|
|
252
270
|
(0, react_1.useEffect)(() => {
|
|
253
271
|
if (!dragging.dragging) {
|
|
254
272
|
return;
|
|
255
273
|
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
274
|
+
return (0, pointer_session_1.startPointerSession)({
|
|
275
|
+
event: dragging,
|
|
276
|
+
target: dragging.target,
|
|
277
|
+
onMove: onPointerMoveScrubbing,
|
|
278
|
+
onEnd: (reason, endEvent) => {
|
|
279
|
+
if ((reason === 'pointerup' || reason === 'buttons-released') &&
|
|
280
|
+
endEvent) {
|
|
281
|
+
onPointerUpScrubbing(endEvent);
|
|
282
|
+
}
|
|
283
|
+
else {
|
|
284
|
+
onPointerCancelScrubbing();
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
});
|
|
288
|
+
}, [
|
|
289
|
+
dragging,
|
|
290
|
+
onPointerCancelScrubbing,
|
|
291
|
+
onPointerMoveScrubbing,
|
|
292
|
+
onPointerUpScrubbing,
|
|
293
|
+
]);
|
|
263
294
|
const ref = (0, react_1.useRef)(null);
|
|
264
295
|
(0, react_1.useEffect)(() => {
|
|
265
296
|
const currentRef = ref.current;
|
|
@@ -39,6 +39,7 @@ const player_1 = require("@remotion/player");
|
|
|
39
39
|
const react_1 = __importStar(require("react"));
|
|
40
40
|
const remotion_1 = require("remotion");
|
|
41
41
|
const get_left_of_timeline_slider_1 = require("../../helpers/get-left-of-timeline-slider");
|
|
42
|
+
const pointer_session_1 = require("../../helpers/pointer-session");
|
|
42
43
|
const in_out_1 = require("../../state/in-out");
|
|
43
44
|
const z_index_1 = require("../../state/z-index");
|
|
44
45
|
const ContextMenu_1 = require("../ContextMenu");
|
|
@@ -86,6 +87,7 @@ const TimelineInOutDragHandlerInner = () => {
|
|
|
86
87
|
const { inFrame, outFrame } = (0, in_out_1.useTimelineInOutFramePosition)();
|
|
87
88
|
const { setInAndOutFrames } = (0, in_out_1.useTimelineSetInOutFramePosition)();
|
|
88
89
|
const onInPointerDown = (0, react_1.useCallback)((e) => {
|
|
90
|
+
var _a, _b;
|
|
89
91
|
if (e.button !== 0) {
|
|
90
92
|
return;
|
|
91
93
|
}
|
|
@@ -108,9 +110,14 @@ const TimelineInOutDragHandlerInner = () => {
|
|
|
108
110
|
dragging: 'in',
|
|
109
111
|
initialOffset: getClientXWithScroll(e.clientX),
|
|
110
112
|
boundaries: [-Infinity, outMarker - inMarker],
|
|
113
|
+
button: e.button,
|
|
114
|
+
pointerId: e.pointerId,
|
|
115
|
+
target: e.currentTarget,
|
|
111
116
|
});
|
|
117
|
+
(_b = (_a = e.currentTarget).setPointerCapture) === null || _b === void 0 ? void 0 : _b.call(_a, e.pointerId);
|
|
112
118
|
}, [isHighestContext, videoConfig, inFrame, get, outFrame]);
|
|
113
119
|
const onOutPointerDown = (0, react_1.useCallback)((e) => {
|
|
120
|
+
var _a, _b;
|
|
114
121
|
if (e.button !== 0) {
|
|
115
122
|
return;
|
|
116
123
|
}
|
|
@@ -133,7 +140,11 @@ const TimelineInOutDragHandlerInner = () => {
|
|
|
133
140
|
dragging: 'out',
|
|
134
141
|
initialOffset: getClientXWithScroll(e.clientX),
|
|
135
142
|
boundaries: [inMarker - outMarker, Infinity],
|
|
143
|
+
button: e.button,
|
|
144
|
+
pointerId: e.pointerId,
|
|
145
|
+
target: e.currentTarget,
|
|
136
146
|
});
|
|
147
|
+
(_b = (_a = e.currentTarget).setPointerCapture) === null || _b === void 0 ? void 0 : _b.call(_a, e.pointerId);
|
|
137
148
|
}, [isHighestContext, videoConfig, inFrame, get, outFrame]);
|
|
138
149
|
const onPointerMoveInOut = (0, react_1.useCallback)((e) => {
|
|
139
150
|
if (!videoConfig) {
|
|
@@ -264,18 +275,22 @@ const TimelineInOutDragHandlerInner = () => {
|
|
|
264
275
|
if (inOutDragging.dragging === false) {
|
|
265
276
|
return;
|
|
266
277
|
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
278
|
+
return (0, pointer_session_1.startPointerSession)({
|
|
279
|
+
event: inOutDragging,
|
|
280
|
+
target: inOutDragging.target,
|
|
281
|
+
onMove: onPointerMoveInOut,
|
|
282
|
+
onEnd: (reason, endEvent) => {
|
|
283
|
+
if ((reason === 'pointerup' || reason === 'buttons-released') &&
|
|
284
|
+
endEvent) {
|
|
285
|
+
onPointerUpInOut(endEvent);
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
onPointerCancelInOut();
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
});
|
|
277
292
|
}, [
|
|
278
|
-
inOutDragging
|
|
293
|
+
inOutDragging,
|
|
279
294
|
onPointerCancelInOut,
|
|
280
295
|
onPointerMoveInOut,
|
|
281
296
|
onPointerUpInOut,
|
|
@@ -4,6 +4,7 @@ exports.TimelineLayerEyeSpacer = exports.TimelineLayerEye = exports.timelineLaye
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../../helpers/colors");
|
|
7
|
+
const pointer_session_1 = require("../../helpers/pointer-session");
|
|
7
8
|
const eyeIcon = {
|
|
8
9
|
width: 12,
|
|
9
10
|
color: colors_1.CURRENT_COLOR,
|
|
@@ -30,6 +31,10 @@ exports.timelineLayerIconContainer = {
|
|
|
30
31
|
flexShrink: 0,
|
|
31
32
|
};
|
|
32
33
|
let layerPointedDown = null;
|
|
34
|
+
let stopLayerPointerSession = null;
|
|
35
|
+
let lastPaintedLayerEye = null;
|
|
36
|
+
const layerEyeActions = new WeakMap();
|
|
37
|
+
const TIMELINE_LAYER_EYE_ATTR = 'data-timeline-layer-eye';
|
|
33
38
|
const TimelineLayerEye = ({ onInvoked, hidden, type }) => {
|
|
34
39
|
const renderAction = (0, react_1.useCallback)((color) => {
|
|
35
40
|
if (hidden) {
|
|
@@ -49,11 +54,29 @@ const TimelineLayerEye = ({ onInvoked, hidden, type }) => {
|
|
|
49
54
|
}
|
|
50
55
|
e.preventDefault();
|
|
51
56
|
e.stopPropagation();
|
|
57
|
+
stopLayerPointerSession === null || stopLayerPointerSession === void 0 ? void 0 : stopLayerPointerSession();
|
|
52
58
|
layerPointedDown = hidden ? 'enable' : 'disable';
|
|
53
59
|
onInvoked(layerPointedDown);
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
lastPaintedLayerEye = e.currentTarget;
|
|
61
|
+
stopLayerPointerSession = (0, pointer_session_1.startPointerSession)({
|
|
62
|
+
event: e,
|
|
63
|
+
target: e.currentTarget,
|
|
64
|
+
onMove: (moveEvent) => {
|
|
65
|
+
var _a, _b;
|
|
66
|
+
const pointedElement = (_a = document
|
|
67
|
+
.elementFromPoint(moveEvent.clientX, moveEvent.clientY)) === null || _a === void 0 ? void 0 : _a.closest(`[${TIMELINE_LAYER_EYE_ATTR}]`);
|
|
68
|
+
if (!pointedElement || pointedElement === lastPaintedLayerEye) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
lastPaintedLayerEye = pointedElement;
|
|
72
|
+
(_b = layerEyeActions.get(pointedElement)) === null || _b === void 0 ? void 0 : _b();
|
|
73
|
+
},
|
|
74
|
+
onEnd: () => {
|
|
75
|
+
layerPointedDown = null;
|
|
76
|
+
lastPaintedLayerEye = null;
|
|
77
|
+
stopLayerPointerSession = null;
|
|
78
|
+
},
|
|
79
|
+
});
|
|
57
80
|
}, [hidden, onInvoked]);
|
|
58
81
|
const onDragStart = (0, react_1.useCallback)((e) => {
|
|
59
82
|
e.preventDefault();
|
|
@@ -64,10 +87,19 @@ const TimelineLayerEye = ({ onInvoked, hidden, type }) => {
|
|
|
64
87
|
onInvoked(layerPointedDown);
|
|
65
88
|
}
|
|
66
89
|
}, [onInvoked]);
|
|
90
|
+
const registerLayerEye = (0, react_1.useCallback)((element) => {
|
|
91
|
+
if (element) {
|
|
92
|
+
layerEyeActions.set(element, () => {
|
|
93
|
+
if (layerPointedDown) {
|
|
94
|
+
onInvoked(layerPointedDown);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}, [onInvoked]);
|
|
67
99
|
const onDoubleClick = (0, react_1.useCallback)((e) => {
|
|
68
100
|
e.stopPropagation();
|
|
69
101
|
}, []);
|
|
70
|
-
return (jsx_runtime_1.jsx("div", { style: exports.timelineLayerIconContainer, draggable: false, onDragStart: onDragStart, onDoubleClick: onDoubleClick, onPointerEnter: onPointerEnter, onPointerDown: onPointerDown, children: renderAction(colors_1.LIGHT_COLOR) }));
|
|
102
|
+
return (jsx_runtime_1.jsx("div", { ref: registerLayerEye, [TIMELINE_LAYER_EYE_ATTR]: true, style: exports.timelineLayerIconContainer, draggable: false, onDragStart: onDragStart, onDoubleClick: onDoubleClick, onPointerEnter: onPointerEnter, onPointerDown: onPointerDown, children: renderAction(colors_1.LIGHT_COLOR) }));
|
|
71
103
|
};
|
|
72
104
|
exports.TimelineLayerEye = TimelineLayerEye;
|
|
73
105
|
const spacerStyle = {
|
|
@@ -8,6 +8,7 @@ const remotion_1 = require("remotion");
|
|
|
8
8
|
const client_id_1 = require("../../helpers/client-id");
|
|
9
9
|
const colors_1 = require("../../helpers/colors");
|
|
10
10
|
const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
|
|
11
|
+
const pointer_session_1 = require("../../helpers/pointer-session");
|
|
11
12
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
12
13
|
const timeline_node_path_key_1 = require("../../helpers/timeline-node-path-key");
|
|
13
14
|
const use_keybinding_1 = require("../../helpers/use-keybinding");
|
|
@@ -910,10 +911,7 @@ const useTimelineMarqueeSelection = () => {
|
|
|
910
911
|
event.target.closest(`[${exports.TIMELINE_SCRUBBER_ATTR}]`)) {
|
|
911
912
|
return;
|
|
912
913
|
}
|
|
913
|
-
const { currentTarget: target
|
|
914
|
-
if (target.setPointerCapture) {
|
|
915
|
-
target.setPointerCapture(pointerId);
|
|
916
|
-
}
|
|
914
|
+
const { currentTarget: target } = event;
|
|
917
915
|
const initialBounds = target.getBoundingClientRect();
|
|
918
916
|
const marqueeBounds = {
|
|
919
917
|
bottom: initialBounds.bottom,
|
|
@@ -937,13 +935,6 @@ const useTimelineMarqueeSelection = () => {
|
|
|
937
935
|
const extendSelection = event.metaKey || event.ctrlKey;
|
|
938
936
|
const selectionBeforeMarquee = selectedItems;
|
|
939
937
|
const cleanup = () => {
|
|
940
|
-
var _a;
|
|
941
|
-
window.removeEventListener('pointermove', onPointerMove);
|
|
942
|
-
window.removeEventListener('pointerup', onPointerUp);
|
|
943
|
-
window.removeEventListener('pointercancel', onPointerCancel);
|
|
944
|
-
if ((_a = target.hasPointerCapture) === null || _a === void 0 ? void 0 : _a.call(target, pointerId)) {
|
|
945
|
-
target.releasePointerCapture(pointerId);
|
|
946
|
-
}
|
|
947
938
|
document.body.style.userSelect = previousUserSelect;
|
|
948
939
|
document.body.style.webkitUserSelect = previousWebkitUserSelect;
|
|
949
940
|
setMarqueeRect(null);
|
|
@@ -979,16 +970,18 @@ const useTimelineMarqueeSelection = () => {
|
|
|
979
970
|
const onPointerMove = (moveEvent) => {
|
|
980
971
|
updateSelection(moveEvent.clientX, moveEvent.clientY);
|
|
981
972
|
};
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
973
|
+
(0, pointer_session_1.startPointerSession)({
|
|
974
|
+
event,
|
|
975
|
+
target,
|
|
976
|
+
onMove: onPointerMove,
|
|
977
|
+
onEnd: (reason, endEvent) => {
|
|
978
|
+
if ((reason === 'pointerup' || reason === 'buttons-released') &&
|
|
979
|
+
endEvent) {
|
|
980
|
+
updateSelection(endEvent.clientX, endEvent.clientY);
|
|
981
|
+
}
|
|
982
|
+
cleanup();
|
|
983
|
+
},
|
|
984
|
+
});
|
|
992
985
|
}, [
|
|
993
986
|
canSelect,
|
|
994
987
|
getMarqueeSelection,
|
|
@@ -53,6 +53,7 @@ const ConfirmationDialog_1 = require("../ConfirmationDialog");
|
|
|
53
53
|
const ContextMenu_1 = require("../ContextMenu");
|
|
54
54
|
const InitialCompositionLoader_1 = require("../InitialCompositionLoader");
|
|
55
55
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
56
|
+
const use_default_editor_info_1 = require("../use-default-editor-info");
|
|
56
57
|
const use_select_asset_1 = require("../use-select-asset");
|
|
57
58
|
const disable_sequence_interactivity_1 = require("./disable-sequence-interactivity");
|
|
58
59
|
const duplicate_selected_timeline_item_1 = require("./duplicate-selected-timeline-item");
|
|
@@ -197,6 +198,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
197
198
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
198
199
|
const previewConnected = previewServerState.type === 'connected';
|
|
199
200
|
const previewInteractive = previewConnected && (0, interactivity_enabled_1.isStudioInteractivityEnabled)();
|
|
201
|
+
const editorInfo = (0, use_default_editor_info_1.useDefaultEditorInfo)((0, use_default_editor_info_1.canUseEditorPicker)(previewConnected));
|
|
200
202
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
201
203
|
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
202
204
|
const selectAsset = (0, use_select_asset_1.useSelectAsset)();
|
|
@@ -208,11 +210,11 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
208
210
|
root: window.remotion_cwd,
|
|
209
211
|
}), [originalLocation]);
|
|
210
212
|
const canOpenInEditor = Boolean(window.remotion_editorName && previewConnected && originalLocation);
|
|
211
|
-
const openInEditor = (0, react_1.useCallback)(() => {
|
|
213
|
+
const openInEditor = (0, react_1.useCallback)((editorId) => {
|
|
212
214
|
if (!canOpenInEditor || !originalLocation) {
|
|
213
215
|
return;
|
|
214
216
|
}
|
|
215
|
-
(0, open_in_editor_1.openOriginalPositionInEditor)(originalLocation).catch((err) => {
|
|
217
|
+
(0, open_in_editor_1.openOriginalPositionInEditor)(originalLocation, editorId).catch((err) => {
|
|
216
218
|
(0, NotificationCenter_1.showNotification)(err.message, 2000);
|
|
217
219
|
});
|
|
218
220
|
}, [canOpenInEditor, originalLocation]);
|
|
@@ -238,7 +240,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
238
240
|
}));
|
|
239
241
|
return;
|
|
240
242
|
}
|
|
241
|
-
openInEditor();
|
|
243
|
+
openInEditor(null);
|
|
242
244
|
}, [
|
|
243
245
|
canOpenInEditor,
|
|
244
246
|
connectedCompositions,
|
|
@@ -344,6 +346,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
344
346
|
deleteDisabled,
|
|
345
347
|
disableInteractivityDisabled,
|
|
346
348
|
duplicateDisabled,
|
|
349
|
+
editorInfo,
|
|
347
350
|
fileLocation,
|
|
348
351
|
includeSourceEditItems: (0, interactivity_enabled_1.isStudioInteractivityEnabled)(),
|
|
349
352
|
onDeleteSequenceFromSource,
|
|
@@ -363,6 +366,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
363
366
|
deleteDisabled,
|
|
364
367
|
disableInteractivityDisabled,
|
|
365
368
|
duplicateDisabled,
|
|
369
|
+
editorInfo,
|
|
366
370
|
fileLocation,
|
|
367
371
|
freezeFrameMenuItem,
|
|
368
372
|
onDeleteSequenceFromSource,
|
|
@@ -196,7 +196,7 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
196
196
|
const [sequenceDropIndicator, setSequenceDropIndicator] = (0, react_1.useState)(null);
|
|
197
197
|
const [sequenceDropRejection, setSequenceDropRejection] = (0, react_1.useState)(null);
|
|
198
198
|
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
199
|
-
const { canOpenInEditor, openInEditor, originalLocation } = (0, use_open_sequence_in_editor_1.useOpenSequenceInEditor)(sequence);
|
|
199
|
+
const { canOpenInEditor, editorInfo, openInEditor, originalLocation } = (0, use_open_sequence_in_editor_1.useOpenSequenceInEditor)(sequence);
|
|
200
200
|
const fileLocation = (0, react_1.useMemo)(() => (0, format_file_location_1.formatFileLocation)({
|
|
201
201
|
location: originalLocation,
|
|
202
202
|
root: window.remotion_cwd,
|
|
@@ -580,7 +580,7 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
580
580
|
}));
|
|
581
581
|
return;
|
|
582
582
|
}
|
|
583
|
-
openInEditor();
|
|
583
|
+
openInEditor(null);
|
|
584
584
|
}, [
|
|
585
585
|
canOpenInEditor,
|
|
586
586
|
connectedCompositions,
|
|
@@ -714,6 +714,7 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
714
714
|
deleteDisabled,
|
|
715
715
|
disableInteractivityDisabled,
|
|
716
716
|
duplicateDisabled,
|
|
717
|
+
editorInfo,
|
|
717
718
|
fileLocation,
|
|
718
719
|
includeSourceEditItems: (0, interactivity_enabled_1.isStudioInteractivityEnabled)(),
|
|
719
720
|
onDeleteSequenceFromSource,
|
|
@@ -741,22 +742,26 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
741
742
|
},
|
|
742
743
|
]
|
|
743
744
|
: []),
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
745
|
+
...(canCrop
|
|
746
|
+
? [
|
|
747
|
+
{
|
|
748
|
+
type: 'item',
|
|
749
|
+
id: 'crop',
|
|
750
|
+
keyHint: null,
|
|
751
|
+
label: 'Crop',
|
|
752
|
+
leftItem: null,
|
|
753
|
+
disabled: false,
|
|
754
|
+
onClick: onCrop,
|
|
755
|
+
quickSwitcherLabel: null,
|
|
756
|
+
subMenu: null,
|
|
757
|
+
value: 'crop',
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
type: 'divider',
|
|
761
|
+
id: 'crop-divider',
|
|
762
|
+
},
|
|
763
|
+
]
|
|
764
|
+
: []),
|
|
760
765
|
{
|
|
761
766
|
type: 'item',
|
|
762
767
|
id: 'rename-sequence',
|
|
@@ -784,6 +789,7 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
784
789
|
deleteDisabled,
|
|
785
790
|
disableInteractivityDisabled,
|
|
786
791
|
duplicateDisabled,
|
|
792
|
+
editorInfo,
|
|
787
793
|
fileLocation,
|
|
788
794
|
freezeFrameMenuItem,
|
|
789
795
|
nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.supportsEffects,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { CanUpdateSequencePropStatus, CanUpdateSequencePropStatusKeyframed, OverrideIdToNodePaths, PropStatuses, SequencePropsSubscriptionKey, TSequence
|
|
2
|
+
import type { CanUpdateSequencePropStatus, CanUpdateSequencePropStatusKeyframed, InteractivitySchema, OverrideIdToNodePaths, PropStatuses, SequencePropsSubscriptionKey, TSequence } from 'remotion';
|
|
3
3
|
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
4
4
|
import type { MoveEffectKeyframeChange, MoveSequenceKeyframeChange } from './call-move-keyframe';
|
|
5
5
|
import { type SaveSequencePropChange } from './save-sequence-prop';
|
|
@@ -9,6 +9,7 @@ const no_react_1 = require("remotion/no-react");
|
|
|
9
9
|
const calculate_timeline_1 = require("../../helpers/calculate-timeline");
|
|
10
10
|
const client_id_1 = require("../../helpers/client-id");
|
|
11
11
|
const colors_1 = require("../../helpers/colors");
|
|
12
|
+
const pointer_session_1 = require("../../helpers/pointer-session");
|
|
12
13
|
const sort_by_nonce_history_1 = require("../../helpers/sort-by-nonce-history");
|
|
13
14
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
14
15
|
const editor_snapping_1 = require("../../state/editor-snapping");
|
|
@@ -604,6 +605,7 @@ const TimelineSequenceLeftEdgeDragHandle = ({ nodePathInfo, windowWidth, timelin
|
|
|
604
605
|
});
|
|
605
606
|
}, []);
|
|
606
607
|
const onPointerDown = (0, react_1.useCallback)((e) => {
|
|
608
|
+
var _a, _b;
|
|
607
609
|
if (e.button !== 0) {
|
|
608
610
|
return;
|
|
609
611
|
}
|
|
@@ -632,8 +634,11 @@ const TimelineSequenceLeftEdgeDragHandle = ({ nodePathInfo, windowWidth, timelin
|
|
|
632
634
|
latestDeltaFrames: 0,
|
|
633
635
|
pxPerFrame,
|
|
634
636
|
pointerId: e.pointerId,
|
|
637
|
+
button: e.button,
|
|
638
|
+
target: e.currentTarget,
|
|
635
639
|
targets,
|
|
636
640
|
};
|
|
641
|
+
(_b = (_a = e.currentTarget).setPointerCapture) === null || _b === void 0 ? void 0 : _b.call(_a, e.pointerId);
|
|
637
642
|
document.body.style.userSelect = 'none';
|
|
638
643
|
document.body.style.webkitUserSelect = 'none';
|
|
639
644
|
(0, ForceSpecificCursor_1.forceSpecificCursor)('ew-resize');
|
|
@@ -687,20 +692,27 @@ const TimelineSequenceLeftEdgeDragHandle = ({ nodePathInfo, windowWidth, timelin
|
|
|
687
692
|
}
|
|
688
693
|
finishDrag(false);
|
|
689
694
|
};
|
|
690
|
-
const
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
695
|
+
const activeDragState = dragStateRef.current;
|
|
696
|
+
if (!activeDragState) {
|
|
697
|
+
return;
|
|
698
|
+
}
|
|
699
|
+
return (0, pointer_session_1.startPointerSession)({
|
|
700
|
+
event: activeDragState,
|
|
701
|
+
target: activeDragState.target,
|
|
702
|
+
onMove,
|
|
703
|
+
onEnd: (reason, endEvent) => {
|
|
704
|
+
if ((reason === 'pointerup' || reason === 'buttons-released') &&
|
|
705
|
+
endEvent) {
|
|
706
|
+
onUp(endEvent);
|
|
707
|
+
}
|
|
708
|
+
else if (endEvent) {
|
|
709
|
+
onCancel(endEvent);
|
|
710
|
+
}
|
|
711
|
+
else {
|
|
712
|
+
finishDrag(false);
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
});
|
|
704
716
|
}, [dragging, finishDrag]);
|
|
705
717
|
const style = {
|
|
706
718
|
...baseStyle,
|
|
@@ -801,6 +813,7 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
|
|
|
801
813
|
});
|
|
802
814
|
}, []);
|
|
803
815
|
const onPointerDown = (0, react_1.useCallback)((e) => {
|
|
816
|
+
var _a, _b;
|
|
804
817
|
if (e.button !== 0) {
|
|
805
818
|
return;
|
|
806
819
|
}
|
|
@@ -831,8 +844,11 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
|
|
|
831
844
|
latestDeltaFrames: 0,
|
|
832
845
|
pxPerFrame,
|
|
833
846
|
pointerId: e.pointerId,
|
|
847
|
+
button: e.button,
|
|
848
|
+
target: e.currentTarget,
|
|
834
849
|
targets,
|
|
835
850
|
};
|
|
851
|
+
(_b = (_a = e.currentTarget).setPointerCapture) === null || _b === void 0 ? void 0 : _b.call(_a, e.pointerId);
|
|
836
852
|
document.body.style.userSelect = 'none';
|
|
837
853
|
document.body.style.webkitUserSelect = 'none';
|
|
838
854
|
setDragging(true);
|
|
@@ -900,20 +916,27 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
|
|
|
900
916
|
}
|
|
901
917
|
finishDrag(false);
|
|
902
918
|
};
|
|
903
|
-
const
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
919
|
+
const activeDragState = dragStateRef.current;
|
|
920
|
+
if (!activeDragState) {
|
|
921
|
+
return;
|
|
922
|
+
}
|
|
923
|
+
return (0, pointer_session_1.startPointerSession)({
|
|
924
|
+
event: activeDragState,
|
|
925
|
+
target: activeDragState.target,
|
|
926
|
+
onMove,
|
|
927
|
+
onEnd: (reason, endEvent) => {
|
|
928
|
+
if ((reason === 'pointerup' || reason === 'buttons-released') &&
|
|
929
|
+
endEvent) {
|
|
930
|
+
onUp(endEvent);
|
|
931
|
+
}
|
|
932
|
+
else if (endEvent) {
|
|
933
|
+
onCancel(endEvent);
|
|
934
|
+
}
|
|
935
|
+
else {
|
|
936
|
+
finishDrag(false);
|
|
937
|
+
}
|
|
938
|
+
},
|
|
939
|
+
});
|
|
917
940
|
}, [dragging, finishDrag]);
|
|
918
941
|
return {
|
|
919
942
|
dragging,
|
|
@@ -994,6 +1017,7 @@ const TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timeli
|
|
|
994
1017
|
});
|
|
995
1018
|
}, []);
|
|
996
1019
|
const onPointerDown = (0, react_1.useCallback)((e) => {
|
|
1020
|
+
var _a, _b;
|
|
997
1021
|
if (e.button !== 0) {
|
|
998
1022
|
return;
|
|
999
1023
|
}
|
|
@@ -1022,8 +1046,11 @@ const TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timeli
|
|
|
1022
1046
|
latestDeltaFrames: 0,
|
|
1023
1047
|
pxPerFrame,
|
|
1024
1048
|
pointerId: e.pointerId,
|
|
1049
|
+
button: e.button,
|
|
1050
|
+
target: e.currentTarget,
|
|
1025
1051
|
targets,
|
|
1026
1052
|
};
|
|
1053
|
+
(_b = (_a = e.currentTarget).setPointerCapture) === null || _b === void 0 ? void 0 : _b.call(_a, e.pointerId);
|
|
1027
1054
|
document.body.style.userSelect = 'none';
|
|
1028
1055
|
document.body.style.webkitUserSelect = 'none';
|
|
1029
1056
|
(0, ForceSpecificCursor_1.forceSpecificCursor)('ew-resize');
|
|
@@ -1072,21 +1099,27 @@ const TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timeli
|
|
|
1072
1099
|
}
|
|
1073
1100
|
finishDrag(false);
|
|
1074
1101
|
};
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1102
|
+
const activeDragState = dragStateRef.current;
|
|
1103
|
+
if (!activeDragState) {
|
|
1104
|
+
return;
|
|
1105
|
+
}
|
|
1106
|
+
return (0, pointer_session_1.startPointerSession)({
|
|
1107
|
+
event: activeDragState,
|
|
1108
|
+
target: activeDragState.target,
|
|
1109
|
+
onMove,
|
|
1110
|
+
onEnd: (reason, endEvent) => {
|
|
1111
|
+
if ((reason === 'pointerup' || reason === 'buttons-released') &&
|
|
1112
|
+
endEvent) {
|
|
1113
|
+
onUp(endEvent);
|
|
1114
|
+
}
|
|
1115
|
+
else if (endEvent) {
|
|
1116
|
+
onCancel(endEvent);
|
|
1117
|
+
}
|
|
1118
|
+
else {
|
|
1119
|
+
finishDrag(false);
|
|
1120
|
+
}
|
|
1121
|
+
},
|
|
1122
|
+
});
|
|
1090
1123
|
}, [dragging, finishDrag]);
|
|
1091
1124
|
const style = {
|
|
1092
1125
|
...baseStyle,
|
|
@@ -6,6 +6,8 @@ const get_source_map_1 = require("../../../error-overlay/react-overlay/utils/get
|
|
|
6
6
|
const get_location_of_sequence_1 = require("../../../helpers/get-location-of-sequence");
|
|
7
7
|
const traceMapCache = {};
|
|
8
8
|
const traceMapPromises = {};
|
|
9
|
+
const browserStudioOriginalSourcePrefix = 'browser-studio-original://';
|
|
10
|
+
const studioOriginalSourcePrefix = 'studio-original://';
|
|
9
11
|
const getSourceMapCache = async (fileName) => {
|
|
10
12
|
if (traceMapCache[fileName]) {
|
|
11
13
|
return traceMapCache[fileName];
|
|
@@ -32,6 +34,17 @@ const getOriginalLocationFromStack = async (stack, type) => {
|
|
|
32
34
|
if (!location) {
|
|
33
35
|
return null;
|
|
34
36
|
}
|
|
37
|
+
const originalSourcePrefix = [
|
|
38
|
+
browserStudioOriginalSourcePrefix,
|
|
39
|
+
studioOriginalSourcePrefix,
|
|
40
|
+
].find((prefix) => location.fileName.startsWith(prefix));
|
|
41
|
+
if (originalSourcePrefix) {
|
|
42
|
+
return {
|
|
43
|
+
column: location.columnNumber,
|
|
44
|
+
line: location.lineNumber,
|
|
45
|
+
source: decodeURIComponent(location.fileName.slice(originalSourcePrefix.length)),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
35
48
|
const map = await getSourceMapCache(location.fileName);
|
|
36
49
|
const originalPosition = (0, get_source_map_1.getOriginalPosition)(map, location.lineNumber, location.columnNumber);
|
|
37
50
|
return originalPosition;
|