@remotion/studio-server 4.0.460 → 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 (51) hide show
  1. package/dist/codemods/update-effect-props/update-effect-props.d.ts +52 -0
  2. package/dist/codemods/update-effect-props/update-effect-props.js +229 -0
  3. package/dist/codemods/update-sequence-props/find-props-to-delete.d.ts +6 -0
  4. package/dist/codemods/update-sequence-props/find-props-to-delete.js +37 -0
  5. package/dist/codemods/update-sequence-props/update-sequence-props.d.ts +35 -0
  6. package/dist/codemods/update-sequence-props/update-sequence-props.js +224 -0
  7. package/dist/codemods/update-sequence-props.d.ts +7 -1
  8. package/dist/codemods/update-sequence-props.js +46 -3
  9. package/dist/index.d.ts +1 -2
  10. package/dist/preview-server/api-routes.js +2 -0
  11. package/dist/preview-server/routes/apply-visual-control-change.js +4 -4
  12. package/dist/preview-server/routes/can-update-effect-props.d.ts +20 -0
  13. package/dist/preview-server/routes/can-update-effect-props.js +146 -0
  14. package/dist/preview-server/routes/can-update-sequence-props.d.ts +26 -6
  15. package/dist/preview-server/routes/can-update-sequence-props.js +82 -35
  16. package/dist/preview-server/routes/delete-jsx-node.js +4 -4
  17. package/dist/preview-server/routes/duplicate-jsx-node.js +4 -4
  18. package/dist/preview-server/routes/log-update.d.ts +13 -2
  19. package/dist/preview-server/routes/log-update.js +56 -30
  20. package/dist/preview-server/routes/log-updates/format-effect-prop-change.d.ts +10 -0
  21. package/dist/preview-server/routes/log-updates/format-effect-prop-change.js +51 -0
  22. package/dist/preview-server/routes/log-updates/format-prop-change.d.ts +9 -0
  23. package/dist/preview-server/routes/log-updates/format-prop-change.js +29 -0
  24. package/dist/preview-server/routes/log-updates/format-side-prop.d.ts +0 -0
  25. package/dist/preview-server/routes/log-updates/format-side-prop.js +1 -0
  26. package/dist/preview-server/routes/log-updates/format-side-props.d.ts +5 -0
  27. package/dist/preview-server/routes/log-updates/format-side-props.js +18 -0
  28. package/dist/preview-server/routes/log-updates/formatting.d.ts +19 -0
  29. package/dist/preview-server/routes/log-updates/formatting.js +67 -0
  30. package/dist/preview-server/routes/log-updates/log-effect-update.d.ts +14 -0
  31. package/dist/preview-server/routes/log-updates/log-effect-update.js +23 -0
  32. package/dist/preview-server/routes/log-updates/log-update.d.ts +15 -0
  33. package/dist/preview-server/routes/log-updates/log-update.js +39 -0
  34. package/dist/preview-server/routes/save-effect-props.d.ts +3 -0
  35. package/dist/preview-server/routes/save-effect-props.js +107 -0
  36. package/dist/preview-server/routes/save-sequence-props.js +82 -87
  37. package/dist/preview-server/routes/subscribe-to-sequence-props.js +4 -3
  38. package/dist/preview-server/routes/unsubscribe-from-sequence-props.js +4 -2
  39. package/dist/preview-server/routes/update-default-props.js +4 -4
  40. package/dist/preview-server/sequence-props-watchers.d.ts +9 -4
  41. package/dist/preview-server/sequence-props-watchers.js +54 -24
  42. package/dist/preview-server/start-server.d.ts +0 -1
  43. package/dist/preview-server/start-server.js +0 -1
  44. package/dist/preview-server/undo-stack.d.ts +3 -1
  45. package/dist/preview-server/undo-stack.js +1 -1
  46. package/dist/routes.js +0 -14
  47. package/dist/start-studio.d.ts +1 -2
  48. package/dist/start-studio.js +1 -2
  49. package/package.json +8 -10
  50. package/dist/codemods/jsx-sequence-context.d.ts +0 -11
  51. package/dist/codemods/jsx-sequence-context.js +0 -68
@@ -7,98 +7,93 @@ exports.saveSequencePropsHandler = void 0;
7
7
  const node_fs_1 = require("node:fs");
8
8
  const node_path_1 = __importDefault(require("node:path"));
9
9
  const renderer_1 = require("@remotion/renderer");
10
- const remotion_1 = require("remotion");
11
- const get_all_schema_keys_1 = require("../../codemods/get-all-schema-keys");
12
- const update_sequence_props_1 = require("../../codemods/update-sequence-props");
10
+ const studio_shared_1 = require("@remotion/studio-shared");
11
+ const no_react_1 = require("remotion/no-react");
12
+ const update_sequence_props_1 = require("../../codemods/update-sequence-props/update-sequence-props");
13
13
  const file_watcher_1 = require("../../file-watcher");
14
14
  const undo_stack_1 = require("../undo-stack");
15
15
  const watch_ignore_next_change_1 = require("../watch-ignore-next-change");
16
16
  const can_update_sequence_props_1 = require("./can-update-sequence-props");
17
- const log_update_1 = require("./log-update");
17
+ const format_prop_change_1 = require("./log-updates/format-prop-change");
18
+ const log_update_1 = require("./log-updates/log-update");
18
19
  const saveSequencePropsHandler = async ({ input: { fileName, nodePath, key, value, defaultValue, schema }, remotionRoot, logLevel, }) => {
19
- try {
20
- renderer_1.RenderInternals.Log.trace({ indent: false, logLevel }, `[save-sequence-props] Received request for fileName="${fileName}" key="${key}"`);
21
- const absolutePath = node_path_1.default.resolve(remotionRoot, fileName);
22
- const fileRelativeToRoot = node_path_1.default.relative(remotionRoot, absolutePath);
23
- if (fileRelativeToRoot.startsWith('..')) {
24
- throw new Error('Cannot modify a file outside the project');
25
- }
26
- const fileContents = (0, node_fs_1.readFileSync)(absolutePath, 'utf-8');
27
- const { output, oldValueStrings, formatted, logLine } = await (0, update_sequence_props_1.updateSequenceProps)({
28
- input: fileContents,
29
- nodePath,
30
- updates: [
31
- {
32
- key,
33
- value: JSON.parse(value),
34
- defaultValue: defaultValue !== null ? JSON.parse(defaultValue) : null,
35
- },
36
- ],
37
- schema: remotion_1.Internals.sequenceSchema,
38
- });
39
- const oldValueString = oldValueStrings[0];
40
- const newValueString = JSON.stringify(JSON.parse(value));
41
- const parsedDefault = defaultValue !== null ? JSON.parse(defaultValue) : null;
42
- const defaultValueString = parsedDefault !== null ? JSON.stringify(parsedDefault) : null;
43
- const normalizedOld = (0, log_update_1.normalizeQuotes)(oldValueString);
44
- const normalizedNew = (0, log_update_1.normalizeQuotes)(newValueString);
45
- const normalizedDefault = defaultValueString !== null ? (0, log_update_1.normalizeQuotes)(defaultValueString) : null;
46
- const undoPropChange = (0, log_update_1.formatPropChange)({
47
- key,
48
- oldValueString: normalizedNew,
49
- newValueString: normalizedOld,
50
- defaultValueString: normalizedDefault,
51
- });
52
- const redoPropChange = (0, log_update_1.formatPropChange)({
53
- key,
54
- oldValueString: normalizedOld,
55
- newValueString: normalizedNew,
56
- defaultValueString: normalizedDefault,
57
- });
58
- (0, undo_stack_1.pushToUndoStack)({
59
- filePath: absolutePath,
60
- oldContents: fileContents,
61
- logLevel,
62
- remotionRoot,
63
- logLine,
64
- description: {
65
- undoMessage: `Undo: ${undoPropChange}`,
66
- redoMessage: `Redo: ${redoPropChange}`,
67
- },
68
- entryType: 'sequence-props',
69
- suppressHmrOnFileRestore: true,
70
- });
71
- (0, undo_stack_1.suppressUndoStackInvalidation)(absolutePath);
72
- (0, watch_ignore_next_change_1.suppressBundlerUpdateForFile)(absolutePath);
73
- (0, file_watcher_1.writeFileAndNotifyFileWatchers)(absolutePath, output);
74
- (0, log_update_1.logUpdate)({
75
- fileRelativeToRoot,
76
- line: logLine,
77
- key,
78
- oldValueString,
79
- newValueString,
80
- defaultValueString,
81
- formatted,
82
- logLevel,
83
- });
84
- (0, undo_stack_1.printUndoHint)(logLevel);
85
- const newStatus = (0, can_update_sequence_props_1.computeSequencePropsStatus)({
86
- fileName,
87
- keys: (0, get_all_schema_keys_1.getAllSchemaKeys)(schema),
88
- nodePath,
89
- remotionRoot,
90
- });
91
- return {
92
- success: true,
93
- newStatus,
94
- };
95
- }
96
- catch (err) {
97
- return {
98
- success: false,
99
- reason: err.message,
100
- stack: err.stack,
101
- };
20
+ renderer_1.RenderInternals.Log.trace({ indent: false, logLevel }, `[save-sequence-props] Received request for fileName="${fileName}" key="${key}"`);
21
+ const absolutePath = node_path_1.default.resolve(remotionRoot, fileName);
22
+ const fileRelativeToRoot = node_path_1.default.relative(remotionRoot, absolutePath);
23
+ if (fileRelativeToRoot.startsWith('..')) {
24
+ throw new Error('Cannot modify a file outside the project');
102
25
  }
26
+ const fileContents = (0, node_fs_1.readFileSync)(absolutePath, 'utf-8');
27
+ const { output, oldValueStrings, formatted, logLine, removedProps } = await (0, update_sequence_props_1.updateSequenceProps)({
28
+ input: fileContents,
29
+ nodePath: nodePath.nodePath,
30
+ updates: [
31
+ {
32
+ key,
33
+ value: JSON.parse(value),
34
+ defaultValue: defaultValue !== null ? JSON.parse(defaultValue) : null,
35
+ },
36
+ ],
37
+ schema: no_react_1.NoReactInternals.sequenceSchema,
38
+ });
39
+ const oldValueString = oldValueStrings[0];
40
+ const newValueString = JSON.stringify(JSON.parse(value));
41
+ const parsedDefault = defaultValue !== null ? JSON.parse(defaultValue) : null;
42
+ const defaultValueString = parsedDefault !== null ? JSON.stringify(parsedDefault) : null;
43
+ const normalizedOld = (0, log_update_1.normalizeQuotes)(oldValueString);
44
+ const normalizedNew = (0, log_update_1.normalizeQuotes)(newValueString);
45
+ const normalizedDefault = defaultValueString !== null ? (0, log_update_1.normalizeQuotes)(defaultValueString) : null;
46
+ const undoPropChange = (0, format_prop_change_1.formatPropChange)({
47
+ key,
48
+ oldValueString: normalizedNew,
49
+ newValueString: normalizedOld,
50
+ defaultValueString: normalizedDefault,
51
+ removedProps: [],
52
+ addedProps: removedProps,
53
+ });
54
+ const redoPropChange = (0, format_prop_change_1.formatPropChange)({
55
+ key,
56
+ oldValueString: normalizedOld,
57
+ newValueString: normalizedNew,
58
+ defaultValueString: normalizedDefault,
59
+ removedProps,
60
+ addedProps: [],
61
+ });
62
+ (0, undo_stack_1.pushToUndoStack)({
63
+ filePath: absolutePath,
64
+ oldContents: fileContents,
65
+ logLevel,
66
+ remotionRoot,
67
+ logLine,
68
+ description: {
69
+ undoMessage: `↩️ ${undoPropChange}`,
70
+ redoMessage: `↪️ ${redoPropChange}`,
71
+ },
72
+ entryType: 'sequence-props',
73
+ suppressHmrOnFileRestore: true,
74
+ });
75
+ (0, undo_stack_1.suppressUndoStackInvalidation)(absolutePath);
76
+ (0, watch_ignore_next_change_1.suppressBundlerUpdateForFile)(absolutePath);
77
+ (0, file_watcher_1.writeFileAndNotifyFileWatchers)(absolutePath, output);
78
+ (0, log_update_1.logUpdate)({
79
+ fileRelativeToRoot,
80
+ line: logLine,
81
+ key,
82
+ oldValueString,
83
+ newValueString,
84
+ defaultValueString,
85
+ formatted,
86
+ logLevel,
87
+ removedProps,
88
+ addedProps: [],
89
+ });
90
+ (0, undo_stack_1.printUndoHint)(logLevel);
91
+ const newStatus = (0, can_update_sequence_props_1.computeSequencePropsOnlyStatus)({
92
+ fileName,
93
+ keys: (0, studio_shared_1.getAllSchemaKeys)(schema),
94
+ nodePath: nodePath.nodePath,
95
+ remotionRoot,
96
+ });
97
+ return newStatus;
103
98
  };
104
99
  exports.saveSequencePropsHandler = saveSequencePropsHandler;
@@ -1,16 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.subscribeToSequenceProps = void 0;
4
- const get_all_schema_keys_1 = require("../../codemods/get-all-schema-keys");
5
4
  const sequence_props_watchers_1 = require("../sequence-props-watchers");
6
- const subscribeToSequenceProps = ({ input: { fileName, line, column, schema, clientId }, remotionRoot }) => {
5
+ const subscribeToSequenceProps = ({ input: { fileName, line, column, keys, effects, clientId }, remotionRoot, logLevel, }) => {
7
6
  const result = (0, sequence_props_watchers_1.subscribeToSequencePropsWatchers)({
8
7
  fileName,
9
8
  line,
10
9
  column,
11
- keys: (0, get_all_schema_keys_1.getAllSchemaKeys)(schema),
10
+ keys,
11
+ effects,
12
12
  remotionRoot,
13
13
  clientId,
14
+ logLevel,
14
15
  });
15
16
  return Promise.resolve(result);
16
17
  };
@@ -2,12 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.unsubscribeFromSequenceProps = void 0;
4
4
  const sequence_props_watchers_1 = require("../sequence-props-watchers");
5
- const unsubscribeFromSequenceProps = ({ input: { fileName, nodePath, clientId }, remotionRoot }) => {
5
+ const unsubscribeFromSequenceProps = ({ input: { fileName, nodePath, clientId, sequenceKeys, effectKeys }, remotionRoot, }) => {
6
6
  (0, sequence_props_watchers_1.unsubscribeFromSequencePropsWatchers)({
7
7
  fileName,
8
- nodePath,
8
+ nodePath: nodePath.nodePath,
9
9
  remotionRoot,
10
10
  clientId,
11
+ sequenceKeys,
12
+ effectKeys,
11
13
  });
12
14
  return Promise.resolve(undefined);
13
15
  };
@@ -10,7 +10,7 @@ const project_info_1 = require("../project-info");
10
10
  const undo_stack_1 = require("../undo-stack");
11
11
  const watch_ignore_next_change_1 = require("../watch-ignore-next-change");
12
12
  const can_update_default_props_1 = require("./can-update-default-props");
13
- const log_update_1 = require("./log-update");
13
+ const log_update_1 = require("./log-updates/log-update");
14
14
  const updateDefaultPropsHandler = async ({ input: { compositionId, defaultProps, enumPaths }, remotionRoot, entryPoint, logLevel, }) => {
15
15
  try {
16
16
  renderer_1.RenderInternals.Log.trace({ indent: false, logLevel }, `[update-default-props] Received request for compositionId="${compositionId}"`);
@@ -37,8 +37,8 @@ const updateDefaultPropsHandler = async ({ input: { compositionId, defaultProps,
37
37
  remotionRoot,
38
38
  logLine,
39
39
  description: {
40
- undoMessage: `Undo: default props update for "${compositionId}"`,
41
- redoMessage: `Redo: default props update for "${compositionId}"`,
40
+ undoMessage: `↩️ default props update for "${compositionId}"`,
41
+ redoMessage: `↪️ default props update for "${compositionId}"`,
42
42
  },
43
43
  entryType: 'default-props',
44
44
  suppressHmrOnFileRestore: true,
@@ -51,7 +51,7 @@ const updateDefaultPropsHandler = async ({ input: { compositionId, defaultProps,
51
51
  absolutePath: projectInfo.rootFile,
52
52
  line: logLine,
53
53
  });
54
- renderer_1.RenderInternals.Log.info({ indent: false, logLevel }, `${renderer_1.RenderInternals.chalk.blueBright(`${locationLabel}:`)} Updated default props for "${compositionId}"`);
54
+ renderer_1.RenderInternals.Log.info({ indent: false, logLevel }, `${renderer_1.RenderInternals.chalk.blueBright(`${locationLabel}`)} Updated default props for "${compositionId}"`);
55
55
  if (!formatted) {
56
56
  (0, log_update_1.warnAboutPrettierOnce)(logLevel);
57
57
  }
@@ -1,16 +1,21 @@
1
- import type { CanUpdateSequencePropsResponse, SequenceNodePath } from 'remotion';
2
- export declare const subscribeToSequencePropsWatchers: ({ fileName, line, column, keys, remotionRoot, clientId, }: {
1
+ import { type SubscribeToSequencePropsResponse } from '@remotion/studio-shared';
2
+ import type { SequenceNodePath } from 'remotion';
3
+ export declare const subscribeToSequencePropsWatchers: ({ fileName, line, column, keys, effects, remotionRoot, clientId, logLevel, }: {
3
4
  fileName: string;
4
5
  line: number;
5
6
  column: number;
6
7
  keys: string[];
8
+ effects: string[][];
7
9
  remotionRoot: string;
8
10
  clientId: string;
9
- }) => CanUpdateSequencePropsResponse;
10
- export declare const unsubscribeFromSequencePropsWatchers: ({ fileName, nodePath, remotionRoot, clientId, }: {
11
+ logLevel: "error" | "info" | "trace" | "verbose" | "warn";
12
+ }) => SubscribeToSequencePropsResponse;
13
+ export declare const unsubscribeFromSequencePropsWatchers: ({ fileName, nodePath, remotionRoot, clientId, sequenceKeys, effectKeys, }: {
11
14
  fileName: string;
12
15
  nodePath: SequenceNodePath;
13
16
  remotionRoot: string;
14
17
  clientId: string;
18
+ sequenceKeys: string[];
19
+ effectKeys: string[][];
15
20
  }) => void;
16
21
  export declare const unsubscribeClientSequencePropsWatchers: (clientId: string) => void;
@@ -5,15 +5,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.unsubscribeClientSequencePropsWatchers = exports.unsubscribeFromSequencePropsWatchers = exports.subscribeToSequencePropsWatchers = void 0;
7
7
  const node_path_1 = __importDefault(require("node:path"));
8
+ const renderer_1 = require("@remotion/renderer");
9
+ const studio_shared_1 = require("@remotion/studio-shared");
8
10
  const file_watcher_1 = require("../file-watcher");
9
11
  const live_events_1 = require("./live-events");
10
12
  const node_path_cache_1 = require("./node-path-cache");
11
13
  const can_update_sequence_props_1 = require("./routes/can-update-sequence-props");
12
14
  const sequencePropsWatchers = {};
13
- const makeWatcherKey = ({ absolutePath, nodePath, }) => {
14
- return `${absolutePath}:${JSON.stringify(nodePath)}`;
15
- };
16
- const getSequencePropsStatus = ({ fileName, line, column, keys, remotionRoot, }) => {
15
+ const getSequencePropsStatus = ({ fileName, line, column, keys, effects, remotionRoot, logLevel, }) => {
17
16
  // Try cached nodePath first (handles stale source maps after suppressed rebuilds)
18
17
  const cachedNodePath = (0, node_path_cache_1.getCachedNodePath)(fileName, line, column);
19
18
  if (cachedNodePath) {
@@ -21,36 +20,51 @@ const getSequencePropsStatus = ({ fileName, line, column, keys, remotionRoot, })
21
20
  fileName,
22
21
  nodePath: cachedNodePath,
23
22
  keys,
23
+ effects,
24
24
  remotionRoot,
25
25
  });
26
26
  if (cachedResult.canUpdate) {
27
- return cachedResult;
27
+ return {
28
+ status: cachedResult,
29
+ nodePath: {
30
+ absolutePath: node_path_1.default.resolve(remotionRoot, fileName),
31
+ nodePath: cachedNodePath,
32
+ sequenceKeys: keys,
33
+ effectKeys: effects,
34
+ },
35
+ success: true,
36
+ };
28
37
  }
29
38
  }
30
- return (0, can_update_sequence_props_1.computeSequencePropsStatusFromFilenameByLine)({
39
+ const status = (0, can_update_sequence_props_1.computeSequencePropsStatusFromFilenameByLine)({
31
40
  fileName,
32
41
  line,
33
42
  keys,
43
+ effects,
34
44
  remotionRoot,
45
+ logLevel,
35
46
  });
47
+ return status;
36
48
  };
37
- const subscribeToSequencePropsWatchers = ({ fileName, line, column, keys, remotionRoot, clientId, }) => {
49
+ const subscribeToSequencePropsWatchers = ({ fileName, line, column, keys, effects, remotionRoot, clientId, logLevel, }) => {
38
50
  var _a;
39
51
  const initialResult = getSequencePropsStatus({
40
52
  fileName,
41
53
  line,
42
54
  column,
43
55
  keys,
56
+ effects,
44
57
  remotionRoot,
58
+ logLevel,
45
59
  });
46
- if (!initialResult.canUpdate) {
60
+ if (!initialResult.success) {
47
61
  return initialResult;
48
62
  }
49
63
  const absolutePath = node_path_1.default.resolve(remotionRoot, fileName);
50
64
  // Cache the resolved nodePath for future lookups with stale source maps
51
- (0, node_path_cache_1.setCachedNodePath)(fileName, line, column, initialResult.nodePath);
65
+ (0, node_path_cache_1.setCachedNodePath)(fileName, line, column, initialResult.nodePath.nodePath);
52
66
  const { nodePath } = initialResult;
53
- const watcherKey = makeWatcherKey({ absolutePath, nodePath });
67
+ const watcherKey = (0, studio_shared_1.stringifySequenceSubscriptionKey)(nodePath);
54
68
  // If a watcher already exists for this key, just bump the ref count
55
69
  if ((_a = sequencePropsWatchers[clientId]) === null || _a === void 0 ? void 0 : _a[watcherKey]) {
56
70
  sequencePropsWatchers[clientId][watcherKey].refCount++;
@@ -63,21 +77,32 @@ const subscribeToSequencePropsWatchers = ({ fileName, line, column, keys, remoti
63
77
  if (event.type === 'deleted') {
64
78
  return;
65
79
  }
66
- let result;
67
80
  try {
68
- result = (0, can_update_sequence_props_1.computeSequencePropsStatusFromContent)(event.content, nodePath, keys);
81
+ const result = (0, can_update_sequence_props_1.computeSequencePropsStatusFromContent)({
82
+ fileContents: event.content,
83
+ nodePath: nodePath.nodePath,
84
+ keys,
85
+ effects,
86
+ });
87
+ const previousEffectChain = result.effects.map((effect) => effect.canUpdate && effect.callee);
88
+ const newEffectChain = initialResult.success &&
89
+ initialResult.status.effects.map((effect) => effect.canUpdate && effect.callee);
90
+ if (previousEffectChain.join(',') !== newEffectChain.join(',')) {
91
+ renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, 'Effect chain changed, not sending "sequence-props-updated" event');
92
+ return;
93
+ }
94
+ (0, live_events_1.waitForLiveEventsListener)().then((listener) => {
95
+ listener.sendEventToClientId(clientId, {
96
+ type: 'sequence-props-updated',
97
+ fileName,
98
+ nodePath,
99
+ result,
100
+ });
101
+ });
69
102
  }
70
- catch (_a) {
71
- return;
103
+ catch (error) {
104
+ renderer_1.RenderInternals.Log.error({ indent: false, logLevel }, error);
72
105
  }
73
- (0, live_events_1.waitForLiveEventsListener)().then((listener) => {
74
- listener.sendEventToClientId(clientId, {
75
- type: 'sequence-props-updated',
76
- fileName,
77
- nodePath,
78
- result,
79
- });
80
- });
81
106
  },
82
107
  });
83
108
  if (!sequencePropsWatchers[clientId]) {
@@ -87,9 +112,14 @@ const subscribeToSequencePropsWatchers = ({ fileName, line, column, keys, remoti
87
112
  return initialResult;
88
113
  };
89
114
  exports.subscribeToSequencePropsWatchers = subscribeToSequencePropsWatchers;
90
- const unsubscribeFromSequencePropsWatchers = ({ fileName, nodePath, remotionRoot, clientId, }) => {
115
+ const unsubscribeFromSequencePropsWatchers = ({ fileName, nodePath, remotionRoot, clientId, sequenceKeys, effectKeys, }) => {
91
116
  const absolutePath = node_path_1.default.resolve(remotionRoot, fileName);
92
- const watcherKey = makeWatcherKey({ absolutePath, nodePath });
117
+ const watcherKey = (0, studio_shared_1.stringifySequenceSubscriptionKey)({
118
+ absolutePath,
119
+ nodePath,
120
+ sequenceKeys,
121
+ effectKeys,
122
+ });
93
123
  if (!sequencePropsWatchers[clientId] ||
94
124
  !sequencePropsWatchers[clientId][watcherKey]) {
95
125
  return;
@@ -23,7 +23,6 @@ export declare const startServer: (options: {
23
23
  remotionRoot: string;
24
24
  keyboardShortcutsEnabled: boolean;
25
25
  experimentalClientSideRenderingEnabled: boolean;
26
- experimentalVisualModeEnabled: boolean;
27
26
  publicDir: string;
28
27
  poll: number | null;
29
28
  staticHash: string;
@@ -42,7 +42,6 @@ const startServer = async (options) => {
42
42
  remotionRoot: options.remotionRoot,
43
43
  keyboardShortcutsEnabled: options.keyboardShortcutsEnabled,
44
44
  experimentalClientSideRenderingEnabled: options.experimentalClientSideRenderingEnabled,
45
- experimentalVisualModeEnabled: options.experimentalVisualModeEnabled,
46
45
  poll: options.poll,
47
46
  bufferStateDelayInMilliseconds: options.bufferStateDelayInMilliseconds,
48
47
  askAIEnabled: options.askAIEnabled,
@@ -3,7 +3,7 @@ export interface UndoEntryDescription {
3
3
  undoMessage: string;
4
4
  redoMessage: string;
5
5
  }
6
- type UndoEntryType = 'visual-control' | 'default-props' | 'sequence-props' | 'delete-jsx-node' | 'duplicate-jsx-node';
6
+ type UndoEntryType = 'visual-control' | 'default-props' | 'sequence-props' | 'effect-props' | 'delete-jsx-node' | 'duplicate-jsx-node';
7
7
  type UndoEntry = {
8
8
  filePath: string;
9
9
  oldContents: string;
@@ -18,6 +18,8 @@ type UndoEntry = {
18
18
  entryType: 'default-props';
19
19
  } | {
20
20
  entryType: 'sequence-props';
21
+ } | {
22
+ entryType: 'effect-props';
21
23
  } | {
22
24
  entryType: 'delete-jsx-node';
23
25
  } | {
@@ -175,7 +175,7 @@ function logFileAction(action, filePath, logLine) {
175
175
  line: logLine,
176
176
  })
177
177
  : `${filePath}:${logLine}`;
178
- renderer_1.RenderInternals.Log.info({ indent: false, logLevel: storedLogLevel }, `${renderer_1.RenderInternals.chalk.blueBright(`${locationLabel}:`)} ${action}`);
178
+ renderer_1.RenderInternals.Log.info({ indent: false, logLevel: storedLogLevel }, `${renderer_1.RenderInternals.chalk.blueBright(`${locationLabel}`)} ${action}`);
179
179
  }
180
180
  function popUndo() {
181
181
  const entry = undoStack.pop();
package/dist/routes.js CHANGED
@@ -317,17 +317,6 @@ const handleBeep = (_, response) => {
317
317
  readStream.pipe(response);
318
318
  return Promise.resolve();
319
319
  };
320
- const handleWasm = (_, response) => {
321
- const filePath = node_path_1.default.resolve(require.resolve('source-map'), '..', 'lib', 'mappings.wasm');
322
- const stat = (0, node_fs_1.statSync)(filePath);
323
- response.writeHead(200, {
324
- 'Content-Type': 'application/wasm',
325
- 'Content-Length': stat.size,
326
- });
327
- const readStream = (0, node_fs_1.createReadStream)(filePath);
328
- readStream.pipe(response);
329
- return Promise.resolve();
330
- };
331
320
  const handleRoutes = ({ staticHash, staticHashPrefix, outputHash, outputHashPrefix, request, response, liveEventsServer, getCurrentInputProps, getEnvVariables, remotionRoot, entryPoint, publicDir, logLevel, getRenderQueue, getRenderDefaults, numberOfAudioTags, queueMethods: methods, gitSource, binariesDirectory, audioLatencyHint, enableCrossSiteIsolation, }) => {
332
321
  const url = new URL(request.url, 'http://localhost');
333
322
  if (url.pathname === '/api/file-source') {
@@ -391,9 +380,6 @@ const handleRoutes = ({ staticHash, staticHashPrefix, outputHash, outputHashPref
391
380
  if (url.pathname === '/beep.wav') {
392
381
  return handleBeep(request, response);
393
382
  }
394
- if (url.pathname === studio_shared_1.SOURCE_MAP_ENDPOINT) {
395
- return handleWasm(request, response);
396
- }
397
383
  if (url.pathname === '/__remotion_config') {
398
384
  return handleRemotionConfig(response, remotionRoot);
399
385
  }
@@ -6,7 +6,7 @@ export type StartStudioResult = {
6
6
  } | {
7
7
  type: 'already-running';
8
8
  };
9
- export declare const startStudio: ({ browserArgs, browserFlag, shouldOpenBrowser, fullEntryPath, logLevel, getCurrentInputProps, getEnvVariables, desiredPort, maxTimelineTracks, remotionRoot, keyboardShortcutsEnabled, experimentalClientSideRenderingEnabled, experimentalVisualModeEnabled, relativePublicDir, webpackOverride, poll, getRenderDefaults, getRenderQueue, numberOfAudioTags, queueMethods, previewEntry, gitSource, bufferStateDelayInMilliseconds, binariesDirectory, forceIPv4, audioLatencyHint, enableCrossSiteIsolation, askAIEnabled, forceNew, rspack, }: {
9
+ export declare const startStudio: ({ browserArgs, browserFlag, shouldOpenBrowser, fullEntryPath, logLevel, getCurrentInputProps, getEnvVariables, desiredPort, maxTimelineTracks, remotionRoot, keyboardShortcutsEnabled, experimentalClientSideRenderingEnabled, relativePublicDir, webpackOverride, poll, getRenderDefaults, getRenderQueue, numberOfAudioTags, queueMethods, previewEntry, gitSource, bufferStateDelayInMilliseconds, binariesDirectory, forceIPv4, audioLatencyHint, enableCrossSiteIsolation, askAIEnabled, forceNew, rspack, }: {
10
10
  browserArgs: string;
11
11
  browserFlag: string;
12
12
  logLevel: "error" | "info" | "trace" | "verbose" | "warn";
@@ -20,7 +20,6 @@ export declare const startStudio: ({ browserArgs, browserFlag, shouldOpenBrowser
20
20
  remotionRoot: string;
21
21
  keyboardShortcutsEnabled: boolean;
22
22
  experimentalClientSideRenderingEnabled: boolean;
23
- experimentalVisualModeEnabled: boolean;
24
23
  relativePublicDir: string | null;
25
24
  webpackOverride: WebpackOverrideFn;
26
25
  poll: number | null;
@@ -18,7 +18,7 @@ const public_folder_1 = require("./preview-server/public-folder");
18
18
  const start_server_1 = require("./preview-server/start-server");
19
19
  const server_ready_1 = require("./server-ready");
20
20
  const watch_root_file_1 = require("./watch-root-file");
21
- const startStudio = async ({ browserArgs, browserFlag, shouldOpenBrowser, fullEntryPath, logLevel, getCurrentInputProps, getEnvVariables, desiredPort, maxTimelineTracks, remotionRoot, keyboardShortcutsEnabled, experimentalClientSideRenderingEnabled, experimentalVisualModeEnabled, relativePublicDir, webpackOverride, poll, getRenderDefaults, getRenderQueue, numberOfAudioTags, queueMethods, previewEntry, gitSource, bufferStateDelayInMilliseconds, binariesDirectory, forceIPv4, audioLatencyHint, enableCrossSiteIsolation, askAIEnabled, forceNew, rspack, }) => {
21
+ const startStudio = async ({ browserArgs, browserFlag, shouldOpenBrowser, fullEntryPath, logLevel, getCurrentInputProps, getEnvVariables, desiredPort, maxTimelineTracks, remotionRoot, keyboardShortcutsEnabled, experimentalClientSideRenderingEnabled, relativePublicDir, webpackOverride, poll, getRenderDefaults, getRenderQueue, numberOfAudioTags, queueMethods, previewEntry, gitSource, bufferStateDelayInMilliseconds, binariesDirectory, forceIPv4, audioLatencyHint, enableCrossSiteIsolation, askAIEnabled, forceNew, rspack, }) => {
22
22
  try {
23
23
  if (typeof Bun === 'undefined') {
24
24
  process.title = 'node (npx remotion studio)';
@@ -72,7 +72,6 @@ const startStudio = async ({ browserArgs, browserFlag, shouldOpenBrowser, fullEn
72
72
  remotionRoot,
73
73
  keyboardShortcutsEnabled,
74
74
  experimentalClientSideRenderingEnabled,
75
- experimentalVisualModeEnabled,
76
75
  publicDir,
77
76
  webpackOverride,
78
77
  poll,
package/package.json CHANGED
@@ -3,10 +3,9 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/studio-server"
4
4
  },
5
5
  "name": "@remotion/studio-server",
6
- "version": "4.0.460",
6
+ "version": "4.0.462",
7
7
  "description": "Run a Remotion Studio with a server backend",
8
8
  "main": "dist",
9
- "sideEffects": false,
10
9
  "scripts": {
11
10
  "lint": "eslint src",
12
11
  "test": "bun test src",
@@ -28,20 +27,19 @@
28
27
  "@babel/parser": "7.24.1",
29
28
  "semver": "7.5.3",
30
29
  "prettier": "3.8.1",
31
- "remotion": "4.0.460",
30
+ "remotion": "4.0.462",
32
31
  "recast": "0.23.11",
33
- "@remotion/bundler": "4.0.460",
34
- "@remotion/renderer": "4.0.460",
35
- "@remotion/studio-shared": "4.0.460",
32
+ "@remotion/bundler": "4.0.462",
33
+ "@remotion/renderer": "4.0.462",
34
+ "@remotion/studio-shared": "4.0.462",
36
35
  "memfs": "3.4.3",
37
- "source-map": "0.7.3",
38
- "open": "^8.4.2"
36
+ "open": "8.4.2"
39
37
  },
40
38
  "devDependencies": {
41
39
  "ast-types": "0.16.1",
42
40
  "react": "19.2.3",
43
- "@types/semver": "^7.3.4",
44
- "@remotion/eslint-config-internal": "4.0.460",
41
+ "@types/semver": "7.5.3",
42
+ "@remotion/eslint-config-internal": "4.0.462",
45
43
  "eslint": "9.19.0",
46
44
  "@types/node": "20.12.14",
47
45
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
@@ -1,11 +0,0 @@
1
- import type { Expression, File } from '@babel/types';
2
- import type { SequenceNodePath } from 'remotion';
3
- /**
4
- * Whether the callee is a `.map(...)` member call (including optional `?.map`).
5
- */
6
- export declare const isMapCallee: (callee: Expression) => boolean;
7
- /**
8
- * True when the JSX element at `nodePath` is defined inside a `.map()` callback
9
- * (array iteration). Used to flag duplicate / edit behavior for list-driven JSX.
10
- */
11
- export declare const isJsxUnderMapCallback: (ast: File, nodePath: SequenceNodePath) => boolean;
@@ -1,68 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isJsxUnderMapCallback = exports.isMapCallee = void 0;
4
- const delete_jsx_node_1 = require("./delete-jsx-node");
5
- const unwrapExpression = (expr) => {
6
- if (expr.type === 'TSAsExpression') {
7
- return unwrapExpression(expr.expression);
8
- }
9
- if (expr.type === 'ParenthesizedExpression') {
10
- return unwrapExpression(expr.expression);
11
- }
12
- return expr;
13
- };
14
- /**
15
- * Whether the callee is a `.map(...)` member call (including optional `?.map`).
16
- */
17
- const isMapCallee = (callee) => {
18
- const c = unwrapExpression(callee);
19
- if (c.type === 'MemberExpression') {
20
- if (c.computed) {
21
- return c.property.type === 'StringLiteral' && c.property.value === 'map';
22
- }
23
- return c.property.type === 'Identifier' && c.property.name === 'map';
24
- }
25
- if (c.type === 'OptionalMemberExpression') {
26
- if (c.computed) {
27
- return c.property.type === 'StringLiteral' && c.property.value === 'map';
28
- }
29
- return c.property.type === 'Identifier' && c.property.name === 'map';
30
- }
31
- return false;
32
- };
33
- exports.isMapCallee = isMapCallee;
34
- /**
35
- * True when the JSX element at `nodePath` is defined inside a `.map()` callback
36
- * (array iteration). Used to flag duplicate / edit behavior for list-driven JSX.
37
- */
38
- const isJsxUnderMapCallback = (ast, nodePath) => {
39
- const jsxPath = (0, delete_jsx_node_1.findJsxElementPathForDeletion)(ast, nodePath);
40
- if (!jsxPath) {
41
- return false;
42
- }
43
- let path = jsxPath.parentPath;
44
- while (path) {
45
- const n = path.node;
46
- if (n.type === 'ArrowFunctionExpression' ||
47
- n.type === 'FunctionExpression') {
48
- const outer = path.parentPath;
49
- if ((outer === null || outer === void 0 ? void 0 : outer.node.type) === 'CallExpression') {
50
- const call = outer.node;
51
- if ((0, exports.isMapCallee)(call.callee) &&
52
- call.arguments.some((arg) => arg === n)) {
53
- return true;
54
- }
55
- }
56
- if ((outer === null || outer === void 0 ? void 0 : outer.node.type) === 'OptionalCallExpression') {
57
- const call = outer.node;
58
- if ((0, exports.isMapCallee)(call.callee) &&
59
- call.arguments.some((arg) => arg === n)) {
60
- return true;
61
- }
62
- }
63
- }
64
- path = path.parentPath;
65
- }
66
- return false;
67
- };
68
- exports.isJsxUnderMapCallback = isJsxUnderMapCallback;