astro-ghostcms/.pnpm-store/v3/files/64/fca3e946a5f97426af1bbf933a4...

35 lines
1.0 KiB
Plaintext

interface Record {
[property: string]: string;
}
interface Source {
path: string;
css?: Record;
style: string;
preload?: boolean;
weight?: string | number;
}
interface Config {
name: string;
src: Source[];
fetch?: boolean;
display: string;
selector?: string;
preload?: boolean;
cacheDir?: string;
basePath?: string;
googleFontsURL?: string;
cssVariable?: string | boolean;
fallback: 'serif' | 'sans-serif';
}
interface Props {
config: Config[];
}
declare function getRelativePath(from: string, to: string): string;
declare function getPreloadType(src: string): string;
declare function generateFonts(fontCollection: Config[]): Promise<Config[]>;
declare function createPreloads(fontCollection: Config): string[];
declare function createBaseCSS(fontCollection: Config): Promise<string[]>;
declare function createFontCSS(fontCollection: Config): Promise<string>;
export { type Props, createBaseCSS, createFontCSS, createPreloads, generateFonts, getPreloadType, getRelativePath };