@appifex/spec
Design spec extraction and platform translation for the DTC toolkit.
Usage
import { extractSpec, translateSpec } from '@appifex/spec'
const spec = extractSpec(jsonString)
const swiftSpec = translateSpec(spec, 'swiftui')
const ktSpec = translateSpec(spec, 'kotlin-compose')
What it does
- Extract: Parses a design spec JSON (from
@appifex/design) into a typed DesignSpec
- Translate: Maps generic components to platform-specific types and generates testIDs
The platform spec is consumed by @appifex/test-gen to generate tests and by @appifex/codegen to generate code.