/** * Two-way binding between a text input and a value that lives in the URL. * * Typing updates a local draft immediately (so the field stays responsive) and * is written to the URL once the user pauses. An external change to the URL — * browser back/forward, "Clear all", a context switch — replaces the draft. * * The `claimed` ref is what keeps those two directions from fighting: before a * debounced write goes out we record the value we are about to put in the URL, * so when it comes back as `urlValue` the sync-down effect recognises it as our * own echo and leaves the draft alone. Without it, a write landing while the * user is still typing would rewind the field to the value that just went out. * * The callback is held in a ref so that a caller re-creating it on every render * cannot keep restarting the timer (which would stop the write ever landing). * * `commit` may return the value it actually wrote, which matters when the * caller normalizes: a draft of only spaces serializes to nothing, so the URL * does not change, so there is no new `urlValue` for the sync-down effect to * echo back — that effect only runs when `urlValue` itself changes. Without a * returned value the draft would stay un-normalized forever while the parsed * value sits at the normalized one, leaving the two permanently unequal. On * this page that difference is `searchPending`, which disables selection and * every bulk action, so a stray space would lock those controls until the * reviewer edited the field again. * * @param urlValue - current value as parsed from the URL * @param commit - writes the debounced value back to the URL; may return the * canonical value it wrote, when that differs from what it was given * @param delayMs - idle time before writing * @returns `[draft, setDraft, resetDraft]` for the input element */ export declare function useDebouncedUrlText(urlValue: string, commit: (value: string) => string | void, delayMs?: number): [string, (value: string) => void, (nextValue?: string) => void];