import { VueConstructor } from 'vue' import { Editor } from '@tiptap/core' export interface ToolbarConfig { bold?: boolean italic?: boolean underline?: boolean strike?: boolean code?: boolean textColor?: boolean highlight?: boolean fontFamily?: boolean fontSize?: boolean textAlign?: boolean lineHeight?: boolean headings?: boolean lists?: boolean blockquote?: boolean codeBlock?: boolean horizontalRule?: boolean link?: boolean image?: boolean video?: boolean table?: boolean clearFormatting?: boolean sourceCode?: boolean undo?: boolean redo?: boolean } export interface ExtensionConfig { image?: { allowResize?: boolean allowAlignment?: boolean allowDelete?: boolean maxWidth?: string quality?: number } video?: { allowResize?: boolean allowAlignment?: boolean allowDelete?: boolean maxWidth?: string autoplay?: boolean } table?: { resizable?: boolean allowRowControls?: boolean allowColumnControls?: boolean cellSelection?: boolean } link?: { openOnClick?: boolean autolink?: boolean linkOnPaste?: boolean } textAlign?: { types?: string[] } } export interface UploadHandler { (file: File): Promise<{ src: string; alt?: string; width?: number; height?: number; size?: number; originalSize?: number; type?: string; originalName?: string; compressed?: boolean }> } export interface ImageCompressionEvent { originalSize: number compressedSize: number originalDimensions: { width: number; height: number } compressedDimensions: { width: number; height: number } compressionRatio: number } export interface PremiumBblEditorProps { value?: string placeholder?: string editable?: boolean outputFormat?: 'html' | 'json' maxHeight?: string | number minHeight?: string | number theme?: 'default' | 'minimal' | 'dark' showToolbar?: boolean showBubbleMenu?: boolean showTableBubbleMenu?: boolean showImageBubbleMenu?: boolean showVideoBubbleMenu?: boolean toolbarConfig?: ToolbarConfig extensionConfig?: ExtensionConfig uploadHandler?: UploadHandler imageUploadUrl?: string videoUploadUrl?: string maxFileSize?: number allowedImageTypes?: string[] allowedVideoTypes?: string[] // Local file base64 management useBase64Upload?: boolean base64Quality?: number base64MaxWidth?: number base64MaxHeight?: number enableImageCompression?: boolean preserveOriginalFileName?: boolean base64Prefix?: string maxContentLength?: number allowedHeadings?: number[] fontFamilies?: string[] fontSizes?: string[] lineHeights?: string[] autofocus?: boolean spellcheck?: boolean autoSave?: boolean autoSaveInterval?: number editorClass?: string | string[] | object toolbarClass?: string | string[] | object contentClass?: string | string[] | object } export interface PremiumBblEditorEvents { input: (content: string) => void update: (content: string) => void ready: (editor: Editor) => void created: (editor: Editor) => void focus: () => void blur: () => void destroyed: () => void 'auto-save': (content: string) => void 'content-limit-exceeded': (data: { current: number; max: number }) => void 'image-compressed': (data: ImageCompressionEvent) => void error: (error: { type: string; message: string; [key: string]: any }) => void } export interface PremiumBblEditorMethods { focus(): void blur(): void getContent(format?: 'html' | 'json'): string | object setContent(content: string, emitUpdate?: boolean): void executeCommand(command: string, options?: any): void } export declare class PremiumBblEditorComponent { $props: PremiumBblEditorProps $emit: PremiumBblEditorEvents focus(): void blur(): void getContent(format?: 'html' | 'json'): string | object setContent(content: string, emitUpdate?: boolean): void executeCommand(command: string, options?: any): void } export declare class PremiumBblEditorOptionsAPIComponent { $props: PremiumBblEditorProps $emit: PremiumBblEditorEvents focus(): void blur(): void getContent(format?: 'html' | 'json'): string | object setContent(content: string, emitUpdate?: boolean): void executeCommand(command: string, options?: any): void } export declare class DiagnosticToolComponent { $props: {} } export declare class DebugHelperComponent { $props: {} } export interface PluginOptions { registerAllComponents?: boolean } export declare function install(Vue: VueConstructor, options?: PluginOptions): void // Composable types export interface UseEditorOptions { content?: string extensions?: any[] editable?: boolean autofocus?: boolean onUpdate?: (props: { editor: Editor }) => void onCreate?: (props: { editor: Editor }) => void onFocus?: (props: { editor: Editor; event: FocusEvent }) => void onBlur?: (props: { editor: Editor; event: FocusEvent }) => void onDestroy?: () => void } export interface UseEditorReturn { editor: Editor | null } export declare function useEditor(options?: UseEditorOptions): UseEditorReturn // Component exports with proper names export const PremiumBblEditor: typeof PremiumBblEditorComponent export const PremiumBblEditorOptionsAPI: typeof PremiumBblEditorOptionsAPIComponent export const DiagnosticTool: typeof DiagnosticToolComponent export const DebugHelper: typeof DebugHelperComponent // Upload system types export interface UploadResult { success: boolean url: string publicUrl?: string uploadId: string size: number adapter: string metadata?: { fileName?: string fileType?: string uploadedAt?: string [key: string]: any } } export interface UploadConfig { defaultAdapter: string adapters: Record validation?: { maxSize?: number allowedTypes?: string[] customValidator?: (file: File) => boolean } retry?: { maxAttempts?: number baseDelay?: number maxDelay?: number backoffFactor?: number } progress?: { throttleMs?: number } debug?: boolean } export declare class UploadManager { constructor(config: UploadConfig) registerAdapter(adapter: any): void setDefaultAdapter(name: string): void upload(file: File, options?: any): Promise uploadWithAdapter(adapterName: string, file: File, options?: any): Promise cancelUpload(uploadId: string): Promise getStats(): any destroy(): void on(event: string, callback: Function): void off(event: string, callback: Function): void } export declare class LocalStorageAdapter { constructor(options?: any) getName(): string upload(file: File, options?: any): Promise } export declare function createUploadConfig(preset: string, overrides?: Partial): UploadConfig export declare function integrateTipTapUpload(editor: Editor, uploadManager: UploadManager, options?: any): void declare const plugin: { install: typeof install PremiumBblEditor: typeof PremiumBblEditorComponent PremiumBblEditorOptionsAPI: typeof PremiumBblEditorOptionsAPIComponent DiagnosticTool: typeof DiagnosticToolComponent DebugHelper: typeof DebugHelperComponent } export default plugin