remotion
Version:
Make videos programmatically
654 lines (653 loc) • 20.9 kB
TypeScript
export type HiddenFieldSchema = {
type: 'hidden';
keyframable?: boolean;
};
export type NumberFieldSchema = {
type: 'number';
min?: number;
max?: number;
step?: number;
default: number | null | undefined;
description?: string;
hiddenFromList: boolean;
keyframable?: boolean;
};
export type BooleanFieldSchema = {
type: 'boolean';
default: boolean;
description?: string;
keyframable?: boolean;
};
export type RotationCssFieldSchema = {
type: 'rotation-css';
step?: number;
default: string | undefined;
description?: string;
keyframable?: boolean;
};
export type RotationDegreesFieldSchema = {
type: 'rotation-degrees';
min?: number;
max?: number;
step?: number;
default: number | undefined;
description?: string;
keyframable?: boolean;
};
export type TranslateFieldSchema = {
type: 'translate';
step?: number;
default: string | undefined;
description?: string;
keyframable?: boolean;
};
export type TransformOriginFieldSchema = {
type: 'transform-origin';
step?: number;
default: string | undefined;
description?: string;
keyframable?: boolean;
};
export type ScaleFieldSchema = {
type: 'scale';
min?: number;
max?: number;
step?: number;
default: number | string | undefined;
description?: string;
keyframable?: boolean;
};
export type UvCoordinateFieldSchema = {
type: 'uv-coordinate';
min?: number;
max?: number;
step?: number;
visual?: {
readonly type: 'line';
readonly to: string;
} | {
readonly type: 'ellipse';
readonly width: string;
readonly height: string;
readonly rotation?: string;
readonly innerScale?: string;
};
default: readonly [number, number] | undefined;
description?: string;
keyframable?: boolean;
};
export type ColorFieldSchema = {
type: 'color';
default: string | undefined;
description?: string;
keyframable?: boolean;
};
export type TextContentFieldSchema = {
type: 'text-content';
default: string;
description?: string;
keyframable?: false;
};
export type EnumFieldSchema = {
type: 'enum';
default: string;
description?: string;
variants: Record<string, InteractivitySchema>;
keyframable?: boolean;
};
export type NumberArrayItemSchema = Omit<NumberFieldSchema, 'default' | 'description' | 'hiddenFromList' | 'keyframable'>;
export type BooleanArrayItemSchema = Omit<BooleanFieldSchema, 'default' | 'description' | 'keyframable'>;
export type RotationCssArrayItemSchema = Omit<RotationCssFieldSchema, 'default' | 'description' | 'keyframable'>;
export type RotationDegreesArrayItemSchema = Omit<RotationDegreesFieldSchema, 'default' | 'description' | 'keyframable'>;
export type TranslateArrayItemSchema = Omit<TranslateFieldSchema, 'default' | 'description' | 'keyframable'>;
export type UvCoordinateArrayItemSchema = Omit<UvCoordinateFieldSchema, 'default' | 'description' | 'keyframable'>;
export type ColorArrayItemSchema = Omit<ColorFieldSchema, 'default' | 'description' | 'keyframable'>;
export type EnumArrayItemSchema = {
type: 'enum';
variants: readonly string[];
};
export type ArrayItemFieldSchema = NumberArrayItemSchema | BooleanArrayItemSchema | RotationCssArrayItemSchema | RotationDegreesArrayItemSchema | TranslateArrayItemSchema | UvCoordinateArrayItemSchema | ColorArrayItemSchema | EnumArrayItemSchema;
export type ArrayFieldSchema = {
type: 'array';
item: ArrayItemFieldSchema;
default: readonly unknown[] | undefined;
minLength?: number;
maxLength?: number;
newItemDefault: unknown;
description?: string;
keyframable?: false;
};
export type VisibleFieldSchema = NumberFieldSchema | BooleanFieldSchema | RotationCssFieldSchema | RotationDegreesFieldSchema | TranslateFieldSchema | TransformOriginFieldSchema | ScaleFieldSchema | UvCoordinateFieldSchema | ColorFieldSchema | TextContentFieldSchema | ArrayFieldSchema | EnumFieldSchema;
export type InteractivitySchemaField = VisibleFieldSchema | HiddenFieldSchema;
export type InteractivitySchema = {
[key: string]: InteractivitySchemaField;
};
export type InteractivitySchemaKeysRecord<S extends InteractivitySchema> = Record<keyof S, unknown>;
export declare const transformSchema: {
readonly 'style.transformOrigin': {
readonly type: "transform-origin";
readonly step: 1;
readonly default: "50% 50%";
readonly description: "Transform origin";
};
readonly 'style.translate': {
readonly type: "translate";
readonly step: 1;
readonly default: "0px 0px";
readonly description: "Offset";
};
readonly 'style.scale': {
readonly type: "scale";
readonly max: 100;
readonly step: 0.01;
readonly default: 1;
readonly description: "Scale";
};
readonly 'style.rotate': {
readonly type: "rotation-css";
readonly step: 1;
readonly default: "0deg";
readonly description: "Rotation";
};
readonly 'style.opacity': {
readonly type: "number";
readonly min: 0;
readonly max: 1;
readonly step: 0.01;
readonly default: 1;
readonly description: "Opacity";
readonly hiddenFromList: false;
};
};
export declare const sequenceVisualStyleSchema: {
readonly 'style.transformOrigin': {
readonly type: "transform-origin";
readonly step: 1;
readonly default: "50% 50%";
readonly description: "Transform origin";
};
readonly 'style.translate': {
readonly type: "translate";
readonly step: 1;
readonly default: "0px 0px";
readonly description: "Offset";
};
readonly 'style.scale': {
readonly type: "scale";
readonly max: 100;
readonly step: 0.01;
readonly default: 1;
readonly description: "Scale";
};
readonly 'style.rotate': {
readonly type: "rotation-css";
readonly step: 1;
readonly default: "0deg";
readonly description: "Rotation";
};
readonly 'style.opacity': {
readonly type: "number";
readonly min: 0;
readonly max: 1;
readonly step: 0.01;
readonly default: 1;
readonly description: "Opacity";
readonly hiddenFromList: false;
};
};
export declare const textSchema: {
readonly 'style.color': {
readonly type: "color";
readonly default: undefined;
readonly description: "Color";
};
readonly 'style.fontSize': {
readonly type: "number";
readonly default: undefined;
readonly min: 0;
readonly step: 1;
readonly description: "Font size";
readonly hiddenFromList: false;
};
readonly 'style.lineHeight': {
readonly type: "number";
readonly default: undefined;
readonly min: 0;
readonly step: 0.05;
readonly description: "Line height";
readonly hiddenFromList: false;
};
readonly 'style.fontWeight': {
readonly type: "enum";
readonly default: "400";
readonly description: "Font weight";
readonly variants: {
readonly '100': {};
readonly '200': {};
readonly '300': {};
readonly '400': {};
readonly '500': {};
readonly '600': {};
readonly '700': {};
readonly '800': {};
readonly '900': {};
readonly normal: {};
readonly bold: {};
};
};
readonly 'style.fontStyle': {
readonly type: "enum";
readonly default: "normal";
readonly description: "Font style";
readonly variants: {
readonly normal: {};
readonly italic: {};
readonly oblique: {};
};
};
readonly 'style.textAlign': {
readonly type: "enum";
readonly default: "left";
readonly description: "Text align";
readonly variants: {
readonly left: {};
readonly center: {};
readonly right: {};
readonly justify: {};
readonly start: {};
readonly end: {};
};
};
readonly 'style.letterSpacing': {
readonly type: "number";
readonly default: undefined;
readonly step: 0.1;
readonly description: "Letter spacing";
readonly hiddenFromList: false;
};
};
export declare const textContentSchema: {
readonly children: {
readonly type: "text-content";
readonly default: "";
readonly description: "Text";
readonly keyframable: false;
};
};
export declare const premountSchema: {
readonly premountFor: {
readonly type: "number";
readonly default: 0;
readonly description: "Premount For";
readonly min: 0;
readonly step: 1;
readonly hiddenFromList: false;
};
readonly postmountFor: {
readonly type: "number";
readonly default: 0;
readonly min: 0;
readonly step: 1;
readonly hiddenFromList: true;
};
readonly styleWhilePremounted: {
readonly type: "hidden";
};
readonly styleWhilePostmounted: {
readonly type: "hidden";
};
};
export declare const sequencePremountSchema: {
readonly premountFor: {
readonly type: "number";
readonly default: 0;
readonly description: "Premount For";
readonly min: 0;
readonly step: 1;
readonly hiddenFromList: false;
};
readonly postmountFor: {
readonly type: "number";
readonly default: 0;
readonly min: 0;
readonly step: 1;
readonly hiddenFromList: true;
};
readonly styleWhilePremounted: {
readonly type: "hidden";
};
readonly styleWhilePostmounted: {
readonly type: "hidden";
};
};
export declare const sequenceStyleSchema: {
readonly 'style.transformOrigin': {
readonly type: "transform-origin";
readonly step: 1;
readonly default: "50% 50%";
readonly description: "Transform origin";
};
readonly 'style.translate': {
readonly type: "translate";
readonly step: 1;
readonly default: "0px 0px";
readonly description: "Offset";
};
readonly 'style.scale': {
readonly type: "scale";
readonly max: 100;
readonly step: 0.01;
readonly default: 1;
readonly description: "Scale";
};
readonly 'style.rotate': {
readonly type: "rotation-css";
readonly step: 1;
readonly default: "0deg";
readonly description: "Rotation";
};
readonly 'style.opacity': {
readonly type: "number";
readonly min: 0;
readonly max: 1;
readonly step: 0.01;
readonly default: 1;
readonly description: "Opacity";
readonly hiddenFromList: false;
};
readonly premountFor: {
readonly type: "number";
readonly default: 0;
readonly description: "Premount For";
readonly min: 0;
readonly step: 1;
readonly hiddenFromList: false;
};
readonly postmountFor: {
readonly type: "number";
readonly default: 0;
readonly min: 0;
readonly step: 1;
readonly hiddenFromList: true;
};
readonly styleWhilePremounted: {
readonly type: "hidden";
};
readonly styleWhilePostmounted: {
readonly type: "hidden";
};
};
export declare const hiddenField: InteractivitySchemaField;
export declare const sequenceNameField: InteractivitySchemaField;
export declare const extendSchemaWithSequenceName: <S extends InteractivitySchema>(schema: S) => S & {
name: InteractivitySchemaField;
};
export declare const durationInFramesField: {
readonly type: "number";
readonly default: undefined;
readonly min: 1;
readonly step: 1;
readonly hiddenFromList: true;
};
export declare const fromField: {
readonly type: "number";
readonly default: 0;
readonly step: 1;
readonly hiddenFromList: true;
};
export declare const trimBeforeField: {
readonly type: "number";
readonly default: 0;
readonly min: 0;
readonly step: 1;
readonly hiddenFromList: true;
};
export declare const freezeField: {
readonly type: "number";
readonly default: null;
readonly step: 1;
readonly hiddenFromList: true;
};
export declare const baseSchema: {
readonly durationInFrames: {
readonly type: "number";
readonly default: undefined;
readonly min: 1;
readonly step: 1;
readonly hiddenFromList: true;
};
readonly from: {
readonly type: "number";
readonly default: 0;
readonly step: 1;
readonly hiddenFromList: true;
};
readonly trimBefore: {
readonly type: "number";
readonly default: 0;
readonly min: 0;
readonly step: 1;
readonly hiddenFromList: true;
};
readonly freeze: {
readonly type: "number";
readonly default: null;
readonly step: 1;
readonly hiddenFromList: true;
};
readonly hidden: BooleanFieldSchema;
readonly name: HiddenFieldSchema;
readonly showInTimeline: HiddenFieldSchema;
};
export declare const sequenceSchema: {
readonly durationInFrames: {
readonly type: "number";
readonly default: undefined;
readonly min: 1;
readonly step: 1;
readonly hiddenFromList: true;
};
readonly from: {
readonly type: "number";
readonly default: 0;
readonly step: 1;
readonly hiddenFromList: true;
};
readonly trimBefore: {
readonly type: "number";
readonly default: 0;
readonly min: 0;
readonly step: 1;
readonly hiddenFromList: true;
};
readonly freeze: {
readonly type: "number";
readonly default: null;
readonly step: 1;
readonly hiddenFromList: true;
};
readonly hidden: BooleanFieldSchema;
readonly name: HiddenFieldSchema;
readonly showInTimeline: HiddenFieldSchema;
readonly layout: {
readonly type: "enum";
readonly default: "absolute-fill";
readonly description: "Layout";
readonly variants: {
readonly 'absolute-fill': {
readonly 'style.transformOrigin': {
readonly type: "transform-origin";
readonly step: 1;
readonly default: "50% 50%";
readonly description: "Transform origin";
};
readonly 'style.translate': {
readonly type: "translate";
readonly step: 1;
readonly default: "0px 0px";
readonly description: "Offset";
};
readonly 'style.scale': {
readonly type: "scale";
readonly max: 100;
readonly step: 0.01;
readonly default: 1;
readonly description: "Scale";
};
readonly 'style.rotate': {
readonly type: "rotation-css";
readonly step: 1;
readonly default: "0deg";
readonly description: "Rotation";
};
readonly 'style.opacity': {
readonly type: "number";
readonly min: 0;
readonly max: 1;
readonly step: 0.01;
readonly default: 1;
readonly description: "Opacity";
readonly hiddenFromList: false;
};
readonly premountFor: {
readonly type: "number";
readonly default: 0;
readonly description: "Premount For";
readonly min: 0;
readonly step: 1;
readonly hiddenFromList: false;
};
readonly postmountFor: {
readonly type: "number";
readonly default: 0;
readonly min: 0;
readonly step: 1;
readonly hiddenFromList: true;
};
readonly styleWhilePremounted: {
readonly type: "hidden";
};
readonly styleWhilePostmounted: {
readonly type: "hidden";
};
};
readonly none: {};
};
};
};
export declare const baseSchemaWithoutFrom: {
readonly durationInFrames: {
readonly type: "number";
readonly default: undefined;
readonly min: 1;
readonly step: 1;
readonly hiddenFromList: true;
};
readonly trimBefore: {
readonly type: "number";
readonly default: 0;
readonly min: 0;
readonly step: 1;
readonly hiddenFromList: true;
};
readonly freeze: {
readonly type: "number";
readonly default: null;
readonly step: 1;
readonly hiddenFromList: true;
};
readonly hidden: BooleanFieldSchema;
readonly name: HiddenFieldSchema;
readonly showInTimeline: HiddenFieldSchema;
};
export declare const sequenceSchemaWithoutFrom: {
readonly durationInFrames: {
readonly type: "number";
readonly default: undefined;
readonly min: 1;
readonly step: 1;
readonly hiddenFromList: true;
};
readonly trimBefore: {
readonly type: "number";
readonly default: 0;
readonly min: 0;
readonly step: 1;
readonly hiddenFromList: true;
};
readonly freeze: {
readonly type: "number";
readonly default: null;
readonly step: 1;
readonly hiddenFromList: true;
};
readonly hidden: BooleanFieldSchema;
readonly name: HiddenFieldSchema;
readonly showInTimeline: HiddenFieldSchema;
readonly layout: {
readonly type: "enum";
readonly default: "absolute-fill";
readonly description: "Layout";
readonly variants: {
readonly 'absolute-fill': {
readonly 'style.transformOrigin': {
readonly type: "transform-origin";
readonly step: 1;
readonly default: "50% 50%";
readonly description: "Transform origin";
};
readonly 'style.translate': {
readonly type: "translate";
readonly step: 1;
readonly default: "0px 0px";
readonly description: "Offset";
};
readonly 'style.scale': {
readonly type: "scale";
readonly max: 100;
readonly step: 0.01;
readonly default: 1;
readonly description: "Scale";
};
readonly 'style.rotate': {
readonly type: "rotation-css";
readonly step: 1;
readonly default: "0deg";
readonly description: "Rotation";
};
readonly 'style.opacity': {
readonly type: "number";
readonly min: 0;
readonly max: 1;
readonly step: 0.01;
readonly default: 1;
readonly description: "Opacity";
readonly hiddenFromList: false;
};
readonly premountFor: {
readonly type: "number";
readonly default: 0;
readonly description: "Premount For";
readonly min: 0;
readonly step: 1;
readonly hiddenFromList: false;
};
readonly postmountFor: {
readonly type: "number";
readonly default: 0;
readonly min: 0;
readonly step: 1;
readonly hiddenFromList: true;
};
readonly styleWhilePremounted: {
readonly type: "hidden";
};
readonly styleWhilePostmounted: {
readonly type: "hidden";
};
};
readonly none: {};
};
};
};
export declare const sequenceSchemaDefaultLayoutNone: InteractivitySchema;