import { type Accessor } from "solid-js"; import type { Orientation } from "../internals/types.js"; /** * Per-item metadata carried alongside a `` or `` * registration. `focusableWhenDisabled` is the only field — it drives the * `disabledIndices` projection on the composite root so arrow navigation can * skip items that cannot take focus. */ export interface ToolbarRootItemMetadata { focusableWhenDisabled: boolean; } /** * Value handed down by `` to descendant parts. * * Solid 2 adaptations from Base UI React's `ToolbarRootContext`: * * - Reactive slots are `Accessor` so children pull on demand without * tripping the top-level-reactive-read rule. * - `present` is `true` only when provided by a real ``. * Parts branch on it — `` tolerates being rendered * outside, and `` / `` throw (matching React). * * Note: React's `setItemMap` does NOT appear here. Each item already reports * its metadata via `useCompositeListItem({ metadata })`; the root captures the * sorted map from `` and derives `disabledIndices` * directly. See the header comment in `toolbar-root.tsx`. */ export interface ToolbarRootContextValue { /** Whether the whole toolbar ignores user interaction. */ disabled: Accessor; /** Navigation orientation. */ orientation: Accessor; /** Marker — `true` when provided by a real ``. */ readonly present: boolean; } /** * No-op sentinel used when parts are rendered outside a ``. * Children branch on `.present` to decide whether to throw. */ export declare const NOOP_TOOLBAR_ROOT_CONTEXT: ToolbarRootContextValue; export declare const ToolbarRootContext: import("solid-js").Context; export declare function useToolbarRootContext(optional: true): ToolbarRootContextValue; export declare function useToolbarRootContext(optional?: false): ToolbarRootContextValue; //# sourceMappingURL=toolbar-root-context.d.ts.map