import { ComponentProps } from "react"; //#region src/review/text-mark.d.ts /** * One mark for words in running text: a search or find hit, a reader's own * highlight, a verdict under a claim. Every surface that points at words * draws them this way, so a found word, a note and a finding differ only in * hue and line, never in shape. * * Marks stay inline with no padding or rounding: a mark over several lines or * inline runs is several boxes, and only a flat, cloned background reads as * one continuous mark. The hue travels as the `--text-mark` custom property, * so each variant and state is spelled once and every tone reuses it. */ export declare const TextMark: ({ variant, tone, state, weight, className, ...props }: TextMarkProps) => import("react").JSX.Element; export type TextMarkVariant = "fill" | "underline" | "dotted" | "wavy" | "strike"; export type TextMarkTone = "warning" | "success" | "destructive" | "muted" | "option-yellow" | "option-green" | "option-sky" | "option-violet" | "option-red" | "option-purple"; /** * `matched` is a line mark picked out by a filter: it gains a faint wash of * its hue. A fill mark is already a wash, so it looks the same at rest and * matched. `active` is the one mark being pointed at (the current find hit, * the selected claim): a stronger wash of the same hue and a ring of it. */ export type TextMarkState = "rest" | "matched" | "active"; /** Search hits read a touch heavier than the words around them. */ export type TextMarkWeight = "inherit" | "medium"; export type TextMarkOptions = { variant: TextMarkVariant; tone: TextMarkTone; state?: TextMarkState | undefined; weight?: TextMarkWeight | undefined; }; type TextMarkProps = ComponentProps<"mark"> & TextMarkOptions; /** The CSS value of each tone's hue. */ export declare const TEXT_MARK_TONE_COLOR: { readonly warning: "var(--warning)"; readonly success: "var(--success)"; readonly destructive: "var(--destructive)"; readonly muted: "var(--muted-foreground)"; readonly "option-yellow": "var(--option-yellow)"; readonly "option-green": "var(--option-green)"; readonly "option-sky": "var(--option-sky)"; readonly "option-violet": "var(--option-violet)"; readonly "option-red": "var(--option-red)"; readonly "option-purple": "var(--option-purple)"; }; /** How a found word is marked everywhere: readers, snippets, PDFs, tables. */ export declare const SEARCH_HIT_MARK: { readonly variant: "fill"; readonly tone: "warning"; readonly weight: "medium"; }; /** The classes of one mark, for markup that is not a `` (a claim * button, a PDF text-layer box, an element a DOM walker creates). */ export declare const textMarkClass: ({ variant, tone, state, weight }: TextMarkOptions) => string; /** * The classes of one mark drawn as an empty box over painted text (a PDF * page's canvas), where no text decoration can reach the words: a line * variant becomes the box's bottom edge (wavy reads as dashed) or, for a * strike, a rule through its middle; hue, wash and ring are the text mark's. */ export declare const textMarkBoxClass: ({ variant, tone, state }: Omit) => string; /** * The search-hit mark reached through a descendant selector, for markup that * arrives already highlighted (the search endpoints' `` snippets). * Spelled out because Tailwind emits only the classes it can read in the * source; `text-mark.test.ts` holds it to `textMarkClass(SEARCH_HIT_MARK)`. */ export declare const SEARCH_HIT_DESCENDANT_MARK_CLASS = "[&_mark]:box-decoration-clone [&_mark]:text-foreground [&_mark]:[--text-mark:var(--warning)] [&_mark]:bg-(--text-mark)/30 [&_mark]:dark:bg-(--text-mark)/20 [&_mark]:font-medium"; type TextMarkHighlightRuleOptions = { /** The registered `CSS.highlights` name. */ name: string; /** Defaults to a fill, the find mark. */ variant?: TextMarkVariant | undefined; tone: TextMarkTone; state: TextMarkState; }; /** * A mark for the CSS Custom Highlight API, for text a surface marks as ranges * rather than elements (a find over a reader, verdicts over painted document * pages). `::highlight()` takes colours and text decorations but no classes, * custom properties, offsets or rings, so the rule restates the variant's * line and the state's wash; the active range is told apart by its stronger * wash alone. */ export declare const textMarkHighlightRule: ({ name, variant, tone, state }: TextMarkHighlightRuleOptions) => string; //#endregion