@remotion/studio-shared 4.0.460 → 4.0.461
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.
- package/dist/access-visual-mode-values.d.ts +3 -0
- package/dist/access-visual-mode-values.js +8 -0
- package/dist/api-requests.d.ts +10 -11
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/optimistic-update-for-code-values.d.ts +7 -0
- package/dist/optimistic-update-for-code-values.js +29 -0
- package/dist/schema-field-info.d.ts +2 -2
- package/dist/schema-field-info.js +9 -3
- package/package.json +5 -4
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCodeValues = void 0;
|
|
4
|
+
const getCodeValues = (codeValues, overrideId) => {
|
|
5
|
+
var _a;
|
|
6
|
+
return (_a = codeValues[overrideId]) !== null && _a !== void 0 ? _a : undefined;
|
|
7
|
+
};
|
|
8
|
+
exports.getCodeValues = getCodeValues;
|
package/dist/api-requests.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AudioCodec, ChromeMode, Codec, ColorSpace, LogLevel, PixelFormat, StillImageFormat, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
2
2
|
import type { HardwareAccelerationOption } from '@remotion/renderer/client';
|
|
3
|
-
import type { _InternalTypes, SequenceSchema } from 'remotion';
|
|
3
|
+
import type { _InternalTypes, CanUpdateSequencePropsResponseFalse, CanUpdateSequencePropsResponseTrue, SequenceSchema } from 'remotion';
|
|
4
4
|
import type { CanUpdateSequencePropsResponse } from 'remotion';
|
|
5
5
|
import type { SequenceNodePath } from 'remotion';
|
|
6
6
|
import type { RecastCodemod, VisualControlChange } from './codemods';
|
|
@@ -172,7 +172,14 @@ export type SubscribeToSequencePropsRequest = {
|
|
|
172
172
|
schema: SequenceSchema;
|
|
173
173
|
clientId: string;
|
|
174
174
|
};
|
|
175
|
-
export type SubscribeToSequencePropsResponse =
|
|
175
|
+
export type SubscribeToSequencePropsResponse = {
|
|
176
|
+
success: true;
|
|
177
|
+
status: CanUpdateSequencePropsResponseTrue;
|
|
178
|
+
nodePath: SequenceNodePath;
|
|
179
|
+
} | {
|
|
180
|
+
success: false;
|
|
181
|
+
status: CanUpdateSequencePropsResponseFalse;
|
|
182
|
+
};
|
|
176
183
|
export type UnsubscribeFromSequencePropsRequest = {
|
|
177
184
|
fileName: string;
|
|
178
185
|
nodePath: SequenceNodePath;
|
|
@@ -186,14 +193,6 @@ export type SaveSequencePropsRequest = {
|
|
|
186
193
|
defaultValue: string | null;
|
|
187
194
|
schema: SequenceSchema;
|
|
188
195
|
};
|
|
189
|
-
export type SaveSequencePropsResponse = {
|
|
190
|
-
success: true;
|
|
191
|
-
newStatus: CanUpdateSequencePropsResponse;
|
|
192
|
-
} | {
|
|
193
|
-
success: false;
|
|
194
|
-
reason: string;
|
|
195
|
-
stack: string;
|
|
196
|
-
};
|
|
197
196
|
export type DeleteJsxNodeRequest = {
|
|
198
197
|
fileName: string;
|
|
199
198
|
nodePath: SequenceNodePath;
|
|
@@ -261,7 +260,7 @@ export type ApiRoutes = {
|
|
|
261
260
|
'/api/unsubscribe-from-default-props': ReqAndRes<UnsubscribeFromDefaultPropsRequest, undefined>;
|
|
262
261
|
'/api/subscribe-to-sequence-props': ReqAndRes<SubscribeToSequencePropsRequest, SubscribeToSequencePropsResponse>;
|
|
263
262
|
'/api/unsubscribe-from-sequence-props': ReqAndRes<UnsubscribeFromSequencePropsRequest, undefined>;
|
|
264
|
-
'/api/save-sequence-props': ReqAndRes<SaveSequencePropsRequest,
|
|
263
|
+
'/api/save-sequence-props': ReqAndRes<SaveSequencePropsRequest, CanUpdateSequencePropsResponse>;
|
|
265
264
|
'/api/delete-jsx-node': ReqAndRes<DeleteJsxNodeRequest, DeleteJsxNodeResponse>;
|
|
266
265
|
'/api/duplicate-jsx-node': ReqAndRes<DuplicateJsxNodeRequest, DuplicateJsxNodeResponse>;
|
|
267
266
|
'/api/update-available': ReqAndRes<UpdateAvailableRequest, UpdateAvailableResponse>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { splitAnsi, stripAnsi } from './ansi';
|
|
2
|
-
export { AddRenderRequest, ApiRoutes, ApplyCodemodRequest, ApplyCodemodResponse, ApplyVisualControlRequest, ApplyVisualControlResponse, CanUpdateDefaultPropsResponse, CanUpdateSequencePropsRequest, CancelRenderRequest, SubscribeToSequencePropsRequest, SubscribeToSequencePropsResponse, UnsubscribeFromSequencePropsRequest, CancelRenderResponse, CopyStillToClipboardRequest, DeleteJsxNodeRequest, DeleteJsxNodeResponse, DuplicateJsxNodeRequest, DuplicateJsxNodeResponse, DeleteStaticFileRequest, DeleteStaticFileResponse, InstallPackageRequest, InstallPackageResponse, OpenInFileExplorerRequest, ProjectInfoRequest, ProjectInfoResponse, RedoRequest, RedoResponse, RemoveRenderRequest, RestartStudioRequest, RestartStudioResponse, SaveSequencePropsRequest,
|
|
2
|
+
export { AddRenderRequest, ApiRoutes, ApplyCodemodRequest, ApplyCodemodResponse, ApplyVisualControlRequest, ApplyVisualControlResponse, CanUpdateDefaultPropsResponse, CanUpdateSequencePropsRequest, CancelRenderRequest, SubscribeToSequencePropsRequest, SubscribeToSequencePropsResponse, UnsubscribeFromSequencePropsRequest, CancelRenderResponse, CopyStillToClipboardRequest, DeleteJsxNodeRequest, DeleteJsxNodeResponse, DuplicateJsxNodeRequest, DuplicateJsxNodeResponse, DeleteStaticFileRequest, DeleteStaticFileResponse, InstallPackageRequest, InstallPackageResponse, OpenInFileExplorerRequest, ProjectInfoRequest, ProjectInfoResponse, RedoRequest, RedoResponse, RemoveRenderRequest, RestartStudioRequest, RestartStudioResponse, SaveSequencePropsRequest, SimpleDiff, SubscribeToDefaultPropsRequest, SubscribeToDefaultPropsResponse, SubscribeToFileExistenceRequest, SubscribeToFileExistenceResponse, UndoRequest, UndoResponse, UnsubscribeFromDefaultPropsRequest, UnsubscribeFromFileExistenceRequest, UpdateAvailableRequest, UpdateAvailableResponse, UpdateDefaultPropsRequest, UpdateDefaultPropsResponse, } from './api-requests';
|
|
3
3
|
export type { ApplyVisualControlCodemod, RecastCodemod } from './codemods';
|
|
4
4
|
export { DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS } from './default-buffer-state-delay-in-milliseconds';
|
|
5
5
|
export { EventSourceEvent } from './event-source-event';
|
|
@@ -18,7 +18,7 @@ export { AggregateRenderProgress, ArtifactProgress, BrowserDownloadState, Browse
|
|
|
18
18
|
export type { CompletedClientRender } from './render-job';
|
|
19
19
|
export { SCHEMA_FIELD_ROW_HEIGHT, UNSUPPORTED_FIELD_ROW_HEIGHT, getFieldsToShow, } from './schema-field-info';
|
|
20
20
|
export type { CodeValues, DragOverrides, SchemaFieldInfo, SequenceControls, } from './schema-field-info';
|
|
21
|
-
export { SOURCE_MAP_ENDPOINT } from './source-map-endpoint';
|
|
22
21
|
export { ScriptLine, SomeStackFrame, StackFrame, SymbolicatedStackFrame, } from './stack-types';
|
|
23
22
|
export { EnumPath, stringifyDefaultProps } from './stringify-default-props';
|
|
24
23
|
export type { VisualControlChange } from './codemods';
|
|
24
|
+
export { optimisticUpdateForCodeValues } from './optimistic-update-for-code-values';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.optimisticUpdateForCodeValues = exports.stringifyDefaultProps = exports.getFieldsToShow = exports.UNSUPPORTED_FIELD_ROW_HEIGHT = exports.SCHEMA_FIELD_ROW_HEIGHT = exports.packages = exports.installableMap = exports.extraPackages = exports.descriptions = exports.apiDocs = exports.DEFAULT_TIMELINE_TRACKS = exports.hotMiddlewareOptions = exports.getProjectName = exports.getLocationFromBuildError = exports.getDefaultOutLocation = exports.formatBytes = exports.DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS = exports.stripAnsi = exports.splitAnsi = void 0;
|
|
4
4
|
const ansi_1 = require("./ansi");
|
|
5
5
|
Object.defineProperty(exports, "splitAnsi", { enumerable: true, get: function () { return ansi_1.splitAnsi; } });
|
|
6
6
|
Object.defineProperty(exports, "stripAnsi", { enumerable: true, get: function () { return ansi_1.stripAnsi; } });
|
|
@@ -28,7 +28,7 @@ const schema_field_info_1 = require("./schema-field-info");
|
|
|
28
28
|
Object.defineProperty(exports, "SCHEMA_FIELD_ROW_HEIGHT", { enumerable: true, get: function () { return schema_field_info_1.SCHEMA_FIELD_ROW_HEIGHT; } });
|
|
29
29
|
Object.defineProperty(exports, "UNSUPPORTED_FIELD_ROW_HEIGHT", { enumerable: true, get: function () { return schema_field_info_1.UNSUPPORTED_FIELD_ROW_HEIGHT; } });
|
|
30
30
|
Object.defineProperty(exports, "getFieldsToShow", { enumerable: true, get: function () { return schema_field_info_1.getFieldsToShow; } });
|
|
31
|
-
const source_map_endpoint_1 = require("./source-map-endpoint");
|
|
32
|
-
Object.defineProperty(exports, "SOURCE_MAP_ENDPOINT", { enumerable: true, get: function () { return source_map_endpoint_1.SOURCE_MAP_ENDPOINT; } });
|
|
33
31
|
const stringify_default_props_1 = require("./stringify-default-props");
|
|
34
32
|
Object.defineProperty(exports, "stringifyDefaultProps", { enumerable: true, get: function () { return stringify_default_props_1.stringifyDefaultProps; } });
|
|
33
|
+
const optimistic_update_for_code_values_1 = require("./optimistic-update-for-code-values");
|
|
34
|
+
Object.defineProperty(exports, "optimisticUpdateForCodeValues", { enumerable: true, get: function () { return optimistic_update_for_code_values_1.optimisticUpdateForCodeValues; } });
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type CanUpdateSequencePropsResponse, type SequenceSchema } from 'remotion';
|
|
2
|
+
export declare const optimisticUpdateForCodeValues: ({ previous, fieldKey, value, schema, }: {
|
|
3
|
+
previous: CanUpdateSequencePropsResponse;
|
|
4
|
+
fieldKey: string;
|
|
5
|
+
value: unknown;
|
|
6
|
+
schema: SequenceSchema;
|
|
7
|
+
}) => CanUpdateSequencePropsResponse;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.optimisticUpdateForCodeValues = void 0;
|
|
4
|
+
const no_react_1 = require("remotion/no-react");
|
|
5
|
+
const optimisticUpdateForCodeValues = ({ previous, fieldKey, value, schema, }) => {
|
|
6
|
+
var _a;
|
|
7
|
+
if (!previous.canUpdate) {
|
|
8
|
+
return previous;
|
|
9
|
+
}
|
|
10
|
+
const props = {
|
|
11
|
+
...previous.props,
|
|
12
|
+
[fieldKey]: { canUpdate: true, codeValue: value },
|
|
13
|
+
};
|
|
14
|
+
if (((_a = schema[fieldKey]) === null || _a === void 0 ? void 0 : _a.type) === 'enum') {
|
|
15
|
+
const propsToDelete = no_react_1.NoReactInternals.findPropsToDelete({
|
|
16
|
+
schema,
|
|
17
|
+
key: fieldKey,
|
|
18
|
+
value,
|
|
19
|
+
});
|
|
20
|
+
for (const propToDelete of propsToDelete) {
|
|
21
|
+
delete props[propToDelete];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
canUpdate: true,
|
|
26
|
+
props,
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
exports.optimisticUpdateForCodeValues = optimisticUpdateForCodeValues;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CodeValues, DragOverrides, SequenceControls,
|
|
1
|
+
import type { CodeValues, DragOverrides, SequenceControls, VisibleFieldSchema, SequenceSchema, GetDragOverrides, GetCodeValues, SequenceNodePath } from 'remotion';
|
|
2
2
|
export type { CodeValues, DragOverrides, SequenceControls };
|
|
3
3
|
export type SchemaFieldInfo = {
|
|
4
4
|
key: string;
|
|
@@ -7,7 +7,7 @@ export type SchemaFieldInfo = {
|
|
|
7
7
|
supported: boolean;
|
|
8
8
|
rowHeight: number;
|
|
9
9
|
currentRuntimeValue: unknown;
|
|
10
|
-
fieldSchema:
|
|
10
|
+
fieldSchema: VisibleFieldSchema;
|
|
11
11
|
};
|
|
12
12
|
export declare const SCHEMA_FIELD_ROW_HEIGHT = 22;
|
|
13
13
|
export declare const UNSUPPORTED_FIELD_ROW_HEIGHT = 22;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getFieldsToShow = exports.UNSUPPORTED_FIELD_ROW_HEIGHT = exports.SCHEMA_FIELD_ROW_HEIGHT = void 0;
|
|
4
4
|
const remotion_1 = require("remotion");
|
|
5
|
+
const no_react_1 = require("remotion/no-react");
|
|
5
6
|
exports.SCHEMA_FIELD_ROW_HEIGHT = 22;
|
|
6
7
|
exports.UNSUPPORTED_FIELD_ROW_HEIGHT = 22;
|
|
7
8
|
const SUPPORTED_SCHEMA_TYPES = new Set([
|
|
@@ -12,16 +13,20 @@ const SUPPORTED_SCHEMA_TYPES = new Set([
|
|
|
12
13
|
'enum',
|
|
13
14
|
]);
|
|
14
15
|
const getFieldsToShow = ({ getDragOverrides, getCodeValues, nodePath, schema, currentRuntimeValueDotNotation, }) => {
|
|
15
|
-
const valuesDotNotation = remotion_1.Internals.computeEffectiveSchemaValuesDotNotation({
|
|
16
|
+
const { merged: valuesDotNotation } = remotion_1.Internals.computeEffectiveSchemaValuesDotNotation({
|
|
16
17
|
schema,
|
|
17
18
|
currentValue: currentRuntimeValueDotNotation,
|
|
18
19
|
overrideValues: getDragOverrides(nodePath),
|
|
19
20
|
propStatus: getCodeValues(nodePath),
|
|
20
21
|
});
|
|
21
22
|
const activeSchema = remotion_1.Internals.flattenActiveSchema(schema, (key) => valuesDotNotation[key]);
|
|
22
|
-
return Object.entries(activeSchema)
|
|
23
|
+
return Object.entries(activeSchema)
|
|
24
|
+
.map(([key, fieldSchema]) => {
|
|
23
25
|
const typeName = fieldSchema.type;
|
|
24
26
|
const supported = SUPPORTED_SCHEMA_TYPES.has(typeName);
|
|
27
|
+
if (typeName === 'hidden') {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
25
30
|
return {
|
|
26
31
|
key,
|
|
27
32
|
description: fieldSchema.description,
|
|
@@ -33,6 +38,7 @@ const getFieldsToShow = ({ getDragOverrides, getCodeValues, nodePath, schema, cu
|
|
|
33
38
|
currentRuntimeValue: currentRuntimeValueDotNotation[key],
|
|
34
39
|
fieldSchema,
|
|
35
40
|
};
|
|
36
|
-
})
|
|
41
|
+
})
|
|
42
|
+
.filter(no_react_1.NoReactInternals.truthy);
|
|
37
43
|
};
|
|
38
44
|
exports.getFieldsToShow = getFieldsToShow;
|
package/package.json
CHANGED
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/studio-shared"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/studio-shared",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.461",
|
|
7
7
|
"description": "Internal package for shared objects between the Studio backend and frontend",
|
|
8
8
|
"main": "dist",
|
|
9
9
|
"sideEffects": false,
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint src",
|
|
12
|
+
"test": "bun test src",
|
|
12
13
|
"formatting": "oxfmt src --check",
|
|
13
14
|
"format": "oxfmt src",
|
|
14
15
|
"make": "tsgo -d"
|
|
@@ -20,11 +21,11 @@
|
|
|
20
21
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
21
22
|
},
|
|
22
23
|
"dependencies": {
|
|
23
|
-
"remotion": "4.0.
|
|
24
|
+
"remotion": "4.0.461"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
|
-
"@remotion/renderer": "4.0.
|
|
27
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
27
|
+
"@remotion/renderer": "4.0.461",
|
|
28
|
+
"@remotion/eslint-config-internal": "4.0.461",
|
|
28
29
|
"eslint": "9.19.0",
|
|
29
30
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
30
31
|
},
|