import { DcController } from "../DcController.js"; import { ExtendedBaseUrl } from "./base-url.js"; /** * A list of options that can be used to initialize Dreamcomposer. */ export interface DCOptions { /** * The access token for Dreamcomposer. * * Defaults to the return value of `getApplicationAccessToken()`. */ applicationAccessToken?: string; /** * The base URL for the iframe. * * Defaults to the return value of `getBaseUrl()`. */ baseUrl?: string | ExtendedBaseUrl; /** * Allow the iframe to access local network resources. * * When enabled, adds the `allow="local-network-access"` attribute to the * iframe, which permits Chrome to allow requests to local network addresses. * * Defaults to `false`. */ allowLocalNetworkAccess?: boolean; /** * How long the engine page may take to start after `load`, in * milliseconds, before an `error` event with reason `unreachable` is * dispatched. * * Defaults to `DEFAULT_ENGINE_ALIVE_TIMEOUT` (10 seconds). */ engineAliveTimeout?: number; /** * How long the engine may take to become ready after `load`, in * milliseconds, before an `error` event with reason `not-ready` is * dispatched. Becoming ready includes downloading the engine's assets. * * Defaults to `DEFAULT_ENGINE_READY_TIMEOUT` (2 minutes). */ engineReadyTimeout?: number; } /** * Initializes Dreamcomposer and returns an controller instance that's required * by other methods to interact with the iframe. * * @param element A div element. * @param options The options. * @returns The controller instance. */ export declare function init(element: HTMLDivElement, options?: DCOptions): DcController; /** * Initializes Dreamcomposer and returns an controller instance that's required * by other methods to interact with the iframe * * @param id The id of a div element. * @param options The options. * @returns The controller instance. */ export declare function init(id: string, options?: DCOptions): DcController;