import { type Accessor } from "solid-js"; /** * The value handed down by `` to its descendants. * * Solid 2 adaptations from Base UI React's `LabelableContext`: * * - All reactive values are exposed as `Accessor` so callers pull on demand * and don't trip the top-level reactive read rule (RFC 01). * - The single `labelId` from React is generalized to a registry keyed by a * per-consumer source `symbol`. Multiple labels can register into the same * provider — `getLabelIds()` returns them in registration order, which * `useAriaLabelledBy` joins with spaces. This is the multi-label superset of * `use-registered-label-id.ts` (which progress/meter still use for their * simpler single-id case). * - Setters are plain functions that may be called from owned scope on setup * or from cleanup. The underlying signals opt into `ownedWrite` where * appropriate so those writes don't trip `SIGNAL_WRITE_IN_OWNED_SCOPE`. * - `controlId` follows React's semantics: explicit `null` means "no * association" (implicit label), `undefined` means "no registration yet", * any string is the resolved control id. */ export interface LabelableContextValue { /** * The `id` of the labelable (control) element. * `null` when the association is implicit (control wrapped by a native * `