import { RulersConfigUnit, ModelMode, FontListMode } from "./ConfigurationTypes"; import { AssetSelectWidgetType, IAssetSources, IPerSurfaceConfiguration } from "./Ui/ConfigurationInterfacesExtended"; import { IWidgetsConfig } from "./Ui/WidgetConfigurationInterfacesExtended"; import { IRangeParams } from "./WidgetConfigurationInterfaces"; import * as ProductInterfaces from "@aurigma/design-atoms/Model/Product/Interfaces"; import { IBarcodeData } from "./Barcode"; export interface IRenderingProperty { hiResOutputToSeparateFiles?: boolean; hiResOutputDpi?: number; hiResOutputFileFormat?: string; hiResOutputColorSpace?: string; hiResOutputBackgroundColor?: string; hiResOutputCompression?: string; hiResOutputJpegCompressionQuality?: number; hiResOutputFlipMode?: string; hiResOutputRotateMode?: string; hiResOutputPdfMetadata?: ProductInterfaces.IPdfMetadata; hiResOutputInStringPlaceholderHintsEnabled?: boolean; hiResOutputRgbColorProfileName?: string; hiResOutputCmykColorProfileName?: string; hiResOutputGrayscaleColorProfileName?: string; proofImageFileFormat?: string; proofImageSafetyLinesEnabled?: boolean; proofImageCropSafetyLine?: string; proofImageFlipMode?: string; proofImageRotateMode?: string; proofImageSpineAndFoldingLinesEnabled?: boolean; proofImageMockupEnabled?: boolean; proofImageShowStubContent?: boolean; proofImageInterpolationMode?: string; proofImageInStringPlaceholderHintsEnabled?: boolean; proofImageRgbColorProfileName?: string; } export interface IGridConfig { horizontalColor?: string; verticalColor?: string; stepX?: number; stepY?: number; lineWidthPx?: number; enabled?: boolean; } export interface IViolationWarningsSettingsConfig { qualityMeter?: IQualityMeterConfig; safetyLineViolationWarningEnabled?: boolean; regionViolationWarningEnabled?: boolean; textCropViolationWarningEnabled?: boolean; shapeViolationsEnabled?: boolean; } export interface IQualityMeterConfig { qualityLevels?: IQualityLevelsConfig; enabled?: boolean; } export interface IQualityLevelsConfig { bad: number; warning: number; } export interface ISnapLinesConfig { enabled?: boolean; color?: string; tolerance?: number; items: ISnapElementConfiguration; printArea: ISnapElementConfiguration; safetyLines: ISnapElementConfiguration; } export interface ISnapElementConfiguration { tolerance?: number; color?: string; enabled?: boolean; priority?: number; initialValue?: boolean; } export interface IRotationConfig { type?: RotationType; } export interface IRulersConfig { enabled?: boolean; unit?: RulersConfigUnit.RulersConfigUnitType; customUnitScale?: number; origin?: { X: number; Y: number; }; } export interface ICanvasConfig { containerColor?: string; color?: string; shadowEnabled?: boolean; paddingPct?: number; zoomStep?: number; pinchZoomEnabled?: boolean; maskedPlaceholderUnderscoreEnabled?: boolean; canvasItemHoverEnabled?: boolean; suppressOutOfRegionManipulation?: boolean; violationWarningButtonsEnabled?: boolean; qualityChangeContainersEnabled?: boolean; floatingItemToolbarEnabled?: boolean; autoItemSelectionEnabled?: boolean; multipleObjectsUpdateOptimizationEnabled?: boolean; autoPlaceholderEditModeEnabled?: boolean; zoom?: IRangeParams; rulers?: IRulersConfig; snapLines?: ISnapLinesConfig; gridVisible?: boolean; safetyLinesVisible?: boolean; snapLinesVisible?: boolean; historySize?: number; } export interface IDefaultItemsConfig { image?: IGalleryItemConfig; shape?: IShapeItemData; barcode?: IBarcodeItemData; text?: ITextItemData; richText?: IRichTextData; line?: ILineItemData; rectangle?: IRectangleItemData; ellipse?: IEllipseItemData; placeholder?: IPlaceholderItemData; } export import IItemData = ProductInterfaces.IItemData; export import IFontSettings = ProductInterfaces.IFontSettings; export import IShadowSettings = ProductInterfaces.IShadowSettings; export import IStrokeSettings = ProductInterfaces.IStrokeSettings; export interface IWatermarkTextConfig { text?: string; fontSettings?: IFontSettings; scale?: number; opacity?: number; } export interface IWatermarkImageConfig { name?: string; repeat?: boolean; opacity?: number; } export interface IWatermarkVisibilityConfig { canvas?: boolean; proof?: boolean; } export interface IWatermarkConfig { text?: IWatermarkTextConfig; image?: IWatermarkImageConfig; visibility?: IWatermarkVisibilityConfig; } export interface IStubImagesConfig { barcode?: IStubImagesBarcodeConfig; } export interface IStubImagesBarcodeConfig { text?: string; postScriptName?: string; } export import IProductThemeConfig = ProductInterfaces.IProductThemeConfig; import { RotationType } from "@aurigma/design-atoms/Services/WorkspaceRotation"; import { IGalleryItemConfig } from "./DefaultConfigurationInterfaces"; import { IShapeItemData, IRichTextData, ILineItemData, IRectangleItemData, IEllipseItemData, IPlaceholderItemData, IBarcodeItemData, ITextItemData } from "@aurigma/design-atoms/Services/ItemsDataApplierInterfaces"; export interface IUiConfig { defaultLanguage?: string; canvas?: ICanvasConfig; grid?: IGridConfig; watermark?: IWatermarkConfig; alignToSafetyLineName?: string; newImageName?: string; initialMode?: ModelMode.ModelModeType; canvasOnlyMode?: boolean; loadUserInfoButtonEnabled?: boolean; autoLoadUserInfo?: boolean; imageEditorEnabled?: boolean; deleteItemConfirmationEnabled?: boolean; revertProductConfirmationEnabled?: boolean; restoreProductOnReloadEnabled?: boolean; spellCheckEnabled?: boolean; defaultAssetSelectWidget?: AssetSelectWidgetType; variableItemsMaskSymbol?: string; fontList?: string[] | { systemFonts?: string[]; appFonts?: string[]; }; fontListMode?: FontListMode.FontListModeType; defaultItemsConfig?: IDefaultItemsConfig; widgets?: IWidgetsConfig; arbitraryResizeForImageItemEnabled?: boolean; userInfo?: { [key: string]: string | IBarcodeData; }; perSurfaceConfiguration?: IPerSurfaceConfiguration; productThemes?: { [name: string]: IProductThemeConfig; }; defaultProductTheme?: string; assetSources?: IAssetSources; enableTrace?: boolean; } export interface IPublicApiConfig { rendering?: IRenderingProperty; } /** * The editor configuration. * @structure *
* IFrameAPI.js#IConfiguration
*
*/
export interface IConfiguration extends IUiConfig, IPublicApiConfig {
userId?: string;
tokenId?: string;
customStyle?: string;
theme?: string;
loadConfigFromState?: boolean;
enableTrace?: boolean;
preloader?: {
enabled?: boolean;
errorMessage?: string;
firstTimeMessage?: string;
};
}