import type { ComponentPropsWithRef, JSX, RefObject } from 'react'; import { type LumenRichTextChangeDetail, type LumenRichTextCommandDetail as CoreRichTextCommandDetail, type LumenRichTextCommandRequest } from '@santi020k/lumen-core'; type ChangeHandler = (value: T) => void; type LumenProps = ComponentPropsWithRef & Record<`data-${string}`, unknown>; export type RichTextEditorCommandDetail = CoreRichTextCommandDetail; export interface RichTextEditorOptions { nativeState?: boolean; commandHandler?: (request: LumenRichTextCommandRequest) => boolean; onChange?: ChangeHandler | undefined; onCommand?: ChangeHandler | undefined; } export interface RichTextEditorController { executeCommand: (command: string, root?: HTMLElement | null, value?: string) => boolean; getCommandProps: (command: string, props?: LumenProps<'button'>) => LumenProps<'button'>; getEditableProps: (props?: ComponentPropsWithRef<'div'>) => LumenProps<'div'>; rootProps: LumenProps<'section'>; rootRef: RefObject; } export declare const useRichTextEditor: ({ commandHandler, nativeState, onChange, onCommand }?: RichTextEditorOptions) => RichTextEditorController; export {}; //# sourceMappingURL=rich-text-editor.d.ts.map