diff --git a/site/public/brand/companion/broken.webp b/site/public/brand/companion/broken.webp index 5f540734..515a2898 100644 Binary files a/site/public/brand/companion/broken.webp and b/site/public/brand/companion/broken.webp differ diff --git a/site/public/brand/companion/debug.webp b/site/public/brand/companion/debug.webp index fec154eb..ab4940b5 100644 Binary files a/site/public/brand/companion/debug.webp and b/site/public/brand/companion/debug.webp differ diff --git a/site/public/brand/companion/hint.webp b/site/public/brand/companion/hint.webp index 3f56f680..eea7579c 100644 Binary files a/site/public/brand/companion/hint.webp and b/site/public/brand/companion/hint.webp differ diff --git a/site/public/brand/companion/info.webp b/site/public/brand/companion/info.webp index 83ebb2b4..2c614782 100644 Binary files a/site/public/brand/companion/info.webp and b/site/public/brand/companion/info.webp differ diff --git a/site/public/brand/companion/invalid.webp b/site/public/brand/companion/invalid.webp index 28937a9e..7c00c2ac 100644 Binary files a/site/public/brand/companion/invalid.webp and b/site/public/brand/companion/invalid.webp differ diff --git a/site/public/brand/companion/pitfall.webp b/site/public/brand/companion/pitfall.webp index 1698d950..4609d21d 100644 Binary files a/site/public/brand/companion/pitfall.webp and b/site/public/brand/companion/pitfall.webp differ diff --git a/site/public/brand/companion/success.webp b/site/public/brand/companion/success.webp index 56c2e8c1..d2804f81 100644 Binary files a/site/public/brand/companion/success.webp and b/site/public/brand/companion/success.webp differ diff --git a/site/public/brand/companion/warning.webp b/site/public/brand/companion/warning.webp index 730dae9d..adf7d0a9 100644 Binary files a/site/public/brand/companion/warning.webp and b/site/public/brand/companion/warning.webp differ diff --git a/site/src/components/Callout.astro b/site/src/components/Callout.astro index e009af5d..a9c248a9 100644 --- a/site/src/components/Callout.astro +++ b/site/src/components/Callout.astro @@ -2,10 +2,11 @@ /** * Callout — a labelled aside for the eight Guide Companion states. * - * Each state pairs the painterly companion sprite (a trailing-edge badge) with a - * state-coloured glyph + label. The glyph and label carry the meaning, so the - * callout reads for colour-blind readers and in high-contrast modes; the sprite - * and its state-coloured screen-glow are enrichment. + * Each state pairs the painterly companion sprite (a trailing-edge badge, sliced + * and chroma-keyed from the 8-state sheet) with a state-coloured icon chip + + * label. The icon and label carry the meaning, so the callout reads for + * colour-blind readers and in high-contrast modes; the sprite and its + * state-coloured screen-glow are enrichment. * * Usage in MDX: * import Callout from '../../../components/Callout.astro'; @@ -19,7 +20,7 @@ * * * Colour exclusivity: amber=warning, mint=success, gray=invalid, red=broken; - * info/hint/pitfall/debug share the companion cyan and are told apart by glyph. + * info/hint/pitfall/debug share the companion cyan and are told apart by icon. */ type CalloutType = 'info' | 'hint' | 'warning' | 'pitfall' | 'success' | 'debug' | 'invalid' | 'broken'; @@ -30,27 +31,40 @@ interface Props { title?: string; } -const META: Record = { - info: { label: 'Good to know', glyph: 'i' }, - hint: { label: 'Tip', glyph: '✦' }, - warning: { label: 'Heads up', glyph: '!' }, - pitfall: { label: 'Common pitfall', glyph: '?' }, - success: { label: "You're set", glyph: '✓' }, - debug: { label: 'Debug tip', glyph: '[]' }, - invalid: { label: 'Not supported', glyph: 'Ø' }, - broken: { label: 'Runtime error', glyph: '✕' }, +const LABELS: Record = { + info: 'Good to know', + hint: 'Tip', + warning: 'Heads up', + pitfall: 'Common pitfall', + success: "You're set", + debug: 'Debug tip', + invalid: 'Not supported', + broken: 'Runtime error', +}; + +// Lucide-style line icons (24 viewBox, currentColor), one per state. +const ICONS: Record = { + info: '', + hint: '', + warning: '', + pitfall: '', + success: '', + debug: '', + invalid: '', + broken: '', }; const { type = 'info', title } = Astro.props; -const meta = META[type]; -const heading = title ?? meta.label; +const heading = title ?? LABELS[type]; const base = import.meta.env.BASE_URL; ---