@remotion/studio 4.0.478 → 4.0.479
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/components/AssetSelector.js +8 -14
- package/dist/components/Button.d.ts +1 -0
- package/dist/components/Button.js +8 -5
- package/dist/components/CompactExplanation.d.ts +12 -0
- package/dist/components/CompactExplanation.js +52 -0
- package/dist/components/CompositionSelector.js +2 -4
- package/dist/components/CurrentAsset.d.ts +3 -1
- package/dist/components/CurrentAsset.js +42 -34
- package/dist/components/CurrentComposition.d.ts +1 -1
- package/dist/components/CurrentComposition.js +38 -31
- package/dist/components/DefaultPropsEditor.d.ts +12 -2
- package/dist/components/DefaultPropsEditor.js +2 -2
- package/dist/components/EffectPickerModal.d.ts +5 -0
- package/dist/components/EffectPickerModal.js +179 -0
- package/dist/components/InspectorInfoHeader.d.ts +11 -0
- package/dist/components/InspectorInfoHeader.js +55 -0
- package/dist/components/InspectorPanel/DefaultInspector.d.ts +8 -0
- package/dist/components/InspectorPanel/DefaultInspector.js +93 -0
- package/dist/components/InspectorPanel/EasingInspector.d.ts +5 -0
- package/dist/components/InspectorPanel/EasingInspector.js +41 -0
- package/dist/components/InspectorPanel/GuideInspector.d.ts +7 -0
- package/dist/components/InspectorPanel/GuideInspector.js +55 -0
- package/dist/components/InspectorPanel/KeyframeInspector.d.ts +7 -0
- package/dist/components/InspectorPanel/KeyframeInspector.js +109 -0
- package/dist/components/InspectorPanel/SelectedInspector.d.ts +5 -0
- package/dist/components/InspectorPanel/SelectedInspector.js +26 -0
- package/dist/components/InspectorPanel/SequenceSelectionInspector.d.ts +5 -0
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +116 -0
- package/dist/components/InspectorPanel/common.d.ts +15 -0
- package/dist/components/InspectorPanel/common.js +18 -0
- package/dist/components/InspectorPanel/inspector-selection.d.ts +10 -0
- package/dist/components/InspectorPanel/inspector-selection.js +34 -0
- package/dist/components/InspectorPanel/styles.d.ts +27 -0
- package/dist/components/InspectorPanel/styles.js +178 -0
- package/dist/components/InspectorPanel/use-track-for-selection.d.ts +2 -0
- package/dist/components/InspectorPanel/use-track-for-selection.js +22 -0
- package/dist/components/InspectorPanel.d.ts +8 -0
- package/dist/components/InspectorPanel.js +26 -0
- package/dist/components/InspectorPanelLayout.d.ts +1 -0
- package/dist/components/InspectorPanelLayout.js +4 -0
- package/dist/components/InspectorSequenceSection.d.ts +16 -0
- package/dist/components/InspectorSequenceSection.js +147 -0
- package/dist/components/InspectorSourceLocation.d.ts +7 -0
- package/dist/components/InspectorSourceLocation.js +71 -0
- package/dist/components/Modals.js +3 -3
- package/dist/components/NewComposition/InputDragger.js +1 -1
- package/dist/components/NewComposition/RemInput.d.ts +1 -0
- package/dist/components/NewComposition/RemInput.js +8 -2
- package/dist/components/NewComposition/RemTextarea.d.ts +1 -0
- package/dist/components/NewComposition/RemTextarea.js +8 -2
- package/dist/components/NewComposition/ValidationMessage.d.ts +3 -0
- package/dist/components/NewComposition/ValidationMessage.js +16 -5
- package/dist/components/OptionsPanel.d.ts +1 -1
- package/dist/components/OptionsPanel.js +8 -17
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +2 -7
- package/dist/components/QuickSwitcher/QuickSwitcherResult.js +3 -10
- package/dist/components/QuickSwitcher/shared.d.ts +4 -0
- package/dist/components/QuickSwitcher/shared.js +24 -0
- package/dist/components/RenderModal/DataEditor.d.ts +29 -2
- package/dist/components/RenderModal/DataEditor.js +107 -56
- package/dist/components/RenderModal/RenderModalJSONPropsEditor.d.ts +1 -0
- package/dist/components/RenderModal/RenderModalJSONPropsEditor.js +25 -7
- package/dist/components/RenderModal/SchemaEditor/Fieldset.d.ts +2 -1
- package/dist/components/RenderModal/SchemaEditor/Fieldset.js +10 -5
- package/dist/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +4 -0
- package/dist/components/RenderModal/SchemaEditor/SchemaEditor.js +27 -4
- package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.d.ts +12 -4
- package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +23 -9
- package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +3 -3
- package/dist/components/RenderModal/SchemaEditor/SchemaSeparationLine.js +8 -1
- package/dist/components/RenderModal/SchemaEditor/ZodColorEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.d.ts +1 -0
- package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.js +23 -6
- package/dist/components/RenderModal/SchemaEditor/ZodFieldValidation.js +2 -2
- package/dist/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +2 -1
- package/dist/components/RenderModal/SchemaEditor/ZodNumberEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodObjectEditor.js +9 -11
- package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodStringEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodTextareaEditor.js +1 -1
- package/dist/components/RenderModal/WarningIndicatorButton.d.ts +1 -0
- package/dist/components/RenderModal/WarningIndicatorButton.js +17 -4
- package/dist/components/RenderModal/get-render-modal-warnings.d.ts +2 -1
- package/dist/components/RenderModal/get-render-modal-warnings.js +6 -3
- package/dist/components/RendersTab.js +1 -1
- package/dist/components/SegmentedControl.d.ts +3 -0
- package/dist/components/SegmentedControl.js +11 -5
- package/dist/components/SelectedOutlineElement.js +57 -24
- package/dist/components/SelectedOutlineOverlay.d.ts +1 -1
- package/dist/components/SelectedOutlineOverlay.js +41 -29
- package/dist/components/SelectedOutlineUvControls.d.ts +9 -0
- package/dist/components/SelectedOutlineUvControls.js +64 -10
- package/dist/components/Tabs/index.js +4 -4
- package/dist/components/Timeline/EasingEditorModal.d.ts +5 -4
- package/dist/components/Timeline/EasingEditorModal.js +597 -124
- package/dist/components/Timeline/KeyframeSettingsModal.d.ts +2 -2
- package/dist/components/Timeline/SubscribeToNodePaths.d.ts +2 -2
- package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +15 -3
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +85 -1
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +10 -3
- package/dist/components/Timeline/TimelineEffectItem.d.ts +2 -2
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +8 -0
- package/dist/components/Timeline/TimelineEffectPropItem.js +24 -20
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +5 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +4 -4
- package/dist/components/Timeline/TimelineExpandedSection.d.ts +1 -1
- package/dist/components/Timeline/TimelineExpandedSection.js +5 -19
- package/dist/components/Timeline/TimelineKeyframeControls.d.ts +8 -2
- package/dist/components/Timeline/TimelineKeyframeControls.js +24 -3
- package/dist/components/Timeline/TimelineKeyframeEasingLine.js +2 -47
- package/dist/components/Timeline/TimelineKeyframedValue.d.ts +1 -1
- package/dist/components/Timeline/TimelineKeyframedValue.js +8 -10
- package/dist/components/Timeline/TimelineNumberField.js +5 -11
- package/dist/components/Timeline/TimelineRotationField.js +5 -6
- package/dist/components/Timeline/TimelineScaleField.js +4 -8
- package/dist/components/Timeline/TimelineSelection.d.ts +6 -0
- package/dist/components/Timeline/TimelineSelection.js +109 -14
- package/dist/components/Timeline/TimelineSequence.js +19 -3
- package/dist/components/Timeline/TimelineSequenceItem.js +12 -67
- package/dist/components/Timeline/TimelineSequencePropItem.d.ts +12 -2
- package/dist/components/Timeline/TimelineSequencePropItem.js +56 -52
- package/dist/components/Timeline/TimelineTransformOriginField.js +4 -5
- package/dist/components/Timeline/TimelineTranslateField.js +4 -5
- package/dist/components/Timeline/TimelineUvCoordinateField.js +4 -4
- package/dist/components/Timeline/call-add-keyframe.d.ts +4 -4
- package/dist/components/Timeline/call-delete-keyframe.d.ts +4 -4
- package/dist/components/Timeline/call-move-keyframe.d.ts +2 -2
- package/dist/components/Timeline/call-update-keyframe-settings.d.ts +3 -3
- package/dist/components/Timeline/delete-selected-timeline-item.d.ts +2 -1
- package/dist/components/Timeline/delete-selected-timeline-item.js +27 -1
- package/dist/components/Timeline/parse-keyframe-field-from-node-path.js +2 -2
- package/dist/components/Timeline/reset-selected-timeline-props.d.ts +3 -3
- package/dist/components/Timeline/reset-selected-timeline-props.js +19 -5
- package/dist/components/Timeline/save-effect-prop.d.ts +2 -2
- package/dist/components/Timeline/save-sequence-prop.d.ts +2 -2
- package/dist/components/Timeline/sequence-props-subscription-store.d.ts +3 -3
- package/dist/components/Timeline/timeline-field-display-utils.d.ts +5 -0
- package/dist/components/Timeline/timeline-field-display-utils.js +244 -0
- package/dist/components/Timeline/update-selected-easing.d.ts +47 -4
- package/dist/components/Timeline/update-selected-easing.js +40 -9
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.d.ts +13 -0
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +73 -0
- package/dist/components/Timeline/use-sequence-props-subscription.d.ts +3 -3
- package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +11 -0
- package/dist/components/Timeline/use-timeline-expanded-tree.js +33 -0
- package/dist/components/VisualControls/VisualControlsContent.d.ts +1 -1
- package/dist/components/VisualControls/VisualControlsContent.js +4 -5
- package/dist/components/effect-drag-and-drop.d.ts +10 -0
- package/dist/components/effect-drag-and-drop.js +17 -8
- package/dist/components/effect-picker-search.d.ts +5 -0
- package/dist/components/effect-picker-search.js +77 -0
- package/dist/components/selected-outline-drag.d.ts +21 -2
- package/dist/components/selected-outline-drag.js +31 -6
- package/dist/components/selected-outline-types.d.ts +7 -7
- package/dist/components/selected-outline-uv.d.ts +4 -3
- package/dist/components/selected-outline-uv.js +6 -2
- package/dist/esm/{chunk-hrw9799x.js → chunk-fge2mq5p.js} +16535 -13311
- package/dist/esm/internals.mjs +16535 -13311
- package/dist/esm/previewEntry.mjs +17141 -13917
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/render-codec-label.d.ts +2 -0
- package/dist/helpers/render-codec-label.js +49 -0
- package/dist/helpers/timeline-layout.d.ts +4 -4
- package/dist/helpers/use-media-metadata.d.ts +8 -2
- package/dist/helpers/use-media-metadata.js +17 -4
- package/dist/state/modals.d.ts +9 -4
- package/package.json +12 -12
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export declare const container: React.CSSProperties;
|
|
3
|
+
export declare const scrollableContainer: React.CSSProperties;
|
|
4
|
+
export declare const defaultPropsSection: React.CSSProperties;
|
|
5
|
+
export declare const visualControlsSection: React.CSSProperties;
|
|
6
|
+
export declare const compositionSection: React.CSSProperties;
|
|
7
|
+
export declare const inspectorSectionDivider: React.CSSProperties;
|
|
8
|
+
export declare const sectionHeader: React.CSSProperties;
|
|
9
|
+
export declare const sequenceHeader: React.CSSProperties;
|
|
10
|
+
export declare const sequenceHeaderTitle: React.CSSProperties;
|
|
11
|
+
export declare const sectionHeaderRow: React.CSSProperties;
|
|
12
|
+
export declare const sectionHeaderTitle: React.CSSProperties;
|
|
13
|
+
export declare const sectionHeaderStart: React.CSSProperties;
|
|
14
|
+
export declare const sectionHeaderEnd: React.CSSProperties;
|
|
15
|
+
export declare const defaultPropsWarningContainer: React.CSSProperties;
|
|
16
|
+
export declare const defaultPropsWarningMessages: React.CSSProperties;
|
|
17
|
+
export declare const resolveLinkStyle: React.CSSProperties;
|
|
18
|
+
export declare const selectedContainer: React.CSSProperties;
|
|
19
|
+
export declare const centeredMessage: React.CSSProperties;
|
|
20
|
+
export declare const detailsContainer: React.CSSProperties;
|
|
21
|
+
export declare const guideDetailsContainer: React.CSSProperties;
|
|
22
|
+
export declare const detailRow: React.CSSProperties;
|
|
23
|
+
export declare const detailLabel: React.CSSProperties;
|
|
24
|
+
export declare const detailValue: React.CSSProperties;
|
|
25
|
+
export declare const keyframeEditorRow: React.CSSProperties;
|
|
26
|
+
export declare const keyframeEditorLabel: React.CSSProperties;
|
|
27
|
+
export declare const keyframeEditorValue: React.CSSProperties;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.keyframeEditorValue = exports.keyframeEditorLabel = exports.keyframeEditorRow = exports.detailValue = exports.detailLabel = exports.detailRow = exports.guideDetailsContainer = exports.detailsContainer = exports.centeredMessage = exports.selectedContainer = exports.resolveLinkStyle = exports.defaultPropsWarningMessages = exports.defaultPropsWarningContainer = exports.sectionHeaderEnd = exports.sectionHeaderStart = exports.sectionHeaderTitle = exports.sectionHeaderRow = exports.sequenceHeaderTitle = exports.sequenceHeader = exports.sectionHeader = exports.inspectorSectionDivider = exports.compositionSection = exports.visualControlsSection = exports.defaultPropsSection = exports.scrollableContainer = exports.container = void 0;
|
|
4
|
+
const colors_1 = require("../../helpers/colors");
|
|
5
|
+
const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
|
|
6
|
+
exports.container = {
|
|
7
|
+
backgroundColor: colors_1.BACKGROUND,
|
|
8
|
+
color: 'white',
|
|
9
|
+
display: 'flex',
|
|
10
|
+
flex: 1,
|
|
11
|
+
flexDirection: 'column',
|
|
12
|
+
height: '100%',
|
|
13
|
+
minHeight: 0,
|
|
14
|
+
};
|
|
15
|
+
exports.scrollableContainer = {
|
|
16
|
+
...exports.container,
|
|
17
|
+
overflowY: 'auto',
|
|
18
|
+
};
|
|
19
|
+
exports.defaultPropsSection = {
|
|
20
|
+
display: 'flex',
|
|
21
|
+
flexDirection: 'column',
|
|
22
|
+
};
|
|
23
|
+
exports.visualControlsSection = {
|
|
24
|
+
display: 'flex',
|
|
25
|
+
flexDirection: 'column',
|
|
26
|
+
};
|
|
27
|
+
exports.compositionSection = {
|
|
28
|
+
display: 'flex',
|
|
29
|
+
flexDirection: 'column',
|
|
30
|
+
};
|
|
31
|
+
exports.inspectorSectionDivider = {
|
|
32
|
+
borderBottom: `1px solid ${colors_1.LINE_COLOR}`,
|
|
33
|
+
};
|
|
34
|
+
exports.sectionHeader = {
|
|
35
|
+
color: colors_1.LIGHT_TEXT,
|
|
36
|
+
fontSize: 12,
|
|
37
|
+
fontWeight: 'bold',
|
|
38
|
+
padding: `8px ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
|
|
39
|
+
};
|
|
40
|
+
exports.sequenceHeader = {
|
|
41
|
+
backgroundColor: colors_1.BACKGROUND,
|
|
42
|
+
display: 'flex',
|
|
43
|
+
flexDirection: 'column',
|
|
44
|
+
minWidth: 0,
|
|
45
|
+
padding: `6px ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px 4px`,
|
|
46
|
+
};
|
|
47
|
+
exports.sequenceHeaderTitle = {
|
|
48
|
+
alignSelf: 'flex-start',
|
|
49
|
+
backgroundColor: colors_1.BACKGROUND,
|
|
50
|
+
border: 'none',
|
|
51
|
+
color: 'white',
|
|
52
|
+
display: 'inline-flex',
|
|
53
|
+
fontFamily: 'sans-serif',
|
|
54
|
+
fontSize: 12,
|
|
55
|
+
lineHeight: '18px',
|
|
56
|
+
margin: 0,
|
|
57
|
+
maxWidth: '100%',
|
|
58
|
+
minWidth: 0,
|
|
59
|
+
overflow: 'hidden',
|
|
60
|
+
padding: 0,
|
|
61
|
+
textAlign: 'left',
|
|
62
|
+
textOverflow: 'ellipsis',
|
|
63
|
+
whiteSpace: 'nowrap',
|
|
64
|
+
};
|
|
65
|
+
exports.sectionHeaderRow = {
|
|
66
|
+
alignItems: 'center',
|
|
67
|
+
display: 'flex',
|
|
68
|
+
gap: 8,
|
|
69
|
+
justifyContent: 'space-between',
|
|
70
|
+
minWidth: 0,
|
|
71
|
+
};
|
|
72
|
+
exports.sectionHeaderTitle = {
|
|
73
|
+
color: colors_1.LIGHT_TEXT,
|
|
74
|
+
flexShrink: 0,
|
|
75
|
+
fontSize: 12,
|
|
76
|
+
fontWeight: 'bold',
|
|
77
|
+
lineHeight: '16px',
|
|
78
|
+
minWidth: 0,
|
|
79
|
+
overflow: 'hidden',
|
|
80
|
+
textOverflow: 'ellipsis',
|
|
81
|
+
whiteSpace: 'nowrap',
|
|
82
|
+
};
|
|
83
|
+
exports.sectionHeaderStart = {
|
|
84
|
+
alignItems: 'center',
|
|
85
|
+
display: 'flex',
|
|
86
|
+
gap: 8,
|
|
87
|
+
minWidth: 0,
|
|
88
|
+
};
|
|
89
|
+
exports.sectionHeaderEnd = {
|
|
90
|
+
alignItems: 'center',
|
|
91
|
+
display: 'flex',
|
|
92
|
+
flexShrink: 0,
|
|
93
|
+
};
|
|
94
|
+
exports.defaultPropsWarningContainer = {
|
|
95
|
+
alignItems: 'flex-start',
|
|
96
|
+
display: 'flex',
|
|
97
|
+
flexDirection: 'column',
|
|
98
|
+
gap: 8,
|
|
99
|
+
padding: `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px 8px`,
|
|
100
|
+
};
|
|
101
|
+
exports.defaultPropsWarningMessages = {
|
|
102
|
+
display: 'flex',
|
|
103
|
+
flexDirection: 'column',
|
|
104
|
+
gap: 8,
|
|
105
|
+
};
|
|
106
|
+
exports.resolveLinkStyle = {
|
|
107
|
+
color: colors_1.BLUE,
|
|
108
|
+
fontFamily: 'sans-serif',
|
|
109
|
+
fontSize: 12,
|
|
110
|
+
textDecoration: 'underline',
|
|
111
|
+
whiteSpace: 'nowrap',
|
|
112
|
+
};
|
|
113
|
+
exports.selectedContainer = {
|
|
114
|
+
backgroundColor: colors_1.BACKGROUND,
|
|
115
|
+
flex: 1,
|
|
116
|
+
minHeight: 0,
|
|
117
|
+
overflowY: 'auto',
|
|
118
|
+
};
|
|
119
|
+
exports.centeredMessage = {
|
|
120
|
+
alignItems: 'center',
|
|
121
|
+
color: colors_1.LIGHT_TEXT,
|
|
122
|
+
display: 'flex',
|
|
123
|
+
flex: 1,
|
|
124
|
+
fontSize: 14,
|
|
125
|
+
justifyContent: 'center',
|
|
126
|
+
padding: 24,
|
|
127
|
+
textAlign: 'center',
|
|
128
|
+
};
|
|
129
|
+
exports.detailsContainer = {
|
|
130
|
+
padding: `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
|
|
131
|
+
};
|
|
132
|
+
exports.guideDetailsContainer = {
|
|
133
|
+
padding: `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
|
|
134
|
+
};
|
|
135
|
+
exports.detailRow = {
|
|
136
|
+
alignItems: 'center',
|
|
137
|
+
display: 'flex',
|
|
138
|
+
gap: 12,
|
|
139
|
+
justifyContent: 'space-between',
|
|
140
|
+
padding: '10px 0',
|
|
141
|
+
};
|
|
142
|
+
exports.detailLabel = {
|
|
143
|
+
color: colors_1.LIGHT_TEXT,
|
|
144
|
+
fontSize: 13,
|
|
145
|
+
};
|
|
146
|
+
exports.detailValue = {
|
|
147
|
+
color: 'white',
|
|
148
|
+
fontSize: 13,
|
|
149
|
+
fontVariantNumeric: 'tabular-nums',
|
|
150
|
+
minWidth: 0,
|
|
151
|
+
textAlign: 'right',
|
|
152
|
+
wordBreak: 'break-word',
|
|
153
|
+
};
|
|
154
|
+
exports.keyframeEditorRow = {
|
|
155
|
+
alignItems: 'flex-start',
|
|
156
|
+
display: 'flex',
|
|
157
|
+
gap: 12,
|
|
158
|
+
justifyContent: 'space-between',
|
|
159
|
+
minWidth: 0,
|
|
160
|
+
padding: '10px 0',
|
|
161
|
+
};
|
|
162
|
+
exports.keyframeEditorLabel = {
|
|
163
|
+
color: colors_1.LIGHT_TEXT,
|
|
164
|
+
fontSize: 13,
|
|
165
|
+
lineHeight: '22px',
|
|
166
|
+
minWidth: 0,
|
|
167
|
+
overflow: 'hidden',
|
|
168
|
+
textOverflow: 'ellipsis',
|
|
169
|
+
whiteSpace: 'nowrap',
|
|
170
|
+
};
|
|
171
|
+
exports.keyframeEditorValue = {
|
|
172
|
+
alignItems: 'center',
|
|
173
|
+
display: 'flex',
|
|
174
|
+
flexShrink: 0,
|
|
175
|
+
justifyContent: 'flex-end',
|
|
176
|
+
minHeight: 22,
|
|
177
|
+
minWidth: 0,
|
|
178
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useTrackForSelection = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const remotion_1 = require("remotion");
|
|
6
|
+
const find_track_for_node_path_info_1 = require("../Timeline/find-track-for-node-path-info");
|
|
7
|
+
const useTrackForSelection = (selection) => {
|
|
8
|
+
const { sequences } = (0, react_1.useContext)(remotion_1.Internals.SequenceManager);
|
|
9
|
+
const { overrideIdToNodePathMappings } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsGettersContext);
|
|
10
|
+
return (0, react_1.useMemo)(() => {
|
|
11
|
+
var _a;
|
|
12
|
+
if (selection.type === 'guide') {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
return ((_a = (0, find_track_for_node_path_info_1.findTrackForNodePathInfo)({
|
|
16
|
+
sequences,
|
|
17
|
+
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
18
|
+
nodePathInfo: selection.nodePathInfo,
|
|
19
|
+
})) !== null && _a !== void 0 ? _a : null);
|
|
20
|
+
}, [overrideIdToNodePathMappings, selection, sequences]);
|
|
21
|
+
};
|
|
22
|
+
exports.useTrackForSelection = useTrackForSelection;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { _InternalTypes } from 'remotion';
|
|
3
|
+
import type { UpdaterFunction } from './RenderModal/SchemaEditor/ZodSwitch';
|
|
4
|
+
export declare const InspectorPanel: React.FC<{
|
|
5
|
+
readonly composition: _InternalTypes['AnyComposition'] | null;
|
|
6
|
+
readonly currentDefaultProps: Record<string, unknown>;
|
|
7
|
+
readonly setDefaultProps: UpdaterFunction<Record<string, unknown>>;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InspectorPanel = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const common_1 = require("./InspectorPanel/common");
|
|
7
|
+
const DefaultInspector_1 = require("./InspectorPanel/DefaultInspector");
|
|
8
|
+
const inspector_selection_1 = require("./InspectorPanel/inspector-selection");
|
|
9
|
+
const SelectedInspector_1 = require("./InspectorPanel/SelectedInspector");
|
|
10
|
+
const styles_1 = require("./InspectorPanel/styles");
|
|
11
|
+
const TimelineSelection_1 = require("./Timeline/TimelineSelection");
|
|
12
|
+
const InspectorPanel = ({ composition, currentDefaultProps, setDefaultProps }) => {
|
|
13
|
+
const { selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
14
|
+
const sameSequencePropInspectorSelection = (0, react_1.useMemo)(() => (0, inspector_selection_1.getSameSequencePropInspectorSelection)(selectedItems), [selectedItems]);
|
|
15
|
+
if (selectedItems.length === 0) {
|
|
16
|
+
return (jsx_runtime_1.jsx(DefaultInspector_1.DefaultInspector, { composition: composition, currentDefaultProps: currentDefaultProps, setDefaultProps: setDefaultProps }));
|
|
17
|
+
}
|
|
18
|
+
if (selectedItems.length > 1) {
|
|
19
|
+
if (sameSequencePropInspectorSelection) {
|
|
20
|
+
return (jsx_runtime_1.jsx("div", { style: styles_1.container, children: jsx_runtime_1.jsx(SelectedInspector_1.SelectedInspector, { selection: sameSequencePropInspectorSelection }) }));
|
|
21
|
+
}
|
|
22
|
+
return (jsx_runtime_1.jsx("div", { style: styles_1.container, children: jsx_runtime_1.jsxs(common_1.InspectorMessage, { children: [selectedItems.length, " items selected"] }) }));
|
|
23
|
+
}
|
|
24
|
+
return (jsx_runtime_1.jsx("div", { style: styles_1.container, children: jsx_runtime_1.jsx(SelectedInspector_1.SelectedInspector, { selection: selectedItems[0] }) }));
|
|
25
|
+
};
|
|
26
|
+
exports.InspectorPanel = InspectorPanel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const INSPECTOR_PANEL_HORIZONTAL_PADDING = 12;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TSequence } from 'remotion';
|
|
3
|
+
import type { CodePosition } from '../error-overlay/react-overlay/utils/get-source-map';
|
|
4
|
+
import type { SequenceNodePathInfo } from '../helpers/get-timeline-sequence-sort-key';
|
|
5
|
+
type SequenceWithControls = TSequence & {
|
|
6
|
+
readonly controls: NonNullable<TSequence['controls']>;
|
|
7
|
+
};
|
|
8
|
+
export declare const hasSequenceControls: (sequence: TSequence) => sequence is SequenceWithControls;
|
|
9
|
+
export declare const InspectorSequenceSection: React.FC<{
|
|
10
|
+
readonly sequence: SequenceWithControls;
|
|
11
|
+
readonly validatedLocation: CodePosition;
|
|
12
|
+
readonly nodePathInfo: SequenceNodePathInfo;
|
|
13
|
+
readonly keyframeDisplayOffset: number;
|
|
14
|
+
readonly renderSectionHeader: (children: React.ReactNode) => React.ReactNode;
|
|
15
|
+
}>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InspectorSequenceSection = exports.hasSequenceControls = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const client_id_1 = require("../helpers/client-id");
|
|
7
|
+
const colors_1 = require("../helpers/colors");
|
|
8
|
+
const timeline_layout_1 = require("../helpers/timeline-layout");
|
|
9
|
+
const plus_1 = require("../icons/plus");
|
|
10
|
+
const modals_1 = require("../state/modals");
|
|
11
|
+
const InlineAction_1 = require("./InlineAction");
|
|
12
|
+
const styles_1 = require("./InspectorPanel/styles");
|
|
13
|
+
const TimelineExpandedRow_1 = require("./Timeline/TimelineExpandedRow");
|
|
14
|
+
const use_timeline_expanded_tree_1 = require("./Timeline/use-timeline-expanded-tree");
|
|
15
|
+
const container = {
|
|
16
|
+
color: 'white',
|
|
17
|
+
display: 'flex',
|
|
18
|
+
flexDirection: 'column',
|
|
19
|
+
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
20
|
+
fontSize: 12,
|
|
21
|
+
};
|
|
22
|
+
const emptyState = {
|
|
23
|
+
color: colors_1.LIGHT_TEXT,
|
|
24
|
+
fontFamily: 'sans-serif',
|
|
25
|
+
fontSize: 12,
|
|
26
|
+
lineHeight: 1.4,
|
|
27
|
+
padding: '0 12px 8px',
|
|
28
|
+
};
|
|
29
|
+
const divider = {
|
|
30
|
+
backgroundColor: colors_1.LINE_COLOR,
|
|
31
|
+
flexShrink: 0,
|
|
32
|
+
height: 1,
|
|
33
|
+
margin: '4px 0',
|
|
34
|
+
};
|
|
35
|
+
const controlsEffectsDivider = {
|
|
36
|
+
...divider,
|
|
37
|
+
margin: '8px 0 4px',
|
|
38
|
+
};
|
|
39
|
+
const effectsHeaderTitle = {
|
|
40
|
+
...styles_1.sectionHeaderTitle,
|
|
41
|
+
flexShrink: 1,
|
|
42
|
+
};
|
|
43
|
+
const plusIcon = {
|
|
44
|
+
width: 15,
|
|
45
|
+
height: 15,
|
|
46
|
+
};
|
|
47
|
+
const isEffectsRoot = (node) => {
|
|
48
|
+
if (node.kind !== 'group' || node.effectInfo !== null) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
const { auxiliaryKeys } = node.nodePathInfo;
|
|
52
|
+
return auxiliaryKeys[auxiliaryKeys.length - 1] === 'effects';
|
|
53
|
+
};
|
|
54
|
+
const getInspectorExpansionKey = (nodePathInfo) => {
|
|
55
|
+
return JSON.stringify(nodePathInfo);
|
|
56
|
+
};
|
|
57
|
+
const hasSequenceControls = (sequence) => {
|
|
58
|
+
return sequence.controls !== null;
|
|
59
|
+
};
|
|
60
|
+
exports.hasSequenceControls = hasSequenceControls;
|
|
61
|
+
const InspectorSequenceSection = ({ sequence, validatedLocation, nodePathInfo, keyframeDisplayOffset, renderSectionHeader, }) => {
|
|
62
|
+
const { tree } = (0, use_timeline_expanded_tree_1.useTimelineExpandedTree)({
|
|
63
|
+
sequence,
|
|
64
|
+
nodePathInfo,
|
|
65
|
+
});
|
|
66
|
+
const [collapsedKeys, setCollapsedKeys] = (0, react_1.useState)(() => new Set());
|
|
67
|
+
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
68
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
69
|
+
const getIsExpanded = (0, react_1.useCallback)((candidate) => {
|
|
70
|
+
return !collapsedKeys.has(getInspectorExpansionKey(candidate));
|
|
71
|
+
}, [collapsedKeys]);
|
|
72
|
+
const toggleTrack = (0, react_1.useCallback)((candidate) => {
|
|
73
|
+
setCollapsedKeys((prev) => {
|
|
74
|
+
const key = getInspectorExpansionKey(candidate);
|
|
75
|
+
const next = new Set(prev);
|
|
76
|
+
if (next.has(key)) {
|
|
77
|
+
next.delete(key);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
next.add(key);
|
|
81
|
+
}
|
|
82
|
+
return next;
|
|
83
|
+
});
|
|
84
|
+
}, []);
|
|
85
|
+
const { controlRows, effectRows } = (0, react_1.useMemo)(() => {
|
|
86
|
+
const controlNodes = [];
|
|
87
|
+
let effectsRoot = null;
|
|
88
|
+
for (const node of tree) {
|
|
89
|
+
if (isEffectsRoot(node)) {
|
|
90
|
+
effectsRoot = node;
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
controlNodes.push(node);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
controlRows: (0, timeline_layout_1.flattenVisibleTreeNodes)({
|
|
98
|
+
nodes: controlNodes,
|
|
99
|
+
getIsExpanded,
|
|
100
|
+
}),
|
|
101
|
+
effectRows: effectsRoot === null
|
|
102
|
+
? []
|
|
103
|
+
: (0, timeline_layout_1.flattenVisibleTreeNodes)({
|
|
104
|
+
nodes: effectsRoot.children,
|
|
105
|
+
getIsExpanded,
|
|
106
|
+
}),
|
|
107
|
+
};
|
|
108
|
+
}, [getIsExpanded, tree]);
|
|
109
|
+
const { schema } = sequence.controls;
|
|
110
|
+
const showEffectsSection = nodePathInfo.supportsEffects || effectRows.length > 0;
|
|
111
|
+
const showControlsEffectsDivider = controlRows.length > 0 && showEffectsSection;
|
|
112
|
+
const canAddEffect = nodePathInfo.supportsEffects &&
|
|
113
|
+
previewServerState.type === 'connected' &&
|
|
114
|
+
Boolean(validatedLocation.source);
|
|
115
|
+
const onAddEffect = (0, react_1.useCallback)(() => {
|
|
116
|
+
if (!canAddEffect || previewServerState.type !== 'connected') {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
setSelectedModal({
|
|
120
|
+
type: 'add-effect',
|
|
121
|
+
clientId: previewServerState.clientId,
|
|
122
|
+
fileName: validatedLocation.source,
|
|
123
|
+
nodePath: nodePathInfo.sequenceSubscriptionKey,
|
|
124
|
+
});
|
|
125
|
+
}, [
|
|
126
|
+
canAddEffect,
|
|
127
|
+
nodePathInfo.sequenceSubscriptionKey,
|
|
128
|
+
previewServerState,
|
|
129
|
+
setSelectedModal,
|
|
130
|
+
validatedLocation.source,
|
|
131
|
+
]);
|
|
132
|
+
const renderEffectsHeader = () => {
|
|
133
|
+
return renderSectionHeader(jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderRow, children: [
|
|
134
|
+
jsx_runtime_1.jsx("div", { style: effectsHeaderTitle, children: "Effects" }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { disabled: !canAddEffect, onClick: onAddEffect, title: canAddEffect ? 'Add effect' : undefined, renderAction: (color) => jsx_runtime_1.jsx(plus_1.Plus, { color: color, style: plusIcon }) })] }));
|
|
135
|
+
};
|
|
136
|
+
const renderRow = ({ node, depth }) => {
|
|
137
|
+
return (jsx_runtime_1.jsx(TimelineExpandedRow_1.TimelineExpandedRow, { node: node, depth: depth, nestedDepth: 0, rowDepthBase: 0, getIsExpanded: getIsExpanded, toggleTrack: toggleTrack, validatedLocation: validatedLocation, nodePath: nodePathInfo.sequenceSubscriptionKey, schema: schema, keyframeDisplayOffset: keyframeDisplayOffset, keyframeControlsMode: "inspector" }, JSON.stringify(node.nodePathInfo)));
|
|
138
|
+
};
|
|
139
|
+
if (controlRows.length === 0 && !showEffectsSection) {
|
|
140
|
+
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
141
|
+
jsx_runtime_1.jsx("div", { style: divider }), jsx_runtime_1.jsx("div", { style: emptyState, children: "No schema" })
|
|
142
|
+
] }));
|
|
143
|
+
}
|
|
144
|
+
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
145
|
+
jsx_runtime_1.jsx("div", { style: divider }), controlRows.length > 0 ? renderSectionHeader('Controls') : null, controlRows.map(renderRow), showEffectsSection ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [showControlsEffectsDivider ? (jsx_runtime_1.jsx("div", { style: controlsEffectsDivider })) : null, renderEffectsHeader(), effectRows.length === 0 ? (jsx_runtime_1.jsx("div", { style: emptyState, children: "None" })) : (effectRows.map(renderRow))] })) : null] }));
|
|
146
|
+
};
|
|
147
|
+
exports.InspectorSequenceSection = InspectorSequenceSection;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { OriginalPosition } from '../error-overlay/react-overlay/utils/get-source-map';
|
|
3
|
+
export declare const InspectorSourceLocation: React.FC<{
|
|
4
|
+
readonly location: OriginalPosition | null;
|
|
5
|
+
readonly canOpen: boolean;
|
|
6
|
+
readonly onOpen: () => void;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InspectorSourceLocation = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const colors_1 = require("../helpers/colors");
|
|
7
|
+
const format_file_location_1 = require("../helpers/format-file-location");
|
|
8
|
+
const source_attribution_1 = require("./Timeline/TimelineStack/source-attribution");
|
|
9
|
+
const sourceLocationStyle = {
|
|
10
|
+
alignSelf: 'flex-start',
|
|
11
|
+
appearance: 'none',
|
|
12
|
+
backgroundColor: colors_1.BACKGROUND,
|
|
13
|
+
border: 'none',
|
|
14
|
+
boxSizing: 'border-box',
|
|
15
|
+
display: 'block',
|
|
16
|
+
fontFamily: 'sans-serif',
|
|
17
|
+
fontSize: 12,
|
|
18
|
+
height: 18,
|
|
19
|
+
lineHeight: '18px',
|
|
20
|
+
margin: 0,
|
|
21
|
+
maxWidth: '100%',
|
|
22
|
+
overflow: 'hidden',
|
|
23
|
+
padding: 0,
|
|
24
|
+
textAlign: 'left',
|
|
25
|
+
textDecoration: 'none',
|
|
26
|
+
textOverflow: 'ellipsis',
|
|
27
|
+
whiteSpace: 'nowrap',
|
|
28
|
+
width: 'fit-content',
|
|
29
|
+
};
|
|
30
|
+
const InspectorSourceLocation = ({ location, canOpen, onOpen }) => {
|
|
31
|
+
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
32
|
+
const validLocation = (0, react_1.useMemo)(() => {
|
|
33
|
+
if (!(location === null || location === void 0 ? void 0 : location.source) || location.line === null) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
return location;
|
|
37
|
+
}, [location]);
|
|
38
|
+
const fileLocation = (0, react_1.useMemo)(() => {
|
|
39
|
+
if (!validLocation) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
return (0, format_file_location_1.formatFileLocation)({
|
|
43
|
+
location: validLocation,
|
|
44
|
+
root: window.remotion_cwd,
|
|
45
|
+
});
|
|
46
|
+
}, [validLocation]);
|
|
47
|
+
const label = (0, react_1.useMemo)(() => {
|
|
48
|
+
if (!validLocation) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
return (0, source_attribution_1.getOriginalSourceAttribution)(validLocation);
|
|
52
|
+
}, [validLocation]);
|
|
53
|
+
const style = (0, react_1.useMemo)(() => {
|
|
54
|
+
return {
|
|
55
|
+
...sourceLocationStyle,
|
|
56
|
+
color: hovered ? colors_1.LIGHT_COLOR : colors_1.LIGHT_TEXT,
|
|
57
|
+
cursor: canOpen ? 'pointer' : 'default',
|
|
58
|
+
};
|
|
59
|
+
}, [canOpen, hovered]);
|
|
60
|
+
const onClick = (0, react_1.useCallback)(() => {
|
|
61
|
+
if (!canOpen) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
onOpen();
|
|
65
|
+
}, [canOpen, onOpen]);
|
|
66
|
+
if (!label) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
return (jsx_runtime_1.jsx("button", { type: "button", style: style, title: fileLocation !== null && fileLocation !== void 0 ? fileLocation : undefined, onClick: onClick, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), children: label }));
|
|
70
|
+
};
|
|
71
|
+
exports.InspectorSourceLocation = InspectorSourceLocation;
|
|
@@ -10,6 +10,7 @@ const client_id_1 = require("../helpers/client-id");
|
|
|
10
10
|
const modals_1 = require("../state/modals");
|
|
11
11
|
const AskAiModal_1 = require("./AskAiModal");
|
|
12
12
|
const ConfirmationDialog_1 = require("./ConfirmationDialog");
|
|
13
|
+
const EffectPickerModal_1 = require("./EffectPickerModal");
|
|
13
14
|
const InstallPackage_1 = require("./InstallPackage");
|
|
14
15
|
const DeleteComposition_1 = require("./NewComposition/DeleteComposition");
|
|
15
16
|
const DeleteFolder_1 = require("./NewComposition/DeleteFolder");
|
|
@@ -22,7 +23,6 @@ const QuickSwitcher_1 = __importDefault(require("./QuickSwitcher/QuickSwitcher")
|
|
|
22
23
|
const RenderStatusModal_1 = require("./RenderModal/RenderStatusModal");
|
|
23
24
|
const ServerRenderModal_1 = require("./RenderModal/ServerRenderModal");
|
|
24
25
|
const WebRenderModal_1 = require("./RenderModal/WebRenderModal");
|
|
25
|
-
const EasingEditorModal_1 = require("./Timeline/EasingEditorModal");
|
|
26
26
|
const KeyframeSettingsModal_1 = require("./Timeline/KeyframeSettingsModal");
|
|
27
27
|
const UpdateModal_1 = require("./UpdateModal/UpdateModal");
|
|
28
28
|
const Modals = ({ readOnlyStudio }) => {
|
|
@@ -30,8 +30,8 @@ const Modals = ({ readOnlyStudio }) => {
|
|
|
30
30
|
const { selectedModal: modalContextType } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
31
31
|
const canRender = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx).previewServerState.type ===
|
|
32
32
|
'connected';
|
|
33
|
-
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'duplicate-comp' && (jsx_runtime_1.jsx(DuplicateComposition_1.DuplicateComposition, { compositionType: modalContextType.compositionType, compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-comp' && (jsx_runtime_1.jsx(DeleteComposition_1.DeleteComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'rename-comp' && (jsx_runtime_1.jsx(RenameComposition_1.RenameComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-folder' && (jsx_runtime_1.jsx(DeleteFolder_1.DeleteFolder, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'rename-folder' && (jsx_runtime_1.jsx(RenameFolder_1.RenameFolder, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'rename-static-file' && (jsx_runtime_1.jsx(RenameStaticFile_1.RenameStaticFileModal, { relativePath: modalContextType.relativePath })), modalContextType && modalContextType.type === 'input-props-override' && (jsx_runtime_1.jsx(OverrideInputProps_1.OverrideInputPropsModal, {})), modalContextType && modalContextType.type === 'keyframe-settings' && (jsx_runtime_1.jsx(KeyframeSettingsModal_1.KeyframeSettingsModal, { state: modalContextType })), modalContextType && modalContextType.type === '
|
|
33
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'duplicate-comp' && (jsx_runtime_1.jsx(DuplicateComposition_1.DuplicateComposition, { compositionType: modalContextType.compositionType, compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-comp' && (jsx_runtime_1.jsx(DeleteComposition_1.DeleteComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'rename-comp' && (jsx_runtime_1.jsx(RenameComposition_1.RenameComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-folder' && (jsx_runtime_1.jsx(DeleteFolder_1.DeleteFolder, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'rename-folder' && (jsx_runtime_1.jsx(RenameFolder_1.RenameFolder, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'rename-static-file' && (jsx_runtime_1.jsx(RenameStaticFile_1.RenameStaticFileModal, { relativePath: modalContextType.relativePath })), modalContextType && modalContextType.type === 'input-props-override' && (jsx_runtime_1.jsx(OverrideInputProps_1.OverrideInputPropsModal, {})), modalContextType && modalContextType.type === 'keyframe-settings' && (jsx_runtime_1.jsx(KeyframeSettingsModal_1.KeyframeSettingsModal, { state: modalContextType })), modalContextType && modalContextType.type === 'web-render' && (jsx_runtime_1.jsx(WebRenderModal_1.WebRenderModalWithLoader, { ...modalContextType })), modalContextType &&
|
|
34
34
|
modalContextType.type === 'server-render' &&
|
|
35
|
-
(canRender || modalContextType.readOnlyStudio) ? (jsx_runtime_1.jsx(ServerRenderModal_1.RenderModalWithLoader, { readOnlyStudio: (_a = modalContextType.readOnlyStudio) !== null && _a !== void 0 ? _a : false, initialFrame: modalContextType.initialFrame, initialDarkMode: modalContextType.initialDarkMode, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialScale: modalContextType.initialScale, initialLogLevel: modalContextType.initialLogLevel, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialOffthreadVideoThreads: modalContextType.initialOffthreadVideoThreads, initialMediaCacheSizeInBytes: modalContextType.initialMediaCacheSizeInBytes, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialGopSize: modalContextType.initialGopSize, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, initialEncodingBufferSize: modalContextType.initialEncodingBufferSize, initialEncodingMaxRate: modalContextType.initialEncodingMaxRate, initialUserAgent: modalContextType.initialUserAgent, initialColorSpace: modalContextType.initialColorSpace, initialMultiProcessOnLinux: modalContextType.initialMultiProcessOnLinux, initialRepro: modalContextType.initialRepro, initialBeep: modalContextType.initialBeep, initialForSeamlessAacConcatenation: modalContextType.initialForSeamlessAacConcatenation, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, defaultConfigurationAudioCodec: modalContextType.defaultConfigurationAudioCodec, defaultConfigurationVideoCodec: modalContextType.defaultConfigurationVideoCodec, renderTypeOfLastRender: modalContextType.renderTypeOfLastRender, defaultMetadata: modalContextType.defaulMetadata, initialHardwareAcceleration: modalContextType.initialHardwareAcceleration, initialSampleRate: modalContextType.initialSampleRate, initialChromeMode: modalContextType.initialChromeMode, renderDefaults: modalContextType.renderDefaults })) : null, modalContextType && modalContextType.type === 'render-progress' && (jsx_runtime_1.jsx(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'update' && (jsx_runtime_1.jsx(UpdateModal_1.UpdateModal, { info: modalContextType.info, knownBugs: modalContextType.knownBugs })), modalContextType && modalContextType.type === 'install-packages' && (jsx_runtime_1.jsx(InstallPackage_1.InstallPackageModal, { packageManager: modalContextType.packageManager })), modalContextType && modalContextType.type === 'quick-switcher' && (jsx_runtime_1.jsx(QuickSwitcher_1.default, { readOnlyStudio: readOnlyStudio, invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode })), modalContextType && modalContextType.type === 'confirmation-dialog' && (jsx_runtime_1.jsx(ConfirmationDialog_1.ConfirmationDialog, { state: modalContextType })), process.env.ASK_AI_ENABLED && jsx_runtime_1.jsx(AskAiModal_1.AskAiModal, {})] }));
|
|
35
|
+
(canRender || modalContextType.readOnlyStudio) ? (jsx_runtime_1.jsx(ServerRenderModal_1.RenderModalWithLoader, { readOnlyStudio: (_a = modalContextType.readOnlyStudio) !== null && _a !== void 0 ? _a : false, initialFrame: modalContextType.initialFrame, initialDarkMode: modalContextType.initialDarkMode, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialScale: modalContextType.initialScale, initialLogLevel: modalContextType.initialLogLevel, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialOffthreadVideoThreads: modalContextType.initialOffthreadVideoThreads, initialMediaCacheSizeInBytes: modalContextType.initialMediaCacheSizeInBytes, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialGopSize: modalContextType.initialGopSize, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, initialEncodingBufferSize: modalContextType.initialEncodingBufferSize, initialEncodingMaxRate: modalContextType.initialEncodingMaxRate, initialUserAgent: modalContextType.initialUserAgent, initialColorSpace: modalContextType.initialColorSpace, initialMultiProcessOnLinux: modalContextType.initialMultiProcessOnLinux, initialRepro: modalContextType.initialRepro, initialBeep: modalContextType.initialBeep, initialForSeamlessAacConcatenation: modalContextType.initialForSeamlessAacConcatenation, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, defaultConfigurationAudioCodec: modalContextType.defaultConfigurationAudioCodec, defaultConfigurationVideoCodec: modalContextType.defaultConfigurationVideoCodec, renderTypeOfLastRender: modalContextType.renderTypeOfLastRender, defaultMetadata: modalContextType.defaulMetadata, initialHardwareAcceleration: modalContextType.initialHardwareAcceleration, initialSampleRate: modalContextType.initialSampleRate, initialChromeMode: modalContextType.initialChromeMode, renderDefaults: modalContextType.renderDefaults })) : null, modalContextType && modalContextType.type === 'render-progress' && (jsx_runtime_1.jsx(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'update' && (jsx_runtime_1.jsx(UpdateModal_1.UpdateModal, { info: modalContextType.info, knownBugs: modalContextType.knownBugs })), modalContextType && modalContextType.type === 'install-packages' && (jsx_runtime_1.jsx(InstallPackage_1.InstallPackageModal, { packageManager: modalContextType.packageManager })), modalContextType && modalContextType.type === 'quick-switcher' && (jsx_runtime_1.jsx(QuickSwitcher_1.default, { readOnlyStudio: readOnlyStudio, invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode })), modalContextType && modalContextType.type === 'add-effect' && (jsx_runtime_1.jsx(EffectPickerModal_1.EffectPickerModal, { state: modalContextType })), modalContextType && modalContextType.type === 'confirmation-dialog' && (jsx_runtime_1.jsx(ConfirmationDialog_1.ConfirmationDialog, { state: modalContextType })), process.env.ASK_AI_ENABLED && jsx_runtime_1.jsx(AskAiModal_1.AskAiModal, {})] }));
|
|
36
36
|
};
|
|
37
37
|
exports.Modals = Modals;
|
|
@@ -207,7 +207,7 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
|
|
|
207
207
|
});
|
|
208
208
|
}, [_min, _step, snapToStep]);
|
|
209
209
|
if (inputFallback) {
|
|
210
|
-
return (jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onEscape: onEscape, onOutsideClick: noop_1.noop, children: jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: fallbackRef, autoFocus: true, onKeyPress: onKeyPress, onBlur: onBlur, onChange: onInputChange, min: _min, max: _max, step: deriveStep, defaultValue: value, status: status, pattern: '[0-9]*[.]?[0-9]*', rightAlign: rightAlign,
|
|
210
|
+
return (jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onEscape: onEscape, onOutsideClick: noop_1.noop, children: jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: fallbackRef, autoFocus: true, onKeyPress: onKeyPress, onBlur: onBlur, onChange: onInputChange, min: _min, max: _max, step: deriveStep, defaultValue: value, status: status, pattern: '[0-9]*[.]?[0-9]*', rightAlign: rightAlign, small: small, ...props }) }));
|
|
211
211
|
}
|
|
212
212
|
return (jsx_runtime_1.jsx("button", { ref: ref, type: "button", className: '__remotion_input_dragger', style: style, onClick: onClick, onFocus: onFocus, onPointerDown: onPointerDown, children: jsx_runtime_1.jsx("span", { style: span, children: formatter(value) }) }));
|
|
213
213
|
};
|
|
@@ -4,6 +4,7 @@ export type RemInputStatus = 'error' | 'warning' | 'ok';
|
|
|
4
4
|
type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> & {
|
|
5
5
|
readonly status: RemInputStatus;
|
|
6
6
|
readonly rightAlign: boolean;
|
|
7
|
+
readonly small?: boolean;
|
|
7
8
|
};
|
|
8
9
|
export declare const INPUT_HORIZONTAL_PADDING = 8;
|
|
9
10
|
export declare const RightAlignInput: React.FC<PropsWithChildren>;
|
|
@@ -20,6 +20,11 @@ exports.inputBaseStyle = {
|
|
|
20
20
|
borderWidth: 1,
|
|
21
21
|
fontSize: 14,
|
|
22
22
|
};
|
|
23
|
+
const compactInputStyle = {
|
|
24
|
+
fontSize: 12,
|
|
25
|
+
lineHeight: '16px',
|
|
26
|
+
padding: '4px 6px',
|
|
27
|
+
};
|
|
23
28
|
const getInputBorderColor = ({ status, isFocused, isHovered, }) => status === 'warning'
|
|
24
29
|
? colors_1.WARNING_COLOR
|
|
25
30
|
: status === 'error'
|
|
@@ -30,7 +35,7 @@ const getInputBorderColor = ({ status, isFocused, isHovered, }) => status === 'w
|
|
|
30
35
|
? colors_1.INPUT_BORDER_COLOR_HOVERED
|
|
31
36
|
: colors_1.INPUT_BORDER_COLOR_UNHOVERED;
|
|
32
37
|
exports.getInputBorderColor = getInputBorderColor;
|
|
33
|
-
const RemInputForwardRef = ({ status, rightAlign, ...props }, ref) => {
|
|
38
|
+
const RemInputForwardRef = ({ status, rightAlign, small = false, ...props }, ref) => {
|
|
34
39
|
const [isFocused, setIsFocused] = (0, react_1.useState)(false);
|
|
35
40
|
const [isHovered, setIsHovered] = (0, react_1.useState)(false);
|
|
36
41
|
const inputRef = (0, react_1.useRef)(null);
|
|
@@ -40,12 +45,13 @@ const RemInputForwardRef = ({ status, rightAlign, ...props }, ref) => {
|
|
|
40
45
|
return {
|
|
41
46
|
backgroundColor: colors_1.INPUT_BACKGROUND,
|
|
42
47
|
...exports.inputBaseStyle,
|
|
48
|
+
...(small ? compactInputStyle : null),
|
|
43
49
|
width: '100%',
|
|
44
50
|
borderColor: (0, exports.getInputBorderColor)({ isFocused, isHovered, status }),
|
|
45
51
|
textAlign: rightAlign ? 'right' : 'left',
|
|
46
52
|
...((_a = props.style) !== null && _a !== void 0 ? _a : {}),
|
|
47
53
|
};
|
|
48
|
-
}, [isFocused, isHovered, rightAlign, props.style, status]);
|
|
54
|
+
}, [isFocused, isHovered, rightAlign, props.style, small, status]);
|
|
49
55
|
(0, react_1.useImperativeHandle)(ref, () => {
|
|
50
56
|
return inputRef.current;
|
|
51
57
|
}, []);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement> & {
|
|
3
3
|
readonly status: 'error' | 'warning' | 'ok';
|
|
4
|
+
readonly small?: boolean;
|
|
4
5
|
};
|
|
5
6
|
export declare const RemTextarea: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
6
7
|
export {};
|