domsubi
Version:
A Virtual-DOM Library for JavaScript
27 lines (26 loc) • 1.06 kB
TypeScript
import { jsxml as _jsxml } from "./jsxml";
import { jshtml as _jshtml } from "./jshtml";
import { AttributesSource, EventStreamMap, NodeSource } from "./types";
import { Cell } from "sodiumjs";
/**
* ターゲットのイベントをStream化する。
*/
export declare const events: (t: EventTarget) => EventStreamMap;
/**
* ターゲットの変異をStream化する。
*/
export declare const mutations: (n: Node, init?: MutationObserverInit | undefined) => import("sodiumjs").Stream<MutationRecord>;
/**
* ターゲットの属性をCell化する。
*/
export declare const attributes: (e: Element, filter?: string[] | undefined) => {
[key: string]: Cell<string>;
};
/**
* jshtml記法のノードをElementにラップする
*/
export declare const wrap: (tag: string, attrs?: AttributesSource | undefined) => (content: NodeSource) => {
[x: string]: NodeSource;
};
export declare const jsxml: typeof _jsxml & ((s: NodeSource) => _jsxml);
export declare const jshtml: typeof _jshtml & ((s: NodeSource) => _jshtml);