import * as _udecode_plate_core from '@udecode/plate-core'; import { b as HeadingLevel, H as Heading } from '../types-BLNkiwWE.js'; import { PlatePlugin } from '@udecode/plate/react'; import * as _udecode_plate_core_react from '@udecode/plate-core/react'; import React$1 from 'react'; import * as zustand_x from 'zustand-x'; import * as mutative from 'mutative'; import * as is_hotkey from 'is-hotkey'; import * as _udecode_utils from '@udecode/utils'; import * as _udecode_slate from '@udecode/slate'; import '@udecode/plate'; declare const HeadingPlugin: PlatePlugin<_udecode_plate_core.PluginConfig<"heading", { levels?: HeadingLevel | HeadingLevel[]; }, {}, {}, {}>>; declare const TocPlugin: _udecode_plate_core_react.PlatePlugin<_udecode_plate_core.PluginConfig<"toc", { isScroll: boolean; topOffset: number; queryHeading?: (editor: _udecode_plate_core.SlateEditor) => Heading[]; }, {}, {}, {}>>; interface TocSideBarProps { open?: boolean; rootMargin?: string; topOffset?: number; } interface UseContentController { containerRef: React.RefObject; isObserve: boolean; rootMargin: string; topOffset: number; } declare const useContentController: ({ containerRef, isObserve, rootMargin, topOffset, }: UseContentController) => { activeContentId: string; onContentScroll: ({ id, behavior, el, }: { id: string; el: HTMLElement; behavior?: ScrollBehavior; }) => void; }; interface UseContentObserver { editorContentRef: React$1.RefObject; isObserve: boolean; isScroll: boolean; rootMargin: string; status: number; } declare const useContentObserver: ({ editorContentRef, isObserve, isScroll, rootMargin, status, }: UseContentObserver) => { activeId: string; }; interface UseTocController { activeId: string; isObserve: boolean; tocRef: React$1.RefObject; } declare const useTocController: ({ activeId, isObserve, tocRef, }: UseTocController) => void; declare const useTocElementState: () => { editor: _udecode_plate_core_react.PlateEditor; headingList: Heading[]; onContentScroll: (el: HTMLElement, id: string, behavior?: ScrollBehavior) => void; }; declare const useTocElement: ({ editor, onContentScroll, }: ReturnType) => { props: { onClick: (e: React$1.MouseEvent, item: Heading, behavior: ScrollBehavior) => void; }; }; interface UseTocObserver { activeId: string; isObserve: boolean; tocRef: React$1.RefObject; } declare const useTocObserver: ({ activeId, isObserve, tocRef, }: UseTocObserver) => { offset: number; visible: boolean; }; declare const useTocSideBarState: ({ open, rootMargin, topOffset, }: TocSideBarProps) => { activeContentId: string; editor: { id: string; children: _udecode_slate.Value; history: _udecode_slate.History; marks: _udecode_slate.EditorMarks | null; meta: _udecode_utils.UnknownObject; operations: _udecode_slate.Operation<_udecode_slate.TElement | _udecode_slate.TText>[]; selection: _udecode_slate.EditorSelection; } & _udecode_slate.EditorMethods<_udecode_slate.Value> & _udecode_utils.UnknownObject & { dom: { composing: boolean; currentKeyboardEvent: is_hotkey.KeyboardEventLike | null; focused: boolean; prevSelection: _udecode_slate.TRange | null; readOnly: boolean; }; meta: _udecode_slate.EditorBase["meta"] & { key: any; components: _udecode_plate_core.NodeComponents; isFallback: boolean; pluginCache: { decorate: string[]; handlers: { onChange: string[]; }; inject: { nodeProps: string[]; }; node: { isContainer: string[]; isElement: string[]; isInline: string[]; isLeaf: string[]; isMarkableVoid: string[]; isNotSelectable: string[]; isStrictSiblings: string[]; isVoid: string[]; types: Record; }; normalizeInitialValue: string[]; render: { aboveEditable: string[]; aboveNodes: string[]; aboveSlate: string[]; afterContainer: string[]; afterEditable: string[]; beforeContainer: string[]; beforeEditable: string[]; belowNodes: string[]; belowRootNodes: string[]; }; rules: { match: string[]; }; useHooks: string[]; }; pluginList: any[]; uid?: string; }; plugins: Record; setOptions: { (plugin: _udecode_plate_core.WithRequiredKey, options: (state: mutative.Draft>>) => void): void; (plugin: _udecode_plate_core.WithRequiredKey, options: Partial<_udecode_plate_core.InferOptions>): void; }; getInjectProps: (plugin: _udecode_plate_core.WithRequiredKey) => _udecode_plate_core.InjectNodeProps; getOption: , TSelectors extends _udecode_plate_core.InferSelectors, K extends keyof StateType | keyof TSelectors | "state">(plugin: _udecode_plate_core.WithRequiredKey, key: K, ...args: K extends keyof TSelectors ? Parameters : []) => K extends "state" ? StateType : K extends keyof TSelectors ? ReturnType : K extends keyof StateType ? StateType[K] : never; getOptions: (plugin: _udecode_plate_core.WithRequiredKey) => _udecode_plate_core.InferOptions; getOptionsStore: (plugin: _udecode_plate_core.WithRequiredKey) => zustand_x.TStateApi<_udecode_plate_core.InferOptions, [["zustand/mutative-x", never]], {}, _udecode_plate_core.InferSelectors>; getPlugin: (plugin: _udecode_plate_core.WithRequiredKey) => C extends { node: any; } ? C : _udecode_plate_core.EditorPlugin; getType: (pluginKey: string) => string; setOption: >(plugin: _udecode_plate_core.WithRequiredKey, optionKey: K, value: _udecode_plate_core.InferOptions[K]) => void; } & { api: _udecode_slate.EditorApi & _udecode_utils.UnionToIntersection<_udecode_plate_core.InferApi<_udecode_plate_core_react.PlateCorePlugin>>; meta: _udecode_plate_core.BaseEditor["meta"] & { pluginList: _udecode_plate_core_react.AnyEditorPlatePlugin[]; shortcuts: _udecode_plate_core_react.Shortcuts; }; plugins: Record; tf: _udecode_slate.EditorTransforms & _udecode_utils.UnionToIntersection<_udecode_plate_core.InferTransforms<_udecode_plate_core_react.PlateCorePlugin>>; transforms: _udecode_slate.EditorTransforms & _udecode_utils.UnionToIntersection<_udecode_plate_core.InferTransforms<_udecode_plate_core_react.PlateCorePlugin>>; getApi: (plugin?: _udecode_plate_core.WithRequiredKey) => _udecode_plate_core_react.PlateEditor["api"] & _udecode_plate_core.InferApi; getPlugin: (plugin: _udecode_plate_core.WithRequiredKey) => C extends { node: any; } ? C : _udecode_plate_core_react.EditorPlatePlugin; getTransforms: (plugin?: _udecode_plate_core.WithRequiredKey) => _udecode_plate_core_react.PlateEditor["tf"] & _udecode_plate_core.InferTransforms; uid?: string; } & { store: _udecode_plate_core_react.PlateStore; }; headingList: Heading[]; mouseInToc: boolean; open: boolean; setIsObserve: React$1.Dispatch>; setMouseInToc: React$1.Dispatch>; tocRef: React$1.RefObject; onContentScroll: ({ id, behavior, el, }: { id: string; el: HTMLElement; behavior?: ScrollBehavior; }) => void; }; declare const useTocSideBar: ({ editor, mouseInToc, open, setIsObserve, setMouseInToc, tocRef, onContentScroll, }: ReturnType) => { navProps: { ref: React$1.RefObject; onMouseEnter: () => void; onMouseLeave: (e: React$1.MouseEvent) => void; }; onContentClick: (e: React$1.MouseEvent, item: Heading, behavior?: ScrollBehavior) => void; }; declare function checkIn(e: React.MouseEvent): boolean; declare const heightToTop: (ele: HTMLElement, editorContentRef?: React$1.RefObject) => number; export { HeadingPlugin, TocPlugin, type TocSideBarProps, type UseContentController, checkIn, heightToTop, useContentController, useContentObserver, useTocController, useTocElement, useTocElementState, useTocObserver, useTocSideBar, useTocSideBarState };