import type { Decoration, HeadingData, Link, Metadata, Node, NodeStyle, ParagraphData } from 'ricos-schema'; import { Decoration_Type, Link_Target, Node_Type } from 'ricos-schema'; import type { RicosEntityRange, RicosInlineStyleRange } from '../types'; export declare const createNode: (type: Node_Type, { nodes, data, style, id, }: { nodes: Node[]; data: TData; style?: NodeStyle | undefined; id?: string | undefined; }) => Node; export declare const dataByNodeType: (type: Node_Type, data: unknown) => any; export declare const createParagraphNode: (nodes?: Node[], data?: ParagraphData, style?: NodeStyle) => Node; export declare const createTextNode: (text: string, decorations?: Decoration[]) => Node; export declare const createHeadingNode: (nodes: Node[] | undefined, data: HeadingData) => Node; export declare const createDecoration: (type: Decoration_Type, data?: Omit) => Decoration; export declare const initializeMetadata: ({ version, id, createdTimestamp, updatedTimestamp, }?: { version?: number | undefined; id?: string | undefined; createdTimestamp?: Date | undefined; updatedTimestamp?: Date | undefined; }) => Metadata; export declare const reduceDecorations: (decorations: Decoration[]) => Decoration[]; export declare const toLinkTarget: (target?: string) => Link_Target.SELF | Link_Target.BLANK | Link_Target.PARENT | Link_Target.TOP; export declare const createLink: ({ url, rel, target, anchor, }: { url?: string | undefined; rel?: string | undefined; target?: string | undefined; anchor?: string | undefined; }) => Link; export declare const parseLink: ({ url, rel, target, anchor, customData, }: Link) => { url?: string | undefined; rel?: string | undefined; target?: string | undefined; anchor?: string | undefined; customData?: string | undefined; }; export declare const createLinkDecoration: (data: { url?: string; rel?: string; target?: string; }) => Decoration; export declare const last: (arr: any) => any; export declare const partitionBy: (isSeparator: (node: T) => boolean, isPartition: (node: T) => boolean, Separator: (node: T) => T, Partition: (node: T) => T, addToPartition: (partition: T, node: T) => void) => (nodes: T[]) => T[]; export declare const removeOverlappingRangesWithSameStyle: (ranges: RicosInlineStyleRange[]) => { length: number; style: string; offset: number; }[]; export declare const mergeOverlappingEntityRanges: (entityRanges: RicosEntityRange[]) => RicosEntityRange[]; export declare const generateRangeMap: (ranges: (RicosInlineStyleRange | RicosEntityRange)[]) => Record; type RangeMapEntry = (Omit | Omit) & { action: 'start' | 'end'; }; type RangeMapEntryWithLength = RangeMapEntry & { length: number; }; export declare const normalizeRangeMap: (rangeMap: Record) => Record; export declare const getNodeFullText: (node: Node) => string; export {}; //# sourceMappingURL=nodeUtils.d.ts.map