import React, { PropsWithChildren } from 'react'; import { EditorStateConfig, Extension } from '@codemirror/state'; import { ViewUpdate } from '@codemirror/view'; import { MergeView, MergeConfig } from '@codemirror/merge'; import { DefaultExtensionsOptions } from '@uiw/react-codemirror'; export interface StoreContextValue extends InitialState { dispatch?: React.Dispatch; } export interface InitialState extends MergeConfig { modifiedExtension?: { option: Omit; extension: Extension[]; /** Fired whenever a change occurs to the document. */ onChange?(value: string, viewUpdate: ViewUpdate): void; }; modified?: EditorStateConfig; originalExtension?: { option: Omit; extension: Extension[]; /** Fired whenever a change occurs to the document. */ onChange?(value: string, viewUpdate: ViewUpdate): void; }; original?: EditorStateConfig; view?: MergeView; theme?: 'light' | 'dark' | 'none' | Extension; container?: HTMLDivElement | null; } export declare const initialState: InitialState; export declare const Context: React.Context; export declare function reducer(state: InitialState, action: InitialState): InitialState; export declare const useStore: () => StoreContextValue; export interface ProviderProps { theme?: InitialState['theme']; } export declare const Provider: React.FC>;