import { CSSResult } from 'lit-element'; import { TemplateResult } from 'lit-html'; export interface CustomAttributeRegistry { define(name: string, modifier: Function | Modifier): void; get(element: HTMLElement, attrName: string): any; unsubscribe(): void; } export interface ModifierOptions { selector: string; registry?(this: HTMLElement): CustomAttributeRegistry; } export interface Modifier { options: ModifierOptions; } export interface CustomElementConfig { selector: string; template?: (this: T) => TemplateResult; style?: CSSResult; styles?: CSSResult[]; extends?: string; /** Custom attribute registry it is different than proposed ScopedElementRegistry */ registry?: (this: T) => CustomAttributeRegistry; modifiers?: Modifier[]; /** Definitions of custom elements that are imported only for this component */ components?: Constructor[]; /** * Intended only for first render inside the DOM * for example we want app-component to be rendered * inside body of the html page we could do * ``` import { Component, html } from '@rxdi/lit-html'; @Component({ selector: 'app-component', template() { return html` `; }, container: document.body, }) export class AppComponent extends HTMLElement {} ``` */ container?: HTMLElement | DocumentFragment; } type Constructor = new (...args: unknown[]) => T; export declare const Component: (config: CustomElementConfig) => {}>(Base: K) => { new (...args: any[]): { _registry: CustomAttributeRegistry; getTemplateResult(): /*elided*/ any; OnInit(): any; disconnectedCallback(): void; connectedCallback(): void; render(): any; update(): void; firstUpdated(): void; }; styles: CSSResult[]; is(): string; } & K; declare global { interface Window { _excluded_components: string[]; } } export {};