refactor: rename internal Fai* design system + fai_ helpers to chain
Some checks failed
Security / Security check (push) Failing after 2s
Some checks failed
Security / Security check (push) Failing after 2s
The Studio design system, widgets and helpers carried a Fai* / fai_ prefix (FaiSpace, FaiColors, FaiTheme, FaiLog, 17 fai_*.dart files, the faiBinary* l10n keys). Studio is the Ch∆In product, so rename them to Chain* / chain_ — carefully preserving English fail/failure/failed. Also fix stale references: the 'fai' binary in l10n strings -> 'chain', FAI_* env vars (FAI_BIN/DATA_DIR/MODULES_DIR/TODAY/BOOTSTRAP_TOKEN) -> CHAIN_*, fai_platform -> fai_chain, fai_hub -> chain_hub. Vendor security-hook tooling (FAI_BANNED_TERMS_FILE) + the .fai bundle ext left. flutter analyze + test: clean (20 passed). Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
68d23ab7dd
commit
891acd2ba2
52 changed files with 1225 additions and 1225 deletions
|
|
@ -5,8 +5,8 @@ import 'package:flutter_markdown_plus/flutter_markdown_plus.dart';
|
|||
|
||||
import 'tokens.dart';
|
||||
|
||||
class FaiTheme {
|
||||
FaiTheme._();
|
||||
class ChainTheme {
|
||||
ChainTheme._();
|
||||
|
||||
/// Bundled font families. Declared in pubspec.yaml `fonts:` and
|
||||
/// shipped as TTF assets under `assets/fonts/` — NOT fetched at
|
||||
|
|
@ -79,7 +79,7 @@ class FaiTheme {
|
|||
}
|
||||
|
||||
/// JetBrains Mono for monospaced technical content. Used by
|
||||
/// FaiMono helper. Only Regular (400) and Medium (500) weights
|
||||
/// ChainMono helper. Only Regular (400) and Medium (500) weights
|
||||
/// are bundled — heavier requests fall back to the nearest.
|
||||
static TextStyle mono({
|
||||
double size = 12,
|
||||
|
|
@ -125,25 +125,25 @@ class FaiTheme {
|
|||
).copyWith(backgroundColor: Colors.transparent),
|
||||
codeblockDecoration: BoxDecoration(
|
||||
color: theme.colorScheme.surfaceContainerHigh,
|
||||
borderRadius: BorderRadius.circular(FaiRadius.sm),
|
||||
borderRadius: BorderRadius.circular(ChainRadius.sm),
|
||||
border: Border.all(color: theme.colorScheme.outlineVariant),
|
||||
),
|
||||
codeblockPadding: const EdgeInsets.all(FaiSpace.md),
|
||||
codeblockPadding: const EdgeInsets.all(ChainSpace.md),
|
||||
blockquote: theme.textTheme.bodyMedium?.copyWith(
|
||||
color: theme.colorScheme.onSurface,
|
||||
),
|
||||
blockquoteDecoration: BoxDecoration(
|
||||
color: theme.colorScheme.surfaceContainer,
|
||||
borderRadius: BorderRadius.circular(FaiRadius.sm),
|
||||
borderRadius: BorderRadius.circular(ChainRadius.sm),
|
||||
border: Border(
|
||||
left: BorderSide(color: theme.colorScheme.primary, width: 3),
|
||||
),
|
||||
),
|
||||
blockquotePadding: const EdgeInsets.fromLTRB(
|
||||
FaiSpace.md,
|
||||
FaiSpace.sm,
|
||||
FaiSpace.sm,
|
||||
FaiSpace.sm,
|
||||
ChainSpace.md,
|
||||
ChainSpace.sm,
|
||||
ChainSpace.sm,
|
||||
ChainSpace.sm,
|
||||
),
|
||||
tableCellsDecoration: BoxDecoration(
|
||||
color: theme.colorScheme.surfaceContainerHigh,
|
||||
|
|
@ -164,32 +164,32 @@ class FaiTheme {
|
|||
static ThemeData dark() {
|
||||
final scheme = ColorScheme(
|
||||
brightness: Brightness.dark,
|
||||
primary: FaiColors.accent,
|
||||
onPrimary: FaiColors.black,
|
||||
primaryContainer: FaiColors.accentMuted,
|
||||
onPrimaryContainer: FaiColors.textStrong,
|
||||
secondary: FaiColors.accentDeep,
|
||||
onSecondary: FaiColors.black,
|
||||
secondaryContainer: FaiColors.surfaceHigh,
|
||||
onSecondaryContainer: FaiColors.text,
|
||||
tertiary: FaiColors.accent,
|
||||
onTertiary: FaiColors.black,
|
||||
tertiaryContainer: FaiColors.surfaceHigh,
|
||||
onTertiaryContainer: FaiColors.text,
|
||||
error: FaiColors.danger,
|
||||
onError: FaiColors.textStrong,
|
||||
primary: ChainColors.accent,
|
||||
onPrimary: ChainColors.black,
|
||||
primaryContainer: ChainColors.accentMuted,
|
||||
onPrimaryContainer: ChainColors.textStrong,
|
||||
secondary: ChainColors.accentDeep,
|
||||
onSecondary: ChainColors.black,
|
||||
secondaryContainer: ChainColors.surfaceHigh,
|
||||
onSecondaryContainer: ChainColors.text,
|
||||
tertiary: ChainColors.accent,
|
||||
onTertiary: ChainColors.black,
|
||||
tertiaryContainer: ChainColors.surfaceHigh,
|
||||
onTertiaryContainer: ChainColors.text,
|
||||
error: ChainColors.danger,
|
||||
onError: ChainColors.textStrong,
|
||||
errorContainer: const Color(0xFF3F1518),
|
||||
onErrorContainer: const Color(0xFFFCA5A5),
|
||||
surface: FaiColors.black,
|
||||
onSurface: FaiColors.text,
|
||||
onSurfaceVariant: FaiColors.muted,
|
||||
outline: FaiColors.border,
|
||||
outlineVariant: FaiColors.border,
|
||||
surfaceContainerLowest: FaiColors.black,
|
||||
surfaceContainerLow: FaiColors.surface,
|
||||
surfaceContainer: FaiColors.surface,
|
||||
surfaceContainerHigh: FaiColors.surfaceHigh,
|
||||
surfaceContainerHighest: FaiColors.surfaceHigh,
|
||||
surface: ChainColors.black,
|
||||
onSurface: ChainColors.text,
|
||||
onSurfaceVariant: ChainColors.muted,
|
||||
outline: ChainColors.border,
|
||||
outlineVariant: ChainColors.border,
|
||||
surfaceContainerLowest: ChainColors.black,
|
||||
surfaceContainerLow: ChainColors.surface,
|
||||
surfaceContainer: ChainColors.surface,
|
||||
surfaceContainerHigh: ChainColors.surfaceHigh,
|
||||
surfaceContainerHighest: ChainColors.surfaceHigh,
|
||||
);
|
||||
return _build(scheme);
|
||||
}
|
||||
|
|
@ -197,32 +197,32 @@ class FaiTheme {
|
|||
static ThemeData light() {
|
||||
final scheme = ColorScheme(
|
||||
brightness: Brightness.light,
|
||||
primary: FaiColors.accentDeep,
|
||||
onPrimary: FaiColors.lightSurface,
|
||||
primary: ChainColors.accentDeep,
|
||||
onPrimary: ChainColors.lightSurface,
|
||||
primaryContainer: const Color(0xFFE0F2FE),
|
||||
onPrimaryContainer: FaiColors.accentMuted,
|
||||
secondary: FaiColors.accentMuted,
|
||||
onSecondary: FaiColors.lightSurface,
|
||||
secondaryContainer: FaiColors.lightSurfaceHigh,
|
||||
onSecondaryContainer: FaiColors.lightText,
|
||||
tertiary: FaiColors.accentDeep,
|
||||
onTertiary: FaiColors.lightSurface,
|
||||
onPrimaryContainer: ChainColors.accentMuted,
|
||||
secondary: ChainColors.accentMuted,
|
||||
onSecondary: ChainColors.lightSurface,
|
||||
secondaryContainer: ChainColors.lightSurfaceHigh,
|
||||
onSecondaryContainer: ChainColors.lightText,
|
||||
tertiary: ChainColors.accentDeep,
|
||||
onTertiary: ChainColors.lightSurface,
|
||||
tertiaryContainer: const Color(0xFFE0F2FE),
|
||||
onTertiaryContainer: FaiColors.accentMuted,
|
||||
error: FaiColors.danger,
|
||||
onError: FaiColors.lightSurface,
|
||||
onTertiaryContainer: ChainColors.accentMuted,
|
||||
error: ChainColors.danger,
|
||||
onError: ChainColors.lightSurface,
|
||||
errorContainer: const Color(0xFFFEE2E2),
|
||||
onErrorContainer: const Color(0xFF7F1D1D),
|
||||
surface: FaiColors.lightCanvas,
|
||||
onSurface: FaiColors.lightText,
|
||||
onSurfaceVariant: FaiColors.lightMuted,
|
||||
outline: FaiColors.lightBorder,
|
||||
outlineVariant: FaiColors.lightBorder,
|
||||
surfaceContainerLowest: FaiColors.lightCanvas,
|
||||
surfaceContainerLow: FaiColors.lightSurface,
|
||||
surfaceContainer: FaiColors.lightSurface,
|
||||
surfaceContainerHigh: FaiColors.lightSurfaceHigh,
|
||||
surfaceContainerHighest: FaiColors.lightSurfaceHigh,
|
||||
surface: ChainColors.lightCanvas,
|
||||
onSurface: ChainColors.lightText,
|
||||
onSurfaceVariant: ChainColors.lightMuted,
|
||||
outline: ChainColors.lightBorder,
|
||||
outlineVariant: ChainColors.lightBorder,
|
||||
surfaceContainerLowest: ChainColors.lightCanvas,
|
||||
surfaceContainerLow: ChainColors.lightSurface,
|
||||
surfaceContainer: ChainColors.lightSurface,
|
||||
surfaceContainerHigh: ChainColors.lightSurfaceHigh,
|
||||
surfaceContainerHighest: ChainColors.lightSurfaceHigh,
|
||||
);
|
||||
return _build(scheme);
|
||||
}
|
||||
|
|
@ -256,7 +256,7 @@ class FaiTheme {
|
|||
color: scheme.surfaceContainer,
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(FaiRadius.md),
|
||||
borderRadius: BorderRadius.circular(ChainRadius.md),
|
||||
side: BorderSide(color: scheme.outlineVariant),
|
||||
),
|
||||
margin: EdgeInsets.zero,
|
||||
|
|
@ -266,14 +266,14 @@ class FaiTheme {
|
|||
backgroundColor: scheme.primary,
|
||||
foregroundColor: scheme.onPrimary,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(FaiRadius.sm),
|
||||
borderRadius: BorderRadius.circular(ChainRadius.sm),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: FaiSpace.lg,
|
||||
vertical: FaiSpace.md,
|
||||
horizontal: ChainSpace.lg,
|
||||
vertical: ChainSpace.md,
|
||||
),
|
||||
textStyle: textTheme.labelMedium,
|
||||
animationDuration: FaiMotion.fast,
|
||||
animationDuration: ChainMotion.fast,
|
||||
),
|
||||
),
|
||||
outlinedButtonTheme: OutlinedButtonThemeData(
|
||||
|
|
@ -281,14 +281,14 @@ class FaiTheme {
|
|||
foregroundColor: scheme.onSurface,
|
||||
side: BorderSide(color: scheme.outline),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(FaiRadius.sm),
|
||||
borderRadius: BorderRadius.circular(ChainRadius.sm),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: FaiSpace.lg,
|
||||
vertical: FaiSpace.md,
|
||||
horizontal: ChainSpace.lg,
|
||||
vertical: ChainSpace.md,
|
||||
),
|
||||
textStyle: textTheme.labelMedium,
|
||||
animationDuration: FaiMotion.fast,
|
||||
animationDuration: ChainMotion.fast,
|
||||
),
|
||||
),
|
||||
iconButtonTheme: IconButtonThemeData(
|
||||
|
|
@ -323,7 +323,7 @@ class FaiTheme {
|
|||
),
|
||||
behavior: SnackBarBehavior.floating,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(FaiRadius.sm),
|
||||
borderRadius: BorderRadius.circular(ChainRadius.sm),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import 'package:flutter/material.dart';
|
|||
|
||||
/// Colour palette. Single strong accent (Ch∆In Cyan) plus neutral
|
||||
/// greys. Status colours stay restrained — no candy palette.
|
||||
class FaiColors {
|
||||
FaiColors._();
|
||||
class ChainColors {
|
||||
ChainColors._();
|
||||
|
||||
// Brand accent. Slightly cooler / more saturated than the
|
||||
// initial #1E3A8A — this reads more as "deep tech, alive"
|
||||
|
|
@ -43,8 +43,8 @@ class FaiColors {
|
|||
|
||||
/// Spacing scale. Stick to multiples of 4. Keep the vocabulary
|
||||
/// small — six steps cover everything.
|
||||
class FaiSpace {
|
||||
FaiSpace._();
|
||||
class ChainSpace {
|
||||
ChainSpace._();
|
||||
static const xs = 4.0;
|
||||
static const sm = 8.0;
|
||||
static const md = 12.0;
|
||||
|
|
@ -55,8 +55,8 @@ class FaiSpace {
|
|||
}
|
||||
|
||||
/// Border radii. Two sizes only.
|
||||
class FaiRadius {
|
||||
FaiRadius._();
|
||||
class ChainRadius {
|
||||
ChainRadius._();
|
||||
static const sm = 6.0;
|
||||
static const md = 10.0;
|
||||
}
|
||||
|
|
@ -66,8 +66,8 @@ class FaiRadius {
|
|||
/// Brightness-aware: dark themes lean on deeper, lower-alpha
|
||||
/// shadows (they read as ambient occlusion against near-black
|
||||
/// surfaces); light themes use softer, slightly larger spreads.
|
||||
class FaiElevation {
|
||||
FaiElevation._();
|
||||
class ChainElevation {
|
||||
ChainElevation._();
|
||||
|
||||
/// Resting elevation for cards and sheets. Just enough to lift
|
||||
/// a surface off the canvas without announcing itself.
|
||||
|
|
@ -106,8 +106,8 @@ class FaiElevation {
|
|||
}
|
||||
|
||||
/// Animation durations. Keep them under 300ms for power-user feel.
|
||||
class FaiMotion {
|
||||
FaiMotion._();
|
||||
class ChainMotion {
|
||||
ChainMotion._();
|
||||
static const fast = Duration(milliseconds: 120);
|
||||
static const base = Duration(milliseconds: 200);
|
||||
static const slow = Duration(milliseconds: 320);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue