@remotion/studio 4.0.515 → 4.0.517
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/restart-studio.js +4 -0
- package/dist/components/AssetSelector.js +4 -10
- package/dist/components/AssetSelectorItem.d.ts +2 -1
- package/dist/components/AssetSelectorItem.js +24 -29
- package/dist/components/Canvas.js +21 -15
- package/dist/components/CanvasCaptureDropHandler.d.ts +4 -0
- package/dist/components/CanvasCaptureDropHandler.js +42 -0
- package/dist/components/CanvasOrLoading.js +4 -3
- package/dist/components/CaptionInspector.d.ts +2 -0
- package/dist/components/CaptionInspector.js +3 -5
- package/dist/components/CheckboardToggle.js +1 -1
- package/dist/components/Checkbox.d.ts +0 -1
- package/dist/components/Checkbox.js +2 -19
- package/dist/components/CompositionSelector.js +6 -3
- package/dist/components/CompositionSelectorItem.js +9 -10
- package/dist/components/ConfigSelect.d.ts +17 -0
- package/dist/components/ConfigSelect.js +50 -0
- package/dist/components/ConfigureLicenseModal.js +79 -46
- package/dist/components/CurrentAsset.d.ts +10 -2
- package/dist/components/CurrentAsset.js +143 -45
- package/dist/components/Editor.js +2 -1
- package/dist/components/EditorContent.js +5 -2
- package/dist/components/EditorContexts.js +2 -1
- package/dist/components/EditorRuler/Ruler.d.ts +1 -0
- package/dist/components/EditorRuler/Ruler.js +9 -8
- package/dist/components/EditorRuler/index.d.ts +1 -0
- package/dist/components/EditorRuler/index.js +3 -4
- package/dist/components/EditorRuler/use-is-ruler-visible.d.ts +1 -1
- package/dist/components/EditorRuler/use-is-ruler-visible.js +8 -2
- package/dist/components/ElementLibraryModal.d.ts +5 -0
- package/dist/components/ElementLibraryModal.js +38 -0
- package/dist/components/FilePreview.js +71 -0
- package/dist/components/FixComputedValueModal.js +54 -51
- package/dist/components/GlobalKeybindings.js +5 -5
- package/dist/components/InlineAction.d.ts +1 -1
- package/dist/components/InlineAction.js +12 -2
- package/dist/components/InlineCaptionInspector.d.ts +2 -0
- package/dist/components/InlineCaptionInspector.js +2 -2
- package/dist/components/InlineCompositionName.js +1 -1
- package/dist/components/InlineEditableTitle.js +5 -4
- package/dist/components/InspectorInfoHeader.js +1 -1
- package/dist/components/InspectorOpenInEditor.js +48 -72
- package/dist/components/InspectorPanel/AlignmentControls.js +2 -3
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.d.ts +7 -0
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +39 -0
- package/dist/components/InspectorPanel/CompositionInspector.js +25 -45
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +2 -2
- package/dist/components/InspectorPanel/CompositionMetadata.js +11 -4
- package/dist/components/InspectorPanel/EasingInspector.js +2 -2
- package/dist/components/InspectorPanel/ElementLibraryButton.d.ts +2 -0
- package/dist/components/InspectorPanel/ElementLibraryButton.js +139 -0
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +10 -4
- package/dist/components/InspectorPanel/KeyframeInspector.js +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +14 -6
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +2 -7
- package/dist/components/InspectorPanel/common.d.ts +0 -13
- package/dist/components/InspectorPanel/common.js +6 -59
- package/dist/components/InspectorPanel/inspector-selection.d.ts +2 -2
- package/dist/components/InspectorPanel/styles.d.ts +0 -1
- package/dist/components/InspectorPanel/styles.js +3 -4
- package/dist/components/InspectorPanel/use-composition-actions.js +0 -1
- package/dist/components/InspectorPanel/use-track-for-selection.d.ts +1 -2
- package/dist/components/InspectorPanelLayout.d.ts +1 -1
- package/dist/components/InspectorPanelLayout.js +1 -1
- package/dist/components/InspectorSequenceSection.d.ts +1 -2
- package/dist/components/InspectorSequenceSection.js +40 -54
- package/dist/components/InspectorSourceLocation.js +1 -1
- package/dist/components/InstallPackage.d.ts +2 -1
- package/dist/components/InstallPackage.js +60 -30
- package/dist/components/InstallablePackage.js +37 -11
- package/dist/components/KeyboardShortcutsSettings.d.ts +2 -0
- package/dist/components/KeyboardShortcutsSettings.js +177 -0
- package/dist/components/Menu/MenuItem.js +15 -6
- package/dist/components/MenuBuildIndicator.js +1 -1
- package/dist/components/MenuToolbar.js +7 -3
- package/dist/components/Modals.js +7 -5
- package/dist/components/NewComposition/CodemodFooter.d.ts +0 -1
- package/dist/components/NewComposition/CodemodFooter.js +2 -8
- package/dist/components/NewComposition/DeleteComposition.js +1 -1
- package/dist/components/NewComposition/DeleteFolder.js +1 -1
- package/dist/components/NewComposition/DuplicateComposition.js +1 -1
- package/dist/components/NewComposition/InputDragger.js +27 -4
- package/dist/components/NewComposition/NewComposition.js +1 -1
- package/dist/components/NewComposition/NewFolder.js +1 -3
- package/dist/components/NewComposition/RenameComposition.js +1 -1
- package/dist/components/NewComposition/RenameFolder.js +1 -1
- package/dist/components/NewComposition/use-rename-static-file.js +1 -1
- package/dist/components/Notifications/NotificationCenter.d.ts +1 -0
- package/dist/components/Notifications/NotificationCenter.js +5 -0
- package/dist/components/OptionsPanel.js +9 -12
- package/dist/components/PlaybackRateSelector.js +1 -1
- package/dist/components/Preview.js +83 -5
- package/dist/components/PreviewToolbar.js +12 -3
- package/dist/components/PreviewToolbarOverflowButton.d.ts +1 -0
- package/dist/components/PreviewToolbarOverflowButton.js +39 -2
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +2 -2
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +14 -30
- package/dist/components/RadioButton.d.ts +6 -0
- package/dist/components/RadioButton.js +62 -0
- package/dist/components/RenderButton.js +68 -184
- package/dist/components/RenderModal/DataEditor.js +15 -12
- package/dist/components/RenderModal/RenderStatusModal.js +0 -1
- package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +3 -1
- package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.d.ts +15 -0
- package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.js +95 -0
- package/dist/components/RenderQueue/RenderQueueRemoveItem.js +1 -6
- package/dist/components/RenderingSettings.js +7 -4
- package/dist/components/RulersAndGuidesToggle.d.ts +4 -0
- package/dist/components/RulersAndGuidesToggle.js +34 -0
- package/dist/components/SegmentedButton.d.ts +29 -0
- package/dist/components/SegmentedButton.js +226 -0
- package/dist/components/SelectedOutlineEditingHandles.d.ts +16 -0
- package/dist/components/SelectedOutlineEditingHandles.js +66 -0
- package/dist/components/SelectedOutlineElement.d.ts +2 -4
- package/dist/components/SelectedOutlineElement.js +15 -54
- package/dist/components/SelectedOutlineOverlay.js +32 -6
- package/dist/components/SelectedOutlinePolygon.d.ts +4 -6
- package/dist/components/SelectedOutlinePolygon.js +18 -16
- package/dist/components/SelectedOutlineRenderer.d.ts +1 -2
- package/dist/components/SelectedOutlineRenderer.js +66 -14
- package/dist/components/SelectedOutlineUvControls.d.ts +1 -1
- package/dist/components/SettingsModal.d.ts +1 -1
- package/dist/components/SettingsModal.js +30 -7
- package/dist/components/SettingsModalFooter.d.ts +3 -1
- package/dist/components/SettingsModalFooter.js +20 -4
- package/dist/components/ShowPixelGridProvider.d.ts +4 -0
- package/dist/components/ShowPixelGridProvider.js +24 -0
- package/dist/components/SidebarCollapserControls.js +2 -2
- package/dist/components/SkillsSettings.d.ts +2 -0
- package/dist/components/SkillsSettings.js +129 -0
- package/dist/components/StaticFilePreview.js +7 -1
- package/dist/components/StudioSettings.js +7 -48
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/Timeline/Timeline.js +41 -1
- package/dist/components/Timeline/TimelineAssetField.d.ts +1 -1
- package/dist/components/Timeline/TimelineAssetField.js +15 -9
- package/dist/components/Timeline/TimelineBooleanField.js +1 -4
- package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +6 -7
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +7 -10
- package/dist/components/Timeline/TimelineDragHandler.js +11 -4
- package/dist/components/Timeline/TimelineEffectItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectItem.js +23 -10
- package/dist/components/Timeline/TimelineEffectPropItem.js +15 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +5 -4
- package/dist/components/Timeline/TimelineFieldLabel.js +4 -2
- package/dist/components/Timeline/TimelineFieldRowContent.d.ts +1 -2
- package/dist/components/Timeline/TimelineFieldRowContent.js +8 -21
- package/dist/components/Timeline/TimelineImageInfo.d.ts +0 -1
- package/dist/components/Timeline/TimelineImageInfo.js +13 -32
- package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -2
- package/dist/components/Timeline/TimelineKeyframeControls.js +10 -4
- package/dist/components/Timeline/TimelinePlayCursorSyncer.js +4 -2
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
- package/dist/components/Timeline/TimelineRotationField.js +0 -2
- package/dist/components/Timeline/TimelineRowChrome.d.ts +0 -1
- package/dist/components/Timeline/TimelineRowChrome.js +3 -4
- package/dist/components/Timeline/TimelineRowLayoutContext.d.ts +0 -1
- package/dist/components/Timeline/TimelineRowLayoutContext.js +1 -4
- package/dist/components/Timeline/TimelineScaleField.js +2 -6
- package/dist/components/Timeline/TimelineSchemaField.js +9 -3
- package/dist/components/Timeline/TimelineSelection.d.ts +29 -66
- package/dist/components/Timeline/TimelineSelection.js +31 -171
- package/dist/components/Timeline/TimelineSequence.d.ts +2 -0
- package/dist/components/Timeline/TimelineSequence.js +110 -19
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +13 -11
- package/dist/components/Timeline/TimelineSequencePropItem.js +15 -2
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +7 -6
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +85 -91
- package/dist/components/Timeline/TimelineTrack.js +1 -1
- package/dist/components/Timeline/TimelineTransformOriginField.js +0 -4
- package/dist/components/Timeline/TimelineTranslateField.js +0 -4
- package/dist/components/Timeline/TimelineVirtualization.js +3 -1
- package/dist/components/Timeline/delete-selected-timeline-item.d.ts +3 -4
- package/dist/components/Timeline/duplicate-selected-timeline-item.d.ts +3 -4
- package/dist/components/Timeline/duplicate-selected-timeline-item.js +3 -12
- package/dist/components/Timeline/find-track-for-node-path-info.d.ts +1 -1
- package/dist/components/Timeline/get-copy-context-for-agents-menu-item.d.ts +4 -0
- package/dist/components/Timeline/get-copy-context-for-agents-menu-item.js +26 -0
- package/dist/components/Timeline/get-sequence-context-menu-items.js +2 -19
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.d.ts +6 -1
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.js +11 -4
- package/dist/components/Timeline/keyframe-clipboard.d.ts +2 -3
- package/dist/components/Timeline/reset-selected-timeline-props.d.ts +2 -3
- package/dist/components/Timeline/sequence-prop-clipboard.d.ts +2 -3
- package/dist/components/Timeline/split-selected-timeline-item.d.ts +2 -3
- package/dist/components/Timeline/split-selected-timeline-item.js +0 -1
- package/dist/components/Timeline/timeline-expanded-filter.d.ts +1 -2
- package/dist/components/Timeline/timeline-field-row-layout.d.ts +1 -1
- package/dist/components/Timeline/timeline-field-row-layout.js +4 -7
- package/dist/components/Timeline/timeline-field-utils.js +0 -2
- package/dist/components/Timeline/timeline-scroll-logic.d.ts +7 -5
- package/dist/components/Timeline/timeline-scroll-logic.js +12 -7
- package/dist/components/Timeline/update-selected-easing.d.ts +7 -7
- package/dist/components/Timeline/use-timeline-asset-drop.js +24 -0
- package/dist/components/Timeline/use-timeline-keyframe-drag.d.ts +6 -7
- package/dist/components/TimelineCombobox.js +25 -160
- package/dist/components/TimelineInOutToggle.js +4 -1
- package/dist/components/canvas-capture-drop.d.ts +4 -0
- package/dist/components/canvas-capture-drop.js +22 -0
- package/dist/components/duplicate-jsx-node-api.d.ts +2 -0
- package/dist/components/duplicate-jsx-node-api.js +12 -0
- package/dist/components/effect-drag-and-drop.js +1 -4
- package/dist/components/handle-drop.d.ts +2 -1
- package/dist/components/handle-drop.js +3 -3
- package/dist/components/import-assets.js +9 -65
- package/dist/components/keyboard-shortcuts.d.ts +10 -0
- package/dist/components/keyboard-shortcuts.js +135 -0
- package/dist/components/selected-outline-control-layout.js +2 -6
- package/dist/components/selected-outline-measurement.d.ts +8 -9
- package/dist/components/selected-outline-measurement.js +16 -3
- package/dist/components/use-delete-asset.d.ts +1 -0
- package/dist/components/use-delete-asset.js +40 -0
- package/dist/components/use-selected-outline-control-target.d.ts +11 -0
- package/dist/components/use-selected-outline-control-target.js +79 -0
- package/dist/esm/{chunk-s6k99gh2.js → chunk-4bxz1d3g.js} +3 -2
- package/dist/esm/{chunk-v5a8vpv4.js → chunk-gzqm3g2m.js} +47432 -40444
- package/dist/esm/index.mjs +3 -0
- package/dist/esm/internals.mjs +47431 -40443
- package/dist/esm/previewEntry.mjs +47169 -40181
- package/dist/esm/renderEntry.mjs +2 -2
- package/dist/helpers/add-asset-cache-bust.d.ts +4 -0
- package/dist/helpers/add-asset-cache-bust.js +10 -0
- package/dist/helpers/calculate-timeline.d.ts +1 -7
- package/dist/helpers/calculate-timeline.js +2 -145
- package/dist/helpers/colors.d.ts +2 -0
- package/dist/helpers/colors.js +6 -2
- package/dist/helpers/drag-aware-double-click.d.ts +6 -0
- package/dist/helpers/drag-aware-double-click.js +20 -0
- package/dist/helpers/editor-ruler.js +6 -5
- package/dist/helpers/get-asset-metadata.d.ts +19 -0
- package/dist/helpers/get-asset-metadata.js +75 -21
- package/dist/helpers/get-connected-compositions.d.ts +1 -6
- package/dist/helpers/get-connected-compositions.js +2 -8
- package/dist/helpers/get-sequence-double-click-action.d.ts +2 -1
- package/dist/helpers/get-sequence-double-click-action.js +7 -1
- package/dist/helpers/get-sequence-visible-range.d.ts +1 -5
- package/dist/helpers/get-sequence-visible-range.js +6 -51
- package/dist/helpers/get-timeline-nestedness.d.ts +1 -2
- package/dist/helpers/get-timeline-nestedness.js +2 -12
- package/dist/helpers/get-timeline-sequence-layout.d.ts +4 -1
- package/dist/helpers/get-timeline-sequence-layout.js +15 -6
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +2 -21
- package/dist/helpers/get-timeline-sequence-sort-key.js +2 -16
- package/dist/helpers/hoverable.d.ts +1 -0
- package/dist/helpers/hoverable.js +2 -1
- package/dist/helpers/inject-css.js +3 -1
- package/dist/helpers/is-current-selected-still.js +4 -2
- package/dist/helpers/open-in-remotion-convert.d.ts +7 -0
- package/dist/helpers/open-in-remotion-convert.js +18 -0
- package/dist/helpers/sort-by-nonce-history.d.ts +1 -5
- package/dist/helpers/sort-by-nonce-history.js +3 -148
- package/dist/helpers/timeline-node-path-key.d.ts +1 -2
- package/dist/helpers/timeline-node-path-key.js +2 -2
- package/dist/helpers/use-media-metadata.d.ts +2 -1
- package/dist/helpers/use-media-metadata.js +12 -5
- package/dist/helpers/use-menu-structure.js +52 -32
- package/dist/icons/align-center-horizontal.js +1 -1
- package/dist/icons/align-left.js +1 -1
- package/dist/icons/align-right.js +1 -1
- package/dist/icons/keyboard.d.ts +4 -0
- package/dist/icons/keyboard.js +10 -0
- package/dist/icons/license.d.ts +4 -0
- package/dist/icons/license.js +8 -0
- package/dist/icons/package.d.ts +4 -0
- package/dist/icons/package.js +8 -0
- package/dist/icons/react.js +1 -1
- package/dist/icons/remotion-convert.d.ts +4 -0
- package/dist/icons/remotion-convert.js +10 -0
- package/dist/icons/skills.d.ts +4 -0
- package/dist/icons/skills.js +10 -0
- package/dist/state/editor-pixel-grid.d.ts +8 -0
- package/dist/state/editor-pixel-grid.js +18 -0
- package/dist/state/modals.d.ts +6 -5
- package/package.json +14 -12
- package/dist/components/KeyboardShortcutsExplainer.d.ts +0 -2
- package/dist/components/KeyboardShortcutsExplainer.js +0 -194
|
@@ -4,11 +4,11 @@ exports.LicenseSettings = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../helpers/colors");
|
|
7
|
-
const Checkbox_1 = require("./Checkbox");
|
|
8
7
|
const layout_1 = require("./layout");
|
|
9
8
|
const LicenseKeyValidation_1 = require("./LicenseKeyValidation");
|
|
10
9
|
const RemInput_1 = require("./NewComposition/RemInput");
|
|
11
10
|
const ValidationMessage_1 = require("./NewComposition/ValidationMessage");
|
|
11
|
+
const RadioButton_1 = require("./RadioButton");
|
|
12
12
|
const SettingsContext_1 = require("./SettingsContext");
|
|
13
13
|
const use_auto_save_config_1 = require("./use-auto-save-config");
|
|
14
14
|
const container = {
|
|
@@ -34,21 +34,50 @@ const descriptionLink = {
|
|
|
34
34
|
fontSize: 14,
|
|
35
35
|
lineHeight: '21px',
|
|
36
36
|
};
|
|
37
|
-
const
|
|
37
|
+
const externalDescriptionLink = {
|
|
38
|
+
...descriptionLink,
|
|
39
|
+
color: colors_1.BLUE,
|
|
40
|
+
};
|
|
41
|
+
const externalLinkIndicator = {
|
|
42
|
+
display: 'inline-block',
|
|
43
|
+
height: 12,
|
|
44
|
+
marginLeft: 4,
|
|
45
|
+
verticalAlign: -2,
|
|
46
|
+
width: 12,
|
|
47
|
+
};
|
|
48
|
+
const licenseExplanation = {
|
|
49
|
+
display: 'flex',
|
|
50
|
+
flexDirection: 'column',
|
|
51
|
+
gap: 12,
|
|
52
|
+
};
|
|
53
|
+
const licenseExplanationRow = {
|
|
38
54
|
display: 'flex',
|
|
39
|
-
flexDirection: 'row',
|
|
40
55
|
alignItems: 'center',
|
|
41
|
-
|
|
42
|
-
|
|
56
|
+
gap: 12,
|
|
57
|
+
};
|
|
58
|
+
const people = {
|
|
59
|
+
display: 'grid',
|
|
60
|
+
gridTemplateColumns: 'repeat(4, 9px)',
|
|
61
|
+
gap: 3,
|
|
62
|
+
flexShrink: 0,
|
|
63
|
+
};
|
|
64
|
+
const person = {
|
|
65
|
+
display: 'block',
|
|
66
|
+
height: 24,
|
|
67
|
+
overflow: 'visible',
|
|
68
|
+
width: 9,
|
|
69
|
+
};
|
|
70
|
+
const PersonIcon = ({ handsUp, opacity }) => {
|
|
71
|
+
return (jsx_runtime_1.jsxs("svg", { "aria-hidden": "true", opacity: opacity, style: person, viewBox: "0 0 192 512", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
72
|
+
jsx_runtime_1.jsx("path", { fill: colors_1.LIGHT_TEXT, d: "M128 64a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM32 64A64 64 0 1 1 160 64 64 64 0 1 1 32 64zm0 128l0 128 128 0 0-128-128 0zM0 160l192 0 0 192-32 0 0 160-32 0 0-160-64 0 0 160-32 0 0-160-32 0 0-192z" }), handsUp ? (jsx_runtime_1.jsx("path", { d: "M10.667 192 0 -32 M181.333 192 192 -32", fill: "none", stroke: colors_1.LIGHT_TEXT, strokeWidth: "32" })) : null] }));
|
|
73
|
+
};
|
|
74
|
+
const freeLicenseMessage = {
|
|
75
|
+
...description,
|
|
43
76
|
marginBottom: 5,
|
|
77
|
+
marginLeft: 28,
|
|
44
78
|
};
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
fontFamily: 'sans-serif',
|
|
48
|
-
fontSize: 14,
|
|
49
|
-
lineHeight: '20px',
|
|
50
|
-
cursor: 'pointer',
|
|
51
|
-
userSelect: 'none',
|
|
79
|
+
const companyLicenseContent = {
|
|
80
|
+
marginLeft: 28,
|
|
52
81
|
};
|
|
53
82
|
const inputLabel = {
|
|
54
83
|
color: colors_1.LIGHT_TEXT,
|
|
@@ -170,40 +199,44 @@ const LicenseSettings = () => {
|
|
|
170
199
|
});
|
|
171
200
|
const displayedError = error !== null && error !== void 0 ? error : settingsError;
|
|
172
201
|
return (jsx_runtime_1.jsx("div", { style: container, children: jsx_runtime_1.jsxs("div", { style: content, children: [
|
|
173
|
-
jsx_runtime_1.jsxs("
|
|
174
|
-
jsx_runtime_1.
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
202
|
+
jsx_runtime_1.jsxs("div", { style: licenseExplanation, children: [
|
|
203
|
+
jsx_runtime_1.jsxs("div", { style: licenseExplanationRow, children: [
|
|
204
|
+
jsx_runtime_1.jsxs("div", { style: people, children: [
|
|
205
|
+
jsx_runtime_1.jsx(PersonIcon, { handsUp: true, opacity: 1 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: true, opacity: 1 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: true, opacity: 1 })
|
|
206
|
+
] }), jsx_runtime_1.jsx("p", { style: description, children: "Remotion is free to use if you are an individual or company of 3 or less." })
|
|
207
|
+
] }), jsx_runtime_1.jsxs("div", { style: licenseExplanationRow, children: [
|
|
208
|
+
jsx_runtime_1.jsxs("div", { style: people, children: [
|
|
209
|
+
jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 1 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 1 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 1 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 1 })
|
|
210
|
+
] }), jsx_runtime_1.jsxs("p", { style: description, children: ["If used in an organization with 4+ people, you need a", ' ', jsx_runtime_1.jsx("a", { style: descriptionLink, href: "https://remotion.pro/license", children: "Company License" }),
|
|
211
|
+
"."] })
|
|
212
|
+
] }), jsx_runtime_1.jsxs("div", { style: licenseExplanationRow, children: [
|
|
213
|
+
jsx_runtime_1.jsxs("div", { style: people, children: [
|
|
214
|
+
jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 1 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 0.3 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 0.3 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 0.3 })
|
|
215
|
+
] }), jsx_runtime_1.jsx("p", { style: description, children: "The total headcount matters, not the amount of people using Remotion." })
|
|
216
|
+
] })
|
|
217
|
+
] }), jsx_runtime_1.jsx(layout_1.Spacing, { y: 2 }), jsx_runtime_1.jsxs("div", { "aria-label": "License type", role: "radiogroup", children: [
|
|
218
|
+
jsx_runtime_1.jsx(RadioButton_1.RadioButton, { checked: licenseType === 'free', onClick: toggleFreeLicense, children: "I am eligible for the Free License" }), licenseType === 'free' ? (jsx_runtime_1.jsx("p", { style: freeLicenseMessage, children: "That's it! Enjoy Remotion." })) : null, jsx_runtime_1.jsx(RadioButton_1.RadioButton, { checked: licenseType === 'company', onClick: toggleCompanyLicense, children: "I need a Company License" }), licenseType === 'company' ? (jsx_runtime_1.jsxs("div", { style: companyLicenseContent, children: [
|
|
219
|
+
jsx_runtime_1.jsxs("p", { style: description, children: ["Visit", ' ', jsx_runtime_1.jsxs("a", { style: externalDescriptionLink, href: "https://remotion.pro/license", target: "_blank", rel: "noopener noreferrer", children: ["remotion.pro/license",
|
|
220
|
+
jsx_runtime_1.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", style: externalLinkIndicator, children: jsx_runtime_1.jsx("path", { d: "M4 12 12 4M6 4h6v6", fill: "none", stroke: colors_1.BLUE, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) })
|
|
221
|
+
] }), ' ', "to obtain a license key. Then enter it here."] }), jsx_runtime_1.jsxs("label", { style: inputLabel, children: ["Public license key",
|
|
222
|
+
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { status: localLicenseKeyValidation.message ||
|
|
223
|
+
remoteValidationMessage ||
|
|
224
|
+
(licenseKeyDetails !== null &&
|
|
225
|
+
!(0, LicenseKeyValidation_1.hasActiveCompanyLicense)(licenseKeyDetails))
|
|
226
|
+
? 'error'
|
|
227
|
+
: 'ok', rightAlign: false, value: companyLicenseKey, onChange: (event) => {
|
|
228
|
+
setCompanyLicenseKey(event.target.value);
|
|
229
|
+
setError(null);
|
|
230
|
+
}, onBlur: () => {
|
|
231
|
+
setCompanyLicenseKeyToSave(companyLicenseKey.trim());
|
|
232
|
+
}, placeholder: "rm_pub_...", autoFocus: true })
|
|
233
|
+
] }), localLicenseKeyValidation.message ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
234
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1 }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: localLicenseKeyValidation.message, align: "flex-start", type: "error" })
|
|
235
|
+
] })) : null, remoteValidationMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
236
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1 }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: remoteValidationMessage, align: "flex-start", type: "error" })
|
|
237
|
+
] })) : null, isValidatingLicenseKey ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
238
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1 }), jsx_runtime_1.jsx("p", { style: description, children: "Loading license key details..." })
|
|
239
|
+
] })) : null, licenseKeyDetails ? (jsx_runtime_1.jsx(LicenseKeyValidation_1.LicenseKeyDetailsDisplay, { details: licenseKeyDetails })) : null] })) : null] }), displayedError ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
207
240
|
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1.5 }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: displayedError, align: "flex-start", type: "error" })
|
|
208
241
|
] })) : null] }) }));
|
|
209
242
|
};
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { MediaMetadata } from '../helpers/use-media-metadata';
|
|
3
|
-
export declare const CURRENT_ASSET_HEIGHT =
|
|
3
|
+
export declare const CURRENT_ASSET_HEIGHT = 28;
|
|
4
4
|
export declare const getCurrentAssetMetadataSource: (assetName: string | null) => string | null;
|
|
5
5
|
export declare const getCurrentAssetImageMetadataSource: (assetName: string | null) => string | null;
|
|
6
|
-
|
|
6
|
+
type CurrentAssetDetail = {
|
|
7
|
+
readonly label: string;
|
|
8
|
+
readonly value: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const getCurrentAssetMediaSections: (mediaMetadata: MediaMetadata) => {
|
|
11
|
+
audio: CurrentAssetDetail[] | null;
|
|
12
|
+
video: CurrentAssetDetail[] | null;
|
|
13
|
+
};
|
|
7
14
|
export declare const AssetInfo: React.FC<{
|
|
8
15
|
readonly assetName: string | null;
|
|
9
16
|
readonly contentSized?: boolean;
|
|
@@ -13,3 +20,4 @@ export declare const AssetInfo: React.FC<{
|
|
|
13
20
|
export declare const CurrentAsset: React.FC<{
|
|
14
21
|
readonly readOnlyStudio: boolean;
|
|
15
22
|
}>;
|
|
23
|
+
export {};
|
|
@@ -1,23 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CurrentAsset = exports.AssetInfo = exports.
|
|
3
|
+
exports.CurrentAsset = exports.AssetInfo = exports.getCurrentAssetMediaSections = exports.getCurrentAssetImageMetadataSource = exports.getCurrentAssetMetadataSource = exports.CURRENT_ASSET_HEIGHT = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const remotion_1 = require("remotion");
|
|
8
8
|
const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
|
|
9
9
|
const client_id_1 = require("../helpers/client-id");
|
|
10
|
+
const colors_1 = require("../helpers/colors");
|
|
10
11
|
const format_media_duration_1 = require("../helpers/format-media-duration");
|
|
12
|
+
const get_file_manager_name_1 = require("../helpers/get-file-manager-name");
|
|
11
13
|
const get_preview_file_type_1 = require("../helpers/get-preview-file-type");
|
|
14
|
+
const open_in_remotion_convert_1 = require("../helpers/open-in-remotion-convert");
|
|
12
15
|
const render_codec_label_1 = require("../helpers/render-codec-label");
|
|
13
16
|
const use_image_metadata_1 = require("../helpers/use-image-metadata");
|
|
14
17
|
const use_media_metadata_1 = require("../helpers/use-media-metadata");
|
|
18
|
+
const folder_1 = require("../icons/folder");
|
|
19
|
+
const remotion_convert_1 = require("../icons/remotion-convert");
|
|
20
|
+
const trash_1 = require("../icons/trash");
|
|
15
21
|
const InlineEditableTitle_1 = require("./InlineEditableTitle");
|
|
16
22
|
const InspectorInfoHeader_1 = require("./InspectorInfoHeader");
|
|
23
|
+
const common_1 = require("./InspectorPanel/common");
|
|
17
24
|
const InspectorPanelLayout_1 = require("./InspectorPanelLayout");
|
|
25
|
+
const layout_1 = require("./layout");
|
|
18
26
|
const use_rename_static_file_1 = require("./NewComposition/use-rename-static-file");
|
|
27
|
+
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
28
|
+
const actions_1 = require("./RenderQueue/actions");
|
|
29
|
+
const use_delete_asset_1 = require("./use-delete-asset");
|
|
19
30
|
const use_static_files_1 = require("./use-static-files");
|
|
20
|
-
exports.CURRENT_ASSET_HEIGHT =
|
|
31
|
+
exports.CURRENT_ASSET_HEIGHT = layout_1.COMPACT_CONTROL_ROW_HEIGHT;
|
|
32
|
+
const quickActionIconStyle = {
|
|
33
|
+
display: 'block',
|
|
34
|
+
height: 18,
|
|
35
|
+
width: 18,
|
|
36
|
+
};
|
|
37
|
+
const convertArrowStyle = {
|
|
38
|
+
display: 'inline-block',
|
|
39
|
+
height: 12,
|
|
40
|
+
marginLeft: 4,
|
|
41
|
+
verticalAlign: -2,
|
|
42
|
+
width: 12,
|
|
43
|
+
};
|
|
44
|
+
const assetMetadataStyle = {
|
|
45
|
+
padding: `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
|
|
46
|
+
};
|
|
47
|
+
const assetMetadataValueStyle = {
|
|
48
|
+
color: colors_1.LIGHT_TEXT,
|
|
49
|
+
fontFamily: 'sans-serif',
|
|
50
|
+
fontSize: 13,
|
|
51
|
+
lineHeight: '20px',
|
|
52
|
+
};
|
|
53
|
+
const assetEmptyStateStyle = {
|
|
54
|
+
color: colors_1.LIGHT_TEXT,
|
|
55
|
+
fontFamily: 'sans-serif',
|
|
56
|
+
fontSize: 12,
|
|
57
|
+
lineHeight: 1.4,
|
|
58
|
+
padding: `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
|
|
59
|
+
};
|
|
21
60
|
const getCurrentAssetMetadataSource = (assetName) => {
|
|
22
61
|
if (!assetName) {
|
|
23
62
|
return null;
|
|
@@ -38,39 +77,72 @@ const getCurrentAssetImageMetadataSource = (assetName) => {
|
|
|
38
77
|
};
|
|
39
78
|
exports.getCurrentAssetImageMetadataSource = getCurrentAssetImageMetadataSource;
|
|
40
79
|
const formatFps = (fps) => `${fps.toFixed(2)} FPS`;
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
80
|
+
const getCurrentAssetMediaSections = (mediaMetadata) => {
|
|
81
|
+
const hasVideo = mediaMetadata.hasVideoTrack === true ||
|
|
82
|
+
mediaMetadata.width !== null ||
|
|
83
|
+
mediaMetadata.height !== null ||
|
|
84
|
+
mediaMetadata.videoCodec !== null ||
|
|
85
|
+
mediaMetadata.fps !== null ||
|
|
86
|
+
mediaMetadata.isHdr !== null;
|
|
87
|
+
const hasAudio = mediaMetadata.hasAudioTrack === true ||
|
|
88
|
+
mediaMetadata.audioCodec !== null ||
|
|
89
|
+
mediaMetadata.sampleRate !== null;
|
|
90
|
+
const video = [];
|
|
91
|
+
const audio = [];
|
|
92
|
+
if (hasVideo) {
|
|
93
|
+
if (mediaMetadata.width !== null && mediaMetadata.height !== null) {
|
|
94
|
+
video.push({
|
|
95
|
+
label: 'Dimensions',
|
|
96
|
+
value: `${mediaMetadata.width} × ${mediaMetadata.height}`,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
47
99
|
if (mediaMetadata.fps !== null) {
|
|
48
|
-
|
|
100
|
+
video.push({ label: 'Frame rate', value: formatFps(mediaMetadata.fps) });
|
|
49
101
|
}
|
|
102
|
+
video.push({
|
|
103
|
+
label: 'Duration',
|
|
104
|
+
value: (0, format_media_duration_1.formatMediaDuration)(mediaMetadata.duration),
|
|
105
|
+
});
|
|
106
|
+
video.push({
|
|
107
|
+
label: 'Codec',
|
|
108
|
+
value: (0, render_codec_label_1.renderHumanReadableVideoCodec)(mediaMetadata.videoCodec),
|
|
109
|
+
});
|
|
50
110
|
if (mediaMetadata.isHdr !== null) {
|
|
51
|
-
|
|
111
|
+
video.push({
|
|
112
|
+
label: 'HDR',
|
|
113
|
+
value: mediaMetadata.isHdr ? 'Yes' : 'No',
|
|
114
|
+
});
|
|
52
115
|
}
|
|
53
|
-
detailLines.push(`Video: ${videoParts.join(' · ')}`);
|
|
54
116
|
}
|
|
55
|
-
if (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
117
|
+
if (hasAudio) {
|
|
118
|
+
audio.push({
|
|
119
|
+
label: 'Duration',
|
|
120
|
+
value: (0, format_media_duration_1.formatMediaDuration)(mediaMetadata.duration),
|
|
121
|
+
});
|
|
122
|
+
audio.push({
|
|
123
|
+
label: 'Codec',
|
|
124
|
+
value: (0, render_codec_label_1.renderHumanReadableAudioCodec)(mediaMetadata.audioCodec),
|
|
125
|
+
});
|
|
59
126
|
if (mediaMetadata.sampleRate !== null) {
|
|
60
|
-
|
|
127
|
+
audio.push({
|
|
128
|
+
label: 'Sample rate',
|
|
129
|
+
value: `${mediaMetadata.sampleRate} Hz`,
|
|
130
|
+
});
|
|
61
131
|
}
|
|
62
|
-
detailLines.push(`Audio: ${audioParts.join(' · ')}`);
|
|
63
|
-
}
|
|
64
|
-
else if (mediaMetadata.hasAudioTrack === false) {
|
|
65
|
-
detailLines.push('Audio: No audio');
|
|
66
132
|
}
|
|
67
|
-
return
|
|
133
|
+
return {
|
|
134
|
+
audio: hasAudio || (hasVideo && mediaMetadata.hasAudioTrack === false)
|
|
135
|
+
? audio
|
|
136
|
+
: null,
|
|
137
|
+
video: hasVideo ? video : null,
|
|
138
|
+
};
|
|
68
139
|
};
|
|
69
|
-
exports.
|
|
140
|
+
exports.getCurrentAssetMediaSections = getCurrentAssetMediaSections;
|
|
70
141
|
const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStudio }) => {
|
|
71
|
-
var _a;
|
|
142
|
+
var _a, _b, _c;
|
|
72
143
|
const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
|
|
73
144
|
.previewServerState.type;
|
|
145
|
+
const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
|
|
74
146
|
const staticFiles = (0, use_static_files_1.useStaticFiles)();
|
|
75
147
|
const renameFile = (0, use_rename_static_file_1.useRenameStaticFile)({
|
|
76
148
|
relativePath: assetName !== null && assetName !== void 0 ? assetName : '',
|
|
@@ -89,38 +161,64 @@ const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStud
|
|
|
89
161
|
const imageSrc = (0, exports.getCurrentAssetImageMetadataSource)(assetName);
|
|
90
162
|
const imageMetadata = (0, use_image_metadata_1.useImageMetadata)(imageSrc);
|
|
91
163
|
const canRename = onAssetClick === undefined &&
|
|
92
|
-
(
|
|
164
|
+
(browserStudioOperations !== null ||
|
|
93
165
|
(connectionStatus === 'connected' && !readOnlyStudio));
|
|
94
166
|
const onRename = (0, react_1.useCallback)((newName) => {
|
|
95
167
|
renameFile(newName).catch(() => undefined);
|
|
96
168
|
}, [renameFile]);
|
|
169
|
+
const onOpenConvert = (0, react_1.useCallback)(() => {
|
|
170
|
+
if (assetName === null) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
(0, open_in_remotion_convert_1.openInRemotionConvert)({ relativePath: assetName });
|
|
174
|
+
}, [assetName]);
|
|
175
|
+
const onShowInFileManager = (0, react_1.useCallback)(() => {
|
|
176
|
+
if (assetName === null || !window.remotion_publicFolderExists) {
|
|
177
|
+
(0, NotificationCenter_1.showNotification)('Could not find the public folder', 2000);
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
(0, actions_1.openInFileExplorer)({
|
|
181
|
+
directory: window.remotion_publicFolderExists + '/' + assetName,
|
|
182
|
+
}).catch((err) => {
|
|
183
|
+
(0, NotificationCenter_1.showNotification)(`Could not open file: ${err.message}`, 2000);
|
|
184
|
+
});
|
|
185
|
+
}, [assetName]);
|
|
186
|
+
const onDelete = (0, use_delete_asset_1.useDeleteAsset)(assetName);
|
|
97
187
|
if (!assetName) {
|
|
98
|
-
return jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: contentSized });
|
|
188
|
+
return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: contentSized, minHeight: exports.CURRENT_ASSET_HEIGHT }));
|
|
99
189
|
}
|
|
100
190
|
const fileName = (_a = assetName.split('/').pop()) !== null && _a !== void 0 ? _a : assetName;
|
|
101
|
-
const
|
|
102
|
-
if (
|
|
103
|
-
|
|
191
|
+
const fileDetails = [];
|
|
192
|
+
if (imageMetadata !== null) {
|
|
193
|
+
fileDetails.push({
|
|
194
|
+
label: 'Dimensions',
|
|
195
|
+
value: `${imageMetadata.width} × ${imageMetadata.height}`,
|
|
196
|
+
});
|
|
104
197
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
if (mediaMetadata.width !== null && mediaMetadata.height !== null) {
|
|
110
|
-
subtitleParts.push(`${mediaMetadata.width}x${mediaMetadata.height}`);
|
|
111
|
-
}
|
|
198
|
+
const container = (_c = (_b = mediaMetadata === null || mediaMetadata === void 0 ? void 0 : mediaMetadata.format) !== null && _b !== void 0 ? _b : imageMetadata === null || imageMetadata === void 0 ? void 0 : imageMetadata.format) !== null && _c !== void 0 ? _c : null;
|
|
199
|
+
if (container !== null) {
|
|
200
|
+
fileDetails.push({ label: 'Container', value: container });
|
|
112
201
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
subtitleParts.push(`${imageMetadata.width}x${imageMetadata.height}`);
|
|
202
|
+
if (sizeInBytes !== null) {
|
|
203
|
+
fileDetails.push({ label: 'Size', value: (0, studio_shared_1.formatBytes)(sizeInBytes) });
|
|
116
204
|
}
|
|
117
|
-
const
|
|
118
|
-
? (0, exports.
|
|
119
|
-
:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
205
|
+
const mediaSections = mediaMetadata
|
|
206
|
+
? (0, exports.getCurrentAssetMediaSections)(mediaMetadata)
|
|
207
|
+
: null;
|
|
208
|
+
const fileManagerAvailable = browserStudioOperations === null;
|
|
209
|
+
const fileManagerDisabled = window.remotion_publicFolderExists === null ||
|
|
210
|
+
readOnlyStudio ||
|
|
211
|
+
connectionStatus !== 'connected';
|
|
212
|
+
const fileManagerName = (0, get_file_manager_name_1.getFileManagerName)(window.remotion_fileSystemPlatform);
|
|
213
|
+
const mutationsDisabled = browserStudioOperations === null &&
|
|
214
|
+
(readOnlyStudio || connectionStatus !== 'connected');
|
|
215
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
216
|
+
jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: contentSized, minHeight: exports.CURRENT_ASSET_HEIGHT, padding: contentSized
|
|
217
|
+
? `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px 6px`
|
|
218
|
+
: '4px 0', children: jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: fileName, canRename: canRename, getInitialSelection: use_rename_static_file_1.getStaticFileRenameSelection, onClick: onAssetClick, onCommit: onRename, size: contentSized ? 'default' : 'inspector', title: assetName }) }), fileDetails.length > 0 ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: "File", children: jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: fileDetails.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) }) })) : null, mediaSections && mediaSections.video ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: "Video", children: jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: mediaSections.video.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) }) })) : null, mediaSections && mediaSections.audio !== null ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: "Audio", children: mediaSections.audio.length === 0 ? (jsx_runtime_1.jsx("div", { style: assetEmptyStateStyle, children: "None" })) : (jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: mediaSections.audio.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) })) })) : null, jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [src ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: false, onClick: onOpenConvert, renderIcon: (color) => (jsx_runtime_1.jsx(remotion_convert_1.RemotionConvertIcon, { color: color, style: quickActionIconStyle })), children: ["Convert",
|
|
219
|
+
jsx_runtime_1.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", style: convertArrowStyle, children: jsx_runtime_1.jsx("path", { d: "M4 12 12 4M6 4h6v6", fill: "none", stroke: colors_1.CURRENT_COLOR, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) })
|
|
220
|
+
] })) : null, fileManagerAvailable ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: fileManagerDisabled, onClick: onShowInFileManager, renderIcon: (color) => (jsx_runtime_1.jsx(folder_1.ExpandedFolderIcon, { color: color, style: quickActionIconStyle })), children: ["Show in ", fileManagerName] })) : null, jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: mutationsDisabled, onClick: onDelete, renderIcon: (color) => (jsx_runtime_1.jsx(trash_1.TrashIcon, { color: color, style: quickActionIconStyle })), children: "Delete" })] })
|
|
221
|
+
] }));
|
|
124
222
|
};
|
|
125
223
|
exports.AssetInfo = AssetInfo;
|
|
126
224
|
const CurrentAsset = ({ readOnlyStudio }) => {
|
|
@@ -48,6 +48,7 @@ const composition_list_1 = require("../state/composition-list");
|
|
|
48
48
|
const scale_lock_1 = require("../state/scale-lock");
|
|
49
49
|
const timeline_zoom_1 = require("../state/timeline-zoom");
|
|
50
50
|
const z_index_1 = require("../state/z-index");
|
|
51
|
+
const CanvasCaptureDropHandler_1 = require("./CanvasCaptureDropHandler");
|
|
51
52
|
const EditorContent_1 = require("./EditorContent");
|
|
52
53
|
const ForceSpecificCursor_1 = require("./ForceSpecificCursor");
|
|
53
54
|
const Modals_1 = require("./Modals");
|
|
@@ -111,7 +112,7 @@ const Editor = ({ Root, readOnlyStudio }) => {
|
|
|
111
112
|
const renderErrorContextValue = (0, react_1.useMemo)(() => ({ error: renderError }), [renderError]);
|
|
112
113
|
return (jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onEscape: noop_1.noop, onOutsideClick: noop_1.noop, children: jsx_runtime_1.jsx(timeline_zoom_1.TimelineZoomContext, { children: jsx_runtime_1.jsxs(SequencePropsSubscriptionProvider_1.SequencePropsSubscriptionProvider, { children: [
|
|
113
114
|
jsx_runtime_1.jsxs(remotion_1.Internals.CurrentScaleContext.Provider, { value: value, children: [
|
|
114
|
-
jsx_runtime_1.jsx(ForceSpecificCursor_1.ForceSpecificCursor, {}), jsx_runtime_1.jsx(scale_lock_1.ScaleLockProvider, { children: jsx_runtime_1.jsxs("div", { style: background, children: [
|
|
115
|
+
jsx_runtime_1.jsx(ForceSpecificCursor_1.ForceSpecificCursor, {}), jsx_runtime_1.jsx(CanvasCaptureDropHandler_1.CanvasCaptureDropHandler, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(scale_lock_1.ScaleLockProvider, { children: jsx_runtime_1.jsxs("div", { style: background, children: [
|
|
115
116
|
jsx_runtime_1.jsx(remotion_1.Internals.CompositionRenderErrorContext.Provider, { value: compositionRenderErrorContextValue, children: canvasMounted ? (jsx_runtime_1.jsx(RootCompositionLoader, { Root: MemoRoot })) : null }), jsx_runtime_1.jsx(remotion_1.Internals.CanUseRemotionHooksProvider, { children: jsx_runtime_1.jsx(RenderErrorContext_1.RenderErrorContext.Provider, { value: renderErrorContextValue, children: jsx_runtime_1.jsx(EditorContent_1.EditorContent, { readOnlyStudio: readOnlyStudio, children: jsx_runtime_1.jsx(TopPanel_1.TopPanel, { drawRef: setDrawRef, bufferStateDelayInMilliseconds: (0, studio_runtime_config_1.getStudioBufferStateDelayInMilliseconds)(), onMounted: onMounted, readOnlyStudio: readOnlyStudio }) }) }) })
|
|
116
117
|
] }) })
|
|
117
118
|
] }), jsx_runtime_1.jsx(Modals_1.Modals, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(NotificationCenter_1.NotificationCenter, {})
|
|
@@ -34,8 +34,11 @@ const StudioClearSelectionArea = ({ children }) => {
|
|
|
34
34
|
return (jsx_runtime_1.jsx("div", { style: container, onPointerDown: onPointerDown, children: children }));
|
|
35
35
|
};
|
|
36
36
|
const EditorContent = ({ readOnlyStudio, children }) => {
|
|
37
|
-
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
38
|
-
const showTimeline = canvasContent !== null &&
|
|
37
|
+
const { canvasContent, currentAssetMetadata } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
38
|
+
const showTimeline = canvasContent !== null &&
|
|
39
|
+
(canvasContent.type === 'composition' ||
|
|
40
|
+
(canvasContent.type === 'asset' &&
|
|
41
|
+
(currentAssetMetadata === null || currentAssetMetadata === void 0 ? void 0 : currentAssetMetadata.asset) === canvasContent.asset));
|
|
39
42
|
const content = (jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { orientation: "horizontal", id: "top-to-bottom", maxFlex: 0.9, minFlex: 0.2, defaultFlex: 0.75, maxFlexerSize: null, minFlexerSize: null, maxAntiFlexerSize: null, minAntiFlexerSize: null, children: [
|
|
40
43
|
jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: children }), jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "none", onCollapse: noop }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: showTimeline ? jsx_runtime_1.jsx(Timeline_1.Timeline, {}) : jsx_runtime_1.jsx(TimelineEmptyState_1.TimelineEmptyState, {}) })
|
|
41
44
|
] }));
|
|
@@ -21,6 +21,7 @@ const SetTimelineInOutProvider_1 = require("./SetTimelineInOutProvider");
|
|
|
21
21
|
const SettingsContext_1 = require("./SettingsContext");
|
|
22
22
|
const ShowGuidesProvider_1 = require("./ShowGuidesProvider");
|
|
23
23
|
const ShowOutlinesProvider_1 = require("./ShowOutlinesProvider");
|
|
24
|
+
const ShowPixelGridProvider_1 = require("./ShowPixelGridProvider");
|
|
24
25
|
const ShowRulersProvider_1 = require("./ShowRulersProvider");
|
|
25
26
|
const SnappingProvider_1 = require("./SnappingProvider");
|
|
26
27
|
const VisualControlsUndoSync_1 = require("./VisualControls/VisualControlsUndoSync");
|
|
@@ -28,7 +29,7 @@ const ZoomGesturesProvider_1 = require("./ZoomGesturesProvider");
|
|
|
28
29
|
const EditorContexts = ({ children }) => {
|
|
29
30
|
return (jsx_runtime_1.jsx(get_zod_if_possible_1.ZodProvider, { children: jsx_runtime_1.jsx(VisualControls_1.VisualControlsProvider, { children: jsx_runtime_1.jsx(client_id_1.PreviewServerConnection, { children: jsx_runtime_1.jsxs(SettingsContext_1.SettingsProvider, { children: [
|
|
30
31
|
jsx_runtime_1.jsx(VisualControlsUndoSync_1.VisualControlsUndoSync, {}), jsx_runtime_1.jsxs(context_1.RenderQueueContextProvider, { children: [
|
|
31
|
-
jsx_runtime_1.jsx(ClientRenderQueueProcessor_1.ClientRenderQueueProcessor, {}), jsx_runtime_1.jsx(keybindings_1.KeybindingContextProvider, { children: jsx_runtime_1.jsx(CheckerboardProvider_1.CheckerboardProvider, { children: jsx_runtime_1.jsx(ZoomGesturesProvider_1.ZoomGesturesProvider, { children: jsx_runtime_1.jsx(ShowRulersProvider_1.ShowRulersProvider, { children: jsx_runtime_1.jsx(ShowGuidesProvider_1.ShowGuidesProvider, { children: jsx_runtime_1.jsx(ShowOutlinesProvider_1.ShowOutlinesProvider, { children: jsx_runtime_1.jsx(SnappingProvider_1.SnappingProvider, { children: jsx_runtime_1.jsx(preview_size_1.PreviewSizeProvider, { children: jsx_runtime_1.jsx(ModalsProvider_1.ModalsProvider, { children: jsx_runtime_1.jsx(MediaVolumeProvider_1.MediaVolumeProvider, { children: jsx_runtime_1.jsx(player_1.PlayerInternals.PlayerEmitterProvider, { currentPlaybackRate: null, children: jsx_runtime_1.jsx(sidebar_1.SidebarContextProvider, { children: jsx_runtime_1.jsx(folders_1.FolderContextProvider, { children: jsx_runtime_1.jsx(highest_z_index_1.HighestZIndexProvider, { children: jsx_runtime_1.jsx(SetTimelineInOutProvider_1.SetTimelineInOutProvider, { children: jsx_runtime_1.jsx(ExpandedTracksProvider_1.ExpandedTracksProvider, { children: children }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })
|
|
32
|
+
jsx_runtime_1.jsx(ClientRenderQueueProcessor_1.ClientRenderQueueProcessor, {}), jsx_runtime_1.jsx(keybindings_1.KeybindingContextProvider, { children: jsx_runtime_1.jsx(CheckerboardProvider_1.CheckerboardProvider, { children: jsx_runtime_1.jsx(ZoomGesturesProvider_1.ZoomGesturesProvider, { children: jsx_runtime_1.jsx(ShowPixelGridProvider_1.ShowPixelGridProvider, { children: jsx_runtime_1.jsx(ShowRulersProvider_1.ShowRulersProvider, { children: jsx_runtime_1.jsx(ShowGuidesProvider_1.ShowGuidesProvider, { children: jsx_runtime_1.jsx(ShowOutlinesProvider_1.ShowOutlinesProvider, { children: jsx_runtime_1.jsx(SnappingProvider_1.SnappingProvider, { children: jsx_runtime_1.jsx(preview_size_1.PreviewSizeProvider, { children: jsx_runtime_1.jsx(ModalsProvider_1.ModalsProvider, { children: jsx_runtime_1.jsx(MediaVolumeProvider_1.MediaVolumeProvider, { children: jsx_runtime_1.jsx(player_1.PlayerInternals.PlayerEmitterProvider, { currentPlaybackRate: null, children: jsx_runtime_1.jsx(sidebar_1.SidebarContextProvider, { children: jsx_runtime_1.jsx(folders_1.FolderContextProvider, { children: jsx_runtime_1.jsx(highest_z_index_1.HighestZIndexProvider, { children: jsx_runtime_1.jsx(SetTimelineInOutProvider_1.SetTimelineInOutProvider, { children: jsx_runtime_1.jsx(ExpandedTracksProvider_1.ExpandedTracksProvider, { children: children }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })
|
|
32
33
|
] })
|
|
33
34
|
] }) }) }) }));
|
|
34
35
|
};
|
|
@@ -12,6 +12,7 @@ interface RulerProps {
|
|
|
12
12
|
readonly markingGaps: number;
|
|
13
13
|
readonly orientation: 'horizontal' | 'vertical';
|
|
14
14
|
readonly size: Size;
|
|
15
|
+
readonly canCreateGuides: boolean;
|
|
15
16
|
readonly onPointerSessionStart: (event: React.PointerEvent<HTMLCanvasElement>, guideId: string) => void;
|
|
16
17
|
}
|
|
17
18
|
declare const Ruler: React.FC<RulerProps>;
|
|
@@ -14,7 +14,7 @@ const TimelineSelection_1 = require("../Timeline/TimelineSelection");
|
|
|
14
14
|
const makeGuideId = () => {
|
|
15
15
|
return Math.random().toString(36).substring(7);
|
|
16
16
|
};
|
|
17
|
-
const Ruler = ({ scale, points, originOffset, startMarking, size, markingGaps, orientation, onPointerSessionStart, }) => {
|
|
17
|
+
const Ruler = ({ scale, points, originOffset, startMarking, size, markingGaps, orientation, canCreateGuides, onPointerSessionStart, }) => {
|
|
18
18
|
const rulerCanvasRef = (0, react_1.useRef)(null);
|
|
19
19
|
const isVerticalRuler = orientation === 'vertical';
|
|
20
20
|
const { shouldCreateGuideRef, setGuidesList, draggingGuideId, hoveredGuideId, setDraggingGuideId, guidesList, setEditorShowGuides, } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
|
|
@@ -23,7 +23,8 @@ const Ruler = ({ scale, points, originOffset, startMarking, size, markingGaps, o
|
|
|
23
23
|
if (!unsafeVideoConfig) {
|
|
24
24
|
throw new Error('Video config not set');
|
|
25
25
|
}
|
|
26
|
-
const
|
|
26
|
+
const guideCursor = isVerticalRuler ? 'ew-resize' : 'ns-resize';
|
|
27
|
+
const cursor = canCreateGuides ? guideCursor : 'default';
|
|
27
28
|
const guideHighlight = (0, react_1.useMemo)(() => (0, editor_guide_selection_1.getRulerGuideHighlight)({
|
|
28
29
|
guidesList,
|
|
29
30
|
selectedItems,
|
|
@@ -66,19 +67,18 @@ const Ruler = ({ scale, points, originOffset, startMarking, size, markingGaps, o
|
|
|
66
67
|
height: rulerHeight,
|
|
67
68
|
left: isVerticalRuler ? 0 : 'unset',
|
|
68
69
|
top: isVerticalRuler ? 'unset' : 0,
|
|
69
|
-
|
|
70
|
-
borderRight: isVerticalRuler ? '1px solid ' + colors_1.RULER_COLOR : undefined,
|
|
70
|
+
boxShadow: colors_1.SHADOW_BLACK,
|
|
71
71
|
cursor,
|
|
72
72
|
}), [rulerWidth, rulerHeight, cursor, isVerticalRuler]);
|
|
73
73
|
const onPointerDown = (0, react_1.useCallback)((e) => {
|
|
74
|
-
if (e.button !== 0) {
|
|
74
|
+
if (!canCreateGuides || e.button !== 0) {
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
77
|
e.preventDefault();
|
|
78
78
|
// Prevent deselection of currently selected items
|
|
79
79
|
e.stopPropagation();
|
|
80
80
|
shouldCreateGuideRef.current = true;
|
|
81
|
-
(0, ForceSpecificCursor_1.forceSpecificCursor)(
|
|
81
|
+
(0, ForceSpecificCursor_1.forceSpecificCursor)(guideCursor);
|
|
82
82
|
const guideId = makeGuideId();
|
|
83
83
|
setEditorShowGuides(() => true);
|
|
84
84
|
setDraggingGuideId(() => guideId);
|
|
@@ -103,9 +103,10 @@ const Ruler = ({ scale, points, originOffset, startMarking, size, markingGaps, o
|
|
|
103
103
|
orientation,
|
|
104
104
|
originOffset,
|
|
105
105
|
unsafeVideoConfig.id,
|
|
106
|
-
|
|
106
|
+
guideCursor,
|
|
107
107
|
onPointerSessionStart,
|
|
108
|
+
canCreateGuides,
|
|
108
109
|
]);
|
|
109
|
-
return (jsx_runtime_1.jsx("canvas", { ref: rulerCanvasRef, width: rulerWidth * window.devicePixelRatio, height: rulerHeight * window.devicePixelRatio, style: rulerStyle, [should_clear_selection_on_pointer_down_1.PREVENT_CLEAR_SELECTION_ON_POINTER_DOWN_ATTR]: 'true', onPointerDown: onPointerDown }));
|
|
110
|
+
return (jsx_runtime_1.jsx("canvas", { ref: rulerCanvasRef, width: rulerWidth * window.devicePixelRatio, height: rulerHeight * window.devicePixelRatio, style: rulerStyle, "aria-label": `${isVerticalRuler ? 'Vertical' : 'Horizontal'} ruler`, "aria-readonly": !canCreateGuides, [should_clear_selection_on_pointer_down_1.PREVENT_CLEAR_SELECTION_ON_POINTER_DOWN_ATTR]: 'true', onPointerDown: onPointerDown }));
|
|
110
111
|
};
|
|
111
112
|
exports.default = Ruler;
|
|
@@ -19,13 +19,12 @@ const originBlockStyles = {
|
|
|
19
19
|
position: 'absolute',
|
|
20
20
|
top: 0,
|
|
21
21
|
left: 0,
|
|
22
|
-
|
|
23
|
-
borderRight: '1px solid ' + colors_1.RULER_COLOR,
|
|
22
|
+
boxShadow: `inset -1px -1px 0 ${colors_1.WHITE_ALPHA_15}`,
|
|
24
23
|
width: `${editor_rulers_1.RULER_WIDTH}px`,
|
|
25
24
|
height: `${editor_rulers_1.RULER_WIDTH}px`,
|
|
26
25
|
background: colors_1.BACKGROUND,
|
|
27
26
|
};
|
|
28
|
-
const EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef }) => {
|
|
27
|
+
const EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef, canCreateGuides, }) => {
|
|
29
28
|
const { scale, canvasPosition } = (0, use_studio_canvas_dimensions_1.useStudioCanvasDimensions)({
|
|
30
29
|
canvasSize,
|
|
31
30
|
contentDimensions,
|
|
@@ -176,7 +175,7 @@ const EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerR
|
|
|
176
175
|
});
|
|
177
176
|
}, [finishGuideInteraction, onMouseMove]);
|
|
178
177
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
179
|
-
jsx_runtime_1.jsx(
|
|
178
|
+
jsx_runtime_1.jsx(Ruler_1.default, { canCreateGuides: canCreateGuides, orientation: "horizontal", scale: scale, points: horizontalRulerPoints, startMarking: horizontalRulerStartMarking, markingGaps: rulerMarkingGaps, originOffset: canvasPosition.left, size: canvasSize, onPointerSessionStart: onPointerSessionStart }), jsx_runtime_1.jsx(Ruler_1.default, { canCreateGuides: canCreateGuides, orientation: "vertical", scale: scale, points: verticalRulerPoints, startMarking: verticalRulerStartMarking, markingGaps: rulerMarkingGaps, originOffset: canvasPosition.top, size: canvasSize, onPointerSessionStart: onPointerSessionStart }), jsx_runtime_1.jsx("div", { style: originBlockStyles })
|
|
180
179
|
] }));
|
|
181
180
|
};
|
|
182
181
|
exports.EditorRulers = EditorRulers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useIsRulerVisible: () => boolean
|
|
1
|
+
export declare const useIsRulerVisible: () => boolean;
|
|
@@ -3,10 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useIsRulerVisible = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const remotion_1 = require("remotion");
|
|
6
|
+
const get_preview_file_type_1 = require("../../helpers/get-preview-file-type");
|
|
6
7
|
const editor_rulers_1 = require("../../state/editor-rulers");
|
|
7
8
|
const useIsRulerVisible = () => {
|
|
8
|
-
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
9
|
+
const { canvasContent, currentAssetMetadata } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
9
10
|
const { editorShowRulers } = (0, react_1.useContext)(editor_rulers_1.EditorShowRulersContext);
|
|
10
|
-
return (editorShowRulers &&
|
|
11
|
+
return (editorShowRulers &&
|
|
12
|
+
canvasContent !== null &&
|
|
13
|
+
(canvasContent.type === 'composition' ||
|
|
14
|
+
(canvasContent.type === 'asset' &&
|
|
15
|
+
(0, get_preview_file_type_1.getPreviewFileType)(canvasContent.asset) === 'video' &&
|
|
16
|
+
(currentAssetMetadata === null || currentAssetMetadata === void 0 ? void 0 : currentAssetMetadata.asset) === canvasContent.asset)));
|
|
11
17
|
};
|
|
12
18
|
exports.useIsRulerVisible = useIsRulerVisible;
|