UNPKG

@lottiefiles/relottie-metadata

Version:
60 lines (56 loc) 1.3 kB
import { Root } from '@lottiefiles/last'; import { Plugin } from 'unified'; import { Data } from 'vfile'; import { FileSizeValue } from './helpers.js'; import { Options } from './options.js'; import 'filesize'; /** * Copyright 2024 Design Barn Inc. */ interface Metadata { /** * Set of hex colors used in the animation. */ colors: Set<string>; /** * * Size of the Lottie JSON */ fileSize?: FileSizeValue; /** * Framerate in frames per second */ framerate: number; /** * Total number of frames in the animation. */ frames: number; /** * Generator of the animation. */ generator: string; /** * Height of the animation. */ height: number; /** * Which frame the animation starts at (usually 0) */ inPoint: number; /** * Which frame the animation stops/loops at, which makes this the duration in frames */ outPoint: number; /** * Version of the Lottie JSON. */ version: string; /** * Width of the animation. */ width: number; } interface MetadataFileData extends Data { metadata: Metadata; } declare const metadata: Plugin<[Options?], Root>; export { type Metadata, type MetadataFileData, metadata as default };