import { addFloatingBlocksChangeListener, getCurrentFloatingBlocks, addSlotBlocksChangeListener, getCurrentSlotBlocks } from '@flows/js'; import { LitElement } from 'lit'; type Component = CustomElementConstructor | typeof HTMLElement; type TourComponent = CustomElementConstructor | typeof HTMLElement; type SurveyComponent = CustomElementConstructor | typeof HTMLElement; type Components = Record; type TourComponents = Record; type SurveyComponents = Record; interface SetupJsComponentsOptions { components: Components; tourComponents: TourComponents; surveyComponents: SurveyComponents; /** * Optional method from `@flows/js` useful when its reference cannot be imported directly. e.g. in CDN usage. */ addFloatingBlocksChangeListener?: typeof addFloatingBlocksChangeListener; /** * Optional method from `@flows/js` useful when its reference cannot be imported directly. e.g. in CDN usage. */ getCurrentFloatingBlocks?: typeof getCurrentFloatingBlocks; /** * Optional method from `@flows/js` useful when its reference cannot be imported directly. e.g. in CDN usage. */ addSlotBlocksChangeListener?: typeof addSlotBlocksChangeListener; /** * Optional method from `@flows/js` useful when its reference cannot be imported directly. e.g. in CDN usage. */ getCurrentSlotBlocks?: typeof getCurrentSlotBlocks; } /** * Defines custom elements for `flows-floating-blocks`, `flows-slot` and all the passed UI Components. * * @param options - components and tour components to use for rendering * @example * ```js * import { setupJsComponents } from "@flows/js-components"; * import * as components from "@flows/js-components/components"; * import * as tourComponents from "@flows/js-components/tour-components"; * import * as surveyComponents from "@flows/js-components/survey-components"; * * setupJsComponents({ * components: { ...components }, * tourComponents: { ...tourComponents }, * surveyComponents: { ...surveyComponents }, * }); * ``` * And add `` at the end of the `` tag: * ```html * * * * * ``` */ declare const setupJsComponents: (options: SetupJsComponentsOptions) => void; declare class FlowsSlot extends LitElement { private _blocks; private _changeListenerDispose?; slotId: string; /** * Limit of how many blocks to render in this slot. Defaults to no limit. * * Useful when multiple blocks match the same slot. * * @default undefined */ limit?: number; connectedCallback(): void; disconnectedCallback(): void; placeholderElement: HTMLElement | null; createRenderRoot(): this; render(): unknown; } export { type Component, type Components, FlowsSlot, type SetupJsComponentsOptions, type TourComponent, type TourComponents, setupJsComponents };