New ThemeKitCore product — adopt the theme layer without the catalog. The theme engine, design tokens, and @Environment(\.theme) now ship as a standalone ThemeKitCore library. The full ThemeKit depends on it and @_exported imports it, so existing import ThemeKit code is unchanged — Theme, SemanticColor, Theme.SpacingKey still resolve exactly as before.
This is the first step of the modularization from the architecture review (#229): a narrow, value-based core for apps that only want theming.
Added
ThemeKitCore—Theme, tokens (SemanticColor,Theme.SpacingKey,Theme.RadiusRole, typography),@Environment(\.theme),.themeKit(), presets, and the generator, with zero components and zero third-party dependencies.
// Full design system (unchanged):
import ThemeKit
// Or just the theme layer, no components:
import ThemeKitCoreChanged
ThemeKitre-exportsThemeKitCore(@_exported import) — no source changes for existing consumers.- The theme engine,
Localizable.xcstrings, and theme JSON now live in theThemeKitCoretarget's resource bundle.
Migration (only if affected)
- Fully-qualified engine references —
ThemeKit.Theme,ThemeKit.SemanticColor— drop the qualifier or useThemeKitCore.Theme. Unqualified use is unaffected. The API-breakage check passed, confirming the public surface is preserved.
Verified: default + all-traits + isolated-Core builds, 230 tests pass (snapshots unchanged), and scratch consumers confirm import ThemeKitCore exposes the tokens with zero components.
Full changelog: CHANGELOG.md · v1.0.0...v1.1.0