import { type SvgToFontOptions } from './index.js'; import { type CreateSVGResult } from './multicolor.js'; /** * SVG to SVG font */ export declare function createSVG(options?: SvgToFontOptions): Promise; /** * Converts a string to pascal case. * * @example * * ```js * toPascalCase('some_database_field_name'); // 'SomeDatabaseFieldName' * toPascalCase('Some label that needs to be pascalized'); * // 'SomeLabelThatNeedsToBePascalized' * toPascalCase('some-javascript-property'); // 'SomeJavascriptProperty' * toPascalCase('some-mixed_string with spaces_underscores-and-hyphens'); * // 'SomeMixedStringWithSpacesUnderscoresAndHyphens' * ``` */ export declare const toPascalCase: (str: string) => string; export declare function filterSvgFiles(svgFolderPath: string): string[]; export declare function snakeToUppercase(str: string): string; /** Enum member for a normalized icon name. Leading digits are not valid identifiers. */ export declare function toEnumMember(name: string): string; /** * CSS-ident-safe icon name. Characters outside [A-Za-z0-9_-] become "-". * Leading and trailing hyphens are removed. A leading digit is prefixed * with "_" so the result can be a class, a SCSS variable, and an SVG id. * Names that are already valid are left unchanged. Ligatures keep using * the original file name. */ export declare function normalizeIconName(fileName: string): string; export type IconFile = { filePath: string; /** SVG file name without the extension. */ originalName: string; /** Normalized name used for classes, variables, and ids. */ name: string; }; /** * SVG icons in a folder, with file names normalized to one shared identifier. * Throws when a file name cannot be normalized, or when two files normalize * to the same name. */ export declare function listIconFiles(svgFolderPath: string): IconFile[]; export type TypescriptOptions = { extension?: 'd.ts' | 'ts' | 'tsx'; enumName?: string; }; /** * Create typescript declarations for icon classnames */ export declare function createTypescript(options: Omit & { typescript: TypescriptOptions | true; }): Promise; /** * SVG font to TTF */ export declare function createTTF(options?: SvgToFontOptions): Promise; /** * TTF font to EOT */ export declare function createEOT(options: SvgToFontOptions, ttf: Buffer): Promise; /** * TTF font to WOFF */ export declare function createWOFF(options: SvgToFontOptions, ttf: Buffer): Promise; /** * TTF font to WOFF2 */ export declare function createWOFF2(options: SvgToFontOptions, ttf: Buffer): Promise; /** * Create SVG Symbol */ export declare function createSvgSymbol(options?: SvgToFontOptions): Promise; export type CSSOptions = { /** * Output the css file to the specified directory */ output?: string; /** * Which files are exported. */ include?: RegExp; /** * Setting font size. */ fontSize?: string | boolean; /** * Set the path in the css file * https://github.com/jaywcjlove/svgtofont/issues/48#issuecomment-739547189 */ cssPath?: string; /** * Set file name * https://github.com/jaywcjlove/svgtofont/issues/48#issuecomment-739547189 */ fileName?: string; /** * Ad hoc template variables. */ templateVars?: Record; /** * When including CSS files in a CSS file, * you can add a timestamp parameter or custom text to the file path to prevent browser caching issues and ensure style updates are applied. @default true * @example `path/to/iconfont.css?t=1612345678` */ hasTimestamp?: boolean | string; }; /** * Copy template files */ export declare function copyTemplate(inDir: string, outDir: string, { _opts, ...vars }: Record & { _opts: CSSOptions; }): Promise; /** * Create HTML */ export declare function createHTML(templatePath: string, data: Record): string; export declare function generateFontFaceCSS(fontName: string, cssPath: string, timestamp: number, excludeFormat: string[], hasTimestamp?: boolean | string): string; export declare const getDefaultOptions: (options: SvgToFontOptions) => SvgToFontOptions;