@remotion/studio 4.0.518 → 4.0.520

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 (196) hide show
  1. package/dist/api/visual-control.js +2 -2
  2. package/dist/components/AppLaunchButton.d.ts +16 -0
  3. package/dist/components/AppLaunchButton.js +90 -0
  4. package/dist/components/AssetSelector.js +7 -6
  5. package/dist/components/AssetSelectorItem.d.ts +12 -0
  6. package/dist/components/AssetSelectorItem.js +180 -62
  7. package/dist/components/AudioWaveform.js +6 -1
  8. package/dist/components/Button.js +20 -7
  9. package/dist/components/Canvas.js +117 -92
  10. package/dist/components/CanvasOrLoading.js +7 -7
  11. package/dist/components/CodingAgentButton.d.ts +7 -0
  12. package/dist/components/CodingAgentButton.js +59 -0
  13. package/dist/components/CompositionContextButton.d.ts +1 -0
  14. package/dist/components/CompositionContextButton.js +6 -3
  15. package/dist/components/CompositionSelector.js +21 -20
  16. package/dist/components/CompositionSelectorItem.js +23 -35
  17. package/dist/components/ConfigureLicenseModal.js +4 -48
  18. package/dist/components/CurrentAsset.js +1 -1
  19. package/dist/components/CurrentCompositionSideEffects.js +5 -0
  20. package/dist/components/ElementInstallConfirmation.d.ts +2 -10
  21. package/dist/components/ElementInstallConfirmation.js +339 -32
  22. package/dist/components/FixComputedValueModal.js +5 -131
  23. package/dist/components/FpsCounter.js +1 -1
  24. package/dist/components/FramePersistor.js +1 -1
  25. package/dist/components/InitialCompositionLoader.js +3 -2
  26. package/dist/components/InspectorOpenInEditor.js +48 -33
  27. package/dist/components/InspectorPanel/CompositionInspector.js +35 -3
  28. package/dist/components/InspectorPanel/CompositionInspectorHeader.js +22 -14
  29. package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +3 -1
  30. package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +1 -1
  31. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +10 -5
  32. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +5 -4
  33. package/dist/components/InspectorPanel/common.js +1 -0
  34. package/dist/components/InspectorPanel/styles.js +1 -0
  35. package/dist/components/InspectorPanel/use-composition-actions.js +5 -8
  36. package/dist/components/InspectorSequenceSection.js +8 -3
  37. package/dist/components/InspectorSourceLocation.js +5 -1
  38. package/dist/components/KnownBugs.d.ts +1 -1
  39. package/dist/components/KnownBugs.js +1 -1
  40. package/dist/components/LicenseExplanation.d.ts +2 -0
  41. package/dist/components/LicenseExplanation.js +63 -0
  42. package/dist/components/MenuToolbar.js +7 -1
  43. package/dist/components/Modals.js +1 -2
  44. package/dist/components/NewComposition/InputDragger.js +29 -2
  45. package/dist/components/NewComposition/NewCompDuration.js +1 -1
  46. package/dist/components/NewComposition/NewComposition.d.ts +23 -0
  47. package/dist/components/NewComposition/NewComposition.js +217 -80
  48. package/dist/components/{UpdateModal/OpenIssueButton.js → OpenIssueButton.js} +1 -1
  49. package/dist/components/PlayPause.js +2 -13
  50. package/dist/components/PreviewToolbar.js +1 -1
  51. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +2 -1
  52. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +50 -28
  53. package/dist/components/QuickSwitcher/QuickSwitcherResult.d.ts +14 -1
  54. package/dist/components/QuickSwitcher/QuickSwitcherResult.js +64 -9
  55. package/dist/components/QuickSwitcher/composition-search.d.ts +16 -0
  56. package/dist/components/QuickSwitcher/composition-search.js +136 -0
  57. package/dist/components/RenderQueue/actions.d.ts +1 -0
  58. package/dist/components/RenderQueue/actions.js +5 -1
  59. package/dist/components/ResetZoomButton.js +17 -2
  60. package/dist/components/SelectedOutlineCanvasRotation.js +27 -1
  61. package/dist/components/SelectedOutlineElement.js +12 -31
  62. package/dist/components/SelectedOutlineKeyboardControls.d.ts +2 -2
  63. package/dist/components/SelectedOutlineOverlay.d.ts +3 -1
  64. package/dist/components/SelectedOutlineOverlay.js +21 -26
  65. package/dist/components/SelectedOutlinePolygon.d.ts +1 -0
  66. package/dist/components/SelectedOutlinePolygon.js +12 -4
  67. package/dist/components/SelectedOutlineRenderer.js +88 -21
  68. package/dist/components/SettingsContext.js +2 -1
  69. package/dist/components/SettingsModal.d.ts +1 -1
  70. package/dist/components/SettingsModal.js +19 -3
  71. package/dist/components/SidebarRenderButton.d.ts +1 -0
  72. package/dist/components/SidebarRenderButton.js +14 -5
  73. package/dist/components/Timeline/SequencePropsObserver.js +29 -14
  74. package/dist/components/Timeline/Timeline.js +2 -1
  75. package/dist/components/Timeline/TimelineAssetField.js +1 -0
  76. package/dist/components/Timeline/TimelineDeleteKeybindings.js +5 -90
  77. package/dist/components/Timeline/TimelineDragHandler.js +18 -8
  78. package/dist/components/Timeline/TimelineInOutDragHandler.js +2 -3
  79. package/dist/components/Timeline/TimelineKeyframeControls.js +3 -1
  80. package/dist/components/Timeline/TimelinePinchZoom.js +14 -4
  81. package/dist/components/Timeline/TimelinePlayCursorSyncer.js +8 -4
  82. package/dist/components/Timeline/TimelineRowChrome.js +4 -2
  83. package/dist/components/Timeline/TimelineSequence.js +52 -45
  84. package/dist/components/Timeline/TimelineSequenceItem.js +44 -32
  85. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +3 -3
  86. package/dist/components/Timeline/TimelineSlider.js +2 -2
  87. package/dist/components/Timeline/TimelineStack/get-stack.d.ts +1 -0
  88. package/dist/components/Timeline/TimelineStack/get-stack.js +35 -3
  89. package/dist/components/Timeline/TimelineWidthProvider.js +15 -8
  90. package/dist/components/Timeline/TimelineZoomControls.js +25 -8
  91. package/dist/components/Timeline/delete-selected-timeline-item.js +2 -2
  92. package/dist/components/Timeline/duplicate-selected-timeline-item.js +23 -25
  93. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +6 -0
  94. package/dist/components/Timeline/get-sequence-context-menu-items.js +34 -1
  95. package/dist/components/Timeline/sequence-props-subscription-store.d.ts +2 -0
  96. package/dist/components/Timeline/sequence-props-subscription-store.js +22 -1
  97. package/dist/components/Timeline/timeline-scroll-logic.d.ts +1 -0
  98. package/dist/components/Timeline/timeline-scroll-logic.js +21 -17
  99. package/dist/components/Timeline/use-delete-timeline-items.d.ts +1 -0
  100. package/dist/components/Timeline/use-delete-timeline-items.js +118 -0
  101. package/dist/components/Timeline/use-sequence-props-subscription.js +7 -0
  102. package/dist/components/Timeline/use-timeline-asset-drop.js +8 -14
  103. package/dist/components/TimelineCombobox.js +1 -0
  104. package/dist/components/UpdateCheck.d.ts +0 -8
  105. package/dist/components/UpdateCheck.js +7 -54
  106. package/dist/components/UpdateStatusContext.d.ts +18 -0
  107. package/dist/components/UpdateStatusContext.js +74 -0
  108. package/dist/components/UpdatesSettings.d.ts +2 -0
  109. package/dist/components/UpdatesSettings.js +251 -0
  110. package/dist/components/WebMcp.js +64 -11
  111. package/dist/components/ZoomPersistor.js +2 -2
  112. package/dist/components/composition-drag-data.d.ts +36 -0
  113. package/dist/components/composition-drag-data.js +232 -0
  114. package/dist/components/drop-handler-data.d.ts +2 -1
  115. package/dist/components/drop-handler-data.js +6 -4
  116. package/dist/components/effect-drag-and-drop.d.ts +2 -5
  117. package/dist/components/get-open-in-menu-items.d.ts +4 -0
  118. package/dist/components/get-open-in-menu-items.js +28 -24
  119. package/dist/components/handle-drop.js +6 -2
  120. package/dist/components/import-assets.d.ts +5 -13
  121. package/dist/components/root-composition-menu-items.d.ts +4 -1
  122. package/dist/components/root-composition-menu-items.js +38 -1
  123. package/dist/components/selected-outline-geometry.d.ts +21 -2
  124. package/dist/components/selected-outline-geometry.js +16 -5
  125. package/dist/components/selected-outline-measurement.d.ts +40 -1
  126. package/dist/components/selected-outline-measurement.js +239 -1
  127. package/dist/components/selected-outline-order.d.ts +12 -0
  128. package/dist/components/selected-outline-order.js +251 -0
  129. package/dist/components/selected-outline-types.d.ts +15 -2
  130. package/dist/components/selected-outline-uv.js +106 -3
  131. package/dist/components/use-configure-default-apps.d.ts +1 -0
  132. package/dist/components/use-configure-default-apps.js +24 -0
  133. package/dist/error-overlay/current-error.d.ts +13 -0
  134. package/dist/error-overlay/current-error.js +21 -0
  135. package/dist/error-overlay/remotion-overlay/CodeFrame.js +5 -6
  136. package/dist/error-overlay/remotion-overlay/CopyStackTrace.js +1 -1
  137. package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +47 -18
  138. package/dist/error-overlay/remotion-overlay/ErrorLoader.js +6 -2
  139. package/dist/error-overlay/remotion-overlay/ErrorTitle.js +5 -4
  140. package/dist/error-overlay/remotion-overlay/OpenInEditor.js +48 -76
  141. package/dist/error-overlay/remotion-overlay/SearchGitHubIssues.js +1 -1
  142. package/dist/error-overlay/remotion-overlay/ShortcutHint.js +2 -2
  143. package/dist/error-overlay/remotion-overlay/StackFrame.js +13 -8
  144. package/dist/error-overlay/remotion-overlay/Symbolicating.js +1 -1
  145. package/dist/esm/chunk-6jf1natv.js +25 -0
  146. package/dist/esm/{chunk-4bxz1d3g.js → chunk-je0h1bgt.js} +1 -28
  147. package/dist/esm/chunk-m0jqdbkr.js +14571 -0
  148. package/dist/esm/{chunk-7prjt5n5.js → chunk-np6q13k5.js} +18637 -12189
  149. package/dist/esm/index.mjs +4 -3
  150. package/dist/esm/internals.mjs +35826 -14822
  151. package/dist/esm/previewEntry.mjs +40028 -18935
  152. package/dist/esm/renderEntry.mjs +6 -3
  153. package/dist/helpers/can-show-updates.d.ts +5 -0
  154. package/dist/helpers/can-show-updates.js +7 -0
  155. package/dist/helpers/colors.d.ts +0 -3
  156. package/dist/helpers/colors.js +2 -5
  157. package/dist/helpers/create-folder-tree.d.ts +5 -0
  158. package/dist/helpers/create-folder-tree.js +26 -6
  159. package/dist/helpers/document-title.d.ts +2 -0
  160. package/dist/helpers/document-title.js +14 -3
  161. package/dist/helpers/get-asset-metadata.js +1 -1
  162. package/dist/helpers/get-box-quads-polyfill-internals.d.ts +82 -0
  163. package/dist/helpers/get-box-quads-polyfill-internals.js +2403 -0
  164. package/dist/helpers/get-box-quads-ponyfill.d.ts +10 -0
  165. package/dist/helpers/get-box-quads-ponyfill.js +23 -0
  166. package/dist/helpers/get-git-menu-item.d.ts +5 -0
  167. package/dist/helpers/get-git-menu-item.js +15 -1
  168. package/dist/helpers/get-timeline-max-zoom.d.ts +34 -28
  169. package/dist/helpers/get-timeline-max-zoom.js +46 -29
  170. package/dist/helpers/hoverable.js +10 -5
  171. package/dist/helpers/install-fiber-sequence-order-observer.d.ts +37 -0
  172. package/dist/helpers/install-fiber-sequence-order-observer.js +109 -0
  173. package/dist/helpers/open-in-editor.js +53 -2
  174. package/dist/helpers/preview-server-events.js +3 -0
  175. package/dist/helpers/timeline-layout.d.ts +0 -1
  176. package/dist/helpers/timeline-layout.js +1 -5
  177. package/dist/helpers/url-state.d.ts +1 -0
  178. package/dist/helpers/url-state.js +12 -5
  179. package/dist/helpers/use-runtime-values.d.ts +1 -1
  180. package/dist/helpers/use-runtime-values.js +5 -4
  181. package/dist/helpers/use-sync-external-store.d.ts +3 -0
  182. package/dist/helpers/use-sync-external-store.js +5 -0
  183. package/dist/previewEntry.js +2 -0
  184. package/dist/renderEntry.js +2 -0
  185. package/dist/state/folders.d.ts +3 -0
  186. package/dist/state/folders.js +40 -1
  187. package/dist/state/modals.d.ts +19 -8
  188. package/dist/state/timeline-sequence-hover.js +3 -2
  189. package/dist/state/timeline-zoom.d.ts +0 -1
  190. package/dist/state/timeline-zoom.js +13 -6
  191. package/package.json +18 -15
  192. package/dist/components/UpdateModal/UpdateModal.d.ts +0 -6
  193. package/dist/components/UpdateModal/UpdateModal.js +0 -104
  194. package/dist/helpers/sort-by-nonce-history.d.ts +0 -1
  195. package/dist/helpers/sort-by-nonce-history.js +0 -6
  196. /package/dist/components/{UpdateModal/OpenIssueButton.d.ts → OpenIssueButton.d.ts} +0 -0
@@ -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;
@@ -16,10 +16,10 @@ const InspectorSequenceSection_1 = require("../InspectorSequenceSection");
16
16
  const is_menu_item_1 = require("../Menu/is-menu-item");
17
17
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
18
18
  const split_video_from_audio_api_1 = require("../split-video-from-audio-api");
19
- const delete_selected_timeline_item_1 = require("../Timeline/delete-selected-timeline-item");
20
19
  const duplicate_selected_timeline_item_1 = require("../Timeline/duplicate-selected-timeline-item");
21
20
  const split_selected_timeline_item_1 = require("../Timeline/split-selected-timeline-item");
22
21
  const TimelineSelection_1 = require("../Timeline/TimelineSelection");
22
+ const use_delete_timeline_items_1 = require("../Timeline/use-delete-timeline-items");
23
23
  const use_sequence_freeze_frame_menu_item_1 = require("../Timeline/use-sequence-freeze-frame-menu-item");
24
24
  const AlignmentControls_1 = require("./AlignmentControls");
25
25
  const common_1 = require("./common");
@@ -74,6 +74,7 @@ const SequenceSourceQuickActions = ({ selection, track, validatedSource }) => {
74
74
  const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
75
75
  const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
76
76
  const confirm = (0, ConfirmationDialog_1.useConfirmationDialog)();
77
+ const deleteTimelineItems = (0, use_delete_timeline_items_1.useDeleteTimelineItems)();
77
78
  const propStatusesForOverride = (0, react_1.useMemo)(() => remotion_1.Internals.getPropStatusesCtx(propStatuses, selection.nodePathInfo.sequenceSubscriptionKey), [propStatuses, selection.nodePathInfo.sequenceSubscriptionKey]);
78
79
  const freezeFrameMenuItem = (0, use_sequence_freeze_frame_menu_item_1.getSequenceFreezeFrameMenuItem)({
79
80
  clientId: previewServerState.type === 'connected' && (0, interactivity_enabled_1.isStudioInteractivityEnabled)()
@@ -98,8 +99,8 @@ const SequenceSourceQuickActions = ({ selection, track, validatedSource }) => {
98
99
  if (sourceActionsDisabled) {
99
100
  return;
100
101
  }
101
- (0, delete_selected_timeline_item_1.deleteSequencesFromSource)([selection.nodePathInfo], confirm).catch(() => undefined);
102
- }, [confirm, selection.nodePathInfo, sourceActionsDisabled]);
102
+ deleteTimelineItems([selection]);
103
+ }, [deleteTimelineItems, selection, sourceActionsDisabled]);
103
104
  const splitVideoFromAudioDisabledReason = sourceActionsDisabled
104
105
  ? 'Studio is read-only'
105
106
  : selection.nodePathInfo.numberOfSequencesWithThisNodePath > 1
@@ -168,7 +169,7 @@ const SequenceExpandedInspector = ({ track, readOnlyStudio }) => {
168
169
  return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Sequence inspector unavailable" });
169
170
  }
170
171
  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: [
172
+ 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
173
  jsx_runtime_1.jsx(SplitSequenceQuickAction, { selection: sequenceSelection, track: track }), jsx_runtime_1.jsx(SequenceSourceQuickActions, { selection: sequenceSelection, track: track, validatedSource: validatedLocation.source })
173
174
  ] })
174
175
  ] })) : (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 = {
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useCompositionActions = void 0;
4
- const studio_protocol_1 = require("@remotion/studio-protocol");
5
4
  const react_1 = require("react");
6
5
  const remotion_1 = require("remotion");
7
6
  const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
@@ -173,7 +172,7 @@ const useCompositionActions = () => {
173
172
  });
174
173
  }, [canInsertAsset, onAssetSelected, onFilesSelected, setSelectedModal]);
175
174
  const onCompositionSelected = (0, react_1.useCallback)(async (composition) => {
176
- var _a, _b, _c, _d, _e;
175
+ var _a, _b;
177
176
  if (!canInsertComposition ||
178
177
  currentCompositionId === null ||
179
178
  compositionFile === null) {
@@ -185,14 +184,12 @@ const useCompositionActions = () => {
185
184
  ? await (0, get_stack_1.getOriginalLocationFromStack)(composition.stack, 'sequence')
186
185
  : null;
187
186
  const selectedCompositionFile = (_b = (_a = resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source) !== null && _a !== void 0 ? _a : browserStudioOperations === null || browserStudioOperations === void 0 ? void 0 : browserStudioOperations.getCompositionFile(composition.id)) !== null && _b !== void 0 ? _b : null;
188
- const compositionDragData = studio_protocol_1.StudioProtocolInternals.makeDragData({
189
- type: 'composition',
187
+ const compositionDragData = {
188
+ type: 'remotion-composition',
189
+ version: 1,
190
190
  compositionFile: selectedCompositionFile,
191
191
  compositionId: composition.id,
192
- width: (_c = composition.width) !== null && _c !== void 0 ? _c : null,
193
- height: (_d = composition.height) !== null && _d !== void 0 ? _d : null,
194
- durationInFrames: (_e = composition.durationInFrames) !== null && _e !== void 0 ? _e : null,
195
- }).data;
192
+ };
196
193
  await (0, import_assets_1.insertComposition)({
197
194
  composition: compositionDragData,
198
195
  compositionFile,
@@ -21,6 +21,7 @@ const InlineCaptionInspector_1 = require("./InlineCaptionInspector");
21
21
  const CollapsibleInspectorSectionHeader_1 = require("./InspectorPanel/CollapsibleInspectorSectionHeader");
22
22
  const common_1 = require("./InspectorPanel/common");
23
23
  const inspector_section_collapse_1 = require("./InspectorPanel/inspector-section-collapse");
24
+ const styles_1 = require("./InspectorPanel/styles");
24
25
  const asset_search_1 = require("./QuickSwitcher/asset-search");
25
26
  const border_radius_representation_1 = require("./Timeline/border-radius-representation");
26
27
  const save_sequence_prop_1 = require("./Timeline/save-sequence-prop");
@@ -51,6 +52,10 @@ const plusIcon = {
51
52
  width: 15,
52
53
  height: 15,
53
54
  };
55
+ const effectsHeaderTitle = {
56
+ ...styles_1.sectionHeaderTitle,
57
+ flexShrink: 1,
58
+ };
54
59
  const borderRadiusToggleIcon = {
55
60
  flexShrink: 0,
56
61
  height: 15,
@@ -411,7 +416,6 @@ const InspectorSequenceSection = ({ sequence, readOnlyStudio, validatedLocation,
411
416
  });
412
417
  }, [isAdditionalSectionExpanded, nodePathInfo]);
413
418
  const captionsExpanded = isAdditionalSectionExpanded('captions');
414
- const effectsExpanded = isAdditionalSectionExpanded('effects');
415
419
  const visibleControlRows = controlGroups.flatMap((group) => {
416
420
  return isControlGroupExpanded(group) ? group.rows : [];
417
421
  });
@@ -495,7 +499,8 @@ const InspectorSequenceSection = ({ sequence, readOnlyStudio, validatedLocation,
495
499
  : show3DTransformControls
496
500
  ? 'Hide 3D transform controls'
497
501
  : 'Show 3D transform controls', hoveredColor: show3DTransformControls ? colors_1.BLUE : undefined, unhoveredColor: show3DTransformControls ? colors_1.BLUE : colors_1.LIGHT_TEXT, renderAction: (color) => (jsx_runtime_1.jsx(cube_1.CubeIcon, { color: color, style: transform3DToggleIcon })) }));
498
- const effectsHeader = (jsx_runtime_1.jsx(CollapsibleInspectorSectionHeader_1.CollapsibleInspectorSectionHeader, { action: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, disabled: !canAddEffect, onClick: onAddEffect, title: canAddEffect ? 'Add effect' : undefined, renderAction: (color) => jsx_runtime_1.jsx(plus_1.Plus, { color: color, style: plusIcon }) }), expanded: effectsExpanded, label: "Effects", onToggle: () => toggleAdditionalSection('effects') }));
502
+ const effectsHeader = (jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderRow, children: [
503
+ jsx_runtime_1.jsx("div", { style: effectsHeaderTitle, children: "Effects" }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, disabled: !canAddEffect, onClick: onAddEffect, title: canAddEffect ? 'Add effect' : undefined, renderAction: (color) => jsx_runtime_1.jsx(plus_1.Plus, { color: color, style: plusIcon }) })] }));
499
504
  const renderRow = ({ node, depth }) => {
500
505
  return (jsx_runtime_1.jsx(TimelineRowLayoutContext_1.TimelineRowLayoutContext.Provider, { value: TimelineRowLayoutContext_1.INSPECTOR_TIMELINE_ROW_LAYOUT, children: jsx_runtime_1.jsx(TimelineExpandedRow_1.TimelineExpandedRow, { node: node, depth: depth, nestedDepth: 0, rowDepthBase: 0, getIsExpanded: getIsExpanded, toggleTrack: toggleTrack, validatedLocation: validatedLocation, nodePath: nodePathInfo.sequenceSubscriptionKey, schema: schema, keyframeDisplayOffset: keyframeDisplayOffset, keyframeControlsMode: "inspector" }) }, JSON.stringify(node.nodePathInfo)));
501
506
  };
@@ -514,7 +519,7 @@ const InspectorSequenceSection = ({ sequence, readOnlyStudio, validatedLocation,
514
519
  inlineCaptions === null) {
515
520
  return (jsx_runtime_1.jsx("div", { style: container, children: jsx_runtime_1.jsx(common_1.InspectorSection, { header: "Controls", children: jsx_runtime_1.jsx("div", { style: emptyState, children: "No schema" }) }) }));
516
521
  }
517
- return (jsx_runtime_1.jsx(TimelineAssetField_1.AssetSelectionContext.Provider, { value: assetSelectionContextValue, children: jsx_runtime_1.jsxs("div", { style: container, children: [controlRows.length > 0 ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionOrderProvider, { items: controlSelectableItems, children: controlGroupsWithoutLayout.map((group) => (jsx_runtime_1.jsx(common_1.InspectorSection, { header: renderControlGroupHeader(group), children: isControlGroupExpanded(group) ? (group.id === 'transforms' ? (jsx_runtime_1.jsxs(Transform3DModeContext_1.Transform3DModeContext.Provider, { value: show3DTransformControls, children: [renderTransformControls(), group.rows.map(renderRow)] })) : (group.rows.map(renderRow))) : null }, group.id))) })) : null, inlineCaptions ? (jsx_runtime_1.jsx(InlineCaptionInspector_1.InlineCaptionInspector, { captions: inlineCaptions, controls: sequence.controls, expanded: captionsExpanded, nodePath: nodePathInfo.sequenceSubscriptionKey, onToggle: () => toggleAdditionalSection('captions'), readOnlyStudio: readOnlyStudio, validatedLocation: validatedLocation })) : null, showEffectsSection ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: effectsHeader, children: effectsExpanded && effectRows.length > 0 ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionOrderProvider, { items: effectSelectableItems, children: effectRows.map(renderRow) })) : null })) : null, layoutGroup ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionOrderProvider, { items: controlSelectableItems, children: jsx_runtime_1.jsx(common_1.InspectorSection, { header: renderControlGroupHeader(layoutGroup), children: isControlGroupExpanded(layoutGroup)
522
+ return (jsx_runtime_1.jsx(TimelineAssetField_1.AssetSelectionContext.Provider, { value: assetSelectionContextValue, children: jsx_runtime_1.jsxs("div", { style: container, children: [controlRows.length > 0 ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionOrderProvider, { items: controlSelectableItems, children: controlGroupsWithoutLayout.map((group) => (jsx_runtime_1.jsx(common_1.InspectorSection, { header: renderControlGroupHeader(group), children: isControlGroupExpanded(group) ? (group.id === 'transforms' ? (jsx_runtime_1.jsxs(Transform3DModeContext_1.Transform3DModeContext.Provider, { value: show3DTransformControls, children: [renderTransformControls(), group.rows.map(renderRow)] })) : (group.rows.map(renderRow))) : null }, group.id))) })) : null, inlineCaptions ? (jsx_runtime_1.jsx(InlineCaptionInspector_1.InlineCaptionInspector, { captions: inlineCaptions, controls: sequence.controls, expanded: captionsExpanded, nodePath: nodePathInfo.sequenceSubscriptionKey, onToggle: () => toggleAdditionalSection('captions'), readOnlyStudio: readOnlyStudio, validatedLocation: validatedLocation })) : null, showEffectsSection ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: effectsHeader, children: effectRows.length > 0 ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionOrderProvider, { items: effectSelectableItems, children: effectRows.map(renderRow) })) : null })) : null, layoutGroup ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionOrderProvider, { items: controlSelectableItems, children: jsx_runtime_1.jsx(common_1.InspectorSection, { header: renderControlGroupHeader(layoutGroup), children: isControlGroupExpanded(layoutGroup)
518
523
  ? layoutGroup.rows.map(renderRow)
519
524
  : null }) })) : null] }) }));
520
525
  };
@@ -27,9 +27,13 @@ const sourceLocationStyle = {
27
27
  textAlign: 'left',
28
28
  textDecoration: 'none',
29
29
  textOverflow: 'ellipsis',
30
+ userSelect: 'none',
30
31
  whiteSpace: 'nowrap',
31
32
  width: 'fit-content',
32
33
  };
34
+ const quickActionStyle = {
35
+ userSelect: 'none',
36
+ };
33
37
  const sourceLocationLabelStyle = {
34
38
  color: 'inherit',
35
39
  display: 'block',
@@ -82,7 +86,7 @@ const InspectorSourceLocation = ({ location, canOpen, onOpen, renderIcon, size =
82
86
  return null;
83
87
  }
84
88
  if (size === 'quick-action') {
85
- return (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canOpen, onClick: onClick, renderIcon: (iconColor) => renderIcon === null || renderIcon === void 0 ? void 0 : renderIcon(iconColor), title: fileLocation !== null && fileLocation !== void 0 ? fileLocation : undefined, children: label }));
89
+ return (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canOpen, onClick: onClick, renderIcon: (iconColor) => renderIcon === null || renderIcon === void 0 ? void 0 : renderIcon(iconColor), style: quickActionStyle, title: fileLocation !== null && fileLocation !== void 0 ? fileLocation : undefined, children: label }));
86
90
  }
87
91
  return (jsx_runtime_1.jsxs("button", { type: "button", style: style, title: fileLocation !== null && fileLocation !== void 0 ? fileLocation : undefined, onClick: onClick, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), children: [renderIcon ? renderIcon(color) : null, jsx_runtime_1.jsx("span", { style: sourceLocationLabelStyle, children: label })
88
92
  ] }));
@@ -1,4 +1,4 @@
1
- import type { Bug } from './UpdateCheck';
1
+ import type { Bug } from './UpdateStatusContext';
2
2
  export declare const KnownBugs: React.FC<{
3
3
  bugs: Bug[];
4
4
  }>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.KnownBugs = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const OpenIssueButton_1 = require("./UpdateModal/OpenIssueButton");
5
+ const OpenIssueButton_1 = require("./OpenIssueButton");
6
6
  const container = {
7
7
  display: 'flex',
8
8
  flexDirection: 'row',
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const LicenseExplanation: React.FC;