import { m3Shape, spacing } from './proulr-theme'; export const CHROME_HORIZONTAL_INSET = spacing.md; export const CHROME_VERTICAL_GAP = spacing.sm; export const CHROME_PILL_RADIUS = m3Shape.cornerFull; export const HEADER_PILL_ROW_HEIGHT = 56; export const HEADER_SLOT_GAP = spacing.md; export const HEADER_SLOT_ROW_HEIGHT = 56; export const FLOATING_TAB_BAR_HEIGHT = 60; export const CHROME_CONTENT_TOP_GAP = spacing.sm; export const CHROME_SCROLL_BOTTOM_EXTRA = spacing.sm; export const CHROME_SCROLL_FADE_EXTRA = 32; export const CHROME_SCROLL_FADE_Z_BEHIND_CHROME = 1; export const CHROME_SCROLL_FADE_Z_ABOVE_CONTENT = 5; export const CHROME_PILL_Z_INDEX = 10; export const CHROME_DRAWER_OVERLAY_Z_INDEX = 30; export const CHROME_DRAWER_Z_INDEX = 31; type HeaderChromeOptions = { hasSlot?: boolean; searchOpen?: boolean; }; export function estimateHeaderChromeHeight( topInset: number, options: boolean | HeaderChromeOptions = false, ): number { const { hasSlot = false, searchOpen = false } = typeof options === 'boolean' ? { hasSlot: options } : options; const showsSlot = hasSlot && !searchOpen; const slotRow = showsSlot ? HEADER_SLOT_GAP + HEADER_SLOT_ROW_HEIGHT : 0; return topInset + CHROME_VERTICAL_GAP + HEADER_PILL_ROW_HEIGHT + slotRow; } export function estimateTabBarChromeHeight(bottomInset: number): number { return bottomInset + CHROME_VERTICAL_GAP + FLOATING_TAB_BAR_HEIGHT; } /** Mesma área reservada que a tab bar — footer flutuante com CTA primário. */ export function estimateChromeFooterActionHeight(bottomInset: number): number { return estimateTabBarChromeHeight(bottomInset); }