import "lightningcss"; //#region scripts/lib/compiler/purge.d.ts /** Marker for an attribute whose values are not known (set from script, or a boolean attribute). */ declare const ANY: unique symbol; type ContentIndex = { tags: Set; classes: Set; ids: Set; attrs: Map | typeof ANY>; safelist: (string | RegExp)[]; /** Content globs that matched no file, filled by buildIndex. */ missed: string[]; /** Number of files scanned, filled by buildIndex. */ files: number; /** * true keeps every rule whose type selectors are the only thing missing from the content. * Class, id and attribute parts are still checked. For sites whose HTML comes from a CMS, * a database or Markdown, where the tags in use cannot be read from the sources. */ keepTypes?: boolean; /** * true judges attributes by name only: a value that was not seen never drops a rule, and * the names a framework or the browser can set at run time count as present. Implies * keepTypes. This is the integrations' "safe" mode. */ conservative?: boolean; }; //#endregion //#region scripts/lib/compiler/types.d.ts type EntryName = "pico" | "classless" | "colors" | "extras"; type ThemeOption = string | { color: string; } | { hue: number; chroma: number; }; type PurgeOptions = { /** Globs of files to scan (HTML, templates, JS). Not needed when `index` is given. */ content?: string[]; /** A ready-made content index, for callers that scan on their own (the integrations). */ index?: ContentIndex; /** Keep rules that only lack type selectors in the content. See ContentIndex.keepTypes. */ keepTypes?: boolean; /** Judge attributes by name only and keep run-time attribute names. See ContentIndex.conservative. */ conservative?: boolean; /** Names that are always kept: classes, ids, tags, attribute names or "name=value". */ safelist?: (string | RegExp)[]; }; type CompileOptions = { /** Which source entry to build. Default "pico". */ entry?: EntryName; /** Module switches by src path, for example "components/modal". Default: all on. */ modules?: Record; /** Shorthand for turning modules off: a list or comma separated string of src paths. */ exclude?: string[] | string; /** Built-in theme name, { color }, { hue, chroma } or the path of a CSS file with token overrides. */ theme?: ThemeOption; /** false drops every selector that needs a class. Default true, false for the classless entry. */ classes?: boolean; /** Adds layout/semantic-container. Default false, true for the classless entry. */ semanticContainer?: boolean; /** Fluid semantic container: no max width. */ fluid?: boolean; /** * Opt-in extras to append to a pico or classless build: a list of names (see EXTRAS), a comma * separated string, "all" or true. Default none. For the "extras" entry the default is all. */ extras?: string[] | string | boolean; /** Folder to read the extras from instead of src/extras. For tests and custom extras. */ extrasDir?: string; /** Selector that prefixes every rule, "" for none. */ scope?: string; /** false keeps the root font size fixed. Default true. */ responsiveTypography?: boolean; /** true adds layout/responsive-spacings. Default false. */ responsiveSpacings?: boolean; /** false removes every transition and animation, as v2.1.1 did. Default true. */ transitions?: boolean; /** false strips !important. Default true. */ important?: boolean; /** Remove rules that cannot match the given content. Default false. */ purge?: PurgeOptions | false; /** * Browserslist query. Default DEFAULT_TARGETS (Chrome and Edge 111, Firefox 128, Safari and * iOS 16.4). "modern" is MODERN_TARGETS (Chrome and Edge 123, Firefox 128, Safari and iOS * 17.5), which keeps native nesting and light-dark() in the output. */ targets?: string | string[]; minify?: boolean; sourceMap?: boolean; /** Text put at the top of the output. */ banner?: string; }; type CompileStats = { entry: EntryName; bytes: number; gzipBytes: number; brotliBytes: number; rules: number; removedByClassless: number; removedByPurge: number; excludedModules: string[]; /** Extras that went into the output. */ extras: string[]; durationMs: number; warnings: string[]; }; type CompileResult = { css: string; map?: string; stats: CompileStats; }; //#endregion //#region scripts/lib/compiler/compile.d.ts export declare function compile(input?: CompileOptions): Promise; /** * One bundle, both the readable and the minified output. Used by the matrix. The minified file * can take a shorter banner than the readable one. */ export declare function compileBoth(input?: CompileOptions, minBanner?: string): Promise<{ plain: CompileResult; min: CompileResult; }>; //#endregion //#region scripts/lib/compiler/matrix.d.ts type Variant = { /** File name stem, as in v2.1.1. */ stem: string; options: CompileOptions; /** v2.1.1 never published the default-theme file of these two. */ noDefaultTheme?: boolean; }; export declare const MATRIX_VARIANTS: Variant[]; /** Every file name the matrix writes, in the order it writes them. */ export declare function matrixNames(): string[]; /** * Writes the whole v2.1.1 file set into outDir, plus the opt-in extras: pico.extras(.min).css * with all of them and extras/(.min).css for each one. Extras files are layered and carry * their own tokens, so they load on their own after pico.css. Returns the stats of each file. */ export declare function buildMatrix(outDir: string): Promise<{ name: string; stats: CompileStats; }[]>; //#endregion //#region scripts/lib/compiler/config.d.ts /** * Default browserslist query: the same floor as Tailwind CSS v4. Lightning CSS lowers nesting, * light-dark() and OKLCH for these browsers and adds the prefixes they still need. Override it * with the `targets` option or --targets. */ export declare const DEFAULT_TARGETS = "chrome >= 111, edge >= 111, firefox >= 128, safari >= 16.4, ios_saf >= 16.4"; /** * Optional higher floor, Baseline 2024 (Chrome and Edge 123, Firefox 128, Safari and iOS 17.5). * Native nesting, light-dark() and OKLCH stay in the output instead of being lowered, which * makes the files smaller. Select it with `targets: "modern"` or `--targets modern`. */ export declare const MODERN_TARGETS = "chrome >= 123, edge >= 123, firefox >= 128, safari >= 17.5, ios_saf >= 17.5"; export declare const THEMES: string[]; export declare const DEFAULT_THEME = "azure"; /** Every switchable module, in import order. Names match the paths under src/. */ export declare const MODULES: string[]; /** Every opt-in extra, in import order. Names match the files under src/extras/. */ export declare const EXTRAS: string[]; export declare function packageInfo(): { name: string; version: string; }; /** Loads pico.config.json, or a .ts/.mjs/.js module with the options as default export. */ export declare function loadConfigFile(path: string): Promise; /** Finds pico.config.{json,ts,mjs,js} in the working directory. */ export declare function findConfigFile(cwd?: string): string | undefined; //#endregion //#region scripts/lib/compiler/report.d.ts /** One line per build, for the CLI. */ export declare function formatStats(label: string, stats: CompileStats): string; /** Table for the matrix command. */ export declare function formatTable(rows: { name: string; stats: CompileStats; }[]): string; //#endregion export type { CompileOptions, CompileResult, CompileStats, EntryName, PurgeOptions, ThemeOption };