@remotion/studio 4.0.474 → 4.0.476
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/Canvas.js +6 -0
- package/dist/components/ColorPicker/ColorPicker.js +4 -31
- package/dist/components/ColorPicker/ColorPickerPopup.d.ts +6 -0
- package/dist/components/ColorPicker/ColorPickerPopup.js +11 -6
- package/dist/components/CompositionSelectorItem.js +4 -4
- package/dist/components/Editor.js +4 -1
- package/dist/components/GlobalKeybindings.js +12 -0
- package/dist/components/KeyboardShortcutsExplainer.js +24 -0
- package/dist/components/Modals.js +2 -1
- package/dist/components/NewComposition/ComboBox.js +1 -0
- package/dist/components/NewComposition/InputDragger.d.ts +6 -0
- package/dist/components/NewComposition/InputDragger.js +40 -14
- package/dist/components/NewComposition/RenameComposition.js +8 -1
- package/dist/components/NewComposition/RenameFolder.js +8 -1
- package/dist/components/NewComposition/RenameStaticFile.js +11 -1
- package/dist/components/Notifications/Notification.js +5 -4
- package/dist/components/Notifications/NotificationCenter.js +1 -1
- package/dist/components/ObserveDefaultPropsContext.js +6 -2
- package/dist/components/PlayPause.js +22 -66
- package/dist/components/PreviewToolbar.js +17 -3
- package/dist/components/RenderModal/RenderModalJSONPropsEditor.js +2 -1
- package/dist/components/SelectedOutlineOverlay.d.ts +104 -42
- package/dist/components/SelectedOutlineOverlay.js +1278 -336
- package/dist/components/SelectedOutlineUvControls.d.ts +17 -0
- package/dist/components/SelectedOutlineUvControls.js +167 -0
- package/dist/components/StudioCanvasCapture.d.ts +5 -0
- package/dist/components/StudioCanvasCapture.js +40 -0
- package/dist/components/Timeline/EasingEditorModal.d.ts +11 -0
- package/dist/components/Timeline/EasingEditorModal.js +247 -0
- package/dist/components/Timeline/KeyframeSettingsModal.js +1 -0
- package/dist/components/Timeline/Timeline.js +10 -7
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +64 -35
- package/dist/components/Timeline/TimelineDragHandler.js +2 -2
- package/dist/components/Timeline/TimelineEffectItem.js +1 -2
- package/dist/components/Timeline/TimelineEffectPropItem.js +1 -1
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.d.ts +1 -0
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +2 -2
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +1 -1
- package/dist/components/Timeline/TimelineHeightContainer.js +2 -0
- package/dist/components/Timeline/TimelineItemStack.js +3 -56
- package/dist/components/Timeline/TimelineKeyframeControls.d.ts +7 -0
- package/dist/components/Timeline/TimelineKeyframeControls.js +259 -62
- package/dist/components/Timeline/TimelineKeyframeDiamond.js +4 -2
- package/dist/components/Timeline/TimelineKeyframeEasingLine.js +128 -3
- package/dist/components/Timeline/TimelineKeyframeTracksContext.d.ts +7 -0
- package/dist/components/Timeline/TimelineKeyframeTracksContext.js +17 -0
- package/dist/components/Timeline/TimelineMediaInfo.js +4 -24
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +4 -0
- package/dist/components/Timeline/TimelineRotationField.js +21 -39
- package/dist/components/Timeline/TimelineScaleField.js +1 -1
- package/dist/components/Timeline/TimelineScrollable.js +19 -3
- package/dist/components/Timeline/TimelineSelection.d.ts +67 -3
- package/dist/components/Timeline/TimelineSelection.js +289 -32
- package/dist/components/Timeline/TimelineSequence.js +17 -9
- package/dist/components/Timeline/TimelineSequenceItem.js +328 -168
- package/dist/components/Timeline/TimelineSequenceName.d.ts +4 -2
- package/dist/components/Timeline/TimelineSequenceName.js +70 -19
- package/dist/components/Timeline/TimelineSequencePropItem.js +1 -1
- package/dist/components/Timeline/TimelineTimeIndicators.js +4 -2
- package/dist/components/Timeline/TimelineTransformOriginField.d.ts +11 -0
- package/dist/components/Timeline/TimelineTransformOriginField.js +138 -0
- package/dist/components/Timeline/TimelineTranslateField.js +1 -1
- package/dist/components/Timeline/TimelineUvCoordinateField.js +1 -1
- package/dist/components/Timeline/call-add-keyframe.d.ts +17 -0
- package/dist/components/Timeline/call-add-keyframe.js +65 -1
- package/dist/components/Timeline/delete-selected-timeline-item.js +23 -13
- package/dist/components/Timeline/disable-sequence-interactivity.d.ts +8 -0
- package/dist/components/Timeline/disable-sequence-interactivity.js +24 -0
- package/dist/components/Timeline/reset-selected-timeline-props.js +15 -7
- package/dist/components/Timeline/timeline-rotation-utils.d.ts +2 -0
- package/dist/components/Timeline/timeline-rotation-utils.js +34 -0
- package/dist/components/Timeline/transform-origin-utils.d.ts +24 -0
- package/dist/components/Timeline/transform-origin-utils.js +170 -0
- package/dist/components/Timeline/update-selected-easing.d.ts +35 -0
- package/dist/components/Timeline/update-selected-easing.js +133 -0
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.d.ts +1 -0
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +28 -0
- package/dist/components/Timeline/use-timeline-keyframe-drag.js +8 -13
- package/dist/components/canvas-capture-enabled.d.ts +1 -0
- package/dist/components/canvas-capture-enabled.js +4 -0
- package/dist/components/effect-drag-and-drop.d.ts +11 -0
- package/dist/components/effect-drag-and-drop.js +73 -0
- package/dist/components/selected-outline-geometry.d.ts +20 -0
- package/dist/components/selected-outline-geometry.js +18 -0
- package/dist/components/selected-outline-uv.d.ts +46 -0
- package/dist/components/selected-outline-uv.js +240 -0
- package/dist/esm/{chunk-xjvc8qen.js → chunk-0atarw3p.js} +8779 -5352
- package/dist/esm/internals.mjs +8779 -5352
- package/dist/esm/previewEntry.mjs +8789 -5362
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/colors.d.ts +0 -1
- package/dist/helpers/colors.js +1 -2
- package/dist/state/modals.d.ts +2 -1
- package/package.json +11 -10
|
@@ -68,66 +68,22 @@ const PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds, muted }
|
|
|
68
68
|
pauseAndReturnToPlayStart();
|
|
69
69
|
}
|
|
70
70
|
}, [pauseAndReturnToPlayStart, playing]);
|
|
71
|
-
const onArrowLeft = (0, react_1.useCallback)((e) => {
|
|
72
|
-
e.preventDefault();
|
|
73
|
-
if (e.altKey) {
|
|
74
|
-
seek(0);
|
|
75
|
-
(0, timeline_scroll_logic_1.ensureFrameIsInViewport)({
|
|
76
|
-
direction: 'fit-left',
|
|
77
|
-
durationInFrames: (0, imperative_state_1.getCurrentDuration)(),
|
|
78
|
-
frame: 0,
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
else if (e.shiftKey) {
|
|
82
|
-
frameBack((0, imperative_state_1.getCurrentFps)());
|
|
83
|
-
(0, timeline_scroll_logic_1.ensureFrameIsInViewport)({
|
|
84
|
-
direction: 'fit-left',
|
|
85
|
-
durationInFrames: (0, imperative_state_1.getCurrentDuration)(),
|
|
86
|
-
frame: Math.max(0, getCurrentFrame() - (0, imperative_state_1.getCurrentFps)()),
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
frameBack(1);
|
|
91
|
-
(0, timeline_scroll_logic_1.ensureFrameIsInViewport)({
|
|
92
|
-
direction: 'fit-left',
|
|
93
|
-
durationInFrames: (0, imperative_state_1.getCurrentDuration)(),
|
|
94
|
-
frame: Math.max(0, getCurrentFrame() - 1),
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
}, [frameBack, seek, getCurrentFrame]);
|
|
98
|
-
const onArrowRight = (0, react_1.useCallback)((e) => {
|
|
99
|
-
if (e.altKey) {
|
|
100
|
-
seek((0, imperative_state_1.getCurrentDuration)() - 1);
|
|
101
|
-
(0, timeline_scroll_logic_1.ensureFrameIsInViewport)({
|
|
102
|
-
direction: 'fit-right',
|
|
103
|
-
durationInFrames: (0, imperative_state_1.getCurrentDuration)() - 1,
|
|
104
|
-
frame: (0, imperative_state_1.getCurrentDuration)() - 1,
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
else if (e.shiftKey) {
|
|
108
|
-
frameForward((0, imperative_state_1.getCurrentFps)());
|
|
109
|
-
(0, timeline_scroll_logic_1.ensureFrameIsInViewport)({
|
|
110
|
-
direction: 'fit-right',
|
|
111
|
-
durationInFrames: (0, imperative_state_1.getCurrentDuration)(),
|
|
112
|
-
frame: Math.min((0, imperative_state_1.getCurrentDuration)() - 1, getCurrentFrame() + (0, imperative_state_1.getCurrentFps)()),
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
frameForward(1);
|
|
117
|
-
(0, timeline_scroll_logic_1.ensureFrameIsInViewport)({
|
|
118
|
-
direction: 'fit-right',
|
|
119
|
-
durationInFrames: (0, imperative_state_1.getCurrentDuration)(),
|
|
120
|
-
frame: Math.min((0, imperative_state_1.getCurrentDuration)() - 1, getCurrentFrame() + 1),
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
e.preventDefault();
|
|
124
|
-
}, [frameForward, seek, getCurrentFrame]);
|
|
125
71
|
const oneFrameBack = (0, react_1.useCallback)(() => {
|
|
126
72
|
frameBack(1);
|
|
127
|
-
|
|
73
|
+
(0, timeline_scroll_logic_1.ensureFrameIsInViewport)({
|
|
74
|
+
direction: 'fit-left',
|
|
75
|
+
durationInFrames: (0, imperative_state_1.getCurrentDuration)(),
|
|
76
|
+
frame: Math.max(0, getCurrentFrame() - 1),
|
|
77
|
+
});
|
|
78
|
+
}, [frameBack, getCurrentFrame]);
|
|
128
79
|
const oneFrameForward = (0, react_1.useCallback)(() => {
|
|
129
80
|
frameForward(1);
|
|
130
|
-
|
|
81
|
+
(0, timeline_scroll_logic_1.ensureFrameIsInViewport)({
|
|
82
|
+
direction: 'fit-right',
|
|
83
|
+
durationInFrames: (0, imperative_state_1.getCurrentDuration)(),
|
|
84
|
+
frame: Math.min((0, imperative_state_1.getCurrentDuration)() - 1, getCurrentFrame() + 1),
|
|
85
|
+
});
|
|
86
|
+
}, [frameForward, getCurrentFrame]);
|
|
131
87
|
const jumpToStart = (0, react_1.useCallback)(() => {
|
|
132
88
|
seek(inFrame !== null && inFrame !== void 0 ? inFrame : 0);
|
|
133
89
|
}, [seek, inFrame]);
|
|
@@ -136,20 +92,20 @@ const PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds, muted }
|
|
|
136
92
|
}, [seek, outFrame]);
|
|
137
93
|
const keybindings = (0, use_keybinding_1.useKeybinding)();
|
|
138
94
|
(0, react_1.useEffect)(() => {
|
|
139
|
-
const
|
|
95
|
+
const commandArrowLeft = keybindings.registerKeybinding({
|
|
140
96
|
event: 'keydown',
|
|
141
97
|
key: 'ArrowLeft',
|
|
142
|
-
callback:
|
|
143
|
-
commandCtrlKey:
|
|
98
|
+
callback: oneFrameBack,
|
|
99
|
+
commandCtrlKey: true,
|
|
144
100
|
preventDefault: true,
|
|
145
101
|
triggerIfInputFieldFocused: false,
|
|
146
102
|
keepRegisteredWhenNotHighestContext: false,
|
|
147
103
|
});
|
|
148
|
-
const
|
|
104
|
+
const commandArrowRight = keybindings.registerKeybinding({
|
|
149
105
|
event: 'keydown',
|
|
150
106
|
key: 'ArrowRight',
|
|
151
|
-
callback:
|
|
152
|
-
commandCtrlKey:
|
|
107
|
+
callback: oneFrameForward,
|
|
108
|
+
commandCtrlKey: true,
|
|
153
109
|
preventDefault: true,
|
|
154
110
|
triggerIfInputFieldFocused: false,
|
|
155
111
|
keepRegisteredWhenNotHighestContext: false,
|
|
@@ -191,8 +147,8 @@ const PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds, muted }
|
|
|
191
147
|
keepRegisteredWhenNotHighestContext: false,
|
|
192
148
|
});
|
|
193
149
|
return () => {
|
|
194
|
-
|
|
195
|
-
|
|
150
|
+
commandArrowLeft.unregister();
|
|
151
|
+
commandArrowRight.unregister();
|
|
196
152
|
space.unregister();
|
|
197
153
|
enter.unregister();
|
|
198
154
|
a.unregister();
|
|
@@ -202,10 +158,10 @@ const PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds, muted }
|
|
|
202
158
|
jumpToEnd,
|
|
203
159
|
jumpToStart,
|
|
204
160
|
keybindings,
|
|
205
|
-
onArrowLeft,
|
|
206
|
-
onArrowRight,
|
|
207
161
|
onEnter,
|
|
208
162
|
onSpace,
|
|
163
|
+
oneFrameBack,
|
|
164
|
+
oneFrameForward,
|
|
209
165
|
]);
|
|
210
166
|
(0, react_1.useEffect)(() => {
|
|
211
167
|
let timeout = null;
|
|
@@ -23,7 +23,6 @@ const PlaybackRateSelector_1 = require("./PlaybackRateSelector");
|
|
|
23
23
|
const PlayPause_1 = require("./PlayPause");
|
|
24
24
|
const RenderButton_1 = require("./RenderButton");
|
|
25
25
|
const SizeSelector_1 = require("./SizeSelector");
|
|
26
|
-
const TimelineSelection_1 = require("./Timeline/TimelineSelection");
|
|
27
26
|
const TimelineZoomControls_1 = require("./Timeline/TimelineZoomControls");
|
|
28
27
|
const TimelineInOutToggle_1 = require("./TimelineInOutToggle");
|
|
29
28
|
const TOOLBAR_HEIGHT = 50;
|
|
@@ -96,7 +95,21 @@ const PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
|
|
|
96
95
|
const isFullscreenSupported = (0, check_fullscreen_support_1.checkFullscreenSupport)();
|
|
97
96
|
const isMobileLayout = (0, mobile_layout_1.useMobileLayout)();
|
|
98
97
|
(0, react_1.useEffect)(() => {
|
|
99
|
-
if (isMobileLayout
|
|
98
|
+
if (!isMobileLayout) {
|
|
99
|
+
// The indicators are `position: fixed` and are shown/placed
|
|
100
|
+
// imperatively by the scroll handler below. Without this reset,
|
|
101
|
+
// leaving the mobile layout (window resized past the breakpoint)
|
|
102
|
+
// leaves them visible at stale viewport coordinates — an orphaned
|
|
103
|
+
// grey gradient rectangle floating over the canvas.
|
|
104
|
+
if (leftScrollIndicatorRef.current) {
|
|
105
|
+
leftScrollIndicatorRef.current.style.display = 'none';
|
|
106
|
+
}
|
|
107
|
+
if (rightScrollIndicatorRef.current) {
|
|
108
|
+
rightScrollIndicatorRef.current.style.display = 'none';
|
|
109
|
+
}
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (previewToolbarRef.current) {
|
|
100
113
|
const updateScrollableIndicatorProps = (target) => {
|
|
101
114
|
var _a;
|
|
102
115
|
const boundingBox = target.getBoundingClientRect();
|
|
@@ -152,7 +165,8 @@ const PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
|
|
|
152
165
|
] }), jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(SizeSelector_1.SizeSelector, {}) }), isStill || isVideoComposition ? (jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(PlaybackRateSelector_1.PlaybackRateSelector, { setPlaybackRate: setPlaybackRate, playbackRate: playbackRate }) })) : null] })), isVideoComposition ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
153
166
|
jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(PlayPause_1.PlayPause, { bufferStateDelayInMilliseconds: bufferStateDelayInMilliseconds, loop: loop, playbackRate: playbackRate, muted: mediaMuted }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(LoopToggle_1.LoopToggle, { loop: loop, setLoop: setLoop }) }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(MuteToggle_1.MuteToggle, { muted: mediaMuted, setMuted: setMediaMuted }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(TimelineInOutToggle_1.TimelineInOutPointToggle, {}) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 })
|
|
154
167
|
] })) : null, (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition' ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
155
|
-
jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(CheckboardToggle_1.CheckboardToggle, {}) }),
|
|
168
|
+
jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(CheckboardToggle_1.CheckboardToggle, {}) }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(OutlineToggle_1.OutlineToggle, {}) })
|
|
169
|
+
] })) : null, jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), canvasContent && isFullscreenSupported ? (jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(FullscreenToggle_1.FullScreenToggle, {}) })) : null, jsx_runtime_1.jsx(layout_1.Flex, {}), isMobileLayout && (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
156
170
|
jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(SizeSelector_1.SizeSelector, {}) }), isStill || isVideoComposition ? (jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(PlaybackRateSelector_1.PlaybackRateSelector, { setPlaybackRate: setPlaybackRate, playbackRate: playbackRate }) })) : null] })), jsx_runtime_1.jsxs("div", { style: sideContainer, children: [
|
|
157
171
|
jsx_runtime_1.jsx(layout_1.Flex, {}), !isMobileLayout && jsx_runtime_1.jsx(FpsCounter_1.FpsCounter, { playbackSpeed: playbackRate }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(RenderButton_1.RenderButton, { readOnlyStudio: readOnlyStudio }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1.5 })
|
|
158
172
|
] }), jsx_runtime_1.jsx(PlaybackKeyboardShortcutsManager_1.PlaybackKeyboardShortcutsManager, { setPlaybackRate: setPlaybackRate }), jsx_runtime_1.jsx(PlaybackRatePersistor_1.PlaybackRatePersistor, {}), jsx_runtime_1.jsx("div", { ref: rightScrollIndicatorRef, style: scrollIndicatorRight })
|
|
@@ -103,7 +103,8 @@ const RenderModalJSONPropsEditor = ({ setValue, value, defaultProps, onSave, ser
|
|
|
103
103
|
}
|
|
104
104
|
const { result } = e;
|
|
105
105
|
if (result.canUpdate) {
|
|
106
|
-
const
|
|
106
|
+
const deserialized = no_react_1.NoReactInternals.deserializeJSONWithSpecialTypes(JSON.stringify(result.currentDefaultProps));
|
|
107
|
+
const nextState = parseJS(deserialized, schema);
|
|
107
108
|
setLocalValue(nextState);
|
|
108
109
|
}
|
|
109
110
|
});
|
|
@@ -1,33 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CanUpdateSequencePropStatusKeyframed, CanUpdateSequencePropStatusStatic, GetDragOverrides, OverrideIdToNodePaths, SequenceFieldSchema, SequencePropsSubscriptionKey, SequenceSchema, TSequence } from 'remotion';
|
|
3
3
|
import type { SequenceNodePathInfo } from '../helpers/get-timeline-sequence-sort-key';
|
|
4
|
+
import { type OutlinePoint } from './selected-outline-geometry';
|
|
4
5
|
import { type SaveSequencePropChange } from './Timeline/save-sequence-prop';
|
|
5
6
|
import { type TimelineSelection, type TimelineSelectionInteraction } from './Timeline/TimelineSelection';
|
|
6
|
-
type OutlinePoint = {
|
|
7
|
-
readonly x: number;
|
|
8
|
-
readonly y: number;
|
|
9
|
-
};
|
|
10
|
-
export type UvCoordinate = readonly [number, number];
|
|
11
|
-
export type UvCoordinateFieldSchema = Extract<SequenceFieldSchema, {
|
|
12
|
-
type: 'uv-coordinate';
|
|
13
|
-
}>;
|
|
14
|
-
type SelectedOutlineUvHandle = {
|
|
15
|
-
readonly clientId: string;
|
|
16
|
-
readonly propStatus: CanUpdateSequencePropStatusStatic;
|
|
17
|
-
readonly effectIndex: number;
|
|
18
|
-
readonly fieldDefault: UvCoordinate | undefined;
|
|
19
|
-
readonly fieldKey: string;
|
|
20
|
-
readonly fieldSchema: UvCoordinateFieldSchema;
|
|
21
|
-
readonly nodePath: SequencePropsSubscriptionKey;
|
|
22
|
-
readonly schema: SequenceSchema;
|
|
23
|
-
readonly value: UvCoordinate;
|
|
24
|
-
};
|
|
25
|
-
type UvConnectionHandle = Pick<SelectedOutlineUvHandle, 'effectIndex' | 'fieldKey' | 'fieldSchema' | 'value'>;
|
|
26
|
-
type UvHandleConnectionLine = {
|
|
27
|
-
readonly key: string;
|
|
28
|
-
readonly from: OutlinePoint;
|
|
29
|
-
readonly to: OutlinePoint;
|
|
30
|
-
};
|
|
31
7
|
type SelectedOutlineDragTarget = {
|
|
32
8
|
readonly propStatus: CanUpdateSequencePropStatusStatic | CanUpdateSequencePropStatusKeyframed;
|
|
33
9
|
readonly clientId: string;
|
|
@@ -39,15 +15,29 @@ type SelectedOutlineDragTarget = {
|
|
|
39
15
|
type ScaleFieldSchema = Extract<SequenceFieldSchema, {
|
|
40
16
|
type: 'scale';
|
|
41
17
|
}>;
|
|
18
|
+
type RotationFieldSchema = Extract<SequenceFieldSchema, {
|
|
19
|
+
type: 'rotation-css';
|
|
20
|
+
}>;
|
|
42
21
|
type SelectedOutlineScaleDragTarget = {
|
|
43
|
-
readonly propStatus: CanUpdateSequencePropStatusStatic;
|
|
22
|
+
readonly propStatus: CanUpdateSequencePropStatusStatic | CanUpdateSequencePropStatusKeyframed;
|
|
44
23
|
readonly clientId: string;
|
|
45
24
|
readonly fieldDefault: number | string | undefined;
|
|
46
25
|
readonly fieldSchema: ScaleFieldSchema;
|
|
26
|
+
readonly keyframeDisplayOffset: number;
|
|
47
27
|
readonly linked: boolean;
|
|
48
28
|
readonly nodePath: SequencePropsSubscriptionKey;
|
|
49
29
|
readonly schema: SequenceSchema;
|
|
50
30
|
};
|
|
31
|
+
type SelectedOutlineRotationDragTarget = {
|
|
32
|
+
readonly propStatus: CanUpdateSequencePropStatusStatic | CanUpdateSequencePropStatusKeyframed;
|
|
33
|
+
readonly clientId: string;
|
|
34
|
+
readonly fieldDefault: string | undefined;
|
|
35
|
+
readonly fieldSchema: RotationFieldSchema;
|
|
36
|
+
readonly keyframeDisplayOffset: number;
|
|
37
|
+
readonly nodePath: SequencePropsSubscriptionKey;
|
|
38
|
+
readonly schema: SequenceSchema;
|
|
39
|
+
readonly transformOriginValue: string;
|
|
40
|
+
};
|
|
51
41
|
export type SelectedOutlineDragState = {
|
|
52
42
|
readonly defaultValue: string | null;
|
|
53
43
|
readonly key: string;
|
|
@@ -59,11 +49,19 @@ export type SelectedOutlineDragState = {
|
|
|
59
49
|
export type SelectedOutlineScaleDragState = {
|
|
60
50
|
readonly defaultValue: string | null;
|
|
61
51
|
readonly key: string;
|
|
52
|
+
readonly sourceFrame: number;
|
|
62
53
|
readonly startX: number;
|
|
63
54
|
readonly startY: number;
|
|
64
55
|
readonly startZ: number;
|
|
65
56
|
readonly target: SelectedOutlineScaleDragTarget;
|
|
66
57
|
};
|
|
58
|
+
export type SelectedOutlineRotationDragState = {
|
|
59
|
+
readonly defaultValue: string | null;
|
|
60
|
+
readonly key: string;
|
|
61
|
+
readonly sourceFrame: number;
|
|
62
|
+
readonly startDegrees: number;
|
|
63
|
+
readonly target: SelectedOutlineRotationDragTarget;
|
|
64
|
+
};
|
|
67
65
|
type SequenceWithSelectedOutline = {
|
|
68
66
|
readonly depth: number;
|
|
69
67
|
readonly keyframeDisplayOffset: number;
|
|
@@ -71,13 +69,38 @@ type SequenceWithSelectedOutline = {
|
|
|
71
69
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
72
70
|
readonly sequence: TSequence;
|
|
73
71
|
};
|
|
74
|
-
export declare const
|
|
75
|
-
export declare const
|
|
76
|
-
readonly
|
|
72
|
+
export declare const selectedOutlineDragThresholdPx = 4;
|
|
73
|
+
export declare const getSelectedOutlineRotationDeltaDegrees: ({ from, to, }: {
|
|
74
|
+
readonly from: number;
|
|
75
|
+
readonly to: number;
|
|
76
|
+
}) => number;
|
|
77
|
+
export type SelectedOutlineRotationCorner = 'top-left' | 'top-right' | 'bottom-right' | 'bottom-left';
|
|
78
|
+
export declare const getSelectedOutlineRotationCornerInfo: (points: readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint], corner: SelectedOutlineRotationCorner) => {
|
|
79
|
+
center: OutlinePoint;
|
|
80
|
+
cursor: string;
|
|
81
|
+
cursorDegrees: number;
|
|
82
|
+
point: OutlinePoint;
|
|
83
|
+
};
|
|
84
|
+
export declare const getSelectedOutlineRotationPivot: ({ dimensions, points, transformOriginValue, }: {
|
|
85
|
+
readonly dimensions: {
|
|
86
|
+
readonly width: number;
|
|
87
|
+
readonly height: number;
|
|
88
|
+
} | null;
|
|
77
89
|
readonly points: readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint];
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
90
|
+
readonly transformOriginValue: string;
|
|
91
|
+
}) => OutlinePoint;
|
|
92
|
+
type SvgViewport = {
|
|
93
|
+
readonly x: number;
|
|
94
|
+
readonly y: number;
|
|
95
|
+
readonly width: number;
|
|
96
|
+
readonly height: number;
|
|
97
|
+
};
|
|
98
|
+
type SvgScreenCtm = Pick<DOMMatrixReadOnly, 'a' | 'b' | 'c' | 'd' | 'e' | 'f'>;
|
|
99
|
+
export declare const getTransformedSvgViewportPoints: ({ viewport, ctm, containerRect, }: {
|
|
100
|
+
readonly viewport: SvgViewport;
|
|
101
|
+
readonly ctm: SvgScreenCtm;
|
|
102
|
+
readonly containerRect: Pick<DOMRect, "left" | "top">;
|
|
103
|
+
}) => readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint];
|
|
81
104
|
export declare const getSelectedSequenceKeys: (selectedItems: readonly TimelineSelection[]) => Set<string>;
|
|
82
105
|
export declare const getOutlineSelectionInteraction: ({ shiftKey, metaKey, ctrlKey, }: {
|
|
83
106
|
readonly shiftKey: boolean;
|
|
@@ -98,6 +121,18 @@ export declare const getSelectedOutlineDragValues: ({ dragStates, deltaX, deltaY
|
|
|
98
121
|
readonly deltaX: number;
|
|
99
122
|
readonly deltaY: number;
|
|
100
123
|
}) => Map<string, string>;
|
|
124
|
+
export declare const applySelectedOutlineDragAxisLock: ({ deltaX, deltaY, axisLocked, }: {
|
|
125
|
+
readonly deltaX: number;
|
|
126
|
+
readonly deltaY: number;
|
|
127
|
+
readonly axisLocked: boolean;
|
|
128
|
+
}) => {
|
|
129
|
+
deltaX: number;
|
|
130
|
+
deltaY: number;
|
|
131
|
+
};
|
|
132
|
+
export declare const isSelectedOutlineDragPastThreshold: ({ deltaX, deltaY, }: {
|
|
133
|
+
readonly deltaX: number;
|
|
134
|
+
readonly deltaY: number;
|
|
135
|
+
}) => boolean;
|
|
101
136
|
export type SelectedOutlineStaticDragChange = SaveSequencePropChange & {
|
|
102
137
|
readonly type: 'static';
|
|
103
138
|
};
|
|
@@ -116,19 +151,34 @@ export declare const getSelectedOutlineDragChanges: ({ dragStates, lastValues, }
|
|
|
116
151
|
readonly dragStates: readonly SelectedOutlineDragState[];
|
|
117
152
|
readonly lastValues: ReadonlyMap<string, string>;
|
|
118
153
|
}) => SelectedOutlineDragChange[];
|
|
154
|
+
export type SelectedOutlineKeyboardNudgeDirection = 'left' | 'right' | 'up' | 'down';
|
|
155
|
+
export declare const getSelectedOutlineKeyboardNudgeDelta: ({ direction, shiftKey, }: {
|
|
156
|
+
readonly direction: SelectedOutlineKeyboardNudgeDirection;
|
|
157
|
+
readonly shiftKey: boolean;
|
|
158
|
+
}) => number;
|
|
159
|
+
export declare const getSelectedOutlineKeyboardNudgeDeltas: ({ deltaX, deltaY, direction, shiftKey, }: {
|
|
160
|
+
readonly deltaX: number;
|
|
161
|
+
readonly deltaY: number;
|
|
162
|
+
readonly direction: SelectedOutlineKeyboardNudgeDirection;
|
|
163
|
+
readonly shiftKey: boolean;
|
|
164
|
+
}) => {
|
|
165
|
+
deltaX: number;
|
|
166
|
+
deltaY: number;
|
|
167
|
+
};
|
|
119
168
|
export type SelectedOutlineScaleEdge = 'top' | 'right' | 'bottom' | 'left';
|
|
120
169
|
type SelectedOutlineScaleEdgeInfo = {
|
|
121
170
|
readonly axis: 'x' | 'y';
|
|
122
|
-
readonly cursor:
|
|
171
|
+
readonly cursor: string;
|
|
123
172
|
readonly end: OutlinePoint;
|
|
124
173
|
readonly extent: number;
|
|
125
174
|
readonly normal: OutlinePoint;
|
|
126
175
|
readonly start: OutlinePoint;
|
|
127
176
|
};
|
|
128
177
|
export declare const getSelectedOutlineScaleEdgeInfo: (points: readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint], edge: SelectedOutlineScaleEdge) => SelectedOutlineScaleEdgeInfo | null;
|
|
129
|
-
export declare const getSelectedOutlineScaleDragStates: ({ dragTargets, getDragOverrides, }: {
|
|
178
|
+
export declare const getSelectedOutlineScaleDragStates: ({ dragTargets, getDragOverrides, timelinePosition, }: {
|
|
130
179
|
readonly dragTargets: readonly SelectedOutlineScaleDragTarget[];
|
|
131
180
|
readonly getDragOverrides: GetDragOverrides;
|
|
181
|
+
readonly timelinePosition: number;
|
|
132
182
|
}) => SelectedOutlineScaleDragState[];
|
|
133
183
|
export declare const getSelectedOutlineScaleDragValues: ({ axis, dragStates, scaleFactor, }: {
|
|
134
184
|
readonly axis: "x" | "y";
|
|
@@ -138,14 +188,26 @@ export declare const getSelectedOutlineScaleDragValues: ({ axis, dragStates, sca
|
|
|
138
188
|
export declare const getSelectedOutlineScaleDragChanges: ({ dragStates, lastValues, }: {
|
|
139
189
|
readonly dragStates: readonly SelectedOutlineScaleDragState[];
|
|
140
190
|
readonly lastValues: ReadonlyMap<string, string | number>;
|
|
141
|
-
}) =>
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
191
|
+
}) => SelectedOutlineDragChange[];
|
|
192
|
+
export declare const getSelectedOutlineRotationDragStates: ({ dragTargets, getDragOverrides, timelinePosition, }: {
|
|
193
|
+
readonly dragTargets: readonly SelectedOutlineRotationDragTarget[];
|
|
194
|
+
readonly getDragOverrides: GetDragOverrides;
|
|
195
|
+
readonly timelinePosition: number;
|
|
196
|
+
}) => SelectedOutlineRotationDragState[];
|
|
197
|
+
export declare const getSelectedOutlineRotationDragValues: ({ dragStates, rotationDeltaDegrees, }: {
|
|
198
|
+
readonly dragStates: readonly SelectedOutlineRotationDragState[];
|
|
199
|
+
readonly rotationDeltaDegrees: number;
|
|
200
|
+
}) => Map<string, string>;
|
|
201
|
+
export declare const getSelectedOutlineRotationDragChanges: ({ dragStates, lastValues, }: {
|
|
202
|
+
readonly dragStates: readonly SelectedOutlineRotationDragState[];
|
|
203
|
+
readonly lastValues: ReadonlyMap<string, string>;
|
|
204
|
+
}) => SelectedOutlineDragChange[];
|
|
205
|
+
export declare const compensateTranslateForTransformOrigin: ({ startTranslate, deltaOrigin, rotate, scale, }: {
|
|
206
|
+
readonly startTranslate: readonly [number, number];
|
|
207
|
+
readonly deltaOrigin: readonly [number, number];
|
|
208
|
+
readonly rotate: number;
|
|
209
|
+
readonly scale: readonly [number, number];
|
|
210
|
+
}) => readonly [number, number];
|
|
149
211
|
export declare const SelectedOutlineOverlay: React.FC<{
|
|
150
212
|
readonly scale: number;
|
|
151
213
|
}>;
|