UNPKG

@aurigma/design-atoms

Version:

Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.

34 lines (33 loc) 1.62 kB
import { Product, Surface } from "@aurigma/design-atoms-model"; import { IDesignAtomsApiClient } from "../IDesignAtomsApiClient"; import { IListenableColorPreviewService } from "../IColorPreviewService"; import { Service } from "../Service"; import { IViewerConfiguration } from "../../Viewer"; export interface IProductContext { product: Product; currentSurface: Surface; } export declare class ProductPreviewService { private readonly _productContext; private readonly _designAtomsApiClient; private readonly _colorPreviewService; private readonly _service; private readonly _viewerConfiguration; private _productPreviewRenderer?; constructor(productContext: IProductContext, designAtomsApiClient: IDesignAtomsApiClient, colorPreviewService: IListenableColorPreviewService, service: Service, viewerConfiguration: IViewerConfiguration); private get _productPreviewEnabled(); private get _currentSurfaceIndex(); /** * @param surfaceIndex Index of the surface to preview * @param ignoreContainers Array of container id's to exclude from the preview * @returns Blob containing the preview image of given surface */ getSurfacePreview(surfaceIndex: number, ignoreContainers?: string[]): Promise<Blob>; /** * @param ignoreContainers Array of container id's to exclude from the preview * @returns Blob containing the preview image of the current surface */ getCurrentSurfacePreview(ignoreContainers?: string[]): Promise<Blob>; private _enableProductPreview; private _createPreviewRenderer; }