@tenoxui/browser
Version:
A JavaScript library for creating highly customized, flexible, and extensible utility-first CSS framework
83 lines (82 loc) • 2.24 kB
TypeScript
import { TenoxUI as Core } from 'tenoxui';
import { Config, StatusInfo } from './types';
export declare class TenoxUI extends Core {
private watch;
private styleId;
private selector;
private debounceDelay;
private isInitialized;
private processExisting;
private updateTimeout;
private apply;
private processedClasses;
private observer;
private styleElement;
constructor({ moxie, tabSize, values, classes, aliases, property, variants, safelist, typeOrder, breakpoints, moxieOptions, selectorPrefix, prefixLoaderOptions, reservedVariantChars, apply, watch, debounceDelay, processExisting, selector, styleId }?: Partial<Config>);
/**
* Initialize the TenoxUI instance
*/
init(): this;
/**
* Create or get the style element for injecting CSS
*/
private createStyleElement;
/**
* Scan existing elements and process their classes
*/
private scanAndProcessClasses;
/**
* Create styles from CSS and apply configuration
*/
private createStyles;
/**
* Process an array of class names and generate CSS
*/
private processClasses;
/**
* Inject CSS into the style element
*/
private injectCSS;
/**
* Start observing DOM changes for new classes
*/
private startObserving;
/**
* Handle DOM mutations and extract new classes
*/
private handleMutations;
/**
* Extract classes from an element and its descendants
*/
private extractClassesFromElement;
/**
* Debounce updates to avoid excessive processing
*/
private debouncedUpdate;
/**
* Manually add classes for processing
*/
addClass(...classNames: (string | string[])[]): this;
/**
* Rescan existing elements for classes
*/
rescan(): this;
/**
* Clear all processed classes and rescan
*/
refresh(): this;
/**
* Stop observing DOM changes
*/
stopObserving(): this;
/**
* Destroy the TenoxUI instance and clean up resources
*/
destroy(): this;
/**
* Get status information about the current instance
*/
status(): StatusInfo;
}
export * from './types';
export default TenoxUI;