import type { AnnouncementBarProps } from '../types/announcement'; /** * ============================================================================ * DO NOT REDESIGN THIS BAR. THE VISUAL DESIGN IS FINAL AND OWNER-APPROVED. * ============================================================================ * The bar's look (44px single-line strip, text-h6 message, 20/24px icon, * size="compact" CTA, ghost-icon dismiss) is DELIBERATE and has ALREADY been * regressed and reverted once (#1545 "redesigned" it taller/stacked; #1551 * reverted that UI back to #1542's approved design). See the full warning in * `ui/announcement-bar-view.tsx`. * * A new Figma frame is NOT permission to change any of it. Do not bump the * height, text scale, icon size, or CTA size, and do not re-introduce a * stacked / full-width-CTA mobile layout. Changes here require Michael's * explicit written sign-off on the PR, or they get reverted. AGAIN. * ============================================================================ * * Platform announcement bar — DUAL MODE, works with or without SSR. * * SSR mode (Next hosts, e.g. the hub): the server resolves the announcement * and the dismissal cookie, then passes `initialAnnouncement` (nullable). * The bar renders in the first HTML byte (zero layout shift, no flash for * dismissed users) and skips the mount fetch. * * Client-only mode (bare React apps without SSR: Vite/CRA embeds — see * react-embedding-example): omit `initialAnnouncement` and mount the bar * PROP-LESS inside an EndpointsRuntime provider; it self-fetches from the * provider's `announcementsUrl` (a fixed suffix under the embedder's one * content base). No provider → renders nothing, never fetches (silent * no-op). Appearance animates in (grid 0fr→1fr) so there is no hard layout * jump. Deliberately NO per-component URL or platform knobs: the embedder * is platform-agnostic — each server returns ITS OWN announcement via * currentPlatform(); the platform is never sent as a parameter. * * Both modes: freshness is event-driven, no polling — `useSelfFetch`'s * visibility revalidation re-fetches on tab refocus when the held data is * >60s old (matching the server cache TTL by convention); idle tabs make * zero requests. Dismissal cookie is the SSOT (`announcement-storage.ts`); * storage reads happen ONLY in effects (a render-time read would desync * hydration in SSR mode). */ export declare function AnnouncementBar({ initialAnnouncement, previewMode, dismissible, className, }?: AnnouncementBarProps): import("react").JSX.Element | null; //# sourceMappingURL=announcement-bar.d.ts.map