@remotion/studio 4.0.515 → 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 (196) hide show
  1. package/dist/api/restart-studio.js +4 -0
  2. package/dist/components/AssetSelector.js +3 -9
  3. package/dist/components/AssetSelectorItem.d.ts +2 -1
  4. package/dist/components/AssetSelectorItem.js +24 -29
  5. package/dist/components/Canvas.js +7 -4
  6. package/dist/components/CaptionInspector.d.ts +2 -0
  7. package/dist/components/CaptionInspector.js +3 -5
  8. package/dist/components/CompositionSelector.js +6 -3
  9. package/dist/components/CompositionSelectorItem.js +9 -10
  10. package/dist/components/ConfigSelect.d.ts +17 -0
  11. package/dist/components/ConfigSelect.js +50 -0
  12. package/dist/components/CurrentAsset.d.ts +10 -2
  13. package/dist/components/CurrentAsset.js +139 -46
  14. package/dist/components/FixComputedValueModal.js +54 -51
  15. package/dist/components/GlobalKeybindings.js +5 -5
  16. package/dist/components/InlineAction.d.ts +1 -1
  17. package/dist/components/InlineAction.js +12 -2
  18. package/dist/components/InlineCaptionInspector.d.ts +2 -0
  19. package/dist/components/InlineCaptionInspector.js +2 -2
  20. package/dist/components/InlineCompositionName.js +1 -1
  21. package/dist/components/InlineEditableTitle.js +3 -2
  22. package/dist/components/InspectorInfoHeader.js +1 -1
  23. package/dist/components/InspectorOpenInEditor.js +48 -72
  24. package/dist/components/InspectorPanel/AlignmentControls.js +2 -3
  25. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.d.ts +7 -0
  26. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +39 -0
  27. package/dist/components/InspectorPanel/CompositionInspector.js +14 -7
  28. package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +10 -4
  29. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +2 -1
  30. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -4
  31. package/dist/components/InspectorPanel/common.d.ts +0 -12
  32. package/dist/components/InspectorPanel/common.js +3 -52
  33. package/dist/components/InspectorPanel/use-composition-actions.js +0 -1
  34. package/dist/components/InspectorPanelLayout.d.ts +1 -1
  35. package/dist/components/InspectorPanelLayout.js +1 -1
  36. package/dist/components/InspectorSequenceSection.js +40 -54
  37. package/dist/components/InstallPackage.d.ts +2 -1
  38. package/dist/components/InstallPackage.js +60 -30
  39. package/dist/components/InstallablePackage.js +37 -11
  40. package/dist/components/KeyboardShortcutsSettings.d.ts +2 -0
  41. package/dist/components/KeyboardShortcutsSettings.js +177 -0
  42. package/dist/components/MenuBuildIndicator.js +1 -1
  43. package/dist/components/Modals.js +6 -5
  44. package/dist/components/NewComposition/CodemodFooter.d.ts +0 -1
  45. package/dist/components/NewComposition/CodemodFooter.js +2 -8
  46. package/dist/components/NewComposition/DeleteComposition.js +1 -1
  47. package/dist/components/NewComposition/DeleteFolder.js +1 -1
  48. package/dist/components/NewComposition/DuplicateComposition.js +1 -1
  49. package/dist/components/NewComposition/InputDragger.js +27 -4
  50. package/dist/components/NewComposition/NewComposition.js +1 -1
  51. package/dist/components/NewComposition/NewFolder.js +1 -3
  52. package/dist/components/NewComposition/RenameComposition.js +1 -1
  53. package/dist/components/NewComposition/RenameFolder.js +1 -1
  54. package/dist/components/NewComposition/use-rename-static-file.js +1 -1
  55. package/dist/components/Notifications/NotificationCenter.d.ts +1 -0
  56. package/dist/components/Notifications/NotificationCenter.js +5 -0
  57. package/dist/components/OptionsPanel.js +9 -12
  58. package/dist/components/PreviewToolbar.js +5 -2
  59. package/dist/components/PreviewToolbarOverflowButton.js +30 -0
  60. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +2 -2
  61. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +14 -30
  62. package/dist/components/RenderButton.js +66 -183
  63. package/dist/components/RenderModal/DataEditor.js +15 -12
  64. package/dist/components/RenderModal/RenderStatusModal.js +0 -1
  65. package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +3 -1
  66. package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.d.ts +15 -0
  67. package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.js +95 -0
  68. package/dist/components/RenderQueue/RenderQueueRemoveItem.js +1 -6
  69. package/dist/components/RenderingSettings.js +7 -4
  70. package/dist/components/RulersAndGuidesToggle.d.ts +2 -0
  71. package/dist/components/RulersAndGuidesToggle.js +23 -0
  72. package/dist/components/SegmentedButton.d.ts +29 -0
  73. package/dist/components/SegmentedButton.js +226 -0
  74. package/dist/components/SelectedOutlineEditingHandles.d.ts +16 -0
  75. package/dist/components/SelectedOutlineEditingHandles.js +66 -0
  76. package/dist/components/SelectedOutlineElement.d.ts +2 -4
  77. package/dist/components/SelectedOutlineElement.js +15 -54
  78. package/dist/components/SelectedOutlineOverlay.js +32 -6
  79. package/dist/components/SelectedOutlinePolygon.d.ts +3 -4
  80. package/dist/components/SelectedOutlinePolygon.js +18 -16
  81. package/dist/components/SelectedOutlineRenderer.js +66 -14
  82. package/dist/components/SettingsModal.d.ts +1 -1
  83. package/dist/components/SettingsModal.js +30 -7
  84. package/dist/components/SettingsModalFooter.js +2 -1
  85. package/dist/components/SkillsSettings.d.ts +2 -0
  86. package/dist/components/SkillsSettings.js +129 -0
  87. package/dist/components/StaticFilePreview.js +7 -1
  88. package/dist/components/StudioSettings.js +7 -48
  89. package/dist/components/Tabs/index.js +1 -1
  90. package/dist/components/Timeline/Timeline.js +0 -1
  91. package/dist/components/Timeline/TimelineAssetField.d.ts +1 -1
  92. package/dist/components/Timeline/TimelineAssetField.js +15 -9
  93. package/dist/components/Timeline/TimelineBooleanField.js +1 -4
  94. package/dist/components/Timeline/TimelineClipboardKeybindings.js +7 -10
  95. package/dist/components/Timeline/TimelineEffectItem.d.ts +1 -0
  96. package/dist/components/Timeline/TimelineEffectItem.js +23 -10
  97. package/dist/components/Timeline/TimelineEffectPropItem.js +15 -2
  98. package/dist/components/Timeline/TimelineExpandedRow.js +5 -4
  99. package/dist/components/Timeline/TimelineFieldLabel.js +4 -2
  100. package/dist/components/Timeline/TimelineFieldRowContent.d.ts +1 -2
  101. package/dist/components/Timeline/TimelineFieldRowContent.js +8 -21
  102. package/dist/components/Timeline/TimelineImageInfo.d.ts +0 -1
  103. package/dist/components/Timeline/TimelineImageInfo.js +13 -32
  104. package/dist/components/Timeline/TimelineKeyframeControls.js +10 -4
  105. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
  106. package/dist/components/Timeline/TimelineRotationField.js +0 -2
  107. package/dist/components/Timeline/TimelineRowChrome.d.ts +0 -1
  108. package/dist/components/Timeline/TimelineRowChrome.js +3 -4
  109. package/dist/components/Timeline/TimelineRowLayoutContext.d.ts +0 -1
  110. package/dist/components/Timeline/TimelineRowLayoutContext.js +1 -4
  111. package/dist/components/Timeline/TimelineScaleField.js +2 -6
  112. package/dist/components/Timeline/TimelineSchemaField.js +9 -3
  113. package/dist/components/Timeline/TimelineSelection.js +1 -1
  114. package/dist/components/Timeline/TimelineSequence.d.ts +2 -0
  115. package/dist/components/Timeline/TimelineSequence.js +110 -19
  116. package/dist/components/Timeline/TimelineSequenceItem.js +5 -5
  117. package/dist/components/Timeline/TimelineSequencePropItem.js +15 -2
  118. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +4 -2
  119. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +85 -91
  120. package/dist/components/Timeline/TimelineTrack.js +1 -1
  121. package/dist/components/Timeline/TimelineTransformOriginField.js +0 -4
  122. package/dist/components/Timeline/TimelineTranslateField.js +0 -4
  123. package/dist/components/Timeline/TimelineVirtualization.js +3 -1
  124. package/dist/components/Timeline/duplicate-selected-timeline-item.js +3 -12
  125. package/dist/components/Timeline/get-copy-context-for-agents-menu-item.d.ts +4 -0
  126. package/dist/components/Timeline/get-copy-context-for-agents-menu-item.js +26 -0
  127. package/dist/components/Timeline/get-sequence-context-menu-items.js +2 -19
  128. package/dist/components/Timeline/get-timeline-sequence-visible-layout.d.ts +6 -1
  129. package/dist/components/Timeline/get-timeline-sequence-visible-layout.js +11 -4
  130. package/dist/components/Timeline/split-selected-timeline-item.js +0 -1
  131. package/dist/components/Timeline/timeline-field-row-layout.d.ts +1 -1
  132. package/dist/components/Timeline/timeline-field-row-layout.js +4 -7
  133. package/dist/components/Timeline/timeline-field-utils.js +0 -2
  134. package/dist/components/Timeline/use-timeline-asset-drop.js +1 -0
  135. package/dist/components/TimelineCombobox.js +25 -160
  136. package/dist/components/TimelineInOutToggle.js +4 -1
  137. package/dist/components/duplicate-jsx-node-api.d.ts +2 -0
  138. package/dist/components/duplicate-jsx-node-api.js +12 -0
  139. package/dist/components/effect-drag-and-drop.js +1 -4
  140. package/dist/components/handle-drop.d.ts +2 -1
  141. package/dist/components/handle-drop.js +3 -3
  142. package/dist/components/import-assets.js +9 -65
  143. package/dist/components/keyboard-shortcuts.d.ts +10 -0
  144. package/dist/components/keyboard-shortcuts.js +135 -0
  145. package/dist/components/selected-outline-control-layout.js +2 -6
  146. package/dist/components/selected-outline-measurement.d.ts +1 -1
  147. package/dist/components/selected-outline-measurement.js +16 -3
  148. package/dist/components/use-delete-asset.d.ts +1 -0
  149. package/dist/components/use-delete-asset.js +40 -0
  150. package/dist/components/use-selected-outline-control-target.d.ts +11 -0
  151. package/dist/components/use-selected-outline-control-target.js +79 -0
  152. package/dist/esm/{chunk-s6k99gh2.js → chunk-4bxz1d3g.js} +3 -2
  153. package/dist/esm/{chunk-v5a8vpv4.js → chunk-w4244j4n.js} +17766 -17618
  154. package/dist/esm/index.mjs +3 -0
  155. package/dist/esm/internals.mjs +17765 -17617
  156. package/dist/esm/previewEntry.mjs +17570 -17422
  157. package/dist/esm/renderEntry.mjs +2 -2
  158. package/dist/helpers/add-asset-cache-bust.d.ts +4 -0
  159. package/dist/helpers/add-asset-cache-bust.js +10 -0
  160. package/dist/helpers/calculate-timeline.js +2 -1
  161. package/dist/helpers/colors.d.ts +2 -0
  162. package/dist/helpers/colors.js +6 -2
  163. package/dist/helpers/drag-aware-double-click.d.ts +6 -0
  164. package/dist/helpers/drag-aware-double-click.js +20 -0
  165. package/dist/helpers/get-asset-metadata.js +25 -16
  166. package/dist/helpers/get-sequence-double-click-action.d.ts +2 -1
  167. package/dist/helpers/get-sequence-double-click-action.js +7 -1
  168. package/dist/helpers/get-timeline-sequence-layout.d.ts +4 -1
  169. package/dist/helpers/get-timeline-sequence-layout.js +15 -6
  170. package/dist/helpers/get-timeline-sequence-sort-key.d.ts +2 -1
  171. package/dist/helpers/hoverable.d.ts +1 -0
  172. package/dist/helpers/hoverable.js +2 -1
  173. package/dist/helpers/inject-css.js +3 -1
  174. package/dist/helpers/open-in-remotion-convert.d.ts +7 -0
  175. package/dist/helpers/open-in-remotion-convert.js +18 -0
  176. package/dist/helpers/use-media-metadata.d.ts +2 -1
  177. package/dist/helpers/use-media-metadata.js +12 -5
  178. package/dist/helpers/use-menu-structure.js +32 -32
  179. package/dist/icons/align-center-horizontal.js +1 -1
  180. package/dist/icons/align-left.js +1 -1
  181. package/dist/icons/align-right.js +1 -1
  182. package/dist/icons/keyboard.d.ts +4 -0
  183. package/dist/icons/keyboard.js +10 -0
  184. package/dist/icons/license.d.ts +4 -0
  185. package/dist/icons/license.js +8 -0
  186. package/dist/icons/package.d.ts +4 -0
  187. package/dist/icons/package.js +8 -0
  188. package/dist/icons/react.js +1 -1
  189. package/dist/icons/remotion-convert.d.ts +4 -0
  190. package/dist/icons/remotion-convert.js +10 -0
  191. package/dist/icons/skills.d.ts +4 -0
  192. package/dist/icons/skills.js +10 -0
  193. package/dist/state/modals.d.ts +2 -5
  194. package/package.json +12 -12
  195. package/dist/components/KeyboardShortcutsExplainer.d.ts +0 -2
  196. 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;
@@ -343,9 +257,6 @@ const RenderButtonInner = ({ readOnlyStudio, size: controlSize = 'default', narr
343
257
  openClientRenderModal();
344
258
  }
345
259
  }, [renderType, openServerRenderModal, openClientRenderModal]);
346
- const onHideDropdown = (0, react_1.useCallback)(() => {
347
- setDropdownOpened(false);
348
- }, []);
349
260
  const handleRenderTypeChange = (0, react_1.useCallback)((newType) => {
350
261
  setPreferredRenderType(newType);
351
262
  try {
@@ -354,7 +265,6 @@ const RenderButtonInner = ({ readOnlyStudio, size: controlSize = 'default', narr
354
265
  catch (_a) {
355
266
  // localStorage might not be available
356
267
  }
357
- setDropdownOpened(false);
358
268
  if (newType === 'server-render') {
359
269
  openServerRenderModal(false);
360
270
  }
@@ -421,94 +331,67 @@ const RenderButtonInner = ({ readOnlyStudio, size: controlSize = 'default', narr
421
331
  },
422
332
  ];
423
333
  }, [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
334
  const renderLabel = renderType === 'server-render'
468
335
  ? 'Render'
469
336
  : renderType === 'render-command'
470
337
  ? 'Render via CLI'
471
338
  : 'Render on web';
472
339
  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
- });
340
+ const segments = (0, react_1.useMemo)(() => {
341
+ return [
342
+ {
343
+ ariaLabel: renderLabel,
344
+ buttonId: 'render-modal-button',
345
+ disabled: false,
346
+ idleColor: colors_1.WHITE_ALPHA_80,
347
+ onClick,
348
+ onPointerDown: null,
349
+ renderContent: (color) => (jsx_runtime_1.jsxs(layout_1.Row, { align: "center", style: controlSize === 'compact'
350
+ ? compactMainButtonContent
351
+ : mainButtonContent, children: [
352
+ jsx_runtime_1.jsx(render_1.ThinRenderIcon, { fill: color, svgProps: iconStyle }), showRenderLabel ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
353
+ 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 })
354
+ ] })) : null] })),
355
+ segmentId: 'render',
356
+ style: controlSize === 'compact'
357
+ ? compactMainSegmentStyle
358
+ : defaultMainSegmentStyle,
359
+ title: tooltip,
360
+ type: 'action',
361
+ },
362
+ {
363
+ ariaLabel: 'Select render type',
364
+ buttonId: null,
365
+ disabled: false,
366
+ idleColor: colors_1.WHITE_ALPHA_80,
367
+ leaveLeftSpace: false,
368
+ onOpenChange: null,
369
+ renderContent: (color) => jsx_runtime_1.jsx(caret_1.CaretDown, { color: color }),
370
+ segmentId: 'render-type',
371
+ selectedId: renderType,
372
+ style: controlSize === 'compact'
373
+ ? compactDropdownSegmentStyle
374
+ : defaultDropdownSegmentStyle,
375
+ title: 'Select render type',
376
+ type: 'menu',
377
+ values: dropdownValues,
378
+ },
379
+ ];
380
+ }, [
381
+ controlSize,
382
+ dropdownValues,
383
+ iconStyle,
384
+ onClick,
385
+ renderLabel,
386
+ renderType,
387
+ showRenderLabel,
388
+ tooltip,
389
+ ]);
484
390
  if (!video) {
485
391
  return null;
486
392
  }
487
393
  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] }));
394
+ 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 })
395
+ ] }));
513
396
  };
514
397
  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,2 @@
1
+ import React from 'react';
2
+ export declare const RulersAndGuidesToggle: React.FC;
@@ -0,0 +1,23 @@
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 = () => {
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 || editorShowGuides;
14
+ const onClick = (0, react_1.useCallback)(() => {
15
+ setEditorShowRulers(() => !rulersOrGuidesAreVisible);
16
+ setEditorShowGuides(() => !rulersOrGuidesAreVisible);
17
+ }, [rulersOrGuidesAreVisible, setEditorShowGuides, setEditorShowRulers]);
18
+ const accessibilityLabel = rulersOrGuidesAreVisible
19
+ ? 'Hide rulers and guides'
20
+ : 'Show rulers and guides';
21
+ 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" }) })) }));
22
+ };
23
+ 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 {};