@remotion/studio 4.0.514 → 4.0.516

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 (222) hide show
  1. package/dist/api/install-package.js +14 -1
  2. package/dist/api/restart-studio.js +4 -0
  3. package/dist/components/AssetSelector.js +3 -9
  4. package/dist/components/AssetSelectorItem.d.ts +3 -1
  5. package/dist/components/AssetSelectorItem.js +41 -42
  6. package/dist/components/AudioWaveform.js +17 -139
  7. package/dist/components/Canvas.js +7 -4
  8. package/dist/components/CaptionInspector.d.ts +2 -0
  9. package/dist/components/CaptionInspector.js +3 -5
  10. package/dist/components/CompositionSelector.js +6 -3
  11. package/dist/components/CompositionSelectorItem.js +9 -10
  12. package/dist/components/ConfigSelect.d.ts +17 -0
  13. package/dist/components/ConfigSelect.js +50 -0
  14. package/dist/components/CurrentAsset.d.ts +10 -2
  15. package/dist/components/CurrentAsset.js +139 -46
  16. package/dist/components/FixComputedValueModal.js +54 -51
  17. package/dist/components/GlobalKeybindings.js +5 -5
  18. package/dist/components/InlineAction.d.ts +1 -1
  19. package/dist/components/InlineAction.js +12 -2
  20. package/dist/components/InlineCaptionInspector.d.ts +2 -0
  21. package/dist/components/InlineCaptionInspector.js +2 -2
  22. package/dist/components/InlineCompositionName.js +1 -1
  23. package/dist/components/InlineEditableTitle.js +3 -2
  24. package/dist/components/InspectorInfoHeader.js +1 -1
  25. package/dist/components/InspectorOpenInEditor.js +48 -72
  26. package/dist/components/InspectorPanel/AlignmentControls.js +2 -3
  27. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.d.ts +7 -0
  28. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +39 -0
  29. package/dist/components/InspectorPanel/CompositionInspector.js +41 -12
  30. package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +10 -4
  31. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +2 -1
  32. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -4
  33. package/dist/components/InspectorPanel/common.d.ts +0 -12
  34. package/dist/components/InspectorPanel/common.js +3 -52
  35. package/dist/components/InspectorPanel/use-composition-actions.js +0 -1
  36. package/dist/components/InspectorPanelLayout.d.ts +1 -1
  37. package/dist/components/InspectorPanelLayout.js +1 -1
  38. package/dist/components/InspectorSequenceSection.js +40 -54
  39. package/dist/components/InstallPackage.d.ts +3 -2
  40. package/dist/components/InstallPackage.js +90 -28
  41. package/dist/components/InstallablePackage.js +37 -11
  42. package/dist/components/KeyboardShortcutsSettings.d.ts +2 -0
  43. package/dist/components/KeyboardShortcutsSettings.js +177 -0
  44. package/dist/components/Menu/MenuDivider.js +1 -1
  45. package/dist/components/MenuBuildIndicator.js +1 -1
  46. package/dist/components/Modals.js +12 -4
  47. package/dist/components/NewComposition/CodemodFooter.d.ts +0 -1
  48. package/dist/components/NewComposition/CodemodFooter.js +2 -8
  49. package/dist/components/NewComposition/DeleteComposition.js +1 -1
  50. package/dist/components/NewComposition/DeleteFolder.js +1 -1
  51. package/dist/components/NewComposition/DuplicateComposition.js +1 -1
  52. package/dist/components/NewComposition/InputDragger.js +27 -4
  53. package/dist/components/NewComposition/NewComposition.js +1 -1
  54. package/dist/components/NewComposition/NewFolder.js +1 -3
  55. package/dist/components/NewComposition/RenameComposition.js +1 -1
  56. package/dist/components/NewComposition/RenameFolder.js +1 -1
  57. package/dist/components/NewComposition/use-rename-static-file.js +1 -1
  58. package/dist/components/Notifications/NotificationCenter.d.ts +1 -0
  59. package/dist/components/Notifications/NotificationCenter.js +5 -0
  60. package/dist/components/OptionsPanel.js +9 -12
  61. package/dist/components/PreviewToolbar.js +5 -2
  62. package/dist/components/PreviewToolbarOverflowButton.js +30 -0
  63. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +2 -2
  64. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +14 -30
  65. package/dist/components/RenderButton.js +66 -183
  66. package/dist/components/RenderModal/DataEditor.js +15 -12
  67. package/dist/components/RenderModal/GuiRenderStatus.js +3 -1
  68. package/dist/components/RenderModal/RenderModalOutputName.js +3 -3
  69. package/dist/components/RenderModal/RenderStatusModal.js +0 -1
  70. package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +3 -1
  71. package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.d.ts +15 -0
  72. package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.js +95 -0
  73. package/dist/components/RenderModal/WebRenderModal.js +4 -2
  74. package/dist/components/RenderQueue/RenderQueueItem.js +3 -1
  75. package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +3 -1
  76. package/dist/components/RenderQueue/RenderQueueRemoveItem.js +2 -7
  77. package/dist/components/RenderingSettings.js +7 -4
  78. package/dist/components/RulersAndGuidesToggle.d.ts +2 -0
  79. package/dist/components/RulersAndGuidesToggle.js +23 -0
  80. package/dist/components/SegmentedButton.d.ts +29 -0
  81. package/dist/components/SegmentedButton.js +226 -0
  82. package/dist/components/SelectedOutlineCanvasRotation.d.ts +1 -0
  83. package/dist/components/SelectedOutlineCanvasRotation.js +11 -4
  84. package/dist/components/SelectedOutlineEditingHandles.d.ts +16 -0
  85. package/dist/components/SelectedOutlineEditingHandles.js +66 -0
  86. package/dist/components/SelectedOutlineElement.d.ts +2 -4
  87. package/dist/components/SelectedOutlineElement.js +15 -54
  88. package/dist/components/SelectedOutlineOverlay.js +32 -6
  89. package/dist/components/SelectedOutlinePolygon.d.ts +4 -4
  90. package/dist/components/SelectedOutlinePolygon.js +20 -17
  91. package/dist/components/SelectedOutlineRenderer.js +66 -14
  92. package/dist/components/SettingsModal.d.ts +1 -1
  93. package/dist/components/SettingsModal.js +30 -7
  94. package/dist/components/SettingsModalFooter.js +2 -1
  95. package/dist/components/SkillsSettings.d.ts +2 -0
  96. package/dist/components/SkillsSettings.js +129 -0
  97. package/dist/components/StaticFilePreview.js +7 -1
  98. package/dist/components/StudioSettings.js +7 -48
  99. package/dist/components/Tabs/index.js +1 -1
  100. package/dist/components/Timeline/Timeline.js +0 -1
  101. package/dist/components/Timeline/TimelineAssetField.d.ts +1 -1
  102. package/dist/components/Timeline/TimelineAssetField.js +15 -9
  103. package/dist/components/Timeline/TimelineBooleanField.js +1 -4
  104. package/dist/components/Timeline/TimelineClipboardKeybindings.js +13 -12
  105. package/dist/components/Timeline/TimelineEffectItem.d.ts +1 -0
  106. package/dist/components/Timeline/TimelineEffectItem.js +45 -15
  107. package/dist/components/Timeline/TimelineEffectPropItem.js +21 -4
  108. package/dist/components/Timeline/TimelineExpandArrowButton.js +10 -7
  109. package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +4 -1
  110. package/dist/components/Timeline/TimelineExpandedRow.js +5 -4
  111. package/dist/components/Timeline/TimelineExpandedSection.js +8 -5
  112. package/dist/components/Timeline/TimelineFieldLabel.js +4 -2
  113. package/dist/components/Timeline/TimelineFieldRowContent.d.ts +1 -2
  114. package/dist/components/Timeline/TimelineFieldRowContent.js +8 -21
  115. package/dist/components/Timeline/TimelineImageInfo.d.ts +0 -1
  116. package/dist/components/Timeline/TimelineImageInfo.js +13 -32
  117. package/dist/components/Timeline/TimelineKeyframeControls.js +10 -4
  118. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
  119. package/dist/components/Timeline/TimelineRotationField.js +0 -2
  120. package/dist/components/Timeline/TimelineRowChrome.d.ts +1 -1
  121. package/dist/components/Timeline/TimelineRowChrome.js +41 -6
  122. package/dist/components/Timeline/TimelineRowLayoutContext.d.ts +0 -1
  123. package/dist/components/Timeline/TimelineRowLayoutContext.js +1 -4
  124. package/dist/components/Timeline/TimelineScaleField.js +2 -6
  125. package/dist/components/Timeline/TimelineSchemaField.js +9 -3
  126. package/dist/components/Timeline/TimelineSelection.d.ts +8 -3
  127. package/dist/components/Timeline/TimelineSelection.js +7 -5
  128. package/dist/components/Timeline/TimelineSequence.d.ts +2 -0
  129. package/dist/components/Timeline/TimelineSequence.js +110 -19
  130. package/dist/components/Timeline/TimelineSequenceItem.js +11 -8
  131. package/dist/components/Timeline/TimelineSequenceName.js +1 -1
  132. package/dist/components/Timeline/TimelineSequencePropItem.js +15 -2
  133. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +4 -2
  134. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +85 -91
  135. package/dist/components/Timeline/TimelineTrack.js +5 -2
  136. package/dist/components/Timeline/TimelineTransformOriginField.js +0 -4
  137. package/dist/components/Timeline/TimelineTranslateField.js +0 -4
  138. package/dist/components/Timeline/TimelineVideoInfo.js +4 -2
  139. package/dist/components/Timeline/TimelineVirtualization.js +3 -1
  140. package/dist/components/Timeline/delete-selected-timeline-item.js +6 -2
  141. package/dist/components/Timeline/duplicate-selected-timeline-item.js +7 -14
  142. package/dist/components/Timeline/get-copy-context-for-agents-menu-item.d.ts +4 -0
  143. package/dist/components/Timeline/get-copy-context-for-agents-menu-item.js +26 -0
  144. package/dist/components/Timeline/get-sequence-context-menu-items.js +2 -19
  145. package/dist/components/Timeline/get-timeline-sequence-visible-layout.d.ts +6 -1
  146. package/dist/components/Timeline/get-timeline-sequence-visible-layout.js +11 -4
  147. package/dist/components/Timeline/save-effect-prop.js +3 -3
  148. package/dist/components/Timeline/split-selected-timeline-item.js +0 -1
  149. package/dist/components/Timeline/timeline-field-row-layout.d.ts +1 -1
  150. package/dist/components/Timeline/timeline-field-row-layout.js +4 -7
  151. package/dist/components/Timeline/timeline-field-utils.js +0 -2
  152. package/dist/components/Timeline/use-timeline-asset-drop.js +1 -0
  153. package/dist/components/TimelineCombobox.js +25 -160
  154. package/dist/components/TimelineInOutToggle.js +4 -1
  155. package/dist/components/duplicate-jsx-node-api.d.ts +2 -0
  156. package/dist/components/duplicate-jsx-node-api.js +12 -0
  157. package/dist/components/effect-drag-and-drop.js +7 -7
  158. package/dist/components/effect-operations-api.d.ts +8 -0
  159. package/dist/components/effect-operations-api.js +52 -0
  160. package/dist/components/handle-drop.d.ts +2 -1
  161. package/dist/components/handle-drop.js +3 -3
  162. package/dist/components/import-assets.js +9 -65
  163. package/dist/components/keyboard-shortcuts.d.ts +10 -0
  164. package/dist/components/keyboard-shortcuts.js +135 -0
  165. package/dist/components/selected-outline-control-layout.js +2 -6
  166. package/dist/components/selected-outline-measurement.d.ts +1 -1
  167. package/dist/components/selected-outline-measurement.js +16 -3
  168. package/dist/components/use-delete-asset.d.ts +1 -0
  169. package/dist/components/use-delete-asset.js +40 -0
  170. package/dist/components/use-selected-outline-control-target.d.ts +11 -0
  171. package/dist/components/use-selected-outline-control-target.js +79 -0
  172. package/dist/error-overlay/remotion-overlay/log-studio-error.js +4 -0
  173. package/dist/esm/{chunk-r46yxrjr.js → chunk-4bxz1d3g.js} +4 -3
  174. package/dist/esm/{chunk-xn2q7eem.js → chunk-w4244j4n.js} +14747 -14549
  175. package/dist/esm/index.mjs +3 -0
  176. package/dist/esm/internals.mjs +14747 -14549
  177. package/dist/esm/previewEntry.mjs +14557 -14359
  178. package/dist/esm/renderEntry.mjs +2 -2
  179. package/dist/helpers/add-asset-cache-bust.d.ts +4 -0
  180. package/dist/helpers/add-asset-cache-bust.js +10 -0
  181. package/dist/helpers/browser-studio-operations.d.ts +3 -0
  182. package/dist/helpers/browser-studio-operations.js +18 -1
  183. package/dist/helpers/calculate-timeline.js +2 -1
  184. package/dist/helpers/colors.d.ts +3 -1
  185. package/dist/helpers/colors.js +7 -3
  186. package/dist/helpers/drag-aware-double-click.d.ts +6 -0
  187. package/dist/helpers/drag-aware-double-click.js +20 -0
  188. package/dist/helpers/get-asset-metadata.js +25 -16
  189. package/dist/helpers/get-sequence-double-click-action.d.ts +2 -1
  190. package/dist/helpers/get-sequence-double-click-action.js +7 -1
  191. package/dist/helpers/get-timeline-sequence-layout.d.ts +4 -1
  192. package/dist/helpers/get-timeline-sequence-layout.js +15 -6
  193. package/dist/helpers/get-timeline-sequence-sort-key.d.ts +2 -1
  194. package/dist/helpers/hoverable.d.ts +1 -0
  195. package/dist/helpers/hoverable.js +2 -1
  196. package/dist/helpers/inject-css.js +7 -3
  197. package/dist/helpers/open-in-remotion-convert.d.ts +7 -0
  198. package/dist/helpers/open-in-remotion-convert.js +18 -0
  199. package/dist/helpers/use-max-media-duration.js +5 -3
  200. package/dist/helpers/use-media-metadata.d.ts +2 -1
  201. package/dist/helpers/use-media-metadata.js +49 -25
  202. package/dist/helpers/use-menu-structure.js +54 -67
  203. package/dist/icons/align-center-horizontal.js +1 -1
  204. package/dist/icons/align-left.js +1 -1
  205. package/dist/icons/align-right.js +1 -1
  206. package/dist/icons/cloud-download.d.ts +4 -0
  207. package/dist/icons/cloud-download.js +8 -0
  208. package/dist/icons/keyboard.d.ts +4 -0
  209. package/dist/icons/keyboard.js +10 -0
  210. package/dist/icons/license.d.ts +4 -0
  211. package/dist/icons/license.js +8 -0
  212. package/dist/icons/package.d.ts +4 -0
  213. package/dist/icons/package.js +8 -0
  214. package/dist/icons/react.js +1 -1
  215. package/dist/icons/remotion-convert.d.ts +4 -0
  216. package/dist/icons/remotion-convert.js +10 -0
  217. package/dist/icons/skills.d.ts +4 -0
  218. package/dist/icons/skills.js +10 -0
  219. package/dist/state/modals.d.ts +2 -5
  220. package/package.json +12 -12
  221. package/dist/components/KeyboardShortcutsExplainer.d.ts +0 -2
  222. package/dist/components/KeyboardShortcutsExplainer.js +0 -194
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SkillsSettings = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const colors_1 = require("../helpers/colors");
7
+ const copy_text_1 = require("../helpers/copy-text");
8
+ const check_circle_filled_1 = require("../icons/check-circle-filled");
9
+ const clipboard_1 = require("../icons/clipboard");
10
+ const minus_1 = require("../icons/minus");
11
+ const InlineAction_1 = require("./InlineAction");
12
+ const ValidationMessage_1 = require("./NewComposition/ValidationMessage");
13
+ const NotificationCenter_1 = require("./Notifications/NotificationCenter");
14
+ const SettingsContext_1 = require("./SettingsContext");
15
+ const INSTALL_COMMAND = 'npx remotion skills add';
16
+ const container = {
17
+ alignSelf: 'flex-start',
18
+ boxSizing: 'border-box',
19
+ flex: 1,
20
+ fontFamily: 'sans-serif',
21
+ minWidth: 0,
22
+ padding: '16px 16px 0',
23
+ };
24
+ const description = {
25
+ color: colors_1.LIGHT_TEXT,
26
+ fontSize: 13,
27
+ lineHeight: 1.5,
28
+ margin: 0,
29
+ };
30
+ const commandField = {
31
+ alignItems: 'center',
32
+ backgroundColor: 'rgba(0, 0, 0, 0.22)',
33
+ borderRadius: 4,
34
+ display: 'flex',
35
+ marginTop: 8,
36
+ padding: '5px 6px 5px 9px',
37
+ };
38
+ const command = {
39
+ color: colors_1.WHITE,
40
+ flex: 1,
41
+ fontFamily: 'monospace',
42
+ fontSize: 13,
43
+ lineHeight: '24px',
44
+ margin: 0,
45
+ minWidth: 0,
46
+ overflowX: 'auto',
47
+ whiteSpace: 'pre',
48
+ };
49
+ const copyIcon = {
50
+ height: 12,
51
+ width: 12,
52
+ };
53
+ const list = {
54
+ marginTop: 14,
55
+ };
56
+ const skillRow = {
57
+ alignItems: 'center',
58
+ borderBottom: colors_1.BORDER_WHITE_ALPHA_12,
59
+ display: 'flex',
60
+ gap: 10,
61
+ minHeight: 38,
62
+ padding: '0 10px',
63
+ };
64
+ const lastSkillRow = {
65
+ ...skillRow,
66
+ borderBottom: 'none',
67
+ };
68
+ const statusIcon = {
69
+ flexShrink: 0,
70
+ height: 14,
71
+ width: 14,
72
+ };
73
+ const skillName = {
74
+ color: colors_1.WHITE,
75
+ flex: 1,
76
+ fontFamily: 'monospace',
77
+ fontSize: 13,
78
+ lineHeight: 1.4,
79
+ minWidth: 0,
80
+ overflow: 'hidden',
81
+ textOverflow: 'ellipsis',
82
+ whiteSpace: 'nowrap',
83
+ };
84
+ const status = {
85
+ color: colors_1.LIGHT_TEXT,
86
+ fontSize: 12,
87
+ lineHeight: 1.4,
88
+ whiteSpace: 'nowrap',
89
+ };
90
+ const loading = {
91
+ ...description,
92
+ marginTop: 14,
93
+ };
94
+ const SkillsSettings = () => {
95
+ var _a;
96
+ const { error, remotionSkillsInfo } = (0, SettingsContext_1.useSettings)();
97
+ const installedSkills = (0, react_1.useMemo)(() => {
98
+ var _a;
99
+ return ((_a = remotionSkillsInfo === null || remotionSkillsInfo === void 0 ? void 0 : remotionSkillsInfo.skills.filter(({ installedGlobally, installedInProject }) => installedGlobally || installedInProject).length) !== null && _a !== void 0 ? _a : 0);
100
+ }, [remotionSkillsInfo]);
101
+ const missingSkills = ((_a = remotionSkillsInfo === null || remotionSkillsInfo === void 0 ? void 0 : remotionSkillsInfo.skills.length) !== null && _a !== void 0 ? _a : 0) - installedSkills;
102
+ const onCopy = (0, react_1.useCallback)(() => {
103
+ (0, copy_text_1.copyText)(INSTALL_COMMAND).catch((err) => {
104
+ (0, NotificationCenter_1.showNotification)(`Could not copy: ${err.message}`, 2000);
105
+ });
106
+ }, []);
107
+ const renderCopyAction = (0, react_1.useCallback)((color) => {
108
+ return jsx_runtime_1.jsx(clipboard_1.ClipboardIcon, { color: color, style: copyIcon });
109
+ }, []);
110
+ return (jsx_runtime_1.jsxs("div", { style: container, children: [remotionSkillsInfo === null && error === null ? (jsx_runtime_1.jsx("p", { style: loading, children: "Checking installed skills..." })) : null, remotionSkillsInfo === null && error ? (jsx_runtime_1.jsx("div", { style: { marginTop: 14 }, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: error, align: "flex-start", type: "error" }) })) : null, missingSkills > 0 ? (jsx_runtime_1.jsxs("div", { children: [
111
+ jsx_runtime_1.jsx("p", { style: description, children: "Not all skills are installed. Run this command in the project directory, then reload Studio and restart your coding agent." }), jsx_runtime_1.jsxs("div", { style: commandField, children: [
112
+ jsx_runtime_1.jsx("pre", { style: command, children: INSTALL_COMMAND }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onCopy, renderAction: renderCopyAction, title: "Copy install command" })
113
+ ] })
114
+ ] })) : null, remotionSkillsInfo ? (jsx_runtime_1.jsx("div", { style: list, role: "list", "aria-label": "Remotion Agent Skills", children: remotionSkillsInfo.skills.map((skill, index) => {
115
+ const installed = skill.installedInProject || skill.installedGlobally;
116
+ const installedLocation = skill.installedInProject && skill.installedGlobally
117
+ ? 'Project and global'
118
+ : skill.installedInProject
119
+ ? 'Project'
120
+ : skill.installedGlobally
121
+ ? 'Global'
122
+ : 'Not installed';
123
+ return (jsx_runtime_1.jsxs("div", { role: "listitem", style: index === remotionSkillsInfo.skills.length - 1
124
+ ? lastSkillRow
125
+ : skillRow, children: [installed ? (jsx_runtime_1.jsx(check_circle_filled_1.CheckCircleFilled, { "aria-hidden": true, style: { ...statusIcon, fill: colors_1.BLUE } })) : (jsx_runtime_1.jsx(minus_1.Minus, { "aria-hidden": true, color: colors_1.LIGHT_TEXT, style: statusIcon })), jsx_runtime_1.jsxs("span", { style: skillName, children: ["/", skill.name] }), jsx_runtime_1.jsx("span", { style: status, children: installedLocation })
126
+ ] }, skill.name));
127
+ }) })) : null] }));
128
+ };
129
+ exports.SkillsSettings = SkillsSettings;
@@ -4,6 +4,7 @@ exports.StaticFilePreview = 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 add_asset_cache_bust_1 = require("../helpers/add-asset-cache-bust");
7
8
  const client_id_1 = require("../helpers/client-id");
8
9
  const colors_1 = require("../helpers/colors");
9
10
  const get_preview_file_type_1 = require("../helpers/get-preview-file-type");
@@ -36,6 +37,11 @@ const StaticFilePreview = ({ currentAsset, assetMetadata }) => {
36
37
  if (!currentAsset) {
37
38
  return null;
38
39
  }
39
- return (jsx_runtime_1.jsx(FilePreview_1.FilePreview, { currentAsset: currentAsset, fileType: fileType, src: `${staticFileSrc}?date=${assetMetadata && assetMetadata.type === 'found' ? assetMetadata.fetchedAt : 0}`, assetMetadata: assetMetadata }));
40
+ return (jsx_runtime_1.jsx(FilePreview_1.FilePreview, { currentAsset: currentAsset, fileType: fileType, src: (0, add_asset_cache_bust_1.addAssetCacheBust)({
41
+ fetchedAt: assetMetadata && assetMetadata.type === 'found'
42
+ ? assetMetadata.fetchedAt
43
+ : 0,
44
+ src: staticFileSrc,
45
+ }), assetMetadata: assetMetadata }));
40
46
  };
41
47
  exports.StaticFilePreview = StaticFilePreview;
@@ -6,16 +6,14 @@ const client_1 = require("@remotion/renderer/client");
6
6
  const studio_shared_1 = require("@remotion/studio-shared");
7
7
  const react_1 = require("react");
8
8
  const colors_1 = require("../helpers/colors");
9
- const Checkmark_1 = require("../icons/Checkmark");
10
9
  const undo_1 = require("../icons/undo");
11
10
  const Button_1 = require("./Button");
11
+ const ConfigSelect_1 = require("./ConfigSelect");
12
12
  const styles_1 = require("./InspectorPanel/styles");
13
13
  const layout_1 = require("./layout");
14
- const ComboBox_1 = require("./NewComposition/ComboBox");
15
14
  const InputDragger_1 = require("./NewComposition/InputDragger");
16
15
  const ValidationMessage_1 = require("./NewComposition/ValidationMessage");
17
16
  const layout_2 = require("./RenderModal/layout");
18
- const RenderModalHr_1 = require("./RenderModal/RenderModalHr");
19
17
  const SettingsContext_1 = require("./SettingsContext");
20
18
  const use_auto_save_config_1 = require("./use-auto-save-config");
21
19
  const container = {
@@ -29,15 +27,14 @@ const dividerLabel = {
29
27
  margin: 0,
30
28
  padding: '4px 16px',
31
29
  };
32
- const controlWidth = {
33
- boxSizing: 'border-box',
34
- width: 180,
30
+ const sectionTitle = {
31
+ ...dividerLabel,
32
+ marginTop: 8,
35
33
  };
36
34
  const resetIcon = {
37
35
  height: 12,
38
36
  width: 12,
39
37
  };
40
- const DEFAULT_VALUE = 'studio-default';
41
38
  const initialSettings = {
42
39
  askAIEnabled: null,
43
40
  audioLatencyHint: null,
@@ -50,39 +47,6 @@ const initialSettings = {
50
47
  numberOfSharedAudioTags: null,
51
48
  rspack: null,
52
49
  };
53
- const ConfigSelect = ({ defaultLabel, name, onChange, options, value, }) => {
54
- const values = [
55
- {
56
- id: DEFAULT_VALUE,
57
- keyHint: null,
58
- label: `Default (${defaultLabel})`,
59
- leftItem: value === null ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
60
- onClick: () => onChange(null),
61
- quickSwitcherLabel: null,
62
- subMenu: null,
63
- type: 'item',
64
- value: DEFAULT_VALUE,
65
- },
66
- { id: `${DEFAULT_VALUE}-divider`, type: 'divider' },
67
- ...options.map((option) => {
68
- const id = `${name}-${String(option.value)}`;
69
- return {
70
- id,
71
- keyHint: null,
72
- label: option.label,
73
- leftItem: value === option.value ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
74
- onClick: () => onChange(option.value),
75
- quickSwitcherLabel: null,
76
- subMenu: null,
77
- type: 'item',
78
- value: id,
79
- };
80
- }),
81
- ];
82
- return (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
83
- jsx_runtime_1.jsx("div", { style: layout_2.label, children: name }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: values, selectedId: value === null ? DEFAULT_VALUE : `${name}-${String(value)}`, style: controlWidth, title: name }) })
84
- ] }));
85
- };
86
50
  const ConfigNumber = ({ defaultLabel, defaultValue, name, onChange, onChangeEnd, value, }) => {
87
51
  const resolvedDefaultLabel = defaultLabel !== null && defaultLabel !== void 0 ? defaultLabel : String(defaultValue);
88
52
  return (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
@@ -91,10 +55,6 @@ const ConfigNumber = ({ defaultLabel, defaultValue, name, onChange, onChangeEnd,
91
55
  ] })
92
56
  ] }));
93
57
  };
94
- const booleanOptions = [
95
- { label: 'Enabled', value: true },
96
- { label: 'Disabled', value: false },
97
- ];
98
58
  const StudioSettings = () => {
99
59
  var _a;
100
60
  const { error: settingsError, revision, studioRuntimeConfig } = (0, SettingsContext_1.useSettings)();
@@ -140,7 +100,6 @@ const StudioSettings = () => {
140
100
  update('setAudioLatencyHint', settings.audioLatencyHint),
141
101
  update('setNumberOfSharedAudioTags', committedNumberSettings.numberOfSharedAudioTags),
142
102
  update('setRspack', settings.rspack),
143
- update('setKeyboardShortcutsEnabled', settings.keyboardShortcutsEnabled),
144
103
  update('setInteractivityEnabled', settings.interactivityEnabled),
145
104
  update('setLogLevel', settings.logLevel),
146
105
  ].filter((item) => editedSetters.has(item.setter));
@@ -167,14 +126,14 @@ const StudioSettings = () => {
167
126
  return null;
168
127
  }
169
128
  return (jsx_runtime_1.jsxs("div", { style: container, children: [
170
- jsx_runtime_1.jsx("p", { style: dividerLabel, children: "Interface" }), jsx_runtime_1.jsx(ConfigSelect, { defaultLabel: "Enabled", name: "Ask AI enabled", onChange: (value) => changeSetting('askAIEnabled', 'setAskAIEnabled', value), options: booleanOptions, value: settings.askAIEnabled }), jsx_runtime_1.jsx(ConfigSelect, { defaultLabel: "Enabled", name: "Keyboard shortcuts enabled", onChange: (value) => changeSetting('keyboardShortcutsEnabled', 'setKeyboardShortcutsEnabled', value), options: booleanOptions, value: settings.keyboardShortcutsEnabled }), jsx_runtime_1.jsx(ConfigSelect, { defaultLabel: "Enabled", name: "Interactivity enabled", onChange: (value) => changeSetting('interactivityEnabled', 'setInteractivityEnabled', value), options: booleanOptions, value: settings.interactivityEnabled }), jsx_runtime_1.jsx(ConfigNumber, { defaultLabel: "Unlimited", defaultValue: studio_shared_1.DEFAULT_TIMELINE_TRACKS, name: "Max timeline tracks", onChange: (value) => previewNumberSetting('maxTimelineTracks', value), onChangeEnd: (value) => commitNumberSetting('maxTimelineTracks', 'setMaxTimelineTracks', value), value: settings.maxTimelineTracks }), jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), jsx_runtime_1.jsx("p", { style: dividerLabel, children: "Audio" }), jsx_runtime_1.jsx(ConfigSelect, { defaultLabel: "Playback", name: "Audio latency hint", onChange: (value) => changeSetting('audioLatencyHint', 'setAudioLatencyHint', value), options: [
129
+ jsx_runtime_1.jsx("p", { style: dividerLabel, children: "Interface" }), jsx_runtime_1.jsx(ConfigSelect_1.ConfigSelect, { defaultLabel: "Enabled", name: "Ask AI enabled", onChange: (value) => changeSetting('askAIEnabled', 'setAskAIEnabled', value), options: ConfigSelect_1.booleanOptions, value: settings.askAIEnabled }), jsx_runtime_1.jsx(ConfigSelect_1.ConfigSelect, { defaultLabel: "Enabled", name: "Interactivity enabled", onChange: (value) => changeSetting('interactivityEnabled', 'setInteractivityEnabled', value), options: ConfigSelect_1.booleanOptions, value: settings.interactivityEnabled }), jsx_runtime_1.jsx(ConfigNumber, { defaultLabel: "Unlimited", defaultValue: studio_shared_1.DEFAULT_TIMELINE_TRACKS, name: "Max timeline tracks", onChange: (value) => previewNumberSetting('maxTimelineTracks', value), onChangeEnd: (value) => commitNumberSetting('maxTimelineTracks', 'setMaxTimelineTracks', value), value: settings.maxTimelineTracks }), jsx_runtime_1.jsx("p", { style: sectionTitle, children: "Audio" }), jsx_runtime_1.jsx(ConfigSelect_1.ConfigSelect, { defaultLabel: "Playback", name: "Audio latency hint", onChange: (value) => changeSetting('audioLatencyHint', 'setAudioLatencyHint', value), options: [
171
130
  { label: 'Interactive', value: 'interactive' },
172
131
  { label: 'Balanced', value: 'balanced' },
173
132
  { label: 'Playback', value: 'playback' },
174
- ], value: settings.audioLatencyHint }), jsx_runtime_1.jsx(ConfigNumber, { defaultValue: 0, name: "Number of shared audio tags", onChange: (value) => previewNumberSetting('numberOfSharedAudioTags', value), onChangeEnd: (value) => commitNumberSetting('numberOfSharedAudioTags', 'setNumberOfSharedAudioTags', value), value: settings.numberOfSharedAudioTags }), jsx_runtime_1.jsx(ConfigSelect, { defaultLabel: "Disabled", name: "Beep on finish", onChange: (value) => changeSetting('beepOnFinish', 'setBeepOnFinish', value), options: booleanOptions, value: settings.beepOnFinish }), jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), jsx_runtime_1.jsx("p", { style: dividerLabel, children: "Development" }), jsx_runtime_1.jsx(ConfigSelect, { defaultLabel: "Webpack", name: "Bundler", onChange: (value) => changeSetting('rspack', 'setRspack', value), options: [
133
+ ], value: settings.audioLatencyHint }), jsx_runtime_1.jsx(ConfigNumber, { defaultValue: 0, name: "Number of shared audio tags", onChange: (value) => previewNumberSetting('numberOfSharedAudioTags', value), onChangeEnd: (value) => commitNumberSetting('numberOfSharedAudioTags', 'setNumberOfSharedAudioTags', value), value: settings.numberOfSharedAudioTags }), jsx_runtime_1.jsx(ConfigSelect_1.ConfigSelect, { defaultLabel: "Disabled", name: "Beep on finish", onChange: (value) => changeSetting('beepOnFinish', 'setBeepOnFinish', value), options: ConfigSelect_1.booleanOptions, value: settings.beepOnFinish }), jsx_runtime_1.jsx("p", { style: sectionTitle, children: "Development" }), jsx_runtime_1.jsx(ConfigSelect_1.ConfigSelect, { defaultLabel: "Webpack", name: "Bundler", onChange: (value) => changeSetting('rspack', 'setRspack', value), options: [
175
134
  { label: 'Rspack', value: true },
176
135
  { label: 'Webpack', value: false },
177
- ], value: settings.rspack }), jsx_runtime_1.jsx(ConfigSelect, { defaultLabel: "Disabled", name: "Cross-site isolation", onChange: (value) => changeSetting('enableCrossSiteIsolation', 'setEnableCrossSiteIsolation', value), options: booleanOptions, value: settings.enableCrossSiteIsolation }), jsx_runtime_1.jsx(ConfigSelect, { defaultLabel: "Info", name: "Log level", onChange: (value) => changeSetting('logLevel', 'setLogLevel', value), options: client_1.BrowserSafeApis.logLevels.map((value) => ({
136
+ ], value: settings.rspack }), jsx_runtime_1.jsx(ConfigSelect_1.ConfigSelect, { defaultLabel: "Disabled", name: "Cross-site isolation", onChange: (value) => changeSetting('enableCrossSiteIsolation', 'setEnableCrossSiteIsolation', value), options: ConfigSelect_1.booleanOptions, value: settings.enableCrossSiteIsolation }), jsx_runtime_1.jsx(ConfigSelect_1.ConfigSelect, { defaultLabel: "Info", name: "Log level", onChange: (value) => changeSetting('logLevel', 'setLogLevel', value), options: client_1.BrowserSafeApis.logLevels.map((value) => ({
178
137
  label: value[0].toUpperCase() + value.slice(1),
179
138
  value,
180
139
  })), value: settings.logLevel }), (error !== null && error !== void 0 ? error : settingsError) ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
@@ -24,7 +24,7 @@ const selectorButton = {
24
24
  flex: 1,
25
25
  padding: 3,
26
26
  height: 34,
27
- paddingLeft: 12,
27
+ paddingLeft: 10,
28
28
  display: 'flex',
29
29
  flexDirection: 'row',
30
30
  fontSize: 13,
@@ -153,7 +153,6 @@ const TimelineContextMenuArea = ({ children }) => {
153
153
  ? await browserStudioOperations.insertSolid(request)
154
154
  : await (0, call_api_1.callApi)('/api/insert-jsx-element', request);
155
155
  if (result.success) {
156
- (0, NotificationCenter_1.showNotification)('Added <Solid> to source file', 2000);
157
156
  return;
158
157
  }
159
158
  (0, NotificationCenter_1.showNotification)(result.reason, 4000);
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { type CanUpdateSequencePropStatusStatic } from 'remotion';
3
3
  import type { SchemaFieldInfo, TimelineFieldOnDragValueChange, TimelineFieldOnSave } from '../../helpers/timeline-layout';
4
4
  import { type InspectorQuickActionProps } from '../InspectorPanel/common';
5
- export type InspectorSourceAction = Omit<InspectorQuickActionProps, 'variant'>;
5
+ export type InspectorSourceAction = InspectorQuickActionProps;
6
6
  type AssetSelectionContextValue = {
7
7
  readonly initialQuery: string;
8
8
  readonly getSourceAction: (src: string) => InspectorSourceAction | null;
@@ -18,6 +18,19 @@ const penIcon = {
18
18
  height: 14,
19
19
  width: 14,
20
20
  };
21
+ const sourceActions = {
22
+ alignItems: 'center',
23
+ display: 'flex',
24
+ flex: 1,
25
+ gap: 4,
26
+ minWidth: 0,
27
+ };
28
+ const standaloneSourceActionStyle = {
29
+ flex: 1,
30
+ margin: 0,
31
+ minWidth: 0,
32
+ width: 'auto',
33
+ };
21
34
  exports.AssetSelectionContext = (0, react_1.createContext)({
22
35
  getSourceAction: () => null,
23
36
  initialQuery: '',
@@ -100,14 +113,7 @@ const TimelineAssetField = ({ field, effectiveValue, propStatus, onSave, onDragV
100
113
  if (inlineSourceAction === null) {
101
114
  return action;
102
115
  }
103
- return (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { ...inlineSourceAction, size: "compact", variant: {
104
- type: 'segmented',
105
- trailing: {
106
- disabled: window.remotion_isReadOnlyStudio,
107
- onClick: openAssetSelection,
108
- renderIcon: (color) => jsx_runtime_1.jsx(pen_1.PenIcon, { color: color, style: penIcon }),
109
- title: 'Change source',
110
- },
111
- } }));
116
+ return (jsx_runtime_1.jsxs("div", { style: sourceActions, children: [
117
+ jsx_runtime_1.jsx(common_1.InspectorQuickAction, { ...inlineSourceAction, size: "compact", style: standaloneSourceActionStyle }), action] }));
112
118
  };
113
119
  exports.TimelineAssetField = TimelineAssetField;
@@ -4,9 +4,6 @@ exports.TimelineBooleanField = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const Checkbox_1 = require("../Checkbox");
7
- const checkboxContainer = {
8
- marginLeft: 8,
9
- };
10
7
  const TimelineBooleanField = ({ field, propStatus, effectiveValue, onSave }) => {
11
8
  const checked = Boolean(effectiveValue);
12
9
  const onChange = (0, react_1.useCallback)(() => {
@@ -15,6 +12,6 @@ const TimelineBooleanField = ({ field, propStatus, effectiveValue, onSave }) =>
15
12
  onSave(newValue);
16
13
  }
17
14
  }, [propStatus, onSave, checked]);
18
- return (jsx_runtime_1.jsx("div", { style: checkboxContainer, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: checked, onChange: onChange, name: field.key, disabled: false, variant: "small" }) }));
15
+ return (jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: checked, onChange: onChange, name: field.key, disabled: false, variant: "small" }));
19
16
  };
20
17
  exports.TimelineBooleanField = TimelineBooleanField;
@@ -4,13 +4,14 @@ exports.TimelineClipboardKeybindings = exports.getPasteEffectPropTarget = export
4
4
  const studio_shared_1 = require("@remotion/studio-shared");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
+ const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
7
8
  const client_id_1 = require("../../helpers/client-id");
8
9
  const clipboard_figma_1 = require("../../helpers/clipboard-figma");
9
10
  const clipboard_images_1 = require("../../helpers/clipboard-images");
10
11
  const clipboard_svg_1 = require("../../helpers/clipboard-svg");
11
12
  const use_keybinding_1 = require("../../helpers/use-keybinding");
12
- const call_api_1 = require("../call-api");
13
13
  const ConfirmationDialog_1 = require("../ConfirmationDialog");
14
+ const effect_operations_api_1 = require("../effect-operations-api");
14
15
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
15
16
  const call_add_keyframe_1 = require("./call-add-keyframe");
16
17
  const call_delete_keyframe_1 = require("./call-delete-keyframe");
@@ -791,9 +792,9 @@ const TimelineClipboardKeybindings = () => {
791
792
  ? 'Reapply property paste onto selected sequences'
792
793
  : 'Reapply property paste',
793
794
  }).then(() => {
794
- (0, NotificationCenter_1.showNotification)(sequencePropTarget.targets.length > 1
795
- ? 'Pasted property onto selected sequences'
796
- : 'Pasted property', 2000);
795
+ if (sequencePropTarget.targets.length > 1) {
796
+ (0, NotificationCenter_1.showNotification)('Pasted property onto selected sequences', 2000);
797
+ }
797
798
  });
798
799
  }
799
800
  const effectPropResult = (0, studio_shared_1.parseEffectPropClipboardDataResult)(text);
@@ -858,9 +859,9 @@ const TimelineClipboardKeybindings = () => {
858
859
  ? 'Reapply effect prop paste onto selected effects'
859
860
  : 'Reapply effect prop paste',
860
861
  }).then(() => {
861
- (0, NotificationCenter_1.showNotification)(effectPropTarget.targets.length > 1
862
- ? 'Pasted effect prop onto selected effects'
863
- : 'Pasted effect prop', 2000);
862
+ if (effectPropTarget.targets.length > 1) {
863
+ (0, NotificationCenter_1.showNotification)('Pasted effect prop onto selected effects', 2000);
864
+ }
864
865
  });
865
866
  }
866
867
  const result = envelope === null
@@ -869,6 +870,9 @@ const TimelineClipboardKeybindings = () => {
869
870
  if (result.status === 'invalid') {
870
871
  return;
871
872
  }
873
+ if (!(0, browser_studio_operations_1.canUseEffectOperations)()) {
874
+ return;
875
+ }
872
876
  e.preventDefault();
873
877
  if (result.status === 'unsupported-version') {
874
878
  (0, NotificationCenter_1.showNotification)('Cannot paste effects copied from a different Remotion Studio version', 4000);
@@ -892,7 +896,7 @@ const TimelineClipboardKeybindings = () => {
892
896
  const insertAtIndices = (envelope === null || envelope === void 0 ? void 0 : envelope.sourceIdentity) === makeTargetKey(targetSequenceNodePath)
893
897
  ? envelope.originalEffectIndices
894
898
  : null;
895
- return (0, call_api_1.callApi)('/api/paste-effects', {
899
+ return (0, effect_operations_api_1.pasteEffects)({
896
900
  targetFileName: targetSequenceNodePath.absolutePath,
897
901
  targetSequenceNodePath,
898
902
  type: payload.type,
@@ -900,10 +904,7 @@ const TimelineClipboardKeybindings = () => {
900
904
  clientId,
901
905
  insertAtIndices,
902
906
  }).then((pasteResult) => {
903
- if (pasteResult.success) {
904
- (0, NotificationCenter_1.showNotification)('Pasted effects', 2000);
905
- }
906
- else {
907
+ if (!pasteResult.success) {
907
908
  (0, NotificationCenter_1.showNotification)(pasteResult.reason, 4000);
908
909
  }
909
910
  });
@@ -12,6 +12,7 @@ export declare const TimelineEffectItem: React.FC<{
12
12
  readonly nodePath: SequencePropsSubscriptionKey;
13
13
  readonly validatedLocation: CodePosition;
14
14
  readonly rowDepth: number;
15
+ readonly labelNextToToggle: boolean;
15
16
  readonly getIsExpanded: GetIsExpanded;
16
17
  readonly toggleTrack: (nodePathInfo: SequenceNodePathInfo) => void;
17
18
  }>;
@@ -4,12 +4,15 @@ exports.TimelineEffectItem = 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 browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
7
8
  const client_id_1 = require("../../helpers/client-id");
8
9
  const colors_1 = require("../../helpers/colors");
10
+ const format_file_location_1 = require("../../helpers/format-file-location");
9
11
  const timeline_layout_1 = require("../../helpers/timeline-layout");
10
- const call_api_1 = require("../call-api");
11
12
  const ContextMenu_1 = require("../ContextMenu");
13
+ const effect_operations_api_1 = require("../effect-operations-api");
12
14
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
15
+ const get_copy_context_for_agents_menu_item_1 = require("./get-copy-context-for-agents-menu-item");
13
16
  const save_effect_prop_1 = require("./save-effect-prop");
14
17
  const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
15
18
  const TimelineLayerEye_1 = require("./TimelineLayerEye");
@@ -26,6 +29,14 @@ const rowStyle = {
26
29
  height: timeline_layout_1.TREE_GROUP_ROW_HEIGHT,
27
30
  cursor: 'default',
28
31
  };
32
+ const labelContainerStyle = {
33
+ alignItems: 'center',
34
+ alignSelf: 'stretch',
35
+ display: 'flex',
36
+ flex: 1,
37
+ minWidth: 0,
38
+ paddingRight: timeline_layout_1.EXPANDED_SECTION_PADDING_RIGHT,
39
+ };
29
40
  const reorderWrapper = {
30
41
  position: 'relative',
31
42
  };
@@ -64,11 +75,12 @@ const getEffectReorderDragData = (dataTransfer) => {
64
75
  const getDestinationIndex = ({ fromIndex, insertionIndex, }) => {
65
76
  return insertionIndex > fromIndex ? insertionIndex - 1 : insertionIndex;
66
77
  };
67
- const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, documentationLink, nodePath, validatedLocation, rowDepth, getIsExpanded, toggleTrack, }) => {
78
+ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, documentationLink, nodePath, validatedLocation, rowDepth, labelNextToToggle, getIsExpanded, toggleTrack, }) => {
68
79
  var _a;
69
80
  var _b;
70
81
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
71
82
  const previewConnected = previewServerState.type === 'connected';
83
+ const canMutateEffects = (0, browser_studio_operations_1.canUseEffectOperations)();
72
84
  const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
73
85
  const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
74
86
  const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
@@ -88,11 +100,13 @@ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, do
88
100
  }
89
101
  return false;
90
102
  }, [disabledStatus]);
91
- const canToggle = previewConnected && (disabledStatus === null || disabledStatus === void 0 ? void 0 : disabledStatus.status) === 'static';
103
+ const canToggle = previewConnected && canMutateEffects && (disabledStatus === null || disabledStatus === void 0 ? void 0 : disabledStatus.status) === 'static';
92
104
  const deleteDisabled = !previewConnected ||
105
+ !canMutateEffects ||
93
106
  effectStatus.type !== 'can-update-effect' ||
94
107
  !validatedLocation.source;
95
108
  const canReorder = previewConnected &&
109
+ canMutateEffects &&
96
110
  effectStatus.type === 'can-update-effect' &&
97
111
  Boolean(validatedLocation.source);
98
112
  const nodePathKey = (0, react_1.useMemo)(() => remotion_1.Internals.makeSequencePropsSubscriptionKey(nodePath), [nodePath]);
@@ -101,7 +115,7 @@ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, do
101
115
  return;
102
116
  }
103
117
  try {
104
- const result = await (0, call_api_1.callApi)('/api/delete-effect', [
118
+ const result = await (0, effect_operations_api_1.deleteEffects)([
105
119
  {
106
120
  type: 'single-effect',
107
121
  fileName: validatedLocation.source,
@@ -118,13 +132,25 @@ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, do
118
132
  }
119
133
  }, [deleteDisabled, effectIndex, nodePath, validatedLocation.source]);
120
134
  const getContextMenuItems = (0, react_1.useCallback)(() => {
121
- if (!previewConnected) {
122
- return [];
123
- }
124
135
  if (selection.selectable) {
125
136
  selection.onSelect({ shiftKey: false, toggleKey: false });
126
137
  }
127
- const items = [];
138
+ const items = [
139
+ (0, get_copy_context_for_agents_menu_item_1.getCopyContextForAgentsMenuItem)({
140
+ contextForAgents: (0, format_file_location_1.formatContextForAgents)({
141
+ location: validatedLocation,
142
+ name: `Effect "${label}"`,
143
+ root: window.remotion_cwd,
144
+ }),
145
+ }),
146
+ ];
147
+ if (!previewConnected) {
148
+ return items;
149
+ }
150
+ items.push({
151
+ type: 'divider',
152
+ id: 'copy-context-for-agents-divider',
153
+ });
128
154
  if (documentationLink) {
129
155
  items.push({
130
156
  type: 'item',
@@ -166,9 +192,11 @@ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, do
166
192
  }, [
167
193
  deleteDisabled,
168
194
  documentationLink,
195
+ label,
169
196
  onDeleteEffectFromSource,
170
197
  previewConnected,
171
198
  selection,
199
+ validatedLocation,
172
200
  ]);
173
201
  const onToggle = (0, react_1.useCallback)((type) => {
174
202
  if (!canToggle || previewServerState.type !== 'connected') {
@@ -209,8 +237,11 @@ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, do
209
237
  alignItems: 'center',
210
238
  color: (0, TimelineSelection_1.getTimelineColor)(selection.selected, true),
211
239
  display: 'inline-flex',
212
- marginRight: timeline_layout_1.EXPANDED_SECTION_PADDING_RIGHT,
240
+ flexShrink: 1,
213
241
  minWidth: 0,
242
+ overflow: 'hidden',
243
+ textOverflow: 'ellipsis',
244
+ whiteSpace: 'nowrap',
214
245
  boxShadow: containsSelection && !selection.selected
215
246
  ? `inset 0 0 0 2px ${TimelineSelection_1.TIMELINE_SELECTED_LABEL_BACKGROUND}`
216
247
  : undefined,
@@ -288,17 +319,14 @@ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, do
288
319
  setDropIndicator(null);
289
320
  currentEffectDrag = null;
290
321
  try {
291
- const result = await (0, call_api_1.callApi)('/api/reorder-effect', {
322
+ const result = await (0, effect_operations_api_1.reorderEffect)({
292
323
  fileName: validatedLocation.source,
293
324
  sequenceNodePath: nodePath,
294
325
  fromIndex: dropTarget.dragData.effectIndex,
295
326
  toIndex: dropTarget.toIndex,
296
327
  clientId: previewServerState.clientId,
297
328
  });
298
- if (result.success) {
299
- (0, NotificationCenter_1.showNotification)('Reordered effect', 2000);
300
- }
301
- else {
329
+ if (!result.success) {
302
330
  (0, NotificationCenter_1.showNotification)(result.reason, 4000);
303
331
  }
304
332
  }
@@ -321,7 +349,9 @@ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, do
321
349
  ...(dropIndicator === 'before' ? { top: -1 } : { bottom: -1 }),
322
350
  };
323
351
  }, [dropIndicator]);
324
- const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: canToggle ? (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEye, { type: "effect", hidden: isDisabled, onInvoked: onToggle })) : (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {})), arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowButton, { isExpanded: isExpanded, onClick: () => toggleTrack(nodePathInfo), label: `${label} section`, disabled: false }), style: rowStyle, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: containsSelection, isFieldRow: false, outerHeight: null, children: jsx_runtime_1.jsx("span", { title: label, style: labelStyle, children: label }) }));
352
+ const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: canToggle ? (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEye, { type: "effect", hidden: isDisabled, onInvoked: onToggle })) : (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {})), arrow: labelNextToToggle ? null : jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: rowStyle, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: containsSelection, outerHeight: null, children: jsx_runtime_1.jsxs("div", { style: labelContainerStyle, children: [
353
+ jsx_runtime_1.jsx("span", { title: label, style: labelStyle, children: label }), jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowButton, { isExpanded: isExpanded, onClick: () => toggleTrack(nodePathInfo), label: `${label} section`, disabled: false })
354
+ ] }) }));
325
355
  const draggableRow = canReorder ? (jsx_runtime_1.jsxs("div", { draggable: true, onDragStart: onDragStart, onDragEnd: onDragEnd, onDragOver: onDragOver, onDragLeave: onDragLeave, onDrop: onDrop, style: reorderWrapper, children: [reorderLineStyle ? jsx_runtime_1.jsx("div", { style: reorderLineStyle }) : null, row] })) : (row);
326
356
  return previewConnected ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: draggableRow })) : (draggableRow);
327
357
  };