'use client'; import * as _$react_jsx_runtime0 from "react/jsx-runtime"; import { CSSProperties, ElementType, MouseEventHandler, ReactElement, ReactNode, RefObject, SVGAttributes } from "react"; import { AutoUpdateOptions, FlipOptions, Middleware, MiddlewareData, ShiftOptions, Strategy } from "@floating-ui/react-dom"; //#region src/literals/index.d.ts declare const ACTIONS: { readonly INIT: "init"; readonly START: "start"; readonly STOP: "stop"; readonly RESET: "reset"; readonly PREV: "prev"; readonly NEXT: "next"; readonly GO: "go"; readonly CLOSE: "close"; readonly SKIP: "skip"; readonly REPLAY: "replay"; readonly UPDATE: "update"; readonly COMPLETE: "complete"; }; declare const EVENTS: { readonly TOUR_START: "tour:start"; readonly STEP_BEFORE_HOOK: "step:before_hook"; readonly STEP_BEFORE: "step:before"; readonly SCROLL_START: "scroll:start"; readonly SCROLL_END: "scroll:end"; readonly BEACON: "beacon"; readonly TOOLTIP: "tooltip"; readonly STEP_AFTER: "step:after"; readonly STEP_AFTER_HOOK: "step:after_hook"; readonly TOUR_END: "tour:end"; readonly TOUR_STATUS: "tour:status"; readonly TARGET_NOT_FOUND: "error:target_not_found"; readonly ERROR: "error"; }; declare const LIFECYCLE: { readonly INIT: "init"; readonly READY: "ready"; readonly BEACON_BEFORE: "beacon_before"; readonly BEACON: "beacon"; readonly TOOLTIP_BEFORE: "tooltip_before"; readonly TOOLTIP: "tooltip"; readonly COMPLETE: "complete"; }; declare const ORIGIN: { readonly BUTTON_BACK: "button_back"; readonly BUTTON_CLOSE: "button_close"; readonly BUTTON_PRIMARY: "button_primary"; readonly BUTTON_SKIP: "button_skip"; readonly KEYBOARD: "keyboard"; readonly OVERLAY: "overlay"; }; declare const STATUS: { readonly IDLE: "idle"; readonly READY: "ready"; readonly WAITING: "waiting"; readonly RUNNING: "running"; readonly PAUSED: "paused"; readonly SKIPPED: "skipped"; readonly FINISHED: "finished"; }; declare const PORTAL_ELEMENT_ID = "react-joyride-portal"; //#endregion //#region src/types/state.d.ts /** Methods to programmatically control the tour. */ type Controls = { /** Close the current step and advance to the next one. */close: (origin?: Origin | null) => void; /** Jump to a specific step by index. */ go: (nextIndex: number) => void; /** Get the current tour state. */ info: () => State; /** Advance to the next step. */ next: (origin?: Origin | null) => void; /** Open the tooltip for the current step. */ open: () => void; /** Go back to the previous step. */ prev: (origin?: Origin | null) => void; /** Replay the current step. Re-runs `before` and `after` hooks and re-emits step lifecycle events. */ replay: (origin?: Origin | null) => void; /** Reset the tour. Optionally restart from the beginning. */ reset: (restart?: boolean) => void; /** Skip the tour entirely. */ skip: (origin?: Extract | null) => void; /** Start the tour at an optional step index. */ start: (nextIndex?: number) => void; /** Stop the tour. Optionally advance to the next step before stopping. */ stop: (advance?: boolean) => void; }; /** The internal tour state. */ type State = { /** The action that triggered the state update. */action: Actions; /** Whether the tour is in controlled mode (using `stepIndex`). */ controlled: boolean; /** The current step index. */ index: number; /** The step's rendering phase. */ lifecycle: Lifecycle; /** The UI element that triggered the last action. */ origin: Origin | null; /** Whether the tour is scrolling to a target. */ scrolling: boolean; /** The total number of steps. */ size: number; /** The tour's current status. */ status: Status; /** Whether the tour is blocked waiting for a `before` hook or target to appear. */ waiting: boolean; }; //#endregion //#region src/types/utilities.d.ts /** Generic record type. */ type AnyObject = Record; /** Excludes arrays, functions, Map, and Set from a record type. */ type NarrowPlainObject> = Exclude | Function | Map | Set>; /** Makes all properties optional, with one level of depth for nested objects. */ type PartialDeep = { [K in keyof T]?: T[K] extends object ? Partial : T[K] }; /** Generic record type with unknown values. */ type PlainObject = Record; /** Makes specific keys required while keeping others unchanged. */ type SetRequired = Omit & Required>; /** Flattens intersection types for better IDE display. */ type Simplify = { [K in keyof T]: T[K] } & {}; /** Extracts a union of all values from an object type. */ type ValueOf = T[keyof T]; //#endregion //#region src/types/components.d.ts /** Props passed to a custom arrow component. */ type ArrowRenderProps = { /** Width of the arrow base in pixels. */base: number; /** The computed placement of the tooltip. */ placement: Placement; /** Height of the arrow in pixels. */ size: number; }; /** Props passed to a custom beacon component. * Must render a span since it's placed inside a `