import type { DomainMatcher } from 'cross-domain-utils'; import { ZalgoPromise } from 'zalgo-promise'; import { PROP_TYPE } from './constants'; import type { ParentComponent, ParentHelpers, RenderOptions } from './parent'; import type { ChildProps, PropsDefinition, PropsInput, PropsType, UserPropsDefinition } from './props'; import type { AnyProps, Context, CssDimensions, Method } from './types'; export type AttributesType = { readonly iframe?: Readonly>; readonly popup?: Readonly>; }; type AutoResize = { readonly width?: boolean; readonly height?: boolean; readonly element?: string; }; type Eligibility = { readonly eligible: boolean; readonly reason?: string; }; type ExportsConfigDefinition = Readonly>; export type ExportsMapper = (opts: { readonly getExports: () => ZalgoPromise; }) => X; type PropsOption = T | ((opts: { readonly props: PropsType

; }) => T); export type ComponentOptions = { readonly tag: string; readonly url: PropsOption; readonly domain?: DomainMatcher; readonly method?: Method; readonly props?: UserPropsDefinition; readonly dimensions?: PropsOption; readonly autoResize?: AutoResize; readonly allowedParentDomains?: DomainMatcher; readonly attributes?: PropsOption; readonly eligible?: (opts: { readonly props: PropsInput

; }) => Eligibility; readonly defaultContext?: Context; readonly containerTemplate?: (opts: RenderOptions

) => HTMLElement | undefined; readonly prerenderTemplate?: (opts: RenderOptions

) => HTMLElement | undefined; readonly validate?: (opts: { readonly props: PropsInput

; }) => void; readonly children?: () => C; readonly exports?: ExportsConfigDefinition | ExportsMapper; readonly enableBfcache?: boolean; readonly getExtensions?: (parent: ParentComponent) => Ext; }; export type NormalizedComponentOptions

= { readonly tag: string; readonly name: string; readonly url: PropsOption; readonly domain: DomainMatcher | undefined; readonly method: Method | undefined; readonly propsDef: PropsDefinition; readonly dimensions: PropsOption; readonly autoResize: AutoResize; readonly allowedParentDomains: DomainMatcher; readonly attributes: PropsOption; readonly eligible: (opts: { readonly props: PropsInput

; }) => Eligibility; readonly defaultContext: Context; readonly containerTemplate: (opts: RenderOptions

) => HTMLElement | undefined; readonly prerenderTemplate: ((opts: RenderOptions

) => HTMLElement | undefined) | undefined; readonly validate: ((opts: { readonly props: PropsInput

; }) => void) | undefined; readonly children: () => C; readonly exports: ExportsMapper; readonly enableBfcache: boolean; readonly getExtensions: (parent: ParentComponent) => Ext; }; export type CloneOptions

= { readonly decorate?: (props: PropsInput

) => PropsInput

; }; export type ZoidComponentInstance = Ext & X & C & ParentHelpers

& { readonly isEligible: () => boolean; readonly clone: (options?: CloneOptions

) => ZoidComponentInstance; readonly render: (container?: string | HTMLElement, context?: Context) => ZalgoPromise; readonly renderTo: (target: Window, container?: string | HTMLElement, context?: Context) => ZalgoPromise; }; export type ZoidComponent = { (props?: PropsInput

): ZoidComponentInstance; readonly isChild: () => boolean; readonly canRenderTo: (win: Window) => ZalgoPromise; readonly instances: ReadonlyArray>; xprops?: ChildProps; }; export type ZoidProps = ChildProps; export declare const create:

(options: ComponentOptions) => ZoidComponent; export declare const destroyComponents: (err?: unknown) => ZalgoPromise; export declare const destroyAll: typeof destroyComponents; export declare const destroy: (err?: unknown) => ZalgoPromise; export {}; //# sourceMappingURL=component.d.ts.map