@remotion/studio 4.0.524 → 4.0.526

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/dist/api/focus-default-props-path.js +7 -1
  2. package/dist/api/restart-studio.d.ts +1 -1
  3. package/dist/api/restart-studio.js +1 -1
  4. package/dist/components/ActionTooltip.d.ts +2 -0
  5. package/dist/components/ActionTooltip.js +14 -4
  6. package/dist/components/AgentPrompt.d.ts +6 -0
  7. package/dist/components/AgentPrompt.js +107 -0
  8. package/dist/components/AppLaunchButton.js +2 -0
  9. package/dist/components/AssetFileIcon.js +2 -0
  10. package/dist/components/AssetSelectorItem.d.ts +1 -23
  11. package/dist/components/AssetSelectorItem.js +10 -200
  12. package/dist/components/AssetSelectorModal.d.ts +6 -0
  13. package/dist/components/AssetSelectorModal.js +174 -0
  14. package/dist/components/Canvas.js +21 -4
  15. package/dist/components/CaptionInspector.js +9 -3
  16. package/dist/components/CheckboardToggle.js +2 -1
  17. package/dist/{error-overlay/remotion-overlay → components}/CodeFrame.d.ts +2 -0
  18. package/dist/components/CodeFrame.js +77 -0
  19. package/dist/components/ColorPicker/AlphaSlider.js +1 -1
  20. package/dist/components/ColorPicker/HueSlider.js +1 -1
  21. package/dist/components/ColorPicker/SaturationValueArea.js +1 -1
  22. package/dist/components/CompositionSelector.js +1 -0
  23. package/dist/components/CompositionSelectorItem.js +7 -17
  24. package/dist/components/CurrentAsset.js +5 -4
  25. package/dist/components/EditorGuides/Guide.js +1 -1
  26. package/dist/components/ElementInstallConfirmation.js +100 -61
  27. package/dist/components/FilePreview.js +4 -0
  28. package/dist/components/FixComputedValueModal.js +64 -96
  29. package/dist/components/FullscreenToggle.js +1 -1
  30. package/dist/components/GenerateWithAgentModal.d.ts +9 -0
  31. package/dist/components/GenerateWithAgentModal.js +39 -0
  32. package/dist/components/GlobalKeybindings.js +14 -0
  33. package/dist/components/InlineEditableTitle.js +2 -0
  34. package/dist/components/InspectorLocationCopy.js +1 -1
  35. package/dist/components/InspectorOpenInEditor.d.ts +1 -0
  36. package/dist/components/InspectorOpenInEditor.js +25 -18
  37. package/dist/components/InspectorPanel/CollapsibleInspectorSection.d.ts +7 -0
  38. package/dist/components/InspectorPanel/CollapsibleInspectorSection.js +14 -0
  39. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.d.ts +1 -1
  40. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +19 -8
  41. package/dist/components/InspectorPanel/CompositionInspector.js +30 -13
  42. package/dist/components/InspectorPanel/CompositionInspectorHeader.js +6 -7
  43. package/dist/components/InspectorPanel/CompositionMetadata.js +4 -0
  44. package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +6 -12
  45. package/dist/components/InspectorPanel/ElementLibraryButton.js +2 -0
  46. package/dist/components/InspectorPanel/GuideInspector.js +2 -3
  47. package/dist/components/InspectorPanel/KeyframeSettings.js +5 -6
  48. package/dist/components/InspectorPanel/MultiSequenceInspector.js +2 -1
  49. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +4 -12
  50. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +4 -3
  51. package/dist/components/InspectorPanel/common.d.ts +4 -0
  52. package/dist/components/InspectorPanel/common.js +14 -2
  53. package/dist/components/InspectorPanel/styles.d.ts +0 -3
  54. package/dist/components/InspectorPanel/styles.js +1 -27
  55. package/dist/components/InspectorPanel/use-composition-actions.d.ts +2 -0
  56. package/dist/components/InspectorPanel/use-composition-actions.js +15 -0
  57. package/dist/components/InspectorPanel/use-inspector-section-expanded.d.ts +1 -0
  58. package/dist/components/InspectorPanel/use-inspector-section-expanded.js +21 -0
  59. package/dist/components/InspectorSequenceSection.js +61 -43
  60. package/dist/components/InspectorSourceLocation.js +1 -0
  61. package/dist/components/KeyboardShortcutsSettings.js +12 -4
  62. package/dist/components/LoopToggle.js +2 -1
  63. package/dist/components/LutPreview.d.ts +4 -0
  64. package/dist/components/LutPreview.js +192 -0
  65. package/dist/components/Menu/MenuItem.js +1 -2
  66. package/dist/components/MenuBuildIndicator.js +1 -1
  67. package/dist/components/MenuCompositionName.js +4 -9
  68. package/dist/components/Modals.js +4 -6
  69. package/dist/components/ModelsSettings.js +15 -4
  70. package/dist/components/MuteToggle.js +2 -1
  71. package/dist/components/NewComposition/CodemodFooter.js +1 -0
  72. package/dist/components/NewComposition/DeleteComposition.js +42 -6
  73. package/dist/components/NewComposition/DeleteFolder.js +1 -0
  74. package/dist/components/NewComposition/DuplicateComposition.js +5 -0
  75. package/dist/components/NewComposition/InputDragger.js +2 -2
  76. package/dist/components/NewComposition/NewFolder.js +29 -2
  77. package/dist/components/NewComposition/RenameFolder.js +1 -0
  78. package/dist/components/NewComposition/duplicate-composition-api.d.ts +3 -2
  79. package/dist/components/NewComposition/duplicate-composition-api.js +9 -2
  80. package/dist/components/OutlineToggle.js +2 -1
  81. package/dist/components/PlayPause.js +1 -1
  82. package/dist/components/Preview.js +0 -3
  83. package/dist/components/PreviewToolbar.js +3 -6
  84. package/dist/components/PreviewToolbarOverflowButton.js +2 -1
  85. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
  86. package/dist/components/QuickSwitcher/QuickSwitcherResult.js +4 -9
  87. package/dist/components/RenderButton.js +40 -4
  88. package/dist/components/RenderModal/SchemaEditor/scroll-to-default-props-path.d.ts +1 -0
  89. package/dist/components/RenderModal/SchemaEditor/scroll-to-default-props-path.js +2 -1
  90. package/dist/components/RenderModal/WebRenderModal.js +10 -2
  91. package/dist/components/RenderModal/WebRenderModalBasic.js +1 -1
  92. package/dist/components/RenderModal/render-modals.js +3 -0
  93. package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +1 -1
  94. package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +1 -1
  95. package/dist/components/RenderQueue/actions.d.ts +2 -1
  96. package/dist/components/RenderQueue/actions.js +2 -1
  97. package/dist/components/RendersTab.js +2 -0
  98. package/dist/components/RulersAndGuidesToggle.js +2 -1
  99. package/dist/components/SegmentedButton.d.ts +1 -0
  100. package/dist/components/SegmentedButton.js +9 -3
  101. package/dist/components/SelectedOutlineElement.js +22 -6
  102. package/dist/components/SelectedOutlinePolygon.js +4 -2
  103. package/dist/components/SettingsButton.js +11 -2
  104. package/dist/components/SettingsContext.d.ts +8 -0
  105. package/dist/components/SettingsContext.js +57 -2
  106. package/dist/components/SettingsModal.d.ts +1 -2
  107. package/dist/components/SettingsModal.js +27 -6
  108. package/dist/components/SettingsModalFooter.js +17 -3
  109. package/dist/components/SidebarCollapserControls.js +1 -1
  110. package/dist/components/SkillsSettings.d.ts +5 -0
  111. package/dist/components/SkillsSettings.js +49 -15
  112. package/dist/components/SnappingToggle.js +2 -1
  113. package/dist/components/Splitter/SplitterHandle.js +1 -2
  114. package/dist/components/Tabs/vertical.d.ts +1 -1
  115. package/dist/components/Tabs/vertical.js +16 -2
  116. package/dist/components/Timeline/EasingEditorModal.js +2 -2
  117. package/dist/components/Timeline/Timeline.js +10 -11
  118. package/dist/components/Timeline/TimelineAssetField.js +178 -9
  119. package/dist/components/Timeline/TimelineDragHandler.js +1 -2
  120. package/dist/components/Timeline/TimelineEffectItem.d.ts +1 -0
  121. package/dist/components/Timeline/TimelineEffectItem.js +2 -2
  122. package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
  123. package/dist/components/Timeline/TimelineEffectPropItem.js +2 -2
  124. package/dist/components/Timeline/TimelineExpandedRow.js +2 -2
  125. package/dist/components/Timeline/TimelineHeightContainer.js +11 -1
  126. package/dist/components/Timeline/TimelineInOutDragHandler.js +1 -2
  127. package/dist/components/Timeline/TimelineKeyframeControls.js +15 -1
  128. package/dist/components/Timeline/TimelineLayerChildren.d.ts +3 -3
  129. package/dist/components/Timeline/TimelineLayerChildren.js +11 -9
  130. package/dist/components/Timeline/TimelineLayerEye.d.ts +1 -1
  131. package/dist/components/Timeline/TimelineLayerEye.js +6 -3
  132. package/dist/components/Timeline/TimelineList.js +9 -3
  133. package/dist/components/Timeline/TimelineSchemaField.js +10 -7
  134. package/dist/components/Timeline/TimelineSelection.d.ts +17 -4
  135. package/dist/components/Timeline/TimelineSelection.js +121 -52
  136. package/dist/components/Timeline/TimelineSequence.js +8 -8
  137. package/dist/components/Timeline/TimelineSequenceItem.d.ts +2 -0
  138. package/dist/components/Timeline/TimelineSequenceItem.js +29 -23
  139. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +3 -12
  140. package/dist/components/Timeline/TimelineTranslateField.js +25 -12
  141. package/dist/components/Timeline/TimelineVirtualization.d.ts +3 -3
  142. package/dist/components/Timeline/TimelineZoomControls.js +1 -1
  143. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +3 -1
  144. package/dist/components/Timeline/get-sequence-context-menu-items.js +152 -51
  145. package/dist/components/Timeline/normalize-font-weight-for-keyframe.d.ts +1 -0
  146. package/dist/components/Timeline/normalize-font-weight-for-keyframe.js +19 -0
  147. package/dist/components/Timeline/timeline-display-groups.d.ts +9 -0
  148. package/dist/components/Timeline/timeline-display-groups.js +66 -0
  149. package/dist/components/Timeline/timeline-field-display-utils.js +4 -2
  150. package/dist/components/Timeline/timeline-translate-utils.d.ts +17 -0
  151. package/dist/components/Timeline/timeline-translate-utils.js +53 -12
  152. package/dist/components/Timeline/use-open-sequence-in-apps.d.ts +2 -0
  153. package/dist/components/Timeline/use-open-sequence-in-apps.js +17 -0
  154. package/dist/components/Timeline/use-timeline-asset-drop.js +20 -6
  155. package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +2 -1
  156. package/dist/components/Timeline/use-timeline-expanded-tree.js +1 -2
  157. package/dist/components/Timeline/use-timeline-keyframe-drag.js +4 -4
  158. package/dist/components/TimelineCombobox.js +1 -0
  159. package/dist/components/UndoRedoButtons.js +11 -0
  160. package/dist/components/UpdateStatusContext.d.ts +2 -2
  161. package/dist/components/UpdateStatusContext.js +6 -7
  162. package/dist/components/UpdatesSettings.js +6 -6
  163. package/dist/components/WebMcp.js +40 -41
  164. package/dist/components/asset-context-menu.d.ts +32 -0
  165. package/dist/components/asset-context-menu.js +242 -0
  166. package/dist/components/composition-menu-items.d.ts +4 -6
  167. package/dist/components/composition-menu-items.js +212 -42
  168. package/dist/components/folder-menu-items.js +44 -0
  169. package/dist/components/get-open-in-menu-items.d.ts +6 -5
  170. package/dist/components/get-open-in-menu-items.js +16 -10
  171. package/dist/components/import-assets.d.ts +24 -1
  172. package/dist/components/import-assets.js +3 -1
  173. package/dist/components/keyboard-shortcuts.d.ts +4 -4
  174. package/dist/components/keyboard-shortcuts.js +5 -0
  175. package/dist/components/selected-outline-order.js +18 -12
  176. package/dist/components/use-open-in-menu-apps.d.ts +14 -0
  177. package/dist/components/use-open-in-menu-apps.js +33 -0
  178. package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +2 -2
  179. package/dist/error-overlay/remotion-overlay/OpenInEditor.d.ts +1 -0
  180. package/dist/error-overlay/remotion-overlay/OpenInEditor.js +3 -3
  181. package/dist/error-overlay/remotion-overlay/StackFrame.d.ts +5 -1
  182. package/dist/error-overlay/remotion-overlay/StackFrame.js +26 -19
  183. package/dist/esm/{LazyModels-hc33szyn.mjs → LazyModels-mtggyjye.mjs} +3 -3
  184. package/dist/esm/{LazyModels-sg40rjw6.mjs → LazyModels-nk7py0zt.mjs} +3 -3
  185. package/dist/esm/{TranscriptionModal-3ctnxpt6.mjs → TranscriptionModal-ymnx1c7m.mjs} +6 -6
  186. package/dist/esm/{VideoMattingModal-b0r7e60n.mjs → VideoMattingModal-05vpczks.mjs} +6 -6
  187. package/dist/esm/{index-er3mh6em.mjs → index-0gewwxse.mjs} +7031 -5834
  188. package/dist/esm/{index-q5xv20xx.mjs → index-4dsz9035.mjs} +8 -8
  189. package/dist/esm/{index-wbmp5srk.mjs → index-5bfxbpca.mjs} +1 -1
  190. package/dist/esm/{index-e3zwf3e7.mjs → index-5gd8k9yv.mjs} +1 -1
  191. package/dist/esm/{index-c37kme2v.mjs → index-bs39wngg.mjs} +4929 -3801
  192. package/dist/esm/{index-yfrysr5f.mjs → index-cdy8v54v.mjs} +17 -3
  193. package/dist/esm/{index-9qtvmwtx.mjs → index-eb5txqp6.mjs} +12 -9
  194. package/dist/esm/{index-q2epbw93.mjs → index-f97r9e2g.mjs} +4 -21
  195. package/dist/esm/{index-2j3d1g81.mjs → index-g7k2dvar.mjs} +1 -1
  196. package/dist/esm/{index-1b9skrrd.mjs → index-x40wwfmt.mjs} +3 -3
  197. package/dist/esm/index.mjs +12 -6
  198. package/dist/esm/internals.mjs +7 -7
  199. package/dist/esm/previewEntry.mjs +7 -7
  200. package/dist/helpers/client-id.d.ts +1 -0
  201. package/dist/helpers/client-id.js +8 -4
  202. package/dist/helpers/cube-lut.d.ts +12 -0
  203. package/dist/helpers/cube-lut.js +160 -0
  204. package/dist/helpers/get-git-menu-item.d.ts +4 -0
  205. package/dist/helpers/get-git-menu-item.js +8 -1
  206. package/dist/helpers/get-preview-file-type.d.ts +1 -1
  207. package/dist/helpers/get-preview-file-type.js +3 -0
  208. package/dist/helpers/get-sequence-double-click-action.d.ts +3 -3
  209. package/dist/helpers/get-sequence-double-click-action.js +2 -2
  210. package/dist/helpers/open-in-editor.d.ts +5 -2
  211. package/dist/helpers/open-in-editor.js +12 -4
  212. package/dist/helpers/pointer-session.d.ts +1 -0
  213. package/dist/helpers/pointer-session.js +10 -1
  214. package/dist/helpers/settings-tab-availability.d.ts +14 -0
  215. package/dist/helpers/settings-tab-availability.js +35 -0
  216. package/dist/helpers/studio-runtime-config.d.ts +1 -1
  217. package/dist/helpers/use-create-composition.js +5 -0
  218. package/dist/helpers/use-keybinding.d.ts +1 -1
  219. package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
  220. package/dist/helpers/use-media-metadata.js +5 -1
  221. package/dist/helpers/use-menu-structure.js +21 -13
  222. package/dist/helpers/use-rename-composition.js +6 -1
  223. package/dist/icons/lut.d.ts +4 -0
  224. package/dist/icons/lut.js +6 -0
  225. package/dist/icons/sparkles.d.ts +4 -0
  226. package/dist/icons/sparkles.js +6 -0
  227. package/dist/state/modals.d.ts +25 -3
  228. package/dist/state/z-index.js +1 -3
  229. package/package.json +19 -19
  230. package/dist/error-overlay/remotion-overlay/CodeFrame.js +0 -62
@@ -28,13 +28,13 @@ const dropdownSegmentStyle = {
28
28
  width: 20,
29
29
  };
30
30
  const editorButtonIconSize = 18;
31
- const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locationType }) => {
31
+ const githubButtonIconSize = 16;
32
+ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locationType, showTooltips, }) => {
32
33
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
33
34
  const configureDefaultApps = (0, use_configure_default_apps_1.useConfigureDefaultApps)();
34
35
  const { canConfigureApps, canOpenInEditor, defaultEditorId, defaultEditorName, editorInfo, } = (0, use_default_editor_info_1.useEditorOpening)(previewServerState.type === 'connected');
35
36
  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;
37
+ const defaultOpenInTarget = (0, get_git_menu_item_1.getDefaultOpenInTarget)({ canOpenInEditor });
38
38
  const openWithEditor = (0, react_1.useCallback)(async (editorId) => {
39
39
  if (!location) {
40
40
  return;
@@ -57,35 +57,37 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
57
57
  (0, NotificationCenter_1.showNotification)(err.message, 2000);
58
58
  }
59
59
  }, [contextForAgents]);
60
- const defaultAppName = defaultActionIsGitHub
60
+ const defaultAppName = defaultOpenInTarget === 'git-source'
61
61
  ? 'GitHub'
62
62
  : (defaultEditorName !== null && defaultEditorName !== void 0 ? defaultEditorName : 'default editor');
63
- const canOpenDefault = location !== null && (canOpenInEditor || canOpenInGitHub);
63
+ const canOpenDefault = location !== null && defaultOpenInTarget !== null;
64
64
  const onOpenDefault = (0, react_1.useCallback)((event) => {
65
65
  event.stopPropagation();
66
- if (defaultActionIsGitHub) {
66
+ if (defaultOpenInTarget === 'git-source') {
67
67
  (0, get_git_menu_item_1.openGitSource)({ folder: locationType === 'folder', location });
68
68
  }
69
- else if (defaultEditorId) {
69
+ else if (defaultOpenInTarget === 'editor' && defaultEditorId) {
70
70
  openWithEditor(defaultEditorId).catch(() => undefined);
71
71
  }
72
72
  }, [
73
- defaultActionIsGitHub,
74
73
  defaultEditorId,
74
+ defaultOpenInTarget,
75
75
  location,
76
76
  locationType,
77
77
  openWithEditor,
78
78
  ]);
79
79
  const menuItems = (0, react_1.useMemo)(() => {
80
80
  const items = (0, get_open_in_menu_items_1.getOpenInMenuItems)({
81
+ canOpenDesktopApps: canConfigureApps,
81
82
  codingAgentInfo,
82
83
  editorDisabled: location === null || !canOpenInEditor,
83
84
  editorInfo,
84
85
  excludeCodingAgentId: null,
85
86
  excludeEditorId: defaultEditorId,
87
+ excludeGitSource: defaultOpenInTarget === 'git-source',
86
88
  fileManagerDisabled: !(location === null || location === void 0 ? void 0 : location.source) || previewServerState.type !== 'connected',
87
89
  folder: locationType === 'folder',
88
- location,
90
+ gitSourceDisabled: location === null,
89
91
  onConfigureApps: configureDefaultApps,
90
92
  onOpenInCodingAgent: (codingAgentId, codingAgentName) => {
91
93
  openWithCodingAgent(codingAgentId, codingAgentName).catch(() => undefined);
@@ -112,6 +114,9 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
112
114
  (0, NotificationCenter_1.showNotification)(`Could not open Git client: ${err.message}`, 2000);
113
115
  });
114
116
  },
117
+ onOpenInGitSource: () => {
118
+ (0, get_git_menu_item_1.openGitSource)({ folder: locationType === 'folder', location });
119
+ },
115
120
  onOpenInTerminal: (terminalId) => {
116
121
  if (!(location === null || location === void 0 ? void 0 : location.source) || locationType !== 'folder') {
117
122
  return;
@@ -127,15 +132,14 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
127
132
  });
128
133
  },
129
134
  });
130
- return defaultActionIsGitHub
131
- ? items.filter((item) => item.id !== 'open-in-github')
132
- : items;
135
+ return items;
133
136
  }, [
134
137
  codingAgentInfo,
138
+ canConfigureApps,
135
139
  canOpenInEditor,
136
140
  configureDefaultApps,
137
- defaultActionIsGitHub,
138
141
  defaultEditorId,
142
+ defaultOpenInTarget,
139
143
  editorInfo,
140
144
  location,
141
145
  locationType,
@@ -152,10 +156,11 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
152
156
  idleColor: colors_1.LIGHT_TEXT,
153
157
  onClick: onOpenDefault,
154
158
  onPointerDown: null,
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 }))] })),
159
+ renderContent: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [label, defaultOpenInTarget === 'git-source' ? (jsx_runtime_1.jsx(github_1.GitHubIcon, { size: githubButtonIconSize })) : (jsx_runtime_1.jsx(editor_1.EditorIcon, { editorId: defaultEditorId, size: editorButtonIconSize }))] })),
156
160
  segmentId: 'default-editor',
157
161
  style: mainSegmentStyle,
158
- title: `Open in ${defaultAppName}`,
162
+ title: showTooltips ? '' : `Open in ${defaultAppName}`,
163
+ tooltipLabel: showTooltips ? `Open in ${defaultAppName}` : null,
159
164
  type: 'action',
160
165
  },
161
166
  ];
@@ -171,7 +176,8 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
171
176
  segmentId: 'another-app',
172
177
  selectedId: null,
173
178
  style: dropdownSegmentStyle,
174
- title: 'Open in another app',
179
+ title: showTooltips ? '' : 'Open in another app',
180
+ tooltipLabel: showTooltips ? 'Open in another app' : null,
175
181
  type: 'menu',
176
182
  values: menuItems,
177
183
  });
@@ -179,17 +185,18 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
179
185
  return result;
180
186
  }, [
181
187
  canOpenDefault,
182
- defaultActionIsGitHub,
183
188
  defaultAppName,
184
189
  defaultEditorId,
190
+ defaultOpenInTarget,
185
191
  label,
186
192
  menuItems,
187
193
  onOpenDefault,
194
+ showTooltips,
188
195
  ]);
189
196
  if ((0, browser_studio_operations_1.getBrowserStudioOperations)() !== null) {
190
197
  return null;
191
198
  }
192
- if (previewServerState.type !== 'connected' && !canOpenInGitHub) {
199
+ if (previewServerState.type !== 'connected' && defaultOpenInTarget === null) {
193
200
  return null;
194
201
  }
195
202
  return jsx_runtime_1.jsx(SegmentedButton_1.SegmentedButton, { segments: segments, style: null, title: null });
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export declare const CollapsibleInspectorSection: React.FC<{
3
+ readonly children: React.ReactNode;
4
+ readonly collapsible: boolean;
5
+ readonly label: string;
6
+ readonly sectionId: string;
7
+ }>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CollapsibleInspectorSection = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const CollapsibleInspectorSectionHeader_1 = require("./CollapsibleInspectorSectionHeader");
6
+ const common_1 = require("./common");
7
+ const use_inspector_section_expanded_1 = require("./use-inspector-section-expanded");
8
+ const CollapsibleInspectorSection = ({ children, collapsible, label, sectionId }) => {
9
+ const [expanded, setExpanded] = (0, use_inspector_section_expanded_1.useInspectorSectionExpanded)(sectionId);
10
+ return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
11
+ jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: jsx_runtime_1.jsx(CollapsibleInspectorSectionHeader_1.CollapsibleInspectorSectionHeader, { action: null, expanded: expanded, label: label, onToggle: collapsible ? () => setExpanded(!expanded) : null }) }), jsx_runtime_1.jsx(common_1.InspectorSectionBody, { expanded: !collapsible || expanded, children: children })
12
+ ] }));
13
+ };
14
+ exports.CollapsibleInspectorSection = CollapsibleInspectorSection;
@@ -3,5 +3,5 @@ export declare const CollapsibleInspectorSectionHeader: React.FC<{
3
3
  readonly action: React.ReactNode;
4
4
  readonly expanded: boolean;
5
5
  readonly label: string;
6
- readonly onToggle: () => void;
6
+ readonly onToggle: (() => void) | null;
7
7
  }>;
@@ -5,12 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const colors_1 = require("../../helpers/colors");
6
6
  const hoverable_1 = require("../../helpers/hoverable");
7
7
  const styles_1 = require("./styles");
8
- const collapsibleSectionHeaderButton = {
9
- appearance: 'none',
10
- backgroundColor: 'transparent',
11
- border: 'none',
12
- borderRadius: 3,
13
- cursor: 'default',
8
+ const sectionTitle = {
14
9
  display: 'block',
15
10
  flex: 1,
16
11
  fontFamily: 'Arial, Helvetica, sans-serif',
@@ -25,6 +20,18 @@ const collapsibleSectionHeaderButton = {
25
20
  textOverflow: 'ellipsis',
26
21
  userSelect: 'none',
27
22
  whiteSpace: 'nowrap',
23
+ };
24
+ const staticSectionTitle = {
25
+ ...sectionTitle,
26
+ color: colors_1.LIGHT_TEXT,
27
+ };
28
+ const collapsibleSectionHeaderButton = {
29
+ ...sectionTitle,
30
+ appearance: 'none',
31
+ backgroundColor: 'transparent',
32
+ border: 'none',
33
+ borderRadius: 3,
34
+ cursor: 'default',
28
35
  ...(0, hoverable_1.hoverableStyle)({
29
36
  idleBackground: colors_1.TRANSPARENT,
30
37
  hoverBackground: colors_1.TRANSPARENT,
@@ -32,8 +39,12 @@ const collapsibleSectionHeaderButton = {
32
39
  hoverColor: colors_1.WHITE,
33
40
  }),
34
41
  };
42
+ const stopActivationKeyPropagation = (event) => {
43
+ if (event.key === 'Enter' || event.key === ' ') {
44
+ event.stopPropagation();
45
+ }
46
+ };
35
47
  const CollapsibleInspectorSectionHeader = ({ action, expanded, label, onToggle }) => {
36
- return (jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderRow, children: [
37
- jsx_runtime_1.jsx("button", { type: "button", "aria-expanded": expanded, "aria-label": `${expanded ? 'Collapse' : 'Expand'} ${label}`, className: `__remotion-inspector-section-title ${hoverable_1.HOVERABLE_CLASS_NAME}`, onClick: onToggle, style: collapsibleSectionHeaderButton, children: label }), action] }));
48
+ return (jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderRow, children: [onToggle === null ? (jsx_runtime_1.jsx("div", { style: staticSectionTitle, children: label })) : (jsx_runtime_1.jsx("button", { type: "button", "aria-expanded": expanded, "aria-label": `${expanded ? 'Collapse' : 'Expand'} ${label}`, className: `__remotion-inspector-section-title ${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, onClick: onToggle, onKeyDown: stopActivationKeyPropagation, onKeyUp: stopActivationKeyPropagation, style: collapsibleSectionHeaderButton, children: label })), action] }));
38
49
  };
39
50
  exports.CollapsibleInspectorSectionHeader = CollapsibleInspectorSectionHeader;
@@ -11,6 +11,7 @@ const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
11
11
  const cloud_download_1 = require("../../icons/cloud-download");
12
12
  const frame_1 = require("../../icons/frame");
13
13
  const solid_1 = require("../../icons/solid");
14
+ const sparkles_1 = require("../../icons/sparkles");
14
15
  const video_1 = require("../../icons/video");
15
16
  const VisualControls_1 = require("../../visual-controls/VisualControls");
16
17
  const ConfirmationDialog_1 = require("../ConfirmationDialog");
@@ -22,16 +23,20 @@ const NotificationCenter_1 = require("../Notifications/NotificationCenter");
22
23
  const ObserveDefaultPropsContext_1 = require("../ObserveDefaultPropsContext");
23
24
  const DataEditor_1 = require("../RenderModal/DataEditor");
24
25
  const infer_zod_schema_from_value_1 = require("../RenderModal/SchemaEditor/infer-zod-schema-from-value");
26
+ const scroll_to_default_props_path_1 = require("../RenderModal/SchemaEditor/scroll-to-default-props-path");
25
27
  const zod_schema_type_1 = require("../RenderModal/SchemaEditor/zod-schema-type");
26
28
  const WarningIndicatorButton_1 = require("../RenderModal/WarningIndicatorButton");
27
29
  const SegmentedControl_1 = require("../SegmentedControl");
28
30
  const VisualControlsContent_1 = require("../VisualControls/VisualControlsContent");
31
+ const CollapsibleInspectorSection_1 = require("./CollapsibleInspectorSection");
32
+ const CollapsibleInspectorSectionHeader_1 = require("./CollapsibleInspectorSectionHeader");
29
33
  const common_1 = require("./common");
30
34
  const CompositionInspectorHeader_1 = require("./CompositionInspectorHeader");
31
35
  const CompositionMetadata_1 = require("./CompositionMetadata");
32
36
  const ElementLibraryButton_1 = require("./ElementLibraryButton");
33
37
  const styles_1 = require("./styles");
34
38
  const use_composition_actions_1 = require("./use-composition-actions");
39
+ const use_inspector_section_expanded_1 = require("./use-inspector-section-expanded");
35
40
  const actionIconStyle = {
36
41
  height: 18,
37
42
  width: 18,
@@ -53,7 +58,7 @@ const downloadLicenseLink = {
53
58
  const CompositionActions = () => {
54
59
  var _a;
55
60
  var _b;
56
- const { canInsertAsset, canInsertComposition, canInsertSolid, canShowInsertAsset, canShowInsertComposition, canShowInsertSolid, insertAsset, insertComposition, insertSolid, } = (0, use_composition_actions_1.useCompositionActions)();
61
+ const { canInsertAsset, canInsertComposition, canInsertSolid, canShowInsertAsset, canShowInsertComposition, canShowInsertSolid, insertAsset, insertComposition, insertSolid, generateWithAgent, canShowGenerateWithAgent, } = (0, use_composition_actions_1.useCompositionActions)();
57
62
  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
63
  const confirm = (0, ConfirmationDialog_1.useConfirmationDialog)();
59
64
  const onDownloadProject = (0, react_1.useCallback)(async () => {
@@ -84,12 +89,11 @@ const CompositionActions = () => {
84
89
  if (!canShowInsertAsset &&
85
90
  !canShowInsertComposition &&
86
91
  !canShowInsertSolid &&
92
+ !canShowGenerateWithAgent &&
87
93
  downloadProject === null) {
88
94
  return null;
89
95
  }
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
- ] }));
96
+ return (jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "Actions", sectionId: "composition-actions", children: 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, canShowGenerateWithAgent ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: false, onClick: generateWithAgent, renderIcon: (color) => (jsx_runtime_1.jsx(sparkles_1.SparklesIcon, { color: color, style: actionIconStyle })), children: "Generate with agent..." })) : 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] }) }));
93
97
  };
94
98
  const CompositionDefaultPropsSection = ({ composition, currentDefaultProps, readOnlyStudio, setDefaultProps }) => {
95
99
  var _a;
@@ -97,6 +101,23 @@ const CompositionDefaultPropsSection = ({ composition, currentDefaultProps, read
97
101
  const zodTypes = (0, get_zod_if_possible_1.useZodTypesIfPossible)();
98
102
  const canSaveDefaultProps = (0, react_1.useContext)(ObserveDefaultPropsContext_1.ObserveDefaultPropsContext);
99
103
  const [defaultPropsMode, setDefaultPropsMode] = (0, react_1.useState)('schema');
104
+ const [expanded, setExpanded] = (0, use_inspector_section_expanded_1.useInspectorSectionExpanded)('composition-default-props');
105
+ const pendingScroll = (0, react_1.useRef)(null);
106
+ (0, react_1.useImperativeHandle)(scroll_to_default_props_path_1.expandDefaultPropsEditorRef, () => (onExpanded) => {
107
+ if (expanded) {
108
+ onExpanded();
109
+ return;
110
+ }
111
+ pendingScroll.current = onExpanded;
112
+ setExpanded(true);
113
+ }, [expanded, setExpanded]);
114
+ (0, react_1.useLayoutEffect)(() => {
115
+ if (expanded && pendingScroll.current !== null) {
116
+ const scroll = pendingScroll.current;
117
+ pendingScroll.current = null;
118
+ scroll();
119
+ }
120
+ }, [expanded]);
100
121
  const compositionId = composition.id;
101
122
  (0, react_1.useEffect)(() => {
102
123
  setDefaultPropsMode('schema');
@@ -148,11 +169,9 @@ const CompositionDefaultPropsSection = ({ composition, currentDefaultProps, read
148
169
  return null;
149
170
  }
150
171
  return (jsx_runtime_1.jsxs("div", { style: styles_1.compositionDefaultPropsSection, children: [
151
- jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderRow, children: [
152
- jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderStart, children: [
153
- jsx_runtime_1.jsx("span", { style: styles_1.sectionHeaderTitle, children: "Default Props" }), jsx_runtime_1.jsx(SegmentedControl_1.SegmentedControl, { items: defaultPropsModeItems, needsWrapping: false, size: "compact" })
154
- ] }), jsx_runtime_1.jsx("div", { style: styles_1.sectionHeaderEnd, children: defaultPropsWarnings.length > 0 ? (jsx_runtime_1.jsx(WarningIndicatorButton_1.WarningIndicatorButton, { setShowWarning: setShowWarning, showWarning: showWarning, warningCount: defaultPropsWarnings.length, size: "compact" })) : null })
155
- ] }) }), defaultPropsWarnings.length > 0 && showWarning ? (jsx_runtime_1.jsx("div", { style: styles_1.defaultPropsWarningContainer, children: jsx_runtime_1.jsx(common_1.InspectorDefaultPropsWarnings, { warnings: defaultPropsWarnings }) })) : null, jsx_runtime_1.jsx(DefaultPropsEditor_1.DefaultPropsEditor, { unresolvedComposition: composition, defaultProps: currentDefaultProps, setDefaultProps: setDefaultProps, propsEditType: "default-props", schemaErrorMode: "compact", layout: "inspector", mode: defaultPropsMode, onModeChange: setDefaultPropsMode, hideModeControls: canShowDefaultPropsSection, warnings: defaultPropsWarnings, showWarning: false, setShowWarning: setShowWarning, hideWarningButton: true }, composition.id)
172
+ jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: jsx_runtime_1.jsx(CollapsibleInspectorSectionHeader_1.CollapsibleInspectorSectionHeader, { action: expanded ? (jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderRow, children: [
173
+ jsx_runtime_1.jsx(SegmentedControl_1.SegmentedControl, { items: defaultPropsModeItems, needsWrapping: false, size: "compact" }), defaultPropsWarnings.length > 0 ? (jsx_runtime_1.jsx(WarningIndicatorButton_1.WarningIndicatorButton, { setShowWarning: setShowWarning, showWarning: showWarning, warningCount: defaultPropsWarnings.length, size: "compact" })) : null] })) : null, expanded: expanded, label: "Default Props", onToggle: () => setExpanded(!expanded) }) }), jsx_runtime_1.jsxs(common_1.InspectorSectionBody, { expanded: expanded, children: [defaultPropsWarnings.length > 0 && showWarning ? (jsx_runtime_1.jsx("div", { style: styles_1.defaultPropsWarningContainer, children: jsx_runtime_1.jsx(common_1.InspectorDefaultPropsWarnings, { warnings: defaultPropsWarnings }) })) : null, jsx_runtime_1.jsx(DefaultPropsEditor_1.DefaultPropsEditor, { unresolvedComposition: composition, defaultProps: currentDefaultProps, setDefaultProps: setDefaultProps, propsEditType: "default-props", schemaErrorMode: "compact", layout: "inspector", mode: defaultPropsMode, onModeChange: setDefaultPropsMode, hideModeControls: canShowDefaultPropsSection, warnings: defaultPropsWarnings, showWarning: false, setShowWarning: setShowWarning, hideWarningButton: true }, composition.id)
174
+ ] })
156
175
  ] }));
157
176
  };
158
177
  const CompositionVisualControlsSection = ({ readOnlyStudio }) => {
@@ -163,15 +182,13 @@ const CompositionVisualControlsSection = ({ readOnlyStudio }) => {
163
182
  if (!hasVisualControls) {
164
183
  return null;
165
184
  }
166
- return (jsx_runtime_1.jsxs("div", { style: styles_1.compositionVisualControlsSection, children: [
167
- jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Visual Controls" }), jsx_runtime_1.jsx(VisualControlsContent_1.VisualControlsContent, {})
168
- ] }));
185
+ return (jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "Visual Controls", sectionId: "composition-visual-controls", children: jsx_runtime_1.jsx(VisualControlsContent_1.VisualControlsContent, {}) }));
169
186
  };
170
187
  const CompositionInspector = ({ composition, currentDefaultProps, readOnlyStudio, setDefaultProps }) => {
171
188
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
172
189
  return (jsx_runtime_1.jsxs("div", { style: styles_1.scrollableContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
173
190
  jsx_runtime_1.jsxs("div", { style: styles_1.inspectorOverviewSection, children: [
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 })
191
+ jsx_runtime_1.jsx(CompositionInspectorHeader_1.CompositionInspectorHeader, {}), jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "Metadata", sectionId: "composition-metadata", children: jsx_runtime_1.jsx(CompositionMetadata_1.CompositionMetadata, { compositionId: composition.id, disabled: readOnlyStudio || previewServerState.type !== 'connected', stack: composition.stack }) })
175
192
  ] }), 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, {})
176
193
  ] }));
177
194
  };
@@ -38,7 +38,7 @@ const CompositionInspectorHeader = () => {
38
38
  const { compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
39
39
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
40
40
  const { canOpenInEditor, defaultEditorId } = (0, use_default_editor_info_1.useEditorOpening)(previewServerState.type === 'connected');
41
- const canOpenInGitHub = (0, get_git_menu_item_1.hasReadOnlyGitSource)();
41
+ const defaultOpenInTarget = (0, get_git_menu_item_1.getDefaultOpenInTarget)({ canOpenInEditor });
42
42
  const currentComposition = (0, react_1.useMemo)(() => {
43
43
  var _a;
44
44
  if (!video) {
@@ -75,16 +75,16 @@ const CompositionInspectorHeader = () => {
75
75
  });
76
76
  }, [compositionFile, compositionId]);
77
77
  const openSourceLocation = (0, react_1.useCallback)((location) => {
78
- if (canOpenInEditor && defaultEditorId) {
78
+ if (defaultOpenInTarget === 'editor' && defaultEditorId) {
79
79
  (0, open_in_editor_1.openOriginalPositionInEditor)(location, defaultEditorId).catch((err) => {
80
80
  (0, NotificationCenter_1.showNotification)(err.message, 2000);
81
81
  });
82
82
  return;
83
83
  }
84
- if (canOpenInGitHub) {
84
+ if (defaultOpenInTarget === 'git-source') {
85
85
  (0, get_git_menu_item_1.openGitSource)({ folder: false, location });
86
86
  }
87
- }, [canOpenInEditor, canOpenInGitHub, defaultEditorId]);
87
+ }, [defaultEditorId, defaultOpenInTarget]);
88
88
  const openFileLocation = (0, react_1.useCallback)(() => {
89
89
  if (validatedLocation) {
90
90
  openSourceLocation(validatedLocation);
@@ -102,9 +102,8 @@ const CompositionInspectorHeader = () => {
102
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 }));
103
103
  }, [video]);
104
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: [
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 &&
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 && defaultOpenInTarget !== null, onOpen: openFileLocation, renderIcon: renderCompositionIcon, size: "quick-action" }), compositionComponentInfo === null &&
106
106
  compositionFile !== 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 }));
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 && defaultOpenInTarget !== null, onOpen: openComponentLocation, renderIcon: renderReactIcon, size: "quick-action" }))] })) : null }));
109
108
  };
110
109
  exports.CompositionInspectorHeader = CompositionInspectorHeader;
@@ -38,9 +38,11 @@ const computedValueStyle = {
38
38
  fontSize: 12,
39
39
  fontStyle: 'italic',
40
40
  lineHeight: '20px',
41
+ userSelect: 'none',
41
42
  };
42
43
  const metadataFormatterStyle = {
43
44
  fontSize: 13,
45
+ userSelect: 'none',
44
46
  };
45
47
  const metadataDraggerStyles = {
46
48
  durationInFrames: {
@@ -110,6 +112,7 @@ const metadataLabelText = {
110
112
  minWidth: 0,
111
113
  overflow: 'hidden',
112
114
  textOverflow: 'ellipsis',
115
+ userSelect: 'none',
113
116
  whiteSpace: 'nowrap',
114
117
  };
115
118
  const dimensionPresets = [
@@ -242,6 +245,7 @@ const CompositionMetadata = ({ compositionId, disabled, stack }) => {
242
245
  dryRun: false,
243
246
  signal: new AbortController().signal,
244
247
  symbolicatedStack,
248
+ undoRedoNavigation: null,
245
249
  })
246
250
  .then((result) => {
247
251
  if (!result.success) {
@@ -4,7 +4,6 @@ exports.ConnectedCompositionsSection = exports.useConnectedCompositions = void 0
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
- const client_id_1 = require("../../helpers/client-id");
8
7
  const get_connected_compositions_1 = require("../../helpers/get-connected-compositions");
9
8
  const noop_1 = require("../../helpers/noop");
10
9
  const modals_1 = require("../../state/modals");
@@ -13,7 +12,8 @@ const CompositionOrStillIcon_1 = require("../CompositionOrStillIcon");
13
12
  const ContextMenu_1 = require("../ContextMenu");
14
13
  const InitialCompositionLoader_1 = require("../InitialCompositionLoader");
15
14
  const use_resolved_stack_1 = require("../Timeline/use-resolved-stack");
16
- const use_default_editor_info_1 = require("../use-default-editor-info");
15
+ const use_open_in_menu_apps_1 = require("../use-open-in-menu-apps");
16
+ const CollapsibleInspectorSection_1 = require("./CollapsibleInspectorSection");
17
17
  const common_1 = require("./common");
18
18
  const compositionIconStyle = {
19
19
  height: 18,
@@ -36,33 +36,27 @@ const useConnectedCompositions = ({ track, }) => {
36
36
  };
37
37
  exports.useConnectedCompositions = useConnectedCompositions;
38
38
  const ConnectedCompositionsSection = ({ connectedCompositions }) => {
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
- ] }));
39
+ return (jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "Connected compositions", sectionId: "connected-compositions", children: jsx_runtime_1.jsx("div", { style: compositionListStyle, children: connectedCompositions.map((composition) => (jsx_runtime_1.jsx(ConnectedCompositionRow, { composition: composition }, composition.id))) }) }));
42
40
  };
43
41
  exports.ConnectedCompositionsSection = ConnectedCompositionsSection;
44
42
  const ConnectedCompositionRow = ({ composition }) => {
45
43
  const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
46
44
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
47
- const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
48
- .previewServerState.type;
49
- const { defaultEditorId, defaultEditorName } = (0, use_default_editor_info_1.useEditorOpening)(connectionStatus === 'connected');
45
+ const { connectionStatus, openInApps } = (0, use_open_in_menu_apps_1.useOpenInMenuApps)();
50
46
  const resolvedLocation = (0, use_resolved_stack_1.useResolvedStack)(composition.stack);
51
47
  const getContextMenuItems = (0, react_1.useCallback)(() => (0, composition_menu_items_1.getCompositionContextMenuItems)({
52
48
  closeMenu: noop_1.noop,
53
49
  composition,
54
50
  connectionStatus,
55
- editorId: defaultEditorId,
56
- editorName: defaultEditorName,
57
51
  includeCompositionManagementItems: false,
52
+ openInApps,
58
53
  readOnlyStudio: window.remotion_isReadOnlyStudio,
59
54
  resolvedLocation,
60
55
  setSelectedModal,
61
56
  }), [
62
57
  composition,
63
58
  connectionStatus,
64
- defaultEditorId,
65
- defaultEditorName,
59
+ openInApps,
66
60
  resolvedLocation,
67
61
  setSelectedModal,
68
62
  ]);
@@ -44,6 +44,7 @@ const elementLibraryDropdownLabelStyle = {
44
44
  overflow: 'hidden',
45
45
  textAlign: 'left',
46
46
  textOverflow: 'ellipsis',
47
+ userSelect: 'none',
47
48
  whiteSpace: 'nowrap',
48
49
  };
49
50
  const elementLibraryDropdownCaretStyle = {
@@ -81,6 +82,7 @@ const ElementLibraryButton = () => {
81
82
  selectedId: null,
82
83
  style: elementLibraryDropdownSegmentStyle,
83
84
  title: 'Choose an Element library to browse inside Studio.',
85
+ tooltipLabel: null,
84
86
  type: 'menu',
85
87
  values: [
86
88
  {
@@ -6,6 +6,7 @@ const react_1 = require("react");
6
6
  const editor_guides_1 = require("../../state/editor-guides");
7
7
  const is_menu_item_1 = require("../Menu/is-menu-item");
8
8
  const InputDragger_1 = require("../NewComposition/InputDragger");
9
+ const CollapsibleInspectorSection_1 = require("./CollapsibleInspectorSection");
9
10
  const common_1 = require("./common");
10
11
  const styles_1 = require("./styles");
11
12
  const updateGuidePosition = ({ guideId, persist, position, setGuidesList, }) => {
@@ -48,8 +49,6 @@ const GuideInspector = ({ selection }) => {
48
49
  if (!guide) {
49
50
  return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Guide unavailable" });
50
51
  }
51
- return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
52
- jsx_runtime_1.jsxs(common_1.InspectorSectionHeader, { children: [guide.orientation === 'vertical' ? 'Vertical' : 'Horizontal', " guide"] }), jsx_runtime_1.jsx("div", { style: styles_1.guideDetailsContainer, children: jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: guide.orientation === 'vertical' ? 'X position' : 'Y position', children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: guide.position, status: "ok", onValueChange: onValueChange, onValueChangeEnd: onValueChangeEnd, onTextChange: () => undefined, step: 1, formatter: (value) => String(Math.round(Number(value))), rightAlign: true, small: true }) }) })
53
- ] }));
52
+ return (jsx_runtime_1.jsx("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: `${guide.orientation === 'vertical' ? 'Vertical' : 'Horizontal'} guide`, sectionId: "guide", children: jsx_runtime_1.jsx("div", { style: styles_1.guideDetailsContainer, children: jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: guide.orientation === 'vertical' ? 'X position' : 'Y position', children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: guide.position, status: "ok", onValueChange: onValueChange, onValueChangeEnd: onValueChangeEnd, onTextChange: () => undefined, step: 1, formatter: (value) => String(Math.round(Number(value))), rightAlign: true, small: true }) }) }) }) }));
54
53
  };
55
54
  exports.GuideInspector = GuideInspector;
@@ -8,6 +8,7 @@ const client_id_1 = require("../../helpers/client-id");
8
8
  const ComboBox_1 = require("../NewComposition/ComboBox");
9
9
  const InputDragger_1 = require("../NewComposition/InputDragger");
10
10
  const call_update_keyframe_settings_1 = require("../Timeline/call-update-keyframe-settings");
11
+ const CollapsibleInspectorSection_1 = require("./CollapsibleInspectorSection");
11
12
  const common_1 = require("./common");
12
13
  const styles_1 = require("./styles");
13
14
  const comboStyle = {
@@ -132,11 +133,9 @@ const KeyframeSettings = ({ update }) => {
132
133
  const posterizeFormatter = (0, react_1.useCallback)((value) => {
133
134
  return String(Math.round(Number(value)));
134
135
  }, []);
135
- return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
136
- jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Keyframe settings" }), jsx_runtime_1.jsxs("div", { style: keyframeSettingsContainer, children: [canEditInterpolationSettings ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
137
- jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Extrapolate left", children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: leftValues, selectedId: propStatus.clamping.left, title: "Extrapolate left", style: comboStyle, size: "small" }) }), jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Extrapolate right", children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: rightValues, selectedId: propStatus.clamping.right, title: "Extrapolate right", style: comboStyle, size: "small" }) }), jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Output", children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: outputValues, selectedId: (_b = propStatus.output) !== null && _b !== void 0 ? _b : 'linear', title: "Output", style: comboStyle, size: "small" }) })
138
- ] })) : null, jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Posterize", children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: posterize, status: "ok", onValueChange: onPosterizeChange, onValueChangeEnd: onPosterizeChangeEnd, onTextChange: () => undefined, min: 0, step: 1, formatter: posterizeFormatter, rightAlign: true, small: true, disabled: disabled }) })
139
- ] })
140
- ] }));
136
+ return (jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "Keyframe settings", sectionId: "keyframe-settings", children: jsx_runtime_1.jsxs("div", { style: keyframeSettingsContainer, children: [canEditInterpolationSettings ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
137
+ jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Extrapolate left", children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: leftValues, selectedId: propStatus.clamping.left, title: "Extrapolate left", style: comboStyle, size: "small" }) }), jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Extrapolate right", children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: rightValues, selectedId: propStatus.clamping.right, title: "Extrapolate right", style: comboStyle, size: "small" }) }), jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Output", children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: outputValues, selectedId: (_b = propStatus.output) !== null && _b !== void 0 ? _b : 'linear', title: "Output", style: comboStyle, size: "small" }) })
138
+ ] })) : null, jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Posterize", children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: posterize, status: "ok", onValueChange: onPosterizeChange, onValueChangeEnd: onPosterizeChangeEnd, onTextChange: () => undefined, min: 0, step: 1, formatter: posterizeFormatter, rightAlign: true, small: true, disabled: disabled }) })
139
+ ] }) }));
141
140
  };
142
141
  exports.KeyframeSettings = KeyframeSettings;
@@ -13,6 +13,7 @@ const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
13
13
  const layout_1 = require("../layout");
14
14
  const is_menu_item_1 = require("../Menu/is-menu-item");
15
15
  const TimelineRowLayoutContext_1 = require("../Timeline/TimelineRowLayoutContext");
16
+ const CollapsibleInspectorSection_1 = require("./CollapsibleInspectorSection");
16
17
  const common_1 = require("./common");
17
18
  const MultiSequenceField_1 = require("./MultiSequenceField");
18
19
  const styles_1 = require("./styles");
@@ -95,7 +96,7 @@ const MultiSequenceInspector = ({ selections, readOnlyStudio }) => {
95
96
  return (jsx_runtime_1.jsxs("div", { style: styles_1.scrollableContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
96
97
  jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { padding: "4px 0", children: jsx_runtime_1.jsxs("div", { style: selectionCountStyle, children: [selections.length, " sequences selected"] }) }), jsx_runtime_1.jsx("div", { role: "separator", style: styles_1.sequenceHeaderDivider }), targets === null ? (jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Sequence controls unavailable" })) : fields.length === 0 ? (jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "No shared controls" })) : (jsx_runtime_1.jsx(TimelineRowLayoutContext_1.TimelineRowLayoutContext.Provider, { value: TimelineRowLayoutContext_1.INSPECTOR_TIMELINE_ROW_LAYOUT, children: timeline_layout_1.SCHEMA_FIELD_GROUPS.map((group) => {
97
98
  const groupedFields = fields.filter((field) => field.group === group.id);
98
- return groupedFields.length === 0 ? null : (jsx_runtime_1.jsx(common_1.InspectorSection, { header: group.label, children: groupedFields.map((field) => (jsx_runtime_1.jsx(MultiSequenceField_1.MultiSequenceField, { field: field, targets: targets, readOnlyStudio: readOnlyStudio }, JSON.stringify(targets.map((target) => target.nodePath)) +
99
+ return groupedFields.length === 0 ? null : (jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: group.label, sectionId: `multi-sequence-${group.id}`, children: groupedFields.map((field) => (jsx_runtime_1.jsx(MultiSequenceField_1.MultiSequenceField, { field: field, targets: targets, readOnlyStudio: readOnlyStudio }, JSON.stringify(targets.map((target) => target.nodePath)) +
99
100
  field.key))) }, group.id));
100
101
  }) }))] }));
101
102
  };
@@ -5,7 +5,6 @@ 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");
9
8
  const react_2 = require("../../icons/react");
10
9
  const InlineEditableTitle_1 = require("../InlineEditableTitle");
11
10
  const InspectorInfoHeader_1 = require("../InspectorInfoHeader");
@@ -48,8 +47,7 @@ const externalTabIndicatorStyle = {
48
47
  width: 12,
49
48
  };
50
49
  const useSequenceInspectorSourceLocation = (sequence) => {
51
- const { canOpenInEditor, openInEditor, originalLocation } = (0, use_open_sequence_in_apps_1.useOpenSequenceInApps)(sequence);
52
- const canOpenInGitHub = (0, get_git_menu_item_1.hasReadOnlyGitSource)();
50
+ const { canOpenSource, openSource, originalLocation } = (0, use_open_sequence_in_apps_1.useOpenSequenceInApps)(sequence);
53
51
  const validatedLocation = (0, react_1.useMemo)(() => {
54
52
  var _a;
55
53
  if (!originalLocation ||
@@ -64,16 +62,10 @@ const useSequenceInspectorSourceLocation = (sequence) => {
64
62
  };
65
63
  }, [originalLocation]);
66
64
  const openFileLocation = (0, react_1.useCallback)(() => {
67
- if (canOpenInEditor) {
68
- openInEditor(null);
69
- return;
70
- }
71
- if (canOpenInGitHub && validatedLocation) {
72
- (0, get_git_menu_item_1.openGitSource)({ folder: false, location: validatedLocation });
73
- }
74
- }, [canOpenInEditor, canOpenInGitHub, openInEditor, validatedLocation]);
65
+ openSource();
66
+ }, [openSource]);
75
67
  return {
76
- canOpen: validatedLocation !== null && (canOpenInEditor || canOpenInGitHub),
68
+ canOpen: validatedLocation !== null && canOpenSource,
77
69
  openFileLocation,
78
70
  validatedLocation,
79
71
  };
@@ -22,6 +22,7 @@ const TimelineSelection_1 = require("../Timeline/TimelineSelection");
22
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
+ const CollapsibleInspectorSection_1 = require("./CollapsibleInspectorSection");
25
26
  const common_1 = require("./common");
26
27
  const ConnectedCompositionsSection_1 = require("./ConnectedCompositionsSection");
27
28
  const SequenceInspectorHeader_1 = require("./SequenceInspectorHeader");
@@ -169,9 +170,9 @@ const SequenceExpandedInspector = ({ track, readOnlyStudio }) => {
169
170
  return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Sequence inspector unavailable" });
170
171
  }
171
172
  return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, onPointerDown: selectSequenceOnInspectorPointerDown, 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: [
173
- jsx_runtime_1.jsx(SplitSequenceQuickAction, { selection: sequenceSelection, track: track }), jsx_runtime_1.jsx(SequenceSourceQuickActions, { selection: sequenceSelection, track: track, validatedSource: validatedLocation.source })
174
- ] })
173
+ 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(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "Actions", sectionId: "sequence-actions", children: jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [
174
+ jsx_runtime_1.jsx(SplitSequenceQuickAction, { selection: sequenceSelection, track: track }), jsx_runtime_1.jsx(SequenceSourceQuickActions, { selection: sequenceSelection, track: track, validatedSource: validatedLocation.source })
175
+ ] }) })
175
176
  ] })) : (jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Source controls unavailable" }))] }));
176
177
  };
177
178
  const SequenceSelectionInspector = ({ selection, readOnlyStudio }) => {