resig.js
Version:
Universal reactive signal library with complete platform features: signals, animations, CRDTs, scheduling, DOM integration. Works identically across React, SolidJS, Svelte, Vue, and Qwik.
32 lines (31 loc) • 1.64 kB
TypeScript
/**
* DOM Integration Module
* Provides DOM utilities and bindings for Signal-Σ
*/
import { Signal } from '../core/signal';
export declare const domSignal: <T>(initialValue: T) => Signal<T> & {
_set: (value: T) => void;
};
export declare const bindElement: (element: HTMLElement, sig: Signal<any>) => () => void;
export declare const bindEvent: (element: HTMLElement, event: string, sig: Signal<any> & {
_set: (value: any) => void;
}) => () => void;
export declare const bindAttribute: (element: HTMLElement, attribute: string, sig: Signal<any>) => () => void;
export declare const bindProperty: (element: HTMLElement, property: string, sig: Signal<any>) => () => void;
export declare const domBlock: (element: HTMLElement) => {
element: HTMLElement;
render: () => HTMLElement;
};
export declare const reactiveDOMBlock: (element: HTMLElement, sig: Signal<any>) => {
element: HTMLElement;
signal: Signal<any>;
render: () => HTMLElement;
};
export declare const syncCRDTToDOM: (_element: HTMLElement, _crdt: any) => () => void;
export declare const bindFormToSignal: (form: HTMLFormElement, sig: Signal<any> & {
_set: (value: any) => void;
}) => () => void;
export declare const delegate: (element: HTMLElement, selector: string, event: string, handler: (e: Event) => void) => () => void;
export declare const animateElement: (_element: HTMLElement, _animation: any) => Promise<void>;
export declare const observeIntersection: (element: HTMLElement, callback: (entry: any) => void) => () => void;
export declare const observeResize: (element: HTMLElement, callback: (entry: any) => void) => () => void;