import type { DesignScreenInteraction } from './designImport.js'; export type HeldPseudoState = 'hover' | 'focus' | 'focus-visible' | 'active'; /** The pseudo gestures still held after the complete recipe has run. */ export declare function heldPseudoInteractionsFromRecipe(interactions: readonly DesignScreenInteraction[]): DesignScreenInteraction[]; /** True when the interaction is a gesture the frozen preview can hold via CSS. */ export declare function isHeldPseudoInteraction(interaction: DesignScreenInteraction): boolean; /** * Why these steps cannot be held on the given frozen document, or an empty * list when client-side holding reproduces them faithfully. * * A target stamped with script-driven pseudo events (PSEUDO_EVENT_ATTRIBUTE) * answers the gesture in JavaScript, which a frozen document cannot replay — * such steps need the ordinary walk. A missing non-optional target also * blocks: the live app may still render it, so the walk keeps that chance. */ export declare function heldPseudoHoldBlockers(root: ParentNode, steps: readonly DesignScreenInteraction[]): string[]; /** * The recipe a preview must hold: the page's own interactions plus any * presentation-layer held gestures (the pseudo fast path). The held steps * come last, so they override the recipe's terminal gestures exactly as a * rewritten recipe would. */ export declare function presentationInteractions(page: { interactions?: readonly DesignScreenInteraction[]; heldPseudoInteractions?: readonly DesignScreenInteraction[]; }): readonly DesignScreenInteraction[] | undefined; export declare function heldPseudoStatesFromInteractions(interactions: readonly DesignScreenInteraction[]): HeldPseudoState[]; /** * Converts pseudo-class selectors into stable attribute selectors while * leaving comments and quoted CSS values untouched. */ export declare function materializeHeldPseudoCss(cssText: string, states: readonly HeldPseudoState[]): string; export interface HeldPseudoMaterialization { cleanup(): void; issues: string[]; } /** Applies the stable selector attributes that correspond to held gestures. */ export declare function applyHeldPseudoAttributes(root: ParentNode, interactions: readonly DesignScreenInteraction[]): HeldPseudoMaterialization; /** Materializes held pseudo classes in a live same-origin preview document. */ export declare function materializeHeldPseudoDocument(document: Document, interactions: readonly DesignScreenInteraction[]): HeldPseudoMaterialization;