goon/mobile/src/theme.ts
goon-foss 9acf2f8ea1 build(apk): 0.2.0 — expo-font native, runtime 1.1, fonts re-enabled
Option B (rebuild APK) — odblokowuje custom fonty na stałe + sprawia że
przyszłe font-OTA nie crashują.

- runtime 1.0 → 1.1 (app.json + AndroidManifest EXPO_RUNTIME_VERSION): nowy APK
  ma native ExpoFontLoader, więc MUSI mieć inny runtime niż stare instalacje 1.0
  (inaczej font-OTA crashnęłoby stare). 1.0 channel zostaje na d5b87e5c
  (font-stripped) dla starych, 1.1 = nowy APK z fontami.
- version 0.2.0 / versionCode 10 (build.gradle) — in-app updater (/version=0.2.0)
  zaoferuje install starym 0.1.9.
- Fonty przywrócone (useFonts, theme.fonts realne, SceneTile/MoviePosterCard/
  navigation/GoonWordmark fontFamily) — działają bo native jest w APK.
- Build: gradlew assembleRelease (autolinking expo-font, BEZ prebuild — zachowane
  custom native AntiTamper/ApkInstaller), Sentry source-map upload wyłączony
  (SENTRY_DISABLE_AUTO_UPLOAD, brak org/auth — krok poboczny).
- app/main.py /version 0.1.9 → 0.2.0.

ZWERYFIKOWANE na emulatorze: podpis SHA-256 == ALLOWED_APP_SIG_HASH (anti-tamper
OK), ExpoFontLoader w classes3.dex, `ReactNativeJS: Running "main"` bez crasha.
APK live: /static/app-release.apk + goon-v0.2.0.apk + landing webroot.

UWAGA: launcher-icon (native mipmaps) NIE zmienione w tym buildzie — nadal stara
ikona. Nowy oo-icon wymaga regeneracji res/mipmap-* + rebuild (follow-up).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 12:51:32 +02:00

97 lines
3.2 KiB
TypeScript

/**
* Goon theme — warm dark + oxblood, NOT generic navy/purple AI-default.
*
* Audit 2026-05-29 (impeccable.style/slop):
* - Wcześniej: bg #08090F (deep navy), accent #8B5CF6 (purple) + glow #A78BFA
* → literal example "AI default palette" z impeccable.
* - Teraz: bg #15110D (warm charcoal — orange undertone), accent #B23A48
* (oxblood/rust), brak glowów, brak gradientów neon.
*
* Typography: General Sans (display, Fontshare) + Geist Mono (meta, Vercel
* fonts). Font files w `mobile/assets/fonts/` — `useFonts()` w App.tsx
* graceful-fallback do system gdy brak (development).
*/
export const theme = {
// Warm dark — charcoal z orange undertone (NIE navy).
// Filmowy, premium feel — jak Letterboxd/Mubi/A24.
bg: '#15110D',
bgElevated: '#1E1A14',
card: '#26201A',
border: '#3A3128',
borderFocus: '#B23A48',
// Foreground — warm off-white (nie pure white żeby nie biło na warm dark).
fg: '#F5EDE0',
muted: '#A89B85',
mutedDim: '#6F6555',
// Accent — oxblood/rust. Distinctive, niekonwencjonalne dla "media app".
// Brak glow/neon. Deep wariant dla pressed states.
accent: '#B23A48',
accentGlow: '#B23A48', // alias — back-compat, ale bez prawdziwego glow
accentDeep: '#7A1F2A',
accentSecondary: '#D89B4A', // muted amber dla secondary CTAs
// Status — tonowane do palety (nie generic green/red).
good: '#5E8C5A', // muted olive-green
bad: '#C44545',
warn: '#D89B4A', // amber
} as const;
/**
* Font family — General Sans (display + body, Fontshare) + Geist Mono (meta,
* Vercel OFL). Pliki .ttf w `mobile/assets/fonts/`, ładowane przez useFonts()
* w App.tsx (runtime load — działa przez OTA bo expo-font native jest w APK).
*
* WAŻNE (custom-font gotcha): RN NIE syntezuje weightów dla custom fontów —
* fontWeight:'700' na fontFamily:'GeneralSans-Regular' NIE pogrubi. Trzeba
* jawnie wskazać rodzinę per-weight. Stąd 4 osobne sloty:
* - body → Regular (400) — domyślny tekst
* - medium → Medium (500) — labels, tab inactive
* - display → Semibold (600)— headingi, tytuły, bold
* - mono → Geist Mono — meta, duration, liczby, kategorie
*
* Gdy useFonts jeszcze nie ready, App.tsx blokuje render (fonty z bundla
* ładują się <100ms), więc te stałe są zawsze valid przy pierwszym paint.
*/
export const fonts = {
body: 'GeneralSans-Regular',
medium: 'GeneralSans-Medium',
display: 'GeneralSans-Semibold',
mono: 'GeistMono-Regular',
} as const;
export function scoreColor(score: number): string {
if (score >= 0.92) return theme.good;
if (score >= 0.75) return theme.warn;
return theme.bad;
}
/**
* Type-scale (impeccable: "at least 1.25 ratio between steps").
* Base 14 → 17 → 22 → 28 → 36. Użyj zamiast hardcodowanego fontSize.
*/
export const type = {
micro: 11,
meta: 13,
body: 14,
bodyLarge: 17,
title: 22,
display: 28,
hero: 36,
} as const;
/**
* Spacing scale — "tight groupings, generous between sections" (impeccable).
* Pomijamy 12/20 — preferuj 8/16/24/32 dla widocznej hierarchii sekcji.
*/
export const space = {
xs: 4,
sm: 8,
md: 16,
lg: 24,
xl: 32,
xxl: 48,
} as const;