import { CssRuleProperties } from 'grapesjs'; export interface Asset { type?: string; src?: string; unitDim?: string; height?: number; width?: number; } export interface Rule extends Omit { selectors?: string[]; } export interface DataSource { [key: string]: any; } export interface HeadDefinition { type?: string; [key: string]: any; } export interface DocElDefinition { tagName?: string; [key: string]: any; } type AtRules = Record; export interface ComponentDefinition { id?: string; type?: string; tagName?: string; attributes?: Record; style?: Record; content?: string; components?: ComponentDefinition[]; head?: ComponentDefinition; docEl?: DocElDefinition; classes?: Array; [key: string]: any; } export interface FrameDefinition { component?: ComponentDefinition; width?: string; height?: string; [key: string]: any; } export interface PageDefinition { id?: string; name?: string; frames?: FrameDefinition[]; [key: string]: any; } export interface ProjectDefinition { assets?: Asset[]; styles?: Rule[]; pages?: PageDefinition[]; dataSources?: DataSource[]; [key: string]: any; } export declare class ComponentNode { private data; constructor(data: ComponentDefinition); get id(): string | undefined; get type(): string; get tagName(): string; get isVoid(): boolean; get attributes(): Record; get content(): string; get components(): ComponentNode[]; get head(): ComponentNode; get docEl(): DocElDefinition | undefined; get classes(): string[]; } export declare class Frame { private data; constructor(data: FrameDefinition); get component(): ComponentNode | null; } export declare class Page { private data; constructor(data: PageDefinition); get id(): string; get frames(): Frame[]; } export declare class CssComposer { private rules; constructor(rules: Rule[]); getAll(): Rule[]; getRulesByGroup(g: string): Rule[]; getAtRule(rule: Rule): string; selectorsToString(rule: Rule, opts?: { skipState?: boolean; skipAdd?: boolean; }): string; getFromSelectorName(selector?: string): string; styleToString(rule?: Rule): string; getDeclaration(rule: Rule): string; buildFromRule(rule: Rule): string; sortMediaObject(items?: AtRules): { key: string; value: Rule[]; }[]; getCssAsString(): string; } export declare class DataSourceManager { private list; constructor(list: DataSource[]); getAll(): DataSource[]; } export declare class Pages { private pages; constructor(pages: PageDefinition[]); getAll(): Page[]; } export declare class Editor { Css: CssComposer; Pages: Pages; DataSources: DataSourceManager; constructor(data: ProjectDefinition); } export declare function findComponentById(root: ComponentNode, id: string): ComponentNode | null; export {};