@remotion/studio 4.0.524 → 4.0.526
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/focus-default-props-path.js +7 -1
- package/dist/api/restart-studio.d.ts +1 -1
- package/dist/api/restart-studio.js +1 -1
- package/dist/components/ActionTooltip.d.ts +2 -0
- package/dist/components/ActionTooltip.js +14 -4
- package/dist/components/AgentPrompt.d.ts +6 -0
- package/dist/components/AgentPrompt.js +107 -0
- package/dist/components/AppLaunchButton.js +2 -0
- package/dist/components/AssetFileIcon.js +2 -0
- package/dist/components/AssetSelectorItem.d.ts +1 -23
- package/dist/components/AssetSelectorItem.js +10 -200
- package/dist/components/AssetSelectorModal.d.ts +6 -0
- package/dist/components/AssetSelectorModal.js +174 -0
- package/dist/components/Canvas.js +21 -4
- package/dist/components/CaptionInspector.js +9 -3
- package/dist/components/CheckboardToggle.js +2 -1
- package/dist/{error-overlay/remotion-overlay → components}/CodeFrame.d.ts +2 -0
- package/dist/components/CodeFrame.js +77 -0
- package/dist/components/ColorPicker/AlphaSlider.js +1 -1
- package/dist/components/ColorPicker/HueSlider.js +1 -1
- package/dist/components/ColorPicker/SaturationValueArea.js +1 -1
- package/dist/components/CompositionSelector.js +1 -0
- package/dist/components/CompositionSelectorItem.js +7 -17
- package/dist/components/CurrentAsset.js +5 -4
- package/dist/components/EditorGuides/Guide.js +1 -1
- package/dist/components/ElementInstallConfirmation.js +100 -61
- package/dist/components/FilePreview.js +4 -0
- package/dist/components/FixComputedValueModal.js +64 -96
- package/dist/components/FullscreenToggle.js +1 -1
- package/dist/components/GenerateWithAgentModal.d.ts +9 -0
- package/dist/components/GenerateWithAgentModal.js +39 -0
- package/dist/components/GlobalKeybindings.js +14 -0
- package/dist/components/InlineEditableTitle.js +2 -0
- package/dist/components/InspectorLocationCopy.js +1 -1
- package/dist/components/InspectorOpenInEditor.d.ts +1 -0
- package/dist/components/InspectorOpenInEditor.js +25 -18
- package/dist/components/InspectorPanel/CollapsibleInspectorSection.d.ts +7 -0
- package/dist/components/InspectorPanel/CollapsibleInspectorSection.js +14 -0
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.d.ts +1 -1
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +19 -8
- package/dist/components/InspectorPanel/CompositionInspector.js +30 -13
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +6 -7
- package/dist/components/InspectorPanel/CompositionMetadata.js +4 -0
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +6 -12
- package/dist/components/InspectorPanel/ElementLibraryButton.js +2 -0
- package/dist/components/InspectorPanel/GuideInspector.js +2 -3
- package/dist/components/InspectorPanel/KeyframeSettings.js +5 -6
- package/dist/components/InspectorPanel/MultiSequenceInspector.js +2 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +4 -12
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +4 -3
- package/dist/components/InspectorPanel/common.d.ts +4 -0
- package/dist/components/InspectorPanel/common.js +14 -2
- package/dist/components/InspectorPanel/styles.d.ts +0 -3
- package/dist/components/InspectorPanel/styles.js +1 -27
- package/dist/components/InspectorPanel/use-composition-actions.d.ts +2 -0
- package/dist/components/InspectorPanel/use-composition-actions.js +15 -0
- package/dist/components/InspectorPanel/use-inspector-section-expanded.d.ts +1 -0
- package/dist/components/InspectorPanel/use-inspector-section-expanded.js +21 -0
- package/dist/components/InspectorSequenceSection.js +61 -43
- package/dist/components/InspectorSourceLocation.js +1 -0
- package/dist/components/KeyboardShortcutsSettings.js +12 -4
- package/dist/components/LoopToggle.js +2 -1
- package/dist/components/LutPreview.d.ts +4 -0
- package/dist/components/LutPreview.js +192 -0
- package/dist/components/Menu/MenuItem.js +1 -2
- package/dist/components/MenuBuildIndicator.js +1 -1
- package/dist/components/MenuCompositionName.js +4 -9
- package/dist/components/Modals.js +4 -6
- package/dist/components/ModelsSettings.js +15 -4
- package/dist/components/MuteToggle.js +2 -1
- package/dist/components/NewComposition/CodemodFooter.js +1 -0
- package/dist/components/NewComposition/DeleteComposition.js +42 -6
- package/dist/components/NewComposition/DeleteFolder.js +1 -0
- package/dist/components/NewComposition/DuplicateComposition.js +5 -0
- package/dist/components/NewComposition/InputDragger.js +2 -2
- package/dist/components/NewComposition/NewFolder.js +29 -2
- package/dist/components/NewComposition/RenameFolder.js +1 -0
- package/dist/components/NewComposition/duplicate-composition-api.d.ts +3 -2
- package/dist/components/NewComposition/duplicate-composition-api.js +9 -2
- package/dist/components/OutlineToggle.js +2 -1
- package/dist/components/PlayPause.js +1 -1
- package/dist/components/Preview.js +0 -3
- package/dist/components/PreviewToolbar.js +3 -6
- package/dist/components/PreviewToolbarOverflowButton.js +2 -1
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
- package/dist/components/QuickSwitcher/QuickSwitcherResult.js +4 -9
- package/dist/components/RenderButton.js +40 -4
- package/dist/components/RenderModal/SchemaEditor/scroll-to-default-props-path.d.ts +1 -0
- package/dist/components/RenderModal/SchemaEditor/scroll-to-default-props-path.js +2 -1
- package/dist/components/RenderModal/WebRenderModal.js +10 -2
- package/dist/components/RenderModal/WebRenderModalBasic.js +1 -1
- package/dist/components/RenderModal/render-modals.js +3 -0
- package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +1 -1
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +1 -1
- package/dist/components/RenderQueue/actions.d.ts +2 -1
- package/dist/components/RenderQueue/actions.js +2 -1
- package/dist/components/RendersTab.js +2 -0
- package/dist/components/RulersAndGuidesToggle.js +2 -1
- package/dist/components/SegmentedButton.d.ts +1 -0
- package/dist/components/SegmentedButton.js +9 -3
- package/dist/components/SelectedOutlineElement.js +22 -6
- package/dist/components/SelectedOutlinePolygon.js +4 -2
- package/dist/components/SettingsButton.js +11 -2
- package/dist/components/SettingsContext.d.ts +8 -0
- package/dist/components/SettingsContext.js +57 -2
- package/dist/components/SettingsModal.d.ts +1 -2
- package/dist/components/SettingsModal.js +27 -6
- package/dist/components/SettingsModalFooter.js +17 -3
- package/dist/components/SidebarCollapserControls.js +1 -1
- package/dist/components/SkillsSettings.d.ts +5 -0
- package/dist/components/SkillsSettings.js +49 -15
- package/dist/components/SnappingToggle.js +2 -1
- package/dist/components/Splitter/SplitterHandle.js +1 -2
- package/dist/components/Tabs/vertical.d.ts +1 -1
- package/dist/components/Tabs/vertical.js +16 -2
- package/dist/components/Timeline/EasingEditorModal.js +2 -2
- package/dist/components/Timeline/Timeline.js +10 -11
- package/dist/components/Timeline/TimelineAssetField.js +178 -9
- package/dist/components/Timeline/TimelineDragHandler.js +1 -2
- package/dist/components/Timeline/TimelineEffectItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectItem.js +2 -2
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectPropItem.js +2 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +2 -2
- package/dist/components/Timeline/TimelineHeightContainer.js +11 -1
- package/dist/components/Timeline/TimelineInOutDragHandler.js +1 -2
- package/dist/components/Timeline/TimelineKeyframeControls.js +15 -1
- package/dist/components/Timeline/TimelineLayerChildren.d.ts +3 -3
- package/dist/components/Timeline/TimelineLayerChildren.js +11 -9
- package/dist/components/Timeline/TimelineLayerEye.d.ts +1 -1
- package/dist/components/Timeline/TimelineLayerEye.js +6 -3
- package/dist/components/Timeline/TimelineList.js +9 -3
- package/dist/components/Timeline/TimelineSchemaField.js +10 -7
- package/dist/components/Timeline/TimelineSelection.d.ts +17 -4
- package/dist/components/Timeline/TimelineSelection.js +121 -52
- package/dist/components/Timeline/TimelineSequence.js +8 -8
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +2 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +29 -23
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +3 -12
- package/dist/components/Timeline/TimelineTranslateField.js +25 -12
- package/dist/components/Timeline/TimelineVirtualization.d.ts +3 -3
- package/dist/components/Timeline/TimelineZoomControls.js +1 -1
- package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +3 -1
- package/dist/components/Timeline/get-sequence-context-menu-items.js +152 -51
- package/dist/components/Timeline/normalize-font-weight-for-keyframe.d.ts +1 -0
- package/dist/components/Timeline/normalize-font-weight-for-keyframe.js +19 -0
- package/dist/components/Timeline/timeline-display-groups.d.ts +9 -0
- package/dist/components/Timeline/timeline-display-groups.js +66 -0
- package/dist/components/Timeline/timeline-field-display-utils.js +4 -2
- package/dist/components/Timeline/timeline-translate-utils.d.ts +17 -0
- package/dist/components/Timeline/timeline-translate-utils.js +53 -12
- package/dist/components/Timeline/use-open-sequence-in-apps.d.ts +2 -0
- package/dist/components/Timeline/use-open-sequence-in-apps.js +17 -0
- package/dist/components/Timeline/use-timeline-asset-drop.js +20 -6
- package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +2 -1
- package/dist/components/Timeline/use-timeline-expanded-tree.js +1 -2
- package/dist/components/Timeline/use-timeline-keyframe-drag.js +4 -4
- package/dist/components/TimelineCombobox.js +1 -0
- package/dist/components/UndoRedoButtons.js +11 -0
- package/dist/components/UpdateStatusContext.d.ts +2 -2
- package/dist/components/UpdateStatusContext.js +6 -7
- package/dist/components/UpdatesSettings.js +6 -6
- package/dist/components/WebMcp.js +40 -41
- package/dist/components/asset-context-menu.d.ts +32 -0
- package/dist/components/asset-context-menu.js +242 -0
- package/dist/components/composition-menu-items.d.ts +4 -6
- package/dist/components/composition-menu-items.js +212 -42
- package/dist/components/folder-menu-items.js +44 -0
- package/dist/components/get-open-in-menu-items.d.ts +6 -5
- package/dist/components/get-open-in-menu-items.js +16 -10
- package/dist/components/import-assets.d.ts +24 -1
- package/dist/components/import-assets.js +3 -1
- package/dist/components/keyboard-shortcuts.d.ts +4 -4
- package/dist/components/keyboard-shortcuts.js +5 -0
- package/dist/components/selected-outline-order.js +18 -12
- package/dist/components/use-open-in-menu-apps.d.ts +14 -0
- package/dist/components/use-open-in-menu-apps.js +33 -0
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +2 -2
- package/dist/error-overlay/remotion-overlay/OpenInEditor.d.ts +1 -0
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +3 -3
- package/dist/error-overlay/remotion-overlay/StackFrame.d.ts +5 -1
- package/dist/error-overlay/remotion-overlay/StackFrame.js +26 -19
- package/dist/esm/{LazyModels-hc33szyn.mjs → LazyModels-mtggyjye.mjs} +3 -3
- package/dist/esm/{LazyModels-sg40rjw6.mjs → LazyModels-nk7py0zt.mjs} +3 -3
- package/dist/esm/{TranscriptionModal-3ctnxpt6.mjs → TranscriptionModal-ymnx1c7m.mjs} +6 -6
- package/dist/esm/{VideoMattingModal-b0r7e60n.mjs → VideoMattingModal-05vpczks.mjs} +6 -6
- package/dist/esm/{index-er3mh6em.mjs → index-0gewwxse.mjs} +7031 -5834
- package/dist/esm/{index-q5xv20xx.mjs → index-4dsz9035.mjs} +8 -8
- package/dist/esm/{index-wbmp5srk.mjs → index-5bfxbpca.mjs} +1 -1
- package/dist/esm/{index-e3zwf3e7.mjs → index-5gd8k9yv.mjs} +1 -1
- package/dist/esm/{index-c37kme2v.mjs → index-bs39wngg.mjs} +4929 -3801
- package/dist/esm/{index-yfrysr5f.mjs → index-cdy8v54v.mjs} +17 -3
- package/dist/esm/{index-9qtvmwtx.mjs → index-eb5txqp6.mjs} +12 -9
- package/dist/esm/{index-q2epbw93.mjs → index-f97r9e2g.mjs} +4 -21
- package/dist/esm/{index-2j3d1g81.mjs → index-g7k2dvar.mjs} +1 -1
- package/dist/esm/{index-1b9skrrd.mjs → index-x40wwfmt.mjs} +3 -3
- package/dist/esm/index.mjs +12 -6
- package/dist/esm/internals.mjs +7 -7
- package/dist/esm/previewEntry.mjs +7 -7
- package/dist/helpers/client-id.d.ts +1 -0
- package/dist/helpers/client-id.js +8 -4
- package/dist/helpers/cube-lut.d.ts +12 -0
- package/dist/helpers/cube-lut.js +160 -0
- package/dist/helpers/get-git-menu-item.d.ts +4 -0
- package/dist/helpers/get-git-menu-item.js +8 -1
- package/dist/helpers/get-preview-file-type.d.ts +1 -1
- package/dist/helpers/get-preview-file-type.js +3 -0
- package/dist/helpers/get-sequence-double-click-action.d.ts +3 -3
- package/dist/helpers/get-sequence-double-click-action.js +2 -2
- package/dist/helpers/open-in-editor.d.ts +5 -2
- package/dist/helpers/open-in-editor.js +12 -4
- package/dist/helpers/pointer-session.d.ts +1 -0
- package/dist/helpers/pointer-session.js +10 -1
- package/dist/helpers/settings-tab-availability.d.ts +14 -0
- package/dist/helpers/settings-tab-availability.js +35 -0
- package/dist/helpers/studio-runtime-config.d.ts +1 -1
- package/dist/helpers/use-create-composition.js +5 -0
- package/dist/helpers/use-keybinding.d.ts +1 -1
- package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
- package/dist/helpers/use-media-metadata.js +5 -1
- package/dist/helpers/use-menu-structure.js +21 -13
- package/dist/helpers/use-rename-composition.js +6 -1
- package/dist/icons/lut.d.ts +4 -0
- package/dist/icons/lut.js +6 -0
- package/dist/icons/sparkles.d.ts +4 -0
- package/dist/icons/sparkles.js +6 -0
- package/dist/state/modals.d.ts +25 -3
- package/dist/state/z-index.js +1 -3
- package/package.json +19 -19
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +0 -62
|
@@ -6,13 +6,18 @@ const react_1 = require("react");
|
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
7
|
const no_react_1 = require("remotion/no-react");
|
|
8
8
|
const write_static_file_1 = require("../../api/write-static-file");
|
|
9
|
+
const colors_1 = require("../../helpers/colors");
|
|
10
|
+
const hoverable_1 = require("../../helpers/hoverable");
|
|
9
11
|
const pen_1 = require("../../icons/pen");
|
|
10
12
|
const modals_1 = require("../../state/modals");
|
|
13
|
+
const asset_context_menu_1 = require("../asset-context-menu");
|
|
14
|
+
const ContextMenu_1 = require("../ContextMenu");
|
|
11
15
|
const import_assets_1 = require("../import-assets");
|
|
12
16
|
const InlineAction_1 = require("../InlineAction");
|
|
13
17
|
const common_1 = require("../InspectorPanel/common");
|
|
14
18
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
15
19
|
const use_static_files_1 = require("../use-static-files");
|
|
20
|
+
const timeline_asset_link_1 = require("./timeline-asset-link");
|
|
16
21
|
const penIcon = {
|
|
17
22
|
display: 'block',
|
|
18
23
|
height: 14,
|
|
@@ -37,6 +42,72 @@ const assetTypeToAccept = {
|
|
|
37
42
|
video: 'video/*',
|
|
38
43
|
image: 'image/*',
|
|
39
44
|
};
|
|
45
|
+
const imageAssetField = {
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
display: 'flex',
|
|
48
|
+
flex: 1,
|
|
49
|
+
gap: 4,
|
|
50
|
+
margin: '0 4px',
|
|
51
|
+
minWidth: 0,
|
|
52
|
+
};
|
|
53
|
+
const imageAssetPreviewContainer = {
|
|
54
|
+
display: 'flex',
|
|
55
|
+
flex: 1,
|
|
56
|
+
minWidth: 0,
|
|
57
|
+
};
|
|
58
|
+
const imageAssetPreviewButton = {
|
|
59
|
+
alignItems: 'center',
|
|
60
|
+
appearance: 'none',
|
|
61
|
+
border: 'none',
|
|
62
|
+
borderRadius: 4,
|
|
63
|
+
cursor: 'default',
|
|
64
|
+
display: 'flex',
|
|
65
|
+
flex: 1,
|
|
66
|
+
gap: 8,
|
|
67
|
+
height: 40,
|
|
68
|
+
margin: 0,
|
|
69
|
+
minWidth: 0,
|
|
70
|
+
padding: '0 8px',
|
|
71
|
+
textAlign: 'left',
|
|
72
|
+
};
|
|
73
|
+
const thumbnailContainer = {
|
|
74
|
+
borderRadius: 4,
|
|
75
|
+
flexShrink: 0,
|
|
76
|
+
height: 40,
|
|
77
|
+
overflow: 'hidden',
|
|
78
|
+
width: 40,
|
|
79
|
+
};
|
|
80
|
+
const thumbnail = {
|
|
81
|
+
display: 'block',
|
|
82
|
+
height: '100%',
|
|
83
|
+
objectFit: 'contain',
|
|
84
|
+
width: '100%',
|
|
85
|
+
};
|
|
86
|
+
const imageAssetInfo = {
|
|
87
|
+
display: 'flex',
|
|
88
|
+
flex: 1,
|
|
89
|
+
flexDirection: 'column',
|
|
90
|
+
gap: 2,
|
|
91
|
+
minWidth: 0,
|
|
92
|
+
};
|
|
93
|
+
const imageAssetName = {
|
|
94
|
+
color: colors_1.WHITE,
|
|
95
|
+
fontFamily: 'sans-serif',
|
|
96
|
+
fontSize: 12,
|
|
97
|
+
lineHeight: '16px',
|
|
98
|
+
overflow: 'hidden',
|
|
99
|
+
textOverflow: 'ellipsis',
|
|
100
|
+
whiteSpace: 'nowrap',
|
|
101
|
+
};
|
|
102
|
+
const imageAssetSource = {
|
|
103
|
+
color: colors_1.LIGHT_TEXT,
|
|
104
|
+
fontFamily: 'sans-serif',
|
|
105
|
+
fontSize: 11,
|
|
106
|
+
lineHeight: '14px',
|
|
107
|
+
overflow: 'hidden',
|
|
108
|
+
textOverflow: 'ellipsis',
|
|
109
|
+
whiteSpace: 'nowrap',
|
|
110
|
+
};
|
|
40
111
|
exports.AssetSelectionContext = (0, react_1.createContext)({
|
|
41
112
|
getSourceAction: () => null,
|
|
42
113
|
sourceAction: null,
|
|
@@ -49,6 +120,7 @@ const toFileToken = (name) => {
|
|
|
49
120
|
};
|
|
50
121
|
exports.toFileToken = toFileToken;
|
|
51
122
|
const TimelineAssetField = ({ field, effectiveValue, propStatus, onSave, onDragValueChange, onDragEnd, }) => {
|
|
123
|
+
var _a, _b;
|
|
52
124
|
if (field.fieldSchema.type !== 'asset') {
|
|
53
125
|
throw new Error('TimelineAssetField rendered for non-asset field');
|
|
54
126
|
}
|
|
@@ -57,6 +129,14 @@ const TimelineAssetField = ({ field, effectiveValue, propStatus, onSave, onDragV
|
|
|
57
129
|
const { getSourceAction, sourceAction } = (0, react_1.useContext)(exports.AssetSelectionContext);
|
|
58
130
|
const { assetType } = field.fieldSchema;
|
|
59
131
|
const initialQuery = assetType ? `type:${assetType} ` : '';
|
|
132
|
+
const imageLinkInfo = assetType === 'image' && typeof effectiveValue === 'string'
|
|
133
|
+
? (0, timeline_asset_link_1.getTimelineAssetLinkInfo)(effectiveValue)
|
|
134
|
+
: null;
|
|
135
|
+
const localAssetPath = (imageLinkInfo === null || imageLinkInfo === void 0 ? void 0 : imageLinkInfo.kind) === 'local' ? imageLinkInfo.assetPath : null;
|
|
136
|
+
const { getContextMenuItems: getLocalAssetContextMenuItems } = (0, asset_context_menu_1.useAssetContextMenuItems)({
|
|
137
|
+
relativePath: localAssetPath,
|
|
138
|
+
readOnlyStudio: window.remotion_isReadOnlyStudio,
|
|
139
|
+
});
|
|
60
140
|
const inlineSourceAction = (0, react_1.useMemo)(() => {
|
|
61
141
|
if (typeof effectiveValue === 'string') {
|
|
62
142
|
return getSourceAction(effectiveValue);
|
|
@@ -73,6 +153,15 @@ const TimelineAssetField = ({ field, effectiveValue, propStatus, onSave, onDragV
|
|
|
73
153
|
onDragEnd();
|
|
74
154
|
});
|
|
75
155
|
}, [propStatus.codeValue, onDragValueChange, onSave, onDragEnd]);
|
|
156
|
+
const onSelectUrl = (0, react_1.useCallback)((url) => {
|
|
157
|
+
if (url === propStatus.codeValue) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
onDragValueChange(url);
|
|
161
|
+
onSave(url).finally(() => {
|
|
162
|
+
onDragEnd();
|
|
163
|
+
});
|
|
164
|
+
}, [propStatus.codeValue, onDragValueChange, onDragEnd, onSave]);
|
|
76
165
|
const selectFile = (0, react_1.useCallback)(async () => {
|
|
77
166
|
const [file] = await (0, import_assets_1.pickFilesToImport)({
|
|
78
167
|
multiple: false,
|
|
@@ -103,25 +192,105 @@ const TimelineAssetField = ({ field, effectiveValue, propStatus, onSave, onDragV
|
|
|
103
192
|
}
|
|
104
193
|
}, [assetType, onSelect, staticFiles]);
|
|
105
194
|
const openAssetSelection = (0, react_1.useCallback)(() => {
|
|
195
|
+
const assetSelection = {
|
|
196
|
+
initialQuery,
|
|
197
|
+
onSelectFile: () => {
|
|
198
|
+
selectFile().catch(() => undefined);
|
|
199
|
+
},
|
|
200
|
+
onSelected: (asset) => onSelect(asset.name, asset.src),
|
|
201
|
+
};
|
|
202
|
+
if (assetType !== undefined) {
|
|
203
|
+
const linkInfo = typeof effectiveValue === 'string'
|
|
204
|
+
? (0, timeline_asset_link_1.getTimelineAssetLinkInfo)(effectiveValue)
|
|
205
|
+
: null;
|
|
206
|
+
setSelectedModal({
|
|
207
|
+
type: 'asset-selection',
|
|
208
|
+
assetType,
|
|
209
|
+
initialUrl: (linkInfo === null || linkInfo === void 0 ? void 0 : linkInfo.kind) === 'remote' ? linkInfo.href : null,
|
|
210
|
+
invocationTimestamp: Date.now(),
|
|
211
|
+
assetSelection,
|
|
212
|
+
onSelectedUrl: onSelectUrl,
|
|
213
|
+
});
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
106
216
|
setSelectedModal({
|
|
107
217
|
type: 'quick-switcher',
|
|
108
218
|
mode: 'assets',
|
|
109
219
|
invocationTimestamp: Date.now(),
|
|
110
|
-
assetSelection
|
|
111
|
-
initialQuery,
|
|
112
|
-
onSelectFile: () => {
|
|
113
|
-
selectFile().catch(() => undefined);
|
|
114
|
-
},
|
|
115
|
-
onSelected: (asset) => onSelect(asset.name, asset.src),
|
|
116
|
-
},
|
|
220
|
+
assetSelection,
|
|
117
221
|
compositionSelection: null,
|
|
118
222
|
});
|
|
119
|
-
}, [
|
|
223
|
+
}, [
|
|
224
|
+
assetType,
|
|
225
|
+
effectiveValue,
|
|
226
|
+
initialQuery,
|
|
227
|
+
onSelect,
|
|
228
|
+
onSelectUrl,
|
|
229
|
+
selectFile,
|
|
230
|
+
setSelectedModal,
|
|
231
|
+
]);
|
|
120
232
|
const action = (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: openAssetSelection, disabled: window.remotion_isReadOnlyStudio, title: "Change source", renderAction: (color) => jsx_runtime_1.jsx(pen_1.PenIcon, { color: color, style: penIcon }) }));
|
|
233
|
+
if (imageLinkInfo !== null) {
|
|
234
|
+
const linkInfo = imageLinkInfo;
|
|
235
|
+
let name;
|
|
236
|
+
let source;
|
|
237
|
+
let previewSrc;
|
|
238
|
+
if (linkInfo.kind === 'local') {
|
|
239
|
+
name = (_a = linkInfo.assetPath.split('/').pop()) !== null && _a !== void 0 ? _a : linkInfo.assetPath;
|
|
240
|
+
source = null;
|
|
241
|
+
previewSrc = (0, remotion_1.staticFile)(linkInfo.assetPath);
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
previewSrc = linkInfo.href.startsWith('//')
|
|
245
|
+
? `https:${linkInfo.href}`
|
|
246
|
+
: linkInfo.href;
|
|
247
|
+
try {
|
|
248
|
+
const url = new URL(previewSrc);
|
|
249
|
+
const encodedName = url.pathname.split('/').filter(Boolean).pop();
|
|
250
|
+
name = encodedName ? decodeURIComponent(encodedName) : url.hostname;
|
|
251
|
+
source = url.hostname;
|
|
252
|
+
}
|
|
253
|
+
catch (_c) {
|
|
254
|
+
name = 'Remote image';
|
|
255
|
+
source = linkInfo.href;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
const opensSource = linkInfo.kind === 'local' &&
|
|
259
|
+
inlineSourceAction !== null &&
|
|
260
|
+
inlineSourceAction.onClick !== null;
|
|
261
|
+
const title = (_b = inlineSourceAction === null || inlineSourceAction === void 0 ? void 0 : inlineSourceAction.title) !== null && _b !== void 0 ? _b : linkInfo.title;
|
|
262
|
+
const onPreviewClick = opensSource
|
|
263
|
+
? inlineSourceAction.onClick
|
|
264
|
+
: openAssetSelection;
|
|
265
|
+
const previewLabel = `${opensSource ? 'Open' : 'Replace'} ${name}`;
|
|
266
|
+
const previewDisabled = opensSource
|
|
267
|
+
? inlineSourceAction.disabled
|
|
268
|
+
: window.remotion_isReadOnlyStudio;
|
|
269
|
+
const previewButtonStyle = {
|
|
270
|
+
...imageAssetPreviewButton,
|
|
271
|
+
...(0, hoverable_1.hoverableStyle)({
|
|
272
|
+
idleBackground: colors_1.TRANSPARENT,
|
|
273
|
+
hoverBackground: previewDisabled
|
|
274
|
+
? colors_1.TRANSPARENT
|
|
275
|
+
: (0, colors_1.getBackgroundFromHoverState)({ hovered: true, selected: false }),
|
|
276
|
+
idleColor: colors_1.LIGHT_TEXT,
|
|
277
|
+
hoverColor: previewDisabled ? colors_1.LIGHT_TEXT : colors_1.WHITE,
|
|
278
|
+
}),
|
|
279
|
+
};
|
|
280
|
+
const previewAction = (jsx_runtime_1.jsxs("button", { "aria-label": previewLabel, className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, disabled: previewDisabled, onClick: onPreviewClick, style: previewButtonStyle, title: title, type: "button", children: [
|
|
281
|
+
jsx_runtime_1.jsx("span", { style: thumbnailContainer, children: jsx_runtime_1.jsx("img", { alt: "", draggable: false, src: previewSrc, style: thumbnail }) }), jsx_runtime_1.jsxs("span", { style: imageAssetInfo, children: [
|
|
282
|
+
jsx_runtime_1.jsx("span", { style: imageAssetName, children: name }), source === null ? null : (jsx_runtime_1.jsx("span", { style: imageAssetSource, children: source }))] })
|
|
283
|
+
] }));
|
|
284
|
+
return (jsx_runtime_1.jsxs("div", { style: imageAssetField, children: [localAssetPath === null ? (jsx_runtime_1.jsx("div", { style: imageAssetPreviewContainer, children: previewAction })) : (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getLocalAssetContextMenuItems, style: imageAssetPreviewContainer, children: previewAction })), action] }));
|
|
285
|
+
}
|
|
121
286
|
if (inlineSourceAction === null) {
|
|
122
287
|
return action;
|
|
123
288
|
}
|
|
124
289
|
return (jsx_runtime_1.jsxs("div", { style: sourceActions, children: [
|
|
125
|
-
jsx_runtime_1.jsx(common_1.InspectorQuickAction, { ...inlineSourceAction,
|
|
290
|
+
jsx_runtime_1.jsx(common_1.InspectorQuickAction, { ...inlineSourceAction, disabled: assetType === undefined
|
|
291
|
+
? inlineSourceAction.disabled
|
|
292
|
+
: window.remotion_isReadOnlyStudio, onClick: assetType === undefined
|
|
293
|
+
? inlineSourceAction.onClick
|
|
294
|
+
: openAssetSelection, size: "compact", style: standaloneSourceActionStyle }), action] }));
|
|
126
295
|
};
|
|
127
296
|
exports.TimelineAssetField = TimelineAssetField;
|
|
@@ -279,8 +279,7 @@ const TimelineDragHandlerInner = () => {
|
|
|
279
279
|
captureTarget: dragging.target,
|
|
280
280
|
onMove: onPointerMoveScrubbing,
|
|
281
281
|
onEnd: (reason, endEvent) => {
|
|
282
|
-
if ((
|
|
283
|
-
endEvent) {
|
|
282
|
+
if ((0, pointer_session_1.isPointerSessionRelease)(reason, endEvent)) {
|
|
284
283
|
onPointerUpScrubbing(endEvent);
|
|
285
284
|
}
|
|
286
285
|
else {
|
|
@@ -13,6 +13,7 @@ export declare const TimelineEffectItem: React.FC<{
|
|
|
13
13
|
readonly validatedLocation: CodePosition;
|
|
14
14
|
readonly rowDepth: number;
|
|
15
15
|
readonly labelNextToToggle: boolean;
|
|
16
|
+
readonly revealInInspector: boolean;
|
|
16
17
|
readonly getIsExpanded: GetIsExpanded;
|
|
17
18
|
readonly toggleTrack: (nodePathInfo: SequenceNodePathInfo) => void;
|
|
18
19
|
}>;
|
|
@@ -75,7 +75,7 @@ const getEffectReorderDragData = (dataTransfer) => {
|
|
|
75
75
|
const getDestinationIndex = ({ fromIndex, insertionIndex, }) => {
|
|
76
76
|
return insertionIndex > fromIndex ? insertionIndex - 1 : insertionIndex;
|
|
77
77
|
};
|
|
78
|
-
const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, documentationLink, nodePath, validatedLocation, rowDepth, labelNextToToggle, getIsExpanded, toggleTrack, }) => {
|
|
78
|
+
const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, documentationLink, nodePath, validatedLocation, rowDepth, labelNextToToggle, revealInInspector, getIsExpanded, toggleTrack, }) => {
|
|
79
79
|
var _a;
|
|
80
80
|
var _b;
|
|
81
81
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
@@ -83,7 +83,7 @@ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, do
|
|
|
83
83
|
const canMutateEffects = (0, browser_studio_operations_1.canUseEffectOperations)();
|
|
84
84
|
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
85
85
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
86
|
-
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
86
|
+
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo, revealInInspector);
|
|
87
87
|
const containsSelection = (0, TimelineSelection_1.useTimelineRowContainsSelection)(nodePathInfo);
|
|
88
88
|
const [dropIndicator, setDropIndicator] = (0, react_1.useState)(null);
|
|
89
89
|
const effectStatus = (0, react_1.useMemo)(() => remotion_1.Internals.getEffectPropStatusesCtx({
|
|
@@ -19,5 +19,6 @@ export declare const TimelineEffectPropItem: React.FC<{
|
|
|
19
19
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
20
20
|
readonly keyframeDisplayOffset: number;
|
|
21
21
|
readonly keyframeControlsMode: TimelineKeyframeControlsMode;
|
|
22
|
+
readonly revealInInspector: boolean;
|
|
22
23
|
readonly runtimeValueStore: RuntimeValueStore | null;
|
|
23
24
|
}>;
|
|
@@ -232,7 +232,7 @@ const TimelineEffectPropValueAtCurrentFrame = ({ field, nodePath, validatedLocat
|
|
|
232
232
|
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
233
233
|
return (jsx_runtime_1.jsx(exports.TimelineEffectPropValue, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, sourceFrame: timelinePosition - keyframeDisplayOffset, runtimeValueStore: runtimeValueStore }));
|
|
234
234
|
};
|
|
235
|
-
const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, keyframeDisplayOffset, keyframeControlsMode, runtimeValueStore, }) => {
|
|
235
|
+
const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, keyframeDisplayOffset, keyframeControlsMode, revealInInspector, runtimeValueStore, }) => {
|
|
236
236
|
var _a;
|
|
237
237
|
var _b;
|
|
238
238
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
@@ -240,7 +240,7 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
240
240
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
241
241
|
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
242
242
|
const { getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
243
|
-
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
243
|
+
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo, revealInInspector);
|
|
244
244
|
const style = (0, react_1.useMemo)(() => {
|
|
245
245
|
return field.typeName === 'text-content'
|
|
246
246
|
? fieldRowBase
|
|
@@ -40,7 +40,7 @@ const TimelineExpandedRowInner = ({ node, depth, nestedDepth, rowDepthBase, getI
|
|
|
40
40
|
if (node.effectInfo) {
|
|
41
41
|
return (
|
|
42
42
|
// A single effect
|
|
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
|
+
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, revealInInspector: !isInspector, getIsExpanded: getIsExpanded, toggleTrack: toggleTrack }));
|
|
44
44
|
}
|
|
45
45
|
// Group like "Effects"
|
|
46
46
|
const isExpanded = getIsExpanded(node.nodePathInfo);
|
|
@@ -50,7 +50,7 @@ const TimelineExpandedRowInner = ({ node, depth, nestedDepth, rowDepthBase, getI
|
|
|
50
50
|
}
|
|
51
51
|
if (node.field) {
|
|
52
52
|
if (node.field.kind === 'effect-field') {
|
|
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
|
+
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, revealInInspector: !isInspector, runtimeValueStore: node.runtimeValueStore }));
|
|
54
54
|
}
|
|
55
55
|
if (node.field.kind === 'sequence-field') {
|
|
56
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 }));
|
|
@@ -47,7 +47,17 @@ const baseStyle = {
|
|
|
47
47
|
};
|
|
48
48
|
const TimelineHeightContainerInner = ({ children }) => {
|
|
49
49
|
const { totalSize } = (0, TimelineVirtualization_1.useTimelineVirtualization)();
|
|
50
|
+
const onPointerDownCapture = (0, react_1.useCallback)((event) => {
|
|
51
|
+
const { activeElement } = document;
|
|
52
|
+
if (event.button === 0 &&
|
|
53
|
+
activeElement instanceof HTMLButtonElement &&
|
|
54
|
+
event.target instanceof Node &&
|
|
55
|
+
!activeElement.contains(event.target)) {
|
|
56
|
+
// Timeline drags can prevent the browser's default focus change.
|
|
57
|
+
activeElement.blur();
|
|
58
|
+
}
|
|
59
|
+
}, []);
|
|
50
60
|
const style = (0, react_1.useMemo)(() => ({ ...baseStyle, height: totalSize }), [totalSize]);
|
|
51
|
-
return jsx_runtime_1.jsx("div", { style: style, children: children });
|
|
61
|
+
return (jsx_runtime_1.jsx("div", { style: style, onPointerDownCapture: onPointerDownCapture, children: children }));
|
|
52
62
|
};
|
|
53
63
|
exports.TimelineHeightContainer = react_1.default.memo(TimelineHeightContainerInner);
|
|
@@ -279,8 +279,7 @@ const TimelineInOutDragHandlerInner = () => {
|
|
|
279
279
|
captureTarget: inOutDragging.target,
|
|
280
280
|
onMove: onPointerMoveInOut,
|
|
281
281
|
onEnd: (reason, endEvent) => {
|
|
282
|
-
if ((
|
|
283
|
-
endEvent) {
|
|
282
|
+
if ((0, pointer_session_1.isPointerSessionRelease)(reason, endEvent)) {
|
|
284
283
|
onPointerUpInOut(endEvent);
|
|
285
284
|
}
|
|
286
285
|
else {
|
|
@@ -10,11 +10,13 @@ const client_id_1 = require("../../helpers/client-id");
|
|
|
10
10
|
const colors_1 = require("../../helpers/colors");
|
|
11
11
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
12
12
|
const timeline_node_path_key_1 = require("../../helpers/timeline-node-path-key");
|
|
13
|
+
const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
|
|
13
14
|
const call_add_keyframe_1 = require("./call-add-keyframe");
|
|
14
15
|
const call_delete_keyframe_1 = require("./call-delete-keyframe");
|
|
15
16
|
const get_easing_selection_after_keyframe_delete_1 = require("./get-easing-selection-after-keyframe-delete");
|
|
16
17
|
const get_keyframe_navigation_1 = require("./get-keyframe-navigation");
|
|
17
18
|
const get_timeline_keyframes_1 = require("./get-timeline-keyframes");
|
|
19
|
+
const normalize_font_weight_for_keyframe_1 = require("./normalize-font-weight-for-keyframe");
|
|
18
20
|
const timeline_scroll_logic_1 = require("./timeline-scroll-logic");
|
|
19
21
|
const TimelineKeyframeDiamondIcon_1 = require("./TimelineKeyframeDiamondIcon");
|
|
20
22
|
const TimelineKeyframeTracksContext_1 = require("./TimelineKeyframeTracksContext");
|
|
@@ -222,12 +224,19 @@ const getAddChange = (target) => {
|
|
|
222
224
|
if (value === null) {
|
|
223
225
|
return null;
|
|
224
226
|
}
|
|
227
|
+
const fieldSchema = target.schema[target.fieldKey];
|
|
228
|
+
const normalizedValue = (fieldSchema === null || fieldSchema === void 0 ? void 0 : fieldSchema.type) === 'font-weight'
|
|
229
|
+
? (0, normalize_font_weight_for_keyframe_1.normalizeFontWeightForKeyframe)(value)
|
|
230
|
+
: value;
|
|
231
|
+
if (normalizedValue === null) {
|
|
232
|
+
return null;
|
|
233
|
+
}
|
|
225
234
|
const change = {
|
|
226
235
|
fileName: target.fileName,
|
|
227
236
|
nodePath: target.nodePath,
|
|
228
237
|
fieldKey: target.fieldKey,
|
|
229
238
|
sourceFrame: target.sourceFrame,
|
|
230
|
-
value,
|
|
239
|
+
value: normalizedValue,
|
|
231
240
|
schema: target.schema,
|
|
232
241
|
};
|
|
233
242
|
if (target.effectIndex === null) {
|
|
@@ -313,6 +322,7 @@ const TimelineKeyframeControls = ({ fieldKey, propStatus, nodePath, fileName, ke
|
|
|
313
322
|
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
314
323
|
const { getDragOverrides, getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
315
324
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
325
|
+
const { expandParentTracks } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksSetterContext);
|
|
316
326
|
const { selectedItems, selectItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
317
327
|
const tracks = (0, TimelineKeyframeTracksContext_1.useTimelineKeyframeTracks)();
|
|
318
328
|
const clientId = previewServerState.type === 'connected'
|
|
@@ -481,6 +491,9 @@ const TimelineKeyframeControls = ({ fieldKey, propStatus, nodePath, fileName, ke
|
|
|
481
491
|
setPropStatuses,
|
|
482
492
|
clientId,
|
|
483
493
|
});
|
|
494
|
+
for (const { target } of addChanges) {
|
|
495
|
+
expandParentTracks(target.nodePathInfo);
|
|
496
|
+
}
|
|
484
497
|
if (mode === 'timeline') {
|
|
485
498
|
selectItems(addChanges.map(({ target }) => ({
|
|
486
499
|
type: 'keyframe',
|
|
@@ -491,6 +504,7 @@ const TimelineKeyframeControls = ({ fieldKey, propStatus, nodePath, fileName, ke
|
|
|
491
504
|
}, [
|
|
492
505
|
canToggleKeyframe,
|
|
493
506
|
clientId,
|
|
507
|
+
expandParentTracks,
|
|
494
508
|
hasKeyframeAtCurrentFrame,
|
|
495
509
|
keyframeToggleTargets,
|
|
496
510
|
mode,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { TSequence } from 'remotion';
|
|
3
|
-
import type {
|
|
3
|
+
import type { TimelineTrackWithDisplayGroup } from './timeline-display-groups';
|
|
4
4
|
export declare const TimelineLayerChildrenProvider: React.Provider<{
|
|
5
5
|
readonly collapsed: Record<string, boolean>;
|
|
6
6
|
readonly keys: Map<string, string>;
|
|
7
7
|
readonly parents: Set<string>;
|
|
8
8
|
readonly toggle: (key: string) => void;
|
|
9
9
|
} | null>;
|
|
10
|
-
export declare const useTimelineLayerChildren: (tracks:
|
|
11
|
-
visibleTracks:
|
|
10
|
+
export declare const useTimelineLayerChildren: (tracks: TimelineTrackWithDisplayGroup[], sequences: TSequence[], compositionId: string | null) => {
|
|
11
|
+
visibleTracks: TimelineTrackWithDisplayGroup[];
|
|
12
12
|
value: {
|
|
13
13
|
collapsed: Record<string, boolean>;
|
|
14
14
|
keys: Map<string, string>;
|
|
@@ -70,17 +70,19 @@ const useTimelineLayerChildren = (tracks, sequences, compositionId) => {
|
|
|
70
70
|
parent = (_c = (_a = byId.get(parent)) === null || _a === void 0 ? void 0 : _a.parent) !== null && _c !== void 0 ? _c : null;
|
|
71
71
|
}
|
|
72
72
|
ancestors.set(track.sequence.id, parentIds);
|
|
73
|
-
// Source identity survives remounts.
|
|
74
|
-
//
|
|
73
|
+
// Source identity survives remounts. While it is resolving, the stack
|
|
74
|
+
// gives interactive layers a stable display identity.
|
|
75
75
|
const identity = track.nodePathInfo
|
|
76
76
|
? ['source', (0, timeline_node_path_key_1.timelineNodePathInfoToKey)(track.nodePathInfo)]
|
|
77
|
-
:
|
|
78
|
-
'
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
77
|
+
: track.displayGroup
|
|
78
|
+
? ['stack', track.displayGroup.key]
|
|
79
|
+
: [
|
|
80
|
+
'position',
|
|
81
|
+
...[...parentIds]
|
|
82
|
+
.reverse()
|
|
83
|
+
.concat(track.sequence.id)
|
|
84
|
+
.map((id) => siblingIndices.get(id)),
|
|
85
|
+
];
|
|
84
86
|
keys.set(track.sequence.id, JSON.stringify([compositionId, identity]));
|
|
85
87
|
}
|
|
86
88
|
return { keys, parents, ancestors };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const timelineLayerIconContainer: React.CSSProperties;
|
|
3
3
|
export declare const TimelineLayerEye: React.FC<{
|
|
4
|
-
readonly onInvoked: (type: 'enable' | 'disable') => void;
|
|
4
|
+
readonly onInvoked: ((type: 'enable' | 'disable') => void) | null;
|
|
5
5
|
readonly hidden: boolean;
|
|
6
6
|
readonly type: 'eye' | 'speaker' | 'effect';
|
|
7
7
|
}>;
|
|
@@ -54,6 +54,9 @@ const TimelineLayerEye = ({ onInvoked, hidden, type }) => {
|
|
|
54
54
|
}
|
|
55
55
|
e.preventDefault();
|
|
56
56
|
e.stopPropagation();
|
|
57
|
+
if (onInvoked === null) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
57
60
|
stopLayerPointerSession === null || stopLayerPointerSession === void 0 ? void 0 : stopLayerPointerSession();
|
|
58
61
|
layerPointedDown = hidden ? 'enable' : 'disable';
|
|
59
62
|
onInvoked(layerPointedDown);
|
|
@@ -83,14 +86,14 @@ const TimelineLayerEye = ({ onInvoked, hidden, type }) => {
|
|
|
83
86
|
e.stopPropagation();
|
|
84
87
|
}, []);
|
|
85
88
|
const onPointerEnter = (0, react_1.useCallback)(() => {
|
|
86
|
-
if (layerPointedDown) {
|
|
89
|
+
if (layerPointedDown && onInvoked !== null) {
|
|
87
90
|
onInvoked(layerPointedDown);
|
|
88
91
|
}
|
|
89
92
|
}, [onInvoked]);
|
|
90
93
|
const registerLayerEye = (0, react_1.useCallback)((element) => {
|
|
91
94
|
if (element) {
|
|
92
95
|
layerEyeActions.set(element, () => {
|
|
93
|
-
if (layerPointedDown) {
|
|
96
|
+
if (layerPointedDown && onInvoked !== null) {
|
|
94
97
|
onInvoked(layerPointedDown);
|
|
95
98
|
}
|
|
96
99
|
});
|
|
@@ -99,7 +102,7 @@ const TimelineLayerEye = ({ onInvoked, hidden, type }) => {
|
|
|
99
102
|
const onDoubleClick = (0, react_1.useCallback)((e) => {
|
|
100
103
|
e.stopPropagation();
|
|
101
104
|
}, []);
|
|
102
|
-
return (jsx_runtime_1.jsx("div", { ref: registerLayerEye, [TIMELINE_LAYER_EYE_ATTR]: true, style: exports.timelineLayerIconContainer, draggable: false, onDragStart: onDragStart, onDoubleClick: onDoubleClick, onPointerEnter: onPointerEnter, onPointerDown: onPointerDown, children: renderAction(colors_1.LIGHT_COLOR) }));
|
|
105
|
+
return (jsx_runtime_1.jsx("div", { ref: registerLayerEye, [TIMELINE_LAYER_EYE_ATTR]: true, style: exports.timelineLayerIconContainer, draggable: false, onDragStart: onDragStart, onDoubleClick: onDoubleClick, onPointerEnter: onInvoked === null ? undefined : onPointerEnter, onPointerDown: onPointerDown, children: renderAction(colors_1.LIGHT_COLOR) }));
|
|
103
106
|
};
|
|
104
107
|
exports.TimelineLayerEye = TimelineLayerEye;
|
|
105
108
|
const spacerStyle = {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.TimelineList = void 0;
|
|
4
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
5
9
|
const colors_1 = require("../../helpers/colors");
|
|
6
10
|
const TimelineSequenceItem_1 = require("./TimelineSequenceItem");
|
|
7
11
|
const TimelineVirtualization_1 = require("./TimelineVirtualization");
|
|
@@ -10,11 +14,13 @@ const container = {
|
|
|
10
14
|
background: colors_1.BACKGROUND,
|
|
11
15
|
position: 'relative',
|
|
12
16
|
};
|
|
13
|
-
const
|
|
17
|
+
const noConnectedCompositions = [];
|
|
18
|
+
const TimelineListTrack = react_1.default.memo(({ row }) => {
|
|
14
19
|
var _a;
|
|
20
|
+
var _b, _c;
|
|
15
21
|
const { afterDropLineOffset, siblingIndex, track } = row;
|
|
16
|
-
return (jsx_runtime_1.jsx(TimelineSequenceItem_1.TimelineSequenceItem, { afterDropLineOffset: afterDropLineOffset, siblingIndex: siblingIndex, connectedCompositions: (
|
|
17
|
-
};
|
|
22
|
+
return (jsx_runtime_1.jsx(TimelineSequenceItem_1.TimelineSequenceItem, { afterDropLineOffset: afterDropLineOffset, siblingIndex: siblingIndex, connectedCompositions: (_b = track.connectedCompositions) !== null && _b !== void 0 ? _b : noConnectedCompositions, nestedDepth: track.depth, sequence: track.sequence, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset, sequenceFrameOffset: track.sequenceFrameOffset, numberOfHiddenDuplicates: Math.max(0, ((_c = (_a = track.displayGroup) === null || _a === void 0 ? void 0 : _a.numberOfSequences) !== null && _c !== void 0 ? _c : 1) - 1), showProvisionalVisibilityToggle: track.nodePathInfo === null && track.displayGroup !== null }));
|
|
23
|
+
});
|
|
18
24
|
const TimelineList = () => {
|
|
19
25
|
const { rows, tracksEnd, virtualItems } = (0, TimelineVirtualization_1.useTimelineVirtualization)();
|
|
20
26
|
return (jsx_runtime_1.jsx("div", { style: { ...container, height: tracksEnd }, children: virtualItems.map((virtualItem) => (jsx_runtime_1.jsx("div", { style: {
|
|
@@ -39,7 +39,6 @@ const react_1 = __importStar(require("react"));
|
|
|
39
39
|
const colors_1 = require("../../helpers/colors");
|
|
40
40
|
const hoverable_1 = require("../../helpers/hoverable");
|
|
41
41
|
const modals_1 = require("../../state/modals");
|
|
42
|
-
const SettingsContext_1 = require("../SettingsContext");
|
|
43
42
|
const timeline_field_display_utils_1 = require("./timeline-field-display-utils");
|
|
44
43
|
const TimelineArrayField_1 = require("./TimelineArrayField");
|
|
45
44
|
const TimelinePrimitiveFieldValue_1 = require("./TimelinePrimitiveFieldValue");
|
|
@@ -47,6 +46,8 @@ const unsupportedStatusWrapper = {
|
|
|
47
46
|
alignItems: 'center',
|
|
48
47
|
display: 'inline-flex',
|
|
49
48
|
gap: 4,
|
|
49
|
+
maxWidth: '100%',
|
|
50
|
+
minWidth: 0,
|
|
50
51
|
userSelect: 'none',
|
|
51
52
|
WebkitUserSelect: 'none',
|
|
52
53
|
};
|
|
@@ -62,7 +63,11 @@ const computedValue = {
|
|
|
62
63
|
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
63
64
|
fontSize: 12,
|
|
64
65
|
lineHeight: '18px',
|
|
66
|
+
minWidth: 0,
|
|
67
|
+
overflow: 'hidden',
|
|
65
68
|
pointerEvents: 'none',
|
|
69
|
+
textOverflow: 'ellipsis',
|
|
70
|
+
whiteSpace: 'nowrap',
|
|
66
71
|
};
|
|
67
72
|
const fixLinkBase = {
|
|
68
73
|
...(0, hoverable_1.hoverableStyle)({
|
|
@@ -72,6 +77,7 @@ const fixLinkBase = {
|
|
|
72
77
|
hoverColor: colors_1.WHITE,
|
|
73
78
|
}),
|
|
74
79
|
display: 'inline-block',
|
|
80
|
+
flexShrink: 0,
|
|
75
81
|
fontSize: 10,
|
|
76
82
|
fontStyle: 'normal',
|
|
77
83
|
fontWeight: 600,
|
|
@@ -101,7 +107,7 @@ const UnsupportedStatus = ({ label, onFix, formattedValue }) => {
|
|
|
101
107
|
const stopPointerPropagation = (event) => {
|
|
102
108
|
event.stopPropagation();
|
|
103
109
|
};
|
|
104
|
-
return (jsx_runtime_1.jsxs("span", { style: unsupportedStatusWrapper, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), children: [
|
|
110
|
+
return (jsx_runtime_1.jsxs("span", { style: unsupportedStatusWrapper, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), title: formattedValue && typeof label === 'string' ? label : undefined, children: [
|
|
105
111
|
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) => {
|
|
106
112
|
stopMousePropagation(event);
|
|
107
113
|
onFix();
|
|
@@ -110,16 +116,13 @@ const UnsupportedStatus = ({ label, onFix, formattedValue }) => {
|
|
|
110
116
|
exports.UnsupportedStatus = UnsupportedStatus;
|
|
111
117
|
const TimelineNonEditableStatus = ({ propStatus, field, runtimeValue, validatedLocation }) => {
|
|
112
118
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
113
|
-
const { remotionSkillsInfo } = (0, SettingsContext_1.useSettings)();
|
|
114
119
|
const onFix = (0, react_1.useCallback)(() => {
|
|
115
|
-
var _a;
|
|
116
120
|
setSelectedModal({
|
|
117
121
|
type: 'fix-computed-value',
|
|
118
122
|
prop: field.key,
|
|
119
|
-
|
|
120
|
-
remotionInteractivitySkillAvailable: (_a = remotionSkillsInfo === null || remotionSkillsInfo === void 0 ? void 0 : remotionSkillsInfo.remotionInteractivitySkillAvailable) !== null && _a !== void 0 ? _a : false,
|
|
123
|
+
location: validatedLocation,
|
|
121
124
|
});
|
|
122
|
-
}, [field.key,
|
|
125
|
+
}, [field.key, setSelectedModal, validatedLocation]);
|
|
123
126
|
if (propStatus.status === 'computed') {
|
|
124
127
|
return (jsx_runtime_1.jsx(exports.UnsupportedStatus, { label: runtimeValue === undefined
|
|
125
128
|
? 'computed'
|