/** * adowire client — adowire:click directive * * Uses event delegation on `document` to intercept clicks on any element * carrying a `adowire:click` attribute, resolves the nearest [adowire:id] ancestor * component, parses the attribute value into a method name + params, and * commits the action to the server. * * Supported attribute value formats: * "increment" → { method: 'increment', params: [] } * "addAmount(5)" → { method: 'addAmount', params: [5] } * "$set('count', 0)" → { method: '$set', params: ['count', 0] } * "save(true, 'foo')" → { method: 'save', params: [true, 'foo'] } */ import type { WireCall } from '../types.js'; /** * Parse the string value of a `adowire:click` (or similar) attribute into a * `WireCall` descriptor. * * Grammar handled (intentionally simple — not a full JS parser): * expr = ident | ident "(" arglist ")" * ident = [A-Za-z_$][A-Za-z0-9_$]* * arglist = arg ("," arg)* * arg = string | number | boolean | null | undefined * string = "'" … "'" | '"' … '"' */ export declare function parseActionExpression(expr: string): WireCall; export declare function registerClickDirective(): void;