import { Path, Text } from '../slate/index.ts'; import { HyperscriptPointRef, HyperscriptRangeRef } from './refs'; /** * All tokens inherit from a single constructor for `instanceof` checking. */ export declare class Token { offset?: number; path?: Path; ref?: Ref; constructor(props?: { offset?: number; path?: Path; ref?: Ref; }); } /** * Anchor tokens represent the selection's anchor point. */ export declare class AnchorToken extends Token { } /** * Focus tokens represent the selection's focus point. */ export declare class FocusToken extends Token { } /** * A weak map to hold point tokens. */ export declare class PointToken extends Token { } /** * Add an anchor token to the end of a text node. */ export declare function addAnchorToken(text: Text, token: AnchorToken): void; /** * Get the associated anchor tokens for a text node. */ export declare function getAnchors(text: Text): AnchorToken[]; /** * Add a focus token to the end of a text node. */ export declare function addFocusToken(text: Text, token: FocusToken): void; /** * Get the associated focus tokens for a text node. */ export declare function getFoci(text: Text): FocusToken[]; /** * Add a point token to the end of a text node. */ export declare function addPointToken(text: Text, token: PointToken): void; /** * Get the associated point tokens for a text node. */ export declare function getPoints(text: Text): PointToken[];