import { Directive } from '@alwatr/directive'; import { type BindingValue } from './main.js'; /** * A declarative DOM directive that binds CSS custom properties (variables) to view model properties. * * Syntax: `bind_css_var="--var-name: namespace.propertyName; --another-var: namespace.anotherProperty"` * * Supports binding multiple CSS variables on the same element separated by semicolons (`;`). * * Behavior: * - `null` / `undefined` value: Removes the CSS variable from the element's inline style. * - Any other type: Coerced via `String(value)` and set as the CSS variable's value on the element's style. * * Includes a redundant write guard (via `lastValues_`) that skips calls to the DOM if the property value hasn't changed. * Supports deferred viewport initialization if the `lazy_bind` attribute is present on the element. * * @example * ```html * *
* * * * * * * ``` */ export declare class BindCssVarDirective extends Directive { /** * Attribute flag used to defer binding initialization until the element enters the viewport. * If `lazy_bind` attribute exists, this is non-null. */ protected accessor lazyBinding_: null | string; /** * Initializes the directive. * Checks if lazy binding is enabled via `lazy_bind`. * If yes, delegates the initialization to `lazyInit_`; otherwise, initializes immediately. */ protected init_(): void; /** * Cache of the last applied values to guard against redundant DOM modifications. */ protected lastValues_: Record