import { Command } from "@prosekit/pm/state"; import { Extension, PlainExtension, Union } from "@prosekit/core"; interface TextAlignOptions { /** * The names of node to add the attribute to. * * @example * * ["paragraph", "heading"] */ types: NodeName[]; /** * The default value for the attribute. * * @default "left" */ default?: string; } /** * @internal */ type TextAlignAttrsExtension = Extension<{ Nodes: { [K in NodeName]: { textAlign: string | null; } }; }>; /** * @internal */ declare function setTextAlign({ types, value }: { types: string[]; value: string | null; }): Command; /** * @internal */ type TextAlignCommandsExtension = Extension<{ Commands: { setTextAlign: [value: string | null]; }; }>; /** * @internal */ declare function defineTextAlignCommands(types: string[]): TextAlignCommandsExtension; /** * @internal */ declare function defineTextAlignKeymap(types: string[]): PlainExtension; /** * @internal */ type TextAlignExtension = Union<[TextAlignAttrsExtension, TextAlignCommandsExtension]>; /** * Adds a `textAlign` attribute to the specified nodes. This will be rendered as * a CSS `text-align` style. */ declare function defineTextAlign(options: TextAlignOptions): TextAlignExtension; export { TextAlignAttrsExtension, TextAlignCommandsExtension, TextAlignExtension, TextAlignOptions, defineTextAlign, defineTextAlignCommands, defineTextAlignKeymap, setTextAlign }; //# sourceMappingURL=text-align.d.ts.map