import { ComponentOptionsMixin } from 'vue'; import { DefineComponent } from 'vue'; import { EmitsToProps } from 'vue'; import { PublicProps } from 'vue'; import { SlotsType } from 'vue'; import { SuperDoc } from 'superdoc'; import { SuperDocExceptionPayload } from 'superdoc'; export declare type DocumentMode = NonNullable; /** * Keys handled by reactive props, component-owned mount elements, or Vue * events. All other core options go through the startup-only `config` prop. */ declare type ManagedConfigKeys = 'selector' | 'toolbar' | 'document' | 'documentMode' | 'role' | 'user' | 'users' | 'modules' | 'ui' | 'contained' | 'onReady' | 'onEditorCreate' | 'onEditorDestroy' | 'onEditorUpdate' | 'onTransaction' | 'onContentError' | 'onException' | 'onZoomChange' | 'onViewportChange'; export declare type SuperDocConfig = SuperDocConstructorConfig; declare type SuperDocConstructorConfig = ConstructorParameters[0]; export declare type SuperDocContentErrorEvent = Parameters>[0]; declare const SuperDocEditor: SuperDocEditorComponent; export { SuperDocEditor } export default SuperDocEditor; declare type SuperDocEditorComponent = DefineComponent & EmitsToProps, {}, SuperDocEditorSlots, {}, {}, 'getInstance'>; /** * Core options accepted by the `config` prop. They apply only when the editor * starts; use managed props or `getInstance()` for later changes. */ export declare type SuperDocEditorConfig = Omit; export declare type SuperDocEditorCreateEvent = Parameters>[0]; declare type SuperDocEditorEmits = { ready: (event: SuperDocReadyEvent) => boolean; 'editor-create': (event: SuperDocEditorCreateEvent) => boolean; 'editor-destroy': () => boolean; 'editor-update': (event: SuperDocEditorUpdateEvent) => boolean; transaction: (event: SuperDocTransactionEvent) => boolean; 'content-error': (event: SuperDocContentErrorEvent) => boolean; exception: (event: SuperDocExceptionEvent) => boolean; 'zoom-change': (event: SuperDocZoomChangeEvent) => boolean; 'viewport-change': (event: SuperDocViewportChangeEvent) => boolean; 'update:documentMode': (mode: DocumentMode) => boolean; }; /** Methods exposed through a template ref. */ export declare interface SuperDocEditorExpose { /** Returns the core instance after the editor is ready. */ getInstance(): SuperDocInstance | null; } declare interface SuperDocEditorProps { document?: SuperDocConfig['document'] | null; documentMode?: DocumentMode; role?: UserRole; user?: SuperDocUser; users?: SuperDocConfig['users']; modules?: SuperDocModules; ui?: SuperDocUIConfig; uiBinding?: SuperDocEditorUIBinding; contained?: boolean; config?: SuperDocEditorConfig; } declare type SuperDocEditorSlots = SlotsType<{ loading: Record; error: { error: unknown; }; }>; /** Minimal lifecycle binding accepted by the component's `uiBinding` prop. */ export declare interface SuperDocEditorUIBinding { /** Publish a ready SuperDoc instance to custom UI consumers. */ setSuperDoc(superdoc: SuperDocInstance): void; /** Clear the same instance during replacement or teardown. */ clearSuperDoc(expectedHost: SuperDocInstance): boolean; } export declare type SuperDocEditorUpdateEvent = Parameters>[0]; /** Narrow the core exception union with `'stage' in event` or `'code' in event`. */ export declare type SuperDocExceptionEvent = SuperDocExceptionPayload; export declare type SuperDocInstance = InstanceType; export declare type SuperDocModules = NonNullable; export declare type SuperDocReadyEvent = Parameters>[0]; export declare type SuperDocTransactionEvent = Parameters>[0]; export declare type SuperDocUIConfig = SuperDocConstructorConfig['ui']; export declare type SuperDocUser = NonNullable; export declare type SuperDocViewportChangeEvent = Parameters>[0]; export declare type SuperDocZoomChangeEvent = Parameters>[0]; export declare type UserRole = NonNullable; export { }