import { BeatHtmlFragment } from 'mulmocast/browser'; /** All this module needs of its container. An HTMLElement satisfies it; so can a test double. */ export type FragmentHost = { querySelectorAll: (selectors: string) => ArrayLike; }; /** Load a CDN script once. Concurrent calls for the same URL share one load. */ export declare const loadScript: (src: string) => Promise; export declare const requiredRuntimes: (fragments: readonly (BeatHtmlFragment | undefined)[]) => string[]; export declare const requiredChartPlugins: (fragments: readonly (BeatHtmlFragment | undefined)[]) => string[]; export declare const collectedCss: (fragments: readonly (BeatHtmlFragment | undefined)[]) => string; /** * Draw every chart and diagram inside `container`, replacing whatever the previous call drew. * Only the most recent call for a container draws; earlier ones stop at their next await. */ export declare const driveRuntimes: (container: FragmentHost, fragments: readonly (BeatHtmlFragment | undefined)[]) => Promise; /** * Destroy whatever a container drew and forget it. * * A per-beat host is unmounted when its beat is deleted or the list is torn down, and * Chart.js keeps a live instance per canvas until it is told otherwise. Without this the * instances outlive their canvases. */ export declare const releaseRuntimes: (container: FragmentHost | null) => void; /** Test seam: forget which scripts have been loaded. */ export declare const resetLoadedScripts: () => void;