import type { Decoration, Decoration_Type, Node, TextStyle } from 'ricos-schema'; export type QueryItem = (...args: any[]) => any; export type QueryItemCreator = ({ editorQuery }: { editorQuery: IEditorQuery; }) => QueryItem; export type QueryItems = {}; export interface IQuery { query: Record; addQuery: (name: string, query: QueryItem) => void; } export interface IStylesQuery { getTextBlockDecoration(node: ITreeNodeQuery, decorationType: Decoration_Type): Decoration | undefined; getTextDecoration: (node: ITreeNodeQuery, decorationType: Decoration_Type) => Decoration | undefined; getTextBlockStyle: (node: ITreeNodeQuery) => Partial | undefined; getComputedDecoration(node: ITreeNodeQuery, decorationType: Decoration_Type): Decoration | undefined; getComputedTextStyle(node: ITreeNodeQuery, textStyleName: string): Partial | undefined; } export interface ISelection { isEmpty: boolean; doc: ITreeNodeQuery; collapsedDecorations: Decoration[]; } export interface IEditorStateQuery { storedDecorations(): Decoration[] | null; } export interface IEditorQuery { selection(): ISelection; state(): IEditorStateQuery; styles(): IStylesQuery; query: Record; addQuery: (name: string, query: QueryItem) => void; } export interface SelectionQuery { } export interface ITreeNodeQuery { children: ITreeNodeQuery[]; parent: ITreeNodeQuery | null; descendants(predicate: (node: ITreeNodeQuery) => boolean): ITreeNodeQuery[]; closest(predicate: (node: ITreeNodeQuery) => boolean): ITreeNodeQuery | null; isTextBlock(): boolean; isBlock(): boolean; isText(): boolean; type(): string; toNode(): T; getAttributes(): Record; originalIndex: number; } //# sourceMappingURL=query.d.ts.map