@remotion/studio 4.0.518 → 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.
Files changed (140) hide show
  1. package/dist/components/AppLaunchButton.d.ts +16 -0
  2. package/dist/components/AppLaunchButton.js +90 -0
  3. package/dist/components/AssetSelector.js +7 -6
  4. package/dist/components/AssetSelectorItem.d.ts +12 -0
  5. package/dist/components/AssetSelectorItem.js +180 -62
  6. package/dist/components/Button.js +20 -7
  7. package/dist/components/Canvas.js +109 -78
  8. package/dist/components/CanvasOrLoading.js +7 -7
  9. package/dist/components/CodingAgentButton.d.ts +7 -0
  10. package/dist/components/CodingAgentButton.js +59 -0
  11. package/dist/components/CompositionContextButton.d.ts +1 -0
  12. package/dist/components/CompositionContextButton.js +6 -3
  13. package/dist/components/CompositionSelector.js +15 -10
  14. package/dist/components/CompositionSelectorItem.js +16 -23
  15. package/dist/components/ConfigureLicenseModal.js +4 -48
  16. package/dist/components/CurrentAsset.js +1 -1
  17. package/dist/components/ElementInstallConfirmation.d.ts +20 -7
  18. package/dist/components/ElementInstallConfirmation.js +325 -32
  19. package/dist/components/FixComputedValueModal.js +5 -131
  20. package/dist/components/InitialCompositionLoader.js +3 -2
  21. package/dist/components/InspectorOpenInEditor.js +48 -33
  22. package/dist/components/InspectorPanel/CompositionInspector.js +35 -3
  23. package/dist/components/InspectorPanel/CompositionInspectorHeader.js +22 -14
  24. package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +3 -1
  25. package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +1 -1
  26. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +10 -5
  27. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -1
  28. package/dist/components/InspectorPanel/common.js +1 -0
  29. package/dist/components/InspectorPanel/styles.js +1 -0
  30. package/dist/components/InspectorSequenceSection.js +8 -3
  31. package/dist/components/InspectorSourceLocation.js +5 -1
  32. package/dist/components/KnownBugs.d.ts +1 -1
  33. package/dist/components/KnownBugs.js +1 -1
  34. package/dist/components/LicenseExplanation.d.ts +2 -0
  35. package/dist/components/LicenseExplanation.js +63 -0
  36. package/dist/components/MenuToolbar.js +7 -1
  37. package/dist/components/Modals.js +1 -2
  38. package/dist/components/NewComposition/InputDragger.js +29 -2
  39. package/dist/components/NewComposition/NewCompDuration.js +1 -1
  40. package/dist/components/NewComposition/NewComposition.d.ts +23 -0
  41. package/dist/components/NewComposition/NewComposition.js +217 -80
  42. package/dist/components/{UpdateModal/OpenIssueButton.js → OpenIssueButton.js} +1 -1
  43. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +2 -1
  44. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +21 -13
  45. package/dist/components/RenderQueue/actions.d.ts +1 -0
  46. package/dist/components/RenderQueue/actions.js +5 -1
  47. package/dist/components/SelectedOutlineCanvasRotation.js +27 -1
  48. package/dist/components/SelectedOutlineElement.js +2 -1
  49. package/dist/components/SelectedOutlineKeyboardControls.d.ts +2 -2
  50. package/dist/components/SelectedOutlineOverlay.d.ts +3 -1
  51. package/dist/components/SelectedOutlineOverlay.js +21 -26
  52. package/dist/components/SelectedOutlinePolygon.d.ts +1 -0
  53. package/dist/components/SelectedOutlinePolygon.js +12 -4
  54. package/dist/components/SelectedOutlineRenderer.js +88 -21
  55. package/dist/components/SettingsContext.js +2 -1
  56. package/dist/components/SettingsModal.d.ts +1 -1
  57. package/dist/components/SettingsModal.js +19 -3
  58. package/dist/components/SidebarRenderButton.d.ts +1 -0
  59. package/dist/components/SidebarRenderButton.js +14 -5
  60. package/dist/components/Timeline/SequencePropsObserver.js +29 -14
  61. package/dist/components/Timeline/TimelineKeyframeControls.js +3 -1
  62. package/dist/components/Timeline/TimelineRowChrome.js +4 -2
  63. package/dist/components/Timeline/TimelineSequence.js +40 -8
  64. package/dist/components/Timeline/TimelineSequenceItem.js +34 -1
  65. package/dist/components/Timeline/TimelineStack/get-stack.d.ts +1 -0
  66. package/dist/components/Timeline/TimelineStack/get-stack.js +35 -3
  67. package/dist/components/Timeline/duplicate-selected-timeline-item.js +23 -25
  68. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +6 -0
  69. package/dist/components/Timeline/get-sequence-context-menu-items.js +34 -1
  70. package/dist/components/Timeline/sequence-props-subscription-store.d.ts +2 -0
  71. package/dist/components/Timeline/sequence-props-subscription-store.js +22 -1
  72. package/dist/components/Timeline/use-sequence-props-subscription.js +7 -0
  73. package/dist/components/TimelineCombobox.js +1 -0
  74. package/dist/components/UpdateCheck.d.ts +0 -8
  75. package/dist/components/UpdateCheck.js +7 -54
  76. package/dist/components/UpdateStatusContext.d.ts +18 -0
  77. package/dist/components/UpdateStatusContext.js +74 -0
  78. package/dist/components/UpdatesSettings.d.ts +2 -0
  79. package/dist/components/UpdatesSettings.js +251 -0
  80. package/dist/components/WebMcp.js +3 -3
  81. package/dist/components/get-open-in-menu-items.d.ts +4 -0
  82. package/dist/components/get-open-in-menu-items.js +28 -24
  83. package/dist/components/root-composition-menu-items.d.ts +4 -1
  84. package/dist/components/root-composition-menu-items.js +38 -1
  85. package/dist/components/selected-outline-geometry.d.ts +21 -2
  86. package/dist/components/selected-outline-geometry.js +16 -5
  87. package/dist/components/selected-outline-measurement.d.ts +40 -1
  88. package/dist/components/selected-outline-measurement.js +239 -1
  89. package/dist/components/selected-outline-order.d.ts +12 -0
  90. package/dist/components/selected-outline-order.js +251 -0
  91. package/dist/components/selected-outline-types.d.ts +15 -2
  92. package/dist/components/selected-outline-uv.js +106 -3
  93. package/dist/components/use-configure-default-apps.d.ts +1 -0
  94. package/dist/components/use-configure-default-apps.js +24 -0
  95. package/dist/error-overlay/remotion-overlay/CodeFrame.js +5 -6
  96. package/dist/error-overlay/remotion-overlay/CopyStackTrace.js +1 -1
  97. package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +47 -18
  98. package/dist/error-overlay/remotion-overlay/ErrorLoader.js +1 -1
  99. package/dist/error-overlay/remotion-overlay/ErrorTitle.js +5 -4
  100. package/dist/error-overlay/remotion-overlay/OpenInEditor.js +48 -76
  101. package/dist/error-overlay/remotion-overlay/SearchGitHubIssues.js +1 -1
  102. package/dist/error-overlay/remotion-overlay/ShortcutHint.js +2 -2
  103. package/dist/error-overlay/remotion-overlay/StackFrame.js +13 -8
  104. package/dist/error-overlay/remotion-overlay/Symbolicating.js +1 -1
  105. package/dist/esm/{chunk-7prjt5n5.js → chunk-1fkq5bfq.js} +15439 -11610
  106. package/dist/esm/chunk-6jf1natv.js +25 -0
  107. package/dist/esm/{chunk-4bxz1d3g.js → chunk-je0h1bgt.js} +1 -28
  108. package/dist/esm/chunk-m0jqdbkr.js +14571 -0
  109. package/dist/esm/index.mjs +0 -2
  110. package/dist/esm/internals.mjs +32140 -13755
  111. package/dist/esm/previewEntry.mjs +35408 -17021
  112. package/dist/esm/renderEntry.mjs +6 -3
  113. package/dist/helpers/can-show-updates.d.ts +5 -0
  114. package/dist/helpers/can-show-updates.js +7 -0
  115. package/dist/helpers/colors.d.ts +0 -3
  116. package/dist/helpers/colors.js +2 -5
  117. package/dist/helpers/create-folder-tree.d.ts +5 -0
  118. package/dist/helpers/create-folder-tree.js +24 -1
  119. package/dist/helpers/get-asset-metadata.js +1 -1
  120. package/dist/helpers/get-box-quads-polyfill-internals.d.ts +82 -0
  121. package/dist/helpers/get-box-quads-polyfill-internals.js +2403 -0
  122. package/dist/helpers/get-box-quads-ponyfill.d.ts +10 -0
  123. package/dist/helpers/get-box-quads-ponyfill.js +23 -0
  124. package/dist/helpers/get-git-menu-item.d.ts +5 -0
  125. package/dist/helpers/get-git-menu-item.js +15 -1
  126. package/dist/helpers/hoverable.js +10 -5
  127. package/dist/helpers/open-in-editor.js +51 -1
  128. package/dist/helpers/preview-server-events.js +3 -0
  129. package/dist/helpers/timeline-layout.d.ts +0 -1
  130. package/dist/helpers/timeline-layout.js +1 -5
  131. package/dist/helpers/url-state.d.ts +1 -0
  132. package/dist/helpers/url-state.js +12 -5
  133. package/dist/renderEntry.js +2 -0
  134. package/dist/state/folders.d.ts +3 -0
  135. package/dist/state/folders.js +40 -1
  136. package/dist/state/modals.d.ts +1 -6
  137. package/package.json +17 -14
  138. package/dist/components/UpdateModal/UpdateModal.d.ts +0 -6
  139. package/dist/components/UpdateModal/UpdateModal.js +0 -104
  140. /package/dist/components/{UpdateModal/OpenIssueButton.d.ts → OpenIssueButton.d.ts} +0 -0
@@ -1,53 +1,17 @@
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
- })();
35
2
  Object.defineProperty(exports, "__esModule", { value: true });
36
3
  exports.FixComputedValueModal = void 0;
37
4
  const jsx_runtime_1 = require("react/jsx-runtime");
38
- const react_1 = __importStar(require("react"));
5
+ const react_1 = require("react");
39
6
  const colors_1 = require("../helpers/colors");
40
7
  const copy_text_1 = require("../helpers/copy-text");
41
- const open_in_editor_1 = require("../helpers/open-in-editor");
42
- const caret_1 = require("../icons/caret");
43
8
  const clipboard_1 = require("../icons/clipboard");
44
- const CodingAgentIcon_1 = require("./CodingAgentIcon");
9
+ const CodingAgentButton_1 = require("./CodingAgentButton");
45
10
  const InlineAction_1 = require("./InlineAction");
46
11
  const ModalFooter_1 = require("./ModalFooter");
47
12
  const ModalHeader_1 = require("./ModalHeader");
48
13
  const DismissableModal_1 = require("./NewComposition/DismissableModal");
49
14
  const NotificationCenter_1 = require("./Notifications/NotificationCenter");
50
- const SegmentedButton_1 = require("./SegmentedButton");
51
15
  const SettingsContext_1 = require("./SettingsContext");
52
16
  const panelStyle = {
53
17
  borderRadius: 6,
@@ -93,28 +57,12 @@ const footer = {
93
57
  flex: 'none',
94
58
  justifyContent: 'flex-end',
95
59
  };
96
- const mainSegmentStyle = {
97
- gap: 6,
98
- padding: '0 9px',
99
- };
100
- const dropdownSegmentStyle = {
101
- padding: 0,
102
- width: 20,
103
- };
104
- const menuLabel = {
105
- color: 'inherit',
106
- fontFamily: 'sans-serif',
107
- fontSize: 13,
108
- lineHeight: '16px',
109
- };
110
60
  const FixComputedValueModal = ({ state }) => {
111
- var _a, _b;
61
+ var _a;
112
62
  const { codingAgentInfo } = (0, SettingsContext_1.useSettings)();
113
63
  const prompt = `/remotion-interactivity ${state.context} make "${state.prop}" interactive`;
114
64
  const installCommand = 'npx remotion skills add';
115
- const installedCodingAgents = (_a = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedCodingAgents) !== null && _a !== void 0 ? _a : [];
116
- const defaultCodingAgent = (_b = installedCodingAgents.find((agent) => agent.id === (codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.defaultCodingAgent))) !== null && _b !== void 0 ? _b : installedCodingAgents[0];
117
- const alternativeCodingAgents = installedCodingAgents.filter((agent) => agent.id !== (defaultCodingAgent === null || defaultCodingAgent === void 0 ? void 0 : defaultCodingAgent.id));
65
+ const hasCodingAgent = ((_a = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedCodingAgents.length) !== null && _a !== void 0 ? _a : 0) > 0;
118
66
  const onCopyPrompt = (0, react_1.useCallback)(() => {
119
67
  (0, copy_text_1.copyText)(prompt).catch((err) => {
120
68
  (0, NotificationCenter_1.showNotification)(`Could not copy: ${err.message}`, 2000);
@@ -128,80 +76,6 @@ const FixComputedValueModal = ({ state }) => {
128
76
  const renderCopyAction = (0, react_1.useCallback)((color) => {
129
77
  return jsx_runtime_1.jsx(clipboard_1.ClipboardIcon, { color: color, style: copyIcon });
130
78
  }, []);
131
- const openWithCodingAgent = (0, react_1.useCallback)(async (codingAgentId, codingAgentName) => {
132
- try {
133
- const response = await (0, open_in_editor_1.openInCodingAgent)(codingAgentId, codingAgentId === 'copilot' ? null : prompt);
134
- if (!response.success) {
135
- (0, NotificationCenter_1.showNotification)(`Could not open ${codingAgentName}`, 2000);
136
- }
137
- }
138
- catch (err) {
139
- (0, NotificationCenter_1.showNotification)(err.message, 2000);
140
- }
141
- }, [prompt]);
142
- const agentMenuItems = react_1.default.useMemo(() => {
143
- return alternativeCodingAgents.map((codingAgent) => ({
144
- id: `fix-computed-value-in-${codingAgent.id}`,
145
- keyHint: null,
146
- label: jsx_runtime_1.jsx("span", { style: menuLabel, children: codingAgent.name }),
147
- leftItem: jsx_runtime_1.jsx(CodingAgentIcon_1.CodingAgentIcon, { codingAgentId: codingAgent.id, size: 18 }),
148
- onClick: () => {
149
- openWithCodingAgent(codingAgent.id, codingAgent.nameWithType).catch(() => undefined);
150
- },
151
- quickSwitcherLabel: null,
152
- subMenu: null,
153
- type: 'item',
154
- value: `coding-agent-${codingAgent.id}`,
155
- }));
156
- }, [alternativeCodingAgents, openWithCodingAgent]);
157
- const segments = react_1.default.useMemo(() => {
158
- if (!defaultCodingAgent) {
159
- return [];
160
- }
161
- return [
162
- {
163
- ariaLabel: `Open in ${defaultCodingAgent.nameWithType}`,
164
- buttonId: null,
165
- disabled: false,
166
- idleColor: colors_1.LIGHT_TEXT,
167
- onClick: () => {
168
- openWithCodingAgent(defaultCodingAgent.id, defaultCodingAgent.nameWithType).catch(() => undefined);
169
- },
170
- onPointerDown: null,
171
- renderContent: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
172
- jsx_runtime_1.jsx(CodingAgentIcon_1.CodingAgentIcon, { codingAgentId: defaultCodingAgent.id, size: 18 }),
173
- "Open in ", defaultCodingAgent.name] })),
174
- segmentId: 'default-coding-agent',
175
- style: mainSegmentStyle,
176
- title: `Open in ${defaultCodingAgent.nameWithType}`,
177
- type: 'action',
178
- },
179
- ...(alternativeCodingAgents.length > 0
180
- ? [
181
- {
182
- ariaLabel: 'Open in another coding agent',
183
- buttonId: null,
184
- disabled: false,
185
- idleColor: colors_1.LIGHT_TEXT,
186
- leaveLeftSpace: true,
187
- onOpenChange: null,
188
- renderContent: (color) => jsx_runtime_1.jsx(caret_1.CaretDown, { color: color }),
189
- segmentId: 'another-coding-agent',
190
- selectedId: null,
191
- style: dropdownSegmentStyle,
192
- title: 'Open in another coding agent',
193
- type: 'menu',
194
- values: agentMenuItems,
195
- },
196
- ]
197
- : []),
198
- ];
199
- }, [
200
- agentMenuItems,
201
- alternativeCodingAgents.length,
202
- defaultCodingAgent,
203
- openWithCodingAgent,
204
- ]);
205
79
  return (jsx_runtime_1.jsxs(DismissableModal_1.DismissableModal, { panelStyle: panelStyle, children: [
206
80
  jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: "Fix computed value" }), jsx_runtime_1.jsxs("div", { style: container, children: [state.remotionInteractivitySkillAvailable ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
207
81
  jsx_runtime_1.jsx("div", { style: text, children: "First, install the Remotion Agent Skills:" }), jsx_runtime_1.jsxs("div", { style: commandField, children: [
@@ -215,6 +89,6 @@ const FixComputedValueModal = ({ state }) => {
215
89
  : 'Then, paste this prompt into your coding agent:' }), jsx_runtime_1.jsxs("div", { style: commandField, children: [
216
90
  jsx_runtime_1.jsx("pre", { style: code, children: prompt }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onCopyPrompt, renderAction: renderCopyAction, title: "Copy prompt" })
217
91
  ] })
218
- ] }), defaultCodingAgent ? (jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { style: footer, children: jsx_runtime_1.jsx(SegmentedButton_1.SegmentedButton, { segments: segments, style: null, title: null }) })) : null] }));
92
+ ] }), hasCodingAgent ? (jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { style: footer, children: jsx_runtime_1.jsx(CodingAgentButton_1.CodingAgentButton, { label: "Open in", prompt: prompt, size: "compact", style: null }) })) : null] }));
219
93
  };
220
94
  exports.FixComputedValueModal = FixComputedValueModal;
@@ -131,8 +131,9 @@ const InitialCompositionLoader = () => {
131
131
  }
132
132
  setCanvasContent(newCanvas);
133
133
  };
134
- window.addEventListener('popstate', onchange);
135
- return () => window.removeEventListener('popstate', onchange);
134
+ const navigationWindow = (0, url_state_1.getNavigationWindow)();
135
+ navigationWindow.addEventListener('popstate', onchange);
136
+ return () => navigationWindow.removeEventListener('popstate', onchange);
136
137
  }, [
137
138
  compositions,
138
139
  selectAsset,
@@ -6,14 +6,16 @@ const react_1 = require("react");
6
6
  const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
7
7
  const client_id_1 = require("../helpers/client-id");
8
8
  const colors_1 = require("../helpers/colors");
9
+ const get_git_menu_item_1 = require("../helpers/get-git-menu-item");
9
10
  const open_in_editor_1 = require("../helpers/open-in-editor");
10
11
  const caret_1 = require("../icons/caret");
11
12
  const editor_1 = require("../icons/editor");
12
- const modals_1 = require("../state/modals");
13
+ const github_1 = require("../icons/github");
13
14
  const get_open_in_menu_items_1 = require("./get-open-in-menu-items");
14
15
  const NotificationCenter_1 = require("./Notifications/NotificationCenter");
15
16
  const actions_1 = require("./RenderQueue/actions");
16
17
  const SegmentedButton_1 = require("./SegmentedButton");
18
+ const use_configure_default_apps_1 = require("./use-configure-default-apps");
17
19
  const use_default_editor_info_1 = require("./use-default-editor-info");
18
20
  const mainSegmentStyle = {
19
21
  columnGap: 4,
@@ -28,9 +30,11 @@ const dropdownSegmentStyle = {
28
30
  const editorButtonIconSize = 18;
29
31
  const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locationType }) => {
30
32
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
31
- const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
33
+ const configureDefaultApps = (0, use_configure_default_apps_1.useConfigureDefaultApps)();
32
34
  const { canConfigureApps, canOpenInEditor, defaultEditorId, defaultEditorName, editorInfo, } = (0, use_default_editor_info_1.useEditorOpening)(previewServerState.type === 'connected');
33
35
  const codingAgentInfo = (0, use_default_editor_info_1.useDefaultCodingAgentInfo)(canConfigureApps);
36
+ const canOpenInGitHub = (0, get_git_menu_item_1.hasReadOnlyGitSource)();
37
+ const defaultActionIsGitHub = !canOpenInEditor && canOpenInGitHub;
34
38
  const openWithEditor = (0, react_1.useCallback)(async (editorId) => {
35
39
  if (!location) {
36
40
  return;
@@ -53,35 +57,36 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
53
57
  (0, NotificationCenter_1.showNotification)(err.message, 2000);
54
58
  }
55
59
  }, [contextForAgents]);
56
- const editorName = defaultEditorName !== null && defaultEditorName !== void 0 ? defaultEditorName : 'default editor';
57
- const canOpenDefault = location !== null && canOpenInEditor;
60
+ const defaultAppName = defaultActionIsGitHub
61
+ ? 'GitHub'
62
+ : (defaultEditorName !== null && defaultEditorName !== void 0 ? defaultEditorName : 'default editor');
63
+ const canOpenDefault = location !== null && (canOpenInEditor || canOpenInGitHub);
58
64
  const onOpenDefault = (0, react_1.useCallback)((event) => {
59
65
  event.stopPropagation();
60
- if (defaultEditorId) {
66
+ if (defaultActionIsGitHub) {
67
+ (0, get_git_menu_item_1.openGitSource)({ folder: locationType === 'folder', location });
68
+ }
69
+ else if (defaultEditorId) {
61
70
  openWithEditor(defaultEditorId).catch(() => undefined);
62
71
  }
63
- }, [defaultEditorId, openWithEditor]);
72
+ }, [
73
+ defaultActionIsGitHub,
74
+ defaultEditorId,
75
+ location,
76
+ locationType,
77
+ openWithEditor,
78
+ ]);
64
79
  const menuItems = (0, react_1.useMemo)(() => {
65
- return (0, get_open_in_menu_items_1.getOpenInMenuItems)({
80
+ const items = (0, get_open_in_menu_items_1.getOpenInMenuItems)({
66
81
  codingAgentInfo,
67
- editorDisabled: location === null,
82
+ editorDisabled: location === null || !canOpenInEditor,
68
83
  editorInfo,
69
84
  excludeCodingAgentId: null,
70
85
  excludeEditorId: defaultEditorId,
71
- fileManagerDisabled: !(location === null || location === void 0 ? void 0 : location.source),
86
+ fileManagerDisabled: !(location === null || location === void 0 ? void 0 : location.source) || previewServerState.type !== 'connected',
72
87
  folder: locationType === 'folder',
73
88
  location,
74
- onConfigureApps: canConfigureApps
75
- ? () => {
76
- var _a;
77
- var _b;
78
- setSelectedModal({
79
- type: 'settings',
80
- initialTab: 'apps',
81
- initialPublicLicenseKey: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
82
- });
83
- }
84
- : null,
89
+ onConfigureApps: configureDefaultApps,
85
90
  onOpenInCodingAgent: (codingAgentId, codingAgentName) => {
86
91
  openWithCodingAgent(codingAgentId, codingAgentName).catch(() => undefined);
87
92
  },
@@ -122,34 +127,40 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
122
127
  });
123
128
  },
124
129
  });
130
+ return defaultActionIsGitHub
131
+ ? items.filter((item) => item.id !== 'open-in-github')
132
+ : items;
125
133
  }, [
126
134
  codingAgentInfo,
127
- canConfigureApps,
135
+ canOpenInEditor,
136
+ configureDefaultApps,
137
+ defaultActionIsGitHub,
128
138
  defaultEditorId,
129
139
  editorInfo,
130
140
  location,
131
141
  locationType,
132
142
  openWithCodingAgent,
133
143
  openWithEditor,
134
- setSelectedModal,
144
+ previewServerState.type,
135
145
  ]);
136
146
  const segments = (0, react_1.useMemo)(() => {
137
- return [
147
+ const result = [
138
148
  {
139
- ariaLabel: `Open in ${editorName}`,
149
+ ariaLabel: `Open in ${defaultAppName}`,
140
150
  buttonId: null,
141
151
  disabled: !canOpenDefault,
142
152
  idleColor: colors_1.LIGHT_TEXT,
143
153
  onClick: onOpenDefault,
144
154
  onPointerDown: null,
145
- renderContent: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [label, jsx_runtime_1.jsx(editor_1.EditorIcon, { editorId: defaultEditorId, size: editorButtonIconSize })
146
- ] })),
155
+ renderContent: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [label, defaultActionIsGitHub ? (jsx_runtime_1.jsx(github_1.GitHubIcon, { size: editorButtonIconSize })) : (jsx_runtime_1.jsx(editor_1.EditorIcon, { editorId: defaultEditorId, size: editorButtonIconSize }))] })),
147
156
  segmentId: 'default-editor',
148
157
  style: mainSegmentStyle,
149
- title: `Open in ${editorName}`,
158
+ title: `Open in ${defaultAppName}`,
150
159
  type: 'action',
151
160
  },
152
- {
161
+ ];
162
+ if (menuItems.length > 0) {
163
+ result.push({
153
164
  ariaLabel: 'Open in another app',
154
165
  buttonId: null,
155
166
  disabled: false,
@@ -163,18 +174,22 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
163
174
  title: 'Open in another app',
164
175
  type: 'menu',
165
176
  values: menuItems,
166
- },
167
- ];
177
+ });
178
+ }
179
+ return result;
168
180
  }, [
169
181
  canOpenDefault,
182
+ defaultActionIsGitHub,
183
+ defaultAppName,
170
184
  defaultEditorId,
171
- editorName,
172
185
  label,
173
186
  menuItems,
174
187
  onOpenDefault,
175
188
  ]);
176
- if (previewServerState.type !== 'connected' ||
177
- (0, browser_studio_operations_1.getBrowserStudioOperations)() !== null) {
189
+ if ((0, browser_studio_operations_1.getBrowserStudioOperations)() !== null) {
190
+ return null;
191
+ }
192
+ if (previewServerState.type !== 'connected' && !canOpenInGitHub) {
178
193
  return null;
179
194
  }
180
195
  return jsx_runtime_1.jsx(SegmentedButton_1.SegmentedButton, { segments: segments, style: null, title: null });
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
7
7
  const client_id_1 = require("../../helpers/client-id");
8
+ const colors_1 = require("../../helpers/colors");
8
9
  const download_blob_1 = require("../../helpers/download-blob");
9
10
  const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
10
11
  const cloud_download_1 = require("../../icons/cloud-download");
@@ -12,8 +13,10 @@ const frame_1 = require("../../icons/frame");
12
13
  const solid_1 = require("../../icons/solid");
13
14
  const video_1 = require("../../icons/video");
14
15
  const VisualControls_1 = require("../../visual-controls/VisualControls");
16
+ const ConfirmationDialog_1 = require("../ConfirmationDialog");
15
17
  const DefaultPropsEditor_1 = require("../DefaultPropsEditor");
16
18
  const get_zod_if_possible_1 = require("../get-zod-if-possible");
19
+ const LicenseExplanation_1 = require("../LicenseExplanation");
17
20
  const is_menu_item_1 = require("../Menu/is-menu-item");
18
21
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
19
22
  const ObserveDefaultPropsContext_1 = require("../ObserveDefaultPropsContext");
@@ -33,15 +36,42 @@ const actionIconStyle = {
33
36
  height: 18,
34
37
  width: 18,
35
38
  };
39
+ const downloadLicenseAgreement = {
40
+ color: colors_1.LIGHT_TEXT,
41
+ fontFamily: 'sans-serif',
42
+ fontSize: 14,
43
+ lineHeight: 1.5,
44
+ marginBottom: 0,
45
+ marginTop: 20,
46
+ };
47
+ const downloadLicenseLink = {
48
+ color: colors_1.LIGHT_TEXT,
49
+ fontFamily: 'sans-serif',
50
+ fontSize: 14,
51
+ lineHeight: '21px',
52
+ };
36
53
  const CompositionActions = () => {
37
54
  var _a;
38
55
  var _b;
39
56
  const { canInsertAsset, canInsertComposition, canInsertSolid, canShowInsertAsset, canShowInsertComposition, canShowInsertSolid, insertAsset, insertComposition, insertSolid, } = (0, use_composition_actions_1.useCompositionActions)();
40
57
  const downloadProject = (_b = (_a = (0, browser_studio_operations_1.getBrowserStudioOperations)()) === null || _a === void 0 ? void 0 : _a.downloadProject) !== null && _b !== void 0 ? _b : null;
58
+ const confirm = (0, ConfirmationDialog_1.useConfirmationDialog)();
41
59
  const onDownloadProject = (0, react_1.useCallback)(async () => {
42
60
  if (downloadProject === null) {
43
61
  return;
44
62
  }
63
+ const accepted = await confirm({
64
+ title: 'Download project',
65
+ message: (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
66
+ jsx_runtime_1.jsx(LicenseExplanation_1.LicenseExplanation, {}), jsx_runtime_1.jsxs("p", { style: downloadLicenseAgreement, children: ["By downloading this project, you agree to comply with the", ' ', jsx_runtime_1.jsx("a", { href: "https://remotion.dev/license", rel: "noopener noreferrer", style: downloadLicenseLink, target: "_blank", children: "license" }),
67
+ "."] })
68
+ ] })),
69
+ confirmLabel: 'Accept and download',
70
+ cancelLabel: 'Cancel',
71
+ });
72
+ if (!accepted) {
73
+ return;
74
+ }
45
75
  try {
46
76
  const { data, fileName } = await downloadProject();
47
77
  const arrayBuffer = data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength);
@@ -50,14 +80,16 @@ const CompositionActions = () => {
50
80
  catch (error) {
51
81
  (0, NotificationCenter_1.showNotification)(`Could not download project: ${error instanceof Error ? error.message : String(error)}`, 2000);
52
82
  }
53
- }, [downloadProject]);
83
+ }, [confirm, downloadProject]);
54
84
  if (!canShowInsertAsset &&
55
85
  !canShowInsertComposition &&
56
86
  !canShowInsertSolid &&
57
87
  downloadProject === null) {
58
88
  return null;
59
89
  }
60
- return (jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [canShowInsertSolid ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canInsertSolid, onClick: insertSolid, renderIcon: (color) => (jsx_runtime_1.jsx(solid_1.SolidIcon, { color: color, style: actionIconStyle })), children: "Add Solid" })) : null, canShowInsertAsset ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canInsertAsset, onClick: insertAsset, renderIcon: (color) => (jsx_runtime_1.jsx(frame_1.PicIcon, { color: color, style: actionIconStyle })), children: "Add asset..." })) : null, canShowInsertComposition ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canInsertComposition, onClick: insertComposition, renderIcon: (color) => (jsx_runtime_1.jsx(video_1.FilmIcon, { color: color, style: actionIconStyle })), children: "Add composition..." })) : null, canShowInsertAsset ? jsx_runtime_1.jsx(ElementLibraryButton_1.ElementLibraryButton, {}) : null, downloadProject ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: false, onClick: onDownloadProject, renderIcon: (color) => (jsx_runtime_1.jsx(cloud_download_1.CloudDownloadIcon, { color: color, style: actionIconStyle })), children: "Download project" })) : null] }));
90
+ return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
91
+ jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Actions" }), jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [canShowInsertSolid ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canInsertSolid, onClick: insertSolid, renderIcon: (color) => (jsx_runtime_1.jsx(solid_1.SolidIcon, { color: color, style: actionIconStyle })), children: "Add Solid" })) : null, canShowInsertAsset ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canInsertAsset, onClick: insertAsset, renderIcon: (color) => (jsx_runtime_1.jsx(frame_1.PicIcon, { color: color, style: actionIconStyle })), children: "Add asset..." })) : null, canShowInsertComposition ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canInsertComposition, onClick: insertComposition, renderIcon: (color) => (jsx_runtime_1.jsx(video_1.FilmIcon, { color: color, style: actionIconStyle })), children: "Add composition..." })) : null, canShowInsertAsset ? jsx_runtime_1.jsx(ElementLibraryButton_1.ElementLibraryButton, {}) : null, downloadProject ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: false, onClick: onDownloadProject, renderIcon: (color) => (jsx_runtime_1.jsx(cloud_download_1.CloudDownloadIcon, { color: color, style: actionIconStyle })), children: "Download project" })) : null] })
92
+ ] }));
61
93
  };
62
94
  const CompositionDefaultPropsSection = ({ composition, currentDefaultProps, readOnlyStudio, setDefaultProps }) => {
63
95
  var _a;
@@ -139,7 +171,7 @@ const CompositionInspector = ({ composition, currentDefaultProps, readOnlyStudio
139
171
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
140
172
  return (jsx_runtime_1.jsxs("div", { style: styles_1.scrollableContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
141
173
  jsx_runtime_1.jsxs("div", { style: styles_1.inspectorOverviewSection, children: [
142
- jsx_runtime_1.jsx(CompositionInspectorHeader_1.CompositionInspectorHeader, {}), jsx_runtime_1.jsx(CompositionMetadata_1.CompositionMetadata, { compositionId: composition.id, disabled: readOnlyStudio || previewServerState.type !== 'connected', stack: composition.stack })
174
+ jsx_runtime_1.jsx(CompositionInspectorHeader_1.CompositionInspectorHeader, {}), jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Metadata" }), jsx_runtime_1.jsx(CompositionMetadata_1.CompositionMetadata, { compositionId: composition.id, disabled: readOnlyStudio || previewServerState.type !== 'connected', stack: composition.stack })
143
175
  ] }), jsx_runtime_1.jsx(CompositionDefaultPropsSection, { composition: composition, currentDefaultProps: currentDefaultProps, readOnlyStudio: readOnlyStudio, setDefaultProps: setDefaultProps }), jsx_runtime_1.jsx(CompositionVisualControlsSection, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(CompositionActions, {})
144
176
  ] }));
145
177
  };
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
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 get_git_menu_item_1 = require("../../helpers/get-git-menu-item");
8
9
  const is_composition_still_1 = require("../../helpers/is-composition-still");
9
10
  const open_in_editor_1 = require("../../helpers/open-in-editor");
10
11
  const react_2 = require("../../icons/react");
@@ -37,6 +38,7 @@ const CompositionInspectorHeader = () => {
37
38
  const { compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
38
39
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
39
40
  const { canOpenInEditor, defaultEditorId } = (0, use_default_editor_info_1.useEditorOpening)(previewServerState.type === 'connected');
41
+ const canOpenInGitHub = (0, get_git_menu_item_1.hasReadOnlyGitSource)();
40
42
  const currentComposition = (0, react_1.useMemo)(() => {
41
43
  var _a;
42
44
  if (!video) {
@@ -72,22 +74,27 @@ const CompositionInspectorHeader = () => {
72
74
  compositionId,
73
75
  });
74
76
  }, [compositionFile, compositionId]);
75
- const openFileLocation = (0, react_1.useCallback)(() => {
76
- if (!validatedLocation || !defaultEditorId || !canOpenInEditor) {
77
+ const openSourceLocation = (0, react_1.useCallback)((location) => {
78
+ if (canOpenInEditor && defaultEditorId) {
79
+ (0, open_in_editor_1.openOriginalPositionInEditor)(location, defaultEditorId).catch((err) => {
80
+ (0, NotificationCenter_1.showNotification)(err.message, 2000);
81
+ });
77
82
  return;
78
83
  }
79
- (0, open_in_editor_1.openOriginalPositionInEditor)(validatedLocation, defaultEditorId).catch((err) => {
80
- (0, NotificationCenter_1.showNotification)(err.message, 2000);
81
- });
82
- }, [canOpenInEditor, defaultEditorId, validatedLocation]);
84
+ if (canOpenInGitHub) {
85
+ (0, get_git_menu_item_1.openGitSource)({ folder: false, location });
86
+ }
87
+ }, [canOpenInEditor, canOpenInGitHub, defaultEditorId]);
88
+ const openFileLocation = (0, react_1.useCallback)(() => {
89
+ if (validatedLocation) {
90
+ openSourceLocation(validatedLocation);
91
+ }
92
+ }, [openSourceLocation, validatedLocation]);
83
93
  const openComponentLocation = (0, react_1.useCallback)(() => {
84
- if (!componentLocation || !defaultEditorId || !canOpenInEditor) {
85
- return;
94
+ if (componentLocation) {
95
+ openSourceLocation(componentLocation);
86
96
  }
87
- (0, open_in_editor_1.openOriginalPositionInEditor)(componentLocation, defaultEditorId).catch((err) => {
88
- (0, NotificationCenter_1.showNotification)(err.message, 2000);
89
- });
90
- }, [canOpenInEditor, componentLocation, defaultEditorId]);
97
+ }, [componentLocation, openSourceLocation]);
91
98
  const renderCompositionIcon = (0, react_1.useCallback)((color) => {
92
99
  if (!video) {
93
100
  return null;
@@ -95,8 +102,9 @@ const CompositionInspectorHeader = () => {
95
102
  return (0, is_composition_still_1.isCompositionStill)(video) ? (jsx_runtime_1.jsx(still_1.StillIcon, { color: color, style: sourceLocationIconStyle })) : (jsx_runtime_1.jsx(video_1.FilmIcon, { color: color, style: sourceLocationIconStyle }));
96
103
  }, [video]);
97
104
  return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { minHeight: COMPOSITION_INSPECTOR_HEADER_HEIGHT, padding: "4px 0", children: video ? (jsx_runtime_1.jsxs(InspectorLocationCopy_1.InspectorLocationCopy, { location: validatedLocation, name: video.id, openInEditorLocation: componentLocation, children: [
98
- jsx_runtime_1.jsx(InlineCompositionName_1.InlineCompositionName, { compositionId: video.id, stack: (_e = currentComposition === null || currentComposition === void 0 ? void 0 : currentComposition.stack) !== null && _e !== void 0 ? _e : null, compositions: compositions }, video.id), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: validatedLocation, canOpen: validatedLocation !== null && canOpenInEditor, onOpen: openFileLocation, renderIcon: renderCompositionIcon, size: "quick-action" }), compositionComponentInfo === null &&
105
+ jsx_runtime_1.jsx(InlineCompositionName_1.InlineCompositionName, { compositionId: video.id, stack: (_e = currentComposition === null || currentComposition === void 0 ? void 0 : currentComposition.stack) !== null && _e !== void 0 ? _e : null, compositions: compositions }, video.id), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: validatedLocation, canOpen: validatedLocation !== null && (canOpenInEditor || canOpenInGitHub), onOpen: openFileLocation, renderIcon: renderCompositionIcon, size: "quick-action" }), compositionComponentInfo === null &&
99
106
  compositionFile !== null &&
100
- compositionId !== null ? (jsx_runtime_1.jsx("div", { "aria-hidden": true, style: componentLocationPlaceholder })) : (jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: componentLocation, canOpen: componentLocation !== null && canOpenInEditor, onOpen: openComponentLocation, renderIcon: renderReactIcon, size: "quick-action" }))] })) : null }));
107
+ compositionId !== null ? (jsx_runtime_1.jsx("div", { "aria-hidden": true, style: componentLocationPlaceholder })) : (jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: componentLocation, canOpen: componentLocation !== null &&
108
+ (canOpenInEditor || canOpenInGitHub), onOpen: openComponentLocation, renderIcon: renderReactIcon, size: "quick-action" }))] })) : null }));
101
109
  };
102
110
  exports.CompositionInspectorHeader = CompositionInspectorHeader;
@@ -36,7 +36,9 @@ const useConnectedCompositions = ({ track, }) => {
36
36
  };
37
37
  exports.useConnectedCompositions = useConnectedCompositions;
38
38
  const ConnectedCompositionsSection = ({ connectedCompositions }) => {
39
- return (jsx_runtime_1.jsx("div", { style: compositionListStyle, children: connectedCompositions.map((composition) => (jsx_runtime_1.jsx(ConnectedCompositionRow, { composition: composition }, composition.id))) }));
39
+ return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
40
+ jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Connected compositions" }), jsx_runtime_1.jsx("div", { style: compositionListStyle, children: connectedCompositions.map((composition) => (jsx_runtime_1.jsx(ConnectedCompositionRow, { composition: composition }, composition.id))) })
41
+ ] }));
40
42
  };
41
43
  exports.ConnectedCompositionsSection = ConnectedCompositionsSection;
42
44
  const ConnectedCompositionRow = ({ composition }) => {
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import type { CodePosition } from '../../error-overlay/react-overlay/utils/get-source-map';
3
3
  import type { TimelineTrackData } from '../../helpers/get-timeline-sequence-sort-key';
4
4
  type SequenceInspectorSourceLocation = {
5
- readonly canOpenInEditor: boolean;
5
+ readonly canOpen: boolean;
6
6
  readonly openFileLocation: () => void;
7
7
  readonly validatedLocation: CodePosition | null;
8
8
  };
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const client_id_1 = require("../../helpers/client-id");
7
7
  const colors_1 = require("../../helpers/colors");
8
+ const get_git_menu_item_1 = require("../../helpers/get-git-menu-item");
8
9
  const react_2 = require("../../icons/react");
9
10
  const InlineEditableTitle_1 = require("../InlineEditableTitle");
10
11
  const InspectorInfoHeader_1 = require("../InspectorInfoHeader");
@@ -48,6 +49,7 @@ const externalTabIndicatorStyle = {
48
49
  };
49
50
  const useSequenceInspectorSourceLocation = (sequence) => {
50
51
  const { canOpenInEditor, openInEditor, originalLocation } = (0, use_open_sequence_in_apps_1.useOpenSequenceInApps)(sequence);
52
+ const canOpenInGitHub = (0, get_git_menu_item_1.hasReadOnlyGitSource)();
51
53
  const validatedLocation = (0, react_1.useMemo)(() => {
52
54
  var _a;
53
55
  if (!originalLocation ||
@@ -62,13 +64,16 @@ const useSequenceInspectorSourceLocation = (sequence) => {
62
64
  };
63
65
  }, [originalLocation]);
64
66
  const openFileLocation = (0, react_1.useCallback)(() => {
65
- if (!canOpenInEditor) {
67
+ if (canOpenInEditor) {
68
+ openInEditor(null);
66
69
  return;
67
70
  }
68
- openInEditor(null);
69
- }, [canOpenInEditor, openInEditor]);
71
+ if (canOpenInGitHub && validatedLocation) {
72
+ (0, get_git_menu_item_1.openGitSource)({ folder: false, location: validatedLocation });
73
+ }
74
+ }, [canOpenInEditor, canOpenInGitHub, openInEditor, validatedLocation]);
70
75
  return {
71
- canOpenInEditor,
76
+ canOpen: validatedLocation !== null && (canOpenInEditor || canOpenInGitHub),
72
77
  openFileLocation,
73
78
  validatedLocation,
74
79
  };
@@ -105,7 +110,7 @@ const SequenceInspectorHeader = ({ sourceLocation, track }) => {
105
110
  }, [saveName]);
106
111
  return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: true, padding: "4px 0", children: jsx_runtime_1.jsxs(InspectorLocationCopy_1.InspectorLocationCopy, { location: sourceLocation.validatedLocation, name: componentName !== null && componentName !== void 0 ? componentName : null, openInEditorLocation: sourceLocation.validatedLocation, children: [
107
112
  jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: sequenceDisplayName, canRename: canRename, onCommit: onRename, size: "inspector" }), documentationLink ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: false, style: defaultCursor, title: "Open component docs", onClick: openDocumentationLink, children: [componentName, jsx_runtime_1.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", style: externalTabIndicatorStyle, children: jsx_runtime_1.jsx("path", { d: "M4 12 12 4M6 4h6v6", fill: "none", stroke: colors_1.CURRENT_COLOR, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) })
108
- ] })) : (jsx_runtime_1.jsx("div", { style: subtitleStyle, children: componentName })), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: sourceLocation.validatedLocation, canOpen: sourceLocation.canOpenInEditor, onOpen: sourceLocation.openFileLocation, renderIcon: renderReactIcon, size: "quick-action" })
113
+ ] })) : (jsx_runtime_1.jsx("div", { style: subtitleStyle, children: componentName })), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: sourceLocation.validatedLocation, canOpen: sourceLocation.canOpen, onOpen: sourceLocation.openFileLocation, renderIcon: renderReactIcon, size: "quick-action" })
109
114
  ] }) }));
110
115
  };
111
116
  exports.SequenceInspectorHeader = SequenceInspectorHeader;
@@ -168,7 +168,7 @@ const SequenceExpandedInspector = ({ track, readOnlyStudio }) => {
168
168
  return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Sequence inspector unavailable" });
169
169
  }
170
170
  return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, onPointerDown: selectSequenceOnInspectorPointerDown, children: [
171
- jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorHeader, { sourceLocation: sourceLocation, track: track }, stackKey !== null && stackKey !== void 0 ? stackKey : track.sequence.id), jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorDuplicationSection, { track: track }), connectedCompositions.length > 0 ? (jsx_runtime_1.jsx(ConnectedCompositionsSection_1.ConnectedCompositionsSection, { connectedCompositions: connectedCompositions })) : null, validatedLocation ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [jsx_runtime_1.jsx(InspectorSequenceSection_1.InspectorSequenceSection, { sequence: track.sequence, readOnlyStudio: readOnlyStudio, validatedLocation: validatedLocation, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset, renderTransformControls: () => jsx_runtime_1.jsx(AlignmentControls_1.AlignmentControls, { track: track }) }), jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [
171
+ jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorHeader, { sourceLocation: sourceLocation, track: track }, stackKey !== null && stackKey !== void 0 ? stackKey : track.sequence.id), jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorDuplicationSection, { track: track }), connectedCompositions.length > 0 ? (jsx_runtime_1.jsx(ConnectedCompositionsSection_1.ConnectedCompositionsSection, { connectedCompositions: connectedCompositions })) : null, validatedLocation ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [jsx_runtime_1.jsx(InspectorSequenceSection_1.InspectorSequenceSection, { sequence: track.sequence, readOnlyStudio: readOnlyStudio, validatedLocation: validatedLocation, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset, renderTransformControls: () => jsx_runtime_1.jsx(AlignmentControls_1.AlignmentControls, { track: track }) }), jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Actions" }), jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [
172
172
  jsx_runtime_1.jsx(SplitSequenceQuickAction, { selection: sequenceSelection, track: track }), jsx_runtime_1.jsx(SequenceSourceQuickActions, { selection: sequenceSelection, track: track, validatedSource: validatedLocation.source })
173
173
  ] })
174
174
  ] })) : (jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Source controls unavailable" }))] }));
@@ -76,6 +76,7 @@ const inlineLabelText = {
76
76
  minWidth: 0,
77
77
  overflow: 'hidden',
78
78
  textOverflow: 'ellipsis',
79
+ userSelect: 'none',
79
80
  whiteSpace: 'nowrap',
80
81
  };
81
82
  const inlineLabelIcon = {
@@ -169,6 +169,7 @@ exports.detailLabel = {
169
169
  minWidth: 0,
170
170
  overflow: 'hidden',
171
171
  textOverflow: 'ellipsis',
172
+ userSelect: 'none',
172
173
  whiteSpace: 'nowrap',
173
174
  };
174
175
  exports.detailValue = {