UNPKG

rynex

Version:

A minimalist TypeScript framework for building reactive web applications with no virtual DOM

57 lines 1.77 kB
/** * Rynex Style Utilities * Advanced styling helpers */ import { DOMProps } from '../dom.js'; /** * Theme context for managing application theme */ interface Theme { [key: string]: any; } /** * Set application theme */ export declare function setTheme(theme: Theme): void; /** * Get current theme */ export declare function getTheme(): Theme; /** * Use theme hook * Returns current theme and updates when theme changes */ export declare function useTheme(callback: (theme: Theme) => void): () => void; /** * Styled component creator * Creates a component with predefined styles */ export declare function styled<P extends DOMProps>(tag: string, styles: Partial<CSSStyleDeclaration> | ((props: P) => Partial<CSSStyleDeclaration>)): (props: P, ...children: any[]) => HTMLElement; /** * Conditional class names helper * Combines class names based on conditions */ export declare function classNames(...args: (string | Record<string, boolean> | false | null | undefined)[]): string; /** * Merge style objects * Deep merges multiple style objects */ export declare function mergeStyles(...styles: (Partial<CSSStyleDeclaration> | Record<string, any> | null | undefined)[]): Record<string, any>; /** * Create CSS variables from theme */ export declare function createCSSVariables(theme: Theme, prefix?: string): string; /** * Apply theme as CSS variables to root */ export declare function applyThemeVariables(theme: Theme, prefix?: string): void; /** * Get CSS variable value */ export declare function getCSSVariable(name: string, element?: HTMLElement): string; /** * Set CSS variable value */ export declare function setCSSVariable(name: string, value: string, element?: HTMLElement): void; export {}; //# sourceMappingURL=styles.d.ts.map