import type { CommandProps } from '@tiptap/core'; import type { Node as ProseMirrorNode } from '@tiptap/pm/model'; import type { EditorState } from '@tiptap/pm/state'; import type { Decoration, Decoration_Type, DocumentStyle } from 'ricos-schema'; import type { TextNodeType } from 'ricos-styles'; import type { AmbientStyles } from 'ricos-types'; declare module '@tiptap/core' { interface Commands { styles: { /** * returns decoration object from selected node according to ricos-styles */ getStylesDecorationBySelectedNode: (decorationType: Decoration_Type) => (props: CommandProps) => Decoration | undefined; /** * updates the document style */ updateDocumentStyle: (documentStyle: DocumentStyle) => ReturnType; /** * updates the document style according to the selected node */ updateDocumentStyleBySelectedNode: () => ReturnType; /** * remove all marks that are defined in the document style (bold, italic, color, font size) */ unsetAllDocumentStyleMarksByNode: (node: ProseMirrorNode) => ReturnType; /** * remove all attibutes that are defined in the document style (paddingTop,paddingBottom,lineHeight) */ unsetAllDocumentStyleAttrsByNode: (node: ProseMirrorNode, pos: number) => ReturnType; /** * reset the document style of a given nodeType */ resetDocumentStyleByNodeType: (nodeType: TextNodeType) => ReturnType; }; } } export declare const getStylesDecorationBySelectedNode: (decorationType: Decoration_Type, { state, styles }: { state: EditorState; styles: AmbientStyles; }) => Decoration | undefined; export declare const ricosStyles: import("ricos-types").RicosFunctionalExtension<{ styles: AmbientStyles; }, unknown>; //# sourceMappingURL=ricos-styles.d.ts.map