@muban/muban
Version:
Writing components for server-rendered HTML
44 lines (43 loc) • 2.33 kB
TypeScript
import type { BindingsHelpers, DataBinding } from './bindings.types';
import { attrBinding } from './dom/attrBinding';
import { checkedBinding, checkedValueBinding } from './dom/checkedBinding';
import { cssBinding } from './dom/cssBinding';
import { disableBinding, enableBinding } from './dom/enableDisableBinding';
import { eventBinding } from './dom/eventBinding';
import { hasFocusBinding } from './dom/hasFocusBinding';
import { htmlBinding } from './dom/htmlBinding';
import { styleBinding } from './dom/styleBinding';
import { submitBinding } from './dom/submitBinding';
import { textBinding } from './dom/textBinding';
import { textInputBinding } from './dom/textInputBinding';
import { valueBinding } from './dom/valueBinding';
import { hiddenBinding, visibleBinding } from './dom/visibleHiddenBinding';
export declare const bindingsList: {
event: typeof eventBinding;
click: (target: HTMLElement, fn: (event: MouseEvent) => void) => () => void;
mousedown: (target: HTMLElement, fn: (event: MouseEvent) => void) => () => void;
mouseenter: (target: HTMLElement, fn: (event: MouseEvent) => void) => () => void;
mouseleave: (target: HTMLElement, fn: (event: MouseEvent) => void) => () => void;
mousemove: (target: HTMLElement, fn: (event: MouseEvent) => void) => () => void;
mouseout: (target: HTMLElement, fn: (event: MouseEvent) => void) => () => void;
mouseover: (target: HTMLElement, fn: (event: MouseEvent) => void) => () => void;
mouseup: (target: HTMLElement, fn: (event: MouseEvent) => void) => () => void;
submit: typeof submitBinding;
text: typeof textBinding;
html: typeof htmlBinding;
css: typeof cssBinding;
style: typeof styleBinding;
attr: typeof attrBinding;
visible: typeof visibleBinding;
hidden: typeof hiddenBinding;
enable: typeof enableBinding;
disable: typeof disableBinding;
hasFocus: typeof hasFocusBinding;
value: typeof valueBinding;
checked: typeof checkedBinding;
checkedValue: typeof checkedValueBinding;
textInput: typeof textInputBinding;
allowUnset: DataBinding<boolean>;
initialValueSource: DataBinding<"binding" | "html">;
};
export declare function registerDomBinding(name: string, fn: (target: HTMLElement, value: any, bindingHelpers: BindingsHelpers) => void | (() => void)): void;