@remotion/studio 4.0.461 → 4.0.462

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 (38) hide show
  1. package/dist/components/ExpandedTracksProvider.js +8 -3
  2. package/dist/components/Timeline/SubscribeToNodePaths.d.ts +4 -3
  3. package/dist/components/Timeline/SubscribeToNodePaths.js +11 -1
  4. package/dist/components/Timeline/Timeline.js +1 -1
  5. package/dist/components/Timeline/TimelineColorField.d.ts +11 -0
  6. package/dist/components/Timeline/TimelineColorField.js +181 -0
  7. package/dist/components/Timeline/TimelineEffectFieldRow.d.ts +11 -0
  8. package/dist/components/Timeline/TimelineEffectFieldRow.js +177 -0
  9. package/dist/components/Timeline/TimelineExpandedRow.d.ts +3 -3
  10. package/dist/components/Timeline/TimelineExpandedRow.js +8 -1
  11. package/dist/components/Timeline/TimelineExpandedSection.d.ts +2 -2
  12. package/dist/components/Timeline/TimelineExpandedSection.js +7 -20
  13. package/dist/components/Timeline/TimelineFieldRow.d.ts +3 -3
  14. package/dist/components/Timeline/TimelineFieldRow.js +31 -25
  15. package/dist/components/Timeline/TimelineListItem.js +5 -4
  16. package/dist/components/Timeline/TimelineNumberField.js +1 -1
  17. package/dist/components/Timeline/TimelineRotationField.js +1 -1
  18. package/dist/components/Timeline/TimelineSchemaField.d.ts +8 -2
  19. package/dist/components/Timeline/TimelineSchemaField.js +20 -11
  20. package/dist/components/Timeline/TimelineTracks.js +4 -4
  21. package/dist/components/Timeline/TimelineTranslateField.js +4 -2
  22. package/dist/components/Timeline/sequence-props-subscription-store.d.ts +2 -1
  23. package/dist/components/Timeline/sequence-props-subscription-store.js +10 -4
  24. package/dist/components/Timeline/use-sequence-props-subscription.d.ts +2 -1
  25. package/dist/components/Timeline/use-sequence-props-subscription.js +3 -1
  26. package/dist/components/Timeline/use-timeline-height.js +3 -3
  27. package/dist/esm/{chunk-yzh34sp0.js → chunk-yvg1f56k.js} +4017 -3545
  28. package/dist/esm/index.mjs +20 -8
  29. package/dist/esm/internals.mjs +4017 -3545
  30. package/dist/esm/previewEntry.mjs +2755 -2294
  31. package/dist/esm/renderEntry.mjs +1 -1
  32. package/dist/helpers/calculate-timeline.js +13 -5
  33. package/dist/helpers/get-timeline-sequence-sort-key.d.ts +3 -2
  34. package/dist/helpers/timeline-layout.d.ts +9 -14
  35. package/dist/helpers/timeline-layout.js +21 -35
  36. package/dist/icons/eyedropper.d.ts +4 -0
  37. package/dist/icons/eyedropper.js +6 -0
  38. package/package.json +11 -12
@@ -207,7 +207,7 @@ var renderContent = (Root) => {
207
207
  renderToDOM(/* @__PURE__ */ jsx("div", {
208
208
  children: /* @__PURE__ */ jsx(DelayedSpinner, {})
209
209
  }));
210
- import("./chunk-yzh34sp0.js").then(({ StudioInternals }) => {
210
+ import("./chunk-yvg1f56k.js").then(({ StudioInternals }) => {
211
211
  window.remotion_isStudio = true;
212
212
  window.remotion_isReadOnlyStudio = true;
213
213
  window.remotion_inputProps = "{}";
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.calculateTimeline = void 0;
4
+ const studio_shared_1 = require("@remotion/studio-shared");
4
5
  const get_sequence_visible_range_1 = require("./get-sequence-visible-range");
5
6
  const get_timeline_nestedness_1 = require("./get-timeline-nestedness");
6
7
  const get_timeline_sequence_hash_1 = require("./get-timeline-sequence-hash");
@@ -59,7 +60,12 @@ const calculateTimeline = ({ sequences, overrideIdsToNodePaths, }) => {
59
60
  cascadedStart,
60
61
  cascadedDuration: sequence.duration,
61
62
  nodePathInfo: nodePath
62
- ? { nodePath, index: 0, numberOfSequencesWithThisNodePath: 0 }
63
+ ? {
64
+ sequenceSubscriptionKey: nodePath,
65
+ auxiliaryKeys: [],
66
+ index: 0,
67
+ numberOfSequencesWithThisNodePath: 0,
68
+ }
63
69
  : null,
64
70
  });
65
71
  }
@@ -86,13 +92,14 @@ const calculateTimeline = ({ sequences, overrideIdsToNodePaths, }) => {
86
92
  if (track.nodePathInfo === null) {
87
93
  return track;
88
94
  }
89
- const key = track.nodePathInfo.nodePath.join('.');
95
+ const key = (0, studio_shared_1.stringifySequenceSubscriptionKey)(track.nodePathInfo.sequenceSubscriptionKey);
90
96
  const index = (_a = nodePathIndexCounters.get(key)) !== null && _a !== void 0 ? _a : 0;
91
97
  nodePathIndexCounters.set(key, index + 1);
92
98
  return {
93
99
  ...track,
94
100
  nodePathInfo: {
95
- nodePath: track.nodePathInfo.nodePath,
101
+ sequenceSubscriptionKey: track.nodePathInfo.sequenceSubscriptionKey,
102
+ auxiliaryKeys: track.nodePathInfo.auxiliaryKeys,
96
103
  index,
97
104
  numberOfSequencesWithThisNodePath: 0,
98
105
  },
@@ -103,11 +110,12 @@ const calculateTimeline = ({ sequences, overrideIdsToNodePaths, }) => {
103
110
  if (track.nodePathInfo === null) {
104
111
  return track;
105
112
  }
106
- const key = track.nodePathInfo.nodePath.join('.');
113
+ const key = (0, studio_shared_1.stringifySequenceSubscriptionKey)(track.nodePathInfo.sequenceSubscriptionKey);
107
114
  return {
108
115
  ...track,
109
116
  nodePathInfo: {
110
- nodePath: track.nodePathInfo.nodePath,
117
+ sequenceSubscriptionKey: track.nodePathInfo.sequenceSubscriptionKey,
118
+ auxiliaryKeys: track.nodePathInfo.auxiliaryKeys,
111
119
  index: track.nodePathInfo.index,
112
120
  numberOfSequencesWithThisNodePath: (_a = nodePathIndexCounters.get(key)) !== null && _a !== void 0 ? _a : 0,
113
121
  },
@@ -1,6 +1,7 @@
1
- import type { SequenceNodePath, TSequence } from 'remotion';
1
+ import type { SequencePropsSubscriptionKey, TSequence } from 'remotion';
2
2
  export type SequenceNodePathInfo = {
3
- nodePath: SequenceNodePath;
3
+ sequenceSubscriptionKey: SequencePropsSubscriptionKey;
4
+ auxiliaryKeys: string[];
4
5
  index: number;
5
6
  numberOfSequencesWithThisNodePath: number;
6
7
  };
@@ -1,9 +1,9 @@
1
- import { type CodeValues, type DragOverrides, type SchemaFieldInfo, type SequenceControls } from '@remotion/studio-shared';
2
- import type { EffectDefinitionAndStack, GetCodeValues, GetDragOverrides, TSequence } from 'remotion';
1
+ import { type AnySchemaFieldInfo, type CodeValues, type DragOverrides, type EffectSchemaFieldInfo, type SchemaFieldInfo, type SequenceControls, type SequenceSchemaFieldInfo } from '@remotion/studio-shared';
2
+ import type { GetDragOverrides, TSequence } from 'remotion';
3
3
  import type { GetIsExpanded } from '../components/ExpandedTracksProvider';
4
4
  import type { SequenceNodePathInfo } from './get-timeline-sequence-sort-key';
5
- export type { CodeValues, DragOverrides, SchemaFieldInfo, SequenceControls };
6
- export { SCHEMA_FIELD_ROW_HEIGHT, UNSUPPORTED_FIELD_ROW_HEIGHT, getFieldsToShow, } from '@remotion/studio-shared';
5
+ export type { AnySchemaFieldInfo, CodeValues, DragOverrides, EffectSchemaFieldInfo, SchemaFieldInfo, SequenceControls, SequenceSchemaFieldInfo, };
6
+ export { SCHEMA_FIELD_ROW_HEIGHT, getEffectFieldsToShow, getFieldsToShow, } from '@remotion/studio-shared';
7
7
  export declare const TIMELINE_PADDING = 16;
8
8
  export declare const TIMELINE_BORDER = 1;
9
9
  export declare const TIMELINE_ITEM_BORDER_BOTTOM = 1;
@@ -13,11 +13,6 @@ export declare const EXPANDED_SECTION_PADDING_LEFT = 28;
13
13
  export declare const EXPANDED_SECTION_PADDING_RIGHT = 10;
14
14
  export type TimelineFieldOnSave = (value: unknown) => Promise<void>;
15
15
  export type TimelineFieldOnDragValueChange = (value: unknown) => void;
16
- export type EffectSchemaFieldLabel = {
17
- key: string;
18
- description: string | undefined;
19
- };
20
- export declare const getEffectSchemaLabels: (effect: EffectDefinitionAndStack<unknown>) => EffectSchemaFieldLabel[];
21
16
  export type TimelineTreeNode = {
22
17
  readonly kind: 'group';
23
18
  readonly nodePathInfo: SequenceNodePathInfo;
@@ -27,13 +22,13 @@ export type TimelineTreeNode = {
27
22
  readonly kind: 'field';
28
23
  readonly nodePathInfo: SequenceNodePathInfo;
29
24
  readonly label: string;
30
- readonly field: SchemaFieldInfo | null;
25
+ readonly field: AnySchemaFieldInfo | null;
31
26
  };
32
- export declare const buildTimelineTree: ({ sequence, nodePathInfo, getDragOverrides, getCodeValues, }: {
27
+ export declare const buildTimelineTree: ({ sequence, nodePathInfo, getDragOverrides, codeValues, }: {
33
28
  sequence: TSequence;
34
29
  nodePathInfo: SequenceNodePathInfo;
35
30
  getDragOverrides: GetDragOverrides;
36
- getCodeValues: GetCodeValues;
31
+ codeValues: CodeValues;
37
32
  }) => TimelineTreeNode[];
38
33
  export type FlatTreeRow = {
39
34
  readonly node: TimelineTreeNode;
@@ -45,11 +40,11 @@ export declare const flattenVisibleTreeNodes: ({ nodes, getIsExpanded, depth, }:
45
40
  depth?: number | undefined;
46
41
  }) => FlatTreeRow[];
47
42
  export declare const getTreeRowHeight: (node: TimelineTreeNode) => number;
48
- export declare const getExpandedTrackHeight: ({ sequence, nodePathInfo, getIsExpanded, getCodeValues, }: {
43
+ export declare const getExpandedTrackHeight: ({ sequence, nodePathInfo, getIsExpanded, codeValues, }: {
49
44
  sequence: TSequence;
50
45
  nodePathInfo: SequenceNodePathInfo;
51
46
  getIsExpanded: GetIsExpanded;
52
- getCodeValues: GetCodeValues;
47
+ codeValues: CodeValues;
53
48
  }) => number;
54
49
  export declare const TIMELINE_LAYER_HEIGHT_VIDEO = 75;
55
50
  export declare const TIMELINE_LAYER_HEIGHT_IMAGE = 50;
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTimelineLayerHeight = exports.TIMELINE_LAYER_HEIGHT_AUDIO = exports.TIMELINE_LAYER_HEIGHT_IMAGE = exports.TIMELINE_LAYER_HEIGHT_VIDEO = exports.getExpandedTrackHeight = exports.getTreeRowHeight = exports.flattenVisibleTreeNodes = exports.buildTimelineTree = exports.getEffectSchemaLabels = exports.EXPANDED_SECTION_PADDING_RIGHT = exports.EXPANDED_SECTION_PADDING_LEFT = exports.TREE_GROUP_ROW_HEIGHT = exports.TIMELINE_TRACK_EXPANDED_HEIGHT = exports.TIMELINE_ITEM_BORDER_BOTTOM = exports.TIMELINE_BORDER = exports.TIMELINE_PADDING = exports.getFieldsToShow = exports.UNSUPPORTED_FIELD_ROW_HEIGHT = exports.SCHEMA_FIELD_ROW_HEIGHT = void 0;
3
+ exports.getTimelineLayerHeight = exports.TIMELINE_LAYER_HEIGHT_AUDIO = exports.TIMELINE_LAYER_HEIGHT_IMAGE = exports.TIMELINE_LAYER_HEIGHT_VIDEO = exports.getExpandedTrackHeight = exports.getTreeRowHeight = exports.flattenVisibleTreeNodes = exports.buildTimelineTree = exports.EXPANDED_SECTION_PADDING_RIGHT = exports.EXPANDED_SECTION_PADDING_LEFT = exports.TREE_GROUP_ROW_HEIGHT = exports.TIMELINE_TRACK_EXPANDED_HEIGHT = exports.TIMELINE_ITEM_BORDER_BOTTOM = exports.TIMELINE_BORDER = exports.TIMELINE_PADDING = exports.getFieldsToShow = exports.getEffectFieldsToShow = exports.SCHEMA_FIELD_ROW_HEIGHT = void 0;
4
4
  const studio_shared_1 = require("@remotion/studio-shared");
5
- const no_react_1 = require("remotion/no-react");
6
5
  const studio_shared_2 = require("@remotion/studio-shared");
7
6
  Object.defineProperty(exports, "SCHEMA_FIELD_ROW_HEIGHT", { enumerable: true, get: function () { return studio_shared_2.SCHEMA_FIELD_ROW_HEIGHT; } });
8
- Object.defineProperty(exports, "UNSUPPORTED_FIELD_ROW_HEIGHT", { enumerable: true, get: function () { return studio_shared_2.UNSUPPORTED_FIELD_ROW_HEIGHT; } });
7
+ Object.defineProperty(exports, "getEffectFieldsToShow", { enumerable: true, get: function () { return studio_shared_2.getEffectFieldsToShow; } });
9
8
  Object.defineProperty(exports, "getFieldsToShow", { enumerable: true, get: function () { return studio_shared_2.getFieldsToShow; } });
10
9
  exports.TIMELINE_PADDING = 16;
11
10
  exports.TIMELINE_BORDER = 1;
@@ -14,57 +13,43 @@ exports.TIMELINE_TRACK_EXPANDED_HEIGHT = 100;
14
13
  exports.TREE_GROUP_ROW_HEIGHT = 22;
15
14
  exports.EXPANDED_SECTION_PADDING_LEFT = 28;
16
15
  exports.EXPANDED_SECTION_PADDING_RIGHT = 10;
17
- const getEffectSchemaLabels = (effect) => {
18
- if (!effect.definition.schema) {
19
- return [];
20
- }
21
- return Object.entries(effect.definition.schema)
22
- .map(([key, fieldSchema]) => {
23
- if (fieldSchema.type === 'hidden') {
24
- return null;
25
- }
26
- return {
27
- key,
28
- description: fieldSchema.description,
29
- };
30
- })
31
- .filter(no_react_1.NoReactInternals.truthy);
32
- };
33
- exports.getEffectSchemaLabels = getEffectSchemaLabels;
34
- const buildTimelineTree = ({ sequence, nodePathInfo, getDragOverrides, getCodeValues, }) => {
16
+ const buildTimelineTree = ({ sequence, nodePathInfo, getDragOverrides, codeValues, }) => {
35
17
  var _a;
36
18
  const roots = [];
37
- const { nodePath, index } = nodePathInfo;
19
+ const { sequenceSubscriptionKey, index, auxiliaryKeys } = nodePathInfo;
38
20
  if (sequence.effects.length > 0) {
39
21
  roots.push({
40
22
  kind: 'group',
41
23
  nodePathInfo: {
42
- nodePath: [...nodePath, 'effects'],
24
+ sequenceSubscriptionKey,
25
+ auxiliaryKeys: [...auxiliaryKeys, 'effects'],
43
26
  index,
44
27
  numberOfSequencesWithThisNodePath: 0,
45
28
  },
46
29
  label: 'Effects',
47
30
  children: sequence.effects.map((effect, i) => {
48
- const effectNodePath = [...nodePath, 'effects', i];
31
+ const effectFields = (0, studio_shared_1.getEffectFieldsToShow)(effect, i);
49
32
  return {
50
33
  kind: 'group',
51
34
  nodePathInfo: {
52
- nodePath: effectNodePath,
35
+ sequenceSubscriptionKey,
36
+ auxiliaryKeys: [...auxiliaryKeys, 'effects', i.toString()],
53
37
  index,
54
38
  numberOfSequencesWithThisNodePath: 0,
55
39
  },
56
- label: effect.definition.label,
57
- children: (0, exports.getEffectSchemaLabels)(effect).map((label) => {
40
+ label: effect.label,
41
+ children: effectFields.map((f) => {
58
42
  var _a;
59
43
  return ({
60
44
  kind: 'field',
61
45
  nodePathInfo: {
62
- nodePath: [...effectNodePath, label.key],
46
+ sequenceSubscriptionKey,
47
+ auxiliaryKeys: [...auxiliaryKeys, f.key],
63
48
  index,
64
49
  numberOfSequencesWithThisNodePath: 0,
65
50
  },
66
- label: (_a = label.description) !== null && _a !== void 0 ? _a : label.key,
67
- field: null,
51
+ label: (_a = f.description) !== null && _a !== void 0 ? _a : f.key,
52
+ field: f,
68
53
  });
69
54
  }),
70
55
  };
@@ -75,15 +60,16 @@ const buildTimelineTree = ({ sequence, nodePathInfo, getDragOverrides, getCodeVa
75
60
  schema: sequence.controls.schema,
76
61
  currentRuntimeValueDotNotation: sequence.controls.currentRuntimeValueDotNotation,
77
62
  getDragOverrides,
78
- getCodeValues,
79
- nodePath,
63
+ codeValues,
64
+ nodePath: sequenceSubscriptionKey,
80
65
  });
81
66
  if (controlFields && controlFields.length > 0) {
82
67
  for (const f of controlFields) {
83
68
  roots.push({
84
69
  kind: 'field',
85
70
  nodePathInfo: {
86
- nodePath: [...nodePath, 'controls', f.key],
71
+ sequenceSubscriptionKey,
72
+ auxiliaryKeys: [...auxiliaryKeys, 'controls', f.key],
87
73
  index,
88
74
  numberOfSequencesWithThisNodePath: 0,
89
75
  },
@@ -117,13 +103,13 @@ const getTreeRowHeight = (node) => {
117
103
  return exports.TREE_GROUP_ROW_HEIGHT;
118
104
  };
119
105
  exports.getTreeRowHeight = getTreeRowHeight;
120
- const getExpandedTrackHeight = ({ sequence, nodePathInfo, getIsExpanded, getCodeValues, }) => {
106
+ const getExpandedTrackHeight = ({ sequence, nodePathInfo, getIsExpanded, codeValues, }) => {
121
107
  const tree = (0, exports.buildTimelineTree)({
122
108
  sequence,
123
109
  nodePathInfo,
124
110
  // We assume that no drag overrides can change the timeline layout
125
111
  getDragOverrides: () => ({}),
126
- getCodeValues,
112
+ codeValues,
127
113
  });
128
114
  const flat = (0, exports.flattenVisibleTreeNodes)({ nodes: tree, getIsExpanded });
129
115
  if (flat.length === 0) {
@@ -0,0 +1,4 @@
1
+ import type { SVGProps } from 'react';
2
+ export declare const EyedropperIcon: React.FC<SVGProps<SVGSVGElement> & {
3
+ color?: string;
4
+ }>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EyedropperIcon = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const EyedropperIcon = ({ color, ...props }) => (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 640 640", ...props, children: jsx_runtime_1.jsx("path", { fill: color !== null && color !== void 0 ? color : 'currentColor', d: "M263 233C278.6 248.6 315.3 285.3 373.1 343.1C400.1 370.1 414 384 415 385C424.4 394.4 439.6 394.4 448.9 385C458.2 375.6 458.3 360.4 448.9 351.1L440.9 343.1C457.3 326.7 492.4 291.6 546.1 237.9C565.2 218.8 575.9 192.9 575.9 165.9C575.9 109.7 530.3 64.1 474.1 64.1C447.1 64.1 421.2 74.8 402.1 93.9C348.4 147.6 313.3 182.7 296.9 199.1L288.9 191.1C279.5 181.7 264.3 181.7 255 191.1C245.7 200.5 245.6 215.7 255 225L255 225L263 233zM512.2 203.9L407 309.1L330.9 233L436.1 127.8C446.2 117.7 459.9 112 474.2 112C503.9 112 528 136.1 528 165.8C528 180.1 522.3 193.8 512.2 203.9zM117.1 393C103.6 406.5 96 424.8 96 443.9L96 496.8L68 538.8C61.7 548.3 62.9 561 71 569.1C79.1 577.2 91.8 578.4 101.3 572.1L143.3 544.1L196.2 544.1C215.3 544.1 233.6 536.5 247.1 523L366.1 404L332.2 370.1L213.2 489.1C208.7 493.6 202.6 496.1 196.2 496.1L144.1 496.1L144.1 444C144.1 437.6 146.6 431.5 151.1 427L270.1 308L236.2 274.1L117.2 393.1z" }) }));
6
+ exports.EyedropperIcon = EyedropperIcon;
package/package.json CHANGED
@@ -3,10 +3,9 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/studio"
4
4
  },
5
5
  "name": "@remotion/studio",
6
- "version": "4.0.461",
6
+ "version": "4.0.462",
7
7
  "description": "APIs for interacting with the Remotion Studio",
8
8
  "main": "dist",
9
- "sideEffects": false,
10
9
  "scripts": {
11
10
  "lint": "eslint src",
12
11
  "make": "tsgo -d && bun --env-file=../.env.bundle bundle.ts",
@@ -26,16 +25,16 @@
26
25
  },
27
26
  "dependencies": {
28
27
  "semver": "7.5.3",
29
- "remotion": "4.0.461",
30
- "@remotion/player": "4.0.461",
31
- "@remotion/media-utils": "4.0.461",
32
- "@remotion/renderer": "4.0.461",
33
- "@remotion/web-renderer": "4.0.461",
34
- "@remotion/studio-shared": "4.0.461",
35
- "@remotion/timeline-utils": "4.0.461",
36
- "@remotion/zod-types": "4.0.461",
28
+ "remotion": "4.0.462",
29
+ "@remotion/player": "4.0.462",
30
+ "@remotion/media-utils": "4.0.462",
31
+ "@remotion/renderer": "4.0.462",
32
+ "@remotion/web-renderer": "4.0.462",
33
+ "@remotion/studio-shared": "4.0.462",
34
+ "@remotion/timeline-utils": "4.0.462",
35
+ "@remotion/zod-types": "4.0.462",
37
36
  "@jridgewell/trace-mapping": "0.3.31",
38
- "mediabunny": "1.42.0",
37
+ "mediabunny": "1.45.0",
39
38
  "memfs": "3.4.3",
40
39
  "open": "8.4.2",
41
40
  "zod": "4.3.6"
@@ -44,7 +43,7 @@
44
43
  "react": "19.2.3",
45
44
  "react-dom": "19.2.3",
46
45
  "@types/semver": "7.5.3",
47
- "@remotion/eslint-config-internal": "4.0.461",
46
+ "@remotion/eslint-config-internal": "4.0.462",
48
47
  "eslint": "9.19.0",
49
48
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
50
49
  },