import { OverflowContext } from "../../composables/createOverflow/index.mjs"; import { BreadcrumbsContext } from "../../composables/createBreadcrumbs/index.mjs"; import { GroupContext, GroupTicket } from "../../composables/createGroup/index.mjs"; import { Ref, ShallowRef } from "vue"; //#region src/components/Breadcrumbs/types.d.ts type BreadcrumbsTicketType = 'item' | 'divider' | 'ellipsis' | 'activator'; interface BreadcrumbsTicket extends GroupTicket { /** Type of breadcrumb element */ type: BreadcrumbsTicketType; } interface BreadcrumbsRootContext { /** Breadcrumbs composable context for navigation and state */ breadcrumbs: BreadcrumbsContext; /** Group context for managing item registration and selection (overflow) */ group: GroupContext; /** Overflow context for width measurement and capacity calculation */ overflow: OverflowContext; /** Default divider character/text */ divider: Ref; /** Default ellipsis character/text */ ellipsis: Ref; /** Whether items are being truncated */ isOverflowing: Readonly>; /** Whether collapsed items are revealed via the ellipsis disclosure */ expanded: ShallowRef; /** Whether a BreadcrumbsActivator is registered in the trail */ hasActivator: Readonly>; /** Number of breadcrumb items currently hidden by truncation */ hiddenCount: Readonly>; /** Measured ellipsis width in pixels (set by BreadcrumbsEllipsis) */ ellipsisWidth: ShallowRef; /** * Record a part's width under its index — the first item and first divider go to * reserved space, the rest to the overflow pool. Pass the element to measure it, a * number to record a width without reading the DOM, or `undefined` to clear. Returns * the width now recorded. */ measureElement: (index: number, type: 'item' | 'divider', source?: Element | number) => number | undefined; } //#endregion export { BreadcrumbsRootContext, BreadcrumbsTicket, BreadcrumbsTicketType };