diff options
| author | soryu-co <bot@soryu.co> | 2026-04-24 13:15:29 +0000 |
|---|---|---|
| committer | soryu-co <bot@soryu.co> | 2026-04-24 13:21:12 +0000 |
| commit | db092c79a175e3283f479ee0b234b24bde3c736e (patch) | |
| tree | 16ae5ba1f2f2f6089ad9f625953fa02d19463ab0 /makima/ios/Sources/Makima/Design/Palette.swift | |
| parent | 3679ceb3325033faa2f889ef3dfee5668ef7aeea (diff) | |
| download | soryu-makima-ios-scaffold.tar.gz soryu-makima-ios-scaffold.zip | |
Add Makima iOS app scaffold (M0 + M1 design system)makima-ios-scaffold
Pure-native SwiftUI client for makima.jp under makima/ios/.
M0 (scaffold)
- XcodeGen project (iOS 18+, Swift 5.10, bundle co.soryu.makima)
- Makefile targets: bootstrap, xcgen, ios-sim-fast, ios-device-fast, test, lint
- GitHub Actions workflow ios-ci.yml — builds + runs XCTest on macos-14
- MIT repo root license already in place
M1 (design system, web-aesthetic port)
- Palette: #0c1729 background, #9bc3ff accent, #3f6fb3 border (ported from Tailwind)
- Typography: SF Mono for chrome, uppercase tracked nav labels
- Components: DashedBorder, GridOverlay, MastheadBar + WebSocketStatus pill,
NavStripPlaceholder (NAV// prefix), JapaneseLongPressText (mobile analogue
of JapaneseHoverText), Logo (reuses frontend/public/logo/makima-logo.svg with
Canvas concentric-ring fallback), Badge
- RootView demo screen: masthead, nav strip, logo, CONTROL SYSTEM badge,
SYSTEM// status card, GLOSSARY// card with 命令/契約/聴取/史料 long-press terms
Auth (v1 plan, not wired here): x-makima-api-key header — verified against
src/server/auth.rs. Authorization: Bearer reserved for v1.1 Supabase OAuth.
v1 plan doc: makima/ios/docs/ios-v1-plan.md
Not in this PR: networking, WebSocket client, stores, feature surfaces
(Home/Contracts/Tasks/Directives/Daemons/Listen), notifications. Those land
across M2-M8 per the plan.
Diffstat (limited to 'makima/ios/Sources/Makima/Design/Palette.swift')
| -rw-r--r-- | makima/ios/Sources/Makima/Design/Palette.swift | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/makima/ios/Sources/Makima/Design/Palette.swift b/makima/ios/Sources/Makima/Design/Palette.swift new file mode 100644 index 0000000..abb531d --- /dev/null +++ b/makima/ios/Sources/Makima/Design/Palette.swift @@ -0,0 +1,41 @@ +import SwiftUI + +/// Central color palette, ported from the makima.jp Tailwind config. +/// Keep in lockstep with `frontend/src/index.css` and component classes. +enum Palette { + /// `#0c1729` — app background + static let background = Color(hex: 0x0C1729) + /// Slightly lighter panel inset (`#0f1c2f`) + static let panel = Color(hex: 0x0F1C2F) + /// Deeper backdrop used behind masthead gradients + static let backgroundDeep = Color(hex: 0x0B1220) + /// `#f0f5ff` — brightest foreground (titles) + static let foreground = Color(hex: 0xF0F5FF) + /// `#9bc3ff` — primary foreground (nav, labels) + static let accent = Color(hex: 0x9BC3FF) + /// `#dbe7ff` — body text + static let body = Color(hex: 0xDBE7FF) + /// `#e4edff` — softer body + static let bodySoft = Color(hex: 0xE4EDFF) + /// Muted / secondary foreground + static let foregroundMuted = Color(hex: 0x9BC3FF).opacity(0.65) + /// `#3f6fb3` — primary border + static let border = Color(hex: 0x3F6FB3) + /// Subtle dashed-border tint (`rgba(117,170,252,0.35)`) + static let borderMuted = Color(red: 117/255, green: 170/255, blue: 252/255).opacity(0.35) + /// Amber alert (pending questions) + static let warn = Color(hex: 0xF59E0B) + /// OK / running + static let ok = Color(hex: 0x4ADE80) + /// Error / failed + static let danger = Color(hex: 0xF87171) +} + +extension Color { + init(hex: UInt32, alpha: Double = 1.0) { + let r = Double((hex >> 16) & 0xFF) / 255 + let g = Double((hex >> 8) & 0xFF) / 255 + let b = Double( hex & 0xFF) / 255 + self.init(.sRGB, red: r, green: g, blue: b, opacity: alpha) + } +} |
