@remotion/studio 4.0.285 → 4.0.287
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/.turbo/turbo-make.log +2 -2
- package/dist/api/go-to-composition.d.ts +6 -0
- package/dist/api/go-to-composition.js +14 -0
- package/dist/api/pause.d.ts +1 -0
- package/dist/api/pause.js +13 -0
- package/dist/api/play.d.ts +2 -0
- package/dist/api/play.js +13 -0
- package/dist/api/save-default-props.js +17 -7
- package/dist/api/seek.js +3 -3
- package/dist/api/toggle.d.ts +2 -0
- package/dist/api/toggle.js +13 -0
- package/dist/components/AssetSelector.js +17 -7
- package/dist/components/AssetSelectorItem.js +17 -7
- package/dist/components/CompSelectorRef.d.ts +4 -0
- package/dist/components/CompSelectorRef.js +82 -0
- package/dist/components/CompositionSelector.d.ts +0 -3
- package/dist/components/CompositionSelector.js +6 -53
- package/dist/components/Editor.js +17 -7
- package/dist/components/ExplorerPanel.js +2 -1
- package/dist/components/GlobalPropsEditorUpdateButton.js +17 -7
- package/dist/components/InstallPackage.js +17 -7
- package/dist/components/NewComposition/CodemodFooter.d.ts +1 -1
- package/dist/components/NewComposition/CodemodFooter.js +3 -3
- package/dist/components/NewComposition/DeleteComposition.js +1 -1
- package/dist/components/NewComposition/DuplicateComposition.js +1 -1
- package/dist/components/NewComposition/InputDragger.js +17 -7
- package/dist/components/NewComposition/RenameComposition.js +1 -1
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -2
- package/dist/components/RenderModal/DataEditor.js +17 -7
- package/dist/components/RenderModal/EnvInput.js +17 -7
- package/dist/components/RenderModal/RenderModalJSONPropsEditor.js +17 -7
- package/dist/components/RenderModal/ResolveCompositionBeforeModal.js +17 -7
- package/dist/components/RenderModal/SchemaEditor/ZodArrayEditor.js +17 -7
- package/dist/components/RenderModal/SchemaEditor/ZodObjectEditor.js +17 -7
- package/dist/components/RenderModal/SchemaEditor/ZodTupleEditor.js +17 -7
- package/dist/components/RenderQueue/RenderQueueItemStatus.js +17 -7
- package/dist/components/RenderQueue/context.js +17 -7
- package/dist/components/RenderQueue/index.js +17 -7
- package/dist/components/TimeValue.js +5 -2
- package/dist/components/Timeline/TimelineLayerEye.js +1 -0
- package/dist/components/get-zod-if-possible.js +17 -7
- package/dist/esm/index.mjs +33 -9
- package/dist/esm/internals.mjs +2658 -2615
- package/dist/esm/previewEntry.mjs +2683 -2643
- package/dist/esm/renderEntry.mjs +2748 -2743
- package/dist/helpers/client-id.js +17 -7
- package/dist/helpers/persist-open-folders.d.ts +6 -0
- package/dist/helpers/persist-open-folders.js +7 -1
- package/dist/helpers/presets-labels.d.ts +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +9 -1
- package/dist/internals.d.ts +1 -1
- package/dist/renderEntry.js +17 -7
- package/package.json +9 -9
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/api/get-zod-schema-from-primitive.d.ts +0 -2
- package/dist/api/get-zod-schema-from-primitive.js +0 -13
- package/dist/api/use-visual-control.d.ts +0 -7
- package/dist/api/use-visual-control.js +0 -58
- package/dist/components/RenderModal/SchemaEditor/ZodMatrixEditor.d.ts +0 -17
- package/dist/components/RenderModal/SchemaEditor/ZodMatrixEditor.js +0 -91
- package/dist/components/VisualControls/ClickableFileName.d.ts +0 -3
- package/dist/components/VisualControls/ClickableFileName.js +0 -39
- package/dist/components/VisualControls/VisualControlHandle.d.ts +0 -8
- package/dist/components/VisualControls/VisualControlHandle.js +0 -34
- package/dist/components/VisualControls/VisualControlsContent.d.ts +0 -1
- package/dist/components/VisualControls/VisualControlsContent.js +0 -29
- package/dist/components/VisualControls/VisualControlsTabs.d.ts +0 -1
- package/dist/components/VisualControls/VisualControlsTabs.js +0 -11
- package/dist/components/VisualControls/get-original-stack-trace.d.ts +0 -2
- package/dist/components/VisualControls/get-original-stack-trace.js +0 -23
- package/dist/visual-controls/VisualControls.d.ts +0 -36
- package/dist/visual-controls/VisualControls.js +0 -118
- package/dist/visual-controls/get-current-edited-value.d.ts +0 -6
- package/dist/visual-controls/get-current-edited-value.js +0 -9
package/.turbo/turbo-make.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @remotion/studio@4.0.
|
|
3
|
+
> @remotion/studio@4.0.287 make /Users/jonathanburger/remotion/packages/studio
|
|
4
4
|
> tsc -d && bun --env-file=../.env.bundle bundle.ts
|
|
5
5
|
|
|
6
|
-
[0m[2m[[
|
|
6
|
+
[0m[2m[[1m46.52ms[0m[2m][0m Generated.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.goToComposition = void 0;
|
|
4
|
+
const remotion_1 = require("remotion");
|
|
5
|
+
/**
|
|
6
|
+
* Selects a composition in the Remotion Studio.
|
|
7
|
+
* @param compositionId - The ID of the composition to select.
|
|
8
|
+
* @see [Documentation](/docs/studio/go-to-composition)
|
|
9
|
+
*/
|
|
10
|
+
const goToComposition = (compositionId) => {
|
|
11
|
+
var _a;
|
|
12
|
+
(_a = remotion_1.Internals.compositionSelectorRef.current) === null || _a === void 0 ? void 0 : _a.selectComposition(compositionId);
|
|
13
|
+
};
|
|
14
|
+
exports.goToComposition = goToComposition;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pause: () => void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pause = void 0;
|
|
4
|
+
const remotion_1 = require("remotion");
|
|
5
|
+
/*
|
|
6
|
+
* @description Pause the current composition.
|
|
7
|
+
* @see [Documentation](https://www.remotion.dev/docs/studio/pause)
|
|
8
|
+
*/
|
|
9
|
+
const pause = () => {
|
|
10
|
+
var _a;
|
|
11
|
+
(_a = remotion_1.Internals.timeValueRef.current) === null || _a === void 0 ? void 0 : _a.pause();
|
|
12
|
+
};
|
|
13
|
+
exports.pause = pause;
|
package/dist/api/play.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.play = void 0;
|
|
4
|
+
const remotion_1 = require("remotion");
|
|
5
|
+
/*
|
|
6
|
+
* @description Play the current composition.
|
|
7
|
+
* @see [Documentation](https://www.remotion.dev/docs/studio/play)
|
|
8
|
+
*/
|
|
9
|
+
const play = (e) => {
|
|
10
|
+
var _a;
|
|
11
|
+
(_a = remotion_1.Internals.timeValueRef.current) === null || _a === void 0 ? void 0 : _a.play(e);
|
|
12
|
+
};
|
|
13
|
+
exports.play = play;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.saveDefaultProps = void 0;
|
|
27
37
|
const remotion_1 = require("remotion");
|
package/dist/api/seek.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.seek = void 0;
|
|
4
|
+
const remotion_1 = require("remotion");
|
|
2
5
|
/*
|
|
3
6
|
* @description Jump to a different time in the timeline.
|
|
4
7
|
* @see [Documentation](https://www.remotion.dev/docs/studio/seek)
|
|
5
8
|
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.seek = void 0;
|
|
8
|
-
const remotion_1 = require("remotion");
|
|
9
9
|
const seek = (frame) => {
|
|
10
10
|
var _a;
|
|
11
11
|
(_a = remotion_1.Internals.timeValueRef.current) === null || _a === void 0 ? void 0 : _a.seek(Math.max(0, frame));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toggle = void 0;
|
|
4
|
+
const remotion_1 = require("remotion");
|
|
5
|
+
/*
|
|
6
|
+
* @description Toggle playback of the current composition.
|
|
7
|
+
* @see [Documentation](https://www.remotion.dev/docs/studio/toggle)
|
|
8
|
+
*/
|
|
9
|
+
const toggle = (e) => {
|
|
10
|
+
var _a;
|
|
11
|
+
(_a = remotion_1.Internals.timeValueRef.current) === null || _a === void 0 ? void 0 : _a.toggle(e);
|
|
12
|
+
};
|
|
13
|
+
exports.toggle = toggle;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CompSelectorRef = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const remotion_1 = require("remotion");
|
|
7
|
+
const persist_open_folders_1 = require("../helpers/persist-open-folders");
|
|
8
|
+
const InitialCompositionLoader_1 = require("./InitialCompositionLoader");
|
|
9
|
+
const CompSelectorRef = ({ children }) => {
|
|
10
|
+
const { compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
11
|
+
const [foldersExpanded, setFoldersExpanded] = (0, react_1.useState)((0, persist_open_folders_1.loadExpandedFolders)('compositions'));
|
|
12
|
+
const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
|
|
13
|
+
const toggleFolder = (0, react_1.useCallback)((folderName, parentName) => {
|
|
14
|
+
setFoldersExpanded((p) => {
|
|
15
|
+
var _a;
|
|
16
|
+
const key = (0, persist_open_folders_1.openFolderKey)({ folderName, parentName });
|
|
17
|
+
const prev = (_a = p[key]) !== null && _a !== void 0 ? _a : false;
|
|
18
|
+
const foldersExpandedState = {
|
|
19
|
+
...p,
|
|
20
|
+
[key]: !prev,
|
|
21
|
+
};
|
|
22
|
+
(0, persist_open_folders_1.persistExpandedFolders)('compositions', foldersExpandedState);
|
|
23
|
+
return foldersExpandedState;
|
|
24
|
+
});
|
|
25
|
+
}, []);
|
|
26
|
+
(0, react_1.useImperativeHandle)(remotion_1.Internals.compositionSelectorRef, () => {
|
|
27
|
+
return {
|
|
28
|
+
expandComposition: (compName) => {
|
|
29
|
+
const compositionToExpand = compositions.find((c) => c.id === compName);
|
|
30
|
+
if (!compositionToExpand) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const { folderName, parentFolderName } = compositionToExpand;
|
|
34
|
+
if (folderName === null) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
setFoldersExpanded((previousState) => {
|
|
38
|
+
const foldersExpandedState = {
|
|
39
|
+
...previousState,
|
|
40
|
+
};
|
|
41
|
+
const currentFolder = folderName;
|
|
42
|
+
const currentParentName = parentFolderName;
|
|
43
|
+
const key = (0, persist_open_folders_1.openFolderKey)({
|
|
44
|
+
folderName: currentFolder,
|
|
45
|
+
parentName: currentParentName,
|
|
46
|
+
});
|
|
47
|
+
const splitted = key.split('/');
|
|
48
|
+
for (let i = 0; i < splitted.length - 1; i++) {
|
|
49
|
+
const allExceptLast = i === 0
|
|
50
|
+
? (0, persist_open_folders_1.openFolderKey)({
|
|
51
|
+
folderName: splitted.filter((s) => s !== 'no-parent')[0],
|
|
52
|
+
parentName: null,
|
|
53
|
+
})
|
|
54
|
+
: splitted.slice(0, i + 1).join('/');
|
|
55
|
+
foldersExpandedState[allExceptLast] = true;
|
|
56
|
+
}
|
|
57
|
+
(0, persist_open_folders_1.persistExpandedFolders)('compositions', foldersExpandedState);
|
|
58
|
+
return foldersExpandedState;
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
selectComposition: (compName) => {
|
|
62
|
+
const comp = compositions.find((c) => c.id === compName);
|
|
63
|
+
if (!comp) {
|
|
64
|
+
throw new Error(`Composition ${compName} not found`);
|
|
65
|
+
}
|
|
66
|
+
selectComposition(comp, true);
|
|
67
|
+
},
|
|
68
|
+
toggleFolder: (folderName, parentName) => {
|
|
69
|
+
toggleFolder(folderName, parentName);
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
}, [compositions, selectComposition, toggleFolder]);
|
|
73
|
+
const contextValue = (0, react_1.useMemo)(() => {
|
|
74
|
+
return {
|
|
75
|
+
foldersExpanded,
|
|
76
|
+
setFoldersExpanded,
|
|
77
|
+
toggleFolder,
|
|
78
|
+
};
|
|
79
|
+
}, [foldersExpanded, setFoldersExpanded, toggleFolder]);
|
|
80
|
+
return ((0, jsx_runtime_1.jsx)(persist_open_folders_1.ExpandedFoldersContext.Provider, { value: contextValue, children: children }));
|
|
81
|
+
};
|
|
82
|
+
exports.CompSelectorRef = CompSelectorRef;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const getKeysToExpand: (initialFolderName: string, parentFolderName: string | null, initial?: string[]) => string[];
|
|
3
|
-
export declare const compositionSelectorRef: React.RefObject<{
|
|
4
|
-
expandComposition: (compName: string) => void;
|
|
5
|
-
} | null>;
|
|
6
3
|
export declare const CompositionSelector: React.FC;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CompositionSelector = exports.
|
|
3
|
+
exports.CompositionSelector = exports.getKeysToExpand = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
@@ -30,62 +30,11 @@ const getKeysToExpand = (initialFolderName, parentFolderName, initial = []) => {
|
|
|
30
30
|
return (0, exports.getKeysToExpand)(name, parent, initial);
|
|
31
31
|
};
|
|
32
32
|
exports.getKeysToExpand = getKeysToExpand;
|
|
33
|
-
exports.compositionSelectorRef = (0, react_1.createRef)();
|
|
34
33
|
const CompositionSelector = () => {
|
|
35
34
|
const { compositions, canvasContent, folders } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
36
|
-
const
|
|
35
|
+
const { foldersExpanded } = (0, react_1.useContext)(persist_open_folders_1.ExpandedFoldersContext);
|
|
37
36
|
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
38
37
|
const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
|
|
39
|
-
const toggleFolder = (0, react_1.useCallback)((folderName, parentName) => {
|
|
40
|
-
setFoldersExpanded((p) => {
|
|
41
|
-
var _a;
|
|
42
|
-
const key = (0, persist_open_folders_1.openFolderKey)({ folderName, parentName });
|
|
43
|
-
const prev = (_a = p[key]) !== null && _a !== void 0 ? _a : false;
|
|
44
|
-
const foldersExpandedState = {
|
|
45
|
-
...p,
|
|
46
|
-
[key]: !prev,
|
|
47
|
-
};
|
|
48
|
-
(0, persist_open_folders_1.persistExpandedFolders)('compositions', foldersExpandedState);
|
|
49
|
-
return foldersExpandedState;
|
|
50
|
-
});
|
|
51
|
-
}, []);
|
|
52
|
-
(0, react_1.useImperativeHandle)(exports.compositionSelectorRef, () => {
|
|
53
|
-
return {
|
|
54
|
-
expandComposition: (compName) => {
|
|
55
|
-
const compositionToExpand = compositions.find((c) => c.id === compName);
|
|
56
|
-
if (!compositionToExpand) {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
const { folderName, parentFolderName } = compositionToExpand;
|
|
60
|
-
if (folderName === null) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
setFoldersExpanded((previousState) => {
|
|
64
|
-
const foldersExpandedState = {
|
|
65
|
-
...previousState,
|
|
66
|
-
};
|
|
67
|
-
const currentFolder = folderName;
|
|
68
|
-
const currentParentName = parentFolderName;
|
|
69
|
-
const key = (0, persist_open_folders_1.openFolderKey)({
|
|
70
|
-
folderName: currentFolder,
|
|
71
|
-
parentName: currentParentName,
|
|
72
|
-
});
|
|
73
|
-
const splitted = key.split('/');
|
|
74
|
-
for (let i = 0; i < splitted.length - 1; i++) {
|
|
75
|
-
const allExceptLast = i === 0
|
|
76
|
-
? (0, persist_open_folders_1.openFolderKey)({
|
|
77
|
-
folderName: splitted.filter((s) => s !== 'no-parent')[0],
|
|
78
|
-
parentName: null,
|
|
79
|
-
})
|
|
80
|
-
: splitted.slice(0, i + 1).join('/');
|
|
81
|
-
foldersExpandedState[allExceptLast] = true;
|
|
82
|
-
}
|
|
83
|
-
(0, persist_open_folders_1.persistExpandedFolders)('compositions', foldersExpandedState);
|
|
84
|
-
return foldersExpandedState;
|
|
85
|
-
});
|
|
86
|
-
},
|
|
87
|
-
};
|
|
88
|
-
}, [compositions]);
|
|
89
38
|
const items = (0, react_1.useMemo)(() => {
|
|
90
39
|
return (0, create_folder_tree_1.createFolderTree)(compositions, folders, foldersExpanded);
|
|
91
40
|
}, [compositions, folders, foldersExpanded]);
|
|
@@ -98,6 +47,10 @@ const CompositionSelector = () => {
|
|
|
98
47
|
overflowY: 'auto',
|
|
99
48
|
};
|
|
100
49
|
}, [showCurrentComposition]);
|
|
50
|
+
const toggleFolder = (0, react_1.useCallback)((folderName, parentName) => {
|
|
51
|
+
var _a;
|
|
52
|
+
(_a = remotion_1.Internals.compositionSelectorRef.current) === null || _a === void 0 ? void 0 : _a.toggleFolder(folderName, parentName);
|
|
53
|
+
}, []);
|
|
101
54
|
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [showCurrentComposition ? (0, jsx_runtime_1.jsx)(CurrentComposition_1.CurrentComposition, {}) : null, (0, jsx_runtime_1.jsx)("div", { className: "__remotion-vertical-scrollbar", style: list, children: items.map((c) => {
|
|
102
55
|
return ((0, jsx_runtime_1.jsx)(CompositionSelectorItem_1.CompositionSelectorItem, { level: 0, currentComposition: showCurrentComposition ? canvasContent.compositionId : null, selectComposition: selectComposition, toggleFolder: toggleFolder, tabIndex: tabIndex, item: c }, c.key + c.type));
|
|
103
56
|
}) })] }));
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.Editor = exports.BUFFER_STATE_DELAY_IN_MILLISECONDS = void 0;
|
|
27
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const colors_1 = require("../helpers/colors");
|
|
7
7
|
const AssetSelector_1 = require("./AssetSelector");
|
|
8
8
|
const CompositionSelector_1 = require("./CompositionSelector");
|
|
9
|
+
const CompSelectorRef_1 = require("./CompSelectorRef");
|
|
9
10
|
const Tabs_1 = require("./Tabs");
|
|
10
11
|
const container = {
|
|
11
12
|
height: '100%',
|
|
@@ -52,6 +53,6 @@ const ExplorerPanel = ({ readOnlyStudio }) => {
|
|
|
52
53
|
},
|
|
53
54
|
};
|
|
54
55
|
}, []);
|
|
55
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, className: "css-reset", children: [(0, jsx_runtime_1.jsx)("div", { style: tabsContainer, children: (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tab, { selected: panel === 'compositions', onClick: onCompositionsSelected, children: "Compositions" }), (0, jsx_runtime_1.jsx)(Tabs_1.Tab, { selected: panel === 'assets', onClick: onAssetsSelected, children: "Assets" })] }) }), panel === 'compositions' ? ((0, jsx_runtime_1.jsx)(CompositionSelector_1.CompositionSelector, {})) : ((0, jsx_runtime_1.jsx)(AssetSelector_1.AssetSelector, { readOnlyStudio: readOnlyStudio }))] }));
|
|
56
|
+
return ((0, jsx_runtime_1.jsx)(CompSelectorRef_1.CompSelectorRef, { children: (0, jsx_runtime_1.jsxs)("div", { style: container, className: "css-reset", children: [(0, jsx_runtime_1.jsx)("div", { style: tabsContainer, children: (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tab, { selected: panel === 'compositions', onClick: onCompositionsSelected, children: "Compositions" }), (0, jsx_runtime_1.jsx)(Tabs_1.Tab, { selected: panel === 'assets', onClick: onAssetsSelected, children: "Assets" })] }) }), panel === 'compositions' ? ((0, jsx_runtime_1.jsx)(CompositionSelector_1.CompositionSelector, {})) : ((0, jsx_runtime_1.jsx)(AssetSelector_1.AssetSelector, { readOnlyStudio: readOnlyStudio }))] }) }));
|
|
56
57
|
};
|
|
57
58
|
exports.ExplorerPanel = ExplorerPanel;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.GlobalPropsEditorUpdateButton = void 0;
|
|
27
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.InstallPackageModal = void 0;
|
|
27
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -4,7 +4,7 @@ export declare const CodemodFooter: React.FC<{
|
|
|
4
4
|
readonly valid: boolean;
|
|
5
5
|
readonly codemod: RecastCodemod;
|
|
6
6
|
readonly loadingNotification: React.ReactNode;
|
|
7
|
-
readonly
|
|
7
|
+
readonly successNotification: React.ReactNode;
|
|
8
8
|
readonly errorNotification: string;
|
|
9
9
|
readonly genericSubmitLabel: string;
|
|
10
10
|
readonly submitLabel: (options: {
|
|
@@ -11,7 +11,7 @@ const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
|
11
11
|
const actions_1 = require("../RenderQueue/actions");
|
|
12
12
|
const layout_1 = require("../layout");
|
|
13
13
|
const DiffPreview_1 = require("./DiffPreview");
|
|
14
|
-
const CodemodFooter = ({ codemod, valid, loadingNotification,
|
|
14
|
+
const CodemodFooter = ({ codemod, valid, loadingNotification, successNotification, errorNotification, genericSubmitLabel, submitLabel, }) => {
|
|
15
15
|
const [submitting, setSubmitting] = (0, react_1.useState)(false);
|
|
16
16
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
17
17
|
const [codemodStatus, setCanApplyCodemod] = (0, react_1.useState)({
|
|
@@ -41,7 +41,7 @@ const CodemodFooter = ({ codemod, valid, loadingNotification, succeessNotifcatio
|
|
|
41
41
|
signal: new AbortController().signal,
|
|
42
42
|
})
|
|
43
43
|
.then(() => {
|
|
44
|
-
notification.replaceContent(
|
|
44
|
+
notification.replaceContent(successNotification, 2000);
|
|
45
45
|
})
|
|
46
46
|
.catch((err) => {
|
|
47
47
|
notification.replaceContent(`${errorNotification}: ${err.message}`, 2000);
|
|
@@ -51,7 +51,7 @@ const CodemodFooter = ({ codemod, valid, loadingNotification, succeessNotifcatio
|
|
|
51
51
|
errorNotification,
|
|
52
52
|
loadingNotification,
|
|
53
53
|
setSelectedModal,
|
|
54
|
-
|
|
54
|
+
successNotification,
|
|
55
55
|
]);
|
|
56
56
|
const getCanApplyCodemod = (0, react_1.useCallback)(async (signal) => {
|
|
57
57
|
const res = await (0, actions_1.applyCodemod)({
|
|
@@ -30,7 +30,7 @@ const DeleteCompositionLoaded = ({ compositionId }) => {
|
|
|
30
30
|
const onSubmit = (0, react_1.useCallback)((e) => {
|
|
31
31
|
e.preventDefault();
|
|
32
32
|
}, []);
|
|
33
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.ModalHeader, { title: 'Delete composition' }), (0, jsx_runtime_1.jsxs)("form", { onSubmit: onSubmit, children: [(0, jsx_runtime_1.jsxs)("div", { style: content, children: ["Do you want to delete the", ' ', (0, jsx_runtime_1.jsx)("code", { style: styles_1.inlineCodeSnippet, children: unresolved.durationInFrames === 1 ? `<Still>` : '<Composition>' }), ' ', "with ID ", '"', unresolved.id, '"', "?", (0, jsx_runtime_1.jsx)("br", {}), "The associated ", (0, jsx_runtime_1.jsx)("code", { style: styles_1.inlineCodeSnippet, children: "component" }), " will remain in your code."] }), (0, jsx_runtime_1.jsx)(ModalFooter_1.ModalFooterContainer, { children: (0, jsx_runtime_1.jsx)(CodemodFooter_1.CodemodFooter, { errorNotification: `Could not delete composition`, loadingNotification: 'Deleting',
|
|
33
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.ModalHeader, { title: 'Delete composition' }), (0, jsx_runtime_1.jsxs)("form", { onSubmit: onSubmit, children: [(0, jsx_runtime_1.jsxs)("div", { style: content, children: ["Do you want to delete the", ' ', (0, jsx_runtime_1.jsx)("code", { style: styles_1.inlineCodeSnippet, children: unresolved.durationInFrames === 1 ? `<Still>` : '<Composition>' }), ' ', "with ID ", '"', unresolved.id, '"', "?", (0, jsx_runtime_1.jsx)("br", {}), "The associated ", (0, jsx_runtime_1.jsx)("code", { style: styles_1.inlineCodeSnippet, children: "component" }), " will remain in your code."] }), (0, jsx_runtime_1.jsx)(ModalFooter_1.ModalFooterContainer, { children: (0, jsx_runtime_1.jsx)(CodemodFooter_1.CodemodFooter, { errorNotification: `Could not delete composition`, loadingNotification: 'Deleting', successNotification: `Deleted ${unresolved.id}`, genericSubmitLabel: `Delete`, submitLabel: ({ relativeRootPath }) => `Delete from ${relativeRootPath}`, codemod: codemod, valid: true }) })] })] }));
|
|
34
34
|
};
|
|
35
35
|
const DeleteComposition = ({ compositionId }) => {
|
|
36
36
|
return ((0, jsx_runtime_1.jsx)(DismissableModal_1.DismissableModal, { children: (0, jsx_runtime_1.jsx)(ResolveCompositionBeforeModal_1.ResolveCompositionBeforeModal, { compositionId: compositionId, children: (0, jsx_runtime_1.jsx)(DeleteCompositionLoaded, { compositionId: compositionId }) }) }));
|
|
@@ -172,7 +172,7 @@ const DuplicateCompositionLoaded = ({ initialType }) => {
|
|
|
172
172
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.ModalHeader, { title: `Duplicate ${resolved.result.id}` }), (0, jsx_runtime_1.jsxs)("form", { onSubmit: onSubmit, children: [(0, jsx_runtime_1.jsxs)("div", { style: content, children: [initialCompType === 'composition' ? (
|
|
173
173
|
// We allow converting from a composition to a still, but
|
|
174
174
|
// not the other way around
|
|
175
|
-
(0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Type" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: "Type of composition", style: comboBoxStyle, values: typeValues, selectedId: type }) })] })) : null, (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "ID" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { value: newId, onChange: onNameChange, type: "text", autoFocus: true, placeholder: "Composition ID", status: "ok", rightAlign: true }), compNameErrMessage ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_2.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compNameErrMessage, type: "error" })] })) : null] }) })] }), hadDimensionsDefined ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Width" }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.rightRow, children: [(0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { type: "number", value: size.width, placeholder: "Width", onTextChange: onWidthChanged, name: "width", step: 2, min: 2, required: true, status: "ok", formatter: (w) => `${w}px`, max: 100000000, onValueChange: onWidthDirectlyChanged, rightAlign: false }), compWidthErrMessage ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_2.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compWidthErrMessage, type: "error" })] })) : null] })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Height" }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.rightRow, children: [(0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { type: "number", value: size.height, onTextChange: onHeightChanged, placeholder: "Height", name: "height", step: 2, required: true, formatter: (h) => `${h}px`, min: 2, status: "ok", max: 100000000, onValueChange: onHeightDirectlyChanged, rightAlign: false }), compHeightErrMessage ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_2.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compHeightErrMessage, type: "error" })] })) : null] })] })] })) : null, type === 'composition' && hadDurationDefined ? ((0, jsx_runtime_1.jsx)(NewCompDuration_1.NewCompDuration, { durationInFrames: durationInFrames, setDurationInFrames: setDurationInFrames })) : null, type === 'composition' && hadFpsDefined ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "FPS" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { type: "number", value: selectedFrameRate, onTextChange: onTextFpsChange, placeholder: "Frame rate (fps)", name: "fps", min: 1, required: true, status: "ok", max: 240, step: 0.01, onValueChange: onFpsChange, rightAlign: false }) })] })) : null] }), (0, jsx_runtime_1.jsx)(ModalFooter_1.ModalFooterContainer, { children: (0, jsx_runtime_1.jsx)(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Duplicating...', errorNotification: 'Could not duplicate composition',
|
|
175
|
+
(0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Type" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: "Type of composition", style: comboBoxStyle, values: typeValues, selectedId: type }) })] })) : null, (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "ID" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { value: newId, onChange: onNameChange, type: "text", autoFocus: true, placeholder: "Composition ID", status: "ok", rightAlign: true }), compNameErrMessage ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_2.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compNameErrMessage, type: "error" })] })) : null] }) })] }), hadDimensionsDefined ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Width" }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.rightRow, children: [(0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { type: "number", value: size.width, placeholder: "Width", onTextChange: onWidthChanged, name: "width", step: 2, min: 2, required: true, status: "ok", formatter: (w) => `${w}px`, max: 100000000, onValueChange: onWidthDirectlyChanged, rightAlign: false }), compWidthErrMessage ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_2.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compWidthErrMessage, type: "error" })] })) : null] })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Height" }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.rightRow, children: [(0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { type: "number", value: size.height, onTextChange: onHeightChanged, placeholder: "Height", name: "height", step: 2, required: true, formatter: (h) => `${h}px`, min: 2, status: "ok", max: 100000000, onValueChange: onHeightDirectlyChanged, rightAlign: false }), compHeightErrMessage ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_2.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compHeightErrMessage, type: "error" })] })) : null] })] })] })) : null, type === 'composition' && hadDurationDefined ? ((0, jsx_runtime_1.jsx)(NewCompDuration_1.NewCompDuration, { durationInFrames: durationInFrames, setDurationInFrames: setDurationInFrames })) : null, type === 'composition' && hadFpsDefined ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "FPS" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { type: "number", value: selectedFrameRate, onTextChange: onTextFpsChange, placeholder: "Frame rate (fps)", name: "fps", min: 1, required: true, status: "ok", max: 240, step: 0.01, onValueChange: onFpsChange, rightAlign: false }) })] })) : null] }), (0, jsx_runtime_1.jsx)(ModalFooter_1.ModalFooterContainer, { children: (0, jsx_runtime_1.jsx)(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Duplicating...', errorNotification: 'Could not duplicate composition', successNotification: `Duplicated ${unresolved.id} as ${newId}`, genericSubmitLabel: 'Duplicate', submitLabel: ({ relativeRootPath }) => `Add to ${relativeRootPath}`, codemod: codemod, valid: valid }) })] })] }));
|
|
176
176
|
};
|
|
177
177
|
const DuplicateComposition = ({ compositionId, compositionType }) => {
|
|
178
178
|
return ((0, jsx_runtime_1.jsx)(DismissableModal_1.DismissableModal, { children: (0, jsx_runtime_1.jsx)(ResolveCompositionBeforeModal_1.ResolveCompositionBeforeModal, { compositionId: compositionId, children: (0, jsx_runtime_1.jsx)(DuplicateCompositionLoaded, { initialType: compositionType }) }) }));
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.InputDragger = void 0;
|
|
27
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -48,7 +48,7 @@ const RenameCompositionLoaded = () => {
|
|
|
48
48
|
const onSubmit = (0, react_1.useCallback)((e) => {
|
|
49
49
|
e.preventDefault();
|
|
50
50
|
}, []);
|
|
51
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.ModalHeader, { title: `Rename ${resolved.result.id}` }), (0, jsx_runtime_1.jsxs)("form", { onSubmit: onSubmit, children: [(0, jsx_runtime_1.jsx)("div", { style: content, children: (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "ID" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { value: newId, onChange: onNameChange, type: "text", autoFocus: true, placeholder: "Composition ID", status: "ok", rightAlign: true }), compNameErrMessage ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_2.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compNameErrMessage, type: "error" })] })) : null] }) })] }) }), (0, jsx_runtime_1.jsx)(ModalFooter_1.ModalFooterContainer, { children: (0, jsx_runtime_1.jsx)(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Renaming...', errorNotification: 'Could not rename composition',
|
|
51
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.ModalHeader, { title: `Rename ${resolved.result.id}` }), (0, jsx_runtime_1.jsxs)("form", { onSubmit: onSubmit, children: [(0, jsx_runtime_1.jsx)("div", { style: content, children: (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "ID" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { value: newId, onChange: onNameChange, type: "text", autoFocus: true, placeholder: "Composition ID", status: "ok", rightAlign: true }), compNameErrMessage ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_2.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compNameErrMessage, type: "error" })] })) : null] }) })] }) }), (0, jsx_runtime_1.jsx)(ModalFooter_1.ModalFooterContainer, { children: (0, jsx_runtime_1.jsx)(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Renaming...', errorNotification: 'Could not rename composition', successNotification: `Renamed to ${newId}`, genericSubmitLabel: 'Rename', submitLabel: ({ relativeRootPath }) => `Modify ${relativeRootPath}`, codemod: codemod, valid: valid }) })] })] }));
|
|
52
52
|
};
|
|
53
53
|
const RenameComposition = ({ compositionId }) => {
|
|
54
54
|
return ((0, jsx_runtime_1.jsx)(DismissableModal_1.DismissableModal, { children: (0, jsx_runtime_1.jsx)(ResolveCompositionBeforeModal_1.ResolveCompositionBeforeModal, { compositionId: compositionId, children: (0, jsx_runtime_1.jsx)(RenameCompositionLoaded, {}) }) }));
|