@remotion/studio 4.0.505 → 4.0.507
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/copy-render-output-to-asset.d.ts +4 -0
- package/dist/api/copy-render-output-to-asset.js +11 -0
- package/dist/api/install-package.d.ts +2 -3
- package/dist/api/install-package.js +1 -3
- package/dist/api/visual-control.d.ts +3 -0
- package/dist/api/visual-control.js +3 -0
- package/dist/components/AssetSelector.js +19 -4
- package/dist/components/AssetSelectorItem.js +3 -3
- package/dist/components/Canvas.js +2 -0
- package/dist/components/CodingAgentIcon.d.ts +4 -0
- package/dist/components/CodingAgentIcon.js +17 -0
- package/dist/components/CompositionSelector.js +1 -1
- package/dist/components/CompositionSelectorItem.js +1 -1
- package/dist/components/ConfigureDefaultEditorModal.d.ts +1 -1
- package/dist/components/ConfigureDefaultEditorModal.js +117 -69
- package/dist/components/ConfigureLicenseModal.d.ts +1 -3
- package/dist/components/ConfigureLicenseModal.js +105 -89
- package/dist/components/ConfirmationDialog.js +2 -2
- package/dist/components/ContextMenu.js +10 -8
- package/dist/components/Editor.js +2 -0
- package/dist/components/EditorContexts.js +6 -5
- package/dist/components/EffectPickerModal.js +1 -1
- package/dist/components/ExpandedTracksProvider.js +10 -53
- package/dist/components/GlobalKeybindings.js +3 -2
- package/dist/components/InlineCaptionInspector.d.ts +2 -2
- package/dist/components/InlineDropdown.d.ts +2 -1
- package/dist/components/InlineDropdown.js +10 -4
- package/dist/components/InspectorLocationCopy.js +8 -8
- package/dist/components/InspectorOpenInEditor.d.ts +2 -0
- package/dist/components/InspectorOpenInEditor.js +63 -49
- package/dist/components/InspectorPanel/AlignmentControls.js +5 -2
- package/dist/components/InspectorPanel/CompositionInspector.js +15 -1
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +1 -1
- package/dist/components/InspectorPanel/EasingInspector.js +7 -4
- package/dist/components/InspectorPanel/KeyframeInspector.js +5 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -0
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +22 -4
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -1
- package/dist/components/InspectorPanel/common.d.ts +1 -0
- package/dist/components/InspectorPanel/common.js +2 -2
- package/dist/components/InspectorPanel/use-composition-actions.js +4 -1
- package/dist/components/InspectorSequenceSection.js +4 -4
- package/dist/components/InstallPackage.js +1 -1
- package/dist/components/Menu/MenuSectionHeader.d.ts +4 -0
- package/dist/components/Menu/MenuSectionHeader.js +20 -0
- package/dist/components/Menu/SubMenu.js +13 -2
- package/dist/components/Menu/menu-tree-context.d.ts +3 -0
- package/dist/components/Menu/menu-tree-context.js +13 -0
- package/dist/components/MenuBuildIndicator.js +1 -0
- package/dist/components/MenuToolbar.js +1 -1
- package/dist/components/ModalFooter.d.ts +1 -0
- package/dist/components/ModalFooter.js +6 -2
- package/dist/components/ModalHeader.js +1 -1
- package/dist/components/Modals.js +18 -7
- package/dist/components/ModalsProvider.js +5 -6
- package/dist/components/NewComposition/CodemodFooter.js +1 -1
- package/dist/components/NewComposition/ComboBox.d.ts +6 -1
- package/dist/components/NewComposition/DismissableModal.js +1 -1
- package/dist/components/NewComposition/MenuContent.js +27 -19
- package/dist/components/NewComposition/RenameStaticFile.js +1 -1
- package/dist/components/NewComposition/menu-typeahead.js +2 -2
- package/dist/components/OverrideInputProps.js +1 -1
- package/dist/components/PlayPause.js +2 -1
- package/dist/components/PlaybackKeyboardShortcutsManager.js +7 -5
- package/dist/components/Preview.js +29 -4
- package/dist/components/PreviewToolbarOverflowButton.js +4 -2
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -1
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
- package/dist/components/RenderButton.d.ts +3 -3
- package/dist/components/RenderButton.js +42 -7
- package/dist/components/RenderModal/RenderStatusModal.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +1 -0
- package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +2 -2
- package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +3 -3
- package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +1 -1
- package/dist/components/RenderModal/ServerRenderModal.js +5 -1
- package/dist/components/RenderModal/WebRenderModal.js +3 -2
- package/dist/components/RenderQueue/RenderQueueError.js +1 -1
- package/dist/components/RenderQueue/RenderQueueItem.js +8 -2
- package/dist/components/RenderQueue/RenderQueueItemStatus.js +1 -1
- package/dist/components/RenderQueue/RenderQueueProgressMessage.js +1 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.js +1 -1
- package/dist/components/RenderQueue/actions.d.ts +4 -2
- package/dist/components/RenderQueue/actions.js +4 -2
- package/dist/components/RenderQueue/index.js +3 -4
- package/dist/components/RenderQueue/use-render-output-file-drag.d.ts +8 -0
- package/dist/components/RenderQueue/use-render-output-file-drag.js +121 -0
- package/dist/components/SegmentedControl.js +0 -1
- package/dist/components/SelectedOutlineElement.d.ts +14 -17
- package/dist/components/SelectedOutlineElement.js +113 -931
- package/dist/components/SelectedOutlineKeyboardControls.d.ts +7 -0
- package/dist/components/SelectedOutlineKeyboardControls.js +261 -0
- package/dist/components/SelectedOutlineOverlay.d.ts +6 -13
- package/dist/components/SelectedOutlineOverlay.js +360 -832
- package/dist/components/SelectedOutlinePolygon.d.ts +25 -0
- package/dist/components/SelectedOutlinePolygon.js +359 -0
- package/dist/components/SelectedOutlineRenderer.d.ts +18 -0
- package/dist/components/SelectedOutlineRenderer.js +208 -0
- package/dist/components/SelectedOutlineRotationCornerHandle.d.ts +16 -0
- package/dist/components/SelectedOutlineRotationCornerHandle.js +269 -0
- package/dist/components/SelectedOutlineScaleEdgeLine.d.ts +16 -0
- package/dist/components/SelectedOutlineScaleEdgeLine.js +211 -0
- package/dist/components/SelectedOutlineSnapIndicators.d.ts +9 -0
- package/dist/components/SelectedOutlineSnapIndicators.js +29 -0
- package/dist/components/SelectedOutlineTransformOriginHandle.d.ts +9 -0
- package/dist/components/SelectedOutlineTransformOriginHandle.js +286 -0
- package/dist/components/SelectedOutlineUvControls.d.ts +3 -9
- package/dist/components/SelectedOutlineUvControls.js +57 -12
- package/dist/components/SettingsContext.d.ts +15 -0
- package/dist/components/SettingsContext.js +116 -0
- package/dist/components/SettingsModal.d.ts +7 -0
- package/dist/components/SettingsModal.js +56 -0
- package/dist/components/SettingsModalFooter.d.ts +2 -0
- package/dist/components/SettingsModalFooter.js +44 -0
- package/dist/components/ShowOutlinesProvider.js +2 -3
- package/dist/components/SidebarRenderButton.js +1 -1
- package/dist/components/SvgImportDialog.js +2 -2
- package/dist/components/TimeValue.js +1 -1
- package/dist/components/Timeline/EasingEditorModal.js +66 -22
- package/dist/components/Timeline/Timeline.js +23 -5
- package/dist/components/Timeline/TimelineAssetField.js +1 -1
- package/dist/components/Timeline/TimelineDragHandler.js +3 -3
- package/dist/components/Timeline/TimelineDuplicateCount.d.ts +4 -0
- package/dist/components/Timeline/TimelineDuplicateCount.js +28 -0
- package/dist/components/Timeline/TimelineEffectPropItem.js +5 -3
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +3 -23
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +4 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +2 -2
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +4 -2
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +11 -1
- package/dist/components/Timeline/TimelineFontFamilyField.js +3 -1
- package/dist/components/Timeline/TimelineKeyframeControls.js +1 -0
- package/dist/components/Timeline/TimelineSelection.js +1 -0
- package/dist/components/Timeline/TimelineSequence.js +28 -25
- package/dist/components/Timeline/TimelineSequenceItem.js +74 -58
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +1 -1
- package/dist/components/Timeline/TimelineTrack.js +2 -1
- package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +6 -3
- package/dist/components/Timeline/get-sequence-context-menu-items.js +58 -53
- package/dist/components/Timeline/reset-selected-timeline-props.js +1 -1
- package/dist/components/Timeline/should-subscribe-to-sequence-props.d.ts +1 -1
- package/dist/components/Timeline/timeline-asset-link.d.ts +2 -2
- package/dist/components/Timeline/timeline-asset-link.js +2 -2
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +38 -2
- package/dist/components/Timeline/{use-open-sequence-in-editor.d.ts → use-open-sequence-in-apps.d.ts} +4 -1
- package/dist/components/Timeline/{use-open-sequence-in-editor.js → use-open-sequence-in-apps.js} +20 -4
- package/dist/components/Timeline/use-timeline-asset-drop.js +1 -0
- package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +5 -0
- package/dist/components/Timeline/use-timeline-expanded-tree.js +50 -1
- package/dist/components/Timeline/use-timeline-height.js +20 -0
- package/dist/components/TimelineInOutToggle.js +5 -1
- package/dist/components/TopPanel.js +16 -0
- package/dist/components/UpdateCheck.js +1 -1
- package/dist/components/effect-drag-and-drop.js +1 -1
- package/dist/components/get-open-in-menu-items.d.ts +12 -0
- package/dist/components/get-open-in-menu-items.js +83 -0
- package/dist/components/handle-drop.d.ts +2 -1
- package/dist/components/handle-drop.js +12 -2
- package/dist/components/import-assets.d.ts +18 -6
- package/dist/components/import-assets.js +76 -32
- package/dist/components/selected-outline-measurement.d.ts +2 -2
- package/dist/components/selected-outline-order.d.ts +12 -0
- package/dist/components/selected-outline-order.js +251 -0
- package/dist/components/selected-outline-types.d.ts +9 -10
- package/dist/components/svg-point-to-client-point.d.ts +2 -0
- package/dist/components/svg-point-to-client-point.js +10 -0
- package/dist/components/use-auto-save-config.d.ts +8 -0
- package/dist/components/use-auto-save-config.js +74 -0
- package/dist/components/use-default-editor-info.d.ts +1 -0
- package/dist/components/use-default-editor-info.js +10 -30
- package/dist/esm/{chunk-jefhcs5z.js → chunk-fgedsvhb.js} +1 -2
- package/dist/esm/{chunk-7pgk8h5m.js → chunk-ptnd65a9.js} +14596 -12725
- package/dist/esm/internals.mjs +14595 -12724
- package/dist/esm/previewEntry.mjs +12726 -10855
- package/dist/esm/renderEntry.mjs +2 -2
- package/dist/helpers/are-sequence-node-path-infos-equal.d.ts +2 -0
- package/dist/helpers/are-sequence-node-path-infos-equal.js +27 -0
- package/dist/helpers/calculate-timeline.js +3 -3
- package/dist/helpers/client-id.d.ts +3 -1
- package/dist/helpers/client-id.js +28 -4
- package/dist/helpers/format-file-location.d.ts +1 -1
- package/dist/helpers/format-file-location.js +3 -3
- package/dist/helpers/install-required-package.d.ts +3 -3
- package/dist/helpers/install-required-package.js +1 -6
- package/dist/helpers/migrate-expanded-tracks-for-subscription-key.js +3 -3
- package/dist/helpers/open-in-editor.d.ts +1 -0
- package/dist/helpers/open-in-editor.js +5 -1
- package/dist/helpers/studio-fit-padding.d.ts +1 -1
- package/dist/helpers/studio-fit-padding.js +1 -1
- package/dist/helpers/studio-runtime-config.js +3 -0
- package/dist/helpers/timeline-layout.d.ts +2 -1
- package/dist/helpers/timeline-layout.js +5 -2
- package/dist/helpers/timeline-node-path-key.d.ts +2 -0
- package/dist/helpers/timeline-node-path-key.js +3 -1
- package/dist/helpers/use-asset-drag-events.d.ts +2 -1
- package/dist/helpers/use-asset-drag-events.js +14 -6
- package/dist/helpers/use-menu-structure.js +25 -35
- package/dist/helpers/use-runtime-values.d.ts +9 -0
- package/dist/helpers/use-runtime-values.js +76 -0
- package/dist/icons/apps.d.ts +2 -0
- package/dist/icons/apps.js +7 -0
- package/dist/icons/browse-elements.d.ts +4 -0
- package/dist/icons/browse-elements.js +10 -0
- package/dist/state/modals.d.ts +5 -6
- package/dist/state/modals.js +5 -3
- package/dist/state/timeline-sequence-hover.d.ts +9 -3
- package/dist/state/timeline-sequence-hover.js +63 -12
- package/package.json +12 -12
package/dist/esm/renderEntry.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
WHITE,
|
|
5
5
|
__require,
|
|
6
6
|
__toESM
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-fgedsvhb.js";
|
|
8
8
|
|
|
9
9
|
// src/renderEntry.tsx
|
|
10
10
|
import { useContext, useEffect, useRef, useState } from "react";
|
|
@@ -212,7 +212,7 @@ var renderContent = (Root) => {
|
|
|
212
212
|
renderToDOM(/* @__PURE__ */ jsx("div", {
|
|
213
213
|
children: /* @__PURE__ */ jsx(DelayedSpinner, {})
|
|
214
214
|
}));
|
|
215
|
-
import("./chunk-
|
|
215
|
+
import("./chunk-ptnd65a9.js").then(({ StudioInternals }) => {
|
|
216
216
|
window.remotion_isStudio = true;
|
|
217
217
|
window.remotion_isReadOnlyStudio = true;
|
|
218
218
|
window.remotion_inputProps = "{}";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.areSequenceNodePathInfosEqual = void 0;
|
|
4
|
+
const studio_shared_1 = require("@remotion/studio-shared");
|
|
5
|
+
const areSequenceNodePathInfosEqual = (first, second) => {
|
|
6
|
+
if (first.index !== second.index ||
|
|
7
|
+
first.numberOfSequencesWithThisNodePath !==
|
|
8
|
+
second.numberOfSequencesWithThisNodePath ||
|
|
9
|
+
first.supportsEffects !== second.supportsEffects ||
|
|
10
|
+
(0, studio_shared_1.stringifySequenceSubscriptionKey)(first.sequenceSubscriptionKey) !==
|
|
11
|
+
(0, studio_shared_1.stringifySequenceSubscriptionKey)(second.sequenceSubscriptionKey) ||
|
|
12
|
+
first.auxiliaryKeys.length !== second.auxiliaryKeys.length ||
|
|
13
|
+
!first.auxiliaryKeys.every((key, index) => key === second.auxiliaryKeys[index])) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
const firstVideoConfig = first.sequenceSubscriptionKey.videoConfigValues;
|
|
17
|
+
const secondVideoConfig = second.sequenceSubscriptionKey.videoConfigValues;
|
|
18
|
+
return (firstVideoConfig === secondVideoConfig ||
|
|
19
|
+
(firstVideoConfig !== null &&
|
|
20
|
+
secondVideoConfig !== null &&
|
|
21
|
+
firstVideoConfig.durationInFrames ===
|
|
22
|
+
secondVideoConfig.durationInFrames &&
|
|
23
|
+
firstVideoConfig.fps === secondVideoConfig.fps &&
|
|
24
|
+
firstVideoConfig.height === secondVideoConfig.height &&
|
|
25
|
+
firstVideoConfig.width === secondVideoConfig.width));
|
|
26
|
+
};
|
|
27
|
+
exports.areSequenceNodePathInfosEqual = areSequenceNodePathInfosEqual;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.calculateTimeline = void 0;
|
|
4
|
-
const studio_shared_1 = require("@remotion/studio-shared");
|
|
5
4
|
const get_connected_compositions_1 = require("./get-connected-compositions");
|
|
6
5
|
const get_sequence_visible_range_1 = require("./get-sequence-visible-range");
|
|
7
6
|
const get_timeline_nestedness_1 = require("./get-timeline-nestedness");
|
|
8
7
|
const get_timeline_sequence_sort_key_1 = require("./get-timeline-sequence-sort-key");
|
|
9
8
|
const sort_by_nonce_history_1 = require("./sort-by-nonce-history");
|
|
9
|
+
const timeline_node_path_key_1 = require("./timeline-node-path-key");
|
|
10
10
|
const getInheritedLoopDisplay = (sequence, sequences) => {
|
|
11
11
|
if (sequence.loopDisplay) {
|
|
12
12
|
return sequence.loopDisplay;
|
|
@@ -113,7 +113,7 @@ const calculateTimeline = ({ sequences, overrideIdsToNodePaths, compositions = [
|
|
|
113
113
|
if (track.nodePathInfo === null) {
|
|
114
114
|
return track;
|
|
115
115
|
}
|
|
116
|
-
const key = (0,
|
|
116
|
+
const key = (0, timeline_node_path_key_1.timelineSequenceNodePathToKey)(track.nodePathInfo.sequenceSubscriptionKey);
|
|
117
117
|
const index = (_a = nodePathIndexCounters.get(key)) !== null && _a !== void 0 ? _a : 0;
|
|
118
118
|
nodePathIndexCounters.set(key, index + 1);
|
|
119
119
|
return {
|
|
@@ -132,7 +132,7 @@ const calculateTimeline = ({ sequences, overrideIdsToNodePaths, compositions = [
|
|
|
132
132
|
if (track.nodePathInfo === null) {
|
|
133
133
|
return track;
|
|
134
134
|
}
|
|
135
|
-
const key = (0,
|
|
135
|
+
const key = (0, timeline_node_path_key_1.timelineSequenceNodePathToKey)(track.nodePathInfo.sequenceSubscriptionKey);
|
|
136
136
|
return {
|
|
137
137
|
...track,
|
|
138
138
|
nodePathInfo: {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type EventSourceEvent } from '@remotion/studio-shared';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { type PreviewServerConnectionState } from './preview-server-events';
|
|
4
4
|
type Context = {
|
|
5
5
|
previewServerState: PreviewServerConnectionState;
|
|
6
|
+
configFileChangeRevision: number;
|
|
6
7
|
subscribeToEvent: (type: EventSourceEvent['type'], listener: (event: EventSourceEvent) => void) => () => void;
|
|
7
8
|
};
|
|
8
9
|
export declare const StudioServerConnectionCtx: React.Context<Context>;
|
|
9
10
|
export declare const PreviewServerConnection: React.FC<{
|
|
10
11
|
readonly children: React.ReactNode;
|
|
11
12
|
}>;
|
|
13
|
+
export declare const useStudioConfigRevision: () => number;
|
|
12
14
|
export {};
|
|
@@ -36,8 +36,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.PreviewServerConnection = exports.StudioServerConnectionCtx = void 0;
|
|
39
|
+
exports.useStudioConfigRevision = exports.PreviewServerConnection = exports.StudioServerConnectionCtx = void 0;
|
|
40
40
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
|
+
const studio_shared_1 = require("@remotion/studio-shared");
|
|
41
42
|
const react_1 = __importStar(require("react"));
|
|
42
43
|
const remotion_1 = require("remotion");
|
|
43
44
|
const NotificationCenter_1 = require("../components/Notifications/NotificationCenter");
|
|
@@ -49,6 +50,7 @@ exports.StudioServerConnectionCtx = react_1.default.createContext({
|
|
|
49
50
|
previewServerState: {
|
|
50
51
|
type: 'init',
|
|
51
52
|
},
|
|
53
|
+
configFileChangeRevision: 0,
|
|
52
54
|
subscribeToEvent: () => {
|
|
53
55
|
throw new Error('Context not initalized');
|
|
54
56
|
},
|
|
@@ -68,15 +70,32 @@ const PreviewServerConnection = ({ children }) => {
|
|
|
68
70
|
const [state, setState] = react_1.default.useState({
|
|
69
71
|
type: 'init',
|
|
70
72
|
});
|
|
73
|
+
const [configFileChangeRevision, setConfigFileChangeRevision] = react_1.default.useState(0);
|
|
74
|
+
const clientId = (0, react_1.useRef)(null);
|
|
71
75
|
(0, react_1.useEffect)(() => {
|
|
72
76
|
const handleEvent = (newEvent) => {
|
|
73
77
|
var _a, _b;
|
|
74
78
|
if (newEvent.type === 'new-input-props' ||
|
|
75
|
-
newEvent.type === 'new-env-variables'
|
|
76
|
-
newEvent.type === 'config-file-changed') {
|
|
79
|
+
newEvent.type === 'new-env-variables') {
|
|
77
80
|
(0, url_state_1.reloadUrl)();
|
|
78
81
|
}
|
|
82
|
+
if (newEvent.type === 'config-file-changed') {
|
|
83
|
+
window.remotion_renderDefaults = newEvent.renderDefaults;
|
|
84
|
+
window.remotion_studioConfig = newEvent.studioRuntimeConfig;
|
|
85
|
+
window.remotion_editorName = newEvent.editorName;
|
|
86
|
+
setConfigFileChangeRevision((revision) => revision + 1);
|
|
87
|
+
const isOwnRuntimeConfigChange = newEvent.changeType === 'runtime' &&
|
|
88
|
+
newEvent.originatorClientId !== null &&
|
|
89
|
+
newEvent.originatorClientId === clientId.current;
|
|
90
|
+
if (!isOwnRuntimeConfigChange) {
|
|
91
|
+
(0, NotificationCenter_1.showNotification)((0, studio_shared_1.getConfigFileChangeMessage)(newEvent.changeType), 4000);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (newEvent.type === 'config-file-reload-failed') {
|
|
95
|
+
(0, NotificationCenter_1.showNotification)(newEvent.errorMessage, 4000);
|
|
96
|
+
}
|
|
79
97
|
if (newEvent.type === 'init') {
|
|
98
|
+
clientId.current = newEvent.clientId;
|
|
80
99
|
latestUndoRedoEvent.current = {
|
|
81
100
|
type: 'undo-redo-stack-changed',
|
|
82
101
|
undoFile: newEvent.undoFile,
|
|
@@ -131,9 +150,14 @@ const PreviewServerConnection = ({ children }) => {
|
|
|
131
150
|
const context = (0, react_1.useMemo)(() => {
|
|
132
151
|
return {
|
|
133
152
|
previewServerState: state,
|
|
153
|
+
configFileChangeRevision,
|
|
134
154
|
subscribeToEvent,
|
|
135
155
|
};
|
|
136
|
-
}, [state, subscribeToEvent]);
|
|
156
|
+
}, [configFileChangeRevision, state, subscribeToEvent]);
|
|
137
157
|
return (jsx_runtime_1.jsx(exports.StudioServerConnectionCtx.Provider, { value: context, children: children }));
|
|
138
158
|
};
|
|
139
159
|
exports.PreviewServerConnection = PreviewServerConnection;
|
|
160
|
+
const useStudioConfigRevision = () => {
|
|
161
|
+
return react_1.default.useContext(exports.StudioServerConnectionCtx).configFileChangeRevision;
|
|
162
|
+
};
|
|
163
|
+
exports.useStudioConfigRevision = useStudioConfigRevision;
|
|
@@ -6,7 +6,7 @@ export declare const formatFileLocation: ({ location, root, }: {
|
|
|
6
6
|
readonly location: FileLocation | null;
|
|
7
7
|
readonly root: string;
|
|
8
8
|
}) => string | null;
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const formatContextForAgents: ({ name, location, root, }: {
|
|
10
10
|
readonly name: string | null;
|
|
11
11
|
readonly location: FileLocation | null;
|
|
12
12
|
readonly root: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.formatContextForAgents = exports.formatFileLocation = void 0;
|
|
4
4
|
const normalizeSlashes = (path) => path.replace(/\\/g, '/');
|
|
5
5
|
const stripTrailingSlashes = (path) => path.replace(/\/+$/, '');
|
|
6
6
|
const stripLeadingDotSlash = (path) => path.replace(/^\.\/+/, '');
|
|
@@ -25,11 +25,11 @@ const formatFileLocation = ({ location, root, }) => {
|
|
|
25
25
|
return `${stripLeadingDotSlash(relativeSource)}:${location.line}`;
|
|
26
26
|
};
|
|
27
27
|
exports.formatFileLocation = formatFileLocation;
|
|
28
|
-
const
|
|
28
|
+
const formatContextForAgents = ({ name, location, root, }) => {
|
|
29
29
|
const fileLocation = (0, exports.formatFileLocation)({ location, root });
|
|
30
30
|
if (!name || !fileLocation) {
|
|
31
31
|
return null;
|
|
32
32
|
}
|
|
33
33
|
return `${name} in ${fileLocation}`;
|
|
34
34
|
};
|
|
35
|
-
exports.
|
|
35
|
+
exports.formatContextForAgents = formatContextForAgents;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const getMissingPackages: (dependencies:
|
|
3
|
-
export declare const installRequiredPackages: (dependencies:
|
|
1
|
+
import type { PackageInstallSpec } from '@remotion/studio-shared';
|
|
2
|
+
export declare const getMissingPackages: (dependencies: readonly PackageInstallSpec[]) => PackageInstallSpec[];
|
|
3
|
+
export declare const installRequiredPackages: (dependencies: readonly PackageInstallSpec[]) => Promise<void>;
|
|
@@ -4,12 +4,7 @@ exports.installRequiredPackages = exports.getMissingPackages = void 0;
|
|
|
4
4
|
const install_package_1 = require("../api/install-package");
|
|
5
5
|
const NotificationCenter_1 = require("../components/Notifications/NotificationCenter");
|
|
6
6
|
let installQueue = Promise.resolve();
|
|
7
|
-
const uniqueDependencies = (dependencies) => Array.from(new Map(dependencies.map((dependency) =>
|
|
8
|
-
const normalized = typeof dependency === 'string'
|
|
9
|
-
? { name: dependency, version: null }
|
|
10
|
-
: dependency;
|
|
11
|
-
return [normalized.name, normalized];
|
|
12
|
-
})).values());
|
|
7
|
+
const uniqueDependencies = (dependencies) => Array.from(new Map(dependencies.map((dependency) => [dependency.name, dependency])).values());
|
|
13
8
|
const getMissingPackages = (dependencies) => {
|
|
14
9
|
var _a;
|
|
15
10
|
const installedPackages = (_a = window.remotion_installedPackages) !== null && _a !== void 0 ? _a : [];
|
|
@@ -11,12 +11,12 @@ const migrateExpandedTracksForSubscriptionKey = (prev, oldKey, newKey) => {
|
|
|
11
11
|
let changed = false;
|
|
12
12
|
const next = { ...prev };
|
|
13
13
|
for (const [key, value] of Object.entries(prev)) {
|
|
14
|
-
if (value
|
|
14
|
+
if (!value || !key.startsWith(oldPrefix + '.')) {
|
|
15
15
|
continue;
|
|
16
16
|
}
|
|
17
17
|
const migratedKey = newPrefix + key.slice(oldPrefix.length);
|
|
18
|
-
if (next[migratedKey]
|
|
19
|
-
next[migratedKey] =
|
|
18
|
+
if (!next[migratedKey]) {
|
|
19
|
+
next[migratedKey] = true;
|
|
20
20
|
}
|
|
21
21
|
delete next[key];
|
|
22
22
|
changed = true;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CompositionComponentInfoResponse, EditorPickerId, SymbolicatedStackFrame } from '@remotion/studio-shared';
|
|
2
2
|
import type { CodePosition, OriginalPosition } from '../error-overlay/react-overlay/utils/get-source-map';
|
|
3
3
|
export declare const openInEditor: (stack: SymbolicatedStackFrame, editorId: EditorPickerId | null) => Promise<import("@remotion/studio-shared").OpenInEditorResponse>;
|
|
4
|
+
export declare const openInCodingAgent: (codingAgentId: "claude-code" | "codex" | "copilot" | "cursor", prompt: string | null) => Promise<import("@remotion/studio-shared").OpenInCodingAgentResponse>;
|
|
4
5
|
export declare const openOriginalPositionInEditor: (originalPosition: OriginalPosition, editorId: EditorPickerId | null) => Promise<void>;
|
|
5
6
|
export declare const openOriginalPositionInEditorAtProperty: ({ originalPosition, property, }: {
|
|
6
7
|
originalPosition: CodePosition;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.openCompositionComponentInEditor = exports.preloadCompositionComponentInfo = exports.loadCompositionComponentInfo = exports.useCachedCompositionComponentInfo = exports.getCachedCompositionComponentInfo = exports.subscribeToCompositionComponentInfo = exports.openOriginalPositionInEditorAtProperty = exports.openOriginalPositionInEditor = exports.openInEditor = void 0;
|
|
3
|
+
exports.openCompositionComponentInEditor = exports.preloadCompositionComponentInfo = exports.loadCompositionComponentInfo = exports.useCachedCompositionComponentInfo = exports.getCachedCompositionComponentInfo = exports.subscribeToCompositionComponentInfo = exports.openOriginalPositionInEditorAtProperty = exports.openOriginalPositionInEditor = exports.openInCodingAgent = exports.openInEditor = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const call_api_1 = require("../components/call-api");
|
|
6
6
|
const browser_studio_operations_1 = require("./browser-studio-operations");
|
|
@@ -18,6 +18,10 @@ const openInEditor = (stack, editorId) => {
|
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
exports.openInEditor = openInEditor;
|
|
21
|
+
const openInCodingAgent = (codingAgentId, prompt) => {
|
|
22
|
+
return (0, call_api_1.callApi)('/api/open-in-coding-agent', { codingAgentId, prompt });
|
|
23
|
+
};
|
|
24
|
+
exports.openInCodingAgent = openInCodingAgent;
|
|
21
25
|
const openOriginalPositionInEditor = async (originalPosition, editorId) => {
|
|
22
26
|
const response = await (0, exports.openInEditor)({
|
|
23
27
|
originalColumnNumber: originalPosition.column,
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.calculateStudioCanvasTransformation = exports.calculateStudioScale = exports.getStudioCurrentScaleContext = exports.getStudioPaddedCanvasSize = exports.STUDIO_FIT_PADDING = void 0;
|
|
4
4
|
const player_1 = require("@remotion/player");
|
|
5
5
|
const remotion_1 = require("remotion");
|
|
6
|
-
exports.STUDIO_FIT_PADDING =
|
|
6
|
+
exports.STUDIO_FIT_PADDING = 8;
|
|
7
7
|
const getPadding = (length) => {
|
|
8
8
|
return Math.min(exports.STUDIO_FIT_PADDING, Math.max(0, (length - 1) / 2));
|
|
9
9
|
};
|
|
@@ -6,9 +6,12 @@ exports.DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS = 300;
|
|
|
6
6
|
const defaultStudioRuntimeConfig = {
|
|
7
7
|
askAIEnabled: false,
|
|
8
8
|
bufferStateDelayInMilliseconds: null,
|
|
9
|
+
defaultCodingAgent: null,
|
|
10
|
+
defaultEditor: null,
|
|
9
11
|
interactivityEnabled: true,
|
|
10
12
|
keyboardShortcutsEnabled: true,
|
|
11
13
|
maxTimelineTracks: null,
|
|
14
|
+
publicLicenseKey: null,
|
|
12
15
|
};
|
|
13
16
|
const getStudioRuntimeConfig = () => {
|
|
14
17
|
var _a;
|
|
@@ -31,7 +31,7 @@ export type TimelineTreeNode = {
|
|
|
31
31
|
readonly label: string;
|
|
32
32
|
readonly field: AnySchemaFieldInfo | null;
|
|
33
33
|
};
|
|
34
|
-
export declare const buildTimelineTree: ({ sequence, nodePathInfo, getDragOverrides, getEffectDragOverrides, propStatuses, includeTextContent, includeSourceControls, }: {
|
|
34
|
+
export declare const buildTimelineTree: ({ sequence, nodePathInfo, getDragOverrides, getEffectDragOverrides, propStatuses, includeTextContent, includeSourceControls, runtimeValues, }: {
|
|
35
35
|
sequence: TSequence;
|
|
36
36
|
nodePathInfo: SequenceNodePathInfo;
|
|
37
37
|
getDragOverrides: GetDragOverrides;
|
|
@@ -39,6 +39,7 @@ export declare const buildTimelineTree: ({ sequence, nodePathInfo, getDragOverri
|
|
|
39
39
|
propStatuses: PropStatuses;
|
|
40
40
|
includeTextContent: boolean;
|
|
41
41
|
includeSourceControls: boolean;
|
|
42
|
+
runtimeValues: Readonly<Record<string, unknown>> | null;
|
|
42
43
|
}) => TimelineTreeNode[];
|
|
43
44
|
export type FlatTreeRow = {
|
|
44
45
|
readonly node: TimelineTreeNode;
|
|
@@ -14,13 +14,15 @@ exports.TIMELINE_ITEM_BORDER_BOTTOM = 1;
|
|
|
14
14
|
exports.TIMELINE_TRACK_EXPANDED_HEIGHT = 100;
|
|
15
15
|
exports.TREE_GROUP_ROW_HEIGHT = 22;
|
|
16
16
|
exports.EXPANDED_SECTION_PADDING_RIGHT = 10;
|
|
17
|
-
const buildTimelineTree = ({ sequence, nodePathInfo, getDragOverrides, getEffectDragOverrides, propStatuses, includeTextContent, includeSourceControls, }) => {
|
|
17
|
+
const buildTimelineTree = ({ sequence, nodePathInfo, getDragOverrides, getEffectDragOverrides, propStatuses, includeTextContent, includeSourceControls, runtimeValues, }) => {
|
|
18
18
|
var _a;
|
|
19
19
|
const roots = [];
|
|
20
20
|
const { sequenceSubscriptionKey, index, auxiliaryKeys, supportsEffects } = nodePathInfo;
|
|
21
21
|
const controlFields = (0, studio_shared_1.getFieldsToShow)({
|
|
22
22
|
schema: sequence.controls.schema,
|
|
23
|
-
currentRuntimeValueDotNotation:
|
|
23
|
+
currentRuntimeValueDotNotation: runtimeValues !== null
|
|
24
|
+
? runtimeValues
|
|
25
|
+
: sequence.controls.runtimeValues.getSnapshot(),
|
|
24
26
|
getDragOverrides,
|
|
25
27
|
propStatuses,
|
|
26
28
|
nodePath: sequenceSubscriptionKey,
|
|
@@ -140,6 +142,7 @@ const getExpandedTrackHeight = ({ sequence, nodePathInfo, getIsExpanded, propSta
|
|
|
140
142
|
propStatuses,
|
|
141
143
|
includeTextContent: false,
|
|
142
144
|
includeSourceControls: false,
|
|
145
|
+
runtimeValues: null,
|
|
143
146
|
});
|
|
144
147
|
const flat = (0, exports.flattenVisibleTreeNodes)({ nodes: tree, getIsExpanded });
|
|
145
148
|
if (flat.length === 0) {
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
import type { SequencePropsSubscriptionKey } from 'remotion';
|
|
1
2
|
import type { SequenceNodePathInfo } from './get-timeline-sequence-sort-key';
|
|
3
|
+
export declare const timelineSequenceNodePathToKey: (key: SequencePropsSubscriptionKey) => string;
|
|
2
4
|
export declare const timelineNodePathInfoToKey: (info: SequenceNodePathInfo) => string;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.timelineNodePathInfoToKey = void 0;
|
|
3
|
+
exports.timelineNodePathInfoToKey = exports.timelineSequenceNodePathToKey = void 0;
|
|
4
4
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
5
|
+
const timelineSequenceNodePathToKey = (key) => `${key.absolutePath}:${JSON.stringify(key.nodePath)}`;
|
|
6
|
+
exports.timelineSequenceNodePathToKey = timelineSequenceNodePathToKey;
|
|
5
7
|
const timelineNodePathInfoToKey = (info) => [
|
|
6
8
|
(0, studio_shared_1.stringifySequenceExpandedRowKey)(info.sequenceSubscriptionKey),
|
|
7
9
|
info.auxiliaryKeys.join('.'),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const isAssetUploadDragEvent: (event: {
|
|
2
2
|
readonly dataTransfer: DataTransfer;
|
|
3
3
|
}) => boolean;
|
|
4
|
+
export declare const getRenderOutputDragData: (dataTransfer: DataTransfer) => import("@remotion/studio-protocol").RenderOutputDragData | null;
|
|
4
5
|
declare function useAssetDragEvents({ name, parentFolder, dropLocation, setDropLocation }: {
|
|
5
6
|
name: string | null;
|
|
6
7
|
parentFolder: string | null;
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getRenderOutputDragData = exports.isAssetUploadDragEvent = void 0;
|
|
4
|
+
const studio_protocol_1 = require("@remotion/studio-protocol");
|
|
4
5
|
const react_1 = require("react");
|
|
5
6
|
const no_react_1 = require("remotion/no-react");
|
|
6
|
-
const
|
|
7
|
-
|
|
7
|
+
const isAssetUploadDragEvent = (event) => {
|
|
8
|
+
var _a;
|
|
9
|
+
return (Array.from(event.dataTransfer.types).includes('Files') ||
|
|
10
|
+
((_a = studio_protocol_1.StudioProtocolInternals.getDragPreviewMetadata(event.dataTransfer.types)) === null || _a === void 0 ? void 0 : _a.type) === 'render-output');
|
|
8
11
|
};
|
|
9
|
-
exports.
|
|
12
|
+
exports.isAssetUploadDragEvent = isAssetUploadDragEvent;
|
|
13
|
+
const getRenderOutputDragData = (dataTransfer) => {
|
|
14
|
+
const parsed = studio_protocol_1.StudioProtocolInternals.parseDragData(dataTransfer);
|
|
15
|
+
return (parsed === null || parsed === void 0 ? void 0 : parsed.type) === 'render-output' ? parsed.data : null;
|
|
16
|
+
};
|
|
17
|
+
exports.getRenderOutputDragData = getRenderOutputDragData;
|
|
10
18
|
function useAssetDragEvents({ name, parentFolder, dropLocation, setDropLocation, }) {
|
|
11
19
|
const dragDepthRef = (0, react_1.useRef)(0);
|
|
12
20
|
const combinedParents = (0, react_1.useMemo)(() => {
|
|
@@ -16,7 +24,7 @@ function useAssetDragEvents({ name, parentFolder, dropLocation, setDropLocation,
|
|
|
16
24
|
return dropLocation === combinedParents;
|
|
17
25
|
}, [combinedParents, dropLocation]);
|
|
18
26
|
const onDragEnter = (0, react_1.useCallback)((event) => {
|
|
19
|
-
if (!(0, exports.
|
|
27
|
+
if (!(0, exports.isAssetUploadDragEvent)(event)) {
|
|
20
28
|
return;
|
|
21
29
|
}
|
|
22
30
|
if (dragDepthRef.current === 0) {
|
|
@@ -27,7 +35,7 @@ function useAssetDragEvents({ name, parentFolder, dropLocation, setDropLocation,
|
|
|
27
35
|
dragDepthRef.current++;
|
|
28
36
|
}, [combinedParents, dragDepthRef, setDropLocation]);
|
|
29
37
|
const onDragLeave = (0, react_1.useCallback)((event) => {
|
|
30
|
-
if (!(0, exports.
|
|
38
|
+
if (!(0, exports.isAssetUploadDragEvent)(event)) {
|
|
31
39
|
return;
|
|
32
40
|
}
|
|
33
41
|
dragDepthRef.current--;
|
|
@@ -43,7 +43,7 @@ const inheritColor = {
|
|
|
43
43
|
color: 'inherit',
|
|
44
44
|
};
|
|
45
45
|
const ICON_SIZE = 14;
|
|
46
|
-
const getFileMenu = ({ readOnlyStudio, closeMenu, previewServerState, setSelectedModal, }) => {
|
|
46
|
+
const getFileMenu = ({ readOnlyStudio, closeMenu, editorName, previewServerState, setSelectedModal, }) => {
|
|
47
47
|
const fileManagerName = (0, get_file_manager_name_1.getFileManagerName)(window.remotion_fileSystemPlatform);
|
|
48
48
|
const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
|
|
49
49
|
const downloadProject = browserStudioOperations === null || browserStudioOperations === void 0 ? void 0 : browserStudioOperations.downloadProject;
|
|
@@ -144,11 +144,11 @@ const getFileMenu = ({ readOnlyStudio, closeMenu, previewServerState, setSelecte
|
|
|
144
144
|
id: 'open-project-divider',
|
|
145
145
|
}
|
|
146
146
|
: null,
|
|
147
|
-
|
|
147
|
+
editorName && !readOnlyStudio
|
|
148
148
|
? {
|
|
149
149
|
id: 'open-in-editor',
|
|
150
150
|
value: 'open-in-editor',
|
|
151
|
-
label: `Open in ${
|
|
151
|
+
label: `Open in ${editorName}`,
|
|
152
152
|
onClick: async () => {
|
|
153
153
|
await (0, open_in_editor_1.openInEditor)({
|
|
154
154
|
originalFileName: `${window.remotion_cwd}`,
|
|
@@ -159,13 +159,13 @@ const getFileMenu = ({ readOnlyStudio, closeMenu, previewServerState, setSelecte
|
|
|
159
159
|
}, null)
|
|
160
160
|
.then(({ success }) => {
|
|
161
161
|
if (!success) {
|
|
162
|
-
(0, NotificationCenter_1.showNotification)(`Could not open ${
|
|
162
|
+
(0, NotificationCenter_1.showNotification)(`Could not open ${editorName}`, 2000);
|
|
163
163
|
}
|
|
164
164
|
})
|
|
165
165
|
.catch((err) => {
|
|
166
166
|
// eslint-disable-next-line no-console
|
|
167
167
|
console.error(err);
|
|
168
|
-
(0, NotificationCenter_1.showNotification)(`Could not open ${
|
|
168
|
+
(0, NotificationCenter_1.showNotification)(`Could not open ${editorName}`, 2000);
|
|
169
169
|
});
|
|
170
170
|
},
|
|
171
171
|
type: 'item',
|
|
@@ -254,7 +254,7 @@ const getRenderMenuItems = ({ closeMenu, previewServerState, readOnlyStudio, })
|
|
|
254
254
|
};
|
|
255
255
|
const useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
256
256
|
var _a;
|
|
257
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.
|
|
257
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
258
258
|
const { checkerboard, setCheckerboard } = (0, react_1.useContext)(checkerboard_1.CheckerboardContext);
|
|
259
259
|
const { editorZoomGestures, setEditorZoomGestures } = (0, react_1.useContext)(editor_zoom_gestures_1.EditorZoomGesturesContext);
|
|
260
260
|
const { editorShowRulers, setEditorShowRulers } = (0, react_1.useContext)(editor_rulers_1.EditorShowRulersContext);
|
|
@@ -263,6 +263,9 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
263
263
|
const { size, setSize } = (0, react_1.useContext)(remotion_1.Internals.PreviewSizeContext);
|
|
264
264
|
const { canvasContent, compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
265
265
|
const { type } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx).previewServerState;
|
|
266
|
+
const editorName = window.remotion_editorName;
|
|
267
|
+
const keyboardShortcutsDisabled = (0, use_keybinding_1.areKeyboardShortcutsDisabled)();
|
|
268
|
+
const studioAskAIEnabled = (0, studio_runtime_config_1.getStudioAskAIEnabled)();
|
|
266
269
|
const canConfigureDefaultEditor = !readOnlyStudio &&
|
|
267
270
|
type === 'connected' &&
|
|
268
271
|
(0, browser_studio_operations_1.getBrowserStudioOperations)() === null;
|
|
@@ -326,34 +329,17 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
326
329
|
subMenu: null,
|
|
327
330
|
quickSwitcherLabel: 'Help: Changelog',
|
|
328
331
|
},
|
|
329
|
-
canConfigureDefaultEditor
|
|
330
|
-
? {
|
|
331
|
-
id: 'default-editor',
|
|
332
|
-
value: 'default-editor',
|
|
333
|
-
label: 'Configure default editor...',
|
|
334
|
-
onClick: () => {
|
|
335
|
-
closeMenu();
|
|
336
|
-
setSelectedModal({
|
|
337
|
-
type: 'configure-default-editor',
|
|
338
|
-
});
|
|
339
|
-
},
|
|
340
|
-
type: 'item',
|
|
341
|
-
keyHint: null,
|
|
342
|
-
leftItem: null,
|
|
343
|
-
subMenu: null,
|
|
344
|
-
quickSwitcherLabel: 'Configure default editor...',
|
|
345
|
-
}
|
|
346
|
-
: null,
|
|
347
332
|
{
|
|
348
|
-
id: '
|
|
349
|
-
value: '
|
|
350
|
-
label: '
|
|
333
|
+
id: 'settings',
|
|
334
|
+
value: 'settings',
|
|
335
|
+
label: 'Settings...',
|
|
351
336
|
onClick: () => {
|
|
352
337
|
var _a;
|
|
353
338
|
var _b;
|
|
354
339
|
closeMenu();
|
|
355
340
|
setSelectedModal({
|
|
356
|
-
type: '
|
|
341
|
+
type: 'settings',
|
|
342
|
+
initialTab: canConfigureDefaultEditor ? 'apps' : 'license',
|
|
357
343
|
initialPublicLicenseKey: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
|
|
358
344
|
});
|
|
359
345
|
},
|
|
@@ -361,7 +347,7 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
361
347
|
keyHint: null,
|
|
362
348
|
leftItem: null,
|
|
363
349
|
subMenu: null,
|
|
364
|
-
quickSwitcherLabel: '
|
|
350
|
+
quickSwitcherLabel: 'Settings...',
|
|
365
351
|
disabled: readOnlyStudio || type !== 'connected',
|
|
366
352
|
},
|
|
367
353
|
{
|
|
@@ -402,6 +388,7 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
402
388
|
getFileMenu({
|
|
403
389
|
readOnlyStudio,
|
|
404
390
|
closeMenu,
|
|
391
|
+
editorName,
|
|
405
392
|
previewServerState: type,
|
|
406
393
|
setSelectedModal,
|
|
407
394
|
}),
|
|
@@ -489,7 +476,7 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
489
476
|
},
|
|
490
477
|
{
|
|
491
478
|
id: 'enable-snapping',
|
|
492
|
-
keyHint:
|
|
479
|
+
keyHint: keyboardShortcutsDisabled ? null : 'Shift+M',
|
|
493
480
|
label: 'Enable Snapping',
|
|
494
481
|
onClick: () => {
|
|
495
482
|
closeMenu();
|
|
@@ -776,7 +763,7 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
776
763
|
label: 'Tools',
|
|
777
764
|
leaveLeftPadding: false,
|
|
778
765
|
items: [
|
|
779
|
-
|
|
766
|
+
studioAskAIEnabled
|
|
780
767
|
? {
|
|
781
768
|
id: 'ask-ai',
|
|
782
769
|
value: 'ask-ai',
|
|
@@ -839,7 +826,7 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
839
826
|
{
|
|
840
827
|
id: 'shortcuts',
|
|
841
828
|
value: 'shortcuts',
|
|
842
|
-
label:
|
|
829
|
+
label: keyboardShortcutsDisabled
|
|
843
830
|
? 'Shortcuts (disabled)'
|
|
844
831
|
: 'Shortcuts',
|
|
845
832
|
onClick: () => {
|
|
@@ -856,7 +843,7 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
856
843
|
leftItem: null,
|
|
857
844
|
subMenu: null,
|
|
858
845
|
type: 'item',
|
|
859
|
-
quickSwitcherLabel:
|
|
846
|
+
quickSwitcherLabel: keyboardShortcutsDisabled
|
|
860
847
|
? 'Show all Keyboard Shortcuts (disabled)'
|
|
861
848
|
: 'Show all Keyboard Shortcuts',
|
|
862
849
|
},
|
|
@@ -1025,6 +1012,9 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
1025
1012
|
isFullscreenSupported,
|
|
1026
1013
|
remotion_packageManager,
|
|
1027
1014
|
mobileLayout,
|
|
1015
|
+
editorName,
|
|
1016
|
+
keyboardShortcutsDisabled,
|
|
1017
|
+
studioAskAIEnabled,
|
|
1028
1018
|
size.size,
|
|
1029
1019
|
setSize,
|
|
1030
1020
|
setEditorZoomGestures,
|
|
@@ -1055,7 +1045,7 @@ const itemToSearchResult = (item, setSelectedModal, prefixes) => {
|
|
|
1055
1045
|
if (item.subMenu) {
|
|
1056
1046
|
return item.subMenu.items
|
|
1057
1047
|
.map((subItem) => {
|
|
1058
|
-
if (subItem.type
|
|
1048
|
+
if (subItem.type !== 'item') {
|
|
1059
1049
|
return null;
|
|
1060
1050
|
}
|
|
1061
1051
|
return itemToSearchResult(subItem, setSelectedModal, [
|
|
@@ -1082,7 +1072,7 @@ const makeSearchResults = (actions, setSelectedModal) => {
|
|
|
1082
1072
|
const items = actions
|
|
1083
1073
|
.map((menu) => {
|
|
1084
1074
|
return menu.items.map((item) => {
|
|
1085
|
-
if (item.type
|
|
1075
|
+
if (item.type !== 'item') {
|
|
1086
1076
|
return null;
|
|
1087
1077
|
}
|
|
1088
1078
|
return itemToSearchResult(item, setSelectedModal, []);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SequenceRegistrationControls } from 'remotion';
|
|
2
|
+
export declare const useRuntimeValues: (controls: SequenceRegistrationControls | null) => Readonly<Record<string, unknown>>;
|
|
3
|
+
export declare const useRuntimeValue: (controls: SequenceRegistrationControls | null, key: string) => unknown;
|
|
4
|
+
export declare const useRuntimeValueSelector: <T>({ controls, selector, isEqual, }: {
|
|
5
|
+
controls: SequenceRegistrationControls | null;
|
|
6
|
+
selector: (values: Readonly<Record<string, unknown>>) => T;
|
|
7
|
+
isEqual?: ((first: T, second: T) => boolean) | undefined;
|
|
8
|
+
}) => T;
|
|
9
|
+
export declare const useRuntimeValueSnapshots: (controls: readonly SequenceRegistrationControls[]) => readonly Readonly<Record<string, unknown>>[];
|