@remotion/studio 4.0.471 → 4.0.473

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 (192) hide show
  1. package/dist/api/rename-static-file.d.ts +6 -0
  2. package/dist/api/rename-static-file.js +18 -0
  3. package/dist/components/AssetSelector.js +55 -5
  4. package/dist/components/AssetSelectorItem.js +153 -27
  5. package/dist/components/Canvas.js +147 -0
  6. package/dist/components/CompositionSelectorItem.d.ts +1 -0
  7. package/dist/components/CompositionSelectorItem.js +12 -4
  8. package/dist/components/ConfirmationDialog-types.d.ts +8 -0
  9. package/dist/components/ConfirmationDialog-types.js +2 -0
  10. package/dist/components/ConfirmationDialog.d.ts +7 -0
  11. package/dist/components/ConfirmationDialog.js +103 -0
  12. package/dist/components/ContextMenu.d.ts +9 -1
  13. package/dist/components/ContextMenu.js +99 -47
  14. package/dist/components/CurrentAsset.d.ts +1 -0
  15. package/dist/components/CurrentAsset.js +13 -2
  16. package/dist/components/Editor.js +14 -6
  17. package/dist/components/EditorContent.js +15 -2
  18. package/dist/components/EditorContexts.js +2 -1
  19. package/dist/components/EditorRuler/Ruler.js +2 -0
  20. package/dist/components/ExplorerPanel.d.ts +0 -4
  21. package/dist/components/ExplorerPanel.js +8 -4
  22. package/dist/components/ExplorerPanelRef.d.ts +4 -0
  23. package/dist/components/ExplorerPanelRef.js +5 -0
  24. package/dist/components/FilePreview.d.ts +1 -1
  25. package/dist/components/InitialCompositionLoader.d.ts +0 -1
  26. package/dist/components/InitialCompositionLoader.js +5 -27
  27. package/dist/components/Menu/MenuItem.js +7 -1
  28. package/dist/components/Menu/SubMenu.js +5 -1
  29. package/dist/components/Menu/portals.js +17 -8
  30. package/dist/components/MenuToolbar.js +5 -1
  31. package/dist/components/ModalContainer.js +6 -1
  32. package/dist/components/Modals.js +8 -2
  33. package/dist/components/NewComposition/CodemodFooter.js +2 -2
  34. package/dist/components/NewComposition/ComboBox.js +8 -2
  35. package/dist/components/NewComposition/DeleteFolder.d.ts +6 -0
  36. package/dist/components/NewComposition/DeleteFolder.js +39 -0
  37. package/dist/components/NewComposition/DeleteStaticFile.d.ts +4 -0
  38. package/dist/components/NewComposition/DeleteStaticFile.js +44 -0
  39. package/dist/components/NewComposition/RenameFolder.d.ts +6 -0
  40. package/dist/components/NewComposition/RenameFolder.js +60 -0
  41. package/dist/components/NewComposition/RenameStaticFile.d.ts +4 -0
  42. package/dist/components/NewComposition/RenameStaticFile.js +118 -0
  43. package/dist/components/OptionsPanel.js +5 -1
  44. package/dist/components/OutlineToggle.d.ts +2 -0
  45. package/dist/components/OutlineToggle.js +20 -0
  46. package/dist/components/Preview.d.ts +0 -2
  47. package/dist/components/Preview.js +23 -33
  48. package/dist/components/PreviewToolbar.js +19 -6
  49. package/dist/components/RenderButton.js +8 -2
  50. package/dist/components/RenderPreview.js +2 -2
  51. package/dist/components/SelectedOutlineOverlay.d.ts +105 -4
  52. package/dist/components/SelectedOutlineOverlay.js +578 -59
  53. package/dist/components/ShowOutlinesProvider.d.ts +4 -0
  54. package/dist/components/ShowOutlinesProvider.js +24 -0
  55. package/dist/components/SizeSelector.js +3 -3
  56. package/dist/components/Splitter/SplitterContainer.js +9 -0
  57. package/dist/components/Splitter/SplitterHandle.js +65 -70
  58. package/dist/components/StaticFilePreview.js +2 -2
  59. package/dist/components/Timeline/KeyframeSettingsModal.d.ts +15 -0
  60. package/dist/components/Timeline/KeyframeSettingsModal.js +150 -0
  61. package/dist/components/Timeline/Timeline.js +50 -15
  62. package/dist/components/Timeline/TimelineArrayField.d.ts +9 -0
  63. package/dist/components/Timeline/TimelineArrayField.js +210 -0
  64. package/dist/components/Timeline/TimelineBooleanField.d.ts +2 -2
  65. package/dist/components/Timeline/TimelineBooleanField.js +2 -2
  66. package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +43 -0
  67. package/dist/components/Timeline/TimelineClipboardKeybindings.js +479 -0
  68. package/dist/components/Timeline/TimelineColorField.d.ts +2 -2
  69. package/dist/components/Timeline/TimelineColorField.js +2 -8
  70. package/dist/components/Timeline/TimelineDeleteKeybindings.js +12 -2
  71. package/dist/components/Timeline/TimelineEffectItem.js +3 -2
  72. package/dist/components/Timeline/TimelineEffectPropItem.js +146 -26
  73. package/dist/components/Timeline/TimelineEnumField.d.ts +2 -2
  74. package/dist/components/Timeline/TimelineEnumField.js +3 -3
  75. package/dist/components/Timeline/TimelineKeyframeControls.d.ts +4 -3
  76. package/dist/components/Timeline/TimelineKeyframeControls.js +41 -37
  77. package/dist/components/Timeline/TimelineKeyframeDiamond.js +24 -21
  78. package/dist/components/Timeline/TimelineKeyframeDiamondIcon.d.ts +6 -0
  79. package/dist/components/Timeline/TimelineKeyframeDiamondIcon.js +14 -0
  80. package/dist/components/Timeline/TimelineKeyframeDragState.d.ts +17 -0
  81. package/dist/components/Timeline/TimelineKeyframeDragState.js +39 -0
  82. package/dist/components/Timeline/TimelineKeyframedValue.d.ts +7 -2
  83. package/dist/components/Timeline/TimelineKeyframedValue.js +22 -8
  84. package/dist/components/Timeline/TimelineLayerEye.d.ts +1 -0
  85. package/dist/components/Timeline/TimelineLayerEye.js +8 -3
  86. package/dist/components/Timeline/TimelineList.js +2 -2
  87. package/dist/components/Timeline/TimelineMediaInfo.d.ts +0 -13
  88. package/dist/components/Timeline/TimelineMediaInfo.js +8 -73
  89. package/dist/components/Timeline/TimelineNumberField.d.ts +2 -2
  90. package/dist/components/Timeline/TimelineNumberField.js +7 -11
  91. package/dist/components/Timeline/TimelinePrimitiveFieldValue.d.ts +17 -0
  92. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +53 -0
  93. package/dist/components/Timeline/TimelineRotationField.d.ts +2 -2
  94. package/dist/components/Timeline/TimelineRotationField.js +41 -24
  95. package/dist/components/Timeline/TimelineRowChrome.js +8 -7
  96. package/dist/components/Timeline/TimelineScaleField.d.ts +20 -0
  97. package/dist/components/Timeline/TimelineScaleField.js +314 -0
  98. package/dist/components/Timeline/TimelineSchemaField.d.ts +3 -2
  99. package/dist/components/Timeline/TimelineSchemaField.js +8 -42
  100. package/dist/components/Timeline/TimelineSelection.js +3 -2
  101. package/dist/components/Timeline/TimelineSequence.d.ts +1 -0
  102. package/dist/components/Timeline/TimelineSequence.js +51 -10
  103. package/dist/components/Timeline/TimelineSequenceFrame.js +1 -0
  104. package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
  105. package/dist/components/Timeline/TimelineSequenceItem.js +282 -28
  106. package/dist/components/Timeline/TimelineSequencePropItem.js +161 -35
  107. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +58 -0
  108. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +525 -0
  109. package/dist/components/Timeline/TimelineTrack.js +1 -1
  110. package/dist/components/Timeline/TimelineTranslateField.d.ts +2 -2
  111. package/dist/components/Timeline/TimelineTranslateField.js +21 -25
  112. package/dist/components/Timeline/TimelineUvCoordinateField.d.ts +2 -2
  113. package/dist/components/Timeline/TimelineUvCoordinateField.js +20 -26
  114. package/dist/components/Timeline/apply-effect-response-to-code-values.d.ts +5 -0
  115. package/dist/components/Timeline/apply-effect-response-to-code-values.js +19 -0
  116. package/dist/components/Timeline/call-add-keyframe.js +4 -0
  117. package/dist/components/Timeline/call-move-keyframe.d.ts +19 -0
  118. package/dist/components/Timeline/call-move-keyframe.js +71 -0
  119. package/dist/components/Timeline/call-update-keyframe-settings.d.ts +22 -0
  120. package/dist/components/Timeline/call-update-keyframe-settings.js +52 -0
  121. package/dist/components/Timeline/delete-selected-timeline-item.d.ts +7 -4
  122. package/dist/components/Timeline/delete-selected-timeline-item.js +33 -21
  123. package/dist/components/Timeline/duplicate-selected-timeline-item.d.ts +4 -2
  124. package/dist/components/Timeline/duplicate-selected-timeline-item.js +39 -34
  125. package/dist/components/Timeline/get-bounded-keyframe-drag-delta.d.ts +8 -0
  126. package/dist/components/Timeline/get-bounded-keyframe-drag-delta.js +12 -0
  127. package/dist/components/Timeline/get-keyframe-navigation.d.ts +2 -2
  128. package/dist/components/Timeline/get-keyframe-navigation.js +14 -6
  129. package/dist/components/Timeline/get-node-keyframes.d.ts +5 -2
  130. package/dist/components/Timeline/get-node-keyframes.js +38 -5
  131. package/dist/components/Timeline/get-timeline-keyframes.js +4 -4
  132. package/dist/components/Timeline/reset-selected-timeline-props.js +22 -8
  133. package/dist/components/Timeline/save-effect-prop.d.ts +14 -3
  134. package/dist/components/Timeline/save-effect-prop.js +36 -18
  135. package/dist/components/Timeline/save-prop-queue.d.ts +2 -1
  136. package/dist/components/Timeline/save-prop-queue.js +5 -2
  137. package/dist/components/Timeline/save-sequence-prop.d.ts +2 -7
  138. package/dist/components/Timeline/save-sequence-prop.js +33 -30
  139. package/dist/components/Timeline/should-clear-selection-on-pointer-down.d.ts +3 -0
  140. package/dist/components/Timeline/should-clear-selection-on-pointer-down.js +7 -0
  141. package/dist/components/Timeline/timeline-asset-link.d.ts +13 -0
  142. package/dist/components/Timeline/timeline-asset-link.js +37 -0
  143. package/dist/components/Timeline/timeline-field-utils.d.ts +1 -0
  144. package/dist/components/Timeline/timeline-field-utils.js +5 -1
  145. package/dist/components/Timeline/timeline-translate-utils.js +9 -2
  146. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +7 -0
  147. package/dist/components/Timeline/use-timeline-keyframe-drag.d.ts +10 -0
  148. package/dist/components/Timeline/use-timeline-keyframe-drag.js +378 -0
  149. package/dist/components/TopPanel.d.ts +1 -1
  150. package/dist/components/folder-menu-items.d.ts +12 -0
  151. package/dist/components/folder-menu-items.js +147 -0
  152. package/dist/components/import-assets.d.ts +22 -0
  153. package/dist/components/import-assets.js +294 -0
  154. package/dist/components/load-canvas-content-from-url.d.ts +1 -0
  155. package/dist/components/load-canvas-content-from-url.js +9 -3
  156. package/dist/components/use-select-asset.d.ts +1 -0
  157. package/dist/components/use-select-asset.js +30 -0
  158. package/dist/error-overlay/error-origin.d.ts +3 -0
  159. package/dist/error-overlay/error-origin.js +42 -0
  160. package/dist/error-overlay/react-overlay/listen-to-runtime-errors.js +6 -2
  161. package/dist/error-overlay/remotion-overlay/ErrorLoader.js +38 -0
  162. package/dist/error-overlay/remotion-overlay/ShortcutHint.js +1 -1
  163. package/dist/error-overlay/remotion-overlay/log-studio-error.d.ts +3 -0
  164. package/dist/error-overlay/remotion-overlay/log-studio-error.js +27 -0
  165. package/dist/esm/{chunk-z0z9d4r0.js → chunk-q0jkt0zq.js} +23062 -17350
  166. package/dist/esm/internals.mjs +23062 -17350
  167. package/dist/esm/previewEntry.mjs +22351 -16615
  168. package/dist/esm/renderEntry.mjs +1 -1
  169. package/dist/helpers/calculate-timeline.js +7 -3
  170. package/dist/helpers/create-folder-tree.js +1 -0
  171. package/dist/helpers/get-asset-metadata.js +2 -2
  172. package/dist/helpers/get-folder-id.d.ts +4 -0
  173. package/dist/helpers/get-folder-id.js +7 -0
  174. package/dist/helpers/get-preview-file-type.d.ts +2 -0
  175. package/dist/helpers/get-preview-file-type.js +33 -0
  176. package/dist/helpers/get-timeline-sequence-sort-key.d.ts +2 -0
  177. package/dist/helpers/install-required-package.d.ts +1 -0
  178. package/dist/helpers/install-required-package.js +39 -0
  179. package/dist/helpers/remote-asset-drag.d.ts +4 -0
  180. package/dist/helpers/remote-asset-drag.js +73 -0
  181. package/dist/helpers/timeline-layout.js +5 -1
  182. package/dist/helpers/use-asset-drag-events.d.ts +5 -2
  183. package/dist/helpers/use-asset-drag-events.js +13 -2
  184. package/dist/helpers/validate-folder-rename.d.ts +6 -0
  185. package/dist/helpers/validate-folder-rename.js +19 -0
  186. package/dist/hot-middleware-client/client.js +6 -0
  187. package/dist/state/editor-outlines.d.ts +8 -0
  188. package/dist/state/editor-outlines.js +18 -0
  189. package/dist/state/modals.d.ts +29 -2
  190. package/dist/state/scale-lock.d.ts +18 -0
  191. package/dist/state/scale-lock.js +59 -0
  192. package/package.json +10 -10
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useTimelineKeyframeDragState = exports.TimelineKeyframeDragStateProvider = exports.getTimelineKeyframeDragKey = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const timeline_node_path_key_1 = require("../../helpers/timeline-node-path-key");
7
+ const emptyDraggedKeyframes = new Set();
8
+ const getTimelineKeyframeDragKey = ({ nodePathInfo, frame, }) => {
9
+ return `${(0, timeline_node_path_key_1.timelineNodePathInfoToKey)(nodePathInfo)}.keyframe.${frame}`;
10
+ };
11
+ exports.getTimelineKeyframeDragKey = getTimelineKeyframeDragKey;
12
+ const TimelineKeyframeDragStateContext = (0, react_1.createContext)({
13
+ clearDraggedKeyframes: () => undefined,
14
+ isKeyframeDragging: () => false,
15
+ setDraggedKeyframes: () => undefined,
16
+ });
17
+ const TimelineKeyframeDragStateProvider = ({ children }) => {
18
+ const [draggedKeys, setDraggedKeys] = (0, react_1.useState)(emptyDraggedKeyframes);
19
+ const setDraggedKeyframes = (0, react_1.useCallback)((keyframes) => {
20
+ setDraggedKeys(new Set(keyframes.map(exports.getTimelineKeyframeDragKey)));
21
+ }, []);
22
+ const clearDraggedKeyframes = (0, react_1.useCallback)(() => {
23
+ setDraggedKeys(emptyDraggedKeyframes);
24
+ }, []);
25
+ const isKeyframeDragging = (0, react_1.useCallback)((keyframe) => {
26
+ return draggedKeys.has((0, exports.getTimelineKeyframeDragKey)(keyframe));
27
+ }, [draggedKeys]);
28
+ const value = (0, react_1.useMemo)(() => ({
29
+ clearDraggedKeyframes,
30
+ isKeyframeDragging,
31
+ setDraggedKeyframes,
32
+ }), [clearDraggedKeyframes, isKeyframeDragging, setDraggedKeyframes]);
33
+ return (jsx_runtime_1.jsx(TimelineKeyframeDragStateContext.Provider, { value: value, children: children }));
34
+ };
35
+ exports.TimelineKeyframeDragStateProvider = TimelineKeyframeDragStateProvider;
36
+ const useTimelineKeyframeDragState = () => {
37
+ return (0, react_1.useContext)(TimelineKeyframeDragStateContext);
38
+ };
39
+ exports.useTimelineKeyframeDragState = useTimelineKeyframeDragState;
@@ -1,8 +1,13 @@
1
1
  import React from 'react';
2
- import type { CanUpdateSequencePropStatusKeyframed } from 'remotion';
3
- import type { SchemaFieldInfo } from '../../helpers/timeline-layout';
2
+ import type { CanUpdateSequencePropStatusKeyframed, DragOverrideValue, SequencePropsSubscriptionKey } from 'remotion';
3
+ import type { SchemaFieldInfo, TimelineFieldOnDragValueChange } from '../../helpers/timeline-layout';
4
4
  export declare const TimelineKeyframedValue: React.FC<{
5
5
  readonly field: SchemaFieldInfo;
6
6
  readonly propStatus: CanUpdateSequencePropStatusKeyframed;
7
7
  readonly keyframeDisplayOffset: number;
8
+ readonly dragOverrideValue: DragOverrideValue | undefined;
9
+ readonly onSave: (value: unknown, sourceFrame: number) => Promise<void>;
10
+ readonly onDragValueChange: TimelineFieldOnDragValueChange;
11
+ readonly onDragEnd: () => void;
12
+ readonly scaleLockNodePath: SequencePropsSubscriptionKey;
8
13
  }>;
@@ -5,13 +5,10 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
7
  const TimelineSchemaField_1 = require("./TimelineSchemaField");
8
- const wrapperStyle = {
9
- opacity: 0.5,
10
- pointerEvents: 'none',
8
+ const valuesEqual = (left, right) => {
9
+ return JSON.stringify(left) === JSON.stringify(right);
11
10
  };
12
- const noop = () => undefined;
13
- const noopAsync = () => Promise.resolve();
14
- const TimelineKeyframedValue = ({ field, propStatus, keyframeDisplayOffset }) => {
11
+ const TimelineKeyframedValue = ({ field, propStatus, keyframeDisplayOffset, dragOverrideValue, onSave, onDragValueChange, onDragEnd, scaleLockNodePath, }) => {
15
12
  const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
16
13
  const jsxFrame = timelinePosition - keyframeDisplayOffset;
17
14
  const computedValue = (0, react_1.useMemo)(() => {
@@ -25,12 +22,29 @@ const TimelineKeyframedValue = ({ field, propStatus, keyframeDisplayOffset }) =>
25
22
  return raw;
26
23
  }, [jsxFrame, propStatus]);
27
24
  const fakeStatus = (0, react_1.useMemo)(() => ({
28
- canUpdate: true,
25
+ status: 'static',
29
26
  codeValue: computedValue,
30
27
  }), [computedValue]);
28
+ const effectiveValue = (0, react_1.useMemo)(() => {
29
+ return remotion_1.Internals.getEffectiveVisualModeValue({
30
+ codeValue: fakeStatus,
31
+ dragOverrideValue,
32
+ frame: jsxFrame,
33
+ defaultValue: field.fieldSchema.default,
34
+ shouldResortToDefaultValueIfUndefined: true,
35
+ });
36
+ }, [dragOverrideValue, fakeStatus, field.fieldSchema.default, jsxFrame]);
37
+ const onSaveIfChanged = (0, react_1.useCallback)((value) => {
38
+ const existingKeyframe = propStatus.keyframes.find((keyframe) => keyframe.frame === jsxFrame);
39
+ if (valuesEqual(value, computedValue) ||
40
+ (existingKeyframe && valuesEqual(value, existingKeyframe.value))) {
41
+ return Promise.resolve();
42
+ }
43
+ return onSave(value, jsxFrame);
44
+ }, [computedValue, jsxFrame, onSave, propStatus.keyframes]);
31
45
  if (computedValue === null) {
32
46
  return null;
33
47
  }
34
- return (jsx_runtime_1.jsx("div", { style: wrapperStyle, children: jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineFieldValue, { field: field, propStatus: fakeStatus, effectiveValue: computedValue, onSave: noopAsync, onDragValueChange: noop, onDragEnd: noop }) }));
48
+ return (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineFieldValue, { field: field, propStatus: fakeStatus, effectiveValue: effectiveValue, onSave: onSaveIfChanged, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, scaleLockNodePath: scaleLockNodePath }));
35
49
  };
36
50
  exports.TimelineKeyframedValue = TimelineKeyframedValue;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ export declare const timelineLayerIconContainer: React.CSSProperties;
2
3
  export declare const TimelineLayerEye: React.FC<{
3
4
  readonly onInvoked: (type: 'enable' | 'disable') => void;
4
5
  readonly hidden: boolean;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TimelineLayerEyeSpacer = exports.TimelineLayerEye = void 0;
3
+ exports.TimelineLayerEyeSpacer = exports.TimelineLayerEye = exports.timelineLayerIconContainer = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const colors_1 = require("../../helpers/colors");
@@ -18,7 +18,7 @@ const speakerIcon = {
18
18
  height: 10,
19
19
  marginLeft: -1,
20
20
  };
21
- const container = {
21
+ exports.timelineLayerIconContainer = {
22
22
  height: 16,
23
23
  width: 16,
24
24
  borderRadius: 2,
@@ -47,6 +47,7 @@ const TimelineLayerEye = ({ onInvoked, hidden, type }) => {
47
47
  if (e.button !== 0) {
48
48
  return;
49
49
  }
50
+ e.preventDefault();
50
51
  e.stopPropagation();
51
52
  layerPointedDown = hidden ? 'enable' : 'disable';
52
53
  onInvoked(layerPointedDown);
@@ -54,12 +55,16 @@ const TimelineLayerEye = ({ onInvoked, hidden, type }) => {
54
55
  layerPointedDown = null;
55
56
  }, { once: true });
56
57
  }, [hidden, onInvoked]);
58
+ const onDragStart = (0, react_1.useCallback)((e) => {
59
+ e.preventDefault();
60
+ e.stopPropagation();
61
+ }, []);
57
62
  const onPointerEnter = (0, react_1.useCallback)(() => {
58
63
  if (layerPointedDown) {
59
64
  onInvoked(layerPointedDown);
60
65
  }
61
66
  }, [onInvoked]);
62
- return (jsx_runtime_1.jsx("div", { style: container, onPointerEnter: onPointerEnter, onPointerDown: onPointerDown, children: renderAction(colors_1.LIGHT_COLOR) }));
67
+ return (jsx_runtime_1.jsx("div", { style: exports.timelineLayerIconContainer, draggable: false, onDragStart: onDragStart, onPointerEnter: onPointerEnter, onPointerDown: onPointerDown, children: renderAction(colors_1.LIGHT_COLOR) }));
63
68
  };
64
69
  exports.TimelineLayerEye = TimelineLayerEye;
65
70
  const spacerStyle = {
@@ -11,8 +11,8 @@ const container = {
11
11
  };
12
12
  const TimelineList = ({ timeline }) => {
13
13
  return (jsx_runtime_1.jsxs("div", { style: container, children: [
14
- jsx_runtime_1.jsx(TimelineTimeIndicators_1.TimelineTimePadding, {}), timeline.map((track) => {
15
- return (jsx_runtime_1.jsx("div", { children: jsx_runtime_1.jsx(TimelineSequenceItem_1.TimelineSequenceItem, { nestedDepth: track.depth, sequence: track.sequence, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset }, track.sequence.id) }, track.sequence.id));
14
+ jsx_runtime_1.jsx(TimelineTimeIndicators_1.TimelineTimePadding, {}), timeline.map((track, trackIndex) => {
15
+ return (jsx_runtime_1.jsx("div", { children: jsx_runtime_1.jsx(TimelineSequenceItem_1.TimelineSequenceItem, { trackIndex: trackIndex, nestedDepth: track.depth, sequence: track.sequence, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset }, track.sequence.id) }, track.sequence.id));
16
16
  })] }));
17
17
  };
18
18
  exports.TimelineList = TimelineList;
@@ -1,17 +1,4 @@
1
1
  import React from 'react';
2
- type LinkInfo = {
3
- kind: 'local';
4
- assetPath: string;
5
- title: string;
6
- } | {
7
- kind: 'remote';
8
- href: string;
9
- title: string;
10
- } | null;
11
- export type TimelineAssetLinkInfo = Exclude<LinkInfo, null>;
12
- export declare const getTimelineAssetLinkInfo: (src: string) => LinkInfo;
13
- export declare const openTimelineAssetLink: (linkInfo: TimelineAssetLinkInfo, setCanvasContent: React.Dispatch<React.SetStateAction<import("remotion").CanvasContent | null>>) => void;
14
2
  export declare const TimelineMediaInfo: React.FC<{
15
3
  readonly src: string;
16
4
  }>;
17
- export {};
@@ -1,44 +1,12 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.TimelineMediaInfo = exports.openTimelineAssetLink = exports.getTimelineAssetLinkInfo = void 0;
3
+ exports.TimelineMediaInfo = void 0;
37
4
  const jsx_runtime_1 = require("react/jsx-runtime");
38
- const react_1 = __importStar(require("react"));
5
+ const react_1 = require("react");
39
6
  const remotion_1 = require("remotion");
40
7
  const colors_1 = require("../../helpers/colors");
41
- const url_state_1 = require("../../helpers/url-state");
8
+ const use_select_asset_1 = require("../use-select-asset");
9
+ const timeline_asset_link_1 = require("./timeline-asset-link");
42
10
  const TimelineSelection_1 = require("./TimelineSelection");
43
11
  const lineStyle = {
44
12
  whiteSpace: 'nowrap',
@@ -49,43 +17,10 @@ const lineStyle = {
49
17
  color: colors_1.VERY_LIGHT_TEXT,
50
18
  display: 'inline-block',
51
19
  };
52
- const getTimelineAssetLinkInfo = (src) => {
53
- const staticBase = typeof window === 'undefined' ? null : window.remotion_staticBase;
54
- if (staticBase && src.startsWith(staticBase + '/')) {
55
- const assetPath = src.slice(staticBase.length + 1);
56
- return {
57
- kind: 'local',
58
- assetPath: decodeURIComponent(assetPath),
59
- title: decodeURIComponent(assetPath),
60
- };
61
- }
62
- if (src.startsWith('http://') ||
63
- src.startsWith('https://') ||
64
- src.startsWith('//')) {
65
- try {
66
- const url = new URL(src.startsWith('//') ? 'https:' + src : src);
67
- return { kind: 'remote', href: src, title: url.hostname };
68
- }
69
- catch (_a) {
70
- return { kind: 'remote', href: src, title: src };
71
- }
72
- }
73
- return null;
74
- };
75
- exports.getTimelineAssetLinkInfo = getTimelineAssetLinkInfo;
76
- const openTimelineAssetLink = (linkInfo, setCanvasContent) => {
77
- if (linkInfo.kind === 'local') {
78
- setCanvasContent({ type: 'asset', asset: linkInfo.assetPath });
79
- (0, url_state_1.pushUrl)(`/assets/${linkInfo.assetPath}`);
80
- return;
81
- }
82
- window.open(linkInfo.href, '_blank', 'noopener,noreferrer');
83
- };
84
- exports.openTimelineAssetLink = openTimelineAssetLink;
85
20
  const useAssetLink = (src) => {
86
- const { setCanvasContent } = react_1.default.useContext(remotion_1.Internals.CompositionSetters);
21
+ const selectAsset = (0, use_select_asset_1.useSelectAsset)();
87
22
  const [hovered, setHovered] = (0, react_1.useState)(false);
88
- const linkInfo = (0, react_1.useMemo)(() => (0, exports.getTimelineAssetLinkInfo)(src), [src]);
23
+ const linkInfo = (0, react_1.useMemo)(() => (0, timeline_asset_link_1.getTimelineAssetLinkInfo)(src), [src]);
89
24
  const interactive = !TimelineSelection_1.SELECTION_ENABLED && linkInfo !== null;
90
25
  const onClick = (0, react_1.useCallback)((e) => {
91
26
  if (!linkInfo) {
@@ -93,8 +28,8 @@ const useAssetLink = (src) => {
93
28
  }
94
29
  e.preventDefault();
95
30
  e.stopPropagation();
96
- (0, exports.openTimelineAssetLink)(linkInfo, setCanvasContent);
97
- }, [linkInfo, setCanvasContent]);
31
+ (0, timeline_asset_link_1.openTimelineAssetLink)(linkInfo, selectAsset);
32
+ }, [linkInfo, selectAsset]);
98
33
  const onPointerEnter = (0, react_1.useCallback)(() => setHovered(true), []);
99
34
  const onPointerLeave = (0, react_1.useCallback)(() => setHovered(false), []);
100
35
  const fileNameStyle = (0, react_1.useMemo)(() => ({
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
- import type { CanUpdateSequencePropStatus } from 'remotion';
2
+ import type { CanUpdateSequencePropStatusStatic } from 'remotion';
3
3
  import type { SchemaFieldInfo, TimelineFieldOnDragValueChange, TimelineFieldOnSave } from '../../helpers/timeline-layout';
4
4
  export declare const TimelineNumberField: React.FC<{
5
5
  readonly field: SchemaFieldInfo;
6
6
  readonly effectiveValue: unknown;
7
- readonly propStatus: CanUpdateSequencePropStatus;
7
+ readonly propStatus: CanUpdateSequencePropStatusStatic;
8
8
  readonly onSave: TimelineFieldOnSave;
9
9
  readonly onDragValueChange: TimelineFieldOnDragValueChange;
10
10
  readonly onDragEnd: () => void;
@@ -13,7 +13,7 @@ const TimelineNumberField = ({ field, effectiveValue, onSave, onDragValueChange,
13
13
  onDragValueChange(newVal);
14
14
  }, [onDragValueChange]);
15
15
  const onValueChangeEnd = (0, react_1.useCallback)((newVal) => {
16
- if (propStatus.canUpdate && newVal !== propStatus.codeValue) {
16
+ if (newVal !== propStatus.codeValue) {
17
17
  onSave(newVal).finally(() => {
18
18
  setDragValue(null);
19
19
  onDragEnd();
@@ -25,16 +25,12 @@ const TimelineNumberField = ({ field, effectiveValue, onSave, onDragValueChange,
25
25
  }
26
26
  }, [onSave, propStatus, onDragEnd]);
27
27
  const onTextChange = (0, react_1.useCallback)((newVal) => {
28
- if (propStatus.canUpdate) {
29
- const parsed = Number(newVal);
30
- if (!Number.isNaN(parsed) &&
31
- propStatus.canUpdate &&
32
- parsed !== propStatus.codeValue) {
33
- setDragValue(parsed);
34
- onSave(parsed).finally(() => {
35
- setDragValue(null);
36
- });
37
- }
28
+ const parsed = Number(newVal);
29
+ if (!Number.isNaN(parsed) && parsed !== propStatus.codeValue) {
30
+ setDragValue(parsed);
31
+ onSave(parsed).finally(() => {
32
+ setDragValue(null);
33
+ });
38
34
  }
39
35
  }, [onSave, propStatus]);
40
36
  const step = field.fieldSchema.type === 'number' ? ((_a = field.fieldSchema.step) !== null && _a !== void 0 ? _a : 1) : 1;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import type { ArrayFieldSchema, CanUpdateSequencePropStatusStatic, SequencePropsSubscriptionKey, VisibleFieldSchema } from 'remotion';
3
+ import type { SchemaFieldInfo, TimelineFieldOnDragValueChange, TimelineFieldOnSave } from '../../helpers/timeline-layout';
4
+ export type TimelinePrimitiveFieldInfo = Omit<SchemaFieldInfo, 'fieldSchema' | 'typeName'> & {
5
+ readonly fieldSchema: Exclude<VisibleFieldSchema, ArrayFieldSchema>;
6
+ readonly typeName: Exclude<VisibleFieldSchema['type'], 'array'>;
7
+ };
8
+ export declare const isTimelinePrimitiveFieldInfo: (field: SchemaFieldInfo) => field is TimelinePrimitiveFieldInfo;
9
+ export declare const TimelinePrimitiveFieldValue: React.FC<{
10
+ readonly field: TimelinePrimitiveFieldInfo;
11
+ readonly onSave: TimelineFieldOnSave;
12
+ readonly onDragValueChange: TimelineFieldOnDragValueChange;
13
+ readonly onDragEnd: () => void;
14
+ readonly propStatus: CanUpdateSequencePropStatusStatic;
15
+ readonly effectiveValue: unknown;
16
+ readonly scaleLockNodePath: SequencePropsSubscriptionKey | null;
17
+ }>;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TimelinePrimitiveFieldValue = exports.isTimelinePrimitiveFieldInfo = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const TimelineBooleanField_1 = require("./TimelineBooleanField");
6
+ const TimelineColorField_1 = require("./TimelineColorField");
7
+ const TimelineEnumField_1 = require("./TimelineEnumField");
8
+ const TimelineNumberField_1 = require("./TimelineNumberField");
9
+ const TimelineRotationField_1 = require("./TimelineRotationField");
10
+ const TimelineScaleField_1 = require("./TimelineScaleField");
11
+ const TimelineTranslateField_1 = require("./TimelineTranslateField");
12
+ const TimelineUvCoordinateField_1 = require("./TimelineUvCoordinateField");
13
+ const inlineWrapper = {
14
+ fontSize: 12,
15
+ };
16
+ const isTimelinePrimitiveFieldInfo = (field) => {
17
+ return (field.typeName !== 'array' &&
18
+ field.typeName !== 'hidden' &&
19
+ field.fieldSchema.type !== 'array');
20
+ };
21
+ exports.isTimelinePrimitiveFieldInfo = isTimelinePrimitiveFieldInfo;
22
+ const TimelinePrimitiveFieldValue = ({ field, onSave, onDragValueChange, onDragEnd, propStatus, effectiveValue, scaleLockNodePath, }) => {
23
+ if (field.typeName === 'number') {
24
+ return (jsx_runtime_1.jsx("span", { children: jsx_runtime_1.jsx(TimelineNumberField_1.TimelineNumberField, { effectiveValue: effectiveValue, field: field, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }) }));
25
+ }
26
+ if (field.typeName === 'rotation-css' ||
27
+ field.typeName === 'rotation-degrees') {
28
+ return (jsx_runtime_1.jsx("span", { children: jsx_runtime_1.jsx(TimelineRotationField_1.TimelineRotationField, { effectiveValue: effectiveValue, field: field, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }) }));
29
+ }
30
+ if (field.typeName === 'translate') {
31
+ return (jsx_runtime_1.jsx("span", { children: jsx_runtime_1.jsx(TimelineTranslateField_1.TimelineTranslateField, { effectiveValue: effectiveValue, field: field, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }) }));
32
+ }
33
+ if (field.typeName === 'scale') {
34
+ if (scaleLockNodePath === null) {
35
+ throw new Error('Expected scale lock node path for scale field');
36
+ }
37
+ return (jsx_runtime_1.jsx("span", { children: jsx_runtime_1.jsx(TimelineScaleField_1.TimelineScaleField, { effectiveValue: effectiveValue, field: field, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus, scaleLockNodePath: scaleLockNodePath }) }));
38
+ }
39
+ if (field.typeName === 'uv-coordinate') {
40
+ return (jsx_runtime_1.jsx("span", { children: jsx_runtime_1.jsx(TimelineUvCoordinateField_1.TimelineUvCoordinateField, { effectiveValue: effectiveValue, field: field, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }) }));
41
+ }
42
+ if (field.typeName === 'boolean') {
43
+ return (jsx_runtime_1.jsx("span", { children: jsx_runtime_1.jsx(TimelineBooleanField_1.TimelineBooleanField, { effectiveValue: effectiveValue, field: field, onSave: onSave, propStatus: propStatus }) }));
44
+ }
45
+ if (field.typeName === 'color') {
46
+ return (jsx_runtime_1.jsx("span", { children: jsx_runtime_1.jsx(TimelineColorField_1.TimelineColorField, { effectiveValue: effectiveValue, field: field, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }) }));
47
+ }
48
+ if (field.typeName === 'enum') {
49
+ return (jsx_runtime_1.jsx("span", { style: inlineWrapper, children: jsx_runtime_1.jsx(TimelineEnumField_1.TimelineEnumField, { effectiveValue: effectiveValue, field: field, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }) }));
50
+ }
51
+ throw new Error(`Unsupported field type: ${field.typeName}`);
52
+ };
53
+ exports.TimelinePrimitiveFieldValue = TimelinePrimitiveFieldValue;
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
- import type { CanUpdateSequencePropStatus } from 'remotion';
2
+ import type { CanUpdateSequencePropStatusStatic } from 'remotion';
3
3
  import type { SchemaFieldInfo, TimelineFieldOnDragValueChange, TimelineFieldOnSave } from '../../helpers/timeline-layout';
4
4
  export declare const TimelineRotationField: React.FC<{
5
5
  readonly field: SchemaFieldInfo;
6
6
  readonly effectiveValue: unknown;
7
- readonly propStatus: CanUpdateSequencePropStatus;
7
+ readonly propStatus: CanUpdateSequencePropStatusStatic;
8
8
  readonly onSave: TimelineFieldOnSave;
9
9
  readonly onDragValueChange: TimelineFieldOnDragValueChange;
10
10
  readonly onDragEnd: () => void;
@@ -15,28 +15,38 @@ const unitToDegrees = {
15
15
  const parseCssRotationToDegrees = (value) => {
16
16
  const match = value.trim().match(unitPattern);
17
17
  if (match) {
18
- return Number(match[1]) * unitToDegrees[match[2]];
18
+ return (0, timeline_field_utils_1.normalizeTimelineNumber)(Number(match[1]) * unitToDegrees[match[2]]);
19
19
  }
20
20
  try {
21
21
  const m = new DOMMatrix(`rotate(${value})`);
22
- return Math.round(Math.atan2(m.b, m.a) * (180 / Math.PI) * 1e6) / 1e6;
22
+ return (0, timeline_field_utils_1.normalizeTimelineNumber)(Math.atan2(m.b, m.a) * (180 / Math.PI));
23
23
  }
24
24
  catch (_a) {
25
25
  return 0;
26
26
  }
27
27
  };
28
28
  const TimelineRotationField = ({ field, effectiveValue, propStatus, onSave, onDragValueChange, onDragEnd, }) => {
29
- var _a;
29
+ var _a, _b, _c;
30
30
  const [dragValue, setDragValue] = (0, react_1.useState)(null);
31
- const degrees = (0, react_1.useMemo)(() => parseCssRotationToDegrees(String(effectiveValue !== null && effectiveValue !== void 0 ? effectiveValue : '0deg')), [effectiveValue]);
31
+ const isCssRotation = field.fieldSchema.type === 'rotation-css';
32
+ const degrees = (0, react_1.useMemo)(() => {
33
+ if (isCssRotation) {
34
+ return parseCssRotationToDegrees(String(effectiveValue !== null && effectiveValue !== void 0 ? effectiveValue : '0deg'));
35
+ }
36
+ return typeof effectiveValue === 'number' ? effectiveValue : 0;
37
+ }, [effectiveValue, isCssRotation]);
38
+ const serializeValue = (0, react_1.useCallback)((value) => {
39
+ const normalized = (0, timeline_field_utils_1.normalizeTimelineNumber)(value);
40
+ return isCssRotation ? `${normalized}deg` : normalized;
41
+ }, [isCssRotation]);
32
42
  const onValueChange = (0, react_1.useCallback)((newVal) => {
33
43
  setDragValue(newVal);
34
- onDragValueChange(`${newVal}deg`);
35
- }, [onDragValueChange]);
44
+ onDragValueChange(serializeValue(newVal));
45
+ }, [onDragValueChange, serializeValue]);
36
46
  const onValueChangeEnd = (0, react_1.useCallback)((newVal) => {
37
- const newStr = `${newVal}deg`;
38
- if (propStatus.canUpdate && newStr !== propStatus.codeValue) {
39
- onSave(newStr).finally(() => {
47
+ const newValue = serializeValue(newVal);
48
+ if (newValue !== propStatus.codeValue) {
49
+ onSave(newValue).finally(() => {
40
50
  setDragValue(null);
41
51
  onDragEnd();
42
52
  });
@@ -45,29 +55,36 @@ const TimelineRotationField = ({ field, effectiveValue, propStatus, onSave, onDr
45
55
  setDragValue(null);
46
56
  onDragEnd();
47
57
  }
48
- }, [propStatus, onSave, onDragEnd]);
58
+ }, [propStatus, onSave, onDragEnd, serializeValue]);
49
59
  const onTextChange = (0, react_1.useCallback)((newVal) => {
50
- if (propStatus.canUpdate) {
51
- const parsed = Number(newVal);
52
- if (!Number.isNaN(parsed)) {
53
- const newStr = `${parsed}deg`;
54
- if (newStr !== propStatus.codeValue) {
55
- setDragValue(parsed);
56
- onSave(newStr).finally(() => {
57
- setDragValue(null);
58
- });
59
- }
60
+ const parsed = Number(newVal);
61
+ if (!Number.isNaN(parsed)) {
62
+ const newValue = serializeValue(parsed);
63
+ if (newValue !== propStatus.codeValue) {
64
+ setDragValue(parsed);
65
+ onSave(newValue).finally(() => {
66
+ setDragValue(null);
67
+ });
60
68
  }
61
69
  }
62
- }, [propStatus, onSave]);
63
- const step = field.fieldSchema.type === 'rotation' ? ((_a = field.fieldSchema.step) !== null && _a !== void 0 ? _a : 1) : 1;
70
+ }, [propStatus, onSave, serializeValue]);
71
+ const step = field.fieldSchema.type === 'rotation-css' ||
72
+ field.fieldSchema.type === 'rotation-degrees'
73
+ ? ((_a = field.fieldSchema.step) !== null && _a !== void 0 ? _a : 1)
74
+ : 1;
75
+ const min = field.fieldSchema.type === 'rotation-degrees'
76
+ ? ((_b = field.fieldSchema.min) !== null && _b !== void 0 ? _b : -Infinity)
77
+ : -Infinity;
78
+ const max = field.fieldSchema.type === 'rotation-degrees'
79
+ ? ((_c = field.fieldSchema.max) !== null && _c !== void 0 ? _c : Infinity)
80
+ : Infinity;
64
81
  const stepDecimals = (0, react_1.useMemo)(() => (0, timeline_field_utils_1.getDecimalPlaces)(step), [step]);
65
82
  const formatter = (0, react_1.useCallback)((v) => {
66
- const num = Number(v);
83
+ const num = (0, timeline_field_utils_1.normalizeTimelineNumber)(Number(v));
67
84
  const digits = Math.max(stepDecimals, (0, timeline_field_utils_1.getDecimalPlaces)(num));
68
85
  const formatted = digits === 0 ? String(num) : num.toFixed(digits);
69
86
  return `${formatted}\u00B0`;
70
87
  }, [stepDecimals]);
71
- return (jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragValue !== null && dragValue !== void 0 ? dragValue : degrees, style: timeline_field_utils_1.draggerStyle, status: "ok", small: true, onValueChange: onValueChange, onValueChangeEnd: onValueChangeEnd, onTextChange: onTextChange, min: -Infinity, max: Infinity, step: step, formatter: formatter, rightAlign: false }));
88
+ return (jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragValue !== null && dragValue !== void 0 ? dragValue : degrees, style: timeline_field_utils_1.draggerStyle, status: "ok", small: true, onValueChange: onValueChange, onValueChangeEnd: onValueChangeEnd, onTextChange: onTextChange, min: min, max: max, step: step, formatter: formatter, rightAlign: false }));
72
89
  };
73
90
  exports.TimelineRotationField = TimelineRotationField;
@@ -17,23 +17,25 @@ const leftChromeStyle = {
17
17
  display: 'flex',
18
18
  flexShrink: 0,
19
19
  };
20
- const keyframeControlsColumnStyle = {
20
+ const keyframeControlsColumnBaseStyle = {
21
21
  alignItems: 'center',
22
22
  display: 'flex',
23
23
  flexShrink: 0,
24
24
  justifyContent: 'flex-start',
25
- marginRight: -(timeline_row_layout_1.TIMELINE_KEYFRAME_CONTROLS_WIDTH - timeline_row_layout_1.TIMELINE_ROW_BASE_PADDING),
26
- width: timeline_row_layout_1.TIMELINE_KEYFRAME_CONTROLS_WIDTH,
27
25
  };
28
26
  const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, style, selected, selectable, onSelect, showSelectedBackground, containsSelection, outerHeight, onDragLeave, onDragOver, onDrop, onDoubleClick, }) => {
29
27
  const indentWidth = (0, timeline_row_layout_1.getTimelineRowIndentWidth)(depth);
28
+ const keyframeControlsColumnStyle = (0, react_1.useMemo)(() => ({
29
+ ...keyframeControlsColumnBaseStyle,
30
+ width: (0, timeline_row_layout_1.getTimelineRowLeftChromeWidth)(depth),
31
+ }), [depth]);
30
32
  const chromeColumnStyle = (0, react_1.useMemo)(() => ({
31
33
  alignItems: 'center',
32
34
  alignSelf: 'stretch',
33
35
  display: 'flex',
34
36
  flexShrink: 0,
35
- paddingLeft: keyframeControls ? 0 : timeline_row_layout_1.TIMELINE_ROW_BASE_PADDING,
36
- }), [keyframeControls]);
37
+ paddingLeft: timeline_row_layout_1.TIMELINE_ROW_BASE_PADDING,
38
+ }), []);
37
39
  const onPointerDown = (0, react_1.useCallback)((e) => {
38
40
  if (e.button === 0) {
39
41
  e.stopPropagation();
@@ -69,8 +71,7 @@ const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, styl
69
71
  };
70
72
  }, [outerHeight, highlightBackground]);
71
73
  const chrome = (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
72
- jsx_runtime_1.jsxs("div", { style: leftChromeStyle, children: [keyframeControls ? (jsx_runtime_1.jsx("div", { style: keyframeControlsColumnStyle, children: keyframeControls })) : null, jsx_runtime_1.jsxs("div", { style: chromeColumnStyle, children: [eye, indentWidth > 0 ? jsx_runtime_1.jsx(Padder_1.Padder, { depth: depth }) : null, arrow] })
73
- ] }), children] }));
74
+ jsx_runtime_1.jsx("div", { style: leftChromeStyle, children: keyframeControls ? (jsx_runtime_1.jsx("div", { style: keyframeControlsColumnStyle, children: keyframeControls })) : (jsx_runtime_1.jsxs("div", { style: chromeColumnStyle, children: [eye, indentWidth > 0 ? jsx_runtime_1.jsx(Padder_1.Padder, { depth: depth }) : null, arrow] })) }), children] }));
74
75
  if (outerStyle) {
75
76
  return (jsx_runtime_1.jsx("div", { style: outerStyle, onDragLeave: onDragLeave, onDragOver: onDragOver, onDrop: onDrop, onPointerDown: selectable ? onPointerDown : undefined, onContextMenu: selectable ? onContextMenu : undefined, onDoubleClick: onDoubleClick, children: jsx_runtime_1.jsx("div", { style: innerRowStyle, children: chrome }) }));
76
77
  }
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import type { CanUpdateSequencePropStatusStatic, SequencePropsSubscriptionKey } from 'remotion';
3
+ import type { SchemaFieldInfo, TimelineFieldOnDragValueChange, TimelineFieldOnSave } from '../../helpers/timeline-layout';
4
+ export declare const getLinkedScale: ({ axis, newValue, baseX, baseY, min, max, }: {
5
+ readonly axis: "x" | "y";
6
+ readonly newValue: number;
7
+ readonly baseX: number;
8
+ readonly baseY: number;
9
+ readonly min: number;
10
+ readonly max: number;
11
+ }) => [number, number];
12
+ export declare const TimelineScaleField: React.FC<{
13
+ readonly field: SchemaFieldInfo;
14
+ readonly propStatus: CanUpdateSequencePropStatusStatic;
15
+ readonly effectiveValue: unknown;
16
+ readonly onSave: TimelineFieldOnSave;
17
+ readonly onDragValueChange: TimelineFieldOnDragValueChange;
18
+ readonly onDragEnd: () => void;
19
+ readonly scaleLockNodePath: SequencePropsSubscriptionKey;
20
+ }>;