import type { Detection } from "#types/detections"; import type { LabelBackgroundStyle, LabelDrawInstruction, LabelOffsetStyle, LabelStyle, LabelStyleContext, LabelTextStyle } from "#types/label-style"; import { LabelPlacement } from "#types/label-style"; import { LabelVisibilityMode } from "#types/label-style"; import type { DetectionStylePredicate, DetectionStyleValue } from "#types/style"; export interface BaseLabelStyleOptions { /** * Label background style. Pass a resolver for per-class label backgrounds. */ readonly background?: DetectionStyleValue | undefined, LabelStyleContext>; /** * Include confidence percentage in the default label text. */ readonly includeConfidence?: boolean; /** * Label offset in media pixels. Pass a resolver for per-detection label * placement. */ readonly offset?: DetectionStyleValue; /** * Compatibility shorthand for `offset: { y }`. * * Prefer `offset` for new code. */ readonly offsetY?: number; /** * Label placement relative to the detection rectangle. */ readonly placement?: DetectionStyleValue; /** * Custom label text. Return undefined to fall back to the default class label. */ readonly text?: DetectionStyleValue; /** * Label text style. Pass a resolver for per-class text colors or sizes. */ readonly textStyle?: DetectionStyleValue | undefined, LabelStyleContext>; /** * Return false to skip rendering a detection in this label style. */ readonly shouldRender?: DetectionStylePredicate; readonly visibilityMode?: LabelVisibilityMode; } /** * Default label style. * * Resolves labels from `className`, `metadata.label`, or a custom text * resolver, optionally including confidence. */ export declare class BaseLabelStyle implements LabelStyle { private readonly includeConfidence; private readonly offsetY; private readonly options; constructor(options?: BaseLabelStyleOptions); resolve(detection: Detection, context: LabelStyleContext): LabelDrawInstruction | undefined; private resolveBackground; private resolveTextStyle; private resolveOffset; private resolvePlacement; } //# sourceMappingURL=label-style.d.ts.map