@chili-publish/studio-sdk 1.14.0 → 1.17.0

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.
Files changed (95) hide show
  1. package/_bundles/main.js +1 -1
  2. package/_bundles/main.js.map +1 -1
  3. package/_bundles/report.html +2 -2
  4. package/lib/editor-engine.json +1 -1
  5. package/lib/package.json +1 -1
  6. package/lib/src/controllers/ActionController.d.ts +12 -0
  7. package/lib/src/controllers/ActionController.js +18 -0
  8. package/lib/src/controllers/ActionController.js.map +1 -1
  9. package/lib/src/controllers/ColorStyleController.js +6 -3
  10. package/lib/src/controllers/ColorStyleController.js.map +1 -1
  11. package/lib/src/controllers/DataConnectorController.d.ts +69 -0
  12. package/lib/src/controllers/DataConnectorController.js +134 -0
  13. package/lib/src/controllers/DataConnectorController.js.map +1 -0
  14. package/lib/src/controllers/DocumentController.d.ts +7 -0
  15. package/lib/src/controllers/DocumentController.js +12 -0
  16. package/lib/src/controllers/DocumentController.js.map +1 -1
  17. package/lib/src/controllers/FontConnectorController.d.ts +9 -8
  18. package/lib/src/controllers/FontConnectorController.js +8 -7
  19. package/lib/src/controllers/FontConnectorController.js.map +1 -1
  20. package/lib/src/controllers/FrameController.d.ts +132 -82
  21. package/lib/src/controllers/FrameController.js +97 -21
  22. package/lib/src/controllers/FrameController.js.map +1 -1
  23. package/lib/src/controllers/LayoutController.d.ts +2 -2
  24. package/lib/src/controllers/LayoutController.js +7 -2
  25. package/lib/src/controllers/LayoutController.js.map +1 -1
  26. package/lib/src/controllers/MediaConnectorController.d.ts +9 -8
  27. package/lib/src/controllers/MediaConnectorController.js +8 -7
  28. package/lib/src/controllers/MediaConnectorController.js.map +1 -1
  29. package/lib/src/controllers/PageController.d.ts +7 -0
  30. package/lib/src/controllers/PageController.js +10 -0
  31. package/lib/src/controllers/PageController.js.map +1 -1
  32. package/lib/src/controllers/VariableController.d.ts +17 -1
  33. package/lib/src/controllers/VariableController.js +24 -0
  34. package/lib/src/controllers/VariableController.js.map +1 -1
  35. package/lib/src/index.d.ts +10 -6
  36. package/lib/src/index.js +5 -1
  37. package/lib/src/index.js.map +1 -1
  38. package/lib/src/next/index.d.ts +2 -1
  39. package/lib/src/next/index.js +1 -1
  40. package/lib/src/next/index.js.map +1 -1
  41. package/lib/src/next/tests/controllers/ConnectorController.test.js +1 -2
  42. package/lib/src/next/tests/controllers/ConnectorController.test.js.map +1 -1
  43. package/lib/src/next/tests/controllers/VariableController.test.js +1 -0
  44. package/lib/src/next/tests/controllers/VariableController.test.js.map +1 -1
  45. package/lib/src/next/types/ConnectorTypes.d.ts +2 -1
  46. package/lib/src/next/types/ConnectorTypes.js +1 -0
  47. package/lib/src/next/types/ConnectorTypes.js.map +1 -1
  48. package/lib/src/sdk.d.ts +2 -0
  49. package/lib/src/sdk.js +3 -0
  50. package/lib/src/sdk.js.map +1 -1
  51. package/lib/src/tests/controllers/ActionController.test.js +12 -0
  52. package/lib/src/tests/controllers/ActionController.test.js.map +1 -1
  53. package/lib/src/tests/controllers/ColorStyleController.test.js +11 -0
  54. package/lib/src/tests/controllers/ColorStyleController.test.js.map +1 -1
  55. package/lib/src/tests/controllers/DataConnectorController.test.d.ts +1 -0
  56. package/lib/src/tests/controllers/DataConnectorController.test.js +102 -0
  57. package/lib/src/tests/controllers/DataConnectorController.test.js.map +1 -0
  58. package/lib/src/tests/controllers/DocumentController.test.js +15 -0
  59. package/lib/src/tests/controllers/DocumentController.test.js.map +1 -1
  60. package/lib/src/tests/controllers/FrameController.test.js +57 -31
  61. package/lib/src/tests/controllers/FrameController.test.js.map +1 -1
  62. package/lib/src/tests/controllers/LayoutController.test.js +23 -1
  63. package/lib/src/tests/controllers/LayoutController.test.js.map +1 -1
  64. package/lib/src/tests/controllers/PageController.test.js +7 -0
  65. package/lib/src/tests/controllers/PageController.test.js.map +1 -1
  66. package/lib/src/tests/controllers/VariableController.test.js +18 -0
  67. package/lib/src/tests/controllers/VariableController.test.js.map +1 -1
  68. package/lib/src/tests/utils/editorResponseData.test.js +45 -1
  69. package/lib/src/tests/utils/editorResponseData.test.js.map +1 -1
  70. package/lib/src/types/ColorStyleTypes.d.ts +30 -2
  71. package/lib/src/types/ColorStyleTypes.js +5 -0
  72. package/lib/src/types/ColorStyleTypes.js.map +1 -1
  73. package/lib/src/types/ConnectorTypes.d.ts +2 -13
  74. package/lib/src/types/ConnectorTypes.js +1 -0
  75. package/lib/src/types/ConnectorTypes.js.map +1 -1
  76. package/lib/src/types/DataConnectorTypes.d.ts +35 -0
  77. package/lib/src/types/DataConnectorTypes.js +2 -0
  78. package/lib/src/types/DataConnectorTypes.js.map +1 -0
  79. package/lib/src/types/DocumentTypes.d.ts +0 -1
  80. package/lib/src/types/DocumentTypes.js.map +1 -1
  81. package/lib/src/types/FontConnectorTypes.d.ts +6 -0
  82. package/lib/src/types/FontConnectorTypes.js.map +1 -1
  83. package/lib/src/types/FrameTypes.d.ts +63 -10
  84. package/lib/src/types/FrameTypes.js +30 -0
  85. package/lib/src/types/FrameTypes.js.map +1 -1
  86. package/lib/src/types/LayoutTypes.d.ts +9 -0
  87. package/lib/src/types/LayoutTypes.js.map +1 -1
  88. package/lib/src/types/MediaConnectorTypes.d.ts +6 -0
  89. package/lib/src/types/MediaConnectorTypes.js.map +1 -1
  90. package/lib/src/types/VariableTypes.d.ts +2 -0
  91. package/lib/src/types/VariableTypes.js.map +1 -1
  92. package/lib/src/utils/EditorResponseData.d.ts +4 -0
  93. package/lib/src/utils/EditorResponseData.js +19 -2
  94. package/lib/src/utils/EditorResponseData.js.map +1 -1
  95. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import type { EditorAPI, Id } from '../types/CommonTypes';
2
- import { BlendMode, FitMode, FrameLayoutType, FrameType, FrameTypeEnum, UpdateZIndexMethod, VerticalAlign, AutoGrowDirection } from '../types/FrameTypes';
1
+ import type { EditorAPI, EditorResponse, Id } from '../types/CommonTypes';
2
+ import { BlendMode, FitMode, FrameLayoutType, FrameType, FrameTypeEnum, UpdateZIndexMethod, VerticalAlign, AutoGrowDirection, FrameAnchorType, AnchorTarget } from '../types/FrameTypes';
3
3
  import { ColorUsage } from '../types/ColorStyleTypes';
4
4
  import { ShapeType } from '../types/ShapeTypes';
5
5
  import { BarcodeType } from '../types/BarcodeTypes';
@@ -22,164 +22,183 @@ export declare class FrameController {
22
22
  * This method returns the list of frames
23
23
  * @returns list of all frames
24
24
  */
25
- getAll: () => Promise<import("../types/CommonTypes").EditorResponse<FrameType[]>>;
25
+ getAll: () => Promise<EditorResponse<FrameType[]>>;
26
26
  /**
27
27
  * This method returns the list of selected frames
28
28
  * @returns list of all selected frames
29
29
  */
30
- getSelected: () => Promise<import("../types/CommonTypes").EditorResponse<FrameType[]>>;
30
+ getSelected: () => Promise<EditorResponse<FrameType[]>>;
31
31
  /**
32
32
  * This method returns the list of frames by id
33
33
  * @param id the id of a specific page
34
34
  * @returns list of all frames by id
35
35
  */
36
- getAllByPageId: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<FrameType[]>>;
36
+ getAllByPageId: (id: Id) => Promise<EditorResponse<FrameType[]>>;
37
37
  /**
38
38
  * This method returns a frame by its name
39
39
  * @param name the name of a specific frame
40
40
  * @returns frame properties
41
41
  */
42
- getByName: (name: string) => Promise<import("../types/CommonTypes").EditorResponse<FrameType>>;
42
+ getByName: (name: string) => Promise<EditorResponse<FrameType>>;
43
43
  /**
44
44
  * This method returns a frame by its id
45
45
  * @param id the id of a specific frame
46
46
  * @returns frame properties
47
47
  */
48
- getById: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<FrameType>>;
48
+ getById: (id: Id) => Promise<EditorResponse<FrameType>>;
49
49
  /**
50
50
  * This method returns all frame properties on current layout
51
51
  * @returns all frame properties on current layout
52
52
  */
53
- getPropertiesOnSelectedLayout: () => Promise<import("../types/CommonTypes").EditorResponse<FrameLayoutType[]>>;
53
+ getPropertiesOnSelectedLayout: () => Promise<EditorResponse<FrameLayoutType[]>>;
54
54
  /**
55
55
  * This method returns frame layout properties for a given frame and layout
56
56
  * @param id the id of a specific frame
57
57
  * @param layoutId the id of a specific layout
58
58
  * @returns frame layout properties
59
59
  */
60
- getLayoutProperties: (id: Id, layoutId?: Id) => Promise<import("../types/CommonTypes").EditorResponse<FrameLayoutType>>;
60
+ getLayoutProperties: (id: Id, layoutId?: Id) => Promise<EditorResponse<FrameLayoutType>>;
61
61
  /**
62
62
  * This method returns a list of frame properties for a given layout
63
63
  * @param id the id of a specific layout
64
64
  * @returns list of frame layout properties
65
65
  */
66
- getAllLayoutProperties: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<FrameLayoutType[]>>;
66
+ getAllLayoutProperties: (id: Id) => Promise<EditorResponse<FrameLayoutType[]>>;
67
67
  /**
68
- * This method will reset the frame size (width and height) to the frame's original value
68
+ * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors)
69
+ * to the frame's to be inherited from the parent layout
69
70
  * @param id the id of a specific frame
70
71
  * @returns
71
72
  */
72
- resetSize: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
73
+ resetTransformation: (id: Id) => Promise<EditorResponse<null>>;
74
+ /**
75
+ * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors)
76
+ * to the frame's to be inherited from the parent layout
77
+ * @param id the id of a specific frame
78
+ * @returns
79
+ * @deprecated Use 'resetTransformation' instead
80
+ */
81
+ resetSize: (id: Id) => Promise<EditorResponse<null>>;
73
82
  /**
74
83
  * This method will select a specific frame
75
84
  * @param id the id of a specific frame
76
85
  * @returns
77
86
  */
78
- select: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
87
+ select: (id: Id) => Promise<EditorResponse<null>>;
79
88
  /**
80
89
  * This method will select multipleFrames
81
90
  * @param ids An array of all ids you want to select
82
91
  * @returns
83
92
  */
84
- selectMultiple: (ids: Id[]) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
93
+ selectMultiple: (ids: Id[]) => Promise<EditorResponse<null>>;
85
94
  /**
86
95
  * This method changes the order of frames in the z-index list.
87
96
  * @param order the index in the list to move to
88
97
  * @param ids An array of all IDs you want to move to the given index
89
98
  * @returns
90
99
  */
91
- reorderFrames: (order: number, ids: Id[]) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
100
+ reorderFrames: (order: number, ids: Id[]) => Promise<EditorResponse<null>>;
92
101
  /**
93
102
  * This method will update the z-index of a frame.
94
103
  * @param id the id of the frame you want to change the z-index of
95
104
  * @param method the z-index update method to perform
96
105
  * @returns
97
106
  */
98
- setZIndex: (id: Id, method: UpdateZIndexMethod) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
107
+ setZIndex: (id: Id, method: UpdateZIndexMethod) => Promise<EditorResponse<null>>;
99
108
  /**
100
109
  * This method will set the height of a specific frame
101
110
  * @param id the id of a specific frame
102
111
  * @param height the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels
103
112
  * @returns
104
113
  */
105
- setHeight: (id: Id, height: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
114
+ setHeight: (id: Id, height: string) => Promise<EditorResponse<null>>;
106
115
  /**
107
116
  * This method will set the rotation angle of a specific frame
108
117
  * @param id the id of a specific frame
109
118
  * @param rotation the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels
110
119
  * @returns
111
120
  */
112
- setRotation: (id: Id, rotation: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
121
+ setRotation: (id: Id, rotation: string) => Promise<EditorResponse<null>>;
113
122
  /**
114
123
  * This method will set the width of a specific frame
115
124
  * @param id the id of a specific frame
116
125
  * @param width the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels
117
126
  * @returns
118
127
  */
119
- setWidth: (id: Id, width: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
128
+ setWidth: (id: Id, width: string) => Promise<EditorResponse<null>>;
120
129
  /**
121
130
  * This method will set the x value of a specific frame
122
131
  * @param id the id of a specific frame
123
132
  * @param XValue the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels
124
133
  * @returns
125
134
  */
126
- setX: (id: Id, XValue: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
135
+ setX: (id: Id, XValue: string) => Promise<EditorResponse<null>>;
127
136
  /**
128
137
  * This method will set the y value of a specific frame
129
138
  * @param id the id of a specific frame
130
139
  * @param YValue the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels
131
140
  * @returns
132
141
  */
133
- setY: (id: Id, YValue: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
142
+ setY: (id: Id, YValue: string) => Promise<EditorResponse<null>>;
134
143
  /**
135
144
  * This method will update the name of a specific frame
136
145
  * @param id the id of a specific frame
137
146
  * @param name the new name that the frame should receive
138
147
  * @returns
139
148
  */
140
- rename: (id: Id, name: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
149
+ rename: (id: Id, name: string) => Promise<EditorResponse<null>>;
141
150
  /**
142
151
  * This method will reset properties of a specific frame to their original values
143
152
  * @param id the id of the frame that needs to get reset
144
153
  * @returns
145
154
  */
146
- reset: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
155
+ reset: (id: Id) => Promise<EditorResponse<null>>;
147
156
  /**
148
- * This method will reset the x value of a specific frame to its original value
149
- * @param id the id of the frame that needs to get reset
157
+ * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors)
158
+ * to the frame's to be inherited from the parent layout
159
+ * @param id the id of a specific frame
150
160
  * @returns
161
+ * @deprecated Use 'resetTransformation' instead
151
162
  */
152
- resetX: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
163
+ resetX: (id: Id) => Promise<EditorResponse<null>>;
153
164
  /**
154
- * This method will reset the y value of a specific frame to its original value
155
- * @param id the id of the frame that needs to get reset
165
+ * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors)
166
+ * to the frame's to be inherited from the parent layout
167
+ * @param id the id of a specific frame
156
168
  * @returns
169
+ * @deprecated Use 'resetTransformation' instead
157
170
  */
158
- resetY: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
171
+ resetY: (id: Id) => Promise<EditorResponse<null>>;
159
172
  /**
160
- * This method will reset the rotation value of a specific frame to its original value
161
- * @param id the id of the frame that needs to get reset
173
+ * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors)
174
+ * to the frame's to be inherited from the parent layout
175
+ * @param id the id of a specific frame
162
176
  * @returns
177
+ * @deprecated Use 'resetTransformation' instead
163
178
  */
164
- resetRotation: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
179
+ resetRotation: (id: Id) => Promise<EditorResponse<null>>;
165
180
  /**
166
- * This method will reset the width of a specific frame to its original value
167
- * @param id the id of the frame that needs to get reset
181
+ * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors)
182
+ * to the frame's to be inherited from the parent layout
183
+ * @param id the id of a specific frame
168
184
  * @returns
185
+ * @deprecated Use 'resetTransformation' instead
169
186
  */
170
- resetWidth: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
187
+ resetWidth: (id: Id) => Promise<EditorResponse<null>>;
171
188
  /**
172
- * This method will reset the height of a specific frame to its original value
173
- * @param id the id of the frame that needs to get reset
189
+ * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors)
190
+ * to the frame's to be inherited from the parent layout
191
+ * @param id the id of a specific frame
174
192
  * @returns
193
+ * @deprecated Use 'resetTransformation' instead
175
194
  */
176
- resetHeight: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
195
+ resetHeight: (id: Id) => Promise<EditorResponse<null>>;
177
196
  /**
178
197
  * This method will reset the fitMode property of a specific frame to its original value
179
198
  * @param id the id of the frame that needs to get reset
180
199
  * @returns
181
200
  */
182
- resetImageFrameFitMode: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
201
+ resetImageFrameFitMode: (id: Id) => Promise<EditorResponse<null>>;
183
202
  /**
184
203
  * @deprecated Use `setIsVisible` instead.
185
204
  *
@@ -188,26 +207,26 @@ export declare class FrameController {
188
207
  * @param value True means the frame gets visible, false means the frame gets invisible
189
208
  * @returns
190
209
  */
191
- setVisibility: (id: Id, value: boolean) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
210
+ setVisibility: (id: Id, value: boolean) => Promise<EditorResponse<null>>;
192
211
  /**
193
212
  * This method will set the isVisible property of a specified frame. If set to false the frame will be invisible and vice versa.
194
213
  * @param id the id of the frame that needs to get updated
195
214
  * @param value True means the frame gets visible, false means the frame gets invisible
196
215
  * @returns
197
216
  */
198
- setIsVisible: (id: Id, value: boolean) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
217
+ setIsVisible: (id: Id, value: boolean) => Promise<EditorResponse<null>>;
199
218
  /**
200
219
  * This method will remove a specific frame using the Id.
201
220
  * @param id the id of the frame that needs to be deleted
202
221
  * @returns
203
222
  */
204
- remove: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
223
+ remove: (id: Id) => Promise<EditorResponse<null>>;
205
224
  /**
206
225
  * This method will remove frames with the given ids.
207
226
  * @param ids an array of ids of the frames to be removed.
208
227
  * @returns
209
228
  */
210
- removeFrames: (ids: Id[]) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
229
+ removeFrames: (ids: Id[]) => Promise<EditorResponse<null>>;
211
230
  /**
212
231
  * This method will create a new frame of 'type' to the template positioned on the requested
213
232
  * coordinates.
@@ -218,7 +237,7 @@ export declare class FrameController {
218
237
  * @param height Height of the new frame within the template
219
238
  * @returns the newly created frame's id
220
239
  */
221
- create: (type: FrameTypeEnum, x: number, y: number, width: number, height: number) => Promise<import("../types/CommonTypes").EditorResponse<string>>;
240
+ create: (type: FrameTypeEnum, x: number, y: number, width: number, height: number) => Promise<EditorResponse<string>>;
222
241
  /**
223
242
  * This method will create a new frame of 'type' type to the template positioned on the requested
224
243
  * coordinates.
@@ -229,7 +248,7 @@ export declare class FrameController {
229
248
  * @param height Height of the new frame within the template
230
249
  * @returns the newly created shape frame's id
231
250
  */
232
- createShapeFrame: (type: ShapeType, x: number, y: number, width: number, height: number) => Promise<import("../types/CommonTypes").EditorResponse<string>>;
251
+ createShapeFrame: (type: ShapeType, x: number, y: number, width: number, height: number) => Promise<EditorResponse<string>>;
233
252
  /**
234
253
  * @experimental This method will create a new barcode frame of 'type' type to the layout positioned on the requested
235
254
  * coordinates. Any coordinate that is not specified will default to 'center'.
@@ -240,13 +259,13 @@ export declare class FrameController {
240
259
  createBarcodeFrame: (type: BarcodeType, position?: {
241
260
  x?: number;
242
261
  y?: number;
243
- }) => Promise<import("../types/CommonTypes").EditorResponse<string>>;
262
+ }) => Promise<EditorResponse<string>>;
244
263
  /**
245
264
  * This method will duplicate a list of frames
246
265
  * @param ids An array of all ids you want to duplicate
247
266
  * @returns
248
267
  */
249
- duplicateFrames: (ids: Id[]) => Promise<import("../types/CommonTypes").EditorResponse<string>>;
268
+ duplicateFrames: (ids: Id[]) => Promise<EditorResponse<string>>;
250
269
  /**
251
270
  * This method sets or removes the image source to the ImageFrame
252
271
  * @param imageFrameId the id of the imageFrame where an image needs to be assigned to
@@ -258,7 +277,7 @@ export declare class FrameController {
258
277
  * This method removes the image source from the ImageFrame
259
278
  * @param imageFrameId the id of the imageFrame where an image needs to be removed from
260
279
  */
261
- removeImageSource: (imageFrameId: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
280
+ removeImageSource: (imageFrameId: string) => Promise<EditorResponse<null>>;
262
281
  /**
263
282
  * This method will assign an image from a mediaConnector to the correct ImageFrame
264
283
  * @param id Unique Id of the media connector
@@ -266,7 +285,7 @@ export declare class FrameController {
266
285
  * @param assetId Unique id of the asset that you want to assign to the imageFrame
267
286
  * @returns
268
287
  */
269
- setImageFromConnector: (imageFrameId: Id, connectorId: Id, assetId: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
288
+ setImageFromConnector: (imageFrameId: Id, connectorId: Id, assetId: Id) => Promise<EditorResponse<null>>;
270
289
  /**
271
290
  * This method will assign an image from url to the correct ImageFrame
272
291
  * Make sure the url can be accessed by the editor.
@@ -274,15 +293,17 @@ export declare class FrameController {
274
293
  * @param url A valid image uri
275
294
  * @returns
276
295
  */
277
- setImageFromUrl: (imageFrameId: Id, url: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
296
+ setImageFromUrl: (imageFrameId: Id, url: string) => Promise<EditorResponse<null>>;
278
297
  /**
279
298
  * This method will set the fitMode property of a specified image frame.
280
299
  * @param imageFrameId the id of the imageFrame that needs to get updated.
281
300
  * @param fitMode the new fitMode that you want to set to the imageFrame.
282
301
  * @returns
283
302
  */
284
- setImageFrameFitMode: (imageFrameId: Id, fitMode: FitMode) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
303
+ setImageFrameFitMode: (imageFrameId: Id, fitMode: FitMode) => Promise<EditorResponse<null>>;
285
304
  /**
305
+ * @deprecated the constrain proportions setter is not supported anymore.
306
+ *
286
307
  * This method will set the constrainProportions property of a specified frame. If constrainProportionsReadOnly is
287
308
  * true, the frame's constrainProportions property cannot be changed and this method will return an error.
288
309
  *
@@ -290,199 +311,228 @@ export declare class FrameController {
290
311
  * @param constrainProportions The new constraint that you want to set to the frame.
291
312
  * @returns
292
313
  */
293
- setFrameConstrainProportions: (id: Id, constrainProportions: boolean) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
314
+ setFrameConstrainProportions: (id: Id, constrainProportions: boolean) => Promise<EditorResponse<null>>;
294
315
  /**
295
316
  * This method will set the vertical alignment property of a specified frame.
296
317
  * @param id the id of the frame that needs to get updated
297
318
  * @param verticalAlign the new vertical alignment to be set to the frame.
298
319
  * @returns
299
320
  */
300
- setVerticalAlign: (id: Id, verticalAlign: VerticalAlign) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
321
+ setVerticalAlign: (id: Id, verticalAlign: VerticalAlign) => Promise<EditorResponse<null>>;
301
322
  /**
302
323
  * This method will set the min copyFitting property of a specified frame.
303
324
  * @param id the id of the frame that needs to get updated
304
325
  * @param value the new min copyFitting value to be set to the frame.
305
326
  * @returns
306
327
  */
307
- setMinCopyfitting: (id: Id, value: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
328
+ setMinCopyfitting: (id: Id, value: string) => Promise<EditorResponse<null>>;
308
329
  /**
309
330
  * This method will set the max copyFitting property of a specified frame.
310
331
  * @param id the id of the frame that needs to get updated
311
332
  * @param value the new max copyFitting value to be set to the frame.
312
333
  * @returns
313
334
  */
314
- setMaxCopyfitting: (id: Id, value: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
335
+ setMaxCopyfitting: (id: Id, value: string) => Promise<EditorResponse<null>>;
315
336
  /**
316
337
  * This method will enable copyFitting on a specified frame.
317
338
  * @param id the id of the frame that needs to get updated
318
339
  * @param value the new value to be set to the frame.
319
340
  * @returns
320
341
  */
321
- setEnableCopyfitting: (id: Id, value: boolean) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
342
+ setEnableCopyfitting: (id: Id, value: boolean) => Promise<EditorResponse<null>>;
322
343
  /**
323
344
  * This method will reset the frame minCopyfitting to the frame's original value
324
345
  * @param id the id of a specific frame
325
346
  * @returns
326
347
  */
327
- resetMinCopyfitting: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
348
+ resetMinCopyfitting: (id: Id) => Promise<EditorResponse<null>>;
328
349
  /**
329
350
  * This method will reset the frame maxCopyfitting to the frame's original value
330
351
  * @param id the id of a specific frame
331
352
  * @returns
332
353
  */
333
- resetMaxCopyfitting: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
354
+ resetMaxCopyfitting: (id: Id) => Promise<EditorResponse<null>>;
334
355
  /**
335
356
  * This method will reset the frame enableCopyfitting to the frame's original value
336
357
  * @param id the id of a specific frame
337
358
  * @returns
338
359
  */
339
- resetEnableCopyfitting: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
360
+ resetEnableCopyfitting: (id: Id) => Promise<EditorResponse<null>>;
340
361
  /**
341
362
  * This method will set the visibility of the shape fill.
342
363
  * @param shapeFrameId the id of the shapeFrame that needs to get updated.
343
364
  * @param enableFill Whether the shape fill is visible.
344
365
  * @returns
345
366
  */
346
- setShapeFrameEnableFill: (shapeFrameId: Id, enableFill: boolean) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
367
+ setShapeFrameEnableFill: (shapeFrameId: Id, enableFill: boolean) => Promise<EditorResponse<null>>;
347
368
  /**
348
369
  * This method will set the shape fill color of a specified shape frame.
349
370
  * @param shapeFrameId the id of the shapeFrame that needs to get updated.
350
371
  * @param fillColor the new shape fill color that you want to set to the shapeFrame.
351
372
  * @returns
352
373
  */
353
- setShapeFrameFillColor: (shapeFrameId: Id, fillColor: ColorUsage) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
374
+ setShapeFrameFillColor: (shapeFrameId: Id, fillColor: ColorUsage) => Promise<EditorResponse<null>>;
354
375
  /**
355
376
  * This method will set the visibility of the shape stroke.
356
377
  * @param shapeFrameId the id of the shapeFrame that needs to get updated.
357
378
  * @param enableStroke Whether the shape stroke is visible.
358
379
  * @returns
359
380
  */
360
- setShapeFrameEnableStroke: (shapeFrameId: Id, enableStroke: boolean) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
381
+ setShapeFrameEnableStroke: (shapeFrameId: Id, enableStroke: boolean) => Promise<EditorResponse<null>>;
361
382
  /**
362
383
  * This method will set the shape stroke color of a specified shape frame.
363
384
  * @param shapeFrameId the id of the shapeFrame that needs to get updated.
364
385
  * @param strokeColor the new shape stroke color that you want to set to the shapeFrame.
365
386
  * @returns
366
387
  */
367
- setShapeFrameStrokeColor: (shapeFrameId: Id, strokeColor: ColorUsage) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
388
+ setShapeFrameStrokeColor: (shapeFrameId: Id, strokeColor: ColorUsage) => Promise<EditorResponse<null>>;
368
389
  /**
369
390
  * This method will set the shape stroke weight of a specified shape frame.
370
391
  * @param shapeFrameId the id of the shapeFrame that needs to get updated.
371
392
  * @param strokeWeight the new shape stroke weight that you want to set to the shapeFrame.
372
393
  * @returns
373
394
  */
374
- setShapeFrameStrokeWeight: (shapeFrameId: Id, strokeWeight: number) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
395
+ setShapeFrameStrokeWeight: (shapeFrameId: Id, strokeWeight: number) => Promise<EditorResponse<null>>;
375
396
  /**
376
397
  * This method will set the blend mode of a specified frame
377
398
  * @param id the id of a specific frame
378
399
  * @param blendMode the blend mode
379
400
  * @returns
380
401
  */
381
- setBlendMode: (id: Id, blendMode: BlendMode) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
402
+ setBlendMode: (id: Id, blendMode: BlendMode) => Promise<EditorResponse<null>>;
382
403
  /**
383
404
  * This method will make the specified image frame go into cropping mode.
384
405
  * @param id the id of a specific image frame
385
406
  * @returns
386
407
  */
387
- enterCropMode: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
408
+ enterCropMode: (id: Id) => Promise<EditorResponse<null>>;
388
409
  /**
389
410
  * This method will exit cropping mode while saving the applied crop.
390
411
  * @returns
391
412
  */
392
- applyCropMode: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
413
+ applyCropMode: () => Promise<EditorResponse<null>>;
393
414
  /**
394
415
  * This method will reset the currently applied crop mode and apply the last selected fit mode again.
395
416
  * @param id the id of a specific image frame
396
417
  * @returns
397
418
  */
398
- resetCropMode: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
419
+ resetCropMode: (id: Id) => Promise<EditorResponse<null>>;
399
420
  /**
400
421
  * This method will exit cropping mode without saving the applied crop.
401
422
  * @returns
402
423
  */
403
- exitCropMode: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
424
+ exitCropMode: () => Promise<EditorResponse<null>>;
404
425
  /**
405
426
  * This method will enable auto grow on a specified frame.
406
427
  * @param id the id of the frame that needs to get updated
407
428
  * @param value the new value to be set to the frame.
408
429
  * @returns
409
430
  */
410
- setEnableAutoGrow: (id: Id, value: boolean) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
431
+ setEnableAutoGrow: (id: Id, value: boolean) => Promise<EditorResponse<null>>;
411
432
  /**
412
433
  * This method will set the minWidth for auto-grow of a specified frame. Set to null to remove the value.
413
434
  * @param id the id of the frame that needs to get updated
414
435
  * @param value the new minWidth value to be set
415
436
  * @returns
416
437
  */
417
- setAutoGrowMinWidth: (id: Id, value: string | null) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
438
+ setAutoGrowMinWidth: (id: Id, value: string | null) => Promise<EditorResponse<null>>;
418
439
  /**
419
440
  * This method will set the maxWidth for auto-grow of a specified frame. Set to null to remove the value.
420
441
  * @param id the id of the frame that needs to get updated
421
442
  * @param value the new maxWidth value to be set
422
443
  * @returns
423
444
  */
424
- setAutoGrowMaxWidth: (id: Id, value: string | null) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
445
+ setAutoGrowMaxWidth: (id: Id, value: string | null) => Promise<EditorResponse<null>>;
425
446
  /**
426
447
  * This method will set the minHeight for auto-grow of a specified frame. Set to null to remove the value.
427
448
  * @param id the id of the frame that needs to get updated
428
449
  * @param value the new minHeight value to be set
429
450
  * @returns
430
451
  */
431
- setAutoGrowMinHeight: (id: Id, value: string | null) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
452
+ setAutoGrowMinHeight: (id: Id, value: string | null) => Promise<EditorResponse<null>>;
432
453
  /**
433
454
  * This method will set the maxHeight for auto-grow of a specified frame. Set to null to remove the value.
434
455
  * @param id the id of the frame that needs to get updated
435
456
  * @param value the new maxHeight value to be set
436
457
  * @returns
437
458
  */
438
- setAutoGrowMaxHeight: (id: Id, value: string | null) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
459
+ setAutoGrowMaxHeight: (id: Id, value: string | null) => Promise<EditorResponse<null>>;
439
460
  /**
440
461
  * This method will set the auto grow directions for auto-grow of a specified frame.
441
462
  * @param id the id of the frame that needs to get updated
442
463
  * @param value the new directions value to be set
443
464
  * @returns
444
465
  */
445
- setAutoGrowDirections: (id: Id, value: Array<AutoGrowDirection>) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
466
+ setAutoGrowDirections: (id: Id, value: Array<AutoGrowDirection>) => Promise<EditorResponse<null>>;
446
467
  /**
447
468
  * This method will reset the auto grow enabled property of a specified frame to its original value
448
469
  * @param id the id of the frame that needs to get reset
449
470
  * @returns
450
471
  */
451
- resetAutoGrowSettingsEnabled: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
472
+ resetAutoGrowSettingsEnabled: (id: Id) => Promise<EditorResponse<null>>;
452
473
  /**
453
474
  * This method will reset the auto grow minWidth property of a specified frame to its original value
454
475
  * @param id the id of the frame that needs to get reset
455
476
  * @returns
456
477
  */
457
- resetAutoGrowMinWidth: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
478
+ resetAutoGrowMinWidth: (id: Id) => Promise<EditorResponse<null>>;
458
479
  /**
459
480
  * This method will reset the auto grow maxWidth property of a specified frame to its original value
460
481
  * @param id the id of the frame that needs to get reset
461
482
  * @returns
462
483
  */
463
- resetAutoGrowMaxWidth: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
484
+ resetAutoGrowMaxWidth: (id: Id) => Promise<EditorResponse<null>>;
464
485
  /**
465
486
  * This method will reset the auto grow minHeight property of a specified frame to its original value
466
487
  * @param id the id of the frame that needs to get reset
467
488
  * @returns
468
489
  */
469
- resetAutoGrowMinHeight: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
490
+ resetAutoGrowMinHeight: (id: Id) => Promise<EditorResponse<null>>;
470
491
  /**
471
492
  * This method will reset the auto grow maxHeight property of a specified frame to its original value
472
493
  * @param id the id of the frame that needs to get reset
473
494
  * @returns
474
495
  */
475
- resetAutoGrowMaxHeight: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
496
+ resetAutoGrowMaxHeight: (id: Id) => Promise<EditorResponse<null>>;
476
497
  /**
477
498
  * This method will reset the auto grow directions property of a specified frame to its original value
478
499
  * @param id the id of the frame that needs to get reset
479
500
  * @returns
480
501
  */
481
- resetAutoGrowDirections: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
502
+ resetAutoGrowDirections: (id: Id) => Promise<EditorResponse<null>>;
482
503
  /**
483
504
  * This method will reset all auto grow properties of a specified frame to their original values
484
505
  * @param id the id of the frame that needs to get reset
485
506
  * @returns
486
507
  */
487
- resetAutoGrow: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
508
+ resetAutoGrow: (id: Id) => Promise<EditorResponse<null>>;
509
+ private setAnchor;
510
+ /**
511
+ * @experimental
512
+ * This method will set the vertical anchor to target frame on a specified frame.
513
+ * @param id the id of the frame that needs to get a frame anchor set
514
+ * @param anchorType the type of positioning to be set to the frame
515
+ * @param anchorTarget the target frame to which it is anchored
516
+ * @param endAnchorTarget the target (end) frame to which it can be anchored
517
+ * @returns
518
+ */
519
+ setVerticalAnchor: (id: Id, anchorType: FrameAnchorType, anchorTarget: AnchorTarget, endAnchorTarget?: AnchorTarget | null) => Promise<EditorResponse<null>>;
520
+ /**
521
+ * @experimental
522
+ * This method will set the horizontal anchor to target frame on a specified frame.
523
+ * @param id the id of the frame that needs to get a frame anchor set
524
+ * @param anchorType the type of positioning to be set to the frame
525
+ * @param anchorTarget the target frame to which it is anchored
526
+ * @param endAnchorTarget the target (end) frame to which it can be anchored
527
+ * @returns
528
+ */
529
+ setHorizontalAnchor: (id: Id, anchorType: FrameAnchorType, anchorTarget: AnchorTarget, endAnchorTarget?: AnchorTarget | null) => Promise<EditorResponse<null>>;
530
+ /**
531
+ * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors)
532
+ * to the frame's to be inherited from the parent layout
533
+ * @param id the id of a specific frame
534
+ * @returns
535
+ * @deprecated Use 'resetTransformation' instead
536
+ */
537
+ resetAnchoring: (id: Id) => Promise<EditorResponse<null>>;
488
538
  }