import { Editor, type AnyExtension } from '@tiptap/core'; import type { EditorBridge, BridgeState } from '../types'; import type WebView from 'react-native-webview'; import type { RefObject } from 'react'; interface BridgeExtension { name: string; tiptapExtension?: AnyExtension; tiptapExtensionDeps?: AnyExtension[]; onBridgeMessage?: (editor: Editor, message: M, sendMessageBack: (message: M) => void) => boolean; onEditorMessage?: (message: M, editorBridge: EditorBridge) => boolean; extendEditorState?: (editor: Editor) => T; extendEditorInstance?: (sendBridgeMessage: (message: M) => void, webviewRef?: RefObject, editorState?: RefObject, _setEditorState?: (editorState: BridgeState) => void, platform?: string) => E; extendCSS?: string | undefined; config?: any; extendConfig?: any; } type CreateTenTapBridgeArgs = Omit & { forceName?: string; }, 'name' | 'sendMessage' | 'configureExtension' | 'configureTiptapExtensionsOnRunTime' | 'configureCSS' | 'extendExtension' | 'clone'>; declare class BridgeExtension { constructor({ forceName, tiptapExtension, tiptapExtensionDeps, onBridgeMessage, onEditorMessage, extendEditorState, extendEditorInstance, extendCSS, config, extendConfig, }: CreateTenTapBridgeArgs); clone(): BridgeExtension; configureExtension(config: any): BridgeExtension; configureCSS(css: string): BridgeExtension; extendExtension(config: any): BridgeExtension; configureTiptapExtensionsOnRunTime(config: any, extendConfig: any): (AnyExtension | undefined)[]; } export default BridgeExtension;