export type AnchorSelector = string | string[]; export type PopoverSide = 'top' | 'right' | 'bottom' | 'left'; export type TourAnchor = { id: string; selector: AnchorSelector; intent?: string; needsAddedTo?: string; click?: boolean; resolveAtHighlight?: boolean; triggerAnchor?: string; panelSelector?: string; closeSelector?: string; guardClickPanel?: string; popoverSide?: PopoverSide; }; export type LocalizedString = string | Record; export type TourStepCopy = { title: string; body: string; }; export type TourStepStructural = { anchor?: string; }; export type TourStep = { title: string; body: string; anchor?: string; }; export type TourWorkflow = { id: string; title: string; matchRoute: string; steps: TourStep[]; }; export type TourWorkflowRaw = { id: string; title: LocalizedString; matchRoute: string; steps: TourStepStructural[] | TourStep[]; copy?: Record; }; export type KnowledgeBase = { title: string; module: string; anchors: TourAnchor[]; workflows: TourWorkflow[]; }; export type KnowledgeBaseRaw = { title: LocalizedString; module: string; anchors: TourAnchor[]; workflows: TourWorkflowRaw[]; }; export type TourButtonLabels = { next: string; previous: string; done: string; }; export type ResolveKnowledgeBaseUrl = () => string | Promise; export type UseDriverTourOptions = { resolveKnowledgeBaseUrl: ResolveKnowledgeBaseUrl; reloadDeps?: readonly unknown[]; anchorFallbacks?: Record; getMatchPathnames?: (pathname: string) => string[]; waitForSelector?: string; };