import type { HsonNode } from "../../../core/types.js"; import type { DocumentLiveMap, LiveMapPathHandle } from "../../../types/livemap.types.js"; import type { LiveTree } from "../livetree.js"; type LiveTreeBindable = Pick; export type LiveTreeBindApi = Readonly<{ path: (source: TSource, apply: PathApply>>) => LiveMapDisposer; paths: (sources: TSources, apply: PathsApply>) => LiveMapDisposer; textPaths: (sources: TSources, toText: PathsTextMapper>) => LiveMapDisposer; text: (source: TSource, ...formatter: TextFormatterArgument) => LiveMapDisposer; attr: (source: TSource, name: string, ...formatter: TextFormatterArgument) => LiveMapDisposer; attrs: (source: TSource, toAttrs: AttrMapper>>) => LiveMapDisposer; attrsPaths: (sources: TSources, toAttrs: PathsAttrMapper>) => LiveMapDisposer; css: (source: TSource, toCss: CssMapper>>) => LiveMapDisposer; cssPaths: (sources: TSources, toCss: PathsCssMapper>) => LiveMapDisposer; }>; export declare function make_livetree_bind_api(tree: TTree): LiveTreeBindApi; type LiveMapDisposer = () => void; type ProjectedBindingSource = Pick, "snap" | "watch" | "feed">; type DocumentBindingSource = ReturnType; type BindingSource = ProjectedBindingSource | DocumentBindingSource; type BindingValue = ReturnType; type BindingValues = { readonly [TIndex in keyof TSources]: BindingValue; }; type TextFormatterArgument = TSource extends ProjectedBindingSource ? readonly [toText?: TextMapper>>] : [Extract, HsonNode>] extends [never] ? readonly [toText?: TextMapper>>] : readonly [toText: TextMapper>>]; type PathApply = (tree: TTree, value: TValue, previous: TValue | undefined) => void; type PathsApply = (tree: TTree, values: TValues, previous: TValues | undefined) => void; type CssValueMap = Readonly>; type AttrValueMap = Readonly>; type CssMapper = (value: TValue, previous: TValue | undefined) => CssValueMap; type AttrMapper = (value: TValue, previous: TValue | undefined) => AttrValueMap; type TextMapper = (value: TValue, previous: TValue | undefined) => string; type PathsCssMapper = (values: TValues, previous: TValues | undefined) => CssValueMap; type PathsAttrMapper = (values: TValues, previous: TValues | undefined) => AttrValueMap; type PathsTextMapper = (values: TValues, previous: TValues | undefined) => string; export declare function bind_path(this: TTree, source: TSource, apply: PathApply>>): LiveMapDisposer; export declare function bind_paths(this: TTree, sources: TSources, apply: PathsApply>): LiveMapDisposer; export declare function bind_text_paths(this: TTree, sources: TSources, toText: PathsTextMapper>): LiveMapDisposer; export declare function bind_text(this: TTree, source: TSource, ...formatter: TextFormatterArgument): LiveMapDisposer; export declare function bind_attr(this: TTree, source: TSource, name: string, ...formatter: TextFormatterArgument): LiveMapDisposer; export declare function bind_attrs_paths(this: TTree, sources: TSources, toAttrs: PathsAttrMapper>): LiveMapDisposer; export declare function bind_attrs(this: TTree, source: TSource, toAttrs: AttrMapper>>): LiveMapDisposer; export declare function bind_css_paths(this: TTree, sources: TSources, toCss: PathsCssMapper>): LiveMapDisposer; export declare function bind_css(this: TTree, source: TSource, toCss: CssMapper>>): LiveMapDisposer; export {}; //# sourceMappingURL=livetree.bind.d.ts.map