/** * The module specifiers in one source file. A small lexer, not a regex over the * text: comments, regex literals and template literals (with `${…}` nesting) are * skipped, and a string counts only when the code right before it is `from`, * `import`, `import(`, `require(` or CSS `@import` — so a specifier quoted in a * comment, or a string that merely ends in "from ", is never read as an import. * CSS has only block comments and strings. */ export declare function findSpecifiers(src: string, css: boolean): string[]; export type FontImport = { family: string; subpath: string; }; export type FontScan = { fonts: FontImport[]; refused: string[]; }; /** * Classify one import specifier found in `designs//`. * Returns null when it does not point into app/fonts at all. */ export declare function classifyFontSpecifier(spec: string, fileInPack: string, slug: string): FontImport | "refused" | null; /** Every app/fonts import in a pack's files (path relative to the pack → source). */ export declare function scanFontImports(files: { path: string; src: string; }[], slug: string): FontScan; /** The scannable source files of a fetched pack (symlinks are not read). */ export declare function readPackSources(packDir: string): { path: string; src: string; }[]; /** True when both folders hold the same regular files with the same bytes; any symlink, the roots included, makes them differ. */ export declare function sameTree(a: string, b: string): boolean; /** * The imported module resolves to a FILE inside `dir`: `font` → font.ts, …; * TS-ESM `font.js` → font.ts; `sub` → sub/index.ts; the bare family (`""`) → * index.ts. A directory alone, or any other file, does not count. */ export declare function hasModule(dir: string, subpath: string): boolean; /** Fetch `app/fonts/` from the template into `dir`. */ export type FetchFontFolder = (family: string, dir: string) => Promise; export type FontInstallResult = { added: string[]; identical: string[]; kept: string[]; /** Already in the project with every imported module; the template's copy could not be fetched to compare. */ present: string[]; /** Already in the project but missing a module the pack imports (or not a folder); left untouched, not fetched. */ incomplete: string[]; /** Fetched, but not written: `app/` or `app/fonts/` is a symlink or a file here. */ blocked: string[]; failed: string[]; refused: string[]; }; /** * Bring in every app/fonts/ the pack at `packDir` imports. Folders are * fetched into a temp dir first and copied only when the project lacks them. */ export declare function installFontFolders(opts: { cwd: string; packDir: string; slug: string; fetchFolder: FetchFontFolder; }): Promise; /** Human lines for the CLI output; empty when the pack imports no fonts. */ export declare function describeFontInstall(r: FontInstallResult, ref: string): { ok: string[]; warn: string[]; };