import type { FieldListItemTyped } from '#blokkli-build/generated-types'; import type { StateProvider } from '#blokkli/editor/providers/state'; import type { ReadabilityProvider } from '#blokkli/editor/providers/readability'; import type { TextProvider } from '#blokkli/editor/providers/texts'; import type { MutatedField, Validation } from '#blokkli/editor/types/state'; import type { AnalyzeCategory, AnalyzeNode, AnalyzeResult, AnalyzeStatus } from '../types.js'; import { type TextElement } from './collectTextElements.js'; export declare class AnalyzerContext { readonly langcode: string; readonly interfaceLangcode: string; readonly providerRootElement: HTMLElement; private state; readonly $t: TextProvider; readonly signal: AbortSignal | undefined; readonly mutatedFields: Readonly; /** * Backend-reported validation violations for the current state. */ readonly violations: Readonly; /** * The readability provider. */ readonly readability: ReadabilityProvider; /** * The collected text elements. */ private textElements; constructor(langcode: string, interfaceLangcode: string, providerRootElement: HTMLElement, state: StateProvider, $t: TextProvider, signal: AbortSignal | undefined, readability: ReadabilityProvider); /** * Get the field list item for a block UUID. */ getFieldListItem(uuid: string): FieldListItemTyped | undefined; /** * Returns an array of all text elements inside the provider root element. * * A 'text element' is defined as the lowest block element that contains text. * For example, a structure like `

Foobar Test

` * would return as a single text element containing "Foobar Test". */ getTextElements(): Readonly; defineResult(id: string, title: string, category: AnalyzeCategory, description: string, status: AnalyzeStatus, nodes?: AnalyzeNode | AnalyzeNode[]): AnalyzeResult; }