init commit
This commit is contained in:
42
remotion/node_modules/@remotion/cli/dist/show-compositions-picker.js
generated
vendored
Normal file
42
remotion/node_modules/@remotion/cli/dist/show-compositions-picker.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.showMultiCompositionsPicker = exports.showSingleCompositionsPicker = void 0;
|
||||
const composition_prompts_1 = require("./composition-prompts");
|
||||
const chalk_1 = require("./chalk");
|
||||
const showSingleCompositionsPicker = async (validCompositions, logLevel) => {
|
||||
const selectedComposition = (await (0, composition_prompts_1.selectAsync)({
|
||||
message: 'Select composition:',
|
||||
optionsPerPage: 5,
|
||||
type: 'select',
|
||||
choices: validCompositions.map((comp) => {
|
||||
return {
|
||||
value: comp.id,
|
||||
title: chalk_1.chalk.bold(comp.id),
|
||||
};
|
||||
}),
|
||||
}, logLevel));
|
||||
return { compositionId: selectedComposition, reason: 'Selected' };
|
||||
};
|
||||
exports.showSingleCompositionsPicker = showSingleCompositionsPicker;
|
||||
const showMultiCompositionsPicker = async (validCompositions, logLevel) => {
|
||||
if (validCompositions.length === 1) {
|
||||
const onlyComposition = validCompositions[0];
|
||||
if (onlyComposition) {
|
||||
return [onlyComposition.id];
|
||||
}
|
||||
}
|
||||
const selectedComposition = await (0, composition_prompts_1.selectAsync)({
|
||||
message: 'Select compositions:',
|
||||
optionsPerPage: 5,
|
||||
type: 'multiselect',
|
||||
min: 1,
|
||||
choices: validCompositions.map((comp) => {
|
||||
return {
|
||||
value: comp.id,
|
||||
title: chalk_1.chalk.bold(comp.id),
|
||||
};
|
||||
}),
|
||||
}, logLevel);
|
||||
return selectedComposition;
|
||||
};
|
||||
exports.showMultiCompositionsPicker = showMultiCompositionsPicker;
|
||||
Reference in New Issue
Block a user