import * as React from 'react'; /** * AddonLogo — the ONE tile that draws a provider/addon logo (cards, rows, * sidebar, config-modal header). Shared so every app renders logos the same * and none can clip them again. * * Why logos used to look cropped: the tile was `border-box` with an inline * `padding` AND a real 1px border, while the carried a hard-coded pixel * size computed as `tile - 2*pad`. The border ate 2px of the content box, so * the image overflowed it and `overflow-hidden` + the rounded corners shaved * the logo's edges; Tailwind's preflight `img { max-width: 100% }` additionally * squeezed the width alone. Here the ring is an inset box-shadow (takes no * layout space) and the image simply FILLS the padded content box with * `object-contain`, so any aspect ratio (square, wide, tall, SVG, transparent * PNG) is scaled down to fit — never cropped. * * The tile is pure white in light AND dark themes so dark/transparent marks * keep contrast. Security: logos come from a hub, so they are only ever an * `` (never injected markup) and only http(s), same-origin paths or * data:image/* are accepted; anything else falls back to glyph/monogram. */ type IconComponent = React.ComponentType<{ className?: string; }>; /** Returns `src` only when it is a safe destination for ``. */ export declare function safeLogoSrc(src?: string | null): string | undefined; export type AddonLogoSize = 'sidebar' | 'row' | 'card' | 'modal' | 'detail'; /** tile / inner padding / corner radius, in px. */ export declare const ADDON_LOGO_METRICS: Record; /** 1–2 letter deterministic monogram from the addon name. */ export declare function monogramOf(name?: string | null): string; /** WCAG contrast of `hex` against white, or undefined if not a valid hex. */ export declare function contrastOnWhite(hex?: string | null): number | undefined; /** Fallback color: the addon's own only when it reaches 4.5:1 on white. */ export declare function fallbackColor(color?: string | null): string; export interface AddonLogoProps { /** Logo URL (hub or data URL). Empty/unsafe => fallback. */ src?: string | null; /** Addon name: monogram fallback and alt text when `alone`. */ name?: string | null; /** Lucide glyph from the manifest, preferred fallback. */ fallbackIcon?: IconComponent; /** Addon color; used for the fallback only when it contrasts >= 4.5:1. */ color?: string | null; size?: AddonLogoSize; /** true when the name is NOT rendered next to it: alt becomes the name. */ alone?: boolean; className?: string; } export declare function AddonLogo({ src, name, fallbackIcon: FallbackIcon, color, size, alone, className, }: AddonLogoProps): React.JSX.Element; export {}; //# sourceMappingURL=addon-logo.d.ts.map