import { Component, Editor } from 'grapesjs'; import { StudioLayoutComponentsConfig } from '../../types'; import { AccessTokenStore, AiChatOptions, ProjectContext } from '../types'; export declare const accessTokenStore: AccessTokenStore; export declare const cleanupAccesTokenStore: () => void; export declare const refreshAccessToken: () => Promise; interface ProjectContextOptions { selectedComponents?: Component[]; withPageContent?: boolean; imageUrls?: string[]; } export declare const getProjectType: (editor: Editor) => string; export declare const isProjectTypeEmail: (editor: Editor) => boolean; export declare const isProjectNew: (editor: Editor) => boolean; export declare const getProjectContext: (editor: Editor, opts?: ProjectContextOptions) => ProjectContext; export declare const getLayoutComponentConfig: (editor: Editor, components: StudioLayoutComponentsConfig, pluginOptions?: AiChatOptions) => StudioLayoutComponentsConfig; export declare const renderLayoutComponent: (editor: Editor, components: StudioLayoutComponentsConfig, pluginOptions?: AiChatOptions) => any; export declare function clearGeneratedCode(code: string): string; export declare const updateDomWithStreamContent: (content?: string, el?: HTMLElement, opts?: { skipScroll?: boolean; scrollDocument?: boolean; }) => void; export declare const getComponentCodeWithIds: (component?: Component) => string; export declare function setContentStreamStart(editor: Editor): void; export declare function setContentStreamEnd(editor: Editor): void; export declare const createToolError: (props: { error: any; msg: string; abortMsg: string; }) => { error: string; abortedByUser: boolean | undefined; }; export declare function getPageContentWithStyles(editor: Editor): string; export interface UpdatesFromStream { cmp?: Component; cmpEl?: HTMLElement; newNode: Element; } export declare const createUpdatesFromStream: (editor: Editor) => { cleanup(): void; update: (content: string) => Map; }; export declare const replaceComponentWithHTML: (cmp: Component, content: string) => void; export {};