@remotion/studio 4.0.508 → 4.0.509
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/Studio.d.ts +5 -0
- package/dist/Studio.js +2 -2
- package/dist/components/Canvas.js +35 -5
- package/dist/components/ColorPicker/AlphaSlider.js +2 -2
- package/dist/components/ColorPicker/HueSlider.js +2 -2
- package/dist/components/ColorPicker/SaturationValueArea.js +2 -2
- package/dist/components/EditorGuides/Guide.js +2 -2
- package/dist/components/EditorRuler/index.js +2 -2
- package/dist/components/ExplorerPanel.js +19 -1
- package/dist/components/InspectorOpenInEditor.js +8 -5
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +3 -3
- package/dist/components/Menu/MenuItem.js +2 -2
- package/dist/components/ModalContainer.js +1 -1
- package/dist/components/Modals.js +2 -9
- package/dist/components/NewComposition/InputDragger.js +2 -2
- package/dist/components/NewComposition/NewComposition.d.ts +2 -0
- package/dist/components/NewComposition/NewComposition.js +38 -6
- package/dist/components/NewComposition/get-new-composition-defaults.d.ts +1 -1
- package/dist/components/NewComposition/get-new-composition-defaults.js +9 -1
- package/dist/components/SelectedOutlineCanvasRotation.js +6 -4
- package/dist/components/SelectedOutlineCropControls.js +2 -2
- package/dist/components/SelectedOutlineElement.js +6 -2
- package/dist/components/SelectedOutlinePolygon.js +2 -2
- package/dist/components/SelectedOutlineRotationCornerHandle.d.ts +5 -0
- package/dist/components/SelectedOutlineRotationCornerHandle.js +4 -4
- package/dist/components/SelectedOutlineScaleEdgeLine.d.ts +1 -0
- package/dist/components/SelectedOutlineScaleEdgeLine.js +4 -4
- package/dist/components/SelectedOutlineTransformOriginHandle.js +2 -2
- package/dist/components/SelectedOutlineUvControls.js +8 -8
- package/dist/components/Splitter/SplitterHandle.js +2 -2
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tabs/index.js +2 -2
- package/dist/components/Timeline/EasingEditorModal.js +2 -2
- package/dist/components/Timeline/SubscribeToNodePaths.js +1 -1
- package/dist/components/Timeline/Timeline.js +55 -1
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +99 -35
- package/dist/components/Timeline/TimelineDragHandler.js +2 -2
- package/dist/components/Timeline/TimelineEffectPropItem.js +7 -0
- package/dist/components/Timeline/TimelineInOutDragHandler.js +2 -2
- package/dist/components/Timeline/TimelineLayerEye.js +2 -2
- package/dist/components/Timeline/TimelineSelection.js +2 -2
- package/dist/components/Timeline/TimelineSequenceItem.js +1 -24
- package/dist/components/Timeline/TimelineSequencePropItem.js +7 -1
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +6 -6
- package/dist/components/Timeline/get-sequence-context-menu-items.js +1 -0
- package/dist/components/Timeline/keyframe-clipboard.d.ts +5 -1
- package/dist/components/Timeline/keyframe-clipboard.js +3 -2
- package/dist/components/Timeline/save-sequence-prop.js +16 -7
- package/dist/components/Timeline/sequence-prop-clipboard.d.ts +31 -0
- package/dist/components/Timeline/sequence-prop-clipboard.js +142 -0
- package/dist/components/Timeline/update-selected-easing.js +8 -0
- package/dist/components/Timeline/use-open-sequence-in-apps.js +3 -1
- package/dist/components/Timeline/use-resolved-stack-react-to-change.d.ts +1 -1
- package/dist/components/Timeline/use-resolved-stack-react-to-change.js +24 -3
- package/dist/components/Timeline/use-timeline-keyframe-drag.js +4 -4
- package/dist/components/folder-menu-items.js +1 -0
- package/dist/components/get-open-in-menu-items.d.ts +3 -1
- package/dist/components/get-open-in-menu-items.js +73 -49
- package/dist/components/import-assets.js +7 -0
- package/dist/components/root-composition-menu-items.js +1 -0
- package/dist/components/selected-outline-control-layout.d.ts +14 -0
- package/dist/components/selected-outline-control-layout.js +94 -0
- package/dist/components/use-default-editor-info.js +28 -3
- package/dist/esm/{chunk-zpn4m49r.js → chunk-jdn6nkbk.js} +5181 -4560
- package/dist/esm/{chunk-fgedsvhb.js → chunk-r46yxrjr.js} +1 -2
- package/dist/esm/internals.mjs +5180 -4559
- package/dist/esm/previewEntry.mjs +5072 -4451
- package/dist/esm/renderEntry.mjs +4 -2
- package/dist/helpers/get-canvas-capture-import.d.ts +7 -0
- package/dist/helpers/get-canvas-capture-import.js +43 -0
- package/dist/helpers/get-git-menu-item.d.ts +1 -1
- package/dist/helpers/get-git-menu-item.js +33 -3
- package/dist/helpers/inserted-element-selection.d.ts +12 -0
- package/dist/helpers/inserted-element-selection.js +29 -0
- package/dist/helpers/pointer-session.d.ts +6 -2
- package/dist/helpers/pointer-session.js +29 -12
- package/dist/helpers/use-create-composition.d.ts +15 -2
- package/dist/helpers/use-create-composition.js +11 -17
- package/dist/helpers/use-menu-structure.js +1 -0
- package/dist/icons/github.d.ts +4 -0
- package/dist/icons/github.js +11 -0
- package/dist/renderEntry.js +2 -2
- package/dist/state/modals.d.ts +9 -1
- package/dist/state/z-index.d.ts +0 -1
- package/dist/state/z-index.js +27 -33
- package/package.json +12 -12
|
@@ -50,6 +50,7 @@ const call_api_1 = require("./call-api");
|
|
|
50
50
|
const ConfirmationDialog_1 = require("./ConfirmationDialog");
|
|
51
51
|
const InitialCompositionLoader_1 = require("./InitialCompositionLoader");
|
|
52
52
|
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
53
|
+
const selected_outline_control_layout_1 = require("./selected-outline-control-layout");
|
|
53
54
|
const selected_outline_types_1 = require("./selected-outline-types");
|
|
54
55
|
const SelectedOutlineCanvasRotation_1 = require("./SelectedOutlineCanvasRotation");
|
|
55
56
|
const SelectedOutlineCropControls_1 = require("./SelectedOutlineCropControls");
|
|
@@ -80,6 +81,7 @@ const SelectedOutlineElementUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
80
81
|
const { setManuallyEnabled } = (0, react_1.useContext)(transform_3d_mode_1.Transform3DModeStateContext);
|
|
81
82
|
const setHoveredSequence = (0, timeline_sequence_hover_1.useSetTimelineSequenceHover)();
|
|
82
83
|
const targetRef = (0, react_1.useRef)(layoutTarget);
|
|
84
|
+
const controlLayout = (0, react_1.useMemo)(() => (0, selected_outline_control_layout_1.getSelectedOutlineControlLayout)(outline.points), [outline.points]);
|
|
83
85
|
(0, react_1.useLayoutEffect)(() => {
|
|
84
86
|
targetRef.current = layoutTarget;
|
|
85
87
|
}, [layoutTarget]);
|
|
@@ -391,10 +393,12 @@ const SelectedOutlineElementUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
391
393
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
392
394
|
jsx_runtime_1.jsx(SelectedOutlinePolygon_1.SelectedOutlinePolygon, { compositionHeight: compositionHeight, compositionWidth: compositionWidth, dragging: dragging, getAllDragOutlines: getAllDragOutlines, getAllDragTargets: getAllDragTargets, getLayoutTarget: getLayoutTarget, getTarget: getTarget, hasTarget: layoutTarget !== undefined, hovered: hovered, outline: outline, onContextMenuOpen: onContextMenuOpen, onContextMenuOpenChange: onContextMenuOpenChange, onDraggingChange: onDraggingChange, onHoverChange: onHoverChange, onSnapPointsChange: onSnapPointsChange, onSelect: onSelect, onDoubleClickTarget: onDoubleClickTarget, scale: scale, showSelectedOutline: (_a = layoutTarget === null || layoutTarget === void 0 ? void 0 : layoutTarget.showSelectedOutline) !== null && _a !== void 0 ? _a : false }), (layoutTarget === null || layoutTarget === void 0 ? void 0 : layoutTarget.selectedForRotation) && (controlTarget === null || controlTarget === void 0 ? void 0 : controlTarget.rotationDrag) ? (jsx_runtime_1.jsx(SelectedOutlineCanvasRotation_1.SelectedOutlineCanvasRotation, { getLatestTargetByKey: getLatestTargetByKey, layoutTarget: layoutTarget, onDraggingChange: onDraggingChange, outline: outline })) : null, jsx_runtime_1.jsx(SelectedOutlineCropControls_1.SelectedOutlineCropControls, { outline: outline, onDraggingChange: onDraggingChange, target: controlTarget }), (controlTarget === null || controlTarget === void 0 ? void 0 : controlTarget.cropDrag) === null &&
|
|
393
395
|
((layoutTarget === null || layoutTarget === void 0 ? void 0 : layoutTarget.containsSelection) || hovered)
|
|
394
|
-
?
|
|
396
|
+
? controlLayout.scaleEdges.map((edge) => (jsx_runtime_1.jsx(SelectedOutlineScaleEdgeLine_1.SelectedOutlineScaleEdgeLine, { getAllScaleDragTargets: getAllScaleDragTargets, dragging: dragging, edge: edge, hitWidth: edge === 'top' || edge === 'bottom'
|
|
397
|
+
? controlLayout.scaleHitWidth.horizontal
|
|
398
|
+
: controlLayout.scaleHitWidth.vertical, outline: outline, onContextMenuOpen: onContextMenuOpen, onContextMenuOpenChange: onContextMenuOpenChange, onDraggingChange: onDraggingChange, onHoverChange: onHoverChange, onSelect: onSelect, target: controlTarget }, edge)))
|
|
395
399
|
: null, (controlTarget === null || controlTarget === void 0 ? void 0 : controlTarget.cropDrag) === null &&
|
|
396
400
|
((layoutTarget === null || layoutTarget === void 0 ? void 0 : layoutTarget.containsSelection) || hovered)
|
|
397
|
-
?
|
|
401
|
+
? controlLayout.rotationCorners.map(({ corner, point }) => (jsx_runtime_1.jsx(SelectedOutlineRotationCornerHandle_1.SelectedOutlineRotationCornerHandle, { getAllRotationDragTargets: getAllRotationDragTargets, corner: corner, dragging: dragging, handlePoint: point, outline: outline, onContextMenuOpen: onContextMenuOpen, onContextMenuOpenChange: onContextMenuOpenChange, onDraggingChange: onDraggingChange, onHoverChange: onHoverChange, onSelect: onSelect, radius: controlLayout.rotationHandleRadius, target: controlTarget }, corner)))
|
|
398
402
|
: null] }));
|
|
399
403
|
};
|
|
400
404
|
exports.SelectedOutlineElement = react_1.default.memo(SelectedOutlineElementUnmemoized);
|
|
@@ -259,9 +259,9 @@ const SelectedOutlinePolygonUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
259
259
|
(0, selected_outline_drag_1.clearSelectedOutlineDragOverrides)({ clearDragOverrides, dragStates });
|
|
260
260
|
});
|
|
261
261
|
};
|
|
262
|
-
(0, pointer_session_1.
|
|
262
|
+
(0, pointer_session_1.startCapturedPointerSession)({
|
|
263
263
|
event,
|
|
264
|
-
|
|
264
|
+
captureTarget: event.currentTarget,
|
|
265
265
|
onMove: onPointerMove,
|
|
266
266
|
onEnd: onPointerUp,
|
|
267
267
|
});
|
|
@@ -7,11 +7,16 @@ export declare const SelectedOutlineRotationCornerHandle: React.FC<{
|
|
|
7
7
|
readonly getAllRotationDragTargets: () => readonly SelectedOutlineRotationDragTarget[];
|
|
8
8
|
readonly corner: SelectedOutlineRotationCorner;
|
|
9
9
|
readonly dragging: boolean;
|
|
10
|
+
readonly handlePoint: {
|
|
11
|
+
readonly x: number;
|
|
12
|
+
readonly y: number;
|
|
13
|
+
};
|
|
10
14
|
readonly outline: SelectedOutline;
|
|
11
15
|
readonly onDraggingChange: (dragging: boolean) => void;
|
|
12
16
|
readonly onContextMenuOpen: SelectedOutlineContextMenuOpenHandler;
|
|
13
17
|
readonly onContextMenuOpenChange: (open: boolean) => void;
|
|
14
18
|
readonly onHoverChange: (key: string | null) => void;
|
|
15
19
|
readonly onSelect: (item: TimelineSelection, interaction: TimelineSelectionInteraction) => void;
|
|
20
|
+
readonly radius: number;
|
|
16
21
|
readonly target: SelectedOutlineTarget | undefined;
|
|
17
22
|
}>;
|
|
@@ -51,7 +51,7 @@ const call_add_keyframe_1 = require("./Timeline/call-add-keyframe");
|
|
|
51
51
|
const focus_inspector_field_1 = require("./Timeline/focus-inspector-field");
|
|
52
52
|
const imperative_state_1 = require("./Timeline/imperative-state");
|
|
53
53
|
const save_sequence_prop_1 = require("./Timeline/save-sequence-prop");
|
|
54
|
-
const SelectedOutlineRotationCornerHandle = ({ getAllRotationDragTargets, corner, dragging, outline, onDraggingChange, onContextMenuOpen, onContextMenuOpenChange, onHoverChange, onSelect, target, }) => {
|
|
54
|
+
const SelectedOutlineRotationCornerHandle = ({ getAllRotationDragTargets, corner, dragging, handlePoint, outline, onDraggingChange, onContextMenuOpen, onContextMenuOpenChange, onHoverChange, onSelect, radius, target, }) => {
|
|
55
55
|
var _a, _b, _c;
|
|
56
56
|
const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
57
57
|
const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
@@ -227,9 +227,9 @@ const SelectedOutlineRotationCornerHandle = ({ getAllRotationDragTargets, corner
|
|
|
227
227
|
});
|
|
228
228
|
});
|
|
229
229
|
};
|
|
230
|
-
(0, pointer_session_1.
|
|
230
|
+
(0, pointer_session_1.startCapturedPointerSession)({
|
|
231
231
|
event,
|
|
232
|
-
|
|
232
|
+
captureTarget: event.currentTarget,
|
|
233
233
|
onMove: onPointerMove,
|
|
234
234
|
onEnd: onPointerUp,
|
|
235
235
|
});
|
|
@@ -257,7 +257,7 @@ const SelectedOutlineRotationCornerHandle = ({ getAllRotationDragTargets, corner
|
|
|
257
257
|
return null;
|
|
258
258
|
}
|
|
259
259
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
260
|
-
jsx_runtime_1.jsx("circle", { ref: circleRef, cx:
|
|
260
|
+
jsx_runtime_1.jsx("circle", { ref: circleRef, cx: handlePoint.x, cy: handlePoint.y, r: radius, fill: colors_1.TRANSPARENT, stroke: colors_1.TRANSPARENT, vectorEffect: "non-scaling-stroke", pointerEvents: "all", cursor: cornerInfo.cursor, "data-remotion-studio-rotation-corner": corner, "data-remotion-studio-rotation-corner-contains-selection": containsSelection, onPointerEnter: () => {
|
|
261
261
|
if (!dragging) {
|
|
262
262
|
onHoverChange(outline.key);
|
|
263
263
|
}
|
|
@@ -7,6 +7,7 @@ export declare const SelectedOutlineScaleEdgeLine: React.FC<{
|
|
|
7
7
|
readonly getAllScaleDragTargets: () => readonly SelectedOutlineScaleDragTarget[];
|
|
8
8
|
readonly dragging: boolean;
|
|
9
9
|
readonly edge: SelectedOutlineScaleEdge;
|
|
10
|
+
readonly hitWidth: number;
|
|
10
11
|
readonly outline: SelectedOutline;
|
|
11
12
|
readonly onDraggingChange: (dragging: boolean) => void;
|
|
12
13
|
readonly onContextMenuOpen: SelectedOutlineContextMenuOpenHandler;
|
|
@@ -49,7 +49,7 @@ const call_add_keyframe_1 = require("./Timeline/call-add-keyframe");
|
|
|
49
49
|
const focus_inspector_field_1 = require("./Timeline/focus-inspector-field");
|
|
50
50
|
const imperative_state_1 = require("./Timeline/imperative-state");
|
|
51
51
|
const save_sequence_prop_1 = require("./Timeline/save-sequence-prop");
|
|
52
|
-
const SelectedOutlineScaleEdgeLine = ({ getAllScaleDragTargets, dragging, edge, outline, onDraggingChange, onContextMenuOpen, onContextMenuOpenChange, onHoverChange, onSelect, target, }) => {
|
|
52
|
+
const SelectedOutlineScaleEdgeLine = ({ getAllScaleDragTargets, dragging, edge, hitWidth, outline, onDraggingChange, onContextMenuOpen, onContextMenuOpenChange, onHoverChange, onSelect, target, }) => {
|
|
53
53
|
var _a, _b, _c, _d;
|
|
54
54
|
const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
55
55
|
const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
@@ -177,9 +177,9 @@ const SelectedOutlineScaleEdgeLine = ({ getAllScaleDragTargets, dragging, edge,
|
|
|
177
177
|
});
|
|
178
178
|
});
|
|
179
179
|
};
|
|
180
|
-
(0, pointer_session_1.
|
|
180
|
+
(0, pointer_session_1.startCapturedPointerSession)({
|
|
181
181
|
event,
|
|
182
|
-
|
|
182
|
+
captureTarget: event.currentTarget,
|
|
183
183
|
onMove: onPointerMove,
|
|
184
184
|
onEnd: onPointerUp,
|
|
185
185
|
});
|
|
@@ -201,7 +201,7 @@ const SelectedOutlineScaleEdgeLine = ({ getAllScaleDragTargets, dragging, edge,
|
|
|
201
201
|
return null;
|
|
202
202
|
}
|
|
203
203
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
204
|
-
jsx_runtime_1.jsx("line", { ref: lineRef, x1: edgeInfo.start.x, y1: edgeInfo.start.y, x2: edgeInfo.end.x, y2: edgeInfo.end.y, stroke: colors_1.TRANSPARENT, strokeWidth:
|
|
204
|
+
jsx_runtime_1.jsx("line", { ref: lineRef, x1: edgeInfo.start.x, y1: edgeInfo.start.y, x2: edgeInfo.end.x, y2: edgeInfo.end.y, stroke: colors_1.TRANSPARENT, strokeWidth: hitWidth, strokeLinecap: "butt", vectorEffect: "non-scaling-stroke", pointerEvents: "stroke", cursor: edgeInfo.cursor, "data-remotion-studio-scale-edge": edge, "data-remotion-studio-scale-edge-contains-selection": (_d = target === null || target === void 0 ? void 0 : target.containsSelection) !== null && _d !== void 0 ? _d : false, onPointerEnter: () => {
|
|
205
205
|
if (!dragging) {
|
|
206
206
|
onHoverChange(outline.key);
|
|
207
207
|
}
|
|
@@ -279,9 +279,9 @@ const SelectedOutlineTransformOriginHandle = ({ getLatestTargetByKey, layoutTarg
|
|
|
279
279
|
clearDragOverrides(transformOriginDrag.nodePath);
|
|
280
280
|
});
|
|
281
281
|
};
|
|
282
|
-
(0, pointer_session_1.
|
|
282
|
+
(0, pointer_session_1.startCapturedPointerSession)({
|
|
283
283
|
event,
|
|
284
|
-
|
|
284
|
+
captureTarget: event.currentTarget,
|
|
285
285
|
onMove: onPointerMove,
|
|
286
286
|
onEnd: onPointerUp,
|
|
287
287
|
});
|
|
@@ -236,9 +236,9 @@ const SelectedUvEllipseStartHandle = ({ control, onDraggingChange, outline }) =>
|
|
|
236
236
|
sourceFrame: control.handle.sourceFrame,
|
|
237
237
|
});
|
|
238
238
|
};
|
|
239
|
-
(0, pointer_session_1.
|
|
239
|
+
(0, pointer_session_1.startCapturedPointerSession)({
|
|
240
240
|
event,
|
|
241
|
-
|
|
241
|
+
captureTarget: event.currentTarget,
|
|
242
242
|
onMove: onPointerMove,
|
|
243
243
|
onEnd: onPointerUp,
|
|
244
244
|
});
|
|
@@ -336,9 +336,9 @@ const SelectedUvEllipseResizeHandle = ({ axis, control, onDraggingChange, outlin
|
|
|
336
336
|
sourceFrame: control.handle.sourceFrame,
|
|
337
337
|
});
|
|
338
338
|
};
|
|
339
|
-
(0, pointer_session_1.
|
|
339
|
+
(0, pointer_session_1.startCapturedPointerSession)({
|
|
340
340
|
event,
|
|
341
|
-
|
|
341
|
+
captureTarget: event.currentTarget,
|
|
342
342
|
onMove: onPointerMove,
|
|
343
343
|
onEnd: onPointerUp,
|
|
344
344
|
});
|
|
@@ -491,9 +491,9 @@ const SelectedUvEllipseRotationHandle = ({ control, onDraggingChange }) => {
|
|
|
491
491
|
sourceFrame: control.handle.sourceFrame,
|
|
492
492
|
});
|
|
493
493
|
};
|
|
494
|
-
(0, pointer_session_1.
|
|
494
|
+
(0, pointer_session_1.startCapturedPointerSession)({
|
|
495
495
|
event,
|
|
496
|
-
|
|
496
|
+
captureTarget: event.currentTarget,
|
|
497
497
|
onMove: onPointerMove,
|
|
498
498
|
onEnd: onPointerUp,
|
|
499
499
|
});
|
|
@@ -645,9 +645,9 @@ const SelectedUvHandleCircle = ({ handle, nodePathInfo, onDraggingChange, onSele
|
|
|
645
645
|
clearEffectDragOverrides(handle.nodePath, handle.effectIndex);
|
|
646
646
|
});
|
|
647
647
|
};
|
|
648
|
-
(0, pointer_session_1.
|
|
648
|
+
(0, pointer_session_1.startCapturedPointerSession)({
|
|
649
649
|
event,
|
|
650
|
-
|
|
650
|
+
captureTarget: event.currentTarget,
|
|
651
651
|
onMove: onPointerMove,
|
|
652
652
|
onEnd: onPointerUp,
|
|
653
653
|
});
|
|
@@ -96,9 +96,9 @@ const SplitterHandle = ({ allowToCollapse, onCollapse }) => {
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
|
-
endDrag = (0, pointer_session_1.
|
|
99
|
+
endDrag = (0, pointer_session_1.startCapturedPointerSession)({
|
|
100
100
|
event: e,
|
|
101
|
-
|
|
101
|
+
captureTarget: current,
|
|
102
102
|
onMove: onPointerMove,
|
|
103
103
|
onEnd: (reason, endEvent) => {
|
|
104
104
|
if ((reason === 'pointerup' || reason === 'buttons-released') &&
|
|
@@ -5,6 +5,8 @@ export declare const Tabs: React.FC<{
|
|
|
5
5
|
}>;
|
|
6
6
|
export declare const Tab: React.FC<{
|
|
7
7
|
readonly children: React.ReactNode;
|
|
8
|
+
readonly onDragEnter?: React.DragEventHandler<HTMLDivElement>;
|
|
9
|
+
readonly onDragLeave?: React.DragEventHandler<HTMLDivElement>;
|
|
8
10
|
readonly onClick: React.MouseEventHandler<HTMLDivElement>;
|
|
9
11
|
readonly style?: React.CSSProperties;
|
|
10
12
|
readonly selected: boolean;
|
|
@@ -34,7 +34,7 @@ const selectorButton = {
|
|
|
34
34
|
userSelect: 'none',
|
|
35
35
|
WebkitUserSelect: 'none',
|
|
36
36
|
};
|
|
37
|
-
const Tab = ({ children, onClick, style, selected }) => {
|
|
37
|
+
const Tab = ({ children, onClick, onDragEnter, onDragLeave, style, selected }) => {
|
|
38
38
|
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
39
39
|
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
40
40
|
const onPointerEnter = (0, react_1.useCallback)(() => {
|
|
@@ -55,6 +55,6 @@ const Tab = ({ children, onClick, style, selected }) => {
|
|
|
55
55
|
boxShadow: selected ? 'none' : undefined,
|
|
56
56
|
...style,
|
|
57
57
|
}), [hovered, selected, style]);
|
|
58
|
-
return (jsx_runtime_1.jsx("div", { style: definiteStyle, role: "button", onClick: onClick, tabIndex: tabIndex, onPointerLeave: onPointerLeave, onPointerEnter: onPointerEnter, children: children }));
|
|
58
|
+
return (jsx_runtime_1.jsx("div", { style: definiteStyle, role: "button", onClick: onClick, onDragEnter: onDragEnter, onDragLeave: onDragLeave, tabIndex: tabIndex, onPointerLeave: onPointerLeave, onPointerEnter: onPointerEnter, children: children }));
|
|
59
59
|
};
|
|
60
60
|
exports.Tab = Tab;
|
|
@@ -681,9 +681,9 @@ const EasingEditor = ({ state, renderHeader }) => {
|
|
|
681
681
|
const bezierBeforeDrag = [...bezierRef.current];
|
|
682
682
|
setActiveHandle(handle);
|
|
683
683
|
updateHandleFromPointer(handle, event);
|
|
684
|
-
(0, pointer_session_1.
|
|
684
|
+
(0, pointer_session_1.startCapturedPointerSession)({
|
|
685
685
|
event,
|
|
686
|
-
|
|
686
|
+
captureTarget: event.currentTarget,
|
|
687
687
|
onMove: (moveEvent) => {
|
|
688
688
|
updateHandleFromPointer(handle, moveEvent);
|
|
689
689
|
},
|
|
@@ -6,7 +6,7 @@ const no_react_1 = require("remotion/no-react");
|
|
|
6
6
|
const use_resolved_stack_react_to_change_1 = require("./use-resolved-stack-react-to-change");
|
|
7
7
|
const use_sequence_props_subscription_1 = require("./use-sequence-props-subscription");
|
|
8
8
|
const SubscribeToNodePaths = ({ overrideId, componentIdentity, schema, getStack, effects }) => {
|
|
9
|
-
const { resolvedLocation, stack, preferMappedNodePath } = (0, use_resolved_stack_react_to_change_1.useResolveStackAndReactToChange)(getStack);
|
|
9
|
+
const { resolvedLocation, stack, preferMappedNodePath } = (0, use_resolved_stack_react_to_change_1.useResolveStackAndReactToChange)(getStack, overrideId);
|
|
10
10
|
const effectSubscriptions = (0, react_1.useMemo)(() => {
|
|
11
11
|
return effects
|
|
12
12
|
.map((effect) => {
|
|
@@ -37,10 +37,12 @@ exports.Timeline = void 0;
|
|
|
37
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
38
|
const react_1 = __importStar(require("react"));
|
|
39
39
|
const remotion_1 = require("remotion");
|
|
40
|
+
const fast_refresh_context_1 = require("../../fast-refresh-context");
|
|
40
41
|
const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
|
|
41
42
|
const calculate_timeline_1 = require("../../helpers/calculate-timeline");
|
|
42
43
|
const client_id_1 = require("../../helpers/client-id");
|
|
43
44
|
const colors_1 = require("../../helpers/colors");
|
|
45
|
+
const inserted_element_selection_1 = require("../../helpers/inserted-element-selection");
|
|
44
46
|
const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
|
|
45
47
|
const is_current_selected_still_1 = require("../../helpers/is-current-selected-still");
|
|
46
48
|
const open_in_editor_1 = require("../../helpers/open-in-editor");
|
|
@@ -230,7 +232,7 @@ const TimelineContextMenuArea = ({ children }) => {
|
|
|
230
232
|
const TimelineInner = () => {
|
|
231
233
|
var _a;
|
|
232
234
|
const { sequences } = (0, react_1.useContext)(remotion_1.Internals.SequenceManager);
|
|
233
|
-
const { compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
235
|
+
const { canvasContent, compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
234
236
|
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
235
237
|
const isStill = (0, is_current_selected_still_1.useIsStill)();
|
|
236
238
|
const { overrideIdToNodePathMappings } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsGettersContext);
|
|
@@ -253,6 +255,58 @@ const TimelineInner = () => {
|
|
|
253
255
|
overrideIdToNodePathMappings,
|
|
254
256
|
compositions,
|
|
255
257
|
]);
|
|
258
|
+
const pendingInsertedElementSelection = (0, react_1.useSyncExternalStore)(inserted_element_selection_1.subscribeToInsertedElementSelection, inserted_element_selection_1.getInsertedElementSelection, inserted_element_selection_1.getInsertedElementSelection);
|
|
259
|
+
const { fastRefreshes } = (0, react_1.useContext)(fast_refresh_context_1.FastRefreshContext);
|
|
260
|
+
const pendingSelectionStart = (0, react_1.useRef)(null);
|
|
261
|
+
const { selectItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
262
|
+
(0, react_1.useEffect)(() => {
|
|
263
|
+
var _a;
|
|
264
|
+
if (pendingInsertedElementSelection === null) {
|
|
265
|
+
pendingSelectionStart.current = null;
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
const matchesInsertedNodePath = (track) => track.nodePathInfo !== null &&
|
|
269
|
+
track.nodePathInfo.sequenceSubscriptionKey.absolutePath ===
|
|
270
|
+
pendingInsertedElementSelection.nodePath.absolutePath &&
|
|
271
|
+
JSON.stringify(track.nodePathInfo.sequenceSubscriptionKey.nodePath) ===
|
|
272
|
+
JSON.stringify(pendingInsertedElementSelection.nodePath.nodePath);
|
|
273
|
+
if (((_a = pendingSelectionStart.current) === null || _a === void 0 ? void 0 : _a.selection) !==
|
|
274
|
+
pendingInsertedElementSelection) {
|
|
275
|
+
pendingSelectionStart.current = {
|
|
276
|
+
selection: pendingInsertedElementSelection,
|
|
277
|
+
fastRefreshes,
|
|
278
|
+
existingSequenceIds: new Set(timeline
|
|
279
|
+
.filter(matchesInsertedNodePath)
|
|
280
|
+
.map((track) => track.sequence.id)),
|
|
281
|
+
};
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
if (pendingSelectionStart.current.fastRefreshes === fastRefreshes) {
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
if ((canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition' &&
|
|
288
|
+
canvasContent.compositionId !==
|
|
289
|
+
pendingInsertedElementSelection.compositionId) {
|
|
290
|
+
(0, inserted_element_selection_1.clearInsertedElementSelection)(pendingInsertedElementSelection);
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
const insertedTrack = timeline.find((track) => {
|
|
294
|
+
var _a;
|
|
295
|
+
return matchesInsertedNodePath(track) &&
|
|
296
|
+
!((_a = pendingSelectionStart.current) === null || _a === void 0 ? void 0 : _a.existingSequenceIds.has(track.sequence.id));
|
|
297
|
+
});
|
|
298
|
+
if (!insertedTrack || insertedTrack.nodePathInfo === null) {
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
selectItems([{ type: 'sequence', nodePathInfo: insertedTrack.nodePathInfo }], { reveal: true });
|
|
302
|
+
(0, inserted_element_selection_1.clearInsertedElementSelection)(pendingInsertedElementSelection);
|
|
303
|
+
}, [
|
|
304
|
+
canvasContent,
|
|
305
|
+
fastRefreshes,
|
|
306
|
+
pendingInsertedElementSelection,
|
|
307
|
+
selectItems,
|
|
308
|
+
timeline,
|
|
309
|
+
]);
|
|
256
310
|
const durationInFrames = (_a = videoConfig === null || videoConfig === void 0 ? void 0 : videoConfig.durationInFrames) !== null && _a !== void 0 ? _a : 0;
|
|
257
311
|
const filtered = (0, react_1.useMemo)(() => {
|
|
258
312
|
return timeline.filter((t) => (0, should_show_track_in_timeline_1.shouldShowTrackInTimeline)(t, durationInFrames));
|
|
@@ -21,6 +21,8 @@ const find_track_for_node_path_info_1 = require("./find-track-for-node-path-info
|
|
|
21
21
|
const imperative_state_1 = require("./imperative-state");
|
|
22
22
|
const keyframe_clipboard_1 = require("./keyframe-clipboard");
|
|
23
23
|
const save_effect_prop_1 = require("./save-effect-prop");
|
|
24
|
+
const save_sequence_prop_1 = require("./save-sequence-prop");
|
|
25
|
+
const sequence_prop_clipboard_1 = require("./sequence-prop-clipboard");
|
|
24
26
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
25
27
|
const update_selected_easing_1 = require("./update-selected-easing");
|
|
26
28
|
const makeClipboardText = (payload) => JSON.stringify(payload);
|
|
@@ -76,37 +78,6 @@ const getPasteEffectsTarget = (selectedItems) => {
|
|
|
76
78
|
};
|
|
77
79
|
};
|
|
78
80
|
exports.getPasteEffectsTarget = getPasteEffectsTarget;
|
|
79
|
-
const isClipboardInterpolationFunction = (value) => {
|
|
80
|
-
return (0, studio_shared_1.isKeyframeInterpolationFunction)(value);
|
|
81
|
-
};
|
|
82
|
-
const effectPropStatusToClipboardParam = (prop) => {
|
|
83
|
-
if (prop.status === 'computed') {
|
|
84
|
-
return null;
|
|
85
|
-
}
|
|
86
|
-
if (prop.status === 'static') {
|
|
87
|
-
if (prop.codeValue === undefined) {
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
return {
|
|
91
|
-
type: 'static',
|
|
92
|
-
value: prop.codeValue,
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
if (!isClipboardInterpolationFunction(prop.interpolationFunction)) {
|
|
96
|
-
return null;
|
|
97
|
-
}
|
|
98
|
-
return {
|
|
99
|
-
type: 'keyframed',
|
|
100
|
-
interpolationFunction: prop.interpolationFunction,
|
|
101
|
-
keyframes: prop.keyframes,
|
|
102
|
-
easing: prop.easing,
|
|
103
|
-
clamping: prop.clamping,
|
|
104
|
-
...(prop.output === undefined || prop.output === 'linear'
|
|
105
|
-
? {}
|
|
106
|
-
: { output: prop.output }),
|
|
107
|
-
...(prop.posterize === undefined ? {} : { posterize: prop.posterize }),
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
81
|
const effectStatusToSnapshot = (effect) => {
|
|
111
82
|
if (effect.importPath === null) {
|
|
112
83
|
return null;
|
|
@@ -116,7 +87,7 @@ const effectStatusToSnapshot = (effect) => {
|
|
|
116
87
|
if (prop.status === 'static' && prop.codeValue === undefined) {
|
|
117
88
|
continue;
|
|
118
89
|
}
|
|
119
|
-
const param =
|
|
90
|
+
const param = (0, sequence_prop_clipboard_1.propStatusToClipboardParam)(prop);
|
|
120
91
|
if (param === null) {
|
|
121
92
|
return null;
|
|
122
93
|
}
|
|
@@ -251,7 +222,7 @@ const getEffectPropClipboardDataFromSelection = ({ selection, propStatuses, }) =
|
|
|
251
222
|
if (!prop) {
|
|
252
223
|
return null;
|
|
253
224
|
}
|
|
254
|
-
const param =
|
|
225
|
+
const param = (0, sequence_prop_clipboard_1.propStatusToClipboardParam)(prop);
|
|
255
226
|
if (param === null) {
|
|
256
227
|
return null;
|
|
257
228
|
}
|
|
@@ -397,7 +368,7 @@ const TimelineClipboardKeybindings = () => {
|
|
|
397
368
|
event: 'keydown',
|
|
398
369
|
key: 'c',
|
|
399
370
|
callback: (e) => {
|
|
400
|
-
var _a;
|
|
371
|
+
var _a, _b;
|
|
401
372
|
const { selectedItems } = currentSelection.current;
|
|
402
373
|
const propStatuses = propStatusesRef.current;
|
|
403
374
|
const sequences = sequencesRef.current;
|
|
@@ -456,10 +427,37 @@ const TimelineClipboardKeybindings = () => {
|
|
|
456
427
|
});
|
|
457
428
|
return;
|
|
458
429
|
}
|
|
430
|
+
if (selectedItems.some((selection) => selection.type === 'sequence-prop')) {
|
|
431
|
+
e.preventDefault();
|
|
432
|
+
if (selectedItems.length !== 1 ||
|
|
433
|
+
((_a = selectedItems[0]) === null || _a === void 0 ? void 0 : _a.type) !== 'sequence-prop') {
|
|
434
|
+
(0, NotificationCenter_1.showNotification)('Select one property to copy its value', 3000);
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
const payload = (0, sequence_prop_clipboard_1.getSequencePropClipboardDataFromSelection)({
|
|
438
|
+
selection: selectedItems[0],
|
|
439
|
+
propStatuses,
|
|
440
|
+
sequences,
|
|
441
|
+
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
442
|
+
});
|
|
443
|
+
if (payload === null) {
|
|
444
|
+
(0, NotificationCenter_1.showNotification)('Cannot copy property because its value cannot be copied', 3000);
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
447
|
+
navigator.clipboard
|
|
448
|
+
.writeText(makeClipboardText(payload))
|
|
449
|
+
.then(() => {
|
|
450
|
+
(0, NotificationCenter_1.showNotification)('Copied property value', 1000);
|
|
451
|
+
})
|
|
452
|
+
.catch((err) => {
|
|
453
|
+
(0, NotificationCenter_1.showNotification)(`Could not copy property: ${err.message}`, 2000);
|
|
454
|
+
});
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
459
457
|
if (selectedItems.some((selection) => selection.type === 'sequence-effect-prop')) {
|
|
460
458
|
e.preventDefault();
|
|
461
459
|
if (selectedItems.length !== 1 ||
|
|
462
|
-
((
|
|
460
|
+
((_b = selectedItems[0]) === null || _b === void 0 ? void 0 : _b.type) !== 'sequence-effect-prop') {
|
|
463
461
|
(0, NotificationCenter_1.showNotification)('Select one effect prop to copy its value', 3000);
|
|
464
462
|
return;
|
|
465
463
|
}
|
|
@@ -732,6 +730,72 @@ const TimelineClipboardKeybindings = () => {
|
|
|
732
730
|
(0, NotificationCenter_1.showNotification)(`Could not paste easing: ${err.message}`, 3000);
|
|
733
731
|
});
|
|
734
732
|
}
|
|
733
|
+
const sequencePropResult = (0, studio_shared_1.parseSequencePropClipboardDataResult)(text);
|
|
734
|
+
if (sequencePropResult.status !== 'invalid') {
|
|
735
|
+
e.preventDefault();
|
|
736
|
+
if (sequencePropResult.status === 'unsupported-version') {
|
|
737
|
+
(0, NotificationCenter_1.showNotification)('Cannot paste property copied from a different Remotion Studio version', 4000);
|
|
738
|
+
return;
|
|
739
|
+
}
|
|
740
|
+
const sequencePropTarget = (0, sequence_prop_clipboard_1.getPasteSequencePropTarget)({
|
|
741
|
+
selectedItems,
|
|
742
|
+
payload: sequencePropResult.data,
|
|
743
|
+
propStatuses,
|
|
744
|
+
sequences,
|
|
745
|
+
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
746
|
+
});
|
|
747
|
+
if (sequencePropTarget.type !== 'valid') {
|
|
748
|
+
switch (sequencePropTarget.type) {
|
|
749
|
+
case 'none':
|
|
750
|
+
(0, NotificationCenter_1.showNotification)('Select a property or sequence to paste onto', 3000);
|
|
751
|
+
return;
|
|
752
|
+
case 'prop-mismatch':
|
|
753
|
+
(0, NotificationCenter_1.showNotification)('Select the same property to paste this value', 3000);
|
|
754
|
+
return;
|
|
755
|
+
case 'uncopyable':
|
|
756
|
+
(0, NotificationCenter_1.showNotification)('Cannot paste onto a property that cannot be updated', 3000);
|
|
757
|
+
return;
|
|
758
|
+
case 'incompatible':
|
|
759
|
+
(0, NotificationCenter_1.showNotification)('The copied value is not compatible with this property', 3000);
|
|
760
|
+
return;
|
|
761
|
+
default:
|
|
762
|
+
throw new Error(`Unexpected paste target: ${sequencePropTarget}`);
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
const { param } = sequencePropResult.data;
|
|
766
|
+
return (0, save_sequence_prop_1.saveSequenceProps)({
|
|
767
|
+
changes: sequencePropTarget.targets.map((pasteTarget) => ({
|
|
768
|
+
fileName: pasteTarget.fileName,
|
|
769
|
+
nodePath: pasteTarget.nodePath,
|
|
770
|
+
fieldKey: pasteTarget.fieldKey,
|
|
771
|
+
value: param.type === 'static' ? param.value : undefined,
|
|
772
|
+
defaultValue: pasteTarget.defaultValue,
|
|
773
|
+
schema: pasteTarget.schema,
|
|
774
|
+
...(param.type === 'keyframed'
|
|
775
|
+
? {
|
|
776
|
+
sourceEdit: {
|
|
777
|
+
type: 'clipboard-param',
|
|
778
|
+
param,
|
|
779
|
+
},
|
|
780
|
+
}
|
|
781
|
+
: {}),
|
|
782
|
+
})),
|
|
783
|
+
addedKeyframes: null,
|
|
784
|
+
movedKeyframes: null,
|
|
785
|
+
setPropStatuses,
|
|
786
|
+
clientId,
|
|
787
|
+
undoLabel: sequencePropTarget.targets.length > 1
|
|
788
|
+
? 'Paste property onto selected sequences'
|
|
789
|
+
: 'Paste property',
|
|
790
|
+
redoLabel: sequencePropTarget.targets.length > 1
|
|
791
|
+
? 'Reapply property paste onto selected sequences'
|
|
792
|
+
: 'Reapply property paste',
|
|
793
|
+
}).then(() => {
|
|
794
|
+
(0, NotificationCenter_1.showNotification)(sequencePropTarget.targets.length > 1
|
|
795
|
+
? 'Pasted property onto selected sequences'
|
|
796
|
+
: 'Pasted property', 2000);
|
|
797
|
+
});
|
|
798
|
+
}
|
|
735
799
|
const effectPropResult = (0, studio_shared_1.parseEffectPropClipboardDataResult)(text);
|
|
736
800
|
if (effectPropResult.status !== 'invalid') {
|
|
737
801
|
e.preventDefault();
|
|
@@ -274,9 +274,9 @@ const TimelineDragHandlerInner = () => {
|
|
|
274
274
|
if (!dragging.dragging) {
|
|
275
275
|
return;
|
|
276
276
|
}
|
|
277
|
-
return (0, pointer_session_1.
|
|
277
|
+
return (0, pointer_session_1.startCapturedPointerSession)({
|
|
278
278
|
event: dragging,
|
|
279
|
-
|
|
279
|
+
captureTarget: dragging.target,
|
|
280
280
|
onMove: onPointerMoveScrubbing,
|
|
281
281
|
onEnd: (reason, endEvent) => {
|
|
282
282
|
if ((reason === 'pointerup' || reason === 'buttons-released') &&
|
|
@@ -63,11 +63,18 @@ const TimelineEffectPropValue = ({ field, nodePath, validatedLocation, sourceFra
|
|
|
63
63
|
status: propStatus,
|
|
64
64
|
frame: sourceFrame,
|
|
65
65
|
value,
|
|
66
|
+
defaultEasing: (0, studio_shared_1.isSchemaFieldHoldOnly)({
|
|
67
|
+
schema: field.effectSchema,
|
|
68
|
+
key: field.key,
|
|
69
|
+
})
|
|
70
|
+
? { type: 'step1' }
|
|
71
|
+
: undefined,
|
|
66
72
|
})
|
|
67
73
|
: remotion_1.Internals.makeStaticDragOverride(value);
|
|
68
74
|
setEffectDragOverrides(nodePath, field.effectIndex, field.key, nextDragOverrideValue);
|
|
69
75
|
}, [
|
|
70
76
|
field.effectIndex,
|
|
77
|
+
field.effectSchema,
|
|
71
78
|
field.key,
|
|
72
79
|
nodePath,
|
|
73
80
|
propStatus,
|
|
@@ -275,9 +275,9 @@ const TimelineInOutDragHandlerInner = () => {
|
|
|
275
275
|
if (inOutDragging.dragging === false) {
|
|
276
276
|
return;
|
|
277
277
|
}
|
|
278
|
-
return (0, pointer_session_1.
|
|
278
|
+
return (0, pointer_session_1.startCapturedPointerSession)({
|
|
279
279
|
event: inOutDragging,
|
|
280
|
-
|
|
280
|
+
captureTarget: inOutDragging.target,
|
|
281
281
|
onMove: onPointerMoveInOut,
|
|
282
282
|
onEnd: (reason, endEvent) => {
|
|
283
283
|
if ((reason === 'pointerup' || reason === 'buttons-released') &&
|
|
@@ -58,9 +58,9 @@ const TimelineLayerEye = ({ onInvoked, hidden, type }) => {
|
|
|
58
58
|
layerPointedDown = hidden ? 'enable' : 'disable';
|
|
59
59
|
onInvoked(layerPointedDown);
|
|
60
60
|
lastPaintedLayerEye = e.currentTarget;
|
|
61
|
-
stopLayerPointerSession = (0, pointer_session_1.
|
|
61
|
+
stopLayerPointerSession = (0, pointer_session_1.startCapturedPointerSession)({
|
|
62
62
|
event: e,
|
|
63
|
-
|
|
63
|
+
captureTarget: e.currentTarget,
|
|
64
64
|
onMove: (moveEvent) => {
|
|
65
65
|
var _a, _b;
|
|
66
66
|
const pointedElement = (_a = document
|
|
@@ -1013,9 +1013,9 @@ const useTimelineMarqueeSelection = () => {
|
|
|
1013
1013
|
const onPointerMove = (moveEvent) => {
|
|
1014
1014
|
updateSelection(moveEvent.clientX, moveEvent.clientY);
|
|
1015
1015
|
};
|
|
1016
|
-
(0, pointer_session_1.
|
|
1016
|
+
(0, pointer_session_1.startCapturedPointerSession)({
|
|
1017
1017
|
event,
|
|
1018
|
-
target,
|
|
1018
|
+
captureTarget: target,
|
|
1019
1019
|
onMove: onPointerMove,
|
|
1020
1020
|
onEnd: (reason, endEvent) => {
|
|
1021
1021
|
if ((reason === 'pointerup' || reason === 'buttons-released') &&
|