import { type ReactNode } from "react"; import { type GestureResponderEvent } from "react-native"; import { type ColorTokens, type StyleProp, type TextStyle, type LayoutStyle } from "../../style/index.js"; export interface BreadcrumbRipple { color: string; borderless: boolean; } export interface BreadcrumbSkin { /** A muted ancestor link (size / line-height / weight / tracking + color); `subtle` the quieter trail's. */ link: (tokens: ColorTokens, subtle?: boolean) => TextStyle; /** The current page: emphasized foreground text, not a link; `subtle` the quieter trail's. */ current: (tokens: ColorTokens, subtle?: boolean) => TextStyle; /** The divider glyph, quieter than the labels so it reads as a path divider. */ separator: (tokens: ColorTokens) => TextStyle; /** * Android ripple for a pressed link/home crumb, or null on iOS/web (where the * opacity dim carries the press feedback instead). */ ripple: ((tokens: ColorTokens) => BreadcrumbRipple) | null; /** * The opacity a pressed link/home crumb dims to on iOS/web, or null on Android * (where the ripple carries the press feedback instead). */ pressedOpacity: number | null; /** The home-icon glyph size (kept small to sit on the text baseline). */ homeIconSize: number; /** The chevron separator's glyph size (the slash and dot are text in the separator's type). */ separatorIconSize: number; /** The space between a crumb and the separators beside it. */ gap: number; /** * Minimum effective touch target for the link/home crumbs (HIG 44pt on iOS, * Material 48dp on Android). The shell pads the text-sized Pressables out to * this with hitSlop, so the tap area meets the platform minimum without * changing the visual layout. Inert for pointer input on web. */ minTarget: number; } export interface BreadcrumbProps { /** * The trail, ancestor-first. The last entry renders as the current page (plain * emphasized text); the rest render as muted links. */ items?: string[]; chevron?: boolean; slash?: boolean; dot?: boolean; /** * Leading affordance: prepend a muted home-icon crumb (aria-labelled "Home") * before the trail, followed by the separator. Off by default. */ homeIcon?: boolean; /** * A quieter trail for a page header: the ancestors (and the home glyph) in the subtle * ink and the current page at the regular weight, so the trail recedes under the title. */ subtle?: boolean; /** * Collapse a long trail: when the trail has more than `maxItems` crumbs, keep * the first crumb and the last `maxItems - 1` (so `maxItems` crumbs in all), and * replace the middle with a single "…" crumb, so a deep path stays on one * scannable line. Takes effect from 2. */ maxItems?: number; /** Fired with the crumb label and its index when a link (non-last) is pressed. */ onItemPress?: (item: string, index: number) => void; /** E2E hook forwarded to the root element. */ testID?: string; /** Composition within a parent only, never a restyle hook and never a width: the parent layout container provides the bounds. */ style?: LayoutStyle; } type Separator = "chevron" | "slash" | "dot"; export declare function separatorOf(p: BreadcrumbProps): Separator; export interface BreadcrumbItemProps { children?: ReactNode; /** Render as the current page: emphasized foreground text, non-interactive. */ current?: boolean; /** The quieter trail's type (see Breadcrumb's `subtle`). */ subtle?: boolean; onPress?: (event: GestureResponderEvent) => void; /** Outer layout composition only (width/flex within a parent), never a restyle hook. */ style?: StyleProp; } /** Build a Breadcrumb (and its matching BreadcrumbItem) from a platform skin. */ export declare function createBreadcrumb(skin: BreadcrumbSkin): { Breadcrumb: (props: BreadcrumbProps) => import("react").JSX.Element; BreadcrumbItem: (props: BreadcrumbItemProps) => import("react").JSX.Element | null; }; export {}; //# sourceMappingURL=breadcrumb.shared.d.ts.map