/*! * Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved. * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and limitations under the License. */ export type UseFullscreenArgs = { /** * The id from `useFullscreenId`, shared by the `FullscreenRegion` and every `FullscreenButton` that controls it. */ fullscreenId: string; }; export type UseFullscreenResult = { /** * Put this id on top of the page's fullscreen stack, so its region is the one shown. */ enterFullscreen: () => void; /** * Take this id out of the stack, wherever it is. The region under it, if any, is shown again. */ exitFullscreen: () => void; /** * Where this id sits in the stack, from `0` at the bottom, or `-1` when it isn't in fullscreen. A region uses it to stack above the regions under it. */ fullscreenStackIndex: number; /** * `true` when **anything** on the page is in fullscreen, in any app. UI Shell reads this to hide its navigation and banners. */ hasActiveFullscreen: boolean; /** * `true` when this id is on **top** of the stack, so its region is the one the user sees and works in. Read this for focus, `inert`, and announcements. */ isFullscreen: boolean; /** * `true` when this id is **anywhere** in the stack, even covered by a region above it. Read this for what lasts until the id exits: the region staying fixed over the page, and its button reading as pressed. */ isInFullscreenStack: boolean; /** * Exit if this id is in the stack, otherwise enter. */ toggleFullscreen: () => void; }; /** * Read and change one fullscreen id's place on the page. * * The page's stack lives in the fullscreen mode host, which Unified UI Shell runs. Every hook opens its own subscription to it, so a change re-renders only the components whose values changed. Without a host on the page, the stack stays empty and entering does nothing. * * | Value | `true` when | Use it for | * | --- | --- | --- | * | `isFullscreen` | this id is on top of the stack | focus, `inert`, announcements | * | `isInFullscreenStack` | this id is anywhere in the stack | staying fixed, a pressed button | * | `hasActiveFullscreen` | anything on the page is in fullscreen | hiding the shell's chrome | * * @experimental The fullscreen API is in alpha and may change in a future release. */ export declare const useFullscreen: ({ fullscreenId, }: UseFullscreenArgs) => UseFullscreenResult; /** * `true` when anything on the page is in fullscreen, in any app. For page chrome, such as UI Shell's navigation, that hides while a region fills the screen. It re-renders only when that answer changes. * * @experimental The fullscreen API is in alpha and may change in a future release. */ export declare const useHasActiveFullscreen: () => boolean; //# sourceMappingURL=useFullscreen.d.ts.map