@remotion/studio 4.0.522 → 4.0.523

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 (220) hide show
  1. package/dist/api/install-package.js +4 -2
  2. package/dist/components/AssetAudioVolume.d.ts +5 -0
  3. package/dist/components/AssetAudioVolume.js +33 -0
  4. package/dist/components/Canvas.js +5 -6
  5. package/dist/components/CaptionInspector.js +74 -20
  6. package/dist/components/CheckboardToggle.js +8 -6
  7. package/dist/components/Checkbox.d.ts +1 -0
  8. package/dist/components/Checkbox.js +2 -2
  9. package/dist/components/CompositionContextButton.js +4 -1
  10. package/dist/components/CompositionSelectorItem.js +2 -2
  11. package/dist/components/ConfigureLicenseModal.js +1 -1
  12. package/dist/components/CurrentAsset.js +40 -6
  13. package/dist/components/EditorContexts.js +3 -1
  14. package/dist/components/ElementInstallConfirmation.js +287 -135
  15. package/dist/components/FixComputedValueModal.js +38 -8
  16. package/dist/components/FullscreenToggle.js +9 -8
  17. package/dist/components/GlobalKeybindings.js +50 -49
  18. package/dist/components/HighlightedElementSource.d.ts +5 -0
  19. package/dist/components/HighlightedElementSource.js +78 -0
  20. package/dist/components/InspectorPanel/MultiSequenceField.d.ts +12 -0
  21. package/dist/components/InspectorPanel/MultiSequenceField.js +131 -0
  22. package/dist/components/InspectorPanel/MultiSequenceInspector.d.ts +8 -0
  23. package/dist/components/InspectorPanel/MultiSequenceInspector.js +102 -0
  24. package/dist/components/InspectorPanel/MultiSequenceNumberField.d.ts +9 -0
  25. package/dist/components/InspectorPanel/MultiSequenceNumberField.js +88 -0
  26. package/dist/components/InspectorPanel.js +4 -0
  27. package/dist/components/InspectorSequenceSection.js +64 -1
  28. package/dist/components/InstallPackage.js +4 -5
  29. package/dist/components/KeyboardShortcutsSettings.js +212 -33
  30. package/dist/components/MenuToolbar.js +7 -5
  31. package/dist/components/ModalContainer.d.ts +1 -0
  32. package/dist/components/ModalContainer.js +2 -2
  33. package/dist/components/Modals.js +3 -1
  34. package/dist/components/ModelManager.d.ts +16 -0
  35. package/dist/components/ModelManager.js +200 -0
  36. package/dist/components/ModelsSettings.d.ts +2 -0
  37. package/dist/components/ModelsSettings.js +133 -0
  38. package/dist/components/NewComposition/DismissableModal.d.ts +1 -0
  39. package/dist/components/NewComposition/DismissableModal.js +2 -2
  40. package/dist/components/NewComposition/InputDragger.d.ts +2 -2
  41. package/dist/components/NewComposition/InputDragger.js +6 -6
  42. package/dist/components/NewComposition/NewFolder.js +11 -8
  43. package/dist/components/NewComposition/RenameFolder.js +17 -10
  44. package/dist/components/OptionalPackageModal.d.ts +11 -0
  45. package/dist/components/OptionalPackageModal.js +155 -0
  46. package/dist/components/PlayPause.js +4 -8
  47. package/dist/components/PlaybackKeyboardShortcutsManager.js +3 -6
  48. package/dist/components/PreviewToolbarOverflowButton.js +11 -2
  49. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +5 -2
  50. package/dist/components/RadioButton.d.ts +1 -0
  51. package/dist/components/RadioButton.js +2 -2
  52. package/dist/components/RenderButton.js +5 -1
  53. package/dist/components/RenderModal/NumberSetting.d.ts +6 -1
  54. package/dist/components/RenderModal/NumberSetting.js +2 -2
  55. package/dist/components/RenderModal/RenderModalBasic.js +1 -1
  56. package/dist/components/RenderModal/RenderModalOutputName.d.ts +3 -1
  57. package/dist/components/RenderModal/RenderModalOutputName.js +4 -4
  58. package/dist/components/RenderModal/SeparateAudioOption.js +1 -1
  59. package/dist/components/RenderModal/WebRenderModalBasic.js +1 -1
  60. package/dist/components/RenderQueue/CaptionQueueItem.d.ts +6 -0
  61. package/dist/components/RenderQueue/CaptionQueueItem.js +129 -0
  62. package/dist/components/RenderQueue/CaptionQueueProcessor.d.ts +1 -0
  63. package/dist/components/RenderQueue/CaptionQueueProcessor.js +110 -0
  64. package/dist/components/RenderQueue/CaptionQueueProcessorLoader.d.ts +2 -0
  65. package/dist/components/RenderQueue/CaptionQueueProcessorLoader.js +54 -0
  66. package/dist/components/RenderQueue/RenderQueueItem.js +3 -3
  67. package/dist/components/RenderQueue/VideoMattingQueueItem.d.ts +6 -0
  68. package/dist/components/RenderQueue/VideoMattingQueueItem.js +129 -0
  69. package/dist/components/RenderQueue/VideoMattingQueueProcessor.d.ts +1 -0
  70. package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +105 -0
  71. package/dist/components/RenderQueue/VideoMattingQueueProcessorLoader.d.ts +2 -0
  72. package/dist/components/RenderQueue/VideoMattingQueueProcessorLoader.js +54 -0
  73. package/dist/components/RenderQueue/caption-job-types.d.ts +47 -0
  74. package/dist/components/RenderQueue/caption-job-types.js +7 -0
  75. package/dist/components/RenderQueue/context.d.ts +16 -0
  76. package/dist/components/RenderQueue/context.js +224 -11
  77. package/dist/components/RenderQueue/index.js +34 -10
  78. package/dist/components/RenderQueue/item-style.d.ts +1 -0
  79. package/dist/components/RenderQueue/item-style.js +2 -1
  80. package/dist/components/RenderQueue/load-model-for-job.d.ts +11 -0
  81. package/dist/components/RenderQueue/load-model-for-job.js +14 -0
  82. package/dist/components/RenderQueue/video-matting-job-types.d.ts +38 -0
  83. package/dist/components/RenderQueue/video-matting-job-types.js +5 -0
  84. package/dist/components/RendersTab.js +4 -4
  85. package/dist/components/SegmentedControl.d.ts +2 -2
  86. package/dist/components/SegmentedControl.js +38 -13
  87. package/dist/components/SelectedOutlinePolygon.js +8 -2
  88. package/dist/components/SettingsButton.d.ts +4 -0
  89. package/dist/components/SettingsButton.js +49 -0
  90. package/dist/components/SettingsModal.d.ts +1 -1
  91. package/dist/components/SettingsModal.js +3 -1
  92. package/dist/components/ShowOutlinesProvider.js +12 -0
  93. package/dist/components/SidebarCollapserControls.js +10 -11
  94. package/dist/components/SizeSelector.js +10 -2
  95. package/dist/components/SkillsSettings.js +2 -3
  96. package/dist/components/SnappingToggle.js +5 -2
  97. package/dist/components/Tabs/vertical.d.ts +1 -0
  98. package/dist/components/Tabs/vertical.js +2 -2
  99. package/dist/components/TimeValue.js +2 -3
  100. package/dist/components/Timeline/SequencePropsObserver.js +4 -0
  101. package/dist/components/Timeline/Timeline.js +2 -42
  102. package/dist/components/Timeline/TimelineClipboardKeybindings.js +2 -4
  103. package/dist/components/Timeline/TimelineDeleteKeybindings.js +3 -18
  104. package/dist/components/Timeline/TimelineDragHandler.js +2 -2
  105. package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +1 -0
  106. package/dist/components/Timeline/TimelineRowChrome.js +11 -3
  107. package/dist/components/Timeline/TimelineSchemaField.js +8 -4
  108. package/dist/components/Timeline/TimelineSelection.d.ts +2 -0
  109. package/dist/components/Timeline/TimelineSelection.js +55 -2
  110. package/dist/components/Timeline/TimelineSequence.js +75 -17
  111. package/dist/components/Timeline/TimelineSequenceItem.d.ts +0 -1
  112. package/dist/components/Timeline/TimelineSequenceItem.js +208 -111
  113. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +23 -3
  114. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +73 -25
  115. package/dist/components/Timeline/TimelineTimeIndicators.js +1 -0
  116. package/dist/components/Timeline/use-asset-timeline-context-menu.d.ts +2 -0
  117. package/dist/components/Timeline/use-asset-timeline-context-menu.js +52 -0
  118. package/dist/components/TimelineInOutToggle.js +20 -17
  119. package/dist/components/Transcription/LazyModels.d.ts +1 -0
  120. package/dist/components/Transcription/LazyModels.js +5 -0
  121. package/dist/components/Transcription/Models.d.ts +6 -0
  122. package/dist/components/Transcription/Models.js +18 -0
  123. package/dist/components/Transcription/TranscriptionModal.d.ts +3 -0
  124. package/dist/components/Transcription/TranscriptionModal.js +428 -0
  125. package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.d.ts +5 -0
  126. package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +48 -0
  127. package/dist/components/Transcription/caption-output-name.d.ts +2 -0
  128. package/dist/components/Transcription/caption-output-name.js +10 -0
  129. package/dist/components/Transcription/resample-media-to-16-khz.d.ts +6 -0
  130. package/dist/components/Transcription/resample-media-to-16-khz.js +82 -0
  131. package/dist/components/Transcription/whisper-languages.d.ts +2 -0
  132. package/dist/components/Transcription/whisper-languages.js +104 -0
  133. package/dist/components/Transcription/whisper-webgpu-capability.d.ts +2 -0
  134. package/dist/components/Transcription/whisper-webgpu-capability.js +7 -0
  135. package/dist/components/UndoRedoButtons.js +13 -38
  136. package/dist/components/UpdatesSettings.js +8 -12
  137. package/dist/components/VideoMatting/LazyModels.d.ts +1 -0
  138. package/dist/components/VideoMatting/LazyModels.js +5 -0
  139. package/dist/components/VideoMatting/Models.d.ts +6 -0
  140. package/dist/components/VideoMatting/Models.js +18 -0
  141. package/dist/components/VideoMatting/VideoMattingModal.d.ts +3 -0
  142. package/dist/components/VideoMatting/VideoMattingModal.js +207 -0
  143. package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.d.ts +5 -0
  144. package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.js +46 -0
  145. package/dist/components/VideoMatting/video-matting-capability.d.ts +2 -0
  146. package/dist/components/VideoMatting/video-matting-capability.js +7 -0
  147. package/dist/components/WebMcp.js +439 -22
  148. package/dist/components/import-assets.d.ts +3 -2
  149. package/dist/components/import-assets.js +5 -9
  150. package/dist/components/keyboard-shortcuts.d.ts +17 -1
  151. package/dist/components/keyboard-shortcuts.js +177 -89
  152. package/dist/components/public-output-name.d.ts +5 -0
  153. package/dist/components/public-output-name.js +60 -0
  154. package/dist/components/use-model-cache-status.d.ts +7 -0
  155. package/dist/components/use-model-cache-status.js +35 -0
  156. package/dist/esm/CaptionQueueProcessor-k0yrm3dj.mjs +211 -0
  157. package/dist/esm/HighlightedElementSource-jfc66k4p.mjs +1236 -0
  158. package/dist/esm/LazyModels-2trdm224.mjs +11 -0
  159. package/dist/esm/LazyModels-fjb5ckaq.mjs +11 -0
  160. package/dist/esm/TranscriptionModal-916jqhry.mjs +1011 -0
  161. package/dist/esm/VideoMattingModal-2tm79s9b.mjs +374 -0
  162. package/dist/esm/VideoMattingQueueProcessor-t1hgm2rm.mjs +109 -0
  163. package/dist/esm/index-1x7bsdh6.mjs +261 -0
  164. package/dist/esm/index-3hgr6gjx.mjs +41 -0
  165. package/dist/esm/index-5qddp5h7.mjs +36 -0
  166. package/dist/esm/index-5zrb1ft4.mjs +39 -0
  167. package/dist/esm/index-6cvm9a65.mjs +45923 -0
  168. package/dist/esm/index-7tt71e8n.mjs +36 -0
  169. package/dist/esm/index-9x6e1dq0.mjs +428 -0
  170. package/dist/esm/index-cw0pnpg5.mjs +50 -0
  171. package/dist/esm/index-czwvnn9g.mjs +35 -0
  172. package/dist/esm/index-hy4xcgty.mjs +1366 -0
  173. package/dist/esm/{chunk-je0h1bgt.js → index-jg13hf2g.mjs} +3 -1
  174. package/dist/esm/{chunk-6jf1natv.js → index-rcv7qkt5.mjs} +18 -1
  175. package/dist/esm/index-sgtmgc4h.mjs +423 -0
  176. package/dist/esm/index-te66vvrp.mjs +142 -0
  177. package/dist/esm/index-v4tr1bft.mjs +20 -0
  178. package/dist/esm/index-x7t2y7ws.mjs +54194 -0
  179. package/dist/esm/index-xhe2m2qr.mjs +1146 -0
  180. package/dist/esm/index.mjs +45 -933
  181. package/dist/esm/internals.mjs +13 -114393
  182. package/dist/esm/previewEntry.mjs +387 -115050
  183. package/dist/esm/renderEntry.mjs +3 -3
  184. package/dist/esm/{chunk-m0jqdbkr.js → resolve-composition-component-location-14148845.mjs} +1 -1
  185. package/dist/helpers/drag-aware-double-click.d.ts +2 -1
  186. package/dist/helpers/drag-aware-double-click.js +12 -1
  187. package/dist/helpers/get-asset-metadata.d.ts +1 -0
  188. package/dist/helpers/get-asset-metadata.js +4 -0
  189. package/dist/helpers/hoverable.js +8 -0
  190. package/dist/helpers/inject-css.js +2 -0
  191. package/dist/helpers/optional-package-dependencies.d.ts +3 -0
  192. package/dist/helpers/optional-package-dependencies.js +24 -0
  193. package/dist/helpers/pointer-session.d.ts +6 -0
  194. package/dist/helpers/pointer-session.js +36 -14
  195. package/dist/helpers/prism-tomorrow.d.ts +1 -0
  196. package/dist/helpers/prism-tomorrow.js +151 -0
  197. package/dist/helpers/sequence-node-path-mutations.js +11 -0
  198. package/dist/helpers/slugify-name.d.ts +1 -0
  199. package/dist/helpers/slugify-name.js +14 -0
  200. package/dist/helpers/studio-runtime-config.d.ts +1 -0
  201. package/dist/helpers/studio-runtime-config.js +6 -1
  202. package/dist/helpers/use-keybinding.d.ts +9 -3
  203. package/dist/helpers/use-keybinding.js +8 -9
  204. package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -0
  205. package/dist/helpers/use-keyboard-shortcut-label.js +15 -0
  206. package/dist/helpers/use-menu-structure.js +58 -13
  207. package/dist/icons/input-props.d.ts +1 -1
  208. package/dist/icons/input-props.js +2 -2
  209. package/dist/icons/models.d.ts +4 -0
  210. package/dist/icons/models.js +7 -0
  211. package/dist/icons/separation.d.ts +4 -0
  212. package/dist/icons/separation.js +7 -0
  213. package/dist/icons/transcription.d.ts +4 -0
  214. package/dist/icons/transcription.js +7 -0
  215. package/dist/icons/upload.js +1 -1
  216. package/dist/state/modals.d.ts +14 -2
  217. package/package.json +34 -20
  218. package/dist/components/UpdateCheck.d.ts +0 -1
  219. package/dist/components/UpdateCheck.js +0 -79
  220. package/dist/esm/chunk-3netyjd9.js +0 -99793
@@ -7,8 +7,10 @@ const colors_1 = require("../helpers/colors");
7
7
  const copy_text_1 = require("../helpers/copy-text");
8
8
  const use_copy_feedback_1 = require("../helpers/use-copy-feedback");
9
9
  const copy_1 = require("../icons/copy");
10
+ const skills_1 = require("../icons/skills");
10
11
  const CodingAgentButton_1 = require("./CodingAgentButton");
11
12
  const InlineAction_1 = require("./InlineAction");
13
+ const ModalContainer_1 = require("./ModalContainer");
12
14
  const ModalFooter_1 = require("./ModalFooter");
13
15
  const ModalHeader_1 = require("./ModalHeader");
14
16
  const DismissableModal_1 = require("./NewComposition/DismissableModal");
@@ -16,10 +18,17 @@ const NotificationCenter_1 = require("./Notifications/NotificationCenter");
16
18
  const SettingsContext_1 = require("./SettingsContext");
17
19
  const panelStyle = {
18
20
  borderRadius: 6,
21
+ display: 'flex',
22
+ flexDirection: 'column',
23
+ width: (0, ModalContainer_1.getMaxModalWidth)(560),
24
+ maxHeight: (0, ModalContainer_1.getMaxModalHeight)(800),
25
+ minWidth: 0,
19
26
  overflow: 'hidden',
20
27
  };
21
28
  const container = {
22
- padding: '12px 16px 18px',
29
+ padding: 16,
30
+ minHeight: 0,
31
+ overflowY: 'auto',
23
32
  };
24
33
  const text = {
25
34
  color: colors_1.LIGHT_TEXT,
@@ -28,11 +37,12 @@ const text = {
28
37
  lineHeight: 1.5,
29
38
  };
30
39
  const commandField = {
31
- alignItems: 'center',
32
- background: colors_1.SELECTED_BACKGROUND,
40
+ alignItems: 'flex-start',
41
+ background: colors_1.BLACK_ALPHA_30,
33
42
  borderRadius: 6,
34
43
  boxSizing: 'border-box',
35
44
  display: 'flex',
45
+ gap: 8,
36
46
  marginTop: 10,
37
47
  padding: '8px 8px 8px 10px',
38
48
  width: '100%',
@@ -41,13 +51,23 @@ const code = {
41
51
  color: colors_1.WHITE,
42
52
  flex: 1,
43
53
  fontFamily: 'monospace',
44
- fontSize: 14,
54
+ fontSize: 13,
45
55
  lineHeight: 1.5,
46
56
  margin: 0,
47
57
  minWidth: 0,
48
- overflowX: 'auto',
58
+ overflowWrap: 'anywhere',
49
59
  whiteSpace: 'pre-wrap',
50
60
  };
61
+ const copyAction = {
62
+ flexShrink: 0,
63
+ };
64
+ const skillsIcon = {
65
+ display: 'inline-block',
66
+ height: 18,
67
+ width: 18,
68
+ marginRight: 6,
69
+ verticalAlign: 'middle',
70
+ };
51
71
  const copyIcon = {
52
72
  flexShrink: 0,
53
73
  height: 12,
@@ -56,12 +76,16 @@ const copyIcon = {
56
76
  const footer = {
57
77
  display: 'flex',
58
78
  flex: 'none',
79
+ minWidth: 0,
80
+ padding: '12px 16px',
59
81
  justifyContent: 'flex-end',
60
82
  };
61
83
  const FixComputedValueModal = ({ state }) => {
62
84
  var _a;
63
85
  const { codingAgentInfo } = (0, SettingsContext_1.useSettings)();
64
- const prompt = `/remotion-interactivity ${state.context} make "${state.prop}" interactive`;
86
+ const skillName = '/remotion-interactivity';
87
+ const promptDetails = ` ${state.context} make "${state.prop}" interactive`;
88
+ const prompt = `${skillName}${promptDetails}`;
65
89
  const installCommand = 'npx remotion skills add';
66
90
  const hasCodingAgent = ((_a = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedCodingAgents.length) !== null && _a !== void 0 ? _a : 0) > 0;
67
91
  const { copied: promptCopied, markCopied: markPromptCopied } = (0, use_copy_feedback_1.useCopyFeedback)();
@@ -89,7 +113,7 @@ const FixComputedValueModal = ({ state }) => {
89
113
  return (jsx_runtime_1.jsxs(DismissableModal_1.DismissableModal, { panelStyle: panelStyle, children: [
90
114
  jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: "Fix computed value" }), jsx_runtime_1.jsxs("div", { style: container, children: [state.remotionInteractivitySkillAvailable ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
91
115
  jsx_runtime_1.jsx("div", { style: text, children: "First, install the Remotion Agent Skills:" }), jsx_runtime_1.jsxs("div", { style: commandField, children: [
92
- jsx_runtime_1.jsx("pre", { style: code, children: installCommand }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onCopyInstallCommand, renderAction: renderInstallCommandCopyAction, title: "Copy command" })
116
+ jsx_runtime_1.jsx("pre", { style: code, children: installCommand }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { style: copyAction, variant: null, onClick: onCopyInstallCommand, renderAction: renderInstallCommandCopyAction, title: "Copy command" })
93
117
  ] })
94
118
  ] })), jsx_runtime_1.jsx("div", { style: {
95
119
  ...text,
@@ -97,7 +121,13 @@ const FixComputedValueModal = ({ state }) => {
97
121
  }, children: state.remotionInteractivitySkillAvailable
98
122
  ? 'Paste this prompt into your coding agent to make this value editable in Studio:'
99
123
  : 'Then, paste this prompt into your coding agent:' }), jsx_runtime_1.jsxs("div", { style: commandField, children: [
100
- jsx_runtime_1.jsx("pre", { style: code, children: prompt }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onCopyPrompt, renderAction: renderPromptCopyAction, title: "Copy prompt" })
124
+ jsx_runtime_1.jsxs("pre", { style: code, children: [
125
+ jsx_runtime_1.jsx(skills_1.SkillsIcon, { color: colors_1.BLUE, style: skillsIcon, "aria-hidden": true }), jsx_runtime_1.jsx("span", { style: {
126
+ color: colors_1.BLUE,
127
+ fontFamily: 'inherit',
128
+ fontSize: 'inherit',
129
+ lineHeight: 'inherit',
130
+ }, children: skillName }), promptDetails] }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { style: copyAction, variant: null, onClick: onCopyPrompt, renderAction: renderPromptCopyAction, title: "Copy prompt" })
101
131
  ] })
102
132
  ] }), hasCodingAgent ? (jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { style: footer, children: jsx_runtime_1.jsx(CodingAgentButton_1.CodingAgentButton, { label: "Open in", prompt: prompt, size: "compact", style: null }) })) : null] }));
103
133
  };
@@ -6,15 +6,10 @@ const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
7
  const no_react_1 = require("remotion/no-react");
8
8
  const use_keybinding_1 = require("../helpers/use-keybinding");
9
+ const use_keyboard_shortcut_label_1 = require("../helpers/use-keyboard-shortcut-label");
9
10
  const fullscreen_1 = require("../icons/fullscreen");
10
11
  const canvas_ref_1 = require("../state/canvas-ref");
11
12
  const ControlButton_1 = require("./ControlButton");
12
- const accessibilityLabel = [
13
- 'Enter fullscreen preview',
14
- (0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? null : '(F)',
15
- ]
16
- .filter(no_react_1.NoReactInternals.truthy)
17
- .join(' ');
18
13
  const FullScreenToggle = ({ hidden }) => {
19
14
  const keybindings = (0, use_keybinding_1.useKeybinding)();
20
15
  const { setSize } = (0, react_1.useContext)(remotion_1.Internals.PreviewSizeContext);
@@ -30,12 +25,18 @@ const FullScreenToggle = ({ hidden }) => {
30
25
  },
31
26
  }));
32
27
  }, [setSize]);
28
+ const shortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('enterFullscreen');
29
+ const accessibilityLabel = [
30
+ 'Enter fullscreen preview',
31
+ (0, use_keybinding_1.areKeyboardShortcutsDisabled)() || shortcut === '' ? null : `(${shortcut})`,
32
+ ]
33
+ .filter(no_react_1.NoReactInternals.truthy)
34
+ .join(' ');
33
35
  (0, react_1.useEffect)(() => {
34
36
  const f = keybindings.registerKeybinding({
35
37
  event: 'keydown',
36
- key: 'f',
38
+ action: 'enterFullscreen',
37
39
  callback: onClick,
38
- commandCtrlKey: false,
39
40
  preventDefault: true,
40
41
  triggerIfInputFieldFocused: false,
41
42
  keepRegisteredWhenNotHighestContext: false,
@@ -15,12 +15,12 @@ const CompositionSelector_1 = require("./CompositionSelector");
15
15
  const ExplorerPanelRef_1 = require("./ExplorerPanelRef");
16
16
  const NotificationCenter_1 = require("./Notifications/NotificationCenter");
17
17
  const TimelineSelection_1 = require("./Timeline/TimelineSelection");
18
- const sequencePropShortcuts = {
19
- p: 'style.translate',
20
- r: 'style.rotate',
21
- s: 'style.scale',
22
- t: 'style.opacity',
23
- };
18
+ const sequencePropShortcuts = [
19
+ { action: 'selectTranslateProp', fieldKey: 'style.translate' },
20
+ { action: 'selectRotateProp', fieldKey: 'style.rotate' },
21
+ { action: 'selectScaleProp', fieldKey: 'style.scale' },
22
+ { action: 'selectOpacityProp', fieldKey: 'style.opacity' },
23
+ ];
24
24
  const hasOwnProperty = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key);
25
25
  const GlobalKeybindings = () => {
26
26
  const keybindings = (0, use_keybinding_1.useKeybinding)();
@@ -84,29 +84,9 @@ const GlobalKeybindings = () => {
84
84
  renderButton.click();
85
85
  }, [video]);
86
86
  (0, react_1.useEffect)(() => {
87
- const onSequencePropKey = (event) => {
88
- const key = event.key.toLowerCase();
89
- const fieldKey = sequencePropShortcuts[key];
90
- if (!fieldKey) {
91
- return;
92
- }
93
- if (selectSequenceProp(fieldKey)) {
94
- event.preventDefault();
95
- return;
96
- }
97
- if (key === 't') {
98
- setCheckerboard((c) => !c);
99
- event.preventDefault();
100
- return;
101
- }
102
- if (key === 'r') {
103
- openRenderModal();
104
- event.preventDefault();
105
- }
106
- };
107
87
  const cmdKKey = keybindings.registerKeybinding({
108
88
  event: 'keydown',
109
- key: 'k',
89
+ action: 'quickSwitcher',
110
90
  callback: () => {
111
91
  var _a;
112
92
  setSelectedModal({
@@ -121,7 +101,6 @@ const GlobalKeybindings = () => {
121
101
  },
122
102
  triggerIfInputFieldFocused: true,
123
103
  keepRegisteredWhenNotHighestContext: false,
124
- commandCtrlKey: true,
125
104
  preventDefault: true,
126
105
  });
127
106
  const cmdSKey = keybindings.registerKeybinding({
@@ -138,29 +117,57 @@ const GlobalKeybindings = () => {
138
117
  const cmdIKey = (0, studio_runtime_config_1.getStudioAskAIEnabled)()
139
118
  ? keybindings.registerKeybinding({
140
119
  event: 'keydown',
141
- key: 'i',
120
+ action: 'askAI',
142
121
  callback: () => {
143
122
  var _a;
144
123
  (_a = AskAiModal_1.askAiModalRef.current) === null || _a === void 0 ? void 0 : _a.toggle();
145
124
  },
146
125
  triggerIfInputFieldFocused: true,
147
126
  keepRegisteredWhenNotHighestContext: true,
148
- commandCtrlKey: true,
149
127
  preventDefault: true,
150
128
  })
151
129
  : null;
152
- const sequencePropKeys = Object.keys(sequencePropShortcuts).map((key) => keybindings.registerKeybinding({
130
+ const sequencePropKeys = sequencePropShortcuts.map(({ action, fieldKey }) => keybindings.registerKeybinding({
153
131
  event: 'keydown',
154
- key,
155
- callback: onSequencePropKey,
156
- commandCtrlKey: false,
132
+ action,
133
+ callback: (event) => {
134
+ if (selectSequenceProp(fieldKey)) {
135
+ event.preventDefault();
136
+ }
137
+ },
157
138
  preventDefault: false,
158
139
  triggerIfInputFieldFocused: false,
159
140
  keepRegisteredWhenNotHighestContext: false,
160
141
  }));
142
+ const render = keybindings.registerKeybinding({
143
+ event: 'keydown',
144
+ action: 'render',
145
+ callback: (event) => {
146
+ if (event.defaultPrevented)
147
+ return;
148
+ openRenderModal();
149
+ event.preventDefault();
150
+ },
151
+ preventDefault: false,
152
+ triggerIfInputFieldFocused: false,
153
+ keepRegisteredWhenNotHighestContext: false,
154
+ });
155
+ const checkerboard = keybindings.registerKeybinding({
156
+ event: 'keydown',
157
+ action: 'toggleCheckerboard',
158
+ callback: (event) => {
159
+ if (event.defaultPrevented)
160
+ return;
161
+ setCheckerboard((current) => !current);
162
+ event.preventDefault();
163
+ },
164
+ preventDefault: false,
165
+ triggerIfInputFieldFocused: false,
166
+ keepRegisteredWhenNotHighestContext: false,
167
+ });
161
168
  const questionMark = keybindings.registerKeybinding({
162
- event: 'keypress',
163
- key: '?',
169
+ event: 'keydown',
170
+ action: 'showKeyboardShortcuts',
164
171
  callback: () => {
165
172
  var _a;
166
173
  var _b;
@@ -170,41 +177,33 @@ const GlobalKeybindings = () => {
170
177
  initialPublicLicenseKey: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
171
178
  });
172
179
  },
173
- commandCtrlKey: false,
174
180
  preventDefault: true,
175
181
  triggerIfInputFieldFocused: false,
176
182
  keepRegisteredWhenNotHighestContext: false,
177
183
  });
178
184
  const pageDown = keybindings.registerKeybinding({
179
185
  event: 'keydown',
180
- key: 'PageDown',
186
+ action: 'nextComposition',
181
187
  callback: navigateToNextComposition,
182
- commandCtrlKey: false,
183
188
  preventDefault: true,
184
189
  triggerIfInputFieldFocused: false,
185
190
  keepRegisteredWhenNotHighestContext: false,
186
191
  });
187
192
  const pageUp = keybindings.registerKeybinding({
188
193
  event: 'keydown',
189
- key: 'PageUp',
194
+ action: 'previousComposition',
190
195
  callback: navigateToPreviousComposition,
191
- commandCtrlKey: false,
192
196
  preventDefault: true,
193
197
  triggerIfInputFieldFocused: false,
194
198
  keepRegisteredWhenNotHighestContext: false,
195
199
  });
196
200
  const shiftMKey = keybindings.registerKeybinding({
197
201
  event: 'keydown',
198
- key: 'm',
199
- callback: (event) => {
200
- if (!event.shiftKey) {
201
- return;
202
- }
202
+ action: 'toggleSnapping',
203
+ callback: () => {
203
204
  setEditorSnapping((current) => !current);
204
- event.preventDefault();
205
205
  },
206
- commandCtrlKey: false,
207
- preventDefault: false,
206
+ preventDefault: true,
208
207
  triggerIfInputFieldFocused: false,
209
208
  keepRegisteredWhenNotHighestContext: false,
210
209
  });
@@ -212,6 +211,8 @@ const GlobalKeybindings = () => {
212
211
  for (const sequencePropKey of sequencePropKeys) {
213
212
  sequencePropKey.unregister();
214
213
  }
214
+ render.unregister();
215
+ checkerboard.unregister();
215
216
  questionMark.unregister();
216
217
  cmdKKey.unregister();
217
218
  cmdSKey.unregister();
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ declare const HighlightedElementSource: React.FC<{
3
+ readonly source: string;
4
+ }>;
5
+ export default HighlightedElementSource;
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ const jsx_runtime_1 = require("react/jsx-runtime");
40
+ const prismjs_1 = __importDefault(require("prismjs"));
41
+ const react_1 = __importStar(require("react"));
42
+ // These CommonJS grammars read global Prism. Load them after initialization:
43
+ // Bun hoists side-effect imports ahead of the CommonJS default import.
44
+ prismjs_1.default.manual = true;
45
+ require('prismjs/components/prism-jsx.js');
46
+ require('prismjs/components/prism-typescript.js');
47
+ require('prismjs/components/prism-tsx.js');
48
+ const tokenStyle = {
49
+ fontFamily: 'inherit',
50
+ fontSize: 'inherit',
51
+ lineHeight: 'inherit',
52
+ };
53
+ const renderTokens = (tokens) => {
54
+ var _a;
55
+ if (typeof tokens === 'string') {
56
+ return tokens;
57
+ }
58
+ if (Array.isArray(tokens)) {
59
+ let offset = 0;
60
+ return tokens.map((token) => {
61
+ const key = offset;
62
+ offset += token.length;
63
+ return jsx_runtime_1.jsx(react_1.default.Fragment, { children: renderTokens(token) }, key);
64
+ });
65
+ }
66
+ return (jsx_runtime_1.jsx("span", { className: [
67
+ 'token',
68
+ tokens.type,
69
+ ...(typeof tokens.alias === 'string'
70
+ ? [tokens.alias]
71
+ : ((_a = tokens.alias) !== null && _a !== void 0 ? _a : [])),
72
+ ].join(' '), style: tokenStyle, children: renderTokens(tokens.content) }));
73
+ };
74
+ const HighlightedElementSource = ({ source, }) => {
75
+ const tokens = (0, react_1.useMemo)(() => prismjs_1.default.tokenize(source, prismjs_1.default.languages.tsx), [source]);
76
+ return (jsx_runtime_1.jsx("span", { style: { ...tokenStyle, color: 'inherit' }, children: renderTokens(tokens) }));
77
+ };
78
+ exports.default = HighlightedElementSource;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import type { SequencePropsSubscriptionKey, TSequence } from 'remotion';
3
+ import type { SchemaFieldInfo } from '../../helpers/timeline-layout';
4
+ export type MultiSequenceTarget = {
5
+ readonly nodePath: SequencePropsSubscriptionKey;
6
+ readonly controls: NonNullable<TSequence['controls']>;
7
+ };
8
+ export declare const MultiSequenceField: React.FC<{
9
+ readonly field: SchemaFieldInfo;
10
+ readonly targets: MultiSequenceTarget[];
11
+ readonly readOnlyStudio: boolean;
12
+ }>;
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MultiSequenceField = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const remotion_1 = require("remotion");
7
+ const client_id_1 = require("../../helpers/client-id");
8
+ const colors_1 = require("../../helpers/colors");
9
+ const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
10
+ const noop_1 = require("../../helpers/noop");
11
+ const NotificationCenter_1 = require("../Notifications/NotificationCenter");
12
+ const save_sequence_prop_1 = require("../Timeline/save-sequence-prop");
13
+ const TimelineExpandArrowButton_1 = require("../Timeline/TimelineExpandArrowButton");
14
+ const TimelineFieldRowContent_1 = require("../Timeline/TimelineFieldRowContent");
15
+ const TimelineLayerEye_1 = require("../Timeline/TimelineLayerEye");
16
+ const TimelineRowChrome_1 = require("../Timeline/TimelineRowChrome");
17
+ const TimelineSchemaField_1 = require("../Timeline/TimelineSchemaField");
18
+ const MultiSequenceNumberField_1 = require("./MultiSequenceNumberField");
19
+ const MultiSequenceField = ({ field, targets, readOnlyStudio }) => {
20
+ var _a;
21
+ const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
22
+ const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
23
+ const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
24
+ const [editingMixed, setEditingMixed] = (0, react_1.useState)(false);
25
+ const statuses = targets.map((target) => {
26
+ var _a;
27
+ return (_a = remotion_1.Internals.getPropStatusesCtx(propStatuses, target.nodePath)) === null || _a === void 0 ? void 0 : _a[field.key];
28
+ });
29
+ const values = statuses.map((status) => (status === null || status === void 0 ? void 0 : status.status) === 'static'
30
+ ? remotion_1.Internals.getEffectiveVisualModeValue({
31
+ propStatus: status,
32
+ dragOverrideValue: undefined,
33
+ defaultValue: field.fieldSchema.default,
34
+ shouldResortToDefaultValueIfUndefined: true,
35
+ })
36
+ : undefined);
37
+ const mixed = values.some((value) => JSON.stringify(value) !== JSON.stringify(values[0]));
38
+ const staticValues = statuses.every((status) => (status === null || status === void 0 ? void 0 : status.status) === 'static');
39
+ const editable = !readOnlyStudio &&
40
+ (0, interactivity_enabled_1.isStudioInteractivityEnabled)() &&
41
+ previewServerState.type === 'connected' &&
42
+ staticValues;
43
+ const clear = (0, react_1.useCallback)(() => {
44
+ for (const target of targets) {
45
+ clearDragOverrides(target.nodePath);
46
+ }
47
+ }, [clearDragOverrides, targets]);
48
+ (0, react_1.useEffect)(() => clear, [clear]);
49
+ const preview = (0, react_1.useCallback)((nextValues) => {
50
+ if (!editable) {
51
+ return;
52
+ }
53
+ for (const [index, target] of targets.entries()) {
54
+ setDragOverrides(target.nodePath, field.key, remotion_1.Internals.makeStaticDragOverride(nextValues[index]));
55
+ }
56
+ }, [editable, field.key, setDragOverrides, targets]);
57
+ const save = (0, react_1.useCallback)(async (nextValues, options) => {
58
+ var _a, _b;
59
+ if (!editable || previewServerState.type !== 'connected') {
60
+ return;
61
+ }
62
+ try {
63
+ await (0, save_sequence_prop_1.saveSequenceProps)({
64
+ changes: targets.map((target, index) => ({
65
+ fileName: target.nodePath.absolutePath,
66
+ nodePath: target.nodePath,
67
+ fieldKey: field.key,
68
+ value: nextValues[index],
69
+ defaultValue: field.typeName === 'text-content' ||
70
+ field.fieldSchema.default === undefined
71
+ ? null
72
+ : JSON.stringify(field.fieldSchema.default),
73
+ schema: target.controls.schema,
74
+ sourceEdit: options === null || options === void 0 ? void 0 : options.sourceEdit,
75
+ })),
76
+ addedKeyframes: null,
77
+ movedKeyframes: null,
78
+ setPropStatuses,
79
+ clientId: previewServerState.clientId,
80
+ undoLabel: `Update ${(_a = field.description) !== null && _a !== void 0 ? _a : field.key} on selected sequences`,
81
+ redoLabel: `Update ${(_b = field.description) !== null && _b !== void 0 ? _b : field.key} on selected sequences again`,
82
+ });
83
+ setEditingMixed(false);
84
+ }
85
+ catch (err) {
86
+ (0, NotificationCenter_1.showNotification)(`Could not save shared control: ${err.message}`, 3000);
87
+ }
88
+ finally {
89
+ clear();
90
+ }
91
+ }, [clear, editable, field, previewServerState, setPropStatuses, targets]);
92
+ let content;
93
+ if (!editable) {
94
+ content = (jsx_runtime_1.jsx(TimelineSchemaField_1.UnsupportedStatus, { formattedValue: staticValues, label: !staticValues
95
+ ? statuses.some((status) => !status)
96
+ ? 'Loading…'
97
+ : statuses.some((status) => (status === null || status === void 0 ? void 0 : status.status) === 'computed')
98
+ ? 'Computed'
99
+ : 'Keyframed'
100
+ : mixed
101
+ ? 'Mixed'
102
+ : String((_a = values[0]) !== null && _a !== void 0 ? _a : '') }));
103
+ }
104
+ else if ((field.typeName === 'number' &&
105
+ values.every((value) => typeof value === 'number' && Number.isFinite(value))) ||
106
+ (field.typeName === 'translate' &&
107
+ values.every((value) => typeof value === 'string' &&
108
+ /^-?\d+(?:\.\d+)?px(?:\s+-?\d+(?:\.\d+)?px){0,2}$/.test(value)))) {
109
+ content = (jsx_runtime_1.jsx(MultiSequenceNumberField_1.MultiSequenceNumberField, { field: field, values: values, onPreview: preview, onSave: (next) => save(next, undefined), onClear: clear }));
110
+ }
111
+ else if (mixed && !editingMixed) {
112
+ content = (jsx_runtime_1.jsx("button", { type: "button", style: {
113
+ appearance: 'none',
114
+ border: 'none',
115
+ background: 'none',
116
+ color: colors_1.BLUE,
117
+ fontSize: 12,
118
+ padding: 0,
119
+ }, title: "Set a value for all selected sequences", onClick: () => setEditingMixed(true), children: "Mixed" }));
120
+ }
121
+ else {
122
+ content = (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [mixed ? jsx_runtime_1.jsx("span", { style: { fontSize: 12 }, children: "Mixed \u00B7 " }) : null, jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineFieldValue, { field: field, effectiveValue: values[0], propStatus: {
123
+ status: 'static',
124
+ keyframeDisplayOffsetAdjustment: null,
125
+ codeValue: mixed ? undefined : values[0],
126
+ }, scaleLockNodePath: field.typeName === 'text-content' ? null : targets[0].nodePath, onSave: (value, options) => save(targets.map(() => value), options), onDragValueChange: (value) => preview(targets.map(() => value)), onDragEnd: clear })
127
+ ] }));
128
+ }
129
+ return (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: 0, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: { minHeight: field.rowHeight }, selected: false, selectable: false, onSelect: noop_1.noop, showSelectedBackground: false, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx(TimelineFieldRowContent_1.TimelineFieldRowContent, { field: field, rowDepth: 0, selected: false, children: content }) }));
130
+ };
131
+ exports.MultiSequenceField = MultiSequenceField;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { TimelineSelection } from '../Timeline/TimelineSelection';
3
+ export declare const MultiSequenceInspector: React.FC<{
4
+ readonly selections: readonly Extract<TimelineSelection, {
5
+ type: 'sequence';
6
+ }>[];
7
+ readonly readOnlyStudio: boolean;
8
+ }>;