@remotion/studio 4.0.517 → 4.0.519
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/AppLaunchButton.d.ts +16 -0
- package/dist/components/AppLaunchButton.js +90 -0
- package/dist/components/AssetSelector.js +64 -22
- package/dist/components/AssetSelectorItem.d.ts +14 -1
- package/dist/components/AssetSelectorItem.js +219 -70
- package/dist/components/Button.js +20 -7
- package/dist/components/Canvas.js +109 -78
- package/dist/components/CanvasOrLoading.js +7 -7
- package/dist/components/CaptionTextEditor.js +32 -8
- package/dist/components/CodingAgentButton.d.ts +7 -0
- package/dist/components/CodingAgentButton.js +59 -0
- package/dist/components/CompositionContextButton.d.ts +1 -0
- package/dist/components/CompositionContextButton.js +7 -3
- package/dist/components/CompositionSelector.js +16 -11
- package/dist/components/CompositionSelectorItem.js +16 -23
- package/dist/components/ConfigureLicenseModal.js +4 -48
- package/dist/components/CurrentAsset.js +1 -1
- package/dist/components/EditorContent.js +6 -3
- package/dist/components/ElementInstallConfirmation.d.ts +25 -7
- package/dist/components/ElementInstallConfirmation.js +347 -30
- package/dist/components/ElementLibraryModal.js +3 -1
- package/dist/components/FixComputedValueModal.js +5 -131
- package/dist/components/InitialCompositionLoader.js +3 -2
- package/dist/components/InlineCaptionInspector.js +13 -2
- package/dist/components/InspectorOpenInEditor.js +48 -33
- package/dist/components/InspectorPanel/CompositionInspector.js +35 -3
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +22 -14
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +3 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +10 -5
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -1
- package/dist/components/InspectorPanel/common.js +1 -0
- package/dist/components/InspectorPanel/styles.js +1 -0
- package/dist/components/InspectorSequenceSection.js +8 -3
- package/dist/components/InspectorSourceLocation.js +5 -1
- package/dist/components/KnownBugs.d.ts +1 -1
- package/dist/components/KnownBugs.js +1 -1
- package/dist/components/LicenseExplanation.d.ts +2 -0
- package/dist/components/LicenseExplanation.js +63 -0
- package/dist/components/MenuToolbar.js +7 -1
- package/dist/components/Modals.js +50 -2
- package/dist/components/NewComposition/InputDragger.js +29 -2
- package/dist/components/NewComposition/NewCompDuration.js +1 -1
- package/dist/components/NewComposition/NewComposition.d.ts +23 -0
- package/dist/components/NewComposition/NewComposition.js +217 -80
- package/dist/components/{UpdateModal/OpenIssueButton.js → OpenIssueButton.js} +1 -1
- package/dist/components/PlaybackRateSelector.js +2 -5
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.d.ts +2 -0
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +28 -7
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +21 -13
- package/dist/components/RenderQueue/actions.d.ts +1 -0
- package/dist/components/RenderQueue/actions.js +5 -1
- package/dist/components/SelectedOutlineCanvasRotation.js +27 -1
- package/dist/components/SelectedOutlineElement.js +2 -1
- package/dist/components/SelectedOutlineOverlay.js +9 -10
- package/dist/components/SelectedOutlinePolygon.d.ts +1 -0
- package/dist/components/SelectedOutlinePolygon.js +12 -4
- package/dist/components/SelectedOutlineRenderer.d.ts +1 -1
- package/dist/components/SelectedOutlineRenderer.js +33 -35
- package/dist/components/SettingsContext.js +2 -1
- package/dist/components/SettingsModal.d.ts +1 -1
- package/dist/components/SettingsModal.js +19 -3
- package/dist/components/SidebarRenderButton.d.ts +1 -0
- package/dist/components/SidebarRenderButton.js +15 -5
- package/dist/components/Timeline/SequencePropsObserver.js +29 -14
- package/dist/components/Timeline/TimelineKeyframeControls.js +3 -1
- package/dist/components/Timeline/TimelineRowChrome.js +4 -2
- package/dist/components/Timeline/TimelineSequence.js +40 -8
- package/dist/components/Timeline/TimelineSequenceItem.js +34 -1
- package/dist/components/Timeline/TimelineStack/get-stack.d.ts +1 -0
- package/dist/components/Timeline/TimelineStack/get-stack.js +35 -3
- package/dist/components/Timeline/duplicate-selected-timeline-item.js +23 -25
- package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +6 -0
- package/dist/components/Timeline/get-sequence-context-menu-items.js +34 -1
- package/dist/components/Timeline/sequence-props-subscription-store.d.ts +2 -0
- package/dist/components/Timeline/sequence-props-subscription-store.js +22 -1
- package/dist/components/Timeline/use-sequence-props-subscription.js +7 -0
- package/dist/components/TimelineCombobox.js +1 -0
- package/dist/components/UpdateCheck.d.ts +0 -8
- package/dist/components/UpdateCheck.js +7 -54
- package/dist/components/UpdateStatusContext.d.ts +18 -0
- package/dist/components/UpdateStatusContext.js +74 -0
- package/dist/components/UpdatesSettings.d.ts +2 -0
- package/dist/components/UpdatesSettings.js +251 -0
- package/dist/components/WebMcp.d.ts +2 -0
- package/dist/components/WebMcp.js +945 -0
- package/dist/components/composition-menu-items.js +26 -0
- package/dist/components/get-open-in-menu-items.d.ts +4 -0
- package/dist/components/get-open-in-menu-items.js +28 -24
- package/dist/components/root-composition-menu-items.d.ts +4 -1
- package/dist/components/root-composition-menu-items.js +38 -1
- package/dist/components/selected-outline-measurement.d.ts +11 -0
- package/dist/components/selected-outline-measurement.js +13 -5
- package/dist/components/use-configure-default-apps.d.ts +1 -0
- package/dist/components/use-configure-default-apps.js +24 -0
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +5 -6
- package/dist/error-overlay/remotion-overlay/CopyStackTrace.js +1 -1
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +47 -18
- package/dist/error-overlay/remotion-overlay/ErrorLoader.js +1 -1
- package/dist/error-overlay/remotion-overlay/ErrorTitle.js +5 -4
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +48 -76
- package/dist/error-overlay/remotion-overlay/SearchGitHubIssues.js +1 -1
- package/dist/error-overlay/remotion-overlay/ShortcutHint.js +2 -2
- package/dist/error-overlay/remotion-overlay/StackFrame.js +13 -8
- package/dist/error-overlay/remotion-overlay/Symbolicating.js +1 -1
- package/dist/esm/{chunk-gzqm3g2m.js → chunk-1fkq5bfq.js} +24093 -21093
- package/dist/esm/chunk-6jf1natv.js +25 -0
- package/dist/esm/{chunk-4bxz1d3g.js → chunk-je0h1bgt.js} +1 -28
- package/dist/esm/chunk-m0jqdbkr.js +14571 -0
- package/dist/esm/index.mjs +0 -2
- package/dist/esm/internals.mjs +43231 -25675
- package/dist/esm/previewEntry.mjs +46334 -28776
- package/dist/esm/renderEntry.mjs +6 -3
- package/dist/helpers/can-show-updates.d.ts +5 -0
- package/dist/helpers/can-show-updates.js +7 -0
- package/dist/helpers/colors.d.ts +0 -3
- package/dist/helpers/colors.js +2 -5
- package/dist/helpers/create-folder-tree.d.ts +5 -0
- package/dist/helpers/create-folder-tree.js +40 -2
- package/dist/helpers/format-file-location.d.ts +8 -0
- package/dist/helpers/format-file-location.js +14 -3
- package/dist/helpers/get-asset-metadata.js +1 -1
- package/dist/helpers/get-git-menu-item.d.ts +5 -0
- package/dist/helpers/get-git-menu-item.js +15 -1
- package/dist/helpers/get-timeline-max-zoom.d.ts +8 -0
- package/dist/helpers/get-timeline-max-zoom.js +17 -6
- package/dist/helpers/hoverable.d.ts +1 -0
- package/dist/helpers/hoverable.js +14 -6
- package/dist/helpers/open-in-editor.js +51 -1
- package/dist/helpers/preview-server-events.js +3 -0
- package/dist/helpers/timeline-layout.d.ts +0 -1
- package/dist/helpers/timeline-layout.js +1 -5
- package/dist/helpers/url-state.d.ts +1 -0
- package/dist/helpers/url-state.js +12 -5
- package/dist/icons/enter.d.ts +4 -0
- package/dist/icons/enter.js +10 -0
- package/dist/renderEntry.js +2 -0
- package/dist/state/folders.d.ts +3 -0
- package/dist/state/folders.js +40 -1
- package/dist/state/modals.d.ts +1 -6
- package/dist/state/playbackrate.d.ts +1 -0
- package/dist/state/playbackrate.js +4 -1
- package/package.json +17 -14
- package/dist/components/UpdateModal/UpdateModal.d.ts +0 -6
- package/dist/components/UpdateModal/UpdateModal.js +0 -104
- /package/dist/components/{UpdateModal/OpenIssueButton.d.ts → OpenIssueButton.d.ts} +0 -0
package/dist/esm/renderEntry.mjs
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BACKGROUND_HEX,
|
|
3
3
|
TRANSPARENT,
|
|
4
|
-
WHITE
|
|
4
|
+
WHITE
|
|
5
|
+
} from "./chunk-je0h1bgt.js";
|
|
6
|
+
import {
|
|
5
7
|
__require,
|
|
6
8
|
__toESM
|
|
7
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6jf1natv.js";
|
|
8
10
|
|
|
9
11
|
// src/renderEntry.tsx
|
|
10
12
|
import { useContext, useEffect, useRef, useState } from "react";
|
|
@@ -213,10 +215,11 @@ var renderContent = (Root) => {
|
|
|
213
215
|
renderToDOM(/* @__PURE__ */ jsx("div", {
|
|
214
216
|
children: /* @__PURE__ */ jsx(DelayedSpinner, {})
|
|
215
217
|
}));
|
|
216
|
-
import("./chunk-
|
|
218
|
+
import("./chunk-1fkq5bfq.js").then(({ StudioInternals }) => {
|
|
217
219
|
window.remotion_isStudio = true;
|
|
218
220
|
window.remotion_isReadOnlyStudio = true;
|
|
219
221
|
window.remotion_inputProps = "{}";
|
|
222
|
+
window.remotion_enableSequenceStackTraces?.();
|
|
220
223
|
renderToDOM(/* @__PURE__ */ jsx(StudioInternals.Studio, {
|
|
221
224
|
readOnly: true,
|
|
222
225
|
rootComponent: Root
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.canShowUpdates = void 0;
|
|
4
|
+
const canShowUpdates = ({ connectionStatus, isBrowserStudio, readOnlyStudio, }) => {
|
|
5
|
+
return (connectionStatus === 'connected' && !isBrowserStudio && !readOnlyStudio);
|
|
6
|
+
};
|
|
7
|
+
exports.canShowUpdates = canShowUpdates;
|
package/dist/helpers/colors.d.ts
CHANGED
|
@@ -61,7 +61,6 @@ export declare const ERROR_CODE_FRAME_LINE_BACKGROUND = "#121212";
|
|
|
61
61
|
export declare const ERROR_LINK_COLOR = "#58a6ff";
|
|
62
62
|
export declare const INFO_BLUE = "#60a5fa";
|
|
63
63
|
export declare const SERVER_DISCONNECTED_BACKGROUND = "#e74c3c";
|
|
64
|
-
export declare const STACK_FRAME_BORDER_BLUE = "rgb(66, 144, 245)";
|
|
65
64
|
export declare const TIMELINE_BACKGROUND_COLOR = "#15181B";
|
|
66
65
|
export declare const TIMELINE_NEGATIVE_START_BACKGROUND_COLOR = "#2C2F32";
|
|
67
66
|
export declare const TIMELINE_NEGATIVE_START_BORDER_COLOR = "#414446";
|
|
@@ -86,7 +85,6 @@ export declare const BORDER_BLACK_ALPHA_60 = "1px solid rgba(0, 0, 0, 0.6)";
|
|
|
86
85
|
export declare const BORDER_WHITE_ALPHA_12 = "1px solid rgba(255, 255, 255, 0.12)";
|
|
87
86
|
export declare const BORDER_WHITE_ALPHA_20 = "1px solid rgba(255, 255, 255, 0.2)";
|
|
88
87
|
export declare const BORDER_INFO_BLUE = "1px solid rgba(59, 130, 246, 0.4)";
|
|
89
|
-
export declare const BORDER_STACK_FRAME_BLUE = "1px solid rgb(66, 144, 245)";
|
|
90
88
|
export declare const BORDER_TIMELINE_DROP_BLUE = "1px solid rgba(0, 155, 255, 0.75)";
|
|
91
89
|
export declare const BORDER_TIMELINE_MARQUEE_BLUE = "1px solid rgba(70, 130, 255, 0.75)";
|
|
92
90
|
export declare const SHADOW_BLACK = "0 0 4px black";
|
|
@@ -113,7 +111,6 @@ export declare const SELECTED_OUTLINE_UV_DROP_SHADOW = "drop-shadow(0 1px 2px rg
|
|
|
113
111
|
export declare const LOOPED_INDICATOR_DROP_SHADOW: string;
|
|
114
112
|
export declare const TIMELINE_AUDIO_GRADIENT = "linear-gradient(rgb(16 171 58), rgb(43 165 63) 60%)";
|
|
115
113
|
export declare const TIMELINE_VIDEO_GRADIENT = "linear-gradient(to top, #8e44ad, #9b59b6)";
|
|
116
|
-
export declare const TIMELINE_IMAGE_GRADIENT = "linear-gradient(to top, #2980b9, #3498db)";
|
|
117
114
|
export declare const getBackgroundFromHoverState: ({ selected, hovered, }: {
|
|
118
115
|
selected: boolean;
|
|
119
116
|
hovered: boolean;
|
package/dist/helpers/colors.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BLUE_DISABLED = exports.BLUE_HOVERED = exports.BLUE = exports.WARNING_COLOR = exports.FAIL_COLOR = exports.BLACK_OPAQUE = exports.BLACK_ALPHA_90 = exports.BLACK_ALPHA_85 = exports.BLACK_ALPHA_80 = exports.BLACK_ALPHA_60 = exports.BLACK_ALPHA_50 = exports.BLACK_ALPHA_40 = exports.BLACK_ALPHA_30 = exports.BLACK_ALPHA_28 = exports.BLACK_ALPHA_10 = exports.WHITE_ALPHA_80 = exports.WHITE_ALPHA_72 = exports.WHITE_ALPHA_70 = exports.WHITE_ALPHA_60 = exports.WHITE_ALPHA_50 = exports.WHITE_ALPHA_45 = exports.WHITE_ALPHA_40 = exports.WHITE_ALPHA_35 = exports.WHITE_ALPHA_30 = exports.WHITE_ALPHA_25 = exports.WHITE_ALPHA_20 = exports.WHITE_ALPHA_15 = exports.WHITE_ALPHA_12 = exports.WHITE_ALPHA_10 = exports.WHITE_ALPHA_08 = exports.WHITE_ALPHA_06 = exports.WHITE_ALPHA_05 = exports.RULER_COLOR = exports.LIGHT_TEXT = exports.SELECTED_BACKGROUND = exports.LIGHT_COLOR = exports.INPUT_BACKGROUND = exports.BACKGROUND__TRANSPARENT = exports.BACKGROUND_HEX = exports.BACKGROUND = exports.BLACK_FULL_HEX = exports.BLACK_HEX = exports.WHITE_FULL_HEX = exports.WHITE_HEX = exports.CURRENT_COLOR_LOWERCASE = exports.CURRENT_COLOR = exports.TRANSPARENT = exports.RED = exports.WHITE = exports.BLACK = void 0;
|
|
4
|
-
exports.HOT_MIDDLEWARE_ERROR_STYLE = exports.NOTIFICATION_BORDER = exports.COLOR_PICKER_HANDLE_SHADOW = exports.COLOR_PICKER_POPUP_SHADOW = exports.SERVER_DISCONNECTED_SHADOW = exports.NOTIFICATION_SHADOW = exports.SHADOW_BLACK_ALPHA_50_TOWARDS_TOP = exports.SHADOW_BLACK_ALPHA_50_TOWARDS_BOTTOM = exports.SHADOW_BLACK = exports.BORDER_TIMELINE_MARQUEE_BLUE = exports.BORDER_TIMELINE_DROP_BLUE = exports.
|
|
5
|
-
exports.getBackgroundFromHoverState = exports.
|
|
4
|
+
exports.FOCUS_BOX_SHADOW = exports.HOT_MIDDLEWARE_WARNING_STYLE = exports.HOT_MIDDLEWARE_ERROR_STYLE = exports.NOTIFICATION_BORDER = exports.COLOR_PICKER_HANDLE_SHADOW = exports.COLOR_PICKER_POPUP_SHADOW = exports.SERVER_DISCONNECTED_SHADOW = exports.NOTIFICATION_SHADOW = exports.SHADOW_BLACK_ALPHA_50_TOWARDS_TOP = exports.SHADOW_BLACK_ALPHA_50_TOWARDS_BOTTOM = exports.SHADOW_BLACK = exports.BORDER_TIMELINE_MARQUEE_BLUE = exports.BORDER_TIMELINE_DROP_BLUE = exports.BORDER_INFO_BLUE = exports.BORDER_WHITE_ALPHA_20 = exports.BORDER_WHITE_ALPHA_12 = exports.BORDER_BLACK_ALPHA_60 = exports.BORDER_BLACK_ALPHA_50 = exports.BORDER_TRANSPARENT_2PX = exports.BORDER_CURRENT_COLOR = exports.BORDER_WHITE_2PX = exports.BORDER_WHITE = exports.BORDER_BLACK = exports.INFO_BLUE_BACKGROUND = exports.EASING_SELECTED_BACKGROUND = exports.TIMELINE_MARQUEE_BLUE_ALPHA_75 = exports.TIMELINE_MARQUEE_BLUE_ALPHA_16 = exports.TIMELINE_DROP_BLUE_ALPHA_75 = exports.TIMELINE_DROP_BLUE_ALPHA_16 = exports.TIMELINE_DROP_BLUE_ALPHA_12 = exports.TIMELINE_PLAYHEAD_COLOR = exports.TIMELINE_BLUE = exports.TIMELINE_SELECTED_LABEL_BACKGROUND_COLOR = exports.TIMELINE_SELECTED_BACKGROUND_COLOR = exports.TIMELINE_NEGATIVE_START_BORDER_COLOR = exports.TIMELINE_NEGATIVE_START_BACKGROUND_COLOR = exports.TIMELINE_BACKGROUND_COLOR = exports.SERVER_DISCONNECTED_BACKGROUND = exports.INFO_BLUE = exports.ERROR_LINK_COLOR = exports.ERROR_CODE_FRAME_LINE_BACKGROUND = exports.ERROR_CODE_FRAME_BACKGROUND = exports.RENDER_STATUS_BACKGROUND = exports.NOTIFICATION_BACKGROUND = exports.KEYBOARD_SHORTCUT_KEY_COLOR = exports.LIGHT_GRAY = exports.TIMELINE_TRACK_SEPARATOR = exports.LINE_COLOR = exports.SELECTED_GUIDE = exports.UNSELECTED_GUIDE = void 0;
|
|
5
|
+
exports.getBackgroundFromHoverState = exports.TIMELINE_VIDEO_GRADIENT = exports.TIMELINE_AUDIO_GRADIENT = exports.LOOPED_INDICATOR_DROP_SHADOW = exports.SELECTED_OUTLINE_UV_DROP_SHADOW = exports.SELECTED_OUTLINE_DROP_SHADOW = exports.ERROR_MESSAGE_MASK_IMAGE = exports.COLOR_PICKER_HUE_GRADIENT = exports.COLOR_PICKER_ALPHA_TRANSPARENT = exports.COLOR_PICKER_SATURATION_BLACK_GRADIENT = exports.COLOR_PICKER_SATURATION_VALUE_GRADIENT = exports.COLOR_PICKER_CHECKER_BACKGROUND_COLOR = exports.COLOR_PICKER_CHECKER_BACKGROUND_IMAGE = exports.CHECKERBOARD_BACKGROUND_IMAGE = void 0;
|
|
6
6
|
exports.BLACK = 'black';
|
|
7
7
|
exports.WHITE = 'white';
|
|
8
8
|
exports.RED = 'red';
|
|
@@ -67,7 +67,6 @@ exports.ERROR_CODE_FRAME_LINE_BACKGROUND = '#121212';
|
|
|
67
67
|
exports.ERROR_LINK_COLOR = '#58a6ff';
|
|
68
68
|
exports.INFO_BLUE = '#60a5fa';
|
|
69
69
|
exports.SERVER_DISCONNECTED_BACKGROUND = '#e74c3c';
|
|
70
|
-
exports.STACK_FRAME_BORDER_BLUE = 'rgb(66, 144, 245)';
|
|
71
70
|
exports.TIMELINE_BACKGROUND_COLOR = '#15181B';
|
|
72
71
|
// WHITE_ALPHA_10 composited over TIMELINE_BACKGROUND_COLOR.
|
|
73
72
|
exports.TIMELINE_NEGATIVE_START_BACKGROUND_COLOR = '#2C2F32';
|
|
@@ -94,7 +93,6 @@ exports.BORDER_BLACK_ALPHA_60 = `1px solid ${exports.BLACK_ALPHA_60}`;
|
|
|
94
93
|
exports.BORDER_WHITE_ALPHA_12 = `1px solid ${exports.WHITE_ALPHA_12}`;
|
|
95
94
|
exports.BORDER_WHITE_ALPHA_20 = `1px solid ${exports.WHITE_ALPHA_20}`;
|
|
96
95
|
exports.BORDER_INFO_BLUE = '1px solid rgba(59, 130, 246, 0.4)';
|
|
97
|
-
exports.BORDER_STACK_FRAME_BLUE = `1px solid ${exports.STACK_FRAME_BORDER_BLUE}`;
|
|
98
96
|
exports.BORDER_TIMELINE_DROP_BLUE = `1px solid ${exports.TIMELINE_DROP_BLUE_ALPHA_75}`;
|
|
99
97
|
exports.BORDER_TIMELINE_MARQUEE_BLUE = `1px solid ${exports.TIMELINE_MARQUEE_BLUE_ALPHA_75}`;
|
|
100
98
|
exports.SHADOW_BLACK = `0 0 4px ${exports.BLACK}`;
|
|
@@ -135,7 +133,6 @@ exports.LOOPED_INDICATOR_DROP_SHADOW = `drop-shadow(0 0 2px ${exports.BLACK_ALPH
|
|
|
135
133
|
`drop-shadow(0 1px 2px ${exports.BLACK_ALPHA_80})`;
|
|
136
134
|
exports.TIMELINE_AUDIO_GRADIENT = 'linear-gradient(rgb(16 171 58), rgb(43 165 63) 60%)';
|
|
137
135
|
exports.TIMELINE_VIDEO_GRADIENT = 'linear-gradient(to top, #8e44ad, #9b59b6)';
|
|
138
|
-
exports.TIMELINE_IMAGE_GRADIENT = 'linear-gradient(to top, #2980b9, #3498db)';
|
|
139
136
|
const getBackgroundFromHoverState = ({ selected, hovered, }) => {
|
|
140
137
|
if (selected) {
|
|
141
138
|
if (hovered) {
|
|
@@ -20,3 +20,8 @@ export declare const splitParentIntoNameAndParent: (name: string | null) => {
|
|
|
20
20
|
*/
|
|
21
21
|
export declare const getKeysToExpand: (initialFolderName: string, parentFolderName: string | null, initial?: string[]) => string[];
|
|
22
22
|
export declare const createFolderTree: (comps: import("remotion").AnyComposition[], folders: TFolder[], foldersExpanded: Record<string, boolean>) => CompositionSelectorItemType[];
|
|
23
|
+
/**
|
|
24
|
+
* Sorts the tree returned by createFolderTree by name, on every level.
|
|
25
|
+
* Folders stay grouped above compositions, and both groups are sorted.
|
|
26
|
+
*/
|
|
27
|
+
export declare const sortFolderTreeAlphabetically: (items: CompositionSelectorItemType[]) => CompositionSelectorItemType[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createFolderTree = exports.getKeysToExpand = exports.splitParentIntoNameAndParent = exports.buildAssetFolderStructure = void 0;
|
|
3
|
+
exports.sortFolderTreeAlphabetically = exports.createFolderTree = exports.getKeysToExpand = exports.splitParentIntoNameAndParent = exports.buildAssetFolderStructure = void 0;
|
|
4
4
|
const persist_open_folders_1 = require("./persist-open-folders");
|
|
5
|
+
const sort_by_nonce_history_1 = require("./sort-by-nonce-history");
|
|
5
6
|
const buildAssetFolderStructure = (files, parentFolderName, foldersExpanded) => {
|
|
6
7
|
const notInFolder = files.filter((f) => !f.name.includes('/'));
|
|
7
8
|
const inFolder = files.filter((f) => f.name.includes('/'));
|
|
@@ -152,6 +153,43 @@ const createFolderTree = (comps, folders, foldersExpanded) => {
|
|
|
152
153
|
const list = findItemListToPush(items, item.folderName, item.parentFolderName);
|
|
153
154
|
list.push(toPush);
|
|
154
155
|
}
|
|
155
|
-
|
|
156
|
+
const sortTreeItems = (treeItems) => {
|
|
157
|
+
return (0, sort_by_nonce_history_1.sortItemsByNonceHistory)(treeItems.map((item) => ({
|
|
158
|
+
item,
|
|
159
|
+
nonce: item.type === 'folder' ? item.folder.nonce : item.composition.nonce,
|
|
160
|
+
}))).map(({ item }) => {
|
|
161
|
+
if (item.type === 'composition') {
|
|
162
|
+
return item;
|
|
163
|
+
}
|
|
164
|
+
return {
|
|
165
|
+
...item,
|
|
166
|
+
items: sortTreeItems(item.items),
|
|
167
|
+
};
|
|
168
|
+
});
|
|
169
|
+
};
|
|
170
|
+
return sortTreeItems(items);
|
|
156
171
|
};
|
|
157
172
|
exports.createFolderTree = createFolderTree;
|
|
173
|
+
/**
|
|
174
|
+
* Sorts the tree returned by createFolderTree by name, on every level.
|
|
175
|
+
* Folders stay grouped above compositions, and both groups are sorted.
|
|
176
|
+
*/
|
|
177
|
+
const sortFolderTreeAlphabetically = (items) => {
|
|
178
|
+
return items
|
|
179
|
+
.map((item) => {
|
|
180
|
+
if (item.type !== 'folder') {
|
|
181
|
+
return item;
|
|
182
|
+
}
|
|
183
|
+
return { ...item, items: (0, exports.sortFolderTreeAlphabetically)(item.items) };
|
|
184
|
+
})
|
|
185
|
+
.sort((a, b) => {
|
|
186
|
+
if (a.type !== b.type) {
|
|
187
|
+
return a.type === 'folder' ? -1 : 1;
|
|
188
|
+
}
|
|
189
|
+
const aName = a.type === 'folder' ? a.folderName : a.composition.id;
|
|
190
|
+
const bName = b.type === 'folder' ? b.folderName : b.composition.id;
|
|
191
|
+
// `numeric` so that Scene2 comes before Scene10.
|
|
192
|
+
return aName.localeCompare(bName, undefined, { numeric: true });
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
exports.sortFolderTreeAlphabetically = sortFolderTreeAlphabetically;
|
|
@@ -2,6 +2,14 @@ type FileLocation = {
|
|
|
2
2
|
readonly source: string | null;
|
|
3
3
|
readonly line: number | null;
|
|
4
4
|
};
|
|
5
|
+
export type RelativeFileLocation = {
|
|
6
|
+
readonly filename: string;
|
|
7
|
+
readonly line: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const getRelativeFileLocation: ({ location, root, }: {
|
|
10
|
+
readonly location: FileLocation | null;
|
|
11
|
+
readonly root: string;
|
|
12
|
+
}) => RelativeFileLocation | null;
|
|
5
13
|
export declare const formatFileLocation: ({ location, root, }: {
|
|
6
14
|
readonly location: FileLocation | null;
|
|
7
15
|
readonly root: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.formatContextForAgents = exports.formatFileLocation = void 0;
|
|
3
|
+
exports.formatContextForAgents = exports.formatFileLocation = exports.getRelativeFileLocation = void 0;
|
|
4
4
|
const normalizeSlashes = (path) => path.replace(/\\/g, '/');
|
|
5
5
|
const stripTrailingSlashes = (path) => path.replace(/\/+$/, '');
|
|
6
6
|
const stripLeadingDotSlash = (path) => path.replace(/^\.\/+/, '');
|
|
7
|
-
const
|
|
7
|
+
const getRelativeFileLocation = ({ location, root, }) => {
|
|
8
8
|
if (!(location === null || location === void 0 ? void 0 : location.source) || location.line === null) {
|
|
9
9
|
return null;
|
|
10
10
|
}
|
|
@@ -22,7 +22,18 @@ const formatFileLocation = ({ location, root, }) => {
|
|
|
22
22
|
const relativeSource = sourceIsInsideRoot
|
|
23
23
|
? source.slice(normalizedRoot.length + 1)
|
|
24
24
|
: source;
|
|
25
|
-
return
|
|
25
|
+
return {
|
|
26
|
+
filename: stripLeadingDotSlash(relativeSource),
|
|
27
|
+
line: location.line,
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
exports.getRelativeFileLocation = getRelativeFileLocation;
|
|
31
|
+
const formatFileLocation = ({ location, root, }) => {
|
|
32
|
+
const relativeLocation = (0, exports.getRelativeFileLocation)({ location, root });
|
|
33
|
+
if (relativeLocation === null) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
return `${relativeLocation.filename}:${relativeLocation.line}`;
|
|
26
37
|
};
|
|
27
38
|
exports.formatFileLocation = formatFileLocation;
|
|
28
39
|
const formatContextForAgents = ({ name, location, root, }) => {
|
|
@@ -86,7 +86,7 @@ const getAssetMetadata = async (canvasContent, addTime) => {
|
|
|
86
86
|
}
|
|
87
87
|
const fetchedAt = Date.now();
|
|
88
88
|
const srcWithTime = addTime ? (0, add_asset_cache_bust_1.addAssetCacheBust)({ fetchedAt, src }) : src;
|
|
89
|
-
const fileType = (0, get_preview_file_type_1.getPreviewFileType)(src);
|
|
89
|
+
const fileType = (0, get_preview_file_type_1.getPreviewFileType)(canvasContent.type === 'asset' ? canvasContent.asset : src);
|
|
90
90
|
if (fileType === 'video' || fileType === 'audio') {
|
|
91
91
|
const mediaMetadata = await (0, use_media_metadata_1.getMediaMetadata)(srcWithTime);
|
|
92
92
|
if (mediaMetadata === null) {
|
|
@@ -4,4 +4,9 @@ import type { OriginalPosition } from '../error-overlay/react-overlay/utils/get-
|
|
|
4
4
|
export declare const getGitSourceName: (gitSource: GitSource) => string;
|
|
5
5
|
export declare const getGitSourceBranchUrl: (gitSource: GitSource) => string;
|
|
6
6
|
export declare const getGitRefUrl: (gitSource: GitSource, originalLocation: OriginalPosition, remotionRoot: string) => string;
|
|
7
|
+
export declare const hasReadOnlyGitSource: () => boolean;
|
|
8
|
+
export declare const openGitSource: ({ folder, location, }: {
|
|
9
|
+
folder: boolean;
|
|
10
|
+
location: OriginalPosition | null;
|
|
11
|
+
}) => void;
|
|
7
12
|
export declare const getGitMenuItem: () => ComboboxValue | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getGitMenuItem = exports.getGitRefUrl = exports.getGitSourceBranchUrl = exports.getGitSourceName = void 0;
|
|
3
|
+
exports.getGitMenuItem = exports.openGitSource = exports.hasReadOnlyGitSource = exports.getGitRefUrl = exports.getGitSourceBranchUrl = exports.getGitSourceName = void 0;
|
|
4
4
|
const getGitSourceName = (gitSource) => {
|
|
5
5
|
if (gitSource.type === 'github') {
|
|
6
6
|
return 'GitHub';
|
|
@@ -52,6 +52,20 @@ const getGitRefUrl = (gitSource, originalLocation, remotionRoot) => {
|
|
|
52
52
|
throw new Error('Unknown git source type');
|
|
53
53
|
};
|
|
54
54
|
exports.getGitRefUrl = getGitRefUrl;
|
|
55
|
+
const hasReadOnlyGitSource = () => {
|
|
56
|
+
return Boolean(window.remotion_isReadOnlyStudio && window.remotion_gitSource);
|
|
57
|
+
};
|
|
58
|
+
exports.hasReadOnlyGitSource = hasReadOnlyGitSource;
|
|
59
|
+
const openGitSource = ({ folder, location, }) => {
|
|
60
|
+
const gitSource = window.remotion_gitSource;
|
|
61
|
+
if (!gitSource) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
window.open(folder || !location
|
|
65
|
+
? (0, exports.getGitSourceBranchUrl)(gitSource)
|
|
66
|
+
: (0, exports.getGitRefUrl)(gitSource, location, window.remotion_cwd), '_blank');
|
|
67
|
+
};
|
|
68
|
+
exports.openGitSource = openGitSource;
|
|
55
69
|
const getGitMenuItem = () => {
|
|
56
70
|
if (!window.remotion_gitSource) {
|
|
57
71
|
return null;
|
|
@@ -11,10 +11,18 @@ export declare const clampTimelineZoom: ({ zoom, durationInFrames, }: {
|
|
|
11
11
|
zoom: number;
|
|
12
12
|
durationInFrames: number;
|
|
13
13
|
}) => number;
|
|
14
|
+
export declare const timelineZoomToNormalized: ({ zoom, maxZoom, }: {
|
|
15
|
+
zoom: number;
|
|
16
|
+
maxZoom: number;
|
|
17
|
+
}) => number;
|
|
14
18
|
export declare const timelineZoomToSliderValue: ({ zoom, maxZoom, }: {
|
|
15
19
|
zoom: number;
|
|
16
20
|
maxZoom: number;
|
|
17
21
|
}) => number;
|
|
22
|
+
export declare const normalizedToTimelineZoom: ({ normalized, maxZoom, }: {
|
|
23
|
+
normalized: number;
|
|
24
|
+
maxZoom: number;
|
|
25
|
+
}) => number;
|
|
18
26
|
export declare const sliderValueToTimelineZoom: ({ sliderValue, maxZoom, }: {
|
|
19
27
|
sliderValue: number;
|
|
20
28
|
maxZoom: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TIMELINE_ZOOM_SLIDER_PROPS = exports.sliderValueToTimelineZoom = exports.timelineZoomToSliderValue = exports.clampTimelineZoom = exports.getTimelineMaxZoom = exports.TIMELINE_FRAMES_VISIBLE_AT_MAX_ZOOM = exports.TIMELINE_MAX_ZOOM_FLOOR = exports.TIMELINE_MIN_ZOOM = void 0;
|
|
3
|
+
exports.TIMELINE_ZOOM_SLIDER_PROPS = exports.sliderValueToTimelineZoom = exports.normalizedToTimelineZoom = exports.timelineZoomToSliderValue = exports.timelineZoomToNormalized = exports.clampTimelineZoom = exports.getTimelineMaxZoom = exports.TIMELINE_FRAMES_VISIBLE_AT_MAX_ZOOM = exports.TIMELINE_MAX_ZOOM_FLOOR = exports.TIMELINE_MIN_ZOOM = void 0;
|
|
4
4
|
exports.TIMELINE_MIN_ZOOM = 1;
|
|
5
5
|
exports.TIMELINE_MAX_ZOOM_FLOOR = 5;
|
|
6
6
|
/**
|
|
@@ -20,23 +20,34 @@ const clampTimelineZoom = ({ zoom, durationInFrames, }) => {
|
|
|
20
20
|
return Math.round(clamped * 10) / 10;
|
|
21
21
|
};
|
|
22
22
|
exports.clampTimelineZoom = clampTimelineZoom;
|
|
23
|
-
const
|
|
23
|
+
const timelineZoomToNormalized = ({ zoom, maxZoom, }) => {
|
|
24
24
|
if (maxZoom <= exports.TIMELINE_MIN_ZOOM) {
|
|
25
25
|
return 0;
|
|
26
26
|
}
|
|
27
27
|
const clampedZoom = Math.min(maxZoom, Math.max(exports.TIMELINE_MIN_ZOOM, zoom));
|
|
28
|
-
const
|
|
28
|
+
const normalized = Math.log(clampedZoom / exports.TIMELINE_MIN_ZOOM) /
|
|
29
29
|
Math.log(maxZoom / exports.TIMELINE_MIN_ZOOM);
|
|
30
|
-
return Math.round(
|
|
30
|
+
return (Math.round(normalized * TIMELINE_ZOOM_SLIDER_MAX) / TIMELINE_ZOOM_SLIDER_MAX);
|
|
31
|
+
};
|
|
32
|
+
exports.timelineZoomToNormalized = timelineZoomToNormalized;
|
|
33
|
+
const timelineZoomToSliderValue = ({ zoom, maxZoom, }) => {
|
|
34
|
+
return Math.round((0, exports.timelineZoomToNormalized)({ zoom, maxZoom }) * TIMELINE_ZOOM_SLIDER_MAX);
|
|
31
35
|
};
|
|
32
36
|
exports.timelineZoomToSliderValue = timelineZoomToSliderValue;
|
|
33
|
-
const
|
|
37
|
+
const normalizedToTimelineZoom = ({ normalized, maxZoom, }) => {
|
|
34
38
|
if (maxZoom <= exports.TIMELINE_MIN_ZOOM) {
|
|
35
39
|
return exports.TIMELINE_MIN_ZOOM;
|
|
36
40
|
}
|
|
37
|
-
const t =
|
|
41
|
+
const t = Math.min(1, Math.max(0, normalized));
|
|
38
42
|
return exports.TIMELINE_MIN_ZOOM * (maxZoom / exports.TIMELINE_MIN_ZOOM) ** t;
|
|
39
43
|
};
|
|
44
|
+
exports.normalizedToTimelineZoom = normalizedToTimelineZoom;
|
|
45
|
+
const sliderValueToTimelineZoom = ({ sliderValue, maxZoom, }) => {
|
|
46
|
+
return (0, exports.normalizedToTimelineZoom)({
|
|
47
|
+
normalized: sliderValue / TIMELINE_ZOOM_SLIDER_MAX,
|
|
48
|
+
maxZoom,
|
|
49
|
+
});
|
|
50
|
+
};
|
|
40
51
|
exports.sliderValueToTimelineZoom = sliderValueToTimelineZoom;
|
|
41
52
|
exports.TIMELINE_ZOOM_SLIDER_PROPS = {
|
|
42
53
|
min: 0,
|
|
@@ -3,6 +3,7 @@ export declare const HOVERABLE_CLASS_NAME = "__remotion-hoverable";
|
|
|
3
3
|
export declare const HOVER_GROUP_CLASS_NAME = "__remotion-hover-group";
|
|
4
4
|
export declare const HOVER_GROUP_REVEAL_CLASS_NAME = "__remotion-hover-group-reveal";
|
|
5
5
|
export declare const FOCUS_VISIBLE_ONLY_CLASS_NAME = "__remotion-focus-visible-only";
|
|
6
|
+
export declare const NO_HOVER_BACKGROUND_STYLE: React.CSSProperties;
|
|
6
7
|
export declare const hoverableStyle: ({ idleBackground, hoverBackground, idleColor, hoverColor, }: {
|
|
7
8
|
idleBackground: string;
|
|
8
9
|
hoverBackground: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeHoverableCSS = exports.hoverableStyle = exports.FOCUS_VISIBLE_ONLY_CLASS_NAME = exports.HOVER_GROUP_REVEAL_CLASS_NAME = exports.HOVER_GROUP_CLASS_NAME = exports.HOVERABLE_CLASS_NAME = void 0;
|
|
3
|
+
exports.makeHoverableCSS = exports.hoverableStyle = exports.NO_HOVER_BACKGROUND_STYLE = exports.FOCUS_VISIBLE_ONLY_CLASS_NAME = exports.HOVER_GROUP_REVEAL_CLASS_NAME = exports.HOVER_GROUP_CLASS_NAME = exports.HOVERABLE_CLASS_NAME = void 0;
|
|
4
4
|
const colors_1 = require("./colors");
|
|
5
5
|
// Purely visual hover styling must be driven by CSS `:hover` rather than
|
|
6
6
|
// React state: When the Studio runs in an <iframe> (like in Browser Studio),
|
|
@@ -16,6 +16,9 @@ const BG_VARIABLE = '--remotion-hoverable-bg';
|
|
|
16
16
|
const HOVER_BG_VARIABLE = '--remotion-hoverable-hover-bg';
|
|
17
17
|
const COLOR_VARIABLE = '--remotion-hoverable-color';
|
|
18
18
|
const HOVER_COLOR_VARIABLE = '--remotion-hoverable-hover-color';
|
|
19
|
+
exports.NO_HOVER_BACKGROUND_STYLE = {
|
|
20
|
+
[HOVER_BG_VARIABLE]: colors_1.TRANSPARENT,
|
|
21
|
+
};
|
|
19
22
|
// To disable the hover effect (e.g. for a disabled control), pass the idle
|
|
20
23
|
// values as the hover values.
|
|
21
24
|
const hoverableStyle = ({ idleBackground, hoverBackground, idleColor, hoverColor, }) => {
|
|
@@ -47,18 +50,23 @@ const makeHoverableCSS = () => `
|
|
|
47
50
|
}
|
|
48
51
|
|
|
49
52
|
@media (hover: hover) {
|
|
50
|
-
${hoverable}:hover
|
|
51
|
-
${hoverGroup}:hover ${hoverable} {
|
|
53
|
+
${hoverable}:hover {
|
|
52
54
|
background-color: var(${HOVER_BG_VARIABLE}, var(${BG_VARIABLE}, ${colors_1.TRANSPARENT}));
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
${hoverable}:hover,
|
|
56
|
-
${hoverable}:hover
|
|
57
|
-
${hoverGroup}:hover ${hoverable},
|
|
58
|
-
${hoverGroup}:hover ${hoverable} * {
|
|
58
|
+
${hoverable}:hover * {
|
|
59
59
|
color: var(${HOVER_COLOR_VARIABLE}, var(${COLOR_VARIABLE}, inherit));
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
/* An outer hoverable must not put a nested inline action into its hover
|
|
63
|
+
state. The nested action should only use its hover color when the
|
|
64
|
+
pointer is over the action itself. */
|
|
65
|
+
${hoverable}:hover ${hoverable}:not(:hover),
|
|
66
|
+
${hoverable}:hover ${hoverable}:not(:hover) * {
|
|
67
|
+
color: var(${COLOR_VARIABLE}, inherit);
|
|
68
|
+
}
|
|
69
|
+
|
|
62
70
|
${hoverGroup} ${reveal} {
|
|
63
71
|
opacity: 0;
|
|
64
72
|
}
|
|
@@ -1,8 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.openCompositionComponentInEditor = exports.preloadCompositionComponentInfo = exports.loadCompositionComponentInfo = exports.useCachedCompositionComponentInfo = exports.getCachedCompositionComponentInfo = exports.subscribeToCompositionComponentInfo = exports.openOriginalPositionInEditorAtProperty = exports.openOriginalPositionInEditor = exports.openInGitClient = exports.openInTerminal = exports.openInCodingAgent = exports.openInEditor = void 0;
|
|
4
37
|
const react_1 = require("react");
|
|
5
38
|
const call_api_1 = require("../components/call-api");
|
|
39
|
+
const get_stack_1 = require("../components/Timeline/TimelineStack/get-stack");
|
|
6
40
|
const browser_studio_operations_1 = require("./browser-studio-operations");
|
|
7
41
|
const openInEditor = (stack, editorId) => {
|
|
8
42
|
const { originalFileName, originalLineNumber, originalColumnNumber, originalFunctionName, originalScriptCode, } = stack;
|
|
@@ -125,7 +159,23 @@ const loadCompositionComponentInfo = async ({ compositionFile, compositionId, })
|
|
|
125
159
|
const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
|
|
126
160
|
const body = browserStudioOperations
|
|
127
161
|
? await browserStudioOperations.getCompositionComponentInfo(request)
|
|
128
|
-
:
|
|
162
|
+
: typeof window !== 'undefined' && window.remotion_isReadOnlyStudio
|
|
163
|
+
? await (async () => {
|
|
164
|
+
const files = (0, get_stack_1.getSourceMapFilesForSource)(compositionFile);
|
|
165
|
+
if (files === null) {
|
|
166
|
+
throw new Error(`Could not find source map contents for ${compositionFile}`);
|
|
167
|
+
}
|
|
168
|
+
const { resolveCompositionComponentLocation } = await Promise.resolve().then(() => __importStar(require('@remotion/studio-codemods/resolve-composition-component-location')));
|
|
169
|
+
return {
|
|
170
|
+
canAddSequence: false,
|
|
171
|
+
location: resolveCompositionComponentLocation({
|
|
172
|
+
compositionFile,
|
|
173
|
+
compositionId,
|
|
174
|
+
project: { files, rootDir: '.' },
|
|
175
|
+
}),
|
|
176
|
+
};
|
|
177
|
+
})()
|
|
178
|
+
: await (0, call_api_1.callApi)('/api/composition-component-info', request);
|
|
129
179
|
const result = {
|
|
130
180
|
location: body.location,
|
|
131
181
|
canAddSequence: body.canAddSequence,
|
|
@@ -62,7 +62,6 @@ export declare const getExpandedTrackHeight: ({ sequence, nodePathInfo, getIsExp
|
|
|
62
62
|
export declare const TIMELINE_LAYER_FILMSTRIP_HEIGHT = 26;
|
|
63
63
|
export declare const TIMELINE_VIDEO_INFO_WAVEFORM_HEIGHT = 17;
|
|
64
64
|
export declare const TIMELINE_LAYER_HEIGHT_VIDEO: number;
|
|
65
|
-
export declare const TIMELINE_LAYER_HEIGHT_IMAGE = 26;
|
|
66
65
|
export declare const TIMELINE_LAYER_HEIGHT_AUDIO = 34;
|
|
67
66
|
export declare const TIMELINE_LAYER_HEIGHT_DEFAULT = 21;
|
|
68
67
|
export declare const TIMELINE_LIST_ITEM_ROW_HEIGHT = 21;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTimelineLayerHeight = exports.TIMELINE_LIST_ITEM_ROW_HEIGHT = exports.TIMELINE_LAYER_HEIGHT_DEFAULT = exports.TIMELINE_LAYER_HEIGHT_AUDIO = exports.
|
|
3
|
+
exports.getTimelineLayerHeight = exports.TIMELINE_LIST_ITEM_ROW_HEIGHT = exports.TIMELINE_LAYER_HEIGHT_DEFAULT = exports.TIMELINE_LAYER_HEIGHT_AUDIO = exports.TIMELINE_LAYER_HEIGHT_VIDEO = exports.TIMELINE_VIDEO_INFO_WAVEFORM_HEIGHT = exports.TIMELINE_LAYER_FILMSTRIP_HEIGHT = exports.getExpandedTrackHeight = exports.getTreeRowHeight = exports.flattenVisibleTreeNodes = exports.buildTimelineTree = exports.EXPANDED_SECTION_PADDING_RIGHT = exports.TREE_GROUP_ROW_HEIGHT = exports.TIMELINE_TRACK_EXPANDED_HEIGHT = exports.TIMELINE_ITEM_BORDER_BOTTOM = exports.TIMELINE_BORDER = exports.TIMELINE_PADDING = exports.SCHEMA_FIELD_ROW_HEIGHT = exports.getSchemaFieldGroup = exports.getFieldsToShow = exports.getEffectFieldsToShow = exports.SCHEMA_FIELD_GROUPS = void 0;
|
|
4
4
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
5
5
|
const studio_shared_2 = require("@remotion/studio-shared");
|
|
6
6
|
Object.defineProperty(exports, "SCHEMA_FIELD_GROUPS", { enumerable: true, get: function () { return studio_shared_2.SCHEMA_FIELD_GROUPS; } });
|
|
@@ -162,7 +162,6 @@ exports.TIMELINE_LAYER_FILMSTRIP_HEIGHT = 26;
|
|
|
162
162
|
// The waveform stripe rendered underneath the filmstrip in TimelineVideoInfo.
|
|
163
163
|
exports.TIMELINE_VIDEO_INFO_WAVEFORM_HEIGHT = 17;
|
|
164
164
|
exports.TIMELINE_LAYER_HEIGHT_VIDEO = 2 + exports.TIMELINE_LAYER_FILMSTRIP_HEIGHT + exports.TIMELINE_VIDEO_INFO_WAVEFORM_HEIGHT;
|
|
165
|
-
exports.TIMELINE_LAYER_HEIGHT_IMAGE = 26;
|
|
166
165
|
exports.TIMELINE_LAYER_HEIGHT_AUDIO = 34;
|
|
167
166
|
exports.TIMELINE_LAYER_HEIGHT_DEFAULT = 21;
|
|
168
167
|
// The horizontal row inside a timeline list item (eye + arrow + label).
|
|
@@ -171,9 +170,6 @@ const getTimelineLayerHeight = (type) => {
|
|
|
171
170
|
if (type === 'video') {
|
|
172
171
|
return exports.TIMELINE_LAYER_HEIGHT_VIDEO;
|
|
173
172
|
}
|
|
174
|
-
if (type === 'image') {
|
|
175
|
-
return exports.TIMELINE_LAYER_HEIGHT_IMAGE;
|
|
176
|
-
}
|
|
177
173
|
if (type === 'audio') {
|
|
178
174
|
return exports.TIMELINE_LAYER_HEIGHT_AUDIO;
|
|
179
175
|
}
|
|
@@ -1,25 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRoute = exports.reloadUrl = exports.clearUrl = exports.replaceUrl = exports.pushUrl = exports.getUrlForRoute = void 0;
|
|
3
|
+
exports.getRoute = exports.reloadUrl = exports.clearUrl = exports.replaceUrl = exports.pushUrl = exports.getUrlForRoute = exports.getNavigationWindow = void 0;
|
|
4
4
|
const getUrlHandlingType = () => {
|
|
5
5
|
if (window.remotion_isReadOnlyStudio || window.remotion_browserStudio) {
|
|
6
6
|
return 'query-string';
|
|
7
7
|
}
|
|
8
8
|
return 'spa';
|
|
9
9
|
};
|
|
10
|
+
const getNavigationWindow = () => {
|
|
11
|
+
if (window.remotion_browserStudio && window.parent !== window) {
|
|
12
|
+
return window.parent;
|
|
13
|
+
}
|
|
14
|
+
return window;
|
|
15
|
+
};
|
|
16
|
+
exports.getNavigationWindow = getNavigationWindow;
|
|
10
17
|
const getUrlForRoute = (route) => {
|
|
11
18
|
if (getUrlHandlingType() === 'query-string') {
|
|
12
|
-
return `${
|
|
19
|
+
return `${(0, exports.getNavigationWindow)().location.pathname}?${route}`;
|
|
13
20
|
}
|
|
14
21
|
return route;
|
|
15
22
|
};
|
|
16
23
|
exports.getUrlForRoute = getUrlForRoute;
|
|
17
24
|
const pushUrl = (url) => {
|
|
18
|
-
|
|
25
|
+
(0, exports.getNavigationWindow)().history.pushState({}, 'Studio', (0, exports.getUrlForRoute)(url));
|
|
19
26
|
};
|
|
20
27
|
exports.pushUrl = pushUrl;
|
|
21
28
|
const replaceUrl = (url) => {
|
|
22
|
-
|
|
29
|
+
(0, exports.getNavigationWindow)().history.replaceState({}, 'Studio', (0, exports.getUrlForRoute)(url));
|
|
23
30
|
};
|
|
24
31
|
exports.replaceUrl = replaceUrl;
|
|
25
32
|
const clearUrl = () => {
|
|
@@ -32,7 +39,7 @@ const reloadUrl = () => {
|
|
|
32
39
|
exports.reloadUrl = reloadUrl;
|
|
33
40
|
const getRoute = () => {
|
|
34
41
|
if (getUrlHandlingType() === 'query-string') {
|
|
35
|
-
const route =
|
|
42
|
+
const route = (0, exports.getNavigationWindow)().location.search.substring(1);
|
|
36
43
|
return route.startsWith('/') ? route : '';
|
|
37
44
|
}
|
|
38
45
|
return window.location.pathname;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnterIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
// Font Awesome Pro v7.3.1, Copyright 2026 Fonticons, Inc.
|
|
6
|
+
// https://fontawesome.com/license (Commercial License)
|
|
7
|
+
const EnterIcon = ({ color, ...props }) => {
|
|
8
|
+
return (jsx_runtime_1.jsx("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 640 640", children: jsx_runtime_1.jsx("path", { fill: color, d: "M544 144C544 135.2 551.2 128 560 128C568.8 128 576 135.2 576 144L576 240C576 293 533 336 480 336L118.6 336L235.3 452.7C241.5 458.9 241.5 469.1 235.3 475.3C229.1 481.5 218.9 481.5 212.7 475.3L68.7 331.3C65.7 328.3 64 324.2 64 320C64 315.8 65.7 311.7 68.7 308.7L212.7 164.7C218.9 158.5 229.1 158.5 235.3 164.7C241.5 170.9 241.5 181.1 235.3 187.3L118.6 304L480 304C515.3 304 544 275.3 544 240L544 144z" }) }));
|
|
9
|
+
};
|
|
10
|
+
exports.EnterIcon = EnterIcon;
|
package/dist/renderEntry.js
CHANGED
|
@@ -202,9 +202,11 @@ const renderContent = (Root) => {
|
|
|
202
202
|
}
|
|
203
203
|
renderToDOM(jsx_runtime_1.jsx("div", { children: jsx_runtime_1.jsx(DelayedSpinner, {}) }));
|
|
204
204
|
Promise.resolve().then(() => __importStar(require('./internals'))).then(({ StudioInternals }) => {
|
|
205
|
+
var _a;
|
|
205
206
|
window.remotion_isStudio = true;
|
|
206
207
|
window.remotion_isReadOnlyStudio = true;
|
|
207
208
|
window.remotion_inputProps = '{}';
|
|
209
|
+
(_a = window.remotion_enableSequenceStackTraces) === null || _a === void 0 ? void 0 : _a.call(window);
|
|
208
210
|
renderToDOM(jsx_runtime_1.jsx(StudioInternals.Studio, { readOnly: true, rootComponent: Root }));
|
|
209
211
|
})
|
|
210
212
|
.catch((err) => {
|
package/dist/state/folders.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ExpandedFoldersState } from '../helpers/persist-open-folders';
|
|
3
|
+
export type CompositionSortOrder = 'registration' | 'alphabetical';
|
|
3
4
|
type TFolderContext = {
|
|
4
5
|
compositionFoldersExpanded: ExpandedFoldersState;
|
|
5
6
|
setCompositionFoldersExpanded: React.Dispatch<React.SetStateAction<ExpandedFoldersState>>;
|
|
6
7
|
assetFoldersExpanded: ExpandedFoldersState;
|
|
7
8
|
setAssetFoldersExpanded: React.Dispatch<React.SetStateAction<ExpandedFoldersState>>;
|
|
9
|
+
compositionSortOrder: CompositionSortOrder;
|
|
10
|
+
setCompositionSortOrder: (sortOrder: CompositionSortOrder) => void;
|
|
8
11
|
};
|
|
9
12
|
export declare const FolderContext: React.Context<TFolderContext>;
|
|
10
13
|
export declare const FolderContextProvider: React.FC<{
|