//#endregion //#region src/dataTypes.d.ts type Optional = T | undefined; type Nullable = T | null; //#endregion //#region src/geometry/BoundingRect.d.ts /** * An element's axis-aligned bounding box in viewport pixels — `x`/`y` is the * top-left corner, matching the shape of `DOMRect`/`getBoundingClientRect()`. */ interface BoundingRect { x: number; y: number; width: number; height: number; } //#endregion //#region src/geometry/Point.d.ts /** * A 2D coordinate, in pixels, relative to the viewport — the shape used for * drag deltas and other point-based interactions (see {@link PointerActions.drag}). */ interface Point { x: number; y: number; } //#endregion //#region src/interactor/CssProperty.d.ts /** * Supported CSS Properties */ type CssProperty = Exclude; //#endregion //#region src/interactor/EnterTextOption.d.ts interface EnterTextOption { /** * Append text to the target, default to false */ append: boolean; } //#endregion //#region src/interactor/FocusOption.d.ts interface BlurOption {} interface FocusOption {} //#endregion //#region src/drivers/WaitForOption.d.ts type WaitForCondition = 'attached' | 'visible' | 'detached' | 'hidden'; interface WaitForOption { /** * The condition to wait for the component to reach * 'attached' - the component is attached to the DOM * 'detached' - the component is not attached to the DOM * 'visible' - the component is attached to the DOM and visible * 'hidden' - the component is attached to the DOM but not visible * @default 'attached' */ condition: WaitForCondition; /** * The number of milliseconds to wait before timing out * @default 30000 */ timeoutMs: number; /** * Whether to log debug information during the wait operation. * When enabled, logs each probe's value and whether the condition was met. * @default false */ debug: boolean; } declare const defaultWaitForOption: Readonly; //#endregion //#region src/locators/LocatorRelativePosition.d.ts /** * Possible relative positions for a locator in relation to the base element. * * - `'Root'` — resolve from the document root, ignoring the parent context. * - `'Descendant'` — anywhere beneath the parent (CSS descendant combinator, * a space). The default for most builders (`byChecked` is the exception — it * defaults to `'Same'` so it composes onto the input it matches). * - `'Same'` — the same element as the parent (compound onto it, no combinator). * - `'Child'` — a direct child of the parent (CSS child combinator, `>`), so a * nested descendant with the same selector is not matched. Expressible through * the locator model rather than only via a raw `byCssSelector` escape hatch. The * combinator is emitted for you, so the selector fragment must NOT itself start * with `>` (pass `byCssSelector('.item', 'Child')`, not * `byCssSelector('> .item', 'Child')`, which would double the combinator). */ type LocatorRelativePosition = 'Root' | 'Descendant' | 'Same' | 'Child'; //#endregion //#region src/locators/PartLocator.d.ts /** * How to find an element: always a chain of {@link CssLocator}s, reduced to * **one CSS selector** via `locatorUtil.toCssSelector`, which the interactor * runs against the DOM. A locator built by a single `by*` builder (e.g. * `byDataTestId('submit')`) is simply a one-element chain — there is no * separate "bare locator" shape to normalize away. An empty chain (`[]`) is * also valid: it is the engine-root locator, and `toCssSelector` reduces it to * the portable document-root selector rather than throwing (see #1048). * * **1.0 boundary — CSS only.** The locator model is deliberately closed to CSS: * every builder (`byRole`, `byAriaLabel`, `byAttribute`, `byCssSelector`, …) * emits a CSS fragment, same-element matchers compose via {@link * locatorUtil.and}, and `byCssSelector` is the raw-CSS escape hatch. XPath, * text, and computed-ARIA-name engines are out of scope — see * [ADR-008](https://github.com/atomic-testing/atomic-testing/blob/main/agent-docs/adr/008-css-dom-only-locator-boundary.md). * * **2.0 reshape (#1058).** `PartLocator` used to be `CssLocator | CssLocator[]`, * forcing an `isChain`/`toChain` normalization step at every consumer. It is * now always `CssLocator[]`, so every builder returns a chain and every * consumer can index/slice/concat it directly — see * [ADR-017](https://github.com/atomic-testing/atomic-testing/blob/main/agent-docs/adr/017-part-locator-chain-reshape.md). * * **Readonly.** A driver hands its own locator out by reference, so a mutable * array would let a caller's `push` permanently corrupt the driver. Every * `locatorUtil` operation is already non-mutating (`concat`/`map`/`slice`), so * this costs nothing today — and `readonly T[]` is not assignable to `T[]`, so * tightening it after the 1.0 tag would be a major. */ type PartLocator = readonly CssLocator[]; //#endregion //#region src/locators/byAriaLabel.d.ts type ByAriaLabelSource = { _id: 'byAriaLabel'; value: string; relative: LocatorRelativePosition; }; /** * Locate elements by the verbatim value of their `aria-label` attribute. * * This matches the literal `aria-label` attribute only — it does NOT resolve the * computed accessible name (from `aria-labelledby`, an associated `