@remotion/studio 4.0.499 → 4.0.501
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Studio.js +1 -1
- package/dist/api/delete-static-file.js +8 -3
- package/dist/api/rename-static-file.js +8 -0
- package/dist/api/watch-public-folder.js +2 -1
- package/dist/api/watch-static-file.js +2 -1
- package/dist/api/write-static-file.js +8 -3
- package/dist/components/AssetSelector.js +11 -7
- package/dist/components/AssetSelectorItem.d.ts +25 -0
- package/dist/components/AssetSelectorItem.js +116 -80
- package/dist/components/Canvas.js +6 -1
- package/dist/components/CaptionInspector.d.ts +10 -0
- package/dist/components/CaptionInspector.js +24 -0
- package/dist/components/CaptionTextEditor.d.ts +9 -0
- package/dist/components/CaptionTextEditor.js +132 -0
- package/dist/components/CompositionSelector.js +2 -32
- package/dist/components/ControlButton.js +1 -0
- package/dist/components/CurrentAsset.js +3 -2
- package/dist/components/EditorContexts.d.ts +0 -1
- package/dist/components/EditorContexts.js +2 -2
- package/dist/components/ExplorerPanel.js +2 -1
- package/dist/components/ExplorerPanelRef.d.ts +2 -0
- package/dist/components/FpsCounter.js +3 -3
- package/dist/components/FullscreenToggle.js +2 -1
- package/dist/components/GlobalKeybindings.js +9 -1
- package/dist/components/InitialCompositionLoader.d.ts +1 -1
- package/dist/components/InlineAction.d.ts +2 -1
- package/dist/components/InlineAction.js +3 -2
- package/dist/components/InlineCaptionInspector.d.ts +11 -0
- package/dist/components/InlineCaptionInspector.js +108 -0
- package/dist/components/InlineDropdown.d.ts +1 -1
- package/dist/components/InlineDropdown.js +3 -2
- package/dist/components/InspectorPanel/AlignmentControls.d.ts +2 -2
- package/dist/components/InspectorPanel/AlignmentControls.js +5 -2
- package/dist/components/InspectorPanel/CompositionInspector.js +12 -9
- package/dist/components/InspectorPanel/CompositionMetadata.js +170 -57
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.d.ts +2 -2
- package/dist/components/InspectorPanel/SelectedInspector.d.ts +1 -0
- package/dist/components/InspectorPanel/SelectedInspector.js +2 -2
- package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -3
- package/dist/components/InspectorPanel/SequenceSelectionInspector.d.ts +1 -0
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +10 -10
- package/dist/components/InspectorPanel/common.d.ts +17 -4
- package/dist/components/InspectorPanel/common.js +60 -6
- package/dist/components/InspectorPanel/inspector-section-collapse.d.ts +22 -0
- package/dist/components/InspectorPanel/inspector-section-collapse.js +165 -0
- package/dist/components/InspectorPanel/styles.js +7 -1
- package/dist/components/InspectorPanel/use-composition-actions.d.ts +3 -0
- package/dist/components/InspectorPanel/use-composition-actions.js +91 -5
- package/dist/components/InspectorPanel/use-track-for-selection.d.ts +1 -1
- package/dist/components/InspectorPanel.js +2 -2
- package/dist/components/InspectorSequenceSection.d.ts +2 -1
- package/dist/components/InspectorSequenceSection.js +279 -25
- package/dist/components/KeyboardShortcutsExplainer.js +4 -2
- package/dist/components/Menu/MenuItem.js +2 -1
- package/dist/components/MenuCompositionName.js +30 -7
- package/dist/components/MenuToolbar.d.ts +0 -1
- package/dist/components/MenuToolbar.js +15 -7
- package/dist/components/MobilePanel.d.ts +2 -1
- package/dist/components/MobilePanel.js +29 -25
- package/dist/components/ModalContainer.d.ts +1 -0
- package/dist/components/ModalContainer.js +2 -2
- package/dist/components/Modals.js +1 -1
- package/dist/components/NewComposition/DismissableModal.d.ts +1 -0
- package/dist/components/NewComposition/DismissableModal.js +2 -2
- package/dist/components/NewComposition/InputDragger.d.ts +7 -0
- package/dist/components/NewComposition/InputDragger.js +119 -8
- package/dist/components/OutlineToggle.d.ts +1 -3
- package/dist/components/OutlineToggle.js +2 -2
- package/dist/components/PreviewToolbar.js +10 -4
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.d.ts +7 -0
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +45 -0
- package/dist/components/QuickSwitcher/NoResults.d.ts +1 -1
- package/dist/components/QuickSwitcher/NoResults.js +1 -0
- package/dist/components/QuickSwitcher/QuickSwitcher.d.ts +10 -0
- package/dist/components/QuickSwitcher/QuickSwitcher.js +6 -2
- package/dist/components/QuickSwitcher/QuickSwitcherContent.d.ts +10 -0
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +95 -13
- package/dist/components/QuickSwitcher/QuickSwitcherResult.d.ts +4 -0
- package/dist/components/QuickSwitcher/QuickSwitcherResult.js +11 -8
- package/dist/components/QuickSwitcher/asset-search.d.ts +9 -0
- package/dist/components/QuickSwitcher/asset-search.js +42 -0
- package/dist/components/RenderQueue/ClientRenderQueueProcessor.d.ts +0 -1
- package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +3 -14
- package/dist/components/RenderQueue/RenderQueueDownloadItem.js +2 -2
- package/dist/components/SelectedOutlineCropControls.d.ts +8 -0
- package/dist/components/SelectedOutlineCropControls.js +299 -0
- package/dist/components/SelectedOutlineElement.js +84 -47
- package/dist/components/SelectedOutlineOverlay.d.ts +2 -2
- package/dist/components/SelectedOutlineOverlay.js +147 -16
- package/dist/components/SequencePropsSubscriptionProvider.d.ts +2 -0
- package/dist/components/SequencePropsSubscriptionProvider.js +31 -3
- package/dist/components/ShowOutlinesProvider.js +4 -1
- package/dist/components/SidebarCollapserControls.d.ts +3 -1
- package/dist/components/SidebarCollapserControls.js +34 -29
- package/dist/components/SnappingToggle.d.ts +1 -3
- package/dist/components/SnappingToggle.js +2 -2
- package/dist/components/Timeline/Timeline.js +19 -5
- package/dist/components/Timeline/TimelineAssetField.d.ts +9 -1
- package/dist/components/Timeline/TimelineAssetField.js +53 -100
- package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +7 -3
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +65 -38
- package/dist/components/Timeline/TimelineColorField.js +20 -1
- package/dist/components/Timeline/TimelineEffectPropItem.js +8 -77
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +8 -1
- package/dist/components/Timeline/TimelineHeightContainer.d.ts +2 -2
- package/dist/components/Timeline/TimelineKeyframeTracksContext.d.ts +3 -3
- package/dist/components/Timeline/TimelineList.d.ts +2 -2
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.d.ts +7 -2
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +10 -2
- package/dist/components/Timeline/TimelineRowChrome.d.ts +3 -0
- package/dist/components/Timeline/TimelineRowChrome.js +4 -3
- package/dist/components/Timeline/TimelineSelection.d.ts +9 -7
- package/dist/components/Timeline/TimelineSelection.js +17 -12
- package/dist/components/Timeline/TimelineSequence.js +2 -9
- package/dist/components/Timeline/TimelineSequenceItem.js +61 -15
- package/dist/components/Timeline/TimelineSequencePropItem.js +36 -85
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +0 -1
- package/dist/components/Timeline/TimelineTrack.d.ts +2 -2
- package/dist/components/Timeline/TimelineTrack.js +4 -2
- package/dist/components/Timeline/TimelineTracks.d.ts +2 -2
- package/dist/components/Timeline/border-radius-representation.d.ts +16 -0
- package/dist/components/Timeline/border-radius-representation.js +60 -0
- package/dist/components/Timeline/delete-selected-timeline-item.js +1 -6
- package/dist/components/Timeline/find-track-for-node-path-info.d.ts +1 -1
- package/dist/components/Timeline/get-sequence-context-menu-items.js +14 -12
- package/dist/components/Timeline/get-sequence-prop-reset-changes.d.ts +10 -0
- package/dist/components/Timeline/get-sequence-prop-reset-changes.js +33 -0
- package/dist/components/Timeline/reset-selected-timeline-props.js +20 -18
- package/dist/components/Timeline/save-effect-prop.d.ts +10 -0
- package/dist/components/Timeline/save-effect-prop.js +52 -1
- package/dist/components/Timeline/save-sequence-prop.d.ts +12 -1
- package/dist/components/Timeline/save-sequence-prop.js +25 -1
- package/dist/components/Timeline/should-show-track-in-timeline.d.ts +2 -2
- package/dist/components/Timeline/timeline-asset-link.js +17 -1
- package/dist/components/Timeline/timeline-field-display-utils.js +1 -0
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.d.ts +4 -0
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +9 -3
- package/dist/components/Timeline/use-timeline-asset-drop.js +4 -0
- package/dist/components/Timeline/use-timeline-height.d.ts +2 -2
- package/dist/components/TopPanel.js +2 -2
- package/dist/components/UndoRedoButtons.js +42 -11
- package/dist/components/composition-drop-preview.js +1 -0
- package/dist/components/handle-drop.d.ts +3 -2
- package/dist/components/handle-drop.js +2 -1
- package/dist/components/import-assets.d.ts +4 -2
- package/dist/components/import-assets.js +20 -7
- package/dist/components/menu-toolbar-height.d.ts +1 -0
- package/dist/components/menu-toolbar-height.js +4 -0
- package/dist/components/selected-outline-drag.d.ts +41 -4
- package/dist/components/selected-outline-drag.js +179 -2
- package/dist/components/selected-outline-geometry.d.ts +1 -0
- package/dist/components/selected-outline-measurement.d.ts +11 -0
- package/dist/components/selected-outline-measurement.js +64 -3
- package/dist/components/selected-outline-types.d.ts +44 -1
- package/dist/components/selected-outline-types.js +21 -1
- package/dist/components/use-element-overwrite-confirmation.d.ts +2 -0
- package/dist/components/use-element-overwrite-confirmation.js +73 -0
- package/dist/components/use-static-files.js +7 -2
- package/dist/error-overlay/react-overlay/effects/resolve-file-source.js +13 -2
- package/dist/error-overlay/remotion-overlay/Overlay.js +3 -3
- package/dist/error-overlay/remotion-overlay/ShortcutHint.js +2 -3
- package/dist/esm/{chunk-pk1zwsn1.js → chunk-n1kj09yv.js} +10618 -8002
- package/dist/esm/index.mjs +24 -8
- package/dist/esm/internals.mjs +10618 -8002
- package/dist/esm/previewEntry.mjs +40002 -37388
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/browser-studio-operations.d.ts +3 -0
- package/dist/helpers/browser-studio-operations.js +14 -0
- package/dist/helpers/calculate-timeline.d.ts +2 -2
- package/dist/helpers/calculate-timeline.js +8 -28
- package/dist/helpers/client-id.d.ts +0 -1
- package/dist/helpers/client-id.js +15 -10
- package/dist/helpers/download-blob.d.ts +1 -0
- package/dist/helpers/download-blob.js +15 -0
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +3 -10
- package/dist/helpers/get-timeline-sequence-sort-key.js +5 -13
- package/dist/helpers/inject-css.js +5 -3
- package/dist/helpers/interactivity-enabled.d.ts +1 -0
- package/dist/helpers/interactivity-enabled.js +7 -2
- package/dist/helpers/is-mac.d.ts +1 -0
- package/dist/helpers/is-mac.js +4 -0
- package/dist/helpers/open-in-editor.d.ts +5 -1
- package/dist/helpers/open-in-editor.js +39 -4
- package/dist/helpers/preview-server-events.js +46 -9
- package/dist/helpers/sort-by-nonce-history.js +97 -19
- package/dist/helpers/use-create-composition.js +8 -6
- package/dist/helpers/use-keybinding.js +2 -3
- package/dist/helpers/use-menu-structure.js +39 -1
- package/dist/hot-middleware-client/client.js +3 -3
- package/dist/icons/border-radius.d.ts +4 -0
- package/dist/icons/border-radius.js +8 -0
- package/dist/icons/caret.d.ts +1 -0
- package/dist/icons/caret.js +2 -2
- package/dist/icons/fullscreen.d.ts +4 -0
- package/dist/icons/fullscreen.js +6 -0
- package/dist/icons/pen.d.ts +5 -0
- package/dist/icons/pen.js +8 -0
- package/dist/previewEntry.js +1 -1
- package/dist/state/modals.d.ts +9 -0
- package/dist/state/timeline-sequence-hover.d.ts +17 -0
- package/dist/state/timeline-sequence-hover.js +33 -0
- package/package.json +13 -12
- package/dist/helpers/get-timeline-sequence-hash.d.ts +0 -6
- package/dist/helpers/get-timeline-sequence-hash.js +0 -33
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useCreateComposition = exports.getUniqueCompositionName = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const
|
|
5
|
+
const InitialCompositionLoader_1 = require("../components/InitialCompositionLoader");
|
|
6
6
|
const actions_1 = require("../components/RenderQueue/actions");
|
|
7
|
-
const url_state_1 = require("./url-state");
|
|
8
7
|
const validate_new_comp_data_1 = require("./validate-new-comp-data");
|
|
9
8
|
const toPascalCase = (value) => {
|
|
10
9
|
var _a;
|
|
@@ -48,7 +47,7 @@ const getUniqueCompositionName = (compositions) => {
|
|
|
48
47
|
};
|
|
49
48
|
exports.getUniqueCompositionName = getUniqueCompositionName;
|
|
50
49
|
const useCreateComposition = ({ compositions, durationInFrames, folderName, newId, parentName, selectedFrameRate, size, }) => {
|
|
51
|
-
const
|
|
50
|
+
const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
|
|
52
51
|
const componentName = (0, react_1.useMemo)(() => toPascalCase(newId), [newId]);
|
|
53
52
|
const nameValidationMessage = (0, react_1.useMemo)(() => {
|
|
54
53
|
return (0, validate_new_comp_data_1.validateCompositionName)(newId, compositions);
|
|
@@ -94,11 +93,14 @@ const useCreateComposition = ({ compositions, durationInFrames, folderName, newI
|
|
|
94
93
|
});
|
|
95
94
|
if (result.success) {
|
|
96
95
|
await waitForComposition(newId);
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
selectComposition({
|
|
97
|
+
id: newId,
|
|
98
|
+
folderName,
|
|
99
|
+
parentFolderName: parentName,
|
|
100
|
+
}, true);
|
|
99
101
|
}
|
|
100
102
|
return result;
|
|
101
|
-
}, [codemod, newId,
|
|
103
|
+
}, [codemod, folderName, newId, parentName, selectComposition]);
|
|
102
104
|
return {
|
|
103
105
|
codemod,
|
|
104
106
|
createComposition,
|
|
@@ -4,6 +4,7 @@ exports.useKeybinding = exports.areKeyboardShortcutsDisabled = void 0;
|
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const keybindings_1 = require("../state/keybindings");
|
|
6
6
|
const z_index_1 = require("../state/z-index");
|
|
7
|
+
const is_mac_1 = require("./is-mac");
|
|
7
8
|
const studio_runtime_config_1 = require("./studio-runtime-config");
|
|
8
9
|
if (!(0, studio_runtime_config_1.getStudioKeyboardShortcutsEnabled)()) {
|
|
9
10
|
// eslint-disable-next-line no-console
|
|
@@ -29,9 +30,7 @@ const useKeybinding = () => {
|
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
32
|
const listener = (e) => {
|
|
32
|
-
const commandKey =
|
|
33
|
-
? e.metaKey
|
|
34
|
-
: e.ctrlKey;
|
|
33
|
+
const commandKey = is_mac_1.isMac ? e.metaKey : e.ctrlKey;
|
|
35
34
|
// Apparently, e.key can be undefined in Edge:
|
|
36
35
|
// https://github.com/remotion-dev/remotion/issues/5637
|
|
37
36
|
if (!e.key) {
|
|
@@ -24,9 +24,11 @@ const editor_snapping_1 = require("../state/editor-snapping");
|
|
|
24
24
|
const editor_zoom_gestures_1 = require("../state/editor-zoom-gestures");
|
|
25
25
|
const modals_1 = require("../state/modals");
|
|
26
26
|
const sidebar_1 = require("../state/sidebar");
|
|
27
|
+
const browser_studio_operations_1 = require("./browser-studio-operations");
|
|
27
28
|
const check_fullscreen_support_1 = require("./check-fullscreen-support");
|
|
28
29
|
const client_id_1 = require("./client-id");
|
|
29
30
|
const colors_1 = require("./colors");
|
|
31
|
+
const download_blob_1 = require("./download-blob");
|
|
30
32
|
const get_file_manager_name_1 = require("./get-file-manager-name");
|
|
31
33
|
const get_git_menu_item_1 = require("./get-git-menu-item");
|
|
32
34
|
const mobile_layout_1 = require("./mobile-layout");
|
|
@@ -39,10 +41,19 @@ const openExternal = (link) => {
|
|
|
39
41
|
};
|
|
40
42
|
const rotate = {
|
|
41
43
|
transform: `rotate(90deg)`,
|
|
44
|
+
color: 'inherit',
|
|
45
|
+
};
|
|
46
|
+
const iconContainer = {
|
|
47
|
+
color: 'inherit',
|
|
48
|
+
};
|
|
49
|
+
const iconPath = {
|
|
50
|
+
color: 'inherit',
|
|
42
51
|
};
|
|
43
52
|
const ICON_SIZE = 16;
|
|
44
53
|
const getFileMenu = ({ readOnlyStudio, closeMenu, previewServerState, setSelectedModal, }) => {
|
|
45
54
|
const fileManagerName = (0, get_file_manager_name_1.getFileManagerName)(window.remotion_fileSystemPlatform);
|
|
55
|
+
const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
|
|
56
|
+
const downloadProject = browserStudioOperations === null || browserStudioOperations === void 0 ? void 0 : browserStudioOperations.downloadProject;
|
|
46
57
|
const items = [
|
|
47
58
|
readOnlyStudio
|
|
48
59
|
? null
|
|
@@ -125,6 +136,29 @@ const getFileMenu = ({ readOnlyStudio, closeMenu, previewServerState, setSelecte
|
|
|
125
136
|
subMenu: null,
|
|
126
137
|
quickSwitcherLabel: 'Render on web...',
|
|
127
138
|
},
|
|
139
|
+
downloadProject
|
|
140
|
+
? {
|
|
141
|
+
id: 'download-project',
|
|
142
|
+
value: 'download-project',
|
|
143
|
+
label: 'Download project',
|
|
144
|
+
onClick: async () => {
|
|
145
|
+
closeMenu();
|
|
146
|
+
try {
|
|
147
|
+
const { data, fileName } = await downloadProject();
|
|
148
|
+
const arrayBuffer = data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength);
|
|
149
|
+
(0, download_blob_1.downloadBlob)(new Blob([arrayBuffer], { type: 'application/zip' }), fileName);
|
|
150
|
+
}
|
|
151
|
+
catch (error) {
|
|
152
|
+
(0, NotificationCenter_1.showNotification)(`Could not download project: ${error instanceof Error ? error.message : String(error)}`, 2000);
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
type: 'item',
|
|
156
|
+
keyHint: null,
|
|
157
|
+
leftItem: null,
|
|
158
|
+
subMenu: null,
|
|
159
|
+
quickSwitcherLabel: 'Download project',
|
|
160
|
+
}
|
|
161
|
+
: null,
|
|
128
162
|
!readOnlyStudio
|
|
129
163
|
? {
|
|
130
164
|
type: 'divider',
|
|
@@ -235,7 +269,7 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
235
269
|
let struct = [
|
|
236
270
|
{
|
|
237
271
|
id: 'remotion',
|
|
238
|
-
label: (jsx_runtime_1.jsx(layout_1.Row, { align: "center", justify: "center", children: jsx_runtime_1.jsx("svg", { width: ICON_SIZE, height: ICON_SIZE, viewBox: "-100 -100 400 400", style: rotate, children: jsx_runtime_1.jsx("path", { fill: colors_1.
|
|
272
|
+
label: (jsx_runtime_1.jsx(layout_1.Row, { align: "center", justify: "center", style: iconContainer, children: jsx_runtime_1.jsx("svg", { width: ICON_SIZE, height: ICON_SIZE, viewBox: "-100 -100 400 400", style: rotate, children: jsx_runtime_1.jsx("path", { fill: colors_1.CURRENT_COLOR, stroke: colors_1.CURRENT_COLOR, style: iconPath, strokeWidth: "100", strokeLinejoin: "round", d: "M 2 172 a 196 100 0 0 0 195 5 A 196 240 0 0 0 100 2.259 A 196 240 0 0 0 2 172 z" }) }) })),
|
|
239
273
|
leaveLeftPadding: false,
|
|
240
274
|
items: [
|
|
241
275
|
{
|
|
@@ -574,6 +608,8 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
574
608
|
type: 'quick-switcher',
|
|
575
609
|
mode: 'compositions',
|
|
576
610
|
invocationTimestamp: Date.now(),
|
|
611
|
+
assetSelection: null,
|
|
612
|
+
compositionSelection: null,
|
|
577
613
|
});
|
|
578
614
|
},
|
|
579
615
|
type: 'item',
|
|
@@ -762,6 +798,8 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
762
798
|
type: 'quick-switcher',
|
|
763
799
|
mode: 'docs',
|
|
764
800
|
invocationTimestamp: Date.now(),
|
|
801
|
+
assetSelection: null,
|
|
802
|
+
compositionSelection: null,
|
|
765
803
|
});
|
|
766
804
|
},
|
|
767
805
|
keyHint: '?',
|
|
@@ -107,9 +107,9 @@ const enableHotMiddleware = () => {
|
|
|
107
107
|
window.__remotion_processHmrEvent = (hmrEvent) => {
|
|
108
108
|
processMessage(hmrEvent);
|
|
109
109
|
};
|
|
110
|
-
// Connect
|
|
111
|
-
//
|
|
112
|
-
if (typeof window !== 'undefined'
|
|
110
|
+
// Connect immediately so HMR works before React mounts. Browser Studio and
|
|
111
|
+
// the preview server share the same transport-neutral event subscription.
|
|
112
|
+
if (typeof window !== 'undefined') {
|
|
113
113
|
if (!unsubscribeFromPreviewServerEvents) {
|
|
114
114
|
unsubscribeFromPreviewServerEvents = (0, preview_server_events_1.subscribeToPreviewServerEvents)((event) => {
|
|
115
115
|
if (event.type === 'hmr') {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BorderRadiusIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const BorderRadiusIcon = ({ color, ...props }) => {
|
|
6
|
+
return (jsx_runtime_1.jsx("svg", { viewBox: "0 0 16 16", fill: "none", ...props, children: jsx_runtime_1.jsx("path", { d: "M2.5 3.5H6.5C10.4 3.5 12.5 5.6 12.5 9.5V13.5", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2" }) }));
|
|
7
|
+
};
|
|
8
|
+
exports.BorderRadiusIcon = BorderRadiusIcon;
|
package/dist/icons/caret.d.ts
CHANGED
package/dist/icons/caret.js
CHANGED
|
@@ -18,8 +18,8 @@ const angleDown = {
|
|
|
18
18
|
};
|
|
19
19
|
const CaretRight = () => (jsx_runtime_1.jsx("svg", { viewBox: "0 0 192 512", style: caret, children: jsx_runtime_1.jsx("path", { fill: colors_1.CURRENT_COLOR, d: "M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z" }) }));
|
|
20
20
|
exports.CaretRight = CaretRight;
|
|
21
|
-
const CaretDown = ({ small = false
|
|
22
|
-
return (jsx_runtime_1.jsx("svg", { viewBox: "0 0 320 512", style: small ? caretDownSmall : caretDown, children: jsx_runtime_1.jsx("path", { fill:
|
|
21
|
+
const CaretDown = ({ color = colors_1.CURRENT_COLOR, small = false }) => {
|
|
22
|
+
return (jsx_runtime_1.jsx("svg", { viewBox: "0 0 320 512", style: small ? caretDownSmall : caretDown, children: jsx_runtime_1.jsx("path", { fill: color, d: "M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z" }) }));
|
|
23
23
|
};
|
|
24
24
|
exports.CaretDown = CaretDown;
|
|
25
25
|
const AngleDown = ({ down }) => {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FullscreenIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const FullscreenIcon = ({ color, ...props }) => (jsx_runtime_1.jsx("svg", { viewBox: "0 0 448 512", ...props, children: jsx_runtime_1.jsx("path", { fill: color, d: "M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z" }) }));
|
|
6
|
+
exports.FullscreenIcon = FullscreenIcon;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PenIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const PenIcon = ({ color, ...props }) => {
|
|
6
|
+
return (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...props, children: jsx_runtime_1.jsx("path", { fill: color, d: "M18.7 2.3a1 1 0 0 0-1.4 0L5.2 14.4a1 1 0 0 0-.26.46l-1.4 4.95a.5.5 0 0 0 .62.62l4.95-1.4a1 1 0 0 0 .46-.26L21.7 6.7a1 1 0 0 0 0-1.4l-3-3Zm-10.33 14.9-2.4.68.68-2.4L15.5 6.62l1.73 1.73-8.86 8.85Zm10.28-10.27L16.92 5.2 18 4.12l1.73 1.73-1.08 1.08Z" }) }));
|
|
7
|
+
};
|
|
8
|
+
exports.PenIcon = PenIcon;
|
package/dist/previewEntry.js
CHANGED
|
@@ -45,5 +45,5 @@ const renderToDOM = (content) => {
|
|
|
45
45
|
};
|
|
46
46
|
renderToDOM(jsx_runtime_1.jsx(NoRegisterRoot_1.NoRegisterRoot, {}));
|
|
47
47
|
remotion_1.Internals.waitForRoot((NewRoot) => {
|
|
48
|
-
renderToDOM(jsx_runtime_1.jsx(Studio_1.Studio, { readOnly:
|
|
48
|
+
renderToDOM(jsx_runtime_1.jsx(Studio_1.Studio, { readOnly: window.remotion_isReadOnlyStudio, rootComponent: NewRoot }));
|
|
49
49
|
});
|
package/dist/state/modals.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { PackageManager, RenderDefaults } from '@remotion/studio-shared';
|
|
|
4
4
|
import type { RenderStillOnWebImageFormat, WebRendererAudioCodec, WebRendererContainer, WebRendererHardwareAcceleration, WebRendererPageResponsiveness, WebRendererQuality, WebRendererVideoCodec } from '@remotion/web-renderer';
|
|
5
5
|
import type React from 'react';
|
|
6
6
|
import type { SequencePropsSubscriptionKey, _InternalTypes } from 'remotion';
|
|
7
|
+
import type { StaticFile } from '../api/get-static-files';
|
|
7
8
|
import type { CompType } from '../components/NewComposition/DuplicateComposition';
|
|
8
9
|
import type { QuickSwitcherMode } from '../components/QuickSwitcher/NoResults';
|
|
9
10
|
import type { RenderType } from '../components/RenderModal/RenderModalAdvanced';
|
|
@@ -159,6 +160,14 @@ export type ModalState = {
|
|
|
159
160
|
type: 'quick-switcher';
|
|
160
161
|
mode: QuickSwitcherMode;
|
|
161
162
|
invocationTimestamp: number;
|
|
163
|
+
assetSelection: {
|
|
164
|
+
initialQuery: string;
|
|
165
|
+
onSelected: (asset: StaticFile) => void;
|
|
166
|
+
} | null;
|
|
167
|
+
compositionSelection: {
|
|
168
|
+
excludeCompositionId: string;
|
|
169
|
+
onSelected: (composition: _InternalTypes['AnyComposition']) => void;
|
|
170
|
+
} | null;
|
|
162
171
|
} | AddEffectModalState | ConfirmationDialogState | SvgImportDialogState;
|
|
163
172
|
export type ModalContextType = {
|
|
164
173
|
selectedModal: ModalState | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import type { SequenceNodePathInfo } from '../helpers/get-timeline-sequence-sort-key';
|
|
3
|
+
export type TimelineSequenceHover = {
|
|
4
|
+
readonly key: string;
|
|
5
|
+
readonly source: 'canvas' | 'timeline';
|
|
6
|
+
};
|
|
7
|
+
type TimelineSequenceHoverState = {
|
|
8
|
+
readonly hoveredSequence: TimelineSequenceHover | null;
|
|
9
|
+
readonly setHoveredSequence: Dispatch<SetStateAction<TimelineSequenceHover | null>>;
|
|
10
|
+
};
|
|
11
|
+
export declare const TimelineSequenceHoverContext: import("react").Context<TimelineSequenceHoverState>;
|
|
12
|
+
export declare const useTimelineSequenceHover: (nodePathInfo: SequenceNodePathInfo | null) => {
|
|
13
|
+
hovered: boolean;
|
|
14
|
+
onPointerEnter: () => void;
|
|
15
|
+
onPointerLeave: () => void;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useTimelineSequenceHover = exports.TimelineSequenceHoverContext = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const timeline_node_path_key_1 = require("../helpers/timeline-node-path-key");
|
|
6
|
+
exports.TimelineSequenceHoverContext = (0, react_1.createContext)({
|
|
7
|
+
hoveredSequence: null,
|
|
8
|
+
setHoveredSequence: () => undefined,
|
|
9
|
+
});
|
|
10
|
+
const useTimelineSequenceHover = (nodePathInfo) => {
|
|
11
|
+
const { hoveredSequence, setHoveredSequence } = (0, react_1.useContext)(exports.TimelineSequenceHoverContext);
|
|
12
|
+
const sequenceKey = (0, react_1.useMemo)(() => nodePathInfo === null
|
|
13
|
+
? null
|
|
14
|
+
: (0, timeline_node_path_key_1.timelineNodePathInfoToKey)({ ...nodePathInfo, auxiliaryKeys: [] }), [nodePathInfo]);
|
|
15
|
+
const onPointerEnter = (0, react_1.useCallback)(() => {
|
|
16
|
+
if (sequenceKey === null) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
setHoveredSequence({ key: sequenceKey, source: 'timeline' });
|
|
20
|
+
}, [sequenceKey, setHoveredSequence]);
|
|
21
|
+
const onPointerLeave = (0, react_1.useCallback)(() => {
|
|
22
|
+
setHoveredSequence((currentHover) => {
|
|
23
|
+
if ((currentHover === null || currentHover === void 0 ? void 0 : currentHover.source) !== 'timeline' ||
|
|
24
|
+
currentHover.key !== sequenceKey) {
|
|
25
|
+
return currentHover;
|
|
26
|
+
}
|
|
27
|
+
return null;
|
|
28
|
+
});
|
|
29
|
+
}, [sequenceKey, setHoveredSequence]);
|
|
30
|
+
const hovered = sequenceKey !== null && (hoveredSequence === null || hoveredSequence === void 0 ? void 0 : hoveredSequence.key) === sequenceKey;
|
|
31
|
+
return (0, react_1.useMemo)(() => ({ hovered, onPointerEnter, onPointerLeave }), [hovered, onPointerEnter, onPointerLeave]);
|
|
32
|
+
};
|
|
33
|
+
exports.useTimelineSequenceHover = useTimelineSequenceHover;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/studio"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/studio",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.501",
|
|
7
7
|
"description": "APIs for interacting with the Remotion Studio",
|
|
8
8
|
"main": "dist",
|
|
9
9
|
"scripts": {
|
|
@@ -24,17 +24,18 @@
|
|
|
24
24
|
"react-dom": ">=16.8.0"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@remotion/drag-and-drop": "4.0.
|
|
27
|
+
"@remotion/drag-and-drop": "4.0.501",
|
|
28
28
|
"semver": "7.5.3",
|
|
29
|
-
"remotion": "4.0.
|
|
30
|
-
"@remotion/canvas-capture": "4.0.
|
|
31
|
-
"@remotion/
|
|
32
|
-
"@remotion/
|
|
33
|
-
"@remotion/
|
|
34
|
-
"@remotion/
|
|
35
|
-
"@remotion/
|
|
36
|
-
"@remotion/
|
|
37
|
-
"@remotion/
|
|
29
|
+
"remotion": "4.0.501",
|
|
30
|
+
"@remotion/canvas-capture": "4.0.501",
|
|
31
|
+
"@remotion/captions": "4.0.501",
|
|
32
|
+
"@remotion/player": "4.0.501",
|
|
33
|
+
"@remotion/media-utils": "4.0.501",
|
|
34
|
+
"@remotion/renderer": "4.0.501",
|
|
35
|
+
"@remotion/web-renderer": "4.0.501",
|
|
36
|
+
"@remotion/studio-shared": "4.0.501",
|
|
37
|
+
"@remotion/timeline-utils": "4.0.501",
|
|
38
|
+
"@remotion/zod-types": "4.0.501",
|
|
38
39
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
39
40
|
"mediabunny": "1.50.8",
|
|
40
41
|
"memfs": "3.4.3",
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
"react": "19.2.3",
|
|
46
47
|
"react-dom": "19.2.3",
|
|
47
48
|
"@types/semver": "7.5.3",
|
|
48
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
49
|
+
"@remotion/eslint-config-internal": "4.0.501",
|
|
49
50
|
"eslint": "9.19.0",
|
|
50
51
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
51
52
|
},
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTimelineSequenceHash = void 0;
|
|
4
|
-
// The goal for this function is to calculate an as unique as possible identifier
|
|
5
|
-
// for a sequence based on it's properties. A sequence can be registered multiple times
|
|
6
|
-
// from main preview and from thumbnails and we use this to deduplicate it.
|
|
7
|
-
// This is why we don't use `id` properties as they will
|
|
8
|
-
// differ as a hash.
|
|
9
|
-
const getTimelineSequenceHash = (sequence, allSequences, hashesUsedInRoot, cache) => {
|
|
10
|
-
if (cache[sequence.id]) {
|
|
11
|
-
return cache[sequence.id];
|
|
12
|
-
}
|
|
13
|
-
const parent = allSequences.find((a) => a.id === sequence.parent);
|
|
14
|
-
const baseHash = [
|
|
15
|
-
parent
|
|
16
|
-
? (0, exports.getTimelineSequenceHash)(parent, allSequences, hashesUsedInRoot, cache)
|
|
17
|
-
: null,
|
|
18
|
-
sequence.displayName,
|
|
19
|
-
sequence.duration,
|
|
20
|
-
sequence.from,
|
|
21
|
-
sequence.type,
|
|
22
|
-
sequence.type === 'audio' ? sequence.src : null,
|
|
23
|
-
sequence.type === 'audio' ? sequence.volume : null,
|
|
24
|
-
sequence.type === 'video' ? sequence.src : null,
|
|
25
|
-
sequence.type === 'video' ? sequence.volume : null,
|
|
26
|
-
].join('-');
|
|
27
|
-
const actualHash = baseHash +
|
|
28
|
-
hashesUsedInRoot[sequence.rootId].filter((h) => h === baseHash).length;
|
|
29
|
-
hashesUsedInRoot[sequence.rootId].push(baseHash);
|
|
30
|
-
cache[sequence.id] = actualHash;
|
|
31
|
-
return actualHash;
|
|
32
|
-
};
|
|
33
|
-
exports.getTimelineSequenceHash = getTimelineSequenceHash;
|