/** * Product cover art for "More from Exxat" shelf cards and the featured banner. * * Mini product UI vignettes — each scene shows the job the product does, in * that product's brand colour (`--brand-color` set by the host card). * * - one 240×132 canvas so every cover crops the same * - soft brand wash + window chrome for depth, unless a host that still * lights the surface itself passes `litByHost` (shelf cards no longer do) * - structure in `currentColor`, one clear brand focal * - no hex — only `currentColor` and `brand` token classes */ import { createContext, useContext } from "react" import type { Product } from "@/contexts/product-context" /** * Whether the drawing lights itself. * * The scenes were written for a host that supplies a flat fill, so each one * carries its own brand haze. A host that lights the whole card instead — the * shelf card's radial glow — then has two light sources, and the haze is a solid * circle at 12%, so its edge shows against a smooth falloff and the card looks * like it has a smudge on it. Such a host turns the haze off and keeps one. */ const LitByHost = createContext(false) function IllustrationFrame({ children }: { children: React.ReactNode }) { return ( {children} ) } /** Soft brand atmosphere — two depths, never multi-hue chart fills. */ function Atmosphere({ cx = 188, cy = 28, r = 56, }: { cx?: number cy?: number r?: number }) { if (useContext(LitByHost)) return null return ( <> ) } /** Floating window chrome shared by denser scenes. */ function WindowChrome({ x, y, w, h, rx = 12, }: { x: number y: number w: number h: number rx?: number }) { return ( <> ) } /** One course fanned into competencies — one already assessed. */ function CurriculumMappingArt() { return ( ) } /** Requirements cleared before the floor — one still open. */ function ComplianceArt() { return ( ) } /** A response on a scale, becoming a distribution you can read. */ function SurveysArt() { return ( ) } /** Practical exam: questions authored, scored, sat against the clock. */ function ExamManagementArt() { return ( ) } /** Evidence assembled into the self-study. */ function AccreditationArt() { return ( ) } /** One student's trajectory against the outcome the program aims at. */ function StudentSuccessArt() { return ( ) } /** Clinical Education — today's attention list beside a KPI. */ function PrismArt() { return ( ) } /** Availability rows filling up. True from either side of the handshake, so both * Exxat One ids share it. */ function ExxatOneArt() { return ( ) } /** Fallback: a workspace of records, with one surfaced. */ function GenericArt() { return ( ) } const PRODUCT_ART: Partial React.JSX.Element>> = { "exxat-prism": PrismArt, "exxat-one-schools": ExxatOneArt, "exxat-one-sites": ExxatOneArt, "exxat-curriculum-mapping": CurriculumMappingArt, "exxat-compliance": ComplianceArt, "exxat-surveys": SurveysArt, "exxat-exam-management": ExamManagementArt, "exxat-accreditation": AccreditationArt, "exxat-student-success": StudentSuccessArt, } export function ProductIllustration({ product, /** Set by a host that lights the surface itself. See `LitByHost`. */ litByHost = false, /** * Sit the vignette on the trailing edge of a `mediaFit="cover"` banner so * copy can overlay it. Default frame is a 240×132 crop for a side column. */ cover = false, }: { product: Product litByHost?: boolean cover?: boolean }) { const Art = PRODUCT_ART[product] ?? GenericArt const art = ( ) if (!cover) return art return (
{art}
) }