@remotion/studio 4.0.525 → 4.0.526
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/focus-default-props-path.js +7 -1
- package/dist/api/restart-studio.d.ts +1 -1
- package/dist/api/restart-studio.js +1 -1
- package/dist/components/AgentPrompt.d.ts +6 -0
- package/dist/components/AgentPrompt.js +107 -0
- package/dist/components/AssetFileIcon.js +2 -0
- package/dist/components/AssetSelectorItem.d.ts +1 -23
- package/dist/components/AssetSelectorItem.js +10 -200
- package/dist/components/Canvas.js +21 -18
- package/dist/components/CaptionInspector.js +9 -3
- package/dist/{error-overlay/remotion-overlay → components}/CodeFrame.d.ts +2 -0
- package/dist/components/CodeFrame.js +77 -0
- package/dist/components/CompositionSelectorItem.js +6 -17
- package/dist/components/CurrentAsset.js +5 -4
- package/dist/components/ElementInstallConfirmation.js +69 -38
- package/dist/components/FilePreview.js +4 -0
- package/dist/components/FixComputedValueModal.js +64 -96
- package/dist/components/GenerateWithAgentModal.d.ts +9 -0
- package/dist/components/GenerateWithAgentModal.js +39 -0
- package/dist/components/InlineEditableTitle.js +2 -0
- package/dist/components/InspectorOpenInEditor.js +8 -4
- package/dist/components/InspectorPanel/CollapsibleInspectorSection.d.ts +7 -0
- package/dist/components/InspectorPanel/CollapsibleInspectorSection.js +14 -0
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.d.ts +1 -1
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +19 -8
- package/dist/components/InspectorPanel/CompositionInspector.js +30 -13
- package/dist/components/InspectorPanel/CompositionMetadata.js +3 -0
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +6 -12
- package/dist/components/InspectorPanel/ElementLibraryButton.js +1 -0
- package/dist/components/InspectorPanel/GuideInspector.js +2 -3
- package/dist/components/InspectorPanel/KeyframeSettings.js +5 -6
- package/dist/components/InspectorPanel/MultiSequenceInspector.js +2 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +4 -3
- package/dist/components/InspectorPanel/common.d.ts +4 -0
- package/dist/components/InspectorPanel/common.js +14 -2
- package/dist/components/InspectorPanel/styles.d.ts +0 -3
- package/dist/components/InspectorPanel/styles.js +1 -27
- package/dist/components/InspectorPanel/use-composition-actions.d.ts +2 -0
- package/dist/components/InspectorPanel/use-composition-actions.js +15 -0
- package/dist/components/InspectorPanel/use-inspector-section-expanded.d.ts +1 -0
- package/dist/components/InspectorPanel/use-inspector-section-expanded.js +21 -0
- package/dist/components/InspectorSequenceSection.js +44 -35
- package/dist/components/InspectorSourceLocation.js +1 -0
- package/dist/components/KeyboardShortcutsSettings.js +12 -4
- package/dist/components/LutPreview.d.ts +4 -0
- package/dist/components/LutPreview.js +192 -0
- package/dist/components/MenuCompositionName.js +4 -9
- package/dist/components/Modals.js +3 -6
- package/dist/components/ModelsSettings.js +15 -4
- package/dist/components/Notifications/NotificationCenter.d.ts +0 -1
- package/dist/components/Notifications/NotificationCenter.js +1 -22
- package/dist/components/QuickSwitcher/QuickSwitcherResult.js +4 -9
- package/dist/components/RenderModal/SchemaEditor/scroll-to-default-props-path.d.ts +1 -0
- package/dist/components/RenderModal/SchemaEditor/scroll-to-default-props-path.js +2 -1
- package/dist/components/RenderModal/WebRenderModal.js +10 -2
- package/dist/components/RendersTab.js +2 -0
- package/dist/components/SelectedOutlineElement.js +6 -0
- package/dist/components/SettingsButton.js +11 -2
- package/dist/components/SettingsModal.d.ts +1 -2
- package/dist/components/SettingsModal.js +24 -6
- package/dist/components/SettingsModalFooter.js +17 -3
- package/dist/components/SkillsSettings.d.ts +5 -0
- package/dist/components/SkillsSettings.js +29 -26
- package/dist/components/Timeline/Timeline.js +10 -11
- package/dist/components/Timeline/TimelineAssetField.js +81 -51
- package/dist/components/Timeline/TimelineHeightContainer.js +11 -1
- package/dist/components/Timeline/TimelineKeyframeControls.js +15 -1
- package/dist/components/Timeline/TimelineLayerChildren.d.ts +3 -3
- package/dist/components/Timeline/TimelineLayerChildren.js +11 -9
- package/dist/components/Timeline/TimelineLayerEye.d.ts +1 -1
- package/dist/components/Timeline/TimelineLayerEye.js +6 -3
- package/dist/components/Timeline/TimelineList.js +9 -3
- package/dist/components/Timeline/TimelineSchemaField.js +2 -6
- package/dist/components/Timeline/TimelineSelection.d.ts +14 -3
- package/dist/components/Timeline/TimelineSelection.js +91 -49
- package/dist/components/Timeline/TimelineSequence.js +2 -2
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +2 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +17 -13
- package/dist/components/Timeline/TimelineVirtualization.d.ts +3 -3
- package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +3 -1
- package/dist/components/Timeline/get-sequence-context-menu-items.js +130 -45
- package/dist/components/Timeline/normalize-font-weight-for-keyframe.d.ts +1 -0
- package/dist/components/Timeline/normalize-font-weight-for-keyframe.js +19 -0
- package/dist/components/Timeline/timeline-display-groups.d.ts +9 -0
- package/dist/components/Timeline/timeline-display-groups.js +66 -0
- package/dist/components/Timeline/use-timeline-asset-drop.js +21 -21
- package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +2 -1
- package/dist/components/Timeline/use-timeline-expanded-tree.js +1 -2
- package/dist/components/UpdateStatusContext.d.ts +2 -2
- package/dist/components/UpdateStatusContext.js +6 -7
- package/dist/components/UpdatesSettings.js +6 -6
- package/dist/components/WebMcp.js +40 -41
- package/dist/components/asset-context-menu.d.ts +32 -0
- package/dist/components/asset-context-menu.js +242 -0
- package/dist/components/composition-menu-items.d.ts +4 -6
- package/dist/components/composition-menu-items.js +191 -75
- package/dist/components/get-open-in-menu-items.d.ts +6 -5
- package/dist/components/get-open-in-menu-items.js +15 -9
- package/dist/components/selected-outline-order.js +18 -12
- package/dist/components/use-open-in-menu-apps.d.ts +14 -0
- package/dist/components/use-open-in-menu-apps.js +33 -0
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +2 -2
- package/dist/error-overlay/remotion-overlay/OpenInEditor.d.ts +1 -0
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +3 -3
- package/dist/error-overlay/remotion-overlay/StackFrame.d.ts +5 -1
- package/dist/error-overlay/remotion-overlay/StackFrame.js +26 -19
- package/dist/esm/{LazyModels-gfmpcy4h.mjs → LazyModels-mtggyjye.mjs} +3 -3
- package/dist/esm/{LazyModels-m1rf06wh.mjs → LazyModels-nk7py0zt.mjs} +3 -3
- package/dist/esm/{TranscriptionModal-8pvrehg4.mjs → TranscriptionModal-ymnx1c7m.mjs} +6 -6
- package/dist/esm/{VideoMattingModal-fefbzgka.mjs → VideoMattingModal-05vpczks.mjs} +6 -6
- package/dist/esm/{index-s848rffx.mjs → index-0gewwxse.mjs} +5330 -4668
- package/dist/esm/{index-tzxb8808.mjs → index-4dsz9035.mjs} +8 -8
- package/dist/esm/{index-hbezgbbq.mjs → index-5bfxbpca.mjs} +1 -1
- package/dist/esm/{index-vsxrxfpj.mjs → index-5gd8k9yv.mjs} +1 -1
- package/dist/esm/{index-ggqpre9v.mjs → index-bs39wngg.mjs} +4216 -3571
- package/dist/esm/{index-0x13f28h.mjs → index-cdy8v54v.mjs} +1 -1
- package/dist/esm/{index-41kqns5c.mjs → index-eb5txqp6.mjs} +8 -7
- package/dist/esm/{index-1089795y.mjs → index-f97r9e2g.mjs} +4 -21
- package/dist/esm/{index-jrw61pkj.mjs → index-g7k2dvar.mjs} +1 -1
- package/dist/esm/{index-mww32xc8.mjs → index-x40wwfmt.mjs} +3 -3
- package/dist/esm/index.mjs +12 -6
- package/dist/esm/internals.mjs +7 -7
- package/dist/esm/previewEntry.mjs +7 -7
- package/dist/helpers/client-id.d.ts +1 -0
- package/dist/helpers/client-id.js +8 -4
- package/dist/helpers/cube-lut.d.ts +12 -0
- package/dist/helpers/cube-lut.js +160 -0
- package/dist/helpers/get-preview-file-type.d.ts +1 -1
- package/dist/helpers/get-preview-file-type.js +3 -0
- package/dist/helpers/open-in-editor.d.ts +5 -2
- package/dist/helpers/open-in-editor.js +12 -4
- package/dist/helpers/settings-tab-availability.d.ts +14 -0
- package/dist/helpers/settings-tab-availability.js +35 -0
- package/dist/helpers/use-menu-structure.js +16 -12
- package/dist/icons/lut.d.ts +4 -0
- package/dist/icons/lut.js +6 -0
- package/dist/icons/sparkles.d.ts +4 -0
- package/dist/icons/sparkles.js +6 -0
- package/dist/state/modals.d.ts +12 -2
- package/package.json +19 -19
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +0 -62
|
@@ -4,7 +4,6 @@ exports.getOpenInMenuItems = exports.getConfigureDefaultAppsMenuItems = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const no_react_1 = require("remotion/no-react");
|
|
6
6
|
const get_file_manager_name_1 = require("../helpers/get-file-manager-name");
|
|
7
|
-
const get_git_menu_item_1 = require("../helpers/get-git-menu-item");
|
|
8
7
|
const editor_1 = require("../icons/editor");
|
|
9
8
|
const finder_1 = require("../icons/finder");
|
|
10
9
|
const git_client_1 = require("../icons/git-client");
|
|
@@ -39,11 +38,11 @@ const getConfigureDefaultAppsMenuItems = ({ hasPreviousItems, onConfigureApps, }
|
|
|
39
38
|
];
|
|
40
39
|
};
|
|
41
40
|
exports.getConfigureDefaultAppsMenuItems = getConfigureDefaultAppsMenuItems;
|
|
42
|
-
const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, excludeCodingAgentId, excludeEditorId, fileManagerDisabled, folder,
|
|
41
|
+
const getOpenInMenuItems = ({ canOpenDesktopApps, codingAgentInfo, editorDisabled, editorInfo, excludeCodingAgentId, excludeEditorId, excludeGitSource, fileManagerDisabled, folder, gitSourceDisabled, onConfigureApps, onOpenInCodingAgent, onOpenInEditor, onOpenInFileExplorer, onOpenInGitClient, onOpenInGitSource, onOpenInTerminal, }) => {
|
|
43
42
|
var _a, _b, _c, _d;
|
|
44
|
-
const showFinder = window.remotion_fileSystemPlatform === 'darwin';
|
|
43
|
+
const showFinder = canOpenDesktopApps && window.remotion_fileSystemPlatform === 'darwin';
|
|
45
44
|
const fileManagerName = (0, get_file_manager_name_1.getFileManagerName)(window.remotion_fileSystemPlatform);
|
|
46
|
-
const editors = ((_a = editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors) !== null && _a !== void 0 ? _a : [])
|
|
45
|
+
const editors = (canOpenDesktopApps ? ((_a = editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors) !== null && _a !== void 0 ? _a : []) : [])
|
|
47
46
|
.filter((editor) => editor.id !== excludeEditorId)
|
|
48
47
|
.map((editor) => ({
|
|
49
48
|
disabled: editorDisabled,
|
|
@@ -61,7 +60,7 @@ const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, exclu
|
|
|
61
60
|
type: 'item',
|
|
62
61
|
value: editor.id,
|
|
63
62
|
}));
|
|
64
|
-
const codingAgents = ((_b = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedCodingAgents) !== null && _b !== void 0 ? _b : [])
|
|
63
|
+
const codingAgents = (canOpenDesktopApps ? ((_b = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedCodingAgents) !== null && _b !== void 0 ? _b : []) : [])
|
|
65
64
|
.filter((codingAgent) => codingAgent.id !== excludeCodingAgentId)
|
|
66
65
|
.map((codingAgent) => ({
|
|
67
66
|
id: `open-in-coding-agent-${codingAgent.id}`,
|
|
@@ -74,16 +73,23 @@ const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, exclu
|
|
|
74
73
|
type: 'item',
|
|
75
74
|
value: `coding-agent-${codingAgent.id}`,
|
|
76
75
|
}));
|
|
77
|
-
const terminals =
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
const terminals = canOpenDesktopApps && folder
|
|
77
|
+
? ((_c = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedTerminals) !== null && _c !== void 0 ? _c : [])
|
|
78
|
+
: [];
|
|
79
|
+
const gitClients = canOpenDesktopApps && folder
|
|
80
|
+
? ((_d = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedGitClients) !== null && _d !== void 0 ? _d : [])
|
|
81
|
+
: [];
|
|
82
|
+
const gitHubItem = window.remotion_gitSource && !excludeGitSource
|
|
80
83
|
? {
|
|
84
|
+
disabled: gitSourceDisabled,
|
|
81
85
|
id: 'open-in-github',
|
|
82
86
|
keyHint: null,
|
|
83
87
|
label: jsx_runtime_1.jsx("span", { style: menuLabel, children: "GitHub.com" }),
|
|
84
88
|
leftItem: jsx_runtime_1.jsx(github_1.GitHubIcon, { size: 16 }),
|
|
85
89
|
onClick: () => {
|
|
86
|
-
(
|
|
90
|
+
if (!gitSourceDisabled) {
|
|
91
|
+
onOpenInGitSource();
|
|
92
|
+
}
|
|
87
93
|
},
|
|
88
94
|
quickSwitcherLabel: null,
|
|
89
95
|
subMenu: null,
|
|
@@ -44,9 +44,7 @@ const getOutlineBounds = (outline) => {
|
|
|
44
44
|
minY: Math.min(...ys),
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
|
-
const outlineBoundsOverlap = (
|
|
48
|
-
const aBounds = getOutlineBounds(a);
|
|
49
|
-
const bBounds = getOutlineBounds(b);
|
|
47
|
+
const outlineBoundsOverlap = (aBounds, bBounds) => {
|
|
50
48
|
return (aBounds.minX <= bBounds.maxX + outlineBoundsOverlapTolerance &&
|
|
51
49
|
aBounds.maxX + outlineBoundsOverlapTolerance >= bBounds.minX &&
|
|
52
50
|
aBounds.minY <= bBounds.maxY + outlineBoundsOverlapTolerance &&
|
|
@@ -177,13 +175,26 @@ const orderOutlineGroup = ({ outlines, parentBySequenceId, targetsByKey, }) => {
|
|
|
177
175
|
// For unrelated overlapping outlines, put broader hit targets below
|
|
178
176
|
// smaller ones so a large selected sequence cannot swallow clicks on
|
|
179
177
|
// a more specific element in the same canvas area.
|
|
178
|
+
const bounds = outlines.map(getOutlineBounds);
|
|
179
|
+
const areas = outlines.map(getOutlineHitArea);
|
|
180
180
|
for (let i = 0; i < outlines.length; i++) {
|
|
181
|
+
const a = outlines[i];
|
|
182
|
+
const aTarget = targetsByKey.get(a.key);
|
|
183
|
+
if (aTarget === undefined) {
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
181
186
|
for (let j = i + 1; j < outlines.length; j++) {
|
|
182
|
-
|
|
187
|
+
if (!outlineBoundsOverlap(bounds[i], bounds[j])) {
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
const aArea = areas[i];
|
|
191
|
+
const bArea = areas[j];
|
|
192
|
+
if (Math.abs(aArea - bArea) <= outlineAreaEqualityTolerance) {
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
183
195
|
const b = outlines[j];
|
|
184
|
-
const aTarget = targetsByKey.get(a.key);
|
|
185
196
|
const bTarget = targetsByKey.get(b.key);
|
|
186
|
-
if (
|
|
197
|
+
if (bTarget === undefined) {
|
|
187
198
|
continue;
|
|
188
199
|
}
|
|
189
200
|
const aAncestorOfB = isAncestorTarget({
|
|
@@ -196,12 +207,7 @@ const orderOutlineGroup = ({ outlines, parentBySequenceId, targetsByKey, }) => {
|
|
|
196
207
|
descendant: aTarget,
|
|
197
208
|
parentBySequenceId,
|
|
198
209
|
});
|
|
199
|
-
if (aAncestorOfB || bAncestorOfA
|
|
200
|
-
continue;
|
|
201
|
-
}
|
|
202
|
-
const aArea = getOutlineHitArea(a);
|
|
203
|
-
const bArea = getOutlineHitArea(b);
|
|
204
|
-
if (Math.abs(aArea - bArea) <= outlineAreaEqualityTolerance) {
|
|
210
|
+
if (aAncestorOfB || bAncestorOfA) {
|
|
205
211
|
continue;
|
|
206
212
|
}
|
|
207
213
|
if (aArea > bArea) {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { EditorPickerId, GetDefaultCodingAgentInfoResponse, GetDefaultEditorInfoResponse } from '@remotion/studio-shared';
|
|
2
|
+
export type OpenInMenuApps = {
|
|
3
|
+
readonly canOpenDesktopApps: boolean;
|
|
4
|
+
readonly canOpenInEditor: boolean;
|
|
5
|
+
readonly codingAgentInfo: GetDefaultCodingAgentInfoResponse | null;
|
|
6
|
+
readonly defaultEditorId: EditorPickerId | null;
|
|
7
|
+
readonly defaultEditorName: string | null;
|
|
8
|
+
readonly editorInfo: GetDefaultEditorInfoResponse | null;
|
|
9
|
+
readonly onConfigureApps: (() => void) | null;
|
|
10
|
+
};
|
|
11
|
+
export declare const useOpenInMenuApps: () => {
|
|
12
|
+
connectionStatus: "connected" | "disconnected" | "init";
|
|
13
|
+
openInApps: OpenInMenuApps;
|
|
14
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useOpenInMenuApps = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const client_id_1 = require("../helpers/client-id");
|
|
6
|
+
const use_configure_default_apps_1 = require("./use-configure-default-apps");
|
|
7
|
+
const use_default_editor_info_1 = require("./use-default-editor-info");
|
|
8
|
+
const useOpenInMenuApps = () => {
|
|
9
|
+
const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
|
|
10
|
+
.previewServerState.type;
|
|
11
|
+
const { canConfigureApps, canOpenInEditor, defaultEditorId, defaultEditorName, editorInfo, } = (0, use_default_editor_info_1.useEditorOpening)(connectionStatus === 'connected');
|
|
12
|
+
const codingAgentInfo = (0, use_default_editor_info_1.useDefaultCodingAgentInfo)(canConfigureApps);
|
|
13
|
+
const onConfigureApps = (0, use_configure_default_apps_1.useConfigureDefaultApps)();
|
|
14
|
+
const openInApps = (0, react_1.useMemo)(() => ({
|
|
15
|
+
canOpenDesktopApps: canConfigureApps,
|
|
16
|
+
canOpenInEditor,
|
|
17
|
+
codingAgentInfo,
|
|
18
|
+
defaultEditorId,
|
|
19
|
+
defaultEditorName,
|
|
20
|
+
editorInfo,
|
|
21
|
+
onConfigureApps,
|
|
22
|
+
}), [
|
|
23
|
+
canOpenInEditor,
|
|
24
|
+
canConfigureApps,
|
|
25
|
+
codingAgentInfo,
|
|
26
|
+
defaultEditorId,
|
|
27
|
+
defaultEditorName,
|
|
28
|
+
editorInfo,
|
|
29
|
+
onConfigureApps,
|
|
30
|
+
]);
|
|
31
|
+
return { connectionStatus, openInApps };
|
|
32
|
+
};
|
|
33
|
+
exports.useOpenInMenuApps = useOpenInMenuApps;
|
|
@@ -123,7 +123,7 @@ const ErrorDisplay = ({ display, keyboardShortcuts, onRetry, canHaveDismissButto
|
|
|
123
123
|
canOpenInEditor &&
|
|
124
124
|
defaultEditorId &&
|
|
125
125
|
defaultEditorName ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
126
|
-
jsx_runtime_1.jsx(OpenInEditor_1.OpenInEditor, { canHaveKeyboardShortcuts: keyboardShortcuts, editorId: defaultEditorId, editorName: defaultEditorName, stack: stackFrames[0] }), jsx_runtime_1.jsx("div", { style: spacer })
|
|
126
|
+
jsx_runtime_1.jsx(OpenInEditor_1.OpenInEditor, { canHaveKeyboardShortcuts: keyboardShortcuts, editorId: defaultEditorId, editorName: defaultEditorName, size: "default", stack: stackFrames[0] }), jsx_runtime_1.jsx("div", { style: spacer })
|
|
127
127
|
] })) : null, jsx_runtime_1.jsx(CodingAgentButton_1.CodingAgentButton, { label: "Fix with", prompt: fixWithAgentPrompt, size: "default", style: codingAgentButton }), jsx_runtime_1.jsx(CopyStackTrace_1.CopyStackTrace, { errorText: errorTextForCopy }), jsx_runtime_1.jsx("div", { style: spacer }), jsx_runtime_1.jsx(SearchGitHubIssues_1.SearchGithubIssues, { canHaveKeyboardShortcuts: keyboardShortcuts, message: display.error.message }), jsx_runtime_1.jsx("div", { style: spacer }), jsx_runtime_1.jsx(AskOnDiscord_1.AskOnDiscord, { canHaveKeyboardShortcuts: keyboardShortcuts }), onRetry ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
128
128
|
jsx_runtime_1.jsx("div", { style: spacer }), jsx_runtime_1.jsx(Retry_1.RetryButton, { onClick: onRetry, label: calculateMetadata ? 'Retry calculateMetadata()' : 'Retry' })
|
|
129
129
|
] })) : null] }), calculateMetadata ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
@@ -133,7 +133,7 @@ const ErrorDisplay = ({ display, keyboardShortcuts, onRetry, canHaveDismissButto
|
|
|
133
133
|
] })) : null, stackFrames.length > 0 ? (jsx_runtime_1.jsx("div", { style: stack, className: is_menu_item_1.HORIZONTAL_SCROLLBAR_CLASSNAME, children: stackFrames.map((s, i) => {
|
|
134
134
|
return (jsx_runtime_1.jsx(StackFrame_1.StackElement
|
|
135
135
|
// eslint-disable-next-line react/no-array-index-key
|
|
136
|
-
, { isFirst: i === 0, s: s, lineNumberWidth: lineNumberWidth, defaultFunctionName: '(anonymous function)', editorId: canOpenInEditor ? defaultEditorId : null }, i));
|
|
136
|
+
, { collapsible: true, isFirst: i === 0, s: s, fontSize: 14, headerAction: null, horizontalSpacing: 14, lineNumberWidth: lineNumberWidth, defaultFunctionName: '(anonymous function)', editorId: canOpenInEditor ? defaultEditorId : null }, i));
|
|
137
137
|
}) })) : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
138
138
|
jsx_runtime_1.jsx("pre", { "aria-label": "Unsymbolicated stack trace", className: is_menu_item_1.HORIZONTAL_SCROLLBAR_CLASSNAME, style: rawStack, children: (_a = display.error.stack) !== null && _a !== void 0 ? _a : 'Check the Terminal and browser console for error messages.' }), symbolicationFailure ? (jsx_runtime_1.jsx("div", { style: symbolicationFailureStyle, children: symbolicationFailure })) : null] }))] }));
|
|
139
139
|
};
|
|
@@ -17,7 +17,7 @@ const menuLabel = {
|
|
|
17
17
|
fontSize: 13,
|
|
18
18
|
lineHeight: '16px',
|
|
19
19
|
};
|
|
20
|
-
const OpenInEditor = ({ stack, canHaveKeyboardShortcuts, editorId, editorName }) => {
|
|
20
|
+
const OpenInEditor = ({ stack, canHaveKeyboardShortcuts, editorId, editorName, size }) => {
|
|
21
21
|
const { editorInfo } = (0, SettingsContext_1.useSettings)();
|
|
22
22
|
const configureDefaultApps = (0, use_configure_default_apps_1.useConfigureDefaultApps)();
|
|
23
23
|
const { registerKeybinding } = (0, use_keybinding_1.useKeybinding)();
|
|
@@ -68,8 +68,8 @@ const OpenInEditor = ({ stack, canHaveKeyboardShortcuts, editorId, editorName })
|
|
|
68
68
|
}));
|
|
69
69
|
return editorItems;
|
|
70
70
|
}, [editorId, editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors, openWithEditor]);
|
|
71
|
-
return (jsx_runtime_1.jsxs(AppLaunchButton_1.AppLaunchButton, { actionButtonId: "error-overlay-open-in-editor", ariaLabel: `Open in ${editorName}`, disabled: false, menuAriaLabel: "Open in another app", menuButtonId: "error-overlay-open-in-another-app", menuItems: menuItems, onConfigureApps: configureDefaultApps, onClick: openPreferredEditor, size:
|
|
72
|
-
jsx_runtime_1.jsx(editor_1.EditorIcon, { editorId: editorId, size: 14 }),
|
|
71
|
+
return (jsx_runtime_1.jsxs(AppLaunchButton_1.AppLaunchButton, { actionButtonId: "error-overlay-open-in-editor", ariaLabel: `Open in ${editorName}`, disabled: false, menuAriaLabel: "Open in another app", menuButtonId: "error-overlay-open-in-another-app", menuItems: menuItems, onConfigureApps: configureDefaultApps, onClick: openPreferredEditor, size: size, style: null, title: `Open in ${editorName}`, children: [
|
|
72
|
+
jsx_runtime_1.jsx(editor_1.EditorIcon, { editorId: editorId, size: size === 'default' ? 14 : 18 }),
|
|
73
73
|
"Open in ", editorName, canHaveKeyboardShortcuts ? (jsx_runtime_1.jsx(ShortcutHint_1.ShortcutHint, { keyToPress: "o", cmdOrCtrl: true })) : null] }));
|
|
74
74
|
};
|
|
75
75
|
exports.OpenInEditor = OpenInEditor;
|
|
@@ -4,6 +4,10 @@ export declare const StackElement: React.FC<{
|
|
|
4
4
|
readonly s: SymbolicatedStackFrame;
|
|
5
5
|
readonly lineNumberWidth: number;
|
|
6
6
|
readonly isFirst: boolean;
|
|
7
|
-
readonly defaultFunctionName: string;
|
|
7
|
+
readonly defaultFunctionName: string | null;
|
|
8
8
|
readonly editorId: EditorPickerId | null;
|
|
9
|
+
readonly collapsible: boolean;
|
|
10
|
+
readonly fontSize: number;
|
|
11
|
+
readonly horizontalSpacing: number;
|
|
12
|
+
readonly headerAction: React.ReactNode;
|
|
9
13
|
}>;
|
|
@@ -4,22 +4,20 @@ exports.StackElement = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const Button_1 = require("../../components/Button");
|
|
7
|
+
const CodeFrame_1 = require("../../components/CodeFrame");
|
|
7
8
|
const colors_1 = require("../../helpers/colors");
|
|
9
|
+
const hoverable_1 = require("../../helpers/hoverable");
|
|
8
10
|
const open_in_editor_1 = require("../../helpers/open-in-editor");
|
|
9
11
|
const caret_1 = require("../../icons/caret");
|
|
10
|
-
const CodeFrame_1 = require("./CodeFrame");
|
|
11
12
|
const format_location_1 = require("./format-location");
|
|
12
13
|
const location = {
|
|
13
14
|
color: colors_1.LIGHT_TEXT,
|
|
14
15
|
fontFamily: 'monospace',
|
|
15
|
-
fontSize: 14,
|
|
16
16
|
overflowWrap: 'anywhere',
|
|
17
17
|
};
|
|
18
18
|
const header = {
|
|
19
|
-
paddingLeft: 14,
|
|
20
19
|
paddingTop: 10,
|
|
21
20
|
paddingBottom: 10,
|
|
22
|
-
paddingRight: 14,
|
|
23
21
|
display: 'flex',
|
|
24
22
|
flexDirection: 'row',
|
|
25
23
|
alignItems: 'center',
|
|
@@ -30,11 +28,10 @@ const left = {
|
|
|
30
28
|
minWidth: 0,
|
|
31
29
|
};
|
|
32
30
|
const fnName = {
|
|
33
|
-
fontSize: 14,
|
|
34
31
|
lineHeight: 1.5,
|
|
35
32
|
marginBottom: 3,
|
|
36
33
|
};
|
|
37
|
-
const StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName, editorId }) => {
|
|
34
|
+
const StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName, editorId, collapsible, fontSize, horizontalSpacing, headerAction, }) => {
|
|
38
35
|
var _a;
|
|
39
36
|
const [showCodeFrame, setShowCodeFrame] = (0, react_1.useState)(() => {
|
|
40
37
|
var _a, _b;
|
|
@@ -42,7 +39,6 @@ const StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName, editor
|
|
|
42
39
|
!((_b = s.originalFileName) === null || _b === void 0 ? void 0 : _b.startsWith('webpack/'))) ||
|
|
43
40
|
isFirst;
|
|
44
41
|
});
|
|
45
|
-
const [locationHovered, setLocationHovered] = (0, react_1.useState)(false);
|
|
46
42
|
const canOpenFileLocation = Boolean(editorId && s.originalFileName);
|
|
47
43
|
const onOpenFileLocation = (0, react_1.useCallback)(() => {
|
|
48
44
|
if (!canOpenFileLocation) {
|
|
@@ -59,26 +55,37 @@ const StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName, editor
|
|
|
59
55
|
const toggleCodeFrame = (0, react_1.useCallback)(() => {
|
|
60
56
|
setShowCodeFrame((f) => !f);
|
|
61
57
|
}, []);
|
|
58
|
+
const functionName = (_a = s.originalFunctionName) !== null && _a !== void 0 ? _a : defaultFunctionName;
|
|
59
|
+
const shouldShowCodeFrame = collapsible ? showCodeFrame : true;
|
|
62
60
|
return (jsx_runtime_1.jsxs("div", { className: "css-reset", children: [
|
|
63
61
|
jsx_runtime_1.jsxs("div", { style: {
|
|
64
62
|
...header,
|
|
65
|
-
borderBottom:
|
|
63
|
+
borderBottom: shouldShowCodeFrame ? 'none' : colors_1.BORDER_WHITE_ALPHA_12,
|
|
64
|
+
paddingLeft: horizontalSpacing,
|
|
65
|
+
paddingRight: horizontalSpacing,
|
|
66
66
|
}, children: [
|
|
67
|
-
jsx_runtime_1.jsxs("div", { style: left, children: [
|
|
68
|
-
jsx_runtime_1.jsx("div", { style: fnName, children: (_a = s.originalFunctionName) !== null && _a !== void 0 ? _a : defaultFunctionName }), s.originalFileName ? (jsx_runtime_1.jsx("div", { style: location, children: canOpenFileLocation ? (jsx_runtime_1.jsxs("span", { onClick: onOpenFileLocation, onPointerEnter: () => {
|
|
69
|
-
setLocationHovered(true);
|
|
70
|
-
}, onPointerLeave: () => {
|
|
71
|
-
setLocationHovered(false);
|
|
72
|
-
}, style: {
|
|
67
|
+
jsx_runtime_1.jsxs("div", { style: left, children: [functionName === null ? null : (jsx_runtime_1.jsx("div", { style: { ...fnName, fontSize }, children: functionName })), s.originalFileName ? (jsx_runtime_1.jsx("div", { style: { ...location, fontSize }, children: canOpenFileLocation ? (jsx_runtime_1.jsxs("button", { type: "button", className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, onClick: onOpenFileLocation, style: {
|
|
73
68
|
...location,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
...(0, hoverable_1.hoverableStyle)({
|
|
70
|
+
idleBackground: colors_1.TRANSPARENT,
|
|
71
|
+
hoverBackground: colors_1.TRANSPARENT,
|
|
72
|
+
idleColor: colors_1.LIGHT_TEXT,
|
|
73
|
+
hoverColor: colors_1.WHITE,
|
|
74
|
+
}),
|
|
75
|
+
appearance: 'none',
|
|
76
|
+
border: 'none',
|
|
77
|
+
color: undefined,
|
|
78
|
+
cursor: 'default',
|
|
79
|
+
fontSize,
|
|
80
|
+
padding: 0,
|
|
81
|
+
}, children: [(0, format_location_1.formatLocation)(s.originalFileName), ":", s.originalLineNumber] })) : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [(0, format_location_1.formatLocation)(s.originalFileName), ":", s.originalLineNumber] })) })) : null] }), headerAction, collapsible &&
|
|
82
|
+
s.originalScriptCode &&
|
|
83
|
+
s.originalScriptCode.length > 0 ? (jsx_runtime_1.jsx(Button_1.Button, { onClick: toggleCodeFrame, children: jsx_runtime_1.jsx("div", { style: {
|
|
77
84
|
display: 'flex',
|
|
78
|
-
transform:
|
|
85
|
+
transform: shouldShowCodeFrame ? undefined : 'rotate(-90deg)',
|
|
79
86
|
}, children: jsx_runtime_1.jsx(caret_1.CaretDown, {}) }) })) : null] }), jsx_runtime_1.jsx("div", { children: s.originalScriptCode &&
|
|
80
87
|
s.originalScriptCode.length > 0 &&
|
|
81
|
-
|
|
88
|
+
shouldShowCodeFrame ? (jsx_runtime_1.jsx(CodeFrame_1.CodeFrame, { fontSize: fontSize, horizontalMargin: horizontalSpacing, lineNumberWidth: lineNumberWidth, source: s.originalScriptCode })) : null })
|
|
82
89
|
] }));
|
|
83
90
|
};
|
|
84
91
|
exports.StackElement = StackElement;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Models
|
|
3
|
-
} from "./index-
|
|
4
|
-
import"./index-
|
|
5
|
-
import"./index-
|
|
3
|
+
} from "./index-5gd8k9yv.mjs";
|
|
4
|
+
import"./index-g7k2dvar.mjs";
|
|
5
|
+
import"./index-cdy8v54v.mjs";
|
|
6
6
|
import"./index-5zrb1ft4.mjs";
|
|
7
7
|
import"./index-k426ye99.mjs";
|
|
8
8
|
import"./index-rcv7qkt5.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Models
|
|
3
|
-
} from "./index-
|
|
4
|
-
import"./index-
|
|
5
|
-
import"./index-
|
|
3
|
+
} from "./index-5bfxbpca.mjs";
|
|
4
|
+
import"./index-g7k2dvar.mjs";
|
|
5
|
+
import"./index-cdy8v54v.mjs";
|
|
6
6
|
import"./index-5zrb1ft4.mjs";
|
|
7
7
|
import"./index-k426ye99.mjs";
|
|
8
8
|
import"./index-rcv7qkt5.mjs";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
NumberSetting,
|
|
7
7
|
getDefaultCaptionOutputName,
|
|
8
8
|
validateCaptionOutputName
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-f97r9e2g.mjs";
|
|
10
10
|
import {
|
|
11
11
|
Button,
|
|
12
12
|
Checkbox,
|
|
@@ -32,20 +32,20 @@ import {
|
|
|
32
32
|
rightRow,
|
|
33
33
|
showNotification,
|
|
34
34
|
useStaticFiles
|
|
35
|
-
} from "./index-
|
|
35
|
+
} from "./index-bs39wngg.mjs";
|
|
36
36
|
import {
|
|
37
37
|
RenderQueueContext
|
|
38
38
|
} from "./index-9x6e1dq0.mjs";
|
|
39
39
|
import {
|
|
40
40
|
openInFileExplorer
|
|
41
|
-
} from "./index-
|
|
41
|
+
} from "./index-eb5txqp6.mjs";
|
|
42
42
|
import {
|
|
43
43
|
getBrowserStudioOperations
|
|
44
44
|
} from "./index-cw0pnpg5.mjs";
|
|
45
45
|
import {
|
|
46
46
|
Models
|
|
47
|
-
} from "./index-
|
|
48
|
-
import"./index-
|
|
47
|
+
} from "./index-5gd8k9yv.mjs";
|
|
48
|
+
import"./index-g7k2dvar.mjs";
|
|
49
49
|
import {
|
|
50
50
|
InlineAction,
|
|
51
51
|
Spacing,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
leftSidebar,
|
|
62
62
|
optionsPanel,
|
|
63
63
|
outerModalStyle
|
|
64
|
-
} from "./index-
|
|
64
|
+
} from "./index-cdy8v54v.mjs";
|
|
65
65
|
import"./index-5zrb1ft4.mjs";
|
|
66
66
|
import {
|
|
67
67
|
BLUE_DISABLED,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./index-7tt71e8n.mjs";
|
|
4
4
|
import {
|
|
5
5
|
RenderModalOutputName
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-x40wwfmt.mjs";
|
|
7
7
|
import {
|
|
8
8
|
Button,
|
|
9
9
|
Checkmark,
|
|
@@ -25,16 +25,16 @@ import {
|
|
|
25
25
|
rightRow,
|
|
26
26
|
useStaticFiles,
|
|
27
27
|
validatePublicOutputName
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-bs39wngg.mjs";
|
|
29
29
|
import {
|
|
30
30
|
RenderQueueContext
|
|
31
31
|
} from "./index-9x6e1dq0.mjs";
|
|
32
|
-
import"./index-
|
|
32
|
+
import"./index-eb5txqp6.mjs";
|
|
33
33
|
import"./index-cw0pnpg5.mjs";
|
|
34
34
|
import {
|
|
35
35
|
Models
|
|
36
|
-
} from "./index-
|
|
37
|
-
import"./index-
|
|
36
|
+
} from "./index-5bfxbpca.mjs";
|
|
37
|
+
import"./index-g7k2dvar.mjs";
|
|
38
38
|
import {
|
|
39
39
|
VERTICAL_SCROLLBAR_CLASSNAME,
|
|
40
40
|
ValidationMessage,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
leftSidebar,
|
|
49
49
|
optionsPanel,
|
|
50
50
|
outerModalStyle
|
|
51
|
-
} from "./index-
|
|
51
|
+
} from "./index-cdy8v54v.mjs";
|
|
52
52
|
import"./index-5zrb1ft4.mjs";
|
|
53
53
|
import {
|
|
54
54
|
BLUE_DISABLED
|