@remotion/studio 4.0.519 → 4.0.521

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.
Files changed (130) hide show
  1. package/dist/api/shut-down-studio.d.ts +6 -0
  2. package/dist/api/shut-down-studio.js +23 -0
  3. package/dist/api/visual-control.js +2 -2
  4. package/dist/components/AudioWaveform.js +16 -7
  5. package/dist/components/Canvas.js +114 -48
  6. package/dist/components/CaptionInspector.d.ts +1 -0
  7. package/dist/components/CaptionInspector.js +43 -2
  8. package/dist/components/CaptionTextEditor.js +1 -1
  9. package/dist/components/CompositionSelector.js +41 -34
  10. package/dist/components/CompositionSelectorItem.d.ts +7 -0
  11. package/dist/components/CompositionSelectorItem.js +344 -73
  12. package/dist/components/CurrentCompositionSideEffects.js +5 -0
  13. package/dist/components/ElementInstallConfirmation.d.ts +2 -23
  14. package/dist/components/ElementInstallConfirmation.js +89 -65
  15. package/dist/components/ElementLibraryModal.js +3 -1
  16. package/dist/components/FpsCounter.js +1 -1
  17. package/dist/components/FramePersistor.js +1 -1
  18. package/dist/components/InlineCaptionInspector.js +37 -1
  19. package/dist/components/InspectorPanel/ElementLibraryButton.js +3 -18
  20. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +4 -3
  21. package/dist/components/InspectorPanel/use-composition-actions.js +5 -8
  22. package/dist/components/InspectorSequenceSection.js +1 -4
  23. package/dist/components/Menu/MenuSubItem.js +1 -1
  24. package/dist/components/ModalContainer.d.ts +1 -0
  25. package/dist/components/ModalContainer.js +2 -2
  26. package/dist/components/ModalHeader.js +5 -1
  27. package/dist/components/Modals.js +1 -1
  28. package/dist/components/NewComposition/NewComposition.js +2 -2
  29. package/dist/components/PlayPause.js +2 -13
  30. package/dist/components/PreviewToolbar.js +1 -1
  31. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +29 -15
  32. package/dist/components/QuickSwitcher/QuickSwitcherResult.d.ts +14 -1
  33. package/dist/components/QuickSwitcher/QuickSwitcherResult.js +64 -9
  34. package/dist/components/QuickSwitcher/asset-search.d.ts +0 -1
  35. package/dist/components/QuickSwitcher/asset-search.js +1 -16
  36. package/dist/components/QuickSwitcher/composition-search.d.ts +16 -0
  37. package/dist/components/QuickSwitcher/composition-search.js +136 -0
  38. package/dist/components/RenderButton.js +2 -2
  39. package/dist/components/RenderModal/RenderStatusModal.js +7 -1
  40. package/dist/components/RenderModal/ServerRenderModal.js +1 -1
  41. package/dist/components/RenderModal/WebRenderModal.js +1 -1
  42. package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +1 -1
  43. package/dist/components/ResetZoomButton.js +17 -2
  44. package/dist/components/SelectedOutlineElement.js +10 -30
  45. package/dist/components/SettingsModal.js +8 -5
  46. package/dist/components/TimeValue.js +36 -7
  47. package/dist/components/Timeline/Timeline.d.ts +1 -1
  48. package/dist/components/Timeline/Timeline.js +33 -20
  49. package/dist/components/Timeline/TimelineAssetField.d.ts +0 -1
  50. package/dist/components/Timeline/TimelineAssetField.js +17 -9
  51. package/dist/components/Timeline/TimelineCollapseToggle.js +1 -1
  52. package/dist/components/Timeline/TimelineDeleteKeybindings.js +5 -90
  53. package/dist/components/Timeline/TimelineDragHandler.js +18 -8
  54. package/dist/components/Timeline/TimelineFontWeightField.d.ts +11 -0
  55. package/dist/components/Timeline/TimelineFontWeightField.js +65 -0
  56. package/dist/components/Timeline/TimelineInOutDragHandler.js +2 -3
  57. package/dist/components/Timeline/TimelineLayerChildren.d.ts +21 -0
  58. package/dist/components/Timeline/TimelineLayerChildren.js +129 -0
  59. package/dist/components/Timeline/TimelineNumberField.js +13 -5
  60. package/dist/components/Timeline/TimelinePinchZoom.js +14 -4
  61. package/dist/components/Timeline/TimelinePlayCursorSyncer.js +8 -4
  62. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +4 -0
  63. package/dist/components/Timeline/TimelineSequence.js +54 -73
  64. package/dist/components/Timeline/TimelineSequenceItem.js +16 -36
  65. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +22 -10
  66. package/dist/components/Timeline/TimelineSlider.js +2 -2
  67. package/dist/components/Timeline/TimelineTickFormatProvider.d.ts +8 -0
  68. package/dist/components/Timeline/TimelineTickFormatProvider.js +16 -0
  69. package/dist/components/Timeline/TimelineTimeIndicators.js +7 -3
  70. package/dist/components/Timeline/TimelineVideoInfo.js +7 -3
  71. package/dist/components/Timeline/TimelineWidthProvider.js +15 -8
  72. package/dist/components/Timeline/TimelineZoomControls.js +25 -8
  73. package/dist/components/Timeline/delete-selected-timeline-item.js +2 -2
  74. package/dist/components/Timeline/timeline-field-display-utils.js +1 -0
  75. package/dist/components/Timeline/timeline-scroll-logic.d.ts +1 -0
  76. package/dist/components/Timeline/timeline-scroll-logic.js +21 -17
  77. package/dist/components/Timeline/use-delete-timeline-items.d.ts +1 -0
  78. package/dist/components/Timeline/use-delete-timeline-items.js +118 -0
  79. package/dist/components/Timeline/use-timeline-asset-drop.js +8 -14
  80. package/dist/components/UpdateStatusContext.d.ts +5 -0
  81. package/dist/components/UpdateStatusContext.js +53 -2
  82. package/dist/components/UpdatesSettings.js +25 -4
  83. package/dist/components/WebMcp.js +87 -8
  84. package/dist/components/ZoomPersistor.js +2 -2
  85. package/dist/components/composition-drag-data.d.ts +36 -0
  86. package/dist/components/composition-drag-data.js +232 -0
  87. package/dist/components/composition-selector-drag-data.d.ts +27 -0
  88. package/dist/components/composition-selector-drag-data.js +80 -0
  89. package/dist/components/drop-handler-data.d.ts +2 -1
  90. package/dist/components/drop-handler-data.js +6 -4
  91. package/dist/components/effect-drag-and-drop.d.ts +2 -5
  92. package/dist/components/handle-drop.js +6 -2
  93. package/dist/components/import-assets.d.ts +7 -14
  94. package/dist/components/import-assets.js +11 -1
  95. package/dist/components/parse-caption-file.d.ts +5 -0
  96. package/dist/components/parse-caption-file.js +63 -0
  97. package/dist/error-overlay/current-error.d.ts +13 -0
  98. package/dist/error-overlay/current-error.js +21 -0
  99. package/dist/error-overlay/remotion-overlay/ErrorLoader.js +5 -1
  100. package/dist/esm/chunk-emw4k5b0.js +99527 -0
  101. package/dist/esm/{chunk-1fkq5bfq.js → chunk-vkrvnx2h.js} +20116 -16283
  102. package/dist/esm/index.mjs +27 -9
  103. package/dist/esm/internals.mjs +17408 -13426
  104. package/dist/esm/previewEntry.mjs +17285 -13216
  105. package/dist/esm/renderEntry.mjs +1 -1
  106. package/dist/helpers/create-folder-tree.js +2 -5
  107. package/dist/helpers/document-title.d.ts +2 -0
  108. package/dist/helpers/document-title.js +14 -3
  109. package/dist/helpers/get-preview-file-type.js +22 -3
  110. package/dist/helpers/get-timeline-max-zoom.d.ts +34 -28
  111. package/dist/helpers/get-timeline-max-zoom.js +46 -29
  112. package/dist/helpers/inserted-element-selection.d.ts +2 -1
  113. package/dist/helpers/install-fiber-sequence-order-observer.d.ts +37 -0
  114. package/dist/helpers/install-fiber-sequence-order-observer.js +109 -0
  115. package/dist/helpers/open-in-editor.js +2 -1
  116. package/dist/helpers/use-menu-structure.js +2 -2
  117. package/dist/helpers/use-runtime-values.d.ts +1 -1
  118. package/dist/helpers/use-runtime-values.js +5 -4
  119. package/dist/helpers/use-sync-external-store.d.ts +3 -0
  120. package/dist/helpers/use-sync-external-store.js +5 -0
  121. package/dist/index.d.ts +1 -0
  122. package/dist/index.js +3 -1
  123. package/dist/previewEntry.js +2 -0
  124. package/dist/state/modals.d.ts +16 -2
  125. package/dist/state/timeline-sequence-hover.js +3 -2
  126. package/dist/state/timeline-zoom.d.ts +0 -1
  127. package/dist/state/timeline-zoom.js +13 -6
  128. package/package.json +17 -17
  129. package/dist/helpers/sort-by-nonce-history.d.ts +0 -1
  130. package/dist/helpers/sort-by-nonce-history.js +0 -6
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TimelineFontWeightField = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const ComboBox_1 = require("../NewComposition/ComboBox");
7
+ const RemInput_1 = require("../NewComposition/RemInput");
8
+ const timeline_field_utils_1 = require("./timeline-field-utils");
9
+ const TimelineNumberField_1 = require("./TimelineNumberField");
10
+ const FONT_WEIGHT_KEYWORDS = ['normal', 'bold', 'bolder', 'lighter'];
11
+ const TimelineFontWeightField = ({ field, propStatus, effectiveValue, onSave, onDragValueChange, onDragEnd, }) => {
12
+ var _a;
13
+ const { fieldSchema } = field;
14
+ if (fieldSchema.type !== 'font-weight') {
15
+ throw new Error('TimelineFontWeightField rendered for non-font-weight field');
16
+ }
17
+ const sourceValue = (_a = propStatus.codeValue) !== null && _a !== void 0 ? _a : fieldSchema.default;
18
+ const currentValue = effectiveValue !== null && effectiveValue !== void 0 ? effectiveValue : sourceValue;
19
+ const onSelectKeyword = (0, react_1.useCallback)((newValue) => {
20
+ if (newValue === propStatus.codeValue) {
21
+ return;
22
+ }
23
+ onDragValueChange(newValue);
24
+ onSave(newValue).finally(onDragEnd);
25
+ }, [onDragEnd, onDragValueChange, onSave, propStatus.codeValue]);
26
+ const keywordItems = (0, react_1.useMemo)(() => {
27
+ return FONT_WEIGHT_KEYWORDS.map((keyword) => ({
28
+ type: 'item',
29
+ id: keyword,
30
+ value: keyword,
31
+ label: keyword,
32
+ onClick: () => onSelectKeyword(keyword),
33
+ keyHint: null,
34
+ leftItem: null,
35
+ subMenu: null,
36
+ quickSwitcherLabel: null,
37
+ disabled: false,
38
+ }));
39
+ }, [onSelectKeyword]);
40
+ if (typeof sourceValue === 'number') {
41
+ return (jsx_runtime_1.jsx(TimelineNumberField_1.TimelineNumberField, { effectiveValue: currentValue, field: field, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }));
42
+ }
43
+ if (FONT_WEIGHT_KEYWORDS.includes(sourceValue)) {
44
+ return (jsx_runtime_1.jsx(ComboBox_1.Combobox, { size: "small", title: field.key, selectedId: String(currentValue), values: keywordItems }));
45
+ }
46
+ return (jsx_runtime_1.jsx(RemInput_1.RemotionInput, { status: "ok", rightAlign: false, small: true, defaultValue: String(currentValue !== null && currentValue !== void 0 ? currentValue : ''), onBlur: (event) => {
47
+ const newValue = event.currentTarget.value;
48
+ if (newValue === propStatus.codeValue) {
49
+ onDragEnd();
50
+ return;
51
+ }
52
+ onSave(newValue).finally(onDragEnd);
53
+ }, onChange: (event) => onDragValueChange(event.currentTarget.value), onDoubleClick: (event) => event.stopPropagation(), onKeyDown: (event) => {
54
+ var _a;
55
+ if (event.key === 'Enter') {
56
+ event.currentTarget.blur();
57
+ }
58
+ if (event.key === 'Escape') {
59
+ event.currentTarget.value = String((_a = propStatus.codeValue) !== null && _a !== void 0 ? _a : '');
60
+ onDragEnd();
61
+ event.currentTarget.blur();
62
+ }
63
+ }, style: { ...timeline_field_utils_1.draggerStyle, boxSizing: 'border-box' } }, String(sourceValue)));
64
+ };
65
+ exports.TimelineFontWeightField = TimelineFontWeightField;
@@ -65,7 +65,6 @@ const TimelineInOutDragHandler = () => {
65
65
  exports.TimelineInOutDragHandler = TimelineInOutDragHandler;
66
66
  const TimelineInOutDragHandlerInner = () => {
67
67
  var _a;
68
- var _b, _c;
69
68
  const videoConfig = (0, remotion_1.useVideoConfig)();
70
69
  const size = player_1.PlayerInternals.useElementSize(timeline_refs_1.scrollableRef, {
71
70
  triggerOnWindowResize: true,
@@ -82,8 +81,8 @@ const TimelineInOutDragHandlerInner = () => {
82
81
  }
83
82
  return (0, get_left_of_timeline_slider_1.getXPositionOfItemInTimelineImperatively)(frame, videoConfig.durationInFrames, timelineWidth);
84
83
  }, [timelineWidth, videoConfig.durationInFrames]);
85
- const width = (_b = (_a = timeline_refs_1.scrollableRef.current) === null || _a === void 0 ? void 0 : _a.scrollWidth) !== null && _b !== void 0 ? _b : 0;
86
- const left = (_c = size === null || size === void 0 ? void 0 : size.left) !== null && _c !== void 0 ? _c : 0;
84
+ const width = (0, timeline_scroll_logic_1.getTimelineContentWidth)();
85
+ const left = (_a = size === null || size === void 0 ? void 0 : size.left) !== null && _a !== void 0 ? _a : 0;
87
86
  const { inFrame, outFrame } = (0, in_out_1.useTimelineInOutFramePosition)();
88
87
  const { setInAndOutFrames } = (0, in_out_1.useTimelineSetInOutFramePosition)();
89
88
  const onInPointerDown = (0, react_1.useCallback)((e) => {
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import type { TSequence } from 'remotion';
3
+ import type { TimelineTrackData } from '../../helpers/get-timeline-sequence-sort-key';
4
+ export declare const TimelineLayerChildrenProvider: React.Provider<{
5
+ readonly collapsed: Record<string, boolean>;
6
+ readonly keys: Map<string, string>;
7
+ readonly parents: Set<string>;
8
+ readonly toggle: (key: string) => void;
9
+ } | null>;
10
+ export declare const useTimelineLayerChildren: (tracks: TimelineTrackData[], sequences: TSequence[], compositionId: string | null) => {
11
+ visibleTracks: TimelineTrackData[];
12
+ value: {
13
+ collapsed: Record<string, boolean>;
14
+ keys: Map<string, string>;
15
+ parents: Set<string>;
16
+ toggle: (key: string) => void;
17
+ };
18
+ };
19
+ export declare const TimelineLayerChildrenToggle: React.FC<{
20
+ readonly sequence: TSequence;
21
+ }>;
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TimelineLayerChildrenToggle = exports.useTimelineLayerChildren = exports.TimelineLayerChildrenProvider = 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 hoverable_1 = require("../../helpers/hoverable");
8
+ const persist_boolean_map_1 = require("../../helpers/persist-boolean-map");
9
+ const timeline_node_path_key_1 = require("../../helpers/timeline-node-path-key");
10
+ const TimelineCollapseToggle_1 = require("./TimelineCollapseToggle");
11
+ const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
12
+ const STORAGE_KEY = 'remotion.editor.collapsedLayerChildren.v1';
13
+ const TimelineLayerChildrenContext = (0, react_1.createContext)(null);
14
+ exports.TimelineLayerChildrenProvider = TimelineLayerChildrenContext.Provider;
15
+ const useTimelineLayerChildren = (tracks, sequences, compositionId) => {
16
+ const [collapsed, setCollapsed] = (0, react_1.useState)(() => {
17
+ var _a;
18
+ try {
19
+ const parsed = JSON.parse((_a = window.localStorage.getItem(STORAGE_KEY)) !== null && _a !== void 0 ? _a : '{}');
20
+ if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {
21
+ return {};
22
+ }
23
+ return Object.fromEntries(Object.entries(parsed).filter(([, storedValue]) => storedValue === true));
24
+ }
25
+ catch (_b) {
26
+ return {};
27
+ }
28
+ });
29
+ const toggle = (0, react_1.useCallback)((key) => {
30
+ setCollapsed((previous) => {
31
+ const next = (0, persist_boolean_map_1.toggleBooleanMapKey)(previous, key);
32
+ try {
33
+ window.localStorage.setItem(STORAGE_KEY, JSON.stringify(next));
34
+ }
35
+ catch (_a) {
36
+ // Keep the control usable when storage is unavailable.
37
+ }
38
+ return next;
39
+ });
40
+ }, []);
41
+ const hierarchy = (0, react_1.useMemo)(() => {
42
+ var _a;
43
+ var _b, _c;
44
+ const byId = new Map(sequences.map((sequence) => [sequence.id, sequence]));
45
+ const siblingIndices = new Map();
46
+ const siblingCounts = new Map();
47
+ for (const sequence of sequences) {
48
+ const index = (_b = siblingCounts.get(sequence.parent)) !== null && _b !== void 0 ? _b : 0;
49
+ siblingIndices.set(sequence.id, index);
50
+ siblingCounts.set(sequence.parent, index + 1);
51
+ }
52
+ const keys = new Map();
53
+ const parents = new Set();
54
+ const ancestors = new Map();
55
+ for (const track of tracks) {
56
+ const parentIds = [];
57
+ let { parent } = track.sequence;
58
+ while (parent !== null && !parentIds.includes(parent)) {
59
+ parentIds.push(parent);
60
+ parents.add(parent);
61
+ parent = (_c = (_a = byId.get(parent)) === null || _a === void 0 ? void 0 : _a.parent) !== null && _c !== void 0 ? _c : null;
62
+ }
63
+ ancestors.set(track.sequence.id, parentIds);
64
+ // Source identity survives remounts. For layers without source metadata,
65
+ // use the structural position instead of the ephemeral sequence ID.
66
+ const identity = track.nodePathInfo
67
+ ? ['source', (0, timeline_node_path_key_1.timelineNodePathInfoToKey)(track.nodePathInfo)]
68
+ : [
69
+ 'position',
70
+ ...[...parentIds]
71
+ .reverse()
72
+ .concat(track.sequence.id)
73
+ .map((id) => siblingIndices.get(id)),
74
+ ];
75
+ keys.set(track.sequence.id, JSON.stringify([compositionId, identity]));
76
+ }
77
+ return { keys, parents, ancestors };
78
+ }, [compositionId, sequences, tracks]);
79
+ const visibleTracks = (0, react_1.useMemo)(() => tracks.filter((track) => {
80
+ var _a;
81
+ return !((_a = hierarchy.ancestors.get(track.sequence.id)) !== null && _a !== void 0 ? _a : []).some((id) => {
82
+ const key = hierarchy.keys.get(id);
83
+ return key !== undefined && collapsed[key];
84
+ });
85
+ }), [hierarchy, collapsed, tracks]);
86
+ const value = (0, react_1.useMemo)(() => ({
87
+ collapsed,
88
+ keys: hierarchy.keys,
89
+ parents: hierarchy.parents,
90
+ toggle,
91
+ }), [collapsed, hierarchy, toggle]);
92
+ return { visibleTracks, value };
93
+ };
94
+ exports.useTimelineLayerChildren = useTimelineLayerChildren;
95
+ const TimelineLayerChildrenToggle = ({ sequence }) => {
96
+ const context = (0, react_1.useContext)(TimelineLayerChildrenContext);
97
+ const key = context === null || context === void 0 ? void 0 : context.keys.get(sequence.id);
98
+ const isCollapsed = key !== undefined && Boolean(context === null || context === void 0 ? void 0 : context.collapsed[key]);
99
+ const onClick = (0, react_1.useCallback)((event) => {
100
+ event.stopPropagation();
101
+ if (key !== undefined) {
102
+ context === null || context === void 0 ? void 0 : context.toggle(key);
103
+ }
104
+ }, [context, key]);
105
+ const stopPropagation = (0, react_1.useCallback)((event) => event.stopPropagation(), []);
106
+ if (!(context === null || context === void 0 ? void 0 : context.parents.has(sequence.id)) || key === undefined) {
107
+ return jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {});
108
+ }
109
+ const label = `${isCollapsed ? 'Expand' : 'Collapse'} children of ${sequence.displayName}`;
110
+ return (jsx_runtime_1.jsx("button", { type: "button", className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, "aria-label": label, "aria-expanded": !isCollapsed, title: label, onClick: onClick, onPointerDown: stopPropagation, onDoubleClick: stopPropagation, style: {
111
+ ...(0, hoverable_1.hoverableStyle)({
112
+ idleBackground: colors_1.TRANSPARENT,
113
+ hoverBackground: colors_1.TRANSPARENT,
114
+ idleColor: colors_1.LIGHT_TEXT,
115
+ hoverColor: colors_1.WHITE,
116
+ }),
117
+ border: 'none',
118
+ padding: 0,
119
+ cursor: 'default',
120
+ display: 'flex',
121
+ alignItems: 'center',
122
+ justifyContent: 'center',
123
+ width: 12,
124
+ height: 16,
125
+ marginRight: 0,
126
+ flexShrink: 0,
127
+ }, children: jsx_runtime_1.jsx(TimelineCollapseToggle_1.TimelineCollapseToggle, { collapsed: isCollapsed, color: "currentColor" }) }));
128
+ };
129
+ exports.TimelineLayerChildrenToggle = TimelineLayerChildrenToggle;
@@ -35,8 +35,12 @@ const TimelineNumberField = ({ field, effectiveValue, onSave, onDragValueChange,
35
35
  }
36
36
  }, [onSave, propStatus]);
37
37
  const configuredStep = field.fieldSchema.type === 'number' ? field.fieldSchema.step : undefined;
38
- const step = configuredStep !== null && configuredStep !== void 0 ? configuredStep : 1;
39
- const allowStepMismatch = field.group === 'crop' ||
38
+ const currentValue = dragValue !== null && dragValue !== void 0 ? dragValue : effectiveValue;
39
+ const step = field.fieldSchema.type === 'font-weight' && currentValue % 100 === 0
40
+ ? 100
41
+ : (configuredStep !== null && configuredStep !== void 0 ? configuredStep : 1);
42
+ const allowStepMismatch = field.fieldSchema.type === 'font-weight' ||
43
+ field.group === 'crop' ||
40
44
  ('kind' in field && field.kind === 'effect-field');
41
45
  const formatter = (0, react_1.useCallback)((v) => {
42
46
  return (0, timeline_field_display_utils_1.formatTimelineFieldValueForDisplay)({
@@ -44,10 +48,14 @@ const TimelineNumberField = ({ field, effectiveValue, onSave, onDragValueChange,
44
48
  value: v,
45
49
  });
46
50
  }, [field.fieldSchema]);
47
- return (jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragValue !== null && dragValue !== void 0 ? dragValue : effectiveValue, buttonStyle: timeline_field_utils_1.leftAlignedDraggerStyle, style: timeline_field_utils_1.draggerStyle, status: "ok", small: true, onValueChange: onValueChange, onValueChangeEnd: onValueChangeEnd, onTextChange: onTextChange, min: field.fieldSchema.type === 'number'
51
+ return (jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: currentValue, buttonStyle: timeline_field_utils_1.leftAlignedDraggerStyle, style: timeline_field_utils_1.draggerStyle, status: "ok", small: true, onValueChange: onValueChange, onValueChangeEnd: onValueChangeEnd, onTextChange: onTextChange, min: field.fieldSchema.type === 'number'
48
52
  ? ((_a = field.fieldSchema.min) !== null && _a !== void 0 ? _a : -Infinity)
49
- : -Infinity, max: field.fieldSchema.type === 'number'
53
+ : field.fieldSchema.type === 'font-weight'
54
+ ? 1
55
+ : -Infinity, max: field.fieldSchema.type === 'number'
50
56
  ? ((_b = field.fieldSchema.max) !== null && _b !== void 0 ? _b : Infinity)
51
- : Infinity, step: step, formatter: formatter, rightAlign: false, allowStepMismatch: allowStepMismatch }));
57
+ : field.fieldSchema.type === 'font-weight'
58
+ ? 1000
59
+ : Infinity, step: step, dragSensitivity: field.fieldSchema.type === 'font-weight' && step === 100 ? 0.1 : 1, formatter: formatter, rightAlign: false, allowStepMismatch: allowStepMismatch }));
52
60
  };
53
61
  exports.TimelineNumberField = TimelineNumberField;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TimelinePinchZoom = void 0;
4
4
  const react_1 = require("react");
5
5
  const remotion_1 = require("remotion");
6
+ const get_timeline_max_zoom_1 = require("../../helpers/get-timeline-max-zoom");
6
7
  const is_current_selected_still_1 = require("../../helpers/is-current-selected-still");
7
8
  const editor_zoom_gestures_1 = require("../../state/editor-zoom-gestures");
8
9
  const timeline_zoom_1 = require("../../state/timeline-zoom");
@@ -22,6 +23,15 @@ const TimelinePinchZoom = () => {
22
23
  const { editorZoomGestures } = (0, react_1.useContext)(editor_zoom_gestures_1.EditorZoomGesturesContext);
23
24
  const zoomRef = (0, react_1.useRef)(zoom);
24
25
  zoomRef.current = zoom;
26
+ const getCurrentTimelineZoom = (0, react_1.useCallback)((compositionId) => {
27
+ var _a;
28
+ var _b, _c, _d;
29
+ return (0, get_timeline_max_zoom_1.getTimelineZoom)({
30
+ durationInFrames: (_b = videoConfig === null || videoConfig === void 0 ? void 0 : videoConfig.durationInFrames) !== null && _b !== void 0 ? _b : 1,
31
+ timelineViewportWidth: (_c = (_a = timeline_refs_1.scrollableRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _c !== void 0 ? _c : 0,
32
+ zoom: (_d = zoomRef.current[compositionId]) !== null && _d !== void 0 ? _d : null,
33
+ });
34
+ }, [videoConfig === null || videoConfig === void 0 ? void 0 : videoConfig.durationInFrames]);
25
35
  const pinchBaseZoomRef = (0, react_1.useRef)(null);
26
36
  const suppressWheelFromWebKitPinchRef = (0, react_1.useRef)(false);
27
37
  const touchPinchRef = (0, react_1.useRef)(null);
@@ -89,7 +99,6 @@ const TimelinePinchZoom = () => {
89
99
  suppressWheelFromWebKitPinchRef.current = false;
90
100
  };
91
101
  const onGestureStart = (event) => {
92
- var _a;
93
102
  const e = event;
94
103
  if (!isVideoComposition) {
95
104
  return;
@@ -106,7 +115,7 @@ const TimelinePinchZoom = () => {
106
115
  }
107
116
  e.preventDefault();
108
117
  suppressWheelFromWebKitPinchRef.current = true;
109
- pinchBaseZoomRef.current = (_a = zoomRef.current[canvasContent.compositionId]) !== null && _a !== void 0 ? _a : timeline_zoom_1.TIMELINE_MIN_ZOOM;
118
+ pinchBaseZoomRef.current = getCurrentTimelineZoom(canvasContent.compositionId);
110
119
  };
111
120
  const onGestureChange = (event) => {
112
121
  const e = event;
@@ -153,6 +162,7 @@ const TimelinePinchZoom = () => {
153
162
  isVideoComposition,
154
163
  videoConfig,
155
164
  canvasContent,
165
+ getCurrentTimelineZoom,
156
166
  setZoom,
157
167
  ]);
158
168
  (0, react_1.useEffect)(() => {
@@ -161,7 +171,6 @@ const TimelinePinchZoom = () => {
161
171
  return;
162
172
  }
163
173
  const onTouchStart = (event) => {
164
- var _a;
165
174
  if (event.touches.length !== 2) {
166
175
  touchPinchRef.current = null;
167
176
  return;
@@ -181,7 +190,7 @@ const TimelinePinchZoom = () => {
181
190
  }
182
191
  touchPinchRef.current = {
183
192
  initialDistance,
184
- initialZoom: (_a = zoomRef.current[canvasContent.compositionId]) !== null && _a !== void 0 ? _a : timeline_zoom_1.TIMELINE_MIN_ZOOM,
193
+ initialZoom: getCurrentTimelineZoom(canvasContent.compositionId),
185
194
  };
186
195
  };
187
196
  const onTouchMove = (event) => {
@@ -233,6 +242,7 @@ const TimelinePinchZoom = () => {
233
242
  isVideoComposition,
234
243
  videoConfig,
235
244
  canvasContent,
245
+ getCurrentTimelineZoom,
236
246
  setZoom,
237
247
  ]);
238
248
  return null;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TimelinePlayCursorSyncer = void 0;
4
4
  const react_1 = require("react");
5
5
  const remotion_1 = require("remotion");
6
+ const get_timeline_max_zoom_1 = require("../../helpers/get-timeline-max-zoom");
6
7
  const timeline_zoom_1 = require("../../state/timeline-zoom");
7
8
  const imperative_state_1 = require("./imperative-state");
8
9
  const timeline_refs_1 = require("./timeline-refs");
@@ -10,9 +11,10 @@ const timeline_scroll_logic_1 = require("./timeline-scroll-logic");
10
11
  let lastTimelinePositionWhileScrolling = null;
11
12
  const TimelinePlayCursorSyncer = () => {
12
13
  var _a;
14
+ var _b, _c, _d;
13
15
  const video = remotion_1.Internals.useVideo();
14
16
  const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
15
- const [playing] = remotion_1.Internals.Timeline.usePlayingState();
17
+ const playing = remotion_1.Internals.usePlaying();
16
18
  const { playbackRate } = remotion_1.Internals.usePlaybackRate();
17
19
  const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
18
20
  const { zoom: zoomMap } = (0, react_1.useContext)(timeline_zoom_1.TimelineZoomCtx);
@@ -21,9 +23,11 @@ const TimelinePlayCursorSyncer = () => {
21
23
  : null;
22
24
  // Asset previews have a synthetic video config, but no composition ID
23
25
  // with which to look up a persisted timeline zoom.
24
- const zoom = compositionId
25
- ? ((_a = zoomMap[compositionId]) !== null && _a !== void 0 ? _a : timeline_zoom_1.TIMELINE_MIN_ZOOM)
26
- : timeline_zoom_1.TIMELINE_MIN_ZOOM;
26
+ const zoom = (0, get_timeline_max_zoom_1.getTimelineZoom)({
27
+ durationInFrames: (_b = video === null || video === void 0 ? void 0 : video.durationInFrames) !== null && _b !== void 0 ? _b : 1,
28
+ timelineViewportWidth: (_c = (_a = timeline_refs_1.scrollableRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _c !== void 0 ? _c : 0,
29
+ zoom: compositionId ? ((_d = zoomMap[compositionId]) !== null && _d !== void 0 ? _d : null) : null,
30
+ });
27
31
  if (video) {
28
32
  (0, imperative_state_1.setCurrentFrame)(timelinePosition);
29
33
  (0, imperative_state_1.setCurrentZoom)(zoom);
@@ -7,6 +7,7 @@ const TimelineBooleanField_1 = require("./TimelineBooleanField");
7
7
  const TimelineColorField_1 = require("./TimelineColorField");
8
8
  const TimelineEnumField_1 = require("./TimelineEnumField");
9
9
  const TimelineFontFamilyField_1 = require("./TimelineFontFamilyField");
10
+ const TimelineFontWeightField_1 = require("./TimelineFontWeightField");
10
11
  const TimelineNumberField_1 = require("./TimelineNumberField");
11
12
  const TimelineRotationField_1 = require("./TimelineRotationField");
12
13
  const TimelineScaleField_1 = require("./TimelineScaleField");
@@ -67,6 +68,9 @@ const TimelinePrimitiveFieldValue = ({ field, onSave, onDragValueChange, onDragE
67
68
  if (field.typeName === 'font-family') {
68
69
  return (jsx_runtime_1.jsx("span", { style: inlineWrapper, children: jsx_runtime_1.jsx(TimelineFontFamilyField_1.TimelineFontFamilyField, { effectiveValue: effectiveValue, field: field, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }) }));
69
70
  }
71
+ if (field.typeName === 'font-weight') {
72
+ return (jsx_runtime_1.jsx("span", { style: inlineWrapper, children: jsx_runtime_1.jsx(TimelineFontWeightField_1.TimelineFontWeightField, { effectiveValue: effectiveValue, field: field, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }) }));
73
+ }
70
74
  if (field.typeName === 'asset') {
71
75
  return (jsx_runtime_1.jsx("span", { style: assetInlineWrapper, children: jsx_runtime_1.jsx(TimelineAssetField_1.TimelineAssetField, { effectiveValue: effectiveValue, field: field, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }) }));
72
76
  }
@@ -50,11 +50,8 @@ const modals_1 = require("../../state/modals");
50
50
  const AudioWaveform_1 = require("../AudioWaveform");
51
51
  const ConfirmationDialog_1 = require("../ConfirmationDialog");
52
52
  const ContextMenu_1 = require("../ContextMenu");
53
- const delete_jsx_node_api_1 = require("../delete-jsx-node-api");
54
53
  const InitialCompositionLoader_1 = require("../InitialCompositionLoader");
55
- const NotificationCenter_1 = require("../Notifications/NotificationCenter");
56
54
  const use_select_asset_1 = require("../use-select-asset");
57
- const delete_selected_timeline_item_1 = require("./delete-selected-timeline-item");
58
55
  const disable_sequence_interactivity_1 = require("./disable-sequence-interactivity");
59
56
  const duplicate_selected_timeline_item_1 = require("./duplicate-selected-timeline-item");
60
57
  const get_sequence_context_menu_items_1 = require("./get-sequence-context-menu-items");
@@ -69,6 +66,7 @@ const TimelineSequenceRightEdgeDragHandle_1 = require("./TimelineSequenceRightEd
69
66
  const TimelineVideoInfo_1 = require("./TimelineVideoInfo");
70
67
  const TimelineViewport_1 = require("./TimelineViewport");
71
68
  const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
69
+ const use_delete_timeline_items_1 = require("./use-delete-timeline-items");
72
70
  const use_open_sequence_in_apps_1 = require("./use-open-sequence-in-apps");
73
71
  const use_sequence_freeze_frame_menu_item_1 = require("./use-sequence-freeze-frame-menu-item");
74
72
  const TimelineSequenceFn = ({ s, connectedCompositions, nodePathInfo, sequenceFrameOffset, cascadedStart, localStart, }) => {
@@ -117,12 +115,10 @@ const TimelineSequenceNegativeStartInner = ({ left, width, leftEdgeVisible, clip
117
115
  return (jsx_runtime_1.jsx("div", { style: outerStyle, children: jsx_runtime_1.jsx("div", { style: innerStyle }) }));
118
116
  };
119
117
  const TimelineSequenceNegativeStart = react_1.default.memo(TimelineSequenceNegativeStartInner);
120
- const TimelineSequenceCurrentFrame = ({ s, displayDurationInFrames, premount, postmount, negativeStart, leftEdgeVisible, negativeStartClipped, style, children, nodePathInfo, sequenceFrameOffset, fromCanUpdate, frozenFrame, onMoveDragPointerDown, onPointerDownCapture, onDoubleClick, }) => {
118
+ const TimelineSequenceCurrentFrame = ({ s, displayDurationInFrames, premount, postmount, negativeStart, leftEdgeVisible, negativeStartClipped, style, children, edgeDragHandles, nodePathInfo, sequenceFrameOffset, fromCanUpdate, frozenFrame, onMoveDragPointerDown, onPointerDownCapture, onDoubleClick, }) => {
121
119
  var _a, _b, _c;
122
120
  const ref = (0, react_1.useRef)(null);
123
121
  const { onSelect, selectable, selected, selectionItem } = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
124
- const containsSelection = (0, TimelineSelection_1.useTimelineRowContainsSelection)(nodePathInfo);
125
- const { selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
126
122
  (0, TimelineSelection_1.useTimelineMarqueeSelectableItem)(selectionItem, ref);
127
123
  const onPointerDown = (0, react_1.useCallback)((e) => {
128
124
  if (e.button === 0) {
@@ -160,14 +156,13 @@ const TimelineSequenceCurrentFrame = ({ s, displayDurationInFrames, premount, po
160
156
  ? negativeStart.left + negativeStart.width
161
157
  : 0;
162
158
  const actualStyle = (0, react_1.useMemo)(() => {
163
- const hasSelectedTrack = selectedItems.some((item) => item.type !== 'guide');
164
159
  return {
165
160
  ...style,
166
161
  background: negativeStart ? colors_1.TRANSPARENT : style.background,
167
162
  border: negativeStart ? 'none' : style.border,
168
- opacity: hasSelectedTrack && !selected && !containsSelection ? 0.75 : 1,
163
+ opacity: selected ? 1 : 0.75,
169
164
  };
170
- }, [containsSelection, negativeStart, selected, selectedItems, style]);
165
+ }, [negativeStart, selected, style]);
171
166
  const content = (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [premount ? (jsx_runtime_1.jsx("div", { style: {
172
167
  left: premount.left,
173
168
  width: premount.width,
@@ -202,31 +197,36 @@ const TimelineSequenceCurrentFrame = ({ s, displayDurationInFrames, premount, po
202
197
  display: 'flex',
203
198
  alignItems: 'center',
204
199
  }, children: jsx_runtime_1.jsx(TimelineSequenceFrame_1.TimelineSequenceFrame, { premounted: isPremounting, postmounted: isPostmounting ? s.duration - 1 : null, roundedFrame: roundedFrame, frozenFrame: frozenFrame }) })) : null] }));
205
- return (jsx_runtime_1.jsx("div", { ref: ref, [TimelineSelection_1.TIMELINE_MARQUEE_ITEM_ATTR]: true, style: actualStyle, title: s.displayName, onPointerDownCapture: onPointerDownCapture, onPointerDown: selectable ? onPointerDown : undefined, onDoubleClick: onDoubleClick, children: negativeStart ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
206
- jsx_runtime_1.jsx(TimelineSequenceNegativeStart, { left: negativeStart.left, width: negativeStart.width, leftEdgeVisible: leftEdgeVisible, clipped: negativeStartClipped }), jsx_runtime_1.jsx("div", { style: {
207
- background: style.background,
208
- border: style.border,
209
- borderBottomLeftRadius: 0,
210
- borderBottomRightRadius: style.borderBottomRightRadius,
211
- borderLeft: 'none',
212
- borderRightColor: style.borderRightColor,
213
- borderTopLeftRadius: 0,
214
- borderTopRightRadius: style.borderTopRightRadius,
215
- boxSizing: 'border-box',
216
- height: '100%',
217
- left: negativeStartEnd,
218
- overflow: 'hidden',
219
- position: 'absolute',
220
- top: 0,
221
- width: `calc(100% - ${negativeStartEnd}px)`,
222
- }, children: jsx_runtime_1.jsx("div", { style: {
200
+ return (jsx_runtime_1.jsxs("div", { ref: ref, [TimelineSelection_1.TIMELINE_MARQUEE_ITEM_ATTR]: true, style: actualStyle, title: s.displayName, onPointerDownCapture: onPointerDownCapture, onPointerDown: selectable ? onPointerDown : undefined, onDoubleClick: onDoubleClick, children: [negativeStart ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
201
+ jsx_runtime_1.jsx(TimelineSequenceNegativeStart, { left: negativeStart.left, width: negativeStart.width, leftEdgeVisible: leftEdgeVisible, clipped: negativeStartClipped }), jsx_runtime_1.jsx("div", { style: {
202
+ background: style.background,
203
+ border: style.border,
204
+ borderBottomLeftRadius: 0,
205
+ borderBottomRightRadius: style.borderBottomRightRadius,
206
+ borderLeft: 'none',
207
+ borderRightColor: style.borderRightColor,
208
+ borderTopLeftRadius: 0,
209
+ borderTopRightRadius: style.borderTopRightRadius,
210
+ boxSizing: 'border-box',
223
211
  height: '100%',
224
- left: -negativeStartEnd,
212
+ left: negativeStartEnd,
213
+ overflow: 'hidden',
225
214
  position: 'absolute',
226
215
  top: 0,
227
- width: style.width,
228
- }, children: content }) })
229
- ] })) : (content) }));
216
+ width: `calc(100% - ${negativeStartEnd}px)`,
217
+ }, children: jsx_runtime_1.jsx("div", { style: {
218
+ height: '100%',
219
+ left: -negativeStartEnd,
220
+ position: 'absolute',
221
+ top: 0,
222
+ width: style.width,
223
+ }, children: content }) })
224
+ ] })) : (jsx_runtime_1.jsx("div", { style: {
225
+ position: 'absolute',
226
+ inset: 0,
227
+ overflow: 'hidden',
228
+ borderRadius: 'inherit',
229
+ }, children: content })), edgeDragHandles] }));
230
230
  };
231
231
  const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePathInfo, sequenceFrameOffset, cascadedStart, localStart, }) => {
232
232
  // If a duration is 1, it is essentially a still and it should have width 0
@@ -280,6 +280,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
280
280
  const selectAsset = (0, use_select_asset_1.useSelectAsset)();
281
281
  const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
282
282
  const confirm = (0, ConfirmationDialog_1.useConfirmationDialog)();
283
+ const deleteTimelineItems = (0, use_delete_timeline_items_1.useDeleteTimelineItems)();
283
284
  const { onSelect, selectable, selected } = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
284
285
  const { selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
285
286
  const selectedSequenceNodePathInfos = (0, react_1.useMemo)(() => {
@@ -348,41 +349,17 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
348
349
  }
349
350
  (0, duplicate_selected_timeline_item_1.duplicateSequencesFromSource)(selectedSequenceNodePathInfos, confirm).catch(() => undefined);
350
351
  }, [confirm, previewInteractive, selectedSequenceNodePathInfos]);
351
- const onDeleteSequenceFromSource = (0, react_1.useCallback)(async () => {
352
- if (!(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source) || !nodePath || deleteDisabled) {
352
+ const onDeleteSequenceFromSource = (0, react_1.useCallback)(() => {
353
+ if (!(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source) ||
354
+ !nodePath ||
355
+ !nodePathInfo ||
356
+ deleteDisabled) {
353
357
  return;
354
358
  }
355
- if (nodePathInfo && nodePathInfo.numberOfSequencesWithThisNodePath > 1) {
356
- const shouldDelete = await confirm({
357
- title: 'Delete sequence?',
358
- message: 'This sequence is programmatically duplicated ' +
359
- nodePathInfo.numberOfSequencesWithThisNodePath +
360
- ' times in the code. Deleting removes all instances. Continue?',
361
- confirmLabel: 'Delete',
362
- });
363
- if (!shouldDelete) {
364
- return;
365
- }
366
- }
367
- try {
368
- const result = await (0, delete_jsx_node_api_1.deleteJsxNode)({
369
- nodes: [
370
- {
371
- fileName: validatedLocation.source,
372
- nodePath: nodePath.nodePath,
373
- },
374
- ],
375
- });
376
- if (!result.success) {
377
- (0, NotificationCenter_1.showNotification)(result.reason, 4000);
378
- }
379
- }
380
- catch (err) {
381
- (0, NotificationCenter_1.showNotification)(err.message, 4000);
382
- }
359
+ deleteTimelineItems([{ type: 'sequence', nodePathInfo }]);
383
360
  }, [
384
- confirm,
385
361
  deleteDisabled,
362
+ deleteTimelineItems,
386
363
  nodePath,
387
364
  nodePathInfo,
388
365
  validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
@@ -391,8 +368,11 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
391
368
  if (!previewInteractive || selectedSequenceNodePathInfos === null) {
392
369
  return;
393
370
  }
394
- (0, delete_selected_timeline_item_1.deleteSequencesFromSource)(selectedSequenceNodePathInfos, confirm).catch(() => undefined);
395
- }, [confirm, previewInteractive, selectedSequenceNodePathInfos]);
371
+ deleteTimelineItems(selectedSequenceNodePathInfos.map((selectedNodePathInfo) => ({
372
+ type: 'sequence',
373
+ nodePathInfo: selectedNodePathInfo,
374
+ })));
375
+ }, [deleteTimelineItems, previewInteractive, selectedSequenceNodePathInfos]);
396
376
  const onDisableSequenceInteractivity = (0, react_1.useCallback)(() => {
397
377
  if (disableInteractivityDisabled ||
398
378
  !nodePath ||
@@ -594,7 +574,8 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
594
574
  marginLeft: (_a = visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.marginLeft) !== null && _a !== void 0 ? _a : 0,
595
575
  width: (_b = visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.width) !== null && _b !== void 0 ? _b : 0,
596
576
  color: colors_1.WHITE,
597
- overflow: 'hidden',
577
+ // Edge handles extend outside the layer; media is clipped separately.
578
+ overflow: 'visible',
598
579
  };
599
580
  }, [negativeStartClipped, s.type, showLeftBorderRadius, visibleLayout]);
600
581
  const showRightEdgeDragHandle = (0, TimelineSequenceRightEdgeDragHandle_1.isTimelineSequenceDurationDraggable)(s) &&
@@ -617,14 +598,14 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
617
598
  const mediaDisplayDurationInFrames = visibleLayout.media
618
599
  ? visibleLayout.media.width / frameIncrement
619
600
  : 0;
620
- const sequence = (jsx_runtime_1.jsxs(TimelineSequenceCurrentFrame, { s: s, displayDurationInFrames: displayDurationInFrames, premount: visibleLayout.premount, postmount: visibleLayout.postmount, negativeStart: visibleLayout.negativeStart, leftEdgeVisible: visibleLayout.leftEdgeVisible, negativeStartClipped: negativeStartClipped, style: style, nodePathInfo: nodePathInfo, sequenceFrameOffset: sequenceFrameOffset, fromCanUpdate: fromCanUpdate, frozenFrame: frozenFrame, onMoveDragPointerDown: onMoveDragPointerDown, onPointerDownCapture: dragAwareDoubleClick.beginPointerGesture, onDoubleClick: canHandleSequenceDoubleClick ? onSequenceDoubleClick : undefined, children: [s.type === 'audio' && visibleLayout.media ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(AudioWaveform_1.AudioWaveform, { src: s.src, height: timeline_layout_1.TIMELINE_LAYER_HEIGHT_AUDIO, doesVolumeChange: s.doesVolumeChange, muted: s.muted, visualizationWidth: visibleLayout.media.width, startFrom: s.startMediaFrom, durationInFrames: s.duration, displayOffsetInFrames: mediaDisplayOffsetInFrames, displayDurationInFrames: mediaDisplayDurationInFrames, volume: s.volume, playbackRate: s.playbackRate, loopDisplay: s.loopDisplay }) })) : null, s.type === 'video' && visibleLayout.media ? (jsx_runtime_1.jsx(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src, visualizationWidth: visibleLayout.media.width, displayOffsetInFrames: mediaDisplayOffsetInFrames, displayDurationInFrames: mediaDisplayDurationInFrames, startMediaFrom: s.startMediaFrom, mediaFrameAtSequenceZero: s.mediaFrameAtSequenceZero, sequenceFrameOffset: sequenceFrameOffset, playbackRate: s.playbackRate, volume: s.volume, muted: s.muted, doesVolumeChange: s.doesVolumeChange, marginLeft: visibleLayout.media.left, loopDisplay: s.loopDisplay, frozenMediaFrame: s.frozenMediaFrame, extendLastFrame: extendVideoLastFrame })) : null, s.type === 'image' && visibleLayout.media ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(TimelineImageInfo_1.TimelineImageInfo, { src: s.src, offsetInPixels: visibleLayout.media.offset }) })) : null, s.loopDisplay === undefined ? null : (jsx_runtime_1.jsx(LoopedTimelineIndicators_1.LoopedTimelineIndicator, { loops: s.loopDisplay.numberOfTimes, fullWidth: width, visibleOffset: visibleLayout.cropLeft, visibleWidth: visibleLayout.width })), showLeftEdgeDragHandle &&
621
- visibleLayout.leftEdgeVisible &&
622
- negativeStartWidth === 0 &&
623
- nodePathInfo &&
624
- validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceLeftEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_j = video.durationInFrames) !== null && _j !== void 0 ? _j : 1, onDragEnd: dragAwareDoubleClick.endPointerGesture })) : null, showRightEdgeDragHandle &&
625
- visibleLayout.rightEdgeVisible &&
626
- nodePathInfo &&
627
- validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceRightEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_k = video.durationInFrames) !== null && _k !== void 0 ? _k : 1, onDragEnd: dragAwareDoubleClick.endPointerGesture })) : null] }));
601
+ const sequence = (jsx_runtime_1.jsxs(TimelineSequenceCurrentFrame, { s: s, displayDurationInFrames: displayDurationInFrames, premount: visibleLayout.premount, postmount: visibleLayout.postmount, negativeStart: visibleLayout.negativeStart, leftEdgeVisible: visibleLayout.leftEdgeVisible, negativeStartClipped: negativeStartClipped, style: style, nodePathInfo: nodePathInfo, sequenceFrameOffset: sequenceFrameOffset, fromCanUpdate: fromCanUpdate, frozenFrame: frozenFrame, onMoveDragPointerDown: onMoveDragPointerDown, onPointerDownCapture: dragAwareDoubleClick.beginPointerGesture, edgeDragHandles: jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [showLeftEdgeDragHandle &&
602
+ visibleLayout.leftEdgeVisible &&
603
+ negativeStartWidth === 0 &&
604
+ nodePathInfo &&
605
+ validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceLeftEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_j = video.durationInFrames) !== null && _j !== void 0 ? _j : 1, onDragEnd: dragAwareDoubleClick.endPointerGesture })) : null, showRightEdgeDragHandle &&
606
+ visibleLayout.rightEdgeVisible &&
607
+ nodePathInfo &&
608
+ validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceRightEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_k = video.durationInFrames) !== null && _k !== void 0 ? _k : 1, onDragEnd: dragAwareDoubleClick.endPointerGesture })) : null] }), onDoubleClick: canHandleSequenceDoubleClick ? onSequenceDoubleClick : undefined, children: [s.type === 'audio' && visibleLayout.media ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(AudioWaveform_1.AudioWaveform, { src: s.src, height: timeline_layout_1.TIMELINE_LAYER_HEIGHT_AUDIO, doesVolumeChange: s.doesVolumeChange, muted: s.muted, visualizationWidth: visibleLayout.media.width, startFrom: s.startMediaFrom, durationInFrames: s.duration, displayOffsetInFrames: mediaDisplayOffsetInFrames, displayDurationInFrames: mediaDisplayDurationInFrames, volume: s.volume, playbackRate: s.playbackRate, loopDisplay: s.loopDisplay }) })) : null, s.type === 'video' && visibleLayout.media ? (jsx_runtime_1.jsx(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src, visualizationWidth: visibleLayout.media.width, displayOffsetInFrames: mediaDisplayOffsetInFrames, displayDurationInFrames: mediaDisplayDurationInFrames, startMediaFrom: s.startMediaFrom, mediaFrameAtSequenceZero: s.mediaFrameAtSequenceZero, sequenceFrameOffset: sequenceFrameOffset, playbackRate: s.playbackRate, volume: s.volume, muted: s.muted, doesVolumeChange: s.doesVolumeChange, marginLeft: visibleLayout.media.left, loopDisplay: s.loopDisplay, frozenMediaFrame: s.frozenMediaFrame, extendLastFrame: extendVideoLastFrame })) : null, s.type === 'image' && visibleLayout.media ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(TimelineImageInfo_1.TimelineImageInfo, { src: s.src, offsetInPixels: visibleLayout.media.offset }) })) : null, s.loopDisplay === undefined ? null : (jsx_runtime_1.jsx(LoopedTimelineIndicators_1.LoopedTimelineIndicator, { loops: s.loopDisplay.numberOfTimes, fullWidth: width, visibleOffset: visibleLayout.cropLeft, visibleWidth: visibleLayout.width }))] }));
628
609
  return previewConnected || window.remotion_isReadOnlyStudio ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: sequence })) : (sequence);
629
610
  };
630
611
  exports.TimelineSequence = react_1.default.memo(TimelineSequenceFn);