/** One pinned third-party file served from jsDelivr. */ interface CdnDependency { /** npm package name: doubles as the import-map specifier for ESM deps. */ name: string; /** Exact pinned version. Bump deliberately; then refresh `integrity`. */ version: string; /** Static file within the package (never a generated `/+esm` bundle). */ file: string; /** * `sha384` SRI hash of the pinned file. Regenerate after a version bump: * `curl -sL | openssl dgst -sha384 -binary | openssl base64 -A` */ integrity: string; } /** * @description Builds the pinned jsDelivr URL for a dependency. * * @param dep - The dependency entry. * @returns The versioned URL. * @private */ declare function cdnUrl(dep: CdnDependency): string; /** * ES-module dependencies the kit's module graph imports by bare specifier. * The import map points each specifier at its pinned static file; in tests and * bundlers the same specifiers resolve from `node_modules` instead (the * versions here must match the installed packages: `head.test.ts` pins that). */ declare const ESM_DEPENDENCIES: readonly CdnDependency[]; /** * Feature polyfills loaded ahead of the kit module. Exactly one entry: * **Interest Invokers** (`interestfor`), which drives tooltip triggers and the * optional hover/focus open on menu, menubar, and navigation-menu. Chromium * 142+ ships it; Firefox and Safari do not, so this is the kit's one API below * the browser-support floor that a polyfill can cover (ADR-0011). * * Deliberately *not* polyfilled any more (all native across the support * window): the **Popover API** (Chrome 114, Firefox 125, Safari 17, iOS 18.3) * and **Invoker Commands** `command`/`commandfor` (Chrome 135, Firefox 144, * Safari 26.2). CSS anchor positioning is below the floor but has no polyfill * here — the components gate it behind `@supports` instead. */ declare const POLYFILLS: readonly CdnDependency[]; /** CDN mode for `buildHead` — kit files served from jsDelivr (ticket 06). */ export interface CdnHeadOptions { /** Exact published `@zazz-ui/core` version (`"0.1.0"`; never a dist-tag). */ version: string; /** * Granular grain: the primitives this page uses. Their dependency closure * (via the kit manifest) decides which css/js files load. Omit for the * bundle grain (`dist/zazz.css` + `dist/zazz.js`, whole kit, two requests). */ primitives?: string[]; /** * The version's `dist/sri.json` contents (package-relative path → sha384). * When provided, every kit URL gets `integrity` + `crossorigin` (links and * script tags directly; transitive module imports via the import map's * `integrity` section). Omitted → plain pinned URLs. */ sri?: Record; } /** Options for `buildHead`. */ export interface HeadOptions { /** * URL prefix to the kit's `src/` contents, no trailing slash — where * `index.css` and `index.js` live. Default `"./zazz"` (the documented copy * location); the docs preview iframe passes `"/zazz/src"`. */ base?: string; /** * Serve the kit from jsDelivr instead of a local copy: pinned, optionally * SRI-checked URLs into the published package. Mutually exclusive with * `base`. */ cdn?: CdnHeadOptions; /** * Load component behavior: the import map, the polyfills, and the * `index.js` module. `false` renders a style-only head. Default `true`. */ scripts?: boolean; /** Geist font loading; `false` skips the block entirely. Default `"swap"`. */ fontDisplay?: "swap" | "optional" | false; /** Include the inline theme-persistence script (last in head). Default `true`. */ theme?: boolean; } /** * @description Builds the canonical Zazz `` contents: meta tags, fonts, * the single stylesheet link, and (unless `scripts: false`) the import map, * polyfills, and `index.js` module tag, ending with the theme script. Page * specifics (``, prefetch hints, override stylesheets) belong after * this block, outside the contract. * * @param options - See `HeadOptions`. * @returns The head markup (no surrounding `<head>` tag). * @example * buildHead(); // full head for "./zazz" * buildHead({ base: "/zazz/src", scripts: false, fontDisplay: "optional" }); */ export declare function buildHead(options?: HeadOptions): string; export { ESM_DEPENDENCIES, POLYFILLS, cdnUrl }; export type { CdnDependency }; //# sourceMappingURL=head.d.ts.map