UNPKG

remotion

Version:

Make videos programmatically

300 lines (299 loc) • 9.8 kB
export type HiddenFieldSchema = { type: 'hidden'; keyframable?: boolean; }; export type NumberFieldSchema = { type: 'number'; min?: number; max?: number; step?: number; default: number | 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 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; default: readonly [number, number] | undefined; description?: string; keyframable?: boolean; }; export type ColorFieldSchema = { type: 'color'; default: string | undefined; description?: string; keyframable?: boolean; }; export type EnumFieldSchema = { type: 'enum'; default: string; description?: string; variants: Record<string, SequenceSchema>; 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 | ScaleFieldSchema | UvCoordinateFieldSchema | ColorFieldSchema | ArrayFieldSchema | EnumFieldSchema; export type SequenceFieldSchema = VisibleFieldSchema | HiddenFieldSchema; export type SequenceSchema = { [key: string]: SequenceFieldSchema; }; export type SchemaKeysRecord<S extends SequenceSchema> = Record<keyof S, unknown>; export declare const sequenceVisualStyleSchema: { readonly 'style.translate': { readonly type: "translate"; readonly step: 1; readonly default: "0px 0px"; readonly description: "Offset"; }; readonly 'style.scale': { readonly type: "scale"; readonly min: 0.05; 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 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.translate': { readonly type: "translate"; readonly step: 1; readonly default: "0px 0px"; readonly description: "Offset"; }; readonly 'style.scale': { readonly type: "scale"; readonly min: 0.05; 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: SequenceFieldSchema; 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 sequenceSchema: { readonly hidden: BooleanFieldSchema; readonly from: { readonly type: "number"; readonly default: 0; readonly step: 1; readonly hiddenFromList: true; }; readonly durationInFrames: { readonly type: "number"; readonly default: undefined; readonly min: 1; readonly step: 1; readonly hiddenFromList: true; }; readonly layout: { readonly type: "enum"; readonly default: "absolute-fill"; readonly description: "Layout"; readonly variants: { readonly 'absolute-fill': { readonly 'style.translate': { readonly type: "translate"; readonly step: 1; readonly default: "0px 0px"; readonly description: "Offset"; }; readonly 'style.scale': { readonly type: "scale"; readonly min: 0.05; 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: SequenceSchema;