@remotion/studio 4.0.514 → 4.0.516
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/install-package.js +14 -1
- package/dist/api/restart-studio.js +4 -0
- package/dist/components/AssetSelector.js +3 -9
- package/dist/components/AssetSelectorItem.d.ts +3 -1
- package/dist/components/AssetSelectorItem.js +41 -42
- package/dist/components/AudioWaveform.js +17 -139
- package/dist/components/Canvas.js +7 -4
- package/dist/components/CaptionInspector.d.ts +2 -0
- package/dist/components/CaptionInspector.js +3 -5
- package/dist/components/CompositionSelector.js +6 -3
- package/dist/components/CompositionSelectorItem.js +9 -10
- package/dist/components/ConfigSelect.d.ts +17 -0
- package/dist/components/ConfigSelect.js +50 -0
- package/dist/components/CurrentAsset.d.ts +10 -2
- package/dist/components/CurrentAsset.js +139 -46
- package/dist/components/FixComputedValueModal.js +54 -51
- package/dist/components/GlobalKeybindings.js +5 -5
- package/dist/components/InlineAction.d.ts +1 -1
- package/dist/components/InlineAction.js +12 -2
- package/dist/components/InlineCaptionInspector.d.ts +2 -0
- package/dist/components/InlineCaptionInspector.js +2 -2
- package/dist/components/InlineCompositionName.js +1 -1
- package/dist/components/InlineEditableTitle.js +3 -2
- package/dist/components/InspectorInfoHeader.js +1 -1
- package/dist/components/InspectorOpenInEditor.js +48 -72
- package/dist/components/InspectorPanel/AlignmentControls.js +2 -3
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.d.ts +7 -0
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +39 -0
- package/dist/components/InspectorPanel/CompositionInspector.js +41 -12
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +10 -4
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +2 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -4
- package/dist/components/InspectorPanel/common.d.ts +0 -12
- package/dist/components/InspectorPanel/common.js +3 -52
- package/dist/components/InspectorPanel/use-composition-actions.js +0 -1
- package/dist/components/InspectorPanelLayout.d.ts +1 -1
- package/dist/components/InspectorPanelLayout.js +1 -1
- package/dist/components/InspectorSequenceSection.js +40 -54
- package/dist/components/InstallPackage.d.ts +3 -2
- package/dist/components/InstallPackage.js +90 -28
- package/dist/components/InstallablePackage.js +37 -11
- package/dist/components/KeyboardShortcutsSettings.d.ts +2 -0
- package/dist/components/KeyboardShortcutsSettings.js +177 -0
- package/dist/components/Menu/MenuDivider.js +1 -1
- package/dist/components/MenuBuildIndicator.js +1 -1
- package/dist/components/Modals.js +12 -4
- package/dist/components/NewComposition/CodemodFooter.d.ts +0 -1
- package/dist/components/NewComposition/CodemodFooter.js +2 -8
- package/dist/components/NewComposition/DeleteComposition.js +1 -1
- package/dist/components/NewComposition/DeleteFolder.js +1 -1
- package/dist/components/NewComposition/DuplicateComposition.js +1 -1
- package/dist/components/NewComposition/InputDragger.js +27 -4
- package/dist/components/NewComposition/NewComposition.js +1 -1
- package/dist/components/NewComposition/NewFolder.js +1 -3
- package/dist/components/NewComposition/RenameComposition.js +1 -1
- package/dist/components/NewComposition/RenameFolder.js +1 -1
- package/dist/components/NewComposition/use-rename-static-file.js +1 -1
- package/dist/components/Notifications/NotificationCenter.d.ts +1 -0
- package/dist/components/Notifications/NotificationCenter.js +5 -0
- package/dist/components/OptionsPanel.js +9 -12
- package/dist/components/PreviewToolbar.js +5 -2
- package/dist/components/PreviewToolbarOverflowButton.js +30 -0
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +2 -2
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +14 -30
- package/dist/components/RenderButton.js +66 -183
- package/dist/components/RenderModal/DataEditor.js +15 -12
- package/dist/components/RenderModal/GuiRenderStatus.js +3 -1
- package/dist/components/RenderModal/RenderModalOutputName.js +3 -3
- package/dist/components/RenderModal/RenderStatusModal.js +0 -1
- package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +3 -1
- package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.d.ts +15 -0
- package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.js +95 -0
- package/dist/components/RenderModal/WebRenderModal.js +4 -2
- package/dist/components/RenderQueue/RenderQueueItem.js +3 -1
- package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +3 -1
- package/dist/components/RenderQueue/RenderQueueRemoveItem.js +2 -7
- package/dist/components/RenderingSettings.js +7 -4
- package/dist/components/RulersAndGuidesToggle.d.ts +2 -0
- package/dist/components/RulersAndGuidesToggle.js +23 -0
- package/dist/components/SegmentedButton.d.ts +29 -0
- package/dist/components/SegmentedButton.js +226 -0
- package/dist/components/SelectedOutlineCanvasRotation.d.ts +1 -0
- package/dist/components/SelectedOutlineCanvasRotation.js +11 -4
- package/dist/components/SelectedOutlineEditingHandles.d.ts +16 -0
- package/dist/components/SelectedOutlineEditingHandles.js +66 -0
- package/dist/components/SelectedOutlineElement.d.ts +2 -4
- package/dist/components/SelectedOutlineElement.js +15 -54
- package/dist/components/SelectedOutlineOverlay.js +32 -6
- package/dist/components/SelectedOutlinePolygon.d.ts +4 -4
- package/dist/components/SelectedOutlinePolygon.js +20 -17
- package/dist/components/SelectedOutlineRenderer.js +66 -14
- package/dist/components/SettingsModal.d.ts +1 -1
- package/dist/components/SettingsModal.js +30 -7
- package/dist/components/SettingsModalFooter.js +2 -1
- package/dist/components/SkillsSettings.d.ts +2 -0
- package/dist/components/SkillsSettings.js +129 -0
- package/dist/components/StaticFilePreview.js +7 -1
- package/dist/components/StudioSettings.js +7 -48
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/Timeline/Timeline.js +0 -1
- package/dist/components/Timeline/TimelineAssetField.d.ts +1 -1
- package/dist/components/Timeline/TimelineAssetField.js +15 -9
- package/dist/components/Timeline/TimelineBooleanField.js +1 -4
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +13 -12
- package/dist/components/Timeline/TimelineEffectItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectItem.js +45 -15
- package/dist/components/Timeline/TimelineEffectPropItem.js +21 -4
- package/dist/components/Timeline/TimelineExpandArrowButton.js +10 -7
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +4 -1
- package/dist/components/Timeline/TimelineExpandedRow.js +5 -4
- package/dist/components/Timeline/TimelineExpandedSection.js +8 -5
- package/dist/components/Timeline/TimelineFieldLabel.js +4 -2
- package/dist/components/Timeline/TimelineFieldRowContent.d.ts +1 -2
- package/dist/components/Timeline/TimelineFieldRowContent.js +8 -21
- package/dist/components/Timeline/TimelineImageInfo.d.ts +0 -1
- package/dist/components/Timeline/TimelineImageInfo.js +13 -32
- package/dist/components/Timeline/TimelineKeyframeControls.js +10 -4
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
- package/dist/components/Timeline/TimelineRotationField.js +0 -2
- package/dist/components/Timeline/TimelineRowChrome.d.ts +1 -1
- package/dist/components/Timeline/TimelineRowChrome.js +41 -6
- package/dist/components/Timeline/TimelineRowLayoutContext.d.ts +0 -1
- package/dist/components/Timeline/TimelineRowLayoutContext.js +1 -4
- package/dist/components/Timeline/TimelineScaleField.js +2 -6
- package/dist/components/Timeline/TimelineSchemaField.js +9 -3
- package/dist/components/Timeline/TimelineSelection.d.ts +8 -3
- package/dist/components/Timeline/TimelineSelection.js +7 -5
- package/dist/components/Timeline/TimelineSequence.d.ts +2 -0
- package/dist/components/Timeline/TimelineSequence.js +110 -19
- package/dist/components/Timeline/TimelineSequenceItem.js +11 -8
- package/dist/components/Timeline/TimelineSequenceName.js +1 -1
- package/dist/components/Timeline/TimelineSequencePropItem.js +15 -2
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +4 -2
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +85 -91
- package/dist/components/Timeline/TimelineTrack.js +5 -2
- package/dist/components/Timeline/TimelineTransformOriginField.js +0 -4
- package/dist/components/Timeline/TimelineTranslateField.js +0 -4
- package/dist/components/Timeline/TimelineVideoInfo.js +4 -2
- package/dist/components/Timeline/TimelineVirtualization.js +3 -1
- package/dist/components/Timeline/delete-selected-timeline-item.js +6 -2
- package/dist/components/Timeline/duplicate-selected-timeline-item.js +7 -14
- package/dist/components/Timeline/get-copy-context-for-agents-menu-item.d.ts +4 -0
- package/dist/components/Timeline/get-copy-context-for-agents-menu-item.js +26 -0
- package/dist/components/Timeline/get-sequence-context-menu-items.js +2 -19
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.d.ts +6 -1
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.js +11 -4
- package/dist/components/Timeline/save-effect-prop.js +3 -3
- package/dist/components/Timeline/split-selected-timeline-item.js +0 -1
- package/dist/components/Timeline/timeline-field-row-layout.d.ts +1 -1
- package/dist/components/Timeline/timeline-field-row-layout.js +4 -7
- package/dist/components/Timeline/timeline-field-utils.js +0 -2
- package/dist/components/Timeline/use-timeline-asset-drop.js +1 -0
- package/dist/components/TimelineCombobox.js +25 -160
- package/dist/components/TimelineInOutToggle.js +4 -1
- package/dist/components/duplicate-jsx-node-api.d.ts +2 -0
- package/dist/components/duplicate-jsx-node-api.js +12 -0
- package/dist/components/effect-drag-and-drop.js +7 -7
- package/dist/components/effect-operations-api.d.ts +8 -0
- package/dist/components/effect-operations-api.js +52 -0
- package/dist/components/handle-drop.d.ts +2 -1
- package/dist/components/handle-drop.js +3 -3
- package/dist/components/import-assets.js +9 -65
- package/dist/components/keyboard-shortcuts.d.ts +10 -0
- package/dist/components/keyboard-shortcuts.js +135 -0
- package/dist/components/selected-outline-control-layout.js +2 -6
- package/dist/components/selected-outline-measurement.d.ts +1 -1
- package/dist/components/selected-outline-measurement.js +16 -3
- package/dist/components/use-delete-asset.d.ts +1 -0
- package/dist/components/use-delete-asset.js +40 -0
- package/dist/components/use-selected-outline-control-target.d.ts +11 -0
- package/dist/components/use-selected-outline-control-target.js +79 -0
- package/dist/error-overlay/remotion-overlay/log-studio-error.js +4 -0
- package/dist/esm/{chunk-r46yxrjr.js → chunk-4bxz1d3g.js} +4 -3
- package/dist/esm/{chunk-xn2q7eem.js → chunk-w4244j4n.js} +14747 -14549
- package/dist/esm/index.mjs +3 -0
- package/dist/esm/internals.mjs +14747 -14549
- package/dist/esm/previewEntry.mjs +14557 -14359
- package/dist/esm/renderEntry.mjs +2 -2
- package/dist/helpers/add-asset-cache-bust.d.ts +4 -0
- package/dist/helpers/add-asset-cache-bust.js +10 -0
- package/dist/helpers/browser-studio-operations.d.ts +3 -0
- package/dist/helpers/browser-studio-operations.js +18 -1
- package/dist/helpers/calculate-timeline.js +2 -1
- package/dist/helpers/colors.d.ts +3 -1
- package/dist/helpers/colors.js +7 -3
- package/dist/helpers/drag-aware-double-click.d.ts +6 -0
- package/dist/helpers/drag-aware-double-click.js +20 -0
- package/dist/helpers/get-asset-metadata.js +25 -16
- package/dist/helpers/get-sequence-double-click-action.d.ts +2 -1
- package/dist/helpers/get-sequence-double-click-action.js +7 -1
- package/dist/helpers/get-timeline-sequence-layout.d.ts +4 -1
- package/dist/helpers/get-timeline-sequence-layout.js +15 -6
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +2 -1
- package/dist/helpers/hoverable.d.ts +1 -0
- package/dist/helpers/hoverable.js +2 -1
- package/dist/helpers/inject-css.js +7 -3
- package/dist/helpers/open-in-remotion-convert.d.ts +7 -0
- package/dist/helpers/open-in-remotion-convert.js +18 -0
- package/dist/helpers/use-max-media-duration.js +5 -3
- package/dist/helpers/use-media-metadata.d.ts +2 -1
- package/dist/helpers/use-media-metadata.js +49 -25
- package/dist/helpers/use-menu-structure.js +54 -67
- package/dist/icons/align-center-horizontal.js +1 -1
- package/dist/icons/align-left.js +1 -1
- package/dist/icons/align-right.js +1 -1
- package/dist/icons/cloud-download.d.ts +4 -0
- package/dist/icons/cloud-download.js +8 -0
- package/dist/icons/keyboard.d.ts +4 -0
- package/dist/icons/keyboard.js +10 -0
- package/dist/icons/license.d.ts +4 -0
- package/dist/icons/license.js +8 -0
- package/dist/icons/package.d.ts +4 -0
- package/dist/icons/package.js +8 -0
- package/dist/icons/react.js +1 -1
- package/dist/icons/remotion-convert.d.ts +4 -0
- package/dist/icons/remotion-convert.js +10 -0
- package/dist/icons/skills.d.ts +4 -0
- package/dist/icons/skills.js +10 -0
- package/dist/state/modals.d.ts +2 -5
- package/package.json +12 -12
- package/dist/components/KeyboardShortcutsExplainer.d.ts +0 -2
- package/dist/components/KeyboardShortcutsExplainer.js +0 -194
|
@@ -5,13 +5,16 @@ 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");
|
|
10
|
+
const format_file_location_1 = require("../../helpers/format-file-location");
|
|
9
11
|
const open_in_editor_1 = require("../../helpers/open-in-editor");
|
|
10
12
|
const use_runtime_values_1 = require("../../helpers/use-runtime-values");
|
|
11
|
-
const call_api_1 = require("../call-api");
|
|
12
13
|
const ContextMenu_1 = require("../ContextMenu");
|
|
14
|
+
const effect_operations_api_1 = require("../effect-operations-api");
|
|
13
15
|
const use_default_editor_info_1 = require("../use-default-editor-info");
|
|
14
16
|
const call_add_keyframe_1 = require("./call-add-keyframe");
|
|
17
|
+
const get_copy_context_for_agents_menu_item_1 = require("./get-copy-context-for-agents-menu-item");
|
|
15
18
|
const get_timeline_keyframes_1 = require("./get-timeline-keyframes");
|
|
16
19
|
const save_effect_prop_1 = require("./save-effect-prop");
|
|
17
20
|
const save_prop_queue_1 = require("./save-prop-queue");
|
|
@@ -128,7 +131,7 @@ const TimelineEffectPropValue = ({ field, nodePath, validatedLocation, sourceFra
|
|
|
128
131
|
value,
|
|
129
132
|
schema: field.effectSchema,
|
|
130
133
|
}),
|
|
131
|
-
apiCall: () => (0,
|
|
134
|
+
apiCall: () => (0, effect_operations_api_1.saveEffectProps)({
|
|
132
135
|
type: 'value',
|
|
133
136
|
fileName: validatedLocation.source,
|
|
134
137
|
sequenceNodePath: nodePath,
|
|
@@ -182,6 +185,9 @@ const TimelineEffectPropValue = ({ field, nodePath, validatedLocation, sourceFra
|
|
|
182
185
|
if (field.fieldSchema.type === 'scale') {
|
|
183
186
|
throw new Error(`Effects do not support scale fields: ${field.key}`);
|
|
184
187
|
}
|
|
188
|
+
if (!(0, browser_studio_operations_1.canUseEffectOperations)()) {
|
|
189
|
+
return jsx_runtime_1.jsx(TimelineSchemaField_1.UnsupportedStatus, { label: "read only", formattedValue: false });
|
|
190
|
+
}
|
|
185
191
|
if (effectStatus.type === 'cannot-update-effect') {
|
|
186
192
|
if (effectStatus.reason === 'computed') {
|
|
187
193
|
return (jsx_runtime_1.jsx(TimelineComputedEffectPropValue, { propStatus: { status: 'computed' }, field: field, runtimeValueStore: runtimeValueStore, validatedLocation: validatedLocation }));
|
|
@@ -319,6 +325,17 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
319
325
|
selection.onSelect({ shiftKey: false, toggleKey: false });
|
|
320
326
|
}
|
|
321
327
|
return [
|
|
328
|
+
(0, get_copy_context_for_agents_menu_item_1.getCopyContextForAgentsMenuItem)({
|
|
329
|
+
contextForAgents: (0, format_file_location_1.formatContextForAgents)({
|
|
330
|
+
location: validatedLocation,
|
|
331
|
+
name: `Effect property "${field.key}"`,
|
|
332
|
+
root: window.remotion_cwd,
|
|
333
|
+
}),
|
|
334
|
+
}),
|
|
335
|
+
{
|
|
336
|
+
type: 'divider',
|
|
337
|
+
id: 'copy-context-for-agents-divider',
|
|
338
|
+
},
|
|
322
339
|
{
|
|
323
340
|
type: 'item',
|
|
324
341
|
id: 'reset-effect-field',
|
|
@@ -332,7 +349,7 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
332
349
|
value: 'reset-effect-field',
|
|
333
350
|
},
|
|
334
351
|
];
|
|
335
|
-
}, [canShowReset, onReset, selection]);
|
|
352
|
+
}, [canShowReset, field.key, onReset, selection, validatedLocation]);
|
|
336
353
|
const onPropertyDoubleClick = (0, react_1.useCallback)((event) => {
|
|
337
354
|
if (!canOpenInEditor || !defaultEditorId) {
|
|
338
355
|
return;
|
|
@@ -344,7 +361,7 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
344
361
|
property: field.key,
|
|
345
362
|
}).catch(() => undefined);
|
|
346
363
|
}, [canOpenInEditor, defaultEditorId, field.key, validatedLocation]);
|
|
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,
|
|
364
|
+
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, outerHeight: null, children: jsx_runtime_1.jsx(TimelineFieldRowContent_1.TimelineFieldRowContent, { field: field, rowDepth: rowDepth, selected: selection.selected, children: jsx_runtime_1.jsx(TimelineEffectPropValueAtCurrentFrame, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, keyframeDisplayOffset: resolvedKeyframeDisplayOffset, runtimeValueStore: runtimeValueStore }) }) }));
|
|
348
365
|
return jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: row });
|
|
349
366
|
};
|
|
350
367
|
exports.TimelineEffectPropItem = TimelineEffectPropItem;
|
|
@@ -37,11 +37,11 @@ exports.TimelineExpandArrowSpacer = exports.TimelineExpandArrowButton = void 0;
|
|
|
37
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
38
|
const react_1 = __importStar(require("react"));
|
|
39
39
|
const colors_1 = require("../../helpers/colors");
|
|
40
|
+
const hoverable_1 = require("../../helpers/hoverable");
|
|
41
|
+
const caret_1 = require("../../icons/caret");
|
|
40
42
|
const arrowButton = {
|
|
41
43
|
background: 'none',
|
|
42
44
|
border: 'none',
|
|
43
|
-
color: colors_1.WHITE,
|
|
44
|
-
cursor: 'pointer',
|
|
45
45
|
padding: 0,
|
|
46
46
|
display: 'flex',
|
|
47
47
|
alignItems: 'center',
|
|
@@ -57,9 +57,7 @@ const arrowButton = {
|
|
|
57
57
|
};
|
|
58
58
|
const arrowSpacer = {
|
|
59
59
|
...arrowButton,
|
|
60
|
-
cursor: 'default',
|
|
61
60
|
};
|
|
62
|
-
const svgStyle = { display: 'block' };
|
|
63
61
|
const TimelineExpandArrowButton = ({ isExpanded, onClick, label, disabled = false }) => {
|
|
64
62
|
const handleClick = react_1.default.useCallback((e) => {
|
|
65
63
|
e.stopPropagation();
|
|
@@ -71,12 +69,17 @@ const TimelineExpandArrowButton = ({ isExpanded, onClick, label, disabled = fals
|
|
|
71
69
|
const style = (0, react_1.useMemo)(() => {
|
|
72
70
|
return {
|
|
73
71
|
...arrowButton,
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
...(0, hoverable_1.hoverableStyle)({
|
|
73
|
+
idleBackground: colors_1.TRANSPARENT,
|
|
74
|
+
hoverBackground: colors_1.TRANSPARENT,
|
|
75
|
+
idleColor: colors_1.LIGHT_GRAY,
|
|
76
|
+
hoverColor: disabled ? colors_1.LIGHT_GRAY : colors_1.WHITE,
|
|
77
|
+
}),
|
|
78
|
+
transform: isExpanded ? 'rotate(0deg)' : 'rotate(-90deg)',
|
|
76
79
|
opacity: disabled ? 0.5 : 1,
|
|
77
80
|
};
|
|
78
81
|
}, [isExpanded, disabled]);
|
|
79
|
-
return (jsx_runtime_1.jsx("button", { type: "button", style: style, onClick: handleClick, onDoubleClick: stopPropagation, onPointerDown: stopPropagation, disabled: disabled, "aria-expanded": isExpanded, "aria-label": `${isExpanded ? 'Collapse' : 'Expand'} ${label}`, children: jsx_runtime_1.jsx(
|
|
82
|
+
return (jsx_runtime_1.jsx("button", { type: "button", className: `${hoverable_1.HOVERABLE_CLASS_NAME} __remotion-timeline-expand-arrow-button`, style: style, onClick: handleClick, onDoubleClick: stopPropagation, onPointerDown: stopPropagation, disabled: disabled, "aria-expanded": isExpanded, "aria-label": `${isExpanded ? 'Collapse' : 'Expand'} ${label}`, children: jsx_runtime_1.jsx(caret_1.CaretDown, {}) }));
|
|
80
83
|
};
|
|
81
84
|
exports.TimelineExpandArrowButton = TimelineExpandArrowButton;
|
|
82
85
|
const TimelineExpandArrowSpacer = () => {
|
|
@@ -59,7 +59,10 @@ const rowSeparator = {
|
|
|
59
59
|
};
|
|
60
60
|
const TimelineExpandedKeyframeRowUnmemoized = ({ height, keyframes, canEditEasing, nodePathInfo, showSeparator }) => {
|
|
61
61
|
const timelineWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
|
|
62
|
-
const rowHighlightBackground = (0, TimelineSelection_1.useTimelineRowHighlightBackground)(nodePathInfo
|
|
62
|
+
const rowHighlightBackground = (0, TimelineSelection_1.useTimelineRowHighlightBackground)(nodePathInfo, {
|
|
63
|
+
hovered: false,
|
|
64
|
+
selectedBackground: TimelineSelection_1.TIMELINE_EXPANDED_SELECTED_BACKGROUND,
|
|
65
|
+
});
|
|
63
66
|
const easingSegments = canEditEasing
|
|
64
67
|
? (0, get_timeline_easing_segments_1.getTimelineEasingSegments)(keyframes)
|
|
65
68
|
: [];
|
|
@@ -23,6 +23,7 @@ const rowLabel = {
|
|
|
23
23
|
};
|
|
24
24
|
const TimelineExpandedRowInner = ({ node, depth, nestedDepth, rowDepthBase, getIsExpanded, toggleTrack, validatedLocation, nodePath, schema, keyframeDisplayOffset, keyframeControlsMode, }) => {
|
|
25
25
|
const rowDepth = (rowDepthBase !== null && rowDepthBase !== void 0 ? rowDepthBase : (0, timeline_row_layout_1.getExpandedRowDepth)({ nestedDepth, treeDepth: 0 })) + depth;
|
|
26
|
+
const isInspector = keyframeControlsMode === 'inspector';
|
|
26
27
|
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(node.nodePathInfo);
|
|
27
28
|
const labelStyle = react_1.default.useMemo(() => ({
|
|
28
29
|
...rowLabel,
|
|
@@ -39,17 +40,17 @@ const TimelineExpandedRowInner = ({ node, depth, nestedDepth, rowDepthBase, getI
|
|
|
39
40
|
if (node.effectInfo) {
|
|
40
41
|
return (
|
|
41
42
|
// A single effect
|
|
42
|
-
jsx_runtime_1.jsx(TimelineEffectItem_1.TimelineEffectItem, { label: node.label, nodePathInfo: node.nodePathInfo, effectIndex: node.effectInfo.effectIndex, effectSchema: node.effectInfo.effectSchema, documentationLink: node.effectInfo.documentationLink, nodePath: nodePath, validatedLocation: validatedLocation, rowDepth: rowDepth, getIsExpanded: getIsExpanded, toggleTrack: toggleTrack }));
|
|
43
|
+
jsx_runtime_1.jsx(TimelineEffectItem_1.TimelineEffectItem, { label: node.label, nodePathInfo: node.nodePathInfo, effectIndex: node.effectInfo.effectIndex, effectSchema: node.effectInfo.effectSchema, documentationLink: node.effectInfo.documentationLink, nodePath: nodePath, validatedLocation: validatedLocation, rowDepth: rowDepth, labelNextToToggle: isInspector, getIsExpanded: getIsExpanded, toggleTrack: toggleTrack }));
|
|
43
44
|
}
|
|
44
45
|
// Group like "Effects"
|
|
45
46
|
const isExpanded = getIsExpanded(node.nodePathInfo);
|
|
46
47
|
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
48
|
height: timeline_layout_1.TREE_GROUP_ROW_HEIGHT,
|
|
48
|
-
}, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false,
|
|
49
|
+
}, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx("span", { style: labelStyle, children: node.label }) }));
|
|
49
50
|
}
|
|
50
51
|
if (node.field) {
|
|
51
52
|
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, runtimeValueStore: node.runtimeValueStore }));
|
|
53
|
+
return (jsx_runtime_1.jsx(TimelineEffectPropItem_1.TimelineEffectPropItem, { field: node.field, validatedLocation: validatedLocation, rowDepth: isInspector ? rowDepth - 1 : rowDepth, nodePath: nodePath, nodePathInfo: node.nodePathInfo, keyframeDisplayOffset: keyframeDisplayOffset, keyframeControlsMode: keyframeControlsMode, runtimeValueStore: node.runtimeValueStore }));
|
|
53
54
|
}
|
|
54
55
|
if (node.field.kind === 'sequence-field') {
|
|
55
56
|
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 }));
|
|
@@ -58,6 +59,6 @@ const TimelineExpandedRowInner = ({ node, depth, nestedDepth, rowDepthBase, getI
|
|
|
58
59
|
}
|
|
59
60
|
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
61
|
height: (0, timeline_layout_1.getTreeRowHeight)(node),
|
|
61
|
-
}, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false,
|
|
62
|
+
}, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx("span", { style: labelStyle, children: node.label }) }));
|
|
62
63
|
};
|
|
63
64
|
exports.TimelineExpandedRow = react_1.default.memo(TimelineExpandedRowInner);
|
|
@@ -39,8 +39,11 @@ const react_1 = __importStar(require("react"));
|
|
|
39
39
|
const colors_1 = require("../../helpers/colors");
|
|
40
40
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
41
41
|
const TimelineExpandedRow_1 = require("./TimelineExpandedRow");
|
|
42
|
+
const TimelineRowChrome_1 = require("./TimelineRowChrome");
|
|
43
|
+
const TimelineSelection_1 = require("./TimelineSelection");
|
|
42
44
|
const use_timeline_expanded_tree_1 = require("./use-timeline-expanded-tree");
|
|
43
45
|
const expandedSectionBase = {
|
|
46
|
+
backgroundColor: TimelineSelection_1.TIMELINE_BACKGROUND,
|
|
44
47
|
color: colors_1.WHITE,
|
|
45
48
|
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
46
49
|
fontSize: 12,
|
|
@@ -68,16 +71,16 @@ const TimelineExpandedSection = ({ sequence, validatedLocation, nodePathInfo, ne
|
|
|
68
71
|
const style = (0, react_1.useMemo)(() => {
|
|
69
72
|
return {
|
|
70
73
|
...expandedSectionBase,
|
|
71
|
-
height: expandedHeight,
|
|
74
|
+
height: expandedHeight + timeline_layout_1.TIMELINE_ITEM_BORDER_BOTTOM,
|
|
72
75
|
};
|
|
73
76
|
}, [expandedHeight]);
|
|
74
77
|
const { schema } = sequence.controls;
|
|
75
78
|
if (flat.length === 0) {
|
|
76
79
|
return null;
|
|
77
80
|
}
|
|
78
|
-
return (jsx_runtime_1.jsx("div", { style: style, children: flat.map(({ node, depth }, i) => {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
return (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowSelectedBackgroundContext.Provider, { value: TimelineSelection_1.TIMELINE_EXPANDED_SELECTED_BACKGROUND, children: jsx_runtime_1.jsx("div", { style: style, children: flat.map(({ node, depth }, i) => {
|
|
82
|
+
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" })
|
|
83
|
+
] }, JSON.stringify(node.nodePathInfo)));
|
|
84
|
+
}) }) }));
|
|
82
85
|
};
|
|
83
86
|
exports.TimelineExpandedSection = TimelineExpandedSection;
|
|
@@ -4,12 +4,12 @@ exports.TimelineFieldLabel = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../../helpers/colors");
|
|
7
|
-
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
8
7
|
const timeline_field_row_layout_1 = require("./timeline-field-row-layout");
|
|
9
8
|
const TimelineRowLayoutContext_1 = require("./TimelineRowLayoutContext");
|
|
10
9
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
11
10
|
const fieldNameBase = {
|
|
12
11
|
fontSize: 12,
|
|
12
|
+
lineHeight: `${timeline_field_row_layout_1.TIMELINE_STACKED_FIELD_HEADER_HEIGHT}px`,
|
|
13
13
|
color: colors_1.WHITE_ALPHA_80,
|
|
14
14
|
userSelect: 'none',
|
|
15
15
|
whiteSpace: 'nowrap',
|
|
@@ -23,7 +23,9 @@ const TimelineFieldLabel = ({ rowDepth, selected, label, stacked = false }) => {
|
|
|
23
23
|
const labelRowStyle = (0, react_1.useMemo)(() => ({
|
|
24
24
|
...(0, timeline_field_row_layout_1.getTimelineFieldLabelRowStyle)(rowDepth, basePadding),
|
|
25
25
|
...(0, TimelineSelection_1.getTimelineSelectedLabelStyle)(selected && highlightSelectedLabel, true),
|
|
26
|
-
...(stacked
|
|
26
|
+
...(stacked
|
|
27
|
+
? { flex: `0 0 ${timeline_field_row_layout_1.TIMELINE_STACKED_FIELD_HEADER_HEIGHT}px` }
|
|
28
|
+
: null),
|
|
27
29
|
alignSelf: 'stretch',
|
|
28
30
|
}), [basePadding, highlightSelectedLabel, rowDepth, selected, stacked]);
|
|
29
31
|
const fieldNameStyle = (0, react_1.useMemo)(() => ({
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { SchemaFieldInfo } from '../../helpers/timeline-layout';
|
|
3
3
|
export declare const TimelineFieldRowContent: React.FC<{
|
|
4
4
|
readonly field: SchemaFieldInfo;
|
|
5
5
|
readonly rowDepth: number;
|
|
6
6
|
readonly selected: boolean;
|
|
7
|
-
readonly keyframeControls: React.ReactNode;
|
|
8
7
|
readonly children: React.ReactNode;
|
|
9
8
|
}>;
|
|
@@ -3,36 +3,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TimelineFieldRowContent = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
7
6
|
const timeline_field_row_layout_1 = require("./timeline-field-row-layout");
|
|
8
7
|
const TimelineFieldLabel_1 = require("./TimelineFieldLabel");
|
|
9
|
-
const
|
|
10
|
-
const TimelineRowLayoutContext_1 = require("./TimelineRowLayoutContext");
|
|
8
|
+
const TimelineSelection_1 = require("./TimelineSelection");
|
|
11
9
|
const Transform3DModeContext_1 = require("./Transform3DModeContext");
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
minWidth: 0,
|
|
10
|
+
const stackedValueStyle = {
|
|
11
|
+
...timeline_field_row_layout_1.timelineFieldValueColumnStyle,
|
|
12
|
+
paddingLeft: TimelineSelection_1.TIMELINE_SELECTED_LABEL_HORIZONTAL_PADDING,
|
|
16
13
|
};
|
|
17
|
-
const
|
|
18
|
-
flex: 1,
|
|
19
|
-
minWidth: 0,
|
|
20
|
-
};
|
|
21
|
-
const TimelineFieldRowContent = ({ field, rowDepth, selected, keyframeControls, children }) => {
|
|
14
|
+
const TimelineFieldRowContent = ({ field, rowDepth, selected, children }) => {
|
|
22
15
|
var _a;
|
|
23
16
|
const transform3DMode = (0, react_1.useContext)(Transform3DModeContext_1.Transform3DModeContext);
|
|
24
|
-
const { keyframeControlsPlacement } = (0, react_1.useContext)(TimelineRowLayoutContext_1.TimelineRowLayoutContext);
|
|
25
17
|
const stacked = (0, timeline_field_row_layout_1.isTimelineFieldStacked)({ field, transform3DMode });
|
|
26
|
-
const compactStacked = stacked && field.typeName !== 'text-content';
|
|
27
18
|
const label = (jsx_runtime_1.jsx(TimelineFieldLabel_1.TimelineFieldLabel, { rowDepth: rowDepth, selected: selected, label: (_a = field.description) !== null && _a !== void 0 ? _a : field.key, stacked: stacked }));
|
|
28
|
-
const value = (jsx_runtime_1.jsx("div", { style:
|
|
29
|
-
? timeline_field_row_layout_1.timelineCompactStackedFieldValueColumnStyle
|
|
30
|
-
: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: children }));
|
|
31
|
-
const controls = keyframeControlsPlacement === 'after-label' ? (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowKeyframeControlsColumn, { depth: rowDepth, children: keyframeControls })) : null;
|
|
19
|
+
const value = (jsx_runtime_1.jsx("div", { style: stacked ? stackedValueStyle : timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: children }));
|
|
32
20
|
if (stacked) {
|
|
33
|
-
return (jsx_runtime_1.jsxs("div", { style: timeline_field_row_layout_1.timelineStackedFieldContentStyle, children: [
|
|
34
|
-
jsx_runtime_1.jsx("div", { style: stackedLabelStyle, children: label }), controls] })) : (label), value] }));
|
|
21
|
+
return (jsx_runtime_1.jsxs("div", { style: timeline_field_row_layout_1.timelineStackedFieldContentStyle, children: [label, value] }));
|
|
35
22
|
}
|
|
36
|
-
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [label,
|
|
23
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [label, value] }));
|
|
37
24
|
};
|
|
38
25
|
exports.TimelineFieldRowContent = TimelineFieldRowContent;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TimelineImageInfo = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const timeline_utils_1 = require("@remotion/timeline-utils");
|
|
6
5
|
const react_1 = require("react");
|
|
7
6
|
const colors_1 = require("../../helpers/colors");
|
|
8
7
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
@@ -14,38 +13,20 @@ const containerStyle = {
|
|
|
14
13
|
display: 'flex',
|
|
15
14
|
borderTopLeftRadius: 2,
|
|
16
15
|
borderBottomLeftRadius: 2,
|
|
16
|
+
backgroundRepeat: 'repeat-x',
|
|
17
|
+
backgroundSize: 'auto 100%',
|
|
18
|
+
backgroundPositionY: 0,
|
|
17
19
|
};
|
|
18
|
-
const TimelineImageInfo = ({ src,
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
canvas.width = visualizationWidth * window.devicePixelRatio;
|
|
27
|
-
canvas.height = HEIGHT * window.devicePixelRatio;
|
|
28
|
-
canvas.style.width = visualizationWidth + 'px';
|
|
29
|
-
canvas.style.height = HEIGHT + 'px';
|
|
30
|
-
const ctx = canvas.getContext('2d');
|
|
31
|
-
if (!ctx) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
current.appendChild(canvas);
|
|
35
|
-
const img = new Image();
|
|
36
|
-
img.crossOrigin = 'anonymous';
|
|
37
|
-
img.onload = () => {
|
|
38
|
-
(0, timeline_utils_1.drawRepeatingImageThumbnail)({
|
|
39
|
-
canvas,
|
|
40
|
-
image: img,
|
|
41
|
-
offsetInPixels: offsetInPixels * window.devicePixelRatio,
|
|
42
|
-
});
|
|
20
|
+
const TimelineImageInfo = ({ src, offsetInPixels }) => {
|
|
21
|
+
const style = (0, react_1.useMemo)(() => {
|
|
22
|
+
return {
|
|
23
|
+
...containerStyle,
|
|
24
|
+
// This is Studio UI, not a Remotion composition that needs to wait for
|
|
25
|
+
// background images before rendering.
|
|
26
|
+
backgroundImage: `url(${JSON.stringify(src)})`,
|
|
27
|
+
backgroundPositionX: -offsetInPixels,
|
|
43
28
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
current.removeChild(canvas);
|
|
47
|
-
};
|
|
48
|
-
}, [offsetInPixels, src, visualizationWidth]);
|
|
49
|
-
return jsx_runtime_1.jsx("div", { ref: ref, style: containerStyle });
|
|
29
|
+
}, [offsetInPixels, src]);
|
|
30
|
+
return jsx_runtime_1.jsx("div", { style: style });
|
|
50
31
|
};
|
|
51
32
|
exports.TimelineImageInfo = TimelineImageInfo;
|
|
@@ -15,6 +15,7 @@ const call_delete_keyframe_1 = require("./call-delete-keyframe");
|
|
|
15
15
|
const get_easing_selection_after_keyframe_delete_1 = require("./get-easing-selection-after-keyframe-delete");
|
|
16
16
|
const get_keyframe_navigation_1 = require("./get-keyframe-navigation");
|
|
17
17
|
const get_timeline_keyframes_1 = require("./get-timeline-keyframes");
|
|
18
|
+
const timeline_scroll_logic_1 = require("./timeline-scroll-logic");
|
|
18
19
|
const TimelineKeyframeDiamondIcon_1 = require("./TimelineKeyframeDiamondIcon");
|
|
19
20
|
const TimelineKeyframeTracksContext_1 = require("./TimelineKeyframeTracksContext");
|
|
20
21
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
@@ -405,23 +406,28 @@ const TimelineKeyframeControls = ({ fieldKey, propStatus, nodePath, fileName, ke
|
|
|
405
406
|
timelinePosition,
|
|
406
407
|
tracks,
|
|
407
408
|
]);
|
|
408
|
-
const seekToDisplayFrame = (0, react_1.useCallback)((frame) => {
|
|
409
|
+
const seekToDisplayFrame = (0, react_1.useCallback)((frame, direction) => {
|
|
409
410
|
setFrame((current) => {
|
|
410
411
|
const next = { ...current, [videoConfig.id]: frame };
|
|
411
412
|
remotion_1.Internals.persistCurrentFrame(next);
|
|
412
413
|
return next;
|
|
413
414
|
});
|
|
414
|
-
|
|
415
|
+
(0, timeline_scroll_logic_1.ensureFrameIsInViewport)({
|
|
416
|
+
direction,
|
|
417
|
+
durationInFrames: videoConfig.durationInFrames,
|
|
418
|
+
frame,
|
|
419
|
+
});
|
|
420
|
+
}, [setFrame, videoConfig.durationInFrames, videoConfig.id]);
|
|
415
421
|
const onPrevious = (0, react_1.useCallback)((e) => {
|
|
416
422
|
e.stopPropagation();
|
|
417
423
|
if (previousDisplayFrame !== null) {
|
|
418
|
-
seekToDisplayFrame(previousDisplayFrame);
|
|
424
|
+
seekToDisplayFrame(previousDisplayFrame, 'fit-left');
|
|
419
425
|
}
|
|
420
426
|
}, [previousDisplayFrame, seekToDisplayFrame]);
|
|
421
427
|
const onNext = (0, react_1.useCallback)((e) => {
|
|
422
428
|
e.stopPropagation();
|
|
423
429
|
if (nextDisplayFrame !== null) {
|
|
424
|
-
seekToDisplayFrame(nextDisplayFrame);
|
|
430
|
+
seekToDisplayFrame(nextDisplayFrame, 'fit-right');
|
|
425
431
|
}
|
|
426
432
|
}, [nextDisplayFrame, seekToDisplayFrame]);
|
|
427
433
|
const onToggleKeyframe = (0, react_1.useCallback)(async (e) => {
|
|
@@ -31,7 +31,7 @@ const isTimelinePrimitiveFieldInfo = (field) => {
|
|
|
31
31
|
exports.isTimelinePrimitiveFieldInfo = isTimelinePrimitiveFieldInfo;
|
|
32
32
|
const TimelinePrimitiveFieldValue = ({ field, onSave, onDragValueChange, onDragEnd, propStatus, effectiveValue, scaleLockNodePath, }) => {
|
|
33
33
|
if (field.typeName === 'number') {
|
|
34
|
-
return (jsx_runtime_1.jsx(
|
|
34
|
+
return (jsx_runtime_1.jsx(TimelineNumberField_1.TimelineNumberField, { effectiveValue: effectiveValue, field: field, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }));
|
|
35
35
|
}
|
|
36
36
|
if (field.typeName === 'rotation-css' ||
|
|
37
37
|
field.typeName === 'rotation-degrees') {
|
|
@@ -14,10 +14,8 @@ const containerStyle = {
|
|
|
14
14
|
gap: 4,
|
|
15
15
|
};
|
|
16
16
|
const compactDraggerStyle = {
|
|
17
|
-
paddingBottom: 2,
|
|
18
17
|
paddingLeft: 2,
|
|
19
18
|
paddingRight: 2,
|
|
20
|
-
paddingTop: 2,
|
|
21
19
|
};
|
|
22
20
|
const ROTATION_LABELS = ['X', 'Y', 'Z'];
|
|
23
21
|
const TimelineRotationField = ({ field, effectiveValue, propStatus, onSave, onDragValueChange, onDragEnd, }) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { TimelineSelectionInteraction } from './TimelineSelection';
|
|
3
|
+
export declare const TimelineRowSelectedBackgroundContext: React.Context<string>;
|
|
3
4
|
export declare const TimelineRowKeyframeControlsColumn: React.FC<{
|
|
4
5
|
readonly children: React.ReactNode;
|
|
5
6
|
readonly depth: number;
|
|
@@ -17,7 +18,6 @@ export declare const TimelineRowChrome: React.FC<{
|
|
|
17
18
|
readonly showSelectedBackground: boolean;
|
|
18
19
|
readonly containsSelection: boolean;
|
|
19
20
|
readonly hovered?: boolean;
|
|
20
|
-
readonly isFieldRow: boolean;
|
|
21
21
|
readonly outerHeight: number | null;
|
|
22
22
|
readonly onDragLeave?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
23
23
|
readonly onDragOver?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
@@ -1,13 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
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
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TimelineRowChrome = exports.TimelineRowKeyframeControlsColumn = void 0;
|
|
36
|
+
exports.TimelineRowChrome = exports.TimelineRowKeyframeControlsColumn = exports.TimelineRowSelectedBackgroundContext = void 0;
|
|
4
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
38
|
+
const react_1 = __importStar(require("react"));
|
|
6
39
|
const colors_1 = require("../../helpers/colors");
|
|
7
40
|
const Padder_1 = require("./Padder");
|
|
8
41
|
const timeline_row_layout_1 = require("./timeline-row-layout");
|
|
9
42
|
const TimelineRowLayoutContext_1 = require("./TimelineRowLayoutContext");
|
|
10
43
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
44
|
+
exports.TimelineRowSelectedBackgroundContext = react_1.default.createContext(TimelineSelection_1.TIMELINE_SELECTED_BACKGROUND);
|
|
11
45
|
const rowBase = {
|
|
12
46
|
alignItems: 'stretch',
|
|
13
47
|
display: 'flex',
|
|
@@ -35,8 +69,9 @@ const TimelineRowKeyframeControlsColumn = ({ children, depth }) => {
|
|
|
35
69
|
return (jsx_runtime_1.jsx("div", { style: leftChromeStyle, children: jsx_runtime_1.jsx("div", { style: style, children: children }) }));
|
|
36
70
|
};
|
|
37
71
|
exports.TimelineRowKeyframeControlsColumn = TimelineRowKeyframeControlsColumn;
|
|
38
|
-
const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, style, selected, selectable, onSelect, showSelectedBackground, containsSelection, hovered = false,
|
|
39
|
-
const { basePadding,
|
|
72
|
+
const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, style, selected, selectable, onSelect, showSelectedBackground, containsSelection, hovered = false, outerHeight, onDragLeave, onDragOver, onDrop, onDoubleClick, onPointerEnter, onPointerLeave, }) => {
|
|
73
|
+
const { basePadding, rowBorderRadius, rowHorizontalMargin } = (0, react_1.useContext)(TimelineRowLayoutContext_1.TimelineRowLayoutContext);
|
|
74
|
+
const selectedBackground = (0, react_1.useContext)(exports.TimelineRowSelectedBackgroundContext);
|
|
40
75
|
const indentWidth = (0, timeline_row_layout_1.getTimelineRowIndentWidth)(depth);
|
|
41
76
|
const chromeColumnStyle = (0, react_1.useMemo)(() => ({
|
|
42
77
|
alignItems: 'center',
|
|
@@ -72,6 +107,7 @@ const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, styl
|
|
|
72
107
|
selected,
|
|
73
108
|
containsSelection,
|
|
74
109
|
hovered,
|
|
110
|
+
selectedBackground,
|
|
75
111
|
});
|
|
76
112
|
const innerRowStyle = (0, react_1.useMemo)(() => ({
|
|
77
113
|
...rowBase,
|
|
@@ -99,8 +135,7 @@ const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, styl
|
|
|
99
135
|
backgroundColor: highlightBackground,
|
|
100
136
|
};
|
|
101
137
|
}, [outerHeight, highlightBackground]);
|
|
102
|
-
const
|
|
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] }));
|
|
138
|
+
const chrome = (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [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] }) })), children] }));
|
|
104
139
|
if (outerStyle) {
|
|
105
140
|
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 }) }));
|
|
106
141
|
}
|
|
@@ -2,7 +2,6 @@ type TimelineRowLayout = {
|
|
|
2
2
|
readonly basePadding: number;
|
|
3
3
|
readonly highlightSelectedLabel: boolean;
|
|
4
4
|
readonly keyframeControlsPadding: number;
|
|
5
|
-
readonly keyframeControlsPlacement: 'before-label' | 'after-label';
|
|
6
5
|
readonly rowBorderRadius: number;
|
|
7
6
|
readonly rowHorizontalMargin: number;
|
|
8
7
|
};
|
|
@@ -2,21 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TimelineRowLayoutContext = exports.INSPECTOR_TIMELINE_ROW_LAYOUT = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
|
|
6
5
|
const timeline_row_layout_1 = require("./timeline-row-layout");
|
|
7
6
|
exports.INSPECTOR_TIMELINE_ROW_LAYOUT = {
|
|
8
7
|
basePadding: timeline_row_layout_1.INSPECTOR_ROW_BASE_PADDING,
|
|
9
8
|
highlightSelectedLabel: false,
|
|
10
9
|
keyframeControlsPadding: 0,
|
|
11
|
-
keyframeControlsPlacement: 'after-label',
|
|
12
10
|
rowBorderRadius: 4,
|
|
13
|
-
rowHorizontalMargin:
|
|
11
|
+
rowHorizontalMargin: 4,
|
|
14
12
|
};
|
|
15
13
|
exports.TimelineRowLayoutContext = (0, react_1.createContext)({
|
|
16
14
|
basePadding: timeline_row_layout_1.TIMELINE_ROW_BASE_PADDING,
|
|
17
15
|
highlightSelectedLabel: true,
|
|
18
16
|
keyframeControlsPadding: timeline_row_layout_1.TIMELINE_ROW_BASE_PADDING,
|
|
19
|
-
keyframeControlsPlacement: 'before-label',
|
|
20
17
|
rowBorderRadius: 0,
|
|
21
18
|
rowHorizontalMargin: 0,
|
|
22
19
|
});
|
|
@@ -12,18 +12,14 @@ const timeline_field_utils_1 = require("./timeline-field-utils");
|
|
|
12
12
|
const TimelineLayerEye_1 = require("./TimelineLayerEye");
|
|
13
13
|
const Transform3DModeContext_1 = require("./Transform3DModeContext");
|
|
14
14
|
const leftDraggerStyle = {
|
|
15
|
-
paddingBottom: 2,
|
|
16
15
|
paddingLeft: 0,
|
|
17
|
-
paddingTop: 2,
|
|
18
16
|
textAlign: 'left',
|
|
19
|
-
width:
|
|
17
|
+
width: 40,
|
|
20
18
|
};
|
|
21
19
|
const rightDraggerStyle = {
|
|
22
|
-
paddingBottom: 2,
|
|
23
20
|
paddingRight: 0,
|
|
24
|
-
paddingTop: 2,
|
|
25
21
|
textAlign: 'left',
|
|
26
|
-
width:
|
|
22
|
+
width: 40,
|
|
27
23
|
};
|
|
28
24
|
const containerStyle = {
|
|
29
25
|
alignItems: 'center',
|
|
@@ -37,6 +37,7 @@ exports.TimelineFieldValue = exports.TimelineNonEditableStatus = exports.Unsuppo
|
|
|
37
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
38
|
const react_1 = __importStar(require("react"));
|
|
39
39
|
const colors_1 = require("../../helpers/colors");
|
|
40
|
+
const hoverable_1 = require("../../helpers/hoverable");
|
|
40
41
|
const modals_1 = require("../../state/modals");
|
|
41
42
|
const SettingsContext_1 = require("../SettingsContext");
|
|
42
43
|
const timeline_field_display_utils_1 = require("./timeline-field-display-utils");
|
|
@@ -62,7 +63,12 @@ const computedValue = {
|
|
|
62
63
|
pointerEvents: 'none',
|
|
63
64
|
};
|
|
64
65
|
const fixLinkBase = {
|
|
65
|
-
|
|
66
|
+
...(0, hoverable_1.hoverableStyle)({
|
|
67
|
+
idleBackground: colors_1.TRANSPARENT,
|
|
68
|
+
hoverBackground: colors_1.TRANSPARENT,
|
|
69
|
+
idleColor: colors_1.LIGHT_TEXT,
|
|
70
|
+
hoverColor: colors_1.WHITE,
|
|
71
|
+
}),
|
|
66
72
|
display: 'inline-block',
|
|
67
73
|
fontSize: 10,
|
|
68
74
|
fontStyle: 'normal',
|
|
@@ -73,7 +79,7 @@ const fixLinkBase = {
|
|
|
73
79
|
appearance: 'none',
|
|
74
80
|
background: 'none',
|
|
75
81
|
border: 'none',
|
|
76
|
-
cursor: '
|
|
82
|
+
cursor: 'default',
|
|
77
83
|
padding: 0,
|
|
78
84
|
};
|
|
79
85
|
const UnsupportedStatus = ({ label, onFix, formattedValue }) => {
|
|
@@ -94,7 +100,7 @@ const UnsupportedStatus = ({ label, onFix, formattedValue }) => {
|
|
|
94
100
|
event.stopPropagation();
|
|
95
101
|
};
|
|
96
102
|
return (jsx_runtime_1.jsxs("span", { style: unsupportedStatusWrapper, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), children: [
|
|
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) => {
|
|
103
|
+
jsx_runtime_1.jsx("span", { style: formattedValue ? computedValue : unsupportedLabel, inert: formattedValue, children: label }), onFix ? (jsx_runtime_1.jsx("button", { type: "button", className: `${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME} ${hoverable_1.HOVERABLE_CLASS_NAME}`, style: fixLink, title: "Fix computed Studio value", onClick: (event) => {
|
|
98
104
|
stopMousePropagation(event);
|
|
99
105
|
onFix();
|
|
100
106
|
}, onDoubleClick: stopMousePropagation, onPointerDown: stopPointerPropagation, onFocus: () => setFocused(true), onBlur: () => setFocused(false), tabIndex: visible ? 0 : -1, children: "Fix" })) : null] }));
|