import { Extension, StateField } from '@codemirror/state'; import { WidgetType } from '@codemirror/view'; import { DiffData, LineMapping } from '../types'; import { BlockTreeIndex } from '../utils/block-index'; /** Badge data for a specific line */ export interface BadgeData { lineNumber: number; position: number; breaking: number; nonBreaking: number; annotation: number; unclassified: number; total: number; blockId: string; } /** Effect to set badge data */ export declare const setBadgeDataEffect: import('@codemirror/state').StateEffectType; /** State field for badge data */ export declare const badgeDataField: StateField; /** Widget for displaying change badges */ declare class ChangeBadgeWidget extends WidgetType { readonly breaking: number; readonly nonBreaking: number; readonly annotation: number; readonly unclassified: number; readonly blockId: string; constructor(breaking: number, nonBreaking: number, annotation: number, unclassified: number, blockId: string); get total(): number; toDOM(): HTMLElement; private createBadge; eq(other: WidgetType): boolean; ignoreEvent(): boolean; } /** * Build badge data from diff data and line mappings. * * When a treeIndex and blockLineRanges are provided, uses the pre-computed * index for O(C) where C = number of containers. Otherwise falls back to * recursively walking the block tree. */ export declare function buildBadgeData(doc: { line: (n: number) => { from: number; to: number; }; readonly lines: number; }, diffData: DiffData, lineMap: LineMapping[], _side: "before" | "after" | "unified", treeIndex?: BlockTreeIndex, blockLineRanges?: Map): BadgeData[]; /** Theme for change badges */ export declare const changeBadgesTheme: Extension; /** Create the change badges extension */ export declare function changeBadges(): Extension; export { ChangeBadgeWidget };