@remotion/studio-shared 4.0.501 → 4.0.503
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 +57 -2
- package/dist/browser-studio-operations.d.ts +6 -1
- package/dist/composition-drag-data.d.ts +1 -1
- package/dist/define-plugin-definitions.d.ts +3 -1
- package/dist/define-plugin-definitions.js +2 -1
- package/dist/effect-catalog.d.ts +1 -1
- package/dist/element-drag-data.d.ts +1 -3
- package/dist/element-drag-data.js +2 -11
- package/dist/esm/index.mjs +3696 -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 -3
- package/dist/index.js +10 -10
- package/dist/optimistic-update-for-code-values.d.ts +7 -0
- package/dist/optimistic-update-for-code-values.js +30 -0
- package/dist/optimistic-update-for-effect-code-values.d.ts +8 -0
- package/dist/optimistic-update-for-effect-code-values.js +43 -0
- package/dist/package-info.d.ts +2 -2
- package/dist/package-info.js +4 -8
- package/dist/shape-drag-data.d.ts +22 -0
- package/dist/shape-drag-data.js +90 -0
- package/package.json +56 -9
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
// src/keyframe-easing-presets.ts
|
|
2
|
+
var LINEAR_KEYFRAME_EASING = { type: "linear" };
|
|
3
|
+
var EASE_KEYFRAME_EASING = {
|
|
4
|
+
type: "bezier",
|
|
5
|
+
x1: 0.42,
|
|
6
|
+
y1: 0,
|
|
7
|
+
x2: 1,
|
|
8
|
+
y2: 1
|
|
9
|
+
};
|
|
10
|
+
var QUAD_KEYFRAME_EASING = {
|
|
11
|
+
type: "bezier",
|
|
12
|
+
x1: 1 / 3,
|
|
13
|
+
y1: 0,
|
|
14
|
+
x2: 2 / 3,
|
|
15
|
+
y2: 1 / 3
|
|
16
|
+
};
|
|
17
|
+
var CUBIC_KEYFRAME_EASING = {
|
|
18
|
+
type: "bezier",
|
|
19
|
+
x1: 1 / 3,
|
|
20
|
+
y1: 0,
|
|
21
|
+
x2: 2 / 3,
|
|
22
|
+
y2: 0
|
|
23
|
+
};
|
|
24
|
+
var getBackKeyframeEasing = (s = 1.70158) => ({
|
|
25
|
+
type: "bezier",
|
|
26
|
+
x1: 1 / 3,
|
|
27
|
+
y1: 0,
|
|
28
|
+
x2: 2 / 3,
|
|
29
|
+
y2: -s / 3
|
|
30
|
+
});
|
|
31
|
+
var getPolyKeyframeEasing = (n) => {
|
|
32
|
+
if (n === 1) {
|
|
33
|
+
return LINEAR_KEYFRAME_EASING;
|
|
34
|
+
}
|
|
35
|
+
if (n === 2) {
|
|
36
|
+
return QUAD_KEYFRAME_EASING;
|
|
37
|
+
}
|
|
38
|
+
if (n === 3) {
|
|
39
|
+
return CUBIC_KEYFRAME_EASING;
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
};
|
|
43
|
+
var getOutKeyframeEasing = (easing) => {
|
|
44
|
+
if (easing.type === "linear") {
|
|
45
|
+
return LINEAR_KEYFRAME_EASING;
|
|
46
|
+
}
|
|
47
|
+
if (easing.type !== "bezier") {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
type: "bezier",
|
|
52
|
+
x1: 1 - easing.x2,
|
|
53
|
+
y1: 1 - easing.y2,
|
|
54
|
+
x2: 1 - easing.x1,
|
|
55
|
+
y2: 1 - easing.y1
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
var KEYFRAME_EASING_PRESETS = [
|
|
59
|
+
{
|
|
60
|
+
id: "ease-in",
|
|
61
|
+
label: "Ease in",
|
|
62
|
+
easing: { type: "bezier", x1: 0.42, y1: 0, x2: 1, y2: 1 }
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "ease-out",
|
|
66
|
+
label: "Ease out",
|
|
67
|
+
easing: { type: "bezier", x1: 0, y1: 0, x2: 0.58, y2: 1 }
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: "ease-in-out",
|
|
71
|
+
label: "Ease in-out",
|
|
72
|
+
easing: { type: "bezier", x1: 0.42, y1: 0, x2: 0.58, y2: 1 }
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: "tail-spring",
|
|
76
|
+
label: "Tail spring",
|
|
77
|
+
easing: {
|
|
78
|
+
type: "spring",
|
|
79
|
+
allowTail: true,
|
|
80
|
+
damping: 200,
|
|
81
|
+
durationRestThreshold: 0.02,
|
|
82
|
+
mass: 1,
|
|
83
|
+
overshootClamping: false,
|
|
84
|
+
stiffness: 100
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: "spring",
|
|
89
|
+
label: "Spring",
|
|
90
|
+
easing: {
|
|
91
|
+
type: "spring",
|
|
92
|
+
allowTail: true,
|
|
93
|
+
damping: 10,
|
|
94
|
+
durationRestThreshold: 0.02,
|
|
95
|
+
mass: 1,
|
|
96
|
+
overshootClamping: false,
|
|
97
|
+
stiffness: 100
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: "bouncy-spring",
|
|
102
|
+
label: "Bouncy spring",
|
|
103
|
+
easing: {
|
|
104
|
+
type: "spring",
|
|
105
|
+
allowTail: true,
|
|
106
|
+
damping: 5,
|
|
107
|
+
durationRestThreshold: 0.02,
|
|
108
|
+
mass: 1,
|
|
109
|
+
overshootClamping: false,
|
|
110
|
+
stiffness: 120
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
];
|
|
114
|
+
export {
|
|
115
|
+
getPolyKeyframeEasing,
|
|
116
|
+
getOutKeyframeEasing,
|
|
117
|
+
getBackKeyframeEasing,
|
|
118
|
+
QUAD_KEYFRAME_EASING,
|
|
119
|
+
LINEAR_KEYFRAME_EASING,
|
|
120
|
+
KEYFRAME_EASING_PRESETS,
|
|
121
|
+
EASE_KEYFRAME_EASING,
|
|
122
|
+
CUBIC_KEYFRAME_EASING
|
|
123
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// src/keyframe-interpolation-function.ts
|
|
2
|
+
var keyframeInterpolationFunctions = [
|
|
3
|
+
"interpolate",
|
|
4
|
+
"interpolateColors"
|
|
5
|
+
];
|
|
6
|
+
var KEYFRAME_FIELD_TYPE_SUPPORT = {
|
|
7
|
+
array: false,
|
|
8
|
+
asset: false,
|
|
9
|
+
boolean: false,
|
|
10
|
+
"remotion-captions": false,
|
|
11
|
+
color: true,
|
|
12
|
+
enum: false,
|
|
13
|
+
"font-family": false,
|
|
14
|
+
hidden: true,
|
|
15
|
+
number: true,
|
|
16
|
+
"rotation-css": true,
|
|
17
|
+
"rotation-degrees": true,
|
|
18
|
+
scale: true,
|
|
19
|
+
"text-content": false,
|
|
20
|
+
"transform-origin": true,
|
|
21
|
+
translate: true,
|
|
22
|
+
"uv-coordinate": true
|
|
23
|
+
};
|
|
24
|
+
var KEYFRAME_FIELD_TYPE_INTERPOLATION = {
|
|
25
|
+
array: "unsupported",
|
|
26
|
+
asset: "unsupported",
|
|
27
|
+
boolean: "unsupported",
|
|
28
|
+
"remotion-captions": "unsupported",
|
|
29
|
+
color: "interpolateColors",
|
|
30
|
+
enum: "unsupported",
|
|
31
|
+
"font-family": "unsupported",
|
|
32
|
+
hidden: "infer",
|
|
33
|
+
number: "infer",
|
|
34
|
+
"rotation-css": "interpolate",
|
|
35
|
+
"rotation-degrees": "infer",
|
|
36
|
+
scale: "interpolate",
|
|
37
|
+
"text-content": "unsupported",
|
|
38
|
+
"transform-origin": "interpolate",
|
|
39
|
+
translate: "interpolate",
|
|
40
|
+
"uv-coordinate": "infer"
|
|
41
|
+
};
|
|
42
|
+
var KEYFRAME_INTERPOLATION_EASING_SUPPORT = {
|
|
43
|
+
interpolate: true,
|
|
44
|
+
interpolateColors: true
|
|
45
|
+
};
|
|
46
|
+
var isKeyframeInterpolationFunction = (name) => {
|
|
47
|
+
return keyframeInterpolationFunctions.includes(name);
|
|
48
|
+
};
|
|
49
|
+
var canEditEasingForInterpolationFunction = (interpolationFunction) => isKeyframeInterpolationFunction(interpolationFunction) && KEYFRAME_INTERPOLATION_EASING_SUPPORT[interpolationFunction];
|
|
50
|
+
var isInteractivitySchemaFieldKeyframable = (field) => {
|
|
51
|
+
if (!field) {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
return KEYFRAME_FIELD_TYPE_SUPPORT[field.type] && field.keyframable !== false;
|
|
55
|
+
};
|
|
56
|
+
var findFieldInSchema = (schema, key) => {
|
|
57
|
+
if (key in schema) {
|
|
58
|
+
return schema[key];
|
|
59
|
+
}
|
|
60
|
+
for (const field of Object.values(schema)) {
|
|
61
|
+
if (field.type !== "enum") {
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
for (const variant of Object.values(field.variants)) {
|
|
65
|
+
const found = findFieldInSchema(variant, key);
|
|
66
|
+
if (found) {
|
|
67
|
+
return found;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return;
|
|
72
|
+
};
|
|
73
|
+
var isSchemaFieldKeyframable = ({
|
|
74
|
+
schema,
|
|
75
|
+
key
|
|
76
|
+
}) => {
|
|
77
|
+
const field = schema ? findFieldInSchema(schema, key) : undefined;
|
|
78
|
+
return isInteractivitySchemaFieldKeyframable(field);
|
|
79
|
+
};
|
|
80
|
+
var getKeyframeInterpolationFunctionForSchemaField = ({
|
|
81
|
+
schema,
|
|
82
|
+
key
|
|
83
|
+
}) => {
|
|
84
|
+
const field = schema ? findFieldInSchema(schema, key) : undefined;
|
|
85
|
+
if (!field) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
const strategy = KEYFRAME_FIELD_TYPE_INTERPOLATION[field.type];
|
|
89
|
+
return strategy === "infer" || strategy === "unsupported" ? null : strategy;
|
|
90
|
+
};
|
|
91
|
+
var getKeyframeInterpolationFunction = ({
|
|
92
|
+
schema,
|
|
93
|
+
key,
|
|
94
|
+
staticValue,
|
|
95
|
+
newValue
|
|
96
|
+
}) => {
|
|
97
|
+
const schemaFunction = getKeyframeInterpolationFunctionForSchemaField({
|
|
98
|
+
schema,
|
|
99
|
+
key
|
|
100
|
+
});
|
|
101
|
+
if (schemaFunction) {
|
|
102
|
+
return schemaFunction;
|
|
103
|
+
}
|
|
104
|
+
return typeof staticValue === "string" && typeof newValue === "string" ? "interpolateColors" : "interpolate";
|
|
105
|
+
};
|
|
106
|
+
export {
|
|
107
|
+
keyframeInterpolationFunctions,
|
|
108
|
+
isSchemaFieldKeyframable,
|
|
109
|
+
isKeyframeInterpolationFunction,
|
|
110
|
+
isInteractivitySchemaFieldKeyframable,
|
|
111
|
+
getKeyframeInterpolationFunctionForSchemaField,
|
|
112
|
+
getKeyframeInterpolationFunction,
|
|
113
|
+
canEditEasingForInterpolationFunction
|
|
114
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// src/parse-spring-easing-config.ts
|
|
2
|
+
var DEFAULT_SPRING_EASING = {
|
|
3
|
+
type: "spring",
|
|
4
|
+
allowTail: null,
|
|
5
|
+
damping: 10,
|
|
6
|
+
durationRestThreshold: null,
|
|
7
|
+
mass: 1,
|
|
8
|
+
overshootClamping: false,
|
|
9
|
+
stiffness: 100
|
|
10
|
+
};
|
|
11
|
+
var isAstNode = (value) => {
|
|
12
|
+
return typeof value === "object" && value !== null && typeof value.type === "string";
|
|
13
|
+
};
|
|
14
|
+
var getNumericValue = (node) => {
|
|
15
|
+
if (node.type === "NumericLiteral") {
|
|
16
|
+
return typeof node.value === "number" ? node.value : null;
|
|
17
|
+
}
|
|
18
|
+
if (node.type === "UnaryExpression" && (node.operator === "-" || node.operator === "+") && isAstNode(node.argument) && node.argument.type === "NumericLiteral" && typeof node.argument.value === "number") {
|
|
19
|
+
return node.operator === "-" ? -node.argument.value : node.argument.value;
|
|
20
|
+
}
|
|
21
|
+
if (node.type === "TSAsExpression" && isAstNode(node.expression)) {
|
|
22
|
+
return getNumericValue(node.expression);
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
};
|
|
26
|
+
var getBooleanValue = (node) => {
|
|
27
|
+
if (node.type === "BooleanLiteral") {
|
|
28
|
+
return typeof node.value === "boolean" ? node.value : null;
|
|
29
|
+
}
|
|
30
|
+
if (node.type === "TSAsExpression" && isAstNode(node.expression)) {
|
|
31
|
+
return getBooleanValue(node.expression);
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
};
|
|
35
|
+
var getObjectPropertyName = (prop) => {
|
|
36
|
+
if (prop.computed === true || !isAstNode(prop.key)) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
if (prop.key.type === "Identifier") {
|
|
40
|
+
return typeof prop.key.name === "string" ? prop.key.name : null;
|
|
41
|
+
}
|
|
42
|
+
if (prop.key.type === "StringLiteral") {
|
|
43
|
+
return typeof prop.key.value === "string" ? prop.key.value : null;
|
|
44
|
+
}
|
|
45
|
+
return null;
|
|
46
|
+
};
|
|
47
|
+
var parseSpringEasingConfig = (node) => {
|
|
48
|
+
if (node === undefined) {
|
|
49
|
+
return { ...DEFAULT_SPRING_EASING };
|
|
50
|
+
}
|
|
51
|
+
if (!isAstNode(node)) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
if (node.type === "TSAsExpression") {
|
|
55
|
+
return parseSpringEasingConfig(node.expression);
|
|
56
|
+
}
|
|
57
|
+
if (node.type !== "ObjectExpression" || !Array.isArray(node.properties)) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
const spring = { ...DEFAULT_SPRING_EASING };
|
|
61
|
+
for (const prop of node.properties) {
|
|
62
|
+
if (!isAstNode(prop) || prop.type !== "ObjectProperty") {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
const key = getObjectPropertyName(prop);
|
|
66
|
+
if (!key || !isAstNode(prop.value)) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
if (key === "damping" || key === "mass" || key === "stiffness" || key === "durationRestThreshold") {
|
|
70
|
+
const numericValue = getNumericValue(prop.value);
|
|
71
|
+
if (numericValue === null || !Number.isFinite(numericValue) || numericValue <= 0) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
spring[key] = numericValue;
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
if (key === "overshootClamping" || key === "allowTail") {
|
|
78
|
+
const booleanValue = getBooleanValue(prop.value);
|
|
79
|
+
if (booleanValue === null) {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
spring[key] = booleanValue;
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
return spring;
|
|
88
|
+
};
|
|
89
|
+
export {
|
|
90
|
+
parseSpringEasingConfig,
|
|
91
|
+
DEFAULT_SPRING_EASING
|
|
92
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// src/studio-entry-points.ts
|
|
2
|
+
var getStudioEntryPoints = ({
|
|
3
|
+
fastRefreshRuntime,
|
|
4
|
+
environmentSetup,
|
|
5
|
+
sequenceStackTraces,
|
|
6
|
+
userDefinedComponent,
|
|
7
|
+
reactShim,
|
|
8
|
+
studioRenderEntry
|
|
9
|
+
}) => [
|
|
10
|
+
fastRefreshRuntime,
|
|
11
|
+
environmentSetup,
|
|
12
|
+
sequenceStackTraces,
|
|
13
|
+
userDefinedComponent,
|
|
14
|
+
reactShim,
|
|
15
|
+
studioRenderEntry
|
|
16
|
+
].filter(Boolean);
|
|
17
|
+
export {
|
|
18
|
+
getStudioEntryPoints
|
|
19
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// src/studio-html.ts
|
|
2
|
+
import { Internals, VERSION } from "remotion";
|
|
3
|
+
var studioHtml = ({
|
|
4
|
+
publicPath,
|
|
5
|
+
editorName,
|
|
6
|
+
inputProps,
|
|
7
|
+
envVariables,
|
|
8
|
+
staticHash,
|
|
9
|
+
remotionRoot,
|
|
10
|
+
studioServerCommand,
|
|
11
|
+
renderQueue,
|
|
12
|
+
completedClientRenders,
|
|
13
|
+
numberOfAudioTags,
|
|
14
|
+
publicFiles,
|
|
15
|
+
includeFavicon,
|
|
16
|
+
title,
|
|
17
|
+
renderDefaults,
|
|
18
|
+
publicFolderExists,
|
|
19
|
+
fileSystemPlatform,
|
|
20
|
+
gitSource,
|
|
21
|
+
projectName,
|
|
22
|
+
installedDependencies,
|
|
23
|
+
packageManager,
|
|
24
|
+
audioLatencyHint,
|
|
25
|
+
sampleRate,
|
|
26
|
+
logLevel,
|
|
27
|
+
mode,
|
|
28
|
+
bundleScriptUrl,
|
|
29
|
+
readOnlyStudio,
|
|
30
|
+
studioRuntimeConfig
|
|
31
|
+
}) => {
|
|
32
|
+
const scriptUrl = bundleScriptUrl ?? `${publicPath}bundle.js`;
|
|
33
|
+
const isRelativeBundle = mode === "bundle" && publicPath === "./";
|
|
34
|
+
const staticBaseValue = isRelativeBundle ? `new URL(${JSON.stringify(staticHash)}, window.location.href).pathname` : JSON.stringify(staticHash);
|
|
35
|
+
const staticFilesValue = isRelativeBundle ? `${JSON.stringify(publicFiles)}.map((file) => ({...file, src: new URL(file.src, window.location.href).pathname}))` : JSON.stringify(publicFiles);
|
|
36
|
+
const publicFolderExistsValue = isRelativeBundle && publicFolderExists ? `new URL(${JSON.stringify(publicFolderExists)}, window.location.href).pathname` : JSON.stringify(publicFolderExists);
|
|
37
|
+
return `
|
|
38
|
+
<!DOCTYPE html>
|
|
39
|
+
<html lang="en">
|
|
40
|
+
<head>
|
|
41
|
+
<meta charset="UTF-8" />
|
|
42
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
43
|
+
${includeFavicon ? `<link id="__remotion_favicon" rel="icon" type="image/png" href="${publicPath}favicon.ico" />` : ""}
|
|
44
|
+
<title>${title}</title>
|
|
45
|
+
</head>
|
|
46
|
+
<body>
|
|
47
|
+
<script>window.remotion_numberOfAudioTags = ${numberOfAudioTags};</script>
|
|
48
|
+
<script>window.remotion_audioLatencyHint = "${audioLatencyHint}";</script>
|
|
49
|
+
<script>window.remotion_sampleRate = ${sampleRate};</script>
|
|
50
|
+
<script>window.remotion_previewSampleRate = ${sampleRate};</script>
|
|
51
|
+
${mode === "dev" ? `<script>window.remotion_logLevel = "${logLevel}";</script>` : ""}
|
|
52
|
+
<script>window.remotion_staticBase = ${staticBaseValue};</script>
|
|
53
|
+
${editorName ? `<script>window.remotion_editorName = "${editorName}";</script>` : "<script>window.remotion_editorName = null;</script>"}
|
|
54
|
+
<script>window.remotion_projectName = ${JSON.stringify(projectName)};</script>
|
|
55
|
+
<script>window.remotion_publicPath = ${JSON.stringify(publicPath)};</script>
|
|
56
|
+
<script>window.remotion_audioEnabled = true;</script>
|
|
57
|
+
<script>window.remotion_videoEnabled = true;</script>
|
|
58
|
+
<script>window.remotion_studioConfig = ${JSON.stringify(studioRuntimeConfig ?? null)};</script>
|
|
59
|
+
<script>window.remotion_renderDefaults = ${JSON.stringify(renderDefaults)};</script>
|
|
60
|
+
<script>window.remotion_cwd = ${JSON.stringify(remotionRoot)};</script>
|
|
61
|
+
<script>window.remotion_fileSystemPlatform = ${JSON.stringify(fileSystemPlatform)};</script>
|
|
62
|
+
<script>window.remotion_studioServerCommand = ${studioServerCommand ? JSON.stringify(studioServerCommand) : "null"};</script>
|
|
63
|
+
${inputProps ? `<script>window.remotion_inputProps = ${JSON.stringify(JSON.stringify(inputProps))};</script>` : ""}
|
|
64
|
+
${renderQueue ? `<script>window.remotion_initialRenderQueue = ${JSON.stringify(renderQueue)};</script>` : ""}
|
|
65
|
+
${completedClientRenders ? `<script>window.remotion_initialClientRenders = ${JSON.stringify(completedClientRenders)};</script>` : ""}
|
|
66
|
+
${envVariables ? `<script>window.process = {env: ${JSON.stringify(envVariables)}};</script>` : ""}
|
|
67
|
+
${gitSource ? `<script>window.remotion_gitSource = ${JSON.stringify(gitSource)};</script>` : ""}
|
|
68
|
+
${mode === "dev" ? `
|
|
69
|
+
<script>window.remotion_isStudio = true;</script>
|
|
70
|
+
<script>window.remotion_isReadOnlyStudio = ${readOnlyStudio ? "true" : "false"};</script>`.trimStart() : ""}
|
|
71
|
+
<script>window.remotion_staticFiles = ${staticFilesValue}</script>
|
|
72
|
+
<script>window.remotion_installedPackages = ${JSON.stringify(installedDependencies)}</script>
|
|
73
|
+
<script>window.remotion_packageManager = ${JSON.stringify(packageManager)}</script>
|
|
74
|
+
<script>window.remotion_publicFolderExists = ${publicFolderExistsValue};</script>
|
|
75
|
+
<script>
|
|
76
|
+
// Increment this value when the generated bundle format or behavior changes
|
|
77
|
+
// in a backwards-incompatible way. It is not the Remotion package version
|
|
78
|
+
// and should not be bumped for every generated HTML change.
|
|
79
|
+
// Keep it synchronized with requiredVersion in
|
|
80
|
+
// packages/renderer/src/set-props-and-env.ts by incrementing both values.
|
|
81
|
+
window.siteVersion = '11';
|
|
82
|
+
window.remotion_version = '${VERSION}';
|
|
83
|
+
</script>
|
|
84
|
+
|
|
85
|
+
<div id="video-container"></div>
|
|
86
|
+
<div id="${Internals.REMOTION_STUDIO_CONTAINER_ELEMENT}"></div>
|
|
87
|
+
<div id="remotion-error-overlay"></div>
|
|
88
|
+
<div id="server-disconnected-overlay"></div>
|
|
89
|
+
<div id="menuportal-0"></div>
|
|
90
|
+
<div id="menuportal-1"></div>
|
|
91
|
+
<div id="menuportal-2"></div>
|
|
92
|
+
<div id="menuportal-3"></div>
|
|
93
|
+
<div id="menuportal-4"></div>
|
|
94
|
+
<div id="menuportal-5"></div>
|
|
95
|
+
<script src="${scriptUrl}"></script>
|
|
96
|
+
</body>
|
|
97
|
+
</html>
|
|
98
|
+
`.trim();
|
|
99
|
+
};
|
|
100
|
+
export {
|
|
101
|
+
studioHtml
|
|
102
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { splitAnsi, stripAnsi } from './ansi';
|
|
2
|
+
export { AddEffectKeyframeRequest, AddEffectKeyframeResponse, AddEffectRequest, AddEffectResponse, AddKeyframesRequest, AddKeyframesResponse, AddRenderRequest, AddSequenceKeyframeRequest, AddSequenceKeyframeResponse, ApiRoutes, ApplyCodemodRequest, ApplyCodemodResponse, ApplyVisualControlRequest, ApplyVisualControlResponse, BatchUpdateEffectKeyframeSettings, BatchUpdateKeyframeSettingsRequest, BatchUpdateKeyframeSettingsResponse, BatchUpdateSequenceKeyframeSettings, CanUpdateDefaultPropsResponse, CanUpdateSequencePropsRequest, CancelRenderRequest, CancelRenderResponse, CaptionPatch, CompositionComponentInfoRequest, CompositionComponentInfoResponse, ConvertFigmaClipboardToSvgRequest, ConvertFigmaClipboardToSvgResponse, CopyStillToClipboardRequest, DeleteEffectKeyframe, DeleteEffectRequest, DeleteEffectRequestItem, DeleteEffectResponse, DeleteJsxNodeRequest, DeleteJsxNodeRequestItem, DeleteJsxNodeResponse, DeleteKeyframesRequest, DeleteKeyframesResponse, DeleteSequenceKeyframe, DeleteStaticFileRequest, DeleteStaticFileResponse, DownloadRemoteAssetRequest, DownloadRemoteAssetResponse, DuplicateEffectRequest, DuplicateEffectRequestItem, DuplicateEffectResponse, DuplicateJsxNodeRequest, DuplicateJsxNodeResponse, ElementInstallExpectedFileState, ElementInstallRequest, ElementInstallSource, EditorPickerId, FindInFileRequest, FindInFileResponse, GetDefaultEditorInfoRequest, GetDefaultEditorInfoResponse, GoogleFontSourceEdit, InsertElementFileConflict, InsertElementRequest, InsertElementResponse, InsertJsxElementRequest, InsertJsxElementResponse, InsertableCompositionElement, InsertableCompositionElementPosition, InstallPackageRequest, InstallPackageResponse, LogStudioErrorRequest, LogStudioErrorResponse, MoveEffectKeyframe, MoveKeyframesRequest, MoveKeyframesResponse, MoveSequenceKeyframe, OpenInEditorRequest, OpenInEditorResponse, OpenInFileExplorerRequest, PasteEffectsRequest, PasteEffectsResponse, PrepareElementInstallRequest, PrepareElementInstallResponse, ProjectInfoRequest, ProjectInfoResponse, RedoRequest, RedoResponse, RemoveRenderRequest, RenameStaticFileRequest, RenameStaticFileResponse, ReorderEffectRequest, ReorderEffectResponse, ReorderSequencePosition, ReorderSequenceRequest, ReorderSequenceResponse, RestartStudioRequest, RestartStudioResponse, SaveEffectPropsRequest, SaveEffectPropsResponse, SaveInlineCaptionPatchesRequest, SaveMultipleEffectPropsEdit, SaveMultipleEffectPropsRequest, SaveMultipleEffectPropsResponse, SaveMultipleEffectPropsResult, SaveSequencePropEdit, SaveSequencePropSourceEdit, SaveSequencePropsRequest, SaveSequencePropsResponse, SaveSequencePropsResult, SimpleDiff, SplitJsxSequenceRequest, SplitJsxSequenceResponse, SubscribeToDefaultPropsRequest, SubscribeToDefaultPropsResponse, SubscribeToFileExistenceRequest, SubscribeToFileExistenceResponse, SubscribeToSequencePropsRequest, SubscribeToSequencePropsResponse, UndoRequest, UndoResponse, UnsubscribeFromDefaultPropsRequest, UnsubscribeFromFileExistenceRequest, UnsubscribeFromSequencePropsRequest, UpdateAvailableRequest, UpdateAvailableResponse, UpdateDefaultEditorRequest, UpdateDefaultEditorResponse, UpdateDefaultPropsRequest, UpdateDefaultPropsResponse, UpdateEffectKeyframeSettingsRequest, UpdateEffectKeyframeSettingsResponse, UpdateElementInstallTargetRequest, UpdateElementInstallTargetResponse, UpdatePublicLicenseRequest, UpdatePublicLicenseResponse, UpdateSequenceKeyframeSettingsRequest, UpdateSequenceKeyframeSettingsResponse, type AddEffectKeyframe, type AddSequenceKeyframe, type KeyframeSettings, } from './api-requests';
|
|
2
3
|
export type { BrowserStudioOperations } from './browser-studio-operations';
|
|
3
|
-
export { AddEffectKeyframeRequest, AddEffectKeyframeResponse, AddEffectRequest, AddEffectResponse, AddKeyframesRequest, AddKeyframesResponse, AddRenderRequest, AddSequenceKeyframeRequest, AddSequenceKeyframeResponse, ApiRoutes, ApplyCodemodRequest, ApplyCodemodResponse, ApplyVisualControlRequest, ApplyVisualControlResponse, BatchUpdateEffectKeyframeSettings, BatchUpdateKeyframeSettingsRequest, BatchUpdateKeyframeSettingsResponse, BatchUpdateSequenceKeyframeSettings, CanUpdateDefaultPropsResponse, CanUpdateSequencePropsRequest, CaptionPatch, CancelRenderRequest, CancelRenderResponse, CompositionComponentInfoRequest, CompositionComponentInfoResponse, ConvertFigmaClipboardToSvgRequest, ConvertFigmaClipboardToSvgResponse, CopyStillToClipboardRequest, DeleteEffectKeyframe, DeleteEffectRequest, DeleteEffectRequestItem, DeleteEffectResponse, DeleteJsxNodeRequest, DeleteJsxNodeRequestItem, DeleteJsxNodeResponse, DeleteKeyframesRequest, DeleteKeyframesResponse, DeleteSequenceKeyframe, DeleteStaticFileRequest, DeleteStaticFileResponse, DownloadRemoteAssetRequest, DownloadRemoteAssetResponse, DuplicateEffectRequest, DuplicateEffectRequestItem, DuplicateEffectResponse, DuplicateJsxNodeRequest, DuplicateJsxNodeResponse, ElementInstallRequest, FindInFileRequest, FindInFileResponse, GoogleFontSourceEdit, InsertElementFileConflict, InsertElementRequest, InsertElementResponse, InsertJsxElementRequest, InsertJsxElementResponse, InsertableCompositionElement, InsertableCompositionElementPosition, InstallPackageRequest, InstallPackageResponse, LogStudioErrorRequest, LogStudioErrorResponse, MoveEffectKeyframe, MoveKeyframesRequest, MoveKeyframesResponse, MoveSequenceKeyframe, OpenInEditorRequest, OpenInEditorResponse, OpenInFileExplorerRequest, PasteEffectsRequest, PasteEffectsResponse, ProjectInfoRequest, ProjectInfoResponse, RedoRequest, RedoResponse, RemoveRenderRequest, RenameStaticFileRequest, RenameStaticFileResponse, ReorderEffectRequest, ReorderEffectResponse, ReorderSequencePosition, ReorderSequenceRequest, ReorderSequenceResponse, RestartStudioRequest, RestartStudioResponse, SaveEffectPropsRequest, SaveEffectPropsResponse, SaveMultipleEffectPropsEdit, SaveMultipleEffectPropsRequest, SaveMultipleEffectPropsResponse, SaveMultipleEffectPropsResult, SaveInlineCaptionPatchesRequest, SaveSequencePropEdit, SaveSequencePropSourceEdit, SaveSequencePropsRequest, SaveSequencePropsResponse, SaveSequencePropsResult, SimpleDiff, SplitJsxSequenceRequest, SplitJsxSequenceResponse, SubscribeToDefaultPropsRequest, SubscribeToDefaultPropsResponse, SubscribeToFileExistenceRequest, SubscribeToFileExistenceResponse, SubscribeToSequencePropsRequest, SubscribeToSequencePropsResponse, UndoRequest, UndoResponse, UnsubscribeFromDefaultPropsRequest, UnsubscribeFromFileExistenceRequest, UnsubscribeFromSequencePropsRequest, UpdateAvailableRequest, UpdateAvailableResponse, UpdateDefaultPropsRequest, UpdateDefaultPropsResponse, UpdateEffectKeyframeSettingsRequest, UpdateEffectKeyframeSettingsResponse, UpdateElementInstallTargetRequest, UpdateElementInstallTargetResponse, UpdatePublicLicenseRequest, UpdatePublicLicenseResponse, UpdateSequenceKeyframeSettingsRequest, UpdateSequenceKeyframeSettingsResponse, type AddEffectKeyframe, type AddSequenceKeyframe, type KeyframeSettings, } from './api-requests';
|
|
4
4
|
export type { ApplyVisualControlCodemod, RecastCodemod } from './codemods';
|
|
5
5
|
export { compositionDragDataToSymbolicatedStack } from './composition-drag-data';
|
|
6
6
|
export { DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS } from './default-buffer-state-delay-in-milliseconds';
|
|
@@ -16,9 +16,9 @@ export { ErrorLocation, getLocationFromBuildError, } from './get-location-from-b
|
|
|
16
16
|
export { getProjectName } from './get-project-name';
|
|
17
17
|
export type { GitSource } from './git-source';
|
|
18
18
|
export { HotMiddlewareMessage, HotMiddlewareOptions, ModuleMap, hotMiddlewareOptions, } from './hot-middleware';
|
|
19
|
+
export { isKeyframeClipboardFieldType, parseKeyframeClipboardData, parseKeyframeClipboardDataResult, type KeyframeClipboardData, type KeyframeClipboardDataParseResult, type KeyframeClipboardFieldType, } from './keyframe-clipboard-data';
|
|
19
20
|
export { CUBIC_KEYFRAME_EASING, EASE_KEYFRAME_EASING, KEYFRAME_EASING_PRESETS, LINEAR_KEYFRAME_EASING, QUAD_KEYFRAME_EASING, getBackKeyframeEasing, getOutKeyframeEasing, getPolyKeyframeEasing, type KeyframeEasing, type KeyframeEasingPreset, } from './keyframe-easing-presets';
|
|
20
21
|
export { canEditEasingForInterpolationFunction, getKeyframeInterpolationFunction, getKeyframeInterpolationFunctionForSchemaField, isInteractivitySchemaFieldKeyframable, isKeyframeInterpolationFunction, isSchemaFieldKeyframable, keyframeInterpolationFunctions, type KeyframeInterpolationFunction, } from './keyframe-interpolation-function';
|
|
21
|
-
export { isKeyframeClipboardFieldType, parseKeyframeClipboardData, parseKeyframeClipboardDataResult, type KeyframeClipboardData, type KeyframeClipboardDataParseResult, type KeyframeClipboardFieldType, } from './keyframe-clipboard-data';
|
|
22
22
|
export { DEFAULT_TIMELINE_TRACKS } from './max-timeline-tracks';
|
|
23
23
|
export { Pkgs, apiDocs, descriptions, extraPackages, installableMap, packages, type ExtraPackage, } from './package-info';
|
|
24
24
|
export { PackageManager } from './package-manager';
|
|
@@ -31,11 +31,11 @@ export { getRequiredPackageForEffectImportPath, getRequiredPackageForInsertableE
|
|
|
31
31
|
export { SCHEMA_FIELD_GROUPS, SCHEMA_FIELD_ROW_HEIGHT, getEffectFieldsToShow, getFieldsToShow, getSchemaFieldGroup, } from './schema-field-info';
|
|
32
32
|
export type { AnySchemaFieldInfo, DragOverrides, EffectSchemaFieldInfo, InteractivitySchemaFieldInfo, PropStatuses, SchemaFieldGroup, SchemaFieldGroupInfo, SchemaFieldInfo, SequenceControls, } from './schema-field-info';
|
|
33
33
|
export { ScriptLine, SomeStackFrame, StackFrame, SymbolicatedStackFrame, } from './stack-types';
|
|
34
|
-
export { BORDER_RADIUS_LONGHAND_KEYS, BORDER_RADIUS_SHORTHAND_KEY, getStylePropertyLonghandKeys, } from './style-property-relations';
|
|
35
34
|
export { EnumPath, stringifyDefaultProps } from './stringify-default-props';
|
|
36
35
|
export { getStudioEntryPoints, type StudioEntryPointPaths, } from './studio-entry-points';
|
|
37
36
|
export { studioHtml, type StudioHtmlOptions } from './studio-html';
|
|
38
37
|
export type { StudioRuntimeConfig } from './studio-runtime-config';
|
|
38
|
+
export { BORDER_RADIUS_LONGHAND_KEYS, BORDER_RADIUS_SHORTHAND_KEY, getStylePropertyLonghandKeys, } from './style-property-relations';
|
|
39
39
|
export type { VisualControlChange } from './codemods';
|
|
40
40
|
export { optimisticAddEffectKeyframe, optimisticAddSequenceKeyframe, } from './optimistic-add-keyframe';
|
|
41
41
|
export { optimisticDeleteEffectKeyframe, optimisticDeleteEffectKeyframes, optimisticDeleteSequenceKeyframe, optimisticDeleteSequenceKeyframes, } from './optimistic-delete-keyframe';
|
package/dist/index.js
CHANGED
|
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.DEFAULT_SPRING_EASING = exports.packages = exports.installableMap = exports.extraPackages = exports.descriptions = exports.apiDocs = exports.DEFAULT_TIMELINE_TRACKS = exports.
|
|
18
|
-
exports.isUrl = exports.stringifySequenceSubscriptionKey = exports.stringifySequenceExpandedRowKey = exports.optimisticUpdateSequenceKeyframeSettings = exports.optimisticUpdateEffectKeyframeSettings = exports.optimisticUpdateForPropStatuses = exports.optimisticUpdateForEffectPropStatuses = exports.optimisticMoveSequenceKeyframes = exports.optimisticMoveEffectKeyframes = exports.moveKeyframesInPropStatus = exports.canMoveKeyframesWithoutCollisions = exports.optimisticDeleteSequenceKeyframes = exports.optimisticDeleteSequenceKeyframe = exports.optimisticDeleteEffectKeyframes = exports.optimisticDeleteEffectKeyframe = exports.optimisticAddSequenceKeyframe = exports.optimisticAddEffectKeyframe = exports.
|
|
17
|
+
exports.DEFAULT_SPRING_EASING = exports.packages = exports.installableMap = exports.extraPackages = exports.descriptions = exports.apiDocs = exports.DEFAULT_TIMELINE_TRACKS = exports.keyframeInterpolationFunctions = exports.isSchemaFieldKeyframable = exports.isKeyframeInterpolationFunction = exports.isInteractivitySchemaFieldKeyframable = exports.getKeyframeInterpolationFunctionForSchemaField = exports.getKeyframeInterpolationFunction = exports.canEditEasingForInterpolationFunction = exports.getPolyKeyframeEasing = exports.getOutKeyframeEasing = exports.getBackKeyframeEasing = exports.QUAD_KEYFRAME_EASING = exports.LINEAR_KEYFRAME_EASING = exports.KEYFRAME_EASING_PRESETS = exports.EASE_KEYFRAME_EASING = exports.CUBIC_KEYFRAME_EASING = exports.parseKeyframeClipboardDataResult = exports.parseKeyframeClipboardData = exports.isKeyframeClipboardFieldType = exports.hotMiddlewareOptions = exports.getProjectName = exports.getLocationFromBuildError = exports.getDefaultOutLocation = exports.getAssetSchemaKeys = exports.getAllSchemaKeys = exports.formatBytes = exports.parseEffectPropClipboardDataResult = exports.parseEffectPropClipboardData = exports.parseEffectClipboardDataResult = exports.parseEffectClipboardData = exports.getEffectPreviewSource = exports.getEffectPreviewAlt = exports.getEffectDocumentationPath = exports.getEffectDocumentationLink = exports.getEffectCatalogCategories = exports.EFFECT_CATALOG = exports.parseEasingClipboardDataResult = exports.parseEasingClipboardData = exports.isImageFileType = exports.detectFileType = exports.DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS = exports.compositionDragDataToSymbolicatedStack = exports.stripAnsi = exports.splitAnsi = void 0;
|
|
18
|
+
exports.isUrl = exports.stringifySequenceSubscriptionKey = exports.stringifySequenceExpandedRowKey = exports.optimisticUpdateSequenceKeyframeSettings = exports.optimisticUpdateEffectKeyframeSettings = exports.optimisticUpdateForPropStatuses = exports.optimisticUpdateForEffectPropStatuses = exports.optimisticMoveSequenceKeyframes = exports.optimisticMoveEffectKeyframes = exports.moveKeyframesInPropStatus = exports.canMoveKeyframesWithoutCollisions = exports.optimisticDeleteSequenceKeyframes = exports.optimisticDeleteSequenceKeyframe = exports.optimisticDeleteEffectKeyframes = exports.optimisticDeleteEffectKeyframe = exports.optimisticAddSequenceKeyframe = exports.optimisticAddEffectKeyframe = exports.getStylePropertyLonghandKeys = exports.BORDER_RADIUS_SHORTHAND_KEY = exports.BORDER_RADIUS_LONGHAND_KEYS = exports.studioHtml = exports.getStudioEntryPoints = exports.stringifyDefaultProps = exports.getSchemaFieldGroup = exports.getFieldsToShow = exports.getEffectFieldsToShow = exports.SCHEMA_FIELD_ROW_HEIGHT = exports.SCHEMA_FIELD_GROUPS = exports.isValidPackageName = exports.getRequiredPackageForInsertableElement = exports.getRequiredPackageForEffectImportPath = exports.parseSpringEasingConfig = void 0;
|
|
19
19
|
const ansi_1 = require("./ansi");
|
|
20
20
|
Object.defineProperty(exports, "splitAnsi", { enumerable: true, get: function () { return ansi_1.splitAnsi; } });
|
|
21
21
|
Object.defineProperty(exports, "stripAnsi", { enumerable: true, get: function () { return ansi_1.stripAnsi; } });
|
|
@@ -55,6 +55,10 @@ const get_project_name_1 = require("./get-project-name");
|
|
|
55
55
|
Object.defineProperty(exports, "getProjectName", { enumerable: true, get: function () { return get_project_name_1.getProjectName; } });
|
|
56
56
|
const hot_middleware_1 = require("./hot-middleware");
|
|
57
57
|
Object.defineProperty(exports, "hotMiddlewareOptions", { enumerable: true, get: function () { return hot_middleware_1.hotMiddlewareOptions; } });
|
|
58
|
+
const keyframe_clipboard_data_1 = require("./keyframe-clipboard-data");
|
|
59
|
+
Object.defineProperty(exports, "isKeyframeClipboardFieldType", { enumerable: true, get: function () { return keyframe_clipboard_data_1.isKeyframeClipboardFieldType; } });
|
|
60
|
+
Object.defineProperty(exports, "parseKeyframeClipboardData", { enumerable: true, get: function () { return keyframe_clipboard_data_1.parseKeyframeClipboardData; } });
|
|
61
|
+
Object.defineProperty(exports, "parseKeyframeClipboardDataResult", { enumerable: true, get: function () { return keyframe_clipboard_data_1.parseKeyframeClipboardDataResult; } });
|
|
58
62
|
const keyframe_easing_presets_1 = require("./keyframe-easing-presets");
|
|
59
63
|
Object.defineProperty(exports, "CUBIC_KEYFRAME_EASING", { enumerable: true, get: function () { return keyframe_easing_presets_1.CUBIC_KEYFRAME_EASING; } });
|
|
60
64
|
Object.defineProperty(exports, "EASE_KEYFRAME_EASING", { enumerable: true, get: function () { return keyframe_easing_presets_1.EASE_KEYFRAME_EASING; } });
|
|
@@ -72,10 +76,6 @@ Object.defineProperty(exports, "isInteractivitySchemaFieldKeyframable", { enumer
|
|
|
72
76
|
Object.defineProperty(exports, "isKeyframeInterpolationFunction", { enumerable: true, get: function () { return keyframe_interpolation_function_1.isKeyframeInterpolationFunction; } });
|
|
73
77
|
Object.defineProperty(exports, "isSchemaFieldKeyframable", { enumerable: true, get: function () { return keyframe_interpolation_function_1.isSchemaFieldKeyframable; } });
|
|
74
78
|
Object.defineProperty(exports, "keyframeInterpolationFunctions", { enumerable: true, get: function () { return keyframe_interpolation_function_1.keyframeInterpolationFunctions; } });
|
|
75
|
-
const keyframe_clipboard_data_1 = require("./keyframe-clipboard-data");
|
|
76
|
-
Object.defineProperty(exports, "isKeyframeClipboardFieldType", { enumerable: true, get: function () { return keyframe_clipboard_data_1.isKeyframeClipboardFieldType; } });
|
|
77
|
-
Object.defineProperty(exports, "parseKeyframeClipboardData", { enumerable: true, get: function () { return keyframe_clipboard_data_1.parseKeyframeClipboardData; } });
|
|
78
|
-
Object.defineProperty(exports, "parseKeyframeClipboardDataResult", { enumerable: true, get: function () { return keyframe_clipboard_data_1.parseKeyframeClipboardDataResult; } });
|
|
79
79
|
const max_timeline_tracks_1 = require("./max-timeline-tracks");
|
|
80
80
|
Object.defineProperty(exports, "DEFAULT_TIMELINE_TRACKS", { enumerable: true, get: function () { return max_timeline_tracks_1.DEFAULT_TIMELINE_TRACKS; } });
|
|
81
81
|
const package_info_1 = require("./package-info");
|
|
@@ -97,16 +97,16 @@ Object.defineProperty(exports, "SCHEMA_FIELD_ROW_HEIGHT", { enumerable: true, ge
|
|
|
97
97
|
Object.defineProperty(exports, "getEffectFieldsToShow", { enumerable: true, get: function () { return schema_field_info_1.getEffectFieldsToShow; } });
|
|
98
98
|
Object.defineProperty(exports, "getFieldsToShow", { enumerable: true, get: function () { return schema_field_info_1.getFieldsToShow; } });
|
|
99
99
|
Object.defineProperty(exports, "getSchemaFieldGroup", { enumerable: true, get: function () { return schema_field_info_1.getSchemaFieldGroup; } });
|
|
100
|
-
const style_property_relations_1 = require("./style-property-relations");
|
|
101
|
-
Object.defineProperty(exports, "BORDER_RADIUS_LONGHAND_KEYS", { enumerable: true, get: function () { return style_property_relations_1.BORDER_RADIUS_LONGHAND_KEYS; } });
|
|
102
|
-
Object.defineProperty(exports, "BORDER_RADIUS_SHORTHAND_KEY", { enumerable: true, get: function () { return style_property_relations_1.BORDER_RADIUS_SHORTHAND_KEY; } });
|
|
103
|
-
Object.defineProperty(exports, "getStylePropertyLonghandKeys", { enumerable: true, get: function () { return style_property_relations_1.getStylePropertyLonghandKeys; } });
|
|
104
100
|
const stringify_default_props_1 = require("./stringify-default-props");
|
|
105
101
|
Object.defineProperty(exports, "stringifyDefaultProps", { enumerable: true, get: function () { return stringify_default_props_1.stringifyDefaultProps; } });
|
|
106
102
|
const studio_entry_points_1 = require("./studio-entry-points");
|
|
107
103
|
Object.defineProperty(exports, "getStudioEntryPoints", { enumerable: true, get: function () { return studio_entry_points_1.getStudioEntryPoints; } });
|
|
108
104
|
const studio_html_1 = require("./studio-html");
|
|
109
105
|
Object.defineProperty(exports, "studioHtml", { enumerable: true, get: function () { return studio_html_1.studioHtml; } });
|
|
106
|
+
const style_property_relations_1 = require("./style-property-relations");
|
|
107
|
+
Object.defineProperty(exports, "BORDER_RADIUS_LONGHAND_KEYS", { enumerable: true, get: function () { return style_property_relations_1.BORDER_RADIUS_LONGHAND_KEYS; } });
|
|
108
|
+
Object.defineProperty(exports, "BORDER_RADIUS_SHORTHAND_KEY", { enumerable: true, get: function () { return style_property_relations_1.BORDER_RADIUS_SHORTHAND_KEY; } });
|
|
109
|
+
Object.defineProperty(exports, "getStylePropertyLonghandKeys", { enumerable: true, get: function () { return style_property_relations_1.getStylePropertyLonghandKeys; } });
|
|
110
110
|
const optimistic_add_keyframe_1 = require("./optimistic-add-keyframe");
|
|
111
111
|
Object.defineProperty(exports, "optimisticAddEffectKeyframe", { enumerable: true, get: function () { return optimistic_add_keyframe_1.optimisticAddEffectKeyframe; } });
|
|
112
112
|
Object.defineProperty(exports, "optimisticAddSequenceKeyframe", { enumerable: true, get: function () { return optimistic_add_keyframe_1.optimisticAddSequenceKeyframe; } });
|
|
@@ -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,30 @@
|
|
|
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]: { status: 'static', 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
|
+
effects: previous.effects,
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
exports.optimisticUpdateForCodeValues = optimisticUpdateForCodeValues;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type CanUpdateSequencePropsResponse, type SequenceSchema } from 'remotion';
|
|
2
|
+
export declare const optimisticUpdateForEffectCodeValues: ({ previous, effectIndex, fieldKey, value, schema, }: {
|
|
3
|
+
previous: CanUpdateSequencePropsResponse;
|
|
4
|
+
effectIndex: number;
|
|
5
|
+
fieldKey: string;
|
|
6
|
+
value: unknown;
|
|
7
|
+
schema: SequenceSchema;
|
|
8
|
+
}) => CanUpdateSequencePropsResponse;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.optimisticUpdateForEffectCodeValues = void 0;
|
|
4
|
+
const no_react_1 = require("remotion/no-react");
|
|
5
|
+
const optimisticUpdateForEffectCodeValues = ({ previous, effectIndex, fieldKey, value, schema, }) => {
|
|
6
|
+
var _a;
|
|
7
|
+
if (!previous.canUpdate) {
|
|
8
|
+
return previous;
|
|
9
|
+
}
|
|
10
|
+
const targetIndex = previous.effects.findIndex((e) => e.effectIndex === effectIndex);
|
|
11
|
+
if (targetIndex === -1) {
|
|
12
|
+
return previous;
|
|
13
|
+
}
|
|
14
|
+
const target = previous.effects[targetIndex];
|
|
15
|
+
if (!target.canUpdate) {
|
|
16
|
+
return previous;
|
|
17
|
+
}
|
|
18
|
+
const props = {
|
|
19
|
+
...target.props,
|
|
20
|
+
[fieldKey]: { status: 'static', codeValue: value },
|
|
21
|
+
};
|
|
22
|
+
if (((_a = schema[fieldKey]) === null || _a === void 0 ? void 0 : _a.type) === 'enum') {
|
|
23
|
+
const propsToDelete = no_react_1.NoReactInternals.findPropsToDelete({
|
|
24
|
+
schema,
|
|
25
|
+
key: fieldKey,
|
|
26
|
+
value,
|
|
27
|
+
});
|
|
28
|
+
for (const propToDelete of propsToDelete) {
|
|
29
|
+
delete props[propToDelete];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const updatedEffect = {
|
|
33
|
+
...target,
|
|
34
|
+
props,
|
|
35
|
+
};
|
|
36
|
+
const effects = [...previous.effects];
|
|
37
|
+
effects[targetIndex] = updatedEffect;
|
|
38
|
+
return {
|
|
39
|
+
...previous,
|
|
40
|
+
effects,
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
exports.optimisticUpdateForEffectCodeValues = optimisticUpdateForEffectCodeValues;
|