@remotion/studio-server 4.0.536 → 4.0.538

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 (98) hide show
  1. package/dist/ansi-diff.js +3 -19
  2. package/dist/better-opn/index.d.ts +4 -2
  3. package/dist/codemods/effect-param-expression.d.ts +2 -2
  4. package/dist/codemods/get-node-path-remappings.d.ts +1 -12
  5. package/dist/codemods/get-node-path-remappings.js +1 -51
  6. package/dist/codemods/paste-effects.d.ts +2 -15
  7. package/dist/codemods/update-effect-props/update-effect-props.d.ts +2 -2
  8. package/dist/codemods/update-keyframes/update-keyframes.d.ts +3 -3
  9. package/dist/codemods/update-nested-prop.d.ts +1 -1
  10. package/dist/detect-outdated-remotion-skills.d.ts +3 -3
  11. package/dist/figma/figma-to-svg.d.ts +1 -1
  12. package/dist/file-watcher.d.ts +1 -1
  13. package/dist/helpers/coding-agent-registry.d.ts +3 -3
  14. package/dist/helpers/css-shorthand-properties.d.ts +8 -7
  15. package/dist/helpers/custom-editor.d.ts +2 -2
  16. package/dist/helpers/editor-registry.d.ts +2 -2
  17. package/dist/helpers/get-ast-node-path.d.ts +2 -1
  18. package/dist/helpers/import-agnostic-node-path.js +22 -13
  19. package/dist/helpers/open-in-app.d.ts +3 -3
  20. package/dist/helpers/open-in-editor.d.ts +2 -2
  21. package/dist/helpers/package-manager-spawn-options.d.ts +1 -1
  22. package/dist/helpers/read-source-file.d.ts +4 -0
  23. package/dist/helpers/read-source-file.js +14 -0
  24. package/dist/helpers/recently-used-apps.d.ts +2 -2
  25. package/dist/helpers/resolve-composition-component.d.ts +2 -2
  26. package/dist/helpers/resolve-editor.d.ts +3 -3
  27. package/dist/helpers/terminal-artwork.d.ts +4 -4
  28. package/dist/helpers/video-config-values.d.ts +4 -0
  29. package/dist/helpers/video-config-values.js +11 -3
  30. package/dist/index.d.ts +39 -100
  31. package/dist/index.js +1 -1
  32. package/dist/maybe-open-browser.d.ts +2 -1
  33. package/dist/preview-server/api-routes.js +2 -0
  34. package/dist/preview-server/api-types.d.ts +1 -1
  35. package/dist/preview-server/default-props-watchers.d.ts +3 -2
  36. package/dist/preview-server/default-props-watchers.js +48 -77
  37. package/dist/preview-server/dev-middleware/index.d.ts +2 -1
  38. package/dist/preview-server/dev-middleware/middleware.d.ts +1 -1
  39. package/dist/preview-server/dev-middleware/middleware.js +14 -17
  40. package/dist/preview-server/element-install-state.d.ts +1 -1
  41. package/dist/preview-server/get-package-manager.d.ts +3 -2
  42. package/dist/preview-server/handler.d.ts +4 -4
  43. package/dist/preview-server/hmr-timing.d.ts +2 -1
  44. package/dist/preview-server/hot-middleware/index.d.ts +2 -1
  45. package/dist/preview-server/jsx-component-identity.d.ts +4 -3
  46. package/dist/preview-server/live-events.d.ts +3 -2
  47. package/dist/preview-server/public-folder.js +11 -2
  48. package/dist/preview-server/routes/add-keyframes.d.ts +2 -1
  49. package/dist/preview-server/routes/app-icon.d.ts +1 -1
  50. package/dist/preview-server/routes/apply-visual-control-change.js +1 -4
  51. package/dist/preview-server/routes/batch-update-keyframe-settings.d.ts +2 -1
  52. package/dist/preview-server/routes/can-update-default-props.d.ts +11 -4
  53. package/dist/preview-server/routes/can-update-default-props.js +43 -10
  54. package/dist/preview-server/routes/can-update-effect-props.d.ts +2 -6
  55. package/dist/preview-server/routes/can-update-sequence-props.d.ts +17 -13
  56. package/dist/preview-server/routes/can-update-sequence-props.js +21 -25
  57. package/dist/preview-server/routes/delete-keyframes.d.ts +4 -6
  58. package/dist/preview-server/routes/delete-keyframes.js +4 -66
  59. package/dist/preview-server/routes/element-install-plan.d.ts +3 -3
  60. package/dist/preview-server/routes/find-in-file.d.ts +2 -9
  61. package/dist/preview-server/routes/insert-element.js +1 -4
  62. package/dist/preview-server/routes/install-dependency.d.ts +2 -14
  63. package/dist/preview-server/routes/log-updates/log-effect-update.d.ts +2 -1
  64. package/dist/preview-server/routes/log-updates/log-update.d.ts +3 -2
  65. package/dist/preview-server/routes/move-keyframes.d.ts +2 -1
  66. package/dist/preview-server/routes/open-in-editor.d.ts +2 -2
  67. package/dist/preview-server/routes/remotion-skills-info.d.ts +1 -1
  68. package/dist/preview-server/routes/save-multiple-effect-props.js +25 -8
  69. package/dist/preview-server/routes/save-sequence-props.d.ts +2 -2
  70. package/dist/preview-server/routes/source-file-write-queue.d.ts +3 -2
  71. package/dist/preview-server/routes/subscribe-to-default-props.js +2 -1
  72. package/dist/preview-server/routes/subscribe-to-sequence-props.js +55 -34
  73. package/dist/preview-server/routes/unsubscribe-from-sequence-props.d.ts +2 -2
  74. package/dist/preview-server/routes/unsubscribe-from-sequence-props.js +12 -10
  75. package/dist/preview-server/routes/unwrap-node.d.ts +3 -0
  76. package/dist/preview-server/routes/unwrap-node.js +98 -0
  77. package/dist/preview-server/routes/update-default-props.js +15 -15
  78. package/dist/preview-server/sequence-node-path-mutation.d.ts +2 -6
  79. package/dist/preview-server/sequence-props-watchers.d.ts +7 -5
  80. package/dist/preview-server/sequence-props-watchers.js +14 -4
  81. package/dist/preview-server/serve-static.d.ts +1 -1
  82. package/dist/preview-server/serve-static.js +18 -1
  83. package/dist/preview-server/start-server.d.ts +3 -3
  84. package/dist/preview-server/studio-protocol/handle-discovery.d.ts +1 -1
  85. package/dist/preview-server/studio-protocol/handle-element-library.d.ts +1 -1
  86. package/dist/preview-server/studio-protocol/handle-install.d.ts +1 -1
  87. package/dist/preview-server/studio-protocol/handle-license-key.d.ts +1 -1
  88. package/dist/preview-server/studio-protocol/origin-policy.d.ts +2 -2
  89. package/dist/preview-server/studio-protocol/protocol-response.d.ts +1 -1
  90. package/dist/preview-server/undo-stack.d.ts +4 -4
  91. package/dist/preview-server/undo-stack.js +9 -0
  92. package/dist/preview-server/update-available.d.ts +3 -2
  93. package/dist/remotion-skill-names.d.ts +1 -1
  94. package/dist/routes.d.ts +4 -4
  95. package/dist/server-ready.d.ts +2 -1
  96. package/dist/start-studio.d.ts +3 -3
  97. package/dist/studio-shortcuts.d.ts +3 -3
  98. package/package.json +10 -10
package/dist/ansi-diff.js CHANGED
@@ -5,15 +5,10 @@ const studio_shared_1 = require("@remotion/studio-shared");
5
5
  const CLEAR_LINE = Buffer.from([0x1b, 0x5b, 0x30, 0x4b]);
6
6
  const NEWLINE = Buffer.from('\n');
7
7
  class AnsiDiff {
8
- x;
9
- y;
10
- width;
11
- height;
12
- _buffer;
13
- _out;
14
- _lines;
15
- finished;
16
8
  constructor(opts) {
9
+ this._push = (buf) => {
10
+ this._out.push(buf);
11
+ };
17
12
  this.x = 0;
18
13
  this.y = 0;
19
14
  this.width = (opts === null || opts === void 0 ? void 0 : opts.width) || Infinity;
@@ -133,9 +128,6 @@ class AnsiDiff {
133
128
  this.x = x;
134
129
  this.y = y;
135
130
  }
136
- _push = (buf) => {
137
- this._out.push(buf);
138
- };
139
131
  }
140
132
  exports.AnsiDiff = AnsiDiff;
141
133
  function same(a, b) {
@@ -148,14 +140,6 @@ function top(list) {
148
140
  return list.length ? list[list.length - 1] : null;
149
141
  }
150
142
  class Line {
151
- y;
152
- width;
153
- parts;
154
- height;
155
- remainder;
156
- raw;
157
- length;
158
- newline;
159
143
  constructor(str, y, nl, term) {
160
144
  this.y = y;
161
145
  this.width = term.width;
@@ -1,6 +1,7 @@
1
+ declare const supportedChromiumBrowsers: readonly ['Google Chrome', 'Google Chrome Canary', 'Microsoft Edge', 'Brave Browser', 'Vivaldi', 'Chromium', 'Arc'];
1
2
  export declare const getChromiumBrowsersToTry: (processes: string) => ("Arc" | "Brave Browser" | "Chromium" | "Google Chrome" | "Google Chrome Canary" | "Microsoft Edge" | "Vivaldi")[];
2
- export declare const getFocusBrowserTabAppleScript: (chromiumBrowser: "Arc" | "Brave Browser" | "Chromium" | "Google Chrome" | "Google Chrome Canary" | "Microsoft Edge" | "Vivaldi") => string;
3
- export declare const getFocusBrowserTabByOriginAppleScript: (chromiumBrowser: "Arc" | "Brave Browser" | "Chromium" | "Google Chrome" | "Google Chrome Canary" | "Microsoft Edge" | "Vivaldi") => string;
3
+ export declare const getFocusBrowserTabAppleScript: (chromiumBrowser: (typeof supportedChromiumBrowsers)[number]) => string;
4
+ export declare const getFocusBrowserTabByOriginAppleScript: (chromiumBrowser: (typeof supportedChromiumBrowsers)[number]) => string;
4
5
  export declare const focusBrowserTab: ({ url }: {
5
6
  url: string;
6
7
  }) => Promise<boolean>;
@@ -14,3 +15,4 @@ export declare const openBrowser: ({ url, browserFlag, browserArgs, }: {
14
15
  browserFlag: string | undefined;
15
16
  browserArgs: string | undefined;
16
17
  }) => Promise<boolean | import("child_process").ChildProcess>;
18
+ export {};
@@ -8,8 +8,8 @@ export declare const getRequiredRemotionImports: (effects: EffectClipboardSnapsh
8
8
  export declare const ensureRemotionImportLocalNames: ({ ast, requiredImports, }: {
9
9
  ast: File;
10
10
  requiredImports: Set<RemotionImportName>;
11
- }) => Partial<Record<RemotionImportName, string>>;
11
+ }) => RemotionLocalNames;
12
12
  export declare const makeParamExpression: ({ param, remotionLocalNames, }: {
13
13
  param: EffectClipboardParam;
14
- remotionLocalNames: Partial<Record<RemotionImportName, string>>;
14
+ remotionLocalNames: RemotionLocalNames;
15
15
  }) => ExpressionKind;
@@ -1,17 +1,6 @@
1
- import type { File, JSXOpeningElement } from '@babel/types';
2
- import type { SequenceNodePathRemapping } from '@remotion/studio-shared';
1
+ import type { File } from '@babel/types';
3
2
  import type { SequenceNodePath } from 'remotion';
4
3
  export type CapturedJsxNodePath = {
5
- node: JSXOpeningElement;
6
4
  nodePath: SequenceNodePath;
7
- signature: string;
8
5
  };
9
6
  export declare const captureJsxNodePaths: (ast: File) => CapturedJsxNodePath[];
10
- export declare const getNodePathRemappings: ({ ast, captured, output, }: {
11
- ast: File;
12
- captured: CapturedJsxNodePath[];
13
- output: string;
14
- }) => {
15
- nodePathRemappings: SequenceNodePathRemapping[];
16
- finalNodePathByNode: Map<JSXOpeningElement, SequenceNodePath>;
17
- };
@@ -33,18 +33,15 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.getNodePathRemappings = exports.captureJsxNodePaths = void 0;
36
+ exports.captureJsxNodePaths = void 0;
37
37
  const recast = __importStar(require("recast"));
38
38
  const can_update_sequence_props_1 = require("../preview-server/routes/can-update-sequence-props");
39
- const parse_ast_1 = require("./parse-ast");
40
39
  const captureJsxNodePaths = (ast) => {
41
40
  const captured = [];
42
41
  recast.visit(ast, {
43
42
  visitJSXOpeningElement(path) {
44
43
  captured.push({
45
- node: path.node,
46
44
  nodePath: (0, can_update_sequence_props_1.getNodePathForRecastPath)(path, ast),
47
- signature: recast.prettyPrint(path.node).code,
48
45
  });
49
46
  return this.traverse(path);
50
47
  },
@@ -52,50 +49,3 @@ const captureJsxNodePaths = (ast) => {
52
49
  return captured;
53
50
  };
54
51
  exports.captureJsxNodePaths = captureJsxNodePaths;
55
- const getNodePathRemappings = ({ ast, captured, output, }) => {
56
- const nodesAfterMutation = [];
57
- recast.visit(ast, {
58
- visitJSXOpeningElement(path) {
59
- nodesAfterMutation.push(path.node);
60
- return this.traverse(path);
61
- },
62
- });
63
- const finalAst = (0, parse_ast_1.parseAst)(output);
64
- const finalNodePaths = [];
65
- recast.visit(finalAst, {
66
- visitJSXOpeningElement(path) {
67
- finalNodePaths.push((0, can_update_sequence_props_1.getNodePathForRecastPath)(path, finalAst));
68
- return this.traverse(path);
69
- },
70
- });
71
- if (nodesAfterMutation.length !== finalNodePaths.length) {
72
- throw new Error('Could not map JSX node paths after modifying JSX nodes');
73
- }
74
- const finalNodePathByNode = new Map();
75
- for (let i = 0; i < nodesAfterMutation.length; i++) {
76
- finalNodePathByNode.set(nodesAfterMutation[i], finalNodePaths[i]);
77
- }
78
- const capturedNodes = new Set(captured.map(({ node }) => node));
79
- const nodePathRemappings = captured.flatMap(({ node, nodePath, signature }) => {
80
- var _a;
81
- const newNodePath = (_a = finalNodePathByNode.get(node)) !== null && _a !== void 0 ? _a : null;
82
- if (newNodePath !== null &&
83
- JSON.stringify(nodePath) === JSON.stringify(newNodePath) &&
84
- recast.prettyPrint(node).code === signature) {
85
- return [];
86
- }
87
- return [{ oldNodePath: nodePath, newNodePath }];
88
- });
89
- for (const node of nodesAfterMutation) {
90
- if (capturedNodes.has(node)) {
91
- continue;
92
- }
93
- const newNodePath = finalNodePathByNode.get(node);
94
- if (!newNodePath) {
95
- throw new Error('Could not map inserted JSX node path');
96
- }
97
- nodePathRemappings.push({ oldNodePath: null, newNodePath });
98
- }
99
- return { finalNodePathByNode, nodePathRemappings };
100
- };
101
- exports.getNodePathRemappings = getNodePathRemappings;
@@ -1,18 +1,5 @@
1
- declare const pasteEffectsCodemod: ({ effects, input, insertAtIndices, prettierConfigOverride, targetSequenceNodePath, type, }: {
2
- effects: import("@remotion/studio-shared").EffectClipboardSnapshot[];
3
- input: string;
4
- insertAtIndices: number[] | null;
5
- targetSequenceNodePath: import("remotion").SequenceNodePath;
6
- type: import("@remotion/studio-shared").EffectClipboardPasteType;
7
- } & {
8
- formatFile?: import("@remotion/codemods").FormatEffectFile | undefined;
9
- prettierConfigOverride?: Record<string, unknown> | null | undefined;
10
- }) => Promise<{
11
- output: string;
12
- formatted: boolean;
13
- effectLabels: string[];
14
- logLine: number;
15
- }>;
1
+ import { CodemodsInternals } from '@remotion/codemods';
2
+ declare const { pasteEffects: pasteEffectsCodemod }: typeof CodemodsInternals;
16
3
  type PasteEffectsInput = Parameters<typeof pasteEffectsCodemod>[0] & {
17
4
  readonly targetFileName: string;
18
5
  };
@@ -1,7 +1,7 @@
1
- import { type EffectArrayElement, type EffectPropUpdate, type PropDelta, type UpdateEffectPropsResult } from '@remotion/codemods';
1
+ import { CodemodsInternals, type EffectArrayElement, type EffectPropUpdate, type PropDelta, type UpdateEffectPropsResult } from '@remotion/codemods';
2
2
  import type { InteractivitySchema, SequenceNodePath } from 'remotion';
3
3
  export type { EffectArrayElement, EffectPropUpdate, PropDelta, UpdateEffectPropsResult, };
4
- export declare const enumerateEffectArrayElements: (arr: import("@babel/types").ArrayExpression) => EffectArrayElement[];
4
+ export declare const { enumerateEffectArrayElements }: typeof CodemodsInternals;
5
5
  export declare const updateEffectProps: ({ input, sequenceNodePath, effectIndex, update, schema, }: {
6
6
  input: string;
7
7
  sequenceNodePath: SequenceNodePath;
@@ -17,7 +17,7 @@ export declare const updateSequenceKeyframes: ({ input, nodePath, videoConfigVal
17
17
  oldValueStrings: string[];
18
18
  newValueStrings: string[];
19
19
  logLine: number;
20
- updatedNodePath: SequenceNodePath;
20
+ updatedNodePath: import("remotion").SequenceNodePath;
21
21
  updatedNode: import("@remotion/codemods").NodeReference;
22
22
  output: string;
23
23
  }>;
@@ -32,10 +32,10 @@ export declare const updateEffectKeyframes: ({ input, sequenceNodePath, effectIn
32
32
  newValueStrings: string[];
33
33
  logLine: number;
34
34
  effectCallee: string;
35
- updatedSequenceNodePath: SequenceNodePath;
35
+ updatedSequenceNodePath: import("remotion").SequenceNodePath;
36
36
  updatedEffect: {
37
37
  filePath: string;
38
- nodePath: SequenceNodePath;
38
+ nodePath: import("remotion").SequenceNodePath;
39
39
  effectIndex: number;
40
40
  };
41
41
  output: string;
@@ -6,7 +6,7 @@ export declare const updateNestedProp: ({ node, parentKey, childKey, value, defa
6
6
  parentKey: string;
7
7
  childKey: string;
8
8
  value: unknown;
9
- defaultValue: unknown;
9
+ defaultValue: unknown | null;
10
10
  isDefault: boolean;
11
11
  createValueExpression: ((existing: Expression | null) => ExpressionKind) | null;
12
12
  }) => string;
@@ -27,9 +27,9 @@ export declare const getRemotionSkillsDirectories: ({ cwd, homeDirectory, }: {
27
27
  global: string;
28
28
  };
29
29
  export declare const detectOutdatedRemotionSkills: ({ currentVersion, cwd, homeDirectory, }?: {
30
- currentVersion?: string | undefined;
31
- cwd?: string | undefined;
32
- homeDirectory?: string | undefined;
30
+ currentVersion?: string;
31
+ cwd?: string;
32
+ homeDirectory?: string;
33
33
  }) => {
34
34
  project: RemotionSkillsStatus;
35
35
  global: RemotionSkillsStatus;
@@ -104,7 +104,7 @@ type VectorNetwork = {
104
104
  segments: VectorSegment[];
105
105
  regions: VectorRegion[];
106
106
  };
107
- export declare const decodeFigmaVectorNetwork: (data: Uint8Array<ArrayBufferLike>) => VectorNetwork;
107
+ export declare const decodeFigmaVectorNetwork: (data: Uint8Array) => VectorNetwork;
108
108
  export declare const renderFigmaMessageToSvg: ({ message, selectedNodeId, }: {
109
109
  message: FigmaMessage;
110
110
  selectedNodeId: string;
@@ -38,7 +38,7 @@ export type FileWatcherRegistry = {
38
38
  writeFileAndNotifyFileWatchers: (options: WriteFileAndNotifyFileWatchersOptions) => void;
39
39
  };
40
40
  export declare const createFileWatcherRegistry: () => FileWatcherRegistry;
41
- export declare const setFileWatcherRegistry: (registry: FileWatcherRegistry) => () => void;
41
+ export declare const setFileWatcherRegistry: (registry: FileWatcherRegistry) => (() => void);
42
42
  export declare const getFileWatcherRegistry: () => FileWatcherRegistry;
43
43
  export declare const installFileWatcher: FileWatcherRegistry['installFileWatcher'];
44
44
  export declare const writeFileAndNotifyFileWatchers: FileWatcherRegistry['writeFileAndNotifyFileWatchers'];
@@ -1,4 +1,4 @@
1
- import type { DefaultCodingAgent } from '@remotion/renderer';
1
+ import type { DefaultCodingAgent, LogLevel } from '@remotion/renderer';
2
2
  export type InstalledCodingAgent = {
3
3
  id: DefaultCodingAgent;
4
4
  name: string;
@@ -23,7 +23,7 @@ export type CodingAgentDiscoveryContext = {
23
23
  };
24
24
  export declare const discoverAvailableCodingAgents: (context: CodingAgentDiscoveryContext) => Promise<readonly InstalledCodingAgent[]>;
25
25
  export declare const getAvailableCodingAgents: () => Promise<readonly InstalledCodingAgent[]>;
26
- export declare const getRunningCodingAgents: (installedCodingAgents: readonly InstalledCodingAgent[]) => Promise<readonly ("claude-code" | "codex" | "copilot" | "cursor")[]>;
26
+ export declare const getRunningCodingAgents: (installedCodingAgents: readonly InstalledCodingAgent[]) => Promise<readonly DefaultCodingAgent[]>;
27
27
  export declare const getCodingAgentLaunchCommand: ({ codingAgent, projectPath, }: {
28
28
  codingAgent: InstalledCodingAgent;
29
29
  projectPath: string;
@@ -43,7 +43,7 @@ export declare const getCodingAgentLaunchCommands: ({ codingAgent, projectPath,
43
43
  export declare const launchCodingAgent: ({ codingAgent, projectPath, logLevel, prompt, }: {
44
44
  codingAgent: InstalledCodingAgent;
45
45
  projectPath: string;
46
- logLevel: "error" | "info" | "trace" | "verbose" | "warn";
46
+ logLevel: LogLevel;
47
47
  prompt: string | null;
48
48
  }) => Promise<boolean>;
49
49
  export {};
@@ -1,3 +1,4 @@
1
+ import { parseBorderRadiusShorthand } from './parse-border-radius-shorthand';
1
2
  type ParsedCssShorthand = Readonly<Record<string, string | number>>;
2
3
  export type CssShorthandProperty = {
3
4
  readonly parentKey: string;
@@ -7,22 +8,22 @@ export type CssShorthandProperty = {
7
8
  readonly isUnsupportedProperty: (propertyName: string) => boolean;
8
9
  };
9
10
  export declare const cssShorthandProperties: readonly [{
10
- readonly parentKey: "style";
11
- readonly shorthand: "background";
11
+ readonly parentKey: 'style';
12
+ readonly shorthand: 'background';
12
13
  readonly longhands: readonly ["backgroundColor", "backgroundImage", "backgroundPosition", "backgroundSize", "backgroundRepeat", "backgroundOrigin", "backgroundClip", "backgroundAttachment"];
13
14
  readonly parse: (value: unknown) => import("./parse-background-shorthand").ParsedBackgroundShorthand | null;
14
15
  readonly isUnsupportedProperty: () => false;
15
16
  }, {
16
- readonly parentKey: "style";
17
- readonly shorthand: "border";
17
+ readonly parentKey: 'style';
18
+ readonly shorthand: 'border';
18
19
  readonly longhands: readonly ["borderWidth", "borderStyle", "borderColor"];
19
20
  readonly parse: (value: unknown) => import("./parse-border-shorthand").ParsedBorderShorthand | null;
20
21
  readonly isUnsupportedProperty: (propertyName: string) => boolean;
21
22
  }, {
22
- readonly parentKey: "style";
23
- readonly shorthand: "borderRadius";
23
+ readonly parentKey: 'style';
24
+ readonly shorthand: 'borderRadius';
24
25
  readonly longhands: readonly ["borderTopLeftRadius", "borderTopRightRadius", "borderBottomRightRadius", "borderBottomLeftRadius"];
25
- readonly parse: (value: unknown) => import("./parse-border-radius-shorthand").ParsedBorderRadiusShorthand | null;
26
+ readonly parse: typeof parseBorderRadiusShorthand;
26
27
  readonly isUnsupportedProperty: (propertyName: string) => boolean;
27
28
  }];
28
29
  export declare const getCssShorthandForLonghand: ({ parentKey, longhand, }: {
@@ -1,5 +1,5 @@
1
1
  import { spawn } from 'node:child_process';
2
- import type { CustomEditor } from '@remotion/renderer';
2
+ import type { CustomEditor, LogLevel } from '@remotion/renderer';
3
3
  type CustomEditorPathType = 'file' | 'directory' | 'symbolic-link' | null;
4
4
  export type CustomEditorResolutionContext = {
5
5
  platform: NodeJS.Platform;
@@ -31,7 +31,7 @@ export declare const launchCustomEditor: ({ editor, resolvedExecutable, targetPa
31
31
  targetPath: string;
32
32
  lineNumber: number;
33
33
  columnNumber: number;
34
- logLevel: "error" | "info" | "trace" | "verbose" | "warn";
34
+ logLevel: LogLevel;
35
35
  spawnProcess: typeof spawn | null;
36
36
  }) => Promise<boolean>;
37
37
  export {};
@@ -14,7 +14,7 @@ export type EditorDiscoveryContext = {
14
14
  findMacApplications: (bundleIdentifier: string) => Promise<readonly string[]>;
15
15
  findWindowsApplications: (editor: BuiltInEditor) => Promise<readonly string[]>;
16
16
  };
17
- export declare const getDefaultEditorName: (id: "cursor" | "sublime-text" | "vscode" | "vscodium" | "webstorm" | "windsurf" | "zed") => string;
17
+ export declare const getDefaultEditorName: (id: BuiltInEditor) => string;
18
18
  export declare const discoverAvailableEditors: (context: EditorDiscoveryContext) => Promise<readonly InstalledEditor[]>;
19
19
  export declare const getAvailableEditors: () => Promise<readonly InstalledEditor[]>;
20
- export declare const getRunningEditors: (installedEditors: readonly InstalledEditor[]) => Promise<readonly ("cursor" | "sublime-text" | "vscode" | "vscodium" | "webstorm" | "windsurf" | "zed")[]>;
20
+ export declare const getRunningEditors: (installedEditors: readonly InstalledEditor[]) => Promise<readonly BuiltInEditor[]>;
@@ -1,3 +1,4 @@
1
1
  import type { File } from '@babel/types';
2
+ import * as recast from 'recast';
2
3
  import type { SequenceNodePath } from 'remotion';
3
- export declare const getAstNodePath: (ast: File, nodePath: SequenceNodePath) => import("ast-types/lib/node-path").NodePath<N, V> | null;
4
+ export declare const getAstNodePath: (ast: File, nodePath: SequenceNodePath) => recast.types.NodePath | null;
@@ -142,19 +142,28 @@ const transformNodePathIndices = ({ ast, nodePath, direction, }) => {
142
142
  transformed.push(segment);
143
143
  continue;
144
144
  }
145
- const mappedIndex = direction === 'to-agnostic'
146
- ? getAgnosticIndex({
147
- items: current,
148
- actualIndex: segment,
149
- shouldIgnore,
150
- context: arrayContext,
151
- })
152
- : getActualIndex({
153
- items: current,
154
- agnosticIndex: segment,
155
- shouldIgnore,
156
- context: arrayContext,
157
- });
145
+ // Only statement lists can contain imports, frame hooks, or font loaders.
146
+ // JSX children and other arrays keep their original indices.
147
+ const canContainIgnoredNodes = arrayContext.property === 'body' &&
148
+ (arrayContext.parent.type === 'Program' ||
149
+ arrayContext.parent.type === 'BlockStatement');
150
+ const mappedIndex = !canContainIgnoredNodes
151
+ ? Number.isInteger(segment) && segment >= 0 && segment < current.length
152
+ ? segment + 0 // Match the scanned index when the input is -0.
153
+ : null
154
+ : direction === 'to-agnostic'
155
+ ? getAgnosticIndex({
156
+ items: current,
157
+ actualIndex: segment,
158
+ shouldIgnore,
159
+ context: arrayContext,
160
+ })
161
+ : getActualIndex({
162
+ items: current,
163
+ agnosticIndex: segment,
164
+ shouldIgnore,
165
+ context: arrayContext,
166
+ });
158
167
  if (mappedIndex === null) {
159
168
  if (direction === 'from-agnostic') {
160
169
  return null;
@@ -1,13 +1,13 @@
1
- import { type DefaultEditor } from '@remotion/renderer';
1
+ import { type DefaultEditor, type LogLevel } from '@remotion/renderer';
2
2
  import type { OpenInCodingAgentRequest, OpenInCodingAgentResponse, OpenInEditorRequest, OpenInEditorResponse } from '@remotion/studio-shared';
3
3
  export declare const openInEditor: ({ input, remotionRoot, logLevel, getDefaultEditor, }: {
4
4
  input: OpenInEditorRequest;
5
5
  remotionRoot: string;
6
- logLevel: "error" | "info" | "trace" | "verbose" | "warn";
6
+ logLevel: LogLevel;
7
7
  getDefaultEditor: () => DefaultEditor | null;
8
8
  }) => Promise<OpenInEditorResponse>;
9
9
  export declare const openInCodingAgent: ({ input, logLevel, remotionRoot, }: {
10
10
  input: OpenInCodingAgentRequest;
11
- logLevel: "error" | "info" | "trace" | "verbose" | "warn";
11
+ logLevel: LogLevel;
12
12
  remotionRoot: string;
13
13
  }) => Promise<OpenInCodingAgentResponse>;
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import type { LogLevel } from '@remotion/renderer';
8
- export declare const getDisplayNameForEditor: (editor: string | null) => string | null;
8
+ export declare const getDisplayNameForEditor: (editor: Editor | null) => string | null;
9
9
  type Editor = string;
10
10
  export type ProcessAndCommand = {
11
11
  process: string;
@@ -13,7 +13,7 @@ export type ProcessAndCommand = {
13
13
  };
14
14
  export declare const findMacOsEditorsFromProcessOutput: (output: string) => ProcessAndCommand[];
15
15
  export declare function guessEditor(): Promise<ProcessAndCommand[]>;
16
- export declare function launchEditor({ colNumber, editor, fileName, lineNumber, vsCodeNewWindow, logLevel }: {
16
+ export declare function launchEditor({ colNumber, editor, fileName, lineNumber, vsCodeNewWindow, logLevel, }: {
17
17
  fileName: string;
18
18
  lineNumber: number;
19
19
  colNumber: number;
@@ -1,2 +1,2 @@
1
1
  import type { SpawnOptionsWithoutStdio } from 'node:child_process';
2
- export declare const getPackageManagerSpawnOptions: () => Pick<SpawnOptionsWithoutStdio, "shell">;
2
+ export declare const getPackageManagerSpawnOptions: () => Pick<SpawnOptionsWithoutStdio, 'shell'>;
@@ -0,0 +1,4 @@
1
+ export declare const readSourceFile: ({ absolutePath, fileContentsCache, }: {
2
+ absolutePath: string;
3
+ fileContentsCache: Map<string, string> | null;
4
+ }) => string;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.readSourceFile = void 0;
4
+ const node_fs_1 = require("node:fs");
5
+ const readSourceFile = ({ absolutePath, fileContentsCache, }) => {
6
+ const cachedContents = fileContentsCache === null || fileContentsCache === void 0 ? void 0 : fileContentsCache.get(absolutePath);
7
+ if (cachedContents !== undefined) {
8
+ return cachedContents;
9
+ }
10
+ const fileContents = (0, node_fs_1.readFileSync)(absolutePath, 'utf-8');
11
+ fileContentsCache === null || fileContentsCache === void 0 ? void 0 : fileContentsCache.set(absolutePath, fileContents);
12
+ return fileContents;
13
+ };
14
+ exports.readSourceFile = readSourceFile;
@@ -1,9 +1,9 @@
1
1
  export declare const subscribeToRecentlyUsedApps: ({ remotionRoot, onChange, }: {
2
2
  remotionRoot: string;
3
3
  onChange: () => void;
4
- }) => () => void;
4
+ }) => (() => void);
5
5
  export declare const getRecentlyUsedApps: ({ remotionRoot, type, recentlyUsedIds, }: {
6
6
  remotionRoot: string;
7
- type: "coding-agent" | "editor";
7
+ type: 'editor' | 'coding-agent';
8
8
  recentlyUsedIds: readonly string[] | null;
9
9
  }) => Promise<readonly string[]>;
@@ -24,11 +24,11 @@ export declare const insertJsxElementIntoComposition: ({ remotionRoot, compositi
24
24
  width: number;
25
25
  height: number;
26
26
  } | null;
27
- durationInFrames?: number | null | undefined;
27
+ durationInFrames?: number | null;
28
28
  from: number | null;
29
29
  name: string | null;
30
30
  position: InsertableCompositionElementPosition | null;
31
- } | null | undefined;
31
+ } | null;
32
32
  sourceFileOverrides: ReadonlyMap<string, string> | null;
33
33
  }) => Promise<{
34
34
  fileName: string;
@@ -1,4 +1,4 @@
1
- import type { BuiltInEditor, CustomEditor, DefaultEditor } from '@remotion/renderer';
1
+ import type { BuiltInEditor, CustomEditor, DefaultEditor, LogLevel } from '@remotion/renderer';
2
2
  import { type ResolvedCustomEditorExecutable } from './custom-editor';
3
3
  import type { InstalledEditor } from './editor-registry';
4
4
  import type { ProcessAndCommand } from './open-in-editor';
@@ -23,7 +23,7 @@ type ResolveEditorDependencies = {
23
23
  };
24
24
  export declare const resolveEditor: ({ defaultEditor, logLevel, preferredEditor, }: {
25
25
  defaultEditor: DefaultEditor | null;
26
- logLevel: "error" | "info" | "trace" | "verbose" | "warn";
27
- preferredEditor: "cursor" | "custom" | "sublime-text" | "vscode" | "vscodium" | "webstorm" | "windsurf" | "zed" | null;
26
+ logLevel: LogLevel;
27
+ preferredEditor: BuiltInEditor | 'custom' | null;
28
28
  }, overrides?: Partial<ResolveEditorDependencies>) => Promise<ResolvedEditor | null>;
29
29
  export {};