import { ChildPart, LitElement, RenderOptions, TemplateResult } from 'lit'; import { RefOrCallback } from 'lit/directives/ref.js'; import { ObservableObject } from './shared-state/index.js'; export declare class ViewContext { count: number; valueMap: WeakMap; keyMap: Map; } export interface ViewAnimation { keyframes: Keyframe[] | PropertyIndexedKeyframes | null; options?: number | KeyframeAnimationOptions | undefined; } export declare type EventHandler = (_: T) => void; export declare abstract class View { protected attrs: { [key: string]: string | boolean; }; protected styles: { [key: string]: string; }; protected animations: ViewAnimation[]; protected events: { [key: string]: EventHandler; }; protected elementRef?: RefOrCallback; static contextStore: Map; abstract get body(): TemplateResult; static root(element: ViewElement): Element; viewRoot(element: Element): Element; withAnimations(animations: ViewAnimation[]): this; slot(name: string): this; color(color: string): this; style(nameOrStyles: string | { [key: string]: string; }, value?: string): this; ref(elRef: RefOrCallback): this; attr(nameOrAttrs: string | { [key: string]: string | boolean; }, value?: string | boolean): this; className(...name: string[]): this; context(token: string, value: any): this; environmentObject(obj: T): this; protected addKeyboardEvent(eventName: string, key: string, handler: EventHandler): this; onKeydown(key: string, handler: EventHandler): this; onKeypress(key: string, handler: EventHandler): this; onKeyup(key: string, handler: EventHandler): this; onClick(handler: (_: MouseEvent) => void): this; onDblclick(handler: EventHandler): this; onMouseup(handler: EventHandler): this; onMousedown(handler: EventHandler): this; on(eventName: string, handler: EventHandler): this; } export declare function render(result: unknown, container: HTMLElement | DocumentFragment, options?: Partial): ChildPart; export declare type ViewElement = LitElement & { view: T; }; export declare function createView(template: ((opts: { attrs: { [key: string]: string | boolean; }; styles: { [key: string]: string; }; animations: ViewAnimation[]; events: { [key: string]: EventHandler; }; }) => TemplateResult) | TemplateResult): View; export declare type Clazz = new (...args: any[]) => T;