/** @type {ExcludeKeys} - Keys to exclude from variant configurations. Currently includes `'defaultVariants'` and `''`. */ type ExcludeKeys = 'defaultVariants' | ''; /** @type {Undefined} - Utility type to exclude `undefined` from a given type `T`. */ type Undefined = T extends undefined ? never : T; /** * @type {cvxProps} - Extracts the properties of the first argument of a given function type `T`, excluding `ExcludeKeys`. * @example * @see {@link https://ilkhoeri.github.io/cretex/cvx#cvxprops Docs} */ export type cvxProps any> = Omit[0]>, ExcludeKeys>; /** * @type {cvxKeys} - Describes a structure for variant configurations, where each key maps to a set of possible string values. */ export type cvxKeys = { [key: string]: { [key: string]: string; }; }; /** * @type {cvxResult} - Represents a mapping of variant keys to one of their possible values. */ export type cvxResult = { [K in keyof T]?: keyof T[K]; }; /** * @interface `cvxRecord` - Configuration object for defining variants and their options. * @property `string` `[assign]` - An optional base class name to prepend to the generated string. * @property `T` variants - Defines the variant keys and their possible values. * @property `cvxResult` `[defaultVariants]` - Optional default variant mappings. */ export interface cvxRecord { assign?: string; variants: T; defaultVariants?: cvxResult; } /** * A utility function for managing values based on variant configurations. * * This function simplifies the handling of value generation with support for variants, default values, and dynamic overrides. * @template T - The type of variant keys and their possible values. * @param {cvxRecord} keys - The configuration object containing: * - `assign` (optional): A base value to always include. * - `variants`: An object defining variant keys and their possible values as classes. * - `defaultVariants` (optional): Default variant values for each variant key. * @returns {(result?: cvxResult) => string} - A function that takes a `result` object to override default variants * and generates a class name string. * @example * @see {@link https://ilkhoeri.github.io/cretex/cvx Docs} */ export declare function cvx(keys: cvxRecord): (result?: cvxResult) => string; export {};