import { Ct as NodeComponents, Et as PluginConfig, F as RenderLeafProps, I as RenderElementFn, Ii as ExtendEditor$1, J as BaseEditor, Jr as NavigationFeedbackConfig, L as RenderElementProps, M as RenderTextFn, Mi as AnySlatePlugin, Mo as HandlerReturnType, N as RenderTextProps, Ot as WithAnyKey, P as RenderLeafFn, Pa as ResolvedInputRulesMeta, Q as SlateEditor, Qa as createStaticEditor, R as RenderChunkFn, So as PlateStaticProps, St as NodeComponent, Tt as ParserOptions, U as BaseWithSlateOptions, Y as InferPlugins, _t as InferOptions, ai as WithAutoScrollOptions, at as BasePluginContext, ba as InputRulesConfig, bt as MatchRules, ct as BaseTransformOptions, et as AnyPluginConfig, fi as LiftBlockOptions, gi as InitOptions, gt as InferKey, hr as CorePluginTransforms, ht as InferApi, ia as SlatePluginContext, ii as ScrollMode, it as BasePlugin, j as EditableProps, kt as WithRequiredKey, mi as InsertExitBreakOptions, mr as CorePluginApi, mt as GetInjectNodePropsReturnType, na as SlatePlugin, nt as BaseHtmlDeserializer, pr as CorePlugin, pt as GetInjectNodePropsOptions, qr as NavigationFeedbackActiveTarget, ra as SlatePluginConfig, ri as DomConfig, rt as BaseInjectProps, st as BaseSerializer, ti as AutoScrollOperationsMap, tt as BaseDeserializer, vt as InferSelectors, xa as InputRulesDefinition, yt as InferTransforms, z as RenderChunkProps } from "../index-DjwiAKo2"; import * as _platejs_slate20 from "@platejs/slate"; import { DecoratedRange, Descendant, DescendantIn, Editor, EditorApi, EditorTransforms, ElementEntry, NodeEntry, NodeOperation, Operation, Path, TElement, TNode, TRange, TSelection, TText, TextOperation, Value, ValueOf } from "@platejs/slate"; import { AnyObject, Deep2Partial, Modify, Nullable, UnionToIntersection, UnknownObject } from "@udecode/utils"; import { DefaultPlaceholder, Editable, RenderPlaceholderProps, Slate, useComposing, useFocused, useReadOnly, useSelected, useSlateStatic, withReact } from "slate-react"; import React$1, { DependencyList, HTMLAttributes } from "react"; import { HotkeysEvent, HotkeysOptions, Keys } from "@udecode/react-hotkeys"; import * as jotai10 from "jotai"; import { Atom, atom } from "jotai"; import * as jotai_x98 from "jotai-x"; import { JotaiStore, createAtomStore, useStoreAtomState, useStoreAtomValue, useStoreSetAtom } from "jotai-x"; import * as zustand_x0 from "zustand-x"; import { TCreatedStoreType, TEqualityChecker, createZustandStore, useStoreSelect, useStoreState, useStoreValue, useTracked, useTrackedStore } from "zustand-x"; import { createStore } from "jotai/vanilla"; //#region src/react/plugins/SlateReactExtensionPlugin.d.ts declare const SlateReactExtensionPlugin: PlatePlugin void; onTextChange: (options: { editor: SlateEditor; node: _platejs_slate20.Descendant; operation: _platejs_slate20.TextOperation; prevText: string; text: string; }) => void; }, { redecorate: (() => void) & (() => void); isElementStateEmpty: (element: _platejs_slate20.TElement) => boolean; }, { reset: (options: _platejs_slate20.ResetOptions | undefined) => void; init: ((args_0: InitOptions) => void) & ((args_0: InitOptions) => void); insertExitBreak: ((args_0?: InsertExitBreakOptions | undefined) => true | undefined) & ((args_0?: InsertExitBreakOptions | undefined) => true | undefined); liftBlock: ((args_0?: LiftBlockOptions | undefined) => true | undefined) & ((args_0?: LiftBlockOptions | undefined) => true | undefined); resetBlock: ((args_0?: { at?: _platejs_slate20.Path; } | undefined) => true | undefined) & ((args_0?: { at?: _platejs_slate20.Path; } | undefined) => true | undefined); setValue: ((value?: string | _platejs_slate20.Value | undefined) => void) & ((value?: string | _platejs_slate20.Value | undefined) => void); apply: (operation: _platejs_slate20.Operation) => void; }, {}>>; //#endregion //#region src/react/plugins/event-editor/EventEditorPlugin.d.ts declare const EventEditorPlugin: PlatePlugin>; //#endregion //#region src/react/plugins/event-editor/EventEditorStore.d.ts type EventEditorState = { /** Last editor id that has been blurred. */ blur: string | null; /** Editor id that is currently being focused. */ focus: string | null; /** Last editor id. */ last: string | null; }; /** Store where the keys are event names and the values are editor ids. */ declare const EventEditorStore: zustand_x0.TStateApi; declare const useEventEditorValue: { (key: K$1): EventEditorState[K$1]; (key: K$1, ...args: Parameters<{}[K$1]>): ReturnType<{}[K$1]>; (key: "state"): EventEditorState; (key: K$1, equalityFn?: zustand_x0.TEqualityChecker | undefined): EventEditorState[K$1]; (key: K$1, ...args: [...Parameters<{}[K$1]>, (zustand_x0.TEqualityChecker> | undefined)?]): ReturnType<{}[K$1]>; }; //#endregion //#region src/react/plugins/event-editor/getEventPlateId.d.ts declare const getEventPlateId: (id?: string) => string; //#endregion //#region src/react/plugins/event-editor/useFocusEditorEvents.d.ts declare const FOCUS_EDITOR_EVENT = "focus-editor-event"; declare const BLUR_EDITOR_EVENT = "blur-editor-event"; declare const useFocusEditorEvents: ({ editorRef, onEditorBlur, onEditorFocus }: { editorRef: PlateEditor | null; onEditorBlur?: () => void; onEditorFocus?: () => void; }) => void; //#endregion //#region src/react/plugins/event-editor/useFocusedLast.d.ts /** Whether the current editor is the last focused editor. */ declare const useFocusedLast: (id?: string) => boolean; //#endregion //#region src/react/plugins/navigation-feedback/NavigationFeedbackPlugin.d.ts declare const NavigationFeedbackPlugin: PlatePlugin>; //#endregion //#region src/react/plugins/navigation-feedback/useNavigationHighlight.d.ts type NavigationHighlightTarget = Path | TElement | TText | null | undefined; declare const useNavigationHighlight: (target?: NavigationHighlightTarget) => NavigationFeedbackActiveTarget | null; //#endregion //#region src/react/plugins/paragraph/ParagraphPlugin.d.ts declare const ParagraphPlugin: PlatePlugin>; //#endregion //#region src/react/plugins/react/ReactPlugin.d.ts /** @see {@link withReact} */ declare const ReactPlugin: PlatePlugin boolean; }, { withScrolling: (fn: () => void, options?: WithAutoScrollOptions | undefined) => void; }, {}>>; //#endregion //#region src/react/plugins/react/withPlateReact.d.ts declare const withPlateReact: ExtendEditor$1; //#endregion //#region src/react/editor/withPlate.d.ts type PlateCorePlugin = CorePlugin | typeof EventEditorPlugin | typeof SlateReactExtensionPlugin; type WithPlateOptions = BaseWithSlateOptions & Pick, 'api' | 'decorate' | 'extendEditor' | 'handlers' | 'inject' | 'transformInitialValue' | 'normalizeInitialValue' | 'options' | 'override' | 'priority' | 'render' | 'shortcuts' | 'transforms' | 'useHooks'> & { value?: ((editor: PlateEditor) => Promise | V$1) | V$1 | string; rootPlugin?: (plugin: AnyPlatePlugin) => AnyPlatePlugin; onReady?: (ctx: { editor: PlateEditor; isAsync: boolean; value: V$1; }) => void; }; /** * Applies Plate enhancements to an editor instance (React version). * * @remarks * This function supports React-specific features including component rendering, * event handlers, and React hooks integration. * @see {@link createPlateEditor} for a higher-level React editor creation function. * @see {@link usePlateEditor} for a memoized version in React components. * @see {@link withSlate} for the non-React version of editor enhancement. */ declare const withPlate: (e: Editor, options?: WithPlateOptions) => TPlateEditor>; type CreatePlateEditorOptions = WithPlateOptions & { /** * Initial editor to be extended with `withPlate`. * * @default createEditor() */ editor?: Editor; }; /** * Creates a Plate editor (React version). * * This function creates a fully configured Plate editor instance with * React-specific enhancements including component rendering, event handlers, * and hooks integration. It applies all specified plugins and configurations to * create a functional editor. * * Examples: * * ```ts * const editor = createPlateEditor({ * plugins: [ParagraphPlugin, HeadingPlugin], * value: [{ type: 'p', children: [{ text: 'Hello world!' }] }], * }); * * // Editor with custom components * const editor = createPlateEditor({ * plugins: [ParagraphPlugin.withComponent(ParagraphElement)], * components: { [CodePlugin.key]: CodeLeaf }, * }); * * // Editor with React-specific options * const editor = createPlateEditor({ * plugins: [ParagraphPlugin], * handlers: { onKeyDown: customKeyHandler }, * }); * ``` * * @see {@link createSlateEditor} for a non-React version of editor creation. * @see {@link usePlateEditor} for a memoized version in React components. * @see {@link withPlate} for the underlying function that applies Plate enhancements to an editor. */ declare const createPlateEditor: ({ editor, ...options }?: CreatePlateEditorOptions) => TPlateEditor>; //#endregion //#region src/react/editor/PlateEditor.d.ts type PlateEditor = BaseEditor & { api: EditorApi & UnionToIntersection>; meta: BaseEditor['meta'] & { inputRules: ResolvedInputRulesMeta; pluginList: AnyEditorPlatePlugin[]; shortcuts: Shortcuts; }; plugins: Record; tf: EditorTransforms & UnionToIntersection>; transforms: EditorTransforms & UnionToIntersection>; getApi: (plugin?: WithRequiredKey) => PlateEditor['api'] & InferApi; getPlugin: (plugin: WithRequiredKey) => C extends { node: any; } ? C : EditorPlatePlugin; getTransforms: (plugin?: WithRequiredKey) => PlateEditor['tf'] & InferTransforms; uid?: string; }; type FilterKeys = { [P in keyof T as Exclude]: T[P] }; type TPlateEditor = FilterKeys & { api: EditorApi & UnionToIntersection>; children: V$1; meta: BaseEditor['meta'] & { inputRules: ResolvedInputRulesMeta; pluginList: P$1[]; shortcuts: Shortcuts; }; operations: Operation>[]; plugins: { [K in P$1['key']]: Extract }; tf: EditorTransforms & UnionToIntersection>; transforms: EditorTransforms & UnionToIntersection>; getApi: (plugin?: WithRequiredKey) => TPlateEditor['api'] & InferApi; getTransforms: (plugin?: WithRequiredKey) => TPlateEditor['tf'] & InferTransforms; }; type KeyofPlugins = (string & {}) | InferKey; //#endregion //#region src/react/plugin/PlatePlugin.d.ts type AnyEditorPlatePlugin = EditorPlatePlugin; type AnyPlatePlugin = PlatePlugin; /** * Property used by Plate to decorate editor ranges. If the function returns * undefined then no ranges are modified. If the function returns an array the * returned ranges are merged with the ranges called by other plugins. */ type Decorate = (ctx: PlatePluginContext & { entry: NodeEntry; }) => DecoratedRange[] | undefined; type Deserializer = BaseDeserializer & { parse?: (options: PlatePluginContext & { element: any; }) => Partial | undefined | void; query?: (options: PlatePluginContext & { element: any; }) => boolean; }; type EditableSiblingComponent = (editableProps: EditableProps) => React$1.ReactElement | null; type EditorPlatePlugin = Omit, keyof PlatePluginMethods | 'override' | 'plugins'>; /** Plate plugin overriding the `editor` methods. Naming convention is `with*`. */ type ExtendEditor = (ctx: PlatePluginContext) => PlateEditor; type ExtendEditorApi = (ctx: PlatePluginContext) => EA & Deep2Partial & { [K in keyof InferApi]?: InferApi[K] extends ((...args: any[]) => any) ? (...args: Parameters[K]>) => ReturnType[K]> : InferApi[K] extends Record any> ? { [N in keyof InferApi[K]]?: (...args: Parameters[K][N]>) => ReturnType[K][N]> } : never }; type ExtendEditorTransforms = (ctx: PlatePluginContext) => ET & Deep2Partial & { [K in keyof InferTransforms]?: InferTransforms[K] extends ((...args: any[]) => any) ? (...args: Parameters[K]>) => ReturnType[K]> : InferTransforms[K] extends Record any> ? { [N in keyof InferTransforms[K]]?: (...args: Parameters[K][N]>) => ReturnType[K][N]> } : never }; type HtmlDeserializer = BaseHtmlDeserializer & { parse?: (options: PlatePluginContext & { element: HTMLElement; node: AnyObject; }) => Partial | undefined | void; query?: (options: PlatePluginContext & { element: HTMLElement; }) => boolean; }; type HtmlReactSerializer = { parse?: React$1.FC & PlateLeafProps>; query?: (options: PlateElementProps) => boolean; }; type HtmlSerializer = { parse?: (options: PlatePluginContext & { node: Descendant; }) => string; query?: (options: PlatePluginContext & { node: Descendant; }) => boolean; }; type InferConfig = P$1 extends PlatePlugin | SlatePlugin ? C : never; /** Properties used by Plate to inject props into any {@link NodeComponent}. */ type InjectNodeProps = BaseInjectProps & { /** Whether to inject the props. If true, overrides all other checks. */ query?: (options: NonNullable> & PlatePluginContext & { nodeProps: GetInjectNodePropsOptions; }) => boolean; /** * Transform the className. * * @default clsx(className, classNames[value]) */ transformClassName?: (options: TransformOptions) => any; /** * Transform the node value for the style or className. * * @default nodeValue */ transformNodeValue?: (options: TransformOptions) => any; /** Transform the injected props. */ transformProps?: (options: TransformOptions & { props: GetInjectNodePropsReturnType; }) => AnyObject | undefined; /** * Transform the style. * * @default { ...style, [styleKey]: value } */ transformStyle?: (options: TransformOptions) => CSSStyleDeclaration; }; type LeafNodeProps = ((props: PlateLeafProps) => AnyObject | undefined) | AnyObject; /** * Property used by Plate to override node `component` props. If function, its * returning value will be shallow merged to the old props, with the old props * as parameter. If object, its value will be shallow merged to the old props. */ type NodeProps = ((props: PlateElementProps & PlateLeafProps) => AnyObject | undefined) | AnyObject; /** @deprecated Use {@link RenderNodeWrapper} instead. */ type NodeWrapperComponent = (props: NodeWrapperComponentProps) => NodeWrapperComponentReturnType; /** @deprecated Use {@link RenderNodeWrapperProps} instead. */ interface NodeWrapperComponentProps extends PlateElementProps { key: string; } /** @deprecated Use {@link RenderNodeWrapperFunction} instead. */ type NodeWrapperComponentReturnType = React$1.FC> | undefined; type TransformInitialValue = (ctx: PlatePluginContext & { value: Value; }) => Value; /** @deprecated Use {@link TransformInitialValue} instead. */ type NormalizeInitialValue = (ctx: PlatePluginContext & { value: Value; }) => Value | void; /** * Function called whenever a change occurs in the editor. Return `false` to * prevent calling the next plugin handler. * * @see {@link SlatePropsOnChange} */ type OnChange = (ctx: PlatePluginContext & { value: Value; }) => HandlerReturnType; /** * Function called whenever a node operation occurs in the editor. Return `true` * to prevent calling the next plugin handler. */ type OnNodeChange = (ctx: PlatePluginContext & { node: Descendant; operation: NodeOperation; prevNode: Descendant; }) => HandlerReturnType; /** * Function called whenever a text operation occurs in the editor. Return `true` * to prevent calling the next plugin handler. */ type OnTextChange = (ctx: PlatePluginContext & { node: Descendant; operation: TextOperation; prevText: string; text: string; }) => HandlerReturnType; type OverrideEditor = (ctx: PlatePluginContext) => { api?: Deep2Partial & { [K in keyof InferApi]?: InferApi[K] extends ((...args: any[]) => any) ? (...args: Parameters[K]>) => ReturnType[K]> : InferApi[K] extends Record any> ? { [N in keyof InferApi[K]]?: (...args: Parameters[K][N]>) => ReturnType[K][N]> } : never }; transforms?: Deep2Partial & { [K in keyof InferTransforms]?: InferTransforms[K] extends ((...args: any[]) => any) ? (...args: Parameters[K]>) => ReturnType[K]> : InferTransforms[K] extends Record any> ? { [N in keyof InferTransforms[K]]?: (...args: Parameters[K][N]>) => ReturnType[K][N]> } : never }; }; /** * Used by parser plugins like html to deserialize inserted data to a slate * fragment. The fragment will be inserted to the editor if not empty. */ type Parser = { /** Format to get data. Example data types are text/plain and text/uri-list. */ format?: string[] | string; mimeTypes?: string[]; /** Deserialize data to fragment */ deserialize?: (options: ParserOptions & PlatePluginContext) => Descendant[] | undefined; /** * Function called on `editor.tf.insertData` just before * `editor.tf.insertFragment`. Default: if the block above the selection is * empty and the first fragment node type is not inline, set the selected node * type to the first fragment node type. * * @returns If true, the next handlers will be skipped. */ preInsert?: (options: ParserOptions & PlatePluginContext & { fragment: Descendant[]; }) => HandlerReturnType; /** Query to skip this plugin. */ query?: (options: ParserOptions & PlatePluginContext) => boolean; /** Transform the inserted data. */ transformData?: (options: ParserOptions & PlatePluginContext) => string; /** Transform the fragment to insert. */ transformFragment?: (options: ParserOptions & PlatePluginContext & { fragment: Descendant[]; }) => Descendant[]; }; /** The `PlatePlugin` interface is a React interface for all plugins. */ type PlatePlugin = BasePlugin & Nullable<{ /** @see {@link Decorate} */ decorate?: Decorate>; /** @see {@link ExtendEditor} */ extendEditor?: ExtendEditor>; /** Transform the initial value before the editor is ready. */ transformInitialValue?: TransformInitialValue>; /** Normalize initial value before passing it into the editor. */ /** @deprecated Use `transformInitialValue` instead. */ normalizeInitialValue?: NormalizeInitialValue>; /** @see {@link UseHooks} */ useHooks?: UseHooks>; }> & PlatePluginMethods & { /** * Handlers called whenever the corresponding event occurs in the editor. * Event handlers can return a boolean flag to specify whether the event * can be treated as being handled. If it returns `true`, the next * handlers will not be called. */ handlers: Nullable> & { /** @see {@link OnChange} */ onChange?: OnChange>; /** @see {@link OnNodeChange} */ onNodeChange?: OnNodeChange>; /** @see {@link OnTextChange} */ onTextChange?: OnTextChange>; }>; /** Plugin injection. */ inject: Nullable<{ nodeProps?: InjectNodeProps>; /** * Property that can be used by a plugin to allow other plugins to * inject code. For example, if multiple plugins have defined * `inject.editor.tf.insertData.transformData` for `key=HtmlPlugin.key`, * `insertData` plugin will call all of these `transformData` for * `HtmlPlugin.key` plugin. Differs from `override.plugins` as this is * not overriding any plugin. */ plugins?: Record>>; /** * A function that returns a plugin config to be injected into other * plugins `inject.plugins` specified by targetPlugins. */ targetPluginToInject?: (ctx: PlatePluginContext & { targetPlugin: string; }) => Partial>; }>; node: { /** Override `data-slate-leaf` element attributes */ leafProps?: LeafNodeProps>; /** Override node attributes */ props?: NodeProps>; /** Override `data-slate-node="text"` element attributes */ textProps?: TextNodeProps>; }; override: { /** Replace plugin {@link NodeComponent} by key. */ components?: NodeComponents; /** Extend {@link PlatePlugin} by key. */ plugins?: Record>>; }; /** @see {@link Parser} */ parser: Nullable>>; parsers: (Record>; /** @see {@link Serializer} */ serializer?: Serializer>; }> & { html?: never; htmlReact?: never; }) | { html?: Nullable<{ /** @see {@link HtmlDeserializer} */ deserializer?: HtmlDeserializer>; /** @see {@link HtmlSerializer} */ serializer?: HtmlSerializer>; }>; htmlReact?: Nullable<{ /** Function to deserialize HTML to Slate nodes using React. */ serializer?: HtmlReactSerializer>; }>; }; /** * Recursive plugin support to allow having multiple plugins in a single * plugin. Plate eventually flattens all the plugins into the editor. */ plugins: any[]; render: Nullable<{ /** * When other plugins' node components are rendered, this function can * return an optional wrapper function that turns a node's props to a * wrapper React node as its parent. Useful for wrapping or decorating * nodes with additional UI elements. * * NOTE: The function can run React hooks. NOTE: Do not run React hooks * in the wrapper function. It is not equivalent to a React component. */ aboveNodes?: RenderNodeWrapper>; /** Renders a component after the `Container` component. */ afterContainer?: EditableSiblingComponent; /** * Renders a component after the `Editable` component. This is the last * render position within the editor structure. */ afterEditable?: EditableSiblingComponent; /** Renders a component before the `Container` component. */ beforeContainer?: EditableSiblingComponent; /** Renders a component before the `Editable` component. */ beforeEditable?: EditableSiblingComponent; /** * When other plugins' node components are rendered, this function can * return an optional wrapper function that turns a node's props to a * wrapper React node. The wrapper node is the node's child and its * original children's parent. Useful for wrapping or decorating nodes * with additional UI elements. * * NOTE: The function can run React hooks. NOTE: Do not run React hooks * in the wrapper function. It is not equivalent to a React component. */ belowNodes?: RenderNodeWrapper>; /** * Function to render content below the root element but above its * children. Similar to belowNodes but renders directly in the element * rather than wrapping. Multiple plugins can provide this, and all * their content will be rendered in sequence. */ belowRootNodes?: (props: PlateElementProps) => React$1.ReactNode; }>; rules: { /** * Function to determine if this plugin's rules should apply to a node. * Used to override behavior based on node properties beyond just type * matching. * * Example: List plugin sets `match: ({ node }) => !!node.listStyleType` * to override paragraph behavior when the paragraph is a list item. * * @default type === node.type */ match?: (options: { node: TElement; path: Path; rule: MatchRules; } & PlatePluginContext) => boolean; }; /** * Keyboard shortcuts configuration mapping shortcut names to their key * combinations and handlers. Each shortcut can link to a transform * method, an API method, or use a custom handler function. */ shortcuts: Partial[C['key']], keyof InferTransforms[C['key']]> | keyof InferTransforms[C['key']], Shortcut | null>>; inputRules: InputRulesDefinition | InputRulesConfig; useOptionsStore: TCreatedStoreType; }; type PlatePluginConfig = Partial, A$1, T, S>>, keyof PlatePluginMethods | 'api' | 'node' | 'optionsStore' | 'transforms' | 'useOptionsStore'> & { api: EA; node: Partial>['node']>; options: EO; selectors: ES; transforms: ET; }>; type PlatePluginContext = BasePluginContext & { editor: E; plugin: EditorPlatePlugin; }; type PlatePluginMethods = { __apiExtensions: ((ctx: PlatePluginContext) => any)[]; __configuration: ((ctx: PlatePluginContext) => any) | null; __extensions: ((ctx: PlatePluginContext) => any)[]; __selectorExtensions: ((ctx: PlatePluginContext) => any)[]; clone: () => PlatePlugin; configure: (config: ((ctx: PlatePluginContext) => PlatePluginConfig, InferApi, InferTransforms, InferSelectors>) | PlatePluginConfig, InferApi, InferTransforms, InferSelectors>) => PlatePlugin; configurePlugin: (plugin: Partial, config: (P$1 extends AnyPlatePlugin ? PlatePluginConfig, InferApi, InferTransforms, InferSelectors> : SlatePluginConfig, InferApi, InferTransforms, InferSelectors>) | ((ctx: P$1 extends AnyPlatePlugin ? PlatePluginContext : SlatePluginContext) => P$1 extends AnyPlatePlugin ? PlatePluginConfig, InferApi, InferTransforms, InferSelectors> : SlatePluginConfig, InferApi, InferTransforms, InferSelectors>)) => PlatePlugin; extend: (extendConfig: ((ctx: PlatePluginContext) => PlatePluginConfig, InferApi, InferTransforms, InferSelectors, EO, EA, ET, ES>) | PlatePluginConfig, InferApi, InferTransforms, InferSelectors, EO, EA, ET, ES>) => PlatePlugin, EA & InferApi, ET & InferTransforms, InferSelectors>>; extendApi: any> = Record>(extension: (ctx: PlatePluginContext) => EA) => PlatePlugin, InferApi & Record, InferTransforms, InferSelectors>>; /** * Extends the plugin's API with new methods or nested objects. * * This method allows you to add new functionality to the plugin's API or * extend existing ones. You can add top-level methods, nested objects with * methods, or extend existing nested objects. The types of existing methods * and nested objects are preserved, while new ones are inferred. * * @remarks * - New methods can be added at the top level or within nested objects. * - Existing methods can be overridden, but their parameter and return types * must match the original. * - When extending nested objects, you don't need to specify all existing * properties; they will be preserved. * - Only one level of nesting is supported for API objects. * * @example * ```typescript * const extendedPlugin = basePlugin.extendEditorApi(({ plugin }) => ({ * newMethod: (param: string) => param.length, * existingMethod: (n) => n * 2, // Must match original signature * nested: { * newNestedMethod: () => 'new nested method', * }, * })); * ```; * * @template EA - The type of the extended API, inferred from the returned * object. * @param extendedApi - A function that returns an object with the new or * extended API methods. * @returns A new instance of the plugin with the extended API. */ extendEditorApi: any) | Record any>> = Record>(extension: ExtendEditorApi) => PlatePlugin, { [K in keyof (EA & InferApi)]: (EA & InferApi)[K] extends ((...args: any[]) => any) ? (EA & InferApi)[K] : { [N in keyof (EA & InferApi)[K]]: (EA & InferApi)[K][N] } }, InferTransforms, InferSelectors>>; extendEditorTransforms: any) | Record any>> = Record>(extension: ExtendEditorTransforms) => PlatePlugin, InferApi, { [K in keyof (ET & InferTransforms)]: (ET & InferTransforms)[K] extends ((...args: any[]) => any) ? (ET & InferTransforms)[K] : { [N in keyof (ET & InferTransforms)[K]]: (ET & InferTransforms)[K][N] } }, InferSelectors>>; extendPlugin: (plugin: Partial, extendConfig: (P$1 extends AnyPlatePlugin ? PlatePluginConfig, InferApi, InferTransforms, InferSelectors, EO, EA, ET> : SlatePluginConfig, InferApi, InferTransforms, InferSelectors, EO, EA, ET>) | ((ctx: P$1 extends AnyPlatePlugin ? PlatePluginContext : SlatePluginContext) => P$1 extends AnyPlatePlugin ? PlatePluginConfig, InferApi, InferTransforms, InferSelectors, EO, EA, ET> : SlatePluginConfig, InferApi, InferTransforms, InferSelectors, EO, EA, ET>)) => PlatePlugin; extendSelectors: any> = Record>(extension: (ctx: PlatePluginContext) => ES) => PlatePlugin, InferApi, InferTransforms, ES & InferSelectors>>; extendTransforms: any> = Record>(extension: (ctx: PlatePluginContext) => ET) => PlatePlugin, InferApi, InferTransforms & Record, InferSelectors>>; overrideEditor: (override: OverrideEditor) => PlatePlugin; /** Returns a new instance of the plugin with the component. */ withComponent: (component: NodeComponent) => PlatePlugin; __resolved?: boolean; }; type PlatePlugins = AnyPlatePlugin[]; type RenderNodeWrapper = (props: RenderNodeWrapperProps) => RenderNodeWrapperFunction; type RenderNodeWrapperFunction = ((elementProps: PlateElementProps) => React$1.ReactNode) | undefined; interface RenderNodeWrapperProps extends PlateElementProps { key: string; } type Serializer = BaseSerializer & { parser?: (options: PlatePluginContext & { node: Descendant; }) => any; query?: (options: PlatePluginContext & { node: Descendant; }) => boolean; }; type Shortcut = HotkeysOptions & { keys?: Keys | null; priority?: number; handler?: (ctx: { editor: PlateEditor; event: KeyboardEvent; eventDetails: HotkeysEvent; }) => boolean | void; }; type Shortcuts = Record; type TextNodeProps = ((props: PlateLeafProps) => AnyObject | undefined) | AnyObject; type TransformOptions = BaseTransformOptions & PlatePluginContext; /** Hook called when the editor is initialized. */ type UseHooks = (ctx: PlatePluginContext) => void; //#endregion //#region src/react/plugin/DOMHandlers.d.ts type DOMHandler = (ctx: PlatePluginContext & { event: EV; }) => HandlerReturnType; type DOMHandlers = { onAbort?: DOMHandler; onAbortCapture?: DOMHandler; onAnimationEnd?: DOMHandler; onAnimationEndCapture?: DOMHandler; onAnimationIteration?: DOMHandler; onAnimationIterationCapture?: DOMHandler; onAnimationStart?: DOMHandler; onAnimationStartCapture?: DOMHandler; onAuxClick?: DOMHandler; onAuxClickCapture?: DOMHandler; onBeforeInput?: DOMHandler; onBeforeInputCapture?: DOMHandler; onBlur?: DOMHandler; onBlurCapture?: DOMHandler; onCanPlay?: DOMHandler; onCanPlayCapture?: DOMHandler; onCanPlayThrough?: DOMHandler; onCanPlayThroughCapture?: DOMHandler; onClick?: DOMHandler; onClickCapture?: DOMHandler; onCompositionEnd?: DOMHandler; onCompositionEndCapture?: DOMHandler; onCompositionStart?: DOMHandler; onCompositionStartCapture?: DOMHandler; onCompositionUpdate?: DOMHandler; onCompositionUpdateCapture?: DOMHandler; onContextMenu?: DOMHandler; onContextMenuCapture?: DOMHandler; onCopy?: DOMHandler; onCopyCapture?: DOMHandler; onCut?: DOMHandler; onCutCapture?: DOMHandler; onDOMBeforeInput?: DOMHandler; onDoubleClick?: DOMHandler; onDoubleClickCapture?: DOMHandler; onDrag?: DOMHandler; onDragCapture?: DOMHandler; onDragEnd?: DOMHandler; onDragEndCapture?: DOMHandler; onDragEnter?: DOMHandler; onDragEnterCapture?: DOMHandler; onDragExit?: DOMHandler; onDragExitCapture?: DOMHandler; onDragLeave?: DOMHandler; onDragLeaveCapture?: DOMHandler; onDragOver?: DOMHandler; onDragOverCapture?: DOMHandler; onDragStart?: DOMHandler; onDragStartCapture?: DOMHandler; onDrop?: DOMHandler; onDropCapture?: DOMHandler; onDurationChange?: DOMHandler; onDurationChangeCapture?: DOMHandler; onEmptied?: DOMHandler; onEmptiedCapture?: DOMHandler; onEncrypted?: DOMHandler; onEncryptedCapture?: DOMHandler; onEnded?: DOMHandler; onEndedCapture?: DOMHandler; onFocus?: DOMHandler; onFocusCapture?: DOMHandler; onGotPointerCapture?: DOMHandler; onGotPointerCaptureCapture?: DOMHandler; onInput?: DOMHandler; onInputCapture?: DOMHandler; onInvalid?: DOMHandler; onInvalidCapture?: DOMHandler; onKeyDown?: DOMHandler; onKeyDownCapture?: DOMHandler; onKeyPress?: DOMHandler; onKeyPressCapture?: DOMHandler; onKeyUp?: DOMHandler; onKeyUpCapture?: DOMHandler; onLoad?: DOMHandler; onLoadCapture?: DOMHandler; onLoadedData?: DOMHandler; onLoadedDataCapture?: DOMHandler; onLoadedMetadata?: DOMHandler; onLoadedMetadataCapture?: DOMHandler; onLoadStart?: DOMHandler; onLoadStartCapture?: DOMHandler; onLostPointerCapture?: DOMHandler; onLostPointerCaptureCapture?: DOMHandler; onMouseDown?: DOMHandler; onMouseDownCapture?: DOMHandler; onMouseEnter?: DOMHandler; onMouseLeave?: DOMHandler; onMouseMove?: DOMHandler; onMouseMoveCapture?: DOMHandler; onMouseOut?: DOMHandler; onMouseOutCapture?: DOMHandler; onMouseOver?: DOMHandler; onMouseOverCapture?: DOMHandler; onMouseUp?: DOMHandler; onMouseUpCapture?: DOMHandler; onPaste?: DOMHandler; onPasteCapture?: DOMHandler; onPause?: DOMHandler; onPauseCapture?: DOMHandler; onPlay?: DOMHandler; onPlayCapture?: DOMHandler; onPlaying?: DOMHandler; onPlayingCapture?: DOMHandler; onPointerCancel?: DOMHandler; onPointerCancelCapture?: DOMHandler; onPointerDown?: DOMHandler; onPointerDownCapture?: DOMHandler; onPointerEnter?: DOMHandler; onPointerLeave?: DOMHandler; onPointerMove?: DOMHandler; onPointerMoveCapture?: DOMHandler; onPointerOut?: DOMHandler; onPointerOutCapture?: DOMHandler; onPointerOver?: DOMHandler; onPointerOverCapture?: DOMHandler; onPointerUp?: DOMHandler; onPointerUpCapture?: DOMHandler; onProgress?: DOMHandler; onProgressCapture?: DOMHandler; onRateChange?: DOMHandler; onRateChangeCapture?: DOMHandler; onReset?: DOMHandler; onResetCapture?: DOMHandler; onScroll?: DOMHandler; onScrollCapture?: DOMHandler; onSeeked?: DOMHandler; onSeekedCapture?: DOMHandler; onSeeking?: DOMHandler; onSeekingCapture?: DOMHandler; onSelect?: DOMHandler; onSelectCapture?: DOMHandler; onStalled?: DOMHandler; onStalledCapture?: DOMHandler; onSubmit?: DOMHandler; onSubmitCapture?: DOMHandler; onSuspend?: DOMHandler; onSuspendCapture?: DOMHandler; onTimeUpdate?: DOMHandler; onTimeUpdateCapture?: DOMHandler; onTouchCancel?: DOMHandler; onTouchCancelCapture?: DOMHandler; onTouchEnd?: DOMHandler; onTouchEndCapture?: DOMHandler; onTouchMove?: DOMHandler; onTouchMoveCapture?: DOMHandler; onTouchStart?: DOMHandler; onTouchStartCapture?: DOMHandler; onTransitionEnd?: DOMHandler; onTransitionEndCapture?: DOMHandler; onVolumeChange?: DOMHandler; onVolumeChangeCapture?: DOMHandler; onWaiting?: DOMHandler; onWaitingCapture?: DOMHandler; onWheel?: DOMHandler; onWheelCapture?: DOMHandler; }; //#endregion //#region src/react/plugin/KeyboardHandler.d.ts type KeyboardHandler = DOMHandler; //#endregion //#region src/react/plugin/createPlatePlugin.d.ts type PlatePluginConfig$2 = Omit>, { node: Partial>['node']>; }>>, keyof PlatePluginMethods | 'optionsStore' | 'useOptionsStore'>; type TPlatePluginConfig = Omit, { node: Partial['node']>; }>>, keyof PlatePluginMethods | 'optionsStore' | 'useOptionsStore'>; declare const createPlatePlugin: (config?: ((editor: PlateEditor) => PlatePluginConfig$2) | PlatePluginConfig$2) => PlatePlugin>; /** * Explicitly typed version of `createPlatePlugin`. * * @remarks * While `createPlatePlugin` uses type inference, this function requires an * explicit type parameter. Use this when you need precise control over the * plugin's type structure or when type inference doesn't provide the desired * result. */ declare function createTPlatePlugin(config?: ((editor: PlateEditor) => TPlatePluginConfig) | TPlatePluginConfig): PlatePlugin; //#endregion //#region src/react/editor/getPlateCorePlugins.d.ts declare const getPlateCorePlugins: ({ navigationFeedback }?: { navigationFeedback?: NavigationFeedbackConfig["options"] | boolean; }) => (PlatePlugin> | PlatePlugin void; onTextChange: (options: { editor: SlateEditor; node: _platejs_slate20.Descendant; operation: _platejs_slate20.TextOperation; prevText: string; text: string; }) => void; }, { redecorate: (() => void) & (() => void); isElementStateEmpty: (element: _platejs_slate20.TElement) => boolean; }, { reset: (options: _platejs_slate20.ResetOptions | undefined) => void; init: ((args_0: InitOptions) => void) & ((args_0: InitOptions) => void); insertExitBreak: ((args_0?: InsertExitBreakOptions | undefined) => true | undefined) & ((args_0?: InsertExitBreakOptions | undefined) => true | undefined); liftBlock: ((args_0?: LiftBlockOptions | undefined) => true | undefined) & ((args_0?: LiftBlockOptions | undefined) => true | undefined); resetBlock: ((args_0?: { at?: _platejs_slate20.Path; } | undefined) => true | undefined) & ((args_0?: { at?: _platejs_slate20.Path; } | undefined) => true | undefined); setValue: ((value?: string | _platejs_slate20.Value | undefined) => void) & ((value?: string | _platejs_slate20.Value | undefined) => void); apply: (operation: _platejs_slate20.Operation) => void; }, {}>> | PlatePlugin boolean; }, { withScrolling: (fn: () => void, options?: WithAutoScrollOptions | undefined) => void; }, {}>> | PlatePlugin> | PlatePlugin>)[]; //#endregion //#region src/react/editor/usePlateEditor.d.ts /** * Creates a memoized Plate editor for React components. * * This hook creates a fully configured Plate editor instance that is memoized * based on the provided dependencies. It's optimized for React components to * prevent unnecessary re-creation of the editor on every render. * * Examples: * * ```ts * const editor = usePlateEditor({ * plugins: [ParagraphPlugin, HeadingPlugin], * value: [{ type: 'p', children: [{ text: 'Hello world!' }] }], * }); * * // Editor with custom dependencies * const editor = usePlateEditor( * { * plugins: [ParagraphPlugin], * enabled, * }, * [enabled] * ); // Re-create when enabled changes * ``` * * @param options - Configuration options for creating the Plate editor * @param deps - Additional dependencies for the useMemo hook (default: []) * @see {@link createPlateEditor} for detailed information on React editor creation and configuration. * @see {@link createSlateEditor} for a non-React version of editor creation. * @see {@link withPlate} for the underlying React-specific enhancement function. */ declare function usePlateEditor(options?: CreatePlateEditorOptions & { enabled?: TEnabled; }, deps?: React$1.DependencyList): TEnabled extends false ? null : TEnabled extends true | undefined ? TPlateEditor : TPlateEditor | null; //#endregion //#region src/react/editor/usePlateViewEditor.d.ts /** * Creates a memoized static Plate editor for view-only React components. * * This hook creates a fully configured static Plate editor instance that is * memoized based on the provided dependencies. It's optimized for React * components to prevent unnecessary re-creation of the editor on every render. * Uses createStaticEditor. * * @param options - Configuration options for creating the static Plate editor * @param deps - Additional dependencies for the useMemo hook (default: []) * @see {@link createStaticEditor} for detailed information on static editor creation and configuration. */ declare function usePlateViewEditor(options?: Parameters>[0] & { enabled?: TEnabled; }, deps?: React$1.DependencyList): TEnabled extends false ? null : TEnabled extends true | undefined ? ReturnType> : ReturnType> | null; //#endregion //#region src/react/plugin/getEditorPlugin.d.ts declare function getEditorPlugin>(editor: PlateEditor, plugin: WithRequiredKey): PlatePluginContext extends never ? P$1 : InferConfig>; //#endregion //#region src/react/plugin/getPlugin.d.ts /** Get editor plugin by key or plugin object. */ declare function getPlugin(editor: PlateEditor, plugin: WithRequiredKey): C extends { node: any; } ? C : PlatePlugin; //#endregion //#region src/react/plugin/omitPluginContext.d.ts declare const omitPluginContext: >(ctx: T) => Omit; //#endregion //#region src/react/plugin/toPlatePlugin.d.ts type PlatePluginConfig$1 = Omit, EA & InferApi, ET & InferTransforms, ES & InferSelectors>>>, keyof PlatePluginMethods | 'api' | 'node' | 'options' | 'transforms'> & { api?: EA & Partial>; node?: Partial['node']>; options?: EO & Partial>; selectors?: ES & Partial>; transforms?: ET & Partial>; }; /** * Extends a SlatePlugin to create a React PlatePlugin. * * @remarks * This function transforms a SlatePlugin into a React PlatePlugin, allowing for * React-specific functionality to be added. * @param basePlugin - The base SlatePlugin to be extended. * @param extendConfig - A function or object that provides the extension * configuration. If a function, it receives the plugin context and should * return a partial PlatePlugin. If an object, it should be a partial * PlatePlugin configuration. * @returns A new PlatePlugin that combines the base SlatePlugin functionality * with React-specific features defined in the extension configuration. */ declare function toPlatePlugin(basePlugin: SlatePlugin, extendConfig?: ((ctx: PlatePluginContext) => PlatePluginConfig$1) | PlatePluginConfig$1): PlatePlugin, EA & InferApi, ET & InferTransforms, ES & InferSelectors>>; type ExtendPluginConfig = Omit>, Partial>, Partial>>>>, keyof PlatePluginMethods>; /** * Explicitly typed version of {@link toPlatePlugin}. * * @remarks * This function requires explicit type parameters for both the base plugin * configuration and the extension configuration. Use this when you need * precise control over the plugin's type structure or when type inference * doesn't provide the desired result. * @typeParam C - The type of the extension configuration for the PlatePlugin * (required). * @typeParam TContext - The type of the base SlatePlugin configuration * (optional). */ declare function toTPlatePlugin(basePlugin: SlatePlugin, extendConfig?: ((ctx: PlatePluginContext) => ExtendPluginConfig) | ExtendPluginConfig): PlatePlugin, InferApi, InferTransforms, InferSelectors>>; //#endregion //#region src/react/components/plate-nodes.d.ts declare const useNodeAttributes: (props: any, ref?: any) => any; declare const isHtmlVoidElementTag: (tag: keyof HTMLElementTagNameMap) => boolean; declare const useBlockIdAttributeRef: (blockId: unknown, ref?: React$1.Ref) => (node: T) => (() => void) | undefined; type PlateChunkProps = RenderChunkProps; type PlateElementProps = PlateNodeProps & RenderElementProps & { attributes: UnknownObject; path: Path; } & DeprecatedNodeProps; type DeprecatedNodeProps = { /** * @deprecated Optional class to be merged with `attributes.className`. * @default undefined */ className?: string; /** * @deprecated Optional style to be merged with `attributes.style` * @default undefined */ style?: React$1.CSSProperties; }; type PlateNodeProps = PlatePluginContext & { /** * Optional ref to be merged with `attributes.ref` * * @default undefined */ ref?: any; }; type PlateHTMLProps | keyof HTMLElementTagNameMap = 'div'> = PlateNodeProps & { /** HTML attributes to pass to the underlying HTML element */ attributes: React$1.PropsWithoutRef ? React$1.ComponentProps : T extends keyof HTMLElementTagNameMap ? React$1.JSX.IntrinsicElements[T] : never>; as?: T; /** Class to be merged with `attributes.className` */ className?: string; /** Style to be merged with `attributes.style` */ style?: React$1.CSSProperties; }; type StyledPlateElementProps = Omit, keyof DeprecatedNodeProps> & PlateHTMLProps & { insetProp?: boolean; }; declare const PlateElement: (props: StyledPlateElementProps) => React$1.ReactElement; type PlateTextProps = PlateNodeProps & RenderTextProps & DeprecatedNodeProps & { attributes: UnknownObject; }; type StyledPlateTextProps = Omit, keyof DeprecatedNodeProps> & PlateHTMLProps; declare const PlateText: (props: StyledPlateTextProps) => React$1.ReactElement; type PlateLeafProps = PlateNodeProps & RenderLeafProps & DeprecatedNodeProps & { attributes: UnknownObject; inset?: boolean; }; type StyledPlateLeafProps = Omit, keyof DeprecatedNodeProps> & PlateHTMLProps; declare const PlateLeaf: ({ className, ...props }: StyledPlateLeafProps) => React$1.ReactElement; //#endregion //#region src/react/components/ContentVisibilityChunk.d.ts declare const ContentVisibilityChunk: ({ attributes, children, lowest }: PlateChunkProps) => any; //#endregion //#region src/react/components/EditorHotkeysEffect.d.ts declare function EditorHotkeysEffect({ id, editableRef }: { editableRef: React$1.RefObject; id?: string; }): React$1.JSX.Element; //#endregion //#region src/react/components/EditorMethodsEffect.d.ts declare const EditorMethodsEffect: ({ id }: { id?: string; }) => null; //#endregion //#region src/react/components/EditorRefEffect.d.ts declare function EditorRefPluginEffect({ id, plugin }: { plugin: AnyEditorPlatePlugin; id?: string; }): null; declare function EditorRefEffect({ id }: { id?: string; }): React$1.JSX.Element; //#endregion //#region src/react/stores/element/useElement.d.ts /** * Get the element by plugin key. If no element is found in the context, it will * return an empty object. */ declare const useElement: (pluginKey?: string) => T; //#endregion //#region src/react/stores/element/useElementSelector.d.ts type UseElementSelectorOptions = { key?: string; equalityFn?: (a: T, b: T) => boolean; }; declare const useElementSelector: (selector: (state: NodeEntry, prev?: T) => T, deps: DependencyList, { key, equalityFn }?: UseElementSelectorOptions) => T; //#endregion //#region src/react/stores/element/useElementStore.d.ts declare const SCOPE_ELEMENT = "element"; type ElementStoreState = { element: TElement; entry: ElementEntry; path: Path; }; type ElementContextValue = Nullable & { parent: ElementContextValue | null; scope?: string; }; type ElementStoreContextValue = { parent: ElementStoreContextValue | null; runtime: ElementRuntimeStore; scope?: string; store: ReturnType; }; type ElementRuntimeState = Nullable; type ElementRuntimeStore = { getJotaiStore: () => ReturnType; getState: () => ElementRuntimeState; setState: (nextState: ElementRuntimeState) => void; subscribe: (listener: () => void) => () => void; }; declare const elementStore: jotai_x98.StoreApi; declare const withElementContext: (context: Omit, callback: () => T) => T; declare const useElementContext: (scope?: string) => ElementContextValue | null; declare const useElementStoreContext: (scope?: string) => ElementStoreContextValue | null; declare const useElementStore: (scope?: string) => jotai_x98.ReturnOfUseStoreApi; declare function ElementProvider({ children, path, scope, ...props }: React$1.PropsWithChildren & { scope?: string; }>): React$1.JSX.Element; declare function FirstBlockEffect(): null; //#endregion //#region src/react/stores/element/usePath.d.ts /** Get the memoized path of the closest element. */ declare const usePath: (pluginKey?: string) => Path; //#endregion //#region src/react/stores/event-editor/useEventPlateId.d.ts /** Get last event editor id: focus, blur or last. */ declare const useEventPlateId: (id?: string) => string; //#endregion //#region src/react/stores/plate/PlateStore.d.ts type PlateChangeKey = 'versionDecorate' | 'versionEditor' | 'versionSelection' | 'versionValue'; type PlateStoreState = Nullable<{ composing: boolean; decorate: NonNullable<(options: { editor: E; entry: NodeEntry; }) => TRange[]>; /** Whether `Editable` is rendered so slate DOM is resolvable. */ isMounted: boolean; /** * Whether the editor is primary. If no editor is active, then PlateController * will use the first-mounted primary editor. * * @default true */ primary: boolean; readOnly: boolean; renderChunk: NonNullable; renderElement: NonNullable; renderLeaf: NonNullable; renderText: NonNullable; /** * Version incremented when calling `redecorate`. This is a dependency of the * `decorate` function. */ versionDecorate: number; /** Version incremented on each editor change. */ versionEditor: number; /** Version incremented on each editor.selection change. */ versionSelection: number; /** Version incremented on each editor.children change. */ versionValue: number; /** Controlled callback called when the editor state changes. */ onChange: (options: { editor: E; value: ValueOf; }) => void; /** Controlled callback called when a node operation is applied. */ onNodeChange: (options: { editor: E; node: Descendant; operation: NodeOperation; prevNode: Descendant; }) => void; /** Controlled callback called when the editor.selection changes. */ onSelectionChange: (options: { editor: E; selection: TSelection; }) => void; /** Controlled callback called when a text operation is applied. */ onTextChange: (options: { editor: E; node: Descendant; operation: TextOperation; prevText: string; text: string; }) => void; /** Controlled callback called when the editor.children changes. */ onValueChange: (options: { editor: E; value: ValueOf; }) => void; }> & { /** * A unique id used as a provider scope. Use it if you have multiple `Plate` * in the same React tree. * * @default random id */ id: string; /** A reference to the editor container element. */ containerRef: React.RefObject; /** * Slate editor reference. * * @default createPlateFallbackEditor() */ editor: E; /** * A reference to the editor scroll container element. * * @default containerRef */ scrollRef: React.RefObject; }; //#endregion //#region src/react/stores/plate/createPlateStore.d.ts type PlateStore = ReturnType; declare const PLATE_SCOPE = "plate"; declare const GLOBAL_PLATE_SCOPE: unique symbol; declare const createPlateStore: ({ id, composing, containerRef, decorate, editor, isMounted, primary, readOnly, renderChunk, renderElement, renderLeaf, renderText, scrollRef, versionDecorate, versionEditor, versionSelection, versionValue, onChange, onNodeChange, onSelectionChange, onTextChange, onValueChange, ...state }?: Partial>) => jotai_x98.AtomStoreApi, { trackedEditor: jotai10.Atom<{ editor: any; version: number | null; }>; trackedSelection: jotai10.Atom<{ selection: any; version: number | null; }>; trackedValue: jotai10.Atom<{ value: any; version: number | null; }>; }, "plate">; declare const PlateStoreProvider: React$1.FC _platejs_slate20.TRange[]) | null; isMounted: boolean | null; primary: boolean | null; readOnly: boolean | null; renderChunk: RenderChunkFn | null; renderElement: RenderElementFn | null; renderLeaf: RenderLeafFn | null; renderText: RenderTextFn | null; versionDecorate: number | null; versionEditor: number | null; versionSelection: number | null; versionValue: number | null; onChange: ((options: { editor: PlateEditor; value: _platejs_slate20.Value; }) => void) | null; onNodeChange: ((options: { editor: PlateEditor; node: _platejs_slate20.Descendant; operation: _platejs_slate20.NodeOperation; prevNode: _platejs_slate20.Descendant; }) => void) | null; onSelectionChange: ((options: { editor: PlateEditor; selection: _platejs_slate20.TSelection; }) => void) | null; onTextChange: ((options: { editor: PlateEditor; node: _platejs_slate20.Descendant; operation: _platejs_slate20.TextOperation; prevText: string; text: string; }) => void) | null; onValueChange: ((options: { editor: PlateEditor; value: _platejs_slate20.Value; }) => void) | null; id: string; containerRef: React$1.RefObject; editor: PlateEditor; scrollRef: React$1.RefObject; }>>, plateStore: jotai_x98.StoreApi, { trackedEditor: jotai10.Atom<{ editor: any; version: number | null; }>; trackedSelection: jotai10.Atom<{ selection: any; version: number | null; }>; trackedValue: jotai10.Atom<{ value: any; version: number | null; }>; }, "plate">, usePlateLocalSet: (key: K$1, options?: string | jotai_x98.UseAtomOptions) => ({ composing: jotai_x98.SimpleWritableAtom; decorate: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; entry: _platejs_slate20.NodeEntry; }) => _platejs_slate20.TRange[]) | null>; isMounted: jotai_x98.SimpleWritableAtom; primary: jotai_x98.SimpleWritableAtom; readOnly: jotai_x98.SimpleWritableAtom; renderChunk: jotai_x98.SimpleWritableAtom; renderElement: jotai_x98.SimpleWritableAtom; renderLeaf: jotai_x98.SimpleWritableAtom; renderText: jotai_x98.SimpleWritableAtom; versionDecorate: jotai_x98.SimpleWritableAtom; versionEditor: jotai_x98.SimpleWritableAtom; versionSelection: jotai_x98.SimpleWritableAtom; versionValue: jotai_x98.SimpleWritableAtom; onChange: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; value: _platejs_slate20.Value; }) => void) | null>; onNodeChange: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; node: _platejs_slate20.Descendant; operation: _platejs_slate20.NodeOperation; prevNode: _platejs_slate20.Descendant; }) => void) | null>; onSelectionChange: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; selection: _platejs_slate20.TSelection; }) => void) | null>; onTextChange: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; node: _platejs_slate20.Descendant; operation: _platejs_slate20.TextOperation; prevText: string; text: string; }) => void) | null>; onValueChange: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; value: _platejs_slate20.Value; }) => void) | null>; id: jotai_x98.SimpleWritableAtom; containerRef: jotai_x98.SimpleWritableAtom>; editor: jotai_x98.SimpleWritableAtom; scrollRef: jotai_x98.SimpleWritableAtom>; } & { trackedEditor: jotai10.Atom<{ editor: any; version: number | null; }>; trackedSelection: jotai10.Atom<{ selection: any; version: number | null; }>; trackedValue: jotai10.Atom<{ value: any; version: number | null; }>; })[K$1] extends jotai10.WritableAtom ? (...args: A) => R : never, usePlateLocalState: (key: K$1, options?: string | jotai_x98.UseAtomOptions) => ({ composing: jotai_x98.SimpleWritableAtom; decorate: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; entry: _platejs_slate20.NodeEntry; }) => _platejs_slate20.TRange[]) | null>; isMounted: jotai_x98.SimpleWritableAtom; primary: jotai_x98.SimpleWritableAtom; readOnly: jotai_x98.SimpleWritableAtom; renderChunk: jotai_x98.SimpleWritableAtom; renderElement: jotai_x98.SimpleWritableAtom; renderLeaf: jotai_x98.SimpleWritableAtom; renderText: jotai_x98.SimpleWritableAtom; versionDecorate: jotai_x98.SimpleWritableAtom; versionEditor: jotai_x98.SimpleWritableAtom; versionSelection: jotai_x98.SimpleWritableAtom; versionValue: jotai_x98.SimpleWritableAtom; onChange: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; value: _platejs_slate20.Value; }) => void) | null>; onNodeChange: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; node: _platejs_slate20.Descendant; operation: _platejs_slate20.NodeOperation; prevNode: _platejs_slate20.Descendant; }) => void) | null>; onSelectionChange: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; selection: _platejs_slate20.TSelection; }) => void) | null>; onTextChange: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; node: _platejs_slate20.Descendant; operation: _platejs_slate20.TextOperation; prevText: string; text: string; }) => void) | null>; onValueChange: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; value: _platejs_slate20.Value; }) => void) | null>; id: jotai_x98.SimpleWritableAtom; containerRef: jotai_x98.SimpleWritableAtom>; editor: jotai_x98.SimpleWritableAtom; scrollRef: jotai_x98.SimpleWritableAtom>; } & { trackedEditor: jotai10.Atom<{ editor: any; version: number | null; }>; trackedSelection: jotai10.Atom<{ selection: any; version: number | null; }>; trackedValue: jotai10.Atom<{ value: any; version: number | null; }>; })[K$1] extends jotai10.WritableAtom ? [V, (...args: A) => R] : never, usePlateLocalStore: jotai_x98.UseStoreApi, { trackedEditor: jotai10.Atom<{ editor: any; version: number | null; }>; trackedSelection: jotai10.Atom<{ selection: any; version: number | null; }>; trackedValue: jotai10.Atom<{ value: any; version: number | null; }>; }>, usePlateLocalValue: ; decorate: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; entry: _platejs_slate20.NodeEntry; }) => _platejs_slate20.TRange[]) | null>; isMounted: jotai_x98.SimpleWritableAtom; primary: jotai_x98.SimpleWritableAtom; readOnly: jotai_x98.SimpleWritableAtom; renderChunk: jotai_x98.SimpleWritableAtom; renderElement: jotai_x98.SimpleWritableAtom; renderLeaf: jotai_x98.SimpleWritableAtom; renderText: jotai_x98.SimpleWritableAtom; versionDecorate: jotai_x98.SimpleWritableAtom; versionEditor: jotai_x98.SimpleWritableAtom; versionSelection: jotai_x98.SimpleWritableAtom; versionValue: jotai_x98.SimpleWritableAtom; onChange: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; value: _platejs_slate20.Value; }) => void) | null>; onNodeChange: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; node: _platejs_slate20.Descendant; operation: _platejs_slate20.NodeOperation; prevNode: _platejs_slate20.Descendant; }) => void) | null>; onSelectionChange: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; selection: _platejs_slate20.TSelection; }) => void) | null>; onTextChange: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; node: _platejs_slate20.Descendant; operation: _platejs_slate20.TextOperation; prevText: string; text: string; }) => void) | null>; onValueChange: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; value: _platejs_slate20.Value; }) => void) | null>; id: jotai_x98.SimpleWritableAtom; containerRef: jotai_x98.SimpleWritableAtom>; editor: jotai_x98.SimpleWritableAtom; scrollRef: jotai_x98.SimpleWritableAtom>; } & { trackedEditor: jotai10.Atom<{ editor: any; version: number | null; }>; trackedSelection: jotai10.Atom<{ selection: any; version: number | null; }>; trackedValue: jotai10.Atom<{ value: any; version: number | null; }>; })[K$1] extends jotai10.Atom ? V : never)>(key: K$1, options?: ({ selector?: ((v: ({ composing: jotai_x98.SimpleWritableAtom; decorate: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; entry: _platejs_slate20.NodeEntry; }) => _platejs_slate20.TRange[]) | null>; isMounted: jotai_x98.SimpleWritableAtom; primary: jotai_x98.SimpleWritableAtom; readOnly: jotai_x98.SimpleWritableAtom; renderChunk: jotai_x98.SimpleWritableAtom; renderElement: jotai_x98.SimpleWritableAtom; renderLeaf: jotai_x98.SimpleWritableAtom; renderText: jotai_x98.SimpleWritableAtom; versionDecorate: jotai_x98.SimpleWritableAtom; versionEditor: jotai_x98.SimpleWritableAtom; versionSelection: jotai_x98.SimpleWritableAtom; versionValue: jotai_x98.SimpleWritableAtom; onChange: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; value: _platejs_slate20.Value; }) => void) | null>; onNodeChange: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; node: _platejs_slate20.Descendant; operation: _platejs_slate20.NodeOperation; prevNode: _platejs_slate20.Descendant; }) => void) | null>; onSelectionChange: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; selection: _platejs_slate20.TSelection; }) => void) | null>; onTextChange: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; node: _platejs_slate20.Descendant; operation: _platejs_slate20.TextOperation; prevText: string; text: string; }) => void) | null>; onValueChange: jotai_x98.SimpleWritableAtom<((options: { editor: PlateEditor; value: _platejs_slate20.Value; }) => void) | null>; id: jotai_x98.SimpleWritableAtom; containerRef: jotai_x98.SimpleWritableAtom>; editor: jotai_x98.SimpleWritableAtom; scrollRef: jotai_x98.SimpleWritableAtom>; } & { trackedEditor: jotai10.Atom<{ editor: any; version: number | null; }>; trackedSelection: jotai10.Atom<{ selection: any; version: number | null; }>; trackedValue: jotai10.Atom<{ value: any; version: number | null; }>; })[K$1] extends jotai10.Atom ? V_1 : never, prevSelectorOutput?: S | undefined) => S) | undefined; equalityFn?: ((prev: S, next: S) => boolean) | undefined; } & jotai_x98.UseAtomOptions) | undefined, deps?: unknown[]) => S; declare const usePlateStore: (id?: string) => jotai_x98.ReturnOfUseStoreApi, { trackedEditor: jotai10.Atom<{ editor: any; version: number | null; }>; trackedSelection: jotai10.Atom<{ selection: any; version: number | null; }>; trackedValue: jotai10.Atom<{ value: any; version: number | null; }>; }>; declare const usePlateSet: typeof usePlateLocalSet; declare const usePlateValue: typeof usePlateLocalValue; declare const usePlateState: typeof usePlateLocalState; /** Get the closest `Plate` id. */ declare const useEditorId: () => string; declare const useEditorContainerRef: (id?: string) => React$1.RefObject; declare const useEditorScrollRef: (id?: string) => React$1.RefObject; /** Returns the scrollRef if it exists, otherwise returns the containerRef. */ declare const useScrollRef: (id?: string) => React$1.RefObject; declare const useEditorMounted: (id?: string) => boolean; /** * Whether the editor is read-only. You can also use `useReadOnly` from * `slate-react` in node components. */ declare const useEditorReadOnly: (id?: string) => boolean; /** Whether the editor is composing. */ declare const useEditorComposing: (id?: string) => boolean; /** * Get a reference to the editor instance that remains stable across re-renders. * The editor object is enhanced with a `store` property that provides access to * the Plate store. * * @example * ```tsx * const editor = useEditorRef(); * const readOnly = useAtomStoreValue(editor.store, 'readOnly'); */ declare const useEditorRef: (id?: string) => E & { store: PlateStore; }; /** Get the editor selection (deeply memoized). */ declare const useEditorSelection: (id?: string) => any; /** Get editor state which is updated on editor change. */ declare const useEditorState: (id?: string) => E; /** Version incremented on each editor change. */ declare const useEditorVersion: (id?: string) => number | null; /** Version incremented on selection change. */ declare const useSelectionVersion: (id?: string) => number | null; /** Get the editor value (deeply memoized). */ declare const useEditorValue: (id?: string) => any; /** Version incremented on value change. */ declare const useValueVersion: (id?: string) => number | null; declare const useIncrementVersion: (key: PlateChangeKey, id?: string) => () => void; declare const useRedecorate: (id?: string) => () => void; //#endregion //#region src/react/stores/plate/useEditorPlugin.d.ts /** Get editor and plugin context. */ declare function useEditorPlugin, E extends PlateEditor = PlateEditor>(p: WithRequiredKey, id?: string): PlatePluginContext extends never ? P$1 : InferConfig, E> & { store: PlateStore; }; //#endregion //#region src/react/stores/plate/useEditorSelector.d.ts type UseEditorSelectorOptions = { id?: string; equalityFn?: (a: T, b: T) => boolean; }; declare const useEditorSelector: (selector: (editor: E, prev?: T) => T, deps: React$1.DependencyList, { id, equalityFn }?: UseEditorSelectorOptions) => T; //#endregion //#region src/react/stores/plate/usePluginOption.d.ts /** * Hook to access plugin options. For usage outside ``, use * `useEditorPluginOption` instead. * * @example * const value = usePluginOption(plugin, 'value'); * const doubleValue = usePluginOption(plugin, 'doubleValue', 2); */ declare function usePluginOption, TSelectors extends InferSelectors, K$1 extends keyof StateType | keyof TSelectors | 'state'>(plugin: WithRequiredKey, key: K$1, ...args: [...(K$1 extends keyof TSelectors ? Parameters : unknown[]), TEqualityChecker : K$1 extends keyof StateType ? StateType[K$1] : never>?]): K$1 extends 'state' ? StateType : K$1 extends keyof TSelectors ? ReturnType : K$1 extends keyof StateType ? StateType[K$1] : never; declare function useEditorPluginOption, TSelectors extends InferSelectors, K$1 extends keyof StateType | keyof TSelectors | 'state'>(editor: PlateEditor, plugin: WithRequiredKey, key: K$1, ...args: [...(K$1 extends keyof TSelectors ? Parameters : unknown[]), TEqualityChecker : K$1 extends keyof StateType ? StateType[K$1] : never>?]): K$1 extends 'state' ? StateType : K$1 extends keyof TSelectors ? ReturnType : K$1 extends keyof StateType ? StateType[K$1] : never; /** * Use zustand store selector. * * @example * const name = usePluginOptions(plugin, (state) => state.name, equalityFn); */ declare function usePluginOptions(plugin: WithRequiredKey, selector: (state: InferOptions) => U, { id, equalityFn }?: { id?: string; equalityFn?: (a: U, b: U) => boolean; }): U; declare function useEditorPluginOptions(editor: PlateEditor, plugin: WithRequiredKey, selector: (state: InferOptions) => U, { equalityFn }?: { equalityFn?: (a: U, b: U) => boolean; }): U; //#endregion //#region src/react/stores/plate-controller/plateControllerStore.d.ts declare const PlateController: React$1.FC(atom: Atom) => Value$1; set: (atom: jotai10.WritableAtom, ...args: Args) => Result; sub: (atom: Atom, listener: () => void) => () => void; } & Partial<{ dev_subscribe_store: (l: (action: { type: "write"; flushed: Set>; } | { type: "async-write"; flushed: Set>; } | { type: "sub"; flushed: Set>; } | { type: "unsub"; } | { type: "restore"; flushed: Set>; }) => void, rev: 2) => () => void; dev_get_mounted_atoms: () => IterableIterator>; dev_get_atom_state: (a: Atom) => ({ d: Map, /*elided*/any & ({ e: unknown; } | { v: unknown; })>; } & ({ e: unknown; } | { v: unknown; })) | undefined; dev_get_mounted: (a: Atom) => { l: Set<() => void>; t: Set>; u?: () => void; } | undefined; dev_restore_atoms: (values: Iterable, unknown]>) => void; }>) | null>; primaryEditorIds: string[]; }>>, plateControllerStore: jotai_x98.StoreApi<{ activeId: jotai10.PrimitiveAtom & { init: string | null; }; editorStores: jotai10.PrimitiveAtom(atom: Atom) => Value$1; set: (atom: jotai10.WritableAtom, ...args: Args) => Result; sub: (atom: Atom, listener: () => void) => () => void; } & Partial<{ dev_subscribe_store: (l: (action: { type: "write"; flushed: Set>; } | { type: "async-write"; flushed: Set>; } | { type: "sub"; flushed: Set>; } | { type: "unsub"; } | { type: "restore"; flushed: Set>; }) => void, rev: 2) => () => void; dev_get_mounted_atoms: () => IterableIterator>; dev_get_atom_state: (a: Atom) => ({ d: Map, /*elided*/any & ({ e: unknown; } | { v: unknown; })>; } & ({ e: unknown; } | { v: unknown; })) | undefined; dev_get_mounted: (a: Atom) => { l: Set<() => void>; t: Set>; u?: () => void; } | undefined; dev_restore_atoms: (values: Iterable, unknown]>) => void; }>) | null>> & { init: Record(atom: Atom) => Value$1; set: (atom: jotai10.WritableAtom, ...args: Args) => Result; sub: (atom: Atom, listener: () => void) => () => void; } & Partial<{ dev_subscribe_store: (l: (action: { type: "write"; flushed: Set>; } | { type: "async-write"; flushed: Set>; } | { type: "sub"; flushed: Set>; } | { type: "unsub"; } | { type: "restore"; flushed: Set>; }) => void, rev: 2) => () => void; dev_get_mounted_atoms: () => IterableIterator>; dev_get_atom_state: (a: Atom) => ({ d: Map, /*elided*/any & ({ e: unknown; } | { v: unknown; })>; } & ({ e: unknown; } | { v: unknown; })) | undefined; dev_get_mounted: (a: Atom) => { l: Set<() => void>; t: Set>; u?: () => void; } | undefined; dev_restore_atoms: (values: Iterable, unknown]>) => void; }>) | null>; }; primaryEditorIds: jotai10.PrimitiveAtom & { init: string[]; }; }, object, "plateController">, _usePlateControllerStore: jotai_x98.UseStoreApi<{ activeId: jotai10.PrimitiveAtom & { init: string | null; }; editorStores: jotai10.PrimitiveAtom(atom: Atom) => Value$1; set: (atom: jotai10.WritableAtom, ...args: Args) => Result; sub: (atom: Atom, listener: () => void) => () => void; } & Partial<{ dev_subscribe_store: (l: (action: { type: "write"; flushed: Set>; } | { type: "async-write"; flushed: Set>; } | { type: "sub"; flushed: Set>; } | { type: "unsub"; } | { type: "restore"; flushed: Set>; }) => void, rev: 2) => () => void; dev_get_mounted_atoms: () => IterableIterator>; dev_get_atom_state: (a: Atom) => ({ d: Map, /*elided*/any & ({ e: unknown; } | { v: unknown; })>; } & ({ e: unknown; } | { v: unknown; })) | undefined; dev_get_mounted: (a: Atom) => { l: Set<() => void>; t: Set>; u?: () => void; } | undefined; dev_restore_atoms: (values: Iterable, unknown]>) => void; }>) | null>> & { init: Record(atom: Atom) => Value$1; set: (atom: jotai10.WritableAtom, ...args: Args) => Result; sub: (atom: Atom, listener: () => void) => () => void; } & Partial<{ dev_subscribe_store: (l: (action: { type: "write"; flushed: Set>; } | { type: "async-write"; flushed: Set>; } | { type: "sub"; flushed: Set>; } | { type: "unsub"; } | { type: "restore"; flushed: Set>; }) => void, rev: 2) => () => void; dev_get_mounted_atoms: () => IterableIterator>; dev_get_atom_state: (a: Atom) => ({ d: Map, /*elided*/any & ({ e: unknown; } | { v: unknown; })>; } & ({ e: unknown; } | { v: unknown; })) | undefined; dev_get_mounted: (a: Atom) => { l: Set<() => void>; t: Set>; u?: () => void; } | undefined; dev_restore_atoms: (values: Iterable, unknown]>) => void; }>) | null>; }; primaryEditorIds: jotai10.PrimitiveAtom & { init: string[]; }; }, object>; declare const usePlateControllerLocalStore: typeof _usePlateControllerStore; declare const usePlateControllerExists: () => boolean; /** * Retrieve from PlateController the JotaiStore for the editor with a given ID, * or the active editor if no ID is provided, or the first primary editor if no * editor is active, or null. */ declare const usePlateControllerStore: (idProp?: string) => JotaiStore | null; //#endregion //#region src/react/components/Plate.d.ts interface PlateProps extends Partial, 'decorate' | 'onChange' | 'onNodeChange' | 'onSelectionChange' | 'onTextChange' | 'onValueChange' | 'primary' | 'readOnly'>> { children: React$1.ReactNode; editor: E | null; renderElement?: EditableProps['renderElement']; renderLeaf?: EditableProps['renderLeaf']; suppressInstanceWarning?: boolean; } declare function Plate(props: PlateProps): React$1.JSX.Element | null; //#endregion //#region src/react/components/PlateContainer.d.ts declare const PlateContainer: { ({ children, ...props }: HTMLAttributes): React$1.JSX.Element; displayName: string; }; //#endregion //#region src/react/components/PlateContent.d.ts type PlateContentProps = Omit & { /** Autofocus when it becomes editable (readOnly false -> readOnly true) */ autoFocusOnEditable?: boolean; decorate?: PlateStoreState['decorate']; disabled?: boolean; /** R enders the editable content. */ renderEditable?: (editable: React$1.ReactElement) => React$1.ReactNode; }; /** * Editable with plugins. * * - Decorate prop * - DOM handler props * - ReadOnly prop * - Render.afterEditable * - Render.beforeEditable * - RenderElement prop * - RenderLeaf prop * - UseHooks */ declare const PlateContent: React$1.ForwardRefExoticComponent & { /** Autofocus when it becomes editable (readOnly false -> readOnly true) */ autoFocusOnEditable?: boolean; decorate?: PlateStoreState["decorate"]; disabled?: boolean; /** R enders the editable content. */ renderEditable?: (editable: React$1.ReactElement) => React$1.ReactNode; } & React$1.RefAttributes>; //#endregion //#region src/react/components/PlateControllerEffect.d.ts type PlateControllerEffectProps = { id?: string; }; declare const PlateControllerEffect: ({ id: idProp }: PlateControllerEffectProps) => null; //#endregion //#region src/react/components/PlateSlate.d.ts /** * Slate with plugins. * * - OnChange prop * - RenderAboveSlate */ declare function PlateSlate({ id, children }: { children: React$1.ReactNode; id?: string; }): React$1.ReactElement>; //#endregion //#region src/react/components/PlateTest.d.ts declare function PlateTest({ editableProps, shouldNormalizeEditor, variant, ...props }: CreatePlateEditorOptions & PlateProps & { editableProps?: PlateContentProps; variant?: 'comment' | 'wordProcessor'; }): React$1.JSX.Element; //#endregion //#region src/react/components/PlateView.d.ts type PlateViewProps = PlateStaticProps & {}; declare const PlateView: (props: PlateViewProps) => React$1.JSX.Element; //#endregion //#region src/react/components/withHOC.d.ts type RefComponent = React$1.FC & { ref?: React$1.Ref; }; declare const withHOC: (HOC: RefComponent, Component: RefComponent, hocProps?: Omit, hocRef?: React$1.Ref) => React$1.ForwardRefExoticComponent & React$1.RefAttributes>; //#endregion //#region src/react/hooks/useEditableProps.d.ts declare const useEditableProps: ({ disabled, readOnly, ...editableProps }?: Omit & Pick) => EditableProps; //#endregion //#region src/react/hooks/useNodePath.d.ts /** * Returns the path of a node every time the node changes. Note, however, that * if another node is updated in a way that affects this node's path, this hook * will not return the new path. */ declare const useNodePath: (node: TNode) => _platejs_slate20.Path | undefined; //#endregion //#region src/react/hooks/useSlateProps.d.ts type SlateComponentProps = Omit, 'children'>; interface PlateSlateProps extends SlateComponentProps { key: React$1.Key; } /** Get Slate props stored in a global store. */ declare const useSlateProps: ({ id }: { id?: string; }) => PlateSlateProps; //#endregion //#region src/react/utils/createPlateFallbackEditor.d.ts declare const createPlateFallbackEditor: (options?: CreatePlateEditorOptions) => TPlateEditor<_platejs_slate20.Value, PlateCorePlugin>; //#endregion //#region src/react/utils/dom-attributes.d.ts declare const DOM_HANDLERS: (keyof DOMHandlers)[]; //#endregion //#region src/react/utils/getRenderNodeProps.d.ts /** * Override node props with plugin props. Allowed properties in * `props.element.attributes` are passed into `props.attributes`. Extend the * class name with the node type. */ declare const getRenderNodeProps: ({ attributes: nodeAttributes, disableInjectNodeProps, editor, plugin, pluginContext, props, readOnly }: { editor: PlateEditor; props: PlateHTMLProps; attributes?: AnyObject; disableInjectNodeProps?: boolean; plugin?: AnyEditorPlatePlugin; pluginContext?: AnyObject; readOnly?: boolean; }) => PlateHTMLProps; //#endregion //#region src/react/utils/pipeHandler.d.ts declare const convertDomEventToSyntheticEvent: (domEvent: Event) => React$1.SyntheticEvent; /** Check if an event is overrided by a handler. */ declare const isEventHandled: >(event: EventType, handler?: (event: EventType) => boolean | void) => boolean; /** * Generic pipe for handlers. * * - Get all the plugins handlers by `handlerKey`. * - If there is no plugin handler or editable prop handler for this key, return * `undefined`. * - Return a handler calling all the plugins handlers then the prop handler. * - Any handler returning true will stop the next handlers to be called, * including slate internal handler. */ declare const pipeHandler: (editor: PlateEditor, { editableProps, handlerKey }: { handlerKey: K$1; editableProps?: Omit | null; }) => ((event: any) => void) | undefined; //#endregion //#region src/react/utils/pipeOnChange.d.ts declare const pipeOnChange: (editor: PlateEditor, value: Value) => boolean; //#endregion //#region src/react/utils/pipeRenderElement.d.ts /** @see {@link RenderElement} */ declare const pipeRenderElement: (editor: PlateEditor, renderElementProp?: EditableProps["renderElement"]) => EditableProps["renderElement"]; //#endregion //#region src/react/utils/pipeRenderLeaf.d.ts /** @see {@link RenderLeaf} */ declare const pipeRenderLeaf: (editor: PlateEditor, renderLeafProp?: EditableProps["renderLeaf"]) => EditableProps["renderLeaf"]; //#endregion //#region src/react/utils/pipeRenderText.d.ts /** @see {@link RenderText} */ declare const pipeRenderText: (editor: PlateEditor, renderTextProp?: EditableProps["renderText"]) => EditableProps["renderText"]; //#endregion //#region src/react/utils/pluginRenderElement.d.ts /** * Function used to render an element. If the function returns undefined then * the next RenderElement function is called. If the function renders a JSX * element then that JSX element is rendered. */ type RenderElement = (props: PlateElementProps) => React$1.ReactElement | undefined; declare function BelowRootNodes({ ...props }: any): React$1.JSX.Element; /** * Get a `Editable.renderElement` handler for `plugin.node.type`. If the type is * equals to the slate element type, render `plugin.render.node`. Else, return * `undefined` so the pipeline can check the next plugin. */ declare const pluginRenderElement: (editor: PlateEditor, plugin: AnyEditorPlatePlugin) => RenderElement; //#endregion //#region src/react/utils/pluginRenderLeaf.d.ts type RenderLeaf = (props: PlateLeafProps) => React$1.ReactElement; /** * Get a `Editable.renderLeaf` handler for `plugin.node.type`. If the type is * equals to the slate leaf type, render `plugin.render.node`. Else, return * `children`. */ declare const pluginRenderLeaf: (editor: PlateEditor, plugin: AnyEditorPlatePlugin) => RenderLeaf; //#endregion //#region src/react/utils/pluginRenderText.d.ts type RenderText = (props: PlateTextProps) => React$1.ReactElement; /** * Get a `Editable.renderText` handler for `plugin.node.type`. If the type is * equals to the slate text type and isDecoration is false, render * `plugin.render.node`. Else, return the default text rendering. */ declare const pluginRenderText: (editor: PlateEditor, plugin: AnyEditorPlatePlugin) => RenderText; //#endregion export { AnyEditorPlatePlugin, AnyPlatePlugin, BLUR_EDITOR_EVENT, BelowRootNodes, ContentVisibilityChunk, CreatePlateEditorOptions, DOMHandler, DOMHandlers, DOM_HANDLERS, Decorate, DefaultPlaceholder, Deserializer, Editable, EditableSiblingComponent, EditorHotkeysEffect, EditorMethodsEffect, EditorPlatePlugin, EditorRefEffect, EditorRefPluginEffect, ElementProvider, ElementStoreState, EventEditorPlugin, EventEditorState, EventEditorStore, ExtendEditor, ExtendEditorApi, ExtendEditorTransforms, FOCUS_EDITOR_EVENT, FirstBlockEffect, GLOBAL_PLATE_SCOPE, HtmlDeserializer, HtmlReactSerializer, HtmlSerializer, InferConfig, InjectNodeProps, KeyboardHandler, KeyofPlugins, LeafNodeProps, NavigationFeedbackPlugin, NodeProps, NodeWrapperComponent, NodeWrapperComponentProps, NodeWrapperComponentReturnType, NormalizeInitialValue, OnChange, OnNodeChange, OnTextChange, OverrideEditor, PLATE_SCOPE, ParagraphPlugin, Parser, Plate, PlateChangeKey, PlateChunkProps, PlateContainer, PlateContent, PlateContentProps, PlateController, PlateControllerEffect, PlateControllerEffectProps, PlateCorePlugin, PlateEditor, PlateElement, PlateElementProps, PlateHTMLProps, PlateLeaf, PlateLeafProps, PlateNodeProps, PlatePlugin, PlatePluginConfig, PlatePluginContext, PlatePluginMethods, PlatePlugins, PlateProps, PlateSlate, PlateStore, PlateStoreProvider, PlateStoreState, PlateTest, PlateText, PlateTextProps, PlateView, PlateViewProps, ReactPlugin, RenderElement, RenderLeaf, RenderNodeWrapper, RenderNodeWrapperFunction, RenderNodeWrapperProps, type RenderPlaceholderProps, RenderText, SCOPE_ELEMENT, Serializer, Shortcut, Shortcuts, Slate, SlateReactExtensionPlugin, StyledPlateElementProps, StyledPlateLeafProps, StyledPlateTextProps, TPlateEditor, TextNodeProps, TransformInitialValue, TransformOptions, UseEditorSelectorOptions, UseHooks, WithPlateOptions, atom, convertDomEventToSyntheticEvent, createAtomStore, createPlateEditor, createPlateFallbackEditor, createPlatePlugin, createPlateStore, createTPlatePlugin, createZustandStore, elementStore, getEditorPlugin, getEventPlateId, getPlateCorePlugins, getPlugin, getRenderNodeProps, isEventHandled, isHtmlVoidElementTag, omitPluginContext, pipeHandler, pipeOnChange, pipeRenderElement, pipeRenderLeaf, pipeRenderText, plateControllerStore, plateStore, pluginRenderElement, pluginRenderLeaf, pluginRenderText, toPlatePlugin, toTPlatePlugin, useBlockIdAttributeRef, useComposing, useEditableProps, useEditorComposing, useEditorContainerRef, useEditorId, useEditorMounted, useEditorPlugin, useEditorPluginOption, useEditorPluginOptions, useEditorReadOnly, useEditorRef, useEditorScrollRef, useEditorSelection, useEditorSelector, useEditorState, useEditorValue, useEditorVersion, useElement, useElementContext, useElementSelector, useElementStore, useElementStoreContext, useEventEditorValue, useEventPlateId, useFocusEditorEvents, useFocused, useFocusedLast, useIncrementVersion, useNavigationHighlight, useNodeAttributes, useNodePath, usePath, usePlateControllerExists, usePlateControllerLocalStore, usePlateControllerStore, usePlateEditor, usePlateLocalStore, usePlateSet, usePlateState, usePlateStore, usePlateValue, usePlateViewEditor, usePluginOption, usePluginOptions, useReadOnly, useRedecorate, useScrollRef, useSelected, useSelectionVersion, useSlateProps, useSlateStatic, useStoreAtomState, useStoreAtomValue, useStoreSelect, useStoreSetAtom, useStoreState, useStoreValue, useTracked, useTrackedStore, useValueVersion, withElementContext, withHOC, withPlate, withPlateReact, withReact };