module
UI::DesignTokens::AppleGenerator
Overview
Emits a Swift file from a UI::DesignTokens::Tokens instance.
Output is consumed by Phase 3 (SwiftUI bridge). Deterministic: same input bytes → same output bytes.
Mapping rules (per implementation.md §4.2):
- Spacing / radius rem are multiplied by 16 to convert to Apple points.
- Type sizes track the brand's value verbatim; the brief's "HIG default 17pt body" override applies only when the brand has explicitly not set a size. We hold the brand's value through faithfully — the default Tokens already encodes the body at 1.0rem (16pt) which is the standard cross-platform body, and a downstream SwiftUI consumer can substitute SF Dynamic Type if they want HIG-canonical 17pt.
- Font.Weight mapping is documented inline.
ease_standard→UnitCurve.easeInOut,ease_emphasizedround-trips the bezier 4-tuple.springis dropped — SwiftUI manages its own spring curves via.spring().
Extended Modules
Defined in:
ui/design_tokens/generators/apple_generator.crConstant Summary
-
HEADER =
"// GENERATED by UI::DesignTokens::AppleGenerator. Do not edit by hand.\n"