@remotion/cli 4.0.0-alpha.111 → 4.0.0-alpha.127
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/codemods/update-default-props.js +15 -4
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.js +1 -0
- package/dist/editor/components/RenderModal/SchemaEditor/schema-serialization.d.ts +2 -0
- package/dist/editor/components/RenderModal/SchemaEditor/schema-serialization.js +21 -0
- package/dist/editor/components/TopPanel.js +1 -1
- package/package.json +7 -7
|
@@ -47,13 +47,24 @@ const findStarter = ({ input, compositionId, }) => {
|
|
|
47
47
|
}
|
|
48
48
|
throw new Error(`Could not find composition ID ${compositionId} in file`);
|
|
49
49
|
};
|
|
50
|
+
const findEndPosition = (input, currentPosition) => {
|
|
51
|
+
const asConstVersion = input
|
|
52
|
+
.slice(currentPosition + 1)
|
|
53
|
+
.search(/as\sconst[ \t\n\r]+\}/);
|
|
54
|
+
if (asConstVersion !== -1) {
|
|
55
|
+
const nextEnd = input.indexOf('}', asConstVersion + currentPosition + 1);
|
|
56
|
+
return nextEnd - 1;
|
|
57
|
+
}
|
|
58
|
+
const next = input.indexOf('}}', currentPosition + 1);
|
|
59
|
+
if (next !== -1) {
|
|
60
|
+
return next;
|
|
61
|
+
}
|
|
62
|
+
throw new Error('Could not find end of defaultProps');
|
|
63
|
+
};
|
|
50
64
|
const findEnder = (input, position, maxPosition) => {
|
|
51
65
|
let currentPosition = position;
|
|
52
66
|
while (currentPosition < maxPosition) {
|
|
53
|
-
const next = input
|
|
54
|
-
if (next === -1) {
|
|
55
|
-
throw new Error('Could not find end of defaultProps');
|
|
56
|
-
}
|
|
67
|
+
const next = findEndPosition(input, currentPosition);
|
|
57
68
|
currentPosition = next;
|
|
58
69
|
const nextChar = input[next + 1];
|
|
59
70
|
if (nextChar === ',') {
|
|
@@ -13,6 +13,7 @@ const SchemaLabel_1 = require("./SchemaLabel");
|
|
|
13
13
|
const container = {
|
|
14
14
|
width: '100%',
|
|
15
15
|
};
|
|
16
|
+
// TODO: Long values break the layout
|
|
16
17
|
const ZodEnumEditor = ({ schema, jsonPath, compact, setValue: updateValue, defaultValue, value, onSave, showSaveButton, onRemove, }) => {
|
|
17
18
|
const [localValue, setLocalValue] = (0, react_1.useState)(() => {
|
|
18
19
|
return {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deserializeJSONWithSchema = exports.serializeJSONWithSchema = void 0;
|
|
4
|
+
const serializeJSONWithSchema = (data, indent) => {
|
|
5
|
+
return JSON.stringify(data, function (key, value) {
|
|
6
|
+
if (this[key] instanceof Date) {
|
|
7
|
+
return `remotion-date:${this[key].toISOString()}`;
|
|
8
|
+
}
|
|
9
|
+
return value;
|
|
10
|
+
}, indent);
|
|
11
|
+
};
|
|
12
|
+
exports.serializeJSONWithSchema = serializeJSONWithSchema;
|
|
13
|
+
const deserializeJSONWithSchema = (data) => {
|
|
14
|
+
return JSON.parse(data, (_, value) => {
|
|
15
|
+
if (typeof value === 'string' && value.startsWith('remotion-date:')) {
|
|
16
|
+
return new Date(value.replace('remotion-date:', ''));
|
|
17
|
+
}
|
|
18
|
+
return value;
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
exports.deserializeJSONWithSchema = deserializeJSONWithSchema;
|
|
@@ -71,6 +71,6 @@ const TopPanel = () => {
|
|
|
71
71
|
const onExpandRight = (0, react_1.useCallback)(() => {
|
|
72
72
|
setSidebarCollapsedStateRight('expanded');
|
|
73
73
|
}, [setSidebarCollapsedStateRight]);
|
|
74
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(InitialCompositionLoader_1.InitialCompositionLoader, {}), (0, jsx_runtime_1.jsx)(MenuToolbar_1.MenuToolbar, {}), (0, jsx_runtime_1.jsxs)("div", { style: row, children: [actualStateLeft === 'collapsed' ? ((0, jsx_runtime_1.jsx)(CollapsedSidebarExpander_1.CollapsedSidebarExpander, { direction: "right", onExpand: onExpandLeft })) : null, (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, id: "sidebar-to-preview", orientation: "vertical", children: [actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)("div", { style: leftContainer, className: "css-reset", children: (0, jsx_runtime_1.jsx)(CompositionSelector_1.CompositionSelector, {}) }) })) : null, actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "left", onCollapse: onCollapseLeft })) : null, (0, jsx_runtime_1.jsxs)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: [(0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.5, maxFlex: 0.8, defaultFlex: 0.7, id: "canvas-to-right-sidebar", orientation: "vertical", children: [(0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)("div", { style: canvasContainer, children: (0, jsx_runtime_1.jsx)(Canvas_1.Canvas, {}) }) }), actualStateRight === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "right", onCollapse: onCollapseRight })) : null, actualStateRight === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: (0, jsx_runtime_1.jsx)(RightPanel_1.RightPanel, {}) })) : null] }), actualStateRight === 'collapsed' ? ((0, jsx_runtime_1.jsx)(CollapsedSidebarExpander_1.CollapsedSidebarExpander, { direction: "left", onExpand: onExpandRight })) : null] })] })] }), (0, jsx_runtime_1.jsx)(PreviewToolbar_1.PreviewToolbar, {}), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.CurrentCompositionKeybindings, {}), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.TitleUpdater, {})] }));
|
|
74
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(InitialCompositionLoader_1.InitialCompositionLoader, {}), (0, jsx_runtime_1.jsx)(MenuToolbar_1.MenuToolbar, {}), (0, jsx_runtime_1.jsxs)("div", { style: row, children: [actualStateLeft === 'collapsed' ? ((0, jsx_runtime_1.jsx)(CollapsedSidebarExpander_1.CollapsedSidebarExpander, { direction: "right", onExpand: onExpandLeft })) : null, (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, id: "sidebar-to-preview", orientation: "vertical", children: [actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)("div", { style: leftContainer, className: "css-reset", children: (0, jsx_runtime_1.jsx)(CompositionSelector_1.CompositionSelector, {}) }) }), (0, jsx_runtime_1.jsx)(CollapsedSidebarExpander_1.CollapsedSidebarExpander, { direction: "left", onExpand: onCollapseLeft })] })) : null, actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "left", onCollapse: onCollapseLeft })) : null, (0, jsx_runtime_1.jsxs)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: [(0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.5, maxFlex: 0.8, defaultFlex: 0.7, id: "canvas-to-right-sidebar", orientation: "vertical", children: [(0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)("div", { style: canvasContainer, children: (0, jsx_runtime_1.jsx)(Canvas_1.Canvas, {}) }) }), actualStateRight === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "right", onCollapse: onCollapseRight })) : null, actualStateRight === 'expanded' ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(CollapsedSidebarExpander_1.CollapsedSidebarExpander, { direction: "right", onExpand: onCollapseRight }), (0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: (0, jsx_runtime_1.jsx)(RightPanel_1.RightPanel, {}) })] })) : null] }), actualStateRight === 'collapsed' ? ((0, jsx_runtime_1.jsx)(CollapsedSidebarExpander_1.CollapsedSidebarExpander, { direction: "left", onExpand: onExpandRight })) : null] })] })] }), (0, jsx_runtime_1.jsx)(PreviewToolbar_1.PreviewToolbar, {}), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.CurrentCompositionKeybindings, {}), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.TitleUpdater, {})] }));
|
|
75
75
|
};
|
|
76
76
|
exports.TopPanel = TopPanel;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.127+bcc7f944b",
|
|
4
4
|
"description": "CLI for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"author": "Jonny Burger <jonny@remotion.dev>",
|
|
35
35
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@remotion/bundler": "4.0.0-alpha.
|
|
38
|
-
"@remotion/media-utils": "4.0.0-alpha.
|
|
39
|
-
"@remotion/player": "4.0.0-alpha.
|
|
40
|
-
"@remotion/renderer": "4.0.0-alpha.
|
|
37
|
+
"@remotion/bundler": "4.0.0-alpha.127+bcc7f944b",
|
|
38
|
+
"@remotion/media-utils": "4.0.0-alpha.127+bcc7f944b",
|
|
39
|
+
"@remotion/player": "4.0.0-alpha.127+bcc7f944b",
|
|
40
|
+
"@remotion/renderer": "4.0.0-alpha.127+bcc7f944b",
|
|
41
41
|
"dotenv": "9.0.2",
|
|
42
42
|
"memfs": "3.4.3",
|
|
43
43
|
"minimist": "1.2.6",
|
|
44
44
|
"open": "^8.4.2",
|
|
45
45
|
"prompts": "2.4.1",
|
|
46
|
-
"remotion": "4.0.0-alpha.
|
|
46
|
+
"remotion": "4.0.0-alpha.127+bcc7f944b",
|
|
47
47
|
"semver": "7.3.5",
|
|
48
48
|
"source-map": "0.6.1"
|
|
49
49
|
},
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"publishConfig": {
|
|
84
84
|
"access": "public"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "bcc7f944b9209fce41d8558215c83a2fd51eb07f"
|
|
87
87
|
}
|