@chili-publish/studio-sdk 0.121.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 (264) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +89 -0
  3. package/_bundles/main.js +3 -0
  4. package/_bundles/main.js.LICENSE.txt +14 -0
  5. package/_bundles/main.js.map +1 -0
  6. package/_bundles/report.html +38 -0
  7. package/lib/editor-engine.json +3 -0
  8. package/lib/package.json +89 -0
  9. package/lib/src/controllers/ActionController.d.ts +38 -0
  10. package/lib/src/controllers/ActionController.js +79 -0
  11. package/lib/src/controllers/ActionController.js.map +1 -0
  12. package/lib/src/controllers/AnimationController.d.ts +70 -0
  13. package/lib/src/controllers/AnimationController.js +135 -0
  14. package/lib/src/controllers/AnimationController.js.map +1 -0
  15. package/lib/src/controllers/CanvasController.d.ts +34 -0
  16. package/lib/src/controllers/CanvasController.js +71 -0
  17. package/lib/src/controllers/CanvasController.js.map +1 -0
  18. package/lib/src/controllers/CharacterStyleController.d.ts +55 -0
  19. package/lib/src/controllers/CharacterStyleController.js +107 -0
  20. package/lib/src/controllers/CharacterStyleController.js.map +1 -0
  21. package/lib/src/controllers/ColorStyleController.d.ts +62 -0
  22. package/lib/src/controllers/ColorStyleController.js +113 -0
  23. package/lib/src/controllers/ColorStyleController.js.map +1 -0
  24. package/lib/src/controllers/ConfigurationController.d.ts +27 -0
  25. package/lib/src/controllers/ConfigurationController.js +60 -0
  26. package/lib/src/controllers/ConfigurationController.js.map +1 -0
  27. package/lib/src/controllers/ConnectorController.d.ts +90 -0
  28. package/lib/src/controllers/ConnectorController.js +196 -0
  29. package/lib/src/controllers/ConnectorController.js.map +1 -0
  30. package/lib/src/controllers/DebugController.d.ts +33 -0
  31. package/lib/src/controllers/DebugController.js +72 -0
  32. package/lib/src/controllers/DebugController.js.map +1 -0
  33. package/lib/src/controllers/DocumentController.d.ts +40 -0
  34. package/lib/src/controllers/DocumentController.js +163 -0
  35. package/lib/src/controllers/DocumentController.js.map +1 -0
  36. package/lib/src/controllers/ExperimentController.d.ts +39 -0
  37. package/lib/src/controllers/ExperimentController.js +83 -0
  38. package/lib/src/controllers/ExperimentController.js.map +1 -0
  39. package/lib/src/controllers/FontConnectorController.d.ts +95 -0
  40. package/lib/src/controllers/FontConnectorController.js +168 -0
  41. package/lib/src/controllers/FontConnectorController.js.map +1 -0
  42. package/lib/src/controllers/FontController.d.ts +50 -0
  43. package/lib/src/controllers/FontController.js +95 -0
  44. package/lib/src/controllers/FontController.js.map +1 -0
  45. package/lib/src/controllers/FrameController.d.ts +369 -0
  46. package/lib/src/controllers/FrameController.js +599 -0
  47. package/lib/src/controllers/FrameController.js.map +1 -0
  48. package/lib/src/controllers/LayoutController.d.ts +103 -0
  49. package/lib/src/controllers/LayoutController.js +190 -0
  50. package/lib/src/controllers/LayoutController.js.map +1 -0
  51. package/lib/src/controllers/MediaConnectorController.d.ts +95 -0
  52. package/lib/src/controllers/MediaConnectorController.js +170 -0
  53. package/lib/src/controllers/MediaConnectorController.js.map +1 -0
  54. package/lib/src/controllers/PageController.d.ts +40 -0
  55. package/lib/src/controllers/PageController.js +92 -0
  56. package/lib/src/controllers/PageController.js.map +1 -0
  57. package/lib/src/controllers/ParagraphStyleController.d.ts +62 -0
  58. package/lib/src/controllers/ParagraphStyleController.js +117 -0
  59. package/lib/src/controllers/ParagraphStyleController.js.map +1 -0
  60. package/lib/src/controllers/ShapeController.d.ts +104 -0
  61. package/lib/src/controllers/ShapeController.js +174 -0
  62. package/lib/src/controllers/ShapeController.js.map +1 -0
  63. package/lib/src/controllers/SubscriberController.d.ts +143 -0
  64. package/lib/src/controllers/SubscriberController.js +213 -0
  65. package/lib/src/controllers/SubscriberController.js.map +1 -0
  66. package/lib/src/controllers/TextStyleController.d.ts +31 -0
  67. package/lib/src/controllers/TextStyleController.js +71 -0
  68. package/lib/src/controllers/TextStyleController.js.map +1 -0
  69. package/lib/src/controllers/ToolController.d.ts +54 -0
  70. package/lib/src/controllers/ToolController.js +104 -0
  71. package/lib/src/controllers/ToolController.js.map +1 -0
  72. package/lib/src/controllers/UndoManagerController.d.ts +22 -0
  73. package/lib/src/controllers/UndoManagerController.js +56 -0
  74. package/lib/src/controllers/UndoManagerController.js.map +1 -0
  75. package/lib/src/controllers/UtilsController.d.ts +20 -0
  76. package/lib/src/controllers/UtilsController.js +35 -0
  77. package/lib/src/controllers/UtilsController.js.map +1 -0
  78. package/lib/src/controllers/VariableController.d.ts +117 -0
  79. package/lib/src/controllers/VariableController.js +205 -0
  80. package/lib/src/controllers/VariableController.js.map +1 -0
  81. package/lib/src/index.d.ts +93 -0
  82. package/lib/src/index.js +154 -0
  83. package/lib/src/index.js.map +1 -0
  84. package/lib/src/interactions/connector.d.ts +31 -0
  85. package/lib/src/interactions/connector.js +99 -0
  86. package/lib/src/interactions/connector.js.map +1 -0
  87. package/lib/src/setupTests.d.ts +1 -0
  88. package/lib/src/setupTests.js +2 -0
  89. package/lib/src/setupTests.js.map +1 -0
  90. package/lib/src/tests/__mocks__/FrameProperties.d.ts +52 -0
  91. package/lib/src/tests/__mocks__/FrameProperties.js +20 -0
  92. package/lib/src/tests/__mocks__/FrameProperties.js.map +1 -0
  93. package/lib/src/tests/__mocks__/MockImageFrameSource.d.ts +4 -0
  94. package/lib/src/tests/__mocks__/MockImageFrameSource.js +15 -0
  95. package/lib/src/tests/__mocks__/MockImageFrameSource.js.map +1 -0
  96. package/lib/src/tests/__mocks__/animations.d.ts +2 -0
  97. package/lib/src/tests/__mocks__/animations.js +10 -0
  98. package/lib/src/tests/__mocks__/animations.js.map +1 -0
  99. package/lib/src/tests/__mocks__/config.d.ts +5 -0
  100. package/lib/src/tests/__mocks__/config.js +31 -0
  101. package/lib/src/tests/__mocks__/config.js.map +1 -0
  102. package/lib/src/tests/__mocks__/mockDocument.d.ts +1 -0
  103. package/lib/src/tests/__mocks__/mockDocument.js +2 -0
  104. package/lib/src/tests/__mocks__/mockDocument.js.map +1 -0
  105. package/lib/src/tests/controllers/ActionController.test.d.ts +1 -0
  106. package/lib/src/tests/controllers/ActionController.test.js +61 -0
  107. package/lib/src/tests/controllers/ActionController.test.js.map +1 -0
  108. package/lib/src/tests/controllers/AnimationController.test.d.ts +1 -0
  109. package/lib/src/tests/controllers/AnimationController.test.js +91 -0
  110. package/lib/src/tests/controllers/AnimationController.test.js.map +1 -0
  111. package/lib/src/tests/controllers/CanvasController.test.d.ts +1 -0
  112. package/lib/src/tests/controllers/CanvasController.test.js +50 -0
  113. package/lib/src/tests/controllers/CanvasController.test.js.map +1 -0
  114. package/lib/src/tests/controllers/CharacterStyleController.test.d.ts +1 -0
  115. package/lib/src/tests/controllers/CharacterStyleController.test.js +125 -0
  116. package/lib/src/tests/controllers/CharacterStyleController.test.js.map +1 -0
  117. package/lib/src/tests/controllers/ColorStyleController.test.d.ts +1 -0
  118. package/lib/src/tests/controllers/ColorStyleController.test.js +83 -0
  119. package/lib/src/tests/controllers/ColorStyleController.test.js.map +1 -0
  120. package/lib/src/tests/controllers/ConfigurationConnectorController.test.d.ts +1 -0
  121. package/lib/src/tests/controllers/ConfigurationConnectorController.test.js +39 -0
  122. package/lib/src/tests/controllers/ConfigurationConnectorController.test.js.map +1 -0
  123. package/lib/src/tests/controllers/ConnectorController.test.d.ts +1 -0
  124. package/lib/src/tests/controllers/ConnectorController.test.js +77 -0
  125. package/lib/src/tests/controllers/ConnectorController.test.js.map +1 -0
  126. package/lib/src/tests/controllers/DebugController.test.d.ts +1 -0
  127. package/lib/src/tests/controllers/DebugController.test.js +47 -0
  128. package/lib/src/tests/controllers/DebugController.test.js.map +1 -0
  129. package/lib/src/tests/controllers/DocumentController.test.d.ts +1 -0
  130. package/lib/src/tests/controllers/DocumentController.test.js +170 -0
  131. package/lib/src/tests/controllers/DocumentController.test.js.map +1 -0
  132. package/lib/src/tests/controllers/ExperimentController.test.d.ts +1 -0
  133. package/lib/src/tests/controllers/ExperimentController.test.js +53 -0
  134. package/lib/src/tests/controllers/ExperimentController.test.js.map +1 -0
  135. package/lib/src/tests/controllers/FontConnectorController.test.d.ts +1 -0
  136. package/lib/src/tests/controllers/FontConnectorController.test.js +109 -0
  137. package/lib/src/tests/controllers/FontConnectorController.test.js.map +1 -0
  138. package/lib/src/tests/controllers/FontController.test.d.ts +1 -0
  139. package/lib/src/tests/controllers/FontController.test.js +73 -0
  140. package/lib/src/tests/controllers/FontController.test.js.map +1 -0
  141. package/lib/src/tests/controllers/FrameController.test.d.ts +1 -0
  142. package/lib/src/tests/controllers/FrameController.test.js +408 -0
  143. package/lib/src/tests/controllers/FrameController.test.js.map +1 -0
  144. package/lib/src/tests/controllers/LayoutController.test.d.ts +1 -0
  145. package/lib/src/tests/controllers/LayoutController.test.js +144 -0
  146. package/lib/src/tests/controllers/LayoutController.test.js.map +1 -0
  147. package/lib/src/tests/controllers/MediaConnectorController.test.d.ts +1 -0
  148. package/lib/src/tests/controllers/MediaConnectorController.test.js +109 -0
  149. package/lib/src/tests/controllers/MediaConnectorController.test.js.map +1 -0
  150. package/lib/src/tests/controllers/PageController.test.d.ts +1 -0
  151. package/lib/src/tests/controllers/PageController.test.js +58 -0
  152. package/lib/src/tests/controllers/PageController.test.js.map +1 -0
  153. package/lib/src/tests/controllers/ParagraphStyleController.test.d.ts +1 -0
  154. package/lib/src/tests/controllers/ParagraphStyleController.test.js +139 -0
  155. package/lib/src/tests/controllers/ParagraphStyleController.test.js.map +1 -0
  156. package/lib/src/tests/controllers/ShapeController.test.d.ts +1 -0
  157. package/lib/src/tests/controllers/ShapeController.test.js +102 -0
  158. package/lib/src/tests/controllers/ShapeController.test.js.map +1 -0
  159. package/lib/src/tests/controllers/SubscriberContoller.test.d.ts +1 -0
  160. package/lib/src/tests/controllers/SubscriberContoller.test.js +201 -0
  161. package/lib/src/tests/controllers/SubscriberContoller.test.js.map +1 -0
  162. package/lib/src/tests/controllers/TextStyleController.test.d.ts +1 -0
  163. package/lib/src/tests/controllers/TextStyleController.test.js +43 -0
  164. package/lib/src/tests/controllers/TextStyleController.test.js.map +1 -0
  165. package/lib/src/tests/controllers/ToolController.test.d.ts +1 -0
  166. package/lib/src/tests/controllers/ToolController.test.js +72 -0
  167. package/lib/src/tests/controllers/ToolController.test.js.map +1 -0
  168. package/lib/src/tests/controllers/UndoManagerController.test.d.ts +1 -0
  169. package/lib/src/tests/controllers/UndoManagerController.test.js +35 -0
  170. package/lib/src/tests/controllers/UndoManagerController.test.js.map +1 -0
  171. package/lib/src/tests/controllers/UtilsController.test.d.ts +1 -0
  172. package/lib/src/tests/controllers/UtilsController.test.js +33 -0
  173. package/lib/src/tests/controllers/UtilsController.test.js.map +1 -0
  174. package/lib/src/tests/controllers/VariableController.test.d.ts +1 -0
  175. package/lib/src/tests/controllers/VariableController.test.js +161 -0
  176. package/lib/src/tests/controllers/VariableController.test.js.map +1 -0
  177. package/lib/src/tests/index.test.d.ts +1 -0
  178. package/lib/src/tests/index.test.js +26 -0
  179. package/lib/src/tests/index.test.js.map +1 -0
  180. package/lib/src/tests/interactions/connector.test.d.ts +1 -0
  181. package/lib/src/tests/interactions/connector.test.js +24 -0
  182. package/lib/src/tests/interactions/connector.test.js.map +1 -0
  183. package/lib/src/tests/utils/editorResponseData.test.d.ts +1 -0
  184. package/lib/src/tests/utils/editorResponseData.test.js +48 -0
  185. package/lib/src/tests/utils/editorResponseData.test.js.map +1 -0
  186. package/lib/src/tests/utils/getClaculatedValue.test.d.ts +1 -0
  187. package/lib/src/tests/utils/getClaculatedValue.test.js +78 -0
  188. package/lib/src/tests/utils/getClaculatedValue.test.js.map +1 -0
  189. package/lib/src/tests/utils/getFetchUrls.test.d.ts +1 -0
  190. package/lib/src/tests/utils/getFetchUrls.test.js +10 -0
  191. package/lib/src/tests/utils/getFetchUrls.test.js.map +1 -0
  192. package/lib/src/tests/utils/round.test.d.ts +1 -0
  193. package/lib/src/tests/utils/round.test.js +16 -0
  194. package/lib/src/tests/utils/round.test.js.map +1 -0
  195. package/lib/src/types/ActionTypes.d.ts +63 -0
  196. package/lib/src/types/ActionTypes.js +29 -0
  197. package/lib/src/types/ActionTypes.js.map +1 -0
  198. package/lib/src/types/AnimationTypes.d.ts +111 -0
  199. package/lib/src/types/AnimationTypes.js +49 -0
  200. package/lib/src/types/AnimationTypes.js.map +1 -0
  201. package/lib/src/types/CharacterStyleTypes.d.ts +65 -0
  202. package/lib/src/types/CharacterStyleTypes.js +2 -0
  203. package/lib/src/types/CharacterStyleTypes.js.map +1 -0
  204. package/lib/src/types/ColorStyleTypes.d.ts +73 -0
  205. package/lib/src/types/ColorStyleTypes.js +24 -0
  206. package/lib/src/types/ColorStyleTypes.js.map +1 -0
  207. package/lib/src/types/CommonTypes.d.ts +92 -0
  208. package/lib/src/types/CommonTypes.js +2 -0
  209. package/lib/src/types/CommonTypes.js.map +1 -0
  210. package/lib/src/types/ConfigurationTypes.d.ts +6 -0
  211. package/lib/src/types/ConfigurationTypes.js +8 -0
  212. package/lib/src/types/ConfigurationTypes.js.map +1 -0
  213. package/lib/src/types/ConnectorTypes.d.ts +115 -0
  214. package/lib/src/types/ConnectorTypes.js +94 -0
  215. package/lib/src/types/ConnectorTypes.js.map +1 -0
  216. package/lib/src/types/DebugTypes.d.ts +25 -0
  217. package/lib/src/types/DebugTypes.js +8 -0
  218. package/lib/src/types/DebugTypes.js.map +1 -0
  219. package/lib/src/types/DocumentTypes.d.ts +180 -0
  220. package/lib/src/types/DocumentTypes.js +17 -0
  221. package/lib/src/types/DocumentTypes.js.map +1 -0
  222. package/lib/src/types/FontConnectorTypes.d.ts +20 -0
  223. package/lib/src/types/FontConnectorTypes.js +6 -0
  224. package/lib/src/types/FontConnectorTypes.js.map +1 -0
  225. package/lib/src/types/FontTypes.d.ts +15 -0
  226. package/lib/src/types/FontTypes.js +2 -0
  227. package/lib/src/types/FontTypes.js.map +1 -0
  228. package/lib/src/types/FrameTypes.d.ts +156 -0
  229. package/lib/src/types/FrameTypes.js +63 -0
  230. package/lib/src/types/FrameTypes.js.map +1 -0
  231. package/lib/src/types/LayoutTypes.d.ts +61 -0
  232. package/lib/src/types/LayoutTypes.js +6 -0
  233. package/lib/src/types/LayoutTypes.js.map +1 -0
  234. package/lib/src/types/MediaConnectorTypes.d.ts +20 -0
  235. package/lib/src/types/MediaConnectorTypes.js +6 -0
  236. package/lib/src/types/MediaConnectorTypes.js.map +1 -0
  237. package/lib/src/types/PageTypes.d.ts +12 -0
  238. package/lib/src/types/PageTypes.js +2 -0
  239. package/lib/src/types/PageTypes.js.map +1 -0
  240. package/lib/src/types/ParagraphStyleTypes.d.ts +79 -0
  241. package/lib/src/types/ParagraphStyleTypes.js +2 -0
  242. package/lib/src/types/ParagraphStyleTypes.js.map +1 -0
  243. package/lib/src/types/ShapeTypes.d.ts +26 -0
  244. package/lib/src/types/ShapeTypes.js +13 -0
  245. package/lib/src/types/ShapeTypes.js.map +1 -0
  246. package/lib/src/types/TextStyleTypes.d.ts +131 -0
  247. package/lib/src/types/TextStyleTypes.js +68 -0
  248. package/lib/src/types/TextStyleTypes.js.map +1 -0
  249. package/lib/src/types/VariableTypes.d.ts +45 -0
  250. package/lib/src/types/VariableTypes.js +13 -0
  251. package/lib/src/types/VariableTypes.js.map +1 -0
  252. package/lib/src/utils/EditorResponseData.d.ts +3 -0
  253. package/lib/src/utils/EditorResponseData.js +16 -0
  254. package/lib/src/utils/EditorResponseData.js.map +1 -0
  255. package/lib/src/utils/enums.d.ts +30 -0
  256. package/lib/src/utils/enums.js +36 -0
  257. package/lib/src/utils/enums.js.map +1 -0
  258. package/lib/src/utils/getCalculatedValue.d.ts +2 -0
  259. package/lib/src/utils/getCalculatedValue.js +20 -0
  260. package/lib/src/utils/getCalculatedValue.js.map +1 -0
  261. package/lib/src/utils/getFetchUrl.d.ts +2 -0
  262. package/lib/src/utils/getFetchUrl.js +3 -0
  263. package/lib/src/utils/getFetchUrl.js.map +1 -0
  264. package/package.json +89 -0
@@ -0,0 +1,369 @@
1
+ import type { EditorAPI, Id } from '../types/CommonTypes';
2
+ import { BlendMode, FitMode, FrameLayoutType, FrameType, FrameTypeEnum, UpdateZIndexMethod, VerticalAlign } from '../types/FrameTypes';
3
+ import { ColorUsage } from '../types/ColorStyleTypes';
4
+ import { ShapeType } from '../types/ShapeTypes';
5
+ /**
6
+ * The FrameController is responsible for all communication regarding Frames.
7
+ * Methods inside this controller can be called by `window.SDK.frame.{method-name}`
8
+ */
9
+ export declare class FrameController {
10
+ #private;
11
+ /**
12
+ * @ignore
13
+ */
14
+ constructor(editorAPI: EditorAPI);
15
+ /**
16
+ * This variable helps to redirect shapes related methods to newly introduced ShapeController
17
+ * to avoid any breaking changes
18
+ */
19
+ private shapeController;
20
+ /**
21
+ * This method returns the list of frames
22
+ * @returns
23
+ */
24
+ getFrames: () => Promise<import("../types/CommonTypes").EditorResponse<FrameType[]>>;
25
+ /**
26
+ * This method returns the list of selected frames
27
+ * @returns
28
+ */
29
+ getSelectedFrames: () => Promise<import("../types/CommonTypes").EditorResponse<FrameType[]>>;
30
+ /**
31
+ * This method returns the list of frames by pageId
32
+ * @param pageId The ID of a specific page
33
+ * @returns
34
+ */
35
+ getFramesByPageId: (pageId: Id) => Promise<import("../types/CommonTypes").EditorResponse<FrameType[]>>;
36
+ /**
37
+ * This method returns a frame by its name
38
+ * @param name The name of a specific frame
39
+ * @returns
40
+ */
41
+ getFrameByName: (name: string) => Promise<import("../types/CommonTypes").EditorResponse<FrameType>>;
42
+ /**
43
+ * This method returns a frame by its id
44
+ * @param id The ID of a specific frame
45
+ * @returns
46
+ */
47
+ getFrameById: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<FrameType>>;
48
+ /**
49
+ * This method returns all frame properties on current layout
50
+ * @returns
51
+ */
52
+ getFramePropertiesOnSelectedLayout: () => Promise<import("../types/CommonTypes").EditorResponse<FrameLayoutType[]>>;
53
+ /**
54
+ * This method returns frame properties for a given frame and layout
55
+ * @param frameId The ID of a specific frame
56
+ * @param layoutId The ID of a specific layout
57
+ * @returns
58
+ */
59
+ getFramePropertiesByFrameId: (frameId: Id, layoutId?: Id) => Promise<import("../types/CommonTypes").EditorResponse<FrameLayoutType>>;
60
+ /**
61
+ * This method returns frame properties for a given layout
62
+ * @param layoutId The ID of a specific layout
63
+ * @returns
64
+ */
65
+ getFramesProperties: (layoutId: Id) => Promise<import("../types/CommonTypes").EditorResponse<FrameLayoutType[]>>;
66
+ /**
67
+ * This method will reset the frame size (width and height) to the frame's original value
68
+ * @param frameId The ID of a specific frame
69
+ * @returns
70
+ */
71
+ resetFrameSize: (frameId: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
72
+ /**
73
+ * This method will select a specific frame
74
+ * @param frameId The ID of a specific frame
75
+ * @returns
76
+ */
77
+ selectFrame: (frameId: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
78
+ /**
79
+ * This method will select multipleFrames
80
+ * @param frameIds An array of all IDs you want to select
81
+ * @returns
82
+ */
83
+ selectMultipleFrames: (frameIds: Id[]) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
84
+ /**
85
+ * This method changes the order of frames in the z-index list.
86
+ * @param orderIndex The index in the list to move to
87
+ * @param frameIdsToMove An array of all IDs you want to move to the given index
88
+ * @returns
89
+ */
90
+ reorderFrames: (orderIndex: number, frameIdsToMove: Id[]) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
91
+ /**
92
+ * This method will update the z-index of a frame.
93
+ * @param frameId The ID of the frame you want to change the z-index of
94
+ * @param method The z-index update method to perform
95
+ * @returns
96
+ */
97
+ setFrameZIndex: (frameId: Id, method: UpdateZIndexMethod) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
98
+ /**
99
+ * This method will set the height of a specific frame
100
+ * @param frameId The ID of a specific frame
101
+ * @param value The string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels
102
+ * @returns
103
+ */
104
+ setFrameHeight: (frameId: Id, value: string) => Promise<import("../types/CommonTypes").EditorResponse<null> | null>;
105
+ /**
106
+ * This method will set the rotation angle of a specific frame
107
+ * @param frameId The ID of a specific frame
108
+ * @param value The string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels
109
+ * @returns
110
+ */
111
+ setFrameRotation: (frameId: Id, value: string) => Promise<import("../types/CommonTypes").EditorResponse<null> | null>;
112
+ /**
113
+ * This method will set the width of a specific frame
114
+ * @param frameId The ID of a specific frame
115
+ * @param value The string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels
116
+ * @returns
117
+ */
118
+ setFrameWidth: (frameId: Id, value: string) => Promise<import("../types/CommonTypes").EditorResponse<null> | null>;
119
+ /**
120
+ * This method will set the x value of a specific frame
121
+ * @param frameId The ID of a specific frame
122
+ * @param value The string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels
123
+ * @returns
124
+ */
125
+ setFrameX: (frameId: Id, value: string) => Promise<import("../types/CommonTypes").EditorResponse<null> | null>;
126
+ /**
127
+ * This method will set the y value of a specific frame
128
+ * @param frameId The ID of a specific frame
129
+ * @param value The string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels
130
+ * @returns
131
+ */
132
+ setFrameY: (frameId: Id, value: string) => Promise<import("../types/CommonTypes").EditorResponse<null> | null>;
133
+ /**
134
+ * This method will update the name of a specific frame
135
+ * @param frameId The ID of a specific frame
136
+ * @param frameName The new name that the frame should receive
137
+ * @returns
138
+ */
139
+ setFrameName: (frameId: Id, frameName: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
140
+ /**
141
+ * This method will reset properties of a specific frame to their original values
142
+ * @param frameId The ID of the frame that needs to get reset
143
+ * @returns
144
+ */
145
+ resetFrame: (frameId: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
146
+ /**
147
+ * This method will reset the x value of a specific frame to its original value
148
+ * @param frameId The ID of the frame that needs to get reset
149
+ * @returns
150
+ */
151
+ resetFrameX: (frameId: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
152
+ /**
153
+ * This method will reset the y value of a specific frame to its original value
154
+ * @param frameId The ID of the frame that needs to get reset
155
+ * @returns
156
+ */
157
+ resetFrameY: (frameId: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
158
+ /**
159
+ * This method will reset the rotation value of a specific frame to its original value
160
+ * @param frameId The ID of the frame that needs to get reset
161
+ * @returns
162
+ */
163
+ resetFrameRotation: (frameId: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
164
+ /**
165
+ * This method will reset the width of a specific frame to its original value
166
+ * @param frameId The ID of the frame that needs to get reset
167
+ * @returns
168
+ */
169
+ resetFrameWidth: (frameId: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
170
+ /**
171
+ * This method will reset the height of a specific frame to its original value
172
+ * @param frameId The ID of the frame that needs to get reset
173
+ * @returns
174
+ */
175
+ resetFrameHeight: (frameId: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
176
+ /**
177
+ * This method will reset the fitMode property of a specific frame to its original value
178
+ * @param frameId The ID of the frame that needs to get reset
179
+ * @returns
180
+ */
181
+ resetImageFrameFitMode: (frameId: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
182
+ /**
183
+ * This method will set the visibility property of a specified frame. If set to false the frame will be invisible and vice versa.
184
+ * @param frameId The ID of the frame that needs to get updated
185
+ * @param value True means the frame gets visible, false means the frame gets invisible
186
+ * @returns
187
+ */
188
+ setFrameVisibility: (frameId: Id, value: boolean) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
189
+ /**
190
+ * This method will remove a specific frame using the Id.
191
+ * @param frameId The ID of the frame that needs to be deleted
192
+ * @returns
193
+ */
194
+ removeFrame: (frameId: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
195
+ /**
196
+ * This method will add a new frame of 'frameType' to the template positioned on the requested
197
+ * coordinates.
198
+ * @param frameType The type of frame to create
199
+ * @param x X coordinate of the new frame within the template
200
+ * @param y Y coordinate of the new frame within the template
201
+ * @param width Width of the new frame within the template
202
+ * @param height Height of the new frame within the template
203
+ * @returns The newly created frame's ID
204
+ */
205
+ addFrame: (frameType: FrameTypeEnum, x: number, y: number, width: number, height: number) => Promise<import("../types/CommonTypes").EditorResponse<string>>;
206
+ /**
207
+ * This method will add a new frame of 'shapeType' type to the template positioned on the requested
208
+ * coordinates.
209
+ * @param shapeType The type of frame to create
210
+ * @param x X coordinate of the new frame within the template
211
+ * @param y Y coordinate of the new frame within the template
212
+ * @param width Width of the new frame within the template
213
+ * @param height Height of the new frame within the template
214
+ * @returns The newly created frame's ID
215
+ */
216
+ addShapeFrame: (shapeType: ShapeType, x: number, y: number, width: number, height: number) => Promise<import("../types/CommonTypes").EditorResponse<string>>;
217
+ /**
218
+ * This method sets or removes the image source to the ImageFrame
219
+ * @param imageFrameId The ID of the imageFrame where an image needs to be assigned to
220
+ * @param src A new image source
221
+ * @returns
222
+ */
223
+ private updateImageSource;
224
+ /**
225
+ * This method removes the image source from the ImageFrame
226
+ * @param imageFrameId The ID of the imageFrame where an image needs to be removed from
227
+ */
228
+ removeImageSource: (imageFrameId: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
229
+ /**
230
+ * This method will assign an image from a mediaConnector to the correct ImageFrame
231
+ * @param imageFrameId The ID of the imageFrame where an image needs to be assigned to
232
+ * @param connectorId Unique Id of the media connector
233
+ * @param resourceId Unique Id of the asset that you want to assign to the imageFrame
234
+ * @returns
235
+ */
236
+ setImageFromConnector: (imageFrameId: Id, connectorId: string, resourceId: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
237
+ /**
238
+ * This method will assign an image from url to the correct ImageFrame
239
+ * Make sure the url can be accessed by the editor.
240
+ * @param imageFrameId The ID of the imageFrame where an image needs to be assigned to
241
+ * @param url A valid image uri
242
+ * @returns
243
+ */
244
+ setImageFromUrl: (imageFrameId: Id, url: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
245
+ /**
246
+ * This method will set the fitMode property of a specified image frame.
247
+ * @param imageFrameId The ID of the imageFrame that needs to get updated.
248
+ * @param fitMode The new fitMode that you want to set to the imageFrame.
249
+ * @returns
250
+ */
251
+ setImageFrameFitMode: (imageFrameId: Id, fitMode: FitMode) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
252
+ /**
253
+ * This method will set the constrainProportions property of a specified frame.
254
+ * @param frameId The ID of the frame that needs to get updated.
255
+ * @param constrainProportions The new constraint that you want to set to the frame.
256
+ * @returns
257
+ */
258
+ setFrameConstrainProportions: (frameId: Id, constrainProportions: boolean) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
259
+ /**
260
+ * This method will set the vertical alignment property of a specified frame.
261
+ * @param frameId The ID of the frame that needs to get updated
262
+ * @param verticalAlign The new vertical alignment to be set to the frame.
263
+ * @returns
264
+ */
265
+ setVerticalAlignment: (frameId: Id, verticalAlign: VerticalAlign) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
266
+ /**
267
+ * This method will set the min copyFitting property of a specified frame.
268
+ * @param frameId The ID of the frame that needs to get updated
269
+ * @param value The new min copyFitting value to be set to the frame.
270
+ * @returns
271
+ */
272
+ setMinCopyfitting: (frameId: Id, value: string) => Promise<import("../types/CommonTypes").EditorResponse<null> | null>;
273
+ /**
274
+ * This method will set the max copyFitting property of a specified frame.
275
+ * @param frameId The ID of the frame that needs to get updated
276
+ * @param value The new max copyFitting value to be set to the frame.
277
+ * @returns
278
+ */
279
+ setMaxCopyfitting: (frameId: Id, value: string) => Promise<import("../types/CommonTypes").EditorResponse<null> | null>;
280
+ /**
281
+ * This method will enable copyFitting on a specified frame.
282
+ * @param frameId The ID of the frame that needs to get updated
283
+ * @param value The new value to be set to the frame.
284
+ * @returns
285
+ */
286
+ setEnableCopyfitting: (frameId: Id, value: boolean) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
287
+ /**
288
+ * This method will reset the frame minCopyfitting to the frame's original value
289
+ * @param frameId The ID of a specific frame
290
+ * @returns
291
+ */
292
+ resetMinCopyfitting: (frameId: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
293
+ /**
294
+ * This method will reset the frame maxCopyfitting to the frame's original value
295
+ * @param frameId The ID of a specific frame
296
+ * @returns
297
+ */
298
+ resetMaxCopyfitting: (frameId: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
299
+ /**
300
+ * This method will reset the frame enableCopyfitting to the frame's original value
301
+ * @param frameId The ID of a specific frame
302
+ * @returns
303
+ */
304
+ resetEnableCopyfitting: (frameId: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
305
+ /**
306
+ * This method will set the visibility of the shape fill.
307
+ * @param shapeFrameId The ID of the shapeFrame that needs to get updated.
308
+ * @param enableFill Whether the shape fill is visible.
309
+ * @returns
310
+ */
311
+ setShapeFrameEnableFill: (shapeFrameId: Id, enableFill: boolean) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
312
+ /**
313
+ * This method will set the shape fill color of a specified shape frame.
314
+ * @param shapeFrameId The ID of the shapeFrame that needs to get updated.
315
+ * @param fillColor The new shape fill color that you want to set to the shapeFrame.
316
+ * @returns
317
+ */
318
+ setShapeFrameFillColor: (shapeFrameId: Id, fillColor: ColorUsage) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
319
+ /**
320
+ * This method will set the visibility of the shape stroke.
321
+ * @param shapeFrameId The ID of the shapeFrame that needs to get updated.
322
+ * @param enableStroke Whether the shape stroke is visible.
323
+ * @returns
324
+ */
325
+ setShapeFrameEnableStroke: (shapeFrameId: Id, enableStroke: boolean) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
326
+ /**
327
+ * This method will set the shape stroke color of a specified shape frame.
328
+ * @param shapeFrameId The ID of the shapeFrame that needs to get updated.
329
+ * @param strokeColor The new shape stroke color that you want to set to the shapeFrame.
330
+ * @returns
331
+ */
332
+ setShapeFrameStrokeColor: (shapeFrameId: Id, strokeColor: ColorUsage) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
333
+ /**
334
+ * This method will set the shape stroke weight of a specified shape frame.
335
+ * @param shapeFrameId The ID of the shapeFrame that needs to get updated.
336
+ * @param strokeWeight The new shape stroke weight that you want to set to the shapeFrame.
337
+ * @returns
338
+ */
339
+ setShapeFrameStrokeWeight: (shapeFrameId: Id, strokeWeight: number) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
340
+ /**
341
+ * This method will set the blend mode of a specified shape frame
342
+ * @param frameId The ID of a specific frame
343
+ * @param blendMode The blend mode
344
+ * @returns
345
+ */
346
+ setFrameBlendMode: (frameId: Id, blendMode: BlendMode) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
347
+ /**
348
+ * This method will make the specified image frame go into cropping mode.
349
+ * @param frameId The ID of a specific image frame
350
+ * @returns
351
+ */
352
+ enterCropMode: (frameId: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
353
+ /**
354
+ * This method will exit cropping mode while saving the applied crop.
355
+ * @returns
356
+ */
357
+ applyCropMode: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
358
+ /**
359
+ * This method will reset the currently applied crop mode and apply the last selected fit mode again.
360
+ * @param frameId The ID of a specific image frame
361
+ * @returns
362
+ */
363
+ resetCropMode: (frameId: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
364
+ /**
365
+ * This method will exit cropping mode without saving the applied crop.
366
+ * @returns
367
+ */
368
+ cancelCropMode: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
369
+ }