UNPKG

alinea

Version:

[![npm](https://img.shields.io/npm/v/alinea.svg)](https://npmjs.org/package/alinea) [![install size](https://packagephobia.com/badge?p=alinea)](https://packagephobia.com/result?p=alinea)

31 lines (30 loc) 942 B
import { Connection, EntryRow } from 'alinea/core'; export interface Media { prepareUpload(file: string, ctx: Connection.Context): Promise<Connection.UploadResponse>; } export declare namespace Media { type FileProperties = { title: string; location: string; extension: string; size: number; hash: string; }; type ImageProperties = { width: number; height: number; preview: string; averageColor: string; focus: { x: number; y: number; }; thumbHash: string; }; export const ORIGINAL_LOCATION = "@alinea.location"; export type File = EntryRow<FileProperties & Partial<ImageProperties>>; export type Image = EntryRow<FileProperties & ImageProperties>; export const imageExtensions: string[]; export function isImage(pathOrExtension: string): boolean | "" | undefined; export {}; }