@remotion/studio 4.0.470 → 4.0.472

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 (112) hide show
  1. package/dist/components/AssetSelector.js +10 -1
  2. package/dist/components/Canvas.js +98 -0
  3. package/dist/components/CompositionSelectorItem.d.ts +1 -0
  4. package/dist/components/CompositionSelectorItem.js +12 -4
  5. package/dist/components/ContextMenu.d.ts +7 -2
  6. package/dist/components/ContextMenu.js +91 -43
  7. package/dist/components/Editor.js +14 -6
  8. package/dist/components/Modals.js +3 -1
  9. package/dist/components/NewComposition/CodemodFooter.js +2 -2
  10. package/dist/components/NewComposition/DeleteFolder.d.ts +6 -0
  11. package/dist/components/NewComposition/DeleteFolder.js +39 -0
  12. package/dist/components/NewComposition/RenameFolder.d.ts +6 -0
  13. package/dist/components/NewComposition/RenameFolder.js +60 -0
  14. package/dist/components/Preview.js +2 -1
  15. package/dist/components/SelectedOutlineOverlay.d.ts +109 -1
  16. package/dist/components/SelectedOutlineOverlay.js +489 -73
  17. package/dist/components/Splitter/SplitterContainer.js +9 -0
  18. package/dist/components/Splitter/SplitterHandle.js +63 -70
  19. package/dist/components/Timeline/Timeline.js +121 -1
  20. package/dist/components/Timeline/TimelineArrayField.d.ts +9 -0
  21. package/dist/components/Timeline/TimelineArrayField.js +210 -0
  22. package/dist/components/Timeline/TimelineBooleanField.d.ts +2 -2
  23. package/dist/components/Timeline/TimelineBooleanField.js +2 -2
  24. package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +20 -0
  25. package/dist/components/Timeline/TimelineClipboardKeybindings.js +265 -0
  26. package/dist/components/Timeline/TimelineColorField.d.ts +2 -2
  27. package/dist/components/Timeline/TimelineColorField.js +2 -8
  28. package/dist/components/Timeline/TimelineDeleteKeybindings.js +15 -0
  29. package/dist/components/Timeline/TimelineDragHandler.js +1 -0
  30. package/dist/components/Timeline/TimelineEffectItem.js +159 -6
  31. package/dist/components/Timeline/TimelineEffectPropItem.js +95 -25
  32. package/dist/components/Timeline/TimelineEnumField.d.ts +2 -2
  33. package/dist/components/Timeline/TimelineEnumField.js +3 -3
  34. package/dist/components/Timeline/TimelineKeyframeControls.d.ts +4 -3
  35. package/dist/components/Timeline/TimelineKeyframeControls.js +52 -33
  36. package/dist/components/Timeline/TimelineKeyframedValue.d.ts +7 -2
  37. package/dist/components/Timeline/TimelineKeyframedValue.js +22 -8
  38. package/dist/components/Timeline/TimelineLayerEye.d.ts +1 -0
  39. package/dist/components/Timeline/TimelineLayerEye.js +8 -3
  40. package/dist/components/Timeline/TimelineNumberField.d.ts +2 -2
  41. package/dist/components/Timeline/TimelineNumberField.js +7 -11
  42. package/dist/components/Timeline/TimelinePrimitiveFieldValue.d.ts +17 -0
  43. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +53 -0
  44. package/dist/components/Timeline/TimelineRotationField.d.ts +2 -2
  45. package/dist/components/Timeline/TimelineRotationField.js +41 -24
  46. package/dist/components/Timeline/TimelineRowChrome.d.ts +3 -0
  47. package/dist/components/Timeline/TimelineRowChrome.js +11 -10
  48. package/dist/components/Timeline/TimelineScaleField.d.ts +20 -0
  49. package/dist/components/Timeline/TimelineScaleField.js +314 -0
  50. package/dist/components/Timeline/TimelineSchemaField.d.ts +3 -2
  51. package/dist/components/Timeline/TimelineSchemaField.js +8 -42
  52. package/dist/components/Timeline/TimelineSelection.js +3 -2
  53. package/dist/components/Timeline/TimelineSequence.d.ts +1 -0
  54. package/dist/components/Timeline/TimelineSequence.js +51 -10
  55. package/dist/components/Timeline/TimelineSequenceFrame.js +1 -0
  56. package/dist/components/Timeline/TimelineSequenceItem.js +97 -7
  57. package/dist/components/Timeline/TimelineSequencePropItem.js +82 -21
  58. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +58 -0
  59. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +528 -0
  60. package/dist/components/Timeline/TimelineTrack.js +1 -1
  61. package/dist/components/Timeline/TimelineTranslateField.d.ts +2 -2
  62. package/dist/components/Timeline/TimelineTranslateField.js +21 -25
  63. package/dist/components/Timeline/TimelineUvCoordinateField.d.ts +2 -2
  64. package/dist/components/Timeline/TimelineUvCoordinateField.js +20 -26
  65. package/dist/components/Timeline/call-add-keyframe.js +2 -0
  66. package/dist/components/Timeline/call-delete-keyframe.d.ts +16 -0
  67. package/dist/components/Timeline/call-delete-keyframe.js +86 -14
  68. package/dist/components/Timeline/delete-selected-keyframe.d.ts +10 -0
  69. package/dist/components/Timeline/delete-selected-keyframe.js +48 -7
  70. package/dist/components/Timeline/delete-selected-timeline-item.js +6 -11
  71. package/dist/components/Timeline/get-node-keyframes.d.ts +5 -2
  72. package/dist/components/Timeline/get-node-keyframes.js +38 -5
  73. package/dist/components/Timeline/get-timeline-keyframes.js +4 -4
  74. package/dist/components/Timeline/reset-selected-timeline-props.d.ts +38 -0
  75. package/dist/components/Timeline/reset-selected-timeline-props.js +156 -0
  76. package/dist/components/Timeline/sequence-props-subscription-store.d.ts +3 -2
  77. package/dist/components/Timeline/sequence-props-subscription-store.js +2 -1
  78. package/dist/components/Timeline/timeline-field-utils.d.ts +1 -0
  79. package/dist/components/Timeline/timeline-field-utils.js +5 -1
  80. package/dist/components/Timeline/timeline-scroll-logic.js +3 -3
  81. package/dist/components/Timeline/timeline-translate-utils.js +6 -2
  82. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +7 -0
  83. package/dist/components/Timeline/use-sequence-props-subscription.js +2 -1
  84. package/dist/components/TopPanel.d.ts +1 -1
  85. package/dist/components/folder-menu-items.d.ts +12 -0
  86. package/dist/components/folder-menu-items.js +147 -0
  87. package/dist/components/import-assets.d.ts +6 -0
  88. package/dist/components/import-assets.js +157 -0
  89. package/dist/esm/{chunk-dny42qnq.js → chunk-48grt472.js} +9717 -5925
  90. package/dist/esm/internals.mjs +9717 -5925
  91. package/dist/esm/previewEntry.mjs +9531 -5737
  92. package/dist/esm/renderEntry.mjs +1 -1
  93. package/dist/helpers/calculate-timeline.js +7 -3
  94. package/dist/helpers/create-folder-tree.js +1 -0
  95. package/dist/helpers/detect-file-type.d.ts +69 -0
  96. package/dist/helpers/detect-file-type.js +278 -0
  97. package/dist/helpers/get-folder-id.d.ts +4 -0
  98. package/dist/helpers/get-folder-id.js +7 -0
  99. package/dist/helpers/get-left-of-timeline-slider.js +1 -1
  100. package/dist/helpers/get-timeline-sequence-layout.js +10 -11
  101. package/dist/helpers/get-timeline-sequence-sort-key.d.ts +2 -0
  102. package/dist/helpers/open-in-editor.d.ts +19 -1
  103. package/dist/helpers/open-in-editor.js +42 -4
  104. package/dist/helpers/timeline-layout.js +5 -1
  105. package/dist/helpers/use-menu-structure.js +0 -1
  106. package/dist/helpers/validate-folder-rename.d.ts +6 -0
  107. package/dist/helpers/validate-folder-rename.js +19 -0
  108. package/dist/state/modals.d.ts +10 -0
  109. package/dist/state/scale-lock.d.ts +18 -0
  110. package/dist/state/scale-lock.js +59 -0
  111. package/dist/state/z-index.js +5 -2
  112. package/package.json +10 -10
@@ -1,17 +1,125 @@
1
1
  import React from 'react';
2
- import { type TimelineSelection } from './Timeline/TimelineSelection';
2
+ import type { CanUpdateSequencePropStatusKeyframed, CanUpdateSequencePropStatusStatic, GetDragOverrides, OverrideIdToNodePaths, SequenceFieldSchema, SequencePropsSubscriptionKey, SequenceSchema, TSequence } from 'remotion';
3
+ import type { SequenceNodePathInfo } from '../helpers/get-timeline-sequence-sort-key';
4
+ import { type SaveSequencePropChange } from './Timeline/save-sequence-prop';
5
+ import { type TimelineSelection, type TimelineSelectionInteraction } from './Timeline/TimelineSelection';
3
6
  type OutlinePoint = {
4
7
  readonly x: number;
5
8
  readonly y: number;
6
9
  };
7
10
  type UvCoordinate = readonly [number, number];
11
+ type SelectedOutlineDragTarget = {
12
+ readonly codeValue: CanUpdateSequencePropStatusStatic | CanUpdateSequencePropStatusKeyframed;
13
+ readonly clientId: string;
14
+ readonly fieldDefault: string | undefined;
15
+ readonly keyframeDisplayOffset: number;
16
+ readonly nodePath: SequencePropsSubscriptionKey;
17
+ readonly schema: SequenceSchema;
18
+ };
19
+ type ScaleFieldSchema = Extract<SequenceFieldSchema, {
20
+ type: 'scale';
21
+ }>;
22
+ type SelectedOutlineScaleDragTarget = {
23
+ readonly codeValue: CanUpdateSequencePropStatusStatic;
24
+ readonly clientId: string;
25
+ readonly fieldDefault: number | string | undefined;
26
+ readonly fieldSchema: ScaleFieldSchema;
27
+ readonly linked: boolean;
28
+ readonly nodePath: SequencePropsSubscriptionKey;
29
+ readonly schema: SequenceSchema;
30
+ };
31
+ export type SelectedOutlineDragState = {
32
+ readonly defaultValue: string | null;
33
+ readonly key: string;
34
+ readonly sourceFrame: number;
35
+ readonly startX: number;
36
+ readonly startY: number;
37
+ readonly target: SelectedOutlineDragTarget;
38
+ };
39
+ export type SelectedOutlineScaleDragState = {
40
+ readonly defaultValue: string | null;
41
+ readonly key: string;
42
+ readonly startX: number;
43
+ readonly startY: number;
44
+ readonly startZ: number;
45
+ readonly target: SelectedOutlineScaleDragTarget;
46
+ };
47
+ type SequenceWithSelectedOutline = {
48
+ readonly depth: number;
49
+ readonly keyframeDisplayOffset: number;
50
+ readonly key: string;
51
+ readonly nodePathInfo: SequenceNodePathInfo;
52
+ readonly sequence: TSequence;
53
+ };
8
54
  export declare const getUvHandlePosition: (points: readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint], uv: UvCoordinate) => OutlinePoint;
9
55
  export declare const getUvCoordinateForPoint: (points: readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint], point: OutlinePoint) => UvCoordinate;
56
+ export declare const getOutlineSelectionInteraction: ({ shiftKey, metaKey, ctrlKey, }: {
57
+ readonly shiftKey: boolean;
58
+ readonly metaKey: boolean;
59
+ readonly ctrlKey: boolean;
60
+ }) => TimelineSelectionInteraction;
10
61
  type SelectedEffectFields = {
11
62
  allFields: boolean;
12
63
  fieldKeys: Set<string>;
13
64
  };
14
65
  export declare const getSelectedEffectFieldsBySequenceKey: (selectedItems: readonly TimelineSelection[]) => Map<string, Map<number, SelectedEffectFields>>;
66
+ export declare const getSequencesWithSelectableOutlines: ({ sequences, overrideIdsToNodePaths, }: {
67
+ readonly sequences: readonly TSequence[];
68
+ readonly overrideIdsToNodePaths: OverrideIdToNodePaths;
69
+ }) => SequenceWithSelectedOutline[];
70
+ export declare const getSelectedOutlineDragValues: ({ dragStates, deltaX, deltaY, }: {
71
+ readonly dragStates: readonly SelectedOutlineDragState[];
72
+ readonly deltaX: number;
73
+ readonly deltaY: number;
74
+ }) => Map<string, string>;
75
+ export type SelectedOutlineStaticDragChange = SaveSequencePropChange & {
76
+ readonly type: 'static';
77
+ };
78
+ export type SelectedOutlineKeyframedDragChange = {
79
+ readonly type: 'keyframed';
80
+ readonly fileName: string;
81
+ readonly nodePath: SequencePropsSubscriptionKey;
82
+ readonly fieldKey: string;
83
+ readonly sourceFrame: number;
84
+ readonly value: unknown;
85
+ readonly schema: SequenceSchema;
86
+ readonly clientId: string;
87
+ };
88
+ export type SelectedOutlineDragChange = SelectedOutlineStaticDragChange | SelectedOutlineKeyframedDragChange;
89
+ export declare const getSelectedOutlineDragChanges: ({ dragStates, lastValues, }: {
90
+ readonly dragStates: readonly SelectedOutlineDragState[];
91
+ readonly lastValues: ReadonlyMap<string, string>;
92
+ }) => SelectedOutlineDragChange[];
93
+ export type SelectedOutlineScaleEdge = 'top' | 'right' | 'bottom' | 'left';
94
+ type SelectedOutlineScaleEdgeInfo = {
95
+ readonly axis: 'x' | 'y';
96
+ readonly cursor: React.CSSProperties['cursor'];
97
+ readonly end: OutlinePoint;
98
+ readonly extent: number;
99
+ readonly normal: OutlinePoint;
100
+ readonly start: OutlinePoint;
101
+ };
102
+ export declare const getSelectedOutlineScaleEdgeInfo: (points: readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint], edge: SelectedOutlineScaleEdge) => SelectedOutlineScaleEdgeInfo | null;
103
+ export declare const getSelectedOutlineScaleDragStates: ({ dragTargets, getDragOverrides, }: {
104
+ readonly dragTargets: readonly SelectedOutlineScaleDragTarget[];
105
+ readonly getDragOverrides: GetDragOverrides;
106
+ }) => SelectedOutlineScaleDragState[];
107
+ export declare const getSelectedOutlineScaleDragValues: ({ axis, dragStates, scaleFactor, }: {
108
+ readonly axis: "x" | "y";
109
+ readonly dragStates: readonly SelectedOutlineScaleDragState[];
110
+ readonly scaleFactor: number;
111
+ }) => Map<string, string | number>;
112
+ export declare const getSelectedOutlineScaleDragChanges: ({ dragStates, lastValues, }: {
113
+ readonly dragStates: readonly SelectedOutlineScaleDragState[];
114
+ readonly lastValues: ReadonlyMap<string, string | number>;
115
+ }) => {
116
+ fileName: string;
117
+ nodePath: SequencePropsSubscriptionKey;
118
+ fieldKey: string;
119
+ value: string | number;
120
+ defaultValue: string | null;
121
+ schema: SequenceSchema;
122
+ }[];
15
123
  export declare const SelectedOutlineOverlay: React.FC<{
16
124
  readonly scale: number;
17
125
  }>;