import { Directive } from '@alwatr/directive'; import type { BindingValue } from './type.js'; /** * A declarative DOM directive that binds an element's `textContent` to a view model property. * * Syntax: `bind_text="namespace.propertyName"` * * It subscribes to the projected computed signal of the namespace and surgically updates * the element's `textContent` whenever the property changes. * * Supports deferred viewport initialization if the `lazy_bind` attribute is present on the element. * * @example * ```html * *

Loading...

* * *

Loading summary...

* ``` */ export declare class BindTextDirective 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; /** * Reactive state containing the current bound value. * Triggers an element update on assignment. */ protected accessor bindingValue_: BindingValue; /** * Main binding initialization logic. Parses the namespace and property key, * retrieves the ViewModel signal, and subscribes to state changes. */ protected bindingInit_(): void; /** * Renders the current bound value to the element's `textContent`. * Nullish values render as an empty string. */ protected update_(): void; } /** * Helper to register `BindTextDirective` lazily under the `bind_text` attribute. */ export declare const registerBindTextDirective: import("@alwatr/directive").RegisterDirectiveFunction; //# sourceMappingURL=directive_bind_text.d.ts.map