woby
Version:
A high-performance framework with fine-grained observable/signal-based reactivity for building rich applications.
35 lines • 1.64 kB
TypeScript
/**
* Custom Element Implementation for Woby Framework
*
* This module provides functionality to create custom HTML elements with reactive properties
* that integrate seamlessly with the Woby framework's observable system. Custom elements
* created with this API can be used both in JSX/TSX and directly in HTML.
*
* Features:
* - Automatic attribute to prop mapping
* - Type conversion for observable props
* - Nested property support (e.g., 'nested$prop$value' or 'nested.prop.value' in HTML, 'nested$prop$value' in JSX)
* - Style property support (e.g., 'style$font-size' or 'style.font-size' in HTML, 'style$font-size' in JSX)
* - Automatic kebab-case to camelCase conversion for all property names
* - Automatic exclusion of properties with { toHtml: () => undefined } from HTML attributes
* - Shadow DOM encapsulation with optional stylesheet adoption
* - Context support for custom elements
* - Custom serialization using toHtml and fromHtml options
*
* Style Encapsulation Options:
* - ignoreStyle: Set to true to prevent adoption of global stylesheets in shadow DOM
*
* @module customElement
*/
import { ObservableMaybe } from "../types";
export declare const useAttached: (ref?: ObservableMaybe<Node | null>, match?: (parent: Node | null) => boolean) => {
parent: import("soby").Observable<Node>;
mount: import("..").JSX.Child;
ref: ObservableMaybe<Node>;
};
export declare const useLightDom: (ref?: ObservableMaybe<Node | null>) => {
lightDom: import("soby").Observable<Node>;
mount: import("..").JSX.Child;
ref: ObservableMaybe<Node>;
};
//# sourceMappingURL=use_attached.d.ts.map