import { Constructor } from '../util/mixin.ts'; import { GroupsAPI, StackItem } from './groups.ts'; /** * Inline (font) attributes of a group; in HTML, those become CSS classes */ export interface TextAttributes { fontFamily?: string; fontWeight?: string; fontShape?: string; fontSize?: string; textDecoration?: string; } /** * Attributes that are not inherited; set per group level where they are changed */ export type Alignment = string | null; declare module "./groups.ts" { interface StackItem { attrs: TextAttributes; align: Alignment; inlineAttrs?: string; } } export declare function Attributes>(Base: TBase): (abstract new (...args: any[]) => { _continue: number | false; reset(): void; _newGroup(parent: StackItem | undefined, copyAttrs: boolean): StackItem; continue(): void; break(): void; setAlignment(align: Alignment): void; alignment(): Alignment; setFontFamily(family: string): void; setFontWeight(weight: string): void; setFontShape(shape: string): void; setFontSize(size: string): void; setTextDecoration(decoration: string): void; _setAttribute(attr: keyof TextAttributes, value: string): void; _inlineAttributes(): string; _activeAttributeValue(attr: keyof TextAttributes): string | undefined; _stack: import('../util/stack.ts').default; _groups: import('../util/stack.ts').default; enterGroup(copyAttrs?: boolean): void; exitGroup(): void; startBalanced(): void; endBalanced(): number; isBalanced(): boolean; _options: import('../options.ts').Options; _uid: number; get options(): import('../options.ts').Options; nextId(): number; round(num: number): number; _errorFn: (e: string) => never; setErrorFn(fn: (msg: string) => never): void; error(e: string): never; _rangeFn: () => import('./core.ts').SourceRange; setRangeFn(fn: () => import('./core.ts').SourceRange): void; offset(): number; }) & TBase; export type AttributesAPI = InstanceType>;