@remotion/studio 4.0.495 → 4.0.497
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 +7 -7
- package/dist/components/AudioWaveform.js +1 -11
- package/dist/components/Canvas.js +22 -203
- package/dist/components/CompositionSelectorItem.js +5 -31
- package/dist/components/CurrentAsset.js +4 -3
- package/dist/components/InlineCompositionName.js +1 -1
- package/dist/components/InlineEditableTitle.d.ts +1 -0
- package/dist/components/InlineEditableTitle.js +56 -11
- package/dist/components/InspectorInfoHeader.d.ts +2 -0
- package/dist/components/InspectorInfoHeader.js +16 -4
- package/dist/components/InspectorLocationCopy.js +2 -2
- package/dist/components/InspectorPanel/AlignmentControls.js +2 -0
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +11 -6
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +27 -2
- package/dist/components/InspectorPanel/EasingInspector.js +1 -1
- package/dist/components/InspectorPanel/KeyframeInspector.js +7 -8
- package/dist/components/InspectorPanel/KeyframeSettings.js +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +28 -3
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +67 -10
- package/dist/components/InspectorPanel/common.d.ts +4 -2
- package/dist/components/InspectorPanel/common.js +18 -18
- package/dist/components/InspectorPanel/styles.d.ts +0 -3
- package/dist/components/InspectorPanel/styles.js +5 -40
- package/dist/components/InspectorPanel/use-composition-actions.js +6 -2
- package/dist/components/InspectorSequenceSection.js +12 -2
- package/dist/components/InspectorSourceLocation.d.ts +1 -0
- package/dist/components/InspectorSourceLocation.js +5 -1
- package/dist/components/NewComposition/CodemodFooter.d.ts +1 -1
- package/dist/components/NewComposition/CodemodFooter.js +23 -4
- package/dist/components/NewComposition/ComboBox.d.ts +2 -1
- package/dist/components/NewComposition/ComboBox.js +32 -7
- package/dist/components/NewComposition/InputDragger.d.ts +6 -0
- package/dist/components/NewComposition/InputDragger.js +12 -3
- package/dist/components/NewComposition/NewComposition.js +1 -1
- package/dist/components/NewComposition/use-rename-static-file.js +1 -1
- package/dist/components/PlaybackRateSelector.js +3 -3
- package/dist/components/PreviewToolbar.js +3 -3
- package/dist/components/RenderButton.d.ts +1 -0
- package/dist/components/RenderButton.js +51 -7
- package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
- package/dist/components/SelectedOutlineElement.js +56 -88
- package/dist/components/SelectedOutlineOverlay.d.ts +1 -1
- package/dist/components/SelectedOutlineOverlay.js +9 -10
- package/dist/components/SizeSelector.js +3 -3
- package/dist/components/Timeline/Timeline.js +10 -3
- package/dist/components/Timeline/TimelineAssetDropIndicator.d.ts +2 -0
- package/dist/components/Timeline/TimelineAssetDropIndicator.js +37 -0
- package/dist/components/Timeline/TimelineAssetField.js +1 -1
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +1 -7
- package/dist/components/Timeline/TimelineEnumField.js +1 -1
- package/dist/components/Timeline/TimelineFieldLabel.js +3 -3
- package/dist/components/Timeline/TimelineKeyframeControls.js +26 -6
- package/dist/components/Timeline/TimelineRowChrome.js +10 -2
- package/dist/components/Timeline/TimelineRowLayoutContext.d.ts +3 -0
- package/dist/components/Timeline/TimelineRowLayoutContext.js +6 -0
- package/dist/components/Timeline/TimelineScrollable.js +3 -2
- package/dist/components/Timeline/TimelineSelection.d.ts +4 -0
- package/dist/components/Timeline/TimelineSelection.js +40 -5
- package/dist/components/Timeline/TimelineSequence.js +20 -8
- package/dist/components/Timeline/TimelineSequenceFrame.js +2 -4
- package/dist/components/Timeline/TimelineSequenceItem.js +2 -0
- package/dist/components/Timeline/TimelineSequencePropItem.js +4 -0
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +15 -3
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +96 -18
- package/dist/components/Timeline/TimelineTimeIndicators.d.ts +16 -0
- package/dist/components/Timeline/TimelineTimeIndicators.js +154 -35
- package/dist/components/Timeline/TimelineTranslateField.js +2 -1
- package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -0
- package/dist/components/Timeline/TimelineVideoInfo.js +4 -1
- package/dist/components/Timeline/delete-selected-timeline-item.d.ts +2 -0
- package/dist/components/Timeline/delete-selected-timeline-item.js +5 -4
- package/dist/components/Timeline/disable-sequence-interactivity.js +2 -0
- package/dist/components/Timeline/get-timeline-media-visualization-layout.d.ts +8 -0
- package/dist/components/Timeline/get-timeline-media-visualization-layout.js +10 -0
- package/dist/components/Timeline/get-timeline-video-info-widths.js +11 -3
- package/dist/components/Timeline/keyframe-clipboard.js +21 -5
- package/dist/components/Timeline/reset-selected-timeline-props.js +2 -0
- package/dist/components/Timeline/save-sequence-prop.d.ts +5 -3
- package/dist/components/Timeline/save-sequence-prop.js +43 -18
- package/dist/components/Timeline/should-clear-selection-on-pointer-down.d.ts +2 -0
- package/dist/components/Timeline/should-clear-selection-on-pointer-down.js +1 -1
- package/dist/components/Timeline/timeline-asset-drop-context.d.ts +1 -0
- package/dist/components/Timeline/timeline-asset-drop-context.js +5 -0
- package/dist/components/Timeline/timeline-scroll-logic.d.ts +7 -0
- package/dist/components/Timeline/timeline-scroll-logic.js +10 -1
- package/dist/components/Timeline/use-rename-sequence.js +2 -0
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +2 -0
- package/dist/components/Timeline/use-timeline-asset-drop.d.ts +1 -0
- package/dist/components/Timeline/use-timeline-asset-drop.js +168 -0
- package/dist/components/composition-menu-items.d.ts +15 -1
- package/dist/components/composition-menu-items.js +137 -107
- package/dist/components/drop-handler-data.d.ts +13 -0
- package/dist/components/drop-handler-data.js +117 -0
- package/dist/components/handle-drop.d.ts +13 -0
- package/dist/components/handle-drop.js +115 -0
- package/dist/components/import-assets.d.ts +26 -8
- package/dist/components/import-assets.js +161 -49
- package/dist/components/layout.d.ts +1 -0
- package/dist/components/layout.js +2 -1
- package/dist/components/open-in-new-window.d.ts +2 -0
- package/dist/components/open-in-new-window.js +28 -0
- package/dist/components/selected-outline-drag.d.ts +11 -1
- package/dist/components/selected-outline-drag.js +74 -1
- package/dist/esm/{chunk-784jbkzs.js → chunk-5wj95bdd.js} +4760 -3701
- package/dist/esm/internals.mjs +4760 -3701
- package/dist/esm/previewEntry.mjs +4962 -3903
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/inject-css.js +4 -2
- package/dist/helpers/is-video-with-last-frame-hold.d.ts +2 -0
- package/dist/helpers/is-video-with-last-frame-hold.js +9 -0
- package/dist/helpers/url-state.d.ts +1 -0
- package/dist/helpers/url-state.js +5 -1
- package/dist/helpers/use-max-media-duration.js +5 -3
- package/dist/helpers/use-menu-structure.js +2 -0
- package/dist/icons/duplicate.d.ts +5 -0
- package/dist/icons/duplicate.js +10 -0
- package/dist/icons/scissors.js +1 -1
- package/dist/icons/snowflake.d.ts +5 -0
- package/dist/icons/snowflake.js +10 -0
- package/dist/icons/trash.d.ts +5 -0
- package/dist/icons/trash.js +8 -0
- package/package.json +11 -11
|
@@ -114,12 +114,6 @@ const SelectedOutlineTransformOriginHandle = ({ outline, onDraggingChange, targe
|
|
|
114
114
|
const [scaleX, scaleY] = no_react_1.NoReactInternals.parseScaleValue(transformOriginDrag.scaleValue);
|
|
115
115
|
const startTranslate = (0, timeline_translate_utils_1.parseTranslate)(transformOriginDrag.translateValue);
|
|
116
116
|
const svgRect = svg.getBoundingClientRect();
|
|
117
|
-
const defaultOrigin = transformOriginDrag.originDefault !== undefined
|
|
118
|
-
? JSON.stringify(transformOriginDrag.originDefault)
|
|
119
|
-
: null;
|
|
120
|
-
const defaultTranslate = transformOriginDrag.translateDefault !== undefined
|
|
121
|
-
? JSON.stringify(transformOriginDrag.translateDefault)
|
|
122
|
-
: null;
|
|
123
117
|
let last = null;
|
|
124
118
|
let currentPointerX = event.clientX;
|
|
125
119
|
let currentPointerY = event.clientY;
|
|
@@ -182,11 +176,29 @@ const SelectedOutlineTransformOriginHandle = ({ outline, onDraggingChange, targe
|
|
|
182
176
|
})
|
|
183
177
|
: remotion_1.Internals.makeStaticDragOverride(origin));
|
|
184
178
|
setDragOverrides(transformOriginDrag.nodePath, selected_outline_types_1.translateFieldKey, transformOriginDrag.translatePropStatus.status === 'keyframed'
|
|
185
|
-
?
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
179
|
+
? transformOriginDrag.originPropStatus.status === 'keyframed'
|
|
180
|
+
? remotion_1.Internals.makeKeyframedDragOverride({
|
|
181
|
+
status: transformOriginDrag.translatePropStatus,
|
|
182
|
+
frame: transformOriginDrag.sourceFrame,
|
|
183
|
+
value: translate,
|
|
184
|
+
})
|
|
185
|
+
: {
|
|
186
|
+
type: 'keyframed',
|
|
187
|
+
status: {
|
|
188
|
+
...transformOriginDrag.translatePropStatus,
|
|
189
|
+
keyframes: transformOriginDrag.translatePropStatus.keyframes.map((keyframe) => {
|
|
190
|
+
const keyframeTranslate = (0, timeline_translate_utils_1.parseTranslate)(String(keyframe.value));
|
|
191
|
+
return {
|
|
192
|
+
...keyframe,
|
|
193
|
+
value: (0, timeline_translate_utils_1.serializeTranslate)(keyframeTranslate[0] +
|
|
194
|
+
nextTranslateX -
|
|
195
|
+
startTranslate[0], keyframeTranslate[1] +
|
|
196
|
+
nextTranslateY -
|
|
197
|
+
startTranslate[1]),
|
|
198
|
+
};
|
|
199
|
+
}),
|
|
200
|
+
},
|
|
201
|
+
}
|
|
190
202
|
: remotion_1.Internals.makeStaticDragOverride(translate));
|
|
191
203
|
};
|
|
192
204
|
updateFromPointerPosition();
|
|
@@ -220,65 +232,27 @@ const SelectedOutlineTransformOriginHandle = ({ outline, onDraggingChange, targe
|
|
|
220
232
|
clearDragOverrides(transformOriginDrag.nodePath);
|
|
221
233
|
return;
|
|
222
234
|
}
|
|
223
|
-
const
|
|
224
|
-
|
|
225
|
-
|
|
235
|
+
const { staticChanges, keyframedChanges } = (0, selected_outline_drag_1.getSelectedOutlineTransformOriginDragChanges)({
|
|
236
|
+
target: transformOriginDrag,
|
|
237
|
+
startTranslate,
|
|
238
|
+
origin: last.origin,
|
|
239
|
+
translate: last.translate,
|
|
240
|
+
});
|
|
241
|
+
if (staticChanges.length === 0 && keyframedChanges.length === 0) {
|
|
226
242
|
clearDragOverrides(transformOriginDrag.nodePath);
|
|
227
243
|
return;
|
|
228
244
|
}
|
|
229
|
-
const
|
|
230
|
-
transformOriginDrag.translatePropStatus.status === 'keyframed';
|
|
231
|
-
const promise = shouldSaveAsKeyframes
|
|
245
|
+
const promise = staticChanges.length === 0
|
|
232
246
|
? (0, call_add_keyframe_1.callAddKeyframes)({
|
|
233
|
-
sequenceKeyframes:
|
|
234
|
-
originChanged
|
|
235
|
-
? {
|
|
236
|
-
fileName: transformOriginDrag.nodePath.absolutePath,
|
|
237
|
-
nodePath: transformOriginDrag.nodePath,
|
|
238
|
-
fieldKey: selected_outline_types_1.transformOriginFieldKey,
|
|
239
|
-
sourceFrame: transformOriginDrag.sourceFrame,
|
|
240
|
-
value: last.origin,
|
|
241
|
-
schema: transformOriginDrag.schema,
|
|
242
|
-
}
|
|
243
|
-
: null,
|
|
244
|
-
translateChanged
|
|
245
|
-
? {
|
|
246
|
-
fileName: transformOriginDrag.nodePath.absolutePath,
|
|
247
|
-
nodePath: transformOriginDrag.nodePath,
|
|
248
|
-
fieldKey: selected_outline_types_1.translateFieldKey,
|
|
249
|
-
sourceFrame: transformOriginDrag.sourceFrame,
|
|
250
|
-
value: last.translate,
|
|
251
|
-
schema: transformOriginDrag.schema,
|
|
252
|
-
}
|
|
253
|
-
: null,
|
|
254
|
-
].filter(no_react_1.NoReactInternals.truthy),
|
|
247
|
+
sequenceKeyframes: keyframedChanges,
|
|
255
248
|
effectKeyframes: [],
|
|
256
249
|
setPropStatuses,
|
|
257
250
|
clientId: transformOriginDrag.clientId,
|
|
258
251
|
})
|
|
259
252
|
: (0, save_sequence_prop_1.saveSequenceProps)({
|
|
260
|
-
changes:
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
fileName: transformOriginDrag.nodePath.absolutePath,
|
|
264
|
-
nodePath: transformOriginDrag.nodePath,
|
|
265
|
-
fieldKey: selected_outline_types_1.transformOriginFieldKey,
|
|
266
|
-
value: last.origin,
|
|
267
|
-
defaultValue: defaultOrigin,
|
|
268
|
-
schema: transformOriginDrag.schema,
|
|
269
|
-
}
|
|
270
|
-
: null,
|
|
271
|
-
translateChanged
|
|
272
|
-
? {
|
|
273
|
-
fileName: transformOriginDrag.nodePath.absolutePath,
|
|
274
|
-
nodePath: transformOriginDrag.nodePath,
|
|
275
|
-
fieldKey: selected_outline_types_1.translateFieldKey,
|
|
276
|
-
value: last.translate,
|
|
277
|
-
defaultValue: defaultTranslate,
|
|
278
|
-
schema: transformOriginDrag.schema,
|
|
279
|
-
}
|
|
280
|
-
: null,
|
|
281
|
-
].filter(no_react_1.NoReactInternals.truthy),
|
|
253
|
+
changes: staticChanges,
|
|
254
|
+
addedKeyframes: keyframedChanges,
|
|
255
|
+
movedKeyframes: null,
|
|
282
256
|
setPropStatuses,
|
|
283
257
|
clientId: transformOriginDrag.clientId,
|
|
284
258
|
undoLabel: 'Move transform origin',
|
|
@@ -478,6 +452,8 @@ const SelectedOutlinePolygon = ({ allDragTargets, allDragOutlines, contextMenuVa
|
|
|
478
452
|
staticChanges.length > 0
|
|
479
453
|
? (0, save_sequence_prop_1.saveSequenceProps)({
|
|
480
454
|
changes: staticChanges,
|
|
455
|
+
addedKeyframes: null,
|
|
456
|
+
movedKeyframes: null,
|
|
481
457
|
setPropStatuses,
|
|
482
458
|
clientId: drag.clientId,
|
|
483
459
|
undoLabel: changes.length > 1
|
|
@@ -488,16 +464,12 @@ const SelectedOutlinePolygon = ({ allDragTargets, allDragOutlines, contextMenuVa
|
|
|
488
464
|
: 'Move sequence back',
|
|
489
465
|
})
|
|
490
466
|
: Promise.resolve(),
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
fieldKey: change.fieldKey,
|
|
495
|
-
sourceFrame: change.sourceFrame,
|
|
496
|
-
value: change.value,
|
|
497
|
-
schema: change.schema,
|
|
467
|
+
(0, call_add_keyframe_1.callAddKeyframes)({
|
|
468
|
+
sequenceKeyframes: keyframedChanges,
|
|
469
|
+
effectKeyframes: [],
|
|
498
470
|
setPropStatuses,
|
|
499
|
-
clientId:
|
|
500
|
-
})
|
|
471
|
+
clientId: drag.clientId,
|
|
472
|
+
}),
|
|
501
473
|
])
|
|
502
474
|
.catch((err) => {
|
|
503
475
|
(0, NotificationCenter_1.showNotification)(`Could not save sequence props: ${err instanceof Error ? err.message : String(err)}`, 4000);
|
|
@@ -692,6 +664,8 @@ const SelectedOutlineScaleEdgeLine = ({ allScaleDragTargets, contextMenuValues,
|
|
|
692
664
|
staticChanges.length > 0
|
|
693
665
|
? (0, save_sequence_prop_1.saveSequenceProps)({
|
|
694
666
|
changes: staticChanges,
|
|
667
|
+
addedKeyframes: null,
|
|
668
|
+
movedKeyframes: null,
|
|
695
669
|
setPropStatuses,
|
|
696
670
|
clientId: scaleDrag.clientId,
|
|
697
671
|
undoLabel: changes.length > 1
|
|
@@ -702,16 +676,12 @@ const SelectedOutlineScaleEdgeLine = ({ allScaleDragTargets, contextMenuValues,
|
|
|
702
676
|
: 'Scale sequence back',
|
|
703
677
|
})
|
|
704
678
|
: Promise.resolve(),
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
fieldKey: change.fieldKey,
|
|
709
|
-
sourceFrame: change.sourceFrame,
|
|
710
|
-
value: change.value,
|
|
711
|
-
schema: change.schema,
|
|
679
|
+
(0, call_add_keyframe_1.callAddKeyframes)({
|
|
680
|
+
sequenceKeyframes: keyframedChanges,
|
|
681
|
+
effectKeyframes: [],
|
|
712
682
|
setPropStatuses,
|
|
713
|
-
clientId:
|
|
714
|
-
})
|
|
683
|
+
clientId: scaleDrag.clientId,
|
|
684
|
+
}),
|
|
715
685
|
])
|
|
716
686
|
.catch((err) => {
|
|
717
687
|
(0, NotificationCenter_1.showNotification)(`Could not save sequence props: ${err instanceof Error ? err.message : String(err)}`, 4000);
|
|
@@ -911,6 +881,8 @@ const SelectedOutlineRotationCornerHandle = ({ allRotationDragTargets, contextMe
|
|
|
911
881
|
staticChanges.length > 0
|
|
912
882
|
? (0, save_sequence_prop_1.saveSequenceProps)({
|
|
913
883
|
changes: staticChanges,
|
|
884
|
+
addedKeyframes: null,
|
|
885
|
+
movedKeyframes: null,
|
|
914
886
|
setPropStatuses,
|
|
915
887
|
clientId: rotationDrag.clientId,
|
|
916
888
|
undoLabel: changes.length > 1
|
|
@@ -921,16 +893,12 @@ const SelectedOutlineRotationCornerHandle = ({ allRotationDragTargets, contextMe
|
|
|
921
893
|
: 'Rotate sequence back',
|
|
922
894
|
})
|
|
923
895
|
: Promise.resolve(),
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
fieldKey: change.fieldKey,
|
|
928
|
-
sourceFrame: change.sourceFrame,
|
|
929
|
-
value: change.value,
|
|
930
|
-
schema: change.schema,
|
|
896
|
+
(0, call_add_keyframe_1.callAddKeyframes)({
|
|
897
|
+
sequenceKeyframes: keyframedChanges,
|
|
898
|
+
effectKeyframes: [],
|
|
931
899
|
setPropStatuses,
|
|
932
|
-
clientId:
|
|
933
|
-
})
|
|
900
|
+
clientId: rotationDrag.clientId,
|
|
901
|
+
}),
|
|
934
902
|
])
|
|
935
903
|
.catch((err) => {
|
|
936
904
|
(0, NotificationCenter_1.showNotification)(`Could not save sequence props: ${err instanceof Error ? err.message : String(err)}`, 4000);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type SelectedOutline } from './selected-outline-geometry';
|
|
3
3
|
import { type SelectedOutlineTarget } from './selected-outline-types';
|
|
4
|
-
export { applySelectedOutlineDragAxisLock, applySelectedOutlineTransformOriginAxisLock, compensateTranslateForTransformOrigin, getSelectedOutlineActiveSchema, getSelectedOutlineDragChanges, getSelectedOutlineDragValues, getSelectedOutlineKeyboardNudgeDelta, getSelectedOutlineKeyboardNudgeDeltas, getSelectedOutlineRotationDragChanges, getSelectedOutlineRotationDragStates, getSelectedOutlineRotationDragValues, getSelectedOutlineScaleDragChanges, getSelectedOutlineScaleDragStates, getSelectedOutlineScaleDragValues, getSelectedOutlineScaleEdgeInfo, getSelectedOutlineTransformOriginLockedAxis, isSelectedOutlineDragPastThreshold, selectedOutlineTransformOriginSnapThresholdPx, selectedOutlineUvSnapThresholdPx, snapSelectedOutlineRotationDeltaDegrees, snapSelectedOutlineTransformOriginUv, snapSelectedOutlineUv, } from './selected-outline-drag';
|
|
4
|
+
export { applySelectedOutlineDragAxisLock, applySelectedOutlineTransformOriginAxisLock, compensateTranslateForTransformOrigin, getSelectedOutlineActiveSchema, getSelectedOutlineDragChanges, getSelectedOutlineDragValues, getSelectedOutlineKeyboardNudgeDelta, getSelectedOutlineKeyboardNudgeDeltas, getSelectedOutlineRotationDragChanges, getSelectedOutlineRotationDragStates, getSelectedOutlineRotationDragValues, getSelectedOutlineScaleDragChanges, getSelectedOutlineScaleDragStates, getSelectedOutlineScaleDragValues, getSelectedOutlineScaleEdgeInfo, getSelectedOutlineTransformOriginDragChanges, getSelectedOutlineTransformOriginLockedAxis, isSelectedOutlineDragPastThreshold, selectedOutlineTransformOriginSnapThresholdPx, selectedOutlineUvSnapThresholdPx, snapSelectedOutlineRotationDeltaDegrees, snapSelectedOutlineTransformOriginUv, snapSelectedOutlineUv, } from './selected-outline-drag';
|
|
5
5
|
export { getOutlineSelectionInteraction, getSelectedEffectFieldsBySequenceKey, getSelectedOutlineRotationCornerInfo, getSelectedOutlineRotationDeltaDegrees, getSelectedOutlineRotationPivot, getSelectedSequenceKeys, getSequencesWithSelectableOutlines, getTransformedSvgViewportPoints, } from './selected-outline-measurement';
|
|
6
6
|
export { selectedOutlineDragThresholdPx } from './selected-outline-types';
|
|
7
7
|
export type { SelectedOutlineDragState, SelectedOutlineRotationDragState, SelectedOutlineScaleDragState, } from './selected-outline-types';
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.SelectedOutlineOverlay = exports.orderOutlinesForRendering = exports.selectedOutlineDragThresholdPx = exports.getTransformedSvgViewportPoints = exports.getSequencesWithSelectableOutlines = exports.getSelectedSequenceKeys = exports.getSelectedOutlineRotationPivot = exports.getSelectedOutlineRotationDeltaDegrees = exports.getSelectedOutlineRotationCornerInfo = exports.getSelectedEffectFieldsBySequenceKey = exports.getOutlineSelectionInteraction = exports.snapSelectedOutlineUv = exports.snapSelectedOutlineTransformOriginUv = exports.snapSelectedOutlineRotationDeltaDegrees = exports.selectedOutlineUvSnapThresholdPx = exports.selectedOutlineTransformOriginSnapThresholdPx = exports.isSelectedOutlineDragPastThreshold = exports.getSelectedOutlineTransformOriginLockedAxis = exports.getSelectedOutlineScaleEdgeInfo = exports.getSelectedOutlineScaleDragValues = exports.getSelectedOutlineScaleDragStates = exports.getSelectedOutlineScaleDragChanges = exports.getSelectedOutlineRotationDragValues = exports.getSelectedOutlineRotationDragStates = exports.getSelectedOutlineRotationDragChanges = exports.getSelectedOutlineKeyboardNudgeDeltas = exports.getSelectedOutlineKeyboardNudgeDelta = exports.getSelectedOutlineDragValues = exports.getSelectedOutlineDragChanges = exports.getSelectedOutlineActiveSchema = exports.compensateTranslateForTransformOrigin = exports.applySelectedOutlineTransformOriginAxisLock = exports.applySelectedOutlineDragAxisLock = void 0;
|
|
36
|
+
exports.SelectedOutlineOverlay = exports.orderOutlinesForRendering = exports.selectedOutlineDragThresholdPx = exports.getTransformedSvgViewportPoints = exports.getSequencesWithSelectableOutlines = exports.getSelectedSequenceKeys = exports.getSelectedOutlineRotationPivot = exports.getSelectedOutlineRotationDeltaDegrees = exports.getSelectedOutlineRotationCornerInfo = exports.getSelectedEffectFieldsBySequenceKey = exports.getOutlineSelectionInteraction = exports.snapSelectedOutlineUv = exports.snapSelectedOutlineTransformOriginUv = exports.snapSelectedOutlineRotationDeltaDegrees = exports.selectedOutlineUvSnapThresholdPx = exports.selectedOutlineTransformOriginSnapThresholdPx = exports.isSelectedOutlineDragPastThreshold = exports.getSelectedOutlineTransformOriginLockedAxis = exports.getSelectedOutlineTransformOriginDragChanges = exports.getSelectedOutlineScaleEdgeInfo = exports.getSelectedOutlineScaleDragValues = exports.getSelectedOutlineScaleDragStates = exports.getSelectedOutlineScaleDragChanges = exports.getSelectedOutlineRotationDragValues = exports.getSelectedOutlineRotationDragStates = exports.getSelectedOutlineRotationDragChanges = exports.getSelectedOutlineKeyboardNudgeDeltas = exports.getSelectedOutlineKeyboardNudgeDelta = exports.getSelectedOutlineDragValues = exports.getSelectedOutlineDragChanges = exports.getSelectedOutlineActiveSchema = exports.compensateTranslateForTransformOrigin = exports.applySelectedOutlineTransformOriginAxisLock = exports.applySelectedOutlineDragAxisLock = void 0;
|
|
37
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
38
|
const player_1 = require("@remotion/player");
|
|
39
39
|
const react_1 = __importStar(require("react"));
|
|
@@ -74,6 +74,7 @@ Object.defineProperty(exports, "getSelectedOutlineScaleDragChanges", { enumerabl
|
|
|
74
74
|
Object.defineProperty(exports, "getSelectedOutlineScaleDragStates", { enumerable: true, get: function () { return selected_outline_drag_2.getSelectedOutlineScaleDragStates; } });
|
|
75
75
|
Object.defineProperty(exports, "getSelectedOutlineScaleDragValues", { enumerable: true, get: function () { return selected_outline_drag_2.getSelectedOutlineScaleDragValues; } });
|
|
76
76
|
Object.defineProperty(exports, "getSelectedOutlineScaleEdgeInfo", { enumerable: true, get: function () { return selected_outline_drag_2.getSelectedOutlineScaleEdgeInfo; } });
|
|
77
|
+
Object.defineProperty(exports, "getSelectedOutlineTransformOriginDragChanges", { enumerable: true, get: function () { return selected_outline_drag_2.getSelectedOutlineTransformOriginDragChanges; } });
|
|
77
78
|
Object.defineProperty(exports, "getSelectedOutlineTransformOriginLockedAxis", { enumerable: true, get: function () { return selected_outline_drag_2.getSelectedOutlineTransformOriginLockedAxis; } });
|
|
78
79
|
Object.defineProperty(exports, "isSelectedOutlineDragPastThreshold", { enumerable: true, get: function () { return selected_outline_drag_2.isSelectedOutlineDragPastThreshold; } });
|
|
79
80
|
Object.defineProperty(exports, "selectedOutlineTransformOriginSnapThresholdPx", { enumerable: true, get: function () { return selected_outline_drag_2.selectedOutlineTransformOriginSnapThresholdPx; } });
|
|
@@ -707,6 +708,8 @@ const SelectedOutlineOverlay = ({ compositionHeight, compositionWidth, scale, tr
|
|
|
707
708
|
staticChanges.length > 0
|
|
708
709
|
? (0, save_sequence_prop_1.saveSequenceProps)({
|
|
709
710
|
changes: staticChanges,
|
|
711
|
+
addedKeyframes: null,
|
|
712
|
+
movedKeyframes: null,
|
|
710
713
|
setPropStatuses,
|
|
711
714
|
clientId: session.clientId,
|
|
712
715
|
undoLabel: changes.length > 1 ? 'Move selected sequences' : 'Move sequence',
|
|
@@ -715,16 +718,12 @@ const SelectedOutlineOverlay = ({ compositionHeight, compositionWidth, scale, tr
|
|
|
715
718
|
: 'Move sequence back',
|
|
716
719
|
})
|
|
717
720
|
: Promise.resolve(),
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
fieldKey: change.fieldKey,
|
|
722
|
-
sourceFrame: change.sourceFrame,
|
|
723
|
-
value: change.value,
|
|
724
|
-
schema: change.schema,
|
|
721
|
+
(0, call_add_keyframe_1.callAddKeyframes)({
|
|
722
|
+
sequenceKeyframes: keyframedChanges,
|
|
723
|
+
effectKeyframes: [],
|
|
725
724
|
setPropStatuses,
|
|
726
|
-
clientId:
|
|
727
|
-
})
|
|
725
|
+
clientId: session.clientId,
|
|
726
|
+
}),
|
|
728
727
|
])
|
|
729
728
|
.catch((err) => {
|
|
730
729
|
(0, NotificationCenter_1.showNotification)(`Could not save sequence props: ${err instanceof Error ? err.message : String(err)}`, 4000);
|
|
@@ -46,7 +46,7 @@ const getPreviewSizeLabel = (previewSize) => {
|
|
|
46
46
|
};
|
|
47
47
|
exports.getPreviewSizeLabel = getPreviewSizeLabel;
|
|
48
48
|
const accessibilityLabel = 'Preview Size';
|
|
49
|
-
const comboStyle = { width:
|
|
49
|
+
const comboStyle = { width: 64 };
|
|
50
50
|
const getUniqueSizes = (size) => {
|
|
51
51
|
const customPreviewSizes = [size, ...commonPreviewSizes];
|
|
52
52
|
const uniqueSizes = [];
|
|
@@ -72,7 +72,7 @@ const SizeSelector = () => {
|
|
|
72
72
|
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
73
73
|
const style = (0, react_1.useMemo)(() => {
|
|
74
74
|
return {
|
|
75
|
-
padding: ControlButton_1.CONTROL_BUTTON_PADDING,
|
|
75
|
+
padding: ControlButton_1.CONTROL_BUTTON_PADDING - 2,
|
|
76
76
|
};
|
|
77
77
|
}, []);
|
|
78
78
|
const zoomable = (0, react_1.useMemo)(() => {
|
|
@@ -114,6 +114,6 @@ const SizeSelector = () => {
|
|
|
114
114
|
if (!zoomable) {
|
|
115
115
|
return null;
|
|
116
116
|
}
|
|
117
|
-
return (jsx_runtime_1.jsx("div", { style: style, "aria-label": accessibilityLabel, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { title: accessibilityLabel, style: comboStyle, selectedId: String(size.size), values: items }) }));
|
|
117
|
+
return (jsx_runtime_1.jsx("div", { style: style, "aria-label": accessibilityLabel, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { size: "compact", title: accessibilityLabel, style: comboStyle, selectedId: String(size.size), values: items }) }));
|
|
118
118
|
};
|
|
119
119
|
exports.SizeSelector = SizeSelector;
|
|
@@ -56,6 +56,7 @@ const SequencePropsObserver_1 = require("./SequencePropsObserver");
|
|
|
56
56
|
const should_show_track_in_timeline_1 = require("./should-show-track-in-timeline");
|
|
57
57
|
const should_subscribe_to_sequence_props_1 = require("./should-subscribe-to-sequence-props");
|
|
58
58
|
const SubscribeToNodePaths_1 = require("./SubscribeToNodePaths");
|
|
59
|
+
const timeline_asset_drop_context_1 = require("./timeline-asset-drop-context");
|
|
59
60
|
const timeline_refs_1 = require("./timeline-refs");
|
|
60
61
|
const TimelineDragHandler_1 = require("./TimelineDragHandler");
|
|
61
62
|
const TimelineHeightContainer_1 = require("./TimelineHeightContainer");
|
|
@@ -72,6 +73,7 @@ const TimelineTimeIndicators_1 = require("./TimelineTimeIndicators");
|
|
|
72
73
|
const TimelineTracks_1 = require("./TimelineTracks");
|
|
73
74
|
const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
|
|
74
75
|
const use_resolved_stack_1 = require("./use-resolved-stack");
|
|
76
|
+
const use_timeline_asset_drop_1 = require("./use-timeline-asset-drop");
|
|
75
77
|
const container = {
|
|
76
78
|
minHeight: '100%',
|
|
77
79
|
flex: 1,
|
|
@@ -83,6 +85,7 @@ const container = {
|
|
|
83
85
|
const noop = () => undefined;
|
|
84
86
|
const TimelineContextMenuArea = ({ children }) => {
|
|
85
87
|
var _a, _b;
|
|
88
|
+
const assetDropFrame = (0, use_timeline_asset_drop_1.useTimelineAssetDrop)();
|
|
86
89
|
const { compositions, canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
87
90
|
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
88
91
|
const [isAddingSolid, setIsAddingSolid] = (0, react_1.useState)(false);
|
|
@@ -128,6 +131,7 @@ const TimelineContextMenuArea = ({ children }) => {
|
|
|
128
131
|
const result = await (0, call_api_1.callApi)('/api/insert-jsx-element', {
|
|
129
132
|
compositionFile,
|
|
130
133
|
compositionId: currentCompositionId,
|
|
134
|
+
from: null,
|
|
131
135
|
element: {
|
|
132
136
|
type: 'solid',
|
|
133
137
|
width: videoConfig.width,
|
|
@@ -151,7 +155,8 @@ const TimelineContextMenuArea = ({ children }) => {
|
|
|
151
155
|
const insertAsset = (0, react_1.useCallback)(async () => {
|
|
152
156
|
if (!canInsertAsset ||
|
|
153
157
|
currentCompositionId === null ||
|
|
154
|
-
compositionFile === null
|
|
158
|
+
compositionFile === null ||
|
|
159
|
+
videoConfig === null) {
|
|
155
160
|
return;
|
|
156
161
|
}
|
|
157
162
|
const files = await (0, import_assets_1.pickFilesToImport)();
|
|
@@ -162,17 +167,19 @@ const TimelineContextMenuArea = ({ children }) => {
|
|
|
162
167
|
try {
|
|
163
168
|
await (0, import_assets_1.importAssets)({
|
|
164
169
|
files,
|
|
170
|
+
fps: videoConfig.fps,
|
|
165
171
|
compositionFile,
|
|
166
172
|
compositionId: currentCompositionId,
|
|
167
173
|
destinationDimensions: null,
|
|
168
174
|
dropPosition: null,
|
|
175
|
+
from: null,
|
|
169
176
|
svgImportMode: 'image',
|
|
170
177
|
});
|
|
171
178
|
}
|
|
172
179
|
finally {
|
|
173
180
|
setIsAddingAsset(false);
|
|
174
181
|
}
|
|
175
|
-
}, [canInsertAsset, compositionFile, currentCompositionId]);
|
|
182
|
+
}, [canInsertAsset, compositionFile, currentCompositionId, videoConfig]);
|
|
176
183
|
const contextMenuItems = (0, react_1.useMemo)(() => {
|
|
177
184
|
return [
|
|
178
185
|
{
|
|
@@ -201,7 +208,7 @@ const TimelineContextMenuArea = ({ children }) => {
|
|
|
201
208
|
},
|
|
202
209
|
];
|
|
203
210
|
}, [insertSolid, canInsertSolid, insertAsset, canInsertAsset]);
|
|
204
|
-
return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { ref: timeline_refs_1.timelineVerticalScroll, values: contextMenuItems, onOpen: null, style: container, className: 'css-reset ' + is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: children }));
|
|
211
|
+
return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { ref: timeline_refs_1.timelineVerticalScroll, values: contextMenuItems, onOpen: null, style: container, className: 'css-reset ' + is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(timeline_asset_drop_context_1.TimelineAssetDropFrameContext.Provider, { value: assetDropFrame, children: children }) }));
|
|
205
212
|
};
|
|
206
213
|
const TimelineInner = () => {
|
|
207
214
|
var _a;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TimelineAssetDropIndicator = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const remotion_1 = require("remotion");
|
|
7
|
+
const colors_1 = require("../../helpers/colors");
|
|
8
|
+
const get_left_of_timeline_slider_1 = require("../../helpers/get-left-of-timeline-slider");
|
|
9
|
+
const timeline_asset_drop_context_1 = require("./timeline-asset-drop-context");
|
|
10
|
+
const timeline_refs_1 = require("./timeline-refs");
|
|
11
|
+
const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
|
|
12
|
+
const indicator = {
|
|
13
|
+
backgroundColor: colors_1.RULER_COLOR,
|
|
14
|
+
bottom: 0,
|
|
15
|
+
pointerEvents: 'none',
|
|
16
|
+
position: 'absolute',
|
|
17
|
+
top: 0,
|
|
18
|
+
width: 1,
|
|
19
|
+
zIndex: 10,
|
|
20
|
+
};
|
|
21
|
+
const TimelineAssetDropIndicator = () => {
|
|
22
|
+
var _a;
|
|
23
|
+
var _b;
|
|
24
|
+
const frame = (0, react_1.useContext)(timeline_asset_drop_context_1.TimelineAssetDropFrameContext);
|
|
25
|
+
const timelineWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
|
|
26
|
+
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
27
|
+
if (frame === null || timelineWidth === null || videoConfig === null) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
const width = (_b = (_a = timeline_refs_1.sliderAreaRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _b !== void 0 ? _b : timelineWidth;
|
|
31
|
+
const left = (0, get_left_of_timeline_slider_1.getXPositionOfItemInTimelineImperatively)(frame, videoConfig.durationInFrames, width);
|
|
32
|
+
return (jsx_runtime_1.jsx("div", { "data-timeline-asset-drop-indicator": "true", style: {
|
|
33
|
+
...indicator,
|
|
34
|
+
transform: `translateX(${left - 0.5}px)`,
|
|
35
|
+
} }));
|
|
36
|
+
};
|
|
37
|
+
exports.TimelineAssetDropIndicator = TimelineAssetDropIndicator;
|
|
@@ -109,7 +109,7 @@ const TimelineStaticFileAssetField = ({ propStatus, effectiveValue, onSave, onDr
|
|
|
109
109
|
},
|
|
110
110
|
];
|
|
111
111
|
}, [current, onSelect, staticFiles, upload]);
|
|
112
|
-
return (jsx_runtime_1.jsx(ComboBox_1.Combobox, {
|
|
112
|
+
return (jsx_runtime_1.jsx(ComboBox_1.Combobox, { size: "small", title: current, selectedId: current, values: items, style: comboboxStyle }));
|
|
113
113
|
};
|
|
114
114
|
const TimelineAssetField = (props) => {
|
|
115
115
|
var _a;
|
|
@@ -710,13 +710,7 @@ const TimelineClipboardKeybindings = () => {
|
|
|
710
710
|
(0, NotificationCenter_1.showNotification)('Cannot paste onto an easing that cannot be updated', 3000);
|
|
711
711
|
return;
|
|
712
712
|
}
|
|
713
|
-
return updatePromise
|
|
714
|
-
.then(() => {
|
|
715
|
-
(0, NotificationCenter_1.showNotification)(easingSelections.length === 1
|
|
716
|
-
? 'Pasted easing'
|
|
717
|
-
: 'Pasted easing to selected segments', 2000);
|
|
718
|
-
})
|
|
719
|
-
.catch((err) => {
|
|
713
|
+
return updatePromise.catch((err) => {
|
|
720
714
|
(0, NotificationCenter_1.showNotification)(`Could not paste easing: ${err.message}`, 3000);
|
|
721
715
|
});
|
|
722
716
|
}
|
|
@@ -37,6 +37,6 @@ const TimelineEnumField = ({ field, propStatus, effectiveValue, onSave, onDragVa
|
|
|
37
37
|
disabled: false,
|
|
38
38
|
}));
|
|
39
39
|
}, [variantKeys, onSelect]);
|
|
40
|
-
return (jsx_runtime_1.jsx(ComboBox_1.Combobox, {
|
|
40
|
+
return (jsx_runtime_1.jsx(ComboBox_1.Combobox, { size: "small", title: field.key, selectedId: current, values: items, style: comboboxStyle }));
|
|
41
41
|
};
|
|
42
42
|
exports.TimelineEnumField = TimelineEnumField;
|
|
@@ -19,13 +19,13 @@ const fieldNameBase = {
|
|
|
19
19
|
minWidth: 0,
|
|
20
20
|
};
|
|
21
21
|
const TimelineFieldLabel = ({ rowDepth, selected, label, stacked = false }) => {
|
|
22
|
-
const { basePadding } = (0, react_1.useContext)(TimelineRowLayoutContext_1.TimelineRowLayoutContext);
|
|
22
|
+
const { basePadding, highlightSelectedLabel } = (0, react_1.useContext)(TimelineRowLayoutContext_1.TimelineRowLayoutContext);
|
|
23
23
|
const labelRowStyle = (0, react_1.useMemo)(() => ({
|
|
24
24
|
...(0, timeline_field_row_layout_1.getTimelineFieldLabelRowStyle)(rowDepth, basePadding),
|
|
25
|
-
...(0, TimelineSelection_1.getTimelineSelectedLabelStyle)(selected, true),
|
|
25
|
+
...(0, TimelineSelection_1.getTimelineSelectedLabelStyle)(selected && highlightSelectedLabel, true),
|
|
26
26
|
...(stacked ? { flex: `0 0 ${timeline_layout_1.SCHEMA_FIELD_ROW_HEIGHT}px` } : null),
|
|
27
27
|
alignSelf: 'stretch',
|
|
28
|
-
}), [basePadding, rowDepth, selected, stacked]);
|
|
28
|
+
}), [basePadding, highlightSelectedLabel, rowDepth, selected, stacked]);
|
|
29
29
|
const fieldNameStyle = (0, react_1.useMemo)(() => ({
|
|
30
30
|
...fieldNameBase,
|
|
31
31
|
color: (0, TimelineSelection_1.getTimelineColor)(selected, true),
|
|
@@ -18,6 +18,9 @@ const TimelineKeyframeDiamondIcon_1 = require("./TimelineKeyframeDiamondIcon");
|
|
|
18
18
|
const TimelineKeyframeTracksContext_1 = require("./TimelineKeyframeTracksContext");
|
|
19
19
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
20
20
|
const update_selected_easing_1 = require("./update-selected-easing");
|
|
21
|
+
const NAV_BUTTON_SIZE = 14;
|
|
22
|
+
const INSPECTOR_NAV_BUTTON_WIDTH = NAV_BUTTON_SIZE / 2;
|
|
23
|
+
const INSPECTOR_PREVIOUS_BUTTON_EXTRA_GAP = 1;
|
|
21
24
|
const controlsContainerStyle = {
|
|
22
25
|
alignItems: 'center',
|
|
23
26
|
display: 'flex',
|
|
@@ -25,6 +28,12 @@ const controlsContainerStyle = {
|
|
|
25
28
|
gap: 1,
|
|
26
29
|
marginRight: 4,
|
|
27
30
|
};
|
|
31
|
+
const inspectorControlsContainerStyle = {
|
|
32
|
+
...controlsContainerStyle,
|
|
33
|
+
paddingLeft: NAV_BUTTON_SIZE -
|
|
34
|
+
INSPECTOR_NAV_BUTTON_WIDTH -
|
|
35
|
+
INSPECTOR_PREVIOUS_BUTTON_EXTRA_GAP,
|
|
36
|
+
};
|
|
28
37
|
const navButtonStyle = {
|
|
29
38
|
alignItems: 'center',
|
|
30
39
|
background: 'none',
|
|
@@ -33,13 +42,20 @@ const navButtonStyle = {
|
|
|
33
42
|
cursor: 'pointer',
|
|
34
43
|
display: 'flex',
|
|
35
44
|
flexShrink: 0,
|
|
36
|
-
height:
|
|
45
|
+
height: NAV_BUTTON_SIZE,
|
|
37
46
|
justifyContent: 'center',
|
|
38
47
|
lineHeight: 1,
|
|
39
48
|
outline: 'none',
|
|
40
49
|
padding: 0,
|
|
41
50
|
userSelect: 'none',
|
|
42
|
-
width:
|
|
51
|
+
width: NAV_BUTTON_SIZE,
|
|
52
|
+
};
|
|
53
|
+
const inspectorNavButtonStyle = {
|
|
54
|
+
width: INSPECTOR_NAV_BUTTON_WIDTH,
|
|
55
|
+
};
|
|
56
|
+
const inspectorPreviousNavButtonStyle = {
|
|
57
|
+
...inspectorNavButtonStyle,
|
|
58
|
+
marginRight: INSPECTOR_PREVIOUS_BUTTON_EXTRA_GAP,
|
|
43
59
|
};
|
|
44
60
|
const isKeyframedStatus = (status) => {
|
|
45
61
|
return status.status === 'keyframed';
|
|
@@ -48,7 +64,7 @@ const diamondButtonStyle = {
|
|
|
48
64
|
...navButtonStyle,
|
|
49
65
|
background: 'none',
|
|
50
66
|
};
|
|
51
|
-
const svgStyle = { display: 'block' };
|
|
67
|
+
const svgStyle = { display: 'block', flexShrink: 0 };
|
|
52
68
|
const isKeyframeControlSelection = (selection) => {
|
|
53
69
|
return (selection.type === 'sequence-prop' ||
|
|
54
70
|
selection.type === 'sequence-effect-prop');
|
|
@@ -454,23 +470,27 @@ const TimelineKeyframeControls = ({ fieldKey, propStatus, nodePath, fileName, ke
|
|
|
454
470
|
const nextDisabled = nextDisplayFrame === null;
|
|
455
471
|
const previousStyle = (0, react_1.useMemo)(() => ({
|
|
456
472
|
...navButtonStyle,
|
|
473
|
+
...(mode === 'inspector' ? inspectorPreviousNavButtonStyle : null),
|
|
457
474
|
cursor: previousDisabled ? 'default' : 'pointer',
|
|
458
475
|
opacity: previousDisabled ? 0.35 : 1,
|
|
459
476
|
visibility: showNavigationButtons ? 'visible' : 'hidden',
|
|
460
|
-
}), [previousDisabled, showNavigationButtons]);
|
|
477
|
+
}), [mode, previousDisabled, showNavigationButtons]);
|
|
461
478
|
const nextStyle = (0, react_1.useMemo)(() => ({
|
|
462
479
|
...navButtonStyle,
|
|
480
|
+
...(mode === 'inspector' ? inspectorNavButtonStyle : null),
|
|
463
481
|
cursor: nextDisabled ? 'default' : 'pointer',
|
|
464
482
|
opacity: nextDisabled ? 0.35 : 1,
|
|
465
483
|
visibility: showNavigationButtons ? 'visible' : 'hidden',
|
|
466
|
-
}), [nextDisabled, showNavigationButtons]);
|
|
484
|
+
}), [mode, nextDisabled, showNavigationButtons]);
|
|
467
485
|
const diamondStyle = (0, react_1.useMemo)(() => ({
|
|
468
486
|
...diamondButtonStyle,
|
|
469
487
|
cursor: canToggleKeyframe && clientId ? 'pointer' : 'default',
|
|
470
488
|
opacity: canToggleKeyframe && clientId ? 1 : 0.35,
|
|
471
489
|
}), [canToggleKeyframe, clientId]);
|
|
472
490
|
const diamondColor = hasKeyframeAtCurrentFrame ? colors_1.BLUE : colors_1.LIGHT_TEXT;
|
|
473
|
-
return (jsx_runtime_1.jsxs("div", { style:
|
|
491
|
+
return (jsx_runtime_1.jsxs("div", { style: mode === 'inspector'
|
|
492
|
+
? inspectorControlsContainerStyle
|
|
493
|
+
: controlsContainerStyle, children: [
|
|
474
494
|
jsx_runtime_1.jsx("button", { type: "button", style: previousStyle, disabled: previousDisabled, onPointerDown: previousDisabled ? undefined : onPrevious, "aria-label": "Go to previous keyframe", title: "Previous keyframe", children: jsx_runtime_1.jsx("svg", { width: "14", height: "14", viewBox: "0 0 10 10", style: svgStyle, children: jsx_runtime_1.jsx("path", { d: "M7 1.5L3 5L7 8.5Z", fill: colors_1.LIGHT_GRAY }) }) }), jsx_runtime_1.jsx("button", { type: "button", style: diamondStyle, disabled: !canToggleKeyframe || !clientId, onPointerDown: canToggleKeyframe && clientId ? onToggleKeyframe : undefined, "aria-label": hasKeyframeAtCurrentFrame ? 'Remove keyframe' : 'Add keyframe', title: hasKeyframeAtCurrentFrame ? 'Remove keyframe' : 'Add keyframe', children: jsx_runtime_1.jsx(TimelineKeyframeDiamondIcon_1.TimelineKeyframeDiamondIcon, { color: diamondColor, size: 12 }) }), jsx_runtime_1.jsx("button", { type: "button", style: nextStyle, disabled: nextDisabled, onPointerDown: nextDisabled ? undefined : onNext, "aria-label": "Go to next keyframe", title: "Next keyframe", children: jsx_runtime_1.jsx("svg", { width: "14", height: "14", viewBox: "0 0 10 10", style: svgStyle, children: jsx_runtime_1.jsx("path", { d: "M3 1.5L7 5L3 8.5Z", fill: colors_1.LIGHT_GRAY }) }) })
|
|
475
495
|
] }));
|
|
476
496
|
};
|
|
@@ -26,7 +26,7 @@ const keyframeControlsColumnBaseStyle = {
|
|
|
26
26
|
};
|
|
27
27
|
const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, style, selected, selectable, selectionItem, onSelect, showSelectedBackground, containsSelection, outerHeight, onDragLeave, onDragOver, onDrop, onDoubleClick, }) => {
|
|
28
28
|
const ref = (0, react_1.useRef)(null);
|
|
29
|
-
const { basePadding, keyframeControlsPadding } = (0, react_1.useContext)(TimelineRowLayoutContext_1.TimelineRowLayoutContext);
|
|
29
|
+
const { basePadding, keyframeControlsPadding, rowBorderRadius, rowHorizontalMargin, } = (0, react_1.useContext)(TimelineRowLayoutContext_1.TimelineRowLayoutContext);
|
|
30
30
|
const indentWidth = (0, timeline_row_layout_1.getTimelineRowIndentWidth)(depth);
|
|
31
31
|
(0, TimelineSelection_1.useTimelineFocusableItem)(selectionItem, ref);
|
|
32
32
|
const keyframeControlsColumnStyle = (0, react_1.useMemo)(() => ({
|
|
@@ -64,7 +64,15 @@ const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, styl
|
|
|
64
64
|
...rowBase,
|
|
65
65
|
...style,
|
|
66
66
|
backgroundColor: outerHeight === null ? highlightBackground : undefined,
|
|
67
|
-
|
|
67
|
+
borderRadius: rowBorderRadius,
|
|
68
|
+
margin: `0 ${rowHorizontalMargin}px`,
|
|
69
|
+
}), [
|
|
70
|
+
style,
|
|
71
|
+
outerHeight,
|
|
72
|
+
highlightBackground,
|
|
73
|
+
rowBorderRadius,
|
|
74
|
+
rowHorizontalMargin,
|
|
75
|
+
]);
|
|
68
76
|
const outerStyle = (0, react_1.useMemo)(() => {
|
|
69
77
|
if (outerHeight === null) {
|
|
70
78
|
return undefined;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
type TimelineRowLayout = {
|
|
2
2
|
readonly basePadding: number;
|
|
3
|
+
readonly highlightSelectedLabel: boolean;
|
|
3
4
|
readonly keyframeControlsPadding: number;
|
|
5
|
+
readonly rowBorderRadius: number;
|
|
6
|
+
readonly rowHorizontalMargin: number;
|
|
4
7
|
};
|
|
5
8
|
export declare const INSPECTOR_TIMELINE_ROW_LAYOUT: TimelineRowLayout;
|
|
6
9
|
export declare const TimelineRowLayoutContext: import("react").Context<TimelineRowLayout>;
|
|
@@ -5,9 +5,15 @@ const react_1 = require("react");
|
|
|
5
5
|
const timeline_row_layout_1 = require("./timeline-row-layout");
|
|
6
6
|
exports.INSPECTOR_TIMELINE_ROW_LAYOUT = {
|
|
7
7
|
basePadding: timeline_row_layout_1.INSPECTOR_ROW_BASE_PADDING,
|
|
8
|
+
highlightSelectedLabel: false,
|
|
8
9
|
keyframeControlsPadding: 0,
|
|
10
|
+
rowBorderRadius: 4,
|
|
11
|
+
rowHorizontalMargin: 4,
|
|
9
12
|
};
|
|
10
13
|
exports.TimelineRowLayoutContext = (0, react_1.createContext)({
|
|
11
14
|
basePadding: timeline_row_layout_1.TIMELINE_ROW_BASE_PADDING,
|
|
15
|
+
highlightSelectedLabel: true,
|
|
12
16
|
keyframeControlsPadding: timeline_row_layout_1.TIMELINE_ROW_BASE_PADDING,
|
|
17
|
+
rowBorderRadius: 0,
|
|
18
|
+
rowHorizontalMargin: 0,
|
|
13
19
|
});
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const colors_1 = require("../../helpers/colors");
|
|
7
7
|
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
8
8
|
const timeline_refs_1 = require("./timeline-refs");
|
|
9
|
+
const TimelineAssetDropIndicator_1 = require("./TimelineAssetDropIndicator");
|
|
9
10
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
10
11
|
const outer = {
|
|
11
12
|
width: '100%',
|
|
@@ -31,8 +32,8 @@ const TimelineScrollable = ({ children }) => {
|
|
|
31
32
|
minHeight: '100%',
|
|
32
33
|
};
|
|
33
34
|
}, []);
|
|
34
|
-
return (jsx_runtime_1.jsxs("div", { ref: timeline_refs_1.scrollableRef, style: outer, className: is_menu_item_1.HORIZONTAL_SCROLLBAR_CLASSNAME, onPointerDownCapture: onPointerDownCapture, children: [
|
|
35
|
-
jsx_runtime_1.jsx("div", { style: containerStyle, children: children }), marqueeRect === null ? null : (jsx_runtime_1.jsx("div", { style: {
|
|
35
|
+
return (jsx_runtime_1.jsxs("div", { ref: timeline_refs_1.scrollableRef, "data-timeline-scrollable": "true", style: outer, className: is_menu_item_1.HORIZONTAL_SCROLLBAR_CLASSNAME, onPointerDownCapture: onPointerDownCapture, children: [
|
|
36
|
+
jsx_runtime_1.jsx("div", { style: containerStyle, children: children }), jsx_runtime_1.jsx(TimelineAssetDropIndicator_1.TimelineAssetDropIndicator, {}), marqueeRect === null ? null : (jsx_runtime_1.jsx("div", { style: {
|
|
36
37
|
...marqueeStyle,
|
|
37
38
|
height: marqueeRect.bottom - marqueeRect.top,
|
|
38
39
|
left: marqueeRect.left,
|