@openlettermarketing/olc-react-sdk 1.6.0 → 1.6.1

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.
@@ -9,3 +9,22 @@ export declare const removeSThroughOne: (input: string) => string;
9
9
  export declare const hexToRgba: (hex: any, opacity: any) => string;
10
10
  export declare const getType: (file: any) => "svg" | "image" | "video";
11
11
  export declare const cleanString: (input: string) => string;
12
+ export declare const createBorder: (id: string, x: number, y: number, width: number, height: number, rotation: number) => {
13
+ id: string;
14
+ type: string;
15
+ opacity: number;
16
+ visible: boolean;
17
+ selectable: boolean;
18
+ removable: boolean;
19
+ alwaysOnTop: boolean;
20
+ showInExport: boolean;
21
+ x: number;
22
+ y: number;
23
+ width: number;
24
+ height: number;
25
+ rotation: number;
26
+ color: string;
27
+ dash: number[];
28
+ draggable: boolean;
29
+ resizable: boolean;
30
+ };
@@ -12,7 +12,9 @@ export declare const getFileAsBlob: (url: string, returnType?: string) => Promis
12
12
  export declare const blobToString: (blob: Blob) => Promise<string>;
13
13
  export declare const downloadPDF: (title: string, url: string) => void;
14
14
  export interface Product {
15
+ id: string;
15
16
  productType: string;
17
+ selectedSize: string;
16
18
  }
17
19
  export declare const drawRestrictedAreaOnPage: (store: any, product: Product, envelopeType: string) => void;
18
20
  export declare const extractFontFamilies: (jsonData: any[]) => string[];
@@ -0,0 +1,2 @@
1
+ import { StoreType } from "polotno/model/store";
2
+ export declare const addSafetyBordersForTemplates: (productId: string, store: StoreType) => void;
@@ -0,0 +1,68 @@
1
+ interface Element {
2
+ id: string;
3
+ type: string;
4
+ name?: string;
5
+ opacity: number;
6
+ visible: boolean;
7
+ selectable: boolean;
8
+ removable: boolean;
9
+ alwaysOnTop: boolean;
10
+ showInExport: boolean;
11
+ x?: number;
12
+ y?: number;
13
+ width?: number;
14
+ height?: number;
15
+ rotation?: number;
16
+ text?: string;
17
+ fontWeight?: string;
18
+ fill?: string;
19
+ align?: string;
20
+ verticalAlign?: string;
21
+ strokeWidth?: number;
22
+ stroke?: string;
23
+ lineHeight?: number;
24
+ letterSpacing?: number;
25
+ backgroundEnabled?: boolean;
26
+ backgroundColor?: string;
27
+ backgroundOpacity?: number;
28
+ backgroundCornerRadius?: number;
29
+ backgroundPadding?: number;
30
+ fontSize?: number;
31
+ fontFamily?: string;
32
+ fontStyle?: string;
33
+ animations?: any[];
34
+ blurEnabled?: boolean;
35
+ blurRadius?: number;
36
+ brightnessEnabled?: boolean;
37
+ brightness?: number;
38
+ sepiaEnabled?: boolean;
39
+ grayscaleEnabled?: boolean;
40
+ shadowEnabled?: boolean;
41
+ shadowBlur?: number;
42
+ shadowOffsetX?: number;
43
+ shadowOffsetY?: number;
44
+ shadowColor?: string;
45
+ shadowOpacity?: number;
46
+ draggable?: boolean;
47
+ resizable?: boolean;
48
+ contentEditable?: boolean;
49
+ styleEditable?: boolean;
50
+ color?: string;
51
+ dash?: number[];
52
+ startHead?: string;
53
+ endHead?: string;
54
+ children?: Element[];
55
+ }
56
+ interface Page {
57
+ addElement: (element: Element) => void;
58
+ }
59
+ interface Store {
60
+ width: number;
61
+ height: number;
62
+ pages: Page[];
63
+ history: {
64
+ clear: () => void;
65
+ };
66
+ }
67
+ export declare const addSafetyBordersTo4x6PostCard: (store: Store) => void;
68
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openlettermarketing/olc-react-sdk",
3
3
  "private": false,
4
- "version": "1.6.0",
4
+ "version": "1.6.1",
5
5
  "type": "module",
6
6
  "description": "Simplify template builder integration for any product.",
7
7
  "main": "build/index.js",