All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.frontend.vaadin-dev-tools.theme-editor.api.d.ts Maven / Gradle / Ivy

There is a newer version: 24.7.0
Show newest version
import { Connection } from '../connection';
import { ComponentReference } from '../component-util';
export declare enum Commands {
    response = "themeEditorResponse",
    loadComponentMetadata = "themeEditorComponentMetadata",
    setLocalClassName = "themeEditorLocalClassName",
    setCssRules = "themeEditorRules",
    loadRules = "themeEditorLoadRules",
    history = "themeEditorHistory",
    openCss = "themeEditorOpenCss",
    markAsUsed = "themeEditorMarkAsUsed"
}
export declare enum ResponseCode {
    ok = "ok",
    error = "error"
}
export interface BaseResponse {
    requestId: string;
    code: ResponseCode;
}
export interface LoadComponentMetadataResponse extends BaseResponse {
    accessible?: boolean;
    className?: string;
    suggestedClassName?: string;
}
export interface LoadPreviewResponse extends BaseResponse {
    css: string;
}
export interface ServerCssRule {
    selector: string;
    properties: {
        [key: string]: string;
    };
}
export interface LoadRulesResponse extends BaseResponse {
    rules: ServerCssRule[];
}
export declare class ThemeEditorApi {
    private wrappedConnection;
    private pendingRequests;
    private requestCounter;
    private globalUiId;
    constructor(wrappedConnection: Connection);
    private sendRequest;
    private handleResponse;
    loadComponentMetadata(componentRef: ComponentReference): Promise;
    setLocalClassName(componentRef: ComponentReference, className: string): Promise;
    setCssRules(rules: ServerCssRule[]): Promise;
    loadRules(selectors: string[]): Promise;
    markAsUsed(): Promise;
    undo(requestId: string): Promise;
    redo(requestId: string): Promise;
    openCss(selector: string): Promise;
    private getGlobalUiId;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy