@remotion/studio-server 4.0.533 → 4.0.534

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 (42) hide show
  1. package/dist/detect-outdated-remotion-skills.d.ts +4 -0
  2. package/dist/detect-outdated-remotion-skills.js +3 -2
  3. package/dist/helpers/coding-agent-registry.d.ts +1 -0
  4. package/dist/helpers/coding-agent-registry.js +22 -1
  5. package/dist/helpers/editor-registry.d.ts +1 -0
  6. package/dist/helpers/editor-registry.js +24 -1
  7. package/dist/helpers/open-in-editor.d.ts +1 -1
  8. package/dist/helpers/open-in-editor.js +65 -83
  9. package/dist/helpers/running-processes.d.ts +12 -0
  10. package/dist/helpers/running-processes.js +88 -0
  11. package/dist/helpers/video-config-numeric-expression.js +29 -20
  12. package/dist/helpers/video-config-values.d.ts +6 -3
  13. package/dist/helpers/video-config-values.js +42 -26
  14. package/dist/preview-server/api-routes.js +4 -0
  15. package/dist/preview-server/routes/add-sequence-keyframe.js +0 -1
  16. package/dist/preview-server/routes/can-update-effect-props.d.ts +4 -6
  17. package/dist/preview-server/routes/can-update-effect-props.js +5 -28
  18. package/dist/preview-server/routes/can-update-sequence-props.d.ts +6 -8
  19. package/dist/preview-server/routes/can-update-sequence-props.js +11 -12
  20. package/dist/preview-server/routes/default-coding-agent.js +2 -0
  21. package/dist/preview-server/routes/default-editor.js +5 -1
  22. package/dist/preview-server/routes/delete-keyframes.d.ts +2 -2
  23. package/dist/preview-server/routes/delete-keyframes.js +0 -1
  24. package/dist/preview-server/routes/insert-element.js +17 -7
  25. package/dist/preview-server/routes/install-remotion-skill.d.ts +2 -1
  26. package/dist/preview-server/routes/install-remotion-skill.js +87 -56
  27. package/dist/preview-server/routes/open-in-editor.js +1 -1
  28. package/dist/preview-server/routes/remotion-skills-info.d.ts +2 -1
  29. package/dist/preview-server/routes/remotion-skills-info.js +57 -3
  30. package/dist/preview-server/routes/save-sequence-props.js +0 -1
  31. package/dist/preview-server/routes/shared-memory-capture-support.d.ts +3 -0
  32. package/dist/preview-server/routes/shared-memory-capture-support.js +13 -0
  33. package/dist/preview-server/routes/subscribe-to-sequence-props.js +1 -2
  34. package/dist/preview-server/routes/unsubscribe-from-sequence-props.js +0 -1
  35. package/dist/preview-server/routes/update-sequence-keyframe-settings.js +0 -1
  36. package/dist/preview-server/routes/wrap-node.js +13 -4
  37. package/dist/preview-server/sequence-props-watchers.d.ts +3 -5
  38. package/dist/preview-server/sequence-props-watchers.js +9 -17
  39. package/dist/preview-server/update-available.js +17 -0
  40. package/dist/routes.js +3 -1
  41. package/dist/start-studio.js +7 -3
  42. package/package.json +8 -8
@@ -33,24 +33,14 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.getVideoConfigIdentifierValues = void 0;
36
+ exports.getVideoConfigIdentifierValues = exports.getVideoConfigIdentifiers = void 0;
37
37
  const recast = __importStar(require("recast"));
38
- const getVideoConfigIdentifierValues = ({ ast, videoConfigValues, }) => {
38
+ const getVideoConfigIdentifiers = ({ ast, }) => {
39
39
  const candidates = new Map();
40
- const otherDeclarations = new Set();
41
- const addCandidate = (identifier, value) => {
42
- if (candidates.has(identifier) || otherDeclarations.has(identifier)) {
43
- candidates.delete(identifier);
44
- otherDeclarations.add(identifier);
45
- return;
46
- }
47
- candidates.set(identifier, value);
48
- };
49
40
  recast.types.visit(ast, {
50
41
  visitVariableDeclarator(path) {
51
42
  const { id, init } = path.node;
52
- const isVideoConfigDeclaration = videoConfigValues !== null &&
53
- id.type === 'ObjectPattern' &&
43
+ const isVideoConfigDeclaration = id.type === 'ObjectPattern' &&
54
44
  (init === null || init === void 0 ? void 0 : init.type) === 'CallExpression' &&
55
45
  init.callee.type === 'Identifier' &&
56
46
  init.callee.name === 'useVideoConfig' &&
@@ -67,13 +57,16 @@ const getVideoConfigIdentifierValues = ({ ast, videoConfigValues, }) => {
67
57
  : property.key.type === 'StringLiteral'
68
58
  ? property.key.value
69
59
  : null;
70
- if (configKey === null || !(configKey in videoConfigValues)) {
60
+ if (configKey !== 'durationInFrames' &&
61
+ configKey !== 'fps' &&
62
+ configKey !== 'width' &&
63
+ configKey !== 'height') {
71
64
  continue;
72
65
  }
73
- const value = videoConfigValues[configKey];
74
- if (Number.isFinite(value)) {
75
- addCandidate(property.value.name, value);
76
- }
66
+ candidates.set(property.value, {
67
+ type: 'video-config',
68
+ field: configKey,
69
+ });
77
70
  }
78
71
  }
79
72
  else if (id.type === 'Identifier') {
@@ -85,19 +78,42 @@ const getVideoConfigIdentifierValues = ({ ast, videoConfigValues, }) => {
85
78
  ? init.value
86
79
  : null;
87
80
  if (numericConstant !== null) {
88
- addCandidate(id.name, numericConstant);
81
+ candidates.set(id, {
82
+ type: 'constant',
83
+ value: numericConstant,
84
+ });
89
85
  }
90
- else {
91
- candidates.delete(id.name);
92
- otherDeclarations.add(id.name);
86
+ }
87
+ this.traverse(path);
88
+ },
89
+ });
90
+ // Resolve each reference to its declaration. Components may independently
91
+ // declare the same name, while parameters and other shadowing stay computed.
92
+ const bindings = new Map();
93
+ recast.types.visit(ast, {
94
+ visitIdentifier(path) {
95
+ var _a;
96
+ var _b;
97
+ const declarations = (_b = (_a = path.scope.lookup(path.node.name)) === null || _a === void 0 ? void 0 : _a.getBindings()[path.node.name]) !== null && _b !== void 0 ? _b : [];
98
+ if (declarations.length === 1) {
99
+ const binding = candidates.get(declarations[0].node);
100
+ if (binding !== undefined) {
101
+ bindings.set(path.node, binding);
93
102
  }
94
103
  }
95
104
  this.traverse(path);
96
105
  },
97
106
  });
98
- for (const identifier of otherDeclarations) {
99
- candidates.delete(identifier);
100
- }
101
- return Object.fromEntries(candidates);
107
+ return bindings;
102
108
  };
109
+ exports.getVideoConfigIdentifiers = getVideoConfigIdentifiers;
110
+ // Editing uses the current instance's configuration supplied with the mutation.
111
+ const getVideoConfigIdentifierValues = ({ ast, videoConfigValues, }) => new Map([...(0, exports.getVideoConfigIdentifiers)({ ast })].flatMap(([identifier, binding]) => {
112
+ if (binding.type === 'constant')
113
+ return [[identifier, binding]];
114
+ const value = videoConfigValues === null || videoConfigValues === void 0 ? void 0 : videoConfigValues[binding.field];
115
+ return value === undefined || !Number.isFinite(value)
116
+ ? []
117
+ : [[identifier, { type: 'constant', value }]];
118
+ }));
103
119
  exports.getVideoConfigIdentifierValues = getVideoConfigIdentifierValues;
@@ -58,6 +58,7 @@ const restart_studio_1 = require("./routes/restart-studio");
58
58
  const save_effect_props_1 = require("./routes/save-effect-props");
59
59
  const save_multiple_effect_props_1 = require("./routes/save-multiple-effect-props");
60
60
  const save_sequence_props_1 = require("./routes/save-sequence-props");
61
+ const shared_memory_capture_support_1 = require("./routes/shared-memory-capture-support");
61
62
  const shutdown_studio_1 = require("./routes/shutdown-studio");
62
63
  const split_sequences_1 = require("./routes/split-sequences");
63
64
  const split_video_from_audio_1 = require("./routes/split-video-from-audio");
@@ -79,6 +80,7 @@ const update_sequence_keyframe_settings_1 = require("./routes/update-sequence-ke
79
80
  const upgrade_remotion_1 = require("./routes/upgrade-remotion");
80
81
  const wrap_node_1 = require("./routes/wrap-node");
81
82
  exports.allApiRoutes = {
83
+ '/api/shared-memory-capture-support': shared_memory_capture_support_1.sharedMemoryCaptureSupportHandler,
82
84
  '/api/invalidate-bundle': invalidate_bundle_1.invalidateBundleHandler,
83
85
  '/api/composition-component-info': composition_component_info_1.compositionComponentInfoHandler,
84
86
  '/api/copy-render-output-to-asset': copy_render_output_to_asset_1.copyRenderOutputToAssetHandler,
@@ -142,6 +144,8 @@ exports.allApiRoutes = {
142
144
  '/api/remotion-skills-info': remotion_skills_info_1.remotionSkillsInfoHandler,
143
145
  '/api/install-remotion-skill': install_remotion_skill_1.installRemotionSkillHandler,
144
146
  '/api/remove-remotion-skill': install_remotion_skill_1.removeRemotionSkillHandler,
147
+ '/api/upgrade-remotion-skill': install_remotion_skill_1.upgradeRemotionSkillHandler,
148
+ '/api/open-remotion-skill': remotion_skills_info_1.openRemotionSkillHandler,
145
149
  '/api/project-info': project_info_1.projectInfoHandler,
146
150
  '/api/delete-static-file': delete_static_file_1.deleteStaticFileHandler,
147
151
  '/api/rename-static-file': rename_static_file_1.renameStaticFileHandler,
@@ -83,7 +83,6 @@ const addSequenceKeyframeHandler = ({ input: { fileName, nodePath, key, frame, v
83
83
  nodePath: updatedNodePath,
84
84
  componentIdentity: null,
85
85
  effects: [],
86
- videoConfigValues: nodePath.videoConfigValues,
87
86
  });
88
87
  const updatedSubscriptionKey = { ...nodePath, nodePath: updatedNodePath };
89
88
  return {
@@ -1,5 +1,5 @@
1
1
  import type { File, JSXOpeningElement } from '@babel/types';
2
- import type { CanUpdateEffectPropsResponse, SequenceNodePath, InteractivitySchema, VideoConfigValues } from 'remotion';
2
+ import type { CanUpdateEffectPropsResponse, SequenceNodePath, InteractivitySchema } from 'remotion';
3
3
  import { type VideoConfigIdentifierValues } from '../../helpers/video-config-values';
4
4
  export declare const computeEffectPropStatus: ({ ast, jsx, effectIndex, keys, videoConfigValues, }: {
5
5
  ast: File;
@@ -8,18 +8,16 @@ export declare const computeEffectPropStatus: ({ ast, jsx, effectIndex, keys, vi
8
8
  keys: string[];
9
9
  videoConfigValues: VideoConfigIdentifierValues;
10
10
  }) => CanUpdateEffectPropsResponse;
11
- export declare const computeEffectPropsStatusesFromContent: ({ fileContents, sequenceNodePath, effects, keysFor, videoConfigValues, }: {
11
+ export declare const computeEffectPropsStatusesFromContent: ({ fileContents, sequenceNodePath, effects, keysFor, }: {
12
12
  fileContents: string;
13
13
  sequenceNodePath: SequenceNodePath;
14
14
  effects: InteractivitySchema[];
15
15
  keysFor: (effect: InteractivitySchema) => string[];
16
- videoConfigValues: VideoConfigValues | null;
17
- }) => CanUpdateEffectPropsResponse[];
18
- export declare const computeEffectPropsStatusesFromFile: ({ fileName, sequenceNodePath, effects, keysFor, remotionRoot, videoConfigValues, }: {
16
+ }) => CanUpdateEffectPropsResponse<import("remotion").SourceNumericValue>[];
17
+ export declare const computeEffectPropsStatusesFromFile: ({ fileName, sequenceNodePath, effects, keysFor, remotionRoot, }: {
19
18
  fileName: string;
20
19
  sequenceNodePath: SequenceNodePath;
21
20
  effects: InteractivitySchema[];
22
21
  keysFor: (effect: InteractivitySchema) => string[];
23
22
  remotionRoot: string;
24
- videoConfigValues: VideoConfigValues | null;
25
23
  }) => CanUpdateEffectPropsResponse[];
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.computeEffectPropsStatusesFromFile = exports.computeEffectPropsStatusesFromContent = exports.computeEffectPropStatus = void 0;
4
4
  const node_fs_1 = require("node:fs");
5
- const parse_ast_1 = require("../../codemods/parse-ast");
5
+ const codemods_1 = require("@remotion/codemods");
6
+ const no_react_1 = require("remotion/no-react");
6
7
  const update_effect_props_1 = require("../../codemods/update-effect-props/update-effect-props");
7
8
  const resolve_file_inside_project_1 = require("../../helpers/resolve-file-inside-project");
8
9
  const video_config_numeric_expression_1 = require("../../helpers/video-config-numeric-expression");
9
- const video_config_values_1 = require("../../helpers/video-config-values");
10
10
  const can_update_sequence_props_1 = require("./can-update-sequence-props");
11
11
  const staticStatus = (codeValue) => ({
12
12
  status: 'static',
@@ -112,7 +112,7 @@ const getPropsFromObjectExpression = ({ ast, objExpr, keys, videoConfigValues, }
112
112
  ? {
113
113
  status: 'static',
114
114
  keyframeDisplayOffsetAdjustment: null,
115
- codeValue: numericExpression.value,
115
+ codeValue: no_react_1.NoReactInternals.evaluateSourceNumericValue(numericExpression, null),
116
116
  ...(numericExpression.type === 'literal'
117
117
  ? {}
118
118
  : { numericExpression }),
@@ -195,30 +195,8 @@ const computeEffectPropStatus = ({ ast, jsx, effectIndex, keys, videoConfigValue
195
195
  };
196
196
  };
197
197
  exports.computeEffectPropStatus = computeEffectPropStatus;
198
- const computeEffectPropsStatusesFromContent = ({ fileContents, sequenceNodePath, effects, keysFor, videoConfigValues, }) => {
199
- const ast = (0, parse_ast_1.parseAst)(fileContents);
200
- const videoConfigIdentifierValues = (0, video_config_values_1.getVideoConfigIdentifierValues)({
201
- ast,
202
- videoConfigValues,
203
- });
204
- const jsx = (0, can_update_sequence_props_1.findJsxElementAtNodePath)(ast, sequenceNodePath);
205
- if (!jsx) {
206
- return effects.map((_effect, effectIndex) => ({
207
- canUpdate: false,
208
- effectIndex,
209
- reason: 'not-found',
210
- }));
211
- }
212
- return effects.map((effect, effectIndex) => (0, exports.computeEffectPropStatus)({
213
- ast,
214
- jsx,
215
- effectIndex,
216
- keys: keysFor(effect),
217
- videoConfigValues: videoConfigIdentifierValues,
218
- }));
219
- };
220
- exports.computeEffectPropsStatusesFromContent = computeEffectPropsStatusesFromContent;
221
- const computeEffectPropsStatusesFromFile = ({ fileName, sequenceNodePath, effects, keysFor, remotionRoot, videoConfigValues, }) => {
198
+ ({ computeEffectPropsStatusesFromContent: exports.computeEffectPropsStatusesFromContent } = codemods_1.CodemodsInternals);
199
+ const computeEffectPropsStatusesFromFile = ({ fileName, sequenceNodePath, effects, keysFor, remotionRoot, }) => {
222
200
  const { absolutePath } = (0, resolve_file_inside_project_1.resolveFileInsideProject)({
223
201
  remotionRoot,
224
202
  fileName,
@@ -230,7 +208,6 @@ const computeEffectPropsStatusesFromFile = ({ fileName, sequenceNodePath, effect
230
208
  sequenceNodePath,
231
209
  effects,
232
210
  keysFor,
233
- videoConfigValues,
234
211
  });
235
212
  };
236
213
  exports.computeEffectPropsStatusesFromFile = computeEffectPropsStatusesFromFile;
@@ -1,13 +1,14 @@
1
1
  import type { Expression, File, JSXElement, JSXOpeningElement } from '@babel/types';
2
2
  import type { SubscribeToSequencePropsResponse } from '@remotion/studio-shared';
3
- import type { CanUpdateSequencePropsResponseTrue, CanUpdateSequencePropStatus, SequenceNodePath, VideoConfigValues } from 'remotion';
3
+ import type { CanUpdateSequencePropsResponseTrue, CanUpdateSequencePropStatus, SequenceNodePath } from 'remotion';
4
4
  import { type VideoConfigIdentifierValues } from '../../helpers/video-config-values';
5
+ type CanUpdatePropStatus = CanUpdateSequencePropStatus;
5
6
  type StaticValueOptions = {
6
7
  allowSpecialValues: boolean;
7
8
  };
8
9
  export declare const isStaticValue: (node: Expression, options?: StaticValueOptions) => boolean;
9
10
  export declare const extractStaticValue: (node: Expression, options?: StaticValueOptions) => unknown;
10
- export declare const getComputedStatus: (node: Expression, ast: File, videoConfigValues: VideoConfigIdentifierValues) => CanUpdateSequencePropStatus;
11
+ export declare const getComputedStatus: (node: Expression, ast: File, videoConfigValues: VideoConfigIdentifierValues) => CanUpdatePropStatus;
11
12
  export declare const getNodePathForRecastPath: (recastPath: any, ast: File) => SequenceNodePath;
12
13
  export declare const findJsxElementPathAtNodePath: (ast: File, nodePath: SequenceNodePath) => import("ast-types/lib/node-path").NodePath<N, V> | null;
13
14
  export declare const findJsxElementAtNodePath: (ast: File, nodePath: SequenceNodePath) => JSXOpeningElement | null;
@@ -40,16 +41,15 @@ export declare const resolveSequencePropsNodePathsFromFilename: ({ fileName, tar
40
41
  }[];
41
42
  remotionRoot: string;
42
43
  }) => (SequenceNodePath | null)[];
43
- export declare const computeSequencePropsStatusFromContent: ({ fileContents, nodePath, componentIdentity, keys, assetKeys, effects, videoConfigValues, }: {
44
+ export declare const computeSequencePropsStatusFromContent: ({ fileContents, nodePath, componentIdentity, keys, assetKeys, effects, }: {
44
45
  fileContents: string;
45
46
  nodePath: SequenceNodePath;
46
47
  componentIdentity: string | null;
47
48
  keys: string[];
48
49
  assetKeys?: string[] | undefined;
49
50
  effects: string[][];
50
- videoConfigValues: VideoConfigValues | null;
51
51
  }) => CanUpdateSequencePropsResponseTrue;
52
- export declare const computeSequencePropsStatus: ({ fileName, nodePath, componentIdentity, keys, assetKeys, effects, remotionRoot, videoConfigValues, }: {
52
+ export declare const computeSequencePropsStatus: ({ fileName, nodePath, componentIdentity, keys, assetKeys, effects, remotionRoot, }: {
53
53
  fileName: string;
54
54
  nodePath: SequenceNodePath;
55
55
  componentIdentity: string | null;
@@ -57,9 +57,8 @@ export declare const computeSequencePropsStatus: ({ fileName, nodePath, componen
57
57
  assetKeys?: string[] | undefined;
58
58
  effects: string[][];
59
59
  remotionRoot: string;
60
- videoConfigValues: VideoConfigValues | null;
61
60
  }) => CanUpdateSequencePropsResponseTrue;
62
- export declare const computeSequencePropsStatusFromFilenameByLocation: ({ fileName, line, column, componentIdentity, keys, assetKeys, effects, remotionRoot, logLevel, videoConfigValues, }: {
61
+ export declare const computeSequencePropsStatusFromFilenameByLocation: ({ fileName, line, column, componentIdentity, keys, assetKeys, effects, remotionRoot, logLevel, }: {
63
62
  fileName: string;
64
63
  line: number;
65
64
  column: number;
@@ -69,6 +68,5 @@ export declare const computeSequencePropsStatusFromFilenameByLocation: ({ fileNa
69
68
  effects: string[][];
70
69
  remotionRoot: string;
71
70
  logLevel: "error" | "info" | "trace" | "verbose" | "warn";
72
- videoConfigValues: VideoConfigValues;
73
71
  }) => SubscribeToSequencePropsResponse;
74
72
  export {};
@@ -439,7 +439,7 @@ const getInterpolationKeyframes = (node, ast, videoConfigValues) => {
439
439
  return undefined;
440
440
  }
441
441
  keyframes.push({
442
- frame: frameExpression.value,
442
+ frame: no_react_1.NoReactInternals.evaluateSourceNumericValue(frameExpression, null),
443
443
  value: (0, exports.extractStaticValue)(outputElement),
444
444
  ...(frameExpression.type === 'literal' ? {} : { frameExpression }),
445
445
  });
@@ -521,8 +521,7 @@ const findNodePath = (ast, target) => {
521
521
  return found;
522
522
  };
523
523
  const getJsxNumericAttribute = ({ openingElement, name, defaultValue, videoConfigValues, }) => {
524
- var _a, _b;
525
- var _c;
524
+ var _a;
526
525
  if (openingElement.attributes.some((attribute) => attribute.type === 'JSXSpreadAttribute')) {
527
526
  return null;
528
527
  }
@@ -537,10 +536,13 @@ const getJsxNumericAttribute = ({ openingElement, name, defaultValue, videoConfi
537
536
  attribute.value.expression.type === 'JSXEmptyExpression') {
538
537
  return null;
539
538
  }
540
- return ((_c = (_b = (0, video_config_numeric_expression_1.parseVideoConfigNumericExpression)({
539
+ const numericExpression = (0, video_config_numeric_expression_1.parseVideoConfigNumericExpression)({
541
540
  node: attribute.value.expression,
542
541
  videoConfigValues,
543
- })) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : null);
542
+ });
543
+ return numericExpression === null
544
+ ? null
545
+ : no_react_1.NoReactInternals.evaluateSourceNumericValue(numericExpression, null);
544
546
  }
545
547
  return defaultValue;
546
548
  };
@@ -975,7 +977,7 @@ const resolveSequencePropsNodePathsFromFilename = ({ fileName, targets, remotion
975
977
  });
976
978
  };
977
979
  exports.resolveSequencePropsNodePathsFromFilename = resolveSequencePropsNodePathsFromFilename;
978
- const computeSequencePropsStatusFromContent = ({ fileContents, nodePath, componentIdentity, keys, assetKeys = [], effects, videoConfigValues, }) => {
980
+ const computeSequencePropsStatusFromContent = ({ fileContents, nodePath, componentIdentity, keys, assetKeys = [], effects, }) => {
979
981
  try {
980
982
  return (0, codemods_1.getNodeProps)({
981
983
  project: { rootDir: '/', files: { 'source.tsx': fileContents } },
@@ -984,7 +986,6 @@ const computeSequencePropsStatusFromContent = ({ fileContents, nodePath, compone
984
986
  keys,
985
987
  assetKeys,
986
988
  effectKeys: effects,
987
- videoConfig: videoConfigValues !== null && videoConfigValues !== void 0 ? videoConfigValues : undefined,
988
989
  });
989
990
  }
990
991
  catch (error) {
@@ -998,7 +999,7 @@ const computeSequencePropsStatusFromContent = ({ fileContents, nodePath, compone
998
999
  }
999
1000
  };
1000
1001
  exports.computeSequencePropsStatusFromContent = computeSequencePropsStatusFromContent;
1001
- const computeSequencePropsStatus = ({ fileName, nodePath, componentIdentity, keys, assetKeys = [], effects, remotionRoot, videoConfigValues, }) => {
1002
+ const computeSequencePropsStatus = ({ fileName, nodePath, componentIdentity, keys, assetKeys = [], effects, remotionRoot, }) => {
1002
1003
  const { absolutePath } = (0, resolve_file_inside_project_1.resolveFileInsideProject)({
1003
1004
  remotionRoot,
1004
1005
  fileName,
@@ -1012,11 +1013,10 @@ const computeSequencePropsStatus = ({ fileName, nodePath, componentIdentity, key
1012
1013
  keys,
1013
1014
  assetKeys,
1014
1015
  effects,
1015
- videoConfigValues,
1016
1016
  });
1017
1017
  };
1018
1018
  exports.computeSequencePropsStatus = computeSequencePropsStatus;
1019
- const computeSequencePropsStatusFromFilenameByLocation = ({ fileName, line, column, componentIdentity, keys, assetKeys = [], effects, remotionRoot, logLevel, videoConfigValues, }) => {
1019
+ const computeSequencePropsStatusFromFilenameByLocation = ({ fileName, line, column, componentIdentity, keys, assetKeys = [], effects, remotionRoot, logLevel, }) => {
1020
1020
  try {
1021
1021
  const { absolutePath } = (0, resolve_file_inside_project_1.resolveFileInsideProject)({
1022
1022
  remotionRoot,
@@ -1046,14 +1046,13 @@ const computeSequencePropsStatusFromFilenameByLocation = ({ fileName, line, colu
1046
1046
  assetKeys,
1047
1047
  effects,
1048
1048
  remotionRoot,
1049
- videoConfigValues,
1050
1049
  }),
1051
1050
  nodePath: {
1052
1051
  absolutePath,
1053
1052
  nodePath: resolvedNodePath,
1054
1053
  sequenceKeys: keys,
1055
1054
  effectKeys: effects,
1056
- videoConfigValues,
1055
+ videoConfigValues: null,
1057
1056
  },
1058
1057
  success: true,
1059
1058
  };
@@ -6,10 +6,12 @@ const git_client_registry_1 = require("../../helpers/git-client-registry");
6
6
  const terminal_registry_1 = require("../../helpers/terminal-registry");
7
7
  const getDefaultCodingAgentInfoHandler = async ({ getDefaultCodingAgent }) => {
8
8
  const installedCodingAgents = await (0, coding_agent_registry_1.getAvailableCodingAgents)();
9
+ const runningCodingAgents = await (0, coding_agent_registry_1.getRunningCodingAgents)(installedCodingAgents);
9
10
  const installedTerminals = await (0, terminal_registry_1.getAvailableTerminals)();
10
11
  const installedGitClients = await (0, git_client_registry_1.getAvailableGitClients)();
11
12
  return {
12
13
  defaultCodingAgent: getDefaultCodingAgent(),
14
+ runningCodingAgents,
13
15
  installedCodingAgents: installedCodingAgents.map(({ id, name, nameWithType }) => ({
14
16
  id,
15
17
  name,
@@ -5,6 +5,7 @@ const custom_editor_1 = require("../../helpers/custom-editor");
5
5
  const editor_registry_1 = require("../../helpers/editor-registry");
6
6
  const getDefaultEditorInfoHandler = async ({ getDefaultEditor }) => {
7
7
  const installedEditors = await (0, editor_registry_1.getAvailableEditors)();
8
+ const runningEditors = await (0, editor_registry_1.getRunningEditors)(installedEditors);
8
9
  const configuredEditor = getDefaultEditor();
9
10
  const customEditor = configuredEditor &&
10
11
  typeof configuredEditor === 'object' &&
@@ -12,7 +13,10 @@ const getDefaultEditorInfoHandler = async ({ getDefaultEditor }) => {
12
13
  ? configuredEditor
13
14
  : null;
14
15
  return {
15
- defaultEditor: typeof configuredEditor === 'object' ? 'custom' : configuredEditor,
16
+ defaultEditor: configuredEditor && typeof configuredEditor === 'object'
17
+ ? 'custom'
18
+ : configuredEditor,
19
+ runningEditors,
16
20
  installedEditors: [
17
21
  ...installedEditors.map(({ id, name, nameWithType }) => ({
18
22
  id,
@@ -1,4 +1,4 @@
1
- import type { DeleteEffectKeyframe, DeleteKeyframesRequest, DeleteKeyframesResponse, DeleteSequenceKeyframe, SaveSequencePropsResult } from '@remotion/studio-shared';
1
+ import type { DeleteEffectKeyframe, DeleteKeyframesRequest, DeleteKeyframesResponse, DeleteSequenceKeyframe, SaveEffectPropsResponse, SaveSequencePropsResult } from '@remotion/studio-shared';
2
2
  import type { ApiHandler } from '../api-types';
3
3
  export declare const deleteKeyframes: ({ sequenceKeyframes, effectKeyframes, clientId, remotionRoot, logLevel, }: {
4
4
  sequenceKeyframes: DeleteSequenceKeyframe[];
@@ -8,6 +8,6 @@ export declare const deleteKeyframes: ({ sequenceKeyframes, effectKeyframes, cli
8
8
  logLevel: "error" | "info" | "trace" | "verbose" | "warn";
9
9
  }) => Promise<{
10
10
  sequenceResults: SaveSequencePropsResult[];
11
- effectResults: import("remotion").CanUpdateEffectPropsResponse[];
11
+ effectResults: SaveEffectPropsResponse[];
12
12
  }>;
13
13
  export declare const deleteKeyframesHandler: ApiHandler<DeleteKeyframesRequest, DeleteKeyframesResponse>;
@@ -239,7 +239,6 @@ const deleteKeyframes = async ({ sequenceKeyframes, effectKeyframes, clientId, r
239
239
  nodePath: keyframe.nodePath.nodePath,
240
240
  componentIdentity: null,
241
241
  effects: [],
242
- videoConfigValues: keyframe.nodePath.videoConfigValues,
243
242
  });
244
243
  return {
245
244
  fileName: keyframe.fileName,
@@ -54,7 +54,7 @@ const insertElementHandler = async ({ input: { compositionFile, compositionId, e
54
54
  }
55
55
  return (0, source_file_write_queue_1.withSourceFileWriteQueue)(async () => {
56
56
  var _a, _b, _c, _d, _e, _f;
57
- var _g, _h, _j, _k;
57
+ var _g, _h, _j;
58
58
  const createdAssets = [];
59
59
  const changedSources = [];
60
60
  let undoEntryPushed = false;
@@ -187,6 +187,13 @@ const insertElementHandler = async ({ input: { compositionFile, compositionId, e
187
187
  throw new Error('Element source file conflicts with the new composition file');
188
188
  }
189
189
  const shouldWriteElementFile = !plan.elementFileExists || elementSourcesDiffer;
190
+ const initialProps = { ...element.initialProps };
191
+ if (componentOwnsSequence && element.dimensions !== null) {
192
+ initialProps.style = {
193
+ ...element.dimensions,
194
+ ...(typeof initialProps.style === 'object' ? initialProps.style : {}),
195
+ };
196
+ }
190
197
  const insertionInput = {
191
198
  remotionRoot,
192
199
  compositionFile,
@@ -197,7 +204,10 @@ const insertElementHandler = async ({ input: { compositionFile, compositionId, e
197
204
  importName: plan.componentName,
198
205
  importPath: plan.importPath,
199
206
  props: [
200
- ...Object.entries((_h = element.initialProps) !== null && _h !== void 0 ? _h : {}).map(([name, value]) => ({ name, value })),
207
+ ...Object.entries(initialProps).map(([name, value]) => ({
208
+ name,
209
+ value,
210
+ })),
201
211
  ...(componentOwnsSequence && element.durationInFrames !== null
202
212
  ? [
203
213
  {
@@ -289,7 +299,7 @@ const insertElementHandler = async ({ input: { compositionFile, compositionId, e
289
299
  try {
290
300
  (0, node_fs_1.unlinkSync)(asset.absolutePath);
291
301
  }
292
- catch (_l) {
302
+ catch (_k) {
293
303
  // Keep the original write error.
294
304
  }
295
305
  throw error;
@@ -328,7 +338,7 @@ const insertElementHandler = async ({ input: { compositionFile, compositionId, e
328
338
  filePath: compositionCreation.registrationFilePath,
329
339
  oldContents: compositionCreation.registrationFileOldContents,
330
340
  newContents: compositionCreation.registrationFileNewContents,
331
- logLine: (_j = (_e = newComposition === null || newComposition === void 0 ? void 0 : newComposition.symbolicatedStack) === null || _e === void 0 ? void 0 : _e.originalLineNumber) !== null && _j !== void 0 ? _j : 1,
341
+ logLine: (_h = (_e = newComposition === null || newComposition === void 0 ? void 0 : newComposition.symbolicatedStack) === null || _e === void 0 ? void 0 : _e.originalLineNumber) !== null && _h !== void 0 ? _h : 1,
332
342
  nodePathRemappings: null,
333
343
  },
334
344
  ]),
@@ -397,7 +407,7 @@ const insertElementHandler = async ({ input: { compositionFile, compositionId, e
397
407
  renderer_1.RenderInternals.Log.info({ indent: false, logLevel }, `${(0, source_file_write_queue_1.getCodemodTimingPrefix)(logLevel)}${renderer_1.RenderInternals.chalk.blueBright((0, format_log_file_location_1.formatLogFileLocation)({
398
408
  remotionRoot,
399
409
  absolutePath: compositionCreation.registrationFilePath,
400
- line: (_k = (_f = newComposition.symbolicatedStack) === null || _f === void 0 ? void 0 : _f.originalLineNumber) !== null && _k !== void 0 ? _k : 1,
410
+ line: (_j = (_f = newComposition.symbolicatedStack) === null || _f === void 0 ? void 0 : _f.originalLineNumber) !== null && _j !== void 0 ? _j : 1,
401
411
  }))} Created composition "${compositionId}"`);
402
412
  }
403
413
  const compositionLocationLabel = (0, format_log_file_location_1.formatLogFileLocation)({
@@ -441,7 +451,7 @@ const insertElementHandler = async ({ input: { compositionFile, compositionId, e
441
451
  });
442
452
  }
443
453
  }
444
- catch (_m) {
454
+ catch (_l) {
445
455
  // Preserve subsequent user changes and the original installation error.
446
456
  }
447
457
  }
@@ -451,7 +461,7 @@ const insertElementHandler = async ({ input: { compositionFile, compositionId, e
451
461
  (0, node_fs_1.unlinkSync)(asset.absolutePath);
452
462
  }
453
463
  }
454
- catch (_o) {
464
+ catch (_m) {
455
465
  // Preserve subsequent user changes and the original installation error.
456
466
  }
457
467
  }
@@ -1,4 +1,5 @@
1
- import type { GetRemotionSkillsInfoResponse, InstallRemotionSkillRequest, RemoveRemotionSkillRequest } from '@remotion/studio-shared';
1
+ import type { GetRemotionSkillsInfoResponse, InstallRemotionSkillRequest, RemoveRemotionSkillRequest, UpgradeRemotionSkillRequest } from '@remotion/studio-shared';
2
2
  import type { ApiHandler } from '../api-types';
3
3
  export declare const installRemotionSkillHandler: ApiHandler<InstallRemotionSkillRequest, GetRemotionSkillsInfoResponse>;
4
4
  export declare const removeRemotionSkillHandler: ApiHandler<RemoveRemotionSkillRequest, GetRemotionSkillsInfoResponse>;
5
+ export declare const upgradeRemotionSkillHandler: ApiHandler<UpgradeRemotionSkillRequest, GetRemotionSkillsInfoResponse>;