import { type WidthKey } from "./tokens.js"; /** * One axis of a component's semantic props: the members in precedence order (each * beats every member after it), what each resolves to, and the fallback when none is * set. */ export interface Axis { /** The members, highest precedence first. */ readonly members: readonly M[]; /** What each member resolves to. */ readonly values: Readonly>; /** What the axis resolves to when the props set no member. */ readonly fallback: D; } /** The members of an axis. */ export type MemberOf = A extends Axis ? M : never; /** Everything an axis can resolve to: a member's value or the fallback. */ export type ResolvedOf = A extends Axis ? V | D : never; /** The keys of `P` whose values are booleans: the only props an axis may name. */ export type BooleanProps

= { [K in keyof P]-?: [NonNullable] extends [never] ? never : [NonNullable] extends [boolean] ? K : never; }[keyof P] & string; /** An axis whose members resolve to themselves, with no fallback (`null`). */ export declare function axis(members: readonly M[]): Axis; /** An axis whose members resolve to themselves, and `fallback` when none is set. */ export declare function axis(members: readonly M[], fallback: D): Axis; /** An axis whose members resolve to their values in `values`, declared in precedence order, with no fallback (`null`). */ export declare function axis>(values: R): Axis; /** An axis whose members resolve to their values in `values`, declared in precedence order, and `fallback` when none is set. */ export declare function axis, const D>(values: R, fallback: D): Axis; /** * Resolve an axis against a component's props: the value of the highest-precedence * member the props set (a member counts as set when its prop is truthy, as an `if` * reads it), or the axis's fallback when they set none. Every member must be a * boolean prop of the props type, so a table that names a prop the component does * not declare fails to compile where the component resolves it. */ export declare function pick

, V, D>(a: Axis, p: P): V | D; /** * The measure axis (`MeasureProps` in sizing.ts): the steps of the width scale, * narrowest first, so the narrowest step passed wins and a stray wider step never * widens a deliberate narrow one. The members come from `widths` itself, in its * declaration order; no step is listed twice. */ export declare const MEASURE: Axis; //# sourceMappingURL=axis.d.ts.map