Adds three dark-first chip badges in the TierBadge pattern: - Jurisdiction (Berlin/DE/EU/International) — derived from the ELI, surfaced on the norms list, detail header and heatmap chips/hover. - Freshness (aktuell/geaendert/ungeprueft) — flags norms amended upstream (standDate + sourceSha256); renders only when stale. - Jurist review — marks evaluations a trusted jurist has confirmed (optional; the figure stands on its own). Models gain Jurisdiction/Freshness enums, Norm.freshness/supersededNote and Evaluation.reviewedBy/reviewedAt; HubRepository parses them from the flow bag (ELI fallback). HeatmapPage shows a real empty-state (hub-down vs no-evaluations) instead of a blank plot, and connect() no longer throws on a failed probe. Signed-off-by: flemming-it <sf@flemming.it>
85 lines
3.2 KiB
Dart
85 lines
3.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
/// Visual tokens for the F∆I Recl∆Im client, sourced from the
|
|
/// fai_web brand palette (see fai_web/src/styles/global.css:14-20).
|
|
///
|
|
/// Unlike `fai_chain_studio`'s `ChainColors` (Tailwind sky-400 —
|
|
/// dev-tool look), this palette matches the public-facing brand:
|
|
/// ink/paper with a petrol "signal" accent that doubles as the eye
|
|
/// of the `∆` mark.
|
|
class ReclaimColors {
|
|
ReclaimColors._();
|
|
|
|
// Core palette (fai_web/src/styles/global.css)
|
|
static const ink = Color(0xFF08090A);
|
|
static const inkRaised = Color(0xFF111315);
|
|
static const paper = Color(0xFFF4F3EF);
|
|
static const paperRaised = Color(0xFFE7E5DF);
|
|
static const signal = Color(0xFF2E8F9E);
|
|
static const mute = Color(0xFF6B7177);
|
|
|
|
// Hairline divider — currentColor at 14% opacity (fai_web).
|
|
static const hairlineDarkOpacity = 0.14;
|
|
static const hairlineLightOpacity = 0.14;
|
|
|
|
// Heatmap scale — derived from `signal` by HSL shift:
|
|
// x-axis (Schaden): cool → warm as score rises
|
|
// y-axis (Nutzen): muted → saturated as score rises
|
|
// size: cohort count, linear sqrt mapping
|
|
static const harmCool = Color(0xFF2E6E8F);
|
|
static const harmWarm = Color(0xFFD8723A);
|
|
static const benefitMuted = Color(0xFF5A7E83);
|
|
static const benefitSaturated = Color(0xFF2E8F9E);
|
|
|
|
// Tier badges — evidence tier of the lowest-tier ingredient.
|
|
static const tierT1 = Color(0xFF2E8F9E); // official / peer-reviewed
|
|
static const tierT2 = Color(0xFF6CA29A); // verband
|
|
static const tierT3 = Color(0xFFB0AC8E); // own survey
|
|
static const tierT4 = Color(0xFFA86F5C); // qualitative signal only
|
|
|
|
// Scope badges — Geltungsbereich of a norm. Hues widen from a
|
|
// warm-local Berlin to a cool-global teal, distinct from the
|
|
// tier palette so the two chips never read as the same thing.
|
|
// Tuned for dark-first legibility on the ink canvas (bright
|
|
// enough to read as chip text/border over inkRaised).
|
|
static const scopeBerlin = Color(0xFFD0685C); // Land Berlin (brick)
|
|
static const scopeDeutschland = Color(0xFFC79A3C); // Bund (gold)
|
|
static const scopeEu = Color(0xFF5B8DD6); // EU (union blue)
|
|
static const scopeInternational = Color(0xFF4FB89E); // global (teal)
|
|
|
|
// Freshness — is our norm version current vs. the published source.
|
|
static const freshSuperseded = Color(0xFFE0973A); // amended upstream
|
|
static const freshUnknown = Color(0xFF9AA0A6); // not reconciled
|
|
|
|
// Jurist review — an evaluation confirmed (signed off) by a jurist.
|
|
static const reviewConfirmed = Color(0xFF6FBE7A); // confirm green
|
|
}
|
|
|
|
/// Spacing scale — 4/8/12/16/24/32/48 multiples, matching
|
|
/// `ChainSpace` from `fai_chain_studio/lib/theme/tokens.dart`.
|
|
class ReclaimSpace {
|
|
ReclaimSpace._();
|
|
|
|
static const xs = 4.0;
|
|
static const sm = 8.0;
|
|
static const md = 12.0;
|
|
static const lg = 16.0;
|
|
static const xl = 24.0;
|
|
static const xxl = 32.0;
|
|
static const xxxl = 48.0;
|
|
}
|
|
|
|
class ReclaimRadius {
|
|
ReclaimRadius._();
|
|
|
|
static const sm = Radius.circular(6);
|
|
static const md = Radius.circular(10);
|
|
}
|
|
|
|
class ReclaimTypography {
|
|
ReclaimTypography._();
|
|
|
|
static const display = 'SpaceGroteskVariable';
|
|
static const body = 'InterVariable';
|
|
static const mono = 'JetBrainsMono';
|
|
}
|