import React from 'react'; import { IConfigProps } from '../context'; import { IAction, IState as State, IUBBExtendConfig } from '../types'; import Textarea, { IProps as TextareaProps } from './textarea'; interface ICustomProps { wrappedComponentRef?: (it: Core) => void; onChange?: (value: string) => void; value?: string; defaultValue?: string; } declare type Omit = Pick>; declare type Diff = T extends U ? never : T; declare type GetNames = { [K in keyof T]: T[K] extends ((event: any) => void) | undefined ? K : never; }[keyof T]; declare type FunctionProperties = Pick, undefined>>; declare type AddParams = { [K in keyof T]: T[K] extends ((event: infer U) => void) | undefined ? (event: U, dispatch: (action: IAction) => void, message: (message: string) => void) => void : never; }; declare type EventWithParams = AddParams>>; declare type OtherProps = Omit, keyof EventWithParams | keyof ICustomProps>; export declare type IProps = EventWithParams & OtherProps & ICustomProps; export declare type props = IProps & IConfigProps; export interface IState extends State { extendConfig: IUBBExtendConfig | null; customTagName: string; message: string; isPreviewing: boolean; fromProps: boolean; } export declare class Core extends React.PureComponent { static defaultProps: { onChange: () => null; defaultValue: string; }; static getDerivedStateFromProps(nextProps: IProps, prevState: IState): { value: string; end: number; start: number; fromProps: boolean; } | null; customTextarea: Textarea; private root; private timer; private message; constructor(props: props); componentDidMount(): void; componentDidUpdate(): void; redo: () => void; undo: () => void; focusAndSelectTextarea: (start?: number, end?: number) => void; clearExtendAndCustom: () => void; changePreviewing: () => void; notice: (message: string) => void; private reduce; private getHandlerByTagName; private getConfigByTagName; private handleTextareaChange; private handleExtendButtonClick; private handleCustomButtonClick; private handleTextareaBlur; private handleFocus; handleRootBlur: () => void; handleRootFocus: () => void; render(): JSX.Element; } declare const _default: React.ComponentType>; export default _default;