import { type ReactElement, type ReactNode } from "react"; import { type AppSize, type AppSizeQueries } from "./appSize.js"; /** * **Note**: The app size object returned by this hook will **not** be equal * between renders. * * @example Simple Example * ```tsx * import { useAppSize } from "@react-md/core/media-queries/AppSizeProvider"; * * function Example() { * const { isPhone, isTablet, isDesktop, isLargeDesktop, isLandscape } = * useAppSize() * * // do something based on the app size * return null; * } * ``` * * @returns the current app size. * @throws "The `AppSizeProvider` has not been mounted." */ export declare function useAppSize(): Readonly; /** * @since 6.0.0 Renamed from `AppSizeListenerProps`. * @since 6.0.0 Removed the `onChange` prop * @since 6.0.0 Renamed `defaultSize` to `ssrSize` * @since 6.4.0 Deprecated the `AppSizeQueries` in favor * of the `MEDIA_QUERY_CONFIG` */ export interface AppSizeProviderProps extends AppSizeQueries { /** * @defaultValue `DEFAULT_APP_SIZE` * @see {@link DEFAULT_APP_SIZE} * @since 6.0.0 */ ssrSize?: Readonly; children: ReactNode; } /** * **Client Component** * * This component should be mounted near the root of your app to determine the * current app size based on different media queries. * * @see {@link https://react-md.dev/components/core-providers | CoreProviders Demos} * @see {@link https://react-md.dev/components/app-size-provider | AppSizeProvider Demos} * @since 6.0.0 Renamed from `AppSizeListener` */ export declare function AppSizeProvider(props: AppSizeProviderProps): ReactElement;