import { MaybeGetter } from './utilities/callOrGet.js'; import { AttributeSpec } from './Attribute.js'; /** * Configuration for Mark extensions. * @template Options - Type for mark options * @template Storage - Type for mark storage * @template Attrs - Type for mark attributes (optional, enables typed addAttributes) */ export interface MarkConfig = Record, Storage extends Record = Record, Attrs extends Record = Record> { /** The unique name of the mark */ name: string; /** Whether this mark is from an external package */ isExternal?: boolean; /** Function to define mark options */ addOptions?: MaybeGetter; /** Function to define mark storage */ addStorage?: MaybeGetter; /** * Function or object to add attributes to the mark. * When Attrs generic is provided, attribute keys are validated against it. */ addAttributes?: MaybeGetter<{ [K in keyof Attrs]?: Partial; }>; /** Additional config fields - use with caution */ [key: string]: unknown; } /** * Mark class is used to create Mark extensions. * @template Options - Type for mark options * @template Storage - Type for mark storage * @template Attrs - Type for mark attributes (enables typed attribute access) */ export declare class Mark = Record, Storage extends Record = Record, Attrs extends Record = Record> { type: "mark"; name: string; options: Options; storage: Storage; isExternal: boolean; config: MarkConfig; /** * Type hint for the attributes this mark uses. * Not used at runtime, but enables type inference. */ readonly __attrsType: Attrs; constructor(config: MarkConfig); /** * Static method for creating Mark extension. * @param config Configuration for the mark. */ static create = Record, S extends Record = Record, A extends Record = Record>(config: MarkConfig): Mark; } //# sourceMappingURL=Mark.d.ts.map