@remotion/studio 4.0.515 → 4.0.517

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 (277) hide show
  1. package/dist/api/restart-studio.js +4 -0
  2. package/dist/components/AssetSelector.js +4 -10
  3. package/dist/components/AssetSelectorItem.d.ts +2 -1
  4. package/dist/components/AssetSelectorItem.js +24 -29
  5. package/dist/components/Canvas.js +21 -15
  6. package/dist/components/CanvasCaptureDropHandler.d.ts +4 -0
  7. package/dist/components/CanvasCaptureDropHandler.js +42 -0
  8. package/dist/components/CanvasOrLoading.js +4 -3
  9. package/dist/components/CaptionInspector.d.ts +2 -0
  10. package/dist/components/CaptionInspector.js +3 -5
  11. package/dist/components/CheckboardToggle.js +1 -1
  12. package/dist/components/Checkbox.d.ts +0 -1
  13. package/dist/components/Checkbox.js +2 -19
  14. package/dist/components/CompositionSelector.js +6 -3
  15. package/dist/components/CompositionSelectorItem.js +9 -10
  16. package/dist/components/ConfigSelect.d.ts +17 -0
  17. package/dist/components/ConfigSelect.js +50 -0
  18. package/dist/components/ConfigureLicenseModal.js +79 -46
  19. package/dist/components/CurrentAsset.d.ts +10 -2
  20. package/dist/components/CurrentAsset.js +143 -45
  21. package/dist/components/Editor.js +2 -1
  22. package/dist/components/EditorContent.js +5 -2
  23. package/dist/components/EditorContexts.js +2 -1
  24. package/dist/components/EditorRuler/Ruler.d.ts +1 -0
  25. package/dist/components/EditorRuler/Ruler.js +9 -8
  26. package/dist/components/EditorRuler/index.d.ts +1 -0
  27. package/dist/components/EditorRuler/index.js +3 -4
  28. package/dist/components/EditorRuler/use-is-ruler-visible.d.ts +1 -1
  29. package/dist/components/EditorRuler/use-is-ruler-visible.js +8 -2
  30. package/dist/components/ElementLibraryModal.d.ts +5 -0
  31. package/dist/components/ElementLibraryModal.js +38 -0
  32. package/dist/components/FilePreview.js +71 -0
  33. package/dist/components/FixComputedValueModal.js +54 -51
  34. package/dist/components/GlobalKeybindings.js +5 -5
  35. package/dist/components/InlineAction.d.ts +1 -1
  36. package/dist/components/InlineAction.js +12 -2
  37. package/dist/components/InlineCaptionInspector.d.ts +2 -0
  38. package/dist/components/InlineCaptionInspector.js +2 -2
  39. package/dist/components/InlineCompositionName.js +1 -1
  40. package/dist/components/InlineEditableTitle.js +5 -4
  41. package/dist/components/InspectorInfoHeader.js +1 -1
  42. package/dist/components/InspectorOpenInEditor.js +48 -72
  43. package/dist/components/InspectorPanel/AlignmentControls.js +2 -3
  44. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.d.ts +7 -0
  45. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +39 -0
  46. package/dist/components/InspectorPanel/CompositionInspector.js +25 -45
  47. package/dist/components/InspectorPanel/CompositionInspectorHeader.js +2 -2
  48. package/dist/components/InspectorPanel/CompositionMetadata.js +11 -4
  49. package/dist/components/InspectorPanel/EasingInspector.js +2 -2
  50. package/dist/components/InspectorPanel/ElementLibraryButton.d.ts +2 -0
  51. package/dist/components/InspectorPanel/ElementLibraryButton.js +139 -0
  52. package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +10 -4
  53. package/dist/components/InspectorPanel/KeyframeInspector.js +1 -1
  54. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +14 -6
  55. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +2 -7
  56. package/dist/components/InspectorPanel/common.d.ts +0 -13
  57. package/dist/components/InspectorPanel/common.js +6 -59
  58. package/dist/components/InspectorPanel/inspector-selection.d.ts +2 -2
  59. package/dist/components/InspectorPanel/styles.d.ts +0 -1
  60. package/dist/components/InspectorPanel/styles.js +3 -4
  61. package/dist/components/InspectorPanel/use-composition-actions.js +0 -1
  62. package/dist/components/InspectorPanel/use-track-for-selection.d.ts +1 -2
  63. package/dist/components/InspectorPanelLayout.d.ts +1 -1
  64. package/dist/components/InspectorPanelLayout.js +1 -1
  65. package/dist/components/InspectorSequenceSection.d.ts +1 -2
  66. package/dist/components/InspectorSequenceSection.js +40 -54
  67. package/dist/components/InspectorSourceLocation.js +1 -1
  68. package/dist/components/InstallPackage.d.ts +2 -1
  69. package/dist/components/InstallPackage.js +60 -30
  70. package/dist/components/InstallablePackage.js +37 -11
  71. package/dist/components/KeyboardShortcutsSettings.d.ts +2 -0
  72. package/dist/components/KeyboardShortcutsSettings.js +177 -0
  73. package/dist/components/Menu/MenuItem.js +15 -6
  74. package/dist/components/MenuBuildIndicator.js +1 -1
  75. package/dist/components/MenuToolbar.js +7 -3
  76. package/dist/components/Modals.js +7 -5
  77. package/dist/components/NewComposition/CodemodFooter.d.ts +0 -1
  78. package/dist/components/NewComposition/CodemodFooter.js +2 -8
  79. package/dist/components/NewComposition/DeleteComposition.js +1 -1
  80. package/dist/components/NewComposition/DeleteFolder.js +1 -1
  81. package/dist/components/NewComposition/DuplicateComposition.js +1 -1
  82. package/dist/components/NewComposition/InputDragger.js +27 -4
  83. package/dist/components/NewComposition/NewComposition.js +1 -1
  84. package/dist/components/NewComposition/NewFolder.js +1 -3
  85. package/dist/components/NewComposition/RenameComposition.js +1 -1
  86. package/dist/components/NewComposition/RenameFolder.js +1 -1
  87. package/dist/components/NewComposition/use-rename-static-file.js +1 -1
  88. package/dist/components/Notifications/NotificationCenter.d.ts +1 -0
  89. package/dist/components/Notifications/NotificationCenter.js +5 -0
  90. package/dist/components/OptionsPanel.js +9 -12
  91. package/dist/components/PlaybackRateSelector.js +1 -1
  92. package/dist/components/Preview.js +83 -5
  93. package/dist/components/PreviewToolbar.js +12 -3
  94. package/dist/components/PreviewToolbarOverflowButton.d.ts +1 -0
  95. package/dist/components/PreviewToolbarOverflowButton.js +39 -2
  96. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +2 -2
  97. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +14 -30
  98. package/dist/components/RadioButton.d.ts +6 -0
  99. package/dist/components/RadioButton.js +62 -0
  100. package/dist/components/RenderButton.js +68 -184
  101. package/dist/components/RenderModal/DataEditor.js +15 -12
  102. package/dist/components/RenderModal/RenderStatusModal.js +0 -1
  103. package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +3 -1
  104. package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.d.ts +15 -0
  105. package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.js +95 -0
  106. package/dist/components/RenderQueue/RenderQueueRemoveItem.js +1 -6
  107. package/dist/components/RenderingSettings.js +7 -4
  108. package/dist/components/RulersAndGuidesToggle.d.ts +4 -0
  109. package/dist/components/RulersAndGuidesToggle.js +34 -0
  110. package/dist/components/SegmentedButton.d.ts +29 -0
  111. package/dist/components/SegmentedButton.js +226 -0
  112. package/dist/components/SelectedOutlineEditingHandles.d.ts +16 -0
  113. package/dist/components/SelectedOutlineEditingHandles.js +66 -0
  114. package/dist/components/SelectedOutlineElement.d.ts +2 -4
  115. package/dist/components/SelectedOutlineElement.js +15 -54
  116. package/dist/components/SelectedOutlineOverlay.js +32 -6
  117. package/dist/components/SelectedOutlinePolygon.d.ts +4 -6
  118. package/dist/components/SelectedOutlinePolygon.js +18 -16
  119. package/dist/components/SelectedOutlineRenderer.d.ts +1 -2
  120. package/dist/components/SelectedOutlineRenderer.js +66 -14
  121. package/dist/components/SelectedOutlineUvControls.d.ts +1 -1
  122. package/dist/components/SettingsModal.d.ts +1 -1
  123. package/dist/components/SettingsModal.js +30 -7
  124. package/dist/components/SettingsModalFooter.d.ts +3 -1
  125. package/dist/components/SettingsModalFooter.js +20 -4
  126. package/dist/components/ShowPixelGridProvider.d.ts +4 -0
  127. package/dist/components/ShowPixelGridProvider.js +24 -0
  128. package/dist/components/SidebarCollapserControls.js +2 -2
  129. package/dist/components/SkillsSettings.d.ts +2 -0
  130. package/dist/components/SkillsSettings.js +129 -0
  131. package/dist/components/StaticFilePreview.js +7 -1
  132. package/dist/components/StudioSettings.js +7 -48
  133. package/dist/components/Tabs/index.js +1 -1
  134. package/dist/components/Timeline/Timeline.js +41 -1
  135. package/dist/components/Timeline/TimelineAssetField.d.ts +1 -1
  136. package/dist/components/Timeline/TimelineAssetField.js +15 -9
  137. package/dist/components/Timeline/TimelineBooleanField.js +1 -4
  138. package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +6 -7
  139. package/dist/components/Timeline/TimelineClipboardKeybindings.js +7 -10
  140. package/dist/components/Timeline/TimelineDragHandler.js +11 -4
  141. package/dist/components/Timeline/TimelineEffectItem.d.ts +1 -0
  142. package/dist/components/Timeline/TimelineEffectItem.js +23 -10
  143. package/dist/components/Timeline/TimelineEffectPropItem.js +15 -2
  144. package/dist/components/Timeline/TimelineExpandedRow.js +5 -4
  145. package/dist/components/Timeline/TimelineFieldLabel.js +4 -2
  146. package/dist/components/Timeline/TimelineFieldRowContent.d.ts +1 -2
  147. package/dist/components/Timeline/TimelineFieldRowContent.js +8 -21
  148. package/dist/components/Timeline/TimelineImageInfo.d.ts +0 -1
  149. package/dist/components/Timeline/TimelineImageInfo.js +13 -32
  150. package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -2
  151. package/dist/components/Timeline/TimelineKeyframeControls.js +10 -4
  152. package/dist/components/Timeline/TimelinePlayCursorSyncer.js +4 -2
  153. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
  154. package/dist/components/Timeline/TimelineRotationField.js +0 -2
  155. package/dist/components/Timeline/TimelineRowChrome.d.ts +0 -1
  156. package/dist/components/Timeline/TimelineRowChrome.js +3 -4
  157. package/dist/components/Timeline/TimelineRowLayoutContext.d.ts +0 -1
  158. package/dist/components/Timeline/TimelineRowLayoutContext.js +1 -4
  159. package/dist/components/Timeline/TimelineScaleField.js +2 -6
  160. package/dist/components/Timeline/TimelineSchemaField.js +9 -3
  161. package/dist/components/Timeline/TimelineSelection.d.ts +29 -66
  162. package/dist/components/Timeline/TimelineSelection.js +31 -171
  163. package/dist/components/Timeline/TimelineSequence.d.ts +2 -0
  164. package/dist/components/Timeline/TimelineSequence.js +110 -19
  165. package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
  166. package/dist/components/Timeline/TimelineSequenceItem.js +13 -11
  167. package/dist/components/Timeline/TimelineSequencePropItem.js +15 -2
  168. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +7 -6
  169. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +85 -91
  170. package/dist/components/Timeline/TimelineTrack.js +1 -1
  171. package/dist/components/Timeline/TimelineTransformOriginField.js +0 -4
  172. package/dist/components/Timeline/TimelineTranslateField.js +0 -4
  173. package/dist/components/Timeline/TimelineVirtualization.js +3 -1
  174. package/dist/components/Timeline/delete-selected-timeline-item.d.ts +3 -4
  175. package/dist/components/Timeline/duplicate-selected-timeline-item.d.ts +3 -4
  176. package/dist/components/Timeline/duplicate-selected-timeline-item.js +3 -12
  177. package/dist/components/Timeline/find-track-for-node-path-info.d.ts +1 -1
  178. package/dist/components/Timeline/get-copy-context-for-agents-menu-item.d.ts +4 -0
  179. package/dist/components/Timeline/get-copy-context-for-agents-menu-item.js +26 -0
  180. package/dist/components/Timeline/get-sequence-context-menu-items.js +2 -19
  181. package/dist/components/Timeline/get-timeline-sequence-visible-layout.d.ts +6 -1
  182. package/dist/components/Timeline/get-timeline-sequence-visible-layout.js +11 -4
  183. package/dist/components/Timeline/keyframe-clipboard.d.ts +2 -3
  184. package/dist/components/Timeline/reset-selected-timeline-props.d.ts +2 -3
  185. package/dist/components/Timeline/sequence-prop-clipboard.d.ts +2 -3
  186. package/dist/components/Timeline/split-selected-timeline-item.d.ts +2 -3
  187. package/dist/components/Timeline/split-selected-timeline-item.js +0 -1
  188. package/dist/components/Timeline/timeline-expanded-filter.d.ts +1 -2
  189. package/dist/components/Timeline/timeline-field-row-layout.d.ts +1 -1
  190. package/dist/components/Timeline/timeline-field-row-layout.js +4 -7
  191. package/dist/components/Timeline/timeline-field-utils.js +0 -2
  192. package/dist/components/Timeline/timeline-scroll-logic.d.ts +7 -5
  193. package/dist/components/Timeline/timeline-scroll-logic.js +12 -7
  194. package/dist/components/Timeline/update-selected-easing.d.ts +7 -7
  195. package/dist/components/Timeline/use-timeline-asset-drop.js +24 -0
  196. package/dist/components/Timeline/use-timeline-keyframe-drag.d.ts +6 -7
  197. package/dist/components/TimelineCombobox.js +25 -160
  198. package/dist/components/TimelineInOutToggle.js +4 -1
  199. package/dist/components/canvas-capture-drop.d.ts +4 -0
  200. package/dist/components/canvas-capture-drop.js +22 -0
  201. package/dist/components/duplicate-jsx-node-api.d.ts +2 -0
  202. package/dist/components/duplicate-jsx-node-api.js +12 -0
  203. package/dist/components/effect-drag-and-drop.js +1 -4
  204. package/dist/components/handle-drop.d.ts +2 -1
  205. package/dist/components/handle-drop.js +3 -3
  206. package/dist/components/import-assets.js +9 -65
  207. package/dist/components/keyboard-shortcuts.d.ts +10 -0
  208. package/dist/components/keyboard-shortcuts.js +135 -0
  209. package/dist/components/selected-outline-control-layout.js +2 -6
  210. package/dist/components/selected-outline-measurement.d.ts +8 -9
  211. package/dist/components/selected-outline-measurement.js +16 -3
  212. package/dist/components/use-delete-asset.d.ts +1 -0
  213. package/dist/components/use-delete-asset.js +40 -0
  214. package/dist/components/use-selected-outline-control-target.d.ts +11 -0
  215. package/dist/components/use-selected-outline-control-target.js +79 -0
  216. package/dist/esm/{chunk-s6k99gh2.js → chunk-4bxz1d3g.js} +3 -2
  217. package/dist/esm/{chunk-v5a8vpv4.js → chunk-gzqm3g2m.js} +47432 -40444
  218. package/dist/esm/index.mjs +3 -0
  219. package/dist/esm/internals.mjs +47431 -40443
  220. package/dist/esm/previewEntry.mjs +47169 -40181
  221. package/dist/esm/renderEntry.mjs +2 -2
  222. package/dist/helpers/add-asset-cache-bust.d.ts +4 -0
  223. package/dist/helpers/add-asset-cache-bust.js +10 -0
  224. package/dist/helpers/calculate-timeline.d.ts +1 -7
  225. package/dist/helpers/calculate-timeline.js +2 -145
  226. package/dist/helpers/colors.d.ts +2 -0
  227. package/dist/helpers/colors.js +6 -2
  228. package/dist/helpers/drag-aware-double-click.d.ts +6 -0
  229. package/dist/helpers/drag-aware-double-click.js +20 -0
  230. package/dist/helpers/editor-ruler.js +6 -5
  231. package/dist/helpers/get-asset-metadata.d.ts +19 -0
  232. package/dist/helpers/get-asset-metadata.js +75 -21
  233. package/dist/helpers/get-connected-compositions.d.ts +1 -6
  234. package/dist/helpers/get-connected-compositions.js +2 -8
  235. package/dist/helpers/get-sequence-double-click-action.d.ts +2 -1
  236. package/dist/helpers/get-sequence-double-click-action.js +7 -1
  237. package/dist/helpers/get-sequence-visible-range.d.ts +1 -5
  238. package/dist/helpers/get-sequence-visible-range.js +6 -51
  239. package/dist/helpers/get-timeline-nestedness.d.ts +1 -2
  240. package/dist/helpers/get-timeline-nestedness.js +2 -12
  241. package/dist/helpers/get-timeline-sequence-layout.d.ts +4 -1
  242. package/dist/helpers/get-timeline-sequence-layout.js +15 -6
  243. package/dist/helpers/get-timeline-sequence-sort-key.d.ts +2 -21
  244. package/dist/helpers/get-timeline-sequence-sort-key.js +2 -16
  245. package/dist/helpers/hoverable.d.ts +1 -0
  246. package/dist/helpers/hoverable.js +2 -1
  247. package/dist/helpers/inject-css.js +3 -1
  248. package/dist/helpers/is-current-selected-still.js +4 -2
  249. package/dist/helpers/open-in-remotion-convert.d.ts +7 -0
  250. package/dist/helpers/open-in-remotion-convert.js +18 -0
  251. package/dist/helpers/sort-by-nonce-history.d.ts +1 -5
  252. package/dist/helpers/sort-by-nonce-history.js +3 -148
  253. package/dist/helpers/timeline-node-path-key.d.ts +1 -2
  254. package/dist/helpers/timeline-node-path-key.js +2 -2
  255. package/dist/helpers/use-media-metadata.d.ts +2 -1
  256. package/dist/helpers/use-media-metadata.js +12 -5
  257. package/dist/helpers/use-menu-structure.js +52 -32
  258. package/dist/icons/align-center-horizontal.js +1 -1
  259. package/dist/icons/align-left.js +1 -1
  260. package/dist/icons/align-right.js +1 -1
  261. package/dist/icons/keyboard.d.ts +4 -0
  262. package/dist/icons/keyboard.js +10 -0
  263. package/dist/icons/license.d.ts +4 -0
  264. package/dist/icons/license.js +8 -0
  265. package/dist/icons/package.d.ts +4 -0
  266. package/dist/icons/package.js +8 -0
  267. package/dist/icons/react.js +1 -1
  268. package/dist/icons/remotion-convert.d.ts +4 -0
  269. package/dist/icons/remotion-convert.js +10 -0
  270. package/dist/icons/skills.d.ts +4 -0
  271. package/dist/icons/skills.js +10 -0
  272. package/dist/state/editor-pixel-grid.d.ts +8 -0
  273. package/dist/state/editor-pixel-grid.js +18 -0
  274. package/dist/state/modals.d.ts +6 -5
  275. package/package.json +14 -12
  276. package/dist/components/KeyboardShortcutsExplainer.d.ts +0 -2
  277. package/dist/components/KeyboardShortcutsExplainer.js +0 -194
@@ -32,15 +32,11 @@ var __importStar = (this && this.__importStar) || (function () {
32
32
  return result;
33
33
  };
34
34
  })();
35
- var __importDefault = (this && this.__importDefault) || function (mod) {
36
- return (mod && mod.__esModule) ? mod : { "default": mod };
37
- };
38
35
  Object.defineProperty(exports, "__esModule", { value: true });
39
36
  exports.RenderButton = void 0;
40
37
  const jsx_runtime_1 = require("react/jsx-runtime");
41
38
  const player_1 = require("@remotion/player");
42
39
  const react_1 = __importStar(require("react"));
43
- const react_dom_1 = __importDefault(require("react-dom"));
44
40
  const remotion_1 = require("remotion");
45
41
  const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
46
42
  const client_id_1 = require("../helpers/client-id");
@@ -50,48 +46,10 @@ const caret_1 = require("../icons/caret");
50
46
  const render_1 = require("../icons/render");
51
47
  const in_out_1 = require("../state/in-out");
52
48
  const modals_1 = require("../state/modals");
53
- const z_index_1 = require("../state/z-index");
54
49
  const layout_1 = require("./layout");
55
- const is_menu_item_1 = require("./Menu/is-menu-item");
56
- const portals_1 = require("./Menu/portals");
57
- const styles_1 = require("./Menu/styles");
58
- const MenuContent_1 = require("./NewComposition/MenuContent");
59
- const splitButtonContainer = {
60
- display: 'inline-flex',
61
- flexDirection: 'row',
62
- alignItems: 'center',
63
- borderRadius: 3,
64
- gap: 1,
65
- overflow: 'hidden',
66
- };
67
- const mainButtonStyle = {
68
- paddingLeft: 7,
69
- paddingRight: 7,
70
- paddingTop: 7,
71
- paddingBottom: 7,
72
- background: colors_1.TRANSPARENT,
73
- border: 'none',
74
- borderRadius: '3px 0 0 3px',
75
- color: colors_1.WHITE,
76
- cursor: 'default',
77
- display: 'flex',
78
- alignItems: 'center',
79
- fontSize: 14,
80
- fontFamily: 'inherit',
81
- };
82
- const dropdownTriggerStyle = {
83
- paddingLeft: 6,
84
- paddingRight: 6,
85
- paddingTop: 7,
86
- paddingBottom: 7,
87
- background: colors_1.TRANSPARENT,
88
- border: 'none',
89
- borderRadius: '0 3px 3px 0',
90
- color: colors_1.WHITE,
91
- cursor: 'default',
92
- display: 'flex',
93
- alignItems: 'center',
94
- justifyContent: 'center',
50
+ const SegmentedButton_1 = require("./SegmentedButton");
51
+ const segmentedButtonStyle = {
52
+ height: 28,
95
53
  };
96
54
  const mainButtonContent = {
97
55
  paddingLeft: 4,
@@ -110,21 +68,21 @@ const label = {
110
68
  WebkitUserSelect: 'none',
111
69
  whiteSpace: 'nowrap',
112
70
  };
113
- const compactSplitButtonSegmentHeight = 24;
114
- const compactMainButtonStyle = {
115
- ...mainButtonStyle,
116
- boxSizing: 'border-box',
117
- height: compactSplitButtonSegmentHeight,
118
- padding: '0 4px',
119
- fontSize: 12,
71
+ const compactMainSegmentStyle = {
72
+ padding: '0 6px',
120
73
  };
121
- const compactDropdownTriggerStyle = {
122
- ...dropdownTriggerStyle,
123
- boxSizing: 'border-box',
124
- height: compactSplitButtonSegmentHeight,
74
+ const defaultMainSegmentStyle = {
75
+ fontFamily: 'inherit',
76
+ fontSize: 14,
77
+ padding: '0 7px',
78
+ };
79
+ const compactDropdownSegmentStyle = {
125
80
  padding: 0,
126
81
  width: 20,
127
82
  };
83
+ const defaultDropdownSegmentStyle = {
84
+ padding: '0 6px',
85
+ };
128
86
  const compactMainButtonContent = {
129
87
  ...mainButtonContent,
130
88
  paddingLeft: 0,
@@ -155,50 +113,6 @@ const RenderButtonInner = ({ readOnlyStudio, size: controlSize = 'default', narr
155
113
  const { inFrame, outFrame } = (0, in_out_1.useTimelineInOutFramePosition)();
156
114
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
157
115
  const [preferredRenderType, setPreferredRenderType] = (0, react_1.useState)(() => getInitialRenderType(readOnlyStudio));
158
- const [dropdownOpened, setDropdownOpened] = (0, react_1.useState)(false);
159
- const [hovered, setHovered] = (0, react_1.useState)(false);
160
- const dropdownRef = (0, react_1.useRef)(null);
161
- const containerRef = (0, react_1.useRef)(null);
162
- const { currentZIndex } = (0, z_index_1.useZIndex)();
163
- const size = player_1.PlayerInternals.useElementSize(dropdownRef, {
164
- triggerOnWindowResize: true,
165
- shouldApplyCssTransforms: true,
166
- });
167
- const refresh = size === null || size === void 0 ? void 0 : size.refresh;
168
- const onPointerDown = (0, react_1.useCallback)((e) => {
169
- // Prevent deselection of currently selected items
170
- e.stopPropagation();
171
- setDropdownOpened((o) => {
172
- if (!o) {
173
- refresh === null || refresh === void 0 ? void 0 : refresh();
174
- }
175
- return !o;
176
- });
177
- }, [refresh]);
178
- const onMenuPointerDown = (0, react_1.useCallback)((e) => {
179
- // Prevent deselection of currently selected items
180
- e.stopPropagation();
181
- }, []);
182
- const onClickDropdown = (0, react_1.useCallback)((e) => {
183
- e.stopPropagation();
184
- const isKeyboardInitiated = e.detail === 0;
185
- if (!isKeyboardInitiated) {
186
- return;
187
- }
188
- setDropdownOpened((o) => {
189
- if (!o) {
190
- refresh === null || refresh === void 0 ? void 0 : refresh();
191
- window.addEventListener('pointerup', (evt) => {
192
- if (!(0, is_menu_item_1.isMenuItem)(evt.target)) {
193
- setDropdownOpened(false);
194
- }
195
- }, {
196
- once: true,
197
- });
198
- }
199
- return !o;
200
- });
201
- }, [refresh]);
202
116
  const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
203
117
  .previewServerState.type;
204
118
  const isBrowserStudio = (0, browser_studio_operations_1.getBrowserStudioOperations)() !== null;
@@ -228,6 +142,7 @@ const RenderButtonInner = ({ readOnlyStudio, size: controlSize = 'default', narr
228
142
  };
229
143
  }, [controlSize]);
230
144
  const video = remotion_1.Internals.useVideo();
145
+ const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
231
146
  const { getCurrentFrame } = player_1.PlayerInternals.usePlayerMethods();
232
147
  const { props } = (0, react_1.useContext)(remotion_1.Internals.EditorPropsContext);
233
148
  // Read the frame when the modal opens instead of subscribing this button to
@@ -343,9 +258,6 @@ const RenderButtonInner = ({ readOnlyStudio, size: controlSize = 'default', narr
343
258
  openClientRenderModal();
344
259
  }
345
260
  }, [renderType, openServerRenderModal, openClientRenderModal]);
346
- const onHideDropdown = (0, react_1.useCallback)(() => {
347
- setDropdownOpened(false);
348
- }, []);
349
261
  const handleRenderTypeChange = (0, react_1.useCallback)((newType) => {
350
262
  setPreferredRenderType(newType);
351
263
  try {
@@ -354,7 +266,6 @@ const RenderButtonInner = ({ readOnlyStudio, size: controlSize = 'default', narr
354
266
  catch (_a) {
355
267
  // localStorage might not be available
356
268
  }
357
- setDropdownOpened(false);
358
269
  if (newType === 'server-render') {
359
270
  openServerRenderModal(false);
360
271
  }
@@ -421,94 +332,67 @@ const RenderButtonInner = ({ readOnlyStudio, size: controlSize = 'default', narr
421
332
  },
422
333
  ];
423
334
  }, [canServerRender, handleRenderTypeChange, readOnlyStudio]);
424
- const spaceToBottom = (0, react_1.useMemo)(() => {
425
- const margin = 10;
426
- if (size && dropdownOpened) {
427
- return size.windowSize.height - (size.top + size.height) - margin;
428
- }
429
- return 0;
430
- }, [dropdownOpened, size]);
431
- const spaceToTop = (0, react_1.useMemo)(() => {
432
- const margin = 10;
433
- if (size && dropdownOpened) {
434
- return size.top - margin;
435
- }
436
- return 0;
437
- }, [dropdownOpened, size]);
438
- const derivedMaxHeight = (0, react_1.useMemo)(() => {
439
- return spaceToTop > spaceToBottom ? spaceToTop : spaceToBottom;
440
- }, [spaceToBottom, spaceToTop]);
441
- const portalStyle = (0, react_1.useMemo)(() => {
442
- if (!dropdownOpened || !size) {
443
- return null;
444
- }
445
- const verticalLayout = spaceToTop > spaceToBottom ? 'bottom' : 'top';
446
- return {
447
- ...(verticalLayout === 'top'
448
- ? {
449
- ...styles_1.menuContainerTowardsBottom,
450
- top: size.top + size.height,
451
- }
452
- : {
453
- ...styles_1.menuContainerTowardsTop,
454
- bottom: size.windowSize.height - size.top,
455
- }),
456
- right: size.windowSize.width - size.left - size.width,
457
- };
458
- }, [dropdownOpened, size, spaceToBottom, spaceToTop]);
459
- const containerStyle = (0, react_1.useMemo)(() => {
460
- return {
461
- ...splitButtonContainer,
462
- borderRadius: controlSize === 'compact' ? 3 : 4,
463
- opacity: 1,
464
- cursor: 'default',
465
- };
466
- }, [controlSize]);
467
335
  const renderLabel = renderType === 'server-render'
468
336
  ? 'Render'
469
337
  : renderType === 'render-command'
470
338
  ? 'Render via CLI'
471
339
  : 'Render on web';
472
340
  const showRenderLabel = !narrow || renderType !== 'server-render';
473
- const mainHovered = hovered && !dropdownOpened;
474
- const mainForegroundColor = mainHovered ? colors_1.WHITE : colors_1.WHITE_ALPHA_80;
475
- const dropdownForegroundColor = hovered || dropdownOpened ? colors_1.WHITE : colors_1.WHITE_ALPHA_80;
476
- const mainSegmentBackground = (0, colors_1.getBackgroundFromHoverState)({
477
- hovered: mainHovered,
478
- selected: false,
479
- });
480
- const dropdownSegmentBackground = (0, colors_1.getBackgroundFromHoverState)({
481
- hovered,
482
- selected: dropdownOpened,
483
- });
484
- if (!video) {
341
+ const segments = (0, react_1.useMemo)(() => {
342
+ return [
343
+ {
344
+ ariaLabel: renderLabel,
345
+ buttonId: 'render-modal-button',
346
+ disabled: false,
347
+ idleColor: colors_1.WHITE_ALPHA_80,
348
+ onClick,
349
+ onPointerDown: null,
350
+ renderContent: (color) => (jsx_runtime_1.jsxs(layout_1.Row, { align: "center", style: controlSize === 'compact'
351
+ ? compactMainButtonContent
352
+ : mainButtonContent, children: [
353
+ jsx_runtime_1.jsx(render_1.ThinRenderIcon, { fill: color, svgProps: iconStyle }), showRenderLabel ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
354
+ jsx_runtime_1.jsx(layout_1.Spacing, { x: controlSize === 'compact' ? 0.75 : 1 }), jsx_runtime_1.jsx("span", { style: controlSize === 'compact' ? compactLabel : label, children: renderLabel })
355
+ ] })) : null] })),
356
+ segmentId: 'render',
357
+ style: controlSize === 'compact'
358
+ ? compactMainSegmentStyle
359
+ : defaultMainSegmentStyle,
360
+ title: tooltip,
361
+ type: 'action',
362
+ },
363
+ {
364
+ ariaLabel: 'Select render type',
365
+ buttonId: null,
366
+ disabled: false,
367
+ idleColor: colors_1.WHITE_ALPHA_80,
368
+ leaveLeftSpace: false,
369
+ onOpenChange: null,
370
+ renderContent: (color) => jsx_runtime_1.jsx(caret_1.CaretDown, { color: color }),
371
+ segmentId: 'render-type',
372
+ selectedId: renderType,
373
+ style: controlSize === 'compact'
374
+ ? compactDropdownSegmentStyle
375
+ : defaultDropdownSegmentStyle,
376
+ title: 'Select render type',
377
+ type: 'menu',
378
+ values: dropdownValues,
379
+ },
380
+ ];
381
+ }, [
382
+ controlSize,
383
+ dropdownValues,
384
+ iconStyle,
385
+ onClick,
386
+ renderLabel,
387
+ renderType,
388
+ showRenderLabel,
389
+ tooltip,
390
+ ]);
391
+ if (!video || (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) !== 'composition') {
485
392
  return null;
486
393
  }
487
394
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
488
- jsx_runtime_1.jsx("button", { style: { display: 'none' }, id: "render-modal-button-server", disabled: !canServerRender, onClick: () => openServerRenderModal(false), type: "button" }), ' ', jsx_runtime_1.jsx("button", { style: { display: 'none' }, id: "render-modal-button-client", onClick: openClientRenderModal, type: "button" }), jsx_runtime_1.jsx("button", { style: { display: 'none' }, id: "render-modal-button-command", onClick: () => openServerRenderModal(true), type: "button" }), jsx_runtime_1.jsxs("div", { ref: containerRef, style: containerStyle, title: tooltip, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), children: [
489
- jsx_runtime_1.jsx("button", { type: "button", "aria-label": renderLabel, style: {
490
- ...(controlSize === 'compact'
491
- ? compactMainButtonStyle
492
- : mainButtonStyle),
493
- backgroundColor: mainSegmentBackground,
494
- color: mainForegroundColor,
495
- }, onClick: onClick, id: "render-modal-button", children: jsx_runtime_1.jsxs(layout_1.Row, { align: "center", style: controlSize === 'compact'
496
- ? compactMainButtonContent
497
- : mainButtonContent, children: [
498
- jsx_runtime_1.jsx(render_1.ThinRenderIcon, { fill: mainForegroundColor, svgProps: iconStyle }), showRenderLabel ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
499
- jsx_runtime_1.jsx(layout_1.Spacing, { x: controlSize === 'compact' ? 0.75 : 1 }), jsx_runtime_1.jsx("span", { style: {
500
- ...(controlSize === 'compact' ? compactLabel : label),
501
- color: mainForegroundColor,
502
- }, children: renderLabel })
503
- ] })) : null] }) }), jsx_runtime_1.jsx("button", { ref: dropdownRef, type: "button", style: {
504
- ...(controlSize === 'compact'
505
- ? compactDropdownTriggerStyle
506
- : dropdownTriggerStyle),
507
- backgroundColor: dropdownSegmentBackground,
508
- color: dropdownForegroundColor,
509
- }, className: is_menu_item_1.MENU_INITIATOR_CLASSNAME, onPointerDown: onPointerDown, onClick: onClickDropdown, children: jsx_runtime_1.jsx(caret_1.CaretDown, { color: dropdownForegroundColor }) })
510
- ] }), portalStyle
511
- ? react_dom_1.default.createPortal(jsx_runtime_1.jsx("div", { style: styles_1.fullScreenOverlay, children: jsx_runtime_1.jsx("div", { style: styles_1.outerPortal, className: "css-reset", children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onOutsideClick: onHideDropdown, onEscape: onHideDropdown, children: jsx_runtime_1.jsx("div", { style: portalStyle, onPointerDown: onMenuPointerDown, children: jsx_runtime_1.jsx(MenuContent_1.MenuContent, { onNextMenu: () => { }, onPreviousMenu: () => { }, values: dropdownValues, onHide: onHideDropdown, leaveLeftSpace: false, preselectIndex: dropdownValues.findIndex((v) => v.id === renderType), topItemCanBeUnselected: false, fixedHeight: derivedMaxHeight }) }) }) }) }), (0, portals_1.getPortal)(currentZIndex))
512
- : null] }));
395
+ jsx_runtime_1.jsx("button", { style: { display: 'none' }, id: "render-modal-button-server", disabled: !canServerRender, onClick: () => openServerRenderModal(false), type: "button" }), ' ', jsx_runtime_1.jsx("button", { style: { display: 'none' }, id: "render-modal-button-client", onClick: openClientRenderModal, type: "button" }), jsx_runtime_1.jsx("button", { style: { display: 'none' }, id: "render-modal-button-command", onClick: () => openServerRenderModal(true), type: "button" }), jsx_runtime_1.jsx(SegmentedButton_1.SegmentedButton, { segments: segments, style: segmentedButtonStyle, title: tooltip })
396
+ ] }));
513
397
  };
514
398
  exports.RenderButton = react_1.default.memo(RenderButtonInner);
@@ -48,6 +48,7 @@ const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
48
48
  const SegmentedControl_1 = require("../SegmentedControl");
49
49
  const get_render_modal_warnings_1 = require("./get-render-modal-warnings");
50
50
  const RenderModalJSONPropsEditor_1 = require("./RenderModalJSONPropsEditor");
51
+ const infer_zod_schema_from_value_1 = require("./SchemaEditor/infer-zod-schema-from-value");
51
52
  const SchemaEditor_1 = require("./SchemaEditor/SchemaEditor");
52
53
  const SchemaErrorMessages_1 = require("./SchemaEditor/SchemaErrorMessages");
53
54
  const zod_schema_type_1 = require("./SchemaEditor/zod-schema-type");
@@ -196,19 +197,21 @@ const DataEditor = ({ unresolvedComposition, defaultProps, setDefaultProps, prop
196
197
  setDefaultProps((p) => p, { shouldSave: true });
197
198
  }, [setDefaultProps]);
198
199
  const z = (0, get_zod_if_possible_1.useZodIfPossible)();
200
+ const zodTypes = (0, get_zod_if_possible_1.useZodTypesIfPossible)();
199
201
  const schema = (0, react_1.useMemo)(() => {
200
- if (!z) {
201
- return 'no-zod';
202
- }
203
- if (!unresolvedComposition.schema) {
204
- return 'no-schema';
205
- }
206
- if (!(typeof unresolvedComposition.schema
207
- .safeParse === 'function')) {
208
- throw new Error('A value which is not a Zod schema was passed to `schema`');
209
- }
210
- return unresolvedComposition.schema;
211
- }, [unresolvedComposition.schema, z]);
202
+ var _a;
203
+ return (0, infer_zod_schema_from_value_1.resolveCompositionSchema)({
204
+ explicitSchema: unresolvedComposition.schema,
205
+ defaultProps: (_a = unresolvedComposition.defaultProps) !== null && _a !== void 0 ? _a : {},
206
+ z,
207
+ zodTypes,
208
+ });
209
+ }, [
210
+ unresolvedComposition.defaultProps,
211
+ unresolvedComposition.schema,
212
+ z,
213
+ zodTypes,
214
+ ]);
212
215
  const zodValidationResult = (0, react_1.useMemo)(() => {
213
216
  if (schema === 'no-zod') {
214
217
  return 'no-zod';
@@ -68,7 +68,6 @@ const RenderStatusModal = ({ jobId, }) => {
68
68
  setSelectedModal(null);
69
69
  if (isClientJob) {
70
70
  removeClientJob(job.id);
71
- (0, NotificationCenter_1.showNotification)('Removed render', 2000);
72
71
  }
73
72
  else {
74
73
  (0, actions_1.removeRenderJob)(job).catch((err) => {
@@ -36,7 +36,9 @@ const ZodSwitch = ({ schema, jsonPath, value, setValue, onRemove, mayPad }) => {
36
36
  description === zodTypes.ZodZypesInternals.REMOTION_COLOR_BRAND) {
37
37
  return (jsx_runtime_1.jsx(ZodColorEditor_1.ZodColorEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema, onRemove: onRemove, mayPad: mayPad }));
38
38
  }
39
- if (value.startsWith(window.remotion_staticBase)) {
39
+ if ((window.remotion_staticBase !== '' &&
40
+ value.startsWith(window.remotion_staticBase)) ||
41
+ window.remotion_staticFiles.some((file) => file.src === value)) {
40
42
  return (jsx_runtime_1.jsx(ZodStaticFileEditor_1.ZodStaticFileEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: schema, onRemove: onRemove, mayPad: mayPad }));
41
43
  }
42
44
  if (zodTypes &&
@@ -0,0 +1,15 @@
1
+ import type { ZodType as ZodNamespace, ZodTypesType } from '../../get-zod-if-possible';
2
+ import type { AnyZodSchema } from './zod-schema-type';
3
+ export declare function inferZodSchemaFromValue({ value, z, zodTypes, path }: {
4
+ readonly value: unknown;
5
+ readonly z: ZodNamespace;
6
+ readonly zodTypes: ZodTypesType | null;
7
+ readonly path: readonly string[];
8
+ }): AnyZodSchema;
9
+ export type ResolvedCompositionSchema = AnyZodSchema | 'no-schema' | 'no-zod';
10
+ export declare function resolveCompositionSchema({ explicitSchema, defaultProps, z, zodTypes }: {
11
+ readonly explicitSchema: unknown;
12
+ readonly defaultProps: Record<string, unknown>;
13
+ readonly z: ZodNamespace | null;
14
+ readonly zodTypes: ZodTypesType | null;
15
+ }): ResolvedCompositionSchema;
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.inferZodSchemaFromValue = inferZodSchemaFromValue;
4
+ exports.resolveCompositionSchema = resolveCompositionSchema;
5
+ const zod_schema_type_1 = require("./zod-schema-type");
6
+ const hasUnambiguousColorSyntax = (value) => {
7
+ return /^(?:#|(?:rgb|hsl|hwb|lab|lch|oklab|oklch|color)\()/i.test(value.trim());
8
+ };
9
+ const isPlainObject = (value) => {
10
+ if (value === null || typeof value !== 'object') {
11
+ return false;
12
+ }
13
+ const prototype = Object.getPrototypeOf(value);
14
+ return prototype === Object.prototype || prototype === null;
15
+ };
16
+ function inferZodSchemaFromValue({ value, z, zodTypes, path, }) {
17
+ var _a;
18
+ if (typeof value === 'string') {
19
+ const key = (_a = path.at(-1)) === null || _a === void 0 ? void 0 : _a.toLowerCase();
20
+ if (key === 'type') {
21
+ return z.literal(value);
22
+ }
23
+ const keySuggestsColor = key === null || key === void 0 ? void 0 : key.includes('color');
24
+ if (zodTypes && (keySuggestsColor || hasUnambiguousColorSyntax(value))) {
25
+ try {
26
+ zodTypes.ZodZypesInternals.parseColor(value);
27
+ return zodTypes.zColor();
28
+ }
29
+ catch (_b) { }
30
+ }
31
+ return z.string();
32
+ }
33
+ if (typeof value === 'number') {
34
+ return z.number();
35
+ }
36
+ if (typeof value === 'boolean') {
37
+ return z.boolean();
38
+ }
39
+ if (value === null) {
40
+ return z.null();
41
+ }
42
+ if (typeof value === 'undefined') {
43
+ return z.undefined();
44
+ }
45
+ if (value instanceof Date) {
46
+ return z.date();
47
+ }
48
+ if (Array.isArray(value)) {
49
+ if (value.length === 0) {
50
+ return z.any();
51
+ }
52
+ const elementSchema = inferZodSchemaFromValue({
53
+ value: value[0],
54
+ z,
55
+ zodTypes,
56
+ path,
57
+ });
58
+ if (!value.every((item) => (0, zod_schema_type_1.zodSafeParse)(elementSchema, item).success)) {
59
+ return z.any();
60
+ }
61
+ return z.array(elementSchema);
62
+ }
63
+ if (isPlainObject(value)) {
64
+ return z.object(Object.fromEntries(Object.entries(value).map(([key, child]) => [
65
+ key,
66
+ inferZodSchemaFromValue({
67
+ value: child,
68
+ z,
69
+ zodTypes,
70
+ path: [...path, key],
71
+ }),
72
+ ])));
73
+ }
74
+ return z.any();
75
+ }
76
+ function resolveCompositionSchema({ explicitSchema, defaultProps, z, zodTypes, }) {
77
+ if (!z) {
78
+ return 'no-zod';
79
+ }
80
+ if (explicitSchema) {
81
+ if (typeof explicitSchema.safeParse !== 'function') {
82
+ throw new Error('A value which is not a Zod schema was passed to `schema`');
83
+ }
84
+ return explicitSchema;
85
+ }
86
+ if (Object.keys(defaultProps).length === 0) {
87
+ return 'no-schema';
88
+ }
89
+ return inferZodSchemaFromValue({
90
+ value: defaultProps,
91
+ z,
92
+ zodTypes,
93
+ path: [],
94
+ });
95
+ }
@@ -26,14 +26,9 @@ const RenderQueueRemoveItem = ({ job }) => {
26
26
  }
27
27
  removeClientJob(job.id);
28
28
  (0, save_render_output_1.unregisterClientRender)(job.id).catch(() => { });
29
- (0, NotificationCenter_1.showNotification)('Removed job', 2000);
30
29
  return;
31
30
  }
32
- (0, actions_1.removeRenderJob)(job)
33
- .then(() => {
34
- (0, NotificationCenter_1.showNotification)('Removed job', 2000);
35
- })
36
- .catch((err) => {
31
+ (0, actions_1.removeRenderJob)(job).catch((err) => {
37
32
  (0, NotificationCenter_1.showNotification)(`Could not remove item: ${err.message}`, 2000);
38
33
  });
39
34
  }, [job, isClientJob, removeClientJob, canvasContent, setCanvasContent]);
@@ -16,7 +16,6 @@ const CrfSetting_1 = require("./RenderModal/CrfSetting");
16
16
  const human_readable_codec_1 = require("./RenderModal/human-readable-codec");
17
17
  const layout_2 = require("./RenderModal/layout");
18
18
  const NumberSetting_1 = require("./RenderModal/NumberSetting");
19
- const RenderModalHr_1 = require("./RenderModal/RenderModalHr");
20
19
  const SegmentedControl_1 = require("./SegmentedControl");
21
20
  const SettingsContext_1 = require("./SettingsContext");
22
21
  const use_auto_save_config_1 = require("./use-auto-save-config");
@@ -31,6 +30,10 @@ const dividerLabel = {
31
30
  margin: 0,
32
31
  padding: '4px 16px',
33
32
  };
33
+ const sectionTitle = {
34
+ ...dividerLabel,
35
+ marginTop: 8,
36
+ };
34
37
  const fullWidth = {
35
38
  boxSizing: 'border-box',
36
39
  width: 180,
@@ -333,7 +336,7 @@ const RenderingSettings = () => {
333
336
  jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Still image format" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: stillFormatValues, selectedId: stillImageFormat !== null && stillImageFormat !== void 0 ? stillImageFormat : REMOTION_DEFAULT, title: "Still image format" }) })
334
337
  ] }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
335
338
  jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Video frame format" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: videoFormatValues, selectedId: videoImageFormat !== null && videoImageFormat !== void 0 ? videoImageFormat : REMOTION_DEFAULT, title: "Video frame format" }) })
336
- ] }), jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), jsx_runtime_1.jsx("p", { style: dividerLabel, children: "Encoding" }), client_1.BrowserSafeApis.codecSupportsCrf(resolvedCodec) &&
339
+ ] }), jsx_runtime_1.jsx("p", { style: sectionTitle, children: "Encoding" }), client_1.BrowserSafeApis.codecSupportsCrf(resolvedCodec) &&
337
340
  client_1.BrowserSafeApis.codecSupportsVideoBitrate(resolvedCodec) ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
338
341
  jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Quality control" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(SegmentedControl_1.SegmentedControl, { items: qualityModeValues, needsWrapping: true }) })
339
342
  ] })) : null, qualityMode === 'crf' &&
@@ -345,9 +348,9 @@ const RenderingSettings = () => {
345
348
  jsx_runtime_1.jsx("div", { style: layout_2.label, children: "ProRes profile" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: profileValues, selectedId: proResProfile !== null && proResProfile !== void 0 ? proResProfile : REMOTION_DEFAULT, title: "ProRes profile" }) })
346
349
  ] })) : null, resolvedCodec === 'h264' ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
347
350
  jsx_runtime_1.jsx("div", { style: layout_2.label, children: "x264 preset" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: presetValues, selectedId: x264Preset !== null && x264Preset !== void 0 ? x264Preset : REMOTION_DEFAULT, title: "x264 preset" }) })
348
- ] })) : null, jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), jsx_runtime_1.jsx("p", { style: dividerLabel, children: "Audio" }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
351
+ ] })) : null, jsx_runtime_1.jsx("p", { style: sectionTitle, children: "Audio" }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
349
352
  jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Audio codec" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: audioCodecValues, selectedId: audioCodec !== null && audioCodec !== void 0 ? audioCodec : REMOTION_DEFAULT, title: "Audio codec" }) })
350
- ] }), jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), jsx_runtime_1.jsx("p", { style: dividerLabel, children: "Performance" }), jsx_runtime_1.jsx(NumberSetting_1.NumberSetting, { name: "Concurrency", value: concurrency, onValueChanged: changeConcurrency, min: renderDefaults.minConcurrency, max: renderDefaults.maxConcurrency, step: 1 }), (error !== null && error !== void 0 ? error : settingsError) ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
353
+ ] }), jsx_runtime_1.jsx("p", { style: sectionTitle, children: "Performance" }), jsx_runtime_1.jsx(NumberSetting_1.NumberSetting, { name: "Concurrency", value: concurrency, onValueChanged: changeConcurrency, min: renderDefaults.minConcurrency, max: renderDefaults.maxConcurrency, step: 1 }), (error !== null && error !== void 0 ? error : settingsError) ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
351
354
  jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx("div", { style: { paddingLeft: 16, paddingRight: 16 }, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: (_a = error !== null && error !== void 0 ? error : settingsError) !== null && _a !== void 0 ? _a : '', align: "flex-start", type: "error" }) })
352
355
  ] })) : null, jsx_runtime_1.jsx(layout_1.Spacing, { y: 2, block: true })
353
356
  ] }));
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const RulersAndGuidesToggle: React.FC<{
3
+ readonly showGuides: boolean;
4
+ }>;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RulersAndGuidesToggle = 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 editor_guides_1 = require("../state/editor-guides");
8
+ const editor_rulers_1 = require("../state/editor-rulers");
9
+ const ControlButton_1 = require("./ControlButton");
10
+ const RulersAndGuidesToggle = ({ showGuides }) => {
11
+ const { editorShowGuides, setEditorShowGuides } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
12
+ const { editorShowRulers, setEditorShowRulers } = (0, react_1.useContext)(editor_rulers_1.EditorShowRulersContext);
13
+ const rulersOrGuidesAreVisible = editorShowRulers || (showGuides && editorShowGuides);
14
+ const onClick = (0, react_1.useCallback)(() => {
15
+ setEditorShowRulers(() => !rulersOrGuidesAreVisible);
16
+ if (showGuides) {
17
+ setEditorShowGuides(() => !rulersOrGuidesAreVisible);
18
+ }
19
+ }, [
20
+ rulersOrGuidesAreVisible,
21
+ setEditorShowGuides,
22
+ setEditorShowRulers,
23
+ showGuides,
24
+ ]);
25
+ const accessibilityLabel = showGuides
26
+ ? rulersOrGuidesAreVisible
27
+ ? 'Hide rulers and guides'
28
+ : 'Show rulers and guides'
29
+ : editorShowRulers
30
+ ? 'Hide rulers'
31
+ : 'Show rulers';
32
+ return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, "aria-pressed": rulersOrGuidesAreVisible, onClick: onClick, children: (color) => (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 576 512", style: { width: 18, height: 18 }, "aria-hidden": "true", focusable: "false", children: jsx_runtime_1.jsx("path", { fill: rulersOrGuidesAreVisible ? colors_1.BLUE : color, d: "M525.9 154.2L186.5 493.6c-6.2 6.2-16.4 6.2-22.6 0L50.7 380.5c-6.2-6.2-6.2-16.4 0-22.6l33.9-33.9 56.6 56.6c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-56.6-56.6 39.6-39.6 33.9 33.9c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-33.9-33.9 39.6-39.6 56.6 56.6c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-56.6-56.6 39.6-39.6 33.9 33.9c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-33.9-33.9 39.6-39.6 56.6 56.6c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-56.6-56.6 33.9-33.9c6.2-6.2 16.4-6.2 22.6 0L525.9 131.5c6.2 6.2 6.2 16.4 0 22.6zM73.3 289.9L28.1 335.2c-18.7 18.7-18.7 49.1 0 67.9L141.2 516.2c18.7 18.7 49.1 18.7 67.9 0L548.5 176.8c18.7-18.7 18.7-49.1 0-67.9L435.4-4.2C416.6-23 386.2-23 367.5-4.2 77.1 286.2 140.3 223 73.3 289.9z" }) })) }));
33
+ };
34
+ exports.RulersAndGuidesToggle = RulersAndGuidesToggle;
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import type { ComboboxValue } from './NewComposition/ComboBox';
3
+ type SegmentedButtonSegmentCommon = {
4
+ readonly ariaLabel: string;
5
+ readonly buttonId: string | null;
6
+ readonly disabled: boolean;
7
+ readonly idleColor: string;
8
+ readonly renderContent: (color: string) => React.ReactNode;
9
+ readonly segmentId: string;
10
+ readonly style: React.CSSProperties | null;
11
+ readonly title: string | null;
12
+ };
13
+ export type SegmentedButtonSegment = SegmentedButtonSegmentCommon & ({
14
+ readonly onClick: React.MouseEventHandler<HTMLButtonElement>;
15
+ readonly onPointerDown: React.PointerEventHandler<HTMLButtonElement> | null;
16
+ readonly type: 'action';
17
+ } | {
18
+ readonly leaveLeftSpace: boolean;
19
+ readonly onOpenChange: ((open: boolean) => void) | null;
20
+ readonly selectedId: string | number | null;
21
+ readonly type: 'menu';
22
+ readonly values: ComboboxValue[];
23
+ });
24
+ export declare const SegmentedButton: React.FC<{
25
+ readonly segments: SegmentedButtonSegment[];
26
+ readonly style: React.CSSProperties | null;
27
+ readonly title: string | null;
28
+ }>;
29
+ export {};