import type { Universe } from '@ephox/boss'; import { TypedItem } from '../api/data/TypedItem'; import type { SpotPoint } from '../api/data/Types'; /** * Flattens the item tree into an array of TypedItem representations. * * Boundaries are returned twice, before and after their children. * * Returns: [array of TypedItem] where: * If item is a text node or empty tag, returns a single-element array [item] * If item is an element, returns all children recursively as an array. * - if the element is also boundary, item is added to the front and end of the return array. * Otherwise returns [] * TODO: for TBIO-470 for Multi-Language spell checking: deal with the element LANG, adding language to typeditem so this nested information is not lost */ declare const typed: (universe: Universe, item: E, optimise?: (e: E) => boolean) => TypedItem[]; /** * Returns just the actual elements from a call to typed(). */ declare const items: (universe: Universe, item: E, optimise?: (e: E) => boolean) => E[]; /** * Generates an absolute point in the child's parent * that can be used to reference the offset into child later. * * To find the exact reference later, use Find. */ declare const extract: (universe: Universe, child: E, offset: number, optimise?: (e: E) => boolean) => SpotPoint; /** * Generates an absolute point that can be used to reference the offset into child later. * This absolute point will be relative to a parent node (specified by predicate). * * To find the exact reference later, use Find. */ declare const extractTo: (universe: Universe, child: E, offset: number, pred: (e: E) => boolean, optimise?: (e: E) => boolean) => SpotPoint; export { typed, items, extractTo, extract }; //# sourceMappingURL=Extract.d.ts.map