@remotion/studio 4.0.468 → 4.0.469

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 (71) hide show
  1. package/dist/components/AudioWaveform.d.ts +1 -0
  2. package/dist/components/AudioWaveform.js +23 -22
  3. package/dist/components/CompositionSelectorItem.js +1 -1
  4. package/dist/components/ContextMenu.d.ts +1 -0
  5. package/dist/components/ContextMenu.js +3 -2
  6. package/dist/components/EditorGuides/Guide.js +1 -1
  7. package/dist/components/ExpandedTracksProvider.js +3 -8
  8. package/dist/components/Menu/MenuItem.js +2 -2
  9. package/dist/components/Menu/MenuSubItem.js +5 -5
  10. package/dist/components/PreviewToolbar.js +2 -4
  11. package/dist/components/Timeline/Timeline.js +14 -13
  12. package/dist/components/Timeline/TimelineDragHandler.js +1 -1
  13. package/dist/components/Timeline/TimelineEffectFieldRow.d.ts +2 -0
  14. package/dist/components/Timeline/TimelineEffectFieldRow.js +9 -14
  15. package/dist/components/Timeline/TimelineEffectGroupRow.js +13 -4
  16. package/dist/components/Timeline/TimelineExpandedKeyframeRow.d.ts +11 -0
  17. package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +23 -0
  18. package/dist/components/Timeline/TimelineExpandedRow.js +22 -6
  19. package/dist/components/Timeline/TimelineExpandedSection.js +2 -2
  20. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +1 -1
  21. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +9 -120
  22. package/dist/components/Timeline/TimelineFieldLabel.d.ts +6 -0
  23. package/dist/components/Timeline/TimelineFieldLabel.js +30 -0
  24. package/dist/components/Timeline/TimelineFieldRow.d.ts +3 -2
  25. package/dist/components/Timeline/TimelineFieldRow.js +7 -13
  26. package/dist/components/Timeline/TimelineItemStack.d.ts +5 -0
  27. package/dist/components/Timeline/TimelineItemStack.js +82 -0
  28. package/dist/components/Timeline/TimelineKeyframeDiamond.d.ts +7 -0
  29. package/dist/components/Timeline/TimelineKeyframeDiamond.js +87 -0
  30. package/dist/components/Timeline/TimelineLayerEye.js +1 -0
  31. package/dist/components/Timeline/TimelineList.js +13 -9
  32. package/dist/components/Timeline/TimelineListItem.d.ts +0 -1
  33. package/dist/components/Timeline/TimelineListItem.js +100 -31
  34. package/dist/components/Timeline/TimelineMediaInfo.d.ts +13 -1
  35. package/dist/components/Timeline/TimelineMediaInfo.js +33 -80
  36. package/dist/components/Timeline/TimelineRowChrome.d.ts +8 -1
  37. package/dist/components/Timeline/TimelineRowChrome.js +46 -6
  38. package/dist/components/Timeline/TimelineSchemaField.js +7 -2
  39. package/dist/components/Timeline/TimelineSelection.d.ts +41 -0
  40. package/dist/components/Timeline/TimelineSelection.js +160 -0
  41. package/dist/components/Timeline/TimelineSequence.js +1 -1
  42. package/dist/components/Timeline/TimelineSequenceName.d.ts +7 -0
  43. package/dist/components/Timeline/TimelineSequenceName.js +50 -0
  44. package/dist/components/Timeline/TimelineTrack.d.ts +5 -0
  45. package/dist/components/Timeline/TimelineTrack.js +64 -0
  46. package/dist/components/Timeline/TimelineTracks.js +2 -16
  47. package/dist/components/Timeline/TimelineUvCoordinateField.d.ts +11 -0
  48. package/dist/components/Timeline/TimelineUvCoordinateField.js +126 -0
  49. package/dist/components/Timeline/TimelineVideoInfo.js +11 -12
  50. package/dist/components/Timeline/get-node-keyframes.d.ts +11 -0
  51. package/dist/components/Timeline/get-node-keyframes.js +23 -0
  52. package/dist/components/Timeline/get-timeline-keyframes.js +6 -8
  53. package/dist/components/Timeline/timeline-field-row-layout.d.ts +1 -0
  54. package/dist/components/Timeline/timeline-field-row-layout.js +11 -1
  55. package/dist/components/Timeline/use-expanded-track-keyframe-rows.d.ts +17 -0
  56. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +45 -0
  57. package/dist/components/Timeline/use-open-sequence-in-editor.d.ts +6 -0
  58. package/dist/components/Timeline/use-open-sequence-in-editor.js +31 -0
  59. package/dist/esm/{chunk-8q828zk7.js → chunk-1mp51e0w.js} +3328 -2705
  60. package/dist/esm/internals.mjs +3328 -2705
  61. package/dist/esm/previewEntry.mjs +3338 -2715
  62. package/dist/esm/renderEntry.mjs +1 -1
  63. package/dist/helpers/colors.d.ts +1 -1
  64. package/dist/helpers/colors.js +1 -1
  65. package/dist/helpers/timeline-layout.d.ts +8 -7
  66. package/dist/helpers/timeline-layout.js +9 -8
  67. package/dist/helpers/timeline-node-path-key.d.ts +2 -0
  68. package/dist/helpers/timeline-node-path-key.js +10 -0
  69. package/package.json +10 -10
  70. package/dist/components/Timeline/TimelineStack/index.d.ts +0 -8
  71. package/dist/components/Timeline/TimelineStack/index.js +0 -119
@@ -1,2 +1,3 @@
1
1
  import type React from 'react';
2
2
  export declare const getTimelineFieldLabelRowStyle: (depth: number) => React.CSSProperties;
3
+ export declare const timelineFieldValueColumnStyle: React.CSSProperties;
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTimelineFieldLabelRowStyle = void 0;
3
+ exports.timelineFieldValueColumnStyle = exports.getTimelineFieldLabelRowStyle = void 0;
4
+ const timeline_layout_1 = require("../../helpers/timeline-layout");
4
5
  const timeline_row_layout_1 = require("./timeline-row-layout");
5
6
  const getTimelineFieldLabelRowStyle = (depth) => {
6
7
  return {
7
8
  flex: `0 0 ${(0, timeline_row_layout_1.getTimelineFieldLabelFlexBasis)(depth)}`,
9
+ minWidth: 0,
8
10
  display: 'flex',
9
11
  flexDirection: 'row',
10
12
  alignItems: 'center',
@@ -12,3 +14,11 @@ const getTimelineFieldLabelRowStyle = (depth) => {
12
14
  };
13
15
  };
14
16
  exports.getTimelineFieldLabelRowStyle = getTimelineFieldLabelRowStyle;
17
+ exports.timelineFieldValueColumnStyle = {
18
+ alignItems: 'center',
19
+ alignSelf: 'stretch',
20
+ display: 'flex',
21
+ flex: 1,
22
+ minWidth: 0,
23
+ paddingRight: timeline_layout_1.EXPANDED_SECTION_PADDING_RIGHT,
24
+ };
@@ -0,0 +1,17 @@
1
+ import { type TSequence } from 'remotion';
2
+ import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
3
+ import type { getTimelineKeyframes } from './get-timeline-keyframes';
4
+ export type ExpandedTrackKeyframeRow = {
5
+ readonly height: number;
6
+ readonly keyframes: ReturnType<typeof getTimelineKeyframes>;
7
+ readonly nodePathInfo: SequenceNodePathInfo;
8
+ readonly rowKey: string;
9
+ };
10
+ export declare const useExpandedTrackKeyframeRows: ({ sequence, nodePathInfo, keyframeDisplayOffset, }: {
11
+ sequence: TSequence;
12
+ nodePathInfo: SequenceNodePathInfo;
13
+ keyframeDisplayOffset: number;
14
+ }) => {
15
+ readonly rows: ExpandedTrackKeyframeRow[];
16
+ readonly expandedHeight: number;
17
+ };
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useExpandedTrackKeyframeRows = void 0;
4
+ const react_1 = require("react");
5
+ const remotion_1 = require("remotion");
6
+ const timeline_layout_1 = require("../../helpers/timeline-layout");
7
+ const timeline_node_path_key_1 = require("../../helpers/timeline-node-path-key");
8
+ const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
9
+ const get_node_keyframes_1 = require("./get-node-keyframes");
10
+ const useExpandedTrackKeyframeRows = ({ sequence, nodePathInfo, keyframeDisplayOffset, }) => {
11
+ const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
12
+ const { codeValues } = (0, react_1.useContext)(remotion_1.Internals.VisualModeCodeValuesContext);
13
+ const tree = (0, react_1.useMemo)(() => (0, timeline_layout_1.buildTimelineTree)({
14
+ sequence,
15
+ nodePathInfo,
16
+ getDragOverrides: () => ({}),
17
+ getEffectDragOverrides: () => ({}),
18
+ codeValues,
19
+ }), [codeValues, nodePathInfo, sequence]);
20
+ const flat = (0, react_1.useMemo)(() => (0, timeline_layout_1.flattenVisibleTreeNodes)({ nodes: tree, getIsExpanded }), [tree, getIsExpanded]);
21
+ const expandedHeight = (0, react_1.useMemo)(() => (0, timeline_layout_1.getExpandedTrackHeight)({
22
+ sequence,
23
+ nodePathInfo,
24
+ getIsExpanded,
25
+ codeValues,
26
+ }), [codeValues, getIsExpanded, nodePathInfo, sequence]);
27
+ const rows = (0, react_1.useMemo)(() => flat.map(({ node }) => ({
28
+ height: (0, timeline_layout_1.getTreeRowHeight)(node),
29
+ keyframes: (0, get_node_keyframes_1.getNodeKeyframes)({
30
+ node,
31
+ nodePath: nodePathInfo.sequenceSubscriptionKey,
32
+ codeValues,
33
+ keyframeDisplayOffset,
34
+ }),
35
+ rowKey: (0, timeline_node_path_key_1.timelineNodePathInfoToKey)(node.nodePathInfo),
36
+ nodePathInfo: node.nodePathInfo,
37
+ })), [
38
+ codeValues,
39
+ flat,
40
+ keyframeDisplayOffset,
41
+ nodePathInfo.sequenceSubscriptionKey,
42
+ ]);
43
+ return { rows, expandedHeight };
44
+ };
45
+ exports.useExpandedTrackKeyframeRows = useExpandedTrackKeyframeRows;
@@ -0,0 +1,6 @@
1
+ import type { TSequence } from 'remotion';
2
+ export declare const useOpenSequenceInEditor: (sequence: TSequence) => {
3
+ canOpenInEditor: boolean;
4
+ openInEditor: () => Promise<void>;
5
+ originalLocation: import("remotion").ResolvedStackLocation | null;
6
+ };
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useOpenSequenceInEditor = void 0;
4
+ const react_1 = require("react");
5
+ const client_id_1 = require("../../helpers/client-id");
6
+ const open_in_editor_1 = require("../../helpers/open-in-editor");
7
+ const NotificationCenter_1 = require("../Notifications/NotificationCenter");
8
+ const use_resolved_stack_react_to_change_1 = require("./use-resolved-stack-react-to-change");
9
+ const useOpenSequenceInEditor = (sequence) => {
10
+ const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
11
+ const previewConnected = previewServerState.type === 'connected';
12
+ const originalLocation = (0, use_resolved_stack_react_to_change_1.useResolveStackAndReactToChange)(sequence.getStack);
13
+ const canOpenInEditor = (0, react_1.useMemo)(() => Boolean(window.remotion_editorName && previewConnected && originalLocation), [originalLocation, previewConnected]);
14
+ const openInEditor = (0, react_1.useCallback)(async () => {
15
+ if (!canOpenInEditor || !originalLocation) {
16
+ return;
17
+ }
18
+ try {
19
+ await (0, open_in_editor_1.openOriginalPositionInEditor)(originalLocation);
20
+ }
21
+ catch (err) {
22
+ (0, NotificationCenter_1.showNotification)(err.message, 2000);
23
+ }
24
+ }, [canOpenInEditor, originalLocation]);
25
+ return {
26
+ canOpenInEditor,
27
+ openInEditor,
28
+ originalLocation,
29
+ };
30
+ };
31
+ exports.useOpenSequenceInEditor = useOpenSequenceInEditor;