import { Extension } from '@tiptap/core'; import { Node as PMNode } from 'prosemirror-model'; import { default as TurndownService } from 'turndown'; import { IpfsImageFetchPayload, IpfsImageUploadResponse } from '../../types'; export declare const turndownService: TurndownService; export declare const setMarkdownInlineStyles: (enabled: boolean) => void; export declare const setResolveColorVars: (enabled: boolean) => void; declare module '@tiptap/core' { interface Storage { markdownPasteHandler: { customCSS: string; }; } interface Commands { uploadMarkdownFile: { uploadMarkdownFile: (ipfsImageUploadFn?: (file: File) => Promise, onError?: (error: string) => void) => any; }; exportMarkdownFile: { exportMarkdownFile: (props?: { title?: string; returnMDFile?: boolean; metadataFormat?: 'yaml' | 'reference-links'; metadata?: Record; includeStyles?: boolean; /** * Embed secure images as base64 data URLs (default true — makes the * downloaded .md self-contained). Split View seeds with false so * images stay as attribute references and are never re-uploaded. */ embedImages?: boolean; }) => any; }; } } declare const MarkdownPasteHandler: (ipfsImageUploadFn?: (file: File) => Promise, ipfsImageFetchFn?: (_data: IpfsImageFetchPayload) => Promise<{ url: string; file: File; }>, fetchV1ImageFn?: (url: string) => Promise) => Extension; export declare const stripFrontmatter: (markdown: string) => string; export declare function handleMarkdownContent(view: any, content: string, ipfsImageUploadFn?: (file: File) => Promise, options?: { breaks?: boolean; replaceAll?: boolean; }): Promise; export default MarkdownPasteHandler; export declare function searchForSecureImageNodeAndEmbedImageContent(originalDoc: PMNode, ipfsImageFetchFn?: (_data: IpfsImageFetchPayload) => Promise<{ url: string; file: File; }>, fetchV1ImageFn?: (url: string) => Promise, shouldCompress?: boolean): Promise;