@aurigma/design-atoms-interfaces 1.0.8 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,6 @@
1
+ export interface IAddSurfacesBaseCommandArgs<TSurface> {
2
+ surfaces: TSurface[];
3
+ position?: number;
4
+ switchToNewSurface: boolean;
5
+ surfacesName?: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ export interface IRemoveSurfaceCommandsArgs {
2
+ surfaceId: string;
3
+ }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Surface insertion mode.
3
+ * @remarks You can use this structure in {@link Product.updateSurfaces|updateSurfaces}.
4
+ * @public
5
+ */
6
+ export declare enum UpdateSurfaceBehavior {
7
+ /** The number of pages remains the same, and the sizes of the `surfaces` and `newProductSurfaces` arrays must match. */
8
+ keepCurrentSurfaceLength = "keepCurrentSurfaceLength",
9
+ /** First deletes all the surfaces of the loaded product and then takes the pages from the new product. */
10
+ changeSurfaceLength = "changeSurfaceLength"
11
+ }
12
+ export interface ISetPrintAreasOptions {
13
+ /** If `true`, the changes made by a user are restored in the new print areas or surfaces if it is possible. Otherwise, all changes made by the user are wiped. The default value is `true`. */
14
+ preserveUserChanges?: boolean;
15
+ /** If `true`, the current safety lines, if any, are restored in new print areas. If `false`, safety lines from new print areas are applied. The default value is `true`. */
16
+ preserveSafetyLines?: boolean;
17
+ /** If `true`, design elements whose names do not match move to the new print area in a random order according to their types. If `false`, only design elements with the same names are moved to the new print area. The default value is `false`. */
18
+ replaceAll?: boolean;
19
+ /** If `true`, changes the surface size to match the new print area or surface. If it's `false` and a mockup is defined, then the surface size remains unchanged. By default, `updateSurfaceSize` is `false`, and the surface size changes only if no mockups are specified. */
20
+ updateSurfaceSize?: boolean;
21
+ /** If true, clears user-deleted items after merging */
22
+ clearRemovedItems?: boolean;
23
+ }
24
+ export interface IUpdateSurfaceOptions<TProduct> extends ISetPrintAreasOptions {
25
+ product: TProduct;
26
+ /** An array of surfaces in the current product to be removed. */
27
+ surfaces?: number[];
28
+ /** An array of surfaces in the new product to be inserted. */
29
+ newProductSurfaces?: number[];
30
+ /** Defines how new surfaces will replace existing surfaces in the product. If `changeSurfaceLength`, removes all pages in the product and replaces them with pages of the new product. */
31
+ updateBehavior?: UpdateSurfaceBehavior;
32
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Surface insertion mode.
3
+ * @remarks You can use this structure in {@link Product.updateSurfaces|updateSurfaces}.
4
+ * @public
5
+ */
6
+ export var UpdateSurfaceBehavior;
7
+ (function (UpdateSurfaceBehavior) {
8
+ /** The number of pages remains the same, and the sizes of the `surfaces` and `newProductSurfaces` arrays must match. */
9
+ UpdateSurfaceBehavior["keepCurrentSurfaceLength"] = "keepCurrentSurfaceLength";
10
+ /** First deletes all the surfaces of the loaded product and then takes the pages from the new product. */
11
+ UpdateSurfaceBehavior["changeSurfaceLength"] = "changeSurfaceLength";
12
+ })(UpdateSurfaceBehavior || (UpdateSurfaceBehavior = {}));
@@ -4,5 +4,8 @@ export declare enum ProductCommand {
4
4
  changeBackground = "changeBackground",
5
5
  applyProductTheme = "applyProductTheme",
6
6
  fillPlaceholders = "fillPlaceholders",
7
- resize = "resize"
7
+ resize = "resize",
8
+ removeSurface = "removeSurface",
9
+ addSurfaces = "addSurfaces",
10
+ updateSurfaces = "updateSurfaces"
8
11
  }
@@ -6,4 +6,7 @@ export var ProductCommand;
6
6
  ProductCommand["applyProductTheme"] = "applyProductTheme";
7
7
  ProductCommand["fillPlaceholders"] = "fillPlaceholders";
8
8
  ProductCommand["resize"] = "resize";
9
+ ProductCommand["removeSurface"] = "removeSurface";
10
+ ProductCommand["addSurfaces"] = "addSurfaces";
11
+ ProductCommand["updateSurfaces"] = "updateSurfaces";
9
12
  })(ProductCommand || (ProductCommand = {}));
@@ -2,4 +2,7 @@ export * from "./IApplyProductThemeCmdArgs";
2
2
  export * from "./IChangeBgArgs";
3
3
  export * from "./IResizeArgs";
4
4
  export * from "./IRotateProductCmdArgs";
5
+ export * from "./IAddSurfacesCmdArgs";
6
+ export * from "./IRemoveSurfaceCmdArgs";
7
+ export * from "./IUpdateSurfacesCmdArgs";
5
8
  export * from "./ProductCommand";
@@ -2,4 +2,7 @@ export * from "./IApplyProductThemeCmdArgs";
2
2
  export * from "./IChangeBgArgs";
3
3
  export * from "./IResizeArgs";
4
4
  export * from "./IRotateProductCmdArgs";
5
+ export * from "./IAddSurfacesCmdArgs";
6
+ export * from "./IRemoveSurfaceCmdArgs";
7
+ export * from "./IUpdateSurfacesCmdArgs";
5
8
  export * from "./ProductCommand";
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@aurigma/design-atoms-interfaces","version":"1.0.8","description":"","main":"index.js","author":"Aurigma Inc <info@aurigma.com> (https://customerscanvas.com)","license":"SEE LICENSE IN License.md","keywords":["customer's canvas","web-to-print","image manipulation","design","personalization","web-to-print editor","design editor"]}
1
+ {"name":"@aurigma/design-atoms-interfaces","version":"1.0.11","description":"","main":"index.js","author":"Aurigma Inc <info@aurigma.com> (https://customerscanvas.com)","license":"SEE LICENSE IN License.md","keywords":["customer's canvas","web-to-print","image manipulation","design","personalization","web-to-print editor","design editor"]}