@remotion/studio 4.0.501 → 4.0.503
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AssetSelectorItem.js +4 -4
- package/dist/components/Canvas.js +37 -57
- package/dist/components/ColorPicker/AlphaSlider.js +14 -10
- package/dist/components/ColorPicker/HueSlider.js +14 -10
- package/dist/components/ColorPicker/SaturationValueArea.js +14 -12
- package/dist/components/CompositionContextButton.js +1 -1
- package/dist/components/CompositionSelector.js +4 -4
- package/dist/components/CompositionSelectorItem.js +5 -5
- package/dist/components/ConfigureDefaultEditorModal.d.ts +2 -0
- package/dist/components/ConfigureDefaultEditorModal.js +151 -0
- package/dist/components/ConfirmationDialog.js +6 -3
- package/dist/components/ContextMenu.js +0 -2
- package/dist/components/Editor.js +1 -4
- package/dist/components/EditorContent.js +1 -1
- package/dist/components/EditorGuides/Guide.js +48 -74
- package/dist/components/EditorRuler/Ruler.d.ts +1 -0
- package/dist/components/EditorRuler/Ruler.js +3 -1
- package/dist/components/EditorRuler/index.js +26 -23
- package/dist/components/ElementInstallConfirmation.d.ts +12 -0
- package/dist/components/ElementInstallConfirmation.js +205 -0
- package/dist/components/ForceSpecificCursor.js +14 -0
- package/dist/components/FullscreenToggle.d.ts +3 -1
- package/dist/components/FullscreenToggle.js +2 -2
- package/dist/components/InlineAction.d.ts +2 -1
- package/dist/components/InlineAction.js +4 -4
- package/dist/components/InspectorLocationCopy.d.ts +1 -0
- package/dist/components/InspectorLocationCopy.js +7 -3
- package/dist/components/InspectorOpenInEditor.d.ts +5 -0
- package/dist/components/InspectorOpenInEditor.js +135 -0
- package/dist/components/InspectorPanel/AlignmentControls.js +1 -1
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +3 -3
- package/dist/components/InspectorPanel/CompositionMetadata.js +1 -1
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +2 -2
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +2 -2
- package/dist/components/InspectorPanel/use-composition-actions.d.ts +1 -1
- package/dist/components/InspectorPanel/use-composition-actions.js +46 -3
- package/dist/components/InspectorSequenceSection.js +2 -2
- package/dist/components/LoopToggle.d.ts +1 -0
- package/dist/components/LoopToggle.js +9 -5
- package/dist/components/Menu/MenuItem.js +13 -6
- package/dist/components/Menu/MenuSubItem.js +11 -1
- package/dist/components/MenuBuildIndicator.js +1 -1
- package/dist/components/MenuCompositionName.js +1 -1
- package/dist/components/MobilePanel.js +5 -1
- package/dist/components/ModalContainer.js +1 -1
- package/dist/components/ModalFooter.d.ts +1 -0
- package/dist/components/ModalFooter.js +2 -2
- package/dist/components/Modals.js +11 -2
- package/dist/components/NewComposition/InputDragger.js +19 -29
- package/dist/components/ObserveDefaultPropsContext.js +7 -4
- package/dist/components/PlayPause.d.ts +1 -0
- package/dist/components/PlayPause.js +2 -4
- package/dist/components/PlaybackRateSelector.d.ts +9 -2
- package/dist/components/PlaybackRateSelector.js +21 -10
- package/dist/components/PreviewToolbar.js +19 -109
- package/dist/components/PreviewToolbarOverflowButton.d.ts +12 -0
- package/dist/components/PreviewToolbarOverflowButton.js +217 -0
- package/dist/components/QuickSwitcher/QuickSwitcher.d.ts +1 -0
- package/dist/components/QuickSwitcher/QuickSwitcherContent.d.ts +1 -0
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +16 -1
- package/dist/components/QuickSwitcher/QuickSwitcherResult.d.ts +2 -0
- package/dist/components/QuickSwitcher/QuickSwitcherResult.js +7 -1
- package/dist/components/RenderButton.d.ts +1 -0
- package/dist/components/RenderButton.js +6 -4
- package/dist/components/RenderModal/InlineEyeIcon.js +1 -1
- package/dist/components/RenderModal/InlineRemoveButton.js +1 -1
- package/dist/components/RenderModal/RenderModalOutputName.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/SchemaResetButton.js +1 -1
- package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +1 -1
- package/dist/components/RenderQueue/RenderQueueDownloadItem.js +1 -1
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +1 -1
- package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +1 -1
- package/dist/components/RenderQueue/RenderQueueRemoveItem.js +1 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.js +1 -1
- package/dist/components/SelectedOutlineCropControls.js +7 -6
- package/dist/components/SelectedOutlineElement.js +28 -26
- package/dist/components/SelectedOutlineUvControls.js +25 -24
- package/dist/components/ShowGuidesProvider.js +2 -0
- package/dist/components/SidebarCollapserControls.js +2 -2
- package/dist/components/SidebarRenderButton.js +1 -1
- package/dist/components/SizeSelector.d.ts +6 -0
- package/dist/components/SizeSelector.js +17 -8
- package/dist/components/Splitter/SplitterContainer.d.ts +1 -0
- package/dist/components/Splitter/SplitterContainer.js +23 -3
- package/dist/components/Splitter/SplitterContext.d.ts +14 -0
- package/dist/components/Splitter/SplitterContext.js +16 -1
- package/dist/components/Splitter/SplitterHandle.js +25 -74
- package/dist/components/Timeline/EasingEditorModal.js +27 -19
- package/dist/components/Timeline/Timeline.js +2 -1
- package/dist/components/Timeline/TimelineAssetField.d.ts +1 -1
- package/dist/components/Timeline/TimelineAssetField.js +37 -2
- package/dist/components/Timeline/TimelineDragHandler.js +39 -8
- package/dist/components/Timeline/TimelineInOutDragHandler.js +26 -11
- package/dist/components/Timeline/TimelineLayerEye.js +36 -4
- package/dist/components/Timeline/TimelineSelection.js +14 -21
- package/dist/components/Timeline/TimelineSequence.js +7 -3
- package/dist/components/Timeline/TimelineSequenceItem.js +24 -18
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +1 -1
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +76 -43
- package/dist/components/Timeline/TimelineStack/get-stack.js +13 -0
- package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +4 -2
- package/dist/components/Timeline/get-sequence-context-menu-items.js +38 -2
- package/dist/components/Timeline/save-sequence-prop.js +4 -4
- package/dist/components/Timeline/sequence-props-subscription-store.d.ts +2 -2
- package/dist/components/Timeline/sequence-props-subscription-store.js +3 -3
- package/dist/components/Timeline/should-subscribe-to-source-file.d.ts +1 -0
- package/dist/components/Timeline/should-subscribe-to-source-file.js +11 -0
- package/dist/components/Timeline/use-open-sequence-in-editor.d.ts +3 -1
- package/dist/components/Timeline/use-open-sequence-in-editor.js +5 -2
- package/dist/components/Timeline/use-sequence-props-subscription.js +2 -0
- package/dist/components/Timeline/use-timeline-asset-drop.js +0 -4
- package/dist/components/Timeline/use-timeline-keyframe-drag.js +31 -16
- package/dist/components/TopPanel.js +1 -1
- package/dist/components/UndoRedoButtons.js +1 -1
- package/dist/components/UpdateCheck.d.ts +2 -0
- package/dist/components/UpdateCheck.js +20 -8
- package/dist/components/UpdateModal/UpdateModal.js +26 -10
- package/dist/components/VisualControls/ClickableFileName.js +5 -2
- package/dist/components/composition-menu-items.js +1 -1
- package/dist/components/default-props-api.d.ts +3 -0
- package/dist/components/default-props-api.js +19 -0
- package/dist/components/drop-handler-data.d.ts +1 -1
- package/dist/components/drop-handler-data.js +6 -6
- package/dist/components/effect-drag-and-drop.d.ts +1 -1
- package/dist/components/effect-drag-and-drop.js +3 -3
- package/dist/components/element-drag-and-drop.d.ts +1 -1
- package/dist/components/element-drag-and-drop.js +3 -3
- package/dist/components/element-install-request.d.ts +3 -0
- package/dist/components/element-install-request.js +17 -0
- package/dist/components/folder-menu-items.js +1 -1
- package/dist/components/handle-drop.d.ts +2 -3
- package/dist/components/handle-drop.js +11 -4
- package/dist/components/import-assets.d.ts +9 -9
- package/dist/components/import-assets.js +4 -15
- package/dist/components/sequence-props-api.d.ts +4 -0
- package/dist/components/sequence-props-api.js +26 -0
- package/dist/components/use-default-editor-info.d.ts +4 -0
- package/dist/components/use-default-editor-info.js +47 -0
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.d.ts +1 -0
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +29 -5
- package/dist/error-overlay/remotion-overlay/ErrorLoader.js +4 -20
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +1 -1
- package/dist/error-overlay/remotion-overlay/StackFrame.js +1 -1
- package/dist/esm/{chunk-n1kj09yv.js → chunk-bj1r1hh5.js} +8153 -6662
- package/dist/esm/internals.mjs +8153 -6662
- package/dist/esm/previewEntry.mjs +8210 -6719
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/inject-css.js +18 -44
- package/dist/helpers/open-in-editor.d.ts +3 -3
- package/dist/helpers/open-in-editor.js +10 -6
- package/dist/helpers/pointer-session.d.ts +9 -0
- package/dist/helpers/pointer-session.js +94 -0
- package/dist/helpers/use-menu-structure.js +24 -2
- package/dist/icons/custom-editor.d.ts +4 -0
- package/dist/icons/custom-editor.js +11 -0
- package/dist/icons/editor.d.ts +6 -0
- package/dist/icons/editor.js +52 -0
- package/dist/icons/upload.d.ts +4 -0
- package/dist/icons/upload.js +8 -0
- package/dist/state/editor-guides.d.ts +1 -0
- package/dist/state/editor-guides.js +1 -0
- package/dist/state/modals.d.ts +3 -0
- package/dist/state/z-index.d.ts +1 -0
- package/dist/state/z-index.js +34 -18
- package/package.json +12 -13
- package/dist/components/StudioCanvasCapture.d.ts +0 -5
- package/dist/components/StudioCanvasCapture.js +0 -40
- package/dist/components/canvas-capture-enabled.d.ts +0 -1
- package/dist/components/canvas-capture-enabled.js +0 -4
- package/dist/components/use-element-overwrite-confirmation.d.ts +0 -2
- package/dist/components/use-element-overwrite-confirmation.js +0 -73
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { EditorPickerId, GetDefaultEditorInfoResponse } from '@remotion/studio-shared';
|
|
1
2
|
import type { ResolvedStackLocation, TSequence } from 'remotion';
|
|
2
3
|
import type { ComboboxValue } from '../NewComposition/ComboBox';
|
|
3
4
|
import type { TimelineAssetLinkInfo } from './timeline-asset-link';
|
|
4
|
-
export declare const getSequenceContextMenuItems: ({ assetLinkInfo, canOpenInEditor, deleteDisabled, disableInteractivityDisabled, duplicateDisabled, fileLocation, includeSourceEditItems, onDeleteSequenceFromSource, onDisableSequenceInteractivity, onDuplicateSequenceFromSource, openInEditor, originalLocation, selectAsset, sequence, sourceActions, }: {
|
|
5
|
+
export declare const getSequenceContextMenuItems: ({ assetLinkInfo, canOpenInEditor, deleteDisabled, disableInteractivityDisabled, duplicateDisabled, fileLocation, includeSourceEditItems, editorInfo, onDeleteSequenceFromSource, onDisableSequenceInteractivity, onDuplicateSequenceFromSource, openInEditor, originalLocation, selectAsset, sequence, sourceActions, }: {
|
|
5
6
|
readonly assetLinkInfo: TimelineAssetLinkInfo | null;
|
|
6
7
|
readonly canOpenInEditor: boolean;
|
|
7
8
|
readonly deleteDisabled: boolean;
|
|
@@ -9,10 +10,11 @@ export declare const getSequenceContextMenuItems: ({ assetLinkInfo, canOpenInEdi
|
|
|
9
10
|
readonly duplicateDisabled: boolean;
|
|
10
11
|
readonly fileLocation: string | null;
|
|
11
12
|
readonly includeSourceEditItems: boolean;
|
|
13
|
+
readonly editorInfo: GetDefaultEditorInfoResponse | null;
|
|
12
14
|
readonly onDeleteSequenceFromSource: () => void;
|
|
13
15
|
readonly onDisableSequenceInteractivity: () => void;
|
|
14
16
|
readonly onDuplicateSequenceFromSource: () => void;
|
|
15
|
-
readonly openInEditor: () => void;
|
|
17
|
+
readonly openInEditor: (editorId: EditorPickerId | null) => void;
|
|
16
18
|
readonly originalLocation: ResolvedStackLocation | null;
|
|
17
19
|
readonly selectAsset: (src: string) => void;
|
|
18
20
|
readonly sequence: TSequence;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getSequenceContextMenuItems = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
4
5
|
const no_react_1 = require("remotion/no-react");
|
|
6
|
+
const editor_1 = require("../../icons/editor");
|
|
5
7
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
6
8
|
const timeline_asset_link_1 = require("./timeline-asset-link");
|
|
7
9
|
const normalizeMenuDividers = (items) => {
|
|
@@ -22,11 +24,13 @@ const normalizeMenuDividers = (items) => {
|
|
|
22
24
|
return normalized;
|
|
23
25
|
};
|
|
24
26
|
const interactiveSvgComponentIdentity = 'dev.remotion.remotion.Interactive.Svg';
|
|
25
|
-
const getSequenceContextMenuItems = ({ assetLinkInfo, canOpenInEditor, deleteDisabled, disableInteractivityDisabled, duplicateDisabled, fileLocation, includeSourceEditItems, onDeleteSequenceFromSource, onDisableSequenceInteractivity, onDuplicateSequenceFromSource, openInEditor, originalLocation, selectAsset, sequence, sourceActions = [], }) => {
|
|
27
|
+
const getSequenceContextMenuItems = ({ assetLinkInfo, canOpenInEditor, deleteDisabled, disableInteractivityDisabled, duplicateDisabled, fileLocation, includeSourceEditItems, editorInfo, onDeleteSequenceFromSource, onDisableSequenceInteractivity, onDuplicateSequenceFromSource, openInEditor, originalLocation, selectAsset, sequence, sourceActions = [], }) => {
|
|
26
28
|
var _a, _b;
|
|
29
|
+
var _c;
|
|
27
30
|
const editorName = window.remotion_editorName;
|
|
28
31
|
const { documentationLink } = sequence;
|
|
29
32
|
const isInteractiveSvg = ((_a = sequence.controls) === null || _a === void 0 ? void 0 : _a.componentIdentity) === interactiveSvgComponentIdentity;
|
|
33
|
+
const installedEditors = (_c = editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors) !== null && _c !== void 0 ? _c : [];
|
|
30
34
|
const items = [
|
|
31
35
|
editorName
|
|
32
36
|
? {
|
|
@@ -36,12 +40,44 @@ const getSequenceContextMenuItems = ({ assetLinkInfo, canOpenInEditor, deleteDis
|
|
|
36
40
|
label: `Open in ${editorName}`,
|
|
37
41
|
leftItem: null,
|
|
38
42
|
disabled: !canOpenInEditor || !originalLocation,
|
|
39
|
-
onClick: openInEditor,
|
|
43
|
+
onClick: () => openInEditor(null),
|
|
40
44
|
quickSwitcherLabel: null,
|
|
41
45
|
subMenu: null,
|
|
42
46
|
value: 'open-in-editor',
|
|
43
47
|
}
|
|
44
48
|
: null,
|
|
49
|
+
editorName && installedEditors.length > 0
|
|
50
|
+
? {
|
|
51
|
+
type: 'item',
|
|
52
|
+
id: 'open-in-another-editor',
|
|
53
|
+
keyHint: null,
|
|
54
|
+
label: 'Open in...',
|
|
55
|
+
leftItem: null,
|
|
56
|
+
disabled: !canOpenInEditor || !originalLocation,
|
|
57
|
+
onClick: () => undefined,
|
|
58
|
+
quickSwitcherLabel: null,
|
|
59
|
+
subMenu: {
|
|
60
|
+
items: installedEditors.map((editor) => ({
|
|
61
|
+
type: 'item',
|
|
62
|
+
id: `open-in-${editor.id}`,
|
|
63
|
+
keyHint: null,
|
|
64
|
+
label: editor.name,
|
|
65
|
+
leftItem: (0, react_1.createElement)(editor_1.EditorIcon, {
|
|
66
|
+
editorId: editor.id,
|
|
67
|
+
size: 18,
|
|
68
|
+
}),
|
|
69
|
+
disabled: false,
|
|
70
|
+
onClick: () => openInEditor(editor.id),
|
|
71
|
+
quickSwitcherLabel: null,
|
|
72
|
+
subMenu: null,
|
|
73
|
+
value: editor.id,
|
|
74
|
+
})),
|
|
75
|
+
leaveLeftSpace: true,
|
|
76
|
+
preselectIndex: false,
|
|
77
|
+
},
|
|
78
|
+
value: 'open-in-another-editor',
|
|
79
|
+
}
|
|
80
|
+
: null,
|
|
45
81
|
{
|
|
46
82
|
type: 'item',
|
|
47
83
|
id: 'copy-file-location',
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.saveSequenceProps = exports.saveInlineCaptionPatches = void 0;
|
|
4
4
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
5
|
-
const
|
|
5
|
+
const sequence_props_api_1 = require("../sequence-props-api");
|
|
6
6
|
const call_move_keyframe_1 = require("./call-move-keyframe");
|
|
7
7
|
const save_prop_queue_1 = require("./save-prop-queue");
|
|
8
8
|
const serializeSequencePropValue = (value) => {
|
|
@@ -22,7 +22,7 @@ const saveInlineCaptionPatches = ({ fileName, nodePath, schema, patches, nextCap
|
|
|
22
22
|
defaultValue: null,
|
|
23
23
|
schema,
|
|
24
24
|
}),
|
|
25
|
-
apiCall: () => (0,
|
|
25
|
+
apiCall: () => (0, sequence_props_api_1.saveSequenceProps)({
|
|
26
26
|
edits: [],
|
|
27
27
|
captionPatches: [{ fileName, nodePath, schema, patches }],
|
|
28
28
|
addedKeyframes: null,
|
|
@@ -65,7 +65,7 @@ const saveSequenceProps = ({ changes, addedKeyframes, movedKeyframes, setPropSta
|
|
|
65
65
|
}),
|
|
66
66
|
apiCall: () => {
|
|
67
67
|
var _a;
|
|
68
|
-
return (0,
|
|
68
|
+
return (0, sequence_props_api_1.saveSequenceProps)({
|
|
69
69
|
edits: [
|
|
70
70
|
{
|
|
71
71
|
fileName: change.fileName,
|
|
@@ -110,7 +110,7 @@ const saveSequenceProps = ({ changes, addedKeyframes, movedKeyframes, setPropSta
|
|
|
110
110
|
schema: change.schema,
|
|
111
111
|
}));
|
|
112
112
|
}
|
|
113
|
-
return (0,
|
|
113
|
+
return (0, sequence_props_api_1.saveSequenceProps)({
|
|
114
114
|
edits: changes.map((change) => {
|
|
115
115
|
var _a;
|
|
116
116
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SequenceNodePath, InteractivitySchema, VideoConfigValues } from 'remotion';
|
|
2
|
-
import {
|
|
3
|
-
type SubscribeResult = Awaited<ReturnType<typeof
|
|
2
|
+
import { subscribeToSequenceProps } from '../sequence-props-api';
|
|
3
|
+
type SubscribeResult = Awaited<ReturnType<typeof subscribeToSequenceProps>>;
|
|
4
4
|
type ApplyResult = (result: SubscribeResult) => void;
|
|
5
5
|
export declare const acquireSequencePropsSubscription: ({ fileName, line, column, schema, componentIdentity, effects, nodePath, clientId, applyOnce, applyEach, videoConfigValues, }: {
|
|
6
6
|
fileName: string;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.acquireSequencePropsSubscription = void 0;
|
|
4
4
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
5
5
|
const remotion_1 = require("remotion");
|
|
6
|
-
const
|
|
6
|
+
const sequence_props_api_1 = require("../sequence-props-api");
|
|
7
7
|
const makeKey = ({ fileName, line, column, componentIdentity, sequenceKeys, assetKeys, effectKeys, videoConfigValues, }) => `${fileName}\0${line}\0${column}\0${componentIdentity !== null && componentIdentity !== void 0 ? componentIdentity : ''}\0${sequenceKeys.join('\0')}\0${assetKeys.join('\0')}\0${effectKeys.map((keys) => keys.join('\0')).join('\0\0')}\0${JSON.stringify(videoConfigValues)}`;
|
|
8
8
|
const entries = new Map();
|
|
9
9
|
const acquireSequencePropsSubscription = ({ fileName, line, column, schema, componentIdentity, effects, nodePath, clientId, applyOnce, applyEach, videoConfigValues, }) => {
|
|
@@ -22,7 +22,7 @@ const acquireSequencePropsSubscription = ({ fileName, line, column, schema, comp
|
|
|
22
22
|
});
|
|
23
23
|
let entry = entries.get(key);
|
|
24
24
|
if (!entry) {
|
|
25
|
-
const promise = (0,
|
|
25
|
+
const promise = (0, sequence_props_api_1.subscribeToSequenceProps)({
|
|
26
26
|
fileName,
|
|
27
27
|
line,
|
|
28
28
|
column,
|
|
@@ -86,7 +86,7 @@ const acquireSequencePropsSubscription = ({ fileName, line, column, schema, comp
|
|
|
86
86
|
if (!result.success) {
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
|
-
return (0,
|
|
89
|
+
return (0, sequence_props_api_1.unsubscribeFromSequenceProps)({
|
|
90
90
|
fileName: acquired.fileName,
|
|
91
91
|
nodePath: result.nodePath,
|
|
92
92
|
clientId: acquired.clientId,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const shouldSubscribeToSourceFile: (source: string) => boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.shouldSubscribeToSourceFile = void 0;
|
|
4
|
+
const shouldSubscribeToSourceFile = (source) => {
|
|
5
|
+
const normalized = source.replaceAll('\\', '/');
|
|
6
|
+
if (normalized === '..' || normalized.startsWith('../')) {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
return !normalized.split('/').includes('node_modules');
|
|
10
|
+
};
|
|
11
|
+
exports.shouldSubscribeToSourceFile = shouldSubscribeToSourceFile;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { EditorPickerId } from '@remotion/studio-shared';
|
|
1
2
|
import type { TSequence } from 'remotion';
|
|
2
3
|
export declare const useOpenSequenceInEditor: (sequence: TSequence) => {
|
|
3
4
|
canOpenInEditor: boolean;
|
|
4
|
-
|
|
5
|
+
editorInfo: import("@remotion/studio-shared").GetDefaultEditorInfoResponse | null;
|
|
6
|
+
openInEditor: (editorId: EditorPickerId | null) => Promise<void>;
|
|
5
7
|
originalLocation: import("remotion").ResolvedStackLocation | null;
|
|
6
8
|
};
|
|
@@ -5,18 +5,20 @@ const react_1 = require("react");
|
|
|
5
5
|
const client_id_1 = require("../../helpers/client-id");
|
|
6
6
|
const open_in_editor_1 = require("../../helpers/open-in-editor");
|
|
7
7
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
8
|
+
const use_default_editor_info_1 = require("../use-default-editor-info");
|
|
8
9
|
const use_resolved_stack_react_to_change_1 = require("./use-resolved-stack-react-to-change");
|
|
9
10
|
const useOpenSequenceInEditor = (sequence) => {
|
|
10
11
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
11
12
|
const previewConnected = previewServerState.type === 'connected';
|
|
12
13
|
const originalLocation = (0, use_resolved_stack_react_to_change_1.useResolveStackAndReactToChange)(sequence.getStack);
|
|
14
|
+
const editorInfo = (0, use_default_editor_info_1.useDefaultEditorInfo)((0, use_default_editor_info_1.canUseEditorPicker)(previewConnected));
|
|
13
15
|
const canOpenInEditor = (0, react_1.useMemo)(() => Boolean(window.remotion_editorName && previewConnected && originalLocation), [originalLocation, previewConnected]);
|
|
14
|
-
const openInEditor = (0, react_1.useCallback)(async () => {
|
|
16
|
+
const openInEditor = (0, react_1.useCallback)(async (editorId) => {
|
|
15
17
|
if (!canOpenInEditor || !originalLocation) {
|
|
16
18
|
return;
|
|
17
19
|
}
|
|
18
20
|
try {
|
|
19
|
-
await (0, open_in_editor_1.openOriginalPositionInEditor)(originalLocation);
|
|
21
|
+
await (0, open_in_editor_1.openOriginalPositionInEditor)(originalLocation, editorId);
|
|
20
22
|
}
|
|
21
23
|
catch (err) {
|
|
22
24
|
(0, NotificationCenter_1.showNotification)(err.message, 2000);
|
|
@@ -24,6 +26,7 @@ const useOpenSequenceInEditor = (sequence) => {
|
|
|
24
26
|
}, [canOpenInEditor, originalLocation]);
|
|
25
27
|
return {
|
|
26
28
|
canOpenInEditor,
|
|
29
|
+
editorInfo,
|
|
27
30
|
openInEditor,
|
|
28
31
|
originalLocation,
|
|
29
32
|
};
|
|
@@ -7,6 +7,7 @@ const remotion_1 = require("remotion");
|
|
|
7
7
|
const client_id_1 = require("../../helpers/client-id");
|
|
8
8
|
const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
|
|
9
9
|
const sequence_props_subscription_store_1 = require("./sequence-props-subscription-store");
|
|
10
|
+
const should_subscribe_to_source_file_1 = require("./should-subscribe-to-source-file");
|
|
10
11
|
const useSequencePropsSubscription = ({ originalLocation, overrideId, componentIdentity, schema, effects, }) => {
|
|
11
12
|
var _a, _b, _c;
|
|
12
13
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
@@ -40,6 +41,7 @@ const useSequencePropsSubscription = ({ originalLocation, overrideId, componentI
|
|
|
40
41
|
var _a, _b;
|
|
41
42
|
if (!clientId ||
|
|
42
43
|
!locationSource ||
|
|
44
|
+
!(0, should_subscribe_to_source_file_1.shouldSubscribeToSourceFile)(locationSource) ||
|
|
43
45
|
!locationLine ||
|
|
44
46
|
locationColumn === null ||
|
|
45
47
|
!schema ||
|
|
@@ -11,7 +11,6 @@ const effect_drag_and_drop_1 = require("../effect-drag-and-drop");
|
|
|
11
11
|
const handle_drop_1 = require("../handle-drop");
|
|
12
12
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
13
13
|
const SvgImportDialog_1 = require("../SvgImportDialog");
|
|
14
|
-
const use_element_overwrite_confirmation_1 = require("../use-element-overwrite-confirmation");
|
|
15
14
|
const timeline_refs_1 = require("./timeline-refs");
|
|
16
15
|
const timeline_scroll_logic_1 = require("./timeline-scroll-logic");
|
|
17
16
|
const use_resolved_stack_1 = require("./use-resolved-stack");
|
|
@@ -31,7 +30,6 @@ const useTimelineAssetDrop = () => {
|
|
|
31
30
|
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
32
31
|
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
33
32
|
const chooseSvgImportMode = (0, SvgImportDialog_1.useSvgImportDialog)();
|
|
34
|
-
const confirmElementOverwrite = (0, use_element_overwrite_confirmation_1.useElementOverwriteConfirmation)();
|
|
35
33
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
36
34
|
const [isAddingAsset, setIsAddingAsset] = (0, react_1.useState)(false);
|
|
37
35
|
const [assetDropFrame, setAssetDropFrame] = (0, react_1.useState)(null);
|
|
@@ -122,7 +120,6 @@ const useTimelineAssetDrop = () => {
|
|
|
122
120
|
await (0, handle_drop_1.handleDrop)({
|
|
123
121
|
chooseSvgImportMode,
|
|
124
122
|
compositionFile,
|
|
125
|
-
confirmElementOverwrite,
|
|
126
123
|
compositionId: currentCompositionId,
|
|
127
124
|
destinationDimensions: {
|
|
128
125
|
height: videoConfig.height,
|
|
@@ -145,7 +142,6 @@ const useTimelineAssetDrop = () => {
|
|
|
145
142
|
chooseSvgImportMode,
|
|
146
143
|
compositionComponentInfo === null || compositionComponentInfo === void 0 ? void 0 : compositionComponentInfo.canAddSequence,
|
|
147
144
|
compositionFile,
|
|
148
|
-
confirmElementOverwrite,
|
|
149
145
|
currentCompositionId,
|
|
150
146
|
getDropFrame,
|
|
151
147
|
videoConfig,
|
|
@@ -5,6 +5,7 @@ const studio_shared_1 = require("@remotion/studio-shared");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
7
|
const client_id_1 = require("../../helpers/client-id");
|
|
8
|
+
const pointer_session_1 = require("../../helpers/pointer-session");
|
|
8
9
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
9
10
|
const call_move_keyframe_1 = require("./call-move-keyframe");
|
|
10
11
|
const find_track_for_node_path_info_1 = require("./find-track-for-node-path-info");
|
|
@@ -319,11 +320,8 @@ const useTimelineKeyframeDrag = ({ frame, nodePathInfo, onSelect, selectable, se
|
|
|
319
320
|
.filter((target) => target !== null);
|
|
320
321
|
return dragTargets;
|
|
321
322
|
};
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
window.removeEventListener('pointerup', onPointerUp);
|
|
325
|
-
window.removeEventListener('pointercancel', onPointerCancel);
|
|
326
|
-
};
|
|
323
|
+
let stopPointerSession = null;
|
|
324
|
+
const cleanup = () => stopPointerSession === null || stopPointerSession === void 0 ? void 0 : stopPointerSession();
|
|
327
325
|
const clearActiveOverrides = () => {
|
|
328
326
|
const targets = dragTargets;
|
|
329
327
|
if (targets === null) {
|
|
@@ -438,9 +436,19 @@ const useTimelineKeyframeDrag = ({ frame, nodePathInfo, onSelect, selectable, se
|
|
|
438
436
|
clearActiveOverrides();
|
|
439
437
|
clearDraggedKeyframes();
|
|
440
438
|
};
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
439
|
+
stopPointerSession = (0, pointer_session_1.startPointerSession)({
|
|
440
|
+
event: e,
|
|
441
|
+
target: e.currentTarget,
|
|
442
|
+
onMove: onPointerMove,
|
|
443
|
+
onEnd: (reason) => {
|
|
444
|
+
if (reason === 'pointerup' || reason === 'buttons-released') {
|
|
445
|
+
onPointerUp();
|
|
446
|
+
}
|
|
447
|
+
else {
|
|
448
|
+
onPointerCancel();
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
});
|
|
444
452
|
}, [
|
|
445
453
|
clearDragOverrides,
|
|
446
454
|
clearEffectDragOverrides,
|
|
@@ -519,11 +527,8 @@ const useTimelineEasingKeyframeDrag = ({ onSelect, selectable, selected, selecti
|
|
|
519
527
|
.filter((target) => target !== null);
|
|
520
528
|
return dragTargets;
|
|
521
529
|
};
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
window.removeEventListener('pointerup', onPointerUp);
|
|
525
|
-
window.removeEventListener('pointercancel', onPointerCancel);
|
|
526
|
-
};
|
|
530
|
+
let stopPointerSession = null;
|
|
531
|
+
const cleanup = () => stopPointerSession === null || stopPointerSession === void 0 ? void 0 : stopPointerSession();
|
|
527
532
|
const clearActiveOverrides = () => {
|
|
528
533
|
const targets = dragTargets;
|
|
529
534
|
if (targets === null) {
|
|
@@ -638,9 +643,19 @@ const useTimelineEasingKeyframeDrag = ({ onSelect, selectable, selected, selecti
|
|
|
638
643
|
clearActiveOverrides();
|
|
639
644
|
clearDraggedKeyframes();
|
|
640
645
|
};
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
646
|
+
stopPointerSession = (0, pointer_session_1.startPointerSession)({
|
|
647
|
+
event: e,
|
|
648
|
+
target: e.currentTarget,
|
|
649
|
+
onMove: onPointerMove,
|
|
650
|
+
onEnd: (reason) => {
|
|
651
|
+
if (reason === 'pointerup' || reason === 'buttons-released') {
|
|
652
|
+
onPointerUp();
|
|
653
|
+
}
|
|
654
|
+
else {
|
|
655
|
+
onPointerCancel();
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
});
|
|
644
659
|
}, [
|
|
645
660
|
clearDragOverrides,
|
|
646
661
|
clearEffectDragOverrides,
|
|
@@ -114,7 +114,7 @@ const TopPanelInner = ({ readOnlyStudio, onMounted, drawRef, bufferStateDelayInM
|
|
|
114
114
|
return (jsx_runtime_1.jsx(ObserveDefaultPropsContext_1.ObserveDefaultProps, { compositionId: (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition'
|
|
115
115
|
? canvasContent.compositionId
|
|
116
116
|
: null, readOnlyStudio: readOnlyStudio, children: jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
117
|
-
jsx_runtime_1.jsx("div", { style: row, children: jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, maxFlexerSize: MAX_SIDEBAR_WIDTH, maxAntiFlexerSize: null, id: "sidebar-to-preview", orientation: "vertical", children: [actualStateLeft === 'expanded' ? (isMobileLayout ? (jsx_runtime_1.jsx(MobilePanel_1.default, { onClose: onCollapseLeft, side: "left", children: jsx_runtime_1.jsx(ExplorerPanel_1.ExplorerPanel, { readOnlyStudio: readOnlyStudio }) })) : (jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: jsx_runtime_1.jsx(ExplorerPanel_1.ExplorerPanel, { readOnlyStudio: readOnlyStudio }) }))) : null, actualStateLeft === 'expanded' && !isMobileLayout ? (jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "left", onCollapse: onCollapseLeft })) : null, jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { minFlex: 0.5, maxFlex: 0.8, defaultFlex: 0.7, maxFlexerSize: null, maxAntiFlexerSize: MAX_SIDEBAR_WIDTH, id: "canvas-to-right-sidebar", orientation: "vertical", children: [
|
|
117
|
+
jsx_runtime_1.jsx("div", { style: row, children: jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, maxFlexerSize: MAX_SIDEBAR_WIDTH, minFlexerSize: null, maxAntiFlexerSize: null, id: "sidebar-to-preview", orientation: "vertical", children: [actualStateLeft === 'expanded' ? (isMobileLayout ? (jsx_runtime_1.jsx(MobilePanel_1.default, { onClose: onCollapseLeft, side: "left", children: jsx_runtime_1.jsx(ExplorerPanel_1.ExplorerPanel, { readOnlyStudio: readOnlyStudio }) })) : (jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: jsx_runtime_1.jsx(ExplorerPanel_1.ExplorerPanel, { readOnlyStudio: readOnlyStudio }) }))) : null, actualStateLeft === 'expanded' && !isMobileLayout ? (jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "left", onCollapse: onCollapseLeft })) : null, jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { minFlex: 0.5, maxFlex: 0.8, defaultFlex: 0.7, maxFlexerSize: null, minFlexerSize: null, maxAntiFlexerSize: MAX_SIDEBAR_WIDTH, id: "canvas-to-right-sidebar", orientation: "vertical", children: [
|
|
118
118
|
jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: jsx_runtime_1.jsx("div", { ref: drawRef, style: canvasContainerStyle, children: jsx_runtime_1.jsx(CanvasIfSizeIsAvailable_1.CanvasIfSizeIsAvailable, {}) }) }), actualStateRight === 'expanded' && !isMobileLayout ? (jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "right", onCollapse: onCollapseRight })) : null, actualStateRight === 'expanded' ? (isMobileLayout ? (jsx_runtime_1.jsx(MobilePanel_1.default, { onClose: onCollapseRight, side: "right", children: jsx_runtime_1.jsx(OptionsPanel_1.OptionsPanel, { readOnlyStudio: readOnlyStudio }) })) : (jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: jsx_runtime_1.jsx(OptionsPanel_1.OptionsPanel, { readOnlyStudio: readOnlyStudio }) }))) : null] }) })
|
|
119
119
|
] }) }), jsx_runtime_1.jsx(PreviewToolbar_1.PreviewToolbar, { bufferStateDelayInMilliseconds: bufferStateDelayInMilliseconds, readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(CurrentCompositionSideEffects_1.TitleUpdater, {})
|
|
120
120
|
] }) }));
|
|
@@ -141,7 +141,7 @@ const UndoRedoButtons = () => {
|
|
|
141
141
|
return null;
|
|
142
142
|
}
|
|
143
143
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
144
|
-
jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: onUndo, renderAction: renderUndo, title: undoTooltip, disabled: !canUndo }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: onRedo, renderAction: renderRedo, title: redoTooltip, disabled: !canRedo })
|
|
144
|
+
jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onUndo, renderAction: renderUndo, title: undoTooltip, disabled: !canUndo }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onRedo, renderAction: renderRedo, title: redoTooltip, disabled: !canRedo })
|
|
145
145
|
] }));
|
|
146
146
|
};
|
|
147
147
|
exports.UndoRedoButtons = UndoRedoButtons;
|
|
@@ -10,7 +10,6 @@ const z_index_1 = require("../state/z-index");
|
|
|
10
10
|
const actions_1 = require("./RenderQueue/actions");
|
|
11
11
|
const buttonStyle = {
|
|
12
12
|
appearance: 'none',
|
|
13
|
-
color: colors_1.BLUE,
|
|
14
13
|
border: 'none',
|
|
15
14
|
fontWeight: 'bold',
|
|
16
15
|
backgroundColor: colors_1.TRANSPARENT,
|
|
@@ -18,15 +17,17 @@ const buttonStyle = {
|
|
|
18
17
|
fontSize: 14,
|
|
19
18
|
display: 'inline-flex',
|
|
20
19
|
justifyContent: 'center',
|
|
20
|
+
marginLeft: 8,
|
|
21
21
|
};
|
|
22
22
|
const UpdateCheck = () => {
|
|
23
23
|
const [info, setInfo] = (0, react_1.useState)(null);
|
|
24
24
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
25
25
|
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
26
26
|
const [knownBugs, setKnownBugs] = (0, react_1.useState)(null);
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
28
|
+
const hasBugfixesAvailable = (0, react_1.useMemo)(() => {
|
|
29
|
+
return Boolean((info === null || info === void 0 ? void 0 : info.updateAvailable) && knownBugs && knownBugs.length > 0);
|
|
30
|
+
}, [info === null || info === void 0 ? void 0 : info.updateAvailable, knownBugs]);
|
|
30
31
|
const checkForUpdates = (0, react_1.useCallback)(() => {
|
|
31
32
|
const controller = new AbortController();
|
|
32
33
|
(0, actions_1.updateAvailable)(controller.signal)
|
|
@@ -78,18 +79,29 @@ const UpdateCheck = () => {
|
|
|
78
79
|
const dynButtonStyle = (0, react_1.useMemo)(() => {
|
|
79
80
|
return {
|
|
80
81
|
...buttonStyle,
|
|
81
|
-
color:
|
|
82
|
+
color: hovered
|
|
83
|
+
? colors_1.WHITE
|
|
84
|
+
: hasBugfixesAvailable
|
|
85
|
+
? colors_1.WARNING_COLOR
|
|
86
|
+
: colors_1.WHITE_ALPHA_80,
|
|
82
87
|
};
|
|
83
|
-
}, [
|
|
88
|
+
}, [hasBugfixesAvailable, hovered]);
|
|
89
|
+
const onPointerEnter = (0, react_1.useCallback)(() => {
|
|
90
|
+
setHovered(true);
|
|
91
|
+
}, []);
|
|
92
|
+
const onPointerLeave = (0, react_1.useCallback)(() => {
|
|
93
|
+
setHovered(false);
|
|
94
|
+
}, []);
|
|
84
95
|
if (!info) {
|
|
85
96
|
return null;
|
|
86
97
|
}
|
|
87
|
-
if (!info.updateAvailable) {
|
|
98
|
+
if (!info.updateAvailable && !info.skillsUpdateAvailable) {
|
|
88
99
|
return null;
|
|
89
100
|
}
|
|
90
|
-
return (jsx_runtime_1.jsx("button", { tabIndex: tabIndex, style: dynButtonStyle, onClick: openModal, type: "button", title:
|
|
101
|
+
return (jsx_runtime_1.jsx("button", { tabIndex: tabIndex, style: dynButtonStyle, onClick: openModal, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, type: "button", title: hasBugfixesAvailable ? 'Bugfixes available' : 'Update available', children: hasBugfixesAvailable ? ('Bugfixes available') : (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", style: {
|
|
91
102
|
height: 16,
|
|
92
103
|
width: 16,
|
|
104
|
+
color: 'inherit',
|
|
93
105
|
}, viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: colors_1.CURRENT_COLOR_LOWERCASE, d: "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM135.1 217.4c-4.5 4.2-7.1 10.1-7.1 16.3c0 12.3 10 22.3 22.3 22.3H208v96c0 17.7 14.3 32 32 32h32c17.7 0 32-14.3 32-32V256h57.7c12.3 0 22.3-10 22.3-22.3c0-6.2-2.6-12.1-7.1-16.3L269.8 117.5c-3.8-3.5-8.7-5.5-13.8-5.5s-10.1 2-13.8 5.5L135.1 217.4z" }) })) }));
|
|
94
106
|
};
|
|
95
107
|
exports.UpdateCheck = UpdateCheck;
|
|
@@ -16,7 +16,10 @@ const container = {
|
|
|
16
16
|
paddingTop: 0,
|
|
17
17
|
};
|
|
18
18
|
const text = {
|
|
19
|
+
color: colors_1.LIGHT_TEXT,
|
|
20
|
+
fontFamily: 'sans-serif',
|
|
19
21
|
fontSize: 14,
|
|
22
|
+
lineHeight: 1.5,
|
|
20
23
|
};
|
|
21
24
|
const title = {
|
|
22
25
|
paddingTop: 12,
|
|
@@ -25,16 +28,19 @@ const title = {
|
|
|
25
28
|
};
|
|
26
29
|
const code = {
|
|
27
30
|
background: colors_1.SELECTED_BACKGROUND,
|
|
31
|
+
color: colors_1.LIGHT_TEXT,
|
|
32
|
+
fontFamily: 'monospace',
|
|
28
33
|
padding: '12px 10px',
|
|
29
34
|
fontSize: 14,
|
|
35
|
+
lineHeight: 1.5,
|
|
30
36
|
marginTop: 10,
|
|
31
37
|
marginBottom: 10,
|
|
32
38
|
};
|
|
33
39
|
const link = {
|
|
40
|
+
...text,
|
|
34
41
|
fontWeight: 'bold',
|
|
35
42
|
color: colors_1.BLUE,
|
|
36
43
|
textDecoration: 'none',
|
|
37
|
-
...text,
|
|
38
44
|
};
|
|
39
45
|
const commands = {
|
|
40
46
|
npm: 'npx remotion upgrade',
|
|
@@ -43,23 +49,33 @@ const commands = {
|
|
|
43
49
|
bun: 'bun remotion upgrade',
|
|
44
50
|
unknown: 'npx remotion upgrade',
|
|
45
51
|
};
|
|
52
|
+
const skillsUpdateCommand = 'npx remotion skills update';
|
|
53
|
+
const remotionUpgradeSkill = '/remotion-upgrade';
|
|
46
54
|
const UpdateModal = ({ info, knownBugs }) => {
|
|
47
55
|
const hasKnownBugs = (0, react_1.useMemo)(() => {
|
|
48
56
|
return knownBugs && (knownBugs === null || knownBugs === void 0 ? void 0 : knownBugs.length) > 0;
|
|
49
57
|
}, [knownBugs]);
|
|
50
|
-
const
|
|
58
|
+
const updateAction = info.remotionUpgradeSkillAvailable
|
|
59
|
+
? remotionUpgradeSkill
|
|
60
|
+
: info.updateAvailable
|
|
61
|
+
? commands[info.packageManager]
|
|
62
|
+
: skillsUpdateCommand;
|
|
63
|
+
const updateActionType = info.remotionUpgradeSkillAvailable
|
|
64
|
+
? 'skill'
|
|
65
|
+
: 'command';
|
|
51
66
|
const onClick = (0, react_1.useCallback)(() => {
|
|
52
|
-
(0, copy_text_1.copyText)(
|
|
67
|
+
(0, copy_text_1.copyText)(updateAction).catch((err) => {
|
|
53
68
|
(0, NotificationCenter_1.showNotification)(`Could not copy: ${err.message}`, 2000);
|
|
54
69
|
});
|
|
55
|
-
}, [
|
|
70
|
+
}, [updateAction]);
|
|
56
71
|
return (jsx_runtime_1.jsxs(DismissableModal_1.DismissableModal, { children: [
|
|
57
|
-
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: "Update available" }), jsx_runtime_1.jsxs("div", { style: container, children: [hasKnownBugs ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
58
|
-
jsx_runtime_1.jsxs("div", { style: title, children: ["The currently installed version ", info.currentVersion, " has the following known bugs:"] }), jsx_runtime_1.jsx(KnownBugs_1.KnownBugs, { bugs: knownBugs }), jsx_runtime_1.jsx("div", { style: { height: '20px' } }), jsx_runtime_1.
|
|
59
|
-
] })) : (jsx_runtime_1.
|
|
60
|
-
jsx_runtime_1.jsx(layout_1.Flex, { children: jsx_runtime_1.jsx("pre", { onClick: onClick, style: code, children:
|
|
61
|
-
] }), jsx_runtime_1.jsxs("div", { style: text, children: ["This will upgrade Remotion from ", info.currentVersion, " to", ' ', info.latestVersion,
|
|
62
|
-
|
|
72
|
+
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: "Update available" }), jsx_runtime_1.jsxs("div", { style: container, children: [hasKnownBugs && info.updateAvailable ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
73
|
+
jsx_runtime_1.jsxs("div", { style: title, children: ["The currently installed version ", info.currentVersion, " has the following known bugs:"] }), jsx_runtime_1.jsx(KnownBugs_1.KnownBugs, { bugs: knownBugs }), jsx_runtime_1.jsx("div", { style: { height: '20px' } }), jsx_runtime_1.jsxs("div", { style: text, children: ["To upgrade, run the following ", updateActionType, ":"] })
|
|
74
|
+
] })) : info.updateAvailable ? (jsx_runtime_1.jsxs("div", { style: title, children: ["A new update for Remotion is available! Run the following", ' ', updateActionType, ":"] })) : (jsx_runtime_1.jsxs("div", { style: title, children: ["Your Remotion Agent Skills are out of date. Run the following", ' ', updateActionType, ":"] })), jsx_runtime_1.jsxs(layout_1.Row, { align: "center", children: [
|
|
75
|
+
jsx_runtime_1.jsx(layout_1.Flex, { children: jsx_runtime_1.jsx("pre", { onClick: onClick, style: code, children: updateAction }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx(CopyButton_1.CopyButton, { textToCopy: updateAction, label: "Copy", labelWhenCopied: "Copied!" })
|
|
76
|
+
] }), info.updateAvailable ? (jsx_runtime_1.jsxs("div", { style: text, children: ["This will upgrade Remotion from ", info.currentVersion, " to", ' ', info.latestVersion, info.skillsUpdateAvailable
|
|
77
|
+
? ' and update your project Remotion Agent Skills.'
|
|
78
|
+
: '.'] })) : null, info.updateAvailable ? (jsx_runtime_1.jsxs("div", { style: text, children: ["Read the", ' ', jsx_runtime_1.jsx("a", { style: link, target: "_blank", href: "https://github.com/remotion-dev/remotion/releases", children: "Release notes" }), ' ', "to know what", "'s", " new in Remotion."] })) : null] })
|
|
63
79
|
] }));
|
|
64
80
|
};
|
|
65
81
|
exports.UpdateModal = UpdateModal;
|
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../../helpers/colors");
|
|
7
7
|
const open_in_editor_1 = require("../../helpers/open-in-editor");
|
|
8
|
+
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
8
9
|
const Fieldset_1 = require("../RenderModal/SchemaEditor/Fieldset");
|
|
9
10
|
const source_attribution_1 = require("../Timeline/TimelineStack/source-attribution");
|
|
10
11
|
const container = {
|
|
@@ -28,11 +29,13 @@ const ClickableFileName = ({ originalFileName, }) => {
|
|
|
28
29
|
color: hoverEffect ? colors_1.WHITE_HEX : colors_1.LIGHT_COLOR,
|
|
29
30
|
};
|
|
30
31
|
}, [originalFileName, hoverEffect]);
|
|
31
|
-
const onClick = (0, react_1.useCallback)(
|
|
32
|
+
const onClick = (0, react_1.useCallback)(() => {
|
|
32
33
|
if (originalFileName.type !== 'loaded') {
|
|
33
34
|
return;
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
+
(0, open_in_editor_1.openOriginalPositionInEditor)(originalFileName.originalFileName, null).catch((err) => {
|
|
37
|
+
(0, NotificationCenter_1.showNotification)(err.message, 2000);
|
|
38
|
+
});
|
|
36
39
|
}, [originalFileName]);
|
|
37
40
|
return (jsx_runtime_1.jsx("div", { style: container, children: jsx_runtime_1.jsx("span", { style: style, onClick: onClick, onPointerEnter: onTitlePointerEnter, onPointerLeave: onTitlePointerLeave, children: originalFileName.type === 'loaded'
|
|
38
41
|
? (0, source_attribution_1.getOriginalSourceAttribution)(originalFileName.originalFileName)
|
|
@@ -28,7 +28,7 @@ const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocati
|
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
try {
|
|
31
|
-
await (0, open_in_editor_1.openOriginalPositionInEditor)(resolvedLocation);
|
|
31
|
+
await (0, open_in_editor_1.openOriginalPositionInEditor)(resolvedLocation, null);
|
|
32
32
|
}
|
|
33
33
|
catch (err) {
|
|
34
34
|
(0, NotificationCenter_1.showNotification)(err.message, 2000);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SubscribeToDefaultPropsRequest, UnsubscribeFromDefaultPropsRequest } from '@remotion/studio-shared';
|
|
2
|
+
export declare const subscribeToDefaultProps: (request: SubscribeToDefaultPropsRequest) => Promise<import("@remotion/studio-shared").CanUpdateDefaultPropsResponse>;
|
|
3
|
+
export declare const unsubscribeFromDefaultProps: (request: UnsubscribeFromDefaultPropsRequest) => Promise<undefined>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.unsubscribeFromDefaultProps = exports.subscribeToDefaultProps = void 0;
|
|
4
|
+
const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
|
|
5
|
+
const call_api_1 = require("./call-api");
|
|
6
|
+
const subscribeToDefaultProps = (request) => {
|
|
7
|
+
const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
|
|
8
|
+
return browserStudioOperations
|
|
9
|
+
? browserStudioOperations.subscribeToDefaultProps(request)
|
|
10
|
+
: (0, call_api_1.callApi)('/api/subscribe-to-default-props', request);
|
|
11
|
+
};
|
|
12
|
+
exports.subscribeToDefaultProps = subscribeToDefaultProps;
|
|
13
|
+
const unsubscribeFromDefaultProps = (request) => {
|
|
14
|
+
const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
|
|
15
|
+
return browserStudioOperations
|
|
16
|
+
? browserStudioOperations.unsubscribeFromDefaultProps(request)
|
|
17
|
+
: (0, call_api_1.callApi)('/api/unsubscribe-from-default-props', request);
|
|
18
|
+
};
|
|
19
|
+
exports.unsubscribeFromDefaultProps = unsubscribeFromDefaultProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ComponentDragData, type CompositionDragData } from '@remotion/
|
|
1
|
+
import { type ComponentDragData, type CompositionDragData } from '@remotion/studio-protocol';
|
|
2
2
|
export declare const isFileDragEvent: (event: DragEvent) => boolean;
|
|
3
3
|
export declare const isAssetDragEvent: (event: DragEvent) => boolean;
|
|
4
4
|
export declare const isComponentDragEvent: (event: DragEvent) => boolean;
|