@aurigma/design-editor-iframe
Version:
Using this module you can embed Design Editor (a part of Customer's Canvas) to your page through the IFrame API.
325 lines (324 loc) • 10.1 kB
TypeScript
/**
* Editing modes.
* @public
*/
export declare namespace ModelMode {
/**
* Defiles whether the user can change the product layout or only the content of provided elements.
*/
type ModelModeType = "Simple" | "Advanced" | "SimpleOnly";
/**
* The `Simple` mode provides only basic functions like changing texts and images. It allows you for switching to the `Advanced` mode.
*/
const Simple: ModelModeType;
/**
* The `Advanced` mode provides all the functions of the web-to-print editor like adding, changing, and removing design elements.
*/
const Advanced: ModelModeType;
/**
* The `SimpleOnly` mode provides only basic functions. It does not allow you for switching to the `Advanced` mode.
*/
const SimpleOnly: ModelModeType;
}
/**
* Modes of the font list.
* @public
*/
export declare namespace FontListMode {
/**
* Defiles whether the user can change only the font size or all the font style settings.
*/
type FontListModeType = "Simple" | "Advanced";
/**
* The `Simple` mode allows users to select a font and set the font size.
*/
const Simple: FontListModeType;
/**
* The `Advanced` mode allows users to select a font, set the font size, and change the font style.
*/
const Advanced: FontListModeType;
}
/**
* Modes of the Finish design button.
* @public
*/
export declare namespace FinishButtonMode {
/**
* Defines the behavior of the Finish button.
*/
type FinishButtonModeType = "Disabled" | "Download" | "Post";
/**
* `Disabled` hides the button and enables the callback.
*/
const Disabled: FinishButtonModeType;
/**
* `Download` enables a debug mode that shows the button and disables the callback, but allows downloading the hi-res output.
*/
const Download: FinishButtonModeType;
/**
* @internal
*/
const Post: FinishButtonModeType;
}
/**
* The type of a group of design elements, either base or smart.
* @public
*/
export declare namespace GroupsMode {
/**
* `Base` only groups elements, whereas `Smart` also applies the auto layout to grouped elements.
*/
type GroupsModeType = "Base" | "Smart";
}
/**
* Supported barcode types.
* @public
*/
export declare enum BarcodeType {
/** Design element representing a Qr code based on vCard contact information. */
QrVCard = "QrVCard",
/** Design element representing a Qr code based on a Phone number. */
QrPhone = "QrPhone",
/** Design element representing a Qr code based on a Url. */
QrUrl = "QrUrl",
/** Design element representing a Qr code of arbitrary data. */
QrData = "QrData",
/** Design element representing a linear EAN-8 code. */
LinearEan8 = "LinearEan8",
/** Design element representing a linear EAN-13 code. */
LinearEan13 = "LinearEan13",
/** Design element representing a 13-digit UPC-A code. */
LinearUpcA = "LinearUpcA",
/** Design element representing an 8-digit UPC-E code. */
LinearUpcE = "LinearUpcE",
/** Design element representing a barcode in the Code 128B format. */
LinearCode128 = "LinearCode128",
/** Design element representing a DataMatrix Code. */
DataMatrix = "DataMatrix"
}
/**
* The Object Inspector position.
* @public
*/
export declare namespace ObjectInspectorPosition {
/**
* Defines where to display the Object Inspector.
*/
type ObjectInspectorPositionType = "Left" | "Right";
/**
* The `Left` position places the Object Inspector on the left of the canvas.
*/
const Left: ObjectInspectorPositionType;
/**
* The `Right` position places the Object Inspector on the right of the canvas.
*/
const Right: ObjectInspectorPositionType;
}
/**
* Display modes of linked in-string placeholders in the Object Inspector.
* @public
*/
export declare namespace InStringPlaceholderMode {
/**
* Display modes of linked in-string placeholders in the Object Inspector.
*/
enum InStringPlaceholderModeType {
/**
* In this mode, linked in-string placeholders appear as one item in the Object Inspector. These items appear at the top of the Object Inspector despite the layer order in PSD templates.
*/
Single = "single",
/**
* In this mode, linked in-string placeholders appear as separate items in the Object Inspector. The item order in the Object Inspector is the same as the layer order in PSD templates.
*/
Multiple = "multiple"
}
}
/**
* Text alignment types.
* @public
*/
export declare namespace TextAlignment {
/**
* Defines how to align text.
*/
type TextAlignmentType = "Left" | "Center" | "Right" | "Justify" | "LastLeft" | "LastRight" | "LastCenter";
/**
* Align text along the left edge.
*/
const Left: TextAlignmentType;
/**
* Align text along the center.
*/
const Center: TextAlignmentType;
/**
* Align text along the right edge.
*/
const Right: TextAlignmentType;
/**
* Align text along both the left and right edges.
*/
const Justify: TextAlignmentType;
/**
* Justify text and align its last line to the left.
*/
const LastLeft: TextAlignmentType;
/**
* Justify text and align its last line to the right.
*/
const LastRight: TextAlignmentType;
/**
* Justify text and center its last line.
*/
const LastCenter: TextAlignmentType;
}
/**
* Sources of the Gallery widget.
* @public
*/
export declare namespace GallerySource {
/**
* Sources of the Gallery widget.
*/
type GallerySourceType = "InMemorySource";
/**
* Gallery assets are predefined and located in the memory.
*/
const InMemorySource: GallerySourceType;
}
/**
* PSD upload modes.
* @public
*/
export declare namespace PsdActionMode {
/**
* Defines how to upload PSD iles.
*/
type PsdActionModeType = "Merged" | "Design" | "Group";
/**
* In this mode, a PSD file opens as a merged raster image.
*/
const Merged: PsdActionModeType;
/**
* In this mode, a PSD file opens as a set of design elements.
*/
const Design: PsdActionModeType;
/**
* In this mode, a PSD file opens as a group of design elements.
*/
const Group: PsdActionModeType;
}
/**
* SVG upload modes.
* @public
*/
export declare namespace SvgActionMode {
/**
* SVG upload modes.
*/
type SvgActionModeType = "Shape" | "Vector" | "Group" | "Clipart";
/**
* In this mode, an SVG file opens as a combination of shapes in one color and width and appears on the canvas as a shape element. This mode eliminates raster images.
* To check if losses occur, you can use the `shapeViolationsEnabled` warning.
*/
const Shape: SvgActionModeType;
/**
* In this mode, an SVG file opens as a vector image and appears on the canvas as an image element.
*/
const Vector: SvgActionModeType;
/**
* In this mode, an SVG file opens as a set of SVG paths and appears on the canvas as a group element.
*/
const Group: SvgActionModeType;
/**
* In this mode, an SVG file opens as a combination of multicolor shapes and appears on the canvas as a shape element.
*/
const Clipart: SvgActionModeType;
}
/**
* PDF upload modes.
* @public
*/
export declare namespace PdfActionMode {
/**
* PDF upload modes.
*/
type PdfActionModeType = "Shape" | "Vector" | "Group";
/**
* In this mode, a PDF file opens as a combination of shapes in one color and width. This mode eliminates raster images.
* To check if losses occur, you can use the `shapeViolationsEnabled` warning.
*/
const Shape: PdfActionModeType;
/**
* In this mode, a PDF file opens as a vector image.
*/
const Vector: PdfActionModeType;
/**
* In this mode, a PDF file opens as a set of shapes and appears on the canvas as a group element.
*/
const Group: PdfActionModeType;
}
/**
* Available color spaces.
* @public
*/
export declare namespace ColorSpace {
/**
* Available color spaces.
*/
enum ColorSpaceType {
/**
* The RGB color space.
*/
Rgb = "rgb",
/**
* The CMYK color space.
*/
Cmyk = "cmyk"
}
}
/**
* Depositphotos image size.
* @public
*/
export declare namespace ImageSize {
/**
* Sizes of images provided by Depositphotos.
*/
enum ImageSizeType {
/**
* The small size, when the longest side is reduced to 500 px at 72 DPI. Proportional scaling is applied.
*/
S = "s",
/**
* The medium size, when the longest side is reduced to 1000 px at 300 DPI. Proportional scaling is applied.
*/
M = "m",
/**
* The large size, when the longest side is reduced to 2000 px at 300 DPI. Proportional scaling is applied.
*/
L = "l",
/**
* The highest resolution uploaded by the contributor. This is the default value.
*/
XL = "xl",
/**
* The SUPER size, which is twice as long and wide as the XL option. Proportional scaling is applied.
*/
DS = "ds"
}
}
/**
* Modes of using the `crossOrigin` attribute when requesting images from domains using CORS policy.
* @public
*/
export declare namespace CrossOriginMode {
/**
* Modes of using the `crossOrigin` attribute when requesting images from domains using CORS policy.
*/
enum CrossOriginModeType {
/** Enables fetching images with the `crossOrigin = "anonymous"` attribute. */
On = "on",
/** Enables fetching images without the `crossOrigin` attribute. */
Off = "off"
}
}