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; __fileName?: string | null; __fileSize?: number | null; __fileMimeType?: string | null; __displayType?: DisplayType | null; __key?: string | null; } export interface MediaAttributes extends MediaBaseAttributes { type: 'file' | 'link'; } export interface ExternalMediaAttributes { type: 'external'; url: string; width?: number; height?: number; } export declare const defaultAttrs: DefaultAttributes; export declare const media: NodeSpec; export declare const camelCaseToKebabCase: (str: any) => any; export declare const copyPrivateAttributes: (from: Object, to: Object, map?: ((string: any) => string) | undefined) => void; export declare const toJSON: (node: PMNode) => { attrs: {}; };