/** * @description 对象关联关系(部分参考 slate-react weak-maps.ts) * @author wangfupeng */ import { Emitter } from 'event-emitter'; import { Ancestor, Editor, Node, Path, Range } from 'slate'; import { VNode } from 'snabbdom'; import { IEditorConfig } from '../config/interface'; import { IDomEditor } from '../editor/interface'; import HoverBar from '../menus/bar/HoverBar'; import Toolbar from '../menus/bar/Toolbar'; import { IBarItem } from '../menus/bar-item/index'; import PanelAndModal from '../menus/panel-and-modal/BaseClass'; import TextArea from '../text-area/TextArea'; import { PatchFn } from '../utils/vdom'; import { Key } from './key'; export declare const EDITOR_TO_TEXTAREA: WeakMap; export declare const TEXTAREA_TO_EDITOR: WeakMap; export declare const TOOLBAR_TO_EDITOR: WeakMap; export declare const EDITOR_TO_TOOLBAR: WeakMap; export declare const HOVER_BAR_TO_EDITOR: WeakMap; export declare const EDITOR_TO_HOVER_BAR: WeakMap; export declare const BAR_ITEM_TO_EDITOR: WeakMap; export declare const EDITOR_TO_PANEL_AND_MODAL: WeakMap>; export declare const PANEL_OR_MODAL_TO_EDITOR: WeakMap; export declare const EDITOR_TO_CONFIG: WeakMap; export declare const IS_FIRST_PATCH: WeakMap; export declare const TEXTAREA_TO_PATCH_FN: WeakMap; export declare const TEXTAREA_TO_VNODE: WeakMap; export declare const NODE_TO_VNODE: WeakMap; export declare const NODE_TO_HTML: WeakMap; /** * Two weak maps that allow us rebuild a path given a node. They are populated * at render time such that after a render occurs we can always backtrack. */ export declare const NODE_TO_INDEX: WeakMap; export declare const NODE_TO_PARENT: WeakMap; /** * Weak maps that allow us to go between Slate nodes and DOM nodes. These * are used to resolve DOM event-related logic into Slate actions. */ export declare const EDITOR_TO_ELEMENT: WeakMap; export declare const EDITOR_TO_PLACEHOLDER: WeakMap; export declare const ELEMENT_TO_NODE: WeakMap; export declare const KEY_TO_ELEMENT: WeakMap; export declare const NODE_TO_ELEMENT: WeakMap; export declare const NODE_TO_KEY: WeakMap; export declare const EDITOR_TO_WINDOW: WeakMap; /** * Weak maps for storing editor-related state. */ export declare const IS_FOCUSED: WeakMap; export declare const IS_DRAGGING: WeakMap; export declare const IS_CLICKING: WeakMap; export declare const CHANGING_NODE_PATH: WeakMap; export declare const EDITOR_TO_SELECTION: WeakMap; export declare const EDITOR_TO_EMITTER: WeakMap; export declare const EDITOR_TO_CAN_PASTE: WeakMap;