import type { LoadProgress } from '../source/types'; import type { ZineStrings } from '../strings'; export declare const CSS = "\n.zine-loading {\n position: absolute;\n inset: 0;\n z-index: 3;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 14px;\n /* The overlay shows during download, before the book is measured and the container gets its\n aspect-ratio (and thus its height). A consumer who sizes the container by width alone leaves it\n near-zero-height meanwhile, which would crush the overlay to a strip and clip the spinner.\n A floor keeps it tall enough to lay out; the box snaps to the book's ratio once it paints. */\n min-height: 160px;\n padding: 24px;\n box-sizing: border-box;\n text-align: center;\n font: 500 14px/1.4 system-ui, sans-serif;\n color: var(--zine-loading-fg, light-dark(#3f3f46, #d4d4d8));\n background: var(--zine-loading-bg, light-dark(#fafafa, #0c0c11));\n border-radius: inherit;\n opacity: 0;\n transition: opacity 150ms ease;\n}\n.zine-loading-shown { opacity: 1; }\n.zine-loading-spinner {\n width: 32px;\n height: 32px;\n border: 3px solid var(--zine-loading-track, light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.14)));\n border-top-color: var(--zine-loading-accent, light-dark(#0284c7, #7dd3fc));\n border-radius: 50%;\n animation: zine-loading-spin 0.8s linear infinite;\n}\n@keyframes zine-loading-spin { to { transform: rotate(360deg); } }\n.zine-loading-text { font-variant-numeric: tabular-nums; }\n.zine-loading-bar {\n width: min(240px, 70%);\n height: 6px;\n background: var(--zine-loading-track, light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.14)));\n border-radius: 3px;\n overflow: hidden;\n}\n.zine-loading-fill {\n width: 0;\n height: 100%;\n background: var(--zine-loading-accent, light-dark(#0284c7, #7dd3fc));\n border-radius: 3px;\n transition: width 150ms ease-out;\n}\n@media (prefers-reduced-motion: reduce) {\n .zine-loading { transition: none; }\n .zine-loading-spinner { animation-duration: 2s; }\n .zine-loading-fill { transition: none; }\n}\n"; /** Handle the engine uses to drive and tear down the overlay. */ export interface LoaderHandle { /** Download phase: reflect bytes fetched, showing a percentage bar when a total is known. */ update(progress: LoadProgress): void; /** Downloading is done; the wait is now rasterizing the first spread. */ preparing(): void; /** Remove the overlay and restore anything it changed on the container. */ destroy(): void; } /** * Build the overlay inside `container` and return a handle to drive it. * * The overlay is hidden for the first {@link REVEAL_DELAY_MS} so a fast load never flashes it; * `destroy()` before then cancels the reveal outright. */ export declare function mountLoading(container: HTMLElement, strings: ZineStrings): LoaderHandle;