/** * annealer * * @description Reorders HTML/Vue attributes by semantic meaning using swappable YAML profiles. * @author Logue * @license MIT * @version 0.1.0-alpha.1 * @see {@link https://github.com/logue/annealer} */ import { FormatOptions } from './types/FormatOptions.js'; import { Language } from './types/Language.js'; export { FormatOptions } from './types/FormatOptions.js'; export { Language } from './types/Language.js'; export { Meta } from './types/Meta.js'; /** Built-in profile names. */ export type BuiltinProfile = 'html' | 'vue'; /** Built-in class order names. */ export type BuiltinClassOrder = 'tailwind'; /** * Compiles the WebAssembly core ahead of the first `format` call without * blocking. Optional: `format` compiles it synchronously when needed. */ export declare const init: () => Promise; /** * Reorders attributes (HTML, Vue) or declarations (CSS, SCSS, Sass, Less) * by semantic meaning, and optionally the classes of static `class` * attributes (`classOrder`, `removeDuplicateClasses`) and the layout rules * `selfClosing`, `voidSelfClosing`, `expandNonVoid` and `contentNewline`. * * @throws {Error} when the input or the profile is invalid. */ export declare const format: (input: string, options?: FormatOptions) => string; /** Infers the language from a file name or path. */ export declare const languageFromPath: (path: string) => Language | undefined; /** The YAML text of a built-in profile, as a starting point for a custom one. */ export declare const builtinProfile: (name: BuiltinProfile) => string; /** * The YAML text of a built-in class order, as a starting point for a custom * one. */ export declare const builtinClassOrder: (name: BuiltinClassOrder) => string;