@remotion/studio 4.0.513 → 4.0.514
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Studio.js +2 -1
- package/dist/components/AskAiModal.js +1 -1
- package/dist/components/AssetSelector.js +2 -0
- package/dist/components/AssetSelectorItem.js +1 -2
- package/dist/components/AudioWaveform.d.ts +3 -0
- package/dist/components/AudioWaveform.js +55 -67
- package/dist/components/Canvas.js +40 -5
- package/dist/components/CanvasOrLoading.js +5 -0
- package/dist/components/CompositionSelector.js +2 -0
- package/dist/components/ConfigureDefaultEditorModal.js +17 -11
- package/dist/components/Editor.js +16 -1
- package/dist/components/ElementInstallConfirmation.d.ts +1 -0
- package/dist/components/ElementInstallConfirmation.js +4 -2
- package/dist/components/FixComputedValueModal.d.ts +9 -0
- package/dist/components/FixComputedValueModal.js +217 -0
- package/dist/components/InitialCompositionLoader.js +19 -0
- package/dist/components/InlineDropdown.js +4 -4
- package/dist/components/InspectorInfoHeader.js +3 -3
- package/dist/components/InspectorOpenInEditor.js +3 -1
- package/dist/components/InspectorPanel/CompositionInspector.js +11 -1
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +2 -2
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +1 -1
- package/dist/components/InspectorPanel/EasingInspector.js +1 -1
- package/dist/components/InspectorPanel/KeyframeInspector.js +2 -2
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +1 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +35 -6
- package/dist/components/InspectorPanel/common.d.ts +5 -5
- package/dist/components/InspectorPanel/common.js +8 -8
- package/dist/components/InspectorPanel/styles.d.ts +1 -1
- package/dist/components/InspectorPanel/styles.js +4 -2
- package/dist/components/InspectorSourceLocation.d.ts +1 -1
- package/dist/components/InspectorSourceLocation.js +2 -2
- package/dist/components/LicenseKeyValidation.js +2 -2
- package/dist/components/Modals.js +2 -1
- package/dist/components/NewComposition/CodemodFooter.d.ts +1 -0
- package/dist/components/NewComposition/CodemodFooter.js +10 -8
- package/dist/components/NewComposition/DeleteComposition.js +1 -1
- package/dist/components/NewComposition/DeleteFolder.js +1 -1
- package/dist/components/NewComposition/DuplicateComposition.js +7 -2
- package/dist/components/NewComposition/NewComposition.js +1 -1
- package/dist/components/NewComposition/NewFolder.js +1 -1
- package/dist/components/NewComposition/RenameComposition.js +1 -1
- package/dist/components/NewComposition/RenameFolder.js +1 -1
- package/dist/components/NewComposition/duplicate-composition-api.d.ts +16 -0
- package/dist/components/NewComposition/duplicate-composition-api.js +16 -0
- package/dist/components/NoRegisterRoot.js +1 -1
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +4 -3
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -0
- package/dist/components/QuickSwitcher/fuzzy-search.js +1 -1
- package/dist/components/RefreshCompositionOverlay.js +1 -1
- package/dist/components/RenderButton.js +6 -3
- package/dist/components/RenderModal/WebRenderModal.js +6 -2
- package/dist/components/RenderModal/WebRenderModalAdvanced.d.ts +2 -0
- package/dist/components/RenderModal/WebRenderModalAdvanced.js +9 -2
- package/dist/components/RenderModal/render-modals.js +5 -1
- package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +5 -1
- package/dist/components/RenderQueue/actions.js +12 -2
- package/dist/components/RenderQueue/client-side-render-types.d.ts +1 -0
- package/dist/components/RenderingSettings.d.ts +2 -0
- package/dist/components/RenderingSettings.js +355 -0
- package/dist/components/SelectedOutlineElement.js +3 -3
- package/dist/components/SelectedOutlinePolygon.d.ts +1 -0
- package/dist/components/SelectedOutlinePolygon.js +53 -9
- package/dist/components/SettingsContext.d.ts +4 -1
- package/dist/components/SettingsContext.js +9 -2
- package/dist/components/SettingsModal.d.ts +1 -1
- package/dist/components/SettingsModal.js +10 -1
- package/dist/components/SettingsModalFooter.js +1 -1
- package/dist/components/StudioSettings.d.ts +2 -0
- package/dist/components/StudioSettings.js +185 -0
- package/dist/components/Timeline/LoopedIndicator.js +1 -1
- package/dist/components/Timeline/LoopedTimelineIndicators.d.ts +3 -0
- package/dist/components/Timeline/LoopedTimelineIndicators.js +22 -14
- package/dist/components/Timeline/Timeline.js +11 -9
- package/dist/components/Timeline/TimelineAssetField.d.ts +2 -2
- package/dist/components/Timeline/TimelineAssetField.js +1 -1
- package/dist/components/Timeline/TimelineDragHandler.js +62 -76
- package/dist/components/Timeline/TimelineEffectItem.js +1 -1
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +4 -2
- package/dist/components/Timeline/TimelineEffectPropItem.js +16 -11
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -1
- package/dist/components/Timeline/TimelineExpandedRow.js +4 -4
- package/dist/components/Timeline/TimelineExpandedSection.js +1 -1
- package/dist/components/Timeline/TimelineHeightContainer.d.ts +0 -4
- package/dist/components/Timeline/TimelineHeightContainer.js +4 -4
- package/dist/components/Timeline/TimelineImageInfo.d.ts +1 -0
- package/dist/components/Timeline/TimelineImageInfo.js +3 -2
- package/dist/components/Timeline/TimelineKeyframeControls.js +6 -1
- package/dist/components/Timeline/TimelineList.d.ts +1 -5
- package/dist/components/Timeline/TimelineList.js +14 -9
- package/dist/components/Timeline/TimelinePinchZoom.js +5 -5
- package/dist/components/Timeline/TimelineRowChrome.d.ts +0 -2
- package/dist/components/Timeline/TimelineRowChrome.js +12 -5
- package/dist/components/Timeline/TimelineSchemaField.d.ts +7 -3
- package/dist/components/Timeline/TimelineSchemaField.js +71 -13
- package/dist/components/Timeline/TimelineScrollable.js +3 -1
- package/dist/components/Timeline/TimelineSelection.d.ts +5 -2
- package/dist/components/Timeline/TimelineSelection.js +90 -103
- package/dist/components/Timeline/TimelineSequence.js +59 -25
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -1
- package/dist/components/Timeline/TimelineSequenceItem.js +15 -9
- package/dist/components/Timeline/TimelineSequencePropItem.d.ts +2 -1
- package/dist/components/Timeline/TimelineSequencePropItem.js +3 -3
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +33 -10
- package/dist/components/Timeline/TimelineSlider.js +42 -33
- package/dist/components/Timeline/TimelineTimeIndicators.js +90 -98
- package/dist/components/Timeline/TimelineTracks.d.ts +0 -2
- package/dist/components/Timeline/TimelineTracks.js +11 -4
- package/dist/components/Timeline/TimelineTransformOriginField.js +1 -1
- package/dist/components/Timeline/TimelineVideoInfo.d.ts +4 -4
- package/dist/components/Timeline/TimelineVideoInfo.js +151 -61
- package/dist/components/Timeline/TimelineViewport.d.ts +12 -0
- package/dist/components/Timeline/TimelineViewport.js +62 -0
- package/dist/components/Timeline/TimelineVirtualization.d.ts +22 -0
- package/dist/components/Timeline/TimelineVirtualization.js +144 -0
- package/dist/components/Timeline/TimelineZoomControls.js +16 -8
- package/dist/components/Timeline/call-add-keyframe.js +31 -3
- package/dist/components/Timeline/call-delete-keyframe.js +13 -3
- package/dist/components/Timeline/call-move-keyframe.js +11 -1
- package/dist/components/Timeline/call-update-keyframe-settings.js +31 -3
- package/dist/components/Timeline/delete-selected-timeline-item.js +2 -1
- package/dist/components/Timeline/get-timeline-keyframes.d.ts +1 -2
- package/dist/components/Timeline/get-timeline-keyframes.js +1 -8
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.d.ts +30 -0
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.js +61 -0
- package/dist/components/Timeline/split-selected-timeline-item.js +2 -2
- package/dist/components/Timeline/timeline-scroll-logic.d.ts +24 -0
- package/dist/components/Timeline/timeline-scroll-logic.js +127 -4
- package/dist/components/Timeline/use-timeline-height.d.ts +3 -5
- package/dist/components/Timeline/use-timeline-height.js +16 -18
- package/dist/components/UpdateCheck.d.ts +2 -10
- package/dist/components/UpdateCheck.js +8 -2
- package/dist/components/VisualControls/VisualControlHandle.js +8 -0
- package/dist/components/delete-jsx-node-api.d.ts +2 -0
- package/dist/components/delete-jsx-node-api.js +12 -0
- package/dist/components/element-install-api.d.ts +3 -0
- package/dist/components/element-install-api.js +19 -0
- package/dist/components/import-assets.js +20 -9
- package/dist/components/reorder-sequence-api.d.ts +2 -0
- package/dist/components/reorder-sequence-api.js +12 -0
- package/dist/components/split-jsx-sequence-api.d.ts +2 -0
- package/dist/components/split-jsx-sequence-api.js +12 -0
- package/dist/components/split-video-from-audio-api.d.ts +2 -0
- package/dist/components/split-video-from-audio-api.js +12 -0
- package/dist/error-overlay/remotion-overlay/Overlay.js +1 -1
- package/dist/esm/{chunk-tv7r0jy3.js → chunk-xn2q7eem.js} +11073 -7495
- package/dist/esm/index.mjs +7 -5
- package/dist/esm/internals.mjs +11073 -7495
- package/dist/esm/previewEntry.mjs +10905 -7327
- package/dist/esm/renderEntry.mjs +2 -3
- package/dist/helpers/browser-studio-operations.d.ts +2 -0
- package/dist/helpers/browser-studio-operations.js +10 -1
- package/dist/helpers/get-timeline-max-zoom.d.ts +26 -0
- package/dist/helpers/get-timeline-max-zoom.js +45 -0
- package/dist/helpers/inject-css.js +2 -2
- package/dist/helpers/render-codec-label.d.ts +1 -1
- package/dist/helpers/retry-payload.js +1 -0
- package/dist/helpers/studio-runtime-config.d.ts +1 -1
- package/dist/helpers/studio-runtime-config.js +2 -3
- package/dist/helpers/timeline-layout.d.ts +3 -1
- package/dist/helpers/timeline-layout.js +6 -1
- package/dist/helpers/url-state.js +3 -2
- package/dist/helpers/use-menu-structure.js +1 -5
- package/dist/helpers/use-runtime-values.d.ts +2 -1
- package/dist/helpers/use-runtime-values.js +7 -3
- package/dist/icons/remotion-triangle.d.ts +2 -0
- package/dist/icons/remotion-triangle.js +7 -0
- package/dist/renderEntry.js +1 -1
- package/dist/state/composition-list.d.ts +13 -0
- package/dist/state/composition-list.js +21 -0
- package/dist/state/modals.d.ts +7 -1
- package/dist/state/timeline-zoom.d.ts +1 -2
- package/dist/state/timeline-zoom.js +9 -5
- package/package.json +14 -13
|
@@ -7,6 +7,7 @@ const react_1 = require("react");
|
|
|
7
7
|
const remotion_1 = require("remotion");
|
|
8
8
|
const client_id_1 = require("../../helpers/client-id");
|
|
9
9
|
const open_in_editor_1 = require("../../helpers/open-in-editor");
|
|
10
|
+
const use_runtime_values_1 = require("../../helpers/use-runtime-values");
|
|
10
11
|
const call_api_1 = require("../call-api");
|
|
11
12
|
const ContextMenu_1 = require("../ContextMenu");
|
|
12
13
|
const use_default_editor_info_1 = require("../use-default-editor-info");
|
|
@@ -40,7 +41,11 @@ const isResettableStatus = ({ status, defaultValue, }) => {
|
|
|
40
41
|
const effectiveCodeValue = (_a = status.codeValue) !== null && _a !== void 0 ? _a : defaultValue;
|
|
41
42
|
return JSON.stringify(effectiveCodeValue) !== JSON.stringify(defaultValue);
|
|
42
43
|
};
|
|
43
|
-
const
|
|
44
|
+
const TimelineComputedEffectPropValue = ({ field, propStatus, runtimeValueStore, validatedLocation }) => {
|
|
45
|
+
const runtimeValue = (0, use_runtime_values_1.useRuntimeStoreValue)(runtimeValueStore, field.key);
|
|
46
|
+
return (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineNonEditableStatus, { propStatus: propStatus, field: field, runtimeValue: runtimeValue, validatedLocation: validatedLocation }));
|
|
47
|
+
};
|
|
48
|
+
const TimelineEffectPropValue = ({ field, nodePath, validatedLocation, sourceFrame, runtimeValueStore }) => {
|
|
44
49
|
var _a;
|
|
45
50
|
var _b;
|
|
46
51
|
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
@@ -179,22 +184,22 @@ const TimelineEffectPropValue = ({ field, nodePath, validatedLocation, sourceFra
|
|
|
179
184
|
}
|
|
180
185
|
if (effectStatus.type === 'cannot-update-effect') {
|
|
181
186
|
if (effectStatus.reason === 'computed') {
|
|
182
|
-
return (jsx_runtime_1.jsx(
|
|
187
|
+
return (jsx_runtime_1.jsx(TimelineComputedEffectPropValue, { propStatus: { status: 'computed' }, field: field, runtimeValueStore: runtimeValueStore, validatedLocation: validatedLocation }));
|
|
183
188
|
}
|
|
184
189
|
if (effectStatus.reason === 'not-call-expression') {
|
|
185
|
-
return jsx_runtime_1.jsx(TimelineSchemaField_1.UnsupportedStatus, { label: "not inline" });
|
|
190
|
+
return jsx_runtime_1.jsx(TimelineSchemaField_1.UnsupportedStatus, { label: "not inline", formattedValue: false });
|
|
186
191
|
}
|
|
187
192
|
if (effectStatus.reason === 'not-found') {
|
|
188
|
-
return jsx_runtime_1.jsx(TimelineSchemaField_1.UnsupportedStatus, { label: "not found in code" });
|
|
193
|
+
return (jsx_runtime_1.jsx(TimelineSchemaField_1.UnsupportedStatus, { label: "not found in code", formattedValue: false }));
|
|
189
194
|
}
|
|
190
195
|
throw new Error(`Unsupported effect status: ${effectStatus.reason}`);
|
|
191
196
|
}
|
|
192
197
|
if (effectStatus.type === 'cannot-update-sequence') {
|
|
193
198
|
if (effectStatus.reason === 'not-found') {
|
|
194
|
-
return jsx_runtime_1.jsx(TimelineSchemaField_1.UnsupportedStatus, { label: "not found in code" });
|
|
199
|
+
return (jsx_runtime_1.jsx(TimelineSchemaField_1.UnsupportedStatus, { label: "not found in code", formattedValue: false }));
|
|
195
200
|
}
|
|
196
201
|
if (effectStatus.reason === 'error') {
|
|
197
|
-
return jsx_runtime_1.jsx(TimelineSchemaField_1.UnsupportedStatus, { label: "error" });
|
|
202
|
+
return jsx_runtime_1.jsx(TimelineSchemaField_1.UnsupportedStatus, { label: "error", formattedValue: false });
|
|
198
203
|
}
|
|
199
204
|
throw new Error(`Unsupported effect status: ${effectStatus.reason}`);
|
|
200
205
|
}
|
|
@@ -205,7 +210,7 @@ const TimelineEffectPropValue = ({ field, nodePath, validatedLocation, sourceFra
|
|
|
205
210
|
return (jsx_runtime_1.jsx(TimelineKeyframedValue_1.TimelineKeyframedValue, { field: field, propStatus: propStatus, sourceFrame: sourceFrame, dragOverrideValue: dragOverrideValue, onSave: onSaveKeyframed, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, scaleLockNodePath: nodePath }));
|
|
206
211
|
}
|
|
207
212
|
if (propStatus.status === 'computed') {
|
|
208
|
-
return (jsx_runtime_1.jsx(
|
|
213
|
+
return (jsx_runtime_1.jsx(TimelineComputedEffectPropValue, { propStatus: propStatus, field: field, runtimeValueStore: runtimeValueStore, validatedLocation: validatedLocation }));
|
|
209
214
|
}
|
|
210
215
|
const effectiveValue = remotion_1.Internals.getEffectiveVisualModeValue({
|
|
211
216
|
propStatus,
|
|
@@ -217,11 +222,11 @@ const TimelineEffectPropValue = ({ field, nodePath, validatedLocation, sourceFra
|
|
|
217
222
|
return (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineFieldValue, { field: field, propStatus: propStatus, onSave: onSave, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, effectiveValue: effectiveValue, scaleLockNodePath: null }));
|
|
218
223
|
};
|
|
219
224
|
exports.TimelineEffectPropValue = TimelineEffectPropValue;
|
|
220
|
-
const TimelineEffectPropValueAtCurrentFrame = ({ field, nodePath, validatedLocation, keyframeDisplayOffset }) => {
|
|
225
|
+
const TimelineEffectPropValueAtCurrentFrame = ({ field, nodePath, validatedLocation, keyframeDisplayOffset, runtimeValueStore, }) => {
|
|
221
226
|
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
222
|
-
return (jsx_runtime_1.jsx(exports.TimelineEffectPropValue, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, sourceFrame: timelinePosition - keyframeDisplayOffset }));
|
|
227
|
+
return (jsx_runtime_1.jsx(exports.TimelineEffectPropValue, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, sourceFrame: timelinePosition - keyframeDisplayOffset, runtimeValueStore: runtimeValueStore }));
|
|
223
228
|
};
|
|
224
|
-
const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, keyframeDisplayOffset, keyframeControlsMode
|
|
229
|
+
const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, keyframeDisplayOffset, keyframeControlsMode, runtimeValueStore, }) => {
|
|
225
230
|
var _a;
|
|
226
231
|
var _b;
|
|
227
232
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
@@ -339,7 +344,7 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
339
344
|
property: field.key,
|
|
340
345
|
}).catch(() => undefined);
|
|
341
346
|
}, [canOpenInEditor, defaultEditorId, field.key, validatedLocation]);
|
|
342
|
-
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,
|
|
347
|
+
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, onSelect: selection.onSelect, onDoubleClick: onPropertyDoubleClick, showSelectedBackground: true, containsSelection: false, isFieldRow: true, outerHeight: null, children: jsx_runtime_1.jsx(TimelineFieldRowContent_1.TimelineFieldRowContent, { field: field, rowDepth: rowDepth, selected: selection.selected, keyframeControls: keyframeControls, children: jsx_runtime_1.jsx(TimelineEffectPropValueAtCurrentFrame, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, keyframeDisplayOffset: resolvedKeyframeDisplayOffset, runtimeValueStore: runtimeValueStore }) }) }));
|
|
343
348
|
return jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: row });
|
|
344
349
|
};
|
|
345
350
|
exports.TimelineEffectPropItem = TimelineEffectPropItem;
|
|
@@ -16,7 +16,7 @@ type TimelineExpandedRowProps = {
|
|
|
16
16
|
readonly nodePath: SequencePropsSubscriptionKey;
|
|
17
17
|
readonly schema: InteractivitySchema;
|
|
18
18
|
readonly keyframeDisplayOffset: number;
|
|
19
|
-
readonly keyframeControlsMode
|
|
19
|
+
readonly keyframeControlsMode: TimelineKeyframeControlsMode;
|
|
20
20
|
};
|
|
21
21
|
export declare const TimelineExpandedRow: React.NamedExoticComponent<TimelineExpandedRowProps>;
|
|
22
22
|
export {};
|
|
@@ -45,19 +45,19 @@ const TimelineExpandedRowInner = ({ node, depth, nestedDepth, rowDepthBase, getI
|
|
|
45
45
|
const isExpanded = getIsExpanded(node.nodePathInfo);
|
|
46
46
|
return (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowButton, { isExpanded: isExpanded, onClick: () => toggleTrack(node.nodePathInfo), label: `${node.label} section`, disabled: false }), style: {
|
|
47
47
|
height: timeline_layout_1.TREE_GROUP_ROW_HEIGHT,
|
|
48
|
-
}, selected: selection.selected, selectable: selection.selectable,
|
|
48
|
+
}, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false, isFieldRow: false, outerHeight: null, children: jsx_runtime_1.jsx("span", { style: labelStyle, children: node.label }) }));
|
|
49
49
|
}
|
|
50
50
|
if (node.field) {
|
|
51
51
|
if (node.field.kind === 'effect-field') {
|
|
52
|
-
return (jsx_runtime_1.jsx(TimelineEffectPropItem_1.TimelineEffectPropItem, { field: node.field, validatedLocation: validatedLocation, rowDepth: rowDepth, nodePath: nodePath, nodePathInfo: node.nodePathInfo, keyframeDisplayOffset: keyframeDisplayOffset, keyframeControlsMode: keyframeControlsMode }));
|
|
52
|
+
return (jsx_runtime_1.jsx(TimelineEffectPropItem_1.TimelineEffectPropItem, { field: node.field, validatedLocation: validatedLocation, rowDepth: rowDepth, nodePath: nodePath, nodePathInfo: node.nodePathInfo, keyframeDisplayOffset: keyframeDisplayOffset, keyframeControlsMode: keyframeControlsMode, runtimeValueStore: node.runtimeValueStore }));
|
|
53
53
|
}
|
|
54
54
|
if (node.field.kind === 'sequence-field') {
|
|
55
|
-
return (jsx_runtime_1.jsx(TimelineSequencePropItem_1.TimelineSequencePropItem, { field: node.field, validatedLocation: validatedLocation, rowDepth: rowDepth, nodePath: nodePath, nodePathInfo: node.nodePathInfo, schema: schema, keyframeDisplayOffset: keyframeDisplayOffset, keyframeControlsMode: keyframeControlsMode }));
|
|
55
|
+
return (jsx_runtime_1.jsx(TimelineSequencePropItem_1.TimelineSequencePropItem, { field: node.field, validatedLocation: validatedLocation, rowDepth: rowDepth, nodePath: nodePath, nodePathInfo: node.nodePathInfo, schema: schema, keyframeDisplayOffset: keyframeDisplayOffset, keyframeControlsMode: keyframeControlsMode, runtimeValue: node.runtimeValue }));
|
|
56
56
|
}
|
|
57
57
|
throw new Error('Unexpected field kind: ' + JSON.stringify(node.field));
|
|
58
58
|
}
|
|
59
59
|
return (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: {
|
|
60
60
|
height: (0, timeline_layout_1.getTreeRowHeight)(node),
|
|
61
|
-
}, selected: selection.selected, selectable: selection.selectable,
|
|
61
|
+
}, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false, isFieldRow: false, outerHeight: null, children: jsx_runtime_1.jsx("span", { style: labelStyle, children: node.label }) }));
|
|
62
62
|
};
|
|
63
63
|
exports.TimelineExpandedRow = react_1.default.memo(TimelineExpandedRowInner);
|
|
@@ -76,7 +76,7 @@ const TimelineExpandedSection = ({ sequence, validatedLocation, nodePathInfo, ne
|
|
|
76
76
|
return null;
|
|
77
77
|
}
|
|
78
78
|
return (jsx_runtime_1.jsx("div", { style: style, children: flat.map(({ node, depth }, i) => {
|
|
79
|
-
return (jsx_runtime_1.jsxs(react_1.default.Fragment, { children: [i > 0 ? jsx_runtime_1.jsx("div", { style: separator }) : null, jsx_runtime_1.jsx(TimelineExpandedRow_1.TimelineExpandedRow, { node: node, depth: depth, nestedDepth: nestedDepth, getIsExpanded: getIsExpanded, toggleTrack: toggleTrack, validatedLocation: validatedLocation, nodePath: nodePathInfo.sequenceSubscriptionKey, schema: schema, keyframeDisplayOffset: keyframeDisplayOffset })
|
|
79
|
+
return (jsx_runtime_1.jsxs(react_1.default.Fragment, { children: [i > 0 ? jsx_runtime_1.jsx("div", { style: separator }) : null, jsx_runtime_1.jsx(TimelineExpandedRow_1.TimelineExpandedRow, { node: node, depth: depth, nestedDepth: nestedDepth, getIsExpanded: getIsExpanded, toggleTrack: toggleTrack, validatedLocation: validatedLocation, nodePath: nodePathInfo.sequenceSubscriptionKey, schema: schema, keyframeDisplayOffset: keyframeDisplayOffset, keyframeControlsMode: "timeline" })
|
|
80
80
|
] }, JSON.stringify(node.nodePathInfo)));
|
|
81
81
|
}) }));
|
|
82
82
|
};
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { TimelineTrackData } from '../../helpers/get-timeline-sequence-sort-key';
|
|
3
2
|
export declare const TimelineHeightContainer: React.NamedExoticComponent<{
|
|
4
|
-
readonly shown: TimelineTrackData[];
|
|
5
|
-
readonly hasBeenCut: boolean;
|
|
6
|
-
readonly isStill: boolean;
|
|
7
3
|
readonly children: React.ReactNode;
|
|
8
4
|
}>;
|
|
@@ -37,7 +37,7 @@ exports.TimelineHeightContainer = void 0;
|
|
|
37
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
38
|
const react_1 = __importStar(require("react"));
|
|
39
39
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
40
|
-
const
|
|
40
|
+
const TimelineVirtualization_1 = require("./TimelineVirtualization");
|
|
41
41
|
const baseStyle = {
|
|
42
42
|
display: 'flex',
|
|
43
43
|
flex: 1,
|
|
@@ -45,9 +45,9 @@ const baseStyle = {
|
|
|
45
45
|
overflowX: 'hidden',
|
|
46
46
|
backgroundColor: TimelineSelection_1.TIMELINE_BACKGROUND,
|
|
47
47
|
};
|
|
48
|
-
const TimelineHeightContainerInner = ({
|
|
49
|
-
const
|
|
50
|
-
const style = (0, react_1.useMemo)(() => ({ ...baseStyle, height }), [
|
|
48
|
+
const TimelineHeightContainerInner = ({ children }) => {
|
|
49
|
+
const { totalSize } = (0, TimelineVirtualization_1.useTimelineVirtualization)();
|
|
50
|
+
const style = (0, react_1.useMemo)(() => ({ ...baseStyle, height: totalSize }), [totalSize]);
|
|
51
51
|
return jsx_runtime_1.jsx("div", { style: style, children: children });
|
|
52
52
|
};
|
|
53
53
|
exports.TimelineHeightContainer = react_1.default.memo(TimelineHeightContainerInner);
|
|
@@ -15,7 +15,7 @@ const containerStyle = {
|
|
|
15
15
|
borderTopLeftRadius: 2,
|
|
16
16
|
borderBottomLeftRadius: 2,
|
|
17
17
|
};
|
|
18
|
-
const TimelineImageInfo = ({ src, visualizationWidth }) => {
|
|
18
|
+
const TimelineImageInfo = ({ src, visualizationWidth, offsetInPixels }) => {
|
|
19
19
|
const ref = (0, react_1.useRef)(null);
|
|
20
20
|
(0, react_1.useEffect)(() => {
|
|
21
21
|
const { current } = ref;
|
|
@@ -38,13 +38,14 @@ const TimelineImageInfo = ({ src, visualizationWidth }) => {
|
|
|
38
38
|
(0, timeline_utils_1.drawRepeatingImageThumbnail)({
|
|
39
39
|
canvas,
|
|
40
40
|
image: img,
|
|
41
|
+
offsetInPixels: offsetInPixels * window.devicePixelRatio,
|
|
41
42
|
});
|
|
42
43
|
};
|
|
43
44
|
img.src = src;
|
|
44
45
|
return () => {
|
|
45
46
|
current.removeChild(canvas);
|
|
46
47
|
};
|
|
47
|
-
}, [src, visualizationWidth]);
|
|
48
|
+
}, [offsetInPixels, src, visualizationWidth]);
|
|
48
49
|
return jsx_runtime_1.jsx("div", { ref: ref, style: containerStyle });
|
|
49
50
|
};
|
|
50
51
|
exports.TimelineImageInfo = TimelineImageInfo;
|
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const remotion_1 = require("remotion");
|
|
8
|
+
const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
|
|
8
9
|
const client_id_1 = require("../../helpers/client-id");
|
|
9
10
|
const colors_1 = require("../../helpers/colors");
|
|
10
11
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
@@ -292,6 +293,9 @@ const shouldShowTimelineKeyframeControls = ({ propStatus, selected, keyframable,
|
|
|
292
293
|
};
|
|
293
294
|
exports.shouldShowTimelineKeyframeControls = shouldShowTimelineKeyframeControls;
|
|
294
295
|
const shouldShowTimelineKeyframeNavigation = ({ propStatus, selected, }) => {
|
|
296
|
+
if (propStatus.status === 'computed') {
|
|
297
|
+
return false;
|
|
298
|
+
}
|
|
295
299
|
if (selected) {
|
|
296
300
|
return true;
|
|
297
301
|
}
|
|
@@ -342,7 +346,8 @@ const TimelineKeyframeControls = ({ fieldKey, propStatus, nodePath, fileName, ke
|
|
|
342
346
|
key: fieldKey,
|
|
343
347
|
});
|
|
344
348
|
const canAddKeyframe = keyframable;
|
|
345
|
-
const canToggleKeyframe =
|
|
349
|
+
const canToggleKeyframe = (0, browser_studio_operations_1.canUseKeyframeOperations)() &&
|
|
350
|
+
propStatus.status !== 'computed' &&
|
|
346
351
|
(hasKeyframeAtCurrentFrame || canAddKeyframe);
|
|
347
352
|
const selectedNodePathInfos = (0, react_1.useMemo)(() => (0, exports.getSelectedKeyframeControlNodePathInfos)({
|
|
348
353
|
clickedNodePathInfo: nodePathInfo,
|
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export declare const TimelineList: React.FC<{
|
|
4
|
-
readonly timeline: TimelineTrackData[];
|
|
5
|
-
readonly showTimePadding: boolean;
|
|
6
|
-
}>;
|
|
2
|
+
export declare const TimelineList: React.FC;
|
|
@@ -2,22 +2,27 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TimelineList = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
5
|
const colors_1 = require("../../helpers/colors");
|
|
7
|
-
const nest_timeline_tracks_1 = require("./nest-timeline-tracks");
|
|
8
6
|
const TimelineSequenceItem_1 = require("./TimelineSequenceItem");
|
|
9
|
-
const
|
|
7
|
+
const TimelineVirtualization_1 = require("./TimelineVirtualization");
|
|
10
8
|
const container = {
|
|
11
9
|
flex: 1,
|
|
12
10
|
background: colors_1.BACKGROUND,
|
|
11
|
+
position: 'relative',
|
|
13
12
|
};
|
|
14
|
-
const TimelineListTrack = ({
|
|
13
|
+
const TimelineListTrack = ({ row }) => {
|
|
15
14
|
var _a;
|
|
16
|
-
const {
|
|
17
|
-
return (jsx_runtime_1.jsx(
|
|
15
|
+
const { afterDropLineOffset, siblingIndex, track } = row;
|
|
16
|
+
return (jsx_runtime_1.jsx(TimelineSequenceItem_1.TimelineSequenceItem, { afterDropLineOffset: afterDropLineOffset, siblingIndex: siblingIndex, connectedCompositions: (_a = track.connectedCompositions) !== null && _a !== void 0 ? _a : [], nestedDepth: track.depth, sequence: track.sequence, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset, sequenceFrameOffset: track.sequenceFrameOffset }));
|
|
18
17
|
};
|
|
19
|
-
const TimelineList = (
|
|
20
|
-
const
|
|
21
|
-
return (jsx_runtime_1.
|
|
18
|
+
const TimelineList = () => {
|
|
19
|
+
const { rows, tracksEnd, virtualItems } = (0, TimelineVirtualization_1.useTimelineVirtualization)();
|
|
20
|
+
return (jsx_runtime_1.jsx("div", { style: { ...container, height: tracksEnd }, children: virtualItems.map((virtualItem) => (jsx_runtime_1.jsx("div", { style: {
|
|
21
|
+
height: virtualItem.size,
|
|
22
|
+
left: 0,
|
|
23
|
+
position: 'absolute',
|
|
24
|
+
top: virtualItem.start,
|
|
25
|
+
width: '100%',
|
|
26
|
+
}, children: jsx_runtime_1.jsx(TimelineListTrack, { row: rows[virtualItem.index] }) }, virtualItem.key))) }));
|
|
22
27
|
};
|
|
23
28
|
exports.TimelineList = TimelineList;
|
|
@@ -9,11 +9,11 @@ const timeline_zoom_1 = require("../../state/timeline-zoom");
|
|
|
9
9
|
const timeline_refs_1 = require("./timeline-refs");
|
|
10
10
|
const timeline_scroll_logic_1 = require("./timeline-scroll-logic");
|
|
11
11
|
/**
|
|
12
|
-
* Maps wheel deltaY to zoom
|
|
13
|
-
* pinch steps change `TimelineZoomCtx` zoom by at least one
|
|
14
|
-
*
|
|
12
|
+
* Maps wheel deltaY to a multiplicative zoom change. Must be large enough that
|
|
13
|
+
* typical ctrl+wheel pinch steps change `TimelineZoomCtx` zoom by at least one
|
|
14
|
+
* 0.1 step after rounding in `clampTimelineZoom` (0.005 was too small at 1x).
|
|
15
15
|
*/
|
|
16
|
-
const
|
|
16
|
+
const ZOOM_WHEEL_SENSITIVITY = 0.06;
|
|
17
17
|
const TimelinePinchZoom = () => {
|
|
18
18
|
const isVideoComposition = (0, is_current_selected_still_1.useIsVideoComposition)();
|
|
19
19
|
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
@@ -60,7 +60,7 @@ const TimelinePinchZoom = () => {
|
|
|
60
60
|
else if (deltaMode === WheelEvent.DOM_DELTA_PAGE) {
|
|
61
61
|
scaledDeltaY *= scrollEl.clientHeight;
|
|
62
62
|
}
|
|
63
|
-
setZoom(canvasContent.compositionId, (z) => z -
|
|
63
|
+
setZoom(canvasContent.compositionId, (z) => z * Math.exp(-scaledDeltaY * ZOOM_WHEEL_SENSITIVITY), { anchorFrame: null, anchorContentX });
|
|
64
64
|
}, [
|
|
65
65
|
editorZoomGestures,
|
|
66
66
|
isVideoComposition,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { TimelineSelectionInteraction } from './TimelineSelection';
|
|
3
|
-
import { type TimelineSelection } from './TimelineSelection';
|
|
4
3
|
export declare const TimelineRowKeyframeControlsColumn: React.FC<{
|
|
5
4
|
readonly children: React.ReactNode;
|
|
6
5
|
readonly depth: number;
|
|
@@ -14,7 +13,6 @@ export declare const TimelineRowChrome: React.FC<{
|
|
|
14
13
|
readonly style: React.CSSProperties;
|
|
15
14
|
readonly selected: boolean;
|
|
16
15
|
readonly selectable: boolean;
|
|
17
|
-
readonly selectionItem: TimelineSelection | null;
|
|
18
16
|
readonly onSelect: (interaction?: TimelineSelectionInteraction) => void;
|
|
19
17
|
readonly showSelectedBackground: boolean;
|
|
20
18
|
readonly containsSelection: boolean;
|
|
@@ -35,11 +35,9 @@ const TimelineRowKeyframeControlsColumn = ({ children, depth }) => {
|
|
|
35
35
|
return (jsx_runtime_1.jsx("div", { style: leftChromeStyle, children: jsx_runtime_1.jsx("div", { style: style, children: children }) }));
|
|
36
36
|
};
|
|
37
37
|
exports.TimelineRowKeyframeControlsColumn = TimelineRowKeyframeControlsColumn;
|
|
38
|
-
const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, style, selected, selectable,
|
|
39
|
-
const ref = (0, react_1.useRef)(null);
|
|
38
|
+
const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, style, selected, selectable, onSelect, showSelectedBackground, containsSelection, hovered = false, isFieldRow, outerHeight, onDragLeave, onDragOver, onDrop, onDoubleClick, onPointerEnter, onPointerLeave, }) => {
|
|
40
39
|
const { basePadding, keyframeControlsPlacement, rowBorderRadius, rowHorizontalMargin, } = (0, react_1.useContext)(TimelineRowLayoutContext_1.TimelineRowLayoutContext);
|
|
41
40
|
const indentWidth = (0, timeline_row_layout_1.getTimelineRowIndentWidth)(depth);
|
|
42
|
-
(0, TimelineSelection_1.useTimelineFocusableItem)(selectionItem, ref);
|
|
43
41
|
const chromeColumnStyle = (0, react_1.useMemo)(() => ({
|
|
44
42
|
alignItems: 'center',
|
|
45
43
|
alignSelf: 'stretch',
|
|
@@ -60,6 +58,15 @@ const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, styl
|
|
|
60
58
|
e.stopPropagation();
|
|
61
59
|
onSelect();
|
|
62
60
|
}, [onSelect]);
|
|
61
|
+
const onDoubleClickIfNotInteractive = (0, react_1.useCallback)((e) => {
|
|
62
|
+
const { target } = e;
|
|
63
|
+
if (target instanceof Element &&
|
|
64
|
+
e.currentTarget.contains(target.closest('button, input, select, textarea, a, [contenteditable="true"]'))) {
|
|
65
|
+
e.stopPropagation();
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
onDoubleClick === null || onDoubleClick === void 0 ? void 0 : onDoubleClick(e);
|
|
69
|
+
}, [onDoubleClick]);
|
|
63
70
|
const highlightBackground = (0, TimelineSelection_1.getTimelineRowHighlightBackground)({
|
|
64
71
|
showSelectedBackground,
|
|
65
72
|
selected,
|
|
@@ -95,8 +102,8 @@ const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, styl
|
|
|
95
102
|
const shouldRenderLeftChrome = !isFieldRow || keyframeControlsPlacement === 'before-label';
|
|
96
103
|
const chrome = (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [shouldRenderLeftChrome ? (keyframeControls ? (jsx_runtime_1.jsx(exports.TimelineRowKeyframeControlsColumn, { depth: depth, children: keyframeControls })) : (jsx_runtime_1.jsx("div", { style: leftChromeStyle, children: jsx_runtime_1.jsxs("div", { style: chromeColumnStyle, children: [eye, indentWidth > 0 ? jsx_runtime_1.jsx(Padder_1.Padder, { depth: depth }) : null, arrow] }) }))) : null, children] }));
|
|
97
104
|
if (outerStyle) {
|
|
98
|
-
return (jsx_runtime_1.jsx("div", {
|
|
105
|
+
return (jsx_runtime_1.jsx("div", { style: outerStyle, onDragLeave: onDragLeave, onDragOver: onDragOver, onDrop: onDrop, onPointerDown: selectable ? onPointerDown : undefined, onContextMenu: selectable ? onContextMenu : undefined, onDoubleClick: onDoubleClickIfNotInteractive, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, children: jsx_runtime_1.jsx("div", { style: innerRowStyle, children: chrome }) }));
|
|
99
106
|
}
|
|
100
|
-
return (jsx_runtime_1.jsx("div", {
|
|
107
|
+
return (jsx_runtime_1.jsx("div", { onDragLeave: onDragLeave, onDragOver: onDragOver, onDrop: onDrop, onPointerDown: selectable ? onPointerDown : undefined, onContextMenu: selectable ? onContextMenu : undefined, onDoubleClick: onDoubleClickIfNotInteractive, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, style: innerRowStyle, children: chrome }));
|
|
101
108
|
};
|
|
102
109
|
exports.TimelineRowChrome = TimelineRowChrome;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CanUpdateSequencePropStatusFalse, CanUpdateSequencePropStatusStatic, SequencePropsSubscriptionKey } from 'remotion';
|
|
3
|
+
import type { CodePosition } from '../../error-overlay/react-overlay/utils/get-source-map';
|
|
3
4
|
import type { SchemaFieldInfo, TimelineFieldOnDragValueChange, TimelineFieldOnSave } from '../../helpers/timeline-layout';
|
|
4
|
-
export declare const TIMELINE_COMPUTED_EFFECT_FIX_LINK = "https://www.remotion.dev/docs/studio/interactivity-best-practices#keep-effects-editable";
|
|
5
5
|
export declare const UnsupportedStatus: React.FC<{
|
|
6
|
-
readonly label:
|
|
7
|
-
readonly
|
|
6
|
+
readonly label: React.ReactNode;
|
|
7
|
+
readonly onFix?: () => void;
|
|
8
|
+
readonly formattedValue: boolean;
|
|
8
9
|
}>;
|
|
9
10
|
export declare const TimelineNonEditableStatus: React.FC<{
|
|
10
11
|
readonly propStatus: CanUpdateSequencePropStatusFalse;
|
|
12
|
+
readonly field: SchemaFieldInfo;
|
|
13
|
+
readonly runtimeValue: unknown;
|
|
14
|
+
readonly validatedLocation: CodePosition;
|
|
11
15
|
}>;
|
|
12
16
|
export declare const TimelineFieldValue: React.FC<{
|
|
13
17
|
readonly field: SchemaFieldInfo;
|
|
@@ -1,18 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
5
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.TimelineFieldValue = exports.TimelineNonEditableStatus = exports.UnsupportedStatus =
|
|
36
|
+
exports.TimelineFieldValue = exports.TimelineNonEditableStatus = exports.UnsupportedStatus = void 0;
|
|
7
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const react_1 =
|
|
38
|
+
const react_1 = __importStar(require("react"));
|
|
9
39
|
const colors_1 = require("../../helpers/colors");
|
|
10
|
-
const
|
|
40
|
+
const modals_1 = require("../../state/modals");
|
|
41
|
+
const SettingsContext_1 = require("../SettingsContext");
|
|
42
|
+
const timeline_field_display_utils_1 = require("./timeline-field-display-utils");
|
|
11
43
|
const TimelineArrayField_1 = require("./TimelineArrayField");
|
|
12
44
|
const TimelinePrimitiveFieldValue_1 = require("./TimelinePrimitiveFieldValue");
|
|
13
|
-
const INTERACTIVITY_BEST_PRACTICES_DOCS = 'https://www.remotion.dev/docs/studio/interactivity-best-practices';
|
|
14
|
-
const TIMELINE_COMPUTED_VALUE_FIX_LINK = `${INTERACTIVITY_BEST_PRACTICES_DOCS}#keep-editable-values-visible`;
|
|
15
|
-
exports.TIMELINE_COMPUTED_EFFECT_FIX_LINK = `${INTERACTIVITY_BEST_PRACTICES_DOCS}#keep-effects-editable`;
|
|
16
45
|
const unsupportedStatusWrapper = {
|
|
17
46
|
alignItems: 'center',
|
|
18
47
|
display: 'inline-flex',
|
|
@@ -25,6 +54,13 @@ const unsupportedLabel = {
|
|
|
25
54
|
fontSize: 12,
|
|
26
55
|
fontStyle: 'italic',
|
|
27
56
|
};
|
|
57
|
+
const computedValue = {
|
|
58
|
+
color: colors_1.WHITE_ALPHA_40,
|
|
59
|
+
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
60
|
+
fontSize: 12,
|
|
61
|
+
lineHeight: '18px',
|
|
62
|
+
pointerEvents: 'none',
|
|
63
|
+
};
|
|
28
64
|
const fixLinkBase = {
|
|
29
65
|
color: colors_1.LIGHT_TEXT,
|
|
30
66
|
display: 'inline-block',
|
|
@@ -34,8 +70,13 @@ const fixLinkBase = {
|
|
|
34
70
|
lineHeight: 1,
|
|
35
71
|
textDecoration: 'none',
|
|
36
72
|
width: 17,
|
|
73
|
+
appearance: 'none',
|
|
74
|
+
background: 'none',
|
|
75
|
+
border: 'none',
|
|
76
|
+
cursor: 'pointer',
|
|
77
|
+
padding: 0,
|
|
37
78
|
};
|
|
38
|
-
const UnsupportedStatus = ({ label,
|
|
79
|
+
const UnsupportedStatus = ({ label, onFix, formattedValue }) => {
|
|
39
80
|
const [hovered, setHovered] = react_1.default.useState(false);
|
|
40
81
|
const [focused, setFocused] = react_1.default.useState(false);
|
|
41
82
|
const visible = hovered || focused;
|
|
@@ -53,12 +94,29 @@ const UnsupportedStatus = ({ label, fixHref }) => {
|
|
|
53
94
|
event.stopPropagation();
|
|
54
95
|
};
|
|
55
96
|
return (jsx_runtime_1.jsxs("span", { style: unsupportedStatusWrapper, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), children: [
|
|
56
|
-
jsx_runtime_1.jsx("span", { style: unsupportedLabel, children: label }),
|
|
97
|
+
jsx_runtime_1.jsx("span", { style: formattedValue ? computedValue : unsupportedLabel, inert: formattedValue, children: label }), onFix ? (jsx_runtime_1.jsx("button", { type: "button", style: fixLink, title: "Fix computed Studio value", onClick: (event) => {
|
|
98
|
+
stopMousePropagation(event);
|
|
99
|
+
onFix();
|
|
100
|
+
}, onDoubleClick: stopMousePropagation, onPointerDown: stopPointerPropagation, onFocus: () => setFocused(true), onBlur: () => setFocused(false), tabIndex: visible ? 0 : -1, children: "Fix" })) : null] }));
|
|
57
101
|
};
|
|
58
102
|
exports.UnsupportedStatus = UnsupportedStatus;
|
|
59
|
-
const TimelineNonEditableStatus = ({ propStatus }) => {
|
|
103
|
+
const TimelineNonEditableStatus = ({ propStatus, field, runtimeValue, validatedLocation }) => {
|
|
104
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
105
|
+
const { remotionSkillsInfo } = (0, SettingsContext_1.useSettings)();
|
|
106
|
+
const onFix = (0, react_1.useCallback)(() => {
|
|
107
|
+
var _a;
|
|
108
|
+
setSelectedModal({
|
|
109
|
+
type: 'fix-computed-value',
|
|
110
|
+
prop: field.key,
|
|
111
|
+
context: `${validatedLocation.source}:${validatedLocation.line}:${validatedLocation.column}`,
|
|
112
|
+
remotionInteractivitySkillAvailable: (_a = remotionSkillsInfo === null || remotionSkillsInfo === void 0 ? void 0 : remotionSkillsInfo.remotionInteractivitySkillAvailable) !== null && _a !== void 0 ? _a : false,
|
|
113
|
+
});
|
|
114
|
+
}, [field.key, remotionSkillsInfo, setSelectedModal, validatedLocation]);
|
|
60
115
|
if (propStatus.status === 'computed') {
|
|
61
|
-
return (jsx_runtime_1.jsx(exports.UnsupportedStatus, { label: (0,
|
|
116
|
+
return (jsx_runtime_1.jsx(exports.UnsupportedStatus, { label: (0, timeline_field_display_utils_1.formatTimelineFieldValueForDisplay)({
|
|
117
|
+
fieldSchema: field.fieldSchema,
|
|
118
|
+
value: runtimeValue,
|
|
119
|
+
}), onFix: onFix, formattedValue: true }));
|
|
62
120
|
}
|
|
63
121
|
};
|
|
64
122
|
exports.TimelineNonEditableStatus = TimelineNonEditableStatus;
|
|
@@ -8,11 +8,13 @@ const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
|
8
8
|
const timeline_refs_1 = require("./timeline-refs");
|
|
9
9
|
const TimelineAssetDropIndicator_1 = require("./TimelineAssetDropIndicator");
|
|
10
10
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
11
|
+
const TimelineViewport_1 = require("./TimelineViewport");
|
|
11
12
|
const outer = {
|
|
12
13
|
width: '100%',
|
|
13
14
|
height: '100%',
|
|
14
15
|
overflowX: 'auto',
|
|
15
16
|
overflowY: 'hidden',
|
|
17
|
+
overscrollBehaviorX: 'none',
|
|
16
18
|
position: 'relative',
|
|
17
19
|
backgroundColor: TimelineSelection_1.TIMELINE_BACKGROUND,
|
|
18
20
|
};
|
|
@@ -33,7 +35,7 @@ const TimelineScrollable = ({ children }) => {
|
|
|
33
35
|
};
|
|
34
36
|
}, []);
|
|
35
37
|
return (jsx_runtime_1.jsxs("div", { ref: timeline_refs_1.scrollableRef, "data-timeline-scrollable": "true", style: outer, className: is_menu_item_1.HORIZONTAL_SCROLLBAR_CLASSNAME, onPointerDownCapture: onPointerDownCapture, children: [
|
|
36
|
-
jsx_runtime_1.jsx("div", { style: containerStyle, children: children }), jsx_runtime_1.jsx(TimelineAssetDropIndicator_1.TimelineAssetDropIndicator, {}), marqueeRect === null ? null : (jsx_runtime_1.jsx("div", { style: {
|
|
38
|
+
jsx_runtime_1.jsx(TimelineViewport_1.TimelineViewportProvider, { scrollable: timeline_refs_1.scrollableRef, children: jsx_runtime_1.jsx("div", { style: containerStyle, children: children }) }), jsx_runtime_1.jsx(TimelineAssetDropIndicator_1.TimelineAssetDropIndicator, {}), marqueeRect === null ? null : (jsx_runtime_1.jsx("div", { style: {
|
|
37
39
|
...marqueeStyle,
|
|
38
40
|
height: marqueeRect.bottom - marqueeRect.top,
|
|
39
41
|
left: marqueeRect.left,
|
|
@@ -125,12 +125,12 @@ export declare const extendTimelineMarqueeSelection: ({ currentSelection, marque
|
|
|
125
125
|
}) => readonly TimelineSelection[];
|
|
126
126
|
type TimelineSelectionContextValue = {
|
|
127
127
|
readonly canSelect: boolean;
|
|
128
|
+
readonly revealRequest: TimelineSelectionRevealRequest | null;
|
|
128
129
|
readonly selectedItems: readonly TimelineSelection[];
|
|
129
130
|
readonly isSelected: (item: TimelineSelection) => boolean;
|
|
130
131
|
readonly selectItem: (item: TimelineSelection, interaction?: TimelineSelectionInteraction, allSelectableItems?: readonly TimelineSelection[], options?: TimelineSelectionOptions) => void;
|
|
131
132
|
readonly selectItems: (items: readonly TimelineSelection[], options?: TimelineSelectionOptions) => void;
|
|
132
133
|
readonly registerMarqueeSelectableItem: (item: TimelineSelection, getRect: () => DOMRect | null) => () => void;
|
|
133
|
-
readonly registerFocusableItem: (item: TimelineSelection, getElement: () => Element | null) => () => void;
|
|
134
134
|
readonly getMarqueeSelection: (marqueeRect: TimelineMarqueeRect, lockedSelectionKind: TimelineMarqueeSelectionKind | null) => {
|
|
135
135
|
readonly lockedSelectionKind: TimelineMarqueeSelectionKind | null;
|
|
136
136
|
readonly selectedItems: readonly TimelineSelection[];
|
|
@@ -145,6 +145,10 @@ export declare const TimelineSelectionOrderProvider: React.FC<{
|
|
|
145
145
|
type TimelineSelectionOptions = {
|
|
146
146
|
readonly reveal?: boolean;
|
|
147
147
|
};
|
|
148
|
+
type TimelineSelectionRevealRequest = {
|
|
149
|
+
readonly item: TimelineSelection;
|
|
150
|
+
readonly token: number;
|
|
151
|
+
};
|
|
148
152
|
export declare const getTimelineSelectionFromNodePathInfo: (nodePathInfo: SequenceNodePathInfo | null) => TimelineSelection | null;
|
|
149
153
|
export declare const getTimelineSelectionKey: (item: TimelineSelection) => string;
|
|
150
154
|
export declare const getSelectableTimelineSequenceSelections: (tracks: readonly Pick<TimelineTrackData, "nodePathInfo">[]) => TimelineSelection[];
|
|
@@ -181,7 +185,6 @@ export declare const useTimelineMarqueeSelection: () => {
|
|
|
181
185
|
onPointerDownCapture: (event: React.PointerEvent<HTMLDivElement>) => void;
|
|
182
186
|
};
|
|
183
187
|
export declare const useTimelineMarqueeSelectableItem: (item: TimelineSelection | null, ref: React.RefObject<Element | null>) => void;
|
|
184
|
-
export declare const useTimelineFocusableItem: (item: TimelineSelection | null, ref: React.RefObject<Element | null>) => void;
|
|
185
188
|
export declare const useTimelineRowSelection: (nodePathInfo: SequenceNodePathInfo | null) => {
|
|
186
189
|
onSelect: (interaction?: TimelineSelectionInteraction | undefined) => void;
|
|
187
190
|
selectable: boolean;
|