@remotion/studio-shared 4.0.500 → 4.0.502
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/api-requests.d.ts +36 -1
- package/dist/browser-studio-operations.d.ts +33 -0
- package/dist/browser-studio-operations.js +2 -0
- package/dist/composition-drag-data.d.ts +1 -1
- package/dist/effect-catalog.d.ts +1 -1
- package/dist/esm/index.mjs +3700 -0
- package/dist/esm/keyframe-easing-presets.mjs +123 -0
- package/dist/esm/keyframe-interpolation-function.mjs +114 -0
- package/dist/esm/parse-spring-easing-config.mjs +92 -0
- package/dist/esm/studio-entry-points.mjs +19 -0
- package/dist/esm/studio-html.mjs +102 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +5 -1
- package/dist/keyframe-clipboard-data.d.ts +1 -0
- package/dist/keyframe-clipboard-data.js +1 -0
- package/dist/keyframe-interpolation-function.js +2 -0
- package/dist/package-info.d.ts +2 -2
- package/dist/package-info.js +8 -4
- package/dist/schema-field-info.d.ts +5 -1
- package/dist/schema-field-info.js +48 -0
- package/dist/style-property-relations.d.ts +3 -0
- package/dist/style-property-relations.js +18 -0
- package/package.json +56 -9
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getEffectFieldsToShow = exports.getFieldsToShow = exports.getSchemaFieldGroup = exports.SCHEMA_FIELD_GROUPS = exports.SCHEMA_FIELD_ROW_HEIGHT = void 0;
|
|
4
4
|
const remotion_1 = require("remotion");
|
|
5
5
|
const no_react_1 = require("remotion/no-react");
|
|
6
|
+
const style_property_relations_1 = require("./style-property-relations");
|
|
6
7
|
exports.SCHEMA_FIELD_ROW_HEIGHT = 22;
|
|
7
8
|
exports.SCHEMA_FIELD_GROUPS = [
|
|
8
9
|
{ id: 'source', label: 'Source' },
|
|
@@ -11,6 +12,7 @@ exports.SCHEMA_FIELD_GROUPS = [
|
|
|
11
12
|
{ id: 'text', label: 'Text' },
|
|
12
13
|
{ id: 'background', label: 'Background' },
|
|
13
14
|
{ id: 'border', label: 'Border' },
|
|
15
|
+
{ id: 'border-radius', label: 'Border radius' },
|
|
14
16
|
{ id: 'crop', label: 'Crop' },
|
|
15
17
|
{ id: 'layout', label: 'Layout' },
|
|
16
18
|
];
|
|
@@ -31,6 +33,38 @@ const CROP_FIELD_KEYS = new Set([
|
|
|
31
33
|
'cropTop',
|
|
32
34
|
'cropBottom',
|
|
33
35
|
]);
|
|
36
|
+
const BORDER_RADIUS_FIELD_KEYS = new Set([
|
|
37
|
+
'style.borderRadius',
|
|
38
|
+
'style.borderTopLeftRadius',
|
|
39
|
+
'style.borderTopRightRadius',
|
|
40
|
+
'style.borderBottomRightRadius',
|
|
41
|
+
'style.borderBottomLeftRadius',
|
|
42
|
+
]);
|
|
43
|
+
const getBorderRadiusFieldKeysToShow = ({ activeSchema, propStatuses, nodePath, }) => {
|
|
44
|
+
if (!(style_property_relations_1.BORDER_RADIUS_SHORTHAND_KEY in activeSchema)) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
const statuses = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath);
|
|
48
|
+
const shorthand = statuses === null || statuses === void 0 ? void 0 : statuses[style_property_relations_1.BORDER_RADIUS_SHORTHAND_KEY];
|
|
49
|
+
const longhands = style_property_relations_1.BORDER_RADIUS_LONGHAND_KEYS.map((key) => statuses === null || statuses === void 0 ? void 0 : statuses[key]);
|
|
50
|
+
// A supported shorthand is canonical even though the server also reports its
|
|
51
|
+
// expanded longhand values. This keeps one Inspector row and one keyframe track.
|
|
52
|
+
if ((shorthand === null || shorthand === void 0 ? void 0 : shorthand.status) === 'keyframed') {
|
|
53
|
+
return new Set([style_property_relations_1.BORDER_RADIUS_SHORTHAND_KEY]);
|
|
54
|
+
}
|
|
55
|
+
if ((shorthand === null || shorthand === void 0 ? void 0 : shorthand.status) === 'static' && shorthand.codeValue !== undefined) {
|
|
56
|
+
return new Set([style_property_relations_1.BORDER_RADIUS_SHORTHAND_KEY]);
|
|
57
|
+
}
|
|
58
|
+
const hasEditableLonghand = longhands.some((status) => (status === null || status === void 0 ? void 0 : status.status) === 'keyframed' ||
|
|
59
|
+
((status === null || status === void 0 ? void 0 : status.status) === 'static' && status.codeValue !== undefined));
|
|
60
|
+
if (hasEditableLonghand) {
|
|
61
|
+
return new Set(style_property_relations_1.BORDER_RADIUS_LONGHAND_KEYS);
|
|
62
|
+
}
|
|
63
|
+
// No radius has been authored, an unsupported dynamic shorthand was authored,
|
|
64
|
+
// or shorthand and longhands were mixed. In all three cases, only show the
|
|
65
|
+
// shorthand row so duplicate representations never reach the Inspector/timeline.
|
|
66
|
+
return new Set([style_property_relations_1.BORDER_RADIUS_SHORTHAND_KEY]);
|
|
67
|
+
};
|
|
34
68
|
const BORDER_FIELD_KEYS = new Set([
|
|
35
69
|
'style.borderWidth',
|
|
36
70
|
'style.borderStyle',
|
|
@@ -59,6 +93,9 @@ const getSchemaFieldGroup = (key) => {
|
|
|
59
93
|
if (CROP_FIELD_KEYS.has(key)) {
|
|
60
94
|
return 'crop';
|
|
61
95
|
}
|
|
96
|
+
if (BORDER_RADIUS_FIELD_KEYS.has(key)) {
|
|
97
|
+
return 'border-radius';
|
|
98
|
+
}
|
|
62
99
|
if (BORDER_FIELD_KEYS.has(key)) {
|
|
63
100
|
return 'border';
|
|
64
101
|
}
|
|
@@ -90,6 +127,7 @@ const TIMELINE_SCHEMA_FIELD_TYPE_SUPPORT = {
|
|
|
90
127
|
array: true,
|
|
91
128
|
asset: true,
|
|
92
129
|
boolean: true,
|
|
130
|
+
'remotion-captions': false,
|
|
93
131
|
color: true,
|
|
94
132
|
enum: true,
|
|
95
133
|
'font-family': true,
|
|
@@ -146,8 +184,18 @@ const getFieldsToShow = ({ getDragOverrides, propStatuses, nodePath, schema, cur
|
|
|
146
184
|
frame: null,
|
|
147
185
|
});
|
|
148
186
|
const activeSchema = remotion_1.Internals.flattenActiveSchema(schema, (key) => valuesDotNotation[key]);
|
|
187
|
+
const borderRadiusFieldKeysToShow = getBorderRadiusFieldKeysToShow({
|
|
188
|
+
activeSchema,
|
|
189
|
+
propStatuses,
|
|
190
|
+
nodePath,
|
|
191
|
+
});
|
|
149
192
|
const fields = Object.entries(activeSchema)
|
|
150
193
|
.map(([key, fieldSchema]) => {
|
|
194
|
+
if (BORDER_RADIUS_FIELD_KEYS.has(key) &&
|
|
195
|
+
borderRadiusFieldKeysToShow !== null &&
|
|
196
|
+
!borderRadiusFieldKeysToShow.has(key)) {
|
|
197
|
+
return null;
|
|
198
|
+
}
|
|
151
199
|
if (!isTimelineSchemaFieldSupported(fieldSchema)) {
|
|
152
200
|
return null;
|
|
153
201
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const BORDER_RADIUS_SHORTHAND_KEY = "style.borderRadius";
|
|
2
|
+
export declare const BORDER_RADIUS_LONGHAND_KEYS: readonly ["style.borderTopLeftRadius", "style.borderTopRightRadius", "style.borderBottomRightRadius", "style.borderBottomLeftRadius"];
|
|
3
|
+
export declare const getStylePropertyLonghandKeys: (fieldKey: string) => readonly string[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getStylePropertyLonghandKeys = exports.BORDER_RADIUS_LONGHAND_KEYS = exports.BORDER_RADIUS_SHORTHAND_KEY = void 0;
|
|
4
|
+
exports.BORDER_RADIUS_SHORTHAND_KEY = 'style.borderRadius';
|
|
5
|
+
exports.BORDER_RADIUS_LONGHAND_KEYS = [
|
|
6
|
+
'style.borderTopLeftRadius',
|
|
7
|
+
'style.borderTopRightRadius',
|
|
8
|
+
'style.borderBottomRightRadius',
|
|
9
|
+
'style.borderBottomLeftRadius',
|
|
10
|
+
];
|
|
11
|
+
const STYLE_PROPERTY_LONGHANDS = new Map([
|
|
12
|
+
[exports.BORDER_RADIUS_SHORTHAND_KEY, exports.BORDER_RADIUS_LONGHAND_KEYS],
|
|
13
|
+
]);
|
|
14
|
+
const getStylePropertyLonghandKeys = (fieldKey) => {
|
|
15
|
+
var _a;
|
|
16
|
+
return (_a = STYLE_PROPERTY_LONGHANDS.get(fieldKey)) !== null && _a !== void 0 ? _a : [];
|
|
17
|
+
};
|
|
18
|
+
exports.getStylePropertyLonghandKeys = getStylePropertyLonghandKeys;
|
package/package.json
CHANGED
|
@@ -3,15 +3,16 @@
|
|
|
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.502",
|
|
7
7
|
"description": "Internal package for shared objects between the Studio backend and frontend",
|
|
8
8
|
"main": "dist",
|
|
9
|
+
"module": "dist/esm/index.mjs",
|
|
9
10
|
"scripts": {
|
|
10
11
|
"lint": "eslint src",
|
|
11
12
|
"test": "bun test src",
|
|
12
13
|
"formatting": "oxfmt src --check",
|
|
13
14
|
"format": "oxfmt src",
|
|
14
|
-
"make": "tsgo -d"
|
|
15
|
+
"make": "tsgo -d && bun --env-file=../.env.bundle bundle.ts"
|
|
15
16
|
},
|
|
16
17
|
"author": "Jonny Burger <jonny@remotion.dev>",
|
|
17
18
|
"contributors": [],
|
|
@@ -20,12 +21,12 @@
|
|
|
20
21
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
21
22
|
},
|
|
22
23
|
"dependencies": {
|
|
23
|
-
"@remotion/
|
|
24
|
-
"remotion": "4.0.
|
|
24
|
+
"@remotion/studio-protocol": "4.0.502",
|
|
25
|
+
"remotion": "4.0.502"
|
|
25
26
|
},
|
|
26
27
|
"devDependencies": {
|
|
27
|
-
"@remotion/renderer": "4.0.
|
|
28
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
28
|
+
"@remotion/renderer": "4.0.502",
|
|
29
|
+
"@remotion/eslint-config-internal": "4.0.502",
|
|
29
30
|
"eslint": "9.19.0",
|
|
30
31
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
31
32
|
},
|
|
@@ -33,15 +34,61 @@
|
|
|
33
34
|
"access": "public"
|
|
34
35
|
},
|
|
35
36
|
"exports": {
|
|
36
|
-
".":
|
|
37
|
+
".": {
|
|
38
|
+
"types": "./dist/index.d.ts",
|
|
39
|
+
"require": "./dist/index.js",
|
|
40
|
+
"module": "./dist/esm/index.mjs",
|
|
41
|
+
"import": "./dist/esm/index.mjs"
|
|
42
|
+
},
|
|
37
43
|
"./studio-entry-points": {
|
|
38
44
|
"types": "./dist/studio-entry-points.d.ts",
|
|
39
|
-
"
|
|
45
|
+
"require": "./dist/studio-entry-points.js",
|
|
46
|
+
"module": "./dist/esm/studio-entry-points.mjs",
|
|
47
|
+
"import": "./dist/esm/studio-entry-points.mjs"
|
|
40
48
|
},
|
|
41
49
|
"./studio-html": {
|
|
42
50
|
"types": "./dist/studio-html.d.ts",
|
|
43
|
-
"
|
|
51
|
+
"require": "./dist/studio-html.js",
|
|
52
|
+
"module": "./dist/esm/studio-html.mjs",
|
|
53
|
+
"import": "./dist/esm/studio-html.mjs"
|
|
54
|
+
},
|
|
55
|
+
"./keyframe-easing-presets": {
|
|
56
|
+
"types": "./dist/keyframe-easing-presets.d.ts",
|
|
57
|
+
"require": "./dist/keyframe-easing-presets.js",
|
|
58
|
+
"module": "./dist/esm/keyframe-easing-presets.mjs",
|
|
59
|
+
"import": "./dist/esm/keyframe-easing-presets.mjs"
|
|
60
|
+
},
|
|
61
|
+
"./keyframe-interpolation-function": {
|
|
62
|
+
"types": "./dist/keyframe-interpolation-function.d.ts",
|
|
63
|
+
"require": "./dist/keyframe-interpolation-function.js",
|
|
64
|
+
"module": "./dist/esm/keyframe-interpolation-function.mjs",
|
|
65
|
+
"import": "./dist/esm/keyframe-interpolation-function.mjs"
|
|
66
|
+
},
|
|
67
|
+
"./parse-spring-easing-config": {
|
|
68
|
+
"types": "./dist/parse-spring-easing-config.d.ts",
|
|
69
|
+
"require": "./dist/parse-spring-easing-config.js",
|
|
70
|
+
"module": "./dist/esm/parse-spring-easing-config.mjs",
|
|
71
|
+
"import": "./dist/esm/parse-spring-easing-config.mjs"
|
|
44
72
|
},
|
|
45
73
|
"./package.json": "./package.json"
|
|
74
|
+
},
|
|
75
|
+
"typesVersions": {
|
|
76
|
+
">=1.0": {
|
|
77
|
+
"studio-entry-points": [
|
|
78
|
+
"./dist/studio-entry-points.d.ts"
|
|
79
|
+
],
|
|
80
|
+
"studio-html": [
|
|
81
|
+
"./dist/studio-html.d.ts"
|
|
82
|
+
],
|
|
83
|
+
"keyframe-easing-presets": [
|
|
84
|
+
"./dist/keyframe-easing-presets.d.ts"
|
|
85
|
+
],
|
|
86
|
+
"keyframe-interpolation-function": [
|
|
87
|
+
"./dist/keyframe-interpolation-function.d.ts"
|
|
88
|
+
],
|
|
89
|
+
"parse-spring-easing-config": [
|
|
90
|
+
"./dist/parse-spring-easing-config.d.ts"
|
|
91
|
+
]
|
|
92
|
+
}
|
|
46
93
|
}
|
|
47
94
|
}
|