feat(native): also emit canonical Swift colour tokens #64
No reviewers
Labels
No labels
priority
P1
priority
P2
priority
P3
priority
P4
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Toilville/toilville-design!64
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/native-swift-emit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Completes the Swift side of the native token emitter (recommendation #1).
native.pynow also emitsdist/rituals/udg_tokens.swift— the same canonical colour maps asudg_tokens.dart, as Swift[String: UInt32]literals:No separate
udg.swift-keyneeded — Swift keys are camelCase, identical toudg.dart-key.swiftc -parseconfirms valid Swift.Generated + gated
native.pybuild/check (byte-drift gate), same as the Dart output.swift-colorssource-inject consumer (apps/rituals-macos/Design/UDGColors.swift) — an optional compile-time alternative to the macOS runtime JSON manifest.Why no sibling change is required
The macOS app's Swift colours already track canonical at runtime — it reads a JSON manifest that the Flutter
export.dartbuilds from the (now-canonical, post-#189) Dart maps. And its few hardcodedColor(argbHex:)constants don't drift (align-checkreports them clean). So this PR gives Swift a first-class generated canonical source + gate, without forcing a runtime→compile-time refactor on the app.Testing
swiftc -parsevalid ·just checkgreen (native check covers the Swift file) ·pytest132 passed ·yamllintclean.Remaining (documented, not built)
The full multi-tier
udg_tokens.jsonmanifest (borders/spaces/types/breakpoints/…) — colour is done for both Dart and Swift; the non-colour tiers are the last native follow-up.