UNPKG

remotion

Version:

Make videos programmatically

64 lines (63 loc) 3.31 kB
import type { ExtrapolateType } from './interpolate.js'; import type { SequenceSchema } from './sequence-field-schema.js'; import type { CanUpdateSequencePropsResponse, SequencePropsSubscriptionKey } from './SequenceManager.js'; export type CanUpdateSequencePropStatusStatic = { status: 'static'; codeValue: unknown; }; export type CanUpdateSequencePropStatusKeyframe = { frame: number; value: unknown; }; export type CanUpdateSequencePropStatusEasing = 'linear' | [number, number, number, number]; export type CanUpdateSequencePropStatusClamping = { left: ExtrapolateType; right: ExtrapolateType; }; export type CanUpdateSequencePropStatusInterpolationFunction = 'interpolate' | 'interpolateColors'; export type CanUpdateSequencePropStatusComputed = { status: 'computed'; }; export type CanUpdateSequencePropStatusKeyframed = { status: 'keyframed'; codeValue: unknown; interpolationFunction: CanUpdateSequencePropStatusInterpolationFunction; keyframes: CanUpdateSequencePropStatusKeyframe[]; easing: CanUpdateSequencePropStatusEasing[]; clamping: CanUpdateSequencePropStatusClamping; posterize: number | undefined; }; export type CanUpdateSequencePropStatusFalse = CanUpdateSequencePropStatusComputed; export type CanUpdateSequencePropStatus = CanUpdateSequencePropStatusStatic | CanUpdateSequencePropStatusKeyframed | CanUpdateSequencePropStatusFalse; export type DragOverrideValue = { readonly type: 'static'; readonly value: unknown; } | { readonly type: 'keyframed'; readonly status: CanUpdateSequencePropStatusKeyframed; }; export type DragOverrides = Record<string, Record<string, DragOverrideValue>>; export type EffectDragOverrides = Record<string, Record<string, DragOverrideValue>>; export type CodeValues = Record<string, CanUpdateSequencePropsResponse>; export type GetCodeValues = (nodePath: SequencePropsSubscriptionKey) => Record<string, CanUpdateSequencePropStatus> | undefined; export type GetEffectCodeValues = (nodePath: SequencePropsSubscriptionKey, effectIndex: number) => Record<string, CanUpdateSequencePropStatus> | undefined; export type GetDragOverrides = (nodePath: SequencePropsSubscriptionKey) => DragOverrides[string]; export type GetEffectDragOverrides = (nodePath: SequencePropsSubscriptionKey, effectIndex: number) => Record<string, DragOverrideValue>; export declare const makeStaticDragOverride: (value: unknown) => DragOverrideValue; export declare const makeKeyframedDragOverride: ({ status, frame, value, }: { status: CanUpdateSequencePropStatusKeyframed; frame: number; value: unknown; }) => DragOverrideValue; export declare const getStaticDragOverrideValue: (dragOverrideValue: DragOverrideValue | undefined) => unknown; export declare const isKeyframedStatus: (status: CanUpdateSequencePropStatus | null) => status is CanUpdateSequencePropStatusKeyframed; export declare const computeEffectiveSchemaValuesDotNotation: ({ schema, currentValue, overrideValues, propStatus, frame, }: { schema: SequenceSchema; currentValue: Record<string, unknown>; overrideValues: Record<string, DragOverrideValue>; propStatus: Record<string, CanUpdateSequencePropStatus> | undefined; frame: number | null; }) => { merged: Record<string, unknown>; propsToDelete: Set<string>; };