/******************************************************************************** * Copyright (c) 2026 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * https://www.eclipse.org/legal/epl-2.0 * * SPDX-License-Identifier: EPL-2.0 ********************************************************************************/ import { FunctionComponent, ReactNode, RefObject } from 'react'; /** * Tracks whether a page-level search bar (e.g. the home hero) is active — the * nav bar derives its own field's visibility from it. */ export interface PageSearchBarValue { hasPageSearchBar: boolean; isPageSearchBarActive: () => boolean; registerPageSearchBar: () => () => void; } export declare function usePageSearchBar(): PageSearchBarValue; /** * Marks the calling component as the page's search bar, so the nav bar hides its * own field and hands focus requests over. Registered while mounted, or — when * `visibilityRef` is given — only while that element is in the viewport. Returns * whether the bar is currently registered; callers gate focus handling and their * view-transition name on it. */ export declare function useRegisterPageSearchBar(visibilityRef?: RefObject): boolean; export declare const PageSearchBarProvider: FunctionComponent<{ children: ReactNode; }>; //# sourceMappingURL=page-search-bar-context.d.ts.map