/** * Custom Directive System * Allows creating reusable DOM manipulation behaviors * * @example * // Register a directive * Gyos.directive('focus', { * mounted(el) { * el.focus(); * } * }); * * // Use in HTML * // */ import type { Directive } from '../types'; /** * Register a custom directive * * @param name - Directive name (without 'g-' prefix) * @param def - Directive definition with lifecycle hooks or simple function * * @example * // Full definition * Gyos.directive('tooltip', { * mounted(el, binding) { * el.title = binding.value; * }, * updated(el, binding) { * el.title = binding.value; * }, * unmounted(el) { * el.title = ''; * } * }); * * @example * // Shorthand (function applies to both mounted and updated) * Gyos.directive('color', (el, binding) => { * el.style.color = binding.value; * }); */ export declare function directive(name: string, def: Directive | Function): void; /** * Get a directive */ export declare function getDirective(name: string): Directive | undefined; /** * Apply directive to element */ export declare function applyDirective(el: HTMLElement, name: string, value: any, arg?: string[]): () => void; //# sourceMappingURL=directive.d.ts.map