| Server IP : 159.203.156.69 / Your IP : 216.73.217.172 Web Server : nginx/1.24.0 System : Linux main-ubuntu 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/tanviranik.com/node_modules/vinext/dist/shims/ |
Upload File : |
//#region src/shims/font-local.d.ts
/**
* next/font/local shim
*
* Provides a runtime-compatible shim for Next.js local fonts.
* Generates @font-face CSS declarations and returns an object
* with className, style, and variable properties.
*
* Supports both client-side injection and SSR collection,
* matching the patterns used by the Google font shim.
*
* Usage:
* import localFont from 'next/font/local';
* const myFont = localFont({ src: './my-font.woff2' });
* // myFont.className -> unique CSS class
* // myFont.style -> { fontFamily: "'__local_font_0', sans-serif" }
* // myFont.variable -> generated class name (e.g. "__variable_local_0")
*/
type LocalFontSrc = {
path: string;
weight?: string;
style?: string;
};
type LocalFontOptions = {
src: string | LocalFontSrc | LocalFontSrc[];
display?: string;
weight?: string;
style?: string;
fallback?: string[];
preload?: boolean;
variable?: string;
adjustFontFallback?: boolean | string;
declarations?: Array<{
prop: string;
value: string;
}>;
};
type FontResult = {
className: string;
style: {
fontFamily: string;
};
variable?: string;
};
/**
* Get collected SSR font styles (used by the renderer).
* Note: We don't clear the arrays because fonts are loaded at module import
* time and need to persist across all requests in the Workers environment.
*/
declare function getSSRFontStyles(): string[];
/**
* Get collected SSR font preload data (used by the renderer).
* Returns an array of { href, type } objects for emitting
* <link rel="preload" as="font" ...> tags.
*/
declare function getSSRFontPreloads(): Array<{
href: string;
type: string;
}>;
declare function localFont(options: LocalFontOptions): FontResult;
//#endregion
export { localFont as default, getSSRFontPreloads, getSSRFontStyles };
//# sourceMappingURL=font-local.d.ts.map