@remotion/studio 4.0.499 → 4.0.500

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 (132) hide show
  1. package/dist/components/AssetSelector.js +8 -6
  2. package/dist/components/AssetSelectorItem.d.ts +24 -0
  3. package/dist/components/AssetSelectorItem.js +113 -80
  4. package/dist/components/CompositionSelector.js +2 -32
  5. package/dist/components/ControlButton.js +1 -0
  6. package/dist/components/ExplorerPanel.js +2 -1
  7. package/dist/components/ExplorerPanelRef.d.ts +2 -0
  8. package/dist/components/GlobalKeybindings.js +7 -1
  9. package/dist/components/InlineAction.d.ts +2 -1
  10. package/dist/components/InlineAction.js +2 -2
  11. package/dist/components/InlineDropdown.d.ts +1 -1
  12. package/dist/components/InlineDropdown.js +3 -2
  13. package/dist/components/InspectorPanel/AlignmentControls.d.ts +2 -2
  14. package/dist/components/InspectorPanel/AlignmentControls.js +5 -2
  15. package/dist/components/InspectorPanel/CompositionInspector.js +8 -7
  16. package/dist/components/InspectorPanel/CompositionMetadata.js +170 -57
  17. package/dist/components/InspectorPanel/ConnectedCompositionsSection.d.ts +2 -2
  18. package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -3
  19. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +7 -7
  20. package/dist/components/InspectorPanel/common.d.ts +17 -4
  21. package/dist/components/InspectorPanel/common.js +60 -6
  22. package/dist/components/InspectorPanel/use-composition-actions.js +1 -0
  23. package/dist/components/InspectorPanel/use-track-for-selection.d.ts +1 -1
  24. package/dist/components/InspectorSequenceSection.js +43 -19
  25. package/dist/components/KeyboardShortcutsExplainer.js +4 -2
  26. package/dist/components/Menu/MenuItem.js +2 -1
  27. package/dist/components/MenuCompositionName.js +30 -7
  28. package/dist/components/MenuToolbar.d.ts +0 -1
  29. package/dist/components/MenuToolbar.js +8 -7
  30. package/dist/components/MobilePanel.d.ts +2 -1
  31. package/dist/components/MobilePanel.js +29 -25
  32. package/dist/components/ModalContainer.d.ts +1 -0
  33. package/dist/components/ModalContainer.js +2 -2
  34. package/dist/components/Modals.js +1 -1
  35. package/dist/components/NewComposition/DismissableModal.d.ts +1 -0
  36. package/dist/components/NewComposition/DismissableModal.js +2 -2
  37. package/dist/components/NewComposition/InputDragger.d.ts +7 -0
  38. package/dist/components/NewComposition/InputDragger.js +119 -8
  39. package/dist/components/OutlineToggle.d.ts +1 -3
  40. package/dist/components/OutlineToggle.js +2 -2
  41. package/dist/components/PreviewToolbar.js +10 -4
  42. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.d.ts +7 -0
  43. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +44 -0
  44. package/dist/components/QuickSwitcher/NoResults.d.ts +1 -1
  45. package/dist/components/QuickSwitcher/NoResults.js +1 -0
  46. package/dist/components/QuickSwitcher/QuickSwitcher.d.ts +5 -0
  47. package/dist/components/QuickSwitcher/QuickSwitcher.js +6 -2
  48. package/dist/components/QuickSwitcher/QuickSwitcherContent.d.ts +5 -0
  49. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +76 -12
  50. package/dist/components/QuickSwitcher/QuickSwitcherResult.d.ts +4 -0
  51. package/dist/components/QuickSwitcher/QuickSwitcherResult.js +11 -8
  52. package/dist/components/QuickSwitcher/asset-search.d.ts +9 -0
  53. package/dist/components/QuickSwitcher/asset-search.js +42 -0
  54. package/dist/components/SelectedOutlineCropControls.d.ts +8 -0
  55. package/dist/components/SelectedOutlineCropControls.js +299 -0
  56. package/dist/components/SelectedOutlineElement.js +83 -43
  57. package/dist/components/SelectedOutlineOverlay.d.ts +2 -2
  58. package/dist/components/SelectedOutlineOverlay.js +130 -8
  59. package/dist/components/SequencePropsSubscriptionProvider.d.ts +2 -0
  60. package/dist/components/SequencePropsSubscriptionProvider.js +31 -3
  61. package/dist/components/SidebarCollapserControls.d.ts +3 -1
  62. package/dist/components/SidebarCollapserControls.js +34 -29
  63. package/dist/components/SnappingToggle.d.ts +1 -3
  64. package/dist/components/SnappingToggle.js +2 -2
  65. package/dist/components/Timeline/TimelineAssetField.d.ts +9 -1
  66. package/dist/components/Timeline/TimelineAssetField.js +52 -100
  67. package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +7 -3
  68. package/dist/components/Timeline/TimelineClipboardKeybindings.js +65 -38
  69. package/dist/components/Timeline/TimelineColorField.js +20 -1
  70. package/dist/components/Timeline/TimelineEffectPropItem.js +8 -77
  71. package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +1 -0
  72. package/dist/components/Timeline/TimelineHeightContainer.d.ts +2 -2
  73. package/dist/components/Timeline/TimelineKeyframeTracksContext.d.ts +3 -3
  74. package/dist/components/Timeline/TimelineList.d.ts +2 -2
  75. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +7 -1
  76. package/dist/components/Timeline/TimelineSelection.d.ts +5 -5
  77. package/dist/components/Timeline/TimelineSelection.js +8 -6
  78. package/dist/components/Timeline/TimelineSequence.js +1 -5
  79. package/dist/components/Timeline/TimelineSequenceItem.js +57 -10
  80. package/dist/components/Timeline/TimelineSequencePropItem.js +27 -75
  81. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +0 -1
  82. package/dist/components/Timeline/TimelineTrack.d.ts +2 -2
  83. package/dist/components/Timeline/TimelineTracks.d.ts +2 -2
  84. package/dist/components/Timeline/find-track-for-node-path-info.d.ts +1 -1
  85. package/dist/components/Timeline/get-sequence-context-menu-items.js +14 -12
  86. package/dist/components/Timeline/reset-selected-timeline-props.js +18 -10
  87. package/dist/components/Timeline/save-effect-prop.d.ts +10 -0
  88. package/dist/components/Timeline/save-effect-prop.js +52 -1
  89. package/dist/components/Timeline/should-show-track-in-timeline.d.ts +2 -2
  90. package/dist/components/Timeline/timeline-asset-link.js +17 -1
  91. package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.d.ts +4 -0
  92. package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +9 -3
  93. package/dist/components/Timeline/use-timeline-height.d.ts +2 -2
  94. package/dist/components/TopPanel.js +2 -2
  95. package/dist/components/UndoRedoButtons.js +27 -5
  96. package/dist/components/composition-drop-preview.js +1 -0
  97. package/dist/components/menu-toolbar-height.d.ts +1 -0
  98. package/dist/components/menu-toolbar-height.js +4 -0
  99. package/dist/components/selected-outline-drag.d.ts +41 -4
  100. package/dist/components/selected-outline-drag.js +179 -2
  101. package/dist/components/selected-outline-geometry.d.ts +1 -0
  102. package/dist/components/selected-outline-measurement.d.ts +11 -0
  103. package/dist/components/selected-outline-measurement.js +64 -3
  104. package/dist/components/selected-outline-types.d.ts +44 -1
  105. package/dist/components/selected-outline-types.js +21 -1
  106. package/dist/error-overlay/remotion-overlay/Overlay.js +3 -3
  107. package/dist/error-overlay/remotion-overlay/ShortcutHint.js +2 -3
  108. package/dist/esm/{chunk-pk1zwsn1.js → chunk-dr1y1vm3.js} +8417 -7127
  109. package/dist/esm/internals.mjs +8417 -7127
  110. package/dist/esm/previewEntry.mjs +51241 -49953
  111. package/dist/esm/renderEntry.mjs +1 -1
  112. package/dist/helpers/calculate-timeline.d.ts +2 -2
  113. package/dist/helpers/calculate-timeline.js +8 -28
  114. package/dist/helpers/get-timeline-sequence-sort-key.d.ts +3 -10
  115. package/dist/helpers/get-timeline-sequence-sort-key.js +5 -13
  116. package/dist/helpers/interactivity-enabled.d.ts +1 -0
  117. package/dist/helpers/interactivity-enabled.js +7 -2
  118. package/dist/helpers/is-mac.d.ts +1 -0
  119. package/dist/helpers/is-mac.js +4 -0
  120. package/dist/helpers/open-in-editor.d.ts +5 -1
  121. package/dist/helpers/open-in-editor.js +15 -1
  122. package/dist/helpers/sort-by-nonce-history.js +97 -19
  123. package/dist/helpers/use-keybinding.js +2 -3
  124. package/dist/helpers/use-menu-structure.js +10 -1
  125. package/dist/icons/caret.d.ts +1 -0
  126. package/dist/icons/caret.js +2 -2
  127. package/dist/icons/pen.d.ts +5 -0
  128. package/dist/icons/pen.js +8 -0
  129. package/dist/state/modals.d.ts +5 -0
  130. package/package.json +12 -12
  131. package/dist/helpers/get-timeline-sequence-hash.d.ts +0 -6
  132. package/dist/helpers/get-timeline-sequence-hash.js +0 -33
@@ -1,4 +1,4 @@
1
- import type { CanUpdateSequencePropStatusKeyframed, CanUpdateSequencePropStatusStatic, InteractivitySchema, InteractivitySchemaField, SequencePropsSubscriptionKey, TSequence } from 'remotion';
1
+ import type { CanUpdateSequencePropStatus, CanUpdateSequencePropStatusKeyframed, CanUpdateSequencePropStatusStatic, InteractivitySchema, InteractivitySchemaField, SequencePropsSubscriptionKey, TSequence } from 'remotion';
2
2
  import type { SequenceNodePathInfo } from '../helpers/get-timeline-sequence-sort-key';
3
3
  import type { ComboboxValue } from './NewComposition/ComboBox';
4
4
  import type { SelectedOutlineUvHandle } from './selected-outline-uv';
@@ -7,6 +7,7 @@ export type SelectedOutlineContextMenuOpenResult = false | void | readonly Combo
7
7
  export type SelectedOutlineContextMenuOpenHandler = () => SelectedOutlineContextMenuOpenResult | Promise<SelectedOutlineContextMenuOpenResult>;
8
8
  export type SelectedOutlineTarget = {
9
9
  readonly key: string;
10
+ readonly canCrop: boolean;
10
11
  readonly containsSelection: boolean;
11
12
  readonly effectDrop: SelectedOutlineEffectDropTarget | null;
12
13
  readonly nodePathInfo: SequenceNodePathInfo;
@@ -14,12 +15,53 @@ export type SelectedOutlineTarget = {
14
15
  readonly selected: boolean;
15
16
  readonly selection: TimelineSelection;
16
17
  readonly sequence: TSequence;
18
+ readonly crop: {
19
+ readonly left: number;
20
+ readonly right: number;
21
+ readonly top: number;
22
+ readonly bottom: number;
23
+ };
24
+ readonly cropDrag: SelectedOutlineCropDragTarget | null;
17
25
  readonly drag: SelectedOutlineDragTarget | null;
18
26
  readonly scaleDrag: SelectedOutlineScaleDragTarget | null;
19
27
  readonly rotationDrag: SelectedOutlineRotationDragTarget | null;
20
28
  readonly transformOriginDrag: SelectedOutlineTransformOriginDragTarget | null;
21
29
  readonly uvHandles: readonly SelectedOutlineUvHandle[];
22
30
  };
31
+ export declare const cropFieldKeys: {
32
+ readonly left: "cropLeft";
33
+ readonly right: "cropRight";
34
+ readonly top: "cropTop";
35
+ readonly bottom: "cropBottom";
36
+ };
37
+ export type SelectedOutlineCropEdge = keyof typeof cropFieldKeys;
38
+ export type SelectedOutlineCropFieldKey = (typeof cropFieldKeys)[SelectedOutlineCropEdge];
39
+ export declare const canEditSelectedOutlineCrop: ({ schema, propStatuses, }: {
40
+ readonly schema: InteractivitySchema | null;
41
+ readonly propStatuses: Record<string, CanUpdateSequencePropStatus> | undefined;
42
+ }) => boolean;
43
+ export type SelectedOutlineCropHandle = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top' | 'right' | 'bottom' | 'left';
44
+ type CropNumberFieldSchema = Extract<InteractivitySchemaField, {
45
+ type: 'number';
46
+ }>;
47
+ export type SelectedOutlineCropField = {
48
+ readonly defaultValue: number | null | undefined;
49
+ readonly fieldSchema: CropNumberFieldSchema;
50
+ readonly propStatus: CanUpdateSequencePropStatusStatic | CanUpdateSequencePropStatusKeyframed;
51
+ readonly value: number;
52
+ };
53
+ export type SelectedOutlineCropDragTarget = {
54
+ readonly clientId: string;
55
+ readonly fields: Record<SelectedOutlineCropFieldKey, SelectedOutlineCropField>;
56
+ readonly nodePath: SequencePropsSubscriptionKey;
57
+ readonly schema: InteractivitySchema;
58
+ readonly sourceFrame: number;
59
+ readonly transformOrigin: {
60
+ readonly defaultValue: string | undefined;
61
+ readonly propStatus: CanUpdateSequencePropStatus;
62
+ readonly value: string;
63
+ } | null;
64
+ };
23
65
  export type SelectedOutlineEffectDropTarget = {
24
66
  readonly clientId: string;
25
67
  readonly fileName: string;
@@ -119,3 +161,4 @@ export type SelectedOutlineKeyboardNudgeSession = {
119
161
  deltaY: number;
120
162
  lastValues: ReadonlyMap<string, string>;
121
163
  };
164
+ export {};
@@ -1,6 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.emptyContextMenuValues = exports.outlineContainer = exports.selectedOutlineDragThresholdPx = exports.transformOriginFieldKey = exports.rotateFieldKey = exports.scaleFieldKey = exports.translateFieldKey = void 0;
3
+ exports.emptyContextMenuValues = exports.outlineContainer = exports.selectedOutlineDragThresholdPx = exports.transformOriginFieldKey = exports.rotateFieldKey = exports.scaleFieldKey = exports.translateFieldKey = exports.canEditSelectedOutlineCrop = exports.cropFieldKeys = void 0;
4
+ exports.cropFieldKeys = {
5
+ left: 'cropLeft',
6
+ right: 'cropRight',
7
+ top: 'cropTop',
8
+ bottom: 'cropBottom',
9
+ };
10
+ const canEditSelectedOutlineCrop = ({ schema, propStatuses, }) => {
11
+ for (const fieldKey of Object.values(exports.cropFieldKeys)) {
12
+ const fieldSchema = schema === null || schema === void 0 ? void 0 : schema[fieldKey];
13
+ const propStatus = propStatuses === null || propStatuses === void 0 ? void 0 : propStatuses[fieldKey];
14
+ const canEditStatus = (propStatus === null || propStatus === void 0 ? void 0 : propStatus.status) === 'static' ||
15
+ ((propStatus === null || propStatus === void 0 ? void 0 : propStatus.status) === 'keyframed' &&
16
+ propStatus.interpolationFunction === 'interpolate');
17
+ if ((fieldSchema === null || fieldSchema === void 0 ? void 0 : fieldSchema.type) !== 'number' || !canEditStatus) {
18
+ return false;
19
+ }
20
+ }
21
+ return true;
22
+ };
23
+ exports.canEditSelectedOutlineCrop = canEditSelectedOutlineCrop;
4
24
  exports.translateFieldKey = 'style.translate';
5
25
  exports.scaleFieldKey = 'style.scale';
6
26
  exports.rotateFieldKey = 'style.rotate';
@@ -4,7 +4,7 @@ exports.Overlay = exports.setErrorsRef = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
- const MenuToolbar_1 = require("../../components/MenuToolbar");
7
+ const menu_toolbar_height_1 = require("../../components/menu-toolbar-height");
8
8
  const colors_1 = require("../../helpers/colors");
9
9
  const keybindings_1 = require("../../state/keybindings");
10
10
  const ErrorLoader_1 = require("./ErrorLoader");
@@ -45,8 +45,8 @@ const Overlay = () => {
45
45
  backgroundColor: BACKGROUND_COLOR,
46
46
  overflow: 'auto',
47
47
  color: colors_1.WHITE,
48
- top: MenuToolbar_1.MENU_TOOLBAR_HEIGHT,
49
- height: `calc(100% - ${MenuToolbar_1.MENU_TOOLBAR_HEIGHT}px)`,
48
+ top: menu_toolbar_height_1.MENU_TOOLBAR_HEIGHT,
49
+ height: `calc(100% - ${menu_toolbar_height_1.MENU_TOOLBAR_HEIGHT}px)`,
50
50
  }, children: errors.errors.map((err, i) => {
51
51
  var _a;
52
52
  return (jsx_runtime_1.jsx(ErrorLoader_1.ErrorLoader
@@ -3,10 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ShortcutHint = exports.cmdOrCtrlCharacter = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
+ const is_mac_1 = require("../../helpers/is-mac");
6
7
  const use_keybinding_1 = require("../../helpers/use-keybinding");
7
- exports.cmdOrCtrlCharacter = typeof window !== 'undefined' && window.navigator.platform.startsWith('Mac')
8
- ? '⌘'
9
- : 'Ctrl';
8
+ exports.cmdOrCtrlCharacter = is_mac_1.isMac ? '' : 'Ctrl';
10
9
  const container = {
11
10
  display: 'inline-block',
12
11
  marginLeft: 6,