import { type Accessor } from "solid-js"; /** * Task completion status bubbled through the progress tree. * * - `indeterminate` — the `value` prop is `null`; no measurable progress * - `progressing` — `0 ≤ value < max` * - `complete` — `value === max` */ export type ProgressStatus = "indeterminate" | "progressing" | "complete"; export interface ProgressRootState { /** The current task status. */ status: ProgressStatus; } /** * The value handed down by `` to its children. * * Every reactive entry is an `Accessor` so that consumers pull the latest * value on demand — matching the no-top-level-reactive-reads rule from * Solid 2 RFC 01. */ export interface ProgressRootContextValue { /** Formatted value string (empty string when `value` is `null`). */ formattedValue: Accessor; /** The maximum value. */ max: Accessor; /** The minimum value. */ min: Accessor; /** The current value (`null` = indeterminate). */ value: Accessor; /** Current root state — supplies shared state to every part. */ state: Accessor; /** Current status — same info as `state().status`, here for convenience. */ status: Accessor; /** * Register a label id so the root can wire `aria-labelledby`. Called by * `` on mount (passes the id) and on cleanup (passes * `undefined`). Safe to invoke from inside owned scope — the underlying * signal opts into `ownedWrite` because it's pure internal plumbing. */ setLabelId: (id: string | undefined) => void; /** Current registered label id (if any). */ labelId: Accessor; } /** * Progress root context. `createContext(null)` + `== null` sentinel * — Solid 2's `useContext` throws `ContextNotFoundError` when * the default is `undefined`, which would shadow the intended Base UI error * message below. */ export declare const ProgressRootContext: import("solid-js").Context; /** * Read the `` context. Throws a descriptive error if the * caller forgot to wrap their subtree in `` — matches Base * UI React. */ export declare function useProgressRootContext(): ProgressRootContextValue; //# sourceMappingURL=progress-root-context.d.ts.map