@sc4rfurryx/proteusjs
Version:
The Modern Web Development Framework for Accessible, Responsive, and High-Performance Applications. Intelligent container queries, fluid typography, WCAG compliance, and performance optimization.
61 lines (59 loc) • 1.93 kB
TypeScript
/**
* @sc4rfurryx/proteusjs/container
* Container/Style Query helpers with visualization devtools
*
* @version 2.0.0
* @author sc4rfurry
* @license MIT
*/
interface ContainerOptions {
type?: 'size' | 'style';
inlineSize?: boolean;
}
/**
* Sugar on native container queries with dev visualization
*/
declare function defineContainer(target: Element | string, name?: string, opts?: ContainerOptions): void;
/**
* Helper to create container query CSS rules
*/
declare function createContainerQuery(containerName: string, condition: string, styles: Record<string, string>): string;
/**
* Apply container query styles dynamically
*/
declare function applyContainerQuery(containerName: string, condition: string, styles: Record<string, string>): void;
/**
* Remove container query styles
*/
declare function removeContainerQuery(containerName: string): void;
/**
* Get container size information
*/
declare function getContainerSize(target: Element | string): {
width: number;
height: number;
};
/**
* Check if container queries are supported
*/
declare function isSupported(): boolean;
/**
* Cleanup container overlays and observers
*/
declare function cleanup(target: Element | string): void;
/**
* Toggle dev overlay visibility
*/
declare function toggleDevOverlay(visible?: boolean): void;
declare const _default: {
defineContainer: typeof defineContainer;
createContainerQuery: typeof createContainerQuery;
applyContainerQuery: typeof applyContainerQuery;
removeContainerQuery: typeof removeContainerQuery;
getContainerSize: typeof getContainerSize;
isSupported: typeof isSupported;
cleanup: typeof cleanup;
toggleDevOverlay: typeof toggleDevOverlay;
};
export { applyContainerQuery, cleanup, createContainerQuery, _default as default, defineContainer, getContainerSize, isSupported, removeContainerQuery, toggleDevOverlay };
export type { ContainerOptions };