import { NodeSpec, Node as PMNode } from 'prosemirror-model'; export declare type MediaType = 'file' | 'link' | 'external'; export declare type DisplayType = 'file' | 'thumbnail'; export declare type DefaultAttributes = { [P in keyof T]: { default?: T[P] | null; }; }; /** * @name media_node */ export interface MediaDefinition { type: 'media'; /** * @minItems 1 */ attrs: MediaAttributes | ExternalMediaAttributes; } export interface MediaBaseAttributes { /** * @minLength 1 */ id: string; collection: string; height?: number; width?: number; /** * @minLength 1 */ occurrenceKey?: string; /** * @stage 0 */ alt?: string; __fileName?: string | null; __fileSize?: number | null; __fileMimeType?: string | null; __displayType?: DisplayType | null; __contextId?: string; __external?: boolean; } export interface MediaAttributes extends MediaBaseAttributes { type: 'file' | 'link'; } export interface ExternalMediaAttributes { type: 'external'; url: string; width?: number; height?: number; __external?: boolean; } export declare const defaultAttrs: DefaultAttributes; export declare const defaultAttrsWithAltText: DefaultAttributes; export declare const createMediaSpec: (attributes: Partial<{ [name: string]: import("prosemirror-model").AttributeSpec; }> | null | undefined) => NodeSpec; export declare const media: NodeSpec; export declare const mediaWithAltText: NodeSpec; export declare const camelCaseToKebabCase: (str: string) => string; export declare const copyPrivateAttributes: (from: Record, to: Record, map?: ((str: string) => string) | undefined) => void; export declare const toJSON: (node: PMNode) => { attrs: Record; };