/** * @fileoverview The kit's distribution manifest: machine-readable facts about * every primitive — its files, its dependencies on other primitives and base * scripts, its bare npm imports, and its example fragments. * @description This is the single data source for anything that assembles a * subset of the kit: the `zazz-ui` CLI (`add` resolves the dependency closure * from `PRIMITIVES`), the docs site (install blocks and previews), and the * head builder's granular CDN mode. Presentation metadata for the docs * previews (iframe heights, placement) is docs-site state and lives in the * docs app (`apps/docs/lib/preview-manifest.ts`), not in the published kit. * * Paths are tarball-relative to the package `src/` root. Script fields list * the emitted `.js` files (the published, browser-runnable form); consumers * that want `.ts` sources or `.d.ts` types swap the extension. `manifest.test.ts` * guards this file against drift: every primitive directory must have an * entry, every listed file must exist, and every bare specifier must be * pinned in `head.ts`'s import map. */ /** * Compatibility version of this manifest's shape. Consumers (the CLI) declare * the range they understand and fail gracefully on a newer value. Bumping it * is by definition a breaking kit change (ADR-0010). */ export declare const MANIFEST_VERSION = 1; /** One primitive's distribution facts. All paths are `src/`-relative. */ export interface PrimitiveEntry { /** Stylesheets owned by the primitive (usually one; empty = markup-only). */ css: string[]; /** Scripts owned by the primitive, in load order. */ js: string[]; /** * Non-core `base/` scripts its behavior needs, in load order. The core * runtime (`utils`, `signals`, `zazz-element`, `dialog-lifecycle`) is * assumed present (vendored by `init`, bundled in `dist/zazz.js`) and is * never listed here. */ base: string[]; /** Other primitives whose css/markup contract this primitive requires. */ primitives: string[]; /** * Bare npm specifiers reachable from this primitive's script chain (its own * `js` plus `base` plus the core runtime they import). Every value must have * an import-map pin in `head.ts`; a page loading this primitive's scripts * granularly needs these mapped. */ bare: string[]; /** Example fragments (`--examples`, docs previews). */ examples: string[]; } /** * Every primitive in the kit, keyed by directory name under `src/primitives/`. * `primitives` dependencies mirror each stylesheet's `@requires` header (the * authoritative record of cross-primitive contracts); markup-only primitives * list the primitives their canonical example composes. */ export declare const PRIMITIVES: Record; /** * Primitive names in the exact `@import` order of `src/index.css`. Anything * assembling a stylesheet subset (the CLI's `add`, the granular CDN head) * must emit primitive css in this order so component scopes cascade the way * the kit was designed and tested. Markup-only primitives (no css) do not * appear. `manifest.test.ts` asserts this list matches `index.css` exactly. */ export declare const CSS_CASCADE_ORDER: string[]; /** * @description Resolves a set of primitive names to its full dependency * closure — every primitive the requested ones require, transitively. This is * the resolution the CLI's `add` and the granular CDN head share. * * @param names - Primitive names to resolve (keys of `PRIMITIVES`). * @returns The closure in canonical cascade order (markup-only members, which * have no cascade position, sort last in name order). * @throws {Error} On an unknown primitive name. * @example * resolveClosure(["combobox"]); * // ["fields", "badge", "kbd", "button", "popover", "select", "combobox"] */ export declare function resolveClosure(names: string[]): string[]; export type ExampleScript = "autocomplete" | "combobox" | "command" | "command-actions" | "embla" | "reveal" | "carousel" | "checkbox" | "lightbox" | "menu" | "multiselect" | "otp" | "password" | "tabs" | "toaster"; /** * Emitted script files (relative to the package `src/` root) that implement each * web-component script id. This is the single mapping from script ids to files * on disk: consumers (like the docs "JS" tab) resolve these against the * package's `src/` directory. Entries list dependencies first (`lightbox` needs * `carousel.js` loaded before `lightbox.js`). Script ids are example-level and * finer-grained than `PRIMITIVES` (e.g. `command-actions`); every file listed * here must also be reachable from a `PRIMITIVES` entry (`manifest.test.ts`). */ export declare const WEB_COMPONENT_SCRIPT_FILES: Partial>; //# sourceMappingURL=manifest.d.ts.map