/**
 * @file expandTypeScale.ts
 * @input Type scale configuration { base, ratio, weights? }
 * @output Token overrides for raw size tokens and semantic typography tokens
 * @position Theme utility; consumed by defineTheme.ts
 *
 * Computes a complete typography token set from a base size and scaling ratio
 * using a geometric progression: size = base × ratio^step.
 *
 * Two-layer architecture:
 *   Layer 1: Raw size tokens (--font-size-4xs … --font-size-4xl)
 *            Geometric progression in rem.
 *   Layer 2: Semantic tokens (--heading-*, --text-*-size/leading/weight)
 *            Sizes are var() references to Layer 1.
 *            Line heights are hardcoded computed values (4px grid snapped).
 *            Weights are var() references to font-weight tokens.
 *
 * The named leading tokens (--leading-tight … --leading-relaxed) are NOT
 * modified by the type scale — they remain as intent-based ratios for
 * component use.
 *
 * Step mapping:
 *   step -5 → --font-size-4xs   (sub-scale)
 *   step -4 → --font-size-3xs   (sub-scale)
 *   step -3 → --font-size-2xs   (sub-scale)
 *   step -2 → --font-size-xs   (h6)
 *   step -1 → --font-size-sm    (h5, supporting)
 *   step  0 → --font-size-base  (h4, body, label, code)
 *   step +1 → --font-size-lg    (h3, large)
 *   step +2 → --font-size-xl    (h2)
 *   step +3 → --font-size-2xl   (h1)
 *   step +4 → --font-size-3xl
 *   step +5 → --font-size-4xl
 *
 * Line heights use a tiered target ratio based on font size:
 *   < 20px  → 1.5   (body text, small UI)
 *   20–31px → 1.4   (medium headings)
 *   ≥ 32px  → 1.25  (large display headings)
 *
 * Then 4px-grid-snapped with Math.round and a minimum of fontSize + 4.
 *
 * SYNC: When modified, update:
 * - /packages/core/src/theme/expandTypeScale.test.ts
 * - /packages/core/src/theme/defineTheme.ts
 */
/** Font weight value — either a CSS string or a var() reference. */
export type FontWeightValue = string;
/**
 * Weight overrides for heading levels.
 * Keys are heading levels 1–6, values are CSS font-weight values
 * (e.g. '600', 'var(--font-weight-bold)').
 */
export type HeadingWeightOverrides = Partial<Record<1 | 2 | 3 | 4 | 5 | 6, FontWeightValue>>;
/**
 * Weight overrides for text types.
 * Keys are built-in text type names, values are CSS font-weight values.
 * Accepts additional string keys for custom theme-defined text types.
 */
export type TextWeightOverrides = Partial<Record<'body' | 'large' | 'label' | 'code' | 'supporting' | 'display-1' | 'display-2' | 'display-3' | (string & {}), FontWeightValue>>;
/**
 * Type scale configuration.
 *
 * @example
 * ```
 * // Default Astryx type scale
 * { base: 14, ratio: 1.2 }
 *
 * // With custom weights
 * {
 *   base: 14,
 *   ratio: 1.2,
 *   weights: {
 *     heading: { 1: 'var(--font-weight-bold)', 3: 'var(--font-weight-bold)' },
 *     text: { large: 'var(--font-weight-normal)' },
 *   },
 * }
 *
 * // Suggested starting points:
 * //   Dense/functional: { base: 12, ratio: 1.125 }
 * //   Default:          { base: 14, ratio: 1.2 }
 * //   Airy/editorial:   { base: 16, ratio: 1.25 }
 * ```
 */
export interface TypeScaleConfig {
    /** Base font size in px. Anchored to h4 and body text. */
    base: number;
    /** Scaling ratio for the geometric progression. */
    ratio: number;
    /** Optional weight overrides for headings and text types. */
    weights?: {
        /** Per-level heading weight overrides. Unset levels use the defaults. */
        heading?: HeadingWeightOverrides;
        /** Per-type text weight overrides. Unset types use the defaults. */
        text?: TextWeightOverrides;
    };
}
/**
 * Generated typography token overrides.
 * Keys are CSS custom property names, values are CSS strings.
 */
export type TypeScaleTokens = Record<string, string>;
/**
 * Expand a type scale configuration into typography token overrides.
 *
 * Generates two layers of tokens:
 *   - Layer 1: 11 raw size tokens (--font-size-4xs … --font-size-4xl) in rem
 *   - Layer 2: semantic tokens using var() refs for sizes and
 *              hardcoded computed values for line heights
 *
 * Includes 6 heading levels × 3 + 8 text types × 3 (body, large, label, code, supporting, display-1/2/3).
 * Font sizes are emitted as rem values (e.g. '1.5rem') based on 16px root.
 * Line heights are emitted as unitless ratios (e.g. '1.3333').
 * Font weights are emitted as var() references (e.g. '''var(--font-weight-semibold)'''').
 *
 * @example
 * ```
 * const tokens = expandTypeScale({ base: 14, ratio: 1.2 });
 * // Layer 1 — raw sizes
 * // tokens['--font-size-base'] === '0.875rem'
 * // tokens['--font-size-2xl'] === '1.5rem'
 * //
 * // Layer 2 — semantic
 * // tokens['--text-heading-1-size'] === 'var(--font-size-2xl)'
 * // tokens['--text-heading-1-leading'] === '1.3333'
 * // tokens['--text-body-size'] === 'var(--font-size-base)'
 * // tokens['--text-body-leading'] === '1.4286'
 * ```
 */
export declare function expandTypeScale(config: TypeScaleConfig): TypeScaleTokens;
/**
 * Generate component style overrides for heading and text components.
 */
export declare function generateTypeScaleComponents(_config: TypeScaleConfig): Record<string, Record<string, Record<string, string>>>;
//# sourceMappingURL=expandTypeScale.d.ts.map