@stylezjs/stylez
Version:
Stylez ā āZā of Zero Runtime | A lightweight utility for generating CSS class names dynamically.
23 lines (22 loc) ⢠800 B
TypeScript
import type { Styles } from '../types.js';
/**
* Registers a new style object for CSS generation.
*
* Ensures that the given style object is only registered once,
* based on its selector hash. This function is intended to be
* called at runtime wherever styles are defined.
*
* @param styles - A style object representing CSS rules.
* @returns The original style object (unmodified).
*
* @example
* const styles = stylez.create({ color: 'red', fontSize: '1.2rem' });
*/
export declare const create: (styles: Styles) => Styles;
/**
* š« INTERNAL USE ONLY ā Used by @stylezjs/stylez build tools to extract generated CSS.
* Not intended for runtime usage.
*/
export declare const getAllCss: () => {
[k: string]: Record<string, import("../core/utils/css-generate.js").CSSProp>;
};