@remotion/studio 4.0.504 → 4.0.506
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/api/install-package.d.ts +2 -3
- package/dist/api/install-package.js +1 -3
- package/dist/api/visual-control.d.ts +3 -0
- package/dist/api/visual-control.js +3 -0
- package/dist/components/AssetSelectorItem.js +3 -3
- package/dist/components/AudioWaveform.d.ts +1 -1
- package/dist/components/AudioWaveform.js +36 -3
- package/dist/components/Canvas.js +2 -0
- package/dist/components/CompositionContextButton.d.ts +1 -1
- package/dist/components/CompositionContextButton.js +2 -2
- package/dist/components/CompositionSelector.js +3 -3
- package/dist/components/CompositionSelectorItem.js +5 -5
- package/dist/components/ConfigureDefaultEditorModal.d.ts +3 -1
- package/dist/components/ConfigureDefaultEditorModal.js +90 -32
- package/dist/components/ConfigureLicenseModal.d.ts +2 -1
- package/dist/components/ConfigureLicenseModal.js +40 -32
- package/dist/components/ConfirmationDialog.js +2 -2
- package/dist/components/ContextMenu.d.ts +5 -7
- package/dist/components/ContextMenu.js +54 -21
- package/dist/components/Editor.js +2 -0
- package/dist/components/EditorGuides/Guide.js +2 -2
- package/dist/components/EffectPickerModal.js +3 -3
- package/dist/components/GlobalKeybindings.js +3 -2
- package/dist/components/InlineAction.d.ts +1 -1
- package/dist/components/InlineAction.js +14 -13
- package/dist/components/InlineCaptionInspector.d.ts +2 -2
- package/dist/components/InlineDropdown.d.ts +4 -2
- package/dist/components/InlineDropdown.js +23 -6
- package/dist/components/InspectorOpenInEditor.d.ts +1 -0
- package/dist/components/InspectorOpenInEditor.js +33 -9
- package/dist/components/InspectorPanel/AlignmentControls.js +5 -2
- package/dist/components/InspectorPanel/CompositionInspector.js +15 -1
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +3 -3
- package/dist/components/InspectorPanel/EasingInspector.js +7 -4
- package/dist/components/InspectorPanel/KeyframeInspector.js +5 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -1
- package/dist/components/InspectorPanel/common.d.ts +1 -0
- package/dist/components/InspectorPanel/common.js +25 -35
- package/dist/components/InspectorPanel/use-composition-actions.js +4 -1
- package/dist/components/InspectorSequenceSection.js +5 -5
- package/dist/components/InstallPackage.js +1 -1
- package/dist/components/Menu/MenuItem.js +16 -12
- package/dist/components/MenuBuildIndicator.js +12 -58
- package/dist/components/MenuCompositionName.js +3 -63
- package/dist/components/MenuToolbar.js +22 -2
- package/dist/components/ModalFooter.d.ts +1 -0
- package/dist/components/ModalFooter.js +6 -2
- package/dist/components/ModalHeader.js +1 -1
- package/dist/components/Modals.js +18 -7
- package/dist/components/ModalsProvider.js +5 -6
- package/dist/components/NewComposition/CodemodFooter.js +1 -1
- package/dist/components/NewComposition/DismissableModal.js +1 -1
- package/dist/components/NewComposition/InputDragger.d.ts +1 -0
- package/dist/components/NewComposition/InputDragger.js +5 -4
- package/dist/components/NewComposition/MenuContent.d.ts +1 -1
- package/dist/components/NewComposition/RenameStaticFile.js +1 -1
- package/dist/components/NewComposition/menu-typeahead.d.ts +1 -1
- package/dist/components/OverrideInputProps.js +1 -1
- package/dist/components/PlayPause.js +3 -2
- package/dist/components/PlaybackKeyboardShortcutsManager.js +7 -5
- package/dist/components/PlaybackRateSelector.js +3 -9
- package/dist/components/PreviewToolbar.js +7 -4
- package/dist/components/PreviewToolbarOverflowButton.js +4 -2
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -1
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
- package/dist/components/RenderButton.d.ts +3 -2
- package/dist/components/RenderButton.js +95 -43
- package/dist/components/RenderModal/RenderStatusModal.js +1 -1
- package/dist/components/RenderModal/ServerRenderModal.js +1 -1
- package/dist/components/RenderModal/WebRenderModal.js +3 -2
- package/dist/components/RenderQueue/RenderQueueError.js +1 -1
- package/dist/components/RenderQueue/RenderQueueItemStatus.js +1 -1
- package/dist/components/RenderQueue/RenderQueueProgressMessage.js +1 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.js +1 -1
- package/dist/components/SelectedOutlineElement.js +10 -11
- package/dist/components/SelectedOutlineOverlay.js +67 -20
- package/dist/components/SettingsModal.d.ts +7 -0
- package/dist/components/SettingsModal.js +50 -0
- package/dist/components/SettingsModalFooter.d.ts +4 -0
- package/dist/components/SettingsModalFooter.js +46 -0
- package/dist/components/SidebarRenderButton.js +1 -1
- package/dist/components/SizeSelector.js +3 -9
- package/dist/components/SvgImportDialog.js +2 -2
- package/dist/components/TimeValue.js +1 -1
- package/dist/components/Timeline/Timeline.js +5 -4
- package/dist/components/Timeline/TimelineAssetField.js +1 -1
- package/dist/components/Timeline/TimelineDragHandler.js +6 -3
- package/dist/components/Timeline/TimelineEffectItem.js +6 -2
- package/dist/components/Timeline/TimelineEffectPropItem.js +11 -6
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.d.ts +6 -6
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +32 -1
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +4 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +2 -2
- package/dist/components/Timeline/TimelineFontFamilyField.js +3 -1
- package/dist/components/Timeline/TimelineHeightContainer.d.ts +1 -0
- package/dist/components/Timeline/TimelineHeightContainer.js +2 -2
- package/dist/components/Timeline/TimelineInOutDragHandler.js +3 -3
- package/dist/components/Timeline/TimelineKeyframeControls.js +1 -0
- package/dist/components/Timeline/TimelineKeyframeEasingLine.d.ts +4 -2
- package/dist/components/Timeline/TimelineKeyframeEasingLine.js +30 -28
- package/dist/components/Timeline/TimelineList.d.ts +1 -0
- package/dist/components/Timeline/TimelineList.js +2 -3
- package/dist/components/Timeline/TimelineScaleField.js +1 -1
- package/dist/components/Timeline/TimelineSelection.js +1 -0
- package/dist/components/Timeline/TimelineSequence.js +34 -28
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +3 -3
- package/dist/components/Timeline/TimelineSequenceItem.js +61 -56
- package/dist/components/Timeline/TimelineSequencePropItem.d.ts +10 -2
- package/dist/components/Timeline/TimelineSequencePropItem.js +64 -12
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +2 -2
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +39 -6
- package/dist/components/Timeline/TimelineTimeIndicators.js +36 -3
- package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -1
- package/dist/components/Timeline/TimelineVideoInfo.js +36 -3
- package/dist/components/Timeline/TimelineZoomControls.d.ts +2 -2
- package/dist/components/Timeline/TimelineZoomControls.js +39 -12
- package/dist/components/Timeline/reset-selected-timeline-props.js +1 -1
- package/dist/components/Timeline/should-subscribe-to-sequence-props.d.ts +1 -1
- package/dist/components/Timeline/timeline-asset-link.d.ts +2 -2
- package/dist/components/Timeline/timeline-asset-link.js +2 -2
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +4 -0
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.d.ts +1 -1
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +7 -18
- package/dist/components/Timeline/use-timeline-asset-drop.js +1 -0
- package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +1 -0
- package/dist/components/Timeline/use-timeline-expanded-tree.js +5 -0
- package/dist/components/Timeline/use-timeline-height.d.ts +2 -1
- package/dist/components/Timeline/use-timeline-height.js +23 -2
- package/dist/components/TimelineCombobox.d.ts +11 -0
- package/dist/components/TimelineCombobox.js +181 -0
- package/dist/components/TimelineInOutToggle.js +5 -1
- package/dist/components/TopPanel.js +22 -7
- package/dist/components/UpdateCheck.js +1 -1
- package/dist/components/effect-drag-and-drop.js +1 -1
- package/dist/components/handle-drop.d.ts +2 -1
- package/dist/components/handle-drop.js +12 -2
- package/dist/components/import-assets.d.ts +18 -6
- package/dist/components/import-assets.js +76 -32
- package/dist/components/selected-outline-types.d.ts +1 -1
- package/dist/esm/{chunk-43m68z1k.js → chunk-b49ec3nz.js} +12436 -11482
- package/dist/esm/internals.mjs +12436 -11482
- package/dist/esm/previewEntry.mjs +9671 -8717
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/client-id.d.ts +3 -1
- package/dist/helpers/client-id.js +21 -4
- package/dist/helpers/hoverable.d.ts +11 -0
- package/dist/helpers/hoverable.js +70 -0
- package/dist/helpers/inject-css.js +3 -0
- package/dist/helpers/install-required-package.d.ts +3 -3
- package/dist/helpers/install-required-package.js +1 -6
- package/dist/helpers/studio-fit-padding.d.ts +1 -1
- package/dist/helpers/studio-fit-padding.js +1 -1
- package/dist/helpers/timeline-layout.d.ts +2 -1
- package/dist/helpers/timeline-layout.js +5 -2
- package/dist/helpers/use-is-fullscreen.d.ts +1 -0
- package/dist/helpers/use-is-fullscreen.js +25 -0
- package/dist/helpers/use-menu-structure.js +26 -43
- package/dist/helpers/use-runtime-values.d.ts +11 -0
- package/dist/helpers/use-runtime-values.js +76 -0
- package/dist/icons/apps.d.ts +2 -0
- package/dist/icons/apps.js +7 -0
- package/dist/icons/browse-elements.d.ts +4 -0
- package/dist/icons/browse-elements.js +10 -0
- package/dist/icons/canvas-zoom.d.ts +10 -0
- package/dist/icons/canvas-zoom.js +21 -0
- package/dist/icons/playback-rate.d.ts +5 -0
- package/dist/icons/playback-rate.js +31 -0
- package/dist/icons/search.d.ts +5 -0
- package/dist/icons/search.js +10 -0
- package/dist/state/modals.d.ts +5 -6
- package/dist/state/modals.js +5 -3
- package/package.json +12 -12
|
@@ -41,7 +41,9 @@ const remotion_1 = require("remotion");
|
|
|
41
41
|
const no_react_1 = require("remotion/no-react");
|
|
42
42
|
const client_id_1 = require("../helpers/client-id");
|
|
43
43
|
const interactivity_enabled_1 = require("../helpers/interactivity-enabled");
|
|
44
|
+
const use_is_fullscreen_1 = require("../helpers/use-is-fullscreen");
|
|
44
45
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
46
|
+
const use_runtime_values_1 = require("../helpers/use-runtime-values");
|
|
45
47
|
const editor_guides_1 = require("../state/editor-guides");
|
|
46
48
|
const editor_outlines_1 = require("../state/editor-outlines");
|
|
47
49
|
const scale_lock_1 = require("../state/scale-lock");
|
|
@@ -98,7 +100,7 @@ Object.defineProperty(exports, "getSequencesWithSelectableOutlines", { enumerabl
|
|
|
98
100
|
Object.defineProperty(exports, "getTransformedSvgViewportPoints", { enumerable: true, get: function () { return selected_outline_measurement_2.getTransformedSvgViewportPoints; } });
|
|
99
101
|
const selected_outline_types_2 = require("./selected-outline-types");
|
|
100
102
|
Object.defineProperty(exports, "selectedOutlineDragThresholdPx", { enumerable: true, get: function () { return selected_outline_types_2.selectedOutlineDragThresholdPx; } });
|
|
101
|
-
const getEffectiveCropValue = ({ activeSchema,
|
|
103
|
+
const getEffectiveCropValue = ({ activeSchema, dragOverrides, fieldKey, frame, propStatuses, runtimeValues, }) => {
|
|
102
104
|
var _a;
|
|
103
105
|
const fieldSchema = activeSchema === null || activeSchema === void 0 ? void 0 : activeSchema[fieldKey];
|
|
104
106
|
if ((fieldSchema === null || fieldSchema === void 0 ? void 0 : fieldSchema.type) !== 'number') {
|
|
@@ -113,7 +115,7 @@ const getEffectiveCropValue = ({ activeSchema, controls, dragOverrides, fieldKey
|
|
|
113
115
|
frame,
|
|
114
116
|
shouldResortToDefaultValueIfUndefined: true,
|
|
115
117
|
})
|
|
116
|
-
: ((_a =
|
|
118
|
+
: ((_a = runtimeValues[fieldKey]) !== null && _a !== void 0 ? _a : fieldSchema.default);
|
|
117
119
|
return typeof value === 'number' && Number.isFinite(value) ? value : 0;
|
|
118
120
|
};
|
|
119
121
|
const getCropDragFields = ({ activeSchema, cropValues, propStatuses, }) => {
|
|
@@ -422,7 +424,8 @@ const SelectedOutlineOverlay = ({ compositionHeight, compositionWidth, scale, tr
|
|
|
422
424
|
const { editorShowOutlines } = (0, react_1.useContext)(editor_outlines_1.EditorShowOutlinesContext);
|
|
423
425
|
const { hoveredSequence, setHoveredSequence } = (0, react_1.useContext)(timeline_sequence_hover_1.TimelineSequenceHoverContext);
|
|
424
426
|
const { editorShowGuides, guidesList } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
|
|
425
|
-
const
|
|
427
|
+
const isFullscreen = (0, use_is_fullscreen_1.useIsFullscreen)();
|
|
428
|
+
const { frameBack, frameForward, getCurrentFrame, seek } = player_1.PlayerInternals.usePlayerMethods();
|
|
426
429
|
const keybindings = (0, use_keybinding_1.useKeybinding)();
|
|
427
430
|
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
428
431
|
const [outlines, setOutlines] = (0, react_1.useState)([]);
|
|
@@ -456,8 +459,47 @@ const SelectedOutlineOverlay = ({ compositionHeight, compositionWidth, scale, tr
|
|
|
456
459
|
const selectOutlineItem = (0, react_1.useCallback)((item, interaction) => {
|
|
457
460
|
selectItem(item, interaction, undefined, { reveal: true });
|
|
458
461
|
}, [selectItem]);
|
|
462
|
+
const outlineRuntimeControls = (0, react_1.useMemo)(() => {
|
|
463
|
+
if (isFullscreen ||
|
|
464
|
+
!(0, interactivity_enabled_1.isStudioSelectionEnabled)() ||
|
|
465
|
+
!previewSelectionAvailable ||
|
|
466
|
+
!editorShowOutlines) {
|
|
467
|
+
return [];
|
|
468
|
+
}
|
|
469
|
+
const selectedSequenceKeys = (0, selected_outline_measurement_1.getSelectedSequenceKeys)(selectedItems);
|
|
470
|
+
const sequenceKeysContainingSelection = (0, selected_outline_measurement_1.getSequenceKeysContainingSelection)(selectedItems);
|
|
471
|
+
return (0, selected_outline_measurement_1.getSequencesWithSelectableOutlines)({
|
|
472
|
+
sequences,
|
|
473
|
+
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
474
|
+
compositions,
|
|
475
|
+
timelinePosition,
|
|
476
|
+
}).flatMap(({ key, sequence }) => {
|
|
477
|
+
if (!selectedSequenceKeys.has(key) &&
|
|
478
|
+
!sequenceKeysContainingSelection.has(key) &&
|
|
479
|
+
(hoveredSequence === null || hoveredSequence === void 0 ? void 0 : hoveredSequence.key) !== key) {
|
|
480
|
+
return [];
|
|
481
|
+
}
|
|
482
|
+
return sequence.controls ? [sequence.controls] : [];
|
|
483
|
+
});
|
|
484
|
+
}, [
|
|
485
|
+
compositions,
|
|
486
|
+
editorShowOutlines,
|
|
487
|
+
hoveredSequence === null || hoveredSequence === void 0 ? void 0 : hoveredSequence.key,
|
|
488
|
+
isFullscreen,
|
|
489
|
+
overrideIdToNodePathMappings,
|
|
490
|
+
previewSelectionAvailable,
|
|
491
|
+
selectedItems,
|
|
492
|
+
sequences,
|
|
493
|
+
timelinePosition,
|
|
494
|
+
]);
|
|
495
|
+
const outlineRuntimeSnapshots = (0, use_runtime_values_1.useRuntimeValueSnapshots)(outlineRuntimeControls);
|
|
496
|
+
const outlineRuntimeValuesByStore = (0, react_1.useMemo)(() => new Map(outlineRuntimeControls.map((controls, index) => [
|
|
497
|
+
controls.runtimeValues,
|
|
498
|
+
outlineRuntimeSnapshots[index],
|
|
499
|
+
])), [outlineRuntimeControls, outlineRuntimeSnapshots]);
|
|
459
500
|
const outlineTargets = (0, react_1.useMemo)(() => {
|
|
460
|
-
if (
|
|
501
|
+
if (isFullscreen ||
|
|
502
|
+
!(0, interactivity_enabled_1.isStudioSelectionEnabled)() ||
|
|
461
503
|
!previewSelectionAvailable ||
|
|
462
504
|
!editorShowOutlines) {
|
|
463
505
|
return [];
|
|
@@ -476,7 +518,7 @@ const SelectedOutlineOverlay = ({ compositionHeight, compositionWidth, scale, tr
|
|
|
476
518
|
compositions,
|
|
477
519
|
timelinePosition,
|
|
478
520
|
}).map(({ key, keyframeDisplayOffset, nodePathInfo, sequence }) => {
|
|
479
|
-
var _a, _b, _c, _d, _e, _f;
|
|
521
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
480
522
|
if (sequence.refForOutline === null) {
|
|
481
523
|
throw new Error('Expected sequence to have a ref for outline');
|
|
482
524
|
}
|
|
@@ -487,10 +529,13 @@ const SelectedOutlineOverlay = ({ compositionHeight, compositionWidth, scale, tr
|
|
|
487
529
|
const nodePropStatuses = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath);
|
|
488
530
|
const sourceFrame = timelinePosition - keyframeDisplayOffset;
|
|
489
531
|
const dragOverrides = (_a = getDragOverrides(nodePath)) !== null && _a !== void 0 ? _a : {};
|
|
532
|
+
const runtimeValues = controls
|
|
533
|
+
? ((_b = outlineRuntimeValuesByStore.get(controls.runtimeValues)) !== null && _b !== void 0 ? _b : controls.runtimeValues.getSnapshot())
|
|
534
|
+
: {};
|
|
490
535
|
const activeSchema = controls
|
|
491
536
|
? (0, selected_outline_drag_1.getSelectedOutlineActiveSchema)({
|
|
492
537
|
schema: controls.schema,
|
|
493
|
-
currentRuntimeValueDotNotation:
|
|
538
|
+
currentRuntimeValueDotNotation: runtimeValues,
|
|
494
539
|
dragOverrides,
|
|
495
540
|
propStatus: nodePropStatuses,
|
|
496
541
|
frame: sourceFrame,
|
|
@@ -499,35 +544,35 @@ const SelectedOutlineOverlay = ({ compositionHeight, compositionWidth, scale, tr
|
|
|
499
544
|
const cropValues = {
|
|
500
545
|
cropLeft: getEffectiveCropValue({
|
|
501
546
|
activeSchema,
|
|
502
|
-
controls,
|
|
503
547
|
dragOverrides,
|
|
504
548
|
fieldKey: selected_outline_types_1.cropFieldKeys.left,
|
|
505
549
|
frame: sourceFrame,
|
|
506
550
|
propStatuses: nodePropStatuses,
|
|
551
|
+
runtimeValues,
|
|
507
552
|
}),
|
|
508
553
|
cropRight: getEffectiveCropValue({
|
|
509
554
|
activeSchema,
|
|
510
|
-
controls,
|
|
511
555
|
dragOverrides,
|
|
512
556
|
fieldKey: selected_outline_types_1.cropFieldKeys.right,
|
|
513
557
|
frame: sourceFrame,
|
|
514
558
|
propStatuses: nodePropStatuses,
|
|
559
|
+
runtimeValues,
|
|
515
560
|
}),
|
|
516
561
|
cropTop: getEffectiveCropValue({
|
|
517
562
|
activeSchema,
|
|
518
|
-
controls,
|
|
519
563
|
dragOverrides,
|
|
520
564
|
fieldKey: selected_outline_types_1.cropFieldKeys.top,
|
|
521
565
|
frame: sourceFrame,
|
|
522
566
|
propStatuses: nodePropStatuses,
|
|
567
|
+
runtimeValues,
|
|
523
568
|
}),
|
|
524
569
|
cropBottom: getEffectiveCropValue({
|
|
525
570
|
activeSchema,
|
|
526
|
-
controls,
|
|
527
571
|
dragOverrides,
|
|
528
572
|
fieldKey: selected_outline_types_1.cropFieldKeys.bottom,
|
|
529
573
|
frame: sourceFrame,
|
|
530
574
|
propStatuses: nodePropStatuses,
|
|
575
|
+
runtimeValues,
|
|
531
576
|
}),
|
|
532
577
|
};
|
|
533
578
|
const crop = remotion_1.Internals.resolveSequenceCrop(cropValues);
|
|
@@ -547,13 +592,13 @@ const SelectedOutlineOverlay = ({ compositionHeight, compositionWidth, scale, tr
|
|
|
547
592
|
const transformOriginValueForRotation = (transformOriginFieldSchema === null || transformOriginFieldSchema === void 0 ? void 0 : transformOriginFieldSchema.type) === 'transform-origin' &&
|
|
548
593
|
((transformOriginPropStatus === null || transformOriginPropStatus === void 0 ? void 0 : transformOriginPropStatus.status) === 'static' ||
|
|
549
594
|
(transformOriginPropStatus === null || transformOriginPropStatus === void 0 ? void 0 : transformOriginPropStatus.status) === 'keyframed')
|
|
550
|
-
? String((
|
|
595
|
+
? String((_c = remotion_1.Internals.getEffectiveVisualModeValue({
|
|
551
596
|
propStatus: transformOriginPropStatus,
|
|
552
597
|
dragOverrideValue: dragOverrides[selected_outline_types_1.transformOriginFieldKey],
|
|
553
598
|
defaultValue: transformOriginFieldSchema.default,
|
|
554
599
|
frame: sourceFrame,
|
|
555
600
|
shouldResortToDefaultValueIfUndefined: true,
|
|
556
|
-
})) !== null &&
|
|
601
|
+
})) !== null && _c !== void 0 ? _c : transformOriginFieldSchema.default)
|
|
557
602
|
: '50% 50%';
|
|
558
603
|
const canDragStatus = (propStatus === null || propStatus === void 0 ? void 0 : propStatus.status) === 'static' ||
|
|
559
604
|
((propStatus === null || propStatus === void 0 ? void 0 : propStatus.status) === 'keyframed' &&
|
|
@@ -693,16 +738,16 @@ const SelectedOutlineOverlay = ({ compositionHeight, compositionWidth, scale, tr
|
|
|
693
738
|
nodePath,
|
|
694
739
|
originDefault: transformOriginFieldSchema.default,
|
|
695
740
|
originPropStatus: transformOriginPropStatus,
|
|
696
|
-
originValue: String((
|
|
741
|
+
originValue: String((_d = remotion_1.Internals.getEffectiveVisualModeValue({
|
|
697
742
|
propStatus: transformOriginPropStatus,
|
|
698
743
|
dragOverrideValue: dragOverrides[selected_outline_types_1.transformOriginFieldKey],
|
|
699
744
|
defaultValue: transformOriginFieldSchema.default,
|
|
700
745
|
frame: transformOriginSourceFrame,
|
|
701
746
|
shouldResortToDefaultValueIfUndefined: true,
|
|
702
|
-
})) !== null &&
|
|
747
|
+
})) !== null && _d !== void 0 ? _d : transformOriginFieldSchema.default),
|
|
703
748
|
rotateValue: String((rotationPropStatus === null || rotationPropStatus === void 0 ? void 0 : rotationPropStatus.status) === 'static' ||
|
|
704
749
|
(rotationPropStatus === null || rotationPropStatus === void 0 ? void 0 : rotationPropStatus.status) === 'keyframed'
|
|
705
|
-
? ((
|
|
750
|
+
? ((_e = remotion_1.Internals.getEffectiveVisualModeValue({
|
|
706
751
|
propStatus: rotationPropStatus,
|
|
707
752
|
dragOverrideValue: dragOverrides[selected_outline_types_1.rotateFieldKey],
|
|
708
753
|
defaultValue: (rotationFieldSchema === null || rotationFieldSchema === void 0 ? void 0 : rotationFieldSchema.type) === 'rotation-css'
|
|
@@ -710,11 +755,11 @@ const SelectedOutlineOverlay = ({ compositionHeight, compositionWidth, scale, tr
|
|
|
710
755
|
: '0deg',
|
|
711
756
|
frame: transformOriginSourceFrame,
|
|
712
757
|
shouldResortToDefaultValueIfUndefined: true,
|
|
713
|
-
})) !== null &&
|
|
758
|
+
})) !== null && _e !== void 0 ? _e : '0deg')
|
|
714
759
|
: '0deg'),
|
|
715
760
|
scaleValue: (scalePropStatus === null || scalePropStatus === void 0 ? void 0 : scalePropStatus.status) === 'static' ||
|
|
716
761
|
(scalePropStatus === null || scalePropStatus === void 0 ? void 0 : scalePropStatus.status) === 'keyframed'
|
|
717
|
-
? String((
|
|
762
|
+
? String((_f = remotion_1.Internals.getEffectiveVisualModeValue({
|
|
718
763
|
propStatus: scalePropStatus,
|
|
719
764
|
dragOverrideValue: dragOverrides[selected_outline_types_1.scaleFieldKey],
|
|
720
765
|
defaultValue: (scaleFieldSchema === null || scaleFieldSchema === void 0 ? void 0 : scaleFieldSchema.type) === 'scale'
|
|
@@ -722,19 +767,19 @@ const SelectedOutlineOverlay = ({ compositionHeight, compositionWidth, scale, tr
|
|
|
722
767
|
: 1,
|
|
723
768
|
frame: transformOriginSourceFrame,
|
|
724
769
|
shouldResortToDefaultValueIfUndefined: true,
|
|
725
|
-
})) !== null &&
|
|
770
|
+
})) !== null && _f !== void 0 ? _f : 1)
|
|
726
771
|
: '1',
|
|
727
772
|
schema: controls.schema,
|
|
728
773
|
sourceFrame: transformOriginSourceFrame,
|
|
729
774
|
translateDefault: fieldSchema.default,
|
|
730
775
|
translatePropStatus: propStatus,
|
|
731
|
-
translateValue: String((
|
|
776
|
+
translateValue: String((_g = remotion_1.Internals.getEffectiveVisualModeValue({
|
|
732
777
|
propStatus,
|
|
733
778
|
dragOverrideValue: dragOverrides[selected_outline_types_1.translateFieldKey],
|
|
734
779
|
defaultValue: fieldSchema.default,
|
|
735
780
|
frame: transformOriginSourceFrame,
|
|
736
781
|
shouldResortToDefaultValueIfUndefined: true,
|
|
737
|
-
})) !== null &&
|
|
782
|
+
})) !== null && _g !== void 0 ? _g : fieldSchema.default),
|
|
738
783
|
}
|
|
739
784
|
: null,
|
|
740
785
|
uvHandles: containsSelection
|
|
@@ -756,6 +801,7 @@ const SelectedOutlineOverlay = ({ compositionHeight, compositionWidth, scale, tr
|
|
|
756
801
|
getEffectDragOverrides,
|
|
757
802
|
getScaleLockState,
|
|
758
803
|
editorShowOutlines,
|
|
804
|
+
isFullscreen,
|
|
759
805
|
overrideIdToNodePathMappings,
|
|
760
806
|
previewInteractive,
|
|
761
807
|
previewSelectionAvailable,
|
|
@@ -764,6 +810,7 @@ const SelectedOutlineOverlay = ({ compositionHeight, compositionWidth, scale, tr
|
|
|
764
810
|
sequences,
|
|
765
811
|
compositions,
|
|
766
812
|
timelinePosition,
|
|
813
|
+
outlineRuntimeValuesByStore,
|
|
767
814
|
]);
|
|
768
815
|
(0, react_1.useEffect)(() => {
|
|
769
816
|
if ((hoveredSequence === null || hoveredSequence === void 0 ? void 0 : hoveredSequence.source) === 'canvas' &&
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SettingsModal = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const apps_1 = require("../icons/apps");
|
|
7
|
+
const certificate_1 = require("../icons/certificate");
|
|
8
|
+
const modals_1 = require("../state/modals");
|
|
9
|
+
const ConfigureDefaultEditorModal_1 = require("./ConfigureDefaultEditorModal");
|
|
10
|
+
const ConfigureLicenseModal_1 = require("./ConfigureLicenseModal");
|
|
11
|
+
const is_menu_item_1 = require("./Menu/is-menu-item");
|
|
12
|
+
const ModalHeader_1 = require("./ModalHeader");
|
|
13
|
+
const DismissableModal_1 = require("./NewComposition/DismissableModal");
|
|
14
|
+
const render_modals_1 = require("./RenderModal/render-modals");
|
|
15
|
+
const vertical_1 = require("./Tabs/vertical");
|
|
16
|
+
const hiddenPanel = {
|
|
17
|
+
display: 'none',
|
|
18
|
+
};
|
|
19
|
+
const appsIcon = {
|
|
20
|
+
...render_modals_1.icon,
|
|
21
|
+
height: 20,
|
|
22
|
+
width: 20,
|
|
23
|
+
};
|
|
24
|
+
const appsIconContainer = {
|
|
25
|
+
...render_modals_1.iconContainer,
|
|
26
|
+
height: 20,
|
|
27
|
+
width: 20,
|
|
28
|
+
};
|
|
29
|
+
const SettingsModal = ({ initialPublicLicenseKey, initialTab }) => {
|
|
30
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
31
|
+
const [tab, setTab] = (0, react_1.useState)(initialTab);
|
|
32
|
+
const [openedTabs, setOpenedTabs] = (0, react_1.useState)([initialTab]);
|
|
33
|
+
const dismiss = (0, react_1.useCallback)(() => {
|
|
34
|
+
setSelectedModal(null);
|
|
35
|
+
}, [setSelectedModal]);
|
|
36
|
+
const selectTab = (0, react_1.useCallback)((newTab) => {
|
|
37
|
+
setTab(newTab);
|
|
38
|
+
setOpenedTabs((currentOpenedTabs) => {
|
|
39
|
+
if (currentOpenedTabs.includes(newTab)) {
|
|
40
|
+
return currentOpenedTabs;
|
|
41
|
+
}
|
|
42
|
+
return [...currentOpenedTabs, newTab];
|
|
43
|
+
});
|
|
44
|
+
}, []);
|
|
45
|
+
return (jsx_runtime_1.jsxs(DismissableModal_1.DismissableModal, { panelStyle: render_modals_1.outerModalStyle, children: [
|
|
46
|
+
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: "Settings", onClose: dismiss }), jsx_runtime_1.jsxs("div", { style: render_modals_1.horizontalLayout, children: [
|
|
47
|
+
jsx_runtime_1.jsxs("div", { style: render_modals_1.leftSidebar, children: [jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'apps', onClick: () => selectTab('apps'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: appsIconContainer, children: jsx_runtime_1.jsx(apps_1.AppsIcon, { color: color, style: appsIcon }) })), children: "Apps" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'license', onClick: () => selectTab('license'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(certificate_1.CertificateIcon, { color: color, style: render_modals_1.icon }) })), children: "License" })] }), openedTabs.includes('apps') ? (jsx_runtime_1.jsx("div", { style: tab === 'apps' ? render_modals_1.optionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(ConfigureDefaultEditorModal_1.DefaultEditorSettings, { onSaved: dismiss }) })) : null, openedTabs.includes('license') ? (jsx_runtime_1.jsx("div", { style: tab === 'license' ? render_modals_1.optionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(ConfigureLicenseModal_1.LicenseSettings, { initialPublicLicenseKey: initialPublicLicenseKey, onSaved: dismiss }) })) : null] })
|
|
48
|
+
] }));
|
|
49
|
+
};
|
|
50
|
+
exports.SettingsModal = SettingsModal;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SettingsModalFooter = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const colors_1 = require("../helpers/colors");
|
|
7
|
+
const InspectorOpenInEditor_1 = require("./InspectorOpenInEditor");
|
|
8
|
+
const ModalFooter_1 = require("./ModalFooter");
|
|
9
|
+
const footer = {
|
|
10
|
+
flex: 'none',
|
|
11
|
+
};
|
|
12
|
+
const footerRow = {
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
display: 'flex',
|
|
15
|
+
justifyContent: 'space-between',
|
|
16
|
+
};
|
|
17
|
+
const configFileHint = {
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
color: colors_1.LIGHT_TEXT,
|
|
20
|
+
display: 'flex',
|
|
21
|
+
fontFamily: 'sans-serif',
|
|
22
|
+
fontSize: 13,
|
|
23
|
+
lineHeight: '20px',
|
|
24
|
+
whiteSpace: 'nowrap',
|
|
25
|
+
};
|
|
26
|
+
const configFileName = {
|
|
27
|
+
color: colors_1.BLUE,
|
|
28
|
+
fontFamily: 'inherit',
|
|
29
|
+
fontSize: 13,
|
|
30
|
+
fontWeight: 'bold',
|
|
31
|
+
lineHeight: '20px',
|
|
32
|
+
};
|
|
33
|
+
const SettingsModalFooter = ({ children }) => {
|
|
34
|
+
const configFileLocation = (0, react_1.useMemo)(() => {
|
|
35
|
+
return {
|
|
36
|
+
source: 'remotion.config.ts',
|
|
37
|
+
line: 1,
|
|
38
|
+
column: 1,
|
|
39
|
+
};
|
|
40
|
+
}, []);
|
|
41
|
+
return (jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { style: footer, noBorder: true, children: jsx_runtime_1.jsxs("div", { style: footerRow, children: [
|
|
42
|
+
jsx_runtime_1.jsxs("div", { style: configFileHint, children: ["Changes save to",
|
|
43
|
+
jsx_runtime_1.jsx(InspectorOpenInEditor_1.InspectorOpenInEditor, { location: configFileLocation, label: jsx_runtime_1.jsx("strong", { style: configFileName, children: "remotion.config.ts" }) })
|
|
44
|
+
] }), children] }) }));
|
|
45
|
+
};
|
|
46
|
+
exports.SettingsModalFooter = SettingsModalFooter;
|
|
@@ -9,7 +9,7 @@ const render_1 = require("../icons/render");
|
|
|
9
9
|
const modals_1 = require("../state/modals");
|
|
10
10
|
const InlineAction_1 = require("./InlineAction");
|
|
11
11
|
const SidebarRenderButton = ({ composition, visible }) => {
|
|
12
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.
|
|
12
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
13
13
|
const iconStyle = (0, react_1.useMemo)(() => {
|
|
14
14
|
return {
|
|
15
15
|
style: {
|
|
@@ -6,9 +6,9 @@ const react_1 = require("react");
|
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
7
|
const colors_1 = require("../helpers/colors");
|
|
8
8
|
const get_preview_file_type_1 = require("../helpers/get-preview-file-type");
|
|
9
|
+
const canvas_zoom_1 = require("../icons/canvas-zoom");
|
|
9
10
|
const Checkmark_1 = require("../icons/Checkmark");
|
|
10
|
-
const
|
|
11
|
-
const ComboBox_1 = require("./NewComposition/ComboBox");
|
|
11
|
+
const TimelineCombobox_1 = require("./TimelineCombobox");
|
|
12
12
|
const commonPreviewSizes = [
|
|
13
13
|
{
|
|
14
14
|
size: 'auto',
|
|
@@ -47,7 +47,6 @@ const getPreviewSizeLabel = (previewSize) => {
|
|
|
47
47
|
};
|
|
48
48
|
exports.getPreviewSizeLabel = getPreviewSizeLabel;
|
|
49
49
|
const accessibilityLabel = 'Preview Size';
|
|
50
|
-
const comboStyle = { width: 64 };
|
|
51
50
|
const getUniqueSizes = (size) => {
|
|
52
51
|
const customPreviewSizes = [size, ...commonPreviewSizes];
|
|
53
52
|
const uniqueSizes = [];
|
|
@@ -116,14 +115,9 @@ const usePreviewSizeMenuItems = () => {
|
|
|
116
115
|
exports.usePreviewSizeMenuItems = usePreviewSizeMenuItems;
|
|
117
116
|
const SizeSelector = () => {
|
|
118
117
|
const { items, selectedId, zoomable } = (0, exports.usePreviewSizeMenuItems)();
|
|
119
|
-
const style = (0, react_1.useMemo)(() => {
|
|
120
|
-
return {
|
|
121
|
-
padding: ControlButton_1.CONTROL_BUTTON_PADDING - 2,
|
|
122
|
-
};
|
|
123
|
-
}, []);
|
|
124
118
|
if (!zoomable) {
|
|
125
119
|
return null;
|
|
126
120
|
}
|
|
127
|
-
return (jsx_runtime_1.jsx(
|
|
121
|
+
return (jsx_runtime_1.jsx(TimelineCombobox_1.TimelineCombobox, { title: accessibilityLabel, selectedId: selectedId, values: items, renderLeftItem: (color) => selectedId === 'auto' ? (jsx_runtime_1.jsx(canvas_zoom_1.CanvasFitIcon, { color: color })) : Number(selectedId) < 1 ? (jsx_runtime_1.jsx(canvas_zoom_1.CanvasZoomOutIcon, { color: color })) : (jsx_runtime_1.jsx(canvas_zoom_1.CanvasZoomIcon, { color: color })), unhoveredIconColor: colors_1.WHITE_ALPHA_80 }));
|
|
128
122
|
};
|
|
129
123
|
exports.SizeSelector = SizeSelector;
|
|
@@ -25,7 +25,7 @@ const inlineCode = {
|
|
|
25
25
|
color: 'inherit',
|
|
26
26
|
};
|
|
27
27
|
const useSvgImportDialog = () => {
|
|
28
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.
|
|
28
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
29
29
|
return (0, react_1.useCallback)(() => {
|
|
30
30
|
return new Promise((resolve) => {
|
|
31
31
|
let settled = false;
|
|
@@ -48,7 +48,7 @@ const useSvgImportDialog = () => {
|
|
|
48
48
|
};
|
|
49
49
|
exports.useSvgImportDialog = useSvgImportDialog;
|
|
50
50
|
const SvgImportDialog = ({ state }) => {
|
|
51
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.
|
|
51
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
52
52
|
const settledRef = (0, react_1.useRef)(false);
|
|
53
53
|
const closeCurrentModal = (0, react_1.useCallback)(() => {
|
|
54
54
|
setSelectedModal((modal) => (modal === null || modal === void 0 ? void 0 : modal.type) === 'svg-import-dialog' && modal.id === state.id
|
|
@@ -52,7 +52,7 @@ const TimeValue = () => {
|
|
|
52
52
|
const frame = (0, remotion_1.useCurrentFrame)();
|
|
53
53
|
const config = remotion_1.Internals.useUnsafeVideoConfig();
|
|
54
54
|
const isStill = (0, is_current_selected_still_1.useIsStill)();
|
|
55
|
-
const { seek, play, pause, toggle } = player_1.PlayerInternals.
|
|
55
|
+
const { seek, play, pause, toggle } = player_1.PlayerInternals.usePlayerMethods();
|
|
56
56
|
const keybindings = (0, use_keybinding_1.useKeybinding)();
|
|
57
57
|
const ref = (0, react_1.useRef)(null);
|
|
58
58
|
const onTextChange = (0, react_1.useCallback)((newVal) => {
|
|
@@ -188,6 +188,7 @@ const TimelineContextMenuArea = ({ children }) => {
|
|
|
188
188
|
destinationDimensions: null,
|
|
189
189
|
dropPosition: null,
|
|
190
190
|
from: null,
|
|
191
|
+
preferCompositionStart: null,
|
|
191
192
|
svgImportMode: 'image',
|
|
192
193
|
});
|
|
193
194
|
}
|
|
@@ -195,7 +196,7 @@ const TimelineContextMenuArea = ({ children }) => {
|
|
|
195
196
|
setIsAddingAsset(false);
|
|
196
197
|
}
|
|
197
198
|
}, [canInsertAsset, compositionFile, currentCompositionId, videoConfig]);
|
|
198
|
-
const
|
|
199
|
+
const getContextMenuItems = (0, react_1.useCallback)(() => {
|
|
199
200
|
return [
|
|
200
201
|
{
|
|
201
202
|
type: 'item',
|
|
@@ -223,7 +224,7 @@ const TimelineContextMenuArea = ({ children }) => {
|
|
|
223
224
|
},
|
|
224
225
|
];
|
|
225
226
|
}, [insertSolid, canInsertSolid, insertAsset, canInsertAsset]);
|
|
226
|
-
return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { ref: timeline_refs_1.timelineVerticalScroll,
|
|
227
|
+
return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { ref: timeline_refs_1.timelineVerticalScroll, getItems: getContextMenuItems, 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 }) }));
|
|
227
228
|
};
|
|
228
229
|
const TimelineInner = () => {
|
|
229
230
|
var _a;
|
|
@@ -267,9 +268,9 @@ const TimelineInner = () => {
|
|
|
267
268
|
return null;
|
|
268
269
|
}
|
|
269
270
|
return (jsx_runtime_1.jsx(SubscribeToNodePaths_1.SubscribeToNodePaths, { overrideId: sequence.controls.overrideId, componentIdentity: sequence.controls.componentIdentity, schema: sequence.controls.schema, getStack: sequence.getStack, effects: sequence.effects }, sequence.id));
|
|
270
|
-
}), (0, interactivity_enabled_1.isStudioInteractivityEnabled)() ? jsx_runtime_1.jsx(SequencePropsObserver_1.SequencePropsObserver, {}) : null, jsx_runtime_1.jsx(TimelineKeyframeTracksContext_1.TimelineKeyframeTracksProvider, { tracks: filtered, children: jsx_runtime_1.jsxs(TimelineSelection_1.TimelineSelectableItemsProvider, { timeline: shown, children: [(0, interactivity_enabled_1.isStudioInteractivityEnabled)() ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectAllKeybindings, { timeline: shown })) : null, jsx_runtime_1.jsx(TimelineHeightContainer_1.TimelineHeightContainer, { shown: shown, hasBeenCut: hasBeenCut, children: isStill ? (jsx_runtime_1.jsx(TimelineList_1.TimelineList, { timeline: shown })) : (jsx_runtime_1.jsxs(TimelineWidthProvider_1.TimelineWidthProvider, { children: [
|
|
271
|
+
}), (0, interactivity_enabled_1.isStudioInteractivityEnabled)() ? jsx_runtime_1.jsx(SequencePropsObserver_1.SequencePropsObserver, {}) : null, jsx_runtime_1.jsx(TimelineKeyframeTracksContext_1.TimelineKeyframeTracksProvider, { tracks: filtered, children: jsx_runtime_1.jsxs(TimelineSelection_1.TimelineSelectableItemsProvider, { timeline: shown, children: [(0, interactivity_enabled_1.isStudioInteractivityEnabled)() ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectAllKeybindings, { timeline: shown })) : null, jsx_runtime_1.jsx(TimelineHeightContainer_1.TimelineHeightContainer, { shown: shown, hasBeenCut: hasBeenCut, isStill: isStill, children: isStill ? (jsx_runtime_1.jsx(TimelineList_1.TimelineList, { timeline: shown, showTimePadding: false })) : (jsx_runtime_1.jsxs(TimelineWidthProvider_1.TimelineWidthProvider, { children: [
|
|
271
272
|
jsx_runtime_1.jsx(TimelinePinchZoom_1.TimelinePinchZoom, {}), jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { orientation: "vertical", defaultFlex: 0.2, id: "names-to-timeline", maxFlex: 0.5, minFlex: 0.15, maxFlexerSize: null, minFlexerSize: MIN_TIMELINE_LABELS_WIDTH, maxAntiFlexerSize: null, minAntiFlexerSize: null, children: [
|
|
272
|
-
jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { type: "flexer", sticky: jsx_runtime_1.jsx(TimelineTimeIndicators_1.TimelineTimePlaceholders, {}), children: jsx_runtime_1.jsx(TimelineList_1.TimelineList, { timeline: shown }) }), jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { onCollapse: noop, allowToCollapse: "none" }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { type: "anti-flexer", sticky: null, children: jsx_runtime_1.jsxs(TimelineScrollable_1.TimelineScrollable, { children: [
|
|
273
|
+
jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { type: "flexer", sticky: jsx_runtime_1.jsx(TimelineTimeIndicators_1.TimelineTimePlaceholders, {}), children: jsx_runtime_1.jsx(TimelineList_1.TimelineList, { timeline: shown, showTimePadding: true }) }), jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { onCollapse: noop, allowToCollapse: "none" }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { type: "anti-flexer", sticky: null, children: jsx_runtime_1.jsxs(TimelineScrollable_1.TimelineScrollable, { children: [
|
|
273
274
|
jsx_runtime_1.jsx(TimelineTracks_1.TimelineTracks, { timeline: shown, hasBeenCut: hasBeenCut }), jsx_runtime_1.jsx(TimelinePlayCursorSyncer_1.TimelinePlayCursorSyncer, {}), jsx_runtime_1.jsx(TimelineInOutPointer_1.TimelineInOutPointer, {}), jsx_runtime_1.jsx(TimelineTimeIndicators_1.TimelineTimeIndicators, {}), jsx_runtime_1.jsx(TimelineDragHandler_1.TimelineDragHandler, {}), (0, interactivity_enabled_1.isStudioInteractivityEnabled)() ? (jsx_runtime_1.jsx(TimelineInOutDragHandler_1.TimelineInOutDragHandler, {})) : null, jsx_runtime_1.jsx(TimelineSlider_1.TimelineSlider, {})
|
|
274
275
|
] }) })
|
|
275
276
|
] })
|
|
@@ -34,7 +34,7 @@ const TimelineAssetField = ({ field, effectiveValue, propStatus, onSave, onDragV
|
|
|
34
34
|
if (field.fieldSchema.type !== 'asset') {
|
|
35
35
|
throw new Error('TimelineAssetField rendered for non-asset field');
|
|
36
36
|
}
|
|
37
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.
|
|
37
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
38
38
|
const staticFiles = (0, use_static_files_1.useStaticFiles)();
|
|
39
39
|
const { getSourceAction, initialQuery, sourceAction } = (0, react_1.useContext)(exports.AssetSelectionContext);
|
|
40
40
|
const inlineSourceAction = (0, react_1.useMemo)(() => {
|
|
@@ -108,7 +108,7 @@ const TimelineDragHandlerInner = () => {
|
|
|
108
108
|
const [dragging, setDragging] = (0, react_1.useState)({
|
|
109
109
|
dragging: false,
|
|
110
110
|
});
|
|
111
|
-
const {
|
|
111
|
+
const { isPlaying, play, pause, seek } = player_1.PlayerInternals.usePlayerMethods();
|
|
112
112
|
const scroller = (0, react_1.useRef)(null);
|
|
113
113
|
const stopInterval = () => {
|
|
114
114
|
if (scroller.current) {
|
|
@@ -140,14 +140,14 @@ const TimelineDragHandlerInner = () => {
|
|
|
140
140
|
seek(frame);
|
|
141
141
|
setDragging({
|
|
142
142
|
dragging: true,
|
|
143
|
-
wasPlaying:
|
|
143
|
+
wasPlaying: isPlaying(),
|
|
144
144
|
button: e.button,
|
|
145
145
|
pointerId: e.pointerId,
|
|
146
146
|
target: e.currentTarget,
|
|
147
147
|
});
|
|
148
148
|
(_b = (_a = e.currentTarget).setPointerCapture) === null || _b === void 0 ? void 0 : _b.call(_a, e.pointerId);
|
|
149
149
|
pause();
|
|
150
|
-
}, [isHighestContext, videoConfig, left, width, seek,
|
|
150
|
+
}, [isHighestContext, videoConfig, left, width, seek, isPlaying, pause]);
|
|
151
151
|
const onPointerMoveScrubbing = (0, react_1.useCallback)((e) => {
|
|
152
152
|
var _a;
|
|
153
153
|
if (!videoConfig) {
|
|
@@ -247,6 +247,9 @@ const TimelineDragHandlerInner = () => {
|
|
|
247
247
|
extrapolate: 'clamp',
|
|
248
248
|
});
|
|
249
249
|
setFrame((c) => {
|
|
250
|
+
if (c[videoConfig.id] === frame) {
|
|
251
|
+
return c;
|
|
252
|
+
}
|
|
250
253
|
const newObj = { ...c, [videoConfig.id]: frame };
|
|
251
254
|
remotion_1.Internals.persistCurrentFrame(newObj);
|
|
252
255
|
return newObj;
|
|
@@ -120,10 +120,13 @@ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, do
|
|
|
120
120
|
(0, NotificationCenter_1.showNotification)(err.message, 4000);
|
|
121
121
|
}
|
|
122
122
|
}, [deleteDisabled, effectIndex, nodePath, validatedLocation.source]);
|
|
123
|
-
const
|
|
123
|
+
const getContextMenuItems = (0, react_1.useCallback)(() => {
|
|
124
124
|
if (!previewConnected) {
|
|
125
125
|
return [];
|
|
126
126
|
}
|
|
127
|
+
if (selection.selectable) {
|
|
128
|
+
selection.onSelect({ shiftKey: false, toggleKey: false });
|
|
129
|
+
}
|
|
127
130
|
const items = [];
|
|
128
131
|
if (documentationLink) {
|
|
129
132
|
items.push({
|
|
@@ -168,6 +171,7 @@ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, do
|
|
|
168
171
|
documentationLink,
|
|
169
172
|
onDeleteEffectFromSource,
|
|
170
173
|
previewConnected,
|
|
174
|
+
selection,
|
|
171
175
|
]);
|
|
172
176
|
const onToggle = (0, react_1.useCallback)((type) => {
|
|
173
177
|
if (!canToggle || previewServerState.type !== 'connected') {
|
|
@@ -322,6 +326,6 @@ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, do
|
|
|
322
326
|
}, [dropIndicator]);
|
|
323
327
|
const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: canToggle ? (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEye, { type: "effect", hidden: isDisabled, onInvoked: onToggle })) : (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {})), arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowButton, { isExpanded: isExpanded, onClick: () => toggleTrack(nodePathInfo), label: `${label} section`, disabled: false }), style: rowStyle, selected: selection.selected, selectable: selection.selectable, selectionItem: selection.selectionItem, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: containsSelection, outerHeight: null, children: jsx_runtime_1.jsx("span", { title: label, style: labelStyle, children: label }) }));
|
|
324
328
|
const draggableRow = canReorder ? (jsx_runtime_1.jsxs("div", { draggable: true, onDragStart: onDragStart, onDragEnd: onDragEnd, onDragOver: onDragOver, onDragLeave: onDragLeave, onDrop: onDrop, style: reorderWrapper, children: [reorderLineStyle ? jsx_runtime_1.jsx("div", { style: reorderLineStyle }) : null, row] })) : (row);
|
|
325
|
-
return previewConnected ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, {
|
|
329
|
+
return previewConnected ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: draggableRow })) : (draggableRow);
|
|
326
330
|
};
|
|
327
331
|
exports.TimelineEffectItem = TimelineEffectItem;
|
|
@@ -209,6 +209,10 @@ const TimelineEffectPropValue = ({ field, nodePath, validatedLocation, sourceFra
|
|
|
209
209
|
return (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineFieldValue, { field: field, propStatus: propStatus, onSave: onSave, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, effectiveValue: effectiveValue, scaleLockNodePath: null }));
|
|
210
210
|
};
|
|
211
211
|
exports.TimelineEffectPropValue = TimelineEffectPropValue;
|
|
212
|
+
const TimelineEffectPropValueAtCurrentFrame = ({ field, nodePath, validatedLocation, keyframeDisplayOffset }) => {
|
|
213
|
+
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
214
|
+
return (jsx_runtime_1.jsx(exports.TimelineEffectPropValue, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, sourceFrame: timelinePosition - keyframeDisplayOffset }));
|
|
215
|
+
};
|
|
212
216
|
const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, keyframeDisplayOffset, keyframeControlsMode = 'timeline', }) => {
|
|
213
217
|
var _a;
|
|
214
218
|
var _b;
|
|
@@ -217,8 +221,6 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
217
221
|
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
218
222
|
const { getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
219
223
|
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
220
|
-
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
221
|
-
const sourceFrame = timelinePosition - keyframeDisplayOffset;
|
|
222
224
|
const style = (0, react_1.useMemo)(() => {
|
|
223
225
|
return field.typeName === 'text-content'
|
|
224
226
|
? fieldRowBase
|
|
@@ -294,7 +296,10 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
294
296
|
setPropStatuses,
|
|
295
297
|
validatedLocation.source,
|
|
296
298
|
]);
|
|
297
|
-
const
|
|
299
|
+
const getContextMenuItems = (0, react_1.useCallback)(() => {
|
|
300
|
+
if (selection.selectable) {
|
|
301
|
+
selection.onSelect({ shiftKey: false, toggleKey: false });
|
|
302
|
+
}
|
|
298
303
|
return [
|
|
299
304
|
{
|
|
300
305
|
type: 'item',
|
|
@@ -309,7 +314,7 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
309
314
|
value: 'reset-effect-field',
|
|
310
315
|
},
|
|
311
316
|
];
|
|
312
|
-
}, [canShowReset, onReset]);
|
|
317
|
+
}, [canShowReset, onReset, selection]);
|
|
313
318
|
const onPropertyDoubleClick = (0, react_1.useCallback)((event) => {
|
|
314
319
|
if (!window.remotion_editorName ||
|
|
315
320
|
previewServerState.type !== 'connected') {
|
|
@@ -321,7 +326,7 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
321
326
|
property: field.key,
|
|
322
327
|
}).catch(() => undefined);
|
|
323
328
|
}, [field.key, previewServerState.type, validatedLocation]);
|
|
324
|
-
const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), keyframeControls: keyframeControls, arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: style, selected: selection.selected, selectable: selection.selectable, selectionItem: selection.selectionItem, onSelect: selection.onSelect, onDoubleClick: onPropertyDoubleClick, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx(TimelineFieldRowContent_1.TimelineFieldRowContent, { field: field, rowDepth: rowDepth, selected: selection.selected, children: jsx_runtime_1.jsx(
|
|
325
|
-
return
|
|
329
|
+
const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), keyframeControls: keyframeControls, arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: style, selected: selection.selected, selectable: selection.selectable, selectionItem: selection.selectionItem, onSelect: selection.onSelect, onDoubleClick: onPropertyDoubleClick, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx(TimelineFieldRowContent_1.TimelineFieldRowContent, { field: field, rowDepth: rowDepth, selected: selection.selected, children: jsx_runtime_1.jsx(TimelineEffectPropValueAtCurrentFrame, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, keyframeDisplayOffset: keyframeDisplayOffset }) }) }));
|
|
330
|
+
return jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: row });
|
|
326
331
|
};
|
|
327
332
|
exports.TimelineEffectPropItem = TimelineEffectPropItem;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
3
|
-
|
|
3
|
+
import type { getTimelineKeyframes } from './get-timeline-keyframes';
|
|
4
|
+
type TimelineExpandedKeyframeRowProps = {
|
|
4
5
|
readonly height: number;
|
|
5
|
-
readonly keyframes:
|
|
6
|
-
frame: number;
|
|
7
|
-
value: unknown;
|
|
8
|
-
}[];
|
|
6
|
+
readonly keyframes: ReturnType<typeof getTimelineKeyframes>;
|
|
9
7
|
readonly canEditEasing: boolean;
|
|
10
8
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
11
9
|
readonly showSeparator: boolean;
|
|
12
|
-
}
|
|
10
|
+
};
|
|
11
|
+
export declare const TimelineExpandedKeyframeRow: React.NamedExoticComponent<TimelineExpandedKeyframeRowProps>;
|
|
12
|
+
export {};
|