Skip to content

pantoken-root / swift

swift ​

Compatibility ​

Target: Swift iOS. Current format: UIKit SwiftPM module, runtime token check, and compiled Icons.xcassets. Tested environment: Xcode 27.0 (27A266a), Swift 6.4, iOS Simulator SDK/runtime 27.0, iPhone 18 Pro, arm64 iOS 15 deployment target. Runtime tested only on iOS Simulator 27.0; this does not establish an iOS 15 runtime floor. No watchOS or tvOS claim.

Full compatibility matrix

实验性

@pantoken/swift — 通过 Style Dictionary 将 Instructure 设计令牌导出为 Swift。

这是 pantoken 的原生证明:它将 IR 扁平化为具体的、单模式值 (@pantoken/core 的 toStyleDictionary),保留原生类型的令牌(颜色、尺寸、 数字),并将它们交给 @pantoken/sd-config。将 platform 替换为 flutter/compose 会重用相同的路径。

生成的 Swift 使用 UIKit 并以 iOS 为目标。 mise run verify:swift:syntax 仅解析其 source; mise run verify:swift:host 需要完整的 Xcode 和 iOS 模拟器 SDK 来对其进行类型检查。

接口 ​

函数 ​

引用 ​

default ​

重命名并重新导出 generateSwift